UNPKG

snack-alert

Version:

A simple React toast notification library with Tailwind CSS

1,624 lines 908 kB
import yS, { createContext as rE, useContext as dE, forwardRef as q2, createElement as mS, useRef as hE, useState as mE } from "react"; import Y2 from "react-dom"; const j2 = rE(null), yE = () => { const Z = dE(j2); if (!Z) throw new Error("useAlert must be used within an AlertProvider"); return Z; }; var qg = { exports: {} }, cp = {}; /** * @license React * react-jsx-runtime.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var O2; function pE() { if (O2) return cp; O2 = 1; var Z = Symbol.for("react.transitional.element"), it = Symbol.for("react.fragment"); function gt(C, Qt, Vt) { var Se = null; if (Vt !== void 0 && (Se = "" + Vt), Qt.key !== void 0 && (Se = "" + Qt.key), "key" in Qt) { Vt = {}; for (var J in Qt) J !== "key" && (Vt[J] = Qt[J]); } else Vt = Qt; return Qt = Vt.ref, { $$typeof: Z, type: C, key: Se, ref: Qt !== void 0 ? Qt : null, props: Vt }; } return cp.Fragment = it, cp.jsx = gt, cp.jsxs = gt, cp; } var ip = {}; /** * @license React * react-jsx-runtime.development.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var M2; function vE() { return M2 || (M2 = 1, process.env.NODE_ENV !== "production" && (function() { function Z(j) { if (j == null) return null; if (typeof j == "function") return j.$$typeof === Qe ? null : j.displayName || j.name || null; if (typeof j == "string") return j; switch (j) { case ye: return "Fragment"; case Ja: return "Profiler"; case ee: return "StrictMode"; case Nl: return "Suspense"; case We: return "SuspenseList"; case et: return "Activity"; } if (typeof j == "object") switch (typeof j.tag == "number" && console.error( "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue." ), j.$$typeof) { case Bl: return "Portal"; case Dl: return j.displayName || "Context"; case Xe: return (j._context.displayName || "Context") + ".Consumer"; case Sa: var k = j.render; return j = j.displayName, j || (j = k.displayName || k.name || "", j = j !== "" ? "ForwardRef(" + j + ")" : "ForwardRef"), j; case xt: return k = j.displayName || null, k !== null ? k : Z(j.type) || "Memo"; case ol: k = j._payload, j = j._init; try { return Z(j(k)); } catch { } } return null; } function it(j) { return "" + j; } function gt(j) { try { it(j); var k = !1; } catch { k = !0; } if (k) { k = console; var tt = k.error, lt = typeof Symbol == "function" && Symbol.toStringTag && j[Symbol.toStringTag] || j.constructor.name || "Object"; return tt.call( k, "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", lt ), it(j); } } function C(j) { if (j === ye) return "<>"; if (typeof j == "object" && j !== null && j.$$typeof === ol) return "<...>"; try { var k = Z(j); return k ? "<" + k + ">" : "<...>"; } catch { return "<...>"; } } function Qt() { var j = Ht.A; return j === null ? null : j.getOwner(); } function Vt() { return Error("react-stack-top-frame"); } function Se(j) { if (Rt.call(j, "key")) { var k = Object.getOwnPropertyDescriptor(j, "key").get; if (k && k.isReactWarning) return !1; } return j.key !== void 0; } function J(j, k) { function tt() { O || (O = !0, console.error( "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", k )); } tt.isReactWarning = !0, Object.defineProperty(j, "key", { get: tt, configurable: !0 }); } function be() { var j = Z(this.type); return Q[j] || (Q[j] = !0, console.error( "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release." )), j = this.props.ref, j !== void 0 ? j : null; } function il(j, k, tt, lt, Ne, Ka) { var pe = tt.ref; return j = { $$typeof: Ue, type: j, key: k, props: tt, _owner: lt }, (pe !== void 0 ? pe : null) !== null ? Object.defineProperty(j, "ref", { enumerable: !1, get: be }) : Object.defineProperty(j, "ref", { enumerable: !1, value: null }), j._store = {}, Object.defineProperty(j._store, "validated", { configurable: !1, enumerable: !1, writable: !0, value: 0 }), Object.defineProperty(j, "_debugInfo", { configurable: !1, enumerable: !1, writable: !0, value: null }), Object.defineProperty(j, "_debugStack", { configurable: !1, enumerable: !1, writable: !0, value: Ne }), Object.defineProperty(j, "_debugTask", { configurable: !1, enumerable: !1, writable: !0, value: Ka }), Object.freeze && (Object.freeze(j.props), Object.freeze(j)), j; } function wa(j, k, tt, lt, Ne, Ka) { var pe = k.children; if (pe !== void 0) if (lt) if (xl(pe)) { for (lt = 0; lt < pe.length; lt++) ft(pe[lt]); Object.freeze && Object.freeze(pe); } else console.error( "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead." ); else ft(pe); if (Rt.call(k, "key")) { pe = Z(j); var $a = Object.keys(k).filter(function(Jf) { return Jf !== "key"; }); lt = 0 < $a.length ? "{key: someKey, " + $a.join(": ..., ") + ": ...}" : "{key: someKey}", dt[pe + lt] || ($a = 0 < $a.length ? "{" + $a.join(": ..., ") + ": ...}" : "{}", console.error( `A props object containing a "key" prop is being spread into JSX: let props = %s; <%s {...props} /> React keys must be passed directly to JSX without using spread: let props = %s; <%s key={someKey} {...props} />`, lt, pe, $a, pe ), dt[pe + lt] = !0); } if (pe = null, tt !== void 0 && (gt(tt), pe = "" + tt), Se(k) && (gt(k.key), pe = "" + k.key), "key" in k) { tt = {}; for (var ba in k) ba !== "key" && (tt[ba] = k[ba]); } else tt = k; return pe && J( tt, typeof j == "function" ? j.displayName || j.name || "Unknown" : j ), il( j, pe, tt, Qt(), Ne, Ka ); } function ft(j) { Yt(j) ? j._store && (j._store.validated = 1) : typeof j == "object" && j !== null && j.$$typeof === ol && (j._payload.status === "fulfilled" ? Yt(j._payload.value) && j._payload.value._store && (j._payload.value._store.validated = 1) : j._store && (j._store.validated = 1)); } function Yt(j) { return typeof j == "object" && j !== null && j.$$typeof === Ue; } var Re = yS, Ue = Symbol.for("react.transitional.element"), Bl = Symbol.for("react.portal"), ye = Symbol.for("react.fragment"), ee = Symbol.for("react.strict_mode"), Ja = Symbol.for("react.profiler"), Xe = Symbol.for("react.consumer"), Dl = Symbol.for("react.context"), Sa = Symbol.for("react.forward_ref"), Nl = Symbol.for("react.suspense"), We = Symbol.for("react.suspense_list"), xt = Symbol.for("react.memo"), ol = Symbol.for("react.lazy"), et = Symbol.for("react.activity"), Qe = Symbol.for("react.client.reference"), Ht = Re.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Rt = Object.prototype.hasOwnProperty, xl = Array.isArray, fl = console.createTask ? console.createTask : function() { return null; }; Re = { react_stack_bottom_frame: function(j) { return j(); } }; var O, Q = {}, L = Re.react_stack_bottom_frame.bind( Re, Vt )(), ct = fl(C(Vt)), dt = {}; ip.Fragment = ye, ip.jsx = function(j, k, tt) { var lt = 1e4 > Ht.recentlyCreatedOwnerStacks++; return wa( j, k, tt, !1, lt ? Error("react-stack-top-frame") : L, lt ? fl(C(j)) : ct ); }, ip.jsxs = function(j, k, tt) { var lt = 1e4 > Ht.recentlyCreatedOwnerStacks++; return wa( j, k, tt, !0, lt ? Error("react-stack-top-frame") : L, lt ? fl(C(j)) : ct ); }; })()), ip; } var R2; function gE() { return R2 || (R2 = 1, process.env.NODE_ENV === "production" ? qg.exports = pE() : qg.exports = vE()), qg.exports; } var oa = gE(), xr = /* @__PURE__ */ ((Z) => (Z.SUCCESS = "success", Z.ERROR = "error", Z.INFO = "info", Z.WARNING = "warning", Z))(xr || {}); /** * @license lucide-react v0.544.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const SE = (Z) => Z.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), bE = (Z) => Z.replace( /^([A-Z])|[\s-_]+(\w)/g, (it, gt, C) => C ? C.toUpperCase() : gt.toLowerCase() ), U2 = (Z) => { const it = bE(Z); return it.charAt(0).toUpperCase() + it.slice(1); }, G2 = (...Z) => Z.filter((it, gt, C) => !!it && it.trim() !== "" && C.indexOf(it) === gt).join(" ").trim(), TE = (Z) => { for (const it in Z) if (it.startsWith("aria-") || it === "role" || it === "title") return !0; }; /** * @license lucide-react v0.544.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ var EE = { xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }; /** * @license lucide-react v0.544.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const AE = q2( ({ color: Z = "currentColor", size: it = 24, strokeWidth: gt = 2, absoluteStrokeWidth: C, className: Qt = "", children: Vt, iconNode: Se, ...J }, be) => mS( "svg", { ref: be, ...EE, width: it, height: it, stroke: Z, strokeWidth: C ? Number(gt) * 24 / Number(it) : gt, className: G2("lucide", Qt), ...!Vt && !TE(J) && { "aria-hidden": "true" }, ...J }, [ ...Se.map(([il, wa]) => mS(il, wa)), ...Array.isArray(Vt) ? Vt : [Vt] ] ) ); /** * @license lucide-react v0.544.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const sp = (Z, it) => { const gt = q2( ({ className: C, ...Qt }, Vt) => mS(AE, { ref: Vt, iconNode: it, className: G2( `lucide-${SE(U2(Z))}`, `lucide-${Z}`, C ), ...Qt }) ); return gt.displayName = U2(Z), gt; }; /** * @license lucide-react v0.544.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const zE = [ ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }], ["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }], ["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }] ], DE = sp("circle-alert", zE); /** * @license lucide-react v0.544.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const OE = [ ["path", { d: "M21.801 10A10 10 0 1 1 17 3.335", key: "yps3ct" }], ["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }] ], ME = sp("circle-check-big", OE); /** * @license lucide-react v0.544.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const RE = [ ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }], ["path", { d: "M12 16v-4", key: "1dtifu" }], ["path", { d: "M12 8h.01", key: "e9boi3" }] ], UE = sp("info", RE); /** * @license lucide-react v0.544.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const CE = [ [ "path", { d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3", key: "wmoenq" } ], ["path", { d: "M12 9v4", key: "juzpu7" }], ["path", { d: "M12 17h.01", key: "p32p05" }] ], _E = sp("triangle-alert", CE); /** * @license lucide-react v0.544.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const HE = [ ["path", { d: "M18 6 6 18", key: "1bl5f8" }], ["path", { d: "m6 6 12 12", key: "d8bk6v" }] ], BE = sp("x", HE); function NE({ show: Z, message: it, type: gt, clearAlert: C }) { return /* @__PURE__ */ oa.jsx("div", { className: `alert-container ${Z ? "show" : "hide"}`, children: /* @__PURE__ */ oa.jsxs("div", { className: `alert alert-${gt}`, children: [ /* @__PURE__ */ oa.jsxs("span", { className: "alert-icon", children: [ gt === xr.SUCCESS ? /* @__PURE__ */ oa.jsx(ME, { className: "size-[22px]" }) : null, gt === xr.ERROR ? /* @__PURE__ */ oa.jsx(_E, { className: "size-[22px]" }) : null, gt === xr.INFO ? /* @__PURE__ */ oa.jsx(UE, { className: "size-[22px]" }) : null, gt === xr.WARNING ? /* @__PURE__ */ oa.jsx(DE, { className: "size-[22px]" }) : null ] }), /* @__PURE__ */ oa.jsx("span", { className: "alert-message", children: it }), /* @__PURE__ */ oa.jsx("div", { className: "ml-2", onClick: C, children: /* @__PURE__ */ oa.jsx(BE, { className: "size-[16px] cursor-pointer" }) }) ] }) }); } function X2() { const { show: Z, message: it, type: gt, clearAlert: C } = yE(); return /* @__PURE__ */ oa.jsx( NE, { show: Z, message: it, type: gt, clearAlert: C } ); } const Q2 = ({ children: Z }) => { const it = hE(null), [gt, C] = mE(null), Qt = () => { it.current && (clearTimeout(it.current), it.current = null), C((Se) => Se ? { ...Se, show: !1 } : null), setTimeout(() => { C(null); }, 300); }, Vt = ({ message: Se, type: J = xr.INFO }) => { it.current && (clearTimeout(it.current), it.current = null), C({ show: !0, message: Se, type: J, clearAlert: Qt }), it.current = setTimeout(() => { C((be) => be ? { ...be, show: !1 } : null), it.current = setTimeout(() => { C(null), it.current = null; }, 300); }, 3e3); }; return /* @__PURE__ */ oa.jsxs( j2.Provider, { value: { show: gt?.show ?? !1, message: gt?.message ?? "", type: gt?.type ?? xr.INFO, showAlert: Vt, clearAlert: Qt }, children: [ Z, /* @__PURE__ */ oa.jsx(X2, {}) ] } ); }, ZE = (Z) => () => /* @__PURE__ */ oa.jsx(Q2, { children: /* @__PURE__ */ oa.jsx(Z, {}) }); var Yg = { exports: {} }, op = {}, jg = { exports: {} }, dS = {}; /** * @license React * scheduler.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var C2; function xE() { return C2 || (C2 = 1, (function(Z) { function it(O, Q) { var L = O.length; O.push(Q); t: for (; 0 < L; ) { var ct = L - 1 >>> 1, dt = O[ct]; if (0 < Qt(dt, Q)) O[ct] = Q, O[L] = dt, L = ct; else break t; } } function gt(O) { return O.length === 0 ? null : O[0]; } function C(O) { if (O.length === 0) return null; var Q = O[0], L = O.pop(); if (L !== Q) { O[0] = L; t: for (var ct = 0, dt = O.length, j = dt >>> 1; ct < j; ) { var k = 2 * (ct + 1) - 1, tt = O[k], lt = k + 1, Ne = O[lt]; if (0 > Qt(tt, L)) lt < dt && 0 > Qt(Ne, tt) ? (O[ct] = Ne, O[lt] = L, ct = lt) : (O[ct] = tt, O[k] = L, ct = k); else if (lt < dt && 0 > Qt(Ne, L)) O[ct] = Ne, O[lt] = L, ct = lt; else break t; } } return Q; } function Qt(O, Q) { var L = O.sortIndex - Q.sortIndex; return L !== 0 ? L : O.id - Q.id; } if (Z.unstable_now = void 0, typeof performance == "object" && typeof performance.now == "function") { var Vt = performance; Z.unstable_now = function() { return Vt.now(); }; } else { var Se = Date, J = Se.now(); Z.unstable_now = function() { return Se.now() - J; }; } var be = [], il = [], wa = 1, ft = null, Yt = 3, Re = !1, Ue = !1, Bl = !1, ye = !1, ee = typeof setTimeout == "function" ? setTimeout : null, Ja = typeof clearTimeout == "function" ? clearTimeout : null, Xe = typeof setImmediate < "u" ? setImmediate : null; function Dl(O) { for (var Q = gt(il); Q !== null; ) { if (Q.callback === null) C(il); else if (Q.startTime <= O) C(il), Q.sortIndex = Q.expirationTime, it(be, Q); else break; Q = gt(il); } } function Sa(O) { if (Bl = !1, Dl(O), !Ue) if (gt(be) !== null) Ue = !0, Nl || (Nl = !0, Ht()); else { var Q = gt(il); Q !== null && fl(Sa, Q.startTime - O); } } var Nl = !1, We = -1, xt = 5, ol = -1; function et() { return ye ? !0 : !(Z.unstable_now() - ol < xt); } function Qe() { if (ye = !1, Nl) { var O = Z.unstable_now(); ol = O; var Q = !0; try { t: { Ue = !1, Bl && (Bl = !1, Ja(We), We = -1), Re = !0; var L = Yt; try { e: { for (Dl(O), ft = gt(be); ft !== null && !(ft.expirationTime > O && et()); ) { var ct = ft.callback; if (typeof ct == "function") { ft.callback = null, Yt = ft.priorityLevel; var dt = ct( ft.expirationTime <= O ); if (O = Z.unstable_now(), typeof dt == "function") { ft.callback = dt, Dl(O), Q = !0; break e; } ft === gt(be) && C(be), Dl(O); } else C(be); ft = gt(be); } if (ft !== null) Q = !0; else { var j = gt(il); j !== null && fl( Sa, j.startTime - O ), Q = !1; } } break t; } finally { ft = null, Yt = L, Re = !1; } Q = void 0; } } finally { Q ? Ht() : Nl = !1; } } } var Ht; if (typeof Xe == "function") Ht = function() { Xe(Qe); }; else if (typeof MessageChannel < "u") { var Rt = new MessageChannel(), xl = Rt.port2; Rt.port1.onmessage = Qe, Ht = function() { xl.postMessage(null); }; } else Ht = function() { ee(Qe, 0); }; function fl(O, Q) { We = ee(function() { O(Z.unstable_now()); }, Q); } Z.unstable_IdlePriority = 5, Z.unstable_ImmediatePriority = 1, Z.unstable_LowPriority = 4, Z.unstable_NormalPriority = 3, Z.unstable_Profiling = null, Z.unstable_UserBlockingPriority = 2, Z.unstable_cancelCallback = function(O) { O.callback = null; }, Z.unstable_forceFrameRate = function(O) { 0 > O || 125 < O ? console.error( "forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported" ) : xt = 0 < O ? Math.floor(1e3 / O) : 5; }, Z.unstable_getCurrentPriorityLevel = function() { return Yt; }, Z.unstable_next = function(O) { switch (Yt) { case 1: case 2: case 3: var Q = 3; break; default: Q = Yt; } var L = Yt; Yt = Q; try { return O(); } finally { Yt = L; } }, Z.unstable_requestPaint = function() { ye = !0; }, Z.unstable_runWithPriority = function(O, Q) { switch (O) { case 1: case 2: case 3: case 4: case 5: break; default: O = 3; } var L = Yt; Yt = O; try { return Q(); } finally { Yt = L; } }, Z.unstable_scheduleCallback = function(O, Q, L) { var ct = Z.unstable_now(); switch (typeof L == "object" && L !== null ? (L = L.delay, L = typeof L == "number" && 0 < L ? ct + L : ct) : L = ct, O) { case 1: var dt = -1; break; case 2: dt = 250; break; case 5: dt = 1073741823; break; case 4: dt = 1e4; break; default: dt = 5e3; } return dt = L + dt, O = { id: wa++, callback: Q, priorityLevel: O, startTime: L, expirationTime: dt, sortIndex: -1 }, L > ct ? (O.sortIndex = L, it(il, O), gt(be) === null && O === gt(il) && (Bl ? (Ja(We), We = -1) : Bl = !0, fl(Sa, L - ct))) : (O.sortIndex = dt, it(be, O), Ue || Re || (Ue = !0, Nl || (Nl = !0, Ht()))), O; }, Z.unstable_shouldYield = et, Z.unstable_wrapCallback = function(O) { var Q = Yt; return function() { var L = Yt; Yt = Q; try { return O.apply(this, arguments); } finally { Yt = L; } }; }; })(dS)), dS; } var hS = {}; /** * @license React * scheduler.development.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var _2; function qE() { return _2 || (_2 = 1, (function(Z) { process.env.NODE_ENV !== "production" && (function() { function it() { if (Sa = !1, ol) { var O = Z.unstable_now(); Ht = O; var Q = !0; try { t: { Xe = !1, Dl && (Dl = !1, We(et), et = -1), Ja = !0; var L = ee; try { e: { for (Se(O), ye = C(Re); ye !== null && !(ye.expirationTime > O && be()); ) { var ct = ye.callback; if (typeof ct == "function") { ye.callback = null, ee = ye.priorityLevel; var dt = ct( ye.expirationTime <= O ); if (O = Z.unstable_now(), typeof dt == "function") { ye.callback = dt, Se(O), Q = !0; break e; } ye === C(Re) && Qt(Re), Se(O); } else Qt(Re); ye = C(Re); } if (ye !== null) Q = !0; else { var j = C(Ue); j !== null && il( J, j.startTime - O ), Q = !1; } } break t; } finally { ye = null, ee = L, Ja = !1; } Q = void 0; } } finally { Q ? Rt() : ol = !1; } } } function gt(O, Q) { var L = O.length; O.push(Q); t: for (; 0 < L; ) { var ct = L - 1 >>> 1, dt = O[ct]; if (0 < Vt(dt, Q)) O[ct] = Q, O[L] = dt, L = ct; else break t; } } function C(O) { return O.length === 0 ? null : O[0]; } function Qt(O) { if (O.length === 0) return null; var Q = O[0], L = O.pop(); if (L !== Q) { O[0] = L; t: for (var ct = 0, dt = O.length, j = dt >>> 1; ct < j; ) { var k = 2 * (ct + 1) - 1, tt = O[k], lt = k + 1, Ne = O[lt]; if (0 > Vt(tt, L)) lt < dt && 0 > Vt(Ne, tt) ? (O[ct] = Ne, O[lt] = L, ct = lt) : (O[ct] = tt, O[k] = L, ct = k); else if (lt < dt && 0 > Vt(Ne, L)) O[ct] = Ne, O[lt] = L, ct = lt; else break t; } } return Q; } function Vt(O, Q) { var L = O.sortIndex - Q.sortIndex; return L !== 0 ? L : O.id - Q.id; } function Se(O) { for (var Q = C(Ue); Q !== null; ) { if (Q.callback === null) Qt(Ue); else if (Q.startTime <= O) Qt(Ue), Q.sortIndex = Q.expirationTime, gt(Re, Q); else break; Q = C(Ue); } } function J(O) { if (Dl = !1, Se(O), !Xe) if (C(Re) !== null) Xe = !0, ol || (ol = !0, Rt()); else { var Q = C(Ue); Q !== null && il( J, Q.startTime - O ); } } function be() { return Sa ? !0 : !(Z.unstable_now() - Ht < Qe); } function il(O, Q) { et = Nl(function() { O(Z.unstable_now()); }, Q); } if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()), Z.unstable_now = void 0, typeof performance == "object" && typeof performance.now == "function") { var wa = performance; Z.unstable_now = function() { return wa.now(); }; } else { var ft = Date, Yt = ft.now(); Z.unstable_now = function() { return ft.now() - Yt; }; } var Re = [], Ue = [], Bl = 1, ye = null, ee = 3, Ja = !1, Xe = !1, Dl = !1, Sa = !1, Nl = typeof setTimeout == "function" ? setTimeout : null, We = typeof clearTimeout == "function" ? clearTimeout : null, xt = typeof setImmediate < "u" ? setImmediate : null, ol = !1, et = -1, Qe = 5, Ht = -1; if (typeof xt == "function") var Rt = function() { xt(it); }; else if (typeof MessageChannel < "u") { var xl = new MessageChannel(), fl = xl.port2; xl.port1.onmessage = it, Rt = function() { fl.postMessage(null); }; } else Rt = function() { Nl(it, 0); }; Z.unstable_IdlePriority = 5, Z.unstable_ImmediatePriority = 1, Z.unstable_LowPriority = 4, Z.unstable_NormalPriority = 3, Z.unstable_Profiling = null, Z.unstable_UserBlockingPriority = 2, Z.unstable_cancelCallback = function(O) { O.callback = null; }, Z.unstable_forceFrameRate = function(O) { 0 > O || 125 < O ? console.error( "forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported" ) : Qe = 0 < O ? Math.floor(1e3 / O) : 5; }, Z.unstable_getCurrentPriorityLevel = function() { return ee; }, Z.unstable_next = function(O) { switch (ee) { case 1: case 2: case 3: var Q = 3; break; default: Q = ee; } var L = ee; ee = Q; try { return O(); } finally { ee = L; } }, Z.unstable_requestPaint = function() { Sa = !0; }, Z.unstable_runWithPriority = function(O, Q) { switch (O) { case 1: case 2: case 3: case 4: case 5: break; default: O = 3; } var L = ee; ee = O; try { return Q(); } finally { ee = L; } }, Z.unstable_scheduleCallback = function(O, Q, L) { var ct = Z.unstable_now(); switch (typeof L == "object" && L !== null ? (L = L.delay, L = typeof L == "number" && 0 < L ? ct + L : ct) : L = ct, O) { case 1: var dt = -1; break; case 2: dt = 250; break; case 5: dt = 1073741823; break; case 4: dt = 1e4; break; default: dt = 5e3; } return dt = L + dt, O = { id: Bl++, callback: Q, priorityLevel: O, startTime: L, expirationTime: dt, sortIndex: -1 }, L > ct ? (O.sortIndex = L, gt(Ue, O), C(Re) === null && O === C(Ue) && (Dl ? (We(et), et = -1) : Dl = !0, il(J, L - ct))) : (O.sortIndex = dt, gt(Re, O), Xe || Ja || (Xe = !0, ol || (ol = !0, Rt()))), O; }, Z.unstable_shouldYield = be, Z.unstable_wrapCallback = function(O) { var Q = ee; return function() { var L = ee; ee = Q; try { return O.apply(this, arguments); } finally { ee = L; } }; }, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error()); })(); })(hS)), hS; } var H2; function V2() { return H2 || (H2 = 1, process.env.NODE_ENV === "production" ? jg.exports = xE() : jg.exports = qE()), jg.exports; } /** * @license React * react-dom-client.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var B2; function YE() { if (B2) return op; B2 = 1; var Z = V2(), it = yS, gt = Y2; function C(l) { var n = "https://react.dev/errors/" + l; if (1 < arguments.length) { n += "?args[]=" + encodeURIComponent(arguments[1]); for (var u = 2; u < arguments.length; u++) n += "&args[]=" + encodeURIComponent(arguments[u]); } return "Minified React error #" + l + "; visit " + n + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings."; } function Qt(l) { return !(!l || l.nodeType !== 1 && l.nodeType !== 9 && l.nodeType !== 11); } function Vt(l) { var n = l, u = l; if (l.alternate) for (; n.return; ) n = n.return; else { l = n; do n = l, (n.flags & 4098) !== 0 && (u = n.return), l = n.return; while (l); } return n.tag === 3 ? u : null; } function Se(l) { if (l.tag === 13) { var n = l.memoizedState; if (n === null && (l = l.alternate, l !== null && (n = l.memoizedState)), n !== null) return n.dehydrated; } return null; } function J(l) { if (l.tag === 31) { var n = l.memoizedState; if (n === null && (l = l.alternate, l !== null && (n = l.memoizedState)), n !== null) return n.dehydrated; } return null; } function be(l) { if (Vt(l) !== l) throw Error(C(188)); } function il(l) { var n = l.alternate; if (!n) { if (n = Vt(l), n === null) throw Error(C(188)); return n !== l ? null : l; } for (var u = l, i = n; ; ) { var s = u.return; if (s === null) break; var r = s.alternate; if (r === null) { if (i = s.return, i !== null) { u = i; continue; } break; } if (s.child === r.child) { for (r = s.child; r; ) { if (r === u) return be(s), l; if (r === i) return be(s), n; r = r.sibling; } throw Error(C(188)); } if (u.return !== i.return) u = s, i = r; else { for (var m = !1, v = s.child; v; ) { if (v === u) { m = !0, u = s, i = r; break; } if (v === i) { m = !0, i = s, u = r; break; } v = v.sibling; } if (!m) { for (v = r.child; v; ) { if (v === u) { m = !0, u = r, i = s; break; } if (v === i) { m = !0, i = r, u = s; break; } v = v.sibling; } if (!m) throw Error(C(189)); } } if (u.alternate !== i) throw Error(C(190)); } if (u.tag !== 3) throw Error(C(188)); return u.stateNode.current === u ? l : n; } function wa(l) { var n = l.tag; if (n === 5 || n === 26 || n === 27 || n === 6) return l; for (l = l.child; l !== null; ) { if (n = wa(l), n !== null) return n; l = l.sibling; } return null; } var ft = Object.assign, Yt = Symbol.for("react.element"), Re = Symbol.for("react.transitional.element"), Ue = Symbol.for("react.portal"), Bl = Symbol.for("react.fragment"), ye = Symbol.for("react.strict_mode"), ee = Symbol.for("react.profiler"), Ja = Symbol.for("react.consumer"), Xe = Symbol.for("react.context"), Dl = Symbol.for("react.forward_ref"), Sa = Symbol.for("react.suspense"), Nl = Symbol.for("react.suspense_list"), We = Symbol.for("react.memo"), xt = Symbol.for("react.lazy"), ol = Symbol.for("react.activity"), et = Symbol.for("react.memo_cache_sentinel"), Qe = Symbol.iterator; function Ht(l) { return l === null || typeof l != "object" ? null : (l = Qe && l[Qe] || l["@@iterator"], typeof l == "function" ? l : null); } var Rt = Symbol.for("react.client.reference"); function xl(l) { if (l == null) return null; if (typeof l == "function") return l.$$typeof === Rt ? null : l.displayName || l.name || null; if (typeof l == "string") return l; switch (l) { case Bl: return "Fragment"; case ee: return "Profiler"; case ye: return "StrictMode"; case Sa: return "Suspense"; case Nl: return "SuspenseList"; case ol: return "Activity"; } if (typeof l == "object") switch (l.$$typeof) { case Ue: return "Portal"; case Xe: return l.displayName || "Context"; case Ja: return (l._context.displayName || "Context") + ".Consumer"; case Dl: var n = l.render; return l = l.displayName, l || (l = n.displayName || n.name || "", l = l !== "" ? "ForwardRef(" + l + ")" : "ForwardRef"), l; case We: return n = l.displayName || null, n !== null ? n : xl(l.type) || "Memo"; case xt: n = l._payload, l = l._init; try { return xl(l(n)); } catch { } } return null; } var fl = Array.isArray, O = it.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Q = gt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, L = { pending: !1, data: null, method: null, action: null }, ct = [], dt = -1; function j(l) { return { current: l }; } function k(l) { 0 > dt || (l.current = ct[dt], ct[dt] = null, dt--); } function tt(l, n) { dt++, ct[dt] = l.current, l.current = n; } var lt = j(null), Ne = j(null), Ka = j(null), pe = j(null); function $a(l, n) { switch (tt(Ka, n), tt(Ne, l), tt(lt, null), n.nodeType) { case 9: case 11: l = (l = n.documentElement) && (l = l.namespaceURI) ? Mv(l) : 0; break; default: if (l = n.tagName, n = n.namespaceURI) n = Mv(n), l = e0(n, l); else switch (l) { case "svg": l = 1; break; case "math": l = 2; break; default: l = 0; } } k(lt), tt(lt, l); } function ba() { k(lt), k(Ne), k(Ka); } function Jf(l) { l.memoizedState !== null && tt(pe, l); var n = lt.current, u = e0(n, l.type); n !== u && (tt(Ne, l), tt(lt, u)); } function W(l) { Ne.current === l && (k(lt), k(Ne)), pe.current === l && (k(pe), or._currentValue = L); } var Kf, $f; function Ln(l) { if (Kf === void 0) try { throw Error(); } catch (u) { var n = u.stack.trim().match(/\n( *(at )?)/); Kf = n && n[1] || "", $f = -1 < u.stack.indexOf(` at`) ? " (<anonymous>)" : -1 < u.stack.indexOf("@") ? "@unknown:0:0" : ""; } return ` ` + Kf + l + $f; } var ti = !1; function le(l, n) { if (!l || ti) return ""; ti = !0; var u = Error.prepareStackTrace; Error.prepareStackTrace = void 0; try { var i = { DetermineComponentFrameRoot: function() { try { if (n) { var X = function() { throw Error(); }; if (Object.defineProperty(X.prototype, "props", { set: function() { throw Error(); } }), typeof Reflect == "object" && Reflect.construct) { try { Reflect.construct(X, []); } catch (x) { var _ = x; } Reflect.construct(l, [], X); } else { try { X.call(); } catch (x) { _ = x; } l.call(X.prototype); } } else { try { throw Error(); } catch (x) { _ = x; } (X = l()) && typeof X.catch == "function" && X.catch(function() { }); } } catch (x) { if (x && _ && typeof x.stack == "string") return [x.stack, _.stack]; } return [null, null]; } }; i.DetermineComponentFrameRoot.displayName = "DetermineComponentFrameRoot"; var s = Object.getOwnPropertyDescriptor( i.DetermineComponentFrameRoot, "name" ); s && s.configurable && Object.defineProperty( i.DetermineComponentFrameRoot, "name", { value: "DetermineComponentFrameRoot" } ); var r = i.DetermineComponentFrameRoot(), m = r[0], v = r[1]; if (m && v) { var T = m.split(` `), U = v.split(` `); for (s = i = 0; i < T.length && !T[i].includes("DetermineComponentFrameRoot"); ) i++; for (; s < U.length && !U[s].includes( "DetermineComponentFrameRoot" ); ) s++; if (i === T.length || s === U.length) for (i = T.length - 1, s = U.length - 1; 1 <= i && 0 <= s && T[i] !== U[s]; ) s--; for (; 1 <= i && 0 <= s; i--, s--) if (T[i] !== U[s]) { if (i !== 1 || s !== 1) do if (i--, s--, 0 > s || T[i] !== U[s]) { var q = ` ` + T[i].replace(" at new ", " at "); return l.displayName && q.includes("<anonymous>") && (q = q.replace("<anonymous>", l.displayName)), q; } while (1 <= i && 0 <= s); break; } } } finally { ti = !1, Error.prepareStackTrace = u; } return (u = l ? l.displayName || l.name : "") ? Ln(u) : ""; } function cm(l, n) { switch (l.tag) { case 26: case 27: case 5: return Ln(l.type); case 16: return Ln("Lazy"); case 13: return l.child !== n && n !== null ? Ln("Suspense Fallback") : Ln("Suspense"); case 19: return Ln("SuspenseList"); case 0: case 15: return le(l.type, !1); case 11: return le(l.type.render, !1); case 1: return le(l.type, !0); case 31: return Ln("Activity"); default: return ""; } } function qr(l) { try { var n = "", u = null; do n += cm(l, u), u = l, l = l.return; while (l); return n; } catch (i) { return ` Error generating stack: ` + i.message + ` ` + i.stack; } } var im = Object.prototype.hasOwnProperty, fe = Z.unstable_scheduleCallback, om = Z.unstable_cancelCallback, ei = Z.unstable_shouldYield, Yr = Z.unstable_requestPaint, Ol = Z.unstable_now, Gg = Z.unstable_getCurrentPriorityLevel, jr = Z.unstable_ImmediatePriority, Gr = Z.unstable_UserBlockingPriority, dc = Z.unstable_NormalPriority, Xg = Z.unstable_LowPriority, fm = Z.unstable_IdlePriority, rp = Z.log, dp = Z.unstable_setDisableYieldValue, li = null, fa = null; function xu(l) { if (typeof rp == "function" && dp(l), fa && typeof fa.setStrictMode == "function") try { fa.setStrictMode(li, l); } catch { } } var Ll = Math.clz32 ? Math.clz32 : sm, hp = Math.log, mp = Math.LN2; function sm(l) { return l >>>= 0, l === 0 ? 32 : 31 - (hp(l) / mp | 0) | 0; } var qu = 256, hn = 262144, hc = 4194304; function Wa(l) { var n = l & 42; if (n !== 0) return n; switch (l & -l) { case 1: return 1; case 2: return 2; case 4: return 4; case 8: return 8; case 16: return 16; case 32: return 32; case 64: return 64; case 128: return 128; case 256: case 512: case 1024: case 2048: case 4096: case 8192: case 16384: case 32768: case 65536: case 131072: return l & 261888; case 262144: case 524288: case 1048576: case 2097152: return l & 3932160; case 4194304: case 8388608: case 16777216: case 33554432: return l & 62914560; case 67108864: return 67108864; case 134217728: return 134217728; case 268435456: return 268435456; case 536870912: return 536870912; case 1073741824: return 0; default: return l; } } function Ve(l, n, u) { var i = l.pendingLanes; if (i === 0) return 0; var s = 0, r = l.suspendedLanes, m = l.pingedLanes; l = l.warmLanes; var v = i & 134217727; return v !== 0 ? (i = v & ~r, i !== 0 ? s = Wa(i) : (m &= v, m !== 0 ? s = Wa(m) : u || (u = v & ~l, u !== 0 && (s = Wa(u))))) : (v = i & ~r, v !== 0 ? s = Wa(v) : m !== 0 ? s = Wa(m) : u || (u = i & ~l, u !== 0 && (s = Wa(u)))), s === 0 ? 0 : n !== 0 && n !== s && (n & r) === 0 && (r = s & -s, u = n & -n, r >= u || r === 32 && (u & 4194048) !== 0) ? n : s; } function mn(l, n) { return (l.pendingLanes & ~(l.suspendedLanes & ~l.pingedLanes) & n) === 0; } function ho(l, n) { switch (l) { case 1: case 2: case 4: case 8: case 64: return n + 250; case 16: case 32: case 128: case 256: case 512: case 1024: case 2048: case 4096: case 8192: case 16384: case 32768: case 65536: case 131072: case 262144: case 524288: case 1048576: case 2097152: return n + 5e3; case 4194304: case 8388608: case 16777216: case 33554432: return -1; case 67108864: case 134217728: case 268435456: case 536870912: case 1073741824: return -1; default: return -1; } } function ai() { var l = hc; return hc <<= 1, (hc & 62914560) === 0 && (hc = 4194304), l; } function Wf(l) { for (var n = [], u = 0; 31 > u; u++) n.push(l); return n; } function mo(l, n) { l.pendingLanes |= n, n !== 268435456 && (l.suspendedLanes = 0, l.pingedLanes = 0, l.warmLanes = 0); } function Xr(l, n, u, i, s, r) { var m = l.pendingLanes; l.pendingLanes = u, l.suspendedLanes = 0, l.pingedLanes = 0, l.warmLanes = 0, l.expiredLanes &= u, l.entangledLanes &= u, l.errorRecoveryDisabledLanes &= u, l.shellSuspendCounter = 0; var v = l.entanglements, T = l.expirationTimes, U = l.hiddenUpdates; for (u = m & ~u; 0 < u; ) { var q = 31 - Ll(u), X = 1 << q; v[q] = 0, T[q] = -1; var _ = U[q]; if (_ !== null) for (U[q] = null, q = 0; q < _.length; q++) { var x = _[q]; x !== null && (x.lane &= -536870913); } u &= ~X; } i !== 0 && kf(l, i, 0), r !== 0 && s === 0 && l.tag !== 0 && (l.suspendedLanes |= r & ~(m & ~n)); } function kf(l, n, u) { l.pendingLanes |= n, l.suspendedLanes &= ~n; var i = 31 - Ll(n); l.entangledLanes |= n, l.entanglements[i] = l.entanglements[i] | 1073741824 | u & 261930; } function wn(l, n) { var u = l.entangledLanes |= n; for (l = l.entanglements; u; ) { var i = 31 - Ll(u), s = 1 << i; s & n | l[i] & n && (l[i] |= n), u &= ~s; } } function Ta(l, n) { var u = n & -n; return u = (u & 42) !== 0 ? 1 : Qr(u), (u & (l.suspendedLanes | n)) !== 0 ? 0 : u; } function Qr(l) { switch (l) { case 2: l = 1; break; case 8: l = 4; break; case 32: l = 16; break; case 256: case 512: case 1024: case 2048: case 4096: case 8192: case 16384: case 32768: case 65536: case 131072: case 262144: case 524288: case 1048576: case 2097152: case 4194304: case 8388608: case 16777216: case 33554432: l = 128; break; case 268435456: l = 134217728; break; default: l = 0; } return l; } function rm(l) { return l &= -l, 2 < l ? 8 < l ? (l & 134217727) !== 0 ? 32 : 268435456 : 8 : 2; } function Vr() { var l = Q.p; return l !== 0 ? l : (l = window.event, l === void 0 ? 32 : fr(l.type)); } function dm(l, n) { var u = Q.p; try { return Q.p = l, n(); } finally { Q.p = u; } } var yn = Math.random().toString(36).slice(2), ae = "__reactFiber$" + yn, wl = "__reactProps$" + yn, mc = "__reactContainer$" + yn, Zr = "__reactEvents$" + yn, hm = "__reactListeners$" + yn, yp = "__reactHandles$" + yn, mm = "__reactResources$" + yn, Jn = "__reactMarker$" + yn; function Lr(l) { delete l[ae], delete l[wl], delete l[Zr], delete l[hm], delete l[yp]; } function ni(l) { var n = l[ae]; if (n) return n; for (var u = l.parentNode; u; ) { if (n = u[mc] || u[ae]) { if (u = n.alternate, n.child !== null || u !== null && u.child !== null) for (l = qn(l); l !== null; ) { if (u = l[ae]) return u; l = qn(l); } return n; } l = u, u = l.parentNode; } return null; } function ui(l) { if (l = l[ae] || l[mc]) { var n = l.tag; if (n === 5 || n === 6 || n === 13 || n === 31 || n === 26 || n === 27 || n === 3) return l; } return null; } function yo(l) { var n = l.tag; if (n === 5 || n === 26 || n === 27 || n === 6) return l.stateNode; throw Error(C(33)); } function ci(l) { var n = l[mm]; return n || (n = l[mm] = { hoistableStyles: /* @__PURE__ */ new Map(), hoistableScripts: /* @__PURE__ */ new Map() }), n; } function kt(l) { l[Jn] = !0; } var ii = /* @__PURE__ */ new Set(), yc = {}; function pc(l, n) { Kn(l, n), Kn(l + "Capture", n); } function Kn(l, n) { for (yc[l] = n, l = 0; l < n.length; l++) ii.add(n[l]); } var wr = RegExp( "^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$" ), Jr = {}, po = {}; function vo(l) { return im.call(po, l) ? !0 : im.call(Jr, l) ? !1 : wr.test(l) ? po[l] = !0 : (Jr[l] = !0, !1); } function go(l, n, u) { if (vo(n)) if (u === null) l.removeAttribute(n); else { switch (typeof u) { case "undefined": case "function": case "symbol": l.removeAttribute(n); return; case "boolean": var i = n.toLowerCase().slice(0, 5); if (i !== "data-" && i !== "aria-") { l.removeAttribute(n); return; } } l.setAttribute(n, "" + u); } } function Kr(l, n, u) { if (u === null) l.removeAttribute(n); else { switch (typeof u) { case "undefined": case "function": case "symbol": case "boolean": l.removeAttribut