diff --git a/app/package-lock.json b/app/package-lock.json index 5ba332a0..7f2ed8bf 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.1.0.tgz", + "@protonemedia/laravel-splade": "file:../protonemedia-laravel-splade-1.1.1.tgz", "@tailwindcss/forms": "^0.5.2", "@tailwindcss/typography": "^0.5.2", "@vitejs/plugin-vue": "^3.0.0", @@ -22,9 +22,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.20.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.5.tgz", - "integrity": "sha512-r27t/cy/m9uKLXQNWWebeCUHgnAZq0CpG1OwKRxzJMP1vpSU4bSIK2hq+/cp0bQxetkXx38n09rNu8jVkcK/zA==", + "version": "7.20.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.7.tgz", + "integrity": "sha512-T3Z9oHybU+0vZlY9CiDSJQTD5ZapcW18ZctFMi0MOAl/4BjFF4ul7NVSARLdbGO5vDqy9eQiGTV0LtKfvCYvcg==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -34,9 +34,9 @@ } }, "node_modules/@babel/runtime": { - "version": "7.20.6", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.20.6.tgz", - "integrity": "sha512-Q+8MqP7TiHMWzSfwiJwXCjyf4GYA4Dgw3emg/7xmwsdLJOZUp+nMqcOwOzzYheuM1rhDu8FSj2l0aoMygEuXuA==", + "version": "7.20.7", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.20.7.tgz", + "integrity": "sha512-UF0tvkUtxwAgZ5W/KrkHf0Rn0fdnLDU9ScxBrEVNUprE/MzirjK4MJUX1/BVDv00Sv8cljtukVK1aky++X1SjQ==", "dev": true, "dependencies": { "regenerator-runtime": "^0.13.11" @@ -113,9 +113,9 @@ } }, "node_modules/@protonemedia/laravel-splade": { - "version": "1.1.0", - "resolved": "file:../protonemedia-laravel-splade-1.1.0.tgz", - "integrity": "sha512-6MnNHrBzuWW5ZeoiyrS0TJheEphfgpQCN3Bi0mwdGDMajhb1x8vupYrPAaE/0to39FKTIDMDCBHwxaW86i5/6A==", + "version": "1.1.1", + "resolved": "file:../protonemedia-laravel-splade-1.1.1.tgz", + "integrity": "sha512-pN512lpOEMaflZYTVW1oMtxA4+XmaOJf4xyURRKvjd/9upg9QVj0iCz36xTOJ2ZJ8H9muWy+T8j71MiOz0baGw==", "dev": true, "license": "MIT", "dependencies": { @@ -162,10 +162,33 @@ "tailwindcss": ">=3.0.0 || insiders" } }, + "node_modules/@types/express-serve-static-core": { + "version": "4.17.28", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.28.tgz", + "integrity": "sha512-P1BJAEAW3E2DJUlkgq4tOL3RyMunoWXqbSCygWo5ZIWTjUgN1YnaXWW4VWl/oc8vs/XoYibEGBKP0uZyF4AHig==", + "dev": true, + "dependencies": { + "@types/node": "*", + "@types/qs": "*", + "@types/range-parser": "*" + } + }, "node_modules/@types/node": { - "version": "14.18.34", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.34.tgz", - "integrity": "sha512-hcU9AIQVHmPnmjRK+XUUYlILlr9pQrsqSrwov/JK1pnf3GTQowVBhx54FbvM0AU/VXGH4i3+vgXS5EguR7fysA==", + "version": "14.18.35", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.35.tgz", + "integrity": "sha512-2ATO8pfhG1kDvw4Lc4C0GXIMSQFFJBCo/R1fSgTwmUlq5oy95LXyjDQinsRVgQY6gp6ghh3H91wk9ES5/5C+Tw==", + "dev": true + }, + "node_modules/@types/qs": { + "version": "6.9.7", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz", + "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==", + "dev": true + }, + "node_modules/@types/range-parser": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.4.tgz", + "integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==", "dev": true }, "node_modules/@vitejs/plugin-vue": { @@ -459,9 +482,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001436", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001436.tgz", - "integrity": "sha512-ZmWkKsnC2ifEPoWUvSAIGyOYwT+keAaaWPHiQ9DfMqS1t6tfuyFYoWR78TeZtznkEQ64+vGXH9cZrElwR2Mrxg==", + "version": "1.0.30001441", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001441.tgz", + "integrity": "sha512-OyxRR4Vof59I3yGWXws6i908EtGbMzVUi3ganaZQHmydk1iwDhRnvaPG2WaR0KcqrDFKrxVZHULT396LEPhXfg==", "dev": true, "funding": [ { @@ -1394,9 +1417,9 @@ } }, "node_modules/node-releases": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", - "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==", + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.8.tgz", + "integrity": "sha512-dFSmB8fFHEH/s81Xi+Y/15DQY6VHW81nXRj86EMSL3lmuTmK1e+aT4wrFCkTbm+gSwkw4KpX+rT/pMM2c1mF+A==", "dev": true }, "node_modules/normalize-path": { @@ -1466,9 +1489,9 @@ } }, "node_modules/postcss": { - "version": "8.4.19", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.19.tgz", - "integrity": "sha512-h+pbPsyhlYj6N2ozBmHhHrs9DzGmbaarbLvWipMRO7RLS+v4onj26MPFXA5OBYFxyqYhUJK456SwDcY9H2/zsA==", + "version": "8.4.20", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.20.tgz", + "integrity": "sha512-6Q04AXR1212bXr5fh03u8aAwbLxAQNGQ/Q1LNa0VfOI06ZAlhPHtQvE4OIdpj4kLThXilalPnmDSOD65DcHt+g==", "dev": true, "funding": [ { @@ -1599,11 +1622,12 @@ "dev": true }, "node_modules/pusher-js": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/pusher-js/-/pusher-js-7.5.0.tgz", - "integrity": "sha512-R8eL3v2hnOC7NY8ufvrcDPdEjit//2pqVmcC7h1sUyoZQ4M+bwlwkszmMVuVbYNKZUS8WRFmSvdeb9LkfLyvZQ==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/pusher-js/-/pusher-js-7.6.0.tgz", + "integrity": "sha512-5CJ7YN5ZdC24E0ETraCU5VYFv0IY5ziXhrS0gS5+9Qrro1E4M1lcZhtr9H1H+6jNSLj1LKKAgcLeE1EH9GxMlw==", "dev": true, "dependencies": { + "@types/express-serve-static-core": "4.17.28", "@types/node": "^14.14.31", "tweetnacl": "^1.0.3" } @@ -1919,16 +1943,16 @@ } }, "node_modules/vite-plugin-full-reload": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/vite-plugin-full-reload/-/vite-plugin-full-reload-1.0.4.tgz", - "integrity": "sha512-9WejQII6zJ++m/YE173Zvl2jq4cqa404KNrVT+JDzDnqaGRq5UvOvA48fnsSWPIMXFV7S0dq5+sZqcSB+tKBgA==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/vite-plugin-full-reload/-/vite-plugin-full-reload-1.0.5.tgz", + "integrity": "sha512-kVZFDFWr0DxiHn6MuDVTQf7gnWIdETGlZh0hvTiMXzRN80vgF4PKbONSq8U1d0WtHsKaFODTQgJeakLacoPZEQ==", "dev": true, "dependencies": { "picocolors": "^1.0.0", "picomatch": "^2.3.1" }, "peerDependencies": { - "vite": "^2 || ^3" + "vite": "^2 || ^3 || ^4" } }, "node_modules/vue": { @@ -1965,15 +1989,15 @@ }, "dependencies": { "@babel/parser": { - "version": "7.20.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.5.tgz", - "integrity": "sha512-r27t/cy/m9uKLXQNWWebeCUHgnAZq0CpG1OwKRxzJMP1vpSU4bSIK2hq+/cp0bQxetkXx38n09rNu8jVkcK/zA==", + "version": "7.20.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.7.tgz", + "integrity": "sha512-T3Z9oHybU+0vZlY9CiDSJQTD5ZapcW18ZctFMi0MOAl/4BjFF4ul7NVSARLdbGO5vDqy9eQiGTV0LtKfvCYvcg==", "dev": true }, "@babel/runtime": { - "version": "7.20.6", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.20.6.tgz", - "integrity": "sha512-Q+8MqP7TiHMWzSfwiJwXCjyf4GYA4Dgw3emg/7xmwsdLJOZUp+nMqcOwOzzYheuM1rhDu8FSj2l0aoMygEuXuA==", + "version": "7.20.7", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.20.7.tgz", + "integrity": "sha512-UF0tvkUtxwAgZ5W/KrkHf0Rn0fdnLDU9ScxBrEVNUprE/MzirjK4MJUX1/BVDv00Sv8cljtukVK1aky++X1SjQ==", "dev": true, "requires": { "regenerator-runtime": "^0.13.11" @@ -2020,8 +2044,8 @@ } }, "@protonemedia/laravel-splade": { - "version": "file:../protonemedia-laravel-splade-1.1.0.tgz", - "integrity": "sha512-6MnNHrBzuWW5ZeoiyrS0TJheEphfgpQCN3Bi0mwdGDMajhb1x8vupYrPAaE/0to39FKTIDMDCBHwxaW86i5/6A==", + "version": "file:../protonemedia-laravel-splade-1.1.1.tgz", + "integrity": "sha512-pN512lpOEMaflZYTVW1oMtxA4+XmaOJf4xyURRKvjd/9upg9QVj0iCz36xTOJ2ZJ8H9muWy+T8j71MiOz0baGw==", "dev": true, "requires": { "autosize": "^5.0.1", @@ -2057,10 +2081,33 @@ "postcss-selector-parser": "6.0.10" } }, + "@types/express-serve-static-core": { + "version": "4.17.28", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.28.tgz", + "integrity": "sha512-P1BJAEAW3E2DJUlkgq4tOL3RyMunoWXqbSCygWo5ZIWTjUgN1YnaXWW4VWl/oc8vs/XoYibEGBKP0uZyF4AHig==", + "dev": true, + "requires": { + "@types/node": "*", + "@types/qs": "*", + "@types/range-parser": "*" + } + }, "@types/node": { - "version": "14.18.34", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.34.tgz", - "integrity": "sha512-hcU9AIQVHmPnmjRK+XUUYlILlr9pQrsqSrwov/JK1pnf3GTQowVBhx54FbvM0AU/VXGH4i3+vgXS5EguR7fysA==", + "version": "14.18.35", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.35.tgz", + "integrity": "sha512-2ATO8pfhG1kDvw4Lc4C0GXIMSQFFJBCo/R1fSgTwmUlq5oy95LXyjDQinsRVgQY6gp6ghh3H91wk9ES5/5C+Tw==", + "dev": true + }, + "@types/qs": { + "version": "6.9.7", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz", + "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==", + "dev": true + }, + "@types/range-parser": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.4.tgz", + "integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==", "dev": true }, "@vitejs/plugin-vue": { @@ -2289,9 +2336,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30001436", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001436.tgz", - "integrity": "sha512-ZmWkKsnC2ifEPoWUvSAIGyOYwT+keAaaWPHiQ9DfMqS1t6tfuyFYoWR78TeZtznkEQ64+vGXH9cZrElwR2Mrxg==", + "version": "1.0.30001441", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001441.tgz", + "integrity": "sha512-OyxRR4Vof59I3yGWXws6i908EtGbMzVUi3ganaZQHmydk1iwDhRnvaPG2WaR0KcqrDFKrxVZHULT396LEPhXfg==", "dev": true }, "choices.js": { @@ -2880,9 +2927,9 @@ "dev": true }, "node-releases": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", - "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==", + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.8.tgz", + "integrity": "sha512-dFSmB8fFHEH/s81Xi+Y/15DQY6VHW81nXRj86EMSL3lmuTmK1e+aT4wrFCkTbm+gSwkw4KpX+rT/pMM2c1mF+A==", "dev": true }, "normalize-path": { @@ -2934,9 +2981,9 @@ "dev": true }, "postcss": { - "version": "8.4.19", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.19.tgz", - "integrity": "sha512-h+pbPsyhlYj6N2ozBmHhHrs9DzGmbaarbLvWipMRO7RLS+v4onj26MPFXA5OBYFxyqYhUJK456SwDcY9H2/zsA==", + "version": "8.4.20", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.20.tgz", + "integrity": "sha512-6Q04AXR1212bXr5fh03u8aAwbLxAQNGQ/Q1LNa0VfOI06ZAlhPHtQvE4OIdpj4kLThXilalPnmDSOD65DcHt+g==", "dev": true, "requires": { "nanoid": "^3.3.4", @@ -3006,11 +3053,12 @@ "dev": true }, "pusher-js": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/pusher-js/-/pusher-js-7.5.0.tgz", - "integrity": "sha512-R8eL3v2hnOC7NY8ufvrcDPdEjit//2pqVmcC7h1sUyoZQ4M+bwlwkszmMVuVbYNKZUS8WRFmSvdeb9LkfLyvZQ==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/pusher-js/-/pusher-js-7.6.0.tgz", + "integrity": "sha512-5CJ7YN5ZdC24E0ETraCU5VYFv0IY5ziXhrS0gS5+9Qrro1E4M1lcZhtr9H1H+6jNSLj1LKKAgcLeE1EH9GxMlw==", "dev": true, "requires": { + "@types/express-serve-static-core": "4.17.28", "@types/node": "^14.14.31", "tweetnacl": "^1.0.3" } @@ -3195,9 +3243,9 @@ } }, "vite-plugin-full-reload": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/vite-plugin-full-reload/-/vite-plugin-full-reload-1.0.4.tgz", - "integrity": "sha512-9WejQII6zJ++m/YE173Zvl2jq4cqa404KNrVT+JDzDnqaGRq5UvOvA48fnsSWPIMXFV7S0dq5+sZqcSB+tKBgA==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/vite-plugin-full-reload/-/vite-plugin-full-reload-1.0.5.tgz", + "integrity": "sha512-kVZFDFWr0DxiHn6MuDVTQf7gnWIdETGlZh0hvTiMXzRN80vgF4PKbONSq8U1d0WtHsKaFODTQgJeakLacoPZEQ==", "dev": true, "requires": { "picocolors": "^1.0.0", diff --git a/app/package.json b/app/package.json index dd8ab240..98c6aa5a 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.1.0.tgz", + "@protonemedia/laravel-splade": "file:../protonemedia-laravel-splade-1.1.1.tgz", "@tailwindcss/forms": "^0.5.2", "@tailwindcss/typography": "^0.5.2", "@vitejs/plugin-vue": "^3.0.0", diff --git a/dist/protone-media-laravel-splade.js b/dist/protone-media-laravel-splade.js index 4465f820..3b440328 100644 --- a/dist/protone-media-laravel-splade.js +++ b/dist/protone-media-laravel-splade.js @@ -1,215 +1,215 @@ -import we from "axios"; -import { ref as b, computed as P, watch as vt, openBlock as D, createBlock as X, unref as H, createCommentVNode as Pr, h as B, onMounted as M, createElementBlock as pe, createElementVNode as cr, provide as ie, inject as U, nextTick as je, KeepAlive as ni, normalizeStyle as Ft, createVNode as Os, Fragment as Cr, renderList as $s, cloneVNode as xs, watchEffect as te, defineComponent as z, onUnmounted as Te, Teleport as ii, reactive as Es, onBeforeUnmount as Ts, renderSlot as se, resolveComponent as si, withCtx as ai, withModifiers as _s, withDirectives as As, resolveDynamicComponent as Is, normalizeProps as Ps, guardReactiveProps as Cs, vShow as Fs } from "vue"; -function qs(e, t) { +import Oe from "axios"; +import { ref as b, computed as F, watch as bt, openBlock as L, createBlock as K, unref as V, createCommentVNode as Fr, h as R, onMounted as N, createElementBlock as me, createElementVNode as pr, provide as ae, inject as H, nextTick as xe, KeepAlive as ii, normalizeStyle as Dt, createVNode as Ea, Fragment as Cr, renderList as xa, cloneVNode as Ta, watchEffect as ne, defineComponent as W, onUnmounted as Pe, Teleport as ai, reactive as _a, onBeforeUnmount as Aa, renderSlot as se, resolveComponent as si, withCtx as oi, withModifiers as Ia, withDirectives as Pa, resolveDynamicComponent as Fa, normalizeProps as Ca, guardReactiveProps as qa, vShow as Da } from "vue"; +function ka(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 La(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]; - if (r(s[l], l, s) === !1) + for (var i = -1, a = Object(t), s = n(t), o = s.length; o--; ) { + var l = s[e ? o : ++i]; + if (r(a[l], l, a) === !1) break; } return t; }; } -var Ls = Ds(); -const js = Ls; -function ks(e, t) { +var ja = La(); +const Ba = ja; +function Ma(e, t) { for (var r = -1, n = Array(e); ++r < e; ) n[r] = t(r); return n; } -var Bs = typeof global == "object" && global && global.Object === Object && global; -const oi = Bs; -var Rs = typeof self == "object" && self && self.Object === Object && self, Ms = oi || Rs || Function("return this")(); -const le = Ms; -var Ns = le.Symbol; -const Oe = Ns; -var li = Object.prototype, Vs = li.hasOwnProperty, Hs = li.toString, st = Oe ? Oe.toStringTag : void 0; -function Us(e) { - var t = Vs.call(e, st), r = e[st]; +var Ra = typeof global == "object" && global && global.Object === Object && global; +const li = Ra; +var Na = typeof self == "object" && self && self.Object === Object && self, Va = li || Na || Function("return this")(); +const ce = Va; +var Ha = ce.Symbol; +const Te = Ha; +var ui = Object.prototype, Ua = ui.hasOwnProperty, Wa = ui.toString, ct = Te ? Te.toStringTag : void 0; +function za(e) { + var t = Ua.call(e, ct), r = e[ct]; try { - e[st] = void 0; + e[ct] = void 0; var n = !0; } catch { } - var i = Hs.call(e); - return n && (t ? e[st] = r : delete e[st]), i; + var i = Wa.call(e); + return n && (t ? e[ct] = r : delete e[ct]), i; } -var Ws = Object.prototype, zs = Ws.toString; -function Gs(e) { - return zs.call(e); +var Ga = Object.prototype, Ka = Ga.toString; +function Xa(e) { + return Ka.call(e); } -var Ks = "[object Null]", Xs = "[object Undefined]", yn = Oe ? Oe.toStringTag : void 0; -function _e(e) { - return e == null ? e === void 0 ? Xs : Ks : yn && yn in Object(e) ? Us(e) : Gs(e); +var Ya = "[object Null]", Qa = "[object Undefined]", bn = Te ? Te.toStringTag : void 0; +function Fe(e) { + return e == null ? e === void 0 ? Qa : Ya : bn && bn in Object(e) ? za(e) : Xa(e); } -function $e(e) { +function _e(e) { return e != null && typeof e == "object"; } -var Qs = "[object Arguments]"; -function bn(e) { - return $e(e) && _e(e) == Qs; +var Ja = "[object Arguments]"; +function wn(e) { + return _e(e) && Fe(e) == Ja; } -var ui = Object.prototype, Js = ui.hasOwnProperty, Ys = ui.propertyIsEnumerable, Zs = bn(function() { +var ci = Object.prototype, Za = ci.hasOwnProperty, es = ci.propertyIsEnumerable, ts = wn(function() { return arguments; -}()) ? bn : function(e) { - return $e(e) && Js.call(e, "callee") && !Ys.call(e, "callee"); +}()) ? wn : function(e) { + return _e(e) && Za.call(e, "callee") && !es.call(e, "callee"); }; -const ci = Zs; -var ea = Array.isArray; -const L = ea; -function ta() { +const di = ts; +var rs = Array.isArray; +const M = rs; +function ns() { return !1; } -var fi = typeof exports == "object" && exports && !exports.nodeType && exports, wn = fi && typeof module == "object" && module && !module.nodeType && module, ra = wn && wn.exports === fi, Sn = ra ? le.Buffer : void 0, na = Sn ? Sn.isBuffer : void 0, ia = na || ta; -const fr = ia; -var sa = 9007199254740991, aa = /^(?:0|[1-9]\d*)$/; -function Fr(e, t) { +var fi = typeof exports == "object" && exports && !exports.nodeType && exports, Sn = fi && typeof module == "object" && module && !module.nodeType && module, is = Sn && Sn.exports === fi, On = is ? ce.Buffer : void 0, as = On ? On.isBuffer : void 0, ss = as || ns; +const hr = ss; +var os = 9007199254740991, ls = /^(?:0|[1-9]\d*)$/; +function qr(e, t) { var r = typeof e; - return t = t == null ? sa : t, !!t && (r == "number" || r != "symbol" && aa.test(e)) && e > -1 && e % 1 == 0 && e < t; + return t = t == null ? os : t, !!t && (r == "number" || r != "symbol" && ls.test(e)) && e > -1 && e % 1 == 0 && e < t; } -var oa = 9007199254740991; -function qr(e) { - return typeof e == "number" && e > -1 && e % 1 == 0 && e <= oa; +var us = 9007199254740991; +function Dr(e) { + return typeof e == "number" && e > -1 && e % 1 == 0 && e <= us; } -var la = "[object Arguments]", ua = "[object Array]", ca = "[object Boolean]", fa = "[object Date]", da = "[object Error]", pa = "[object Function]", ha = "[object Map]", ma = "[object Number]", va = "[object Object]", ga = "[object RegExp]", ya = "[object Set]", ba = "[object String]", wa = "[object WeakMap]", Sa = "[object ArrayBuffer]", Oa = "[object DataView]", $a = "[object Float32Array]", xa = "[object Float64Array]", Ea = "[object Int8Array]", Ta = "[object Int16Array]", _a = "[object Int32Array]", Aa = "[object Uint8Array]", Ia = "[object Uint8ClampedArray]", Pa = "[object Uint16Array]", Ca = "[object Uint32Array]", F = {}; -F[$a] = F[xa] = F[Ea] = F[Ta] = F[_a] = F[Aa] = F[Ia] = F[Pa] = F[Ca] = !0; -F[la] = F[ua] = F[Sa] = F[ca] = F[Oa] = F[fa] = F[da] = F[pa] = F[ha] = F[ma] = F[va] = F[ga] = F[ya] = F[ba] = F[wa] = !1; -function Fa(e) { - return $e(e) && qr(e.length) && !!F[_e(e)]; +var cs = "[object Arguments]", ds = "[object Array]", fs = "[object Boolean]", ps = "[object Date]", hs = "[object Error]", ms = "[object Function]", vs = "[object Map]", gs = "[object Number]", ys = "[object Object]", bs = "[object RegExp]", ws = "[object Set]", Ss = "[object String]", Os = "[object WeakMap]", $s = "[object ArrayBuffer]", Es = "[object DataView]", xs = "[object Float32Array]", Ts = "[object Float64Array]", _s = "[object Int8Array]", As = "[object Int16Array]", Is = "[object Int32Array]", Ps = "[object Uint8Array]", Fs = "[object Uint8ClampedArray]", Cs = "[object Uint16Array]", qs = "[object Uint32Array]", C = {}; +C[xs] = C[Ts] = C[_s] = C[As] = C[Is] = C[Ps] = C[Fs] = C[Cs] = C[qs] = !0; +C[cs] = C[ds] = C[$s] = C[fs] = C[Es] = C[ps] = C[hs] = C[ms] = C[vs] = C[gs] = C[ys] = C[bs] = C[ws] = C[Ss] = C[Os] = !1; +function Ds(e) { + return _e(e) && Dr(e.length) && !!C[Fe(e)]; } -function qa(e) { +function ks(e) { return function(t) { return e(t); }; } -var di = typeof exports == "object" && exports && !exports.nodeType && exports, lt = di && typeof module == "object" && module && !module.nodeType && module, Da = lt && lt.exports === di, rr = Da && oi.process, La = function() { +var pi = typeof exports == "object" && exports && !exports.nodeType && exports, ht = pi && typeof module == "object" && module && !module.nodeType && module, Ls = ht && ht.exports === pi, ar = Ls && li.process, js = function() { try { - var e = lt && lt.require && lt.require("util").types; - return e || rr && rr.binding && rr.binding("util"); + var e = ht && ht.require && ht.require("util").types; + return e || ar && ar.binding && ar.binding("util"); } catch { } }(); -const On = La; -var $n = On && On.isTypedArray, ja = $n ? qa($n) : Fa; -const pi = ja; -var ka = Object.prototype, Ba = ka.hasOwnProperty; -function Ra(e, t) { - var r = L(e), n = !r && ci(e), i = !r && !n && fr(e), s = !r && !n && !i && pi(e), a = r || n || i || s, o = a ? ks(e.length, String) : [], l = o.length; +const $n = js; +var En = $n && $n.isTypedArray, Bs = En ? ks(En) : Ds; +const hi = Bs; +var Ms = Object.prototype, Rs = Ms.hasOwnProperty; +function Ns(e, t) { + var r = M(e), n = !r && di(e), i = !r && !n && hr(e), a = !r && !n && !i && hi(e), s = r || n || i || a, o = s ? Ma(e.length, String) : [], l = o.length; for (var u in e) - (t || Ba.call(e, u)) && !(a && (u == "length" || i && (u == "offset" || u == "parent") || s && (u == "buffer" || u == "byteLength" || u == "byteOffset") || Fr(u, l))) && o.push(u); + (t || Rs.call(e, u)) && !(s && (u == "length" || i && (u == "offset" || u == "parent") || a && (u == "buffer" || u == "byteLength" || u == "byteOffset") || qr(u, l))) && o.push(u); return o; } -var Ma = Object.prototype; -function Na(e) { - var t = e && e.constructor, r = typeof t == "function" && t.prototype || Ma; +var Vs = Object.prototype; +function Hs(e) { + var t = e && e.constructor, r = typeof t == "function" && t.prototype || Vs; return e === r; } -function Va(e, t) { +function Us(e, t) { return function(r) { return e(t(r)); }; } -var Ha = Va(Object.keys, Object); -const Ua = Ha; -var Wa = Object.prototype, za = Wa.hasOwnProperty; -function Ga(e) { - if (!Na(e)) - return Ua(e); +var Ws = Us(Object.keys, Object); +const zs = Ws; +var Gs = Object.prototype, Ks = Gs.hasOwnProperty; +function Xs(e) { + if (!Hs(e)) + return zs(e); var t = []; for (var r in Object(e)) - za.call(e, r) && r != "constructor" && t.push(r); + Ks.call(e, r) && r != "constructor" && t.push(r); return t; } -function W(e) { +function U(e) { var t = typeof e; return e != null && (t == "object" || t == "function"); } -var Ka = "[object AsyncFunction]", Xa = "[object Function]", Qa = "[object GeneratorFunction]", Ja = "[object Proxy]"; -function hi(e) { - if (!W(e)) +var Ys = "[object AsyncFunction]", Qs = "[object Function]", Js = "[object GeneratorFunction]", Zs = "[object Proxy]"; +function mi(e) { + if (!U(e)) return !1; - var t = _e(e); - return t == Xa || t == Qa || t == Ka || t == Ja; -} -function Bt(e) { - return e != null && qr(e.length) && !hi(e); + var t = Fe(e); + return t == Qs || t == Js || t == Ys || t == Zs; } function Rt(e) { - return Bt(e) ? Ra(e) : Ga(e); + return e != null && Dr(e.length) && !mi(e); +} +function Nt(e) { + return Rt(e) ? Ns(e) : Xs(e); } -function Dr(e, t) { - return e && js(e, t, Rt); +function kr(e, t) { + return e && Ba(e, t, Nt); } -function Ya(e, t) { +function eo(e, t) { return function(r, n) { if (r == null) return r; - if (!Bt(r)) + if (!Rt(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; ) + for (var i = r.length, a = t ? i : -1, s = Object(r); (t ? a-- : ++a < i) && n(s[a], a, s) !== !1; ) ; return r; }; } -var Za = Ya(Dr); -const Lr = Za; -function mi(e) { +var to = eo(kr); +const Lr = to; +function vi(e) { return e; } -function vi(e) { - return typeof e == "function" ? e : mi; +function gi(e) { + return typeof e == "function" ? e : vi; } -function eo(e, t) { - var r = L(e) ? qs : Lr; - return r(e, vi(t)); +function ro(e, t) { + var r = M(e) ? ka : Lr; + return r(e, gi(t)); } -function Y(e, t) { - return e && Dr(e, vi(t)); +function ee(e, t) { + return e && kr(e, gi(t)); } -var to = Array.prototype, ro = to.reverse; -function no(e) { - return e == null ? e : ro.call(e); +var no = Array.prototype, io = no.reverse; +function ao(e) { + return e == null ? e : io.call(e); } -const qt = b(0), dr = b(1), q = b({}), ne = b(0), xe = typeof window > "u"; -function io(e, t, r) { - xe || window.addEventListener("popstate", so.bind(this)), Object.keys(t).length > 0 && qt.value++, Rr(r), Mt(r.head), Mr(e); - const n = xe ? "" : location.href, i = jr( +const kt = b(0), mr = b(1), q = b({}), te = b(0), Vt = b({}), Ae = typeof window > "u"; +function so(e, t, r) { + Ae || window.addEventListener("popstate", oo.bind(this)), Object.keys(t).length > 0 && kt.value++, Rr(r), Ht(r.head), Nr(e); + const n = Ae ? "" : location.href, i = jr( n, r.head, e, t, {}, - dr.value, - qt.value, + mr.value, + kt.value, r.persistentLayout ); - gi(i); + yi(i); } -function so(e) { - !e.state || (q.value = e.state, ne.value = 0, Nr.value = {}, kr.value = q.value.persistentLayoutKey, Mt(q.value.head), Mr(q.value.html, q.value.rememberedState.scrollY)); +function oo(e) { + !e.state || (q.value = e.state, te.value = 0, Vt.value = {}, Vr.value = {}, Br.value = q.value.persistentLayoutKey, Ht(q.value.head), Nr(q.value.html, q.value.rememberedState.scrollY)); } -function jr(e, t, r, n, i, s, a, o) { +function jr(e, t, r, n, i, a, s, o) { const l = { url: e, head: t, html: r, dynamics: n, rememberedState: i, - pageVisitId: s, - dynamicVisitId: a, + pageVisitId: a, + dynamicVisitId: s, persistentLayoutKey: o }; return q.value = l, l; } -function ao(e) { - xe || window.history.pushState(e, "", e.url); +function lo(e) { + Ae || window.history.pushState(e, "", e.url); } -function oo(e) { +function uo(e) { const t = jr( e, JSON.parse(JSON.stringify(q.value.head)), @@ -220,113 +220,116 @@ function oo(e) { q.value.dynamicVisitId, q.value.persistentLayoutKey ); - xe || window.history.replaceState(t, "", t.url); + Ae || window.history.replaceState(t, "", t.url); } -function gi(e) { - xe || window.history.replaceState(e, "", e.url); +function yi(e) { + Ae || window.history.replaceState(e, "", e.url); } -const nr = b(0), kr = b(null); -function lo(e, t) { +const sr = b(0), Br = b(null); +function co(e, t) { var c; - nr.value++; + sr.value++; const r = e.request.responseURL; - if (W((c = e.data) == null ? void 0 : c.splade) || console.error("The response is not a Splade response. Did you use the Splade Middleware on this route?"), e.data.splade.lazy) + if (U((c = e.data) == null ? void 0 : c.splade) || console.error("The response is not a Splade response. Did you use the Splade Middleware on this route?"), e.data.splade.lazy) return; - e.data.splade.modal && ne.value++; - const n = kr.value; - if (Rr(e.data.splade), Mt(e.data.splade.head), r === q.value.url && (t = !0), e.data.splade.modal) - return _i(e.data.html, e.data.splade.modal); + e.data.splade.modal && !e.data.splade.modalTarget && te.value++; + const n = Br.value; + if (Rr(e.data.splade), Ht(e.data.splade.head), r === q.value.url && (t = !0), e.data.splade.modal) + return Ai(e.data.html, e.data.splade.modal); if (e.data.splade.preventRefresh) return; - ne.value = 0; - let i = e.data.html, s = e.data.dynamics; - const a = Object.keys(q.value.dynamics).length > 0, o = Object.keys(s).length > 0; - t ? (o && Y(s, (p, f) => { - s[f] += ``; - }), (!o || !a) && (i += ``)) : (o && qt.value++, (!o || !a) && dr.value++); + te.value = 0, Vt.value = {}; + let i = e.data.html, a = e.data.dynamics; + const s = Object.keys(q.value.dynamics).length > 0, o = Object.keys(a).length > 0; + t ? (o && ee(a, (h, f) => { + a[f] += ``; + }), (!o || !s) && (i += ``)) : (o && kt.value++, (!o || !s) && mr.value++); let l = e.data.splade.persistentLayout && n === e.data.splade.persistentLayout; - Mr(l ? q.value.html : i, 0); + Nr(l ? q.value.html : i, 0); const u = jr( r, e.data.splade.head, l ? q.value.html : i, - s, + a, q.value.rememberedState ? { ...q.value.rememberedState } : {}, - dr.value, - qt.value, + mr.value, + kt.value, e.data.splade.persistentLayout ); - t ? gi(u) : ao(u); -} -function uo() { - ne.value--, Mt(fo(ne.value)); + t ? yi(u) : lo(u); } -const yi = b({}), bi = (e) => yi.value[e], co = (e) => Object.keys(bi.value[e]).length > 0, wi = b({}), fo = (e) => wi.value[e], Si = b({}), po = (e) => Si.value[e], Ke = b([]); -function ho(e) { - Ke.value.push(e); +function fo() { + te.value--, Ht(ho(te.value)); } -const mo = P(() => no(Ke.value)); +const bi = b({}), wi = (e) => bi.value[e], po = (e) => Object.keys(wi.value[e]).length > 0, Si = b({}), ho = (e) => Si.value[e], Oi = b({}), mo = (e) => Oi.value[e], Ze = b([]); function vo(e) { - Ke.value[e].dismissed = !0, Ke.value[e].html = null; + Ze.value.push(e); } -const Br = b(null); -function go(e, t, r, n) { - let i, s; - const a = new Promise((o, l) => { - i = o, s = l; +const go = F(() => ao(Ze.value)); +function yo(e) { + Ze.value[e].dismissed = !0, Ze.value[e].html = null; +} +const Mr = b(null); +function bo(e, t, r, n) { + let i, a; + const s = new Promise((o, l) => { + i = o, a = l; }); - return Br.value = { + return Mr.value = { title: e, text: t, confirmButton: r, cancelButton: n, resolvePromise: i, - rejectPromise: s - }, a; + rejectPromise: a + }, s; } -function yo() { - Br.value = null; +function wo() { + Mr.value = null; } -const Oi = b({}); +const $i = b({}); function Rr(e) { - kr.value = e.persistentLayout, Oi.value = e.shared ? e.shared : {}, Si.value[ne.value] = e.flash ? e.flash : {}, wi.value[ne.value] = e.head ? e.head : {}, eo(e.toasts ? e.toasts : [], (t) => { - Ke.value.push(t); - }), yi.value[ne.value] = e.errors ? e.errors : {}; + Br.value = e.persistentLayout, $i.value = e.shared ? e.shared : {}, Oi.value[te.value] = e.flash ? e.flash : {}, Si.value[te.value] = e.head ? e.head : {}, ro(e.toasts ? e.toasts : [], (t) => { + Ze.value.push(t); + }), bi.value[te.value] = e.errors ? e.errors : {}; } -const $i = b(() => { +const Ei = b(() => { }), xi = b(() => { -}), Ei = b(() => { }), Ti = b(() => { +}), _i = b(() => { }); -function Mt(e) { - $i.value(e); +function Ht(e) { + Ei.value(e); } -function Mr(e, t) { +function Nr(e, t) { xi.value(e, t); } -function _i(e, t) { - Ei.value(e, t); +function Ai(e, t) { + Vt.value[te.value] = !0, Ti.value(e, t); } -function bo(e) { - Ti.value(e); +function So(e) { + return Vt.value[e]; } -const Ai = b({}); -function Ii(e, t, r) { - Ai.value[e] = t, r && wo(e, t); +function Oo(e) { + _i.value(e); } -function wo(e, t) { +const Ii = b({}); +function Pi(e, t, r) { + Ii.value[e] = t, r && $o(e, t); +} +function $o(e, t) { let r = JSON.parse(localStorage.getItem("splade") || "{}") || {}; r[e] = t, localStorage.setItem("splade", JSON.stringify(r)); } -function So(e, t) { - return t ? (JSON.parse(localStorage.getItem("splade") || "{}") || {})[e] : Ai.value[e]; +function Eo(e, t) { + return t ? (JSON.parse(localStorage.getItem("splade") || "{}") || {})[e] : Ii.value[e]; } -function Et(e, t) { - xe || document.dispatchEvent(new CustomEvent(`splade:${e}`, { detail: t })); +function Tt(e, t) { + Ae || document.dispatchEvent(new CustomEvent(`splade:${e}`, { detail: t })); } -function Ze(e, t, r, n, i) { - xe || Ii("scrollY", window.scrollY), Et("request", { url: e, method: t, data: r, headers: n, replace: i }); - const s = we({ +function it(e, t, r, n, i) { + Ae || Pi("scrollY", window.scrollY), Tt("request", { url: e, method: t, data: r, headers: n, replace: i }); + const a = Oe({ method: t, url: e, data: r, @@ -336,100 +339,101 @@ function Ze(e, t, r, n, i) { Accept: "text/html, application/xhtml+xml", ...n }, - onUploadProgress: (a) => { - r instanceof FormData && (a.percentage = Math.round(a.loaded / a.total * 100), Et("request-progress", { url: e, method: t, data: r, headers: n, replace: i, progress: a })); + onUploadProgress: (s) => { + r instanceof FormData && (s.percentage = Math.round(s.loaded / s.total * 100), Tt("request-progress", { url: e, method: t, data: r, headers: n, replace: i, progress: s })); } }); - return s.then((a) => { - lo(a, i), Et("request-response", { url: e, method: t, data: r, headers: n, replace: i, response: a }); - }).catch((a) => { - if (Et("request-error", { url: e, method: t, data: r, headers: n, replace: i, error: a }), !a.response) + return a.then((s) => { + co(s, i), Tt("request-response", { url: e, method: t, data: r, headers: n, replace: i, response: s }); + }).catch((s) => { + if (Tt("request-error", { url: e, method: t, data: r, headers: n, replace: i, error: s }), !s.response) return; - if (a.response.status == 409 && a.response.headers["x-splade-redirect-away"]) - return window.location = a.response.headers["x-splade-redirect-away"]; - const o = a.response.data.splade; - o && (o.lazy || Rr(o)), a.response.status != 422 && bo( - a.response.data.html ? a.response.data.html : a.response.data + if (s.response.status == 409 && s.response.headers["x-splade-redirect-away"]) + return window.location = s.response.headers["x-splade-redirect-away"]; + const o = s.response.data.splade; + o && (o.lazy || Rr(o)), s.response.status != 422 && Oo( + s.response.data.html ? s.response.data.html : s.response.data ); - }), s; -} -function Pi(e) { - return Ze(e, "GET", {}, {}, !0); + }), a; } -function Oo(e) { - return Ze(e, "GET", {}, {}, !1); -} -function $o(e) { - return Ze(e, "GET", {}, { "X-Splade-Modal": "modal" }, !1); -} -const Nr = b({}); -function xo(e) { - const t = Nr.value[e]; - return t ? (ne.value++, _i(t.html, t.type), !0) : !1; +function Fi(e, t) { + return typeof t > "u" && (t = {}), it(e, "GET", {}, t, !0); } -function Eo(e, t, r) { - Nr.value[e] = { html: t, type: r }; +function xo(e, t) { + return typeof t > "u" && (t = {}), it(e, "GET", {}, t, !1); } function To(e) { - return Ze(e, "GET", {}, { "X-Splade-Modal": "slideover" }, !1); -} -function _o(e, t) { - return Ze(e, "GET", {}, { "X-Splade-Lazy": t }, !1); -} -function Ao() { - return Pi(q.value.url); -} -const m = { - init: io, - replace: Pi, - visit: Oo, - modal: $o, - slideover: To, - refresh: Ao, - request: Ze, - lazy: _o, - replaceUrlOfCurrentPage: oo, + return it(e, "GET", {}, { "X-Splade-Modal": "modal" }, !1); +} +const Vr = b({}); +function _o(e) { + const t = Vr.value[e]; + return t ? (te.value++, Ai(t.html, t.type), !0) : !1; +} +function Ao(e, t, r) { + Vr.value[e] = { html: t, type: r }; +} +function Io(e) { + return it(e, "GET", {}, { "X-Splade-Modal": "slideover" }, !1); +} +function Po(e, t) { + return it(e, "GET", {}, { "X-Splade-Lazy": t }, !1); +} +function Fo() { + return Fi(q.value.url); +} +const v = { + init: so, + replace: Fi, + visit: xo, + modal: To, + slideover: Io, + refresh: Fo, + request: it, + lazy: Po, + replaceUrlOfCurrentPage: uo, htmlForDynamicComponent(e) { return q.value.dynamics[e]; }, setOnHead(e) { - $i.value = e; + Ei.value = e; }, setOnHtml(e) { xi.value = e; }, setOnModal(e) { - Ei.value = e; + Ti.value = e; }, setOnServerError(e) { - Ti.value = e; + _i.value = e; }, - hasValidationErrors: co, - validationErrors: bi, - sharedData: Oi, - flashData: po, - toasts: Ke, - toastsReversed: mo, - confirmModal: Br, - confirm: go, - clearConfirmModal: yo, - pushToast: ho, - dismissToast: vo, - restore: So, - remember: Ii, - popStack: uo, - currentStack: ne, - pageVisitId: P(() => q.value.pageVisitId), - dynamicVisitId: P(() => q.value.dynamicVisitId), - isSsr: xe, - openPreloadedModal: xo, - registerPreloadedModal: Eo + hasValidationErrors: po, + validationErrors: wi, + sharedData: $i, + flashData: mo, + toasts: Ze, + toastsReversed: go, + confirmModal: Mr, + confirm: bo, + clearConfirmModal: wo, + pushToast: vo, + dismissToast: yo, + restore: Eo, + remember: Pi, + popStack: fo, + currentStack: te, + stackType: So, + pageVisitId: F(() => q.value.pageVisitId), + dynamicVisitId: F(() => q.value.dynamicVisitId), + isSsr: Ae, + openPreloadedModal: _o, + registerPreloadedModal: Ao }; -var Io = "[object String]"; -function ze(e) { - return typeof e == "string" || !L(e) && $e(e) && _e(e) == Io; +var Co = "[object String]"; +function Xe(e) { + return typeof e == "string" || !M(e) && _e(e) && Fe(e) == Co; } -const ue = { +const de = { __name: "Render", props: { html: { @@ -441,13 +445,13 @@ const ue = { setup(e) { const t = e, r = b(null); function n() { - r.value = B({ + r.value = R({ template: t.html }); } - return vt(() => t.html, n, { immediate: !0 }), (i, s) => e.html ? (D(), X(H(r), { key: 0 })) : Pr("", !0); + return bt(() => t.html, n, { immediate: !0 }), (i, a) => e.html ? (L(), K(V(r), { key: 0 })) : Fr("", !0); } -}, Po = { +}, qo = { __name: "ServerError", props: { html: { @@ -464,26 +468,26 @@ const ue = { const l = n.value; if (!l.contentWindow) throw new Error("iframe not yet ready."); - l.contentWindow.document.open(), l.contentWindow.document.write(o.outerHTML), l.contentWindow.document.close(), document.addEventListener("keydown", s); + l.contentWindow.document.open(), l.contentWindow.document.write(o.outerHTML), l.contentWindow.document.close(), document.addEventListener("keydown", a); } - function s(o) { - o.keyCode === 27 && a(); + function a(o) { + o.keyCode === 27 && s(); } - function a() { - document.body.style.overflow = "visible", document.removeEventListener("keydown", s), t("close"); + function s() { + document.body.style.overflow = "visible", document.removeEventListener("keydown", a), t("close"); } - return M(() => i()), (o, l) => (D(), pe("div", { + return N(() => i()), (o, l) => (L(), me("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 + onClick: s }, [ - cr("iframe", { + pr("iframe", { ref_key: "iframeElement", ref: n, class: "bg-white w-full h-full" }, null, 512) ])); } -}, Co = { +}, Do = { __name: "SpladeApp", props: { el: { @@ -495,8 +499,8 @@ const ue = { type: String, required: !1, default: (e) => { - if (!m.isSsr) { - const t = ze(e.el) ? document.getElementById(e.el) : e.el; + if (!v.isSsr) { + const t = Xe(e.el) ? document.getElementById(e.el) : e.el; return JSON.parse(t.dataset.components) || ""; } } @@ -505,8 +509,8 @@ const ue = { type: String, required: !1, default: (e) => { - if (!m.isSsr) { - const t = ze(e.el) ? document.getElementById(e.el) : e.el; + if (!v.isSsr) { + const t = Xe(e.el) ? document.getElementById(e.el) : e.el; return JSON.parse(t.dataset.html) || ""; } } @@ -515,8 +519,8 @@ const ue = { type: Object, required: !1, default: (e) => { - if (!m.isSsr) { - const t = ze(e.el) ? document.getElementById(e.el) : e.el; + if (!v.isSsr) { + const t = Xe(e.el) ? document.getElementById(e.el) : e.el; return JSON.parse(t.dataset.dynamics) || {}; } } @@ -525,8 +529,8 @@ const ue = { type: Object, required: !1, default: (e) => { - if (!m.isSsr) { - const t = ze(e.el) ? document.getElementById(e.el) : e.el; + if (!v.isSsr) { + const t = Xe(e.el) ? document.getElementById(e.el) : e.el; return JSON.parse(t.dataset.splade) || {}; } } @@ -534,135 +538,138 @@ const ue = { }, setup(e) { const t = e; - ie("stack", 0); - const r = b(), n = b([]), i = b(null), s = b(null), a = U("$spladeOptions") || {}, o = P(() => m.currentStack.value < 1 ? [] : { + ae("stack", 0); + const r = b(), n = b([]), i = b(null), a = b(null), s = b(!0), o = H("$spladeOptions") || {}, l = F(() => v.currentStack.value < 1 ? [] : { filter: "blur(4px)", "transition-property": "filter", "transition-duration": "150ms", "transition-timing-function": "cubic-bezier(0.4, 0, 0.2, 1)" }); - function l() { + function u() { i.value = null; } - function u(f) { - n[f] = null, m.popStack(); + function c(d) { + n.value[d] = null, v.popStack(); } - function c(f) { - const d = document.createElement("meta"); - Y(f, (h, y) => { - d[y] = h; - }), document.getElementsByTagName("head")[0].appendChild(d); + function h(d) { + const p = document.createElement("meta"); + ee(d, (m, g) => { + p[g] = m; + }), document.getElementsByTagName("head")[0].appendChild(p); } - function p(f) { - var h; - let d = "meta"; - Y(f, (y, v) => { - d = `${d}[${v}="${y}"]`; + function f(d) { + var m; + let p = "meta"; + ee(d, (g, x) => { + p = `${p}[${x}="${g}"]`; }); try { - (h = document.querySelector(d)) == null || h.remove(); + (m = document.querySelector(p)) == null || m.remove(); } catch { } } - return m.setOnHead((f) => { - var d; - if (!m.isSsr) { - if (s.value === null) { - s.value = f.meta; + return v.setOnHead((d) => { + var p; + if (!v.isSsr) { + if (a.value === null) { + a.value = d.meta; return; } - if (s.value.forEach((h) => { - p(h); - }), s.value = f.meta, document.title = f.title, f.meta.forEach((h) => { - c(h); - }), (d = document.querySelector('link[rel="canonical"]')) == null || d.remove(), f.canonical) { - const h = document.createElement("link"); - h.rel = "canonical", h.href = f.canonical, document.getElementsByTagName("head")[0].appendChild(h); + if (a.value.forEach((m) => { + f(m); + }), a.value = d.meta, document.title = d.title, d.meta.forEach((m) => { + h(m); + }), (p = document.querySelector('link[rel="canonical"]')) == null || p.remove(), d.canonical) { + const m = document.createElement("link"); + m.rel = "canonical", m.href = d.canonical, document.getElementsByTagName("head")[0].appendChild(m); } } - }), m.setOnHtml((f, d) => { - n.value = [], r.value = f, je(() => { - m.isSsr || window.scrollTo(0, d), a.transform_anchors && [...document.querySelectorAll("a")].forEach((h) => { - h.href == "" || h.href.charAt(0) == "#" || h.__vnode.dynamicProps === null && (h.hasAttribute("download") || (h.onclick = function(y) { - y.preventDefault(), m.visit(h.href); + }), v.setOnHtml((d, p) => { + n.value = [], r.value = d, xe(() => { + v.isSsr || window.scrollTo(0, p), o.transform_anchors && [...document.querySelectorAll("a")].forEach((m) => { + m.href == "" || m.href.charAt(0) == "#" || m.__vnode.dynamicProps === null && (m.hasAttribute("download") || (m.onclick = function(g) { + g.preventDefault(), v.visit(m.href); })); }); }); - }), m.setOnModal(function(f, d) { - n.value[m.currentStack.value] = { html: f, type: d }; - }), m.setOnServerError(function(f) { - i.value = f; - }), m.init(t.initialHtml, t.initialDynamics, t.initialSpladeData), M(() => { - if (m.isSsr) + }), v.setOnModal(function(d, p) { + n.value[v.currentStack.value] && (s.value = !1), n.value[v.currentStack.value] = { html: d, type: p }, xe(() => { + s.value = !0; + }); + }), v.setOnServerError(function(d) { + i.value = d; + }), v.init(t.initialHtml, t.initialDynamics, t.initialSpladeData), N(() => { + if (v.isSsr) return; - const f = ze(t.el) ? document.getElementById(t.el) : t.el; - ["components", "html", "dynamics", "splade"].forEach((d) => { - delete f.dataset[d]; + const d = Xe(t.el) ? document.getElementById(t.el) : t.el; + ["components", "html", "dynamics", "splade"].forEach((p) => { + delete d.dataset[p]; }); - }), (f, d) => (D(), pe("div", null, [ - H(m).isSsr ? (D(), X(ue, { - key: `visit.${H(m).pageVisitId.value}`, - style: Ft(H(o)), + }), (d, p) => (L(), me("div", null, [ + V(v).isSsr ? (L(), K(de, { + key: `visit.${V(v).pageVisitId.value}`, + style: Dt(V(l)), html: r.value - }, null, 8, ["style", "html"])) : (D(), X(ni, { + }, null, 8, ["style", "html"])) : (L(), K(ii, { key: 0, - max: H(a).max_keep_alive + max: V(o).max_keep_alive }, [ - (D(), X(ue, { - key: `visit.${H(m).pageVisitId.value}`, - style: Ft(H(o)), + (L(), K(de, { + key: `visit.${V(v).pageVisitId.value}`, + style: Dt(V(l)), html: r.value }, null, 8, ["style", "html"])) ], 1032, ["max"])), - Os(ue, { html: e.components }, null, 8, ["html"]), - (D(!0), pe(Cr, null, $s(H(m).currentStack.value, (h) => (D(), X(ue, { - key: `modal.${h}`, - type: n.value[h].type, - html: n.value[h].html, - stack: h, - "on-top-of-stack": H(m).currentStack.value === h, - onClose: (y) => u(h) - }, null, 8, ["type", "html", "stack", "on-top-of-stack", "onClose"]))), 128)), - i.value ? (D(), X(Po, { + Ea(de, { html: e.components }, null, 8, ["html"]), + (L(!0), me(Cr, null, xa(V(v).currentStack.value, (m) => (L(), K(de, { + key: `modal.${m}`, + type: n.value[m].type, + html: n.value[m].html, + stack: m, + "on-top-of-stack": V(v).currentStack.value === m, + animate: s.value, + onClose: (g) => c(m) + }, null, 8, ["type", "html", "stack", "on-top-of-stack", "animate", "onClose"]))), 128)), + i.value ? (L(), K(qo, { key: 2, html: i.value, - onClose: l - }, null, 8, ["html"])) : Pr("", !0) + onClose: u + }, null, 8, ["html"])) : Fr("", !0) ])); } }; -function np(e) { - return () => B(Co, e); +function ap(e) { + return () => R(Do, e); } -var Fo = Object.prototype, qo = Fo.hasOwnProperty; -function Do(e, t) { - return e != null && qo.call(e, t); +var ko = Object.prototype, Lo = ko.hasOwnProperty; +function jo(e, t) { + return e != null && Lo.call(e, t); } -var Lo = "[object Symbol]"; -function Nt(e) { - return typeof e == "symbol" || $e(e) && _e(e) == Lo; +var Bo = "[object Symbol]"; +function Ut(e) { + return typeof e == "symbol" || _e(e) && Fe(e) == Bo; } -var jo = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, ko = /^\w*$/; -function Vr(e, t) { - if (L(e)) +var Mo = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Ro = /^\w*$/; +function Hr(e, t) { + if (M(e)) return !1; var r = typeof e; - return r == "number" || r == "symbol" || r == "boolean" || e == null || Nt(e) ? !0 : ko.test(e) || !jo.test(e) || t != null && e in Object(t); + return r == "number" || r == "symbol" || r == "boolean" || e == null || Ut(e) ? !0 : Ro.test(e) || !Mo.test(e) || t != null && e in Object(t); } -var Bo = le["__core-js_shared__"]; -const ir = Bo; +var No = ce["__core-js_shared__"]; +const or = No; var xn = function() { - var e = /[^.]+$/.exec(ir && ir.keys && ir.keys.IE_PROTO || ""); + var e = /[^.]+$/.exec(or && or.keys && or.keys.IE_PROTO || ""); return e ? "Symbol(src)_1." + e : ""; }(); -function Ro(e) { +function Vo(e) { return !!xn && xn in e; } -var Mo = Function.prototype, No = Mo.toString; -function Me(e) { +var Ho = Function.prototype, Uo = Ho.toString; +function Ve(e) { if (e != null) { try { - return No.call(e); + return Uo.call(e); } catch { } try { @@ -672,269 +679,269 @@ function Me(e) { } return ""; } -var Vo = /[\\^$.*+?()[\]{}|]/g, Ho = /^\[object .+?Constructor\]$/, Uo = Function.prototype, Wo = Object.prototype, zo = Uo.toString, Go = Wo.hasOwnProperty, Ko = RegExp( - "^" + zo.call(Go).replace(Vo, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" +var Wo = /[\\^$.*+?()[\]{}|]/g, zo = /^\[object .+?Constructor\]$/, Go = Function.prototype, Ko = Object.prototype, Xo = Go.toString, Yo = Ko.hasOwnProperty, Qo = RegExp( + "^" + Xo.call(Yo).replace(Wo, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" ); -function Xo(e) { - if (!W(e) || Ro(e)) +function Jo(e) { + if (!U(e) || Vo(e)) return !1; - var t = hi(e) ? Ko : Ho; - return t.test(Me(e)); + var t = mi(e) ? Qo : zo; + return t.test(Ve(e)); } -function Qo(e, t) { +function Zo(e, t) { return e == null ? void 0 : e[t]; } -function Ne(e, t) { - var r = Qo(e, t); - return Xo(r) ? r : void 0; +function He(e, t) { + var r = Zo(e, t); + return Jo(r) ? r : void 0; } -var Jo = Ne(Object, "create"); -const ft = Jo; -function Yo() { - this.__data__ = ft ? ft(null) : {}, this.size = 0; +var el = He(Object, "create"); +const vt = el; +function tl() { + this.__data__ = vt ? vt(null) : {}, this.size = 0; } -function Zo(e) { +function rl(e) { var t = this.has(e) && delete this.__data__[e]; return this.size -= t ? 1 : 0, t; } -var el = "__lodash_hash_undefined__", tl = Object.prototype, rl = tl.hasOwnProperty; -function nl(e) { +var nl = "__lodash_hash_undefined__", il = Object.prototype, al = il.hasOwnProperty; +function sl(e) { var t = this.__data__; - if (ft) { + if (vt) { var r = t[e]; - return r === el ? void 0 : r; + return r === nl ? void 0 : r; } - return rl.call(t, e) ? t[e] : void 0; + return al.call(t, e) ? t[e] : void 0; } -var il = Object.prototype, sl = il.hasOwnProperty; -function al(e) { +var ol = Object.prototype, ll = ol.hasOwnProperty; +function ul(e) { var t = this.__data__; - return ft ? t[e] !== void 0 : sl.call(t, e); + return vt ? t[e] !== void 0 : ll.call(t, e); } -var ol = "__lodash_hash_undefined__"; -function ll(e, t) { +var cl = "__lodash_hash_undefined__"; +function dl(e, t) { var r = this.__data__; - return this.size += this.has(e) ? 0 : 1, r[e] = ft && t === void 0 ? ol : t, this; + return this.size += this.has(e) ? 0 : 1, r[e] = vt && t === void 0 ? cl : t, this; } -function ke(e) { +function Me(e) { var t = -1, r = e == null ? 0 : e.length; for (this.clear(); ++t < r; ) { var n = e[t]; this.set(n[0], n[1]); } } -ke.prototype.clear = Yo; -ke.prototype.delete = Zo; -ke.prototype.get = nl; -ke.prototype.has = al; -ke.prototype.set = ll; -function ul() { +Me.prototype.clear = tl; +Me.prototype.delete = rl; +Me.prototype.get = sl; +Me.prototype.has = ul; +Me.prototype.set = dl; +function fl() { this.__data__ = [], this.size = 0; } -function Hr(e, t) { +function Ur(e, t) { return e === t || e !== e && t !== t; } -function Vt(e, t) { +function Wt(e, t) { for (var r = e.length; r--; ) - if (Hr(e[r][0], t)) + if (Ur(e[r][0], t)) return r; return -1; } -var cl = Array.prototype, fl = cl.splice; -function dl(e) { - var t = this.__data__, r = Vt(t, e); +var pl = Array.prototype, hl = pl.splice; +function ml(e) { + var t = this.__data__, r = Wt(t, e); if (r < 0) return !1; var n = t.length - 1; - return r == n ? t.pop() : fl.call(t, r, 1), --this.size, !0; + return r == n ? t.pop() : hl.call(t, r, 1), --this.size, !0; } -function pl(e) { - var t = this.__data__, r = Vt(t, e); +function vl(e) { + var t = this.__data__, r = Wt(t, e); return r < 0 ? void 0 : t[r][1]; } -function hl(e) { - return Vt(this.__data__, e) > -1; +function gl(e) { + return Wt(this.__data__, e) > -1; } -function ml(e, t) { - var r = this.__data__, n = Vt(r, e); +function yl(e, t) { + var r = this.__data__, n = Wt(r, e); return n < 0 ? (++this.size, r.push([e, t])) : r[n][1] = t, this; } -function me(e) { +function ve(e) { var t = -1, r = e == null ? 0 : e.length; for (this.clear(); ++t < r; ) { var n = e[t]; this.set(n[0], n[1]); } } -me.prototype.clear = ul; -me.prototype.delete = dl; -me.prototype.get = pl; -me.prototype.has = hl; -me.prototype.set = ml; -var vl = Ne(le, "Map"); -const dt = vl; -function gl() { +ve.prototype.clear = fl; +ve.prototype.delete = ml; +ve.prototype.get = vl; +ve.prototype.has = gl; +ve.prototype.set = yl; +var bl = He(ce, "Map"); +const gt = bl; +function wl() { this.size = 0, this.__data__ = { - hash: new ke(), - map: new (dt || me)(), - string: new ke() + hash: new Me(), + map: new (gt || ve)(), + string: new Me() }; } -function yl(e) { +function Sl(e) { var t = typeof e; return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null; } -function Ht(e, t) { +function zt(e, t) { var r = e.__data__; - return yl(t) ? r[typeof t == "string" ? "string" : "hash"] : r.map; + return Sl(t) ? r[typeof t == "string" ? "string" : "hash"] : r.map; } -function bl(e) { - var t = Ht(this, e).delete(e); +function Ol(e) { + var t = zt(this, e).delete(e); return this.size -= t ? 1 : 0, t; } -function wl(e) { - return Ht(this, e).get(e); +function $l(e) { + return zt(this, e).get(e); } -function Sl(e) { - return Ht(this, e).has(e); +function El(e) { + return zt(this, e).has(e); } -function Ol(e, t) { - var r = Ht(this, e), n = r.size; +function xl(e, t) { + var r = zt(this, e), n = r.size; return r.set(e, t), this.size += r.size == n ? 0 : 1, this; } -function ve(e) { +function ge(e) { var t = -1, r = e == null ? 0 : e.length; for (this.clear(); ++t < r; ) { var n = e[t]; this.set(n[0], n[1]); } } -ve.prototype.clear = gl; -ve.prototype.delete = bl; -ve.prototype.get = wl; -ve.prototype.has = Sl; -ve.prototype.set = Ol; -var $l = "Expected a function"; -function Ur(e, t) { +ge.prototype.clear = wl; +ge.prototype.delete = Ol; +ge.prototype.get = $l; +ge.prototype.has = El; +ge.prototype.set = xl; +var Tl = "Expected a function"; +function Wr(e, t) { if (typeof e != "function" || t != null && typeof t != "function") - throw new TypeError($l); + throw new TypeError(Tl); var r = function() { - var n = arguments, i = t ? t.apply(this, n) : n[0], s = r.cache; - if (s.has(i)) - return s.get(i); - var a = e.apply(this, n); - return r.cache = s.set(i, a) || s, a; + var n = arguments, i = t ? t.apply(this, n) : n[0], a = r.cache; + if (a.has(i)) + return a.get(i); + var s = e.apply(this, n); + return r.cache = a.set(i, s) || a, s; }; - return r.cache = new (Ur.Cache || ve)(), r; + return r.cache = new (Wr.Cache || ge)(), r; } -Ur.Cache = ve; -var xl = 500; -function El(e) { - var t = Ur(e, function(n) { - return r.size === xl && r.clear(), n; +Wr.Cache = ge; +var _l = 500; +function Al(e) { + var t = Wr(e, function(n) { + return r.size === _l && r.clear(), n; }), r = t.cache; return t; } -var Tl = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, _l = /\\(\\)?/g, Al = El(function(e) { +var Il = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, Pl = /\\(\\)?/g, Fl = Al(function(e) { var t = []; - return e.charCodeAt(0) === 46 && t.push(""), e.replace(Tl, function(r, n, i, s) { - t.push(i ? s.replace(_l, "$1") : n || r); + return e.charCodeAt(0) === 46 && t.push(""), e.replace(Il, function(r, n, i, a) { + t.push(i ? a.replace(Pl, "$1") : n || r); }), t; }); -const Il = Al; +const Cl = Fl; function Ci(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 Pl = 1 / 0, En = Oe ? Oe.prototype : void 0, Tn = En ? En.toString : void 0; -function Ut(e) { +var ql = 1 / 0, Tn = Te ? Te.prototype : void 0, _n = Tn ? Tn.toString : void 0; +function Gt(e) { if (typeof e == "string") return e; - if (L(e)) - return Ci(e, Ut) + ""; - if (Nt(e)) - return Tn ? Tn.call(e) : ""; + if (M(e)) + return Ci(e, Gt) + ""; + if (Ut(e)) + return _n ? _n.call(e) : ""; var t = e + ""; - return t == "0" && 1 / e == -Pl ? "-0" : t; + return t == "0" && 1 / e == -ql ? "-0" : t; } -function Wr(e) { - return e == null ? "" : Ut(e); +function zr(e) { + return e == null ? "" : Gt(e); } -function zr(e, t) { - return L(e) ? e : Vr(e, t) ? [e] : Il(Wr(e)); +function Gr(e, t) { + return M(e) ? e : Hr(e, t) ? [e] : Cl(zr(e)); } -var Cl = 1 / 0; -function gt(e) { - if (typeof e == "string" || Nt(e)) +var Dl = 1 / 0; +function wt(e) { + if (typeof e == "string" || Ut(e)) return e; var t = e + ""; - return t == "0" && 1 / e == -Cl ? "-0" : t; + return t == "0" && 1 / e == -Dl ? "-0" : t; } -function Fi(e, t, r) { - t = zr(t, e); - for (var n = -1, i = t.length, s = !1; ++n < i; ) { - var a = gt(t[n]); - if (!(s = e != null && r(e, a))) +function qi(e, t, r) { + t = Gr(t, e); + for (var n = -1, i = t.length, a = !1; ++n < i; ) { + var s = wt(t[n]); + if (!(a = e != null && r(e, s))) break; - e = e[a]; + e = e[s]; } - return s || ++n != i ? s : (i = e == null ? 0 : e.length, !!i && qr(i) && Fr(a, i) && (L(e) || ci(e))); + return a || ++n != i ? a : (i = e == null ? 0 : e.length, !!i && Dr(i) && qr(s, i) && (M(e) || di(e))); } -function K(e, t) { - return e != null && Fi(e, t, Do); +function G(e, t) { + return e != null && qi(e, t, jo); } -function Z(e, t, ...r) { +function X(e, t, ...r) { if (e in t) { let i = t[e]; return typeof i == "function" ? i(...r) : i; } let n = new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((i) => `"${i}"`).join(", ")}.`); - throw Error.captureStackTrace && Error.captureStackTrace(n, Z), n; -} -var Dt = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(Dt || {}), Se = ((e) => (e[e.Unmount = 0] = "Unmount", e[e.Hidden = 1] = "Hidden", e))(Se || {}); -function G({ visible: e = !0, features: t = 0, ourProps: r, theirProps: n, ...i }) { - var s; - let a = Fl(n, r), o = Object.assign(i, { props: a }); - if (e || t & 2 && a.static) - return sr(o); + throw Error.captureStackTrace && Error.captureStackTrace(n, X), n; +} +var Lt = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(Lt || {}), Ee = ((e) => (e[e.Unmount = 0] = "Unmount", e[e.Hidden = 1] = "Hidden", e))(Ee || {}); +function z({ visible: e = !0, features: t = 0, ourProps: r, theirProps: n, ...i }) { + var a; + let s = kl(n, r), o = Object.assign(i, { props: s }); + if (e || t & 2 && s.static) + return lr(o); if (t & 1) { - let l = (s = a.unmount) == null || s ? 0 : 1; - return Z(l, { [0]() { + let l = (a = s.unmount) == null || a ? 0 : 1; + return X(l, { [0]() { return null; }, [1]() { - return sr({ ...i, props: { ...a, hidden: !0, style: { display: "none" } } }); + return lr({ ...i, props: { ...s, hidden: !0, style: { display: "none" } } }); } }); } - return sr(o); + return lr(o); } -function sr({ props: e, attrs: t, slots: r, slot: n, name: i }) { - var s; - let { as: a, ...o } = Di(e, ["unmount", "static"]), l = (s = r.default) == null ? void 0 : s.call(r, n), u = {}; +function lr({ props: e, attrs: t, slots: r, slot: n, name: i }) { + var a; + let { as: s, ...o } = ki(e, ["unmount", "static"]), l = (a = r.default) == null ? void 0 : a.call(r, n), u = {}; if (n) { - let c = !1, p = []; + let c = !1, h = []; for (let [f, d] of Object.entries(n)) - typeof d == "boolean" && (c = !0), d === !0 && p.push(f); - c && (u["data-headlessui-state"] = p.join(" ")); + typeof d == "boolean" && (c = !0), d === !0 && h.push(f); + c && (u["data-headlessui-state"] = h.join(" ")); } - if (a === "template") { - if (l = qi(l != null ? l : []), Object.keys(o).length > 0 || Object.keys(t).length > 0) { - let [c, ...p] = l != null ? l : []; - if (!ql(c) || p.length > 0) + if (s === "template") { + if (l = Di(l != null ? l : []), Object.keys(o).length > 0 || Object.keys(t).length > 0) { + let [c, ...h] = l != null ? l : []; + if (!Ll(c) || h.length > 0) throw new Error(['Passing props on "template"!', "", `The current component <${i} /> is rendering a "template".`, "However we need to passthrough the following props:", Object.keys(o).concat(Object.keys(t)).sort((f, d) => f.localeCompare(d)).map((f) => ` - ${f}`).join(` `), "", "You can apply a few solutions:", ['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".', "Render a single element as the child so that we can forward the props onto that element."].map((f) => ` - ${f}`).join(` `)].join(` `)); - return xs(c, Object.assign({}, o, u)); + return Ta(c, Object.assign({}, o, u)); } return Array.isArray(l) && l.length === 1 ? l[0] : l; } - return B(a, Object.assign({}, o, u), { default: () => l }); + return R(s, Object.assign({}, o, u), { default: () => l }); } -function qi(e) { - return e.flatMap((t) => t.type === Cr ? qi(t.children) : [t]); +function Di(e) { + return e.flatMap((t) => t.type === Cr ? Di(t.children) : [t]); } -function Fl(...e) { +function kl(...e) { if (e.length === 0) return {}; if (e.length === 1) @@ -946,145 +953,145 @@ function Fl(...e) { if (t.disabled || t["aria-disabled"]) return Object.assign(t, Object.fromEntries(Object.keys(r).map((n) => [n, void 0]))); for (let n in r) - Object.assign(t, { [n](i, ...s) { - let a = r[n]; - for (let o of a) { + Object.assign(t, { [n](i, ...a) { + let s = r[n]; + for (let o of s) { if (i instanceof Event && i.defaultPrevented) return; - o(i, ...s); + o(i, ...a); } } }); return t; } -function Di(e, t = []) { +function ki(e, t = []) { let r = Object.assign({}, e); for (let n of t) n in r && delete r[n]; return r; } -function ql(e) { +function Ll(e) { return e == null ? !1 : typeof e.type == "string" || typeof e.type == "object" || typeof e.type == "function"; } -let Dl = 0; -function Ll() { - return ++Dl; +let jl = 0; +function Bl() { + return ++jl; } -function Ve() { - return Ll(); +function Ue() { + return Bl(); } var Li = ((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))(Li || {}); -function he(e) { +function oe(e) { var t; return e == null || e.value == null ? null : (t = e.value.$el) != null ? t : e.value; } let ji = Symbol("Context"); -var Be = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(Be || {}); -function jl() { - return Gr() !== null; +var Re = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(Re || {}); +function Ml() { + return Kr() !== null; } -function Gr() { - return U(ji, null); +function Kr() { + return H(ji, null); } -function kl(e) { - ie(ji, e); +function Rl(e) { + ae(ji, e); } -const Wt = typeof window > "u" || typeof document > "u"; -function et(e) { - if (Wt) +const Kt = typeof window > "u" || typeof document > "u"; +function at(e) { + if (Kt) return null; if (e instanceof Node) return e.ownerDocument; if (e != null && e.hasOwnProperty("value")) { - let t = he(e); + let t = oe(e); if (t) return t.ownerDocument; } return document; } -let pr = ["[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 pt = ((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))(pt || {}), ki = ((e) => (e[e.Error = 0] = "Error", e[e.Overflow = 1] = "Overflow", e[e.Success = 2] = "Success", e[e.Underflow = 3] = "Underflow", e))(ki || {}), Bl = ((e) => (e[e.Previous = -1] = "Previous", e[e.Next = 1] = "Next", e))(Bl || {}); -function Rl(e = document.body) { - return e == null ? [] : Array.from(e.querySelectorAll(pr)); +let vr = ["[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 $e = ((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))($e || {}), Bi = ((e) => (e[e.Error = 0] = "Error", e[e.Overflow = 1] = "Overflow", e[e.Success = 2] = "Success", e[e.Underflow = 3] = "Underflow", e))(Bi || {}), Nl = ((e) => (e[e.Previous = -1] = "Previous", e[e.Next = 1] = "Next", e))(Nl || {}); +function Vl(e = document.body) { + return e == null ? [] : Array.from(e.querySelectorAll(vr)).sort((t, r) => Math.sign((t.tabIndex || Number.MAX_SAFE_INTEGER) - (r.tabIndex || Number.MAX_SAFE_INTEGER))); } -var Bi = ((e) => (e[e.Strict = 0] = "Strict", e[e.Loose = 1] = "Loose", e))(Bi || {}); -function Ml(e, t = 0) { +var Mi = ((e) => (e[e.Strict = 0] = "Strict", e[e.Loose = 1] = "Loose", e))(Mi || {}); +function Hl(e, t = 0) { var r; - return e === ((r = et(e)) == null ? void 0 : r.body) ? !1 : Z(t, { [0]() { - return e.matches(pr); + return e === ((r = at(e)) == null ? void 0 : r.body) ? !1 : X(t, { [0]() { + return e.matches(vr); }, [1]() { let n = e; for (; n !== null; ) { - if (n.matches(pr)) + if (n.matches(vr)) return !0; n = n.parentElement; } return !1; } }); } -function ut(e) { +function Qe(e) { e == null || e.focus({ preventScroll: !0 }); } -let Nl = ["textarea", "input"].join(","); -function Vl(e) { +let Ul = ["textarea", "input"].join(","); +function Wl(e) { var t, r; - return (r = (t = e == null ? void 0 : e.matches) == null ? void 0 : t.call(e, Nl)) != null ? r : !1; + return (r = (t = e == null ? void 0 : e.matches) == null ? void 0 : t.call(e, Ul)) != null ? r : !1; } -function Hl(e, t = (r) => r) { +function zl(e, t = (r) => r) { return e.slice().sort((r, n) => { - let i = t(r), s = t(n); - if (i === null || s === null) + let i = t(r), a = t(n); + if (i === null || a === null) return 0; - let a = i.compareDocumentPosition(s); - return a & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : a & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0; + let s = i.compareDocumentPosition(a); + return s & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : s & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0; }); } -function hr(e, t, r = !0, n = null) { - var i; - let s = (i = Array.isArray(e) ? e.length > 0 ? e[0].ownerDocument : document : e == null ? void 0 : e.ownerDocument) != null ? i : document, a = Array.isArray(e) ? r ? Hl(e) : e : Rl(e); - n = n != null ? n : s.activeElement; - let o = (() => { +function Ft(e, t, { sorted: r = !0, relativeTo: n = null, skipElements: i = [] } = {}) { + var a; + let s = (a = Array.isArray(e) ? e.length > 0 ? e[0].ownerDocument : document : e == null ? void 0 : e.ownerDocument) != null ? a : document, o = Array.isArray(e) ? r ? zl(e) : e : Vl(e); + i.length > 0 && (o = o.filter((p) => !i.includes(p))), n = n != null ? n : s.activeElement; + let l = (() => { if (t & 5) return 1; if (t & 10) return -1; throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last"); - })(), l = (() => { + })(), u = (() => { if (t & 1) return 0; if (t & 2) - return Math.max(0, a.indexOf(n)) - 1; + return Math.max(0, o.indexOf(n)) - 1; if (t & 4) - return Math.max(0, a.indexOf(n)) + 1; + return Math.max(0, o.indexOf(n)) + 1; if (t & 8) - return a.length - 1; + return o.length - 1; throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last"); - })(), u = t & 32 ? { preventScroll: !0 } : {}, c = 0, p = a.length, f; + })(), c = t & 32 ? { preventScroll: !0 } : {}, h = 0, f = o.length, d; do { - if (c >= p || c + p <= 0) + if (h >= f || h + f <= 0) return 0; - let d = l + c; + let p = u + h; if (t & 16) - d = (d + p) % p; + p = (p + f) % f; else { - if (d < 0) + if (p < 0) return 3; - if (d >= p) + if (p >= f) return 1; } - f = a[d], f == null || f.focus(u), c += o; - } while (f !== s.activeElement); - return t & 6 && Vl(f) && f.select(), f.hasAttribute("tabindex") || f.setAttribute("tabindex", "0"), 2; + d = o[p], d == null || d.focus(c), h += l; + } while (d !== s.activeElement); + return t & 6 && Wl(d) && d.select(), d.hasAttribute("tabindex") || d.setAttribute("tabindex", "0"), 2; } -function ar(e, t, r) { - Wt || te((n) => { +function ur(e, t, r) { + Kt || ne((n) => { document.addEventListener(e, t, r), n(() => document.removeEventListener(e, t, r)); }); } -function Ul(e, t, r = P(() => !0)) { - function n(s, a) { - if (!r.value || s.defaultPrevented) +function Gl(e, t, r = F(() => !0)) { + function n(a, s) { + if (!r.value || a.defaultPrevented) return; - let o = a(s); + let o = s(a); if (o === null || !o.getRootNode().contains(o)) return; let l = function u(c) { @@ -1093,96 +1100,111 @@ function Ul(e, t, r = P(() => !0)) { for (let u of l) { if (u === null) continue; - let c = u instanceof HTMLElement ? u : he(u); - if (c != null && c.contains(o)) + let c = u instanceof HTMLElement ? u : oe(u); + if (c != null && c.contains(o) || a.composed && a.composedPath().includes(c)) return; } - return !Ml(o, Bi.Loose) && o.tabIndex !== -1 && s.preventDefault(), t(s, o); + return !Hl(o, Mi.Loose) && o.tabIndex !== -1 && a.preventDefault(), t(a, o); } let i = b(null); - ar("mousedown", (s) => { - var a, o; - r.value && (i.value = ((o = (a = s.composedPath) == null ? void 0 : a.call(s)) == null ? void 0 : o[0]) || s.target); - }, !0), ar("click", (s) => { - !i.value || (n(s, () => i.value), i.value = null); - }, !0), ar("blur", (s) => n(s, () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null), !0); -} -var Lt = ((e) => (e[e.None = 1] = "None", e[e.Focusable = 2] = "Focusable", e[e.Hidden = 4] = "Hidden", e))(Lt || {}); -let mr = z({ name: "Hidden", props: { as: { type: [Object, String], default: "div" }, features: { type: Number, default: 1 } }, setup(e, { slots: t, attrs: r }) { + ur("mousedown", (a) => { + var s, o; + r.value && (i.value = ((o = (s = a.composedPath) == null ? void 0 : s.call(a)) == null ? void 0 : o[0]) || a.target); + }, !0), ur("click", (a) => { + !i.value || (n(a, () => i.value), i.value = null); + }, !0), ur("blur", (a) => n(a, () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null), !0); +} +var jt = ((e) => (e[e.None = 1] = "None", e[e.Focusable = 2] = "Focusable", e[e.Hidden = 4] = "Hidden", e))(jt || {}); +let gr = W({ name: "Hidden", props: { as: { type: [Object, String], default: "div" }, features: { type: Number, default: 1 } }, setup(e, { slots: t, attrs: r }) { return () => { - let { features: n, ...i } = e, s = { "aria-hidden": (n & 2) === 2 ? !0 : void 0, style: { position: "fixed", top: 1, left: 1, width: 1, height: 0, padding: 0, margin: -1, overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0", ...(n & 4) === 4 && (n & 2) !== 2 && { display: "none" } } }; - return G({ ourProps: s, theirProps: i, slot: {}, attrs: r, slots: t, name: "Hidden" }); + let { features: n, ...i } = e, a = { "aria-hidden": (n & 2) === 2 ? !0 : void 0, style: { position: "fixed", top: 1, left: 1, width: 1, height: 0, padding: 0, margin: -1, overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0", ...(n & 4) === 4 && (n & 2) !== 2 && { display: "none" } } }; + return z({ ourProps: a, theirProps: i, slot: {}, attrs: r, slots: t, name: "Hidden" }); }; } }); -function Wl(e, t, r) { - Wt || te((n) => { +function Kl(e, t, r) { + Kt || ne((n) => { window.addEventListener(e, t, r), n(() => window.removeEventListener(e, t, r)); }); } -var vr = ((e) => (e[e.Forwards = 0] = "Forwards", e[e.Backwards = 1] = "Backwards", e))(vr || {}); -function zl() { +var pt = ((e) => (e[e.Forwards = 0] = "Forwards", e[e.Backwards = 1] = "Backwards", e))(pt || {}); +function Xl() { let e = b(0); - return Wl("keydown", (t) => { + return Kl("keydown", (t) => { t.key === "Tab" && (e.value = t.shiftKey ? 1 : 0); }), e; } function Ri(e, t, r, n) { - Wt || te((i) => { + Kt || ne((i) => { e = e != null ? e : window, e.addEventListener(t, r, n), i(() => e.removeEventListener(t, r, n)); }); } -function Gl(e) { +function Yl(e) { typeof queueMicrotask == "function" ? queueMicrotask(e) : Promise.resolve().then(e).catch((t) => setTimeout(() => { throw t; })); } -var Mi = ((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))(Mi || {}); -let at = Object.assign(z({ name: "FocusTrap", props: { as: { type: [Object, String], default: "div" }, initialFocus: { type: Object, default: null }, features: { type: Number, default: 30 }, containers: { type: Object, default: b(/* @__PURE__ */ new Set()) } }, inheritAttrs: !1, setup(e, { attrs: t, slots: r, expose: n }) { +var Ni = ((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))(Ni || {}); +let dt = Object.assign(W({ name: "FocusTrap", props: { as: { type: [Object, String], default: "div" }, initialFocus: { type: Object, default: null }, features: { type: Number, default: 30 }, containers: { type: Object, default: b(/* @__PURE__ */ new Set()) } }, inheritAttrs: !1, setup(e, { attrs: t, slots: r, expose: n }) { let i = b(null); n({ el: i, $el: i }); - let s = P(() => et(i)); - Kl({ ownerDocument: s }, P(() => Boolean(e.features & 16))); - let a = Xl({ ownerDocument: s, container: i, initialFocus: P(() => e.initialFocus) }, P(() => Boolean(e.features & 2))); - Ql({ ownerDocument: s, container: i, containers: e.containers, previousActiveElement: a }, P(() => Boolean(e.features & 8))); - let o = zl(); - function l() { - let u = he(i); - !u || Z(o.value, { [vr.Forwards]: () => hr(u, pt.First), [vr.Backwards]: () => hr(u, pt.Last) }); + let a = F(() => at(i)); + Ql({ ownerDocument: a }, F(() => Boolean(e.features & 16))); + let s = Jl({ ownerDocument: a, container: i, initialFocus: F(() => e.initialFocus) }, F(() => Boolean(e.features & 2))); + Zl({ ownerDocument: a, container: i, containers: e.containers, previousActiveElement: s }, F(() => Boolean(e.features & 8))); + let o = Xl(); + function l(f) { + let d = oe(i); + !d || ((p) => p())(() => { + X(o.value, { [pt.Forwards]: () => Ft(d, $e.First, { skipElements: [f.relatedTarget] }), [pt.Backwards]: () => Ft(d, $e.Last, { skipElements: [f.relatedTarget] }) }); + }); + } + let u = b(!1); + function c(f) { + f.key === "Tab" && (u.value = !0, requestAnimationFrame(() => { + u.value = !1; + })); + } + function h(f) { + var d; + let p = new Set((d = e.containers) == null ? void 0 : d.value); + p.add(i); + let m = f.relatedTarget; + !m || m.dataset.headlessuiFocusGuard !== "true" && (Vi(p, m) || (u.value ? Ft(oe(i), X(o.value, { [pt.Forwards]: () => $e.Next, [pt.Backwards]: () => $e.Previous }) | $e.WrapAround, { relativeTo: f.target }) : f.target instanceof HTMLElement && Qe(f.target))); } return () => { - let u = {}, c = { ref: i }, { features: p, initialFocus: f, containers: d, ...h } = e; - return B(Cr, [Boolean(p & 4) && B(mr, { as: "button", type: "button", onFocus: l, features: Lt.Focusable }), G({ ourProps: c, theirProps: { ...t, ...h }, slot: u, attrs: t, slots: r, name: "FocusTrap" }), Boolean(p & 4) && B(mr, { as: "button", type: "button", onFocus: l, features: Lt.Focusable })]); + let f = {}, d = { ref: i, onKeydown: c, onFocusout: h }, { features: p, initialFocus: m, containers: g, ...x } = e; + return R(Cr, [Boolean(p & 4) && R(gr, { as: "button", type: "button", "data-headlessui-focus-guard": !0, onFocus: l, features: jt.Focusable }), z({ ourProps: d, theirProps: { ...t, ...x }, slot: f, attrs: t, slots: r, name: "FocusTrap" }), Boolean(p & 4) && R(gr, { as: "button", type: "button", "data-headlessui-focus-guard": !0, onFocus: l, features: jt.Focusable })]); }; -} }), { features: Mi }); -function Kl({ ownerDocument: e }, t) { +} }), { features: Ni }); +function Ql({ ownerDocument: e }, t) { let r = b(null); function n() { - var s; - r.value || (r.value = (s = e.value) == null ? void 0 : s.activeElement); + var a; + r.value || (r.value = (a = e.value) == null ? void 0 : a.activeElement); } function i() { - !r.value || (ut(r.value), r.value = null); + !r.value || (Qe(r.value), r.value = null); } - M(() => { - vt(t, (s, a) => { - s !== a && (s ? n() : i()); + N(() => { + bt(t, (a, s) => { + a !== s && (a ? n() : i()); }, { immediate: !0 }); - }), Te(i); + }), Pe(i); } -function Xl({ ownerDocument: e, container: t, initialFocus: r }, n) { - let i = b(null), s = b(!1); - return M(() => s.value = !0), Te(() => s.value = !1), M(() => { - vt([t, r, n], (a, o) => { - if (a.every((u, c) => (o == null ? void 0 : o[c]) === u) || !n.value) +function Jl({ ownerDocument: e, container: t, initialFocus: r }, n) { + let i = b(null), a = b(!1); + return N(() => a.value = !0), Pe(() => a.value = !1), N(() => { + bt([t, r, n], (s, o) => { + if (s.every((u, c) => (o == null ? void 0 : o[c]) === u) || !n.value) return; - let l = he(t); - !l || Gl(() => { + let l = oe(t); + !l || Yl(() => { var u, c; - if (!s.value) + if (!a.value) return; - let p = he(r), f = (u = e.value) == null ? void 0 : u.activeElement; - if (p) { - if (p === f) { + let h = oe(r), f = (u = e.value) == null ? void 0 : u.activeElement; + if (h) { + if (h === f) { i.value = f; return; } @@ -1190,14 +1212,14 @@ function Xl({ ownerDocument: e, container: t, initialFocus: r }, n) { i.value = f; return; } - p ? ut(p) : hr(l, pt.First | pt.NoScroll) === ki.Error && console.warn("There are no focusable elements inside the "), i.value = (c = e.value) == null ? void 0 : c.activeElement; + h ? Qe(h) : Ft(l, $e.First | $e.NoScroll) === Bi.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 Ql({ ownerDocument: e, container: t, containers: r, previousActiveElement: n }, i) { - var s; - Ri((s = e.value) == null ? void 0 : s.defaultView, "focus", (a) => { +function Zl({ ownerDocument: e, container: t, containers: r, previousActiveElement: n }, i) { + var a; + Ri((a = e.value) == null ? void 0 : a.defaultView, "focus", (s) => { if (!i.value) return; let o = new Set(r == null ? void 0 : r.value); @@ -1205,70 +1227,70 @@ function Ql({ ownerDocument: e, container: t, containers: r, previousActiveEleme let l = n.value; if (!l) return; - let u = a.target; - u && u instanceof HTMLElement ? Jl(o, u) ? (n.value = u, ut(u)) : (a.preventDefault(), a.stopPropagation(), ut(l)) : ut(n.value); + let u = s.target; + u && u instanceof HTMLElement ? Vi(o, u) ? (n.value = u, Qe(u)) : (s.preventDefault(), s.stopPropagation(), Qe(l)) : Qe(n.value); }, !0); } -function Jl(e, t) { +function Vi(e, t) { var r; for (let n of e) if ((r = n.value) != null && r.contains(t)) return !0; return !1; } -let _n = "body > *", We = /* @__PURE__ */ new Set(), be = /* @__PURE__ */ new Map(); -function An(e) { +let An = "body > *", Ke = /* @__PURE__ */ new Set(), Se = /* @__PURE__ */ new Map(); +function In(e) { e.setAttribute("aria-hidden", "true"), e.inert = !0; } -function In(e) { - let t = be.get(e); +function Pn(e) { + let t = Se.get(e); !t || (t["aria-hidden"] === null ? e.removeAttribute("aria-hidden") : e.setAttribute("aria-hidden", t["aria-hidden"]), e.inert = t.inert); } -function Yl(e, t = b(!0)) { - te((r) => { +function eu(e, t = b(!0)) { + ne((r) => { if (!t.value || !e.value) return; - let n = e.value, i = et(n); + let n = e.value, i = at(n); if (i) { - We.add(n); - for (let s of be.keys()) - s.contains(n) && (In(s), be.delete(s)); - i.querySelectorAll(_n).forEach((s) => { - if (s instanceof HTMLElement) { - for (let a of We) - if (s.contains(a)) + Ke.add(n); + for (let a of Se.keys()) + a.contains(n) && (Pn(a), Se.delete(a)); + i.querySelectorAll(An).forEach((a) => { + if (a instanceof HTMLElement) { + for (let s of Ke) + if (a.contains(s)) return; - We.size === 1 && (be.set(s, { "aria-hidden": s.getAttribute("aria-hidden"), inert: s.inert }), An(s)); + Ke.size === 1 && (Se.set(a, { "aria-hidden": a.getAttribute("aria-hidden"), inert: a.inert }), In(a)); } }), r(() => { - if (We.delete(n), We.size > 0) - i.querySelectorAll(_n).forEach((s) => { - if (s instanceof HTMLElement && !be.has(s)) { - for (let a of We) - if (s.contains(a)) + if (Ke.delete(n), Ke.size > 0) + i.querySelectorAll(An).forEach((a) => { + if (a instanceof HTMLElement && !Se.has(a)) { + for (let s of Ke) + if (a.contains(s)) return; - be.set(s, { "aria-hidden": s.getAttribute("aria-hidden"), inert: s.inert }), An(s); + Se.set(a, { "aria-hidden": a.getAttribute("aria-hidden"), inert: a.inert }), In(a); } }); else - for (let s of be.keys()) - In(s), be.delete(s); + for (let a of Se.keys()) + Pn(a), Se.delete(a); }); } }); } -let Ni = Symbol("ForcePortalRootContext"); -function Zl() { - return U(Ni, !1); +let Hi = Symbol("ForcePortalRootContext"); +function tu() { + return H(Hi, !1); } -let gr = z({ name: "ForcePortalRoot", props: { as: { type: [Object, String], default: "template" }, force: { type: Boolean, default: !1 } }, setup(e, { slots: t, attrs: r }) { - return ie(Ni, e.force), () => { +let yr = W({ name: "ForcePortalRoot", props: { as: { type: [Object, String], default: "template" }, force: { type: Boolean, default: !1 } }, setup(e, { slots: t, attrs: r }) { + return ae(Hi, e.force), () => { let { force: n, ...i } = e; - return G({ theirProps: i, ourProps: {}, slot: {}, slots: t, attrs: r, name: "ForcePortalRoot" }); + return z({ theirProps: i, ourProps: {}, slot: {}, slots: t, attrs: r, name: "ForcePortalRoot" }); }; } }); -function eu(e) { - let t = et(e); +function ru(e) { + let t = at(e); if (!t) { if (e === null) return null; @@ -1280,11 +1302,11 @@ function eu(e) { let n = t.createElement("div"); return n.setAttribute("id", "headlessui-portal-root"), t.body.appendChild(n); } -let Vi = z({ name: "Portal", props: { as: { type: [Object, String], default: "div" } }, setup(e, { slots: t, attrs: r }) { - let n = b(null), i = P(() => et(n)), s = Zl(), a = U(Hi, null), o = b(s === !0 || a == null ? eu(n.value) : a.resolveTarget()); - return te(() => { - s || a != null && (o.value = a.resolveTarget()); - }), Te(() => { +let Ui = W({ name: "Portal", props: { as: { type: [Object, String], default: "div" } }, setup(e, { slots: t, attrs: r }) { + let n = b(null), i = F(() => at(n)), a = tu(), s = H(Wi, null), o = b(a === !0 || s == null ? ru(n.value) : s.resolveTarget()); + return ne(() => { + a || s != null && (o.value = s.resolveTarget()); + }), Pe(() => { var l, u; let c = (l = i.value) == null ? void 0 : l.getElementById("headlessui-portal-root"); !c || o.value === c && o.value.children.length <= 0 && ((u = o.value.parentElement) == null || u.removeChild(o.value)); @@ -1292,64 +1314,64 @@ let Vi = z({ name: "Portal", props: { as: { type: [Object, String], default: "di if (o.value === null) return null; let l = { ref: n, "data-headlessui-portal": "" }; - return B(ii, { to: o.value }, G({ ourProps: l, theirProps: e, slot: {}, attrs: r, slots: t, name: "Portal" })); + return R(ai, { to: o.value }, z({ ourProps: l, theirProps: e, slot: {}, attrs: r, slots: t, name: "Portal" })); }; -} }), Hi = Symbol("PortalGroupContext"), tu = z({ name: "PortalGroup", props: { as: { type: [Object, String], default: "template" }, target: { type: Object, default: null } }, setup(e, { attrs: t, slots: r }) { - let n = Es({ resolveTarget() { +} }), Wi = Symbol("PortalGroupContext"), nu = W({ name: "PortalGroup", props: { as: { type: [Object, String], default: "template" }, target: { type: Object, default: null } }, setup(e, { attrs: t, slots: r }) { + let n = _a({ resolveTarget() { return e.target; } }); - return ie(Hi, n), () => { - let { target: i, ...s } = e; - return G({ theirProps: s, ourProps: {}, slot: {}, attrs: t, slots: r, name: "PortalGroup" }); + return ae(Wi, n), () => { + let { target: i, ...a } = e; + return z({ theirProps: a, ourProps: {}, slot: {}, attrs: t, slots: r, name: "PortalGroup" }); }; -} }), Ui = Symbol("StackContext"); -var yr = ((e) => (e[e.Add = 0] = "Add", e[e.Remove = 1] = "Remove", e))(yr || {}); -function ru() { - return U(Ui, () => { +} }), zi = Symbol("StackContext"); +var br = ((e) => (e[e.Add = 0] = "Add", e[e.Remove = 1] = "Remove", e))(br || {}); +function iu() { + return H(zi, () => { }); } -function nu({ type: e, enabled: t, element: r, onUpdate: n }) { - let i = ru(); - function s(...a) { - n == null || n(...a), i(...a); +function au({ type: e, enabled: t, element: r, onUpdate: n }) { + let i = iu(); + function a(...s) { + n == null || n(...s), i(...s); } - M(() => { - vt(t, (a, o) => { - a ? s(0, e, r) : o === !0 && s(1, e, r); + N(() => { + bt(t, (s, o) => { + s ? a(0, e, r) : o === !0 && a(1, e, r); }, { immediate: !0, flush: "sync" }); - }), Te(() => { - t.value && s(1, e, r); - }), ie(Ui, s); + }), Pe(() => { + t.value && a(1, e, r); + }), ae(zi, a); } -let Wi = Symbol("DescriptionContext"); -function iu() { - let e = U(Wi, null); +let Gi = Symbol("DescriptionContext"); +function su() { + let e = H(Gi, null); if (e === null) throw new Error("Missing parent"); return e; } -function su({ slot: e = b({}), name: t = "Description", props: r = {} } = {}) { +function ou({ slot: e = b({}), name: t = "Description", props: r = {} } = {}) { let n = b([]); - function i(s) { - return n.value.push(s), () => { - let a = n.value.indexOf(s); - a !== -1 && n.value.splice(a, 1); + function i(a) { + return n.value.push(a), () => { + let s = n.value.indexOf(a); + s !== -1 && n.value.splice(s, 1); }; } - return ie(Wi, { register: i, slot: e, name: t, props: r }), P(() => n.value.length > 0 ? n.value.join(" ") : void 0); + return ae(Gi, { register: i, slot: e, name: t, props: r }), F(() => n.value.length > 0 ? n.value.join(" ") : void 0); } -let ip = z({ name: "Description", props: { as: { type: [Object, String], default: "p" } }, setup(e, { attrs: t, slots: r }) { - let n = iu(), i = `headlessui-description-${Ve()}`; - return M(() => Te(n.register(i))), () => { - let { name: s = "Description", slot: a = b({}), props: o = {} } = n, l = e, u = { ...Object.entries(o).reduce((c, [p, f]) => Object.assign(c, { [p]: H(f) }), {}), id: i }; - return G({ ourProps: u, theirProps: l, slot: a.value, attrs: t, slots: r, name: s }); +let sp = W({ name: "Description", props: { as: { type: [Object, String], default: "p" }, id: { type: String, default: () => `headlessui-description-${Ue()}` } }, setup(e, { attrs: t, slots: r }) { + let n = su(); + return N(() => Pe(n.register(e.id))), () => { + let { name: i = "Description", slot: a = b({}), props: s = {} } = n, { id: o, ...l } = e, u = { ...Object.entries(s).reduce((c, [h, f]) => Object.assign(c, { [h]: V(f) }), {}), id: o }; + return z({ ourProps: u, theirProps: l, slot: a.value, attrs: t, slots: r, name: i }); }; } }); -function Kr() { +function Xr() { let e = [], t = [], r = { enqueue(n) { t.push(n); - }, addEventListener(n, i, s, a) { - return n.addEventListener(i, s, a), r.add(() => n.removeEventListener(i, s, a)); + }, addEventListener(n, i, a, s) { + return n.addEventListener(i, a, s), r.add(() => n.removeEventListener(i, a, s)); }, requestAnimationFrame(...n) { let i = requestAnimationFrame(...n); r.add(() => cancelAnimationFrame(i)); @@ -1371,262 +1393,285 @@ function Kr() { } }; return r; } -function au() { +function lu() { return /iPhone/gi.test(window.navigator.platform) || /Mac/gi.test(window.navigator.platform) && window.navigator.maxTouchPoints > 0; } -var ou = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(ou || {}); -let br = Symbol("DialogContext"); -function yt(e) { - let t = U(br, null); +var uu = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(uu || {}); +let wr = Symbol("DialogContext"); +function St(e) { + let t = H(wr, null); if (t === null) { let r = new Error(`<${e} /> is missing a parent component.`); - throw Error.captureStackTrace && Error.captureStackTrace(r, yt), r; + throw Error.captureStackTrace && Error.captureStackTrace(r, St), r; } return t; } -let Tt = "DC8F892D-2EBD-447C-A4C8-A03058436FF4", Xr = z({ 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: Tt }, initialFocus: { type: Object, default: null } }, emits: { close: (e) => !0 }, setup(e, { emit: t, attrs: r, slots: n, expose: i }) { - var s; - let a = b(!1); - M(() => { - a.value = !0; +let _t = "DC8F892D-2EBD-447C-A4C8-A03058436FF4", Yr = W({ name: "Dialog", inheritAttrs: !1, props: { as: { type: [Object, String], default: "div" }, static: { type: Boolean, default: !1 }, unmount: { type: Boolean, default: !0 }, open: { type: [Boolean, String], default: _t }, initialFocus: { type: Object, default: null }, id: { type: String, default: () => `headlessui-dialog-${Ue()}` } }, emits: { close: (e) => !0 }, setup(e, { emit: t, attrs: r, slots: n, expose: i }) { + var a; + let s = b(!1); + N(() => { + s.value = !0; }); - let o = b(0), l = Gr(), u = P(() => e.open === Tt && l !== null ? Z(l.value, { [Be.Open]: !0, [Be.Closed]: !1 }) : e.open), c = b(/* @__PURE__ */ new Set()), p = b(null), f = b(null), d = P(() => et(p)); - if (i({ el: p, $el: p }), !(e.open !== Tt || l !== null)) + let o = b(0), l = Kr(), u = F(() => e.open === _t && l !== null ? X(l.value, { [Re.Open]: !0, [Re.Closed]: !1 }) : e.open), c = b(/* @__PURE__ */ new Set()), h = b(null), f = b(null), d = F(() => at(h)); + if (i({ el: h, $el: h }), !(e.open !== _t || l !== null)) throw new Error("You forgot to provide an `open` prop to the `Dialog`."); if (typeof u.value != "boolean") - throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${u.value === Tt ? void 0 : e.open}`); - let h = P(() => a.value && u.value ? 0 : 1), y = P(() => h.value === 0), v = P(() => o.value > 1), T = U(br, null) !== null, A = P(() => v.value ? "parent" : "leaf"); - Yl(p, P(() => v.value ? y.value : !1)), nu({ type: "Dialog", enabled: P(() => h.value === 0), element: p, onUpdate: (w, S, E) => { - if (S === "Dialog") - return Z(w, { [yr.Add]() { - c.value.add(E), o.value += 1; - }, [yr.Remove]() { - c.value.delete(E), o.value -= 1; + throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${u.value === _t ? void 0 : e.open}`); + let p = F(() => s.value && u.value ? 0 : 1), m = F(() => p.value === 0), g = F(() => o.value > 1), x = H(wr, null) !== null, A = F(() => g.value ? "parent" : "leaf"); + eu(h, F(() => g.value ? m.value : !1)), au({ type: "Dialog", enabled: F(() => p.value === 0), element: h, onUpdate: (w, O, $) => { + if (O === "Dialog") + return X(w, { [br.Add]() { + c.value.add($), o.value += 1; + }, [br.Remove]() { + c.value.delete($), o.value -= 1; } }); } }); - let I = su({ name: "DialogDescription", slot: P(() => ({ open: u.value })) }), x = `headlessui-dialog-${Ve()}`, O = b(null), g = { titleId: O, panelRef: b(null), dialogState: h, setTitleId(w) { - O.value !== w && (O.value = w); + let I = ou({ name: "DialogDescription", slot: F(() => ({ open: u.value })) }), E = b(null), S = { titleId: E, panelRef: b(null), dialogState: p, setTitleId(w) { + E.value !== w && (E.value = w); }, close() { t("close", !1); } }; - return ie(br, g), Ul(() => { - var w, S, E; - return [...Array.from((S = (w = d.value) == null ? void 0 : w.querySelectorAll("body > *, [data-headlessui-portal]")) != null ? S : []).filter((_) => !(!(_ instanceof HTMLElement) || _.contains(he(f)) || g.panelRef.value && _.contains(g.panelRef.value))), (E = g.panelRef.value) != null ? E : p.value]; - }, (w, S) => { - g.close(), je(() => S == null ? void 0 : S.focus()); - }, P(() => h.value === 0 && !v.value)), Ri((s = d.value) == null ? void 0 : s.defaultView, "keydown", (w) => { - w.defaultPrevented || w.key === Li.Escape && h.value === 0 && (v.value || (w.preventDefault(), w.stopPropagation(), g.close())); - }), te((w) => { - var S; - if (h.value !== 0 || T) + ae(wr, S); + function y() { + var w, O, $; + return [...Array.from((O = (w = d.value) == null ? void 0 : w.querySelectorAll("body > *, [data-headlessui-portal]")) != null ? O : []).filter((T) => !(!(T instanceof HTMLElement) || T.contains(oe(f)) || S.panelRef.value && T.contains(S.panelRef.value))), ($ = S.panelRef.value) != null ? $ : h.value]; + } + return Gl(() => y(), (w, O) => { + S.close(), xe(() => O == null ? void 0 : O.focus()); + }, F(() => p.value === 0 && !g.value)), Ri((a = d.value) == null ? void 0 : a.defaultView, "keydown", (w) => { + w.defaultPrevented || w.key === Li.Escape && p.value === 0 && (g.value || (w.preventDefault(), w.stopPropagation(), S.close())); + }), ne((w) => { + var O; + if (p.value !== 0 || x) return; - let E = d.value; - if (!E) + let $ = d.value; + if (!$) return; - let _ = Kr(); - function $(k, V, R) { - let N = k.style.getPropertyValue(V); - return Object.assign(k.style, { [V]: R }), _.add(() => { - Object.assign(k.style, { [V]: N }); + let T = Xr(), _ = window.pageYOffset; + function D(j, P, B) { + let ye = j.style.getPropertyValue(P); + return Object.assign(j.style, { [P]: B }), T.add(() => { + Object.assign(j.style, { [P]: ye }); }); } - let C = E == null ? void 0 : E.documentElement, j = ((S = E.defaultView) != null ? S : window).innerWidth - C.clientWidth; - if ($(C, "overflow", "hidden"), j > 0) { - let k = C.clientWidth - C.offsetWidth, V = j - k; - $(C, "paddingRight", `${V}px`); + let k = $ == null ? void 0 : $.documentElement, J = ((O = $.defaultView) != null ? O : window).innerWidth - k.clientWidth; + if (D(k, "overflow", "hidden"), J > 0) { + let j = k.clientWidth - k.offsetWidth, P = J - j; + D(k, "paddingRight", `${P}px`); } - if (au()) { - let k = window.pageYOffset; - $(C, "position", "fixed"), $(C, "marginTop", `-${k}px`), $(C, "width", "100%"), _.add(() => window.scrollTo(0, k)); + if (lu()) { + D($.body, "marginTop", `-${_}px`), window.scrollTo(0, 0); + let j = null; + T.addEventListener($, "click", (P) => { + if (P.target instanceof HTMLElement) + try { + let B = P.target.closest("a"); + if (!B) + return; + let { hash: ye } = new URL(B.href), Z = $.querySelector(ye); + Z && !y().some((ze) => ze.contains(Z)) && (j = Z); + } catch { + } + }, !0), T.addEventListener($, "touchmove", (P) => { + P.target instanceof HTMLElement && !y().some((B) => B.contains(P.target)) && P.preventDefault(); + }, { passive: !1 }), T.add(() => { + window.scrollTo(0, window.pageYOffset + _), j && j.isConnected && (j.scrollIntoView({ block: "nearest" }), j = null); + }); } - w(_.dispose); - }), te((w) => { - if (h.value !== 0) + w(T.dispose); + }), ne((w) => { + if (p.value !== 0) return; - let S = he(p); - if (!S) + let O = oe(h); + if (!O) return; - let E = new IntersectionObserver((_) => { - for (let $ of _) - $.boundingClientRect.x === 0 && $.boundingClientRect.y === 0 && $.boundingClientRect.width === 0 && $.boundingClientRect.height === 0 && g.close(); + let $ = new IntersectionObserver((T) => { + for (let _ of T) + _.boundingClientRect.x === 0 && _.boundingClientRect.y === 0 && _.boundingClientRect.width === 0 && _.boundingClientRect.height === 0 && S.close(); }); - E.observe(S), w(() => E.disconnect()); + $.observe(O), w(() => $.disconnect()); }), () => { - let w = { ...r, ref: p, id: x, role: "dialog", "aria-modal": h.value === 0 ? !0 : void 0, "aria-labelledby": O.value, "aria-describedby": I.value }, { open: S, initialFocus: E, ..._ } = e, $ = { open: h.value === 0 }; - return B(gr, { force: !0 }, () => [B(Vi, () => B(tu, { target: p.value }, () => B(gr, { force: !1 }, () => B(at, { initialFocus: E, containers: c, features: y.value ? Z(A.value, { parent: at.features.RestoreFocus, leaf: at.features.All & ~at.features.FocusLock }) : at.features.None }, () => G({ ourProps: w, theirProps: _, slot: $, attrs: r, slots: n, visible: h.value === 0, features: Dt.RenderStrategy | Dt.Static, name: "Dialog" }))))), B(mr, { features: Lt.Hidden, ref: f })]); + let { id: w, open: O, initialFocus: $, ...T } = e, _ = { ...r, ref: h, id: w, role: "dialog", "aria-modal": p.value === 0 ? !0 : void 0, "aria-labelledby": E.value, "aria-describedby": I.value }, D = { open: p.value === 0 }; + return R(yr, { force: !0 }, () => [R(Ui, () => R(nu, { target: h.value }, () => R(yr, { force: !1 }, () => R(dt, { initialFocus: $, containers: c, features: m.value ? X(A.value, { parent: dt.features.RestoreFocus, leaf: dt.features.All & ~dt.features.FocusLock }) : dt.features.None }, () => z({ ourProps: _, theirProps: T, slot: D, attrs: r, slots: n, visible: p.value === 0, features: Lt.RenderStrategy | Lt.Static, name: "Dialog" }))))), R(gr, { features: jt.Hidden, ref: f })]); }; } }); -z({ name: "DialogOverlay", props: { as: { type: [Object, String], default: "div" } }, setup(e, { attrs: t, slots: r }) { - let n = yt("DialogOverlay"), i = `headlessui-dialog-overlay-${Ve()}`; - function s(a) { +W({ name: "DialogOverlay", props: { as: { type: [Object, String], default: "div" }, id: { type: String, default: () => `headlessui-dialog-overlay-${Ue()}` } }, setup(e, { attrs: t, slots: r }) { + let n = St("DialogOverlay"); + function i(a) { a.target === a.currentTarget && (a.preventDefault(), a.stopPropagation(), n.close()); } - return () => G({ ourProps: { id: i, "aria-hidden": !0, onClick: s }, theirProps: e, slot: { open: n.dialogState.value === 0 }, attrs: t, slots: r, name: "DialogOverlay" }); + return () => { + let { id: a, ...s } = e; + return z({ ourProps: { id: a, "aria-hidden": !0, onClick: i }, theirProps: s, slot: { open: n.dialogState.value === 0 }, attrs: t, slots: r, name: "DialogOverlay" }); + }; } }); -z({ name: "DialogBackdrop", props: { as: { type: [Object, String], default: "div" } }, inheritAttrs: !1, setup(e, { attrs: t, slots: r, expose: n }) { - let i = yt("DialogBackdrop"), s = `headlessui-dialog-backdrop-${Ve()}`, a = b(null); - return n({ el: a, $el: a }), M(() => { +W({ name: "DialogBackdrop", props: { as: { type: [Object, String], default: "div" }, id: { type: String, default: () => `headlessui-dialog-backdrop-${Ue()}` } }, inheritAttrs: !1, setup(e, { attrs: t, slots: r, expose: n }) { + let i = St("DialogBackdrop"), a = b(null); + return n({ el: a, $el: a }), N(() => { if (i.panelRef.value === null) throw new Error("A component is being used, but a component is missing."); }), () => { - let o = e, l = { id: s, ref: a, "aria-hidden": !0 }; - return B(gr, { force: !0 }, () => B(Vi, () => G({ ourProps: l, theirProps: { ...t, ...o }, slot: { open: i.dialogState.value === 0 }, attrs: t, slots: r, name: "DialogBackdrop" }))); + let { id: s, ...o } = e, l = { id: s, ref: a, "aria-hidden": !0 }; + return R(yr, { force: !0 }, () => R(Ui, () => z({ ourProps: l, theirProps: { ...t, ...o }, slot: { open: i.dialogState.value === 0 }, attrs: t, slots: r, name: "DialogBackdrop" }))); }; } }); -let Qr = z({ name: "DialogPanel", props: { as: { type: [Object, String], default: "div" } }, setup(e, { attrs: t, slots: r, expose: n }) { - let i = yt("DialogPanel"), s = `headlessui-dialog-panel-${Ve()}`; +let Qr = W({ name: "DialogPanel", props: { as: { type: [Object, String], default: "div" }, id: { type: String, default: () => `headlessui-dialog-panel-${Ue()}` } }, setup(e, { attrs: t, slots: r, expose: n }) { + let i = St("DialogPanel"); n({ el: i.panelRef, $el: i.panelRef }); - function a(o) { - o.stopPropagation(); + function a(s) { + s.stopPropagation(); } return () => { - let o = { id: s, ref: i.panelRef, onClick: a }; - return G({ ourProps: o, theirProps: e, slot: { open: i.dialogState.value === 0 }, attrs: t, slots: r, name: "DialogPanel" }); + let { id: s, ...o } = e, l = { id: s, ref: i.panelRef, onClick: a }; + return z({ ourProps: l, theirProps: o, slot: { open: i.dialogState.value === 0 }, attrs: t, slots: r, name: "DialogPanel" }); }; } }); -z({ name: "DialogTitle", props: { as: { type: [Object, String], default: "h2" } }, setup(e, { attrs: t, slots: r }) { - let n = yt("DialogTitle"), i = `headlessui-dialog-title-${Ve()}`; - return M(() => { - n.setTitleId(i), Te(() => n.setTitleId(null)); - }), () => G({ ourProps: { id: i }, theirProps: e, slot: { open: n.dialogState.value === 0 }, attrs: t, slots: r, name: "DialogTitle" }); +W({ name: "DialogTitle", props: { as: { type: [Object, String], default: "h2" }, id: { type: String, default: () => `headlessui-dialog-title-${Ue()}` } }, setup(e, { attrs: t, slots: r }) { + let n = St("DialogTitle"); + return N(() => { + n.setTitleId(e.id), Pe(() => n.setTitleId(null)); + }), () => { + let { id: i, ...a } = e; + return z({ ourProps: { id: i }, theirProps: a, slot: { open: n.dialogState.value === 0 }, attrs: t, slots: r, name: "DialogTitle" }); + }; } }); -function lu(e) { +function cu(e) { let t = { called: !1 }; return (...r) => { if (!t.called) return t.called = !0, e(...r); }; } -function or(e, ...t) { +function cr(e, ...t) { e && t.length > 0 && e.classList.add(...t); } -function _t(e, ...t) { +function At(e, ...t) { e && t.length > 0 && e.classList.remove(...t); } -var wr = ((e) => (e.Finished = "finished", e.Cancelled = "cancelled", e))(wr || {}); -function uu(e, t) { - let r = Kr(); +var Sr = ((e) => (e.Finished = "finished", e.Cancelled = "cancelled", e))(Sr || {}); +function du(e, t) { + let r = Xr(); if (!e) return r.dispose; - let { transitionDuration: n, transitionDelay: i } = getComputedStyle(e), [s, a] = [n, i].map((o) => { + let { transitionDuration: n, transitionDelay: i } = getComputedStyle(e), [a, s] = [n, i].map((o) => { let [l = 0] = o.split(",").filter(Boolean).map((u) => u.includes("ms") ? parseFloat(u) : parseFloat(u) * 1e3).sort((u, c) => c - u); return l; }); - return s !== 0 ? r.setTimeout(() => t("finished"), s + a) : t("finished"), r.add(() => t("cancelled")), r.dispose; + return a !== 0 ? r.setTimeout(() => t("finished"), a + s) : t("finished"), r.add(() => t("cancelled")), r.dispose; } -function Pn(e, t, r, n, i, s) { - let a = Kr(), o = s !== void 0 ? lu(s) : () => { +function Fn(e, t, r, n, i, a) { + let s = Xr(), o = a !== void 0 ? cu(a) : () => { }; - return _t(e, ...i), or(e, ...t, ...r), a.nextFrame(() => { - _t(e, ...r), or(e, ...n), a.add(uu(e, (l) => (_t(e, ...n, ...t), or(e, ...i), o(l)))); - }), a.add(() => _t(e, ...t, ...r, ...n, ...i)), a.add(() => o("cancelled")), a.dispose; + return At(e, ...i), cr(e, ...t, ...r), s.nextFrame(() => { + At(e, ...r), cr(e, ...n), s.add(du(e, (l) => (At(e, ...n, ...t), cr(e, ...i), o(l)))); + }), s.add(() => At(e, ...t, ...r, ...n, ...i)), s.add(() => o("cancelled")), s.dispose; } -function Fe(e = "") { +function ke(e = "") { return e.split(" ").filter((t) => t.trim().length > 1); } let Jr = Symbol("TransitionContext"); -var cu = ((e) => (e.Visible = "visible", e.Hidden = "hidden", e))(cu || {}); -function fu() { - return U(Jr, null) !== null; +var fu = ((e) => (e.Visible = "visible", e.Hidden = "hidden", e))(fu || {}); +function pu() { + return H(Jr, null) !== null; } -function du() { - let e = U(Jr, null); +function hu() { + let e = H(Jr, null); if (e === null) throw new Error("A is used but it is missing a parent ."); return e; } -function pu() { - let e = U(Yr, null); +function mu() { + let e = H(Zr, null); if (e === null) throw new Error("A is used but it is missing a parent ."); return e; } -let Yr = Symbol("NestingContext"); -function zt(e) { - return "children" in e ? zt(e.children) : e.value.filter(({ state: t }) => t === "visible").length > 0; +let Zr = Symbol("NestingContext"); +function Xt(e) { + return "children" in e ? Xt(e.children) : e.value.filter(({ state: t }) => t === "visible").length > 0; } -function zi(e) { +function Ki(e) { let t = b([]), r = b(!1); - M(() => r.value = !0), Te(() => r.value = !1); - function n(s, a = Se.Hidden) { - let o = t.value.findIndex(({ id: l }) => l === s); - o !== -1 && (Z(a, { [Se.Unmount]() { + N(() => r.value = !0), Pe(() => r.value = !1); + function n(a, s = Ee.Hidden) { + let o = t.value.findIndex(({ id: l }) => l === a); + o !== -1 && (X(s, { [Ee.Unmount]() { t.value.splice(o, 1); - }, [Se.Hidden]() { + }, [Ee.Hidden]() { t.value[o].state = "hidden"; - } }), !zt(t) && r.value && (e == null || e())); + } }), !Xt(t) && r.value && (e == null || e())); } - function i(s) { - let a = t.value.find(({ id: o }) => o === s); - return a ? a.state !== "visible" && (a.state = "visible") : t.value.push({ id: s, state: "visible" }), () => n(s, Se.Unmount); + function i(a) { + let s = t.value.find(({ id: o }) => o === a); + return s ? s.state !== "visible" && (s.state = "visible") : t.value.push({ id: a, state: "visible" }), () => n(a, Ee.Unmount); } return { children: t, register: i, unregister: n }; } -let Gi = Dt.RenderStrategy, tt = z({ props: { as: { type: [Object, String], default: "div" }, show: { type: [Boolean], default: null }, unmount: { type: [Boolean], default: !0 }, appear: { type: [Boolean], default: !1 }, enter: { type: [String], default: "" }, enterFrom: { type: [String], default: "" }, enterTo: { type: [String], default: "" }, entered: { type: [String], default: "" }, leave: { type: [String], default: "" }, leaveFrom: { type: [String], default: "" }, leaveTo: { type: [String], default: "" } }, emits: { beforeEnter: () => !0, afterEnter: () => !0, beforeLeave: () => !0, afterLeave: () => !0 }, setup(e, { emit: t, attrs: r, slots: n, expose: i }) { - if (!fu() && jl()) - return () => B(rt, { ...e, onBeforeEnter: () => t("beforeEnter"), onAfterEnter: () => t("afterEnter"), onBeforeLeave: () => t("beforeLeave"), onAfterLeave: () => t("afterLeave") }, n); - let s = b(null), a = b("visible"), o = P(() => e.unmount ? Se.Unmount : Se.Hidden); - i({ el: s, $el: s }); - let { show: l, appear: u } = du(), { register: c, unregister: p } = pu(), f = { value: !0 }, d = Ve(), h = { value: !1 }, y = zi(() => { - h.value || (a.value = "hidden", p(d), t("afterLeave")); +let Xi = Lt.RenderStrategy, st = W({ props: { as: { type: [Object, String], default: "div" }, show: { type: [Boolean], default: null }, unmount: { type: [Boolean], default: !0 }, appear: { type: [Boolean], default: !1 }, enter: { type: [String], default: "" }, enterFrom: { type: [String], default: "" }, enterTo: { type: [String], default: "" }, entered: { type: [String], default: "" }, leave: { type: [String], default: "" }, leaveFrom: { type: [String], default: "" }, leaveTo: { type: [String], default: "" } }, emits: { beforeEnter: () => !0, afterEnter: () => !0, beforeLeave: () => !0, afterLeave: () => !0 }, setup(e, { emit: t, attrs: r, slots: n, expose: i }) { + if (!pu() && Ml()) + return () => R(ot, { ...e, onBeforeEnter: () => t("beforeEnter"), onAfterEnter: () => t("afterEnter"), onBeforeLeave: () => t("beforeLeave"), onAfterLeave: () => t("afterLeave") }, n); + let a = b(null), s = b("visible"), o = F(() => e.unmount ? Ee.Unmount : Ee.Hidden); + i({ el: a, $el: a }); + let { show: l, appear: u } = hu(), { register: c, unregister: h } = mu(), f = { value: !0 }, d = Ue(), p = { value: !1 }, m = Ki(() => { + p.value || (s.value = "hidden", h(d), t("afterLeave")); }); - M(() => { - let S = c(d); - Te(S); - }), te(() => { - if (o.value === Se.Hidden && !!d) { - if (l && a.value !== "visible") { - a.value = "visible"; + N(() => { + let O = c(d); + Pe(O); + }), ne(() => { + if (o.value === Ee.Hidden && !!d) { + if (l && s.value !== "visible") { + s.value = "visible"; return; } - Z(a.value, { hidden: () => p(d), visible: () => c(d) }); + X(s.value, { hidden: () => h(d), visible: () => c(d) }); } }); - let v = Fe(e.enter), T = Fe(e.enterFrom), A = Fe(e.enterTo), I = Fe(e.entered), x = Fe(e.leave), O = Fe(e.leaveFrom), g = Fe(e.leaveTo); - M(() => { - te(() => { - if (a.value === "visible") { - let S = he(s); - if (S instanceof Comment && S.data === "") + let g = ke(e.enter), x = ke(e.enterFrom), A = ke(e.enterTo), I = ke(e.entered), E = ke(e.leave), S = ke(e.leaveFrom), y = ke(e.leaveTo); + N(() => { + ne(() => { + if (s.value === "visible") { + let O = oe(a); + if (O instanceof Comment && O.data === "") throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?"); } }); }); - function w(S) { - let E = f.value && !u.value, _ = he(s); - !_ || !(_ instanceof HTMLElement) || E || (h.value = !0, l.value && t("beforeEnter"), l.value || t("beforeLeave"), S(l.value ? Pn(_, v, T, A, I, ($) => { - h.value = !1, $ === wr.Finished && t("afterEnter"); - }) : Pn(_, x, O, g, I, ($) => { - h.value = !1, $ === wr.Finished && (zt(y) || (a.value = "hidden", p(d), t("afterLeave"))); + function w(O) { + let $ = f.value && !u.value, T = oe(a); + !T || !(T instanceof HTMLElement) || $ || (p.value = !0, l.value && t("beforeEnter"), l.value || t("beforeLeave"), O(l.value ? Fn(T, g, x, A, I, (_) => { + p.value = !1, _ === Sr.Finished && t("afterEnter"); + }) : Fn(T, E, S, y, I, (_) => { + p.value = !1, _ === Sr.Finished && (Xt(m) || (s.value = "hidden", h(d), t("afterLeave"))); }))); } - return M(() => { - vt([l], (S, E, _) => { - w(_), f.value = !1; + return N(() => { + bt([l], (O, $, T) => { + w(T), f.value = !1; }, { immediate: !0 }); - }), ie(Yr, y), kl(P(() => Z(a.value, { visible: Be.Open, hidden: Be.Closed }))), () => { - let { appear: S, show: E, enter: _, enterFrom: $, enterTo: C, entered: j, leave: k, leaveFrom: V, leaveTo: R, ...N } = e; - return G({ theirProps: N, ourProps: { ref: s }, slot: {}, slots: n, attrs: r, features: Gi, visible: a.value === "visible", name: "TransitionChild" }); + }), ae(Zr, m), Rl(F(() => X(s.value, { visible: Re.Open, hidden: Re.Closed }))), () => { + let { appear: O, show: $, enter: T, enterFrom: _, enterTo: D, entered: k, leave: J, leaveFrom: j, leaveTo: P, ...B } = e; + return z({ theirProps: B, ourProps: { ref: a }, slot: {}, slots: n, attrs: r, features: Xi, visible: s.value === "visible", name: "TransitionChild" }); }; -} }), hu = tt, rt = z({ 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 = Gr(), s = P(() => e.show === null && i !== null ? Z(i.value, { [Be.Open]: !0, [Be.Closed]: !1 }) : e.show); - te(() => { - if (![!0, !1].includes(s.value)) +} }), vu = st, ot = W({ inheritAttrs: !1, props: { as: { type: [Object, String], default: "div" }, show: { type: [Boolean], default: null }, unmount: { type: [Boolean], default: !0 }, appear: { type: [Boolean], default: !1 }, enter: { type: [String], default: "" }, enterFrom: { type: [String], default: "" }, enterTo: { type: [String], default: "" }, entered: { type: [String], default: "" }, leave: { type: [String], default: "" }, leaveFrom: { type: [String], default: "" }, leaveTo: { type: [String], default: "" } }, emits: { beforeEnter: () => !0, afterEnter: () => !0, beforeLeave: () => !0, afterLeave: () => !0 }, setup(e, { emit: t, attrs: r, slots: n }) { + let i = Kr(), a = F(() => e.show === null && i !== null ? X(i.value, { [Re.Open]: !0, [Re.Closed]: !1 }) : e.show); + ne(() => { + if (![!0, !1].includes(a.value)) throw new Error('A is used but it is missing a `:show="true | false"` prop.'); }); - let a = b(s.value ? "visible" : "hidden"), o = zi(() => { - a.value = "hidden"; - }), l = b(!0), u = { show: s, appear: P(() => e.appear || !l.value) }; - return M(() => { - te(() => { - l.value = !1, s.value ? a.value = "visible" : zt(o) || (a.value = "hidden"); + let s = b(a.value ? "visible" : "hidden"), o = Ki(() => { + s.value = "hidden"; + }), l = b(!0), u = { show: a, appear: F(() => e.appear || !l.value) }; + return N(() => { + ne(() => { + l.value = !1, a.value ? s.value = "visible" : Xt(o) || (s.value = "hidden"); }); - }), ie(Yr, o), ie(Jr, u), () => { - let c = Di(e, ["show", "appear", "unmount", "onBeforeEnter", "onBeforeLeave", "onAfterEnter", "onAfterLeave"]), p = { unmount: e.unmount }; - return G({ ourProps: { ...p, as: "template" }, theirProps: {}, slot: {}, slots: { ...n, default: () => [B(hu, { onBeforeEnter: () => t("beforeEnter"), onAfterEnter: () => t("afterEnter"), onBeforeLeave: () => t("beforeLeave"), onAfterLeave: () => t("afterLeave"), ...r, ...p, ...c }, n.default)] }, attrs: {}, features: Gi, visible: a.value === "visible", name: "Transition" }); + }), ae(Zr, o), ae(Jr, u), () => { + let c = ki(e, ["show", "appear", "unmount", "onBeforeEnter", "onBeforeLeave", "onAfterEnter", "onAfterLeave"]), h = { unmount: e.unmount }; + return z({ ourProps: { ...h, as: "template" }, theirProps: {}, slot: {}, slots: { ...n, default: () => [R(vu, { onBeforeEnter: () => t("beforeEnter"), onAfterEnter: () => t("afterEnter"), onBeforeLeave: () => t("beforeLeave"), onAfterLeave: () => t("afterLeave"), ...r, ...h, ...c }, n.default)] }, attrs: {}, features: Xi, visible: s.value === "visible", name: "Transition" }); }; } }); -const mu = { +const gu = { props: { defaultTitle: { type: String, @@ -1655,22 +1700,22 @@ const mu = { }; }, computed: { - hasConfirmModal: () => !!m.confirmModal.value, + hasConfirmModal: () => !!v.confirmModal.value, title: function() { var e; - return (e = m.confirmModal.value) != null && e.title ? m.confirmModal.value.title : this.defaultTitle; + return (e = v.confirmModal.value) != null && e.title ? v.confirmModal.value.title : this.defaultTitle; }, text: function() { var e; - return (e = m.confirmModal.value) != null && e.text ? m.confirmModal.value.text : this.defaultText; + return (e = v.confirmModal.value) != null && e.text ? v.confirmModal.value.text : this.defaultText; }, confirmButton: function() { var e; - return (e = m.confirmModal.value) != null && e.confirmButton ? m.confirmModal.value.confirmButton : this.defaultConfirmButton; + return (e = v.confirmModal.value) != null && e.confirmButton ? v.confirmModal.value.confirmButton : this.defaultConfirmButton; }, cancelButton: function() { var e; - return (e = m.confirmModal.value) != null && e.cancelButton ? m.confirmModal.value.cancelButton : this.defaultCancelButton; + return (e = v.confirmModal.value) != null && e.cancelButton ? v.confirmModal.value.cancelButton : this.defaultCancelButton; } }, watch: { @@ -1680,16 +1725,16 @@ const mu = { }, methods: { cancel() { - m.confirmModal.value.rejectPromise(), this.setIsOpen(!1); + v.confirmModal.value.rejectPromise(), this.setIsOpen(!1); }, confirm() { - m.confirmModal.value.resolvePromise(), this.setIsOpen(!1); + v.confirmModal.value.resolvePromise(), this.setIsOpen(!1); }, setIsOpen(e) { this.isOpen = e; }, emitClose() { - m.clearConfirmModal(); + v.clearConfirmModal(); } }, render() { @@ -1703,32 +1748,32 @@ const mu = { cancel: this.cancel, confirm: this.confirm, emitClose: this.emitClose, - Dialog: Xr, + Dialog: Yr, DialogPanel: Qr, - TransitionRoot: rt, - TransitionChild: tt + TransitionRoot: ot, + TransitionChild: st }); } }; -function Ki(e, t) { - t = zr(t, e); +function Yi(e, t) { + t = Gr(t, e); for (var r = 0, n = t.length; e != null && r < n; ) - e = e[gt(t[r++])]; + e = e[wt(t[r++])]; return r && r == n ? e : void 0; } -function ht(e, t, r) { - var n = e == null ? void 0 : Ki(e, t); +function Je(e, t, r) { + var n = e == null ? void 0 : Yi(e, t); return n === void 0 ? r : n; } -var vu = function() { +var yu = function() { try { - var e = Ne(Object, "defineProperty"); + var e = He(Object, "defineProperty"); return e({}, "", {}), e; } catch { } }(); -const Cn = vu; -function Xi(e, t, r) { +const Cn = yu; +function Qi(e, t, r) { t == "__proto__" && Cn ? Cn(e, t, { configurable: !0, enumerable: !0, @@ -1736,31 +1781,31 @@ function Xi(e, t, r) { writable: !0 }) : e[t] = r; } -var gu = Object.prototype, yu = gu.hasOwnProperty; -function bu(e, t, r) { +var bu = Object.prototype, wu = bu.hasOwnProperty; +function Su(e, t, r) { var n = e[t]; - (!(yu.call(e, t) && Hr(n, r)) || r === void 0 && !(t in e)) && Xi(e, t, r); + (!(wu.call(e, t) && Ur(n, r)) || r === void 0 && !(t in e)) && Qi(e, t, r); } -function wu(e, t, r, n) { - if (!W(e)) +function Ou(e, t, r, n) { + if (!U(e)) return e; - t = zr(t, e); - for (var i = -1, s = t.length, a = s - 1, o = e; o != null && ++i < s; ) { - var l = gt(t[i]), u = r; + t = Gr(t, e); + for (var i = -1, a = t.length, s = a - 1, o = e; o != null && ++i < a; ) { + var l = wt(t[i]), u = r; if (l === "__proto__" || l === "constructor" || l === "prototype") return e; - if (i != a) { + if (i != s) { var c = o[l]; - u = n ? n(c, l, o) : void 0, u === void 0 && (u = W(c) ? c : Fr(t[i + 1]) ? [] : {}); + u = n ? n(c, l, o) : void 0, u === void 0 && (u = U(c) ? c : qr(t[i + 1]) ? [] : {}); } - bu(o, l, u), o = o[l]; + Su(o, l, u), o = o[l]; } return e; } -function Qi(e, t, r) { - return e == null ? e : wu(e, t, r); +function Ji(e, t, r) { + return e == null ? e : Ou(e, t, r); } -const Su = { +const $u = { props: { default: { type: Object, @@ -1785,13 +1830,13 @@ const Su = { }, mounted() { if (this.remember) { - let e = m.restore(this.remember, this.localStorage); + let e = v.restore(this.remember, this.localStorage); e || (e = {}), this.values = Object.assign({}, { ...this.default, ...e }); } else this.values = Object.assign({}, { ...this.default }); }, updated() { - this.remember && m.remember(this.remember, { ...this.values }, this.localStorage); + this.remember && v.remember(this.remember, { ...this.values }, this.localStorage); }, render() { const e = this; @@ -1801,94 +1846,94 @@ const Su = { return Object.keys(e.values); }, get(t, r) { - return ht(e.values, r); + return Je(e.values, r); }, set(t, r, n) { - Qi(e.values, r, n); + Ji(e.values, r, n); } }) ); } }; -var Ou = function() { - return le.Date.now(); +var Eu = function() { + return ce.Date.now(); }; -const lr = Ou; -var $u = /\s/; -function xu(e) { - for (var t = e.length; t-- && $u.test(e.charAt(t)); ) +const dr = Eu; +var xu = /\s/; +function Tu(e) { + for (var t = e.length; t-- && xu.test(e.charAt(t)); ) ; return t; } -var Eu = /^\s+/; -function Tu(e) { - return e && e.slice(0, xu(e) + 1).replace(Eu, ""); +var _u = /^\s+/; +function Au(e) { + return e && e.slice(0, Tu(e) + 1).replace(_u, ""); } -var Fn = 0 / 0, _u = /^[-+]0x[0-9a-f]+$/i, Au = /^0b[01]+$/i, Iu = /^0o[0-7]+$/i, Pu = parseInt; -function Sr(e) { +var qn = 0 / 0, Iu = /^[-+]0x[0-9a-f]+$/i, Pu = /^0b[01]+$/i, Fu = /^0o[0-7]+$/i, Cu = parseInt; +function Or(e) { if (typeof e == "number") return e; - if (Nt(e)) - return Fn; - if (W(e)) { + if (Ut(e)) + return qn; + if (U(e)) { var t = typeof e.valueOf == "function" ? e.valueOf() : e; - e = W(t) ? t + "" : t; + e = U(t) ? t + "" : t; } if (typeof e != "string") return e === 0 ? e : +e; - e = Tu(e); - var r = Au.test(e); - return r || Iu.test(e) ? Pu(e.slice(2), r ? 2 : 8) : _u.test(e) ? Fn : +e; + e = Au(e); + var r = Pu.test(e); + return r || Fu.test(e) ? Cu(e.slice(2), r ? 2 : 8) : Iu.test(e) ? qn : +e; } -var Cu = "Expected a function", Fu = Math.max, qu = Math.min; -function Zr(e, t, r) { - var n, i, s, a, o, l, u = 0, c = !1, p = !1, f = !0; +var qu = "Expected a function", Du = Math.max, ku = Math.min; +function en(e, t, r) { + var n, i, a, s, o, l, u = 0, c = !1, h = !1, f = !0; if (typeof e != "function") - throw new TypeError(Cu); - t = Sr(t) || 0, W(r) && (c = !!r.leading, p = "maxWait" in r, s = p ? Fu(Sr(r.maxWait) || 0, t) : s, f = "trailing" in r ? !!r.trailing : f); - function d(g) { - var w = n, S = i; - return n = i = void 0, u = g, a = e.apply(S, w), a; + throw new TypeError(qu); + t = Or(t) || 0, U(r) && (c = !!r.leading, h = "maxWait" in r, a = h ? Du(Or(r.maxWait) || 0, t) : a, f = "trailing" in r ? !!r.trailing : f); + function d(y) { + var w = n, O = i; + return n = i = void 0, u = y, s = e.apply(O, w), s; } - function h(g) { - return u = g, o = setTimeout(T, t), c ? d(g) : a; + function p(y) { + return u = y, o = setTimeout(x, t), c ? d(y) : s; } - function y(g) { - var w = g - l, S = g - u, E = t - w; - return p ? qu(E, s - S) : E; + function m(y) { + var w = y - l, O = y - u, $ = t - w; + return h ? ku($, a - O) : $; } - function v(g) { - var w = g - l, S = g - u; - return l === void 0 || w >= t || w < 0 || p && S >= s; + function g(y) { + var w = y - l, O = y - u; + return l === void 0 || w >= t || w < 0 || h && O >= a; } - function T() { - var g = lr(); - if (v(g)) - return A(g); - o = setTimeout(T, y(g)); + function x() { + var y = dr(); + if (g(y)) + return A(y); + o = setTimeout(x, m(y)); } - function A(g) { - return o = void 0, f && n ? d(g) : (n = i = void 0, a); + function A(y) { + return o = void 0, f && n ? d(y) : (n = i = void 0, s); } function I() { o !== void 0 && clearTimeout(o), u = 0, n = l = i = o = void 0; } - function x() { - return o === void 0 ? a : A(lr()); + function E() { + return o === void 0 ? s : A(dr()); } - function O() { - var g = lr(), w = v(g); - if (n = arguments, i = this, l = g, w) { + function S() { + var y = dr(), w = g(y); + if (n = arguments, i = this, l = y, w) { if (o === void 0) - return h(l); - if (p) - return clearTimeout(o), o = setTimeout(T, t), d(l); + return p(l); + if (h) + return clearTimeout(o), o = setTimeout(x, t), d(l); } - return o === void 0 && (o = setTimeout(T, t)), a; + return o === void 0 && (o = setTimeout(x, t)), s; } - return O.cancel = I, O.flush = x, O; + return S.cancel = I, S.flush = E, S; } -const Du = { +const Lu = { props: { url: { type: String, @@ -1956,7 +2001,7 @@ const Du = { this.manual || this.$nextTick(this.performRequest); }, created() { - this.debounceFunction = Zr(() => { + this.debounceFunction = en(() => { this.performRequest(); }, this.watchDebounce); }, @@ -1970,7 +2015,7 @@ const Du = { Accept: this.acceptHeader } }; - Object.keys(this.request).length > 0 && (e.data = this.request), we(e).then((t) => { + Object.keys(this.request).length > 0 && (e.data = this.request), Oe(e).then((t) => { this.response = t.data, this.processing = !1; }).catch(() => { this.processing = !1; @@ -1986,7 +2031,7 @@ const Du = { reload: this.performRequest }); } -}, Lu = { +}, ju = { data() { return { isActivated: !0 @@ -2000,12 +2045,12 @@ const Du = { }, render() { return this.$slots.default({ - Dialog: Xr, + Dialog: Yr, DialogPanel: Qr, isActivated: this.isActivated }); } -}, Ji = { +}, Zi = { __name: "OnClickOutside", props: { do: { @@ -2029,23 +2074,23 @@ const Du = { }, setup(e) { const t = e, r = b(null), n = b(null), i = b(null); - return M(() => { - r.value = (s) => { - n.value.children[0].contains(s.target) || t.ignoreInnerTargets && n.value.contains(s.target) || t.do(); - }, document.addEventListener("click", r.value), document.addEventListener("touchstart", r.value), t.closeOnEscape && (i.value = (s) => { - t.opened && s.key === "Escape" && t.do(); + return N(() => { + r.value = (a) => { + n.value.children[0].contains(a.target) || t.ignoreInnerTargets && n.value.contains(a.target) || t.do(); + }, document.addEventListener("click", r.value), document.addEventListener("touchstart", r.value), t.closeOnEscape && (i.value = (a) => { + t.opened && a.key === "Escape" && t.do(); }, document.addEventListener("keydown", i.value)); - }), Ts(() => { + }), Aa(() => { document.removeEventListener("click", r.value), document.removeEventListener("touchstart", r.value), t.closeOnEscape && document.removeEventListener("keydown", i.value); - }), (s, a) => (D(), pe("div", { + }), (a, s) => (L(), me("div", { ref_key: "root", ref: n }, [ - se(s.$slots, "default") + se(a.$slots, "default") ], 512)); } }; -function J(e) { +function Q(e) { if (e == null) return window; if (e.toString() !== "[object Window]") { @@ -2054,100 +2099,100 @@ function J(e) { } return e; } -function Re(e) { - var t = J(e).Element; +function Ne(e) { + var t = Q(e).Element; return e instanceof t || e instanceof Element; } -function Q(e) { - var t = J(e).HTMLElement; +function Y(e) { + var t = Q(e).HTMLElement; return e instanceof t || e instanceof HTMLElement; } -function en(e) { +function tn(e) { if (typeof ShadowRoot > "u") return !1; - var t = J(e).ShadowRoot; + var t = Q(e).ShadowRoot; return e instanceof t || e instanceof ShadowRoot; } -var Le = Math.max, jt = Math.min, Xe = Math.round; -function Or() { +var Be = Math.max, Bt = Math.min, et = Math.round; +function $r() { var e = navigator.userAgentData; return e != null && e.brands ? e.brands.map(function(t) { return t.brand + "/" + t.version; }).join(" ") : navigator.userAgent; } -function Yi() { - return !/^((?!chrome|android).)*safari/i.test(Or()); +function ea() { + return !/^((?!chrome|android).)*safari/i.test($r()); } -function Qe(e, t, r) { +function tt(e, t, r) { t === void 0 && (t = !1), r === void 0 && (r = !1); - var n = e.getBoundingClientRect(), i = 1, s = 1; - t && Q(e) && (i = e.offsetWidth > 0 && Xe(n.width) / e.offsetWidth || 1, s = e.offsetHeight > 0 && Xe(n.height) / e.offsetHeight || 1); - var a = Re(e) ? J(e) : window, o = a.visualViewport, l = !Yi() && r, u = (n.left + (l && o ? o.offsetLeft : 0)) / i, c = (n.top + (l && o ? o.offsetTop : 0)) / s, p = n.width / i, f = n.height / s; + var n = e.getBoundingClientRect(), i = 1, a = 1; + t && Y(e) && (i = e.offsetWidth > 0 && et(n.width) / e.offsetWidth || 1, a = e.offsetHeight > 0 && et(n.height) / e.offsetHeight || 1); + var s = Ne(e) ? Q(e) : window, o = s.visualViewport, l = !ea() && r, u = (n.left + (l && o ? o.offsetLeft : 0)) / i, c = (n.top + (l && o ? o.offsetTop : 0)) / a, h = n.width / i, f = n.height / a; return { - width: p, + width: h, height: f, top: c, - right: u + p, + right: u + h, bottom: c + f, left: u, x: u, y: c }; } -function tn(e) { - var t = J(e), r = t.pageXOffset, n = t.pageYOffset; +function rn(e) { + var t = Q(e), r = t.pageXOffset, n = t.pageYOffset; return { scrollLeft: r, scrollTop: n }; } -function ju(e) { +function Bu(e) { return { scrollLeft: e.scrollLeft, scrollTop: e.scrollTop }; } -function ku(e) { - return e === J(e) || !Q(e) ? tn(e) : ju(e); +function Mu(e) { + return e === Q(e) || !Y(e) ? rn(e) : Bu(e); } -function ae(e) { +function le(e) { return e ? (e.nodeName || "").toLowerCase() : null; } -function Ae(e) { - return ((Re(e) ? e.ownerDocument : e.document) || window.document).documentElement; +function Ce(e) { + return ((Ne(e) ? e.ownerDocument : e.document) || window.document).documentElement; } -function rn(e) { - return Qe(Ae(e)).left + tn(e).scrollLeft; +function nn(e) { + return tt(Ce(e)).left + rn(e).scrollLeft; } -function re(e) { - return J(e).getComputedStyle(e); +function ie(e) { + return Q(e).getComputedStyle(e); } -function nn(e) { - var t = re(e), r = t.overflow, n = t.overflowX, i = t.overflowY; +function an(e) { + var t = ie(e), r = t.overflow, n = t.overflowX, i = t.overflowY; return /auto|scroll|overlay|hidden/.test(r + i + n); } -function Bu(e) { - var t = e.getBoundingClientRect(), r = Xe(t.width) / e.offsetWidth || 1, n = Xe(t.height) / e.offsetHeight || 1; +function Ru(e) { + var t = e.getBoundingClientRect(), r = et(t.width) / e.offsetWidth || 1, n = et(t.height) / e.offsetHeight || 1; return r !== 1 || n !== 1; } -function Ru(e, t, r) { +function Nu(e, t, r) { r === void 0 && (r = !1); - var n = Q(t), i = Q(t) && Bu(t), s = Ae(t), a = Qe(e, i, r), o = { + var n = Y(t), i = Y(t) && Ru(t), a = Ce(t), s = tt(e, i, r), o = { scrollLeft: 0, scrollTop: 0 }, l = { x: 0, y: 0 }; - return (n || !n && !r) && ((ae(t) !== "body" || nn(s)) && (o = ku(t)), Q(t) ? (l = Qe(t, !0), l.x += t.clientLeft, l.y += t.clientTop) : s && (l.x = rn(s))), { - x: a.left + o.scrollLeft - l.x, - y: a.top + o.scrollTop - l.y, - width: a.width, - height: a.height + return (n || !n && !r) && ((le(t) !== "body" || an(a)) && (o = Mu(t)), Y(t) ? (l = tt(t, !0), l.x += t.clientLeft, l.y += t.clientTop) : a && (l.x = nn(a))), { + x: s.left + o.scrollLeft - l.x, + y: s.top + o.scrollTop - l.y, + width: s.width, + height: s.height }; } -function Zi(e) { - var t = Qe(e), r = e.offsetWidth, n = e.offsetHeight; +function ta(e) { + var t = tt(e), r = e.offsetWidth, n = e.offsetHeight; return Math.abs(t.width - r) <= 1 && (r = t.width), Math.abs(t.height - n) <= 1 && (n = t.height), { x: e.offsetLeft, y: e.offsetTop, @@ -2155,78 +2200,78 @@ function Zi(e) { height: n }; } -function Gt(e) { - return ae(e) === "html" ? e : e.assignedSlot || e.parentNode || (en(e) ? e.host : null) || Ae(e); +function Yt(e) { + return le(e) === "html" ? e : e.assignedSlot || e.parentNode || (tn(e) ? e.host : null) || Ce(e); } -function es(e) { - return ["html", "body", "#document"].indexOf(ae(e)) >= 0 ? e.ownerDocument.body : Q(e) && nn(e) ? e : es(Gt(e)); +function ra(e) { + return ["html", "body", "#document"].indexOf(le(e)) >= 0 ? e.ownerDocument.body : Y(e) && an(e) ? e : ra(Yt(e)); } -function ct(e, t) { +function mt(e, t) { var r; t === void 0 && (t = []); - var n = es(e), i = n === ((r = e.ownerDocument) == null ? void 0 : r.body), s = J(n), a = i ? [s].concat(s.visualViewport || [], nn(n) ? n : []) : n, o = t.concat(a); - return i ? o : o.concat(ct(Gt(a))); + var n = ra(e), i = n === ((r = e.ownerDocument) == null ? void 0 : r.body), a = Q(n), s = i ? [a].concat(a.visualViewport || [], an(n) ? n : []) : n, o = t.concat(s); + return i ? o : o.concat(mt(Yt(s))); } -function Mu(e) { - return ["table", "td", "th"].indexOf(ae(e)) >= 0; +function Vu(e) { + return ["table", "td", "th"].indexOf(le(e)) >= 0; } -function qn(e) { - return !Q(e) || re(e).position === "fixed" ? null : e.offsetParent; +function Dn(e) { + return !Y(e) || ie(e).position === "fixed" ? null : e.offsetParent; } -function Nu(e) { - var t = /firefox/i.test(Or()), r = /Trident/i.test(Or()); - if (r && Q(e)) { - var n = re(e); +function Hu(e) { + var t = /firefox/i.test($r()), r = /Trident/i.test($r()); + if (r && Y(e)) { + var n = ie(e); if (n.position === "fixed") return null; } - var i = Gt(e); - for (en(i) && (i = i.host); Q(i) && ["html", "body"].indexOf(ae(i)) < 0; ) { - var s = re(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") + var i = Yt(e); + for (tn(i) && (i = i.host); Y(i) && ["html", "body"].indexOf(le(i)) < 0; ) { + var a = ie(i); + if (a.transform !== "none" || a.perspective !== "none" || a.contain === "paint" || ["transform", "perspective"].indexOf(a.willChange) !== -1 || t && a.willChange === "filter" || t && a.filter && a.filter !== "none") return i; i = i.parentNode; } return null; } -function Kt(e) { - for (var t = J(e), r = qn(e); r && Mu(r) && re(r).position === "static"; ) - r = qn(r); - return r && (ae(r) === "html" || ae(r) === "body" && re(r).position === "static") ? t : r || Nu(e) || t; -} -var ee = "top", oe = "bottom", Ee = "right", ce = "left", Xt = "auto", Qt = [ee, oe, Ee, ce], Je = "start", mt = "end", Vu = "clippingParents", ts = "viewport", ot = "popper", Hu = "reference", Dn = /* @__PURE__ */ Qt.reduce(function(e, t) { - return e.concat([t + "-" + Je, t + "-" + mt]); -}, []), Uu = /* @__PURE__ */ [].concat(Qt, [Xt]).reduce(function(e, t) { - return e.concat([t, t + "-" + Je, t + "-" + mt]); -}, []), Wu = "beforeRead", zu = "read", Gu = "afterRead", Ku = "beforeMain", Xu = "main", Qu = "afterMain", Ju = "beforeWrite", Yu = "write", Zu = "afterWrite", $r = [Wu, zu, Gu, Ku, Xu, Qu, Ju, Yu, Zu]; -function ec(e) { +function Qt(e) { + for (var t = Q(e), r = Dn(e); r && Vu(r) && ie(r).position === "static"; ) + r = Dn(r); + return r && (le(r) === "html" || le(r) === "body" && ie(r).position === "static") ? t : r || Hu(e) || t; +} +var re = "top", ue = "bottom", Ie = "right", fe = "left", Jt = "auto", Zt = [re, ue, Ie, fe], rt = "start", yt = "end", Uu = "clippingParents", na = "viewport", ft = "popper", Wu = "reference", kn = /* @__PURE__ */ Zt.reduce(function(e, t) { + return e.concat([t + "-" + rt, t + "-" + yt]); +}, []), zu = /* @__PURE__ */ [].concat(Zt, [Jt]).reduce(function(e, t) { + return e.concat([t, t + "-" + rt, t + "-" + yt]); +}, []), Gu = "beforeRead", Ku = "read", Xu = "afterRead", Yu = "beforeMain", Qu = "main", Ju = "afterMain", Zu = "beforeWrite", ec = "write", tc = "afterWrite", Er = [Gu, Ku, Xu, Yu, Qu, Ju, Zu, ec, tc]; +function rc(e) { var t = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Set(), n = []; - e.forEach(function(s) { - t.set(s.name, s); + e.forEach(function(a) { + t.set(a.name, a); }); - function i(s) { - r.add(s.name); - var a = [].concat(s.requires || [], s.requiresIfExists || []); - a.forEach(function(o) { + function i(a) { + r.add(a.name); + var s = [].concat(a.requires || [], a.requiresIfExists || []); + s.forEach(function(o) { if (!r.has(o)) { var l = t.get(o); l && i(l); } - }), n.push(s); + }), n.push(a); } - return e.forEach(function(s) { - r.has(s.name) || i(s); + return e.forEach(function(a) { + r.has(a.name) || i(a); }), n; } -function tc(e) { - var t = ec(e); - return $r.reduce(function(r, n) { +function nc(e) { + var t = rc(e); + return Er.reduce(function(r, n) { return r.concat(t.filter(function(i) { return i.phase === n; })); }, []); } -function rc(e) { +function ic(e) { var t; return function() { return t || (t = new Promise(function(r) { @@ -2236,40 +2281,40 @@ function rc(e) { })), t; }; } -function ye(e) { +function we(e) { for (var t = arguments.length, r = new Array(t > 1 ? t - 1 : 0), n = 1; n < t; n++) r[n - 1] = arguments[n]; - return [].concat(r).reduce(function(i, s) { - return i.replace(/%s/, s); + return [].concat(r).reduce(function(i, a) { + return i.replace(/%s/, a); }, e); } -var qe = 'Popper: modifier "%s" provided an invalid %s property, expected %s but got %s', nc = 'Popper: modifier "%s" requires "%s", but "%s" modifier is not available', Ln = ["name", "enabled", "phase", "fn", "effect", "requires", "options"]; -function ic(e) { +var Le = 'Popper: modifier "%s" provided an invalid %s property, expected %s but got %s', ac = 'Popper: modifier "%s" requires "%s", but "%s" modifier is not available', Ln = ["name", "enabled", "phase", "fn", "effect", "requires", "options"]; +function sc(e) { e.forEach(function(t) { [].concat(Object.keys(t), Ln).filter(function(r, n, i) { return i.indexOf(r) === n; }).forEach(function(r) { switch (r) { case "name": - typeof t.name != "string" && console.error(ye(qe, String(t.name), '"name"', '"string"', '"' + String(t.name) + '"')); + typeof t.name != "string" && console.error(we(Le, String(t.name), '"name"', '"string"', '"' + String(t.name) + '"')); break; case "enabled": - typeof t.enabled != "boolean" && console.error(ye(qe, t.name, '"enabled"', '"boolean"', '"' + String(t.enabled) + '"')); + typeof t.enabled != "boolean" && console.error(we(Le, t.name, '"enabled"', '"boolean"', '"' + String(t.enabled) + '"')); break; case "phase": - $r.indexOf(t.phase) < 0 && console.error(ye(qe, t.name, '"phase"', "either " + $r.join(", "), '"' + String(t.phase) + '"')); + Er.indexOf(t.phase) < 0 && console.error(we(Le, t.name, '"phase"', "either " + Er.join(", "), '"' + String(t.phase) + '"')); break; case "fn": - typeof t.fn != "function" && console.error(ye(qe, t.name, '"fn"', '"function"', '"' + String(t.fn) + '"')); + typeof t.fn != "function" && console.error(we(Le, t.name, '"fn"', '"function"', '"' + String(t.fn) + '"')); break; case "effect": - t.effect != null && typeof t.effect != "function" && console.error(ye(qe, t.name, '"effect"', '"function"', '"' + String(t.fn) + '"')); + t.effect != null && typeof t.effect != "function" && console.error(we(Le, t.name, '"effect"', '"function"', '"' + String(t.fn) + '"')); break; case "requires": - t.requires != null && !Array.isArray(t.requires) && console.error(ye(qe, t.name, '"requires"', '"array"', '"' + String(t.requires) + '"')); + t.requires != null && !Array.isArray(t.requires) && console.error(we(Le, t.name, '"requires"', '"array"', '"' + String(t.requires) + '"')); break; case "requiresIfExists": - Array.isArray(t.requiresIfExists) || console.error(ye(qe, t.name, '"requiresIfExists"', '"array"', '"' + String(t.requiresIfExists) + '"')); + Array.isArray(t.requiresIfExists) || console.error(we(Le, t.name, '"requiresIfExists"', '"array"', '"' + String(t.requiresIfExists) + '"')); break; case "options": case "data": @@ -2282,12 +2327,12 @@ function ic(e) { t.requires && t.requires.forEach(function(n) { e.find(function(i) { return i.name === n; - }) == null && console.error(ye(nc, String(t.name), n, n)); + }) == null && console.error(we(ac, String(t.name), n, n)); }); }); }); } -function sc(e, t) { +function oc(e, t) { var r = /* @__PURE__ */ new Set(); return e.filter(function(n) { var i = t(n); @@ -2295,10 +2340,10 @@ function sc(e, t) { return r.add(i), !0; }); } -function fe(e) { +function pe(e) { return e.split("-")[0]; } -function ac(e) { +function lc(e) { var t = e.reduce(function(r, n) { var i = r[n.name]; return r[n.name] = i ? Object.assign({}, i, n, { @@ -2310,34 +2355,34 @@ function ac(e) { return t[r]; }); } -function oc(e, t) { - var r = J(e), n = Ae(e), i = r.visualViewport, s = n.clientWidth, a = n.clientHeight, o = 0, l = 0; +function uc(e, t) { + var r = Q(e), n = Ce(e), i = r.visualViewport, a = n.clientWidth, s = n.clientHeight, o = 0, l = 0; if (i) { - s = i.width, a = i.height; - var u = Yi(); + a = i.width, s = i.height; + var u = ea(); (u || !u && t === "fixed") && (o = i.offsetLeft, l = i.offsetTop); } return { - width: s, - height: a, - x: o + rn(e), + width: a, + height: s, + x: o + nn(e), y: l }; } -function lc(e) { - var t, r = Ae(e), n = tn(e), i = (t = e.ownerDocument) == null ? void 0 : t.body, s = Le(r.scrollWidth, r.clientWidth, i ? i.scrollWidth : 0, i ? i.clientWidth : 0), a = Le(r.scrollHeight, r.clientHeight, i ? i.scrollHeight : 0, i ? i.clientHeight : 0), o = -n.scrollLeft + rn(e), l = -n.scrollTop; - return re(i || r).direction === "rtl" && (o += Le(r.clientWidth, i ? i.clientWidth : 0) - s), { - width: s, - height: a, +function cc(e) { + var t, r = Ce(e), n = rn(e), i = (t = e.ownerDocument) == null ? void 0 : t.body, a = Be(r.scrollWidth, r.clientWidth, i ? i.scrollWidth : 0, i ? i.clientWidth : 0), s = Be(r.scrollHeight, r.clientHeight, i ? i.scrollHeight : 0, i ? i.clientHeight : 0), o = -n.scrollLeft + nn(e), l = -n.scrollTop; + return ie(i || r).direction === "rtl" && (o += Be(r.clientWidth, i ? i.clientWidth : 0) - a), { + width: a, + height: s, x: o, y: l }; } -function uc(e, t) { +function dc(e, t) { var r = t.getRootNode && t.getRootNode(); if (e.contains(t)) return !0; - if (r && en(r)) { + if (r && tn(r)) { var n = t; do { if (n && e.isSameNode(n)) @@ -2355,54 +2400,54 @@ function xr(e) { bottom: e.y + e.height }); } -function cc(e, t) { - var r = Qe(e, !1, t === "fixed"); +function fc(e, t) { + var r = tt(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 === ts ? xr(oc(e, r)) : Re(t) ? cc(t, r) : xr(lc(Ae(e))); + return t === na ? xr(uc(e, r)) : Ne(t) ? fc(t, r) : xr(cc(Ce(e))); } -function fc(e) { - var t = ct(Gt(e)), r = ["absolute", "fixed"].indexOf(re(e).position) >= 0, n = r && Q(e) ? Kt(e) : e; - return Re(n) ? t.filter(function(i) { - return Re(i) && uc(i, n) && ae(i) !== "body"; +function pc(e) { + var t = mt(Yt(e)), r = ["absolute", "fixed"].indexOf(ie(e).position) >= 0, n = r && Y(e) ? Qt(e) : e; + return Ne(n) ? t.filter(function(i) { + return Ne(i) && dc(i, n) && le(i) !== "body"; }) : []; } -function dc(e, t, r, n) { - var i = t === "clippingParents" ? fc(e) : [].concat(t), s = [].concat(i, [r]), a = s[0], o = s.reduce(function(l, u) { +function hc(e, t, r, n) { + var i = t === "clippingParents" ? pc(e) : [].concat(t), a = [].concat(i, [r]), s = a[0], o = a.reduce(function(l, u) { var c = jn(e, u, n); - return l.top = Le(c.top, l.top), l.right = jt(c.right, l.right), l.bottom = jt(c.bottom, l.bottom), l.left = Le(c.left, l.left), l; - }, jn(e, a, n)); + return l.top = Be(c.top, l.top), l.right = Bt(c.right, l.right), l.bottom = Bt(c.bottom, l.bottom), l.left = Be(c.left, l.left), l; + }, jn(e, s, n)); return o.width = o.right - o.left, o.height = o.bottom - o.top, o.x = o.left, o.y = o.top, o; } -function Ye(e) { +function nt(e) { return e.split("-")[1]; } -function rs(e) { +function ia(e) { return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y"; } -function ns(e) { - var t = e.reference, r = e.element, n = e.placement, i = n ? fe(n) : null, s = n ? Ye(n) : null, a = t.x + t.width / 2 - r.width / 2, o = t.y + t.height / 2 - r.height / 2, l; +function aa(e) { + var t = e.reference, r = e.element, n = e.placement, i = n ? pe(n) : null, a = n ? nt(n) : null, s = t.x + t.width / 2 - r.width / 2, o = t.y + t.height / 2 - r.height / 2, l; switch (i) { - case ee: + case re: l = { - x: a, + x: s, y: t.y - r.height }; break; - case oe: + case ue: l = { - x: a, + x: s, y: t.y + t.height }; break; - case Ee: + case Ie: l = { x: t.x + t.width, y: o }; break; - case ce: + case fe: l = { x: t.x - r.width, y: o @@ -2414,21 +2459,21 @@ function ns(e) { y: t.y }; } - var u = i ? rs(i) : null; + var u = i ? ia(i) : null; if (u != null) { var c = u === "y" ? "height" : "width"; - switch (s) { - case Je: + switch (a) { + case rt: l[u] = l[u] - (t[c] / 2 - r[c] / 2); break; - case mt: + case yt: l[u] = l[u] + (t[c] / 2 - r[c] / 2); break; } } return l; } -function is() { +function sa() { return { top: 0, right: 0, @@ -2436,37 +2481,37 @@ function is() { left: 0 }; } -function pc(e) { - return Object.assign({}, is(), e); +function mc(e) { + return Object.assign({}, sa(), e); } -function hc(e, t) { +function vc(e, t) { return t.reduce(function(r, n) { return r[n] = e, r; }, {}); } function sn(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 ? Vu : o, u = r.rootBoundary, c = u === void 0 ? ts : u, p = r.elementContext, f = p === void 0 ? ot : p, d = r.altBoundary, h = d === void 0 ? !1 : d, y = r.padding, v = y === void 0 ? 0 : y, T = pc(typeof v != "number" ? v : hc(v, Qt)), A = f === ot ? Hu : ot, I = e.rects.popper, x = e.elements[h ? A : f], O = dc(Re(x) ? x : x.contextElement || Ae(e.elements.popper), l, c, a), g = Qe(e.elements.reference), w = ns({ - reference: g, + var r = t, n = r.placement, i = n === void 0 ? e.placement : n, a = r.strategy, s = a === void 0 ? e.strategy : a, o = r.boundary, l = o === void 0 ? Uu : o, u = r.rootBoundary, c = u === void 0 ? na : u, h = r.elementContext, f = h === void 0 ? ft : h, d = r.altBoundary, p = d === void 0 ? !1 : d, m = r.padding, g = m === void 0 ? 0 : m, x = mc(typeof g != "number" ? g : vc(g, Zt)), A = f === ft ? Wu : ft, I = e.rects.popper, E = e.elements[p ? A : f], S = hc(Ne(E) ? E : E.contextElement || Ce(e.elements.popper), l, c, s), y = tt(e.elements.reference), w = aa({ + reference: y, element: I, strategy: "absolute", placement: i - }), S = xr(Object.assign({}, I, w)), E = f === ot ? S : g, _ = { - top: O.top - E.top + T.top, - bottom: E.bottom - O.bottom + T.bottom, - left: O.left - E.left + T.left, - right: E.right - O.right + T.right - }, $ = e.modifiersData.offset; - if (f === ot && $) { - var C = $[i]; - Object.keys(_).forEach(function(j) { - var k = [Ee, oe].indexOf(j) >= 0 ? 1 : -1, V = [ee, oe].indexOf(j) >= 0 ? "y" : "x"; - _[j] += C[V] * k; + }), O = xr(Object.assign({}, I, w)), $ = f === ft ? O : y, T = { + top: S.top - $.top + x.top, + bottom: $.bottom - S.bottom + x.bottom, + left: S.left - $.left + x.left, + right: $.right - S.right + x.right + }, _ = e.modifiersData.offset; + if (f === ft && _) { + var D = _[i]; + Object.keys(T).forEach(function(k) { + var J = [Ie, ue].indexOf(k) >= 0 ? 1 : -1, j = [re, ue].indexOf(k) >= 0 ? "y" : "x"; + T[k] += D[j] * J; }); } - return _; + return T; } -var kn = "Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.", mc = "Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.", Bn = { +var Bn = "Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.", gc = "Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.", Mn = { placement: "bottom", modifiers: [], strategy: "absolute" @@ -2478,15 +2523,15 @@ function Rn() { return !(n && typeof n.getBoundingClientRect == "function"); }); } -function vc(e) { +function yc(e) { e === void 0 && (e = {}); - var t = e, r = t.defaultModifiers, n = r === void 0 ? [] : r, i = t.defaultOptions, s = i === void 0 ? Bn : i; + var t = e, r = t.defaultModifiers, n = r === void 0 ? [] : r, i = t.defaultOptions, a = i === void 0 ? Mn : i; return function(o, l, u) { - u === void 0 && (u = s); + u === void 0 && (u = a); var c = { placement: "bottom", orderedModifiers: [], - options: Object.assign({}, Bn, s), + options: Object.assign({}, Mn, a), modifiersData: {}, elements: { reference: o, @@ -2494,200 +2539,200 @@ function vc(e) { }, attributes: {}, styles: {} - }, p = [], f = !1, d = { + }, h = [], f = !1, d = { state: c, - setOptions: function(T) { - var A = typeof T == "function" ? T(c.options) : T; - y(), c.options = Object.assign({}, s, c.options, A), c.scrollParents = { - reference: Re(o) ? ct(o) : o.contextElement ? ct(o.contextElement) : [], - popper: ct(l) + setOptions: function(x) { + var A = typeof x == "function" ? x(c.options) : x; + m(), c.options = Object.assign({}, a, c.options, A), c.scrollParents = { + reference: Ne(o) ? mt(o) : o.contextElement ? mt(o.contextElement) : [], + popper: mt(l) }; - var I = tc(ac([].concat(n, c.options.modifiers))); - if (c.orderedModifiers = I.filter(function($) { - return $.enabled; + var I = nc(lc([].concat(n, c.options.modifiers))); + if (c.orderedModifiers = I.filter(function(_) { + return _.enabled; }), process.env.NODE_ENV !== "production") { - var x = sc([].concat(I, c.options.modifiers), function($) { - var C = $.name; - return C; + var E = oc([].concat(I, c.options.modifiers), function(_) { + var D = _.name; + return D; }); - if (ic(x), fe(c.options.placement) === Xt) { - var O = c.orderedModifiers.find(function($) { - var C = $.name; - return C === "flip"; + if (sc(E), pe(c.options.placement) === Jt) { + var S = c.orderedModifiers.find(function(_) { + var D = _.name; + return D === "flip"; }); - O || console.error(['Popper: "auto" placements require the "flip" modifier be', "present and enabled to work."].join(" ")); + S || console.error(['Popper: "auto" placements require the "flip" modifier be', "present and enabled to work."].join(" ")); } - var g = re(l), w = g.marginTop, S = g.marginRight, E = g.marginBottom, _ = g.marginLeft; - [w, S, E, _].some(function($) { - return parseFloat($); + var y = ie(l), w = y.marginTop, O = y.marginRight, $ = y.marginBottom, T = y.marginLeft; + [w, O, $, T].some(function(_) { + return parseFloat(_); }) && console.warn(['Popper: CSS "margin" styles cannot be used to apply padding', "between the popper and its reference element or boundary.", "To replicate margin, use the `offset` modifier, as well as", "the `padding` option in the `preventOverflow` and `flip`", "modifiers."].join(" ")); } - return h(), d.update(); + return p(), d.update(); }, forceUpdate: function() { if (!f) { - var T = c.elements, A = T.reference, I = T.popper; + var x = c.elements, A = x.reference, I = x.popper; if (!Rn(A, I)) { - process.env.NODE_ENV !== "production" && console.error(kn); + process.env.NODE_ENV !== "production" && console.error(Bn); return; } c.rects = { - reference: Ru(A, Kt(I), c.options.strategy === "fixed"), - popper: Zi(I) - }, c.reset = !1, c.placement = c.options.placement, c.orderedModifiers.forEach(function($) { - return c.modifiersData[$.name] = Object.assign({}, $.data); + reference: Nu(A, Qt(I), c.options.strategy === "fixed"), + popper: ta(I) + }, c.reset = !1, c.placement = c.options.placement, c.orderedModifiers.forEach(function(_) { + return c.modifiersData[_.name] = Object.assign({}, _.data); }); - for (var x = 0, O = 0; O < c.orderedModifiers.length; O++) { - if (process.env.NODE_ENV !== "production" && (x += 1, x > 100)) { - console.error(mc); + for (var E = 0, S = 0; S < c.orderedModifiers.length; S++) { + if (process.env.NODE_ENV !== "production" && (E += 1, E > 100)) { + console.error(gc); break; } if (c.reset === !0) { - c.reset = !1, O = -1; + c.reset = !1, S = -1; continue; } - var g = c.orderedModifiers[O], w = g.fn, S = g.options, E = S === void 0 ? {} : S, _ = g.name; + var y = c.orderedModifiers[S], w = y.fn, O = y.options, $ = O === void 0 ? {} : O, T = y.name; typeof w == "function" && (c = w({ state: c, - options: E, - name: _, + options: $, + name: T, instance: d }) || c); } } }, - update: rc(function() { - return new Promise(function(v) { - d.forceUpdate(), v(c); + update: ic(function() { + return new Promise(function(g) { + d.forceUpdate(), g(c); }); }), destroy: function() { - y(), f = !0; + m(), f = !0; } }; if (!Rn(o, l)) - return process.env.NODE_ENV !== "production" && console.error(kn), d; - d.setOptions(u).then(function(v) { - !f && u.onFirstUpdate && u.onFirstUpdate(v); + return process.env.NODE_ENV !== "production" && console.error(Bn), d; + d.setOptions(u).then(function(g) { + !f && u.onFirstUpdate && u.onFirstUpdate(g); }); - function h() { - c.orderedModifiers.forEach(function(v) { - var T = v.name, A = v.options, I = A === void 0 ? {} : A, x = v.effect; - if (typeof x == "function") { - var O = x({ + function p() { + c.orderedModifiers.forEach(function(g) { + var x = g.name, A = g.options, I = A === void 0 ? {} : A, E = g.effect; + if (typeof E == "function") { + var S = E({ state: c, - name: T, + name: x, instance: d, options: I - }), g = function() { + }), y = function() { }; - p.push(O || g); + h.push(S || y); } }); } - function y() { - p.forEach(function(v) { - return v(); - }), p = []; + function m() { + h.forEach(function(g) { + return g(); + }), h = []; } return d; }; } -var At = { +var It = { passive: !0 }; -function gc(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 = J(t.elements.popper), u = [].concat(t.scrollParents.reference, t.scrollParents.popper); - return s && u.forEach(function(c) { - c.addEventListener("scroll", r.update, At); - }), o && l.addEventListener("resize", r.update, At), function() { - s && u.forEach(function(c) { - c.removeEventListener("scroll", r.update, At); - }), o && l.removeEventListener("resize", r.update, At); +function bc(e) { + var t = e.state, r = e.instance, n = e.options, i = n.scroll, a = i === void 0 ? !0 : i, s = n.resize, o = s === void 0 ? !0 : s, l = Q(t.elements.popper), u = [].concat(t.scrollParents.reference, t.scrollParents.popper); + return a && u.forEach(function(c) { + c.addEventListener("scroll", r.update, It); + }), o && l.addEventListener("resize", r.update, It), function() { + a && u.forEach(function(c) { + c.removeEventListener("scroll", r.update, It); + }), o && l.removeEventListener("resize", r.update, It); }; } -const yc = { +const wc = { name: "eventListeners", enabled: !0, phase: "write", fn: function() { }, - effect: gc, + effect: bc, data: {} }; -function bc(e) { +function Sc(e) { var t = e.state, r = e.name; - t.modifiersData[r] = ns({ + t.modifiersData[r] = aa({ reference: t.rects.reference, element: t.rects.popper, strategy: "absolute", placement: t.placement }); } -const wc = { +const Oc = { name: "popperOffsets", enabled: !0, phase: "read", - fn: bc, + fn: Sc, data: {} }; -var Sc = { +var $c = { top: "auto", right: "auto", bottom: "auto", left: "auto" }; -function Oc(e) { +function Ec(e) { var t = e.x, r = e.y, n = window, i = n.devicePixelRatio || 1; return { - x: Xe(t * i) / i || 0, - y: Xe(r * i) / i || 0 + x: et(t * i) / i || 0, + y: et(r * i) / i || 0 }; } -function Mn(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, p = e.isFixed, f = a.x, d = f === void 0 ? 0 : f, h = a.y, y = h === void 0 ? 0 : h, v = typeof c == "function" ? c({ +function Nn(e) { + var t, r = e.popper, n = e.popperRect, i = e.placement, a = e.variation, s = e.offsets, o = e.position, l = e.gpuAcceleration, u = e.adaptive, c = e.roundOffsets, h = e.isFixed, f = s.x, d = f === void 0 ? 0 : f, p = s.y, m = p === void 0 ? 0 : p, g = typeof c == "function" ? c({ x: d, - y + y: m }) : { x: d, - y + y: m }; - d = v.x, y = v.y; - var T = a.hasOwnProperty("x"), A = a.hasOwnProperty("y"), I = ce, x = ee, O = window; + d = g.x, m = g.y; + var x = s.hasOwnProperty("x"), A = s.hasOwnProperty("y"), I = fe, E = re, S = window; if (u) { - var g = Kt(r), w = "clientHeight", S = "clientWidth"; - if (g === J(r) && (g = Ae(r), re(g).position !== "static" && o === "absolute" && (w = "scrollHeight", S = "scrollWidth")), g = g, i === ee || (i === ce || i === Ee) && s === mt) { - x = oe; - var E = p && g === O && O.visualViewport ? O.visualViewport.height : g[w]; - y -= E - n.height, y *= l ? 1 : -1; + var y = Qt(r), w = "clientHeight", O = "clientWidth"; + if (y === Q(r) && (y = Ce(r), ie(y).position !== "static" && o === "absolute" && (w = "scrollHeight", O = "scrollWidth")), y = y, i === re || (i === fe || i === Ie) && a === yt) { + E = ue; + var $ = h && y === S && S.visualViewport ? S.visualViewport.height : y[w]; + m -= $ - n.height, m *= l ? 1 : -1; } - if (i === ce || (i === ee || i === oe) && s === mt) { - I = Ee; - var _ = p && g === O && O.visualViewport ? O.visualViewport.width : g[S]; - d -= _ - n.width, d *= l ? 1 : -1; + if (i === fe || (i === re || i === ue) && a === yt) { + I = Ie; + var T = h && y === S && S.visualViewport ? S.visualViewport.width : y[O]; + d -= T - n.width, d *= l ? 1 : -1; } } - var $ = Object.assign({ + var _ = Object.assign({ position: o - }, u && Sc), C = c === !0 ? Oc({ + }, u && $c), D = c === !0 ? Ec({ x: d, - y + y: m }) : { x: d, - y + y: m }; - if (d = C.x, y = C.y, l) { - var j; - return Object.assign({}, $, (j = {}, j[x] = A ? "0" : "", j[I] = T ? "0" : "", j.transform = (O.devicePixelRatio || 1) <= 1 ? "translate(" + d + "px, " + y + "px)" : "translate3d(" + d + "px, " + y + "px, 0)", j)); + if (d = D.x, m = D.y, l) { + var k; + return Object.assign({}, _, (k = {}, k[E] = A ? "0" : "", k[I] = x ? "0" : "", k.transform = (S.devicePixelRatio || 1) <= 1 ? "translate(" + d + "px, " + m + "px)" : "translate3d(" + d + "px, " + m + "px, 0)", k)); } - return Object.assign({}, $, (t = {}, t[x] = A ? y + "px" : "", t[I] = T ? d + "px" : "", t.transform = "", t)); + return Object.assign({}, _, (t = {}, t[E] = A ? m + "px" : "", t[I] = x ? d + "px" : "", t.transform = "", t)); } -function $c(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; +function xc(e) { + var t = e.state, r = e.options, n = r.gpuAcceleration, i = n === void 0 ? !0 : n, a = r.adaptive, s = a === void 0 ? !0 : a, o = r.roundOffsets, l = o === void 0 ? !0 : o; if (process.env.NODE_ENV !== "production") { - var u = re(t.elements.popper).transitionProperty || ""; - a && ["transform", "top", "right", "bottom", "left"].some(function(p) { - return u.indexOf(p) >= 0; + var u = ie(t.elements.popper).transitionProperty || ""; + s && ["transform", "top", "right", "bottom", "left"].some(function(h) { + return u.indexOf(h) >= 0; }) && console.warn(["Popper: Detected CSS transitions on at least one of the following", 'CSS properties: "transform", "top", "right", "bottom", "left".', ` `, 'Disable the "computeStyles" modifier\'s `adaptive` option to allow', "for smooth transitions, or remove these properties from the CSS", "transition declaration on the popper element if only transitioning", "opacity or background-color for example.", ` @@ -2695,19 +2740,19 @@ function $c(e) { `, "We recommend using the popper element as a wrapper around an inner", "element that can have any CSS property transitioned for animations."].join(" ")); } var c = { - placement: fe(t.placement), - variation: Ye(t.placement), + placement: pe(t.placement), + variation: nt(t.placement), popper: t.elements.popper, popperRect: t.rects.popper, gpuAcceleration: i, isFixed: t.options.strategy === "fixed" }; - t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, Mn(Object.assign({}, c, { + t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, Nn(Object.assign({}, c, { offsets: t.modifiersData.popperOffsets, position: t.options.strategy, - adaptive: a, + adaptive: s, roundOffsets: l - })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, Mn(Object.assign({}, c, { + })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, Nn(Object.assign({}, c, { offsets: t.modifiersData.arrow, position: "absolute", adaptive: !1, @@ -2716,24 +2761,24 @@ function $c(e) { "data-popper-placement": t.placement }); } -const xc = { +const Tc = { name: "computeStyles", enabled: !0, phase: "beforeWrite", - fn: $c, + fn: xc, data: {} }; -function Ec(e) { +function _c(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]; - !Q(s) || !ae(s) || (Object.assign(s.style, n), Object.keys(i).forEach(function(a) { - var o = i[a]; - o === !1 ? s.removeAttribute(a) : s.setAttribute(a, o === !0 ? "" : o); + var n = t.styles[r] || {}, i = t.attributes[r] || {}, a = t.elements[r]; + !Y(a) || !le(a) || (Object.assign(a.style, n), Object.keys(i).forEach(function(s) { + var o = i[s]; + o === !1 ? a.removeAttribute(s) : a.setAttribute(s, o === !0 ? "" : o); })); }); } -function Tc(e) { +function Ac(e) { var t = e.state, r = { popper: { position: t.options.strategy, @@ -2748,188 +2793,188 @@ function Tc(e) { }; return Object.assign(t.elements.popper.style, r.popper), t.styles = r, t.elements.arrow && Object.assign(t.elements.arrow.style, r.arrow), function() { Object.keys(t.elements).forEach(function(n) { - var i = t.elements[n], s = t.attributes[n] || {}, a = Object.keys(t.styles.hasOwnProperty(n) ? t.styles[n] : r[n]), o = a.reduce(function(l, u) { + var i = t.elements[n], a = t.attributes[n] || {}, s = Object.keys(t.styles.hasOwnProperty(n) ? t.styles[n] : r[n]), o = s.reduce(function(l, u) { return l[u] = "", l; }, {}); - !Q(i) || !ae(i) || (Object.assign(i.style, o), Object.keys(s).forEach(function(l) { + !Y(i) || !le(i) || (Object.assign(i.style, o), Object.keys(a).forEach(function(l) { i.removeAttribute(l); })); }); }; } -const _c = { +const Ic = { name: "applyStyles", enabled: !0, phase: "write", - fn: Ec, - effect: Tc, + fn: _c, + effect: Ac, requires: ["computeStyles"] }; -var Ac = [yc, wc, xc, _c], Ic = /* @__PURE__ */ vc({ - defaultModifiers: Ac +var Pc = [wc, Oc, Tc, Ic], Fc = /* @__PURE__ */ yc({ + defaultModifiers: Pc }); -function Pc(e) { +function Cc(e) { return e === "x" ? "y" : "x"; } -function Pt(e, t, r) { - return Le(e, jt(t, r)); +function Ct(e, t, r) { + return Be(e, Bt(t, r)); } -function Cc(e, t, r) { - var n = Pt(e, t, r); +function qc(e, t, r) { + var n = Ct(e, t, r); return n > r ? r : n; } -function Fc(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, p = r.padding, f = r.tether, d = f === void 0 ? !0 : f, h = r.tetherOffset, y = h === void 0 ? 0 : h, v = sn(t, { +function Dc(e) { + var t = e.state, r = e.options, n = e.name, i = r.mainAxis, a = i === void 0 ? !0 : i, s = r.altAxis, o = s === void 0 ? !1 : s, l = r.boundary, u = r.rootBoundary, c = r.altBoundary, h = r.padding, f = r.tether, d = f === void 0 ? !0 : f, p = r.tetherOffset, m = p === void 0 ? 0 : p, g = sn(t, { boundary: l, rootBoundary: u, - padding: p, + padding: h, altBoundary: c - }), T = fe(t.placement), A = Ye(t.placement), I = !A, x = rs(T), O = Pc(x), g = t.modifiersData.popperOffsets, w = t.rects.reference, S = t.rects.popper, E = typeof y == "function" ? y(Object.assign({}, t.rects, { + }), x = pe(t.placement), A = nt(t.placement), I = !A, E = ia(x), S = Cc(E), y = t.modifiersData.popperOffsets, w = t.rects.reference, O = t.rects.popper, $ = typeof m == "function" ? m(Object.assign({}, t.rects, { placement: t.placement - })) : y, _ = typeof E == "number" ? { - mainAxis: E, - altAxis: E + })) : m, T = typeof $ == "number" ? { + mainAxis: $, + altAxis: $ } : Object.assign({ mainAxis: 0, altAxis: 0 - }, E), $ = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, C = { + }, $), _ = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, D = { x: 0, y: 0 }; - if (!!g) { - if (s) { - var j, k = x === "y" ? ee : ce, V = x === "y" ? oe : Ee, R = x === "y" ? "height" : "width", N = g[x], wt = N + v[k], Ie = N - v[V], St = d ? -S[R] / 2 : 0, Yt = A === Je ? w[R] : S[R], nt = A === Je ? -S[R] : -w[R], Ot = t.elements.arrow, Ue = d && Ot ? Zi(Ot) : { + if (!!y) { + if (a) { + var k, J = E === "y" ? re : fe, j = E === "y" ? ue : Ie, P = E === "y" ? "height" : "width", B = y[E], ye = B + g[J], Z = B - g[j], ze = d ? -O[P] / 2 : 0, tr = A === rt ? w[P] : O[P], lt = A === rt ? -O[P] : -w[P], $t = t.elements.arrow, Ge = d && $t ? ta($t) : { width: 0, height: 0 - }, ge = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : is(), it = ge[k], $t = ge[V], Pe = Pt(0, w[R], Ue[R]), Zt = I ? w[R] / 2 - St - Pe - it - _.mainAxis : Yt - Pe - it - _.mainAxis, vs = I ? -w[R] / 2 + St + Pe + $t + _.mainAxis : nt + Pe + $t + _.mainAxis, er = t.elements.arrow && Kt(t.elements.arrow), gs = er ? x === "y" ? er.clientTop || 0 : er.clientLeft || 0 : 0, un = (j = $ == null ? void 0 : $[x]) != null ? j : 0, ys = N + Zt - un - gs, bs = N + vs - un, cn = Pt(d ? jt(wt, ys) : wt, N, d ? Le(Ie, bs) : Ie); - g[x] = cn, C[x] = cn - N; + }, be = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : sa(), ut = be[J], Et = be[j], qe = Ct(0, w[P], Ge[P]), rr = I ? w[P] / 2 - ze - qe - ut - T.mainAxis : tr - qe - ut - T.mainAxis, ya = I ? -w[P] / 2 + ze + qe + Et + T.mainAxis : lt + qe + Et + T.mainAxis, nr = t.elements.arrow && Qt(t.elements.arrow), ba = nr ? E === "y" ? nr.clientTop || 0 : nr.clientLeft || 0 : 0, cn = (k = _ == null ? void 0 : _[E]) != null ? k : 0, wa = B + rr - cn - ba, Sa = B + ya - cn, dn = Ct(d ? Bt(ye, wa) : ye, B, d ? Be(Z, Sa) : Z); + y[E] = dn, D[E] = dn - B; } if (o) { - var fn, ws = x === "x" ? ee : ce, Ss = x === "x" ? oe : Ee, Ce = g[O], xt = O === "y" ? "height" : "width", dn = Ce + v[ws], pn = Ce - v[Ss], tr = [ee, ce].indexOf(T) !== -1, hn = (fn = $ == null ? void 0 : $[O]) != null ? fn : 0, mn = tr ? dn : Ce - w[xt] - S[xt] - hn + _.altAxis, vn = tr ? Ce + w[xt] + S[xt] - hn - _.altAxis : pn, gn = d && tr ? Cc(mn, Ce, vn) : Pt(d ? mn : dn, Ce, d ? vn : pn); - g[O] = gn, C[O] = gn - Ce; + var fn, Oa = E === "x" ? re : fe, $a = E === "x" ? ue : Ie, De = y[S], xt = S === "y" ? "height" : "width", pn = De + g[Oa], hn = De - g[$a], ir = [re, fe].indexOf(x) !== -1, mn = (fn = _ == null ? void 0 : _[S]) != null ? fn : 0, vn = ir ? pn : De - w[xt] - O[xt] - mn + T.altAxis, gn = ir ? De + w[xt] + O[xt] - mn - T.altAxis : hn, yn = d && ir ? qc(vn, De, gn) : Ct(d ? vn : pn, De, d ? gn : hn); + y[S] = yn, D[S] = yn - De; } - t.modifiersData[n] = C; + t.modifiersData[n] = D; } } -const qc = { +const kc = { name: "preventOverflow", enabled: !0, phase: "main", - fn: Fc, + fn: Dc, requiresIfExists: ["offset"] }; -var Dc = { +var Lc = { left: "right", right: "left", bottom: "top", top: "bottom" }; -function Ct(e) { +function qt(e) { return e.replace(/left|right|bottom|top/g, function(t) { - return Dc[t]; + return Lc[t]; }); } -var Lc = { +var jc = { start: "end", end: "start" }; -function Nn(e) { +function Vn(e) { return e.replace(/start|end/g, function(t) { - return Lc[t]; + return jc[t]; }); } -function jc(e, t) { +function Bc(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 ? Uu : l, c = Ye(n), p = c ? o ? Dn : Dn.filter(function(h) { - return Ye(h) === c; - }) : Qt, f = p.filter(function(h) { - return u.indexOf(h) >= 0; + var r = t, n = r.placement, i = r.boundary, a = r.rootBoundary, s = r.padding, o = r.flipVariations, l = r.allowedAutoPlacements, u = l === void 0 ? zu : l, c = nt(n), h = c ? o ? kn : kn.filter(function(p) { + return nt(p) === c; + }) : Zt, f = h.filter(function(p) { + return u.indexOf(p) >= 0; }); - f.length === 0 && (f = p, process.env.NODE_ENV !== "production" && console.error(["Popper: The `allowedAutoPlacements` option did not allow any", "placements. Ensure the `placement` option matches the variation", "of the allowed placements.", 'For example, "auto" cannot be used to allow "bottom-start".', 'Use "auto-start" instead.'].join(" "))); - var d = f.reduce(function(h, y) { - return h[y] = sn(e, { - placement: y, + f.length === 0 && (f = h, process.env.NODE_ENV !== "production" && console.error(["Popper: The `allowedAutoPlacements` option did not allow any", "placements. Ensure the `placement` option matches the variation", "of the allowed placements.", 'For example, "auto" cannot be used to allow "bottom-start".', 'Use "auto-start" instead.'].join(" "))); + var d = f.reduce(function(p, m) { + return p[m] = sn(e, { + placement: m, boundary: i, - rootBoundary: s, - padding: a - })[fe(y)], h; + rootBoundary: a, + padding: s + })[pe(m)], p; }, {}); - return Object.keys(d).sort(function(h, y) { - return d[h] - d[y]; + return Object.keys(d).sort(function(p, m) { + return d[p] - d[m]; }); } -function kc(e) { - if (fe(e) === Xt) +function Mc(e) { + if (pe(e) === Jt) return []; - var t = Ct(e); - return [Nn(e), t, Nn(t)]; + var t = qt(e); + return [Vn(e), t, Vn(t)]; } -function Bc(e) { +function Rc(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, p = r.rootBoundary, f = r.altBoundary, d = r.flipVariations, h = d === void 0 ? !0 : d, y = r.allowedAutoPlacements, v = t.options.placement, T = fe(v), A = T === v, I = l || (A || !h ? [Ct(v)] : kc(v)), x = [v].concat(I).reduce(function(Ue, ge) { - return Ue.concat(fe(ge) === Xt ? jc(t, { - placement: ge, + for (var i = r.mainAxis, a = i === void 0 ? !0 : i, s = r.altAxis, o = s === void 0 ? !0 : s, l = r.fallbackPlacements, u = r.padding, c = r.boundary, h = r.rootBoundary, f = r.altBoundary, d = r.flipVariations, p = d === void 0 ? !0 : d, m = r.allowedAutoPlacements, g = t.options.placement, x = pe(g), A = x === g, I = l || (A || !p ? [qt(g)] : Mc(g)), E = [g].concat(I).reduce(function(Ge, be) { + return Ge.concat(pe(be) === Jt ? Bc(t, { + placement: be, boundary: c, - rootBoundary: p, + rootBoundary: h, padding: u, - flipVariations: h, - allowedAutoPlacements: y - }) : ge); - }, []), O = t.rects.reference, g = t.rects.popper, w = /* @__PURE__ */ new Map(), S = !0, E = x[0], _ = 0; _ < x.length; _++) { - var $ = x[_], C = fe($), j = Ye($) === Je, k = [ee, oe].indexOf(C) >= 0, V = k ? "width" : "height", R = sn(t, { - placement: $, + flipVariations: p, + allowedAutoPlacements: m + }) : be); + }, []), S = t.rects.reference, y = t.rects.popper, w = /* @__PURE__ */ new Map(), O = !0, $ = E[0], T = 0; T < E.length; T++) { + var _ = E[T], D = pe(_), k = nt(_) === rt, J = [re, ue].indexOf(D) >= 0, j = J ? "width" : "height", P = sn(t, { + placement: _, boundary: c, - rootBoundary: p, + rootBoundary: h, altBoundary: f, padding: u - }), N = k ? j ? Ee : ce : j ? oe : ee; - O[V] > g[V] && (N = Ct(N)); - var wt = Ct(N), Ie = []; - if (s && Ie.push(R[C] <= 0), o && Ie.push(R[N] <= 0, R[wt] <= 0), Ie.every(function(Ue) { - return Ue; + }), B = J ? k ? Ie : fe : k ? ue : re; + S[j] > y[j] && (B = qt(B)); + var ye = qt(B), Z = []; + if (a && Z.push(P[D] <= 0), o && Z.push(P[B] <= 0, P[ye] <= 0), Z.every(function(Ge) { + return Ge; })) { - E = $, S = !1; + $ = _, O = !1; break; } - w.set($, Ie); + w.set(_, Z); } - if (S) - for (var St = h ? 3 : 1, Yt = function(ge) { - var it = x.find(function($t) { - var Pe = w.get($t); - if (Pe) - return Pe.slice(0, ge).every(function(Zt) { - return Zt; + if (O) + for (var ze = p ? 3 : 1, tr = function(be) { + var ut = E.find(function(Et) { + var qe = w.get(Et); + if (qe) + return qe.slice(0, be).every(function(rr) { + return rr; }); }); - if (it) - return E = it, "break"; - }, nt = St; nt > 0; nt--) { - var Ot = Yt(nt); - if (Ot === "break") + if (ut) + return $ = ut, "break"; + }, lt = ze; lt > 0; lt--) { + var $t = tr(lt); + if ($t === "break") break; } - t.placement !== E && (t.modifiersData[n]._skip = !0, t.placement = E, t.reset = !0); + t.placement !== $ && (t.modifiersData[n]._skip = !0, t.placement = $, t.reset = !0); } } -const Rc = { +const Nc = { name: "flip", enabled: !0, phase: "main", - fn: Bc, + fn: Rc, requiresIfExists: ["offset"], data: { _skip: !1 } -}, He = (e, t) => { +}, We = (e, t) => { const r = e.__vccOpts || e; for (const [n, i] of t) r[n] = i; return r; -}, Mc = { +}, Vc = { components: { - OnClickOutside: Ji + OnClickOutside: Zi }, props: { spladeId: { @@ -2988,11 +3033,11 @@ const Rc = { } }, mounted: async function() { - this.teleport && await je(); + this.teleport && await xe(); const e = this.teleport ? document.querySelector(`div[data-splade-dropdown-id="${this.spladeId}"]`) : this.$refs.tooltip.children[0]; - this.popper = Ic(this.$refs.button, e, { + this.popper = Fc(this.$refs.button, e, { placement: this.placement, - modifiers: [Rc, qc], + modifiers: [Nc, kc], strategy: this.strategy }); }, @@ -3004,28 +3049,28 @@ const Rc = { this.opened = !1; } } -}, Nc = { ref: "tooltip" }; -function Vc(e, t, r, n, i, s) { - const a = si("OnClickOutside"); - return D(), X(a, { - style: Ft(s.wrapperStyle), - do: s.hide, +}, Hc = { ref: "tooltip" }; +function Uc(e, t, r, n, i, a) { + const s = si("OnClickOutside"); + return L(), K(s, { + style: Dt(a.wrapperStyle), + do: a.hide, opened: i.opened, "ignore-inner-targets": !r.closeOnClick }, { - default: ai(() => [ - cr("div", { + default: oi(() => [ + pr("div", { ref: "button", - style: Ft(s.buttonStyle) + style: Dt(a.buttonStyle) }, [ se(e.$slots, "button", { - toggle: s.toggle, + toggle: a.toggle, disabled: r.disabled }) ], 4), - cr("div", Nc, [ + pr("div", Hc, [ se(e.$slots, "default", { - hide: s.hide, + hide: a.hide, opened: i.opened }) ], 512) @@ -3033,7 +3078,7 @@ function Vc(e, t, r, n, i, s) { _: 3 }, 8, ["style", "do", "opened", "ignore-inner-targets"]); } -const Hc = /* @__PURE__ */ He(Mc, [["render", Vc]]), Uc = { +const Wc = /* @__PURE__ */ We(Vc, [["render", Uc]]), zc = { __name: "DynamicHtml", props: { keepAliveKey: { @@ -3046,45 +3091,45 @@ const Hc = /* @__PURE__ */ He(Mc, [["render", Vc]]), Uc = { } }, setup(e) { - const t = U("$splade") || {}, r = U("$spladeOptions") || {}; - return (n, i) => H(t).isSsr ? (D(), X(ue, { + const t = H("$splade") || {}, r = H("$spladeOptions") || {}; + return (n, i) => V(t).isSsr ? (L(), K(de, { key: e.keepAliveKey, - html: H(t).htmlForDynamicComponent(e.name) - }, null, 8, ["html"])) : (D(), X(ni, { + html: V(t).htmlForDynamicComponent(e.name) + }, null, 8, ["html"])) : (L(), K(ii, { key: 0, - max: H(r).max_keep_alive + max: V(r).max_keep_alive }, [ - (D(), X(ue, { + (L(), K(de, { key: e.keepAliveKey, - html: H(t).htmlForDynamicComponent(e.name) + html: V(t).htmlForDynamicComponent(e.name) }, null, 8, ["html"])) ], 1032, ["max"])); } }; -function ss(e) { +function oa(e) { return e && e.length ? e[0] : void 0; } -const Wc = { +const Gc = { inject: ["stack"], computed: { values() { - return m.validationErrors(this.stack); + return v.validationErrors(this.stack); } }, render() { const e = this; return this.$slots.default({ has(t) { - return K(e.values, t); + return G(e.values, t); }, first(t) { - return ss(e.values[t] || []); + return oa(e.values[t] || []); }, all: { ...this.values }, ...this.values }); } -}, zc = { +}, Kc = { props: { private: { type: Boolean, @@ -3116,12 +3161,12 @@ const Wc = { this.subscribed = !0; }), this.listeners.forEach((e) => { const t = this.subscription.listen(e, (r) => { - const n = "splade.redirect", i = "splade.refresh", s = "splade.toast"; - let a = null, o = !1, l = []; - Y(r, (u) => { - !W(u) || (n in u && (a = u[n]), i in u && (o = u[i]), s in u && l.push(u)); - }), a ? m.visit(a) : o ? m.refresh() : this.events.push({ name: e, data: r }), l.length > 0 && l.forEach((u) => { - m.pushToast(u); + const n = "splade.redirect", i = "splade.refresh", a = "splade.toast"; + let s = null, o = !1, l = []; + ee(r, (u) => { + !U(u) || (n in u && (s = u[n]), i in u && (o = u[i]), a in u && l.push(u)); + }), s ? v.visit(s) : o ? v.refresh() : this.events.push({ name: e, data: r }), l.length > 0 && l.forEach((u) => { + v.pushToast(u); }), this.$root.$emit(`event.${e}`, r); }); this.subscriptions.push(t); @@ -3134,376 +3179,376 @@ const Wc = { }); } }; -function Gc() { - this.__data__ = new me(), this.size = 0; +function Xc() { + this.__data__ = new ve(), this.size = 0; } -function Kc(e) { +function Yc(e) { var t = this.__data__, r = t.delete(e); return this.size = t.size, r; } -function Xc(e) { +function Qc(e) { return this.__data__.get(e); } -function Qc(e) { +function Jc(e) { return this.__data__.has(e); } -var Jc = 200; -function Yc(e, t) { +var Zc = 200; +function ed(e, t) { var r = this.__data__; - if (r instanceof me) { + if (r instanceof ve) { var n = r.__data__; - if (!dt || n.length < Jc - 1) + if (!gt || n.length < Zc - 1) return n.push([e, t]), this.size = ++r.size, this; - r = this.__data__ = new ve(n); + r = this.__data__ = new ge(n); } return r.set(e, t), this.size = r.size, this; } -function de(e) { - var t = this.__data__ = new me(e); +function he(e) { + var t = this.__data__ = new ve(e); this.size = t.size; } -de.prototype.clear = Gc; -de.prototype.delete = Kc; -de.prototype.get = Xc; -de.prototype.has = Qc; -de.prototype.set = Yc; -var Zc = "__lodash_hash_undefined__"; -function ef(e) { - return this.__data__.set(e, Zc), this; +he.prototype.clear = Xc; +he.prototype.delete = Yc; +he.prototype.get = Qc; +he.prototype.has = Jc; +he.prototype.set = ed; +var td = "__lodash_hash_undefined__"; +function rd(e) { + return this.__data__.set(e, td), this; } -function tf(e) { +function nd(e) { return this.__data__.has(e); } -function kt(e) { +function Mt(e) { var t = -1, r = e == null ? 0 : e.length; - for (this.__data__ = new ve(); ++t < r; ) + for (this.__data__ = new ge(); ++t < r; ) this.add(e[t]); } -kt.prototype.add = kt.prototype.push = ef; -kt.prototype.has = tf; -function rf(e, t) { +Mt.prototype.add = Mt.prototype.push = rd; +Mt.prototype.has = nd; +function id(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 nf(e, t) { +function ad(e, t) { return e.has(t); } -var sf = 1, af = 2; -function as(e, t, r, n, i, s) { - var a = r & sf, o = e.length, l = t.length; - if (o != l && !(a && l > o)) +var sd = 1, od = 2; +function la(e, t, r, n, i, a) { + var s = r & sd, o = e.length, l = t.length; + if (o != l && !(s && l > o)) return !1; - var u = s.get(e), c = s.get(t); + var u = a.get(e), c = a.get(t); if (u && c) return u == t && c == e; - var p = -1, f = !0, d = r & af ? new kt() : void 0; - for (s.set(e, t), s.set(t, e); ++p < o; ) { - var h = e[p], y = t[p]; + var h = -1, f = !0, d = r & od ? new Mt() : void 0; + for (a.set(e, t), a.set(t, e); ++h < o; ) { + var p = e[h], m = t[h]; if (n) - var v = a ? n(y, h, p, t, e, s) : n(h, y, p, e, t, s); - if (v !== void 0) { - if (v) + var g = s ? n(m, p, h, t, e, a) : n(p, m, h, e, t, a); + if (g !== void 0) { + if (g) continue; f = !1; break; } if (d) { - if (!rf(t, function(T, A) { - if (!nf(d, A) && (h === T || i(h, T, r, n, s))) + if (!id(t, function(x, A) { + if (!ad(d, A) && (p === x || i(p, x, r, n, a))) return d.push(A); })) { f = !1; break; } - } else if (!(h === y || i(h, y, r, n, s))) { + } else if (!(p === m || i(p, m, r, n, a))) { f = !1; break; } } - return s.delete(e), s.delete(t), f; + return a.delete(e), a.delete(t), f; } -var of = le.Uint8Array; -const Vn = of; -function lf(e) { +var ld = ce.Uint8Array; +const Hn = ld; +function ud(e) { var t = -1, r = Array(e.size); return e.forEach(function(n, i) { r[++t] = [i, n]; }), r; } -function uf(e) { +function cd(e) { var t = -1, r = Array(e.size); return e.forEach(function(n) { r[++t] = n; }), r; } -var cf = 1, ff = 2, df = "[object Boolean]", pf = "[object Date]", hf = "[object Error]", mf = "[object Map]", vf = "[object Number]", gf = "[object RegExp]", yf = "[object Set]", bf = "[object String]", wf = "[object Symbol]", Sf = "[object ArrayBuffer]", Of = "[object DataView]", Hn = Oe ? Oe.prototype : void 0, ur = Hn ? Hn.valueOf : void 0; -function $f(e, t, r, n, i, s, a) { +var dd = 1, fd = 2, pd = "[object Boolean]", hd = "[object Date]", md = "[object Error]", vd = "[object Map]", gd = "[object Number]", yd = "[object RegExp]", bd = "[object Set]", wd = "[object String]", Sd = "[object Symbol]", Od = "[object ArrayBuffer]", $d = "[object DataView]", Un = Te ? Te.prototype : void 0, fr = Un ? Un.valueOf : void 0; +function Ed(e, t, r, n, i, a, s) { switch (r) { - case Of: + case $d: if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset) return !1; e = e.buffer, t = t.buffer; - case Sf: - return !(e.byteLength != t.byteLength || !s(new Vn(e), new Vn(t))); - case df: - case pf: - case vf: - return Hr(+e, +t); - case hf: + case Od: + return !(e.byteLength != t.byteLength || !a(new Hn(e), new Hn(t))); + case pd: + case hd: + case gd: + return Ur(+e, +t); + case md: return e.name == t.name && e.message == t.message; - case gf: - case bf: + case yd: + case wd: return e == t + ""; - case mf: - var o = lf; - case yf: - var l = n & cf; - if (o || (o = uf), e.size != t.size && !l) + case vd: + var o = ud; + case bd: + var l = n & dd; + if (o || (o = cd), e.size != t.size && !l) return !1; - var u = a.get(e); + var u = s.get(e); if (u) return u == t; - n |= ff, a.set(e, t); - var c = as(o(e), o(t), n, i, s, a); - return a.delete(e), c; - case wf: - if (ur) - return ur.call(e) == ur.call(t); + n |= fd, s.set(e, t); + var c = la(o(e), o(t), n, i, a, s); + return s.delete(e), c; + case Sd: + if (fr) + return fr.call(e) == fr.call(t); } return !1; } -function xf(e, t) { +function xd(e, t) { for (var r = -1, n = t.length, i = e.length; ++r < n; ) e[i + r] = t[r]; return e; } -function Ef(e, t, r) { +function Td(e, t, r) { var n = t(e); - return L(e) ? n : xf(n, r(e)); + return M(e) ? n : xd(n, r(e)); } -function os(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); +function ua(e, t) { + for (var r = -1, n = e == null ? 0 : e.length, i = 0, a = []; ++r < n; ) { + var s = e[r]; + t(s, r, e) && (a[i++] = s); } - return s; + return a; } -function Tf() { +function _d() { return []; } -var _f = Object.prototype, Af = _f.propertyIsEnumerable, Un = Object.getOwnPropertySymbols, If = Un ? function(e) { - return e == null ? [] : (e = Object(e), os(Un(e), function(t) { - return Af.call(e, t); +var Ad = Object.prototype, Id = Ad.propertyIsEnumerable, Wn = Object.getOwnPropertySymbols, Pd = Wn ? function(e) { + return e == null ? [] : (e = Object(e), ua(Wn(e), function(t) { + return Id.call(e, t); })); -} : Tf; -const Pf = If; -function Wn(e) { - return Ef(e, Rt, Pf); -} -var Cf = 1, Ff = Object.prototype, qf = Ff.hasOwnProperty; -function Df(e, t, r, n, i, s) { - var a = r & Cf, o = Wn(e), l = o.length, u = Wn(t), c = u.length; - if (l != c && !a) +} : _d; +const Fd = Pd; +function zn(e) { + return Td(e, Nt, Fd); +} +var Cd = 1, qd = Object.prototype, Dd = qd.hasOwnProperty; +function kd(e, t, r, n, i, a) { + var s = r & Cd, o = zn(e), l = o.length, u = zn(t), c = u.length; + if (l != c && !s) return !1; - for (var p = l; p--; ) { - var f = o[p]; - if (!(a ? f in t : qf.call(t, f))) + for (var h = l; h--; ) { + var f = o[h]; + if (!(s ? f in t : Dd.call(t, f))) return !1; } - var d = s.get(e), h = s.get(t); - if (d && h) - return d == t && h == e; - var y = !0; - s.set(e, t), s.set(t, e); - for (var v = a; ++p < l; ) { - f = o[p]; - var T = e[f], A = t[f]; + var d = a.get(e), p = a.get(t); + if (d && p) + return d == t && p == e; + var m = !0; + a.set(e, t), a.set(t, e); + for (var g = s; ++h < l; ) { + f = o[h]; + var x = e[f], A = t[f]; if (n) - var I = a ? n(A, T, f, t, e, s) : n(T, A, f, e, t, s); - if (!(I === void 0 ? T === A || i(T, A, r, n, s) : I)) { - y = !1; + var I = s ? n(A, x, f, t, e, a) : n(x, A, f, e, t, a); + if (!(I === void 0 ? x === A || i(x, A, r, n, a) : I)) { + m = !1; break; } - v || (v = f == "constructor"); + g || (g = f == "constructor"); } - if (y && !v) { - var x = e.constructor, O = t.constructor; - x != O && "constructor" in e && "constructor" in t && !(typeof x == "function" && x instanceof x && typeof O == "function" && O instanceof O) && (y = !1); + if (m && !g) { + var E = e.constructor, S = t.constructor; + E != S && "constructor" in e && "constructor" in t && !(typeof E == "function" && E instanceof E && typeof S == "function" && S instanceof S) && (m = !1); } - return s.delete(e), s.delete(t), y; -} -var Lf = Ne(le, "DataView"); -const Er = Lf; -var jf = Ne(le, "Promise"); -const Tr = jf; -var kf = Ne(le, "Set"); -const _r = kf; -var Bf = Ne(le, "WeakMap"); -const Ar = Bf; -var zn = "[object Map]", Rf = "[object Object]", Gn = "[object Promise]", Kn = "[object Set]", Xn = "[object WeakMap]", Qn = "[object DataView]", Mf = Me(Er), Nf = Me(dt), Vf = Me(Tr), Hf = Me(_r), Uf = Me(Ar), De = _e; -(Er && De(new Er(new ArrayBuffer(1))) != Qn || dt && De(new dt()) != zn || Tr && De(Tr.resolve()) != Gn || _r && De(new _r()) != Kn || Ar && De(new Ar()) != Xn) && (De = function(e) { - var t = _e(e), r = t == Rf ? e.constructor : void 0, n = r ? Me(r) : ""; + return a.delete(e), a.delete(t), m; +} +var Ld = He(ce, "DataView"); +const Tr = Ld; +var jd = He(ce, "Promise"); +const _r = jd; +var Bd = He(ce, "Set"); +const Ar = Bd; +var Md = He(ce, "WeakMap"); +const Ir = Md; +var Gn = "[object Map]", Rd = "[object Object]", Kn = "[object Promise]", Xn = "[object Set]", Yn = "[object WeakMap]", Qn = "[object DataView]", Nd = Ve(Tr), Vd = Ve(gt), Hd = Ve(_r), Ud = Ve(Ar), Wd = Ve(Ir), je = Fe; +(Tr && je(new Tr(new ArrayBuffer(1))) != Qn || gt && je(new gt()) != Gn || _r && je(_r.resolve()) != Kn || Ar && je(new Ar()) != Xn || Ir && je(new Ir()) != Yn) && (je = function(e) { + var t = Fe(e), r = t == Rd ? e.constructor : void 0, n = r ? Ve(r) : ""; if (n) switch (n) { - case Mf: + case Nd: return Qn; - case Nf: - return zn; - case Vf: + case Vd: return Gn; - case Hf: + case Hd: return Kn; - case Uf: + case Ud: return Xn; + case Wd: + return Yn; } return t; }); -const Jn = De; -var Wf = 1, Yn = "[object Arguments]", Zn = "[object Array]", It = "[object Object]", zf = Object.prototype, ei = zf.hasOwnProperty; -function Gf(e, t, r, n, i, s) { - var a = L(e), o = L(t), l = a ? Zn : Jn(e), u = o ? Zn : Jn(t); - l = l == Yn ? It : l, u = u == Yn ? It : u; - var c = l == It, p = u == It, f = l == u; - if (f && fr(e)) { - if (!fr(t)) +const Jn = je; +var zd = 1, Zn = "[object Arguments]", ei = "[object Array]", Pt = "[object Object]", Gd = Object.prototype, ti = Gd.hasOwnProperty; +function Kd(e, t, r, n, i, a) { + var s = M(e), o = M(t), l = s ? ei : Jn(e), u = o ? ei : Jn(t); + l = l == Zn ? Pt : l, u = u == Zn ? Pt : u; + var c = l == Pt, h = u == Pt, f = l == u; + if (f && hr(e)) { + if (!hr(t)) return !1; - a = !0, c = !1; + s = !0, c = !1; } if (f && !c) - return s || (s = new de()), a || pi(e) ? as(e, t, r, n, i, s) : $f(e, t, l, r, n, i, s); - if (!(r & Wf)) { - var d = c && ei.call(e, "__wrapped__"), h = p && ei.call(t, "__wrapped__"); - if (d || h) { - var y = d ? e.value() : e, v = h ? t.value() : t; - return s || (s = new de()), i(y, v, r, n, s); + return a || (a = new he()), s || hi(e) ? la(e, t, r, n, i, a) : Ed(e, t, l, r, n, i, a); + if (!(r & zd)) { + var d = c && ti.call(e, "__wrapped__"), p = h && ti.call(t, "__wrapped__"); + if (d || p) { + var m = d ? e.value() : e, g = p ? t.value() : t; + return a || (a = new he()), i(m, g, r, n, a); } } - return f ? (s || (s = new de()), Df(e, t, r, n, i, s)) : !1; + return f ? (a || (a = new he()), kd(e, t, r, n, i, a)) : !1; } -function Jt(e, t, r, n, i) { - return e === t ? !0 : e == null || t == null || !$e(e) && !$e(t) ? e !== e && t !== t : Gf(e, t, r, n, Jt, i); +function er(e, t, r, n, i) { + return e === t ? !0 : e == null || t == null || !_e(e) && !_e(t) ? e !== e && t !== t : Kd(e, t, r, n, er, i); } -var Kf = 1, Xf = 2; -function Qf(e, t, r, n) { - var i = r.length, s = i, a = !n; +var Xd = 1, Yd = 2; +function Qd(e, t, r, n) { + var i = r.length, a = i, s = !n; if (e == null) - return !s; + return !a; for (e = Object(e); i--; ) { var o = r[i]; - if (a && o[2] ? o[1] !== e[o[0]] : !(o[0] in e)) + if (s && o[2] ? o[1] !== e[o[0]] : !(o[0] in e)) return !1; } - for (; ++i < s; ) { + for (; ++i < a; ) { o = r[i]; var l = o[0], u = e[l], c = o[1]; - if (a && o[2]) { + if (s && o[2]) { if (u === void 0 && !(l in e)) return !1; } else { - var p = new de(); + var h = new he(); if (n) - var f = n(u, c, l, e, t, p); - if (!(f === void 0 ? Jt(c, u, Kf | Xf, n, p) : f)) + var f = n(u, c, l, e, t, h); + if (!(f === void 0 ? er(c, u, Xd | Yd, n, h) : f)) return !1; } } return !0; } -function ls(e) { - return e === e && !W(e); +function ca(e) { + return e === e && !U(e); } -function Jf(e) { - for (var t = Rt(e), r = t.length; r--; ) { +function Jd(e) { + for (var t = Nt(e), r = t.length; r--; ) { var n = t[r], i = e[n]; - t[r] = [n, i, ls(i)]; + t[r] = [n, i, ca(i)]; } return t; } -function us(e, t) { +function da(e, t) { return function(r) { return r == null ? !1 : r[e] === t && (t !== void 0 || e in Object(r)); }; } -function Yf(e) { - var t = Jf(e); - return t.length == 1 && t[0][2] ? us(t[0][0], t[0][1]) : function(r) { - return r === e || Qf(r, e, t); +function Zd(e) { + var t = Jd(e); + return t.length == 1 && t[0][2] ? da(t[0][0], t[0][1]) : function(r) { + return r === e || Qd(r, e, t); }; } -function Zf(e, t) { +function ef(e, t) { return e != null && t in Object(e); } -function ed(e, t) { - return e != null && Fi(e, t, Zf); +function tf(e, t) { + return e != null && qi(e, t, ef); } -var td = 1, rd = 2; -function nd(e, t) { - return Vr(e) && ls(t) ? us(gt(e), t) : function(r) { - var n = ht(r, e); - return n === void 0 && n === t ? ed(r, e) : Jt(t, n, td | rd); +var rf = 1, nf = 2; +function af(e, t) { + return Hr(e) && ca(t) ? da(wt(e), t) : function(r) { + var n = Je(r, e); + return n === void 0 && n === t ? tf(r, e) : er(t, n, rf | nf); }; } -function id(e) { +function sf(e) { return function(t) { return t == null ? void 0 : t[e]; }; } -function sd(e) { +function of(e) { return function(t) { - return Ki(t, e); + return Yi(t, e); }; } -function ad(e) { - return Vr(e) ? id(gt(e)) : sd(e); +function lf(e) { + return Hr(e) ? sf(wt(e)) : of(e); } -function bt(e) { - return typeof e == "function" ? e : e == null ? mi : typeof e == "object" ? L(e) ? nd(e[0], e[1]) : Yf(e) : ad(e); +function Ot(e) { + return typeof e == "function" ? e : e == null ? vi : typeof e == "object" ? M(e) ? af(e[0], e[1]) : Zd(e) : lf(e); } -function od(e) { +function uf(e) { return function(t, r, n) { var i = Object(t); - if (!Bt(t)) { - var s = bt(r); - t = Rt(t), r = function(o) { - return s(i[o], o, i); + if (!Rt(t)) { + var a = Ot(r); + t = Nt(t), r = function(o) { + return a(i[o], o, i); }; } - var a = e(t, r, n); - return a > -1 ? i[s ? t[a] : a] : void 0; + var s = e(t, r, n); + return s > -1 ? i[a ? t[s] : s] : void 0; }; } -function ld(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; +function cf(e, t, r, n) { + for (var i = e.length, a = r + (n ? 1 : -1); n ? a-- : ++a < i; ) + if (t(e[a], a, e)) + return a; return -1; } -var ti = 1 / 0, ud = 17976931348623157e292; -function cd(e) { +var ri = 1 / 0, df = 17976931348623157e292; +function ff(e) { if (!e) return e === 0 ? e : 0; - if (e = Sr(e), e === ti || e === -ti) { + if (e = Or(e), e === ri || e === -ri) { var t = e < 0 ? -1 : 1; - return t * ud; + return t * df; } return e === e ? e : 0; } -function an(e) { - var t = cd(e), r = t % 1; +function on(e) { + var t = ff(e), r = t % 1; return t === t ? r ? t - r : t : 0; } -var fd = Math.max; -function dd(e, t, r) { +var pf = Math.max; +function hf(e, t, r) { var n = e == null ? 0 : e.length; if (!n) return -1; - var i = r == null ? 0 : an(r); - return i < 0 && (i = fd(n + i, 0)), ld(e, bt(t), i); + var i = r == null ? 0 : on(r); + return i < 0 && (i = pf(n + i, 0)), cf(e, Ot(t), i); } -var pd = od(dd); -const on = pd, hd = { +var mf = uf(hf); +const ln = mf, vf = { props: { form: { type: Object, @@ -3633,7 +3678,7 @@ const on = pd, hd = { }, methods: { extractMetadataFromExistingFile(e) { - return e ? ze(e) ? e : L(e) ? e.map(this.extractMetadataFromExistingFile) : W(e) ? e.options.metadata.metadata : null : null; + return e ? Xe(e) ? e : M(e) ? e.map(this.extractMetadataFromExistingFile) : U(e) ? e.options.metadata.metadata : null : null; }, setExisting(e) { !this.handlesExistingFiles || (this.form.$put(this.existingField, this.extractMetadataFromExistingFile(e)), this.setOrder()); @@ -3661,11 +3706,11 @@ const on = pd, hd = { const t = this.inputElement.getAttribute("name"), r = this; return new Promise((n) => { import("filepond").then((i) => { - const s = Object.assign({}, r.filepond, r.jsFilepondOptions, { + const a = Object.assign({}, r.filepond, r.jsFilepondOptions, { oninit() { - const a = setInterval(() => { + const s = setInterval(() => { if (r.filepondInstance.status < 2) - clearInterval(a); + clearInterval(s); else return; r.setOrder(); @@ -3675,14 +3720,14 @@ const on = pd, hd = { }), n(); }, 15); }, - onaddfile(a, o) { - a || o.origin !== i.FileOrigin.LOCAL && (r.server ? r.$emit("start-uploading", [o.id]) : r.addFiles([o.file]), r.setOrder()); + onaddfile(s, o) { + s || o.origin !== i.FileOrigin.LOCAL && (r.server ? r.$emit("start-uploading", [o.id]) : r.addFiles([o.file]), r.setOrder()); }, - onremovefile(a, o) { - a || (r.handlesExistingFiles && (r.multiple ? r.setExisting(r.form[r.existingField].filter((l) => o.getMetadata("metadata") !== l)) : r.setExisting(null)), r.removeFile(o.file)); + onremovefile(s, o) { + s || (r.handlesExistingFiles && (r.multiple ? r.setExisting(r.form[r.existingField].filter((l) => o.getMetadata("metadata") !== l)) : r.setExisting(null)), r.removeFile(o.file)); }, - onprocessfile(a, o) { - a || (r.uploadedFiles.push({ + onprocessfile(s, o) { + s || (r.uploadedFiles.push({ file: o.file, id: o.serverId }), r.addFiles([o.serverId]), r.$emit("stop-uploading", [o.id])); @@ -3691,17 +3736,17 @@ const on = pd, hd = { r.setOrder(); } }); - this.hadExistingFiles && (s.files = this.multiple ? e : [e]), this.accept.length > 0 && (s.acceptedFileTypes = this.accept), this.minFileSize && (s.minFileSize = this.minFileSize), this.maxFileSize && (s.maxFileSize = this.maxFileSize), this.minImageWidth && (s.imageValidateSizeMinWidth = this.minImageWidth), this.maxImageWidth && (s.imageValidateSizeMaxWidth = this.maxImageWidth), this.minImageHeight && (s.imageValidateSizeMinHeight = this.minImageHeight), this.maxImageHeight && (s.imageValidateSizeMaxHeight = this.maxImageHeight), this.minImageResolution && (s.imageValidateSizeMinResolution = this.minImageResolution), this.maxImageResolution && (s.imageValidateSizeMaxResolution = this.maxImageResolution), s.server = { - load: (a, o, l, u, c) => { - const f = we.CancelToken.source(); - return we({ - url: a.preview_url, + this.hadExistingFiles && (a.files = this.multiple ? e : [e]), this.accept.length > 0 && (a.acceptedFileTypes = this.accept), this.minFileSize && (a.minFileSize = this.minFileSize), this.maxFileSize && (a.maxFileSize = this.maxFileSize), this.minImageWidth && (a.imageValidateSizeMinWidth = this.minImageWidth), this.maxImageWidth && (a.imageValidateSizeMaxWidth = this.maxImageWidth), this.minImageHeight && (a.imageValidateSizeMinHeight = this.minImageHeight), this.maxImageHeight && (a.imageValidateSizeMaxHeight = this.maxImageHeight), this.minImageResolution && (a.imageValidateSizeMinResolution = this.minImageResolution), this.maxImageResolution && (a.imageValidateSizeMaxResolution = this.maxImageResolution), a.server = { + load: (s, o, l, u, c) => { + const f = Oe.CancelToken.source(); + return Oe({ + url: s.preview_url, method: "GET", cancelToken: f.token, responseType: "blob" }).then((d) => { - const h = new File([d.data], a.name, { type: a.type }); - o(h); + const p = new File([d.data], s.name, { type: s.type }); + o(p); }).catch(function(d) { axios.isCancel(d) || l(d); }), { @@ -3710,43 +3755,43 @@ const on = pd, hd = { } }; } - }, this.server && (s.server.process = (a, o, l, u, c, p, f) => { + }, this.server && (a.server.process = (s, o, l, u, c, h, f) => { const d = new FormData(); d.append("file", o, o.name); - const y = we.CancelToken.source(); - we({ + const m = Oe.CancelToken.source(); + Oe({ url: r.server, method: "POST", data: d, - cancelToken: y.token, - onUploadProgress: (v) => { - p(v.lengthComputable, v.loaded, v.total); + cancelToken: m.token, + onUploadProgress: (g) => { + h(g.lengthComputable, g.loaded, g.total); } - }).then((v) => { - v.status >= 200 && v.status < 300 ? u(v.data) : c(v.statusText); - }).catch(function(v) { - var T; - axios.isCancel(v) ? f() : c((T = v.response) == null ? void 0 : T.statusText); + }).then((g) => { + g.status >= 200 && g.status < 300 ? u(g.data) : c(g.statusText); + }).catch(function(g) { + var x; + axios.isCancel(g) ? f() : c((x = g.response) == null ? void 0 : x.statusText); }); - }, s.server.revert = (a, o, l) => { - we({ + }, a.server.revert = (s, o, l) => { + Oe({ url: r.server, method: "POST", - data: { _method: "DELETE", file: a } + data: { _method: "DELETE", file: s } }).then(() => { o(); }).catch(function(u) { var c; l((c = u.response) == null ? void 0 : c.statusText); }); - }), this.loadFilepondPlugins(i).then((a) => { - a.length > 0 && i.registerPlugin(...a.map((o) => o.default)), this.filepondInstance = i.create(this.inputElement, s); + }), this.loadFilepondPlugins(i).then((s) => { + s.length > 0 && i.registerPlugin(...s.map((o) => o.default)), this.filepondInstance = i.create(this.inputElement, a); }); }); }); }, removeFile(e) { - this.server && (e = on(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 = ln(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) { @@ -3771,44 +3816,44 @@ const on = pd, hd = { this.addFiles(t); } } -}, md = { ref: "file" }; -function vd(e, t, r, n, i, s) { - return D(), pe("div", md, [ +}, gf = { ref: "file" }; +function yf(e, t, r, n, i, a) { + return L(), me("div", gf, [ se(e.$slots, "default", { - handleFileInput: s.handleFileInput, + handleFileInput: a.handleFileInput, filenames: i.filenames }) ], 512); } -const gd = /* @__PURE__ */ He(hd, [["render", vd]]), yd = { +const bf = /* @__PURE__ */ We(vf, [["render", yf]]), wf = { inject: ["stack"], computed: { values() { - return m.flashData(this.stack); + return v.flashData(this.stack); } }, render() { const e = this; return this.$slots.default({ has(t) { - return K(e.values, t); + return G(e.values, t); }, ...this.values }); } }; -function ln(e, t, r) { +function un(e, t, r) { e = e || {}, t = t || new FormData(), r = r || null; for (const n in e) - Object.prototype.hasOwnProperty.call(e, n) && fs(t, cs(r, n), e[n]); + Object.prototype.hasOwnProperty.call(e, n) && pa(t, fa(r, n), e[n]); return t; } -function cs(e, t) { +function fa(e, t) { return e ? e + "[" + t + "]" : t; } -function fs(e, t, r) { +function pa(e, t, r) { if (Array.isArray(r)) - return Array.from(r.keys()).forEach((n) => fs(e, cs(t, n.toString()), r[n])); + return Array.from(r.keys()).forEach((n) => pa(e, fa(t, n.toString()), r[n])); if (r instanceof Date) return e.append(t, r.toISOString()); if (r instanceof File) @@ -3823,25 +3868,25 @@ function fs(e, t, r) { return e.append(t, `${r}`); if (r == null) return e.append(t, ""); - ln(r, e, t); + un(r, e, t); } -var bd = "[object Boolean]"; -function ds(e) { - return e === !0 || e === !1 || $e(e) && _e(e) == bd; +var Sf = "[object Boolean]"; +function ha(e) { + return e === !0 || e === !1 || _e(e) && Fe(e) == Sf; } -function ps(e, t) { +function ma(e, t) { var r = {}; - return t = bt(t), Dr(e, function(n, i, s) { - Xi(r, i, t(n, i, s)); + return t = Ot(t), kr(e, function(n, i, a) { + Qi(r, i, t(n, i, a)); }), r; } -function hs(e, t, r) { +function va(e, t, r) { return e === e && (r !== void 0 && (e = e <= r ? e : r), t !== void 0 && (e = e >= t ? e : t)), e; } -function Ge(e, t, r) { - return e = Wr(e), r = r == null ? 0 : hs(an(r), 0, e.length), t = Ut(t), e.slice(r, r + t.length) == t; +function Ye(e, t, r) { + return e = zr(e), r = r == null ? 0 : va(on(r), 0, e.length), t = Gt(t), e.slice(r, r + t.length) == t; } -const wd = { +const Of = { inject: ["stack"], props: { spladeId: { @@ -3853,7 +3898,7 @@ const wd = { type: String, required: !1, default() { - return m.isSsr ? "" : location.href; + return v.isSsr ? "" : location.href; } }, method: { @@ -3940,10 +3985,10 @@ const wd = { return this.elementsUploading.length > 0; }, rawErrors() { - return m.validationErrors(this.stack); + return v.validationErrors(this.stack); }, errors() { - return ps(this.rawErrors, (e) => e.join(` + return ma(this.rawErrors, (e) => e.join(` `)); } }, @@ -3955,7 +4000,7 @@ const wd = { 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.$nextTick(() => this.request()); - }, { deep: !0 }) : L(this.submitOnChange) && this.submitOnChange.forEach((r) => { + }, { deep: !0 }) : M(this.submitOnChange) && this.submitOnChange.forEach((r) => { this.$watch(`values.${r}`, () => { this.$nextTick(() => this.request()); }, { deep: !0 }); @@ -4001,7 +4046,7 @@ const wd = { this.values = Object.assign({}, { ...this.default }); }, $put(e, t) { - return Qi(this.values, e, t); + return Ji(this.values, e, t); }, focusAndScrollToElement(e) { let t = !0; @@ -4026,8 +4071,8 @@ const wd = { } if (!this.confirm) return this.request(); - m.confirm( - ds(this.confirm) ? "" : this.confirm, + v.confirm( + ha(this.confirm) ? "" : this.confirm, this.confirmText, this.confirmButton, this.cancelButton @@ -4041,16 +4086,16 @@ const wd = { if (this.$uploading) return; await this.$nextTick(), this.processing = !0, this.wasSuccessful = !1, this.recentlySuccessful = !1, clearTimeout(this.recentlySuccessfulTimeoutId); - const e = this.values instanceof FormData ? this.values : ln(this.values), t = { Accept: "application/json" }; + const e = this.values instanceof FormData ? this.values : un(this.values), t = { Accept: "application/json" }; this.stay && (t["X-Splade-Prevent-Refresh"] = !0); let r = this.method.toUpperCase(); - r !== "GET" && r !== "POST" && (e.append("_method", r), r = "POST"), m.request(this.action, r, e, t).then((n) => { + r !== "GET" && r !== "POST" && (e.append("_method", r), r = "POST"), v.request(this.action, r, e, t).then((n) => { this.$emit("success", n), this.restoreOnSuccess && this.restore(), this.resetOnSuccess && this.reset(), this.processing = !1, this.wasSuccessful = !0, this.recentlySuccessful = !0, this.recentlySuccessfulTimeoutId = setTimeout(() => this.recentlySuccessful = !1, 2e3); }).catch(async (n) => { if (this.processing = !1, this.$emit("error", n), !this.scrollOnError) return; await this.$nextTick(); - const i = on(Object.keys(this.errors), (s) => this.formElement.querySelector(`[data-validation-key="${s}"]`)); + const i = ln(Object.keys(this.errors), (a) => this.formElement.querySelector(`[data-validation-key="${a}"]`)); i && this.focusAndScrollToElement( this.formElement.querySelector(`[data-validation-key="${i}"]`) ); @@ -4088,7 +4133,7 @@ const wd = { "submit", "wasSuccessful", "recentlySuccessful" - ].includes(r) || Ge(r, "__v_") ? e[r] : (!e.isMounted && !K(e.values, r) && (e.missingAttributes.push(r), e.$put(r, "")), ht(e.values, r)); + ].includes(r) || Ye(r, "__v_") ? e[r] : (!e.isMounted && !G(e.values, r) && (e.missingAttributes.push(r), e.$put(r, "")), Je(e.values, r)); }, set(t, r, n) { return e.$put(r, n); @@ -4097,7 +4142,7 @@ const wd = { ) ); } -}, Sd = { +}, $f = { props: { flatpickr: { type: [Boolean, Object], @@ -4154,14 +4199,14 @@ const wd = { }); } } -}, Od = { ref: "input" }; -function $d(e, t, r, n, i, s) { - return D(), pe("div", Od, [ +}, Ef = { ref: "input" }; +function xf(e, t, r, n, i, a) { + return L(), me("div", Ef, [ se(e.$slots, "default", { disabled: i.disabled }) ], 512); } -const xd = /* @__PURE__ */ He(Sd, [["render", $d]]), Ed = { - components: { Render: ue }, +const Tf = /* @__PURE__ */ We($f, [["render", xf]]), _f = { + components: { Render: de }, props: { name: { type: String, @@ -4171,7 +4216,7 @@ const xd = /* @__PURE__ */ He(Sd, [["render", $d]]), Ed = { type: String, required: !1, default() { - return m.isSsr ? "" : window.location.href; + return v.isSsr ? "" : window.location.href; } }, show: { @@ -4195,20 +4240,20 @@ const xd = /* @__PURE__ */ He(Sd, [["render", $d]]), Ed = { }, methods: { async request() { - this.html = null, m.lazy(this.url, this.name).then((e) => { + this.html = null, v.lazy(this.url, this.name).then((e) => { this.html = e.data.html; }); } } }; -function Td(e, t, r, n, i, s) { - const a = si("Render"); - return i.html ? (D(), X(a, { +function Af(e, t, r, n, i, a) { + const s = si("Render"); + return i.html ? (L(), K(s, { key: 0, html: i.html - }, null, 8, ["html"])) : r.show ? se(e.$slots, "default", { key: 1 }) : Pr("", !0); + }, null, 8, ["html"])) : r.show ? se(e.$slots, "default", { key: 1 }) : Fr("", !0); } -const _d = /* @__PURE__ */ He(Ed, [["render", Td]]), Ad = ["href", "onClick"], Id = { +const If = /* @__PURE__ */ We(_f, [["render", Af]]), Pf = ["href", "onClick"], Ff = { __name: "Link", props: { href: { @@ -4270,49 +4315,58 @@ const _d = /* @__PURE__ */ He(Ed, [["render", Td]]), Ad = ["href", "onClick"], I type: Boolean, required: !1, default: !1 + }, + keepModal: { + type: Boolean, + required: !1, + default: !1 } }, setup(e) { - const t = e; - function r() { + const t = e, r = H("stack"); + function n() { if (!t.confirm) - return n(); - m.confirm( - ds(t.confirm) ? "" : t.confirm, + return i(); + v.confirm( + ha(t.confirm) ? "" : t.confirm, t.confirmText, t.confirmButton, t.cancelButton ).then(() => { - n(); + i(); }).catch(() => { }); } - function n() { + function i() { if (t.away) return window.location = t.href; - if (t.modal) - return m.modal(t.href); - if (t.slideover) - return m.slideover(t.href); - if (Ge(t.href, "#")) { - if (m.openPreloadedModal(t.href.substring(1))) + const s = r > 0 && t.keepModal; + if (t.modal && !s) + return v.modal(t.href); + if (t.slideover && !s) + return v.slideover(t.href); + if (Ye(t.href, "#")) { + if (v.openPreloadedModal(t.href.substring(1))) return; console.log("No preloaded modal found for " + t.href); } - let i = t.method.trim().toUpperCase(); - if (i === "GET") - return t.replace ? m.replace(t.href) : m.visit(t.href); - const s = t.data instanceof FormData ? t.data : ln(t.data); - i !== "POST" && (s.append("_method", i), i = "POST"), m.request(t.href, i, s, t.headers, t.replace); + let o = t.method.trim().toUpperCase(); + const l = { + ...t.headers + }; + if (s && (l["X-Splade-Modal"] = v.stackType(r), l["X-Splade-Modal-Target"] = r), o === "GET") + return t.replace ? v.replace(t.href, l) : v.visit(t.href, l); + const u = t.data instanceof FormData ? t.data : un(t.data); + o !== "POST" && (u.append("_method", o), o = "POST"), v.request(t.href, o, u, l, t.replace); } - return (i, s) => (D(), pe("a", { + return (a, s) => (L(), me("a", { href: e.href, - onClick: _s(r, ["prevent"]) + onClick: Ia(n, ["prevent"]) }, [ - se(i.$slots, "default") - ], 8, Ad)); + se(a.$slots, "default") + ], 8, Pf)); } -}, Pd = { +}, Cf = { provide() { return { stack: this.stack @@ -4342,20 +4396,31 @@ const _d = /* @__PURE__ */ He(Ed, [["render", Td]]), Ad = ["href", "onClick"], I required: !1, default: (e) => e.type === "modal" ? "2xl" : "md" }, + position: { + type: String, + required: !1, + default: "center" + }, name: { type: String, required: !1, default: null + }, + animate: { + type: Boolean, + required: !1, + default: !0 } }, emits: ["close"], data() { return { + staticAnimate: !0, isOpen: !1 }; }, mounted() { - this.setIsOpen(!0); + this.staticAnimate = this.animate, this.setIsOpen(!0); }, methods: { emitClose() { @@ -4379,13 +4444,15 @@ const _d = /* @__PURE__ */ He(Ed, [["render", Td]]), Ad = ["href", "onClick"], I maxWidth: this.maxWidth, emitClose: this.emitClose, closeButton: this.closeButton, - Dialog: Xr, + animate: this.staticAnimate, + position: this.position, + Dialog: Yr, DialogPanel: Qr, - TransitionRoot: rt, - TransitionChild: tt + TransitionRoot: ot, + TransitionChild: st }); } -}, Cd = { +}, qf = { __name: "PreloadedModal", props: { name: { @@ -4404,21 +4471,21 @@ const _d = /* @__PURE__ */ He(Ed, [["render", Td]]), Ad = ["href", "onClick"], I }, setup(e) { const t = e; - return m.registerPreloadedModal(t.name, t.html, t.type), () => { + return v.registerPreloadedModal(t.name, t.html, t.type), () => { }; } }; -function Fd(e, t) { - var r = -1, n = Bt(e) ? Array(e.length) : []; - return Lr(e, function(i, s, a) { - n[++r] = t(i, s, a); +function Df(e, t) { + var r = -1, n = Rt(e) ? Array(e.length) : []; + return Lr(e, function(i, a, s) { + n[++r] = t(i, a, s); }), n; } -function ms(e, t) { - var r = L(e) ? Ci : Fd; - return r(e, bt(t)); +function ga(e, t) { + var r = M(e) ? Ci : Df; + return r(e, Ot(t)); } -const qd = { +const kf = { inject: ["stack"], props: { choices: { @@ -4464,6 +4531,11 @@ const qd = { type: String, required: !1, default: null + }, + remoteRoot: { + type: String, + required: !1, + default: null } }, emits: ["update:modelValue"], @@ -4485,7 +4557,7 @@ const qd = { }, watch: { modelValue(e, t) { - if (!this.choicesInstance && this.multiple && L(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); @@ -4516,7 +4588,7 @@ const qd = { }, methods: { loadRemoteOptions() { - !this.remoteUrl || (this.loading = !0, we({ + !this.remoteUrl || (this.loading = !0, Oe({ url: this.remoteUrl, method: "GET", headers: { @@ -4525,14 +4597,14 @@ const qd = { }).then((e) => { this.destroyChoicesInstance(); let t = []; - this.placeholder && t.push(this.placeholder), t = this.normalizeOptions(e.data, t); + this.placeholder && t.push(this.placeholder), t = this.normalizeOptions(this.remoteRoot ? Je(e.data, this.remoteRoot) : e.data, t); var r, n = this.element.options.length - 1; for (r = n; r >= 0; r--) this.element.remove(r); let i = !1; - if (Y(t, (s) => { - var a = document.createElement("option"); - a.value = s.value, a.text = s.label, s.value === this.modelValue && (i = !0), s.disabled && (a.disabled = s.disabled), s.placeholder && (a.placeholder = s.placeholder), this.element.appendChild(a); + if (ee(t, (a) => { + var s = document.createElement("option"); + s.value = a.value, s.text = a.label, a.value === this.modelValue && (i = !0), a.disabled && (s.disabled = a.disabled), a.placeholder && (s.placeholder = a.placeholder), this.element.appendChild(s); }), i || this.$emit("update:modelValue", this.multiple ? [] : ""), this.choices) return this.initChoices(this.element).then(() => { this.loading = !1; @@ -4549,22 +4621,22 @@ const qd = { this.choices && this.choicesInstance && (this.headlessListener && ((e = document.querySelector("#headlessui-portal-root")) == null || e.removeEventListener("click", this.headlessListener)), this.selectChangeListener && this.element.removeEventListener("change", this.selectChangeListener), this.selectShowDropdownListener && this.element.removeEventListener("showDropdown", this.selectShowDropdownListener), this.choicesInstance.destroy(), this.choicesInstance = null); }, normalizeOptions(e, t) { - const r = L(e); - return !r && W(e) ? this.optionValue && this.optionLabel ? t.push({ - value: ht(e, this.optionValue), - label: ht(e, this.optionLabel) - }) : Y(e, (n, i) => { + const r = M(e); + return !r && U(e) ? this.optionValue && this.optionLabel ? t.push({ + value: Je(e, this.optionValue), + label: Je(e, this.optionLabel) + }) : ee(e, (n, i) => { t.push({ label: n, value: i }); }) : r && e.forEach((n) => { this.normalizeOptions(n, t); }), t; }, setValueOnChoices(e) { - Array.isArray(e) && (e = ms(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 = ga(e, (t) => `${t}`), this.choicesInstance.removeActiveItems()), e == null ? e = "" : Array.isArray(e) || (e = `${e}`), this.choicesInstance.setChoiceByValue(e), this.updateHasSelectionAttribute(), this.handlePlaceholderVisibility(); }, getItemOfCurrentModel() { const e = this.modelValue; - return on(this.choicesInstance._store.choices, (t) => t.value == e); + return ln(this.choicesInstance._store.choices, (t) => t.value == e); }, handlePlaceholderVisibility() { if (!this.multiple) @@ -4582,33 +4654,33 @@ const qd = { e.querySelectorAll("option:not([placeholder])") ).length, n = this; import("choices.js").then((i) => { - const s = Object.assign({}, this.choices, this.jsChoicesOptions, { + const a = Object.assign({}, this.choices, this.jsChoicesOptions, { callbackOnInit: function() { - const a = this; + const s = this; n.stack > 0 && (n.headlessListener = function(o) { const l = n.choicesInstance.dropdown.isActive; !l && o.target === e ? n.choicesInstance.showDropdown() : l && o.target !== e && n.choicesInstance.hideDropdown(); - }, document.querySelector("#headlessui-portal-root").addEventListener("click", n.headlessListener, { capture: !0 })), a.containerInner.element.setAttribute( + }, document.querySelector("#headlessui-portal-root").addEventListener("click", n.headlessListener, { capture: !0 })), s.containerInner.element.setAttribute( "data-select-name", e.name - ), e.hasAttribute("dusk") && e.removeAttribute("dusk"), n.dusk && (a.containerInner.element.setAttribute("dusk", n.dusk), a.choiceList.element.setAttribute("dusk", `${n.dusk}-listbox`)), n.selectChangeListener = function() { - let o = a.getValue(!0); + ), e.hasAttribute("dusk") && e.removeAttribute("dusk"), n.dusk && (s.containerInner.element.setAttribute("dusk", n.dusk), s.choiceList.element.setAttribute("dusk", `${n.dusk}-listbox`)), n.selectChangeListener = function() { + let o = s.getValue(!0); if (o == null && (o = ""), n.$emit("update:modelValue", o), !n.multiple || r < 1) return; - a.getValue().length >= r && a.hideDropdown(); - }, e.addEventListener("change", n.selectChangeListener), a.containerInner.element.addEventListener("hideDropdownFromDusk", function() { - a.hideDropdown(); + s.getValue().length >= r && s.hideDropdown(); + }, e.addEventListener("change", n.selectChangeListener), s.containerInner.element.addEventListener("hideDropdownFromDusk", function() { + s.hideDropdown(); }), n.selectShowDropdownListener = function() { if (n.multiple || !n.modelValue) return; - const o = n.getItemOfCurrentModel(), l = a.dropdown.element.querySelector( + const o = n.getItemOfCurrentModel(), l = s.dropdown.element.querySelector( `.choices__item[data-id="${o.id}"]` ); - a.choiceList.scrollToChildElement(l, 1), a._highlightChoice(l); - }, e.addEventListener("showDropdown", n.selectShowDropdownListener), n.choicesInstance = a, n.setValueOnChoices(n.modelValue), t(); + s.choiceList.scrollToChildElement(l, 1), s._highlightChoice(l); + }, e.addEventListener("showDropdown", n.selectShowDropdownListener), n.choicesInstance = s, n.setValueOnChoices(n.modelValue), t(); } }); - new i.default(e, s); + new i.default(e, a); }); }); }, @@ -4619,16 +4691,16 @@ const qd = { ); } } -}, Dd = { ref: "select" }; -function Ld(e, t, r, n, i, s) { - return D(), pe("div", Dd, [ +}, Lf = { ref: "select" }; +function jf(e, t, r, n, i, a) { + return L(), me("div", Lf, [ se(e.$slots, "default", { loading: i.loading }) ], 512); } -const jd = /* @__PURE__ */ He(qd, [["render", Ld]]), kd = { +const Bf = /* @__PURE__ */ We(kf, [["render", jf]]), Mf = { inject: ["stack"], render() { - const e = m.validationErrors(this.stack), t = m.flashData(this.stack), r = m.sharedData.value, n = ps(e, (i) => i.join(` + const e = v.validationErrors(this.stack), t = v.flashData(this.stack), r = v.sharedData.value, n = ma(e, (i) => i.join(` `)); return this.$slots.default({ flash: t, @@ -4639,37 +4711,45 @@ const jd = /* @__PURE__ */ He(qd, [["render", Ld]]), kd = { return i in e; }, hasFlash(i) { - return K(t, i); + return G(t, i); }, hasShared(i) { - return K(r, i); + return G(r, i); }, hasErrors: Object.keys(e).length > 0 }); } }; -function Bd(e, t, r) { - e = Wr(e), t = Ut(t); +function Rf(e, t, r) { + e = zr(e), t = Gt(t); var n = e.length; - r = r === void 0 ? n : hs(an(r), 0, n); + r = r === void 0 ? n : va(on(r), 0, n); var i = r; return r -= t.length, r >= 0 && e.slice(r, i) == t; } -function Rd(e, t) { +function Nf(e, t) { var r = []; - return Lr(e, function(n, i, s) { - t(n, i, s) && r.push(n); + return Lr(e, function(n, i, a) { + t(n, i, a) && r.push(n); }), r; } -function Md(e, t) { - var r = L(e) ? os : Rd; - return r(e, bt(t)); +function Vf(e, t) { + var r = M(e) ? ua : Nf; + return r(e, Ot(t)); } -function ri(e, t) { - return Jt(e, t); +function ni(e, t) { + return er(e, t); } -const Nd = { +const Hf = { + inject: ["stack"], props: { + baseUrl: { + type: String, + required: !1, + default() { + return window.location.pathname; + } + }, striped: { type: Boolean, required: !1, @@ -4711,7 +4791,7 @@ const Nd = { }, computed: { columnsAreToggled() { - return !ri(this.visibleColumns, this.defaultVisibleToggleableColumns); + return !ni(this.visibleColumns, this.defaultVisibleToggleableColumns); }, hasForcedVisibleSearchInputs() { return this.forcedVisibleSearchInputs.length > 0; @@ -4732,16 +4812,16 @@ const Nd = { } }, created() { - this.debounceUpdateQuery = Zr(function(e, t, r) { + this.debounceUpdateQuery = en(function(e, t, r) { this.updateQuery(e, t, r); }, this.searchDebounce); }, mounted() { const e = this.getCurrentQuery(), t = e.columns || []; - Y(e, (r, n) => { - if (Ge(n, "filter[") && !r) { - const i = n.split("["), s = i[1].substring(0, i[1].length - 1); - this.forcedVisibleSearchInputs = [...this.forcedVisibleSearchInputs, s]; + ee(e, (r, n) => { + if (Ye(n, "filter[") && !r) { + const i = n.split("["), a = i[1].substring(0, i[1].length - 1); + this.forcedVisibleSearchInputs = [...this.forcedVisibleSearchInputs, a]; } }), t.length === 0 ? this.visibleColumns = this.defaultVisibleToggleableColumns : this.visibleColumns = t; }, @@ -4749,28 +4829,28 @@ const Nd = { 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" ? m.modal(e) : t === "slideover" ? m.slideover(e) : m.visit(e); + return t === "modal" ? v.modal(e) : t === "slideover" ? v.slideover(e) : v.visit(e); }, reset() { this.forcedVisibleSearchInputs = [], this.visibleColumns = this.defaultVisibleToggleableColumns; let e = this.getCurrentQuery(); - e.columns = [], e.page = null, e.perPage = null, e.sort = null, Y(e, (t, r) => { - Ge(r, "filter[") && (e[r] = null); + e.columns = [], e.page = null, e.perPage = null, e.sort = null, ee(e, (t, r) => { + Ye(r, "filter[") && (e[r] = null); }), this.visitWithQueryObject(e, null, !0); }, columnIsVisible(e) { return this.visibleColumns.includes(e); }, toggleColumn(e) { - const t = !this.columnIsVisible(e), r = Md(this.columns, (i) => i.can_be_hidden ? i.key === e ? t : this.visibleColumns.includes(i.key) : !0); - let n = ms(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 = Vf(this.columns, (i) => i.can_be_hidden ? i.key === e ? t : this.visibleColumns.includes(i.key) : !0); + let n = ga(r, (i) => i.key).sort(); + ni(n, this.defaultVisibleToggleableColumns) && (n = []), this.visibleColumns = n.length === 0 ? this.defaultVisibleToggleableColumns : n, this.updateQuery("columns", n, null, !1); }, disableSearchInput(e) { this.forcedVisibleSearchInputs = this.forcedVisibleSearchInputs.filter((t) => t != e), this.updateQuery(`filter[${e}]`, null); }, showSearchInput(e) { - this.forcedVisibleSearchInputs = [...this.forcedVisibleSearchInputs, e], je(() => { + this.forcedVisibleSearchInputs = [...this.forcedVisibleSearchInputs, e], xe(() => { document.querySelector(`[name="searchInput-${e}"]`).focus(); }); }, @@ -4785,63 +4865,68 @@ const Nd = { return e.substring(1).split("&").forEach((r) => { const n = decodeURIComponent(r).split("="); let i = n[0]; - if (!Bd(i, "]")) { + if (!Rf(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], L(t[i]) || (t[i] = []), t[i].push(n[1])) : t[i] = n[1]; + const a = i.split("["), s = a[1].substring(0, a[1].length - 1); + parseInt(s) == s ? (i = a[0], M(t[i]) || (t[i] = []), t[i].push(n[1])) : t[i] = n[1]; }), t; }, updateQuery(e, t, r, n) { typeof n > "u" && (n = !0); let i = this.getCurrentQuery(); - i[e] = t, (Ge(e, "perPage") || Ge(e, "filter[")) && delete i.page, this.visitWithQueryObject(i, r, n); + i[e] = t, (Ye(e, "perPage") || Ye(e, "filter[")) && delete i.page, this.visitWithQueryObject(i, r, n); }, visitWithQueryObject(e, t, r) { - var o; + var l; typeof r > "u" && (r = !0); let n = {}; - Y(e, (l, u) => { - if (!L(l)) { - n[u] = l; + ee(e, (u, c) => { + if (!M(u)) { + n[c] = u; return; } - l.length !== 0 && l.forEach((c, p) => { - n[`${u}[${p}]`] = c; + u.length !== 0 && u.forEach((h, f) => { + n[`${c}[${f}]`] = h; }); }); let i = ""; - Y(n, (l, u) => { - l === null || l === [] || (i && (i += "&"), i += `${u}=${l}`); + ee(n, (u, c) => { + u === null || u === [] || (i && (i += "&"), i += `${c}=${u}`); }), i && (i = "?" + i); - const s = window.location.pathname + i; + const a = this.baseUrl + i; if (!r) - return m.replaceUrlOfCurrentPage(s); + return this.stack > 0 ? void 0 : v.replaceUrlOfCurrentPage(a); this.isLoading = !0; - let a = null; - typeof t < "u" && t && (a = (o = document.querySelector(`[name="${t.name}"]`)) == null ? void 0 : o.value), m.replace(s).then(() => { - this.isLoading = !1, typeof t < "u" && t && je(() => { - const l = document.querySelector(`[name="${t.name}"]`); - l.focus(), a && (l.value = a); + let s = null; + typeof t < "u" && t && (s = (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-Target": this.stack + } : {}; + v.replace(a, o).then(() => { + this.isLoading = !1, typeof t < "u" && t && xe(() => { + const u = document.querySelector(`[name="${t.name}"]`); + u.focus(), s && (u.value = s); }); }); }, async performBulkAction(e, t, r, n, i) { if (t) try { - await m.confirm(t === !0 ? "" : t, r, n, i); + await v.confirm(t === !0 ? "" : t, r, n, i); } catch { return !1; } - this.isLoading = !0, m.request(e, "POST", { ids: this.selectedItems }, {}, !1).then((s) => { - s.data; + this.isLoading = !0, v.request(e, "POST", { ids: this.selectedItems }, {}, !1).then((a) => { + a.data; }).catch(() => { this.isLoading = !1; }); }, setSelectedItems(e) { - this.selectedItems = L(e) ? e : []; + this.selectedItems = M(e) ? e : []; }, itemIsSelected(e) { return this.selectedItems.length == 1 && this.selectedItems[0] == "*" ? !0 : this.selectedItems.includes(e); @@ -4876,29 +4961,29 @@ const Nd = { isLoading: this.isLoading }); } -}, Vd = { +}, Uf = { inheritAttrs: !1, data() { return { isMounted: !1, - Teleport: ii + Teleport: ai }; }, mounted() { this.isMounted = !0; } }; -function Hd(e, t, r, n, i, s) { - return As((D(), X(Is(i.isMounted ? i.Teleport : "div"), Ps(Cs(e.$attrs)), { - default: ai(() => [ +function Wf(e, t, r, n, i, a) { + return Pa((L(), K(Fa(i.isMounted ? i.Teleport : "div"), Ca(qa(e.$attrs)), { + default: oi(() => [ se(e.$slots, "default") ]), _: 3 }, 16)), [ - [Fs, i.isMounted] + [Da, i.isMounted] ]); } -const Ud = /* @__PURE__ */ He(Vd, [["render", Hd]]), Wd = { +const zf = /* @__PURE__ */ We(Uf, [["render", Wf]]), Gf = { props: { autosize: { type: Boolean, @@ -4919,7 +5004,7 @@ const Ud = /* @__PURE__ */ He(Vd, [["render", Hd]]), Wd = { watch: { modelValue() { !this.autosize || !this.autosizeInstance || import("autosize").then((e) => { - je(() => e.default.update(this.element)); + xe(() => e.default.update(this.element)); }); } }, @@ -4933,13 +5018,13 @@ const Ud = /* @__PURE__ */ He(Vd, [["render", Hd]]), Wd = { e.default.destroy(this.element); }); } -}, zd = { ref: "textarea" }; -function Gd(e, t, r, n, i, s) { - return D(), pe("div", zd, [ +}, Kf = { ref: "textarea" }; +function Xf(e, t, r, n, i, a) { + return L(), me("div", Kf, [ se(e.$slots, "default") ], 512); } -const Kd = /* @__PURE__ */ He(Wd, [["render", Gd]]), Xd = { +const Yf = /* @__PURE__ */ We(Gf, [["render", Xf]]), Qf = { props: { toastKey: { type: Number, @@ -4976,11 +5061,11 @@ const Kd = /* @__PURE__ */ He(Wd, [["render", Gd]]), Xd = { show: this.show, setShow: this.setShow, emitDismiss: this.emitDismiss, - TransitionRoot: rt, - TransitionChild: tt + TransitionRoot: ot, + TransitionChild: st }); } -}, Qd = [ +}, Jf = [ "left-top", "center-top", "right-top", @@ -4990,32 +5075,32 @@ const Kd = /* @__PURE__ */ He(Wd, [["render", Gd]]), Xd = { "left-bottom", "center-bottom", "right-bottom" -], Jd = { +], Zf = { computed: { toasts: function() { - return m.toastsReversed.value; + return v.toastsReversed.value; }, hasBackdrop: function() { - return m.toasts.value.filter((e) => !e.dismissed && e.backdrop && e.html).length > 0; + return v.toasts.value.filter((e) => !e.dismissed && e.backdrop && e.html).length > 0; } }, methods: { dismissToast(e) { - m.dismissToast(e); + v.dismissToast(e); } }, render() { return this.$slots.default({ - positions: Qd, + positions: Jf, toasts: this.toasts, dismissToast: this.dismissToast, hasBackdrop: this.hasBackdrop, - Render: ue, - TransitionRoot: rt, - TransitionChild: tt + Render: de, + TransitionRoot: ot, + TransitionChild: st }); } -}, Yd = { +}, ep = { props: { default: { type: Object, @@ -5050,7 +5135,7 @@ const Kd = /* @__PURE__ */ He(Wd, [["render", Gd]]), Xd = { }, get(t, r) { const n = Object.keys(e.toggles); - if (n.length === 1 && ss(n) === "default") { + if (n.length === 1 && oa(n) === "default") { if (r === "toggled") return e.toggled("default"); if (r === "setToggle") @@ -5062,8 +5147,8 @@ const Kd = /* @__PURE__ */ He(Wd, [["render", Gd]]), Xd = { e.toggle("default"); }; } - return r === "setToggle" ? (i, s) => { - e.setToggle(i, s); + return r === "setToggle" ? (i, a) => { + e.setToggle(i, a); } : r === "toggle" ? (i) => { e.toggle(i); } : e.toggled(r); @@ -5072,30 +5157,30 @@ const Kd = /* @__PURE__ */ He(Wd, [["render", Gd]]), Xd = { ) ); } -}, Zd = { +}, tp = { render() { return this.$slots.default({ - TransitionRoot: rt, - TransitionChild: tt + TransitionRoot: ot, + TransitionChild: st }); } -}, ep = { +}, rp = { created: (e, t) => { - if (m.isSsr) + if (v.isSsr) return; - const r = `preserveScroll-${t.arg}`, n = m.restore(r); - n && je(() => { + const r = `preserveScroll-${t.arg}`, n = v.restore(r); + n && xe(() => { typeof e.scrollTo == "function" ? e.scrollTo(n.left, n.top) : (e.scrollTop = n.top, e.scrollLeft = n.left); }); const i = function() { - m.remember(r, { + v.remember(r, { top: e.scrollTop, left: e.scrollLeft }); }; - e.addEventListener("scroll", Zr(i, 100)), i(); + e.addEventListener("scroll", en(i, 100)), i(); } -}, Ir = { +}, Pr = { injectCSS(e) { const t = document.createElement("style"); t.type = "text/css", t.textContent = ` @@ -5161,13 +5246,13 @@ const Kd = /* @__PURE__ */ He(Wd, [["render", Gd]]), Xd = { }, timeout: null, start(e, t, r) { - Ir.timeout = setTimeout(() => r.start(), t); + Pr.timeout = setTimeout(() => r.start(), t); }, progress(e, t) { t.isStarted() && e.detail.progress.percentage && t.set(Math.max(t.status, e.detail.progress.percentage / 100 * 0.9)); }, stop(e, t) { - clearTimeout(Ir.timeout), t.done(), t.remove(); + clearTimeout(Pr.timeout), t.done(), t.remove(); }, init(e) { const t = this; @@ -5175,52 +5260,52 @@ const Kd = /* @__PURE__ */ He(Wd, [["render", Gd]]), Xd = { document.addEventListener("splade:request", (n) => t.start(n, e.delay, r.default)), document.addEventListener("splade:request-progress", (n) => t.progress(n, r.default)), document.addEventListener("splade:request-response", (n) => t.stop(n, r.default)), document.addEventListener("splade:request-error", (n) => t.stop(n, r.default)), r.default.configure({ showSpinner: e.spinner }), e.css && this.injectCSS(e.color); }); } -}, sp = { +}, op = { install: (e, t) => { - t = t || {}, t.max_keep_alive = K(t, "max_keep_alive") ? t.max_keep_alive : 10, t.prefix = K(t, "prefix") ? t.prefix : "Splade", t.transform_anchors = K(t, "transform_anchors") ? t.transform_anchors : !1, t.link_component = K(t, "link_component") ? t.link_component : "Link", t.progress_bar = K(t, "progress_bar") ? t.progress_bar : !1, t.components = K(t, "components") ? t.components : {}; + t = t || {}, t.max_keep_alive = G(t, "max_keep_alive") ? t.max_keep_alive : 10, t.prefix = G(t, "prefix") ? t.prefix : "Splade", t.transform_anchors = G(t, "transform_anchors") ? t.transform_anchors : !1, t.link_component = G(t, "link_component") ? t.link_component : "Link", t.progress_bar = G(t, "progress_bar") ? t.progress_bar : !1, t.components = G(t, "components") ? t.components : {}; const r = t.prefix; - if (e.component(`${r}Confirm`, mu).component(`${r}Data`, Su).component(`${r}Defer`, Du).component(`${r}Dialog`, Lu).component(`${r}Dropdown`, Hc).component(`${r}DynamicHtml`, Uc).component(`${r}Errors`, Wc).component(`${r}Event`, zc).component(`${r}File`, gd).component(`${r}Flash`, yd).component(`${r}Form`, wd).component(`${r}Input`, xd).component(`${r}Lazy`, _d).component(`${r}Modal`, Pd).component(`${r}OnClickOutside`, Ji).component(`${r}PreloadedModal`, Cd).component(`${r}Render`, ue).component(`${r}Select`, jd).component(`${r}State`, kd).component(`${r}Table`, Nd).component(`${r}Teleport`, Ud).component(`${r}Textarea`, Kd).component(`${r}Toast`, Xd).component(`${r}Toasts`, Jd).component(`${r}Toggle`, Yd).component(`${r}Transition`, Zd).component(t.link_component, Id).directive(`${r}PreserveScroll`, ep), Object.defineProperty(e.config.globalProperties, "$splade", { get: () => m }), Object.defineProperty(e.config.globalProperties, "$spladeOptions", { get: () => Object.assign({}, { ...t }) }), e.provide("$splade", e.config.globalProperties.$splade), e.provide("$spladeOptions", e.config.globalProperties.$spladeOptions), t.progress_bar) { + if (e.component(`${r}Confirm`, gu).component(`${r}Data`, $u).component(`${r}Defer`, Lu).component(`${r}Dialog`, ju).component(`${r}Dropdown`, Wc).component(`${r}DynamicHtml`, zc).component(`${r}Errors`, Gc).component(`${r}Event`, Kc).component(`${r}File`, bf).component(`${r}Flash`, wf).component(`${r}Form`, Of).component(`${r}Input`, Tf).component(`${r}Lazy`, If).component(`${r}Modal`, Cf).component(`${r}OnClickOutside`, Zi).component(`${r}PreloadedModal`, qf).component(`${r}Render`, de).component(`${r}Select`, Bf).component(`${r}State`, Mf).component(`${r}Table`, Hf).component(`${r}Teleport`, zf).component(`${r}Textarea`, Yf).component(`${r}Toast`, Qf).component(`${r}Toasts`, Zf).component(`${r}Toggle`, ep).component(`${r}Transition`, tp).component(t.link_component, Ff).directive(`${r}PreserveScroll`, rp), 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) { const n = { delay: 250, color: "#4B5563", css: !0, spinner: !1 }; - W(t.progress_bar) || (t.progress_bar = {}), ["delay", "color", "css", "spinner"].forEach((i) => { - K(t.progress_bar, i) || (t.progress_bar[i] = n[i]); - }), Ir.init(t.progress_bar); + U(t.progress_bar) || (t.progress_bar = {}), ["delay", "color", "css", "spinner"].forEach((i) => { + G(t.progress_bar, i) || (t.progress_bar[i] = n[i]); + }), Pr.init(t.progress_bar); } - Y(t.components, (n, i) => { + ee(t.components, (n, i) => { e.component(i, n); }); } }; -function ap(e, t, r) { +function lp(e, t, r) { const n = {}; - process.argv.slice(2).forEach((s) => { - const a = s.replace(/^-+/, "").split("="); - n[a[0]] = a.length === 2 ? a[1] : !0; + process.argv.slice(2).forEach((a) => { + const s = a.replace(/^-+/, "").split("="); + n[s[0]] = s.length === 2 ? s[1] : !0; }); const i = n.port || 9e3; - e(async (s, a) => { - if (s.method == "POST") { + e(async (a, s) => { + if (a.method == "POST") { let o = ""; - s.on("data", (l) => o += l), s.on("end", async () => { + a.on("data", (l) => o += l), a.on("end", async () => { const l = JSON.parse(o), u = r({ components: l.components, initialDynamics: l.dynamics, initialHtml: l.html, initialSpladeData: l.splade }), c = await t(u); - a.writeHead(200, { "Content-Type": "application/json", Server: "Splade SSR" }), a.write(JSON.stringify({ body: c })), a.end(); + s.writeHead(200, { "Content-Type": "application/json", Server: "Splade SSR" }), s.write(JSON.stringify({ body: c })), s.end(); }); } }).listen(i, () => console.log(`Splade SSR server started on port ${i}.`)); } export { - m as Splade, - Co as SpladeApp, - sp as SpladePlugin, - np as renderSpladeApp, - ap as startServer + v as Splade, + Do as SpladeApp, + op as SpladePlugin, + ap as renderSpladeApp, + lp as startServer }; diff --git a/dist/protone-media-laravel-splade.umd.cjs b/dist/protone-media-laravel-splade.umd.cjs index 413ac19f..24dda983 100644 --- a/dist/protone-media-laravel-splade.umd.cjs +++ b/dist/protone-media-laravel-splade.umd.cjs @@ -1,13 +1,13 @@ -(function(k,Ue){typeof exports=="object"&&typeof module<"u"?Ue(exports,require("axios"),require("vue")):typeof define=="function"&&define.amd?define(["exports","axios","vue"],Ue):(k=typeof globalThis<"u"?globalThis:k||self,Ue(k.ProtoneMediaLaravelSplade={},k.axios,k.Vue))})(this,function(k,Ue,s){"use strict";const oe=(e=>e&&typeof e=="object"&&"default"in e?e:{default:e})(Ue),_d="",Ad="",Id="";function Qi(e,t){for(var n=-1,r=e==null?0:e.length;++n-1&&e%1==0&&e-1&&e%1==0&&e<=Ea}var xa="[object Arguments]",Ta="[object Array]",_a="[object Boolean]",Aa="[object Date]",Ia="[object Error]",Pa="[object Function]",Ca="[object Map]",Fa="[object Number]",ka="[object Object]",Ba="[object RegExp]",qa="[object Set]",Da="[object String]",ja="[object WeakMap]",La="[object ArrayBuffer]",Ma="[object DataView]",Ra="[object Float32Array]",Na="[object Float64Array]",Va="[object Int8Array]",Ha="[object Int16Array]",Ua="[object Int32Array]",za="[object Uint8Array]",Wa="[object Uint8ClampedArray]",Ga="[object Uint16Array]",Ka="[object Uint32Array]",P={};P[Ra]=P[Na]=P[Va]=P[Ha]=P[Ua]=P[za]=P[Wa]=P[Ga]=P[Ka]=!0,P[xa]=P[Ta]=P[La]=P[_a]=P[Ma]=P[Aa]=P[Ia]=P[Pa]=P[Ca]=P[Fa]=P[ka]=P[Ba]=P[qa]=P[Da]=P[ja]=!1;function Xa(e){return ue(e)&&Rt(e.length)&&!!P[le(e)]}function Qa(e){return function(t){return e(t)}}var tr=typeof k=="object"&&k&&!k.nodeType&&k,We=tr&&typeof module=="object"&&module&&!module.nodeType&&module,Ja=We&&We.exports===tr,Nt=Ja&&Wn.process,Ya=function(){try{var e=We&&We.require&&We.require("util").types;return e||Nt&&Nt.binding&&Nt.binding("util")}catch{}}();const nr=Ya;var rr=nr&&nr.isTypedArray,Za=rr?Qa(rr):Xa;const ir=Za;var eo=Object.prototype,to=eo.hasOwnProperty;function no(e,t){var n=B(e),r=!n&&Jn(e),i=!n&&!r&&Lt(e),a=!n&&!r&&!i&&ir(e),o=n||r||i||a,l=o?ea(e.length,String):[],u=l.length;for(var c in e)(t||to.call(e,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Mt(c,u)))&&l.push(c);return l}var ro=Object.prototype;function io(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||ro;return e===n}function ao(e,t){return function(n){return e(t(n))}}var oo=ao(Object.keys,Object);const so=oo;var lo=Object.prototype,uo=lo.hasOwnProperty;function co(e){if(!io(e))return so(e);var t=[];for(var n in Object(e))uo.call(e,n)&&n!="constructor"&&t.push(n);return t}function R(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var fo="[object AsyncFunction]",po="[object Function]",ho="[object GeneratorFunction]",mo="[object Proxy]";function ar(e){if(!R(e))return!1;var t=le(e);return t==po||t==ho||t==fo||t==mo}function st(e){return e!=null&&Rt(e.length)&&!ar(e)}function lt(e){return st(e)?no(e):co(e)}function Vt(e,t){return e&&Zi(e,t,lt)}function go(e,t){return function(n,r){if(n==null)return n;if(!st(n))return e(n,r);for(var i=n.length,a=t?i:-1,o=Object(n);(t?a--:++a"u";function Oo(e,t,n){ce||window.addEventListener("popstate",$o.bind(this)),Object.keys(t).length>0&&ut.value++,Xt(n),ct(n.head),Qt(e);const r=ce?"":location.href,i=zt(r,n.head,e,t,{},Ut.value,ut.value,n.persistentLayout);lr(i)}function $o(e){!e.state||(F.value=e.state,Q.value=0,Jt.value={},Gt.value=F.value.persistentLayoutKey,ct(F.value.head),Qt(F.value.html,F.value.rememberedState.scrollY))}function zt(e,t,n,r,i,a,o,l){const u={url:e,head:t,html:n,dynamics:r,rememberedState:i,pageVisitId:a,dynamicVisitId:o,persistentLayoutKey:l};return F.value=u,u}function Eo(e){ce||window.history.pushState(e,"",e.url)}function xo(e){const t=zt(e,JSON.parse(JSON.stringify(F.value.head)),F.value.html,F.value.dynamics,{...F.value.rememberedState},F.value.pageVisitId,F.value.dynamicVisitId,F.value.persistentLayoutKey);ce||window.history.replaceState(t,"",t.url)}function lr(e){ce||window.history.replaceState(e,"",e.url)}const Wt=s.ref(0),Gt=s.ref(null);function To(e,t){var f;Wt.value++;const n=e.request.responseURL;if(R((f=e.data)==null?void 0:f.splade)||console.error("The response is not a Splade response. Did you use the Splade Middleware on this route?"),e.data.splade.lazy)return;e.data.splade.modal&&Q.value++;const r=Gt.value;if(Xt(e.data.splade),ct(e.data.splade.head),n===F.value.url&&(t=!0),e.data.splade.modal)return yr(e.data.html,e.data.splade.modal);if(e.data.splade.preventRefresh)return;Q.value=0;let i=e.data.html,a=e.data.dynamics;const o=Object.keys(F.value.dynamics).length>0,l=Object.keys(a).length>0;t?(l&&z(a,(h,d)=>{a[d]+=``}),(!l||!o)&&(i+=``)):(l&&ut.value++,(!l||!o)&&Ut.value++);let u=e.data.splade.persistentLayout&&r===e.data.splade.persistentLayout;Qt(u?F.value.html:i,0);const c=zt(n,e.data.splade.head,u?F.value.html:i,a,F.value.rememberedState?{...F.value.rememberedState}:{},Ut.value,ut.value,e.data.splade.persistentLayout);t?lr(c):Eo(c)}function _o(){Q.value--,ct(Io(Q.value))}const ur=s.ref({}),cr=e=>ur.value[e],Ao=e=>Object.keys(cr.value[e]).length>0,fr=s.ref({}),Io=e=>fr.value[e],dr=s.ref({}),Po=e=>dr.value[e],Ce=s.ref([]);function Co(e){Ce.value.push(e)}const Fo=s.computed(()=>So(Ce.value));function ko(e){Ce.value[e].dismissed=!0,Ce.value[e].html=null}const Kt=s.ref(null);function Bo(e,t,n,r){let i,a;const o=new Promise((l,u)=>{i=l,a=u});return Kt.value={title:e,text:t,confirmButton:n,cancelButton:r,resolvePromise:i,rejectPromise:a},o}function qo(){Kt.value=null}const pr=s.ref({});function Xt(e){Gt.value=e.persistentLayout,pr.value=e.shared?e.shared:{},dr.value[Q.value]=e.flash?e.flash:{},fr.value[Q.value]=e.head?e.head:{},yo(e.toasts?e.toasts:[],t=>{Ce.value.push(t)}),ur.value[Q.value]=e.errors?e.errors:{}}const hr=s.ref(()=>{}),mr=s.ref(()=>{}),gr=s.ref(()=>{}),vr=s.ref(()=>{});function ct(e){hr.value(e)}function Qt(e,t){mr.value(e,t)}function yr(e,t){gr.value(e,t)}function Do(e){vr.value(e)}const br=s.ref({});function wr(e,t,n){br.value[e]=t,n&&jo(e,t)}function jo(e,t){let n=JSON.parse(localStorage.getItem("splade")||"{}")||{};n[e]=t,localStorage.setItem("splade",JSON.stringify(n))}function Lo(e,t){return t?(JSON.parse(localStorage.getItem("splade")||"{}")||{})[e]:br.value[e]}function ft(e,t){ce||document.dispatchEvent(new CustomEvent(`splade:${e}`,{detail:t}))}function Fe(e,t,n,r,i){ce||wr("scrollY",window.scrollY),ft("request",{url:e,method:t,data:n,headers:r,replace:i});const a=oe.default({method:t,url:e,data:n,headers:{"X-Splade":!0,"X-Requested-With":"XMLHttpRequest",Accept:"text/html, application/xhtml+xml",...r},onUploadProgress:o=>{n instanceof FormData&&(o.percentage=Math.round(o.loaded/o.total*100),ft("request-progress",{url:e,method:t,data:n,headers:r,replace:i,progress:o}))}});return a.then(o=>{To(o,i),ft("request-response",{url:e,method:t,data:n,headers:r,replace:i,response:o})}).catch(o=>{if(ft("request-error",{url:e,method:t,data:n,headers:r,replace:i,error:o}),!o.response)return;if(o.response.status==409&&o.response.headers["x-splade-redirect-away"])return window.location=o.response.headers["x-splade-redirect-away"];const l=o.response.data.splade;l&&(l.lazy||Xt(l)),o.response.status!=422&&Do(o.response.data.html?o.response.data.html:o.response.data)}),a}function Sr(e){return Fe(e,"GET",{},{},!0)}function Mo(e){return Fe(e,"GET",{},{},!1)}function Ro(e){return Fe(e,"GET",{},{"X-Splade-Modal":"modal"},!1)}const Jt=s.ref({});function No(e){const t=Jt.value[e];return t?(Q.value++,yr(t.html,t.type),!0):!1}function Vo(e,t,n){Jt.value[e]={html:t,type:n}}function Ho(e){return Fe(e,"GET",{},{"X-Splade-Modal":"slideover"},!1)}function Uo(e,t){return Fe(e,"GET",{},{"X-Splade-Lazy":t},!1)}function zo(){return Sr(F.value.url)}const g={init:Oo,replace:Sr,visit:Mo,modal:Ro,slideover:Ho,refresh:zo,request:Fe,lazy:Uo,replaceUrlOfCurrentPage:xo,htmlForDynamicComponent(e){return F.value.dynamics[e]},setOnHead(e){hr.value=e},setOnHtml(e){mr.value=e},setOnModal(e){gr.value=e},setOnServerError(e){vr.value=e},hasValidationErrors:Ao,validationErrors:cr,sharedData:pr,flashData:Po,toasts:Ce,toastsReversed:Fo,confirmModal:Kt,confirm:Bo,clearConfirmModal:qo,pushToast:Co,dismissToast:ko,restore:Lo,remember:wr,popStack:_o,currentStack:Q,pageVisitId:s.computed(()=>F.value.pageVisitId),dynamicVisitId:s.computed(()=>F.value.dynamicVisitId),isSsr:ce,openPreloadedModal:No,registerPreloadedModal:Vo};var Wo="[object String]";function ke(e){return typeof e=="string"||!B(e)&&ue(e)&&le(e)==Wo}const Z={__name:"Render",props:{html:{type:String,required:!1,default:""}},setup(e){const t=e,n=s.ref(null);function r(){n.value=s.h({template:t.html})}return s.watch(()=>t.html,r,{immediate:!0}),(i,a)=>e.html?(s.openBlock(),s.createBlock(s.unref(n),{key:0})):s.createCommentVNode("",!0)}},Go={__name:"ServerError",props:{html:{type:String,required:!0}},emits:["close"],setup(e,{emit:t}){const n=e,r=s.ref(null);function i(){const l=document.createElement("html");l.innerHTML=n.html,l.querySelectorAll("a").forEach(c=>c.setAttribute("target","_top")),document.body.style.overflow="hidden";const u=r.value;if(!u.contentWindow)throw new Error("iframe not yet ready.");u.contentWindow.document.open(),u.contentWindow.document.write(l.outerHTML),u.contentWindow.document.close(),document.addEventListener("keydown",a)}function a(l){l.keyCode===27&&o()}function o(){document.body.style.overflow="visible",document.removeEventListener("keydown",a),t("close")}return s.onMounted(()=>i()),(l,u)=>(s.openBlock(),s.createElementBlock("div",{style:{position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px","z-index":"200000","box-sizing":"border-box",height:"100vh",width:"100vw","background-color":"rgb(0 0 0 / 0.75)",padding:"2rem"},onClick:o},[s.createElementVNode("iframe",{ref_key:"iframeElement",ref:r,class:"bg-white w-full h-full"},null,512)]))}},Or={__name:"SpladeApp",props:{el:{type:[String,Object],required:!1,default:""},components:{type:String,required:!1,default:e=>{if(!g.isSsr){const t=ke(e.el)?document.getElementById(e.el):e.el;return JSON.parse(t.dataset.components)||""}}},initialHtml:{type:String,required:!1,default:e=>{if(!g.isSsr){const t=ke(e.el)?document.getElementById(e.el):e.el;return JSON.parse(t.dataset.html)||""}}},initialDynamics:{type:Object,required:!1,default:e=>{if(!g.isSsr){const t=ke(e.el)?document.getElementById(e.el):e.el;return JSON.parse(t.dataset.dynamics)||{}}}},initialSpladeData:{type:Object,required:!1,default:e=>{if(!g.isSsr){const t=ke(e.el)?document.getElementById(e.el):e.el;return JSON.parse(t.dataset.splade)||{}}}}},setup(e){const t=e;s.provide("stack",0);const n=s.ref(),r=s.ref([]),i=s.ref(null),a=s.ref(null),o=s.inject("$spladeOptions")||{},l=s.computed(()=>g.currentStack.value<1?[]:{filter:"blur(4px)","transition-property":"filter","transition-duration":"150ms","transition-timing-function":"cubic-bezier(0.4, 0, 0.2, 1)"});function u(){i.value=null}function c(d){r[d]=null,g.popStack()}function f(d){const p=document.createElement("meta");z(d,(m,b)=>{p[b]=m}),document.getElementsByTagName("head")[0].appendChild(p)}function h(d){var m;let p="meta";z(d,(b,v)=>{p=`${p}[${v}="${b}"]`});try{(m=document.querySelector(p))==null||m.remove()}catch{}}return g.setOnHead(d=>{var p;if(!g.isSsr){if(a.value===null){a.value=d.meta;return}if(a.value.forEach(m=>{h(m)}),a.value=d.meta,document.title=d.title,d.meta.forEach(m=>{f(m)}),(p=document.querySelector('link[rel="canonical"]'))==null||p.remove(),d.canonical){const m=document.createElement("link");m.rel="canonical",m.href=d.canonical,document.getElementsByTagName("head")[0].appendChild(m)}}}),g.setOnHtml((d,p)=>{r.value=[],n.value=d,s.nextTick(()=>{g.isSsr||window.scrollTo(0,p),o.transform_anchors&&[...document.querySelectorAll("a")].forEach(m=>{m.href==""||m.href.charAt(0)=="#"||m.__vnode.dynamicProps===null&&(m.hasAttribute("download")||(m.onclick=function(b){b.preventDefault(),g.visit(m.href)}))})})}),g.setOnModal(function(d,p){r.value[g.currentStack.value]={html:d,type:p}}),g.setOnServerError(function(d){i.value=d}),g.init(t.initialHtml,t.initialDynamics,t.initialSpladeData),s.onMounted(()=>{if(g.isSsr)return;const d=ke(t.el)?document.getElementById(t.el):t.el;["components","html","dynamics","splade"].forEach(p=>{delete d.dataset[p]})}),(d,p)=>(s.openBlock(),s.createElementBlock("div",null,[s.unref(g).isSsr?(s.openBlock(),s.createBlock(Z,{key:`visit.${s.unref(g).pageVisitId.value}`,style:s.normalizeStyle(s.unref(l)),html:n.value},null,8,["style","html"])):(s.openBlock(),s.createBlock(s.KeepAlive,{key:0,max:s.unref(o).max_keep_alive},[(s.openBlock(),s.createBlock(Z,{key:`visit.${s.unref(g).pageVisitId.value}`,style:s.normalizeStyle(s.unref(l)),html:n.value},null,8,["style","html"]))],1032,["max"])),s.createVNode(Z,{html:e.components},null,8,["html"]),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(g).currentStack.value,m=>(s.openBlock(),s.createBlock(Z,{key:`modal.${m}`,type:r.value[m].type,html:r.value[m].html,stack:m,"on-top-of-stack":s.unref(g).currentStack.value===m,onClose:b=>c(m)},null,8,["type","html","stack","on-top-of-stack","onClose"]))),128)),i.value?(s.openBlock(),s.createBlock(Go,{key:2,html:i.value,onClose:u},null,8,["html"])):s.createCommentVNode("",!0)]))}};function Ko(e){return()=>s.h(Or,e)}var Xo=Object.prototype,Qo=Xo.hasOwnProperty;function Jo(e,t){return e!=null&&Qo.call(e,t)}var Yo="[object Symbol]";function dt(e){return typeof e=="symbol"||ue(e)&&le(e)==Yo}var Zo=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,es=/^\w*$/;function Yt(e,t){if(B(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||dt(e)?!0:es.test(e)||!Zo.test(e)||t!=null&&e in Object(t)}var ts=X["__core-js_shared__"];const Zt=ts;var $r=function(){var e=/[^.]+$/.exec(Zt&&Zt.keys&&Zt.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function ns(e){return!!$r&&$r in e}var rs=Function.prototype,is=rs.toString;function ve(e){if(e!=null){try{return is.call(e)}catch{}try{return e+""}catch{}}return""}var as=/[\\^$.*+?()[\]{}|]/g,os=/^\[object .+?Constructor\]$/,ss=Function.prototype,ls=Object.prototype,us=ss.toString,cs=ls.hasOwnProperty,fs=RegExp("^"+us.call(cs).replace(as,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ds(e){if(!R(e)||ns(e))return!1;var t=ar(e)?fs:os;return t.test(ve(e))}function ps(e,t){return e==null?void 0:e[t]}function ye(e,t){var n=ps(e,t);return ds(n)?n:void 0}var hs=ye(Object,"create");const Ge=hs;function ms(){this.__data__=Ge?Ge(null):{},this.size=0}function gs(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var vs="__lodash_hash_undefined__",ys=Object.prototype,bs=ys.hasOwnProperty;function ws(e){var t=this.__data__;if(Ge){var n=t[e];return n===vs?void 0:n}return bs.call(t,e)?t[e]:void 0}var Ss=Object.prototype,Os=Ss.hasOwnProperty;function $s(e){var t=this.__data__;return Ge?t[e]!==void 0:Os.call(t,e)}var Es="__lodash_hash_undefined__";function xs(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ge&&t===void 0?Es:t,this}function be(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1}function Fs(e,t){var n=this.__data__,r=pt(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function ee(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t`"${i}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,W),r}var gt=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(gt||{}),fe=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(fe||{});function N({visible:e=!0,features:t=0,ourProps:n,theirProps:r,...i}){var a;let o=Xs(r,n),l=Object.assign(i,{props:o});if(e||t&2&&o.static)return an(l);if(t&1){let u=(a=o.unmount)==null||a?0:1;return W(u,{[0](){return null},[1](){return an({...i,props:{...o,hidden:!0,style:{display:"none"}}})}})}return an(l)}function an({props:e,attrs:t,slots:n,slot:r,name:i}){var a;let{as:o,...l}=Ir(e,["unmount","static"]),u=(a=n.default)==null?void 0:a.call(n,r),c={};if(r){let f=!1,h=[];for(let[d,p]of Object.entries(r))typeof p=="boolean"&&(f=!0),p===!0&&h.push(d);f&&(c["data-headlessui-state"]=h.join(" "))}if(o==="template"){if(u=Ar(u!=null?u:[]),Object.keys(l).length>0||Object.keys(t).length>0){let[f,...h]=u!=null?u:[];if(!Qs(f)||h.length>0)throw new Error(['Passing props on "template"!',"",`The current component <${i} /> is rendering a "template".`,"However we need to passthrough the following props:",Object.keys(l).concat(Object.keys(t)).sort((d,p)=>d.localeCompare(p)).map(d=>` - ${d}`).join(` -`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".',"Render a single element as the child so that we can forward the props onto that element."].map(d=>` - ${d}`).join(` +(function(q,Xe){typeof exports=="object"&&typeof module<"u"?Xe(exports,require("axios"),require("vue")):typeof define=="function"&&define.amd?define(["exports","axios","vue"],Xe):(q=typeof globalThis<"u"?globalThis:q||self,Xe(q.ProtoneMediaLaravelSplade={},q.axios,q.Vue))})(this,function(q,Xe,s){"use strict";const se=(e=>e&&typeof e=="object"&&"default"in e?e:{default:e})(Xe),If="",Pf="",Cf="";function Ji(e,t){for(var n=-1,r=e==null?0:e.length;++n-1&&e%1==0&&e-1&&e%1==0&&e<=xa}var _a="[object Arguments]",Aa="[object Array]",Ia="[object Boolean]",Pa="[object Date]",Ca="[object Error]",ka="[object Function]",Fa="[object Map]",Ba="[object Number]",qa="[object Object]",Da="[object RegExp]",La="[object Set]",ja="[object String]",Ma="[object WeakMap]",Ra="[object ArrayBuffer]",Na="[object DataView]",Va="[object Float32Array]",Ha="[object Float64Array]",Ua="[object Int8Array]",Wa="[object Int16Array]",za="[object Int32Array]",Ga="[object Uint8Array]",Ka="[object Uint8ClampedArray]",Xa="[object Uint16Array]",Ya="[object Uint32Array]",C={};C[Va]=C[Ha]=C[Ua]=C[Wa]=C[za]=C[Ga]=C[Ka]=C[Xa]=C[Ya]=!0,C[_a]=C[Aa]=C[Ra]=C[Ia]=C[Na]=C[Pa]=C[Ca]=C[ka]=C[Fa]=C[Ba]=C[qa]=C[Da]=C[La]=C[ja]=C[Ma]=!1;function Qa(e){return ce(e)&&Ht(e.length)&&!!C[ue(e)]}function Ja(e){return function(t){return e(t)}}var nr=typeof q=="object"&&q&&!q.nodeType&&q,Qe=nr&&typeof module=="object"&&module&&!module.nodeType&&module,Za=Qe&&Qe.exports===nr,Ut=Za&&Gn.process,eo=function(){try{var e=Qe&&Qe.require&&Qe.require("util").types;return e||Ut&&Ut.binding&&Ut.binding("util")}catch{}}();const rr=eo;var ir=rr&&rr.isTypedArray,to=ir?Ja(ir):Qa;const ar=to;var no=Object.prototype,ro=no.hasOwnProperty;function io(e,t){var n=D(e),r=!n&&Jn(e),i=!n&&!r&&Nt(e),a=!n&&!r&&!i&&ar(e),o=n||r||i||a,l=o?na(e.length,String):[],u=l.length;for(var c in e)(t||ro.call(e,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Vt(c,u)))&&l.push(c);return l}var ao=Object.prototype;function oo(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||ao;return e===n}function so(e,t){return function(n){return e(t(n))}}var lo=so(Object.keys,Object);const uo=lo;var co=Object.prototype,fo=co.hasOwnProperty;function po(e){if(!oo(e))return uo(e);var t=[];for(var n in Object(e))fo.call(e,n)&&n!="constructor"&&t.push(n);return t}function M(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var ho="[object AsyncFunction]",mo="[object Function]",go="[object GeneratorFunction]",vo="[object Proxy]";function or(e){if(!M(e))return!1;var t=ue(e);return t==mo||t==go||t==ho||t==vo}function ct(e){return e!=null&&Ht(e.length)&&!or(e)}function dt(e){return ct(e)?io(e):po(e)}function Wt(e,t){return e&&ta(e,t,dt)}function yo(e,t){return function(n,r){if(n==null)return n;if(!ct(n))return e(n,r);for(var i=n.length,a=t?i:-1,o=Object(n);(t?a--:++a"u";function Eo(e,t,n){de||window.addEventListener("popstate",To.bind(this)),Object.keys(t).length>0&&ft.value++,Jt(n),ht(n.head),Zt(e);const r=de?"":location.href,i=Kt(r,n.head,e,t,{},Gt.value,ft.value,n.persistentLayout);ur(i)}function To(e){!e.state||(k.value=e.state,z.value=0,pt.value={},en.value={},Yt.value=k.value.persistentLayoutKey,ht(k.value.head),Zt(k.value.html,k.value.rememberedState.scrollY))}function Kt(e,t,n,r,i,a,o,l){const u={url:e,head:t,html:n,dynamics:r,rememberedState:i,pageVisitId:a,dynamicVisitId:o,persistentLayoutKey:l};return k.value=u,u}function xo(e){de||window.history.pushState(e,"",e.url)}function _o(e){const t=Kt(e,JSON.parse(JSON.stringify(k.value.head)),k.value.html,k.value.dynamics,{...k.value.rememberedState},k.value.pageVisitId,k.value.dynamicVisitId,k.value.persistentLayoutKey);de||window.history.replaceState(t,"",t.url)}function ur(e){de||window.history.replaceState(e,"",e.url)}const Xt=s.ref(0),Yt=s.ref(null);function Ao(e,t){var d;Xt.value++;const n=e.request.responseURL;if(M((d=e.data)==null?void 0:d.splade)||console.error("The response is not a Splade response. Did you use the Splade Middleware on this route?"),e.data.splade.lazy)return;e.data.splade.modal&&!e.data.splade.modalTarget&&z.value++;const r=Yt.value;if(Jt(e.data.splade),ht(e.data.splade.head),n===k.value.url&&(t=!0),e.data.splade.modal)return br(e.data.html,e.data.splade.modal);if(e.data.splade.preventRefresh)return;z.value=0,pt.value={};let i=e.data.html,a=e.data.dynamics;const o=Object.keys(k.value.dynamics).length>0,l=Object.keys(a).length>0;t?(l&&W(a,(m,p)=>{a[p]+=``}),(!l||!o)&&(i+=``)):(l&&ft.value++,(!l||!o)&&Gt.value++);let u=e.data.splade.persistentLayout&&r===e.data.splade.persistentLayout;Zt(u?k.value.html:i,0);const c=Kt(n,e.data.splade.head,u?k.value.html:i,a,k.value.rememberedState?{...k.value.rememberedState}:{},Gt.value,ft.value,e.data.splade.persistentLayout);t?ur(c):xo(c)}function Io(){z.value--,ht(Co(z.value))}const cr=s.ref({}),dr=e=>cr.value[e],Po=e=>Object.keys(dr.value[e]).length>0,fr=s.ref({}),Co=e=>fr.value[e],pr=s.ref({}),ko=e=>pr.value[e],Fe=s.ref([]);function Fo(e){Fe.value.push(e)}const Bo=s.computed(()=>$o(Fe.value));function qo(e){Fe.value[e].dismissed=!0,Fe.value[e].html=null}const Qt=s.ref(null);function Do(e,t,n,r){let i,a;const o=new Promise((l,u)=>{i=l,a=u});return Qt.value={title:e,text:t,confirmButton:n,cancelButton:r,resolvePromise:i,rejectPromise:a},o}function Lo(){Qt.value=null}const hr=s.ref({});function Jt(e){Yt.value=e.persistentLayout,hr.value=e.shared?e.shared:{},pr.value[z.value]=e.flash?e.flash:{},fr.value[z.value]=e.head?e.head:{},wo(e.toasts?e.toasts:[],t=>{Fe.value.push(t)}),cr.value[z.value]=e.errors?e.errors:{}}const mr=s.ref(()=>{}),gr=s.ref(()=>{}),vr=s.ref(()=>{}),yr=s.ref(()=>{});function ht(e){mr.value(e)}function Zt(e,t){gr.value(e,t)}function br(e,t){pt.value[z.value]=!0,vr.value(e,t)}function jo(e){return pt.value[e]}function Mo(e){yr.value(e)}const wr=s.ref({});function Sr(e,t,n){wr.value[e]=t,n&&Ro(e,t)}function Ro(e,t){let n=JSON.parse(localStorage.getItem("splade")||"{}")||{};n[e]=t,localStorage.setItem("splade",JSON.stringify(n))}function No(e,t){return t?(JSON.parse(localStorage.getItem("splade")||"{}")||{})[e]:wr.value[e]}function mt(e,t){de||document.dispatchEvent(new CustomEvent(`splade:${e}`,{detail:t}))}function Be(e,t,n,r,i){de||Sr("scrollY",window.scrollY),mt("request",{url:e,method:t,data:n,headers:r,replace:i});const a=se.default({method:t,url:e,data:n,headers:{"X-Splade":!0,"X-Requested-With":"XMLHttpRequest",Accept:"text/html, application/xhtml+xml",...r},onUploadProgress:o=>{n instanceof FormData&&(o.percentage=Math.round(o.loaded/o.total*100),mt("request-progress",{url:e,method:t,data:n,headers:r,replace:i,progress:o}))}});return a.then(o=>{Ao(o,i),mt("request-response",{url:e,method:t,data:n,headers:r,replace:i,response:o})}).catch(o=>{if(mt("request-error",{url:e,method:t,data:n,headers:r,replace:i,error:o}),!o.response)return;if(o.response.status==409&&o.response.headers["x-splade-redirect-away"])return window.location=o.response.headers["x-splade-redirect-away"];const l=o.response.data.splade;l&&(l.lazy||Jt(l)),o.response.status!=422&&Mo(o.response.data.html?o.response.data.html:o.response.data)}),a}function Or(e,t){return typeof t>"u"&&(t={}),Be(e,"GET",{},t,!0)}function Vo(e,t){return typeof t>"u"&&(t={}),Be(e,"GET",{},t,!1)}function Ho(e){return Be(e,"GET",{},{"X-Splade-Modal":"modal"},!1)}const en=s.ref({});function Uo(e){const t=en.value[e];return t?(z.value++,br(t.html,t.type),!0):!1}function Wo(e,t,n){en.value[e]={html:t,type:n}}function zo(e){return Be(e,"GET",{},{"X-Splade-Modal":"slideover"},!1)}function Go(e,t){return Be(e,"GET",{},{"X-Splade-Lazy":t},!1)}function Ko(){return Or(k.value.url)}const v={init:Eo,replace:Or,visit:Vo,modal:Ho,slideover:zo,refresh:Ko,request:Be,lazy:Go,replaceUrlOfCurrentPage:_o,htmlForDynamicComponent(e){return k.value.dynamics[e]},setOnHead(e){mr.value=e},setOnHtml(e){gr.value=e},setOnModal(e){vr.value=e},setOnServerError(e){yr.value=e},hasValidationErrors:Po,validationErrors:dr,sharedData:hr,flashData:ko,toasts:Fe,toastsReversed:Bo,confirmModal:Qt,confirm:Do,clearConfirmModal:Lo,pushToast:Fo,dismissToast:qo,restore:No,remember:Sr,popStack:Io,currentStack:z,stackType:jo,pageVisitId:s.computed(()=>k.value.pageVisitId),dynamicVisitId:s.computed(()=>k.value.dynamicVisitId),isSsr:de,openPreloadedModal:Uo,registerPreloadedModal:Wo};var Xo="[object String]";function qe(e){return typeof e=="string"||!D(e)&&ce(e)&&ue(e)==Xo}const te={__name:"Render",props:{html:{type:String,required:!1,default:""}},setup(e){const t=e,n=s.ref(null);function r(){n.value=s.h({template:t.html})}return s.watch(()=>t.html,r,{immediate:!0}),(i,a)=>e.html?(s.openBlock(),s.createBlock(s.unref(n),{key:0})):s.createCommentVNode("",!0)}},Yo={__name:"ServerError",props:{html:{type:String,required:!0}},emits:["close"],setup(e,{emit:t}){const n=e,r=s.ref(null);function i(){const l=document.createElement("html");l.innerHTML=n.html,l.querySelectorAll("a").forEach(c=>c.setAttribute("target","_top")),document.body.style.overflow="hidden";const u=r.value;if(!u.contentWindow)throw new Error("iframe not yet ready.");u.contentWindow.document.open(),u.contentWindow.document.write(l.outerHTML),u.contentWindow.document.close(),document.addEventListener("keydown",a)}function a(l){l.keyCode===27&&o()}function o(){document.body.style.overflow="visible",document.removeEventListener("keydown",a),t("close")}return s.onMounted(()=>i()),(l,u)=>(s.openBlock(),s.createElementBlock("div",{style:{position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px","z-index":"200000","box-sizing":"border-box",height:"100vh",width:"100vw","background-color":"rgb(0 0 0 / 0.75)",padding:"2rem"},onClick:o},[s.createElementVNode("iframe",{ref_key:"iframeElement",ref:r,class:"bg-white w-full h-full"},null,512)]))}},$r={__name:"SpladeApp",props:{el:{type:[String,Object],required:!1,default:""},components:{type:String,required:!1,default:e=>{if(!v.isSsr){const t=qe(e.el)?document.getElementById(e.el):e.el;return JSON.parse(t.dataset.components)||""}}},initialHtml:{type:String,required:!1,default:e=>{if(!v.isSsr){const t=qe(e.el)?document.getElementById(e.el):e.el;return JSON.parse(t.dataset.html)||""}}},initialDynamics:{type:Object,required:!1,default:e=>{if(!v.isSsr){const t=qe(e.el)?document.getElementById(e.el):e.el;return JSON.parse(t.dataset.dynamics)||{}}}},initialSpladeData:{type:Object,required:!1,default:e=>{if(!v.isSsr){const t=qe(e.el)?document.getElementById(e.el):e.el;return JSON.parse(t.dataset.splade)||{}}}}},setup(e){const t=e;s.provide("stack",0);const n=s.ref(),r=s.ref([]),i=s.ref(null),a=s.ref(null),o=s.ref(!0),l=s.inject("$spladeOptions")||{},u=s.computed(()=>v.currentStack.value<1?[]:{filter:"blur(4px)","transition-property":"filter","transition-duration":"150ms","transition-timing-function":"cubic-bezier(0.4, 0, 0.2, 1)"});function c(){i.value=null}function d(f){r.value[f]=null,v.popStack()}function m(f){const h=document.createElement("meta");W(f,(g,y)=>{h[y]=g}),document.getElementsByTagName("head")[0].appendChild(h)}function p(f){var g;let h="meta";W(f,(y,T)=>{h=`${h}[${T}="${y}"]`});try{(g=document.querySelector(h))==null||g.remove()}catch{}}return v.setOnHead(f=>{var h;if(!v.isSsr){if(a.value===null){a.value=f.meta;return}if(a.value.forEach(g=>{p(g)}),a.value=f.meta,document.title=f.title,f.meta.forEach(g=>{m(g)}),(h=document.querySelector('link[rel="canonical"]'))==null||h.remove(),f.canonical){const g=document.createElement("link");g.rel="canonical",g.href=f.canonical,document.getElementsByTagName("head")[0].appendChild(g)}}}),v.setOnHtml((f,h)=>{r.value=[],n.value=f,s.nextTick(()=>{v.isSsr||window.scrollTo(0,h),l.transform_anchors&&[...document.querySelectorAll("a")].forEach(g=>{g.href==""||g.href.charAt(0)=="#"||g.__vnode.dynamicProps===null&&(g.hasAttribute("download")||(g.onclick=function(y){y.preventDefault(),v.visit(g.href)}))})})}),v.setOnModal(function(f,h){r.value[v.currentStack.value]&&(o.value=!1),r.value[v.currentStack.value]={html:f,type:h},s.nextTick(()=>{o.value=!0})}),v.setOnServerError(function(f){i.value=f}),v.init(t.initialHtml,t.initialDynamics,t.initialSpladeData),s.onMounted(()=>{if(v.isSsr)return;const f=qe(t.el)?document.getElementById(t.el):t.el;["components","html","dynamics","splade"].forEach(h=>{delete f.dataset[h]})}),(f,h)=>(s.openBlock(),s.createElementBlock("div",null,[s.unref(v).isSsr?(s.openBlock(),s.createBlock(te,{key:`visit.${s.unref(v).pageVisitId.value}`,style:s.normalizeStyle(s.unref(u)),html:n.value},null,8,["style","html"])):(s.openBlock(),s.createBlock(s.KeepAlive,{key:0,max:s.unref(l).max_keep_alive},[(s.openBlock(),s.createBlock(te,{key:`visit.${s.unref(v).pageVisitId.value}`,style:s.normalizeStyle(s.unref(u)),html:n.value},null,8,["style","html"]))],1032,["max"])),s.createVNode(te,{html:e.components},null,8,["html"]),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(v).currentStack.value,g=>(s.openBlock(),s.createBlock(te,{key:`modal.${g}`,type:r.value[g].type,html:r.value[g].html,stack:g,"on-top-of-stack":s.unref(v).currentStack.value===g,animate:o.value,onClose:y=>d(g)},null,8,["type","html","stack","on-top-of-stack","animate","onClose"]))),128)),i.value?(s.openBlock(),s.createBlock(Yo,{key:2,html:i.value,onClose:c},null,8,["html"])):s.createCommentVNode("",!0)]))}};function Qo(e){return()=>s.h($r,e)}var Jo=Object.prototype,Zo=Jo.hasOwnProperty;function es(e,t){return e!=null&&Zo.call(e,t)}var ts="[object Symbol]";function gt(e){return typeof e=="symbol"||ce(e)&&ue(e)==ts}var ns=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,rs=/^\w*$/;function tn(e,t){if(D(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||gt(e)?!0:rs.test(e)||!ns.test(e)||t!=null&&e in Object(t)}var is=Q["__core-js_shared__"];const nn=is;var Er=function(){var e=/[^.]+$/.exec(nn&&nn.keys&&nn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function as(e){return!!Er&&Er in e}var os=Function.prototype,ss=os.toString;function we(e){if(e!=null){try{return ss.call(e)}catch{}try{return e+""}catch{}}return""}var ls=/[\\^$.*+?()[\]{}|]/g,us=/^\[object .+?Constructor\]$/,cs=Function.prototype,ds=Object.prototype,fs=cs.toString,ps=ds.hasOwnProperty,hs=RegExp("^"+fs.call(ps).replace(ls,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ms(e){if(!M(e)||as(e))return!1;var t=or(e)?hs:us;return t.test(we(e))}function gs(e,t){return e==null?void 0:e[t]}function Se(e,t){var n=gs(e,t);return ms(n)?n:void 0}var vs=Se(Object,"create");const Je=vs;function ys(){this.__data__=Je?Je(null):{},this.size=0}function bs(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var ws="__lodash_hash_undefined__",Ss=Object.prototype,Os=Ss.hasOwnProperty;function $s(e){var t=this.__data__;if(Je){var n=t[e];return n===ws?void 0:n}return Os.call(t,e)?t[e]:void 0}var Es=Object.prototype,Ts=Es.hasOwnProperty;function xs(e){var t=this.__data__;return Je?t[e]!==void 0:Ts.call(t,e)}var _s="__lodash_hash_undefined__";function As(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Je&&t===void 0?_s:t,this}function Oe(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1}function qs(e,t){var n=this.__data__,r=vt(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function ne(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t`"${i}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,V),r}var wt=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(wt||{}),fe=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(fe||{});function R({visible:e=!0,features:t=0,ourProps:n,theirProps:r,...i}){var a;let o=Js(r,n),l=Object.assign(i,{props:o});if(e||t&2&&o.static)return ln(l);if(t&1){let u=(a=o.unmount)==null||a?0:1;return V(u,{[0](){return null},[1](){return ln({...i,props:{...o,hidden:!0,style:{display:"none"}}})}})}return ln(l)}function ln({props:e,attrs:t,slots:n,slot:r,name:i}){var a;let{as:o,...l}=Pr(e,["unmount","static"]),u=(a=n.default)==null?void 0:a.call(n,r),c={};if(r){let d=!1,m=[];for(let[p,f]of Object.entries(r))typeof f=="boolean"&&(d=!0),f===!0&&m.push(p);d&&(c["data-headlessui-state"]=m.join(" "))}if(o==="template"){if(u=Ir(u!=null?u:[]),Object.keys(l).length>0||Object.keys(t).length>0){let[d,...m]=u!=null?u:[];if(!Zs(d)||m.length>0)throw new Error(['Passing props on "template"!',"",`The current component <${i} /> is rendering a "template".`,"However we need to passthrough the following props:",Object.keys(l).concat(Object.keys(t)).sort((p,f)=>p.localeCompare(f)).map(p=>` - ${p}`).join(` +`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".',"Render a single element as the child so that we can forward the props onto that element."].map(p=>` - ${p}`).join(` `)].join(` -`));return s.cloneVNode(f,Object.assign({},l,c))}return Array.isArray(u)&&u.length===1?u[0]:u}return s.h(o,Object.assign({},l,c),{default:()=>u})}function Ar(e){return e.flatMap(t=>t.type===s.Fragment?Ar(t.children):[t])}function Xs(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let i in r)i.startsWith("on")&&typeof r[i]=="function"?(n[i]!=null||(n[i]=[]),n[i].push(r[i])):t[i]=r[i];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(r=>[r,void 0])));for(let r in n)Object.assign(t,{[r](i,...a){let o=n[r];for(let l of o){if(i instanceof Event&&i.defaultPrevented)return;l(i,...a)}}});return t}function Ir(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function Qs(e){return e==null?!1:typeof e.type=="string"||typeof e.type=="object"||typeof e.type=="function"}let Js=0;function Ys(){return++Js}function we(){return Ys()}var Pr=(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))(Pr||{});function ne(e){var t;return e==null||e.value==null?null:(t=e.value.$el)!=null?t:e.value}let Cr=Symbol("Context");var Se=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Se||{});function Zs(){return on()!==null}function on(){return s.inject(Cr,null)}function el(e){s.provide(Cr,e)}const vt=typeof window>"u"||typeof document>"u";function Be(e){if(vt)return null;if(e instanceof Node)return e.ownerDocument;if(e!=null&&e.hasOwnProperty("value")){let t=ne(e);if(t)return t.ownerDocument}return document}let sn=["[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||{}),Fr=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Fr||{}),tl=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(tl||{});function nl(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(sn))}var kr=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(kr||{});function rl(e,t=0){var n;return e===((n=Be(e))==null?void 0:n.body)?!1:W(t,{[0](){return e.matches(sn)},[1](){let r=e;for(;r!==null;){if(r.matches(sn))return!0;r=r.parentElement}return!1}})}function Je(e){e==null||e.focus({preventScroll:!0})}let il=["textarea","input"].join(",");function al(e){var t,n;return(n=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,il))!=null?n:!1}function ol(e,t=n=>n){return e.slice().sort((n,r)=>{let i=t(n),a=t(r);if(i===null||a===null)return 0;let o=i.compareDocumentPosition(a);return o&Node.DOCUMENT_POSITION_FOLLOWING?-1:o&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function ln(e,t,n=!0,r=null){var i;let a=(i=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e==null?void 0:e.ownerDocument)!=null?i:document,o=Array.isArray(e)?n?ol(e):e:nl(e);r=r!=null?r:a.activeElement;let l=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,o.indexOf(r))-1;if(t&4)return Math.max(0,o.indexOf(r))+1;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}:{},f=0,h=o.length,d;do{if(f>=h||f+h<=0)return 0;let p=u+f;if(t&16)p=(p+h)%h;else{if(p<0)return 3;if(p>=h)return 1}d=o[p],d==null||d.focus(c),f+=l}while(d!==a.activeElement);return t&6&&al(d)&&d.select(),d.hasAttribute("tabindex")||d.setAttribute("tabindex","0"),2}function un(e,t,n){vt||s.watchEffect(r=>{document.addEventListener(e,t,n),r(()=>document.removeEventListener(e,t,n))})}function sl(e,t,n=s.computed(()=>!0)){function r(a,o){if(!n.value||a.defaultPrevented)return;let l=o(a);if(l===null||!l.getRootNode().contains(l))return;let u=function c(f){return typeof f=="function"?c(f()):Array.isArray(f)||f instanceof Set?f:[f]}(e);for(let c of u){if(c===null)continue;let f=c instanceof HTMLElement?c:ne(c);if(f!=null&&f.contains(l))return}return!rl(l,kr.Loose)&&l.tabIndex!==-1&&a.preventDefault(),t(a,l)}let i=s.ref(null);un("mousedown",a=>{var o,l;n.value&&(i.value=((l=(o=a.composedPath)==null?void 0:o.call(a))==null?void 0:l[0])||a.target)},!0),un("click",a=>{!i.value||(r(a,()=>i.value),i.value=null)},!0),un("blur",a=>r(a,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}var yt=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(yt||{});let cn=s.defineComponent({name:"Hidden",props:{as:{type:[Object,String],default:"div"},features:{type:Number,default:1}},setup(e,{slots:t,attrs:n}){return()=>{let{features:r,...i}=e,a={"aria-hidden":(r&2)===2?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return N({ourProps:a,theirProps:i,slot:{},attrs:n,slots:t,name:"Hidden"})}}});function ll(e,t,n){vt||s.watchEffect(r=>{window.addEventListener(e,t,n),r(()=>window.removeEventListener(e,t,n))})}var fn=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(fn||{});function ul(){let e=s.ref(0);return ll("keydown",t=>{t.key==="Tab"&&(e.value=t.shiftKey?1:0)}),e}function Br(e,t,n,r){vt||s.watchEffect(i=>{e=e!=null?e:window,e.addEventListener(t,n,r),i(()=>e.removeEventListener(t,n,r))})}function cl(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}var qr=(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))(qr||{});let Ye=Object.assign(s.defineComponent({name:"FocusTrap",props:{as:{type:[Object,String],default:"div"},initialFocus:{type:Object,default:null},features:{type:Number,default:30},containers:{type:Object,default:s.ref(new Set)}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:r}){let i=s.ref(null);r({el:i,$el:i});let a=s.computed(()=>Be(i));fl({ownerDocument:a},s.computed(()=>Boolean(e.features&16)));let o=dl({ownerDocument:a,container:i,initialFocus:s.computed(()=>e.initialFocus)},s.computed(()=>Boolean(e.features&2)));pl({ownerDocument:a,container:i,containers:e.containers,previousActiveElement:o},s.computed(()=>Boolean(e.features&8)));let l=ul();function u(){let c=ne(i);!c||W(l.value,{[fn.Forwards]:()=>ln(c,Qe.First),[fn.Backwards]:()=>ln(c,Qe.Last)})}return()=>{let c={},f={ref:i},{features:h,initialFocus:d,containers:p,...m}=e;return s.h(s.Fragment,[Boolean(h&4)&&s.h(cn,{as:"button",type:"button",onFocus:u,features:yt.Focusable}),N({ourProps:f,theirProps:{...t,...m},slot:c,attrs:t,slots:n,name:"FocusTrap"}),Boolean(h&4)&&s.h(cn,{as:"button",type:"button",onFocus:u,features:yt.Focusable})])}}}),{features:qr});function fl({ownerDocument:e},t){let n=s.ref(null);function r(){var a;n.value||(n.value=(a=e.value)==null?void 0:a.activeElement)}function i(){!n.value||(Je(n.value),n.value=null)}s.onMounted(()=>{s.watch(t,(a,o)=>{a!==o&&(a?r():i())},{immediate:!0})}),s.onUnmounted(i)}function dl({ownerDocument:e,container:t,initialFocus:n},r){let i=s.ref(null),a=s.ref(!1);return s.onMounted(()=>a.value=!0),s.onUnmounted(()=>a.value=!1),s.onMounted(()=>{s.watch([t,n,r],(o,l)=>{if(o.every((c,f)=>(l==null?void 0:l[f])===c)||!r.value)return;let u=ne(t);!u||cl(()=>{var c,f;if(!a.value)return;let h=ne(n),d=(c=e.value)==null?void 0:c.activeElement;if(h){if(h===d){i.value=d;return}}else if(u.contains(d)){i.value=d;return}h?Je(h):ln(u,Qe.First|Qe.NoScroll)===Fr.Error&&console.warn("There are no focusable elements inside the "),i.value=(f=e.value)==null?void 0:f.activeElement})},{immediate:!0,flush:"post"})}),i}function pl({ownerDocument:e,container:t,containers:n,previousActiveElement:r},i){var a;Br((a=e.value)==null?void 0:a.defaultView,"focus",o=>{if(!i.value)return;let l=new Set(n==null?void 0:n.value);l.add(t);let u=r.value;if(!u)return;let c=o.target;c&&c instanceof HTMLElement?hl(l,c)?(r.value=c,Je(c)):(o.preventDefault(),o.stopPropagation(),Je(u)):Je(r.value)},!0)}function hl(e,t){var n;for(let r of e)if((n=r.value)!=null&&n.contains(t))return!0;return!1}let Dr="body > *",qe=new Set,de=new Map;function jr(e){e.setAttribute("aria-hidden","true"),e.inert=!0}function Lr(e){let t=de.get(e);!t||(t["aria-hidden"]===null?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",t["aria-hidden"]),e.inert=t.inert)}function ml(e,t=s.ref(!0)){s.watchEffect(n=>{if(!t.value||!e.value)return;let r=e.value,i=Be(r);if(i){qe.add(r);for(let a of de.keys())a.contains(r)&&(Lr(a),de.delete(a));i.querySelectorAll(Dr).forEach(a=>{if(a instanceof HTMLElement){for(let o of qe)if(a.contains(o))return;qe.size===1&&(de.set(a,{"aria-hidden":a.getAttribute("aria-hidden"),inert:a.inert}),jr(a))}}),n(()=>{if(qe.delete(r),qe.size>0)i.querySelectorAll(Dr).forEach(a=>{if(a instanceof HTMLElement&&!de.has(a)){for(let o of qe)if(a.contains(o))return;de.set(a,{"aria-hidden":a.getAttribute("aria-hidden"),inert:a.inert}),jr(a)}});else for(let a of de.keys())Lr(a),de.delete(a)})}})}let Mr=Symbol("ForcePortalRootContext");function gl(){return s.inject(Mr,!1)}let dn=s.defineComponent({name:"ForcePortalRoot",props:{as:{type:[Object,String],default:"template"},force:{type:Boolean,default:!1}},setup(e,{slots:t,attrs:n}){return s.provide(Mr,e.force),()=>{let{force:r,...i}=e;return N({theirProps:i,ourProps:{},slot:{},slots:t,attrs:n,name:"ForcePortalRoot"})}}});function vl(e){let t=Be(e);if(!t){if(e===null)return null;throw new Error(`[Headless UI]: Cannot find ownerDocument for contextElement: ${e}`)}let n=t.getElementById("headlessui-portal-root");if(n)return n;let r=t.createElement("div");return r.setAttribute("id","headlessui-portal-root"),t.body.appendChild(r)}let Rr=s.defineComponent({name:"Portal",props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n}){let r=s.ref(null),i=s.computed(()=>Be(r)),a=gl(),o=s.inject(Nr,null),l=s.ref(a===!0||o==null?vl(r.value):o.resolveTarget());return s.watchEffect(()=>{a||o!=null&&(l.value=o.resolveTarget())}),s.onUnmounted(()=>{var u,c;let f=(u=i.value)==null?void 0:u.getElementById("headlessui-portal-root");!f||l.value===f&&l.value.children.length<=0&&((c=l.value.parentElement)==null||c.removeChild(l.value))}),()=>{if(l.value===null)return null;let u={ref:r,"data-headlessui-portal":""};return s.h(s.Teleport,{to:l.value},N({ourProps:u,theirProps:e,slot:{},attrs:n,slots:t,name:"Portal"}))}}}),Nr=Symbol("PortalGroupContext"),yl=s.defineComponent({name:"PortalGroup",props:{as:{type:[Object,String],default:"template"},target:{type:Object,default:null}},setup(e,{attrs:t,slots:n}){let r=s.reactive({resolveTarget(){return e.target}});return s.provide(Nr,r),()=>{let{target:i,...a}=e;return N({theirProps:a,ourProps:{},slot:{},attrs:t,slots:n,name:"PortalGroup"})}}}),Vr=Symbol("StackContext");var pn=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(pn||{});function bl(){return s.inject(Vr,()=>{})}function wl({type:e,enabled:t,element:n,onUpdate:r}){let i=bl();function a(...o){r==null||r(...o),i(...o)}s.onMounted(()=>{s.watch(t,(o,l)=>{o?a(0,e,n):l===!0&&a(1,e,n)},{immediate:!0,flush:"sync"})}),s.onUnmounted(()=>{t.value&&a(1,e,n)}),s.provide(Vr,a)}let Hr=Symbol("DescriptionContext");function Sl(){let e=s.inject(Hr,null);if(e===null)throw new Error("Missing parent");return e}function Ol({slot:e=s.ref({}),name:t="Description",props:n={}}={}){let r=s.ref([]);function i(a){return r.value.push(a),()=>{let o=r.value.indexOf(a);o!==-1&&r.value.splice(o,1)}}return s.provide(Hr,{register:i,slot:e,name:t,props:n}),s.computed(()=>r.value.length>0?r.value.join(" "):void 0)}let $l=s.defineComponent({name:"Description",props:{as:{type:[Object,String],default:"p"}},setup(e,{attrs:t,slots:n}){let r=Sl(),i=`headlessui-description-${we()}`;return s.onMounted(()=>s.onUnmounted(r.register(i))),()=>{let{name:a="Description",slot:o=s.ref({}),props:l={}}=r,u=e,c={...Object.entries(l).reduce((f,[h,d])=>Object.assign(f,{[h]:s.unref(d)}),{}),id:i};return N({ourProps:c,theirProps:u,slot:o.value,attrs:t,slots:n,name:a})}}});function hn(){let e=[],t=[],n={enqueue(r){t.push(r)},addEventListener(r,i,a,o){return r.addEventListener(i,a,o),n.add(()=>r.removeEventListener(i,a,o))},requestAnimationFrame(...r){let i=requestAnimationFrame(...r);n.add(()=>cancelAnimationFrame(i))},nextFrame(...r){n.requestAnimationFrame(()=>{n.requestAnimationFrame(...r)})},setTimeout(...r){let i=setTimeout(...r);n.add(()=>clearTimeout(i))},add(r){e.push(r)},dispose(){for(let r of e.splice(0))r()},async workQueue(){for(let r of t.splice(0))await r()}};return n}function El(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}var xl=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(xl||{});let mn=Symbol("DialogContext");function Ze(e){let t=s.inject(mn,null);if(t===null){let n=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Ze),n}return t}let bt="DC8F892D-2EBD-447C-A4C8-A03058436FF4",gn=s.defineComponent({name:"Dialog",inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},open:{type:[Boolean,String],default:bt},initialFocus:{type:Object,default:null}},emits:{close:e=>!0},setup(e,{emit:t,attrs:n,slots:r,expose:i}){var a;let o=s.ref(!1);s.onMounted(()=>{o.value=!0});let l=s.ref(0),u=on(),c=s.computed(()=>e.open===bt&&u!==null?W(u.value,{[Se.Open]:!0,[Se.Closed]:!1}):e.open),f=s.ref(new Set),h=s.ref(null),d=s.ref(null),p=s.computed(()=>Be(h));if(i({el:h,$el:h}),!(e.open!==bt||u!==null))throw new Error("You forgot to provide an `open` prop to the `Dialog`.");if(typeof c.value!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${c.value===bt?void 0:e.open}`);let m=s.computed(()=>o.value&&c.value?0:1),b=s.computed(()=>m.value===0),v=s.computed(()=>l.value>1),T=s.inject(mn,null)!==null,A=s.computed(()=>v.value?"parent":"leaf");ml(h,s.computed(()=>v.value?b.value:!1)),wl({type:"Dialog",enabled:s.computed(()=>m.value===0),element:h,onUpdate:(w,S,x)=>{if(S==="Dialog")return W(w,{[pn.Add](){f.value.add(x),l.value+=1},[pn.Remove](){f.value.delete(x),l.value-=1}})}});let I=Ol({name:"DialogDescription",slot:s.computed(()=>({open:c.value}))}),E=`headlessui-dialog-${we()}`,O=s.ref(null),y={titleId:O,panelRef:s.ref(null),dialogState:m,setTitleId(w){O.value!==w&&(O.value=w)},close(){t("close",!1)}};return s.provide(mn,y),sl(()=>{var w,S,x;return[...Array.from((S=(w=p.value)==null?void 0:w.querySelectorAll("body > *, [data-headlessui-portal]"))!=null?S:[]).filter(_=>!(!(_ instanceof HTMLElement)||_.contains(ne(d))||y.panelRef.value&&_.contains(y.panelRef.value))),(x=y.panelRef.value)!=null?x:h.value]},(w,S)=>{y.close(),s.nextTick(()=>S==null?void 0:S.focus())},s.computed(()=>m.value===0&&!v.value)),Br((a=p.value)==null?void 0:a.defaultView,"keydown",w=>{w.defaultPrevented||w.key===Pr.Escape&&m.value===0&&(v.value||(w.preventDefault(),w.stopPropagation(),y.close()))}),s.watchEffect(w=>{var S;if(m.value!==0||T)return;let x=p.value;if(!x)return;let _=hn();function $(D,M,j){let L=D.style.getPropertyValue(M);return Object.assign(D.style,{[M]:j}),_.add(()=>{Object.assign(D.style,{[M]:L})})}let C=x==null?void 0:x.documentElement,q=((S=x.defaultView)!=null?S:window).innerWidth-C.clientWidth;if($(C,"overflow","hidden"),q>0){let D=C.clientWidth-C.offsetWidth,M=q-D;$(C,"paddingRight",`${M}px`)}if(El()){let D=window.pageYOffset;$(C,"position","fixed"),$(C,"marginTop",`-${D}px`),$(C,"width","100%"),_.add(()=>window.scrollTo(0,D))}w(_.dispose)}),s.watchEffect(w=>{if(m.value!==0)return;let S=ne(h);if(!S)return;let x=new IntersectionObserver(_=>{for(let $ of _)$.boundingClientRect.x===0&&$.boundingClientRect.y===0&&$.boundingClientRect.width===0&&$.boundingClientRect.height===0&&y.close()});x.observe(S),w(()=>x.disconnect())}),()=>{let w={...n,ref:h,id:E,role:"dialog","aria-modal":m.value===0?!0:void 0,"aria-labelledby":O.value,"aria-describedby":I.value},{open:S,initialFocus:x,..._}=e,$={open:m.value===0};return s.h(dn,{force:!0},()=>[s.h(Rr,()=>s.h(yl,{target:h.value},()=>s.h(dn,{force:!1},()=>s.h(Ye,{initialFocus:x,containers:f,features:b.value?W(A.value,{parent:Ye.features.RestoreFocus,leaf:Ye.features.All&~Ye.features.FocusLock}):Ye.features.None},()=>N({ourProps:w,theirProps:_,slot:$,attrs:n,slots:r,visible:m.value===0,features:gt.RenderStrategy|gt.Static,name:"Dialog"}))))),s.h(cn,{features:yt.Hidden,ref:d})])}}});s.defineComponent({name:"DialogOverlay",props:{as:{type:[Object,String],default:"div"}},setup(e,{attrs:t,slots:n}){let r=Ze("DialogOverlay"),i=`headlessui-dialog-overlay-${we()}`;function a(o){o.target===o.currentTarget&&(o.preventDefault(),o.stopPropagation(),r.close())}return()=>N({ourProps:{id:i,"aria-hidden":!0,onClick:a},theirProps:e,slot:{open:r.dialogState.value===0},attrs:t,slots:n,name:"DialogOverlay"})}}),s.defineComponent({name:"DialogBackdrop",props:{as:{type:[Object,String],default:"div"}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:r}){let i=Ze("DialogBackdrop"),a=`headlessui-dialog-backdrop-${we()}`,o=s.ref(null);return r({el:o,$el:o}),s.onMounted(()=>{if(i.panelRef.value===null)throw new Error("A component is being used, but a component is missing.")}),()=>{let l=e,u={id:a,ref:o,"aria-hidden":!0};return s.h(dn,{force:!0},()=>s.h(Rr,()=>N({ourProps:u,theirProps:{...t,...l},slot:{open:i.dialogState.value===0},attrs:t,slots:n,name:"DialogBackdrop"})))}}});let vn=s.defineComponent({name:"DialogPanel",props:{as:{type:[Object,String],default:"div"}},setup(e,{attrs:t,slots:n,expose:r}){let i=Ze("DialogPanel"),a=`headlessui-dialog-panel-${we()}`;r({el:i.panelRef,$el:i.panelRef});function o(l){l.stopPropagation()}return()=>{let l={id:a,ref:i.panelRef,onClick:o};return N({ourProps:l,theirProps:e,slot:{open:i.dialogState.value===0},attrs:t,slots:n,name:"DialogPanel"})}}});s.defineComponent({name:"DialogTitle",props:{as:{type:[Object,String],default:"h2"}},setup(e,{attrs:t,slots:n}){let r=Ze("DialogTitle"),i=`headlessui-dialog-title-${we()}`;return s.onMounted(()=>{r.setTitleId(i),s.onUnmounted(()=>r.setTitleId(null))}),()=>N({ourProps:{id:i},theirProps:e,slot:{open:r.dialogState.value===0},attrs:t,slots:n,name:"DialogTitle"})}});function Tl(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function yn(e,...t){e&&t.length>0&&e.classList.add(...t)}function wt(e,...t){e&&t.length>0&&e.classList.remove(...t)}var bn=(e=>(e.Finished="finished",e.Cancelled="cancelled",e))(bn||{});function _l(e,t){let n=hn();if(!e)return n.dispose;let{transitionDuration:r,transitionDelay:i}=getComputedStyle(e),[a,o]=[r,i].map(l=>{let[u=0]=l.split(",").filter(Boolean).map(c=>c.includes("ms")?parseFloat(c):parseFloat(c)*1e3).sort((c,f)=>f-c);return u});return a!==0?n.setTimeout(()=>t("finished"),a+o):t("finished"),n.add(()=>t("cancelled")),n.dispose}function Ur(e,t,n,r,i,a){let o=hn(),l=a!==void 0?Tl(a):()=>{};return wt(e,...i),yn(e,...t,...n),o.nextFrame(()=>{wt(e,...n),yn(e,...r),o.add(_l(e,u=>(wt(e,...r,...t),yn(e,...i),l(u))))}),o.add(()=>wt(e,...t,...n,...r,...i)),o.add(()=>l("cancelled")),o.dispose}function Oe(e=""){return e.split(" ").filter(t=>t.trim().length>1)}let wn=Symbol("TransitionContext");var Al=(e=>(e.Visible="visible",e.Hidden="hidden",e))(Al||{});function Il(){return s.inject(wn,null)!==null}function Pl(){let e=s.inject(wn,null);if(e===null)throw new Error("A is used but it is missing a parent .");return e}function Cl(){let e=s.inject(Sn,null);if(e===null)throw new Error("A is used but it is missing a parent .");return e}let Sn=Symbol("NestingContext");function St(e){return"children"in e?St(e.children):e.value.filter(({state:t})=>t==="visible").length>0}function zr(e){let t=s.ref([]),n=s.ref(!1);s.onMounted(()=>n.value=!0),s.onUnmounted(()=>n.value=!1);function r(a,o=fe.Hidden){let l=t.value.findIndex(({id:u})=>u===a);l!==-1&&(W(o,{[fe.Unmount](){t.value.splice(l,1)},[fe.Hidden](){t.value[l].state="hidden"}}),!St(t)&&n.value&&(e==null||e()))}function i(a){let o=t.value.find(({id:l})=>l===a);return o?o.state!=="visible"&&(o.state="visible"):t.value.push({id:a,state:"visible"}),()=>r(a,fe.Unmount)}return{children:t,register:i,unregister:r}}let Wr=gt.RenderStrategy,De=s.defineComponent({props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},entered:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:t,attrs:n,slots:r,expose:i}){if(!Il()&&Zs())return()=>s.h(je,{...e,onBeforeEnter:()=>t("beforeEnter"),onAfterEnter:()=>t("afterEnter"),onBeforeLeave:()=>t("beforeLeave"),onAfterLeave:()=>t("afterLeave")},r);let a=s.ref(null),o=s.ref("visible"),l=s.computed(()=>e.unmount?fe.Unmount:fe.Hidden);i({el:a,$el:a});let{show:u,appear:c}=Pl(),{register:f,unregister:h}=Cl(),d={value:!0},p=we(),m={value:!1},b=zr(()=>{m.value||(o.value="hidden",h(p),t("afterLeave"))});s.onMounted(()=>{let S=f(p);s.onUnmounted(S)}),s.watchEffect(()=>{if(l.value===fe.Hidden&&!!p){if(u&&o.value!=="visible"){o.value="visible";return}W(o.value,{hidden:()=>h(p),visible:()=>f(p)})}});let v=Oe(e.enter),T=Oe(e.enterFrom),A=Oe(e.enterTo),I=Oe(e.entered),E=Oe(e.leave),O=Oe(e.leaveFrom),y=Oe(e.leaveTo);s.onMounted(()=>{s.watchEffect(()=>{if(o.value==="visible"){let S=ne(a);if(S instanceof Comment&&S.data==="")throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}})});function w(S){let x=d.value&&!c.value,_=ne(a);!_||!(_ instanceof HTMLElement)||x||(m.value=!0,u.value&&t("beforeEnter"),u.value||t("beforeLeave"),S(u.value?Ur(_,v,T,A,I,$=>{m.value=!1,$===bn.Finished&&t("afterEnter")}):Ur(_,E,O,y,I,$=>{m.value=!1,$===bn.Finished&&(St(b)||(o.value="hidden",h(p),t("afterLeave")))})))}return s.onMounted(()=>{s.watch([u],(S,x,_)=>{w(_),d.value=!1},{immediate:!0})}),s.provide(Sn,b),el(s.computed(()=>W(o.value,{visible:Se.Open,hidden:Se.Closed}))),()=>{let{appear:S,show:x,enter:_,enterFrom:$,enterTo:C,entered:q,leave:D,leaveFrom:M,leaveTo:j,...L}=e;return N({theirProps:L,ourProps:{ref:a},slot:{},slots:r,attrs:n,features:Wr,visible:o.value==="visible",name:"TransitionChild"})}}}),Fl=De,je=s.defineComponent({inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},entered:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:t,attrs:n,slots:r}){let i=on(),a=s.computed(()=>e.show===null&&i!==null?W(i.value,{[Se.Open]:!0,[Se.Closed]:!1}):e.show);s.watchEffect(()=>{if(![!0,!1].includes(a.value))throw new Error('A is used but it is missing a `:show="true | false"` prop.')});let o=s.ref(a.value?"visible":"hidden"),l=zr(()=>{o.value="hidden"}),u=s.ref(!0),c={show:a,appear:s.computed(()=>e.appear||!u.value)};return s.onMounted(()=>{s.watchEffect(()=>{u.value=!1,a.value?o.value="visible":St(l)||(o.value="hidden")})}),s.provide(Sn,l),s.provide(wn,c),()=>{let f=Ir(e,["show","appear","unmount","onBeforeEnter","onBeforeLeave","onAfterEnter","onAfterLeave"]),h={unmount:e.unmount};return N({ourProps:{...h,as:"template"},theirProps:{},slot:{},slots:{...r,default:()=>[s.h(Fl,{onBeforeEnter:()=>t("beforeEnter"),onAfterEnter:()=>t("afterEnter"),onBeforeLeave:()=>t("beforeLeave"),onAfterLeave:()=>t("afterLeave"),...n,...h,...f},r.default)]},attrs:{},features:Wr,visible:o.value==="visible",name:"Transition"})}}});const kl={props:{defaultTitle:{type:String,required:!1,default:""},defaultText:{type:String,required:!1,default:""},defaultConfirmButton:{type:String,required:!1,default:""},defaultCancelButton:{type:String,required:!1,default:""}},data(){return{isOpen:!1}},computed:{hasConfirmModal:()=>!!g.confirmModal.value,title:function(){var e;return(e=g.confirmModal.value)!=null&&e.title?g.confirmModal.value.title:this.defaultTitle},text:function(){var e;return(e=g.confirmModal.value)!=null&&e.text?g.confirmModal.value.text:this.defaultText},confirmButton:function(){var e;return(e=g.confirmModal.value)!=null&&e.confirmButton?g.confirmModal.value.confirmButton:this.defaultConfirmButton},cancelButton:function(){var e;return(e=g.confirmModal.value)!=null&&e.cancelButton?g.confirmModal.value.cancelButton:this.defaultCancelButton}},watch:{hasConfirmModal(e){e&&(this.isOpen=!0)}},methods:{cancel(){g.confirmModal.value.rejectPromise(),this.setIsOpen(!1)},confirm(){g.confirmModal.value.resolvePromise(),this.setIsOpen(!1)},setIsOpen(e){this.isOpen=e},emitClose(){g.clearConfirmModal()}},render(){return this.$slots.default({title:this.title,text:this.text,confirmButton:this.confirmButton,cancelButton:this.cancelButton,isOpen:this.isOpen,setIsOpen:this.setIsOpen,cancel:this.cancel,confirm:this.confirm,emitClose:this.emitClose,Dialog:gn,DialogPanel:vn,TransitionRoot:je,TransitionChild:De})}};function Gr(e,t){t=rn(t,e);for(var n=0,r=t.length;e!=null&&n({}),required:!1},remember:{type:String,default:null,required:!1},localStorage:{type:Boolean,default:!1,required:!1}},data(){return{values:{}}},mounted(){if(this.remember){let e=g.restore(this.remember,this.localStorage);e||(e={}),this.values=Object.assign({},{...this.default,...e})}else this.values=Object.assign({},{...this.default})},updated(){this.remember&&g.remember(this.remember,{...this.values},this.localStorage)},render(){const e=this;return this.$slots.default(new Proxy(this.values,{ownKeys(){return Object.keys(e.values)},get(t,n){return et(e.values,n)},set(t,n,r){Qr(e.values,n,r)}}))}};var Rl=function(){return X.Date.now()};const On=Rl;var Nl=/\s/;function Vl(e){for(var t=e.length;t--&&Nl.test(e.charAt(t)););return t}var Hl=/^\s+/;function Ul(e){return e&&e.slice(0,Vl(e)+1).replace(Hl,"")}var Jr=0/0,zl=/^[-+]0x[0-9a-f]+$/i,Wl=/^0b[01]+$/i,Gl=/^0o[0-7]+$/i,Kl=parseInt;function $n(e){if(typeof e=="number")return e;if(dt(e))return Jr;if(R(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=R(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Ul(e);var n=Wl.test(e);return n||Gl.test(e)?Kl(e.slice(2),n?2:8):zl.test(e)?Jr:+e}var Xl="Expected a function",Ql=Math.max,Jl=Math.min;function En(e,t,n){var r,i,a,o,l,u,c=0,f=!1,h=!1,d=!0;if(typeof e!="function")throw new TypeError(Xl);t=$n(t)||0,R(n)&&(f=!!n.leading,h="maxWait"in n,a=h?Ql($n(n.maxWait)||0,t):a,d="trailing"in n?!!n.trailing:d);function p(y){var w=r,S=i;return r=i=void 0,c=y,o=e.apply(S,w),o}function m(y){return c=y,l=setTimeout(T,t),f?p(y):o}function b(y){var w=y-u,S=y-c,x=t-w;return h?Jl(x,a-S):x}function v(y){var w=y-u,S=y-c;return u===void 0||w>=t||w<0||h&&S>=a}function T(){var y=On();if(v(y))return A(y);l=setTimeout(T,b(y))}function A(y){return l=void 0,d&&r?p(y):(r=i=void 0,o)}function I(){l!==void 0&&clearTimeout(l),c=0,r=u=i=l=void 0}function E(){return l===void 0?o:A(On())}function O(){var y=On(),w=v(y);if(r=arguments,i=this,u=y,w){if(l===void 0)return m(u);if(h)return clearTimeout(l),l=setTimeout(T,t),p(u)}return l===void 0&&(l=setTimeout(T,t)),o}return O.cancel=I,O.flush=E,O}const Yl={props:{url:{type:String,required:!0},method:{type:String,required:!1,default:"GET"},acceptHeader:{type:String,required:!1,default:"application/json"},poll:{type:Number,required:!1,default:null},default:{type:Object,required:!1,default:()=>({})},request:{type:Object,required:!1,default:()=>({})},manual:{type:Boolean,required:!1,default:!1},watchDebounce:{type:Number,required:!1,default:0},watchValue:{validator(){return!0},required:!1,default:null}},data(){return{response:Object.assign({},{...this.default}),processing:!1,debounceFunction:null}},watch:{watchValue:{deep:!0,handler(){this.processing=!0,this.watchDebounce?this.debounceFunction():this.performRequest()}}},mounted(){this.manual||this.$nextTick(this.performRequest)},created(){this.debounceFunction=En(()=>{this.performRequest()},this.watchDebounce)},methods:{performRequest(){this.processing=!0;const e={url:this.url,method:this.method,headers:{Accept:this.acceptHeader}};Object.keys(this.request).length>0&&(e.data=this.request),oe.default(e).then(t=>{this.response=t.data,this.processing=!1}).catch(()=>{this.processing=!1}),this.poll&&setTimeout(()=>{this.performRequest()},this.poll)}},render(){return this.$slots.default({processing:this.processing,response:this.response,reload:this.performRequest})}},Zl={data(){return{isActivated:!0}},deactivated(){this.isActivated=!1},activated(){this.isActivated=!0},render(){return this.$slots.default({Dialog:gn,DialogPanel:vn,isActivated:this.isActivated})}},Yr={__name:"OnClickOutside",props:{do:{type:Function,required:!0},opened:{type:Boolean,required:!0},closeOnEscape:{type:Boolean,required:!1,default:!0},ignoreInnerTargets:{type:Boolean,required:!1,default:!1}},setup(e){const t=e,n=s.ref(null),r=s.ref(null),i=s.ref(null);return s.onMounted(()=>{n.value=a=>{r.value.children[0].contains(a.target)||t.ignoreInnerTargets&&r.value.contains(a.target)||t.do()},document.addEventListener("click",n.value),document.addEventListener("touchstart",n.value),t.closeOnEscape&&(i.value=a=>{t.opened&&a.key==="Escape"&&t.do()},document.addEventListener("keydown",i.value))}),s.onBeforeUnmount(()=>{document.removeEventListener("click",n.value),document.removeEventListener("touchstart",n.value),t.closeOnEscape&&document.removeEventListener("keydown",i.value)}),(a,o)=>(s.openBlock(),s.createElementBlock("div",{ref_key:"root",ref:r},[s.renderSlot(a.$slots,"default")],512))}};function H(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function $e(e){var t=H(e).Element;return e instanceof t||e instanceof Element}function U(e){var t=H(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function xn(e){if(typeof ShadowRoot>"u")return!1;var t=H(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}var Ee=Math.max,Ot=Math.min,Le=Math.round;function Tn(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Zr(){return!/^((?!chrome|android).)*safari/i.test(Tn())}function Me(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,a=1;t&&U(e)&&(i=e.offsetWidth>0&&Le(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&Le(r.height)/e.offsetHeight||1);var o=$e(e)?H(e):window,l=o.visualViewport,u=!Zr()&&n,c=(r.left+(u&&l?l.offsetLeft:0))/i,f=(r.top+(u&&l?l.offsetTop:0))/a,h=r.width/i,d=r.height/a;return{width:h,height:d,top:f,right:c+h,bottom:f+d,left:c,x:c,y:f}}function _n(e){var t=H(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function eu(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function tu(e){return e===H(e)||!U(e)?_n(e):eu(e)}function J(e){return e?(e.nodeName||"").toLowerCase():null}function pe(e){return(($e(e)?e.ownerDocument:e.document)||window.document).documentElement}function An(e){return Me(pe(e)).left+_n(e).scrollLeft}function G(e){return H(e).getComputedStyle(e)}function In(e){var t=G(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function nu(e){var t=e.getBoundingClientRect(),n=Le(t.width)/e.offsetWidth||1,r=Le(t.height)/e.offsetHeight||1;return n!==1||r!==1}function ru(e,t,n){n===void 0&&(n=!1);var r=U(t),i=U(t)&&nu(t),a=pe(t),o=Me(e,i,n),l={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(r||!r&&!n)&&((J(t)!=="body"||In(a))&&(l=tu(t)),U(t)?(u=Me(t,!0),u.x+=t.clientLeft,u.y+=t.clientTop):a&&(u.x=An(a))),{x:o.left+l.scrollLeft-u.x,y:o.top+l.scrollTop-u.y,width:o.width,height:o.height}}function ei(e){var t=Me(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function $t(e){return J(e)==="html"?e:e.assignedSlot||e.parentNode||(xn(e)?e.host:null)||pe(e)}function ti(e){return["html","body","#document"].indexOf(J(e))>=0?e.ownerDocument.body:U(e)&&In(e)?e:ti($t(e))}function tt(e,t){var n;t===void 0&&(t=[]);var r=ti(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),a=H(r),o=i?[a].concat(a.visualViewport||[],In(r)?r:[]):r,l=t.concat(o);return i?l:l.concat(tt($t(o)))}function iu(e){return["table","td","th"].indexOf(J(e))>=0}function ni(e){return!U(e)||G(e).position==="fixed"?null:e.offsetParent}function au(e){var t=/firefox/i.test(Tn()),n=/Trident/i.test(Tn());if(n&&U(e)){var r=G(e);if(r.position==="fixed")return null}var i=$t(e);for(xn(i)&&(i=i.host);U(i)&&["html","body"].indexOf(J(i))<0;){var a=G(i);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||t&&a.willChange==="filter"||t&&a.filter&&a.filter!=="none")return i;i=i.parentNode}return null}function Et(e){for(var t=H(e),n=ni(e);n&&iu(n)&&G(n).position==="static";)n=ni(n);return n&&(J(n)==="html"||J(n)==="body"&&G(n).position==="static")?t:n||au(e)||t}var K="top",Y="bottom",he="right",re="left",xt="auto",Tt=[K,Y,he,re],Re="start",nt="end",ou="clippingParents",ri="viewport",rt="popper",su="reference",ii=Tt.reduce(function(e,t){return e.concat([t+"-"+Re,t+"-"+nt])},[]),lu=[].concat(Tt,[xt]).reduce(function(e,t){return e.concat([t,t+"-"+Re,t+"-"+nt])},[]),uu="beforeRead",cu="read",fu="afterRead",du="beforeMain",pu="main",hu="afterMain",mu="beforeWrite",gu="write",vu="afterWrite",Pn=[uu,cu,fu,du,pu,hu,mu,gu,vu];function yu(e){var t=new Map,n=new Set,r=[];e.forEach(function(a){t.set(a.name,a)});function i(a){n.add(a.name);var o=[].concat(a.requires||[],a.requiresIfExists||[]);o.forEach(function(l){if(!n.has(l)){var u=t.get(l);u&&i(u)}}),r.push(a)}return e.forEach(function(a){n.has(a.name)||i(a)}),r}function bu(e){var t=yu(e);return Pn.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function wu(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function me(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0,r=n&&U(e)?Et(e):e;return $e(r)?t.filter(function(i){return $e(i)&&_u(i,r)&&J(i)!=="body"}):[]}function Pu(e,t,n,r){var i=t==="clippingParents"?Iu(e):[].concat(t),a=[].concat(i,[n]),o=a[0],l=a.reduce(function(u,c){var f=oi(e,c,r);return u.top=Ee(f.top,u.top),u.right=Ot(f.right,u.right),u.bottom=Ot(f.bottom,u.bottom),u.left=Ee(f.left,u.left),u},oi(e,o,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function Ne(e){return e.split("-")[1]}function si(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function li(e){var t=e.reference,n=e.element,r=e.placement,i=r?ie(r):null,a=r?Ne(r):null,o=t.x+t.width/2-n.width/2,l=t.y+t.height/2-n.height/2,u;switch(i){case K:u={x:o,y:t.y-n.height};break;case Y:u={x:o,y:t.y+t.height};break;case he:u={x:t.x+t.width,y:l};break;case re:u={x:t.x-n.width,y:l};break;default:u={x:t.x,y:t.y}}var c=i?si(i):null;if(c!=null){var f=c==="y"?"height":"width";switch(a){case Re:u[c]=u[c]-(t[f]/2-n[f]/2);break;case nt:u[c]=u[c]+(t[f]/2-n[f]/2);break}}return u}function ui(){return{top:0,right:0,bottom:0,left:0}}function Cu(e){return Object.assign({},ui(),e)}function Fu(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}function Fn(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,a=n.strategy,o=a===void 0?e.strategy:a,l=n.boundary,u=l===void 0?ou:l,c=n.rootBoundary,f=c===void 0?ri:c,h=n.elementContext,d=h===void 0?rt:h,p=n.altBoundary,m=p===void 0?!1:p,b=n.padding,v=b===void 0?0:b,T=Cu(typeof v!="number"?v:Fu(v,Tt)),A=d===rt?su:rt,I=e.rects.popper,E=e.elements[m?A:d],O=Pu($e(E)?E:E.contextElement||pe(e.elements.popper),u,f,o),y=Me(e.elements.reference),w=li({reference:y,element:I,strategy:"absolute",placement:i}),S=Cn(Object.assign({},I,w)),x=d===rt?S:y,_={top:O.top-x.top+T.top,bottom:x.bottom-O.bottom+T.bottom,left:O.left-x.left+T.left,right:x.right-O.right+T.right},$=e.modifiersData.offset;if(d===rt&&$){var C=$[i];Object.keys(_).forEach(function(q){var D=[he,Y].indexOf(q)>=0?1:-1,M=[K,Y].indexOf(q)>=0?"y":"x";_[q]+=C[M]*D})}return _}var ci="Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.",ku="Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.",fi={placement:"bottom",modifiers:[],strategy:"absolute"};function di(){for(var e=arguments.length,t=new Array(e),n=0;n100)){console.error(ku);break}if(f.reset===!0){f.reset=!1,O=-1;continue}var y=f.orderedModifiers[O],w=y.fn,S=y.options,x=S===void 0?{}:S,_=y.name;typeof w=="function"&&(f=w({state:f,options:x,name:_,instance:p})||f)}}},update:wu(function(){return new Promise(function(v){p.forceUpdate(),v(f)})}),destroy:function(){b(),d=!0}};if(!di(l,u))return process.env.NODE_ENV!=="production"&&console.error(ci),p;p.setOptions(c).then(function(v){!d&&c.onFirstUpdate&&c.onFirstUpdate(v)});function m(){f.orderedModifiers.forEach(function(v){var T=v.name,A=v.options,I=A===void 0?{}:A,E=v.effect;if(typeof E=="function"){var O=E({state:f,name:T,instance:p,options:I}),y=function(){};h.push(O||y)}})}function b(){h.forEach(function(v){return v()}),h=[]}return p}}var _t={passive:!0};function qu(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,a=i===void 0?!0:i,o=r.resize,l=o===void 0?!0:o,u=H(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&c.forEach(function(f){f.addEventListener("scroll",n.update,_t)}),l&&u.addEventListener("resize",n.update,_t),function(){a&&c.forEach(function(f){f.removeEventListener("scroll",n.update,_t)}),l&&u.removeEventListener("resize",n.update,_t)}}const Du={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:qu,data:{}};function ju(e){var t=e.state,n=e.name;t.modifiersData[n]=li({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Lu={name:"popperOffsets",enabled:!0,phase:"read",fn:ju,data:{}};var Mu={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Ru(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:Le(t*i)/i||0,y:Le(n*i)/i||0}}function pi(e){var t,n=e.popper,r=e.popperRect,i=e.placement,a=e.variation,o=e.offsets,l=e.position,u=e.gpuAcceleration,c=e.adaptive,f=e.roundOffsets,h=e.isFixed,d=o.x,p=d===void 0?0:d,m=o.y,b=m===void 0?0:m,v=typeof f=="function"?f({x:p,y:b}):{x:p,y:b};p=v.x,b=v.y;var T=o.hasOwnProperty("x"),A=o.hasOwnProperty("y"),I=re,E=K,O=window;if(c){var y=Et(n),w="clientHeight",S="clientWidth";if(y===H(n)&&(y=pe(n),G(y).position!=="static"&&l==="absolute"&&(w="scrollHeight",S="scrollWidth")),y=y,i===K||(i===re||i===he)&&a===nt){E=Y;var x=h&&y===O&&O.visualViewport?O.visualViewport.height:y[w];b-=x-r.height,b*=u?1:-1}if(i===re||(i===K||i===Y)&&a===nt){I=he;var _=h&&y===O&&O.visualViewport?O.visualViewport.width:y[S];p-=_-r.width,p*=u?1:-1}}var $=Object.assign({position:l},c&&Mu),C=f===!0?Ru({x:p,y:b}):{x:p,y:b};if(p=C.x,b=C.y,u){var q;return Object.assign({},$,(q={},q[E]=A?"0":"",q[I]=T?"0":"",q.transform=(O.devicePixelRatio||1)<=1?"translate("+p+"px, "+b+"px)":"translate3d("+p+"px, "+b+"px, 0)",q))}return Object.assign({},$,(t={},t[E]=A?b+"px":"",t[I]=T?p+"px":"",t.transform="",t))}function Nu(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,a=n.adaptive,o=a===void 0?!0:a,l=n.roundOffsets,u=l===void 0?!0:l;if(process.env.NODE_ENV!=="production"){var c=G(t.elements.popper).transitionProperty||"";o&&["transform","top","right","bottom","left"].some(function(h){return c.indexOf(h)>=0})&&console.warn(["Popper: Detected CSS transitions on at least one of the following",'CSS properties: "transform", "top", "right", "bottom", "left".',` +`));return s.cloneVNode(d,Object.assign({},l,c))}return Array.isArray(u)&&u.length===1?u[0]:u}return s.h(o,Object.assign({},l,c),{default:()=>u})}function Ir(e){return e.flatMap(t=>t.type===s.Fragment?Ir(t.children):[t])}function Js(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let i in r)i.startsWith("on")&&typeof r[i]=="function"?(n[i]!=null||(n[i]=[]),n[i].push(r[i])):t[i]=r[i];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(r=>[r,void 0])));for(let r in n)Object.assign(t,{[r](i,...a){let o=n[r];for(let l of o){if(i instanceof Event&&i.defaultPrevented)return;l(i,...a)}}});return t}function Pr(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function Zs(e){return e==null?!1:typeof e.type=="string"||typeof e.type=="object"||typeof e.type=="function"}let el=0;function tl(){return++el}function $e(){return tl()}var Cr=(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))(Cr||{});function J(e){var t;return e==null||e.value==null?null:(t=e.value.$el)!=null?t:e.value}let kr=Symbol("Context");var Ee=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Ee||{});function nl(){return un()!==null}function un(){return s.inject(kr,null)}function rl(e){s.provide(kr,e)}const St=typeof window>"u"||typeof document>"u";function De(e){if(St)return null;if(e instanceof Node)return e.ownerDocument;if(e!=null&&e.hasOwnProperty("value")){let t=J(e);if(t)return t.ownerDocument}return document}let cn=["[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 pe=(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))(pe||{}),Fr=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Fr||{}),il=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(il||{});function al(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(cn)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var Br=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Br||{});function ol(e,t=0){var n;return e===((n=De(e))==null?void 0:n.body)?!1:V(t,{[0](){return e.matches(cn)},[1](){let r=e;for(;r!==null;){if(r.matches(cn))return!0;r=r.parentElement}return!1}})}function Le(e){e==null||e.focus({preventScroll:!0})}let sl=["textarea","input"].join(",");function ll(e){var t,n;return(n=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,sl))!=null?n:!1}function ul(e,t=n=>n){return e.slice().sort((n,r)=>{let i=t(n),a=t(r);if(i===null||a===null)return 0;let o=i.compareDocumentPosition(a);return o&Node.DOCUMENT_POSITION_FOLLOWING?-1:o&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Ot(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:i=[]}={}){var a;let o=(a=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e==null?void 0:e.ownerDocument)!=null?a:document,l=Array.isArray(e)?n?ul(e):e:al(e);i.length>0&&(l=l.filter(h=>!i.includes(h))),r=r!=null?r:o.activeElement;let u=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,l.indexOf(r))-1;if(t&4)return Math.max(0,l.indexOf(r))+1;if(t&8)return l.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),d=t&32?{preventScroll:!0}:{},m=0,p=l.length,f;do{if(m>=p||m+p<=0)return 0;let h=c+m;if(t&16)h=(h+p)%p;else{if(h<0)return 3;if(h>=p)return 1}f=l[h],f==null||f.focus(d),m+=u}while(f!==o.activeElement);return t&6&&ll(f)&&f.select(),f.hasAttribute("tabindex")||f.setAttribute("tabindex","0"),2}function dn(e,t,n){St||s.watchEffect(r=>{document.addEventListener(e,t,n),r(()=>document.removeEventListener(e,t,n))})}function cl(e,t,n=s.computed(()=>!0)){function r(a,o){if(!n.value||a.defaultPrevented)return;let l=o(a);if(l===null||!l.getRootNode().contains(l))return;let u=function c(d){return typeof d=="function"?c(d()):Array.isArray(d)||d instanceof Set?d:[d]}(e);for(let c of u){if(c===null)continue;let d=c instanceof HTMLElement?c:J(c);if(d!=null&&d.contains(l)||a.composed&&a.composedPath().includes(d))return}return!ol(l,Br.Loose)&&l.tabIndex!==-1&&a.preventDefault(),t(a,l)}let i=s.ref(null);dn("mousedown",a=>{var o,l;n.value&&(i.value=((l=(o=a.composedPath)==null?void 0:o.call(a))==null?void 0:l[0])||a.target)},!0),dn("click",a=>{!i.value||(r(a,()=>i.value),i.value=null)},!0),dn("blur",a=>r(a,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}var $t=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))($t||{});let fn=s.defineComponent({name:"Hidden",props:{as:{type:[Object,String],default:"div"},features:{type:Number,default:1}},setup(e,{slots:t,attrs:n}){return()=>{let{features:r,...i}=e,a={"aria-hidden":(r&2)===2?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return R({ourProps:a,theirProps:i,slot:{},attrs:n,slots:t,name:"Hidden"})}}});function dl(e,t,n){St||s.watchEffect(r=>{window.addEventListener(e,t,n),r(()=>window.removeEventListener(e,t,n))})}var tt=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(tt||{});function fl(){let e=s.ref(0);return dl("keydown",t=>{t.key==="Tab"&&(e.value=t.shiftKey?1:0)}),e}function qr(e,t,n,r){St||s.watchEffect(i=>{e=e!=null?e:window,e.addEventListener(t,n,r),i(()=>e.removeEventListener(t,n,r))})}function pl(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}var Dr=(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))(Dr||{});let nt=Object.assign(s.defineComponent({name:"FocusTrap",props:{as:{type:[Object,String],default:"div"},initialFocus:{type:Object,default:null},features:{type:Number,default:30},containers:{type:Object,default:s.ref(new Set)}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:r}){let i=s.ref(null);r({el:i,$el:i});let a=s.computed(()=>De(i));hl({ownerDocument:a},s.computed(()=>Boolean(e.features&16)));let o=ml({ownerDocument:a,container:i,initialFocus:s.computed(()=>e.initialFocus)},s.computed(()=>Boolean(e.features&2)));gl({ownerDocument:a,container:i,containers:e.containers,previousActiveElement:o},s.computed(()=>Boolean(e.features&8)));let l=fl();function u(p){let f=J(i);!f||(h=>h())(()=>{V(l.value,{[tt.Forwards]:()=>Ot(f,pe.First,{skipElements:[p.relatedTarget]}),[tt.Backwards]:()=>Ot(f,pe.Last,{skipElements:[p.relatedTarget]})})})}let c=s.ref(!1);function d(p){p.key==="Tab"&&(c.value=!0,requestAnimationFrame(()=>{c.value=!1}))}function m(p){var f;let h=new Set((f=e.containers)==null?void 0:f.value);h.add(i);let g=p.relatedTarget;!g||g.dataset.headlessuiFocusGuard!=="true"&&(Lr(h,g)||(c.value?Ot(J(i),V(l.value,{[tt.Forwards]:()=>pe.Next,[tt.Backwards]:()=>pe.Previous})|pe.WrapAround,{relativeTo:p.target}):p.target instanceof HTMLElement&&Le(p.target)))}return()=>{let p={},f={ref:i,onKeydown:d,onFocusout:m},{features:h,initialFocus:g,containers:y,...T}=e;return s.h(s.Fragment,[Boolean(h&4)&&s.h(fn,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:u,features:$t.Focusable}),R({ourProps:f,theirProps:{...t,...T},slot:p,attrs:t,slots:n,name:"FocusTrap"}),Boolean(h&4)&&s.h(fn,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:u,features:$t.Focusable})])}}}),{features:Dr});function hl({ownerDocument:e},t){let n=s.ref(null);function r(){var a;n.value||(n.value=(a=e.value)==null?void 0:a.activeElement)}function i(){!n.value||(Le(n.value),n.value=null)}s.onMounted(()=>{s.watch(t,(a,o)=>{a!==o&&(a?r():i())},{immediate:!0})}),s.onUnmounted(i)}function ml({ownerDocument:e,container:t,initialFocus:n},r){let i=s.ref(null),a=s.ref(!1);return s.onMounted(()=>a.value=!0),s.onUnmounted(()=>a.value=!1),s.onMounted(()=>{s.watch([t,n,r],(o,l)=>{if(o.every((c,d)=>(l==null?void 0:l[d])===c)||!r.value)return;let u=J(t);!u||pl(()=>{var c,d;if(!a.value)return;let m=J(n),p=(c=e.value)==null?void 0:c.activeElement;if(m){if(m===p){i.value=p;return}}else if(u.contains(p)){i.value=p;return}m?Le(m):Ot(u,pe.First|pe.NoScroll)===Fr.Error&&console.warn("There are no focusable elements inside the "),i.value=(d=e.value)==null?void 0:d.activeElement})},{immediate:!0,flush:"post"})}),i}function gl({ownerDocument:e,container:t,containers:n,previousActiveElement:r},i){var a;qr((a=e.value)==null?void 0:a.defaultView,"focus",o=>{if(!i.value)return;let l=new Set(n==null?void 0:n.value);l.add(t);let u=r.value;if(!u)return;let c=o.target;c&&c instanceof HTMLElement?Lr(l,c)?(r.value=c,Le(c)):(o.preventDefault(),o.stopPropagation(),Le(u)):Le(r.value)},!0)}function Lr(e,t){var n;for(let r of e)if((n=r.value)!=null&&n.contains(t))return!0;return!1}let jr="body > *",je=new Set,he=new Map;function Mr(e){e.setAttribute("aria-hidden","true"),e.inert=!0}function Rr(e){let t=he.get(e);!t||(t["aria-hidden"]===null?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",t["aria-hidden"]),e.inert=t.inert)}function vl(e,t=s.ref(!0)){s.watchEffect(n=>{if(!t.value||!e.value)return;let r=e.value,i=De(r);if(i){je.add(r);for(let a of he.keys())a.contains(r)&&(Rr(a),he.delete(a));i.querySelectorAll(jr).forEach(a=>{if(a instanceof HTMLElement){for(let o of je)if(a.contains(o))return;je.size===1&&(he.set(a,{"aria-hidden":a.getAttribute("aria-hidden"),inert:a.inert}),Mr(a))}}),n(()=>{if(je.delete(r),je.size>0)i.querySelectorAll(jr).forEach(a=>{if(a instanceof HTMLElement&&!he.has(a)){for(let o of je)if(a.contains(o))return;he.set(a,{"aria-hidden":a.getAttribute("aria-hidden"),inert:a.inert}),Mr(a)}});else for(let a of he.keys())Rr(a),he.delete(a)})}})}let Nr=Symbol("ForcePortalRootContext");function yl(){return s.inject(Nr,!1)}let pn=s.defineComponent({name:"ForcePortalRoot",props:{as:{type:[Object,String],default:"template"},force:{type:Boolean,default:!1}},setup(e,{slots:t,attrs:n}){return s.provide(Nr,e.force),()=>{let{force:r,...i}=e;return R({theirProps:i,ourProps:{},slot:{},slots:t,attrs:n,name:"ForcePortalRoot"})}}});function bl(e){let t=De(e);if(!t){if(e===null)return null;throw new Error(`[Headless UI]: Cannot find ownerDocument for contextElement: ${e}`)}let n=t.getElementById("headlessui-portal-root");if(n)return n;let r=t.createElement("div");return r.setAttribute("id","headlessui-portal-root"),t.body.appendChild(r)}let Vr=s.defineComponent({name:"Portal",props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n}){let r=s.ref(null),i=s.computed(()=>De(r)),a=yl(),o=s.inject(Hr,null),l=s.ref(a===!0||o==null?bl(r.value):o.resolveTarget());return s.watchEffect(()=>{a||o!=null&&(l.value=o.resolveTarget())}),s.onUnmounted(()=>{var u,c;let d=(u=i.value)==null?void 0:u.getElementById("headlessui-portal-root");!d||l.value===d&&l.value.children.length<=0&&((c=l.value.parentElement)==null||c.removeChild(l.value))}),()=>{if(l.value===null)return null;let u={ref:r,"data-headlessui-portal":""};return s.h(s.Teleport,{to:l.value},R({ourProps:u,theirProps:e,slot:{},attrs:n,slots:t,name:"Portal"}))}}}),Hr=Symbol("PortalGroupContext"),wl=s.defineComponent({name:"PortalGroup",props:{as:{type:[Object,String],default:"template"},target:{type:Object,default:null}},setup(e,{attrs:t,slots:n}){let r=s.reactive({resolveTarget(){return e.target}});return s.provide(Hr,r),()=>{let{target:i,...a}=e;return R({theirProps:a,ourProps:{},slot:{},attrs:t,slots:n,name:"PortalGroup"})}}}),Ur=Symbol("StackContext");var hn=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(hn||{});function Sl(){return s.inject(Ur,()=>{})}function Ol({type:e,enabled:t,element:n,onUpdate:r}){let i=Sl();function a(...o){r==null||r(...o),i(...o)}s.onMounted(()=>{s.watch(t,(o,l)=>{o?a(0,e,n):l===!0&&a(1,e,n)},{immediate:!0,flush:"sync"})}),s.onUnmounted(()=>{t.value&&a(1,e,n)}),s.provide(Ur,a)}let Wr=Symbol("DescriptionContext");function $l(){let e=s.inject(Wr,null);if(e===null)throw new Error("Missing parent");return e}function El({slot:e=s.ref({}),name:t="Description",props:n={}}={}){let r=s.ref([]);function i(a){return r.value.push(a),()=>{let o=r.value.indexOf(a);o!==-1&&r.value.splice(o,1)}}return s.provide(Wr,{register:i,slot:e,name:t,props:n}),s.computed(()=>r.value.length>0?r.value.join(" "):void 0)}let Tl=s.defineComponent({name:"Description",props:{as:{type:[Object,String],default:"p"},id:{type:String,default:()=>`headlessui-description-${$e()}`}},setup(e,{attrs:t,slots:n}){let r=$l();return s.onMounted(()=>s.onUnmounted(r.register(e.id))),()=>{let{name:i="Description",slot:a=s.ref({}),props:o={}}=r,{id:l,...u}=e,c={...Object.entries(o).reduce((d,[m,p])=>Object.assign(d,{[m]:s.unref(p)}),{}),id:l};return R({ourProps:c,theirProps:u,slot:a.value,attrs:t,slots:n,name:i})}}});function mn(){let e=[],t=[],n={enqueue(r){t.push(r)},addEventListener(r,i,a,o){return r.addEventListener(i,a,o),n.add(()=>r.removeEventListener(i,a,o))},requestAnimationFrame(...r){let i=requestAnimationFrame(...r);n.add(()=>cancelAnimationFrame(i))},nextFrame(...r){n.requestAnimationFrame(()=>{n.requestAnimationFrame(...r)})},setTimeout(...r){let i=setTimeout(...r);n.add(()=>clearTimeout(i))},add(r){e.push(r)},dispose(){for(let r of e.splice(0))r()},async workQueue(){for(let r of t.splice(0))await r()}};return n}function xl(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}var _l=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(_l||{});let gn=Symbol("DialogContext");function rt(e){let t=s.inject(gn,null);if(t===null){let n=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,rt),n}return t}let Et="DC8F892D-2EBD-447C-A4C8-A03058436FF4",vn=s.defineComponent({name:"Dialog",inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},open:{type:[Boolean,String],default:Et},initialFocus:{type:Object,default:null},id:{type:String,default:()=>`headlessui-dialog-${$e()}`}},emits:{close:e=>!0},setup(e,{emit:t,attrs:n,slots:r,expose:i}){var a;let o=s.ref(!1);s.onMounted(()=>{o.value=!0});let l=s.ref(0),u=un(),c=s.computed(()=>e.open===Et&&u!==null?V(u.value,{[Ee.Open]:!0,[Ee.Closed]:!1}):e.open),d=s.ref(new Set),m=s.ref(null),p=s.ref(null),f=s.computed(()=>De(m));if(i({el:m,$el:m}),!(e.open!==Et||u!==null))throw new Error("You forgot to provide an `open` prop to the `Dialog`.");if(typeof c.value!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${c.value===Et?void 0:e.open}`);let h=s.computed(()=>o.value&&c.value?0:1),g=s.computed(()=>h.value===0),y=s.computed(()=>l.value>1),T=s.inject(gn,null)!==null,A=s.computed(()=>y.value?"parent":"leaf");vl(m,s.computed(()=>y.value?g.value:!1)),Ol({type:"Dialog",enabled:s.computed(()=>h.value===0),element:m,onUpdate:(w,O,$)=>{if(O==="Dialog")return V(w,{[hn.Add](){d.value.add($),l.value+=1},[hn.Remove](){d.value.delete($),l.value-=1}})}});let I=El({name:"DialogDescription",slot:s.computed(()=>({open:c.value}))}),E=s.ref(null),S={titleId:E,panelRef:s.ref(null),dialogState:h,setTitleId(w){E.value!==w&&(E.value=w)},close(){t("close",!1)}};s.provide(gn,S);function b(){var w,O,$;return[...Array.from((O=(w=f.value)==null?void 0:w.querySelectorAll("body > *, [data-headlessui-portal]"))!=null?O:[]).filter(x=>!(!(x instanceof HTMLElement)||x.contains(J(p))||S.panelRef.value&&x.contains(S.panelRef.value))),($=S.panelRef.value)!=null?$:m.value]}return cl(()=>b(),(w,O)=>{S.close(),s.nextTick(()=>O==null?void 0:O.focus())},s.computed(()=>h.value===0&&!y.value)),qr((a=f.value)==null?void 0:a.defaultView,"keydown",w=>{w.defaultPrevented||w.key===Cr.Escape&&h.value===0&&(y.value||(w.preventDefault(),w.stopPropagation(),S.close()))}),s.watchEffect(w=>{var O;if(h.value!==0||T)return;let $=f.value;if(!$)return;let x=mn(),_=window.pageYOffset;function F(L,P,j){let ye=L.style.getPropertyValue(P);return Object.assign(L.style,{[P]:j}),x.add(()=>{Object.assign(L.style,{[P]:ye})})}let B=$==null?void 0:$.documentElement,X=((O=$.defaultView)!=null?O:window).innerWidth-B.clientWidth;if(F(B,"overflow","hidden"),X>0){let L=B.clientWidth-B.offsetWidth,P=X-L;F(B,"paddingRight",`${P}px`)}if(xl()){F($.body,"marginTop",`-${_}px`),window.scrollTo(0,0);let L=null;x.addEventListener($,"click",P=>{if(P.target instanceof HTMLElement)try{let j=P.target.closest("a");if(!j)return;let{hash:ye}=new URL(j.href),Y=$.querySelector(ye);Y&&!b().some(Ge=>Ge.contains(Y))&&(L=Y)}catch{}},!0),x.addEventListener($,"touchmove",P=>{P.target instanceof HTMLElement&&!b().some(j=>j.contains(P.target))&&P.preventDefault()},{passive:!1}),x.add(()=>{window.scrollTo(0,window.pageYOffset+_),L&&L.isConnected&&(L.scrollIntoView({block:"nearest"}),L=null)})}w(x.dispose)}),s.watchEffect(w=>{if(h.value!==0)return;let O=J(m);if(!O)return;let $=new IntersectionObserver(x=>{for(let _ of x)_.boundingClientRect.x===0&&_.boundingClientRect.y===0&&_.boundingClientRect.width===0&&_.boundingClientRect.height===0&&S.close()});$.observe(O),w(()=>$.disconnect())}),()=>{let{id:w,open:O,initialFocus:$,...x}=e,_={...n,ref:m,id:w,role:"dialog","aria-modal":h.value===0?!0:void 0,"aria-labelledby":E.value,"aria-describedby":I.value},F={open:h.value===0};return s.h(pn,{force:!0},()=>[s.h(Vr,()=>s.h(wl,{target:m.value},()=>s.h(pn,{force:!1},()=>s.h(nt,{initialFocus:$,containers:d,features:g.value?V(A.value,{parent:nt.features.RestoreFocus,leaf:nt.features.All&~nt.features.FocusLock}):nt.features.None},()=>R({ourProps:_,theirProps:x,slot:F,attrs:n,slots:r,visible:h.value===0,features:wt.RenderStrategy|wt.Static,name:"Dialog"}))))),s.h(fn,{features:$t.Hidden,ref:p})])}}});s.defineComponent({name:"DialogOverlay",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:()=>`headlessui-dialog-overlay-${$e()}`}},setup(e,{attrs:t,slots:n}){let r=rt("DialogOverlay");function i(a){a.target===a.currentTarget&&(a.preventDefault(),a.stopPropagation(),r.close())}return()=>{let{id:a,...o}=e;return R({ourProps:{id:a,"aria-hidden":!0,onClick:i},theirProps:o,slot:{open:r.dialogState.value===0},attrs:t,slots:n,name:"DialogOverlay"})}}}),s.defineComponent({name:"DialogBackdrop",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:()=>`headlessui-dialog-backdrop-${$e()}`}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:r}){let i=rt("DialogBackdrop"),a=s.ref(null);return r({el:a,$el:a}),s.onMounted(()=>{if(i.panelRef.value===null)throw new Error("A component is being used, but a component is missing.")}),()=>{let{id:o,...l}=e,u={id:o,ref:a,"aria-hidden":!0};return s.h(pn,{force:!0},()=>s.h(Vr,()=>R({ourProps:u,theirProps:{...t,...l},slot:{open:i.dialogState.value===0},attrs:t,slots:n,name:"DialogBackdrop"})))}}});let yn=s.defineComponent({name:"DialogPanel",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:()=>`headlessui-dialog-panel-${$e()}`}},setup(e,{attrs:t,slots:n,expose:r}){let i=rt("DialogPanel");r({el:i.panelRef,$el:i.panelRef});function a(o){o.stopPropagation()}return()=>{let{id:o,...l}=e,u={id:o,ref:i.panelRef,onClick:a};return R({ourProps:u,theirProps:l,slot:{open:i.dialogState.value===0},attrs:t,slots:n,name:"DialogPanel"})}}});s.defineComponent({name:"DialogTitle",props:{as:{type:[Object,String],default:"h2"},id:{type:String,default:()=>`headlessui-dialog-title-${$e()}`}},setup(e,{attrs:t,slots:n}){let r=rt("DialogTitle");return s.onMounted(()=>{r.setTitleId(e.id),s.onUnmounted(()=>r.setTitleId(null))}),()=>{let{id:i,...a}=e;return R({ourProps:{id:i},theirProps:a,slot:{open:r.dialogState.value===0},attrs:t,slots:n,name:"DialogTitle"})}}});function Al(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function bn(e,...t){e&&t.length>0&&e.classList.add(...t)}function Tt(e,...t){e&&t.length>0&&e.classList.remove(...t)}var wn=(e=>(e.Finished="finished",e.Cancelled="cancelled",e))(wn||{});function Il(e,t){let n=mn();if(!e)return n.dispose;let{transitionDuration:r,transitionDelay:i}=getComputedStyle(e),[a,o]=[r,i].map(l=>{let[u=0]=l.split(",").filter(Boolean).map(c=>c.includes("ms")?parseFloat(c):parseFloat(c)*1e3).sort((c,d)=>d-c);return u});return a!==0?n.setTimeout(()=>t("finished"),a+o):t("finished"),n.add(()=>t("cancelled")),n.dispose}function zr(e,t,n,r,i,a){let o=mn(),l=a!==void 0?Al(a):()=>{};return Tt(e,...i),bn(e,...t,...n),o.nextFrame(()=>{Tt(e,...n),bn(e,...r),o.add(Il(e,u=>(Tt(e,...r,...t),bn(e,...i),l(u))))}),o.add(()=>Tt(e,...t,...n,...r,...i)),o.add(()=>l("cancelled")),o.dispose}function Te(e=""){return e.split(" ").filter(t=>t.trim().length>1)}let Sn=Symbol("TransitionContext");var Pl=(e=>(e.Visible="visible",e.Hidden="hidden",e))(Pl||{});function Cl(){return s.inject(Sn,null)!==null}function kl(){let e=s.inject(Sn,null);if(e===null)throw new Error("A is used but it is missing a parent .");return e}function Fl(){let e=s.inject(On,null);if(e===null)throw new Error("A is used but it is missing a parent .");return e}let On=Symbol("NestingContext");function xt(e){return"children"in e?xt(e.children):e.value.filter(({state:t})=>t==="visible").length>0}function Gr(e){let t=s.ref([]),n=s.ref(!1);s.onMounted(()=>n.value=!0),s.onUnmounted(()=>n.value=!1);function r(a,o=fe.Hidden){let l=t.value.findIndex(({id:u})=>u===a);l!==-1&&(V(o,{[fe.Unmount](){t.value.splice(l,1)},[fe.Hidden](){t.value[l].state="hidden"}}),!xt(t)&&n.value&&(e==null||e()))}function i(a){let o=t.value.find(({id:l})=>l===a);return o?o.state!=="visible"&&(o.state="visible"):t.value.push({id:a,state:"visible"}),()=>r(a,fe.Unmount)}return{children:t,register:i,unregister:r}}let Kr=wt.RenderStrategy,Me=s.defineComponent({props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},entered:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:t,attrs:n,slots:r,expose:i}){if(!Cl()&&nl())return()=>s.h(Re,{...e,onBeforeEnter:()=>t("beforeEnter"),onAfterEnter:()=>t("afterEnter"),onBeforeLeave:()=>t("beforeLeave"),onAfterLeave:()=>t("afterLeave")},r);let a=s.ref(null),o=s.ref("visible"),l=s.computed(()=>e.unmount?fe.Unmount:fe.Hidden);i({el:a,$el:a});let{show:u,appear:c}=kl(),{register:d,unregister:m}=Fl(),p={value:!0},f=$e(),h={value:!1},g=Gr(()=>{h.value||(o.value="hidden",m(f),t("afterLeave"))});s.onMounted(()=>{let O=d(f);s.onUnmounted(O)}),s.watchEffect(()=>{if(l.value===fe.Hidden&&!!f){if(u&&o.value!=="visible"){o.value="visible";return}V(o.value,{hidden:()=>m(f),visible:()=>d(f)})}});let y=Te(e.enter),T=Te(e.enterFrom),A=Te(e.enterTo),I=Te(e.entered),E=Te(e.leave),S=Te(e.leaveFrom),b=Te(e.leaveTo);s.onMounted(()=>{s.watchEffect(()=>{if(o.value==="visible"){let O=J(a);if(O instanceof Comment&&O.data==="")throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}})});function w(O){let $=p.value&&!c.value,x=J(a);!x||!(x instanceof HTMLElement)||$||(h.value=!0,u.value&&t("beforeEnter"),u.value||t("beforeLeave"),O(u.value?zr(x,y,T,A,I,_=>{h.value=!1,_===wn.Finished&&t("afterEnter")}):zr(x,E,S,b,I,_=>{h.value=!1,_===wn.Finished&&(xt(g)||(o.value="hidden",m(f),t("afterLeave")))})))}return s.onMounted(()=>{s.watch([u],(O,$,x)=>{w(x),p.value=!1},{immediate:!0})}),s.provide(On,g),rl(s.computed(()=>V(o.value,{visible:Ee.Open,hidden:Ee.Closed}))),()=>{let{appear:O,show:$,enter:x,enterFrom:_,enterTo:F,entered:B,leave:X,leaveFrom:L,leaveTo:P,...j}=e;return R({theirProps:j,ourProps:{ref:a},slot:{},slots:r,attrs:n,features:Kr,visible:o.value==="visible",name:"TransitionChild"})}}}),Bl=Me,Re=s.defineComponent({inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},entered:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:t,attrs:n,slots:r}){let i=un(),a=s.computed(()=>e.show===null&&i!==null?V(i.value,{[Ee.Open]:!0,[Ee.Closed]:!1}):e.show);s.watchEffect(()=>{if(![!0,!1].includes(a.value))throw new Error('A is used but it is missing a `:show="true | false"` prop.')});let o=s.ref(a.value?"visible":"hidden"),l=Gr(()=>{o.value="hidden"}),u=s.ref(!0),c={show:a,appear:s.computed(()=>e.appear||!u.value)};return s.onMounted(()=>{s.watchEffect(()=>{u.value=!1,a.value?o.value="visible":xt(l)||(o.value="hidden")})}),s.provide(On,l),s.provide(Sn,c),()=>{let d=Pr(e,["show","appear","unmount","onBeforeEnter","onBeforeLeave","onAfterEnter","onAfterLeave"]),m={unmount:e.unmount};return R({ourProps:{...m,as:"template"},theirProps:{},slot:{},slots:{...r,default:()=>[s.h(Bl,{onBeforeEnter:()=>t("beforeEnter"),onAfterEnter:()=>t("afterEnter"),onBeforeLeave:()=>t("beforeLeave"),onAfterLeave:()=>t("afterLeave"),...n,...m,...d},r.default)]},attrs:{},features:Kr,visible:o.value==="visible",name:"Transition"})}}});const ql={props:{defaultTitle:{type:String,required:!1,default:""},defaultText:{type:String,required:!1,default:""},defaultConfirmButton:{type:String,required:!1,default:""},defaultCancelButton:{type:String,required:!1,default:""}},data(){return{isOpen:!1}},computed:{hasConfirmModal:()=>!!v.confirmModal.value,title:function(){var e;return(e=v.confirmModal.value)!=null&&e.title?v.confirmModal.value.title:this.defaultTitle},text:function(){var e;return(e=v.confirmModal.value)!=null&&e.text?v.confirmModal.value.text:this.defaultText},confirmButton:function(){var e;return(e=v.confirmModal.value)!=null&&e.confirmButton?v.confirmModal.value.confirmButton:this.defaultConfirmButton},cancelButton:function(){var e;return(e=v.confirmModal.value)!=null&&e.cancelButton?v.confirmModal.value.cancelButton:this.defaultCancelButton}},watch:{hasConfirmModal(e){e&&(this.isOpen=!0)}},methods:{cancel(){v.confirmModal.value.rejectPromise(),this.setIsOpen(!1)},confirm(){v.confirmModal.value.resolvePromise(),this.setIsOpen(!1)},setIsOpen(e){this.isOpen=e},emitClose(){v.clearConfirmModal()}},render(){return this.$slots.default({title:this.title,text:this.text,confirmButton:this.confirmButton,cancelButton:this.cancelButton,isOpen:this.isOpen,setIsOpen:this.setIsOpen,cancel:this.cancel,confirm:this.confirm,emitClose:this.emitClose,Dialog:vn,DialogPanel:yn,TransitionRoot:Re,TransitionChild:Me})}};function Xr(e,t){t=sn(t,e);for(var n=0,r=t.length;e!=null&&n({}),required:!1},remember:{type:String,default:null,required:!1},localStorage:{type:Boolean,default:!1,required:!1}},data(){return{values:{}}},mounted(){if(this.remember){let e=v.restore(this.remember,this.localStorage);e||(e={}),this.values=Object.assign({},{...this.default,...e})}else this.values=Object.assign({},{...this.default})},updated(){this.remember&&v.remember(this.remember,{...this.values},this.localStorage)},render(){const e=this;return this.$slots.default(new Proxy(this.values,{ownKeys(){return Object.keys(e.values)},get(t,n){return Ne(e.values,n)},set(t,n,r){Jr(e.values,n,r)}}))}};var Vl=function(){return Q.Date.now()};const $n=Vl;var Hl=/\s/;function Ul(e){for(var t=e.length;t--&&Hl.test(e.charAt(t)););return t}var Wl=/^\s+/;function zl(e){return e&&e.slice(0,Ul(e)+1).replace(Wl,"")}var Zr=0/0,Gl=/^[-+]0x[0-9a-f]+$/i,Kl=/^0b[01]+$/i,Xl=/^0o[0-7]+$/i,Yl=parseInt;function En(e){if(typeof e=="number")return e;if(gt(e))return Zr;if(M(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=M(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=zl(e);var n=Kl.test(e);return n||Xl.test(e)?Yl(e.slice(2),n?2:8):Gl.test(e)?Zr:+e}var Ql="Expected a function",Jl=Math.max,Zl=Math.min;function Tn(e,t,n){var r,i,a,o,l,u,c=0,d=!1,m=!1,p=!0;if(typeof e!="function")throw new TypeError(Ql);t=En(t)||0,M(n)&&(d=!!n.leading,m="maxWait"in n,a=m?Jl(En(n.maxWait)||0,t):a,p="trailing"in n?!!n.trailing:p);function f(b){var w=r,O=i;return r=i=void 0,c=b,o=e.apply(O,w),o}function h(b){return c=b,l=setTimeout(T,t),d?f(b):o}function g(b){var w=b-u,O=b-c,$=t-w;return m?Zl($,a-O):$}function y(b){var w=b-u,O=b-c;return u===void 0||w>=t||w<0||m&&O>=a}function T(){var b=$n();if(y(b))return A(b);l=setTimeout(T,g(b))}function A(b){return l=void 0,p&&r?f(b):(r=i=void 0,o)}function I(){l!==void 0&&clearTimeout(l),c=0,r=u=i=l=void 0}function E(){return l===void 0?o:A($n())}function S(){var b=$n(),w=y(b);if(r=arguments,i=this,u=b,w){if(l===void 0)return h(u);if(m)return clearTimeout(l),l=setTimeout(T,t),f(u)}return l===void 0&&(l=setTimeout(T,t)),o}return S.cancel=I,S.flush=E,S}const eu={props:{url:{type:String,required:!0},method:{type:String,required:!1,default:"GET"},acceptHeader:{type:String,required:!1,default:"application/json"},poll:{type:Number,required:!1,default:null},default:{type:Object,required:!1,default:()=>({})},request:{type:Object,required:!1,default:()=>({})},manual:{type:Boolean,required:!1,default:!1},watchDebounce:{type:Number,required:!1,default:0},watchValue:{validator(){return!0},required:!1,default:null}},data(){return{response:Object.assign({},{...this.default}),processing:!1,debounceFunction:null}},watch:{watchValue:{deep:!0,handler(){this.processing=!0,this.watchDebounce?this.debounceFunction():this.performRequest()}}},mounted(){this.manual||this.$nextTick(this.performRequest)},created(){this.debounceFunction=Tn(()=>{this.performRequest()},this.watchDebounce)},methods:{performRequest(){this.processing=!0;const e={url:this.url,method:this.method,headers:{Accept:this.acceptHeader}};Object.keys(this.request).length>0&&(e.data=this.request),se.default(e).then(t=>{this.response=t.data,this.processing=!1}).catch(()=>{this.processing=!1}),this.poll&&setTimeout(()=>{this.performRequest()},this.poll)}},render(){return this.$slots.default({processing:this.processing,response:this.response,reload:this.performRequest})}},tu={data(){return{isActivated:!0}},deactivated(){this.isActivated=!1},activated(){this.isActivated=!0},render(){return this.$slots.default({Dialog:vn,DialogPanel:yn,isActivated:this.isActivated})}},ei={__name:"OnClickOutside",props:{do:{type:Function,required:!0},opened:{type:Boolean,required:!0},closeOnEscape:{type:Boolean,required:!1,default:!0},ignoreInnerTargets:{type:Boolean,required:!1,default:!1}},setup(e){const t=e,n=s.ref(null),r=s.ref(null),i=s.ref(null);return s.onMounted(()=>{n.value=a=>{r.value.children[0].contains(a.target)||t.ignoreInnerTargets&&r.value.contains(a.target)||t.do()},document.addEventListener("click",n.value),document.addEventListener("touchstart",n.value),t.closeOnEscape&&(i.value=a=>{t.opened&&a.key==="Escape"&&t.do()},document.addEventListener("keydown",i.value))}),s.onBeforeUnmount(()=>{document.removeEventListener("click",n.value),document.removeEventListener("touchstart",n.value),t.closeOnEscape&&document.removeEventListener("keydown",i.value)}),(a,o)=>(s.openBlock(),s.createElementBlock("div",{ref_key:"root",ref:r},[s.renderSlot(a.$slots,"default")],512))}};function H(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function xe(e){var t=H(e).Element;return e instanceof t||e instanceof Element}function U(e){var t=H(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function xn(e){if(typeof ShadowRoot>"u")return!1;var t=H(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}var _e=Math.max,_t=Math.min,Ve=Math.round;function _n(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function ti(){return!/^((?!chrome|android).)*safari/i.test(_n())}function He(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,a=1;t&&U(e)&&(i=e.offsetWidth>0&&Ve(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&Ve(r.height)/e.offsetHeight||1);var o=xe(e)?H(e):window,l=o.visualViewport,u=!ti()&&n,c=(r.left+(u&&l?l.offsetLeft:0))/i,d=(r.top+(u&&l?l.offsetTop:0))/a,m=r.width/i,p=r.height/a;return{width:m,height:p,top:d,right:c+m,bottom:d+p,left:c,x:c,y:d}}function An(e){var t=H(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function nu(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function ru(e){return e===H(e)||!U(e)?An(e):nu(e)}function Z(e){return e?(e.nodeName||"").toLowerCase():null}function me(e){return((xe(e)?e.ownerDocument:e.document)||window.document).documentElement}function In(e){return He(me(e)).left+An(e).scrollLeft}function G(e){return H(e).getComputedStyle(e)}function Pn(e){var t=G(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function iu(e){var t=e.getBoundingClientRect(),n=Ve(t.width)/e.offsetWidth||1,r=Ve(t.height)/e.offsetHeight||1;return n!==1||r!==1}function au(e,t,n){n===void 0&&(n=!1);var r=U(t),i=U(t)&&iu(t),a=me(t),o=He(e,i,n),l={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(r||!r&&!n)&&((Z(t)!=="body"||Pn(a))&&(l=ru(t)),U(t)?(u=He(t,!0),u.x+=t.clientLeft,u.y+=t.clientTop):a&&(u.x=In(a))),{x:o.left+l.scrollLeft-u.x,y:o.top+l.scrollTop-u.y,width:o.width,height:o.height}}function ni(e){var t=He(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function At(e){return Z(e)==="html"?e:e.assignedSlot||e.parentNode||(xn(e)?e.host:null)||me(e)}function ri(e){return["html","body","#document"].indexOf(Z(e))>=0?e.ownerDocument.body:U(e)&&Pn(e)?e:ri(At(e))}function it(e,t){var n;t===void 0&&(t=[]);var r=ri(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),a=H(r),o=i?[a].concat(a.visualViewport||[],Pn(r)?r:[]):r,l=t.concat(o);return i?l:l.concat(it(At(o)))}function ou(e){return["table","td","th"].indexOf(Z(e))>=0}function ii(e){return!U(e)||G(e).position==="fixed"?null:e.offsetParent}function su(e){var t=/firefox/i.test(_n()),n=/Trident/i.test(_n());if(n&&U(e)){var r=G(e);if(r.position==="fixed")return null}var i=At(e);for(xn(i)&&(i=i.host);U(i)&&["html","body"].indexOf(Z(i))<0;){var a=G(i);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||t&&a.willChange==="filter"||t&&a.filter&&a.filter!=="none")return i;i=i.parentNode}return null}function It(e){for(var t=H(e),n=ii(e);n&&ou(n)&&G(n).position==="static";)n=ii(n);return n&&(Z(n)==="html"||Z(n)==="body"&&G(n).position==="static")?t:n||su(e)||t}var K="top",ee="bottom",ge="right",ie="left",Pt="auto",Ct=[K,ee,ge,ie],Ue="start",at="end",lu="clippingParents",ai="viewport",ot="popper",uu="reference",oi=Ct.reduce(function(e,t){return e.concat([t+"-"+Ue,t+"-"+at])},[]),cu=[].concat(Ct,[Pt]).reduce(function(e,t){return e.concat([t,t+"-"+Ue,t+"-"+at])},[]),du="beforeRead",fu="read",pu="afterRead",hu="beforeMain",mu="main",gu="afterMain",vu="beforeWrite",yu="write",bu="afterWrite",Cn=[du,fu,pu,hu,mu,gu,vu,yu,bu];function wu(e){var t=new Map,n=new Set,r=[];e.forEach(function(a){t.set(a.name,a)});function i(a){n.add(a.name);var o=[].concat(a.requires||[],a.requiresIfExists||[]);o.forEach(function(l){if(!n.has(l)){var u=t.get(l);u&&i(u)}}),r.push(a)}return e.forEach(function(a){n.has(a.name)||i(a)}),r}function Su(e){var t=wu(e);return Cn.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function Ou(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function ve(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0,r=n&&U(e)?It(e):e;return xe(r)?t.filter(function(i){return xe(i)&&Iu(i,r)&&Z(i)!=="body"}):[]}function ku(e,t,n,r){var i=t==="clippingParents"?Cu(e):[].concat(t),a=[].concat(i,[n]),o=a[0],l=a.reduce(function(u,c){var d=li(e,c,r);return u.top=_e(d.top,u.top),u.right=_t(d.right,u.right),u.bottom=_t(d.bottom,u.bottom),u.left=_e(d.left,u.left),u},li(e,o,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function We(e){return e.split("-")[1]}function ui(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ci(e){var t=e.reference,n=e.element,r=e.placement,i=r?ae(r):null,a=r?We(r):null,o=t.x+t.width/2-n.width/2,l=t.y+t.height/2-n.height/2,u;switch(i){case K:u={x:o,y:t.y-n.height};break;case ee:u={x:o,y:t.y+t.height};break;case ge:u={x:t.x+t.width,y:l};break;case ie:u={x:t.x-n.width,y:l};break;default:u={x:t.x,y:t.y}}var c=i?ui(i):null;if(c!=null){var d=c==="y"?"height":"width";switch(a){case Ue:u[c]=u[c]-(t[d]/2-n[d]/2);break;case at:u[c]=u[c]+(t[d]/2-n[d]/2);break}}return u}function di(){return{top:0,right:0,bottom:0,left:0}}function Fu(e){return Object.assign({},di(),e)}function Bu(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}function Fn(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,a=n.strategy,o=a===void 0?e.strategy:a,l=n.boundary,u=l===void 0?lu:l,c=n.rootBoundary,d=c===void 0?ai:c,m=n.elementContext,p=m===void 0?ot:m,f=n.altBoundary,h=f===void 0?!1:f,g=n.padding,y=g===void 0?0:g,T=Fu(typeof y!="number"?y:Bu(y,Ct)),A=p===ot?uu:ot,I=e.rects.popper,E=e.elements[h?A:p],S=ku(xe(E)?E:E.contextElement||me(e.elements.popper),u,d,o),b=He(e.elements.reference),w=ci({reference:b,element:I,strategy:"absolute",placement:i}),O=kn(Object.assign({},I,w)),$=p===ot?O:b,x={top:S.top-$.top+T.top,bottom:$.bottom-S.bottom+T.bottom,left:S.left-$.left+T.left,right:$.right-S.right+T.right},_=e.modifiersData.offset;if(p===ot&&_){var F=_[i];Object.keys(x).forEach(function(B){var X=[ge,ee].indexOf(B)>=0?1:-1,L=[K,ee].indexOf(B)>=0?"y":"x";x[B]+=F[L]*X})}return x}var fi="Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.",qu="Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.",pi={placement:"bottom",modifiers:[],strategy:"absolute"};function hi(){for(var e=arguments.length,t=new Array(e),n=0;n100)){console.error(qu);break}if(d.reset===!0){d.reset=!1,S=-1;continue}var b=d.orderedModifiers[S],w=b.fn,O=b.options,$=O===void 0?{}:O,x=b.name;typeof w=="function"&&(d=w({state:d,options:$,name:x,instance:f})||d)}}},update:Ou(function(){return new Promise(function(y){f.forceUpdate(),y(d)})}),destroy:function(){g(),p=!0}};if(!hi(l,u))return process.env.NODE_ENV!=="production"&&console.error(fi),f;f.setOptions(c).then(function(y){!p&&c.onFirstUpdate&&c.onFirstUpdate(y)});function h(){d.orderedModifiers.forEach(function(y){var T=y.name,A=y.options,I=A===void 0?{}:A,E=y.effect;if(typeof E=="function"){var S=E({state:d,name:T,instance:f,options:I}),b=function(){};m.push(S||b)}})}function g(){m.forEach(function(y){return y()}),m=[]}return f}}var kt={passive:!0};function Lu(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,a=i===void 0?!0:i,o=r.resize,l=o===void 0?!0:o,u=H(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&c.forEach(function(d){d.addEventListener("scroll",n.update,kt)}),l&&u.addEventListener("resize",n.update,kt),function(){a&&c.forEach(function(d){d.removeEventListener("scroll",n.update,kt)}),l&&u.removeEventListener("resize",n.update,kt)}}const ju={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Lu,data:{}};function Mu(e){var t=e.state,n=e.name;t.modifiersData[n]=ci({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Ru={name:"popperOffsets",enabled:!0,phase:"read",fn:Mu,data:{}};var Nu={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Vu(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:Ve(t*i)/i||0,y:Ve(n*i)/i||0}}function mi(e){var t,n=e.popper,r=e.popperRect,i=e.placement,a=e.variation,o=e.offsets,l=e.position,u=e.gpuAcceleration,c=e.adaptive,d=e.roundOffsets,m=e.isFixed,p=o.x,f=p===void 0?0:p,h=o.y,g=h===void 0?0:h,y=typeof d=="function"?d({x:f,y:g}):{x:f,y:g};f=y.x,g=y.y;var T=o.hasOwnProperty("x"),A=o.hasOwnProperty("y"),I=ie,E=K,S=window;if(c){var b=It(n),w="clientHeight",O="clientWidth";if(b===H(n)&&(b=me(n),G(b).position!=="static"&&l==="absolute"&&(w="scrollHeight",O="scrollWidth")),b=b,i===K||(i===ie||i===ge)&&a===at){E=ee;var $=m&&b===S&&S.visualViewport?S.visualViewport.height:b[w];g-=$-r.height,g*=u?1:-1}if(i===ie||(i===K||i===ee)&&a===at){I=ge;var x=m&&b===S&&S.visualViewport?S.visualViewport.width:b[O];f-=x-r.width,f*=u?1:-1}}var _=Object.assign({position:l},c&&Nu),F=d===!0?Vu({x:f,y:g}):{x:f,y:g};if(f=F.x,g=F.y,u){var B;return Object.assign({},_,(B={},B[E]=A?"0":"",B[I]=T?"0":"",B.transform=(S.devicePixelRatio||1)<=1?"translate("+f+"px, "+g+"px)":"translate3d("+f+"px, "+g+"px, 0)",B))}return Object.assign({},_,(t={},t[E]=A?g+"px":"",t[I]=T?f+"px":"",t.transform="",t))}function Hu(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,a=n.adaptive,o=a===void 0?!0:a,l=n.roundOffsets,u=l===void 0?!0:l;if(process.env.NODE_ENV!=="production"){var c=G(t.elements.popper).transitionProperty||"";o&&["transform","top","right","bottom","left"].some(function(m){return c.indexOf(m)>=0})&&console.warn(["Popper: Detected CSS transitions on at least one of the following",'CSS properties: "transform", "top", "right", "bottom", "left".',` `,'Disable the "computeStyles" modifier\'s `adaptive` option to allow',"for smooth transitions, or remove these properties from the CSS","transition declaration on the popper element if only transitioning","opacity or background-color for example.",` -`,"We recommend using the popper element as a wrapper around an inner","element that can have any CSS property transitioned for animations."].join(" "))}var f={placement:ie(t.placement),variation:Ne(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,pi(Object.assign({},f,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:u})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,pi(Object.assign({},f,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Vu={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Nu,data:{}};function Hu(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},a=t.elements[n];!U(a)||!J(a)||(Object.assign(a.style,r),Object.keys(i).forEach(function(o){var l=i[o];l===!1?a.removeAttribute(o):a.setAttribute(o,l===!0?"":l)}))})}function Uu(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],a=t.attributes[r]||{},o=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),l=o.reduce(function(u,c){return u[c]="",u},{});!U(i)||!J(i)||(Object.assign(i.style,l),Object.keys(a).forEach(function(u){i.removeAttribute(u)}))})}}var zu=[Du,Lu,Vu,{name:"applyStyles",enabled:!0,phase:"write",fn:Hu,effect:Uu,requires:["computeStyles"]}],Wu=Bu({defaultModifiers:zu});function Gu(e){return e==="x"?"y":"x"}function At(e,t,n){return Ee(e,Ot(t,n))}function Ku(e,t,n){var r=At(e,t,n);return r>n?n:r}function Xu(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,a=i===void 0?!0:i,o=n.altAxis,l=o===void 0?!1:o,u=n.boundary,c=n.rootBoundary,f=n.altBoundary,h=n.padding,d=n.tether,p=d===void 0?!0:d,m=n.tetherOffset,b=m===void 0?0:m,v=Fn(t,{boundary:u,rootBoundary:c,padding:h,altBoundary:f}),T=ie(t.placement),A=Ne(t.placement),I=!A,E=si(T),O=Gu(E),y=t.modifiersData.popperOffsets,w=t.rects.reference,S=t.rects.popper,x=typeof b=="function"?b(Object.assign({},t.rects,{placement:t.placement})):b,_=typeof x=="number"?{mainAxis:x,altAxis:x}:Object.assign({mainAxis:0,altAxis:0},x),$=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,C={x:0,y:0};if(!!y){if(a){var q,D=E==="y"?K:re,M=E==="y"?Y:he,j=E==="y"?"height":"width",L=y[E],kt=L+v[D],Ae=L-v[M],Bt=p?-S[j]/2:0,Vn=A===Re?w[j]:S[j],at=A===Re?-S[j]:-w[j],qt=t.elements.arrow,He=p&&qt?ei(qt):{width:0,height:0},ge=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:ui(),ot=ge[D],Dt=ge[M],Ie=At(0,w[j],He[j]),Hn=I?w[j]/2-Bt-Ie-ot-_.mainAxis:Vn-Ie-ot-_.mainAxis,wd=I?-w[j]/2+Bt+Ie+Dt+_.mainAxis:at+Ie+Dt+_.mainAxis,Un=t.elements.arrow&&Et(t.elements.arrow),Sd=Un?E==="y"?Un.clientTop||0:Un.clientLeft||0:0,Ni=(q=$==null?void 0:$[E])!=null?q:0,Od=L+Hn-Ni-Sd,$d=L+wd-Ni,Vi=At(p?Ot(kt,Od):kt,L,p?Ee(Ae,$d):Ae);y[E]=Vi,C[E]=Vi-L}if(l){var Hi,Ed=E==="x"?K:re,xd=E==="x"?Y:he,Pe=y[O],jt=O==="y"?"height":"width",Ui=Pe+v[Ed],zi=Pe-v[xd],zn=[K,re].indexOf(T)!==-1,Wi=(Hi=$==null?void 0:$[O])!=null?Hi:0,Gi=zn?Ui:Pe-w[jt]-S[jt]-Wi+_.altAxis,Ki=zn?Pe+w[jt]+S[jt]-Wi-_.altAxis:zi,Xi=p&&zn?Ku(Gi,Pe,Ki):At(p?Gi:Ui,Pe,p?Ki:zi);y[O]=Xi,C[O]=Xi-Pe}t.modifiersData[r]=C}}const Qu={name:"preventOverflow",enabled:!0,phase:"main",fn:Xu,requiresIfExists:["offset"]};var Ju={left:"right",right:"left",bottom:"top",top:"bottom"};function It(e){return e.replace(/left|right|bottom|top/g,function(t){return Ju[t]})}var Yu={start:"end",end:"start"};function hi(e){return e.replace(/start|end/g,function(t){return Yu[t]})}function Zu(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,a=n.rootBoundary,o=n.padding,l=n.flipVariations,u=n.allowedAutoPlacements,c=u===void 0?lu:u,f=Ne(r),h=f?l?ii:ii.filter(function(m){return Ne(m)===f}):Tt,d=h.filter(function(m){return c.indexOf(m)>=0});d.length===0&&(d=h,process.env.NODE_ENV!=="production"&&console.error(["Popper: The `allowedAutoPlacements` option did not allow any","placements. Ensure the `placement` option matches the variation","of the allowed placements.",'For example, "auto" cannot be used to allow "bottom-start".','Use "auto-start" instead.'].join(" ")));var p=d.reduce(function(m,b){return m[b]=Fn(e,{placement:b,boundary:i,rootBoundary:a,padding:o})[ie(b)],m},{});return Object.keys(p).sort(function(m,b){return p[m]-p[b]})}function ec(e){if(ie(e)===xt)return[];var t=It(e);return[hi(e),t,hi(t)]}function tc(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,a=i===void 0?!0:i,o=n.altAxis,l=o===void 0?!0:o,u=n.fallbackPlacements,c=n.padding,f=n.boundary,h=n.rootBoundary,d=n.altBoundary,p=n.flipVariations,m=p===void 0?!0:p,b=n.allowedAutoPlacements,v=t.options.placement,T=ie(v),A=T===v,I=u||(A||!m?[It(v)]:ec(v)),E=[v].concat(I).reduce(function(He,ge){return He.concat(ie(ge)===xt?Zu(t,{placement:ge,boundary:f,rootBoundary:h,padding:c,flipVariations:m,allowedAutoPlacements:b}):ge)},[]),O=t.rects.reference,y=t.rects.popper,w=new Map,S=!0,x=E[0],_=0;_=0,M=D?"width":"height",j=Fn(t,{placement:$,boundary:f,rootBoundary:h,altBoundary:d,padding:c}),L=D?q?he:re:q?Y:K;O[M]>y[M]&&(L=It(L));var kt=It(L),Ae=[];if(a&&Ae.push(j[C]<=0),l&&Ae.push(j[L]<=0,j[kt]<=0),Ae.every(function(He){return He})){x=$,S=!1;break}w.set($,Ae)}if(S)for(var Bt=m?3:1,Vn=function(ge){var ot=E.find(function(Dt){var Ie=w.get(Dt);if(Ie)return Ie.slice(0,ge).every(function(Hn){return Hn})});if(ot)return x=ot,"break"},at=Bt;at>0;at--){var qt=Vn(at);if(qt==="break")break}t.placement!==x&&(t.modifiersData[r]._skip=!0,t.placement=x,t.reset=!0)}}const nc={name:"flip",enabled:!0,phase:"main",fn:tc,requiresIfExists:["offset"],data:{_skip:!1}},Te=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n},rc={components:{OnClickOutside:Yr},props:{spladeId:{type:String,required:!0},placement:{type:String,default:"bottom-start",required:!1},strategy:{type:String,default:"absolute",required:!1},inline:{type:Boolean,default:!1,required:!1},disabled:{type:Boolean,default:!1,required:!1},teleport:{type:Boolean,default:!1,required:!1},closeOnClick:{type:Boolean,default:!1,required:!1}},data(){return{opened:!1,popper:null}},computed:{buttonStyle(){return this.inline?{display:"inline"}:{}},wrapperStyle(){const e={position:"relative"};return this.inline&&(e.display="inline"),e}},watch:{opened(){this.popper.update()}},mounted:async function(){this.teleport&&await s.nextTick();const e=this.teleport?document.querySelector(`div[data-splade-dropdown-id="${this.spladeId}"]`):this.$refs.tooltip.children[0];this.popper=Wu(this.$refs.button,e,{placement:this.placement,modifiers:[nc,Qu],strategy:this.strategy})},methods:{toggle(){this.opened=!this.opened},hide(){this.opened=!1}}},ic={ref:"tooltip"};function ac(e,t,n,r,i,a){const o=s.resolveComponent("OnClickOutside");return s.openBlock(),s.createBlock(o,{style:s.normalizeStyle(a.wrapperStyle),do:a.hide,opened:i.opened,"ignore-inner-targets":!n.closeOnClick},{default:s.withCtx(()=>[s.createElementVNode("div",{ref:"button",style:s.normalizeStyle(a.buttonStyle)},[s.renderSlot(e.$slots,"button",{toggle:a.toggle,disabled:n.disabled})],4),s.createElementVNode("div",ic,[s.renderSlot(e.$slots,"default",{hide:a.hide,opened:i.opened})],512)]),_:3},8,["style","do","opened","ignore-inner-targets"])}const oc=Te(rc,[["render",ac]]),sc={__name:"DynamicHtml",props:{keepAliveKey:{type:String,required:!0},name:{type:String,required:!0}},setup(e){const t=s.inject("$splade")||{},n=s.inject("$spladeOptions")||{};return(r,i)=>s.unref(t).isSsr?(s.openBlock(),s.createBlock(Z,{key:e.keepAliveKey,html:s.unref(t).htmlForDynamicComponent(e.name)},null,8,["html"])):(s.openBlock(),s.createBlock(s.KeepAlive,{key:0,max:s.unref(n).max_keep_alive},[(s.openBlock(),s.createBlock(Z,{key:e.keepAliveKey,html:s.unref(t).htmlForDynamicComponent(e.name)},null,8,["html"]))],1032,["max"]))}};function mi(e){return e&&e.length?e[0]:void 0}const lc={inject:["stack"],computed:{values(){return g.validationErrors(this.stack)}},render(){const e=this;return this.$slots.default({has(t){return V(e.values,t)},first(t){return mi(e.values[t]||[])},all:{...this.values},...this.values})}},uc={props:{private:{type:Boolean,required:!1,default:!1},channel:{type:String,required:!0},listeners:{type:Array,required:!0}},data(){return{subscribed:!1,subscription:null,subscriptions:[],events:[]}},beforeUnmount(){this.subscription&&(window.Echo.leave(this.subscription.subscription.name),this.subscription=null,this.subscriptions=[])},mounted(){this.subscription=this.private?window.Echo.private(this.channel):window.Echo.channel(this.channel),this.subscription.on("pusher:subscription_succeeded",()=>{this.subscribed=!0}),this.listeners.forEach(e=>{const t=this.subscription.listen(e,n=>{const r="splade.redirect",i="splade.refresh",a="splade.toast";let o=null,l=!1,u=[];z(n,c=>{!R(c)||(r in c&&(o=c[r]),i in c&&(l=c[i]),a in c&&u.push(c))}),o?g.visit(o):l?g.refresh():this.events.push({name:e,data:n}),u.length>0&&u.forEach(c=>{g.pushToast(c)}),this.$root.$emit(`event.${e}`,n)});this.subscriptions.push(t)})},render(){return this.$slots.default({subscribed:this.subscribed,events:this.events})}};function cc(){this.__data__=new ee,this.size=0}function fc(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function dc(e){return this.__data__.get(e)}function pc(e){return this.__data__.has(e)}var hc=200;function mc(e,t){var n=this.__data__;if(n instanceof ee){var r=n.__data__;if(!Ke||r.lengthl))return!1;var c=a.get(e),f=a.get(t);if(c&&f)return c==t&&f==e;var h=-1,d=!0,p=n&Oc?new Pt:void 0;for(a.set(e,t),a.set(t,e);++h-1?i[a?t[o]:o]:void 0}}function xf(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a({})},placeholder:{type:String,required:!1,default:""},preview:{type:Boolean,required:!1,default:!1},server:{type:[Boolean,String],required:!1,default:!1},accept:{type:Array,required:!1,default:()=>[]},minFileSize:{type:[Boolean,Number,String],required:!1,default:!1},maxFileSize:{type:[Boolean,Number,String],required:!1,default:!1},minImageWidth:{type:[Boolean,Number],required:!1,default:!1},maxImageWidth:{type:[Boolean,Number],required:!1,default:!1},minImageHeight:{type:[Boolean,Number],required:!1,default:!1},maxImageHeight:{type:[Boolean,Number],required:!1,default:!1},minImageResolution:{type:[Boolean,Number],required:!1,default:!1},maxImageResolution:{type:[Boolean,Number],required:!1,default:!1},existingSuffix:{type:String,required:!1,default:"_existing"},orderSuffix:{type:String,required:!1,default:"_order"},dusk:{type:String,required:!1,default:null}},emits:["start-uploading","stop-uploading"],data(){return{inputElement:null,filepondInstance:null,filenames:[],uploadedFiles:[],hadExistingFiles:!1}},computed:{existingField(){return this.field+this.existingSuffix},orderField(){return this.field+this.orderSuffix},handlesExistingFiles(){return this.existingSuffix&&this.hadExistingFiles}},mounted(){this.inputElement=this.$refs.file.querySelector('input[type="file"]');const e=this.form[this.field];this.hadExistingFiles=this.multiple&&e.length>0||!this.multiple&&e,this.form.$put(this.field,this.multiple?[]:null),this.filepond&&(this.setExisting(e),this.initFilepond(e||[]).then(()=>{this.form.$registerFilepond(this.field,this.addFileToFilepond,this.addFilesToFilepond)}))},methods:{extractMetadataFromExistingFile(e){return e?ke(e)?e:B(e)?e.map(this.extractMetadataFromExistingFile):R(e)?e.options.metadata.metadata:null:null},setExisting(e){!this.handlesExistingFiles||(this.form.$put(this.existingField,this.extractMetadataFromExistingFile(e)),this.setOrder())},setOrder(){if(!this.multiple||!this.handlesExistingFiles||!this.filepondInstance)return;const t=this.filepondInstance.getFiles().filter(r=>!r.getMetadata("identifier")),n=this.filepondInstance.getFiles().map(r=>{const i=r.getMetadata("identifier");return i?"existing-file-"+i:"new-file-"+t.indexOf(r)});this.form.$put(this.orderField,n)},addFileToFilepond(e){e&&this.filepondInstance.addFile(e)},addFilesToFilepond(e){e.forEach(t=>this.addFileToFilepond(t))},loadFilepondPlugins(){const e=[];return this.preview&&(e.push(import("filepond-plugin-image-preview")),e.push(import("filepond-plugin-image-exif-orientation"))),this.accept.length>0&&e.push(import("filepond-plugin-file-validate-type")),(this.minFileSize||this.maxFileSize)&&e.push(import("filepond-plugin-file-validate-size")),(this.minImageWidth||this.maxImageWidth||this.minImageHeight||this.maxImageHeight||this.minImageResolution||this.maxImageResolution)&&e.push(import("filepond-plugin-image-validate-size")),Promise.all(e)},initFilepond(e){const t=this.inputElement.getAttribute("name"),n=this;return new Promise(r=>{import("filepond").then(i=>{const a=Object.assign({},n.filepond,n.jsFilepondOptions,{oninit(){const o=setInterval(()=>{if(n.filepondInstance.status<2)clearInterval(o);else return;n.setOrder();const l=n.filepondInstance.element.querySelector('input[type="file"]');l.hasAttribute("name")||l.setAttribute("name",t),n.dusk&&n.filepondInstance.element.setAttribute("dusk",n.dusk),n.multiple&&n.filepondInstance.element.addEventListener("moveFile",function(u){n.filepondInstance.moveFile(u.detail[0],u.detail[1]),n.setOrder()}),r()},15)},onaddfile(o,l){o||l.origin!==i.FileOrigin.LOCAL&&(n.server?n.$emit("start-uploading",[l.id]):n.addFiles([l.file]),n.setOrder())},onremovefile(o,l){o||(n.handlesExistingFiles&&(n.multiple?n.setExisting(n.form[n.existingField].filter(u=>l.getMetadata("metadata")!==u)):n.setExisting(null)),n.removeFile(l.file))},onprocessfile(o,l){o||(n.uploadedFiles.push({file:l.file,id:l.serverId}),n.addFiles([l.serverId]),n.$emit("stop-uploading",[l.id]))},onreorderfiles(){n.setOrder()}});this.hadExistingFiles&&(a.files=this.multiple?e:[e]),this.accept.length>0&&(a.acceptedFileTypes=this.accept),this.minFileSize&&(a.minFileSize=this.minFileSize),this.maxFileSize&&(a.maxFileSize=this.maxFileSize),this.minImageWidth&&(a.imageValidateSizeMinWidth=this.minImageWidth),this.maxImageWidth&&(a.imageValidateSizeMaxWidth=this.maxImageWidth),this.minImageHeight&&(a.imageValidateSizeMinHeight=this.minImageHeight),this.maxImageHeight&&(a.imageValidateSizeMaxHeight=this.maxImageHeight),this.minImageResolution&&(a.imageValidateSizeMinResolution=this.minImageResolution),this.maxImageResolution&&(a.imageValidateSizeMaxResolution=this.maxImageResolution),a.server={load:(o,l,u,c,f)=>{const d=oe.default.CancelToken.source();return oe.default({url:o.preview_url,method:"GET",cancelToken:d.token,responseType:"blob"}).then(p=>{const m=new File([p.data],o.name,{type:o.type});l(m)}).catch(function(p){axios.isCancel(p)||u(p)}),{abort:()=>{d.cancel(),f()}}}},this.server&&(a.server.process=(o,l,u,c,f,h,d)=>{const p=new FormData;p.append("file",l,l.name);const b=oe.default.CancelToken.source();oe.default({url:n.server,method:"POST",data:p,cancelToken:b.token,onUploadProgress:v=>{h(v.lengthComputable,v.loaded,v.total)}}).then(v=>{v.status>=200&&v.status<300?c(v.data):f(v.statusText)}).catch(function(v){var T;axios.isCancel(v)?d():f((T=v.response)==null?void 0:T.statusText)})},a.server.revert=(o,l,u)=>{oe.default({url:n.server,method:"POST",data:{_method:"DELETE",file:o}}).then(()=>{l()}).catch(function(c){var f;u((f=c.response)==null?void 0:f.statusText)})}),this.loadFilepondPlugins(i).then(o=>{o.length>0&&i.registerPlugin(...o.map(l=>l.default)),this.filepondInstance=i.create(this.inputElement,a)})})})},removeFile(e){this.server&&(e=Mn(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){const t=this.form[this.field];e.forEach(n=>{t.push(n)}),this.form.$put(this.field,t)}else this.form.$put(this.field,e[0]),this.setExisting(null);this.filepond||this.updateFilenames()},updateFilenames(){this.filenames=[];const e=this.form[this.field];this.multiple?e.forEach(t=>{this.filenames.push(t.name)}):e&&this.filenames.push(e.name)},handleFileInput(e){this.form.$put(this.field,this.multiple?[]:null);const t=Object.values(e.target.files);this.addFiles(t)}}},Ff={ref:"file"};function kf(e,t,n,r,i,a){return s.openBlock(),s.createElementBlock("div",Ff,[s.renderSlot(e.$slots,"default",{handleFileInput:a.handleFileInput,filenames:i.filenames})],512)}const Bf=Te(Cf,[["render",kf]]),qf={inject:["stack"],computed:{values(){return g.flashData(this.stack)}},render(){const e=this;return this.$slots.default({has(t){return V(e.values,t)},...this.values})}};function Rn(e,t,n){e=e||{},t=t||new FormData,n=n||null;for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&qi(t,Bi(n,r),e[r]);return t}function Bi(e,t){return e?e+"["+t+"]":t}function qi(e,t,n){if(Array.isArray(n))return Array.from(n.keys()).forEach(r=>qi(e,Bi(t,r.toString()),n[r]));if(n instanceof Date)return e.append(t,n.toISOString());if(n instanceof File)return e.append(t,n,n.name);if(n instanceof Blob)return e.append(t,n);if(typeof n=="boolean")return e.append(t,n?"1":"0");if(typeof n=="string")return e.append(t,n);if(typeof n=="number")return e.append(t,`${n}`);if(n==null)return e.append(t,"");Rn(n,e,t)}var Df="[object Boolean]";function Di(e){return e===!0||e===!1||ue(e)&&le(e)==Df}function ji(e,t){var n={};return t=it(t),Vt(e,function(r,i,a){Xr(n,i,t(r,i,a))}),n}function Li(e,t,n){return e===e&&(n!==void 0&&(e=e<=n?e:n),t!==void 0&&(e=e>=t?e:t)),e}function Ve(e,t,n){return e=nn(e),n=n==null?0:Li(Ln(n),0,e.length),t=mt(t),e.slice(n,n+t.length)==t}const jf={inject:["stack"],props:{spladeId:{type:String,required:!0,default:""},action:{type:String,required:!1,default(){return g.isSsr?"":location.href}},method:{type:String,required:!1,default:"POST"},default:{type:Object,required:!1,default:()=>({})},confirm:{type:[Boolean,String],required:!1,default:!1},confirmText:{type:String,required:!1,default:""},confirmButton:{type:String,required:!1,default:""},cancelButton:{type:String,required:!1,default:""},stay:{type:Boolean,require:!1,default:!1},restoreOnSuccess:{type:Boolean,required:!1,default:!0},resetOnSuccess:{type:Boolean,required:!1,default:!1},scrollOnError:{type:Boolean,required:!1,default:!0},submitOnChange:{type:[Boolean,Array],required:!1,default:!1},escapeValidationMessages:{type:Boolean,required:!1,default:!0}},emits:["success","error"],data(){return{isMounted:!1,missingAttributes:[],values:Object.assign({},{...this.default}),processing:!1,wasSuccessful:!1,recentlySuccessful:!1,recentlySuccessfulTimeoutId:null,formElement:null,elementsUploading:[],fileponds:{}}},computed:{$all(){return this.values},$uploading(){return this.elementsUploading.length>0},rawErrors(){return g.validationErrors(this.stack)},errors(){return ji(this.rawErrors,e=>e.join(` -`))}},mounted(){let e=document.querySelector(`form[data-splade-id="${this.spladeId}"]`);e||(e=document),this.formElement=e,this.missingAttributes.forEach(n=>{let r="";const i=e.querySelector(`[name="${n}"]`);i?r=i.type==="checkbox"?!1:"":e.querySelector(`[name="${n}[]"]`)?r=[]:(e.querySelector(`[name^="${n}."]`)||e.querySelector(`[name^="${n}["]`))&&(r={}),this.$put(n,r)}),this.missingAttributes=[],this.submitOnChange===!0?this.$watch("values",()=>{this.$nextTick(()=>this.request())},{deep:!0}):B(this.submitOnChange)&&this.submitOnChange.forEach(n=>{this.$watch(`values.${n}`,()=>{this.$nextTick(()=>this.request())},{deep:!0})}),this.isMounted=!0;const t=this.formElement.querySelector("[autofocus]");t&&this.focusAndScrollToElement(t)},methods:{$startUploading(e){this.elementsUploading.push(e[0])},$stopUploading(e){this.elementsUploading=this.elementsUploading.filter(t=>t!=e[0])},hasError(e){return e in this.errors},$registerFilepond(e,t,n){this.fileponds[e]={addFile:t,addFiles:n}},$addFile(e,t){if(!this.fileponds[e])return console.log("Filepond instance not found");this.fileponds[e].addFile(t)},$addFiles(e,t){if(!this.fileponds[e])return console.log("Filepond instance not found");this.fileponds[e].addFiles(t)},$errorAttributes(e){return{[this.escapeValidationMessages?"textContent":"innerHTML"]:this.errors[e]}},reset(){this.values={}},restore(){this.values=Object.assign({},{...this.default})},$put(e,t){return Qr(this.values,e,t)},focusAndScrollToElement(e){let t=!0;if(e._flatpickr&&(t=!1),e.tagName==="SELECT"&&e.getAttribute("data-choice")&&(t=!1),t){const n=new IntersectionObserver(r=>{let[i]=r;i.isIntersecting&&(setTimeout(()=>i.target.focus(),150),n.disconnect())});n.observe(e)}e.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})},submit(e){if(!this.$uploading){if(e){const t=e.submitter;t&&t.name&&this.$put(t.name,t.value)}if(!this.confirm)return this.request();g.confirm(Di(this.confirm)?"":this.confirm,this.confirmText,this.confirmButton,this.cancelButton).then(()=>{this.request()}).catch(()=>{})}},async request(){if(this.$uploading)return;await this.$nextTick(),this.processing=!0,this.wasSuccessful=!1,this.recentlySuccessful=!1,clearTimeout(this.recentlySuccessfulTimeoutId);const e=this.values instanceof FormData?this.values:Rn(this.values),t={Accept:"application/json"};this.stay&&(t["X-Splade-Prevent-Refresh"]=!0);let n=this.method.toUpperCase();n!=="GET"&&n!=="POST"&&(e.append("_method",n),n="POST"),g.request(this.action,n,e,t).then(r=>{this.$emit("success",r),this.restoreOnSuccess&&this.restore(),this.resetOnSuccess&&this.reset(),this.processing=!1,this.wasSuccessful=!0,this.recentlySuccessful=!0,this.recentlySuccessfulTimeoutId=setTimeout(()=>this.recentlySuccessful=!1,2e3)}).catch(async r=>{if(this.processing=!1,this.$emit("error",r),!this.scrollOnError)return;await this.$nextTick();const i=Mn(Object.keys(this.errors),a=>this.formElement.querySelector(`[data-validation-key="${a}"]`));i&&this.focusAndScrollToElement(this.formElement.querySelector(`[data-validation-key="${i}"]`))})}},render(){const e=this;return this.$slots.default(new Proxy({},{ownKeys(){return Object.keys(e.values)},get(t,n){return["$all","$attrs","$put","$startUploading","$stopUploading","$processing","$uploading","$errorAttributes","$registerFilepond","$addFile","$addFiles","errors","restore","reset","hasError","processing","rawErrors","submit","wasSuccessful","recentlySuccessful"].includes(n)||Ve(n,"__v_")?e[n]:(!e.isMounted&&!V(e.values,n)&&(e.missingAttributes.push(n),e.$put(n,"")),et(e.values,n))},set(t,n,r){return e.$put(n,r)}}))}},Lf={props:{flatpickr:{type:[Boolean,Object],required:!1,default:!1},jsFlatpickrOptions:{type:Object,required:!1,default:()=>({})},modelValue:{type:[String,Number],required:!1}},emits:["update:modelValue"],data(){return{disabled:!1,element:null,flatpickrInstance:null,observer:null}},watch:{modelValue(e){this.flatpickrInstance&&this.flatpickrInstance.setDate(e)}},mounted(){this.element=this.$refs.input.querySelector("input"),this.flatpickr&&this.initFlatpickr(this.element),this.disabled=this.element.disabled;const e=this;this.observer=new MutationObserver(function(t){t.forEach(function(n){n.attributeName==="disabled"&&(e.disabled=n.target.disabled)})}),this.observer.observe(this.element,{attributes:!0})},beforeUnmount(){this.observer.disconnect(),this.flatpickrInstance&&this.flatpickrInstance.destroy()},methods:{initFlatpickr(e){import("flatpickr").then(t=>{this.flatpickrInstance=t.default(e,Object.assign({},this.flatpickr,this.jsFlatpickrOptions,{onChange:(n,r)=>{this.flatpickrInstance.config.mode==="range"&&this.flatpickrInstance.selectedDates.length<2||r!=this.modelValue&&this.$emit("update:modelValue",r)}})),this.modelValue&&this.flatpickrInstance.setDate(this.modelValue)})}}},Mf={ref:"input"};function Rf(e,t,n,r,i,a){return s.openBlock(),s.createElementBlock("div",Mf,[s.renderSlot(e.$slots,"default",{disabled:i.disabled})],512)}const Nf=Te(Lf,[["render",Rf]]),Vf={components:{Render:Z},props:{name:{type:String,required:!0},url:{type:String,required:!1,default(){return g.isSsr?"":window.location.href}},show:{type:Boolean,required:!1,default:!0}},data(){return{html:null}},watch:{show(e){e?this.request():this.html=null}},mounted(){this.show&&this.request()},methods:{async request(){this.html=null,g.lazy(this.url,this.name).then(e=>{this.html=e.data.html})}}};function Hf(e,t,n,r,i,a){const o=s.resolveComponent("Render");return i.html?(s.openBlock(),s.createBlock(o,{key:0,html:i.html},null,8,["html"])):n.show?s.renderSlot(e.$slots,"default",{key:1}):s.createCommentVNode("",!0)}const Uf=Te(Vf,[["render",Hf]]),zf=["href","onClick"],Wf={__name:"Link",props:{href:{type:String,required:!1,default:"#"},method:{type:String,required:!1,default:"GET"},data:{type:Object,required:!1,default:()=>({})},headers:{type:Object,required:!1,default:()=>({Accept:"application/json"})},replace:{type:Boolean,required:!1,default:!1},confirm:{type:[Boolean,String],required:!1,default:!1},confirmText:{type:String,required:!1,default:""},confirmButton:{type:String,required:!1,default:""},cancelButton:{type:String,required:!1,default:""},modal:{type:Boolean,required:!1,default:!1},slideover:{type:Boolean,required:!1,default:!1},away:{type:Boolean,required:!1,default:!1}},setup(e){const t=e;function n(){if(!t.confirm)return r();g.confirm(Di(t.confirm)?"":t.confirm,t.confirmText,t.confirmButton,t.cancelButton).then(()=>{r()}).catch(()=>{})}function r(){if(t.away)return window.location=t.href;if(t.modal)return g.modal(t.href);if(t.slideover)return g.slideover(t.href);if(Ve(t.href,"#")){if(g.openPreloadedModal(t.href.substring(1)))return;console.log("No preloaded modal found for "+t.href)}let i=t.method.trim().toUpperCase();if(i==="GET")return t.replace?g.replace(t.href):g.visit(t.href);const a=t.data instanceof FormData?t.data:Rn(t.data);i!=="POST"&&(a.append("_method",i),i="POST"),g.request(t.href,i,a,t.headers,t.replace)}return(i,a)=>(s.openBlock(),s.createElementBlock("a",{href:e.href,onClick:s.withModifiers(n,["prevent"])},[s.renderSlot(i.$slots,"default")],8,zf))}},Gf={provide(){return{stack:this.stack}},props:{closeButton:{type:Boolean,required:!1,default:!0},type:{type:String,required:!0},stack:{type:Number,required:!0},onTopOfStack:{type:Boolean,required:!1,default:!1},maxWidth:{type:String,required:!1,default:e=>e.type==="modal"?"2xl":"md"},name:{type:String,required:!1,default:null}},emits:["close"],data(){return{isOpen:!1}},mounted(){this.setIsOpen(!0)},methods:{emitClose(){this.$emit("close")},close(){this.setIsOpen(!1)},setIsOpen(e){this.isOpen=e}},render(){return this.$slots.default({type:this.type,isOpen:this.isOpen,setIsOpen:this.setIsOpen,close:this.close,stack:this.stack,onTopOfStack:this.onTopOfStack,maxWidth:this.maxWidth,emitClose:this.emitClose,closeButton:this.closeButton,Dialog:gn,DialogPanel:vn,TransitionRoot:je,TransitionChild:De})}},Kf={__name:"PreloadedModal",props:{name:{type:String,required:!0},html:{type:String,required:!0},type:{type:String,required:!1,default:"modal"}},setup(e){const t=e;return g.registerPreloadedModal(t.name,t.html,t.type),()=>{}}};function Xf(e,t){var n=-1,r=st(e)?Array(e.length):[];return Ht(e,function(i,a,o){r[++n]=t(i,a,o)}),r}function Mi(e,t){var n=B(e)?Er:Xf;return n(e,it(t))}const Qf={inject:["stack"],props:{choices:{type:[Boolean,Object],required:!1,default:!1},jsChoicesOptions:{type:Object,required:!1,default:()=>({})},multiple:{type:Boolean,required:!1,default:!1},modelValue:{type:[String,Number,Array],required:!1},placeholder:{type:[Boolean,Object],required:!1,default:!1},dusk:{type:String,required:!1,default:null},remoteUrl:{type:String,required:!1,default:null},optionValue:{type:String,required:!1,default:null},optionLabel:{type:String,required:!1,default:null}},emits:["update:modelValue"],data(){return{choicesInstance:null,element:null,placeholderText:null,headlessListener:null,selectChangeListener:null,selectShowDropdownListener:null,loading:!1}},computed:{hasSelection(){return this.multiple?Array.isArray(this.modelValue)?this.modelValue.length>0:!1:!(this.modelValue===null||this.modelValue===""||this.modelValue===void 0)}},watch:{modelValue(e,t){if(!this.choicesInstance&&this.multiple&&B(e)){const n=e.filter(r=>r!==""&&r!==null&&r!==void 0);if(JSON.stringify(n)!=JSON.stringify(e)){this.$emit("update:modelValue",n);return}}if(this.choicesInstance){if(JSON.stringify(e)==JSON.stringify(t))return;this.setValueOnChoices(e)}},remoteUrl:{handler(){this.loadRemoteOptions()}}},mounted(){if(this.element=this.$refs.select.querySelector("select"),this.choices)return this.initChoices(this.element).then(()=>{this.loadRemoteOptions()});this.loadRemoteOptions()},beforeUnmount(){this.destroyChoicesInstance()},methods:{loadRemoteOptions(){!this.remoteUrl||(this.loading=!0,oe.default({url:this.remoteUrl,method:"GET",headers:{Accept:"application/json"}}).then(e=>{this.destroyChoicesInstance();let t=[];this.placeholder&&t.push(this.placeholder),t=this.normalizeOptions(e.data,t);var n,r=this.element.options.length-1;for(n=r;n>=0;n--)this.element.remove(n);let i=!1;if(z(t,a=>{var o=document.createElement("option");o.value=a.value,o.text=a.label,a.value===this.modelValue&&(i=!0),a.disabled&&(o.disabled=a.disabled),a.placeholder&&(o.placeholder=a.placeholder),this.element.appendChild(o)}),i||this.$emit("update:modelValue",this.multiple?[]:""),this.choices)return this.initChoices(this.element).then(()=>{this.loading=!1});i?this.element.value=this.modelValue:this.$nextTick(()=>{this.element.selectedIndex=0}),this.loading=!1}).catch(()=>{this.loading=!1}))},destroyChoicesInstance(){var e;this.choices&&this.choicesInstance&&(this.headlessListener&&((e=document.querySelector("#headlessui-portal-root"))==null||e.removeEventListener("click",this.headlessListener)),this.selectChangeListener&&this.element.removeEventListener("change",this.selectChangeListener),this.selectShowDropdownListener&&this.element.removeEventListener("showDropdown",this.selectShowDropdownListener),this.choicesInstance.destroy(),this.choicesInstance=null)},normalizeOptions(e,t){const n=B(e);return!n&&R(e)?this.optionValue&&this.optionLabel?t.push({value:et(e,this.optionValue),label:et(e,this.optionLabel)}):z(e,(r,i)=>{t.push({label:r,value:i})}):n&&e.forEach(r=>{this.normalizeOptions(r,t)}),t},setValueOnChoices(e){Array.isArray(e)&&(e=Mi(e,t=>`${t}`),this.choicesInstance.removeActiveItems()),e==null?e="":Array.isArray(e)||(e=`${e}`),this.choicesInstance.setChoiceByValue(e),this.updateHasSelectionAttribute(),this.handlePlaceholderVisibility()},getItemOfCurrentModel(){const e=this.modelValue;return Mn(this.choicesInstance._store.choices,t=>t.value==e)},handlePlaceholderVisibility(){if(!this.multiple)return;const e=this.choicesInstance.containerInner.element.querySelector("input.choices__input");this.placeholderText=e.placeholder?e.placeholder:this.placeholderText;const t=this.choicesInstance.getValue().length;e.placeholder=t?"":this.placeholderText?this.placeholderText:"",e.style.minWidth="0",e.style.width=t?"1px":"auto",e.style.paddingTop=t?"0px":"1px",e.style.paddingBottom=t?"0px":"1px"},initChoices(e){return new Promise(t=>{const n=Array.from(e.querySelectorAll("option:not([placeholder])")).length,r=this;import("choices.js").then(i=>{const a=Object.assign({},this.choices,this.jsChoicesOptions,{callbackOnInit:function(){const o=this;r.stack>0&&(r.headlessListener=function(l){const u=r.choicesInstance.dropdown.isActive;!u&&l.target===e?r.choicesInstance.showDropdown():u&&l.target!==e&&r.choicesInstance.hideDropdown()},document.querySelector("#headlessui-portal-root").addEventListener("click",r.headlessListener,{capture:!0})),o.containerInner.element.setAttribute("data-select-name",e.name),e.hasAttribute("dusk")&&e.removeAttribute("dusk"),r.dusk&&(o.containerInner.element.setAttribute("dusk",r.dusk),o.choiceList.element.setAttribute("dusk",`${r.dusk}-listbox`)),r.selectChangeListener=function(){let l=o.getValue(!0);if(l==null&&(l=""),r.$emit("update:modelValue",l),!r.multiple||n<1)return;o.getValue().length>=n&&o.hideDropdown()},e.addEventListener("change",r.selectChangeListener),o.containerInner.element.addEventListener("hideDropdownFromDusk",function(){o.hideDropdown()}),r.selectShowDropdownListener=function(){if(r.multiple||!r.modelValue)return;const l=r.getItemOfCurrentModel(),u=o.dropdown.element.querySelector(`.choices__item[data-id="${l.id}"]`);o.choiceList.scrollToChildElement(u,1),o._highlightChoice(u)},e.addEventListener("showDropdown",r.selectShowDropdownListener),r.choicesInstance=o,r.setValueOnChoices(r.modelValue),t()}});new i.default(e,a)})})},updateHasSelectionAttribute(){this.choicesInstance.containerInner.element.setAttribute("data-has-selection",this.hasSelection)}}},Jf={ref:"select"};function Yf(e,t,n,r,i,a){return s.openBlock(),s.createElementBlock("div",Jf,[s.renderSlot(e.$slots,"default",{loading:i.loading})],512)}const Zf=Te(Qf,[["render",Yf]]),ed={inject:["stack"],render(){const e=g.validationErrors(this.stack),t=g.flashData(this.stack),n=g.sharedData.value,r=ji(e,i=>i.join(` -`));return this.$slots.default({flash:t,errors:r,rawErrors:e,shared:n,hasError(i){return i in e},hasFlash(i){return V(t,i)},hasShared(i){return V(n,i)},hasErrors:Object.keys(e).length>0})}};function td(e,t,n){e=nn(e),t=mt(t);var r=e.length;n=n===void 0?r:Li(Ln(n),0,r);var i=n;return n-=t.length,n>=0&&e.slice(n,i)==t}function nd(e,t){var n=[];return Ht(e,function(r,i,a){t(r,i,a)&&n.push(r)}),n}function rd(e,t){var n=B(e)?bi:nd;return n(e,it(t))}function Ri(e,t){return Ft(e,t)}const id={props:{striped:{type:Boolean,required:!1,default:!1},columns:{type:Object,required:!0},defaultVisibleToggleableColumns:{type:Array,required:!0},searchDebounce:{type:Number,required:!1,default:350},itemsOnThisPage:{type:Number,required:!1,default:0},itemsOnAllPages:{type:Number,required:!1,default:0}},data(){return{selectedItems:[],visibleColumns:[],forcedVisibleSearchInputs:[],debounceUpdateQuery:null,isLoading:!1,processingAction:!1}},computed:{columnsAreToggled(){return!Ri(this.visibleColumns,this.defaultVisibleToggleableColumns)},hasForcedVisibleSearchInputs(){return this.forcedVisibleSearchInputs.length>0},allItemsFromAllPagesAreSelected(){return this.selectedItems.length===1&&this.selectedItems[0]==="*"},allVisibleItemsAreSelected(){const e=this.selectedItems.length;return e===1&&this.selectedItems[0]==="*"||e>0&&e===this.itemsOnThisPage},hasSelectedItems(){return this.selectedItems.length>0},totalSelectedItems(){const e=this.selectedItems.length;return e===1&&this.selectedItems[0]==="*"?this.itemsOnAllPages:e}},created(){this.debounceUpdateQuery=En(function(e,t,n){this.updateQuery(e,t,n)},this.searchDebounce)},mounted(){const e=this.getCurrentQuery(),t=e.columns||[];z(e,(n,r)=>{if(Ve(r,"filter[")&&!n){const i=r.split("["),a=i[1].substring(0,i[1].length-1);this.forcedVisibleSearchInputs=[...this.forcedVisibleSearchInputs,a]}}),t.length===0?this.visibleColumns=this.defaultVisibleToggleableColumns:this.visibleColumns=t},methods:{visitLink(e,t,n){var r,i;if(!(((r=n==null?void 0:n.target)==null?void 0:r.tagName)==="A"||((i=n==null?void 0:n.target)==null?void 0:i.tagName)==="BUTTON"))return t==="modal"?g.modal(e):t==="slideover"?g.slideover(e):g.visit(e)},reset(){this.forcedVisibleSearchInputs=[],this.visibleColumns=this.defaultVisibleToggleableColumns;let e=this.getCurrentQuery();e.columns=[],e.page=null,e.perPage=null,e.sort=null,z(e,(t,n)=>{Ve(n,"filter[")&&(e[n]=null)}),this.visitWithQueryObject(e,null,!0)},columnIsVisible(e){return this.visibleColumns.includes(e)},toggleColumn(e){const t=!this.columnIsVisible(e),n=rd(this.columns,i=>i.can_be_hidden?i.key===e?t:this.visibleColumns.includes(i.key):!0);let r=Mi(n,i=>i.key).sort();Ri(r,this.defaultVisibleToggleableColumns)&&(r=[]),this.visibleColumns=r.length===0?this.defaultVisibleToggleableColumns:r,this.updateQuery("columns",r,null,!1)},disableSearchInput(e){this.forcedVisibleSearchInputs=this.forcedVisibleSearchInputs.filter(t=>t!=e),this.updateQuery(`filter[${e}]`,null)},showSearchInput(e){this.forcedVisibleSearchInputs=[...this.forcedVisibleSearchInputs,e],s.nextTick(()=>{document.querySelector(`[name="searchInput-${e}"]`).focus()})},isForcedVisible(e){return this.forcedVisibleSearchInputs.includes(e)},getCurrentQuery(){const e=window.location.search;if(!e)return{};let t={};return e.substring(1).split("&").forEach(n=>{const r=decodeURIComponent(n).split("=");let i=r[0];if(!td(i,"]")){t[i]=r[1];return}const a=i.split("["),o=a[1].substring(0,a[1].length-1);parseInt(o)==o?(i=a[0],B(t[i])||(t[i]=[]),t[i].push(r[1])):t[i]=r[1]}),t},updateQuery(e,t,n,r){typeof r>"u"&&(r=!0);let i=this.getCurrentQuery();i[e]=t,(Ve(e,"perPage")||Ve(e,"filter["))&&delete i.page,this.visitWithQueryObject(i,n,r)},visitWithQueryObject(e,t,n){var l;typeof n>"u"&&(n=!0);let r={};z(e,(u,c)=>{if(!B(u)){r[c]=u;return}u.length!==0&&u.forEach((f,h)=>{r[`${c}[${h}]`]=f})});let i="";z(r,(u,c)=>{u===null||u===[]||(i&&(i+="&"),i+=`${c}=${u}`)}),i&&(i="?"+i);const a=window.location.pathname+i;if(!n)return g.replaceUrlOfCurrentPage(a);this.isLoading=!0;let o=null;typeof t<"u"&&t&&(o=(l=document.querySelector(`[name="${t.name}"]`))==null?void 0:l.value),g.replace(a).then(()=>{this.isLoading=!1,typeof t<"u"&&t&&s.nextTick(()=>{const u=document.querySelector(`[name="${t.name}"]`);u.focus(),o&&(u.value=o)})})},async performBulkAction(e,t,n,r,i){if(t)try{await g.confirm(t===!0?"":t,n,r,i)}catch{return!1}this.isLoading=!0,g.request(e,"POST",{ids:this.selectedItems},{},!1).then(a=>{a.data}).catch(()=>{this.isLoading=!1})},setSelectedItems(e){this.selectedItems=B(e)?e:[]},itemIsSelected(e){return this.selectedItems.length==1&&this.selectedItems[0]=="*"?!0:this.selectedItems.includes(e)},setSelectedItem(e,t){t?this.selectedItems.push(e):this.selectedItems=this.selectedItems.filter(n=>n!==e)}},render(){return this.$slots.default({columnIsVisible:this.columnIsVisible,columnsAreToggled:this.columnsAreToggled,debounceUpdateQuery:this.debounceUpdateQuery,disableSearchInput:this.disableSearchInput,hasForcedVisibleSearchInputs:this.hasForcedVisibleSearchInputs,isForcedVisible:this.isForcedVisible,reset:this.reset,showSearchInput:this.showSearchInput,striped:this.striped,toggleColumn:this.toggleColumn,updateQuery:this.updateQuery,visit:this.visitLink,totalSelectedItems:this.totalSelectedItems,allItemsFromAllPagesAreSelected:this.allItemsFromAllPagesAreSelected,allVisibleItemsAreSelected:this.allVisibleItemsAreSelected,hasSelectedItems:this.hasSelectedItems,setSelectedItems:this.setSelectedItems,itemIsSelected:this.itemIsSelected,setSelectedItem:this.setSelectedItem,performBulkAction:this.performBulkAction,processingAction:this.processingAction,isLoading:this.isLoading})}},ad={inheritAttrs:!1,data(){return{isMounted:!1,Teleport:s.Teleport}},mounted(){this.isMounted=!0}};function od(e,t,n,r,i,a){return s.withDirectives((s.openBlock(),s.createBlock(s.resolveDynamicComponent(i.isMounted?i.Teleport:"div"),s.normalizeProps(s.guardReactiveProps(e.$attrs)),{default:s.withCtx(()=>[s.renderSlot(e.$slots,"default")]),_:3},16)),[[s.vShow,i.isMounted]])}const sd=Te(ad,[["render",od]]),ld={props:{autosize:{type:Boolean,required:!1,default:!1},modelValue:{type:[String,Number],required:!1}},data(){return{autosizeInstance:null,element:null}},watch:{modelValue(){!this.autosize||!this.autosizeInstance||import("autosize").then(e=>{s.nextTick(()=>e.default.update(this.element))})}},mounted(){this.element=this.$refs.textarea.querySelector("textarea"),this.autosize&&import("autosize").then(e=>{this.autosizeInstance=e.default(this.element)})},beforeUnmount(){this.autosize&&this.autosizeInstance&&import("autosize").then(e=>{e.default.destroy(this.element)})}},ud={ref:"textarea"};function cd(e,t,n,r,i,a){return s.openBlock(),s.createElementBlock("div",ud,[s.renderSlot(e.$slots,"default")],512)}const fd=Te(ld,[["render",cd]]),dd={props:{toastKey:{type:Number,required:!0},autoDismiss:{type:Number,required:!1,default:0}},emits:["dismiss"],data(){return{show:!0}},mounted(){this.autoDismiss&&setTimeout(()=>{this.setShow(!1)},this.autoDismiss*1e3)},methods:{setShow(e){this.show=e},emitDismiss(){this.$emit("dismiss")}},render(){return this.$slots.default({key:this.toastKey,show:this.show,setShow:this.setShow,emitDismiss:this.emitDismiss,TransitionRoot:je,TransitionChild:De})}},pd=["left-top","center-top","right-top","left-center","center-center","right-center","left-bottom","center-bottom","right-bottom"],hd={computed:{toasts:function(){return g.toastsReversed.value},hasBackdrop:function(){return g.toasts.value.filter(e=>!e.dismissed&&e.backdrop&&e.html).length>0}},methods:{dismissToast(e){g.dismissToast(e)}},render(){return this.$slots.default({positions:pd,toasts:this.toasts,dismissToast:this.dismissToast,hasBackdrop:this.hasBackdrop,Render:Z,TransitionRoot:je,TransitionChild:De})}},md={props:{default:{type:Object,required:!0}},data(){return{toggles:{...this.default}}},methods:{toggled(e){var t;return(t=this.toggles[e])!=null?t:!1},toggle(e){this.setToggle(e,!this.toggled(e))},setToggle(e,t){this.toggles[e]=t}},render(){const e=this;return this.$slots.default(new Proxy({},{ownKeys(){return Object.keys(e.toggles)},get(t,n){const r=Object.keys(e.toggles);if(r.length===1&&mi(r)==="default"){if(n==="toggled")return e.toggled("default");if(n==="setToggle")return i=>{e.setToggle("default",i)};if(n==="toggle")return()=>{e.toggle("default")}}return n==="setToggle"?(i,a)=>{e.setToggle(i,a)}:n==="toggle"?i=>{e.toggle(i)}:e.toggled(n)}}))}},gd={render(){return this.$slots.default({TransitionRoot:je,TransitionChild:De})}},vd={created:(e,t)=>{if(g.isSsr)return;const n=`preserveScroll-${t.arg}`,r=g.restore(n);r&&s.nextTick(()=>{typeof e.scrollTo=="function"?e.scrollTo(r.left,r.top):(e.scrollTop=r.top,e.scrollLeft=r.left)});const i=function(){g.remember(n,{top:e.scrollTop,left:e.scrollLeft})};e.addEventListener("scroll",En(i,100)),i()}},Nn={injectCSS(e){const t=document.createElement("style");t.type="text/css",t.textContent=` +`,"We recommend using the popper element as a wrapper around an inner","element that can have any CSS property transitioned for animations."].join(" "))}var d={placement:ae(t.placement),variation:We(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,mi(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:u})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,mi(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Uu={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Hu,data:{}};function Wu(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},a=t.elements[n];!U(a)||!Z(a)||(Object.assign(a.style,r),Object.keys(i).forEach(function(o){var l=i[o];l===!1?a.removeAttribute(o):a.setAttribute(o,l===!0?"":l)}))})}function zu(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],a=t.attributes[r]||{},o=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),l=o.reduce(function(u,c){return u[c]="",u},{});!U(i)||!Z(i)||(Object.assign(i.style,l),Object.keys(a).forEach(function(u){i.removeAttribute(u)}))})}}var Gu=[ju,Ru,Uu,{name:"applyStyles",enabled:!0,phase:"write",fn:Wu,effect:zu,requires:["computeStyles"]}],Ku=Du({defaultModifiers:Gu});function Xu(e){return e==="x"?"y":"x"}function Ft(e,t,n){return _e(e,_t(t,n))}function Yu(e,t,n){var r=Ft(e,t,n);return r>n?n:r}function Qu(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,a=i===void 0?!0:i,o=n.altAxis,l=o===void 0?!1:o,u=n.boundary,c=n.rootBoundary,d=n.altBoundary,m=n.padding,p=n.tether,f=p===void 0?!0:p,h=n.tetherOffset,g=h===void 0?0:h,y=Fn(t,{boundary:u,rootBoundary:c,padding:m,altBoundary:d}),T=ae(t.placement),A=We(t.placement),I=!A,E=ui(T),S=Xu(E),b=t.modifiersData.popperOffsets,w=t.rects.reference,O=t.rects.popper,$=typeof g=="function"?g(Object.assign({},t.rects,{placement:t.placement})):g,x=typeof $=="number"?{mainAxis:$,altAxis:$}:Object.assign({mainAxis:0,altAxis:0},$),_=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,F={x:0,y:0};if(!!b){if(a){var B,X=E==="y"?K:ie,L=E==="y"?ee:ge,P=E==="y"?"height":"width",j=b[E],ye=j+y[X],Y=j-y[L],Ge=f?-O[P]/2:0,Hn=A===Ue?w[P]:O[P],lt=A===Ue?-O[P]:-w[P],jt=t.elements.arrow,Ke=f&&jt?ni(jt):{width:0,height:0},be=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:di(),ut=be[X],Mt=be[L],Ce=Ft(0,w[P],Ke[P]),Un=I?w[P]/2-Ge-Ce-ut-x.mainAxis:Hn-Ce-ut-x.mainAxis,Of=I?-w[P]/2+Ge+Ce+Mt+x.mainAxis:lt+Ce+Mt+x.mainAxis,Wn=t.elements.arrow&&It(t.elements.arrow),$f=Wn?E==="y"?Wn.clientTop||0:Wn.clientLeft||0:0,Hi=(B=_==null?void 0:_[E])!=null?B:0,Ef=j+Un-Hi-$f,Tf=j+Of-Hi,Ui=Ft(f?_t(ye,Ef):ye,j,f?_e(Y,Tf):Y);b[E]=Ui,F[E]=Ui-j}if(l){var Wi,xf=E==="x"?K:ie,_f=E==="x"?ee:ge,ke=b[S],Rt=S==="y"?"height":"width",zi=ke+y[xf],Gi=ke-y[_f],zn=[K,ie].indexOf(T)!==-1,Ki=(Wi=_==null?void 0:_[S])!=null?Wi:0,Xi=zn?zi:ke-w[Rt]-O[Rt]-Ki+x.altAxis,Yi=zn?ke+w[Rt]+O[Rt]-Ki-x.altAxis:Gi,Qi=f&&zn?Yu(Xi,ke,Yi):Ft(f?Xi:zi,ke,f?Yi:Gi);b[S]=Qi,F[S]=Qi-ke}t.modifiersData[r]=F}}const Ju={name:"preventOverflow",enabled:!0,phase:"main",fn:Qu,requiresIfExists:["offset"]};var Zu={left:"right",right:"left",bottom:"top",top:"bottom"};function Bt(e){return e.replace(/left|right|bottom|top/g,function(t){return Zu[t]})}var ec={start:"end",end:"start"};function gi(e){return e.replace(/start|end/g,function(t){return ec[t]})}function tc(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,a=n.rootBoundary,o=n.padding,l=n.flipVariations,u=n.allowedAutoPlacements,c=u===void 0?cu:u,d=We(r),m=d?l?oi:oi.filter(function(h){return We(h)===d}):Ct,p=m.filter(function(h){return c.indexOf(h)>=0});p.length===0&&(p=m,process.env.NODE_ENV!=="production"&&console.error(["Popper: The `allowedAutoPlacements` option did not allow any","placements. Ensure the `placement` option matches the variation","of the allowed placements.",'For example, "auto" cannot be used to allow "bottom-start".','Use "auto-start" instead.'].join(" ")));var f=p.reduce(function(h,g){return h[g]=Fn(e,{placement:g,boundary:i,rootBoundary:a,padding:o})[ae(g)],h},{});return Object.keys(f).sort(function(h,g){return f[h]-f[g]})}function nc(e){if(ae(e)===Pt)return[];var t=Bt(e);return[gi(e),t,gi(t)]}function rc(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,a=i===void 0?!0:i,o=n.altAxis,l=o===void 0?!0:o,u=n.fallbackPlacements,c=n.padding,d=n.boundary,m=n.rootBoundary,p=n.altBoundary,f=n.flipVariations,h=f===void 0?!0:f,g=n.allowedAutoPlacements,y=t.options.placement,T=ae(y),A=T===y,I=u||(A||!h?[Bt(y)]:nc(y)),E=[y].concat(I).reduce(function(Ke,be){return Ke.concat(ae(be)===Pt?tc(t,{placement:be,boundary:d,rootBoundary:m,padding:c,flipVariations:h,allowedAutoPlacements:g}):be)},[]),S=t.rects.reference,b=t.rects.popper,w=new Map,O=!0,$=E[0],x=0;x=0,L=X?"width":"height",P=Fn(t,{placement:_,boundary:d,rootBoundary:m,altBoundary:p,padding:c}),j=X?B?ge:ie:B?ee:K;S[L]>b[L]&&(j=Bt(j));var ye=Bt(j),Y=[];if(a&&Y.push(P[F]<=0),l&&Y.push(P[j]<=0,P[ye]<=0),Y.every(function(Ke){return Ke})){$=_,O=!1;break}w.set(_,Y)}if(O)for(var Ge=h?3:1,Hn=function(be){var ut=E.find(function(Mt){var Ce=w.get(Mt);if(Ce)return Ce.slice(0,be).every(function(Un){return Un})});if(ut)return $=ut,"break"},lt=Ge;lt>0;lt--){var jt=Hn(lt);if(jt==="break")break}t.placement!==$&&(t.modifiersData[r]._skip=!0,t.placement=$,t.reset=!0)}}const ic={name:"flip",enabled:!0,phase:"main",fn:rc,requiresIfExists:["offset"],data:{_skip:!1}},Ie=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n},ac={components:{OnClickOutside:ei},props:{spladeId:{type:String,required:!0},placement:{type:String,default:"bottom-start",required:!1},strategy:{type:String,default:"absolute",required:!1},inline:{type:Boolean,default:!1,required:!1},disabled:{type:Boolean,default:!1,required:!1},teleport:{type:Boolean,default:!1,required:!1},closeOnClick:{type:Boolean,default:!1,required:!1}},data(){return{opened:!1,popper:null}},computed:{buttonStyle(){return this.inline?{display:"inline"}:{}},wrapperStyle(){const e={position:"relative"};return this.inline&&(e.display="inline"),e}},watch:{opened(){this.popper.update()}},mounted:async function(){this.teleport&&await s.nextTick();const e=this.teleport?document.querySelector(`div[data-splade-dropdown-id="${this.spladeId}"]`):this.$refs.tooltip.children[0];this.popper=Ku(this.$refs.button,e,{placement:this.placement,modifiers:[ic,Ju],strategy:this.strategy})},methods:{toggle(){this.opened=!this.opened},hide(){this.opened=!1}}},oc={ref:"tooltip"};function sc(e,t,n,r,i,a){const o=s.resolveComponent("OnClickOutside");return s.openBlock(),s.createBlock(o,{style:s.normalizeStyle(a.wrapperStyle),do:a.hide,opened:i.opened,"ignore-inner-targets":!n.closeOnClick},{default:s.withCtx(()=>[s.createElementVNode("div",{ref:"button",style:s.normalizeStyle(a.buttonStyle)},[s.renderSlot(e.$slots,"button",{toggle:a.toggle,disabled:n.disabled})],4),s.createElementVNode("div",oc,[s.renderSlot(e.$slots,"default",{hide:a.hide,opened:i.opened})],512)]),_:3},8,["style","do","opened","ignore-inner-targets"])}const lc=Ie(ac,[["render",sc]]),uc={__name:"DynamicHtml",props:{keepAliveKey:{type:String,required:!0},name:{type:String,required:!0}},setup(e){const t=s.inject("$splade")||{},n=s.inject("$spladeOptions")||{};return(r,i)=>s.unref(t).isSsr?(s.openBlock(),s.createBlock(te,{key:e.keepAliveKey,html:s.unref(t).htmlForDynamicComponent(e.name)},null,8,["html"])):(s.openBlock(),s.createBlock(s.KeepAlive,{key:0,max:s.unref(n).max_keep_alive},[(s.openBlock(),s.createBlock(te,{key:e.keepAliveKey,html:s.unref(t).htmlForDynamicComponent(e.name)},null,8,["html"]))],1032,["max"]))}};function vi(e){return e&&e.length?e[0]:void 0}const cc={inject:["stack"],computed:{values(){return v.validationErrors(this.stack)}},render(){const e=this;return this.$slots.default({has(t){return N(e.values,t)},first(t){return vi(e.values[t]||[])},all:{...this.values},...this.values})}},dc={props:{private:{type:Boolean,required:!1,default:!1},channel:{type:String,required:!0},listeners:{type:Array,required:!0}},data(){return{subscribed:!1,subscription:null,subscriptions:[],events:[]}},beforeUnmount(){this.subscription&&(window.Echo.leave(this.subscription.subscription.name),this.subscription=null,this.subscriptions=[])},mounted(){this.subscription=this.private?window.Echo.private(this.channel):window.Echo.channel(this.channel),this.subscription.on("pusher:subscription_succeeded",()=>{this.subscribed=!0}),this.listeners.forEach(e=>{const t=this.subscription.listen(e,n=>{const r="splade.redirect",i="splade.refresh",a="splade.toast";let o=null,l=!1,u=[];W(n,c=>{!M(c)||(r in c&&(o=c[r]),i in c&&(l=c[i]),a in c&&u.push(c))}),o?v.visit(o):l?v.refresh():this.events.push({name:e,data:n}),u.length>0&&u.forEach(c=>{v.pushToast(c)}),this.$root.$emit(`event.${e}`,n)});this.subscriptions.push(t)})},render(){return this.$slots.default({subscribed:this.subscribed,events:this.events})}};function fc(){this.__data__=new ne,this.size=0}function pc(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function hc(e){return this.__data__.get(e)}function mc(e){return this.__data__.has(e)}var gc=200;function vc(e,t){var n=this.__data__;if(n instanceof ne){var r=n.__data__;if(!Ze||r.lengthl))return!1;var c=a.get(e),d=a.get(t);if(c&&d)return c==t&&d==e;var m=-1,p=!0,f=n&Ec?new qt:void 0;for(a.set(e,t),a.set(t,e);++m-1?i[a?t[o]:o]:void 0}}function xd(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a({})},placeholder:{type:String,required:!1,default:""},preview:{type:Boolean,required:!1,default:!1},server:{type:[Boolean,String],required:!1,default:!1},accept:{type:Array,required:!1,default:()=>[]},minFileSize:{type:[Boolean,Number,String],required:!1,default:!1},maxFileSize:{type:[Boolean,Number,String],required:!1,default:!1},minImageWidth:{type:[Boolean,Number],required:!1,default:!1},maxImageWidth:{type:[Boolean,Number],required:!1,default:!1},minImageHeight:{type:[Boolean,Number],required:!1,default:!1},maxImageHeight:{type:[Boolean,Number],required:!1,default:!1},minImageResolution:{type:[Boolean,Number],required:!1,default:!1},maxImageResolution:{type:[Boolean,Number],required:!1,default:!1},existingSuffix:{type:String,required:!1,default:"_existing"},orderSuffix:{type:String,required:!1,default:"_order"},dusk:{type:String,required:!1,default:null}},emits:["start-uploading","stop-uploading"],data(){return{inputElement:null,filepondInstance:null,filenames:[],uploadedFiles:[],hadExistingFiles:!1}},computed:{existingField(){return this.field+this.existingSuffix},orderField(){return this.field+this.orderSuffix},handlesExistingFiles(){return this.existingSuffix&&this.hadExistingFiles}},mounted(){this.inputElement=this.$refs.file.querySelector('input[type="file"]');const e=this.form[this.field];this.hadExistingFiles=this.multiple&&e.length>0||!this.multiple&&e,this.form.$put(this.field,this.multiple?[]:null),this.filepond&&(this.setExisting(e),this.initFilepond(e||[]).then(()=>{this.form.$registerFilepond(this.field,this.addFileToFilepond,this.addFilesToFilepond)}))},methods:{extractMetadataFromExistingFile(e){return e?qe(e)?e:D(e)?e.map(this.extractMetadataFromExistingFile):M(e)?e.options.metadata.metadata:null:null},setExisting(e){!this.handlesExistingFiles||(this.form.$put(this.existingField,this.extractMetadataFromExistingFile(e)),this.setOrder())},setOrder(){if(!this.multiple||!this.handlesExistingFiles||!this.filepondInstance)return;const t=this.filepondInstance.getFiles().filter(r=>!r.getMetadata("identifier")),n=this.filepondInstance.getFiles().map(r=>{const i=r.getMetadata("identifier");return i?"existing-file-"+i:"new-file-"+t.indexOf(r)});this.form.$put(this.orderField,n)},addFileToFilepond(e){e&&this.filepondInstance.addFile(e)},addFilesToFilepond(e){e.forEach(t=>this.addFileToFilepond(t))},loadFilepondPlugins(){const e=[];return this.preview&&(e.push(import("filepond-plugin-image-preview")),e.push(import("filepond-plugin-image-exif-orientation"))),this.accept.length>0&&e.push(import("filepond-plugin-file-validate-type")),(this.minFileSize||this.maxFileSize)&&e.push(import("filepond-plugin-file-validate-size")),(this.minImageWidth||this.maxImageWidth||this.minImageHeight||this.maxImageHeight||this.minImageResolution||this.maxImageResolution)&&e.push(import("filepond-plugin-image-validate-size")),Promise.all(e)},initFilepond(e){const t=this.inputElement.getAttribute("name"),n=this;return new Promise(r=>{import("filepond").then(i=>{const a=Object.assign({},n.filepond,n.jsFilepondOptions,{oninit(){const o=setInterval(()=>{if(n.filepondInstance.status<2)clearInterval(o);else return;n.setOrder();const l=n.filepondInstance.element.querySelector('input[type="file"]');l.hasAttribute("name")||l.setAttribute("name",t),n.dusk&&n.filepondInstance.element.setAttribute("dusk",n.dusk),n.multiple&&n.filepondInstance.element.addEventListener("moveFile",function(u){n.filepondInstance.moveFile(u.detail[0],u.detail[1]),n.setOrder()}),r()},15)},onaddfile(o,l){o||l.origin!==i.FileOrigin.LOCAL&&(n.server?n.$emit("start-uploading",[l.id]):n.addFiles([l.file]),n.setOrder())},onremovefile(o,l){o||(n.handlesExistingFiles&&(n.multiple?n.setExisting(n.form[n.existingField].filter(u=>l.getMetadata("metadata")!==u)):n.setExisting(null)),n.removeFile(l.file))},onprocessfile(o,l){o||(n.uploadedFiles.push({file:l.file,id:l.serverId}),n.addFiles([l.serverId]),n.$emit("stop-uploading",[l.id]))},onreorderfiles(){n.setOrder()}});this.hadExistingFiles&&(a.files=this.multiple?e:[e]),this.accept.length>0&&(a.acceptedFileTypes=this.accept),this.minFileSize&&(a.minFileSize=this.minFileSize),this.maxFileSize&&(a.maxFileSize=this.maxFileSize),this.minImageWidth&&(a.imageValidateSizeMinWidth=this.minImageWidth),this.maxImageWidth&&(a.imageValidateSizeMaxWidth=this.maxImageWidth),this.minImageHeight&&(a.imageValidateSizeMinHeight=this.minImageHeight),this.maxImageHeight&&(a.imageValidateSizeMaxHeight=this.maxImageHeight),this.minImageResolution&&(a.imageValidateSizeMinResolution=this.minImageResolution),this.maxImageResolution&&(a.imageValidateSizeMaxResolution=this.maxImageResolution),a.server={load:(o,l,u,c,d)=>{const p=se.default.CancelToken.source();return se.default({url:o.preview_url,method:"GET",cancelToken:p.token,responseType:"blob"}).then(f=>{const h=new File([f.data],o.name,{type:o.type});l(h)}).catch(function(f){axios.isCancel(f)||u(f)}),{abort:()=>{p.cancel(),d()}}}},this.server&&(a.server.process=(o,l,u,c,d,m,p)=>{const f=new FormData;f.append("file",l,l.name);const g=se.default.CancelToken.source();se.default({url:n.server,method:"POST",data:f,cancelToken:g.token,onUploadProgress:y=>{m(y.lengthComputable,y.loaded,y.total)}}).then(y=>{y.status>=200&&y.status<300?c(y.data):d(y.statusText)}).catch(function(y){var T;axios.isCancel(y)?p():d((T=y.response)==null?void 0:T.statusText)})},a.server.revert=(o,l,u)=>{se.default({url:n.server,method:"POST",data:{_method:"DELETE",file:o}}).then(()=>{l()}).catch(function(c){var d;u((d=c.response)==null?void 0:d.statusText)})}),this.loadFilepondPlugins(i).then(o=>{o.length>0&&i.registerPlugin(...o.map(l=>l.default)),this.filepondInstance=i.create(this.inputElement,a)})})})},removeFile(e){this.server&&(e=Rn(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){const t=this.form[this.field];e.forEach(n=>{t.push(n)}),this.form.$put(this.field,t)}else this.form.$put(this.field,e[0]),this.setExisting(null);this.filepond||this.updateFilenames()},updateFilenames(){this.filenames=[];const e=this.form[this.field];this.multiple?e.forEach(t=>{this.filenames.push(t.name)}):e&&this.filenames.push(e.name)},handleFileInput(e){this.form.$put(this.field,this.multiple?[]:null);const t=Object.values(e.target.files);this.addFiles(t)}}},Fd={ref:"file"};function Bd(e,t,n,r,i,a){return s.openBlock(),s.createElementBlock("div",Fd,[s.renderSlot(e.$slots,"default",{handleFileInput:a.handleFileInput,filenames:i.filenames})],512)}const qd=Ie(kd,[["render",Bd]]),Dd={inject:["stack"],computed:{values(){return v.flashData(this.stack)}},render(){const e=this;return this.$slots.default({has(t){return N(e.values,t)},...this.values})}};function Nn(e,t,n){e=e||{},t=t||new FormData,n=n||null;for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&Li(t,Di(n,r),e[r]);return t}function Di(e,t){return e?e+"["+t+"]":t}function Li(e,t,n){if(Array.isArray(n))return Array.from(n.keys()).forEach(r=>Li(e,Di(t,r.toString()),n[r]));if(n instanceof Date)return e.append(t,n.toISOString());if(n instanceof File)return e.append(t,n,n.name);if(n instanceof Blob)return e.append(t,n);if(typeof n=="boolean")return e.append(t,n?"1":"0");if(typeof n=="string")return e.append(t,n);if(typeof n=="number")return e.append(t,`${n}`);if(n==null)return e.append(t,"");Nn(n,e,t)}var Ld="[object Boolean]";function ji(e){return e===!0||e===!1||ce(e)&&ue(e)==Ld}function Mi(e,t){var n={};return t=st(t),Wt(e,function(r,i,a){Qr(n,i,t(r,i,a))}),n}function Ri(e,t,n){return e===e&&(n!==void 0&&(e=e<=n?e:n),t!==void 0&&(e=e>=t?e:t)),e}function ze(e,t,n){return e=on(e),n=n==null?0:Ri(Mn(n),0,e.length),t=bt(t),e.slice(n,n+t.length)==t}const jd={inject:["stack"],props:{spladeId:{type:String,required:!0,default:""},action:{type:String,required:!1,default(){return v.isSsr?"":location.href}},method:{type:String,required:!1,default:"POST"},default:{type:Object,required:!1,default:()=>({})},confirm:{type:[Boolean,String],required:!1,default:!1},confirmText:{type:String,required:!1,default:""},confirmButton:{type:String,required:!1,default:""},cancelButton:{type:String,required:!1,default:""},stay:{type:Boolean,require:!1,default:!1},restoreOnSuccess:{type:Boolean,required:!1,default:!0},resetOnSuccess:{type:Boolean,required:!1,default:!1},scrollOnError:{type:Boolean,required:!1,default:!0},submitOnChange:{type:[Boolean,Array],required:!1,default:!1},escapeValidationMessages:{type:Boolean,required:!1,default:!0}},emits:["success","error"],data(){return{isMounted:!1,missingAttributes:[],values:Object.assign({},{...this.default}),processing:!1,wasSuccessful:!1,recentlySuccessful:!1,recentlySuccessfulTimeoutId:null,formElement:null,elementsUploading:[],fileponds:{}}},computed:{$all(){return this.values},$uploading(){return this.elementsUploading.length>0},rawErrors(){return v.validationErrors(this.stack)},errors(){return Mi(this.rawErrors,e=>e.join(` +`))}},mounted(){let e=document.querySelector(`form[data-splade-id="${this.spladeId}"]`);e||(e=document),this.formElement=e,this.missingAttributes.forEach(n=>{let r="";const i=e.querySelector(`[name="${n}"]`);i?r=i.type==="checkbox"?!1:"":e.querySelector(`[name="${n}[]"]`)?r=[]:(e.querySelector(`[name^="${n}."]`)||e.querySelector(`[name^="${n}["]`))&&(r={}),this.$put(n,r)}),this.missingAttributes=[],this.submitOnChange===!0?this.$watch("values",()=>{this.$nextTick(()=>this.request())},{deep:!0}):D(this.submitOnChange)&&this.submitOnChange.forEach(n=>{this.$watch(`values.${n}`,()=>{this.$nextTick(()=>this.request())},{deep:!0})}),this.isMounted=!0;const t=this.formElement.querySelector("[autofocus]");t&&this.focusAndScrollToElement(t)},methods:{$startUploading(e){this.elementsUploading.push(e[0])},$stopUploading(e){this.elementsUploading=this.elementsUploading.filter(t=>t!=e[0])},hasError(e){return e in this.errors},$registerFilepond(e,t,n){this.fileponds[e]={addFile:t,addFiles:n}},$addFile(e,t){if(!this.fileponds[e])return console.log("Filepond instance not found");this.fileponds[e].addFile(t)},$addFiles(e,t){if(!this.fileponds[e])return console.log("Filepond instance not found");this.fileponds[e].addFiles(t)},$errorAttributes(e){return{[this.escapeValidationMessages?"textContent":"innerHTML"]:this.errors[e]}},reset(){this.values={}},restore(){this.values=Object.assign({},{...this.default})},$put(e,t){return Jr(this.values,e,t)},focusAndScrollToElement(e){let t=!0;if(e._flatpickr&&(t=!1),e.tagName==="SELECT"&&e.getAttribute("data-choice")&&(t=!1),t){const n=new IntersectionObserver(r=>{let[i]=r;i.isIntersecting&&(setTimeout(()=>i.target.focus(),150),n.disconnect())});n.observe(e)}e.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})},submit(e){if(!this.$uploading){if(e){const t=e.submitter;t&&t.name&&this.$put(t.name,t.value)}if(!this.confirm)return this.request();v.confirm(ji(this.confirm)?"":this.confirm,this.confirmText,this.confirmButton,this.cancelButton).then(()=>{this.request()}).catch(()=>{})}},async request(){if(this.$uploading)return;await this.$nextTick(),this.processing=!0,this.wasSuccessful=!1,this.recentlySuccessful=!1,clearTimeout(this.recentlySuccessfulTimeoutId);const e=this.values instanceof FormData?this.values:Nn(this.values),t={Accept:"application/json"};this.stay&&(t["X-Splade-Prevent-Refresh"]=!0);let n=this.method.toUpperCase();n!=="GET"&&n!=="POST"&&(e.append("_method",n),n="POST"),v.request(this.action,n,e,t).then(r=>{this.$emit("success",r),this.restoreOnSuccess&&this.restore(),this.resetOnSuccess&&this.reset(),this.processing=!1,this.wasSuccessful=!0,this.recentlySuccessful=!0,this.recentlySuccessfulTimeoutId=setTimeout(()=>this.recentlySuccessful=!1,2e3)}).catch(async r=>{if(this.processing=!1,this.$emit("error",r),!this.scrollOnError)return;await this.$nextTick();const i=Rn(Object.keys(this.errors),a=>this.formElement.querySelector(`[data-validation-key="${a}"]`));i&&this.focusAndScrollToElement(this.formElement.querySelector(`[data-validation-key="${i}"]`))})}},render(){const e=this;return this.$slots.default(new Proxy({},{ownKeys(){return Object.keys(e.values)},get(t,n){return["$all","$attrs","$put","$startUploading","$stopUploading","$processing","$uploading","$errorAttributes","$registerFilepond","$addFile","$addFiles","errors","restore","reset","hasError","processing","rawErrors","submit","wasSuccessful","recentlySuccessful"].includes(n)||ze(n,"__v_")?e[n]:(!e.isMounted&&!N(e.values,n)&&(e.missingAttributes.push(n),e.$put(n,"")),Ne(e.values,n))},set(t,n,r){return e.$put(n,r)}}))}},Md={props:{flatpickr:{type:[Boolean,Object],required:!1,default:!1},jsFlatpickrOptions:{type:Object,required:!1,default:()=>({})},modelValue:{type:[String,Number],required:!1}},emits:["update:modelValue"],data(){return{disabled:!1,element:null,flatpickrInstance:null,observer:null}},watch:{modelValue(e){this.flatpickrInstance&&this.flatpickrInstance.setDate(e)}},mounted(){this.element=this.$refs.input.querySelector("input"),this.flatpickr&&this.initFlatpickr(this.element),this.disabled=this.element.disabled;const e=this;this.observer=new MutationObserver(function(t){t.forEach(function(n){n.attributeName==="disabled"&&(e.disabled=n.target.disabled)})}),this.observer.observe(this.element,{attributes:!0})},beforeUnmount(){this.observer.disconnect(),this.flatpickrInstance&&this.flatpickrInstance.destroy()},methods:{initFlatpickr(e){import("flatpickr").then(t=>{this.flatpickrInstance=t.default(e,Object.assign({},this.flatpickr,this.jsFlatpickrOptions,{onChange:(n,r)=>{this.flatpickrInstance.config.mode==="range"&&this.flatpickrInstance.selectedDates.length<2||r!=this.modelValue&&this.$emit("update:modelValue",r)}})),this.modelValue&&this.flatpickrInstance.setDate(this.modelValue)})}}},Rd={ref:"input"};function Nd(e,t,n,r,i,a){return s.openBlock(),s.createElementBlock("div",Rd,[s.renderSlot(e.$slots,"default",{disabled:i.disabled})],512)}const Vd=Ie(Md,[["render",Nd]]),Hd={components:{Render:te},props:{name:{type:String,required:!0},url:{type:String,required:!1,default(){return v.isSsr?"":window.location.href}},show:{type:Boolean,required:!1,default:!0}},data(){return{html:null}},watch:{show(e){e?this.request():this.html=null}},mounted(){this.show&&this.request()},methods:{async request(){this.html=null,v.lazy(this.url,this.name).then(e=>{this.html=e.data.html})}}};function Ud(e,t,n,r,i,a){const o=s.resolveComponent("Render");return i.html?(s.openBlock(),s.createBlock(o,{key:0,html:i.html},null,8,["html"])):n.show?s.renderSlot(e.$slots,"default",{key:1}):s.createCommentVNode("",!0)}const Wd=Ie(Hd,[["render",Ud]]),zd=["href","onClick"],Gd={__name:"Link",props:{href:{type:String,required:!1,default:"#"},method:{type:String,required:!1,default:"GET"},data:{type:Object,required:!1,default:()=>({})},headers:{type:Object,required:!1,default:()=>({Accept:"application/json"})},replace:{type:Boolean,required:!1,default:!1},confirm:{type:[Boolean,String],required:!1,default:!1},confirmText:{type:String,required:!1,default:""},confirmButton:{type:String,required:!1,default:""},cancelButton:{type:String,required:!1,default:""},modal:{type:Boolean,required:!1,default:!1},slideover:{type:Boolean,required:!1,default:!1},away:{type:Boolean,required:!1,default:!1},keepModal:{type:Boolean,required:!1,default:!1}},setup(e){const t=e,n=s.inject("stack");function r(){if(!t.confirm)return i();v.confirm(ji(t.confirm)?"":t.confirm,t.confirmText,t.confirmButton,t.cancelButton).then(()=>{i()}).catch(()=>{})}function i(){if(t.away)return window.location=t.href;const o=n>0&&t.keepModal;if(t.modal&&!o)return v.modal(t.href);if(t.slideover&&!o)return v.slideover(t.href);if(ze(t.href,"#")){if(v.openPreloadedModal(t.href.substring(1)))return;console.log("No preloaded modal found for "+t.href)}let l=t.method.trim().toUpperCase();const u={...t.headers};if(o&&(u["X-Splade-Modal"]=v.stackType(n),u["X-Splade-Modal-Target"]=n),l==="GET")return t.replace?v.replace(t.href,u):v.visit(t.href,u);const c=t.data instanceof FormData?t.data:Nn(t.data);l!=="POST"&&(c.append("_method",l),l="POST"),v.request(t.href,l,c,u,t.replace)}return(a,o)=>(s.openBlock(),s.createElementBlock("a",{href:e.href,onClick:s.withModifiers(r,["prevent"])},[s.renderSlot(a.$slots,"default")],8,zd))}},Kd={provide(){return{stack:this.stack}},props:{closeButton:{type:Boolean,required:!1,default:!0},type:{type:String,required:!0},stack:{type:Number,required:!0},onTopOfStack:{type:Boolean,required:!1,default:!1},maxWidth:{type:String,required:!1,default:e=>e.type==="modal"?"2xl":"md"},position:{type:String,required:!1,default:"center"},name:{type:String,required:!1,default:null},animate:{type:Boolean,required:!1,default:!0}},emits:["close"],data(){return{staticAnimate:!0,isOpen:!1}},mounted(){this.staticAnimate=this.animate,this.setIsOpen(!0)},methods:{emitClose(){this.$emit("close")},close(){this.setIsOpen(!1)},setIsOpen(e){this.isOpen=e}},render(){return this.$slots.default({type:this.type,isOpen:this.isOpen,setIsOpen:this.setIsOpen,close:this.close,stack:this.stack,onTopOfStack:this.onTopOfStack,maxWidth:this.maxWidth,emitClose:this.emitClose,closeButton:this.closeButton,animate:this.staticAnimate,position:this.position,Dialog:vn,DialogPanel:yn,TransitionRoot:Re,TransitionChild:Me})}},Xd={__name:"PreloadedModal",props:{name:{type:String,required:!0},html:{type:String,required:!0},type:{type:String,required:!1,default:"modal"}},setup(e){const t=e;return v.registerPreloadedModal(t.name,t.html,t.type),()=>{}}};function Yd(e,t){var n=-1,r=ct(e)?Array(e.length):[];return zt(e,function(i,a,o){r[++n]=t(i,a,o)}),r}function Ni(e,t){var n=D(e)?Tr:Yd;return n(e,st(t))}const Qd={inject:["stack"],props:{choices:{type:[Boolean,Object],required:!1,default:!1},jsChoicesOptions:{type:Object,required:!1,default:()=>({})},multiple:{type:Boolean,required:!1,default:!1},modelValue:{type:[String,Number,Array],required:!1},placeholder:{type:[Boolean,Object],required:!1,default:!1},dusk:{type:String,required:!1,default:null},remoteUrl:{type:String,required:!1,default:null},optionValue:{type:String,required:!1,default:null},optionLabel:{type:String,required:!1,default:null},remoteRoot:{type:String,required:!1,default:null}},emits:["update:modelValue"],data(){return{choicesInstance:null,element:null,placeholderText:null,headlessListener:null,selectChangeListener:null,selectShowDropdownListener:null,loading:!1}},computed:{hasSelection(){return this.multiple?Array.isArray(this.modelValue)?this.modelValue.length>0:!1:!(this.modelValue===null||this.modelValue===""||this.modelValue===void 0)}},watch:{modelValue(e,t){if(!this.choicesInstance&&this.multiple&&D(e)){const n=e.filter(r=>r!==""&&r!==null&&r!==void 0);if(JSON.stringify(n)!=JSON.stringify(e)){this.$emit("update:modelValue",n);return}}if(this.choicesInstance){if(JSON.stringify(e)==JSON.stringify(t))return;this.setValueOnChoices(e)}},remoteUrl:{handler(){this.loadRemoteOptions()}}},mounted(){if(this.element=this.$refs.select.querySelector("select"),this.choices)return this.initChoices(this.element).then(()=>{this.loadRemoteOptions()});this.loadRemoteOptions()},beforeUnmount(){this.destroyChoicesInstance()},methods:{loadRemoteOptions(){!this.remoteUrl||(this.loading=!0,se.default({url:this.remoteUrl,method:"GET",headers:{Accept:"application/json"}}).then(e=>{this.destroyChoicesInstance();let t=[];this.placeholder&&t.push(this.placeholder),t=this.normalizeOptions(this.remoteRoot?Ne(e.data,this.remoteRoot):e.data,t);var n,r=this.element.options.length-1;for(n=r;n>=0;n--)this.element.remove(n);let i=!1;if(W(t,a=>{var o=document.createElement("option");o.value=a.value,o.text=a.label,a.value===this.modelValue&&(i=!0),a.disabled&&(o.disabled=a.disabled),a.placeholder&&(o.placeholder=a.placeholder),this.element.appendChild(o)}),i||this.$emit("update:modelValue",this.multiple?[]:""),this.choices)return this.initChoices(this.element).then(()=>{this.loading=!1});i?this.element.value=this.modelValue:this.$nextTick(()=>{this.element.selectedIndex=0}),this.loading=!1}).catch(()=>{this.loading=!1}))},destroyChoicesInstance(){var e;this.choices&&this.choicesInstance&&(this.headlessListener&&((e=document.querySelector("#headlessui-portal-root"))==null||e.removeEventListener("click",this.headlessListener)),this.selectChangeListener&&this.element.removeEventListener("change",this.selectChangeListener),this.selectShowDropdownListener&&this.element.removeEventListener("showDropdown",this.selectShowDropdownListener),this.choicesInstance.destroy(),this.choicesInstance=null)},normalizeOptions(e,t){const n=D(e);return!n&&M(e)?this.optionValue&&this.optionLabel?t.push({value:Ne(e,this.optionValue),label:Ne(e,this.optionLabel)}):W(e,(r,i)=>{t.push({label:r,value:i})}):n&&e.forEach(r=>{this.normalizeOptions(r,t)}),t},setValueOnChoices(e){Array.isArray(e)&&(e=Ni(e,t=>`${t}`),this.choicesInstance.removeActiveItems()),e==null?e="":Array.isArray(e)||(e=`${e}`),this.choicesInstance.setChoiceByValue(e),this.updateHasSelectionAttribute(),this.handlePlaceholderVisibility()},getItemOfCurrentModel(){const e=this.modelValue;return Rn(this.choicesInstance._store.choices,t=>t.value==e)},handlePlaceholderVisibility(){if(!this.multiple)return;const e=this.choicesInstance.containerInner.element.querySelector("input.choices__input");this.placeholderText=e.placeholder?e.placeholder:this.placeholderText;const t=this.choicesInstance.getValue().length;e.placeholder=t?"":this.placeholderText?this.placeholderText:"",e.style.minWidth="0",e.style.width=t?"1px":"auto",e.style.paddingTop=t?"0px":"1px",e.style.paddingBottom=t?"0px":"1px"},initChoices(e){return new Promise(t=>{const n=Array.from(e.querySelectorAll("option:not([placeholder])")).length,r=this;import("choices.js").then(i=>{const a=Object.assign({},this.choices,this.jsChoicesOptions,{callbackOnInit:function(){const o=this;r.stack>0&&(r.headlessListener=function(l){const u=r.choicesInstance.dropdown.isActive;!u&&l.target===e?r.choicesInstance.showDropdown():u&&l.target!==e&&r.choicesInstance.hideDropdown()},document.querySelector("#headlessui-portal-root").addEventListener("click",r.headlessListener,{capture:!0})),o.containerInner.element.setAttribute("data-select-name",e.name),e.hasAttribute("dusk")&&e.removeAttribute("dusk"),r.dusk&&(o.containerInner.element.setAttribute("dusk",r.dusk),o.choiceList.element.setAttribute("dusk",`${r.dusk}-listbox`)),r.selectChangeListener=function(){let l=o.getValue(!0);if(l==null&&(l=""),r.$emit("update:modelValue",l),!r.multiple||n<1)return;o.getValue().length>=n&&o.hideDropdown()},e.addEventListener("change",r.selectChangeListener),o.containerInner.element.addEventListener("hideDropdownFromDusk",function(){o.hideDropdown()}),r.selectShowDropdownListener=function(){if(r.multiple||!r.modelValue)return;const l=r.getItemOfCurrentModel(),u=o.dropdown.element.querySelector(`.choices__item[data-id="${l.id}"]`);o.choiceList.scrollToChildElement(u,1),o._highlightChoice(u)},e.addEventListener("showDropdown",r.selectShowDropdownListener),r.choicesInstance=o,r.setValueOnChoices(r.modelValue),t()}});new i.default(e,a)})})},updateHasSelectionAttribute(){this.choicesInstance.containerInner.element.setAttribute("data-has-selection",this.hasSelection)}}},Jd={ref:"select"};function Zd(e,t,n,r,i,a){return s.openBlock(),s.createElementBlock("div",Jd,[s.renderSlot(e.$slots,"default",{loading:i.loading})],512)}const ef=Ie(Qd,[["render",Zd]]),tf={inject:["stack"],render(){const e=v.validationErrors(this.stack),t=v.flashData(this.stack),n=v.sharedData.value,r=Mi(e,i=>i.join(` +`));return this.$slots.default({flash:t,errors:r,rawErrors:e,shared:n,hasError(i){return i in e},hasFlash(i){return N(t,i)},hasShared(i){return N(n,i)},hasErrors:Object.keys(e).length>0})}};function nf(e,t,n){e=on(e),t=bt(t);var r=e.length;n=n===void 0?r:Ri(Mn(n),0,r);var i=n;return n-=t.length,n>=0&&e.slice(n,i)==t}function rf(e,t){var n=[];return zt(e,function(r,i,a){t(r,i,a)&&n.push(r)}),n}function af(e,t){var n=D(e)?Si:rf;return n(e,st(t))}function Vi(e,t){return Lt(e,t)}const of={inject:["stack"],props:{baseUrl:{type:String,required:!1,default(){return window.location.pathname}},striped:{type:Boolean,required:!1,default:!1},columns:{type:Object,required:!0},defaultVisibleToggleableColumns:{type:Array,required:!0},searchDebounce:{type:Number,required:!1,default:350},itemsOnThisPage:{type:Number,required:!1,default:0},itemsOnAllPages:{type:Number,required:!1,default:0}},data(){return{selectedItems:[],visibleColumns:[],forcedVisibleSearchInputs:[],debounceUpdateQuery:null,isLoading:!1,processingAction:!1}},computed:{columnsAreToggled(){return!Vi(this.visibleColumns,this.defaultVisibleToggleableColumns)},hasForcedVisibleSearchInputs(){return this.forcedVisibleSearchInputs.length>0},allItemsFromAllPagesAreSelected(){return this.selectedItems.length===1&&this.selectedItems[0]==="*"},allVisibleItemsAreSelected(){const e=this.selectedItems.length;return e===1&&this.selectedItems[0]==="*"||e>0&&e===this.itemsOnThisPage},hasSelectedItems(){return this.selectedItems.length>0},totalSelectedItems(){const e=this.selectedItems.length;return e===1&&this.selectedItems[0]==="*"?this.itemsOnAllPages:e}},created(){this.debounceUpdateQuery=Tn(function(e,t,n){this.updateQuery(e,t,n)},this.searchDebounce)},mounted(){const e=this.getCurrentQuery(),t=e.columns||[];W(e,(n,r)=>{if(ze(r,"filter[")&&!n){const i=r.split("["),a=i[1].substring(0,i[1].length-1);this.forcedVisibleSearchInputs=[...this.forcedVisibleSearchInputs,a]}}),t.length===0?this.visibleColumns=this.defaultVisibleToggleableColumns:this.visibleColumns=t},methods:{visitLink(e,t,n){var r,i;if(!(((r=n==null?void 0:n.target)==null?void 0:r.tagName)==="A"||((i=n==null?void 0:n.target)==null?void 0:i.tagName)==="BUTTON"))return t==="modal"?v.modal(e):t==="slideover"?v.slideover(e):v.visit(e)},reset(){this.forcedVisibleSearchInputs=[],this.visibleColumns=this.defaultVisibleToggleableColumns;let e=this.getCurrentQuery();e.columns=[],e.page=null,e.perPage=null,e.sort=null,W(e,(t,n)=>{ze(n,"filter[")&&(e[n]=null)}),this.visitWithQueryObject(e,null,!0)},columnIsVisible(e){return this.visibleColumns.includes(e)},toggleColumn(e){const t=!this.columnIsVisible(e),n=af(this.columns,i=>i.can_be_hidden?i.key===e?t:this.visibleColumns.includes(i.key):!0);let r=Ni(n,i=>i.key).sort();Vi(r,this.defaultVisibleToggleableColumns)&&(r=[]),this.visibleColumns=r.length===0?this.defaultVisibleToggleableColumns:r,this.updateQuery("columns",r,null,!1)},disableSearchInput(e){this.forcedVisibleSearchInputs=this.forcedVisibleSearchInputs.filter(t=>t!=e),this.updateQuery(`filter[${e}]`,null)},showSearchInput(e){this.forcedVisibleSearchInputs=[...this.forcedVisibleSearchInputs,e],s.nextTick(()=>{document.querySelector(`[name="searchInput-${e}"]`).focus()})},isForcedVisible(e){return this.forcedVisibleSearchInputs.includes(e)},getCurrentQuery(){const e=window.location.search;if(!e)return{};let t={};return e.substring(1).split("&").forEach(n=>{const r=decodeURIComponent(n).split("=");let i=r[0];if(!nf(i,"]")){t[i]=r[1];return}const a=i.split("["),o=a[1].substring(0,a[1].length-1);parseInt(o)==o?(i=a[0],D(t[i])||(t[i]=[]),t[i].push(r[1])):t[i]=r[1]}),t},updateQuery(e,t,n,r){typeof r>"u"&&(r=!0);let i=this.getCurrentQuery();i[e]=t,(ze(e,"perPage")||ze(e,"filter["))&&delete i.page,this.visitWithQueryObject(i,n,r)},visitWithQueryObject(e,t,n){var u;typeof n>"u"&&(n=!0);let r={};W(e,(c,d)=>{if(!D(c)){r[d]=c;return}c.length!==0&&c.forEach((m,p)=>{r[`${d}[${p}]`]=m})});let i="";W(r,(c,d)=>{c===null||c===[]||(i&&(i+="&"),i+=`${d}=${c}`)}),i&&(i="?"+i);const a=this.baseUrl+i;if(!n)return this.stack>0?void 0:v.replaceUrlOfCurrentPage(a);this.isLoading=!0;let o=null;typeof t<"u"&&t&&(o=(u=document.querySelector(`[name="${t.name}"]`))==null?void 0:u.value);const l=this.stack>0?{"X-Splade-Modal":v.stackType(this.stack),"X-Splade-Modal-Target":this.stack}:{};v.replace(a,l).then(()=>{this.isLoading=!1,typeof t<"u"&&t&&s.nextTick(()=>{const c=document.querySelector(`[name="${t.name}"]`);c.focus(),o&&(c.value=o)})})},async performBulkAction(e,t,n,r,i){if(t)try{await v.confirm(t===!0?"":t,n,r,i)}catch{return!1}this.isLoading=!0,v.request(e,"POST",{ids:this.selectedItems},{},!1).then(a=>{a.data}).catch(()=>{this.isLoading=!1})},setSelectedItems(e){this.selectedItems=D(e)?e:[]},itemIsSelected(e){return this.selectedItems.length==1&&this.selectedItems[0]=="*"?!0:this.selectedItems.includes(e)},setSelectedItem(e,t){t?this.selectedItems.push(e):this.selectedItems=this.selectedItems.filter(n=>n!==e)}},render(){return this.$slots.default({columnIsVisible:this.columnIsVisible,columnsAreToggled:this.columnsAreToggled,debounceUpdateQuery:this.debounceUpdateQuery,disableSearchInput:this.disableSearchInput,hasForcedVisibleSearchInputs:this.hasForcedVisibleSearchInputs,isForcedVisible:this.isForcedVisible,reset:this.reset,showSearchInput:this.showSearchInput,striped:this.striped,toggleColumn:this.toggleColumn,updateQuery:this.updateQuery,visit:this.visitLink,totalSelectedItems:this.totalSelectedItems,allItemsFromAllPagesAreSelected:this.allItemsFromAllPagesAreSelected,allVisibleItemsAreSelected:this.allVisibleItemsAreSelected,hasSelectedItems:this.hasSelectedItems,setSelectedItems:this.setSelectedItems,itemIsSelected:this.itemIsSelected,setSelectedItem:this.setSelectedItem,performBulkAction:this.performBulkAction,processingAction:this.processingAction,isLoading:this.isLoading})}},sf={inheritAttrs:!1,data(){return{isMounted:!1,Teleport:s.Teleport}},mounted(){this.isMounted=!0}};function lf(e,t,n,r,i,a){return s.withDirectives((s.openBlock(),s.createBlock(s.resolveDynamicComponent(i.isMounted?i.Teleport:"div"),s.normalizeProps(s.guardReactiveProps(e.$attrs)),{default:s.withCtx(()=>[s.renderSlot(e.$slots,"default")]),_:3},16)),[[s.vShow,i.isMounted]])}const uf=Ie(sf,[["render",lf]]),cf={props:{autosize:{type:Boolean,required:!1,default:!1},modelValue:{type:[String,Number],required:!1}},data(){return{autosizeInstance:null,element:null}},watch:{modelValue(){!this.autosize||!this.autosizeInstance||import("autosize").then(e=>{s.nextTick(()=>e.default.update(this.element))})}},mounted(){this.element=this.$refs.textarea.querySelector("textarea"),this.autosize&&import("autosize").then(e=>{this.autosizeInstance=e.default(this.element)})},beforeUnmount(){this.autosize&&this.autosizeInstance&&import("autosize").then(e=>{e.default.destroy(this.element)})}},df={ref:"textarea"};function ff(e,t,n,r,i,a){return s.openBlock(),s.createElementBlock("div",df,[s.renderSlot(e.$slots,"default")],512)}const pf=Ie(cf,[["render",ff]]),hf={props:{toastKey:{type:Number,required:!0},autoDismiss:{type:Number,required:!1,default:0}},emits:["dismiss"],data(){return{show:!0}},mounted(){this.autoDismiss&&setTimeout(()=>{this.setShow(!1)},this.autoDismiss*1e3)},methods:{setShow(e){this.show=e},emitDismiss(){this.$emit("dismiss")}},render(){return this.$slots.default({key:this.toastKey,show:this.show,setShow:this.setShow,emitDismiss:this.emitDismiss,TransitionRoot:Re,TransitionChild:Me})}},mf=["left-top","center-top","right-top","left-center","center-center","right-center","left-bottom","center-bottom","right-bottom"],gf={computed:{toasts:function(){return v.toastsReversed.value},hasBackdrop:function(){return v.toasts.value.filter(e=>!e.dismissed&&e.backdrop&&e.html).length>0}},methods:{dismissToast(e){v.dismissToast(e)}},render(){return this.$slots.default({positions:mf,toasts:this.toasts,dismissToast:this.dismissToast,hasBackdrop:this.hasBackdrop,Render:te,TransitionRoot:Re,TransitionChild:Me})}},vf={props:{default:{type:Object,required:!0}},data(){return{toggles:{...this.default}}},methods:{toggled(e){var t;return(t=this.toggles[e])!=null?t:!1},toggle(e){this.setToggle(e,!this.toggled(e))},setToggle(e,t){this.toggles[e]=t}},render(){const e=this;return this.$slots.default(new Proxy({},{ownKeys(){return Object.keys(e.toggles)},get(t,n){const r=Object.keys(e.toggles);if(r.length===1&&vi(r)==="default"){if(n==="toggled")return e.toggled("default");if(n==="setToggle")return i=>{e.setToggle("default",i)};if(n==="toggle")return()=>{e.toggle("default")}}return n==="setToggle"?(i,a)=>{e.setToggle(i,a)}:n==="toggle"?i=>{e.toggle(i)}:e.toggled(n)}}))}},yf={render(){return this.$slots.default({TransitionRoot:Re,TransitionChild:Me})}},bf={created:(e,t)=>{if(v.isSsr)return;const n=`preserveScroll-${t.arg}`,r=v.restore(n);r&&s.nextTick(()=>{typeof e.scrollTo=="function"?e.scrollTo(r.left,r.top):(e.scrollTop=r.top,e.scrollLeft=r.left)});const i=function(){v.remember(n,{top:e.scrollTop,left:e.scrollLeft})};e.addEventListener("scroll",Tn(i,100)),i()}},Vn={injectCSS(e){const t=document.createElement("style");t.type="text/css",t.textContent=` #nprogress { pointer-events: none; } @@ -66,4 +66,4 @@ 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } - `,document.head.appendChild(t)},timeout:null,start(e,t,n){Nn.timeout=setTimeout(()=>n.start(),t)},progress(e,t){t.isStarted()&&e.detail.progress.percentage&&t.set(Math.max(t.status,e.detail.progress.percentage/100*.9))},stop(e,t){clearTimeout(Nn.timeout),t.done(),t.remove()},init(e){const t=this;import("nprogress").then(n=>{document.addEventListener("splade:request",r=>t.start(r,e.delay,n.default)),document.addEventListener("splade:request-progress",r=>t.progress(r,n.default)),document.addEventListener("splade:request-response",r=>t.stop(r,n.default)),document.addEventListener("splade:request-error",r=>t.stop(r,n.default)),n.default.configure({showSpinner:e.spinner}),e.css&&this.injectCSS(e.color)})}},yd={install:(e,t)=>{t=t||{},t.max_keep_alive=V(t,"max_keep_alive")?t.max_keep_alive:10,t.prefix=V(t,"prefix")?t.prefix:"Splade",t.transform_anchors=V(t,"transform_anchors")?t.transform_anchors:!1,t.link_component=V(t,"link_component")?t.link_component:"Link",t.progress_bar=V(t,"progress_bar")?t.progress_bar:!1,t.components=V(t,"components")?t.components:{};const n=t.prefix;if(e.component(`${n}Confirm`,kl).component(`${n}Data`,Ml).component(`${n}Defer`,Yl).component(`${n}Dialog`,Zl).component(`${n}Dropdown`,oc).component(`${n}DynamicHtml`,sc).component(`${n}Errors`,lc).component(`${n}Event`,uc).component(`${n}File`,Bf).component(`${n}Flash`,qf).component(`${n}Form`,jf).component(`${n}Input`,Nf).component(`${n}Lazy`,Uf).component(`${n}Modal`,Gf).component(`${n}OnClickOutside`,Yr).component(`${n}PreloadedModal`,Kf).component(`${n}Render`,Z).component(`${n}Select`,Zf).component(`${n}State`,ed).component(`${n}Table`,id).component(`${n}Teleport`,sd).component(`${n}Textarea`,fd).component(`${n}Toast`,dd).component(`${n}Toasts`,hd).component(`${n}Toggle`,md).component(`${n}Transition`,gd).component(t.link_component,Wf).directive(`${n}PreserveScroll`,vd),Object.defineProperty(e.config.globalProperties,"$splade",{get:()=>g}),Object.defineProperty(e.config.globalProperties,"$spladeOptions",{get:()=>Object.assign({},{...t})}),e.provide("$splade",e.config.globalProperties.$splade),e.provide("$spladeOptions",e.config.globalProperties.$spladeOptions),t.progress_bar){const r={delay:250,color:"#4B5563",css:!0,spinner:!1};R(t.progress_bar)||(t.progress_bar={}),["delay","color","css","spinner"].forEach(i=>{V(t.progress_bar,i)||(t.progress_bar[i]=r[i])}),Nn.init(t.progress_bar)}z(t.components,(r,i)=>{e.component(i,r)})}};function bd(e,t,n){const r={};process.argv.slice(2).forEach(a=>{const o=a.replace(/^-+/,"").split("=");r[o[0]]=o.length===2?o[1]:!0});const i=r.port||9e3;e(async(a,o)=>{if(a.method=="POST"){let l="";a.on("data",u=>l+=u),a.on("end",async()=>{const u=JSON.parse(l),c=n({components:u.components,initialDynamics:u.dynamics,initialHtml:u.html,initialSpladeData:u.splade}),f=await t(c);o.writeHead(200,{"Content-Type":"application/json",Server:"Splade SSR"}),o.write(JSON.stringify({body:f})),o.end()})}}).listen(i,()=>console.log(`Splade SSR server started on port ${i}.`))}k.Splade=g,k.SpladeApp=Or,k.SpladePlugin=yd,k.renderSpladeApp=Ko,k.startServer=bd,Object.defineProperties(k,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}); + `,document.head.appendChild(t)},timeout:null,start(e,t,n){Vn.timeout=setTimeout(()=>n.start(),t)},progress(e,t){t.isStarted()&&e.detail.progress.percentage&&t.set(Math.max(t.status,e.detail.progress.percentage/100*.9))},stop(e,t){clearTimeout(Vn.timeout),t.done(),t.remove()},init(e){const t=this;import("nprogress").then(n=>{document.addEventListener("splade:request",r=>t.start(r,e.delay,n.default)),document.addEventListener("splade:request-progress",r=>t.progress(r,n.default)),document.addEventListener("splade:request-response",r=>t.stop(r,n.default)),document.addEventListener("splade:request-error",r=>t.stop(r,n.default)),n.default.configure({showSpinner:e.spinner}),e.css&&this.injectCSS(e.color)})}},wf={install:(e,t)=>{t=t||{},t.max_keep_alive=N(t,"max_keep_alive")?t.max_keep_alive:10,t.prefix=N(t,"prefix")?t.prefix:"Splade",t.transform_anchors=N(t,"transform_anchors")?t.transform_anchors:!1,t.link_component=N(t,"link_component")?t.link_component:"Link",t.progress_bar=N(t,"progress_bar")?t.progress_bar:!1,t.components=N(t,"components")?t.components:{};const n=t.prefix;if(e.component(`${n}Confirm`,ql).component(`${n}Data`,Nl).component(`${n}Defer`,eu).component(`${n}Dialog`,tu).component(`${n}Dropdown`,lc).component(`${n}DynamicHtml`,uc).component(`${n}Errors`,cc).component(`${n}Event`,dc).component(`${n}File`,qd).component(`${n}Flash`,Dd).component(`${n}Form`,jd).component(`${n}Input`,Vd).component(`${n}Lazy`,Wd).component(`${n}Modal`,Kd).component(`${n}OnClickOutside`,ei).component(`${n}PreloadedModal`,Xd).component(`${n}Render`,te).component(`${n}Select`,ef).component(`${n}State`,tf).component(`${n}Table`,of).component(`${n}Teleport`,uf).component(`${n}Textarea`,pf).component(`${n}Toast`,hf).component(`${n}Toasts`,gf).component(`${n}Toggle`,vf).component(`${n}Transition`,yf).component(t.link_component,Gd).directive(`${n}PreserveScroll`,bf),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){const r={delay:250,color:"#4B5563",css:!0,spinner:!1};M(t.progress_bar)||(t.progress_bar={}),["delay","color","css","spinner"].forEach(i=>{N(t.progress_bar,i)||(t.progress_bar[i]=r[i])}),Vn.init(t.progress_bar)}W(t.components,(r,i)=>{e.component(i,r)})}};function Sf(e,t,n){const r={};process.argv.slice(2).forEach(a=>{const o=a.replace(/^-+/,"").split("=");r[o[0]]=o.length===2?o[1]:!0});const i=r.port||9e3;e(async(a,o)=>{if(a.method=="POST"){let l="";a.on("data",u=>l+=u),a.on("end",async()=>{const u=JSON.parse(l),c=n({components:u.components,initialDynamics:u.dynamics,initialHtml:u.html,initialSpladeData:u.splade}),d=await t(c);o.writeHead(200,{"Content-Type":"application/json",Server:"Splade SSR"}),o.write(JSON.stringify({body:d})),o.end()})}}).listen(i,()=>console.log(`Splade SSR server started on port ${i}.`))}q.Splade=v,q.SpladeApp=$r,q.SpladePlugin=wf,q.renderSpladeApp=Qo,q.startServer=Sf,Object.defineProperties(q,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}); diff --git a/package-lock.json b/package-lock.json index 5721421d..cae39b5c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@protonemedia/laravel-splade", - "version": "1.1.0", + "version": "1.1.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@protonemedia/laravel-splade", - "version": "1.1.0", + "version": "1.1.1", "license": "MIT", "dependencies": { "autosize": "^5.0.1", @@ -43,9 +43,9 @@ "dev": true }, "node_modules/@babel/parser": { - "version": "7.20.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.5.tgz", - "integrity": "sha512-r27t/cy/m9uKLXQNWWebeCUHgnAZq0CpG1OwKRxzJMP1vpSU4bSIK2hq+/cp0bQxetkXx38n09rNu8jVkcK/zA==", + "version": "7.20.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.7.tgz", + "integrity": "sha512-T3Z9oHybU+0vZlY9CiDSJQTD5ZapcW18ZctFMi0MOAl/4BjFF4ul7NVSARLdbGO5vDqy9eQiGTV0LtKfvCYvcg==", "peer": true, "bin": { "parser": "bin/babel-parser.js" @@ -55,9 +55,9 @@ } }, "node_modules/@babel/runtime": { - "version": "7.20.6", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.20.6.tgz", - "integrity": "sha512-Q+8MqP7TiHMWzSfwiJwXCjyf4GYA4Dgw3emg/7xmwsdLJOZUp+nMqcOwOzzYheuM1rhDu8FSj2l0aoMygEuXuA==", + "version": "7.20.7", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.20.7.tgz", + "integrity": "sha512-UF0tvkUtxwAgZ5W/KrkHf0Rn0fdnLDU9ScxBrEVNUprE/MzirjK4MJUX1/BVDv00Sv8cljtukVK1aky++X1SjQ==", "dependencies": { "regenerator-runtime": "^0.13.11" }, @@ -98,15 +98,15 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.3.tgz", - "integrity": "sha512-uj3pT6Mg+3t39fvLrj8iuCIJ38zKO9FpGtJ4BBJebJhEwjoT+KLVNCcHT5QC9NGRIEi7fZ0ZR8YRb884auB4Lg==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.4.0.tgz", + "integrity": "sha512-7yfvXy6MWLgWSFsLhz5yH3iQ52St8cdUY6FoGieKkRDVxuxmrNuUetIuu6cmjNWwniUHiWXjxCr5tTXDrbYS5A==", "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", "espree": "^9.4.0", - "globals": "^13.15.0", + "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", @@ -121,9 +121,9 @@ } }, "node_modules/@headlessui/vue": { - "version": "1.7.4", - "resolved": "https://registry.npmjs.org/@headlessui/vue/-/vue-1.7.4.tgz", - "integrity": "sha512-QHRlKCK/zRpjSjhth7c2CZvx5eMDFflXauqRdRJgp1CwScx6PwCpWiwDsjQcYM4z8Yik2ZvyX8W4PFT2Wsqqyw==", + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/@headlessui/vue/-/vue-1.7.7.tgz", + "integrity": "sha512-dkdNhJkxyT9rXW5fHx/MkKaM3U13P3duYuwoGTRmDGjE7xAsvcWOSJRJpw1AmCQTvjZF44bh2wSlySLaHW+WuQ==", "dev": true, "engines": { "node": ">=10" @@ -133,9 +133,9 @@ } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.7", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.7.tgz", - "integrity": "sha512-kBbPWzN8oVMLb0hOUYXhmxggL/1cJE6ydvjDIGi9EnAGUyA7cLVKQg+d/Dsm+KZwx2czGHrCmMVLiyg8s5JPKw==", + "version": "0.11.8", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", + "integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==", "dev": true, "dependencies": { "@humanwhocodes/object-schema": "^1.2.1", @@ -1062,13 +1062,13 @@ } }, "node_modules/eslint": { - "version": "8.29.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.29.0.tgz", - "integrity": "sha512-isQ4EEiyUjZFbEKvEGJKKGBwXtvXX+zJbkVKCgTuB9t/+jUBcy8avhkEwWJecI15BkRkOYmvIM5ynbhRjEkoeg==", + "version": "8.30.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.30.0.tgz", + "integrity": "sha512-MGADB39QqYuzEGov+F/qb18r4i7DohCDOfatHaxI2iGlPuC65bwG2gxgO+7DkyL38dRFaRH7RaRAgU6JKL9rMQ==", "dev": true, "dependencies": { - "@eslint/eslintrc": "^1.3.3", - "@humanwhocodes/config-array": "^0.11.6", + "@eslint/eslintrc": "^1.4.0", + "@humanwhocodes/config-array": "^0.11.8", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "ajv": "^6.10.0", @@ -1087,7 +1087,7 @@ "file-entry-cache": "^6.0.1", "find-up": "^5.0.0", "glob-parent": "^6.0.2", - "globals": "^13.15.0", + "globals": "^13.19.0", "grapheme-splitter": "^1.0.4", "ignore": "^5.2.0", "import-fresh": "^3.0.0", @@ -1489,9 +1489,9 @@ } }, "node_modules/globals": { - "version": "13.18.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.18.0.tgz", - "integrity": "sha512-/mR4KI8Ps2spmoc0Ulu9L7agOF0du1CZNQ3dke8yItYlyKNmGrkONemBbd6V8UTc1Wgcqn21t3WYB7dbRmh6/A==", + "version": "13.19.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.19.0.tgz", + "integrity": "sha512-dkQ957uSRWHw7CFXLUtUHQI3g3aWApYhfNR2O6jn/907riyTYKVBmxYVROkBcY614FSSeSJh7Xm7SrUWCxvJMQ==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -1531,9 +1531,9 @@ } }, "node_modules/ignore": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.1.tgz", - "integrity": "sha512-d2qQLzTJ9WxQftPAuEQpSPmKqzxePjzVbpAVv62AQ64NTL+wR4JkrVqR/LqFsFEUsHDAiId52mJteHDFuDkElA==", + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", "dev": true, "engines": { "node": ">= 4" @@ -1957,9 +1957,9 @@ } }, "node_modules/postcss": { - "version": "8.4.19", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.19.tgz", - "integrity": "sha512-h+pbPsyhlYj6N2ozBmHhHrs9DzGmbaarbLvWipMRO7RLS+v4onj26MPFXA5OBYFxyqYhUJK456SwDcY9H2/zsA==", + "version": "8.4.20", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.20.tgz", + "integrity": "sha512-6Q04AXR1212bXr5fh03u8aAwbLxAQNGQ/Q1LNa0VfOI06ZAlhPHtQvE4OIdpj4kLThXilalPnmDSOD65DcHt+g==", "funding": [ { "type": "opencollective", @@ -2163,9 +2163,9 @@ } }, "node_modules/sass": { - "version": "1.56.1", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.56.1.tgz", - "integrity": "sha512-VpEyKpyBPCxE7qGDtOcdJ6fFbcpOM+Emu7uZLxVrkX8KVU/Dp5UF7WLvzqRuUhB6mqqQt1xffLoG+AndxTZrCQ==", + "version": "1.57.1", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.57.1.tgz", + "integrity": "sha512-O2+LwLS79op7GI0xZ8fqzF7X2m/m8WFfI02dHOdsK5R2ECeS5F62zrwg/relM1rjSLy7Vd/DiMNIvPrQGsA0jw==", "dev": true, "dependencies": { "chokidar": ">=3.0.0 <4.0.0", @@ -2524,15 +2524,15 @@ "dev": true }, "@babel/parser": { - "version": "7.20.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.5.tgz", - "integrity": "sha512-r27t/cy/m9uKLXQNWWebeCUHgnAZq0CpG1OwKRxzJMP1vpSU4bSIK2hq+/cp0bQxetkXx38n09rNu8jVkcK/zA==", + "version": "7.20.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.7.tgz", + "integrity": "sha512-T3Z9oHybU+0vZlY9CiDSJQTD5ZapcW18ZctFMi0MOAl/4BjFF4ul7NVSARLdbGO5vDqy9eQiGTV0LtKfvCYvcg==", "peer": true }, "@babel/runtime": { - "version": "7.20.6", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.20.6.tgz", - "integrity": "sha512-Q+8MqP7TiHMWzSfwiJwXCjyf4GYA4Dgw3emg/7xmwsdLJOZUp+nMqcOwOzzYheuM1rhDu8FSj2l0aoMygEuXuA==", + "version": "7.20.7", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.20.7.tgz", + "integrity": "sha512-UF0tvkUtxwAgZ5W/KrkHf0Rn0fdnLDU9ScxBrEVNUprE/MzirjK4MJUX1/BVDv00Sv8cljtukVK1aky++X1SjQ==", "requires": { "regenerator-runtime": "^0.13.11" } @@ -2552,15 +2552,15 @@ "optional": true }, "@eslint/eslintrc": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.3.tgz", - "integrity": "sha512-uj3pT6Mg+3t39fvLrj8iuCIJ38zKO9FpGtJ4BBJebJhEwjoT+KLVNCcHT5QC9NGRIEi7fZ0ZR8YRb884auB4Lg==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.4.0.tgz", + "integrity": "sha512-7yfvXy6MWLgWSFsLhz5yH3iQ52St8cdUY6FoGieKkRDVxuxmrNuUetIuu6cmjNWwniUHiWXjxCr5tTXDrbYS5A==", "dev": true, "requires": { "ajv": "^6.12.4", "debug": "^4.3.2", "espree": "^9.4.0", - "globals": "^13.15.0", + "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", @@ -2569,16 +2569,16 @@ } }, "@headlessui/vue": { - "version": "1.7.4", - "resolved": "https://registry.npmjs.org/@headlessui/vue/-/vue-1.7.4.tgz", - "integrity": "sha512-QHRlKCK/zRpjSjhth7c2CZvx5eMDFflXauqRdRJgp1CwScx6PwCpWiwDsjQcYM4z8Yik2ZvyX8W4PFT2Wsqqyw==", + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/@headlessui/vue/-/vue-1.7.7.tgz", + "integrity": "sha512-dkdNhJkxyT9rXW5fHx/MkKaM3U13P3duYuwoGTRmDGjE7xAsvcWOSJRJpw1AmCQTvjZF44bh2wSlySLaHW+WuQ==", "dev": true, "requires": {} }, "@humanwhocodes/config-array": { - "version": "0.11.7", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.7.tgz", - "integrity": "sha512-kBbPWzN8oVMLb0hOUYXhmxggL/1cJE6ydvjDIGi9EnAGUyA7cLVKQg+d/Dsm+KZwx2czGHrCmMVLiyg8s5JPKw==", + "version": "0.11.8", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", + "integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==", "dev": true, "requires": { "@humanwhocodes/object-schema": "^1.2.1", @@ -3195,13 +3195,13 @@ "dev": true }, "eslint": { - "version": "8.29.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.29.0.tgz", - "integrity": "sha512-isQ4EEiyUjZFbEKvEGJKKGBwXtvXX+zJbkVKCgTuB9t/+jUBcy8avhkEwWJecI15BkRkOYmvIM5ynbhRjEkoeg==", + "version": "8.30.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.30.0.tgz", + "integrity": "sha512-MGADB39QqYuzEGov+F/qb18r4i7DohCDOfatHaxI2iGlPuC65bwG2gxgO+7DkyL38dRFaRH7RaRAgU6JKL9rMQ==", "dev": true, "requires": { - "@eslint/eslintrc": "^1.3.3", - "@humanwhocodes/config-array": "^0.11.6", + "@eslint/eslintrc": "^1.4.0", + "@humanwhocodes/config-array": "^0.11.8", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "ajv": "^6.10.0", @@ -3220,7 +3220,7 @@ "file-entry-cache": "^6.0.1", "find-up": "^5.0.0", "glob-parent": "^6.0.2", - "globals": "^13.15.0", + "globals": "^13.19.0", "grapheme-splitter": "^1.0.4", "ignore": "^5.2.0", "import-fresh": "^3.0.0", @@ -3512,9 +3512,9 @@ } }, "globals": { - "version": "13.18.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.18.0.tgz", - "integrity": "sha512-/mR4KI8Ps2spmoc0Ulu9L7agOF0du1CZNQ3dke8yItYlyKNmGrkONemBbd6V8UTc1Wgcqn21t3WYB7dbRmh6/A==", + "version": "13.19.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.19.0.tgz", + "integrity": "sha512-dkQ957uSRWHw7CFXLUtUHQI3g3aWApYhfNR2O6jn/907riyTYKVBmxYVROkBcY614FSSeSJh7Xm7SrUWCxvJMQ==", "dev": true, "requires": { "type-fest": "^0.20.2" @@ -3542,9 +3542,9 @@ "dev": true }, "ignore": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.1.tgz", - "integrity": "sha512-d2qQLzTJ9WxQftPAuEQpSPmKqzxePjzVbpAVv62AQ64NTL+wR4JkrVqR/LqFsFEUsHDAiId52mJteHDFuDkElA==", + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", "dev": true }, "immutable": { @@ -3865,9 +3865,9 @@ "dev": true }, "postcss": { - "version": "8.4.19", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.19.tgz", - "integrity": "sha512-h+pbPsyhlYj6N2ozBmHhHrs9DzGmbaarbLvWipMRO7RLS+v4onj26MPFXA5OBYFxyqYhUJK456SwDcY9H2/zsA==", + "version": "8.4.20", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.20.tgz", + "integrity": "sha512-6Q04AXR1212bXr5fh03u8aAwbLxAQNGQ/Q1LNa0VfOI06ZAlhPHtQvE4OIdpj4kLThXilalPnmDSOD65DcHt+g==", "requires": { "nanoid": "^3.3.4", "picocolors": "^1.0.0", @@ -3987,9 +3987,9 @@ } }, "sass": { - "version": "1.56.1", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.56.1.tgz", - "integrity": "sha512-VpEyKpyBPCxE7qGDtOcdJ6fFbcpOM+Emu7uZLxVrkX8KVU/Dp5UF7WLvzqRuUhB6mqqQt1xffLoG+AndxTZrCQ==", + "version": "1.57.1", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.57.1.tgz", + "integrity": "sha512-O2+LwLS79op7GI0xZ8fqzF7X2m/m8WFfI02dHOdsK5R2ECeS5F62zrwg/relM1rjSLy7Vd/DiMNIvPrQGsA0jw==", "dev": true, "requires": { "chokidar": ">=3.0.0 <4.0.0", diff --git a/package.json b/package.json index ac0710d2..9e00b506 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@protonemedia/laravel-splade", - "version": "1.1.0", + "version": "1.1.1", "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 857ff0a9..b2bdc853 100644 --- a/src/Commands/SpladeInstallCommand.php +++ b/src/Commands/SpladeInstallCommand.php @@ -32,7 +32,7 @@ public function handle(): int // Install NPM packages... $this->updateNodePackages(function ($packages) { return [ - '@protonemedia/laravel-splade' => '^1.1.0', + '@protonemedia/laravel-splade' => '^1.1.1', '@tailwindcss/forms' => '^0.5.2', '@tailwindcss/typography' => '^0.5.2', '@vitejs/plugin-vue' => '^3.0.0',