diff --git a/app/package-lock.json b/app/package-lock.json index b17deb9e..a1c83245 100644 --- a/app/package-lock.json +++ b/app/package-lock.json @@ -5,7 +5,7 @@ "packages": { "": { "devDependencies": { - "@protonemedia/laravel-splade": "file:../protonemedia-laravel-splade-0.6.8.tgz", + "@protonemedia/laravel-splade": "file:../protonemedia-laravel-splade-0.6.9.tgz", "@tailwindcss/forms": "^0.5.2", "@tailwindcss/typography": "^0.5.2", "@vitejs/plugin-vue": "^3.0.0", @@ -113,9 +113,9 @@ } }, "node_modules/@protonemedia/laravel-splade": { - "version": "0.6.8", - "resolved": "file:../protonemedia-laravel-splade-0.6.8.tgz", - "integrity": "sha512-dnqY/8yGWFhXi/AbuiUY2ZkDMB76yhZdzVPA6AKfQX/fu11dSAVpfGYbjKkrBnBB7n35IRxqQiKlWuB2Lurlww==", + "version": "0.6.9", + "resolved": "file:../protonemedia-laravel-splade-0.6.9.tgz", + "integrity": "sha512-YC61gvx8jxis9iJvGr8NJ6h08xZ4hV8lQ9lwIk4wozKhlQxqTlTz7kJlNl2Xtnge581vbhiKaZZvk4aiZAr0Nw==", "dev": true, "license": "MIT", "dependencies": { @@ -452,9 +452,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001423", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001423.tgz", - "integrity": "sha512-09iwWGOlifvE1XuHokFMP7eR38a0JnajoyL3/i87c8ZjRWRrdKo1fqjNfugfBD0UDBIOz0U+jtNhJ0EPm1VleQ==", + "version": "1.0.30001425", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001425.tgz", + "integrity": "sha512-/pzFv0OmNG6W0ym80P3NtapU0QEiDS3VuYAZMGoLLqiC7f6FJFe1MjpQDREGApeenD9wloeytmVDj+JLXPC6qw==", "dev": true, "funding": [ { @@ -1947,8 +1947,8 @@ } }, "@protonemedia/laravel-splade": { - "version": "file:../protonemedia-laravel-splade-0.6.8.tgz", - "integrity": "sha512-dnqY/8yGWFhXi/AbuiUY2ZkDMB76yhZdzVPA6AKfQX/fu11dSAVpfGYbjKkrBnBB7n35IRxqQiKlWuB2Lurlww==", + "version": "file:../protonemedia-laravel-splade-0.6.9.tgz", + "integrity": "sha512-YC61gvx8jxis9iJvGr8NJ6h08xZ4hV8lQ9lwIk4wozKhlQxqTlTz7kJlNl2Xtnge581vbhiKaZZvk4aiZAr0Nw==", "dev": true, "requires": { "autosize": "^5.0.1", @@ -2209,9 +2209,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30001423", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001423.tgz", - "integrity": "sha512-09iwWGOlifvE1XuHokFMP7eR38a0JnajoyL3/i87c8ZjRWRrdKo1fqjNfugfBD0UDBIOz0U+jtNhJ0EPm1VleQ==", + "version": "1.0.30001425", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001425.tgz", + "integrity": "sha512-/pzFv0OmNG6W0ym80P3NtapU0QEiDS3VuYAZMGoLLqiC7f6FJFe1MjpQDREGApeenD9wloeytmVDj+JLXPC6qw==", "dev": true }, "choices.js": { diff --git a/app/package.json b/app/package.json index 94759334..67755350 100644 --- a/app/package.json +++ b/app/package.json @@ -6,7 +6,7 @@ "pre-publish": "npm upgrade && vite build" }, "devDependencies": { - "@protonemedia/laravel-splade": "file:../protonemedia-laravel-splade-0.6.8.tgz", + "@protonemedia/laravel-splade": "file:../protonemedia-laravel-splade-0.6.9.tgz", "@tailwindcss/forms": "^0.5.2", "@tailwindcss/typography": "^0.5.2", "@vitejs/plugin-vue": "^3.0.0", diff --git a/dist/protone-media-laravel-splade.js b/dist/protone-media-laravel-splade.js index 3fec7c55..b3b7d868 100644 --- a/dist/protone-media-laravel-splade.js +++ b/dist/protone-media-laravel-splade.js @@ -1,5 +1,5 @@ import Jn from "axios"; -import { ref as y, computed as P, watch as dt, openBlock as q, createBlock as K, unref as H, createCommentVNode as Bt, h as k, onMounted as N, createElementBlock as de, createElementVNode as ur, provide as te, inject as U, nextTick as Le, KeepAlive as Zn, normalizeStyle as Pt, createVNode as ya, Fragment as Ir, renderList as ba, cloneVNode as wa, watchEffect as Z, defineComponent as W, onUnmounted as _e, Teleport as ei, reactive as Sa, onBeforeUnmount as Oa, renderSlot as re, resolveComponent as ti, withCtx as $a, withModifiers as Ea, normalizeProps as _a, mergeProps as xa } from "vue"; +import { ref as b, computed as P, watch as dt, openBlock as q, createBlock as K, unref as H, createCommentVNode as Lt, h as k, onMounted as N, createElementBlock as pe, createElementVNode as ur, provide as te, inject as U, nextTick as Be, KeepAlive as Zn, normalizeStyle as Pt, createVNode as ya, Fragment as Ir, renderList as ba, cloneVNode as wa, watchEffect as Z, defineComponent as W, onUnmounted as _e, Teleport as ei, reactive as Sa, onBeforeUnmount as Oa, renderSlot as re, resolveComponent as ti, withCtx as $a, withModifiers as Ea, normalizeProps as _a, mergeProps as xa } from "vue"; function Ta(e, t) { for (var r = -1, n = e == null ? 0 : e.length; ++r < n && t(e[r], r, e) !== !1; ) ; @@ -26,11 +26,11 @@ var Da = typeof global == "object" && global && global.Object === Object && glob const ri = Da; var qa = typeof self == "object" && self && self.Object === Object && self, ja = ri || qa || Function("return this")(); const se = ja; -var La = se.Symbol; -const Se = La; -var ni = Object.prototype, Ba = ni.hasOwnProperty, ka = ni.toString, rt = Se ? Se.toStringTag : void 0; +var Ba = se.Symbol; +const Se = Ba; +var ni = Object.prototype, La = ni.hasOwnProperty, ka = ni.toString, rt = Se ? Se.toStringTag : void 0; function Fa(e) { - var t = Ba.call(e, rt), r = e[rt]; + var t = La.call(e, rt), r = e[rt]; try { e[rt] = void 0; var n = !0; @@ -105,20 +105,20 @@ function qs(e, t) { return o; } var js = Object.prototype; -function Ls(e) { +function Bs(e) { var t = e && e.constructor, r = typeof t == "function" && t.prototype || js; return e === r; } -function Bs(e, t) { +function Ls(e, t) { return function(r) { return e(t(r)); }; } -var ks = Bs(Object.keys, Object); +var ks = Ls(Object.keys, Object); const Fs = ks; var Rs = Object.prototype, Ms = Rs.hasOwnProperty; function Ns(e) { - if (!Ls(e)) + if (!Bs(e)) return Fs(e); var t = []; for (var r in Object(e)) @@ -168,16 +168,16 @@ function Ks(e, t) { var r = F(e) ? Ta : qr; return r(e, fi(t)); } -function be(e, t) { +function oe(e, t) { return e && Dr(e, fi(t)); } var Xs = Array.prototype, Qs = Xs.reverse; function Ys(e) { return e == null ? e : Qs.call(e); } -const Ct = y(0), fr = y(1), L = y({}), le = y(0), $e = typeof window > "u"; +const Ct = b(0), fr = b(1), B = b({}), ue = b(0), $e = typeof window > "u"; function Js(e, t, r) { - $e || window.addEventListener("popstate", Zs.bind(this)), Object.keys(t).length > 0 && Ct.value++, Br(r), Rt(r.head), kr(e); + $e || window.addEventListener("popstate", Zs.bind(this)), Object.keys(t).length > 0 && Ct.value++, Lr(r), Rt(r.head), kr(e); const n = $e ? "" : location.href, i = jr( n, r.head, @@ -190,7 +190,7 @@ function Js(e, t, r) { di(i); } function Zs(e) { - !e.state || (L.value = e.state, le.value = 0, Rt(L.value.head), kr(L.value.html, L.value.rememberedState.scrollY)); + !e.state || (B.value = e.state, ue.value = 0, Rt(B.value.head), kr(B.value.html, B.value.rememberedState.scrollY)); } function jr(e, t, r, n, i, a, s) { const o = { @@ -202,7 +202,7 @@ function jr(e, t, r, n, i, a, s) { pageVisitId: a, dynamicVisitId: s }; - return L.value = o, o; + return B.value = o, o; } function eo(e) { $e || window.history.pushState(e, "", e.url); @@ -210,32 +210,32 @@ function eo(e) { function to(e) { const t = jr( e, - JSON.parse(JSON.stringify(L.value.head)), - L.value.html, - L.value.dynamics, - { ...L.value.rememberedState }, - L.value.pageVisitId, - L.value.dynamicVisitId + JSON.parse(JSON.stringify(B.value.head)), + B.value.html, + B.value.dynamics, + { ...B.value.rememberedState }, + B.value.pageVisitId, + B.value.dynamicVisitId ); $e || window.history.replaceState(t, "", t.url); } function di(e) { $e || window.history.replaceState(e, "", e.url); } -const rr = y(0); +const rr = b(0); function ro(e, t) { rr.value++; const r = e.request.responseURL; if (e.data.splade.lazy) return; - if (e.data.splade.modal && le.value++, Br(e.data.splade), Rt(e.data.splade.head), r === L.value.url && (t = !0), e.data.splade.modal) + if (e.data.splade.modal && ue.value++, Lr(e.data.splade), Rt(e.data.splade.head), r === B.value.url && (t = !0), e.data.splade.modal) return po(e.data.html, e.data.splade.modal); if (e.data.splade.preventRefresh) return; - le.value = 0; + ue.value = 0; let n = e.data.html, i = e.data.dynamics; - const a = Object.keys(L.value.dynamics).length > 0, s = Object.keys(i).length > 0; - t ? (s && be(i, (l, u) => { + const a = Object.keys(B.value.dynamics).length > 0, s = Object.keys(i).length > 0; + t ? (s && oe(i, (l, u) => { i[u] += ``; }), (!s || !a) && (n += ``)) : (s && Ct.value++, (!s || !a) && fr.value++), kr(n, 0); const o = jr( @@ -243,16 +243,16 @@ function ro(e, t) { e.data.splade.head, n, i, - L.value.rememberedState ? { ...L.value.rememberedState } : {}, + B.value.rememberedState ? { ...B.value.rememberedState } : {}, fr.value, Ct.value ); t ? di(o) : eo(o); } function no() { - le.value--, Rt(ao(le.value)); + ue.value--, Rt(ao(ue.value)); } -const pi = y({}), hi = (e) => pi.value[e], io = (e) => Object.keys(hi.value[e]).length > 0, mi = y({}), ao = (e) => mi.value[e], vi = y({}), so = (e) => vi.value[e], We = y([]); +const pi = b({}), hi = (e) => pi.value[e], io = (e) => Object.keys(hi.value[e]).length > 0, mi = b({}), ao = (e) => mi.value[e], vi = b({}), so = (e) => vi.value[e], We = b([]); function oo(e) { We.value.push(e); } @@ -260,13 +260,13 @@ const lo = P(() => Ys(We.value)); function uo(e) { We.value[e].dismissed = !0, We.value[e].html = null; } -const Lr = y(null); +const Br = b(null); function co(e, t, r, n) { let i, a; const s = new Promise((o, l) => { i = o, a = l; }); - return Lr.value = { + return Br.value = { title: e, text: t, confirmButton: r, @@ -276,18 +276,18 @@ function co(e, t, r, n) { }, s; } function fo() { - Lr.value = null; + Br.value = null; } -const gi = y({}); -function Br(e) { - gi.value = e.shared ? e.shared : {}, vi.value[le.value] = e.flash ? e.flash : {}, mi.value[le.value] = e.head ? e.head : {}, Ks(e.toasts ? e.toasts : [], (t) => { +const gi = b({}); +function Lr(e) { + gi.value = e.shared ? e.shared : {}, vi.value[ue.value] = e.flash ? e.flash : {}, mi.value[ue.value] = e.head ? e.head : {}, Ks(e.toasts ? e.toasts : [], (t) => { We.value.push(t); - }), pi.value[le.value] = e.errors ? e.errors : {}; + }), pi.value[ue.value] = e.errors ? e.errors : {}; } -const yi = y(() => { -}), bi = y(() => { -}), wi = y(() => { -}), Si = y(() => { +const yi = b(() => { +}), bi = b(() => { +}), wi = b(() => { +}), Si = b(() => { }); function Rt(e) { yi.value(e); @@ -301,7 +301,7 @@ function po(e, t) { function ho(e) { Si.value(e); } -const Oi = y({}); +const Oi = b({}); function $i(e, t, r) { Oi.value[e] = t, r && mo(e, t); } @@ -337,7 +337,7 @@ function Qe(e, t, r, n, i) { if (St("request-error", { url: e, method: t, data: r, headers: n, replace: i, error: s }), s.response.status == 409 && s.response.headers["x-splade-redirect-away"]) return window.location = s.response.headers["x-splade-redirect-away"]; const o = s.response.data.splade; - o && (o.lazy || Br(o)), s.response.status != 422 && ho( + o && (o.lazy || Lr(o)), s.response.status != 422 && ho( s.response.data.html ? s.response.data.html : s.response.data ); }), a; @@ -358,9 +358,9 @@ function wo(e, t) { return Qe(e, "GET", {}, { "X-Splade-Lazy": t }, !1); } function So() { - return Ei(L.value.url); + return Ei(B.value.url); } -const h = { +const m = { init: Js, replace: Ei, visit: go, @@ -371,7 +371,7 @@ const h = { lazy: wo, replaceUrlOfCurrentPage: to, htmlForDynamicComponent(e) { - return L.value.dynamics[e]; + return B.value.dynamics[e]; }, setOnHead(e) { yi.value = e; @@ -391,7 +391,7 @@ const h = { flashData: so, toasts: We, toastsReversed: lo, - confirmModal: Lr, + confirmModal: Br, confirm: co, clearConfirmModal: fo, pushToast: oo, @@ -399,16 +399,16 @@ const h = { restore: vo, remember: $i, popStack: no, - currentStack: le, - pageVisitId: P(() => L.value.pageVisitId), - dynamicVisitId: P(() => L.value.dynamicVisitId), + currentStack: ue, + pageVisitId: P(() => B.value.pageVisitId), + dynamicVisitId: P(() => B.value.dynamicVisitId), isSsr: $e }; var Oo = "[object String]"; function Ot(e) { return typeof e == "string" || !F(e) && Oe(e) && xe(e) == Oo; } -const oe = { +const le = { __name: "Render", props: { html: { @@ -418,13 +418,13 @@ const oe = { } }, setup(e) { - const t = e, r = y(null); + const t = e, r = b(null); function n() { r.value = k({ template: t.html }); } - return dt(() => t.html, n, { immediate: !0 }), (i, a) => e.html ? (q(), K(H(r), { key: 0 })) : Bt("", !0); + return dt(() => t.html, n, { immediate: !0 }), (i, a) => e.html ? (q(), K(H(r), { key: 0 })) : Lt("", !0); } }, $o = { __name: "ServerError", @@ -436,7 +436,7 @@ const oe = { }, emits: ["close"], setup(e, { emit: t }) { - const r = e, n = y(null); + const r = e, n = b(null); function i() { const o = document.createElement("html"); o.innerHTML = r.html, o.querySelectorAll("a").forEach((u) => u.setAttribute("target", "_top")), document.body.style.overflow = "hidden"; @@ -451,7 +451,7 @@ const oe = { function s() { document.body.style.overflow = "visible", document.removeEventListener("keydown", a), t("close"); } - return N(() => i()), (o, l) => (q(), de("div", { + return N(() => i()), (o, l) => (q(), pe("div", { style: { position: "fixed", top: "0px", right: "0px", bottom: "0px", left: "0px", "z-index": "200000", "box-sizing": "border-box", height: "100vh", width: "100vw", "background-color": "rgb(0 0 0 / 0.75)", padding: "2rem" }, onClick: s }, [ @@ -474,7 +474,7 @@ const oe = { type: String, required: !1, default: (e) => { - if (!h.isSsr) { + if (!m.isSsr) { const t = Ot(e.el) ? document.getElementById(e.el) : e.el; return JSON.parse(t.dataset.components) || ""; } @@ -484,7 +484,7 @@ const oe = { type: String, required: !1, default: (e) => { - if (!h.isSsr) { + if (!m.isSsr) { const t = Ot(e.el) ? document.getElementById(e.el) : e.el; return JSON.parse(t.dataset.html) || ""; } @@ -494,7 +494,7 @@ const oe = { type: Object, required: !1, default: (e) => { - if (!h.isSsr) { + if (!m.isSsr) { const t = Ot(e.el) ? document.getElementById(e.el) : e.el; return JSON.parse(t.dataset.dynamics) || {}; } @@ -504,7 +504,7 @@ const oe = { type: Object, required: !1, default: (e) => { - if (!h.isSsr) { + if (!m.isSsr) { const t = Ot(e.el) ? document.getElementById(e.el) : e.el; return JSON.parse(t.dataset.splade) || {}; } @@ -514,73 +514,86 @@ const oe = { setup(e) { const t = e; te("stack", 0); - const r = y(), n = y([]), i = y(null), a = U("$spladeOptions") || {}, s = P(() => h.currentStack.value < 1 ? [] : { + const r = b(), n = b([]), i = b(null), a = b(null), s = U("$spladeOptions") || {}, o = P(() => m.currentStack.value < 1 ? [] : { filter: "blur(4px)", "transition-property": "filter", "transition-duration": "150ms", "transition-timing-function": "cubic-bezier(0.4, 0, 0.2, 1)" }); - function o() { + function l() { i.value = null; } - function l(f) { - n[f] = null, h.popStack(); - } - function u(f, p) { - let d = document.querySelector(`meta[${f}="${p}"]`); - return d || (d = document.createElement("meta"), d[f] = p, document.getElementsByTagName("head")[0].appendChild(d), d); + function u(f) { + n[f] = null, m.popStack(); } function c(f) { - const p = f.name ? u("name", f.name) : u("property", f.property); - be(f, (d, v) => { - p[v] = d; - }); + const d = document.createElement("meta"); + oe(f, (h, g) => { + d[g] = h; + }), document.getElementsByTagName("head")[0].appendChild(d); } - return h.setOnHead((f) => { - h.isSsr || (document.title = f.title, f.meta.forEach((p) => { - c(p); - })); - }), h.setOnHtml((f, p) => { - n.value = [], r.value = f, Le(() => { - h.isSsr || window.scrollTo(0, p), a.transform_anchors && [...document.querySelectorAll("a")].forEach((d) => { - d.href == "" || d.href.charAt(0) == "#" || d.__vnode.dynamicProps === null && (d.hasAttribute("download") || (d.onclick = function(v) { - v.preventDefault(), h.visit(d.href); + function p(f) { + var h; + let d = "meta"; + oe(f, (g, w) => { + d = `${d}[${w}="${g}"]`; + }), (h = document.querySelector(d)) == null || h.remove(); + } + return m.setOnHead((f) => { + var d; + if (!m.isSsr) { + if (a.value === null) + return a.value = f.meta; + if (a.value.forEach((h) => { + p(h); + }), a.value = f.meta, document.title = f.title, f.meta.forEach((h) => { + c(h); + }), (d = document.querySelector('link[rel="canonical"]')) == null || d.remove(), f.canonical) { + const h = document.createElement("link"); + h.rel = "canonical", h.href = f.canonical, document.getElementsByTagName("head")[0].appendChild(h); + } + } + }), m.setOnHtml((f, d) => { + n.value = [], r.value = f, Be(() => { + m.isSsr || window.scrollTo(0, d), s.transform_anchors && [...document.querySelectorAll("a")].forEach((h) => { + h.href == "" || h.href.charAt(0) == "#" || h.__vnode.dynamicProps === null && (h.hasAttribute("download") || (h.onclick = function(g) { + g.preventDefault(), m.visit(h.href); })); }); }); - }), h.setOnModal(function(f, p) { - n.value[h.currentStack.value] = { html: f, type: p }; - }), h.setOnServerError(function(f) { + }), m.setOnModal(function(f, d) { + n.value[m.currentStack.value] = { html: f, type: d }; + }), m.setOnServerError(function(f) { i.value = f; - }), h.init(t.initialHtml, t.initialDynamics, t.initialSpladeData), (f, p) => (q(), de("div", null, [ - H(h).isSsr ? (q(), K(oe, { - key: `visit.${H(h).pageVisitId.value}`, - style: Pt(H(s)), + }), m.init(t.initialHtml, t.initialDynamics, t.initialSpladeData), (f, d) => (q(), pe("div", null, [ + H(m).isSsr ? (q(), K(le, { + key: `visit.${H(m).pageVisitId.value}`, + style: Pt(H(o)), html: r.value }, null, 8, ["style", "html"])) : (q(), K(Zn, { key: 0, - max: H(a).max_keep_alive + max: H(s).max_keep_alive }, [ - (q(), K(oe, { - key: `visit.${H(h).pageVisitId.value}`, - style: Pt(H(s)), + (q(), K(le, { + key: `visit.${H(m).pageVisitId.value}`, + style: Pt(H(o)), html: r.value }, null, 8, ["style", "html"])) ], 1032, ["max"])), - ya(oe, { html: e.components }, null, 8, ["html"]), - (q(!0), de(Ir, null, ba(H(h).currentStack.value, (d) => (q(), K(oe, { - key: `modal.${d}`, - type: n.value[d].type, - html: n.value[d].html, - stack: d, - "on-top-of-stack": H(h).currentStack.value === d, - onClose: (v) => l(d) + ya(le, { html: e.components }, null, 8, ["html"]), + (q(!0), pe(Ir, null, ba(H(m).currentStack.value, (h) => (q(), K(le, { + key: `modal.${h}`, + type: n.value[h].type, + html: n.value[h].html, + stack: h, + "on-top-of-stack": H(m).currentStack.value === h, + onClose: (g) => u(h) }, null, 8, ["type", "html", "stack", "on-top-of-stack", "onClose"]))), 128)), i.value ? (q(), K($o, { key: 2, html: i.value, - onClose: o - }, null, 8, ["html"])) : Bt("", !0) + onClose: l + }, null, 8, ["html"])) : Lt("", !0) ])); } }; @@ -625,13 +638,13 @@ function Re(e) { } return ""; } -var Lo = /[\\^$.*+?()[\]{}|]/g, Bo = /^\[object .+?Constructor\]$/, ko = Function.prototype, Fo = Object.prototype, Ro = ko.toString, Mo = Fo.hasOwnProperty, No = RegExp( - "^" + Ro.call(Mo).replace(Lo, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" +var Bo = /[\\^$.*+?()[\]{}|]/g, Lo = /^\[object .+?Constructor\]$/, ko = Function.prototype, Fo = Object.prototype, Ro = ko.toString, Mo = Fo.hasOwnProperty, No = RegExp( + "^" + Ro.call(Mo).replace(Bo, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" ); function Vo(e) { if (!ne(e) || Do(e)) return !1; - var t = ui(e) ? No : Bo; + var t = ui(e) ? No : Lo; return t.test(Re(e)); } function Ho(e, t) { @@ -669,18 +682,18 @@ function tl(e, t) { var r = this.__data__; return this.size += this.has(e) ? 0 : 1, r[e] = lt && t === void 0 ? el : t, this; } -function Be(e) { +function Le(e) { var t = -1, r = e == null ? 0 : e.length; for (this.clear(); ++t < r; ) { var n = e[t]; this.set(n[0], n[1]); } } -Be.prototype.clear = Wo; -Be.prototype.delete = zo; -Be.prototype.get = Qo; -Be.prototype.has = Zo; -Be.prototype.set = tl; +Le.prototype.clear = Wo; +Le.prototype.delete = zo; +Le.prototype.get = Qo; +Le.prototype.has = Zo; +Le.prototype.set = tl; function rl() { this.__data__ = [], this.size = 0; } @@ -712,25 +725,25 @@ function ll(e, t) { var r = this.__data__, n = Nt(r, e); return n < 0 ? (++this.size, r.push([e, t])) : r[n][1] = t, this; } -function he(e) { +function me(e) { var t = -1, r = e == null ? 0 : e.length; for (this.clear(); ++t < r; ) { var n = e[t]; this.set(n[0], n[1]); } } -he.prototype.clear = rl; -he.prototype.delete = al; -he.prototype.get = sl; -he.prototype.has = ol; -he.prototype.set = ll; +me.prototype.clear = rl; +me.prototype.delete = al; +me.prototype.get = sl; +me.prototype.has = ol; +me.prototype.set = ll; var ul = Me(se, "Map"); const ut = ul; function cl() { this.size = 0, this.__data__ = { - hash: new Be(), - map: new (ut || he)(), - string: new Be() + hash: new Le(), + map: new (ut || me)(), + string: new Le() }; } function fl(e) { @@ -755,18 +768,18 @@ function ml(e, t) { var r = Vt(this, e), n = r.size; return r.set(e, t), this.size += r.size == n ? 0 : 1, this; } -function me(e) { +function ve(e) { var t = -1, r = e == null ? 0 : e.length; for (this.clear(); ++t < r; ) { var n = e[t]; this.set(n[0], n[1]); } } -me.prototype.clear = cl; -me.prototype.delete = dl; -me.prototype.get = pl; -me.prototype.has = hl; -me.prototype.set = ml; +ve.prototype.clear = cl; +ve.prototype.delete = dl; +ve.prototype.get = pl; +ve.prototype.has = hl; +ve.prototype.set = ml; var vl = "Expected a function"; function Mr(e, t) { if (typeof e != "function" || t != null && typeof t != "function") @@ -778,9 +791,9 @@ function Mr(e, t) { var s = e.apply(this, n); return r.cache = a.set(i, s) || a, s; }; - return r.cache = new (Mr.Cache || me)(), r; + return r.cache = new (Mr.Cache || ve)(), r; } -Mr.Cache = me; +Mr.Cache = ve; var gl = 500; function yl(e) { var t = Mr(e, function(n) { @@ -865,17 +878,17 @@ function ir({ props: e, attrs: t, slots: r, slot: n, name: i }) { var a; let { as: s, ...o } = Ai(e, ["unmount", "static"]), l = (a = r.default) == null ? void 0 : a.call(r, n), u = {}; if (n) { - let c = !1, f = []; - for (let [p, d] of Object.entries(n)) - typeof d == "boolean" && (c = !0), d === !0 && f.push(p); - c && (u["data-headlessui-state"] = f.join(" ")); + let c = !1, p = []; + for (let [f, d] of Object.entries(n)) + typeof d == "boolean" && (c = !0), d === !0 && p.push(f); + c && (u["data-headlessui-state"] = p.join(" ")); } if (s === "template") { if (l = Ti(l != null ? l : []), Object.keys(o).length > 0 || Object.keys(t).length > 0) { - let [c, ...f] = l != null ? l : []; - if (!xl(c) || f.length > 0) - throw new Error(['Passing props on "template"!', "", `The current component <${i} /> is rendering a "template".`, "However we need to passthrough the following props:", Object.keys(o).concat(Object.keys(t)).sort((p, d) => p.localeCompare(d)).map((p) => ` - ${p}`).join(` -`), "", "You can apply a few solutions:", ['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".', "Render a single element as the child so that we can forward the props onto that element."].map((p) => ` - ${p}`).join(` + let [c, ...p] = l != null ? l : []; + if (!xl(c) || p.length > 0) + throw new Error(['Passing props on "template"!', "", `The current component <${i} /> is rendering a "template".`, "However we need to passthrough the following props:", Object.keys(o).concat(Object.keys(t)).sort((f, d) => f.localeCompare(d)).map((f) => ` - ${f}`).join(` +`), "", "You can apply a few solutions:", ['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".', "Render a single element as the child so that we can forward the props onto that element."].map((f) => ` - ${f}`).join(` `)].join(` `)); return wa(c, Object.assign({}, o, u)); @@ -926,7 +939,7 @@ function Ne() { return Al(); } var Ii = ((e) => (e.Space = " ", e.Enter = "Enter", e.Escape = "Escape", e.Backspace = "Backspace", e.Delete = "Delete", e.ArrowLeft = "ArrowLeft", e.ArrowUp = "ArrowUp", e.ArrowRight = "ArrowRight", e.ArrowDown = "ArrowDown", e.Home = "Home", e.End = "End", e.PageUp = "PageUp", e.PageDown = "PageDown", e.Tab = "Tab", e))(Ii || {}); -function pe(e) { +function he(e) { var t; return e == null || e.value == null ? null : (t = e.value.$el) != null ? t : e.value; } @@ -948,7 +961,7 @@ function Ye(e) { if (e instanceof Node) return e.ownerDocument; if (e != null && e.hasOwnProperty("value")) { - let t = pe(e); + let t = he(e); if (t) return t.ownerDocument; } @@ -978,11 +991,11 @@ function st(e) { e == null || e.focus({ preventScroll: !0 }); } let jl = ["textarea", "input"].join(","); -function Ll(e) { +function Bl(e) { var t, r; return (r = (t = e == null ? void 0 : e.matches) == null ? void 0 : t.call(e, jl)) != null ? r : !1; } -function Bl(e, t = (r) => r) { +function Ll(e, t = (r) => r) { return e.slice().sort((r, n) => { let i = t(r), a = t(n); if (i === null || a === null) @@ -993,7 +1006,7 @@ function Bl(e, t = (r) => r) { } function pr(e, t, r = !0, n = null) { var i; - let a = (i = Array.isArray(e) ? e.length > 0 ? e[0].ownerDocument : document : e == null ? void 0 : e.ownerDocument) != null ? i : document, s = Array.isArray(e) ? r ? Bl(e) : e : Dl(e); + let a = (i = Array.isArray(e) ? e.length > 0 ? e[0].ownerDocument : document : e == null ? void 0 : e.ownerDocument) != null ? i : document, s = Array.isArray(e) ? r ? Ll(e) : e : Dl(e); n = n != null ? n : a.activeElement; let o = (() => { if (t & 5) @@ -1011,22 +1024,22 @@ function pr(e, t, r = !0, n = null) { if (t & 8) return s.length - 1; throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last"); - })(), u = t & 32 ? { preventScroll: !0 } : {}, c = 0, f = s.length, p; + })(), u = t & 32 ? { preventScroll: !0 } : {}, c = 0, p = s.length, f; do { - if (c >= f || c + f <= 0) + if (c >= p || c + p <= 0) return 0; let d = l + c; if (t & 16) - d = (d + f) % f; + d = (d + p) % p; else { if (d < 0) return 3; - if (d >= f) + if (d >= p) return 1; } - p = s[d], p == null || p.focus(u), c += o; - } while (p !== a.activeElement); - return t & 6 && Ll(p) && p.select(), p.hasAttribute("tabindex") || p.setAttribute("tabindex", "0"), 2; + f = s[d], f == null || f.focus(u), c += o; + } while (f !== a.activeElement); + return t & 6 && Bl(f) && f.select(), f.hasAttribute("tabindex") || f.setAttribute("tabindex", "0"), 2; } function ar(e, t, r) { Ut || Z((n) => { @@ -1046,13 +1059,13 @@ function kl(e, t, r = P(() => !0)) { for (let u of l) { if (u === null) continue; - let c = u instanceof HTMLElement ? u : pe(u); + let c = u instanceof HTMLElement ? u : he(u); if (c != null && c.contains(o)) return; } return !ql(o, Di.Loose) && o.tabIndex !== -1 && a.preventDefault(), t(a, o); } - let i = y(null); + let i = b(null); ar("mousedown", (a) => { var s, o; r.value && (i.value = ((o = (s = a.composedPath) == null ? void 0 : s.call(a)) == null ? void 0 : o[0]) || a.target); @@ -1074,7 +1087,7 @@ function Fl(e, t, r) { } var mr = ((e) => (e[e.Forwards = 0] = "Forwards", e[e.Backwards = 1] = "Backwards", e))(mr || {}); function Rl() { - let e = y(0); + let e = b(0); return Fl("keydown", (t) => { t.key === "Tab" && (e.value = t.shiftKey ? 1 : 0); }), e; @@ -1090,8 +1103,8 @@ function Ml(e) { })); } var ji = ((e) => (e[e.None = 1] = "None", e[e.InitialFocus = 2] = "InitialFocus", e[e.TabLock = 4] = "TabLock", e[e.FocusLock = 8] = "FocusLock", e[e.RestoreFocus = 16] = "RestoreFocus", e[e.All = 30] = "All", e))(ji || {}); -let nt = Object.assign(W({ name: "FocusTrap", props: { as: { type: [Object, String], default: "div" }, initialFocus: { type: Object, default: null }, features: { type: Number, default: 30 }, containers: { type: Object, default: y(/* @__PURE__ */ new Set()) } }, inheritAttrs: !1, setup(e, { attrs: t, slots: r, expose: n }) { - let i = y(null); +let nt = Object.assign(W({ name: "FocusTrap", props: { as: { type: [Object, String], default: "div" }, initialFocus: { type: Object, default: null }, features: { type: Number, default: 30 }, containers: { type: Object, default: b(/* @__PURE__ */ new Set()) } }, inheritAttrs: !1, setup(e, { attrs: t, slots: r, expose: n }) { + let i = b(null); n({ el: i, $el: i }); let a = P(() => Ye(i)); Nl({ ownerDocument: a }, P(() => Boolean(e.features & 16))); @@ -1099,16 +1112,16 @@ let nt = Object.assign(W({ name: "FocusTrap", props: { as: { type: [Object, Stri Hl({ ownerDocument: a, container: i, containers: e.containers, previousActiveElement: s }, P(() => Boolean(e.features & 8))); let o = Rl(); function l() { - let u = pe(i); + let u = he(i); !u || Y(o.value, { [mr.Forwards]: () => pr(u, ct.First), [mr.Backwards]: () => pr(u, ct.Last) }); } return () => { - let u = {}, c = { ref: i }, { features: f, initialFocus: p, containers: d, ...v } = e; - return k(Ir, [Boolean(f & 4) && k(hr, { as: "button", type: "button", onFocus: l, features: qt.Focusable }), z({ ourProps: c, theirProps: { ...t, ...v }, slot: u, attrs: t, slots: r, name: "FocusTrap" }), Boolean(f & 4) && k(hr, { as: "button", type: "button", onFocus: l, features: qt.Focusable })]); + let u = {}, c = { ref: i }, { features: p, initialFocus: f, containers: d, ...h } = e; + return k(Ir, [Boolean(p & 4) && k(hr, { as: "button", type: "button", onFocus: l, features: qt.Focusable }), z({ ourProps: c, theirProps: { ...t, ...h }, slot: u, attrs: t, slots: r, name: "FocusTrap" }), Boolean(p & 4) && k(hr, { as: "button", type: "button", onFocus: l, features: qt.Focusable })]); }; } }), { features: ji }); function Nl({ ownerDocument: e }, t) { - let r = y(null); + let r = b(null); function n() { var a; r.value || (r.value = (a = e.value) == null ? void 0 : a.activeElement); @@ -1123,27 +1136,27 @@ function Nl({ ownerDocument: e }, t) { }), _e(i); } function Vl({ ownerDocument: e, container: t, initialFocus: r }, n) { - let i = y(null), a = y(!1); + let i = b(null), a = b(!1); return N(() => a.value = !0), _e(() => a.value = !1), N(() => { dt([t, r, n], (s, o) => { if (s.every((u, c) => (o == null ? void 0 : o[c]) === u) || !n.value) return; - let l = pe(t); + let l = he(t); !l || Ml(() => { var u, c; if (!a.value) return; - let f = pe(r), p = (u = e.value) == null ? void 0 : u.activeElement; - if (f) { - if (f === p) { - i.value = p; + let p = he(r), f = (u = e.value) == null ? void 0 : u.activeElement; + if (p) { + if (p === f) { + i.value = f; return; } - } else if (l.contains(p)) { - i.value = p; + } else if (l.contains(f)) { + i.value = f; return; } - f ? st(f) : pr(l, ct.First | ct.NoScroll) === Ci.Error && console.warn("There are no focusable elements inside the "), i.value = (c = e.value) == null ? void 0 : c.activeElement; + p ? st(p) : pr(l, ct.First | ct.NoScroll) === Ci.Error && console.warn("There are no focusable elements inside the "), i.value = (c = e.value) == null ? void 0 : c.activeElement; }); }, { immediate: !0, flush: "post" }); }), i; @@ -1169,53 +1182,53 @@ function Ul(e, t) { return !0; return !1; } -let On = "body > *", Ue = /* @__PURE__ */ new Set(), ye = /* @__PURE__ */ new Map(); +let On = "body > *", Ue = /* @__PURE__ */ new Set(), be = /* @__PURE__ */ new Map(); function $n(e) { e.setAttribute("aria-hidden", "true"), e.inert = !0; } function En(e) { - let t = ye.get(e); + let t = be.get(e); !t || (t["aria-hidden"] === null ? e.removeAttribute("aria-hidden") : e.setAttribute("aria-hidden", t["aria-hidden"]), e.inert = t.inert); } -function Wl(e, t = y(!0)) { +function Wl(e, t = b(!0)) { Z((r) => { if (!t.value || !e.value) return; let n = e.value, i = Ye(n); if (i) { Ue.add(n); - for (let a of ye.keys()) - a.contains(n) && (En(a), ye.delete(a)); + for (let a of be.keys()) + a.contains(n) && (En(a), be.delete(a)); i.querySelectorAll(On).forEach((a) => { if (a instanceof HTMLElement) { for (let s of Ue) if (a.contains(s)) return; - Ue.size === 1 && (ye.set(a, { "aria-hidden": a.getAttribute("aria-hidden"), inert: a.inert }), $n(a)); + Ue.size === 1 && (be.set(a, { "aria-hidden": a.getAttribute("aria-hidden"), inert: a.inert }), $n(a)); } }), r(() => { if (Ue.delete(n), Ue.size > 0) i.querySelectorAll(On).forEach((a) => { - if (a instanceof HTMLElement && !ye.has(a)) { + if (a instanceof HTMLElement && !be.has(a)) { for (let s of Ue) if (a.contains(s)) return; - ye.set(a, { "aria-hidden": a.getAttribute("aria-hidden"), inert: a.inert }), $n(a); + be.set(a, { "aria-hidden": a.getAttribute("aria-hidden"), inert: a.inert }), $n(a); } }); else - for (let a of ye.keys()) - En(a), ye.delete(a); + for (let a of be.keys()) + En(a), be.delete(a); }); } }); } -let Li = Symbol("ForcePortalRootContext"); +let Bi = Symbol("ForcePortalRootContext"); function zl() { - return U(Li, !1); + return U(Bi, !1); } let vr = W({ name: "ForcePortalRoot", props: { as: { type: [Object, String], default: "template" }, force: { type: Boolean, default: !1 } }, setup(e, { slots: t, attrs: r }) { - return te(Li, e.force), () => { + return te(Bi, e.force), () => { let { force: n, ...i } = e; return z({ theirProps: i, ourProps: {}, slot: {}, slots: t, attrs: r, name: "ForcePortalRoot" }); }; @@ -1233,8 +1246,8 @@ function Gl(e) { let n = t.createElement("div"); return n.setAttribute("id", "headlessui-portal-root"), t.body.appendChild(n); } -let Bi = W({ name: "Portal", props: { as: { type: [Object, String], default: "div" } }, setup(e, { slots: t, attrs: r }) { - let n = y(null), i = P(() => Ye(n)), a = zl(), s = U(ki, null), o = y(a === !0 || s == null ? Gl(n.value) : s.resolveTarget()); +let Li = W({ name: "Portal", props: { as: { type: [Object, String], default: "div" } }, setup(e, { slots: t, attrs: r }) { + let n = b(null), i = P(() => Ye(n)), a = zl(), s = U(ki, null), o = b(a === !0 || s == null ? Gl(n.value) : s.resolveTarget()); return Z(() => { a || s != null && (o.value = s.resolveTarget()); }), _e(() => { @@ -1281,8 +1294,8 @@ function Yl() { throw new Error("Missing parent"); return e; } -function Jl({ slot: e = y({}), name: t = "Description", props: r = {} } = {}) { - let n = y([]); +function Jl({ slot: e = b({}), name: t = "Description", props: r = {} } = {}) { + let n = b([]); function i(a) { return n.value.push(a), () => { let s = n.value.indexOf(a); @@ -1294,7 +1307,7 @@ function Jl({ slot: e = y({}), name: t = "Description", props: r = {} } = {}) { let Qd = W({ name: "Description", props: { as: { type: [Object, String], default: "p" } }, setup(e, { attrs: t, slots: r }) { let n = Yl(), i = `headlessui-description-${Ne()}`; return N(() => _e(n.register(i))), () => { - let { name: a = "Description", slot: s = y({}), props: o = {} } = n, l = e, u = { ...Object.entries(o).reduce((c, [f, p]) => Object.assign(c, { [f]: H(p) }), {}), id: i }; + let { name: a = "Description", slot: s = b({}), props: o = {} } = n, l = e, u = { ...Object.entries(o).reduce((c, [p, f]) => Object.assign(c, { [p]: H(f) }), {}), id: i }; return z({ ourProps: u, theirProps: l, slot: s.value, attrs: t, slots: r, name: a }); }; } }); @@ -1339,74 +1352,74 @@ function ht(e) { } let $t = "DC8F892D-2EBD-447C-A4C8-A03058436FF4", Wr = W({ name: "Dialog", inheritAttrs: !1, props: { as: { type: [Object, String], default: "div" }, static: { type: Boolean, default: !1 }, unmount: { type: Boolean, default: !0 }, open: { type: [Boolean, String], default: $t }, initialFocus: { type: Object, default: null } }, emits: { close: (e) => !0 }, setup(e, { emit: t, attrs: r, slots: n, expose: i }) { var a; - let s = y(!1); + let s = b(!1); N(() => { s.value = !0; }); - let o = y(0), l = Hr(), u = P(() => e.open === $t && l !== null ? Y(l.value, { [ke.Open]: !0, [ke.Closed]: !1 }) : e.open), c = y(/* @__PURE__ */ new Set()), f = y(null), p = y(null), d = P(() => Ye(f)); - if (i({ el: f, $el: f }), !(e.open !== $t || l !== null)) + let o = b(0), l = Hr(), u = P(() => e.open === $t && l !== null ? Y(l.value, { [ke.Open]: !0, [ke.Closed]: !1 }) : e.open), c = b(/* @__PURE__ */ new Set()), p = b(null), f = b(null), d = P(() => Ye(p)); + if (i({ el: p, $el: p }), !(e.open !== $t || l !== null)) throw new Error("You forgot to provide an `open` prop to the `Dialog`."); if (typeof u.value != "boolean") throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${u.value === $t ? void 0 : e.open}`); - let v = P(() => s.value && u.value ? 0 : 1), b = P(() => v.value === 0), w = P(() => o.value > 1), T = U(yr, null) !== null, A = P(() => w.value ? "parent" : "leaf"); - Wl(f, P(() => w.value ? b.value : !1)), Ql({ type: "Dialog", enabled: P(() => v.value === 0), element: f, onUpdate: (g, S, _) => { + let h = P(() => s.value && u.value ? 0 : 1), g = P(() => h.value === 0), w = P(() => o.value > 1), T = U(yr, null) !== null, A = P(() => w.value ? "parent" : "leaf"); + Wl(p, P(() => w.value ? g.value : !1)), Ql({ type: "Dialog", enabled: P(() => h.value === 0), element: p, onUpdate: (y, S, _) => { if (S === "Dialog") - return Y(g, { [gr.Add]() { + return Y(y, { [gr.Add]() { c.value.add(_), o.value += 1; }, [gr.Remove]() { c.value.delete(_), o.value -= 1; } }); } }); - let I = Jl({ name: "DialogDescription", slot: P(() => ({ open: u.value })) }), E = `headlessui-dialog-${Ne()}`, O = y(null), m = { titleId: O, panelRef: y(null), dialogState: v, setTitleId(g) { - O.value !== g && (O.value = g); + let I = Jl({ name: "DialogDescription", slot: P(() => ({ open: u.value })) }), E = `headlessui-dialog-${Ne()}`, O = b(null), v = { titleId: O, panelRef: b(null), dialogState: h, setTitleId(y) { + O.value !== y && (O.value = y); }, close() { t("close", !1); } }; - return te(yr, m), kl(() => { - var g, S, _; - return [...Array.from((S = (g = d.value) == null ? void 0 : g.querySelectorAll("body > *, [data-headlessui-portal]")) != null ? S : []).filter((x) => !(!(x instanceof HTMLElement) || x.contains(pe(p)) || m.panelRef.value && x.contains(m.panelRef.value))), (_ = m.panelRef.value) != null ? _ : f.value]; - }, (g, S) => { - m.close(), Le(() => S == null ? void 0 : S.focus()); - }, P(() => v.value === 0 && !w.value)), qi((a = d.value) == null ? void 0 : a.defaultView, "keydown", (g) => { - g.defaultPrevented || g.key === Ii.Escape && v.value === 0 && (w.value || (g.preventDefault(), g.stopPropagation(), m.close())); - }), Z((g) => { + return te(yr, v), kl(() => { + var y, S, _; + return [...Array.from((S = (y = d.value) == null ? void 0 : y.querySelectorAll("body > *, [data-headlessui-portal]")) != null ? S : []).filter((x) => !(!(x instanceof HTMLElement) || x.contains(he(f)) || v.panelRef.value && x.contains(v.panelRef.value))), (_ = v.panelRef.value) != null ? _ : p.value]; + }, (y, S) => { + v.close(), Be(() => S == null ? void 0 : S.focus()); + }, P(() => h.value === 0 && !w.value)), qi((a = d.value) == null ? void 0 : a.defaultView, "keydown", (y) => { + y.defaultPrevented || y.key === Ii.Escape && h.value === 0 && (w.value || (y.preventDefault(), y.stopPropagation(), v.close())); + }), Z((y) => { var S; - if (v.value !== 0 || T) + if (h.value !== 0 || T) return; let _ = d.value; if (!_) return; let x = Ur(); - function $(B, V, R) { - let M = B.style.getPropertyValue(V); - return Object.assign(B.style, { [V]: R }), x.add(() => { - Object.assign(B.style, { [V]: M }); + function $(L, V, R) { + let M = L.style.getPropertyValue(V); + return Object.assign(L.style, { [V]: R }), x.add(() => { + Object.assign(L.style, { [V]: M }); }); } let C = _ == null ? void 0 : _.documentElement, j = ((S = _.defaultView) != null ? S : window).innerWidth - C.clientWidth; if ($(C, "overflow", "hidden"), j > 0) { - let B = C.clientWidth - C.offsetWidth, V = j - B; + let L = C.clientWidth - C.offsetWidth, V = j - L; $(C, "paddingRight", `${V}px`); } if (Zl()) { - let B = window.pageYOffset; - $(C, "position", "fixed"), $(C, "marginTop", `-${B}px`), $(C, "width", "100%"), x.add(() => window.scrollTo(0, B)); + let L = window.pageYOffset; + $(C, "position", "fixed"), $(C, "marginTop", `-${L}px`), $(C, "width", "100%"), x.add(() => window.scrollTo(0, L)); } - g(x.dispose); - }), Z((g) => { - if (v.value !== 0) + y(x.dispose); + }), Z((y) => { + if (h.value !== 0) return; - let S = pe(f); + let S = he(p); if (!S) return; let _ = new IntersectionObserver((x) => { for (let $ of x) - $.boundingClientRect.x === 0 && $.boundingClientRect.y === 0 && $.boundingClientRect.width === 0 && $.boundingClientRect.height === 0 && m.close(); + $.boundingClientRect.x === 0 && $.boundingClientRect.y === 0 && $.boundingClientRect.width === 0 && $.boundingClientRect.height === 0 && v.close(); }); - _.observe(S), g(() => _.disconnect()); + _.observe(S), y(() => _.disconnect()); }), () => { - let g = { ...r, ref: f, id: E, role: "dialog", "aria-modal": v.value === 0 ? !0 : void 0, "aria-labelledby": O.value, "aria-describedby": I.value }, { open: S, initialFocus: _, ...x } = e, $ = { open: v.value === 0 }; - return k(vr, { force: !0 }, () => [k(Bi, () => k(Kl, { target: f.value }, () => k(vr, { force: !1 }, () => k(nt, { initialFocus: _, containers: c, features: b.value ? Y(A.value, { parent: nt.features.RestoreFocus, leaf: nt.features.All & ~nt.features.FocusLock }) : nt.features.None }, () => z({ ourProps: g, theirProps: x, slot: $, attrs: r, slots: n, visible: v.value === 0, features: Dt.RenderStrategy | Dt.Static, name: "Dialog" }))))), k(hr, { features: qt.Hidden, ref: p })]); + let y = { ...r, ref: p, id: E, role: "dialog", "aria-modal": h.value === 0 ? !0 : void 0, "aria-labelledby": O.value, "aria-describedby": I.value }, { open: S, initialFocus: _, ...x } = e, $ = { open: h.value === 0 }; + return k(vr, { force: !0 }, () => [k(Li, () => k(Kl, { target: p.value }, () => k(vr, { force: !1 }, () => k(nt, { initialFocus: _, containers: c, features: g.value ? Y(A.value, { parent: nt.features.RestoreFocus, leaf: nt.features.All & ~nt.features.FocusLock }) : nt.features.None }, () => z({ ourProps: y, theirProps: x, slot: $, attrs: r, slots: n, visible: h.value === 0, features: Dt.RenderStrategy | Dt.Static, name: "Dialog" }))))), k(hr, { features: qt.Hidden, ref: f })]); }; } }); W({ name: "DialogOverlay", props: { as: { type: [Object, String], default: "div" } }, setup(e, { attrs: t, slots: r }) { @@ -1417,13 +1430,13 @@ W({ name: "DialogOverlay", props: { as: { type: [Object, String], default: "div" return () => z({ ourProps: { id: i, "aria-hidden": !0, onClick: a }, theirProps: e, slot: { open: n.dialogState.value === 0 }, attrs: t, slots: r, name: "DialogOverlay" }); } }); W({ name: "DialogBackdrop", props: { as: { type: [Object, String], default: "div" } }, inheritAttrs: !1, setup(e, { attrs: t, slots: r, expose: n }) { - let i = ht("DialogBackdrop"), a = `headlessui-dialog-backdrop-${Ne()}`, s = y(null); + let i = ht("DialogBackdrop"), a = `headlessui-dialog-backdrop-${Ne()}`, s = b(null); return n({ el: s, $el: s }), N(() => { if (i.panelRef.value === null) throw new Error("A component is being used, but a component is missing."); }), () => { let o = e, l = { id: a, ref: s, "aria-hidden": !0 }; - return k(vr, { force: !0 }, () => k(Bi, () => z({ ourProps: l, theirProps: { ...t, ...o }, slot: { open: i.dialogState.value === 0 }, attrs: t, slots: r, name: "DialogBackdrop" }))); + return k(vr, { force: !0 }, () => k(Li, () => z({ ourProps: l, theirProps: { ...t, ...o }, slot: { open: i.dialogState.value === 0 }, attrs: t, slots: r, name: "DialogBackdrop" }))); }; } }); let zr = W({ name: "DialogPanel", props: { as: { type: [Object, String], default: "div" } }, setup(e, { attrs: t, slots: r, expose: n }) { @@ -1499,7 +1512,7 @@ function Wt(e) { return "children" in e ? Wt(e.children) : e.value.filter(({ state: t }) => t === "visible").length > 0; } function Mi(e) { - let t = y([]), r = y(!1); + let t = b([]), r = b(!1); N(() => r.value = !0), _e(() => r.value = !1); function n(a, s = we.Hidden) { let o = t.value.findIndex(({ id: l }) => l === a); @@ -1518,10 +1531,10 @@ function Mi(e) { let Ni = Dt.RenderStrategy, Je = W({ props: { as: { type: [Object, String], default: "div" }, show: { type: [Boolean], default: null }, unmount: { type: [Boolean], default: !0 }, appear: { type: [Boolean], default: !1 }, enter: { type: [String], default: "" }, enterFrom: { type: [String], default: "" }, enterTo: { type: [String], default: "" }, entered: { type: [String], default: "" }, leave: { type: [String], default: "" }, leaveFrom: { type: [String], default: "" }, leaveTo: { type: [String], default: "" } }, emits: { beforeEnter: () => !0, afterEnter: () => !0, beforeLeave: () => !0, afterLeave: () => !0 }, setup(e, { emit: t, attrs: r, slots: n, expose: i }) { if (!iu() && Il()) return () => k(Ze, { ...e, onBeforeEnter: () => t("beforeEnter"), onAfterEnter: () => t("afterEnter"), onBeforeLeave: () => t("beforeLeave"), onAfterLeave: () => t("afterLeave") }, n); - let a = y(null), s = y("visible"), o = P(() => e.unmount ? we.Unmount : we.Hidden); + let a = b(null), s = b("visible"), o = P(() => e.unmount ? we.Unmount : we.Hidden); i({ el: a, $el: a }); - let { show: l, appear: u } = au(), { register: c, unregister: f } = su(), p = { value: !0 }, d = Ne(), v = { value: !1 }, b = Mi(() => { - v.value || (s.value = "hidden", f(d), t("afterLeave")); + let { show: l, appear: u } = au(), { register: c, unregister: p } = su(), f = { value: !0 }, d = Ne(), h = { value: !1 }, g = Mi(() => { + h.value || (s.value = "hidden", p(d), t("afterLeave")); }); N(() => { let S = c(d); @@ -1532,33 +1545,33 @@ let Ni = Dt.RenderStrategy, Je = W({ props: { as: { type: [Object, String], defa s.value = "visible"; return; } - Y(s.value, { hidden: () => f(d), visible: () => c(d) }); + Y(s.value, { hidden: () => p(d), visible: () => c(d) }); } }); - let w = Ce(e.enter), T = Ce(e.enterFrom), A = Ce(e.enterTo), I = Ce(e.entered), E = Ce(e.leave), O = Ce(e.leaveFrom), m = Ce(e.leaveTo); + let w = Ce(e.enter), T = Ce(e.enterFrom), A = Ce(e.enterTo), I = Ce(e.entered), E = Ce(e.leave), O = Ce(e.leaveFrom), v = Ce(e.leaveTo); N(() => { Z(() => { if (s.value === "visible") { - let S = pe(a); + let S = he(a); if (S instanceof Comment && S.data === "") throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?"); } }); }); - function g(S) { - let _ = p.value && !u.value, x = pe(a); - !x || !(x instanceof HTMLElement) || _ || (v.value = !0, l.value && t("beforeEnter"), l.value || t("beforeLeave"), S(l.value ? _n(x, w, T, A, I, ($) => { - v.value = !1, $ === br.Finished && t("afterEnter"); - }) : _n(x, E, O, m, I, ($) => { - v.value = !1, $ === br.Finished && (Wt(b) || (s.value = "hidden", f(d), t("afterLeave"))); + function y(S) { + let _ = f.value && !u.value, x = he(a); + !x || !(x instanceof HTMLElement) || _ || (h.value = !0, l.value && t("beforeEnter"), l.value || t("beforeLeave"), S(l.value ? _n(x, w, T, A, I, ($) => { + h.value = !1, $ === br.Finished && t("afterEnter"); + }) : _n(x, E, O, v, I, ($) => { + h.value = !1, $ === br.Finished && (Wt(g) || (s.value = "hidden", p(d), t("afterLeave"))); }))); } return N(() => { dt([l], (S, _, x) => { - g(x), p.value = !1; + y(x), f.value = !1; }, { immediate: !0 }); - }), te(Kr, b), Pl(P(() => Y(s.value, { visible: ke.Open, hidden: ke.Closed }))), () => { - let { appear: S, show: _, enter: x, enterFrom: $, enterTo: C, entered: j, leave: B, leaveFrom: V, leaveTo: R, ...M } = e; + }), te(Kr, g), Pl(P(() => Y(s.value, { visible: ke.Open, hidden: ke.Closed }))), () => { + let { appear: S, show: _, enter: x, enterFrom: $, enterTo: C, entered: j, leave: L, leaveFrom: V, leaveTo: R, ...M } = e; return z({ theirProps: M, ourProps: { ref: a }, slot: {}, slots: n, attrs: r, features: Ni, visible: s.value === "visible", name: "TransitionChild" }); }; } }), ou = Je, Ze = W({ inheritAttrs: !1, props: { as: { type: [Object, String], default: "div" }, show: { type: [Boolean], default: null }, unmount: { type: [Boolean], default: !0 }, appear: { type: [Boolean], default: !1 }, enter: { type: [String], default: "" }, enterFrom: { type: [String], default: "" }, enterTo: { type: [String], default: "" }, entered: { type: [String], default: "" }, leave: { type: [String], default: "" }, leaveFrom: { type: [String], default: "" }, leaveTo: { type: [String], default: "" } }, emits: { beforeEnter: () => !0, afterEnter: () => !0, beforeLeave: () => !0, afterLeave: () => !0 }, setup(e, { emit: t, attrs: r, slots: n }) { @@ -1567,16 +1580,16 @@ let Ni = Dt.RenderStrategy, Je = W({ props: { as: { type: [Object, String], defa if (![!0, !1].includes(a.value)) throw new Error('A is used but it is missing a `:show="true | false"` prop.'); }); - let s = y(a.value ? "visible" : "hidden"), o = Mi(() => { + let s = b(a.value ? "visible" : "hidden"), o = Mi(() => { s.value = "hidden"; - }), l = y(!0), u = { show: a, appear: P(() => e.appear || !l.value) }; + }), l = b(!0), u = { show: a, appear: P(() => e.appear || !l.value) }; return N(() => { Z(() => { l.value = !1, a.value ? s.value = "visible" : Wt(o) || (s.value = "hidden"); }); }), te(Kr, o), te(Gr, u), () => { - let c = Ai(e, ["show", "appear", "unmount", "onBeforeEnter", "onBeforeLeave", "onAfterEnter", "onAfterLeave"]), f = { unmount: e.unmount }; - return z({ ourProps: { ...f, as: "template" }, theirProps: {}, slot: {}, slots: { ...n, default: () => [k(ou, { onBeforeEnter: () => t("beforeEnter"), onAfterEnter: () => t("afterEnter"), onBeforeLeave: () => t("beforeLeave"), onAfterLeave: () => t("afterLeave"), ...r, ...f, ...c }, n.default)] }, attrs: {}, features: Ni, visible: s.value === "visible", name: "Transition" }); + let c = Ai(e, ["show", "appear", "unmount", "onBeforeEnter", "onBeforeLeave", "onAfterEnter", "onAfterLeave"]), p = { unmount: e.unmount }; + return z({ ourProps: { ...p, as: "template" }, theirProps: {}, slot: {}, slots: { ...n, default: () => [k(ou, { onBeforeEnter: () => t("beforeEnter"), onAfterEnter: () => t("afterEnter"), onBeforeLeave: () => t("beforeLeave"), onAfterLeave: () => t("afterLeave"), ...r, ...p, ...c }, n.default)] }, attrs: {}, features: Ni, visible: s.value === "visible", name: "Transition" }); }; } }); const lu = { @@ -1608,22 +1621,22 @@ const lu = { }; }, computed: { - hasConfirmModal: () => !!h.confirmModal.value, + hasConfirmModal: () => !!m.confirmModal.value, title: function() { var e; - return (e = h.confirmModal.value) != null && e.title ? h.confirmModal.value.title : this.defaultTitle; + return (e = m.confirmModal.value) != null && e.title ? m.confirmModal.value.title : this.defaultTitle; }, text: function() { var e; - return (e = h.confirmModal.value) != null && e.text ? h.confirmModal.value.text : this.defaultText; + return (e = m.confirmModal.value) != null && e.text ? m.confirmModal.value.text : this.defaultText; }, confirmButton: function() { var e; - return (e = h.confirmModal.value) != null && e.confirmButton ? h.confirmModal.value.confirmButton : this.defaultConfirmButton; + return (e = m.confirmModal.value) != null && e.confirmButton ? m.confirmModal.value.confirmButton : this.defaultConfirmButton; }, cancelButton: function() { var e; - return (e = h.confirmModal.value) != null && e.cancelButton ? h.confirmModal.value.cancelButton : this.defaultCancelButton; + return (e = m.confirmModal.value) != null && e.cancelButton ? m.confirmModal.value.cancelButton : this.defaultCancelButton; } }, watch: { @@ -1633,16 +1646,16 @@ const lu = { }, methods: { cancel() { - h.confirmModal.value.rejectPromise(), this.setIsOpen(!1); + m.confirmModal.value.rejectPromise(), this.setIsOpen(!1); }, confirm() { - h.confirmModal.value.resolvePromise(), this.setIsOpen(!1); + m.confirmModal.value.resolvePromise(), this.setIsOpen(!1); }, setIsOpen(e) { this.isOpen = e; }, emitClose() { - h.clearConfirmModal(); + m.clearConfirmModal(); } }, render() { @@ -1738,13 +1751,13 @@ const hu = { }, mounted() { if (this.remember) { - let e = h.restore(this.remember, this.localStorage); + let e = m.restore(this.remember, this.localStorage); e || (e = {}), this.values = Object.assign({}, { ...this.default, ...e }); } else this.values = Object.assign({}, { ...this.default }); }, updated() { - this.remember && h.remember(this.remember, { ...this.values }, this.localStorage); + this.remember && m.remember(this.remember, { ...this.values }, this.localStorage); }, render() { const e = this; @@ -1795,33 +1808,33 @@ function wr(e) { } var Eu = "Expected a function", _u = Math.max, xu = Math.min; function Qr(e, t, r) { - var n, i, a, s, o, l, u = 0, c = !1, f = !1, p = !0; + var n, i, a, s, o, l, u = 0, c = !1, p = !1, f = !0; if (typeof e != "function") throw new TypeError(Eu); - t = wr(t) || 0, ne(r) && (c = !!r.leading, f = "maxWait" in r, a = f ? _u(wr(r.maxWait) || 0, t) : a, p = "trailing" in r ? !!r.trailing : p); - function d(m) { - var g = n, S = i; - return n = i = void 0, u = m, s = e.apply(S, g), s; + t = wr(t) || 0, ne(r) && (c = !!r.leading, p = "maxWait" in r, a = p ? _u(wr(r.maxWait) || 0, t) : a, f = "trailing" in r ? !!r.trailing : f); + function d(v) { + var y = n, S = i; + return n = i = void 0, u = v, s = e.apply(S, y), s; } - function v(m) { - return u = m, o = setTimeout(T, t), c ? d(m) : s; + function h(v) { + return u = v, o = setTimeout(T, t), c ? d(v) : s; } - function b(m) { - var g = m - l, S = m - u, _ = t - g; - return f ? xu(_, a - S) : _; + function g(v) { + var y = v - l, S = v - u, _ = t - y; + return p ? xu(_, a - S) : _; } - function w(m) { - var g = m - l, S = m - u; - return l === void 0 || g >= t || g < 0 || f && S >= a; + function w(v) { + var y = v - l, S = v - u; + return l === void 0 || y >= t || y < 0 || p && S >= a; } function T() { - var m = or(); - if (w(m)) - return A(m); - o = setTimeout(T, b(m)); + var v = or(); + if (w(v)) + return A(v); + o = setTimeout(T, g(v)); } - function A(m) { - return o = void 0, p && n ? d(m) : (n = i = void 0, s); + function A(v) { + return o = void 0, f && n ? d(v) : (n = i = void 0, s); } function I() { o !== void 0 && clearTimeout(o), u = 0, n = l = i = o = void 0; @@ -1830,11 +1843,11 @@ function Qr(e, t, r) { return o === void 0 ? s : A(or()); } function O() { - var m = or(), g = w(m); - if (n = arguments, i = this, l = m, g) { + var v = or(), y = w(v); + if (n = arguments, i = this, l = v, y) { if (o === void 0) - return v(l); - if (f) + return h(l); + if (p) return clearTimeout(o), o = setTimeout(T, t), d(l); } return o === void 0 && (o = setTimeout(T, t)), s; @@ -1981,7 +1994,7 @@ const Tu = { } }, setup(e) { - const t = e, r = y(null), n = y(null), i = y(null); + const t = e, r = b(null), n = b(null), i = b(null); return N(() => { r.value = (a) => { n.value.children[0].contains(a.target) || t.ignoreInnerTargets && n.value.contains(a.target) || t.do(); @@ -1990,7 +2003,7 @@ const Tu = { }, document.addEventListener("keydown", i.value)); }), Oa(() => { document.removeEventListener("click", r.value), document.removeEventListener("touchstart", r.value), t.closeOnEscape && document.removeEventListener("keydown", i.value); - }), (a, s) => (q(), de("div", { + }), (a, s) => (q(), pe("div", { ref_key: "root", ref: n }, [ @@ -2035,13 +2048,13 @@ function Ge(e, t, r) { t === void 0 && (t = !1), r === void 0 && (r = !1); var n = e.getBoundingClientRect(), i = 1, a = 1; t && X(e) && (i = e.offsetWidth > 0 && ze(n.width) / e.offsetWidth || 1, a = e.offsetHeight > 0 && ze(n.height) / e.offsetHeight || 1); - var s = Fe(e) ? Q(e) : window, o = s.visualViewport, l = !zi() && r, u = (n.left + (l && o ? o.offsetLeft : 0)) / i, c = (n.top + (l && o ? o.offsetTop : 0)) / a, f = n.width / i, p = n.height / a; + var s = Fe(e) ? Q(e) : window, o = s.visualViewport, l = !zi() && r, u = (n.left + (l && o ? o.offsetLeft : 0)) / i, c = (n.top + (l && o ? o.offsetTop : 0)) / a, p = n.width / i, f = n.height / a; return { - width: f, - height: p, + width: p, + height: f, top: c, - right: u + f, - bottom: c + p, + right: u + p, + bottom: c + f, left: u, x: u, y: c @@ -2147,7 +2160,7 @@ function Gt(e) { r = An(r); return r && (ie(r) === "html" || ie(r) === "body" && ee(r).position === "static") ? t : r || ju(e) || t; } -var J = "top", ae = "bottom", Ee = "right", ue = "left", Kt = "auto", Xt = [J, ae, Ee, ue], Ke = "start", ft = "end", Lu = "clippingParents", Xi = "viewport", it = "popper", Bu = "reference", In = /* @__PURE__ */ Xt.reduce(function(e, t) { +var J = "top", ae = "bottom", Ee = "right", ce = "left", Kt = "auto", Xt = [J, ae, Ee, ce], Ke = "start", ft = "end", Bu = "clippingParents", Xi = "viewport", it = "popper", Lu = "reference", In = /* @__PURE__ */ Xt.reduce(function(e, t) { return e.concat([t + "-" + Ke, t + "-" + ft]); }, []), ku = /* @__PURE__ */ [].concat(Xt, [Kt]).reduce(function(e, t) { return e.concat([t, t + "-" + Ke, t + "-" + ft]); @@ -2189,7 +2202,7 @@ function Xu(e) { })), t; }; } -function ge(e) { +function ye(e) { for (var t = arguments.length, r = new Array(t > 1 ? t - 1 : 0), n = 1; n < t; n++) r[n - 1] = arguments[n]; return [].concat(r).reduce(function(i, a) { @@ -2204,25 +2217,25 @@ function Yu(e) { }).forEach(function(r) { switch (r) { case "name": - typeof t.name != "string" && console.error(ge(De, String(t.name), '"name"', '"string"', '"' + String(t.name) + '"')); + typeof t.name != "string" && console.error(ye(De, String(t.name), '"name"', '"string"', '"' + String(t.name) + '"')); break; case "enabled": - typeof t.enabled != "boolean" && console.error(ge(De, t.name, '"enabled"', '"boolean"', '"' + String(t.enabled) + '"')); + typeof t.enabled != "boolean" && console.error(ye(De, t.name, '"enabled"', '"boolean"', '"' + String(t.enabled) + '"')); break; case "phase": - Or.indexOf(t.phase) < 0 && console.error(ge(De, t.name, '"phase"', "either " + Or.join(", "), '"' + String(t.phase) + '"')); + Or.indexOf(t.phase) < 0 && console.error(ye(De, t.name, '"phase"', "either " + Or.join(", "), '"' + String(t.phase) + '"')); break; case "fn": - typeof t.fn != "function" && console.error(ge(De, t.name, '"fn"', '"function"', '"' + String(t.fn) + '"')); + typeof t.fn != "function" && console.error(ye(De, t.name, '"fn"', '"function"', '"' + String(t.fn) + '"')); break; case "effect": - t.effect != null && typeof t.effect != "function" && console.error(ge(De, t.name, '"effect"', '"function"', '"' + String(t.fn) + '"')); + t.effect != null && typeof t.effect != "function" && console.error(ye(De, t.name, '"effect"', '"function"', '"' + String(t.fn) + '"')); break; case "requires": - t.requires != null && !Array.isArray(t.requires) && console.error(ge(De, t.name, '"requires"', '"array"', '"' + String(t.requires) + '"')); + t.requires != null && !Array.isArray(t.requires) && console.error(ye(De, t.name, '"requires"', '"array"', '"' + String(t.requires) + '"')); break; case "requiresIfExists": - Array.isArray(t.requiresIfExists) || console.error(ge(De, t.name, '"requiresIfExists"', '"array"', '"' + String(t.requiresIfExists) + '"')); + Array.isArray(t.requiresIfExists) || console.error(ye(De, t.name, '"requiresIfExists"', '"array"', '"' + String(t.requiresIfExists) + '"')); break; case "options": case "data": @@ -2235,7 +2248,7 @@ function Yu(e) { t.requires && t.requires.forEach(function(n) { e.find(function(i) { return i.name === n; - }) == null && console.error(ge(Qu, String(t.name), n, n)); + }) == null && console.error(ye(Qu, String(t.name), n, n)); }); }); }); @@ -2248,7 +2261,7 @@ function Ju(e, t) { return r.add(i), !0; }); } -function ce(e) { +function fe(e) { return e.split("-")[0]; } function Zu(e) { @@ -2335,7 +2348,7 @@ function Qi(e) { return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y"; } function Yi(e) { - var t = e.reference, r = e.element, n = e.placement, i = n ? ce(n) : null, a = n ? Xe(n) : null, s = t.x + t.width / 2 - r.width / 2, o = t.y + t.height / 2 - r.height / 2, l; + var t = e.reference, r = e.element, n = e.placement, i = n ? fe(n) : null, a = n ? Xe(n) : null, s = t.x + t.width / 2 - r.width / 2, o = t.y + t.height / 2 - r.height / 2, l; switch (i) { case J: l = { @@ -2355,7 +2368,7 @@ function Yi(e) { y: o }; break; - case ue: + case ce: l = { x: t.x - r.width, y: o @@ -2399,22 +2412,22 @@ function oc(e, t) { } function tn(e, t) { t === void 0 && (t = {}); - var r = t, n = r.placement, i = n === void 0 ? e.placement : n, a = r.strategy, s = a === void 0 ? e.strategy : a, o = r.boundary, l = o === void 0 ? Lu : o, u = r.rootBoundary, c = u === void 0 ? Xi : u, f = r.elementContext, p = f === void 0 ? it : f, d = r.altBoundary, v = d === void 0 ? !1 : d, b = r.padding, w = b === void 0 ? 0 : b, T = sc(typeof w != "number" ? w : oc(w, Xt)), A = p === it ? Bu : it, I = e.rects.popper, E = e.elements[v ? A : p], O = ac(Fe(E) ? E : E.contextElement || Te(e.elements.popper), l, c, s), m = Ge(e.elements.reference), g = Yi({ - reference: m, + var r = t, n = r.placement, i = n === void 0 ? e.placement : n, a = r.strategy, s = a === void 0 ? e.strategy : a, o = r.boundary, l = o === void 0 ? Bu : o, u = r.rootBoundary, c = u === void 0 ? Xi : u, p = r.elementContext, f = p === void 0 ? it : p, d = r.altBoundary, h = d === void 0 ? !1 : d, g = r.padding, w = g === void 0 ? 0 : g, T = sc(typeof w != "number" ? w : oc(w, Xt)), A = f === it ? Lu : it, I = e.rects.popper, E = e.elements[h ? A : f], O = ac(Fe(E) ? E : E.contextElement || Te(e.elements.popper), l, c, s), v = Ge(e.elements.reference), y = Yi({ + reference: v, element: I, strategy: "absolute", placement: i - }), S = $r(Object.assign({}, I, g)), _ = p === it ? S : m, x = { + }), S = $r(Object.assign({}, I, y)), _ = f === it ? S : v, x = { top: O.top - _.top + T.top, bottom: _.bottom - O.bottom + T.bottom, left: O.left - _.left + T.left, right: _.right - O.right + T.right }, $ = e.modifiersData.offset; - if (p === it && $) { + if (f === it && $) { var C = $[i]; Object.keys(x).forEach(function(j) { - var B = [Ee, ae].indexOf(j) >= 0 ? 1 : -1, V = [J, ae].indexOf(j) >= 0 ? "y" : "x"; - x[j] += C[V] * B; + var L = [Ee, ae].indexOf(j) >= 0 ? 1 : -1, V = [J, ae].indexOf(j) >= 0 ? "y" : "x"; + x[j] += C[V] * L; }); } return x; @@ -2447,11 +2460,11 @@ function uc(e) { }, attributes: {}, styles: {} - }, f = [], p = !1, d = { + }, p = [], f = !1, d = { state: c, setOptions: function(T) { var A = typeof T == "function" ? T(c.options) : T; - b(), c.options = Object.assign({}, a, c.options, A), c.scrollParents = { + g(), c.options = Object.assign({}, a, c.options, A), c.scrollParents = { reference: Fe(o) ? ot(o) : o.contextElement ? ot(o.contextElement) : [], popper: ot(l) }; @@ -2463,22 +2476,22 @@ function uc(e) { var C = $.name; return C; }); - if (Yu(E), ce(c.options.placement) === Kt) { + if (Yu(E), fe(c.options.placement) === Kt) { var O = c.orderedModifiers.find(function($) { var C = $.name; return C === "flip"; }); O || console.error(['Popper: "auto" placements require the "flip" modifier be', "present and enabled to work."].join(" ")); } - var m = ee(l), g = m.marginTop, S = m.marginRight, _ = m.marginBottom, x = m.marginLeft; - [g, S, _, x].some(function($) { + var v = ee(l), y = v.marginTop, S = v.marginRight, _ = v.marginBottom, x = v.marginLeft; + [y, S, _, x].some(function($) { return parseFloat($); }) && console.warn(['Popper: CSS "margin" styles cannot be used to apply padding', "between the popper and its reference element or boundary.", "To replicate margin, use the `offset` modifier, as well as", "the `padding` option in the `preventOverflow` and `flip`", "modifiers."].join(" ")); } - return v(), d.update(); + return h(), d.update(); }, forceUpdate: function() { - if (!p) { + if (!f) { var T = c.elements, A = T.reference, I = T.popper; if (!jn(A, I)) { process.env.NODE_ENV !== "production" && console.error(Dn); @@ -2499,8 +2512,8 @@ function uc(e) { c.reset = !1, O = -1; continue; } - var m = c.orderedModifiers[O], g = m.fn, S = m.options, _ = S === void 0 ? {} : S, x = m.name; - typeof g == "function" && (c = g({ + var v = c.orderedModifiers[O], y = v.fn, S = v.options, _ = S === void 0 ? {} : S, x = v.name; + typeof y == "function" && (c = y({ state: c, options: _, name: x, @@ -2515,15 +2528,15 @@ function uc(e) { }); }), destroy: function() { - b(), p = !0; + g(), f = !0; } }; if (!jn(o, l)) return process.env.NODE_ENV !== "production" && console.error(Dn), d; d.setOptions(u).then(function(w) { - !p && u.onFirstUpdate && u.onFirstUpdate(w); + !f && u.onFirstUpdate && u.onFirstUpdate(w); }); - function v() { + function h() { c.orderedModifiers.forEach(function(w) { var T = w.name, A = w.options, I = A === void 0 ? {} : A, E = w.effect; if (typeof E == "function") { @@ -2532,16 +2545,16 @@ function uc(e) { name: T, instance: d, options: I - }), m = function() { + }), v = function() { }; - f.push(O || m); + p.push(O || v); } }); } - function b() { - f.forEach(function(w) { + function g() { + p.forEach(function(w) { return w(); - }), f = []; + }), p = []; } return d; }; @@ -2597,26 +2610,26 @@ function mc(e) { y: ze(r * i) / i || 0 }; } -function Ln(e) { - var t, r = e.popper, n = e.popperRect, i = e.placement, a = e.variation, s = e.offsets, o = e.position, l = e.gpuAcceleration, u = e.adaptive, c = e.roundOffsets, f = e.isFixed, p = s.x, d = p === void 0 ? 0 : p, v = s.y, b = v === void 0 ? 0 : v, w = typeof c == "function" ? c({ +function Bn(e) { + var t, r = e.popper, n = e.popperRect, i = e.placement, a = e.variation, s = e.offsets, o = e.position, l = e.gpuAcceleration, u = e.adaptive, c = e.roundOffsets, p = e.isFixed, f = s.x, d = f === void 0 ? 0 : f, h = s.y, g = h === void 0 ? 0 : h, w = typeof c == "function" ? c({ x: d, - y: b + y: g }) : { x: d, - y: b + y: g }; - d = w.x, b = w.y; - var T = s.hasOwnProperty("x"), A = s.hasOwnProperty("y"), I = ue, E = J, O = window; + d = w.x, g = w.y; + var T = s.hasOwnProperty("x"), A = s.hasOwnProperty("y"), I = ce, E = J, O = window; if (u) { - var m = Gt(r), g = "clientHeight", S = "clientWidth"; - if (m === Q(r) && (m = Te(r), ee(m).position !== "static" && o === "absolute" && (g = "scrollHeight", S = "scrollWidth")), m = m, i === J || (i === ue || i === Ee) && a === ft) { + var v = Gt(r), y = "clientHeight", S = "clientWidth"; + if (v === Q(r) && (v = Te(r), ee(v).position !== "static" && o === "absolute" && (y = "scrollHeight", S = "scrollWidth")), v = v, i === J || (i === ce || i === Ee) && a === ft) { E = ae; - var _ = f && m === O && O.visualViewport ? O.visualViewport.height : m[g]; - b -= _ - n.height, b *= l ? 1 : -1; + var _ = p && v === O && O.visualViewport ? O.visualViewport.height : v[y]; + g -= _ - n.height, g *= l ? 1 : -1; } - if (i === ue || (i === J || i === ae) && a === ft) { + if (i === ce || (i === J || i === ae) && a === ft) { I = Ee; - var x = f && m === O && O.visualViewport ? O.visualViewport.width : m[S]; + var x = p && v === O && O.visualViewport ? O.visualViewport.width : v[S]; d -= x - n.width, d *= l ? 1 : -1; } } @@ -2624,23 +2637,23 @@ function Ln(e) { position: o }, u && hc), C = c === !0 ? mc({ x: d, - y: b + y: g }) : { x: d, - y: b + y: g }; - if (d = C.x, b = C.y, l) { + if (d = C.x, g = C.y, l) { var j; - return Object.assign({}, $, (j = {}, j[E] = A ? "0" : "", j[I] = T ? "0" : "", j.transform = (O.devicePixelRatio || 1) <= 1 ? "translate(" + d + "px, " + b + "px)" : "translate3d(" + d + "px, " + b + "px, 0)", j)); + return Object.assign({}, $, (j = {}, j[E] = A ? "0" : "", j[I] = T ? "0" : "", j.transform = (O.devicePixelRatio || 1) <= 1 ? "translate(" + d + "px, " + g + "px)" : "translate3d(" + d + "px, " + g + "px, 0)", j)); } - return Object.assign({}, $, (t = {}, t[E] = A ? b + "px" : "", t[I] = T ? d + "px" : "", t.transform = "", t)); + return Object.assign({}, $, (t = {}, t[E] = A ? g + "px" : "", t[I] = T ? d + "px" : "", t.transform = "", t)); } function vc(e) { var t = e.state, r = e.options, n = r.gpuAcceleration, i = n === void 0 ? !0 : n, a = r.adaptive, s = a === void 0 ? !0 : a, o = r.roundOffsets, l = o === void 0 ? !0 : o; if (process.env.NODE_ENV !== "production") { var u = ee(t.elements.popper).transitionProperty || ""; - s && ["transform", "top", "right", "bottom", "left"].some(function(f) { - return u.indexOf(f) >= 0; + s && ["transform", "top", "right", "bottom", "left"].some(function(p) { + return u.indexOf(p) >= 0; }) && console.warn(["Popper: Detected CSS transitions on at least one of the following", 'CSS properties: "transform", "top", "right", "bottom", "left".', ` `, 'Disable the "computeStyles" modifier\'s `adaptive` option to allow', "for smooth transitions, or remove these properties from the CSS", "transition declaration on the popper element if only transitioning", "opacity or background-color for example.", ` @@ -2648,19 +2661,19 @@ function vc(e) { `, "We recommend using the popper element as a wrapper around an inner", "element that can have any CSS property transitioned for animations."].join(" ")); } var c = { - placement: ce(t.placement), + placement: fe(t.placement), variation: Xe(t.placement), popper: t.elements.popper, popperRect: t.rects.popper, gpuAcceleration: i, isFixed: t.options.strategy === "fixed" }; - t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, Ln(Object.assign({}, c, { + t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, Bn(Object.assign({}, c, { offsets: t.modifiersData.popperOffsets, position: t.options.strategy, adaptive: s, roundOffsets: l - })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, Ln(Object.assign({}, c, { + })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, Bn(Object.assign({}, c, { offsets: t.modifiersData.arrow, position: "absolute", adaptive: !1, @@ -2732,14 +2745,14 @@ function Ec(e, t, r) { return n > r ? r : n; } function _c(e) { - var t = e.state, r = e.options, n = e.name, i = r.mainAxis, a = i === void 0 ? !0 : i, s = r.altAxis, o = s === void 0 ? !1 : s, l = r.boundary, u = r.rootBoundary, c = r.altBoundary, f = r.padding, p = r.tether, d = p === void 0 ? !0 : p, v = r.tetherOffset, b = v === void 0 ? 0 : v, w = tn(t, { + var t = e.state, r = e.options, n = e.name, i = r.mainAxis, a = i === void 0 ? !0 : i, s = r.altAxis, o = s === void 0 ? !1 : s, l = r.boundary, u = r.rootBoundary, c = r.altBoundary, p = r.padding, f = r.tether, d = f === void 0 ? !0 : f, h = r.tetherOffset, g = h === void 0 ? 0 : h, w = tn(t, { boundary: l, rootBoundary: u, - padding: f, + padding: p, altBoundary: c - }), T = ce(t.placement), A = Xe(t.placement), I = !A, E = Qi(T), O = $c(E), m = t.modifiersData.popperOffsets, g = t.rects.reference, S = t.rects.popper, _ = typeof b == "function" ? b(Object.assign({}, t.rects, { + }), T = fe(t.placement), A = Xe(t.placement), I = !A, E = Qi(T), O = $c(E), v = t.modifiersData.popperOffsets, y = t.rects.reference, S = t.rects.popper, _ = typeof g == "function" ? g(Object.assign({}, t.rects, { placement: t.placement - })) : b, x = typeof _ == "number" ? { + })) : g, x = typeof _ == "number" ? { mainAxis: _, altAxis: _ } : Object.assign({ @@ -2749,17 +2762,17 @@ function _c(e) { x: 0, y: 0 }; - if (!!m) { + if (!!v) { if (a) { - var j, B = E === "y" ? J : ue, V = E === "y" ? ae : Ee, R = E === "y" ? "height" : "width", M = m[E], vt = M + w[B], Ae = M - w[V], gt = d ? -S[R] / 2 : 0, Yt = A === Ke ? g[R] : S[R], et = A === Ke ? -S[R] : -g[R], yt = t.elements.arrow, He = d && yt ? Gi(yt) : { + var j, L = E === "y" ? J : ce, V = E === "y" ? ae : Ee, R = E === "y" ? "height" : "width", M = v[E], vt = M + w[L], Ae = M - w[V], gt = d ? -S[R] / 2 : 0, Yt = A === Ke ? y[R] : S[R], et = A === Ke ? -S[R] : -y[R], yt = t.elements.arrow, He = d && yt ? Gi(yt) : { width: 0, height: 0 - }, ve = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : Ji(), tt = ve[B], bt = ve[V], Ie = At(0, g[R], He[R]), Jt = I ? g[R] / 2 - gt - Ie - tt - x.mainAxis : Yt - Ie - tt - x.mainAxis, da = I ? -g[R] / 2 + gt + Ie + bt + x.mainAxis : et + Ie + bt + x.mainAxis, Zt = t.elements.arrow && Gt(t.elements.arrow), pa = Zt ? E === "y" ? Zt.clientTop || 0 : Zt.clientLeft || 0 : 0, nn = (j = $ == null ? void 0 : $[E]) != null ? j : 0, ha = M + Jt - nn - pa, ma = M + da - nn, an = At(d ? jt(vt, ha) : vt, M, d ? je(Ae, ma) : Ae); - m[E] = an, C[E] = an - M; + }, ge = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : Ji(), tt = ge[L], bt = ge[V], Ie = At(0, y[R], He[R]), Jt = I ? y[R] / 2 - gt - Ie - tt - x.mainAxis : Yt - Ie - tt - x.mainAxis, da = I ? -y[R] / 2 + gt + Ie + bt + x.mainAxis : et + Ie + bt + x.mainAxis, Zt = t.elements.arrow && Gt(t.elements.arrow), pa = Zt ? E === "y" ? Zt.clientTop || 0 : Zt.clientLeft || 0 : 0, nn = (j = $ == null ? void 0 : $[E]) != null ? j : 0, ha = M + Jt - nn - pa, ma = M + da - nn, an = At(d ? jt(vt, ha) : vt, M, d ? je(Ae, ma) : Ae); + v[E] = an, C[E] = an - M; } if (o) { - var sn, va = E === "x" ? J : ue, ga = E === "x" ? ae : Ee, Pe = m[O], wt = O === "y" ? "height" : "width", on = Pe + w[va], ln = Pe - w[ga], er = [J, ue].indexOf(T) !== -1, un = (sn = $ == null ? void 0 : $[O]) != null ? sn : 0, cn = er ? on : Pe - g[wt] - S[wt] - un + x.altAxis, fn = er ? Pe + g[wt] + S[wt] - un - x.altAxis : ln, dn = d && er ? Ec(cn, Pe, fn) : At(d ? cn : on, Pe, d ? fn : ln); - m[O] = dn, C[O] = dn - Pe; + var sn, va = E === "x" ? J : ce, ga = E === "x" ? ae : Ee, Pe = v[O], wt = O === "y" ? "height" : "width", on = Pe + w[va], ln = Pe - w[ga], er = [J, ce].indexOf(T) !== -1, un = (sn = $ == null ? void 0 : $[O]) != null ? sn : 0, cn = er ? on : Pe - y[wt] - S[wt] - un + x.altAxis, fn = er ? Pe + y[wt] + S[wt] - un - x.altAxis : ln, dn = d && er ? Ec(cn, Pe, fn) : At(d ? cn : on, Pe, d ? fn : ln); + v[O] = dn, C[O] = dn - Pe; } t.modifiersData[n] = C; } @@ -2786,58 +2799,58 @@ var Ac = { start: "end", end: "start" }; -function Bn(e) { +function Ln(e) { return e.replace(/start|end/g, function(t) { return Ac[t]; }); } function Ic(e, t) { t === void 0 && (t = {}); - var r = t, n = r.placement, i = r.boundary, a = r.rootBoundary, s = r.padding, o = r.flipVariations, l = r.allowedAutoPlacements, u = l === void 0 ? ku : l, c = Xe(n), f = c ? o ? In : In.filter(function(v) { - return Xe(v) === c; - }) : Xt, p = f.filter(function(v) { - return u.indexOf(v) >= 0; + var r = t, n = r.placement, i = r.boundary, a = r.rootBoundary, s = r.padding, o = r.flipVariations, l = r.allowedAutoPlacements, u = l === void 0 ? ku : l, c = Xe(n), p = c ? o ? In : In.filter(function(h) { + return Xe(h) === c; + }) : Xt, f = p.filter(function(h) { + return u.indexOf(h) >= 0; }); - p.length === 0 && (p = f, process.env.NODE_ENV !== "production" && console.error(["Popper: The `allowedAutoPlacements` option did not allow any", "placements. Ensure the `placement` option matches the variation", "of the allowed placements.", 'For example, "auto" cannot be used to allow "bottom-start".', 'Use "auto-start" instead.'].join(" "))); - var d = p.reduce(function(v, b) { - return v[b] = tn(e, { - placement: b, + f.length === 0 && (f = p, process.env.NODE_ENV !== "production" && console.error(["Popper: The `allowedAutoPlacements` option did not allow any", "placements. Ensure the `placement` option matches the variation", "of the allowed placements.", 'For example, "auto" cannot be used to allow "bottom-start".', 'Use "auto-start" instead.'].join(" "))); + var d = f.reduce(function(h, g) { + return h[g] = tn(e, { + placement: g, boundary: i, rootBoundary: a, padding: s - })[ce(b)], v; + })[fe(g)], h; }, {}); - return Object.keys(d).sort(function(v, b) { - return d[v] - d[b]; + return Object.keys(d).sort(function(h, g) { + return d[h] - d[g]; }); } function Pc(e) { - if (ce(e) === Kt) + if (fe(e) === Kt) return []; var t = It(e); - return [Bn(e), t, Bn(t)]; + return [Ln(e), t, Ln(t)]; } function Cc(e) { var t = e.state, r = e.options, n = e.name; if (!t.modifiersData[n]._skip) { - for (var i = r.mainAxis, a = i === void 0 ? !0 : i, s = r.altAxis, o = s === void 0 ? !0 : s, l = r.fallbackPlacements, u = r.padding, c = r.boundary, f = r.rootBoundary, p = r.altBoundary, d = r.flipVariations, v = d === void 0 ? !0 : d, b = r.allowedAutoPlacements, w = t.options.placement, T = ce(w), A = T === w, I = l || (A || !v ? [It(w)] : Pc(w)), E = [w].concat(I).reduce(function(He, ve) { - return He.concat(ce(ve) === Kt ? Ic(t, { - placement: ve, + for (var i = r.mainAxis, a = i === void 0 ? !0 : i, s = r.altAxis, o = s === void 0 ? !0 : s, l = r.fallbackPlacements, u = r.padding, c = r.boundary, p = r.rootBoundary, f = r.altBoundary, d = r.flipVariations, h = d === void 0 ? !0 : d, g = r.allowedAutoPlacements, w = t.options.placement, T = fe(w), A = T === w, I = l || (A || !h ? [It(w)] : Pc(w)), E = [w].concat(I).reduce(function(He, ge) { + return He.concat(fe(ge) === Kt ? Ic(t, { + placement: ge, boundary: c, - rootBoundary: f, + rootBoundary: p, padding: u, - flipVariations: v, - allowedAutoPlacements: b - }) : ve); - }, []), O = t.rects.reference, m = t.rects.popper, g = /* @__PURE__ */ new Map(), S = !0, _ = E[0], x = 0; x < E.length; x++) { - var $ = E[x], C = ce($), j = Xe($) === Ke, B = [J, ae].indexOf(C) >= 0, V = B ? "width" : "height", R = tn(t, { + flipVariations: h, + allowedAutoPlacements: g + }) : ge); + }, []), O = t.rects.reference, v = t.rects.popper, y = /* @__PURE__ */ new Map(), S = !0, _ = E[0], x = 0; x < E.length; x++) { + var $ = E[x], C = fe($), j = Xe($) === Ke, L = [J, ae].indexOf(C) >= 0, V = L ? "width" : "height", R = tn(t, { placement: $, boundary: c, - rootBoundary: f, - altBoundary: p, + rootBoundary: p, + altBoundary: f, padding: u - }), M = B ? j ? Ee : ue : j ? ae : J; - O[V] > m[V] && (M = It(M)); + }), M = L ? j ? Ee : ce : j ? ae : J; + O[V] > v[V] && (M = It(M)); var vt = It(M), Ae = []; if (a && Ae.push(R[C] <= 0), o && Ae.push(R[M] <= 0, R[vt] <= 0), Ae.every(function(He) { return He; @@ -2845,14 +2858,14 @@ function Cc(e) { _ = $, S = !1; break; } - g.set($, Ae); + y.set($, Ae); } if (S) - for (var gt = v ? 3 : 1, Yt = function(ve) { + for (var gt = h ? 3 : 1, Yt = function(ge) { var tt = E.find(function(bt) { - var Ie = g.get(bt); + var Ie = y.get(bt); if (Ie) - return Ie.slice(0, ve).every(function(Jt) { + return Ie.slice(0, ge).every(function(Jt) { return Jt; }); }); @@ -2941,7 +2954,7 @@ const Dc = { } }, mounted: async function() { - this.teleport && await Le(); + this.teleport && await Be(); const e = this.teleport ? document.querySelector(`div[data-splade-dropdown-id="${this.spladeId}"]`) : this.$refs.tooltip.children[0]; this.popper = Oc(this.$refs.button, e, { placement: this.placement, @@ -2958,7 +2971,7 @@ const Dc = { } } }, jc = { ref: "tooltip" }; -function Lc(e, t, r, n, i, a) { +function Bc(e, t, r, n, i, a) { const s = ti("OnClickOutside"); return q(), K(s, { style: Pt(a.wrapperStyle), @@ -2986,7 +2999,7 @@ function Lc(e, t, r, n, i, a) { _: 3 }, 8, ["style", "do", "opened", "ignore-inner-targets"]); } -const Bc = /* @__PURE__ */ Ve(qc, [["render", Lc]]), kc = { +const Lc = /* @__PURE__ */ Ve(qc, [["render", Bc]]), kc = { __name: "DynamicHtml", props: { keepAliveKey: { @@ -3000,14 +3013,14 @@ const Bc = /* @__PURE__ */ Ve(qc, [["render", Lc]]), kc = { }, setup(e) { const t = U("$splade") || {}, r = U("$spladeOptions") || {}; - return (n, i) => H(t).isSsr ? (q(), K(oe, { + return (n, i) => H(t).isSsr ? (q(), K(le, { key: e.keepAliveKey, html: H(t).htmlForDynamicComponent(e.name) }, null, 8, ["html"])) : (q(), K(Zn, { key: 0, max: H(r).max_keep_alive }, [ - (q(), K(oe, { + (q(), K(le, { key: e.keepAliveKey, html: H(t).htmlForDynamicComponent(e.name) }, null, 8, ["html"])) @@ -3021,7 +3034,7 @@ const Fc = { inject: ["stack"], computed: { values() { - return h.validationErrors(this.stack); + return m.validationErrors(this.stack); } }, render() { @@ -3071,10 +3084,10 @@ const Fc = { const t = this.subscription.listen(e, (r) => { const n = "splade.redirect", i = "splade.refresh", a = "splade.toast"; let s = null, o = !1, l = []; - be(r, (u) => { + oe(r, (u) => { !ne(u) || (n in u && (s = u[n]), i in u && (o = u[i]), a in u && l.push(u)); - }), s ? h.visit(s) : o ? h.refresh() : this.events.push({ name: e, data: r }), l.length > 0 && l.forEach((u) => { - h.pushToast(u); + }), s ? m.visit(s) : o ? m.refresh() : this.events.push({ name: e, data: r }), l.length > 0 && l.forEach((u) => { + m.pushToast(u); }), this.$root.$emit(`event.${e}`, r); }); this.subscriptions.push(t); @@ -3116,7 +3129,7 @@ const Fc = { } }, Nc = { ref: "file" }; function Vc(e, t, r, n, i, a) { - return q(), de("div", Nc, [ + return q(), pe("div", Nc, [ re(e.$slots, "default", { handleFileInput: a.handleFileInput, filenames: i.filenames @@ -3127,7 +3140,7 @@ const Hc = /* @__PURE__ */ Ve(Mc, [["render", Vc]]), Uc = { inject: ["stack"], computed: { values() { - return h.flashData(this.stack); + return m.flashData(this.stack); } }, render() { @@ -3169,7 +3182,7 @@ function ra(e, t, r) { ea(r, e, t); } function Wc() { - this.__data__ = new he(), this.size = 0; + this.__data__ = new me(), this.size = 0; } function zc(e) { var t = this.__data__, r = t.delete(e); @@ -3184,23 +3197,23 @@ function Kc(e) { var Xc = 200; function Qc(e, t) { var r = this.__data__; - if (r instanceof he) { + if (r instanceof me) { var n = r.__data__; if (!ut || n.length < Xc - 1) return n.push([e, t]), this.size = ++r.size, this; - r = this.__data__ = new me(n); + r = this.__data__ = new ve(n); } return r.set(e, t), this.size = r.size, this; } -function fe(e) { - var t = this.__data__ = new he(e); +function de(e) { + var t = this.__data__ = new me(e); this.size = t.size; } -fe.prototype.clear = Wc; -fe.prototype.delete = zc; -fe.prototype.get = Gc; -fe.prototype.has = Kc; -fe.prototype.set = Qc; +de.prototype.clear = Wc; +de.prototype.delete = zc; +de.prototype.get = Gc; +de.prototype.has = Kc; +de.prototype.set = Qc; var Yc = "__lodash_hash_undefined__"; function Jc(e) { return this.__data__.set(e, Yc), this; @@ -3208,13 +3221,13 @@ function Jc(e) { function Zc(e) { return this.__data__.has(e); } -function Lt(e) { +function Bt(e) { var t = -1, r = e == null ? 0 : e.length; - for (this.__data__ = new me(); ++t < r; ) + for (this.__data__ = new ve(); ++t < r; ) this.add(e[t]); } -Lt.prototype.add = Lt.prototype.push = Jc; -Lt.prototype.has = Zc; +Bt.prototype.add = Bt.prototype.push = Jc; +Bt.prototype.has = Zc; function ef(e, t) { for (var r = -1, n = e == null ? 0 : e.length; ++r < n; ) if (t(e[r], r, e)) @@ -3232,31 +3245,31 @@ function na(e, t, r, n, i, a) { var u = a.get(e), c = a.get(t); if (u && c) return u == t && c == e; - var f = -1, p = !0, d = r & nf ? new Lt() : void 0; - for (a.set(e, t), a.set(t, e); ++f < o; ) { - var v = e[f], b = t[f]; + var p = -1, f = !0, d = r & nf ? new Bt() : void 0; + for (a.set(e, t), a.set(t, e); ++p < o; ) { + var h = e[p], g = t[p]; if (n) - var w = s ? n(b, v, f, t, e, a) : n(v, b, f, e, t, a); + var w = s ? n(g, h, p, t, e, a) : n(h, g, p, e, t, a); if (w !== void 0) { if (w) continue; - p = !1; + f = !1; break; } if (d) { if (!ef(t, function(T, A) { - if (!tf(d, A) && (v === T || i(v, T, r, n, a))) + if (!tf(d, A) && (h === T || i(h, T, r, n, a))) return d.push(A); })) { - p = !1; + f = !1; break; } - } else if (!(v === b || i(v, b, r, n, a))) { - p = !1; + } else if (!(h === g || i(h, g, r, n, a))) { + f = !1; break; } } - return a.delete(e), a.delete(t), p; + return a.delete(e), a.delete(t), f; } var af = se.Uint8Array; const kn = af; @@ -3341,41 +3354,41 @@ function Df(e, t, r, n, i, a) { var s = r & If, o = Mn(e), l = o.length, u = Mn(t), c = u.length; if (l != c && !s) return !1; - for (var f = l; f--; ) { - var p = o[f]; - if (!(s ? p in t : Cf.call(t, p))) + for (var p = l; p--; ) { + var f = o[p]; + if (!(s ? f in t : Cf.call(t, f))) return !1; } - var d = a.get(e), v = a.get(t); - if (d && v) - return d == t && v == e; - var b = !0; + var d = a.get(e), h = a.get(t); + if (d && h) + return d == t && h == e; + var g = !0; a.set(e, t), a.set(t, e); - for (var w = s; ++f < l; ) { - p = o[f]; - var T = e[p], A = t[p]; + for (var w = s; ++p < l; ) { + f = o[p]; + var T = e[f], A = t[f]; if (n) - var I = s ? n(A, T, p, t, e, a) : n(T, A, p, e, t, a); + var I = s ? n(A, T, f, t, e, a) : n(T, A, f, e, t, a); if (!(I === void 0 ? T === A || i(T, A, r, n, a) : I)) { - b = !1; + g = !1; break; } - w || (w = p == "constructor"); + w || (w = f == "constructor"); } - if (b && !w) { + if (g && !w) { var E = e.constructor, O = t.constructor; - E != O && "constructor" in e && "constructor" in t && !(typeof E == "function" && E instanceof E && typeof O == "function" && O instanceof O) && (b = !1); + E != O && "constructor" in e && "constructor" in t && !(typeof E == "function" && E instanceof E && typeof O == "function" && O instanceof O) && (g = !1); } - return a.delete(e), a.delete(t), b; + return a.delete(e), a.delete(t), g; } var qf = Me(se, "DataView"); const Er = qf; var jf = Me(se, "Promise"); const _r = jf; -var Lf = Me(se, "Set"); -const xr = Lf; -var Bf = Me(se, "WeakMap"); -const Tr = Bf; +var Bf = Me(se, "Set"); +const xr = Bf; +var Lf = Me(se, "WeakMap"); +const Tr = Lf; var Nn = "[object Map]", kf = "[object Object]", Vn = "[object Promise]", Hn = "[object Set]", Un = "[object WeakMap]", Wn = "[object DataView]", Ff = Re(Er), Rf = Re(ut), Mf = Re(_r), Nf = Re(xr), Vf = Re(Tr), qe = xe; (Er && qe(new Er(new ArrayBuffer(1))) != Wn || ut && qe(new ut()) != Nn || _r && qe(_r.resolve()) != Vn || xr && qe(new xr()) != Hn || Tr && qe(new Tr()) != Un) && (qe = function(e) { var t = xe(e), r = t == kf ? e.constructor : void 0, n = r ? Re(r) : ""; @@ -3399,22 +3412,22 @@ var Hf = 1, Gn = "[object Arguments]", Kn = "[object Array]", xt = "[object Obje function Wf(e, t, r, n, i, a) { var s = F(e), o = F(t), l = s ? Kn : zn(e), u = o ? Kn : zn(t); l = l == Gn ? xt : l, u = u == Gn ? xt : u; - var c = l == xt, f = u == xt, p = l == u; - if (p && cr(e)) { + var c = l == xt, p = u == xt, f = l == u; + if (f && cr(e)) { if (!cr(t)) return !1; s = !0, c = !1; } - if (p && !c) - return a || (a = new fe()), s || li(e) ? na(e, t, r, n, i, a) : Sf(e, t, l, r, n, i, a); + if (f && !c) + return a || (a = new de()), s || li(e) ? na(e, t, r, n, i, a) : Sf(e, t, l, r, n, i, a); if (!(r & Hf)) { - var d = c && Xn.call(e, "__wrapped__"), v = f && Xn.call(t, "__wrapped__"); - if (d || v) { - var b = d ? e.value() : e, w = v ? t.value() : t; - return a || (a = new fe()), i(b, w, r, n, a); + var d = c && Xn.call(e, "__wrapped__"), h = p && Xn.call(t, "__wrapped__"); + if (d || h) { + var g = d ? e.value() : e, w = h ? t.value() : t; + return a || (a = new de()), i(g, w, r, n, a); } } - return p ? (a || (a = new fe()), Df(e, t, r, n, i, a)) : !1; + return f ? (a || (a = new de()), Df(e, t, r, n, i, a)) : !1; } function Qt(e, t, r, n, i) { return e === t ? !0 : e == null || t == null || !Oe(e) && !Oe(t) ? e !== e && t !== t : Wf(e, t, r, n, Qt, i); @@ -3436,10 +3449,10 @@ function Kf(e, t, r, n) { if (u === void 0 && !(l in e)) return !1; } else { - var f = new fe(); + var p = new de(); if (n) - var p = n(u, c, l, e, t, f); - if (!(p === void 0 ? Qt(c, u, zf | Gf, n, f) : p)) + var f = n(u, c, l, e, t, p); + if (!(f === void 0 ? Qt(c, u, zf | Gf, n, p) : f)) return !1; } } @@ -3560,7 +3573,7 @@ const pd = { type: String, required: !1, default() { - return h.isSsr ? "" : location.href; + return m.isSsr ? "" : location.href; } }, method: { @@ -3636,7 +3649,7 @@ const pd = { return this.values; }, rawErrors() { - return h.validationErrors(this.stack); + return m.validationErrors(this.stack); }, errors() { return ua(this.rawErrors, (e) => e.join(` @@ -3692,7 +3705,7 @@ const pd = { } if (!this.confirm) return this.request(); - h.confirm( + m.confirm( la(this.confirm) ? "" : this.confirm, this.confirmText, this.confirmButton, @@ -3707,7 +3720,7 @@ const pd = { const e = this.values instanceof FormData ? this.values : ea(this.values), t = { Accept: "application/json" }; this.stay && (t["X-Splade-Prevent-Refresh"] = !0); let r = this.method.toUpperCase(); - r !== "GET" && r !== "POST" && (e.append("_method", r), r = "POST"), h.request(this.action, r, e, t).then((n) => { + r !== "GET" && r !== "POST" && (e.append("_method", r), r = "POST"), m.request(this.action, r, e, t).then((n) => { this.$emit("success", n), this.restoreOnSuccess && this.restore(), this.resetOnSuccess && this.reset(), this.processing = !1, this.wasSuccessful = !0, this.recentlySuccessful = !0, this.recentlySuccessfulTimeoutId = setTimeout(() => this.recentlySuccessful = !1, 2e3); }).catch(async (n) => { if (this.processing = !1, this.$emit("error", n), !this.scrollOnError) @@ -3811,12 +3824,12 @@ const pd = { } }, md = { ref: "input" }; function vd(e, t, r, n, i, a) { - return q(), de("div", md, [ + return q(), pe("div", md, [ re(e.$slots, "default", { disabled: i.disabled }) ], 512); } const gd = /* @__PURE__ */ Ve(hd, [["render", vd]]), yd = { - components: { Render: oe }, + components: { Render: le }, props: { name: { type: String, @@ -3826,7 +3839,7 @@ const gd = /* @__PURE__ */ Ve(hd, [["render", vd]]), yd = { type: String, required: !1, default() { - return h.isSsr ? "" : window.location.href; + return m.isSsr ? "" : window.location.href; } }, show: { @@ -3850,7 +3863,7 @@ const gd = /* @__PURE__ */ Ve(hd, [["render", vd]]), yd = { }, methods: { async request() { - this.html = null, h.lazy(this.url, this.name).then((e) => { + this.html = null, m.lazy(this.url, this.name).then((e) => { this.html = e.data.html; }); } @@ -3861,7 +3874,7 @@ function bd(e, t, r, n, i, a) { return i.html ? (q(), K(s, { key: 0, html: i.html - }, null, 8, ["html"])) : r.show ? re(e.$slots, "default", { key: 1 }) : Bt("", !0); + }, null, 8, ["html"])) : r.show ? re(e.$slots, "default", { key: 1 }) : Lt("", !0); } const wd = /* @__PURE__ */ Ve(yd, [["render", bd]]), Sd = ["href", "onClick"], Od = { __name: "Link", @@ -3916,7 +3929,7 @@ const wd = /* @__PURE__ */ Ve(yd, [["render", bd]]), Sd = ["href", "onClick"], O function r() { if (!t.confirm) return n(); - h.confirm( + m.confirm( la(t.confirm) ? "" : t.confirm, t.confirmText, t.confirmButton, @@ -3930,12 +3943,12 @@ const wd = /* @__PURE__ */ Ve(yd, [["render", bd]]), Sd = ["href", "onClick"], O if (t.away) return window.location = t.href; if (t.modal) - return h.modal(t.href); + return m.modal(t.href); if (t.slideover) - return h.slideover(t.href); - t.replace ? h.replace(t.href) : h.visit(t.href); + return m.slideover(t.href); + t.replace ? m.replace(t.href) : m.visit(t.href); } - return (i, a) => (q(), de("a", { + return (i, a) => (q(), pe("a", { href: e.href, onClick: Ea(r, ["prevent"]) }, [ @@ -4137,14 +4150,14 @@ const _d = { } }, xd = { ref: "select" }; function Td(e, t, r, n, i, a) { - return q(), de("div", xd, [ + return q(), pe("div", xd, [ re(e.$slots, "default") ], 512); } const Ad = /* @__PURE__ */ Ve(_d, [["render", Td]]), Id = { inject: ["stack"], render() { - const e = h.validationErrors(this.stack), t = h.flashData(this.stack), r = h.sharedData.value, n = ua(e, (i) => i.join(` + const e = m.validationErrors(this.stack), t = m.flashData(this.stack), r = m.sharedData.value, n = ua(e, (i) => i.join(` `)); return this.$slots.default({ flash: t, @@ -4260,7 +4273,7 @@ const qd = { }, mounted() { const e = this.getCurrentQuery(), t = e.columns || []; - be(e, (r, n) => { + oe(e, (r, n) => { if (Tt(n, "filter[") && !r) { const i = n.split("["), a = i[1].substring(0, i[1].length - 1); this.forcedVisibleSearchInputs = [...this.forcedVisibleSearchInputs, a]; @@ -4269,12 +4282,12 @@ const qd = { }, methods: { visitLink(e, t) { - return t === "modal" ? h.modal(e) : t === "slideover" ? h.slideover(e) : h.visit(e); + return t === "modal" ? m.modal(e) : t === "slideover" ? m.slideover(e) : m.visit(e); }, reset() { this.forcedVisibleSearchInputs = [], this.visibleColumns = this.defaultVisibleToggleableColumns; let e = this.getCurrentQuery(); - e.columns = [], e.page = null, e.perPage = null, e.sort = null, be(e, (t, r) => { + e.columns = [], e.page = null, e.perPage = null, e.sort = null, oe(e, (t, r) => { Tt(r, "filter[") && (e[r] = null); }), this.visitWithQueryObject(e, null, !0); }, @@ -4290,7 +4303,7 @@ const qd = { this.forcedVisibleSearchInputs = this.forcedVisibleSearchInputs.filter((t) => t != e), this.updateQuery(`filter[${e}]`, null); }, showSearchInput(e) { - this.forcedVisibleSearchInputs = [...this.forcedVisibleSearchInputs, e], Le(() => { + this.forcedVisibleSearchInputs = [...this.forcedVisibleSearchInputs, e], Be(() => { document.querySelector(`[name="searchInput-${e}"]`).focus(); }); }, @@ -4322,26 +4335,26 @@ const qd = { var o; typeof r > "u" && (r = !0); let n = {}; - be(e, (l, u) => { + oe(e, (l, u) => { if (!F(l)) { n[u] = l; return; } - l.length !== 0 && l.forEach((c, f) => { - n[`${u}[${f}]`] = c; + l.length !== 0 && l.forEach((c, p) => { + n[`${u}[${p}]`] = c; }); }); let i = ""; - be(n, (l, u) => { + oe(n, (l, u) => { l === null || l === [] || (i && (i += "&"), i += `${u}=${l}`); }), i && (i = "?" + i); const a = window.location.pathname + i; if (!r) - return h.replaceUrlOfCurrentPage(a); + return m.replaceUrlOfCurrentPage(a); this.isLoading = !0; let s = null; - typeof t < "u" && t && (s = (o = document.querySelector(`[name="${t.name}"]`)) == null ? void 0 : o.value), h.replace(a).then(() => { - this.isLoading = !1, typeof t < "u" && t && Le(() => { + typeof t < "u" && t && (s = (o = document.querySelector(`[name="${t.name}"]`)) == null ? void 0 : o.value), m.replace(a).then(() => { + this.isLoading = !1, typeof t < "u" && t && Be(() => { const l = document.querySelector(`[name="${t.name}"]`); l.focus(), s && (l.value = s); }); @@ -4350,11 +4363,11 @@ const qd = { async performBulkAction(e, t, r, n, i) { if (t) try { - await h.confirm(t === !0 ? "" : t, r, n, i); + await m.confirm(t === !0 ? "" : t, r, n, i); } catch { return !1; } - this.isLoading = !0, h.request(e, "POST", { ids: this.selectedItems }, {}, !1).then((a) => { + this.isLoading = !0, m.request(e, "POST", { ids: this.selectedItems }, {}, !1).then((a) => { a.data; }).catch(() => { this.isLoading = !1; @@ -4406,12 +4419,12 @@ const qd = { this.isMounted = !0; } }; -function Ld(e, t, r, n, i, a) { +function Bd(e, t, r, n, i, a) { return i.isMounted ? (q(), K(ei, _a(xa({ key: 0 }, e.$attrs)), [ re(e.$slots, "default") - ], 16)) : Bt("", !0); + ], 16)) : Lt("", !0); } -const Bd = /* @__PURE__ */ Ve(jd, [["render", Ld]]), kd = { +const Ld = /* @__PURE__ */ Ve(jd, [["render", Bd]]), kd = { props: { autosize: { type: Boolean, @@ -4432,7 +4445,7 @@ const Bd = /* @__PURE__ */ Ve(jd, [["render", Ld]]), kd = { watch: { modelValue() { !this.autosize || !this.autosizeInstance || import("autosize").then((e) => { - Le(() => e.default.update(this.element)); + Be(() => e.default.update(this.element)); }); } }, @@ -4448,7 +4461,7 @@ const Bd = /* @__PURE__ */ Ve(jd, [["render", Ld]]), kd = { } }, Fd = { ref: "textarea" }; function Rd(e, t, r, n, i, a) { - return q(), de("div", Fd, [ + return q(), pe("div", Fd, [ re(e.$slots, "default") ], 512); } @@ -4506,15 +4519,15 @@ const Md = /* @__PURE__ */ Ve(kd, [["render", Rd]]), Nd = { ], Hd = { computed: { toasts: function() { - return h.toastsReversed.value; + return m.toastsReversed.value; }, hasBackdrop: function() { - return h.toasts.value.filter((e) => !e.dismissed && e.backdrop && e.html).length > 0; + return m.toasts.value.filter((e) => !e.dismissed && e.backdrop && e.html).length > 0; } }, methods: { dismissToast(e) { - h.dismissToast(e); + m.dismissToast(e); } }, render() { @@ -4523,7 +4536,7 @@ const Md = /* @__PURE__ */ Ve(kd, [["render", Rd]]), Nd = { toasts: this.toasts, dismissToast: this.dismissToast, hasBackdrop: this.hasBackdrop, - Render: oe, + Render: le, TransitionRoot: Ze, TransitionChild: Je }); @@ -4594,14 +4607,14 @@ const Md = /* @__PURE__ */ Ve(kd, [["render", Rd]]), Nd = { } }, zd = { created: (e, t) => { - if (h.isSsr) + if (m.isSsr) return; - const r = `preserveScroll-${t.arg}`, n = h.restore(r); - n && Le(() => { + const r = `preserveScroll-${t.arg}`, n = m.restore(r); + n && Be(() => { typeof e.scrollTo == "function" ? e.scrollTo(n.left, n.top) : (e.scrollTop = n.top, e.scrollLeft = n.left); }); const i = function() { - h.remember(r, { + m.remember(r, { top: e.scrollTop, left: e.scrollLeft }); @@ -4692,7 +4705,7 @@ const Md = /* @__PURE__ */ Ve(kd, [["render", Rd]]), Nd = { install: (e, t) => { t = t || {}, t.max_keep_alive = G(t, "max_keep_alive") ? t.max_keep_alive : 10, t.prefix = G(t, "prefix") ? t.prefix : "Splade", t.transform_anchors = G(t, "transform_anchors") ? t.transform_anchors : !1, t.link_component = G(t, "link_component") ? t.link_component : "Link", t.progress_bar = G(t, "progress_bar") ? t.progress_bar : !1, t.components = G(t, "components") ? t.components : {}; const r = t.prefix; - if (e.component(`${r}Confirm`, lu).component(`${r}Data`, hu).component(`${r}Defer`, Tu).component(`${r}Dialog`, Au).component(`${r}Dropdown`, Bc).component(`${r}DynamicHtml`, kc).component(`${r}Errors`, Fc).component(`${r}Event`, Rc).component(`${r}File`, Hc).component(`${r}Flash`, Uc).component(`${r}Form`, pd).component(`${r}Input`, gd).component(`${r}Lazy`, wd).component(`${r}Modal`, $d).component(`${r}OnClickOutside`, Wi).component(`${r}Render`, oe).component(`${r}Select`, Ad).component(`${r}State`, Id).component(`${r}Table`, qd).component(`${r}Teleport`, Bd).component(`${r}Textarea`, Md).component(`${r}Toast`, Nd).component(`${r}Toasts`, Hd).component(`${r}Toggle`, Ud).component(`${r}Transition`, Wd).component(t.link_component, Od).directive(`${r}PreserveScroll`, zd), Object.defineProperty(e.config.globalProperties, "$splade", { get: () => h }), Object.defineProperty(e.config.globalProperties, "$spladeOptions", { get: () => Object.assign({}, { ...t }) }), e.provide("$splade", e.config.globalProperties.$splade), e.provide("$spladeOptions", e.config.globalProperties.$spladeOptions), t.progress_bar) { + if (e.component(`${r}Confirm`, lu).component(`${r}Data`, hu).component(`${r}Defer`, Tu).component(`${r}Dialog`, Au).component(`${r}Dropdown`, Lc).component(`${r}DynamicHtml`, kc).component(`${r}Errors`, Fc).component(`${r}Event`, Rc).component(`${r}File`, Hc).component(`${r}Flash`, Uc).component(`${r}Form`, pd).component(`${r}Input`, gd).component(`${r}Lazy`, wd).component(`${r}Modal`, $d).component(`${r}OnClickOutside`, Wi).component(`${r}Render`, le).component(`${r}Select`, Ad).component(`${r}State`, Id).component(`${r}Table`, qd).component(`${r}Teleport`, Ld).component(`${r}Textarea`, Md).component(`${r}Toast`, Nd).component(`${r}Toasts`, Hd).component(`${r}Toggle`, Ud).component(`${r}Transition`, Wd).component(t.link_component, Od).directive(`${r}PreserveScroll`, zd), Object.defineProperty(e.config.globalProperties, "$splade", { get: () => m }), Object.defineProperty(e.config.globalProperties, "$spladeOptions", { get: () => Object.assign({}, { ...t }) }), e.provide("$splade", e.config.globalProperties.$splade), e.provide("$spladeOptions", e.config.globalProperties.$spladeOptions), t.progress_bar) { const n = { delay: 250, color: "#4B5563", @@ -4703,7 +4716,7 @@ const Md = /* @__PURE__ */ Ve(kd, [["render", Rd]]), Nd = { G(t.progress_bar, i) || (t.progress_bar[i] = n[i]); }), Ar.init(t.progress_bar); } - be(t.components, (n, i) => { + oe(t.components, (n, i) => { e.component(i, n); }); } @@ -4731,7 +4744,7 @@ function Jd(e, t, r) { }).listen(i, () => console.log(`Splade SSR server started on port ${i}.`)); } export { - h as Splade, + m as Splade, Eo as SpladeApp, Yd as SpladePlugin, Xd as renderSpladeApp, diff --git a/dist/protone-media-laravel-splade.umd.cjs b/dist/protone-media-laravel-splade.umd.cjs index a962df11..19838f58 100644 --- a/dist/protone-media-laravel-splade.umd.cjs +++ b/dist/protone-media-laravel-splade.umd.cjs @@ -1,13 +1,13 @@ -(function(k,Ne){typeof exports=="object"&&typeof module<"u"?Ne(exports,require("axios"),require("vue")):typeof define=="function"&&define.amd?define(["exports","axios","vue"],Ne):(k=typeof globalThis<"u"?globalThis:k||self,Ne(k.ProtoneMediaLaravelSplade={},k.axios,k.Vue))})(this,function(k,Ne,a){"use strict";const Rr=(e=>e&&typeof e=="object"&&"default"in e?e:{default:e})(Ne),Od="",$d="";function Gi(e,t){for(var r=-1,n=e==null?0:e.length;++r-1&&e%1==0&&e-1&&e%1==0&&e<=Oo}var $o="[object Arguments]",Eo="[object Array]",_o="[object Boolean]",To="[object Date]",xo="[object Error]",Ao="[object Function]",Io="[object Map]",Po="[object Number]",Co="[object Object]",ko="[object RegExp]",Bo="[object Set]",Do="[object String]",jo="[object WeakMap]",qo="[object ArrayBuffer]",Lo="[object DataView]",Fo="[object Float32Array]",Mo="[object Float64Array]",Ro="[object Int8Array]",No="[object Int16Array]",Vo="[object Int32Array]",Ho="[object Uint8Array]",Uo="[object Uint8ClampedArray]",Wo="[object Uint16Array]",zo="[object Uint32Array]",P={};P[Fo]=P[Mo]=P[Ro]=P[No]=P[Vo]=P[Ho]=P[Uo]=P[Wo]=P[zo]=!0,P[$o]=P[Eo]=P[qo]=P[_o]=P[Lo]=P[To]=P[xo]=P[Ao]=P[Io]=P[Po]=P[Co]=P[ko]=P[Bo]=P[Do]=P[jo]=!1;function Go(e){return se(e)&&Ft(e.length)&&!!P[ae(e)]}function Ko(e){return function(t){return e(t)}}var Qr=typeof k=="object"&&k&&!k.nodeType&&k,He=Qr&&typeof module=="object"&&module&&!module.nodeType&&module,Xo=He&&He.exports===Qr,Mt=Xo&&Nr.process,Qo=function(){try{var e=He&&He.require&&He.require("util").types;return e||Mt&&Mt.binding&&Mt.binding("util")}catch{}}();const Yr=Qo;var Jr=Yr&&Yr.isTypedArray,Yo=Jr?Ko(Jr):Go;const Zr=Yo;var Jo=Object.prototype,Zo=Jo.hasOwnProperty;function ea(e,t){var r=j(e),n=!r&&zr(e),i=!r&&!n&&qt(e),o=!r&&!n&&!i&&Zr(e),s=r||n||i||o,l=s?Yi(e.length,String):[],u=l.length;for(var c in e)(t||Zo.call(e,c))&&!(s&&(c=="length"||i&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Lt(c,u)))&&l.push(c);return l}var ta=Object.prototype;function ra(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||ta;return e===r}function na(e,t){return function(r){return e(t(r))}}var ia=na(Object.keys,Object);const oa=ia;var aa=Object.prototype,sa=aa.hasOwnProperty;function la(e){if(!ra(e))return oa(e);var t=[];for(var r in Object(e))sa.call(e,r)&&r!="constructor"&&t.push(r);return t}function K(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var ua="[object AsyncFunction]",ca="[object Function]",fa="[object GeneratorFunction]",da="[object Proxy]";function en(e){if(!K(e))return!1;var t=ae(e);return t==ca||t==fa||t==ua||t==da}function nt(e){return e!=null&&Ft(e.length)&&!en(e)}function it(e){return nt(e)?ea(e):la(e)}function Rt(e,t){return e&&Qi(e,t,it)}function pa(e,t){return function(r,n){if(r==null)return r;if(!nt(r))return e(r,n);for(var i=r.length,o=t?i:-1,s=Object(r);(t?o--:++o"u";function ba(e,t,r){ue||window.addEventListener("popstate",wa.bind(this)),Object.keys(t).length>0&&ot.value++,zt(r),at(r.head),Gt(e);const n=ue?"":location.href,i=Ht(n,r.head,e,t,{},Vt.value,ot.value);nn(i)}function wa(e){!e.state||(B.value=e.state,Y.value=0,at(B.value.head),Gt(B.value.html,B.value.rememberedState.scrollY))}function Ht(e,t,r,n,i,o,s){const l={url:e,head:t,html:r,dynamics:n,rememberedState:i,pageVisitId:o,dynamicVisitId:s};return B.value=l,l}function Sa(e){ue||window.history.pushState(e,"",e.url)}function Oa(e){const t=Ht(e,JSON.parse(JSON.stringify(B.value.head)),B.value.html,B.value.dynamics,{...B.value.rememberedState},B.value.pageVisitId,B.value.dynamicVisitId);ue||window.history.replaceState(t,"",t.url)}function nn(e){ue||window.history.replaceState(e,"",e.url)}const Ut=a.ref(0);function $a(e,t){Ut.value++;const r=e.request.responseURL;if(e.data.splade.lazy)return;if(e.data.splade.modal&&Y.value++,zt(e.data.splade),at(e.data.splade.head),r===B.value.url&&(t=!0),e.data.splade.modal)return Ba(e.data.html,e.data.splade.modal);if(e.data.splade.preventRefresh)return;Y.value=0;let n=e.data.html,i=e.data.dynamics;const o=Object.keys(B.value.dynamics).length>0,s=Object.keys(i).length>0;t?(s&&le(i,(u,c)=>{i[c]+=``}),(!s||!o)&&(n+=``)):(s&&ot.value++,(!s||!o)&&Vt.value++),Gt(n,0);const l=Ht(r,e.data.splade.head,n,i,B.value.rememberedState?{...B.value.rememberedState}:{},Vt.value,ot.value);t?nn(l):Sa(l)}function Ea(){Y.value--,at(Ta(Y.value))}const on=a.ref({}),an=e=>on.value[e],_a=e=>Object.keys(an.value[e]).length>0,sn=a.ref({}),Ta=e=>sn.value[e],ln=a.ref({}),xa=e=>ln.value[e],Pe=a.ref([]);function Aa(e){Pe.value.push(e)}const Ia=a.computed(()=>ya(Pe.value));function Pa(e){Pe.value[e].dismissed=!0,Pe.value[e].html=null}const Wt=a.ref(null);function Ca(e,t,r,n){let i,o;const s=new Promise((l,u)=>{i=l,o=u});return Wt.value={title:e,text:t,confirmButton:r,cancelButton:n,resolvePromise:i,rejectPromise:o},s}function ka(){Wt.value=null}const un=a.ref({});function zt(e){un.value=e.shared?e.shared:{},ln.value[Y.value]=e.flash?e.flash:{},sn.value[Y.value]=e.head?e.head:{},ma(e.toasts?e.toasts:[],t=>{Pe.value.push(t)}),on.value[Y.value]=e.errors?e.errors:{}}const cn=a.ref(()=>{}),fn=a.ref(()=>{}),dn=a.ref(()=>{}),pn=a.ref(()=>{});function at(e){cn.value(e)}function Gt(e,t){fn.value(e,t)}function Ba(e,t){dn.value(e,t)}function Da(e){pn.value(e)}const hn=a.ref({});function mn(e,t,r){hn.value[e]=t,r&&ja(e,t)}function ja(e,t){let r=JSON.parse(localStorage.getItem("splade")||"{}")||{};r[e]=t,localStorage.setItem("splade",JSON.stringify(r))}function qa(e,t){return t?(JSON.parse(localStorage.getItem("splade")||"{}")||{})[e]:hn.value[e]}function st(e,t){ue||document.dispatchEvent(new CustomEvent(`splade:${e}`,{detail:t}))}function Ce(e,t,r,n,i){ue||mn("scrollY",window.scrollY),st("request",{url:e,method:t,data:r,headers:n,replace:i});const o=Rr.default({method:t,url:e,data:r,headers:{"X-Splade":!0,"X-Requested-With":"XMLHttpRequest",Accept:"text/html, application/xhtml+xml",...n},onUploadProgress:s=>{r instanceof FormData&&(s.percentage=Math.round(s.loaded/s.total*100),st("request-progress",{url:e,method:t,data:r,headers:n,replace:i,progress:s}))}});return o.then(s=>{$a(s,i),st("request-response",{url:e,method:t,data:r,headers:n,replace:i,response:s})}).catch(s=>{if(st("request-error",{url:e,method:t,data:r,headers:n,replace:i,error:s}),s.response.status==409&&s.response.headers["x-splade-redirect-away"])return window.location=s.response.headers["x-splade-redirect-away"];const l=s.response.data.splade;l&&(l.lazy||zt(l)),s.response.status!=422&&Da(s.response.data.html?s.response.data.html:s.response.data)}),o}function gn(e){return Ce(e,"GET",{},{},!0)}function La(e){return Ce(e,"GET",{},{},!1)}function Fa(e){return Ce(e,"GET",{},{"X-Splade-Modal":"modal"},!1)}function Ma(e){return Ce(e,"GET",{},{"X-Splade-Modal":"slideover"},!1)}function Ra(e,t){return Ce(e,"GET",{},{"X-Splade-Lazy":t},!1)}function Na(){return gn(B.value.url)}const m={init:ba,replace:gn,visit:La,modal:Fa,slideover:Ma,refresh:Na,request:Ce,lazy:Ra,replaceUrlOfCurrentPage:Oa,htmlForDynamicComponent(e){return B.value.dynamics[e]},setOnHead(e){cn.value=e},setOnHtml(e){fn.value=e},setOnModal(e){dn.value=e},setOnServerError(e){pn.value=e},hasValidationErrors:_a,validationErrors:an,sharedData:un,flashData:xa,toasts:Pe,toastsReversed:Ia,confirmModal:Wt,confirm:Ca,clearConfirmModal:ka,pushToast:Aa,dismissToast:Pa,restore:qa,remember:mn,popStack:Ea,currentStack:Y,pageVisitId:a.computed(()=>B.value.pageVisitId),dynamicVisitId:a.computed(()=>B.value.dynamicVisitId),isSsr:ue};var Va="[object String]";function lt(e){return typeof e=="string"||!j(e)&&se(e)&&ae(e)==Va}const J={__name:"Render",props:{html:{type:String,required:!1,default:""}},setup(e){const t=e,r=a.ref(null);function n(){r.value=a.h({template:t.html})}return a.watch(()=>t.html,n,{immediate:!0}),(i,o)=>e.html?(a.openBlock(),a.createBlock(a.unref(r),{key:0})):a.createCommentVNode("",!0)}},Ha={__name:"ServerError",props:{html:{type:String,required:!0}},emits:["close"],setup(e,{emit:t}){const r=e,n=a.ref(null);function i(){const l=document.createElement("html");l.innerHTML=r.html,l.querySelectorAll("a").forEach(c=>c.setAttribute("target","_top")),document.body.style.overflow="hidden";const u=n.value;if(!u.contentWindow)throw new Error("iframe not yet ready.");u.contentWindow.document.open(),u.contentWindow.document.write(l.outerHTML),u.contentWindow.document.close(),document.addEventListener("keydown",o)}function o(l){l.keyCode===27&&s()}function s(){document.body.style.overflow="visible",document.removeEventListener("keydown",o),t("close")}return a.onMounted(()=>i()),(l,u)=>(a.openBlock(),a.createElementBlock("div",{style:{position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px","z-index":"200000","box-sizing":"border-box",height:"100vh",width:"100vw","background-color":"rgb(0 0 0 / 0.75)",padding:"2rem"},onClick:s},[a.createElementVNode("iframe",{ref_key:"iframeElement",ref:n,class:"bg-white w-full h-full"},null,512)]))}},vn={__name:"SpladeApp",props:{el:{type:[String,Object],required:!1,default:""},components:{type:String,required:!1,default:e=>{if(!m.isSsr){const t=lt(e.el)?document.getElementById(e.el):e.el;return JSON.parse(t.dataset.components)||""}}},initialHtml:{type:String,required:!1,default:e=>{if(!m.isSsr){const t=lt(e.el)?document.getElementById(e.el):e.el;return JSON.parse(t.dataset.html)||""}}},initialDynamics:{type:Object,required:!1,default:e=>{if(!m.isSsr){const t=lt(e.el)?document.getElementById(e.el):e.el;return JSON.parse(t.dataset.dynamics)||{}}}},initialSpladeData:{type:Object,required:!1,default:e=>{if(!m.isSsr){const t=lt(e.el)?document.getElementById(e.el):e.el;return JSON.parse(t.dataset.splade)||{}}}}},setup(e){const t=e;a.provide("stack",0);const r=a.ref(),n=a.ref([]),i=a.ref(null),o=a.inject("$spladeOptions")||{},s=a.computed(()=>m.currentStack.value<1?[]:{filter:"blur(4px)","transition-property":"filter","transition-duration":"150ms","transition-timing-function":"cubic-bezier(0.4, 0, 0.2, 1)"});function l(){i.value=null}function u(d){n[d]=null,m.popStack()}function c(d,h){let p=document.querySelector(`meta[${d}="${h}"]`);return p||(p=document.createElement("meta"),p[d]=h,document.getElementsByTagName("head")[0].appendChild(p),p)}function f(d){const h=d.name?c("name",d.name):c("property",d.property);le(d,(p,v)=>{h[v]=p})}return m.setOnHead(d=>{m.isSsr||(document.title=d.title,d.meta.forEach(h=>{f(h)}))}),m.setOnHtml((d,h)=>{n.value=[],r.value=d,a.nextTick(()=>{m.isSsr||window.scrollTo(0,h),o.transform_anchors&&[...document.querySelectorAll("a")].forEach(p=>{p.href==""||p.href.charAt(0)=="#"||p.__vnode.dynamicProps===null&&(p.hasAttribute("download")||(p.onclick=function(v){v.preventDefault(),m.visit(p.href)}))})})}),m.setOnModal(function(d,h){n.value[m.currentStack.value]={html:d,type:h}}),m.setOnServerError(function(d){i.value=d}),m.init(t.initialHtml,t.initialDynamics,t.initialSpladeData),(d,h)=>(a.openBlock(),a.createElementBlock("div",null,[a.unref(m).isSsr?(a.openBlock(),a.createBlock(J,{key:`visit.${a.unref(m).pageVisitId.value}`,style:a.normalizeStyle(a.unref(s)),html:r.value},null,8,["style","html"])):(a.openBlock(),a.createBlock(a.KeepAlive,{key:0,max:a.unref(o).max_keep_alive},[(a.openBlock(),a.createBlock(J,{key:`visit.${a.unref(m).pageVisitId.value}`,style:a.normalizeStyle(a.unref(s)),html:r.value},null,8,["style","html"]))],1032,["max"])),a.createVNode(J,{html:e.components},null,8,["html"]),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(m).currentStack.value,p=>(a.openBlock(),a.createBlock(J,{key:`modal.${p}`,type:n.value[p].type,html:n.value[p].html,stack:p,"on-top-of-stack":a.unref(m).currentStack.value===p,onClose:v=>u(p)},null,8,["type","html","stack","on-top-of-stack","onClose"]))),128)),i.value?(a.openBlock(),a.createBlock(Ha,{key:2,html:i.value,onClose:l},null,8,["html"])):a.createCommentVNode("",!0)]))}};function Ua(e){return()=>a.h(vn,e)}var Wa=Object.prototype,za=Wa.hasOwnProperty;function Ga(e,t){return e!=null&&za.call(e,t)}var Ka="[object Symbol]";function ut(e){return typeof e=="symbol"||se(e)&&ae(e)==Ka}var Xa=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Qa=/^\w*$/;function Kt(e,t){if(j(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||ut(e)?!0:Qa.test(e)||!Xa.test(e)||t!=null&&e in Object(t)}var Ya=G["__core-js_shared__"];const Xt=Ya;var yn=function(){var e=/[^.]+$/.exec(Xt&&Xt.keys&&Xt.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Ja(e){return!!yn&&yn in e}var Za=Function.prototype,es=Za.toString;function ge(e){if(e!=null){try{return es.call(e)}catch{}try{return e+""}catch{}}return""}var ts=/[\\^$.*+?()[\]{}|]/g,rs=/^\[object .+?Constructor\]$/,ns=Function.prototype,is=Object.prototype,os=ns.toString,as=is.hasOwnProperty,ss=RegExp("^"+os.call(as).replace(ts,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ls(e){if(!K(e)||Ja(e))return!1;var t=en(e)?ss:rs;return t.test(ge(e))}function us(e,t){return e==null?void 0:e[t]}function ve(e,t){var r=us(e,t);return ls(r)?r:void 0}var cs=ve(Object,"create");const Ue=cs;function fs(){this.__data__=Ue?Ue(null):{},this.size=0}function ds(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var ps="__lodash_hash_undefined__",hs=Object.prototype,ms=hs.hasOwnProperty;function gs(e){var t=this.__data__;if(Ue){var r=t[e];return r===ps?void 0:r}return ms.call(t,e)?t[e]:void 0}var vs=Object.prototype,ys=vs.hasOwnProperty;function bs(e){var t=this.__data__;return Ue?t[e]!==void 0:ys.call(t,e)}var ws="__lodash_hash_undefined__";function Ss(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Ue&&t===void 0?ws:t,this}function ye(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t-1}function As(e,t){var r=this.__data__,n=ct(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function Z(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t`"${i}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,U),n}var pt=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(pt||{}),ce=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(ce||{});function R({visible:e=!0,features:t=0,ourProps:r,theirProps:n,...i}){var o;let s=Ws(n,r),l=Object.assign(i,{props:s});if(e||t&2&&s.static)return er(l);if(t&1){let u=(o=s.unmount)==null||o?0:1;return U(u,{[0](){return null},[1](){return er({...i,props:{...s,hidden:!0,style:{display:"none"}}})}})}return er(l)}function er({props:e,attrs:t,slots:r,slot:n,name:i}){var o;let{as:s,...l}=En(e,["unmount","static"]),u=(o=r.default)==null?void 0:o.call(r,n),c={};if(n){let f=!1,d=[];for(let[h,p]of Object.entries(n))typeof p=="boolean"&&(f=!0),p===!0&&d.push(h);f&&(c["data-headlessui-state"]=d.join(" "))}if(s==="template"){if(u=$n(u!=null?u:[]),Object.keys(l).length>0||Object.keys(t).length>0){let[f,...d]=u!=null?u:[];if(!zs(f)||d.length>0)throw new Error(['Passing props on "template"!',"",`The current component <${i} /> is rendering a "template".`,"However we need to passthrough the following props:",Object.keys(l).concat(Object.keys(t)).sort((h,p)=>h.localeCompare(p)).map(h=>` - ${h}`).join(` -`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".',"Render a single element as the child so that we can forward the props onto that element."].map(h=>` - ${h}`).join(` +(function(k,Ne){typeof exports=="object"&&typeof module<"u"?Ne(exports,require("axios"),require("vue")):typeof define=="function"&&define.amd?define(["exports","axios","vue"],Ne):(k=typeof globalThis<"u"?globalThis:k||self,Ne(k.ProtoneMediaLaravelSplade={},k.axios,k.Vue))})(this,function(k,Ne,a){"use strict";const Rr=(e=>e&&typeof e=="object"&&"default"in e?e:{default:e})(Ne),Od="",$d="";function Gi(e,t){for(var r=-1,n=e==null?0:e.length;++r-1&&e%1==0&&e-1&&e%1==0&&e<=Oo}var $o="[object Arguments]",Eo="[object Array]",_o="[object Boolean]",To="[object Date]",xo="[object Error]",Ao="[object Function]",Io="[object Map]",Po="[object Number]",Co="[object Object]",ko="[object RegExp]",Bo="[object Set]",Do="[object String]",jo="[object WeakMap]",qo="[object ArrayBuffer]",Lo="[object DataView]",Fo="[object Float32Array]",Mo="[object Float64Array]",Ro="[object Int8Array]",No="[object Int16Array]",Vo="[object Int32Array]",Ho="[object Uint8Array]",Uo="[object Uint8ClampedArray]",Wo="[object Uint16Array]",zo="[object Uint32Array]",P={};P[Fo]=P[Mo]=P[Ro]=P[No]=P[Vo]=P[Ho]=P[Uo]=P[Wo]=P[zo]=!0,P[$o]=P[Eo]=P[qo]=P[_o]=P[Lo]=P[To]=P[xo]=P[Ao]=P[Io]=P[Po]=P[Co]=P[ko]=P[Bo]=P[Do]=P[jo]=!1;function Go(e){return le(e)&&Ft(e.length)&&!!P[se(e)]}function Ko(e){return function(t){return e(t)}}var Qr=typeof k=="object"&&k&&!k.nodeType&&k,He=Qr&&typeof module=="object"&&module&&!module.nodeType&&module,Xo=He&&He.exports===Qr,Mt=Xo&&Nr.process,Qo=function(){try{var e=He&&He.require&&He.require("util").types;return e||Mt&&Mt.binding&&Mt.binding("util")}catch{}}();const Yr=Qo;var Jr=Yr&&Yr.isTypedArray,Yo=Jr?Ko(Jr):Go;const Zr=Yo;var Jo=Object.prototype,Zo=Jo.hasOwnProperty;function ea(e,t){var r=j(e),n=!r&&zr(e),i=!r&&!n&&qt(e),o=!r&&!n&&!i&&Zr(e),s=r||n||i||o,l=s?Yi(e.length,String):[],u=l.length;for(var c in e)(t||Zo.call(e,c))&&!(s&&(c=="length"||i&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Lt(c,u)))&&l.push(c);return l}var ta=Object.prototype;function ra(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||ta;return e===r}function na(e,t){return function(r){return e(t(r))}}var ia=na(Object.keys,Object);const oa=ia;var aa=Object.prototype,sa=aa.hasOwnProperty;function la(e){if(!ra(e))return oa(e);var t=[];for(var r in Object(e))sa.call(e,r)&&r!="constructor"&&t.push(r);return t}function K(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var ua="[object AsyncFunction]",ca="[object Function]",fa="[object GeneratorFunction]",da="[object Proxy]";function en(e){if(!K(e))return!1;var t=se(e);return t==ca||t==fa||t==ua||t==da}function nt(e){return e!=null&&Ft(e.length)&&!en(e)}function it(e){return nt(e)?ea(e):la(e)}function Rt(e,t){return e&&Qi(e,t,it)}function pa(e,t){return function(r,n){if(r==null)return r;if(!nt(r))return e(r,n);for(var i=r.length,o=t?i:-1,s=Object(r);(t?o--:++o"u";function ba(e,t,r){ue||window.addEventListener("popstate",wa.bind(this)),Object.keys(t).length>0&&ot.value++,zt(r),at(r.head),Gt(e);const n=ue?"":location.href,i=Ht(n,r.head,e,t,{},Vt.value,ot.value);nn(i)}function wa(e){!e.state||(B.value=e.state,J.value=0,at(B.value.head),Gt(B.value.html,B.value.rememberedState.scrollY))}function Ht(e,t,r,n,i,o,s){const l={url:e,head:t,html:r,dynamics:n,rememberedState:i,pageVisitId:o,dynamicVisitId:s};return B.value=l,l}function Sa(e){ue||window.history.pushState(e,"",e.url)}function Oa(e){const t=Ht(e,JSON.parse(JSON.stringify(B.value.head)),B.value.html,B.value.dynamics,{...B.value.rememberedState},B.value.pageVisitId,B.value.dynamicVisitId);ue||window.history.replaceState(t,"",t.url)}function nn(e){ue||window.history.replaceState(e,"",e.url)}const Ut=a.ref(0);function $a(e,t){Ut.value++;const r=e.request.responseURL;if(e.data.splade.lazy)return;if(e.data.splade.modal&&J.value++,zt(e.data.splade),at(e.data.splade.head),r===B.value.url&&(t=!0),e.data.splade.modal)return Ba(e.data.html,e.data.splade.modal);if(e.data.splade.preventRefresh)return;J.value=0;let n=e.data.html,i=e.data.dynamics;const o=Object.keys(B.value.dynamics).length>0,s=Object.keys(i).length>0;t?(s&&Y(i,(u,c)=>{i[c]+=``}),(!s||!o)&&(n+=``)):(s&&ot.value++,(!s||!o)&&Vt.value++),Gt(n,0);const l=Ht(r,e.data.splade.head,n,i,B.value.rememberedState?{...B.value.rememberedState}:{},Vt.value,ot.value);t?nn(l):Sa(l)}function Ea(){J.value--,at(Ta(J.value))}const on=a.ref({}),an=e=>on.value[e],_a=e=>Object.keys(an.value[e]).length>0,sn=a.ref({}),Ta=e=>sn.value[e],ln=a.ref({}),xa=e=>ln.value[e],Pe=a.ref([]);function Aa(e){Pe.value.push(e)}const Ia=a.computed(()=>ya(Pe.value));function Pa(e){Pe.value[e].dismissed=!0,Pe.value[e].html=null}const Wt=a.ref(null);function Ca(e,t,r,n){let i,o;const s=new Promise((l,u)=>{i=l,o=u});return Wt.value={title:e,text:t,confirmButton:r,cancelButton:n,resolvePromise:i,rejectPromise:o},s}function ka(){Wt.value=null}const un=a.ref({});function zt(e){un.value=e.shared?e.shared:{},ln.value[J.value]=e.flash?e.flash:{},sn.value[J.value]=e.head?e.head:{},ma(e.toasts?e.toasts:[],t=>{Pe.value.push(t)}),on.value[J.value]=e.errors?e.errors:{}}const cn=a.ref(()=>{}),fn=a.ref(()=>{}),dn=a.ref(()=>{}),pn=a.ref(()=>{});function at(e){cn.value(e)}function Gt(e,t){fn.value(e,t)}function Ba(e,t){dn.value(e,t)}function Da(e){pn.value(e)}const hn=a.ref({});function mn(e,t,r){hn.value[e]=t,r&&ja(e,t)}function ja(e,t){let r=JSON.parse(localStorage.getItem("splade")||"{}")||{};r[e]=t,localStorage.setItem("splade",JSON.stringify(r))}function qa(e,t){return t?(JSON.parse(localStorage.getItem("splade")||"{}")||{})[e]:hn.value[e]}function st(e,t){ue||document.dispatchEvent(new CustomEvent(`splade:${e}`,{detail:t}))}function Ce(e,t,r,n,i){ue||mn("scrollY",window.scrollY),st("request",{url:e,method:t,data:r,headers:n,replace:i});const o=Rr.default({method:t,url:e,data:r,headers:{"X-Splade":!0,"X-Requested-With":"XMLHttpRequest",Accept:"text/html, application/xhtml+xml",...n},onUploadProgress:s=>{r instanceof FormData&&(s.percentage=Math.round(s.loaded/s.total*100),st("request-progress",{url:e,method:t,data:r,headers:n,replace:i,progress:s}))}});return o.then(s=>{$a(s,i),st("request-response",{url:e,method:t,data:r,headers:n,replace:i,response:s})}).catch(s=>{if(st("request-error",{url:e,method:t,data:r,headers:n,replace:i,error:s}),s.response.status==409&&s.response.headers["x-splade-redirect-away"])return window.location=s.response.headers["x-splade-redirect-away"];const l=s.response.data.splade;l&&(l.lazy||zt(l)),s.response.status!=422&&Da(s.response.data.html?s.response.data.html:s.response.data)}),o}function gn(e){return Ce(e,"GET",{},{},!0)}function La(e){return Ce(e,"GET",{},{},!1)}function Fa(e){return Ce(e,"GET",{},{"X-Splade-Modal":"modal"},!1)}function Ma(e){return Ce(e,"GET",{},{"X-Splade-Modal":"slideover"},!1)}function Ra(e,t){return Ce(e,"GET",{},{"X-Splade-Lazy":t},!1)}function Na(){return gn(B.value.url)}const g={init:ba,replace:gn,visit:La,modal:Fa,slideover:Ma,refresh:Na,request:Ce,lazy:Ra,replaceUrlOfCurrentPage:Oa,htmlForDynamicComponent(e){return B.value.dynamics[e]},setOnHead(e){cn.value=e},setOnHtml(e){fn.value=e},setOnModal(e){dn.value=e},setOnServerError(e){pn.value=e},hasValidationErrors:_a,validationErrors:an,sharedData:un,flashData:xa,toasts:Pe,toastsReversed:Ia,confirmModal:Wt,confirm:Ca,clearConfirmModal:ka,pushToast:Aa,dismissToast:Pa,restore:qa,remember:mn,popStack:Ea,currentStack:J,pageVisitId:a.computed(()=>B.value.pageVisitId),dynamicVisitId:a.computed(()=>B.value.dynamicVisitId),isSsr:ue};var Va="[object String]";function lt(e){return typeof e=="string"||!j(e)&&le(e)&&se(e)==Va}const Z={__name:"Render",props:{html:{type:String,required:!1,default:""}},setup(e){const t=e,r=a.ref(null);function n(){r.value=a.h({template:t.html})}return a.watch(()=>t.html,n,{immediate:!0}),(i,o)=>e.html?(a.openBlock(),a.createBlock(a.unref(r),{key:0})):a.createCommentVNode("",!0)}},Ha={__name:"ServerError",props:{html:{type:String,required:!0}},emits:["close"],setup(e,{emit:t}){const r=e,n=a.ref(null);function i(){const l=document.createElement("html");l.innerHTML=r.html,l.querySelectorAll("a").forEach(c=>c.setAttribute("target","_top")),document.body.style.overflow="hidden";const u=n.value;if(!u.contentWindow)throw new Error("iframe not yet ready.");u.contentWindow.document.open(),u.contentWindow.document.write(l.outerHTML),u.contentWindow.document.close(),document.addEventListener("keydown",o)}function o(l){l.keyCode===27&&s()}function s(){document.body.style.overflow="visible",document.removeEventListener("keydown",o),t("close")}return a.onMounted(()=>i()),(l,u)=>(a.openBlock(),a.createElementBlock("div",{style:{position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px","z-index":"200000","box-sizing":"border-box",height:"100vh",width:"100vw","background-color":"rgb(0 0 0 / 0.75)",padding:"2rem"},onClick:s},[a.createElementVNode("iframe",{ref_key:"iframeElement",ref:n,class:"bg-white w-full h-full"},null,512)]))}},vn={__name:"SpladeApp",props:{el:{type:[String,Object],required:!1,default:""},components:{type:String,required:!1,default:e=>{if(!g.isSsr){const t=lt(e.el)?document.getElementById(e.el):e.el;return JSON.parse(t.dataset.components)||""}}},initialHtml:{type:String,required:!1,default:e=>{if(!g.isSsr){const t=lt(e.el)?document.getElementById(e.el):e.el;return JSON.parse(t.dataset.html)||""}}},initialDynamics:{type:Object,required:!1,default:e=>{if(!g.isSsr){const t=lt(e.el)?document.getElementById(e.el):e.el;return JSON.parse(t.dataset.dynamics)||{}}}},initialSpladeData:{type:Object,required:!1,default:e=>{if(!g.isSsr){const t=lt(e.el)?document.getElementById(e.el):e.el;return JSON.parse(t.dataset.splade)||{}}}}},setup(e){const t=e;a.provide("stack",0);const r=a.ref(),n=a.ref([]),i=a.ref(null),o=a.ref(null),s=a.inject("$spladeOptions")||{},l=a.computed(()=>g.currentStack.value<1?[]:{filter:"blur(4px)","transition-property":"filter","transition-duration":"150ms","transition-timing-function":"cubic-bezier(0.4, 0, 0.2, 1)"});function u(){i.value=null}function c(d){n[d]=null,g.popStack()}function f(d){const p=document.createElement("meta");Y(d,(m,y)=>{p[y]=m}),document.getElementsByTagName("head")[0].appendChild(p)}function h(d){var m;let p="meta";Y(d,(y,w)=>{p=`${p}[${w}="${y}"]`}),(m=document.querySelector(p))==null||m.remove()}return g.setOnHead(d=>{var p;if(!g.isSsr){if(o.value===null)return o.value=d.meta;if(o.value.forEach(m=>{h(m)}),o.value=d.meta,document.title=d.title,d.meta.forEach(m=>{f(m)}),(p=document.querySelector('link[rel="canonical"]'))==null||p.remove(),d.canonical){const m=document.createElement("link");m.rel="canonical",m.href=d.canonical,document.getElementsByTagName("head")[0].appendChild(m)}}}),g.setOnHtml((d,p)=>{n.value=[],r.value=d,a.nextTick(()=>{g.isSsr||window.scrollTo(0,p),s.transform_anchors&&[...document.querySelectorAll("a")].forEach(m=>{m.href==""||m.href.charAt(0)=="#"||m.__vnode.dynamicProps===null&&(m.hasAttribute("download")||(m.onclick=function(y){y.preventDefault(),g.visit(m.href)}))})})}),g.setOnModal(function(d,p){n.value[g.currentStack.value]={html:d,type:p}}),g.setOnServerError(function(d){i.value=d}),g.init(t.initialHtml,t.initialDynamics,t.initialSpladeData),(d,p)=>(a.openBlock(),a.createElementBlock("div",null,[a.unref(g).isSsr?(a.openBlock(),a.createBlock(Z,{key:`visit.${a.unref(g).pageVisitId.value}`,style:a.normalizeStyle(a.unref(l)),html:r.value},null,8,["style","html"])):(a.openBlock(),a.createBlock(a.KeepAlive,{key:0,max:a.unref(s).max_keep_alive},[(a.openBlock(),a.createBlock(Z,{key:`visit.${a.unref(g).pageVisitId.value}`,style:a.normalizeStyle(a.unref(l)),html:r.value},null,8,["style","html"]))],1032,["max"])),a.createVNode(Z,{html:e.components},null,8,["html"]),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(g).currentStack.value,m=>(a.openBlock(),a.createBlock(Z,{key:`modal.${m}`,type:n.value[m].type,html:n.value[m].html,stack:m,"on-top-of-stack":a.unref(g).currentStack.value===m,onClose:y=>c(m)},null,8,["type","html","stack","on-top-of-stack","onClose"]))),128)),i.value?(a.openBlock(),a.createBlock(Ha,{key:2,html:i.value,onClose:u},null,8,["html"])):a.createCommentVNode("",!0)]))}};function Ua(e){return()=>a.h(vn,e)}var Wa=Object.prototype,za=Wa.hasOwnProperty;function Ga(e,t){return e!=null&&za.call(e,t)}var Ka="[object Symbol]";function ut(e){return typeof e=="symbol"||le(e)&&se(e)==Ka}var Xa=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Qa=/^\w*$/;function Kt(e,t){if(j(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||ut(e)?!0:Qa.test(e)||!Xa.test(e)||t!=null&&e in Object(t)}var Ya=G["__core-js_shared__"];const Xt=Ya;var yn=function(){var e=/[^.]+$/.exec(Xt&&Xt.keys&&Xt.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Ja(e){return!!yn&&yn in e}var Za=Function.prototype,es=Za.toString;function ge(e){if(e!=null){try{return es.call(e)}catch{}try{return e+""}catch{}}return""}var ts=/[\\^$.*+?()[\]{}|]/g,rs=/^\[object .+?Constructor\]$/,ns=Function.prototype,is=Object.prototype,os=ns.toString,as=is.hasOwnProperty,ss=RegExp("^"+os.call(as).replace(ts,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ls(e){if(!K(e)||Ja(e))return!1;var t=en(e)?ss:rs;return t.test(ge(e))}function us(e,t){return e==null?void 0:e[t]}function ve(e,t){var r=us(e,t);return ls(r)?r:void 0}var cs=ve(Object,"create");const Ue=cs;function fs(){this.__data__=Ue?Ue(null):{},this.size=0}function ds(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var ps="__lodash_hash_undefined__",hs=Object.prototype,ms=hs.hasOwnProperty;function gs(e){var t=this.__data__;if(Ue){var r=t[e];return r===ps?void 0:r}return ms.call(t,e)?t[e]:void 0}var vs=Object.prototype,ys=vs.hasOwnProperty;function bs(e){var t=this.__data__;return Ue?t[e]!==void 0:ys.call(t,e)}var ws="__lodash_hash_undefined__";function Ss(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Ue&&t===void 0?ws:t,this}function ye(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t-1}function As(e,t){var r=this.__data__,n=ct(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function ee(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t`"${i}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,U),n}var pt=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(pt||{}),ce=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(ce||{});function R({visible:e=!0,features:t=0,ourProps:r,theirProps:n,...i}){var o;let s=Ws(n,r),l=Object.assign(i,{props:s});if(e||t&2&&s.static)return er(l);if(t&1){let u=(o=s.unmount)==null||o?0:1;return U(u,{[0](){return null},[1](){return er({...i,props:{...s,hidden:!0,style:{display:"none"}}})}})}return er(l)}function er({props:e,attrs:t,slots:r,slot:n,name:i}){var o;let{as:s,...l}=En(e,["unmount","static"]),u=(o=r.default)==null?void 0:o.call(r,n),c={};if(n){let f=!1,h=[];for(let[d,p]of Object.entries(n))typeof p=="boolean"&&(f=!0),p===!0&&h.push(d);f&&(c["data-headlessui-state"]=h.join(" "))}if(s==="template"){if(u=$n(u!=null?u:[]),Object.keys(l).length>0||Object.keys(t).length>0){let[f,...h]=u!=null?u:[];if(!zs(f)||h.length>0)throw new Error(['Passing props on "template"!',"",`The current component <${i} /> is rendering a "template".`,"However we need to passthrough the following props:",Object.keys(l).concat(Object.keys(t)).sort((d,p)=>d.localeCompare(p)).map(d=>` - ${d}`).join(` +`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".',"Render a single element as the child so that we can forward the props onto that element."].map(d=>` - ${d}`).join(` `)].join(` -`));return a.cloneVNode(f,Object.assign({},l,c))}return Array.isArray(u)&&u.length===1?u[0]:u}return a.h(s,Object.assign({},l,c),u)}function $n(e){return e.flatMap(t=>t.type===a.Fragment?$n(t.children):[t])}function Ws(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},r={};for(let n of e)for(let i in n)i.startsWith("on")&&typeof n[i]=="function"?(r[i]!=null||(r[i]=[]),r[i].push(n[i])):t[i]=n[i];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(r).map(n=>[n,void 0])));for(let n in r)Object.assign(t,{[n](i,...o){let s=r[n];for(let l of s){if(i instanceof Event&&i.defaultPrevented)return;l(i,...o)}}});return t}function En(e,t=[]){let r=Object.assign({},e);for(let n of t)n in r&&delete r[n];return r}function zs(e){return e==null?!1:typeof e.type=="string"||typeof e.type=="object"||typeof e.type=="function"}let Gs=0;function Ks(){return++Gs}function be(){return Ks()}var _n=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(_n||{});function te(e){var t;return e==null||e.value==null?null:(t=e.value.$el)!=null?t:e.value}let Tn=Symbol("Context");var we=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(we||{});function Xs(){return tr()!==null}function tr(){return a.inject(Tn,null)}function Qs(e){a.provide(Tn,e)}const ht=typeof window>"u"||typeof document>"u";function ke(e){if(ht)return null;if(e instanceof Node)return e.ownerDocument;if(e!=null&&e.hasOwnProperty("value")){let t=te(e);if(t)return t.ownerDocument}return document}let rr=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var Ge=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(Ge||{}),xn=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(xn||{}),Ys=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(Ys||{});function Js(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(rr))}var An=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(An||{});function Zs(e,t=0){var r;return e===((r=ke(e))==null?void 0:r.body)?!1:U(t,{[0](){return e.matches(rr)},[1](){let n=e;for(;n!==null;){if(n.matches(rr))return!0;n=n.parentElement}return!1}})}function Ke(e){e==null||e.focus({preventScroll:!0})}let el=["textarea","input"].join(",");function tl(e){var t,r;return(r=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,el))!=null?r:!1}function rl(e,t=r=>r){return e.slice().sort((r,n)=>{let i=t(r),o=t(n);if(i===null||o===null)return 0;let s=i.compareDocumentPosition(o);return s&Node.DOCUMENT_POSITION_FOLLOWING?-1:s&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function nr(e,t,r=!0,n=null){var i;let o=(i=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e==null?void 0:e.ownerDocument)!=null?i:document,s=Array.isArray(e)?r?rl(e):e:Js(e);n=n!=null?n:o.activeElement;let l=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,s.indexOf(n))-1;if(t&4)return Math.max(0,s.indexOf(n))+1;if(t&8)return s.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=t&32?{preventScroll:!0}:{},f=0,d=s.length,h;do{if(f>=d||f+d<=0)return 0;let p=u+f;if(t&16)p=(p+d)%d;else{if(p<0)return 3;if(p>=d)return 1}h=s[p],h==null||h.focus(c),f+=l}while(h!==o.activeElement);return t&6&&tl(h)&&h.select(),h.hasAttribute("tabindex")||h.setAttribute("tabindex","0"),2}function ir(e,t,r){ht||a.watchEffect(n=>{document.addEventListener(e,t,r),n(()=>document.removeEventListener(e,t,r))})}function nl(e,t,r=a.computed(()=>!0)){function n(o,s){if(!r.value||o.defaultPrevented)return;let l=s(o);if(l===null||!l.ownerDocument.documentElement.contains(l))return;let u=function c(f){return typeof f=="function"?c(f()):Array.isArray(f)||f instanceof Set?f:[f]}(e);for(let c of u){if(c===null)continue;let f=c instanceof HTMLElement?c:te(c);if(f!=null&&f.contains(l))return}return!Zs(l,An.Loose)&&l.tabIndex!==-1&&o.preventDefault(),t(o,l)}let i=a.ref(null);ir("mousedown",o=>{var s,l;r.value&&(i.value=((l=(s=o.composedPath)==null?void 0:s.call(o))==null?void 0:l[0])||o.target)},!0),ir("click",o=>{!i.value||(n(o,()=>i.value),i.value=null)},!0),ir("blur",o=>n(o,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}var mt=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(mt||{});let or=a.defineComponent({name:"Hidden",props:{as:{type:[Object,String],default:"div"},features:{type:Number,default:1}},setup(e,{slots:t,attrs:r}){return()=>{let{features:n,...i}=e,o={"aria-hidden":(n&2)===2?!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 R({ourProps:o,theirProps:i,slot:{},attrs:r,slots:t,name:"Hidden"})}}});function il(e,t,r){ht||a.watchEffect(n=>{window.addEventListener(e,t,r),n(()=>window.removeEventListener(e,t,r))})}var ar=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(ar||{});function ol(){let e=a.ref(0);return il("keydown",t=>{t.key==="Tab"&&(e.value=t.shiftKey?1:0)}),e}function In(e,t,r,n){ht||a.watchEffect(i=>{e=e!=null?e:window,e.addEventListener(t,r,n),i(()=>e.removeEventListener(t,r,n))})}function al(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}var Pn=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(Pn||{});let Xe=Object.assign(a.defineComponent({name:"FocusTrap",props:{as:{type:[Object,String],default:"div"},initialFocus:{type:Object,default:null},features:{type:Number,default:30},containers:{type:Object,default:a.ref(new Set)}},inheritAttrs:!1,setup(e,{attrs:t,slots:r,expose:n}){let i=a.ref(null);n({el:i,$el:i});let o=a.computed(()=>ke(i));sl({ownerDocument:o},a.computed(()=>Boolean(e.features&16)));let s=ll({ownerDocument:o,container:i,initialFocus:a.computed(()=>e.initialFocus)},a.computed(()=>Boolean(e.features&2)));ul({ownerDocument:o,container:i,containers:e.containers,previousActiveElement:s},a.computed(()=>Boolean(e.features&8)));let l=ol();function u(){let c=te(i);!c||U(l.value,{[ar.Forwards]:()=>nr(c,Ge.First),[ar.Backwards]:()=>nr(c,Ge.Last)})}return()=>{let c={},f={ref:i},{features:d,initialFocus:h,containers:p,...v}=e;return a.h(a.Fragment,[Boolean(d&4)&&a.h(or,{as:"button",type:"button",onFocus:u,features:mt.Focusable}),R({ourProps:f,theirProps:{...t,...v},slot:c,attrs:t,slots:r,name:"FocusTrap"}),Boolean(d&4)&&a.h(or,{as:"button",type:"button",onFocus:u,features:mt.Focusable})])}}}),{features:Pn});function sl({ownerDocument:e},t){let r=a.ref(null);function n(){var o;r.value||(r.value=(o=e.value)==null?void 0:o.activeElement)}function i(){!r.value||(Ke(r.value),r.value=null)}a.onMounted(()=>{a.watch(t,(o,s)=>{o!==s&&(o?n():i())},{immediate:!0})}),a.onUnmounted(i)}function ll({ownerDocument:e,container:t,initialFocus:r},n){let i=a.ref(null),o=a.ref(!1);return a.onMounted(()=>o.value=!0),a.onUnmounted(()=>o.value=!1),a.onMounted(()=>{a.watch([t,r,n],(s,l)=>{if(s.every((c,f)=>(l==null?void 0:l[f])===c)||!n.value)return;let u=te(t);!u||al(()=>{var c,f;if(!o.value)return;let d=te(r),h=(c=e.value)==null?void 0:c.activeElement;if(d){if(d===h){i.value=h;return}}else if(u.contains(h)){i.value=h;return}d?Ke(d):nr(u,Ge.First|Ge.NoScroll)===xn.Error&&console.warn("There are no focusable elements inside the "),i.value=(f=e.value)==null?void 0:f.activeElement})},{immediate:!0,flush:"post"})}),i}function ul({ownerDocument:e,container:t,containers:r,previousActiveElement:n},i){var o;In((o=e.value)==null?void 0:o.defaultView,"focus",s=>{if(!i.value)return;let l=new Set(r==null?void 0:r.value);l.add(t);let u=n.value;if(!u)return;let c=s.target;c&&c instanceof HTMLElement?cl(l,c)?(n.value=c,Ke(c)):(s.preventDefault(),s.stopPropagation(),Ke(u)):Ke(n.value)},!0)}function cl(e,t){var r;for(let n of e)if((r=n.value)!=null&&r.contains(t))return!0;return!1}let Cn="body > *",Be=new Set,fe=new Map;function kn(e){e.setAttribute("aria-hidden","true"),e.inert=!0}function Bn(e){let t=fe.get(e);!t||(t["aria-hidden"]===null?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",t["aria-hidden"]),e.inert=t.inert)}function fl(e,t=a.ref(!0)){a.watchEffect(r=>{if(!t.value||!e.value)return;let n=e.value,i=ke(n);if(i){Be.add(n);for(let o of fe.keys())o.contains(n)&&(Bn(o),fe.delete(o));i.querySelectorAll(Cn).forEach(o=>{if(o instanceof HTMLElement){for(let s of Be)if(o.contains(s))return;Be.size===1&&(fe.set(o,{"aria-hidden":o.getAttribute("aria-hidden"),inert:o.inert}),kn(o))}}),r(()=>{if(Be.delete(n),Be.size>0)i.querySelectorAll(Cn).forEach(o=>{if(o instanceof HTMLElement&&!fe.has(o)){for(let s of Be)if(o.contains(s))return;fe.set(o,{"aria-hidden":o.getAttribute("aria-hidden"),inert:o.inert}),kn(o)}});else for(let o of fe.keys())Bn(o),fe.delete(o)})}})}let Dn=Symbol("ForcePortalRootContext");function dl(){return a.inject(Dn,!1)}let sr=a.defineComponent({name:"ForcePortalRoot",props:{as:{type:[Object,String],default:"template"},force:{type:Boolean,default:!1}},setup(e,{slots:t,attrs:r}){return a.provide(Dn,e.force),()=>{let{force:n,...i}=e;return R({theirProps:i,ourProps:{},slot:{},slots:t,attrs:r,name:"ForcePortalRoot"})}}});function pl(e){let t=ke(e);if(!t){if(e===null)return null;throw new Error(`[Headless UI]: Cannot find ownerDocument for contextElement: ${e}`)}let r=t.getElementById("headlessui-portal-root");if(r)return r;let n=t.createElement("div");return n.setAttribute("id","headlessui-portal-root"),t.body.appendChild(n)}let jn=a.defineComponent({name:"Portal",props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:r}){let n=a.ref(null),i=a.computed(()=>ke(n)),o=dl(),s=a.inject(qn,null),l=a.ref(o===!0||s==null?pl(n.value):s.resolveTarget());return a.watchEffect(()=>{o||s!=null&&(l.value=s.resolveTarget())}),a.onUnmounted(()=>{var u,c;let f=(u=i.value)==null?void 0:u.getElementById("headlessui-portal-root");!f||l.value===f&&l.value.children.length<=0&&((c=l.value.parentElement)==null||c.removeChild(l.value))}),()=>{if(l.value===null)return null;let u={ref:n,"data-headlessui-portal":""};return a.h(a.Teleport,{to:l.value},R({ourProps:u,theirProps:e,slot:{},attrs:r,slots:t,name:"Portal"}))}}}),qn=Symbol("PortalGroupContext"),hl=a.defineComponent({name:"PortalGroup",props:{as:{type:[Object,String],default:"template"},target:{type:Object,default:null}},setup(e,{attrs:t,slots:r}){let n=a.reactive({resolveTarget(){return e.target}});return a.provide(qn,n),()=>{let{target:i,...o}=e;return R({theirProps:o,ourProps:{},slot:{},attrs:t,slots:r,name:"PortalGroup"})}}}),Ln=Symbol("StackContext");var lr=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(lr||{});function ml(){return a.inject(Ln,()=>{})}function gl({type:e,enabled:t,element:r,onUpdate:n}){let i=ml();function o(...s){n==null||n(...s),i(...s)}a.onMounted(()=>{a.watch(t,(s,l)=>{s?o(0,e,r):l===!0&&o(1,e,r)},{immediate:!0,flush:"sync"})}),a.onUnmounted(()=>{t.value&&o(1,e,r)}),a.provide(Ln,o)}let Fn=Symbol("DescriptionContext");function vl(){let e=a.inject(Fn,null);if(e===null)throw new Error("Missing parent");return e}function yl({slot:e=a.ref({}),name:t="Description",props:r={}}={}){let n=a.ref([]);function i(o){return n.value.push(o),()=>{let s=n.value.indexOf(o);s!==-1&&n.value.splice(s,1)}}return a.provide(Fn,{register:i,slot:e,name:t,props:r}),a.computed(()=>n.value.length>0?n.value.join(" "):void 0)}let bl=a.defineComponent({name:"Description",props:{as:{type:[Object,String],default:"p"}},setup(e,{attrs:t,slots:r}){let n=vl(),i=`headlessui-description-${be()}`;return a.onMounted(()=>a.onUnmounted(n.register(i))),()=>{let{name:o="Description",slot:s=a.ref({}),props:l={}}=n,u=e,c={...Object.entries(l).reduce((f,[d,h])=>Object.assign(f,{[d]:a.unref(h)}),{}),id:i};return R({ourProps:c,theirProps:u,slot:s.value,attrs:t,slots:r,name:o})}}});function ur(){let e=[],t=[],r={enqueue(n){t.push(n)},addEventListener(n,i,o,s){return n.addEventListener(i,o,s),r.add(()=>n.removeEventListener(i,o,s))},requestAnimationFrame(...n){let i=requestAnimationFrame(...n);r.add(()=>cancelAnimationFrame(i))},nextFrame(...n){r.requestAnimationFrame(()=>{r.requestAnimationFrame(...n)})},setTimeout(...n){let i=setTimeout(...n);r.add(()=>clearTimeout(i))},add(n){e.push(n)},dispose(){for(let n of e.splice(0))n()},async workQueue(){for(let n of t.splice(0))await n()}};return r}function wl(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}var Sl=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Sl||{});let cr=Symbol("DialogContext");function Qe(e){let t=a.inject(cr,null);if(t===null){let r=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Qe),r}return t}let gt="DC8F892D-2EBD-447C-A4C8-A03058436FF4",fr=a.defineComponent({name:"Dialog",inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},open:{type:[Boolean,String],default:gt},initialFocus:{type:Object,default:null}},emits:{close:e=>!0},setup(e,{emit:t,attrs:r,slots:n,expose:i}){var o;let s=a.ref(!1);a.onMounted(()=>{s.value=!0});let l=a.ref(0),u=tr(),c=a.computed(()=>e.open===gt&&u!==null?U(u.value,{[we.Open]:!0,[we.Closed]:!1}):e.open),f=a.ref(new Set),d=a.ref(null),h=a.ref(null),p=a.computed(()=>ke(d));if(i({el:d,$el:d}),!(e.open!==gt||u!==null))throw new Error("You forgot to provide an `open` prop to the `Dialog`.");if(typeof c.value!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${c.value===gt?void 0:e.open}`);let v=a.computed(()=>s.value&&c.value?0:1),b=a.computed(()=>v.value===0),w=a.computed(()=>l.value>1),x=a.inject(cr,null)!==null,A=a.computed(()=>w.value?"parent":"leaf");fl(d,a.computed(()=>w.value?b.value:!1)),gl({type:"Dialog",enabled:a.computed(()=>v.value===0),element:d,onUpdate:(y,S,_)=>{if(S==="Dialog")return U(y,{[lr.Add](){f.value.add(_),l.value+=1},[lr.Remove](){f.value.delete(_),l.value-=1}})}});let I=yl({name:"DialogDescription",slot:a.computed(()=>({open:c.value}))}),E=`headlessui-dialog-${be()}`,O=a.ref(null),g={titleId:O,panelRef:a.ref(null),dialogState:v,setTitleId(y){O.value!==y&&(O.value=y)},close(){t("close",!1)}};return a.provide(cr,g),nl(()=>{var y,S,_;return[...Array.from((S=(y=p.value)==null?void 0:y.querySelectorAll("body > *, [data-headlessui-portal]"))!=null?S:[]).filter(T=>!(!(T instanceof HTMLElement)||T.contains(te(h))||g.panelRef.value&&T.contains(g.panelRef.value))),(_=g.panelRef.value)!=null?_:d.value]},(y,S)=>{g.close(),a.nextTick(()=>S==null?void 0:S.focus())},a.computed(()=>v.value===0&&!w.value)),In((o=p.value)==null?void 0:o.defaultView,"keydown",y=>{y.defaultPrevented||y.key===_n.Escape&&v.value===0&&(w.value||(y.preventDefault(),y.stopPropagation(),g.close()))}),a.watchEffect(y=>{var S;if(v.value!==0||x)return;let _=p.value;if(!_)return;let T=ur();function $(q,M,L){let F=q.style.getPropertyValue(M);return Object.assign(q.style,{[M]:L}),T.add(()=>{Object.assign(q.style,{[M]:F})})}let C=_==null?void 0:_.documentElement,D=((S=_.defaultView)!=null?S:window).innerWidth-C.clientWidth;if($(C,"overflow","hidden"),D>0){let q=C.clientWidth-C.offsetWidth,M=D-q;$(C,"paddingRight",`${M}px`)}if(wl()){let q=window.pageYOffset;$(C,"position","fixed"),$(C,"marginTop",`-${q}px`),$(C,"width","100%"),T.add(()=>window.scrollTo(0,q))}y(T.dispose)}),a.watchEffect(y=>{if(v.value!==0)return;let S=te(d);if(!S)return;let _=new IntersectionObserver(T=>{for(let $ of T)$.boundingClientRect.x===0&&$.boundingClientRect.y===0&&$.boundingClientRect.width===0&&$.boundingClientRect.height===0&&g.close()});_.observe(S),y(()=>_.disconnect())}),()=>{let y={...r,ref:d,id:E,role:"dialog","aria-modal":v.value===0?!0:void 0,"aria-labelledby":O.value,"aria-describedby":I.value},{open:S,initialFocus:_,...T}=e,$={open:v.value===0};return a.h(sr,{force:!0},()=>[a.h(jn,()=>a.h(hl,{target:d.value},()=>a.h(sr,{force:!1},()=>a.h(Xe,{initialFocus:_,containers:f,features:b.value?U(A.value,{parent:Xe.features.RestoreFocus,leaf:Xe.features.All&~Xe.features.FocusLock}):Xe.features.None},()=>R({ourProps:y,theirProps:T,slot:$,attrs:r,slots:n,visible:v.value===0,features:pt.RenderStrategy|pt.Static,name:"Dialog"}))))),a.h(or,{features:mt.Hidden,ref:h})])}}});a.defineComponent({name:"DialogOverlay",props:{as:{type:[Object,String],default:"div"}},setup(e,{attrs:t,slots:r}){let n=Qe("DialogOverlay"),i=`headlessui-dialog-overlay-${be()}`;function o(s){s.target===s.currentTarget&&(s.preventDefault(),s.stopPropagation(),n.close())}return()=>R({ourProps:{id:i,"aria-hidden":!0,onClick:o},theirProps:e,slot:{open:n.dialogState.value===0},attrs:t,slots:r,name:"DialogOverlay"})}}),a.defineComponent({name:"DialogBackdrop",props:{as:{type:[Object,String],default:"div"}},inheritAttrs:!1,setup(e,{attrs:t,slots:r,expose:n}){let i=Qe("DialogBackdrop"),o=`headlessui-dialog-backdrop-${be()}`,s=a.ref(null);return n({el:s,$el:s}),a.onMounted(()=>{if(i.panelRef.value===null)throw new Error("A component is being used, but a component is missing.")}),()=>{let l=e,u={id:o,ref:s,"aria-hidden":!0};return a.h(sr,{force:!0},()=>a.h(jn,()=>R({ourProps:u,theirProps:{...t,...l},slot:{open:i.dialogState.value===0},attrs:t,slots:r,name:"DialogBackdrop"})))}}});let dr=a.defineComponent({name:"DialogPanel",props:{as:{type:[Object,String],default:"div"}},setup(e,{attrs:t,slots:r,expose:n}){let i=Qe("DialogPanel"),o=`headlessui-dialog-panel-${be()}`;n({el:i.panelRef,$el:i.panelRef});function s(l){l.stopPropagation()}return()=>{let l={id:o,ref:i.panelRef,onClick:s};return R({ourProps:l,theirProps:e,slot:{open:i.dialogState.value===0},attrs:t,slots:r,name:"DialogPanel"})}}});a.defineComponent({name:"DialogTitle",props:{as:{type:[Object,String],default:"h2"}},setup(e,{attrs:t,slots:r}){let n=Qe("DialogTitle"),i=`headlessui-dialog-title-${be()}`;return a.onMounted(()=>{n.setTitleId(i),a.onUnmounted(()=>n.setTitleId(null))}),()=>R({ourProps:{id:i},theirProps:e,slot:{open:n.dialogState.value===0},attrs:t,slots:r,name:"DialogTitle"})}});function Ol(e){let t={called:!1};return(...r)=>{if(!t.called)return t.called=!0,e(...r)}}function pr(e,...t){e&&t.length>0&&e.classList.add(...t)}function vt(e,...t){e&&t.length>0&&e.classList.remove(...t)}var hr=(e=>(e.Finished="finished",e.Cancelled="cancelled",e))(hr||{});function $l(e,t){let r=ur();if(!e)return r.dispose;let{transitionDuration:n,transitionDelay:i}=getComputedStyle(e),[o,s]=[n,i].map(l=>{let[u=0]=l.split(",").filter(Boolean).map(c=>c.includes("ms")?parseFloat(c):parseFloat(c)*1e3).sort((c,f)=>f-c);return u});return o!==0?r.setTimeout(()=>t("finished"),o+s):t("finished"),r.add(()=>t("cancelled")),r.dispose}function Mn(e,t,r,n,i,o){let s=ur(),l=o!==void 0?Ol(o):()=>{};return vt(e,...i),pr(e,...t,...r),s.nextFrame(()=>{vt(e,...r),pr(e,...n),s.add($l(e,u=>(vt(e,...n,...t),pr(e,...i),l(u))))}),s.add(()=>vt(e,...t,...r,...n,...i)),s.add(()=>l("cancelled")),s.dispose}function Se(e=""){return e.split(" ").filter(t=>t.trim().length>1)}let mr=Symbol("TransitionContext");var El=(e=>(e.Visible="visible",e.Hidden="hidden",e))(El||{});function _l(){return a.inject(mr,null)!==null}function Tl(){let e=a.inject(mr,null);if(e===null)throw new Error("A is used but it is missing a parent .");return e}function xl(){let e=a.inject(gr,null);if(e===null)throw new Error("A is used but it is missing a parent .");return e}let gr=Symbol("NestingContext");function yt(e){return"children"in e?yt(e.children):e.value.filter(({state:t})=>t==="visible").length>0}function Rn(e){let t=a.ref([]),r=a.ref(!1);a.onMounted(()=>r.value=!0),a.onUnmounted(()=>r.value=!1);function n(o,s=ce.Hidden){let l=t.value.findIndex(({id:u})=>u===o);l!==-1&&(U(s,{[ce.Unmount](){t.value.splice(l,1)},[ce.Hidden](){t.value[l].state="hidden"}}),!yt(t)&&r.value&&(e==null||e()))}function i(o){let s=t.value.find(({id:l})=>l===o);return s?s.state!=="visible"&&(s.state="visible"):t.value.push({id:o,state:"visible"}),()=>n(o,ce.Unmount)}return{children:t,register:i,unregister:n}}let Nn=pt.RenderStrategy,De=a.defineComponent({props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},entered:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:t,attrs:r,slots:n,expose:i}){if(!_l()&&Xs())return()=>a.h(je,{...e,onBeforeEnter:()=>t("beforeEnter"),onAfterEnter:()=>t("afterEnter"),onBeforeLeave:()=>t("beforeLeave"),onAfterLeave:()=>t("afterLeave")},n);let o=a.ref(null),s=a.ref("visible"),l=a.computed(()=>e.unmount?ce.Unmount:ce.Hidden);i({el:o,$el:o});let{show:u,appear:c}=Tl(),{register:f,unregister:d}=xl(),h={value:!0},p=be(),v={value:!1},b=Rn(()=>{v.value||(s.value="hidden",d(p),t("afterLeave"))});a.onMounted(()=>{let S=f(p);a.onUnmounted(S)}),a.watchEffect(()=>{if(l.value===ce.Hidden&&!!p){if(u&&s.value!=="visible"){s.value="visible";return}U(s.value,{hidden:()=>d(p),visible:()=>f(p)})}});let w=Se(e.enter),x=Se(e.enterFrom),A=Se(e.enterTo),I=Se(e.entered),E=Se(e.leave),O=Se(e.leaveFrom),g=Se(e.leaveTo);a.onMounted(()=>{a.watchEffect(()=>{if(s.value==="visible"){let S=te(o);if(S instanceof Comment&&S.data==="")throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}})});function y(S){let _=h.value&&!c.value,T=te(o);!T||!(T instanceof HTMLElement)||_||(v.value=!0,u.value&&t("beforeEnter"),u.value||t("beforeLeave"),S(u.value?Mn(T,w,x,A,I,$=>{v.value=!1,$===hr.Finished&&t("afterEnter")}):Mn(T,E,O,g,I,$=>{v.value=!1,$===hr.Finished&&(yt(b)||(s.value="hidden",d(p),t("afterLeave")))})))}return a.onMounted(()=>{a.watch([u],(S,_,T)=>{y(T),h.value=!1},{immediate:!0})}),a.provide(gr,b),Qs(a.computed(()=>U(s.value,{visible:we.Open,hidden:we.Closed}))),()=>{let{appear:S,show:_,enter:T,enterFrom:$,enterTo:C,entered:D,leave:q,leaveFrom:M,leaveTo:L,...F}=e;return R({theirProps:F,ourProps:{ref:o},slot:{},slots:n,attrs:r,features:Nn,visible:s.value==="visible",name:"TransitionChild"})}}}),Al=De,je=a.defineComponent({inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},entered:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:t,attrs:r,slots:n}){let i=tr(),o=a.computed(()=>e.show===null&&i!==null?U(i.value,{[we.Open]:!0,[we.Closed]:!1}):e.show);a.watchEffect(()=>{if(![!0,!1].includes(o.value))throw new Error('A is used but it is missing a `:show="true | false"` prop.')});let s=a.ref(o.value?"visible":"hidden"),l=Rn(()=>{s.value="hidden"}),u=a.ref(!0),c={show:o,appear:a.computed(()=>e.appear||!u.value)};return a.onMounted(()=>{a.watchEffect(()=>{u.value=!1,o.value?s.value="visible":yt(l)||(s.value="hidden")})}),a.provide(gr,l),a.provide(mr,c),()=>{let f=En(e,["show","appear","unmount","onBeforeEnter","onBeforeLeave","onAfterEnter","onAfterLeave"]),d={unmount:e.unmount};return R({ourProps:{...d,as:"template"},theirProps:{},slot:{},slots:{...n,default:()=>[a.h(Al,{onBeforeEnter:()=>t("beforeEnter"),onAfterEnter:()=>t("afterEnter"),onBeforeLeave:()=>t("beforeLeave"),onAfterLeave:()=>t("afterLeave"),...r,...d,...f},n.default)]},attrs:{},features:Nn,visible:s.value==="visible",name:"Transition"})}}});const Il={props:{defaultTitle:{type:String,required:!1,default:""},defaultText:{type:String,required:!1,default:""},defaultConfirmButton:{type:String,required:!1,default:""},defaultCancelButton:{type:String,required:!1,default:""}},data(){return{isOpen:!1}},computed:{hasConfirmModal:()=>!!m.confirmModal.value,title:function(){var e;return(e=m.confirmModal.value)!=null&&e.title?m.confirmModal.value.title:this.defaultTitle},text:function(){var e;return(e=m.confirmModal.value)!=null&&e.text?m.confirmModal.value.text:this.defaultText},confirmButton:function(){var e;return(e=m.confirmModal.value)!=null&&e.confirmButton?m.confirmModal.value.confirmButton:this.defaultConfirmButton},cancelButton:function(){var e;return(e=m.confirmModal.value)!=null&&e.cancelButton?m.confirmModal.value.cancelButton:this.defaultCancelButton}},watch:{hasConfirmModal(e){e&&(this.isOpen=!0)}},methods:{cancel(){m.confirmModal.value.rejectPromise(),this.setIsOpen(!1)},confirm(){m.confirmModal.value.resolvePromise(),this.setIsOpen(!1)},setIsOpen(e){this.isOpen=e},emitClose(){m.clearConfirmModal()}},render(){return this.$slots.default({title:this.title,text:this.text,confirmButton:this.confirmButton,cancelButton:this.cancelButton,isOpen:this.isOpen,setIsOpen:this.setIsOpen,cancel:this.cancel,confirm:this.confirm,emitClose:this.emitClose,Dialog:fr,DialogPanel:dr,TransitionRoot:je,TransitionChild:De})}};function Vn(e,t){t=Zt(t,e);for(var r=0,n=t.length;e!=null&&r({}),required:!1},remember:{type:String,default:null,required:!1},localStorage:{type:Boolean,default:!1,required:!1}},data(){return{values:{}}},mounted(){if(this.remember){let e=m.restore(this.remember,this.localStorage);e||(e={}),this.values=Object.assign({},{...this.default,...e})}else this.values=Object.assign({},{...this.default})},updated(){this.remember&&m.remember(this.remember,{...this.values},this.localStorage)},render(){const e=this;return this.$slots.default(new Proxy(this.values,{ownKeys(){return Object.keys(e.values)},get(t,r){return vr(e.values,r)},set(t,r,n){Wn(e.values,r,n)}}))}};var ql=function(){return G.Date.now()};const yr=ql;var Ll=/\s/;function Fl(e){for(var t=e.length;t--&&Ll.test(e.charAt(t)););return t}var Ml=/^\s+/;function Rl(e){return e&&e.slice(0,Fl(e)+1).replace(Ml,"")}var zn=0/0,Nl=/^[-+]0x[0-9a-f]+$/i,Vl=/^0b[01]+$/i,Hl=/^0o[0-7]+$/i,Ul=parseInt;function br(e){if(typeof e=="number")return e;if(ut(e))return zn;if(K(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=K(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Rl(e);var r=Vl.test(e);return r||Hl.test(e)?Ul(e.slice(2),r?2:8):Nl.test(e)?zn:+e}var Wl="Expected a function",zl=Math.max,Gl=Math.min;function wr(e,t,r){var n,i,o,s,l,u,c=0,f=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(Wl);t=br(t)||0,K(r)&&(f=!!r.leading,d="maxWait"in r,o=d?zl(br(r.maxWait)||0,t):o,h="trailing"in r?!!r.trailing:h);function p(g){var y=n,S=i;return n=i=void 0,c=g,s=e.apply(S,y),s}function v(g){return c=g,l=setTimeout(x,t),f?p(g):s}function b(g){var y=g-u,S=g-c,_=t-y;return d?Gl(_,o-S):_}function w(g){var y=g-u,S=g-c;return u===void 0||y>=t||y<0||d&&S>=o}function x(){var g=yr();if(w(g))return A(g);l=setTimeout(x,b(g))}function A(g){return l=void 0,h&&n?p(g):(n=i=void 0,s)}function I(){l!==void 0&&clearTimeout(l),c=0,n=u=i=l=void 0}function E(){return l===void 0?s:A(yr())}function O(){var g=yr(),y=w(g);if(n=arguments,i=this,u=g,y){if(l===void 0)return v(u);if(d)return clearTimeout(l),l=setTimeout(x,t),p(u)}return l===void 0&&(l=setTimeout(x,t)),s}return O.cancel=I,O.flush=E,O}const Kl={props:{url:{type:String,required:!0},method:{type:String,required:!1,default:"GET"},acceptHeader:{type:String,required:!1,default:"application/json"},poll:{type:Number,required:!1,default:null},default:{type:Object,required:!1,default:()=>({})},request:{type:Object,required:!1,default:()=>({})},manual:{type:Boolean,required:!1,default:!1},watchDebounce:{type:Number,required:!1,default:0},watchValue:{validator(){return!0},required:!1,default:null}},data(){return{response:Object.assign({},{...this.default}),processing:!1,debounceFunction:null}},watch:{watchValue:{deep:!0,handler(){this.processing=!0,this.watchDebounce?this.debounceFunction():this.performRequest()}}},mounted(){this.manual||this.$nextTick(this.performRequest)},created(){this.debounceFunction=wr(()=>{this.performRequest()},this.watchDebounce)},methods:{performRequest(){this.processing=!0;const e={url:this.url,method:this.method,headers:{Accept:this.acceptHeader}};Object.keys(this.request).length>0&&(e.data=this.request),Rr.default(e).then(t=>{this.response=t.data,this.processing=!1}).catch(()=>{this.processing=!1}),this.poll&&setTimeout(()=>{this.performRequest()},this.poll)}},render(){return this.$slots.default({processing:this.processing,response:this.response,reload:this.performRequest})}},Xl={data(){return{isActivated:!0}},deactivated(){this.isActivated=!1},activated(){this.isActivated=!0},render(){return this.$slots.default({Dialog:fr,DialogPanel:dr,isActivated:this.isActivated})}},Gn={__name:"OnClickOutside",props:{do:{type:Function,required:!0},opened:{type:Boolean,required:!0},closeOnEscape:{type:Boolean,required:!1,default:!0},ignoreInnerTargets:{type:Boolean,required:!1,default:!1}},setup(e){const t=e,r=a.ref(null),n=a.ref(null),i=a.ref(null);return a.onMounted(()=>{r.value=o=>{n.value.children[0].contains(o.target)||t.ignoreInnerTargets&&n.value.contains(o.target)||t.do()},document.addEventListener("click",r.value),document.addEventListener("touchstart",r.value),t.closeOnEscape&&(i.value=o=>{t.opened&&o.key==="Escape"&&t.do()},document.addEventListener("keydown",i.value))}),a.onBeforeUnmount(()=>{document.removeEventListener("click",r.value),document.removeEventListener("touchstart",r.value),t.closeOnEscape&&document.removeEventListener("keydown",i.value)}),(o,s)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"root",ref:n},[a.renderSlot(o.$slots,"default")],512))}};function V(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Oe(e){var t=V(e).Element;return e instanceof t||e instanceof Element}function H(e){var t=V(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Sr(e){if(typeof ShadowRoot>"u")return!1;var t=V(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}var $e=Math.max,bt=Math.min,qe=Math.round;function Or(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Kn(){return!/^((?!chrome|android).)*safari/i.test(Or())}function Le(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var n=e.getBoundingClientRect(),i=1,o=1;t&&H(e)&&(i=e.offsetWidth>0&&qe(n.width)/e.offsetWidth||1,o=e.offsetHeight>0&&qe(n.height)/e.offsetHeight||1);var s=Oe(e)?V(e):window,l=s.visualViewport,u=!Kn()&&r,c=(n.left+(u&&l?l.offsetLeft:0))/i,f=(n.top+(u&&l?l.offsetTop:0))/o,d=n.width/i,h=n.height/o;return{width:d,height:h,top:f,right:c+d,bottom:f+h,left:c,x:c,y:f}}function $r(e){var t=V(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function Ql(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Yl(e){return e===V(e)||!H(e)?$r(e):Ql(e)}function X(e){return e?(e.nodeName||"").toLowerCase():null}function de(e){return((Oe(e)?e.ownerDocument:e.document)||window.document).documentElement}function Er(e){return Le(de(e)).left+$r(e).scrollLeft}function W(e){return V(e).getComputedStyle(e)}function _r(e){var t=W(e),r=t.overflow,n=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)}function Jl(e){var t=e.getBoundingClientRect(),r=qe(t.width)/e.offsetWidth||1,n=qe(t.height)/e.offsetHeight||1;return r!==1||n!==1}function Zl(e,t,r){r===void 0&&(r=!1);var n=H(t),i=H(t)&&Jl(t),o=de(t),s=Le(e,i,r),l={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(n||!n&&!r)&&((X(t)!=="body"||_r(o))&&(l=Yl(t)),H(t)?(u=Le(t,!0),u.x+=t.clientLeft,u.y+=t.clientTop):o&&(u.x=Er(o))),{x:s.left+l.scrollLeft-u.x,y:s.top+l.scrollTop-u.y,width:s.width,height:s.height}}function Xn(e){var t=Le(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function wt(e){return X(e)==="html"?e:e.assignedSlot||e.parentNode||(Sr(e)?e.host:null)||de(e)}function Qn(e){return["html","body","#document"].indexOf(X(e))>=0?e.ownerDocument.body:H(e)&&_r(e)?e:Qn(wt(e))}function Ye(e,t){var r;t===void 0&&(t=[]);var n=Qn(e),i=n===((r=e.ownerDocument)==null?void 0:r.body),o=V(n),s=i?[o].concat(o.visualViewport||[],_r(n)?n:[]):n,l=t.concat(s);return i?l:l.concat(Ye(wt(s)))}function eu(e){return["table","td","th"].indexOf(X(e))>=0}function Yn(e){return!H(e)||W(e).position==="fixed"?null:e.offsetParent}function tu(e){var t=/firefox/i.test(Or()),r=/Trident/i.test(Or());if(r&&H(e)){var n=W(e);if(n.position==="fixed")return null}var i=wt(e);for(Sr(i)&&(i=i.host);H(i)&&["html","body"].indexOf(X(i))<0;){var o=W(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function St(e){for(var t=V(e),r=Yn(e);r&&eu(r)&&W(r).position==="static";)r=Yn(r);return r&&(X(r)==="html"||X(r)==="body"&&W(r).position==="static")?t:r||tu(e)||t}var z="top",Q="bottom",pe="right",re="left",Ot="auto",$t=[z,Q,pe,re],Fe="start",Je="end",ru="clippingParents",Jn="viewport",Ze="popper",nu="reference",Zn=$t.reduce(function(e,t){return e.concat([t+"-"+Fe,t+"-"+Je])},[]),iu=[].concat($t,[Ot]).reduce(function(e,t){return e.concat([t,t+"-"+Fe,t+"-"+Je])},[]),ou="beforeRead",au="read",su="afterRead",lu="beforeMain",uu="main",cu="afterMain",fu="beforeWrite",du="write",pu="afterWrite",Tr=[ou,au,su,lu,uu,cu,fu,du,pu];function hu(e){var t=new Map,r=new Set,n=[];e.forEach(function(o){t.set(o.name,o)});function i(o){r.add(o.name);var s=[].concat(o.requires||[],o.requiresIfExists||[]);s.forEach(function(l){if(!r.has(l)){var u=t.get(l);u&&i(u)}}),n.push(o)}return e.forEach(function(o){r.has(o.name)||i(o)}),n}function mu(e){var t=hu(e);return Tr.reduce(function(r,n){return r.concat(t.filter(function(i){return i.phase===n}))},[])}function gu(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function he(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n=0,n=r&&H(e)?St(e):e;return Oe(n)?t.filter(function(i){return Oe(i)&&$u(i,n)&&X(i)!=="body"}):[]}function Tu(e,t,r,n){var i=t==="clippingParents"?_u(e):[].concat(t),o=[].concat(i,[r]),s=o[0],l=o.reduce(function(u,c){var f=ti(e,c,n);return u.top=$e(f.top,u.top),u.right=bt(f.right,u.right),u.bottom=bt(f.bottom,u.bottom),u.left=$e(f.left,u.left),u},ti(e,s,n));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function Me(e){return e.split("-")[1]}function ri(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ni(e){var t=e.reference,r=e.element,n=e.placement,i=n?ne(n):null,o=n?Me(n):null,s=t.x+t.width/2-r.width/2,l=t.y+t.height/2-r.height/2,u;switch(i){case z:u={x:s,y:t.y-r.height};break;case Q:u={x:s,y:t.y+t.height};break;case pe:u={x:t.x+t.width,y:l};break;case re:u={x:t.x-r.width,y:l};break;default:u={x:t.x,y:t.y}}var c=i?ri(i):null;if(c!=null){var f=c==="y"?"height":"width";switch(o){case Fe:u[c]=u[c]-(t[f]/2-r[f]/2);break;case Je:u[c]=u[c]+(t[f]/2-r[f]/2);break}}return u}function ii(){return{top:0,right:0,bottom:0,left:0}}function xu(e){return Object.assign({},ii(),e)}function Au(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}function Ar(e,t){t===void 0&&(t={});var r=t,n=r.placement,i=n===void 0?e.placement:n,o=r.strategy,s=o===void 0?e.strategy:o,l=r.boundary,u=l===void 0?ru:l,c=r.rootBoundary,f=c===void 0?Jn:c,d=r.elementContext,h=d===void 0?Ze:d,p=r.altBoundary,v=p===void 0?!1:p,b=r.padding,w=b===void 0?0:b,x=xu(typeof w!="number"?w:Au(w,$t)),A=h===Ze?nu:Ze,I=e.rects.popper,E=e.elements[v?A:h],O=Tu(Oe(E)?E:E.contextElement||de(e.elements.popper),u,f,s),g=Le(e.elements.reference),y=ni({reference:g,element:I,strategy:"absolute",placement:i}),S=xr(Object.assign({},I,y)),_=h===Ze?S:g,T={top:O.top-_.top+x.top,bottom:_.bottom-O.bottom+x.bottom,left:O.left-_.left+x.left,right:_.right-O.right+x.right},$=e.modifiersData.offset;if(h===Ze&&$){var C=$[i];Object.keys(T).forEach(function(D){var q=[pe,Q].indexOf(D)>=0?1:-1,M=[z,Q].indexOf(D)>=0?"y":"x";T[D]+=C[M]*q})}return T}var oi="Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.",Iu="Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.",ai={placement:"bottom",modifiers:[],strategy:"absolute"};function si(){for(var e=arguments.length,t=new Array(e),r=0;r100)){console.error(Iu);break}if(f.reset===!0){f.reset=!1,O=-1;continue}var g=f.orderedModifiers[O],y=g.fn,S=g.options,_=S===void 0?{}:S,T=g.name;typeof y=="function"&&(f=y({state:f,options:_,name:T,instance:p})||f)}}},update:gu(function(){return new Promise(function(w){p.forceUpdate(),w(f)})}),destroy:function(){b(),h=!0}};if(!si(l,u))return process.env.NODE_ENV!=="production"&&console.error(oi),p;p.setOptions(c).then(function(w){!h&&c.onFirstUpdate&&c.onFirstUpdate(w)});function v(){f.orderedModifiers.forEach(function(w){var x=w.name,A=w.options,I=A===void 0?{}:A,E=w.effect;if(typeof E=="function"){var O=E({state:f,name:x,instance:p,options:I}),g=function(){};d.push(O||g)}})}function b(){d.forEach(function(w){return w()}),d=[]}return p}}var Et={passive:!0};function Cu(e){var t=e.state,r=e.instance,n=e.options,i=n.scroll,o=i===void 0?!0:i,s=n.resize,l=s===void 0?!0:s,u=V(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(f){f.addEventListener("scroll",r.update,Et)}),l&&u.addEventListener("resize",r.update,Et),function(){o&&c.forEach(function(f){f.removeEventListener("scroll",r.update,Et)}),l&&u.removeEventListener("resize",r.update,Et)}}const ku={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Cu,data:{}};function Bu(e){var t=e.state,r=e.name;t.modifiersData[r]=ni({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Du={name:"popperOffsets",enabled:!0,phase:"read",fn:Bu,data:{}};var ju={top:"auto",right:"auto",bottom:"auto",left:"auto"};function qu(e){var t=e.x,r=e.y,n=window,i=n.devicePixelRatio||1;return{x:qe(t*i)/i||0,y:qe(r*i)/i||0}}function li(e){var t,r=e.popper,n=e.popperRect,i=e.placement,o=e.variation,s=e.offsets,l=e.position,u=e.gpuAcceleration,c=e.adaptive,f=e.roundOffsets,d=e.isFixed,h=s.x,p=h===void 0?0:h,v=s.y,b=v===void 0?0:v,w=typeof f=="function"?f({x:p,y:b}):{x:p,y:b};p=w.x,b=w.y;var x=s.hasOwnProperty("x"),A=s.hasOwnProperty("y"),I=re,E=z,O=window;if(c){var g=St(r),y="clientHeight",S="clientWidth";if(g===V(r)&&(g=de(r),W(g).position!=="static"&&l==="absolute"&&(y="scrollHeight",S="scrollWidth")),g=g,i===z||(i===re||i===pe)&&o===Je){E=Q;var _=d&&g===O&&O.visualViewport?O.visualViewport.height:g[y];b-=_-n.height,b*=u?1:-1}if(i===re||(i===z||i===Q)&&o===Je){I=pe;var T=d&&g===O&&O.visualViewport?O.visualViewport.width:g[S];p-=T-n.width,p*=u?1:-1}}var $=Object.assign({position:l},c&&ju),C=f===!0?qu({x:p,y:b}):{x:p,y:b};if(p=C.x,b=C.y,u){var D;return Object.assign({},$,(D={},D[E]=A?"0":"",D[I]=x?"0":"",D.transform=(O.devicePixelRatio||1)<=1?"translate("+p+"px, "+b+"px)":"translate3d("+p+"px, "+b+"px, 0)",D))}return Object.assign({},$,(t={},t[E]=A?b+"px":"",t[I]=x?p+"px":"",t.transform="",t))}function Lu(e){var t=e.state,r=e.options,n=r.gpuAcceleration,i=n===void 0?!0:n,o=r.adaptive,s=o===void 0?!0:o,l=r.roundOffsets,u=l===void 0?!0:l;if(process.env.NODE_ENV!=="production"){var c=W(t.elements.popper).transitionProperty||"";s&&["transform","top","right","bottom","left"].some(function(d){return c.indexOf(d)>=0})&&console.warn(["Popper: Detected CSS transitions on at least one of the following",'CSS properties: "transform", "top", "right", "bottom", "left".',` +`));return a.cloneVNode(f,Object.assign({},l,c))}return Array.isArray(u)&&u.length===1?u[0]:u}return a.h(s,Object.assign({},l,c),u)}function $n(e){return e.flatMap(t=>t.type===a.Fragment?$n(t.children):[t])}function Ws(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},r={};for(let n of e)for(let i in n)i.startsWith("on")&&typeof n[i]=="function"?(r[i]!=null||(r[i]=[]),r[i].push(n[i])):t[i]=n[i];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(r).map(n=>[n,void 0])));for(let n in r)Object.assign(t,{[n](i,...o){let s=r[n];for(let l of s){if(i instanceof Event&&i.defaultPrevented)return;l(i,...o)}}});return t}function En(e,t=[]){let r=Object.assign({},e);for(let n of t)n in r&&delete r[n];return r}function zs(e){return e==null?!1:typeof e.type=="string"||typeof e.type=="object"||typeof e.type=="function"}let Gs=0;function Ks(){return++Gs}function be(){return Ks()}var _n=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(_n||{});function re(e){var t;return e==null||e.value==null?null:(t=e.value.$el)!=null?t:e.value}let Tn=Symbol("Context");var we=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(we||{});function Xs(){return tr()!==null}function tr(){return a.inject(Tn,null)}function Qs(e){a.provide(Tn,e)}const ht=typeof window>"u"||typeof document>"u";function ke(e){if(ht)return null;if(e instanceof Node)return e.ownerDocument;if(e!=null&&e.hasOwnProperty("value")){let t=re(e);if(t)return t.ownerDocument}return document}let rr=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var Ge=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(Ge||{}),xn=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(xn||{}),Ys=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(Ys||{});function Js(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(rr))}var An=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(An||{});function Zs(e,t=0){var r;return e===((r=ke(e))==null?void 0:r.body)?!1:U(t,{[0](){return e.matches(rr)},[1](){let n=e;for(;n!==null;){if(n.matches(rr))return!0;n=n.parentElement}return!1}})}function Ke(e){e==null||e.focus({preventScroll:!0})}let el=["textarea","input"].join(",");function tl(e){var t,r;return(r=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,el))!=null?r:!1}function rl(e,t=r=>r){return e.slice().sort((r,n)=>{let i=t(r),o=t(n);if(i===null||o===null)return 0;let s=i.compareDocumentPosition(o);return s&Node.DOCUMENT_POSITION_FOLLOWING?-1:s&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function nr(e,t,r=!0,n=null){var i;let o=(i=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e==null?void 0:e.ownerDocument)!=null?i:document,s=Array.isArray(e)?r?rl(e):e:Js(e);n=n!=null?n:o.activeElement;let l=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,s.indexOf(n))-1;if(t&4)return Math.max(0,s.indexOf(n))+1;if(t&8)return s.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=t&32?{preventScroll:!0}:{},f=0,h=s.length,d;do{if(f>=h||f+h<=0)return 0;let p=u+f;if(t&16)p=(p+h)%h;else{if(p<0)return 3;if(p>=h)return 1}d=s[p],d==null||d.focus(c),f+=l}while(d!==o.activeElement);return t&6&&tl(d)&&d.select(),d.hasAttribute("tabindex")||d.setAttribute("tabindex","0"),2}function ir(e,t,r){ht||a.watchEffect(n=>{document.addEventListener(e,t,r),n(()=>document.removeEventListener(e,t,r))})}function nl(e,t,r=a.computed(()=>!0)){function n(o,s){if(!r.value||o.defaultPrevented)return;let l=s(o);if(l===null||!l.ownerDocument.documentElement.contains(l))return;let u=function c(f){return typeof f=="function"?c(f()):Array.isArray(f)||f instanceof Set?f:[f]}(e);for(let c of u){if(c===null)continue;let f=c instanceof HTMLElement?c:re(c);if(f!=null&&f.contains(l))return}return!Zs(l,An.Loose)&&l.tabIndex!==-1&&o.preventDefault(),t(o,l)}let i=a.ref(null);ir("mousedown",o=>{var s,l;r.value&&(i.value=((l=(s=o.composedPath)==null?void 0:s.call(o))==null?void 0:l[0])||o.target)},!0),ir("click",o=>{!i.value||(n(o,()=>i.value),i.value=null)},!0),ir("blur",o=>n(o,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}var mt=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(mt||{});let or=a.defineComponent({name:"Hidden",props:{as:{type:[Object,String],default:"div"},features:{type:Number,default:1}},setup(e,{slots:t,attrs:r}){return()=>{let{features:n,...i}=e,o={"aria-hidden":(n&2)===2?!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 R({ourProps:o,theirProps:i,slot:{},attrs:r,slots:t,name:"Hidden"})}}});function il(e,t,r){ht||a.watchEffect(n=>{window.addEventListener(e,t,r),n(()=>window.removeEventListener(e,t,r))})}var ar=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(ar||{});function ol(){let e=a.ref(0);return il("keydown",t=>{t.key==="Tab"&&(e.value=t.shiftKey?1:0)}),e}function In(e,t,r,n){ht||a.watchEffect(i=>{e=e!=null?e:window,e.addEventListener(t,r,n),i(()=>e.removeEventListener(t,r,n))})}function al(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}var Pn=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(Pn||{});let Xe=Object.assign(a.defineComponent({name:"FocusTrap",props:{as:{type:[Object,String],default:"div"},initialFocus:{type:Object,default:null},features:{type:Number,default:30},containers:{type:Object,default:a.ref(new Set)}},inheritAttrs:!1,setup(e,{attrs:t,slots:r,expose:n}){let i=a.ref(null);n({el:i,$el:i});let o=a.computed(()=>ke(i));sl({ownerDocument:o},a.computed(()=>Boolean(e.features&16)));let s=ll({ownerDocument:o,container:i,initialFocus:a.computed(()=>e.initialFocus)},a.computed(()=>Boolean(e.features&2)));ul({ownerDocument:o,container:i,containers:e.containers,previousActiveElement:s},a.computed(()=>Boolean(e.features&8)));let l=ol();function u(){let c=re(i);!c||U(l.value,{[ar.Forwards]:()=>nr(c,Ge.First),[ar.Backwards]:()=>nr(c,Ge.Last)})}return()=>{let c={},f={ref:i},{features:h,initialFocus:d,containers:p,...m}=e;return a.h(a.Fragment,[Boolean(h&4)&&a.h(or,{as:"button",type:"button",onFocus:u,features:mt.Focusable}),R({ourProps:f,theirProps:{...t,...m},slot:c,attrs:t,slots:r,name:"FocusTrap"}),Boolean(h&4)&&a.h(or,{as:"button",type:"button",onFocus:u,features:mt.Focusable})])}}}),{features:Pn});function sl({ownerDocument:e},t){let r=a.ref(null);function n(){var o;r.value||(r.value=(o=e.value)==null?void 0:o.activeElement)}function i(){!r.value||(Ke(r.value),r.value=null)}a.onMounted(()=>{a.watch(t,(o,s)=>{o!==s&&(o?n():i())},{immediate:!0})}),a.onUnmounted(i)}function ll({ownerDocument:e,container:t,initialFocus:r},n){let i=a.ref(null),o=a.ref(!1);return a.onMounted(()=>o.value=!0),a.onUnmounted(()=>o.value=!1),a.onMounted(()=>{a.watch([t,r,n],(s,l)=>{if(s.every((c,f)=>(l==null?void 0:l[f])===c)||!n.value)return;let u=re(t);!u||al(()=>{var c,f;if(!o.value)return;let h=re(r),d=(c=e.value)==null?void 0:c.activeElement;if(h){if(h===d){i.value=d;return}}else if(u.contains(d)){i.value=d;return}h?Ke(h):nr(u,Ge.First|Ge.NoScroll)===xn.Error&&console.warn("There are no focusable elements inside the "),i.value=(f=e.value)==null?void 0:f.activeElement})},{immediate:!0,flush:"post"})}),i}function ul({ownerDocument:e,container:t,containers:r,previousActiveElement:n},i){var o;In((o=e.value)==null?void 0:o.defaultView,"focus",s=>{if(!i.value)return;let l=new Set(r==null?void 0:r.value);l.add(t);let u=n.value;if(!u)return;let c=s.target;c&&c instanceof HTMLElement?cl(l,c)?(n.value=c,Ke(c)):(s.preventDefault(),s.stopPropagation(),Ke(u)):Ke(n.value)},!0)}function cl(e,t){var r;for(let n of e)if((r=n.value)!=null&&r.contains(t))return!0;return!1}let Cn="body > *",Be=new Set,fe=new Map;function kn(e){e.setAttribute("aria-hidden","true"),e.inert=!0}function Bn(e){let t=fe.get(e);!t||(t["aria-hidden"]===null?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",t["aria-hidden"]),e.inert=t.inert)}function fl(e,t=a.ref(!0)){a.watchEffect(r=>{if(!t.value||!e.value)return;let n=e.value,i=ke(n);if(i){Be.add(n);for(let o of fe.keys())o.contains(n)&&(Bn(o),fe.delete(o));i.querySelectorAll(Cn).forEach(o=>{if(o instanceof HTMLElement){for(let s of Be)if(o.contains(s))return;Be.size===1&&(fe.set(o,{"aria-hidden":o.getAttribute("aria-hidden"),inert:o.inert}),kn(o))}}),r(()=>{if(Be.delete(n),Be.size>0)i.querySelectorAll(Cn).forEach(o=>{if(o instanceof HTMLElement&&!fe.has(o)){for(let s of Be)if(o.contains(s))return;fe.set(o,{"aria-hidden":o.getAttribute("aria-hidden"),inert:o.inert}),kn(o)}});else for(let o of fe.keys())Bn(o),fe.delete(o)})}})}let Dn=Symbol("ForcePortalRootContext");function dl(){return a.inject(Dn,!1)}let sr=a.defineComponent({name:"ForcePortalRoot",props:{as:{type:[Object,String],default:"template"},force:{type:Boolean,default:!1}},setup(e,{slots:t,attrs:r}){return a.provide(Dn,e.force),()=>{let{force:n,...i}=e;return R({theirProps:i,ourProps:{},slot:{},slots:t,attrs:r,name:"ForcePortalRoot"})}}});function pl(e){let t=ke(e);if(!t){if(e===null)return null;throw new Error(`[Headless UI]: Cannot find ownerDocument for contextElement: ${e}`)}let r=t.getElementById("headlessui-portal-root");if(r)return r;let n=t.createElement("div");return n.setAttribute("id","headlessui-portal-root"),t.body.appendChild(n)}let jn=a.defineComponent({name:"Portal",props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:r}){let n=a.ref(null),i=a.computed(()=>ke(n)),o=dl(),s=a.inject(qn,null),l=a.ref(o===!0||s==null?pl(n.value):s.resolveTarget());return a.watchEffect(()=>{o||s!=null&&(l.value=s.resolveTarget())}),a.onUnmounted(()=>{var u,c;let f=(u=i.value)==null?void 0:u.getElementById("headlessui-portal-root");!f||l.value===f&&l.value.children.length<=0&&((c=l.value.parentElement)==null||c.removeChild(l.value))}),()=>{if(l.value===null)return null;let u={ref:n,"data-headlessui-portal":""};return a.h(a.Teleport,{to:l.value},R({ourProps:u,theirProps:e,slot:{},attrs:r,slots:t,name:"Portal"}))}}}),qn=Symbol("PortalGroupContext"),hl=a.defineComponent({name:"PortalGroup",props:{as:{type:[Object,String],default:"template"},target:{type:Object,default:null}},setup(e,{attrs:t,slots:r}){let n=a.reactive({resolveTarget(){return e.target}});return a.provide(qn,n),()=>{let{target:i,...o}=e;return R({theirProps:o,ourProps:{},slot:{},attrs:t,slots:r,name:"PortalGroup"})}}}),Ln=Symbol("StackContext");var lr=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(lr||{});function ml(){return a.inject(Ln,()=>{})}function gl({type:e,enabled:t,element:r,onUpdate:n}){let i=ml();function o(...s){n==null||n(...s),i(...s)}a.onMounted(()=>{a.watch(t,(s,l)=>{s?o(0,e,r):l===!0&&o(1,e,r)},{immediate:!0,flush:"sync"})}),a.onUnmounted(()=>{t.value&&o(1,e,r)}),a.provide(Ln,o)}let Fn=Symbol("DescriptionContext");function vl(){let e=a.inject(Fn,null);if(e===null)throw new Error("Missing parent");return e}function yl({slot:e=a.ref({}),name:t="Description",props:r={}}={}){let n=a.ref([]);function i(o){return n.value.push(o),()=>{let s=n.value.indexOf(o);s!==-1&&n.value.splice(s,1)}}return a.provide(Fn,{register:i,slot:e,name:t,props:r}),a.computed(()=>n.value.length>0?n.value.join(" "):void 0)}let bl=a.defineComponent({name:"Description",props:{as:{type:[Object,String],default:"p"}},setup(e,{attrs:t,slots:r}){let n=vl(),i=`headlessui-description-${be()}`;return a.onMounted(()=>a.onUnmounted(n.register(i))),()=>{let{name:o="Description",slot:s=a.ref({}),props:l={}}=n,u=e,c={...Object.entries(l).reduce((f,[h,d])=>Object.assign(f,{[h]:a.unref(d)}),{}),id:i};return R({ourProps:c,theirProps:u,slot:s.value,attrs:t,slots:r,name:o})}}});function ur(){let e=[],t=[],r={enqueue(n){t.push(n)},addEventListener(n,i,o,s){return n.addEventListener(i,o,s),r.add(()=>n.removeEventListener(i,o,s))},requestAnimationFrame(...n){let i=requestAnimationFrame(...n);r.add(()=>cancelAnimationFrame(i))},nextFrame(...n){r.requestAnimationFrame(()=>{r.requestAnimationFrame(...n)})},setTimeout(...n){let i=setTimeout(...n);r.add(()=>clearTimeout(i))},add(n){e.push(n)},dispose(){for(let n of e.splice(0))n()},async workQueue(){for(let n of t.splice(0))await n()}};return r}function wl(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}var Sl=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Sl||{});let cr=Symbol("DialogContext");function Qe(e){let t=a.inject(cr,null);if(t===null){let r=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Qe),r}return t}let gt="DC8F892D-2EBD-447C-A4C8-A03058436FF4",fr=a.defineComponent({name:"Dialog",inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},open:{type:[Boolean,String],default:gt},initialFocus:{type:Object,default:null}},emits:{close:e=>!0},setup(e,{emit:t,attrs:r,slots:n,expose:i}){var o;let s=a.ref(!1);a.onMounted(()=>{s.value=!0});let l=a.ref(0),u=tr(),c=a.computed(()=>e.open===gt&&u!==null?U(u.value,{[we.Open]:!0,[we.Closed]:!1}):e.open),f=a.ref(new Set),h=a.ref(null),d=a.ref(null),p=a.computed(()=>ke(h));if(i({el:h,$el:h}),!(e.open!==gt||u!==null))throw new Error("You forgot to provide an `open` prop to the `Dialog`.");if(typeof c.value!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${c.value===gt?void 0:e.open}`);let m=a.computed(()=>s.value&&c.value?0:1),y=a.computed(()=>m.value===0),w=a.computed(()=>l.value>1),x=a.inject(cr,null)!==null,A=a.computed(()=>w.value?"parent":"leaf");fl(h,a.computed(()=>w.value?y.value:!1)),gl({type:"Dialog",enabled:a.computed(()=>m.value===0),element:h,onUpdate:(b,S,_)=>{if(S==="Dialog")return U(b,{[lr.Add](){f.value.add(_),l.value+=1},[lr.Remove](){f.value.delete(_),l.value-=1}})}});let I=yl({name:"DialogDescription",slot:a.computed(()=>({open:c.value}))}),E=`headlessui-dialog-${be()}`,O=a.ref(null),v={titleId:O,panelRef:a.ref(null),dialogState:m,setTitleId(b){O.value!==b&&(O.value=b)},close(){t("close",!1)}};return a.provide(cr,v),nl(()=>{var b,S,_;return[...Array.from((S=(b=p.value)==null?void 0:b.querySelectorAll("body > *, [data-headlessui-portal]"))!=null?S:[]).filter(T=>!(!(T instanceof HTMLElement)||T.contains(re(d))||v.panelRef.value&&T.contains(v.panelRef.value))),(_=v.panelRef.value)!=null?_:h.value]},(b,S)=>{v.close(),a.nextTick(()=>S==null?void 0:S.focus())},a.computed(()=>m.value===0&&!w.value)),In((o=p.value)==null?void 0:o.defaultView,"keydown",b=>{b.defaultPrevented||b.key===_n.Escape&&m.value===0&&(w.value||(b.preventDefault(),b.stopPropagation(),v.close()))}),a.watchEffect(b=>{var S;if(m.value!==0||x)return;let _=p.value;if(!_)return;let T=ur();function $(q,M,L){let F=q.style.getPropertyValue(M);return Object.assign(q.style,{[M]:L}),T.add(()=>{Object.assign(q.style,{[M]:F})})}let C=_==null?void 0:_.documentElement,D=((S=_.defaultView)!=null?S:window).innerWidth-C.clientWidth;if($(C,"overflow","hidden"),D>0){let q=C.clientWidth-C.offsetWidth,M=D-q;$(C,"paddingRight",`${M}px`)}if(wl()){let q=window.pageYOffset;$(C,"position","fixed"),$(C,"marginTop",`-${q}px`),$(C,"width","100%"),T.add(()=>window.scrollTo(0,q))}b(T.dispose)}),a.watchEffect(b=>{if(m.value!==0)return;let S=re(h);if(!S)return;let _=new IntersectionObserver(T=>{for(let $ of T)$.boundingClientRect.x===0&&$.boundingClientRect.y===0&&$.boundingClientRect.width===0&&$.boundingClientRect.height===0&&v.close()});_.observe(S),b(()=>_.disconnect())}),()=>{let b={...r,ref:h,id:E,role:"dialog","aria-modal":m.value===0?!0:void 0,"aria-labelledby":O.value,"aria-describedby":I.value},{open:S,initialFocus:_,...T}=e,$={open:m.value===0};return a.h(sr,{force:!0},()=>[a.h(jn,()=>a.h(hl,{target:h.value},()=>a.h(sr,{force:!1},()=>a.h(Xe,{initialFocus:_,containers:f,features:y.value?U(A.value,{parent:Xe.features.RestoreFocus,leaf:Xe.features.All&~Xe.features.FocusLock}):Xe.features.None},()=>R({ourProps:b,theirProps:T,slot:$,attrs:r,slots:n,visible:m.value===0,features:pt.RenderStrategy|pt.Static,name:"Dialog"}))))),a.h(or,{features:mt.Hidden,ref:d})])}}});a.defineComponent({name:"DialogOverlay",props:{as:{type:[Object,String],default:"div"}},setup(e,{attrs:t,slots:r}){let n=Qe("DialogOverlay"),i=`headlessui-dialog-overlay-${be()}`;function o(s){s.target===s.currentTarget&&(s.preventDefault(),s.stopPropagation(),n.close())}return()=>R({ourProps:{id:i,"aria-hidden":!0,onClick:o},theirProps:e,slot:{open:n.dialogState.value===0},attrs:t,slots:r,name:"DialogOverlay"})}}),a.defineComponent({name:"DialogBackdrop",props:{as:{type:[Object,String],default:"div"}},inheritAttrs:!1,setup(e,{attrs:t,slots:r,expose:n}){let i=Qe("DialogBackdrop"),o=`headlessui-dialog-backdrop-${be()}`,s=a.ref(null);return n({el:s,$el:s}),a.onMounted(()=>{if(i.panelRef.value===null)throw new Error("A component is being used, but a component is missing.")}),()=>{let l=e,u={id:o,ref:s,"aria-hidden":!0};return a.h(sr,{force:!0},()=>a.h(jn,()=>R({ourProps:u,theirProps:{...t,...l},slot:{open:i.dialogState.value===0},attrs:t,slots:r,name:"DialogBackdrop"})))}}});let dr=a.defineComponent({name:"DialogPanel",props:{as:{type:[Object,String],default:"div"}},setup(e,{attrs:t,slots:r,expose:n}){let i=Qe("DialogPanel"),o=`headlessui-dialog-panel-${be()}`;n({el:i.panelRef,$el:i.panelRef});function s(l){l.stopPropagation()}return()=>{let l={id:o,ref:i.panelRef,onClick:s};return R({ourProps:l,theirProps:e,slot:{open:i.dialogState.value===0},attrs:t,slots:r,name:"DialogPanel"})}}});a.defineComponent({name:"DialogTitle",props:{as:{type:[Object,String],default:"h2"}},setup(e,{attrs:t,slots:r}){let n=Qe("DialogTitle"),i=`headlessui-dialog-title-${be()}`;return a.onMounted(()=>{n.setTitleId(i),a.onUnmounted(()=>n.setTitleId(null))}),()=>R({ourProps:{id:i},theirProps:e,slot:{open:n.dialogState.value===0},attrs:t,slots:r,name:"DialogTitle"})}});function Ol(e){let t={called:!1};return(...r)=>{if(!t.called)return t.called=!0,e(...r)}}function pr(e,...t){e&&t.length>0&&e.classList.add(...t)}function vt(e,...t){e&&t.length>0&&e.classList.remove(...t)}var hr=(e=>(e.Finished="finished",e.Cancelled="cancelled",e))(hr||{});function $l(e,t){let r=ur();if(!e)return r.dispose;let{transitionDuration:n,transitionDelay:i}=getComputedStyle(e),[o,s]=[n,i].map(l=>{let[u=0]=l.split(",").filter(Boolean).map(c=>c.includes("ms")?parseFloat(c):parseFloat(c)*1e3).sort((c,f)=>f-c);return u});return o!==0?r.setTimeout(()=>t("finished"),o+s):t("finished"),r.add(()=>t("cancelled")),r.dispose}function Mn(e,t,r,n,i,o){let s=ur(),l=o!==void 0?Ol(o):()=>{};return vt(e,...i),pr(e,...t,...r),s.nextFrame(()=>{vt(e,...r),pr(e,...n),s.add($l(e,u=>(vt(e,...n,...t),pr(e,...i),l(u))))}),s.add(()=>vt(e,...t,...r,...n,...i)),s.add(()=>l("cancelled")),s.dispose}function Se(e=""){return e.split(" ").filter(t=>t.trim().length>1)}let mr=Symbol("TransitionContext");var El=(e=>(e.Visible="visible",e.Hidden="hidden",e))(El||{});function _l(){return a.inject(mr,null)!==null}function Tl(){let e=a.inject(mr,null);if(e===null)throw new Error("A is used but it is missing a parent .");return e}function xl(){let e=a.inject(gr,null);if(e===null)throw new Error("A is used but it is missing a parent .");return e}let gr=Symbol("NestingContext");function yt(e){return"children"in e?yt(e.children):e.value.filter(({state:t})=>t==="visible").length>0}function Rn(e){let t=a.ref([]),r=a.ref(!1);a.onMounted(()=>r.value=!0),a.onUnmounted(()=>r.value=!1);function n(o,s=ce.Hidden){let l=t.value.findIndex(({id:u})=>u===o);l!==-1&&(U(s,{[ce.Unmount](){t.value.splice(l,1)},[ce.Hidden](){t.value[l].state="hidden"}}),!yt(t)&&r.value&&(e==null||e()))}function i(o){let s=t.value.find(({id:l})=>l===o);return s?s.state!=="visible"&&(s.state="visible"):t.value.push({id:o,state:"visible"}),()=>n(o,ce.Unmount)}return{children:t,register:i,unregister:n}}let Nn=pt.RenderStrategy,De=a.defineComponent({props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},entered:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:t,attrs:r,slots:n,expose:i}){if(!_l()&&Xs())return()=>a.h(je,{...e,onBeforeEnter:()=>t("beforeEnter"),onAfterEnter:()=>t("afterEnter"),onBeforeLeave:()=>t("beforeLeave"),onAfterLeave:()=>t("afterLeave")},n);let o=a.ref(null),s=a.ref("visible"),l=a.computed(()=>e.unmount?ce.Unmount:ce.Hidden);i({el:o,$el:o});let{show:u,appear:c}=Tl(),{register:f,unregister:h}=xl(),d={value:!0},p=be(),m={value:!1},y=Rn(()=>{m.value||(s.value="hidden",h(p),t("afterLeave"))});a.onMounted(()=>{let S=f(p);a.onUnmounted(S)}),a.watchEffect(()=>{if(l.value===ce.Hidden&&!!p){if(u&&s.value!=="visible"){s.value="visible";return}U(s.value,{hidden:()=>h(p),visible:()=>f(p)})}});let w=Se(e.enter),x=Se(e.enterFrom),A=Se(e.enterTo),I=Se(e.entered),E=Se(e.leave),O=Se(e.leaveFrom),v=Se(e.leaveTo);a.onMounted(()=>{a.watchEffect(()=>{if(s.value==="visible"){let S=re(o);if(S instanceof Comment&&S.data==="")throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}})});function b(S){let _=d.value&&!c.value,T=re(o);!T||!(T instanceof HTMLElement)||_||(m.value=!0,u.value&&t("beforeEnter"),u.value||t("beforeLeave"),S(u.value?Mn(T,w,x,A,I,$=>{m.value=!1,$===hr.Finished&&t("afterEnter")}):Mn(T,E,O,v,I,$=>{m.value=!1,$===hr.Finished&&(yt(y)||(s.value="hidden",h(p),t("afterLeave")))})))}return a.onMounted(()=>{a.watch([u],(S,_,T)=>{b(T),d.value=!1},{immediate:!0})}),a.provide(gr,y),Qs(a.computed(()=>U(s.value,{visible:we.Open,hidden:we.Closed}))),()=>{let{appear:S,show:_,enter:T,enterFrom:$,enterTo:C,entered:D,leave:q,leaveFrom:M,leaveTo:L,...F}=e;return R({theirProps:F,ourProps:{ref:o},slot:{},slots:n,attrs:r,features:Nn,visible:s.value==="visible",name:"TransitionChild"})}}}),Al=De,je=a.defineComponent({inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},entered:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:t,attrs:r,slots:n}){let i=tr(),o=a.computed(()=>e.show===null&&i!==null?U(i.value,{[we.Open]:!0,[we.Closed]:!1}):e.show);a.watchEffect(()=>{if(![!0,!1].includes(o.value))throw new Error('A is used but it is missing a `:show="true | false"` prop.')});let s=a.ref(o.value?"visible":"hidden"),l=Rn(()=>{s.value="hidden"}),u=a.ref(!0),c={show:o,appear:a.computed(()=>e.appear||!u.value)};return a.onMounted(()=>{a.watchEffect(()=>{u.value=!1,o.value?s.value="visible":yt(l)||(s.value="hidden")})}),a.provide(gr,l),a.provide(mr,c),()=>{let f=En(e,["show","appear","unmount","onBeforeEnter","onBeforeLeave","onAfterEnter","onAfterLeave"]),h={unmount:e.unmount};return R({ourProps:{...h,as:"template"},theirProps:{},slot:{},slots:{...n,default:()=>[a.h(Al,{onBeforeEnter:()=>t("beforeEnter"),onAfterEnter:()=>t("afterEnter"),onBeforeLeave:()=>t("beforeLeave"),onAfterLeave:()=>t("afterLeave"),...r,...h,...f},n.default)]},attrs:{},features:Nn,visible:s.value==="visible",name:"Transition"})}}});const Il={props:{defaultTitle:{type:String,required:!1,default:""},defaultText:{type:String,required:!1,default:""},defaultConfirmButton:{type:String,required:!1,default:""},defaultCancelButton:{type:String,required:!1,default:""}},data(){return{isOpen:!1}},computed:{hasConfirmModal:()=>!!g.confirmModal.value,title:function(){var e;return(e=g.confirmModal.value)!=null&&e.title?g.confirmModal.value.title:this.defaultTitle},text:function(){var e;return(e=g.confirmModal.value)!=null&&e.text?g.confirmModal.value.text:this.defaultText},confirmButton:function(){var e;return(e=g.confirmModal.value)!=null&&e.confirmButton?g.confirmModal.value.confirmButton:this.defaultConfirmButton},cancelButton:function(){var e;return(e=g.confirmModal.value)!=null&&e.cancelButton?g.confirmModal.value.cancelButton:this.defaultCancelButton}},watch:{hasConfirmModal(e){e&&(this.isOpen=!0)}},methods:{cancel(){g.confirmModal.value.rejectPromise(),this.setIsOpen(!1)},confirm(){g.confirmModal.value.resolvePromise(),this.setIsOpen(!1)},setIsOpen(e){this.isOpen=e},emitClose(){g.clearConfirmModal()}},render(){return this.$slots.default({title:this.title,text:this.text,confirmButton:this.confirmButton,cancelButton:this.cancelButton,isOpen:this.isOpen,setIsOpen:this.setIsOpen,cancel:this.cancel,confirm:this.confirm,emitClose:this.emitClose,Dialog:fr,DialogPanel:dr,TransitionRoot:je,TransitionChild:De})}};function Vn(e,t){t=Zt(t,e);for(var r=0,n=t.length;e!=null&&r({}),required:!1},remember:{type:String,default:null,required:!1},localStorage:{type:Boolean,default:!1,required:!1}},data(){return{values:{}}},mounted(){if(this.remember){let e=g.restore(this.remember,this.localStorage);e||(e={}),this.values=Object.assign({},{...this.default,...e})}else this.values=Object.assign({},{...this.default})},updated(){this.remember&&g.remember(this.remember,{...this.values},this.localStorage)},render(){const e=this;return this.$slots.default(new Proxy(this.values,{ownKeys(){return Object.keys(e.values)},get(t,r){return vr(e.values,r)},set(t,r,n){Wn(e.values,r,n)}}))}};var ql=function(){return G.Date.now()};const yr=ql;var Ll=/\s/;function Fl(e){for(var t=e.length;t--&&Ll.test(e.charAt(t)););return t}var Ml=/^\s+/;function Rl(e){return e&&e.slice(0,Fl(e)+1).replace(Ml,"")}var zn=0/0,Nl=/^[-+]0x[0-9a-f]+$/i,Vl=/^0b[01]+$/i,Hl=/^0o[0-7]+$/i,Ul=parseInt;function br(e){if(typeof e=="number")return e;if(ut(e))return zn;if(K(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=K(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Rl(e);var r=Vl.test(e);return r||Hl.test(e)?Ul(e.slice(2),r?2:8):Nl.test(e)?zn:+e}var Wl="Expected a function",zl=Math.max,Gl=Math.min;function wr(e,t,r){var n,i,o,s,l,u,c=0,f=!1,h=!1,d=!0;if(typeof e!="function")throw new TypeError(Wl);t=br(t)||0,K(r)&&(f=!!r.leading,h="maxWait"in r,o=h?zl(br(r.maxWait)||0,t):o,d="trailing"in r?!!r.trailing:d);function p(v){var b=n,S=i;return n=i=void 0,c=v,s=e.apply(S,b),s}function m(v){return c=v,l=setTimeout(x,t),f?p(v):s}function y(v){var b=v-u,S=v-c,_=t-b;return h?Gl(_,o-S):_}function w(v){var b=v-u,S=v-c;return u===void 0||b>=t||b<0||h&&S>=o}function x(){var v=yr();if(w(v))return A(v);l=setTimeout(x,y(v))}function A(v){return l=void 0,d&&n?p(v):(n=i=void 0,s)}function I(){l!==void 0&&clearTimeout(l),c=0,n=u=i=l=void 0}function E(){return l===void 0?s:A(yr())}function O(){var v=yr(),b=w(v);if(n=arguments,i=this,u=v,b){if(l===void 0)return m(u);if(h)return clearTimeout(l),l=setTimeout(x,t),p(u)}return l===void 0&&(l=setTimeout(x,t)),s}return O.cancel=I,O.flush=E,O}const Kl={props:{url:{type:String,required:!0},method:{type:String,required:!1,default:"GET"},acceptHeader:{type:String,required:!1,default:"application/json"},poll:{type:Number,required:!1,default:null},default:{type:Object,required:!1,default:()=>({})},request:{type:Object,required:!1,default:()=>({})},manual:{type:Boolean,required:!1,default:!1},watchDebounce:{type:Number,required:!1,default:0},watchValue:{validator(){return!0},required:!1,default:null}},data(){return{response:Object.assign({},{...this.default}),processing:!1,debounceFunction:null}},watch:{watchValue:{deep:!0,handler(){this.processing=!0,this.watchDebounce?this.debounceFunction():this.performRequest()}}},mounted(){this.manual||this.$nextTick(this.performRequest)},created(){this.debounceFunction=wr(()=>{this.performRequest()},this.watchDebounce)},methods:{performRequest(){this.processing=!0;const e={url:this.url,method:this.method,headers:{Accept:this.acceptHeader}};Object.keys(this.request).length>0&&(e.data=this.request),Rr.default(e).then(t=>{this.response=t.data,this.processing=!1}).catch(()=>{this.processing=!1}),this.poll&&setTimeout(()=>{this.performRequest()},this.poll)}},render(){return this.$slots.default({processing:this.processing,response:this.response,reload:this.performRequest})}},Xl={data(){return{isActivated:!0}},deactivated(){this.isActivated=!1},activated(){this.isActivated=!0},render(){return this.$slots.default({Dialog:fr,DialogPanel:dr,isActivated:this.isActivated})}},Gn={__name:"OnClickOutside",props:{do:{type:Function,required:!0},opened:{type:Boolean,required:!0},closeOnEscape:{type:Boolean,required:!1,default:!0},ignoreInnerTargets:{type:Boolean,required:!1,default:!1}},setup(e){const t=e,r=a.ref(null),n=a.ref(null),i=a.ref(null);return a.onMounted(()=>{r.value=o=>{n.value.children[0].contains(o.target)||t.ignoreInnerTargets&&n.value.contains(o.target)||t.do()},document.addEventListener("click",r.value),document.addEventListener("touchstart",r.value),t.closeOnEscape&&(i.value=o=>{t.opened&&o.key==="Escape"&&t.do()},document.addEventListener("keydown",i.value))}),a.onBeforeUnmount(()=>{document.removeEventListener("click",r.value),document.removeEventListener("touchstart",r.value),t.closeOnEscape&&document.removeEventListener("keydown",i.value)}),(o,s)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"root",ref:n},[a.renderSlot(o.$slots,"default")],512))}};function V(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Oe(e){var t=V(e).Element;return e instanceof t||e instanceof Element}function H(e){var t=V(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Sr(e){if(typeof ShadowRoot>"u")return!1;var t=V(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}var $e=Math.max,bt=Math.min,qe=Math.round;function Or(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Kn(){return!/^((?!chrome|android).)*safari/i.test(Or())}function Le(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var n=e.getBoundingClientRect(),i=1,o=1;t&&H(e)&&(i=e.offsetWidth>0&&qe(n.width)/e.offsetWidth||1,o=e.offsetHeight>0&&qe(n.height)/e.offsetHeight||1);var s=Oe(e)?V(e):window,l=s.visualViewport,u=!Kn()&&r,c=(n.left+(u&&l?l.offsetLeft:0))/i,f=(n.top+(u&&l?l.offsetTop:0))/o,h=n.width/i,d=n.height/o;return{width:h,height:d,top:f,right:c+h,bottom:f+d,left:c,x:c,y:f}}function $r(e){var t=V(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function Ql(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Yl(e){return e===V(e)||!H(e)?$r(e):Ql(e)}function X(e){return e?(e.nodeName||"").toLowerCase():null}function de(e){return((Oe(e)?e.ownerDocument:e.document)||window.document).documentElement}function Er(e){return Le(de(e)).left+$r(e).scrollLeft}function W(e){return V(e).getComputedStyle(e)}function _r(e){var t=W(e),r=t.overflow,n=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)}function Jl(e){var t=e.getBoundingClientRect(),r=qe(t.width)/e.offsetWidth||1,n=qe(t.height)/e.offsetHeight||1;return r!==1||n!==1}function Zl(e,t,r){r===void 0&&(r=!1);var n=H(t),i=H(t)&&Jl(t),o=de(t),s=Le(e,i,r),l={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(n||!n&&!r)&&((X(t)!=="body"||_r(o))&&(l=Yl(t)),H(t)?(u=Le(t,!0),u.x+=t.clientLeft,u.y+=t.clientTop):o&&(u.x=Er(o))),{x:s.left+l.scrollLeft-u.x,y:s.top+l.scrollTop-u.y,width:s.width,height:s.height}}function Xn(e){var t=Le(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function wt(e){return X(e)==="html"?e:e.assignedSlot||e.parentNode||(Sr(e)?e.host:null)||de(e)}function Qn(e){return["html","body","#document"].indexOf(X(e))>=0?e.ownerDocument.body:H(e)&&_r(e)?e:Qn(wt(e))}function Ye(e,t){var r;t===void 0&&(t=[]);var n=Qn(e),i=n===((r=e.ownerDocument)==null?void 0:r.body),o=V(n),s=i?[o].concat(o.visualViewport||[],_r(n)?n:[]):n,l=t.concat(s);return i?l:l.concat(Ye(wt(s)))}function eu(e){return["table","td","th"].indexOf(X(e))>=0}function Yn(e){return!H(e)||W(e).position==="fixed"?null:e.offsetParent}function tu(e){var t=/firefox/i.test(Or()),r=/Trident/i.test(Or());if(r&&H(e)){var n=W(e);if(n.position==="fixed")return null}var i=wt(e);for(Sr(i)&&(i=i.host);H(i)&&["html","body"].indexOf(X(i))<0;){var o=W(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function St(e){for(var t=V(e),r=Yn(e);r&&eu(r)&&W(r).position==="static";)r=Yn(r);return r&&(X(r)==="html"||X(r)==="body"&&W(r).position==="static")?t:r||tu(e)||t}var z="top",Q="bottom",pe="right",ne="left",Ot="auto",$t=[z,Q,pe,ne],Fe="start",Je="end",ru="clippingParents",Jn="viewport",Ze="popper",nu="reference",Zn=$t.reduce(function(e,t){return e.concat([t+"-"+Fe,t+"-"+Je])},[]),iu=[].concat($t,[Ot]).reduce(function(e,t){return e.concat([t,t+"-"+Fe,t+"-"+Je])},[]),ou="beforeRead",au="read",su="afterRead",lu="beforeMain",uu="main",cu="afterMain",fu="beforeWrite",du="write",pu="afterWrite",Tr=[ou,au,su,lu,uu,cu,fu,du,pu];function hu(e){var t=new Map,r=new Set,n=[];e.forEach(function(o){t.set(o.name,o)});function i(o){r.add(o.name);var s=[].concat(o.requires||[],o.requiresIfExists||[]);s.forEach(function(l){if(!r.has(l)){var u=t.get(l);u&&i(u)}}),n.push(o)}return e.forEach(function(o){r.has(o.name)||i(o)}),n}function mu(e){var t=hu(e);return Tr.reduce(function(r,n){return r.concat(t.filter(function(i){return i.phase===n}))},[])}function gu(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function he(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n=0,n=r&&H(e)?St(e):e;return Oe(n)?t.filter(function(i){return Oe(i)&&$u(i,n)&&X(i)!=="body"}):[]}function Tu(e,t,r,n){var i=t==="clippingParents"?_u(e):[].concat(t),o=[].concat(i,[r]),s=o[0],l=o.reduce(function(u,c){var f=ti(e,c,n);return u.top=$e(f.top,u.top),u.right=bt(f.right,u.right),u.bottom=bt(f.bottom,u.bottom),u.left=$e(f.left,u.left),u},ti(e,s,n));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function Me(e){return e.split("-")[1]}function ri(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ni(e){var t=e.reference,r=e.element,n=e.placement,i=n?ie(n):null,o=n?Me(n):null,s=t.x+t.width/2-r.width/2,l=t.y+t.height/2-r.height/2,u;switch(i){case z:u={x:s,y:t.y-r.height};break;case Q:u={x:s,y:t.y+t.height};break;case pe:u={x:t.x+t.width,y:l};break;case ne:u={x:t.x-r.width,y:l};break;default:u={x:t.x,y:t.y}}var c=i?ri(i):null;if(c!=null){var f=c==="y"?"height":"width";switch(o){case Fe:u[c]=u[c]-(t[f]/2-r[f]/2);break;case Je:u[c]=u[c]+(t[f]/2-r[f]/2);break}}return u}function ii(){return{top:0,right:0,bottom:0,left:0}}function xu(e){return Object.assign({},ii(),e)}function Au(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}function Ar(e,t){t===void 0&&(t={});var r=t,n=r.placement,i=n===void 0?e.placement:n,o=r.strategy,s=o===void 0?e.strategy:o,l=r.boundary,u=l===void 0?ru:l,c=r.rootBoundary,f=c===void 0?Jn:c,h=r.elementContext,d=h===void 0?Ze:h,p=r.altBoundary,m=p===void 0?!1:p,y=r.padding,w=y===void 0?0:y,x=xu(typeof w!="number"?w:Au(w,$t)),A=d===Ze?nu:Ze,I=e.rects.popper,E=e.elements[m?A:d],O=Tu(Oe(E)?E:E.contextElement||de(e.elements.popper),u,f,s),v=Le(e.elements.reference),b=ni({reference:v,element:I,strategy:"absolute",placement:i}),S=xr(Object.assign({},I,b)),_=d===Ze?S:v,T={top:O.top-_.top+x.top,bottom:_.bottom-O.bottom+x.bottom,left:O.left-_.left+x.left,right:_.right-O.right+x.right},$=e.modifiersData.offset;if(d===Ze&&$){var C=$[i];Object.keys(T).forEach(function(D){var q=[pe,Q].indexOf(D)>=0?1:-1,M=[z,Q].indexOf(D)>=0?"y":"x";T[D]+=C[M]*q})}return T}var oi="Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.",Iu="Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.",ai={placement:"bottom",modifiers:[],strategy:"absolute"};function si(){for(var e=arguments.length,t=new Array(e),r=0;r100)){console.error(Iu);break}if(f.reset===!0){f.reset=!1,O=-1;continue}var v=f.orderedModifiers[O],b=v.fn,S=v.options,_=S===void 0?{}:S,T=v.name;typeof b=="function"&&(f=b({state:f,options:_,name:T,instance:p})||f)}}},update:gu(function(){return new Promise(function(w){p.forceUpdate(),w(f)})}),destroy:function(){y(),d=!0}};if(!si(l,u))return process.env.NODE_ENV!=="production"&&console.error(oi),p;p.setOptions(c).then(function(w){!d&&c.onFirstUpdate&&c.onFirstUpdate(w)});function m(){f.orderedModifiers.forEach(function(w){var x=w.name,A=w.options,I=A===void 0?{}:A,E=w.effect;if(typeof E=="function"){var O=E({state:f,name:x,instance:p,options:I}),v=function(){};h.push(O||v)}})}function y(){h.forEach(function(w){return w()}),h=[]}return p}}var Et={passive:!0};function Cu(e){var t=e.state,r=e.instance,n=e.options,i=n.scroll,o=i===void 0?!0:i,s=n.resize,l=s===void 0?!0:s,u=V(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(f){f.addEventListener("scroll",r.update,Et)}),l&&u.addEventListener("resize",r.update,Et),function(){o&&c.forEach(function(f){f.removeEventListener("scroll",r.update,Et)}),l&&u.removeEventListener("resize",r.update,Et)}}const ku={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Cu,data:{}};function Bu(e){var t=e.state,r=e.name;t.modifiersData[r]=ni({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Du={name:"popperOffsets",enabled:!0,phase:"read",fn:Bu,data:{}};var ju={top:"auto",right:"auto",bottom:"auto",left:"auto"};function qu(e){var t=e.x,r=e.y,n=window,i=n.devicePixelRatio||1;return{x:qe(t*i)/i||0,y:qe(r*i)/i||0}}function li(e){var t,r=e.popper,n=e.popperRect,i=e.placement,o=e.variation,s=e.offsets,l=e.position,u=e.gpuAcceleration,c=e.adaptive,f=e.roundOffsets,h=e.isFixed,d=s.x,p=d===void 0?0:d,m=s.y,y=m===void 0?0:m,w=typeof f=="function"?f({x:p,y}):{x:p,y};p=w.x,y=w.y;var x=s.hasOwnProperty("x"),A=s.hasOwnProperty("y"),I=ne,E=z,O=window;if(c){var v=St(r),b="clientHeight",S="clientWidth";if(v===V(r)&&(v=de(r),W(v).position!=="static"&&l==="absolute"&&(b="scrollHeight",S="scrollWidth")),v=v,i===z||(i===ne||i===pe)&&o===Je){E=Q;var _=h&&v===O&&O.visualViewport?O.visualViewport.height:v[b];y-=_-n.height,y*=u?1:-1}if(i===ne||(i===z||i===Q)&&o===Je){I=pe;var T=h&&v===O&&O.visualViewport?O.visualViewport.width:v[S];p-=T-n.width,p*=u?1:-1}}var $=Object.assign({position:l},c&&ju),C=f===!0?qu({x:p,y}):{x:p,y};if(p=C.x,y=C.y,u){var D;return Object.assign({},$,(D={},D[E]=A?"0":"",D[I]=x?"0":"",D.transform=(O.devicePixelRatio||1)<=1?"translate("+p+"px, "+y+"px)":"translate3d("+p+"px, "+y+"px, 0)",D))}return Object.assign({},$,(t={},t[E]=A?y+"px":"",t[I]=x?p+"px":"",t.transform="",t))}function Lu(e){var t=e.state,r=e.options,n=r.gpuAcceleration,i=n===void 0?!0:n,o=r.adaptive,s=o===void 0?!0:o,l=r.roundOffsets,u=l===void 0?!0:l;if(process.env.NODE_ENV!=="production"){var c=W(t.elements.popper).transitionProperty||"";s&&["transform","top","right","bottom","left"].some(function(h){return c.indexOf(h)>=0})&&console.warn(["Popper: Detected CSS transitions on at least one of the following",'CSS properties: "transform", "top", "right", "bottom", "left".',` `,'Disable the "computeStyles" modifier\'s `adaptive` option to allow',"for smooth transitions, or remove these properties from the CSS","transition declaration on the popper element if only transitioning","opacity or background-color for example.",` -`,"We recommend using the popper element as a wrapper around an inner","element that can have any CSS property transitioned for animations."].join(" "))}var f={placement:ne(t.placement),variation:Me(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,li(Object.assign({},f,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:u})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,li(Object.assign({},f,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Fu={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Lu,data:{}};function Mu(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var n=t.styles[r]||{},i=t.attributes[r]||{},o=t.elements[r];!H(o)||!X(o)||(Object.assign(o.style,n),Object.keys(i).forEach(function(s){var l=i[s];l===!1?o.removeAttribute(s):o.setAttribute(s,l===!0?"":l)}))})}function Ru(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(n){var i=t.elements[n],o=t.attributes[n]||{},s=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:r[n]),l=s.reduce(function(u,c){return u[c]="",u},{});!H(i)||!X(i)||(Object.assign(i.style,l),Object.keys(o).forEach(function(u){i.removeAttribute(u)}))})}}var Nu=[ku,Du,Fu,{name:"applyStyles",enabled:!0,phase:"write",fn:Mu,effect:Ru,requires:["computeStyles"]}],Vu=Pu({defaultModifiers:Nu});function Hu(e){return e==="x"?"y":"x"}function _t(e,t,r){return $e(e,bt(t,r))}function Uu(e,t,r){var n=_t(e,t,r);return n>r?r:n}function Wu(e){var t=e.state,r=e.options,n=e.name,i=r.mainAxis,o=i===void 0?!0:i,s=r.altAxis,l=s===void 0?!1:s,u=r.boundary,c=r.rootBoundary,f=r.altBoundary,d=r.padding,h=r.tether,p=h===void 0?!0:h,v=r.tetherOffset,b=v===void 0?0:v,w=Ar(t,{boundary:u,rootBoundary:c,padding:d,altBoundary:f}),x=ne(t.placement),A=Me(t.placement),I=!A,E=ri(x),O=Hu(E),g=t.modifiersData.popperOffsets,y=t.rects.reference,S=t.rects.popper,_=typeof b=="function"?b(Object.assign({},t.rects,{placement:t.placement})):b,T=typeof _=="number"?{mainAxis:_,altAxis:_}:Object.assign({mainAxis:0,altAxis:0},_),$=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,C={x:0,y:0};if(!!g){if(o){var D,q=E==="y"?z:re,M=E==="y"?Q:pe,L=E==="y"?"height":"width",F=g[E],Ct=F+w[q],xe=F-w[M],kt=p?-S[L]/2:0,qr=A===Fe?y[L]:S[L],tt=A===Fe?-S[L]:-y[L],Bt=t.elements.arrow,Re=p&&Bt?Xn(Bt):{width:0,height:0},me=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:ii(),rt=me[q],Dt=me[M],Ae=_t(0,y[L],Re[L]),Lr=I?y[L]/2-kt-Ae-rt-T.mainAxis:qr-Ae-rt-T.mainAxis,md=I?-y[L]/2+kt+Ae+Dt+T.mainAxis:tt+Ae+Dt+T.mainAxis,Fr=t.elements.arrow&&St(t.elements.arrow),gd=Fr?E==="y"?Fr.clientTop||0:Fr.clientLeft||0:0,Fi=(D=$==null?void 0:$[E])!=null?D:0,vd=F+Lr-Fi-gd,yd=F+md-Fi,Mi=_t(p?bt(Ct,vd):Ct,F,p?$e(xe,yd):xe);g[E]=Mi,C[E]=Mi-F}if(l){var Ri,bd=E==="x"?z:re,wd=E==="x"?Q:pe,Ie=g[O],jt=O==="y"?"height":"width",Ni=Ie+w[bd],Vi=Ie-w[wd],Mr=[z,re].indexOf(x)!==-1,Hi=(Ri=$==null?void 0:$[O])!=null?Ri:0,Ui=Mr?Ni:Ie-y[jt]-S[jt]-Hi+T.altAxis,Wi=Mr?Ie+y[jt]+S[jt]-Hi-T.altAxis:Vi,zi=p&&Mr?Uu(Ui,Ie,Wi):_t(p?Ui:Ni,Ie,p?Wi:Vi);g[O]=zi,C[O]=zi-Ie}t.modifiersData[n]=C}}const zu={name:"preventOverflow",enabled:!0,phase:"main",fn:Wu,requiresIfExists:["offset"]};var Gu={left:"right",right:"left",bottom:"top",top:"bottom"};function Tt(e){return e.replace(/left|right|bottom|top/g,function(t){return Gu[t]})}var Ku={start:"end",end:"start"};function ui(e){return e.replace(/start|end/g,function(t){return Ku[t]})}function Xu(e,t){t===void 0&&(t={});var r=t,n=r.placement,i=r.boundary,o=r.rootBoundary,s=r.padding,l=r.flipVariations,u=r.allowedAutoPlacements,c=u===void 0?iu:u,f=Me(n),d=f?l?Zn:Zn.filter(function(v){return Me(v)===f}):$t,h=d.filter(function(v){return c.indexOf(v)>=0});h.length===0&&(h=d,process.env.NODE_ENV!=="production"&&console.error(["Popper: The `allowedAutoPlacements` option did not allow any","placements. Ensure the `placement` option matches the variation","of the allowed placements.",'For example, "auto" cannot be used to allow "bottom-start".','Use "auto-start" instead.'].join(" ")));var p=h.reduce(function(v,b){return v[b]=Ar(e,{placement:b,boundary:i,rootBoundary:o,padding:s})[ne(b)],v},{});return Object.keys(p).sort(function(v,b){return p[v]-p[b]})}function Qu(e){if(ne(e)===Ot)return[];var t=Tt(e);return[ui(e),t,ui(t)]}function Yu(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var i=r.mainAxis,o=i===void 0?!0:i,s=r.altAxis,l=s===void 0?!0:s,u=r.fallbackPlacements,c=r.padding,f=r.boundary,d=r.rootBoundary,h=r.altBoundary,p=r.flipVariations,v=p===void 0?!0:p,b=r.allowedAutoPlacements,w=t.options.placement,x=ne(w),A=x===w,I=u||(A||!v?[Tt(w)]:Qu(w)),E=[w].concat(I).reduce(function(Re,me){return Re.concat(ne(me)===Ot?Xu(t,{placement:me,boundary:f,rootBoundary:d,padding:c,flipVariations:v,allowedAutoPlacements:b}):me)},[]),O=t.rects.reference,g=t.rects.popper,y=new Map,S=!0,_=E[0],T=0;T=0,M=q?"width":"height",L=Ar(t,{placement:$,boundary:f,rootBoundary:d,altBoundary:h,padding:c}),F=q?D?pe:re:D?Q:z;O[M]>g[M]&&(F=Tt(F));var Ct=Tt(F),xe=[];if(o&&xe.push(L[C]<=0),l&&xe.push(L[F]<=0,L[Ct]<=0),xe.every(function(Re){return Re})){_=$,S=!1;break}y.set($,xe)}if(S)for(var kt=v?3:1,qr=function(me){var rt=E.find(function(Dt){var Ae=y.get(Dt);if(Ae)return Ae.slice(0,me).every(function(Lr){return Lr})});if(rt)return _=rt,"break"},tt=kt;tt>0;tt--){var Bt=qr(tt);if(Bt==="break")break}t.placement!==_&&(t.modifiersData[n]._skip=!0,t.placement=_,t.reset=!0)}}const Ju={name:"flip",enabled:!0,phase:"main",fn:Yu,requiresIfExists:["offset"],data:{_skip:!1}},_e=(e,t)=>{const r=e.__vccOpts||e;for(const[n,i]of t)r[n]=i;return r},Zu={components:{OnClickOutside:Gn},props:{spladeId:{type:String,required:!0},placement:{type:String,default:"bottom-start",required:!1},strategy:{type:String,default:"absolute",required:!1},inline:{type:Boolean,default:!1,required:!1},disabled:{type:Boolean,default:!1,required:!1},teleport:{type:Boolean,default:!1,required:!1},closeOnClick:{type:Boolean,default:!1,required:!1}},data(){return{opened:!1,popper:null}},computed:{buttonStyle(){return this.inline?{display:"inline"}:{}},wrapperStyle(){const e={position:"relative"};return this.inline&&(e.display="inline"),e}},watch:{opened(){this.popper.update()}},mounted:async function(){this.teleport&&await a.nextTick();const e=this.teleport?document.querySelector(`div[data-splade-dropdown-id="${this.spladeId}"]`):this.$refs.tooltip.children[0];this.popper=Vu(this.$refs.button,e,{placement:this.placement,modifiers:[Ju,zu],strategy:this.strategy})},methods:{toggle(){this.opened=!this.opened},hide(){this.opened=!1}}},ec={ref:"tooltip"};function tc(e,t,r,n,i,o){const s=a.resolveComponent("OnClickOutside");return a.openBlock(),a.createBlock(s,{style:a.normalizeStyle(o.wrapperStyle),do:o.hide,opened:i.opened,"ignore-inner-targets":!r.closeOnClick},{default:a.withCtx(()=>[a.createElementVNode("div",{ref:"button",style:a.normalizeStyle(o.buttonStyle)},[a.renderSlot(e.$slots,"button",{toggle:o.toggle,disabled:r.disabled})],4),a.createElementVNode("div",ec,[a.renderSlot(e.$slots,"default",{hide:o.hide,opened:i.opened})],512)]),_:3},8,["style","do","opened","ignore-inner-targets"])}const rc=_e(Zu,[["render",tc]]),nc={__name:"DynamicHtml",props:{keepAliveKey:{type:String,required:!0},name:{type:String,required:!0}},setup(e){const t=a.inject("$splade")||{},r=a.inject("$spladeOptions")||{};return(n,i)=>a.unref(t).isSsr?(a.openBlock(),a.createBlock(J,{key:e.keepAliveKey,html:a.unref(t).htmlForDynamicComponent(e.name)},null,8,["html"])):(a.openBlock(),a.createBlock(a.KeepAlive,{key:0,max:a.unref(r).max_keep_alive},[(a.openBlock(),a.createBlock(J,{key:e.keepAliveKey,html:a.unref(t).htmlForDynamicComponent(e.name)},null,8,["html"]))],1032,["max"]))}};function ci(e){return e&&e.length?e[0]:void 0}const ic={inject:["stack"],computed:{values(){return m.validationErrors(this.stack)}},render(){const e=this;return this.$slots.default({has(t){return N(e.values,t)},first(t){return ci(e.values[t]||[])},all:{...this.values},...this.values})}},oc={props:{private:{type:Boolean,required:!1,default:!1},channel:{type:String,required:!0},listeners:{type:Array,required:!0}},data(){return{subscribed:!1,subscription:null,subscriptions:[],events:[]}},beforeUnmount(){this.subscription&&(window.Echo.leave(this.subscription.subscription.name),this.subscription=null,this.subscriptions=[])},mounted(){this.subscription=this.private?window.Echo.private(this.channel):window.Echo.channel(this.channel),this.subscription.on("pusher:subscription_succeeded",()=>{this.subscribed=!0}),this.listeners.forEach(e=>{const t=this.subscription.listen(e,r=>{const n="splade.redirect",i="splade.refresh",o="splade.toast";let s=null,l=!1,u=[];le(r,c=>{!K(c)||(n in c&&(s=c[n]),i in c&&(l=c[i]),o in c&&u.push(c))}),s?m.visit(s):l?m.refresh():this.events.push({name:e,data:r}),u.length>0&&u.forEach(c=>{m.pushToast(c)}),this.$root.$emit(`event.${e}`,r)});this.subscriptions.push(t)})},render(){return this.$slots.default({subscribed:this.subscribed,events:this.events})}},ac={props:{form:{type:Object,required:!0},field:{type:String,required:!0},multiple:{type:Boolean,required:!0}},data(){return{filenames:[]}},methods:{handleFileInput(e){const t=Object.values(e.target.files);this.form.$put(this.field,this.multiple?t:t[0]),this.filenames=[],t.forEach(r=>{this.filenames.push(r.name)})}}},sc={ref:"file"};function lc(e,t,r,n,i,o){return a.openBlock(),a.createElementBlock("div",sc,[a.renderSlot(e.$slots,"default",{handleFileInput:o.handleFileInput,filenames:i.filenames})],512)}const uc=_e(ac,[["render",lc]]),cc={inject:["stack"],computed:{values(){return m.flashData(this.stack)}},render(){const e=this;return this.$slots.default({has(t){return N(e.values,t)},...this.values})}};function fi(e,t,r){e=e||{},t=t||new FormData,r=r||null;for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&pi(t,di(r,n),e[n]);return t}function di(e,t){return e?e+"["+t+"]":t}function pi(e,t,r){if(Array.isArray(r))return Array.from(r.keys()).forEach(n=>pi(e,di(t,n.toString()),r[n]));if(r instanceof Date)return e.append(t,r.toISOString());if(r instanceof File)return e.append(t,r,r.name);if(r instanceof Blob)return e.append(t,r);if(typeof r=="boolean")return e.append(t,r?"1":"0");if(typeof r=="string")return e.append(t,r);if(typeof r=="number")return e.append(t,`${r}`);if(r==null)return e.append(t,"");fi(r,e,t)}function fc(){this.__data__=new Z,this.size=0}function dc(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function pc(e){return this.__data__.get(e)}function hc(e){return this.__data__.has(e)}var mc=200;function gc(e,t){var r=this.__data__;if(r instanceof Z){var n=r.__data__;if(!We||n.lengthl))return!1;var c=o.get(e),f=o.get(t);if(c&&f)return c==t&&f==e;var d=-1,h=!0,p=r&$c?new xt:void 0;for(o.set(e,t),o.set(t,e);++d-1?i[o?t[s]:s]:void 0}}function Tf(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o({})},confirm:{type:[Boolean,String],required:!1,default:!1},confirmText:{type:String,required:!1,default:""},confirmButton:{type:String,required:!1,default:""},cancelButton:{type:String,required:!1,default:""},stay:{type:Boolean,require:!1,default:!1},restoreOnSuccess:{type:Boolean,required:!1,default:!0},resetOnSuccess:{type:Boolean,required:!1,default:!1},scrollOnError:{type:Boolean,required:!1,default:!0},submitOnChange:{type:[Boolean,Array],required:!1,default:!1}},emits:["success","error"],data(){return{missingAttributes:[],values:Object.assign({},{...this.default}),processing:!1,wasSuccessful:!1,recentlySuccessful:!1,recentlySuccessfulTimeoutId:null,formElement:null}},computed:{$all(){return this.values},rawErrors(){return m.validationErrors(this.stack)},errors(){return Di(this.rawErrors,e=>e.join(` -`))}},mounted(){let e=document.querySelector(`form[data-splade-id="${this.spladeId}"]`);e||(e=document),this.formElement=e,this.missingAttributes.forEach(t=>{let r="";const n=e.querySelector(`[name="${t}"]`);n?r=n.type==="checkbox"?!1:"":e.querySelector(`[name="${t}[]"]`)?r=[]:(e.querySelector(`[name^="${t}."]`)||e.querySelector(`[name^="${t}["]`))&&(r={}),this.$put(t,r)}),this.missingAttributes=[],this.submitOnChange===!0?this.$watch("values",()=>{this.$nextTick(()=>this.request())},{deep:!0}):j(this.submitOnChange)&&this.submitOnChange.forEach(t=>{this.$watch(`values.${t}`,()=>{this.$nextTick(()=>this.request())},{deep:!0})})},methods:{hasError(e){return e in this.errors},reset(){this.values={}},restore(){this.values=Object.assign({},{...this.default})},$put(e,t){return Wn(this.values,e,t)},focusAndScrollToElement(e){let t=!0;if(e._flatpickr&&(t=!1),e.tagName==="SELECT"&&e.getAttribute("data-choice")&&(t=!1),t){const r=new IntersectionObserver(n=>{let[i]=n;i.isIntersecting&&(setTimeout(()=>i.target.focus(),150),r.disconnect())});r.observe(e)}e.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})},submit(e){if(e){const t=e.submitter;t&&t.name&&this.$put(t.name,t.value)}if(!this.confirm)return this.request();m.confirm(Bi(this.confirm)?"":this.confirm,this.confirmText,this.confirmButton,this.cancelButton).then(()=>{this.request()}).catch(()=>{})},async request(){await this.$nextTick(),this.processing=!0,this.wasSuccessful=!1,this.recentlySuccessful=!1,clearTimeout(this.recentlySuccessfulTimeoutId);const e=this.values instanceof FormData?this.values:fi(this.values),t={Accept:"application/json"};this.stay&&(t["X-Splade-Prevent-Refresh"]=!0);let r=this.method.toUpperCase();r!=="GET"&&r!=="POST"&&(e.append("_method",r),r="POST"),m.request(this.action,r,e,t).then(n=>{this.$emit("success",n),this.restoreOnSuccess&&this.restore(),this.resetOnSuccess&&this.reset(),this.processing=!1,this.wasSuccessful=!0,this.recentlySuccessful=!0,this.recentlySuccessfulTimeoutId=setTimeout(()=>this.recentlySuccessful=!1,2e3)}).catch(async n=>{if(this.processing=!1,this.$emit("error",n),!this.scrollOnError)return;await this.$nextTick();const i=ki(Object.keys(this.errors),o=>this.formElement.querySelector(`[data-validation-key="${o}"]`));i&&this.focusAndScrollToElement(this.formElement.querySelector(`[data-validation-key="${i}"]`))})}},render(){const e=this;return this.$slots.default(new Proxy({},{ownKeys(){return Object.keys(e.values)},get(t,r){return["$all","$attrs","$put","errors","restore","reset","hasError","processing","rawErrors","submit","wasSuccessful","recentlySuccessful"].includes(r)?e[r]:(N(e.values,r)||(e.missingAttributes.push(r),e.$put(r,"")),vr(e.values,r))},set(t,r,n){return e.$put(r,n)}}))}},Df={props:{flatpickr:{type:[Boolean,Object],required:!1,default:!1},jsFlatpickrOptions:{type:Object,required:!1,default:()=>({})},modelValue:{type:[String,Number],required:!1}},emits:["update:modelValue"],data(){return{disabled:!1,element:null,flatpickrInstance:null,observer:null}},watch:{modelValue(e){this.flatpickrInstance&&this.flatpickrInstance.setDate(e)}},mounted(){this.element=this.$refs.input.querySelector("input"),this.flatpickr&&this.initFlatpickr(this.element),this.disabled=this.element.disabled;const e=this;this.observer=new MutationObserver(function(t){t.forEach(function(r){r.attributeName==="disabled"&&(e.disabled=r.target.disabled)})}),this.observer.observe(this.element,{attributes:!0})},beforeUnmount(){this.observer.disconnect(),this.flatpickrInstance&&this.flatpickrInstance.destroy()},methods:{initFlatpickr(e){import("flatpickr").then(t=>{this.flatpickrInstance=t.default(e,Object.assign({},this.flatpickr,this.jsFlatpickrOptions,{onChange:(r,n)=>{this.flatpickrInstance.config.mode==="range"&&this.flatpickrInstance.selectedDates.length<2||n!=this.modelValue&&this.$emit("update:modelValue",n)}})),this.modelValue&&this.flatpickrInstance.setDate(this.modelValue)})}}},jf={ref:"input"};function qf(e,t,r,n,i,o){return a.openBlock(),a.createElementBlock("div",jf,[a.renderSlot(e.$slots,"default",{disabled:i.disabled})],512)}const Lf=_e(Df,[["render",qf]]),Ff={components:{Render:J},props:{name:{type:String,required:!0},url:{type:String,required:!1,default(){return m.isSsr?"":window.location.href}},show:{type:Boolean,required:!1,default:!0}},data(){return{html:null}},watch:{show(e){e?this.request():this.html=null}},mounted(){this.show&&this.request()},methods:{async request(){this.html=null,m.lazy(this.url,this.name).then(e=>{this.html=e.data.html})}}};function Mf(e,t,r,n,i,o){const s=a.resolveComponent("Render");return i.html?(a.openBlock(),a.createBlock(s,{key:0,html:i.html},null,8,["html"])):r.show?a.renderSlot(e.$slots,"default",{key:1}):a.createCommentVNode("",!0)}const Rf=_e(Ff,[["render",Mf]]),Nf=["href","onClick"],Vf={__name:"Link",props:{href:{type:String,required:!0},replace:{type:Boolean,required:!1,default:!1},confirm:{type:[Boolean,String],required:!1,default:!1},confirmText:{type:String,required:!1,default:""},confirmButton:{type:String,required:!1,default:""},cancelButton:{type:String,required:!1,default:""},modal:{type:Boolean,required:!1,default:!1},slideover:{type:Boolean,required:!1,default:!1},away:{type:Boolean,required:!1,default:!1}},setup(e){const t=e;function r(){if(!t.confirm)return n();m.confirm(Bi(t.confirm)?"":t.confirm,t.confirmText,t.confirmButton,t.cancelButton).then(()=>{n()}).catch(()=>{})}function n(){if(t.away)return window.location=t.href;if(t.modal)return m.modal(t.href);if(t.slideover)return m.slideover(t.href);t.replace?m.replace(t.href):m.visit(t.href)}return(i,o)=>(a.openBlock(),a.createElementBlock("a",{href:e.href,onClick:a.withModifiers(r,["prevent"])},[a.renderSlot(i.$slots,"default")],8,Nf))}},Hf={provide(){return{stack:this.stack}},props:{closeButton:{type:Boolean,required:!1,default:!0},type:{type:String,required:!0},stack:{type:Number,required:!0},onTopOfStack:{type:Boolean,required:!1,default:!1},maxWidth:{type:String,required:!1,default:e=>e.type==="modal"?"2xl":"md"}},emits:["close"],data(){return{isOpen:!1}},mounted(){this.setIsOpen(!0)},methods:{emitClose(){this.$emit("close")},close(){this.setIsOpen(!1)},setIsOpen(e){this.isOpen=e}},render(){return this.$slots.default({type:this.type,isOpen:this.isOpen,setIsOpen:this.setIsOpen,close:this.close,stack:this.stack,onTopOfStack:this.onTopOfStack,maxWidth:this.maxWidth,emitClose:this.emitClose,closeButton:this.closeButton,Dialog:fr,DialogPanel:dr,TransitionRoot:je,TransitionChild:De})}};function Uf(e,t){var r=-1,n=nt(e)?Array(e.length):[];return Nt(e,function(i,o,s){n[++r]=t(i,o,s)}),n}function ji(e,t){var r=j(e)?bn:Uf;return r(e,et(t))}const Wf={inject:["stack"],props:{choices:{type:[Boolean,Object],required:!1,default:!1},jsChoicesOptions:{type:Object,required:!1,default:()=>({})},multiple:{type:Boolean,required:!1,default:!1},modelValue:{type:[String,Number,Array],required:!1},placeholder:{type:Boolean,required:!1,default:!1}},emits:["update:modelValue"],data(){return{choicesInstance:null,element:null,placeholderText:null,headlessListener:null}},computed:{hasSelection(){return this.multiple?Array.isArray(this.model)?this.model.length>0:!1:!(this.model===null||this.model==="")}},watch:{modelValue(e,t){if(this.choicesInstance){if(JSON.stringify(e)==JSON.stringify(t))return;this.setValueOnChoices(e)}}},mounted(){this.element=this.$refs.select.querySelector("select"),this.choices&&this.initChoices(this.element)},beforeUnmount(){var e;this.choices&&this.choicesInstance&&(this.headlessListener&&((e=document.querySelector("#headlessui-portal-root"))==null||e.removeEventListener("click",this.headlessListener)),this.choicesInstance.destroy())},methods:{setValueOnChoices(e){Array.isArray(e)&&(e=ji(e,t=>`${t}`),this.choicesInstance.removeActiveItems()),e===null&&(e=""),this.choicesInstance.setChoiceByValue(e),this.updateHasSelectionAttribute(),this.handlePlaceholderVisibility()},getItemOfCurrentModel(){const e=this.modelValue;return ki(this.choicesInstance._store.choices,t=>t.value==e)},handlePlaceholderVisibility(){if(!this.multiple)return;const e=this.choicesInstance.containerInner.element.querySelector("input.choices__input");this.placeholderText=e.placeholder?e.placeholder:this.placeholderText;const t=this.choicesInstance.getValue().length;e.placeholder=t?"":this.placeholderText?this.placeholderText:"",e.style.minWidth="0",e.style.width=t?"1px":"auto",e.style.paddingTop=t?"0px":"1px",e.style.paddingBottom=t?"0px":"1px"},initChoices(e){const t=Array.from(e.querySelectorAll("option:not([placeholder])")).length,r=this;import("choices.js").then(n=>{const i=Object.assign({},this.choices,this.jsChoicesOptions);if(r.choicesInstance=new n.default(e,i),r.stack>0&&(r.headlessListener=function(o){o.target===e&&r.choicesInstance.showDropdown()},document.querySelector("#headlessui-portal-root").addEventListener("click",r.headlessListener,{capture:!0})),this.choicesInstance.containerInner.element.setAttribute("data-select-name",e.name),e.hasAttribute("dusk")){const o=e.getAttribute("dusk");e.removeAttribute("dusk"),this.choicesInstance.containerInner.element.setAttribute("dusk",o)}this.handlePlaceholderVisibility(),this.updateHasSelectionAttribute(),e.addEventListener("change",function(){if(r.$emit("update:modelValue",r.choicesInstance.getValue(!0)),!r.multiple||t<1)return;r.choicesInstance.getValue().length>=t&&r.choicesInstance.hideDropdown()}),this.choicesInstance.containerInner.element.addEventListener("hideDropdownFromDusk",function(){r.choicesInstance.hideDropdown()}),e.addEventListener("showDropdown",function(){if(r.multiple||!r.modelValue)return;const o=r.getItemOfCurrentModel(),s=r.choicesInstance.dropdown.element.querySelector(`.choices__item[data-id="${o.id}"]`);r.choicesInstance.choiceList.scrollToChildElement(s,1),r.choicesInstance._highlightChoice(s)}),this.setValueOnChoices(this.modelValue)})},updateHasSelectionAttribute(){this.choicesInstance.containerInner.element.setAttribute("data-has-selection",this.hasSelection)}}},zf={ref:"select"};function Gf(e,t,r,n,i,o){return a.openBlock(),a.createElementBlock("div",zf,[a.renderSlot(e.$slots,"default")],512)}const Kf=_e(Wf,[["render",Gf]]),Xf={inject:["stack"],render(){const e=m.validationErrors(this.stack),t=m.flashData(this.stack),r=m.sharedData.value,n=Di(e,i=>i.join(` -`));return this.$slots.default({flash:t,errors:n,rawErrors:e,shared:r,hasError(i){return i in e},hasFlash(i){return N(t,i)},hasShared(i){return N(r,i)},hasErrors:Object.keys(e).length>0})}};function qi(e,t,r){return e===e&&(r!==void 0&&(e=e<=r?e:r),t!==void 0&&(e=e>=t?e:t)),e}function Qf(e,t,r){e=Jt(e),t=dt(t);var n=e.length;r=r===void 0?n:qi(Dr(r),0,n);var i=r;return r-=t.length,r>=0&&e.slice(r,i)==t}function Yf(e,t){var r=[];return Nt(e,function(n,i,o){t(n,i,o)&&r.push(n)}),r}function Jf(e,t){var r=j(e)?vi:Yf;return r(e,et(t))}function Li(e,t){return It(e,t)}function Pt(e,t,r){return e=Jt(e),r=r==null?0:qi(Dr(r),0,e.length),t=dt(t),e.slice(r,r+t.length)==t}const Zf={props:{striped:{type:Boolean,required:!1,default:!1},columns:{type:Object,required:!0},defaultVisibleToggleableColumns:{type:Array,required:!0},searchDebounce:{type:Number,required:!1,default:350},itemsOnThisPage:{type:Number,required:!1,default:0},itemsOnAllPages:{type:Number,required:!1,default:0}},data(){return{selectedItems:[],visibleColumns:[],forcedVisibleSearchInputs:[],debounceUpdateQuery:null,isLoading:!1,processingAction:!1}},computed:{columnsAreToggled(){return!Li(this.visibleColumns,this.defaultVisibleToggleableColumns)},hasForcedVisibleSearchInputs(){return this.forcedVisibleSearchInputs.length>0},allItemsFromAllPagesAreSelected(){return this.selectedItems.length===1&&this.selectedItems[0]==="*"},allVisibleItemsAreSelected(){const e=this.selectedItems.length;return e===1&&this.selectedItems[0]==="*"||e>0&&e===this.itemsOnThisPage},hasSelectedItems(){return this.selectedItems.length>0},totalSelectedItems(){const e=this.selectedItems.length;return e===1&&this.selectedItems[0]==="*"?this.itemsOnAllPages:e}},created(){this.debounceUpdateQuery=wr(function(e,t,r){this.updateQuery(e,t,r)},this.searchDebounce)},mounted(){const e=this.getCurrentQuery(),t=e.columns||[];le(e,(r,n)=>{if(Pt(n,"filter[")&&!r){const i=n.split("["),o=i[1].substring(0,i[1].length-1);this.forcedVisibleSearchInputs=[...this.forcedVisibleSearchInputs,o]}}),t.length===0?this.visibleColumns=this.defaultVisibleToggleableColumns:this.visibleColumns=t},methods:{visitLink(e,t){return t==="modal"?m.modal(e):t==="slideover"?m.slideover(e):m.visit(e)},reset(){this.forcedVisibleSearchInputs=[],this.visibleColumns=this.defaultVisibleToggleableColumns;let e=this.getCurrentQuery();e.columns=[],e.page=null,e.perPage=null,e.sort=null,le(e,(t,r)=>{Pt(r,"filter[")&&(e[r]=null)}),this.visitWithQueryObject(e,null,!0)},columnIsVisible(e){return this.visibleColumns.includes(e)},toggleColumn(e){const t=!this.columnIsVisible(e),r=Jf(this.columns,i=>i.can_be_hidden?i.key===e?t:this.visibleColumns.includes(i.key):!0);let n=ji(r,i=>i.key).sort();Li(n,this.defaultVisibleToggleableColumns)&&(n=[]),this.visibleColumns=n.length===0?this.defaultVisibleToggleableColumns:n,this.updateQuery("columns",n,null,!1)},disableSearchInput(e){this.forcedVisibleSearchInputs=this.forcedVisibleSearchInputs.filter(t=>t!=e),this.updateQuery(`filter[${e}]`,null)},showSearchInput(e){this.forcedVisibleSearchInputs=[...this.forcedVisibleSearchInputs,e],a.nextTick(()=>{document.querySelector(`[name="searchInput-${e}"]`).focus()})},isForcedVisible(e){return this.forcedVisibleSearchInputs.includes(e)},getCurrentQuery(){const e=window.location.search;if(!e)return{};let t={};return e.substring(1).split("&").forEach(r=>{const n=decodeURIComponent(r).split("=");let i=n[0];if(!Qf(i,"]")){t[i]=n[1];return}const o=i.split("["),s=o[1].substring(0,o[1].length-1);parseInt(s)==s?(i=o[0],j(t[i])||(t[i]=[]),t[i].push(n[1])):t[i]=n[1]}),t},updateQuery(e,t,r,n){typeof n>"u"&&(n=!0);let i=this.getCurrentQuery();i[e]=t,(Pt(e,"perPage")||Pt(e,"filter["))&&delete i.page,this.visitWithQueryObject(i,r,n)},visitWithQueryObject(e,t,r){var l;typeof r>"u"&&(r=!0);let n={};le(e,(u,c)=>{if(!j(u)){n[c]=u;return}u.length!==0&&u.forEach((f,d)=>{n[`${c}[${d}]`]=f})});let i="";le(n,(u,c)=>{u===null||u===[]||(i&&(i+="&"),i+=`${c}=${u}`)}),i&&(i="?"+i);const o=window.location.pathname+i;if(!r)return m.replaceUrlOfCurrentPage(o);this.isLoading=!0;let s=null;typeof t<"u"&&t&&(s=(l=document.querySelector(`[name="${t.name}"]`))==null?void 0:l.value),m.replace(o).then(()=>{this.isLoading=!1,typeof t<"u"&&t&&a.nextTick(()=>{const u=document.querySelector(`[name="${t.name}"]`);u.focus(),s&&(u.value=s)})})},async performBulkAction(e,t,r,n,i){if(t)try{await m.confirm(t===!0?"":t,r,n,i)}catch{return!1}this.isLoading=!0,m.request(e,"POST",{ids:this.selectedItems},{},!1).then(o=>{o.data}).catch(()=>{this.isLoading=!1})},setSelectedItems(e){this.selectedItems=j(e)?e:[]},itemIsSelected(e){return this.selectedItems.length==1&&this.selectedItems[0]=="*"?!0:this.selectedItems.includes(e)},setSelectedItem(e,t){t?this.selectedItems.push(e):this.selectedItems=this.selectedItems.filter(r=>r!==e)}},render(){return this.$slots.default({columnIsVisible:this.columnIsVisible,columnsAreToggled:this.columnsAreToggled,debounceUpdateQuery:this.debounceUpdateQuery,disableSearchInput:this.disableSearchInput,hasForcedVisibleSearchInputs:this.hasForcedVisibleSearchInputs,isForcedVisible:this.isForcedVisible,reset:this.reset,showSearchInput:this.showSearchInput,striped:this.striped,toggleColumn:this.toggleColumn,updateQuery:this.updateQuery,visit:this.visitLink,totalSelectedItems:this.totalSelectedItems,allItemsFromAllPagesAreSelected:this.allItemsFromAllPagesAreSelected,allVisibleItemsAreSelected:this.allVisibleItemsAreSelected,hasSelectedItems:this.hasSelectedItems,setSelectedItems:this.setSelectedItems,itemIsSelected:this.itemIsSelected,setSelectedItem:this.setSelectedItem,performBulkAction:this.performBulkAction,processingAction:this.processingAction,isLoading:this.isLoading})}},ed={data(){return{isMounted:!1}},mounted(){this.isMounted=!0}};function td(e,t,r,n,i,o){return i.isMounted?(a.openBlock(),a.createBlock(a.Teleport,a.normalizeProps(a.mergeProps({key:0},e.$attrs)),[a.renderSlot(e.$slots,"default")],16)):a.createCommentVNode("",!0)}const rd=_e(ed,[["render",td]]),nd={props:{autosize:{type:Boolean,required:!1,default:!1},modelValue:{type:[String,Number],required:!1}},data(){return{autosizeInstance:null,element:null}},watch:{modelValue(){!this.autosize||!this.autosizeInstance||import("autosize").then(e=>{a.nextTick(()=>e.default.update(this.element))})}},mounted(){this.element=this.$refs.textarea.querySelector("textarea"),this.autosize&&import("autosize").then(e=>{this.autosizeInstance=e.default(this.element)})},beforeUnmount(){this.autosize&&this.autosizeInstance&&import("autosize").then(e=>{e.default.destroy(this.element)})}},id={ref:"textarea"};function od(e,t,r,n,i,o){return a.openBlock(),a.createElementBlock("div",id,[a.renderSlot(e.$slots,"default")],512)}const ad=_e(nd,[["render",od]]),sd={props:{toastKey:{type:Number,required:!0},autoDismiss:{type:Number,required:!1,default:0}},emits:["dismiss"],data(){return{show:!0}},mounted(){this.autoDismiss&&setTimeout(()=>{this.setShow(!1)},this.autoDismiss*1e3)},methods:{setShow(e){this.show=e},emitDismiss(){this.$emit("dismiss")}},render(){return this.$slots.default({key:this.toastKey,show:this.show,setShow:this.setShow,emitDismiss:this.emitDismiss,TransitionRoot:je,TransitionChild:De})}},ld=["left-top","center-top","right-top","left-center","center-center","right-center","left-bottom","center-bottom","right-bottom"],ud={computed:{toasts:function(){return m.toastsReversed.value},hasBackdrop:function(){return m.toasts.value.filter(e=>!e.dismissed&&e.backdrop&&e.html).length>0}},methods:{dismissToast(e){m.dismissToast(e)}},render(){return this.$slots.default({positions:ld,toasts:this.toasts,dismissToast:this.dismissToast,hasBackdrop:this.hasBackdrop,Render:J,TransitionRoot:je,TransitionChild:De})}},cd={props:{default:{type:Object,required:!0}},data(){return{toggles:{...this.default}}},methods:{toggled(e){var t;return(t=this.toggles[e])!=null?t:!1},toggle(e){this.setToggle(e,!this.toggled(e))},setToggle(e,t){this.toggles[e]=t}},render(){const e=this;return this.$slots.default(new Proxy({},{ownKeys(){return Object.keys(e.toggles)},get(t,r){const n=Object.keys(e.toggles);if(n.length===1&&ci(n)==="default"){if(r==="toggled")return e.toggled("default");if(r==="setToggle")return i=>{e.setToggle("default",i)};if(r==="toggle")return()=>{e.toggle("default")}}return r==="setToggle"?(i,o)=>{e.setToggle(i,o)}:r==="toggle"?i=>{e.toggle(i)}:e.toggled(r)}}))}},fd={render(){return this.$slots.default({TransitionRoot:je,TransitionChild:De})}},dd={created:(e,t)=>{if(m.isSsr)return;const r=`preserveScroll-${t.arg}`,n=m.restore(r);n&&a.nextTick(()=>{typeof e.scrollTo=="function"?e.scrollTo(n.left,n.top):(e.scrollTop=n.top,e.scrollLeft=n.left)});const i=function(){m.remember(r,{top:e.scrollTop,left:e.scrollLeft})};e.addEventListener("scroll",wr(i,100)),i()}},jr={injectCSS(e){const t=document.createElement("style");t.type="text/css",t.textContent=` +`,"We recommend using the popper element as a wrapper around an inner","element that can have any CSS property transitioned for animations."].join(" "))}var f={placement:ie(t.placement),variation:Me(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,li(Object.assign({},f,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:u})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,li(Object.assign({},f,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Fu={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Lu,data:{}};function Mu(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var n=t.styles[r]||{},i=t.attributes[r]||{},o=t.elements[r];!H(o)||!X(o)||(Object.assign(o.style,n),Object.keys(i).forEach(function(s){var l=i[s];l===!1?o.removeAttribute(s):o.setAttribute(s,l===!0?"":l)}))})}function Ru(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(n){var i=t.elements[n],o=t.attributes[n]||{},s=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:r[n]),l=s.reduce(function(u,c){return u[c]="",u},{});!H(i)||!X(i)||(Object.assign(i.style,l),Object.keys(o).forEach(function(u){i.removeAttribute(u)}))})}}var Nu=[ku,Du,Fu,{name:"applyStyles",enabled:!0,phase:"write",fn:Mu,effect:Ru,requires:["computeStyles"]}],Vu=Pu({defaultModifiers:Nu});function Hu(e){return e==="x"?"y":"x"}function _t(e,t,r){return $e(e,bt(t,r))}function Uu(e,t,r){var n=_t(e,t,r);return n>r?r:n}function Wu(e){var t=e.state,r=e.options,n=e.name,i=r.mainAxis,o=i===void 0?!0:i,s=r.altAxis,l=s===void 0?!1:s,u=r.boundary,c=r.rootBoundary,f=r.altBoundary,h=r.padding,d=r.tether,p=d===void 0?!0:d,m=r.tetherOffset,y=m===void 0?0:m,w=Ar(t,{boundary:u,rootBoundary:c,padding:h,altBoundary:f}),x=ie(t.placement),A=Me(t.placement),I=!A,E=ri(x),O=Hu(E),v=t.modifiersData.popperOffsets,b=t.rects.reference,S=t.rects.popper,_=typeof y=="function"?y(Object.assign({},t.rects,{placement:t.placement})):y,T=typeof _=="number"?{mainAxis:_,altAxis:_}:Object.assign({mainAxis:0,altAxis:0},_),$=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,C={x:0,y:0};if(!!v){if(o){var D,q=E==="y"?z:ne,M=E==="y"?Q:pe,L=E==="y"?"height":"width",F=v[E],Ct=F+w[q],xe=F-w[M],kt=p?-S[L]/2:0,qr=A===Fe?b[L]:S[L],tt=A===Fe?-S[L]:-b[L],Bt=t.elements.arrow,Re=p&&Bt?Xn(Bt):{width:0,height:0},me=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:ii(),rt=me[q],Dt=me[M],Ae=_t(0,b[L],Re[L]),Lr=I?b[L]/2-kt-Ae-rt-T.mainAxis:qr-Ae-rt-T.mainAxis,md=I?-b[L]/2+kt+Ae+Dt+T.mainAxis:tt+Ae+Dt+T.mainAxis,Fr=t.elements.arrow&&St(t.elements.arrow),gd=Fr?E==="y"?Fr.clientTop||0:Fr.clientLeft||0:0,Fi=(D=$==null?void 0:$[E])!=null?D:0,vd=F+Lr-Fi-gd,yd=F+md-Fi,Mi=_t(p?bt(Ct,vd):Ct,F,p?$e(xe,yd):xe);v[E]=Mi,C[E]=Mi-F}if(l){var Ri,bd=E==="x"?z:ne,wd=E==="x"?Q:pe,Ie=v[O],jt=O==="y"?"height":"width",Ni=Ie+w[bd],Vi=Ie-w[wd],Mr=[z,ne].indexOf(x)!==-1,Hi=(Ri=$==null?void 0:$[O])!=null?Ri:0,Ui=Mr?Ni:Ie-b[jt]-S[jt]-Hi+T.altAxis,Wi=Mr?Ie+b[jt]+S[jt]-Hi-T.altAxis:Vi,zi=p&&Mr?Uu(Ui,Ie,Wi):_t(p?Ui:Ni,Ie,p?Wi:Vi);v[O]=zi,C[O]=zi-Ie}t.modifiersData[n]=C}}const zu={name:"preventOverflow",enabled:!0,phase:"main",fn:Wu,requiresIfExists:["offset"]};var Gu={left:"right",right:"left",bottom:"top",top:"bottom"};function Tt(e){return e.replace(/left|right|bottom|top/g,function(t){return Gu[t]})}var Ku={start:"end",end:"start"};function ui(e){return e.replace(/start|end/g,function(t){return Ku[t]})}function Xu(e,t){t===void 0&&(t={});var r=t,n=r.placement,i=r.boundary,o=r.rootBoundary,s=r.padding,l=r.flipVariations,u=r.allowedAutoPlacements,c=u===void 0?iu:u,f=Me(n),h=f?l?Zn:Zn.filter(function(m){return Me(m)===f}):$t,d=h.filter(function(m){return c.indexOf(m)>=0});d.length===0&&(d=h,process.env.NODE_ENV!=="production"&&console.error(["Popper: The `allowedAutoPlacements` option did not allow any","placements. Ensure the `placement` option matches the variation","of the allowed placements.",'For example, "auto" cannot be used to allow "bottom-start".','Use "auto-start" instead.'].join(" ")));var p=d.reduce(function(m,y){return m[y]=Ar(e,{placement:y,boundary:i,rootBoundary:o,padding:s})[ie(y)],m},{});return Object.keys(p).sort(function(m,y){return p[m]-p[y]})}function Qu(e){if(ie(e)===Ot)return[];var t=Tt(e);return[ui(e),t,ui(t)]}function Yu(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var i=r.mainAxis,o=i===void 0?!0:i,s=r.altAxis,l=s===void 0?!0:s,u=r.fallbackPlacements,c=r.padding,f=r.boundary,h=r.rootBoundary,d=r.altBoundary,p=r.flipVariations,m=p===void 0?!0:p,y=r.allowedAutoPlacements,w=t.options.placement,x=ie(w),A=x===w,I=u||(A||!m?[Tt(w)]:Qu(w)),E=[w].concat(I).reduce(function(Re,me){return Re.concat(ie(me)===Ot?Xu(t,{placement:me,boundary:f,rootBoundary:h,padding:c,flipVariations:m,allowedAutoPlacements:y}):me)},[]),O=t.rects.reference,v=t.rects.popper,b=new Map,S=!0,_=E[0],T=0;T=0,M=q?"width":"height",L=Ar(t,{placement:$,boundary:f,rootBoundary:h,altBoundary:d,padding:c}),F=q?D?pe:ne:D?Q:z;O[M]>v[M]&&(F=Tt(F));var Ct=Tt(F),xe=[];if(o&&xe.push(L[C]<=0),l&&xe.push(L[F]<=0,L[Ct]<=0),xe.every(function(Re){return Re})){_=$,S=!1;break}b.set($,xe)}if(S)for(var kt=m?3:1,qr=function(me){var rt=E.find(function(Dt){var Ae=b.get(Dt);if(Ae)return Ae.slice(0,me).every(function(Lr){return Lr})});if(rt)return _=rt,"break"},tt=kt;tt>0;tt--){var Bt=qr(tt);if(Bt==="break")break}t.placement!==_&&(t.modifiersData[n]._skip=!0,t.placement=_,t.reset=!0)}}const Ju={name:"flip",enabled:!0,phase:"main",fn:Yu,requiresIfExists:["offset"],data:{_skip:!1}},_e=(e,t)=>{const r=e.__vccOpts||e;for(const[n,i]of t)r[n]=i;return r},Zu={components:{OnClickOutside:Gn},props:{spladeId:{type:String,required:!0},placement:{type:String,default:"bottom-start",required:!1},strategy:{type:String,default:"absolute",required:!1},inline:{type:Boolean,default:!1,required:!1},disabled:{type:Boolean,default:!1,required:!1},teleport:{type:Boolean,default:!1,required:!1},closeOnClick:{type:Boolean,default:!1,required:!1}},data(){return{opened:!1,popper:null}},computed:{buttonStyle(){return this.inline?{display:"inline"}:{}},wrapperStyle(){const e={position:"relative"};return this.inline&&(e.display="inline"),e}},watch:{opened(){this.popper.update()}},mounted:async function(){this.teleport&&await a.nextTick();const e=this.teleport?document.querySelector(`div[data-splade-dropdown-id="${this.spladeId}"]`):this.$refs.tooltip.children[0];this.popper=Vu(this.$refs.button,e,{placement:this.placement,modifiers:[Ju,zu],strategy:this.strategy})},methods:{toggle(){this.opened=!this.opened},hide(){this.opened=!1}}},ec={ref:"tooltip"};function tc(e,t,r,n,i,o){const s=a.resolveComponent("OnClickOutside");return a.openBlock(),a.createBlock(s,{style:a.normalizeStyle(o.wrapperStyle),do:o.hide,opened:i.opened,"ignore-inner-targets":!r.closeOnClick},{default:a.withCtx(()=>[a.createElementVNode("div",{ref:"button",style:a.normalizeStyle(o.buttonStyle)},[a.renderSlot(e.$slots,"button",{toggle:o.toggle,disabled:r.disabled})],4),a.createElementVNode("div",ec,[a.renderSlot(e.$slots,"default",{hide:o.hide,opened:i.opened})],512)]),_:3},8,["style","do","opened","ignore-inner-targets"])}const rc=_e(Zu,[["render",tc]]),nc={__name:"DynamicHtml",props:{keepAliveKey:{type:String,required:!0},name:{type:String,required:!0}},setup(e){const t=a.inject("$splade")||{},r=a.inject("$spladeOptions")||{};return(n,i)=>a.unref(t).isSsr?(a.openBlock(),a.createBlock(Z,{key:e.keepAliveKey,html:a.unref(t).htmlForDynamicComponent(e.name)},null,8,["html"])):(a.openBlock(),a.createBlock(a.KeepAlive,{key:0,max:a.unref(r).max_keep_alive},[(a.openBlock(),a.createBlock(Z,{key:e.keepAliveKey,html:a.unref(t).htmlForDynamicComponent(e.name)},null,8,["html"]))],1032,["max"]))}};function ci(e){return e&&e.length?e[0]:void 0}const ic={inject:["stack"],computed:{values(){return g.validationErrors(this.stack)}},render(){const e=this;return this.$slots.default({has(t){return N(e.values,t)},first(t){return ci(e.values[t]||[])},all:{...this.values},...this.values})}},oc={props:{private:{type:Boolean,required:!1,default:!1},channel:{type:String,required:!0},listeners:{type:Array,required:!0}},data(){return{subscribed:!1,subscription:null,subscriptions:[],events:[]}},beforeUnmount(){this.subscription&&(window.Echo.leave(this.subscription.subscription.name),this.subscription=null,this.subscriptions=[])},mounted(){this.subscription=this.private?window.Echo.private(this.channel):window.Echo.channel(this.channel),this.subscription.on("pusher:subscription_succeeded",()=>{this.subscribed=!0}),this.listeners.forEach(e=>{const t=this.subscription.listen(e,r=>{const n="splade.redirect",i="splade.refresh",o="splade.toast";let s=null,l=!1,u=[];Y(r,c=>{!K(c)||(n in c&&(s=c[n]),i in c&&(l=c[i]),o in c&&u.push(c))}),s?g.visit(s):l?g.refresh():this.events.push({name:e,data:r}),u.length>0&&u.forEach(c=>{g.pushToast(c)}),this.$root.$emit(`event.${e}`,r)});this.subscriptions.push(t)})},render(){return this.$slots.default({subscribed:this.subscribed,events:this.events})}},ac={props:{form:{type:Object,required:!0},field:{type:String,required:!0},multiple:{type:Boolean,required:!0}},data(){return{filenames:[]}},methods:{handleFileInput(e){const t=Object.values(e.target.files);this.form.$put(this.field,this.multiple?t:t[0]),this.filenames=[],t.forEach(r=>{this.filenames.push(r.name)})}}},sc={ref:"file"};function lc(e,t,r,n,i,o){return a.openBlock(),a.createElementBlock("div",sc,[a.renderSlot(e.$slots,"default",{handleFileInput:o.handleFileInput,filenames:i.filenames})],512)}const uc=_e(ac,[["render",lc]]),cc={inject:["stack"],computed:{values(){return g.flashData(this.stack)}},render(){const e=this;return this.$slots.default({has(t){return N(e.values,t)},...this.values})}};function fi(e,t,r){e=e||{},t=t||new FormData,r=r||null;for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&pi(t,di(r,n),e[n]);return t}function di(e,t){return e?e+"["+t+"]":t}function pi(e,t,r){if(Array.isArray(r))return Array.from(r.keys()).forEach(n=>pi(e,di(t,n.toString()),r[n]));if(r instanceof Date)return e.append(t,r.toISOString());if(r instanceof File)return e.append(t,r,r.name);if(r instanceof Blob)return e.append(t,r);if(typeof r=="boolean")return e.append(t,r?"1":"0");if(typeof r=="string")return e.append(t,r);if(typeof r=="number")return e.append(t,`${r}`);if(r==null)return e.append(t,"");fi(r,e,t)}function fc(){this.__data__=new ee,this.size=0}function dc(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function pc(e){return this.__data__.get(e)}function hc(e){return this.__data__.has(e)}var mc=200;function gc(e,t){var r=this.__data__;if(r instanceof ee){var n=r.__data__;if(!We||n.lengthl))return!1;var c=o.get(e),f=o.get(t);if(c&&f)return c==t&&f==e;var h=-1,d=!0,p=r&$c?new xt:void 0;for(o.set(e,t),o.set(t,e);++h-1?i[o?t[s]:s]:void 0}}function Tf(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o({})},confirm:{type:[Boolean,String],required:!1,default:!1},confirmText:{type:String,required:!1,default:""},confirmButton:{type:String,required:!1,default:""},cancelButton:{type:String,required:!1,default:""},stay:{type:Boolean,require:!1,default:!1},restoreOnSuccess:{type:Boolean,required:!1,default:!0},resetOnSuccess:{type:Boolean,required:!1,default:!1},scrollOnError:{type:Boolean,required:!1,default:!0},submitOnChange:{type:[Boolean,Array],required:!1,default:!1}},emits:["success","error"],data(){return{missingAttributes:[],values:Object.assign({},{...this.default}),processing:!1,wasSuccessful:!1,recentlySuccessful:!1,recentlySuccessfulTimeoutId:null,formElement:null}},computed:{$all(){return this.values},rawErrors(){return g.validationErrors(this.stack)},errors(){return Di(this.rawErrors,e=>e.join(` +`))}},mounted(){let e=document.querySelector(`form[data-splade-id="${this.spladeId}"]`);e||(e=document),this.formElement=e,this.missingAttributes.forEach(t=>{let r="";const n=e.querySelector(`[name="${t}"]`);n?r=n.type==="checkbox"?!1:"":e.querySelector(`[name="${t}[]"]`)?r=[]:(e.querySelector(`[name^="${t}."]`)||e.querySelector(`[name^="${t}["]`))&&(r={}),this.$put(t,r)}),this.missingAttributes=[],this.submitOnChange===!0?this.$watch("values",()=>{this.$nextTick(()=>this.request())},{deep:!0}):j(this.submitOnChange)&&this.submitOnChange.forEach(t=>{this.$watch(`values.${t}`,()=>{this.$nextTick(()=>this.request())},{deep:!0})})},methods:{hasError(e){return e in this.errors},reset(){this.values={}},restore(){this.values=Object.assign({},{...this.default})},$put(e,t){return Wn(this.values,e,t)},focusAndScrollToElement(e){let t=!0;if(e._flatpickr&&(t=!1),e.tagName==="SELECT"&&e.getAttribute("data-choice")&&(t=!1),t){const r=new IntersectionObserver(n=>{let[i]=n;i.isIntersecting&&(setTimeout(()=>i.target.focus(),150),r.disconnect())});r.observe(e)}e.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})},submit(e){if(e){const t=e.submitter;t&&t.name&&this.$put(t.name,t.value)}if(!this.confirm)return this.request();g.confirm(Bi(this.confirm)?"":this.confirm,this.confirmText,this.confirmButton,this.cancelButton).then(()=>{this.request()}).catch(()=>{})},async request(){await this.$nextTick(),this.processing=!0,this.wasSuccessful=!1,this.recentlySuccessful=!1,clearTimeout(this.recentlySuccessfulTimeoutId);const e=this.values instanceof FormData?this.values:fi(this.values),t={Accept:"application/json"};this.stay&&(t["X-Splade-Prevent-Refresh"]=!0);let r=this.method.toUpperCase();r!=="GET"&&r!=="POST"&&(e.append("_method",r),r="POST"),g.request(this.action,r,e,t).then(n=>{this.$emit("success",n),this.restoreOnSuccess&&this.restore(),this.resetOnSuccess&&this.reset(),this.processing=!1,this.wasSuccessful=!0,this.recentlySuccessful=!0,this.recentlySuccessfulTimeoutId=setTimeout(()=>this.recentlySuccessful=!1,2e3)}).catch(async n=>{if(this.processing=!1,this.$emit("error",n),!this.scrollOnError)return;await this.$nextTick();const i=ki(Object.keys(this.errors),o=>this.formElement.querySelector(`[data-validation-key="${o}"]`));i&&this.focusAndScrollToElement(this.formElement.querySelector(`[data-validation-key="${i}"]`))})}},render(){const e=this;return this.$slots.default(new Proxy({},{ownKeys(){return Object.keys(e.values)},get(t,r){return["$all","$attrs","$put","errors","restore","reset","hasError","processing","rawErrors","submit","wasSuccessful","recentlySuccessful"].includes(r)?e[r]:(N(e.values,r)||(e.missingAttributes.push(r),e.$put(r,"")),vr(e.values,r))},set(t,r,n){return e.$put(r,n)}}))}},Df={props:{flatpickr:{type:[Boolean,Object],required:!1,default:!1},jsFlatpickrOptions:{type:Object,required:!1,default:()=>({})},modelValue:{type:[String,Number],required:!1}},emits:["update:modelValue"],data(){return{disabled:!1,element:null,flatpickrInstance:null,observer:null}},watch:{modelValue(e){this.flatpickrInstance&&this.flatpickrInstance.setDate(e)}},mounted(){this.element=this.$refs.input.querySelector("input"),this.flatpickr&&this.initFlatpickr(this.element),this.disabled=this.element.disabled;const e=this;this.observer=new MutationObserver(function(t){t.forEach(function(r){r.attributeName==="disabled"&&(e.disabled=r.target.disabled)})}),this.observer.observe(this.element,{attributes:!0})},beforeUnmount(){this.observer.disconnect(),this.flatpickrInstance&&this.flatpickrInstance.destroy()},methods:{initFlatpickr(e){import("flatpickr").then(t=>{this.flatpickrInstance=t.default(e,Object.assign({},this.flatpickr,this.jsFlatpickrOptions,{onChange:(r,n)=>{this.flatpickrInstance.config.mode==="range"&&this.flatpickrInstance.selectedDates.length<2||n!=this.modelValue&&this.$emit("update:modelValue",n)}})),this.modelValue&&this.flatpickrInstance.setDate(this.modelValue)})}}},jf={ref:"input"};function qf(e,t,r,n,i,o){return a.openBlock(),a.createElementBlock("div",jf,[a.renderSlot(e.$slots,"default",{disabled:i.disabled})],512)}const Lf=_e(Df,[["render",qf]]),Ff={components:{Render:Z},props:{name:{type:String,required:!0},url:{type:String,required:!1,default(){return g.isSsr?"":window.location.href}},show:{type:Boolean,required:!1,default:!0}},data(){return{html:null}},watch:{show(e){e?this.request():this.html=null}},mounted(){this.show&&this.request()},methods:{async request(){this.html=null,g.lazy(this.url,this.name).then(e=>{this.html=e.data.html})}}};function Mf(e,t,r,n,i,o){const s=a.resolveComponent("Render");return i.html?(a.openBlock(),a.createBlock(s,{key:0,html:i.html},null,8,["html"])):r.show?a.renderSlot(e.$slots,"default",{key:1}):a.createCommentVNode("",!0)}const Rf=_e(Ff,[["render",Mf]]),Nf=["href","onClick"],Vf={__name:"Link",props:{href:{type:String,required:!0},replace:{type:Boolean,required:!1,default:!1},confirm:{type:[Boolean,String],required:!1,default:!1},confirmText:{type:String,required:!1,default:""},confirmButton:{type:String,required:!1,default:""},cancelButton:{type:String,required:!1,default:""},modal:{type:Boolean,required:!1,default:!1},slideover:{type:Boolean,required:!1,default:!1},away:{type:Boolean,required:!1,default:!1}},setup(e){const t=e;function r(){if(!t.confirm)return n();g.confirm(Bi(t.confirm)?"":t.confirm,t.confirmText,t.confirmButton,t.cancelButton).then(()=>{n()}).catch(()=>{})}function n(){if(t.away)return window.location=t.href;if(t.modal)return g.modal(t.href);if(t.slideover)return g.slideover(t.href);t.replace?g.replace(t.href):g.visit(t.href)}return(i,o)=>(a.openBlock(),a.createElementBlock("a",{href:e.href,onClick:a.withModifiers(r,["prevent"])},[a.renderSlot(i.$slots,"default")],8,Nf))}},Hf={provide(){return{stack:this.stack}},props:{closeButton:{type:Boolean,required:!1,default:!0},type:{type:String,required:!0},stack:{type:Number,required:!0},onTopOfStack:{type:Boolean,required:!1,default:!1},maxWidth:{type:String,required:!1,default:e=>e.type==="modal"?"2xl":"md"}},emits:["close"],data(){return{isOpen:!1}},mounted(){this.setIsOpen(!0)},methods:{emitClose(){this.$emit("close")},close(){this.setIsOpen(!1)},setIsOpen(e){this.isOpen=e}},render(){return this.$slots.default({type:this.type,isOpen:this.isOpen,setIsOpen:this.setIsOpen,close:this.close,stack:this.stack,onTopOfStack:this.onTopOfStack,maxWidth:this.maxWidth,emitClose:this.emitClose,closeButton:this.closeButton,Dialog:fr,DialogPanel:dr,TransitionRoot:je,TransitionChild:De})}};function Uf(e,t){var r=-1,n=nt(e)?Array(e.length):[];return Nt(e,function(i,o,s){n[++r]=t(i,o,s)}),n}function ji(e,t){var r=j(e)?bn:Uf;return r(e,et(t))}const Wf={inject:["stack"],props:{choices:{type:[Boolean,Object],required:!1,default:!1},jsChoicesOptions:{type:Object,required:!1,default:()=>({})},multiple:{type:Boolean,required:!1,default:!1},modelValue:{type:[String,Number,Array],required:!1},placeholder:{type:Boolean,required:!1,default:!1}},emits:["update:modelValue"],data(){return{choicesInstance:null,element:null,placeholderText:null,headlessListener:null}},computed:{hasSelection(){return this.multiple?Array.isArray(this.model)?this.model.length>0:!1:!(this.model===null||this.model==="")}},watch:{modelValue(e,t){if(this.choicesInstance){if(JSON.stringify(e)==JSON.stringify(t))return;this.setValueOnChoices(e)}}},mounted(){this.element=this.$refs.select.querySelector("select"),this.choices&&this.initChoices(this.element)},beforeUnmount(){var e;this.choices&&this.choicesInstance&&(this.headlessListener&&((e=document.querySelector("#headlessui-portal-root"))==null||e.removeEventListener("click",this.headlessListener)),this.choicesInstance.destroy())},methods:{setValueOnChoices(e){Array.isArray(e)&&(e=ji(e,t=>`${t}`),this.choicesInstance.removeActiveItems()),e===null&&(e=""),this.choicesInstance.setChoiceByValue(e),this.updateHasSelectionAttribute(),this.handlePlaceholderVisibility()},getItemOfCurrentModel(){const e=this.modelValue;return ki(this.choicesInstance._store.choices,t=>t.value==e)},handlePlaceholderVisibility(){if(!this.multiple)return;const e=this.choicesInstance.containerInner.element.querySelector("input.choices__input");this.placeholderText=e.placeholder?e.placeholder:this.placeholderText;const t=this.choicesInstance.getValue().length;e.placeholder=t?"":this.placeholderText?this.placeholderText:"",e.style.minWidth="0",e.style.width=t?"1px":"auto",e.style.paddingTop=t?"0px":"1px",e.style.paddingBottom=t?"0px":"1px"},initChoices(e){const t=Array.from(e.querySelectorAll("option:not([placeholder])")).length,r=this;import("choices.js").then(n=>{const i=Object.assign({},this.choices,this.jsChoicesOptions);if(r.choicesInstance=new n.default(e,i),r.stack>0&&(r.headlessListener=function(o){o.target===e&&r.choicesInstance.showDropdown()},document.querySelector("#headlessui-portal-root").addEventListener("click",r.headlessListener,{capture:!0})),this.choicesInstance.containerInner.element.setAttribute("data-select-name",e.name),e.hasAttribute("dusk")){const o=e.getAttribute("dusk");e.removeAttribute("dusk"),this.choicesInstance.containerInner.element.setAttribute("dusk",o)}this.handlePlaceholderVisibility(),this.updateHasSelectionAttribute(),e.addEventListener("change",function(){if(r.$emit("update:modelValue",r.choicesInstance.getValue(!0)),!r.multiple||t<1)return;r.choicesInstance.getValue().length>=t&&r.choicesInstance.hideDropdown()}),this.choicesInstance.containerInner.element.addEventListener("hideDropdownFromDusk",function(){r.choicesInstance.hideDropdown()}),e.addEventListener("showDropdown",function(){if(r.multiple||!r.modelValue)return;const o=r.getItemOfCurrentModel(),s=r.choicesInstance.dropdown.element.querySelector(`.choices__item[data-id="${o.id}"]`);r.choicesInstance.choiceList.scrollToChildElement(s,1),r.choicesInstance._highlightChoice(s)}),this.setValueOnChoices(this.modelValue)})},updateHasSelectionAttribute(){this.choicesInstance.containerInner.element.setAttribute("data-has-selection",this.hasSelection)}}},zf={ref:"select"};function Gf(e,t,r,n,i,o){return a.openBlock(),a.createElementBlock("div",zf,[a.renderSlot(e.$slots,"default")],512)}const Kf=_e(Wf,[["render",Gf]]),Xf={inject:["stack"],render(){const e=g.validationErrors(this.stack),t=g.flashData(this.stack),r=g.sharedData.value,n=Di(e,i=>i.join(` +`));return this.$slots.default({flash:t,errors:n,rawErrors:e,shared:r,hasError(i){return i in e},hasFlash(i){return N(t,i)},hasShared(i){return N(r,i)},hasErrors:Object.keys(e).length>0})}};function qi(e,t,r){return e===e&&(r!==void 0&&(e=e<=r?e:r),t!==void 0&&(e=e>=t?e:t)),e}function Qf(e,t,r){e=Jt(e),t=dt(t);var n=e.length;r=r===void 0?n:qi(Dr(r),0,n);var i=r;return r-=t.length,r>=0&&e.slice(r,i)==t}function Yf(e,t){var r=[];return Nt(e,function(n,i,o){t(n,i,o)&&r.push(n)}),r}function Jf(e,t){var r=j(e)?vi:Yf;return r(e,et(t))}function Li(e,t){return It(e,t)}function Pt(e,t,r){return e=Jt(e),r=r==null?0:qi(Dr(r),0,e.length),t=dt(t),e.slice(r,r+t.length)==t}const Zf={props:{striped:{type:Boolean,required:!1,default:!1},columns:{type:Object,required:!0},defaultVisibleToggleableColumns:{type:Array,required:!0},searchDebounce:{type:Number,required:!1,default:350},itemsOnThisPage:{type:Number,required:!1,default:0},itemsOnAllPages:{type:Number,required:!1,default:0}},data(){return{selectedItems:[],visibleColumns:[],forcedVisibleSearchInputs:[],debounceUpdateQuery:null,isLoading:!1,processingAction:!1}},computed:{columnsAreToggled(){return!Li(this.visibleColumns,this.defaultVisibleToggleableColumns)},hasForcedVisibleSearchInputs(){return this.forcedVisibleSearchInputs.length>0},allItemsFromAllPagesAreSelected(){return this.selectedItems.length===1&&this.selectedItems[0]==="*"},allVisibleItemsAreSelected(){const e=this.selectedItems.length;return e===1&&this.selectedItems[0]==="*"||e>0&&e===this.itemsOnThisPage},hasSelectedItems(){return this.selectedItems.length>0},totalSelectedItems(){const e=this.selectedItems.length;return e===1&&this.selectedItems[0]==="*"?this.itemsOnAllPages:e}},created(){this.debounceUpdateQuery=wr(function(e,t,r){this.updateQuery(e,t,r)},this.searchDebounce)},mounted(){const e=this.getCurrentQuery(),t=e.columns||[];Y(e,(r,n)=>{if(Pt(n,"filter[")&&!r){const i=n.split("["),o=i[1].substring(0,i[1].length-1);this.forcedVisibleSearchInputs=[...this.forcedVisibleSearchInputs,o]}}),t.length===0?this.visibleColumns=this.defaultVisibleToggleableColumns:this.visibleColumns=t},methods:{visitLink(e,t){return t==="modal"?g.modal(e):t==="slideover"?g.slideover(e):g.visit(e)},reset(){this.forcedVisibleSearchInputs=[],this.visibleColumns=this.defaultVisibleToggleableColumns;let e=this.getCurrentQuery();e.columns=[],e.page=null,e.perPage=null,e.sort=null,Y(e,(t,r)=>{Pt(r,"filter[")&&(e[r]=null)}),this.visitWithQueryObject(e,null,!0)},columnIsVisible(e){return this.visibleColumns.includes(e)},toggleColumn(e){const t=!this.columnIsVisible(e),r=Jf(this.columns,i=>i.can_be_hidden?i.key===e?t:this.visibleColumns.includes(i.key):!0);let n=ji(r,i=>i.key).sort();Li(n,this.defaultVisibleToggleableColumns)&&(n=[]),this.visibleColumns=n.length===0?this.defaultVisibleToggleableColumns:n,this.updateQuery("columns",n,null,!1)},disableSearchInput(e){this.forcedVisibleSearchInputs=this.forcedVisibleSearchInputs.filter(t=>t!=e),this.updateQuery(`filter[${e}]`,null)},showSearchInput(e){this.forcedVisibleSearchInputs=[...this.forcedVisibleSearchInputs,e],a.nextTick(()=>{document.querySelector(`[name="searchInput-${e}"]`).focus()})},isForcedVisible(e){return this.forcedVisibleSearchInputs.includes(e)},getCurrentQuery(){const e=window.location.search;if(!e)return{};let t={};return e.substring(1).split("&").forEach(r=>{const n=decodeURIComponent(r).split("=");let i=n[0];if(!Qf(i,"]")){t[i]=n[1];return}const o=i.split("["),s=o[1].substring(0,o[1].length-1);parseInt(s)==s?(i=o[0],j(t[i])||(t[i]=[]),t[i].push(n[1])):t[i]=n[1]}),t},updateQuery(e,t,r,n){typeof n>"u"&&(n=!0);let i=this.getCurrentQuery();i[e]=t,(Pt(e,"perPage")||Pt(e,"filter["))&&delete i.page,this.visitWithQueryObject(i,r,n)},visitWithQueryObject(e,t,r){var l;typeof r>"u"&&(r=!0);let n={};Y(e,(u,c)=>{if(!j(u)){n[c]=u;return}u.length!==0&&u.forEach((f,h)=>{n[`${c}[${h}]`]=f})});let i="";Y(n,(u,c)=>{u===null||u===[]||(i&&(i+="&"),i+=`${c}=${u}`)}),i&&(i="?"+i);const o=window.location.pathname+i;if(!r)return g.replaceUrlOfCurrentPage(o);this.isLoading=!0;let s=null;typeof t<"u"&&t&&(s=(l=document.querySelector(`[name="${t.name}"]`))==null?void 0:l.value),g.replace(o).then(()=>{this.isLoading=!1,typeof t<"u"&&t&&a.nextTick(()=>{const u=document.querySelector(`[name="${t.name}"]`);u.focus(),s&&(u.value=s)})})},async performBulkAction(e,t,r,n,i){if(t)try{await g.confirm(t===!0?"":t,r,n,i)}catch{return!1}this.isLoading=!0,g.request(e,"POST",{ids:this.selectedItems},{},!1).then(o=>{o.data}).catch(()=>{this.isLoading=!1})},setSelectedItems(e){this.selectedItems=j(e)?e:[]},itemIsSelected(e){return this.selectedItems.length==1&&this.selectedItems[0]=="*"?!0:this.selectedItems.includes(e)},setSelectedItem(e,t){t?this.selectedItems.push(e):this.selectedItems=this.selectedItems.filter(r=>r!==e)}},render(){return this.$slots.default({columnIsVisible:this.columnIsVisible,columnsAreToggled:this.columnsAreToggled,debounceUpdateQuery:this.debounceUpdateQuery,disableSearchInput:this.disableSearchInput,hasForcedVisibleSearchInputs:this.hasForcedVisibleSearchInputs,isForcedVisible:this.isForcedVisible,reset:this.reset,showSearchInput:this.showSearchInput,striped:this.striped,toggleColumn:this.toggleColumn,updateQuery:this.updateQuery,visit:this.visitLink,totalSelectedItems:this.totalSelectedItems,allItemsFromAllPagesAreSelected:this.allItemsFromAllPagesAreSelected,allVisibleItemsAreSelected:this.allVisibleItemsAreSelected,hasSelectedItems:this.hasSelectedItems,setSelectedItems:this.setSelectedItems,itemIsSelected:this.itemIsSelected,setSelectedItem:this.setSelectedItem,performBulkAction:this.performBulkAction,processingAction:this.processingAction,isLoading:this.isLoading})}},ed={data(){return{isMounted:!1}},mounted(){this.isMounted=!0}};function td(e,t,r,n,i,o){return i.isMounted?(a.openBlock(),a.createBlock(a.Teleport,a.normalizeProps(a.mergeProps({key:0},e.$attrs)),[a.renderSlot(e.$slots,"default")],16)):a.createCommentVNode("",!0)}const rd=_e(ed,[["render",td]]),nd={props:{autosize:{type:Boolean,required:!1,default:!1},modelValue:{type:[String,Number],required:!1}},data(){return{autosizeInstance:null,element:null}},watch:{modelValue(){!this.autosize||!this.autosizeInstance||import("autosize").then(e=>{a.nextTick(()=>e.default.update(this.element))})}},mounted(){this.element=this.$refs.textarea.querySelector("textarea"),this.autosize&&import("autosize").then(e=>{this.autosizeInstance=e.default(this.element)})},beforeUnmount(){this.autosize&&this.autosizeInstance&&import("autosize").then(e=>{e.default.destroy(this.element)})}},id={ref:"textarea"};function od(e,t,r,n,i,o){return a.openBlock(),a.createElementBlock("div",id,[a.renderSlot(e.$slots,"default")],512)}const ad=_e(nd,[["render",od]]),sd={props:{toastKey:{type:Number,required:!0},autoDismiss:{type:Number,required:!1,default:0}},emits:["dismiss"],data(){return{show:!0}},mounted(){this.autoDismiss&&setTimeout(()=>{this.setShow(!1)},this.autoDismiss*1e3)},methods:{setShow(e){this.show=e},emitDismiss(){this.$emit("dismiss")}},render(){return this.$slots.default({key:this.toastKey,show:this.show,setShow:this.setShow,emitDismiss:this.emitDismiss,TransitionRoot:je,TransitionChild:De})}},ld=["left-top","center-top","right-top","left-center","center-center","right-center","left-bottom","center-bottom","right-bottom"],ud={computed:{toasts:function(){return g.toastsReversed.value},hasBackdrop:function(){return g.toasts.value.filter(e=>!e.dismissed&&e.backdrop&&e.html).length>0}},methods:{dismissToast(e){g.dismissToast(e)}},render(){return this.$slots.default({positions:ld,toasts:this.toasts,dismissToast:this.dismissToast,hasBackdrop:this.hasBackdrop,Render:Z,TransitionRoot:je,TransitionChild:De})}},cd={props:{default:{type:Object,required:!0}},data(){return{toggles:{...this.default}}},methods:{toggled(e){var t;return(t=this.toggles[e])!=null?t:!1},toggle(e){this.setToggle(e,!this.toggled(e))},setToggle(e,t){this.toggles[e]=t}},render(){const e=this;return this.$slots.default(new Proxy({},{ownKeys(){return Object.keys(e.toggles)},get(t,r){const n=Object.keys(e.toggles);if(n.length===1&&ci(n)==="default"){if(r==="toggled")return e.toggled("default");if(r==="setToggle")return i=>{e.setToggle("default",i)};if(r==="toggle")return()=>{e.toggle("default")}}return r==="setToggle"?(i,o)=>{e.setToggle(i,o)}:r==="toggle"?i=>{e.toggle(i)}:e.toggled(r)}}))}},fd={render(){return this.$slots.default({TransitionRoot:je,TransitionChild:De})}},dd={created:(e,t)=>{if(g.isSsr)return;const r=`preserveScroll-${t.arg}`,n=g.restore(r);n&&a.nextTick(()=>{typeof e.scrollTo=="function"?e.scrollTo(n.left,n.top):(e.scrollTop=n.top,e.scrollLeft=n.left)});const i=function(){g.remember(r,{top:e.scrollTop,left:e.scrollLeft})};e.addEventListener("scroll",wr(i,100)),i()}},jr={injectCSS(e){const t=document.createElement("style");t.type="text/css",t.textContent=` #nprogress { pointer-events: none; } @@ -66,4 +66,4 @@ 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } - `,document.head.appendChild(t)},timeout:null,start(e,t,r){jr.timeout=setTimeout(()=>r.start(),t)},progress(e,t){t.isStarted()&&e.detail.progress.percentage&&t.set(Math.max(t.status,e.detail.progress.percentage/100*.9))},stop(e,t){clearTimeout(jr.timeout),t.done(),t.remove()},init(e){const t=this;import("nprogress").then(r=>{document.addEventListener("splade:request",n=>t.start(n,e.delay,r.default)),document.addEventListener("splade:request-progress",n=>t.progress(n,r.default)),document.addEventListener("splade:request-response",n=>t.stop(n,r.default)),document.addEventListener("splade:request-error",n=>t.stop(n,r.default)),r.default.configure({showSpinner:e.spinner}),e.css&&this.injectCSS(e.color)})}},pd={install:(e,t)=>{t=t||{},t.max_keep_alive=N(t,"max_keep_alive")?t.max_keep_alive:10,t.prefix=N(t,"prefix")?t.prefix:"Splade",t.transform_anchors=N(t,"transform_anchors")?t.transform_anchors:!1,t.link_component=N(t,"link_component")?t.link_component:"Link",t.progress_bar=N(t,"progress_bar")?t.progress_bar:!1,t.components=N(t,"components")?t.components:{};const r=t.prefix;if(e.component(`${r}Confirm`,Il).component(`${r}Data`,jl).component(`${r}Defer`,Kl).component(`${r}Dialog`,Xl).component(`${r}Dropdown`,rc).component(`${r}DynamicHtml`,nc).component(`${r}Errors`,ic).component(`${r}Event`,oc).component(`${r}File`,uc).component(`${r}Flash`,cc).component(`${r}Form`,Bf).component(`${r}Input`,Lf).component(`${r}Lazy`,Rf).component(`${r}Modal`,Hf).component(`${r}OnClickOutside`,Gn).component(`${r}Render`,J).component(`${r}Select`,Kf).component(`${r}State`,Xf).component(`${r}Table`,Zf).component(`${r}Teleport`,rd).component(`${r}Textarea`,ad).component(`${r}Toast`,sd).component(`${r}Toasts`,ud).component(`${r}Toggle`,cd).component(`${r}Transition`,fd).component(t.link_component,Vf).directive(`${r}PreserveScroll`,dd),Object.defineProperty(e.config.globalProperties,"$splade",{get:()=>m}),Object.defineProperty(e.config.globalProperties,"$spladeOptions",{get:()=>Object.assign({},{...t})}),e.provide("$splade",e.config.globalProperties.$splade),e.provide("$spladeOptions",e.config.globalProperties.$spladeOptions),t.progress_bar){const n={delay:250,color:"#4B5563",css:!0,spinner:!1};K(t.progress_bar)||(t.progress_bar={}),["delay","color","css","spinner"].forEach(i=>{N(t.progress_bar,i)||(t.progress_bar[i]=n[i])}),jr.init(t.progress_bar)}le(t.components,(n,i)=>{e.component(i,n)})}};function hd(e,t,r){const n={};process.argv.slice(2).forEach(o=>{const s=o.replace(/^-+/,"").split("=");n[s[0]]=s.length===2?s[1]:!0});const i=n.port||9e3;e(async(o,s)=>{if(o.method=="POST"){let l="";o.on("data",u=>l+=u),o.on("end",async()=>{const u=JSON.parse(l),c=r({components:u.components,initialDynamics:u.dynamics,initialHtml:u.html,initialSpladeData:u.splade}),f=await t(c);s.writeHead(200,{"Content-Type":"application/json",Server:"Splade SSR"}),s.write(JSON.stringify({body:f})),s.end()})}}).listen(i,()=>console.log(`Splade SSR server started on port ${i}.`))}k.Splade=m,k.SpladeApp=vn,k.SpladePlugin=pd,k.renderSpladeApp=Ua,k.startServer=hd,Object.defineProperties(k,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}); + `,document.head.appendChild(t)},timeout:null,start(e,t,r){jr.timeout=setTimeout(()=>r.start(),t)},progress(e,t){t.isStarted()&&e.detail.progress.percentage&&t.set(Math.max(t.status,e.detail.progress.percentage/100*.9))},stop(e,t){clearTimeout(jr.timeout),t.done(),t.remove()},init(e){const t=this;import("nprogress").then(r=>{document.addEventListener("splade:request",n=>t.start(n,e.delay,r.default)),document.addEventListener("splade:request-progress",n=>t.progress(n,r.default)),document.addEventListener("splade:request-response",n=>t.stop(n,r.default)),document.addEventListener("splade:request-error",n=>t.stop(n,r.default)),r.default.configure({showSpinner:e.spinner}),e.css&&this.injectCSS(e.color)})}},pd={install:(e,t)=>{t=t||{},t.max_keep_alive=N(t,"max_keep_alive")?t.max_keep_alive:10,t.prefix=N(t,"prefix")?t.prefix:"Splade",t.transform_anchors=N(t,"transform_anchors")?t.transform_anchors:!1,t.link_component=N(t,"link_component")?t.link_component:"Link",t.progress_bar=N(t,"progress_bar")?t.progress_bar:!1,t.components=N(t,"components")?t.components:{};const r=t.prefix;if(e.component(`${r}Confirm`,Il).component(`${r}Data`,jl).component(`${r}Defer`,Kl).component(`${r}Dialog`,Xl).component(`${r}Dropdown`,rc).component(`${r}DynamicHtml`,nc).component(`${r}Errors`,ic).component(`${r}Event`,oc).component(`${r}File`,uc).component(`${r}Flash`,cc).component(`${r}Form`,Bf).component(`${r}Input`,Lf).component(`${r}Lazy`,Rf).component(`${r}Modal`,Hf).component(`${r}OnClickOutside`,Gn).component(`${r}Render`,Z).component(`${r}Select`,Kf).component(`${r}State`,Xf).component(`${r}Table`,Zf).component(`${r}Teleport`,rd).component(`${r}Textarea`,ad).component(`${r}Toast`,sd).component(`${r}Toasts`,ud).component(`${r}Toggle`,cd).component(`${r}Transition`,fd).component(t.link_component,Vf).directive(`${r}PreserveScroll`,dd),Object.defineProperty(e.config.globalProperties,"$splade",{get:()=>g}),Object.defineProperty(e.config.globalProperties,"$spladeOptions",{get:()=>Object.assign({},{...t})}),e.provide("$splade",e.config.globalProperties.$splade),e.provide("$spladeOptions",e.config.globalProperties.$spladeOptions),t.progress_bar){const n={delay:250,color:"#4B5563",css:!0,spinner:!1};K(t.progress_bar)||(t.progress_bar={}),["delay","color","css","spinner"].forEach(i=>{N(t.progress_bar,i)||(t.progress_bar[i]=n[i])}),jr.init(t.progress_bar)}Y(t.components,(n,i)=>{e.component(i,n)})}};function hd(e,t,r){const n={};process.argv.slice(2).forEach(o=>{const s=o.replace(/^-+/,"").split("=");n[s[0]]=s.length===2?s[1]:!0});const i=n.port||9e3;e(async(o,s)=>{if(o.method=="POST"){let l="";o.on("data",u=>l+=u),o.on("end",async()=>{const u=JSON.parse(l),c=r({components:u.components,initialDynamics:u.dynamics,initialHtml:u.html,initialSpladeData:u.splade}),f=await t(c);s.writeHead(200,{"Content-Type":"application/json",Server:"Splade SSR"}),s.write(JSON.stringify({body:f})),s.end()})}}).listen(i,()=>console.log(`Splade SSR server started on port ${i}.`))}k.Splade=g,k.SpladeApp=vn,k.SpladePlugin=pd,k.renderSpladeApp=Ua,k.startServer=hd,Object.defineProperties(k,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}); diff --git a/package-lock.json b/package-lock.json index 74cd691e..c70a0db2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@protonemedia/laravel-splade", - "version": "0.6.8", + "version": "0.6.9", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@protonemedia/laravel-splade", - "version": "0.6.8", + "version": "0.6.9", "license": "MIT", "dependencies": { "autosize": "^5.0.1", @@ -348,9 +348,9 @@ "peer": true }, "node_modules/acorn": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", - "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.1.tgz", + "integrity": "sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -2692,9 +2692,9 @@ "peer": true }, "acorn": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", - "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.1.tgz", + "integrity": "sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==", "dev": true }, "acorn-jsx": { diff --git a/package.json b/package.json index 53ad0ec3..08404b97 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@protonemedia/laravel-splade", - "version": "0.6.8", + "version": "0.6.9", "description": "Laravel Splade: the magic of Inertia.js with the simplicity of Blade.", "private": false, "author": "Pascal Baljet ", diff --git a/src/Commands/SpladeInstallCommand.php b/src/Commands/SpladeInstallCommand.php index 6ba929c8..98ab98df 100644 --- a/src/Commands/SpladeInstallCommand.php +++ b/src/Commands/SpladeInstallCommand.php @@ -30,7 +30,7 @@ public function handle(): int // Install NPM packages... $this->updateNodePackages(function ($packages) { return [ - '@protonemedia/laravel-splade' => '^0.6.8', + '@protonemedia/laravel-splade' => '^0.6.9', '@tailwindcss/forms' => '^0.5.2', '@tailwindcss/typography' => '^0.5.2', '@vitejs/plugin-vue' => '^3.0.0',