diff --git a/react/dist/inertiaui-modal.js b/react/dist/inertiaui-modal.js index a7354ef..436b35e 100644 --- a/react/dist/inertiaui-modal.js +++ b/react/dist/inertiaui-modal.js @@ -1,11 +1,11 @@ var Fo = Object.defineProperty; var Co = (t, e, r) => e in t ? Fo(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r; -var ye = (t, e, r) => Co(t, typeof e != "symbol" ? e + "" : e, r); +var ce = (t, e, r) => Co(t, typeof e != "symbol" ? e + "" : e, r); import * as ht from "react"; -import A, { createContext as ce, useState as Q, useEffect as K, useContext as ie, createElement as Pr, useMemo as J, forwardRef as Hr, useImperativeHandle as na, useLayoutEffect as Io, useRef as j, useCallback as ve, Fragment as he, isValidElement as Mo, cloneElement as _o, useId as Ot, useSyncExternalStore as Do, useReducer as No, createRef as ko } from "react"; +import A, { createContext as fe, useState as Q, useEffect as Y, useContext as ie, useRef as k, createElement as Pr, useMemo as J, forwardRef as Hr, useImperativeHandle as na, useLayoutEffect as Io, useCallback as ve, Fragment as he, isValidElement as Mo, cloneElement as _o, useId as Ot, useSyncExternalStore as Do, useReducer as No, createRef as ko } from "react"; import jt from "axios"; -import { router as vt } from "@inertiajs/react"; -import { createPortal as jo } from "react-dom"; +import { router as vt, usePage as jo } from "@inertiajs/react"; +import { createPortal as Lo } from "react-dom"; const ct = { type: "modal", navigate: !1, @@ -26,7 +26,7 @@ const ct = { position: "right" } }; -class Lo { +class Wo { constructor() { this.config = {}, this.reset(); } @@ -62,12 +62,12 @@ class Lo { return n; } } -const Yt = new Lo(), xc = () => Yt.reset(), Oc = (t, e) => Yt.put(t, e), Vr = (t) => Yt.get(t), ze = (t, e) => Yt.get(t ? `slideover.${e}` : `modal.${e}`); +const Yt = new Wo(), Oc = () => Yt.reset(), Pc = (t, e) => Yt.put(t, e), Vr = (t) => Yt.get(t), ze = (t, e) => Yt.get(t ? `slideover.${e}` : `modal.${e}`); var Ar = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; -function Wo(t) { +function Uo(t) { return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t; } -function Uo(t) { +function Bo(t) { if (t.__esModule) return t; var e = t.default; if (typeof e == "function") { @@ -97,16 +97,16 @@ var Tr = { exports: {} }, ft = {}; * LICENSE file in the root directory of this source tree. */ var wn; -function Bo() { +function Ho() { if (wn) return ft; wn = 1; var t = A, e = Symbol.for("react.element"), r = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, a = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = { key: !0, ref: !0, __self: !0, __source: !0 }; - function l(u, i, d) { - var s, g = {}, v = null, w = null; - d !== void 0 && (v = "" + d), i.key !== void 0 && (v = "" + i.key), i.ref !== void 0 && (w = i.ref); - for (s in i) n.call(i, s) && !o.hasOwnProperty(s) && (g[s] = i[s]); - if (u && u.defaultProps) for (s in i = u.defaultProps, i) g[s] === void 0 && (g[s] = i[s]); - return { $$typeof: e, type: u, key: v, ref: w, props: g, _owner: a.current }; + function l(u, i, f) { + var s, h = {}, v = null, w = null; + f !== void 0 && (v = "" + f), i.key !== void 0 && (v = "" + i.key), i.ref !== void 0 && (w = i.ref); + for (s in i) n.call(i, s) && !o.hasOwnProperty(s) && (h[s] = i[s]); + if (u && u.defaultProps) for (s in i = u.defaultProps, i) h[s] === void 0 && (h[s] = i[s]); + return { $$typeof: e, type: u, key: v, ref: w, props: h, _owner: a.current }; } return ft.Fragment = r, ft.jsx = l, ft.jsxs = l, ft; } @@ -121,17 +121,17 @@ var dt = {}; * LICENSE file in the root directory of this source tree. */ var En; -function Ho() { +function Vo() { return En || (En = 1, process.env.NODE_ENV !== "production" && function() { - var t = A, e = Symbol.for("react.element"), r = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"), l = Symbol.for("react.provider"), u = Symbol.for("react.context"), i = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), s = Symbol.for("react.suspense_list"), g = Symbol.for("react.memo"), v = Symbol.for("react.lazy"), w = Symbol.for("react.offscreen"), f = Symbol.iterator, y = "@@iterator"; + var t = A, e = Symbol.for("react.element"), r = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"), l = Symbol.for("react.provider"), u = Symbol.for("react.context"), i = Symbol.for("react.forward_ref"), f = Symbol.for("react.suspense"), s = Symbol.for("react.suspense_list"), h = Symbol.for("react.memo"), v = Symbol.for("react.lazy"), w = Symbol.for("react.offscreen"), d = Symbol.iterator, y = "@@iterator"; function p(c) { if (c === null || typeof c != "object") return null; - var E = f && c[f] || c[y]; + var E = d && c[d] || c[y]; return typeof E == "function" ? E : null; } var m = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; - function h(c) { + function g(c) { { for (var E = arguments.length, x = new Array(E > 1 ? E - 1 : 0), P = 1; P < E; P++) x[P - 1] = arguments[P]; @@ -150,14 +150,14 @@ function Ho() { } var S = !1, O = !1, _ = !1, M = !1, W = !1, H; H = Symbol.for("react.module.reference"); - function k(c) { - return !!(typeof c == "string" || typeof c == "function" || c === n || c === o || W || c === a || c === d || c === s || M || c === w || S || O || _ || typeof c == "object" && c !== null && (c.$$typeof === v || c.$$typeof === g || c.$$typeof === l || c.$$typeof === u || c.$$typeof === i || // This needs to include all possible module reference object + function j(c) { + return !!(typeof c == "string" || typeof c == "function" || c === n || c === o || W || c === a || c === f || c === s || M || c === w || S || O || _ || typeof c == "object" && c !== null && (c.$$typeof === v || c.$$typeof === h || c.$$typeof === l || c.$$typeof === u || c.$$typeof === i || // This needs to include all possible module reference object // types supported by any Flight configuration anywhere since // we don't know which Flight build this will end up being used // with. c.$$typeof === H || c.getModuleId !== void 0)); } - function Y(c, E, x) { + function z(c, E, x) { var P = c.displayName; if (P) return P; @@ -170,7 +170,7 @@ function Ho() { function $(c) { if (c == null) return null; - if (typeof c.tag == "number" && h("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof c == "function") + if (typeof c.tag == "number" && g("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof c == "function") return c.displayName || c.name || null; if (typeof c == "string") return c; @@ -183,7 +183,7 @@ function Ho() { return "Profiler"; case a: return "StrictMode"; - case d: + case f: return "Suspense"; case s: return "SuspenseList"; @@ -197,8 +197,8 @@ function Ho() { var x = c; return V(x._context) + ".Provider"; case i: - return Y(c, c.render, "ForwardRef"); - case g: + return z(c, c.render, "ForwardRef"); + case h: var P = c.displayName || null; return P !== null ? P : $(c.type) || "Memo"; case v: { @@ -212,14 +212,14 @@ function Ho() { } return null; } - var T = Object.assign, D = 0, ue, de, ge, te, pe, q, _e; + var T = Object.assign, D = 0, ue, pe, ge, te, ye, q, _e; function ee() { } ee.__reactDisabledLog = !0; function ar() { { if (D === 0) { - ue = console.log, de = console.info, ge = console.warn, te = console.error, pe = console.group, q = console.groupCollapsed, _e = console.groupEnd; + ue = console.log, pe = console.info, ge = console.warn, te = console.error, ye = console.group, q = console.groupCollapsed, _e = console.groupEnd; var c = { configurable: !0, enumerable: !0, @@ -252,7 +252,7 @@ function Ho() { value: ue }), info: T({}, c, { - value: de + value: pe }), warn: T({}, c, { value: ge @@ -261,7 +261,7 @@ function Ho() { value: te }), group: T({}, c, { - value: pe + value: ye }), groupCollapsed: T({}, c, { value: q @@ -271,7 +271,7 @@ function Ho() { }) }); } - D < 0 && h("disabledDepth fell below zero. This is a bug in React. Please file an issue."); + D < 0 && g("disabledDepth fell below zero. This is a bug in React. Please file an issue."); } } var lt = m.ReactCurrentDispatcher, Ne; @@ -343,18 +343,18 @@ function Ho() { if (oe && P && typeof oe.stack == "string") { for (var F = oe.stack.split(` `), ne = P.stack.split(` -`), G = F.length - 1, z = ne.length - 1; G >= 1 && z >= 0 && F[G] !== ne[z]; ) - z--; - for (; G >= 1 && z >= 0; G--, z--) - if (F[G] !== ne[z]) { - if (G !== 1 || z !== 1) +`), G = F.length - 1, K = ne.length - 1; G >= 1 && K >= 0 && F[G] !== ne[K]; ) + K--; + for (; G >= 1 && K >= 0; G--, K--) + if (F[G] !== ne[K]) { + if (G !== 1 || K !== 1) do - if (G--, z--, z < 0 || F[G] !== ne[z]) { + if (G--, K--, K < 0 || F[G] !== ne[K]) { var se = ` ` + F[G].replace(" at new ", " at "); return c.displayName && se.includes("") && (se = se.replace("", c.displayName)), typeof c == "function" && Rt.set(c, se), se; } - while (G >= 1 && z >= 0); + while (G >= 1 && K >= 0); break; } } @@ -379,7 +379,7 @@ function Ho() { if (typeof c == "string") return xe(c); switch (c) { - case d: + case f: return xe("Suspense"); case s: return xe("SuspenseList"); @@ -388,7 +388,7 @@ function Ho() { switch (c.$$typeof) { case i: return oo(c.render); - case g: + case h: return Ft(c.type, E, x); case v: { var P = c, N = P._payload, L = P._init; @@ -423,7 +423,7 @@ function Ho() { } catch (G) { F = G; } - F && !(F instanceof Error) && (Ct(N), h("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", P || "React class", x, I, typeof F), Ct(null)), F instanceof Error && !(F.message in ln) && (ln[F.message] = !0, Ct(N), h("Failed %s type: %s", x, F.message), Ct(null)); + F && !(F instanceof Error) && (Ct(N), g("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", P || "React class", x, I, typeof F), Ct(null)), F instanceof Error && !(F.message in ln) && (ln[F.message] = !0, Ct(N), g("Failed %s type: %s", x, F.message), Ct(null)); } } } @@ -449,7 +449,7 @@ function Ho() { } function cn(c) { if (co(c)) - return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", so(c)), sn(c); + return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", so(c)), sn(c); } var st = m.ReactCurrentOwner, fo = { key: !0, @@ -477,13 +477,13 @@ function Ho() { function vo(c, E) { if (typeof c.ref == "string" && st.current && E && st.current.stateNode !== E) { var x = $(st.current.type); - ir[x] || (h('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', $(st.current.type), c.ref), ir[x] = !0); + ir[x] || (g('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', $(st.current.type), c.ref), ir[x] = !0); } } function mo(c, E) { { var x = function() { - fn || (fn = !0, h("%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://reactjs.org/link/special-props)", E)); + fn || (fn = !0, g("%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://reactjs.org/link/special-props)", E)); }; x.isReactWarning = !0, Object.defineProperty(c, "key", { get: x, @@ -494,7 +494,7 @@ function Ho() { function ho(c, E) { { var x = function() { - dn || (dn = !0, h("%s: `ref` 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://reactjs.org/link/special-props)", E)); + dn || (dn = !0, g("%s: `ref` 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://reactjs.org/link/special-props)", E)); }; x.isReactWarning = !0, Object.defineProperty(c, "ref", { get: x, @@ -543,8 +543,8 @@ function Ho() { I[L] === void 0 && (I[L] = G[L]); } if (F || ne) { - var z = typeof c == "function" ? c.displayName || c.name || "Unknown" : c; - F && mo(I, z), ne && ho(I, z); + var K = typeof c == "function" ? c.displayName || c.name || "Unknown" : c; + F && mo(I, K), ne && ho(I, K); } return go(c, F, ne, N, P, st.current, I); } @@ -600,7 +600,7 @@ Check the top-level render call using <` + x + ">."); return; vn[x] = !0; var P = ""; - c && c._owner && c._owner !== lr.current && (P = " It was passed a child from " + $(c._owner.type) + "."), Ge(c), h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', x, P), Ge(null); + c && c._owner && c._owner !== lr.current && (P = " It was passed a child from " + $(c._owner.type) + "."), Ge(c), g('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', x, P), Ge(null); } } function hn(c, E) { @@ -632,7 +632,7 @@ Check the top-level render call using <` + x + ">."); x = E.propTypes; else if (typeof E == "object" && (E.$$typeof === i || // Note: Memo only checks outer props here. // Inner props are checked in the reconciler. - E.$$typeof === g)) + E.$$typeof === h)) x = E.propTypes; else return; @@ -642,9 +642,9 @@ Check the top-level render call using <` + x + ">."); } else if (E.PropTypes !== void 0 && !ur) { ur = !0; var N = $(E); - h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", N || "Unknown"); + g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", N || "Unknown"); } - typeof E.getDefaultProps == "function" && !E.getDefaultProps.isReactClassApproved && h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); + typeof E.getDefaultProps == "function" && !E.getDefaultProps.isReactClassApproved && g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); } } function xo(c) { @@ -652,28 +652,28 @@ Check the top-level render call using <` + x + ">."); for (var E = Object.keys(c.props), x = 0; x < E.length; x++) { var P = E[x]; if (P !== "children" && P !== "key") { - Ge(c), h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", P), Ge(null); + Ge(c), g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", P), Ge(null); break; } } - c.ref !== null && (Ge(c), h("Invalid attribute `ref` supplied to `React.Fragment`."), Ge(null)); + c.ref !== null && (Ge(c), g("Invalid attribute `ref` supplied to `React.Fragment`."), Ge(null)); } } var gn = {}; function bn(c, E, x, P, N, L) { { - var I = k(c); + var I = j(c); if (!I) { var F = ""; (c === void 0 || typeof c == "object" && c !== null && Object.keys(c).length === 0) && (F += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."); var ne = wo(); ne ? F += ne : F += yn(); var G; - c === null ? G = "null" : or(c) ? G = "array" : c !== void 0 && c.$$typeof === e ? (G = "<" + ($(c.type) || "Unknown") + " />", F = " Did you accidentally export a JSX literal instead of a component?") : G = typeof c, h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", G, F); + c === null ? G = "null" : or(c) ? G = "array" : c !== void 0 && c.$$typeof === e ? (G = "<" + ($(c.type) || "Unknown") + " />", F = " Did you accidentally export a JSX literal instead of a component?") : G = typeof c, g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", G, F); } - var z = bo(c, E, x, N, L); - if (z == null) - return z; + var K = bo(c, E, x, N, L); + if (K == null) + return K; if (I) { var se = E.children; if (se !== void 0) @@ -683,7 +683,7 @@ Check the top-level render call using <` + x + ">."); hn(se[Ye], c); Object.freeze && Object.freeze(se); } else - h("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."); + g("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 hn(se, c); } @@ -693,7 +693,7 @@ Check the top-level render call using <` + x + ">."); }), cr = oe.length > 0 ? "{key: someKey, " + oe.join(": ..., ") + ": ...}" : "{key: someKey}"; if (!gn[ke + cr]) { var $o = oe.length > 0 ? "{" + oe.join(": ..., ") + ": ...}" : "{}"; - h(`A props object containing a "key" prop is being spread into JSX: + g(`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: @@ -701,7 +701,7 @@ React keys must be passed directly to JSX without using spread: <%s key={someKey} {...props} />`, cr, ke, $o, ke), gn[ke + cr] = !0; } } - return c === n ? xo(z) : So(z), z; + return c === n ? xo(K) : So(K), K; } } function Oo(c, E, x) { @@ -714,18 +714,18 @@ React keys must be passed directly to JSX without using spread: dt.Fragment = n, dt.jsx = Ao, dt.jsxs = To; }()), dt; } -process.env.NODE_ENV === "production" ? Tr.exports = Bo() : Tr.exports = Ho(); +process.env.NODE_ENV === "production" ? Tr.exports = Ho() : Tr.exports = Vo(); var R = Tr.exports; -function Vo(t, e) { +function qo(t, e) { return Array.isArray(t) ? t.filter((r) => !e.includes(r)) : Object.keys(t).reduce((r, n) => (e.includes(n) || (r[n] = t[n]), r), {}); } function aa(t, e) { return Array.isArray(t) ? t.filter((r) => e.includes(r)) : e.reduce((r, n) => (n in t && (r[n] = t[n]), r), {}); } -function qo(t) { +function Go(t) { return Array.isArray(t) ? t.filter((e) => e !== null) : Object.keys(t).reduce((e, r) => (r in t && t[r] !== null && (e[r] = t[r]), e), {}); } -function Go(t, e = 3, r = 10) { +function Yo(t, e = 3, r = 10) { return new Promise((n, a) => { const o = t(); if (o) { @@ -739,44 +739,44 @@ function Go(t, e = 3, r = 10) { }, r); }); } -var Yo = function(e) { - return zo(e) && !Ko(e); +var zo = function(e) { + return Ko(e) && !Xo(e); }; -function zo(t) { +function Ko(t) { return !!t && typeof t == "object"; } -function Ko(t) { +function Xo(t) { var e = Object.prototype.toString.call(t); - return e === "[object RegExp]" || e === "[object Date]" || Qo(t); -} -var Xo = typeof Symbol == "function" && Symbol.for, Jo = Xo ? Symbol.for("react.element") : 60103; -function Qo(t) { - return t.$$typeof === Jo; + return e === "[object RegExp]" || e === "[object Date]" || Zo(t); } +var Jo = typeof Symbol == "function" && Symbol.for, Qo = Jo ? Symbol.for("react.element") : 60103; function Zo(t) { + return t.$$typeof === Qo; +} +function ei(t) { return Array.isArray(t) ? [] : {}; } function xt(t, e) { - return e.clone !== !1 && e.isMergeableObject(t) ? Ze(Zo(t), t, e) : t; + return e.clone !== !1 && e.isMergeableObject(t) ? Ze(ei(t), t, e) : t; } -function ei(t, e, r) { +function ti(t, e, r) { return t.concat(e).map(function(n) { return xt(n, r); }); } -function ti(t, e) { +function ri(t, e) { if (!e.customMerge) return Ze; var r = e.customMerge(t); return typeof r == "function" ? r : Ze; } -function ri(t) { +function ni(t) { return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(t).filter(function(e) { return Object.propertyIsEnumerable.call(t, e); }) : []; } function Sn(t) { - return Object.keys(t).concat(ri(t)); + return Object.keys(t).concat(ni(t)); } function oa(t, e) { try { @@ -785,21 +785,21 @@ function oa(t, e) { return !1; } } -function ni(t, e) { +function ai(t, e) { return oa(t, e) && !(Object.hasOwnProperty.call(t, e) && Object.propertyIsEnumerable.call(t, e)); } -function ai(t, e, r) { +function oi(t, e, r) { var n = {}; return r.isMergeableObject(t) && Sn(t).forEach(function(a) { n[a] = xt(t[a], r); }), Sn(e).forEach(function(a) { - ni(t, a) || (oa(t, a) && r.isMergeableObject(e[a]) ? n[a] = ti(a, r)(t[a], e[a], r) : n[a] = xt(e[a], r)); + ai(t, a) || (oa(t, a) && r.isMergeableObject(e[a]) ? n[a] = ri(a, r)(t[a], e[a], r) : n[a] = xt(e[a], r)); }), n; } function Ze(t, e, r) { - r = r || {}, r.arrayMerge = r.arrayMerge || ei, r.isMergeableObject = r.isMergeableObject || Yo, r.cloneUnlessOtherwiseSpecified = xt; + r = r || {}, r.arrayMerge = r.arrayMerge || ti, r.isMergeableObject = r.isMergeableObject || zo, r.cloneUnlessOtherwiseSpecified = xt; var n = Array.isArray(e), a = Array.isArray(t), o = n === a; - return o ? n ? r.arrayMerge(t, e, r) : ai(t, e, r) : xt(e, r); + return o ? n ? r.arrayMerge(t, e, r) : oi(t, e, r) : xt(e, r); } Ze.all = function(e, r) { if (!Array.isArray(e)) @@ -808,9 +808,9 @@ Ze.all = function(e, r) { return Ze(n, a, r); }, {}); }; -var oi = Ze, ii = oi; -const li = /* @__PURE__ */ Wo(ii); -var ui = Error, si = EvalError, ci = RangeError, fi = ReferenceError, ia = SyntaxError, Pt = TypeError, di = URIError, pi = function() { +var ii = Ze, li = ii; +const ui = /* @__PURE__ */ Uo(li); +var si = Error, ci = EvalError, fi = RangeError, di = ReferenceError, ia = SyntaxError, Pt = TypeError, pi = URIError, yi = function() { if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function") return !1; if (typeof Symbol.iterator == "symbol") @@ -833,32 +833,32 @@ var ui = Error, si = EvalError, ci = RangeError, fi = ReferenceError, ia = Synta return !1; } return !0; -}, xn = typeof Symbol < "u" && Symbol, yi = pi, vi = function() { - return typeof xn != "function" || typeof Symbol != "function" || typeof xn("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : yi(); +}, xn = typeof Symbol < "u" && Symbol, vi = yi, mi = function() { + return typeof xn != "function" || typeof Symbol != "function" || typeof xn("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : vi(); }, fr = { __proto__: null, foo: {} -}, mi = Object, hi = function() { - return { __proto__: fr }.foo === fr.foo && !(fr instanceof mi); -}, gi = "Function.prototype.bind called on incompatible ", bi = Object.prototype.toString, wi = Math.max, Ei = "[object Function]", On = function(e, r) { +}, hi = Object, gi = function() { + return { __proto__: fr }.foo === fr.foo && !(fr instanceof hi); +}, bi = "Function.prototype.bind called on incompatible ", wi = Object.prototype.toString, Ei = Math.max, Si = "[object Function]", On = function(e, r) { for (var n = [], a = 0; a < e.length; a += 1) n[a] = e[a]; for (var o = 0; o < r.length; o += 1) n[o + e.length] = r[o]; return n; -}, Si = function(e, r) { +}, xi = function(e, r) { for (var n = [], a = r, o = 0; a < e.length; a += 1, o += 1) n[o] = e[a]; return n; -}, xi = function(t, e) { +}, Oi = function(t, e) { for (var r = "", n = 0; n < t.length; n += 1) r += t[n], n + 1 < t.length && (r += e); return r; -}, Oi = function(e) { +}, Pi = function(e) { var r = this; - if (typeof r != "function" || bi.apply(r) !== Ei) - throw new TypeError(gi + r); - for (var n = Si(arguments, 1), a, o = function() { + if (typeof r != "function" || wi.apply(r) !== Si) + throw new TypeError(bi + r); + for (var n = xi(arguments, 1), a, o = function() { if (this instanceof a) { var s = r.apply( this, @@ -870,15 +870,15 @@ var ui = Error, si = EvalError, ci = RangeError, fi = ReferenceError, ia = Synta e, On(n, arguments) ); - }, l = wi(0, r.length - n.length), u = [], i = 0; i < l; i++) + }, l = Ei(0, r.length - n.length), u = [], i = 0; i < l; i++) u[i] = "$" + i; - if (a = Function("binder", "return function (" + xi(u, ",") + "){ return binder.apply(this,arguments); }")(o), r.prototype) { - var d = function() { + if (a = Function("binder", "return function (" + Oi(u, ",") + "){ return binder.apply(this,arguments); }")(o), r.prototype) { + var f = function() { }; - d.prototype = r.prototype, a.prototype = new d(), d.prototype = null; + f.prototype = r.prototype, a.prototype = new f(), f.prototype = null; } return a; -}, Pi = Oi, qr = Function.prototype.bind || Pi, Ai = Function.prototype.call, Ti = Object.prototype.hasOwnProperty, $i = qr, Ri = $i.call(Ai, Ti), C, Fi = ui, Ci = si, Ii = ci, Mi = fi, et = ia, Qe = Pt, _i = di, la = Function, dr = function(t) { +}, Ai = Pi, qr = Function.prototype.bind || Ai, Ti = Function.prototype.call, $i = Object.prototype.hasOwnProperty, Ri = qr, Fi = Ri.call(Ti, $i), C, Ci = si, Ii = ci, Mi = fi, _i = di, et = ia, Qe = Pt, Di = pi, la = Function, dr = function(t) { try { return la('"use strict"; return (' + t + ").constructor;")(); } catch { @@ -892,7 +892,7 @@ if (Be) } var pr = function() { throw new Qe(); -}, Di = Be ? function() { +}, Ni = Be ? function() { try { return arguments.callee, pr; } catch { @@ -902,9 +902,9 @@ var pr = function() { return pr; } } -}() : pr, Ke = vi(), Ni = hi(), Z = Object.getPrototypeOf || (Ni ? function(t) { +}() : pr, Ke = mi(), ki = gi(), Z = Object.getPrototypeOf || (ki ? function(t) { return t.__proto__; -} : null), Je = {}, ki = typeof Uint8Array > "u" || !Z ? C : Z(Uint8Array), He = { +} : null), Je = {}, ji = typeof Uint8Array > "u" || !Z ? C : Z(Uint8Array), He = { __proto__: null, "%AggregateError%": typeof AggregateError > "u" ? C : AggregateError, "%Array%": Array, @@ -926,10 +926,10 @@ var pr = function() { "%decodeURIComponent%": decodeURIComponent, "%encodeURI%": encodeURI, "%encodeURIComponent%": encodeURIComponent, - "%Error%": Fi, + "%Error%": Ci, "%eval%": eval, // eslint-disable-line no-eval - "%EvalError%": Ci, + "%EvalError%": Ii, "%Float32Array%": typeof Float32Array > "u" ? C : Float32Array, "%Float64Array%": typeof Float64Array > "u" ? C : Float64Array, "%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? C : FinalizationRegistry, @@ -951,8 +951,8 @@ var pr = function() { "%parseInt%": parseInt, "%Promise%": typeof Promise > "u" ? C : Promise, "%Proxy%": typeof Proxy > "u" ? C : Proxy, - "%RangeError%": Ii, - "%ReferenceError%": Mi, + "%RangeError%": Mi, + "%ReferenceError%": _i, "%Reflect%": typeof Reflect > "u" ? C : Reflect, "%RegExp%": RegExp, "%Set%": typeof Set > "u" ? C : Set, @@ -962,14 +962,14 @@ var pr = function() { "%StringIteratorPrototype%": Ke && Z ? Z(""[Symbol.iterator]()) : C, "%Symbol%": Ke ? Symbol : C, "%SyntaxError%": et, - "%ThrowTypeError%": Di, - "%TypedArray%": ki, + "%ThrowTypeError%": Ni, + "%TypedArray%": ji, "%TypeError%": Qe, "%Uint8Array%": typeof Uint8Array > "u" ? C : Uint8Array, "%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? C : Uint8ClampedArray, "%Uint16Array%": typeof Uint16Array > "u" ? C : Uint16Array, "%Uint32Array%": typeof Uint32Array > "u" ? C : Uint32Array, - "%URIError%": _i, + "%URIError%": Di, "%WeakMap%": typeof WeakMap > "u" ? C : WeakMap, "%WeakRef%": typeof WeakRef > "u" ? C : WeakRef, "%WeakSet%": typeof WeakSet > "u" ? C : WeakSet @@ -978,10 +978,10 @@ if (Z) try { null.error; } catch (t) { - var ji = Z(Z(t)); - He["%Error.prototype%"] = ji; + var Li = Z(Z(t)); + He["%Error.prototype%"] = Li; } -var Li = function t(e) { +var Wi = function t(e) { var r; if (e === "%AsyncFunction%") r = dr("async function () {}"); @@ -1050,21 +1050,21 @@ var Li = function t(e) { "%URIErrorPrototype%": ["URIError", "prototype"], "%WeakMapPrototype%": ["WeakMap", "prototype"], "%WeakSetPrototype%": ["WeakSet", "prototype"] -}, At = qr, Lt = Ri, Wi = At.call(Function.call, Array.prototype.concat), Ui = At.call(Function.apply, Array.prototype.splice), An = At.call(Function.call, String.prototype.replace), Wt = At.call(Function.call, String.prototype.slice), Bi = At.call(Function.call, RegExp.prototype.exec), Hi = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, Vi = /\\(\\)?/g, qi = function(e) { +}, At = qr, Lt = Fi, Ui = At.call(Function.call, Array.prototype.concat), Bi = At.call(Function.apply, Array.prototype.splice), An = At.call(Function.call, String.prototype.replace), Wt = At.call(Function.call, String.prototype.slice), Hi = At.call(Function.call, RegExp.prototype.exec), Vi = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, qi = /\\(\\)?/g, Gi = function(e) { var r = Wt(e, 0, 1), n = Wt(e, -1); if (r === "%" && n !== "%") throw new et("invalid intrinsic syntax, expected closing `%`"); if (n === "%" && r !== "%") throw new et("invalid intrinsic syntax, expected opening `%`"); var a = []; - return An(e, Hi, function(o, l, u, i) { - a[a.length] = u ? An(i, Vi, "$1") : l || o; + return An(e, Vi, function(o, l, u, i) { + a[a.length] = u ? An(i, qi, "$1") : l || o; }), a; -}, Gi = function(e, r) { +}, Yi = function(e, r) { var n = e, a; if (Lt(Pn, n) && (a = Pn[n], n = "%" + a[0] + "%"), Lt(He, n)) { var o = He[n]; - if (o === Je && (o = Li(n)), typeof o > "u" && !r) + if (o === Je && (o = Wi(n)), typeof o > "u" && !r) throw new Qe("intrinsic " + e + " exists, but is not available. Please file an issue!"); return { alias: a, @@ -1078,15 +1078,15 @@ var Li = function t(e) { throw new Qe("intrinsic name must be a non-empty string"); if (arguments.length > 1 && typeof r != "boolean") throw new Qe('"allowMissing" argument must be a boolean'); - if (Bi(/^%?[^%]*%?$/, e) === null) + if (Hi(/^%?[^%]*%?$/, e) === null) throw new et("`%` may not be present anywhere but at the beginning and end of the intrinsic name"); - var n = qi(e), a = n.length > 0 ? n[0] : "", o = Gi("%" + a + "%", r), l = o.name, u = o.value, i = !1, d = o.alias; - d && (a = d[0], Ui(n, Wi([0, 1], d))); - for (var s = 1, g = !0; s < n.length; s += 1) { - var v = n[s], w = Wt(v, 0, 1), f = Wt(v, -1); - if ((w === '"' || w === "'" || w === "`" || f === '"' || f === "'" || f === "`") && w !== f) + var n = Gi(e), a = n.length > 0 ? n[0] : "", o = Yi("%" + a + "%", r), l = o.name, u = o.value, i = !1, f = o.alias; + f && (a = f[0], Bi(n, Ui([0, 1], f))); + for (var s = 1, h = !0; s < n.length; s += 1) { + var v = n[s], w = Wt(v, 0, 1), d = Wt(v, -1); + if ((w === '"' || w === "'" || w === "`" || d === '"' || d === "'" || d === "`") && w !== d) throw new et("property names with quotes must have matching quotes"); - if ((v === "constructor" || !g) && (i = !0), a += "." + v, l = "%" + a + "%", Lt(He, l)) + if ((v === "constructor" || !h) && (i = !0), a += "." + v, l = "%" + a + "%", Lt(He, l)) u = He[l]; else if (u != null) { if (!(v in u)) { @@ -1096,10 +1096,10 @@ var Li = function t(e) { } if (Be && s + 1 >= n.length) { var y = Be(u, v); - g = !!y, g && "get" in y && !("originalValue" in y.get) ? u = y.get : u = u[v]; + h = !!y, h && "get" in y && !("originalValue" in y.get) ? u = y.get : u = u[v]; } else - g = Lt(u, v), u = u[v]; - g && !i && (He[l] = u); + h = Lt(u, v), u = u[v]; + h && !i && (He[l] = u); } } return u; @@ -1116,14 +1116,14 @@ function Gr() { } return yr = e, yr; } -var Yi = nt, Nt = Yi("%Object.getOwnPropertyDescriptor%", !0); +var zi = nt, Nt = zi("%Object.getOwnPropertyDescriptor%", !0); if (Nt) try { Nt([], "length"); } catch { Nt = null; } -var sa = Nt, $n = Gr(), zi = ia, Xe = Pt, Rn = sa, Ki = function(e, r, n) { +var sa = Nt, $n = Gr(), Ki = ia, Xe = Pt, Rn = sa, Xi = function(e, r, n) { if (!e || typeof e != "object" && typeof e != "function") throw new Xe("`obj` must be an object or a function`"); if (typeof r != "string" && typeof r != "symbol") @@ -1147,7 +1147,7 @@ var sa = Nt, $n = Gr(), zi = ia, Xe = Pt, Rn = sa, Ki = function(e, r, n) { else if (u || !a && !o && !l) e[r] = n; else - throw new zi("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable."); + throw new Ki("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable."); }, $r = Gr(), ca = function() { return !!$r; }; @@ -1160,17 +1160,17 @@ ca.hasArrayLengthDefineBug = function() { return !0; } }; -var Xi = ca, Ji = nt, Fn = Ki, Qi = Xi(), Cn = sa, In = Pt, Zi = Ji("%Math.floor%"), el = function(e, r) { +var Ji = ca, Qi = nt, Fn = Xi, Zi = Ji(), Cn = sa, In = Pt, el = Qi("%Math.floor%"), tl = function(e, r) { if (typeof e != "function") throw new In("`fn` is not a function"); - if (typeof r != "number" || r < 0 || r > 4294967295 || Zi(r) !== r) + if (typeof r != "number" || r < 0 || r > 4294967295 || el(r) !== r) throw new In("`length` must be a positive 32-bit integer"); var n = arguments.length > 2 && !!arguments[2], a = !0, o = !0; if ("length" in e && Cn) { var l = Cn(e, "length"); l && !l.configurable && (a = !1), l && !l.writable && (o = !1); } - return (a || o || !n) && (Qi ? Fn( + return (a || o || !n) && (Zi ? Fn( /** @type {Parameters[0]} */ e, "length", @@ -1185,14 +1185,14 @@ var Xi = ca, Ji = nt, Fn = Ki, Qi = Xi(), Cn = sa, In = Pt, Zi = Ji("%Math.floor )), e; }; (function(t) { - var e = qr, r = nt, n = el, a = Pt, o = r("%Function.prototype.apply%"), l = r("%Function.prototype.call%"), u = r("%Reflect.apply%", !0) || e.call(l, o), i = Gr(), d = r("%Math.max%"); + var e = qr, r = nt, n = tl, a = Pt, o = r("%Function.prototype.apply%"), l = r("%Function.prototype.call%"), u = r("%Reflect.apply%", !0) || e.call(l, o), i = Gr(), f = r("%Math.max%"); t.exports = function(v) { if (typeof v != "function") throw new a("a function is required"); var w = u(e, l, arguments); return n( w, - 1 + d(0, v.length - (arguments.length - 1)), + 1 + f(0, v.length - (arguments.length - 1)), !0 ); }; @@ -1201,15 +1201,15 @@ var Xi = ca, Ji = nt, Fn = Ki, Qi = Xi(), Cn = sa, In = Pt, Zi = Ji("%Math.floor }; i ? i(t.exports, "apply", { value: s }) : t.exports.apply = s; })(ua); -var tl = ua.exports, fa = nt, da = tl, rl = da(fa("String.prototype.indexOf")), nl = function(e, r) { +var rl = ua.exports, fa = nt, da = rl, nl = da(fa("String.prototype.indexOf")), al = function(e, r) { var n = fa(e, !!r); - return typeof n == "function" && rl(e, ".prototype.") > -1 ? da(n) : n; + return typeof n == "function" && nl(e, ".prototype.") > -1 ? da(n) : n; }; -const al = {}, ol = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ +const ol = {}, il = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, - default: al -}, Symbol.toStringTag, { value: "Module" })), il = /* @__PURE__ */ Uo(ol); -var Yr = typeof Map == "function" && Map.prototype, vr = Object.getOwnPropertyDescriptor && Yr ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, Ut = Yr && vr && typeof vr.get == "function" ? vr.get : null, Mn = Yr && Map.prototype.forEach, zr = typeof Set == "function" && Set.prototype, mr = Object.getOwnPropertyDescriptor && zr ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, Bt = zr && mr && typeof mr.get == "function" ? mr.get : null, _n = zr && Set.prototype.forEach, ll = typeof WeakMap == "function" && WeakMap.prototype, gt = ll ? WeakMap.prototype.has : null, ul = typeof WeakSet == "function" && WeakSet.prototype, bt = ul ? WeakSet.prototype.has : null, sl = typeof WeakRef == "function" && WeakRef.prototype, Dn = sl ? WeakRef.prototype.deref : null, cl = Boolean.prototype.valueOf, fl = Object.prototype.toString, dl = Function.prototype.toString, pl = String.prototype.match, Kr = String.prototype.slice, Re = String.prototype.replace, yl = String.prototype.toUpperCase, Nn = String.prototype.toLowerCase, pa = RegExp.prototype.test, kn = Array.prototype.concat, Ee = Array.prototype.join, vl = Array.prototype.slice, jn = Math.floor, Rr = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, hr = Object.getOwnPropertySymbols, Fr = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, tt = typeof Symbol == "function" && typeof Symbol.iterator == "object", re = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === tt || !0) ? Symbol.toStringTag : null, ya = Object.prototype.propertyIsEnumerable, Ln = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(t) { + default: ol +}, Symbol.toStringTag, { value: "Module" })), ll = /* @__PURE__ */ Bo(il); +var Yr = typeof Map == "function" && Map.prototype, vr = Object.getOwnPropertyDescriptor && Yr ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, Ut = Yr && vr && typeof vr.get == "function" ? vr.get : null, Mn = Yr && Map.prototype.forEach, zr = typeof Set == "function" && Set.prototype, mr = Object.getOwnPropertyDescriptor && zr ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, Bt = zr && mr && typeof mr.get == "function" ? mr.get : null, _n = zr && Set.prototype.forEach, ul = typeof WeakMap == "function" && WeakMap.prototype, gt = ul ? WeakMap.prototype.has : null, sl = typeof WeakSet == "function" && WeakSet.prototype, bt = sl ? WeakSet.prototype.has : null, cl = typeof WeakRef == "function" && WeakRef.prototype, Dn = cl ? WeakRef.prototype.deref : null, fl = Boolean.prototype.valueOf, dl = Object.prototype.toString, pl = Function.prototype.toString, yl = String.prototype.match, Kr = String.prototype.slice, Re = String.prototype.replace, vl = String.prototype.toUpperCase, Nn = String.prototype.toLowerCase, pa = RegExp.prototype.test, kn = Array.prototype.concat, Ee = Array.prototype.join, ml = Array.prototype.slice, jn = Math.floor, Rr = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, hr = Object.getOwnPropertySymbols, Fr = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, tt = typeof Symbol == "function" && typeof Symbol.iterator == "object", re = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === tt || !0) ? Symbol.toStringTag : null, ya = Object.prototype.propertyIsEnumerable, Ln = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(t) { return t.__proto__; } : null); function Wn(t, e) { @@ -1225,7 +1225,7 @@ function Wn(t, e) { } return Re.call(e, r, "$&_"); } -var Cr = il, Un = Cr.custom, Bn = ma(Un) ? Un : null, ml = function t(e, r, n, a) { +var Cr = ll, Un = Cr.custom, Bn = ma(Un) ? Un : null, hl = function t(e, r, n, a) { var o = r || {}; if (Te(o, "quoteStyle") && o.quoteStyle !== "single" && o.quoteStyle !== "double") throw new TypeError('option "quoteStyle" must be "single" or "double"'); @@ -1254,19 +1254,19 @@ var Cr = il, Un = Cr.custom, Bn = ma(Un) ? Un : null, ml = function t(e, r, n, a return u ? Wn(e, i) : i; } if (typeof e == "bigint") { - var d = String(e) + "n"; - return u ? Wn(e, d) : d; + var f = String(e) + "n"; + return u ? Wn(e, f) : f; } var s = typeof o.depth > "u" ? 5 : o.depth; if (typeof n > "u" && (n = 0), n >= s && s > 0 && typeof e == "object") return Ir(e) ? "[Array]" : "[Object]"; - var g = _l(o, n); + var h = Dl(o, n); if (typeof a > "u") a = []; else if (ha(a, e) >= 0) return "[Circular]"; function v($, T, D) { - if (T && (a = vl.call(a), a.push(T)), D) { + if (T && (a = ml.call(a), a.push(T)), D) { var ue = { depth: o.depth }; @@ -1275,25 +1275,25 @@ var Cr = il, Un = Cr.custom, Bn = ma(Un) ? Un : null, ml = function t(e, r, n, a return t($, o, n + 1, a); } if (typeof e == "function" && !Hn(e)) { - var w = Pl(e), f = It(e, v); - return "[Function" + (w ? ": " + w : " (anonymous)") + "]" + (f.length > 0 ? " { " + Ee.call(f, ", ") + " }" : ""); + var w = Al(e), d = It(e, v); + return "[Function" + (w ? ": " + w : " (anonymous)") + "]" + (d.length > 0 ? " { " + Ee.call(d, ", ") + " }" : ""); } if (ma(e)) { var y = tt ? Re.call(String(e), /^(Symbol\(.*\))_[^)]*$/, "$1") : Fr.call(e); return typeof e == "object" && !tt ? pt(y) : y; } - if (Cl(e)) { - for (var p = "<" + Nn.call(String(e.nodeName)), m = e.attributes || [], h = 0; h < m.length; h++) - p += " " + m[h].name + "=" + va(hl(m[h].value), "double", o); + if (Il(e)) { + for (var p = "<" + Nn.call(String(e.nodeName)), m = e.attributes || [], g = 0; g < m.length; g++) + p += " " + m[g].name + "=" + va(gl(m[g].value), "double", o); return p += ">", e.childNodes && e.childNodes.length && (p += "..."), p += "", p; } if (Ir(e)) { if (e.length === 0) return "[]"; var b = It(e, v); - return g && !Ml(b) ? "[" + Mr(b, g) + "]" : "[ " + Ee.call(b, ", ") + " ]"; + return h && !_l(b) ? "[" + Mr(b, h) + "]" : "[ " + Ee.call(b, ", ") + " ]"; } - if (bl(e)) { + if (wl(e)) { var S = It(e, v); return !("cause" in Error.prototype) && "cause" in e && !ya.call(e, "cause") ? "{ [" + String(e) + "] " + Ee.call(kn.call("[cause]: " + v(e.cause), S), ", ") + " }" : S.length === 0 ? "[" + String(e) + "]" : "{ [" + String(e) + "] " + Ee.call(S, ", ") + " }"; } @@ -1303,39 +1303,39 @@ var Cr = il, Un = Cr.custom, Bn = ma(Un) ? Un : null, ml = function t(e, r, n, a if (l !== "symbol" && typeof e.inspect == "function") return e.inspect(); } - if (Al(e)) { + if (Tl(e)) { var O = []; return Mn && Mn.call(e, function($, T) { O.push(v(T, e, !0) + " => " + v($, e)); - }), Vn("Map", Ut.call(e), O, g); + }), Vn("Map", Ut.call(e), O, h); } - if (Rl(e)) { + if (Fl(e)) { var _ = []; return _n && _n.call(e, function($) { _.push(v($, e)); - }), Vn("Set", Bt.call(e), _, g); + }), Vn("Set", Bt.call(e), _, h); } - if (Tl(e)) + if ($l(e)) return gr("WeakMap"); - if (Fl(e)) + if (Cl(e)) return gr("WeakSet"); - if ($l(e)) + if (Rl(e)) return gr("WeakRef"); - if (El(e)) + if (Sl(e)) return pt(v(Number(e))); - if (xl(e)) + if (Ol(e)) return pt(v(Rr.call(e))); - if (Sl(e)) - return pt(cl.call(e)); - if (wl(e)) + if (xl(e)) + return pt(fl.call(e)); + if (El(e)) return pt(v(String(e))); if (typeof window < "u" && e === window) return "{ [object Window] }"; if (typeof globalThis < "u" && e === globalThis || typeof Ar < "u" && e === Ar) return "{ [object globalThis] }"; - if (!gl(e) && !Hn(e)) { - var M = It(e, v), W = Ln ? Ln(e) === Object.prototype : e instanceof Object || e.constructor === Object, H = e instanceof Object ? "" : "null prototype", k = !W && re && Object(e) === e && re in e ? Kr.call(Ie(e), 8, -1) : H ? "Object" : "", Y = W || typeof e.constructor != "function" ? "" : e.constructor.name ? e.constructor.name + " " : "", V = Y + (k || H ? "[" + Ee.call(kn.call([], k || [], H || []), ": ") + "] " : ""); - return M.length === 0 ? V + "{}" : g ? V + "{" + Mr(M, g) + "}" : V + "{ " + Ee.call(M, ", ") + " }"; + if (!bl(e) && !Hn(e)) { + var M = It(e, v), W = Ln ? Ln(e) === Object.prototype : e instanceof Object || e.constructor === Object, H = e instanceof Object ? "" : "null prototype", j = !W && re && Object(e) === e && re in e ? Kr.call(Ie(e), 8, -1) : H ? "Object" : "", z = W || typeof e.constructor != "function" ? "" : e.constructor.name ? e.constructor.name + " " : "", V = z + (j || H ? "[" + Ee.call(kn.call([], j || [], H || []), ": ") + "] " : ""); + return M.length === 0 ? V + "{}" : h ? V + "{" + Mr(M, h) + "}" : V + "{ " + Ee.call(M, ", ") + " }"; } return String(e); }; @@ -1343,28 +1343,28 @@ function va(t, e, r) { var n = (r.quoteStyle || e) === "double" ? '"' : "'"; return n + t + n; } -function hl(t) { +function gl(t) { return Re.call(String(t), /"/g, """); } function Ir(t) { return Ie(t) === "[object Array]" && (!re || !(typeof t == "object" && re in t)); } -function gl(t) { +function bl(t) { return Ie(t) === "[object Date]" && (!re || !(typeof t == "object" && re in t)); } function Hn(t) { return Ie(t) === "[object RegExp]" && (!re || !(typeof t == "object" && re in t)); } -function bl(t) { +function wl(t) { return Ie(t) === "[object Error]" && (!re || !(typeof t == "object" && re in t)); } -function wl(t) { +function El(t) { return Ie(t) === "[object String]" && (!re || !(typeof t == "object" && re in t)); } -function El(t) { +function Sl(t) { return Ie(t) === "[object Number]" && (!re || !(typeof t == "object" && re in t)); } -function Sl(t) { +function xl(t) { return Ie(t) === "[object Boolean]" && (!re || !(typeof t == "object" && re in t)); } function ma(t) { @@ -1380,7 +1380,7 @@ function ma(t) { } return !1; } -function xl(t) { +function Ol(t) { if (!t || typeof t != "object" || !Rr) return !1; try { @@ -1389,19 +1389,19 @@ function xl(t) { } return !1; } -var Ol = Object.prototype.hasOwnProperty || function(t) { +var Pl = Object.prototype.hasOwnProperty || function(t) { return t in this; }; function Te(t, e) { - return Ol.call(t, e); + return Pl.call(t, e); } function Ie(t) { - return fl.call(t); + return dl.call(t); } -function Pl(t) { +function Al(t) { if (t.name) return t.name; - var e = pl.call(dl.call(t), /^function\s*([\w$]+)/); + var e = yl.call(pl.call(t), /^function\s*([\w$]+)/); return e ? e[1] : null; } function ha(t, e) { @@ -1412,7 +1412,7 @@ function ha(t, e) { return r; return -1; } -function Al(t) { +function Tl(t) { if (!Ut || !t || typeof t != "object") return !1; try { @@ -1427,7 +1427,7 @@ function Al(t) { } return !1; } -function Tl(t) { +function $l(t) { if (!gt || !t || typeof t != "object") return !1; try { @@ -1442,7 +1442,7 @@ function Tl(t) { } return !1; } -function $l(t) { +function Rl(t) { if (!Dn || !t || typeof t != "object") return !1; try { @@ -1451,7 +1451,7 @@ function $l(t) { } return !1; } -function Rl(t) { +function Fl(t) { if (!Bt || !t || typeof t != "object") return !1; try { @@ -1466,7 +1466,7 @@ function Rl(t) { } return !1; } -function Fl(t) { +function Cl(t) { if (!bt || !t || typeof t != "object") return !1; try { @@ -1481,7 +1481,7 @@ function Fl(t) { } return !1; } -function Cl(t) { +function Il(t) { return !t || typeof t != "object" ? !1 : typeof HTMLElement < "u" && t instanceof HTMLElement ? !0 : typeof t.nodeName == "string" && typeof t.getAttribute == "function"; } function ga(t, e) { @@ -1489,10 +1489,10 @@ function ga(t, e) { var r = t.length - e.maxStringLength, n = "... " + r + " more character" + (r > 1 ? "s" : ""); return ga(Kr.call(t, 0, e.maxStringLength), e) + n; } - var a = Re.call(Re.call(t, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g, Il); + var a = Re.call(Re.call(t, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g, Ml); return va(a, "single", e); } -function Il(t) { +function Ml(t) { var e = t.charCodeAt(0), r = { 8: "b", 9: "t", @@ -1500,7 +1500,7 @@ function Il(t) { 12: "f", 13: "r" }[e]; - return r ? "\\" + r : "\\x" + (e < 16 ? "0" : "") + yl.call(e.toString(16)); + return r ? "\\" + r : "\\x" + (e < 16 ? "0" : "") + vl.call(e.toString(16)); } function pt(t) { return "Object(" + t + ")"; @@ -1512,14 +1512,14 @@ function Vn(t, e, r, n) { var a = n ? Mr(r, n) : Ee.call(r, ", "); return t + " (" + e + ") {" + a + "}"; } -function Ml(t) { +function _l(t) { for (var e = 0; e < t.length; e++) if (ha(t[e], ` `) >= 0) return !1; return !0; } -function _l(t, e) { +function Dl(t, e) { var r; if (t.indent === " ") r = " "; @@ -1556,19 +1556,19 @@ function It(t, e) { for (var i in t) Te(t, i) && (r && String(Number(i)) === i && i < t.length || tt && l["$" + i] instanceof Symbol || (pa.call(/[^\w$]/, i) ? n.push(e(i, t) + ": " + e(t[i], t)) : n.push(i + ": " + e(t[i], t)))); if (typeof hr == "function") - for (var d = 0; d < o.length; d++) - ya.call(t, o[d]) && n.push("[" + e(o[d]) + "]: " + e(t[o[d]], t)); + for (var f = 0; f < o.length; f++) + ya.call(t, o[f]) && n.push("[" + e(o[f]) + "]: " + e(t[o[f]], t)); return n; } -var ba = nt, at = nl, Dl = ml, Nl = Pt, Mt = ba("%WeakMap%", !0), _t = ba("%Map%", !0), kl = at("WeakMap.prototype.get", !0), jl = at("WeakMap.prototype.set", !0), Ll = at("WeakMap.prototype.has", !0), Wl = at("Map.prototype.get", !0), Ul = at("Map.prototype.set", !0), Bl = at("Map.prototype.has", !0), Xr = function(t, e) { +var ba = nt, at = al, Nl = hl, kl = Pt, Mt = ba("%WeakMap%", !0), _t = ba("%Map%", !0), jl = at("WeakMap.prototype.get", !0), Ll = at("WeakMap.prototype.set", !0), Wl = at("WeakMap.prototype.has", !0), Ul = at("Map.prototype.get", !0), Bl = at("Map.prototype.set", !0), Hl = at("Map.prototype.has", !0), Xr = function(t, e) { for (var r = t, n; (n = r.next) !== null; r = n) if (n.key === e) return r.next = n.next, n.next = /** @type {NonNullable} */ t.next, t.next = n, n; -}, Hl = function(t, e) { +}, Vl = function(t, e) { var r = Xr(t, e); return r && r.value; -}, Vl = function(t, e, r) { +}, ql = function(t, e, r) { var n = Xr(t, e); n ? n.value = r : t.next = /** @type {import('.').ListNode} */ { @@ -1577,48 +1577,48 @@ var ba = nt, at = nl, Dl = ml, Nl = Pt, Mt = ba("%WeakMap%", !0), _t = ba("%Map% next: t.next, value: r }; -}, ql = function(t, e) { +}, Gl = function(t, e) { return !!Xr(t, e); -}, Gl = function() { +}, Yl = function() { var e, r, n, a = { assert: function(o) { if (!a.has(o)) - throw new Nl("Side channel does not contain " + Dl(o)); + throw new kl("Side channel does not contain " + Nl(o)); }, get: function(o) { if (Mt && o && (typeof o == "object" || typeof o == "function")) { if (e) - return kl(e, o); + return jl(e, o); } else if (_t) { if (r) - return Wl(r, o); + return Ul(r, o); } else if (n) - return Hl(n, o); + return Vl(n, o); }, has: function(o) { if (Mt && o && (typeof o == "object" || typeof o == "function")) { if (e) - return Ll(e, o); + return Wl(e, o); } else if (_t) { if (r) - return Bl(r, o); + return Hl(r, o); } else if (n) - return ql(n, o); + return Gl(n, o); return !1; }, set: function(o, l) { - Mt && o && (typeof o == "object" || typeof o == "function") ? (e || (e = new Mt()), jl(e, o, l)) : _t ? (r || (r = new _t()), Ul(r, o, l)) : (n || (n = { key: {}, next: null }), Vl(n, o, l)); + Mt && o && (typeof o == "object" || typeof o == "function") ? (e || (e = new Mt()), Ll(e, o, l)) : _t ? (r || (r = new _t()), Bl(r, o, l)) : (n || (n = { key: {}, next: null }), ql(n, o, l)); } }; return a; -}, Yl = String.prototype.replace, zl = /%20/g, br = { +}, zl = String.prototype.replace, Kl = /%20/g, br = { RFC1738: "RFC1738", RFC3986: "RFC3986" }, Jr = { default: br.RFC3986, formatters: { RFC1738: function(t) { - return Yl.call(t, zl, "+"); + return zl.call(t, Kl, "+"); }, RFC3986: function(t) { return String(t); @@ -1626,11 +1626,11 @@ var ba = nt, at = nl, Dl = ml, Nl = Pt, Mt = ba("%WeakMap%", !0), _t = ba("%Map% }, RFC1738: br.RFC1738, RFC3986: br.RFC3986 -}, Kl = Jr, wr = Object.prototype.hasOwnProperty, Le = Array.isArray, be = function() { +}, Xl = Jr, wr = Object.prototype.hasOwnProperty, Le = Array.isArray, be = function() { for (var t = [], e = 0; e < 256; ++e) t.push("%" + ((e < 16 ? "0" : "") + e.toString(16)).toUpperCase()); return t; -}(), Xl = function(e) { +}(), Jl = function(e) { for (; e.length > 1; ) { var r = e.pop(), n = r.obj[r.prop]; if (Le(n)) { @@ -1643,7 +1643,7 @@ var ba = nt, at = nl, Dl = ml, Nl = Pt, Mt = ba("%WeakMap%", !0), _t = ba("%Map% for (var n = r && r.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, a = 0; a < e.length; ++a) typeof e[a] < "u" && (n[a] = e[a]); return n; -}, Jl = function t(e, r, n) { +}, Ql = function t(e, r, n) { if (!r) return e; if (typeof r != "object") { @@ -1668,11 +1668,11 @@ var ba = nt, at = nl, Dl = ml, Nl = Pt, Mt = ba("%WeakMap%", !0), _t = ba("%Map% var u = r[l]; return wr.call(o, l) ? o[l] = t(o[l], u, n) : o[l] = u, o; }, a); -}, Ql = function(e, r) { +}, Zl = function(e, r) { return Object.keys(r).reduce(function(n, a) { return n[a] = r[a], n; }, e); -}, Zl = function(t, e, r) { +}, eu = function(t, e, r) { var n = t.replace(/\+/g, " "); if (r === "iso-8859-1") return n.replace(/%[0-9a-f]{2}/gi, unescape); @@ -1681,7 +1681,7 @@ var ba = nt, at = nl, Dl = ml, Nl = Pt, Mt = ba("%WeakMap%", !0), _t = ba("%Map% } catch { return n; } -}, Er = 1024, eu = function(e, r, n, a, o) { +}, Er = 1024, tu = function(e, r, n, a, o) { if (e.length === 0) return e; var l = e; @@ -1690,10 +1690,10 @@ var ba = nt, at = nl, Dl = ml, Nl = Pt, Mt = ba("%WeakMap%", !0), _t = ba("%Map% return "%26%23" + parseInt(w.slice(2), 16) + "%3B"; }); for (var u = "", i = 0; i < l.length; i += Er) { - for (var d = l.length >= Er ? l.slice(i, i + Er) : l, s = [], g = 0; g < d.length; ++g) { - var v = d.charCodeAt(g); - if (v === 45 || v === 46 || v === 95 || v === 126 || v >= 48 && v <= 57 || v >= 65 && v <= 90 || v >= 97 && v <= 122 || o === Kl.RFC1738 && (v === 40 || v === 41)) { - s[s.length] = d.charAt(g); + for (var f = l.length >= Er ? l.slice(i, i + Er) : l, s = [], h = 0; h < f.length; ++h) { + var v = f.charCodeAt(h); + if (v === 45 || v === 46 || v === 95 || v === 126 || v >= 48 && v <= 57 || v >= 65 && v <= 90 || v >= 97 && v <= 122 || o === Xl.RFC1738 && (v === 40 || v === 41)) { + s[s.length] = f.charAt(h); continue; } if (v < 128) { @@ -1708,25 +1708,25 @@ var ba = nt, at = nl, Dl = ml, Nl = Pt, Mt = ba("%WeakMap%", !0), _t = ba("%Map% s[s.length] = be[224 | v >> 12] + be[128 | v >> 6 & 63] + be[128 | v & 63]; continue; } - g += 1, v = 65536 + ((v & 1023) << 10 | d.charCodeAt(g) & 1023), s[s.length] = be[240 | v >> 18] + be[128 | v >> 12 & 63] + be[128 | v >> 6 & 63] + be[128 | v & 63]; + h += 1, v = 65536 + ((v & 1023) << 10 | f.charCodeAt(h) & 1023), s[s.length] = be[240 | v >> 18] + be[128 | v >> 12 & 63] + be[128 | v >> 6 & 63] + be[128 | v & 63]; } u += s.join(""); } return u; -}, tu = function(e) { +}, ru = function(e) { for (var r = [{ obj: { o: e }, prop: "o" }], n = [], a = 0; a < r.length; ++a) for (var o = r[a], l = o.obj[o.prop], u = Object.keys(l), i = 0; i < u.length; ++i) { - var d = u[i], s = l[d]; - typeof s == "object" && s !== null && n.indexOf(s) === -1 && (r.push({ obj: l, prop: d }), n.push(s)); + var f = u[i], s = l[f]; + typeof s == "object" && s !== null && n.indexOf(s) === -1 && (r.push({ obj: l, prop: f }), n.push(s)); } - return Xl(r), e; -}, ru = function(e) { - return Object.prototype.toString.call(e) === "[object RegExp]"; + return Jl(r), e; }, nu = function(e) { + return Object.prototype.toString.call(e) === "[object RegExp]"; +}, au = function(e) { return !e || typeof e != "object" ? !1 : !!(e.constructor && e.constructor.isBuffer && e.constructor.isBuffer(e)); -}, au = function(e, r) { - return [].concat(e, r); }, ou = function(e, r) { + return [].concat(e, r); +}, iu = function(e, r) { if (Le(e)) { for (var n = [], a = 0; a < e.length; a += 1) n.push(r(e[a])); @@ -1735,16 +1735,16 @@ var ba = nt, at = nl, Dl = ml, Nl = Pt, Mt = ba("%WeakMap%", !0), _t = ba("%Map% return r(e); }, Ea = { arrayToObject: wa, - assign: Ql, - combine: au, - compact: tu, - decode: Zl, - encode: eu, - isBuffer: nu, - isRegExp: ru, - maybeMap: ou, - merge: Jl -}, Sa = Gl, kt = Ea, wt = Jr, iu = Object.prototype.hasOwnProperty, xa = { + assign: Zl, + combine: ou, + compact: ru, + decode: eu, + encode: tu, + isBuffer: au, + isRegExp: nu, + maybeMap: iu, + merge: Ql +}, Sa = Yl, kt = Ea, wt = Jr, lu = Object.prototype.hasOwnProperty, xa = { brackets: function(e) { return e + "[]"; }, @@ -1755,9 +1755,9 @@ var ba = nt, at = nl, Dl = ml, Nl = Pt, Mt = ba("%WeakMap%", !0), _t = ba("%Map% repeat: function(e) { return e; } -}, we = Array.isArray, lu = Array.prototype.push, Oa = function(t, e) { - lu.apply(t, we(e) ? e : [e]); -}, uu = Date.prototype.toISOString, qn = wt.default, X = { +}, we = Array.isArray, uu = Array.prototype.push, Oa = function(t, e) { + uu.apply(t, we(e) ? e : [e]); +}, su = Date.prototype.toISOString, qn = wt.default, X = { addQueryPrefix: !1, allowDots: !1, allowEmptyArrays: !1, @@ -1774,14 +1774,14 @@ var ba = nt, at = nl, Dl = ml, Nl = Pt, Mt = ba("%WeakMap%", !0), _t = ba("%Map% // deprecated indices: !1, serializeDate: function(e) { - return uu.call(e); + return su.call(e); }, skipNulls: !1, strictNullHandling: !1 -}, su = function(e) { +}, cu = function(e) { return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || typeof e == "symbol" || typeof e == "bigint"; -}, Sr = {}, cu = function t(e, r, n, a, o, l, u, i, d, s, g, v, w, f, y, p, m, h) { - for (var b = e, S = h, O = 0, _ = !1; (S = S.get(Sr)) !== void 0 && !_; ) { +}, Sr = {}, fu = function t(e, r, n, a, o, l, u, i, f, s, h, v, w, d, y, p, m, g) { + for (var b = e, S = g, O = 0, _ = !1; (S = S.get(Sr)) !== void 0 && !_; ) { var M = S.get(e); if (O += 1, typeof M < "u") { if (M === O) @@ -1790,42 +1790,42 @@ var ba = nt, at = nl, Dl = ml, Nl = Pt, Mt = ba("%WeakMap%", !0), _t = ba("%Map% } typeof S.get(Sr) > "u" && (O = 0); } - if (typeof s == "function" ? b = s(r, b) : b instanceof Date ? b = w(b) : n === "comma" && we(b) && (b = kt.maybeMap(b, function(pe) { - return pe instanceof Date ? w(pe) : pe; + if (typeof s == "function" ? b = s(r, b) : b instanceof Date ? b = w(b) : n === "comma" && we(b) && (b = kt.maybeMap(b, function(ye) { + return ye instanceof Date ? w(ye) : ye; })), b === null) { if (l) - return d && !p ? d(r, X.encoder, m, "key", f) : r; + return f && !p ? f(r, X.encoder, m, "key", d) : r; b = ""; } - if (su(b) || kt.isBuffer(b)) { - if (d) { - var W = p ? r : d(r, X.encoder, m, "key", f); - return [y(W) + "=" + y(d(b, X.encoder, m, "value", f))]; + if (cu(b) || kt.isBuffer(b)) { + if (f) { + var W = p ? r : f(r, X.encoder, m, "key", d); + return [y(W) + "=" + y(f(b, X.encoder, m, "value", d))]; } return [y(r) + "=" + y(String(b))]; } var H = []; if (typeof b > "u") return H; - var k; + var j; if (n === "comma" && we(b)) - p && d && (b = kt.maybeMap(b, d)), k = [{ value: b.length > 0 ? b.join(",") || null : void 0 }]; + p && f && (b = kt.maybeMap(b, f)), j = [{ value: b.length > 0 ? b.join(",") || null : void 0 }]; else if (we(s)) - k = s; + j = s; else { - var Y = Object.keys(b); - k = g ? Y.sort(g) : Y; + var z = Object.keys(b); + j = h ? z.sort(h) : z; } var V = i ? r.replace(/\./g, "%2E") : r, $ = a && we(b) && b.length === 1 ? V + "[]" : V; if (o && we(b) && b.length === 0) return $ + "[]"; - for (var T = 0; T < k.length; ++T) { - var D = k[T], ue = typeof D == "object" && typeof D.value < "u" ? D.value : b[D]; + for (var T = 0; T < j.length; ++T) { + var D = j[T], ue = typeof D == "object" && typeof D.value < "u" ? D.value : b[D]; if (!(u && ue === null)) { - var de = v && i ? D.replace(/\./g, "%2E") : D, ge = we(b) ? typeof n == "function" ? n($, de) : $ : $ + (v ? "." + de : "[" + de + "]"); - h.set(e, O); + var pe = v && i ? D.replace(/\./g, "%2E") : D, ge = we(b) ? typeof n == "function" ? n($, pe) : $ : $ + (v ? "." + pe : "[" + pe + "]"); + g.set(e, O); var te = Sa(); - te.set(Sr, h), Oa(H, t( + te.set(Sr, g), Oa(H, t( ue, ge, n, @@ -1834,12 +1834,12 @@ var ba = nt, at = nl, Dl = ml, Nl = Pt, Mt = ba("%WeakMap%", !0), _t = ba("%Map% l, u, i, - n === "comma" && p && we(b) ? null : d, + n === "comma" && p && we(b) ? null : f, s, - g, + h, v, w, - f, + d, y, p, m, @@ -1848,7 +1848,7 @@ var ba = nt, at = nl, Dl = ml, Nl = Pt, Mt = ba("%WeakMap%", !0), _t = ba("%Map% } } return H; -}, fu = function(e) { +}, du = function(e) { if (!e) return X; if (typeof e.allowEmptyArrays < "u" && typeof e.allowEmptyArrays != "boolean") @@ -1862,7 +1862,7 @@ var ba = nt, at = nl, Dl = ml, Nl = Pt, Mt = ba("%WeakMap%", !0), _t = ba("%Map% throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined"); var n = wt.default; if (typeof e.format < "u") { - if (!iu.call(wt.formatters, e.format)) + if (!lu.call(wt.formatters, e.format)) throw new TypeError("Unknown format option provided."); n = e.format; } @@ -1893,19 +1893,19 @@ var ba = nt, at = nl, Dl = ml, Nl = Pt, Mt = ba("%WeakMap%", !0), _t = ba("%Map% sort: typeof e.sort == "function" ? e.sort : null, strictNullHandling: typeof e.strictNullHandling == "boolean" ? e.strictNullHandling : X.strictNullHandling }; -}, du = function(t, e) { - var r = t, n = fu(e), a, o; +}, pu = function(t, e) { + var r = t, n = du(e), a, o; typeof n.filter == "function" ? (o = n.filter, r = o("", r)) : we(n.filter) && (o = n.filter, a = o); var l = []; if (typeof r != "object" || r === null) return ""; var u = xa[n.arrayFormat], i = u === "comma" && n.commaRoundTrip; a || (a = Object.keys(r)), n.sort && a.sort(n.sort); - for (var d = Sa(), s = 0; s < a.length; ++s) { - var g = a[s]; - n.skipNulls && r[g] === null || Oa(l, cu( - r[g], - g, + for (var f = Sa(), s = 0; s < a.length; ++s) { + var h = a[s]; + n.skipNulls && r[h] === null || Oa(l, fu( + r[h], + h, u, i, n.allowEmptyArrays, @@ -1921,12 +1921,12 @@ var ba = nt, at = nl, Dl = ml, Nl = Pt, Mt = ba("%WeakMap%", !0), _t = ba("%Map% n.formatter, n.encodeValuesOnly, n.charset, - d + f )); } var v = l.join(n.delimiter), w = n.addQueryPrefix === !0 ? "?" : ""; return n.charsetSentinel && (n.charset === "iso-8859-1" ? w += "utf8=%26%2310003%3B&" : w += "utf8=%E2%9C%93&"), v.length > 0 ? w + v : ""; -}, rt = Ea, _r = Object.prototype.hasOwnProperty, pu = Array.isArray, B = { +}, rt = Ea, _r = Object.prototype.hasOwnProperty, yu = Array.isArray, B = { allowDots: !1, allowEmptyArrays: !1, allowPrototypes: !1, @@ -1947,55 +1947,55 @@ var ba = nt, at = nl, Dl = ml, Nl = Pt, Mt = ba("%WeakMap%", !0), _t = ba("%Map% plainObjects: !1, strictDepth: !1, strictNullHandling: !1 -}, yu = function(t) { +}, vu = function(t) { return t.replace(/&#(\d+);/g, function(e, r) { return String.fromCharCode(parseInt(r, 10)); }); }, Pa = function(t, e) { return t && typeof t == "string" && e.comma && t.indexOf(",") > -1 ? t.split(",") : t; -}, vu = "utf8=%26%2310003%3B", mu = "utf8=%E2%9C%93", hu = function(e, r) { +}, mu = "utf8=%26%2310003%3B", hu = "utf8=%E2%9C%93", gu = function(e, r) { var n = { __proto__: null }, a = r.ignoreQueryPrefix ? e.replace(/^\?/, "") : e; a = a.replace(/%5B/gi, "[").replace(/%5D/gi, "]"); - var o = r.parameterLimit === 1 / 0 ? void 0 : r.parameterLimit, l = a.split(r.delimiter, o), u = -1, i, d = r.charset; + var o = r.parameterLimit === 1 / 0 ? void 0 : r.parameterLimit, l = a.split(r.delimiter, o), u = -1, i, f = r.charset; if (r.charsetSentinel) for (i = 0; i < l.length; ++i) - l[i].indexOf("utf8=") === 0 && (l[i] === mu ? d = "utf-8" : l[i] === vu && (d = "iso-8859-1"), u = i, i = l.length); + l[i].indexOf("utf8=") === 0 && (l[i] === hu ? f = "utf-8" : l[i] === mu && (f = "iso-8859-1"), u = i, i = l.length); for (i = 0; i < l.length; ++i) if (i !== u) { - var s = l[i], g = s.indexOf("]="), v = g === -1 ? s.indexOf("=") : g + 1, w, f; - v === -1 ? (w = r.decoder(s, B.decoder, d, "key"), f = r.strictNullHandling ? null : "") : (w = r.decoder(s.slice(0, v), B.decoder, d, "key"), f = rt.maybeMap( + var s = l[i], h = s.indexOf("]="), v = h === -1 ? s.indexOf("=") : h + 1, w, d; + v === -1 ? (w = r.decoder(s, B.decoder, f, "key"), d = r.strictNullHandling ? null : "") : (w = r.decoder(s.slice(0, v), B.decoder, f, "key"), d = rt.maybeMap( Pa(s.slice(v + 1), r), function(p) { - return r.decoder(p, B.decoder, d, "value"); + return r.decoder(p, B.decoder, f, "value"); } - )), f && r.interpretNumericEntities && d === "iso-8859-1" && (f = yu(f)), s.indexOf("[]=") > -1 && (f = pu(f) ? [f] : f); + )), d && r.interpretNumericEntities && f === "iso-8859-1" && (d = vu(d)), s.indexOf("[]=") > -1 && (d = yu(d) ? [d] : d); var y = _r.call(n, w); - y && r.duplicates === "combine" ? n[w] = rt.combine(n[w], f) : (!y || r.duplicates === "last") && (n[w] = f); + y && r.duplicates === "combine" ? n[w] = rt.combine(n[w], d) : (!y || r.duplicates === "last") && (n[w] = d); } return n; -}, gu = function(t, e, r, n) { +}, bu = function(t, e, r, n) { for (var a = n ? e : Pa(e, r), o = t.length - 1; o >= 0; --o) { var l, u = t[o]; if (u === "[]" && r.parseArrays) l = r.allowEmptyArrays && (a === "" || r.strictNullHandling && a === null) ? [] : [].concat(a); else { l = r.plainObjects ? /* @__PURE__ */ Object.create(null) : {}; - var i = u.charAt(0) === "[" && u.charAt(u.length - 1) === "]" ? u.slice(1, -1) : u, d = r.decodeDotInKeys ? i.replace(/%2E/g, ".") : i, s = parseInt(d, 10); - !r.parseArrays && d === "" ? l = { 0: a } : !isNaN(s) && u !== d && String(s) === d && s >= 0 && r.parseArrays && s <= r.arrayLimit ? (l = [], l[s] = a) : d !== "__proto__" && (l[d] = a); + var i = u.charAt(0) === "[" && u.charAt(u.length - 1) === "]" ? u.slice(1, -1) : u, f = r.decodeDotInKeys ? i.replace(/%2E/g, ".") : i, s = parseInt(f, 10); + !r.parseArrays && f === "" ? l = { 0: a } : !isNaN(s) && u !== f && String(s) === f && s >= 0 && r.parseArrays && s <= r.arrayLimit ? (l = [], l[s] = a) : f !== "__proto__" && (l[f] = a); } a = l; } return a; -}, bu = function(e, r, n, a) { +}, wu = function(e, r, n, a) { if (e) { - var o = n.allowDots ? e.replace(/\.([^.[]+)/g, "[$1]") : e, l = /(\[[^[\]]*])/, u = /(\[[^[\]]*])/g, i = n.depth > 0 && l.exec(o), d = i ? o.slice(0, i.index) : o, s = []; - if (d) { - if (!n.plainObjects && _r.call(Object.prototype, d) && !n.allowPrototypes) + var o = n.allowDots ? e.replace(/\.([^.[]+)/g, "[$1]") : e, l = /(\[[^[\]]*])/, u = /(\[[^[\]]*])/g, i = n.depth > 0 && l.exec(o), f = i ? o.slice(0, i.index) : o, s = []; + if (f) { + if (!n.plainObjects && _r.call(Object.prototype, f) && !n.allowPrototypes) return; - s.push(d); + s.push(f); } - for (var g = 0; n.depth > 0 && (i = u.exec(o)) !== null && g < n.depth; ) { - if (g += 1, !n.plainObjects && _r.call(Object.prototype, i[1].slice(1, -1)) && !n.allowPrototypes) + for (var h = 0; n.depth > 0 && (i = u.exec(o)) !== null && h < n.depth; ) { + if (h += 1, !n.plainObjects && _r.call(Object.prototype, i[1].slice(1, -1)) && !n.allowPrototypes) return; s.push(i[1]); } @@ -2004,9 +2004,9 @@ var ba = nt, at = nl, Dl = ml, Nl = Pt, Mt = ba("%WeakMap%", !0), _t = ba("%Map% throw new RangeError("Input depth exceeded depth option of " + n.depth + " and strictDepth is true"); s.push("[" + o.slice(i.index) + "]"); } - return gu(s, r, n, a); + return bu(s, r, n, a); } -}, wu = function(e) { +}, Eu = function(e) { if (!e) return B; if (typeof e.allowEmptyArrays < "u" && typeof e.allowEmptyArrays != "boolean") @@ -2044,20 +2044,20 @@ var ba = nt, at = nl, Dl = ml, Nl = Pt, Mt = ba("%WeakMap%", !0), _t = ba("%Map% strictDepth: typeof e.strictDepth == "boolean" ? !!e.strictDepth : B.strictDepth, strictNullHandling: typeof e.strictNullHandling == "boolean" ? e.strictNullHandling : B.strictNullHandling }; -}, Eu = function(t, e) { - var r = wu(e); +}, Su = function(t, e) { + var r = Eu(e); if (t === "" || t === null || typeof t > "u") return r.plainObjects ? /* @__PURE__ */ Object.create(null) : {}; - for (var n = typeof t == "string" ? hu(t, r) : t, a = r.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, o = Object.keys(n), l = 0; l < o.length; ++l) { - var u = o[l], i = bu(u, n[u], r, typeof t == "string"); + for (var n = typeof t == "string" ? gu(t, r) : t, a = r.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, o = Object.keys(n), l = 0; l < o.length; ++l) { + var u = o[l], i = wu(u, n[u], r, typeof t == "string"); a = rt.merge(a, i, r); } return r.allowSparse === !0 ? a : rt.compact(a); -}, Su = du, xu = Eu, Ou = Jr, Gn = { - formats: Ou, - parse: xu, - stringify: Su -}, Pu = { exports: {} }; +}, xu = pu, Ou = Su, Pu = Jr, Gn = { + formats: Pu, + parse: Ou, + stringify: xu +}, Au = { exports: {} }; /* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress * @license MIT */ (function(t, e) { @@ -2080,93 +2080,93 @@ var ba = nt, at = nl, Dl = ml, Nl = Pt, Mt = ba("%WeakMap%", !0), _t = ba("%Map% parent: "body", template: '
' }; - r.configure = function(f) { + r.configure = function(d) { var y, p; - for (y in f) - p = f[y], p !== void 0 && f.hasOwnProperty(y) && (n[y] = p); + for (y in d) + p = d[y], p !== void 0 && d.hasOwnProperty(y) && (n[y] = p); return this; - }, r.status = null, r.set = function(f) { + }, r.status = null, r.set = function(d) { var y = r.isStarted(); - f = a(f, n.minimum, 1), r.status = f === 1 ? null : f; - var p = r.render(!y), m = p.querySelector(n.barSelector), h = n.speed, b = n.easing; + d = a(d, n.minimum, 1), r.status = d === 1 ? null : d; + var p = r.render(!y), m = p.querySelector(n.barSelector), g = n.speed, b = n.easing; return p.offsetWidth, u(function(S) { - n.positionUsing === "" && (n.positionUsing = r.getPositioningCSS()), i(m, l(f, h, b)), f === 1 ? (i(p, { + n.positionUsing === "" && (n.positionUsing = r.getPositioningCSS()), i(m, l(d, g, b)), d === 1 ? (i(p, { transition: "none", opacity: 1 }), p.offsetWidth, setTimeout(function() { i(p, { - transition: "all " + h + "ms linear", + transition: "all " + g + "ms linear", opacity: 0 }), setTimeout(function() { r.remove(), S(); - }, h); - }, h)) : setTimeout(S, h); + }, g); + }, g)) : setTimeout(S, g); }), this; }, r.isStarted = function() { return typeof r.status == "number"; }, r.start = function() { r.status || r.set(0); - var f = function() { + var d = function() { setTimeout(function() { - r.status && (r.trickle(), f()); + r.status && (r.trickle(), d()); }, n.trickleSpeed); }; - return n.trickle && f(), this; - }, r.done = function(f) { - return !f && !r.status ? this : r.inc(0.3 + 0.5 * Math.random()).set(1); - }, r.inc = function(f) { + return n.trickle && d(), this; + }, r.done = function(d) { + return !d && !r.status ? this : r.inc(0.3 + 0.5 * Math.random()).set(1); + }, r.inc = function(d) { var y = r.status; - return y ? (typeof f != "number" && (f = (1 - y) * a(Math.random() * y, 0.1, 0.95)), y = a(y + f, 0, 0.994), r.set(y)) : r.start(); + return y ? (typeof d != "number" && (d = (1 - y) * a(Math.random() * y, 0.1, 0.95)), y = a(y + d, 0, 0.994), r.set(y)) : r.start(); }, r.trickle = function() { return r.inc(Math.random() * n.trickleRate); }, function() { - var f = 0, y = 0; + var d = 0, y = 0; r.promise = function(p) { - return !p || p.state() === "resolved" ? this : (y === 0 && r.start(), f++, y++, p.always(function() { - y--, y === 0 ? (f = 0, r.done()) : r.set((f - y) / f); + return !p || p.state() === "resolved" ? this : (y === 0 && r.start(), d++, y++, p.always(function() { + y--, y === 0 ? (d = 0, r.done()) : r.set((d - y) / d); }), this); }; - }(), r.render = function(f) { + }(), r.render = function(d) { if (r.isRendered()) return document.getElementById("nprogress"); s(document.documentElement, "nprogress-busy"); var y = document.createElement("div"); y.id = "nprogress", y.innerHTML = n.template; - var p = y.querySelector(n.barSelector), m = f ? "-100" : o(r.status || 0), h = document.querySelector(n.parent), b; + var p = y.querySelector(n.barSelector), m = d ? "-100" : o(r.status || 0), g = document.querySelector(n.parent), b; return i(p, { transition: "all 0 linear", transform: "translate3d(" + m + "%,0,0)" - }), n.showSpinner || (b = y.querySelector(n.spinnerSelector), b && w(b)), h != document.body && s(h, "nprogress-custom-parent"), h.appendChild(y), y; + }), n.showSpinner || (b = y.querySelector(n.spinnerSelector), b && w(b)), g != document.body && s(g, "nprogress-custom-parent"), g.appendChild(y), y; }, r.remove = function() { - g(document.documentElement, "nprogress-busy"), g(document.querySelector(n.parent), "nprogress-custom-parent"); - var f = document.getElementById("nprogress"); - f && w(f); + h(document.documentElement, "nprogress-busy"), h(document.querySelector(n.parent), "nprogress-custom-parent"); + var d = document.getElementById("nprogress"); + d && w(d); }, r.isRendered = function() { return !!document.getElementById("nprogress"); }, r.getPositioningCSS = function() { - var f = document.body.style, y = "WebkitTransform" in f ? "Webkit" : "MozTransform" in f ? "Moz" : "msTransform" in f ? "ms" : "OTransform" in f ? "O" : ""; - return y + "Perspective" in f ? "translate3d" : y + "Transform" in f ? "translate" : "margin"; + var d = document.body.style, y = "WebkitTransform" in d ? "Webkit" : "MozTransform" in d ? "Moz" : "msTransform" in d ? "ms" : "OTransform" in d ? "O" : ""; + return y + "Perspective" in d ? "translate3d" : y + "Transform" in d ? "translate" : "margin"; }; - function a(f, y, p) { - return f < y ? y : f > p ? p : f; + function a(d, y, p) { + return d < y ? y : d > p ? p : d; } - function o(f) { - return (-1 + f) * 100; + function o(d) { + return (-1 + d) * 100; } - function l(f, y, p) { + function l(d, y, p) { var m; - return n.positionUsing === "translate3d" ? m = { transform: "translate3d(" + o(f) + "%,0,0)" } : n.positionUsing === "translate" ? m = { transform: "translate(" + o(f) + "%,0)" } : m = { "margin-left": o(f) + "%" }, m.transition = "all " + y + "ms " + p, m; + return n.positionUsing === "translate3d" ? m = { transform: "translate3d(" + o(d) + "%,0,0)" } : n.positionUsing === "translate" ? m = { transform: "translate(" + o(d) + "%,0)" } : m = { "margin-left": o(d) + "%" }, m.transition = "all " + y + "ms " + p, m; } var u = /* @__PURE__ */ function() { - var f = []; + var d = []; function y() { - var p = f.shift(); + var p = d.shift(); p && p(y); } return function(p) { - f.push(p), f.length == 1 && y(); + d.push(p), d.length == 1 && y(); }; }(), i = /* @__PURE__ */ function() { - var f = ["Webkit", "O", "Moz", "ms"], y = {}; + var d = ["Webkit", "O", "Moz", "ms"], y = {}; function p(S) { return S.replace(/^-ms-/, "ms-").replace(/-([\da-z])/gi, function(O, _) { return _.toUpperCase(); @@ -2175,15 +2175,15 @@ var ba = nt, at = nl, Dl = ml, Nl = Pt, Mt = ba("%WeakMap%", !0), _t = ba("%Map% function m(S) { var O = document.body.style; if (S in O) return S; - for (var _ = f.length, M = S.charAt(0).toUpperCase() + S.slice(1), W; _--; ) - if (W = f[_] + M, W in O) return W; + for (var _ = d.length, M = S.charAt(0).toUpperCase() + S.slice(1), W; _--; ) + if (W = d[_] + M, W in O) return W; return S; } - function h(S) { + function g(S) { return S = p(S), y[S] || (y[S] = m(S)); } function b(S, O, _) { - O = h(O), S.style[O] = _; + O = g(O), S.style[O] = _; } return function(S, O) { var _ = arguments, M, W; @@ -2194,105 +2194,105 @@ var ba = nt, at = nl, Dl = ml, Nl = Pt, Mt = ba("%WeakMap%", !0), _t = ba("%Map% b(S, _[1], _[2]); }; }(); - function d(f, y) { - var p = typeof f == "string" ? f : v(f); + function f(d, y) { + var p = typeof d == "string" ? d : v(d); return p.indexOf(" " + y + " ") >= 0; } - function s(f, y) { - var p = v(f), m = p + y; - d(p, y) || (f.className = m.substring(1)); + function s(d, y) { + var p = v(d), m = p + y; + f(p, y) || (d.className = m.substring(1)); } - function g(f, y) { - var p = v(f), m; - d(f, y) && (m = p.replace(" " + y + " ", " "), f.className = m.substring(1, m.length - 1)); + function h(d, y) { + var p = v(d), m; + f(d, y) && (m = p.replace(" " + y + " ", " "), d.className = m.substring(1, m.length - 1)); } - function v(f) { - return (" " + (f.className || "") + " ").replace(/\s+/gi, " "); + function v(d) { + return (" " + (d.className || "") + " ").replace(/\s+/gi, " "); } - function w(f) { - f && f.parentNode && f.parentNode.removeChild(f); + function w(d) { + d && d.parentNode && d.parentNode.removeChild(d); } return r; }); -})(Pu); -function Au(t, e, r, n = "brackets") { - let a = /^https?:\/\//.test(e.toString()), o = a || e.toString().startsWith("/"), l = !o && !e.toString().startsWith("#") && !e.toString().startsWith("?"), u = e.toString().includes("?") || t === "get" && Object.keys(r).length, i = e.toString().includes("#"), d = new URL(e.toString(), "http://localhost"); - return t === "get" && Object.keys(r).length && (d.search = Gn.stringify(li(Gn.parse(d.search, { ignoreQueryPrefix: !0 }), r), { encodeValuesOnly: !0, arrayFormat: n }), r = {}), [[a ? `${d.protocol}//${d.host}` : "", o ? d.pathname : "", l ? d.pathname.substring(1) : "", u ? d.search : "", i ? d.hash : ""].join(""), r]; +})(Au); +function Tu(t, e, r, n = "brackets") { + let a = /^https?:\/\//.test(e.toString()), o = a || e.toString().startsWith("/"), l = !o && !e.toString().startsWith("#") && !e.toString().startsWith("?"), u = e.toString().includes("?") || t === "get" && Object.keys(r).length, i = e.toString().includes("#"), f = new URL(e.toString(), "http://localhost"); + return t === "get" && Object.keys(r).length && (f.search = Gn.stringify(ui(Gn.parse(f.search, { ignoreQueryPrefix: !0 }), r), { encodeValuesOnly: !0, arrayFormat: n }), r = {}), [[a ? `${f.protocol}//${f.host}` : "", o ? f.pathname : "", l ? f.pathname.substring(1) : "", u ? f.search : "", i ? f.hash : ""].join(""), r]; } -const zt = ce(null); +const zt = fe(null); zt.displayName = "ModalStackContext"; let Aa = null, Ta = null, Dr = null, Nr = null, Yn = []; -const Tu = ({ children: t }) => { +const $u = ({ children: t }) => { const [e, r] = Q([]), [n, a] = Q({}), o = (y) => { r((p) => { - const m = y([...p]), h = (b) => { + const m = y([...p]), g = (b) => { var S; return m.length < 2 ? !0 : ((S = m.map((O) => ({ id: O.id, shouldRender: O.shouldRender })).reverse().find((O) => O.shouldRender)) == null ? void 0 : S.id) === b; }; return m.forEach((b, S) => { - m[S].onTopOfStack = h(b.id), m[S].getParentModal = () => S < 1 ? null : m.slice(0, S).reverse().find((O) => O.isOpen), m[S].getChildModal = () => S === m.length - 1 ? null : m.slice(S + 1).find((O) => O.isOpen); + m[S].onTopOfStack = g(b.id), m[S].getParentModal = () => S < 1 ? null : m.slice(0, S).reverse().find((O) => O.isOpen), m[S].getChildModal = () => S === m.length - 1 ? null : m.slice(S + 1).find((O) => O.isOpen); }), m; }); }; - K(() => { + Y(() => { Yn = e; }, [e]); class l { - constructor(p, m, h, b, S) { - ye(this, "update", (p, m, h) => { + constructor(p, m, g, b, S) { + ce(this, "update", (p, m, g) => { o( - (b) => b.map((S) => (S.id === this.id && (S.config = p, S.onCloseCallback = m, S.afterLeaveCallback = h), S)) + (b) => b.map((S) => (S.id === this.id && (S.config = p, S.onCloseCallback = m, S.afterLeaveCallback = g), S)) ); }); - ye(this, "show", () => { + ce(this, "show", () => { o( (p) => p.map((m) => (m.id === this.id && !m.isOpen && (m.isOpen = !0, m.shouldRender = !0), m)) ); }); - ye(this, "setOpen", (p) => { + ce(this, "setOpen", (p) => { p ? this.show() : this.close(); }); - ye(this, "close", () => { + ce(this, "close", () => { o( (p) => p.map((m) => { - var h; + var g; return m.id === this.id && m.isOpen && (Object.keys(m.listeners).forEach((b) => { m.off(b); - }), m.isOpen = !1, (h = m.onCloseCallback) == null || h.call(m)), m; + }), m.isOpen = !1, (g = m.onCloseCallback) == null || g.call(m)), m; }) ); }); - ye(this, "afterLeave", () => { + ce(this, "afterLeave", () => { this.isOpen || o((p) => { - const m = p.map((h) => { + const m = p.map((g) => { var b; - return h.id === this.id && !h.isOpen && (h.shouldRender = !1, (b = h.afterLeaveCallback) == null || b.call(h), h.afterLeaveCallback = null), h; + return g.id === this.id && !g.isOpen && (g.shouldRender = !1, (b = g.afterLeaveCallback) == null || b.call(g), g.afterLeaveCallback = null), g; }); return this.index === 0 ? [] : m; }); }); - ye(this, "on", (p, m) => { + ce(this, "on", (p, m) => { this.listeners[p] = this.listeners[p] ?? [], this.listeners[p].push(m); }); - ye(this, "off", (p, m) => { - var h; - m ? this.listeners[p] = ((h = this.listeners[p]) == null ? void 0 : h.filter((b) => b !== m)) ?? [] : delete this.listeners[p]; + ce(this, "off", (p, m) => { + var g; + m ? this.listeners[p] = ((g = this.listeners[p]) == null ? void 0 : g.filter((b) => b !== m)) ?? [] : delete this.listeners[p]; }); - ye(this, "emit", (p, ...m) => { - var h; - (h = this.listeners[p]) == null || h.forEach((b) => b(...m)); + ce(this, "emit", (p, ...m) => { + var g; + (g = this.listeners[p]) == null || g.forEach((b) => b(...m)); }); - ye(this, "registerEventListenersFromProps", (p) => { + ce(this, "registerEventListenersFromProps", (p) => { const m = []; - return Object.keys(p).filter((h) => h.startsWith("on")).forEach((h) => { - const b = h.replace(/^on/, "").replace(/^./, (S) => S.toLowerCase()).replace(/([A-Z])/g, "-$1").toLowerCase(); - this.on(b, p[h]), m.push(() => this.off(b, p[h])); - }), () => m.forEach((h) => h()); + return Object.keys(p).filter((g) => g.startsWith("on")).forEach((g) => { + const b = g.replace(/^on/, "").replace(/^./, (S) => S.toLowerCase()).replace(/([A-Z])/g, "-$1").toLowerCase(); + this.on(b, p[g]), m.push(() => this.off(b, p[g])); + }), () => m.forEach((g) => g()); }); - ye(this, "reload", (p = {}) => { - var h; + ce(this, "reload", (p = {}) => { + var g; let m = Object.keys(this.response.props); - p.only && (m = aa(m, p.only)), p.except && (m = Vo(m, p.except)), (h = this.response) != null && h.url && jt.get(this.response.url, { + p.only && (m = aa(m, p.only)), p.except && (m = qo(m, p.except)), (g = this.response) != null && g.url && jt.get(this.response.url, { headers: { Accept: "text/html, application/xhtml+xml", "X-Inertia": !0, @@ -2303,26 +2303,29 @@ const Tu = ({ children: t }) => { "X-InertiaUI-Modal-Use-Router": 0 } }).then((b) => { - Object.assign(this.props, b.data.props), o((S) => S); + this.updateProps(b.data.props); }); }); - this.id = l.generateId(), this.isOpen = !1, this.shouldRender = !1, this.listeners = {}, this.component = p, this.props = m.props, this.response = m, this.config = h, this.onCloseCallback = b, this.afterLeaveCallback = S, this.index = -1, this.getParentModal = () => null, this.getChildModal = () => null, this.onTopOfStack = !0; + ce(this, "updateProps", (p) => { + Object.assign(this.props, p), o((m) => m); + }); + this.id = l.generateId(), this.isOpen = !1, this.shouldRender = !1, this.listeners = {}, this.component = p, this.props = m.props, this.response = m, this.config = g, this.onCloseCallback = b, this.afterLeaveCallback = S, this.index = -1, this.getParentModal = () => null, this.getChildModal = () => null, this.onTopOfStack = !0; } static generateId() { return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? `inertiaui_modal_${crypto.randomUUID()}` : `inertiaui_modal_${Date.now().toString(36)}_${Math.random().toString(36).substr(2, 9)}`; } } - const u = (y, p = {}, m = null, h = null) => Ta(y.component).then((b) => i(b, y, p, m, h)), i = (y, p, m, h, b) => { - const S = new l(y, p, m, h, b); + const u = (y, p = {}, m = null, g = null) => Ta(y.component).then((b) => i(b, y, p, m, g)), i = (y, p, m, g, b) => { + const S = new l(y, p, m, g, b); return S.index = e.length, o((O) => [...O, S]), S.show(), S; }; - function d(y, p, m, h) { + function f(y, p, m, g) { if (!n[y]) throw new Error(`The local modal "${y}" has not been registered.`); - const b = i(null, {}, p, m, h); + const b = i(null, {}, p, m, g); return b.name = y, n[y].callback(b), b; } - const s = (y, p = {}) => g( + const s = (y, p = {}) => h( y, p.method ?? "get", p.data ?? {}, @@ -2332,15 +2335,15 @@ const Tu = ({ children: t }) => { p.onAfterLeave, p.queryStringArrayFormat ?? "brackets", p.navigate ?? Vr("navigate") - ), g = (y, p, m = {}, h = {}, b = {}, S = null, O = null, _ = "brackets", M = !1) => new Promise((W, H) => { + ), h = (y, p, m = {}, g = {}, b = {}, S = null, O = null, _ = "brackets", M = !1) => new Promise((W, H) => { if (y.startsWith("#")) { - W(d(y.substring(1), b, S, O)); + W(f(y.substring(1), b, S, O)); return; } - const [k, Y] = Au(p, y || "", m, _); + const [j, z] = Tu(p, y || "", m, _); let V = M && e.length === 0; - if (e.length === 0 && (Dr = typeof window < "u" ? window.location.href : ""), h = { - ...h, + if (e.length === 0 && (Dr = typeof window < "u" ? window.location.href : ""), g = { + ...g, Accept: "text/html, application/xhtml+xml", "X-Requested-With": "XMLHttpRequest", "X-Inertia": !0, @@ -2348,15 +2351,15 @@ const Tu = ({ children: t }) => { "X-InertiaUI-Modal": !0, "X-InertiaUI-Modal-Use-Router": V ? 1 : 0 }, V) - return vt.visit(k, { + return Nr = null, vt.visit(j, { method: p, - data: Y, - headers: h, + data: z, + headers: g, preserveScroll: !0, preserveState: !0, onError: H, onFinish: () => { - Go(() => Nr).then(($) => { + Yo(() => Nr).then(($) => { const T = $.onCloseCallback, D = $.afterLeaveCallback; $.update( b, @@ -2366,19 +2369,19 @@ const Tu = ({ children: t }) => { () => { O == null || O(), D == null || D(); } - ), W($), Nr = null; + ), W($); }); } }); jt({ - url: k, + url: j, method: p, - data: Y, - headers: h + data: z, + headers: g }).then(($) => W(u($.data, b, S, O))).catch(($) => { H($); }); - }), f = { + }), d = { stack: e, localModals: n, push: i, @@ -2387,7 +2390,7 @@ const Tu = ({ children: t }) => { Yn.reverse().forEach((y) => y.close()); }, reset: () => o(() => []), - visit: g, + visit: h, visitModal: s, registerLocalModal: (y, p) => { a((m) => ({ @@ -2402,52 +2405,59 @@ const Tu = ({ children: t }) => { }); } }; - return /* @__PURE__ */ R.jsx(zt.Provider, { value: f, children: t }); + return /* @__PURE__ */ R.jsx(zt.Provider, { value: d, children: t }); }, Kt = () => { const t = ie(zt); if (t === null) throw new Error("useModalStack must be used within a ModalStackProvider"); return t; -}, zn = ["closeButton", "closeExplicitly", "maxWidth", "paddingClasses", "panelClasses", "position", "slideover"], Pc = (t, e) => { +}, zn = ["closeButton", "closeExplicitly", "maxWidth", "paddingClasses", "panelClasses", "position", "slideover"], Ac = (t, e) => { e.initialPage && (Aa = e.initialPage.version), e.resolveComponent && (Ta = e.resolveComponent); const r = ({ Component: n, props: a, key: o }) => { const l = () => { const u = Pr(n, { key: o, ...a }); - return typeof n.layout == "function" ? n.layout(u) : Array.isArray(n.layout) ? n.layout.concat(u).reverse().reduce((d, s) => Pr(s, a, d)) : u; + return typeof n.layout == "function" ? n.layout(u) : Array.isArray(n.layout) ? n.layout.concat(u).reverse().reduce((f, s) => Pr(s, a, f)) : u; }; return /* @__PURE__ */ R.jsxs(R.Fragment, { children: [ l(), - /* @__PURE__ */ R.jsx($u, {}) + /* @__PURE__ */ R.jsx(Ru, {}) ] }); }; - return /* @__PURE__ */ R.jsx(Tu, { children: /* @__PURE__ */ R.jsx(t, { ...e, children: r }) }); -}, $u = ({ children: t }) => { + return /* @__PURE__ */ R.jsx($u, { children: /* @__PURE__ */ R.jsx(t, { ...e, children: r }) }); +}, Ru = ({ children: t }) => { + var u; const e = ie(zt); let r = !1, n = !1; - K(() => vt.on("start", () => r = !0), []), K(() => vt.on("finish", () => r = !1), []), K( - () => vt.on("navigate", function(o) { - const l = o.detail.page.props._inertiaui_modal; - if (!l) { + Y(() => vt.on("start", () => r = !0), []), Y(() => vt.on("finish", () => r = !1), []), Y( + () => vt.on("navigate", function(i) { + const f = i.detail.page.props._inertiaui_modal; + if (!f) { n && e.closeAll(); return; } - n = l, Dr = l.baseUrl, e.pushFromResponseData(l, {}, () => { - if (!l.baseUrl) { + n = f, Dr = f.baseUrl, e.pushFromResponseData(f, {}, () => { + if (!f.baseUrl) { console.error("No base url in modal response data so cannot navigate back"); return; } - !r && window.location.href !== l.baseUrl && vt.visit(l.baseUrl, { + !r && window.location.href !== f.baseUrl && vt.visit(f.baseUrl, { preserveScroll: !0, preserveState: !0 }); - }).then((u) => { - Nr = u; + }).then((s) => { + Nr = s; }); }), [] ); - const a = (o) => (o.headers["X-InertiaUI-Modal-Base-Url"] = Dr, o); - return K(() => (jt.interceptors.request.use(a), () => jt.interceptors.request.eject(a)), []), /* @__PURE__ */ R.jsxs(R.Fragment, { children: [ + const a = (i) => (i.headers["X-InertiaUI-Modal-Base-Url"] = Dr, i); + Y(() => (jt.interceptors.request.use(a), () => jt.interceptors.request.eject(a)), []); + const o = jo(), l = k(); + return Y(() => { + var s, h; + const i = (s = o.props) == null ? void 0 : s._inertiaui_modal, f = l.current; + l.current = i, i && f && i.component === f.component && i.url === f.url && ((h = e.stack[0]) == null || h.updateProps(i.props ?? {})); + }, [(u = o.props) == null ? void 0 : u._inertiaui_modal]), /* @__PURE__ */ R.jsxs(R.Fragment, { children: [ t, e.stack.length > 0 && /* @__PURE__ */ R.jsx(Ra, { index: 0 }) ] }); @@ -2468,9 +2478,9 @@ const $a = () => { } ) }); }, Fa = Hr(({ name: t, children: e, ...r }, n) => { - const a = $a(), { stack: o, registerLocalModal: l, removeLocalModal: u } = Kt(), [i, d] = Q(null), s = J(() => t ? i : o[a], [t, i, a, o]), g = J(() => { - var f; - return (f = o.find((y) => y.shouldRender && y.index > (s == null ? void 0 : s.index))) == null ? void 0 : f.index; + const a = $a(), { stack: o, registerLocalModal: l, removeLocalModal: u } = Kt(), [i, f] = Q(null), s = J(() => t ? i : o[a], [t, i, a, o]), h = J(() => { + var d; + return (d = o.find((y) => y.shouldRender && y.index > (s == null ? void 0 : s.index))) == null ? void 0 : d.index; }, [a, o]), v = J(() => (s == null ? void 0 : s.config.slideover) ?? r.slideover ?? Vr("type") === "slideover", [r.slideover]), w = J( () => ({ slideover: v, @@ -2484,13 +2494,13 @@ const $a = () => { }), [r, s == null ? void 0 : s.config] ); - return K(() => { + return Y(() => { if (t) { - let f = null; + let d = null; return l(t, (y) => { - f = y.registerEventListenersFromProps(r), d(y); + d = y.registerEventListenersFromProps(r), f(y); }), () => { - f == null || f(), f = null, u(t); + d == null || d(), d = null, u(t); }; } return s.registerEventListenersFromProps(r); @@ -2500,7 +2510,7 @@ const $a = () => { afterLeave: () => s.afterLeave(), close: () => s.close(), config: w, - emit: (...f) => s.emit(...f), + emit: (...d) => s.emit(...d), getChildModal: () => s.getChildModal(), getParentModal: () => s.getParentModal(), id: s == null ? void 0 : s.id, @@ -2530,7 +2540,7 @@ const $a = () => { setOpen: s.setOpen, shouldRender: s.shouldRender }) : e, - g && /* @__PURE__ */ R.jsx(Ra, { index: g }) + h && /* @__PURE__ */ R.jsx(Ra, { index: h }) ] }); }); Fa.displayName = "HeadlessModal"; @@ -2547,8 +2557,8 @@ function Ht() { for (var t, e, r = 0, n = "", a = arguments.length; r < a; r++) (t = arguments[r]) && (e = Ca(t)) && (n && (n += " "), n += e); return n; } -var Ru = Object.defineProperty, Fu = (t, e, r) => e in t ? Ru(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, xr = (t, e, r) => (Fu(t, typeof e != "symbol" ? e + "" : e, r), r); -let Cu = class { +var Fu = Object.defineProperty, Cu = (t, e, r) => e in t ? Fu(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, xr = (t, e, r) => (Cu(t, typeof e != "symbol" ? e + "" : e, r), r); +let Iu = class { constructor() { xr(this, "current", this.detect()), xr(this, "handoffState", "pending"), xr(this, "currentId", 0); } @@ -2576,7 +2586,7 @@ let Cu = class { get isHandoffComplete() { return this.handoffState === "complete"; } -}, Ve = new Cu(); +}, Ve = new Iu(); function Xt(t) { return Ve.isServer ? null : t instanceof Node ? t.ownerDocument : t != null && t.hasOwnProperty("current") && t.current instanceof Node ? t.current.ownerDocument : document; } @@ -2623,13 +2633,13 @@ function Me() { } function Zr() { let [t] = Q(Me); - return K(() => () => t.dispose(), [t]), t; + return Y(() => () => t.dispose(), [t]), t; } let ae = (t, e) => { - Ve.isServer ? K(t, e) : Io(t, e); + Ve.isServer ? Y(t, e) : Io(t, e); }; function qe(t) { - let e = j(t); + let e = k(t); return ae(() => { e.current = t; }, [t]), e; @@ -2637,9 +2647,9 @@ function qe(t) { let U = function(t) { let e = qe(t); return A.useCallback((...r) => e.current(...r), [e]); -}, Iu = ce(void 0); -function Mu() { - return ie(Iu); +}, Mu = fe(void 0); +function _u() { + return ie(Mu); } function kr(...t) { return Array.from(new Set(t.flatMap((e) => typeof e == "string" ? e.split(" ") : []))).filter(Boolean).join(" "); @@ -2653,62 +2663,62 @@ function Ce(t, e, ...r) { throw Error.captureStackTrace && Error.captureStackTrace(n, Ce), n; } var Vt = ((t) => (t[t.None = 0] = "None", t[t.RenderStrategy = 1] = "RenderStrategy", t[t.Static = 2] = "Static", t))(Vt || {}), Fe = ((t) => (t[t.Unmount = 0] = "Unmount", t[t.Hidden = 1] = "Hidden", t))(Fe || {}); -function fe() { - let t = Du(); - return ve((e) => _u({ mergeRefs: t, ...e }), [t]); +function de() { + let t = Nu(); + return ve((e) => Du({ mergeRefs: t, ...e }), [t]); } -function _u({ ourProps: t, theirProps: e, slot: r, defaultTag: n, features: a, visible: o = !0, name: l, mergeRefs: u }) { - u = u ?? Nu; +function Du({ ourProps: t, theirProps: e, slot: r, defaultTag: n, features: a, visible: o = !0, name: l, mergeRefs: u }) { + u = u ?? ku; let i = Ia(e, t); if (o) return Dt(i, r, n, l, u); - let d = a ?? 0; - if (d & 2) { - let { static: s = !1, ...g } = i; - if (s) return Dt(g, r, n, l, u); + let f = a ?? 0; + if (f & 2) { + let { static: s = !1, ...h } = i; + if (s) return Dt(h, r, n, l, u); } - if (d & 1) { - let { unmount: s = !0, ...g } = i; + if (f & 1) { + let { unmount: s = !0, ...h } = i; return Ce(s ? 0 : 1, { 0() { return null; }, 1() { - return Dt({ ...g, hidden: !0, style: { display: "none" } }, r, n, l, u); + return Dt({ ...h, hidden: !0, style: { display: "none" } }, r, n, l, u); } }); } return Dt(i, r, n, l, u); } function Dt(t, e = {}, r, n, a) { - let { as: o = r, children: l, refName: u = "ref", ...i } = Or(t, ["unmount", "static"]), d = t.ref !== void 0 ? { [u]: t.ref } : {}, s = typeof l == "function" ? l(e) : l; + let { as: o = r, children: l, refName: u = "ref", ...i } = Or(t, ["unmount", "static"]), f = t.ref !== void 0 ? { [u]: t.ref } : {}, s = typeof l == "function" ? l(e) : l; "className" in i && i.className && typeof i.className == "function" && (i.className = i.className(e)), i["aria-labelledby"] && i["aria-labelledby"] === i.id && (i["aria-labelledby"] = void 0); - let g = {}; + let h = {}; if (e) { let v = !1, w = []; - for (let [f, y] of Object.entries(e)) typeof y == "boolean" && (v = !0), y === !0 && w.push(f.replace(/([A-Z])/g, (p) => `-${p.toLowerCase()}`)); + for (let [d, y] of Object.entries(e)) typeof y == "boolean" && (v = !0), y === !0 && w.push(d.replace(/([A-Z])/g, (p) => `-${p.toLowerCase()}`)); if (v) { - g["data-headlessui-state"] = w.join(" "); - for (let f of w) g[`data-${f}`] = ""; + h["data-headlessui-state"] = w.join(" "); + for (let d of w) h[`data-${d}`] = ""; } } - if (o === he && (Object.keys(je(i)).length > 0 || Object.keys(je(g)).length > 0)) if (!Mo(s) || Array.isArray(s) && s.length > 1) { - if (Object.keys(je(i)).length > 0) throw new Error(['Passing props on "Fragment"!', "", `The current component <${n} /> is rendering a "Fragment".`, "However we need to passthrough the following props:", Object.keys(je(i)).concat(Object.keys(je(g))).map((v) => ` - ${v}`).join(` + if (o === he && (Object.keys(je(i)).length > 0 || Object.keys(je(h)).length > 0)) if (!Mo(s) || Array.isArray(s) && s.length > 1) { + if (Object.keys(je(i)).length > 0) throw new Error(['Passing props on "Fragment"!', "", `The current component <${n} /> is rendering a "Fragment".`, "However we need to passthrough the following props:", Object.keys(je(i)).concat(Object.keys(je(h))).map((v) => ` - ${v}`).join(` `), "", "You can apply a few solutions:", ['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".', "Render a single element as the child so that we can forward the props onto that element."].map((v) => ` - ${v}`).join(` `)].join(` `)); } else { - let v = s.props, w = v == null ? void 0 : v.className, f = typeof w == "function" ? (...m) => kr(w(...m), i.className) : kr(w, i.className), y = f ? { className: f } : {}, p = Ia(s.props, je(Or(i, ["ref"]))); - for (let m in g) m in p && delete g[m]; - return _o(s, Object.assign({}, p, g, d, { ref: a(s.ref, d.ref) }, y)); + let v = s.props, w = v == null ? void 0 : v.className, d = typeof w == "function" ? (...m) => kr(w(...m), i.className) : kr(w, i.className), y = d ? { className: d } : {}, p = Ia(s.props, je(Or(i, ["ref"]))); + for (let m in h) m in p && delete h[m]; + return _o(s, Object.assign({}, p, h, f, { ref: a(s.ref, f.ref) }, y)); } - return Pr(o, Object.assign({}, Or(i, ["ref"]), o !== he && d, o !== he && g), s); + return Pr(o, Object.assign({}, Or(i, ["ref"]), o !== he && f, o !== he && h), s); } -function Du() { - let t = j([]), e = ve((r) => { +function Nu() { + let t = k([]), e = ve((r) => { for (let n of t.current) n != null && (typeof n == "function" ? n(r) : n.current = r); }, []); return (...r) => { if (!r.every((n) => n == null)) return t.current = r, e; }; } -function Nu(...t) { +function ku(...t) { return t.every((e) => e == null) ? void 0 : (e) => { for (let r of t) r != null && (typeof r == "function" ? r(e) : r.current = e); }; @@ -2745,20 +2755,20 @@ function Or(t, e = []) { for (let n of e) n in r && delete r[n]; return r; } -let ku = "span"; +let ju = "span"; var qt = ((t) => (t[t.None = 1] = "None", t[t.Focusable = 2] = "Focusable", t[t.Hidden = 4] = "Hidden", t))(qt || {}); -function ju(t, e) { +function Lu(t, e) { var r; let { features: n = 1, ...a } = t, o = { ref: e, "aria-hidden": (n & 2) === 2 ? !0 : (r = a["aria-hidden"]) != null ? r : void 0, hidden: (n & 4) === 4 ? !0 : void 0, style: { position: "fixed", top: 1, left: 1, width: 1, height: 0, padding: 0, margin: -1, overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0", ...(n & 4) === 4 && (n & 2) !== 2 && { display: "none" } } }; - return fe()({ ourProps: o, theirProps: a, slot: {}, defaultTag: ku, name: "Hidden" }); + return de()({ ourProps: o, theirProps: a, slot: {}, defaultTag: ju, name: "Hidden" }); } -let jr = le(ju), Ma = Symbol(); -function Lu(t, e = !0) { +let jr = le(Lu), Ma = Symbol(); +function Wu(t, e = !0) { return Object.assign(t, { [Ma]: e }); } function Se(...t) { - let e = j(t); - K(() => { + let e = k(t); + Y(() => { e.current = t; }, [t]); let r = U((n) => { @@ -2766,7 +2776,7 @@ function Se(...t) { }); return t.every((n) => n == null || (n == null ? void 0 : n[Ma])) ? void 0 : r; } -let en = ce(null); +let en = fe(null); en.displayName = "DescriptionContext"; function _a() { let t = ie(en); @@ -2776,7 +2786,7 @@ function _a() { } return t; } -function Wu() { +function Uu() { let [t, e] = Q([]); return [t.length > 0 ? t.join(" ") : void 0, J(() => function(r) { let n = U((o) => (e((l) => [...l, o]), () => e((l) => { @@ -2786,21 +2796,21 @@ function Wu() { return A.createElement(en.Provider, { value: a }, r.children); }, [e])]; } -let Uu = "p"; -function Bu(t, e) { - let r = Ot(), n = Mu(), { id: a = `headlessui-description-${r}`, ...o } = t, l = _a(), u = Se(e); +let Bu = "p"; +function Hu(t, e) { + let r = Ot(), n = _u(), { id: a = `headlessui-description-${r}`, ...o } = t, l = _a(), u = Se(e); ae(() => l.register(a), [a, l.register]); - let i = n || !1, d = J(() => ({ ...l.slot, disabled: i }), [l.slot, i]), s = { ref: u, ...l.props, id: a }; - return fe()({ ourProps: s, theirProps: o, slot: d, defaultTag: Uu, name: l.name || "Description" }); + let i = n || !1, f = J(() => ({ ...l.slot, disabled: i }), [l.slot, i]), s = { ref: u, ...l.props, id: a }; + return de()({ ourProps: s, theirProps: o, slot: f, defaultTag: Bu, name: l.name || "Description" }); } -let Hu = le(Bu), Vu = Object.assign(Hu, {}); +let Vu = le(Hu), qu = Object.assign(Vu, {}); var Da = ((t) => (t.Space = " ", t.Enter = "Enter", t.Escape = "Escape", t.Backspace = "Backspace", t.Delete = "Delete", t.ArrowLeft = "ArrowLeft", t.ArrowUp = "ArrowUp", t.ArrowRight = "ArrowRight", t.ArrowDown = "ArrowDown", t.Home = "Home", t.End = "End", t.PageUp = "PageUp", t.PageDown = "PageDown", t.Tab = "Tab", t))(Da || {}); -let qu = ce(() => { +let Gu = fe(() => { }); -function Gu({ value: t, children: e }) { - return A.createElement(qu.Provider, { value: t }, e); +function Yu({ value: t, children: e }) { + return A.createElement(Gu.Provider, { value: t }, e); } -let Yu = class extends Map { +let zu = class extends Map { constructor(e) { super(), this.factory = e; } @@ -2823,7 +2833,7 @@ function Na(t, e) { function ka(t) { return Do(t.subscribe, t.getSnapshot, t.getSnapshot); } -let zu = new Yu(() => Na(() => [], { ADD(t) { +let Ku = new zu(() => Na(() => [], { ADD(t) { return this.includes(t) ? this : [...this, t]; }, REMOVE(t) { let e = this.indexOf(t); @@ -2832,7 +2842,7 @@ let zu = new Yu(() => Na(() => [], { ADD(t) { return r.splice(e, 1), r; } })); function ot(t, e) { - let r = zu.get(e), n = Ot(), a = ka(r); + let r = Ku.get(e), n = Ot(), a = ka(r); if (ae(() => { if (t) return r.dispatch("ADD", n), () => r.dispatch("REMOVE", n); }, [r, t]), !t) return !1; @@ -2852,7 +2862,7 @@ function Xn(t) { let n = Lr.get(t); n && (n["aria-hidden"] === null ? t.removeAttribute("aria-hidden") : t.setAttribute("aria-hidden", n["aria-hidden"]), t.inert = n.inert, Lr.delete(t)); } -function Ku(t, { allowed: e, disallowed: r } = {}) { +function Xu(t, { allowed: e, disallowed: r } = {}) { let n = ot(t, "inert-others"); ae(() => { var a, o; @@ -2862,23 +2872,23 @@ function Ku(t, { allowed: e, disallowed: r } = {}) { let u = (o = e == null ? void 0 : e()) != null ? o : []; for (let i of u) { if (!i) continue; - let d = Xt(i); - if (!d) continue; + let f = Xt(i); + if (!f) continue; let s = i.parentElement; - for (; s && s !== d.body; ) { - for (let g of s.children) u.some((v) => g.contains(v)) || l.add(Kn(g)); + for (; s && s !== f.body; ) { + for (let h of s.children) u.some((v) => h.contains(v)) || l.add(Kn(h)); s = s.parentElement; } } return l.dispose; }, [n, e, r]); } -function Xu(t, e, r) { +function Ju(t, e, r) { let n = qe((a) => { let o = a.getBoundingClientRect(); o.x === 0 && o.y === 0 && o.width === 0 && o.height === 0 && r(); }); - K(() => { + Y(() => { if (!t) return; let a = e === null ? null : e instanceof HTMLElement ? e : e.current; if (!a) return; @@ -2894,16 +2904,16 @@ function Xu(t, e, r) { return () => o.dispose(); }, [e, n, t]); } -let Gt = ["[contentEditable=true]", "[tabindex]", "a[href]", "area[href]", "button:not([disabled])", "iframe", "input:not([disabled])", "select:not([disabled])", "textarea:not([disabled])"].map((t) => `${t}:not([tabindex='-1'])`).join(","), Ju = ["[data-autofocus]"].map((t) => `${t}:not([tabindex='-1'])`).join(","); -var Pe = ((t) => (t[t.First = 1] = "First", t[t.Previous = 2] = "Previous", t[t.Next = 4] = "Next", t[t.Last = 8] = "Last", t[t.WrapAround = 16] = "WrapAround", t[t.NoScroll = 32] = "NoScroll", t[t.AutoFocus = 64] = "AutoFocus", t))(Pe || {}), Wr = ((t) => (t[t.Error = 0] = "Error", t[t.Overflow = 1] = "Overflow", t[t.Success = 2] = "Success", t[t.Underflow = 3] = "Underflow", t))(Wr || {}), Qu = ((t) => (t[t.Previous = -1] = "Previous", t[t.Next = 1] = "Next", t))(Qu || {}); -function Zu(t = document.body) { +let Gt = ["[contentEditable=true]", "[tabindex]", "a[href]", "area[href]", "button:not([disabled])", "iframe", "input:not([disabled])", "select:not([disabled])", "textarea:not([disabled])"].map((t) => `${t}:not([tabindex='-1'])`).join(","), Qu = ["[data-autofocus]"].map((t) => `${t}:not([tabindex='-1'])`).join(","); +var Pe = ((t) => (t[t.First = 1] = "First", t[t.Previous = 2] = "Previous", t[t.Next = 4] = "Next", t[t.Last = 8] = "Last", t[t.WrapAround = 16] = "WrapAround", t[t.NoScroll = 32] = "NoScroll", t[t.AutoFocus = 64] = "AutoFocus", t))(Pe || {}), Wr = ((t) => (t[t.Error = 0] = "Error", t[t.Overflow = 1] = "Overflow", t[t.Success = 2] = "Success", t[t.Underflow = 3] = "Underflow", t))(Wr || {}), Zu = ((t) => (t[t.Previous = -1] = "Previous", t[t.Next = 1] = "Next", t))(Zu || {}); +function es(t = document.body) { return t == null ? [] : Array.from(t.querySelectorAll(Gt)).sort((e, r) => Math.sign((e.tabIndex || Number.MAX_SAFE_INTEGER) - (r.tabIndex || Number.MAX_SAFE_INTEGER))); } -function es(t = document.body) { - return t == null ? [] : Array.from(t.querySelectorAll(Ju)).sort((e, r) => Math.sign((e.tabIndex || Number.MAX_SAFE_INTEGER) - (r.tabIndex || Number.MAX_SAFE_INTEGER))); +function ts(t = document.body) { + return t == null ? [] : Array.from(t.querySelectorAll(Qu)).sort((e, r) => Math.sign((e.tabIndex || Number.MAX_SAFE_INTEGER) - (r.tabIndex || Number.MAX_SAFE_INTEGER))); } var ja = ((t) => (t[t.Strict = 0] = "Strict", t[t.Loose = 1] = "Loose", t))(ja || {}); -function ts(t, e = 0) { +function rs(t, e = 0) { var r; return t === ((r = Xt(t)) == null ? void 0 : r.body) ? !1 : Ce(e, { 0() { return t.matches(Gt); @@ -2916,7 +2926,7 @@ function ts(t, e = 0) { return !1; } }); } -var rs = ((t) => (t[t.Keyboard = 0] = "Keyboard", t[t.Mouse = 1] = "Mouse", t))(rs || {}); +var ns = ((t) => (t[t.Keyboard = 0] = "Keyboard", t[t.Mouse = 1] = "Mouse", t))(ns || {}); typeof window < "u" && typeof document < "u" && (document.addEventListener("keydown", (t) => { t.metaKey || t.altKey || t.ctrlKey || (document.documentElement.dataset.headlessuiFocusVisible = ""); }, !0), document.addEventListener("click", (t) => { @@ -2925,12 +2935,12 @@ typeof window < "u" && typeof document < "u" && (document.addEventListener("keyd function Ae(t) { t == null || t.focus({ preventScroll: !0 }); } -let ns = ["textarea", "input"].join(","); -function as(t) { +let as = ["textarea", "input"].join(","); +function os(t) { var e, r; - return (r = (e = t == null ? void 0 : t.matches) == null ? void 0 : e.call(t, ns)) != null ? r : !1; + return (r = (e = t == null ? void 0 : t.matches) == null ? void 0 : e.call(t, as)) != null ? r : !1; } -function os(t, e = (r) => r) { +function is(t, e = (r) => r) { return t.slice().sort((r, n) => { let a = e(r), o = e(n); if (a === null || o === null) return 0; @@ -2939,8 +2949,8 @@ function os(t, e = (r) => r) { }); } function St(t, e, { sorted: r = !0, relativeTo: n = null, skipElements: a = [] } = {}) { - let o = Array.isArray(t) ? t.length > 0 ? t[0].ownerDocument : document : t.ownerDocument, l = Array.isArray(t) ? r ? os(t) : t : e & 64 ? es(t) : Zu(t); - a.length > 0 && l.length > 1 && (l = l.filter((w) => !a.some((f) => f != null && "current" in f ? (f == null ? void 0 : f.current) === w : f === w))), n = n ?? o.activeElement; + let o = Array.isArray(t) ? t.length > 0 ? t[0].ownerDocument : document : t.ownerDocument, l = Array.isArray(t) ? r ? is(t) : t : e & 64 ? ts(t) : es(t); + a.length > 0 && l.length > 1 && (l = l.filter((w) => !a.some((d) => d != null && "current" in d ? (d == null ? void 0 : d.current) === w : d === w))), n = n ?? o.activeElement; let u = (() => { if (e & 5) return 1; if (e & 10) return -1; @@ -2951,31 +2961,31 @@ function St(t, e, { sorted: r = !0, relativeTo: n = null, skipElements: a = [] } if (e & 4) return Math.max(0, l.indexOf(n)) + 1; if (e & 8) return l.length - 1; throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last"); - })(), d = e & 32 ? { preventScroll: !0 } : {}, s = 0, g = l.length, v; + })(), f = e & 32 ? { preventScroll: !0 } : {}, s = 0, h = l.length, v; do { - if (s >= g || s + g <= 0) return 0; + if (s >= h || s + h <= 0) return 0; let w = i + s; - if (e & 16) w = (w + g) % g; + if (e & 16) w = (w + h) % h; else { if (w < 0) return 3; - if (w >= g) return 1; + if (w >= h) return 1; } - v = l[w], v == null || v.focus(d), s += u; + v = l[w], v == null || v.focus(f), s += u; } while (v !== o.activeElement); - return e & 6 && as(v) && v.select(), 2; + return e & 6 && os(v) && v.select(), 2; } function La() { return /iPhone/gi.test(window.navigator.platform) || /Mac/gi.test(window.navigator.platform) && window.navigator.maxTouchPoints > 0; } -function is() { +function ls() { return /Android/gi.test(window.navigator.userAgent); } -function ls() { - return La() || is(); +function us() { + return La() || ls(); } function yt(t, e, r, n) { let a = qe(r); - K(() => { + Y(() => { if (!t) return; function o(l) { a.current(l); @@ -2985,7 +2995,7 @@ function yt(t, e, r, n) { } function Wa(t, e, r, n) { let a = qe(r); - K(() => { + Y(() => { if (!t) return; function o(l) { a.current(l); @@ -2994,32 +3004,32 @@ function Wa(t, e, r, n) { }, [t, e, n]); } const Jn = 30; -function us(t, e, r) { - let n = ot(t, "outside-click"), a = qe(r), o = ve(function(i, d) { +function ss(t, e, r) { + let n = ot(t, "outside-click"), a = qe(r), o = ve(function(i, f) { if (i.defaultPrevented) return; - let s = d(i); + let s = f(i); if (s === null || !s.getRootNode().contains(s) || !s.isConnected) return; - let g = function v(w) { + let h = function v(w) { return typeof w == "function" ? v(w()) : Array.isArray(w) || w instanceof Set ? w : [w]; }(e); - for (let v of g) if (v !== null && (v.contains(s) || i.composed && i.composedPath().includes(v))) return; - return !ts(s, ja.Loose) && s.tabIndex !== -1 && i.preventDefault(), a.current(i, s); - }, [a, e]), l = j(null); + for (let v of h) if (v !== null && (v.contains(s) || i.composed && i.composedPath().includes(v))) return; + return !rs(s, ja.Loose) && s.tabIndex !== -1 && i.preventDefault(), a.current(i, s); + }, [a, e]), l = k(null); yt(n, "pointerdown", (i) => { - var d, s; - l.current = ((s = (d = i.composedPath) == null ? void 0 : d.call(i)) == null ? void 0 : s[0]) || i.target; + var f, s; + l.current = ((s = (f = i.composedPath) == null ? void 0 : f.call(i)) == null ? void 0 : s[0]) || i.target; }, !0), yt(n, "mousedown", (i) => { - var d, s; - l.current = ((s = (d = i.composedPath) == null ? void 0 : d.call(i)) == null ? void 0 : s[0]) || i.target; + var f, s; + l.current = ((s = (f = i.composedPath) == null ? void 0 : f.call(i)) == null ? void 0 : s[0]) || i.target; }, !0), yt(n, "click", (i) => { - ls() || l.current && (o(i, () => l.current), l.current = null); + us() || l.current && (o(i, () => l.current), l.current = null); }, !0); - let u = j({ x: 0, y: 0 }); + let u = k({ x: 0, y: 0 }); yt(n, "touchstart", (i) => { u.current.x = i.touches[0].clientX, u.current.y = i.touches[0].clientY; }, !0), yt(n, "touchend", (i) => { - let d = { x: i.changedTouches[0].clientX, y: i.changedTouches[0].clientY }; - if (!(Math.abs(d.x - u.current.x) >= Jn || Math.abs(d.y - u.current.y) >= Jn)) return o(i, () => i.target instanceof HTMLElement ? i.target : null); + let f = { x: i.changedTouches[0].clientX, y: i.changedTouches[0].clientY }; + if (!(Math.abs(f.x - u.current.x) >= Jn || Math.abs(f.y - u.current.y) >= Jn)) return o(i, () => i.target instanceof HTMLElement ? i.target : null); }, !0), Wa(n, "blur", (i) => o(i, () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null), !0); } function Tt(...t) { @@ -3027,7 +3037,7 @@ function Tt(...t) { } function Ua(t, e, r, n) { let a = qe(r); - K(() => { + Y(() => { t = t ?? window; function o(l) { a.current(l); @@ -3035,7 +3045,7 @@ function Ua(t, e, r, n) { return t.addEventListener(e, o, n), () => t.removeEventListener(e, o, n); }, [t, e, n]); } -function ss() { +function cs() { let t; return { before({ doc: e }) { var r; @@ -3046,7 +3056,7 @@ function ss() { r.style(n, "paddingRight", `${o}px`); } }; } -function cs() { +function fs() { return La() ? { before({ doc: t, d: e, meta: r }) { function n(a) { return r.containers.flatMap((o) => o()).some((o) => o.contains(a)); @@ -3062,7 +3072,7 @@ function cs() { if (u.target instanceof HTMLElement) try { let i = u.target.closest("a"); if (!i) return; - let { hash: d } = new URL(i.href), s = t.querySelector(d); + let { hash: f } = new URL(i.href), s = t.querySelector(f); s && !n(s) && (l = s); } catch { } @@ -3089,12 +3099,12 @@ function cs() { }); } } : {}; } -function fs() { +function ds() { return { before({ doc: t, d: e }) { e.style(t.documentElement, "overflow", "hidden"); } }; } -function ds(t) { +function ps(t) { let e = {}; for (let r of t) Object.assign(e, r(e)); return e; @@ -3107,7 +3117,7 @@ let Ue = Na(() => /* @__PURE__ */ new Map(), { PUSH(t, e) { let r = this.get(t); return r && (r.count--, r.meta.delete(e)), this; }, SCROLL_PREVENT({ doc: t, d: e, meta: r }) { - let n = { doc: t, d: e, meta: ds(r) }, a = [cs(), ss(), fs()]; + let n = { doc: t, d: e, meta: ps(r) }, a = [fs(), cs(), ds()]; a.forEach(({ before: o }) => o == null ? void 0 : o(n)), a.forEach(({ after: o }) => o == null ? void 0 : o(n)); }, SCROLL_ALLOW({ d: t }) { t.dispose(); @@ -3122,21 +3132,21 @@ Ue.subscribe(() => { (a && !n || !a && n) && Ue.dispatch(r.count > 0 ? "SCROLL_PREVENT" : "SCROLL_ALLOW", r), r.count === 0 && Ue.dispatch("TEARDOWN", r); } }); -function ps(t, e, r = () => ({ containers: [] })) { +function ys(t, e, r = () => ({ containers: [] })) { let n = ka(Ue), a = e ? n.get(e) : void 0, o = a ? a.count > 0 : !1; return ae(() => { if (!(!e || !t)) return Ue.dispatch("PUSH", e, r), () => Ue.dispatch("POP", e, r); }, [t, e]), o; } -function ys(t, e, r = () => [document.body]) { +function vs(t, e, r = () => [document.body]) { let n = ot(t, "scroll-lock"); - ps(n, e, (a) => { + ys(n, e, (a) => { var o; return { containers: [...(o = a.containers) != null ? o : [], r] }; }); } -function vs(t = 0) { - let [e, r] = Q(t), n = ve((i) => r(i), [e]), a = ve((i) => r((d) => d | i), [e]), o = ve((i) => (e & i) === i, [e]), l = ve((i) => r((d) => d & ~i), [r]), u = ve((i) => r((d) => d ^ i), [r]); +function ms(t = 0) { + let [e, r] = Q(t), n = ve((i) => r(i), [e]), a = ve((i) => r((f) => f | i), [e]), o = ve((i) => (e & i) === i, [e]), l = ve((i) => r((f) => f & ~i), [r]), u = ve((i) => r((f) => f ^ i), [r]); return { flags: e, setFlag: n, addFlag: a, hasFlag: o, removeFlag: l, toggleFlag: u }; } var Qn, Zn; @@ -3144,14 +3154,14 @@ typeof process < "u" && typeof globalThis < "u" && typeof Element < "u" && ((Qn return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.", "Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.", "", "Example usage:", "```js", "import { mockAnimationsApi } from 'jsdom-testing-mocks'", "mockAnimationsApi()", "```"].join(` `)), []; }); -var ms = ((t) => (t[t.None = 0] = "None", t[t.Closed = 1] = "Closed", t[t.Enter = 2] = "Enter", t[t.Leave = 4] = "Leave", t))(ms || {}); -function hs(t) { +var hs = ((t) => (t[t.None = 0] = "None", t[t.Closed = 1] = "Closed", t[t.Enter = 2] = "Enter", t[t.Leave = 4] = "Leave", t))(hs || {}); +function gs(t) { let e = {}; for (let r in t) t[r] === !0 && (e[`data-${r}`] = ""); return e; } -function gs(t, e, r, n) { - let [a, o] = Q(r), { hasFlag: l, addFlag: u, removeFlag: i } = vs(t && a ? 3 : 0), d = j(!1), s = j(!1), g = Zr(); +function bs(t, e, r, n) { + let [a, o] = Q(r), { hasFlag: l, addFlag: u, removeFlag: i } = ms(t && a ? 3 : 0), f = k(!1), s = k(!1), h = Zr(); return ae(() => { var v; if (t) { @@ -3159,26 +3169,26 @@ function gs(t, e, r, n) { r && u(3); return; } - return (v = n == null ? void 0 : n.start) == null || v.call(n, r), bs(e, { inFlight: d, prepare() { - s.current ? s.current = !1 : s.current = d.current, d.current = !0, !s.current && (r ? (u(3), i(4)) : (u(4), i(2))); + return (v = n == null ? void 0 : n.start) == null || v.call(n, r), ws(e, { inFlight: f, prepare() { + s.current ? s.current = !1 : s.current = f.current, f.current = !0, !s.current && (r ? (u(3), i(4)) : (u(4), i(2))); }, run() { s.current ? r ? (i(3), u(4)) : (i(4), u(3)) : r ? i(1) : u(1); }, done() { var w; - s.current && typeof e.getAnimations == "function" && e.getAnimations().length > 0 || (d.current = !1, i(7), r || o(!1), (w = n == null ? void 0 : n.end) == null || w.call(n, r)); + s.current && typeof e.getAnimations == "function" && e.getAnimations().length > 0 || (f.current = !1, i(7), r || o(!1), (w = n == null ? void 0 : n.end) == null || w.call(n, r)); } }); } - }, [t, r, e, g]), t ? [a, { closed: l(1), enter: l(2), leave: l(4), transition: l(2) || l(4) }] : [r, { closed: void 0, enter: void 0, leave: void 0, transition: void 0 }]; + }, [t, r, e, h]), t ? [a, { closed: l(1), enter: l(2), leave: l(4), transition: l(2) || l(4) }] : [r, { closed: void 0, enter: void 0, leave: void 0, transition: void 0 }]; } -function bs(t, { prepare: e, run: r, done: n, inFlight: a }) { +function ws(t, { prepare: e, run: r, done: n, inFlight: a }) { let o = Me(); - return Es(t, { prepare: e, inFlight: a }), o.nextFrame(() => { + return Ss(t, { prepare: e, inFlight: a }), o.nextFrame(() => { r(), o.requestAnimationFrame(() => { - o.add(ws(t, n)); + o.add(Es(t, n)); }); }), o.dispose; } -function ws(t, e) { +function Es(t, e) { var r, n; let a = Me(); if (!t) return a.dispose; @@ -3191,7 +3201,7 @@ function ws(t, e) { o || e(); }), a.dispose); } -function Es(t, { inFlight: e, prepare: r }) { +function Ss(t, { inFlight: e, prepare: r }) { if (e != null && e.current) { r(); return; @@ -3200,8 +3210,8 @@ function Es(t, { inFlight: e, prepare: r }) { t.style.transition = "none", r(), t.offsetHeight, t.style.transition = n; } function tn(t, e) { - let r = j([]), n = U(t); - K(() => { + let r = k([]), n = U(t); + Y(() => { let a = [...r.current]; for (let [o, l] of e.entries()) if (r.current[o] !== l) { let u = n(e, a); @@ -3209,26 +3219,26 @@ function tn(t, e) { } }, [n, ...e]); } -let Qt = ce(null); +let Qt = fe(null); Qt.displayName = "OpenClosedContext"; var me = ((t) => (t[t.Open = 1] = "Open", t[t.Closed = 2] = "Closed", t[t.Closing = 4] = "Closing", t[t.Opening = 8] = "Opening", t))(me || {}); function Zt() { return ie(Qt); } -function Ss({ value: t, children: e }) { +function xs({ value: t, children: e }) { return A.createElement(Qt.Provider, { value: t }, e); } -function xs({ children: t }) { +function Os({ children: t }) { return A.createElement(Qt.Provider, { value: null }, t); } -function Os(t) { +function Ps(t) { function e() { document.readyState !== "loading" && (t(), document.removeEventListener("DOMContentLoaded", e)); } typeof window < "u" && typeof document < "u" && (document.addEventListener("DOMContentLoaded", e), e()); } let $e = []; -Os(() => { +Ps(() => { function t(e) { if (!(e.target instanceof HTMLElement) || e.target === document.body || $e[0] === e.target) return; let r = e.target; @@ -3237,33 +3247,33 @@ Os(() => { window.addEventListener("click", t, { capture: !0 }), window.addEventListener("mousedown", t, { capture: !0 }), window.addEventListener("focus", t, { capture: !0 }), document.body.addEventListener("click", t, { capture: !0 }), document.body.addEventListener("mousedown", t, { capture: !0 }), document.body.addEventListener("focus", t, { capture: !0 }); }); function Ba(t) { - let e = U(t), r = j(!1); - K(() => (r.current = !1, () => { + let e = U(t), r = k(!1); + Y(() => (r.current = !1, () => { r.current = !0, Jt(() => { r.current && e(); }); }), [e]); } -function Ps() { +function As() { let t = typeof document > "u"; return "useSyncExternalStore" in ht ? ((e) => e.useSyncExternalStore)(ht)(() => () => { }, () => !1, () => !t) : !1; } function $t() { - let t = Ps(), [e, r] = ht.useState(Ve.isHandoffComplete); + let t = As(), [e, r] = ht.useState(Ve.isHandoffComplete); return e && Ve.isHandoffComplete === !1 && r(!1), ht.useEffect(() => { e !== !0 && r(!0); }, [e]), ht.useEffect(() => Ve.handoff(), []), t ? !1 : e; } -let Ha = ce(!1); -function As() { +let Ha = fe(!1); +function Ts() { return ie(Ha); } function ea(t) { return A.createElement(Ha.Provider, { value: t.force }, t.children); } -function Ts(t) { - let e = As(), r = ie(qa), n = Tt(t), [a, o] = Q(() => { +function $s(t) { + let e = Ts(), r = ie(qa), n = Tt(t), [a, o] = Q(() => { var l; if (!e && r !== null) return (l = r.current) != null ? l : null; if (Ve.isServer) return null; @@ -3273,42 +3283,42 @@ function Ts(t) { let i = n.createElement("div"); return i.setAttribute("id", "headlessui-portal-root"), n.body.appendChild(i); }); - return K(() => { + return Y(() => { a !== null && (n != null && n.body.contains(a) || n == null || n.body.appendChild(a)); - }, [a, n]), K(() => { + }, [a, n]), Y(() => { e || r !== null && o(r.current); }, [r, o, e]), a; } -let Va = he, $s = le(function(t, e) { - let r = t, n = j(null), a = Se(Lu((g) => { - n.current = g; - }), e), o = Tt(n), l = Ts(n), [u] = Q(() => { - var g; - return Ve.isServer ? null : (g = o == null ? void 0 : o.createElement("div")) != null ? g : null; - }), i = ie(Ur), d = $t(); +let Va = he, Rs = le(function(t, e) { + let r = t, n = k(null), a = Se(Wu((h) => { + n.current = h; + }), e), o = Tt(n), l = $s(n), [u] = Q(() => { + var h; + return Ve.isServer ? null : (h = o == null ? void 0 : o.createElement("div")) != null ? h : null; + }), i = ie(Ur), f = $t(); ae(() => { !l || !u || l.contains(u) || (u.setAttribute("data-headlessui-portal", ""), l.appendChild(u)); }, [l, u]), ae(() => { if (u && i) return i.register(u); }, [i, u]), Ba(() => { - var g; - !l || !u || (u instanceof Node && l.contains(u) && l.removeChild(u), l.childNodes.length <= 0 && ((g = l.parentElement) == null || g.removeChild(l))); + var h; + !l || !u || (u instanceof Node && l.contains(u) && l.removeChild(u), l.childNodes.length <= 0 && ((h = l.parentElement) == null || h.removeChild(l))); }); - let s = fe(); - return d ? !l || !u ? null : jo(s({ ourProps: { ref: a }, theirProps: r, slot: {}, defaultTag: Va, name: "Portal" }), u) : null; + let s = de(); + return f ? !l || !u ? null : Lo(s({ ourProps: { ref: a }, theirProps: r, slot: {}, defaultTag: Va, name: "Portal" }), u) : null; }); -function Rs(t, e) { - let r = Se(e), { enabled: n = !0, ...a } = t, o = fe(); - return n ? A.createElement($s, { ...a, ref: r }) : o({ ourProps: { ref: r }, theirProps: a, slot: {}, defaultTag: Va, name: "Portal" }); -} -let Fs = he, qa = ce(null); -function Cs(t, e) { - let { target: r, ...n } = t, a = { ref: Se(e) }, o = fe(); - return A.createElement(qa.Provider, { value: r }, o({ ourProps: a, theirProps: n, defaultTag: Fs, name: "Popover.Group" })); -} -let Ur = ce(null); -function Is() { - let t = ie(Ur), e = j([]), r = U((o) => (e.current.push(o), t && t.register(o), () => n(o))), n = U((o) => { +function Fs(t, e) { + let r = Se(e), { enabled: n = !0, ...a } = t, o = de(); + return n ? A.createElement(Rs, { ...a, ref: r }) : o({ ourProps: { ref: r }, theirProps: a, slot: {}, defaultTag: Va, name: "Portal" }); +} +let Cs = he, qa = fe(null); +function Is(t, e) { + let { target: r, ...n } = t, a = { ref: Se(e) }, o = de(); + return A.createElement(qa.Provider, { value: r }, o({ ourProps: a, theirProps: n, defaultTag: Cs, name: "Popover.Group" })); +} +let Ur = fe(null); +function Ms() { + let t = ie(Ur), e = k([]), r = U((o) => (e.current.push(o), t && t.register(o), () => n(o))), n = U((o) => { let l = e.current.indexOf(o); l !== -1 && e.current.splice(l, 1), t && t.unregister(o); }), a = J(() => ({ register: r, unregister: n, portals: e }), [r, n, e]); @@ -3316,14 +3326,14 @@ function Is() { return A.createElement(Ur.Provider, { value: a }, o); }, [a])]; } -let Ms = le(Rs), Ga = le(Cs), _s = Object.assign(Ms, { Group: Ga }); -function Ds(t, e = typeof document < "u" ? document.defaultView : null, r) { +let _s = le(Fs), Ga = le(Is), Ds = Object.assign(_s, { Group: Ga }); +function Ns(t, e = typeof document < "u" ? document.defaultView : null, r) { let n = ot(t, "escape"); Ua(e, "keydown", (a) => { n && (a.defaultPrevented || a.key === Da.Escape && r(a)); }); } -function Ns() { +function ks() { var t; let [e] = Q(() => typeof window < "u" && typeof window.matchMedia == "function" ? window.matchMedia("(pointer: coarse)") : null), [r, n] = Q((t = e == null ? void 0 : e.matches) != null ? t : !1); return ae(() => { @@ -3334,18 +3344,18 @@ function Ns() { return e.addEventListener("change", a), () => e.removeEventListener("change", a); }, [e]), r; } -function ks({ defaultContainers: t = [], portals: e, mainTreeNode: r } = {}) { +function js({ defaultContainers: t = [], portals: e, mainTreeNode: r } = {}) { let n = Tt(r), a = U(() => { var o, l; let u = []; for (let i of t) i !== null && (i instanceof HTMLElement ? u.push(i) : "current" in i && i.current instanceof HTMLElement && u.push(i.current)); if (e != null && e.current) for (let i of e.current) u.push(i); - for (let i of (o = n == null ? void 0 : n.querySelectorAll("html > *, body > *")) != null ? o : []) i !== document.body && i !== document.head && i instanceof HTMLElement && i.id !== "headlessui-portal-root" && (r && (i.contains(r) || i.contains((l = r == null ? void 0 : r.getRootNode()) == null ? void 0 : l.host)) || u.some((d) => i.contains(d)) || u.push(i)); + for (let i of (o = n == null ? void 0 : n.querySelectorAll("html > *, body > *")) != null ? o : []) i !== document.body && i !== document.head && i instanceof HTMLElement && i.id !== "headlessui-portal-root" && (r && (i.contains(r) || i.contains((l = r == null ? void 0 : r.getRootNode()) == null ? void 0 : l.host)) || u.some((f) => i.contains(f)) || u.push(i)); return u; }); return { resolveContainers: a, contains: U((o) => a().some((l) => l.contains(o))) }; } -let Ya = ce(null); +let Ya = fe(null); function ta({ children: t, node: e }) { let [r, n] = Q(null), a = za(e ?? r); return A.createElement(Ya.Provider, { value: a }, t, a === null && A.createElement(jr, { features: qt.Hidden, ref: (o) => { @@ -3363,14 +3373,14 @@ function za(t = null) { return (e = ie(Ya)) != null ? e : t; } function rn() { - let t = j(!1); + let t = k(!1); return ae(() => (t.current = !0, () => { t.current = !1; }), []), t; } var mt = ((t) => (t[t.Forwards = 0] = "Forwards", t[t.Backwards = 1] = "Backwards", t))(mt || {}); -function js() { - let t = j(0); +function Ls() { + let t = k(0); return Wa(!0, "keydown", (e) => { e.key === "Tab" && (t.current = e.shiftKey ? 1 : 0); }, !0), t; @@ -3382,40 +3392,40 @@ function Ka(t) { for (let r of t.current) r.current instanceof HTMLElement && e.add(r.current); return e; } -let Ls = "div"; +let Ws = "div"; var We = ((t) => (t[t.None = 0] = "None", t[t.InitialFocus = 1] = "InitialFocus", t[t.TabLock = 2] = "TabLock", t[t.FocusLock = 4] = "FocusLock", t[t.RestoreFocus = 8] = "RestoreFocus", t[t.AutoFocus = 16] = "AutoFocus", t))(We || {}); -function Ws(t, e) { - let r = j(null), n = Se(r, e), { initialFocus: a, initialFocusFallback: o, containers: l, features: u = 15, ...i } = t; +function Us(t, e) { + let r = k(null), n = Se(r, e), { initialFocus: a, initialFocusFallback: o, containers: l, features: u = 15, ...i } = t; $t() || (u = 0); - let d = Tt(r); - Vs(u, { ownerDocument: d }); - let s = qs(u, { ownerDocument: d, container: r, initialFocus: a, initialFocusFallback: o }); - Gs(u, { ownerDocument: d, container: r, containers: l, previousActiveElement: s }); - let g = js(), v = U((h) => { + let f = Tt(r); + qs(u, { ownerDocument: f }); + let s = Gs(u, { ownerDocument: f, container: r, initialFocus: a, initialFocusFallback: o }); + Ys(u, { ownerDocument: f, container: r, containers: l, previousActiveElement: s }); + let h = Ls(), v = U((g) => { let b = r.current; b && ((S) => S())(() => { - Ce(g.current, { [mt.Forwards]: () => { - St(b, Pe.First, { skipElements: [h.relatedTarget, o] }); + Ce(h.current, { [mt.Forwards]: () => { + St(b, Pe.First, { skipElements: [g.relatedTarget, o] }); }, [mt.Backwards]: () => { - St(b, Pe.Last, { skipElements: [h.relatedTarget, o] }); + St(b, Pe.Last, { skipElements: [g.relatedTarget, o] }); } }); }); - }), w = ot(!!(u & 2), "focus-trap#tab-lock"), f = Zr(), y = j(!1), p = { ref: n, onKeyDown(h) { - h.key == "Tab" && (y.current = !0, f.requestAnimationFrame(() => { + }), w = ot(!!(u & 2), "focus-trap#tab-lock"), d = Zr(), y = k(!1), p = { ref: n, onKeyDown(g) { + g.key == "Tab" && (y.current = !0, d.requestAnimationFrame(() => { y.current = !1; })); - }, onBlur(h) { + }, onBlur(g) { if (!(u & 4)) return; let b = Ka(l); r.current instanceof HTMLElement && b.add(r.current); - let S = h.relatedTarget; - S instanceof HTMLElement && S.dataset.headlessuiFocusGuard !== "true" && (Xa(b, S) || (y.current ? St(r.current, Ce(g.current, { [mt.Forwards]: () => Pe.Next, [mt.Backwards]: () => Pe.Previous }) | Pe.WrapAround, { relativeTo: h.target }) : h.target instanceof HTMLElement && Ae(h.target))); - } }, m = fe(); - return A.createElement(A.Fragment, null, w && A.createElement(jr, { as: "button", type: "button", "data-headlessui-focus-guard": !0, onFocus: v, features: qt.Focusable }), m({ ourProps: p, theirProps: i, defaultTag: Ls, name: "FocusTrap" }), w && A.createElement(jr, { as: "button", type: "button", "data-headlessui-focus-guard": !0, onFocus: v, features: qt.Focusable })); -} -let Us = le(Ws), Bs = Object.assign(Us, { features: We }); -function Hs(t = !0) { - let e = j($e.slice()); + let S = g.relatedTarget; + S instanceof HTMLElement && S.dataset.headlessuiFocusGuard !== "true" && (Xa(b, S) || (y.current ? St(r.current, Ce(h.current, { [mt.Forwards]: () => Pe.Next, [mt.Backwards]: () => Pe.Previous }) | Pe.WrapAround, { relativeTo: g.target }) : g.target instanceof HTMLElement && Ae(g.target))); + } }, m = de(); + return A.createElement(A.Fragment, null, w && A.createElement(jr, { as: "button", type: "button", "data-headlessui-focus-guard": !0, onFocus: v, features: qt.Focusable }), m({ ourProps: p, theirProps: i, defaultTag: Ws, name: "FocusTrap" }), w && A.createElement(jr, { as: "button", type: "button", "data-headlessui-focus-guard": !0, onFocus: v, features: qt.Focusable })); +} +let Bs = le(Us), Hs = Object.assign(Bs, { features: We }); +function Vs(t = !0) { + let e = k($e.slice()); return tn(([r], [n]) => { n === !0 && r === !1 && Jt(() => { e.current.splice(0); @@ -3425,16 +3435,16 @@ function Hs(t = !0) { return (r = e.current.find((n) => n != null && n.isConnected)) != null ? r : null; }); } -function Vs(t, { ownerDocument: e }) { - let r = !!(t & 8), n = Hs(r); +function qs(t, { ownerDocument: e }) { + let r = !!(t & 8), n = Vs(r); tn(() => { r || (e == null ? void 0 : e.activeElement) === (e == null ? void 0 : e.body) && Ae(n()); }, [r]), Ba(() => { r && Ae(n()); }); } -function qs(t, { ownerDocument: e, container: r, initialFocus: n, initialFocusFallback: a }) { - let o = j(null), l = ot(!!(t & 1), "focus-trap#initial-focus"), u = rn(); +function Gs(t, { ownerDocument: e, container: r, initialFocus: n, initialFocusFallback: a }) { + let o = k(null), l = ot(!!(t & 1), "focus-trap#initial-focus"), u = rn(); return tn(() => { if (t === 0) return; if (!l) { @@ -3444,14 +3454,14 @@ function qs(t, { ownerDocument: e, container: r, initialFocus: n, initialFocusFa let i = r.current; i && Jt(() => { if (!u.current) return; - let d = e == null ? void 0 : e.activeElement; + let f = e == null ? void 0 : e.activeElement; if (n != null && n.current) { - if ((n == null ? void 0 : n.current) === d) { - o.current = d; + if ((n == null ? void 0 : n.current) === f) { + o.current = f; return; } - } else if (i.contains(d)) { - o.current = d; + } else if (i.contains(f)) { + o.current = f; return; } if (n != null && n.current) Ae(n.current); @@ -3466,16 +3476,16 @@ function qs(t, { ownerDocument: e, container: r, initialFocus: n, initialFocusFa }); }, [a, l, t]), o; } -function Gs(t, { ownerDocument: e, container: r, containers: n, previousActiveElement: a }) { +function Ys(t, { ownerDocument: e, container: r, containers: n, previousActiveElement: a }) { let o = rn(), l = !!(t & 4); Ua(e == null ? void 0 : e.defaultView, "focus", (u) => { if (!l || !o.current) return; let i = Ka(n); r.current instanceof HTMLElement && i.add(r.current); - let d = a.current; - if (!d) return; + let f = a.current; + if (!f) return; let s = u.target; - s && s instanceof HTMLElement ? Xa(i, s) ? (a.current = s, Ae(s)) : (u.preventDefault(), u.stopPropagation(), Ae(d)) : Ae(a.current); + s && s instanceof HTMLElement ? Xa(i, s) ? (a.current = s, Ae(s)) : (u.preventDefault(), u.stopPropagation(), Ae(f)) : Ae(a.current); }, !0); } function Xa(t, e) { @@ -3486,28 +3496,28 @@ function Ja(t) { var e; return !!(t.enter || t.enterFrom || t.enterTo || t.leave || t.leaveFrom || t.leaveTo) || ((e = t.as) != null ? e : Za) !== he || A.Children.count(t.children) === 1; } -let er = ce(null); +let er = fe(null); er.displayName = "TransitionContext"; -var Ys = ((t) => (t.Visible = "visible", t.Hidden = "hidden", t))(Ys || {}); -function zs() { +var zs = ((t) => (t.Visible = "visible", t.Hidden = "hidden", t))(zs || {}); +function Ks() { let t = ie(er); if (t === null) throw new Error("A is used but it is missing a parent or ."); return t; } -function Ks() { +function Xs() { let t = ie(tr); if (t === null) throw new Error("A is used but it is missing a parent or ."); return t; } -let tr = ce(null); +let tr = fe(null); tr.displayName = "NestingContext"; function rr(t) { return "children" in t ? rr(t.children) : t.current.filter(({ el: e }) => e.current !== null).filter(({ state: e }) => e === "visible").length > 0; } function Qa(t, e) { - let r = qe(t), n = j([]), a = rn(), o = Zr(), l = U((w, f = Fe.Hidden) => { + let r = qe(t), n = k([]), a = rn(), o = Zr(), l = U((w, d = Fe.Hidden) => { let y = n.current.findIndex(({ el: p }) => p === w); - y !== -1 && (Ce(f, { [Fe.Unmount]() { + y !== -1 && (Ce(d, { [Fe.Unmount]() { n.current.splice(y, 1); }, [Fe.Hidden]() { n.current[y].state = "hidden"; @@ -3516,42 +3526,42 @@ function Qa(t, e) { !rr(n) && a.current && ((p = r.current) == null || p.call(r)); })); }), u = U((w) => { - let f = n.current.find(({ el: y }) => y === w); - return f ? f.state !== "visible" && (f.state = "visible") : n.current.push({ el: w, state: "visible" }), () => l(w, Fe.Unmount); - }), i = j([]), d = j(Promise.resolve()), s = j({ enter: [], leave: [] }), g = U((w, f, y) => { - i.current.splice(0), e && (e.chains.current[f] = e.chains.current[f].filter(([p]) => p !== w)), e == null || e.chains.current[f].push([w, new Promise((p) => { + let d = n.current.find(({ el: y }) => y === w); + return d ? d.state !== "visible" && (d.state = "visible") : n.current.push({ el: w, state: "visible" }), () => l(w, Fe.Unmount); + }), i = k([]), f = k(Promise.resolve()), s = k({ enter: [], leave: [] }), h = U((w, d, y) => { + i.current.splice(0), e && (e.chains.current[d] = e.chains.current[d].filter(([p]) => p !== w)), e == null || e.chains.current[d].push([w, new Promise((p) => { i.current.push(p); - })]), e == null || e.chains.current[f].push([w, new Promise((p) => { - Promise.all(s.current[f].map(([m, h]) => h)).then(() => p()); - })]), f === "enter" ? d.current = d.current.then(() => e == null ? void 0 : e.wait.current).then(() => y(f)) : y(f); - }), v = U((w, f, y) => { - Promise.all(s.current[f].splice(0).map(([p, m]) => m)).then(() => { + })]), e == null || e.chains.current[d].push([w, new Promise((p) => { + Promise.all(s.current[d].map(([m, g]) => g)).then(() => p()); + })]), d === "enter" ? f.current = f.current.then(() => e == null ? void 0 : e.wait.current).then(() => y(d)) : y(d); + }), v = U((w, d, y) => { + Promise.all(s.current[d].splice(0).map(([p, m]) => m)).then(() => { var p; (p = i.current.shift()) == null || p(); - }).then(() => y(f)); + }).then(() => y(d)); }); - return J(() => ({ children: n, register: u, unregister: l, onStart: g, onStop: v, wait: d, chains: s }), [u, l, n, g, v, s, d]); + return J(() => ({ children: n, register: u, unregister: l, onStart: h, onStop: v, wait: f, chains: s }), [u, l, n, h, v, s, f]); } let Za = he, eo = Vt.RenderStrategy; -function Xs(t, e) { +function Js(t, e) { var r, n; - let { transition: a = !0, beforeEnter: o, afterEnter: l, beforeLeave: u, afterLeave: i, enter: d, enterFrom: s, enterTo: g, entered: v, leave: w, leaveFrom: f, leaveTo: y, ...p } = t, [m, h] = Q(null), b = j(null), S = Ja(t), O = Se(...S ? [b, e, h] : e === null ? [] : [e]), _ = (r = p.unmount) == null || r ? Fe.Unmount : Fe.Hidden, { show: M, appear: W, initial: H } = zs(), [k, Y] = Q(M ? "visible" : "hidden"), V = Ks(), { register: $, unregister: T } = V; + let { transition: a = !0, beforeEnter: o, afterEnter: l, beforeLeave: u, afterLeave: i, enter: f, enterFrom: s, enterTo: h, entered: v, leave: w, leaveFrom: d, leaveTo: y, ...p } = t, [m, g] = Q(null), b = k(null), S = Ja(t), O = Se(...S ? [b, e, g] : e === null ? [] : [e]), _ = (r = p.unmount) == null || r ? Fe.Unmount : Fe.Hidden, { show: M, appear: W, initial: H } = Ks(), [j, z] = Q(M ? "visible" : "hidden"), V = Xs(), { register: $, unregister: T } = V; ae(() => $(b), [$, b]), ae(() => { if (_ === Fe.Hidden && b.current) { - if (M && k !== "visible") { - Y("visible"); + if (M && j !== "visible") { + z("visible"); return; } - return Ce(k, { hidden: () => T(b), visible: () => $(b) }); + return Ce(j, { hidden: () => T(b), visible: () => $(b) }); } - }, [k, b, $, T, M, _]); + }, [j, b, $, T, M, _]); let D = $t(); ae(() => { - if (S && D && k === "visible" && b.current === null) throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?"); - }, [b, k, D, S]); - let ue = H && !W, de = W && M && H, ge = j(!1), te = Qa(() => { - ge.current || (Y("hidden"), T(b)); - }, V), pe = U((Ne) => { + if (S && D && j === "visible" && b.current === null) throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?"); + }, [b, j, D, S]); + let ue = H && !W, pe = W && M && H, ge = k(!1), te = Qa(() => { + ge.current || (z("hidden"), T(b)); + }, V), ye = U((Ne) => { ge.current = !0; let xe = Ne ? "enter" : "leave"; te.onStart(b, xe, (Oe) => { @@ -3561,49 +3571,49 @@ function Xs(t, e) { let xe = Ne ? "enter" : "leave"; ge.current = !1, te.onStop(b, xe, (Oe) => { Oe === "enter" ? l == null || l() : Oe === "leave" && (i == null || i()); - }), xe === "leave" && !rr(te) && (Y("hidden"), T(b)); + }), xe === "leave" && !rr(te) && (z("hidden"), T(b)); }); - K(() => { - S && a || (pe(M), q(M)); + Y(() => { + S && a || (ye(M), q(M)); }, [M, S, a]); - let _e = !(!a || !S || !D || ue), [, ee] = gs(_e, m, M, { start: pe, end: q }), ar = je({ ref: O, className: ((n = kr(p.className, de && d, de && s, ee.enter && d, ee.enter && ee.closed && s, ee.enter && !ee.closed && g, ee.leave && w, ee.leave && !ee.closed && f, ee.leave && ee.closed && y, !ee.transition && M && v)) == null ? void 0 : n.trim()) || void 0, ...hs(ee) }), De = 0; - k === "visible" && (De |= me.Open), k === "hidden" && (De |= me.Closed), ee.enter && (De |= me.Opening), ee.leave && (De |= me.Closing); - let lt = fe(); - return A.createElement(tr.Provider, { value: te }, A.createElement(Ss, { value: De }, lt({ ourProps: ar, theirProps: p, defaultTag: Za, features: eo, visible: k === "visible", name: "Transition.Child" }))); + let _e = !(!a || !S || !D || ue), [, ee] = bs(_e, m, M, { start: ye, end: q }), ar = je({ ref: O, className: ((n = kr(p.className, pe && f, pe && s, ee.enter && f, ee.enter && ee.closed && s, ee.enter && !ee.closed && h, ee.leave && w, ee.leave && !ee.closed && d, ee.leave && ee.closed && y, !ee.transition && M && v)) == null ? void 0 : n.trim()) || void 0, ...gs(ee) }), De = 0; + j === "visible" && (De |= me.Open), j === "hidden" && (De |= me.Closed), ee.enter && (De |= me.Opening), ee.leave && (De |= me.Closing); + let lt = de(); + return A.createElement(tr.Provider, { value: te }, A.createElement(xs, { value: De }, lt({ ourProps: ar, theirProps: p, defaultTag: Za, features: eo, visible: j === "visible", name: "Transition.Child" }))); } -function Js(t, e) { - let { show: r, appear: n = !1, unmount: a = !0, ...o } = t, l = j(null), u = Ja(t), i = Se(...u ? [l, e] : e === null ? [] : [e]); +function Qs(t, e) { + let { show: r, appear: n = !1, unmount: a = !0, ...o } = t, l = k(null), u = Ja(t), i = Se(...u ? [l, e] : e === null ? [] : [e]); $t(); - let d = Zt(); - if (r === void 0 && d !== null && (r = (d & me.Open) === me.Open), r === void 0) throw new Error("A is used but it is missing a `show={true | false}` prop."); - let [s, g] = Q(r ? "visible" : "hidden"), v = Qa(() => { - r || g("hidden"); - }), [w, f] = Q(!0), y = j([r]); + let f = Zt(); + if (r === void 0 && f !== null && (r = (f & me.Open) === me.Open), r === void 0) throw new Error("A is used but it is missing a `show={true | false}` prop."); + let [s, h] = Q(r ? "visible" : "hidden"), v = Qa(() => { + r || h("hidden"); + }), [w, d] = Q(!0), y = k([r]); ae(() => { - w !== !1 && y.current[y.current.length - 1] !== r && (y.current.push(r), f(!1)); + w !== !1 && y.current[y.current.length - 1] !== r && (y.current.push(r), d(!1)); }, [y, r]); let p = J(() => ({ show: r, appear: n, initial: w }), [r, n, w]); ae(() => { - r ? g("visible") : !rr(v) && l.current !== null && g("hidden"); + r ? h("visible") : !rr(v) && l.current !== null && h("hidden"); }, [r, v]); - let m = { unmount: a }, h = U(() => { + let m = { unmount: a }, g = U(() => { var O; - w && f(!1), (O = t.beforeEnter) == null || O.call(t); + w && d(!1), (O = t.beforeEnter) == null || O.call(t); }), b = U(() => { var O; - w && f(!1), (O = t.beforeLeave) == null || O.call(t); - }), S = fe(); - return A.createElement(tr.Provider, { value: v }, A.createElement(er.Provider, { value: p }, S({ ourProps: { ...m, as: he, children: A.createElement(to, { ref: i, ...m, ...o, beforeEnter: h, beforeLeave: b }) }, theirProps: {}, defaultTag: he, features: eo, visible: s === "visible", name: "Transition" }))); + w && d(!1), (O = t.beforeLeave) == null || O.call(t); + }), S = de(); + return A.createElement(tr.Provider, { value: v }, A.createElement(er.Provider, { value: p }, S({ ourProps: { ...m, as: he, children: A.createElement(to, { ref: i, ...m, ...o, beforeEnter: g, beforeLeave: b }) }, theirProps: {}, defaultTag: he, features: eo, visible: s === "visible", name: "Transition" }))); } -function Qs(t, e) { +function Zs(t, e) { let r = ie(er) !== null, n = Zt() !== null; return A.createElement(A.Fragment, null, !r && n ? A.createElement(Br, { ref: e, ...t }) : A.createElement(to, { ref: e, ...t })); } -let Br = le(Js), to = le(Xs), it = le(Qs), ro = Object.assign(Br, { Child: it, Root: Br }); -var Zs = ((t) => (t[t.Open = 0] = "Open", t[t.Closed = 1] = "Closed", t))(Zs || {}), ec = ((t) => (t[t.SetTitleId = 0] = "SetTitleId", t))(ec || {}); -let tc = { 0(t, e) { +let Br = le(Qs), to = le(Js), it = le(Zs), ro = Object.assign(Br, { Child: it, Root: Br }); +var ec = ((t) => (t[t.Open = 0] = "Open", t[t.Closed = 1] = "Closed", t))(ec || {}), tc = ((t) => (t[t.SetTitleId = 0] = "SetTitleId", t))(tc || {}); +let rc = { 0(t, e) { return t.titleId === e.id ? t : { ...t, titleId: e.id }; -} }, nn = ce(null); +} }, nn = fe(null); nn.displayName = "DialogContext"; function nr(t) { let e = ie(nn); @@ -3613,37 +3623,37 @@ function nr(t) { } return e; } -function rc(t, e) { - return Ce(e.type, tc, t, e); +function nc(t, e) { + return Ce(e.type, rc, t, e); } let ra = le(function(t, e) { - let r = Ot(), { id: n = `headlessui-dialog-${r}`, open: a, onClose: o, initialFocus: l, role: u = "dialog", autoFocus: i = !0, __demoMode: d = !1, unmount: s = !1, ...g } = t, v = j(!1); + let r = Ot(), { id: n = `headlessui-dialog-${r}`, open: a, onClose: o, initialFocus: l, role: u = "dialog", autoFocus: i = !0, __demoMode: f = !1, unmount: s = !1, ...h } = t, v = k(!1); u = function() { return u === "dialog" || u === "alertdialog" ? u : (v.current || (v.current = !0, console.warn(`Invalid role [${u}] passed to . Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)), "dialog"); }(); let w = Zt(); a === void 0 && w !== null && (a = (w & me.Open) === me.Open); - let f = j(null), y = Se(f, e), p = Tt(f), m = a ? 0 : 1, [h, b] = No(rc, { titleId: null, descriptionId: null, panelRef: ko() }), S = U(() => o(!1)), O = U((q) => b({ type: 0, id: q })), _ = $t() ? m === 0 : !1, [M, W] = Is(), H = { get current() { + let d = k(null), y = Se(d, e), p = Tt(d), m = a ? 0 : 1, [g, b] = No(nc, { titleId: null, descriptionId: null, panelRef: ko() }), S = U(() => o(!1)), O = U((q) => b({ type: 0, id: q })), _ = $t() ? m === 0 : !1, [M, W] = Ms(), H = { get current() { var q; - return (q = h.panelRef.current) != null ? q : f.current; - } }, k = za(), { resolveContainers: Y } = ks({ mainTreeNode: k, portals: M, defaultContainers: [H] }), V = w !== null ? (w & me.Closing) === me.Closing : !1; - Ku(d || V ? !1 : _, { allowed: U(() => { + return (q = g.panelRef.current) != null ? q : d.current; + } }, j = za(), { resolveContainers: z } = js({ mainTreeNode: j, portals: M, defaultContainers: [H] }), V = w !== null ? (w & me.Closing) === me.Closing : !1; + Xu(f || V ? !1 : _, { allowed: U(() => { var q, _e; - return [(_e = (q = f.current) == null ? void 0 : q.closest("[data-headlessui-portal]")) != null ? _e : null]; + return [(_e = (q = d.current) == null ? void 0 : q.closest("[data-headlessui-portal]")) != null ? _e : null]; }), disallowed: U(() => { var q; - return [(q = k == null ? void 0 : k.closest("body > *:not(#headlessui-portal-root)")) != null ? q : null]; - }) }), us(_, Y, (q) => { + return [(q = j == null ? void 0 : j.closest("body > *:not(#headlessui-portal-root)")) != null ? q : null]; + }) }), ss(_, z, (q) => { q.preventDefault(), S(); - }), Ds(_, p == null ? void 0 : p.defaultView, (q) => { + }), Ns(_, p == null ? void 0 : p.defaultView, (q) => { q.preventDefault(), q.stopPropagation(), document.activeElement && "blur" in document.activeElement && typeof document.activeElement.blur == "function" && document.activeElement.blur(), S(); - }), ys(d || V ? !1 : _, p, Y), Xu(_, f, S); - let [$, T] = Wu(), D = J(() => [{ dialogState: m, close: S, setTitleId: O, unmount: s }, h], [m, h, S, O, s]), ue = J(() => ({ open: m === 0 }), [m]), de = { ref: y, id: n, role: u, tabIndex: -1, "aria-modal": d ? void 0 : m === 0 ? !0 : void 0, "aria-labelledby": h.titleId, "aria-describedby": $, unmount: s }, ge = !Ns(), te = We.None; - _ && !d && (te |= We.RestoreFocus, te |= We.TabLock, i && (te |= We.AutoFocus), ge && (te |= We.InitialFocus)); - let pe = fe(); - return A.createElement(xs, null, A.createElement(ea, { force: !0 }, A.createElement(_s, null, A.createElement(nn.Provider, { value: D }, A.createElement(Ga, { target: f }, A.createElement(ea, { force: !1 }, A.createElement(T, { slot: ue }, A.createElement(W, null, A.createElement(Bs, { initialFocus: l, initialFocusFallback: f, containers: Y, features: te }, A.createElement(Gu, { value: S }, pe({ ourProps: de, theirProps: g, slot: ue, defaultTag: nc, features: ac, visible: m === 0, name: "Dialog" }))))))))))); -}), nc = "div", ac = Vt.RenderStrategy | Vt.Static; -function oc(t, e) { + }), vs(f || V ? !1 : _, p, z), Ju(_, d, S); + let [$, T] = Uu(), D = J(() => [{ dialogState: m, close: S, setTitleId: O, unmount: s }, g], [m, g, S, O, s]), ue = J(() => ({ open: m === 0 }), [m]), pe = { ref: y, id: n, role: u, tabIndex: -1, "aria-modal": f ? void 0 : m === 0 ? !0 : void 0, "aria-labelledby": g.titleId, "aria-describedby": $, unmount: s }, ge = !ks(), te = We.None; + _ && !f && (te |= We.RestoreFocus, te |= We.TabLock, i && (te |= We.AutoFocus), ge && (te |= We.InitialFocus)); + let ye = de(); + return A.createElement(Os, null, A.createElement(ea, { force: !0 }, A.createElement(Ds, null, A.createElement(nn.Provider, { value: D }, A.createElement(Ga, { target: d }, A.createElement(ea, { force: !1 }, A.createElement(T, { slot: ue }, A.createElement(W, null, A.createElement(Hs, { initialFocus: l, initialFocusFallback: d, containers: z, features: te }, A.createElement(Yu, { value: S }, ye({ ourProps: pe, theirProps: h, slot: ue, defaultTag: ac, features: oc, visible: m === 0, name: "Dialog" }))))))))))); +}), ac = "div", oc = Vt.RenderStrategy | Vt.Static; +function ic(t, e) { let { transition: r = !1, open: n, ...a } = t, o = Zt(), l = t.hasOwnProperty("open") || o !== null, u = t.hasOwnProperty("onClose"); if (!l && !u) throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component."); if (!l) throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop."); @@ -3652,28 +3662,28 @@ function oc(t, e) { if (typeof t.onClose != "function") throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${t.onClose}`); return (n !== void 0 || r) && !a.static ? A.createElement(ta, null, A.createElement(ro, { show: n, transition: r, unmount: a.unmount }, A.createElement(ra, { ref: e, ...a }))) : A.createElement(ta, null, A.createElement(ra, { ref: e, open: n, ...a })); } -let ic = "div"; -function lc(t, e) { - let r = Ot(), { id: n = `headlessui-dialog-panel-${r}`, transition: a = !1, ...o } = t, [{ dialogState: l, unmount: u }, i] = nr("Dialog.Panel"), d = Se(e, i.panelRef), s = J(() => ({ open: l === 0 }), [l]), g = U((p) => { +let lc = "div"; +function uc(t, e) { + let r = Ot(), { id: n = `headlessui-dialog-panel-${r}`, transition: a = !1, ...o } = t, [{ dialogState: l, unmount: u }, i] = nr("Dialog.Panel"), f = Se(e, i.panelRef), s = J(() => ({ open: l === 0 }), [l]), h = U((p) => { p.stopPropagation(); - }), v = { ref: d, id: n, onClick: g }, w = a ? it : he, f = a ? { unmount: u } : {}, y = fe(); - return A.createElement(w, { ...f }, y({ ourProps: v, theirProps: o, slot: s, defaultTag: ic, name: "Dialog.Panel" })); + }), v = { ref: f, id: n, onClick: h }, w = a ? it : he, d = a ? { unmount: u } : {}, y = de(); + return A.createElement(w, { ...d }, y({ ourProps: v, theirProps: o, slot: s, defaultTag: lc, name: "Dialog.Panel" })); } -let uc = "div"; -function sc(t, e) { - let { transition: r = !1, ...n } = t, [{ dialogState: a, unmount: o }] = nr("Dialog.Backdrop"), l = J(() => ({ open: a === 0 }), [a]), u = { ref: e, "aria-hidden": !0 }, i = r ? it : he, d = r ? { unmount: o } : {}, s = fe(); - return A.createElement(i, { ...d }, s({ ourProps: u, theirProps: n, slot: l, defaultTag: uc, name: "Dialog.Backdrop" })); +let sc = "div"; +function cc(t, e) { + let { transition: r = !1, ...n } = t, [{ dialogState: a, unmount: o }] = nr("Dialog.Backdrop"), l = J(() => ({ open: a === 0 }), [a]), u = { ref: e, "aria-hidden": !0 }, i = r ? it : he, f = r ? { unmount: o } : {}, s = de(); + return A.createElement(i, { ...f }, s({ ourProps: u, theirProps: n, slot: l, defaultTag: sc, name: "Dialog.Backdrop" })); } -let cc = "h2"; -function fc(t, e) { +let fc = "h2"; +function dc(t, e) { let r = Ot(), { id: n = `headlessui-dialog-title-${r}`, ...a } = t, [{ dialogState: o, setTitleId: l }] = nr("Dialog.Title"), u = Se(e); - K(() => (l(n), () => l(null)), [n, l]); - let i = J(() => ({ open: o === 0 }), [o]), d = { ref: u, id: n }; - return fe()({ ourProps: d, theirProps: a, slot: i, defaultTag: cc, name: "Dialog.Title" }); + Y(() => (l(n), () => l(null)), [n, l]); + let i = J(() => ({ open: o === 0 }), [o]), f = { ref: u, id: n }; + return de()({ ourProps: f, theirProps: a, slot: i, defaultTag: fc, name: "Dialog.Title" }); } -let dc = le(oc), an = le(lc); -le(sc); -let pc = le(fc), yc = Object.assign(dc, { Panel: an, Title: pc, Description: Vu }); +let pc = le(ic), an = le(uc); +le(cc); +let yc = le(dc), vc = Object.assign(pc, { Panel: an, Title: yc, Description: qu }); function no({ onClick: t }) { return /* @__PURE__ */ R.jsxs( "button", @@ -3707,7 +3717,7 @@ function no({ onClick: t }) { } ); } -const vc = ({ modalContext: t, config: e, children: r }) => /* @__PURE__ */ R.jsx("div", { className: "im-modal-container fixed inset-0 z-40 overflow-y-auto p-4", children: /* @__PURE__ */ R.jsx( +const mc = ({ modalContext: t, config: e, children: r }) => /* @__PURE__ */ R.jsx("div", { className: "im-modal-container fixed inset-0 z-40 overflow-y-auto p-4", children: /* @__PURE__ */ R.jsx( "div", { className: Ht("im-modal-positioner flex min-h-full justify-center", { @@ -3742,7 +3752,7 @@ const vc = ({ modalContext: t, config: e, children: r }) => /* @__PURE__ */ R.js } ) } -) }), mc = ({ modalContext: t, config: e, children: r }) => /* @__PURE__ */ R.jsx("div", { className: "im-slideover-container fixed inset-0 z-40 overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ R.jsx( +) }), hc = ({ modalContext: t, config: e, children: r }) => /* @__PURE__ */ R.jsx("div", { className: "im-slideover-container fixed inset-0 z-40 overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ R.jsx( "div", { className: Ht("im-slideover-positioner flex min-h-full items-center", { @@ -3776,8 +3786,8 @@ const vc = ({ modalContext: t, config: e, children: r }) => /* @__PURE__ */ R.js } ) } -) }), hc = Hr(({ name: t, children: e, ...r }, n) => { - const a = (l) => typeof e == "function" ? e(l) : e, o = j(null); +) }), gc = Hr(({ name: t, children: e, ...r }, n) => { + const a = (l) => typeof e == "function" ? e(l) : e, o = k(null); return na(n, () => o.current, [o]), /* @__PURE__ */ R.jsx( Fa, { @@ -3788,24 +3798,24 @@ const vc = ({ modalContext: t, config: e, children: r }) => /* @__PURE__ */ R.js afterLeave: l, close: u, config: i, - emit: d, + emit: f, getChildModal: s, - getParentModal: g, + getParentModal: h, id: v, index: w, - isOpen: f, + isOpen: d, modalContext: y, onTopOfStack: p, reload: m, - setOpen: h, + setOpen: g, shouldRender: b }) => /* @__PURE__ */ R.jsx( ro, { appear: !0, - show: f ?? !1, + show: d ?? !1, children: /* @__PURE__ */ R.jsxs( - yc, + vc, { as: "div", className: "im-dialog relative z-20", @@ -3833,7 +3843,7 @@ const vc = ({ modalContext: t, config: e, children: r }) => /* @__PURE__ */ R.js ) : null, w > 0 && p ? /* @__PURE__ */ R.jsx("div", { className: "im-backdrop fixed inset-0 z-30 bg-black/75" }) : null, i.slideover ? /* @__PURE__ */ R.jsx( - mc, + hc, { modalContext: y, config: i, @@ -3841,21 +3851,21 @@ const vc = ({ modalContext: t, config: e, children: r }) => /* @__PURE__ */ R.js afterLeave: l, close: u, config: i, - emit: d, + emit: f, getChildModal: s, - getParentModal: g, + getParentModal: h, id: v, index: w, - isOpen: f, + isOpen: d, modalContext: y, onTopOfStack: p, reload: m, - setOpen: h, + setOpen: g, shouldRender: b }) } ) : /* @__PURE__ */ R.jsx( - vc, + mc, { modalContext: y, config: i, @@ -3863,16 +3873,16 @@ const vc = ({ modalContext: t, config: e, children: r }) => /* @__PURE__ */ R.js afterLeave: l, close: u, config: i, - emit: d, + emit: f, getChildModal: s, - getParentModal: g, + getParentModal: h, id: v, index: w, - isOpen: f, + isOpen: d, modalContext: y, onTopOfStack: p, reload: m, - setOpen: h, + setOpen: g, shouldRender: b }) } @@ -3885,8 +3895,8 @@ const vc = ({ modalContext: t, config: e, children: r }) => /* @__PURE__ */ R.js } ); }); -hc.displayName = "Modal"; -const $c = ({ +gc.displayName = "Modal"; +const Rc = ({ href: t, method: e = "get", data: r = {}, @@ -3896,45 +3906,45 @@ const $c = ({ onAfterLeave: l = null, onBlur: u = null, onClose: i = null, - onError: d = null, + onError: f = null, onFocus: s = null, - onStart: g = null, + onStart: h = null, onSuccess: v = null, navigate: w = null, - children: f, + children: d, ...y }) => { - const [p, m] = Q(!1), [h, b] = Q(null), { stack: S, visit: O } = Kt(), _ = J(() => w ?? Vr("navigate"), [w]), M = {}, W = {}; + const [p, m] = Q(!1), [g, b] = Q(null), { stack: S, visit: O } = Kt(), _ = J(() => w ?? Vr("navigate"), [w]), M = {}, W = {}; Object.keys(y).forEach((T) => { zn.includes(T) || (T.startsWith("on") && typeof y[T] == "function" ? T.toLowerCase() in window ? M[T] = y[T] : W[T] = y[T] : M[T] = y[T]); }); - const [H, k] = Q(!1); - K(() => { - h && (h.onTopOfStack && H ? s == null || s() : !h.onTopOfStack && !H && (u == null || u()), k(!h.onTopOfStack)); + const [H, j] = Q(!1); + Y(() => { + g && (g.onTopOfStack && H ? s == null || s() : !g.onTopOfStack && !H && (u == null || u()), j(!g.onTopOfStack)); }, [S]); - const Y = ve(() => { + const z = ve(() => { i == null || i(); }, [i]), V = ve(() => { b(null), l == null || l(); }, [l]), $ = ve( (T) => { - T == null || T.preventDefault(), !p && (t.startsWith("#") || (m(!0), g == null || g()), O( + T == null || T.preventDefault(), !p && (t.startsWith("#") || (m(!0), h == null || h()), O( t, e, r, a, - qo(aa(y, zn)), - () => Y(S.length), + Go(aa(y, zn)), + () => z(S.length), V, o, _ ).then((D) => { b(D), D.registerEventListenersFromProps(W), v == null || v(); }).catch((D) => { - console.error(D), d == null || d(D); + console.error(D), f == null || f(D); }).finally(() => m(!1))); }, - [t, e, r, a, o, y, Y, V] + [t, e, r, a, o, y, z, V] ); return /* @__PURE__ */ R.jsx( n, @@ -3942,24 +3952,24 @@ const $c = ({ ...M, href: t, onClick: $, - children: typeof f == "function" ? f({ loading: p }) : f + children: typeof d == "function" ? d({ loading: p }) : d } ); }; -function Rc() { +function Fc() { return Kt().stack[$a()] ?? null; } export { Fa as HeadlessModal, - hc as Modal, - $c as ModalLink, - $u as ModalRoot, - Tu as ModalStackProvider, + gc as Modal, + Rc as ModalLink, + Ru as ModalRoot, + $u as ModalStackProvider, Vr as getConfig, - Oc as putConfig, - Pc as renderApp, - xc as resetConfig, - Rc as useModal, + Pc as putConfig, + Ac as renderApp, + Oc as resetConfig, + Fc as useModal, $a as useModalIndex, Kt as useModalStack }; diff --git a/react/dist/inertiaui-modal.umd.cjs b/react/dist/inertiaui-modal.umd.cjs index bc18e6a..69b641a 100644 --- a/react/dist/inertiaui-modal.umd.cjs +++ b/react/dist/inertiaui-modal.umd.cjs @@ -1,4 +1,4 @@ -(function(L,f){typeof exports=="object"&&typeof module<"u"?f(exports,require("react"),require("axios"),require("@inertiajs/react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","axios","@inertiajs/react","react-dom"],f):(L=typeof globalThis<"u"?globalThis:L||self,f(L.InertiaUIModal={},L.React,L.Axios,L.react,L.ReactDOM))})(this,function(L,f,ve,rr,Jo){"use strict";var nc=Object.defineProperty;var oc=(L,f,ve)=>f in L?nc(L,f,{enumerable:!0,configurable:!0,writable:!0,value:ve}):L[f]=ve;var ce=(L,f,ve)=>oc(L,typeof f!="symbol"?f+"":f,ve);function Qo(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return e.default=r,Object.freeze(e)}const tr=Qo(f),nr={type:"modal",navigate:!1,modal:{closeButton:!0,closeExplicitly:!1,maxWidth:"2xl",paddingClasses:"p-4 sm:p-6",panelClasses:"bg-white rounded",position:"center"},slideover:{closeButton:!0,closeExplicitly:!1,maxWidth:"md",paddingClasses:"p-4 sm:p-6",panelClasses:"bg-white min-h-screen",position:"right"}};class Zo{constructor(){this.config={},this.reset()}reset(){this.config=JSON.parse(JSON.stringify(nr))}put(e,t){if(typeof e=="object"){this.config={type:e.type??nr.type,navigate:e.navigate??nr.navigate,modal:{...nr.modal,...e.modal??{}},slideover:{...nr.slideover,...e.slideover??{}}};return}const n=e.split(".");let o=this.config;for(let a=0;a"u")return this.config;const t=e.split(".");let n=this.config;for(const o of t){if(n[o]===void 0)return null;n=n[o]}return n}}const xr=new Zo,ea=()=>xr.reset(),ra=(r,e)=>xr.put(r,e),Or=r=>xr.get(r),Ue=(r,e)=>xr.get(r?`slideover.${e}`:`modal.${e}`);var Jr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ta(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function na(r){if(r.__esModule)return r;var e=r.default;if(typeof e=="function"){var t=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(n){var o=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return r[n]}})}),t}var Qr={exports:{}},or={};/** +(function(L,f){typeof exports=="object"&&typeof module<"u"?f(exports,require("react"),require("axios"),require("@inertiajs/react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","axios","@inertiajs/react","react-dom"],f):(L=typeof globalThis<"u"?globalThis:L||self,f(L.InertiaUIModal={},L.React,L.Axios,L.react,L.ReactDOM))})(this,function(L,f,ve,Ue,Jo){"use strict";var nc=Object.defineProperty;var oc=(L,f,ve)=>f in L?nc(L,f,{enumerable:!0,configurable:!0,writable:!0,value:ve}):L[f]=ve;var le=(L,f,ve)=>oc(L,typeof f!="symbol"?f+"":f,ve);function Qo(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return e.default=r,Object.freeze(e)}const tr=Qo(f),nr={type:"modal",navigate:!1,modal:{closeButton:!0,closeExplicitly:!1,maxWidth:"2xl",paddingClasses:"p-4 sm:p-6",panelClasses:"bg-white rounded",position:"center"},slideover:{closeButton:!0,closeExplicitly:!1,maxWidth:"md",paddingClasses:"p-4 sm:p-6",panelClasses:"bg-white min-h-screen",position:"right"}};class Zo{constructor(){this.config={},this.reset()}reset(){this.config=JSON.parse(JSON.stringify(nr))}put(e,t){if(typeof e=="object"){this.config={type:e.type??nr.type,navigate:e.navigate??nr.navigate,modal:{...nr.modal,...e.modal??{}},slideover:{...nr.slideover,...e.slideover??{}}};return}const n=e.split(".");let o=this.config;for(let a=0;a"u")return this.config;const t=e.split(".");let n=this.config;for(const o of t){if(n[o]===void 0)return null;n=n[o]}return n}}const xr=new Zo,ea=()=>xr.reset(),ra=(r,e)=>xr.put(r,e),Or=r=>xr.get(r),Be=(r,e)=>xr.get(r?`slideover.${e}`:`modal.${e}`);var Jr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ta(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function na(r){if(r.__esModule)return r;var e=r.default;if(typeof e=="function"){var t=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(n){var o=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return r[n]}})}),t}var Qr={exports:{}},or={};/** * @license React * react-jsx-runtime.production.min.js * @@ -6,7 +6,7 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Jt;function oa(){if(Jt)return or;Jt=1;var r=f,e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,o=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function l(u,i,p){var s,b={},v=null,E=null;p!==void 0&&(v=""+p),i.key!==void 0&&(v=""+i.key),i.ref!==void 0&&(E=i.ref);for(s in i)n.call(i,s)&&!a.hasOwnProperty(s)&&(b[s]=i[s]);if(u&&u.defaultProps)for(s in i=u.defaultProps,i)b[s]===void 0&&(b[s]=i[s]);return{$$typeof:e,type:u,key:v,ref:E,props:b,_owner:o.current}}return or.Fragment=t,or.jsx=l,or.jsxs=l,or}var ar={};/** + */var Jt;function oa(){if(Jt)return or;Jt=1;var r=f,e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,o=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function l(u,i,d){var s,g={},v=null,E=null;d!==void 0&&(v=""+d),i.key!==void 0&&(v=""+i.key),i.ref!==void 0&&(E=i.ref);for(s in i)n.call(i,s)&&!a.hasOwnProperty(s)&&(g[s]=i[s]);if(u&&u.defaultProps)for(s in i=u.defaultProps,i)g[s]===void 0&&(g[s]=i[s]);return{$$typeof:e,type:u,key:v,ref:E,props:g,_owner:o.current}}return or.Fragment=t,or.jsx=l,or.jsxs=l,or}var ar={};/** * @license React * react-jsx-runtime.development.js * @@ -14,25 +14,25 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Qt;function aa(){return Qt||(Qt=1,process.env.NODE_ENV!=="production"&&function(){var r=f,e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),u=Symbol.for("react.context"),i=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),s=Symbol.for("react.suspense_list"),b=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),E=Symbol.for("react.offscreen"),d=Symbol.iterator,m="@@iterator";function y(c){if(c===null||typeof c!="object")return null;var S=d&&c[d]||c[m];return typeof S=="function"?S:null}var h=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function g(c){{for(var S=arguments.length,O=new Array(S>1?S-1:0),A=1;A1?S-1:0),A=1;A=1&&Y>=0&&M[G]!==re[Y];)Y--;for(;G>=1&&Y>=0;G--,Y--)if(M[G]!==re[Y]){if(G!==1||Y!==1)do if(G--,Y--,Y<0||M[G]!==re[Y]){var ie=` -`+M[G].replace(" at new "," at ");return c.displayName&&ie.includes("")&&(ie=ie.replace("",c.displayName)),typeof c=="function"&&Yr.set(c,ie),ie}while(G>=1&&Y>=0);break}}}finally{we=!1,wr.current=W,je(),Error.prepareStackTrace=N}var er=c?c.displayName||c.name:"",We=er?be(er):"";return typeof c=="function"&&Yr.set(c,We),We}function _s(c,S,O){return jo(c,!1)}function Ds(c){var S=c.prototype;return!!(S&&S.isReactComponent)}function Kr(c,S,O){if(c==null)return"";if(typeof c=="function")return jo(c,Ds(c));if(typeof c=="string")return be(c);switch(c){case p:return be("Suspense");case s:return be("SuspenseList")}if(typeof c=="object")switch(c.$$typeof){case i:return _s(c.render);case b:return Kr(c.type,S,O);case v:{var A=c,N=A._payload,W=A._init;try{return Kr(W(N),S,O)}catch{}}}return""}var Er=Object.prototype.hasOwnProperty,Lo={},Wo=h.ReactDebugCurrentFrame;function Xr(c){if(c){var S=c._owner,O=Kr(c.type,c._source,S?S.type:null);Wo.setExtraStackFrame(O)}else Wo.setExtraStackFrame(null)}function ks(c,S,O,A,N){{var W=Function.call.bind(Er);for(var I in c)if(W(c,I)){var M=void 0;try{if(typeof c[I]!="function"){var re=Error((A||"React class")+": "+O+" type `"+I+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof c[I]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw re.name="Invariant Violation",re}M=c[I](S,I,A,O,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(G){M=G}M&&!(M instanceof Error)&&(Xr(N),g("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",A||"React class",O,I,typeof M),Xr(null)),M instanceof Error&&!(M.message in Lo)&&(Lo[M.message]=!0,Xr(N),g("Failed %s type: %s",O,M.message),Xr(null))}}}var Ns=Array.isArray;function qt(c){return Ns(c)}function js(c){{var S=typeof Symbol=="function"&&Symbol.toStringTag,O=S&&c[Symbol.toStringTag]||c.constructor.name||"Object";return O}}function Ls(c){try{return Uo(c),!1}catch{return!0}}function Uo(c){return""+c}function Bo(c){if(Ls(c))return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",js(c)),Uo(c)}var Sr=h.ReactCurrentOwner,Ws={key:!0,ref:!0,__self:!0,__source:!0},Ro,Ho,Gt;Gt={};function Us(c){if(Er.call(c,"ref")){var S=Object.getOwnPropertyDescriptor(c,"ref").get;if(S&&S.isReactWarning)return!1}return c.ref!==void 0}function Bs(c){if(Er.call(c,"key")){var S=Object.getOwnPropertyDescriptor(c,"key").get;if(S&&S.isReactWarning)return!1}return c.key!==void 0}function Rs(c,S){if(typeof c.ref=="string"&&Sr.current&&S&&Sr.current.stateNode!==S){var O=C(Sr.current.type);Gt[O]||(g('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',C(Sr.current.type),c.ref),Gt[O]=!0)}}function Hs(c,S){{var O=function(){Ro||(Ro=!0,g("%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://reactjs.org/link/special-props)",S))};O.isReactWarning=!0,Object.defineProperty(c,"key",{get:O,configurable:!0})}}function Vs(c,S){{var O=function(){Ho||(Ho=!0,g("%s: `ref` 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://reactjs.org/link/special-props)",S))};O.isReactWarning=!0,Object.defineProperty(c,"ref",{get:O,configurable:!0})}}var qs=function(c,S,O,A,N,W,I){var M={$$typeof:e,type:c,key:S,ref:O,props:I,_owner:W};return M._store={},Object.defineProperty(M._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(M,"_self",{configurable:!1,enumerable:!1,writable:!1,value:A}),Object.defineProperty(M,"_source",{configurable:!1,enumerable:!1,writable:!1,value:N}),Object.freeze&&(Object.freeze(M.props),Object.freeze(M)),M};function Gs(c,S,O,A,N){{var W,I={},M=null,re=null;O!==void 0&&(Bo(O),M=""+O),Bs(S)&&(Bo(S.key),M=""+S.key),Us(S)&&(re=S.ref,Rs(S,N));for(W in S)Er.call(S,W)&&!Ws.hasOwnProperty(W)&&(I[W]=S[W]);if(c&&c.defaultProps){var G=c.defaultProps;for(W in G)I[W]===void 0&&(I[W]=G[W])}if(M||re){var Y=typeof c=="function"?c.displayName||c.name||"Unknown":c;M&&Hs(I,Y),re&&Vs(I,Y)}return qs(c,M,re,N,A,Sr.current,I)}}var zt=h.ReactCurrentOwner,Vo=h.ReactDebugCurrentFrame;function Ze(c){if(c){var S=c._owner,O=Kr(c.type,c._source,S?S.type:null);Vo.setExtraStackFrame(O)}else Vo.setExtraStackFrame(null)}var Yt;Yt=!1;function Kt(c){return typeof c=="object"&&c!==null&&c.$$typeof===e}function qo(){{if(zt.current){var c=C(zt.current.type);if(c)return` +`+M[G].replace(" at new "," at ");return c.displayName&&ie.includes("")&&(ie=ie.replace("",c.displayName)),typeof c=="function"&&Yr.set(c,ie),ie}while(G>=1&&Y>=0);break}}}finally{we=!1,wr.current=W,je(),Error.prepareStackTrace=N}var rr=c?c.displayName||c.name:"",We=rr?be(rr):"";return typeof c=="function"&&Yr.set(c,We),We}function _s(c,S,O){return jo(c,!1)}function Ds(c){var S=c.prototype;return!!(S&&S.isReactComponent)}function Kr(c,S,O){if(c==null)return"";if(typeof c=="function")return jo(c,Ds(c));if(typeof c=="string")return be(c);switch(c){case d:return be("Suspense");case s:return be("SuspenseList")}if(typeof c=="object")switch(c.$$typeof){case i:return _s(c.render);case g:return Kr(c.type,S,O);case v:{var A=c,N=A._payload,W=A._init;try{return Kr(W(N),S,O)}catch{}}}return""}var Er=Object.prototype.hasOwnProperty,Lo={},Wo=h.ReactDebugCurrentFrame;function Xr(c){if(c){var S=c._owner,O=Kr(c.type,c._source,S?S.type:null);Wo.setExtraStackFrame(O)}else Wo.setExtraStackFrame(null)}function ks(c,S,O,A,N){{var W=Function.call.bind(Er);for(var I in c)if(W(c,I)){var M=void 0;try{if(typeof c[I]!="function"){var re=Error((A||"React class")+": "+O+" type `"+I+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof c[I]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw re.name="Invariant Violation",re}M=c[I](S,I,A,O,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(G){M=G}M&&!(M instanceof Error)&&(Xr(N),b("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",A||"React class",O,I,typeof M),Xr(null)),M instanceof Error&&!(M.message in Lo)&&(Lo[M.message]=!0,Xr(N),b("Failed %s type: %s",O,M.message),Xr(null))}}}var Ns=Array.isArray;function qt(c){return Ns(c)}function js(c){{var S=typeof Symbol=="function"&&Symbol.toStringTag,O=S&&c[Symbol.toStringTag]||c.constructor.name||"Object";return O}}function Ls(c){try{return Uo(c),!1}catch{return!0}}function Uo(c){return""+c}function Bo(c){if(Ls(c))return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",js(c)),Uo(c)}var Sr=h.ReactCurrentOwner,Ws={key:!0,ref:!0,__self:!0,__source:!0},Ro,Ho,Gt;Gt={};function Us(c){if(Er.call(c,"ref")){var S=Object.getOwnPropertyDescriptor(c,"ref").get;if(S&&S.isReactWarning)return!1}return c.ref!==void 0}function Bs(c){if(Er.call(c,"key")){var S=Object.getOwnPropertyDescriptor(c,"key").get;if(S&&S.isReactWarning)return!1}return c.key!==void 0}function Rs(c,S){if(typeof c.ref=="string"&&Sr.current&&S&&Sr.current.stateNode!==S){var O=C(Sr.current.type);Gt[O]||(b('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',C(Sr.current.type),c.ref),Gt[O]=!0)}}function Hs(c,S){{var O=function(){Ro||(Ro=!0,b("%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://reactjs.org/link/special-props)",S))};O.isReactWarning=!0,Object.defineProperty(c,"key",{get:O,configurable:!0})}}function Vs(c,S){{var O=function(){Ho||(Ho=!0,b("%s: `ref` 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://reactjs.org/link/special-props)",S))};O.isReactWarning=!0,Object.defineProperty(c,"ref",{get:O,configurable:!0})}}var qs=function(c,S,O,A,N,W,I){var M={$$typeof:e,type:c,key:S,ref:O,props:I,_owner:W};return M._store={},Object.defineProperty(M._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(M,"_self",{configurable:!1,enumerable:!1,writable:!1,value:A}),Object.defineProperty(M,"_source",{configurable:!1,enumerable:!1,writable:!1,value:N}),Object.freeze&&(Object.freeze(M.props),Object.freeze(M)),M};function Gs(c,S,O,A,N){{var W,I={},M=null,re=null;O!==void 0&&(Bo(O),M=""+O),Bs(S)&&(Bo(S.key),M=""+S.key),Us(S)&&(re=S.ref,Rs(S,N));for(W in S)Er.call(S,W)&&!Ws.hasOwnProperty(W)&&(I[W]=S[W]);if(c&&c.defaultProps){var G=c.defaultProps;for(W in G)I[W]===void 0&&(I[W]=G[W])}if(M||re){var Y=typeof c=="function"?c.displayName||c.name||"Unknown":c;M&&Hs(I,Y),re&&Vs(I,Y)}return qs(c,M,re,N,A,Sr.current,I)}}var zt=h.ReactCurrentOwner,Vo=h.ReactDebugCurrentFrame;function er(c){if(c){var S=c._owner,O=Kr(c.type,c._source,S?S.type:null);Vo.setExtraStackFrame(O)}else Vo.setExtraStackFrame(null)}var Yt;Yt=!1;function Kt(c){return typeof c=="object"&&c!==null&&c.$$typeof===e}function qo(){{if(zt.current){var c=C(zt.current.type);if(c)return` Check the render method of \``+c+"`."}return""}}function zs(c){return""}var Go={};function Ys(c){{var S=qo();if(!S){var O=typeof c=="string"?c:c.displayName||c.name;O&&(S=` -Check the top-level render call using <`+O+">.")}return S}}function zo(c,S){{if(!c._store||c._store.validated||c.key!=null)return;c._store.validated=!0;var O=Ys(S);if(Go[O])return;Go[O]=!0;var A="";c&&c._owner&&c._owner!==zt.current&&(A=" It was passed a child from "+C(c._owner.type)+"."),Ze(c),g('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',O,A),Ze(null)}}function Yo(c,S){{if(typeof c!="object")return;if(qt(c))for(var O=0;O",M=" Did you accidentally export a JSX literal instead of a component?"):G=typeof c,g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",G,M)}var Y=Gs(c,S,O,N,W);if(Y==null)return Y;if(I){var ie=S.children;if(ie!==void 0)if(A)if(qt(ie)){for(var er=0;er0?"{key: someKey, "+ne.join(": ..., ")+": ...}":"{key: someKey}";if(!Ko[We+Xt]){var rc=ne.length>0?"{"+ne.join(": ..., ")+": ...}":"{}";g(`A props object containing a "key" prop is being spread into JSX: +Check the top-level render call using <`+O+">.")}return S}}function zo(c,S){{if(!c._store||c._store.validated||c.key!=null)return;c._store.validated=!0;var O=Ys(S);if(Go[O])return;Go[O]=!0;var A="";c&&c._owner&&c._owner!==zt.current&&(A=" It was passed a child from "+C(c._owner.type)+"."),er(c),b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',O,A),er(null)}}function Yo(c,S){{if(typeof c!="object")return;if(qt(c))for(var O=0;O",M=" Did you accidentally export a JSX literal instead of a component?"):G=typeof c,b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",G,M)}var Y=Gs(c,S,O,N,W);if(Y==null)return Y;if(I){var ie=S.children;if(ie!==void 0)if(A)if(qt(ie)){for(var rr=0;rr0?"{key: someKey, "+ne.join(": ..., ")+": ...}":"{key: someKey}";if(!Ko[We+Xt]){var rc=ne.length>0?"{"+ne.join(": ..., ")+": ...}":"{}";b(`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} />`,Xt,We,rc,We),Ko[We+Xt]=!0}}return c===n?Xs(Y):Ks(Y),Y}}function Js(c,S,O){return Xo(c,S,O,!0)}function Qs(c,S,O){return Xo(c,S,O,!1)}var Zs=Qs,ec=Js;ar.Fragment=n,ar.jsx=Zs,ar.jsxs=ec}()),ar}process.env.NODE_ENV==="production"?Qr.exports=oa():Qr.exports=aa();var $=Qr.exports;function ia(r,e){return Array.isArray(r)?r.filter(t=>!e.includes(t)):Object.keys(r).reduce((t,n)=>(e.includes(n)||(t[n]=r[n]),t),{})}function Zt(r,e){return Array.isArray(r)?r.filter(t=>e.includes(t)):e.reduce((t,n)=>(n in r&&(t[n]=r[n]),t),{})}function la(r){return Array.isArray(r)?r.filter(e=>e!==null):Object.keys(r).reduce((e,t)=>(t in r&&r[t]!==null&&(e[t]=r[t]),e),{})}function ua(r,e=3,t=10){return new Promise((n,o)=>{const a=r();if(a){n(a);return}let l=e*1e3/t;const u=setInterval(()=>{const i=r();i&&(clearInterval(u),n(i)),--l<=0&&(clearInterval(u),o(new Error("Condition not met in time")))},t)})}var sa=function(e){return ca(e)&&!fa(e)};function ca(r){return!!r&&typeof r=="object"}function fa(r){var e=Object.prototype.toString.call(r);return e==="[object RegExp]"||e==="[object Date]"||ya(r)}var da=typeof Symbol=="function"&&Symbol.for,pa=da?Symbol.for("react.element"):60103;function ya(r){return r.$$typeof===pa}function ma(r){return Array.isArray(r)?[]:{}}function ir(r,e){return e.clone!==!1&&e.isMergeableObject(r)?Be(ma(r),r,e):r}function va(r,e,t){return r.concat(e).map(function(n){return ir(n,t)})}function ha(r,e){if(!e.customMerge)return Be;var t=e.customMerge(r);return typeof t=="function"?t:Be}function ga(r){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(r).filter(function(e){return Object.propertyIsEnumerable.call(r,e)}):[]}function en(r){return Object.keys(r).concat(ga(r))}function rn(r,e){try{return e in r}catch{return!1}}function ba(r,e){return rn(r,e)&&!(Object.hasOwnProperty.call(r,e)&&Object.propertyIsEnumerable.call(r,e))}function wa(r,e,t){var n={};return t.isMergeableObject(r)&&en(r).forEach(function(o){n[o]=ir(r[o],t)}),en(e).forEach(function(o){ba(r,o)||(rn(r,o)&&t.isMergeableObject(e[o])?n[o]=ha(o,t)(r[o],e[o],t):n[o]=ir(e[o],t))}),n}function Be(r,e,t){t=t||{},t.arrayMerge=t.arrayMerge||va,t.isMergeableObject=t.isMergeableObject||sa,t.cloneUnlessOtherwiseSpecified=ir;var n=Array.isArray(e),o=Array.isArray(r),a=n===o;return a?n?t.arrayMerge(r,e,t):wa(r,e,t):ir(e,t)}Be.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(n,o){return Be(n,o,t)},{})};var Ea=Be,Sa=Ea;const xa=ta(Sa);var Oa=Error,Pa=EvalError,Aa=RangeError,Ta=ReferenceError,tn=SyntaxError,lr=TypeError,$a=URIError,Ca=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var o=42;e[t]=o;for(t in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(e,t);if(l.value!==o||l.enumerable!==!0)return!1}return!0},nn=typeof Symbol<"u"&&Symbol,Fa=Ca,Ma=function(){return typeof nn!="function"||typeof Symbol!="function"||typeof nn("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Fa()},Zr={__proto__:null,foo:{}},Ia=Object,_a=function(){return{__proto__:Zr}.foo===Zr.foo&&!(Zr instanceof Ia)},Da="Function.prototype.bind called on incompatible ",ka=Object.prototype.toString,Na=Math.max,ja="[object Function]",on=function(e,t){for(var n=[],o=0;o"u"||!X?F:X(Uint8Array),Ce={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?F:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?F:ArrayBuffer,"%ArrayIteratorPrototype%":Ve&&X?X([][Symbol.iterator]()):F,"%AsyncFromSyncIteratorPrototype%":F,"%AsyncFunction%":qe,"%AsyncGenerator%":qe,"%AsyncGeneratorFunction%":qe,"%AsyncIteratorPrototype%":qe,"%Atomics%":typeof Atomics>"u"?F:Atomics,"%BigInt%":typeof BigInt>"u"?F:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?F:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?F:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?F:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Ga,"%eval%":eval,"%EvalError%":za,"%Float32Array%":typeof Float32Array>"u"?F:Float32Array,"%Float64Array%":typeof Float64Array>"u"?F:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?F:FinalizationRegistry,"%Function%":an,"%GeneratorFunction%":qe,"%Int8Array%":typeof Int8Array>"u"?F:Int8Array,"%Int16Array%":typeof Int16Array>"u"?F:Int16Array,"%Int32Array%":typeof Int32Array>"u"?F:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ve&&X?X(X([][Symbol.iterator]())):F,"%JSON%":typeof JSON=="object"?JSON:F,"%Map%":typeof Map>"u"?F:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ve||!X?F:X(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?F:Promise,"%Proxy%":typeof Proxy>"u"?F:Proxy,"%RangeError%":Ya,"%ReferenceError%":Ka,"%Reflect%":typeof Reflect>"u"?F:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?F:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ve||!X?F:X(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?F:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ve&&X?X(""[Symbol.iterator]()):F,"%Symbol%":Ve?Symbol:F,"%SyntaxError%":Re,"%ThrowTypeError%":Ja,"%TypedArray%":Za,"%TypeError%":He,"%Uint8Array%":typeof Uint8Array>"u"?F:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?F:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?F:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?F:Uint32Array,"%URIError%":Xa,"%WeakMap%":typeof WeakMap>"u"?F:WeakMap,"%WeakRef%":typeof WeakRef>"u"?F:WeakRef,"%WeakSet%":typeof WeakSet>"u"?F:WeakSet};if(X)try{null.error}catch(r){var ei=X(X(r));Ce["%Error.prototype%"]=ei}var ri=function r(e){var t;if(e==="%AsyncFunction%")t=rt("async function () {}");else if(e==="%GeneratorFunction%")t=rt("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=rt("async function* () {}");else if(e==="%AsyncGenerator%"){var n=r("%AsyncGeneratorFunction%");n&&(t=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var o=r("%AsyncGenerator%");o&&X&&(t=X(o.prototype))}return Ce[e]=t,t},ln={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ur=et,Pr=qa,ti=ur.call(Function.call,Array.prototype.concat),ni=ur.call(Function.apply,Array.prototype.splice),un=ur.call(Function.call,String.prototype.replace),Ar=ur.call(Function.call,String.prototype.slice),oi=ur.call(Function.call,RegExp.prototype.exec),ai=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ii=/\\(\\)?/g,li=function(e){var t=Ar(e,0,1),n=Ar(e,-1);if(t==="%"&&n!=="%")throw new Re("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&t!=="%")throw new Re("invalid intrinsic syntax, expected opening `%`");var o=[];return un(e,ai,function(a,l,u,i){o[o.length]=u?un(i,ii,"$1"):l||a}),o},ui=function(e,t){var n=e,o;if(Pr(ln,n)&&(o=ln[n],n="%"+o[0]+"%"),Pr(Ce,n)){var a=Ce[n];if(a===qe&&(a=ri(n)),typeof a>"u"&&!t)throw new He("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:a}}throw new Re("intrinsic "+e+" does not exist!")},Ge=function(e,t){if(typeof e!="string"||e.length===0)throw new He("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new He('"allowMissing" argument must be a boolean');if(oi(/^%?[^%]*%?$/,e)===null)throw new Re("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=li(e),o=n.length>0?n[0]:"",a=ui("%"+o+"%",t),l=a.name,u=a.value,i=!1,p=a.alias;p&&(o=p[0],ni(n,ti([0,1],p)));for(var s=1,b=!0;s=n.length){var m=$e(u,v);b=!!m,b&&"get"in m&&!("originalValue"in m.get)?u=m.get:u=u[v]}else b=Pr(u,v),u=u[v];b&&!i&&(Ce[l]=u)}}return u},sn={exports:{}},nt,cn;function ot(){if(cn)return nt;cn=1;var r=Ge,e=r("%Object.defineProperty%",!0)||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return nt=e,nt}var si=Ge,Tr=si("%Object.getOwnPropertyDescriptor%",!0);if(Tr)try{Tr([],"length")}catch{Tr=null}var fn=Tr,dn=ot(),ci=tn,ze=lr,pn=fn,fi=function(e,t,n){if(!e||typeof e!="object"&&typeof e!="function")throw new ze("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new ze("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new ze("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new ze("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new ze("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new ze("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,a=arguments.length>4?arguments[4]:null,l=arguments.length>5?arguments[5]:null,u=arguments.length>6?arguments[6]:!1,i=!!pn&&pn(e,t);if(dn)dn(e,t,{configurable:l===null&&i?i.configurable:!l,enumerable:o===null&&i?i.enumerable:!o,value:n,writable:a===null&&i?i.writable:!a});else if(u||!o&&!a&&!l)e[t]=n;else throw new ci("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},at=ot(),yn=function(){return!!at};yn.hasArrayLengthDefineBug=function(){if(!at)return null;try{return at([],"length",{value:1}).length!==1}catch{return!0}};var di=yn,pi=Ge,mn=fi,yi=di(),vn=fn,hn=lr,mi=pi("%Math.floor%"),vi=function(e,t){if(typeof e!="function")throw new hn("`fn` is not a function");if(typeof t!="number"||t<0||t>4294967295||mi(t)!==t)throw new hn("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],o=!0,a=!0;if("length"in e&&vn){var l=vn(e,"length");l&&!l.configurable&&(o=!1),l&&!l.writable&&(a=!1)}return(o||a||!n)&&(yi?mn(e,"length",t,!0,!0):mn(e,"length",t)),e};(function(r){var e=et,t=Ge,n=vi,o=lr,a=t("%Function.prototype.apply%"),l=t("%Function.prototype.call%"),u=t("%Reflect.apply%",!0)||e.call(l,a),i=ot(),p=t("%Math.max%");r.exports=function(v){if(typeof v!="function")throw new o("a function is required");var E=u(e,l,arguments);return n(E,1+p(0,v.length-(arguments.length-1)),!0)};var s=function(){return u(e,a,arguments)};i?i(r.exports,"apply",{value:s}):r.exports.apply=s})(sn);var hi=sn.exports,gn=Ge,bn=hi,gi=bn(gn("String.prototype.indexOf")),bi=function(e,t){var n=gn(e,!!t);return typeof n=="function"&&gi(e,".prototype.")>-1?bn(n):n};const wi=na(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var it=typeof Map=="function"&&Map.prototype,lt=Object.getOwnPropertyDescriptor&&it?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,$r=it&<&&typeof lt.get=="function"?lt.get:null,wn=it&&Map.prototype.forEach,ut=typeof Set=="function"&&Set.prototype,st=Object.getOwnPropertyDescriptor&&ut?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Cr=ut&&st&&typeof st.get=="function"?st.get:null,En=ut&&Set.prototype.forEach,Ei=typeof WeakMap=="function"&&WeakMap.prototype,sr=Ei?WeakMap.prototype.has:null,Si=typeof WeakSet=="function"&&WeakSet.prototype,cr=Si?WeakSet.prototype.has:null,xi=typeof WeakRef=="function"&&WeakRef.prototype,Sn=xi?WeakRef.prototype.deref:null,Oi=Boolean.prototype.valueOf,Pi=Object.prototype.toString,Ai=Function.prototype.toString,Ti=String.prototype.match,ct=String.prototype.slice,Ee=String.prototype.replace,$i=String.prototype.toUpperCase,xn=String.prototype.toLowerCase,On=RegExp.prototype.test,Pn=Array.prototype.concat,fe=Array.prototype.join,Ci=Array.prototype.slice,An=Math.floor,ft=typeof BigInt=="function"?BigInt.prototype.valueOf:null,dt=Object.getOwnPropertySymbols,pt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Ye=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Q=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Ye||!0)?Symbol.toStringTag:null,Tn=Object.prototype.propertyIsEnumerable,$n=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(r){return r.__proto__}:null);function Cn(r,e){if(r===1/0||r===-1/0||r!==r||r&&r>-1e3&&r<1e3||On.call(/e/,e))return e;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof r=="number"){var n=r<0?-An(-r):An(r);if(n!==r){var o=String(n),a=ct.call(e,o.length+1);return Ee.call(o,t,"$&_")+"."+Ee.call(Ee.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Ee.call(e,t,"$&_")}var yt=wi,Fn=yt.custom,Mn=Dn(Fn)?Fn:null,Fi=function r(e,t,n,o){var a=t||{};if(Se(a,"quoteStyle")&&a.quoteStyle!=="single"&&a.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Se(a,"maxStringLength")&&(typeof a.maxStringLength=="number"?a.maxStringLength<0&&a.maxStringLength!==1/0:a.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var l=Se(a,"customInspect")?a.customInspect:!0;if(typeof l!="boolean"&&l!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Se(a,"indent")&&a.indent!==null&&a.indent!==" "&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Se(a,"numericSeparator")&&typeof a.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var u=a.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return Nn(e,a);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var i=String(e);return u?Cn(e,i):i}if(typeof e=="bigint"){var p=String(e)+"n";return u?Cn(e,p):p}var s=typeof a.depth>"u"?5:a.depth;if(typeof n>"u"&&(n=0),n>=s&&s>0&&typeof e=="object")return mt(e)?"[Array]":"[Object]";var b=Yi(a,n);if(typeof o>"u")o=[];else if(kn(o,e)>=0)return"[Circular]";function v(C,T,k){if(T&&(o=Ci.call(o),o.push(T)),k){var oe={depth:a.depth};return Se(a,"quoteStyle")&&(oe.quoteStyle=a.quoteStyle),r(C,oe,n+1,o)}return r(C,a,n+1,o)}if(typeof e=="function"&&!_n(e)){var E=Wi(e),d=Fr(e,v);return"[Function"+(E?": "+E:" (anonymous)")+"]"+(d.length>0?" { "+fe.call(d,", ")+" }":"")}if(Dn(e)){var m=Ye?Ee.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):pt.call(e);return typeof e=="object"&&!Ye?fr(m):m}if(qi(e)){for(var y="<"+xn.call(String(e.nodeName)),h=e.attributes||[],g=0;g",y}if(mt(e)){if(e.length===0)return"[]";var w=Fr(e,v);return b&&!zi(w)?"["+ht(w,b)+"]":"[ "+fe.call(w,", ")+" ]"}if(_i(e)){var x=Fr(e,v);return!("cause"in Error.prototype)&&"cause"in e&&!Tn.call(e,"cause")?"{ ["+String(e)+"] "+fe.call(Pn.call("[cause]: "+v(e.cause),x),", ")+" }":x.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+fe.call(x,", ")+" }"}if(typeof e=="object"&&l){if(Mn&&typeof e[Mn]=="function"&&yt)return yt(e,{depth:s-n});if(l!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(Ui(e)){var P=[];return wn&&wn.call(e,function(C,T){P.push(v(T,e,!0)+" => "+v(C,e))}),jn("Map",$r.call(e),P,b)}if(Hi(e)){var D=[];return En&&En.call(e,function(C){D.push(v(C,e))}),jn("Set",Cr.call(e),D,b)}if(Bi(e))return vt("WeakMap");if(Vi(e))return vt("WeakSet");if(Ri(e))return vt("WeakRef");if(ki(e))return fr(v(Number(e)));if(ji(e))return fr(v(ft.call(e)));if(Ni(e))return fr(Oi.call(e));if(Di(e))return fr(v(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(typeof globalThis<"u"&&e===globalThis||typeof Jr<"u"&&e===Jr)return"{ [object globalThis] }";if(!Ii(e)&&!_n(e)){var _=Fr(e,v),U=$n?$n(e)===Object.prototype:e instanceof Object||e.constructor===Object,H=e instanceof Object?"":"null prototype",j=!U&&Q&&Object(e)===e&&Q in e?ct.call(xe(e),8,-1):H?"Object":"",z=U||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",V=z+(j||H?"["+fe.call(Pn.call([],j||[],H||[]),": ")+"] ":"");return _.length===0?V+"{}":b?V+"{"+ht(_,b)+"}":V+"{ "+fe.call(_,", ")+" }"}return String(e)};function In(r,e,t){var n=(t.quoteStyle||e)==="double"?'"':"'";return n+r+n}function Mi(r){return Ee.call(String(r),/"/g,""")}function mt(r){return xe(r)==="[object Array]"&&(!Q||!(typeof r=="object"&&Q in r))}function Ii(r){return xe(r)==="[object Date]"&&(!Q||!(typeof r=="object"&&Q in r))}function _n(r){return xe(r)==="[object RegExp]"&&(!Q||!(typeof r=="object"&&Q in r))}function _i(r){return xe(r)==="[object Error]"&&(!Q||!(typeof r=="object"&&Q in r))}function Di(r){return xe(r)==="[object String]"&&(!Q||!(typeof r=="object"&&Q in r))}function ki(r){return xe(r)==="[object Number]"&&(!Q||!(typeof r=="object"&&Q in r))}function Ni(r){return xe(r)==="[object Boolean]"&&(!Q||!(typeof r=="object"&&Q in r))}function Dn(r){if(Ye)return r&&typeof r=="object"&&r instanceof Symbol;if(typeof r=="symbol")return!0;if(!r||typeof r!="object"||!pt)return!1;try{return pt.call(r),!0}catch{}return!1}function ji(r){if(!r||typeof r!="object"||!ft)return!1;try{return ft.call(r),!0}catch{}return!1}var Li=Object.prototype.hasOwnProperty||function(r){return r in this};function Se(r,e){return Li.call(r,e)}function xe(r){return Pi.call(r)}function Wi(r){if(r.name)return r.name;var e=Ti.call(Ai.call(r),/^function\s*([\w$]+)/);return e?e[1]:null}function kn(r,e){if(r.indexOf)return r.indexOf(e);for(var t=0,n=r.length;te.maxStringLength){var t=r.length-e.maxStringLength,n="... "+t+" more character"+(t>1?"s":"");return Nn(ct.call(r,0,e.maxStringLength),e)+n}var o=Ee.call(Ee.call(r,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Gi);return In(o,"single",e)}function Gi(r){var e=r.charCodeAt(0),t={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return t?"\\"+t:"\\x"+(e<16?"0":"")+$i.call(e.toString(16))}function fr(r){return"Object("+r+")"}function vt(r){return r+" { ? }"}function jn(r,e,t,n){var o=n?ht(t,n):fe.call(t,", ");return r+" ("+e+") {"+o+"}"}function zi(r){for(var e=0;e`,Xt,We,rc,We),Ko[We+Xt]=!0}}return c===n?Xs(Y):Ks(Y),Y}}function Js(c,S,O){return Xo(c,S,O,!0)}function Qs(c,S,O){return Xo(c,S,O,!1)}var Zs=Qs,ec=Js;ar.Fragment=n,ar.jsx=Zs,ar.jsxs=ec}()),ar}process.env.NODE_ENV==="production"?Qr.exports=oa():Qr.exports=aa();var $=Qr.exports;function ia(r,e){return Array.isArray(r)?r.filter(t=>!e.includes(t)):Object.keys(r).reduce((t,n)=>(e.includes(n)||(t[n]=r[n]),t),{})}function Zt(r,e){return Array.isArray(r)?r.filter(t=>e.includes(t)):e.reduce((t,n)=>(n in r&&(t[n]=r[n]),t),{})}function la(r){return Array.isArray(r)?r.filter(e=>e!==null):Object.keys(r).reduce((e,t)=>(t in r&&r[t]!==null&&(e[t]=r[t]),e),{})}function ua(r,e=3,t=10){return new Promise((n,o)=>{const a=r();if(a){n(a);return}let l=e*1e3/t;const u=setInterval(()=>{const i=r();i&&(clearInterval(u),n(i)),--l<=0&&(clearInterval(u),o(new Error("Condition not met in time")))},t)})}var sa=function(e){return ca(e)&&!fa(e)};function ca(r){return!!r&&typeof r=="object"}function fa(r){var e=Object.prototype.toString.call(r);return e==="[object RegExp]"||e==="[object Date]"||ya(r)}var da=typeof Symbol=="function"&&Symbol.for,pa=da?Symbol.for("react.element"):60103;function ya(r){return r.$$typeof===pa}function ma(r){return Array.isArray(r)?[]:{}}function ir(r,e){return e.clone!==!1&&e.isMergeableObject(r)?Re(ma(r),r,e):r}function va(r,e,t){return r.concat(e).map(function(n){return ir(n,t)})}function ha(r,e){if(!e.customMerge)return Re;var t=e.customMerge(r);return typeof t=="function"?t:Re}function ga(r){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(r).filter(function(e){return Object.propertyIsEnumerable.call(r,e)}):[]}function en(r){return Object.keys(r).concat(ga(r))}function rn(r,e){try{return e in r}catch{return!1}}function ba(r,e){return rn(r,e)&&!(Object.hasOwnProperty.call(r,e)&&Object.propertyIsEnumerable.call(r,e))}function wa(r,e,t){var n={};return t.isMergeableObject(r)&&en(r).forEach(function(o){n[o]=ir(r[o],t)}),en(e).forEach(function(o){ba(r,o)||(rn(r,o)&&t.isMergeableObject(e[o])?n[o]=ha(o,t)(r[o],e[o],t):n[o]=ir(e[o],t))}),n}function Re(r,e,t){t=t||{},t.arrayMerge=t.arrayMerge||va,t.isMergeableObject=t.isMergeableObject||sa,t.cloneUnlessOtherwiseSpecified=ir;var n=Array.isArray(e),o=Array.isArray(r),a=n===o;return a?n?t.arrayMerge(r,e,t):wa(r,e,t):ir(e,t)}Re.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(n,o){return Re(n,o,t)},{})};var Ea=Re,Sa=Ea;const xa=ta(Sa);var Oa=Error,Pa=EvalError,Aa=RangeError,Ta=ReferenceError,tn=SyntaxError,lr=TypeError,$a=URIError,Ca=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var o=42;e[t]=o;for(t in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(e,t);if(l.value!==o||l.enumerable!==!0)return!1}return!0},nn=typeof Symbol<"u"&&Symbol,Fa=Ca,Ma=function(){return typeof nn!="function"||typeof Symbol!="function"||typeof nn("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Fa()},Zr={__proto__:null,foo:{}},Ia=Object,_a=function(){return{__proto__:Zr}.foo===Zr.foo&&!(Zr instanceof Ia)},Da="Function.prototype.bind called on incompatible ",ka=Object.prototype.toString,Na=Math.max,ja="[object Function]",on=function(e,t){for(var n=[],o=0;o"u"||!X?F:X(Uint8Array),Ce={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?F:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?F:ArrayBuffer,"%ArrayIteratorPrototype%":qe&&X?X([][Symbol.iterator]()):F,"%AsyncFromSyncIteratorPrototype%":F,"%AsyncFunction%":Ge,"%AsyncGenerator%":Ge,"%AsyncGeneratorFunction%":Ge,"%AsyncIteratorPrototype%":Ge,"%Atomics%":typeof Atomics>"u"?F:Atomics,"%BigInt%":typeof BigInt>"u"?F:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?F:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?F:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?F:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Ga,"%eval%":eval,"%EvalError%":za,"%Float32Array%":typeof Float32Array>"u"?F:Float32Array,"%Float64Array%":typeof Float64Array>"u"?F:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?F:FinalizationRegistry,"%Function%":an,"%GeneratorFunction%":Ge,"%Int8Array%":typeof Int8Array>"u"?F:Int8Array,"%Int16Array%":typeof Int16Array>"u"?F:Int16Array,"%Int32Array%":typeof Int32Array>"u"?F:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":qe&&X?X(X([][Symbol.iterator]())):F,"%JSON%":typeof JSON=="object"?JSON:F,"%Map%":typeof Map>"u"?F:Map,"%MapIteratorPrototype%":typeof Map>"u"||!qe||!X?F:X(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?F:Promise,"%Proxy%":typeof Proxy>"u"?F:Proxy,"%RangeError%":Ya,"%ReferenceError%":Ka,"%Reflect%":typeof Reflect>"u"?F:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?F:Set,"%SetIteratorPrototype%":typeof Set>"u"||!qe||!X?F:X(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?F:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":qe&&X?X(""[Symbol.iterator]()):F,"%Symbol%":qe?Symbol:F,"%SyntaxError%":He,"%ThrowTypeError%":Ja,"%TypedArray%":Za,"%TypeError%":Ve,"%Uint8Array%":typeof Uint8Array>"u"?F:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?F:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?F:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?F:Uint32Array,"%URIError%":Xa,"%WeakMap%":typeof WeakMap>"u"?F:WeakMap,"%WeakRef%":typeof WeakRef>"u"?F:WeakRef,"%WeakSet%":typeof WeakSet>"u"?F:WeakSet};if(X)try{null.error}catch(r){var ei=X(X(r));Ce["%Error.prototype%"]=ei}var ri=function r(e){var t;if(e==="%AsyncFunction%")t=rt("async function () {}");else if(e==="%GeneratorFunction%")t=rt("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=rt("async function* () {}");else if(e==="%AsyncGenerator%"){var n=r("%AsyncGeneratorFunction%");n&&(t=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var o=r("%AsyncGenerator%");o&&X&&(t=X(o.prototype))}return Ce[e]=t,t},ln={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ur=et,Pr=qa,ti=ur.call(Function.call,Array.prototype.concat),ni=ur.call(Function.apply,Array.prototype.splice),un=ur.call(Function.call,String.prototype.replace),Ar=ur.call(Function.call,String.prototype.slice),oi=ur.call(Function.call,RegExp.prototype.exec),ai=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ii=/\\(\\)?/g,li=function(e){var t=Ar(e,0,1),n=Ar(e,-1);if(t==="%"&&n!=="%")throw new He("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&t!=="%")throw new He("invalid intrinsic syntax, expected opening `%`");var o=[];return un(e,ai,function(a,l,u,i){o[o.length]=u?un(i,ii,"$1"):l||a}),o},ui=function(e,t){var n=e,o;if(Pr(ln,n)&&(o=ln[n],n="%"+o[0]+"%"),Pr(Ce,n)){var a=Ce[n];if(a===Ge&&(a=ri(n)),typeof a>"u"&&!t)throw new Ve("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:a}}throw new He("intrinsic "+e+" does not exist!")},ze=function(e,t){if(typeof e!="string"||e.length===0)throw new Ve("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new Ve('"allowMissing" argument must be a boolean');if(oi(/^%?[^%]*%?$/,e)===null)throw new He("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=li(e),o=n.length>0?n[0]:"",a=ui("%"+o+"%",t),l=a.name,u=a.value,i=!1,d=a.alias;d&&(o=d[0],ni(n,ti([0,1],d)));for(var s=1,g=!0;s=n.length){var m=$e(u,v);g=!!m,g&&"get"in m&&!("originalValue"in m.get)?u=m.get:u=u[v]}else g=Pr(u,v),u=u[v];g&&!i&&(Ce[l]=u)}}return u},sn={exports:{}},nt,cn;function ot(){if(cn)return nt;cn=1;var r=ze,e=r("%Object.defineProperty%",!0)||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return nt=e,nt}var si=ze,Tr=si("%Object.getOwnPropertyDescriptor%",!0);if(Tr)try{Tr([],"length")}catch{Tr=null}var fn=Tr,dn=ot(),ci=tn,Ye=lr,pn=fn,fi=function(e,t,n){if(!e||typeof e!="object"&&typeof e!="function")throw new Ye("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new Ye("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Ye("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Ye("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Ye("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Ye("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,a=arguments.length>4?arguments[4]:null,l=arguments.length>5?arguments[5]:null,u=arguments.length>6?arguments[6]:!1,i=!!pn&&pn(e,t);if(dn)dn(e,t,{configurable:l===null&&i?i.configurable:!l,enumerable:o===null&&i?i.enumerable:!o,value:n,writable:a===null&&i?i.writable:!a});else if(u||!o&&!a&&!l)e[t]=n;else throw new ci("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},at=ot(),yn=function(){return!!at};yn.hasArrayLengthDefineBug=function(){if(!at)return null;try{return at([],"length",{value:1}).length!==1}catch{return!0}};var di=yn,pi=ze,mn=fi,yi=di(),vn=fn,hn=lr,mi=pi("%Math.floor%"),vi=function(e,t){if(typeof e!="function")throw new hn("`fn` is not a function");if(typeof t!="number"||t<0||t>4294967295||mi(t)!==t)throw new hn("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],o=!0,a=!0;if("length"in e&&vn){var l=vn(e,"length");l&&!l.configurable&&(o=!1),l&&!l.writable&&(a=!1)}return(o||a||!n)&&(yi?mn(e,"length",t,!0,!0):mn(e,"length",t)),e};(function(r){var e=et,t=ze,n=vi,o=lr,a=t("%Function.prototype.apply%"),l=t("%Function.prototype.call%"),u=t("%Reflect.apply%",!0)||e.call(l,a),i=ot(),d=t("%Math.max%");r.exports=function(v){if(typeof v!="function")throw new o("a function is required");var E=u(e,l,arguments);return n(E,1+d(0,v.length-(arguments.length-1)),!0)};var s=function(){return u(e,a,arguments)};i?i(r.exports,"apply",{value:s}):r.exports.apply=s})(sn);var hi=sn.exports,gn=ze,bn=hi,gi=bn(gn("String.prototype.indexOf")),bi=function(e,t){var n=gn(e,!!t);return typeof n=="function"&&gi(e,".prototype.")>-1?bn(n):n};const wi=na(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var it=typeof Map=="function"&&Map.prototype,lt=Object.getOwnPropertyDescriptor&&it?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,$r=it&<&&typeof lt.get=="function"?lt.get:null,wn=it&&Map.prototype.forEach,ut=typeof Set=="function"&&Set.prototype,st=Object.getOwnPropertyDescriptor&&ut?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Cr=ut&&st&&typeof st.get=="function"?st.get:null,En=ut&&Set.prototype.forEach,Ei=typeof WeakMap=="function"&&WeakMap.prototype,sr=Ei?WeakMap.prototype.has:null,Si=typeof WeakSet=="function"&&WeakSet.prototype,cr=Si?WeakSet.prototype.has:null,xi=typeof WeakRef=="function"&&WeakRef.prototype,Sn=xi?WeakRef.prototype.deref:null,Oi=Boolean.prototype.valueOf,Pi=Object.prototype.toString,Ai=Function.prototype.toString,Ti=String.prototype.match,ct=String.prototype.slice,Ee=String.prototype.replace,$i=String.prototype.toUpperCase,xn=String.prototype.toLowerCase,On=RegExp.prototype.test,Pn=Array.prototype.concat,fe=Array.prototype.join,Ci=Array.prototype.slice,An=Math.floor,ft=typeof BigInt=="function"?BigInt.prototype.valueOf:null,dt=Object.getOwnPropertySymbols,pt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Ke=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Q=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Ke||!0)?Symbol.toStringTag:null,Tn=Object.prototype.propertyIsEnumerable,$n=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(r){return r.__proto__}:null);function Cn(r,e){if(r===1/0||r===-1/0||r!==r||r&&r>-1e3&&r<1e3||On.call(/e/,e))return e;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof r=="number"){var n=r<0?-An(-r):An(r);if(n!==r){var o=String(n),a=ct.call(e,o.length+1);return Ee.call(o,t,"$&_")+"."+Ee.call(Ee.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Ee.call(e,t,"$&_")}var yt=wi,Fn=yt.custom,Mn=Dn(Fn)?Fn:null,Fi=function r(e,t,n,o){var a=t||{};if(Se(a,"quoteStyle")&&a.quoteStyle!=="single"&&a.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Se(a,"maxStringLength")&&(typeof a.maxStringLength=="number"?a.maxStringLength<0&&a.maxStringLength!==1/0:a.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var l=Se(a,"customInspect")?a.customInspect:!0;if(typeof l!="boolean"&&l!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Se(a,"indent")&&a.indent!==null&&a.indent!==" "&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Se(a,"numericSeparator")&&typeof a.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var u=a.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return Nn(e,a);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var i=String(e);return u?Cn(e,i):i}if(typeof e=="bigint"){var d=String(e)+"n";return u?Cn(e,d):d}var s=typeof a.depth>"u"?5:a.depth;if(typeof n>"u"&&(n=0),n>=s&&s>0&&typeof e=="object")return mt(e)?"[Array]":"[Object]";var g=Yi(a,n);if(typeof o>"u")o=[];else if(kn(o,e)>=0)return"[Circular]";function v(C,T,k){if(T&&(o=Ci.call(o),o.push(T)),k){var oe={depth:a.depth};return Se(a,"quoteStyle")&&(oe.quoteStyle=a.quoteStyle),r(C,oe,n+1,o)}return r(C,a,n+1,o)}if(typeof e=="function"&&!_n(e)){var E=Wi(e),p=Fr(e,v);return"[Function"+(E?": "+E:" (anonymous)")+"]"+(p.length>0?" { "+fe.call(p,", ")+" }":"")}if(Dn(e)){var m=Ke?Ee.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):pt.call(e);return typeof e=="object"&&!Ke?fr(m):m}if(qi(e)){for(var y="<"+xn.call(String(e.nodeName)),h=e.attributes||[],b=0;b",y}if(mt(e)){if(e.length===0)return"[]";var w=Fr(e,v);return g&&!zi(w)?"["+ht(w,g)+"]":"[ "+fe.call(w,", ")+" ]"}if(_i(e)){var x=Fr(e,v);return!("cause"in Error.prototype)&&"cause"in e&&!Tn.call(e,"cause")?"{ ["+String(e)+"] "+fe.call(Pn.call("[cause]: "+v(e.cause),x),", ")+" }":x.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+fe.call(x,", ")+" }"}if(typeof e=="object"&&l){if(Mn&&typeof e[Mn]=="function"&&yt)return yt(e,{depth:s-n});if(l!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(Ui(e)){var P=[];return wn&&wn.call(e,function(C,T){P.push(v(T,e,!0)+" => "+v(C,e))}),jn("Map",$r.call(e),P,g)}if(Hi(e)){var D=[];return En&&En.call(e,function(C){D.push(v(C,e))}),jn("Set",Cr.call(e),D,g)}if(Bi(e))return vt("WeakMap");if(Vi(e))return vt("WeakSet");if(Ri(e))return vt("WeakRef");if(ki(e))return fr(v(Number(e)));if(ji(e))return fr(v(ft.call(e)));if(Ni(e))return fr(Oi.call(e));if(Di(e))return fr(v(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(typeof globalThis<"u"&&e===globalThis||typeof Jr<"u"&&e===Jr)return"{ [object globalThis] }";if(!Ii(e)&&!_n(e)){var _=Fr(e,v),U=$n?$n(e)===Object.prototype:e instanceof Object||e.constructor===Object,H=e instanceof Object?"":"null prototype",j=!U&&Q&&Object(e)===e&&Q in e?ct.call(xe(e),8,-1):H?"Object":"",z=U||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",V=z+(j||H?"["+fe.call(Pn.call([],j||[],H||[]),": ")+"] ":"");return _.length===0?V+"{}":g?V+"{"+ht(_,g)+"}":V+"{ "+fe.call(_,", ")+" }"}return String(e)};function In(r,e,t){var n=(t.quoteStyle||e)==="double"?'"':"'";return n+r+n}function Mi(r){return Ee.call(String(r),/"/g,""")}function mt(r){return xe(r)==="[object Array]"&&(!Q||!(typeof r=="object"&&Q in r))}function Ii(r){return xe(r)==="[object Date]"&&(!Q||!(typeof r=="object"&&Q in r))}function _n(r){return xe(r)==="[object RegExp]"&&(!Q||!(typeof r=="object"&&Q in r))}function _i(r){return xe(r)==="[object Error]"&&(!Q||!(typeof r=="object"&&Q in r))}function Di(r){return xe(r)==="[object String]"&&(!Q||!(typeof r=="object"&&Q in r))}function ki(r){return xe(r)==="[object Number]"&&(!Q||!(typeof r=="object"&&Q in r))}function Ni(r){return xe(r)==="[object Boolean]"&&(!Q||!(typeof r=="object"&&Q in r))}function Dn(r){if(Ke)return r&&typeof r=="object"&&r instanceof Symbol;if(typeof r=="symbol")return!0;if(!r||typeof r!="object"||!pt)return!1;try{return pt.call(r),!0}catch{}return!1}function ji(r){if(!r||typeof r!="object"||!ft)return!1;try{return ft.call(r),!0}catch{}return!1}var Li=Object.prototype.hasOwnProperty||function(r){return r in this};function Se(r,e){return Li.call(r,e)}function xe(r){return Pi.call(r)}function Wi(r){if(r.name)return r.name;var e=Ti.call(Ai.call(r),/^function\s*([\w$]+)/);return e?e[1]:null}function kn(r,e){if(r.indexOf)return r.indexOf(e);for(var t=0,n=r.length;te.maxStringLength){var t=r.length-e.maxStringLength,n="... "+t+" more character"+(t>1?"s":"");return Nn(ct.call(r,0,e.maxStringLength),e)+n}var o=Ee.call(Ee.call(r,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Gi);return In(o,"single",e)}function Gi(r){var e=r.charCodeAt(0),t={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return t?"\\"+t:"\\x"+(e<16?"0":"")+$i.call(e.toString(16))}function fr(r){return"Object("+r+")"}function vt(r){return r+" { ? }"}function jn(r,e,t,n){var o=n?ht(t,n):fe.call(t,", ");return r+" ("+e+") {"+o+"}"}function zi(r){for(var e=0;e=0)return!1;return!0}function Yi(r,e){var t;if(r.indent===" ")t=" ";else if(typeof r.indent=="number"&&r.indent>0)t=fe.call(Array(r.indent+1)," ");else return null;return{base:t,prev:fe.call(Array(e+1),t)}}function ht(r,e){if(r.length===0)return"";var t=` `+e.prev+e.base;return t+fe.call(r,","+t)+` -`+e.prev}function Fr(r,e){var t=mt(r),n=[];if(t){n.length=r.length;for(var o=0;o1;){var t=e.pop(),n=t.obj[t.prop];if(Fe(n)){for(var o=[],a=0;a=St?l.slice(i,i+St):l,s=[],b=0;b=48&&v<=57||v>=65&&v<=90||v>=97&&v<=122||a===sl.RFC1738&&(v===40||v===41)){s[s.length]=p.charAt(b);continue}if(v<128){s[s.length]=de[v];continue}if(v<2048){s[s.length]=de[192|v>>6]+de[128|v&63];continue}if(v<55296||v>=57344){s[s.length]=de[224|v>>12]+de[128|v>>6&63]+de[128|v&63];continue}b+=1,v=65536+((v&1023)<<10|p.charCodeAt(b)&1023),s[s.length]=de[240|v>>18]+de[128|v>>12&63]+de[128|v>>6&63]+de[128|v&63]}u+=s.join("")}return u},ml=function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],o=0;o"u"&&(P=0)}if(typeof s=="function"?w=s(t,w):w instanceof Date?w=E(w):n==="comma"&&pe(w)&&(w=_r.maybeMap(w,function(se){return se instanceof Date?E(se):se})),w===null){if(l)return p&&!y?p(t,K.encoder,h,"key",d):t;w=""}if(xl(w)||_r.isBuffer(w)){if(p){var U=y?t:p(t,K.encoder,h,"key",d);return[m(U)+"="+m(p(w,K.encoder,h,"value",d))]}return[m(t)+"="+m(String(w))]}var H=[];if(typeof w>"u")return H;var j;if(n==="comma"&&pe(w))y&&p&&(w=_r.maybeMap(w,p)),j=[{value:w.length>0?w.join(",")||null:void 0}];else if(pe(s))j=s;else{var z=Object.keys(w);j=b?z.sort(b):z}var V=i?t.replace(/\./g,"%2E"):t,C=o&&pe(w)&&w.length===1?V+"[]":V;if(a&&pe(w)&&w.length===0)return C+"[]";for(var T=0;T"u"?e.encodeDotInKeys===!0?!0:K.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:K.addQueryPrefix,allowDots:u,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:K.allowEmptyArrays,arrayFormat:l,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:K.charsetSentinel,commaRoundTrip:e.commaRoundTrip,delimiter:typeof e.delimiter>"u"?K.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:K.encode,encodeDotInKeys:typeof e.encodeDotInKeys=="boolean"?e.encodeDotInKeys:K.encodeDotInKeys,encoder:typeof e.encoder=="function"?e.encoder:K.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:K.encodeValuesOnly,filter:a,format:n,formatter:o,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:K.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:K.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:K.strictNullHandling}},Al=function(r,e){var t=r,n=Pl(e),o,a;typeof n.filter=="function"?(a=n.filter,t=a("",t)):pe(n.filter)&&(a=n.filter,o=a);var l=[];if(typeof t!="object"||t===null)return"";var u=Rn[n.arrayFormat],i=u==="comma"&&n.commaRoundTrip;o||(o=Object.keys(t)),n.sort&&o.sort(n.sort);for(var p=Bn(),s=0;s0?E+v:""},Xe=Un,Ot=Object.prototype.hasOwnProperty,Tl=Array.isArray,R={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:Xe.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},$l=function(r){return r.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},qn=function(r,e){return r&&typeof r=="string"&&e.comma&&r.indexOf(",")>-1?r.split(","):r},Cl="utf8=%26%2310003%3B",Fl="utf8=%E2%9C%93",Ml=function(e,t){var n={__proto__:null},o=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;o=o.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var a=t.parameterLimit===1/0?void 0:t.parameterLimit,l=o.split(t.delimiter,a),u=-1,i,p=t.charset;if(t.charsetSentinel)for(i=0;i-1&&(d=Tl(d)?[d]:d);var m=Ot.call(n,E);m&&t.duplicates==="combine"?n[E]=Xe.combine(n[E],d):(!m||t.duplicates==="last")&&(n[E]=d)}return n},Il=function(r,e,t,n){for(var o=n?e:qn(e,t),a=r.length-1;a>=0;--a){var l,u=r[a];if(u==="[]"&&t.parseArrays)l=t.allowEmptyArrays&&(o===""||t.strictNullHandling&&o===null)?[]:[].concat(o);else{l=t.plainObjects?Object.create(null):{};var i=u.charAt(0)==="["&&u.charAt(u.length-1)==="]"?u.slice(1,-1):u,p=t.decodeDotInKeys?i.replace(/%2E/g,"."):i,s=parseInt(p,10);!t.parseArrays&&p===""?l={0:o}:!isNaN(s)&&u!==p&&String(s)===p&&s>=0&&t.parseArrays&&s<=t.arrayLimit?(l=[],l[s]=o):p!=="__proto__"&&(l[p]=o)}o=l}return o},_l=function(e,t,n,o){if(e){var a=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,l=/(\[[^[\]]*])/,u=/(\[[^[\]]*])/g,i=n.depth>0&&l.exec(a),p=i?a.slice(0,i.index):a,s=[];if(p){if(!n.plainObjects&&Ot.call(Object.prototype,p)&&!n.allowPrototypes)return;s.push(p)}for(var b=0;n.depth>0&&(i=u.exec(a))!==null&&b"u"?R.charset:e.charset,n=typeof e.duplicates>"u"?R.duplicates:e.duplicates;if(n!=="combine"&&n!=="first"&&n!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var o=typeof e.allowDots>"u"?e.decodeDotInKeys===!0?!0:R.allowDots:!!e.allowDots;return{allowDots:o,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:R.allowEmptyArrays,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:R.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:R.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:R.arrayLimit,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:R.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:R.comma,decodeDotInKeys:typeof e.decodeDotInKeys=="boolean"?e.decodeDotInKeys:R.decodeDotInKeys,decoder:typeof e.decoder=="function"?e.decoder:R.decoder,delimiter:typeof e.delimiter=="string"||Xe.isRegExp(e.delimiter)?e.delimiter:R.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:R.depth,duplicates:n,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:R.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:R.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:R.plainObjects,strictDepth:typeof e.strictDepth=="boolean"?!!e.strictDepth:R.strictDepth,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:R.strictNullHandling}},kl=function(r,e){var t=Dl(e);if(r===""||r===null||typeof r>"u")return t.plainObjects?Object.create(null):{};for(var n=typeof r=="string"?Ml(r,t):r,o=t.plainObjects?Object.create(null):{},a=Object.keys(n),l=0;l
'};t.configure=function(d){var m,y;for(m in d)y=d[m],y!==void 0&&d.hasOwnProperty(m)&&(n[m]=y);return this},t.status=null,t.set=function(d){var m=t.isStarted();d=o(d,n.minimum,1),t.status=d===1?null:d;var y=t.render(!m),h=y.querySelector(n.barSelector),g=n.speed,w=n.easing;return y.offsetWidth,u(function(x){n.positionUsing===""&&(n.positionUsing=t.getPositioningCSS()),i(h,l(d,g,w)),d===1?(i(y,{transition:"none",opacity:1}),y.offsetWidth,setTimeout(function(){i(y,{transition:"all "+g+"ms linear",opacity:0}),setTimeout(function(){t.remove(),x()},g)},g)):setTimeout(x,g)}),this},t.isStarted=function(){return typeof t.status=="number"},t.start=function(){t.status||t.set(0);var d=function(){setTimeout(function(){t.status&&(t.trickle(),d())},n.trickleSpeed)};return n.trickle&&d(),this},t.done=function(d){return!d&&!t.status?this:t.inc(.3+.5*Math.random()).set(1)},t.inc=function(d){var m=t.status;return m?(typeof d!="number"&&(d=(1-m)*o(Math.random()*m,.1,.95)),m=o(m+d,0,.994),t.set(m)):t.start()},t.trickle=function(){return t.inc(Math.random()*n.trickleRate)},function(){var d=0,m=0;t.promise=function(y){return!y||y.state()==="resolved"?this:(m===0&&t.start(),d++,m++,y.always(function(){m--,m===0?(d=0,t.done()):t.set((d-m)/d)}),this)}}(),t.render=function(d){if(t.isRendered())return document.getElementById("nprogress");s(document.documentElement,"nprogress-busy");var m=document.createElement("div");m.id="nprogress",m.innerHTML=n.template;var y=m.querySelector(n.barSelector),h=d?"-100":a(t.status||0),g=document.querySelector(n.parent),w;return i(y,{transition:"all 0 linear",transform:"translate3d("+h+"%,0,0)"}),n.showSpinner||(w=m.querySelector(n.spinnerSelector),w&&E(w)),g!=document.body&&s(g,"nprogress-custom-parent"),g.appendChild(m),m},t.remove=function(){b(document.documentElement,"nprogress-busy"),b(document.querySelector(n.parent),"nprogress-custom-parent");var d=document.getElementById("nprogress");d&&E(d)},t.isRendered=function(){return!!document.getElementById("nprogress")},t.getPositioningCSS=function(){var d=document.body.style,m="WebkitTransform"in d?"Webkit":"MozTransform"in d?"Moz":"msTransform"in d?"ms":"OTransform"in d?"O":"";return m+"Perspective"in d?"translate3d":m+"Transform"in d?"translate":"margin"};function o(d,m,y){return dy?y:d}function a(d){return(-1+d)*100}function l(d,m,y){var h;return n.positionUsing==="translate3d"?h={transform:"translate3d("+a(d)+"%,0,0)"}:n.positionUsing==="translate"?h={transform:"translate("+a(d)+"%,0)"}:h={"margin-left":a(d)+"%"},h.transition="all "+m+"ms "+y,h}var u=function(){var d=[];function m(){var y=d.shift();y&&y(m)}return function(y){d.push(y),d.length==1&&m()}}(),i=function(){var d=["Webkit","O","Moz","ms"],m={};function y(x){return x.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(P,D){return D.toUpperCase()})}function h(x){var P=document.body.style;if(x in P)return x;for(var D=d.length,_=x.charAt(0).toUpperCase()+x.slice(1),U;D--;)if(U=d[D]+_,U in P)return U;return x}function g(x){return x=y(x),m[x]||(m[x]=h(x))}function w(x,P,D){P=g(P),x.style[P]=D}return function(x,P){var D=arguments,_,U;if(D.length==2)for(_ in P)U=P[_],U!==void 0&&P.hasOwnProperty(_)&&w(x,_,U);else w(x,D[1],D[2])}}();function p(d,m){var y=typeof d=="string"?d:v(d);return y.indexOf(" "+m+" ")>=0}function s(d,m){var y=v(d),h=y+m;p(y,m)||(d.className=h.substring(1))}function b(d,m){var y=v(d),h;p(d,m)&&(h=y.replace(" "+m+" "," "),d.className=h.substring(1,h.length-1))}function v(d){return(" "+(d.className||"")+" ").replace(/\s+/gi," ")}function E(d){d&&d.parentNode&&d.parentNode.removeChild(d)}return t})})(Wl);function Ul(r,e,t,n="brackets"){let o=/^https?:\/\//.test(e.toString()),a=o||e.toString().startsWith("/"),l=!a&&!e.toString().startsWith("#")&&!e.toString().startsWith("?"),u=e.toString().includes("?")||r==="get"&&Object.keys(t).length,i=e.toString().includes("#"),p=new URL(e.toString(),"http://localhost");return r==="get"&&Object.keys(t).length&&(p.search=Gn.stringify(xa(Gn.parse(p.search,{ignoreQueryPrefix:!0}),t),{encodeValuesOnly:!0,arrayFormat:n}),t={}),[[o?`${p.protocol}//${p.host}`:"",a?p.pathname:"",l?p.pathname.substring(1):"",u?p.search:"",i?p.hash:""].join(""),t]}const Dr=f.createContext(null);Dr.displayName="ModalStackContext";let zn=null,Yn=null,Pt=null,At=null,Kn=[];const Xn=({children:r})=>{const[e,t]=f.useState([]),[n,o]=f.useState({}),a=m=>{t(y=>{const h=m([...y]),g=w=>{var x;return h.length<2?!0:((x=h.map(P=>({id:P.id,shouldRender:P.shouldRender})).reverse().find(P=>P.shouldRender))==null?void 0:x.id)===w};return h.forEach((w,x)=>{h[x].onTopOfStack=g(w.id),h[x].getParentModal=()=>x<1?null:h.slice(0,x).reverse().find(P=>P.isOpen),h[x].getChildModal=()=>x===h.length-1?null:h.slice(x+1).find(P=>P.isOpen)}),h})};f.useEffect(()=>{Kn=e},[e]);class l{constructor(y,h,g,w,x){ce(this,"update",(y,h,g)=>{a(w=>w.map(x=>(x.id===this.id&&(x.config=y,x.onCloseCallback=h,x.afterLeaveCallback=g),x)))});ce(this,"show",()=>{a(y=>y.map(h=>(h.id===this.id&&!h.isOpen&&(h.isOpen=!0,h.shouldRender=!0),h)))});ce(this,"setOpen",y=>{y?this.show():this.close()});ce(this,"close",()=>{a(y=>y.map(h=>{var g;return h.id===this.id&&h.isOpen&&(Object.keys(h.listeners).forEach(w=>{h.off(w)}),h.isOpen=!1,(g=h.onCloseCallback)==null||g.call(h)),h}))});ce(this,"afterLeave",()=>{this.isOpen||a(y=>{const h=y.map(g=>{var w;return g.id===this.id&&!g.isOpen&&(g.shouldRender=!1,(w=g.afterLeaveCallback)==null||w.call(g),g.afterLeaveCallback=null),g});return this.index===0?[]:h})});ce(this,"on",(y,h)=>{this.listeners[y]=this.listeners[y]??[],this.listeners[y].push(h)});ce(this,"off",(y,h)=>{var g;h?this.listeners[y]=((g=this.listeners[y])==null?void 0:g.filter(w=>w!==h))??[]:delete this.listeners[y]});ce(this,"emit",(y,...h)=>{var g;(g=this.listeners[y])==null||g.forEach(w=>w(...h))});ce(this,"registerEventListenersFromProps",y=>{const h=[];return Object.keys(y).filter(g=>g.startsWith("on")).forEach(g=>{const w=g.replace(/^on/,"").replace(/^./,x=>x.toLowerCase()).replace(/([A-Z])/g,"-$1").toLowerCase();this.on(w,y[g]),h.push(()=>this.off(w,y[g]))}),()=>h.forEach(g=>g())});ce(this,"reload",(y={})=>{var g;let h=Object.keys(this.response.props);y.only&&(h=Zt(h,y.only)),y.except&&(h=ia(h,y.except)),(g=this.response)!=null&&g.url&&ve.get(this.response.url,{headers:{Accept:"text/html, application/xhtml+xml","X-Inertia":!0,"X-Inertia-Partial-Component":this.response.component,"X-Inertia-Version":this.response.version,"X-Inertia-Partial-Data":h.join(","),"X-InertiaUI-Modal":!0,"X-InertiaUI-Modal-Use-Router":0}}).then(w=>{Object.assign(this.props,w.data.props),a(x=>x)})});this.id=l.generateId(),this.isOpen=!1,this.shouldRender=!1,this.listeners={},this.component=y,this.props=h.props,this.response=h,this.config=g,this.onCloseCallback=w,this.afterLeaveCallback=x,this.index=-1,this.getParentModal=()=>null,this.getChildModal=()=>null,this.onTopOfStack=!0}static generateId(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?`inertiaui_modal_${crypto.randomUUID()}`:`inertiaui_modal_${Date.now().toString(36)}_${Math.random().toString(36).substr(2,9)}`}}const u=(m,y={},h=null,g=null)=>Yn(m.component).then(w=>i(w,m,y,h,g)),i=(m,y,h,g,w)=>{const x=new l(m,y,h,g,w);return x.index=e.length,a(P=>[...P,x]),x.show(),x};function p(m,y,h,g){if(!n[m])throw new Error(`The local modal "${m}" has not been registered.`);const w=i(null,{},y,h,g);return w.name=m,n[m].callback(w),w}const s=(m,y={})=>b(m,y.method??"get",y.data??{},y.headers??{},y.config??{},y.onClose,y.onAfterLeave,y.queryStringArrayFormat??"brackets",y.navigate??Or("navigate")),b=(m,y,h={},g={},w={},x=null,P=null,D="brackets",_=!1)=>new Promise((U,H)=>{if(m.startsWith("#")){U(p(m.substring(1),w,x,P));return}const[j,z]=Ul(y,m||"",h,D);let V=_&&e.length===0;if(e.length===0&&(Pt=typeof window<"u"?window.location.href:""),g={...g,Accept:"text/html, application/xhtml+xml","X-Requested-With":"XMLHttpRequest","X-Inertia":!0,"X-Inertia-Version":zn,"X-InertiaUI-Modal":!0,"X-InertiaUI-Modal-Use-Router":V?1:0},V)return rr.router.visit(j,{method:y,data:z,headers:g,preserveScroll:!0,preserveState:!0,onError:H,onFinish:()=>{ua(()=>At).then(C=>{const T=C.onCloseCallback,k=C.afterLeaveCallback;C.update(w,()=>{x==null||x(),T==null||T()},()=>{P==null||P(),k==null||k()}),U(C),At=null})}});ve({url:j,method:y,data:z,headers:g}).then(C=>U(u(C.data,w,x,P))).catch(C=>{H(C)})}),d={stack:e,localModals:n,push:i,pushFromResponseData:u,closeAll:()=>{Kn.reverse().forEach(m=>m.close())},reset:()=>a(()=>[]),visit:b,visitModal:s,registerLocalModal:(m,y)=>{o(h=>({...h,[m]:{name:m,callback:y}}))},removeLocalModal:m=>{o(y=>{const h={...y};return delete h[m],h})}};return $.jsx(Dr.Provider,{value:d,children:r})},pr=()=>{const r=f.useContext(Dr);if(r===null)throw new Error("useModalStack must be used within a ModalStackProvider");return r},Jn=["closeButton","closeExplicitly","maxWidth","paddingClasses","panelClasses","position","slideover"],Bl=(r,e)=>{e.initialPage&&(zn=e.initialPage.version),e.resolveComponent&&(Yn=e.resolveComponent);const t=({Component:n,props:o,key:a})=>{const l=()=>{const u=f.createElement(n,{key:a,...o});return typeof n.layout=="function"?n.layout(u):Array.isArray(n.layout)?n.layout.concat(u).reverse().reduce((p,s)=>f.createElement(s,o,p)):u};return $.jsxs($.Fragment,{children:[l(),$.jsx(Qn,{})]})};return $.jsx(Xn,{children:$.jsx(r,{...e,children:t})})},Qn=({children:r})=>{const e=f.useContext(Dr);let t=!1,n=!1;f.useEffect(()=>rr.router.on("start",()=>t=!0),[]),f.useEffect(()=>rr.router.on("finish",()=>t=!1),[]),f.useEffect(()=>rr.router.on("navigate",function(a){const l=a.detail.page.props._inertiaui_modal;if(!l){n&&e.closeAll();return}n=l,Pt=l.baseUrl,e.pushFromResponseData(l,{},()=>{if(!l.baseUrl){console.error("No base url in modal response data so cannot navigate back");return}!t&&window.location.href!==l.baseUrl&&rr.router.visit(l.baseUrl,{preserveScroll:!0,preserveState:!0})}).then(u=>{At=u})}),[]);const o=a=>(a.headers["X-InertiaUI-Modal-Base-Url"]=Pt,a);return f.useEffect(()=>(ve.interceptors.request.use(o),()=>ve.interceptors.request.eject(o)),[]),$.jsxs($.Fragment,{children:[r,e.stack.length>0&&$.jsx(Zn,{index:0})]})},Tt=f.createContext(null);Tt.displayName="ModalIndexContext";const $t=()=>{const r=f.useContext(Tt);if(r===void 0)throw new Error("useModalIndex must be used within a ModalIndexProvider");return r},Zn=({index:r})=>{const{stack:e}=pr(),t=f.useMemo(()=>e[r],[e,r]);return(t==null?void 0:t.component)&&$.jsx(Tt.Provider,{value:r,children:$.jsx(t.component,{...t.props,onModalEvent:(...n)=>t.emit(...n)})})},Ct=f.forwardRef(({name:r,children:e,...t},n)=>{const o=$t(),{stack:a,registerLocalModal:l,removeLocalModal:u}=pr(),[i,p]=f.useState(null),s=f.useMemo(()=>r?i:a[o],[r,i,o,a]),b=f.useMemo(()=>{var d;return(d=a.find(m=>m.shouldRender&&m.index>(s==null?void 0:s.index)))==null?void 0:d.index},[o,a]),v=f.useMemo(()=>(s==null?void 0:s.config.slideover)??t.slideover??Or("type")==="slideover",[t.slideover]),E=f.useMemo(()=>({slideover:v,closeButton:t.closeButton??Ue(v,"closeButton"),closeExplicitly:t.closeExplicitly??Ue(v,"closeExplicitly"),maxWidth:t.maxWidth??Ue(v,"maxWidth"),paddingClasses:t.paddingClasses??Ue(v,"paddingClasses"),panelClasses:t.panelClasses??Ue(v,"panelClasses"),position:t.position??Ue(v,"position"),...s==null?void 0:s.config}),[t,s==null?void 0:s.config]);return f.useEffect(()=>{if(r){let d=null;return l(r,m=>{d=m.registerEventListenersFromProps(t),p(m)}),()=>{d==null||d(),d=null,u(r)}}return s.registerEventListenersFromProps(t)},[r]),f.useImperativeHandle(n,()=>({afterLeave:()=>s.afterLeave(),close:()=>s.close(),config:E,emit:(...d)=>s.emit(...d),getChildModal:()=>s.getChildModal(),getParentModal:()=>s.getParentModal(),id:s==null?void 0:s.id,index:s==null?void 0:s.index,isOpen:s==null?void 0:s.isOpen,modalContext:s,onTopOfStack:s==null?void 0:s.onTopOfStack,reload:()=>s.reload(),setOpen:()=>s.setOpen(),shouldRender:s==null?void 0:s.shouldRender}),[s]),(s==null?void 0:s.shouldRender)&&$.jsxs($.Fragment,{children:[typeof e=="function"?e({afterLeave:s.afterLeave,close:s.close,config:E,emit:s.emit,getChildModal:s.getChildModal,getParentModal:s.getParentModal,id:s.id,index:s.index,isOpen:s.isOpen,modalContext:s,onTopOfStack:s.onTopOfStack,reload:s.reload,setOpen:s.setOpen,shouldRender:s.shouldRender}):e,b&&$.jsx(Zn,{index:b})]})});Ct.displayName="HeadlessModal";function eo(r){var e,t,n="";if(typeof r=="string"||typeof r=="number")n+=r;else if(typeof r=="object")if(Array.isArray(r)){var o=r.length;for(e=0;ee in r?Rl(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Ft=(r,e,t)=>(Hl(r,typeof e!="symbol"?e+"":e,t),t);let Vl=class{constructor(){Ft(this,"current",this.detect()),Ft(this,"handoffState","pending"),Ft(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},Me=new Vl;function Nr(r){return Me.isServer?null:r instanceof Node?r.ownerDocument:r!=null&&r.hasOwnProperty("current")&&r.current instanceof Node?r.current.ownerDocument:document}function jr(r){typeof queueMicrotask=="function"?queueMicrotask(r):Promise.resolve().then(r).catch(e=>setTimeout(()=>{throw e}))}function Oe(){let r=[],e={addEventListener(t,n,o,a){return t.addEventListener(n,o,a),e.add(()=>t.removeEventListener(n,o,a))},requestAnimationFrame(...t){let n=requestAnimationFrame(...t);return e.add(()=>cancelAnimationFrame(n))},nextFrame(...t){return e.requestAnimationFrame(()=>e.requestAnimationFrame(...t))},setTimeout(...t){let n=setTimeout(...t);return e.add(()=>clearTimeout(n))},microTask(...t){let n={current:!0};return jr(()=>{n.current&&t[0]()}),e.add(()=>{n.current=!1})},style(t,n,o){let a=t.style.getPropertyValue(n);return Object.assign(t.style,{[n]:o}),this.add(()=>{Object.assign(t.style,{[n]:a})})},group(t){let n=Oe();return t(n),this.add(()=>n.dispose())},add(t){return r.includes(t)||r.push(t),()=>{let n=r.indexOf(t);if(n>=0)for(let o of r.splice(n,1))o()}},dispose(){for(let t of r.splice(0))t()}};return e}function Mt(){let[r]=f.useState(Oe);return f.useEffect(()=>()=>r.dispose(),[r]),r}let ee=(r,e)=>{Me.isServer?f.useEffect(r,e):f.useLayoutEffect(r,e)};function Ie(r){let e=f.useRef(r);return ee(()=>{e.current=r},[r]),e}let B=function(r){let e=Ie(r);return f.useCallback((...t)=>e.current(...t),[e])},ql=f.createContext(void 0);function Gl(){return f.useContext(ql)}function It(...r){return Array.from(new Set(r.flatMap(e=>typeof e=="string"?e.split(" "):[]))).filter(Boolean).join(" ")}function Pe(r,e,...t){if(r in e){let o=e[r];return typeof o=="function"?o(...t):o}let n=new Error(`Tried to handle "${r}" but there is no handler defined. Only defined handlers are: ${Object.keys(e).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Pe),n}var Lr=(r=>(r[r.None=0]="None",r[r.RenderStrategy=1]="RenderStrategy",r[r.Static=2]="Static",r))(Lr||{}),Ae=(r=>(r[r.Unmount=0]="Unmount",r[r.Hidden=1]="Hidden",r))(Ae||{});function ae(){let r=Yl();return f.useCallback(e=>zl({mergeRefs:r,...e}),[r])}function zl({ourProps:r,theirProps:e,slot:t,defaultTag:n,features:o,visible:a=!0,name:l,mergeRefs:u}){u=u??Kl;let i=ro(e,r);if(a)return Wr(i,t,n,l,u);let p=o??0;if(p&2){let{static:s=!1,...b}=i;if(s)return Wr(b,t,n,l,u)}if(p&1){let{unmount:s=!0,...b}=i;return Pe(s?0:1,{0(){return null},1(){return Wr({...b,hidden:!0,style:{display:"none"}},t,n,l,u)}})}return Wr(i,t,n,l,u)}function Wr(r,e={},t,n,o){let{as:a=t,children:l,refName:u="ref",...i}=_t(r,["unmount","static"]),p=r.ref!==void 0?{[u]:r.ref}:{},s=typeof l=="function"?l(e):l;"className"in i&&i.className&&typeof i.className=="function"&&(i.className=i.className(e)),i["aria-labelledby"]&&i["aria-labelledby"]===i.id&&(i["aria-labelledby"]=void 0);let b={};if(e){let v=!1,E=[];for(let[d,m]of Object.entries(e))typeof m=="boolean"&&(v=!0),m===!0&&E.push(d.replace(/([A-Z])/g,y=>`-${y.toLowerCase()}`));if(v){b["data-headlessui-state"]=E.join(" ");for(let d of E)b[`data-${d}`]=""}}if(a===f.Fragment&&(Object.keys(_e(i)).length>0||Object.keys(_e(b)).length>0))if(!f.isValidElement(s)||Array.isArray(s)&&s.length>1){if(Object.keys(_e(i)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(_e(i)).concat(Object.keys(_e(b))).map(v=>` - ${v}`).join(` +`+e.prev}function Fr(r,e){var t=mt(r),n=[];if(t){n.length=r.length;for(var o=0;o1;){var t=e.pop(),n=t.obj[t.prop];if(Fe(n)){for(var o=[],a=0;a=St?l.slice(i,i+St):l,s=[],g=0;g=48&&v<=57||v>=65&&v<=90||v>=97&&v<=122||a===sl.RFC1738&&(v===40||v===41)){s[s.length]=d.charAt(g);continue}if(v<128){s[s.length]=de[v];continue}if(v<2048){s[s.length]=de[192|v>>6]+de[128|v&63];continue}if(v<55296||v>=57344){s[s.length]=de[224|v>>12]+de[128|v>>6&63]+de[128|v&63];continue}g+=1,v=65536+((v&1023)<<10|d.charCodeAt(g)&1023),s[s.length]=de[240|v>>18]+de[128|v>>12&63]+de[128|v>>6&63]+de[128|v&63]}u+=s.join("")}return u},ml=function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],o=0;o"u"&&(P=0)}if(typeof s=="function"?w=s(t,w):w instanceof Date?w=E(w):n==="comma"&&pe(w)&&(w=_r.maybeMap(w,function(ce){return ce instanceof Date?E(ce):ce})),w===null){if(l)return d&&!y?d(t,K.encoder,h,"key",p):t;w=""}if(xl(w)||_r.isBuffer(w)){if(d){var U=y?t:d(t,K.encoder,h,"key",p);return[m(U)+"="+m(d(w,K.encoder,h,"value",p))]}return[m(t)+"="+m(String(w))]}var H=[];if(typeof w>"u")return H;var j;if(n==="comma"&&pe(w))y&&d&&(w=_r.maybeMap(w,d)),j=[{value:w.length>0?w.join(",")||null:void 0}];else if(pe(s))j=s;else{var z=Object.keys(w);j=g?z.sort(g):z}var V=i?t.replace(/\./g,"%2E"):t,C=o&&pe(w)&&w.length===1?V+"[]":V;if(a&&pe(w)&&w.length===0)return C+"[]";for(var T=0;T"u"?e.encodeDotInKeys===!0?!0:K.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:K.addQueryPrefix,allowDots:u,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:K.allowEmptyArrays,arrayFormat:l,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:K.charsetSentinel,commaRoundTrip:e.commaRoundTrip,delimiter:typeof e.delimiter>"u"?K.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:K.encode,encodeDotInKeys:typeof e.encodeDotInKeys=="boolean"?e.encodeDotInKeys:K.encodeDotInKeys,encoder:typeof e.encoder=="function"?e.encoder:K.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:K.encodeValuesOnly,filter:a,format:n,formatter:o,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:K.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:K.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:K.strictNullHandling}},Al=function(r,e){var t=r,n=Pl(e),o,a;typeof n.filter=="function"?(a=n.filter,t=a("",t)):pe(n.filter)&&(a=n.filter,o=a);var l=[];if(typeof t!="object"||t===null)return"";var u=Rn[n.arrayFormat],i=u==="comma"&&n.commaRoundTrip;o||(o=Object.keys(t)),n.sort&&o.sort(n.sort);for(var d=Bn(),s=0;s0?E+v:""},Je=Un,Ot=Object.prototype.hasOwnProperty,Tl=Array.isArray,R={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:Je.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},$l=function(r){return r.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},qn=function(r,e){return r&&typeof r=="string"&&e.comma&&r.indexOf(",")>-1?r.split(","):r},Cl="utf8=%26%2310003%3B",Fl="utf8=%E2%9C%93",Ml=function(e,t){var n={__proto__:null},o=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;o=o.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var a=t.parameterLimit===1/0?void 0:t.parameterLimit,l=o.split(t.delimiter,a),u=-1,i,d=t.charset;if(t.charsetSentinel)for(i=0;i-1&&(p=Tl(p)?[p]:p);var m=Ot.call(n,E);m&&t.duplicates==="combine"?n[E]=Je.combine(n[E],p):(!m||t.duplicates==="last")&&(n[E]=p)}return n},Il=function(r,e,t,n){for(var o=n?e:qn(e,t),a=r.length-1;a>=0;--a){var l,u=r[a];if(u==="[]"&&t.parseArrays)l=t.allowEmptyArrays&&(o===""||t.strictNullHandling&&o===null)?[]:[].concat(o);else{l=t.plainObjects?Object.create(null):{};var i=u.charAt(0)==="["&&u.charAt(u.length-1)==="]"?u.slice(1,-1):u,d=t.decodeDotInKeys?i.replace(/%2E/g,"."):i,s=parseInt(d,10);!t.parseArrays&&d===""?l={0:o}:!isNaN(s)&&u!==d&&String(s)===d&&s>=0&&t.parseArrays&&s<=t.arrayLimit?(l=[],l[s]=o):d!=="__proto__"&&(l[d]=o)}o=l}return o},_l=function(e,t,n,o){if(e){var a=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,l=/(\[[^[\]]*])/,u=/(\[[^[\]]*])/g,i=n.depth>0&&l.exec(a),d=i?a.slice(0,i.index):a,s=[];if(d){if(!n.plainObjects&&Ot.call(Object.prototype,d)&&!n.allowPrototypes)return;s.push(d)}for(var g=0;n.depth>0&&(i=u.exec(a))!==null&&g"u"?R.charset:e.charset,n=typeof e.duplicates>"u"?R.duplicates:e.duplicates;if(n!=="combine"&&n!=="first"&&n!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var o=typeof e.allowDots>"u"?e.decodeDotInKeys===!0?!0:R.allowDots:!!e.allowDots;return{allowDots:o,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:R.allowEmptyArrays,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:R.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:R.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:R.arrayLimit,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:R.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:R.comma,decodeDotInKeys:typeof e.decodeDotInKeys=="boolean"?e.decodeDotInKeys:R.decodeDotInKeys,decoder:typeof e.decoder=="function"?e.decoder:R.decoder,delimiter:typeof e.delimiter=="string"||Je.isRegExp(e.delimiter)?e.delimiter:R.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:R.depth,duplicates:n,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:R.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:R.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:R.plainObjects,strictDepth:typeof e.strictDepth=="boolean"?!!e.strictDepth:R.strictDepth,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:R.strictNullHandling}},kl=function(r,e){var t=Dl(e);if(r===""||r===null||typeof r>"u")return t.plainObjects?Object.create(null):{};for(var n=typeof r=="string"?Ml(r,t):r,o=t.plainObjects?Object.create(null):{},a=Object.keys(n),l=0;l
'};t.configure=function(p){var m,y;for(m in p)y=p[m],y!==void 0&&p.hasOwnProperty(m)&&(n[m]=y);return this},t.status=null,t.set=function(p){var m=t.isStarted();p=o(p,n.minimum,1),t.status=p===1?null:p;var y=t.render(!m),h=y.querySelector(n.barSelector),b=n.speed,w=n.easing;return y.offsetWidth,u(function(x){n.positionUsing===""&&(n.positionUsing=t.getPositioningCSS()),i(h,l(p,b,w)),p===1?(i(y,{transition:"none",opacity:1}),y.offsetWidth,setTimeout(function(){i(y,{transition:"all "+b+"ms linear",opacity:0}),setTimeout(function(){t.remove(),x()},b)},b)):setTimeout(x,b)}),this},t.isStarted=function(){return typeof t.status=="number"},t.start=function(){t.status||t.set(0);var p=function(){setTimeout(function(){t.status&&(t.trickle(),p())},n.trickleSpeed)};return n.trickle&&p(),this},t.done=function(p){return!p&&!t.status?this:t.inc(.3+.5*Math.random()).set(1)},t.inc=function(p){var m=t.status;return m?(typeof p!="number"&&(p=(1-m)*o(Math.random()*m,.1,.95)),m=o(m+p,0,.994),t.set(m)):t.start()},t.trickle=function(){return t.inc(Math.random()*n.trickleRate)},function(){var p=0,m=0;t.promise=function(y){return!y||y.state()==="resolved"?this:(m===0&&t.start(),p++,m++,y.always(function(){m--,m===0?(p=0,t.done()):t.set((p-m)/p)}),this)}}(),t.render=function(p){if(t.isRendered())return document.getElementById("nprogress");s(document.documentElement,"nprogress-busy");var m=document.createElement("div");m.id="nprogress",m.innerHTML=n.template;var y=m.querySelector(n.barSelector),h=p?"-100":a(t.status||0),b=document.querySelector(n.parent),w;return i(y,{transition:"all 0 linear",transform:"translate3d("+h+"%,0,0)"}),n.showSpinner||(w=m.querySelector(n.spinnerSelector),w&&E(w)),b!=document.body&&s(b,"nprogress-custom-parent"),b.appendChild(m),m},t.remove=function(){g(document.documentElement,"nprogress-busy"),g(document.querySelector(n.parent),"nprogress-custom-parent");var p=document.getElementById("nprogress");p&&E(p)},t.isRendered=function(){return!!document.getElementById("nprogress")},t.getPositioningCSS=function(){var p=document.body.style,m="WebkitTransform"in p?"Webkit":"MozTransform"in p?"Moz":"msTransform"in p?"ms":"OTransform"in p?"O":"";return m+"Perspective"in p?"translate3d":m+"Transform"in p?"translate":"margin"};function o(p,m,y){return py?y:p}function a(p){return(-1+p)*100}function l(p,m,y){var h;return n.positionUsing==="translate3d"?h={transform:"translate3d("+a(p)+"%,0,0)"}:n.positionUsing==="translate"?h={transform:"translate("+a(p)+"%,0)"}:h={"margin-left":a(p)+"%"},h.transition="all "+m+"ms "+y,h}var u=function(){var p=[];function m(){var y=p.shift();y&&y(m)}return function(y){p.push(y),p.length==1&&m()}}(),i=function(){var p=["Webkit","O","Moz","ms"],m={};function y(x){return x.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(P,D){return D.toUpperCase()})}function h(x){var P=document.body.style;if(x in P)return x;for(var D=p.length,_=x.charAt(0).toUpperCase()+x.slice(1),U;D--;)if(U=p[D]+_,U in P)return U;return x}function b(x){return x=y(x),m[x]||(m[x]=h(x))}function w(x,P,D){P=b(P),x.style[P]=D}return function(x,P){var D=arguments,_,U;if(D.length==2)for(_ in P)U=P[_],U!==void 0&&P.hasOwnProperty(_)&&w(x,_,U);else w(x,D[1],D[2])}}();function d(p,m){var y=typeof p=="string"?p:v(p);return y.indexOf(" "+m+" ")>=0}function s(p,m){var y=v(p),h=y+m;d(y,m)||(p.className=h.substring(1))}function g(p,m){var y=v(p),h;d(p,m)&&(h=y.replace(" "+m+" "," "),p.className=h.substring(1,h.length-1))}function v(p){return(" "+(p.className||"")+" ").replace(/\s+/gi," ")}function E(p){p&&p.parentNode&&p.parentNode.removeChild(p)}return t})})(Wl);function Ul(r,e,t,n="brackets"){let o=/^https?:\/\//.test(e.toString()),a=o||e.toString().startsWith("/"),l=!a&&!e.toString().startsWith("#")&&!e.toString().startsWith("?"),u=e.toString().includes("?")||r==="get"&&Object.keys(t).length,i=e.toString().includes("#"),d=new URL(e.toString(),"http://localhost");return r==="get"&&Object.keys(t).length&&(d.search=Gn.stringify(xa(Gn.parse(d.search,{ignoreQueryPrefix:!0}),t),{encodeValuesOnly:!0,arrayFormat:n}),t={}),[[o?`${d.protocol}//${d.host}`:"",a?d.pathname:"",l?d.pathname.substring(1):"",u?d.search:"",i?d.hash:""].join(""),t]}const Dr=f.createContext(null);Dr.displayName="ModalStackContext";let zn=null,Yn=null,Pt=null,At=null,Kn=[];const Xn=({children:r})=>{const[e,t]=f.useState([]),[n,o]=f.useState({}),a=m=>{t(y=>{const h=m([...y]),b=w=>{var x;return h.length<2?!0:((x=h.map(P=>({id:P.id,shouldRender:P.shouldRender})).reverse().find(P=>P.shouldRender))==null?void 0:x.id)===w};return h.forEach((w,x)=>{h[x].onTopOfStack=b(w.id),h[x].getParentModal=()=>x<1?null:h.slice(0,x).reverse().find(P=>P.isOpen),h[x].getChildModal=()=>x===h.length-1?null:h.slice(x+1).find(P=>P.isOpen)}),h})};f.useEffect(()=>{Kn=e},[e]);class l{constructor(y,h,b,w,x){le(this,"update",(y,h,b)=>{a(w=>w.map(x=>(x.id===this.id&&(x.config=y,x.onCloseCallback=h,x.afterLeaveCallback=b),x)))});le(this,"show",()=>{a(y=>y.map(h=>(h.id===this.id&&!h.isOpen&&(h.isOpen=!0,h.shouldRender=!0),h)))});le(this,"setOpen",y=>{y?this.show():this.close()});le(this,"close",()=>{a(y=>y.map(h=>{var b;return h.id===this.id&&h.isOpen&&(Object.keys(h.listeners).forEach(w=>{h.off(w)}),h.isOpen=!1,(b=h.onCloseCallback)==null||b.call(h)),h}))});le(this,"afterLeave",()=>{this.isOpen||a(y=>{const h=y.map(b=>{var w;return b.id===this.id&&!b.isOpen&&(b.shouldRender=!1,(w=b.afterLeaveCallback)==null||w.call(b),b.afterLeaveCallback=null),b});return this.index===0?[]:h})});le(this,"on",(y,h)=>{this.listeners[y]=this.listeners[y]??[],this.listeners[y].push(h)});le(this,"off",(y,h)=>{var b;h?this.listeners[y]=((b=this.listeners[y])==null?void 0:b.filter(w=>w!==h))??[]:delete this.listeners[y]});le(this,"emit",(y,...h)=>{var b;(b=this.listeners[y])==null||b.forEach(w=>w(...h))});le(this,"registerEventListenersFromProps",y=>{const h=[];return Object.keys(y).filter(b=>b.startsWith("on")).forEach(b=>{const w=b.replace(/^on/,"").replace(/^./,x=>x.toLowerCase()).replace(/([A-Z])/g,"-$1").toLowerCase();this.on(w,y[b]),h.push(()=>this.off(w,y[b]))}),()=>h.forEach(b=>b())});le(this,"reload",(y={})=>{var b;let h=Object.keys(this.response.props);y.only&&(h=Zt(h,y.only)),y.except&&(h=ia(h,y.except)),(b=this.response)!=null&&b.url&&ve.get(this.response.url,{headers:{Accept:"text/html, application/xhtml+xml","X-Inertia":!0,"X-Inertia-Partial-Component":this.response.component,"X-Inertia-Version":this.response.version,"X-Inertia-Partial-Data":h.join(","),"X-InertiaUI-Modal":!0,"X-InertiaUI-Modal-Use-Router":0}}).then(w=>{this.updateProps(w.data.props)})});le(this,"updateProps",y=>{Object.assign(this.props,y),a(h=>h)});this.id=l.generateId(),this.isOpen=!1,this.shouldRender=!1,this.listeners={},this.component=y,this.props=h.props,this.response=h,this.config=b,this.onCloseCallback=w,this.afterLeaveCallback=x,this.index=-1,this.getParentModal=()=>null,this.getChildModal=()=>null,this.onTopOfStack=!0}static generateId(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?`inertiaui_modal_${crypto.randomUUID()}`:`inertiaui_modal_${Date.now().toString(36)}_${Math.random().toString(36).substr(2,9)}`}}const u=(m,y={},h=null,b=null)=>Yn(m.component).then(w=>i(w,m,y,h,b)),i=(m,y,h,b,w)=>{const x=new l(m,y,h,b,w);return x.index=e.length,a(P=>[...P,x]),x.show(),x};function d(m,y,h,b){if(!n[m])throw new Error(`The local modal "${m}" has not been registered.`);const w=i(null,{},y,h,b);return w.name=m,n[m].callback(w),w}const s=(m,y={})=>g(m,y.method??"get",y.data??{},y.headers??{},y.config??{},y.onClose,y.onAfterLeave,y.queryStringArrayFormat??"brackets",y.navigate??Or("navigate")),g=(m,y,h={},b={},w={},x=null,P=null,D="brackets",_=!1)=>new Promise((U,H)=>{if(m.startsWith("#")){U(d(m.substring(1),w,x,P));return}const[j,z]=Ul(y,m||"",h,D);let V=_&&e.length===0;if(e.length===0&&(Pt=typeof window<"u"?window.location.href:""),b={...b,Accept:"text/html, application/xhtml+xml","X-Requested-With":"XMLHttpRequest","X-Inertia":!0,"X-Inertia-Version":zn,"X-InertiaUI-Modal":!0,"X-InertiaUI-Modal-Use-Router":V?1:0},V)return At=null,Ue.router.visit(j,{method:y,data:z,headers:b,preserveScroll:!0,preserveState:!0,onError:H,onFinish:()=>{ua(()=>At).then(C=>{const T=C.onCloseCallback,k=C.afterLeaveCallback;C.update(w,()=>{x==null||x(),T==null||T()},()=>{P==null||P(),k==null||k()}),U(C)})}});ve({url:j,method:y,data:z,headers:b}).then(C=>U(u(C.data,w,x,P))).catch(C=>{H(C)})}),p={stack:e,localModals:n,push:i,pushFromResponseData:u,closeAll:()=>{Kn.reverse().forEach(m=>m.close())},reset:()=>a(()=>[]),visit:g,visitModal:s,registerLocalModal:(m,y)=>{o(h=>({...h,[m]:{name:m,callback:y}}))},removeLocalModal:m=>{o(y=>{const h={...y};return delete h[m],h})}};return $.jsx(Dr.Provider,{value:p,children:r})},pr=()=>{const r=f.useContext(Dr);if(r===null)throw new Error("useModalStack must be used within a ModalStackProvider");return r},Jn=["closeButton","closeExplicitly","maxWidth","paddingClasses","panelClasses","position","slideover"],Bl=(r,e)=>{e.initialPage&&(zn=e.initialPage.version),e.resolveComponent&&(Yn=e.resolveComponent);const t=({Component:n,props:o,key:a})=>{const l=()=>{const u=f.createElement(n,{key:a,...o});return typeof n.layout=="function"?n.layout(u):Array.isArray(n.layout)?n.layout.concat(u).reverse().reduce((d,s)=>f.createElement(s,o,d)):u};return $.jsxs($.Fragment,{children:[l(),$.jsx(Qn,{})]})};return $.jsx(Xn,{children:$.jsx(r,{...e,children:t})})},Qn=({children:r})=>{var u;const e=f.useContext(Dr);let t=!1,n=!1;f.useEffect(()=>Ue.router.on("start",()=>t=!0),[]),f.useEffect(()=>Ue.router.on("finish",()=>t=!1),[]),f.useEffect(()=>Ue.router.on("navigate",function(i){const d=i.detail.page.props._inertiaui_modal;if(!d){n&&e.closeAll();return}n=d,Pt=d.baseUrl,e.pushFromResponseData(d,{},()=>{if(!d.baseUrl){console.error("No base url in modal response data so cannot navigate back");return}!t&&window.location.href!==d.baseUrl&&Ue.router.visit(d.baseUrl,{preserveScroll:!0,preserveState:!0})}).then(s=>{At=s})}),[]);const o=i=>(i.headers["X-InertiaUI-Modal-Base-Url"]=Pt,i);f.useEffect(()=>(ve.interceptors.request.use(o),()=>ve.interceptors.request.eject(o)),[]);const a=Ue.usePage(),l=f.useRef();return f.useEffect(()=>{var s,g;const i=(s=a.props)==null?void 0:s._inertiaui_modal,d=l.current;l.current=i,i&&d&&i.component===d.component&&i.url===d.url&&((g=e.stack[0])==null||g.updateProps(i.props??{}))},[(u=a.props)==null?void 0:u._inertiaui_modal]),$.jsxs($.Fragment,{children:[r,e.stack.length>0&&$.jsx(Zn,{index:0})]})},Tt=f.createContext(null);Tt.displayName="ModalIndexContext";const $t=()=>{const r=f.useContext(Tt);if(r===void 0)throw new Error("useModalIndex must be used within a ModalIndexProvider");return r},Zn=({index:r})=>{const{stack:e}=pr(),t=f.useMemo(()=>e[r],[e,r]);return(t==null?void 0:t.component)&&$.jsx(Tt.Provider,{value:r,children:$.jsx(t.component,{...t.props,onModalEvent:(...n)=>t.emit(...n)})})},Ct=f.forwardRef(({name:r,children:e,...t},n)=>{const o=$t(),{stack:a,registerLocalModal:l,removeLocalModal:u}=pr(),[i,d]=f.useState(null),s=f.useMemo(()=>r?i:a[o],[r,i,o,a]),g=f.useMemo(()=>{var p;return(p=a.find(m=>m.shouldRender&&m.index>(s==null?void 0:s.index)))==null?void 0:p.index},[o,a]),v=f.useMemo(()=>(s==null?void 0:s.config.slideover)??t.slideover??Or("type")==="slideover",[t.slideover]),E=f.useMemo(()=>({slideover:v,closeButton:t.closeButton??Be(v,"closeButton"),closeExplicitly:t.closeExplicitly??Be(v,"closeExplicitly"),maxWidth:t.maxWidth??Be(v,"maxWidth"),paddingClasses:t.paddingClasses??Be(v,"paddingClasses"),panelClasses:t.panelClasses??Be(v,"panelClasses"),position:t.position??Be(v,"position"),...s==null?void 0:s.config}),[t,s==null?void 0:s.config]);return f.useEffect(()=>{if(r){let p=null;return l(r,m=>{p=m.registerEventListenersFromProps(t),d(m)}),()=>{p==null||p(),p=null,u(r)}}return s.registerEventListenersFromProps(t)},[r]),f.useImperativeHandle(n,()=>({afterLeave:()=>s.afterLeave(),close:()=>s.close(),config:E,emit:(...p)=>s.emit(...p),getChildModal:()=>s.getChildModal(),getParentModal:()=>s.getParentModal(),id:s==null?void 0:s.id,index:s==null?void 0:s.index,isOpen:s==null?void 0:s.isOpen,modalContext:s,onTopOfStack:s==null?void 0:s.onTopOfStack,reload:()=>s.reload(),setOpen:()=>s.setOpen(),shouldRender:s==null?void 0:s.shouldRender}),[s]),(s==null?void 0:s.shouldRender)&&$.jsxs($.Fragment,{children:[typeof e=="function"?e({afterLeave:s.afterLeave,close:s.close,config:E,emit:s.emit,getChildModal:s.getChildModal,getParentModal:s.getParentModal,id:s.id,index:s.index,isOpen:s.isOpen,modalContext:s,onTopOfStack:s.onTopOfStack,reload:s.reload,setOpen:s.setOpen,shouldRender:s.shouldRender}):e,g&&$.jsx(Zn,{index:g})]})});Ct.displayName="HeadlessModal";function eo(r){var e,t,n="";if(typeof r=="string"||typeof r=="number")n+=r;else if(typeof r=="object")if(Array.isArray(r)){var o=r.length;for(e=0;ee in r?Rl(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Ft=(r,e,t)=>(Hl(r,typeof e!="symbol"?e+"":e,t),t);let Vl=class{constructor(){Ft(this,"current",this.detect()),Ft(this,"handoffState","pending"),Ft(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},Me=new Vl;function Nr(r){return Me.isServer?null:r instanceof Node?r.ownerDocument:r!=null&&r.hasOwnProperty("current")&&r.current instanceof Node?r.current.ownerDocument:document}function jr(r){typeof queueMicrotask=="function"?queueMicrotask(r):Promise.resolve().then(r).catch(e=>setTimeout(()=>{throw e}))}function Oe(){let r=[],e={addEventListener(t,n,o,a){return t.addEventListener(n,o,a),e.add(()=>t.removeEventListener(n,o,a))},requestAnimationFrame(...t){let n=requestAnimationFrame(...t);return e.add(()=>cancelAnimationFrame(n))},nextFrame(...t){return e.requestAnimationFrame(()=>e.requestAnimationFrame(...t))},setTimeout(...t){let n=setTimeout(...t);return e.add(()=>clearTimeout(n))},microTask(...t){let n={current:!0};return jr(()=>{n.current&&t[0]()}),e.add(()=>{n.current=!1})},style(t,n,o){let a=t.style.getPropertyValue(n);return Object.assign(t.style,{[n]:o}),this.add(()=>{Object.assign(t.style,{[n]:a})})},group(t){let n=Oe();return t(n),this.add(()=>n.dispose())},add(t){return r.includes(t)||r.push(t),()=>{let n=r.indexOf(t);if(n>=0)for(let o of r.splice(n,1))o()}},dispose(){for(let t of r.splice(0))t()}};return e}function Mt(){let[r]=f.useState(Oe);return f.useEffect(()=>()=>r.dispose(),[r]),r}let ee=(r,e)=>{Me.isServer?f.useEffect(r,e):f.useLayoutEffect(r,e)};function Ie(r){let e=f.useRef(r);return ee(()=>{e.current=r},[r]),e}let B=function(r){let e=Ie(r);return f.useCallback((...t)=>e.current(...t),[e])},ql=f.createContext(void 0);function Gl(){return f.useContext(ql)}function It(...r){return Array.from(new Set(r.flatMap(e=>typeof e=="string"?e.split(" "):[]))).filter(Boolean).join(" ")}function Pe(r,e,...t){if(r in e){let o=e[r];return typeof o=="function"?o(...t):o}let n=new Error(`Tried to handle "${r}" but there is no handler defined. Only defined handlers are: ${Object.keys(e).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Pe),n}var Lr=(r=>(r[r.None=0]="None",r[r.RenderStrategy=1]="RenderStrategy",r[r.Static=2]="Static",r))(Lr||{}),Ae=(r=>(r[r.Unmount=0]="Unmount",r[r.Hidden=1]="Hidden",r))(Ae||{});function ae(){let r=Yl();return f.useCallback(e=>zl({mergeRefs:r,...e}),[r])}function zl({ourProps:r,theirProps:e,slot:t,defaultTag:n,features:o,visible:a=!0,name:l,mergeRefs:u}){u=u??Kl;let i=ro(e,r);if(a)return Wr(i,t,n,l,u);let d=o??0;if(d&2){let{static:s=!1,...g}=i;if(s)return Wr(g,t,n,l,u)}if(d&1){let{unmount:s=!0,...g}=i;return Pe(s?0:1,{0(){return null},1(){return Wr({...g,hidden:!0,style:{display:"none"}},t,n,l,u)}})}return Wr(i,t,n,l,u)}function Wr(r,e={},t,n,o){let{as:a=t,children:l,refName:u="ref",...i}=_t(r,["unmount","static"]),d=r.ref!==void 0?{[u]:r.ref}:{},s=typeof l=="function"?l(e):l;"className"in i&&i.className&&typeof i.className=="function"&&(i.className=i.className(e)),i["aria-labelledby"]&&i["aria-labelledby"]===i.id&&(i["aria-labelledby"]=void 0);let g={};if(e){let v=!1,E=[];for(let[p,m]of Object.entries(e))typeof m=="boolean"&&(v=!0),m===!0&&E.push(p.replace(/([A-Z])/g,y=>`-${y.toLowerCase()}`));if(v){g["data-headlessui-state"]=E.join(" ");for(let p of E)g[`data-${p}`]=""}}if(a===f.Fragment&&(Object.keys(_e(i)).length>0||Object.keys(_e(g)).length>0))if(!f.isValidElement(s)||Array.isArray(s)&&s.length>1){if(Object.keys(_e(i)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(_e(i)).concat(Object.keys(_e(g))).map(v=>` - ${v}`).join(` `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(v=>` - ${v}`).join(` `)].join(` -`))}else{let v=s.props,E=v==null?void 0:v.className,d=typeof E=="function"?(...h)=>It(E(...h),i.className):It(E,i.className),m=d?{className:d}:{},y=ro(s.props,_e(_t(i,["ref"])));for(let h in b)h in y&&delete b[h];return f.cloneElement(s,Object.assign({},y,b,p,{ref:o(s.ref,p.ref)},m))}return f.createElement(a,Object.assign({},_t(i,["ref"]),a!==f.Fragment&&p,a!==f.Fragment&&b),s)}function Yl(){let r=f.useRef([]),e=f.useCallback(t=>{for(let n of r.current)n!=null&&(typeof n=="function"?n(t):n.current=t)},[]);return(...t)=>{if(!t.every(n=>n==null))return r.current=t,e}}function Kl(...r){return r.every(e=>e==null)?void 0:e=>{for(let t of r)t!=null&&(typeof t=="function"?t(e):t.current=e)}}function ro(...r){if(r.length===0)return{};if(r.length===1)return r[0];let e={},t={};for(let n of r)for(let o in n)o.startsWith("on")&&typeof n[o]=="function"?(t[o]!=null||(t[o]=[]),t[o].push(n[o])):e[o]=n[o];if(e.disabled||e["aria-disabled"])for(let n in t)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(n)&&(t[n]=[o=>{var a;return(a=o==null?void 0:o.preventDefault)==null?void 0:a.call(o)}]);for(let n in t)Object.assign(e,{[n](o,...a){let l=t[n];for(let u of l){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;u(o,...a)}}});return e}function te(r){var e;return Object.assign(f.forwardRef(r),{displayName:(e=r.displayName)!=null?e:r.name})}function _e(r){let e=Object.assign({},r);for(let t in e)e[t]===void 0&&delete e[t];return e}function _t(r,e=[]){let t=Object.assign({},r);for(let n of e)n in t&&delete t[n];return t}let Xl="span";var Ur=(r=>(r[r.None=1]="None",r[r.Focusable=2]="Focusable",r[r.Hidden=4]="Hidden",r))(Ur||{});function Jl(r,e){var t;let{features:n=1,...o}=r,a={ref:e,"aria-hidden":(n&2)===2?!0:(t=o["aria-hidden"])!=null?t:void 0,hidden:(n&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(n&4)===4&&(n&2)!==2&&{display:"none"}}};return ae()({ourProps:a,theirProps:o,slot:{},defaultTag:Xl,name:"Hidden"})}let Dt=te(Jl),to=Symbol();function Ql(r,e=!0){return Object.assign(r,{[to]:e})}function ye(...r){let e=f.useRef(r);f.useEffect(()=>{e.current=r},[r]);let t=B(n=>{for(let o of e.current)o!=null&&(typeof o=="function"?o(n):o.current=n)});return r.every(n=>n==null||(n==null?void 0:n[to]))?void 0:t}let kt=f.createContext(null);kt.displayName="DescriptionContext";function no(){let r=f.useContext(kt);if(r===null){let e=new Error("You used a component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,no),e}return r}function Zl(){let[r,e]=f.useState([]);return[r.length>0?r.join(" "):void 0,f.useMemo(()=>function(t){let n=B(a=>(e(l=>[...l,a]),()=>e(l=>{let u=l.slice(),i=u.indexOf(a);return i!==-1&&u.splice(i,1),u}))),o=f.useMemo(()=>({register:n,slot:t.slot,name:t.name,props:t.props,value:t.value}),[n,t.slot,t.name,t.props,t.value]);return f.createElement(kt.Provider,{value:o},t.children)},[e])]}let eu="p";function ru(r,e){let t=f.useId(),n=Gl(),{id:o=`headlessui-description-${t}`,...a}=r,l=no(),u=ye(e);ee(()=>l.register(o),[o,l.register]);let i=n||!1,p=f.useMemo(()=>({...l.slot,disabled:i}),[l.slot,i]),s={ref:u,...l.props,id:o};return ae()({ourProps:s,theirProps:a,slot:p,defaultTag:eu,name:l.name||"Description"})}let tu=te(ru),nu=Object.assign(tu,{});var oo=(r=>(r.Space=" ",r.Enter="Enter",r.Escape="Escape",r.Backspace="Backspace",r.Delete="Delete",r.ArrowLeft="ArrowLeft",r.ArrowUp="ArrowUp",r.ArrowRight="ArrowRight",r.ArrowDown="ArrowDown",r.Home="Home",r.End="End",r.PageUp="PageUp",r.PageDown="PageDown",r.Tab="Tab",r))(oo||{});let ou=f.createContext(()=>{});function au({value:r,children:e}){return f.createElement(ou.Provider,{value:r},e)}let iu=class extends Map{constructor(e){super(),this.factory=e}get(e){let t=super.get(e);return t===void 0&&(t=this.factory(e),this.set(e,t)),t}};function ao(r,e){let t=r(),n=new Set;return{getSnapshot(){return t},subscribe(o){return n.add(o),()=>n.delete(o)},dispatch(o,...a){let l=e[o].call(t,...a);l&&(t=l,n.forEach(u=>u()))}}}function io(r){return f.useSyncExternalStore(r.subscribe,r.getSnapshot,r.getSnapshot)}let lu=new iu(()=>ao(()=>[],{ADD(r){return this.includes(r)?this:[...this,r]},REMOVE(r){let e=this.indexOf(r);if(e===-1)return this;let t=this.slice();return t.splice(e,1),t}}));function Je(r,e){let t=lu.get(e),n=f.useId(),o=io(t);if(ee(()=>{if(r)return t.dispatch("ADD",n),()=>t.dispatch("REMOVE",n)},[t,r]),!r)return!1;let a=o.indexOf(n),l=o.length;return a===-1&&(a=l,l+=1),a===l-1}let Nt=new Map,yr=new Map;function lo(r){var e;let t=(e=yr.get(r))!=null?e:0;return yr.set(r,t+1),t!==0?()=>uo(r):(Nt.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0,()=>uo(r))}function uo(r){var e;let t=(e=yr.get(r))!=null?e:1;if(t===1?yr.delete(r):yr.set(r,t-1),t!==1)return;let n=Nt.get(r);n&&(n["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",n["aria-hidden"]),r.inert=n.inert,Nt.delete(r))}function uu(r,{allowed:e,disallowed:t}={}){let n=Je(r,"inert-others");ee(()=>{var o,a;if(!n)return;let l=Oe();for(let i of(o=t==null?void 0:t())!=null?o:[])i&&l.add(lo(i));let u=(a=e==null?void 0:e())!=null?a:[];for(let i of u){if(!i)continue;let p=Nr(i);if(!p)continue;let s=i.parentElement;for(;s&&s!==p.body;){for(let b of s.children)u.some(v=>b.contains(v))||l.add(lo(b));s=s.parentElement}}return l.dispose},[n,e,t])}function su(r,e,t){let n=Ie(o=>{let a=o.getBoundingClientRect();a.x===0&&a.y===0&&a.width===0&&a.height===0&&t()});f.useEffect(()=>{if(!r)return;let o=e===null?null:e instanceof HTMLElement?e:e.current;if(!o)return;let a=Oe();if(typeof ResizeObserver<"u"){let l=new ResizeObserver(()=>n.current(o));l.observe(o),a.add(()=>l.disconnect())}if(typeof IntersectionObserver<"u"){let l=new IntersectionObserver(()=>n.current(o));l.observe(o),a.add(()=>l.disconnect())}return()=>a.dispose()},[e,n,r])}let Br=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(r=>`${r}:not([tabindex='-1'])`).join(","),cu=["[data-autofocus]"].map(r=>`${r}:not([tabindex='-1'])`).join(",");var he=(r=>(r[r.First=1]="First",r[r.Previous=2]="Previous",r[r.Next=4]="Next",r[r.Last=8]="Last",r[r.WrapAround=16]="WrapAround",r[r.NoScroll=32]="NoScroll",r[r.AutoFocus=64]="AutoFocus",r))(he||{}),jt=(r=>(r[r.Error=0]="Error",r[r.Overflow=1]="Overflow",r[r.Success=2]="Success",r[r.Underflow=3]="Underflow",r))(jt||{}),fu=(r=>(r[r.Previous=-1]="Previous",r[r.Next=1]="Next",r))(fu||{});function du(r=document.body){return r==null?[]:Array.from(r.querySelectorAll(Br)).sort((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}function pu(r=document.body){return r==null?[]:Array.from(r.querySelectorAll(cu)).sort((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}var so=(r=>(r[r.Strict=0]="Strict",r[r.Loose=1]="Loose",r))(so||{});function yu(r,e=0){var t;return r===((t=Nr(r))==null?void 0:t.body)?!1:Pe(e,{0(){return r.matches(Br)},1(){let n=r;for(;n!==null;){if(n.matches(Br))return!0;n=n.parentElement}return!1}})}var mu=(r=>(r[r.Keyboard=0]="Keyboard",r[r.Mouse=1]="Mouse",r))(mu||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",r=>{r.metaKey||r.altKey||r.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",r=>{r.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:r.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function ge(r){r==null||r.focus({preventScroll:!0})}let vu=["textarea","input"].join(",");function hu(r){var e,t;return(t=(e=r==null?void 0:r.matches)==null?void 0:e.call(r,vu))!=null?t:!1}function gu(r,e=t=>t){return r.slice().sort((t,n)=>{let o=e(t),a=e(n);if(o===null||a===null)return 0;let l=o.compareDocumentPosition(a);return l&Node.DOCUMENT_POSITION_FOLLOWING?-1:l&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function mr(r,e,{sorted:t=!0,relativeTo:n=null,skipElements:o=[]}={}){let a=Array.isArray(r)?r.length>0?r[0].ownerDocument:document:r.ownerDocument,l=Array.isArray(r)?t?gu(r):r:e&64?pu(r):du(r);o.length>0&&l.length>1&&(l=l.filter(E=>!o.some(d=>d!=null&&"current"in d?(d==null?void 0:d.current)===E:d===E))),n=n??a.activeElement;let u=(()=>{if(e&5)return 1;if(e&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),i=(()=>{if(e&1)return 0;if(e&2)return Math.max(0,l.indexOf(n))-1;if(e&4)return Math.max(0,l.indexOf(n))+1;if(e&8)return l.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),p=e&32?{preventScroll:!0}:{},s=0,b=l.length,v;do{if(s>=b||s+b<=0)return 0;let E=i+s;if(e&16)E=(E+b)%b;else{if(E<0)return 3;if(E>=b)return 1}v=l[E],v==null||v.focus(p),s+=u}while(v!==a.activeElement);return e&6&&hu(v)&&v.select(),2}function co(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function bu(){return/Android/gi.test(window.navigator.userAgent)}function wu(){return co()||bu()}function vr(r,e,t,n){let o=Ie(t);f.useEffect(()=>{if(!r)return;function a(l){o.current(l)}return document.addEventListener(e,a,n),()=>document.removeEventListener(e,a,n)},[r,e,n])}function fo(r,e,t,n){let o=Ie(t);f.useEffect(()=>{if(!r)return;function a(l){o.current(l)}return window.addEventListener(e,a,n),()=>window.removeEventListener(e,a,n)},[r,e,n])}const po=30;function Eu(r,e,t){let n=Je(r,"outside-click"),o=Ie(t),a=f.useCallback(function(i,p){if(i.defaultPrevented)return;let s=p(i);if(s===null||!s.getRootNode().contains(s)||!s.isConnected)return;let b=function v(E){return typeof E=="function"?v(E()):Array.isArray(E)||E instanceof Set?E:[E]}(e);for(let v of b)if(v!==null&&(v.contains(s)||i.composed&&i.composedPath().includes(v)))return;return!yu(s,so.Loose)&&s.tabIndex!==-1&&i.preventDefault(),o.current(i,s)},[o,e]),l=f.useRef(null);vr(n,"pointerdown",i=>{var p,s;l.current=((s=(p=i.composedPath)==null?void 0:p.call(i))==null?void 0:s[0])||i.target},!0),vr(n,"mousedown",i=>{var p,s;l.current=((s=(p=i.composedPath)==null?void 0:p.call(i))==null?void 0:s[0])||i.target},!0),vr(n,"click",i=>{wu()||l.current&&(a(i,()=>l.current),l.current=null)},!0);let u=f.useRef({x:0,y:0});vr(n,"touchstart",i=>{u.current.x=i.touches[0].clientX,u.current.y=i.touches[0].clientY},!0),vr(n,"touchend",i=>{let p={x:i.changedTouches[0].clientX,y:i.changedTouches[0].clientY};if(!(Math.abs(p.x-u.current.x)>=po||Math.abs(p.y-u.current.y)>=po))return a(i,()=>i.target instanceof HTMLElement?i.target:null)},!0),fo(n,"blur",i=>a(i,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function hr(...r){return f.useMemo(()=>Nr(...r),[...r])}function yo(r,e,t,n){let o=Ie(t);f.useEffect(()=>{r=r??window;function a(l){o.current(l)}return r.addEventListener(e,a,n),()=>r.removeEventListener(e,a,n)},[r,e,n])}function Su(){let r;return{before({doc:e}){var t;let n=e.documentElement,o=(t=e.defaultView)!=null?t:window;r=Math.max(0,o.innerWidth-n.clientWidth)},after({doc:e,d:t}){let n=e.documentElement,o=Math.max(0,n.clientWidth-n.offsetWidth),a=Math.max(0,r-o);t.style(n,"paddingRight",`${a}px`)}}}function xu(){return co()?{before({doc:r,d:e,meta:t}){function n(o){return t.containers.flatMap(a=>a()).some(a=>a.contains(o))}e.microTask(()=>{var o;if(window.getComputedStyle(r.documentElement).scrollBehavior!=="auto"){let u=Oe();u.style(r.documentElement,"scrollBehavior","auto"),e.add(()=>e.microTask(()=>u.dispose()))}let a=(o=window.scrollY)!=null?o:window.pageYOffset,l=null;e.addEventListener(r,"click",u=>{if(u.target instanceof HTMLElement)try{let i=u.target.closest("a");if(!i)return;let{hash:p}=new URL(i.href),s=r.querySelector(p);s&&!n(s)&&(l=s)}catch{}},!0),e.addEventListener(r,"touchstart",u=>{if(u.target instanceof HTMLElement)if(n(u.target)){let i=u.target;for(;i.parentElement&&n(i.parentElement);)i=i.parentElement;e.style(i,"overscrollBehavior","contain")}else e.style(u.target,"touchAction","none")}),e.addEventListener(r,"touchmove",u=>{if(u.target instanceof HTMLElement){if(u.target.tagName==="INPUT")return;if(n(u.target)){let i=u.target;for(;i.parentElement&&i.dataset.headlessuiPortal!==""&&!(i.scrollHeight>i.clientHeight||i.scrollWidth>i.clientWidth);)i=i.parentElement;i.dataset.headlessuiPortal===""&&u.preventDefault()}else u.preventDefault()}},{passive:!1}),e.add(()=>{var u;let i=(u=window.scrollY)!=null?u:window.pageYOffset;a!==i&&window.scrollTo(0,a),l&&l.isConnected&&(l.scrollIntoView({block:"nearest"}),l=null)})})}}:{}}function Ou(){return{before({doc:r,d:e}){e.style(r.documentElement,"overflow","hidden")}}}function Pu(r){let e={};for(let t of r)Object.assign(e,t(e));return e}let De=ao(()=>new Map,{PUSH(r,e){var t;let n=(t=this.get(r))!=null?t:{doc:r,count:0,d:Oe(),meta:new Set};return n.count++,n.meta.add(e),this.set(r,n),this},POP(r,e){let t=this.get(r);return t&&(t.count--,t.meta.delete(e)),this},SCROLL_PREVENT({doc:r,d:e,meta:t}){let n={doc:r,d:e,meta:Pu(t)},o=[xu(),Su(),Ou()];o.forEach(({before:a})=>a==null?void 0:a(n)),o.forEach(({after:a})=>a==null?void 0:a(n))},SCROLL_ALLOW({d:r}){r.dispose()},TEARDOWN({doc:r}){this.delete(r)}});De.subscribe(()=>{let r=De.getSnapshot(),e=new Map;for(let[t]of r)e.set(t,t.documentElement.style.overflow);for(let t of r.values()){let n=e.get(t.doc)==="hidden",o=t.count!==0;(o&&!n||!o&&n)&&De.dispatch(t.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",t),t.count===0&&De.dispatch("TEARDOWN",t)}});function Au(r,e,t=()=>({containers:[]})){let n=io(De),o=e?n.get(e):void 0,a=o?o.count>0:!1;return ee(()=>{if(!(!e||!r))return De.dispatch("PUSH",e,t),()=>De.dispatch("POP",e,t)},[r,e]),a}function Tu(r,e,t=()=>[document.body]){let n=Je(r,"scroll-lock");Au(n,e,o=>{var a;return{containers:[...(a=o.containers)!=null?a:[],t]}})}function $u(r=0){let[e,t]=f.useState(r),n=f.useCallback(i=>t(i),[e]),o=f.useCallback(i=>t(p=>p|i),[e]),a=f.useCallback(i=>(e&i)===i,[e]),l=f.useCallback(i=>t(p=>p&~i),[t]),u=f.useCallback(i=>t(p=>p^i),[t]);return{flags:e,setFlag:n,addFlag:o,hasFlag:a,removeFlag:l,toggleFlag:u}}var mo,vo;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((mo=process==null?void 0:process.env)==null?void 0:mo.NODE_ENV)==="test"&&typeof((vo=Element==null?void 0:Element.prototype)==null?void 0:vo.getAnimations)>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(` -`)),[]});var Cu=(r=>(r[r.None=0]="None",r[r.Closed=1]="Closed",r[r.Enter=2]="Enter",r[r.Leave=4]="Leave",r))(Cu||{});function Fu(r){let e={};for(let t in r)r[t]===!0&&(e[`data-${t}`]="");return e}function Mu(r,e,t,n){let[o,a]=f.useState(t),{hasFlag:l,addFlag:u,removeFlag:i}=$u(r&&o?3:0),p=f.useRef(!1),s=f.useRef(!1),b=Mt();return ee(()=>{var v;if(r){if(t&&a(!0),!e){t&&u(3);return}return(v=n==null?void 0:n.start)==null||v.call(n,t),Iu(e,{inFlight:p,prepare(){s.current?s.current=!1:s.current=p.current,p.current=!0,!s.current&&(t?(u(3),i(4)):(u(4),i(2)))},run(){s.current?t?(i(3),u(4)):(i(4),u(3)):t?i(1):u(1)},done(){var E;s.current&&typeof e.getAnimations=="function"&&e.getAnimations().length>0||(p.current=!1,i(7),t||a(!1),(E=n==null?void 0:n.end)==null||E.call(n,t))}})}},[r,t,e,b]),r?[o,{closed:l(1),enter:l(2),leave:l(4),transition:l(2)||l(4)}]:[t,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function Iu(r,{prepare:e,run:t,done:n,inFlight:o}){let a=Oe();return Du(r,{prepare:e,inFlight:o}),a.nextFrame(()=>{t(),a.requestAnimationFrame(()=>{a.add(_u(r,n))})}),a.dispose}function _u(r,e){var t,n;let o=Oe();if(!r)return o.dispose;let a=!1;o.add(()=>{a=!0});let l=(n=(t=r.getAnimations)==null?void 0:t.call(r).filter(u=>u instanceof CSSTransition))!=null?n:[];return l.length===0?(e(),o.dispose):(Promise.allSettled(l.map(u=>u.finished)).then(()=>{a||e()}),o.dispose)}function Du(r,{inFlight:e,prepare:t}){if(e!=null&&e.current){t();return}let n=r.style.transition;r.style.transition="none",t(),r.offsetHeight,r.style.transition=n}function Lt(r,e){let t=f.useRef([]),n=B(r);f.useEffect(()=>{let o=[...t.current];for(let[a,l]of e.entries())if(t.current[a]!==l){let u=n(e,o);return t.current=e,u}},[n,...e])}let Rr=f.createContext(null);Rr.displayName="OpenClosedContext";var le=(r=>(r[r.Open=1]="Open",r[r.Closed=2]="Closed",r[r.Closing=4]="Closing",r[r.Opening=8]="Opening",r))(le||{});function Hr(){return f.useContext(Rr)}function ku({value:r,children:e}){return f.createElement(Rr.Provider,{value:r},e)}function Nu({children:r}){return f.createElement(Rr.Provider,{value:null},r)}function ju(r){function e(){document.readyState!=="loading"&&(r(),document.removeEventListener("DOMContentLoaded",e))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",e),e())}let Te=[];ju(()=>{function r(e){if(!(e.target instanceof HTMLElement)||e.target===document.body||Te[0]===e.target)return;let t=e.target;t=t.closest(Br),Te.unshift(t??e.target),Te=Te.filter(n=>n!=null&&n.isConnected),Te.splice(10)}window.addEventListener("click",r,{capture:!0}),window.addEventListener("mousedown",r,{capture:!0}),window.addEventListener("focus",r,{capture:!0}),document.body.addEventListener("click",r,{capture:!0}),document.body.addEventListener("mousedown",r,{capture:!0}),document.body.addEventListener("focus",r,{capture:!0})});function ho(r){let e=B(r),t=f.useRef(!1);f.useEffect(()=>(t.current=!1,()=>{t.current=!0,jr(()=>{t.current&&e()})}),[e])}function Lu(){let r=typeof document>"u";return"useSyncExternalStore"in tr?(e=>e.useSyncExternalStore)(tr)(()=>()=>{},()=>!1,()=>!r):!1}function gr(){let r=Lu(),[e,t]=tr.useState(Me.isHandoffComplete);return e&&Me.isHandoffComplete===!1&&t(!1),tr.useEffect(()=>{e!==!0&&t(!0)},[e]),tr.useEffect(()=>Me.handoff(),[]),r?!1:e}let go=f.createContext(!1);function Wu(){return f.useContext(go)}function bo(r){return f.createElement(go.Provider,{value:r.force},r.children)}function Uu(r){let e=Wu(),t=f.useContext(Eo),n=hr(r),[o,a]=f.useState(()=>{var l;if(!e&&t!==null)return(l=t.current)!=null?l:null;if(Me.isServer)return null;let u=n==null?void 0:n.getElementById("headlessui-portal-root");if(u)return u;if(n===null)return null;let i=n.createElement("div");return i.setAttribute("id","headlessui-portal-root"),n.body.appendChild(i)});return f.useEffect(()=>{o!==null&&(n!=null&&n.body.contains(o)||n==null||n.body.appendChild(o))},[o,n]),f.useEffect(()=>{e||t!==null&&a(t.current)},[t,a,e]),o}let wo=f.Fragment,Bu=te(function(r,e){let t=r,n=f.useRef(null),o=ye(Ql(b=>{n.current=b}),e),a=hr(n),l=Uu(n),[u]=f.useState(()=>{var b;return Me.isServer?null:(b=a==null?void 0:a.createElement("div"))!=null?b:null}),i=f.useContext(Wt),p=gr();ee(()=>{!l||!u||l.contains(u)||(u.setAttribute("data-headlessui-portal",""),l.appendChild(u))},[l,u]),ee(()=>{if(u&&i)return i.register(u)},[i,u]),ho(()=>{var b;!l||!u||(u instanceof Node&&l.contains(u)&&l.removeChild(u),l.childNodes.length<=0&&((b=l.parentElement)==null||b.removeChild(l)))});let s=ae();return p?!l||!u?null:Jo.createPortal(s({ourProps:{ref:o},theirProps:t,slot:{},defaultTag:wo,name:"Portal"}),u):null});function Ru(r,e){let t=ye(e),{enabled:n=!0,...o}=r,a=ae();return n?f.createElement(Bu,{...o,ref:t}):a({ourProps:{ref:t},theirProps:o,slot:{},defaultTag:wo,name:"Portal"})}let Hu=f.Fragment,Eo=f.createContext(null);function Vu(r,e){let{target:t,...n}=r,o={ref:ye(e)},a=ae();return f.createElement(Eo.Provider,{value:t},a({ourProps:o,theirProps:n,defaultTag:Hu,name:"Popover.Group"}))}let Wt=f.createContext(null);function qu(){let r=f.useContext(Wt),e=f.useRef([]),t=B(a=>(e.current.push(a),r&&r.register(a),()=>n(a))),n=B(a=>{let l=e.current.indexOf(a);l!==-1&&e.current.splice(l,1),r&&r.unregister(a)}),o=f.useMemo(()=>({register:t,unregister:n,portals:e}),[t,n,e]);return[e,f.useMemo(()=>function({children:a}){return f.createElement(Wt.Provider,{value:o},a)},[o])]}let Gu=te(Ru),So=te(Vu),zu=Object.assign(Gu,{Group:So});function Yu(r,e=typeof document<"u"?document.defaultView:null,t){let n=Je(r,"escape");yo(e,"keydown",o=>{n&&(o.defaultPrevented||o.key===oo.Escape&&t(o))})}function Ku(){var r;let[e]=f.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(pointer: coarse)"):null),[t,n]=f.useState((r=e==null?void 0:e.matches)!=null?r:!1);return ee(()=>{if(!e)return;function o(a){n(a.matches)}return e.addEventListener("change",o),()=>e.removeEventListener("change",o)},[e]),t}function Xu({defaultContainers:r=[],portals:e,mainTreeNode:t}={}){let n=hr(t),o=B(()=>{var a,l;let u=[];for(let i of r)i!==null&&(i instanceof HTMLElement?u.push(i):"current"in i&&i.current instanceof HTMLElement&&u.push(i.current));if(e!=null&&e.current)for(let i of e.current)u.push(i);for(let i of(a=n==null?void 0:n.querySelectorAll("html > *, body > *"))!=null?a:[])i!==document.body&&i!==document.head&&i instanceof HTMLElement&&i.id!=="headlessui-portal-root"&&(t&&(i.contains(t)||i.contains((l=t==null?void 0:t.getRootNode())==null?void 0:l.host))||u.some(p=>i.contains(p))||u.push(i));return u});return{resolveContainers:o,contains:B(a=>o().some(l=>l.contains(a)))}}let xo=f.createContext(null);function Oo({children:r,node:e}){let[t,n]=f.useState(null),o=Po(e??t);return f.createElement(xo.Provider,{value:o},r,o===null&&f.createElement(Dt,{features:Ur.Hidden,ref:a=>{var l,u;if(a){for(let i of(u=(l=Nr(a))==null?void 0:l.querySelectorAll("html > *, body > *"))!=null?u:[])if(i!==document.body&&i!==document.head&&i instanceof HTMLElement&&i!=null&&i.contains(a)){n(i);break}}}}))}function Po(r=null){var e;return(e=f.useContext(xo))!=null?e:r}function Ut(){let r=f.useRef(!1);return ee(()=>(r.current=!0,()=>{r.current=!1}),[]),r}var br=(r=>(r[r.Forwards=0]="Forwards",r[r.Backwards=1]="Backwards",r))(br||{});function Ju(){let r=f.useRef(0);return fo(!0,"keydown",e=>{e.key==="Tab"&&(r.current=e.shiftKey?1:0)},!0),r}function Ao(r){if(!r)return new Set;if(typeof r=="function")return new Set(r());let e=new Set;for(let t of r.current)t.current instanceof HTMLElement&&e.add(t.current);return e}let Qu="div";var ke=(r=>(r[r.None=0]="None",r[r.InitialFocus=1]="InitialFocus",r[r.TabLock=2]="TabLock",r[r.FocusLock=4]="FocusLock",r[r.RestoreFocus=8]="RestoreFocus",r[r.AutoFocus=16]="AutoFocus",r))(ke||{});function Zu(r,e){let t=f.useRef(null),n=ye(t,e),{initialFocus:o,initialFocusFallback:a,containers:l,features:u=15,...i}=r;gr()||(u=0);let p=hr(t);ns(u,{ownerDocument:p});let s=os(u,{ownerDocument:p,container:t,initialFocus:o,initialFocusFallback:a});as(u,{ownerDocument:p,container:t,containers:l,previousActiveElement:s});let b=Ju(),v=B(g=>{let w=t.current;w&&(x=>x())(()=>{Pe(b.current,{[br.Forwards]:()=>{mr(w,he.First,{skipElements:[g.relatedTarget,a]})},[br.Backwards]:()=>{mr(w,he.Last,{skipElements:[g.relatedTarget,a]})}})})}),E=Je(!!(u&2),"focus-trap#tab-lock"),d=Mt(),m=f.useRef(!1),y={ref:n,onKeyDown(g){g.key=="Tab"&&(m.current=!0,d.requestAnimationFrame(()=>{m.current=!1}))},onBlur(g){if(!(u&4))return;let w=Ao(l);t.current instanceof HTMLElement&&w.add(t.current);let x=g.relatedTarget;x instanceof HTMLElement&&x.dataset.headlessuiFocusGuard!=="true"&&(To(w,x)||(m.current?mr(t.current,Pe(b.current,{[br.Forwards]:()=>he.Next,[br.Backwards]:()=>he.Previous})|he.WrapAround,{relativeTo:g.target}):g.target instanceof HTMLElement&&ge(g.target)))}},h=ae();return f.createElement(f.Fragment,null,E&&f.createElement(Dt,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:v,features:Ur.Focusable}),h({ourProps:y,theirProps:i,defaultTag:Qu,name:"FocusTrap"}),E&&f.createElement(Dt,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:v,features:Ur.Focusable}))}let es=te(Zu),rs=Object.assign(es,{features:ke});function ts(r=!0){let e=f.useRef(Te.slice());return Lt(([t],[n])=>{n===!0&&t===!1&&jr(()=>{e.current.splice(0)}),n===!1&&t===!0&&(e.current=Te.slice())},[r,Te,e]),B(()=>{var t;return(t=e.current.find(n=>n!=null&&n.isConnected))!=null?t:null})}function ns(r,{ownerDocument:e}){let t=!!(r&8),n=ts(t);Lt(()=>{t||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&ge(n())},[t]),ho(()=>{t&&ge(n())})}function os(r,{ownerDocument:e,container:t,initialFocus:n,initialFocusFallback:o}){let a=f.useRef(null),l=Je(!!(r&1),"focus-trap#initial-focus"),u=Ut();return Lt(()=>{if(r===0)return;if(!l){o!=null&&o.current&&ge(o.current);return}let i=t.current;i&&jr(()=>{if(!u.current)return;let p=e==null?void 0:e.activeElement;if(n!=null&&n.current){if((n==null?void 0:n.current)===p){a.current=p;return}}else if(i.contains(p)){a.current=p;return}if(n!=null&&n.current)ge(n.current);else{if(r&16){if(mr(i,he.First|he.AutoFocus)!==jt.Error)return}else if(mr(i,he.First)!==jt.Error)return;if(o!=null&&o.current&&(ge(o.current),(e==null?void 0:e.activeElement)===o.current))return;console.warn("There are no focusable elements inside the ")}a.current=e==null?void 0:e.activeElement})},[o,l,r]),a}function as(r,{ownerDocument:e,container:t,containers:n,previousActiveElement:o}){let a=Ut(),l=!!(r&4);yo(e==null?void 0:e.defaultView,"focus",u=>{if(!l||!a.current)return;let i=Ao(n);t.current instanceof HTMLElement&&i.add(t.current);let p=o.current;if(!p)return;let s=u.target;s&&s instanceof HTMLElement?To(i,s)?(o.current=s,ge(s)):(u.preventDefault(),u.stopPropagation(),ge(p)):ge(o.current)},!0)}function To(r,e){for(let t of r)if(t.contains(e))return!0;return!1}function $o(r){var e;return!!(r.enter||r.enterFrom||r.enterTo||r.leave||r.leaveFrom||r.leaveTo)||((e=r.as)!=null?e:Fo)!==f.Fragment||f.Children.count(r.children)===1}let Vr=f.createContext(null);Vr.displayName="TransitionContext";var is=(r=>(r.Visible="visible",r.Hidden="hidden",r))(is||{});function ls(){let r=f.useContext(Vr);if(r===null)throw new Error("A is used but it is missing a parent or .");return r}function us(){let r=f.useContext(qr);if(r===null)throw new Error("A is used but it is missing a parent or .");return r}let qr=f.createContext(null);qr.displayName="NestingContext";function Gr(r){return"children"in r?Gr(r.children):r.current.filter(({el:e})=>e.current!==null).filter(({state:e})=>e==="visible").length>0}function Co(r,e){let t=Ie(r),n=f.useRef([]),o=Ut(),a=Mt(),l=B((E,d=Ae.Hidden)=>{let m=n.current.findIndex(({el:y})=>y===E);m!==-1&&(Pe(d,{[Ae.Unmount](){n.current.splice(m,1)},[Ae.Hidden](){n.current[m].state="hidden"}}),a.microTask(()=>{var y;!Gr(n)&&o.current&&((y=t.current)==null||y.call(t))}))}),u=B(E=>{let d=n.current.find(({el:m})=>m===E);return d?d.state!=="visible"&&(d.state="visible"):n.current.push({el:E,state:"visible"}),()=>l(E,Ae.Unmount)}),i=f.useRef([]),p=f.useRef(Promise.resolve()),s=f.useRef({enter:[],leave:[]}),b=B((E,d,m)=>{i.current.splice(0),e&&(e.chains.current[d]=e.chains.current[d].filter(([y])=>y!==E)),e==null||e.chains.current[d].push([E,new Promise(y=>{i.current.push(y)})]),e==null||e.chains.current[d].push([E,new Promise(y=>{Promise.all(s.current[d].map(([h,g])=>g)).then(()=>y())})]),d==="enter"?p.current=p.current.then(()=>e==null?void 0:e.wait.current).then(()=>m(d)):m(d)}),v=B((E,d,m)=>{Promise.all(s.current[d].splice(0).map(([y,h])=>h)).then(()=>{var y;(y=i.current.shift())==null||y()}).then(()=>m(d))});return f.useMemo(()=>({children:n,register:u,unregister:l,onStart:b,onStop:v,wait:p,chains:s}),[u,l,n,b,v,s,p])}let Fo=f.Fragment,Mo=Lr.RenderStrategy;function ss(r,e){var t,n;let{transition:o=!0,beforeEnter:a,afterEnter:l,beforeLeave:u,afterLeave:i,enter:p,enterFrom:s,enterTo:b,entered:v,leave:E,leaveFrom:d,leaveTo:m,...y}=r,[h,g]=f.useState(null),w=f.useRef(null),x=$o(r),P=ye(...x?[w,e,g]:e===null?[]:[e]),D=(t=y.unmount)==null||t?Ae.Unmount:Ae.Hidden,{show:_,appear:U,initial:H}=ls(),[j,z]=f.useState(_?"visible":"hidden"),V=us(),{register:C,unregister:T}=V;ee(()=>C(w),[C,w]),ee(()=>{if(D===Ae.Hidden&&w.current){if(_&&j!=="visible"){z("visible");return}return Pe(j,{hidden:()=>T(w),visible:()=>C(w)})}},[j,w,C,T,_,D]);let k=gr();ee(()=>{if(x&&k&&j==="visible"&&w.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[w,j,k,x]);let oe=H&&!U,ue=U&&_&&H,me=f.useRef(!1),Z=Co(()=>{me.current||(z("hidden"),T(w))},V),se=B(Le=>{me.current=!0;let be=Le?"enter":"leave";Z.onStart(w,be,we=>{we==="enter"?a==null||a():we==="leave"&&(u==null||u())})}),q=B(Le=>{let be=Le?"enter":"leave";me.current=!1,Z.onStop(w,be,we=>{we==="enter"?l==null||l():we==="leave"&&(i==null||i())}),be==="leave"&&!Gr(Z)&&(z("hidden"),T(w))});f.useEffect(()=>{x&&o||(se(_),q(_))},[_,x,o]);let Ne=!(!o||!x||!k||oe),[,J]=Mu(Ne,h,_,{start:se,end:q}),Vt=_e({ref:P,className:((n=It(y.className,ue&&p,ue&&s,J.enter&&p,J.enter&&J.closed&&s,J.enter&&!J.closed&&b,J.leave&&E,J.leave&&!J.closed&&d,J.leave&&J.closed&&m,!J.transition&&_&&v))==null?void 0:n.trim())||void 0,...Fu(J)}),je=0;j==="visible"&&(je|=le.Open),j==="hidden"&&(je|=le.Closed),J.enter&&(je|=le.Opening),J.leave&&(je|=le.Closing);let wr=ae();return f.createElement(qr.Provider,{value:Z},f.createElement(ku,{value:je},wr({ourProps:Vt,theirProps:y,defaultTag:Fo,features:Mo,visible:j==="visible",name:"Transition.Child"})))}function cs(r,e){let{show:t,appear:n=!1,unmount:o=!0,...a}=r,l=f.useRef(null),u=$o(r),i=ye(...u?[l,e]:e===null?[]:[e]);gr();let p=Hr();if(t===void 0&&p!==null&&(t=(p&le.Open)===le.Open),t===void 0)throw new Error("A is used but it is missing a `show={true | false}` prop.");let[s,b]=f.useState(t?"visible":"hidden"),v=Co(()=>{t||b("hidden")}),[E,d]=f.useState(!0),m=f.useRef([t]);ee(()=>{E!==!1&&m.current[m.current.length-1]!==t&&(m.current.push(t),d(!1))},[m,t]);let y=f.useMemo(()=>({show:t,appear:n,initial:E}),[t,n,E]);ee(()=>{t?b("visible"):!Gr(v)&&l.current!==null&&b("hidden")},[t,v]);let h={unmount:o},g=B(()=>{var P;E&&d(!1),(P=r.beforeEnter)==null||P.call(r)}),w=B(()=>{var P;E&&d(!1),(P=r.beforeLeave)==null||P.call(r)}),x=ae();return f.createElement(qr.Provider,{value:v},f.createElement(Vr.Provider,{value:y},x({ourProps:{...h,as:f.Fragment,children:f.createElement(Io,{ref:i,...h,...a,beforeEnter:g,beforeLeave:w})},theirProps:{},defaultTag:f.Fragment,features:Mo,visible:s==="visible",name:"Transition"})))}function fs(r,e){let t=f.useContext(Vr)!==null,n=Hr()!==null;return f.createElement(f.Fragment,null,!t&&n?f.createElement(Bt,{ref:e,...r}):f.createElement(Io,{ref:e,...r}))}let Bt=te(cs),Io=te(ss),Qe=te(fs),_o=Object.assign(Bt,{Child:Qe,Root:Bt});var ds=(r=>(r[r.Open=0]="Open",r[r.Closed=1]="Closed",r))(ds||{}),ps=(r=>(r[r.SetTitleId=0]="SetTitleId",r))(ps||{});let ys={0(r,e){return r.titleId===e.id?r:{...r,titleId:e.id}}},Rt=f.createContext(null);Rt.displayName="DialogContext";function zr(r){let e=f.useContext(Rt);if(e===null){let t=new Error(`<${r} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,zr),t}return e}function ms(r,e){return Pe(e.type,ys,r,e)}let Do=te(function(r,e){let t=f.useId(),{id:n=`headlessui-dialog-${t}`,open:o,onClose:a,initialFocus:l,role:u="dialog",autoFocus:i=!0,__demoMode:p=!1,unmount:s=!1,...b}=r,v=f.useRef(!1);u=function(){return u==="dialog"||u==="alertdialog"?u:(v.current||(v.current=!0,console.warn(`Invalid role [${u}] passed to . Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let E=Hr();o===void 0&&E!==null&&(o=(E&le.Open)===le.Open);let d=f.useRef(null),m=ye(d,e),y=hr(d),h=o?0:1,[g,w]=f.useReducer(ms,{titleId:null,descriptionId:null,panelRef:f.createRef()}),x=B(()=>a(!1)),P=B(q=>w({type:0,id:q})),D=gr()?h===0:!1,[_,U]=qu(),H={get current(){var q;return(q=g.panelRef.current)!=null?q:d.current}},j=Po(),{resolveContainers:z}=Xu({mainTreeNode:j,portals:_,defaultContainers:[H]}),V=E!==null?(E&le.Closing)===le.Closing:!1;uu(p||V?!1:D,{allowed:B(()=>{var q,Ne;return[(Ne=(q=d.current)==null?void 0:q.closest("[data-headlessui-portal]"))!=null?Ne:null]}),disallowed:B(()=>{var q;return[(q=j==null?void 0:j.closest("body > *:not(#headlessui-portal-root)"))!=null?q:null]})}),Eu(D,z,q=>{q.preventDefault(),x()}),Yu(D,y==null?void 0:y.defaultView,q=>{q.preventDefault(),q.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),x()}),Tu(p||V?!1:D,y,z),su(D,d,x);let[C,T]=Zl(),k=f.useMemo(()=>[{dialogState:h,close:x,setTitleId:P,unmount:s},g],[h,g,x,P,s]),oe=f.useMemo(()=>({open:h===0}),[h]),ue={ref:m,id:n,role:u,tabIndex:-1,"aria-modal":p?void 0:h===0?!0:void 0,"aria-labelledby":g.titleId,"aria-describedby":C,unmount:s},me=!Ku(),Z=ke.None;D&&!p&&(Z|=ke.RestoreFocus,Z|=ke.TabLock,i&&(Z|=ke.AutoFocus),me&&(Z|=ke.InitialFocus));let se=ae();return f.createElement(Nu,null,f.createElement(bo,{force:!0},f.createElement(zu,null,f.createElement(Rt.Provider,{value:k},f.createElement(So,{target:d},f.createElement(bo,{force:!1},f.createElement(T,{slot:oe},f.createElement(U,null,f.createElement(rs,{initialFocus:l,initialFocusFallback:d,containers:z,features:Z},f.createElement(au,{value:x},se({ourProps:ue,theirProps:b,slot:oe,defaultTag:vs,features:hs,visible:h===0,name:"Dialog"})))))))))))}),vs="div",hs=Lr.RenderStrategy|Lr.Static;function gs(r,e){let{transition:t=!1,open:n,...o}=r,a=Hr(),l=r.hasOwnProperty("open")||a!==null,u=r.hasOwnProperty("onClose");if(!l&&!u)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!l)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!u)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!a&&typeof r.open!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${r.open}`);if(typeof r.onClose!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${r.onClose}`);return(n!==void 0||t)&&!o.static?f.createElement(Oo,null,f.createElement(_o,{show:n,transition:t,unmount:o.unmount},f.createElement(Do,{ref:e,...o}))):f.createElement(Oo,null,f.createElement(Do,{ref:e,open:n,...o}))}let bs="div";function ws(r,e){let t=f.useId(),{id:n=`headlessui-dialog-panel-${t}`,transition:o=!1,...a}=r,[{dialogState:l,unmount:u},i]=zr("Dialog.Panel"),p=ye(e,i.panelRef),s=f.useMemo(()=>({open:l===0}),[l]),b=B(y=>{y.stopPropagation()}),v={ref:p,id:n,onClick:b},E=o?Qe:f.Fragment,d=o?{unmount:u}:{},m=ae();return f.createElement(E,{...d},m({ourProps:v,theirProps:a,slot:s,defaultTag:bs,name:"Dialog.Panel"}))}let Es="div";function Ss(r,e){let{transition:t=!1,...n}=r,[{dialogState:o,unmount:a}]=zr("Dialog.Backdrop"),l=f.useMemo(()=>({open:o===0}),[o]),u={ref:e,"aria-hidden":!0},i=t?Qe:f.Fragment,p=t?{unmount:a}:{},s=ae();return f.createElement(i,{...p},s({ourProps:u,theirProps:n,slot:l,defaultTag:Es,name:"Dialog.Backdrop"}))}let xs="h2";function Os(r,e){let t=f.useId(),{id:n=`headlessui-dialog-title-${t}`,...o}=r,[{dialogState:a,setTitleId:l}]=zr("Dialog.Title"),u=ye(e);f.useEffect(()=>(l(n),()=>l(null)),[n,l]);let i=f.useMemo(()=>({open:a===0}),[a]),p={ref:u,id:n};return ae()({ourProps:p,theirProps:o,slot:i,defaultTag:xs,name:"Dialog.Title"})}let Ps=te(gs),Ht=te(ws);te(Ss);let As=te(Os),Ts=Object.assign(Ps,{Panel:Ht,Title:As,Description:nu});function ko({onClick:r}){return $.jsxs("button",{type:"button",className:"im-close-button text-gray-400 hover:text-gray-500",onClick:r,children:[$.jsx("span",{className:"sr-only",children:"Close"}),$.jsx("svg",{className:"size-6",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor","aria-hidden":"true",children:$.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})]})}const $s=({modalContext:r,config:e,children:t})=>$.jsx("div",{className:"im-modal-container fixed inset-0 z-40 overflow-y-auto p-4",children:$.jsx("div",{className:kr("im-modal-positioner flex min-h-full justify-center",{"items-start":e.position==="top","items-center":e.position==="center","items-end":e.position==="bottom"}),children:$.jsx(Qe,{enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",afterLeave:r.afterLeave,className:kr("im-modal-wrapper w-full transition duration-300 ease-in-out",r.onTopOfStack?"":"blur-sm",{"sm:max-w-sm":e.maxWidth==="sm","sm:max-w-md":e.maxWidth==="md","sm:max-w-md md:max-w-lg":e.maxWidth==="lg","sm:max-w-md md:max-w-xl":e.maxWidth==="xl","sm:max-w-md md:max-w-xl lg:max-w-2xl":e.maxWidth==="2xl","sm:max-w-md md:max-w-xl lg:max-w-3xl":e.maxWidth==="3xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-4xl":e.maxWidth==="4xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl":e.maxWidth==="5xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-6xl":e.maxWidth==="6xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-7xl":e.maxWidth==="7xl"}),children:$.jsxs(Ht,{className:`im-modal-content relative ${e.paddingClasses} ${e.panelClasses}`,children:[e.closeButton&&$.jsx("div",{className:"absolute right-0 top-0 pr-3 pt-3",children:$.jsx(ko,{onClick:r.close})}),typeof t=="function"?t({modalContext:r,config:e}):t]})})})}),Cs=({modalContext:r,config:e,children:t})=>$.jsx("div",{className:"im-slideover-container fixed inset-0 z-40 overflow-y-auto overflow-x-hidden",children:$.jsx("div",{className:kr("im-slideover-positioner flex min-h-full items-center",{"justify-start":e.position==="left","justify-end":e.position==="right"}),children:$.jsx(Qe,{enterFrom:`opacity-0 ${e.position==="left"?"-translate-x-full":"translate-x-full"}`,enterTo:"opacity-100 translate-x-0",leaveFrom:"opacity-100 translate-x-0",leaveTo:`opacity-0 ${e.position==="left"?"-translate-x-full":"translate-x-full"}`,afterLeave:r.afterLeave,className:kr("im-slideover-wrapper w-full transition duration-300 ease-in-out",r.onTopOfStack?"":"blur-sm",{"sm:max-w-sm":e.maxWidth==="sm","sm:max-w-md":e.maxWidth==="md","sm:max-w-md md:max-w-lg":e.maxWidth==="lg","sm:max-w-md md:max-w-xl":e.maxWidth==="xl","sm:max-w-md md:max-w-xl lg:max-w-2xl":e.maxWidth==="2xl","sm:max-w-md md:max-w-xl lg:max-w-3xl":e.maxWidth==="3xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-4xl":e.maxWidth==="4xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl":e.maxWidth==="5xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-6xl":e.maxWidth==="6xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-7xl":e.maxWidth==="7xl"}),children:$.jsxs(Ht,{className:`im-slideover-content relative ${e.paddingClasses} ${e.panelClasses}`,children:[e.closeButton&&$.jsx("div",{className:"absolute right-0 top-0 pr-3 pt-3",children:$.jsx(ko,{onClick:r.close})}),typeof t=="function"?t({modalContext:r,config:e}):t]})})})}),No=f.forwardRef(({name:r,children:e,...t},n)=>{const o=l=>typeof e=="function"?e(l):e,a=f.useRef(null);return f.useImperativeHandle(n,()=>a.current,[a]),$.jsx(Ct,{ref:a,name:r,...t,children:({afterLeave:l,close:u,config:i,emit:p,getChildModal:s,getParentModal:b,id:v,index:E,isOpen:d,modalContext:m,onTopOfStack:y,reload:h,setOpen:g,shouldRender:w})=>$.jsx(_o,{appear:!0,show:d??!1,children:$.jsxs(Ts,{as:"div",className:"im-dialog relative z-20",onClose:()=>i.closeExplicitly?null:u(),"data-inertiaui-modal-id":v,"data-inertiaui-modal-index":E,children:[E===0?$.jsx(Qe,{enter:"transition transform ease-in-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"transition transform ease-in-out duration-300",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:y?$.jsx("div",{className:"im-backdrop fixed inset-0 z-30 bg-black/75","aria-hidden":"true"}):$.jsx("div",{})}):null,E>0&&y?$.jsx("div",{className:"im-backdrop fixed inset-0 z-30 bg-black/75"}):null,i.slideover?$.jsx(Cs,{modalContext:m,config:i,children:o({afterLeave:l,close:u,config:i,emit:p,getChildModal:s,getParentModal:b,id:v,index:E,isOpen:d,modalContext:m,onTopOfStack:y,reload:h,setOpen:g,shouldRender:w})}):$.jsx($s,{modalContext:m,config:i,children:o({afterLeave:l,close:u,config:i,emit:p,getChildModal:s,getParentModal:b,id:v,index:E,isOpen:d,modalContext:m,onTopOfStack:y,reload:h,setOpen:g,shouldRender:w})})]})})})});No.displayName="Modal";const Fs=({href:r,method:e="get",data:t={},as:n="a",headers:o={},queryStringArrayFormat:a="brackets",onAfterLeave:l=null,onBlur:u=null,onClose:i=null,onError:p=null,onFocus:s=null,onStart:b=null,onSuccess:v=null,navigate:E=null,children:d,...m})=>{const[y,h]=f.useState(!1),[g,w]=f.useState(null),{stack:x,visit:P}=pr(),D=f.useMemo(()=>E??Or("navigate"),[E]),_={},U={};Object.keys(m).forEach(T=>{Jn.includes(T)||(T.startsWith("on")&&typeof m[T]=="function"?T.toLowerCase()in window?_[T]=m[T]:U[T]=m[T]:_[T]=m[T])});const[H,j]=f.useState(!1);f.useEffect(()=>{g&&(g.onTopOfStack&&H?s==null||s():!g.onTopOfStack&&!H&&(u==null||u()),j(!g.onTopOfStack))},[x]);const z=f.useCallback(()=>{i==null||i()},[i]),V=f.useCallback(()=>{w(null),l==null||l()},[l]),C=f.useCallback(T=>{T==null||T.preventDefault(),!y&&(r.startsWith("#")||(h(!0),b==null||b()),P(r,e,t,o,la(Zt(m,Jn)),()=>z(x.length),V,a,D).then(k=>{w(k),k.registerEventListenersFromProps(U),v==null||v()}).catch(k=>{console.error(k),p==null||p(k)}).finally(()=>h(!1)))},[r,e,t,o,a,m,z,V]);return $.jsx(n,{..._,href:r,onClick:C,children:typeof d=="function"?d({loading:y}):d})};function Ms(){return pr().stack[$t()]??null}L.HeadlessModal=Ct,L.Modal=No,L.ModalLink=Fs,L.ModalRoot=Qn,L.ModalStackProvider=Xn,L.getConfig=Or,L.putConfig=ra,L.renderApp=Bl,L.resetConfig=ea,L.useModal=Ms,L.useModalIndex=$t,L.useModalStack=pr,Object.defineProperty(L,Symbol.toStringTag,{value:"Module"})}); +`))}else{let v=s.props,E=v==null?void 0:v.className,p=typeof E=="function"?(...h)=>It(E(...h),i.className):It(E,i.className),m=p?{className:p}:{},y=ro(s.props,_e(_t(i,["ref"])));for(let h in g)h in y&&delete g[h];return f.cloneElement(s,Object.assign({},y,g,d,{ref:o(s.ref,d.ref)},m))}return f.createElement(a,Object.assign({},_t(i,["ref"]),a!==f.Fragment&&d,a!==f.Fragment&&g),s)}function Yl(){let r=f.useRef([]),e=f.useCallback(t=>{for(let n of r.current)n!=null&&(typeof n=="function"?n(t):n.current=t)},[]);return(...t)=>{if(!t.every(n=>n==null))return r.current=t,e}}function Kl(...r){return r.every(e=>e==null)?void 0:e=>{for(let t of r)t!=null&&(typeof t=="function"?t(e):t.current=e)}}function ro(...r){if(r.length===0)return{};if(r.length===1)return r[0];let e={},t={};for(let n of r)for(let o in n)o.startsWith("on")&&typeof n[o]=="function"?(t[o]!=null||(t[o]=[]),t[o].push(n[o])):e[o]=n[o];if(e.disabled||e["aria-disabled"])for(let n in t)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(n)&&(t[n]=[o=>{var a;return(a=o==null?void 0:o.preventDefault)==null?void 0:a.call(o)}]);for(let n in t)Object.assign(e,{[n](o,...a){let l=t[n];for(let u of l){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;u(o,...a)}}});return e}function te(r){var e;return Object.assign(f.forwardRef(r),{displayName:(e=r.displayName)!=null?e:r.name})}function _e(r){let e=Object.assign({},r);for(let t in e)e[t]===void 0&&delete e[t];return e}function _t(r,e=[]){let t=Object.assign({},r);for(let n of e)n in t&&delete t[n];return t}let Xl="span";var Ur=(r=>(r[r.None=1]="None",r[r.Focusable=2]="Focusable",r[r.Hidden=4]="Hidden",r))(Ur||{});function Jl(r,e){var t;let{features:n=1,...o}=r,a={ref:e,"aria-hidden":(n&2)===2?!0:(t=o["aria-hidden"])!=null?t:void 0,hidden:(n&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(n&4)===4&&(n&2)!==2&&{display:"none"}}};return ae()({ourProps:a,theirProps:o,slot:{},defaultTag:Xl,name:"Hidden"})}let Dt=te(Jl),to=Symbol();function Ql(r,e=!0){return Object.assign(r,{[to]:e})}function ye(...r){let e=f.useRef(r);f.useEffect(()=>{e.current=r},[r]);let t=B(n=>{for(let o of e.current)o!=null&&(typeof o=="function"?o(n):o.current=n)});return r.every(n=>n==null||(n==null?void 0:n[to]))?void 0:t}let kt=f.createContext(null);kt.displayName="DescriptionContext";function no(){let r=f.useContext(kt);if(r===null){let e=new Error("You used a component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,no),e}return r}function Zl(){let[r,e]=f.useState([]);return[r.length>0?r.join(" "):void 0,f.useMemo(()=>function(t){let n=B(a=>(e(l=>[...l,a]),()=>e(l=>{let u=l.slice(),i=u.indexOf(a);return i!==-1&&u.splice(i,1),u}))),o=f.useMemo(()=>({register:n,slot:t.slot,name:t.name,props:t.props,value:t.value}),[n,t.slot,t.name,t.props,t.value]);return f.createElement(kt.Provider,{value:o},t.children)},[e])]}let eu="p";function ru(r,e){let t=f.useId(),n=Gl(),{id:o=`headlessui-description-${t}`,...a}=r,l=no(),u=ye(e);ee(()=>l.register(o),[o,l.register]);let i=n||!1,d=f.useMemo(()=>({...l.slot,disabled:i}),[l.slot,i]),s={ref:u,...l.props,id:o};return ae()({ourProps:s,theirProps:a,slot:d,defaultTag:eu,name:l.name||"Description"})}let tu=te(ru),nu=Object.assign(tu,{});var oo=(r=>(r.Space=" ",r.Enter="Enter",r.Escape="Escape",r.Backspace="Backspace",r.Delete="Delete",r.ArrowLeft="ArrowLeft",r.ArrowUp="ArrowUp",r.ArrowRight="ArrowRight",r.ArrowDown="ArrowDown",r.Home="Home",r.End="End",r.PageUp="PageUp",r.PageDown="PageDown",r.Tab="Tab",r))(oo||{});let ou=f.createContext(()=>{});function au({value:r,children:e}){return f.createElement(ou.Provider,{value:r},e)}let iu=class extends Map{constructor(e){super(),this.factory=e}get(e){let t=super.get(e);return t===void 0&&(t=this.factory(e),this.set(e,t)),t}};function ao(r,e){let t=r(),n=new Set;return{getSnapshot(){return t},subscribe(o){return n.add(o),()=>n.delete(o)},dispatch(o,...a){let l=e[o].call(t,...a);l&&(t=l,n.forEach(u=>u()))}}}function io(r){return f.useSyncExternalStore(r.subscribe,r.getSnapshot,r.getSnapshot)}let lu=new iu(()=>ao(()=>[],{ADD(r){return this.includes(r)?this:[...this,r]},REMOVE(r){let e=this.indexOf(r);if(e===-1)return this;let t=this.slice();return t.splice(e,1),t}}));function Qe(r,e){let t=lu.get(e),n=f.useId(),o=io(t);if(ee(()=>{if(r)return t.dispatch("ADD",n),()=>t.dispatch("REMOVE",n)},[t,r]),!r)return!1;let a=o.indexOf(n),l=o.length;return a===-1&&(a=l,l+=1),a===l-1}let Nt=new Map,yr=new Map;function lo(r){var e;let t=(e=yr.get(r))!=null?e:0;return yr.set(r,t+1),t!==0?()=>uo(r):(Nt.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0,()=>uo(r))}function uo(r){var e;let t=(e=yr.get(r))!=null?e:1;if(t===1?yr.delete(r):yr.set(r,t-1),t!==1)return;let n=Nt.get(r);n&&(n["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",n["aria-hidden"]),r.inert=n.inert,Nt.delete(r))}function uu(r,{allowed:e,disallowed:t}={}){let n=Qe(r,"inert-others");ee(()=>{var o,a;if(!n)return;let l=Oe();for(let i of(o=t==null?void 0:t())!=null?o:[])i&&l.add(lo(i));let u=(a=e==null?void 0:e())!=null?a:[];for(let i of u){if(!i)continue;let d=Nr(i);if(!d)continue;let s=i.parentElement;for(;s&&s!==d.body;){for(let g of s.children)u.some(v=>g.contains(v))||l.add(lo(g));s=s.parentElement}}return l.dispose},[n,e,t])}function su(r,e,t){let n=Ie(o=>{let a=o.getBoundingClientRect();a.x===0&&a.y===0&&a.width===0&&a.height===0&&t()});f.useEffect(()=>{if(!r)return;let o=e===null?null:e instanceof HTMLElement?e:e.current;if(!o)return;let a=Oe();if(typeof ResizeObserver<"u"){let l=new ResizeObserver(()=>n.current(o));l.observe(o),a.add(()=>l.disconnect())}if(typeof IntersectionObserver<"u"){let l=new IntersectionObserver(()=>n.current(o));l.observe(o),a.add(()=>l.disconnect())}return()=>a.dispose()},[e,n,r])}let Br=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(r=>`${r}:not([tabindex='-1'])`).join(","),cu=["[data-autofocus]"].map(r=>`${r}:not([tabindex='-1'])`).join(",");var he=(r=>(r[r.First=1]="First",r[r.Previous=2]="Previous",r[r.Next=4]="Next",r[r.Last=8]="Last",r[r.WrapAround=16]="WrapAround",r[r.NoScroll=32]="NoScroll",r[r.AutoFocus=64]="AutoFocus",r))(he||{}),jt=(r=>(r[r.Error=0]="Error",r[r.Overflow=1]="Overflow",r[r.Success=2]="Success",r[r.Underflow=3]="Underflow",r))(jt||{}),fu=(r=>(r[r.Previous=-1]="Previous",r[r.Next=1]="Next",r))(fu||{});function du(r=document.body){return r==null?[]:Array.from(r.querySelectorAll(Br)).sort((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}function pu(r=document.body){return r==null?[]:Array.from(r.querySelectorAll(cu)).sort((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}var so=(r=>(r[r.Strict=0]="Strict",r[r.Loose=1]="Loose",r))(so||{});function yu(r,e=0){var t;return r===((t=Nr(r))==null?void 0:t.body)?!1:Pe(e,{0(){return r.matches(Br)},1(){let n=r;for(;n!==null;){if(n.matches(Br))return!0;n=n.parentElement}return!1}})}var mu=(r=>(r[r.Keyboard=0]="Keyboard",r[r.Mouse=1]="Mouse",r))(mu||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",r=>{r.metaKey||r.altKey||r.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",r=>{r.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:r.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function ge(r){r==null||r.focus({preventScroll:!0})}let vu=["textarea","input"].join(",");function hu(r){var e,t;return(t=(e=r==null?void 0:r.matches)==null?void 0:e.call(r,vu))!=null?t:!1}function gu(r,e=t=>t){return r.slice().sort((t,n)=>{let o=e(t),a=e(n);if(o===null||a===null)return 0;let l=o.compareDocumentPosition(a);return l&Node.DOCUMENT_POSITION_FOLLOWING?-1:l&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function mr(r,e,{sorted:t=!0,relativeTo:n=null,skipElements:o=[]}={}){let a=Array.isArray(r)?r.length>0?r[0].ownerDocument:document:r.ownerDocument,l=Array.isArray(r)?t?gu(r):r:e&64?pu(r):du(r);o.length>0&&l.length>1&&(l=l.filter(E=>!o.some(p=>p!=null&&"current"in p?(p==null?void 0:p.current)===E:p===E))),n=n??a.activeElement;let u=(()=>{if(e&5)return 1;if(e&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),i=(()=>{if(e&1)return 0;if(e&2)return Math.max(0,l.indexOf(n))-1;if(e&4)return Math.max(0,l.indexOf(n))+1;if(e&8)return l.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),d=e&32?{preventScroll:!0}:{},s=0,g=l.length,v;do{if(s>=g||s+g<=0)return 0;let E=i+s;if(e&16)E=(E+g)%g;else{if(E<0)return 3;if(E>=g)return 1}v=l[E],v==null||v.focus(d),s+=u}while(v!==a.activeElement);return e&6&&hu(v)&&v.select(),2}function co(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function bu(){return/Android/gi.test(window.navigator.userAgent)}function wu(){return co()||bu()}function vr(r,e,t,n){let o=Ie(t);f.useEffect(()=>{if(!r)return;function a(l){o.current(l)}return document.addEventListener(e,a,n),()=>document.removeEventListener(e,a,n)},[r,e,n])}function fo(r,e,t,n){let o=Ie(t);f.useEffect(()=>{if(!r)return;function a(l){o.current(l)}return window.addEventListener(e,a,n),()=>window.removeEventListener(e,a,n)},[r,e,n])}const po=30;function Eu(r,e,t){let n=Qe(r,"outside-click"),o=Ie(t),a=f.useCallback(function(i,d){if(i.defaultPrevented)return;let s=d(i);if(s===null||!s.getRootNode().contains(s)||!s.isConnected)return;let g=function v(E){return typeof E=="function"?v(E()):Array.isArray(E)||E instanceof Set?E:[E]}(e);for(let v of g)if(v!==null&&(v.contains(s)||i.composed&&i.composedPath().includes(v)))return;return!yu(s,so.Loose)&&s.tabIndex!==-1&&i.preventDefault(),o.current(i,s)},[o,e]),l=f.useRef(null);vr(n,"pointerdown",i=>{var d,s;l.current=((s=(d=i.composedPath)==null?void 0:d.call(i))==null?void 0:s[0])||i.target},!0),vr(n,"mousedown",i=>{var d,s;l.current=((s=(d=i.composedPath)==null?void 0:d.call(i))==null?void 0:s[0])||i.target},!0),vr(n,"click",i=>{wu()||l.current&&(a(i,()=>l.current),l.current=null)},!0);let u=f.useRef({x:0,y:0});vr(n,"touchstart",i=>{u.current.x=i.touches[0].clientX,u.current.y=i.touches[0].clientY},!0),vr(n,"touchend",i=>{let d={x:i.changedTouches[0].clientX,y:i.changedTouches[0].clientY};if(!(Math.abs(d.x-u.current.x)>=po||Math.abs(d.y-u.current.y)>=po))return a(i,()=>i.target instanceof HTMLElement?i.target:null)},!0),fo(n,"blur",i=>a(i,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function hr(...r){return f.useMemo(()=>Nr(...r),[...r])}function yo(r,e,t,n){let o=Ie(t);f.useEffect(()=>{r=r??window;function a(l){o.current(l)}return r.addEventListener(e,a,n),()=>r.removeEventListener(e,a,n)},[r,e,n])}function Su(){let r;return{before({doc:e}){var t;let n=e.documentElement,o=(t=e.defaultView)!=null?t:window;r=Math.max(0,o.innerWidth-n.clientWidth)},after({doc:e,d:t}){let n=e.documentElement,o=Math.max(0,n.clientWidth-n.offsetWidth),a=Math.max(0,r-o);t.style(n,"paddingRight",`${a}px`)}}}function xu(){return co()?{before({doc:r,d:e,meta:t}){function n(o){return t.containers.flatMap(a=>a()).some(a=>a.contains(o))}e.microTask(()=>{var o;if(window.getComputedStyle(r.documentElement).scrollBehavior!=="auto"){let u=Oe();u.style(r.documentElement,"scrollBehavior","auto"),e.add(()=>e.microTask(()=>u.dispose()))}let a=(o=window.scrollY)!=null?o:window.pageYOffset,l=null;e.addEventListener(r,"click",u=>{if(u.target instanceof HTMLElement)try{let i=u.target.closest("a");if(!i)return;let{hash:d}=new URL(i.href),s=r.querySelector(d);s&&!n(s)&&(l=s)}catch{}},!0),e.addEventListener(r,"touchstart",u=>{if(u.target instanceof HTMLElement)if(n(u.target)){let i=u.target;for(;i.parentElement&&n(i.parentElement);)i=i.parentElement;e.style(i,"overscrollBehavior","contain")}else e.style(u.target,"touchAction","none")}),e.addEventListener(r,"touchmove",u=>{if(u.target instanceof HTMLElement){if(u.target.tagName==="INPUT")return;if(n(u.target)){let i=u.target;for(;i.parentElement&&i.dataset.headlessuiPortal!==""&&!(i.scrollHeight>i.clientHeight||i.scrollWidth>i.clientWidth);)i=i.parentElement;i.dataset.headlessuiPortal===""&&u.preventDefault()}else u.preventDefault()}},{passive:!1}),e.add(()=>{var u;let i=(u=window.scrollY)!=null?u:window.pageYOffset;a!==i&&window.scrollTo(0,a),l&&l.isConnected&&(l.scrollIntoView({block:"nearest"}),l=null)})})}}:{}}function Ou(){return{before({doc:r,d:e}){e.style(r.documentElement,"overflow","hidden")}}}function Pu(r){let e={};for(let t of r)Object.assign(e,t(e));return e}let De=ao(()=>new Map,{PUSH(r,e){var t;let n=(t=this.get(r))!=null?t:{doc:r,count:0,d:Oe(),meta:new Set};return n.count++,n.meta.add(e),this.set(r,n),this},POP(r,e){let t=this.get(r);return t&&(t.count--,t.meta.delete(e)),this},SCROLL_PREVENT({doc:r,d:e,meta:t}){let n={doc:r,d:e,meta:Pu(t)},o=[xu(),Su(),Ou()];o.forEach(({before:a})=>a==null?void 0:a(n)),o.forEach(({after:a})=>a==null?void 0:a(n))},SCROLL_ALLOW({d:r}){r.dispose()},TEARDOWN({doc:r}){this.delete(r)}});De.subscribe(()=>{let r=De.getSnapshot(),e=new Map;for(let[t]of r)e.set(t,t.documentElement.style.overflow);for(let t of r.values()){let n=e.get(t.doc)==="hidden",o=t.count!==0;(o&&!n||!o&&n)&&De.dispatch(t.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",t),t.count===0&&De.dispatch("TEARDOWN",t)}});function Au(r,e,t=()=>({containers:[]})){let n=io(De),o=e?n.get(e):void 0,a=o?o.count>0:!1;return ee(()=>{if(!(!e||!r))return De.dispatch("PUSH",e,t),()=>De.dispatch("POP",e,t)},[r,e]),a}function Tu(r,e,t=()=>[document.body]){let n=Qe(r,"scroll-lock");Au(n,e,o=>{var a;return{containers:[...(a=o.containers)!=null?a:[],t]}})}function $u(r=0){let[e,t]=f.useState(r),n=f.useCallback(i=>t(i),[e]),o=f.useCallback(i=>t(d=>d|i),[e]),a=f.useCallback(i=>(e&i)===i,[e]),l=f.useCallback(i=>t(d=>d&~i),[t]),u=f.useCallback(i=>t(d=>d^i),[t]);return{flags:e,setFlag:n,addFlag:o,hasFlag:a,removeFlag:l,toggleFlag:u}}var mo,vo;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((mo=process==null?void 0:process.env)==null?void 0:mo.NODE_ENV)==="test"&&typeof((vo=Element==null?void 0:Element.prototype)==null?void 0:vo.getAnimations)>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(` +`)),[]});var Cu=(r=>(r[r.None=0]="None",r[r.Closed=1]="Closed",r[r.Enter=2]="Enter",r[r.Leave=4]="Leave",r))(Cu||{});function Fu(r){let e={};for(let t in r)r[t]===!0&&(e[`data-${t}`]="");return e}function Mu(r,e,t,n){let[o,a]=f.useState(t),{hasFlag:l,addFlag:u,removeFlag:i}=$u(r&&o?3:0),d=f.useRef(!1),s=f.useRef(!1),g=Mt();return ee(()=>{var v;if(r){if(t&&a(!0),!e){t&&u(3);return}return(v=n==null?void 0:n.start)==null||v.call(n,t),Iu(e,{inFlight:d,prepare(){s.current?s.current=!1:s.current=d.current,d.current=!0,!s.current&&(t?(u(3),i(4)):(u(4),i(2)))},run(){s.current?t?(i(3),u(4)):(i(4),u(3)):t?i(1):u(1)},done(){var E;s.current&&typeof e.getAnimations=="function"&&e.getAnimations().length>0||(d.current=!1,i(7),t||a(!1),(E=n==null?void 0:n.end)==null||E.call(n,t))}})}},[r,t,e,g]),r?[o,{closed:l(1),enter:l(2),leave:l(4),transition:l(2)||l(4)}]:[t,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function Iu(r,{prepare:e,run:t,done:n,inFlight:o}){let a=Oe();return Du(r,{prepare:e,inFlight:o}),a.nextFrame(()=>{t(),a.requestAnimationFrame(()=>{a.add(_u(r,n))})}),a.dispose}function _u(r,e){var t,n;let o=Oe();if(!r)return o.dispose;let a=!1;o.add(()=>{a=!0});let l=(n=(t=r.getAnimations)==null?void 0:t.call(r).filter(u=>u instanceof CSSTransition))!=null?n:[];return l.length===0?(e(),o.dispose):(Promise.allSettled(l.map(u=>u.finished)).then(()=>{a||e()}),o.dispose)}function Du(r,{inFlight:e,prepare:t}){if(e!=null&&e.current){t();return}let n=r.style.transition;r.style.transition="none",t(),r.offsetHeight,r.style.transition=n}function Lt(r,e){let t=f.useRef([]),n=B(r);f.useEffect(()=>{let o=[...t.current];for(let[a,l]of e.entries())if(t.current[a]!==l){let u=n(e,o);return t.current=e,u}},[n,...e])}let Rr=f.createContext(null);Rr.displayName="OpenClosedContext";var ue=(r=>(r[r.Open=1]="Open",r[r.Closed=2]="Closed",r[r.Closing=4]="Closing",r[r.Opening=8]="Opening",r))(ue||{});function Hr(){return f.useContext(Rr)}function ku({value:r,children:e}){return f.createElement(Rr.Provider,{value:r},e)}function Nu({children:r}){return f.createElement(Rr.Provider,{value:null},r)}function ju(r){function e(){document.readyState!=="loading"&&(r(),document.removeEventListener("DOMContentLoaded",e))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",e),e())}let Te=[];ju(()=>{function r(e){if(!(e.target instanceof HTMLElement)||e.target===document.body||Te[0]===e.target)return;let t=e.target;t=t.closest(Br),Te.unshift(t??e.target),Te=Te.filter(n=>n!=null&&n.isConnected),Te.splice(10)}window.addEventListener("click",r,{capture:!0}),window.addEventListener("mousedown",r,{capture:!0}),window.addEventListener("focus",r,{capture:!0}),document.body.addEventListener("click",r,{capture:!0}),document.body.addEventListener("mousedown",r,{capture:!0}),document.body.addEventListener("focus",r,{capture:!0})});function ho(r){let e=B(r),t=f.useRef(!1);f.useEffect(()=>(t.current=!1,()=>{t.current=!0,jr(()=>{t.current&&e()})}),[e])}function Lu(){let r=typeof document>"u";return"useSyncExternalStore"in tr?(e=>e.useSyncExternalStore)(tr)(()=>()=>{},()=>!1,()=>!r):!1}function gr(){let r=Lu(),[e,t]=tr.useState(Me.isHandoffComplete);return e&&Me.isHandoffComplete===!1&&t(!1),tr.useEffect(()=>{e!==!0&&t(!0)},[e]),tr.useEffect(()=>Me.handoff(),[]),r?!1:e}let go=f.createContext(!1);function Wu(){return f.useContext(go)}function bo(r){return f.createElement(go.Provider,{value:r.force},r.children)}function Uu(r){let e=Wu(),t=f.useContext(Eo),n=hr(r),[o,a]=f.useState(()=>{var l;if(!e&&t!==null)return(l=t.current)!=null?l:null;if(Me.isServer)return null;let u=n==null?void 0:n.getElementById("headlessui-portal-root");if(u)return u;if(n===null)return null;let i=n.createElement("div");return i.setAttribute("id","headlessui-portal-root"),n.body.appendChild(i)});return f.useEffect(()=>{o!==null&&(n!=null&&n.body.contains(o)||n==null||n.body.appendChild(o))},[o,n]),f.useEffect(()=>{e||t!==null&&a(t.current)},[t,a,e]),o}let wo=f.Fragment,Bu=te(function(r,e){let t=r,n=f.useRef(null),o=ye(Ql(g=>{n.current=g}),e),a=hr(n),l=Uu(n),[u]=f.useState(()=>{var g;return Me.isServer?null:(g=a==null?void 0:a.createElement("div"))!=null?g:null}),i=f.useContext(Wt),d=gr();ee(()=>{!l||!u||l.contains(u)||(u.setAttribute("data-headlessui-portal",""),l.appendChild(u))},[l,u]),ee(()=>{if(u&&i)return i.register(u)},[i,u]),ho(()=>{var g;!l||!u||(u instanceof Node&&l.contains(u)&&l.removeChild(u),l.childNodes.length<=0&&((g=l.parentElement)==null||g.removeChild(l)))});let s=ae();return d?!l||!u?null:Jo.createPortal(s({ourProps:{ref:o},theirProps:t,slot:{},defaultTag:wo,name:"Portal"}),u):null});function Ru(r,e){let t=ye(e),{enabled:n=!0,...o}=r,a=ae();return n?f.createElement(Bu,{...o,ref:t}):a({ourProps:{ref:t},theirProps:o,slot:{},defaultTag:wo,name:"Portal"})}let Hu=f.Fragment,Eo=f.createContext(null);function Vu(r,e){let{target:t,...n}=r,o={ref:ye(e)},a=ae();return f.createElement(Eo.Provider,{value:t},a({ourProps:o,theirProps:n,defaultTag:Hu,name:"Popover.Group"}))}let Wt=f.createContext(null);function qu(){let r=f.useContext(Wt),e=f.useRef([]),t=B(a=>(e.current.push(a),r&&r.register(a),()=>n(a))),n=B(a=>{let l=e.current.indexOf(a);l!==-1&&e.current.splice(l,1),r&&r.unregister(a)}),o=f.useMemo(()=>({register:t,unregister:n,portals:e}),[t,n,e]);return[e,f.useMemo(()=>function({children:a}){return f.createElement(Wt.Provider,{value:o},a)},[o])]}let Gu=te(Ru),So=te(Vu),zu=Object.assign(Gu,{Group:So});function Yu(r,e=typeof document<"u"?document.defaultView:null,t){let n=Qe(r,"escape");yo(e,"keydown",o=>{n&&(o.defaultPrevented||o.key===oo.Escape&&t(o))})}function Ku(){var r;let[e]=f.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(pointer: coarse)"):null),[t,n]=f.useState((r=e==null?void 0:e.matches)!=null?r:!1);return ee(()=>{if(!e)return;function o(a){n(a.matches)}return e.addEventListener("change",o),()=>e.removeEventListener("change",o)},[e]),t}function Xu({defaultContainers:r=[],portals:e,mainTreeNode:t}={}){let n=hr(t),o=B(()=>{var a,l;let u=[];for(let i of r)i!==null&&(i instanceof HTMLElement?u.push(i):"current"in i&&i.current instanceof HTMLElement&&u.push(i.current));if(e!=null&&e.current)for(let i of e.current)u.push(i);for(let i of(a=n==null?void 0:n.querySelectorAll("html > *, body > *"))!=null?a:[])i!==document.body&&i!==document.head&&i instanceof HTMLElement&&i.id!=="headlessui-portal-root"&&(t&&(i.contains(t)||i.contains((l=t==null?void 0:t.getRootNode())==null?void 0:l.host))||u.some(d=>i.contains(d))||u.push(i));return u});return{resolveContainers:o,contains:B(a=>o().some(l=>l.contains(a)))}}let xo=f.createContext(null);function Oo({children:r,node:e}){let[t,n]=f.useState(null),o=Po(e??t);return f.createElement(xo.Provider,{value:o},r,o===null&&f.createElement(Dt,{features:Ur.Hidden,ref:a=>{var l,u;if(a){for(let i of(u=(l=Nr(a))==null?void 0:l.querySelectorAll("html > *, body > *"))!=null?u:[])if(i!==document.body&&i!==document.head&&i instanceof HTMLElement&&i!=null&&i.contains(a)){n(i);break}}}}))}function Po(r=null){var e;return(e=f.useContext(xo))!=null?e:r}function Ut(){let r=f.useRef(!1);return ee(()=>(r.current=!0,()=>{r.current=!1}),[]),r}var br=(r=>(r[r.Forwards=0]="Forwards",r[r.Backwards=1]="Backwards",r))(br||{});function Ju(){let r=f.useRef(0);return fo(!0,"keydown",e=>{e.key==="Tab"&&(r.current=e.shiftKey?1:0)},!0),r}function Ao(r){if(!r)return new Set;if(typeof r=="function")return new Set(r());let e=new Set;for(let t of r.current)t.current instanceof HTMLElement&&e.add(t.current);return e}let Qu="div";var ke=(r=>(r[r.None=0]="None",r[r.InitialFocus=1]="InitialFocus",r[r.TabLock=2]="TabLock",r[r.FocusLock=4]="FocusLock",r[r.RestoreFocus=8]="RestoreFocus",r[r.AutoFocus=16]="AutoFocus",r))(ke||{});function Zu(r,e){let t=f.useRef(null),n=ye(t,e),{initialFocus:o,initialFocusFallback:a,containers:l,features:u=15,...i}=r;gr()||(u=0);let d=hr(t);ns(u,{ownerDocument:d});let s=os(u,{ownerDocument:d,container:t,initialFocus:o,initialFocusFallback:a});as(u,{ownerDocument:d,container:t,containers:l,previousActiveElement:s});let g=Ju(),v=B(b=>{let w=t.current;w&&(x=>x())(()=>{Pe(g.current,{[br.Forwards]:()=>{mr(w,he.First,{skipElements:[b.relatedTarget,a]})},[br.Backwards]:()=>{mr(w,he.Last,{skipElements:[b.relatedTarget,a]})}})})}),E=Qe(!!(u&2),"focus-trap#tab-lock"),p=Mt(),m=f.useRef(!1),y={ref:n,onKeyDown(b){b.key=="Tab"&&(m.current=!0,p.requestAnimationFrame(()=>{m.current=!1}))},onBlur(b){if(!(u&4))return;let w=Ao(l);t.current instanceof HTMLElement&&w.add(t.current);let x=b.relatedTarget;x instanceof HTMLElement&&x.dataset.headlessuiFocusGuard!=="true"&&(To(w,x)||(m.current?mr(t.current,Pe(g.current,{[br.Forwards]:()=>he.Next,[br.Backwards]:()=>he.Previous})|he.WrapAround,{relativeTo:b.target}):b.target instanceof HTMLElement&&ge(b.target)))}},h=ae();return f.createElement(f.Fragment,null,E&&f.createElement(Dt,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:v,features:Ur.Focusable}),h({ourProps:y,theirProps:i,defaultTag:Qu,name:"FocusTrap"}),E&&f.createElement(Dt,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:v,features:Ur.Focusable}))}let es=te(Zu),rs=Object.assign(es,{features:ke});function ts(r=!0){let e=f.useRef(Te.slice());return Lt(([t],[n])=>{n===!0&&t===!1&&jr(()=>{e.current.splice(0)}),n===!1&&t===!0&&(e.current=Te.slice())},[r,Te,e]),B(()=>{var t;return(t=e.current.find(n=>n!=null&&n.isConnected))!=null?t:null})}function ns(r,{ownerDocument:e}){let t=!!(r&8),n=ts(t);Lt(()=>{t||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&ge(n())},[t]),ho(()=>{t&&ge(n())})}function os(r,{ownerDocument:e,container:t,initialFocus:n,initialFocusFallback:o}){let a=f.useRef(null),l=Qe(!!(r&1),"focus-trap#initial-focus"),u=Ut();return Lt(()=>{if(r===0)return;if(!l){o!=null&&o.current&&ge(o.current);return}let i=t.current;i&&jr(()=>{if(!u.current)return;let d=e==null?void 0:e.activeElement;if(n!=null&&n.current){if((n==null?void 0:n.current)===d){a.current=d;return}}else if(i.contains(d)){a.current=d;return}if(n!=null&&n.current)ge(n.current);else{if(r&16){if(mr(i,he.First|he.AutoFocus)!==jt.Error)return}else if(mr(i,he.First)!==jt.Error)return;if(o!=null&&o.current&&(ge(o.current),(e==null?void 0:e.activeElement)===o.current))return;console.warn("There are no focusable elements inside the ")}a.current=e==null?void 0:e.activeElement})},[o,l,r]),a}function as(r,{ownerDocument:e,container:t,containers:n,previousActiveElement:o}){let a=Ut(),l=!!(r&4);yo(e==null?void 0:e.defaultView,"focus",u=>{if(!l||!a.current)return;let i=Ao(n);t.current instanceof HTMLElement&&i.add(t.current);let d=o.current;if(!d)return;let s=u.target;s&&s instanceof HTMLElement?To(i,s)?(o.current=s,ge(s)):(u.preventDefault(),u.stopPropagation(),ge(d)):ge(o.current)},!0)}function To(r,e){for(let t of r)if(t.contains(e))return!0;return!1}function $o(r){var e;return!!(r.enter||r.enterFrom||r.enterTo||r.leave||r.leaveFrom||r.leaveTo)||((e=r.as)!=null?e:Fo)!==f.Fragment||f.Children.count(r.children)===1}let Vr=f.createContext(null);Vr.displayName="TransitionContext";var is=(r=>(r.Visible="visible",r.Hidden="hidden",r))(is||{});function ls(){let r=f.useContext(Vr);if(r===null)throw new Error("A is used but it is missing a parent or .");return r}function us(){let r=f.useContext(qr);if(r===null)throw new Error("A is used but it is missing a parent or .");return r}let qr=f.createContext(null);qr.displayName="NestingContext";function Gr(r){return"children"in r?Gr(r.children):r.current.filter(({el:e})=>e.current!==null).filter(({state:e})=>e==="visible").length>0}function Co(r,e){let t=Ie(r),n=f.useRef([]),o=Ut(),a=Mt(),l=B((E,p=Ae.Hidden)=>{let m=n.current.findIndex(({el:y})=>y===E);m!==-1&&(Pe(p,{[Ae.Unmount](){n.current.splice(m,1)},[Ae.Hidden](){n.current[m].state="hidden"}}),a.microTask(()=>{var y;!Gr(n)&&o.current&&((y=t.current)==null||y.call(t))}))}),u=B(E=>{let p=n.current.find(({el:m})=>m===E);return p?p.state!=="visible"&&(p.state="visible"):n.current.push({el:E,state:"visible"}),()=>l(E,Ae.Unmount)}),i=f.useRef([]),d=f.useRef(Promise.resolve()),s=f.useRef({enter:[],leave:[]}),g=B((E,p,m)=>{i.current.splice(0),e&&(e.chains.current[p]=e.chains.current[p].filter(([y])=>y!==E)),e==null||e.chains.current[p].push([E,new Promise(y=>{i.current.push(y)})]),e==null||e.chains.current[p].push([E,new Promise(y=>{Promise.all(s.current[p].map(([h,b])=>b)).then(()=>y())})]),p==="enter"?d.current=d.current.then(()=>e==null?void 0:e.wait.current).then(()=>m(p)):m(p)}),v=B((E,p,m)=>{Promise.all(s.current[p].splice(0).map(([y,h])=>h)).then(()=>{var y;(y=i.current.shift())==null||y()}).then(()=>m(p))});return f.useMemo(()=>({children:n,register:u,unregister:l,onStart:g,onStop:v,wait:d,chains:s}),[u,l,n,g,v,s,d])}let Fo=f.Fragment,Mo=Lr.RenderStrategy;function ss(r,e){var t,n;let{transition:o=!0,beforeEnter:a,afterEnter:l,beforeLeave:u,afterLeave:i,enter:d,enterFrom:s,enterTo:g,entered:v,leave:E,leaveFrom:p,leaveTo:m,...y}=r,[h,b]=f.useState(null),w=f.useRef(null),x=$o(r),P=ye(...x?[w,e,b]:e===null?[]:[e]),D=(t=y.unmount)==null||t?Ae.Unmount:Ae.Hidden,{show:_,appear:U,initial:H}=ls(),[j,z]=f.useState(_?"visible":"hidden"),V=us(),{register:C,unregister:T}=V;ee(()=>C(w),[C,w]),ee(()=>{if(D===Ae.Hidden&&w.current){if(_&&j!=="visible"){z("visible");return}return Pe(j,{hidden:()=>T(w),visible:()=>C(w)})}},[j,w,C,T,_,D]);let k=gr();ee(()=>{if(x&&k&&j==="visible"&&w.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[w,j,k,x]);let oe=H&&!U,se=U&&_&&H,me=f.useRef(!1),Z=Co(()=>{me.current||(z("hidden"),T(w))},V),ce=B(Le=>{me.current=!0;let be=Le?"enter":"leave";Z.onStart(w,be,we=>{we==="enter"?a==null||a():we==="leave"&&(u==null||u())})}),q=B(Le=>{let be=Le?"enter":"leave";me.current=!1,Z.onStop(w,be,we=>{we==="enter"?l==null||l():we==="leave"&&(i==null||i())}),be==="leave"&&!Gr(Z)&&(z("hidden"),T(w))});f.useEffect(()=>{x&&o||(ce(_),q(_))},[_,x,o]);let Ne=!(!o||!x||!k||oe),[,J]=Mu(Ne,h,_,{start:ce,end:q}),Vt=_e({ref:P,className:((n=It(y.className,se&&d,se&&s,J.enter&&d,J.enter&&J.closed&&s,J.enter&&!J.closed&&g,J.leave&&E,J.leave&&!J.closed&&p,J.leave&&J.closed&&m,!J.transition&&_&&v))==null?void 0:n.trim())||void 0,...Fu(J)}),je=0;j==="visible"&&(je|=ue.Open),j==="hidden"&&(je|=ue.Closed),J.enter&&(je|=ue.Opening),J.leave&&(je|=ue.Closing);let wr=ae();return f.createElement(qr.Provider,{value:Z},f.createElement(ku,{value:je},wr({ourProps:Vt,theirProps:y,defaultTag:Fo,features:Mo,visible:j==="visible",name:"Transition.Child"})))}function cs(r,e){let{show:t,appear:n=!1,unmount:o=!0,...a}=r,l=f.useRef(null),u=$o(r),i=ye(...u?[l,e]:e===null?[]:[e]);gr();let d=Hr();if(t===void 0&&d!==null&&(t=(d&ue.Open)===ue.Open),t===void 0)throw new Error("A is used but it is missing a `show={true | false}` prop.");let[s,g]=f.useState(t?"visible":"hidden"),v=Co(()=>{t||g("hidden")}),[E,p]=f.useState(!0),m=f.useRef([t]);ee(()=>{E!==!1&&m.current[m.current.length-1]!==t&&(m.current.push(t),p(!1))},[m,t]);let y=f.useMemo(()=>({show:t,appear:n,initial:E}),[t,n,E]);ee(()=>{t?g("visible"):!Gr(v)&&l.current!==null&&g("hidden")},[t,v]);let h={unmount:o},b=B(()=>{var P;E&&p(!1),(P=r.beforeEnter)==null||P.call(r)}),w=B(()=>{var P;E&&p(!1),(P=r.beforeLeave)==null||P.call(r)}),x=ae();return f.createElement(qr.Provider,{value:v},f.createElement(Vr.Provider,{value:y},x({ourProps:{...h,as:f.Fragment,children:f.createElement(Io,{ref:i,...h,...a,beforeEnter:b,beforeLeave:w})},theirProps:{},defaultTag:f.Fragment,features:Mo,visible:s==="visible",name:"Transition"})))}function fs(r,e){let t=f.useContext(Vr)!==null,n=Hr()!==null;return f.createElement(f.Fragment,null,!t&&n?f.createElement(Bt,{ref:e,...r}):f.createElement(Io,{ref:e,...r}))}let Bt=te(cs),Io=te(ss),Ze=te(fs),_o=Object.assign(Bt,{Child:Ze,Root:Bt});var ds=(r=>(r[r.Open=0]="Open",r[r.Closed=1]="Closed",r))(ds||{}),ps=(r=>(r[r.SetTitleId=0]="SetTitleId",r))(ps||{});let ys={0(r,e){return r.titleId===e.id?r:{...r,titleId:e.id}}},Rt=f.createContext(null);Rt.displayName="DialogContext";function zr(r){let e=f.useContext(Rt);if(e===null){let t=new Error(`<${r} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,zr),t}return e}function ms(r,e){return Pe(e.type,ys,r,e)}let Do=te(function(r,e){let t=f.useId(),{id:n=`headlessui-dialog-${t}`,open:o,onClose:a,initialFocus:l,role:u="dialog",autoFocus:i=!0,__demoMode:d=!1,unmount:s=!1,...g}=r,v=f.useRef(!1);u=function(){return u==="dialog"||u==="alertdialog"?u:(v.current||(v.current=!0,console.warn(`Invalid role [${u}] passed to . Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let E=Hr();o===void 0&&E!==null&&(o=(E&ue.Open)===ue.Open);let p=f.useRef(null),m=ye(p,e),y=hr(p),h=o?0:1,[b,w]=f.useReducer(ms,{titleId:null,descriptionId:null,panelRef:f.createRef()}),x=B(()=>a(!1)),P=B(q=>w({type:0,id:q})),D=gr()?h===0:!1,[_,U]=qu(),H={get current(){var q;return(q=b.panelRef.current)!=null?q:p.current}},j=Po(),{resolveContainers:z}=Xu({mainTreeNode:j,portals:_,defaultContainers:[H]}),V=E!==null?(E&ue.Closing)===ue.Closing:!1;uu(d||V?!1:D,{allowed:B(()=>{var q,Ne;return[(Ne=(q=p.current)==null?void 0:q.closest("[data-headlessui-portal]"))!=null?Ne:null]}),disallowed:B(()=>{var q;return[(q=j==null?void 0:j.closest("body > *:not(#headlessui-portal-root)"))!=null?q:null]})}),Eu(D,z,q=>{q.preventDefault(),x()}),Yu(D,y==null?void 0:y.defaultView,q=>{q.preventDefault(),q.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),x()}),Tu(d||V?!1:D,y,z),su(D,p,x);let[C,T]=Zl(),k=f.useMemo(()=>[{dialogState:h,close:x,setTitleId:P,unmount:s},b],[h,b,x,P,s]),oe=f.useMemo(()=>({open:h===0}),[h]),se={ref:m,id:n,role:u,tabIndex:-1,"aria-modal":d?void 0:h===0?!0:void 0,"aria-labelledby":b.titleId,"aria-describedby":C,unmount:s},me=!Ku(),Z=ke.None;D&&!d&&(Z|=ke.RestoreFocus,Z|=ke.TabLock,i&&(Z|=ke.AutoFocus),me&&(Z|=ke.InitialFocus));let ce=ae();return f.createElement(Nu,null,f.createElement(bo,{force:!0},f.createElement(zu,null,f.createElement(Rt.Provider,{value:k},f.createElement(So,{target:p},f.createElement(bo,{force:!1},f.createElement(T,{slot:oe},f.createElement(U,null,f.createElement(rs,{initialFocus:l,initialFocusFallback:p,containers:z,features:Z},f.createElement(au,{value:x},ce({ourProps:se,theirProps:g,slot:oe,defaultTag:vs,features:hs,visible:h===0,name:"Dialog"})))))))))))}),vs="div",hs=Lr.RenderStrategy|Lr.Static;function gs(r,e){let{transition:t=!1,open:n,...o}=r,a=Hr(),l=r.hasOwnProperty("open")||a!==null,u=r.hasOwnProperty("onClose");if(!l&&!u)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!l)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!u)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!a&&typeof r.open!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${r.open}`);if(typeof r.onClose!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${r.onClose}`);return(n!==void 0||t)&&!o.static?f.createElement(Oo,null,f.createElement(_o,{show:n,transition:t,unmount:o.unmount},f.createElement(Do,{ref:e,...o}))):f.createElement(Oo,null,f.createElement(Do,{ref:e,open:n,...o}))}let bs="div";function ws(r,e){let t=f.useId(),{id:n=`headlessui-dialog-panel-${t}`,transition:o=!1,...a}=r,[{dialogState:l,unmount:u},i]=zr("Dialog.Panel"),d=ye(e,i.panelRef),s=f.useMemo(()=>({open:l===0}),[l]),g=B(y=>{y.stopPropagation()}),v={ref:d,id:n,onClick:g},E=o?Ze:f.Fragment,p=o?{unmount:u}:{},m=ae();return f.createElement(E,{...p},m({ourProps:v,theirProps:a,slot:s,defaultTag:bs,name:"Dialog.Panel"}))}let Es="div";function Ss(r,e){let{transition:t=!1,...n}=r,[{dialogState:o,unmount:a}]=zr("Dialog.Backdrop"),l=f.useMemo(()=>({open:o===0}),[o]),u={ref:e,"aria-hidden":!0},i=t?Ze:f.Fragment,d=t?{unmount:a}:{},s=ae();return f.createElement(i,{...d},s({ourProps:u,theirProps:n,slot:l,defaultTag:Es,name:"Dialog.Backdrop"}))}let xs="h2";function Os(r,e){let t=f.useId(),{id:n=`headlessui-dialog-title-${t}`,...o}=r,[{dialogState:a,setTitleId:l}]=zr("Dialog.Title"),u=ye(e);f.useEffect(()=>(l(n),()=>l(null)),[n,l]);let i=f.useMemo(()=>({open:a===0}),[a]),d={ref:u,id:n};return ae()({ourProps:d,theirProps:o,slot:i,defaultTag:xs,name:"Dialog.Title"})}let Ps=te(gs),Ht=te(ws);te(Ss);let As=te(Os),Ts=Object.assign(Ps,{Panel:Ht,Title:As,Description:nu});function ko({onClick:r}){return $.jsxs("button",{type:"button",className:"im-close-button text-gray-400 hover:text-gray-500",onClick:r,children:[$.jsx("span",{className:"sr-only",children:"Close"}),$.jsx("svg",{className:"size-6",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor","aria-hidden":"true",children:$.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})]})}const $s=({modalContext:r,config:e,children:t})=>$.jsx("div",{className:"im-modal-container fixed inset-0 z-40 overflow-y-auto p-4",children:$.jsx("div",{className:kr("im-modal-positioner flex min-h-full justify-center",{"items-start":e.position==="top","items-center":e.position==="center","items-end":e.position==="bottom"}),children:$.jsx(Ze,{enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",afterLeave:r.afterLeave,className:kr("im-modal-wrapper w-full transition duration-300 ease-in-out",r.onTopOfStack?"":"blur-sm",{"sm:max-w-sm":e.maxWidth==="sm","sm:max-w-md":e.maxWidth==="md","sm:max-w-md md:max-w-lg":e.maxWidth==="lg","sm:max-w-md md:max-w-xl":e.maxWidth==="xl","sm:max-w-md md:max-w-xl lg:max-w-2xl":e.maxWidth==="2xl","sm:max-w-md md:max-w-xl lg:max-w-3xl":e.maxWidth==="3xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-4xl":e.maxWidth==="4xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl":e.maxWidth==="5xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-6xl":e.maxWidth==="6xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-7xl":e.maxWidth==="7xl"}),children:$.jsxs(Ht,{className:`im-modal-content relative ${e.paddingClasses} ${e.panelClasses}`,children:[e.closeButton&&$.jsx("div",{className:"absolute right-0 top-0 pr-3 pt-3",children:$.jsx(ko,{onClick:r.close})}),typeof t=="function"?t({modalContext:r,config:e}):t]})})})}),Cs=({modalContext:r,config:e,children:t})=>$.jsx("div",{className:"im-slideover-container fixed inset-0 z-40 overflow-y-auto overflow-x-hidden",children:$.jsx("div",{className:kr("im-slideover-positioner flex min-h-full items-center",{"justify-start":e.position==="left","justify-end":e.position==="right"}),children:$.jsx(Ze,{enterFrom:`opacity-0 ${e.position==="left"?"-translate-x-full":"translate-x-full"}`,enterTo:"opacity-100 translate-x-0",leaveFrom:"opacity-100 translate-x-0",leaveTo:`opacity-0 ${e.position==="left"?"-translate-x-full":"translate-x-full"}`,afterLeave:r.afterLeave,className:kr("im-slideover-wrapper w-full transition duration-300 ease-in-out",r.onTopOfStack?"":"blur-sm",{"sm:max-w-sm":e.maxWidth==="sm","sm:max-w-md":e.maxWidth==="md","sm:max-w-md md:max-w-lg":e.maxWidth==="lg","sm:max-w-md md:max-w-xl":e.maxWidth==="xl","sm:max-w-md md:max-w-xl lg:max-w-2xl":e.maxWidth==="2xl","sm:max-w-md md:max-w-xl lg:max-w-3xl":e.maxWidth==="3xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-4xl":e.maxWidth==="4xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl":e.maxWidth==="5xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-6xl":e.maxWidth==="6xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-7xl":e.maxWidth==="7xl"}),children:$.jsxs(Ht,{className:`im-slideover-content relative ${e.paddingClasses} ${e.panelClasses}`,children:[e.closeButton&&$.jsx("div",{className:"absolute right-0 top-0 pr-3 pt-3",children:$.jsx(ko,{onClick:r.close})}),typeof t=="function"?t({modalContext:r,config:e}):t]})})})}),No=f.forwardRef(({name:r,children:e,...t},n)=>{const o=l=>typeof e=="function"?e(l):e,a=f.useRef(null);return f.useImperativeHandle(n,()=>a.current,[a]),$.jsx(Ct,{ref:a,name:r,...t,children:({afterLeave:l,close:u,config:i,emit:d,getChildModal:s,getParentModal:g,id:v,index:E,isOpen:p,modalContext:m,onTopOfStack:y,reload:h,setOpen:b,shouldRender:w})=>$.jsx(_o,{appear:!0,show:p??!1,children:$.jsxs(Ts,{as:"div",className:"im-dialog relative z-20",onClose:()=>i.closeExplicitly?null:u(),"data-inertiaui-modal-id":v,"data-inertiaui-modal-index":E,children:[E===0?$.jsx(Ze,{enter:"transition transform ease-in-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"transition transform ease-in-out duration-300",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:y?$.jsx("div",{className:"im-backdrop fixed inset-0 z-30 bg-black/75","aria-hidden":"true"}):$.jsx("div",{})}):null,E>0&&y?$.jsx("div",{className:"im-backdrop fixed inset-0 z-30 bg-black/75"}):null,i.slideover?$.jsx(Cs,{modalContext:m,config:i,children:o({afterLeave:l,close:u,config:i,emit:d,getChildModal:s,getParentModal:g,id:v,index:E,isOpen:p,modalContext:m,onTopOfStack:y,reload:h,setOpen:b,shouldRender:w})}):$.jsx($s,{modalContext:m,config:i,children:o({afterLeave:l,close:u,config:i,emit:d,getChildModal:s,getParentModal:g,id:v,index:E,isOpen:p,modalContext:m,onTopOfStack:y,reload:h,setOpen:b,shouldRender:w})})]})})})});No.displayName="Modal";const Fs=({href:r,method:e="get",data:t={},as:n="a",headers:o={},queryStringArrayFormat:a="brackets",onAfterLeave:l=null,onBlur:u=null,onClose:i=null,onError:d=null,onFocus:s=null,onStart:g=null,onSuccess:v=null,navigate:E=null,children:p,...m})=>{const[y,h]=f.useState(!1),[b,w]=f.useState(null),{stack:x,visit:P}=pr(),D=f.useMemo(()=>E??Or("navigate"),[E]),_={},U={};Object.keys(m).forEach(T=>{Jn.includes(T)||(T.startsWith("on")&&typeof m[T]=="function"?T.toLowerCase()in window?_[T]=m[T]:U[T]=m[T]:_[T]=m[T])});const[H,j]=f.useState(!1);f.useEffect(()=>{b&&(b.onTopOfStack&&H?s==null||s():!b.onTopOfStack&&!H&&(u==null||u()),j(!b.onTopOfStack))},[x]);const z=f.useCallback(()=>{i==null||i()},[i]),V=f.useCallback(()=>{w(null),l==null||l()},[l]),C=f.useCallback(T=>{T==null||T.preventDefault(),!y&&(r.startsWith("#")||(h(!0),g==null||g()),P(r,e,t,o,la(Zt(m,Jn)),()=>z(x.length),V,a,D).then(k=>{w(k),k.registerEventListenersFromProps(U),v==null||v()}).catch(k=>{console.error(k),d==null||d(k)}).finally(()=>h(!1)))},[r,e,t,o,a,m,z,V]);return $.jsx(n,{..._,href:r,onClick:C,children:typeof p=="function"?p({loading:y}):p})};function Ms(){return pr().stack[$t()]??null}L.HeadlessModal=Ct,L.Modal=No,L.ModalLink=Fs,L.ModalRoot=Qn,L.ModalStackProvider=Xn,L.getConfig=Or,L.putConfig=ra,L.renderApp=Bl,L.resetConfig=ea,L.useModal=Ms,L.useModalIndex=$t,L.useModalStack=pr,Object.defineProperty(L,Symbol.toStringTag,{value:"Module"})}); diff --git a/vue/dist/inertiaui-modal.js b/vue/dist/inertiaui-modal.js index 80842c9..375286e 100644 --- a/vue/dist/inertiaui-modal.js +++ b/vue/dist/inertiaui-modal.js @@ -1,9 +1,9 @@ -var Cn = Object.defineProperty; -var $n = (t, e, r) => e in t ? Cn(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r; -var L = (t, e, r) => $n(t, typeof e != "symbol" ? e + "" : e, r); +var $n = Object.defineProperty; +var In = (t, e, r) => e in t ? $n(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r; +var k = (t, e, r) => In(t, typeof e != "symbol" ? e + "" : e, r); import * as rr from "vue"; -import { computed as $, provide as Tt, openBlock as O, createBlock as I, unref as g, mergeProps as q, createCommentVNode as H, ref as S, onUnmounted as we, onBeforeMount as In, createElementBlock as ce, Fragment as Rt, renderSlot as F, h as re, readonly as Mn, markRaw as Nr, nextTick as de, inject as _t, onBeforeUnmount as Ye, onMounted as at, useAttrs as Br, defineComponent as B, Comment as Dn, cloneVNode as Fn, toRefs as Tr, getCurrentInstance as Ce, normalizeProps as Nn, guardReactiveProps as Bn, withCtx as E, reactive as Rr, createVNode as _, watch as j, watchEffect as fe, effectScope as _r, Teleport as Tn, toHandlerKey as Rn, camelize as _n, normalizeStyle as kn, getCurrentScope as Ln, onScopeDispose as Wn, createElementVNode as ne, normalizeClass as xe, Transition as kt, resolveDynamicComponent as kr, withModifiers as Un, toValue as jn } from "vue"; -import { router as Be, usePage as qn } from "@inertiajs/vue3"; +import { computed as $, provide as Tt, openBlock as E, createBlock as I, unref as g, mergeProps as q, createCommentVNode as H, ref as S, onUnmounted as we, onBeforeMount as Mn, watch as U, createElementBlock as ce, Fragment as Rt, renderSlot as F, h as re, readonly as Dn, markRaw as Nr, nextTick as de, inject as _t, onBeforeUnmount as Ye, onMounted as at, useAttrs as Br, defineComponent as B, Comment as Fn, cloneVNode as Nn, toRefs as Tr, getCurrentInstance as Ce, normalizeProps as Bn, guardReactiveProps as Tn, withCtx as O, reactive as Rr, createVNode as _, watchEffect as fe, effectScope as _r, Teleport as Rn, toHandlerKey as _n, camelize as kn, normalizeStyle as Ln, getCurrentScope as Wn, onScopeDispose as Un, createElementVNode as ne, normalizeClass as xe, Transition as kt, resolveDynamicComponent as kr, withModifiers as jn, toValue as qn } from "vue"; +import { router as Be, usePage as Lr } from "@inertiajs/vue3"; import Ze from "axios"; const Fe = { type: "modal", @@ -65,7 +65,7 @@ const it = new Kn(), Xl = () => it.reset(), Yl = (t, e) => it.put(t, e), Lt = (t function zn(t, e) { return Array.isArray(t) ? t.filter((r) => !e.includes(r)) : Object.keys(t).reduce((r, n) => (e.includes(n) || (r[n] = t[n]), r), {}); } -function Lr(t, e) { +function Wr(t, e) { return Array.isArray(t) ? t.filter((r) => e.includes(r)) : e.reduce((r, n) => (n in t && (r[n] = t[n]), r), {}); } function Gn(t) { @@ -80,8 +80,8 @@ function Vn(t, e = 3, r = 10) { } let i = e * 1e3 / r; const l = setInterval(() => { - const u = t(); - u && (clearInterval(l), n(u)), --i <= 0 && (clearInterval(l), o(new Error("Condition not met in time"))); + const s = t(); + s && (clearInterval(l), n(s)), --i <= 0 && (clearInterval(l), o(new Error("Condition not met in time"))); }, r); }); } @@ -126,7 +126,7 @@ function ro(t) { return Array.isArray(t) ? [] : {}; } function ke(t, e) { - return e.clone !== !1 && e.isMergeableObject(t) ? Oe(ro(t), t, e) : t; + return e.clone !== !1 && e.isMergeableObject(t) ? Ee(ro(t), t, e) : t; } function no(t, e, r) { return t.concat(e).map(function(n) { @@ -135,9 +135,9 @@ function no(t, e, r) { } function oo(t, e) { if (!e.customMerge) - return Oe; + return Ee; var r = e.customMerge(t); - return typeof r == "function" ? r : Oe; + return typeof r == "function" ? r : Ee; } function ao(t) { return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(t).filter(function(e) { @@ -147,7 +147,7 @@ function ao(t) { function nr(t) { return Object.keys(t).concat(ao(t)); } -function Wr(t, e) { +function Ur(t, e) { try { return e in t; } catch { @@ -155,31 +155,31 @@ function Wr(t, e) { } } function io(t, e) { - return Wr(t, e) && !(Object.hasOwnProperty.call(t, e) && Object.propertyIsEnumerable.call(t, e)); + return Ur(t, e) && !(Object.hasOwnProperty.call(t, e) && Object.propertyIsEnumerable.call(t, e)); } function lo(t, e, r) { var n = {}; return r.isMergeableObject(t) && nr(t).forEach(function(o) { n[o] = ke(t[o], r); }), nr(e).forEach(function(o) { - io(t, o) || (Wr(t, o) && r.isMergeableObject(e[o]) ? n[o] = oo(o, r)(t[o], e[o], r) : n[o] = ke(e[o], r)); + io(t, o) || (Ur(t, o) && r.isMergeableObject(e[o]) ? n[o] = oo(o, r)(t[o], e[o], r) : n[o] = ke(e[o], r)); }), n; } -function Oe(t, e, r) { +function Ee(t, e, r) { r = r || {}, r.arrayMerge = r.arrayMerge || no, r.isMergeableObject = r.isMergeableObject || Jn, r.cloneUnlessOtherwiseSpecified = ke; var n = Array.isArray(e), o = Array.isArray(t), a = n === o; return a ? n ? r.arrayMerge(t, e, r) : lo(t, e, r) : ke(e, r); } -Oe.all = function(e, r) { +Ee.all = function(e, r) { if (!Array.isArray(e)) throw new Error("first argument should be an array"); return e.reduce(function(n, o) { - return Oe(n, o, r); + return Ee(n, o, r); }, {}); }; -var so = Oe, uo = so; +var so = Ee, uo = so; const co = /* @__PURE__ */ Hn(uo); -var fo = Error, po = EvalError, yo = RangeError, vo = ReferenceError, Ur = SyntaxError, Le = TypeError, mo = URIError, go = function() { +var fo = Error, po = EvalError, yo = RangeError, vo = ReferenceError, jr = SyntaxError, Le = TypeError, mo = URIError, go = function() { if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function") return !1; if (typeof Symbol.iterator == "symbol") @@ -209,7 +209,7 @@ var fo = Error, po = EvalError, yo = RangeError, vo = ReferenceError, Ur = Synta foo: {} }, wo = Object, xo = function() { return { __proto__: ut }.foo === ut.foo && !(ut instanceof wo); -}, So = "Function.prototype.bind called on incompatible ", Oo = Object.prototype.toString, Eo = Math.max, Ao = "[object Function]", ar = function(e, r) { +}, So = "Function.prototype.bind called on incompatible ", Eo = Object.prototype.toString, Oo = Math.max, Ao = "[object Function]", ar = function(e, r) { for (var n = [], o = 0; o < e.length; o += 1) n[o] = e[o]; for (var a = 0; a < r.length; a += 1) @@ -225,7 +225,7 @@ var fo = Error, po = EvalError, yo = RangeError, vo = ReferenceError, Ur = Synta return r; }, $o = function(e) { var r = this; - if (typeof r != "function" || Oo.apply(r) !== Ao) + if (typeof r != "function" || Eo.apply(r) !== Ao) throw new TypeError(So + r); for (var n = Po(arguments, 1), o, a = function() { if (this instanceof o) { @@ -239,17 +239,17 @@ var fo = Error, po = EvalError, yo = RangeError, vo = ReferenceError, Ur = Synta e, ar(n, arguments) ); - }, i = Eo(0, r.length - n.length), l = [], u = 0; u < i; u++) - l[u] = "$" + u; + }, i = Oo(0, r.length - n.length), l = [], s = 0; s < i; s++) + l[s] = "$" + s; if (o = Function("binder", "return function (" + Co(l, ",") + "){ return binder.apply(this,arguments); }")(a), r.prototype) { var c = function() { }; c.prototype = r.prototype, o.prototype = new c(), c.prototype = null; } return o; -}, Io = $o, Wt = Function.prototype.bind || Io, Mo = Function.prototype.call, Do = Object.prototype.hasOwnProperty, Fo = Wt, No = Fo.call(Mo, Do), w, Bo = fo, To = po, Ro = yo, _o = vo, Ee = Ur, Se = Le, ko = mo, jr = Function, ct = function(t) { +}, Io = $o, Wt = Function.prototype.bind || Io, Mo = Function.prototype.call, Do = Object.prototype.hasOwnProperty, Fo = Wt, No = Fo.call(Mo, Do), w, Bo = fo, To = po, Ro = yo, _o = vo, Oe = jr, Se = Le, ko = mo, qr = Function, ct = function(t) { try { - return jr('"use strict"; return (' + t + ").constructor;")(); + return qr('"use strict"; return (' + t + ").constructor;")(); } catch { } }, se = Object.getOwnPropertyDescriptor; @@ -302,7 +302,7 @@ var ft = function() { "%Float32Array%": typeof Float32Array > "u" ? w : Float32Array, "%Float64Array%": typeof Float64Array > "u" ? w : Float64Array, "%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? w : FinalizationRegistry, - "%Function%": jr, + "%Function%": qr, "%GeneratorFunction%": be, "%Int8Array%": typeof Int8Array > "u" ? w : Int8Array, "%Int16Array%": typeof Int16Array > "u" ? w : Int16Array, @@ -330,7 +330,7 @@ var ft = function() { "%String%": String, "%StringIteratorPrototype%": me && T ? T(""[Symbol.iterator]()) : w, "%Symbol%": me ? Symbol : w, - "%SyntaxError%": Ee, + "%SyntaxError%": Oe, "%ThrowTypeError%": Lo, "%TypedArray%": Uo, "%TypeError%": Se, @@ -422,12 +422,12 @@ var qo = function t(e) { }, We = Wt, et = No, Ko = We.call(Function.call, Array.prototype.concat), zo = We.call(Function.apply, Array.prototype.splice), lr = We.call(Function.call, String.prototype.replace), tt = We.call(Function.call, String.prototype.slice), Go = We.call(Function.call, RegExp.prototype.exec), Vo = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, Ho = /\\(\\)?/g, Qo = function(e) { var r = tt(e, 0, 1), n = tt(e, -1); if (r === "%" && n !== "%") - throw new Ee("invalid intrinsic syntax, expected closing `%`"); + throw new Oe("invalid intrinsic syntax, expected closing `%`"); if (n === "%" && r !== "%") - throw new Ee("invalid intrinsic syntax, expected opening `%`"); + throw new Oe("invalid intrinsic syntax, expected opening `%`"); var o = []; - return lr(e, Vo, function(a, i, l, u) { - o[o.length] = l ? lr(u, Ho, "$1") : i || a; + return lr(e, Vo, function(a, i, l, s) { + o[o.length] = l ? lr(s, Ho, "$1") : i || a; }), o; }, Jo = function(e, r) { var n = e, o; @@ -441,21 +441,21 @@ var qo = function t(e) { value: a }; } - throw new Ee("intrinsic " + e + " does not exist!"); + throw new Oe("intrinsic " + e + " does not exist!"); }, $e = function(e, r) { if (typeof e != "string" || e.length === 0) throw new Se("intrinsic name must be a non-empty string"); if (arguments.length > 1 && typeof r != "boolean") throw new Se('"allowMissing" argument must be a boolean'); if (Go(/^%?[^%]*%?$/, e) === null) - throw new Ee("`%` may not be present anywhere but at the beginning and end of the intrinsic name"); - var n = Qo(e), o = n.length > 0 ? n[0] : "", a = Jo("%" + o + "%", r), i = a.name, l = a.value, u = !1, c = a.alias; + throw new Oe("`%` may not be present anywhere but at the beginning and end of the intrinsic name"); + var n = Qo(e), o = n.length > 0 ? n[0] : "", a = Jo("%" + o + "%", r), i = a.name, l = a.value, s = !1, c = a.alias; c && (o = c[0], zo(n, Ko([0, 1], c))); for (var d = 1, p = !0; d < n.length; d += 1) { - var f = n[d], v = tt(f, 0, 1), s = tt(f, -1); - if ((v === '"' || v === "'" || v === "`" || s === '"' || s === "'" || s === "`") && v !== s) - throw new Ee("property names with quotes must have matching quotes"); - if ((f === "constructor" || !p) && (u = !0), o += "." + f, i = "%" + o + "%", et(ue, i)) + var f = n[d], v = tt(f, 0, 1), u = tt(f, -1); + if ((v === '"' || v === "'" || v === "`" || u === '"' || u === "'" || u === "`") && v !== u) + throw new Oe("property names with quotes must have matching quotes"); + if ((f === "constructor" || !p) && (s = !0), o += "." + f, i = "%" + o + "%", et(ue, i)) l = ue[i]; else if (l != null) { if (!(f in l)) { @@ -468,11 +468,11 @@ var qo = function t(e) { p = !!y, p && "get" in y && !("originalValue" in y.get) ? l = y.get : l = l[f]; } else p = et(l, f), l = l[f]; - p && !u && (ue[i] = l); + p && !s && (ue[i] = l); } } return l; -}, qr = { exports: {} }, dt, sr; +}, Kr = { exports: {} }, dt, sr; function Ut() { if (sr) return dt; sr = 1; @@ -492,7 +492,7 @@ if (Je) } catch { Je = null; } -var Kr = Je, ur = Ut(), Yo = Ur, ge = Le, cr = Kr, Zo = function(e, r, n) { +var zr = Je, ur = Ut(), Yo = jr, ge = Le, cr = zr, Zo = function(e, r, n) { if (!e || typeof e != "object" && typeof e != "function") throw new ge("`obj` must be an object or a function`"); if (typeof r != "string" && typeof r != "symbol") @@ -505,22 +505,22 @@ var Kr = Je, ur = Ut(), Yo = Ur, ge = Le, cr = Kr, Zo = function(e, r, n) { throw new ge("`nonConfigurable`, if provided, must be a boolean or null"); if (arguments.length > 6 && typeof arguments[6] != "boolean") throw new ge("`loose`, if provided, must be a boolean"); - var o = arguments.length > 3 ? arguments[3] : null, a = arguments.length > 4 ? arguments[4] : null, i = arguments.length > 5 ? arguments[5] : null, l = arguments.length > 6 ? arguments[6] : !1, u = !!cr && cr(e, r); + var o = arguments.length > 3 ? arguments[3] : null, a = arguments.length > 4 ? arguments[4] : null, i = arguments.length > 5 ? arguments[5] : null, l = arguments.length > 6 ? arguments[6] : !1, s = !!cr && cr(e, r); if (ur) ur(e, r, { - configurable: i === null && u ? u.configurable : !i, - enumerable: o === null && u ? u.enumerable : !o, + configurable: i === null && s ? s.configurable : !i, + enumerable: o === null && s ? s.enumerable : !o, value: n, - writable: a === null && u ? u.writable : !a + writable: a === null && s ? s.writable : !a }); else if (l || !o && !a && !i) e[r] = n; else throw new Yo("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable."); -}, Pt = Ut(), zr = function() { +}, Pt = Ut(), Gr = function() { return !!Pt; }; -zr.hasArrayLengthDefineBug = function() { +Gr.hasArrayLengthDefineBug = function() { if (!Pt) return null; try { @@ -529,7 +529,7 @@ zr.hasArrayLengthDefineBug = function() { return !0; } }; -var ea = zr, ta = $e, fr = Zo, ra = ea(), dr = Kr, pr = Le, na = ta("%Math.floor%"), oa = function(e, r) { +var ea = Gr, ta = $e, fr = Zo, ra = ea(), dr = zr, pr = Le, na = ta("%Math.floor%"), oa = function(e, r) { if (typeof e != "function") throw new pr("`fn` is not a function"); if (typeof r != "number" || r < 0 || r > 4294967295 || na(r) !== r) @@ -554,7 +554,7 @@ var ea = zr, ta = $e, fr = Zo, ra = ea(), dr = Kr, pr = Le, na = ta("%Math.floor )), e; }; (function(t) { - var e = Wt, r = $e, n = oa, o = Le, a = r("%Function.prototype.apply%"), i = r("%Function.prototype.call%"), l = r("%Reflect.apply%", !0) || e.call(i, a), u = Ut(), c = r("%Math.max%"); + var e = Wt, r = $e, n = oa, o = Le, a = r("%Function.prototype.apply%"), i = r("%Function.prototype.call%"), l = r("%Reflect.apply%", !0) || e.call(i, a), s = Ut(), c = r("%Math.max%"); t.exports = function(f) { if (typeof f != "function") throw new o("a function is required"); @@ -568,21 +568,21 @@ var ea = zr, ta = $e, fr = Zo, ra = ea(), dr = Kr, pr = Le, na = ta("%Math.floor var d = function() { return l(e, a, arguments); }; - u ? u(t.exports, "apply", { value: d }) : t.exports.apply = d; -})(qr); -var aa = qr.exports, Gr = $e, Vr = aa, ia = Vr(Gr("String.prototype.indexOf")), la = function(e, r) { - var n = Gr(e, !!r); - return typeof n == "function" && ia(e, ".prototype.") > -1 ? Vr(n) : n; + s ? s(t.exports, "apply", { value: d }) : t.exports.apply = d; +})(Kr); +var aa = Kr.exports, Vr = $e, Hr = aa, ia = Hr(Vr("String.prototype.indexOf")), la = function(e, r) { + var n = Vr(e, !!r); + return typeof n == "function" && ia(e, ".prototype.") > -1 ? Hr(n) : n; }; const sa = {}, ua = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: sa }, Symbol.toStringTag, { value: "Module" })), ca = /* @__PURE__ */ Qn(ua); -var jt = typeof Map == "function" && Map.prototype, pt = Object.getOwnPropertyDescriptor && jt ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, rt = jt && pt && typeof pt.get == "function" ? pt.get : null, yr = jt && Map.prototype.forEach, qt = typeof Set == "function" && Set.prototype, yt = Object.getOwnPropertyDescriptor && qt ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, nt = qt && yt && typeof yt.get == "function" ? yt.get : null, vr = qt && Set.prototype.forEach, fa = typeof WeakMap == "function" && WeakMap.prototype, Te = fa ? WeakMap.prototype.has : null, da = typeof WeakSet == "function" && WeakSet.prototype, Re = da ? WeakSet.prototype.has : null, pa = typeof WeakRef == "function" && WeakRef.prototype, mr = pa ? WeakRef.prototype.deref : null, ya = Boolean.prototype.valueOf, va = Object.prototype.toString, ma = Function.prototype.toString, ga = String.prototype.match, Kt = String.prototype.slice, te = String.prototype.replace, ha = String.prototype.toUpperCase, gr = String.prototype.toLowerCase, Hr = RegExp.prototype.test, hr = Array.prototype.concat, V = Array.prototype.join, ba = Array.prototype.slice, br = Math.floor, Ct = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, vt = Object.getOwnPropertySymbols, $t = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, Ae = typeof Symbol == "function" && typeof Symbol.iterator == "object", R = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === Ae || !0) ? Symbol.toStringTag : null, Qr = Object.prototype.propertyIsEnumerable, wr = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(t) { +var jt = typeof Map == "function" && Map.prototype, pt = Object.getOwnPropertyDescriptor && jt ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, rt = jt && pt && typeof pt.get == "function" ? pt.get : null, yr = jt && Map.prototype.forEach, qt = typeof Set == "function" && Set.prototype, yt = Object.getOwnPropertyDescriptor && qt ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, nt = qt && yt && typeof yt.get == "function" ? yt.get : null, vr = qt && Set.prototype.forEach, fa = typeof WeakMap == "function" && WeakMap.prototype, Te = fa ? WeakMap.prototype.has : null, da = typeof WeakSet == "function" && WeakSet.prototype, Re = da ? WeakSet.prototype.has : null, pa = typeof WeakRef == "function" && WeakRef.prototype, mr = pa ? WeakRef.prototype.deref : null, ya = Boolean.prototype.valueOf, va = Object.prototype.toString, ma = Function.prototype.toString, ga = String.prototype.match, Kt = String.prototype.slice, te = String.prototype.replace, ha = String.prototype.toUpperCase, gr = String.prototype.toLowerCase, Qr = RegExp.prototype.test, hr = Array.prototype.concat, V = Array.prototype.join, ba = Array.prototype.slice, br = Math.floor, Ct = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, vt = Object.getOwnPropertySymbols, $t = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, Ae = typeof Symbol == "function" && typeof Symbol.iterator == "object", R = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === Ae || !0) ? Symbol.toStringTag : null, Jr = Object.prototype.propertyIsEnumerable, wr = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(t) { return t.__proto__; } : null); function xr(t, e) { - if (t === 1 / 0 || t === -1 / 0 || t !== t || t && t > -1e3 && t < 1e3 || Hr.call(/e/, e)) + if (t === 1 / 0 || t === -1 / 0 || t !== t || t && t > -1e3 && t < 1e3 || Qr.call(/e/, e)) return e; var r = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g; if (typeof t == "number") { @@ -594,7 +594,7 @@ function xr(t, e) { } return te.call(e, r, "$&_"); } -var It = ca, Sr = It.custom, Or = Xr(Sr) ? Sr : null, wa = function t(e, r, n, o) { +var It = ca, Sr = It.custom, Er = Yr(Sr) ? Sr : null, wa = function t(e, r, n, o) { var a = r || {}; if (ee(a, "quoteStyle") && a.quoteStyle !== "single" && a.quoteStyle !== "double") throw new TypeError('option "quoteStyle" must be "single" or "double"'); @@ -615,12 +615,12 @@ var It = ca, Sr = It.custom, Or = Xr(Sr) ? Sr : null, wa = function t(e, r, n, o if (typeof e == "boolean") return e ? "true" : "false"; if (typeof e == "string") - return Zr(e, a); + return en(e, a); if (typeof e == "number") { if (e === 0) return 1 / 0 / e > 0 ? "0" : "-0"; - var u = String(e); - return l ? xr(e, u) : u; + var s = String(e); + return l ? xr(e, s) : s; } if (typeof e == "bigint") { var c = String(e) + "n"; @@ -632,28 +632,28 @@ var It = ca, Sr = It.custom, Or = Xr(Sr) ? Sr : null, wa = function t(e, r, n, o var p = ka(a, n); if (typeof o > "u") o = []; - else if (Yr(o, e) >= 0) + else if (Zr(o, e) >= 0) return "[Circular]"; - function f(U, X, Y) { + function f(j, X, Y) { if (X && (o = ba.call(o), o.push(X)), Y) { var De = { depth: a.depth }; - return ee(a, "quoteStyle") && (De.quoteStyle = a.quoteStyle), t(U, De, n + 1, o); + return ee(a, "quoteStyle") && (De.quoteStyle = a.quoteStyle), t(j, De, n + 1, o); } - return t(U, a, n + 1, o); + return t(j, a, n + 1, o); } - if (typeof e == "function" && !Er(e)) { - var v = Ia(e), s = Ke(e, f); - return "[Function" + (v ? ": " + v : " (anonymous)") + "]" + (s.length > 0 ? " { " + V.call(s, ", ") + " }" : ""); + if (typeof e == "function" && !Or(e)) { + var v = Ia(e), u = Ke(e, f); + return "[Function" + (v ? ": " + v : " (anonymous)") + "]" + (u.length > 0 ? " { " + V.call(u, ", ") + " }" : ""); } - if (Xr(e)) { + if (Yr(e)) { var y = Ae ? te.call(String(e), /^(Symbol\(.*\))_[^)]*$/, "$1") : $t.call(e); return typeof e == "object" && !Ae ? Ne(y) : y; } if (Ta(e)) { for (var m = "<" + gr.call(String(e.nodeName)), b = e.attributes || [], A = 0; A < b.length; A++) - m += " " + b[A].name + "=" + Jr(xa(b[A].value), "double", a); + m += " " + b[A].name + "=" + Xr(xa(b[A].value), "double", a); return m += ">", e.childNodes && e.childNodes.length && (m += "..."), m += "", m; } if (Mt(e)) { @@ -662,26 +662,26 @@ var It = ca, Sr = It.custom, Or = Xr(Sr) ? Sr : null, wa = function t(e, r, n, o var h = Ke(e, f); return p && !_a(h) ? "[" + Dt(h, p) + "]" : "[ " + V.call(h, ", ") + " ]"; } - if (Oa(e)) { + if (Ea(e)) { var x = Ke(e, f); - return !("cause" in Error.prototype) && "cause" in e && !Qr.call(e, "cause") ? "{ [" + String(e) + "] " + V.call(hr.call("[cause]: " + f(e.cause), x), ", ") + " }" : x.length === 0 ? "[" + String(e) + "]" : "{ [" + String(e) + "] " + V.call(x, ", ") + " }"; + return !("cause" in Error.prototype) && "cause" in e && !Jr.call(e, "cause") ? "{ [" + String(e) + "] " + V.call(hr.call("[cause]: " + f(e.cause), x), ", ") + " }" : x.length === 0 ? "[" + String(e) + "]" : "{ [" + String(e) + "] " + V.call(x, ", ") + " }"; } if (typeof e == "object" && i) { - if (Or && typeof e[Or] == "function" && It) + if (Er && typeof e[Er] == "function" && It) return It(e, { depth: d - n }); if (i !== "symbol" && typeof e.inspect == "function") return e.inspect(); } if (Ma(e)) { var P = []; - return yr && yr.call(e, function(U, X) { - P.push(f(X, e, !0) + " => " + f(U, e)); + return yr && yr.call(e, function(j, X) { + P.push(f(X, e, !0) + " => " + f(j, e)); }), Ar("Map", rt.call(e), P, p); } if (Na(e)) { var D = []; - return vr && vr.call(e, function(U) { - D.push(f(U, e)); + return vr && vr.call(e, function(j) { + D.push(f(j, e)); }), Ar("Set", nt.call(e), D, p); } if (Da(e)) @@ -696,19 +696,19 @@ var It = ca, Sr = It.custom, Or = Xr(Sr) ? Sr : null, wa = function t(e, r, n, o return Ne(f(Ct.call(e))); if (Pa(e)) return Ne(ya.call(e)); - if (Ea(e)) + if (Oa(e)) return Ne(f(String(e))); if (typeof window < "u" && e === window) return "{ [object Window] }"; if (typeof globalThis < "u" && e === globalThis || typeof At < "u" && e === At) return "{ [object globalThis] }"; - if (!Sa(e) && !Er(e)) { - var k = Ke(e, f), W = wr ? wr(e) === Object.prototype : e instanceof Object || e.constructor === Object, ie = e instanceof Object ? "" : "null prototype", J = !W && R && Object(e) === e && R in e ? Kt.call(oe(e), 8, -1) : ie ? "Object" : "", qe = W || typeof e.constructor != "function" ? "" : e.constructor.name ? e.constructor.name + " " : "", ye = qe + (J || ie ? "[" + V.call(hr.call([], J || [], ie || []), ": ") + "] " : ""); - return k.length === 0 ? ye + "{}" : p ? ye + "{" + Dt(k, p) + "}" : ye + "{ " + V.call(k, ", ") + " }"; + if (!Sa(e) && !Or(e)) { + var L = Ke(e, f), W = wr ? wr(e) === Object.prototype : e instanceof Object || e.constructor === Object, ie = e instanceof Object ? "" : "null prototype", J = !W && R && Object(e) === e && R in e ? Kt.call(oe(e), 8, -1) : ie ? "Object" : "", qe = W || typeof e.constructor != "function" ? "" : e.constructor.name ? e.constructor.name + " " : "", ye = qe + (J || ie ? "[" + V.call(hr.call([], J || [], ie || []), ": ") + "] " : ""); + return L.length === 0 ? ye + "{}" : p ? ye + "{" + Dt(L, p) + "}" : ye + "{ " + V.call(L, ", ") + " }"; } return String(e); }; -function Jr(t, e, r) { +function Xr(t, e, r) { var n = (r.quoteStyle || e) === "double" ? '"' : "'"; return n + t + n; } @@ -721,13 +721,13 @@ function Mt(t) { function Sa(t) { return oe(t) === "[object Date]" && (!R || !(typeof t == "object" && R in t)); } -function Er(t) { +function Or(t) { return oe(t) === "[object RegExp]" && (!R || !(typeof t == "object" && R in t)); } -function Oa(t) { +function Ea(t) { return oe(t) === "[object Error]" && (!R || !(typeof t == "object" && R in t)); } -function Ea(t) { +function Oa(t) { return oe(t) === "[object String]" && (!R || !(typeof t == "object" && R in t)); } function Aa(t) { @@ -736,7 +736,7 @@ function Aa(t) { function Pa(t) { return oe(t) === "[object Boolean]" && (!R || !(typeof t == "object" && R in t)); } -function Xr(t) { +function Yr(t) { if (Ae) return t && typeof t == "object" && t instanceof Symbol; if (typeof t == "symbol") @@ -773,7 +773,7 @@ function Ia(t) { var e = ga.call(ma.call(t), /^function\s*([\w$]+)/); return e ? e[1] : null; } -function Yr(t, e) { +function Zr(t, e) { if (t.indexOf) return t.indexOf(e); for (var r = 0, n = t.length; r < n; r++) @@ -853,13 +853,13 @@ function Ba(t) { function Ta(t) { return !t || typeof t != "object" ? !1 : typeof HTMLElement < "u" && t instanceof HTMLElement ? !0 : typeof t.nodeName == "string" && typeof t.getAttribute == "function"; } -function Zr(t, e) { +function en(t, e) { if (t.length > e.maxStringLength) { var r = t.length - e.maxStringLength, n = "... " + r + " more character" + (r > 1 ? "s" : ""); - return Zr(Kt.call(t, 0, e.maxStringLength), e) + n; + return en(Kt.call(t, 0, e.maxStringLength), e) + n; } var o = te.call(te.call(t, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g, Ra); - return Jr(o, "single", e); + return Xr(o, "single", e); } function Ra(t) { var e = t.charCodeAt(0), r = { @@ -883,7 +883,7 @@ function Ar(t, e, r, n) { } function _a(t) { for (var e = 0; e < t.length; e++) - if (Yr(t[e], ` + if (Zr(t[e], ` `) >= 0) return !1; return !0; @@ -922,14 +922,14 @@ function Ke(t, e) { for (var l = 0; l < a.length; l++) i["$" + a[l]] = a[l]; } - for (var u in t) - ee(t, u) && (r && String(Number(u)) === u && u < t.length || Ae && i["$" + u] instanceof Symbol || (Hr.call(/[^\w$]/, u) ? n.push(e(u, t) + ": " + e(t[u], t)) : n.push(u + ": " + e(t[u], t)))); + for (var s in t) + ee(t, s) && (r && String(Number(s)) === s && s < t.length || Ae && i["$" + s] instanceof Symbol || (Qr.call(/[^\w$]/, s) ? n.push(e(s, t) + ": " + e(t[s], t)) : n.push(s + ": " + e(t[s], t)))); if (typeof vt == "function") for (var c = 0; c < a.length; c++) - Qr.call(t, a[c]) && n.push("[" + e(a[c]) + "]: " + e(t[a[c]], t)); + Jr.call(t, a[c]) && n.push("[" + e(a[c]) + "]: " + e(t[a[c]], t)); return n; } -var en = $e, Ie = la, La = wa, Wa = Le, ze = en("%WeakMap%", !0), Ge = en("%Map%", !0), Ua = Ie("WeakMap.prototype.get", !0), ja = Ie("WeakMap.prototype.set", !0), qa = Ie("WeakMap.prototype.has", !0), Ka = Ie("Map.prototype.get", !0), za = Ie("Map.prototype.set", !0), Ga = Ie("Map.prototype.has", !0), zt = function(t, e) { +var tn = $e, Ie = la, La = wa, Wa = Le, ze = tn("%WeakMap%", !0), Ge = tn("%Map%", !0), Ua = Ie("WeakMap.prototype.get", !0), ja = Ie("WeakMap.prototype.set", !0), qa = Ie("WeakMap.prototype.has", !0), Ka = Ie("Map.prototype.get", !0), za = Ie("Map.prototype.set", !0), Ga = Ie("Map.prototype.has", !0), zt = function(t, e) { for (var r = t, n; (n = r.next) !== null; r = n) if (n.key === e) return r.next = n.next, n.next = /** @type {NonNullable} */ @@ -1008,7 +1008,7 @@ var en = $e, Ie = la, La = wa, Wa = Le, ze = en("%WeakMap%", !0), Ge = en("%Map% r.obj[r.prop] = o; } } -}, tn = function(e, r) { +}, rn = function(e, r) { for (var n = r && r.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, o = 0; o < e.length; ++o) typeof e[o] < "u" && (n[o] = e[o]); return n; @@ -1027,7 +1027,7 @@ var en = $e, Ie = la, La = wa, Wa = Le, ze = en("%WeakMap%", !0), Ge = en("%Map% if (!e || typeof e != "object") return [e].concat(r); var o = e; - return le(e) && !le(r) && (o = tn(e, n)), le(e) && le(r) ? (r.forEach(function(a, i) { + return le(e) && !le(r) && (o = rn(e, n)), le(e) && le(r) ? (r.forEach(function(a, i) { if (ht.call(e, i)) { var l = e[i]; l && typeof l == "object" && a && typeof a == "object" ? e[i] = t(l, a, n) : e.push(a); @@ -1058,8 +1058,8 @@ var en = $e, Ie = la, La = wa, Wa = Le, ze = en("%WeakMap%", !0), Ge = en("%Map% return escape(i).replace(/%u[0-9a-f]{4}/gi, function(v) { return "%26%23" + parseInt(v.slice(2), 16) + "%3B"; }); - for (var l = "", u = 0; u < i.length; u += bt) { - for (var c = i.length >= bt ? i.slice(u, u + bt) : i, d = [], p = 0; p < c.length; ++p) { + for (var l = "", s = 0; s < i.length; s += bt) { + for (var c = i.length >= bt ? i.slice(s, s + bt) : i, d = [], p = 0; p < c.length; ++p) { var f = c.charCodeAt(p); if (f === 45 || f === 46 || f === 95 || f === 126 || f >= 48 && f <= 57 || f >= 65 && f <= 90 || f >= 97 && f <= 122 || a === Za.RFC1738 && (f === 40 || f === 41)) { d[d.length] = c.charAt(p); @@ -1084,8 +1084,8 @@ var en = $e, Ie = la, La = wa, Wa = Le, ze = en("%WeakMap%", !0), Ge = en("%Map% return l; }, ai = function(e) { for (var r = [{ obj: { o: e }, prop: "o" }], n = [], o = 0; o < r.length; ++o) - for (var a = r[o], i = a.obj[a.prop], l = Object.keys(i), u = 0; u < l.length; ++u) { - var c = l[u], d = i[c]; + for (var a = r[o], i = a.obj[a.prop], l = Object.keys(i), s = 0; s < l.length; ++s) { + var c = l[s], d = i[c]; typeof d == "object" && d !== null && n.indexOf(d) === -1 && (r.push({ obj: i, prop: c }), n.push(d)); } return ei(r), e; @@ -1102,8 +1102,8 @@ var en = $e, Ie = la, La = wa, Wa = Le, ze = en("%WeakMap%", !0), Ge = en("%Map% return n; } return r(e); -}, rn = { - arrayToObject: tn, +}, nn = { + arrayToObject: rn, assign: ri, combine: si, compact: ai, @@ -1113,7 +1113,7 @@ var en = $e, Ie = la, La = wa, Wa = Le, ze = en("%WeakMap%", !0), Ge = en("%Map% isRegExp: ii, maybeMap: ui, merge: ti -}, nn = Ja, Xe = rn, _e = Gt, ci = Object.prototype.hasOwnProperty, on = { +}, on = Ja, Xe = nn, _e = Gt, ci = Object.prototype.hasOwnProperty, an = { brackets: function(e) { return e + "[]"; }, @@ -1124,7 +1124,7 @@ var en = $e, Ie = la, La = wa, Wa = Le, ze = en("%WeakMap%", !0), Ge = en("%Map% repeat: function(e) { return e; } -}, G = Array.isArray, fi = Array.prototype.push, an = function(t, e) { +}, G = Array.isArray, fi = Array.prototype.push, ln = function(t, e) { fi.apply(t, G(e) ? e : [e]); }, di = Date.prototype.toISOString, Pr = _e.default, N = { addQueryPrefix: !1, @@ -1149,11 +1149,11 @@ var en = $e, Ie = la, La = wa, Wa = Le, ze = en("%WeakMap%", !0), Ge = en("%Map% strictNullHandling: !1 }, pi = function(e) { return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || typeof e == "symbol" || typeof e == "bigint"; -}, wt = {}, yi = function t(e, r, n, o, a, i, l, u, c, d, p, f, v, s, y, m, b, A) { +}, wt = {}, yi = function t(e, r, n, o, a, i, l, s, c, d, p, f, v, u, y, m, b, A) { for (var h = e, x = A, P = 0, D = !1; (x = x.get(wt)) !== void 0 && !D; ) { - var k = x.get(e); - if (P += 1, typeof k < "u") { - if (k === P) + var L = x.get(e); + if (P += 1, typeof L < "u") { + if (L === P) throw new RangeError("Cyclic object value"); D = !0; } @@ -1163,13 +1163,13 @@ var en = $e, Ie = la, La = wa, Wa = Le, ze = en("%WeakMap%", !0), Ge = en("%Map% return st instanceof Date ? v(st) : st; })), h === null) { if (i) - return c && !m ? c(r, N.encoder, b, "key", s) : r; + return c && !m ? c(r, N.encoder, b, "key", u) : r; h = ""; } if (pi(h) || Xe.isBuffer(h)) { if (c) { - var W = m ? r : c(r, N.encoder, b, "key", s); - return [y(W) + "=" + y(c(h, N.encoder, b, "value", s))]; + var W = m ? r : c(r, N.encoder, b, "key", u); + return [y(W) + "=" + y(c(h, N.encoder, b, "value", u))]; } return [y(r) + "=" + y(String(h))]; } @@ -1185,30 +1185,30 @@ var en = $e, Ie = la, La = wa, Wa = Le, ze = en("%WeakMap%", !0), Ge = en("%Map% var qe = Object.keys(h); J = p ? qe.sort(p) : qe; } - var ye = u ? r.replace(/\./g, "%2E") : r, U = o && G(h) && h.length === 1 ? ye + "[]" : ye; + var ye = s ? r.replace(/\./g, "%2E") : r, j = o && G(h) && h.length === 1 ? ye + "[]" : ye; if (a && G(h) && h.length === 0) - return U + "[]"; + return j + "[]"; for (var X = 0; X < J.length; ++X) { var Y = J[X], De = typeof Y == "object" && typeof Y.value < "u" ? Y.value : h[Y]; if (!(l && De === null)) { - var lt = f && u ? Y.replace(/\./g, "%2E") : Y, Pn = G(h) ? typeof n == "function" ? n(U, lt) : U : U + (f ? "." + lt : "[" + lt + "]"); + var lt = f && s ? Y.replace(/\./g, "%2E") : Y, Cn = G(h) ? typeof n == "function" ? n(j, lt) : j : j + (f ? "." + lt : "[" + lt + "]"); A.set(e, P); - var tr = nn(); - tr.set(wt, A), an(ie, t( + var tr = on(); + tr.set(wt, A), ln(ie, t( De, - Pn, + Cn, n, o, a, i, l, - u, + s, n === "comma" && m && G(h) ? null : c, d, p, f, v, - s, + u, y, m, b, @@ -1238,7 +1238,7 @@ var en = $e, Ie = la, La = wa, Wa = Le, ze = en("%WeakMap%", !0), Ge = en("%Map% var o = _e.formatters[n], a = N.filter; (typeof e.filter == "function" || G(e.filter)) && (a = e.filter); var i; - if (e.arrayFormat in on ? i = e.arrayFormat : "indices" in e ? i = e.indices ? "indices" : "repeat" : i = N.arrayFormat, "commaRoundTrip" in e && typeof e.commaRoundTrip != "boolean") + if (e.arrayFormat in an ? i = e.arrayFormat : "indices" in e ? i = e.indices ? "indices" : "repeat" : i = N.arrayFormat, "commaRoundTrip" in e && typeof e.commaRoundTrip != "boolean") throw new TypeError("`commaRoundTrip` must be a boolean, or absent"); var l = typeof e.allowDots > "u" ? e.encodeDotInKeys === !0 ? !0 : N.allowDots : !!e.allowDots; return { @@ -1268,15 +1268,15 @@ var en = $e, Ie = la, La = wa, Wa = Le, ze = en("%WeakMap%", !0), Ge = en("%Map% var i = []; if (typeof r != "object" || r === null) return ""; - var l = on[n.arrayFormat], u = l === "comma" && n.commaRoundTrip; + var l = an[n.arrayFormat], s = l === "comma" && n.commaRoundTrip; o || (o = Object.keys(r)), n.sort && o.sort(n.sort); - for (var c = nn(), d = 0; d < o.length; ++d) { + for (var c = on(), d = 0; d < o.length; ++d) { var p = o[d]; - n.skipNulls && r[p] === null || an(i, yi( + n.skipNulls && r[p] === null || ln(i, yi( r[p], p, l, - u, + s, n.allowEmptyArrays, n.strictNullHandling, n.skipNulls, @@ -1295,7 +1295,7 @@ var en = $e, Ie = la, La = wa, Wa = Le, ze = en("%WeakMap%", !0), Ge = en("%Map% } var f = i.join(n.delimiter), v = n.addQueryPrefix === !0 ? "?" : ""; return n.charsetSentinel && (n.charset === "iso-8859-1" ? v += "utf8=%26%2310003%3B&" : v += "utf8=%E2%9C%93&"), f.length > 0 ? v + f : ""; -}, Pe = rn, Ft = Object.prototype.hasOwnProperty, gi = Array.isArray, M = { +}, Pe = nn, Ft = Object.prototype.hasOwnProperty, gi = Array.isArray, M = { allowDots: !1, allowEmptyArrays: !1, allowPrototypes: !1, @@ -1320,62 +1320,62 @@ var en = $e, Ie = la, La = wa, Wa = Le, ze = en("%WeakMap%", !0), Ge = en("%Map% return t.replace(/&#(\d+);/g, function(e, r) { return String.fromCharCode(parseInt(r, 10)); }); -}, ln = function(t, e) { +}, sn = function(t, e) { return t && typeof t == "string" && e.comma && t.indexOf(",") > -1 ? t.split(",") : t; }, bi = "utf8=%26%2310003%3B", wi = "utf8=%E2%9C%93", xi = function(e, r) { var n = { __proto__: null }, o = r.ignoreQueryPrefix ? e.replace(/^\?/, "") : e; o = o.replace(/%5B/gi, "[").replace(/%5D/gi, "]"); - var a = r.parameterLimit === 1 / 0 ? void 0 : r.parameterLimit, i = o.split(r.delimiter, a), l = -1, u, c = r.charset; + var a = r.parameterLimit === 1 / 0 ? void 0 : r.parameterLimit, i = o.split(r.delimiter, a), l = -1, s, c = r.charset; if (r.charsetSentinel) - for (u = 0; u < i.length; ++u) - i[u].indexOf("utf8=") === 0 && (i[u] === wi ? c = "utf-8" : i[u] === bi && (c = "iso-8859-1"), l = u, u = i.length); - for (u = 0; u < i.length; ++u) - if (u !== l) { - var d = i[u], p = d.indexOf("]="), f = p === -1 ? d.indexOf("=") : p + 1, v, s; - f === -1 ? (v = r.decoder(d, M.decoder, c, "key"), s = r.strictNullHandling ? null : "") : (v = r.decoder(d.slice(0, f), M.decoder, c, "key"), s = Pe.maybeMap( - ln(d.slice(f + 1), r), + for (s = 0; s < i.length; ++s) + i[s].indexOf("utf8=") === 0 && (i[s] === wi ? c = "utf-8" : i[s] === bi && (c = "iso-8859-1"), l = s, s = i.length); + for (s = 0; s < i.length; ++s) + if (s !== l) { + var d = i[s], p = d.indexOf("]="), f = p === -1 ? d.indexOf("=") : p + 1, v, u; + f === -1 ? (v = r.decoder(d, M.decoder, c, "key"), u = r.strictNullHandling ? null : "") : (v = r.decoder(d.slice(0, f), M.decoder, c, "key"), u = Pe.maybeMap( + sn(d.slice(f + 1), r), function(m) { return r.decoder(m, M.decoder, c, "value"); } - )), s && r.interpretNumericEntities && c === "iso-8859-1" && (s = hi(s)), d.indexOf("[]=") > -1 && (s = gi(s) ? [s] : s); + )), u && r.interpretNumericEntities && c === "iso-8859-1" && (u = hi(u)), d.indexOf("[]=") > -1 && (u = gi(u) ? [u] : u); var y = Ft.call(n, v); - y && r.duplicates === "combine" ? n[v] = Pe.combine(n[v], s) : (!y || r.duplicates === "last") && (n[v] = s); + y && r.duplicates === "combine" ? n[v] = Pe.combine(n[v], u) : (!y || r.duplicates === "last") && (n[v] = u); } return n; }, Si = function(t, e, r, n) { - for (var o = n ? e : ln(e, r), a = t.length - 1; a >= 0; --a) { + for (var o = n ? e : sn(e, r), a = t.length - 1; a >= 0; --a) { var i, l = t[a]; if (l === "[]" && r.parseArrays) i = r.allowEmptyArrays && (o === "" || r.strictNullHandling && o === null) ? [] : [].concat(o); else { i = r.plainObjects ? /* @__PURE__ */ Object.create(null) : {}; - var u = l.charAt(0) === "[" && l.charAt(l.length - 1) === "]" ? l.slice(1, -1) : l, c = r.decodeDotInKeys ? u.replace(/%2E/g, ".") : u, d = parseInt(c, 10); + var s = l.charAt(0) === "[" && l.charAt(l.length - 1) === "]" ? l.slice(1, -1) : l, c = r.decodeDotInKeys ? s.replace(/%2E/g, ".") : s, d = parseInt(c, 10); !r.parseArrays && c === "" ? i = { 0: o } : !isNaN(d) && l !== c && String(d) === c && d >= 0 && r.parseArrays && d <= r.arrayLimit ? (i = [], i[d] = o) : c !== "__proto__" && (i[c] = o); } o = i; } return o; -}, Oi = function(e, r, n, o) { +}, Ei = function(e, r, n, o) { if (e) { - var a = n.allowDots ? e.replace(/\.([^.[]+)/g, "[$1]") : e, i = /(\[[^[\]]*])/, l = /(\[[^[\]]*])/g, u = n.depth > 0 && i.exec(a), c = u ? a.slice(0, u.index) : a, d = []; + var a = n.allowDots ? e.replace(/\.([^.[]+)/g, "[$1]") : e, i = /(\[[^[\]]*])/, l = /(\[[^[\]]*])/g, s = n.depth > 0 && i.exec(a), c = s ? a.slice(0, s.index) : a, d = []; if (c) { if (!n.plainObjects && Ft.call(Object.prototype, c) && !n.allowPrototypes) return; d.push(c); } - for (var p = 0; n.depth > 0 && (u = l.exec(a)) !== null && p < n.depth; ) { - if (p += 1, !n.plainObjects && Ft.call(Object.prototype, u[1].slice(1, -1)) && !n.allowPrototypes) + for (var p = 0; n.depth > 0 && (s = l.exec(a)) !== null && p < n.depth; ) { + if (p += 1, !n.plainObjects && Ft.call(Object.prototype, s[1].slice(1, -1)) && !n.allowPrototypes) return; - d.push(u[1]); + d.push(s[1]); } - if (u) { + if (s) { if (n.strictDepth === !0) throw new RangeError("Input depth exceeded depth option of " + n.depth + " and strictDepth is true"); - d.push("[" + a.slice(u.index) + "]"); + d.push("[" + a.slice(s.index) + "]"); } return Si(d, r, n, o); } -}, Ei = function(e) { +}, Oi = function(e) { if (!e) return M; if (typeof e.allowEmptyArrays < "u" && typeof e.allowEmptyArrays != "boolean") @@ -1414,12 +1414,12 @@ var en = $e, Ie = la, La = wa, Wa = Le, ze = en("%WeakMap%", !0), Ge = en("%Map% strictNullHandling: typeof e.strictNullHandling == "boolean" ? e.strictNullHandling : M.strictNullHandling }; }, Ai = function(t, e) { - var r = Ei(e); + var r = Oi(e); if (t === "" || t === null || typeof t > "u") return r.plainObjects ? /* @__PURE__ */ Object.create(null) : {}; for (var n = typeof t == "string" ? xi(t, r) : t, o = r.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, a = Object.keys(n), i = 0; i < a.length; ++i) { - var l = a[i], u = Oi(l, n[l], r, typeof t == "string"); - o = Pe.merge(o, u, r); + var l = a[i], s = Ei(l, n[l], r, typeof t == "string"); + o = Pe.merge(o, s, r); } return r.allowSparse === !0 ? o : Pe.compact(o); }, Pi = mi, Ci = Ai, $i = Gt, Cr = { @@ -1449,21 +1449,21 @@ var en = $e, Ie = la, La = wa, Wa = Le, ze = en("%WeakMap%", !0), Ge = en("%Map% parent: "body", template: '
' }; - r.configure = function(s) { + r.configure = function(u) { var y, m; - for (y in s) - m = s[y], m !== void 0 && s.hasOwnProperty(y) && (n[y] = m); + for (y in u) + m = u[y], m !== void 0 && u.hasOwnProperty(y) && (n[y] = m); return this; - }, r.status = null, r.set = function(s) { + }, r.status = null, r.set = function(u) { var y = r.isStarted(); - s = o(s, n.minimum, 1), r.status = s === 1 ? null : s; + u = o(u, n.minimum, 1), r.status = u === 1 ? null : u; var m = r.render(!y), b = m.querySelector(n.barSelector), A = n.speed, h = n.easing; return m.offsetWidth, l(function(x) { - n.positionUsing === "" && (n.positionUsing = r.getPositioningCSS()), u(b, i(s, A, h)), s === 1 ? (u(m, { + n.positionUsing === "" && (n.positionUsing = r.getPositioningCSS()), s(b, i(u, A, h)), u === 1 ? (s(m, { transition: "none", opacity: 1 }), m.offsetWidth, setTimeout(function() { - u(m, { + s(m, { transition: "all " + A + "ms linear", opacity: 0 }), setTimeout(function() { @@ -1475,67 +1475,67 @@ var en = $e, Ie = la, La = wa, Wa = Le, ze = en("%WeakMap%", !0), Ge = en("%Map% return typeof r.status == "number"; }, r.start = function() { r.status || r.set(0); - var s = function() { + var u = function() { setTimeout(function() { - r.status && (r.trickle(), s()); + r.status && (r.trickle(), u()); }, n.trickleSpeed); }; - return n.trickle && s(), this; - }, r.done = function(s) { - return !s && !r.status ? this : r.inc(0.3 + 0.5 * Math.random()).set(1); - }, r.inc = function(s) { + return n.trickle && u(), this; + }, r.done = function(u) { + return !u && !r.status ? this : r.inc(0.3 + 0.5 * Math.random()).set(1); + }, r.inc = function(u) { var y = r.status; - return y ? (typeof s != "number" && (s = (1 - y) * o(Math.random() * y, 0.1, 0.95)), y = o(y + s, 0, 0.994), r.set(y)) : r.start(); + return y ? (typeof u != "number" && (u = (1 - y) * o(Math.random() * y, 0.1, 0.95)), y = o(y + u, 0, 0.994), r.set(y)) : r.start(); }, r.trickle = function() { return r.inc(Math.random() * n.trickleRate); }, function() { - var s = 0, y = 0; + var u = 0, y = 0; r.promise = function(m) { - return !m || m.state() === "resolved" ? this : (y === 0 && r.start(), s++, y++, m.always(function() { - y--, y === 0 ? (s = 0, r.done()) : r.set((s - y) / s); + return !m || m.state() === "resolved" ? this : (y === 0 && r.start(), u++, y++, m.always(function() { + y--, y === 0 ? (u = 0, r.done()) : r.set((u - y) / u); }), this); }; - }(), r.render = function(s) { + }(), r.render = function(u) { if (r.isRendered()) return document.getElementById("nprogress"); d(document.documentElement, "nprogress-busy"); var y = document.createElement("div"); y.id = "nprogress", y.innerHTML = n.template; - var m = y.querySelector(n.barSelector), b = s ? "-100" : a(r.status || 0), A = document.querySelector(n.parent), h; - return u(m, { + var m = y.querySelector(n.barSelector), b = u ? "-100" : a(r.status || 0), A = document.querySelector(n.parent), h; + return s(m, { transition: "all 0 linear", transform: "translate3d(" + b + "%,0,0)" }), n.showSpinner || (h = y.querySelector(n.spinnerSelector), h && v(h)), A != document.body && d(A, "nprogress-custom-parent"), A.appendChild(y), y; }, r.remove = function() { p(document.documentElement, "nprogress-busy"), p(document.querySelector(n.parent), "nprogress-custom-parent"); - var s = document.getElementById("nprogress"); - s && v(s); + var u = document.getElementById("nprogress"); + u && v(u); }, r.isRendered = function() { return !!document.getElementById("nprogress"); }, r.getPositioningCSS = function() { - var s = document.body.style, y = "WebkitTransform" in s ? "Webkit" : "MozTransform" in s ? "Moz" : "msTransform" in s ? "ms" : "OTransform" in s ? "O" : ""; - return y + "Perspective" in s ? "translate3d" : y + "Transform" in s ? "translate" : "margin"; + var u = document.body.style, y = "WebkitTransform" in u ? "Webkit" : "MozTransform" in u ? "Moz" : "msTransform" in u ? "ms" : "OTransform" in u ? "O" : ""; + return y + "Perspective" in u ? "translate3d" : y + "Transform" in u ? "translate" : "margin"; }; - function o(s, y, m) { - return s < y ? y : s > m ? m : s; + function o(u, y, m) { + return u < y ? y : u > m ? m : u; } - function a(s) { - return (-1 + s) * 100; + function a(u) { + return (-1 + u) * 100; } - function i(s, y, m) { + function i(u, y, m) { var b; - return n.positionUsing === "translate3d" ? b = { transform: "translate3d(" + a(s) + "%,0,0)" } : n.positionUsing === "translate" ? b = { transform: "translate(" + a(s) + "%,0)" } : b = { "margin-left": a(s) + "%" }, b.transition = "all " + y + "ms " + m, b; + return n.positionUsing === "translate3d" ? b = { transform: "translate3d(" + a(u) + "%,0,0)" } : n.positionUsing === "translate" ? b = { transform: "translate(" + a(u) + "%,0)" } : b = { "margin-left": a(u) + "%" }, b.transition = "all " + y + "ms " + m, b; } var l = /* @__PURE__ */ function() { - var s = []; + var u = []; function y() { - var m = s.shift(); + var m = u.shift(); m && m(y); } return function(m) { - s.push(m), s.length == 1 && y(); + u.push(m), u.length == 1 && y(); }; - }(), u = /* @__PURE__ */ function() { - var s = ["Webkit", "O", "Moz", "ms"], y = {}; + }(), s = /* @__PURE__ */ function() { + var u = ["Webkit", "O", "Moz", "ms"], y = {}; function m(x) { return x.replace(/^-ms-/, "ms-").replace(/-([\da-z])/gi, function(P, D) { return D.toUpperCase(); @@ -1544,8 +1544,8 @@ var en = $e, Ie = la, La = wa, Wa = Le, ze = en("%WeakMap%", !0), Ge = en("%Map% function b(x) { var P = document.body.style; if (x in P) return x; - for (var D = s.length, k = x.charAt(0).toUpperCase() + x.slice(1), W; D--; ) - if (W = s[D] + k, W in P) return W; + for (var D = u.length, L = x.charAt(0).toUpperCase() + x.slice(1), W; D--; ) + if (W = u[D] + L, W in P) return W; return x; } function A(x) { @@ -1555,40 +1555,40 @@ var en = $e, Ie = la, La = wa, Wa = Le, ze = en("%WeakMap%", !0), Ge = en("%Map% P = A(P), x.style[P] = D; } return function(x, P) { - var D = arguments, k, W; + var D = arguments, L, W; if (D.length == 2) - for (k in P) - W = P[k], W !== void 0 && P.hasOwnProperty(k) && h(x, k, W); + for (L in P) + W = P[L], W !== void 0 && P.hasOwnProperty(L) && h(x, L, W); else h(x, D[1], D[2]); }; }(); - function c(s, y) { - var m = typeof s == "string" ? s : f(s); + function c(u, y) { + var m = typeof u == "string" ? u : f(u); return m.indexOf(" " + y + " ") >= 0; } - function d(s, y) { - var m = f(s), b = m + y; - c(m, y) || (s.className = b.substring(1)); + function d(u, y) { + var m = f(u), b = m + y; + c(m, y) || (u.className = b.substring(1)); } - function p(s, y) { - var m = f(s), b; - c(s, y) && (b = m.replace(" " + y + " ", " "), s.className = b.substring(1, b.length - 1)); + function p(u, y) { + var m = f(u), b; + c(u, y) && (b = m.replace(" " + y + " ", " "), u.className = b.substring(1, b.length - 1)); } - function f(s) { - return (" " + (s.className || "") + " ").replace(/\s+/gi, " "); + function f(u) { + return (" " + (u.className || "") + " ").replace(/\s+/gi, " "); } - function v(s) { - s && s.parentNode && s.parentNode.removeChild(s); + function v(u) { + u && u.parentNode && u.parentNode.removeChild(u); } return r; }); })(Ii); function Mi(t, e, r, n = "brackets") { - let o = /^https?:\/\//.test(e.toString()), a = o || e.toString().startsWith("/"), i = !a && !e.toString().startsWith("#") && !e.toString().startsWith("?"), l = e.toString().includes("?") || t === "get" && Object.keys(r).length, u = e.toString().includes("#"), c = new URL(e.toString(), "http://localhost"); - return t === "get" && Object.keys(r).length && (c.search = Cr.stringify(co(Cr.parse(c.search, { ignoreQueryPrefix: !0 }), r), { encodeValuesOnly: !0, arrayFormat: n }), r = {}), [[o ? `${c.protocol}//${c.host}` : "", a ? c.pathname : "", i ? c.pathname.substring(1) : "", l ? c.search : "", u ? c.hash : ""].join(""), r]; + let o = /^https?:\/\//.test(e.toString()), a = o || e.toString().startsWith("/"), i = !a && !e.toString().startsWith("#") && !e.toString().startsWith("?"), l = e.toString().includes("?") || t === "get" && Object.keys(r).length, s = e.toString().includes("#"), c = new URL(e.toString(), "http://localhost"); + return t === "get" && Object.keys(r).length && (c.search = Cr.stringify(co(Cr.parse(c.search, { ignoreQueryPrefix: !0 }), r), { encodeValuesOnly: !0, arrayFormat: n }), r = {}), [[o ? `${c.protocol}//${c.host}` : "", a ? c.pathname : "", i ? c.pathname.substring(1) : "", l ? c.search : "", s ? c.hash : ""].join(""), r]; } -const sn = { +const un = { __name: "ModalRenderer", props: { index: { @@ -1600,8 +1600,8 @@ const sn = { const e = t, r = Ue(), n = $(() => r.stack.value[e.index]); return Tt("modalContext", n), (o, a) => { var i; - return (i = n.value) != null && i.component ? (O(), I(g(n).component, q({ key: 0 }, n.value.props, { - onModalEvent: a[0] || (a[0] = (l, ...u) => n.value.emit(l, ...u)) + return (i = n.value) != null && i.component ? (E(), I(g(n).component, q({ key: 0 }, n.value.props, { + onModalEvent: a[0] || (a[0] = (l, ...s) => n.value.emit(l, ...s)) }), null, 16)) : H("", !0); }; } @@ -1610,32 +1610,43 @@ const sn = { setup(t) { const e = Ue(), r = S(!1), n = S(null); we(Be.on("start", () => r.value = !0)), we(Be.on("finish", () => r.value = !1)), we( - Be.on("navigate", (a) => { - const i = a.detail.page.props._inertiaui_modal; - if (!i) { + Be.on("navigate", (i) => { + const l = i.detail.page.props._inertiaui_modal; + if (!l) { n.value && e.closeAll(); return; } - n.value = i, e.setBaseUrl(i.baseUrl), e.pushFromResponseData(i, {}, () => { - if (!i.baseUrl) { + n.value = l, e.setBaseUrl(l.baseUrl), e.pushFromResponseData(l, {}, () => { + if (!l.baseUrl) { console.error("No base url in modal response data so cannot navigate back"); return; } - !r.value && window.location.href !== i.baseUrl && Be.visit(i.baseUrl, { + !r.value && window.location.href !== l.baseUrl && Be.visit(l.baseUrl, { preserveScroll: !0, preserveState: !0 }); }); }) ); - const o = (a) => (a.headers["X-InertiaUI-Modal-Base-Url"] = e.getBaseUrl(), a); - return In(() => { + const o = (i) => (i.headers["X-InertiaUI-Modal-Base-Url"] = e.getBaseUrl(), i); + Mn(() => { Ze.interceptors.request.use(o); }), we(() => { Ze.interceptors.request.eject(o); - }), (a, i) => (O(), ce(Rt, null, [ - F(a.$slots, "default"), - g(e).stack.value.length ? (O(), I(sn, { + }); + const a = Lr(); + return U( + () => { + var i; + return (i = a.props) == null ? void 0 : i._inertiaui_modal; + }, + (i, l) => { + var s; + i && l && i.component === l.component && i.url === l.url && ((s = e.stack.value[0]) == null || s.updateProps(i.props ?? {})); + } + ), (i, l) => (E(), ce(Rt, null, [ + F(i.$slots, "default"), + g(e).stack.value.length ? (E(), I(un, { key: 0, index: 0 })) : H("", !0) @@ -1648,19 +1659,19 @@ const Nt = S(null), C = S([]), ot = S({}), Fi = (t) => { }; class Ht { constructor(e, r, n, o, a) { - L(this, "update", (e, r, n) => { + k(this, "update", (e, r, n) => { const o = this.index.value; o > -1 && (C.value[o].config = e, C.value[o].onCloseCallback = r, C.value[o].afterLeaveCallback = n); }); - L(this, "getParentModal", () => { + k(this, "getParentModal", () => { const e = this.index.value; return e < 1 ? null : C.value.slice(0, e).reverse().find((r) => r.isOpen); }); - L(this, "getChildModal", () => { + k(this, "getChildModal", () => { const e = this.index.value; return e === C.value.length - 1 ? null : C.value.slice(e + 1).find((r) => r.isOpen); }); - L(this, "show", () => { + k(this, "show", () => { const e = this.index.value; if (e > -1) { if (C.value[e].isOpen) @@ -1668,7 +1679,7 @@ class Ht { C.value[e].isOpen = !0, C.value[e].shouldRender = !0; } }); - L(this, "close", () => { + k(this, "close", () => { var r; const e = this.index.value; if (e > -1) { @@ -1679,10 +1690,10 @@ class Ht { }), C.value[e].isOpen = !1, (r = this.onCloseCallback) == null || r.call(this), this.onCloseCallback = null; } }); - L(this, "setOpen", (e) => { + k(this, "setOpen", (e) => { e ? this.show() : this.close(); }); - L(this, "afterLeave", () => { + k(this, "afterLeave", () => { var r; const e = this.index.value; if (e > -1) { @@ -1692,28 +1703,28 @@ class Ht { } e === 0 && (C.value = []); }); - L(this, "on", (e, r) => { + k(this, "on", (e, r) => { this.listeners[e] = this.listeners[e] ?? [], this.listeners[e].push(r); }); - L(this, "off", (e, r) => { + k(this, "off", (e, r) => { var n; r ? this.listeners[e] = ((n = this.listeners[e]) == null ? void 0 : n.filter((o) => o !== r)) ?? [] : delete this.listeners[e]; }); - L(this, "emit", (e, ...r) => { + k(this, "emit", (e, ...r) => { var n; (n = this.listeners[e]) == null || n.forEach((o) => o(...r)); }); - L(this, "registerEventListenersFromAttrs", (e) => { + k(this, "registerEventListenersFromAttrs", (e) => { const r = []; return Object.keys(e).filter((n) => n.startsWith("on")).forEach((n) => { const o = n.replace(/^on/, "").replace(/^./, (a) => a.toLowerCase()).replace(/([A-Z])/g, "-$1").toLowerCase(); this.on(o, e[n]), r.push(() => this.off(o, e[n])); }), () => r.forEach((n) => n()); }); - L(this, "reload", (e = {}) => { + k(this, "reload", (e = {}) => { var n; let r = Object.keys(this.response.props); - e.only && (r = Lr(r, e.only)), e.except && (r = zn(r, e.except)), (n = this.response) != null && n.url && Ze.get(this.response.url, { + e.only && (r = Wr(r, e.only)), e.except && (r = zn(r, e.except)), (n = this.response) != null && n.url && Ze.get(this.response.url, { headers: { Accept: "text/html, application/xhtml+xml", "X-Inertia": !0, @@ -1724,12 +1735,15 @@ class Ht { "X-InertiaUI-Modal-Use-Router": 0 } }).then((o) => { - Object.assign(this.props.value, o.data.props); + this.updateProps(o.data.props); }); }); + k(this, "updateProps", (e) => { + Object.assign(this.props.value, e); + }); this.id = Ht.generateId(), this.isOpen = !1, this.shouldRender = !1, this.listeners = {}, this.component = e, this.props = S(r.props), this.response = r, this.config = n, this.onCloseCallback = o, this.afterLeaveCallback = a, this.index = $(() => C.value.findIndex((i) => i.id === this.id)), this.onTopOfStack = $(() => { var l; - return C.value.length < 2 ? !0 : ((l = C.value.map((u) => ({ id: u.id, shouldRender: u.shouldRender })).reverse().find((u) => u.shouldRender)) == null ? void 0 : l.id) === this.id; + return C.value.length < 2 ? !0 : ((l = C.value.map((s) => ({ id: s.id, shouldRender: s.shouldRender })).reverse().find((s) => s.shouldRender)) == null ? void 0 : l.id) === this.id; }); } static generateId() { @@ -1745,23 +1759,23 @@ function Bi(t, e, r, n) { const o = Qt(null, {}, e, r, n); return o.name = t, ot.value[t].callback(o), o; } -function un(t, e = {}, r = null, n = null) { +function cn(t, e = {}, r = null, n = null) { return Vt(t.component).then((o) => Qt(Nr(o), t, e, r, n)); } -function Ti(t, e, r = {}, n = {}, o = {}, a = null, i = null, l = "brackets", u = !1) { +function Ti(t, e, r = {}, n = {}, o = {}, a = null, i = null, l = "brackets", s = !1) { return new Promise((c, d) => { if (t.startsWith("#")) { c(Bi(t.substring(1), o, a, i)); return; } const [p, f] = Mi(e, t || "", r, l); - let v = u && C.value.length === 0; + let v = s && C.value.length === 0; if (C.value.length === 0 && (Nt.value = typeof window < "u" ? window.location.href : ""), n = { ...n, Accept: "text/html, application/xhtml+xml", "X-Requested-With": "XMLHttpRequest", "X-Inertia": !0, - "X-Inertia-Version": qn().version, + "X-Inertia-Version": Lr().version, "X-InertiaUI-Modal": !0, "X-InertiaUI-Modal-Use-Router": v ? 1 : 0 }, v) @@ -1772,9 +1786,9 @@ function Ti(t, e, r = {}, n = {}, o = {}, a = null, i = null, l = "brackets", u preserveScroll: !0, preserveState: !0, onError: d, - onFinish: () => Vn(() => C.value[0]).then((s) => { - const y = s.onCloseCallback, m = s.afterLeaveCallback; - s.update( + onFinish: () => Vn(() => C.value[0]).then((u) => { + const y = u.onCloseCallback, m = u.afterLeaveCallback; + u.update( o, () => { a == null || a(), y == null || y(); @@ -1782,10 +1796,10 @@ function Ti(t, e, r = {}, n = {}, o = {}, a = null, i = null, l = "brackets", u () => { i == null || i(), m == null || m(); } - ), c(s); + ), c(u); }) }); - Ze({ url: p, method: e, data: f, headers: n }).then((s) => c(un(s.data, o, a, i))).catch(d); + Ze({ url: p, method: e, data: f, headers: n }).then((u) => c(cn(u.data, o, a, i))).catch(d); }); } function Qt(t, e, r, n, o) { @@ -1800,9 +1814,9 @@ function Ue() { setComponentResolver: Fi, getBaseUrl: () => Nt.value, setBaseUrl: (t) => Nt.value = t, - stack: Mn(C), + stack: Dn(C), push: Qt, - pushFromResponseData: un, + pushFromResponseData: cn, closeAll: () => [...C.value].reverse().forEach((t) => t.close()), reset: () => C.value = [], visit: Ti, @@ -1853,8 +1867,8 @@ const _i = /* @__PURE__ */ Object.assign({ emits: ["modal-event"], setup(t, { expose: e, emit: r }) { const n = t, o = Ue(), a = n.name ? S({}) : _t("modalContext"), i = $(() => { - var s; - const v = ((s = a.value.config) == null ? void 0 : s.slideover) ?? n.slideover ?? Lt("type") === "slideover"; + var u; + const v = ((u = a.value.config) == null ? void 0 : u.slideover) ?? n.slideover ?? Lt("type") === "slideover"; return { slideover: v, closeButton: n.closeButton ?? ve(v, "closeButton"), @@ -1878,13 +1892,13 @@ const _i = /* @__PURE__ */ Object.assign({ var v; return (v = l.value) == null ? void 0 : v.call(l); }); - const u = Br(); + const s = Br(); function c() { - l.value = a.value.registerEventListenersFromAttrs(u); + l.value = a.value.registerEventListenersFromAttrs(s); } const d = r; - function p(v, ...s) { - d("modal-event", v, ...s); + function p(v, ...u) { + d("modal-event", v, ...u); } e({ afterLeave: a.value.afterLeave, @@ -1904,9 +1918,9 @@ const _i = /* @__PURE__ */ Object.assign({ }); const f = $(() => { var v; - return (v = o.stack.value.find((s) => s.shouldRender && s.index > a.value.index)) == null ? void 0 : v.index; + return (v = o.stack.value.find((u) => u.shouldRender && u.index > a.value.index)) == null ? void 0 : v.index; }); - return (v, s) => (O(), ce(Rt, null, [ + return (v, u) => (E(), ce(Rt, null, [ g(a).shouldRender ? F(v.$slots, "default", { key: 0, id: g(a).id, @@ -1924,7 +1938,7 @@ const _i = /* @__PURE__ */ Object.assign({ setOpen: g(a).setOpen, shouldRender: g(a).shouldRender }) : H("", !0), - f.value ? (O(), I(sn, { + f.value ? (E(), I(un, { key: 1, index: f.value }, null, 8, ["index"])) : H("", !0) @@ -1944,7 +1958,7 @@ function Jt(t, e) { ); }, (o) => (Tt(n, o), o)]; } -function cn(t, e, r) { +function fn(t, e, r) { const n = r.originalEvent.target, o = new CustomEvent(t, { bubbles: !1, cancelable: !0, @@ -1952,8 +1966,8 @@ function cn(t, e, r) { }); e && n.addEventListener(t, e, { once: !0 }), n.dispatchEvent(o); } -function fn(t) { - return Ln() ? (Wn(t), !0) : !1; +function dn(t) { + return Wn() ? (Un(t), !0) : !1; } function ki(t) { let e = !1, r; @@ -1965,7 +1979,7 @@ function Li(t) { const o = () => { e -= 1, n && e <= 0 && (n.stop(), r = void 0, n = void 0); }; - return (...a) => (e += 1, r || (n = _r(!0), r = n.run(() => t(...a))), fn(o), r); + return (...a) => (e += 1, r || (n = _r(!0), r = n.run(() => t(...a))), dn(o), r); } function Xt(t) { return typeof t == "function" ? t() : g(t); @@ -1989,29 +2003,29 @@ function je(t) { const r = Xt(t); return (e = r == null ? void 0 : r.$el) != null ? e : r; } -const dn = pe ? window : void 0; -function pn(...t) { +const pn = pe ? window : void 0; +function yn(...t) { let e, r, n, o; - if (typeof t[0] == "string" || Array.isArray(t[0]) ? ([r, n, o] = t, e = dn) : [e, r, n, o] = t, !e) + if (typeof t[0] == "string" || Array.isArray(t[0]) ? ([r, n, o] = t, e = pn) : [e, r, n, o] = t, !e) return qi; Array.isArray(r) || (r = [r]), Array.isArray(n) || (n = [n]); const a = [], i = () => { a.forEach((d) => d()), a.length = 0; - }, l = (d, p, f, v) => (d.addEventListener(p, f, v), () => d.removeEventListener(p, f, v)), u = j( + }, l = (d, p, f, v) => (d.addEventListener(p, f, v), () => d.removeEventListener(p, f, v)), s = U( () => [je(e), Xt(o)], ([d, p]) => { if (i(), !d) return; const f = ji(p) ? { ...p } : p; a.push( - ...r.flatMap((v) => n.map((s) => l(d, v, s, f))) + ...r.flatMap((v) => n.map((u) => l(d, v, u, f))) ); }, { immediate: !0, flush: "post" } ), c = () => { - u(), i(); + s(), i(); }; - return fn(c), c; + return dn(c), c; } function Vi(t) { return typeof t == "function" ? t : typeof t == "string" ? (e) => e.key === t : Array.isArray(t) ? (e) => t.includes(e.key) : () => !0; @@ -2020,13 +2034,13 @@ function Hi(...t) { let e, r, n = {}; t.length === 3 ? (e = t[0], r = t[1], n = t[2]) : t.length === 2 ? typeof t[1] == "object" ? (e = !0, r = t[0], n = t[1]) : (e = t[0], r = t[1]) : (e = !0, r = t[0]); const { - target: o = dn, + target: o = pn, eventName: a = "keydown", passive: i = !1, dedupe: l = !1 - } = n, u = Vi(e); - return pn(o, a, (c) => { - c.repeat && Xt(l) || u(c) && r(c); + } = n, s = Vi(e); + return yn(o, a, (c) => { + c.repeat && Xt(l) || s(c) && r(c); }, i); } function Qi() { @@ -2042,26 +2056,26 @@ function Xi(t, e, r, n = {}) { var o, a, i; const { clone: l = !1, - passive: u = !1, + passive: s = !1, eventName: c, deep: d = !1, defaultValue: p, shouldEmit: f - } = n, v = Ce(), s = r || (v == null ? void 0 : v.emit) || ((o = v == null ? void 0 : v.$emit) == null ? void 0 : o.bind(v)) || ((i = (a = v == null ? void 0 : v.proxy) == null ? void 0 : a.$emit) == null ? void 0 : i.bind(v == null ? void 0 : v.proxy)); + } = n, v = Ce(), u = r || (v == null ? void 0 : v.emit) || ((o = v == null ? void 0 : v.$emit) == null ? void 0 : o.bind(v)) || ((i = (a = v == null ? void 0 : v.proxy) == null ? void 0 : a.$emit) == null ? void 0 : i.bind(v == null ? void 0 : v.proxy)); let y = c; y = y || `update:${e.toString()}`; const m = (h) => l ? typeof l == "function" ? l(h) : Ji(h) : h, b = () => Wi(t[e]) ? m(t[e]) : p, A = (h) => { - f ? f(h) && s(y, h) : s(y, h); + f ? f(h) && u(y, h) : u(y, h); }; - if (u) { + if (s) { const h = b(), x = S(h); let P = !1; - return j( + return U( () => t[e], (D) => { P || (P = !0, x.value = m(D), de(() => P = !1)); } - ), j( + ), U( x, (D) => { !P && (D !== t[e] || d) && A(D); @@ -2109,7 +2123,7 @@ function Yi(t) { e.reduce((r, n) => Bt(r, n, ""), {}) ); } -const Zi = Yi(), [yn, es] = Jt("ConfigProvider"); +const Zi = Yi(), [vn, es] = Jt("ConfigProvider"); let el = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", tl = (t = 21) => { let e = "", r = t; for (; r--; ) @@ -2122,15 +2136,15 @@ const rl = Li(() => { if (i) return !0; return !1; - }), n = yn({ + }), n = vn({ scrollBody: S(!0) }); let o = null; const a = () => { document.body.style.paddingRight = "", document.body.style.marginRight = "", document.body.style.pointerEvents = "", document.body.style.removeProperty("--scrollbar-width"), document.body.style.overflow = e.value ?? "", $r && (o == null || o()), e.value = void 0; }; - return j(r, (i, l) => { - var u; + return U(r, (i, l) => { + var s; if (!pe) return; if (!i) { @@ -2138,11 +2152,11 @@ const rl = Li(() => { return; } e.value === void 0 && (e.value = document.body.style.overflow); - const c = window.innerWidth - document.documentElement.clientWidth, d = { padding: c, margin: 0 }, p = (u = n.scrollBody) != null && u.value ? typeof n.scrollBody.value == "object" ? Zi({ + const c = window.innerWidth - document.documentElement.clientWidth, d = { padding: c, margin: 0 }, p = (s = n.scrollBody) != null && s.value ? typeof n.scrollBody.value == "object" ? Zi({ padding: n.scrollBody.value.padding === !0 ? c : n.scrollBody.value.padding, margin: n.scrollBody.value.margin === !0 ? c : n.scrollBody.value.margin }, d) : d : { padding: 0, margin: 0 }; - c > 0 && (document.body.style.paddingRight = typeof p.padding == "number" ? `${p.padding}px` : String(p.padding), document.body.style.marginRight = typeof p.margin == "number" ? `${p.margin}px` : String(p.margin), document.body.style.setProperty("--scrollbar-width", `${c}px`), document.body.style.overflow = "hidden"), $r && (o = pn( + c > 0 && (document.body.style.paddingRight = typeof p.padding == "number" ? `${p.padding}px` : String(p.padding), document.body.style.marginRight = typeof p.margin == "number" ? `${p.margin}px` : String(p.margin), document.body.style.setProperty("--scrollbar-width", `${c}px`), document.body.style.overflow = "hidden"), $r && (o = yn( document, "touchmove", (f) => { @@ -2171,7 +2185,7 @@ function Zt(t) { return r != null && r.length || console.warn( `No emitted event found. Please check component: ${e == null ? void 0 : e.type.__name}` ), r == null || r.forEach((o) => { - n[Rn(_n(o))] = (...a) => t(o, ...a); + n[_n(kn(o))] = (...a) => t(o, ...a); }), n; } function K() { @@ -2211,13 +2225,13 @@ var ol = function(t) { return null; var e = Array.isArray(t) ? t[0] : t; return e.ownerDocument.body; -}, he = /* @__PURE__ */ new WeakMap(), Ve = /* @__PURE__ */ new WeakMap(), He = {}, St = 0, vn = function(t) { - return t && (t.host || vn(t.parentNode)); +}, he = /* @__PURE__ */ new WeakMap(), Ve = /* @__PURE__ */ new WeakMap(), He = {}, St = 0, mn = function(t) { + return t && (t.host || mn(t.parentNode)); }, al = function(t, e) { return e.map(function(r) { if (t.contains(r)) return r; - var n = vn(r); + var n = mn(r); return n && t.contains(n) ? n : (console.error("aria-hidden", r, "in not contained inside", t, ". Doing nothing"), null); }).filter(function(r) { return !!r; @@ -2225,18 +2239,18 @@ var ol = function(t) { }, il = function(t, e, r, n) { var o = al(e, Array.isArray(t) ? t : [t]); He[r] || (He[r] = /* @__PURE__ */ new WeakMap()); - var a = He[r], i = [], l = /* @__PURE__ */ new Set(), u = new Set(o), c = function(p) { + var a = He[r], i = [], l = /* @__PURE__ */ new Set(), s = new Set(o), c = function(p) { !p || l.has(p) || (l.add(p), c(p.parentNode)); }; o.forEach(c); var d = function(p) { - !p || u.has(p) || Array.prototype.forEach.call(p.children, function(f) { + !p || s.has(p) || Array.prototype.forEach.call(p.children, function(f) { if (l.has(f)) d(f); else try { - var v = f.getAttribute(n), s = v !== null && v !== "false", y = (he.get(f) || 0) + 1, m = (a.get(f) || 0) + 1; - he.set(f, y), a.set(f, m), i.push(f), y === 1 && s && Ve.set(f, !0), m === 1 && f.setAttribute(r, "true"), s || f.setAttribute(n, "true"); + var v = f.getAttribute(n), u = v !== null && v !== "false", y = (he.get(f) || 0) + 1, m = (a.get(f) || 0) + 1; + he.set(f, y), a.set(f, m), i.push(f), y === 1 && u && Ve.set(f, !0), m === 1 && f.setAttribute(r, "true"), u || f.setAttribute(n, "true"); } catch (b) { console.error("aria-hidden: cannot operate on ", f, b); } @@ -2257,7 +2271,7 @@ var ol = function(t) { }; function sl(t) { let e; - j(() => je(t), (r) => { + U(() => je(t), (r) => { r ? e = ll(r) : e && e(); }), we(() => { e && e(); @@ -2265,7 +2279,7 @@ function sl(t) { } let ul = 0; function Ir(t, e = "radix") { - const r = yn({ useId: void 0 }); + const r = vn({ useId: void 0 }); return rr.useId ? `${e}-${rr.useId()}` : r.useId ? `${e}-${r.useId()}` : `${e}-${++ul}`; } function cl(t, e) { @@ -2288,16 +2302,16 @@ const er = B({ var n, o; if (!r.default) return null; - const a = Yt(r.default()), i = a.findIndex((d) => d.type !== Dn); + const a = Yt(r.default()), i = a.findIndex((d) => d.type !== Fn); if (i === -1) return a; const l = a[i]; (n = l.props) == null || delete n.ref; - const u = l.props ? q(e, l.props) : e; + const s = l.props ? q(e, l.props) : e; e.class && (o = l.props) != null && o.class && delete l.props.class; - const c = Fn(l, u); - for (const d in u) - d.startsWith("on") && (c.props || (c.props = {}), c.props[d] = u[d]); + const c = Nn(l, s); + for (const d in s) + d.startsWith("on") && (c.props || (c.props = {}), c.props[d] = s[d]); return a.length === 1 ? c : (a[i] = c, a); }; } @@ -2319,7 +2333,7 @@ const er = B({ return typeof n == "string" && ["area", "img", "input"].includes(n) ? () => re(n, e) : n !== "template" ? () => re(t.as, e, { default: r.default }) : () => re(er, e, { default: r.default }); } }); -function mn() { +function gn() { const t = S(), e = $(() => { var r, n; return ["#text", "#comment"].includes((r = t.value) == null ? void 0 : r.$el.nodeName) ? (n = t.value) == null ? void 0 : n.$el.nextElementSibling : je(t); @@ -2345,36 +2359,36 @@ function fl(t, e) { }), l = (f) => { var v; if (pe) { - const s = new CustomEvent(f, { bubbles: !1, cancelable: !1 }); - (v = e.value) == null || v.dispatchEvent(s); + const u = new CustomEvent(f, { bubbles: !1, cancelable: !1 }); + (v = e.value) == null || v.dispatchEvent(u); } }; - j( + U( t, async (f, v) => { - var s; + var u; const y = v !== f; if (await de(), y) { const m = n.value, b = Qe(e.value); - f ? (i("MOUNT"), l("enter"), b === "none" && l("after-enter")) : b === "none" || ((s = r.value) == null ? void 0 : s.display) === "none" ? (i("UNMOUNT"), l("leave"), l("after-leave")) : v && m !== b ? (i("ANIMATION_OUT"), l("leave")) : (i("UNMOUNT"), l("after-leave")); + f ? (i("MOUNT"), l("enter"), b === "none" && l("after-enter")) : b === "none" || ((u = r.value) == null ? void 0 : u.display) === "none" ? (i("UNMOUNT"), l("leave"), l("after-leave")) : v && m !== b ? (i("ANIMATION_OUT"), l("leave")) : (i("UNMOUNT"), l("after-leave")); } }, { immediate: !0 } ); - const u = (f) => { - const v = Qe(e.value), s = v.includes( + const s = (f) => { + const v = Qe(e.value), u = v.includes( f.animationName ), y = a.value === "mounted" ? "enter" : "leave"; - f.target === e.value && s && (l(`after-${y}`), i("ANIMATION_END")), f.target === e.value && v === "none" && i("ANIMATION_END"); + f.target === e.value && u && (l(`after-${y}`), i("ANIMATION_END")), f.target === e.value && v === "none" && i("ANIMATION_END"); }, c = (f) => { f.target === e.value && (n.value = Qe(e.value)); - }, d = j( + }, d = U( e, (f, v) => { - f ? (r.value = getComputedStyle(f), f.addEventListener("animationstart", c), f.addEventListener("animationcancel", u), f.addEventListener("animationend", u)) : (i("ANIMATION_END"), v == null || v.removeEventListener("animationstart", c), v == null || v.removeEventListener("animationcancel", u), v == null || v.removeEventListener("animationend", u)); + f ? (r.value = getComputedStyle(f), f.addEventListener("animationstart", c), f.addEventListener("animationcancel", s), f.addEventListener("animationend", s)) : (i("ANIMATION_END"), v == null || v.removeEventListener("animationstart", c), v == null || v.removeEventListener("animationcancel", s), v == null || v.removeEventListener("animationend", s)); }, { immediate: !0 } - ), p = j(a, () => { + ), p = U(a, () => { const f = Qe(e.value); n.value = a.value === "mounted" ? f : "none"; }); @@ -2389,7 +2403,7 @@ function fl(t, e) { function Qe(t) { return t && getComputedStyle(t).animationName || "none"; } -const gn = B({ +const hn = B({ name: "Presence", props: { present: { @@ -2405,10 +2419,10 @@ const gn = B({ var n; const { present: o, forceMount: a } = Tr(t), i = S(), { isPresent: l } = fl(o, i); r({ present: l }); - let u = e.default({ present: l }); - u = Yt(u || []); + let s = e.default({ present: l }); + s = Yt(s || []); const c = Ce(); - if (u && (u == null ? void 0 : u.length) > 1) { + if (s && (s == null ? void 0 : s.length) > 1) { const d = (n = c == null ? void 0 : c.parent) != null && n.type.name ? `<${c.parent.type.name} />` : "component"; throw new Error( [ @@ -2463,7 +2477,7 @@ const gn = B({ descriptionId: "", triggerElement: o, contentElement: a - }), (l, u) => F(l.$slots, "default", { open: g(n) }); + }), (l, s) => F(l.$slots, "default", { open: g(n) }); } }), yl = /* @__PURE__ */ B({ __name: "Teleport", @@ -2474,7 +2488,7 @@ const gn = B({ }, setup(t) { const e = Qi(); - return (r, n) => g(e) || r.forceMount ? (O(), I(Tn, { + return (r, n) => g(e) || r.forceMount ? (E(), I(Rn, { key: 0, to: r.to, disabled: r.disabled @@ -2491,15 +2505,15 @@ const gn = B({ }, setup(t) { const e = t; - return (r, n) => (O(), I(g(yl), Nn(Bn(e)), { - default: E(() => [ + return (r, n) => (E(), I(g(yl), Bn(Tn(e)), { + default: O(() => [ F(r.$slots, "default") ]), _: 3 }, 16)); } }), ml = "dismissableLayer.pointerDownOutside", gl = "dismissableLayer.focusOutside"; -function hn(t, e) { +function bn(t, e) { const r = e.closest( "[data-dismissable-layer]" ), n = t.dataset.dismissableLayer === "" ? t : t.querySelector( @@ -2519,13 +2533,13 @@ function hl(t, e) { const l = async (c) => { const d = c.target; if (e != null && e.value) { - if (hn(e.value, d)) { + if (bn(e.value, d)) { o.value = !1; return; } if (c.target && !o.value) { let p = function() { - cn( + fn( ml, t, f @@ -2539,11 +2553,11 @@ function hl(t, e) { n.removeEventListener("click", a.value); o.value = !1; } - }, u = window.setTimeout(() => { + }, s = window.setTimeout(() => { n.addEventListener("pointerdown", l); }, 0); i(() => { - window.clearTimeout(u), n.removeEventListener("pointerdown", l), n.removeEventListener("click", a.value); + window.clearTimeout(s), n.removeEventListener("pointerdown", l), n.removeEventListener("click", a.value); }); }), { onPointerDownCapture: () => o.value = !0 @@ -2556,7 +2570,7 @@ function bl(t, e) { if (!pe) return; const i = async (l) => { - e != null && e.value && (await de(), !(!e.value || hn(e.value, l.target)) && l.target && !o.value && cn( + e != null && e.value && (await de(), !(!e.value || bn(e.value, l.target)) && l.target && !o.value && fn( gl, t, { originalEvent: l } @@ -2583,53 +2597,53 @@ const Q = Rr({ setup(t, { emit: e }) { const r = t, n = e, { forwardRef: o, currentElement: a } = K(), i = $( () => { - var s; - return ((s = a.value) == null ? void 0 : s.ownerDocument) ?? globalThis.document; + var u; + return ((u = a.value) == null ? void 0 : u.ownerDocument) ?? globalThis.document; } - ), l = $(() => Q.layersRoot), u = $(() => a.value ? Array.from(l.value).indexOf(a.value) : -1), c = $(() => Q.layersWithOutsidePointerEventsDisabled.size > 0), d = $(() => { - const s = Array.from(l.value), [y] = [...Q.layersWithOutsidePointerEventsDisabled].slice(-1), m = s.indexOf(y); - return u.value >= m; - }), p = hl(async (s) => { + ), l = $(() => Q.layersRoot), s = $(() => a.value ? Array.from(l.value).indexOf(a.value) : -1), c = $(() => Q.layersWithOutsidePointerEventsDisabled.size > 0), d = $(() => { + const u = Array.from(l.value), [y] = [...Q.layersWithOutsidePointerEventsDisabled].slice(-1), m = u.indexOf(y); + return s.value >= m; + }), p = hl(async (u) => { const y = [...Q.branches].some( - (m) => m == null ? void 0 : m.contains(s.target) + (m) => m == null ? void 0 : m.contains(u.target) ); - !d.value || y || (n("pointerDownOutside", s), n("interactOutside", s), await de(), s.defaultPrevented || n("dismiss")); - }, a), f = bl((s) => { + !d.value || y || (n("pointerDownOutside", u), n("interactOutside", u), await de(), u.defaultPrevented || n("dismiss")); + }, a), f = bl((u) => { [...Q.branches].some( - (y) => y == null ? void 0 : y.contains(s.target) - ) || (n("focusOutside", s), n("interactOutside", s), s.defaultPrevented || n("dismiss")); + (y) => y == null ? void 0 : y.contains(u.target) + ) || (n("focusOutside", u), n("interactOutside", u), u.defaultPrevented || n("dismiss")); }, a); - Hi("Escape", (s) => { - u.value === l.value.size - 1 && (n("escapeKeyDown", s), s.defaultPrevented || n("dismiss")); + Hi("Escape", (u) => { + s.value === l.value.size - 1 && (n("escapeKeyDown", u), u.defaultPrevented || n("dismiss")); }); let v; - return fe((s) => { - a.value && (r.disableOutsidePointerEvents && (Q.layersWithOutsidePointerEventsDisabled.size === 0 && (v = i.value.body.style.pointerEvents, i.value.body.style.pointerEvents = "none"), Q.layersWithOutsidePointerEventsDisabled.add(a.value)), l.value.add(a.value), s(() => { + return fe((u) => { + a.value && (r.disableOutsidePointerEvents && (Q.layersWithOutsidePointerEventsDisabled.size === 0 && (v = i.value.body.style.pointerEvents, i.value.body.style.pointerEvents = "none"), Q.layersWithOutsidePointerEventsDisabled.add(a.value)), l.value.add(a.value), u(() => { r.disableOutsidePointerEvents && Q.layersWithOutsidePointerEventsDisabled.size === 1 && (i.value.body.style.pointerEvents = v); })); - }), fe((s) => { - s(() => { + }), fe((u) => { + u(() => { a.value && (l.value.delete(a.value), Q.layersWithOutsidePointerEventsDisabled.delete(a.value)); }); - }), (s, y) => (O(), I(g(Me), { + }), (u, y) => (E(), I(g(Me), { ref: g(o), - "as-child": s.asChild, - as: s.as, + "as-child": u.asChild, + as: u.as, "data-dismissable-layer": "", - style: kn({ + style: Ln({ pointerEvents: c.value ? d.value ? "auto" : "none" : void 0 }), onFocusCapture: g(f).onFocusCapture, onBlurCapture: g(f).onBlurCapture, onPointerdownCapture: g(p).onPointerDownCapture }, { - default: E(() => [ - F(s.$slots, "default") + default: O(() => [ + F(u.$slots, "default") ]), _: 3 }, 8, ["as-child", "as", "style", "onFocusCapture", "onBlurCapture", "onPointerdownCapture"])); } -}), Ot = "focusScope.autoFocusOnMount", Et = "focusScope.autoFocusOnUnmount", Mr = { bubbles: !1, cancelable: !0 }; +}), Et = "focusScope.autoFocusOnMount", Ot = "focusScope.autoFocusOnUnmount", Mr = { bubbles: !1, cancelable: !0 }; function xl(t, { select: e = !1 } = {}) { const r = document.activeElement; for (const n of t) @@ -2637,10 +2651,10 @@ function xl(t, { select: e = !1 } = {}) { return !0; } function Sl(t) { - const e = bn(t), r = Dr(e, t), n = Dr(e.reverse(), t); + const e = wn(t), r = Dr(e, t), n = Dr(e.reverse(), t); return [r, n]; } -function bn(t) { +function wn(t) { const e = [], r = document.createTreeWalker(t, NodeFilter.SHOW_ELEMENT, { acceptNode: (n) => { const o = n.tagName === "INPUT" && n.type === "hidden"; @@ -2652,10 +2666,10 @@ function bn(t) { } function Dr(t, e) { for (const r of t) - if (!Ol(r, { upTo: e })) + if (!El(r, { upTo: e })) return r; } -function Ol(t, { upTo: e }) { +function El(t, { upTo: e }) { if (getComputedStyle(t).visibility === "hidden") return !0; for (; t; ) { @@ -2667,13 +2681,13 @@ function Ol(t, { upTo: e }) { } return !1; } -function El(t) { +function Ol(t) { return t instanceof HTMLInputElement && "select" in t; } function Z(t, { select: e = !1 } = {}) { if (t && t.focus) { const r = document.activeElement; - t.focus({ preventScroll: !0 }), t !== r && El(t) && e && t.select(); + t.focus({ preventScroll: !0 }), t !== r && Ol(t) && e && t.select(); } } const Al = ki(() => S([])); @@ -2707,7 +2721,7 @@ const $l = /* @__PURE__ */ B({ }, emits: ["mountAutoFocus", "unmountAutoFocus"], setup(t, { emit: e }) { - const r = t, n = e, { currentRef: o, currentElement: a } = K(), i = S(null), l = Pl(), u = Rr({ + const r = t, n = e, { currentRef: o, currentElement: a } = K(), i = S(null), l = Pl(), s = Rr({ paused: !1, pause() { this.paused = !0; @@ -2723,22 +2737,22 @@ const $l = /* @__PURE__ */ B({ if (!r.trapped) return; function f(m) { - if (u.paused || !p) + if (s.paused || !p) return; const b = m.target; p.contains(b) ? i.value = b : Z(i.value, { select: !0 }); } function v(m) { - if (u.paused || !p) + if (s.paused || !p) return; const b = m.relatedTarget; b !== null && (p.contains(b) || Z(i.value, { select: !0 })); } - function s(m) { + function u(m) { p.contains(i.value) || Z(p); } document.addEventListener("focusin", f), document.addEventListener("focusout", v); - const y = new MutationObserver(s); + const y = new MutationObserver(u); p && y.observe(p, { childList: !0, subtree: !0 }), d(() => { document.removeEventListener("focusin", f), document.removeEventListener("focusout", v), y.disconnect(); }); @@ -2746,34 +2760,34 @@ const $l = /* @__PURE__ */ B({ const p = a.value; if (await de(), !p) return; - l.add(u); + l.add(s); const f = document.activeElement; if (!p.contains(f)) { - const v = new CustomEvent(Ot, Mr); - p.addEventListener(Ot, (s) => n("mountAutoFocus", s)), p.dispatchEvent(v), v.defaultPrevented || (xl(Cl(bn(p)), { + const v = new CustomEvent(Et, Mr); + p.addEventListener(Et, (u) => n("mountAutoFocus", u)), p.dispatchEvent(v), v.defaultPrevented || (xl(Cl(wn(p)), { select: !0 }), document.activeElement === f && Z(p)); } d(() => { - p.removeEventListener(Ot, (y) => n("mountAutoFocus", y)); - const v = new CustomEvent(Et, Mr), s = (y) => { + p.removeEventListener(Et, (y) => n("mountAutoFocus", y)); + const v = new CustomEvent(Ot, Mr), u = (y) => { n("unmountAutoFocus", y); }; - p.addEventListener(Et, s), p.dispatchEvent(v), setTimeout(() => { - v.defaultPrevented || Z(f ?? document.body, { select: !0 }), p.removeEventListener(Et, s), l.remove(u); + p.addEventListener(Ot, u), p.dispatchEvent(v), setTimeout(() => { + v.defaultPrevented || Z(f ?? document.body, { select: !0 }), p.removeEventListener(Ot, u), l.remove(s); }, 0); }); }); function c(d) { - if (!r.loop && !r.trapped || u.paused) + if (!r.loop && !r.trapped || s.paused) return; const p = d.key === "Tab" && !d.altKey && !d.ctrlKey && !d.metaKey, f = document.activeElement; if (p && f) { - const v = d.currentTarget, [s, y] = Sl(v); - s && y ? !d.shiftKey && f === y ? (d.preventDefault(), r.loop && Z(s, { select: !0 })) : d.shiftKey && f === s && (d.preventDefault(), r.loop && Z(y, { select: !0 })) : f === v && d.preventDefault(); + const v = d.currentTarget, [u, y] = Sl(v); + u && y ? !d.shiftKey && f === y ? (d.preventDefault(), r.loop && Z(u, { select: !0 })) : d.shiftKey && f === u && (d.preventDefault(), r.loop && Z(y, { select: !0 })) : f === v && d.preventDefault(); } } - return (d, p) => (O(), I(g(Me), { + return (d, p) => (E(), I(g(Me), { ref_key: "currentRef", ref: o, tabindex: "-1", @@ -2781,7 +2795,7 @@ const $l = /* @__PURE__ */ B({ as: d.as, onKeydown: c }, { - default: E(() => [ + default: O(() => [ F(d.$slots, "default") ]), _: 3 @@ -2806,13 +2820,13 @@ If you want to hide the \`${t}\`, you can wrap it with our VisuallyHidden compon For more information, see https://www.radix-vue.com/components/${r}`, l = `Warning: Missing \`Description\` or \`aria-describedby="undefined"\` for ${e}.`; at(() => { - var u; + var s; document.getElementById(n) || console.warn(i); - const c = (u = a.value) == null ? void 0 : u.getAttribute("aria-describedby"); + const c = (s = a.value) == null ? void 0 : s.getAttribute("aria-describedby"); o && c && (document.getElementById(o) || console.warn(l)); }); } -const wn = /* @__PURE__ */ B({ +const xn = /* @__PURE__ */ B({ __name: "DialogContentImpl", props: { forceMount: { type: Boolean }, @@ -2833,14 +2847,14 @@ const wn = /* @__PURE__ */ B({ titleId: o.titleId, descriptionId: o.descriptionId, contentElement: i - }), (l, u) => (O(), I(g($l), { + }), (l, s) => (E(), I(g($l), { "as-child": "", loop: "", trapped: r.trapFocus, - onMountAutoFocus: u[5] || (u[5] = (c) => n("openAutoFocus", c)), - onUnmountAutoFocus: u[6] || (u[6] = (c) => n("closeAutoFocus", c)) + onMountAutoFocus: s[5] || (s[5] = (c) => n("openAutoFocus", c)), + onUnmountAutoFocus: s[6] || (s[6] = (c) => n("closeAutoFocus", c)) }, { - default: E(() => [ + default: O(() => [ _(g(wl), q({ id: g(o).contentId, ref: g(a), @@ -2852,13 +2866,13 @@ const wn = /* @__PURE__ */ B({ "aria-labelledby": g(o).titleId, "data-state": g(Il)(g(o).open.value) }, l.$attrs, { - onDismiss: u[0] || (u[0] = (c) => g(o).onOpenChange(!1)), - onEscapeKeyDown: u[1] || (u[1] = (c) => n("escapeKeyDown", c)), - onFocusOutside: u[2] || (u[2] = (c) => n("focusOutside", c)), - onInteractOutside: u[3] || (u[3] = (c) => n("interactOutside", c)), - onPointerDownOutside: u[4] || (u[4] = (c) => n("pointerDownOutside", c)) + onDismiss: s[0] || (s[0] = (c) => g(o).onOpenChange(!1)), + onEscapeKeyDown: s[1] || (s[1] = (c) => n("escapeKeyDown", c)), + onFocusOutside: s[2] || (s[2] = (c) => n("focusOutside", c)), + onInteractOutside: s[3] || (s[3] = (c) => n("interactOutside", c)), + onPointerDownOutside: s[4] || (s[4] = (c) => n("pointerDownOutside", c)) }), { - default: E(() => [ + default: O(() => [ F(l.$slots, "default") ]), _: 3 @@ -2879,7 +2893,7 @@ const wn = /* @__PURE__ */ B({ emits: ["escapeKeyDown", "pointerDownOutside", "focusOutside", "interactOutside", "openAutoFocus", "closeAutoFocus"], setup(t, { emit: e }) { const r = t, n = e, o = ae(), a = Zt(n), { forwardRef: i, currentElement: l } = K(); - return sl(l), (u, c) => (O(), I(wn, q({ ...r, ...g(a) }, { + return sl(l), (s, c) => (E(), I(xn, q({ ...r, ...g(a) }, { ref: g(i), "trap-focus": g(o).open.value, "disable-outside-pointer-events": !0, @@ -2895,8 +2909,8 @@ const wn = /* @__PURE__ */ B({ d.preventDefault(); }) }), { - default: E(() => [ - F(u.$slots, "default") + default: O(() => [ + F(s.$slots, "default") ]), _: 3 }, 16, ["trap-focus"])); @@ -2915,27 +2929,27 @@ const wn = /* @__PURE__ */ B({ const r = t, n = Zt(e); K(); const o = ae(), a = S(!1), i = S(!1); - return (l, u) => (O(), I(wn, q({ ...r, ...g(n) }, { + return (l, s) => (E(), I(xn, q({ ...r, ...g(n) }, { "trap-focus": !1, "disable-outside-pointer-events": !1, - onCloseAutoFocus: u[0] || (u[0] = (c) => { + onCloseAutoFocus: s[0] || (s[0] = (c) => { var d; c.defaultPrevented || (a.value || (d = g(o).triggerElement.value) == null || d.focus(), c.preventDefault()), a.value = !1, i.value = !1; }), - onInteractOutside: u[1] || (u[1] = (c) => { + onInteractOutside: s[1] || (s[1] = (c) => { var d; c.defaultPrevented || (a.value = !0, c.detail.originalEvent.type === "pointerdown" && (i.value = !0)); const p = c.target; (d = g(o).triggerElement.value) != null && d.contains(p) && c.preventDefault(), c.detail.originalEvent.type === "focusin" && i.value && c.preventDefault(); }) }), { - default: E(() => [ + default: O(() => [ F(l.$slots, "default") ]), _: 3 }, 16)); } -}), xn = /* @__PURE__ */ B({ +}), Sn = /* @__PURE__ */ B({ __name: "DialogContent", props: { forceMount: { type: Boolean }, @@ -2947,23 +2961,23 @@ const wn = /* @__PURE__ */ B({ emits: ["escapeKeyDown", "pointerDownOutside", "focusOutside", "interactOutside", "openAutoFocus", "closeAutoFocus"], setup(t, { emit: e }) { const r = t, n = e, o = ae(), a = Zt(n), { forwardRef: i } = K(); - return (l, u) => (O(), I(g(gn), { + return (l, s) => (E(), I(g(hn), { present: l.forceMount || g(o).open.value }, { - default: E(() => [ - g(o).modal.value ? (O(), I(Nl, q({ + default: O(() => [ + g(o).modal.value ? (E(), I(Nl, q({ key: 0, ref: g(i) }, { ...r, ...g(a), ...l.$attrs }), { - default: E(() => [ + default: O(() => [ F(l.$slots, "default") ]), _: 3 - }, 16)) : (O(), I(Bl, q({ + }, 16)) : (E(), I(Bl, q({ key: 1, ref: g(i) }, { ...r, ...g(a), ...l.$attrs }), { - default: E(() => [ + default: O(() => [ F(l.$slots, "default") ]), _: 3 @@ -2980,13 +2994,13 @@ const wn = /* @__PURE__ */ B({ }, setup(t) { const e = ae(); - return nl(!0), K(), (r, n) => (O(), I(g(Me), { + return nl(!0), K(), (r, n) => (E(), I(g(Me), { as: r.as, "as-child": r.asChild, "data-state": g(e).open.value ? "open" : "closed", style: { "pointer-events": "auto" } }, { - default: E(() => [ + default: O(() => [ F(r.$slots, "default") ]), _: 3 @@ -3003,17 +3017,17 @@ const wn = /* @__PURE__ */ B({ const e = ae(), { forwardRef: r } = K(); return (n, o) => { var a; - return (a = g(e)) != null && a.modal.value ? (O(), I(g(gn), { + return (a = g(e)) != null && a.modal.value ? (E(), I(g(hn), { key: 0, present: n.forceMount || g(e).open.value }, { - default: E(() => [ + default: O(() => [ _(Tl, q(n.$attrs, { ref: g(r), as: n.as, "as-child": n.asChild }), { - default: E(() => [ + default: O(() => [ F(n.$slots, "default") ]), _: 3 @@ -3033,17 +3047,17 @@ const wn = /* @__PURE__ */ B({ const e = t; K(); const r = ae(); - return (n, o) => (O(), I(g(Me), q(e, { + return (n, o) => (E(), I(g(Me), q(e, { type: n.as === "button" ? "button" : void 0, onClick: o[0] || (o[0] = (a) => g(r).onOpenChange(!1)) }), { - default: E(() => [ + default: O(() => [ F(n.$slots, "default") ]), _: 3 }, 16, ["type"])); } -}), Sn = /* @__PURE__ */ B({ +}), En = /* @__PURE__ */ B({ __name: "DialogTitle", props: { asChild: { type: Boolean }, @@ -3051,10 +3065,10 @@ const wn = /* @__PURE__ */ B({ }, setup(t) { const e = t, r = ae(); - return K(), (n, o) => (O(), I(g(Me), q(e, { + return K(), (n, o) => (E(), I(g(Me), q(e, { id: g(r).titleId }), { - default: E(() => [ + default: O(() => [ F(n.$slots, "default") ]), _: 3 @@ -3067,7 +3081,7 @@ const wn = /* @__PURE__ */ B({ as: { default: "span" } }, setup(t) { - return K(), (e, r) => (O(), I(g(Me), { + return K(), (e, r) => (E(), I(g(Me), { as: e.as, "as-child": e.asChild, style: { @@ -3085,18 +3099,18 @@ const wn = /* @__PURE__ */ B({ wordWrap: "normal" } }, { - default: E(() => [ + default: O(() => [ F(e.$slots, "default") ]), _: 3 }, 8, ["as", "as-child"])); } -}), [En, ts] = Jt("CollectionProvider"); +}), [An, ts] = Jt("CollectionProvider"); B({ name: "CollectionSlot", setup(t, { slots: e }) { - const r = En(), { primitiveElement: n, currentElement: o } = mn(); - return j(o, () => { + const r = An(), { primitiveElement: n, currentElement: o } = gn(); + return U(o, () => { r.collectionRef.value = o.value; }), () => re(er, { ref: n }, e); } @@ -3111,7 +3125,7 @@ B({ } }, setup(t, { slots: e, attrs: r }) { - const n = En(), { primitiveElement: o, currentElement: a } = mn(); + const n = An(), { primitiveElement: o, currentElement: a } = gn(); return fe((i) => { if (a.value) { const l = Nr(a.value); @@ -3125,11 +3139,11 @@ function kl() { return matchMedia("(pointer:coarse)").matches ? "coarse" : "fine"; } kl(); -const An = { +const Pn = { __name: "CloseButton", setup(t) { - return (e, r) => (O(), I(g(_l), { class: "im-close-button text-gray-400 hover:text-gray-500" }, { - default: E(() => r[0] || (r[0] = [ + return (e, r) => (E(), I(g(_l), { class: "im-close-button text-gray-400 hover:text-gray-500" }, { + default: O(() => r[0] || (r[0] = [ ne("span", { class: "sr-only" }, "Close", -1), ne("svg", { class: "size-6", @@ -3160,7 +3174,7 @@ const An = { config: Object }, setup(t) { - return (e, r) => (O(), ce("div", Ll, [ + return (e, r) => (E(), ce("div", Ll, [ ne("div", { class: xe(["im-modal-positioner flex min-h-full justify-center", { "items-start": t.config.position === "top", @@ -3176,50 +3190,54 @@ const An = { "leave-to-class": "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95", onAfterLeave: t.modalContext.afterLeave }, { - default: E(() => { - var n; - return [ - _(g(xn), { - "aria-describedby": void 0, - "trap-focus": (n = t.config) == null ? void 0 : n.closeExplicitly, - class: xe({ - "im-modal-wrapper w-full transition duration-300 ease-in-out": !0, - "blur-sm": !t.modalContext.onTopOfStack, - "sm:max-w-sm": t.config.maxWidth == "sm", - "sm:max-w-md": t.config.maxWidth == "md", - "sm:max-w-md md:max-w-lg": t.config.maxWidth == "lg", - "sm:max-w-md md:max-w-xl": t.config.maxWidth == "xl", - "sm:max-w-md md:max-w-xl lg:max-w-2xl": t.config.maxWidth == "2xl", - "sm:max-w-md md:max-w-xl lg:max-w-3xl": t.config.maxWidth == "3xl", - "sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-4xl": t.config.maxWidth == "4xl", - "sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl": t.config.maxWidth == "5xl", - "sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-6xl": t.config.maxWidth == "6xl", - "sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-7xl": t.config.maxWidth == "7xl" - }) - }, { - default: E(() => [ - _(g(On), { "as-child": "" }, { - default: E(() => [ - _(g(Sn)) - ]), - _: 1 - }), - ne("div", { - class: xe(["im-modal-content relative", [t.config.paddingClasses, t.config.panelClasses]]) - }, [ - t.config.closeButton ? (O(), ce("div", Wl, [ - _(An) - ])) : H("", !0), - F(e.$slots, "default", { - modalContext: t.modalContext, - config: t.config - }) - ], 2) - ]), - _: 3 - }, 8, ["trap-focus", "class"]) - ]; - }), + default: O(() => [ + _(g(Sn), { + "aria-describedby": void 0, + class: xe({ + "im-modal-wrapper w-full transition duration-300 ease-in-out": !0, + "blur-sm": !t.modalContext.onTopOfStack, + "sm:max-w-sm": t.config.maxWidth == "sm", + "sm:max-w-md": t.config.maxWidth == "md", + "sm:max-w-md md:max-w-lg": t.config.maxWidth == "lg", + "sm:max-w-md md:max-w-xl": t.config.maxWidth == "xl", + "sm:max-w-md md:max-w-xl lg:max-w-2xl": t.config.maxWidth == "2xl", + "sm:max-w-md md:max-w-xl lg:max-w-3xl": t.config.maxWidth == "3xl", + "sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-4xl": t.config.maxWidth == "4xl", + "sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl": t.config.maxWidth == "5xl", + "sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-6xl": t.config.maxWidth == "6xl", + "sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-7xl": t.config.maxWidth == "7xl" + }), + onEscapeKeyDown: r[0] || (r[0] = (n) => { + var o; + return ((o = t.config) == null ? void 0 : o.closeExplicitly) && n.preventDefault(); + }), + onInteractOutside: r[1] || (r[1] = (n) => { + var o; + return ((o = t.config) == null ? void 0 : o.closeExplicitly) && n.preventDefault(); + }) + }, { + default: O(() => [ + _(g(On), { "as-child": "" }, { + default: O(() => [ + _(g(En)) + ]), + _: 1 + }), + ne("div", { + class: xe(["im-modal-content relative", [t.config.paddingClasses, t.config.panelClasses]]) + }, [ + t.config.closeButton ? (E(), ce("div", Wl, [ + _(Pn) + ])) : H("", !0), + F(e.$slots, "default", { + modalContext: t.modalContext, + config: t.config + }) + ], 2) + ]), + _: 3 + }, 8, ["class"]) + ]), _: 3 }, 8, ["onAfterLeave"]) ], 2) @@ -3235,7 +3253,7 @@ const An = { config: Object }, setup(t) { - return (e, r) => (O(), ce("div", jl, [ + return (e, r) => (E(), ce("div", jl, [ ne("div", { class: xe(["im-slideover-positioner flex min-h-full items-center", { "justify-start rtl:justify-end": t.config.position === "left", @@ -3250,50 +3268,54 @@ const An = { "leave-to-class": "opacity-0 " + (t.config.position === "left" ? "-translate-x-full" : "translate-x-full"), onAfterLeave: t.modalContext.afterLeave }, { - default: E(() => { - var n; - return [ - _(g(xn), { - "aria-describedby": void 0, - "trap-focus": (n = t.config) == null ? void 0 : n.closeExplicitly, - class: xe({ - "im-slideover-wrapper w-full transition duration-300 ease-in-out": !0, - "blur-sm": !t.modalContext.onTopOfStack, - "sm:max-w-sm": t.config.maxWidth == "sm", - "sm:max-w-md": t.config.maxWidth == "md", - "sm:max-w-md md:max-w-lg": t.config.maxWidth == "lg", - "sm:max-w-md md:max-w-xl": t.config.maxWidth == "xl", - "sm:max-w-md md:max-w-xl lg:max-w-2xl": t.config.maxWidth == "2xl", - "sm:max-w-md md:max-w-xl lg:max-w-3xl": t.config.maxWidth == "3xl", - "sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-4xl": t.config.maxWidth == "4xl", - "sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl": t.config.maxWidth == "5xl", - "sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-6xl": t.config.maxWidth == "6xl", - "sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-7xl": t.config.maxWidth == "7xl" - }) - }, { - default: E(() => [ - _(g(On), { "as-child": "" }, { - default: E(() => [ - _(g(Sn)) - ]), - _: 1 - }), - ne("div", { - class: xe(["im-slideover-content relative", [t.config.paddingClasses, t.config.panelClasses]]) - }, [ - t.config.closeButton ? (O(), ce("div", ql, [ - _(An) - ])) : H("", !0), - F(e.$slots, "default", { - modalContext: t.modalContext, - config: t.config - }) - ], 2) - ]), - _: 3 - }, 8, ["trap-focus", "class"]) - ]; - }), + default: O(() => [ + _(g(Sn), { + "aria-describedby": void 0, + class: xe({ + "im-slideover-wrapper w-full transition duration-300 ease-in-out": !0, + "blur-sm": !t.modalContext.onTopOfStack, + "sm:max-w-sm": t.config.maxWidth == "sm", + "sm:max-w-md": t.config.maxWidth == "md", + "sm:max-w-md md:max-w-lg": t.config.maxWidth == "lg", + "sm:max-w-md md:max-w-xl": t.config.maxWidth == "xl", + "sm:max-w-md md:max-w-xl lg:max-w-2xl": t.config.maxWidth == "2xl", + "sm:max-w-md md:max-w-xl lg:max-w-3xl": t.config.maxWidth == "3xl", + "sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-4xl": t.config.maxWidth == "4xl", + "sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl": t.config.maxWidth == "5xl", + "sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-6xl": t.config.maxWidth == "6xl", + "sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-7xl": t.config.maxWidth == "7xl" + }), + onEscapeKeyDown: r[0] || (r[0] = (n) => { + var o; + return ((o = t.config) == null ? void 0 : o.closeExplicitly) && n.preventDefault(); + }), + onInteractOutside: r[1] || (r[1] = (n) => { + var o; + return ((o = t.config) == null ? void 0 : o.closeExplicitly) && n.preventDefault(); + }) + }, { + default: O(() => [ + _(g(On), { "as-child": "" }, { + default: O(() => [ + _(g(En)) + ]), + _: 1 + }), + ne("div", { + class: xe(["im-slideover-content relative", [t.config.paddingClasses, t.config.panelClasses]]) + }, [ + t.config.closeButton ? (E(), ce("div", ql, [ + _(Pn) + ])) : H("", !0), + F(e.$slots, "default", { + modalContext: t.modalContext, + config: t.config + }) + ], 2) + ]), + _: 3 + }, 8, ["class"]) + ]), _: 3 }, 8, ["enter-from-class", "leave-to-class", "onAfterLeave"]) ], 2) @@ -3363,20 +3385,20 @@ const An = { var o; return (o = r.value) == null ? void 0 : o.shouldRender; }) - }), (o, a) => (O(), I(_i, { + }), (o, a) => (E(), I(_i, { ref_key: "modal", ref: r }, { - default: E(({ + default: O(({ afterLeave: i, close: l, - config: u, + config: s, emit: c, getChildModal: d, getParentModal: p, id: f, index: v, - isOpen: s, + isOpen: u, modalContext: y, onTopOfStack: m, reload: b, @@ -3384,18 +3406,18 @@ const An = { shouldRender: h }) => [ _(g(pl), { - open: s, + open: u, "onUpdate:open": A }, { - default: E(() => [ + default: O(() => [ _(g(vl), null, { - default: E(() => [ + default: O(() => [ ne("div", { "data-inertiaui-modal-id": f, "data-inertiaui-modal-index": v, class: "im-dialog relative z-20" }, [ - v === 0 && m ? (O(), I(kt, { + v === 0 && m ? (E(), I(kt, { key: 0, appear: !n.value, "enter-active-class": "transition transform ease-in-out duration-300", @@ -3406,27 +3428,27 @@ const An = { "leave-to-class": "opacity-0", onAfterAppear: a[0] || (a[0] = (x) => n.value = !0) }, { - default: E(() => [ + default: O(() => [ _(g(Rl), { class: "im-backdrop fixed inset-0 z-30 bg-black/75" }) ]), _: 1 }, 8, ["appear"])) : H("", !0), - v > 0 && m ? (O(), ce("div", Gl)) : H("", !0), - (O(), I(kr(u != null && u.slideover ? Kl : Ul), { + v > 0 && m ? (E(), ce("div", Gl)) : H("", !0), + (E(), I(kr(s != null && s.slideover ? Kl : Ul), { "modal-context": y, - config: u + config: s }, { - default: E(() => [ + default: O(() => [ F(o.$slots, "default", { id: f, afterLeave: i, close: l, - config: u, + config: s, emit: c, getChildModal: d, getParentModal: p, index: v, - isOpen: s, + isOpen: u, modalContext: y, onTopOfStack: m, reload: b, @@ -3519,8 +3541,8 @@ const An = { setup(t, { emit: e }) { const r = t, n = S(!1), o = Ue(), a = S(null); Tt("modalContext", a); - const i = e, l = S(!1), u = $(() => r.navigate ?? Lt("navigate")); - j( + const i = e, l = S(!1), s = $(() => r.navigate ?? Lt("navigate")); + U( () => { var y; return (y = a.value) == null ? void 0 : y.onTopOfStack; @@ -3538,7 +3560,7 @@ const An = { function p() { c.value = a.value.registerEventListenersFromAttrs(d); } - j(a, (y, m) => { + U(a, (y, m) => { y && !m && (p(), i("success")); }); function f() { @@ -3547,26 +3569,26 @@ const An = { function v() { a.value = null, i("after-leave"); } - function s() { + function u() { n.value || (r.href.startsWith("#") || (n.value = !0, i("start")), o.visit( r.href, r.method, r.data, r.headers, - Gn(Lr(r, Ri)), + Gn(Wr(r, Ri)), f, v, r.queryStringArrayFormat, - u.value + s.value ).then((y) => { a.value = y; }).catch((y) => i("error", y)).finally(() => n.value = !1)); } - return (y, m) => (O(), I(kr(t.as), q(g(d), { + return (y, m) => (E(), I(kr(t.as), q(g(d), { href: t.href, - onClick: Un(s, ["prevent"]) + onClick: jn(u, ["prevent"]) }), { - default: E(() => [ + default: O(() => [ F(y.$slots, "default", { loading: n.value }) ]), _: 3 @@ -3574,7 +3596,7 @@ const An = { } }; function os() { - return jn(_t("modalContext", null)); + return qn(_t("modalContext", null)); } function as(t, e = {}) { return Ue().visit( diff --git a/vue/dist/inertiaui-modal.umd.cjs b/vue/dist/inertiaui-modal.umd.cjs index 44cef4c..f1e5dd5 100644 --- a/vue/dist/inertiaui-modal.umd.cjs +++ b/vue/dist/inertiaui-modal.umd.cjs @@ -1,11 +1,11 @@ -(function(E,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("vue"),require("@inertiajs/vue3"),require("axios")):typeof define=="function"&&define.amd?define(["exports","vue","@inertiajs/vue3","axios"],a):(E=typeof globalThis<"u"?globalThis:E||self,a(E.InertiaUIModal={},E.Mo,E.vue3,E.Axios))})(this,function(E,a,F,Ce){"use strict";var il=Object.defineProperty;var ll=(E,a,F)=>a in E?il(E,a,{enumerable:!0,configurable:!0,writable:!0,value:F}):E[a]=F;var k=(E,a,F)=>ll(E,typeof a!="symbol"?a+"":a,F);function Yr(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const Nt=Yr(a),ye={type:"modal",navigate:!1,modal:{closeButton:!0,closeExplicitly:!1,maxWidth:"2xl",paddingClasses:"p-4 sm:p-6",panelClasses:"bg-white rounded",position:"center"},slideover:{closeButton:!0,closeExplicitly:!1,maxWidth:"md",paddingClasses:"p-4 sm:p-6",panelClasses:"bg-white min-h-screen",position:"right"}};class Zr{constructor(){this.config={},this.reset()}reset(){this.config=JSON.parse(JSON.stringify(ye))}put(e,r){if(typeof e=="object"){this.config={type:e.type??ye.type,navigate:e.navigate??ye.navigate,modal:{...ye.modal,...e.modal??{}},slideover:{...ye.slideover,...e.slideover??{}}};return}const n=e.split(".");let o=this.config;for(let i=0;i"u")return this.config;const r=e.split(".");let n=this.config;for(const o of r){if(n[o]===void 0)return null;n=n[o]}return n}}const Ae=new Zr,Mr=()=>Ae.reset(),en=(t,e)=>Ae.put(t,e),Pe=t=>Ae.get(t),ee=(t,e)=>Ae.get(t?`slideover.${e}`:`modal.${e}`);function tn(t,e){return Array.isArray(t)?t.filter(r=>!e.includes(r)):Object.keys(t).reduce((r,n)=>(e.includes(n)||(r[n]=t[n]),r),{})}function kt(t,e){return Array.isArray(t)?t.filter(r=>e.includes(r)):e.reduce((r,n)=>(n in t&&(r[n]=t[n]),r),{})}function rn(t){return Array.isArray(t)?t.filter(e=>e!==null):Object.keys(t).reduce((e,r)=>(r in t&&t[r]!==null&&(e[r]=t[r]),e),{})}function nn(t,e=3,r=10){return new Promise((n,o)=>{const i=t();if(i){n(i);return}let l=e*1e3/r;const u=setInterval(()=>{const c=t();c&&(clearInterval(u),n(c)),--l<=0&&(clearInterval(u),o(new Error("Condition not met in time")))},r)})}var Ve=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function an(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function on(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:function(){return t[n]}})}),r}var ln=function(e){return un(e)&&!sn(e)};function un(t){return!!t&&typeof t=="object"}function sn(t){var e=Object.prototype.toString.call(t);return e==="[object RegExp]"||e==="[object Date]"||dn(t)}var cn=typeof Symbol=="function"&&Symbol.for,fn=cn?Symbol.for("react.element"):60103;function dn(t){return t.$$typeof===fn}function pn(t){return Array.isArray(t)?[]:{}}function me(t,e){return e.clone!==!1&&e.isMergeableObject(t)?te(pn(t),t,e):t}function yn(t,e,r){return t.concat(e).map(function(n){return me(n,r)})}function mn(t,e){if(!e.customMerge)return te;var r=e.customMerge(t);return typeof r=="function"?r:te}function vn(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[]}function Dt(t){return Object.keys(t).concat(vn(t))}function Ft(t,e){try{return e in t}catch{return!1}}function hn(t,e){return Ft(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))}function gn(t,e,r){var n={};return r.isMergeableObject(t)&&Dt(t).forEach(function(o){n[o]=me(t[o],r)}),Dt(e).forEach(function(o){hn(t,o)||(Ft(t,o)&&r.isMergeableObject(e[o])?n[o]=mn(o,r)(t[o],e[o],r):n[o]=me(e[o],r))}),n}function te(t,e,r){r=r||{},r.arrayMerge=r.arrayMerge||yn,r.isMergeableObject=r.isMergeableObject||ln,r.cloneUnlessOtherwiseSpecified=me;var n=Array.isArray(e),o=Array.isArray(t),i=n===o;return i?n?r.arrayMerge(t,e,r):gn(t,e,r):me(e,r)}te.all=function(e,r){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(n,o){return te(n,o,r)},{})};var bn=te,wn=bn;const xn=an(wn);var Sn=Error,En=EvalError,On=RangeError,Cn=ReferenceError,Tt=SyntaxError,ve=TypeError,An=URIError,Pn=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var o=42;e[r]=o;for(r in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var i=Object.getOwnPropertySymbols(e);if(i.length!==1||i[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(e,r);if(l.value!==o||l.enumerable!==!0)return!1}return!0},Rt=typeof Symbol<"u"&&Symbol,Bn=Pn,In=function(){return typeof Rt!="function"||typeof Symbol!="function"||typeof Rt("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Bn()},qe={__proto__:null,foo:{}},$n=Object,Nn=function(){return{__proto__:qe}.foo===qe.foo&&!(qe instanceof $n)},kn="Function.prototype.bind called on incompatible ",Dn=Object.prototype.toString,Fn=Math.max,Tn="[object Function]",_t=function(e,r){for(var n=[],o=0;o"u"||!I?w:I(Uint8Array),X={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?w:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?w:ArrayBuffer,"%ArrayIteratorPrototype%":ae&&I?I([][Symbol.iterator]()):w,"%AsyncFromSyncIteratorPrototype%":w,"%AsyncFunction%":oe,"%AsyncGenerator%":oe,"%AsyncGeneratorFunction%":oe,"%AsyncIteratorPrototype%":oe,"%Atomics%":typeof Atomics>"u"?w:Atomics,"%BigInt%":typeof BigInt>"u"?w:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?w:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?w:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?w:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":zn,"%eval%":eval,"%EvalError%":Kn,"%Float32Array%":typeof Float32Array>"u"?w:Float32Array,"%Float64Array%":typeof Float64Array>"u"?w:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?w:FinalizationRegistry,"%Function%":Lt,"%GeneratorFunction%":oe,"%Int8Array%":typeof Int8Array>"u"?w:Int8Array,"%Int16Array%":typeof Int16Array>"u"?w:Int16Array,"%Int32Array%":typeof Int32Array>"u"?w:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ae&&I?I(I([][Symbol.iterator]())):w,"%JSON%":typeof JSON=="object"?JSON:w,"%Map%":typeof Map>"u"?w:Map,"%MapIteratorPrototype%":typeof Map>"u"||!ae||!I?w:I(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?w:Promise,"%Proxy%":typeof Proxy>"u"?w:Proxy,"%RangeError%":Gn,"%ReferenceError%":Hn,"%Reflect%":typeof Reflect>"u"?w:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?w:Set,"%SetIteratorPrototype%":typeof Set>"u"||!ae||!I?w:I(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?w:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ae&&I?I(""[Symbol.iterator]()):w,"%Symbol%":ae?Symbol:w,"%SyntaxError%":re,"%ThrowTypeError%":Jn,"%TypedArray%":Yn,"%TypeError%":ne,"%Uint8Array%":typeof Uint8Array>"u"?w:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?w:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?w:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?w:Uint32Array,"%URIError%":Qn,"%WeakMap%":typeof WeakMap>"u"?w:WeakMap,"%WeakRef%":typeof WeakRef>"u"?w:WeakRef,"%WeakSet%":typeof WeakSet>"u"?w:WeakSet};if(I)try{null.error}catch(t){var Zn=I(I(t));X["%Error.prototype%"]=Zn}var Mn=function t(e){var r;if(e==="%AsyncFunction%")r=Ke("async function () {}");else if(e==="%GeneratorFunction%")r=Ke("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=Ke("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var o=t("%AsyncGenerator%");o&&I&&(r=I(o.prototype))}return X[e]=r,r},Wt={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},he=ze,Be=qn,ea=he.call(Function.call,Array.prototype.concat),ta=he.call(Function.apply,Array.prototype.splice),Ut=he.call(Function.call,String.prototype.replace),Ie=he.call(Function.call,String.prototype.slice),ra=he.call(Function.call,RegExp.prototype.exec),na=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,aa=/\\(\\)?/g,oa=function(e){var r=Ie(e,0,1),n=Ie(e,-1);if(r==="%"&&n!=="%")throw new re("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new re("invalid intrinsic syntax, expected opening `%`");var o=[];return Ut(e,na,function(i,l,u,c){o[o.length]=u?Ut(c,aa,"$1"):l||i}),o},ia=function(e,r){var n=e,o;if(Be(Wt,n)&&(o=Wt[n],n="%"+o[0]+"%"),Be(X,n)){var i=X[n];if(i===oe&&(i=Mn(n)),typeof i>"u"&&!r)throw new ne("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:i}}throw new re("intrinsic "+e+" does not exist!")},ie=function(e,r){if(typeof e!="string"||e.length===0)throw new ne("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new ne('"allowMissing" argument must be a boolean');if(ra(/^%?[^%]*%?$/,e)===null)throw new re("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=oa(e),o=n.length>0?n[0]:"",i=ia("%"+o+"%",r),l=i.name,u=i.value,c=!1,f=i.alias;f&&(o=f[0],ta(n,ea([0,1],f)));for(var p=1,y=!0;p=n.length){var m=J(u,d);y=!!m,y&&"get"in m&&!("originalValue"in m.get)?u=m.get:u=u[d]}else y=Be(u,d),u=u[d];y&&!c&&(X[l]=u)}}return u},jt={exports:{}},He,Vt;function Qe(){if(Vt)return He;Vt=1;var t=ie,e=t("%Object.defineProperty%",!0)||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return He=e,He}var la=ie,$e=la("%Object.getOwnPropertyDescriptor%",!0);if($e)try{$e([],"length")}catch{$e=null}var qt=$e,zt=Qe(),ua=Tt,le=ve,Kt=qt,sa=function(e,r,n){if(!e||typeof e!="object"&&typeof e!="function")throw new le("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new le("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new le("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new le("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new le("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new le("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,l=arguments.length>5?arguments[5]:null,u=arguments.length>6?arguments[6]:!1,c=!!Kt&&Kt(e,r);if(zt)zt(e,r,{configurable:l===null&&c?c.configurable:!l,enumerable:o===null&&c?c.enumerable:!o,value:n,writable:i===null&&c?c.writable:!i});else if(u||!o&&!i&&!l)e[r]=n;else throw new ua("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Je=Qe(),Gt=function(){return!!Je};Gt.hasArrayLengthDefineBug=function(){if(!Je)return null;try{return Je([],"length",{value:1}).length!==1}catch{return!0}};var ca=Gt,fa=ie,Ht=sa,da=ca(),Qt=qt,Jt=ve,pa=fa("%Math.floor%"),ya=function(e,r){if(typeof e!="function")throw new Jt("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||pa(r)!==r)throw new Jt("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],o=!0,i=!0;if("length"in e&&Qt){var l=Qt(e,"length");l&&!l.configurable&&(o=!1),l&&!l.writable&&(i=!1)}return(o||i||!n)&&(da?Ht(e,"length",r,!0,!0):Ht(e,"length",r)),e};(function(t){var e=ze,r=ie,n=ya,o=ve,i=r("%Function.prototype.apply%"),l=r("%Function.prototype.call%"),u=r("%Reflect.apply%",!0)||e.call(l,i),c=Qe(),f=r("%Math.max%");t.exports=function(d){if(typeof d!="function")throw new o("a function is required");var v=u(e,l,arguments);return n(v,1+f(0,d.length-(arguments.length-1)),!0)};var p=function(){return u(e,i,arguments)};c?c(t.exports,"apply",{value:p}):t.exports.apply=p})(jt);var ma=jt.exports,Xt=ie,Yt=ma,va=Yt(Xt("String.prototype.indexOf")),ha=function(e,r){var n=Xt(e,!!r);return typeof n=="function"&&va(e,".prototype.")>-1?Yt(n):n};const ga=on(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Xe=typeof Map=="function"&&Map.prototype,Ye=Object.getOwnPropertyDescriptor&&Xe?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Ne=Xe&&Ye&&typeof Ye.get=="function"?Ye.get:null,Zt=Xe&&Map.prototype.forEach,Ze=typeof Set=="function"&&Set.prototype,Me=Object.getOwnPropertyDescriptor&&Ze?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,ke=Ze&&Me&&typeof Me.get=="function"?Me.get:null,Mt=Ze&&Set.prototype.forEach,ba=typeof WeakMap=="function"&&WeakMap.prototype,ge=ba?WeakMap.prototype.has:null,wa=typeof WeakSet=="function"&&WeakSet.prototype,be=wa?WeakSet.prototype.has:null,xa=typeof WeakRef=="function"&&WeakRef.prototype,er=xa?WeakRef.prototype.deref:null,Sa=Boolean.prototype.valueOf,Ea=Object.prototype.toString,Oa=Function.prototype.toString,Ca=String.prototype.match,et=String.prototype.slice,j=String.prototype.replace,Aa=String.prototype.toUpperCase,tr=String.prototype.toLowerCase,rr=RegExp.prototype.test,nr=Array.prototype.concat,_=Array.prototype.join,Pa=Array.prototype.slice,ar=Math.floor,tt=typeof BigInt=="function"?BigInt.prototype.valueOf:null,rt=Object.getOwnPropertySymbols,nt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,ue=typeof Symbol=="function"&&typeof Symbol.iterator=="object",$=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===ue||!0)?Symbol.toStringTag:null,or=Object.prototype.propertyIsEnumerable,ir=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function lr(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||rr.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var n=t<0?-ar(-t):ar(t);if(n!==t){var o=String(n),i=et.call(e,o.length+1);return j.call(o,r,"$&_")+"."+j.call(j.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return j.call(e,r,"$&_")}var at=ga,ur=at.custom,sr=dr(ur)?ur:null,Ba=function t(e,r,n,o){var i=r||{};if(V(i,"quoteStyle")&&i.quoteStyle!=="single"&&i.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(V(i,"maxStringLength")&&(typeof i.maxStringLength=="number"?i.maxStringLength<0&&i.maxStringLength!==1/0:i.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var l=V(i,"customInspect")?i.customInspect:!0;if(typeof l!="boolean"&&l!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(V(i,"indent")&&i.indent!==null&&i.indent!==" "&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(V(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var u=i.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return yr(e,i);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var c=String(e);return u?lr(e,c):c}if(typeof e=="bigint"){var f=String(e)+"n";return u?lr(e,f):f}var p=typeof i.depth>"u"?5:i.depth;if(typeof n>"u"&&(n=0),n>=p&&p>0&&typeof e=="object")return ot(e)?"[Array]":"[Object]";var y=Ga(i,n);if(typeof o>"u")o=[];else if(pr(o,e)>=0)return"[Circular]";function d(R,H,Q){if(H&&(o=Pa.call(o),o.push(H)),Q){var Oe={depth:i.depth};return V(i,"quoteStyle")&&(Oe.quoteStyle=i.quoteStyle),t(R,Oe,n+1,o)}return t(R,i,n+1,o)}if(typeof e=="function"&&!fr(e)){var v=_a(e),s=De(e,d);return"[Function"+(v?": "+v:" (anonymous)")+"]"+(s.length>0?" { "+_.call(s,", ")+" }":"")}if(dr(e)){var m=ue?j.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):nt.call(e);return typeof e=="object"&&!ue?we(m):m}if(qa(e)){for(var h="<"+tr.call(String(e.nodeName)),b=e.attributes||[],S=0;S",h}if(ot(e)){if(e.length===0)return"[]";var g=De(e,d);return y&&!Ka(g)?"["+lt(g,y)+"]":"[ "+_.call(g,", ")+" ]"}if(Na(e)){var x=De(e,d);return!("cause"in Error.prototype)&&"cause"in e&&!or.call(e,"cause")?"{ ["+String(e)+"] "+_.call(nr.call("[cause]: "+d(e.cause),x),", ")+" }":x.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+_.call(x,", ")+" }"}if(typeof e=="object"&&l){if(sr&&typeof e[sr]=="function"&&at)return at(e,{depth:p-n});if(l!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(La(e)){var C=[];return Zt&&Zt.call(e,function(R,H){C.push(d(H,e,!0)+" => "+d(R,e))}),mr("Map",Ne.call(e),C,y)}if(ja(e)){var P=[];return Mt&&Mt.call(e,function(R){P.push(d(R,e))}),mr("Set",ke.call(e),P,y)}if(Wa(e))return it("WeakMap");if(Va(e))return it("WeakSet");if(Ua(e))return it("WeakRef");if(Da(e))return we(d(Number(e)));if(Ta(e))return we(d(tt.call(e)));if(Fa(e))return we(Sa.call(e));if(ka(e))return we(d(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(typeof globalThis<"u"&&e===globalThis||typeof Ve<"u"&&e===Ve)return"{ [object globalThis] }";if(!$a(e)&&!fr(e)){var N=De(e,d),D=ir?ir(e)===Object.prototype:e instanceof Object||e.constructor===Object,M=e instanceof Object?"":"null prototype",G=!D&&$&&Object(e)===e&&$ in e?et.call(q(e),8,-1):M?"Object":"",je=D||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",pe=je+(G||M?"["+_.call(nr.call([],G||[],M||[]),": ")+"] ":"");return N.length===0?pe+"{}":y?pe+"{"+lt(N,y)+"}":pe+"{ "+_.call(N,", ")+" }"}return String(e)};function cr(t,e,r){var n=(r.quoteStyle||e)==="double"?'"':"'";return n+t+n}function Ia(t){return j.call(String(t),/"/g,""")}function ot(t){return q(t)==="[object Array]"&&(!$||!(typeof t=="object"&&$ in t))}function $a(t){return q(t)==="[object Date]"&&(!$||!(typeof t=="object"&&$ in t))}function fr(t){return q(t)==="[object RegExp]"&&(!$||!(typeof t=="object"&&$ in t))}function Na(t){return q(t)==="[object Error]"&&(!$||!(typeof t=="object"&&$ in t))}function ka(t){return q(t)==="[object String]"&&(!$||!(typeof t=="object"&&$ in t))}function Da(t){return q(t)==="[object Number]"&&(!$||!(typeof t=="object"&&$ in t))}function Fa(t){return q(t)==="[object Boolean]"&&(!$||!(typeof t=="object"&&$ in t))}function dr(t){if(ue)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!nt)return!1;try{return nt.call(t),!0}catch{}return!1}function Ta(t){if(!t||typeof t!="object"||!tt)return!1;try{return tt.call(t),!0}catch{}return!1}var Ra=Object.prototype.hasOwnProperty||function(t){return t in this};function V(t,e){return Ra.call(t,e)}function q(t){return Ea.call(t)}function _a(t){if(t.name)return t.name;var e=Ca.call(Oa.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function pr(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;re.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return yr(et.call(t,0,e.maxStringLength),e)+n}var o=j.call(j.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,za);return cr(o,"single",e)}function za(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+Aa.call(e.toString(16))}function we(t){return"Object("+t+")"}function it(t){return t+" { ? }"}function mr(t,e,r,n){var o=n?lt(r,n):_.call(r,", ");return t+" ("+e+") {"+o+"}"}function Ka(t){for(var e=0;ea in E?il(E,a,{enumerable:!0,configurable:!0,writable:!0,value:k}):E[a]=k;var N=(E,a,k)=>ll(E,typeof a!="symbol"?a+"":a,k);function Yr(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const Nt=Yr(a),ye={type:"modal",navigate:!1,modal:{closeButton:!0,closeExplicitly:!1,maxWidth:"2xl",paddingClasses:"p-4 sm:p-6",panelClasses:"bg-white rounded",position:"center"},slideover:{closeButton:!0,closeExplicitly:!1,maxWidth:"md",paddingClasses:"p-4 sm:p-6",panelClasses:"bg-white min-h-screen",position:"right"}};class Zr{constructor(){this.config={},this.reset()}reset(){this.config=JSON.parse(JSON.stringify(ye))}put(e,r){if(typeof e=="object"){this.config={type:e.type??ye.type,navigate:e.navigate??ye.navigate,modal:{...ye.modal,...e.modal??{}},slideover:{...ye.slideover,...e.slideover??{}}};return}const n=e.split(".");let o=this.config;for(let i=0;i"u")return this.config;const r=e.split(".");let n=this.config;for(const o of r){if(n[o]===void 0)return null;n=n[o]}return n}}const Ae=new Zr,Mr=()=>Ae.reset(),en=(t,e)=>Ae.put(t,e),Pe=t=>Ae.get(t),ee=(t,e)=>Ae.get(t?`slideover.${e}`:`modal.${e}`);function tn(t,e){return Array.isArray(t)?t.filter(r=>!e.includes(r)):Object.keys(t).reduce((r,n)=>(e.includes(n)||(r[n]=t[n]),r),{})}function Dt(t,e){return Array.isArray(t)?t.filter(r=>e.includes(r)):e.reduce((r,n)=>(n in t&&(r[n]=t[n]),r),{})}function rn(t){return Array.isArray(t)?t.filter(e=>e!==null):Object.keys(t).reduce((e,r)=>(r in t&&t[r]!==null&&(e[r]=t[r]),e),{})}function nn(t,e=3,r=10){return new Promise((n,o)=>{const i=t();if(i){n(i);return}let l=e*1e3/r;const u=setInterval(()=>{const s=t();s&&(clearInterval(u),n(s)),--l<=0&&(clearInterval(u),o(new Error("Condition not met in time")))},r)})}var Ve=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function an(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function on(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:function(){return t[n]}})}),r}var ln=function(e){return un(e)&&!sn(e)};function un(t){return!!t&&typeof t=="object"}function sn(t){var e=Object.prototype.toString.call(t);return e==="[object RegExp]"||e==="[object Date]"||dn(t)}var cn=typeof Symbol=="function"&&Symbol.for,fn=cn?Symbol.for("react.element"):60103;function dn(t){return t.$$typeof===fn}function pn(t){return Array.isArray(t)?[]:{}}function me(t,e){return e.clone!==!1&&e.isMergeableObject(t)?te(pn(t),t,e):t}function yn(t,e,r){return t.concat(e).map(function(n){return me(n,r)})}function mn(t,e){if(!e.customMerge)return te;var r=e.customMerge(t);return typeof r=="function"?r:te}function vn(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[]}function kt(t){return Object.keys(t).concat(vn(t))}function Ft(t,e){try{return e in t}catch{return!1}}function gn(t,e){return Ft(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))}function hn(t,e,r){var n={};return r.isMergeableObject(t)&&kt(t).forEach(function(o){n[o]=me(t[o],r)}),kt(e).forEach(function(o){gn(t,o)||(Ft(t,o)&&r.isMergeableObject(e[o])?n[o]=mn(o,r)(t[o],e[o],r):n[o]=me(e[o],r))}),n}function te(t,e,r){r=r||{},r.arrayMerge=r.arrayMerge||yn,r.isMergeableObject=r.isMergeableObject||ln,r.cloneUnlessOtherwiseSpecified=me;var n=Array.isArray(e),o=Array.isArray(t),i=n===o;return i?n?r.arrayMerge(t,e,r):hn(t,e,r):me(e,r)}te.all=function(e,r){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(n,o){return te(n,o,r)},{})};var bn=te,wn=bn;const xn=an(wn);var Sn=Error,En=EvalError,On=RangeError,Cn=ReferenceError,Tt=SyntaxError,ve=TypeError,An=URIError,Pn=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var o=42;e[r]=o;for(r in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var i=Object.getOwnPropertySymbols(e);if(i.length!==1||i[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(e,r);if(l.value!==o||l.enumerable!==!0)return!1}return!0},Rt=typeof Symbol<"u"&&Symbol,Bn=Pn,In=function(){return typeof Rt!="function"||typeof Symbol!="function"||typeof Rt("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Bn()},qe={__proto__:null,foo:{}},$n=Object,Nn=function(){return{__proto__:qe}.foo===qe.foo&&!(qe instanceof $n)},Dn="Function.prototype.bind called on incompatible ",kn=Object.prototype.toString,Fn=Math.max,Tn="[object Function]",_t=function(e,r){for(var n=[],o=0;o"u"||!I?w:I(Uint8Array),X={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?w:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?w:ArrayBuffer,"%ArrayIteratorPrototype%":ae&&I?I([][Symbol.iterator]()):w,"%AsyncFromSyncIteratorPrototype%":w,"%AsyncFunction%":oe,"%AsyncGenerator%":oe,"%AsyncGeneratorFunction%":oe,"%AsyncIteratorPrototype%":oe,"%Atomics%":typeof Atomics>"u"?w:Atomics,"%BigInt%":typeof BigInt>"u"?w:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?w:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?w:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?w:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":zn,"%eval%":eval,"%EvalError%":Kn,"%Float32Array%":typeof Float32Array>"u"?w:Float32Array,"%Float64Array%":typeof Float64Array>"u"?w:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?w:FinalizationRegistry,"%Function%":Lt,"%GeneratorFunction%":oe,"%Int8Array%":typeof Int8Array>"u"?w:Int8Array,"%Int16Array%":typeof Int16Array>"u"?w:Int16Array,"%Int32Array%":typeof Int32Array>"u"?w:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ae&&I?I(I([][Symbol.iterator]())):w,"%JSON%":typeof JSON=="object"?JSON:w,"%Map%":typeof Map>"u"?w:Map,"%MapIteratorPrototype%":typeof Map>"u"||!ae||!I?w:I(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?w:Promise,"%Proxy%":typeof Proxy>"u"?w:Proxy,"%RangeError%":Gn,"%ReferenceError%":Hn,"%Reflect%":typeof Reflect>"u"?w:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?w:Set,"%SetIteratorPrototype%":typeof Set>"u"||!ae||!I?w:I(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?w:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ae&&I?I(""[Symbol.iterator]()):w,"%Symbol%":ae?Symbol:w,"%SyntaxError%":re,"%ThrowTypeError%":Jn,"%TypedArray%":Yn,"%TypeError%":ne,"%Uint8Array%":typeof Uint8Array>"u"?w:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?w:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?w:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?w:Uint32Array,"%URIError%":Qn,"%WeakMap%":typeof WeakMap>"u"?w:WeakMap,"%WeakRef%":typeof WeakRef>"u"?w:WeakRef,"%WeakSet%":typeof WeakSet>"u"?w:WeakSet};if(I)try{null.error}catch(t){var Zn=I(I(t));X["%Error.prototype%"]=Zn}var Mn=function t(e){var r;if(e==="%AsyncFunction%")r=Ke("async function () {}");else if(e==="%GeneratorFunction%")r=Ke("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=Ke("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var o=t("%AsyncGenerator%");o&&I&&(r=I(o.prototype))}return X[e]=r,r},Wt={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ge=ze,Be=qn,ea=ge.call(Function.call,Array.prototype.concat),ta=ge.call(Function.apply,Array.prototype.splice),Ut=ge.call(Function.call,String.prototype.replace),Ie=ge.call(Function.call,String.prototype.slice),ra=ge.call(Function.call,RegExp.prototype.exec),na=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,aa=/\\(\\)?/g,oa=function(e){var r=Ie(e,0,1),n=Ie(e,-1);if(r==="%"&&n!=="%")throw new re("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new re("invalid intrinsic syntax, expected opening `%`");var o=[];return Ut(e,na,function(i,l,u,s){o[o.length]=u?Ut(s,aa,"$1"):l||i}),o},ia=function(e,r){var n=e,o;if(Be(Wt,n)&&(o=Wt[n],n="%"+o[0]+"%"),Be(X,n)){var i=X[n];if(i===oe&&(i=Mn(n)),typeof i>"u"&&!r)throw new ne("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:i}}throw new re("intrinsic "+e+" does not exist!")},ie=function(e,r){if(typeof e!="string"||e.length===0)throw new ne("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new ne('"allowMissing" argument must be a boolean');if(ra(/^%?[^%]*%?$/,e)===null)throw new re("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=oa(e),o=n.length>0?n[0]:"",i=ia("%"+o+"%",r),l=i.name,u=i.value,s=!1,f=i.alias;f&&(o=f[0],ta(n,ea([0,1],f)));for(var p=1,y=!0;p=n.length){var m=J(u,d);y=!!m,y&&"get"in m&&!("originalValue"in m.get)?u=m.get:u=u[d]}else y=Be(u,d),u=u[d];y&&!s&&(X[l]=u)}}return u},jt={exports:{}},He,Vt;function Qe(){if(Vt)return He;Vt=1;var t=ie,e=t("%Object.defineProperty%",!0)||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return He=e,He}var la=ie,$e=la("%Object.getOwnPropertyDescriptor%",!0);if($e)try{$e([],"length")}catch{$e=null}var qt=$e,zt=Qe(),ua=Tt,le=ve,Kt=qt,sa=function(e,r,n){if(!e||typeof e!="object"&&typeof e!="function")throw new le("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new le("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new le("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new le("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new le("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new le("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,l=arguments.length>5?arguments[5]:null,u=arguments.length>6?arguments[6]:!1,s=!!Kt&&Kt(e,r);if(zt)zt(e,r,{configurable:l===null&&s?s.configurable:!l,enumerable:o===null&&s?s.enumerable:!o,value:n,writable:i===null&&s?s.writable:!i});else if(u||!o&&!i&&!l)e[r]=n;else throw new ua("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Je=Qe(),Gt=function(){return!!Je};Gt.hasArrayLengthDefineBug=function(){if(!Je)return null;try{return Je([],"length",{value:1}).length!==1}catch{return!0}};var ca=Gt,fa=ie,Ht=sa,da=ca(),Qt=qt,Jt=ve,pa=fa("%Math.floor%"),ya=function(e,r){if(typeof e!="function")throw new Jt("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||pa(r)!==r)throw new Jt("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],o=!0,i=!0;if("length"in e&&Qt){var l=Qt(e,"length");l&&!l.configurable&&(o=!1),l&&!l.writable&&(i=!1)}return(o||i||!n)&&(da?Ht(e,"length",r,!0,!0):Ht(e,"length",r)),e};(function(t){var e=ze,r=ie,n=ya,o=ve,i=r("%Function.prototype.apply%"),l=r("%Function.prototype.call%"),u=r("%Reflect.apply%",!0)||e.call(l,i),s=Qe(),f=r("%Math.max%");t.exports=function(d){if(typeof d!="function")throw new o("a function is required");var v=u(e,l,arguments);return n(v,1+f(0,d.length-(arguments.length-1)),!0)};var p=function(){return u(e,i,arguments)};s?s(t.exports,"apply",{value:p}):t.exports.apply=p})(jt);var ma=jt.exports,Xt=ie,Yt=ma,va=Yt(Xt("String.prototype.indexOf")),ga=function(e,r){var n=Xt(e,!!r);return typeof n=="function"&&va(e,".prototype.")>-1?Yt(n):n};const ha=on(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Xe=typeof Map=="function"&&Map.prototype,Ye=Object.getOwnPropertyDescriptor&&Xe?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Ne=Xe&&Ye&&typeof Ye.get=="function"?Ye.get:null,Zt=Xe&&Map.prototype.forEach,Ze=typeof Set=="function"&&Set.prototype,Me=Object.getOwnPropertyDescriptor&&Ze?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,De=Ze&&Me&&typeof Me.get=="function"?Me.get:null,Mt=Ze&&Set.prototype.forEach,ba=typeof WeakMap=="function"&&WeakMap.prototype,he=ba?WeakMap.prototype.has:null,wa=typeof WeakSet=="function"&&WeakSet.prototype,be=wa?WeakSet.prototype.has:null,xa=typeof WeakRef=="function"&&WeakRef.prototype,er=xa?WeakRef.prototype.deref:null,Sa=Boolean.prototype.valueOf,Ea=Object.prototype.toString,Oa=Function.prototype.toString,Ca=String.prototype.match,et=String.prototype.slice,j=String.prototype.replace,Aa=String.prototype.toUpperCase,tr=String.prototype.toLowerCase,rr=RegExp.prototype.test,nr=Array.prototype.concat,_=Array.prototype.join,Pa=Array.prototype.slice,ar=Math.floor,tt=typeof BigInt=="function"?BigInt.prototype.valueOf:null,rt=Object.getOwnPropertySymbols,nt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,ue=typeof Symbol=="function"&&typeof Symbol.iterator=="object",$=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===ue||!0)?Symbol.toStringTag:null,or=Object.prototype.propertyIsEnumerable,ir=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function lr(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||rr.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var n=t<0?-ar(-t):ar(t);if(n!==t){var o=String(n),i=et.call(e,o.length+1);return j.call(o,r,"$&_")+"."+j.call(j.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return j.call(e,r,"$&_")}var at=ha,ur=at.custom,sr=dr(ur)?ur:null,Ba=function t(e,r,n,o){var i=r||{};if(V(i,"quoteStyle")&&i.quoteStyle!=="single"&&i.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(V(i,"maxStringLength")&&(typeof i.maxStringLength=="number"?i.maxStringLength<0&&i.maxStringLength!==1/0:i.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var l=V(i,"customInspect")?i.customInspect:!0;if(typeof l!="boolean"&&l!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(V(i,"indent")&&i.indent!==null&&i.indent!==" "&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(V(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var u=i.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return yr(e,i);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var s=String(e);return u?lr(e,s):s}if(typeof e=="bigint"){var f=String(e)+"n";return u?lr(e,f):f}var p=typeof i.depth>"u"?5:i.depth;if(typeof n>"u"&&(n=0),n>=p&&p>0&&typeof e=="object")return ot(e)?"[Array]":"[Object]";var y=Ga(i,n);if(typeof o>"u")o=[];else if(pr(o,e)>=0)return"[Circular]";function d(R,H,Q){if(H&&(o=Pa.call(o),o.push(H)),Q){var Oe={depth:i.depth};return V(i,"quoteStyle")&&(Oe.quoteStyle=i.quoteStyle),t(R,Oe,n+1,o)}return t(R,i,n+1,o)}if(typeof e=="function"&&!fr(e)){var v=_a(e),c=ke(e,d);return"[Function"+(v?": "+v:" (anonymous)")+"]"+(c.length>0?" { "+_.call(c,", ")+" }":"")}if(dr(e)){var m=ue?j.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):nt.call(e);return typeof e=="object"&&!ue?we(m):m}if(qa(e)){for(var g="<"+tr.call(String(e.nodeName)),b=e.attributes||[],S=0;S",g}if(ot(e)){if(e.length===0)return"[]";var h=ke(e,d);return y&&!Ka(h)?"["+lt(h,y)+"]":"[ "+_.call(h,", ")+" ]"}if(Na(e)){var x=ke(e,d);return!("cause"in Error.prototype)&&"cause"in e&&!or.call(e,"cause")?"{ ["+String(e)+"] "+_.call(nr.call("[cause]: "+d(e.cause),x),", ")+" }":x.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+_.call(x,", ")+" }"}if(typeof e=="object"&&l){if(sr&&typeof e[sr]=="function"&&at)return at(e,{depth:p-n});if(l!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(La(e)){var C=[];return Zt&&Zt.call(e,function(R,H){C.push(d(H,e,!0)+" => "+d(R,e))}),mr("Map",Ne.call(e),C,y)}if(ja(e)){var P=[];return Mt&&Mt.call(e,function(R){P.push(d(R,e))}),mr("Set",De.call(e),P,y)}if(Wa(e))return it("WeakMap");if(Va(e))return it("WeakSet");if(Ua(e))return it("WeakRef");if(ka(e))return we(d(Number(e)));if(Ta(e))return we(d(tt.call(e)));if(Fa(e))return we(Sa.call(e));if(Da(e))return we(d(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(typeof globalThis<"u"&&e===globalThis||typeof Ve<"u"&&e===Ve)return"{ [object globalThis] }";if(!$a(e)&&!fr(e)){var D=ke(e,d),F=ir?ir(e)===Object.prototype:e instanceof Object||e.constructor===Object,M=e instanceof Object?"":"null prototype",G=!F&&$&&Object(e)===e&&$ in e?et.call(q(e),8,-1):M?"Object":"",je=F||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",pe=je+(G||M?"["+_.call(nr.call([],G||[],M||[]),": ")+"] ":"");return D.length===0?pe+"{}":y?pe+"{"+lt(D,y)+"}":pe+"{ "+_.call(D,", ")+" }"}return String(e)};function cr(t,e,r){var n=(r.quoteStyle||e)==="double"?'"':"'";return n+t+n}function Ia(t){return j.call(String(t),/"/g,""")}function ot(t){return q(t)==="[object Array]"&&(!$||!(typeof t=="object"&&$ in t))}function $a(t){return q(t)==="[object Date]"&&(!$||!(typeof t=="object"&&$ in t))}function fr(t){return q(t)==="[object RegExp]"&&(!$||!(typeof t=="object"&&$ in t))}function Na(t){return q(t)==="[object Error]"&&(!$||!(typeof t=="object"&&$ in t))}function Da(t){return q(t)==="[object String]"&&(!$||!(typeof t=="object"&&$ in t))}function ka(t){return q(t)==="[object Number]"&&(!$||!(typeof t=="object"&&$ in t))}function Fa(t){return q(t)==="[object Boolean]"&&(!$||!(typeof t=="object"&&$ in t))}function dr(t){if(ue)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!nt)return!1;try{return nt.call(t),!0}catch{}return!1}function Ta(t){if(!t||typeof t!="object"||!tt)return!1;try{return tt.call(t),!0}catch{}return!1}var Ra=Object.prototype.hasOwnProperty||function(t){return t in this};function V(t,e){return Ra.call(t,e)}function q(t){return Ea.call(t)}function _a(t){if(t.name)return t.name;var e=Ca.call(Oa.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function pr(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;re.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return yr(et.call(t,0,e.maxStringLength),e)+n}var o=j.call(j.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,za);return cr(o,"single",e)}function za(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+Aa.call(e.toString(16))}function we(t){return"Object("+t+")"}function it(t){return t+" { ? }"}function mr(t,e,r,n){var o=n?lt(r,n):_.call(r,", ");return t+" ("+e+") {"+o+"}"}function Ka(t){for(var e=0;e=0)return!1;return!0}function Ga(t,e){var r;if(t.indent===" ")r=" ";else if(typeof t.indent=="number"&&t.indent>0)r=_.call(Array(t.indent+1)," ");else return null;return{base:r,prev:_.call(Array(e+1),r)}}function lt(t,e){if(t.length===0)return"";var r=` `+e.prev+e.base;return r+_.call(t,","+r)+` -`+e.prev}function De(t,e){var r=ot(t),n=[];if(r){n.length=t.length;for(var o=0;o1;){var r=e.pop(),n=r.obj[r.prop];if(Y(n)){for(var o=[],i=0;i=dt?l.slice(c,c+dt):l,p=[],y=0;y=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122||i===lo.RFC1738&&(d===40||d===41)){p[p.length]=f.charAt(y);continue}if(d<128){p[p.length]=L[d];continue}if(d<2048){p[p.length]=L[192|d>>6]+L[128|d&63];continue}if(d<55296||d>=57344){p[p.length]=L[224|d>>12]+L[128|d>>6&63]+L[128|d&63];continue}y+=1,d=65536+((d&1023)<<10|f.charCodeAt(y)&1023),p[p.length]=L[240|d>>18]+L[128|d>>12&63]+L[128|d>>6&63]+L[128|d&63]}u+=p.join("")}return u},yo=function(e){for(var r=[{obj:{o:e},prop:"o"}],n=[],o=0;o"u"&&(C=0)}if(typeof p=="function"?g=p(r,g):g instanceof Date?g=v(g):n==="comma"&&W(g)&&(g=Re.maybeMap(g,function($t){return $t instanceof Date?v($t):$t})),g===null){if(l)return f&&!h?f(r,B.encoder,b,"key",s):r;g=""}if(So(g)||Re.isBuffer(g)){if(f){var D=h?r:f(r,B.encoder,b,"key",s);return[m(D)+"="+m(f(g,B.encoder,b,"value",s))]}return[m(r)+"="+m(String(g))]}var M=[];if(typeof g>"u")return M;var G;if(n==="comma"&&W(g))h&&f&&(g=Re.maybeMap(g,f)),G=[{value:g.length>0?g.join(",")||null:void 0}];else if(W(p))G=p;else{var je=Object.keys(g);G=y?je.sort(y):je}var pe=c?r.replace(/\./g,"%2E"):r,R=o&&W(g)&&g.length===1?pe+"[]":pe;if(i&&W(g)&&g.length===0)return R+"[]";for(var H=0;H"u"?e.encodeDotInKeys===!0?!0:B.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:B.addQueryPrefix,allowDots:u,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:B.allowEmptyArrays,arrayFormat:l,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:B.charsetSentinel,commaRoundTrip:e.commaRoundTrip,delimiter:typeof e.delimiter>"u"?B.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:B.encode,encodeDotInKeys:typeof e.encodeDotInKeys=="boolean"?e.encodeDotInKeys:B.encodeDotInKeys,encoder:typeof e.encoder=="function"?e.encoder:B.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:B.encodeValuesOnly,filter:i,format:n,formatter:o,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:B.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:B.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:B.strictNullHandling}},Co=function(t,e){var r=t,n=Oo(e),o,i;typeof n.filter=="function"?(i=n.filter,r=i("",r)):W(n.filter)&&(i=n.filter,o=i);var l=[];if(typeof r!="object"||r===null)return"";var u=wr[n.arrayFormat],c=u==="comma"&&n.commaRoundTrip;o||(o=Object.keys(r)),n.sort&&o.sort(n.sort);for(var f=br(),p=0;p0?v+d:""},ce=gr,yt=Object.prototype.hasOwnProperty,Ao=Array.isArray,A={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:ce.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},Po=function(t){return t.replace(/&#(\d+);/g,function(e,r){return String.fromCharCode(parseInt(r,10))})},Er=function(t,e){return t&&typeof t=="string"&&e.comma&&t.indexOf(",")>-1?t.split(","):t},Bo="utf8=%26%2310003%3B",Io="utf8=%E2%9C%93",$o=function(e,r){var n={__proto__:null},o=r.ignoreQueryPrefix?e.replace(/^\?/,""):e;o=o.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var i=r.parameterLimit===1/0?void 0:r.parameterLimit,l=o.split(r.delimiter,i),u=-1,c,f=r.charset;if(r.charsetSentinel)for(c=0;c-1&&(s=Ao(s)?[s]:s);var m=yt.call(n,v);m&&r.duplicates==="combine"?n[v]=ce.combine(n[v],s):(!m||r.duplicates==="last")&&(n[v]=s)}return n},No=function(t,e,r,n){for(var o=n?e:Er(e,r),i=t.length-1;i>=0;--i){var l,u=t[i];if(u==="[]"&&r.parseArrays)l=r.allowEmptyArrays&&(o===""||r.strictNullHandling&&o===null)?[]:[].concat(o);else{l=r.plainObjects?Object.create(null):{};var c=u.charAt(0)==="["&&u.charAt(u.length-1)==="]"?u.slice(1,-1):u,f=r.decodeDotInKeys?c.replace(/%2E/g,"."):c,p=parseInt(f,10);!r.parseArrays&&f===""?l={0:o}:!isNaN(p)&&u!==f&&String(p)===f&&p>=0&&r.parseArrays&&p<=r.arrayLimit?(l=[],l[p]=o):f!=="__proto__"&&(l[f]=o)}o=l}return o},ko=function(e,r,n,o){if(e){var i=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,l=/(\[[^[\]]*])/,u=/(\[[^[\]]*])/g,c=n.depth>0&&l.exec(i),f=c?i.slice(0,c.index):i,p=[];if(f){if(!n.plainObjects&&yt.call(Object.prototype,f)&&!n.allowPrototypes)return;p.push(f)}for(var y=0;n.depth>0&&(c=u.exec(i))!==null&&y"u"?A.charset:e.charset,n=typeof e.duplicates>"u"?A.duplicates:e.duplicates;if(n!=="combine"&&n!=="first"&&n!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var o=typeof e.allowDots>"u"?e.decodeDotInKeys===!0?!0:A.allowDots:!!e.allowDots;return{allowDots:o,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:A.allowEmptyArrays,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:A.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:A.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:A.arrayLimit,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:A.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:A.comma,decodeDotInKeys:typeof e.decodeDotInKeys=="boolean"?e.decodeDotInKeys:A.decodeDotInKeys,decoder:typeof e.decoder=="function"?e.decoder:A.decoder,delimiter:typeof e.delimiter=="string"||ce.isRegExp(e.delimiter)?e.delimiter:A.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:A.depth,duplicates:n,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:A.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:A.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:A.plainObjects,strictDepth:typeof e.strictDepth=="boolean"?!!e.strictDepth:A.strictDepth,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:A.strictNullHandling}},Fo=function(t,e){var r=Do(e);if(t===""||t===null||typeof t>"u")return r.plainObjects?Object.create(null):{};for(var n=typeof t=="string"?$o(t,r):t,o=r.plainObjects?Object.create(null):{},i=Object.keys(n),l=0;l
'};r.configure=function(s){var m,h;for(m in s)h=s[m],h!==void 0&&s.hasOwnProperty(m)&&(n[m]=h);return this},r.status=null,r.set=function(s){var m=r.isStarted();s=o(s,n.minimum,1),r.status=s===1?null:s;var h=r.render(!m),b=h.querySelector(n.barSelector),S=n.speed,g=n.easing;return h.offsetWidth,u(function(x){n.positionUsing===""&&(n.positionUsing=r.getPositioningCSS()),c(b,l(s,S,g)),s===1?(c(h,{transition:"none",opacity:1}),h.offsetWidth,setTimeout(function(){c(h,{transition:"all "+S+"ms linear",opacity:0}),setTimeout(function(){r.remove(),x()},S)},S)):setTimeout(x,S)}),this},r.isStarted=function(){return typeof r.status=="number"},r.start=function(){r.status||r.set(0);var s=function(){setTimeout(function(){r.status&&(r.trickle(),s())},n.trickleSpeed)};return n.trickle&&s(),this},r.done=function(s){return!s&&!r.status?this:r.inc(.3+.5*Math.random()).set(1)},r.inc=function(s){var m=r.status;return m?(typeof s!="number"&&(s=(1-m)*o(Math.random()*m,.1,.95)),m=o(m+s,0,.994),r.set(m)):r.start()},r.trickle=function(){return r.inc(Math.random()*n.trickleRate)},function(){var s=0,m=0;r.promise=function(h){return!h||h.state()==="resolved"?this:(m===0&&r.start(),s++,m++,h.always(function(){m--,m===0?(s=0,r.done()):r.set((s-m)/s)}),this)}}(),r.render=function(s){if(r.isRendered())return document.getElementById("nprogress");p(document.documentElement,"nprogress-busy");var m=document.createElement("div");m.id="nprogress",m.innerHTML=n.template;var h=m.querySelector(n.barSelector),b=s?"-100":i(r.status||0),S=document.querySelector(n.parent),g;return c(h,{transition:"all 0 linear",transform:"translate3d("+b+"%,0,0)"}),n.showSpinner||(g=m.querySelector(n.spinnerSelector),g&&v(g)),S!=document.body&&p(S,"nprogress-custom-parent"),S.appendChild(m),m},r.remove=function(){y(document.documentElement,"nprogress-busy"),y(document.querySelector(n.parent),"nprogress-custom-parent");var s=document.getElementById("nprogress");s&&v(s)},r.isRendered=function(){return!!document.getElementById("nprogress")},r.getPositioningCSS=function(){var s=document.body.style,m="WebkitTransform"in s?"Webkit":"MozTransform"in s?"Moz":"msTransform"in s?"ms":"OTransform"in s?"O":"";return m+"Perspective"in s?"translate3d":m+"Transform"in s?"translate":"margin"};function o(s,m,h){return sh?h:s}function i(s){return(-1+s)*100}function l(s,m,h){var b;return n.positionUsing==="translate3d"?b={transform:"translate3d("+i(s)+"%,0,0)"}:n.positionUsing==="translate"?b={transform:"translate("+i(s)+"%,0)"}:b={"margin-left":i(s)+"%"},b.transition="all "+m+"ms "+h,b}var u=function(){var s=[];function m(){var h=s.shift();h&&h(m)}return function(h){s.push(h),s.length==1&&m()}}(),c=function(){var s=["Webkit","O","Moz","ms"],m={};function h(x){return x.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(C,P){return P.toUpperCase()})}function b(x){var C=document.body.style;if(x in C)return x;for(var P=s.length,N=x.charAt(0).toUpperCase()+x.slice(1),D;P--;)if(D=s[P]+N,D in C)return D;return x}function S(x){return x=h(x),m[x]||(m[x]=b(x))}function g(x,C,P){C=S(C),x.style[C]=P}return function(x,C){var P=arguments,N,D;if(P.length==2)for(N in C)D=C[N],D!==void 0&&C.hasOwnProperty(N)&&g(x,N,D);else g(x,P[1],P[2])}}();function f(s,m){var h=typeof s=="string"?s:d(s);return h.indexOf(" "+m+" ")>=0}function p(s,m){var h=d(s),b=h+m;f(h,m)||(s.className=b.substring(1))}function y(s,m){var h=d(s),b;f(s,m)&&(b=h.replace(" "+m+" "," "),s.className=b.substring(1,b.length-1))}function d(s){return(" "+(s.className||"")+" ").replace(/\s+/gi," ")}function v(s){s&&s.parentNode&&s.parentNode.removeChild(s)}return r})})(Lo);function Wo(t,e,r,n="brackets"){let o=/^https?:\/\//.test(e.toString()),i=o||e.toString().startsWith("/"),l=!i&&!e.toString().startsWith("#")&&!e.toString().startsWith("?"),u=e.toString().includes("?")||t==="get"&&Object.keys(r).length,c=e.toString().includes("#"),f=new URL(e.toString(),"http://localhost");return t==="get"&&Object.keys(r).length&&(f.search=Or.stringify(xn(Or.parse(f.search,{ignoreQueryPrefix:!0}),r),{encodeValuesOnly:!0,arrayFormat:n}),r={}),[[o?`${f.protocol}//${f.host}`:"",i?f.pathname:"",l?f.pathname.substring(1):"",u?f.search:"",c?f.hash:""].join(""),r]}const Cr={__name:"ModalRenderer",props:{index:{type:Number,required:!0}},setup(t){const e=t,r=Se(),n=a.computed(()=>r.stack.value[e.index]);return a.provide("modalContext",n),(o,i)=>{var l;return(l=n.value)!=null&&l.component?(a.openBlock(),a.createBlock(a.unref(n).component,a.mergeProps({key:0},n.value.props,{onModalEvent:i[0]||(i[0]=(u,...c)=>n.value.emit(u,...c))}),null,16)):a.createCommentVNode("",!0)}}},Ar={__name:"ModalRoot",setup(t){const e=Se(),r=a.ref(!1),n=a.ref(null);a.onUnmounted(F.router.on("start",()=>r.value=!0)),a.onUnmounted(F.router.on("finish",()=>r.value=!1)),a.onUnmounted(F.router.on("navigate",i=>{const l=i.detail.page.props._inertiaui_modal;if(!l){n.value&&e.closeAll();return}n.value=l,e.setBaseUrl(l.baseUrl),e.pushFromResponseData(l,{},()=>{if(!l.baseUrl){console.error("No base url in modal response data so cannot navigate back");return}!r.value&&window.location.href!==l.baseUrl&&F.router.visit(l.baseUrl,{preserveScroll:!0,preserveState:!0})})}));const o=i=>(i.headers["X-InertiaUI-Modal-Base-Url"]=e.getBaseUrl(),i);return a.onBeforeMount(()=>{Ce.interceptors.request.use(o)}),a.onUnmounted(()=>{Ce.interceptors.request.eject(o)}),(i,l)=>(a.openBlock(),a.createElementBlock(a.Fragment,null,[a.renderSlot(i.$slots,"default"),a.unref(e).stack.value.length?(a.openBlock(),a.createBlock(Cr,{key:0,index:0})):a.createCommentVNode("",!0)],64))}};let mt=null;const vt=a.ref(null),O=a.ref([]),_e=a.ref({}),Uo=t=>{mt=t};class ht{constructor(e,r,n,o,i){k(this,"update",(e,r,n)=>{const o=this.index.value;o>-1&&(O.value[o].config=e,O.value[o].onCloseCallback=r,O.value[o].afterLeaveCallback=n)});k(this,"getParentModal",()=>{const e=this.index.value;return e<1?null:O.value.slice(0,e).reverse().find(r=>r.isOpen)});k(this,"getChildModal",()=>{const e=this.index.value;return e===O.value.length-1?null:O.value.slice(e+1).find(r=>r.isOpen)});k(this,"show",()=>{const e=this.index.value;if(e>-1){if(O.value[e].isOpen)return;O.value[e].isOpen=!0,O.value[e].shouldRender=!0}});k(this,"close",()=>{var r;const e=this.index.value;if(e>-1){if(!O.value[e].isOpen)return;Object.keys(this.listeners).forEach(n=>{this.off(n)}),O.value[e].isOpen=!1,(r=this.onCloseCallback)==null||r.call(this),this.onCloseCallback=null}});k(this,"setOpen",e=>{e?this.show():this.close()});k(this,"afterLeave",()=>{var r;const e=this.index.value;if(e>-1){if(O.value[e].isOpen)return;O.value[e].shouldRender=!1,(r=this.afterLeaveCallback)==null||r.call(this),this.afterLeaveCallback=null}e===0&&(O.value=[])});k(this,"on",(e,r)=>{this.listeners[e]=this.listeners[e]??[],this.listeners[e].push(r)});k(this,"off",(e,r)=>{var n;r?this.listeners[e]=((n=this.listeners[e])==null?void 0:n.filter(o=>o!==r))??[]:delete this.listeners[e]});k(this,"emit",(e,...r)=>{var n;(n=this.listeners[e])==null||n.forEach(o=>o(...r))});k(this,"registerEventListenersFromAttrs",e=>{const r=[];return Object.keys(e).filter(n=>n.startsWith("on")).forEach(n=>{const o=n.replace(/^on/,"").replace(/^./,i=>i.toLowerCase()).replace(/([A-Z])/g,"-$1").toLowerCase();this.on(o,e[n]),r.push(()=>this.off(o,e[n]))}),()=>r.forEach(n=>n())});k(this,"reload",(e={})=>{var n;let r=Object.keys(this.response.props);e.only&&(r=kt(r,e.only)),e.except&&(r=tn(r,e.except)),(n=this.response)!=null&&n.url&&Ce.get(this.response.url,{headers:{Accept:"text/html, application/xhtml+xml","X-Inertia":!0,"X-Inertia-Partial-Component":this.response.component,"X-Inertia-Version":this.response.version,"X-Inertia-Partial-Data":r.join(","),"X-InertiaUI-Modal":!0,"X-InertiaUI-Modal-Use-Router":0}}).then(o=>{Object.assign(this.props.value,o.data.props)})});this.id=ht.generateId(),this.isOpen=!1,this.shouldRender=!1,this.listeners={},this.component=e,this.props=a.ref(r.props),this.response=r,this.config=n,this.onCloseCallback=o,this.afterLeaveCallback=i,this.index=a.computed(()=>O.value.findIndex(l=>l.id===this.id)),this.onTopOfStack=a.computed(()=>{var u;return O.value.length<2?!0:((u=O.value.map(c=>({id:c.id,shouldRender:c.shouldRender})).reverse().find(c=>c.shouldRender))==null?void 0:u.id)===this.id})}static generateId(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?`inertiaui_modal_${crypto.randomUUID()}`:`inertiaui_modal_${Date.now().toString(36)}_${Math.random().toString(36).substr(2,9)}`}}function jo(t,e){_e.value[t]={name:t,callback:e}}function Vo(t,e,r,n){if(!_e.value[t])throw new Error(`The local modal "${t}" has not been registered.`);const o=gt(null,{},e,r,n);return o.name=t,_e.value[t].callback(o),o}function Pr(t,e={},r=null,n=null){return mt(t.component).then(o=>gt(a.markRaw(o),t,e,r,n))}function qo(t,e,r={},n={},o={},i=null,l=null,u="brackets",c=!1){return new Promise((f,p)=>{if(t.startsWith("#")){f(Vo(t.substring(1),o,i,l));return}const[y,d]=Wo(e,t||"",r,u);let v=c&&O.value.length===0;if(O.value.length===0&&(vt.value=typeof window<"u"?window.location.href:""),n={...n,Accept:"text/html, application/xhtml+xml","X-Requested-With":"XMLHttpRequest","X-Inertia":!0,"X-Inertia-Version":F.usePage().version,"X-InertiaUI-Modal":!0,"X-InertiaUI-Modal-Use-Router":v?1:0},v)return F.router.visit(y,{method:e,data:d,headers:n,preserveScroll:!0,preserveState:!0,onError:p,onFinish:()=>nn(()=>O.value[0]).then(s=>{const m=s.onCloseCallback,h=s.afterLeaveCallback;s.update(o,()=>{i==null||i(),m==null||m()},()=>{l==null||l(),h==null||h()}),f(s)})});Ce({url:y,method:e,data:d,headers:n}).then(s=>f(Pr(s.data,o,i,l))).catch(p)})}function gt(t,e,r,n,o){const i=new ht(t,e,r,n,o);return O.value.push(i),a.nextTick(()=>{i.show()}),i}const zo=["closeButton","closeExplicitly","maxWidth","paddingClasses","panelClasses","position","slideover"],Ko=(t,e)=>(e.resolveComponent&&(mt=e.resolveComponent),()=>a.h(Ar,()=>a.h(t,e)));function Se(){return{setComponentResolver:Uo,getBaseUrl:()=>vt.value,setBaseUrl:t=>vt.value=t,stack:a.readonly(O),push:gt,pushFromResponseData:Pr,closeAll:()=>[...O.value].reverse().forEach(t=>t.close()),reset:()=>O.value=[],visit:qo,registerLocalModal:jo,removeLocalModal:t=>delete _e.value[t]}}const Br=Object.assign({inheritAttrs:!1},{__name:"HeadlessModal",props:{name:{type:String,required:!1},slideover:{type:Boolean,default:null},closeButton:{type:Boolean,default:null},closeExplicitly:{type:Boolean,default:null},maxWidth:{type:String,default:null},paddingClasses:{type:[Boolean,String],default:null},panelClasses:{type:[Boolean,String],default:null},position:{type:String,default:null}},emits:["modal-event"],setup(t,{expose:e,emit:r}){const n=t,o=Se(),i=n.name?a.ref({}):a.inject("modalContext"),l=a.computed(()=>{var s;const v=((s=i.value.config)==null?void 0:s.slideover)??n.slideover??Pe("type")==="slideover";return{slideover:v,closeButton:n.closeButton??ee(v,"closeButton"),closeExplicitly:n.closeExplicitly??ee(v,"closeExplicitly"),maxWidth:n.maxWidth??ee(v,"maxWidth"),paddingClasses:n.paddingClasses??ee(v,"paddingClasses"),panelClasses:n.panelClasses??ee(v,"panelClasses"),position:n.position??ee(v,"position"),...i.value.config}});n.name&&(o.registerLocalModal(n.name,function(v){i.value=v,f()}),a.onBeforeUnmount(()=>{o.removeLocalModal(n.name)})),a.onMounted(()=>{n.name||f()});const u=a.ref(null);a.onBeforeUnmount(()=>{var v;return(v=u.value)==null?void 0:v.call(u)});const c=a.useAttrs();function f(){u.value=i.value.registerEventListenersFromAttrs(c)}const p=r;function y(v,...s){p("modal-event",v,...s)}e({afterLeave:i.value.afterLeave,close:i.value.close,config:l.value,emit:y,getChildModal:i.value.getChildModal,getParentModal:i.value.getParentModal,id:i.value.id,index:i.value.index,isOpen:i.value.isOpen,modalContext:i.value,onTopOfStack:i.value.onTopOfStack,reload:i.value.reload,setOpen:i.value.setOpen,shouldRender:i.value.shouldRender});const d=a.computed(()=>{var v;return(v=o.stack.value.find(s=>s.shouldRender&&s.index>i.value.index))==null?void 0:v.index});return(v,s)=>(a.openBlock(),a.createElementBlock(a.Fragment,null,[a.unref(i).shouldRender?a.renderSlot(v.$slots,"default",{key:0,id:a.unref(i).id,afterLeave:a.unref(i).afterLeave,close:a.unref(i).close,config:l.value,emit:y,getChildModal:a.unref(i).getChildModal,getParentModal:a.unref(i).getParentModal,index:a.unref(i).index,isOpen:a.unref(i).isOpen,modalContext:a.unref(i),onTopOfStack:a.unref(i).onTopOfStack,reload:a.unref(i).reload,setOpen:a.unref(i).setOpen,shouldRender:a.unref(i).shouldRender}):a.createCommentVNode("",!0),d.value?(a.openBlock(),a.createBlock(Cr,{key:1,index:d.value},null,8,["index"])):a.createCommentVNode("",!0)],64))}});function bt(t,e){const r=typeof t=="string"&&!e?`${t}Context`:e,n=Symbol(r);return[o=>{const i=a.inject(n,o);if(i||i===null)return i;throw new Error(`Injection \`${n.toString()}\` not found. Component must be used within ${Array.isArray(t)?`one of the following components: ${t.join(", ")}`:`\`${t}\``}`)},o=>(a.provide(n,o),o)]}function Ir(t,e,r){const n=r.originalEvent.target,o=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&n.addEventListener(t,e,{once:!0}),n.dispatchEvent(o)}function $r(t){return a.getCurrentScope()?(a.onScopeDispose(t),!0):!1}function Go(t){let e=!1,r;const n=a.effectScope(!0);return(...o)=>(e||(r=n.run(()=>t(...o)),e=!0),r)}function Ho(t){let e=0,r,n;const o=()=>{e-=1,n&&e<=0&&(n.stop(),r=void 0,n=void 0)};return(...i)=>(e+=1,r||(n=a.effectScope(!0),r=n.run(()=>t(...i))),$r(o),r)}function wt(t){return typeof t=="function"?t():a.unref(t)}const Z=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Qo=t=>typeof t<"u",Jo=Object.prototype.toString,Xo=t=>Jo.call(t)==="[object Object]",Yo=()=>{},Nr=Zo();function Zo(){var t,e;return Z&&((t=window==null?void 0:window.navigator)==null?void 0:t.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((e=window==null?void 0:window.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function Mo(t){return a.getCurrentInstance()}function ei(t,e){Mo()&&a.onBeforeUnmount(t,e)}function Ee(t){var e;const r=wt(t);return(e=r==null?void 0:r.$el)!=null?e:r}const kr=Z?window:void 0;function Dr(...t){let e,r,n,o;if(typeof t[0]=="string"||Array.isArray(t[0])?([r,n,o]=t,e=kr):[e,r,n,o]=t,!e)return Yo;Array.isArray(r)||(r=[r]),Array.isArray(n)||(n=[n]);const i=[],l=()=>{i.forEach(p=>p()),i.length=0},u=(p,y,d,v)=>(p.addEventListener(y,d,v),()=>p.removeEventListener(y,d,v)),c=a.watch(()=>[Ee(e),wt(o)],([p,y])=>{if(l(),!p)return;const d=Xo(y)?{...y}:y;i.push(...r.flatMap(v=>n.map(s=>u(p,v,s,d))))},{immediate:!0,flush:"post"}),f=()=>{c(),l()};return $r(f),f}function ti(t){return typeof t=="function"?t:typeof t=="string"?e=>e.key===t:Array.isArray(t)?e=>t.includes(e.key):()=>!0}function ri(...t){let e,r,n={};t.length===3?(e=t[0],r=t[1],n=t[2]):t.length===2?typeof t[1]=="object"?(e=!0,r=t[0],n=t[1]):(e=t[0],r=t[1]):(e=!0,r=t[0]);const{target:o=kr,eventName:i="keydown",passive:l=!1,dedupe:u=!1}=n,c=ti(e);return Dr(o,i,f=>{f.repeat&&wt(u)||c(f)&&r(f)},l)}function ni(){const t=a.ref(!1),e=a.getCurrentInstance();return e&&a.onMounted(()=>{t.value=!0},e),t}function ai(t){return JSON.parse(JSON.stringify(t))}function oi(t,e,r,n={}){var o,i,l;const{clone:u=!1,passive:c=!1,eventName:f,deep:p=!1,defaultValue:y,shouldEmit:d}=n,v=a.getCurrentInstance(),s=r||(v==null?void 0:v.emit)||((o=v==null?void 0:v.$emit)==null?void 0:o.bind(v))||((l=(i=v==null?void 0:v.proxy)==null?void 0:i.$emit)==null?void 0:l.bind(v==null?void 0:v.proxy));let m=f;m=m||`update:${e.toString()}`;const h=g=>u?typeof u=="function"?u(g):ai(g):g,b=()=>Qo(t[e])?h(t[e]):y,S=g=>{d?d(g)&&s(m,g):s(m,g)};if(c){const g=b(),x=a.ref(g);let C=!1;return a.watch(()=>t[e],P=>{C||(C=!0,x.value=h(P),a.nextTick(()=>C=!1))}),a.watch(x,P=>{!C&&(P!==t[e]||p)&&S(P)},{deep:p}),x}else return a.computed({get(){return b()},set(g){S(g)}})}function xt(t){return t?t.flatMap(e=>e.type===a.Fragment?xt(e.children):[e]):[]}function St(t){if(t===null||typeof t!="object")return!1;const e=Object.getPrototypeOf(t);return e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null||Symbol.iterator in t?!1:Symbol.toStringTag in t?Object.prototype.toString.call(t)==="[object Module]":!0}function Et(t,e,r=".",n){if(!St(e))return Et(t,{},r);const o=Object.assign({},e);for(const i in t){if(i==="__proto__"||i==="constructor")continue;const l=t[i];l!=null&&(Array.isArray(l)&&Array.isArray(o[i])?o[i]=[...l,...o[i]]:St(l)&&St(o[i])?o[i]=Et(l,o[i],(r?`${r}.`:"")+i.toString()):o[i]=l)}return o}function ii(t){return(...e)=>e.reduce((r,n)=>Et(r,n,""),{})}const li=ii(),[Fr,cl]=bt("ConfigProvider");let ui="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",si=(t=21)=>{let e="",r=t;for(;r--;)e+=ui[Math.random()*64|0];return e};const ci=Ho(()=>{const t=a.ref(new Map),e=a.ref(),r=a.computed(()=>{for(const l of t.value.values())if(l)return!0;return!1}),n=Fr({scrollBody:a.ref(!0)});let o=null;const i=()=>{document.body.style.paddingRight="",document.body.style.marginRight="",document.body.style.pointerEvents="",document.body.style.removeProperty("--scrollbar-width"),document.body.style.overflow=e.value??"",Nr&&(o==null||o()),e.value=void 0};return a.watch(r,(l,u)=>{var c;if(!Z)return;if(!l){u&&i();return}e.value===void 0&&(e.value=document.body.style.overflow);const f=window.innerWidth-document.documentElement.clientWidth,p={padding:f,margin:0},y=(c=n.scrollBody)!=null&&c.value?typeof n.scrollBody.value=="object"?li({padding:n.scrollBody.value.padding===!0?f:n.scrollBody.value.padding,margin:n.scrollBody.value.margin===!0?f:n.scrollBody.value.margin},p):p:{padding:0,margin:0};f>0&&(document.body.style.paddingRight=typeof y.padding=="number"?`${y.padding}px`:String(y.padding),document.body.style.marginRight=typeof y.margin=="number"?`${y.margin}px`:String(y.margin),document.body.style.setProperty("--scrollbar-width",`${f}px`),document.body.style.overflow="hidden"),Nr&&(o=Dr(document,"touchmove",d=>{var v;d.target===document.documentElement&&(d.touches.length>1||(v=d.preventDefault)==null||v.call(d))},{passive:!1})),a.nextTick(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})},{immediate:!0,flush:"sync"}),t});function fi(t){const e=si(6),r=ci();r.value.set(e,t);const n=a.computed({get:()=>r.value.get(e)??!1,set:o=>r.value.set(e,o)});return ei(()=>{r.value.delete(e)}),n}function Ot(t){const e=a.getCurrentInstance(),r=e==null?void 0:e.type.emits,n={};return r!=null&&r.length||console.warn(`No emitted event found. Please check component: ${e==null?void 0:e.type.__name}`),r==null||r.forEach(o=>{n[a.toHandlerKey(a.camelize(o))]=(...i)=>t(o,...i)}),n}function T(){const t=a.getCurrentInstance(),e=a.ref(),r=a.computed(()=>{var l,u;return["#text","#comment"].includes((l=e.value)==null?void 0:l.$el.nodeName)?(u=e.value)==null?void 0:u.$el.nextElementSibling:Ee(e)}),n=Object.assign({},t.exposed),o={};for(const l in t.props)Object.defineProperty(o,l,{enumerable:!0,configurable:!0,get:()=>t.props[l]});if(Object.keys(n).length>0)for(const l in n)Object.defineProperty(o,l,{enumerable:!0,configurable:!0,get:()=>n[l]});Object.defineProperty(o,"$el",{enumerable:!0,configurable:!0,get:()=>t.vnode.el}),t.exposed=o;function i(l){e.value=l,!(l instanceof Element||!l)&&(Object.defineProperty(o,"$el",{enumerable:!0,configurable:!0,get:()=>l.$el}),t.exposed=o)}return{forwardRef:i,currentRef:e,currentElement:r}}var di=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},fe=new WeakMap,Le=new WeakMap,We={},Ct=0,Tr=function(t){return t&&(t.host||Tr(t.parentNode))},pi=function(t,e){return e.map(function(r){if(t.contains(r))return r;var n=Tr(r);return n&&t.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",t,". Doing nothing"),null)}).filter(function(r){return!!r})},yi=function(t,e,r,n){var o=pi(e,Array.isArray(t)?t:[t]);We[r]||(We[r]=new WeakMap);var i=We[r],l=[],u=new Set,c=new Set(o),f=function(y){!y||u.has(y)||(u.add(y),f(y.parentNode))};o.forEach(f);var p=function(y){!y||c.has(y)||Array.prototype.forEach.call(y.children,function(d){if(u.has(d))p(d);else try{var v=d.getAttribute(n),s=v!==null&&v!=="false",m=(fe.get(d)||0)+1,h=(i.get(d)||0)+1;fe.set(d,m),i.set(d,h),l.push(d),m===1&&s&&Le.set(d,!0),h===1&&d.setAttribute(r,"true"),s||d.setAttribute(n,"true")}catch(b){console.error("aria-hidden: cannot operate on ",d,b)}})};return p(e),u.clear(),Ct++,function(){l.forEach(function(y){var d=fe.get(y)-1,v=i.get(y)-1;fe.set(y,d),i.set(y,v),d||(Le.has(y)||y.removeAttribute(n),Le.delete(y)),v||y.removeAttribute(r)}),Ct--,Ct||(fe=new WeakMap,fe=new WeakMap,Le=new WeakMap,We={})}},mi=function(t,e,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),o=di(t);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live]"))),yi(n,o,r,"aria-hidden")):function(){return null}};function vi(t){let e;a.watch(()=>Ee(t),r=>{r?e=mi(r):e&&e()}),a.onUnmounted(()=>{e&&e()})}let hi=0;function Rr(t,e="radix"){const r=Fr({useId:void 0});return Nt.useId?`${e}-${Nt.useId()}`:r.useId?`${e}-${r.useId()}`:`${e}-${++hi}`}function gi(t,e){const r=a.ref(t);function n(o){return e[r.value][o]??r.value}return{state:r,dispatch:o=>{r.value=n(o)}}}const At=a.defineComponent({name:"PrimitiveSlot",inheritAttrs:!1,setup(t,{attrs:e,slots:r}){return()=>{var n,o;if(!r.default)return null;const i=xt(r.default()),l=i.findIndex(p=>p.type!==a.Comment);if(l===-1)return i;const u=i[l];(n=u.props)==null||delete n.ref;const c=u.props?a.mergeProps(e,u.props):e;e.class&&(o=u.props)!=null&&o.class&&delete u.props.class;const f=a.cloneVNode(u,c);for(const p in c)p.startsWith("on")&&(f.props||(f.props={}),f.props[p]=c[p]);return i.length===1?f:(i[l]=f,i)}}}),de=a.defineComponent({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(t,{attrs:e,slots:r}){const n=t.asChild?"template":t.as;return typeof n=="string"&&["area","img","input"].includes(n)?()=>a.h(n,e):n!=="template"?()=>a.h(t.as,e,{default:r.default}):()=>a.h(At,e,{default:r.default})}});function _r(){const t=a.ref(),e=a.computed(()=>{var r,n;return["#text","#comment"].includes((r=t.value)==null?void 0:r.$el.nodeName)?(n=t.value)==null?void 0:n.$el.nextElementSibling:Ee(t)});return{primitiveElement:t,currentElement:e}}function bi(t,e){const r=a.ref({}),n=a.ref("none"),o=t.value?"mounted":"unmounted",{state:i,dispatch:l}=gi(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),u=d=>{var v;if(Z){const s=new CustomEvent(d,{bubbles:!1,cancelable:!1});(v=e.value)==null||v.dispatchEvent(s)}};a.watch(t,async(d,v)=>{var s;const m=v!==d;if(await a.nextTick(),m){const h=n.value,b=Ue(e.value);d?(l("MOUNT"),u("enter"),b==="none"&&u("after-enter")):b==="none"||((s=r.value)==null?void 0:s.display)==="none"?(l("UNMOUNT"),u("leave"),u("after-leave")):v&&h!==b?(l("ANIMATION_OUT"),u("leave")):(l("UNMOUNT"),u("after-leave"))}},{immediate:!0});const c=d=>{const v=Ue(e.value),s=v.includes(d.animationName),m=i.value==="mounted"?"enter":"leave";d.target===e.value&&s&&(u(`after-${m}`),l("ANIMATION_END")),d.target===e.value&&v==="none"&&l("ANIMATION_END")},f=d=>{d.target===e.value&&(n.value=Ue(e.value))},p=a.watch(e,(d,v)=>{d?(r.value=getComputedStyle(d),d.addEventListener("animationstart",f),d.addEventListener("animationcancel",c),d.addEventListener("animationend",c)):(l("ANIMATION_END"),v==null||v.removeEventListener("animationstart",f),v==null||v.removeEventListener("animationcancel",c),v==null||v.removeEventListener("animationend",c))},{immediate:!0}),y=a.watch(i,()=>{const d=Ue(e.value);n.value=i.value==="mounted"?d:"none"});return a.onUnmounted(()=>{p(),y()}),{isPresent:a.computed(()=>["mounted","unmountSuspended"].includes(i.value))}}function Ue(t){return t&&getComputedStyle(t).animationName||"none"}const Lr=a.defineComponent({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(t,{slots:e,expose:r}){var n;const{present:o,forceMount:i}=a.toRefs(t),l=a.ref(),{isPresent:u}=bi(o,l);r({present:u});let c=e.default({present:u});c=xt(c||[]);const f=a.getCurrentInstance();if(c&&(c==null?void 0:c.length)>1){const p=(n=f==null?void 0:f.parent)!=null&&n.type.name?`<${f.parent.type.name} />`:"component";throw new Error([`Detected an invalid children for \`${p}\` for \`Presence\` component.`,"","Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.","You can apply a few solutions:",["Provide a single child element so that `presence` directive attach correctly.","Ensure the first child is an actual element instead of a raw text node or comment node."].map(y=>` - ${y}`).join(` +`+e.prev}function ke(t,e){var r=ot(t),n=[];if(r){n.length=t.length;for(var o=0;o1;){var r=e.pop(),n=r.obj[r.prop];if(Y(n)){for(var o=[],i=0;i=dt?l.slice(s,s+dt):l,p=[],y=0;y=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122||i===lo.RFC1738&&(d===40||d===41)){p[p.length]=f.charAt(y);continue}if(d<128){p[p.length]=L[d];continue}if(d<2048){p[p.length]=L[192|d>>6]+L[128|d&63];continue}if(d<55296||d>=57344){p[p.length]=L[224|d>>12]+L[128|d>>6&63]+L[128|d&63];continue}y+=1,d=65536+((d&1023)<<10|f.charCodeAt(y)&1023),p[p.length]=L[240|d>>18]+L[128|d>>12&63]+L[128|d>>6&63]+L[128|d&63]}u+=p.join("")}return u},yo=function(e){for(var r=[{obj:{o:e},prop:"o"}],n=[],o=0;o"u"&&(C=0)}if(typeof p=="function"?h=p(r,h):h instanceof Date?h=v(h):n==="comma"&&W(h)&&(h=Re.maybeMap(h,function($t){return $t instanceof Date?v($t):$t})),h===null){if(l)return f&&!g?f(r,B.encoder,b,"key",c):r;h=""}if(So(h)||Re.isBuffer(h)){if(f){var F=g?r:f(r,B.encoder,b,"key",c);return[m(F)+"="+m(f(h,B.encoder,b,"value",c))]}return[m(r)+"="+m(String(h))]}var M=[];if(typeof h>"u")return M;var G;if(n==="comma"&&W(h))g&&f&&(h=Re.maybeMap(h,f)),G=[{value:h.length>0?h.join(",")||null:void 0}];else if(W(p))G=p;else{var je=Object.keys(h);G=y?je.sort(y):je}var pe=s?r.replace(/\./g,"%2E"):r,R=o&&W(h)&&h.length===1?pe+"[]":pe;if(i&&W(h)&&h.length===0)return R+"[]";for(var H=0;H"u"?e.encodeDotInKeys===!0?!0:B.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:B.addQueryPrefix,allowDots:u,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:B.allowEmptyArrays,arrayFormat:l,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:B.charsetSentinel,commaRoundTrip:e.commaRoundTrip,delimiter:typeof e.delimiter>"u"?B.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:B.encode,encodeDotInKeys:typeof e.encodeDotInKeys=="boolean"?e.encodeDotInKeys:B.encodeDotInKeys,encoder:typeof e.encoder=="function"?e.encoder:B.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:B.encodeValuesOnly,filter:i,format:n,formatter:o,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:B.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:B.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:B.strictNullHandling}},Co=function(t,e){var r=t,n=Oo(e),o,i;typeof n.filter=="function"?(i=n.filter,r=i("",r)):W(n.filter)&&(i=n.filter,o=i);var l=[];if(typeof r!="object"||r===null)return"";var u=wr[n.arrayFormat],s=u==="comma"&&n.commaRoundTrip;o||(o=Object.keys(r)),n.sort&&o.sort(n.sort);for(var f=br(),p=0;p0?v+d:""},ce=hr,yt=Object.prototype.hasOwnProperty,Ao=Array.isArray,A={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:ce.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},Po=function(t){return t.replace(/&#(\d+);/g,function(e,r){return String.fromCharCode(parseInt(r,10))})},Er=function(t,e){return t&&typeof t=="string"&&e.comma&&t.indexOf(",")>-1?t.split(","):t},Bo="utf8=%26%2310003%3B",Io="utf8=%E2%9C%93",$o=function(e,r){var n={__proto__:null},o=r.ignoreQueryPrefix?e.replace(/^\?/,""):e;o=o.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var i=r.parameterLimit===1/0?void 0:r.parameterLimit,l=o.split(r.delimiter,i),u=-1,s,f=r.charset;if(r.charsetSentinel)for(s=0;s-1&&(c=Ao(c)?[c]:c);var m=yt.call(n,v);m&&r.duplicates==="combine"?n[v]=ce.combine(n[v],c):(!m||r.duplicates==="last")&&(n[v]=c)}return n},No=function(t,e,r,n){for(var o=n?e:Er(e,r),i=t.length-1;i>=0;--i){var l,u=t[i];if(u==="[]"&&r.parseArrays)l=r.allowEmptyArrays&&(o===""||r.strictNullHandling&&o===null)?[]:[].concat(o);else{l=r.plainObjects?Object.create(null):{};var s=u.charAt(0)==="["&&u.charAt(u.length-1)==="]"?u.slice(1,-1):u,f=r.decodeDotInKeys?s.replace(/%2E/g,"."):s,p=parseInt(f,10);!r.parseArrays&&f===""?l={0:o}:!isNaN(p)&&u!==f&&String(p)===f&&p>=0&&r.parseArrays&&p<=r.arrayLimit?(l=[],l[p]=o):f!=="__proto__"&&(l[f]=o)}o=l}return o},Do=function(e,r,n,o){if(e){var i=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,l=/(\[[^[\]]*])/,u=/(\[[^[\]]*])/g,s=n.depth>0&&l.exec(i),f=s?i.slice(0,s.index):i,p=[];if(f){if(!n.plainObjects&&yt.call(Object.prototype,f)&&!n.allowPrototypes)return;p.push(f)}for(var y=0;n.depth>0&&(s=u.exec(i))!==null&&y"u"?A.charset:e.charset,n=typeof e.duplicates>"u"?A.duplicates:e.duplicates;if(n!=="combine"&&n!=="first"&&n!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var o=typeof e.allowDots>"u"?e.decodeDotInKeys===!0?!0:A.allowDots:!!e.allowDots;return{allowDots:o,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:A.allowEmptyArrays,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:A.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:A.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:A.arrayLimit,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:A.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:A.comma,decodeDotInKeys:typeof e.decodeDotInKeys=="boolean"?e.decodeDotInKeys:A.decodeDotInKeys,decoder:typeof e.decoder=="function"?e.decoder:A.decoder,delimiter:typeof e.delimiter=="string"||ce.isRegExp(e.delimiter)?e.delimiter:A.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:A.depth,duplicates:n,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:A.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:A.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:A.plainObjects,strictDepth:typeof e.strictDepth=="boolean"?!!e.strictDepth:A.strictDepth,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:A.strictNullHandling}},Fo=function(t,e){var r=ko(e);if(t===""||t===null||typeof t>"u")return r.plainObjects?Object.create(null):{};for(var n=typeof t=="string"?$o(t,r):t,o=r.plainObjects?Object.create(null):{},i=Object.keys(n),l=0;l
'};r.configure=function(c){var m,g;for(m in c)g=c[m],g!==void 0&&c.hasOwnProperty(m)&&(n[m]=g);return this},r.status=null,r.set=function(c){var m=r.isStarted();c=o(c,n.minimum,1),r.status=c===1?null:c;var g=r.render(!m),b=g.querySelector(n.barSelector),S=n.speed,h=n.easing;return g.offsetWidth,u(function(x){n.positionUsing===""&&(n.positionUsing=r.getPositioningCSS()),s(b,l(c,S,h)),c===1?(s(g,{transition:"none",opacity:1}),g.offsetWidth,setTimeout(function(){s(g,{transition:"all "+S+"ms linear",opacity:0}),setTimeout(function(){r.remove(),x()},S)},S)):setTimeout(x,S)}),this},r.isStarted=function(){return typeof r.status=="number"},r.start=function(){r.status||r.set(0);var c=function(){setTimeout(function(){r.status&&(r.trickle(),c())},n.trickleSpeed)};return n.trickle&&c(),this},r.done=function(c){return!c&&!r.status?this:r.inc(.3+.5*Math.random()).set(1)},r.inc=function(c){var m=r.status;return m?(typeof c!="number"&&(c=(1-m)*o(Math.random()*m,.1,.95)),m=o(m+c,0,.994),r.set(m)):r.start()},r.trickle=function(){return r.inc(Math.random()*n.trickleRate)},function(){var c=0,m=0;r.promise=function(g){return!g||g.state()==="resolved"?this:(m===0&&r.start(),c++,m++,g.always(function(){m--,m===0?(c=0,r.done()):r.set((c-m)/c)}),this)}}(),r.render=function(c){if(r.isRendered())return document.getElementById("nprogress");p(document.documentElement,"nprogress-busy");var m=document.createElement("div");m.id="nprogress",m.innerHTML=n.template;var g=m.querySelector(n.barSelector),b=c?"-100":i(r.status||0),S=document.querySelector(n.parent),h;return s(g,{transition:"all 0 linear",transform:"translate3d("+b+"%,0,0)"}),n.showSpinner||(h=m.querySelector(n.spinnerSelector),h&&v(h)),S!=document.body&&p(S,"nprogress-custom-parent"),S.appendChild(m),m},r.remove=function(){y(document.documentElement,"nprogress-busy"),y(document.querySelector(n.parent),"nprogress-custom-parent");var c=document.getElementById("nprogress");c&&v(c)},r.isRendered=function(){return!!document.getElementById("nprogress")},r.getPositioningCSS=function(){var c=document.body.style,m="WebkitTransform"in c?"Webkit":"MozTransform"in c?"Moz":"msTransform"in c?"ms":"OTransform"in c?"O":"";return m+"Perspective"in c?"translate3d":m+"Transform"in c?"translate":"margin"};function o(c,m,g){return cg?g:c}function i(c){return(-1+c)*100}function l(c,m,g){var b;return n.positionUsing==="translate3d"?b={transform:"translate3d("+i(c)+"%,0,0)"}:n.positionUsing==="translate"?b={transform:"translate("+i(c)+"%,0)"}:b={"margin-left":i(c)+"%"},b.transition="all "+m+"ms "+g,b}var u=function(){var c=[];function m(){var g=c.shift();g&&g(m)}return function(g){c.push(g),c.length==1&&m()}}(),s=function(){var c=["Webkit","O","Moz","ms"],m={};function g(x){return x.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(C,P){return P.toUpperCase()})}function b(x){var C=document.body.style;if(x in C)return x;for(var P=c.length,D=x.charAt(0).toUpperCase()+x.slice(1),F;P--;)if(F=c[P]+D,F in C)return F;return x}function S(x){return x=g(x),m[x]||(m[x]=b(x))}function h(x,C,P){C=S(C),x.style[C]=P}return function(x,C){var P=arguments,D,F;if(P.length==2)for(D in C)F=C[D],F!==void 0&&C.hasOwnProperty(D)&&h(x,D,F);else h(x,P[1],P[2])}}();function f(c,m){var g=typeof c=="string"?c:d(c);return g.indexOf(" "+m+" ")>=0}function p(c,m){var g=d(c),b=g+m;f(g,m)||(c.className=b.substring(1))}function y(c,m){var g=d(c),b;f(c,m)&&(b=g.replace(" "+m+" "," "),c.className=b.substring(1,b.length-1))}function d(c){return(" "+(c.className||"")+" ").replace(/\s+/gi," ")}function v(c){c&&c.parentNode&&c.parentNode.removeChild(c)}return r})})(Lo);function Wo(t,e,r,n="brackets"){let o=/^https?:\/\//.test(e.toString()),i=o||e.toString().startsWith("/"),l=!i&&!e.toString().startsWith("#")&&!e.toString().startsWith("?"),u=e.toString().includes("?")||t==="get"&&Object.keys(r).length,s=e.toString().includes("#"),f=new URL(e.toString(),"http://localhost");return t==="get"&&Object.keys(r).length&&(f.search=Or.stringify(xn(Or.parse(f.search,{ignoreQueryPrefix:!0}),r),{encodeValuesOnly:!0,arrayFormat:n}),r={}),[[o?`${f.protocol}//${f.host}`:"",i?f.pathname:"",l?f.pathname.substring(1):"",u?f.search:"",s?f.hash:""].join(""),r]}const Cr={__name:"ModalRenderer",props:{index:{type:Number,required:!0}},setup(t){const e=t,r=Se(),n=a.computed(()=>r.stack.value[e.index]);return a.provide("modalContext",n),(o,i)=>{var l;return(l=n.value)!=null&&l.component?(a.openBlock(),a.createBlock(a.unref(n).component,a.mergeProps({key:0},n.value.props,{onModalEvent:i[0]||(i[0]=(u,...s)=>n.value.emit(u,...s))}),null,16)):a.createCommentVNode("",!0)}}},Ar={__name:"ModalRoot",setup(t){const e=Se(),r=a.ref(!1),n=a.ref(null);a.onUnmounted(k.router.on("start",()=>r.value=!0)),a.onUnmounted(k.router.on("finish",()=>r.value=!1)),a.onUnmounted(k.router.on("navigate",l=>{const u=l.detail.page.props._inertiaui_modal;if(!u){n.value&&e.closeAll();return}n.value=u,e.setBaseUrl(u.baseUrl),e.pushFromResponseData(u,{},()=>{if(!u.baseUrl){console.error("No base url in modal response data so cannot navigate back");return}!r.value&&window.location.href!==u.baseUrl&&k.router.visit(u.baseUrl,{preserveScroll:!0,preserveState:!0})})}));const o=l=>(l.headers["X-InertiaUI-Modal-Base-Url"]=e.getBaseUrl(),l);a.onBeforeMount(()=>{Ce.interceptors.request.use(o)}),a.onUnmounted(()=>{Ce.interceptors.request.eject(o)});const i=k.usePage();return a.watch(()=>{var l;return(l=i.props)==null?void 0:l._inertiaui_modal},(l,u)=>{var s;l&&u&&l.component===u.component&&l.url===u.url&&((s=e.stack.value[0])==null||s.updateProps(l.props??{}))}),(l,u)=>(a.openBlock(),a.createElementBlock(a.Fragment,null,[a.renderSlot(l.$slots,"default"),a.unref(e).stack.value.length?(a.openBlock(),a.createBlock(Cr,{key:0,index:0})):a.createCommentVNode("",!0)],64))}};let mt=null;const vt=a.ref(null),O=a.ref([]),_e=a.ref({}),Uo=t=>{mt=t};class gt{constructor(e,r,n,o,i){N(this,"update",(e,r,n)=>{const o=this.index.value;o>-1&&(O.value[o].config=e,O.value[o].onCloseCallback=r,O.value[o].afterLeaveCallback=n)});N(this,"getParentModal",()=>{const e=this.index.value;return e<1?null:O.value.slice(0,e).reverse().find(r=>r.isOpen)});N(this,"getChildModal",()=>{const e=this.index.value;return e===O.value.length-1?null:O.value.slice(e+1).find(r=>r.isOpen)});N(this,"show",()=>{const e=this.index.value;if(e>-1){if(O.value[e].isOpen)return;O.value[e].isOpen=!0,O.value[e].shouldRender=!0}});N(this,"close",()=>{var r;const e=this.index.value;if(e>-1){if(!O.value[e].isOpen)return;Object.keys(this.listeners).forEach(n=>{this.off(n)}),O.value[e].isOpen=!1,(r=this.onCloseCallback)==null||r.call(this),this.onCloseCallback=null}});N(this,"setOpen",e=>{e?this.show():this.close()});N(this,"afterLeave",()=>{var r;const e=this.index.value;if(e>-1){if(O.value[e].isOpen)return;O.value[e].shouldRender=!1,(r=this.afterLeaveCallback)==null||r.call(this),this.afterLeaveCallback=null}e===0&&(O.value=[])});N(this,"on",(e,r)=>{this.listeners[e]=this.listeners[e]??[],this.listeners[e].push(r)});N(this,"off",(e,r)=>{var n;r?this.listeners[e]=((n=this.listeners[e])==null?void 0:n.filter(o=>o!==r))??[]:delete this.listeners[e]});N(this,"emit",(e,...r)=>{var n;(n=this.listeners[e])==null||n.forEach(o=>o(...r))});N(this,"registerEventListenersFromAttrs",e=>{const r=[];return Object.keys(e).filter(n=>n.startsWith("on")).forEach(n=>{const o=n.replace(/^on/,"").replace(/^./,i=>i.toLowerCase()).replace(/([A-Z])/g,"-$1").toLowerCase();this.on(o,e[n]),r.push(()=>this.off(o,e[n]))}),()=>r.forEach(n=>n())});N(this,"reload",(e={})=>{var n;let r=Object.keys(this.response.props);e.only&&(r=Dt(r,e.only)),e.except&&(r=tn(r,e.except)),(n=this.response)!=null&&n.url&&Ce.get(this.response.url,{headers:{Accept:"text/html, application/xhtml+xml","X-Inertia":!0,"X-Inertia-Partial-Component":this.response.component,"X-Inertia-Version":this.response.version,"X-Inertia-Partial-Data":r.join(","),"X-InertiaUI-Modal":!0,"X-InertiaUI-Modal-Use-Router":0}}).then(o=>{this.updateProps(o.data.props)})});N(this,"updateProps",e=>{Object.assign(this.props.value,e)});this.id=gt.generateId(),this.isOpen=!1,this.shouldRender=!1,this.listeners={},this.component=e,this.props=a.ref(r.props),this.response=r,this.config=n,this.onCloseCallback=o,this.afterLeaveCallback=i,this.index=a.computed(()=>O.value.findIndex(l=>l.id===this.id)),this.onTopOfStack=a.computed(()=>{var u;return O.value.length<2?!0:((u=O.value.map(s=>({id:s.id,shouldRender:s.shouldRender})).reverse().find(s=>s.shouldRender))==null?void 0:u.id)===this.id})}static generateId(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?`inertiaui_modal_${crypto.randomUUID()}`:`inertiaui_modal_${Date.now().toString(36)}_${Math.random().toString(36).substr(2,9)}`}}function jo(t,e){_e.value[t]={name:t,callback:e}}function Vo(t,e,r,n){if(!_e.value[t])throw new Error(`The local modal "${t}" has not been registered.`);const o=ht(null,{},e,r,n);return o.name=t,_e.value[t].callback(o),o}function Pr(t,e={},r=null,n=null){return mt(t.component).then(o=>ht(a.markRaw(o),t,e,r,n))}function qo(t,e,r={},n={},o={},i=null,l=null,u="brackets",s=!1){return new Promise((f,p)=>{if(t.startsWith("#")){f(Vo(t.substring(1),o,i,l));return}const[y,d]=Wo(e,t||"",r,u);let v=s&&O.value.length===0;if(O.value.length===0&&(vt.value=typeof window<"u"?window.location.href:""),n={...n,Accept:"text/html, application/xhtml+xml","X-Requested-With":"XMLHttpRequest","X-Inertia":!0,"X-Inertia-Version":k.usePage().version,"X-InertiaUI-Modal":!0,"X-InertiaUI-Modal-Use-Router":v?1:0},v)return k.router.visit(y,{method:e,data:d,headers:n,preserveScroll:!0,preserveState:!0,onError:p,onFinish:()=>nn(()=>O.value[0]).then(c=>{const m=c.onCloseCallback,g=c.afterLeaveCallback;c.update(o,()=>{i==null||i(),m==null||m()},()=>{l==null||l(),g==null||g()}),f(c)})});Ce({url:y,method:e,data:d,headers:n}).then(c=>f(Pr(c.data,o,i,l))).catch(p)})}function ht(t,e,r,n,o){const i=new gt(t,e,r,n,o);return O.value.push(i),a.nextTick(()=>{i.show()}),i}const zo=["closeButton","closeExplicitly","maxWidth","paddingClasses","panelClasses","position","slideover"],Ko=(t,e)=>(e.resolveComponent&&(mt=e.resolveComponent),()=>a.h(Ar,()=>a.h(t,e)));function Se(){return{setComponentResolver:Uo,getBaseUrl:()=>vt.value,setBaseUrl:t=>vt.value=t,stack:a.readonly(O),push:ht,pushFromResponseData:Pr,closeAll:()=>[...O.value].reverse().forEach(t=>t.close()),reset:()=>O.value=[],visit:qo,registerLocalModal:jo,removeLocalModal:t=>delete _e.value[t]}}const Br=Object.assign({inheritAttrs:!1},{__name:"HeadlessModal",props:{name:{type:String,required:!1},slideover:{type:Boolean,default:null},closeButton:{type:Boolean,default:null},closeExplicitly:{type:Boolean,default:null},maxWidth:{type:String,default:null},paddingClasses:{type:[Boolean,String],default:null},panelClasses:{type:[Boolean,String],default:null},position:{type:String,default:null}},emits:["modal-event"],setup(t,{expose:e,emit:r}){const n=t,o=Se(),i=n.name?a.ref({}):a.inject("modalContext"),l=a.computed(()=>{var c;const v=((c=i.value.config)==null?void 0:c.slideover)??n.slideover??Pe("type")==="slideover";return{slideover:v,closeButton:n.closeButton??ee(v,"closeButton"),closeExplicitly:n.closeExplicitly??ee(v,"closeExplicitly"),maxWidth:n.maxWidth??ee(v,"maxWidth"),paddingClasses:n.paddingClasses??ee(v,"paddingClasses"),panelClasses:n.panelClasses??ee(v,"panelClasses"),position:n.position??ee(v,"position"),...i.value.config}});n.name&&(o.registerLocalModal(n.name,function(v){i.value=v,f()}),a.onBeforeUnmount(()=>{o.removeLocalModal(n.name)})),a.onMounted(()=>{n.name||f()});const u=a.ref(null);a.onBeforeUnmount(()=>{var v;return(v=u.value)==null?void 0:v.call(u)});const s=a.useAttrs();function f(){u.value=i.value.registerEventListenersFromAttrs(s)}const p=r;function y(v,...c){p("modal-event",v,...c)}e({afterLeave:i.value.afterLeave,close:i.value.close,config:l.value,emit:y,getChildModal:i.value.getChildModal,getParentModal:i.value.getParentModal,id:i.value.id,index:i.value.index,isOpen:i.value.isOpen,modalContext:i.value,onTopOfStack:i.value.onTopOfStack,reload:i.value.reload,setOpen:i.value.setOpen,shouldRender:i.value.shouldRender});const d=a.computed(()=>{var v;return(v=o.stack.value.find(c=>c.shouldRender&&c.index>i.value.index))==null?void 0:v.index});return(v,c)=>(a.openBlock(),a.createElementBlock(a.Fragment,null,[a.unref(i).shouldRender?a.renderSlot(v.$slots,"default",{key:0,id:a.unref(i).id,afterLeave:a.unref(i).afterLeave,close:a.unref(i).close,config:l.value,emit:y,getChildModal:a.unref(i).getChildModal,getParentModal:a.unref(i).getParentModal,index:a.unref(i).index,isOpen:a.unref(i).isOpen,modalContext:a.unref(i),onTopOfStack:a.unref(i).onTopOfStack,reload:a.unref(i).reload,setOpen:a.unref(i).setOpen,shouldRender:a.unref(i).shouldRender}):a.createCommentVNode("",!0),d.value?(a.openBlock(),a.createBlock(Cr,{key:1,index:d.value},null,8,["index"])):a.createCommentVNode("",!0)],64))}});function bt(t,e){const r=typeof t=="string"&&!e?`${t}Context`:e,n=Symbol(r);return[o=>{const i=a.inject(n,o);if(i||i===null)return i;throw new Error(`Injection \`${n.toString()}\` not found. Component must be used within ${Array.isArray(t)?`one of the following components: ${t.join(", ")}`:`\`${t}\``}`)},o=>(a.provide(n,o),o)]}function Ir(t,e,r){const n=r.originalEvent.target,o=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&n.addEventListener(t,e,{once:!0}),n.dispatchEvent(o)}function $r(t){return a.getCurrentScope()?(a.onScopeDispose(t),!0):!1}function Go(t){let e=!1,r;const n=a.effectScope(!0);return(...o)=>(e||(r=n.run(()=>t(...o)),e=!0),r)}function Ho(t){let e=0,r,n;const o=()=>{e-=1,n&&e<=0&&(n.stop(),r=void 0,n=void 0)};return(...i)=>(e+=1,r||(n=a.effectScope(!0),r=n.run(()=>t(...i))),$r(o),r)}function wt(t){return typeof t=="function"?t():a.unref(t)}const Z=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Qo=t=>typeof t<"u",Jo=Object.prototype.toString,Xo=t=>Jo.call(t)==="[object Object]",Yo=()=>{},Nr=Zo();function Zo(){var t,e;return Z&&((t=window==null?void 0:window.navigator)==null?void 0:t.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((e=window==null?void 0:window.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function Mo(t){return a.getCurrentInstance()}function ei(t,e){Mo()&&a.onBeforeUnmount(t,e)}function Ee(t){var e;const r=wt(t);return(e=r==null?void 0:r.$el)!=null?e:r}const Dr=Z?window:void 0;function kr(...t){let e,r,n,o;if(typeof t[0]=="string"||Array.isArray(t[0])?([r,n,o]=t,e=Dr):[e,r,n,o]=t,!e)return Yo;Array.isArray(r)||(r=[r]),Array.isArray(n)||(n=[n]);const i=[],l=()=>{i.forEach(p=>p()),i.length=0},u=(p,y,d,v)=>(p.addEventListener(y,d,v),()=>p.removeEventListener(y,d,v)),s=a.watch(()=>[Ee(e),wt(o)],([p,y])=>{if(l(),!p)return;const d=Xo(y)?{...y}:y;i.push(...r.flatMap(v=>n.map(c=>u(p,v,c,d))))},{immediate:!0,flush:"post"}),f=()=>{s(),l()};return $r(f),f}function ti(t){return typeof t=="function"?t:typeof t=="string"?e=>e.key===t:Array.isArray(t)?e=>t.includes(e.key):()=>!0}function ri(...t){let e,r,n={};t.length===3?(e=t[0],r=t[1],n=t[2]):t.length===2?typeof t[1]=="object"?(e=!0,r=t[0],n=t[1]):(e=t[0],r=t[1]):(e=!0,r=t[0]);const{target:o=Dr,eventName:i="keydown",passive:l=!1,dedupe:u=!1}=n,s=ti(e);return kr(o,i,f=>{f.repeat&&wt(u)||s(f)&&r(f)},l)}function ni(){const t=a.ref(!1),e=a.getCurrentInstance();return e&&a.onMounted(()=>{t.value=!0},e),t}function ai(t){return JSON.parse(JSON.stringify(t))}function oi(t,e,r,n={}){var o,i,l;const{clone:u=!1,passive:s=!1,eventName:f,deep:p=!1,defaultValue:y,shouldEmit:d}=n,v=a.getCurrentInstance(),c=r||(v==null?void 0:v.emit)||((o=v==null?void 0:v.$emit)==null?void 0:o.bind(v))||((l=(i=v==null?void 0:v.proxy)==null?void 0:i.$emit)==null?void 0:l.bind(v==null?void 0:v.proxy));let m=f;m=m||`update:${e.toString()}`;const g=h=>u?typeof u=="function"?u(h):ai(h):h,b=()=>Qo(t[e])?g(t[e]):y,S=h=>{d?d(h)&&c(m,h):c(m,h)};if(s){const h=b(),x=a.ref(h);let C=!1;return a.watch(()=>t[e],P=>{C||(C=!0,x.value=g(P),a.nextTick(()=>C=!1))}),a.watch(x,P=>{!C&&(P!==t[e]||p)&&S(P)},{deep:p}),x}else return a.computed({get(){return b()},set(h){S(h)}})}function xt(t){return t?t.flatMap(e=>e.type===a.Fragment?xt(e.children):[e]):[]}function St(t){if(t===null||typeof t!="object")return!1;const e=Object.getPrototypeOf(t);return e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null||Symbol.iterator in t?!1:Symbol.toStringTag in t?Object.prototype.toString.call(t)==="[object Module]":!0}function Et(t,e,r=".",n){if(!St(e))return Et(t,{},r);const o=Object.assign({},e);for(const i in t){if(i==="__proto__"||i==="constructor")continue;const l=t[i];l!=null&&(Array.isArray(l)&&Array.isArray(o[i])?o[i]=[...l,...o[i]]:St(l)&&St(o[i])?o[i]=Et(l,o[i],(r?`${r}.`:"")+i.toString()):o[i]=l)}return o}function ii(t){return(...e)=>e.reduce((r,n)=>Et(r,n,""),{})}const li=ii(),[Fr,cl]=bt("ConfigProvider");let ui="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",si=(t=21)=>{let e="",r=t;for(;r--;)e+=ui[Math.random()*64|0];return e};const ci=Ho(()=>{const t=a.ref(new Map),e=a.ref(),r=a.computed(()=>{for(const l of t.value.values())if(l)return!0;return!1}),n=Fr({scrollBody:a.ref(!0)});let o=null;const i=()=>{document.body.style.paddingRight="",document.body.style.marginRight="",document.body.style.pointerEvents="",document.body.style.removeProperty("--scrollbar-width"),document.body.style.overflow=e.value??"",Nr&&(o==null||o()),e.value=void 0};return a.watch(r,(l,u)=>{var s;if(!Z)return;if(!l){u&&i();return}e.value===void 0&&(e.value=document.body.style.overflow);const f=window.innerWidth-document.documentElement.clientWidth,p={padding:f,margin:0},y=(s=n.scrollBody)!=null&&s.value?typeof n.scrollBody.value=="object"?li({padding:n.scrollBody.value.padding===!0?f:n.scrollBody.value.padding,margin:n.scrollBody.value.margin===!0?f:n.scrollBody.value.margin},p):p:{padding:0,margin:0};f>0&&(document.body.style.paddingRight=typeof y.padding=="number"?`${y.padding}px`:String(y.padding),document.body.style.marginRight=typeof y.margin=="number"?`${y.margin}px`:String(y.margin),document.body.style.setProperty("--scrollbar-width",`${f}px`),document.body.style.overflow="hidden"),Nr&&(o=kr(document,"touchmove",d=>{var v;d.target===document.documentElement&&(d.touches.length>1||(v=d.preventDefault)==null||v.call(d))},{passive:!1})),a.nextTick(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})},{immediate:!0,flush:"sync"}),t});function fi(t){const e=si(6),r=ci();r.value.set(e,t);const n=a.computed({get:()=>r.value.get(e)??!1,set:o=>r.value.set(e,o)});return ei(()=>{r.value.delete(e)}),n}function Ot(t){const e=a.getCurrentInstance(),r=e==null?void 0:e.type.emits,n={};return r!=null&&r.length||console.warn(`No emitted event found. Please check component: ${e==null?void 0:e.type.__name}`),r==null||r.forEach(o=>{n[a.toHandlerKey(a.camelize(o))]=(...i)=>t(o,...i)}),n}function T(){const t=a.getCurrentInstance(),e=a.ref(),r=a.computed(()=>{var l,u;return["#text","#comment"].includes((l=e.value)==null?void 0:l.$el.nodeName)?(u=e.value)==null?void 0:u.$el.nextElementSibling:Ee(e)}),n=Object.assign({},t.exposed),o={};for(const l in t.props)Object.defineProperty(o,l,{enumerable:!0,configurable:!0,get:()=>t.props[l]});if(Object.keys(n).length>0)for(const l in n)Object.defineProperty(o,l,{enumerable:!0,configurable:!0,get:()=>n[l]});Object.defineProperty(o,"$el",{enumerable:!0,configurable:!0,get:()=>t.vnode.el}),t.exposed=o;function i(l){e.value=l,!(l instanceof Element||!l)&&(Object.defineProperty(o,"$el",{enumerable:!0,configurable:!0,get:()=>l.$el}),t.exposed=o)}return{forwardRef:i,currentRef:e,currentElement:r}}var di=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},fe=new WeakMap,Le=new WeakMap,We={},Ct=0,Tr=function(t){return t&&(t.host||Tr(t.parentNode))},pi=function(t,e){return e.map(function(r){if(t.contains(r))return r;var n=Tr(r);return n&&t.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",t,". Doing nothing"),null)}).filter(function(r){return!!r})},yi=function(t,e,r,n){var o=pi(e,Array.isArray(t)?t:[t]);We[r]||(We[r]=new WeakMap);var i=We[r],l=[],u=new Set,s=new Set(o),f=function(y){!y||u.has(y)||(u.add(y),f(y.parentNode))};o.forEach(f);var p=function(y){!y||s.has(y)||Array.prototype.forEach.call(y.children,function(d){if(u.has(d))p(d);else try{var v=d.getAttribute(n),c=v!==null&&v!=="false",m=(fe.get(d)||0)+1,g=(i.get(d)||0)+1;fe.set(d,m),i.set(d,g),l.push(d),m===1&&c&&Le.set(d,!0),g===1&&d.setAttribute(r,"true"),c||d.setAttribute(n,"true")}catch(b){console.error("aria-hidden: cannot operate on ",d,b)}})};return p(e),u.clear(),Ct++,function(){l.forEach(function(y){var d=fe.get(y)-1,v=i.get(y)-1;fe.set(y,d),i.set(y,v),d||(Le.has(y)||y.removeAttribute(n),Le.delete(y)),v||y.removeAttribute(r)}),Ct--,Ct||(fe=new WeakMap,fe=new WeakMap,Le=new WeakMap,We={})}},mi=function(t,e,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),o=di(t);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live]"))),yi(n,o,r,"aria-hidden")):function(){return null}};function vi(t){let e;a.watch(()=>Ee(t),r=>{r?e=mi(r):e&&e()}),a.onUnmounted(()=>{e&&e()})}let gi=0;function Rr(t,e="radix"){const r=Fr({useId:void 0});return Nt.useId?`${e}-${Nt.useId()}`:r.useId?`${e}-${r.useId()}`:`${e}-${++gi}`}function hi(t,e){const r=a.ref(t);function n(o){return e[r.value][o]??r.value}return{state:r,dispatch:o=>{r.value=n(o)}}}const At=a.defineComponent({name:"PrimitiveSlot",inheritAttrs:!1,setup(t,{attrs:e,slots:r}){return()=>{var n,o;if(!r.default)return null;const i=xt(r.default()),l=i.findIndex(p=>p.type!==a.Comment);if(l===-1)return i;const u=i[l];(n=u.props)==null||delete n.ref;const s=u.props?a.mergeProps(e,u.props):e;e.class&&(o=u.props)!=null&&o.class&&delete u.props.class;const f=a.cloneVNode(u,s);for(const p in s)p.startsWith("on")&&(f.props||(f.props={}),f.props[p]=s[p]);return i.length===1?f:(i[l]=f,i)}}}),de=a.defineComponent({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(t,{attrs:e,slots:r}){const n=t.asChild?"template":t.as;return typeof n=="string"&&["area","img","input"].includes(n)?()=>a.h(n,e):n!=="template"?()=>a.h(t.as,e,{default:r.default}):()=>a.h(At,e,{default:r.default})}});function _r(){const t=a.ref(),e=a.computed(()=>{var r,n;return["#text","#comment"].includes((r=t.value)==null?void 0:r.$el.nodeName)?(n=t.value)==null?void 0:n.$el.nextElementSibling:Ee(t)});return{primitiveElement:t,currentElement:e}}function bi(t,e){const r=a.ref({}),n=a.ref("none"),o=t.value?"mounted":"unmounted",{state:i,dispatch:l}=hi(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),u=d=>{var v;if(Z){const c=new CustomEvent(d,{bubbles:!1,cancelable:!1});(v=e.value)==null||v.dispatchEvent(c)}};a.watch(t,async(d,v)=>{var c;const m=v!==d;if(await a.nextTick(),m){const g=n.value,b=Ue(e.value);d?(l("MOUNT"),u("enter"),b==="none"&&u("after-enter")):b==="none"||((c=r.value)==null?void 0:c.display)==="none"?(l("UNMOUNT"),u("leave"),u("after-leave")):v&&g!==b?(l("ANIMATION_OUT"),u("leave")):(l("UNMOUNT"),u("after-leave"))}},{immediate:!0});const s=d=>{const v=Ue(e.value),c=v.includes(d.animationName),m=i.value==="mounted"?"enter":"leave";d.target===e.value&&c&&(u(`after-${m}`),l("ANIMATION_END")),d.target===e.value&&v==="none"&&l("ANIMATION_END")},f=d=>{d.target===e.value&&(n.value=Ue(e.value))},p=a.watch(e,(d,v)=>{d?(r.value=getComputedStyle(d),d.addEventListener("animationstart",f),d.addEventListener("animationcancel",s),d.addEventListener("animationend",s)):(l("ANIMATION_END"),v==null||v.removeEventListener("animationstart",f),v==null||v.removeEventListener("animationcancel",s),v==null||v.removeEventListener("animationend",s))},{immediate:!0}),y=a.watch(i,()=>{const d=Ue(e.value);n.value=i.value==="mounted"?d:"none"});return a.onUnmounted(()=>{p(),y()}),{isPresent:a.computed(()=>["mounted","unmountSuspended"].includes(i.value))}}function Ue(t){return t&&getComputedStyle(t).animationName||"none"}const Lr=a.defineComponent({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(t,{slots:e,expose:r}){var n;const{present:o,forceMount:i}=a.toRefs(t),l=a.ref(),{isPresent:u}=bi(o,l);r({present:u});let s=e.default({present:u});s=xt(s||[]);const f=a.getCurrentInstance();if(s&&(s==null?void 0:s.length)>1){const p=(n=f==null?void 0:f.parent)!=null&&n.type.name?`<${f.parent.type.name} />`:"component";throw new Error([`Detected an invalid children for \`${p}\` for \`Presence\` component.`,"","Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.","You can apply a few solutions:",["Provide a single child element so that `presence` directive attach correctly.","Ensure the first child is an actual element instead of a raw text node or comment node."].map(y=>` - ${y}`).join(` `)].join(` -`))}return()=>i.value||o.value||u.value?a.h(e.default({present:u})[0],{ref:p=>{const y=Ee(p);return typeof(y==null?void 0:y.hasAttribute)>"u"||(y!=null&&y.hasAttribute("data-radix-popper-content-wrapper")?l.value=y.firstElementChild:l.value=y),y}}):null}}),[z,wi]=bt("DialogRoot"),xi=a.defineComponent({inheritAttrs:!1,__name:"DialogRoot",props:{open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1},modal:{type:Boolean,default:!0}},emits:["update:open"],setup(t,{emit:e}){const r=t,n=oi(r,"open",e,{defaultValue:r.defaultOpen,passive:r.open===void 0}),o=a.ref(),i=a.ref(),{modal:l}=a.toRefs(r);return wi({open:n,modal:l,openModal:()=>{n.value=!0},onOpenChange:u=>{n.value=u},onOpenToggle:()=>{n.value=!n.value},contentId:"",titleId:"",descriptionId:"",triggerElement:o,contentElement:i}),(u,c)=>a.renderSlot(u.$slots,"default",{open:a.unref(n)})}}),Si=a.defineComponent({__name:"Teleport",props:{to:{default:"body"},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(t){const e=ni();return(r,n)=>a.unref(e)||r.forceMount?(a.openBlock(),a.createBlock(a.Teleport,{key:0,to:r.to,disabled:r.disabled},[a.renderSlot(r.$slots,"default")],8,["to","disabled"])):a.createCommentVNode("",!0)}}),Ei=a.defineComponent({__name:"DialogPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(t){const e=t;return(r,n)=>(a.openBlock(),a.createBlock(a.unref(Si),a.normalizeProps(a.guardReactiveProps(e)),{default:a.withCtx(()=>[a.renderSlot(r.$slots,"default")]),_:3},16))}}),Oi="dismissableLayer.pointerDownOutside",Ci="dismissableLayer.focusOutside";function Wr(t,e){const r=e.closest("[data-dismissable-layer]"),n=t.dataset.dismissableLayer===""?t:t.querySelector("[data-dismissable-layer]"),o=Array.from(t.ownerDocument.querySelectorAll("[data-dismissable-layer]"));return!!(r&&n===r||o.indexOf(n){});return a.watchEffect(l=>{if(!Z)return;const u=async f=>{const p=f.target;if(e!=null&&e.value){if(Wr(e.value,p)){o.value=!1;return}if(f.target&&!o.value){let y=function(){Ir(Oi,t,d)};const d={originalEvent:f};f.pointerType==="touch"?(n.removeEventListener("click",i.value),i.value=y,n.addEventListener("click",i.value,{once:!0})):y()}else n.removeEventListener("click",i.value);o.value=!1}},c=window.setTimeout(()=>{n.addEventListener("pointerdown",u)},0);l(()=>{window.clearTimeout(c),n.removeEventListener("pointerdown",u),n.removeEventListener("click",i.value)})}),{onPointerDownCapture:()=>o.value=!0}}function Pi(t,e){var r;const n=((r=e==null?void 0:e.value)==null?void 0:r.ownerDocument)??(globalThis==null?void 0:globalThis.document),o=a.ref(!1);return a.watchEffect(i=>{if(!Z)return;const l=async u=>{e!=null&&e.value&&(await a.nextTick(),!(!e.value||Wr(e.value,u.target))&&u.target&&!o.value&&Ir(Ci,t,{originalEvent:u}))};n.addEventListener("focusin",l),i(()=>n.removeEventListener("focusin",l))}),{onFocusCapture:()=>o.value=!0,onBlurCapture:()=>o.value=!1}}const U=a.reactive({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Bi=a.defineComponent({__name:"DismissableLayer",props:{disableOutsidePointerEvents:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss"],setup(t,{emit:e}){const r=t,n=e,{forwardRef:o,currentElement:i}=T(),l=a.computed(()=>{var s;return((s=i.value)==null?void 0:s.ownerDocument)??globalThis.document}),u=a.computed(()=>U.layersRoot),c=a.computed(()=>i.value?Array.from(u.value).indexOf(i.value):-1),f=a.computed(()=>U.layersWithOutsidePointerEventsDisabled.size>0),p=a.computed(()=>{const s=Array.from(u.value),[m]=[...U.layersWithOutsidePointerEventsDisabled].slice(-1),h=s.indexOf(m);return c.value>=h}),y=Ai(async s=>{const m=[...U.branches].some(h=>h==null?void 0:h.contains(s.target));!p.value||m||(n("pointerDownOutside",s),n("interactOutside",s),await a.nextTick(),s.defaultPrevented||n("dismiss"))},i),d=Pi(s=>{[...U.branches].some(m=>m==null?void 0:m.contains(s.target))||(n("focusOutside",s),n("interactOutside",s),s.defaultPrevented||n("dismiss"))},i);ri("Escape",s=>{c.value===u.value.size-1&&(n("escapeKeyDown",s),s.defaultPrevented||n("dismiss"))});let v;return a.watchEffect(s=>{i.value&&(r.disableOutsidePointerEvents&&(U.layersWithOutsidePointerEventsDisabled.size===0&&(v=l.value.body.style.pointerEvents,l.value.body.style.pointerEvents="none"),U.layersWithOutsidePointerEventsDisabled.add(i.value)),u.value.add(i.value),s(()=>{r.disableOutsidePointerEvents&&U.layersWithOutsidePointerEventsDisabled.size===1&&(l.value.body.style.pointerEvents=v)}))}),a.watchEffect(s=>{s(()=>{i.value&&(u.value.delete(i.value),U.layersWithOutsidePointerEventsDisabled.delete(i.value))})}),(s,m)=>(a.openBlock(),a.createBlock(a.unref(de),{ref:a.unref(o),"as-child":s.asChild,as:s.as,"data-dismissable-layer":"",style:a.normalizeStyle({pointerEvents:f.value?p.value?"auto":"none":void 0}),onFocusCapture:a.unref(d).onFocusCapture,onBlurCapture:a.unref(d).onBlurCapture,onPointerdownCapture:a.unref(y).onPointerDownCapture},{default:a.withCtx(()=>[a.renderSlot(s.$slots,"default")]),_:3},8,["as-child","as","style","onFocusCapture","onBlurCapture","onPointerdownCapture"]))}}),Pt="focusScope.autoFocusOnMount",Bt="focusScope.autoFocusOnUnmount",Ur={bubbles:!1,cancelable:!0};function Ii(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(K(n,{select:e}),document.activeElement!==r)return!0}function $i(t){const e=jr(t),r=Vr(e,t),n=Vr(e.reverse(),t);return[r,n]}function jr(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function Vr(t,e){for(const r of t)if(!Ni(r,{upTo:e}))return r}function Ni(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function ki(t){return t instanceof HTMLInputElement&&"select"in t}function K(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&ki(t)&&e&&t.select()}}const Di=Go(()=>a.ref([]));function Fi(){const t=Di();return{add(e){const r=t.value[0];e!==r&&(r==null||r.pause()),t.value=qr(t.value,e),t.value.unshift(e)},remove(e){var r;t.value=qr(t.value,e),(r=t.value[0])==null||r.resume()}}}function qr(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function Ti(t){return t.filter(e=>e.tagName!=="A")}const Ri=a.defineComponent({__name:"FocusScope",props:{loop:{type:Boolean,default:!1},trapped:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["mountAutoFocus","unmountAutoFocus"],setup(t,{emit:e}){const r=t,n=e,{currentRef:o,currentElement:i}=T(),l=a.ref(null),u=Fi(),c=a.reactive({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});a.watchEffect(p=>{if(!Z)return;const y=i.value;if(!r.trapped)return;function d(h){if(c.paused||!y)return;const b=h.target;y.contains(b)?l.value=b:K(l.value,{select:!0})}function v(h){if(c.paused||!y)return;const b=h.relatedTarget;b!==null&&(y.contains(b)||K(l.value,{select:!0}))}function s(h){y.contains(l.value)||K(y)}document.addEventListener("focusin",d),document.addEventListener("focusout",v);const m=new MutationObserver(s);y&&m.observe(y,{childList:!0,subtree:!0}),p(()=>{document.removeEventListener("focusin",d),document.removeEventListener("focusout",v),m.disconnect()})}),a.watchEffect(async p=>{const y=i.value;if(await a.nextTick(),!y)return;u.add(c);const d=document.activeElement;if(!y.contains(d)){const v=new CustomEvent(Pt,Ur);y.addEventListener(Pt,s=>n("mountAutoFocus",s)),y.dispatchEvent(v),v.defaultPrevented||(Ii(Ti(jr(y)),{select:!0}),document.activeElement===d&&K(y))}p(()=>{y.removeEventListener(Pt,m=>n("mountAutoFocus",m));const v=new CustomEvent(Bt,Ur),s=m=>{n("unmountAutoFocus",m)};y.addEventListener(Bt,s),y.dispatchEvent(v),setTimeout(()=>{v.defaultPrevented||K(d??document.body,{select:!0}),y.removeEventListener(Bt,s),u.remove(c)},0)})});function f(p){if(!r.loop&&!r.trapped||c.paused)return;const y=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,d=document.activeElement;if(y&&d){const v=p.currentTarget,[s,m]=$i(v);s&&m?!p.shiftKey&&d===m?(p.preventDefault(),r.loop&&K(s,{select:!0})):p.shiftKey&&d===s&&(p.preventDefault(),r.loop&&K(m,{select:!0})):d===v&&p.preventDefault()}}return(p,y)=>(a.openBlock(),a.createBlock(a.unref(de),{ref_key:"currentRef",ref:o,tabindex:"-1","as-child":p.asChild,as:p.as,onKeydown:f},{default:a.withCtx(()=>[a.renderSlot(p.$slots,"default")]),_:3},8,["as-child","as"]))}});function _i(t){return t?"open":"closed"}const Li="DialogTitle",Wi="DialogContent";function Ui({titleName:t=Li,contentName:e=Wi,componentLink:r="dialog.html#title",titleId:n,descriptionId:o,contentElement:i}){const l=`Warning: \`${e}\` requires a \`${t}\` for the component to be accessible for screen reader users. +`))}return()=>i.value||o.value||u.value?a.h(e.default({present:u})[0],{ref:p=>{const y=Ee(p);return typeof(y==null?void 0:y.hasAttribute)>"u"||(y!=null&&y.hasAttribute("data-radix-popper-content-wrapper")?l.value=y.firstElementChild:l.value=y),y}}):null}}),[z,wi]=bt("DialogRoot"),xi=a.defineComponent({inheritAttrs:!1,__name:"DialogRoot",props:{open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1},modal:{type:Boolean,default:!0}},emits:["update:open"],setup(t,{emit:e}){const r=t,n=oi(r,"open",e,{defaultValue:r.defaultOpen,passive:r.open===void 0}),o=a.ref(),i=a.ref(),{modal:l}=a.toRefs(r);return wi({open:n,modal:l,openModal:()=>{n.value=!0},onOpenChange:u=>{n.value=u},onOpenToggle:()=>{n.value=!n.value},contentId:"",titleId:"",descriptionId:"",triggerElement:o,contentElement:i}),(u,s)=>a.renderSlot(u.$slots,"default",{open:a.unref(n)})}}),Si=a.defineComponent({__name:"Teleport",props:{to:{default:"body"},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(t){const e=ni();return(r,n)=>a.unref(e)||r.forceMount?(a.openBlock(),a.createBlock(a.Teleport,{key:0,to:r.to,disabled:r.disabled},[a.renderSlot(r.$slots,"default")],8,["to","disabled"])):a.createCommentVNode("",!0)}}),Ei=a.defineComponent({__name:"DialogPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(t){const e=t;return(r,n)=>(a.openBlock(),a.createBlock(a.unref(Si),a.normalizeProps(a.guardReactiveProps(e)),{default:a.withCtx(()=>[a.renderSlot(r.$slots,"default")]),_:3},16))}}),Oi="dismissableLayer.pointerDownOutside",Ci="dismissableLayer.focusOutside";function Wr(t,e){const r=e.closest("[data-dismissable-layer]"),n=t.dataset.dismissableLayer===""?t:t.querySelector("[data-dismissable-layer]"),o=Array.from(t.ownerDocument.querySelectorAll("[data-dismissable-layer]"));return!!(r&&n===r||o.indexOf(n){});return a.watchEffect(l=>{if(!Z)return;const u=async f=>{const p=f.target;if(e!=null&&e.value){if(Wr(e.value,p)){o.value=!1;return}if(f.target&&!o.value){let y=function(){Ir(Oi,t,d)};const d={originalEvent:f};f.pointerType==="touch"?(n.removeEventListener("click",i.value),i.value=y,n.addEventListener("click",i.value,{once:!0})):y()}else n.removeEventListener("click",i.value);o.value=!1}},s=window.setTimeout(()=>{n.addEventListener("pointerdown",u)},0);l(()=>{window.clearTimeout(s),n.removeEventListener("pointerdown",u),n.removeEventListener("click",i.value)})}),{onPointerDownCapture:()=>o.value=!0}}function Pi(t,e){var r;const n=((r=e==null?void 0:e.value)==null?void 0:r.ownerDocument)??(globalThis==null?void 0:globalThis.document),o=a.ref(!1);return a.watchEffect(i=>{if(!Z)return;const l=async u=>{e!=null&&e.value&&(await a.nextTick(),!(!e.value||Wr(e.value,u.target))&&u.target&&!o.value&&Ir(Ci,t,{originalEvent:u}))};n.addEventListener("focusin",l),i(()=>n.removeEventListener("focusin",l))}),{onFocusCapture:()=>o.value=!0,onBlurCapture:()=>o.value=!1}}const U=a.reactive({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Bi=a.defineComponent({__name:"DismissableLayer",props:{disableOutsidePointerEvents:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss"],setup(t,{emit:e}){const r=t,n=e,{forwardRef:o,currentElement:i}=T(),l=a.computed(()=>{var c;return((c=i.value)==null?void 0:c.ownerDocument)??globalThis.document}),u=a.computed(()=>U.layersRoot),s=a.computed(()=>i.value?Array.from(u.value).indexOf(i.value):-1),f=a.computed(()=>U.layersWithOutsidePointerEventsDisabled.size>0),p=a.computed(()=>{const c=Array.from(u.value),[m]=[...U.layersWithOutsidePointerEventsDisabled].slice(-1),g=c.indexOf(m);return s.value>=g}),y=Ai(async c=>{const m=[...U.branches].some(g=>g==null?void 0:g.contains(c.target));!p.value||m||(n("pointerDownOutside",c),n("interactOutside",c),await a.nextTick(),c.defaultPrevented||n("dismiss"))},i),d=Pi(c=>{[...U.branches].some(m=>m==null?void 0:m.contains(c.target))||(n("focusOutside",c),n("interactOutside",c),c.defaultPrevented||n("dismiss"))},i);ri("Escape",c=>{s.value===u.value.size-1&&(n("escapeKeyDown",c),c.defaultPrevented||n("dismiss"))});let v;return a.watchEffect(c=>{i.value&&(r.disableOutsidePointerEvents&&(U.layersWithOutsidePointerEventsDisabled.size===0&&(v=l.value.body.style.pointerEvents,l.value.body.style.pointerEvents="none"),U.layersWithOutsidePointerEventsDisabled.add(i.value)),u.value.add(i.value),c(()=>{r.disableOutsidePointerEvents&&U.layersWithOutsidePointerEventsDisabled.size===1&&(l.value.body.style.pointerEvents=v)}))}),a.watchEffect(c=>{c(()=>{i.value&&(u.value.delete(i.value),U.layersWithOutsidePointerEventsDisabled.delete(i.value))})}),(c,m)=>(a.openBlock(),a.createBlock(a.unref(de),{ref:a.unref(o),"as-child":c.asChild,as:c.as,"data-dismissable-layer":"",style:a.normalizeStyle({pointerEvents:f.value?p.value?"auto":"none":void 0}),onFocusCapture:a.unref(d).onFocusCapture,onBlurCapture:a.unref(d).onBlurCapture,onPointerdownCapture:a.unref(y).onPointerDownCapture},{default:a.withCtx(()=>[a.renderSlot(c.$slots,"default")]),_:3},8,["as-child","as","style","onFocusCapture","onBlurCapture","onPointerdownCapture"]))}}),Pt="focusScope.autoFocusOnMount",Bt="focusScope.autoFocusOnUnmount",Ur={bubbles:!1,cancelable:!0};function Ii(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(K(n,{select:e}),document.activeElement!==r)return!0}function $i(t){const e=jr(t),r=Vr(e,t),n=Vr(e.reverse(),t);return[r,n]}function jr(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function Vr(t,e){for(const r of t)if(!Ni(r,{upTo:e}))return r}function Ni(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function Di(t){return t instanceof HTMLInputElement&&"select"in t}function K(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&Di(t)&&e&&t.select()}}const ki=Go(()=>a.ref([]));function Fi(){const t=ki();return{add(e){const r=t.value[0];e!==r&&(r==null||r.pause()),t.value=qr(t.value,e),t.value.unshift(e)},remove(e){var r;t.value=qr(t.value,e),(r=t.value[0])==null||r.resume()}}}function qr(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function Ti(t){return t.filter(e=>e.tagName!=="A")}const Ri=a.defineComponent({__name:"FocusScope",props:{loop:{type:Boolean,default:!1},trapped:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["mountAutoFocus","unmountAutoFocus"],setup(t,{emit:e}){const r=t,n=e,{currentRef:o,currentElement:i}=T(),l=a.ref(null),u=Fi(),s=a.reactive({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});a.watchEffect(p=>{if(!Z)return;const y=i.value;if(!r.trapped)return;function d(g){if(s.paused||!y)return;const b=g.target;y.contains(b)?l.value=b:K(l.value,{select:!0})}function v(g){if(s.paused||!y)return;const b=g.relatedTarget;b!==null&&(y.contains(b)||K(l.value,{select:!0}))}function c(g){y.contains(l.value)||K(y)}document.addEventListener("focusin",d),document.addEventListener("focusout",v);const m=new MutationObserver(c);y&&m.observe(y,{childList:!0,subtree:!0}),p(()=>{document.removeEventListener("focusin",d),document.removeEventListener("focusout",v),m.disconnect()})}),a.watchEffect(async p=>{const y=i.value;if(await a.nextTick(),!y)return;u.add(s);const d=document.activeElement;if(!y.contains(d)){const v=new CustomEvent(Pt,Ur);y.addEventListener(Pt,c=>n("mountAutoFocus",c)),y.dispatchEvent(v),v.defaultPrevented||(Ii(Ti(jr(y)),{select:!0}),document.activeElement===d&&K(y))}p(()=>{y.removeEventListener(Pt,m=>n("mountAutoFocus",m));const v=new CustomEvent(Bt,Ur),c=m=>{n("unmountAutoFocus",m)};y.addEventListener(Bt,c),y.dispatchEvent(v),setTimeout(()=>{v.defaultPrevented||K(d??document.body,{select:!0}),y.removeEventListener(Bt,c),u.remove(s)},0)})});function f(p){if(!r.loop&&!r.trapped||s.paused)return;const y=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,d=document.activeElement;if(y&&d){const v=p.currentTarget,[c,m]=$i(v);c&&m?!p.shiftKey&&d===m?(p.preventDefault(),r.loop&&K(c,{select:!0})):p.shiftKey&&d===c&&(p.preventDefault(),r.loop&&K(m,{select:!0})):d===v&&p.preventDefault()}}return(p,y)=>(a.openBlock(),a.createBlock(a.unref(de),{ref_key:"currentRef",ref:o,tabindex:"-1","as-child":p.asChild,as:p.as,onKeydown:f},{default:a.withCtx(()=>[a.renderSlot(p.$slots,"default")]),_:3},8,["as-child","as"]))}});function _i(t){return t?"open":"closed"}const Li="DialogTitle",Wi="DialogContent";function Ui({titleName:t=Li,contentName:e=Wi,componentLink:r="dialog.html#title",titleId:n,descriptionId:o,contentElement:i}){const l=`Warning: \`${e}\` requires a \`${t}\` for the component to be accessible for screen reader users. If you want to hide the \`${t}\`, you can wrap it with our VisuallyHidden component. -For more information, see https://www.radix-vue.com/components/${r}`,u=`Warning: Missing \`Description\` or \`aria-describedby="undefined"\` for ${e}.`;a.onMounted(()=>{var c;document.getElementById(n)||console.warn(l);const f=(c=i.value)==null?void 0:c.getAttribute("aria-describedby");o&&f&&(document.getElementById(o)||console.warn(u))})}const zr=a.defineComponent({__name:"DialogContentImpl",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const r=t,n=e,o=z(),{forwardRef:i,currentElement:l}=T();return o.titleId||(o.titleId=Rr(void 0,"radix-vue-dialog-title")),o.descriptionId||(o.descriptionId=Rr(void 0,"radix-vue-dialog-description")),a.onMounted(()=>{o.contentElement=l,document.activeElement!==document.body&&(o.triggerElement.value=document.activeElement)}),process.env.NODE_ENV!=="production"&&Ui({titleName:"DialogTitle",contentName:"DialogContent",componentLink:"dialog.html#title",titleId:o.titleId,descriptionId:o.descriptionId,contentElement:l}),(u,c)=>(a.openBlock(),a.createBlock(a.unref(Ri),{"as-child":"",loop:"",trapped:r.trapFocus,onMountAutoFocus:c[5]||(c[5]=f=>n("openAutoFocus",f)),onUnmountAutoFocus:c[6]||(c[6]=f=>n("closeAutoFocus",f))},{default:a.withCtx(()=>[a.createVNode(a.unref(Bi),a.mergeProps({id:a.unref(o).contentId,ref:a.unref(i),as:u.as,"as-child":u.asChild,"disable-outside-pointer-events":u.disableOutsidePointerEvents,role:"dialog","aria-describedby":a.unref(o).descriptionId,"aria-labelledby":a.unref(o).titleId,"data-state":a.unref(_i)(a.unref(o).open.value)},u.$attrs,{onDismiss:c[0]||(c[0]=f=>a.unref(o).onOpenChange(!1)),onEscapeKeyDown:c[1]||(c[1]=f=>n("escapeKeyDown",f)),onFocusOutside:c[2]||(c[2]=f=>n("focusOutside",f)),onInteractOutside:c[3]||(c[3]=f=>n("interactOutside",f)),onPointerDownOutside:c[4]||(c[4]=f=>n("pointerDownOutside",f))}),{default:a.withCtx(()=>[a.renderSlot(u.$slots,"default")]),_:3},16,["id","as","as-child","disable-outside-pointer-events","aria-describedby","aria-labelledby","data-state"])]),_:3},8,["trapped"]))}}),ji=a.defineComponent({__name:"DialogContentModal",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const r=t,n=e,o=z(),i=Ot(n),{forwardRef:l,currentElement:u}=T();return vi(u),(c,f)=>(a.openBlock(),a.createBlock(zr,a.mergeProps({...r,...a.unref(i)},{ref:a.unref(l),"trap-focus":a.unref(o).open.value,"disable-outside-pointer-events":!0,onCloseAutoFocus:f[0]||(f[0]=p=>{var y;p.defaultPrevented||(p.preventDefault(),(y=a.unref(o).triggerElement.value)==null||y.focus())}),onPointerDownOutside:f[1]||(f[1]=p=>{const y=p.detail.originalEvent,d=y.button===0&&y.ctrlKey===!0;(y.button===2||d)&&p.preventDefault()}),onFocusOutside:f[2]||(f[2]=p=>{p.preventDefault()})}),{default:a.withCtx(()=>[a.renderSlot(c.$slots,"default")]),_:3},16,["trap-focus"]))}}),Vi=a.defineComponent({__name:"DialogContentNonModal",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const r=t,n=Ot(e);T();const o=z(),i=a.ref(!1),l=a.ref(!1);return(u,c)=>(a.openBlock(),a.createBlock(zr,a.mergeProps({...r,...a.unref(n)},{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:c[0]||(c[0]=f=>{var p;f.defaultPrevented||(i.value||(p=a.unref(o).triggerElement.value)==null||p.focus(),f.preventDefault()),i.value=!1,l.value=!1}),onInteractOutside:c[1]||(c[1]=f=>{var p;f.defaultPrevented||(i.value=!0,f.detail.originalEvent.type==="pointerdown"&&(l.value=!0));const y=f.target;(p=a.unref(o).triggerElement.value)!=null&&p.contains(y)&&f.preventDefault(),f.detail.originalEvent.type==="focusin"&&l.value&&f.preventDefault()})}),{default:a.withCtx(()=>[a.renderSlot(u.$slots,"default")]),_:3},16))}}),Kr=a.defineComponent({__name:"DialogContent",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const r=t,n=e,o=z(),i=Ot(n),{forwardRef:l}=T();return(u,c)=>(a.openBlock(),a.createBlock(a.unref(Lr),{present:u.forceMount||a.unref(o).open.value},{default:a.withCtx(()=>[a.unref(o).modal.value?(a.openBlock(),a.createBlock(ji,a.mergeProps({key:0,ref:a.unref(l)},{...r,...a.unref(i),...u.$attrs}),{default:a.withCtx(()=>[a.renderSlot(u.$slots,"default")]),_:3},16)):(a.openBlock(),a.createBlock(Vi,a.mergeProps({key:1,ref:a.unref(l)},{...r,...a.unref(i),...u.$attrs}),{default:a.withCtx(()=>[a.renderSlot(u.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),qi=a.defineComponent({__name:"DialogOverlayImpl",props:{asChild:{type:Boolean},as:{}},setup(t){const e=z();return fi(!0),T(),(r,n)=>(a.openBlock(),a.createBlock(a.unref(de),{as:r.as,"as-child":r.asChild,"data-state":a.unref(e).open.value?"open":"closed",style:{"pointer-events":"auto"}},{default:a.withCtx(()=>[a.renderSlot(r.$slots,"default")]),_:3},8,["as","as-child","data-state"]))}}),zi=a.defineComponent({__name:"DialogOverlay",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(t){const e=z(),{forwardRef:r}=T();return(n,o)=>{var i;return(i=a.unref(e))!=null&&i.modal.value?(a.openBlock(),a.createBlock(a.unref(Lr),{key:0,present:n.forceMount||a.unref(e).open.value},{default:a.withCtx(()=>[a.createVNode(qi,a.mergeProps(n.$attrs,{ref:a.unref(r),as:n.as,"as-child":n.asChild}),{default:a.withCtx(()=>[a.renderSlot(n.$slots,"default")]),_:3},16,["as","as-child"])]),_:3},8,["present"])):a.createCommentVNode("",!0)}}}),Ki=a.defineComponent({__name:"DialogClose",props:{asChild:{type:Boolean},as:{default:"button"}},setup(t){const e=t;T();const r=z();return(n,o)=>(a.openBlock(),a.createBlock(a.unref(de),a.mergeProps(e,{type:n.as==="button"?"button":void 0,onClick:o[0]||(o[0]=i=>a.unref(r).onOpenChange(!1))}),{default:a.withCtx(()=>[a.renderSlot(n.$slots,"default")]),_:3},16,["type"]))}}),Gr=a.defineComponent({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{default:"h2"}},setup(t){const e=t,r=z();return T(),(n,o)=>(a.openBlock(),a.createBlock(a.unref(de),a.mergeProps(e,{id:a.unref(r).titleId}),{default:a.withCtx(()=>[a.renderSlot(n.$slots,"default")]),_:3},16,["id"]))}}),Hr=a.defineComponent({__name:"VisuallyHidden",props:{asChild:{type:Boolean},as:{default:"span"}},setup(t){return T(),(e,r)=>(a.openBlock(),a.createBlock(a.unref(de),{as:e.as,"as-child":e.asChild,style:{position:"absolute",border:0,width:"1px",display:"inline-block",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}},{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},8,["as","as-child"]))}}),[Qr,fl]=bt("CollectionProvider");a.defineComponent({name:"CollectionSlot",setup(t,{slots:e}){const r=Qr(),{primitiveElement:n,currentElement:o}=_r();return a.watch(o,()=>{r.collectionRef.value=o.value}),()=>a.h(At,{ref:n},e)}}),a.defineComponent({name:"CollectionItem",inheritAttrs:!1,props:{value:{validator:()=>!0}},setup(t,{slots:e,attrs:r}){const n=Qr(),{primitiveElement:o,currentElement:i}=_r();return a.watchEffect(l=>{if(i.value){const u=a.markRaw(i.value);n.itemMap.value.set(u,{ref:i.value,value:t.value}),l(()=>n.itemMap.value.delete(u))}}),()=>a.h(At,{...r,[n.attrName]:"",ref:o},e)}});function Gi(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}Gi();const Jr={__name:"CloseButton",setup(t){return(e,r)=>(a.openBlock(),a.createBlock(a.unref(Ki),{class:"im-close-button text-gray-400 hover:text-gray-500"},{default:a.withCtx(()=>r[0]||(r[0]=[a.createElementVNode("span",{class:"sr-only"},"Close",-1),a.createElementVNode("svg",{class:"size-6",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor","aria-hidden":"true"},[a.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1)])),_:1}))}},Hi={class:"im-modal-container fixed inset-0 z-40 overflow-y-auto p-4"},Qi={key:0,class:"absolute right-0 top-0 pr-3 pt-3"},Ji={__name:"ModalContent",props:{modalContext:Object,config:Object},setup(t){return(e,r)=>(a.openBlock(),a.createElementBlock("div",Hi,[a.createElementVNode("div",{class:a.normalizeClass(["im-modal-positioner flex min-h-full justify-center",{"items-start":t.config.position==="top","items-center":t.config.position==="center","items-end":t.config.position==="bottom"}])},[a.createVNode(a.Transition,{appear:"","enter-from-class":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95","enter-to-class":"opacity-100 translate-y-0 sm:scale-100","leave-from-class":"opacity-100 translate-y-0 sm:scale-100","leave-to-class":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",onAfterLeave:t.modalContext.afterLeave},{default:a.withCtx(()=>{var n;return[a.createVNode(a.unref(Kr),{"aria-describedby":void 0,"trap-focus":(n=t.config)==null?void 0:n.closeExplicitly,class:a.normalizeClass({"im-modal-wrapper w-full transition duration-300 ease-in-out":!0,"blur-sm":!t.modalContext.onTopOfStack,"sm:max-w-sm":t.config.maxWidth=="sm","sm:max-w-md":t.config.maxWidth=="md","sm:max-w-md md:max-w-lg":t.config.maxWidth=="lg","sm:max-w-md md:max-w-xl":t.config.maxWidth=="xl","sm:max-w-md md:max-w-xl lg:max-w-2xl":t.config.maxWidth=="2xl","sm:max-w-md md:max-w-xl lg:max-w-3xl":t.config.maxWidth=="3xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-4xl":t.config.maxWidth=="4xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl":t.config.maxWidth=="5xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-6xl":t.config.maxWidth=="6xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-7xl":t.config.maxWidth=="7xl"})},{default:a.withCtx(()=>[a.createVNode(a.unref(Hr),{"as-child":""},{default:a.withCtx(()=>[a.createVNode(a.unref(Gr))]),_:1}),a.createElementVNode("div",{class:a.normalizeClass(["im-modal-content relative",[t.config.paddingClasses,t.config.panelClasses]])},[t.config.closeButton?(a.openBlock(),a.createElementBlock("div",Qi,[a.createVNode(Jr)])):a.createCommentVNode("",!0),a.renderSlot(e.$slots,"default",{modalContext:t.modalContext,config:t.config})],2)]),_:3},8,["trap-focus","class"])]}),_:3},8,["onAfterLeave"])],2)]))}},Xi={class:"im-slideover-container fixed inset-0 z-40 overflow-y-auto overflow-x-hidden"},Yi={key:0,class:"absolute right-0 top-0 pr-3 pt-3"},Zi={__name:"SlideoverContent",props:{modalContext:Object,config:Object},setup(t){return(e,r)=>(a.openBlock(),a.createElementBlock("div",Xi,[a.createElementVNode("div",{class:a.normalizeClass(["im-slideover-positioner flex min-h-full items-center",{"justify-start rtl:justify-end":t.config.position==="left","justify-end rtl:justify-start":t.config.position==="right"}])},[a.createVNode(a.Transition,{appear:"","enter-from-class":"opacity-0 "+(t.config.position==="left"?"-translate-x-full":"translate-x-full"),"enter-to-class":"opacity-100 translate-x-0","leave-from-class":"opacity-100 translate-x-0","leave-to-class":"opacity-0 "+(t.config.position==="left"?"-translate-x-full":"translate-x-full"),onAfterLeave:t.modalContext.afterLeave},{default:a.withCtx(()=>{var n;return[a.createVNode(a.unref(Kr),{"aria-describedby":void 0,"trap-focus":(n=t.config)==null?void 0:n.closeExplicitly,class:a.normalizeClass({"im-slideover-wrapper w-full transition duration-300 ease-in-out":!0,"blur-sm":!t.modalContext.onTopOfStack,"sm:max-w-sm":t.config.maxWidth=="sm","sm:max-w-md":t.config.maxWidth=="md","sm:max-w-md md:max-w-lg":t.config.maxWidth=="lg","sm:max-w-md md:max-w-xl":t.config.maxWidth=="xl","sm:max-w-md md:max-w-xl lg:max-w-2xl":t.config.maxWidth=="2xl","sm:max-w-md md:max-w-xl lg:max-w-3xl":t.config.maxWidth=="3xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-4xl":t.config.maxWidth=="4xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl":t.config.maxWidth=="5xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-6xl":t.config.maxWidth=="6xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-7xl":t.config.maxWidth=="7xl"})},{default:a.withCtx(()=>[a.createVNode(a.unref(Hr),{"as-child":""},{default:a.withCtx(()=>[a.createVNode(a.unref(Gr))]),_:1}),a.createElementVNode("div",{class:a.normalizeClass(["im-slideover-content relative",[t.config.paddingClasses,t.config.panelClasses]])},[t.config.closeButton?(a.openBlock(),a.createElementBlock("div",Yi,[a.createVNode(Jr)])):a.createCommentVNode("",!0),a.renderSlot(e.$slots,"default",{modalContext:t.modalContext,config:t.config})],2)]),_:3},8,["trap-focus","class"])]}),_:3},8,["enter-from-class","leave-to-class","onAfterLeave"])],2)]))}},Mi=["data-inertiaui-modal-id","data-inertiaui-modal-index"],el={key:1,class:"im-backdrop fixed inset-0 z-30 bg-black/75"},tl={__name:"Modal",setup(t,{expose:e}){const r=a.ref(null),n=a.ref(!1);return e({afterLeave:()=>{var o;return(o=r.value)==null?void 0:o.afterLeave()},close:()=>{var o;return(o=r.value)==null?void 0:o.close()},config:a.computed(()=>{var o;return(o=r.value)==null?void 0:o.config}),emit:(...o)=>{var i;return(i=r.value)==null?void 0:i.emit(...o)},getChildModal:()=>{var o;return(o=r.value)==null?void 0:o.getChildModal()},getParentModal:()=>{var o;return(o=r.value)==null?void 0:o.getParentModal()},id:a.computed(()=>{var o;return(o=r.value)==null?void 0:o.id}),index:a.computed(()=>{var o;return(o=r.value)==null?void 0:o.index}),isOpen:a.computed(()=>{var o;return(o=r.value)==null?void 0:o.isOpen}),modalContext:a.computed(()=>{var o;return(o=r.value)==null?void 0:o.modalContext}),onTopOfStack:a.computed(()=>{var o;return(o=r.value)==null?void 0:o.onTopOfStack}),reload:(...o)=>{var i;return(i=r.value)==null?void 0:i.reload(...o)},setOpen:(...o)=>{var i;return(i=r.value)==null?void 0:i.setOpen(...o)},shouldRender:a.computed(()=>{var o;return(o=r.value)==null?void 0:o.shouldRender})}),(o,i)=>(a.openBlock(),a.createBlock(Br,{ref_key:"modal",ref:r},{default:a.withCtx(({afterLeave:l,close:u,config:c,emit:f,getChildModal:p,getParentModal:y,id:d,index:v,isOpen:s,modalContext:m,onTopOfStack:h,reload:b,setOpen:S,shouldRender:g})=>[a.createVNode(a.unref(xi),{open:s,"onUpdate:open":S},{default:a.withCtx(()=>[a.createVNode(a.unref(Ei),null,{default:a.withCtx(()=>[a.createElementVNode("div",{"data-inertiaui-modal-id":d,"data-inertiaui-modal-index":v,class:"im-dialog relative z-20"},[v===0&&h?(a.openBlock(),a.createBlock(a.Transition,{key:0,appear:!n.value,"enter-active-class":"transition transform ease-in-out duration-300","enter-from-class":"opacity-0","enter-to-class":"opacity-100","leave-active-class":"transition transform ease-in-out duration-300","leave-from-class":"opacity-100","leave-to-class":"opacity-0",onAfterAppear:i[0]||(i[0]=x=>n.value=!0)},{default:a.withCtx(()=>[a.createVNode(a.unref(zi),{class:"im-backdrop fixed inset-0 z-30 bg-black/75"})]),_:1},8,["appear"])):a.createCommentVNode("",!0),v>0&&h?(a.openBlock(),a.createElementBlock("div",el)):a.createCommentVNode("",!0),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(c!=null&&c.slideover?Zi:Ji),{"modal-context":m,config:c},{default:a.withCtx(()=>[a.renderSlot(o.$slots,"default",{id:d,afterLeave:l,close:u,config:c,emit:f,getChildModal:p,getParentModal:y,index:v,isOpen:s,modalContext:m,onTopOfStack:h,reload:b,setOpen:S,shouldRender:g})]),_:2},1032,["modal-context","config"]))],8,Mi)]),_:2},1024)]),_:2},1032,["open","onUpdate:open"])]),_:3},512))}},rl={__name:"ModalLink",props:{href:{type:String,required:!0},method:{type:String,default:"get"},data:{type:Object,default:()=>({})},as:{type:String,default:"a"},headers:{type:Object,default:()=>({})},queryStringArrayFormat:{type:String,default:"brackets"},navigate:{type:Boolean,default:null},closeButton:{type:Boolean,required:!1,default:null},closeExplicitly:{type:Boolean,required:!1,default:null},maxWidth:{type:String,required:!1,default:null},paddingClasses:{type:[Boolean,String],required:!1,default:null},panelClasses:{type:[Boolean,String],required:!1,default:null},position:{type:String,required:!1,default:null},slideover:{type:Boolean,required:!1,default:null}},emits:["after-leave","blur","close","error","focus","start","success"],setup(t,{emit:e}){const r=t,n=a.ref(!1),o=Se(),i=a.ref(null);a.provide("modalContext",i);const l=e,u=a.ref(!1),c=a.computed(()=>r.navigate??Pe("navigate"));a.watch(()=>{var m;return(m=i.value)==null?void 0:m.onTopOfStack},m=>{i.value&&(m&&u.value?l("focus"):m||l("blur"),u.value=!m)});const f=a.ref(null);a.onBeforeUnmount(()=>{var m;return(m=f.value)==null?void 0:m.call(f)});const p=a.useAttrs();function y(){f.value=i.value.registerEventListenersFromAttrs(p)}a.watch(i,(m,h)=>{m&&!h&&(y(),l("success"))});function d(){l("close")}function v(){i.value=null,l("after-leave")}function s(){n.value||(r.href.startsWith("#")||(n.value=!0,l("start")),o.visit(r.href,r.method,r.data,r.headers,rn(kt(r,zo)),d,v,r.queryStringArrayFormat,c.value).then(m=>{i.value=m}).catch(m=>l("error",m)).finally(()=>n.value=!1))}return(m,h)=>(a.openBlock(),a.createBlock(a.resolveDynamicComponent(t.as),a.mergeProps(a.unref(p),{href:t.href,onClick:a.withModifiers(s,["prevent"])}),{default:a.withCtx(()=>[a.renderSlot(m.$slots,"default",{loading:n.value})]),_:3},16,["href"]))}};function nl(){return a.toValue(a.inject("modalContext",null))}function al(t,e={}){return Se().visit(t,e.method??"get",e.data??{},e.headers??{},e.config??{},e.onClose,e.onAfterLeave,e.queryStringArrayFormat??"brackets",e.navigate??Pe("navigate"))}E.HeadlessModal=Br,E.Modal=tl,E.ModalLink=rl,E.ModalRoot=Ar,E.getConfig=Pe,E.putConfig=en,E.renderApp=Ko,E.resetConfig=Mr,E.useModal=nl,E.visitModal=al,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})}); +For more information, see https://www.radix-vue.com/components/${r}`,u=`Warning: Missing \`Description\` or \`aria-describedby="undefined"\` for ${e}.`;a.onMounted(()=>{var s;document.getElementById(n)||console.warn(l);const f=(s=i.value)==null?void 0:s.getAttribute("aria-describedby");o&&f&&(document.getElementById(o)||console.warn(u))})}const zr=a.defineComponent({__name:"DialogContentImpl",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const r=t,n=e,o=z(),{forwardRef:i,currentElement:l}=T();return o.titleId||(o.titleId=Rr(void 0,"radix-vue-dialog-title")),o.descriptionId||(o.descriptionId=Rr(void 0,"radix-vue-dialog-description")),a.onMounted(()=>{o.contentElement=l,document.activeElement!==document.body&&(o.triggerElement.value=document.activeElement)}),process.env.NODE_ENV!=="production"&&Ui({titleName:"DialogTitle",contentName:"DialogContent",componentLink:"dialog.html#title",titleId:o.titleId,descriptionId:o.descriptionId,contentElement:l}),(u,s)=>(a.openBlock(),a.createBlock(a.unref(Ri),{"as-child":"",loop:"",trapped:r.trapFocus,onMountAutoFocus:s[5]||(s[5]=f=>n("openAutoFocus",f)),onUnmountAutoFocus:s[6]||(s[6]=f=>n("closeAutoFocus",f))},{default:a.withCtx(()=>[a.createVNode(a.unref(Bi),a.mergeProps({id:a.unref(o).contentId,ref:a.unref(i),as:u.as,"as-child":u.asChild,"disable-outside-pointer-events":u.disableOutsidePointerEvents,role:"dialog","aria-describedby":a.unref(o).descriptionId,"aria-labelledby":a.unref(o).titleId,"data-state":a.unref(_i)(a.unref(o).open.value)},u.$attrs,{onDismiss:s[0]||(s[0]=f=>a.unref(o).onOpenChange(!1)),onEscapeKeyDown:s[1]||(s[1]=f=>n("escapeKeyDown",f)),onFocusOutside:s[2]||(s[2]=f=>n("focusOutside",f)),onInteractOutside:s[3]||(s[3]=f=>n("interactOutside",f)),onPointerDownOutside:s[4]||(s[4]=f=>n("pointerDownOutside",f))}),{default:a.withCtx(()=>[a.renderSlot(u.$slots,"default")]),_:3},16,["id","as","as-child","disable-outside-pointer-events","aria-describedby","aria-labelledby","data-state"])]),_:3},8,["trapped"]))}}),ji=a.defineComponent({__name:"DialogContentModal",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const r=t,n=e,o=z(),i=Ot(n),{forwardRef:l,currentElement:u}=T();return vi(u),(s,f)=>(a.openBlock(),a.createBlock(zr,a.mergeProps({...r,...a.unref(i)},{ref:a.unref(l),"trap-focus":a.unref(o).open.value,"disable-outside-pointer-events":!0,onCloseAutoFocus:f[0]||(f[0]=p=>{var y;p.defaultPrevented||(p.preventDefault(),(y=a.unref(o).triggerElement.value)==null||y.focus())}),onPointerDownOutside:f[1]||(f[1]=p=>{const y=p.detail.originalEvent,d=y.button===0&&y.ctrlKey===!0;(y.button===2||d)&&p.preventDefault()}),onFocusOutside:f[2]||(f[2]=p=>{p.preventDefault()})}),{default:a.withCtx(()=>[a.renderSlot(s.$slots,"default")]),_:3},16,["trap-focus"]))}}),Vi=a.defineComponent({__name:"DialogContentNonModal",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const r=t,n=Ot(e);T();const o=z(),i=a.ref(!1),l=a.ref(!1);return(u,s)=>(a.openBlock(),a.createBlock(zr,a.mergeProps({...r,...a.unref(n)},{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:s[0]||(s[0]=f=>{var p;f.defaultPrevented||(i.value||(p=a.unref(o).triggerElement.value)==null||p.focus(),f.preventDefault()),i.value=!1,l.value=!1}),onInteractOutside:s[1]||(s[1]=f=>{var p;f.defaultPrevented||(i.value=!0,f.detail.originalEvent.type==="pointerdown"&&(l.value=!0));const y=f.target;(p=a.unref(o).triggerElement.value)!=null&&p.contains(y)&&f.preventDefault(),f.detail.originalEvent.type==="focusin"&&l.value&&f.preventDefault()})}),{default:a.withCtx(()=>[a.renderSlot(u.$slots,"default")]),_:3},16))}}),Kr=a.defineComponent({__name:"DialogContent",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const r=t,n=e,o=z(),i=Ot(n),{forwardRef:l}=T();return(u,s)=>(a.openBlock(),a.createBlock(a.unref(Lr),{present:u.forceMount||a.unref(o).open.value},{default:a.withCtx(()=>[a.unref(o).modal.value?(a.openBlock(),a.createBlock(ji,a.mergeProps({key:0,ref:a.unref(l)},{...r,...a.unref(i),...u.$attrs}),{default:a.withCtx(()=>[a.renderSlot(u.$slots,"default")]),_:3},16)):(a.openBlock(),a.createBlock(Vi,a.mergeProps({key:1,ref:a.unref(l)},{...r,...a.unref(i),...u.$attrs}),{default:a.withCtx(()=>[a.renderSlot(u.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),qi=a.defineComponent({__name:"DialogOverlayImpl",props:{asChild:{type:Boolean},as:{}},setup(t){const e=z();return fi(!0),T(),(r,n)=>(a.openBlock(),a.createBlock(a.unref(de),{as:r.as,"as-child":r.asChild,"data-state":a.unref(e).open.value?"open":"closed",style:{"pointer-events":"auto"}},{default:a.withCtx(()=>[a.renderSlot(r.$slots,"default")]),_:3},8,["as","as-child","data-state"]))}}),zi=a.defineComponent({__name:"DialogOverlay",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(t){const e=z(),{forwardRef:r}=T();return(n,o)=>{var i;return(i=a.unref(e))!=null&&i.modal.value?(a.openBlock(),a.createBlock(a.unref(Lr),{key:0,present:n.forceMount||a.unref(e).open.value},{default:a.withCtx(()=>[a.createVNode(qi,a.mergeProps(n.$attrs,{ref:a.unref(r),as:n.as,"as-child":n.asChild}),{default:a.withCtx(()=>[a.renderSlot(n.$slots,"default")]),_:3},16,["as","as-child"])]),_:3},8,["present"])):a.createCommentVNode("",!0)}}}),Ki=a.defineComponent({__name:"DialogClose",props:{asChild:{type:Boolean},as:{default:"button"}},setup(t){const e=t;T();const r=z();return(n,o)=>(a.openBlock(),a.createBlock(a.unref(de),a.mergeProps(e,{type:n.as==="button"?"button":void 0,onClick:o[0]||(o[0]=i=>a.unref(r).onOpenChange(!1))}),{default:a.withCtx(()=>[a.renderSlot(n.$slots,"default")]),_:3},16,["type"]))}}),Gr=a.defineComponent({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{default:"h2"}},setup(t){const e=t,r=z();return T(),(n,o)=>(a.openBlock(),a.createBlock(a.unref(de),a.mergeProps(e,{id:a.unref(r).titleId}),{default:a.withCtx(()=>[a.renderSlot(n.$slots,"default")]),_:3},16,["id"]))}}),Hr=a.defineComponent({__name:"VisuallyHidden",props:{asChild:{type:Boolean},as:{default:"span"}},setup(t){return T(),(e,r)=>(a.openBlock(),a.createBlock(a.unref(de),{as:e.as,"as-child":e.asChild,style:{position:"absolute",border:0,width:"1px",display:"inline-block",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}},{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},8,["as","as-child"]))}}),[Qr,fl]=bt("CollectionProvider");a.defineComponent({name:"CollectionSlot",setup(t,{slots:e}){const r=Qr(),{primitiveElement:n,currentElement:o}=_r();return a.watch(o,()=>{r.collectionRef.value=o.value}),()=>a.h(At,{ref:n},e)}}),a.defineComponent({name:"CollectionItem",inheritAttrs:!1,props:{value:{validator:()=>!0}},setup(t,{slots:e,attrs:r}){const n=Qr(),{primitiveElement:o,currentElement:i}=_r();return a.watchEffect(l=>{if(i.value){const u=a.markRaw(i.value);n.itemMap.value.set(u,{ref:i.value,value:t.value}),l(()=>n.itemMap.value.delete(u))}}),()=>a.h(At,{...r,[n.attrName]:"",ref:o},e)}});function Gi(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}Gi();const Jr={__name:"CloseButton",setup(t){return(e,r)=>(a.openBlock(),a.createBlock(a.unref(Ki),{class:"im-close-button text-gray-400 hover:text-gray-500"},{default:a.withCtx(()=>r[0]||(r[0]=[a.createElementVNode("span",{class:"sr-only"},"Close",-1),a.createElementVNode("svg",{class:"size-6",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor","aria-hidden":"true"},[a.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1)])),_:1}))}},Hi={class:"im-modal-container fixed inset-0 z-40 overflow-y-auto p-4"},Qi={key:0,class:"absolute right-0 top-0 pr-3 pt-3"},Ji={__name:"ModalContent",props:{modalContext:Object,config:Object},setup(t){return(e,r)=>(a.openBlock(),a.createElementBlock("div",Hi,[a.createElementVNode("div",{class:a.normalizeClass(["im-modal-positioner flex min-h-full justify-center",{"items-start":t.config.position==="top","items-center":t.config.position==="center","items-end":t.config.position==="bottom"}])},[a.createVNode(a.Transition,{appear:"","enter-from-class":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95","enter-to-class":"opacity-100 translate-y-0 sm:scale-100","leave-from-class":"opacity-100 translate-y-0 sm:scale-100","leave-to-class":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",onAfterLeave:t.modalContext.afterLeave},{default:a.withCtx(()=>[a.createVNode(a.unref(Kr),{"aria-describedby":void 0,class:a.normalizeClass({"im-modal-wrapper w-full transition duration-300 ease-in-out":!0,"blur-sm":!t.modalContext.onTopOfStack,"sm:max-w-sm":t.config.maxWidth=="sm","sm:max-w-md":t.config.maxWidth=="md","sm:max-w-md md:max-w-lg":t.config.maxWidth=="lg","sm:max-w-md md:max-w-xl":t.config.maxWidth=="xl","sm:max-w-md md:max-w-xl lg:max-w-2xl":t.config.maxWidth=="2xl","sm:max-w-md md:max-w-xl lg:max-w-3xl":t.config.maxWidth=="3xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-4xl":t.config.maxWidth=="4xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl":t.config.maxWidth=="5xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-6xl":t.config.maxWidth=="6xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-7xl":t.config.maxWidth=="7xl"}),onEscapeKeyDown:r[0]||(r[0]=n=>{var o;return((o=t.config)==null?void 0:o.closeExplicitly)&&n.preventDefault()}),onInteractOutside:r[1]||(r[1]=n=>{var o;return((o=t.config)==null?void 0:o.closeExplicitly)&&n.preventDefault()})},{default:a.withCtx(()=>[a.createVNode(a.unref(Hr),{"as-child":""},{default:a.withCtx(()=>[a.createVNode(a.unref(Gr))]),_:1}),a.createElementVNode("div",{class:a.normalizeClass(["im-modal-content relative",[t.config.paddingClasses,t.config.panelClasses]])},[t.config.closeButton?(a.openBlock(),a.createElementBlock("div",Qi,[a.createVNode(Jr)])):a.createCommentVNode("",!0),a.renderSlot(e.$slots,"default",{modalContext:t.modalContext,config:t.config})],2)]),_:3},8,["class"])]),_:3},8,["onAfterLeave"])],2)]))}},Xi={class:"im-slideover-container fixed inset-0 z-40 overflow-y-auto overflow-x-hidden"},Yi={key:0,class:"absolute right-0 top-0 pr-3 pt-3"},Zi={__name:"SlideoverContent",props:{modalContext:Object,config:Object},setup(t){return(e,r)=>(a.openBlock(),a.createElementBlock("div",Xi,[a.createElementVNode("div",{class:a.normalizeClass(["im-slideover-positioner flex min-h-full items-center",{"justify-start rtl:justify-end":t.config.position==="left","justify-end rtl:justify-start":t.config.position==="right"}])},[a.createVNode(a.Transition,{appear:"","enter-from-class":"opacity-0 "+(t.config.position==="left"?"-translate-x-full":"translate-x-full"),"enter-to-class":"opacity-100 translate-x-0","leave-from-class":"opacity-100 translate-x-0","leave-to-class":"opacity-0 "+(t.config.position==="left"?"-translate-x-full":"translate-x-full"),onAfterLeave:t.modalContext.afterLeave},{default:a.withCtx(()=>[a.createVNode(a.unref(Kr),{"aria-describedby":void 0,class:a.normalizeClass({"im-slideover-wrapper w-full transition duration-300 ease-in-out":!0,"blur-sm":!t.modalContext.onTopOfStack,"sm:max-w-sm":t.config.maxWidth=="sm","sm:max-w-md":t.config.maxWidth=="md","sm:max-w-md md:max-w-lg":t.config.maxWidth=="lg","sm:max-w-md md:max-w-xl":t.config.maxWidth=="xl","sm:max-w-md md:max-w-xl lg:max-w-2xl":t.config.maxWidth=="2xl","sm:max-w-md md:max-w-xl lg:max-w-3xl":t.config.maxWidth=="3xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-4xl":t.config.maxWidth=="4xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl":t.config.maxWidth=="5xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-6xl":t.config.maxWidth=="6xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-7xl":t.config.maxWidth=="7xl"}),onEscapeKeyDown:r[0]||(r[0]=n=>{var o;return((o=t.config)==null?void 0:o.closeExplicitly)&&n.preventDefault()}),onInteractOutside:r[1]||(r[1]=n=>{var o;return((o=t.config)==null?void 0:o.closeExplicitly)&&n.preventDefault()})},{default:a.withCtx(()=>[a.createVNode(a.unref(Hr),{"as-child":""},{default:a.withCtx(()=>[a.createVNode(a.unref(Gr))]),_:1}),a.createElementVNode("div",{class:a.normalizeClass(["im-slideover-content relative",[t.config.paddingClasses,t.config.panelClasses]])},[t.config.closeButton?(a.openBlock(),a.createElementBlock("div",Yi,[a.createVNode(Jr)])):a.createCommentVNode("",!0),a.renderSlot(e.$slots,"default",{modalContext:t.modalContext,config:t.config})],2)]),_:3},8,["class"])]),_:3},8,["enter-from-class","leave-to-class","onAfterLeave"])],2)]))}},Mi=["data-inertiaui-modal-id","data-inertiaui-modal-index"],el={key:1,class:"im-backdrop fixed inset-0 z-30 bg-black/75"},tl={__name:"Modal",setup(t,{expose:e}){const r=a.ref(null),n=a.ref(!1);return e({afterLeave:()=>{var o;return(o=r.value)==null?void 0:o.afterLeave()},close:()=>{var o;return(o=r.value)==null?void 0:o.close()},config:a.computed(()=>{var o;return(o=r.value)==null?void 0:o.config}),emit:(...o)=>{var i;return(i=r.value)==null?void 0:i.emit(...o)},getChildModal:()=>{var o;return(o=r.value)==null?void 0:o.getChildModal()},getParentModal:()=>{var o;return(o=r.value)==null?void 0:o.getParentModal()},id:a.computed(()=>{var o;return(o=r.value)==null?void 0:o.id}),index:a.computed(()=>{var o;return(o=r.value)==null?void 0:o.index}),isOpen:a.computed(()=>{var o;return(o=r.value)==null?void 0:o.isOpen}),modalContext:a.computed(()=>{var o;return(o=r.value)==null?void 0:o.modalContext}),onTopOfStack:a.computed(()=>{var o;return(o=r.value)==null?void 0:o.onTopOfStack}),reload:(...o)=>{var i;return(i=r.value)==null?void 0:i.reload(...o)},setOpen:(...o)=>{var i;return(i=r.value)==null?void 0:i.setOpen(...o)},shouldRender:a.computed(()=>{var o;return(o=r.value)==null?void 0:o.shouldRender})}),(o,i)=>(a.openBlock(),a.createBlock(Br,{ref_key:"modal",ref:r},{default:a.withCtx(({afterLeave:l,close:u,config:s,emit:f,getChildModal:p,getParentModal:y,id:d,index:v,isOpen:c,modalContext:m,onTopOfStack:g,reload:b,setOpen:S,shouldRender:h})=>[a.createVNode(a.unref(xi),{open:c,"onUpdate:open":S},{default:a.withCtx(()=>[a.createVNode(a.unref(Ei),null,{default:a.withCtx(()=>[a.createElementVNode("div",{"data-inertiaui-modal-id":d,"data-inertiaui-modal-index":v,class:"im-dialog relative z-20"},[v===0&&g?(a.openBlock(),a.createBlock(a.Transition,{key:0,appear:!n.value,"enter-active-class":"transition transform ease-in-out duration-300","enter-from-class":"opacity-0","enter-to-class":"opacity-100","leave-active-class":"transition transform ease-in-out duration-300","leave-from-class":"opacity-100","leave-to-class":"opacity-0",onAfterAppear:i[0]||(i[0]=x=>n.value=!0)},{default:a.withCtx(()=>[a.createVNode(a.unref(zi),{class:"im-backdrop fixed inset-0 z-30 bg-black/75"})]),_:1},8,["appear"])):a.createCommentVNode("",!0),v>0&&g?(a.openBlock(),a.createElementBlock("div",el)):a.createCommentVNode("",!0),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(s!=null&&s.slideover?Zi:Ji),{"modal-context":m,config:s},{default:a.withCtx(()=>[a.renderSlot(o.$slots,"default",{id:d,afterLeave:l,close:u,config:s,emit:f,getChildModal:p,getParentModal:y,index:v,isOpen:c,modalContext:m,onTopOfStack:g,reload:b,setOpen:S,shouldRender:h})]),_:2},1032,["modal-context","config"]))],8,Mi)]),_:2},1024)]),_:2},1032,["open","onUpdate:open"])]),_:3},512))}},rl={__name:"ModalLink",props:{href:{type:String,required:!0},method:{type:String,default:"get"},data:{type:Object,default:()=>({})},as:{type:String,default:"a"},headers:{type:Object,default:()=>({})},queryStringArrayFormat:{type:String,default:"brackets"},navigate:{type:Boolean,default:null},closeButton:{type:Boolean,required:!1,default:null},closeExplicitly:{type:Boolean,required:!1,default:null},maxWidth:{type:String,required:!1,default:null},paddingClasses:{type:[Boolean,String],required:!1,default:null},panelClasses:{type:[Boolean,String],required:!1,default:null},position:{type:String,required:!1,default:null},slideover:{type:Boolean,required:!1,default:null}},emits:["after-leave","blur","close","error","focus","start","success"],setup(t,{emit:e}){const r=t,n=a.ref(!1),o=Se(),i=a.ref(null);a.provide("modalContext",i);const l=e,u=a.ref(!1),s=a.computed(()=>r.navigate??Pe("navigate"));a.watch(()=>{var m;return(m=i.value)==null?void 0:m.onTopOfStack},m=>{i.value&&(m&&u.value?l("focus"):m||l("blur"),u.value=!m)});const f=a.ref(null);a.onBeforeUnmount(()=>{var m;return(m=f.value)==null?void 0:m.call(f)});const p=a.useAttrs();function y(){f.value=i.value.registerEventListenersFromAttrs(p)}a.watch(i,(m,g)=>{m&&!g&&(y(),l("success"))});function d(){l("close")}function v(){i.value=null,l("after-leave")}function c(){n.value||(r.href.startsWith("#")||(n.value=!0,l("start")),o.visit(r.href,r.method,r.data,r.headers,rn(Dt(r,zo)),d,v,r.queryStringArrayFormat,s.value).then(m=>{i.value=m}).catch(m=>l("error",m)).finally(()=>n.value=!1))}return(m,g)=>(a.openBlock(),a.createBlock(a.resolveDynamicComponent(t.as),a.mergeProps(a.unref(p),{href:t.href,onClick:a.withModifiers(c,["prevent"])}),{default:a.withCtx(()=>[a.renderSlot(m.$slots,"default",{loading:n.value})]),_:3},16,["href"]))}};function nl(){return a.toValue(a.inject("modalContext",null))}function al(t,e={}){return Se().visit(t,e.method??"get",e.data??{},e.headers??{},e.config??{},e.onClose,e.onAfterLeave,e.queryStringArrayFormat??"brackets",e.navigate??Pe("navigate"))}E.HeadlessModal=Br,E.Modal=tl,E.ModalLink=rl,E.ModalRoot=Ar,E.getConfig=Pe,E.putConfig=en,E.renderApp=Ko,E.resetConfig=Mr,E.useModal=nl,E.visitModal=al,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})});