From b8c1daa37f429abd5129d3b14e1146754142e3dc Mon Sep 17 00:00:00 2001 From: Pascal Baljet Date: Mon, 26 Jun 2023 22:54:51 +0200 Subject: [PATCH] Version bump --- README.md | 4 + app/package-lock.json | 48 +- app/package.json | 2 +- dist/protone-media-laravel-splade.js | 2399 +++++++++++++------------ package-lock.json | 48 +- package.json | 2 +- src/Commands/SpladeInstallCommand.php | 2 +- src/Components/Table.php | 6 +- 8 files changed, 1277 insertions(+), 1234 deletions(-) diff --git a/README.md b/README.md index 254b9209..1e7f6066 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,10 @@ Splade gives you a massive head start when building applications. Navigate the d * Support for existing Blade and Vue libraries. * Support for SSR (server-side rendering). +## Demo App: Eddy Server Management + +To show off Splade's amazing capabilities, we've built a demo application that we actually use in production. The app is called **Eddy Server Management**, and it does exactly what it says on the tin: It provisions and manages servers and allows you to deploy PHP applications with zero downtime. You may find the source code on [GitHub](https://github.com/protonemedia/eddy-server-management) and the live application on [eddy.management](https://eddy.management). + ## Discord, Documentation and Website 📖 You can find the documentation at [Splade.dev](https://splade.dev/) (and [here](https://github.com/protonemedia/laravel-splade-docs) its source code). You may also join the [Splade Discord server](https://discord.gg/qGJ4MkMQWm). diff --git a/app/package-lock.json b/app/package-lock.json index 921d0223..04d1384f 100644 --- a/app/package-lock.json +++ b/app/package-lock.json @@ -5,7 +5,7 @@ "packages": { "": { "devDependencies": { - "@protonemedia/laravel-splade": "file:../protonemedia-laravel-splade-1.4.14.tgz", + "@protonemedia/laravel-splade": "file:../protonemedia-laravel-splade-1.4.15.tgz", "@tailwindcss/forms": "^0.5.2", "@tailwindcss/typography": "^0.5.2", "@vitejs/plugin-vue": "^4.1.0", @@ -499,9 +499,9 @@ } }, "node_modules/@protonemedia/laravel-splade": { - "version": "1.4.14", - "resolved": "file:../protonemedia-laravel-splade-1.4.14.tgz", - "integrity": "sha512-j/3WR3Sp/WOM85locYOG2HvzztyK1MUE458YJAGSvjgGBsxcTbcfrIXxJYG7fLZ4eTcGqK3NPkwqS0ofiigrDw==", + "version": "1.4.15", + "resolved": "file:../protonemedia-laravel-splade-1.4.15.tgz", + "integrity": "sha512-yheIyCxfiKKUI6eiRwzMO2XDbx7f3FyA4lGLnuHKl3IPBrL+3tGLFoM/00OZT3lXZRtsmJNIluCK4F9Qjfaruw==", "dev": true, "license": "MIT", "dependencies": { @@ -561,9 +561,9 @@ } }, "node_modules/@types/node": { - "version": "14.18.51", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.51.tgz", - "integrity": "sha512-P9bsdGFPpVtofEKlhWMVS2qqx1A/rt9QBfihWlklfHHpUpjtYse5AzFz6j4DWrARLYh6gRnw9+5+DJcrq3KvBA==", + "version": "14.18.52", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.52.tgz", + "integrity": "sha512-DGhiXKOHSFVVm+PJD+9Y0ObxXLeG6qwc0HoOn+ooQKeNNu+T2mEJCM5UBDUREKAggl9MHYjb5E71PAmx6MbzIg==", "dev": true }, "node_modules/@types/qs": { @@ -832,9 +832,9 @@ } }, "node_modules/browserslist": { - "version": "4.21.8", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.8.tgz", - "integrity": "sha512-j+7xYe+v+q2Id9qbBeCI8WX5NmZSRe8es1+0xntD/+gaWXznP8tFEkv5IgSaHf5dS1YwVMbX/4W6m937mj+wQw==", + "version": "4.21.9", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.9.tgz", + "integrity": "sha512-M0MFoZzbUrRU4KNfCrDLnvyE7gub+peetoTid3TBIqtunaDJyXlwhakT+/VkvSXcfIzFfK/nkCs4nmyTmxdNSg==", "dev": true, "funding": [ { @@ -851,8 +851,8 @@ } ], "dependencies": { - "caniuse-lite": "^1.0.30001502", - "electron-to-chromium": "^1.4.428", + "caniuse-lite": "^1.0.30001503", + "electron-to-chromium": "^1.4.431", "node-releases": "^2.0.12", "update-browserslist-db": "^1.0.11" }, @@ -873,9 +873,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001503", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001503.tgz", - "integrity": "sha512-Sf9NiF+wZxPfzv8Z3iS0rXM1Do+iOy2Lxvib38glFX+08TCYYYGR5fRJXk4d77C4AYwhUjgYgMsMudbh2TqCKw==", + "version": "1.0.30001508", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001508.tgz", + "integrity": "sha512-sdQZOJdmt3GJs1UMNpCCCyeuS2IEGLXnHyAo9yIO5JJDjbjoVRij4M1qep6P6gFpptD1PqIYgzM+gwJbOi92mw==", "dev": true, "funding": [ { @@ -1029,9 +1029,9 @@ "dev": true }, "node_modules/electron-to-chromium": { - "version": "1.4.430", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.430.tgz", - "integrity": "sha512-FytjTbGwz///F+ToZ5XSeXbbSaXalsVRXsz2mHityI5gfxft7ieW3HqFLkU5V1aIrY42aflICqbmFoDxW10etg==", + "version": "1.4.440", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.440.tgz", + "integrity": "sha512-r6dCgNpRhPwiWlxbHzZQ/d9swfPaEJGi8ekqRBwQYaR3WmA5VkqQfBWSDDjuJU1ntO+W9tHx8OHV/96Q8e0dVw==", "dev": true }, "node_modules/esbuild": { @@ -1676,9 +1676,9 @@ } }, "node_modules/pirates": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz", - "integrity": "sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==", + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", + "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", "dev": true, "engines": { "node": ">= 6" @@ -1929,9 +1929,9 @@ } }, "node_modules/rollup": { - "version": "3.25.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.25.1.tgz", - "integrity": "sha512-tywOR+rwIt5m2ZAWSe5AIJcTat8vGlnPFAv15ycCrw33t6iFsXZ6mzHVFh2psSjxQPmI+xgzMZZizUAukBI4aQ==", + "version": "3.25.3", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.25.3.tgz", + "integrity": "sha512-ZT279hx8gszBj9uy5FfhoG4bZx8c+0A1sbqtr7Q3KNWIizpTdDEPZbV2xcbvHsnFp4MavCQYZyzApJ+virB8Yw==", "dev": true, "bin": { "rollup": "dist/bin/rollup" diff --git a/app/package.json b/app/package.json index 4f0b271a..4201fe32 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-1.4.14.tgz", + "@protonemedia/laravel-splade": "file:../protonemedia-laravel-splade-1.4.15.tgz", "@tailwindcss/forms": "^0.5.2", "@tailwindcss/typography": "^0.5.2", "@vitejs/plugin-vue": "^4.1.0", diff --git a/dist/protone-media-laravel-splade.js b/dist/protone-media-laravel-splade.js index 97460bfc..23279801 100644 --- a/dist/protone-media-laravel-splade.js +++ b/dist/protone-media-laravel-splade.js @@ -1,11 +1,11 @@ import ne from "axios"; -import { ref as y, computed as x, watch as ot, openBlock as j, createBlock as X, unref as ee, createCommentVNode as Fr, h as N, nextTick as Oe, onMounted as V, createElementBlock as ce, createElementVNode as gr, provide as de, inject as z, KeepAlive as ni, normalizeStyle as Mt, createVNode as xs, Fragment as kr, renderList as _s, cloneVNode as As, watchEffect as le, defineComponent as Y, onUnmounted as me, Teleport as ii, reactive as Is, shallowRef as Ps, normalizeClass as qs, onBeforeUnmount as Cs, renderSlot as K, resolveComponent as Lr, withCtx as si, withModifiers as Fs, withDirectives as ks, resolveDynamicComponent as Ls, normalizeProps as Bs, guardReactiveProps as js, vShow as Ms } from "vue"; -function Rs(e, t) { +import { ref as y, computed as x, watch as ot, openBlock as B, createBlock as X, unref as ee, createCommentVNode as Fr, h as N, nextTick as Oe, onMounted as V, createElementBlock as ce, createElementVNode as gr, provide as de, inject as z, KeepAlive as si, normalizeStyle as jt, createVNode as _s, Fragment as kr, renderList as Is, cloneVNode as As, watchEffect as le, defineComponent as Y, onUnmounted as me, Teleport as ai, reactive as Ps, shallowRef as qs, normalizeClass as Cs, onBeforeUnmount as Fs, renderSlot as K, resolveComponent as Lr, withCtx as oi, withModifiers as ks, withDirectives as Ls, resolveDynamicComponent as Rs, normalizeProps as Bs, guardReactiveProps as js, vShow as Ms } from "vue"; +function Ds(e, t) { for (var r = -1, n = e == null ? 0 : e.length; ++r < n && t(e[r], r, e) !== !1; ) ; return e; } -function Ds(e) { +function Ns(e) { return function(t, r, n) { for (var i = -1, s = Object(t), a = n(t), o = a.length; o--; ) { var l = a[e ? o : ++i]; @@ -15,171 +15,171 @@ function Ds(e) { return t; }; } -var Ns = Ds(); -const Vs = Ns; +var Vs = Ns(); +const Hs = Vs; function Us(e, t) { for (var r = -1, n = Array(e); ++r < e; ) n[r] = t(r); return n; } -var Hs = typeof global == "object" && global && global.Object === Object && global; -const ai = Hs; -var Ws = typeof self == "object" && self && self.Object === Object && self, zs = ai || Ws || Function("return this")(); -const ve = zs; -var Gs = ve.Symbol; -const ke = Gs; -var oi = Object.prototype, Xs = oi.hasOwnProperty, Ks = oi.toString, ft = ke ? ke.toStringTag : void 0; -function Js(e) { - var t = Xs.call(e, ft), r = e[ft]; +var Ws = typeof global == "object" && global && global.Object === Object && global; +const li = Ws; +var zs = typeof self == "object" && self && self.Object === Object && self, Gs = li || zs || Function("return this")(); +const ve = Gs; +var Xs = ve.Symbol; +const ke = Xs; +var ui = Object.prototype, Ks = ui.hasOwnProperty, Js = ui.toString, ft = ke ? ke.toStringTag : void 0; +function Qs(e) { + var t = Ks.call(e, ft), r = e[ft]; try { e[ft] = void 0; var n = !0; } catch { } - var i = Ks.call(e); + var i = Js.call(e); return n && (t ? e[ft] = r : delete e[ft]), i; } -var Qs = Object.prototype, Ys = Qs.toString; -function Zs(e) { - return Ys.call(e); +var Ys = Object.prototype, Zs = Ys.toString; +function ea(e) { + return Zs.call(e); } -var ea = "[object Null]", ta = "[object Undefined]", Sn = ke ? ke.toStringTag : void 0; -function je(e) { - return e == null ? e === void 0 ? ta : ea : Sn && Sn in Object(e) ? Js(e) : Zs(e); +var ta = "[object Null]", ra = "[object Undefined]", $n = ke ? ke.toStringTag : void 0; +function Be(e) { + return e == null ? e === void 0 ? ra : ta : $n && $n in Object(e) ? Qs(e) : ea(e); } function Le(e) { return e != null && typeof e == "object"; } -var ra = "[object Arguments]"; -function On(e) { - return Le(e) && je(e) == ra; +var na = "[object Arguments]"; +function En(e) { + return Le(e) && Be(e) == na; } -var li = Object.prototype, na = li.hasOwnProperty, ia = li.propertyIsEnumerable, sa = On(function() { +var ci = Object.prototype, ia = ci.hasOwnProperty, sa = ci.propertyIsEnumerable, aa = En(function() { return arguments; -}()) ? On : function(e) { - return Le(e) && na.call(e, "callee") && !ia.call(e, "callee"); +}()) ? En : function(e) { + return Le(e) && ia.call(e, "callee") && !sa.call(e, "callee"); }; -const ui = sa; -var aa = Array.isArray; -const R = aa; -function oa() { +const di = aa; +var oa = Array.isArray; +const M = oa; +function la() { return !1; } -var ci = typeof exports == "object" && exports && !exports.nodeType && exports, $n = ci && typeof module == "object" && module && !module.nodeType && module, la = $n && $n.exports === ci, En = la ? ve.Buffer : void 0, ua = En ? En.isBuffer : void 0, ca = ua || oa; -const yr = ca; -var da = 9007199254740991, fa = /^(?:0|[1-9]\d*)$/; -function Br(e, t) { +var fi = typeof exports == "object" && exports && !exports.nodeType && exports, Tn = fi && typeof module == "object" && module && !module.nodeType && module, ua = Tn && Tn.exports === fi, xn = ua ? ve.Buffer : void 0, ca = xn ? xn.isBuffer : void 0, da = ca || la; +const yr = da; +var fa = 9007199254740991, pa = /^(?:0|[1-9]\d*)$/; +function Rr(e, t) { var r = typeof e; - return t = t ?? da, !!t && (r == "number" || r != "symbol" && fa.test(e)) && e > -1 && e % 1 == 0 && e < t; + return t = t ?? fa, !!t && (r == "number" || r != "symbol" && pa.test(e)) && e > -1 && e % 1 == 0 && e < t; } -var pa = 9007199254740991; -function jr(e) { - return typeof e == "number" && e > -1 && e % 1 == 0 && e <= pa; +var ha = 9007199254740991; +function Br(e) { + return typeof e == "number" && e > -1 && e % 1 == 0 && e <= ha; } -var ha = "[object Arguments]", ma = "[object Array]", va = "[object Boolean]", ga = "[object Date]", ya = "[object Error]", ba = "[object Function]", wa = "[object Map]", Sa = "[object Number]", Oa = "[object Object]", $a = "[object RegExp]", Ea = "[object Set]", Ta = "[object String]", xa = "[object WeakMap]", _a = "[object ArrayBuffer]", Aa = "[object DataView]", Ia = "[object Float32Array]", Pa = "[object Float64Array]", qa = "[object Int8Array]", Ca = "[object Int16Array]", Fa = "[object Int32Array]", ka = "[object Uint8Array]", La = "[object Uint8ClampedArray]", Ba = "[object Uint16Array]", ja = "[object Uint32Array]", L = {}; -L[Ia] = L[Pa] = L[qa] = L[Ca] = L[Fa] = L[ka] = L[La] = L[Ba] = L[ja] = !0; -L[ha] = L[ma] = L[_a] = L[va] = L[Aa] = L[ga] = L[ya] = L[ba] = L[wa] = L[Sa] = L[Oa] = L[$a] = L[Ea] = L[Ta] = L[xa] = !1; +var ma = "[object Arguments]", va = "[object Array]", ga = "[object Boolean]", ya = "[object Date]", ba = "[object Error]", wa = "[object Function]", Sa = "[object Map]", Oa = "[object Number]", $a = "[object Object]", Ea = "[object RegExp]", Ta = "[object Set]", xa = "[object String]", _a = "[object WeakMap]", Ia = "[object ArrayBuffer]", Aa = "[object DataView]", Pa = "[object Float32Array]", qa = "[object Float64Array]", Ca = "[object Int8Array]", Fa = "[object Int16Array]", ka = "[object Int32Array]", La = "[object Uint8Array]", Ra = "[object Uint8ClampedArray]", Ba = "[object Uint16Array]", ja = "[object Uint32Array]", L = {}; +L[Pa] = L[qa] = L[Ca] = L[Fa] = L[ka] = L[La] = L[Ra] = L[Ba] = L[ja] = !0; +L[ma] = L[va] = L[Ia] = L[ga] = L[Aa] = L[ya] = L[ba] = L[wa] = L[Sa] = L[Oa] = L[$a] = L[Ea] = L[Ta] = L[xa] = L[_a] = !1; function Ma(e) { - return Le(e) && jr(e.length) && !!L[je(e)]; + return Le(e) && Br(e.length) && !!L[Be(e)]; } -function Ra(e) { +function Da(e) { return function(t) { return e(t); }; } -var di = typeof exports == "object" && exports && !exports.nodeType && exports, gt = di && typeof module == "object" && module && !module.nodeType && module, Da = gt && gt.exports === di, lr = Da && ai.process, Na = function() { +var pi = typeof exports == "object" && exports && !exports.nodeType && exports, gt = pi && typeof module == "object" && module && !module.nodeType && module, Na = gt && gt.exports === pi, lr = Na && li.process, Va = function() { try { var e = gt && gt.require && gt.require("util").types; return e || lr && lr.binding && lr.binding("util"); } catch { } }(); -const Tn = Na; -var xn = Tn && Tn.isTypedArray, Va = xn ? Ra(xn) : Ma; -const fi = Va; -var Ua = Object.prototype, Ha = Ua.hasOwnProperty; -function Wa(e, t) { - var r = R(e), n = !r && ui(e), i = !r && !n && yr(e), s = !r && !n && !i && fi(e), a = r || n || i || s, o = a ? Us(e.length, String) : [], l = o.length; +const _n = Va; +var In = _n && _n.isTypedArray, Ha = In ? Da(In) : Ma; +const hi = Ha; +var Ua = Object.prototype, Wa = Ua.hasOwnProperty; +function za(e, t) { + var r = M(e), n = !r && di(e), i = !r && !n && yr(e), s = !r && !n && !i && hi(e), a = r || n || i || s, o = a ? Us(e.length, String) : [], l = o.length; for (var u in e) - (t || Ha.call(e, u)) && !(a && // Safari 9 has enumerable `arguments.length` in strict mode. + (t || Wa.call(e, u)) && !(a && // Safari 9 has enumerable `arguments.length` in strict mode. (u == "length" || // Node.js 0.10 has enumerable non-index properties on buffers. i && (u == "offset" || u == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays. s && (u == "buffer" || u == "byteLength" || u == "byteOffset") || // Skip index properties. - Br(u, l))) && o.push(u); + Rr(u, l))) && o.push(u); return o; } -var za = Object.prototype; -function Ga(e) { - var t = e && e.constructor, r = typeof t == "function" && t.prototype || za; +var Ga = Object.prototype; +function Xa(e) { + var t = e && e.constructor, r = typeof t == "function" && t.prototype || Ga; return e === r; } -function Xa(e, t) { +function Ka(e, t) { return function(r) { return e(t(r)); }; } -var Ka = Xa(Object.keys, Object); -const Ja = Ka; -var Qa = Object.prototype, Ya = Qa.hasOwnProperty; -function Za(e) { - if (!Ga(e)) - return Ja(e); +var Ja = Ka(Object.keys, Object); +const Qa = Ja; +var Ya = Object.prototype, Za = Ya.hasOwnProperty; +function eo(e) { + if (!Xa(e)) + return Qa(e); var t = []; for (var r in Object(e)) - Ya.call(e, r) && r != "constructor" && t.push(r); + Za.call(e, r) && r != "constructor" && t.push(r); return t; } function J(e) { var t = typeof e; return e != null && (t == "object" || t == "function"); } -var eo = "[object AsyncFunction]", to = "[object Function]", ro = "[object GeneratorFunction]", no = "[object Proxy]"; -function pi(e) { +var to = "[object AsyncFunction]", ro = "[object Function]", no = "[object GeneratorFunction]", io = "[object Proxy]"; +function mi(e) { if (!J(e)) return !1; - var t = je(e); - return t == to || t == ro || t == eo || t == no; + var t = Be(e); + return t == ro || t == no || t == to || t == io; } -function Ht(e) { - return e != null && jr(e.length) && !pi(e); +function Ut(e) { + return e != null && Br(e.length) && !mi(e); } function Wt(e) { - return Ht(e) ? Wa(e) : Za(e); + return Ut(e) ? za(e) : eo(e); } -function Mr(e, t) { - return e && Vs(e, t, Wt); +function jr(e, t) { + return e && Hs(e, t, Wt); } -function io(e, t) { +function so(e, t) { return function(r, n) { if (r == null) return r; - if (!Ht(r)) + if (!Ut(r)) return e(r, n); for (var i = r.length, s = t ? i : -1, a = Object(r); (t ? s-- : ++s < i) && n(a[s], s, a) !== !1; ) ; return r; }; } -var so = io(Mr); -const Rr = so; -function hi(e) { +var ao = so(jr); +const Mr = ao; +function vi(e) { return e; } -function mi(e) { - return typeof e == "function" ? e : hi; +function gi(e) { + return typeof e == "function" ? e : vi; } -function ao(e, t) { - var r = R(e) ? Rs : Rr; - return r(e, mi(t)); +function oo(e, t) { + var r = M(e) ? Ds : Mr; + return r(e, gi(t)); } function te(e, t) { - return e && Mr(e, mi(t)); + return e && jr(e, gi(t)); } -var oo = Array.prototype, lo = oo.reverse; -function uo(e) { - return e == null ? e : lo.call(e); +var lo = Array.prototype, uo = lo.reverse; +function co(e) { + return e == null ? e : uo.call(e); } -class vi { +class yi { constructor(t) { this.id = t, this.events = {}; } @@ -195,9 +195,9 @@ class vi { }); } } -const Rt = y(0), ie = y(1), B = y({}), ae = y(0), zt = y({}), tt = {}, $e = typeof window > "u"; -function co(e, t, r) { - $e || window.addEventListener("popstate", fo.bind(this)), Object.keys(t).length > 0 && Rt.value++, tt[ie.value] = new vi(ie.value), Ur(r), Gt(r.head), Hr(e); +const Mt = y(0), ie = y(1), R = y({}), ae = y(0), zt = y({}), tt = {}, $e = typeof window > "u"; +function fo(e, t, r) { + $e || window.addEventListener("popstate", po.bind(this)), Object.keys(t).length > 0 && Mt.value++, tt[ie.value] = new yi(ie.value), Hr(r), Gt(r.head), Ur(e); const n = $e ? "" : location.href, i = Dr( n, r.head, @@ -205,13 +205,13 @@ function co(e, t, r) { t, {}, ie.value, - Rt.value, + Mt.value, r.persistentLayout ); - gi(i); + bi(i); } -function fo(e) { - e.state && (B.value = e.state, ae.value = 0, zt.value = {}, Wr.value = {}, Nr.value = B.value.persistentLayoutKey, Gt(B.value.head), Hr(B.value.html, B.value.rememberedState.scrollY), ye("history:popped-state", B.value.url)); +function po(e) { + e.state && (R.value = e.state, ae.value = 0, zt.value = {}, Gr.value = {}, Nr.value = R.value.persistentLayoutKey, Gt(R.value.head), Ur(R.value.html, R.value.rememberedState.scrollY), ye("history:popped-state", R.value.url)); } function Dr(e, t, r, n, i, s, a, o) { const l = { @@ -224,90 +224,91 @@ function Dr(e, t, r, n, i, s, a, o) { dynamicVisitId: a, persistentLayoutKey: o }; - return B.value = l, l; + return R.value = l, l; } -function po(e) { +function ho(e) { $e || (window.history.pushState(e, "", e.url), ye("history:pushed-state", { url: e.url })); } -function ho(e) { +function mo(e) { const t = Dr( e, - JSON.parse(JSON.stringify(B.value.head)), - B.value.html, - JSON.parse(JSON.stringify(B.value.dynamics)), - { ...B.value.rememberedState }, - B.value.pageVisitId, - B.value.dynamicVisitId, - B.value.persistentLayoutKey + JSON.parse(JSON.stringify(R.value.head)), + R.value.html, + JSON.parse(JSON.stringify(R.value.dynamics)), + { ...R.value.rememberedState }, + R.value.pageVisitId, + R.value.dynamicVisitId, + R.value.persistentLayoutKey ); $e || (window.history.replaceState(t, "", t.url), ye("history:replaced-state", { url: t.url })); } -function gi(e) { +function bi(e) { $e || (window.history.replaceState(e, "", e.url), ye("history:replaced-state", { url: e.url })); } const ur = y(0), Nr = y(null); -function mo(e) { +function vo(e) { const t = URL.createObjectURL(e.data), r = e.headers["content-disposition"].split("filename=")[1], n = document.createElement("a"); n.href = t, n.download = r, document.body.appendChild(n), n.click(), setTimeout(() => { document.body.removeChild(n), URL.revokeObjectURL(t); }, 1); } -function vo(e, t, r) { +function go(e, t, r) { var g; ur.value++; const n = e.request.responseURL + (r ? "#" + r : ""); if (e.data instanceof Blob) { - mo(e); + vo(e); return; } if (J((g = e.data) == null ? void 0 : g.splade) || console.error("The response is not a Splade response. Did you use the Splade Middleware on this route?"), e.data.splade.lazy || e.data.splade.rehydrate) return; e.data.splade.modal && !e.data.splade.modalTarget && ae.value++; const i = Nr.value; - if (Ur(e.data.splade), Gt(e.data.splade.head), n === B.value.url && (t = !0), e.data.splade.modal) - return _i(e.data.html, e.data.splade.modal); + if (Hr(e.data.splade), Gt(e.data.splade.head), n === R.value.url && (t = !0), e.data.splade.modal) + return Ai(e.data.html, e.data.splade.modal); if (e.data.splade.preventRefresh) return; ae.value = 0, zt.value = {}; let s = e.data.html, a = e.data.dynamics; - const o = Object.keys(B.value.dynamics).length > 0, l = Object.keys(a).length > 0; - t ? (l && te(a, (f, p) => { - a[p] += ``; - }), (!l || !o) && (s += ``)) : (l && Rt.value++, (!l || !o) && (ie.value++, tt[ie.value] = tt[ie.value] || new vi(ie.value))); + const o = Object.keys(R.value.dynamics).length > 0, l = Object.keys(a).length > 0; + t ? (l && te(a, (f, h) => { + a[h] += ``; + }), (!l || !o) && (s += ``)) : (l && Mt.value++, (!l || !o) && (ie.value++, tt[ie.value] = tt[ie.value] || new yi(ie.value))); let u = e.data.splade.persistentLayout && i === e.data.splade.persistentLayout, c = 0; - !$e && t && e.data.splade.preserveScroll && (c = window.scrollY), Hr( - u ? B.value.html : s, - c + !$e && e.data.splade.preserveScroll && (c = window.scrollY), Ur( + u ? R.value.html : s, + c, + !t && !e.data.splade.preventViewTransition ); - const m = Dr( + const v = Dr( n, e.data.splade.head, - u ? B.value.html : s, + u ? R.value.html : s, a, - B.value.rememberedState ? { ...B.value.rememberedState } : {}, + R.value.rememberedState ? { ...R.value.rememberedState } : {}, ie.value, - Rt.value, + Mt.value, e.data.splade.persistentLayout ); - t ? gi(m) : po(m); + t ? bi(v) : ho(v); } -function go() { - ae.value--, Gt(bo(ae.value)); +function yo() { + ae.value--, Gt(wo(ae.value)); } -const yi = y({}), bi = (e) => yi.value[e], yo = (e) => Object.keys(bi.value[e]).length > 0, wi = y({}), bo = (e) => wi.value[e], Si = y({}), wo = (e) => Si.value[e], rt = y([]); -function So(e) { +const wi = y({}), Si = (e) => wi.value[e], bo = (e) => Object.keys(Si.value[e]).length > 0, Oi = y({}), wo = (e) => Oi.value[e], $i = y({}), So = (e) => $i.value[e], rt = y([]); +function Oo(e) { rt.value.push(e); } -const Oo = x(() => uo(rt.value)); -function $o(e) { +const $o = x(() => co(rt.value)); +function Eo(e) { rt.value[e].dismissed = !0, rt.value[e].html = null; } const Vr = y(null); -function Eo(e, t, r, n, i, s, a) { +function To(e, t, r, n, i, s, a) { let o, l; typeof i > "u" && (i = !1), typeof s > "u" && (s = !1), typeof a > "u" && (a = !1); - const u = new Promise((c, m) => { - o = c, l = m; + const u = new Promise((c, v) => { + o = c, l = v; }); return Vr.value = { title: e, @@ -321,48 +322,58 @@ function Eo(e, t, r, n, i, s, a) { confirmDanger: a }, u; } -function To() { +function xo() { Vr.value = null; } -const Oi = y({}); -function Ur(e) { - Nr.value = e.persistentLayout, Oi.value = e.shared ? e.shared : {}, Si.value[ae.value] = e.flash ? e.flash : {}, wi.value[ae.value] = e.head ? e.head : {}, ao(e.toasts ? e.toasts : [], (t) => { +const Ei = y({}); +function Hr(e) { + Nr.value = e.persistentLayout, Ei.value = e.shared ? e.shared : {}, $i.value[ae.value] = e.flash ? e.flash : {}, Oi.value[ae.value] = e.head ? e.head : {}, oo(e.toasts ? e.toasts : [], (t) => { rt.value.push(t); - }), yi.value[ae.value] = e.errors ? e.errors : {}; + }), wi.value[ae.value] = e.errors ? e.errors : {}; } -const $i = y(() => { -}), Ei = y(() => { -}), Ti = y(() => { +const Ti = y(() => { }), xi = y(() => { +}), _i = y(() => { +}), Ii = y(() => { }); function Gt(e) { - $i.value(e); + Ti.value(e); } -function Hr(e, t) { - Ei.value(e, t); +function Ur(e, t, r) { + xi.value(e, t, r === !0); } -function _i(e, t) { - zt.value[ae.value] = !0, Ti.value(e, t); +function Ai(e, t) { + zt.value[ae.value] = !0, _i.value(e, t); } -function xo(e) { +function _o(e) { return zt.value[e]; } -function Ai(e) { - xi.value(e); +function Pi(e) { + Ii.value(e); } -const Ii = y({}); -function Pi(e, t, r) { - Ii.value[e] = t, r && _o(e, t); +const Wr = y({}); +function qi(e, t, r) { + Wr.value[e] = t, r && Io(e, t); +} +function zr() { + return JSON.parse(localStorage.getItem("splade") || "{}") || {}; } -function _o(e, t) { - let r = JSON.parse(localStorage.getItem("splade") || "{}") || {}; +function Io(e, t) { + let r = zr(); r[e] = t, localStorage.setItem("splade", JSON.stringify(r)); } function Ao(e, t) { - return t ? (JSON.parse(localStorage.getItem("splade") || "{}") || {})[e] : Ii.value[e]; + return t ? zr()[e] : Wr.value[e]; +} +function Po(e, t) { + if (t) { + let r = zr(); + delete r[e], localStorage.setItem("splade", JSON.stringify(r)); + } + delete Wr.value[e]; } function Ke(e, t, r, n, i, s) { - if ($e || Pi("scrollY", window.scrollY), t.toUpperCase() === "GET") { + if ($e || qi("scrollY", window.scrollY), t.toUpperCase() === "GET") { const o = new URLSearchParams(r).toString(); o != "" && (e = `${e.split("?")[0]}?${o}`), r = {}; } @@ -384,7 +395,7 @@ function Ke(e, t, r, n, i, s) { }); return a.then((o) => { const l = e.split("#")[1] || ""; - vo(o, i, l), ye("internal:request-response", { url: e, method: t, data: r, headers: n, replace: i, response: o }); + go(o, i, l), ye("internal:request-response", { url: e, method: t, data: r, headers: n, replace: i, response: o }); }).catch(async (o) => { if (ye("internal:request-error", { url: e, method: t, data: r, headers: n, replace: i, error: o }), !o.response) return; @@ -397,115 +408,116 @@ function Ke(e, t, r, n, i, s) { l.data.type === "application/json" && typeof c == "string" ? u = JSON.parse(c) || {} : l.data.html = c; } else u = l.data.splade; - u && !u.lazy && !u.rehydrate && Ur(u), l.status != 422 && Ai( + u && !u.lazy && !u.rehydrate && Hr(u), l.status != 422 && Pi( l.data.html ? l.data.html : l.data ); }), a; } -function qi(e, t) { +function Ci(e, t) { return typeof t > "u" && (t = {}), Ke(e, "GET", {}, t, !0); } -function Io(e, t) { +function qo(e, t) { return typeof t > "u" && (t = {}), Ke(e, "GET", {}, t, !1); } -function Po(e) { +function Co(e) { return Ke(e, "GET", {}, { "X-Splade-Modal": "modal" }, !1); } -const Wr = y({}); -function qo(e) { - const t = Wr.value[e]; - return t ? (ae.value++, _i(t.html, t.type), !0) : !1; +const Gr = y({}); +function Fo(e) { + const t = Gr.value[e]; + return t ? (ae.value++, Ai(t.html, t.type), !0) : !1; } -function Co(e, t, r) { - Wr.value[e] = { html: t, type: r }; +function ko(e, t, r) { + Gr.value[e] = { html: t, type: r }; } -function Fo(e) { +function Lo(e) { return Ke(e, "GET", {}, { "X-Splade-Modal": "slideover" }, !1); } -function ko(e, t) { +function Ro(e, t) { return Ke(e, "GET", {}, { "X-Splade-Lazy": t }, !1); } -function Lo(e, t) { +function Bo(e, t) { return Ke(e, "GET", {}, { "X-Splade-Rehydrate": t }, !1); } -function Bo(e) { +function jo(e) { typeof e > "u" && (e = !1); const t = { "X-Splade-Refresh": !0 }; - return e && (t["X-Splade-Preserve-Scroll"] = !0), qi(B.value.url, t); + return e && (t["X-Splade-Preserve-Scroll"] = !0), Ci(R.value.url, t); } -function jo(e, t) { +function Mo(e, t) { tt[ie.value].on(e, t); } -function Mo(e, t) { +function Do(e, t) { tt[ie.value].off(e, t); } function ye(e, t) { typeof t > "u" && (t = {}), tt[ie.value].emit(e, t), $e || document.dispatchEvent(new CustomEvent(`splade:${e}`, { detail: t })); } -const v = { - init: co, - replace: qi, - visit: Io, - modal: Po, - slideover: Fo, - refresh: Bo, +const p = { + init: fo, + replace: Ci, + visit: qo, + modal: Co, + slideover: Lo, + refresh: jo, request: Ke, - lazy: ko, - rehydrate: Lo, - replaceUrlOfCurrentPage: ho, + lazy: Ro, + rehydrate: Bo, + replaceUrlOfCurrentPage: mo, htmlForDynamicComponent(e) { - return B.value.dynamics[e]; + return R.value.dynamics[e]; }, setOnHead(e) { - $i.value = e; + Ti.value = e; }, setOnHtml(e) { - Ei.value = e; + xi.value = e; }, setOnModal(e) { - Ti.value = e; + _i.value = e; }, setOnServerError(e) { - xi.value = e; + Ii.value = e; }, - onServerError: Ai, - hasValidationErrors: yo, - validationErrors: bi, - sharedData: Oi, + onServerError: Pi, + hasValidationErrors: bo, + validationErrors: Si, + sharedData: Ei, // ref - flashData: wo, + flashData: So, toasts: rt, // ref - toastsReversed: Oo, + toastsReversed: $o, // ref confirmModal: Vr, // ref - confirm: Eo, - clearConfirmModal: To, - pushToast: So, - dismissToast: $o, + confirm: To, + clearConfirmModal: xo, + pushToast: Oo, + dismissToast: Eo, restore: Ao, - remember: Pi, - popStack: go, + remember: qi, + forget: Po, + popStack: yo, currentStack: ae, // ref - stackType: xo, - pageVisitId: x(() => B.value.pageVisitId), + stackType: _o, + pageVisitId: x(() => R.value.pageVisitId), // ref - dynamicVisitId: x(() => B.value.dynamicVisitId), + dynamicVisitId: x(() => R.value.dynamicVisitId), // ref isSsr: $e, - openPreloadedModal: qo, - registerPreloadedModal: Co, - on: jo, - off: Mo, + openPreloadedModal: Fo, + registerPreloadedModal: ko, + on: Mo, + off: Do, emit: ye }; -var Ro = "[object String]"; +var No = "[object String]"; function se(e) { - return typeof e == "string" || !R(e) && Le(e) && je(e) == Ro; + return typeof e == "string" || !M(e) && Le(e) && Be(e) == No; } const ue = { __name: "Render", @@ -532,12 +544,12 @@ const ue = { return { ...t.passthrough }; } }), Oe(() => { - v.emit("rendered"); + p.emit("rendered"); }); } - return ot(() => t.html, n, { immediate: !0 }), (i, s) => e.html ? (j(), X(ee(r), { key: 0 })) : Fr("", !0); + return ot(() => t.html, n, { immediate: !0 }), (i, s) => e.html ? (B(), X(ee(r), { key: 0 })) : Fr("", !0); } -}, Do = { +}, Vo = { __name: "ServerError", props: { html: { @@ -562,7 +574,7 @@ const ue = { function a() { document.body.style.overflow = "visible", document.removeEventListener("keydown", s), t("close"); } - return V(() => i()), (o, l) => (j(), ce("div", { + return V(() => i()), (o, l) => (B(), ce("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: a }, [ @@ -573,7 +585,7 @@ const ue = { }, null, 512) ])); } -}, No = { +}, Ho = { __name: "SpladeApp", props: { el: { @@ -585,7 +597,7 @@ const ue = { type: String, required: !1, default: (e) => { - if (!v.isSsr) { + if (!p.isSsr) { const t = se(e.el) ? document.getElementById(e.el) : e.el; return JSON.parse(t.dataset.components) || ""; } @@ -595,7 +607,7 @@ const ue = { type: String, required: !1, default: (e) => { - if (!v.isSsr) { + if (!p.isSsr) { const t = se(e.el) ? document.getElementById(e.el) : e.el; return JSON.parse(t.dataset.html) || ""; } @@ -605,7 +617,7 @@ const ue = { type: Object, required: !1, default: (e) => { - if (!v.isSsr) { + if (!p.isSsr) { const t = se(e.el) ? document.getElementById(e.el) : e.el; return JSON.parse(t.dataset.dynamics) || {}; } @@ -615,7 +627,7 @@ const ue = { type: Object, required: !1, default: (e) => { - if (!v.isSsr) { + if (!p.isSsr) { const t = se(e.el) ? document.getElementById(e.el) : e.el; return JSON.parse(t.dataset.splade) || {}; } @@ -625,7 +637,7 @@ const ue = { setup(e) { const t = e; de("stack", 0); - const r = y(), n = y([]), i = y(null), s = y(null), a = y(!0), o = z("$spladeOptions") || {}, l = x(() => v.currentStack.value < 1 ? [] : { + const r = y(), n = y([]), i = y(null), s = y(null), a = y(!0), o = z("$spladeOptions") || {}, l = x(() => p.currentStack.value < 1 ? [] : { filter: "blur(4px)", "transition-property": "filter", "transition-duration": "150ms", @@ -634,101 +646,99 @@ const ue = { function u() { i.value = null; } - function c(p) { - n.value[p] = null, v.popStack(); + function c(h) { + n.value[h] = null, p.popStack(); } - function m(p) { - const h = document.createElement("meta"); - te(p, (d, b) => { - h[b] = d; - }), document.getElementsByTagName("head")[0].appendChild(h); + function v(h) { + const m = document.createElement("meta"); + te(h, (d, b) => { + m[b] = d; + }), document.getElementsByTagName("head")[0].appendChild(m); } - function g(p) { + function g(h) { var d; - let h = "meta"; - te(p, (b, O) => { - h = `${h}[${O}="${b}"]`; + let m = "meta"; + te(h, (b, O) => { + m = `${m}[${O}="${b}"]`; }); try { - (d = document.querySelector(h)) == null || d.remove(); + (d = document.querySelector(m)) == null || d.remove(); } catch { } } - v.setOnHead((p) => { - var h; - if (!v.isSsr) { + p.setOnHead((h) => { + var m; + if (!p.isSsr) { if (s.value === null) { - s.value = p.meta; + s.value = h.meta; return; } if (s.value.forEach((d) => { g(d); - }), s.value = p.meta, document.title = p.title, p.meta.forEach((d) => { - m(d); - }), (h = document.querySelector('link[rel="canonical"]')) == null || h.remove(), p.canonical) { + }), s.value = h.meta, document.title = h.title, h.meta.forEach((d) => { + v(d); + }), (m = document.querySelector('link[rel="canonical"]')) == null || m.remove(), h.canonical) { const d = document.createElement("link"); - d.rel = "canonical", d.href = p.canonical, document.getElementsByTagName("head")[0].appendChild(d); + d.rel = "canonical", d.href = h.canonical, document.getElementsByTagName("head")[0].appendChild(d); } } }); - const f = (p, h) => { - n.value = [], r.value = p, Oe(() => { - if (!v.isSsr) { + const f = (h, m) => { + n.value = [], r.value = h, Oe(() => { + if (!p.isSsr) { const d = window.location.hash; - d && document.getElementById(d.substring(1)) ? window.location.hash = d : window.scrollTo(0, h); + d && document.getElementById(d.substring(1)) ? window.location.hash = d : window.scrollTo(0, m); } o.transform_anchors && [...document.querySelectorAll("a")].forEach((d) => { d.href == "" || d.href.charAt(0) == "#" || d.__vnode.dynamicProps === null && (d.hasAttribute("download") || (d.onclick = function(b) { - b.preventDefault(), v.visit(d.href); + b.preventDefault(), p.visit(d.href); })); }); }); }; - return v.setOnHtml((p, h) => { - if (v.isSsr || !document.startViewTransition || !o.view_transitions) { - f(p, h); - return; - } - document.startViewTransition(() => f(p, h)); - }), v.setOnModal(function(p, h) { - n.value[v.currentStack.value] && (a.value = !1), n.value[v.currentStack.value] = { html: p, type: h }, Oe(() => { + return p.setOnHtml((h, m, d) => { + if (!p.isSsr && document.startViewTransition && o.view_transitions && d) + return document.startViewTransition(() => f(h, m)); + f(h, m); + }), p.setOnModal(function(h, m) { + n.value[p.currentStack.value] && (a.value = !1), n.value[p.currentStack.value] = { html: h, type: m }, Oe(() => { a.value = !0; }); - }), v.setOnServerError(function(p) { - i.value = p; - }), v.init(t.initialHtml, t.initialDynamics, t.initialSpladeData), V(() => { - if (v.isSsr) + }), p.setOnServerError(function(h) { + i.value = h; + }), p.init(t.initialHtml, t.initialDynamics, t.initialSpladeData), V(() => { + if (p.isSsr) return; - const p = se(t.el) ? document.getElementById(t.el) : t.el; - ["components", "html", "dynamics", "splade"].forEach((h) => { - delete p.dataset[h]; + const h = se(t.el) ? document.getElementById(t.el) : t.el; + ["components", "html", "dynamics", "splade"].forEach((m) => { + delete h.dataset[m]; }); - }), (p, h) => (j(), ce("div", null, [ - ee(v).isSsr ? (j(), X(ue, { - key: `visit.${ee(v).pageVisitId.value}`, - style: Mt(l.value), + }), (h, m) => (B(), ce("div", null, [ + ee(p).isSsr ? (B(), X(ue, { + key: `visit.${ee(p).pageVisitId.value}`, + style: jt(l.value), html: r.value - }, null, 8, ["style", "html"])) : (j(), X(ni, { + }, null, 8, ["style", "html"])) : (B(), X(si, { key: 0, max: ee(o).max_keep_alive }, [ - (j(), X(ue, { - key: `visit.${ee(v).pageVisitId.value}`, - style: Mt(l.value), + (B(), X(ue, { + key: `visit.${ee(p).pageVisitId.value}`, + style: jt(l.value), html: r.value }, null, 8, ["style", "html"])) ], 1032, ["max"])), - xs(ue, { html: e.components }, null, 8, ["html"]), - (j(!0), ce(kr, null, _s(ee(v).currentStack.value, (d) => (j(), X(ue, { + _s(ue, { html: e.components }, null, 8, ["html"]), + (B(!0), ce(kr, null, Is(ee(p).currentStack.value, (d) => (B(), X(ue, { key: `modal.${d}`, type: n.value[d].type, html: n.value[d].html, stack: d, - "on-top-of-stack": ee(v).currentStack.value === d, + "on-top-of-stack": ee(p).currentStack.value === d, animate: a.value, onClose: (b) => c(d) }, null, 8, ["type", "html", "stack", "on-top-of-stack", "animate", "onClose"]))), 128)), - i.value ? (j(), X(Do, { + i.value ? (B(), X(Vo, { key: 2, html: i.value, onClose: u @@ -736,38 +746,38 @@ const ue = { ])); } }; -function Pp(e) { - return () => N(No, e); +function Cp(e) { + return () => N(Ho, e); } -var Vo = Object.prototype, Uo = Vo.hasOwnProperty; -function Ho(e, t) { - return e != null && Uo.call(e, t); +var Uo = Object.prototype, Wo = Uo.hasOwnProperty; +function zo(e, t) { + return e != null && Wo.call(e, t); } -var Wo = "[object Symbol]"; +var Go = "[object Symbol]"; function Xt(e) { - return typeof e == "symbol" || Le(e) && je(e) == Wo; + return typeof e == "symbol" || Le(e) && Be(e) == Go; } -var zo = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Go = /^\w*$/; -function zr(e, t) { - if (R(e)) +var Xo = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Ko = /^\w*$/; +function Xr(e, t) { + if (M(e)) return !1; var r = typeof e; - return r == "number" || r == "symbol" || r == "boolean" || e == null || Xt(e) ? !0 : Go.test(e) || !zo.test(e) || t != null && e in Object(t); + return r == "number" || r == "symbol" || r == "boolean" || e == null || Xt(e) ? !0 : Ko.test(e) || !Xo.test(e) || t != null && e in Object(t); } -var Xo = ve["__core-js_shared__"]; -const cr = Xo; -var _n = function() { +var Jo = ve["__core-js_shared__"]; +const cr = Jo; +var An = function() { var e = /[^.]+$/.exec(cr && cr.keys && cr.keys.IE_PROTO || ""); return e ? "Symbol(src)_1." + e : ""; }(); -function Ko(e) { - return !!_n && _n in e; +function Qo(e) { + return !!An && An in e; } -var Jo = Function.prototype, Qo = Jo.toString; +var Yo = Function.prototype, Zo = Yo.toString; function Je(e) { if (e != null) { try { - return Qo.call(e); + return Zo.call(e); } catch { } try { @@ -777,49 +787,49 @@ function Je(e) { } return ""; } -var Yo = /[\\^$.*+?()[\]{}|]/g, Zo = /^\[object .+?Constructor\]$/, el = Function.prototype, tl = Object.prototype, rl = el.toString, nl = tl.hasOwnProperty, il = RegExp( - "^" + rl.call(nl).replace(Yo, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" +var el = /[\\^$.*+?()[\]{}|]/g, tl = /^\[object .+?Constructor\]$/, rl = Function.prototype, nl = Object.prototype, il = rl.toString, sl = nl.hasOwnProperty, al = RegExp( + "^" + il.call(sl).replace(el, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" ); -function sl(e) { - if (!J(e) || Ko(e)) +function ol(e) { + if (!J(e) || Qo(e)) return !1; - var t = pi(e) ? il : Zo; + var t = mi(e) ? al : tl; return t.test(Je(e)); } -function al(e, t) { +function ll(e, t) { return e == null ? void 0 : e[t]; } function Qe(e, t) { - var r = al(e, t); - return sl(r) ? r : void 0; + var r = ll(e, t); + return ol(r) ? r : void 0; } -var ol = Qe(Object, "create"); -const bt = ol; -function ll() { +var ul = Qe(Object, "create"); +const bt = ul; +function cl() { this.__data__ = bt ? bt(null) : {}, this.size = 0; } -function ul(e) { +function dl(e) { var t = this.has(e) && delete this.__data__[e]; return this.size -= t ? 1 : 0, t; } -var cl = "__lodash_hash_undefined__", dl = Object.prototype, fl = dl.hasOwnProperty; -function pl(e) { +var fl = "__lodash_hash_undefined__", pl = Object.prototype, hl = pl.hasOwnProperty; +function ml(e) { var t = this.__data__; if (bt) { var r = t[e]; - return r === cl ? void 0 : r; + return r === fl ? void 0 : r; } - return fl.call(t, e) ? t[e] : void 0; + return hl.call(t, e) ? t[e] : void 0; } -var hl = Object.prototype, ml = hl.hasOwnProperty; -function vl(e) { +var vl = Object.prototype, gl = vl.hasOwnProperty; +function yl(e) { var t = this.__data__; - return bt ? t[e] !== void 0 : ml.call(t, e); + return bt ? t[e] !== void 0 : gl.call(t, e); } -var gl = "__lodash_hash_undefined__"; -function yl(e, t) { +var bl = "__lodash_hash_undefined__"; +function wl(e, t) { var r = this.__data__; - return this.size += this.has(e) ? 0 : 1, r[e] = bt && t === void 0 ? gl : t, this; + return this.size += this.has(e) ? 0 : 1, r[e] = bt && t === void 0 ? bl : t, this; } function Ge(e) { var t = -1, r = e == null ? 0 : e.length; @@ -828,39 +838,39 @@ function Ge(e) { this.set(n[0], n[1]); } } -Ge.prototype.clear = ll; -Ge.prototype.delete = ul; -Ge.prototype.get = pl; -Ge.prototype.has = vl; -Ge.prototype.set = yl; -function bl() { +Ge.prototype.clear = cl; +Ge.prototype.delete = dl; +Ge.prototype.get = ml; +Ge.prototype.has = yl; +Ge.prototype.set = wl; +function Sl() { this.__data__ = [], this.size = 0; } -function Gr(e, t) { +function Kr(e, t) { return e === t || e !== e && t !== t; } function Kt(e, t) { for (var r = e.length; r--; ) - if (Gr(e[r][0], t)) + if (Kr(e[r][0], t)) return r; return -1; } -var wl = Array.prototype, Sl = wl.splice; -function Ol(e) { +var Ol = Array.prototype, $l = Ol.splice; +function El(e) { var t = this.__data__, r = Kt(t, e); if (r < 0) return !1; var n = t.length - 1; - return r == n ? t.pop() : Sl.call(t, r, 1), --this.size, !0; + return r == n ? t.pop() : $l.call(t, r, 1), --this.size, !0; } -function $l(e) { +function Tl(e) { var t = this.__data__, r = Kt(t, e); return r < 0 ? void 0 : t[r][1]; } -function El(e) { +function xl(e) { return Kt(this.__data__, e) > -1; } -function Tl(e, t) { +function _l(e, t) { var r = this.__data__, n = Kt(r, e); return n < 0 ? (++this.size, r.push([e, t])) : r[n][1] = t, this; } @@ -871,39 +881,39 @@ function Te(e) { this.set(n[0], n[1]); } } -Te.prototype.clear = bl; -Te.prototype.delete = Ol; -Te.prototype.get = $l; -Te.prototype.has = El; -Te.prototype.set = Tl; -var xl = Qe(ve, "Map"); -const wt = xl; -function _l() { +Te.prototype.clear = Sl; +Te.prototype.delete = El; +Te.prototype.get = Tl; +Te.prototype.has = xl; +Te.prototype.set = _l; +var Il = Qe(ve, "Map"); +const wt = Il; +function Al() { this.size = 0, this.__data__ = { hash: new Ge(), map: new (wt || Te)(), string: new Ge() }; } -function Al(e) { +function Pl(e) { var t = typeof e; return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null; } function Jt(e, t) { var r = e.__data__; - return Al(t) ? r[typeof t == "string" ? "string" : "hash"] : r.map; + return Pl(t) ? r[typeof t == "string" ? "string" : "hash"] : r.map; } -function Il(e) { +function ql(e) { var t = Jt(this, e).delete(e); return this.size -= t ? 1 : 0, t; } -function Pl(e) { +function Cl(e) { return Jt(this, e).get(e); } -function ql(e) { +function Fl(e) { return Jt(this, e).has(e); } -function Cl(e, t) { +function kl(e, t) { var r = Jt(this, e), n = r.size; return r.set(e, t), this.size += r.size == n ? 0 : 1, this; } @@ -914,15 +924,15 @@ function xe(e) { this.set(n[0], n[1]); } } -xe.prototype.clear = _l; -xe.prototype.delete = Il; -xe.prototype.get = Pl; -xe.prototype.has = ql; -xe.prototype.set = Cl; -var Fl = "Expected a function"; -function Xr(e, t) { +xe.prototype.clear = Al; +xe.prototype.delete = ql; +xe.prototype.get = Cl; +xe.prototype.has = Fl; +xe.prototype.set = kl; +var Ll = "Expected a function"; +function Jr(e, t) { if (typeof e != "function" || t != null && typeof t != "function") - throw new TypeError(Fl); + throw new TypeError(Ll); var r = function() { var n = arguments, i = t ? t.apply(this, n) : n[0], s = r.cache; if (s.has(i)) @@ -930,66 +940,66 @@ function Xr(e, t) { var a = e.apply(this, n); return r.cache = s.set(i, a) || s, a; }; - return r.cache = new (Xr.Cache || xe)(), r; + return r.cache = new (Jr.Cache || xe)(), r; } -Xr.Cache = xe; -var kl = 500; -function Ll(e) { - var t = Xr(e, function(n) { - return r.size === kl && r.clear(), n; +Jr.Cache = xe; +var Rl = 500; +function Bl(e) { + var t = Jr(e, function(n) { + return r.size === Rl && r.clear(), n; }), r = t.cache; return t; } -var Bl = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, jl = /\\(\\)?/g, Ml = Ll(function(e) { +var jl = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, Ml = /\\(\\)?/g, Dl = Bl(function(e) { var t = []; - return e.charCodeAt(0) === 46 && t.push(""), e.replace(Bl, function(r, n, i, s) { - t.push(i ? s.replace(jl, "$1") : n || r); + return e.charCodeAt(0) === 46 && t.push(""), e.replace(jl, function(r, n, i, s) { + t.push(i ? s.replace(Ml, "$1") : n || r); }), t; }); -const Rl = Ml; -function Ci(e, t) { +const Nl = Dl; +function Fi(e, t) { for (var r = -1, n = e == null ? 0 : e.length, i = Array(n); ++r < n; ) i[r] = t(e[r], r, e); return i; } -var Dl = 1 / 0, An = ke ? ke.prototype : void 0, In = An ? An.toString : void 0; +var Vl = 1 / 0, Pn = ke ? ke.prototype : void 0, qn = Pn ? Pn.toString : void 0; function Qt(e) { if (typeof e == "string") return e; - if (R(e)) - return Ci(e, Qt) + ""; + if (M(e)) + return Fi(e, Qt) + ""; if (Xt(e)) - return In ? In.call(e) : ""; + return qn ? qn.call(e) : ""; var t = e + ""; - return t == "0" && 1 / e == -Dl ? "-0" : t; + return t == "0" && 1 / e == -Vl ? "-0" : t; } -function Kr(e) { +function Qr(e) { return e == null ? "" : Qt(e); } -function Jr(e, t) { - return R(e) ? e : zr(e, t) ? [e] : Rl(Kr(e)); +function Yr(e, t) { + return M(e) ? e : Xr(e, t) ? [e] : Nl(Qr(e)); } -var Nl = 1 / 0; +var Hl = 1 / 0; function $t(e) { if (typeof e == "string" || Xt(e)) return e; var t = e + ""; - return t == "0" && 1 / e == -Nl ? "-0" : t; + return t == "0" && 1 / e == -Hl ? "-0" : t; } -function Fi(e, t, r) { - t = Jr(t, e); +function ki(e, t, r) { + t = Yr(t, e); for (var n = -1, i = t.length, s = !1; ++n < i; ) { var a = $t(t[n]); if (!(s = e != null && r(e, a))) break; e = e[a]; } - return s || ++n != i ? s : (i = e == null ? 0 : e.length, !!i && jr(i) && Br(a, i) && (R(e) || ui(e))); + return s || ++n != i ? s : (i = e == null ? 0 : e.length, !!i && Br(i) && Rr(a, i) && (M(e) || di(e))); } function W(e, t) { - return e != null && Fi(e, t, Ho); + return e != null && ki(e, t, zo); } -const Vl = { +const Ul = { props: { spinner: { type: Boolean, @@ -1014,7 +1024,7 @@ function fe(e, t, ...r) { var Dt = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(Dt || {}), Ce = ((e) => (e[e.Unmount = 0] = "Unmount", e[e.Hidden = 1] = "Hidden", e))(Ce || {}); function Z({ visible: e = !0, features: t = 0, ourProps: r, theirProps: n, ...i }) { var s; - let a = Li(n, r), o = Object.assign(i, { props: a }); + let a = Ri(n, r), o = Object.assign(i, { props: a }); if (e || t & 2 && a.static) return dr(o); if (t & 1) { @@ -1031,32 +1041,32 @@ function dr({ props: e, attrs: t, slots: r, slot: n, name: i }) { var s, a; let { as: o, ...l } = Bi(e, ["unmount", "static"]), u = (s = r.default) == null ? void 0 : s.call(r, n), c = {}; if (n) { - let m = !1, g = []; - for (let [f, p] of Object.entries(n)) - typeof p == "boolean" && (m = !0), p === !0 && g.push(f); - m && (c["data-headlessui-state"] = g.join(" ")); + let v = !1, g = []; + for (let [f, h] of Object.entries(n)) + typeof h == "boolean" && (v = !0), h === !0 && g.push(f); + v && (c["data-headlessui-state"] = g.join(" ")); } if (o === "template") { - if (u = ki(u ?? []), Object.keys(l).length > 0 || Object.keys(t).length > 0) { - let [m, ...g] = u ?? []; - if (!Ul(m) || g.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)).map((h) => h.trim()).filter((h, d, b) => b.indexOf(h) === d).sort((h, d) => h.localeCompare(d)).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(` + if (u = Li(u ?? []), Object.keys(l).length > 0 || Object.keys(t).length > 0) { + let [v, ...g] = u ?? []; + if (!Wl(v) || g.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)).map((m) => m.trim()).filter((m, d, b) => b.indexOf(m) === d).sort((m, d) => m.localeCompare(d)).map((m) => ` - ${m}`).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((m) => ` - ${m}`).join(` `)].join(` `)); - let f = Li((a = m.props) != null ? a : {}, l), p = As(m, f); - for (let h in f) - h.startsWith("on") && (p.props || (p.props = {}), p.props[h] = f[h]); - return p; + let f = Ri((a = v.props) != null ? a : {}, l), h = As(v, f); + for (let m in f) + m.startsWith("on") && (h.props || (h.props = {}), h.props[m] = f[m]); + return h; } return Array.isArray(u) && u.length === 1 ? u[0] : u; } return N(o, Object.assign({}, l, c), { default: () => u }); } -function ki(e) { - return e.flatMap((t) => t.type === kr ? ki(t.children) : [t]); +function Li(e) { + return e.flatMap((t) => t.type === kr ? Li(t.children) : [t]); } -function Li(...e) { +function Ri(...e) { if (e.length === 0) return {}; if (e.length === 1) @@ -1084,15 +1094,15 @@ function Bi(e, t = []) { n in r && delete r[n]; return r; } -function Ul(e) { +function Wl(e) { return e == null ? !1 : typeof e.type == "string" || typeof e.type == "object" || typeof e.type == "function"; } -let Hl = 0; -function Wl() { - return ++Hl; +let zl = 0; +function Gl() { + return ++zl; } function Ye() { - return Wl(); + return Gl(); } var ji = ((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))(ji || {}); function D(e) { @@ -1101,19 +1111,19 @@ function D(e) { } let Mi = Symbol("Context"); var G = ((e) => (e[e.Open = 1] = "Open", e[e.Closed = 2] = "Closed", e[e.Closing = 4] = "Closing", e[e.Opening = 8] = "Opening", e))(G || {}); -function zl() { - return Qr() !== null; +function Xl() { + return Zr() !== null; } -function Qr() { +function Zr() { return z(Mi, null); } -function Gl(e) { +function Kl(e) { de(Mi, e); } -var Xl = Object.defineProperty, Kl = (e, t, r) => t in e ? Xl(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, Pn = (e, t, r) => (Kl(e, typeof t != "symbol" ? t + "" : t, r), r); -class Jl { +var Jl = Object.defineProperty, Ql = (e, t, r) => t in e ? Jl(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, Cn = (e, t, r) => (Ql(e, typeof t != "symbol" ? t + "" : t, r), r); +class Yl { constructor() { - Pn(this, "current", this.detect()), Pn(this, "currentId", 0); + Cn(this, "current", this.detect()), Cn(this, "currentId", 0); } set(t) { this.current !== t && (this.currentId = 0, this.current = t); @@ -1134,7 +1144,7 @@ class Jl { return typeof window > "u" || typeof document > "u" ? "server" : "client"; } } -let Et = new Jl(); +let Et = new Yl(); function Tt(e) { if (Et.isServer) return null; @@ -1148,12 +1158,12 @@ function Tt(e) { return document; } let br = ["[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 qe = ((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))(qe || {}), Ri = ((e) => (e[e.Error = 0] = "Error", e[e.Overflow = 1] = "Overflow", e[e.Success = 2] = "Success", e[e.Underflow = 3] = "Underflow", e))(Ri || {}), Ql = ((e) => (e[e.Previous = -1] = "Previous", e[e.Next = 1] = "Next", e))(Ql || {}); -function Yl(e = document.body) { +var qe = ((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))(qe || {}), Di = ((e) => (e[e.Error = 0] = "Error", e[e.Overflow = 1] = "Overflow", e[e.Success = 2] = "Success", e[e.Underflow = 3] = "Underflow", e))(Di || {}), Zl = ((e) => (e[e.Previous = -1] = "Previous", e[e.Next = 1] = "Next", e))(Zl || {}); +function eu(e = document.body) { return e == null ? [] : Array.from(e.querySelectorAll(br)).sort((t, r) => Math.sign((t.tabIndex || Number.MAX_SAFE_INTEGER) - (r.tabIndex || Number.MAX_SAFE_INTEGER))); } -var Di = ((e) => (e[e.Strict = 0] = "Strict", e[e.Loose = 1] = "Loose", e))(Di || {}); -function Zl(e, t = 0) { +var Ni = ((e) => (e[e.Strict = 0] = "Strict", e[e.Loose = 1] = "Loose", e))(Ni || {}); +function tu(e, t = 0) { var r; return e === ((r = Tt(e)) == null ? void 0 : r.body) ? !1 : fe(t, { [0]() { return e.matches(br); @@ -1167,7 +1177,7 @@ function Zl(e, t = 0) { return !1; } }); } -var eu = ((e) => (e[e.Keyboard = 0] = "Keyboard", e[e.Mouse = 1] = "Mouse", e))(eu || {}); +var ru = ((e) => (e[e.Keyboard = 0] = "Keyboard", e[e.Mouse = 1] = "Mouse", e))(ru || {}); typeof window < "u" && typeof document < "u" && (document.addEventListener("keydown", (e) => { e.metaKey || e.altKey || e.ctrlKey || (document.documentElement.dataset.headlessuiFocusVisible = ""); }, !0), document.addEventListener("click", (e) => { @@ -1176,12 +1186,12 @@ typeof window < "u" && typeof document < "u" && (document.addEventListener("keyd function We(e) { e == null || e.focus({ preventScroll: !0 }); } -let tu = ["textarea", "input"].join(","); -function ru(e) { +let nu = ["textarea", "input"].join(","); +function iu(e) { var t, r; - return (r = (t = e == null ? void 0 : e.matches) == null ? void 0 : t.call(e, tu)) != null ? r : !1; + return (r = (t = e == null ? void 0 : e.matches) == null ? void 0 : t.call(e, nu)) != null ? r : !1; } -function nu(e, t = (r) => r) { +function su(e, t = (r) => r) { return e.slice().sort((r, n) => { let i = t(r), s = t(n); if (i === null || s === null) @@ -1192,8 +1202,8 @@ function nu(e, t = (r) => r) { } function Lt(e, t, { sorted: r = !0, relativeTo: n = null, skipElements: i = [] } = {}) { var s; - let a = (s = Array.isArray(e) ? e.length > 0 ? e[0].ownerDocument : document : e == null ? void 0 : e.ownerDocument) != null ? s : document, o = Array.isArray(e) ? r ? nu(e) : e : Yl(e); - i.length > 0 && o.length > 1 && (o = o.filter((p) => !i.includes(p))), n = n ?? a.activeElement; + let a = (s = Array.isArray(e) ? e.length > 0 ? e[0].ownerDocument : document : e == null ? void 0 : e.ownerDocument) != null ? s : document, o = Array.isArray(e) ? r ? su(e) : e : eu(e); + i.length > 0 && o.length > 1 && (o = o.filter((h) => !i.includes(h))), n = n ?? a.activeElement; let l = (() => { if (t & 5) return 1; @@ -1210,29 +1220,29 @@ function Lt(e, t, { sorted: r = !0, relativeTo: n = null, skipElements: i = [] } if (t & 8) return o.length - 1; throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last"); - })(), c = t & 32 ? { preventScroll: !0 } : {}, m = 0, g = o.length, f; + })(), c = t & 32 ? { preventScroll: !0 } : {}, v = 0, g = o.length, f; do { - if (m >= g || m + g <= 0) + if (v >= g || v + g <= 0) return 0; - let p = u + m; + let h = u + v; if (t & 16) - p = (p + g) % g; + h = (h + g) % g; else { - if (p < 0) + if (h < 0) return 3; - if (p >= g) + if (h >= g) return 1; } - f = o[p], f == null || f.focus(c), m += l; + f = o[h], f == null || f.focus(c), v += l; } while (f !== a.activeElement); - return t & 6 && ru(f) && f.select(), 2; + return t & 6 && iu(f) && f.select(), 2; } function fr(e, t, r) { Et.isServer || le((n) => { document.addEventListener(e, t, r), n(() => document.removeEventListener(e, t, r)); }); } -function iu(e, t, r = x(() => !0)) { +function au(e, t, r = x(() => !0)) { function n(s, a) { if (!r.value || s.defaultPrevented) return; @@ -1249,7 +1259,7 @@ function iu(e, t, r = x(() => !0)) { if (c != null && c.contains(o) || s.composed && s.composedPath().includes(c)) return; } - return !Zl(o, Di.Loose) && o.tabIndex !== -1 && s.preventDefault(), t(s, o); + return !tu(o, Ni.Loose) && o.tabIndex !== -1 && s.preventDefault(), t(s, o); } let i = y(null); fr("mousedown", (s) => { @@ -1266,32 +1276,32 @@ let wr = Y({ name: "Hidden", props: { as: { type: [Object, String], default: "di return Z({ ourProps: s, theirProps: i, slot: {}, attrs: r, slots: t, name: "Hidden" }); }; } }); -function su() { +function ou() { return /iPhone/gi.test(window.navigator.platform) || /Mac/gi.test(window.navigator.platform) && window.navigator.maxTouchPoints > 0; } -function au(e, t, r) { +function lu(e, t, r) { Et.isServer || le((n) => { window.addEventListener(e, t, r), n(() => window.removeEventListener(e, t, r)); }); } var vt = ((e) => (e[e.Forwards = 0] = "Forwards", e[e.Backwards = 1] = "Backwards", e))(vt || {}); -function ou() { +function uu() { let e = y(0); - return au("keydown", (t) => { + return lu("keydown", (t) => { t.key === "Tab" && (e.value = t.shiftKey ? 1 : 0); }), e; } -function Ni(e, t, r, n) { +function Vi(e, t, r, n) { Et.isServer || le((i) => { e = e ?? window, e.addEventListener(t, r, n), i(() => e.removeEventListener(t, r, n)); }); } -function Vi(e) { +function Hi(e) { typeof queueMicrotask == "function" ? queueMicrotask(e) : Promise.resolve().then(e).catch((t) => setTimeout(() => { throw t; })); } -function lu(e) { +function cu(e) { function t() { document.readyState !== "loading" && (e(), document.removeEventListener("DOMContentLoaded", t)); } @@ -1309,27 +1319,27 @@ function Ui(e) { } return t; } -var Hi = ((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))(Hi || {}); +var Wi = ((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))(Wi || {}); let pt = Object.assign(Y({ name: "FocusTrap", props: { as: { type: [Object, String], default: "div" }, initialFocus: { type: Object, default: null }, features: { type: Number, default: 30 }, containers: { type: [Object, Function], default: y(/* @__PURE__ */ new Set()) } }, inheritAttrs: !1, setup(e, { attrs: t, slots: r, expose: n }) { let i = y(null); n({ el: i, $el: i }); let s = x(() => Tt(i)), a = y(!1); - V(() => a.value = !0), me(() => a.value = !1), cu({ ownerDocument: s }, x(() => a.value && !!(e.features & 16))); - let o = du({ ownerDocument: s, container: i, initialFocus: x(() => e.initialFocus) }, x(() => a.value && !!(e.features & 2))); - fu({ ownerDocument: s, container: i, containers: e.containers, previousActiveElement: o }, x(() => a.value && !!(e.features & 8))); - let l = ou(); + V(() => a.value = !0), me(() => a.value = !1), fu({ ownerDocument: s }, x(() => a.value && !!(e.features & 16))); + let o = pu({ ownerDocument: s, container: i, initialFocus: x(() => e.initialFocus) }, x(() => a.value && !!(e.features & 2))); + hu({ ownerDocument: s, container: i, containers: e.containers, previousActiveElement: o }, x(() => a.value && !!(e.features & 8))); + let l = uu(); function u(f) { - let p = D(i); - p && ((h) => h())(() => { + let h = D(i); + h && ((m) => m())(() => { fe(l.value, { [vt.Forwards]: () => { - Lt(p, qe.First, { skipElements: [f.relatedTarget] }); + Lt(h, qe.First, { skipElements: [f.relatedTarget] }); }, [vt.Backwards]: () => { - Lt(p, qe.Last, { skipElements: [f.relatedTarget] }); + Lt(h, qe.Last, { skipElements: [f.relatedTarget] }); } }); }); } let c = y(!1); - function m(f) { + function v(f) { f.key === "Tab" && (c.value = !0, requestAnimationFrame(() => { c.value = !1; })); @@ -1337,35 +1347,35 @@ let pt = Object.assign(Y({ name: "FocusTrap", props: { as: { type: [Object, Stri function g(f) { if (!a.value) return; - let p = Ui(e.containers); - D(i) instanceof HTMLElement && p.add(D(i)); - let h = f.relatedTarget; - h instanceof HTMLElement && h.dataset.headlessuiFocusGuard !== "true" && (Wi(p, h) || (c.value ? Lt(D(i), fe(l.value, { [vt.Forwards]: () => qe.Next, [vt.Backwards]: () => qe.Previous }) | qe.WrapAround, { relativeTo: f.target }) : f.target instanceof HTMLElement && We(f.target))); + let h = Ui(e.containers); + D(i) instanceof HTMLElement && h.add(D(i)); + let m = f.relatedTarget; + m instanceof HTMLElement && m.dataset.headlessuiFocusGuard !== "true" && (zi(h, m) || (c.value ? Lt(D(i), fe(l.value, { [vt.Forwards]: () => qe.Next, [vt.Backwards]: () => qe.Previous }) | qe.WrapAround, { relativeTo: f.target }) : f.target instanceof HTMLElement && We(f.target))); } return () => { - let f = {}, p = { ref: i, onKeydown: m, onFocusout: g }, { features: h, initialFocus: d, containers: b, ...O } = e; - return N(kr, [!!(h & 4) && N(wr, { as: "button", type: "button", "data-headlessui-focus-guard": !0, onFocus: u, features: Nt.Focusable }), Z({ ourProps: p, theirProps: { ...t, ...O }, slot: f, attrs: t, slots: r, name: "FocusTrap" }), !!(h & 4) && N(wr, { as: "button", type: "button", "data-headlessui-focus-guard": !0, onFocus: u, features: Nt.Focusable })]); + let f = {}, h = { ref: i, onKeydown: v, onFocusout: g }, { features: m, initialFocus: d, containers: b, ...O } = e; + return N(kr, [!!(m & 4) && N(wr, { as: "button", type: "button", "data-headlessui-focus-guard": !0, onFocus: u, features: Nt.Focusable }), Z({ ourProps: h, theirProps: { ...t, ...O }, slot: f, attrs: t, slots: r, name: "FocusTrap" }), !!(m & 4) && N(wr, { as: "button", type: "button", "data-headlessui-focus-guard": !0, onFocus: u, features: Nt.Focusable })]); }; -} }), { features: Hi }), Ue = []; -lu(() => { +} }), { features: Wi }), He = []; +cu(() => { function e(t) { - t.target instanceof HTMLElement && t.target !== document.body && Ue[0] !== t.target && (Ue.unshift(t.target), Ue = Ue.filter((r) => r != null && r.isConnected), Ue.splice(10)); + t.target instanceof HTMLElement && t.target !== document.body && He[0] !== t.target && (He.unshift(t.target), He = He.filter((r) => r != null && r.isConnected), He.splice(10)); } window.addEventListener("click", e, { capture: !0 }), window.addEventListener("mousedown", e, { capture: !0 }), window.addEventListener("focus", e, { capture: !0 }), document.body.addEventListener("click", e, { capture: !0 }), document.body.addEventListener("mousedown", e, { capture: !0 }), document.body.addEventListener("focus", e, { capture: !0 }); }); -function uu(e) { - let t = y(Ue.slice()); +function du(e) { + let t = y(He.slice()); return ot([e], ([r], [n]) => { - n === !0 && r === !1 ? Vi(() => { + n === !0 && r === !1 ? Hi(() => { t.value.splice(0); - }) : n === !1 && r === !0 && (t.value = Ue.slice()); + }) : n === !1 && r === !0 && (t.value = He.slice()); }, { flush: "post" }), () => { var r; return (r = t.value.find((n) => n != null && n.isConnected)) != null ? r : null; }; } -function cu({ ownerDocument: e }, t) { - let r = uu(t); +function fu({ ownerDocument: e }, t) { + let r = du(t); V(() => { le(() => { var n, i; @@ -1375,20 +1385,20 @@ function cu({ ownerDocument: e }, t) { We(r()); }); } -function du({ ownerDocument: e, container: t, initialFocus: r }, n) { +function pu({ ownerDocument: e, container: t, initialFocus: r }, n) { let i = y(null), s = y(!1); return V(() => s.value = !0), me(() => s.value = !1), V(() => { ot([t, r, n], (a, o) => { if (a.every((u, c) => (o == null ? void 0 : o[c]) === u) || !n.value) return; let l = D(t); - l && Vi(() => { + l && Hi(() => { var u, c; if (!s.value) return; - let m = D(r), g = (u = e.value) == null ? void 0 : u.activeElement; - if (m) { - if (m === g) { + let v = D(r), g = (u = e.value) == null ? void 0 : u.activeElement; + if (v) { + if (v === g) { i.value = g; return; } @@ -1396,14 +1406,14 @@ function du({ ownerDocument: e, container: t, initialFocus: r }, n) { i.value = g; return; } - m ? We(m) : Lt(l, qe.First | qe.NoScroll) === Ri.Error && console.warn("There are no focusable elements inside the "), i.value = (c = e.value) == null ? void 0 : c.activeElement; + v ? We(v) : Lt(l, qe.First | qe.NoScroll) === Di.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; } -function fu({ ownerDocument: e, container: t, containers: r, previousActiveElement: n }, i) { +function hu({ ownerDocument: e, container: t, containers: r, previousActiveElement: n }, i) { var s; - Ni((s = e.value) == null ? void 0 : s.defaultView, "focus", (a) => { + Vi((s = e.value) == null ? void 0 : s.defaultView, "focus", (a) => { if (!i.value) return; let o = Ui(r); @@ -1412,17 +1422,17 @@ function fu({ ownerDocument: e, container: t, containers: r, previousActiveEleme if (!l) return; let u = a.target; - u && u instanceof HTMLElement ? Wi(o, u) ? (n.value = u, We(u)) : (a.preventDefault(), a.stopPropagation(), We(l)) : We(n.value); + u && u instanceof HTMLElement ? zi(o, u) ? (n.value = u, We(u)) : (a.preventDefault(), a.stopPropagation(), We(l)) : We(n.value); }, !0); } -function Wi(e, t) { +function zi(e, t) { for (let r of e) if (r.contains(t)) return !0; return !1; } let pr = /* @__PURE__ */ new Map(), ht = /* @__PURE__ */ new Map(); -function qn(e, t = y(!0)) { +function Fn(e, t = y(!0)) { le((r) => { var n; if (!t.value) @@ -1444,17 +1454,17 @@ function qn(e, t = y(!0)) { ht.set(i, s + 1), s === 0 && (pr.set(i, { "aria-hidden": i.getAttribute("aria-hidden"), inert: i.inert }), i.setAttribute("aria-hidden", "true"), i.inert = !0); }); } -let zi = Symbol("ForcePortalRootContext"); -function pu() { - return z(zi, !1); +let Gi = Symbol("ForcePortalRootContext"); +function mu() { + return z(Gi, !1); } let Sr = Y({ name: "ForcePortalRoot", props: { as: { type: [Object, String], default: "template" }, force: { type: Boolean, default: !1 } }, setup(e, { slots: t, attrs: r }) { - return de(zi, e.force), () => { + return de(Gi, e.force), () => { let { force: n, ...i } = e; return Z({ theirProps: i, ourProps: {}, slot: {}, slots: t, attrs: r, name: "ForcePortalRoot" }); }; } }); -function hu(e) { +function vu(e) { let t = Tt(e); if (!t) { if (e === null) @@ -1467,8 +1477,8 @@ function hu(e) { let n = t.createElement("div"); return n.setAttribute("id", "headlessui-portal-root"), t.body.appendChild(n); } -let Gi = Y({ name: "Portal", props: { as: { type: [Object, String], default: "div" } }, setup(e, { slots: t, attrs: r }) { - let n = y(null), i = x(() => Tt(n)), s = pu(), a = z(Xi, null), o = y(s === !0 || a == null ? hu(n.value) : a.resolveTarget()); +let Xi = Y({ name: "Portal", props: { as: { type: [Object, String], default: "div" } }, setup(e, { slots: t, attrs: r }) { + let n = y(null), i = x(() => Tt(n)), s = mu(), a = z(Ki, null), o = y(s === !0 || a == null ? vu(n.value) : a.resolveTarget()); return le(() => { s || a != null && (o.value = a.resolveTarget()); }), me(() => { @@ -1479,24 +1489,24 @@ let Gi = Y({ name: "Portal", props: { as: { type: [Object, String], default: "di if (o.value === null) return null; let l = { ref: n, "data-headlessui-portal": "" }; - return N(ii, { to: o.value }, Z({ ourProps: l, theirProps: e, slot: {}, attrs: r, slots: t, name: "Portal" })); + return N(ai, { to: o.value }, Z({ ourProps: l, theirProps: e, slot: {}, attrs: r, slots: t, name: "Portal" })); }; -} }), Xi = Symbol("PortalGroupContext"), mu = Y({ name: "PortalGroup", props: { as: { type: [Object, String], default: "template" }, target: { type: Object, default: null } }, setup(e, { attrs: t, slots: r }) { - let n = Is({ resolveTarget() { +} }), Ki = Symbol("PortalGroupContext"), gu = Y({ name: "PortalGroup", props: { as: { type: [Object, String], default: "template" }, target: { type: Object, default: null } }, setup(e, { attrs: t, slots: r }) { + let n = Ps({ resolveTarget() { return e.target; } }); - return de(Xi, n), () => { + return de(Ki, n), () => { let { target: i, ...s } = e; return Z({ theirProps: s, ourProps: {}, slot: {}, attrs: t, slots: r, name: "PortalGroup" }); }; -} }), Ki = Symbol("StackContext"); +} }), Ji = Symbol("StackContext"); var Or = ((e) => (e[e.Add = 0] = "Add", e[e.Remove = 1] = "Remove", e))(Or || {}); -function vu() { - return z(Ki, () => { +function yu() { + return z(Ji, () => { }); } -function gu({ type: e, enabled: t, element: r, onUpdate: n }) { - let i = vu(); +function bu({ type: e, enabled: t, element: r, onUpdate: n }) { + let i = yu(); function s(...a) { n == null || n(...a), i(...a); } @@ -1506,16 +1516,16 @@ function gu({ type: e, enabled: t, element: r, onUpdate: n }) { }, { immediate: !0, flush: "sync" }); }), me(() => { t.value && s(1, e, r); - }), de(Ki, s); + }), de(Ji, s); } -let Ji = Symbol("DescriptionContext"); -function yu() { - let e = z(Ji, null); +let Qi = Symbol("DescriptionContext"); +function wu() { + let e = z(Qi, null); if (e === null) throw new Error("Missing parent"); return e; } -function bu({ slot: e = y({}), name: t = "Description", props: r = {} } = {}) { +function Su({ slot: e = y({}), name: t = "Description", props: r = {} } = {}) { let n = y([]); function i(s) { return n.value.push(s), () => { @@ -1523,17 +1533,17 @@ function bu({ slot: e = y({}), name: t = "Description", props: r = {} } = {}) { a !== -1 && n.value.splice(a, 1); }; } - return de(Ji, { register: i, slot: e, name: t, props: r }), x(() => n.value.length > 0 ? n.value.join(" ") : void 0); + return de(Qi, { register: i, slot: e, name: t, props: r }), x(() => n.value.length > 0 ? n.value.join(" ") : void 0); } Y({ name: "Description", props: { as: { type: [Object, String], default: "p" }, id: { type: String, default: () => `headlessui-description-${Ye()}` } }, setup(e, { attrs: t, slots: r }) { - let n = yu(); + let n = wu(); return V(() => me(n.register(e.id))), () => { - let { name: i = "Description", slot: s = y({}), props: a = {} } = n, { id: o, ...l } = e, u = { ...Object.entries(a).reduce((c, [m, g]) => Object.assign(c, { [m]: ee(g) }), {}), id: o }; + let { name: i = "Description", slot: s = y({}), props: a = {} } = n, { id: o, ...l } = e, u = { ...Object.entries(a).reduce((c, [v, g]) => Object.assign(c, { [v]: ee(g) }), {}), id: o }; return Z({ ourProps: u, theirProps: l, slot: s.value, attrs: t, slots: r, name: i }); }; } }); -function wu(e) { - let t = Ps(e.getSnapshot()); +function Ou(e) { + let t = qs(e.getSnapshot()); return me(e.subscribe(() => { t.value = e.getSnapshot(); })), t; @@ -1572,7 +1582,7 @@ function Yt() { } }; return t; } -function Su(e, t) { +function $u(e, t) { let r = e(), n = /* @__PURE__ */ new Set(); return { getSnapshot() { return r; @@ -1583,7 +1593,7 @@ function Su(e, t) { a && (r = a, n.forEach((o) => o())); } }; } -function Ou() { +function Eu() { let e; return { before({ doc: t }) { var r; @@ -1594,8 +1604,8 @@ function Ou() { r.style(n, "paddingRight", `${s}px`); } }; } -function $u() { - if (!su()) +function Tu() { + if (!ou()) return {}; let e; return { before() { @@ -1623,18 +1633,18 @@ function $u() { }); } }; } -function Eu() { +function xu() { return { before({ doc: e, d: t }) { t.style(e.documentElement, "overflow", "hidden"); } }; } -function Tu(e) { +function _u(e) { let t = {}; for (let r of e) Object.assign(t, r(t)); return t; } -let He = Su(() => /* @__PURE__ */ new Map(), { PUSH(e, t) { +let Ue = $u(() => /* @__PURE__ */ new Map(), { PUSH(e, t) { var r; let n = (r = this.get(e)) != null ? r : { doc: e, count: 0, d: Yt(), meta: /* @__PURE__ */ new Set() }; return n.count++, n.meta.add(t), this.set(e, n), this; @@ -1642,38 +1652,38 @@ let He = Su(() => /* @__PURE__ */ new Map(), { PUSH(e, t) { let r = this.get(e); return r && (r.count--, r.meta.delete(t)), this; }, SCROLL_PREVENT({ doc: e, d: t, meta: r }) { - let n = { doc: e, d: t, meta: Tu(r) }, i = [$u(), Ou(), Eu()]; + let n = { doc: e, d: t, meta: _u(r) }, i = [Tu(), Eu(), xu()]; i.forEach(({ before: s }) => s == null ? void 0 : s(n)), i.forEach(({ after: s }) => s == null ? void 0 : s(n)); }, SCROLL_ALLOW({ d: e }) { e.dispose(); }, TEARDOWN({ doc: e }) { this.delete(e); } }); -He.subscribe(() => { - let e = He.getSnapshot(), t = /* @__PURE__ */ new Map(); +Ue.subscribe(() => { + let e = Ue.getSnapshot(), t = /* @__PURE__ */ new Map(); for (let [r] of e) t.set(r, r.documentElement.style.overflow); for (let r of e.values()) { let n = t.get(r.doc) === "hidden", i = r.count !== 0; - (i && !n || !i && n) && He.dispatch(r.count > 0 ? "SCROLL_PREVENT" : "SCROLL_ALLOW", r), r.count === 0 && He.dispatch("TEARDOWN", r); + (i && !n || !i && n) && Ue.dispatch(r.count > 0 ? "SCROLL_PREVENT" : "SCROLL_ALLOW", r), r.count === 0 && Ue.dispatch("TEARDOWN", r); } }); -function xu(e, t, r) { - let n = wu(He), i = x(() => { +function Iu(e, t, r) { + let n = Ou(Ue), i = x(() => { let s = e.value ? n.value.get(e.value) : void 0; return s ? s.count > 0 : !1; }); return ot([e, t], ([s, a], [o], l) => { if (!s || !a) return; - He.dispatch("PUSH", s, r); + Ue.dispatch("PUSH", s, r); let u = !1; l(() => { - u || (He.dispatch("POP", o ?? s, r), u = !0); + u || (Ue.dispatch("POP", o ?? s, r), u = !0); }); }, { immediate: !0 }), i; } -var _u = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(_u || {}); +var Au = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(Au || {}); let $r = Symbol("DialogContext"); function xt(e) { let t = z($r, null); @@ -1683,50 +1693,50 @@ function xt(e) { } return t; } -let qt = "DC8F892D-2EBD-447C-A4C8-A03058436FF4", Yr = Y({ 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: qt }, initialFocus: { type: Object, default: null }, id: { type: String, default: () => `headlessui-dialog-${Ye()}` } }, emits: { close: (e) => !0 }, setup(e, { emit: t, attrs: r, slots: n, expose: i }) { +let qt = "DC8F892D-2EBD-447C-A4C8-A03058436FF4", en = Y({ 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: qt }, initialFocus: { type: Object, default: null }, id: { type: String, default: () => `headlessui-dialog-${Ye()}` } }, emits: { close: (e) => !0 }, setup(e, { emit: t, attrs: r, slots: n, expose: i }) { var s; let a = y(!1); V(() => { a.value = !0; }); - let o = y(0), l = Qr(), u = x(() => e.open === qt && l !== null ? (l.value & G.Open) === G.Open : e.open), c = y(null), m = y(null), g = x(() => Tt(c)); + let o = y(0), l = Zr(), u = x(() => e.open === qt && l !== null ? (l.value & G.Open) === G.Open : e.open), c = y(null), v = y(null), g = x(() => Tt(c)); if (i({ el: c, $el: c }), !(e.open !== qt || 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 === qt ? void 0 : e.open}`); - let f = x(() => a.value && u.value ? 0 : 1), p = x(() => f.value === 0), h = x(() => o.value > 1), d = z($r, null) !== null, b = x(() => h.value ? "parent" : "leaf"), O = x(() => l !== null ? (l.value & G.Closing) === G.Closing : !1), I = x(() => d || O.value ? !1 : p.value), S = x(() => { - var E, T, A; - return (A = Array.from((T = (E = g.value) == null ? void 0 : E.querySelectorAll("body > *")) != null ? T : []).find((C) => C.id === "headlessui-portal-root" ? !1 : C.contains(D(m)) && C instanceof HTMLElement)) != null ? A : null; + let f = x(() => a.value && u.value ? 0 : 1), h = x(() => f.value === 0), m = x(() => o.value > 1), d = z($r, null) !== null, b = x(() => m.value ? "parent" : "leaf"), O = x(() => l !== null ? (l.value & G.Closing) === G.Closing : !1), A = x(() => d || O.value ? !1 : h.value), S = x(() => { + var E, T, I; + return (I = Array.from((T = (E = g.value) == null ? void 0 : E.querySelectorAll("body > *")) != null ? T : []).find((C) => C.id === "headlessui-portal-root" ? !1 : C.contains(D(v)) && C instanceof HTMLElement)) != null ? I : null; }); - qn(S, I); - let $ = x(() => h.value ? !0 : p.value), w = x(() => { - var E, T, A; - return (A = Array.from((T = (E = g.value) == null ? void 0 : E.querySelectorAll("[data-headlessui-portal]")) != null ? T : []).find((C) => C.contains(D(m)) && C instanceof HTMLElement)) != null ? A : null; + Fn(S, A); + let $ = x(() => m.value ? !0 : h.value), w = x(() => { + var E, T, I; + return (I = Array.from((T = (E = g.value) == null ? void 0 : E.querySelectorAll("[data-headlessui-portal]")) != null ? T : []).find((C) => C.contains(D(v)) && C instanceof HTMLElement)) != null ? I : null; }); - qn(w, $), gu({ type: "Dialog", enabled: x(() => f.value === 0), element: c, onUpdate: (E, T) => { + Fn(w, $), bu({ type: "Dialog", enabled: x(() => f.value === 0), element: c, onUpdate: (E, T) => { if (T === "Dialog") return fe(E, { [Or.Add]: () => o.value += 1, [Or.Remove]: () => o.value -= 1 }); } }); - let _ = bu({ name: "DialogDescription", slot: x(() => ({ open: u.value })) }), q = y(null), P = { titleId: q, panelRef: y(null), dialogState: f, setTitleId(E) { + let _ = Su({ name: "DialogDescription", slot: x(() => ({ open: u.value })) }), q = y(null), P = { titleId: q, panelRef: y(null), dialogState: f, setTitleId(E) { q.value !== E && (q.value = E); }, close() { t("close", !1); } }; de($r, P); function k() { - var E, T, A; - return [...Array.from((T = (E = g.value) == null ? void 0 : E.querySelectorAll("html > *, body > *, [data-headlessui-portal]")) != null ? T : []).filter((C) => !(C === document.body || C === document.head || !(C instanceof HTMLElement) || C.contains(D(m)) || P.panelRef.value && C.contains(P.panelRef.value))), (A = P.panelRef.value) != null ? A : c.value]; + var E, T, I; + return [...Array.from((T = (E = g.value) == null ? void 0 : E.querySelectorAll("html > *, body > *, [data-headlessui-portal]")) != null ? T : []).filter((C) => !(C === document.body || C === document.head || !(C instanceof HTMLElement) || C.contains(D(v)) || P.panelRef.value && C.contains(P.panelRef.value))), (I = P.panelRef.value) != null ? I : c.value]; } - let M = x(() => !(!p.value || h.value)); - iu(() => k(), (E, T) => { + let j = x(() => !(!h.value || m.value)); + au(() => k(), (E, T) => { P.close(), Oe(() => T == null ? void 0 : T.focus()); - }, M); - let U = x(() => !(h.value || f.value !== 0)); - Ni((s = g.value) == null ? void 0 : s.defaultView, "keydown", (E) => { - U.value && (E.defaultPrevented || E.key === ji.Escape && (E.preventDefault(), E.stopPropagation(), P.close())); + }, j); + let H = x(() => !(m.value || f.value !== 0)); + Vi((s = g.value) == null ? void 0 : s.defaultView, "keydown", (E) => { + H.value && (E.defaultPrevented || E.key === ji.Escape && (E.preventDefault(), E.stopPropagation(), P.close())); }); let F = x(() => !(O.value || f.value !== 0 || d)); - return xu(g, F, (E) => { + return Iu(g, F, (E) => { var T; return { containers: [...(T = E.containers) != null ? T : [], k] }; }), le((E) => { @@ -1735,16 +1745,16 @@ let qt = "DC8F892D-2EBD-447C-A4C8-A03058436FF4", Yr = Y({ name: "Dialog", inheri let T = D(c); if (!T) return; - let A = new ResizeObserver((C) => { + let I = new ResizeObserver((C) => { for (let ge of C) { - let H = ge.target.getBoundingClientRect(); - H.x === 0 && H.y === 0 && H.width === 0 && H.height === 0 && P.close(); + let U = ge.target.getBoundingClientRect(); + U.x === 0 && U.y === 0 && U.width === 0 && U.height === 0 && P.close(); } }); - A.observe(T), E(() => A.disconnect()); + I.observe(T), E(() => I.disconnect()); }), () => { - let { id: E, open: T, initialFocus: A, ...C } = e, ge = { ...r, ref: c, id: E, role: "dialog", "aria-modal": f.value === 0 ? !0 : void 0, "aria-labelledby": q.value, "aria-describedby": _.value }, H = { open: f.value === 0 }; - return N(Sr, { force: !0 }, () => [N(Gi, () => N(mu, { target: c.value }, () => N(Sr, { force: !1 }, () => N(pt, { initialFocus: A, containers: k, features: p.value ? fe(b.value, { parent: pt.features.RestoreFocus, leaf: pt.features.All & ~pt.features.FocusLock }) : pt.features.None }, () => Z({ ourProps: ge, theirProps: C, slot: H, attrs: r, slots: n, visible: f.value === 0, features: Dt.RenderStrategy | Dt.Static, name: "Dialog" }))))), N(wr, { features: Nt.Hidden, ref: m })]); + let { id: E, open: T, initialFocus: I, ...C } = e, ge = { ...r, ref: c, id: E, role: "dialog", "aria-modal": f.value === 0 ? !0 : void 0, "aria-labelledby": q.value, "aria-describedby": _.value }, U = { open: f.value === 0 }; + return N(Sr, { force: !0 }, () => [N(Xi, () => N(gu, { target: c.value }, () => N(Sr, { force: !1 }, () => N(pt, { initialFocus: I, containers: k, features: h.value ? fe(b.value, { parent: pt.features.RestoreFocus, leaf: pt.features.All & ~pt.features.FocusLock }) : pt.features.None }, () => Z({ ourProps: ge, theirProps: C, slot: U, attrs: r, slots: n, visible: f.value === 0, features: Dt.RenderStrategy | Dt.Static, name: "Dialog" }))))), N(wr, { features: Nt.Hidden, ref: v })]); }; } }); Y({ name: "DialogOverlay", props: { as: { type: [Object, String], default: "div" }, id: { type: String, default: () => `headlessui-dialog-overlay-${Ye()}` } }, setup(e, { attrs: t, slots: r }) { @@ -1764,10 +1774,10 @@ Y({ name: "DialogBackdrop", props: { as: { type: [Object, String], default: "div throw new Error("A component is being used, but a component is missing."); }), () => { let { id: a, ...o } = e, l = { id: a, ref: s, "aria-hidden": !0 }; - return N(Sr, { force: !0 }, () => N(Gi, () => Z({ ourProps: l, theirProps: { ...t, ...o }, slot: { open: i.dialogState.value === 0 }, attrs: t, slots: r, name: "DialogBackdrop" }))); + return N(Sr, { force: !0 }, () => N(Xi, () => Z({ ourProps: l, theirProps: { ...t, ...o }, slot: { open: i.dialogState.value === 0 }, attrs: t, slots: r, name: "DialogBackdrop" }))); }; } }); -let Zr = Y({ name: "DialogPanel", props: { as: { type: [Object, String], default: "div" }, id: { type: String, default: () => `headlessui-dialog-panel-${Ye()}` } }, setup(e, { attrs: t, slots: r, expose: n }) { +let tn = Y({ name: "DialogPanel", props: { as: { type: [Object, String], default: "div" }, id: { type: String, default: () => `headlessui-dialog-panel-${Ye()}` } }, setup(e, { attrs: t, slots: r, expose: n }) { let i = xt("DialogPanel"); n({ el: i.panelRef, $el: i.panelRef }); function s(a) { @@ -1787,7 +1797,7 @@ Y({ name: "DialogTitle", props: { as: { type: [Object, String], default: "h2" }, return Z({ ourProps: { id: i }, theirProps: s, slot: { open: n.dialogState.value === 0 }, attrs: t, slots: r, name: "DialogTitle" }); }; } }); -function Au(e) { +function Pu(e) { let t = { called: !1 }; return (...r) => { if (!t.called) @@ -1801,7 +1811,7 @@ function Ct(e, ...t) { e && t.length > 0 && e.classList.remove(...t); } var Er = ((e) => (e.Finished = "finished", e.Cancelled = "cancelled", e))(Er || {}); -function Iu(e, t) { +function qu(e, t) { let r = Yt(); if (!e) return r.dispose; @@ -1811,38 +1821,38 @@ function Iu(e, t) { }); return s !== 0 ? r.setTimeout(() => t("finished"), s + a) : t("finished"), r.add(() => t("cancelled")), r.dispose; } -function Cn(e, t, r, n, i, s) { - let a = Yt(), o = s !== void 0 ? Au(s) : () => { +function kn(e, t, r, n, i, s) { + let a = Yt(), o = s !== void 0 ? Pu(s) : () => { }; return Ct(e, ...i), hr(e, ...t, ...r), a.nextFrame(() => { - Ct(e, ...r), hr(e, ...n), a.add(Iu(e, (l) => (Ct(e, ...n, ...t), hr(e, ...i), o(l)))); + Ct(e, ...r), hr(e, ...n), a.add(qu(e, (l) => (Ct(e, ...n, ...t), hr(e, ...i), o(l)))); }), a.add(() => Ct(e, ...t, ...r, ...n, ...i)), a.add(() => o("cancelled")), a.dispose; } function Ne(e = "") { return e.split(" ").filter((t) => t.trim().length > 1); } -let en = Symbol("TransitionContext"); -var Pu = ((e) => (e.Visible = "visible", e.Hidden = "hidden", e))(Pu || {}); -function qu() { - return z(en, null) !== null; +let rn = Symbol("TransitionContext"); +var Cu = ((e) => (e.Visible = "visible", e.Hidden = "hidden", e))(Cu || {}); +function Fu() { + return z(rn, null) !== null; } -function Cu() { - let e = z(en, null); +function ku() { + let e = z(rn, null); if (e === null) throw new Error("A is used but it is missing a parent ."); return e; } -function Fu() { - let e = z(tn, null); +function Lu() { + let e = z(nn, null); if (e === null) throw new Error("A is used but it is missing a parent ."); return e; } -let tn = Symbol("NestingContext"); +let nn = Symbol("NestingContext"); function Zt(e) { return "children" in e ? Zt(e.children) : e.value.filter(({ state: t }) => t === "visible").length > 0; } -function Qi(e) { +function Yi(e) { let t = y([]), r = y(!1); V(() => r.value = !0), me(() => r.value = !1); function n(s, a = Ce.Hidden) { @@ -1859,7 +1869,7 @@ function Qi(e) { } return { children: t, register: i, unregister: n }; } -let Yi = Dt.RenderStrategy, lt = Y({ 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 }) { +let Zi = Dt.RenderStrategy, lt = Y({ 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 }) { let s = y(0); function a() { s.value |= G.Opening, t("beforeEnter"); @@ -1873,26 +1883,26 @@ let Yi = Dt.RenderStrategy, lt = Y({ props: { as: { type: [Object, String], defa function u() { s.value &= ~G.Closing, t("afterLeave"); } - if (!qu() && zl()) + if (!Fu() && Xl()) return () => N(ut, { ...e, onBeforeEnter: a, onAfterEnter: o, onBeforeLeave: l, onAfterLeave: u }, n); - let c = y(null), m = x(() => e.unmount ? Ce.Unmount : Ce.Hidden); + let c = y(null), v = x(() => e.unmount ? Ce.Unmount : Ce.Hidden); i({ el: c, $el: c }); - let { show: g, appear: f } = Cu(), { register: p, unregister: h } = Fu(), d = y(g.value ? "visible" : "hidden"), b = { value: !0 }, O = Ye(), I = { value: !1 }, S = Qi(() => { - !I.value && d.value !== "hidden" && (d.value = "hidden", h(O), u()); + let { show: g, appear: f } = ku(), { register: h, unregister: m } = Lu(), d = y(g.value ? "visible" : "hidden"), b = { value: !0 }, O = Ye(), A = { value: !1 }, S = Yi(() => { + !A.value && d.value !== "hidden" && (d.value = "hidden", m(O), u()); }); V(() => { - let F = p(O); + let F = h(O); me(F); }), le(() => { - if (m.value === Ce.Hidden && O) { + if (v.value === Ce.Hidden && O) { if (g.value && d.value !== "visible") { d.value = "visible"; return; } - fe(d.value, { hidden: () => h(O), visible: () => p(O) }); + fe(d.value, { hidden: () => m(O), visible: () => h(O) }); } }); - let $ = Ne(e.enter), w = Ne(e.enterFrom), _ = Ne(e.enterTo), q = Ne(e.entered), P = Ne(e.leave), k = Ne(e.leaveFrom), M = Ne(e.leaveTo); + let $ = Ne(e.enter), w = Ne(e.enterFrom), _ = Ne(e.enterTo), q = Ne(e.entered), P = Ne(e.leave), k = Ne(e.leaveFrom), j = Ne(e.leaveTo); V(() => { le(() => { if (d.value === "visible") { @@ -1902,41 +1912,41 @@ let Yi = Dt.RenderStrategy, lt = Y({ props: { as: { type: [Object, String], defa } }); }); - function U(F) { + function H(F) { let E = b.value && !f.value, T = D(c); - !T || !(T instanceof HTMLElement) || E || (I.value = !0, g.value && a(), g.value || l(), F(g.value ? Cn(T, $, w, _, q, (A) => { - I.value = !1, A === Er.Finished && o(); - }) : Cn(T, P, k, M, q, (A) => { - I.value = !1, A === Er.Finished && (Zt(S) || (d.value = "hidden", h(O), u())); + !T || !(T instanceof HTMLElement) || E || (A.value = !0, g.value && a(), g.value || l(), F(g.value ? kn(T, $, w, _, q, (I) => { + A.value = !1, I === Er.Finished && o(); + }) : kn(T, P, k, j, q, (I) => { + A.value = !1, I === Er.Finished && (Zt(S) || (d.value = "hidden", m(O), u())); }))); } return V(() => { ot([g], (F, E, T) => { - U(T), b.value = !1; + H(T), b.value = !1; }, { immediate: !0 }); - }), de(tn, S), Gl(x(() => fe(d.value, { visible: G.Open, hidden: G.Closed }) | s.value)), () => { - let { appear: F, show: E, enter: T, enterFrom: A, enterTo: C, entered: ge, leave: H, leaveFrom: ct, leaveTo: At, ...Ae } = e, Ze = { ref: c }, Ie = { ...Ae, ...f.value && g.value && Et.isServer ? { class: qs([r.class, Ae.class, ...$, ...w]) } : {} }; - return Z({ theirProps: Ie, ourProps: Ze, slot: {}, slots: n, attrs: r, features: Yi, visible: d.value === "visible", name: "TransitionChild" }); + }), de(nn, S), Kl(x(() => fe(d.value, { visible: G.Open, hidden: G.Closed }) | s.value)), () => { + let { appear: F, show: E, enter: T, enterFrom: I, enterTo: C, entered: ge, leave: U, leaveFrom: ct, leaveTo: It, ...Ie } = e, Ze = { ref: c }, Ae = { ...Ie, ...f.value && g.value && Et.isServer ? { class: Cs([r.class, Ie.class, ...$, ...w]) } : {} }; + return Z({ theirProps: Ae, ourProps: Ze, slot: {}, slots: n, attrs: r, features: Zi, visible: d.value === "visible", name: "TransitionChild" }); }; -} }), ku = lt, ut = Y({ 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 = Qr(), s = x(() => e.show === null && i !== null ? (i.value & G.Open) === G.Open : e.show); +} }), Ru = lt, ut = Y({ 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 = Zr(), s = x(() => e.show === null && i !== null ? (i.value & G.Open) === G.Open : e.show); le(() => { if (![!0, !1].includes(s.value)) throw new Error('A is used but it is missing a `:show="true | false"` prop.'); }); - let a = y(s.value ? "visible" : "hidden"), o = Qi(() => { + let a = y(s.value ? "visible" : "hidden"), o = Yi(() => { a.value = "hidden"; }), l = y(!0), u = { show: s, appear: x(() => e.appear || !l.value) }; return V(() => { le(() => { l.value = !1, s.value ? a.value = "visible" : Zt(o) || (a.value = "hidden"); }); - }), de(tn, o), de(en, u), () => { - let c = Bi(e, ["show", "appear", "unmount", "onBeforeEnter", "onBeforeLeave", "onAfterEnter", "onAfterLeave"]), m = { unmount: e.unmount }; - return Z({ ourProps: { ...m, as: "template" }, theirProps: {}, slot: {}, slots: { ...n, default: () => [N(ku, { onBeforeEnter: () => t("beforeEnter"), onAfterEnter: () => t("afterEnter"), onBeforeLeave: () => t("beforeLeave"), onAfterLeave: () => t("afterLeave"), ...r, ...m, ...c }, n.default)] }, attrs: {}, features: Yi, visible: a.value === "visible", name: "Transition" }); + }), de(nn, o), de(rn, u), () => { + let c = Bi(e, ["show", "appear", "unmount", "onBeforeEnter", "onBeforeLeave", "onAfterEnter", "onAfterLeave"]), v = { unmount: e.unmount }; + return Z({ ourProps: { ...v, as: "template" }, theirProps: {}, slot: {}, slots: { ...n, default: () => [N(Ru, { onBeforeEnter: () => t("beforeEnter"), onAfterEnter: () => t("afterEnter"), onBeforeLeave: () => t("beforeLeave"), onAfterLeave: () => t("afterLeave"), ...r, ...v, ...c }, n.default)] }, attrs: {}, features: Zi, visible: a.value === "visible", name: "Transition" }); }; } }); -const Lu = { +const Bu = { props: { defaultTitle: { type: String, @@ -1983,34 +1993,34 @@ const Lu = { }; }, computed: { - hasConfirmModal: () => !!v.confirmModal.value, + hasConfirmModal: () => !!p.confirmModal.value, title: function() { var e; - return (e = v.confirmModal.value) != null && e.title ? v.confirmModal.value.title : this.defaultTitle; + return (e = p.confirmModal.value) != null && e.title ? p.confirmModal.value.title : this.defaultTitle; }, text: function() { var e; - return (e = v.confirmModal.value) != null && e.text ? v.confirmModal.value.text : this.confirmPassword ? this.defaultPasswordText : this.defaultText; + return (e = p.confirmModal.value) != null && e.text ? p.confirmModal.value.text : this.confirmPassword ? this.defaultPasswordText : this.defaultText; }, confirmButton: function() { var e; - return (e = v.confirmModal.value) != null && e.confirmButton ? v.confirmModal.value.confirmButton : this.defaultConfirmButton; + return (e = p.confirmModal.value) != null && e.confirmButton ? p.confirmModal.value.confirmButton : this.defaultConfirmButton; }, cancelButton: function() { var e; - return (e = v.confirmModal.value) != null && e.cancelButton ? v.confirmModal.value.cancelButton : this.defaultCancelButton; + return (e = p.confirmModal.value) != null && e.cancelButton ? p.confirmModal.value.cancelButton : this.defaultCancelButton; }, confirmPassword: function() { var e; - return (e = v.confirmModal.value) != null && e.confirmPassword ? v.confirmModal.value.confirmPassword : !1; + return (e = p.confirmModal.value) != null && e.confirmPassword ? p.confirmModal.value.confirmPassword : !1; }, confirmPasswordOnce: function() { var e; - return (e = v.confirmModal.value) != null && e.confirmPasswordOnce ? v.confirmModal.value.confirmPasswordOnce : !1; + return (e = p.confirmModal.value) != null && e.confirmPasswordOnce ? p.confirmModal.value.confirmPasswordOnce : !1; }, confirmDanger: function() { var e; - return (e = v.confirmModal.value) != null && e.confirmDanger ? v.confirmModal.value.confirmDanger : !1; + return (e = p.confirmModal.value) != null && e.confirmDanger ? p.confirmModal.value.confirmDanger : !1; } }, watch: { @@ -2020,7 +2030,7 @@ const Lu = { }, methods: { cancel() { - v.confirmModal.value.rejectPromise(), this.setIsOpen(!1), this.resetPassword(); + p.confirmModal.value.rejectPromise(), this.setIsOpen(!1), this.resetPassword(); }, resetPassword() { this.password = "", this.passwordError = ""; @@ -2042,13 +2052,13 @@ const Lu = { }); }, handleSuccess(e) { - v.confirmModal.value.resolvePromise(e), this.setIsOpen(!1), this.resetPassword(); + p.confirmModal.value.resolvePromise(e), this.setIsOpen(!1), this.resetPassword(); }, async setIsOpen(e) { if (e && this.confirmPassword && this.confirmPasswordOnce) try { if ((await ne.get(this.confirmedPasswordStatusRoute)).status === 200) { - this.handleSuccess(null), v.clearConfirmModal(); + this.handleSuccess(null), p.clearConfirmModal(); return; } } catch { @@ -2056,7 +2066,7 @@ const Lu = { this.isOpen = e; }, emitClose() { - this.resetPassword(), v.clearConfirmModal(); + this.resetPassword(), p.clearConfirmModal(); }, setPassword(e) { this.password = e; @@ -2079,64 +2089,64 @@ const Lu = { passwordError: this.passwordError, submitting: this.submitting, // These HeadlessUI exports will be removed in v1.0 - Dialog: Yr, - DialogPanel: Zr, + Dialog: en, + DialogPanel: tn, TransitionRoot: ut, TransitionChild: lt }); } }; -function Zi(e, t) { - t = Jr(t, e); +function es(e, t) { + t = Yr(t, e); for (var r = 0, n = t.length; e != null && r < n; ) e = e[$t(t[r++])]; return r && r == n ? e : void 0; } function be(e, t, r) { - var n = e == null ? void 0 : Zi(e, t); + var n = e == null ? void 0 : es(e, t); return n === void 0 ? r : n; } -var Bu = function() { +var ju = function() { try { var e = Qe(Object, "defineProperty"); return e({}, "", {}), e; } catch { } }(); -const Fn = Bu; -function es(e, t, r) { - t == "__proto__" && Fn ? Fn(e, t, { +const Ln = ju; +function ts(e, t, r) { + t == "__proto__" && Ln ? Ln(e, t, { configurable: !0, enumerable: !0, value: r, writable: !0 }) : e[t] = r; } -var ju = Object.prototype, Mu = ju.hasOwnProperty; -function Ru(e, t, r) { +var Mu = Object.prototype, Du = Mu.hasOwnProperty; +function Nu(e, t, r) { var n = e[t]; - (!(Mu.call(e, t) && Gr(n, r)) || r === void 0 && !(t in e)) && es(e, t, r); + (!(Du.call(e, t) && Kr(n, r)) || r === void 0 && !(t in e)) && ts(e, t, r); } -function Du(e, t, r, n) { +function Vu(e, t, r, n) { if (!J(e)) return e; - t = Jr(t, e); + t = Yr(t, e); for (var i = -1, s = t.length, a = s - 1, o = e; o != null && ++i < s; ) { var l = $t(t[i]), u = r; if (l === "__proto__" || l === "constructor" || l === "prototype") return e; if (i != a) { var c = o[l]; - u = n ? n(c, l, o) : void 0, u === void 0 && (u = J(c) ? c : Br(t[i + 1]) ? [] : {}); + u = n ? n(c, l, o) : void 0, u === void 0 && (u = J(c) ? c : Rr(t[i + 1]) ? [] : {}); } - Ru(o, l, u), o = o[l]; + Nu(o, l, u), o = o[l]; } return e; } function St(e, t, r) { - return e == null ? e : Du(e, t, r); + return e == null ? e : Vu(e, t, r); } -const Nu = { +const Hu = { props: { default: { type: Object, @@ -2161,12 +2171,12 @@ const Nu = { }, beforeMount() { if (this.remember) { - let e = v.restore(this.remember, this.localStorage); + let e = p.restore(this.remember, this.localStorage); e || (e = {}), this.values = Object.assign({}, { ...this.default, ...e }); } }, updated() { - this.remember && v.remember(this.remember, { ...this.values }, this.localStorage); + this.remember && p.remember(this.remember, { ...this.values }, this.localStorage); }, render() { const e = this; @@ -2184,7 +2194,7 @@ const Nu = { }) ) : null; } -}, Vu = { +}, Uu = { props: { parsed: { type: Object, @@ -2210,13 +2220,13 @@ const Nu = { }, beforeMount() { this.remember.forEach((e) => { - let t = v.restore(e, this.localStorage.includes(e)); + let t = p.restore(e, this.localStorage.includes(e)); this.stores[e] = { ...this.stores[e], ...t }; }); }, updated() { this.remember.forEach((e) => { - v.remember(e, { ...this.stores[e] }, this.localStorage.includes(e)); + p.remember(e, { ...this.stores[e] }, this.localStorage.includes(e)); }); }, render() { @@ -2236,67 +2246,67 @@ const Nu = { ) : null; } }; -var Uu = function() { +var Wu = function() { return ve.Date.now(); }; -const mr = Uu; -var Hu = /\s/; -function Wu(e) { - for (var t = e.length; t-- && Hu.test(e.charAt(t)); ) +const mr = Wu; +var zu = /\s/; +function Gu(e) { + for (var t = e.length; t-- && zu.test(e.charAt(t)); ) ; return t; } -var zu = /^\s+/; -function Gu(e) { - return e && e.slice(0, Wu(e) + 1).replace(zu, ""); +var Xu = /^\s+/; +function Ku(e) { + return e && e.slice(0, Gu(e) + 1).replace(Xu, ""); } -var kn = 0 / 0, Xu = /^[-+]0x[0-9a-f]+$/i, Ku = /^0b[01]+$/i, Ju = /^0o[0-7]+$/i, Qu = parseInt; +var Rn = 0 / 0, Ju = /^[-+]0x[0-9a-f]+$/i, Qu = /^0b[01]+$/i, Yu = /^0o[0-7]+$/i, Zu = parseInt; function Tr(e) { if (typeof e == "number") return e; if (Xt(e)) - return kn; + return Rn; if (J(e)) { var t = typeof e.valueOf == "function" ? e.valueOf() : e; e = J(t) ? t + "" : t; } if (typeof e != "string") return e === 0 ? e : +e; - e = Gu(e); - var r = Ku.test(e); - return r || Ju.test(e) ? Qu(e.slice(2), r ? 2 : 8) : Xu.test(e) ? kn : +e; + e = Ku(e); + var r = Qu.test(e); + return r || Yu.test(e) ? Zu(e.slice(2), r ? 2 : 8) : Ju.test(e) ? Rn : +e; } -var Yu = "Expected a function", Zu = Math.max, ec = Math.min; +var ec = "Expected a function", tc = Math.max, rc = Math.min; function er(e, t, r) { - var n, i, s, a, o, l, u = 0, c = !1, m = !1, g = !0; + var n, i, s, a, o, l, u = 0, c = !1, v = !1, g = !0; if (typeof e != "function") - throw new TypeError(Yu); - t = Tr(t) || 0, J(r) && (c = !!r.leading, m = "maxWait" in r, s = m ? Zu(Tr(r.maxWait) || 0, t) : s, g = "trailing" in r ? !!r.trailing : g); + throw new TypeError(ec); + t = Tr(t) || 0, J(r) && (c = !!r.leading, v = "maxWait" in r, s = v ? tc(Tr(r.maxWait) || 0, t) : s, g = "trailing" in r ? !!r.trailing : g); function f(w) { var _ = n, q = i; return n = i = void 0, u = w, a = e.apply(q, _), a; } - function p(w) { + function h(w) { return u = w, o = setTimeout(b, t), c ? f(w) : a; } - function h(w) { + function m(w) { var _ = w - l, q = w - u, P = t - _; - return m ? ec(P, s - q) : P; + return v ? rc(P, s - q) : P; } function d(w) { var _ = w - l, q = w - u; - return l === void 0 || _ >= t || _ < 0 || m && q >= s; + return l === void 0 || _ >= t || _ < 0 || v && q >= s; } function b() { var w = mr(); if (d(w)) return O(w); - o = setTimeout(b, h(w)); + o = setTimeout(b, m(w)); } function O(w) { return o = void 0, g && n ? f(w) : (n = i = void 0, a); } - function I() { + function A() { o !== void 0 && clearTimeout(o), u = 0, n = l = i = o = void 0; } function S() { @@ -2306,15 +2316,15 @@ function er(e, t, r) { var w = mr(), _ = d(w); if (n = arguments, i = this, l = w, _) { if (o === void 0) - return p(l); - if (m) + return h(l); + if (v) return clearTimeout(o), o = setTimeout(b, t), f(l); } return o === void 0 && (o = setTimeout(b, t)), a; } - return $.cancel = I, $.flush = S, $; + return $.cancel = A, $.flush = S, $; } -const tc = { +const nc = { props: { url: { type: String, @@ -2418,7 +2428,7 @@ const tc = { reload: this.performRequest }); } -}, rc = { +}, ic = { data() { return { isActivated: !0 @@ -2432,12 +2442,12 @@ const tc = { }, render() { return this.$slots.default({ - Dialog: Yr, - DialogPanel: Zr, + Dialog: en, + DialogPanel: tn, isActivated: this.isActivated }); } -}, ts = { +}, rs = { __name: "OnClickOutside", props: { do: { @@ -2467,9 +2477,9 @@ const tc = { }, document.addEventListener("click", r.value), document.addEventListener("touchstart", r.value), t.closeOnEscape && (i.value = (s) => { t.opened && s.key === "Escape" && t.do(); }, document.addEventListener("keydown", i.value)); - }), Cs(() => { + }), Fs(() => { document.removeEventListener("click", r.value), document.removeEventListener("touchstart", r.value), t.closeOnEscape && document.removeEventListener("keydown", i.value); - }), (s, a) => (j(), ce("div", { + }), (s, a) => (B(), ce("div", { ref_key: "root", ref: n }, [ @@ -2494,7 +2504,7 @@ function re(e) { var t = Q(e).HTMLElement; return e instanceof t || e instanceof HTMLElement; } -function rn(e) { +function sn(e) { if (typeof ShadowRoot > "u") return !1; var t = Q(e).ShadowRoot; @@ -2507,67 +2517,67 @@ function xr() { return t.brand + "/" + t.version; }).join(" ") : navigator.userAgent; } -function rs() { +function ns() { return !/^((?!chrome|android).)*safari/i.test(xr()); } function it(e, t, r) { t === void 0 && (t = !1), r === void 0 && (r = !1); var n = e.getBoundingClientRect(), i = 1, s = 1; t && re(e) && (i = e.offsetWidth > 0 && nt(n.width) / e.offsetWidth || 1, s = e.offsetHeight > 0 && nt(n.height) / e.offsetHeight || 1); - var a = Xe(e) ? Q(e) : window, o = a.visualViewport, l = !rs() && r, u = (n.left + (l && o ? o.offsetLeft : 0)) / i, c = (n.top + (l && o ? o.offsetTop : 0)) / s, m = n.width / i, g = n.height / s; + var a = Xe(e) ? Q(e) : window, o = a.visualViewport, l = !ns() && r, u = (n.left + (l && o ? o.offsetLeft : 0)) / i, c = (n.top + (l && o ? o.offsetTop : 0)) / s, v = n.width / i, g = n.height / s; return { - width: m, + width: v, height: g, top: c, - right: u + m, + right: u + v, bottom: c + g, left: u, x: u, y: c }; } -function nn(e) { +function an(e) { var t = Q(e), r = t.pageXOffset, n = t.pageYOffset; return { scrollLeft: r, scrollTop: n }; } -function nc(e) { +function sc(e) { return { scrollLeft: e.scrollLeft, scrollTop: e.scrollTop }; } -function ic(e) { - return e === Q(e) || !re(e) ? nn(e) : nc(e); +function ac(e) { + return e === Q(e) || !re(e) ? an(e) : sc(e); } function pe(e) { return e ? (e.nodeName || "").toLowerCase() : null; } -function Me(e) { +function je(e) { return ((Xe(e) ? e.ownerDocument : ( // $FlowFixMe[prop-missing] e.document )) || window.document).documentElement; } -function sn(e) { - return it(Me(e)).left + nn(e).scrollLeft; +function on(e) { + return it(je(e)).left + an(e).scrollLeft; } function Ee(e) { return Q(e).getComputedStyle(e); } -function an(e) { +function ln(e) { var t = Ee(e), r = t.overflow, n = t.overflowX, i = t.overflowY; return /auto|scroll|overlay|hidden/.test(r + i + n); } -function sc(e) { +function oc(e) { var t = e.getBoundingClientRect(), r = nt(t.width) / e.offsetWidth || 1, n = nt(t.height) / e.offsetHeight || 1; return r !== 1 || n !== 1; } -function ac(e, t, r) { +function lc(e, t, r) { r === void 0 && (r = !1); - var n = re(t), i = re(t) && sc(t), s = Me(t), a = it(e, i, r), o = { + var n = re(t), i = re(t) && oc(t), s = je(t), a = it(e, i, r), o = { scrollLeft: 0, scrollTop: 0 }, l = { @@ -2575,14 +2585,14 @@ function ac(e, t, r) { y: 0 }; return (n || !n && !r) && ((pe(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078 - an(s)) && (o = ic(t)), re(t) ? (l = it(t, !0), l.x += t.clientLeft, l.y += t.clientTop) : s && (l.x = sn(s))), { + ln(s)) && (o = ac(t)), re(t) ? (l = it(t, !0), l.x += t.clientLeft, l.y += t.clientTop) : s && (l.x = on(s))), { x: a.left + o.scrollLeft - l.x, y: a.top + o.scrollTop - l.y, width: a.width, height: a.height }; } -function ns(e) { +function is(e) { var t = it(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, @@ -2598,31 +2608,31 @@ function tr(e) { // $FlowFixMe[prop-missing] e.assignedSlot || // step into the shadow DOM of the parent of a slotted node e.parentNode || // DOM Element detected - (rn(e) ? e.host : null) || // ShadowRoot detected + (sn(e) ? e.host : null) || // ShadowRoot detected // $FlowFixMe[incompatible-call]: HTMLElement is a Node - Me(e) + je(e) ); } -function is(e) { - return ["html", "body", "#document"].indexOf(pe(e)) >= 0 ? e.ownerDocument.body : re(e) && an(e) ? e : is(tr(e)); +function ss(e) { + return ["html", "body", "#document"].indexOf(pe(e)) >= 0 ? e.ownerDocument.body : re(e) && ln(e) ? e : ss(tr(e)); } function yt(e, t) { var r; t === void 0 && (t = []); - var n = is(e), i = n === ((r = e.ownerDocument) == null ? void 0 : r.body), s = Q(n), a = i ? [s].concat(s.visualViewport || [], an(n) ? n : []) : n, o = t.concat(a); + var n = ss(e), i = n === ((r = e.ownerDocument) == null ? void 0 : r.body), s = Q(n), a = i ? [s].concat(s.visualViewport || [], ln(n) ? n : []) : n, o = t.concat(a); return i ? o : ( // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here o.concat(yt(tr(a))) ); } -function oc(e) { +function uc(e) { return ["table", "td", "th"].indexOf(pe(e)) >= 0; } -function Ln(e) { +function Bn(e) { return !re(e) || // https://github.com/popperjs/popper-core/issues/837 Ee(e).position === "fixed" ? null : e.offsetParent; } -function lc(e) { +function cc(e) { var t = /firefox/i.test(xr()), r = /Trident/i.test(xr()); if (r && re(e)) { var n = Ee(e); @@ -2630,7 +2640,7 @@ function lc(e) { return null; } var i = tr(e); - for (rn(i) && (i = i.host); re(i) && ["html", "body"].indexOf(pe(i)) < 0; ) { + for (sn(i) && (i = i.host); re(i) && ["html", "body"].indexOf(pe(i)) < 0; ) { var s = Ee(i); if (s.transform !== "none" || s.perspective !== "none" || s.contain === "paint" || ["transform", "perspective"].indexOf(s.willChange) !== -1 || t && s.willChange === "filter" || t && s.filter && s.filter !== "none") return i; @@ -2639,16 +2649,16 @@ function lc(e) { return null; } function rr(e) { - for (var t = Q(e), r = Ln(e); r && oc(r) && Ee(r).position === "static"; ) - r = Ln(r); - return r && (pe(r) === "html" || pe(r) === "body" && Ee(r).position === "static") ? t : r || lc(e) || t; + for (var t = Q(e), r = Bn(e); r && uc(r) && Ee(r).position === "static"; ) + r = Bn(r); + return r && (pe(r) === "html" || pe(r) === "body" && Ee(r).position === "static") ? t : r || cc(e) || t; } -var oe = "top", he = "bottom", Be = "right", we = "left", on = "auto", nr = [oe, he, Be, we], st = "start", Ot = "end", uc = "clippingParents", ss = "viewport", mt = "popper", cc = "reference", Bn = /* @__PURE__ */ nr.reduce(function(e, t) { +var oe = "top", he = "bottom", Re = "right", we = "left", un = "auto", nr = [oe, he, Re, we], st = "start", Ot = "end", dc = "clippingParents", as = "viewport", mt = "popper", fc = "reference", jn = /* @__PURE__ */ nr.reduce(function(e, t) { return e.concat([t + "-" + st, t + "-" + Ot]); -}, []), dc = /* @__PURE__ */ [].concat(nr, [on]).reduce(function(e, t) { +}, []), pc = /* @__PURE__ */ [].concat(nr, [un]).reduce(function(e, t) { return e.concat([t, t + "-" + st, t + "-" + Ot]); -}, []), fc = "beforeRead", pc = "read", hc = "afterRead", mc = "beforeMain", vc = "main", gc = "afterMain", yc = "beforeWrite", bc = "write", wc = "afterWrite", Sc = [fc, pc, hc, mc, vc, gc, yc, bc, wc]; -function Oc(e) { +}, []), hc = "beforeRead", mc = "read", vc = "afterRead", gc = "beforeMain", yc = "main", bc = "afterMain", wc = "beforeWrite", Sc = "write", Oc = "afterWrite", $c = [hc, mc, vc, gc, yc, bc, wc, Sc, Oc]; +function Ec(e) { var t = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Set(), n = []; e.forEach(function(s) { t.set(s.name, s); @@ -2667,15 +2677,15 @@ function Oc(e) { r.has(s.name) || i(s); }), n; } -function $c(e) { - var t = Oc(e); - return Sc.reduce(function(r, n) { +function Tc(e) { + var t = Ec(e); + return $c.reduce(function(r, n) { return r.concat(t.filter(function(i) { return i.phase === n; })); }, []); } -function Ec(e) { +function xc(e) { var t; return function() { return t || (t = new Promise(function(r) { @@ -2685,7 +2695,7 @@ function Ec(e) { })), t; }; } -function Tc(e) { +function _c(e) { var t = e.reduce(function(r, n) { var i = r[n.name]; return r[n.name] = i ? Object.assign({}, i, n, { @@ -2697,22 +2707,22 @@ function Tc(e) { return t[r]; }); } -function xc(e, t) { - var r = Q(e), n = Me(e), i = r.visualViewport, s = n.clientWidth, a = n.clientHeight, o = 0, l = 0; +function Ic(e, t) { + var r = Q(e), n = je(e), i = r.visualViewport, s = n.clientWidth, a = n.clientHeight, o = 0, l = 0; if (i) { s = i.width, a = i.height; - var u = rs(); + var u = ns(); (u || !u && t === "fixed") && (o = i.offsetLeft, l = i.offsetTop); } return { width: s, height: a, - x: o + sn(e), + x: o + on(e), y: l }; } -function _c(e) { - var t, r = Me(e), n = nn(e), i = (t = e.ownerDocument) == null ? void 0 : t.body, s = ze(r.scrollWidth, r.clientWidth, i ? i.scrollWidth : 0, i ? i.clientWidth : 0), a = ze(r.scrollHeight, r.clientHeight, i ? i.scrollHeight : 0, i ? i.clientHeight : 0), o = -n.scrollLeft + sn(e), l = -n.scrollTop; +function Ac(e) { + var t, r = je(e), n = an(e), i = (t = e.ownerDocument) == null ? void 0 : t.body, s = ze(r.scrollWidth, r.clientWidth, i ? i.scrollWidth : 0, i ? i.clientWidth : 0), a = ze(r.scrollHeight, r.clientHeight, i ? i.scrollHeight : 0, i ? i.clientHeight : 0), o = -n.scrollLeft + on(e), l = -n.scrollTop; return Ee(i || r).direction === "rtl" && (o += ze(r.clientWidth, i ? i.clientWidth : 0) - s), { width: s, height: a, @@ -2720,11 +2730,11 @@ function _c(e) { y: l }; } -function Ac(e, t) { +function Pc(e, t) { var r = t.getRootNode && t.getRootNode(); if (e.contains(t)) return !0; - if (r && rn(r)) { + if (r && sn(r)) { var n = t; do { if (n && e.isSameNode(n)) @@ -2742,24 +2752,24 @@ function _r(e) { bottom: e.y + e.height }); } -function Ic(e, t) { +function qc(e, t) { var r = it(e, !1, t === "fixed"); return r.top = r.top + e.clientTop, r.left = r.left + e.clientLeft, r.bottom = r.top + e.clientHeight, r.right = r.left + e.clientWidth, r.width = e.clientWidth, r.height = e.clientHeight, r.x = r.left, r.y = r.top, r; } -function jn(e, t, r) { - return t === ss ? _r(xc(e, r)) : Xe(t) ? Ic(t, r) : _r(_c(Me(e))); +function Mn(e, t, r) { + return t === as ? _r(Ic(e, r)) : Xe(t) ? qc(t, r) : _r(Ac(je(e))); } -function Pc(e) { +function Cc(e) { var t = yt(tr(e)), r = ["absolute", "fixed"].indexOf(Ee(e).position) >= 0, n = r && re(e) ? rr(e) : e; return Xe(n) ? t.filter(function(i) { - return Xe(i) && Ac(i, n) && pe(i) !== "body"; + return Xe(i) && Pc(i, n) && pe(i) !== "body"; }) : []; } -function qc(e, t, r, n) { - var i = t === "clippingParents" ? Pc(e) : [].concat(t), s = [].concat(i, [r]), a = s[0], o = s.reduce(function(l, u) { - var c = jn(e, u, n); +function Fc(e, t, r, n) { + var i = t === "clippingParents" ? Cc(e) : [].concat(t), s = [].concat(i, [r]), a = s[0], o = s.reduce(function(l, u) { + var c = Mn(e, u, n); return l.top = ze(c.top, l.top), l.right = Vt(c.right, l.right), l.bottom = Vt(c.bottom, l.bottom), l.left = ze(c.left, l.left), l; - }, jn(e, a, n)); + }, Mn(e, a, n)); return o.width = o.right - o.left, o.height = o.bottom - o.top, o.x = o.left, o.y = o.top, o; } function Fe(e) { @@ -2768,10 +2778,10 @@ function Fe(e) { function at(e) { return e.split("-")[1]; } -function as(e) { +function os(e) { return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y"; } -function os(e) { +function ls(e) { var t = e.reference, r = e.element, n = e.placement, i = n ? Fe(n) : null, s = n ? at(n) : null, a = t.x + t.width / 2 - r.width / 2, o = t.y + t.height / 2 - r.height / 2, l; switch (i) { case oe: @@ -2786,7 +2796,7 @@ function os(e) { y: t.y + t.height }; break; - case Be: + case Re: l = { x: t.x + t.width, y: o @@ -2804,7 +2814,7 @@ function os(e) { y: t.y }; } - var u = i ? as(i) : null; + var u = i ? os(i) : null; if (u != null) { var c = u === "y" ? "height" : "width"; switch (s) { @@ -2818,7 +2828,7 @@ function os(e) { } return l; } -function ls() { +function us() { return { top: 0, right: 0, @@ -2826,57 +2836,57 @@ function ls() { left: 0 }; } -function Cc(e) { - return Object.assign({}, ls(), e); +function kc(e) { + return Object.assign({}, us(), e); } -function Fc(e, t) { +function Lc(e, t) { return t.reduce(function(r, n) { return r[n] = e, r; }, {}); } -function ln(e, t) { +function cn(e, t) { t === void 0 && (t = {}); - var r = t, n = r.placement, i = n === void 0 ? e.placement : n, s = r.strategy, a = s === void 0 ? e.strategy : s, o = r.boundary, l = o === void 0 ? uc : o, u = r.rootBoundary, c = u === void 0 ? ss : u, m = r.elementContext, g = m === void 0 ? mt : m, f = r.altBoundary, p = f === void 0 ? !1 : f, h = r.padding, d = h === void 0 ? 0 : h, b = Cc(typeof d != "number" ? d : Fc(d, nr)), O = g === mt ? cc : mt, I = e.rects.popper, S = e.elements[p ? O : g], $ = qc(Xe(S) ? S : S.contextElement || Me(e.elements.popper), l, c, a), w = it(e.elements.reference), _ = os({ + var r = t, n = r.placement, i = n === void 0 ? e.placement : n, s = r.strategy, a = s === void 0 ? e.strategy : s, o = r.boundary, l = o === void 0 ? dc : o, u = r.rootBoundary, c = u === void 0 ? as : u, v = r.elementContext, g = v === void 0 ? mt : v, f = r.altBoundary, h = f === void 0 ? !1 : f, m = r.padding, d = m === void 0 ? 0 : m, b = kc(typeof d != "number" ? d : Lc(d, nr)), O = g === mt ? fc : mt, A = e.rects.popper, S = e.elements[h ? O : g], $ = Fc(Xe(S) ? S : S.contextElement || je(e.elements.popper), l, c, a), w = it(e.elements.reference), _ = ls({ reference: w, - element: I, + element: A, strategy: "absolute", placement: i - }), q = _r(Object.assign({}, I, _)), P = g === mt ? q : w, k = { + }), q = _r(Object.assign({}, A, _)), P = g === mt ? q : w, k = { top: $.top - P.top + b.top, bottom: P.bottom - $.bottom + b.bottom, left: $.left - P.left + b.left, right: P.right - $.right + b.right - }, M = e.modifiersData.offset; - if (g === mt && M) { - var U = M[i]; + }, j = e.modifiersData.offset; + if (g === mt && j) { + var H = j[i]; Object.keys(k).forEach(function(F) { - var E = [Be, he].indexOf(F) >= 0 ? 1 : -1, T = [oe, he].indexOf(F) >= 0 ? "y" : "x"; - k[F] += U[T] * E; + var E = [Re, he].indexOf(F) >= 0 ? 1 : -1, T = [oe, he].indexOf(F) >= 0 ? "y" : "x"; + k[F] += H[T] * E; }); } return k; } -var Mn = { +var Dn = { placement: "bottom", modifiers: [], strategy: "absolute" }; -function Rn() { +function Nn() { for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++) t[r] = arguments[r]; return !t.some(function(n) { return !(n && typeof n.getBoundingClientRect == "function"); }); } -function kc(e) { +function Rc(e) { e === void 0 && (e = {}); - var t = e, r = t.defaultModifiers, n = r === void 0 ? [] : r, i = t.defaultOptions, s = i === void 0 ? Mn : i; + var t = e, r = t.defaultModifiers, n = r === void 0 ? [] : r, i = t.defaultOptions, s = i === void 0 ? Dn : i; return function(o, l, u) { u === void 0 && (u = s); var c = { placement: "bottom", orderedModifiers: [], - options: Object.assign({}, Mn, s), + options: Object.assign({}, Dn, s), modifiersData: {}, elements: { reference: o, @@ -2884,18 +2894,18 @@ function kc(e) { }, attributes: {}, styles: {} - }, m = [], g = !1, f = { + }, v = [], g = !1, f = { state: c, setOptions: function(b) { var O = typeof b == "function" ? b(c.options) : b; - h(), c.options = Object.assign({}, s, c.options, O), c.scrollParents = { + m(), c.options = Object.assign({}, s, c.options, O), c.scrollParents = { reference: Xe(o) ? yt(o) : o.contextElement ? yt(o.contextElement) : [], popper: yt(l) }; - var I = $c(Tc([].concat(n, c.options.modifiers))); - return c.orderedModifiers = I.filter(function(S) { + var A = Tc(_c([].concat(n, c.options.modifiers))); + return c.orderedModifiers = A.filter(function(S) { return S.enabled; - }), p(), f.update(); + }), h(), f.update(); }, // Sync update – it will always be executed, even if not necessary. This // is useful for low frequency updates where sync behavior simplifies the @@ -2904,11 +2914,11 @@ function kc(e) { // prefer the async Popper#update method forceUpdate: function() { if (!g) { - var b = c.elements, O = b.reference, I = b.popper; - if (Rn(O, I)) { + var b = c.elements, O = b.reference, A = b.popper; + if (Nn(O, A)) { c.rects = { - reference: ac(O, rr(I), c.options.strategy === "fixed"), - popper: ns(I) + reference: lc(O, rr(A), c.options.strategy === "fixed"), + popper: is(A) }, c.reset = !1, c.placement = c.options.placement, c.orderedModifiers.forEach(function(k) { return c.modifiersData[k.name] = Object.assign({}, k.data); }); @@ -2930,39 +2940,39 @@ function kc(e) { }, // Async and optimistically optimized update – it will not be executed if // not necessary (debounced to run at most once-per-tick) - update: Ec(function() { + update: xc(function() { return new Promise(function(d) { f.forceUpdate(), d(c); }); }), destroy: function() { - h(), g = !0; + m(), g = !0; } }; - if (!Rn(o, l)) + if (!Nn(o, l)) return f; f.setOptions(u).then(function(d) { !g && u.onFirstUpdate && u.onFirstUpdate(d); }); - function p() { + function h() { c.orderedModifiers.forEach(function(d) { - var b = d.name, O = d.options, I = O === void 0 ? {} : O, S = d.effect; + var b = d.name, O = d.options, A = O === void 0 ? {} : O, S = d.effect; if (typeof S == "function") { var $ = S({ state: c, name: b, instance: f, - options: I + options: A }), w = function() { }; - m.push($ || w); + v.push($ || w); } }); } - function h() { - m.forEach(function(d) { + function m() { + v.forEach(function(d) { return d(); - }), m = []; + }), v = []; } return f; }; @@ -2970,7 +2980,7 @@ function kc(e) { var Ft = { passive: !0 }; -function Lc(e) { +function Bc(e) { var t = e.state, r = e.instance, n = e.options, i = n.scroll, s = i === void 0 ? !0 : i, a = n.resize, o = a === void 0 ? !0 : a, l = Q(t.elements.popper), u = [].concat(t.scrollParents.reference, t.scrollParents.popper); return s && u.forEach(function(c) { c.addEventListener("scroll", r.update, Ft); @@ -2980,89 +2990,89 @@ function Lc(e) { }), o && l.removeEventListener("resize", r.update, Ft); }; } -const Bc = { +const jc = { name: "eventListeners", enabled: !0, phase: "write", fn: function() { }, - effect: Lc, + effect: Bc, data: {} }; -function jc(e) { +function Mc(e) { var t = e.state, r = e.name; - t.modifiersData[r] = os({ + t.modifiersData[r] = ls({ reference: t.rects.reference, element: t.rects.popper, strategy: "absolute", placement: t.placement }); } -const Mc = { +const Dc = { name: "popperOffsets", enabled: !0, phase: "read", - fn: jc, + fn: Mc, data: {} }; -var Rc = { +var Nc = { top: "auto", right: "auto", bottom: "auto", left: "auto" }; -function Dc(e, t) { +function Vc(e, t) { var r = e.x, n = e.y, i = t.devicePixelRatio || 1; return { x: nt(r * i) / i || 0, y: nt(n * i) / i || 0 }; } -function Dn(e) { - var t, r = e.popper, n = e.popperRect, i = e.placement, s = e.variation, a = e.offsets, o = e.position, l = e.gpuAcceleration, u = e.adaptive, c = e.roundOffsets, m = e.isFixed, g = a.x, f = g === void 0 ? 0 : g, p = a.y, h = p === void 0 ? 0 : p, d = typeof c == "function" ? c({ +function Vn(e) { + var t, r = e.popper, n = e.popperRect, i = e.placement, s = e.variation, a = e.offsets, o = e.position, l = e.gpuAcceleration, u = e.adaptive, c = e.roundOffsets, v = e.isFixed, g = a.x, f = g === void 0 ? 0 : g, h = a.y, m = h === void 0 ? 0 : h, d = typeof c == "function" ? c({ x: f, - y: h + y: m }) : { x: f, - y: h + y: m }; - f = d.x, h = d.y; - var b = a.hasOwnProperty("x"), O = a.hasOwnProperty("y"), I = we, S = oe, $ = window; + f = d.x, m = d.y; + var b = a.hasOwnProperty("x"), O = a.hasOwnProperty("y"), A = we, S = oe, $ = window; if (u) { var w = rr(r), _ = "clientHeight", q = "clientWidth"; - if (w === Q(r) && (w = Me(r), Ee(w).position !== "static" && o === "absolute" && (_ = "scrollHeight", q = "scrollWidth")), w = w, i === oe || (i === we || i === Be) && s === Ot) { + if (w === Q(r) && (w = je(r), Ee(w).position !== "static" && o === "absolute" && (_ = "scrollHeight", q = "scrollWidth")), w = w, i === oe || (i === we || i === Re) && s === Ot) { S = he; - var P = m && w === $ && $.visualViewport ? $.visualViewport.height : ( + var P = v && w === $ && $.visualViewport ? $.visualViewport.height : ( // $FlowFixMe[prop-missing] w[_] ); - h -= P - n.height, h *= l ? 1 : -1; + m -= P - n.height, m *= l ? 1 : -1; } if (i === we || (i === oe || i === he) && s === Ot) { - I = Be; - var k = m && w === $ && $.visualViewport ? $.visualViewport.width : ( + A = Re; + var k = v && w === $ && $.visualViewport ? $.visualViewport.width : ( // $FlowFixMe[prop-missing] w[q] ); f -= k - n.width, f *= l ? 1 : -1; } } - var M = Object.assign({ + var j = Object.assign({ position: o - }, u && Rc), U = c === !0 ? Dc({ + }, u && Nc), H = c === !0 ? Vc({ x: f, - y: h + y: m }, Q(r)) : { x: f, - y: h + y: m }; - if (f = U.x, h = U.y, l) { + if (f = H.x, m = H.y, l) { var F; - return Object.assign({}, M, (F = {}, F[S] = O ? "0" : "", F[I] = b ? "0" : "", F.transform = ($.devicePixelRatio || 1) <= 1 ? "translate(" + f + "px, " + h + "px)" : "translate3d(" + f + "px, " + h + "px, 0)", F)); + return Object.assign({}, j, (F = {}, F[S] = O ? "0" : "", F[A] = b ? "0" : "", F.transform = ($.devicePixelRatio || 1) <= 1 ? "translate(" + f + "px, " + m + "px)" : "translate3d(" + f + "px, " + m + "px, 0)", F)); } - return Object.assign({}, M, (t = {}, t[S] = O ? h + "px" : "", t[I] = b ? f + "px" : "", t.transform = "", t)); + return Object.assign({}, j, (t = {}, t[S] = O ? m + "px" : "", t[A] = b ? f + "px" : "", t.transform = "", t)); } -function Nc(e) { +function Hc(e) { var t = e.state, r = e.options, n = r.gpuAcceleration, i = n === void 0 ? !0 : n, s = r.adaptive, a = s === void 0 ? !0 : s, o = r.roundOffsets, l = o === void 0 ? !0 : o, u = { placement: Fe(t.placement), variation: at(t.placement), @@ -3071,12 +3081,12 @@ function Nc(e) { gpuAcceleration: i, isFixed: t.options.strategy === "fixed" }; - t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, Dn(Object.assign({}, u, { + t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, Vn(Object.assign({}, u, { offsets: t.modifiersData.popperOffsets, position: t.options.strategy, adaptive: a, roundOffsets: l - })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, Dn(Object.assign({}, u, { + })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, Vn(Object.assign({}, u, { offsets: t.modifiersData.arrow, position: "absolute", adaptive: !1, @@ -3085,14 +3095,14 @@ function Nc(e) { "data-popper-placement": t.placement }); } -const Vc = { +const Uc = { name: "computeStyles", enabled: !0, phase: "beforeWrite", - fn: Nc, + fn: Hc, data: {} }; -function Uc(e) { +function Wc(e) { var t = e.state; Object.keys(t.elements).forEach(function(r) { var n = t.styles[r] || {}, i = t.attributes[r] || {}, s = t.elements[r]; @@ -3102,7 +3112,7 @@ function Uc(e) { })); }); } -function Hc(e) { +function zc(e) { var t = e.state, r = { popper: { position: t.options.strategy, @@ -3126,167 +3136,167 @@ function Hc(e) { }); }; } -const Wc = { +const Gc = { name: "applyStyles", enabled: !0, phase: "write", - fn: Uc, - effect: Hc, + fn: Wc, + effect: zc, requires: ["computeStyles"] }; -var zc = [Bc, Mc, Vc, Wc], Gc = /* @__PURE__ */ kc({ - defaultModifiers: zc +var Xc = [jc, Dc, Uc, Gc], Kc = /* @__PURE__ */ Rc({ + defaultModifiers: Xc }); -function Xc(e) { +function Jc(e) { return e === "x" ? "y" : "x"; } -function Bt(e, t, r) { +function Rt(e, t, r) { return ze(e, Vt(t, r)); } -function Kc(e, t, r) { - var n = Bt(e, t, r); +function Qc(e, t, r) { + var n = Rt(e, t, r); return n > r ? r : n; } -function Jc(e) { - var t = e.state, r = e.options, n = e.name, i = r.mainAxis, s = i === void 0 ? !0 : i, a = r.altAxis, o = a === void 0 ? !1 : a, l = r.boundary, u = r.rootBoundary, c = r.altBoundary, m = r.padding, g = r.tether, f = g === void 0 ? !0 : g, p = r.tetherOffset, h = p === void 0 ? 0 : p, d = ln(t, { +function Yc(e) { + var t = e.state, r = e.options, n = e.name, i = r.mainAxis, s = i === void 0 ? !0 : i, a = r.altAxis, o = a === void 0 ? !1 : a, l = r.boundary, u = r.rootBoundary, c = r.altBoundary, v = r.padding, g = r.tether, f = g === void 0 ? !0 : g, h = r.tetherOffset, m = h === void 0 ? 0 : h, d = cn(t, { boundary: l, rootBoundary: u, - padding: m, + padding: v, altBoundary: c - }), b = Fe(t.placement), O = at(t.placement), I = !O, S = as(b), $ = Xc(S), w = t.modifiersData.popperOffsets, _ = t.rects.reference, q = t.rects.popper, P = typeof h == "function" ? h(Object.assign({}, t.rects, { + }), b = Fe(t.placement), O = at(t.placement), A = !O, S = os(b), $ = Jc(S), w = t.modifiersData.popperOffsets, _ = t.rects.reference, q = t.rects.popper, P = typeof m == "function" ? m(Object.assign({}, t.rects, { placement: t.placement - })) : h, k = typeof P == "number" ? { + })) : m, k = typeof P == "number" ? { mainAxis: P, altAxis: P } : Object.assign({ mainAxis: 0, altAxis: 0 - }, P), M = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, U = { + }, P), j = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, H = { x: 0, y: 0 }; if (w) { if (s) { - var F, E = S === "y" ? oe : we, T = S === "y" ? he : Be, A = S === "y" ? "height" : "width", C = w[S], ge = C + d[E], H = C - d[T], ct = f ? -q[A] / 2 : 0, At = O === st ? _[A] : q[A], Ae = O === st ? -q[A] : -_[A], Ze = t.elements.arrow, Ie = f && Ze ? ns(Ze) : { + var F, E = S === "y" ? oe : we, T = S === "y" ? he : Re, I = S === "y" ? "height" : "width", C = w[S], ge = C + d[E], U = C - d[T], ct = f ? -q[I] / 2 : 0, It = O === st ? _[I] : q[I], Ie = O === st ? -q[I] : -_[I], Ze = t.elements.arrow, Ae = f && Ze ? is(Ze) : { width: 0, height: 0 - }, Pe = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : ls(), dt = Pe[E], It = Pe[T], Re = Bt(0, _[A], Ie[A]), sr = I ? _[A] / 2 - ct - Re - dt - k.mainAxis : At - Re - dt - k.mainAxis, ws = I ? -_[A] / 2 + ct + Re + It + k.mainAxis : Ae + Re + It + k.mainAxis, ar = t.elements.arrow && rr(t.elements.arrow), Ss = ar ? S === "y" ? ar.clientTop || 0 : ar.clientLeft || 0 : 0, fn = (F = M == null ? void 0 : M[S]) != null ? F : 0, Os = C + sr - fn - Ss, $s = C + ws - fn, pn = Bt(f ? Vt(ge, Os) : ge, C, f ? ze(H, $s) : H); - w[S] = pn, U[S] = pn - C; + }, Pe = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : us(), dt = Pe[E], At = Pe[T], Me = Rt(0, _[I], Ae[I]), sr = A ? _[I] / 2 - ct - Me - dt - k.mainAxis : It - Me - dt - k.mainAxis, Ss = A ? -_[I] / 2 + ct + Me + At + k.mainAxis : Ie + Me + At + k.mainAxis, ar = t.elements.arrow && rr(t.elements.arrow), Os = ar ? S === "y" ? ar.clientTop || 0 : ar.clientLeft || 0 : 0, hn = (F = j == null ? void 0 : j[S]) != null ? F : 0, $s = C + sr - hn - Os, Es = C + Ss - hn, mn = Rt(f ? Vt(ge, $s) : ge, C, f ? ze(U, Es) : U); + w[S] = mn, H[S] = mn - C; } if (o) { - var hn, Es = S === "x" ? oe : we, Ts = S === "x" ? he : Be, De = w[$], Pt = $ === "y" ? "height" : "width", mn = De + d[Es], vn = De - d[Ts], or = [oe, we].indexOf(b) !== -1, gn = (hn = M == null ? void 0 : M[$]) != null ? hn : 0, yn = or ? mn : De - _[Pt] - q[Pt] - gn + k.altAxis, bn = or ? De + _[Pt] + q[Pt] - gn - k.altAxis : vn, wn = f && or ? Kc(yn, De, bn) : Bt(f ? yn : mn, De, f ? bn : vn); - w[$] = wn, U[$] = wn - De; + var vn, Ts = S === "x" ? oe : we, xs = S === "x" ? he : Re, De = w[$], Pt = $ === "y" ? "height" : "width", gn = De + d[Ts], yn = De - d[xs], or = [oe, we].indexOf(b) !== -1, bn = (vn = j == null ? void 0 : j[$]) != null ? vn : 0, wn = or ? gn : De - _[Pt] - q[Pt] - bn + k.altAxis, Sn = or ? De + _[Pt] + q[Pt] - bn - k.altAxis : yn, On = f && or ? Qc(wn, De, Sn) : Rt(f ? wn : gn, De, f ? Sn : yn); + w[$] = On, H[$] = On - De; } - t.modifiersData[n] = U; + t.modifiersData[n] = H; } } -const Qc = { +const Zc = { name: "preventOverflow", enabled: !0, phase: "main", - fn: Jc, + fn: Yc, requiresIfExists: ["offset"] }; -var Yc = { +var ed = { left: "right", right: "left", bottom: "top", top: "bottom" }; -function jt(e) { +function Bt(e) { return e.replace(/left|right|bottom|top/g, function(t) { - return Yc[t]; + return ed[t]; }); } -var Zc = { +var td = { start: "end", end: "start" }; -function Nn(e) { +function Hn(e) { return e.replace(/start|end/g, function(t) { - return Zc[t]; + return td[t]; }); } -function ed(e, t) { +function rd(e, t) { t === void 0 && (t = {}); - var r = t, n = r.placement, i = r.boundary, s = r.rootBoundary, a = r.padding, o = r.flipVariations, l = r.allowedAutoPlacements, u = l === void 0 ? dc : l, c = at(n), m = c ? o ? Bn : Bn.filter(function(p) { - return at(p) === c; - }) : nr, g = m.filter(function(p) { - return u.indexOf(p) >= 0; + var r = t, n = r.placement, i = r.boundary, s = r.rootBoundary, a = r.padding, o = r.flipVariations, l = r.allowedAutoPlacements, u = l === void 0 ? pc : l, c = at(n), v = c ? o ? jn : jn.filter(function(h) { + return at(h) === c; + }) : nr, g = v.filter(function(h) { + return u.indexOf(h) >= 0; }); - g.length === 0 && (g = m); - var f = g.reduce(function(p, h) { - return p[h] = ln(e, { - placement: h, + g.length === 0 && (g = v); + var f = g.reduce(function(h, m) { + return h[m] = cn(e, { + placement: m, boundary: i, rootBoundary: s, padding: a - })[Fe(h)], p; + })[Fe(m)], h; }, {}); - return Object.keys(f).sort(function(p, h) { - return f[p] - f[h]; + return Object.keys(f).sort(function(h, m) { + return f[h] - f[m]; }); } -function td(e) { - if (Fe(e) === on) +function nd(e) { + if (Fe(e) === un) return []; - var t = jt(e); - return [Nn(e), t, Nn(t)]; + var t = Bt(e); + return [Hn(e), t, Hn(t)]; } -function rd(e) { +function id(e) { var t = e.state, r = e.options, n = e.name; if (!t.modifiersData[n]._skip) { - for (var i = r.mainAxis, s = i === void 0 ? !0 : i, a = r.altAxis, o = a === void 0 ? !0 : a, l = r.fallbackPlacements, u = r.padding, c = r.boundary, m = r.rootBoundary, g = r.altBoundary, f = r.flipVariations, p = f === void 0 ? !0 : f, h = r.allowedAutoPlacements, d = t.options.placement, b = Fe(d), O = b === d, I = l || (O || !p ? [jt(d)] : td(d)), S = [d].concat(I).reduce(function(Ie, Pe) { - return Ie.concat(Fe(Pe) === on ? ed(t, { + for (var i = r.mainAxis, s = i === void 0 ? !0 : i, a = r.altAxis, o = a === void 0 ? !0 : a, l = r.fallbackPlacements, u = r.padding, c = r.boundary, v = r.rootBoundary, g = r.altBoundary, f = r.flipVariations, h = f === void 0 ? !0 : f, m = r.allowedAutoPlacements, d = t.options.placement, b = Fe(d), O = b === d, A = l || (O || !h ? [Bt(d)] : nd(d)), S = [d].concat(A).reduce(function(Ae, Pe) { + return Ae.concat(Fe(Pe) === un ? rd(t, { placement: Pe, boundary: c, - rootBoundary: m, + rootBoundary: v, padding: u, - flipVariations: p, - allowedAutoPlacements: h + flipVariations: h, + allowedAutoPlacements: m }) : Pe); }, []), $ = t.rects.reference, w = t.rects.popper, _ = /* @__PURE__ */ new Map(), q = !0, P = S[0], k = 0; k < S.length; k++) { - var M = S[k], U = Fe(M), F = at(M) === st, E = [oe, he].indexOf(U) >= 0, T = E ? "width" : "height", A = ln(t, { - placement: M, + var j = S[k], H = Fe(j), F = at(j) === st, E = [oe, he].indexOf(H) >= 0, T = E ? "width" : "height", I = cn(t, { + placement: j, boundary: c, - rootBoundary: m, + rootBoundary: v, altBoundary: g, padding: u - }), C = E ? F ? Be : we : F ? he : oe; - $[T] > w[T] && (C = jt(C)); - var ge = jt(C), H = []; - if (s && H.push(A[U] <= 0), o && H.push(A[C] <= 0, A[ge] <= 0), H.every(function(Ie) { - return Ie; + }), C = E ? F ? Re : we : F ? he : oe; + $[T] > w[T] && (C = Bt(C)); + var ge = Bt(C), U = []; + if (s && U.push(I[H] <= 0), o && U.push(I[C] <= 0, I[ge] <= 0), U.every(function(Ae) { + return Ae; })) { - P = M, q = !1; + P = j, q = !1; break; } - _.set(M, H); + _.set(j, U); } if (q) - for (var ct = p ? 3 : 1, At = function(Pe) { - var dt = S.find(function(It) { - var Re = _.get(It); - if (Re) - return Re.slice(0, Pe).every(function(sr) { + for (var ct = h ? 3 : 1, It = function(Pe) { + var dt = S.find(function(At) { + var Me = _.get(At); + if (Me) + return Me.slice(0, Pe).every(function(sr) { return sr; }); }); if (dt) return P = dt, "break"; - }, Ae = ct; Ae > 0; Ae--) { - var Ze = At(Ae); + }, Ie = ct; Ie > 0; Ie--) { + var Ze = It(Ie); if (Ze === "break") break; } t.placement !== P && (t.modifiersData[n]._skip = !0, t.placement = P, t.reset = !0); } } -const nd = { +const sd = { name: "flip", enabled: !0, phase: "main", - fn: rd, + fn: id, requiresIfExists: ["offset"], data: { _skip: !1 @@ -3296,9 +3306,9 @@ const nd = { for (const [n, i] of t) r[n] = i; return r; -}, id = { +}, ad = { components: { - OnClickOutside: ts + OnClickOutside: rs }, props: { spladeId: { @@ -3359,9 +3369,9 @@ const nd = { mounted: async function() { this.teleport && await Oe(); const e = this.teleport ? document.querySelector(`div[data-splade-dropdown-id="${this.spladeId}"]`) : this.$refs.tooltip.children[0]; - this.popper = Gc(this.$refs.button, e, { + this.popper = Kc(this.$refs.button, e, { placement: this.placement, - modifiers: [nd, Qc], + modifiers: [sd, Zc], strategy: this.strategy }); }, @@ -3373,26 +3383,26 @@ const nd = { this.opened = !1; } } -}, sd = { ref: "tooltip" }; -function ad(e, t, r, n, i, s) { +}, od = { ref: "tooltip" }; +function ld(e, t, r, n, i, s) { const a = Lr("OnClickOutside"); - return j(), X(a, { - style: Mt(s.wrapperStyle), + return B(), X(a, { + style: jt(s.wrapperStyle), do: s.hide, opened: i.opened, "ignore-inner-targets": !r.closeOnClick }, { - default: si(() => [ + default: oi(() => [ gr("div", { ref: "button", - style: Mt(s.buttonStyle) + style: jt(s.buttonStyle) }, [ K(e.$slots, "button", { toggle: s.toggle, disabled: r.disabled }) ], 4), - gr("div", sd, [ + gr("div", od, [ K(e.$slots, "default", { hide: s.hide, opened: i.opened @@ -3402,7 +3412,7 @@ function ad(e, t, r, n, i, s) { _: 3 }, 8, ["style", "do", "opened", "ignore-inner-targets"]); } -const od = /* @__PURE__ */ _e(id, [["render", ad]]), ld = { +const ud = /* @__PURE__ */ _e(ad, [["render", ld]]), cd = { __name: "DynamicHtml", props: { keepAliveKey: { @@ -3423,15 +3433,15 @@ const od = /* @__PURE__ */ _e(id, [["render", ad]]), ld = { }, setup(e) { const t = z("$splade") || {}, r = z("$spladeOptions") || {}; - return (n, i) => ee(t).isSsr ? (j(), X(ue, { + return (n, i) => ee(t).isSsr ? (B(), X(ue, { key: e.keepAliveKey, html: ee(t).htmlForDynamicComponent(e.name), passthrough: e.passthrough - }, null, 8, ["html", "passthrough"])) : (j(), X(ni, { + }, null, 8, ["html", "passthrough"])) : (B(), X(si, { key: 0, max: ee(r).max_keep_alive }, [ - (j(), X(ue, { + (B(), X(ue, { key: e.keepAliveKey, html: ee(t).htmlForDynamicComponent(e.name), passthrough: e.passthrough @@ -3439,14 +3449,14 @@ const od = /* @__PURE__ */ _e(id, [["render", ad]]), ld = { ], 1032, ["max"])); } }; -function us(e) { +function cs(e) { return e && e.length ? e[0] : void 0; } -const ud = { +const dd = { inject: ["stack"], computed: { values() { - return v.validationErrors(this.stack); + return p.validationErrors(this.stack); } }, render() { @@ -3456,13 +3466,13 @@ const ud = { return W(e.values, t); }, first(t) { - return us(e.values[t] || []); + return cs(e.values[t] || []); }, all: { ...this.values }, ...this.values }); } -}, cd = { +}, fd = { inject: ["stack"], props: { private: { @@ -3497,7 +3507,7 @@ const ud = { }, computed: { currentStack() { - return v.currentStack.value; + return p.currentStack.value; } }, watch: { @@ -3519,10 +3529,10 @@ const ud = { }, methods: { handlePendingVisit() { - this.pendingVisit && v.currentStack.value === this.stack && (v.visit(this.pendingVisit), this.pendingVisit = null); + this.pendingVisit && p.currentStack.value === this.stack && (p.visit(this.pendingVisit), this.pendingVisit = null); }, handlePendingRefresh() { - this.pendingRefresh && v.currentStack.value === this.stack && (v.refresh(this.pendingRefresh.preserveScroll || this.preserveScroll), this.pendingRefresh = !1); + this.pendingRefresh && p.currentStack.value === this.stack && (p.refresh(this.pendingRefresh.preserveScroll || this.preserveScroll), this.pendingRefresh = !1); }, bindListeners() { this.subscription.on("pusher:subscription_succeeded", () => { @@ -3532,10 +3542,10 @@ const ud = { this.$emit("event", { name: e, data: r }); const n = "splade.preserveScroll", i = "splade.redirect", s = "splade.refresh", a = "splade.toast"; let o = null, l = !1, u = !1, c = []; - te(r, (m) => { - J(m) && (i in m && (o = m[i]), n in m && (l = m[n]), s in m && (u = m[s]), a in m && c.push(m)); - }), o ? this.pendingVisit = o : u ? this.pendingRefresh = { preserveScroll: l } : this.events.push({ name: e, data: r }), c.length > 0 && c.forEach((m) => { - v.pushToast(m); + te(r, (v) => { + J(v) && (i in v && (o = v[i]), n in v && (l = v[n]), s in v && (u = v[s]), a in v && c.push(v)); + }), o ? this.pendingVisit = o : u ? this.pendingRefresh = { preserveScroll: l } : this.events.push({ name: e, data: r }), c.length > 0 && c.forEach((v) => { + p.pushToast(v); }), this.$root.$emit(`event.${e}`, r); }); this.subscriptions.push(t); @@ -3552,25 +3562,25 @@ const ud = { }); } }; -function dd() { +function pd() { this.__data__ = new Te(), this.size = 0; } -function fd(e) { +function hd(e) { var t = this.__data__, r = t.delete(e); return this.size = t.size, r; } -function pd(e) { +function md(e) { return this.__data__.get(e); } -function hd(e) { +function vd(e) { return this.__data__.has(e); } -var md = 200; -function vd(e, t) { +var gd = 200; +function yd(e, t) { var r = this.__data__; if (r instanceof Te) { var n = r.__data__; - if (!wt || n.length < md - 1) + if (!wt || n.length < gd - 1) return n.push([e, t]), this.size = ++r.size, this; r = this.__data__ = new xe(n); } @@ -3580,47 +3590,47 @@ function Se(e) { var t = this.__data__ = new Te(e); this.size = t.size; } -Se.prototype.clear = dd; -Se.prototype.delete = fd; -Se.prototype.get = pd; -Se.prototype.has = hd; -Se.prototype.set = vd; -var gd = "__lodash_hash_undefined__"; -function yd(e) { - return this.__data__.set(e, gd), this; +Se.prototype.clear = pd; +Se.prototype.delete = hd; +Se.prototype.get = md; +Se.prototype.has = vd; +Se.prototype.set = yd; +var bd = "__lodash_hash_undefined__"; +function wd(e) { + return this.__data__.set(e, bd), this; } -function bd(e) { +function Sd(e) { return this.__data__.has(e); } -function Ut(e) { +function Ht(e) { var t = -1, r = e == null ? 0 : e.length; for (this.__data__ = new xe(); ++t < r; ) this.add(e[t]); } -Ut.prototype.add = Ut.prototype.push = yd; -Ut.prototype.has = bd; -function wd(e, t) { +Ht.prototype.add = Ht.prototype.push = wd; +Ht.prototype.has = Sd; +function Od(e, t) { for (var r = -1, n = e == null ? 0 : e.length; ++r < n; ) if (t(e[r], r, e)) return !0; return !1; } -function Sd(e, t) { +function $d(e, t) { return e.has(t); } -var Od = 1, $d = 2; -function cs(e, t, r, n, i, s) { - var a = r & Od, o = e.length, l = t.length; +var Ed = 1, Td = 2; +function ds(e, t, r, n, i, s) { + var a = r & Ed, o = e.length, l = t.length; if (o != l && !(a && l > o)) return !1; var u = s.get(e), c = s.get(t); if (u && c) return u == t && c == e; - var m = -1, g = !0, f = r & $d ? new Ut() : void 0; - for (s.set(e, t), s.set(t, e); ++m < o; ) { - var p = e[m], h = t[m]; + var v = -1, g = !0, f = r & Td ? new Ht() : void 0; + for (s.set(e, t), s.set(t, e); ++v < o; ) { + var h = e[v], m = t[v]; if (n) - var d = a ? n(h, p, m, t, e, s) : n(p, h, m, e, t, s); + var d = a ? n(m, h, v, t, e, s) : n(h, m, v, e, t, s); if (d !== void 0) { if (d) continue; @@ -3628,183 +3638,183 @@ function cs(e, t, r, n, i, s) { break; } if (f) { - if (!wd(t, function(b, O) { - if (!Sd(f, O) && (p === b || i(p, b, r, n, s))) + if (!Od(t, function(b, O) { + if (!$d(f, O) && (h === b || i(h, b, r, n, s))) return f.push(O); })) { g = !1; break; } - } else if (!(p === h || i(p, h, r, n, s))) { + } else if (!(h === m || i(h, m, r, n, s))) { g = !1; break; } } return s.delete(e), s.delete(t), g; } -var Ed = ve.Uint8Array; -const Vn = Ed; -function Td(e) { +var xd = ve.Uint8Array; +const Un = xd; +function _d(e) { var t = -1, r = Array(e.size); return e.forEach(function(n, i) { r[++t] = [i, n]; }), r; } -function xd(e) { +function Id(e) { var t = -1, r = Array(e.size); return e.forEach(function(n) { r[++t] = n; }), r; } -var _d = 1, Ad = 2, Id = "[object Boolean]", Pd = "[object Date]", qd = "[object Error]", Cd = "[object Map]", Fd = "[object Number]", kd = "[object RegExp]", Ld = "[object Set]", Bd = "[object String]", jd = "[object Symbol]", Md = "[object ArrayBuffer]", Rd = "[object DataView]", Un = ke ? ke.prototype : void 0, vr = Un ? Un.valueOf : void 0; -function Dd(e, t, r, n, i, s, a) { +var Ad = 1, Pd = 2, qd = "[object Boolean]", Cd = "[object Date]", Fd = "[object Error]", kd = "[object Map]", Ld = "[object Number]", Rd = "[object RegExp]", Bd = "[object Set]", jd = "[object String]", Md = "[object Symbol]", Dd = "[object ArrayBuffer]", Nd = "[object DataView]", Wn = ke ? ke.prototype : void 0, vr = Wn ? Wn.valueOf : void 0; +function Vd(e, t, r, n, i, s, a) { switch (r) { - case Rd: + case Nd: if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset) return !1; e = e.buffer, t = t.buffer; - case Md: - return !(e.byteLength != t.byteLength || !s(new Vn(e), new Vn(t))); - case Id: - case Pd: - case Fd: - return Gr(+e, +t); + case Dd: + return !(e.byteLength != t.byteLength || !s(new Un(e), new Un(t))); case qd: + case Cd: + case Ld: + return Kr(+e, +t); + case Fd: return e.name == t.name && e.message == t.message; + case Rd: + case jd: + return e == t + ""; case kd: + var o = _d; case Bd: - return e == t + ""; - case Cd: - var o = Td; - case Ld: - var l = n & _d; - if (o || (o = xd), e.size != t.size && !l) + var l = n & Ad; + if (o || (o = Id), e.size != t.size && !l) return !1; var u = a.get(e); if (u) return u == t; - n |= Ad, a.set(e, t); - var c = cs(o(e), o(t), n, i, s, a); + n |= Pd, a.set(e, t); + var c = ds(o(e), o(t), n, i, s, a); return a.delete(e), c; - case jd: + case Md: if (vr) return vr.call(e) == vr.call(t); } return !1; } -function Nd(e, t) { +function Hd(e, t) { for (var r = -1, n = t.length, i = e.length; ++r < n; ) e[i + r] = t[r]; return e; } -function Vd(e, t, r) { +function Ud(e, t, r) { var n = t(e); - return R(e) ? n : Nd(n, r(e)); + return M(e) ? n : Hd(n, r(e)); } -function ds(e, t) { +function fs(e, t) { for (var r = -1, n = e == null ? 0 : e.length, i = 0, s = []; ++r < n; ) { var a = e[r]; t(a, r, e) && (s[i++] = a); } return s; } -function Ud() { +function Wd() { return []; } -var Hd = Object.prototype, Wd = Hd.propertyIsEnumerable, Hn = Object.getOwnPropertySymbols, zd = Hn ? function(e) { - return e == null ? [] : (e = Object(e), ds(Hn(e), function(t) { - return Wd.call(e, t); +var zd = Object.prototype, Gd = zd.propertyIsEnumerable, zn = Object.getOwnPropertySymbols, Xd = zn ? function(e) { + return e == null ? [] : (e = Object(e), fs(zn(e), function(t) { + return Gd.call(e, t); })); -} : Ud; -const Gd = zd; -function Wn(e) { - return Vd(e, Wt, Gd); -} -var Xd = 1, Kd = Object.prototype, Jd = Kd.hasOwnProperty; -function Qd(e, t, r, n, i, s) { - var a = r & Xd, o = Wn(e), l = o.length, u = Wn(t), c = u.length; +} : Wd; +const Kd = Xd; +function Gn(e) { + return Ud(e, Wt, Kd); +} +var Jd = 1, Qd = Object.prototype, Yd = Qd.hasOwnProperty; +function Zd(e, t, r, n, i, s) { + var a = r & Jd, o = Gn(e), l = o.length, u = Gn(t), c = u.length; if (l != c && !a) return !1; - for (var m = l; m--; ) { - var g = o[m]; - if (!(a ? g in t : Jd.call(t, g))) + for (var v = l; v--; ) { + var g = o[v]; + if (!(a ? g in t : Yd.call(t, g))) return !1; } - var f = s.get(e), p = s.get(t); - if (f && p) - return f == t && p == e; - var h = !0; + var f = s.get(e), h = s.get(t); + if (f && h) + return f == t && h == e; + var m = !0; s.set(e, t), s.set(t, e); - for (var d = a; ++m < l; ) { - g = o[m]; + for (var d = a; ++v < l; ) { + g = o[v]; var b = e[g], O = t[g]; if (n) - var I = a ? n(O, b, g, t, e, s) : n(b, O, g, e, t, s); - if (!(I === void 0 ? b === O || i(b, O, r, n, s) : I)) { - h = !1; + var A = a ? n(O, b, g, t, e, s) : n(b, O, g, e, t, s); + if (!(A === void 0 ? b === O || i(b, O, r, n, s) : A)) { + m = !1; break; } d || (d = g == "constructor"); } - if (h && !d) { + if (m && !d) { var S = e.constructor, $ = t.constructor; - S != $ && "constructor" in e && "constructor" in t && !(typeof S == "function" && S instanceof S && typeof $ == "function" && $ instanceof $) && (h = !1); + S != $ && "constructor" in e && "constructor" in t && !(typeof S == "function" && S instanceof S && typeof $ == "function" && $ instanceof $) && (m = !1); } - return s.delete(e), s.delete(t), h; -} -var Yd = Qe(ve, "DataView"); -const Ar = Yd; -var Zd = Qe(ve, "Promise"); -const Ir = Zd; -var ef = Qe(ve, "Set"); -const Pr = ef; -var tf = Qe(ve, "WeakMap"); -const qr = tf; -var zn = "[object Map]", rf = "[object Object]", Gn = "[object Promise]", Xn = "[object Set]", Kn = "[object WeakMap]", Jn = "[object DataView]", nf = Je(Ar), sf = Je(wt), af = Je(Ir), of = Je(Pr), lf = Je(qr), Ve = je; -(Ar && Ve(new Ar(new ArrayBuffer(1))) != Jn || wt && Ve(new wt()) != zn || Ir && Ve(Ir.resolve()) != Gn || Pr && Ve(new Pr()) != Xn || qr && Ve(new qr()) != Kn) && (Ve = function(e) { - var t = je(e), r = t == rf ? e.constructor : void 0, n = r ? Je(r) : ""; + return s.delete(e), s.delete(t), m; +} +var ef = Qe(ve, "DataView"); +const Ir = ef; +var tf = Qe(ve, "Promise"); +const Ar = tf; +var rf = Qe(ve, "Set"); +const Pr = rf; +var nf = Qe(ve, "WeakMap"); +const qr = nf; +var Xn = "[object Map]", sf = "[object Object]", Kn = "[object Promise]", Jn = "[object Set]", Qn = "[object WeakMap]", Yn = "[object DataView]", af = Je(Ir), of = Je(wt), lf = Je(Ar), uf = Je(Pr), cf = Je(qr), Ve = Be; +(Ir && Ve(new Ir(new ArrayBuffer(1))) != Yn || wt && Ve(new wt()) != Xn || Ar && Ve(Ar.resolve()) != Kn || Pr && Ve(new Pr()) != Jn || qr && Ve(new qr()) != Qn) && (Ve = function(e) { + var t = Be(e), r = t == sf ? e.constructor : void 0, n = r ? Je(r) : ""; if (n) switch (n) { - case nf: - return Jn; - case sf: - return zn; case af: - return Gn; + return Yn; case of: return Xn; case lf: return Kn; + case uf: + return Jn; + case cf: + return Qn; } return t; }); -const Qn = Ve; -var uf = 1, Yn = "[object Arguments]", Zn = "[object Array]", kt = "[object Object]", cf = Object.prototype, ei = cf.hasOwnProperty; -function df(e, t, r, n, i, s) { - var a = R(e), o = R(t), l = a ? Zn : Qn(e), u = o ? Zn : Qn(t); - l = l == Yn ? kt : l, u = u == Yn ? kt : u; - var c = l == kt, m = u == kt, g = l == u; +const Zn = Ve; +var df = 1, ei = "[object Arguments]", ti = "[object Array]", kt = "[object Object]", ff = Object.prototype, ri = ff.hasOwnProperty; +function pf(e, t, r, n, i, s) { + var a = M(e), o = M(t), l = a ? ti : Zn(e), u = o ? ti : Zn(t); + l = l == ei ? kt : l, u = u == ei ? kt : u; + var c = l == kt, v = u == kt, g = l == u; if (g && yr(e)) { if (!yr(t)) return !1; a = !0, c = !1; } if (g && !c) - return s || (s = new Se()), a || fi(e) ? cs(e, t, r, n, i, s) : Dd(e, t, l, r, n, i, s); - if (!(r & uf)) { - var f = c && ei.call(e, "__wrapped__"), p = m && ei.call(t, "__wrapped__"); - if (f || p) { - var h = f ? e.value() : e, d = p ? t.value() : t; - return s || (s = new Se()), i(h, d, r, n, s); + return s || (s = new Se()), a || hi(e) ? ds(e, t, r, n, i, s) : Vd(e, t, l, r, n, i, s); + if (!(r & df)) { + var f = c && ri.call(e, "__wrapped__"), h = v && ri.call(t, "__wrapped__"); + if (f || h) { + var m = f ? e.value() : e, d = h ? t.value() : t; + return s || (s = new Se()), i(m, d, r, n, s); } } - return g ? (s || (s = new Se()), Qd(e, t, r, n, i, s)) : !1; + return g ? (s || (s = new Se()), Zd(e, t, r, n, i, s)) : !1; } function ir(e, t, r, n, i) { - return e === t ? !0 : e == null || t == null || !Le(e) && !Le(t) ? e !== e && t !== t : df(e, t, r, n, ir, i); + return e === t ? !0 : e == null || t == null || !Le(e) && !Le(t) ? e !== e && t !== t : pf(e, t, r, n, ir, i); } -var ff = 1, pf = 2; -function hf(e, t, r, n) { +var hf = 1, mf = 2; +function vf(e, t, r, n) { var i = r.length, s = i, a = !n; if (e == null) return !s; @@ -3820,69 +3830,69 @@ function hf(e, t, r, n) { if (u === void 0 && !(l in e)) return !1; } else { - var m = new Se(); + var v = new Se(); if (n) - var g = n(u, c, l, e, t, m); - if (!(g === void 0 ? ir(c, u, ff | pf, n, m) : g)) + var g = n(u, c, l, e, t, v); + if (!(g === void 0 ? ir(c, u, hf | mf, n, v) : g)) return !1; } } return !0; } -function fs(e) { +function ps(e) { return e === e && !J(e); } -function mf(e) { +function gf(e) { for (var t = Wt(e), r = t.length; r--; ) { var n = t[r], i = e[n]; - t[r] = [n, i, fs(i)]; + t[r] = [n, i, ps(i)]; } return t; } -function ps(e, t) { +function hs(e, t) { return function(r) { return r == null ? !1 : r[e] === t && (t !== void 0 || e in Object(r)); }; } -function vf(e) { - var t = mf(e); - return t.length == 1 && t[0][2] ? ps(t[0][0], t[0][1]) : function(r) { - return r === e || hf(r, e, t); +function yf(e) { + var t = gf(e); + return t.length == 1 && t[0][2] ? hs(t[0][0], t[0][1]) : function(r) { + return r === e || vf(r, e, t); }; } -function gf(e, t) { +function bf(e, t) { return e != null && t in Object(e); } -function yf(e, t) { - return e != null && Fi(e, t, gf); +function wf(e, t) { + return e != null && ki(e, t, bf); } -var bf = 1, wf = 2; -function Sf(e, t) { - return zr(e) && fs(t) ? ps($t(e), t) : function(r) { +var Sf = 1, Of = 2; +function $f(e, t) { + return Xr(e) && ps(t) ? hs($t(e), t) : function(r) { var n = be(r, e); - return n === void 0 && n === t ? yf(r, e) : ir(t, n, bf | wf); + return n === void 0 && n === t ? wf(r, e) : ir(t, n, Sf | Of); }; } -function Of(e) { +function Ef(e) { return function(t) { return t == null ? void 0 : t[e]; }; } -function $f(e) { +function Tf(e) { return function(t) { - return Zi(t, e); + return es(t, e); }; } -function Ef(e) { - return zr(e) ? Of($t(e)) : $f(e); +function xf(e) { + return Xr(e) ? Ef($t(e)) : Tf(e); } function _t(e) { - return typeof e == "function" ? e : e == null ? hi : typeof e == "object" ? R(e) ? Sf(e[0], e[1]) : vf(e) : Ef(e); + return typeof e == "function" ? e : e == null ? vi : typeof e == "object" ? M(e) ? $f(e[0], e[1]) : yf(e) : xf(e); } -function Tf(e) { +function _f(e) { return function(t, r, n) { var i = Object(t); - if (!Ht(t)) { + if (!Ut(t)) { var s = _t(r); t = Wt(t), r = function(o) { return s(i[o], o, i); @@ -3892,36 +3902,36 @@ function Tf(e) { return a > -1 ? i[s ? t[a] : a] : void 0; }; } -function xf(e, t, r, n) { +function If(e, t, r, n) { for (var i = e.length, s = r + (n ? 1 : -1); n ? s-- : ++s < i; ) if (t(e[s], s, e)) return s; return -1; } -var ti = 1 / 0, _f = 17976931348623157e292; -function Af(e) { +var ni = 1 / 0, Af = 17976931348623157e292; +function Pf(e) { if (!e) return e === 0 ? e : 0; - if (e = Tr(e), e === ti || e === -ti) { + if (e = Tr(e), e === ni || e === -ni) { var t = e < 0 ? -1 : 1; - return t * _f; + return t * Af; } return e === e ? e : 0; } -function un(e) { - var t = Af(e), r = t % 1; +function dn(e) { + var t = Pf(e), r = t % 1; return t === t ? r ? t - r : t : 0; } -var If = Math.max; -function Pf(e, t, r) { +var qf = Math.max; +function Cf(e, t, r) { var n = e == null ? 0 : e.length; if (!n) return -1; - var i = r == null ? 0 : un(r); - return i < 0 && (i = If(n + i, 0)), xf(e, _t(t), i); + var i = r == null ? 0 : dn(r); + return i < 0 && (i = qf(n + i, 0)), If(e, _t(t), i); } -var qf = Tf(Pf); -const cn = qf, Cf = { +var Ff = _f(Cf); +const fn = Ff, kf = { props: { form: { type: Object, @@ -4054,7 +4064,7 @@ const cn = qf, Cf = { * This extracts the encrypted string from the backend data. */ extractMetadataFromExistingFile(e) { - return e ? se(e) ? e : R(e) ? e.map(this.extractMetadataFromExistingFile) : J(e) ? e.options.metadata.metadata : null : null; + return e ? se(e) ? e : M(e) ? e.map(this.extractMetadataFromExistingFile) : J(e) ? e.options.metadata.metadata : null : null; }, /** * This sets the existing files on the form. @@ -4131,8 +4141,8 @@ const cn = qf, Cf = { cancelToken: g.token, responseType: "blob" }).then((f) => { - const p = new File([f.data], a.name, { type: a.type }); - o(p); + const h = new File([f.data], a.name, { type: a.type }); + o(h); }).catch(function(f) { axios.isCancel(f) || l(f); }), { @@ -4141,17 +4151,17 @@ const cn = qf, Cf = { } }; } - }, this.server && (s.server.process = (a, o, l, u, c, m, g) => { + }, this.server && (s.server.process = (a, o, l, u, c, v, g) => { const f = new FormData(); f.append("file", o, o.name); - const h = ne.CancelToken.source(); + const m = ne.CancelToken.source(); ne({ url: r.server, method: "POST", data: f, - cancelToken: h.token, + cancelToken: m.token, onUploadProgress: (d) => { - m(d.lengthComputable, d.loaded, d.total); + v(d.lengthComputable, d.loaded, d.total); } }).then((d) => { d.status >= 200 && d.status < 300 ? u(d.data) : c(d.statusText); @@ -4177,7 +4187,7 @@ const cn = qf, Cf = { }); }, removeFile(e) { - this.server && (e = cn(this.uploadedFiles, (t) => t.file === e).serverId), this.form.$put(this.field, this.multiple ? this.form[this.field].filter((t) => t !== e) : null); + this.server && (e = fn(this.uploadedFiles, (t) => t.file === e).serverId), this.form.$put(this.field, this.multiple ? this.form[this.field].filter((t) => t !== e) : null); }, addFiles(e) { if (this.multiple) { @@ -4202,20 +4212,20 @@ const cn = qf, Cf = { this.addFiles(t); } } -}, Ff = { ref: "file" }; -function kf(e, t, r, n, i, s) { - return j(), ce("div", Ff, [ +}, Lf = { ref: "file" }; +function Rf(e, t, r, n, i, s) { + return B(), ce("div", Lf, [ K(e.$slots, "default", { handleFileInput: s.handleFileInput, filenames: i.filenames }) ], 512); } -const Lf = /* @__PURE__ */ _e(Cf, [["render", kf]]), Bf = { +const Bf = /* @__PURE__ */ _e(kf, [["render", Rf]]), jf = { inject: ["stack"], computed: { values() { - return v.flashData(this.stack); + return p.flashData(this.stack); } }, render() { @@ -4228,18 +4238,18 @@ const Lf = /* @__PURE__ */ _e(Cf, [["render", kf]]), Bf = { }); } }; -function dn(e, t, r) { +function pn(e, t, r) { e = e || {}, t = t || new FormData(), r = r || null; for (const n in e) - Object.prototype.hasOwnProperty.call(e, n) && ms(t, hs(r, n), e[n]); + Object.prototype.hasOwnProperty.call(e, n) && vs(t, ms(r, n), e[n]); return t; } -function hs(e, t) { +function ms(e, t) { return e ? e + "[" + t + "]" : t; } -function ms(e, t, r) { +function vs(e, t, r) { if (Array.isArray(r)) - return Array.from(r.keys()).forEach((n) => ms(e, hs(t, n.toString()), r[n])); + return Array.from(r.keys()).forEach((n) => vs(e, ms(t, n.toString()), r[n])); if (r instanceof Date) return e.append(t, r.toISOString()); if (r instanceof File) @@ -4254,25 +4264,25 @@ function ms(e, t, r) { return e.append(t, `${r}`); if (r == null) return e.append(t, ""); - dn(r, e, t); + pn(r, e, t); } -var jf = "[object Boolean]"; -function vs(e) { - return e === !0 || e === !1 || Le(e) && je(e) == jf; +var Mf = "[object Boolean]"; +function gs(e) { + return e === !0 || e === !1 || Le(e) && Be(e) == Mf; } -function gs(e, t) { +function ys(e, t) { var r = {}; - return t = _t(t), Mr(e, function(n, i, s) { - es(r, i, t(n, i, s)); + return t = _t(t), jr(e, function(n, i, s) { + ts(r, i, t(n, i, s)); }), r; } -function ys(e, t, r) { +function bs(e, t, r) { return e === e && (r !== void 0 && (e = e <= r ? e : r), t !== void 0 && (e = e >= t ? e : t)), e; } function et(e, t, r) { - return e = Kr(e), r = r == null ? 0 : ys(un(r), 0, e.length), t = Qt(t), e.slice(r, r + t.length) == t; + return e = Qr(e), r = r == null ? 0 : bs(dn(r), 0, e.length), t = Qt(t), e.slice(r, r + t.length) == t; } -const Mf = { +const Df = { inject: ["stack"], props: { spladeId: { @@ -4284,7 +4294,7 @@ const Mf = { type: String, required: !1, default() { - return v.isSsr ? "" : location.href; + return p.isSsr ? "" : location.href; } }, method: { @@ -4431,13 +4441,13 @@ const Mf = { * instances based on the current stack. */ rawErrors() { - return v.validationErrors(this.stack); + return p.validationErrors(this.stack); }, /* * Flattens the raw errors. */ errors() { - return gs(this.rawErrors, (e) => e.join(` + return ys(this.rawErrors, (e) => e.join(` `)); } }, @@ -4458,7 +4468,7 @@ const Mf = { i ? n = i.type === "checkbox" ? !1 : "" : e.querySelector(`[name="${r}[]"]`) ? n = [] : (e.querySelector(`[name^="${r}."]`) || e.querySelector(`[name^="${r}["]`)) && (n = {}), this.$put(r, n); }), this.missingAttributes = [], this.submitOnChange === !0 ? this.$watch("values", () => { this.background && (this.processingInBackground = !0), this.$nextTick(() => this.debounce ? this.debounceFunction() : this.request(this.background)); - }, { deep: !0 }) : R(this.submitOnChange) && this.submitOnChange.forEach((r) => { + }, { deep: !0 }) : M(this.submitOnChange) && this.submitOnChange.forEach((r) => { this.$watch(`values.${r}`, () => { this.background && (this.processingInBackground = !0), this.$nextTick(() => this.debounce ? this.debounceFunction() : this.request(this.background)); }, { deep: !0 }); @@ -4547,8 +4557,8 @@ const Mf = { } if (!this.confirm) return this.request(); - v.confirm( - vs(this.confirm) ? "" : this.confirm, + p.confirm( + gs(this.confirm) ? "" : this.confirm, this.confirmText, this.confirmButton, this.cancelButton, @@ -4577,8 +4587,8 @@ const Mf = { return; } await this.$nextTick(), this.background ? this.processingInBackground = !0 : this.processing = !0, this.response = null, this.wasSuccessful = !1, this.recentlySuccessful = !1, clearTimeout(this.recentlySuccessfulTimeoutId), this.wasUnsuccessful = !1, this.recentlyUnsuccessful = !1, clearTimeout(this.recentlyUnsuccessfulTimeoutId); - const t = this.values instanceof FormData ? this.values : dn(this.values), r = {}; - this.acceptHeader && (r.Accept = this.acceptHeader), (this.stay || e) && (r["X-Splade-Prevent-Refresh"] = !0), this.preserveScroll && (r["X-Splade-Preserve-Scroll"] = !0), this.stack > 0 && this.keepModal && (r["X-Splade-Modal"] = v.stackType(this.stack), r["X-Splade-Modal-Target"] = this.stack); + const t = this.values instanceof FormData ? this.values : pn(this.values), r = {}; + this.acceptHeader && (r.Accept = this.acceptHeader), (this.stay || e) && (r["X-Splade-Prevent-Refresh"] = !0), this.preserveScroll && (r["X-Splade-Preserve-Scroll"] = !0), this.stack > 0 && this.keepModal && (r["X-Splade-Modal"] = p.stackType(this.stack), r["X-Splade-Modal-Target"] = this.stack); let n = this.method.toUpperCase(); n !== "GET" && n !== "POST" && (t.append("_method", n), n = "POST"); const i = (s) => { @@ -4586,11 +4596,11 @@ const Mf = { }; if (this.action === "#") return i(Object.fromEntries(t)); - v.request(this.action, n, t, { ...r, ...this.headers }, !1, this.blob).then(i).catch(async (s) => { + p.request(this.action, n, t, { ...r, ...this.headers }, !1, this.blob).then(i).catch(async (s) => { if (this.processing = !1, this.processingInBackground = !1, this.wasUnsuccessful = !0, this.recentlyUnsuccessful = !0, this.recentlyUnsuccessfulTimeoutId = setTimeout(() => this.recentlyUnsuccessful = !1, 2e3), this.$emit("error", s), !this.scrollOnError) return; await this.$nextTick(); - const a = cn(Object.keys(this.errors), (o) => this.formElement.querySelector(`[data-validation-key="${o}"]`)); + const a = fn(Object.keys(this.errors), (o) => this.formElement.querySelector(`[data-validation-key="${o}"]`)); a && this.focusAndScrollToElement( this.formElement.querySelector(`[data-validation-key="${a}"]`) ); @@ -4642,7 +4652,7 @@ const Mf = { ) ); } -}, Rf = { +}, Nf = { props: { flatpickr: { type: [Boolean, Object], @@ -4702,13 +4712,13 @@ const Mf = { }); } } -}, Df = { ref: "input" }; -function Nf(e, t, r, n, i, s) { - return j(), ce("div", Df, [ +}, Vf = { ref: "input" }; +function Hf(e, t, r, n, i, s) { + return B(), ce("div", Vf, [ K(e.$slots, "default", { disabled: i.disabled }) ], 512); } -const Vf = /* @__PURE__ */ _e(Rf, [["render", Nf]]), Uf = { +const Uf = /* @__PURE__ */ _e(Nf, [["render", Hf]]), Wf = { props: { options: { type: Object, @@ -4748,13 +4758,13 @@ const Vf = /* @__PURE__ */ _e(Rf, [["render", Nf]]), Uf = { beforeUnmount() { this.instance.destruct(); } -}, Hf = { ref: "jodit" }; -function Wf(e, t, r, n, i, s) { - return j(), ce("div", Hf, [ +}, zf = { ref: "jodit" }; +function Gf(e, t, r, n, i, s) { + return B(), ce("div", zf, [ K(e.$slots, "default") ], 512); } -const zf = /* @__PURE__ */ _e(Uf, [["render", Wf]]), Gf = { +const Xf = /* @__PURE__ */ _e(Wf, [["render", Gf]]), Kf = { components: { Render: ue }, props: { name: { @@ -4765,7 +4775,7 @@ const zf = /* @__PURE__ */ _e(Uf, [["render", Wf]]), Gf = { type: String, required: !1, default() { - return v.isSsr ? "" : window.location.href; + return p.isSsr ? "" : window.location.href; } }, show: { @@ -4797,21 +4807,21 @@ const zf = /* @__PURE__ */ _e(Uf, [["render", Wf]]), Gf = { }, methods: { async request() { - this.html = null, v.lazy(this.url, this.name).then((e) => { + this.html = null, p.lazy(this.url, this.name).then((e) => { this.html = e.data.html, this.$emit("loaded"); }); } } }; -function Xf(e, t, r, n, i, s) { +function Jf(e, t, r, n, i, s) { const a = Lr("Render"); - return i.html ? (j(), X(a, { + return i.html ? (B(), X(a, { key: 0, html: i.html, passthrough: r.passthrough }, null, 8, ["html", "passthrough"])) : r.show ? K(e.$slots, "default", { key: 1 }) : Fr("", !0); } -const Kf = /* @__PURE__ */ _e(Gf, [["render", Xf]]), Jf = ["href", "onClick"], Qf = { +const Qf = /* @__PURE__ */ _e(Kf, [["render", Jf]]), Yf = ["href", "onClick"], Zf = { __name: "Link", props: { href: { @@ -4905,8 +4915,8 @@ const Kf = /* @__PURE__ */ _e(Gf, [["render", Xf]]), Jf = ["href", "onClick"], Q function i() { if (n.value = null, !t.confirm) return s(); - v.confirm( - vs(t.confirm) ? "" : t.confirm, + p.confirm( + gs(t.confirm) ? "" : t.confirm, t.confirmText, t.confirmButton, t.cancelButton, @@ -4927,11 +4937,11 @@ const Kf = /* @__PURE__ */ _e(Gf, [["render", Xf]]), Jf = ["href", "onClick"], Q return window.location = t.href; const o = r > 0 && t.keepModal; if (t.modal && !o) - return v.modal(t.href); + return p.modal(t.href); if (t.slideover && !o) - return v.slideover(t.href); + return p.slideover(t.href); if (et(t.href, "#")) { - if (v.openPreloadedModal(t.href.substring(1))) + if (p.openPreloadedModal(t.href.substring(1))) return; console.log("No preloaded modal found for " + t.href); } @@ -4939,19 +4949,19 @@ const Kf = /* @__PURE__ */ _e(Gf, [["render", Xf]]), Jf = ["href", "onClick"], Q const u = { ...t.headers }; - if (o && (u["X-Splade-Modal"] = v.stackType(r), u["X-Splade-Modal-Target"] = r), t.preserveScroll && (u["X-Splade-Preserve-Scroll"] = !0), l === "GET") - return t.replace ? v.replace(t.href, u) : v.visit(t.href, u); - const c = t.data instanceof FormData ? t.data : dn(t.data); - l !== "POST" && (c.append("_method", l), l = "POST"), n.value && (c.append(se(t.requirePassword) && t.requirePassword ? t.requirePassword : "password", n.value), n.value = null), v.request(t.href, l, c, u, t.replace); + if (o && (u["X-Splade-Modal"] = p.stackType(r), u["X-Splade-Modal-Target"] = r), t.preserveScroll && (u["X-Splade-Preserve-Scroll"] = !0), l === "GET") + return t.replace ? p.replace(t.href, u) : p.visit(t.href, u); + const c = t.data instanceof FormData ? t.data : pn(t.data); + l !== "POST" && (c.append("_method", l), l = "POST"), n.value && (c.append(se(t.requirePassword) && t.requirePassword ? t.requirePassword : "password", n.value), n.value = null), p.request(t.href, l, c, u, t.replace); } - return (a, o) => (j(), ce("a", { + return (a, o) => (B(), ce("a", { href: e.href, - onClick: Fs(i, ["prevent"]) + onClick: ks(i, ["exact", "prevent"]) }, [ K(a.$slots, "default") - ], 8, Jf)); + ], 8, Yf)); } -}, Yf = { +}, ep = { provide() { return { stack: this.stack @@ -5032,13 +5042,13 @@ const Kf = /* @__PURE__ */ _e(Gf, [["render", Xf]]), Jf = ["href", "onClick"], Q animate: this.staticAnimate, position: this.position, // These HeadlessUI exports will be removed in v1.0 - Dialog: Yr, - DialogPanel: Zr, + Dialog: en, + DialogPanel: tn, TransitionRoot: ut, TransitionChild: lt }); } -}, Zf = { +}, tp = { __name: "PreloadedModal", props: { name: { @@ -5062,10 +5072,10 @@ const Kf = /* @__PURE__ */ _e(Gf, [["render", Xf]]), Jf = ["href", "onClick"], Q }, setup(e) { const t = e; - return v.registerPreloadedModal(t.name, t.html, t.type), t.opened && v.openPreloadedModal(t.name), () => { + return p.registerPreloadedModal(t.name, t.html, t.type), t.opened && p.openPreloadedModal(t.name), () => { }; } -}, ep = { +}, rp = { components: { Render: ue }, props: { name: { @@ -5080,7 +5090,7 @@ const Kf = /* @__PURE__ */ _e(Gf, [["render", Xf]]), Jf = ["href", "onClick"], Q type: String, required: !1, default() { - return v.isSsr ? "" : window.location.href; + return p.isSsr ? "" : window.location.href; } }, poll: { @@ -5112,7 +5122,7 @@ const Kf = /* @__PURE__ */ _e(Gf, [["render", Xf]]), Jf = ["href", "onClick"], Q }, methods: { async request() { - this.loading = !0, v.rehydrate(this.url, this.name).then((e) => { + this.loading = !0, p.rehydrate(this.url, this.name).then((e) => { this.html = e.data.html, this.loading = !1, this.$emit("loaded"), this.poll && setTimeout(() => { this.request(); }, this.poll); @@ -5120,15 +5130,15 @@ const Kf = /* @__PURE__ */ _e(Gf, [["render", Xf]]), Jf = ["href", "onClick"], Q } } }; -function tp(e, t, r, n, i, s) { +function np(e, t, r, n, i, s) { const a = Lr("Render"); - return i.html ? (j(), X(a, { + return i.html ? (B(), X(a, { key: 0, html: i.html, passthrough: r.passthrough }, null, 8, ["html", "passthrough"])) : i.loading ? K(e.$slots, "placeholder", { key: 1 }) : K(e.$slots, "default", { key: 2 }); } -const rp = /* @__PURE__ */ _e(ep, [["render", tp]]), np = { +const ip = /* @__PURE__ */ _e(rp, [["render", np]]), sp = { props: { script: { type: String, @@ -5143,17 +5153,17 @@ const rp = /* @__PURE__ */ _e(ep, [["render", tp]]), np = { return ""; } }; -function ip(e, t) { - var r = -1, n = Ht(e) ? Array(e.length) : []; - return Rr(e, function(i, s, a) { +function ap(e, t) { + var r = -1, n = Ut(e) ? Array(e.length) : []; + return Mr(e, function(i, s, a) { n[++r] = t(i, s, a); }), n; } -function bs(e, t) { - var r = R(e) ? Ci : ip; +function ws(e, t) { + var r = M(e) ? Fi : ap; return r(e, _t(t)); } -const sp = { +const op = { inject: ["stack"], props: { choices: { @@ -5242,7 +5252,7 @@ const sp = { * section, apply it to the Choices instance. */ modelValue(e, t) { - if (!this.choicesInstance && this.multiple && R(e)) { + if (!this.choicesInstance && this.multiple && M(e)) { const r = e.filter((n) => n !== "" && n !== null && n !== void 0); if (JSON.stringify(r) != JSON.stringify(e)) { this.$emit("update:modelValue", r); @@ -5331,7 +5341,7 @@ const sp = { * Transforms the options from the remote URL into an array of objects. */ normalizeOptions(e, t) { - const r = R(e); + const r = M(e); if (!r && J(e)) if (this.optionValue && this.optionLabel) { let n = be(e, this.optionValue); @@ -5353,14 +5363,14 @@ const sp = { * Set the given value on the Choices.js instance. */ setValueOnChoices(e) { - Array.isArray(e) && (e = bs(e, (t) => `${t}`), this.choicesInstance.removeActiveItems()), e == null ? e = "" : Array.isArray(e) || (e = `${e}`), this.choicesInstance.setChoiceByValue(e), this.updateHasSelectionAttribute(), this.handlePlaceholderVisibility(); + Array.isArray(e) && (e = ws(e, (t) => `${t}`), this.choicesInstance.removeActiveItems()), e == null ? e = "" : Array.isArray(e) || (e = `${e}`), this.choicesInstance.setChoiceByValue(e), this.updateHasSelectionAttribute(), this.handlePlaceholderVisibility(); }, /* * Returns the internal Choices.js item that is currently selected. */ getItemOfCurrentModel() { const e = this.modelValue; - return cn(this.choicesInstance._store.choices, (t) => t.value == e); + return fn(this.choicesInstance._store.choices, (t) => t.value == e); }, /* * This method handles the visibility of the placeholder @@ -5427,16 +5437,16 @@ const sp = { ); } } -}, ap = { ref: "select" }; -function op(e, t, r, n, i, s) { - return j(), ce("div", ap, [ +}, lp = { ref: "select" }; +function up(e, t, r, n, i, s) { + return B(), ce("div", lp, [ K(e.$slots, "default", { loading: i.loading }) ], 512); } -const lp = /* @__PURE__ */ _e(sp, [["render", op]]), up = { +const cp = /* @__PURE__ */ _e(op, [["render", up]]), dp = { inject: ["stack"], render() { - const e = v.validationErrors(this.stack), t = v.flashData(this.stack), r = v.sharedData.value, n = gs(e, (i) => i.join(` + const e = p.validationErrors(this.stack), t = p.flashData(this.stack), r = p.sharedData.value, n = ys(e, (i) => i.join(` `)); return this.$slots.default({ flash: t, @@ -5456,29 +5466,33 @@ const lp = /* @__PURE__ */ _e(sp, [["render", op]]), up = { }); } }; -function cp(e, t, r) { - e = Kr(e), t = Qt(t); +function fp(e, t, r) { + e = Qr(e), t = Qt(t); var n = e.length; - r = r === void 0 ? n : ys(un(r), 0, n); + r = r === void 0 ? n : bs(dn(r), 0, n); var i = r; return r -= t.length, r >= 0 && e.slice(r, i) == t; } -function dp(e, t) { +function pp(e, t) { var r = []; - return Rr(e, function(n, i, s) { + return Mr(e, function(n, i, s) { t(n, i, s) && r.push(n); }), r; } -function fp(e, t) { - var r = R(e) ? ds : dp; +function hp(e, t) { + var r = M(e) ? fs : pp; return r(e, _t(t)); } -function ri(e, t) { +function ii(e, t) { return ir(e, t); } -const pp = { +const mp = { inject: ["stack"], props: { + spladeId: { + type: String, + required: !0 + }, baseUrl: { type: String, required: !1, @@ -5513,6 +5527,11 @@ const pp = { type: Number, required: !1, default: 0 + }, + paginationScroll: { + type: String, + required: !1, + default: "top" } }, data() { @@ -5531,7 +5550,7 @@ const pp = { * differ from the default set of visible columns. */ columnsAreToggled() { - return !ri(this.visibleColumns, this.defaultVisibleToggleableColumns); + return !ii(this.visibleColumns, this.defaultVisibleToggleableColumns); }, /* * Returns a boolean whether there are Search Inputs visible @@ -5553,6 +5572,9 @@ const pp = { totalSelectedItems() { const e = this.selectedItems.length; return e === 1 && this.selectedItems[0] === "*" ? this.itemsOnAllPages : e; + }, + scrollToHeadRememberKey() { + return `spladeTableScrollToHead-${this.spladeId}`; } }, created() { @@ -5567,13 +5589,29 @@ const pp = { const i = n.split("["), s = i[1].substring(0, i[1].length - 1); this.forcedVisibleSearchInputs = [...this.forcedVisibleSearchInputs, s]; } - }), t.length === 0 ? this.visibleColumns = this.defaultVisibleToggleableColumns : this.visibleColumns = t; + }), t.length === 0 ? this.visibleColumns = this.defaultVisibleToggleableColumns : this.visibleColumns = t, p.restore(this.scrollToHeadRememberKey) && this.$nextTick(() => { + document.querySelector(`div[data-splade-id="${this.spladeId}"]`).scrollIntoView({ + behavior: "smooth", + block: "start", + inline: "nearest" + }); + }), p.forget(this.scrollToHeadRememberKey); }, methods: { + navigate(e, t) { + const r = { + "X-Splade-Modal": p.stackType(this.stack), + "X-Splade-Modal-Target": this.stack, + "X-Splade-Prevent-View-Transition": !0 + }; + (this.paginationScroll !== "top" || !t) && (r["X-Splade-Preserve-Scroll"] = !0), p.request(e, "GET", {}, r, !1).then(() => { + !p.isSsr && this.paginationScroll === "head" && t && p.remember(this.scrollToHeadRememberKey, !0); + }); + }, visitLink(e, t, r) { var n, i; if (!(((n = r == null ? void 0 : r.target) == null ? void 0 : n.tagName) === "A" || ((i = r == null ? void 0 : r.target) == null ? void 0 : i.tagName) === "BUTTON")) - return t === "modal" ? v.modal(e) : t === "slideover" ? v.slideover(e) : v.visit(e); + return t === "modal" ? p.modal(e) : t === "slideover" ? p.slideover(e) : p.visit(e); }, /** * Resets the table to its initial state. @@ -5595,9 +5633,9 @@ const pp = { * Toggles the column key. */ toggleColumn(e) { - const t = !this.columnIsVisible(e), r = fp(this.columns, (i) => i.can_be_hidden ? i.key === e ? t : this.visibleColumns.includes(i.key) : !0); - let n = bs(r, (i) => i.key).sort(); - ri(n, this.defaultVisibleToggleableColumns) && (n = []), this.visibleColumns = n.length === 0 ? this.defaultVisibleToggleableColumns : n, this.updateQuery("columns", n, null, !1); + const t = !this.columnIsVisible(e), r = hp(this.columns, (i) => i.can_be_hidden ? i.key === e ? t : this.visibleColumns.includes(i.key) : !0); + let n = ws(r, (i) => i.key).sort(); + ii(n, this.defaultVisibleToggleableColumns) && (n = []), this.visibleColumns = n.length === 0 ? this.defaultVisibleToggleableColumns : n, this.updateQuery("columns", n, null, !1); }, /** * Removes the key from being forcefully visible, and sets the value to null. @@ -5630,12 +5668,12 @@ const pp = { return e.substring(1).split("&").forEach((r) => { const n = decodeURIComponent(r).split("="); let i = n[0]; - if (!cp(i, "]")) { + if (!fp(i, "]")) { t[i] = n[1]; return; } const s = i.split("["), a = s[1].substring(0, s[1].length - 1); - parseInt(a) == a ? (i = s[0], R(t[i]) || (t[i] = []), t[i].push(n[1])) : t[i] = n[1]; + parseInt(a) == a ? (i = s[0], M(t[i]) || (t[i] = []), t[i].push(n[1])) : t[i] = n[1]; }), t; }, /* @@ -5651,12 +5689,12 @@ const pp = { typeof r > "u" && (r = !0); let n = {}; te(e, (u, c) => { - if (!R(u)) { + if (!M(u)) { n[c] = u; return; } - u.length !== 0 && u.forEach((m, g) => { - n[`${c}[${g}]`] = m; + u.length !== 0 && u.forEach((v, g) => { + n[`${c}[${g}]`] = v; }); }); let i = ""; @@ -5665,15 +5703,15 @@ const pp = { }), i && (i = "?" + i); const s = this.baseUrl + i; if (!r) - return this.stack > 0 ? void 0 : v.replaceUrlOfCurrentPage(s); + return this.stack > 0 ? void 0 : p.replaceUrlOfCurrentPage(s); this.isLoading = !0; let a = null; typeof t < "u" && t && (a = (l = document.querySelector(`[name="${t.name}"]`)) == null ? void 0 : l.value); const o = this.stack > 0 ? { - "X-Splade-Modal": v.stackType(this.stack), + "X-Splade-Modal": p.stackType(this.stack), "X-Splade-Modal-Target": this.stack } : {}; - v.replace(s, o).then(() => { + p.replace(s, o).then(() => { this.isLoading = !1, typeof t < "u" && t && Oe(() => { const u = document.querySelector(`[name="${t.name}"]`); u.focus(), a && (u.value = a); @@ -5685,7 +5723,7 @@ const pp = { let a = null; if (t) try { - a = await v.confirm(t === !0 ? "" : t, r, n, i, !!s); + a = await p.confirm(t === !0 ? "" : t, r, n, i, !!s); } catch { return !1; } @@ -5695,14 +5733,14 @@ const pp = { const l = se(s) && s ? s : "password"; o[l] = a; } - v.request(e, "POST", o, {}, !1).then((l) => { + p.request(e, "POST", o, {}, !1).then((l) => { l.data; }).catch(() => { this.isLoading = !1; }); }, setSelectedItems(e) { - this.selectedItems = R(e) ? e : []; + this.selectedItems = M(e) ? e : []; }, itemIsSelected(e) { return this.selectedItems.length == 1 && this.selectedItems[0] == "*" ? !0 : this.selectedItems.includes(e); @@ -5724,6 +5762,7 @@ const pp = { striped: this.striped, toggleColumn: this.toggleColumn, updateQuery: this.updateQuery, + navigate: this.navigate, visit: this.visitLink, totalSelectedItems: this.totalSelectedItems, allItemsFromAllPagesAreSelected: this.allItemsFromAllPagesAreSelected, @@ -5737,12 +5776,12 @@ const pp = { isLoading: this.isLoading }); } -}, hp = { +}, vp = { inheritAttrs: !1, data() { return { isMounted: !1, - Teleport: ii + Teleport: ai }; }, /* @@ -5753,9 +5792,9 @@ const pp = { this.isMounted = !0; } }; -function mp(e, t, r, n, i, s) { - return ks((j(), X(Ls(i.isMounted ? i.Teleport : "div"), Bs(js(e.$attrs)), { - default: si(() => [ +function gp(e, t, r, n, i, s) { + return Ls((B(), X(Rs(i.isMounted ? i.Teleport : "div"), Bs(js(e.$attrs)), { + default: oi(() => [ K(e.$slots, "default") ]), _: 3 @@ -5763,7 +5802,7 @@ function mp(e, t, r, n, i, s) { [Ms, i.isMounted] ]); } -const vp = /* @__PURE__ */ _e(hp, [["render", mp]]), gp = { +const yp = /* @__PURE__ */ _e(vp, [["render", gp]]), bp = { props: { autosize: { type: Boolean, @@ -5801,13 +5840,13 @@ const vp = /* @__PURE__ */ _e(hp, [["render", mp]]), gp = { e.default.destroy(this.element); }); } -}, yp = { ref: "textarea" }; -function bp(e, t, r, n, i, s) { - return j(), ce("div", yp, [ +}, wp = { ref: "textarea" }; +function Sp(e, t, r, n, i, s) { + return B(), ce("div", wp, [ K(e.$slots, "default") ], 512); } -const wp = /* @__PURE__ */ _e(gp, [["render", bp]]), Sp = { +const Op = /* @__PURE__ */ _e(bp, [["render", Sp]]), $p = { props: { toastKey: { type: Number, @@ -5849,7 +5888,7 @@ const wp = /* @__PURE__ */ _e(gp, [["render", bp]]), Sp = { TransitionChild: lt }); } -}, Op = [ +}, Ep = [ "left-top", "center-top", "right-top", @@ -5859,29 +5898,29 @@ const wp = /* @__PURE__ */ _e(gp, [["render", bp]]), Sp = { "left-bottom", "center-bottom", "right-bottom" -], $p = { +], Tp = { computed: { /* * Retrieves the toasts from the Splade instance. */ toasts: function() { - return v.toastsReversed.value; + return p.toastsReversed.value; }, /* * Determine whether a backdrop should be shown. */ hasBackdrop: function() { - return v.toasts.value.filter((e) => !e.dismissed && e.backdrop && e.html).length > 0; + return p.toasts.value.filter((e) => !e.dismissed && e.backdrop && e.html).length > 0; } }, methods: { dismissToast(e) { - v.dismissToast(e); + p.dismissToast(e); } }, render() { return this.$slots.default({ - positions: Op, + positions: Ep, toasts: this.toasts, dismissToast: this.dismissToast, hasBackdrop: this.hasBackdrop, @@ -5891,7 +5930,7 @@ const wp = /* @__PURE__ */ _e(gp, [["render", bp]]), Sp = { TransitionChild: lt }); } -}, Ep = { +}, xp = { props: { default: { type: Object, @@ -5925,7 +5964,7 @@ const wp = /* @__PURE__ */ _e(gp, [["render", bp]]), Sp = { }, get(t, r) { const n = Object.keys(e.toggles); - if (n.length === 1 && us(n) === "default") { + if (n.length === 1 && cs(n) === "default") { if (r === "toggled") return e.toggled("default"); if (r === "setToggle") @@ -5947,14 +5986,14 @@ const wp = /* @__PURE__ */ _e(gp, [["render", bp]]), Sp = { ) ); } -}, Tp = { +}, _p = { render() { return this.$slots.default({ TransitionRoot: ut, TransitionChild: lt }); } -}, xp = { +}, Ip = { props: { backendRoute: { type: String, @@ -6024,27 +6063,27 @@ const wp = /* @__PURE__ */ _e(gp, [["render", bp]]), Sp = { Accept: "text/html, application/xhtml+xml" } }), this.$emit("success", i.data); } catch (s) { - this.$emit("error", s.response.data), v.onServerError(s.response.data); + this.$emit("error", s.response.data), p.onServerError(s.response.data); return; } return this.instance = i.data.instance, this.signature = i.data.signature, te(i.data.data, (s, a) => { St(this.values, a, s); - }), i.data.redirect ? v.visit(i.data.redirect) : (i.data.toasts.forEach((s) => { - v.pushToast(s); + }), i.data.redirect ? p.visit(i.data.redirect) : (i.data.toasts.forEach((s) => { + p.pushToast(s); }), i.data.result); }; }), this.$slots.default(t); } -}, _p = { +}, Ap = { created: (e, t) => { - if (v.isSsr) + if (p.isSsr) return; - const r = `preserveScroll-${t.arg}`, n = v.restore(r); + const r = `preserveScroll-${t.arg}`, n = p.restore(r); n && Oe(() => { typeof e.scrollTo == "function" ? e.scrollTo(n.left, n.top) : (e.scrollTop = n.top, e.scrollLeft = n.left); }); const i = function() { - v.remember(r, { + p.remember(r, { top: e.scrollTop, left: e.scrollLeft }); @@ -6153,7 +6192,7 @@ const wp = /* @__PURE__ */ _e(gp, [["render", bp]]), Sp = { document.addEventListener("splade:internal:request-progress", (s) => t.progress(s, r.default)), document.addEventListener("splade:internal:request-response", (s) => i(s)), document.addEventListener("splade:internal:request-error", (s) => i(s)), r.default.configure({ showSpinner: e.spinner }), e.css && this.injectCSS(e.color); }); } -}, qp = { +}, Fp = { /** * Registers all Splade components and makes the configured * options and the Splade core globally available. @@ -6161,7 +6200,7 @@ const wp = /* @__PURE__ */ _e(gp, [["render", bp]]), Sp = { install: (e, t) => { t = t || {}, t.max_keep_alive = W(t, "max_keep_alive") ? t.max_keep_alive : 10, t.prefix = W(t, "prefix") ? t.prefix : "Splade", t.transform_anchors = W(t, "transform_anchors") ? t.transform_anchors : !1, t.link_component = W(t, "link_component") ? t.link_component : "Link", t.progress_bar = W(t, "progress_bar") ? t.progress_bar : !1, t.components = W(t, "components") ? t.components : {}, t.view_transitions = W(t, "view_transitions") ? t.view_transitions : !1, t.suppress_compile_errors = W(t, "suppress_compile_errors") ? t.suppress_compile_errors : !1; const r = t.prefix; - if (e.component(`${r}Button`, Vl).component(`${r}Confirm`, Lu).component(`${r}DataStores`, Vu).component(`${r}Data`, Nu).component(`${r}Defer`, tc).component(`${r}Dialog`, rc).component(`${r}Dropdown`, od).component(`${r}DynamicHtml`, ld).component(`${r}Errors`, ud).component(`${r}Event`, cd).component(`${r}File`, Lf).component(`${r}Flash`, Bf).component(`${r}Form`, Mf).component(`${r}Input`, Vf).component(`${r}JoditEditor`, zf).component(`${r}VueBridge`, xp).component(`${r}Lazy`, Kf).component(`${r}Modal`, Yf).component(`${r}OnClickOutside`, ts).component(`${r}PreloadedModal`, Zf).component(`${r}Rehydrate`, rp).component(`${r}Render`, ue).component(`${r}Script`, np).component(`${r}Select`, lp).component(`${r}State`, up).component(`${r}Table`, pp).component(`${r}Teleport`, vp).component(`${r}Textarea`, wp).component(`${r}Toast`, Sp).component(`${r}Toasts`, $p).component(`${r}Toggle`, Ep).component(`${r}Transition`, Tp).component(t.link_component, Qf).directive(`${r}PreserveScroll`, _p), Object.defineProperty(e.config.globalProperties, "$splade", { get: () => v }), 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}Button`, Ul).component(`${r}Confirm`, Bu).component(`${r}DataStores`, Uu).component(`${r}Data`, Hu).component(`${r}Defer`, nc).component(`${r}Dialog`, ic).component(`${r}Dropdown`, ud).component(`${r}DynamicHtml`, cd).component(`${r}Errors`, dd).component(`${r}Event`, fd).component(`${r}File`, Bf).component(`${r}Flash`, jf).component(`${r}Form`, Df).component(`${r}Input`, Uf).component(`${r}JoditEditor`, Xf).component(`${r}VueBridge`, Ip).component(`${r}Lazy`, Qf).component(`${r}Modal`, ep).component(`${r}OnClickOutside`, rs).component(`${r}PreloadedModal`, tp).component(`${r}Rehydrate`, ip).component(`${r}Render`, ue).component(`${r}Script`, sp).component(`${r}Select`, cp).component(`${r}State`, dp).component(`${r}Table`, mp).component(`${r}Teleport`, yp).component(`${r}Textarea`, Op).component(`${r}Toast`, $p).component(`${r}Toasts`, Tp).component(`${r}Toggle`, xp).component(`${r}Transition`, _p).component(t.link_component, Zf).directive(`${r}PreserveScroll`, Ap), Object.defineProperty(e.config.globalProperties, "$splade", { get: () => p }), 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", @@ -6185,7 +6224,7 @@ const wp = /* @__PURE__ */ _e(gp, [["render", bp]]), Sp = { }); } }; -function Cp(e, t, r) { +function kp(e, t, r) { const n = {}; process.argv.slice(2).forEach((s) => { const a = s.replace(/^-+/, "").split("="); @@ -6208,9 +6247,9 @@ function Cp(e, t, r) { }).listen(i, () => console.log(`Splade SSR server started on port ${i}.`)); } export { - v as Splade, - No as SpladeApp, - qp as SpladePlugin, - Pp as renderSpladeApp, - Cp as startServer + p as Splade, + Ho as SpladeApp, + Fp as SpladePlugin, + Cp as renderSpladeApp, + kp as startServer }; diff --git a/package-lock.json b/package-lock.json index 871e3cb7..6c9696c0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@protonemedia/laravel-splade", - "version": "1.4.14", + "version": "1.4.15", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@protonemedia/laravel-splade", - "version": "1.4.14", + "version": "1.4.15", "license": "MIT", "dependencies": { "autosize": "^5.0.1", @@ -466,9 +466,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.42.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.42.0.tgz", - "integrity": "sha512-6SWlXpWU5AvId8Ac7zjzmIOqMOba/JWY8XZ4A7q7Gn1Vlfg/SFFIlrtHXt9nPn4op9ZPAkl91Jao+QQv3r/ukw==", + "version": "8.43.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.43.0.tgz", + "integrity": "sha512-s2UHCoiXfxMvmfzqoN+vrQ84ahUSYde9qNO1MdxmoEhyHWsfmwOpFlwYV+ePJEVc7gFnATGUi376WowX1N7tFg==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -696,9 +696,9 @@ "peer": true }, "node_modules/acorn": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", - "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.9.0.tgz", + "integrity": "sha512-jaVNAFBHNLXspO543WnNNPZFRtavh3skAkITqD0/2aeMkKZTN+254PyhwxFYrk3vQ1xfY+2wbesJMs/JC8/PwQ==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -1103,15 +1103,15 @@ } }, "node_modules/eslint": { - "version": "8.42.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.42.0.tgz", - "integrity": "sha512-ulg9Ms6E1WPf67PHaEY4/6E2tEn5/f7FXGzr3t9cBMugOmf1INYvuUwwh1aXQN4MfJ6a5K2iNwP3w4AColvI9A==", + "version": "8.43.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.43.0.tgz", + "integrity": "sha512-aaCpf2JqqKesMFGgmRPessmVKjcGXqdlAYLLC3THM8t5nBRZRQ+st5WM/hoJXkdioEXLLbXgclUpM0TXo5HX5Q==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.4.0", "@eslint/eslintrc": "^2.0.3", - "@eslint/js": "8.42.0", + "@eslint/js": "8.43.0", "@humanwhocodes/config-array": "^0.11.10", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -1159,9 +1159,9 @@ } }, "node_modules/eslint-plugin-vue": { - "version": "9.14.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-9.14.1.tgz", - "integrity": "sha512-LQazDB1qkNEKejLe/b5a9VfEbtbczcOaui5lQ4Qw0tbRBbQYREyxxOV5BQgNDTqGPs9pxqiEpbMi9ywuIaF7vw==", + "version": "9.15.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-9.15.1.tgz", + "integrity": "sha512-CJE/oZOslvmAR9hf8SClTdQ9JLweghT6JCBQNrT2Iel1uVw0W0OLJxzvPd6CxmABKCvLrtyDnqGV37O7KQv6+A==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.3.0", @@ -2092,9 +2092,9 @@ } }, "node_modules/rollup": { - "version": "3.25.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.25.1.tgz", - "integrity": "sha512-tywOR+rwIt5m2ZAWSe5AIJcTat8vGlnPFAv15ycCrw33t6iFsXZ6mzHVFh2psSjxQPmI+xgzMZZizUAukBI4aQ==", + "version": "3.25.3", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.25.3.tgz", + "integrity": "sha512-ZT279hx8gszBj9uy5FfhoG4bZx8c+0A1sbqtr7Q3KNWIizpTdDEPZbV2xcbvHsnFp4MavCQYZyzApJ+virB8Yw==", "dev": true, "bin": { "rollup": "dist/bin/rollup" @@ -2131,9 +2131,9 @@ } }, "node_modules/sass": { - "version": "1.63.4", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.63.4.tgz", - "integrity": "sha512-Sx/+weUmK+oiIlI+9sdD0wZHsqpbgQg8wSwSnGBjwb5GwqFhYNwwnI+UWZtLjKvKyFlKkatRK235qQ3mokyPoQ==", + "version": "1.63.6", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.63.6.tgz", + "integrity": "sha512-MJuxGMHzaOW7ipp+1KdELtqKbfAWbH7OLIdoSMnVe3EXPMTmxTmlaZDCTsgIpPCs3w99lLo9/zDKkOrJuT5byw==", "dev": true, "dependencies": { "chokidar": ">=3.0.0 <4.0.0", @@ -2154,9 +2154,9 @@ "dev": true }, "node_modules/semver": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.1.tgz", - "integrity": "sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==", + "version": "7.5.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", + "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" diff --git a/package.json b/package.json index 37de42d9..ac9d3048 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@protonemedia/laravel-splade", - "version": "1.4.14", + "version": "1.4.15", "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 e30ab6ad..1453fc63 100644 --- a/src/Commands/SpladeInstallCommand.php +++ b/src/Commands/SpladeInstallCommand.php @@ -37,7 +37,7 @@ public function handle(): int // Install NPM packages... $this->updateNodePackages(function ($packages) { return [ - '@protonemedia/laravel-splade' => '^1.4.14', + '@protonemedia/laravel-splade' => '^1.4.15', '@tailwindcss/forms' => '^0.5.2', '@tailwindcss/typography' => '^0.5.2', '@vitejs/plugin-vue' => '^4.0.0', diff --git a/src/Components/Table.php b/src/Components/Table.php index 1c791aaf..c494a7cf 100644 --- a/src/Components/Table.php +++ b/src/Components/Table.php @@ -91,11 +91,11 @@ public function hasControls(): bool { return $this->for->hasBulkActions() || $this->for->hasFilters() - || $this->for->hasPerPageQuery() + || ($this->resetButton && $this->for->hasPerPageQuery()) || $this->for->hasToggleableColumns() || $this->for->hasToggleableSearchInputs() - || $this->for->isSorted() - || $this->for->page() > 1 + || ($this->resetButton && $this->for->isSorted()) + || ($this->resetButton && $this->for->page() > 1) || $this->for->searchInputs('global'); }