@ddict/popup 1.0.15 → 1.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/popup.es.js +491 -488
- package/dist/popup.umd.js +1 -1
- package/package.json +1 -1
package/dist/popup.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { openBlock as w, createElementBlock as $, createElementVNode as C, computed as S, unref as M, shallowRef as fn, watch as
|
|
1
|
+
import { openBlock as w, createElementBlock as $, createElementVNode as C, computed as S, unref as M, shallowRef as fn, watch as F, triggerRef as at, onScopeDispose as et, ref as E, onUnmounted as tt, inject as Ie, watchEffect as ie, onMounted as xe, cloneVNode as Et, h as Ee, Fragment as Z, defineComponent as ae, provide as nt, reactive as Ot, nextTick as Q, toRaw as K, mergeModels as pn, useModel as vn, createBlock as ee, withCtx as Pe, createVNode as H, renderList as se, normalizeClass as Ce, toDisplayString as te, effectScope as $t, markRaw as de, hasInjectionContext as hn, getCurrentInstance as Tt, isRef as _e, isReactive as ot, toRef as We, getCurrentScope as It, toRefs as ut, createCommentVNode as X, withModifiers as ct, createTextVNode as mn, withDirectives as Lt, vModelText as Pt, pushScopeId as gn, popScopeId as bn } from "vue";
|
|
2
2
|
const Cn = "data:image/svg+xml,%3csvg%20width='96'%20height='32'%20viewBox='0%200%2096%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M40.151%208.94498H35.7256V23.055H40.151C44.7473%2023.055%2047.826%2020.0825%2047.826%2015.9795C47.8267%2011.8093%2044.7678%208.94498%2040.151%208.94498ZM40.1312%2021.025H37.993V10.9974H40.1312C43.4217%2010.9974%2045.4972%2012.9846%2045.4972%2015.9795C45.4965%2018.9296%2043.4012%2021.025%2040.1312%2021.025Z'%20fill='%233B5695'/%3e%3cpath%20d='M54.5158%208.94498H50.0903V23.055H54.5158C59.1121%2023.055%2062.1908%2020.0825%2062.1908%2015.9795C62.1914%2011.8093%2059.1351%208.94498%2054.5158%208.94498ZM54.496%2021.025H52.3578V10.9974H54.496C57.789%2010.9974%2059.8619%2012.9846%2059.8619%2015.9795C59.8613%2018.9296%2057.766%2021.025%2054.496%2021.025Z'%20fill='%233B5695'/%3e%3cpath%20d='M66.7237%208.94498H64.4575V23.055H66.7237V8.94498Z'%20fill='%233B5695'/%3e%3cpath%20d='M76.4301%2010.7837C78.29%2010.7837%2079.7436%2011.6603%2080.7487%2013.2207L82.4589%2011.9591C81.2401%209.97057%2078.9957%208.70953%2076.409%208.70953C72.3898%208.64555%2068.9048%2011.9591%2068.9906%2016C68.9048%2020.0403%2072.3898%2023.3544%2076.409%2023.2905C79.0385%2023.2905%2081.2618%2022.0294%2082.4589%2020.0409L80.7487%2018.7793C79.7436%2020.3397%2078.29%2021.2163%2076.4301%2021.2163C73.544%2021.2163%2071.3418%2018.993%2071.3418%2016C71.3418%2013.007%2073.5433%2010.7837%2076.4301%2010.7837Z'%20fill='%233B5695'/%3e%3cpath%20d='M83.3135%208.94498V10.9757H88.0595V23.055H90.3256V10.9757H95.0934V8.94498H83.3135Z'%20fill='%233B5695'/%3e%3cpath%20d='M8.66351%204.7121H4.604V15.4427L6.87208%2013.3839V6.79143H8.64559C11.4639%206.79143%2013.2835%208.47857%2013.2835%2011.0877C13.2835%2013.6916%2011.421%2015.4427%208.64559%2015.4427H4.604V17.5016H8.66351C12.7531%2017.5016%2015.6098%2014.8644%2015.6098%2011.0877C15.6104%207.27575%2012.8196%204.7121%208.66351%204.7121Z'%20fill='%233B5695'/%3e%3cpath%20d='M26.2425%209.25528H21.5502L20.7537%2014.293L21.4523%2014.3308L21.4069%2014.7294C21.3916%2014.8656%2021.3289%2015.0448%2021.112%2015.1734C21.1017%2015.9399%2021.0845%2017.0493%2020.9706%2018.1766H26.5937V19.8586H21.4677C22.4133%2022.9424%2024.1254%2024.9648%2026.5611%2025.8669L27.1536%2026.0864L26.6795%2026.5048C26.4875%2026.6737%2026.2182%2027.0141%2026.0896%2027.2489L25.9258%2027.5438L25.6155%2027.4152C23.167%2026.4095%2021.4223%2024.4926%2020.2905%2021.563C19.3602%2024.3365%2017.5797%2026.2553%2014.8592%2027.428L14.5438%2027.5617L14.3775%2027.2642C14.2764%2027.08%2014.0294%2026.7876%2013.8151%2026.5989L13.3564%2026.1951L13.9239%2025.9655C16.4555%2024.9392%2018.064%2023.1414%2018.8228%2020.4837C19.6647%2019.8381%2020.2099%2018.8221%2020.2169%2017.6801V4.53231C20.2169%202.58349%2018.6334%201%2016.6846%201H3.53487C1.58349%201%200%202.58349%200%204.53231V17.6795C0%2019.6283%201.58349%2021.2143%203.53487%2021.2143H8.25528V27.2431C8.25528%2029.3135%209.93986%2031%2012.0096%2031H26.2431C28.3161%2031%2029.9974%2029.3129%2029.9974%2027.2431V13.0096C29.9974%2010.9392%2028.3154%209.25528%2026.2425%209.25528ZM3.53487%2019.4517C2.55662%2019.4517%201.762%2018.6603%201.762%2017.6788V4.53231C1.762%203.55662%202.55598%202.762%203.53487%202.762H16.6839C17.6571%202.762%2018.4517%203.55598%2018.4517%204.53231V17.6795C18.4517%2017.778%2018.444%2017.8733%2018.4267%2017.9667C18.3941%2018.1811%2018.3231%2018.38%2018.215%2018.5592C17.9149%2019.0934%2017.3372%2019.4517%2016.6846%2019.4517H3.53487Z'%20fill='%233B5695'/%3e%3c/svg%3e", _n = "data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M6.5%203.25C5.25736%203.25%204.25%204.25736%204.25%205.5H3.5H2.75C2.75%203.42893%204.42893%201.75%206.5%201.75H17.5C17.9142%201.75%2018.25%202.08579%2018.25%202.5V15.5C18.25%2015.9142%2017.9142%2016.25%2017.5%2016.25H6.5C5.26293%2016.25%204.25%2017.2576%204.25%2018.5C4.25%2018.9142%203.91421%2019.25%203.5%2019.25C3.08579%2019.25%202.75%2018.9142%202.75%2018.5V5.5C2.75%205.49993%202.75%205.5%203.5%205.5C4.25%205.5%204.25%205.49993%204.25%205.5V15.5017C4.87779%2015.0296%205.65755%2014.75%206.5%2014.75H16.75V3.25H6.5Z'%20fill='%233B5695'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M20.5%202.75C20.9142%202.75%2021.25%203.08579%2021.25%203.5V21.5C21.25%2021.9142%2020.9142%2022.25%2020.5%2022.25H6.5C4.42893%2022.25%202.75%2020.5711%202.75%2018.5C2.75%2016.4289%204.42893%2014.75%206.5%2014.75H17.4995C17.4996%2014.75%2017.5%2014.75%2017.5%2015.5C17.5%2016.25%2017.5001%2016.25%2017.5%2016.25H6.5C5.25736%2016.25%204.25%2017.2574%204.25%2018.5C4.25%2019.7426%205.25736%2020.75%206.5%2020.75H19.75V3.5C19.75%203.08579%2020.0858%202.75%2020.5%202.75ZM18.25%2015.5C18.25%2015.9142%2017.9142%2016.25%2017.5%2016.25V15.5L17.4995%2014.75C17.9137%2014.75%2018.25%2015.0858%2018.25%2015.5Z'%20fill='%233B5695'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M6.25%2018.5C6.25%2018.0858%206.58579%2017.75%207%2017.75H17C17.4142%2017.75%2017.75%2018.0858%2017.75%2018.5C17.75%2018.9142%2017.4142%2019.25%2017%2019.25H7C6.58579%2019.25%206.25%2018.9142%206.25%2018.5Z'%20fill='%233B5695'/%3e%3c/svg%3e", xn = "data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.467%202.47236C2.75841%202.17799%203.23328%202.17559%203.52764%202.467L8.52765%207.41675C8.82201%207.70816%208.82441%208.18303%208.533%208.4774C8.24159%208.77176%207.76672%208.77416%207.47235%208.48275L2.47236%203.533C2.17799%203.24159%202.17559%202.76672%202.467%202.47236Z'%20fill='%233B5695'/%3e%3cpath%20d='M8.533%2015.4724C8.82441%2015.7667%208.82201%2016.2416%208.52765%2016.533L3.52765%2021.4828C3.23328%2021.7742%202.75841%2021.7718%202.467%2021.4774C2.17559%2021.183%202.17799%2020.7082%202.47236%2020.4167L7.47235%2015.467C7.76672%2015.1756%208.24159%2015.178%208.533%2015.4724Z'%20fill='%233B5695'/%3e%3cpath%20d='M15.52%2015.4697C15.8129%2015.1768%2016.2877%2015.1768%2016.5806%2015.4697L21.5304%2020.4194C21.8233%2020.7123%2021.8233%2021.1872%2021.5304%2021.4801C21.2375%2021.773%2020.7626%2021.773%2020.4697%2021.4801L15.52%2016.5303C15.2271%2016.2374%2015.2271%2015.7626%2015.52%2015.4697Z'%20fill='%233B5695'/%3e%3cpath%20d='M21.4801%202.46967C21.773%202.76256%2021.773%203.23744%2021.4801%203.53033L16.5303%208.48008C16.2374%208.77297%2015.7626%208.77297%2015.4697%208.48008C15.1768%208.18719%2015.1768%207.71231%2015.4697%207.41942L20.4194%202.46967C20.7123%202.17678%2021.1872%202.17678%2021.4801%202.46967Z'%20fill='%233B5695'/%3e%3cpath%20d='M15.75%203C15.75%202.58579%2016.0858%202.25%2016.5%202.25H21C21.4142%202.25%2021.75%202.58579%2021.75%203V7.5C21.75%207.91421%2021.4142%208.25%2021%208.25C20.5858%208.25%2020.25%207.91421%2020.25%207.5V3.75H16.5C16.0858%203.75%2015.75%203.41421%2015.75%203Z'%20fill='%233B5695'/%3e%3cpath%20d='M21%2015.75C21.4142%2015.75%2021.75%2016.0858%2021.75%2016.5V21C21.75%2021.4142%2021.4142%2021.75%2021%2021.75H16.5C16.0858%2021.75%2015.75%2021.4142%2015.75%2021C15.75%2020.5858%2016.0858%2020.25%2016.5%2020.25H20.25V16.5C20.25%2016.0858%2020.5858%2015.75%2021%2015.75Z'%20fill='%233B5695'/%3e%3cpath%20d='M3%2015.75C3.41421%2015.75%203.75%2016.0858%203.75%2016.5V20.25H7.5C7.91421%2020.25%208.25%2020.5858%208.25%2021C8.25%2021.4142%207.91421%2021.75%207.5%2021.75H3C2.58579%2021.75%202.25%2021.4142%202.25%2021V16.5C2.25%2016.0858%202.58579%2015.75%203%2015.75Z'%20fill='%233B5695'/%3e%3cpath%20d='M2.25%203C2.25%202.58579%202.58579%202.25%203%202.25H7.5C7.91421%202.25%208.25%202.58579%208.25%203C8.25%203.41421%207.91421%203.75%207.5%203.75H3.75V7.5C3.75%207.91421%203.41421%208.25%203%208.25C2.58579%208.25%202.25%207.91421%202.25%207.5V3Z'%20fill='%233B5695'/%3e%3c/svg%3e", yn = "data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9.12596%201.63869C9.46935%201.54364%209.83221%201.70329%209.99413%202.02068C10.3672%202.75191%2011.1261%203.25%2012%203.25C12.8739%203.25%2013.6328%202.75191%2014.0059%202.02068C14.1678%201.70329%2014.5307%201.54364%2014.874%201.63869C16.5585%202.10497%2018.0759%202.9704%2019.3184%204.12574C19.5611%204.35137%2019.6269%204.70948%2019.4804%205.00666C19.3331%205.30535%2019.25%205.6419%2019.25%206C19.25%207.24263%2020.2574%208.25%2021.5%208.25L21.5314%208.24977C21.8629%208.24504%2022.1583%208.45859%2022.2576%208.77495C22.5777%209.79397%2022.75%2010.8776%2022.75%2012C22.75%2012.7408%2022.6749%2013.4649%2022.5318%2014.1648C22.4548%2014.5411%2022.1059%2014.7985%2021.7237%2014.7609C21.6504%2014.7537%2021.5758%2014.75%2021.5%2014.75C20.2574%2014.75%2019.25%2015.7574%2019.25%2017C19.25%2017.5531%2019.4486%2018.0579%2019.7793%2018.4498C20.027%2018.7434%2020.0128%2019.1767%2019.7465%2019.4535C18.4777%2020.7719%2016.8745%2021.7678%2015.0721%2022.3044C14.6807%2022.4209%2014.2681%2022.2029%2014.1437%2021.814C13.8535%2020.906%2013.0024%2020.25%2012%2020.25C10.9976%2020.25%2010.1465%2020.906%209.85629%2021.814C9.73195%2022.2029%209.31927%2022.4209%208.92789%2022.3044C7.12545%2021.7678%205.52229%2020.7719%204.25353%2019.4535C3.98716%2019.1767%203.97299%2018.7434%204.22072%2018.4498C4.55139%2018.0579%204.75%2017.5531%204.75%2017C4.75%2015.7574%203.74264%2014.75%202.5%2014.75C2.42423%2014.75%202.34963%2014.7537%202.27634%2014.7609C1.89406%2014.7985%201.54519%2014.5411%201.46821%2014.1648C1.32505%2013.4649%201.25%2012.7408%201.25%2012C1.25%2010.8776%201.42227%209.79398%201.74236%208.77494C1.84173%208.45859%202.13705%208.24504%202.4686%208.24977L2.5%208.25C3.74264%208.25%204.75%207.24263%204.75%206C4.75%205.6419%204.66689%205.30535%204.51962%205.00666C4.3731%204.70948%204.43894%204.35137%204.68159%204.12574C5.92411%202.9704%207.44153%202.10497%209.12596%201.63869ZM6.08277%204.88991C6.19152%205.24123%206.25%205.61424%206.25%206C6.25%207.88945%204.85261%209.45253%203.03493%209.71213C2.84898%2010.4432%202.75%2011.2096%202.75%2012C2.75%2012.4294%202.77921%2012.8516%202.83567%2013.2648C4.74948%2013.4346%206.25%2015.0421%206.25%2017C6.25%2017.6669%206.0754%2018.2941%205.76971%2018.8372C6.62645%2019.6184%207.63002%2020.2404%208.73362%2020.657C9.37706%2019.5189%2010.598%2018.75%2012%2018.75C13.402%2018.75%2014.6229%2019.5189%2015.2664%2020.657C16.37%2020.2404%2017.3735%2019.6184%2018.2303%2018.8372C17.9246%2018.2941%2017.75%2017.6669%2017.75%2017C17.75%2015.0421%2019.2505%2013.4346%2021.1643%2013.2648C21.2208%2012.8516%2021.25%2012.4294%2021.25%2012C21.25%2011.2096%2021.151%2010.4432%2020.9651%209.71213C19.1474%209.45252%2017.75%207.88945%2017.75%206C17.75%205.61424%2017.8085%205.24123%2017.9172%204.88991C17.0618%204.1771%2016.0762%203.61614%2015.0018%203.24775C14.3184%204.15897%2013.2287%204.75%2012%204.75C10.7713%204.75%209.68158%204.15897%208.99819%203.24775C7.92382%203.61614%206.93823%204.1771%206.08277%204.88991Z'%20fill='%233B5695'/%3e%3cpath%20d='M7.75%2012C7.75%209.65278%209.65279%207.75%2012%207.75C14.3472%207.75%2016.25%209.65278%2016.25%2012C16.25%2014.3472%2014.3472%2016.25%2012%2016.25C9.65279%2016.25%207.75%2014.3472%207.75%2012ZM12%209.25C10.4812%209.25%209.25%2010.4812%209.25%2012C9.25%2013.5188%2010.4812%2014.75%2012%2014.75C13.5188%2014.75%2014.75%2013.5188%2014.75%2012C14.75%2010.4812%2013.5188%209.25%2012%209.25Z'%20fill='%233B5695'/%3e%3c/svg%3e", wn = { class: "flex justify-between" }, Sn = /* @__PURE__ */ C("div", { class: "flex flex-row" }, [
|
|
3
3
|
/* @__PURE__ */ C("img", {
|
|
4
4
|
src: Cn,
|
|
@@ -33,15 +33,15 @@ const Cn = "data:image/svg+xml,%3csvg%20width='96'%20height='32'%20viewBox='0%20
|
|
|
33
33
|
C("div", En, [
|
|
34
34
|
C("button", {
|
|
35
35
|
class: "btn btn-ghost btn-circle",
|
|
36
|
-
onClick: l[0] || (l[0] = (
|
|
36
|
+
onClick: l[0] || (l[0] = (r) => t("reader"))
|
|
37
37
|
}, $n),
|
|
38
38
|
C("button", {
|
|
39
39
|
class: "btn btn-ghost btn-circle md:hidden",
|
|
40
|
-
onClick: l[1] || (l[1] = (
|
|
40
|
+
onClick: l[1] || (l[1] = (r) => t("fullScreen"))
|
|
41
41
|
}, In),
|
|
42
42
|
C("button", {
|
|
43
43
|
class: "btn btn-ghost btn-circle",
|
|
44
|
-
onClick: l[2] || (l[2] = (
|
|
44
|
+
onClick: l[2] || (l[2] = (r) => t("settings"))
|
|
45
45
|
}, Pn)
|
|
46
46
|
])
|
|
47
47
|
]));
|
|
@@ -50,15 +50,15 @@ const Cn = "data:image/svg+xml,%3csvg%20width='96'%20height='32'%20viewBox='0%20
|
|
|
50
50
|
function ye(e, o, t) {
|
|
51
51
|
let n = t.initialDeps ?? [], l;
|
|
52
52
|
return () => {
|
|
53
|
-
var
|
|
53
|
+
var r, i, s, a;
|
|
54
54
|
let u;
|
|
55
|
-
t.key && ((
|
|
55
|
+
t.key && ((r = t.debug) != null && r.call(t)) && (u = Date.now());
|
|
56
56
|
const f = e();
|
|
57
57
|
if (!(f.length !== n.length || f.some((x, v) => n[v] !== x)))
|
|
58
58
|
return l;
|
|
59
59
|
n = f;
|
|
60
60
|
let m;
|
|
61
|
-
if (t.key && ((
|
|
61
|
+
if (t.key && ((i = t.debug) != null && i.call(t)) && (m = Date.now()), l = o(...f), t.key && ((s = t.debug) != null && s.call(t))) {
|
|
62
62
|
const x = Math.round((Date.now() - u) * 100) / 100, v = Math.round((Date.now() - m) * 100) / 100, h = v / 16, V = (A, T) => {
|
|
63
63
|
for (A = String(A); A.length < T; )
|
|
64
64
|
A = " " + A;
|
|
@@ -101,15 +101,15 @@ const kn = (e, o) => Math.abs(e - o) < 1, Mn = (e, o, t) => {
|
|
|
101
101
|
const n = e.targetWindow;
|
|
102
102
|
if (!n)
|
|
103
103
|
return;
|
|
104
|
-
const l = (
|
|
105
|
-
const { width: s, height: a } =
|
|
104
|
+
const l = (i) => {
|
|
105
|
+
const { width: s, height: a } = i;
|
|
106
106
|
o({ width: Math.round(s), height: Math.round(a) });
|
|
107
107
|
};
|
|
108
108
|
if (l(t.getBoundingClientRect()), !n.ResizeObserver)
|
|
109
109
|
return () => {
|
|
110
110
|
};
|
|
111
|
-
const
|
|
112
|
-
const s =
|
|
111
|
+
const r = new n.ResizeObserver((i) => {
|
|
112
|
+
const s = i[0];
|
|
113
113
|
if (s != null && s.borderBoxSize) {
|
|
114
114
|
const a = s.borderBoxSize[0];
|
|
115
115
|
if (a) {
|
|
@@ -119,10 +119,10 @@ const kn = (e, o) => Math.abs(e - o) < 1, Mn = (e, o, t) => {
|
|
|
119
119
|
}
|
|
120
120
|
l(t.getBoundingClientRect());
|
|
121
121
|
});
|
|
122
|
-
return
|
|
123
|
-
|
|
122
|
+
return r.observe(t, { box: "border-box" }), () => {
|
|
123
|
+
r.unobserve(t);
|
|
124
124
|
};
|
|
125
|
-
},
|
|
125
|
+
}, dt = {
|
|
126
126
|
passive: !0
|
|
127
127
|
}, Dn = typeof window > "u" ? !0 : "onscrollend" in window, Fn = (e, o) => {
|
|
128
128
|
const t = e.scrollElement;
|
|
@@ -132,17 +132,17 @@ const kn = (e, o) => Math.abs(e - o) < 1, Mn = (e, o, t) => {
|
|
|
132
132
|
if (!n)
|
|
133
133
|
return;
|
|
134
134
|
let l = 0;
|
|
135
|
-
const
|
|
135
|
+
const r = Dn ? () => {
|
|
136
136
|
} : Mn(
|
|
137
137
|
n,
|
|
138
138
|
() => {
|
|
139
139
|
o(l, !1);
|
|
140
140
|
},
|
|
141
141
|
e.options.isScrollingResetDelay
|
|
142
|
-
),
|
|
143
|
-
l = t[e.options.horizontal ? "scrollLeft" : "scrollTop"],
|
|
144
|
-
}, s =
|
|
145
|
-
return a(), t.addEventListener("scroll", s,
|
|
142
|
+
), i = (u) => () => {
|
|
143
|
+
l = t[e.options.horizontal ? "scrollLeft" : "scrollTop"], r(), o(l, u);
|
|
144
|
+
}, s = i(!0), a = i(!1);
|
|
145
|
+
return a(), t.addEventListener("scroll", s, dt), t.addEventListener("scrollend", a, dt), () => {
|
|
146
146
|
t.removeEventListener("scroll", s), t.removeEventListener("scrollend", a);
|
|
147
147
|
};
|
|
148
148
|
}, jn = (e, o, t) => {
|
|
@@ -160,10 +160,10 @@ const kn = (e, o) => Math.abs(e - o) < 1, Mn = (e, o, t) => {
|
|
|
160
160
|
adjustments: o = 0,
|
|
161
161
|
behavior: t
|
|
162
162
|
}, n) => {
|
|
163
|
-
var l,
|
|
164
|
-
const
|
|
165
|
-
(
|
|
166
|
-
[n.options.horizontal ? "left" : "top"]:
|
|
163
|
+
var l, r;
|
|
164
|
+
const i = e + o;
|
|
165
|
+
(r = (l = n.scrollElement) == null ? void 0 : l.scrollTo) == null || r.call(l, {
|
|
166
|
+
[n.options.horizontal ? "left" : "top"]: i,
|
|
167
167
|
behavior: t
|
|
168
168
|
});
|
|
169
169
|
};
|
|
@@ -172,8 +172,8 @@ class Hn {
|
|
|
172
172
|
this.unsubs = [], this.scrollElement = null, this.targetWindow = null, this.isScrolling = !1, this.scrollToIndexTimeoutId = null, this.measurementsCache = [], this.itemSizeCache = /* @__PURE__ */ new Map(), this.pendingMeasuredCacheIndexes = [], this.scrollRect = null, this.scrollOffset = null, this.scrollDirection = null, this.scrollAdjustments = 0, this.elementsCache = /* @__PURE__ */ new Map(), this.observer = /* @__PURE__ */ (() => {
|
|
173
173
|
let t = null;
|
|
174
174
|
const n = () => t || (!this.targetWindow || !this.targetWindow.ResizeObserver ? null : t = new this.targetWindow.ResizeObserver((l) => {
|
|
175
|
-
l.forEach((
|
|
176
|
-
this._measureElement(
|
|
175
|
+
l.forEach((r) => {
|
|
176
|
+
this._measureElement(r.target, r);
|
|
177
177
|
});
|
|
178
178
|
}));
|
|
179
179
|
return {
|
|
@@ -182,12 +182,12 @@ class Hn {
|
|
|
182
182
|
return (l = n()) == null ? void 0 : l.disconnect();
|
|
183
183
|
},
|
|
184
184
|
observe: (l) => {
|
|
185
|
-
var
|
|
186
|
-
return (
|
|
185
|
+
var r;
|
|
186
|
+
return (r = n()) == null ? void 0 : r.observe(l, { box: "border-box" });
|
|
187
187
|
},
|
|
188
188
|
unobserve: (l) => {
|
|
189
|
-
var
|
|
190
|
-
return (
|
|
189
|
+
var r;
|
|
190
|
+
return (r = n()) == null ? void 0 : r.unobserve(l);
|
|
191
191
|
}
|
|
192
192
|
};
|
|
193
193
|
})(), this.range = null, this.setOptions = (t) => {
|
|
@@ -218,12 +218,12 @@ class Hn {
|
|
|
218
218
|
...t
|
|
219
219
|
};
|
|
220
220
|
}, this.notify = (t, n) => {
|
|
221
|
-
var l,
|
|
222
|
-
const { startIndex:
|
|
221
|
+
var l, r;
|
|
222
|
+
const { startIndex: i, endIndex: s } = this.range ?? {
|
|
223
223
|
startIndex: void 0,
|
|
224
224
|
endIndex: void 0
|
|
225
225
|
}, a = this.calculateRange();
|
|
226
|
-
(t ||
|
|
226
|
+
(t || i !== (a == null ? void 0 : a.startIndex) || s !== (a == null ? void 0 : a.endIndex)) && ((r = (l = this.options).onChange) == null || r.call(l, this, n));
|
|
227
227
|
}, this.cleanup = () => {
|
|
228
228
|
this.unsubs.filter(Boolean).forEach((t) => t()), this.unsubs = [], this.scrollElement = null, this.targetWindow = null, this.observer.disconnect(), this.elementsCache.clear();
|
|
229
229
|
}, this._didMount = () => () => {
|
|
@@ -244,26 +244,26 @@ class Hn {
|
|
|
244
244
|
this.scrollRect = l, this.notify(!1, !1);
|
|
245
245
|
})
|
|
246
246
|
), this.unsubs.push(
|
|
247
|
-
this.options.observeElementOffset(this, (l,
|
|
248
|
-
this.scrollAdjustments = 0, this.scrollDirection =
|
|
249
|
-
const
|
|
250
|
-
this.isScrolling =
|
|
247
|
+
this.options.observeElementOffset(this, (l, r) => {
|
|
248
|
+
this.scrollAdjustments = 0, this.scrollDirection = r ? this.getScrollOffset() < l ? "forward" : "backward" : null, this.scrollOffset = l;
|
|
249
|
+
const i = this.isScrolling;
|
|
250
|
+
this.isScrolling = r, this.notify(i !== r, r);
|
|
251
251
|
})
|
|
252
252
|
);
|
|
253
253
|
}
|
|
254
254
|
}, this.getSize = () => this.options.enabled ? (this.scrollRect = this.scrollRect ?? this.options.initialRect, this.scrollRect[this.options.horizontal ? "width" : "height"]) : (this.scrollRect = null, 0), this.getScrollOffset = () => this.options.enabled ? (this.scrollOffset = this.scrollOffset ?? (typeof this.options.initialOffset == "function" ? this.options.initialOffset() : this.options.initialOffset), this.scrollOffset) : (this.scrollOffset = null, 0), this.getFurthestMeasurement = (t, n) => {
|
|
255
|
-
const l = /* @__PURE__ */ new Map(),
|
|
256
|
-
for (let
|
|
257
|
-
const s = t[
|
|
255
|
+
const l = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
|
|
256
|
+
for (let i = n - 1; i >= 0; i--) {
|
|
257
|
+
const s = t[i];
|
|
258
258
|
if (l.has(s.lane))
|
|
259
259
|
continue;
|
|
260
|
-
const a =
|
|
260
|
+
const a = r.get(
|
|
261
261
|
s.lane
|
|
262
262
|
);
|
|
263
|
-
if (a == null || s.end > a.end ?
|
|
263
|
+
if (a == null || s.end > a.end ? r.set(s.lane, s) : s.end < a.end && l.set(s.lane, !0), l.size === this.options.lanes)
|
|
264
264
|
break;
|
|
265
265
|
}
|
|
266
|
-
return
|
|
266
|
+
return r.size === this.options.lanes ? Array.from(r.values()).sort((i, s) => i.end === s.end ? i.index - s.index : i.end - s.end)[0] : void 0;
|
|
267
267
|
}, this.getMeasurementOptions = ye(
|
|
268
268
|
() => [
|
|
269
269
|
this.options.count,
|
|
@@ -272,21 +272,21 @@ class Hn {
|
|
|
272
272
|
this.options.getItemKey,
|
|
273
273
|
this.options.enabled
|
|
274
274
|
],
|
|
275
|
-
(t, n, l,
|
|
275
|
+
(t, n, l, r, i) => (this.pendingMeasuredCacheIndexes = [], {
|
|
276
276
|
count: t,
|
|
277
277
|
paddingStart: n,
|
|
278
278
|
scrollMargin: l,
|
|
279
|
-
getItemKey:
|
|
280
|
-
enabled:
|
|
279
|
+
getItemKey: r,
|
|
280
|
+
enabled: i
|
|
281
281
|
}),
|
|
282
282
|
{
|
|
283
283
|
key: !1
|
|
284
284
|
}
|
|
285
285
|
), this.getMeasurements = ye(
|
|
286
286
|
() => [this.getMeasurementOptions(), this.itemSizeCache],
|
|
287
|
-
({ count: t, paddingStart: n, scrollMargin: l, getItemKey:
|
|
287
|
+
({ count: t, paddingStart: n, scrollMargin: l, getItemKey: r, enabled: i }, s) => {
|
|
288
288
|
var a;
|
|
289
|
-
if (!
|
|
289
|
+
if (!i)
|
|
290
290
|
return this.measurementsCache = [], this.itemSizeCache.clear(), [];
|
|
291
291
|
this.measurementsCache.length === 0 && (this.measurementsCache = this.options.initialMeasurementsCache, this.measurementsCache.forEach((p) => {
|
|
292
292
|
this.itemSizeCache.set(p.key, p.size);
|
|
@@ -297,7 +297,7 @@ class Hn {
|
|
|
297
297
|
for (let p = u; p < t; p++) {
|
|
298
298
|
let m = (a = this.measurementsCache[p]) == null ? void 0 : a.measureElement;
|
|
299
299
|
m || (m = (D) => {
|
|
300
|
-
const _ =
|
|
300
|
+
const _ = r(p), L = this.elementsCache.get(_);
|
|
301
301
|
if (!D) {
|
|
302
302
|
L && (this.observer.unobserve(L), this.elementsCache.delete(_));
|
|
303
303
|
return;
|
|
@@ -307,7 +307,7 @@ class Hn {
|
|
|
307
307
|
this.options.measureElement(D, void 0, this)
|
|
308
308
|
);
|
|
309
309
|
});
|
|
310
|
-
const x =
|
|
310
|
+
const x = r(p), v = this.options.lanes === 1 ? f[p - 1] : this.getFurthestMeasurement(f, p), h = v ? v.end + this.options.gap : n + l, V = s.get(x), A = typeof V == "number" ? V : this.options.estimateSize(p), T = h + A, R = v ? v.lane : p % this.options.lanes;
|
|
311
311
|
f[p] = {
|
|
312
312
|
index: p,
|
|
313
313
|
start: h,
|
|
@@ -342,11 +342,11 @@ class Hn {
|
|
|
342
342
|
this.options.overscan,
|
|
343
343
|
this.options.count
|
|
344
344
|
],
|
|
345
|
-
(t, n, l,
|
|
345
|
+
(t, n, l, r) => n === null ? [] : t({
|
|
346
346
|
startIndex: n.startIndex,
|
|
347
347
|
endIndex: n.endIndex,
|
|
348
348
|
overscan: l,
|
|
349
|
-
count:
|
|
349
|
+
count: r
|
|
350
350
|
}),
|
|
351
351
|
{
|
|
352
352
|
key: process.env.NODE_ENV !== "production" && "getIndexes",
|
|
@@ -358,22 +358,22 @@ class Hn {
|
|
|
358
358
|
`Missing attribute name '${n}={index}' on measured element.`
|
|
359
359
|
), -1);
|
|
360
360
|
}, this._measureElement = (t, n) => {
|
|
361
|
-
const l = this.indexFromElement(t),
|
|
362
|
-
if (!
|
|
361
|
+
const l = this.indexFromElement(t), r = this.getMeasurements()[l];
|
|
362
|
+
if (!r || !t.isConnected) {
|
|
363
363
|
this.elementsCache.forEach((s, a) => {
|
|
364
364
|
s === t && (this.observer.unobserve(t), this.elementsCache.delete(a));
|
|
365
365
|
});
|
|
366
366
|
return;
|
|
367
367
|
}
|
|
368
|
-
const
|
|
369
|
-
|
|
368
|
+
const i = this.elementsCache.get(r.key);
|
|
369
|
+
i !== t && (i && this.observer.unobserve(i), this.observer.observe(t), this.elementsCache.set(r.key, t)), this.resizeItem(l, this.options.measureElement(t, n, this));
|
|
370
370
|
}, this.resizeItem = (t, n) => {
|
|
371
371
|
const l = this.getMeasurements()[t];
|
|
372
372
|
if (!l)
|
|
373
373
|
return;
|
|
374
|
-
const
|
|
375
|
-
|
|
376
|
-
adjustments: this.scrollAdjustments +=
|
|
374
|
+
const r = this.itemSizeCache.get(l.key) ?? l.size, i = n - r;
|
|
375
|
+
i !== 0 && ((this.shouldAdjustScrollPositionOnItemSizeChange !== void 0 ? this.shouldAdjustScrollPositionOnItemSizeChange(l, i, this) : l.start < this.getScrollOffset() + this.scrollAdjustments) && (process.env.NODE_ENV !== "production" && this.options.debug && console.info("correction", i), this._scrollToOffset(this.getScrollOffset(), {
|
|
376
|
+
adjustments: this.scrollAdjustments += i,
|
|
377
377
|
behavior: void 0
|
|
378
378
|
})), this.pendingMeasuredCacheIndexes.push(l.index), this.itemSizeCache = new Map(this.itemSizeCache.set(l.key, n)), this.notify(!0, !1));
|
|
379
379
|
}, this.measureElement = (t) => {
|
|
@@ -382,8 +382,8 @@ class Hn {
|
|
|
382
382
|
() => [this.getIndexes(), this.getMeasurements()],
|
|
383
383
|
(t, n) => {
|
|
384
384
|
const l = [];
|
|
385
|
-
for (let
|
|
386
|
-
const s = t[
|
|
385
|
+
for (let r = 0, i = t.length; r < i; r++) {
|
|
386
|
+
const s = t[r], a = n[s];
|
|
387
387
|
l.push(a);
|
|
388
388
|
}
|
|
389
389
|
return l;
|
|
@@ -404,23 +404,23 @@ class Hn {
|
|
|
404
404
|
)]
|
|
405
405
|
);
|
|
406
406
|
}, this.getOffsetForAlignment = (t, n) => {
|
|
407
|
-
const l = this.getSize(),
|
|
408
|
-
n === "auto" && (t <=
|
|
409
|
-
const
|
|
407
|
+
const l = this.getSize(), r = this.getScrollOffset();
|
|
408
|
+
n === "auto" && (t <= r ? n = "start" : t >= r + l ? n = "end" : n = "start"), n === "start" ? t = t : n === "end" ? t = t - l : n === "center" && (t = t - l / 2);
|
|
409
|
+
const i = this.options.horizontal ? "scrollWidth" : "scrollHeight", a = (this.scrollElement ? "document" in this.scrollElement ? this.scrollElement.document.documentElement[i] : this.scrollElement[i] : 0) - l;
|
|
410
410
|
return Math.max(Math.min(a, t), 0);
|
|
411
411
|
}, this.getOffsetForIndex = (t, n = "auto") => {
|
|
412
412
|
t = Math.max(0, Math.min(t, this.options.count - 1));
|
|
413
413
|
const l = this.getMeasurements()[t];
|
|
414
414
|
if (!l)
|
|
415
415
|
return;
|
|
416
|
-
const
|
|
416
|
+
const r = this.getSize(), i = this.getScrollOffset();
|
|
417
417
|
if (n === "auto")
|
|
418
|
-
if (l.end >=
|
|
418
|
+
if (l.end >= i + r - this.options.scrollPaddingEnd)
|
|
419
419
|
n = "end";
|
|
420
|
-
else if (l.start <=
|
|
420
|
+
else if (l.start <= i + this.options.scrollPaddingStart)
|
|
421
421
|
n = "start";
|
|
422
422
|
else
|
|
423
|
-
return [
|
|
423
|
+
return [i, n];
|
|
424
424
|
const s = n === "end" ? l.end + this.options.scrollPaddingEnd : l.start - this.options.scrollPaddingStart;
|
|
425
425
|
return [this.getOffsetForAlignment(s, n), n];
|
|
426
426
|
}, this.isDynamicMode = () => this.elementsCache.size > 0, this.cancelScrollToIndex = () => {
|
|
@@ -436,10 +436,10 @@ class Hn {
|
|
|
436
436
|
t = Math.max(0, Math.min(t, this.options.count - 1)), this.cancelScrollToIndex(), l === "smooth" && this.isDynamicMode() && console.warn(
|
|
437
437
|
"The `smooth` scroll behavior is not fully supported with dynamic size."
|
|
438
438
|
);
|
|
439
|
-
const
|
|
440
|
-
if (!
|
|
441
|
-
const [
|
|
442
|
-
this._scrollToOffset(
|
|
439
|
+
const r = this.getOffsetForIndex(t, n);
|
|
440
|
+
if (!r) return;
|
|
441
|
+
const [i, s] = r;
|
|
442
|
+
this._scrollToOffset(i, { adjustments: void 0, behavior: l }), l !== "smooth" && this.isDynamicMode() && this.targetWindow && (this.scrollToIndexTimeoutId = this.targetWindow.setTimeout(() => {
|
|
443
443
|
if (this.scrollToIndexTimeoutId = null, this.elementsCache.has(
|
|
444
444
|
this.options.getItemKey(t)
|
|
445
445
|
)) {
|
|
@@ -462,7 +462,7 @@ class Hn {
|
|
|
462
462
|
const n = this.getMeasurements();
|
|
463
463
|
let l;
|
|
464
464
|
return n.length === 0 ? l = this.options.paddingStart : l = this.options.lanes === 1 ? ((t = n[n.length - 1]) == null ? void 0 : t.end) ?? 0 : Math.max(
|
|
465
|
-
...n.slice(-this.options.lanes).map((
|
|
465
|
+
...n.slice(-this.options.lanes).map((r) => r.end)
|
|
466
466
|
), l - this.options.scrollMargin + this.options.paddingEnd;
|
|
467
467
|
}, this._scrollToOffset = (t, {
|
|
468
468
|
adjustments: n,
|
|
@@ -477,10 +477,10 @@ class Hn {
|
|
|
477
477
|
}
|
|
478
478
|
const Vt = (e, o, t, n) => {
|
|
479
479
|
for (; e <= o; ) {
|
|
480
|
-
const l = (e + o) / 2 | 0,
|
|
481
|
-
if (
|
|
480
|
+
const l = (e + o) / 2 | 0, r = t(l);
|
|
481
|
+
if (r < n)
|
|
482
482
|
e = l + 1;
|
|
483
|
-
else if (
|
|
483
|
+
else if (r > n)
|
|
484
484
|
o = l - 1;
|
|
485
485
|
else
|
|
486
486
|
return l;
|
|
@@ -492,15 +492,15 @@ function zn({
|
|
|
492
492
|
outerSize: o,
|
|
493
493
|
scrollOffset: t
|
|
494
494
|
}) {
|
|
495
|
-
const n = e.length - 1,
|
|
496
|
-
let
|
|
497
|
-
for (;
|
|
498
|
-
|
|
499
|
-
return { startIndex:
|
|
495
|
+
const n = e.length - 1, r = Vt(0, n, (s) => e[s].start, t);
|
|
496
|
+
let i = r;
|
|
497
|
+
for (; i < n && e[i].end < t + o; )
|
|
498
|
+
i++;
|
|
499
|
+
return { startIndex: r, endIndex: i };
|
|
500
500
|
}
|
|
501
501
|
function Un(e) {
|
|
502
502
|
const o = new Hn(M(e)), t = fn(o), n = o._didMount();
|
|
503
|
-
return
|
|
503
|
+
return F(
|
|
504
504
|
() => M(e).getScrollElement(),
|
|
505
505
|
(l) => {
|
|
506
506
|
l && o._willUpdate();
|
|
@@ -508,16 +508,16 @@ function Un(e) {
|
|
|
508
508
|
{
|
|
509
509
|
immediate: !0
|
|
510
510
|
}
|
|
511
|
-
),
|
|
511
|
+
), F(
|
|
512
512
|
() => M(e),
|
|
513
513
|
(l) => {
|
|
514
514
|
o.setOptions({
|
|
515
515
|
...l,
|
|
516
|
-
onChange: (
|
|
516
|
+
onChange: (r, i) => {
|
|
517
517
|
var s;
|
|
518
|
-
|
|
518
|
+
at(t), (s = l.onChange) == null || s.call(l, r, i);
|
|
519
519
|
}
|
|
520
|
-
}), o._willUpdate(),
|
|
520
|
+
}), o._willUpdate(), at(t);
|
|
521
521
|
},
|
|
522
522
|
{
|
|
523
523
|
immediate: !0
|
|
@@ -536,8 +536,8 @@ function Zn(e) {
|
|
|
536
536
|
}
|
|
537
537
|
function Wn(e, o, t) {
|
|
538
538
|
let n = E(t == null ? void 0 : t.value), l = S(() => e.value !== void 0);
|
|
539
|
-
return [S(() => l.value ? e.value : n.value), function(
|
|
540
|
-
return l.value || (n.value =
|
|
539
|
+
return [S(() => l.value ? e.value : n.value), function(r) {
|
|
540
|
+
return l.value || (n.value = r), o == null ? void 0 : o(r);
|
|
541
541
|
}];
|
|
542
542
|
}
|
|
543
543
|
function Gn(e) {
|
|
@@ -546,8 +546,8 @@ function Gn(e) {
|
|
|
546
546
|
}));
|
|
547
547
|
}
|
|
548
548
|
function Ae() {
|
|
549
|
-
let e = [], o = { addEventListener(t, n, l,
|
|
550
|
-
return t.addEventListener(n, l,
|
|
549
|
+
let e = [], o = { addEventListener(t, n, l, r) {
|
|
550
|
+
return t.addEventListener(n, l, r), o.add(() => t.removeEventListener(n, l, r));
|
|
551
551
|
}, requestAnimationFrame(...t) {
|
|
552
552
|
let n = requestAnimationFrame(...t);
|
|
553
553
|
o.add(() => cancelAnimationFrame(n));
|
|
@@ -566,9 +566,9 @@ function Ae() {
|
|
|
566
566
|
n.current = !1;
|
|
567
567
|
});
|
|
568
568
|
}, style(t, n, l) {
|
|
569
|
-
let
|
|
569
|
+
let r = t.style.getPropertyValue(n);
|
|
570
570
|
return Object.assign(t.style, { [n]: l }), this.add(() => {
|
|
571
|
-
Object.assign(t.style, { [n]:
|
|
571
|
+
Object.assign(t.style, { [n]: r });
|
|
572
572
|
});
|
|
573
573
|
}, group(t) {
|
|
574
574
|
let n = Ae();
|
|
@@ -585,7 +585,7 @@ function Ae() {
|
|
|
585
585
|
}
|
|
586
586
|
function qn() {
|
|
587
587
|
let e = Ae();
|
|
588
|
-
return
|
|
588
|
+
return tt(() => e.dispose()), e;
|
|
589
589
|
}
|
|
590
590
|
function Jn() {
|
|
591
591
|
let e = qn();
|
|
@@ -611,10 +611,10 @@ function le(e, o, ...t) {
|
|
|
611
611
|
let n = new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(o).map((l) => `"${l}"`).join(", ")}.`);
|
|
612
612
|
throw Error.captureStackTrace && Error.captureStackTrace(n, le), n;
|
|
613
613
|
}
|
|
614
|
-
var Qn = Object.defineProperty, Xn = (e, o, t) => o in e ? Qn(e, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[o] = t,
|
|
614
|
+
var Qn = Object.defineProperty, Xn = (e, o, t) => o in e ? Qn(e, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[o] = t, ft = (e, o, t) => (Xn(e, typeof o != "symbol" ? o + "" : o, t), t);
|
|
615
615
|
let eo = class {
|
|
616
616
|
constructor() {
|
|
617
|
-
|
|
617
|
+
ft(this, "current", this.detect()), ft(this, "currentId", 0);
|
|
618
618
|
}
|
|
619
619
|
set(o) {
|
|
620
620
|
this.current !== o && (this.currentId = 0, this.current = o);
|
|
@@ -634,9 +634,9 @@ let eo = class {
|
|
|
634
634
|
detect() {
|
|
635
635
|
return typeof window > "u" || typeof document > "u" ? "server" : "client";
|
|
636
636
|
}
|
|
637
|
-
},
|
|
638
|
-
function
|
|
639
|
-
if (
|
|
637
|
+
}, lt = new eo();
|
|
638
|
+
function st(e) {
|
|
639
|
+
if (lt.isServer) return null;
|
|
640
640
|
if (e instanceof Node) return e.ownerDocument;
|
|
641
641
|
if (e != null && e.hasOwnProperty("value")) {
|
|
642
642
|
let o = P(e);
|
|
@@ -644,16 +644,16 @@ function lt(e) {
|
|
|
644
644
|
}
|
|
645
645
|
return document;
|
|
646
646
|
}
|
|
647
|
-
let
|
|
647
|
+
let pt = ["[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(",");
|
|
648
648
|
var to = ((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))(to || {}), no = ((e) => (e[e.Error = 0] = "Error", e[e.Overflow = 1] = "Overflow", e[e.Success = 2] = "Success", e[e.Underflow = 3] = "Underflow", e))(no || {}), oo = ((e) => (e[e.Previous = -1] = "Previous", e[e.Next = 1] = "Next", e))(oo || {}), kt = ((e) => (e[e.Strict = 0] = "Strict", e[e.Loose = 1] = "Loose", e))(kt || {});
|
|
649
649
|
function lo(e, o = 0) {
|
|
650
650
|
var t;
|
|
651
|
-
return e === ((t =
|
|
652
|
-
return e.matches(
|
|
651
|
+
return e === ((t = st(e)) == null ? void 0 : t.body) ? !1 : le(o, { 0() {
|
|
652
|
+
return e.matches(pt);
|
|
653
653
|
}, 1() {
|
|
654
654
|
let n = e;
|
|
655
655
|
for (; n !== null; ) {
|
|
656
|
-
if (n.matches(
|
|
656
|
+
if (n.matches(pt)) return !0;
|
|
657
657
|
n = n.parentElement;
|
|
658
658
|
}
|
|
659
659
|
return !1;
|
|
@@ -665,37 +665,37 @@ typeof window < "u" && typeof document < "u" && (document.addEventListener("keyd
|
|
|
665
665
|
}, !0), document.addEventListener("click", (e) => {
|
|
666
666
|
e.detail === 1 ? delete document.documentElement.dataset.headlessuiFocusVisible : e.detail === 0 && (document.documentElement.dataset.headlessuiFocusVisible = "");
|
|
667
667
|
}, !0));
|
|
668
|
-
function
|
|
668
|
+
function ro(e, o = (t) => t) {
|
|
669
669
|
return e.slice().sort((t, n) => {
|
|
670
|
-
let l = o(t),
|
|
671
|
-
if (l === null ||
|
|
672
|
-
let
|
|
673
|
-
return
|
|
670
|
+
let l = o(t), r = o(n);
|
|
671
|
+
if (l === null || r === null) return 0;
|
|
672
|
+
let i = l.compareDocumentPosition(r);
|
|
673
|
+
return i & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : i & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
|
|
674
674
|
});
|
|
675
675
|
}
|
|
676
|
-
function
|
|
676
|
+
function io() {
|
|
677
677
|
return /iPhone/gi.test(window.navigator.platform) || /Mac/gi.test(window.navigator.platform) && window.navigator.maxTouchPoints > 0;
|
|
678
678
|
}
|
|
679
679
|
function ao() {
|
|
680
680
|
return /Android/gi.test(window.navigator.userAgent);
|
|
681
681
|
}
|
|
682
682
|
function Mt() {
|
|
683
|
-
return
|
|
683
|
+
return io() || ao();
|
|
684
684
|
}
|
|
685
685
|
function Ve(e, o, t) {
|
|
686
|
-
|
|
686
|
+
lt.isServer || ie((n) => {
|
|
687
687
|
document.addEventListener(e, o, t), n(() => document.removeEventListener(e, o, t));
|
|
688
688
|
});
|
|
689
689
|
}
|
|
690
690
|
function uo(e, o, t) {
|
|
691
|
-
|
|
691
|
+
lt.isServer || ie((n) => {
|
|
692
692
|
window.addEventListener(e, o, t), n(() => window.removeEventListener(e, o, t));
|
|
693
693
|
});
|
|
694
694
|
}
|
|
695
695
|
function co(e, o, t = S(() => !0)) {
|
|
696
|
-
function n(
|
|
697
|
-
if (!t.value ||
|
|
698
|
-
let s = r
|
|
696
|
+
function n(r, i) {
|
|
697
|
+
if (!t.value || r.defaultPrevented) return;
|
|
698
|
+
let s = i(r);
|
|
699
699
|
if (s === null || !s.getRootNode().contains(s)) return;
|
|
700
700
|
let a = function u(f) {
|
|
701
701
|
return typeof f == "function" ? u(f()) : Array.isArray(f) || f instanceof Set ? f : [f];
|
|
@@ -703,75 +703,75 @@ function co(e, o, t = S(() => !0)) {
|
|
|
703
703
|
for (let u of a) {
|
|
704
704
|
if (u === null) continue;
|
|
705
705
|
let f = u instanceof HTMLElement ? u : P(u);
|
|
706
|
-
if (f != null && f.contains(s) ||
|
|
706
|
+
if (f != null && f.contains(s) || r.composed && r.composedPath().includes(f)) return;
|
|
707
707
|
}
|
|
708
|
-
return !lo(s, kt.Loose) && s.tabIndex !== -1 &&
|
|
708
|
+
return !lo(s, kt.Loose) && s.tabIndex !== -1 && r.preventDefault(), o(r, s);
|
|
709
709
|
}
|
|
710
710
|
let l = E(null);
|
|
711
|
-
Ve("pointerdown", (
|
|
712
|
-
var
|
|
713
|
-
t.value && (l.value = ((s = (
|
|
714
|
-
}, !0), Ve("mousedown", (
|
|
715
|
-
var
|
|
716
|
-
t.value && (l.value = ((s = (
|
|
717
|
-
}, !0), Ve("click", (
|
|
718
|
-
Mt() || l.value && (n(
|
|
719
|
-
}, !0), Ve("touchend", (
|
|
720
|
-
}
|
|
721
|
-
function
|
|
711
|
+
Ve("pointerdown", (r) => {
|
|
712
|
+
var i, s;
|
|
713
|
+
t.value && (l.value = ((s = (i = r.composedPath) == null ? void 0 : i.call(r)) == null ? void 0 : s[0]) || r.target);
|
|
714
|
+
}, !0), Ve("mousedown", (r) => {
|
|
715
|
+
var i, s;
|
|
716
|
+
t.value && (l.value = ((s = (i = r.composedPath) == null ? void 0 : i.call(r)) == null ? void 0 : s[0]) || r.target);
|
|
717
|
+
}, !0), Ve("click", (r) => {
|
|
718
|
+
Mt() || l.value && (n(r, () => l.value), l.value = null);
|
|
719
|
+
}, !0), Ve("touchend", (r) => n(r, () => r.target instanceof HTMLElement ? r.target : null), !0), uo("blur", (r) => n(r, () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null), !0);
|
|
720
|
+
}
|
|
721
|
+
function vt(e, o) {
|
|
722
722
|
if (e) return e;
|
|
723
723
|
let t = o ?? "button";
|
|
724
724
|
if (typeof t == "string" && t.toLowerCase() === "button") return "button";
|
|
725
725
|
}
|
|
726
726
|
function fo(e, o) {
|
|
727
|
-
let t = E(
|
|
727
|
+
let t = E(vt(e.value.type, e.value.as));
|
|
728
728
|
return xe(() => {
|
|
729
|
-
t.value =
|
|
730
|
-
}),
|
|
729
|
+
t.value = vt(e.value.type, e.value.as);
|
|
730
|
+
}), ie(() => {
|
|
731
731
|
var n;
|
|
732
732
|
t.value || P(o) && P(o) instanceof HTMLButtonElement && !((n = P(o)) != null && n.hasAttribute("type")) && (t.value = "button");
|
|
733
733
|
}), t;
|
|
734
734
|
}
|
|
735
|
-
function
|
|
735
|
+
function ht(e) {
|
|
736
736
|
return [e.screenX, e.screenY];
|
|
737
737
|
}
|
|
738
738
|
function po() {
|
|
739
739
|
let e = E([-1, -1]);
|
|
740
740
|
return { wasMoved(o) {
|
|
741
|
-
let t =
|
|
741
|
+
let t = ht(o);
|
|
742
742
|
return e.value[0] === t[0] && e.value[1] === t[1] ? !1 : (e.value = t, !0);
|
|
743
743
|
}, update(o) {
|
|
744
|
-
e.value =
|
|
744
|
+
e.value = ht(o);
|
|
745
745
|
} };
|
|
746
746
|
}
|
|
747
747
|
function vo({ container: e, accept: o, walk: t, enabled: n }) {
|
|
748
|
-
|
|
748
|
+
ie(() => {
|
|
749
749
|
let l = e.value;
|
|
750
750
|
if (!l || n !== void 0 && !n.value) return;
|
|
751
|
-
let
|
|
752
|
-
if (!
|
|
753
|
-
let
|
|
751
|
+
let r = st(e);
|
|
752
|
+
if (!r) return;
|
|
753
|
+
let i = Object.assign((a) => o(a), { acceptNode: o }), s = r.createTreeWalker(l, NodeFilter.SHOW_ELEMENT, i, !1);
|
|
754
754
|
for (; s.nextNode(); ) t(s.currentNode);
|
|
755
755
|
});
|
|
756
756
|
}
|
|
757
757
|
var Oe = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(Oe || {}), ho = ((e) => (e[e.Unmount = 0] = "Unmount", e[e.Hidden = 1] = "Hidden", e))(ho || {});
|
|
758
758
|
function pe({ visible: e = !0, features: o = 0, ourProps: t, theirProps: n, ...l }) {
|
|
759
|
-
var
|
|
760
|
-
let
|
|
761
|
-
if (e || o & 2 &&
|
|
759
|
+
var r;
|
|
760
|
+
let i = Nt(n, t), s = Object.assign(l, { props: i });
|
|
761
|
+
if (e || o & 2 && i.static) return qe(s);
|
|
762
762
|
if (o & 1) {
|
|
763
|
-
let a = (
|
|
763
|
+
let a = (r = i.unmount) == null || r ? 0 : 1;
|
|
764
764
|
return le(a, { 0() {
|
|
765
765
|
return null;
|
|
766
766
|
}, 1() {
|
|
767
|
-
return qe({ ...l, props: { ...
|
|
767
|
+
return qe({ ...l, props: { ...i, hidden: !0, style: { display: "none" } } });
|
|
768
768
|
} });
|
|
769
769
|
}
|
|
770
770
|
return qe(s);
|
|
771
771
|
}
|
|
772
772
|
function qe({ props: e, attrs: o, slots: t, slot: n, name: l }) {
|
|
773
|
-
var
|
|
774
|
-
let { as: s, ...a } = je(e, ["unmount", "static"]), u = (
|
|
773
|
+
var r, i;
|
|
774
|
+
let { as: s, ...a } = je(e, ["unmount", "static"]), u = (r = t.default) == null ? void 0 : r.call(t, n), f = {};
|
|
775
775
|
if (n) {
|
|
776
776
|
let p = !1, m = [];
|
|
777
777
|
for (let [x, v] of Object.entries(n)) typeof v == "boolean" && (p = !0), v === !0 && m.push(x);
|
|
@@ -784,7 +784,7 @@ function qe({ props: e, attrs: o, slots: t, slot: n, name: l }) {
|
|
|
784
784
|
`), "", "You can apply a few solutions:", ['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".', "Render a single element as the child so that we can forward the props onto that element."].map((h) => ` - ${h}`).join(`
|
|
785
785
|
`)].join(`
|
|
786
786
|
`));
|
|
787
|
-
let x = Nt((
|
|
787
|
+
let x = Nt((i = p.props) != null ? i : {}, a, f), v = Et(p, x, !0);
|
|
788
788
|
for (let h in x) h.startsWith("on") && (v.props || (v.props = {}), v.props[h] = x[h]);
|
|
789
789
|
return v;
|
|
790
790
|
}
|
|
@@ -801,11 +801,11 @@ function Nt(...e) {
|
|
|
801
801
|
let o = {}, t = {};
|
|
802
802
|
for (let n of e) for (let l in n) l.startsWith("on") && typeof n[l] == "function" ? (t[l] != null || (t[l] = []), t[l].push(n[l])) : o[l] = n[l];
|
|
803
803
|
if (o.disabled || o["aria-disabled"]) return Object.assign(o, Object.fromEntries(Object.keys(t).map((n) => [n, void 0])));
|
|
804
|
-
for (let n in t) Object.assign(o, { [n](l, ...
|
|
805
|
-
let
|
|
806
|
-
for (let s of
|
|
804
|
+
for (let n in t) Object.assign(o, { [n](l, ...r) {
|
|
805
|
+
let i = t[n];
|
|
806
|
+
for (let s of i) {
|
|
807
807
|
if (l instanceof Event && l.defaultPrevented) return;
|
|
808
|
-
s(l, ...
|
|
808
|
+
s(l, ...r);
|
|
809
809
|
}
|
|
810
810
|
} });
|
|
811
811
|
return o;
|
|
@@ -827,8 +827,8 @@ var At = ((e) => (e[e.None = 1] = "None", e[e.Focusable = 2] = "Focusable", e[e.
|
|
|
827
827
|
let bo = ae({ name: "Hidden", props: { as: { type: [Object, String], default: "div" }, features: { type: Number, default: 1 } }, setup(e, { slots: o, attrs: t }) {
|
|
828
828
|
return () => {
|
|
829
829
|
var n;
|
|
830
|
-
let { features: l, ...
|
|
831
|
-
return pe({ ourProps:
|
|
830
|
+
let { features: l, ...r } = e, i = { "aria-hidden": (l & 2) === 2 ? !0 : (n = r["aria-hidden"]) != null ? n : void 0, hidden: (l & 4) === 4 ? !0 : void 0, style: { position: "fixed", top: 1, left: 1, width: 1, height: 0, padding: 0, margin: -1, overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0", ...(l & 4) === 4 && (l & 2) !== 2 && { display: "none" } } };
|
|
831
|
+
return pe({ ourProps: i, theirProps: r, slot: {}, attrs: t, slots: o, name: "Hidden" });
|
|
832
832
|
};
|
|
833
833
|
} }), Dt = Symbol("Context");
|
|
834
834
|
var $e = ((e) => (e[e.Open = 1] = "Open", e[e.Closed = 2] = "Closed", e[e.Closing = 4] = "Closing", e[e.Opening = 8] = "Opening", e))($e || {});
|
|
@@ -836,7 +836,7 @@ function Co() {
|
|
|
836
836
|
return Ie(Dt, null);
|
|
837
837
|
}
|
|
838
838
|
function _o(e) {
|
|
839
|
-
|
|
839
|
+
nt(Dt, e);
|
|
840
840
|
}
|
|
841
841
|
var W = ((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))(W || {}), Ft = ((e) => (e[e.Left = 0] = "Left", e[e.Right = 2] = "Right", e))(Ft || {});
|
|
842
842
|
function xo(e) {
|
|
@@ -856,30 +856,30 @@ function yo(e) {
|
|
|
856
856
|
throw new Error("Unexpected object: " + e);
|
|
857
857
|
}
|
|
858
858
|
var z = ((e) => (e[e.First = 0] = "First", e[e.Previous = 1] = "Previous", e[e.Next = 2] = "Next", e[e.Last = 3] = "Last", e[e.Specific = 4] = "Specific", e[e.Nothing = 5] = "Nothing", e))(z || {});
|
|
859
|
-
function
|
|
859
|
+
function mt(e, o) {
|
|
860
860
|
let t = o.resolveItems();
|
|
861
861
|
if (t.length <= 0) return null;
|
|
862
862
|
let n = o.resolveActiveIndex(), l = n ?? -1;
|
|
863
863
|
switch (e.focus) {
|
|
864
864
|
case 0: {
|
|
865
|
-
for (let
|
|
865
|
+
for (let r = 0; r < t.length; ++r) if (!o.resolveDisabled(t[r], r, t)) return r;
|
|
866
866
|
return n;
|
|
867
867
|
}
|
|
868
868
|
case 1: {
|
|
869
869
|
l === -1 && (l = t.length);
|
|
870
|
-
for (let
|
|
870
|
+
for (let r = l - 1; r >= 0; --r) if (!o.resolveDisabled(t[r], r, t)) return r;
|
|
871
871
|
return n;
|
|
872
872
|
}
|
|
873
873
|
case 2: {
|
|
874
|
-
for (let
|
|
874
|
+
for (let r = l + 1; r < t.length; ++r) if (!o.resolveDisabled(t[r], r, t)) return r;
|
|
875
875
|
return n;
|
|
876
876
|
}
|
|
877
877
|
case 3: {
|
|
878
|
-
for (let
|
|
878
|
+
for (let r = t.length - 1; r >= 0; --r) if (!o.resolveDisabled(t[r], r, t)) return r;
|
|
879
879
|
return n;
|
|
880
880
|
}
|
|
881
881
|
case 4: {
|
|
882
|
-
for (let
|
|
882
|
+
for (let r = 0; r < t.length; ++r) if (o.resolveId(t[r], r, t) === e.id) return r;
|
|
883
883
|
return n;
|
|
884
884
|
}
|
|
885
885
|
case 5:
|
|
@@ -922,22 +922,22 @@ let Ut = Symbol("VirtualContext"), $o = ae({ name: "VirtualProvider", setup(e, {
|
|
|
922
922
|
return 40;
|
|
923
923
|
}, getScrollElement() {
|
|
924
924
|
return P(t.optionsRef);
|
|
925
|
-
}, overscan: 12 }))),
|
|
925
|
+
}, overscan: 12 }))), r = S(() => {
|
|
926
926
|
var s;
|
|
927
927
|
return (s = t.virtual.value) == null ? void 0 : s.options;
|
|
928
|
-
}),
|
|
929
|
-
return
|
|
930
|
-
|
|
931
|
-
}),
|
|
928
|
+
}), i = E(0);
|
|
929
|
+
return F([r], () => {
|
|
930
|
+
i.value += 1;
|
|
931
|
+
}), nt(Ut, t.virtual.value ? l : null), () => [Ee("div", { style: { position: "relative", width: "100%", height: `${l.value.getTotalSize()}px` }, ref: (s) => {
|
|
932
932
|
if (s) {
|
|
933
933
|
if (typeof process < "u" && process.env.JEST_WORKER_ID !== void 0 || t.activationTrigger.value === 0) return;
|
|
934
934
|
t.activeOptionIndex.value !== null && t.virtual.value.options.length > t.activeOptionIndex.value && l.value.scrollToIndex(t.activeOptionIndex.value);
|
|
935
935
|
}
|
|
936
|
-
} }, l.value.getVirtualItems().map((s) => Et(o.default({ option: t.virtual.value.options[s.index], open: t.comboboxState.value === 0 })[0], { key: `${
|
|
936
|
+
} }, l.value.getVirtualItems().map((s) => Et(o.default({ option: t.virtual.value.options[s.index], open: t.comboboxState.value === 0 })[0], { key: `${i.value}-${s.index}`, "data-index": s.index, "aria-setsize": t.virtual.value.options.length, "aria-posinset": s.index + 1, style: { position: "absolute", top: 0, left: 0, transform: `translateY(${s.start}px)`, overflowAnchor: "none" } })))];
|
|
937
937
|
} }), To = ae({ name: "Combobox", emits: { "update:modelValue": (e) => !0 }, props: { as: { type: [Object, String], default: "template" }, disabled: { type: [Boolean], default: !1 }, by: { type: [String, Function], nullable: !0, default: null }, modelValue: { type: [Object, String, Number, Boolean], default: void 0 }, defaultValue: { type: [Object, String, Number, Boolean], default: void 0 }, form: { type: String, optional: !0 }, name: { type: String, optional: !0 }, nullable: { type: Boolean, default: !1 }, multiple: { type: [Boolean], default: !1 }, immediate: { type: [Boolean], default: !1 }, virtual: { type: Object, default: null } }, inheritAttrs: !1, setup(e, { slots: o, attrs: t, emit: n }) {
|
|
938
|
-
let l = E(1),
|
|
938
|
+
let l = E(1), r = E(null), i = E(null), s = E(null), a = E(null), u = E({ static: !1, hold: !1 }), f = E([]), p = E(null), m = E(2), x = E(!1);
|
|
939
939
|
function v(c = (d) => d) {
|
|
940
|
-
let d = p.value !== null ? f.value[p.value] : null, y = c(f.value.slice()), O = y.length > 0 && y[0].dataRef.order.value !== null ? y.sort((N, G) => N.dataRef.order.value - G.dataRef.order.value) :
|
|
940
|
+
let d = p.value !== null ? f.value[p.value] : null, y = c(f.value.slice()), O = y.length > 0 && y[0].dataRef.order.value !== null ? y.sort((N, G) => N.dataRef.order.value - G.dataRef.order.value) : ro(y, (N) => P(N.dataRef.domRef)), k = d ? O.indexOf(d) : null;
|
|
941
941
|
return k === -1 && (k = null), { options: O, activeOptionIndex: k };
|
|
942
942
|
}
|
|
943
943
|
let h = S(() => e.multiple ? 1 : 0), V = S(() => e.nullable), [A, T] = Wn(S(() => e.modelValue), (c) => n("update:modelValue", c), S(() => e.defaultValue)), R = S(() => A.value === void 0 ? le(h.value, { 1: [], 0: void 0 }) : A.value), D = null, _ = null;
|
|
@@ -951,7 +951,7 @@ let Ut = Symbol("VirtualContext"), $o = ae({ name: "VirtualProvider", setup(e, {
|
|
|
951
951
|
}
|
|
952
952
|
let b = S(() => {
|
|
953
953
|
});
|
|
954
|
-
|
|
954
|
+
F([b], ([c], [d]) => {
|
|
955
955
|
if (g.virtual.value && c && d && p.value !== null) {
|
|
956
956
|
let y = c.indexOf(d[p.value]);
|
|
957
957
|
y !== -1 ? p.value = y : p.value = null;
|
|
@@ -965,7 +965,7 @@ let Ut = Symbol("VirtualContext"), $o = ae({ name: "VirtualProvider", setup(e, {
|
|
|
965
965
|
return e.by === null ? wo(c, d) : e.by(c, d);
|
|
966
966
|
}, calculateIndex(c) {
|
|
967
967
|
return g.virtual.value ? e.by === null ? g.virtual.value.options.indexOf(c) : g.virtual.value.options.findIndex((d) => g.compare(d, c)) : f.value.findIndex((d) => g.compare(d.dataRef.value, c));
|
|
968
|
-
}, defaultValue: S(() => e.defaultValue), nullable: V, immediate: S(() => !1), virtual: S(() => null), inputRef:
|
|
968
|
+
}, defaultValue: S(() => e.defaultValue), nullable: V, immediate: S(() => !1), virtual: S(() => null), inputRef: i, labelRef: r, buttonRef: s, optionsRef: a, disabled: S(() => e.disabled), options: f, change(c) {
|
|
969
969
|
T(c);
|
|
970
970
|
}, activeOptionIndex: S(() => {
|
|
971
971
|
if (x.value && p.value === null && (g.virtual.value ? g.virtual.value.options.length > 0 : f.value.length > 0)) {
|
|
@@ -996,11 +996,11 @@ let Ut = Symbol("VirtualContext"), $o = ae({ name: "VirtualProvider", setup(e, {
|
|
|
996
996
|
x.value = !1, D !== null && cancelAnimationFrame(D), D = requestAnimationFrame(() => {
|
|
997
997
|
if (e.disabled || a.value && !u.value.static && l.value === 1) return;
|
|
998
998
|
if (g.virtual.value) {
|
|
999
|
-
p.value = c === z.Specific ? d :
|
|
999
|
+
p.value = c === z.Specific ? d : mt({ focus: c }, { resolveItems: () => g.virtual.value.options, resolveActiveIndex: () => {
|
|
1000
1000
|
var N, G;
|
|
1001
1001
|
return (G = (N = g.activeOptionIndex.value) != null ? N : g.virtual.value.options.findIndex((q) => {
|
|
1002
|
-
var
|
|
1003
|
-
return !((
|
|
1002
|
+
var j;
|
|
1003
|
+
return !((j = g.virtual.value) != null && j.disabled(q));
|
|
1004
1004
|
})) != null ? G : null;
|
|
1005
1005
|
}, resolveDisabled: (N) => g.virtual.value.disabled(N), resolveId() {
|
|
1006
1006
|
throw new Error("Function not implemented.");
|
|
@@ -1012,7 +1012,7 @@ let Ut = Symbol("VirtualContext"), $o = ae({ name: "VirtualProvider", setup(e, {
|
|
|
1012
1012
|
let N = O.options.findIndex((G) => !G.dataRef.disabled);
|
|
1013
1013
|
N !== -1 && (O.activeOptionIndex = N);
|
|
1014
1014
|
}
|
|
1015
|
-
let k = c === z.Specific ? d :
|
|
1015
|
+
let k = c === z.Specific ? d : mt({ focus: c }, { resolveItems: () => O.options, resolveActiveIndex: () => O.activeOptionIndex, resolveId: (N) => N.id, resolveDisabled: (N) => N.dataRef.disabled });
|
|
1016
1016
|
p.value = k, m.value = y ?? 2, f.value = O.options;
|
|
1017
1017
|
});
|
|
1018
1018
|
}, selectOption(c) {
|
|
@@ -1056,13 +1056,13 @@ let Ut = Symbol("VirtualContext"), $o = ae({ name: "VirtualProvider", setup(e, {
|
|
|
1056
1056
|
}, isActive(c) {
|
|
1057
1057
|
return p.value === g.calculateIndex(c);
|
|
1058
1058
|
} };
|
|
1059
|
-
co([
|
|
1059
|
+
co([i, s, a], () => g.closeCombobox(), S(() => l.value === 0)), nt(zt, g), _o(S(() => le(l.value, { 0: $e.Open, 1: $e.Closed })));
|
|
1060
1060
|
let I = S(() => {
|
|
1061
1061
|
var c;
|
|
1062
|
-
return (c = P(
|
|
1062
|
+
return (c = P(i)) == null ? void 0 : c.closest("form");
|
|
1063
1063
|
});
|
|
1064
1064
|
return xe(() => {
|
|
1065
|
-
|
|
1065
|
+
F([I], () => {
|
|
1066
1066
|
if (!I.value || e.defaultValue === void 0) return;
|
|
1067
1067
|
function c() {
|
|
1068
1068
|
g.change(e.defaultValue);
|
|
@@ -1075,65 +1075,65 @@ let Ut = Symbol("VirtualContext"), $o = ae({ name: "VirtualProvider", setup(e, {
|
|
|
1075
1075
|
}), () => {
|
|
1076
1076
|
var c, d, y;
|
|
1077
1077
|
let { name: O, disabled: k, form: N, ...G } = e, q = { open: l.value === 0, disabled: k, activeIndex: g.activeOptionIndex.value, activeOption: g.activeOptionIndex.value === null ? null : g.virtual.value ? g.virtual.value.options[(c = g.activeOptionIndex.value) != null ? c : 0] : (y = (d = g.options.value[g.activeOptionIndex.value]) == null ? void 0 : d.dataRef.value) != null ? y : null, value: R.value };
|
|
1078
|
-
return Ee(Z, [...O != null && R.value != null ? jt({ [O]: R.value }).map(([
|
|
1078
|
+
return Ee(Z, [...O != null && R.value != null ? jt({ [O]: R.value }).map(([j, dn]) => Ee(bo, mo({ features: At.Hidden, key: j, as: "input", type: "hidden", hidden: !0, readOnly: !0, form: N, disabled: k, name: j, value: dn }))) : [], pe({ theirProps: { ...t, ...je(G, ["by", "defaultValue", "immediate", "modelValue", "multiple", "nullable", "onUpdate:modelValue", "virtual"]) }, ourProps: {}, slot: q, slots: o, attrs: t, name: "Combobox" })]);
|
|
1079
1079
|
};
|
|
1080
1080
|
} });
|
|
1081
1081
|
ae({ name: "ComboboxLabel", props: { as: { type: [Object, String], default: "label" }, id: { type: String, default: null } }, setup(e, { attrs: o, slots: t }) {
|
|
1082
1082
|
var n;
|
|
1083
|
-
let l = (n = e.id) != null ? n : `headlessui-combobox-label-${Le()}`,
|
|
1084
|
-
function
|
|
1083
|
+
let l = (n = e.id) != null ? n : `headlessui-combobox-label-${Le()}`, r = ve("ComboboxLabel");
|
|
1084
|
+
function i() {
|
|
1085
1085
|
var s;
|
|
1086
|
-
(s = P(
|
|
1086
|
+
(s = P(r.inputRef)) == null || s.focus({ preventScroll: !0 });
|
|
1087
1087
|
}
|
|
1088
1088
|
return () => {
|
|
1089
|
-
let s = { open:
|
|
1089
|
+
let s = { open: r.comboboxState.value === 0, disabled: r.disabled.value }, { ...a } = e, u = { id: l, ref: r.labelRef, onClick: i };
|
|
1090
1090
|
return pe({ ourProps: u, theirProps: a, slot: s, attrs: o, slots: t, name: "ComboboxLabel" });
|
|
1091
1091
|
};
|
|
1092
1092
|
} });
|
|
1093
1093
|
let Io = ae({ name: "ComboboxButton", props: { as: { type: [Object, String], default: "button" }, id: { type: String, default: null } }, setup(e, { attrs: o, slots: t, expose: n }) {
|
|
1094
1094
|
var l;
|
|
1095
|
-
let
|
|
1096
|
-
n({ el:
|
|
1095
|
+
let r = (l = e.id) != null ? l : `headlessui-combobox-button-${Le()}`, i = ve("ComboboxButton");
|
|
1096
|
+
n({ el: i.buttonRef, $el: i.buttonRef });
|
|
1097
1097
|
function s(f) {
|
|
1098
|
-
|
|
1098
|
+
i.disabled.value || (i.comboboxState.value === 0 ? i.closeCombobox() : (f.preventDefault(), i.openCombobox()), Q(() => {
|
|
1099
1099
|
var p;
|
|
1100
|
-
return (p = P(
|
|
1100
|
+
return (p = P(i.inputRef)) == null ? void 0 : p.focus({ preventScroll: !0 });
|
|
1101
1101
|
}));
|
|
1102
1102
|
}
|
|
1103
1103
|
function a(f) {
|
|
1104
1104
|
switch (f.key) {
|
|
1105
1105
|
case W.ArrowDown:
|
|
1106
|
-
f.preventDefault(), f.stopPropagation(),
|
|
1106
|
+
f.preventDefault(), f.stopPropagation(), i.comboboxState.value === 1 && i.openCombobox(), Q(() => {
|
|
1107
1107
|
var p;
|
|
1108
|
-
return (p =
|
|
1108
|
+
return (p = i.inputRef.value) == null ? void 0 : p.focus({ preventScroll: !0 });
|
|
1109
1109
|
});
|
|
1110
1110
|
return;
|
|
1111
1111
|
case W.ArrowUp:
|
|
1112
|
-
f.preventDefault(), f.stopPropagation(),
|
|
1113
|
-
|
|
1112
|
+
f.preventDefault(), f.stopPropagation(), i.comboboxState.value === 1 && (i.openCombobox(), Q(() => {
|
|
1113
|
+
i.value.value || i.goToOption(z.Last);
|
|
1114
1114
|
})), Q(() => {
|
|
1115
1115
|
var p;
|
|
1116
|
-
return (p =
|
|
1116
|
+
return (p = i.inputRef.value) == null ? void 0 : p.focus({ preventScroll: !0 });
|
|
1117
1117
|
});
|
|
1118
1118
|
return;
|
|
1119
1119
|
case W.Escape:
|
|
1120
|
-
if (
|
|
1121
|
-
f.preventDefault(),
|
|
1120
|
+
if (i.comboboxState.value !== 0) return;
|
|
1121
|
+
f.preventDefault(), i.optionsRef.value && !i.optionsPropsRef.value.static && f.stopPropagation(), i.closeCombobox(), Q(() => {
|
|
1122
1122
|
var p;
|
|
1123
|
-
return (p =
|
|
1123
|
+
return (p = i.inputRef.value) == null ? void 0 : p.focus({ preventScroll: !0 });
|
|
1124
1124
|
});
|
|
1125
1125
|
return;
|
|
1126
1126
|
}
|
|
1127
1127
|
}
|
|
1128
|
-
let u = fo(S(() => ({ as: e.as, type: o.type })),
|
|
1128
|
+
let u = fo(S(() => ({ as: e.as, type: o.type })), i.buttonRef);
|
|
1129
1129
|
return () => {
|
|
1130
1130
|
var f, p;
|
|
1131
|
-
let m = { open:
|
|
1131
|
+
let m = { open: i.comboboxState.value === 0, disabled: i.disabled.value, value: i.value.value }, { ...x } = e, v = { ref: i.buttonRef, id: r, type: u.value, tabindex: "-1", "aria-haspopup": "listbox", "aria-controls": (f = P(i.optionsRef)) == null ? void 0 : f.id, "aria-expanded": i.comboboxState.value === 0, "aria-labelledby": i.labelRef.value ? [(p = P(i.labelRef)) == null ? void 0 : p.id, r].join(" ") : void 0, disabled: i.disabled.value === !0 ? !0 : void 0, onKeydown: a, onClick: s };
|
|
1132
1132
|
return pe({ ourProps: v, theirProps: x, slot: m, attrs: o, slots: t, name: "ComboboxButton" });
|
|
1133
1133
|
};
|
|
1134
1134
|
} }), Lo = ae({ name: "ComboboxInput", props: { as: { type: [Object, String], default: "input" }, static: { type: Boolean, default: !1 }, unmount: { type: Boolean, default: !0 }, displayValue: { type: Function }, defaultValue: { type: String, default: void 0 }, id: { type: String, default: null } }, emits: { change: (e) => !0 }, setup(e, { emit: o, attrs: t, slots: n, expose: l }) {
|
|
1135
|
-
var
|
|
1136
|
-
let
|
|
1135
|
+
var r;
|
|
1136
|
+
let i = (r = e.id) != null ? r : `headlessui-combobox-input-${Le()}`, s = ve("ComboboxInput"), a = S(() => st(P(s.inputRef))), u = { value: !1 };
|
|
1137
1137
|
l({ el: s.inputRef, $el: s.inputRef });
|
|
1138
1138
|
function f() {
|
|
1139
1139
|
s.change(null);
|
|
@@ -1146,7 +1146,7 @@ let Io = ae({ name: "ComboboxButton", props: { as: { type: [Object, String], def
|
|
|
1146
1146
|
return P(s.inputRef) ? typeof e.displayValue < "u" && L !== void 0 ? (_ = e.displayValue(L)) != null ? _ : "" : typeof L == "string" ? L : "" : "";
|
|
1147
1147
|
});
|
|
1148
1148
|
xe(() => {
|
|
1149
|
-
|
|
1149
|
+
F([p, s.comboboxState, a], ([_, L], [b, g]) => {
|
|
1150
1150
|
if (u.value) return;
|
|
1151
1151
|
let I = P(s.inputRef);
|
|
1152
1152
|
I && ((g === 0 && L === 1 || _ !== b) && (I.value = _), requestAnimationFrame(() => {
|
|
@@ -1155,7 +1155,7 @@ let Io = ae({ name: "ComboboxButton", props: { as: { type: [Object, String], def
|
|
|
1155
1155
|
let { selectionStart: d, selectionEnd: y } = I;
|
|
1156
1156
|
Math.abs((y ?? 0) - (d ?? 0)) === 0 && d === 0 && I.setSelectionRange(I.value.length, I.value.length);
|
|
1157
1157
|
}));
|
|
1158
|
-
}, { immediate: !0 }),
|
|
1158
|
+
}, { immediate: !0 }), F([s.comboboxState], ([_], [L]) => {
|
|
1159
1159
|
if (_ === 0 && L === 1) {
|
|
1160
1160
|
if (u.value) return;
|
|
1161
1161
|
let b = P(s.inputRef);
|
|
@@ -1236,17 +1236,17 @@ let Io = ae({ name: "ComboboxButton", props: { as: { type: [Object, String], def
|
|
|
1236
1236
|
});
|
|
1237
1237
|
return () => {
|
|
1238
1238
|
var _, L, b, g, I, c, d;
|
|
1239
|
-
let y = { open: s.comboboxState.value === 0 }, { displayValue: O, onChange: k, ...N } = e, G = { "aria-controls": (_ = s.optionsRef.value) == null ? void 0 : _.id, "aria-expanded": s.comboboxState.value === 0, "aria-activedescendant": s.activeOptionIndex.value === null ? void 0 : s.virtual.value ? (L = s.options.value.find((q) => !s.virtual.value.disabled(q.dataRef.value) && s.compare(q.dataRef.value, s.virtual.value.options[s.activeOptionIndex.value]))) == null ? void 0 : L.id : (b = s.options.value[s.activeOptionIndex.value]) == null ? void 0 : b.id, "aria-labelledby": (c = (g = P(s.labelRef)) == null ? void 0 : g.id) != null ? c : (I = P(s.buttonRef)) == null ? void 0 : I.id, "aria-autocomplete": "list", id:
|
|
1239
|
+
let y = { open: s.comboboxState.value === 0 }, { displayValue: O, onChange: k, ...N } = e, G = { "aria-controls": (_ = s.optionsRef.value) == null ? void 0 : _.id, "aria-expanded": s.comboboxState.value === 0, "aria-activedescendant": s.activeOptionIndex.value === null ? void 0 : s.virtual.value ? (L = s.options.value.find((q) => !s.virtual.value.disabled(q.dataRef.value) && s.compare(q.dataRef.value, s.virtual.value.options[s.activeOptionIndex.value]))) == null ? void 0 : L.id : (b = s.options.value[s.activeOptionIndex.value]) == null ? void 0 : b.id, "aria-labelledby": (c = (g = P(s.labelRef)) == null ? void 0 : g.id) != null ? c : (I = P(s.buttonRef)) == null ? void 0 : I.id, "aria-autocomplete": "list", id: i, onCompositionstart: x, onCompositionend: v, onKeydown: V, onInput: A, onFocus: R, onBlur: T, role: "combobox", type: (d = t.type) != null ? d : "text", tabIndex: 0, ref: s.inputRef, defaultValue: D.value, disabled: s.disabled.value === !0 ? !0 : void 0 };
|
|
1240
1240
|
return pe({ ourProps: G, theirProps: N, slot: y, attrs: t, slots: n, features: Oe.RenderStrategy | Oe.Static, name: "ComboboxInput" });
|
|
1241
1241
|
};
|
|
1242
1242
|
} }), Po = ae({ name: "ComboboxOptions", props: { as: { type: [Object, String], default: "ul" }, static: { type: Boolean, default: !1 }, unmount: { type: Boolean, default: !0 }, hold: { type: [Boolean], default: !1 } }, setup(e, { attrs: o, slots: t, expose: n }) {
|
|
1243
|
-
let l = ve("ComboboxOptions"),
|
|
1244
|
-
n({ el: l.optionsRef, $el: l.optionsRef }),
|
|
1243
|
+
let l = ve("ComboboxOptions"), r = `headlessui-combobox-options-${Le()}`;
|
|
1244
|
+
n({ el: l.optionsRef, $el: l.optionsRef }), ie(() => {
|
|
1245
1245
|
l.optionsPropsRef.value.static = e.static;
|
|
1246
|
-
}),
|
|
1246
|
+
}), ie(() => {
|
|
1247
1247
|
l.optionsPropsRef.value.hold = e.hold;
|
|
1248
1248
|
});
|
|
1249
|
-
let
|
|
1249
|
+
let i = Co(), s = S(() => i !== null ? (i.value & $e.Open) === $e.Open : l.comboboxState.value === 0);
|
|
1250
1250
|
vo({ container: S(() => P(l.optionsRef)), enabled: S(() => l.comboboxState.value === 0), accept(u) {
|
|
1251
1251
|
return u.getAttribute("role") === "option" ? NodeFilter.FILTER_REJECT : u.hasAttribute("role") ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT;
|
|
1252
1252
|
}, walk(u) {
|
|
@@ -1257,27 +1257,27 @@ let Io = ae({ name: "ComboboxButton", props: { as: { type: [Object, String], def
|
|
|
1257
1257
|
}
|
|
1258
1258
|
return () => {
|
|
1259
1259
|
var u, f, p;
|
|
1260
|
-
let m = { open: l.comboboxState.value === 0 }, x = { "aria-labelledby": (p = (u = P(l.labelRef)) == null ? void 0 : u.id) != null ? p : (f = P(l.buttonRef)) == null ? void 0 : f.id, id:
|
|
1260
|
+
let m = { open: l.comboboxState.value === 0 }, x = { "aria-labelledby": (p = (u = P(l.labelRef)) == null ? void 0 : u.id) != null ? p : (f = P(l.buttonRef)) == null ? void 0 : f.id, id: r, ref: l.optionsRef, role: "listbox", "aria-multiselectable": l.mode.value === 1 ? !0 : void 0, onMousedown: a }, v = je(e, ["hold"]);
|
|
1261
1261
|
return pe({ ourProps: x, theirProps: v, slot: m, attrs: o, slots: l.virtual.value && l.comboboxState.value === 0 ? { ...t, default: () => [Ee($o, {}, t.default)] } : t, features: Oe.RenderStrategy | Oe.Static, visible: s.value, name: "ComboboxOptions" });
|
|
1262
1262
|
};
|
|
1263
1263
|
} }), Vo = ae({ name: "ComboboxOption", props: { as: { type: [Object, String], default: "li" }, value: { type: [Object, String, Number, Boolean] }, disabled: { type: Boolean, default: !1 }, order: { type: [Number], default: null } }, setup(e, { slots: o, attrs: t, expose: n }) {
|
|
1264
|
-
let l = ve("ComboboxOption"),
|
|
1265
|
-
n({ el:
|
|
1264
|
+
let l = ve("ComboboxOption"), r = `headlessui-combobox-option-${Le()}`, i = E(null), s = S(() => e.disabled);
|
|
1265
|
+
n({ el: i, $el: i });
|
|
1266
1266
|
let a = S(() => {
|
|
1267
1267
|
var T;
|
|
1268
|
-
return l.virtual.value ? l.activeOptionIndex.value === l.calculateIndex(e.value) : l.activeOptionIndex.value === null ? !1 : ((T = l.options.value[l.activeOptionIndex.value]) == null ? void 0 : T.id) ===
|
|
1269
|
-
}), u = S(() => l.isSelected(e.value)), f = Ie(Ut, null), p = S(() => ({ disabled: e.disabled, value: e.value, domRef:
|
|
1270
|
-
xe(() => l.registerOption(
|
|
1271
|
-
let T = P(
|
|
1268
|
+
return l.virtual.value ? l.activeOptionIndex.value === l.calculateIndex(e.value) : l.activeOptionIndex.value === null ? !1 : ((T = l.options.value[l.activeOptionIndex.value]) == null ? void 0 : T.id) === r;
|
|
1269
|
+
}), u = S(() => l.isSelected(e.value)), f = Ie(Ut, null), p = S(() => ({ disabled: e.disabled, value: e.value, domRef: i, order: S(() => e.order) }));
|
|
1270
|
+
xe(() => l.registerOption(r, p)), tt(() => l.unregisterOption(r, a.value)), ie(() => {
|
|
1271
|
+
let T = P(i);
|
|
1272
1272
|
T && (f == null || f.value.measureElement(T));
|
|
1273
|
-
}),
|
|
1273
|
+
}), ie(() => {
|
|
1274
1274
|
l.comboboxState.value === 0 && a.value && (l.virtual.value || l.activationTrigger.value !== 0 && Q(() => {
|
|
1275
1275
|
var T, R;
|
|
1276
|
-
return (R = (T = P(
|
|
1276
|
+
return (R = (T = P(i)) == null ? void 0 : T.scrollIntoView) == null ? void 0 : R.call(T, { block: "nearest" });
|
|
1277
1277
|
}));
|
|
1278
1278
|
});
|
|
1279
1279
|
function m(T) {
|
|
1280
|
-
T.preventDefault(), T.button === Ft.Left && (s.value || (l.selectOption(
|
|
1280
|
+
T.preventDefault(), T.button === Ft.Left && (s.value || (l.selectOption(r), Mt() || requestAnimationFrame(() => {
|
|
1281
1281
|
var R;
|
|
1282
1282
|
return (R = P(l.inputRef)) == null ? void 0 : R.focus({ preventScroll: !0 });
|
|
1283
1283
|
}), l.mode.value === 0 && l.closeCombobox()));
|
|
@@ -1303,7 +1303,7 @@ let Io = ae({ name: "ComboboxButton", props: { as: { type: [Object, String], def
|
|
|
1303
1303
|
v.wasMoved(T) && (e.disabled || (R = l.virtual.value) != null && R.disabled(e.value) || a.value && (l.optionsPropsRef.value.hold || l.goToOption(z.Nothing)));
|
|
1304
1304
|
}
|
|
1305
1305
|
return () => {
|
|
1306
|
-
let { disabled: T } = e, R = { active: a.value, selected: u.value, disabled: T }, D = { id:
|
|
1306
|
+
let { disabled: T } = e, R = { active: a.value, selected: u.value, disabled: T }, D = { id: r, ref: i, role: "option", tabIndex: T === !0 ? void 0 : -1, "aria-disabled": T === !0 ? !0 : void 0, "aria-selected": u.value, disabled: void 0, onMousedown: m, onFocus: x, onPointerenter: h, onMouseenter: h, onPointermove: V, onMousemove: V, onPointerleave: A, onMouseleave: A }, _ = je(e, ["order", "value"]);
|
|
1307
1307
|
return pe({ ourProps: D, theirProps: _, slot: R, attrs: t, slots: o, name: "ComboboxOption" });
|
|
1308
1308
|
};
|
|
1309
1309
|
} });
|
|
@@ -1352,7 +1352,7 @@ function Ro(e, o) {
|
|
|
1352
1352
|
})
|
|
1353
1353
|
]);
|
|
1354
1354
|
}
|
|
1355
|
-
const
|
|
1355
|
+
const gt = {
|
|
1356
1356
|
__name: "Select",
|
|
1357
1357
|
props: /* @__PURE__ */ pn({
|
|
1358
1358
|
languages: {
|
|
@@ -1365,41 +1365,41 @@ const mt = {
|
|
|
1365
1365
|
}),
|
|
1366
1366
|
emits: ["update:modelValue"],
|
|
1367
1367
|
setup(e) {
|
|
1368
|
-
const o = e, t = vn(e, "modelValue"), n = E(""), l = E(null),
|
|
1368
|
+
const o = e, t = vn(e, "modelValue"), n = E(""), l = E(null), r = S(() => Object.entries(o.languages).filter(
|
|
1369
1369
|
([, s]) => s.toLowerCase().includes(n.value.toLowerCase())
|
|
1370
|
-
)),
|
|
1370
|
+
)), i = (s) => {
|
|
1371
1371
|
s.target.value = "", n.value = "", l.value && l.value.$el.click();
|
|
1372
1372
|
};
|
|
1373
|
-
return (s, a) => (w(),
|
|
1373
|
+
return (s, a) => (w(), ee(M(To), {
|
|
1374
1374
|
modelValue: t.value,
|
|
1375
1375
|
"onUpdate:modelValue": a[3] || (a[3] = (u) => t.value = u),
|
|
1376
1376
|
as: "div",
|
|
1377
1377
|
class: "relative mt-1"
|
|
1378
1378
|
}, {
|
|
1379
1379
|
default: Pe(() => [
|
|
1380
|
-
|
|
1380
|
+
H(M(Lo), {
|
|
1381
1381
|
class: "w-full bg-white border border-gray-300 rounded py-2.5 pl-3 pr-10 text-sm text-gray-800 font-medium focus:outline-none focus:ring-0.5 focus:ring-gray-400 focus:border-gray-400",
|
|
1382
1382
|
onChange: a[0] || (a[0] = (u) => n.value = u.target.value),
|
|
1383
1383
|
displayValue: (u) => e.languages[u],
|
|
1384
|
-
onFocus: a[1] || (a[1] = (u) =>
|
|
1384
|
+
onFocus: a[1] || (a[1] = (u) => i(u))
|
|
1385
1385
|
}, null, 8, ["displayValue"]),
|
|
1386
|
-
|
|
1386
|
+
H(M(Io), {
|
|
1387
1387
|
ref_key: "btnSelect",
|
|
1388
1388
|
ref: l,
|
|
1389
1389
|
class: "absolute inset-y-0 right-0 flex items-center pr-2"
|
|
1390
1390
|
}, {
|
|
1391
1391
|
default: Pe(() => [
|
|
1392
|
-
|
|
1392
|
+
H(M(Mo), {
|
|
1393
1393
|
class: "h-5 w-5 text-gray-400",
|
|
1394
1394
|
"aria-hidden": "true",
|
|
1395
|
-
onClick: a[2] || (a[2] = (u) =>
|
|
1395
|
+
onClick: a[2] || (a[2] = (u) => i(u))
|
|
1396
1396
|
})
|
|
1397
1397
|
]),
|
|
1398
1398
|
_: 1
|
|
1399
1399
|
}, 512),
|
|
1400
|
-
|
|
1400
|
+
H(M(Po), { class: "absolute mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm z-50" }, {
|
|
1401
1401
|
default: Pe(() => [
|
|
1402
|
-
(w(!0), $(Z, null, se(
|
|
1402
|
+
(w(!0), $(Z, null, se(r.value, ([u, f]) => (w(), ee(M(Vo), {
|
|
1403
1403
|
key: u,
|
|
1404
1404
|
value: u
|
|
1405
1405
|
}, {
|
|
@@ -1412,7 +1412,7 @@ const mt = {
|
|
|
1412
1412
|
}, [
|
|
1413
1413
|
C("span", {
|
|
1414
1414
|
class: Ce(["block truncate", m && "font-semibold"])
|
|
1415
|
-
},
|
|
1415
|
+
}, te(f), 3)
|
|
1416
1416
|
], 2)
|
|
1417
1417
|
]),
|
|
1418
1418
|
_: 2
|
|
@@ -1449,7 +1449,7 @@ const mt = {
|
|
|
1449
1449
|
const t = o;
|
|
1450
1450
|
return (n, l) => e.isBidirect ? (w(), $("button", {
|
|
1451
1451
|
key: 1,
|
|
1452
|
-
onClick: l[0] || (l[0] = (
|
|
1452
|
+
onClick: l[0] || (l[0] = (r) => t("swap"))
|
|
1453
1453
|
}, jo)) : (w(), $("button", No, Do));
|
|
1454
1454
|
}
|
|
1455
1455
|
};
|
|
@@ -1484,42 +1484,42 @@ class qo {
|
|
|
1484
1484
|
this.target = null, this.targetQueue = [], this.onQueue = [], this.plugin = o, this.hook = t;
|
|
1485
1485
|
const n = {};
|
|
1486
1486
|
if (o.settings)
|
|
1487
|
-
for (const
|
|
1488
|
-
const s = o.settings[
|
|
1489
|
-
n[
|
|
1487
|
+
for (const i in o.settings) {
|
|
1488
|
+
const s = o.settings[i];
|
|
1489
|
+
n[i] = s.defaultValue;
|
|
1490
1490
|
}
|
|
1491
1491
|
const l = `__vue-devtools-plugin-settings__${o.id}`;
|
|
1492
|
-
let
|
|
1492
|
+
let r = Object.assign({}, n);
|
|
1493
1493
|
try {
|
|
1494
|
-
const
|
|
1495
|
-
Object.assign(
|
|
1494
|
+
const i = localStorage.getItem(l), s = JSON.parse(i);
|
|
1495
|
+
Object.assign(r, s);
|
|
1496
1496
|
} catch {
|
|
1497
1497
|
}
|
|
1498
1498
|
this.fallbacks = {
|
|
1499
1499
|
getSettings() {
|
|
1500
|
-
return
|
|
1500
|
+
return r;
|
|
1501
1501
|
},
|
|
1502
|
-
setSettings(
|
|
1502
|
+
setSettings(i) {
|
|
1503
1503
|
try {
|
|
1504
|
-
localStorage.setItem(l, JSON.stringify(
|
|
1504
|
+
localStorage.setItem(l, JSON.stringify(i));
|
|
1505
1505
|
} catch {
|
|
1506
1506
|
}
|
|
1507
|
-
|
|
1507
|
+
r = i;
|
|
1508
1508
|
},
|
|
1509
1509
|
now() {
|
|
1510
1510
|
return Go();
|
|
1511
1511
|
}
|
|
1512
|
-
}, t && t.on(Zo, (
|
|
1513
|
-
|
|
1512
|
+
}, t && t.on(Zo, (i, s) => {
|
|
1513
|
+
i === this.plugin.id && this.fallbacks.setSettings(s);
|
|
1514
1514
|
}), this.proxiedOn = new Proxy({}, {
|
|
1515
|
-
get: (
|
|
1515
|
+
get: (i, s) => this.target ? this.target.on[s] : (...a) => {
|
|
1516
1516
|
this.onQueue.push({
|
|
1517
1517
|
method: s,
|
|
1518
1518
|
args: a
|
|
1519
1519
|
});
|
|
1520
1520
|
}
|
|
1521
1521
|
}), this.proxiedTarget = new Proxy({}, {
|
|
1522
|
-
get: (
|
|
1522
|
+
get: (i, s) => this.target ? this.target[s] : s === "on" ? this.proxiedOn : Object.keys(this.fallbacks).includes(s) ? (...a) => (this.targetQueue.push({
|
|
1523
1523
|
method: s,
|
|
1524
1524
|
args: a,
|
|
1525
1525
|
resolve: () => {
|
|
@@ -1542,16 +1542,16 @@ class qo {
|
|
|
1542
1542
|
}
|
|
1543
1543
|
}
|
|
1544
1544
|
function qt(e, o) {
|
|
1545
|
-
const t = e, n = Gt(), l = Ho(),
|
|
1546
|
-
if (l && (n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !
|
|
1545
|
+
const t = e, n = Gt(), l = Ho(), r = zo && t.enableEarlyProxy;
|
|
1546
|
+
if (l && (n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !r))
|
|
1547
1547
|
l.emit(Uo, e, o);
|
|
1548
1548
|
else {
|
|
1549
|
-
const
|
|
1549
|
+
const i = r ? new qo(t, l) : null;
|
|
1550
1550
|
(n.__VUE_DEVTOOLS_PLUGINS__ = n.__VUE_DEVTOOLS_PLUGINS__ || []).push({
|
|
1551
1551
|
pluginDescriptor: t,
|
|
1552
1552
|
setupFn: o,
|
|
1553
|
-
proxy:
|
|
1554
|
-
}),
|
|
1553
|
+
proxy: i
|
|
1554
|
+
}), i && o(i.proxiedTarget);
|
|
1555
1555
|
}
|
|
1556
1556
|
}
|
|
1557
1557
|
/*!
|
|
@@ -1571,11 +1571,11 @@ var ne;
|
|
|
1571
1571
|
(function(e) {
|
|
1572
1572
|
e.direct = "direct", e.patchObject = "patch object", e.patchFunction = "patch function";
|
|
1573
1573
|
})(ne || (ne = {}));
|
|
1574
|
-
const Be = typeof window < "u", Se = (process.env.NODE_ENV !== "production" || !1) && process.env.NODE_ENV !== "test" && Be,
|
|
1574
|
+
const Be = typeof window < "u", Se = (process.env.NODE_ENV !== "production" || !1) && process.env.NODE_ENV !== "test" && Be, bt = typeof window == "object" && window.window === window ? window : typeof self == "object" && self.self === self ? self : typeof global == "object" && global.global === global ? global : typeof globalThis == "object" ? globalThis : { HTMLElement: null };
|
|
1575
1575
|
function Jo(e, { autoBom: o = !1 } = {}) {
|
|
1576
1576
|
return o && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type) ? new Blob(["\uFEFF", e], { type: e.type }) : e;
|
|
1577
1577
|
}
|
|
1578
|
-
function
|
|
1578
|
+
function rt(e, o, t) {
|
|
1579
1579
|
const n = new XMLHttpRequest();
|
|
1580
1580
|
n.open("GET", e), n.responseType = "blob", n.onload = function() {
|
|
1581
1581
|
Qt(n.response, o, t);
|
|
@@ -1613,7 +1613,7 @@ const Re = typeof navigator == "object" ? navigator : { userAgent: "" }, Yt = /M
|
|
|
1613
1613
|
};
|
|
1614
1614
|
function Ko(e, o = "download", t) {
|
|
1615
1615
|
const n = document.createElement("a");
|
|
1616
|
-
n.download = o, n.rel = "noopener", typeof e == "string" ? (n.href = e, n.origin !== location.origin ? Kt(n.href) ?
|
|
1616
|
+
n.download = o, n.rel = "noopener", typeof e == "string" ? (n.href = e, n.origin !== location.origin ? Kt(n.href) ? rt(e, o, t) : (n.target = "_blank", Me(n)) : Me(n)) : (n.href = URL.createObjectURL(e), setTimeout(function() {
|
|
1617
1617
|
URL.revokeObjectURL(n.href);
|
|
1618
1618
|
}, 4e4), setTimeout(function() {
|
|
1619
1619
|
Me(n);
|
|
@@ -1622,7 +1622,7 @@ function Ko(e, o = "download", t) {
|
|
|
1622
1622
|
function Yo(e, o = "download", t) {
|
|
1623
1623
|
if (typeof e == "string")
|
|
1624
1624
|
if (Kt(e))
|
|
1625
|
-
|
|
1625
|
+
rt(e, o, t);
|
|
1626
1626
|
else {
|
|
1627
1627
|
const n = document.createElement("a");
|
|
1628
1628
|
n.href = e, n.target = "_blank", setTimeout(function() {
|
|
@@ -1634,15 +1634,15 @@ function Yo(e, o = "download", t) {
|
|
|
1634
1634
|
}
|
|
1635
1635
|
function Qo(e, o, t, n) {
|
|
1636
1636
|
if (n = n || open("", "_blank"), n && (n.document.title = n.document.body.innerText = "downloading..."), typeof e == "string")
|
|
1637
|
-
return
|
|
1638
|
-
const l = e.type === "application/octet-stream",
|
|
1639
|
-
if ((
|
|
1637
|
+
return rt(e, o, t);
|
|
1638
|
+
const l = e.type === "application/octet-stream", r = /constructor/i.test(String(bt.HTMLElement)) || "safari" in bt, i = /CriOS\/[\d]+/.test(navigator.userAgent);
|
|
1639
|
+
if ((i || l && r || Yt) && typeof FileReader < "u") {
|
|
1640
1640
|
const s = new FileReader();
|
|
1641
1641
|
s.onloadend = function() {
|
|
1642
1642
|
let a = s.result;
|
|
1643
1643
|
if (typeof a != "string")
|
|
1644
1644
|
throw n = null, new Error("Wrong reader.result type");
|
|
1645
|
-
a =
|
|
1645
|
+
a = i ? a : a.replace(/^data:[^;]*;/, "data:attachment/file;"), n ? n.location.href = a : location.assign(a), n = null;
|
|
1646
1646
|
}, s.readAsDataURL(e);
|
|
1647
1647
|
} else {
|
|
1648
1648
|
const s = URL.createObjectURL(e);
|
|
@@ -1651,7 +1651,7 @@ function Qo(e, o, t, n) {
|
|
|
1651
1651
|
}, 4e4);
|
|
1652
1652
|
}
|
|
1653
1653
|
}
|
|
1654
|
-
function
|
|
1654
|
+
function B(e, o) {
|
|
1655
1655
|
const t = "🍍 " + e;
|
|
1656
1656
|
typeof __VUE_DEVTOOLS_TOAST__ == "function" ? __VUE_DEVTOOLS_TOAST__(t, o) : o === "error" ? console.error(t) : o === "warn" ? console.warn(t) : console.log(t);
|
|
1657
1657
|
}
|
|
@@ -1660,29 +1660,29 @@ function it(e) {
|
|
|
1660
1660
|
}
|
|
1661
1661
|
function Xt() {
|
|
1662
1662
|
if (!("clipboard" in navigator))
|
|
1663
|
-
return
|
|
1663
|
+
return B("Your browser doesn't support the Clipboard API", "error"), !0;
|
|
1664
1664
|
}
|
|
1665
1665
|
function en(e) {
|
|
1666
|
-
return e instanceof Error && e.message.toLowerCase().includes("document is not focused") ? (
|
|
1666
|
+
return e instanceof Error && e.message.toLowerCase().includes("document is not focused") ? (B('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.', "warn"), !0) : !1;
|
|
1667
1667
|
}
|
|
1668
1668
|
async function Xo(e) {
|
|
1669
1669
|
if (!Xt())
|
|
1670
1670
|
try {
|
|
1671
|
-
await navigator.clipboard.writeText(JSON.stringify(e.state.value)),
|
|
1671
|
+
await navigator.clipboard.writeText(JSON.stringify(e.state.value)), B("Global state copied to clipboard.");
|
|
1672
1672
|
} catch (o) {
|
|
1673
1673
|
if (en(o))
|
|
1674
1674
|
return;
|
|
1675
|
-
|
|
1675
|
+
B("Failed to serialize the state. Check the console for more details.", "error"), console.error(o);
|
|
1676
1676
|
}
|
|
1677
1677
|
}
|
|
1678
1678
|
async function el(e) {
|
|
1679
1679
|
if (!Xt())
|
|
1680
1680
|
try {
|
|
1681
|
-
tn(e, JSON.parse(await navigator.clipboard.readText())),
|
|
1681
|
+
tn(e, JSON.parse(await navigator.clipboard.readText())), B("Global state pasted from clipboard.");
|
|
1682
1682
|
} catch (o) {
|
|
1683
1683
|
if (en(o))
|
|
1684
1684
|
return;
|
|
1685
|
-
|
|
1685
|
+
B("Failed to deserialize the state from clipboard. Check the console for more details.", "error"), console.error(o);
|
|
1686
1686
|
}
|
|
1687
1687
|
}
|
|
1688
1688
|
async function tl(e) {
|
|
@@ -1691,7 +1691,7 @@ async function tl(e) {
|
|
|
1691
1691
|
type: "text/plain;charset=utf-8"
|
|
1692
1692
|
}), "pinia-state.json");
|
|
1693
1693
|
} catch (o) {
|
|
1694
|
-
|
|
1694
|
+
B("Failed to export the state as JSON. Check the console for more details.", "error"), console.error(o);
|
|
1695
1695
|
}
|
|
1696
1696
|
}
|
|
1697
1697
|
let oe;
|
|
@@ -1716,9 +1716,9 @@ async function ol(e) {
|
|
|
1716
1716
|
if (!t)
|
|
1717
1717
|
return;
|
|
1718
1718
|
const { text: n, file: l } = t;
|
|
1719
|
-
tn(e, JSON.parse(n)),
|
|
1719
|
+
tn(e, JSON.parse(n)), B(`Global state imported from "${l.name}".`);
|
|
1720
1720
|
} catch (o) {
|
|
1721
|
-
|
|
1721
|
+
B("Failed to import the state from JSON. Check the console for more details.", "error"), console.error(o);
|
|
1722
1722
|
}
|
|
1723
1723
|
}
|
|
1724
1724
|
function tn(e, o) {
|
|
@@ -1748,17 +1748,17 @@ function sl(e) {
|
|
|
1748
1748
|
if (it(e)) {
|
|
1749
1749
|
const t = Array.from(e._s.keys()), n = e._s;
|
|
1750
1750
|
return {
|
|
1751
|
-
state: t.map((
|
|
1751
|
+
state: t.map((r) => ({
|
|
1752
1752
|
editable: !0,
|
|
1753
|
-
key:
|
|
1754
|
-
value: e.state.value[
|
|
1753
|
+
key: r,
|
|
1754
|
+
value: e.state.value[r]
|
|
1755
1755
|
})),
|
|
1756
|
-
getters: t.filter((
|
|
1757
|
-
const
|
|
1756
|
+
getters: t.filter((r) => n.get(r)._getters).map((r) => {
|
|
1757
|
+
const i = n.get(r);
|
|
1758
1758
|
return {
|
|
1759
1759
|
editable: !1,
|
|
1760
|
-
key:
|
|
1761
|
-
value:
|
|
1760
|
+
key: r,
|
|
1761
|
+
value: i._getters.reduce((s, a) => (s[a] = i[a], s), {})
|
|
1762
1762
|
};
|
|
1763
1763
|
})
|
|
1764
1764
|
};
|
|
@@ -1780,7 +1780,7 @@ function sl(e) {
|
|
|
1780
1780
|
value: e[t]
|
|
1781
1781
|
}))), o;
|
|
1782
1782
|
}
|
|
1783
|
-
function
|
|
1783
|
+
function rl(e) {
|
|
1784
1784
|
return e ? Array.isArray(e) ? e.reduce((o, t) => (o.keys.push(t.key), o.operations.push(t.type), o.oldValue[t.key] = t.oldValue, o.newValue[t.key] = t.newValue, o), {
|
|
1785
1785
|
oldValue: {},
|
|
1786
1786
|
keys: [],
|
|
@@ -1793,7 +1793,7 @@ function il(e) {
|
|
|
1793
1793
|
newValue: e.newValue
|
|
1794
1794
|
} : {};
|
|
1795
1795
|
}
|
|
1796
|
-
function
|
|
1796
|
+
function il(e) {
|
|
1797
1797
|
switch (e) {
|
|
1798
1798
|
case ne.direct:
|
|
1799
1799
|
return "mutation";
|
|
@@ -1817,7 +1817,7 @@ function ul(e, o) {
|
|
|
1817
1817
|
componentStateTypes: Ne,
|
|
1818
1818
|
app: e
|
|
1819
1819
|
}, (t) => {
|
|
1820
|
-
typeof t.now != "function" &&
|
|
1820
|
+
typeof t.now != "function" && B("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."), t.addTimelineLayer({
|
|
1821
1821
|
id: ue,
|
|
1822
1822
|
label: "Pinia 🍍",
|
|
1823
1823
|
color: 15064968
|
|
@@ -1862,15 +1862,15 @@ function ul(e, o) {
|
|
|
1862
1862
|
tooltip: 'Reset the state (with "$reset")',
|
|
1863
1863
|
action: (n) => {
|
|
1864
1864
|
const l = o._s.get(n);
|
|
1865
|
-
l ? typeof l.$reset != "function" ?
|
|
1865
|
+
l ? typeof l.$reset != "function" ? B(`Cannot reset "${n}" store because it doesn't have a "$reset" method implemented.`, "warn") : (l.$reset(), B(`Store "${n}" reset.`)) : B(`Cannot reset "${n}" store because it wasn't found.`, "warn");
|
|
1866
1866
|
}
|
|
1867
1867
|
}
|
|
1868
1868
|
]
|
|
1869
1869
|
}), t.on.inspectComponent((n, l) => {
|
|
1870
|
-
const
|
|
1871
|
-
if (
|
|
1872
|
-
const
|
|
1873
|
-
Object.values(
|
|
1870
|
+
const r = n.componentInstance && n.componentInstance.proxy;
|
|
1871
|
+
if (r && r._pStores) {
|
|
1872
|
+
const i = n.componentInstance.proxy._pStores;
|
|
1873
|
+
Object.values(i).forEach((s) => {
|
|
1874
1874
|
n.instanceData.state.push({
|
|
1875
1875
|
type: De(s.$id),
|
|
1876
1876
|
key: "state",
|
|
@@ -1908,7 +1908,7 @@ function ul(e, o) {
|
|
|
1908
1908
|
}), t.on.getInspectorTree((n) => {
|
|
1909
1909
|
if (n.app === e && n.inspectorId === U) {
|
|
1910
1910
|
let l = [o];
|
|
1911
|
-
l = l.concat(Array.from(o._s.values())), n.rootNodes = (n.filter ? l.filter((
|
|
1911
|
+
l = l.concat(Array.from(o._s.values())), n.rootNodes = (n.filter ? l.filter((r) => "$id" in r ? r.$id.toLowerCase().includes(n.filter.toLowerCase()) : nn.toLowerCase().includes(n.filter.toLowerCase())) : l).map(ll);
|
|
1912
1912
|
}
|
|
1913
1913
|
}), t.on.getInspectorState((n) => {
|
|
1914
1914
|
if (n.app === e && n.inspectorId === U) {
|
|
@@ -1919,23 +1919,23 @@ function ul(e, o) {
|
|
|
1919
1919
|
}
|
|
1920
1920
|
}), t.on.editInspectorState((n, l) => {
|
|
1921
1921
|
if (n.app === e && n.inspectorId === U) {
|
|
1922
|
-
const
|
|
1923
|
-
if (!
|
|
1924
|
-
return
|
|
1925
|
-
const { path:
|
|
1926
|
-
it(
|
|
1922
|
+
const r = n.nodeId === Ye ? o : o._s.get(n.nodeId);
|
|
1923
|
+
if (!r)
|
|
1924
|
+
return B(`store "${n.nodeId}" not found`, "error");
|
|
1925
|
+
const { path: i } = n;
|
|
1926
|
+
it(r) ? i.unshift("state") : (i.length !== 1 || !r._customProperties.has(i[0]) || i[0] in r.$state) && i.unshift("$state"), be = !1, n.set(r, i, n.state.value), be = !0;
|
|
1927
1927
|
}
|
|
1928
1928
|
}), t.on.editComponentState((n) => {
|
|
1929
1929
|
if (n.type.startsWith("🍍")) {
|
|
1930
|
-
const l = n.type.replace(/^🍍\s*/, ""),
|
|
1931
|
-
if (!
|
|
1932
|
-
return
|
|
1933
|
-
const { path:
|
|
1934
|
-
if (
|
|
1935
|
-
return
|
|
1936
|
-
${
|
|
1930
|
+
const l = n.type.replace(/^🍍\s*/, ""), r = o._s.get(l);
|
|
1931
|
+
if (!r)
|
|
1932
|
+
return B(`store "${l}" not found`, "error");
|
|
1933
|
+
const { path: i } = n;
|
|
1934
|
+
if (i[0] !== "state")
|
|
1935
|
+
return B(`Invalid path for store "${l}":
|
|
1936
|
+
${i}
|
|
1937
1937
|
Only state can be modified.`);
|
|
1938
|
-
|
|
1938
|
+
i[0] = "$state", be = !1, n.set(r, i, n.state.value), be = !0;
|
|
1939
1939
|
}
|
|
1940
1940
|
});
|
|
1941
1941
|
});
|
|
@@ -1963,7 +1963,7 @@ function cl(e, o) {
|
|
|
1963
1963
|
}
|
|
1964
1964
|
}, (t) => {
|
|
1965
1965
|
const n = typeof t.now == "function" ? t.now.bind(t) : Date.now;
|
|
1966
|
-
o.$onAction(({ after:
|
|
1966
|
+
o.$onAction(({ after: i, onError: s, name: a, args: u }) => {
|
|
1967
1967
|
const f = on++;
|
|
1968
1968
|
t.addTimelineEvent({
|
|
1969
1969
|
layerId: ue,
|
|
@@ -1978,8 +1978,8 @@ function cl(e, o) {
|
|
|
1978
1978
|
},
|
|
1979
1979
|
groupId: f
|
|
1980
1980
|
}
|
|
1981
|
-
}),
|
|
1982
|
-
|
|
1981
|
+
}), i((p) => {
|
|
1982
|
+
re = void 0, t.addTimelineEvent({
|
|
1983
1983
|
layerId: ue,
|
|
1984
1984
|
event: {
|
|
1985
1985
|
time: n(),
|
|
@@ -1995,7 +1995,7 @@ function cl(e, o) {
|
|
|
1995
1995
|
}
|
|
1996
1996
|
});
|
|
1997
1997
|
}), s((p) => {
|
|
1998
|
-
|
|
1998
|
+
re = void 0, t.addTimelineEvent({
|
|
1999
1999
|
layerId: ue,
|
|
2000
2000
|
event: {
|
|
2001
2001
|
time: n(),
|
|
@@ -2012,37 +2012,37 @@ function cl(e, o) {
|
|
|
2012
2012
|
}
|
|
2013
2013
|
});
|
|
2014
2014
|
});
|
|
2015
|
-
}, !0), o._customProperties.forEach((
|
|
2016
|
-
|
|
2015
|
+
}, !0), o._customProperties.forEach((i) => {
|
|
2016
|
+
F(() => M(o[i]), (s, a) => {
|
|
2017
2017
|
t.notifyComponentUpdate(), t.sendInspectorState(U), be && t.addTimelineEvent({
|
|
2018
2018
|
layerId: ue,
|
|
2019
2019
|
event: {
|
|
2020
2020
|
time: n(),
|
|
2021
2021
|
title: "Change",
|
|
2022
|
-
subtitle:
|
|
2022
|
+
subtitle: i,
|
|
2023
2023
|
data: {
|
|
2024
2024
|
newValue: s,
|
|
2025
2025
|
oldValue: a
|
|
2026
2026
|
},
|
|
2027
|
-
groupId:
|
|
2027
|
+
groupId: re
|
|
2028
2028
|
}
|
|
2029
2029
|
});
|
|
2030
2030
|
}, { deep: !0 });
|
|
2031
|
-
}), o.$subscribe(({ events:
|
|
2031
|
+
}), o.$subscribe(({ events: i, type: s }, a) => {
|
|
2032
2032
|
if (t.notifyComponentUpdate(), t.sendInspectorState(U), !be)
|
|
2033
2033
|
return;
|
|
2034
2034
|
const u = {
|
|
2035
2035
|
time: n(),
|
|
2036
|
-
title:
|
|
2037
|
-
data: al({ store: Y(o.$id) },
|
|
2038
|
-
groupId:
|
|
2036
|
+
title: il(s),
|
|
2037
|
+
data: al({ store: Y(o.$id) }, rl(i)),
|
|
2038
|
+
groupId: re
|
|
2039
2039
|
};
|
|
2040
|
-
s === ne.patchFunction ? u.subtitle = "⤵️" : s === ne.patchObject ? u.subtitle = "🧩" :
|
|
2040
|
+
s === ne.patchFunction ? u.subtitle = "⤵️" : s === ne.patchObject ? u.subtitle = "🧩" : i && !Array.isArray(i) && (u.subtitle = i.type), i && (u.data["rawEvent(s)"] = {
|
|
2041
2041
|
_custom: {
|
|
2042
2042
|
display: "DebuggerEvent",
|
|
2043
2043
|
type: "object",
|
|
2044
2044
|
tooltip: "raw DebuggerEvent[]",
|
|
2045
|
-
value:
|
|
2045
|
+
value: i
|
|
2046
2046
|
}
|
|
2047
2047
|
}), t.addTimelineEvent({
|
|
2048
2048
|
layerId: ue,
|
|
@@ -2050,8 +2050,8 @@ function cl(e, o) {
|
|
|
2050
2050
|
});
|
|
2051
2051
|
}, { detached: !0, flush: "sync" });
|
|
2052
2052
|
const l = o._hotUpdate;
|
|
2053
|
-
o._hotUpdate = de((
|
|
2054
|
-
l(
|
|
2053
|
+
o._hotUpdate = de((i) => {
|
|
2054
|
+
l(i), t.addTimelineEvent({
|
|
2055
2055
|
layerId: ue,
|
|
2056
2056
|
event: {
|
|
2057
2057
|
time: n(),
|
|
@@ -2064,37 +2064,37 @@ function cl(e, o) {
|
|
|
2064
2064
|
}
|
|
2065
2065
|
}), t.notifyComponentUpdate(), t.sendInspectorTree(U), t.sendInspectorState(U);
|
|
2066
2066
|
});
|
|
2067
|
-
const { $dispose:
|
|
2067
|
+
const { $dispose: r } = o;
|
|
2068
2068
|
o.$dispose = () => {
|
|
2069
|
-
|
|
2070
|
-
}, t.notifyComponentUpdate(), t.sendInspectorTree(U), t.sendInspectorState(U), t.getSettings().logStoreChanges &&
|
|
2069
|
+
r(), t.notifyComponentUpdate(), t.sendInspectorTree(U), t.sendInspectorState(U), t.getSettings().logStoreChanges && B(`Disposed "${o.$id}" store 🗑`);
|
|
2070
|
+
}, t.notifyComponentUpdate(), t.sendInspectorTree(U), t.sendInspectorState(U), t.getSettings().logStoreChanges && B(`"${o.$id}" store installed 🆕`);
|
|
2071
2071
|
});
|
|
2072
2072
|
}
|
|
2073
|
-
let on = 0,
|
|
2074
|
-
function
|
|
2075
|
-
const n = o.reduce((l,
|
|
2073
|
+
let on = 0, re;
|
|
2074
|
+
function Ct(e, o, t) {
|
|
2075
|
+
const n = o.reduce((l, r) => (l[r] = K(e)[r], l), {});
|
|
2076
2076
|
for (const l in n)
|
|
2077
2077
|
e[l] = function() {
|
|
2078
|
-
const
|
|
2078
|
+
const r = on, i = t ? new Proxy(e, {
|
|
2079
2079
|
get(...a) {
|
|
2080
|
-
return
|
|
2080
|
+
return re = r, Reflect.get(...a);
|
|
2081
2081
|
},
|
|
2082
2082
|
set(...a) {
|
|
2083
|
-
return
|
|
2083
|
+
return re = r, Reflect.set(...a);
|
|
2084
2084
|
}
|
|
2085
2085
|
}) : e;
|
|
2086
|
-
|
|
2087
|
-
const s = n[l].apply(
|
|
2088
|
-
return
|
|
2086
|
+
re = r;
|
|
2087
|
+
const s = n[l].apply(i, arguments);
|
|
2088
|
+
return re = void 0, s;
|
|
2089
2089
|
};
|
|
2090
2090
|
}
|
|
2091
2091
|
function dl({ app: e, store: o, options: t }) {
|
|
2092
2092
|
if (o.$id.startsWith("__hot:"))
|
|
2093
2093
|
return;
|
|
2094
|
-
o._isOptionsAPI = !!t.state,
|
|
2094
|
+
o._isOptionsAPI = !!t.state, Ct(o, Object.keys(t.actions), o._isOptionsAPI);
|
|
2095
2095
|
const n = o._hotUpdate;
|
|
2096
2096
|
K(o)._hotUpdate = function(l) {
|
|
2097
|
-
n.apply(this, arguments),
|
|
2097
|
+
n.apply(this, arguments), Ct(o, Object.keys(l._hmrPayload.actions), !!o._isOptionsAPI);
|
|
2098
2098
|
}, cl(
|
|
2099
2099
|
e,
|
|
2100
2100
|
// FIXME: is there a way to allow the assignment from Store<Id, S, G, A> to StoreGeneric?
|
|
@@ -2105,11 +2105,11 @@ function fl() {
|
|
|
2105
2105
|
const e = $t(!0), o = e.run(() => E({}));
|
|
2106
2106
|
let t = [], n = [];
|
|
2107
2107
|
const l = de({
|
|
2108
|
-
install(
|
|
2109
|
-
Te(l), l._a =
|
|
2108
|
+
install(r) {
|
|
2109
|
+
Te(l), l._a = r, r.provide(Jt, l), r.config.globalProperties.$pinia = l, Se && ul(r, l), n.forEach((i) => t.push(i)), n = [];
|
|
2110
2110
|
},
|
|
2111
|
-
use(
|
|
2112
|
-
return !this._a && !Wt ? n.push(
|
|
2111
|
+
use(r) {
|
|
2112
|
+
return !this._a && !Wt ? n.push(r) : t.push(r), this;
|
|
2113
2113
|
},
|
|
2114
2114
|
_p: t,
|
|
2115
2115
|
// it's actually undefined here
|
|
@@ -2127,17 +2127,17 @@ function ln(e, o) {
|
|
|
2127
2127
|
if (!(t in e))
|
|
2128
2128
|
continue;
|
|
2129
2129
|
const l = e[t];
|
|
2130
|
-
fe(l) && fe(n) && !_e(n) && !
|
|
2130
|
+
fe(l) && fe(n) && !_e(n) && !ot(n) ? e[t] = ln(l, n) : e[t] = n;
|
|
2131
2131
|
}
|
|
2132
2132
|
return e;
|
|
2133
2133
|
}
|
|
2134
2134
|
const sn = () => {
|
|
2135
2135
|
};
|
|
2136
|
-
function
|
|
2136
|
+
function _t(e, o, t, n = sn) {
|
|
2137
2137
|
e.push(o);
|
|
2138
2138
|
const l = () => {
|
|
2139
|
-
const
|
|
2140
|
-
|
|
2139
|
+
const r = e.indexOf(o);
|
|
2140
|
+
r > -1 && (e.splice(r, 1), n());
|
|
2141
2141
|
};
|
|
2142
2142
|
return !t && It() && et(l), l;
|
|
2143
2143
|
}
|
|
@@ -2153,7 +2153,7 @@ function Qe(e, o) {
|
|
|
2153
2153
|
if (!o.hasOwnProperty(t))
|
|
2154
2154
|
continue;
|
|
2155
2155
|
const n = o[t], l = e[t];
|
|
2156
|
-
fe(l) && fe(n) && e.hasOwnProperty(t) && !_e(n) && !
|
|
2156
|
+
fe(l) && fe(n) && e.hasOwnProperty(t) && !_e(n) && !ot(n) ? e[t] = Qe(l, n) : e[t] = n;
|
|
2157
2157
|
}
|
|
2158
2158
|
return e;
|
|
2159
2159
|
}
|
|
@@ -2165,28 +2165,28 @@ function hl(e) {
|
|
|
2165
2165
|
return !fe(e) || !e.hasOwnProperty(vl);
|
|
2166
2166
|
}
|
|
2167
2167
|
const { assign: J } = Object;
|
|
2168
|
-
function
|
|
2168
|
+
function xt(e) {
|
|
2169
2169
|
return !!(_e(e) && e.effect);
|
|
2170
2170
|
}
|
|
2171
|
-
function
|
|
2172
|
-
const { state: l, actions:
|
|
2171
|
+
function yt(e, o, t, n) {
|
|
2172
|
+
const { state: l, actions: r, getters: i } = o, s = t.state.value[e];
|
|
2173
2173
|
let a;
|
|
2174
2174
|
function u() {
|
|
2175
2175
|
!s && (process.env.NODE_ENV === "production" || !n) && (t.state.value[e] = l ? l() : {});
|
|
2176
2176
|
const f = process.env.NODE_ENV !== "production" && n ? (
|
|
2177
2177
|
// use ref() to unwrap refs inside state TODO: check if this is still necessary
|
|
2178
|
-
|
|
2179
|
-
) :
|
|
2180
|
-
return J(f,
|
|
2178
|
+
ut(E(l ? l() : {}).value)
|
|
2179
|
+
) : ut(t.state.value[e]);
|
|
2180
|
+
return J(f, r, Object.keys(i || {}).reduce((p, m) => (process.env.NODE_ENV !== "production" && m in f && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${m}" in store "${e}".`), p[m] = de(S(() => {
|
|
2181
2181
|
Te(t);
|
|
2182
2182
|
const x = t._s.get(e);
|
|
2183
|
-
return
|
|
2183
|
+
return i[m].call(x, x);
|
|
2184
2184
|
})), p), {}));
|
|
2185
2185
|
}
|
|
2186
2186
|
return a = Xe(e, u, o, t, n, !0), a;
|
|
2187
2187
|
}
|
|
2188
|
-
function Xe(e, o, t = {}, n, l,
|
|
2189
|
-
let
|
|
2188
|
+
function Xe(e, o, t = {}, n, l, r) {
|
|
2189
|
+
let i;
|
|
2190
2190
|
const s = J({ actions: {} }, t);
|
|
2191
2191
|
if (process.env.NODE_ENV !== "production" && !n._e.active)
|
|
2192
2192
|
throw new Error("Pinia destroyed");
|
|
@@ -2199,7 +2199,7 @@ function Xe(e, o, t = {}, n, l, i) {
|
|
|
2199
2199
|
});
|
|
2200
2200
|
let u, f, p = [], m = [], x;
|
|
2201
2201
|
const v = n.state.value[e];
|
|
2202
|
-
!
|
|
2202
|
+
!r && !v && (process.env.NODE_ENV === "production" || !l) && (n.state.value[e] = {});
|
|
2203
2203
|
const h = E({});
|
|
2204
2204
|
let V;
|
|
2205
2205
|
function A(c) {
|
|
@@ -2219,7 +2219,7 @@ function Xe(e, o, t = {}, n, l, i) {
|
|
|
2219
2219
|
V === y && (u = !0);
|
|
2220
2220
|
}), f = !0, ge(p, d, n.state.value[e]);
|
|
2221
2221
|
}
|
|
2222
|
-
const T =
|
|
2222
|
+
const T = r ? function() {
|
|
2223
2223
|
const { state: d } = t, y = d ? d() : {};
|
|
2224
2224
|
this.$patch((O) => {
|
|
2225
2225
|
J(O, y);
|
|
@@ -2231,17 +2231,17 @@ function Xe(e, o, t = {}, n, l, i) {
|
|
|
2231
2231
|
} : sn
|
|
2232
2232
|
);
|
|
2233
2233
|
function R() {
|
|
2234
|
-
|
|
2234
|
+
i.stop(), p = [], m = [], n._s.delete(e);
|
|
2235
2235
|
}
|
|
2236
2236
|
function D(c, d) {
|
|
2237
2237
|
return function() {
|
|
2238
2238
|
Te(n);
|
|
2239
2239
|
const y = Array.from(arguments), O = [], k = [];
|
|
2240
|
-
function N(
|
|
2241
|
-
O.push(
|
|
2240
|
+
function N(j) {
|
|
2241
|
+
O.push(j);
|
|
2242
2242
|
}
|
|
2243
|
-
function G(
|
|
2244
|
-
k.push(
|
|
2243
|
+
function G(j) {
|
|
2244
|
+
k.push(j);
|
|
2245
2245
|
}
|
|
2246
2246
|
ge(m, {
|
|
2247
2247
|
args: y,
|
|
@@ -2253,10 +2253,10 @@ function Xe(e, o, t = {}, n, l, i) {
|
|
|
2253
2253
|
let q;
|
|
2254
2254
|
try {
|
|
2255
2255
|
q = d.apply(this && this.$id === e ? this : b, y);
|
|
2256
|
-
} catch (
|
|
2257
|
-
throw ge(k,
|
|
2256
|
+
} catch (j) {
|
|
2257
|
+
throw ge(k, j), j;
|
|
2258
2258
|
}
|
|
2259
|
-
return q instanceof Promise ? q.then((
|
|
2259
|
+
return q instanceof Promise ? q.then((j) => (ge(O, j), j)).catch((j) => (ge(k, j), Promise.reject(j))) : (ge(O, q), q);
|
|
2260
2260
|
};
|
|
2261
2261
|
}
|
|
2262
2262
|
const _ = /* @__PURE__ */ de({
|
|
@@ -2268,11 +2268,11 @@ function Xe(e, o, t = {}, n, l, i) {
|
|
|
2268
2268
|
_p: n,
|
|
2269
2269
|
// _s: scope,
|
|
2270
2270
|
$id: e,
|
|
2271
|
-
$onAction:
|
|
2271
|
+
$onAction: _t.bind(null, m),
|
|
2272
2272
|
$patch: A,
|
|
2273
2273
|
$reset: T,
|
|
2274
2274
|
$subscribe(c, d = {}) {
|
|
2275
|
-
const y =
|
|
2275
|
+
const y = _t(p, c, d.detached, () => O()), O = i.run(() => F(() => n.state.value[e], (k) => {
|
|
2276
2276
|
(d.flush === "sync" ? f : u) && c({
|
|
2277
2277
|
storeId: e,
|
|
2278
2278
|
type: ne.direct,
|
|
@@ -2293,15 +2293,15 @@ function Xe(e, o, t = {}, n, l, i) {
|
|
|
2293
2293
|
// setupStore
|
|
2294
2294
|
) : L);
|
|
2295
2295
|
n._s.set(e, b);
|
|
2296
|
-
const I = (n._a && n._a.runWithContext || pl)(() => n._e.run(() => (
|
|
2296
|
+
const I = (n._a && n._a.runWithContext || pl)(() => n._e.run(() => (i = $t()).run(o)));
|
|
2297
2297
|
for (const c in I) {
|
|
2298
2298
|
const d = I[c];
|
|
2299
|
-
if (_e(d) && !
|
|
2300
|
-
process.env.NODE_ENV !== "production" && l ? ke(h.value, c, We(I, c)) :
|
|
2299
|
+
if (_e(d) && !xt(d) || ot(d))
|
|
2300
|
+
process.env.NODE_ENV !== "production" && l ? ke(h.value, c, We(I, c)) : r || (v && hl(d) && (_e(d) ? d.value = v[c] : Qe(d, v[c])), n.state.value[e][c] = d), process.env.NODE_ENV !== "production" && _.state.push(c);
|
|
2301
2301
|
else if (typeof d == "function") {
|
|
2302
2302
|
const y = process.env.NODE_ENV !== "production" && l ? d : D(c, d);
|
|
2303
2303
|
I[c] = y, process.env.NODE_ENV !== "production" && (_.actions[c] = d), s.actions[c] = d;
|
|
2304
|
-
} else process.env.NODE_ENV !== "production" &&
|
|
2304
|
+
} else process.env.NODE_ENV !== "production" && xt(d) && (_.getters[c] = r ? (
|
|
2305
2305
|
// @ts-expect-error
|
|
2306
2306
|
t.getters[c]
|
|
2307
2307
|
) : d, Be && (I._getters || // @ts-expect-error: same
|
|
@@ -2333,7 +2333,7 @@ function Xe(e, o, t = {}, n, l, i) {
|
|
|
2333
2333
|
ke(b, d, D(d, y));
|
|
2334
2334
|
}
|
|
2335
2335
|
for (const d in c._hmrPayload.getters) {
|
|
2336
|
-
const y = c._hmrPayload.getters[d], O =
|
|
2336
|
+
const y = c._hmrPayload.getters[d], O = r ? (
|
|
2337
2337
|
// special handling of options api
|
|
2338
2338
|
S(() => (Te(n), y.call(b, b)))
|
|
2339
2339
|
) : y;
|
|
@@ -2357,7 +2357,7 @@ function Xe(e, o, t = {}, n, l, i) {
|
|
|
2357
2357
|
}
|
|
2358
2358
|
return n._p.forEach((c) => {
|
|
2359
2359
|
if (Se) {
|
|
2360
|
-
const d =
|
|
2360
|
+
const d = i.run(() => c({
|
|
2361
2361
|
store: b,
|
|
2362
2362
|
app: n._a,
|
|
2363
2363
|
pinia: n,
|
|
@@ -2365,7 +2365,7 @@ function Xe(e, o, t = {}, n, l, i) {
|
|
|
2365
2365
|
}));
|
|
2366
2366
|
Object.keys(d || {}).forEach((y) => b._customProperties.add(y)), J(b, d);
|
|
2367
2367
|
} else
|
|
2368
|
-
J(b,
|
|
2368
|
+
J(b, i.run(() => c({
|
|
2369
2369
|
store: b,
|
|
2370
2370
|
app: n._a,
|
|
2371
2371
|
pinia: n,
|
|
@@ -2373,16 +2373,16 @@ function Xe(e, o, t = {}, n, l, i) {
|
|
|
2373
2373
|
})));
|
|
2374
2374
|
}), process.env.NODE_ENV !== "production" && b.$state && typeof b.$state == "object" && typeof b.$state.constructor == "function" && !b.$state.constructor.toString().includes("[native code]") && console.warn(`[🍍]: The "state" must be a plain object. It cannot be
|
|
2375
2375
|
state: () => new MyClass()
|
|
2376
|
-
Found in store "${b.$id}".`), v &&
|
|
2376
|
+
Found in store "${b.$id}".`), v && r && t.hydrate && t.hydrate(b.$state, v), u = !0, f = !0, b;
|
|
2377
2377
|
}
|
|
2378
2378
|
function He(e, o, t) {
|
|
2379
2379
|
let n, l;
|
|
2380
|
-
const
|
|
2380
|
+
const r = typeof o == "function";
|
|
2381
2381
|
if (typeof e == "string")
|
|
2382
|
-
n = e, l =
|
|
2382
|
+
n = e, l = r ? t : o;
|
|
2383
2383
|
else if (l = e, n = e.id, process.env.NODE_ENV !== "production" && typeof n != "string")
|
|
2384
2384
|
throw new Error('[🍍]: "defineStore()" must be passed a store id as its first argument.');
|
|
2385
|
-
function
|
|
2385
|
+
function i(s, a) {
|
|
2386
2386
|
const u = hn();
|
|
2387
2387
|
if (s = // in test mode, ignore the argument provided as we can always retrieve a
|
|
2388
2388
|
// pinia instance with getActivePinia()
|
|
@@ -2390,10 +2390,10 @@ function He(e, o, t) {
|
|
|
2390
2390
|
throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
|
|
2391
2391
|
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
|
|
2392
2392
|
This will fail in production.`);
|
|
2393
|
-
s = we, s._s.has(n) || (
|
|
2393
|
+
s = we, s._s.has(n) || (r ? Xe(n, o, l, s) : yt(n, l, s), process.env.NODE_ENV !== "production" && (i._pinia = s));
|
|
2394
2394
|
const f = s._s.get(n);
|
|
2395
2395
|
if (process.env.NODE_ENV !== "production" && a) {
|
|
2396
|
-
const p = "__hot:" + n, m =
|
|
2396
|
+
const p = "__hot:" + n, m = r ? Xe(p, o, l, s, !0) : yt(p, J({}, l), s, !0);
|
|
2397
2397
|
a._hotUpdate(m), delete s.state.value[p], s._s.delete(p);
|
|
2398
2398
|
}
|
|
2399
2399
|
if (process.env.NODE_ENV !== "production" && Be) {
|
|
@@ -2406,17 +2406,17 @@ This will fail in production.`);
|
|
|
2406
2406
|
}
|
|
2407
2407
|
return f;
|
|
2408
2408
|
}
|
|
2409
|
-
return
|
|
2409
|
+
return i.$id = n, i;
|
|
2410
2410
|
}
|
|
2411
2411
|
const ze = He("language", () => {
|
|
2412
2412
|
const e = E("auto"), o = E("en"), t = E({
|
|
2413
2413
|
src: [],
|
|
2414
2414
|
target: []
|
|
2415
2415
|
}), n = S(() => t.value.src[e.value]), l = S(() => t.value.target[o.value]);
|
|
2416
|
-
function
|
|
2416
|
+
function r(a, u) {
|
|
2417
2417
|
e.value = a == null ? void 0 : a.src, o.value = a == null ? void 0 : a.target, t.value = u;
|
|
2418
2418
|
}
|
|
2419
|
-
function
|
|
2419
|
+
function i() {
|
|
2420
2420
|
if (!t.value.src[o.value] || !t.value.target[e.value]) return;
|
|
2421
2421
|
const a = e.value;
|
|
2422
2422
|
e.value = o.value, o.value = a;
|
|
@@ -2424,7 +2424,7 @@ const ze = He("language", () => {
|
|
|
2424
2424
|
function s(a) {
|
|
2425
2425
|
return t.value.src[a] || t.value.target[a];
|
|
2426
2426
|
}
|
|
2427
|
-
return { languages: t, src: e, target: o, srcLabel: n, targetLabel: l, init:
|
|
2427
|
+
return { languages: t, src: e, target: o, srcLabel: n, targetLabel: l, init: r, swap: i, getLabel: s };
|
|
2428
2428
|
}), ml = {
|
|
2429
2429
|
key: 0,
|
|
2430
2430
|
class: "flex"
|
|
@@ -2436,24 +2436,24 @@ const ze = He("language", () => {
|
|
|
2436
2436
|
o.swap();
|
|
2437
2437
|
}
|
|
2438
2438
|
return (n, l) => M(o).languages ? (w(), $("div", ml, [
|
|
2439
|
-
|
|
2439
|
+
H(gt, {
|
|
2440
2440
|
modelValue: M(o).src,
|
|
2441
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
2441
|
+
"onUpdate:modelValue": l[0] || (l[0] = (r) => M(o).src = r),
|
|
2442
2442
|
languages: M(o).languages.src,
|
|
2443
2443
|
class: "grow"
|
|
2444
2444
|
}, null, 8, ["modelValue", "languages"]),
|
|
2445
|
-
|
|
2445
|
+
H(Bo, {
|
|
2446
2446
|
isBidirect: M(o).src !== "auto",
|
|
2447
2447
|
class: "grow-0 mx-3",
|
|
2448
2448
|
onSwap: t
|
|
2449
2449
|
}, null, 8, ["isBidirect"]),
|
|
2450
|
-
|
|
2450
|
+
H(gt, {
|
|
2451
2451
|
modelValue: M(o).target,
|
|
2452
|
-
"onUpdate:modelValue": l[1] || (l[1] = (
|
|
2452
|
+
"onUpdate:modelValue": l[1] || (l[1] = (r) => M(o).target = r),
|
|
2453
2453
|
languages: M(o).languages.target,
|
|
2454
2454
|
class: "grow"
|
|
2455
2455
|
}, null, 8, ["modelValue", "languages"])
|
|
2456
|
-
])) :
|
|
2456
|
+
])) : X("", !0);
|
|
2457
2457
|
}
|
|
2458
2458
|
}, bl = {
|
|
2459
2459
|
INPUT_MAX_LENGTH: 5e3,
|
|
@@ -2511,43 +2511,45 @@ const yl = /* @__PURE__ */ Ue(Cl, [["render", xl]]), wl = "data:image/svg+xml,%3
|
|
|
2511
2511
|
},
|
|
2512
2512
|
emits: ["loadTTS"],
|
|
2513
2513
|
setup(e, { emit: o }) {
|
|
2514
|
-
const t = rn(), n = e, l = o,
|
|
2515
|
-
|
|
2516
|
-
|
|
2514
|
+
const t = rn(), n = e, l = o, r = S(() => t.tts[n.type]), i = E(!1), s = new Audio();
|
|
2515
|
+
F(
|
|
2516
|
+
r,
|
|
2517
2517
|
() => {
|
|
2518
|
-
if (!
|
|
2519
|
-
|
|
2518
|
+
if (!r.value) {
|
|
2519
|
+
i.value = !1;
|
|
2520
2520
|
return;
|
|
2521
2521
|
}
|
|
2522
2522
|
u();
|
|
2523
2523
|
},
|
|
2524
2524
|
{ immediate: !0 }
|
|
2525
|
-
)
|
|
2525
|
+
), tt(() => {
|
|
2526
|
+
f(), s.src = "";
|
|
2527
|
+
});
|
|
2526
2528
|
function a() {
|
|
2527
|
-
if (
|
|
2529
|
+
if (r.value) {
|
|
2528
2530
|
u();
|
|
2529
2531
|
return;
|
|
2530
2532
|
}
|
|
2531
|
-
|
|
2533
|
+
i.value = !0, l("loadTTS");
|
|
2532
2534
|
}
|
|
2533
2535
|
function u() {
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
+
r.value && (s.src = r.value, i.value = !0, s.play().catch(() => {
|
|
2537
|
+
i.value = !1;
|
|
2536
2538
|
}));
|
|
2537
2539
|
}
|
|
2538
2540
|
function f() {
|
|
2539
|
-
s.pause(), s.currentTime = 0,
|
|
2541
|
+
s.pause(), s.currentTime = 0, i.value = !1;
|
|
2540
2542
|
}
|
|
2541
2543
|
return s.onended = () => {
|
|
2542
|
-
|
|
2543
|
-
}, (p, m) =>
|
|
2544
|
+
i.value = !1;
|
|
2545
|
+
}, (p, m) => i.value ? (w(), $("button", {
|
|
2544
2546
|
key: 1,
|
|
2545
2547
|
class: "btn btn-xs btn-ghost btn-circle",
|
|
2546
|
-
onClick:
|
|
2548
|
+
onClick: ct(f, ["prevent"])
|
|
2547
2549
|
}, Tl)) : (w(), $("button", {
|
|
2548
2550
|
key: 0,
|
|
2549
2551
|
class: "btn btn-xs btn-ghost btn-circle",
|
|
2550
|
-
onClick:
|
|
2552
|
+
onClick: ct(a, ["prevent"])
|
|
2551
2553
|
}, Ol));
|
|
2552
2554
|
}
|
|
2553
2555
|
}, Ll = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M3.19102%203.19102C3.44571%202.93633%203.85864%202.93633%204.11333%203.19102L12.809%2011.8867C13.0637%2012.1414%2013.0637%2012.5543%2012.809%2012.809C12.5543%2013.0637%2012.1414%2013.0637%2011.8867%2012.809L3.19102%204.11333C2.93633%203.85864%202.93633%203.44571%203.19102%203.19102Z'%20fill='%231A1F2A'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12.809%203.19102C13.0637%203.44571%2013.0637%203.85864%2012.809%204.11333L4.11333%2012.809C3.85864%2013.0637%203.44571%2013.0637%203.19102%2012.809C2.93633%2012.5543%202.93633%2012.1414%203.19102%2011.8867L11.8867%203.19102C12.1414%202.93633%2012.5543%202.93633%2012.809%203.19102Z'%20fill='%231A1F2A'/%3e%3c/svg%3e", Pl = {}, Vl = { class: "btn btn-xs btn-circle btn-ghost" }, kl = /* @__PURE__ */ C("img", {
|
|
@@ -2628,44 +2630,45 @@ const Nl = /* @__PURE__ */ Ue(Pl, [["render", Rl]]), Al = "data:image/svg+xml,%3
|
|
|
2628
2630
|
emits: ["clear", "favorite", "loadTTS"],
|
|
2629
2631
|
setup(e, { emit: o }) {
|
|
2630
2632
|
const t = e, n = o;
|
|
2631
|
-
return (l,
|
|
2632
|
-
|
|
2633
|
+
return (l, r) => (w(), $("div", zl, [
|
|
2634
|
+
t.src ? (w(), ee(Il, {
|
|
2635
|
+
key: 0,
|
|
2633
2636
|
type: t.type,
|
|
2634
|
-
onLoadTTS:
|
|
2635
|
-
}, null, 8, ["type"]),
|
|
2637
|
+
onLoadTTS: r[0] || (r[0] = (i) => n("loadTTS"))
|
|
2638
|
+
}, null, 8, ["type"])) : X("", !0),
|
|
2636
2639
|
C("div", Ul, [
|
|
2637
|
-
mn(
|
|
2638
|
-
e.phonetic ? (w(), $("span", Zl, "- [" +
|
|
2640
|
+
mn(te(e.srcLabel) + " ", 1),
|
|
2641
|
+
e.phonetic ? (w(), $("span", Zl, "- [" + te(t.phonetic) + "]", 1)) : X("", !0)
|
|
2639
2642
|
]),
|
|
2640
2643
|
Wl,
|
|
2641
|
-
t.loading ? (w(),
|
|
2642
|
-
t.src && t.isClearBtn ? (w(),
|
|
2643
|
-
key: 1,
|
|
2644
|
-
onClick: i[1] || (i[1] = (r) => n("clear"))
|
|
2645
|
-
})) : ee("", !0),
|
|
2646
|
-
t.src && t.isFavoriteBtn ? (w(), te(Hl, {
|
|
2644
|
+
t.loading ? (w(), ee(yl, { key: 1 })) : X("", !0),
|
|
2645
|
+
t.src && t.isClearBtn ? (w(), ee(Nl, {
|
|
2647
2646
|
key: 2,
|
|
2647
|
+
onClick: r[1] || (r[1] = (i) => n("clear"))
|
|
2648
|
+
})) : X("", !0),
|
|
2649
|
+
t.src && t.isFavoriteBtn ? (w(), ee(Hl, {
|
|
2650
|
+
key: 3,
|
|
2648
2651
|
isFilled: t.isFavorite,
|
|
2649
|
-
onClick:
|
|
2650
|
-
}, null, 8, ["isFilled"])) :
|
|
2652
|
+
onClick: r[2] || (r[2] = (i) => n("favorite"))
|
|
2653
|
+
}, null, 8, ["isFilled"])) : X("", !0)
|
|
2651
2654
|
]));
|
|
2652
2655
|
}
|
|
2653
2656
|
}, he = He("translation", () => {
|
|
2654
2657
|
const e = E(null), o = E(null), t = E(null), n = E({
|
|
2655
2658
|
src: null,
|
|
2656
2659
|
target: null
|
|
2657
|
-
}), l = E(null),
|
|
2660
|
+
}), l = E(null), r = E([]), i = E([]), s = E([]), a = E([]), u = E({
|
|
2658
2661
|
src: null,
|
|
2659
2662
|
target: null
|
|
2660
2663
|
}), f = ze(), p = S(() => f.getLabel(e.value)), m = S(() => f.getLabel(o.value));
|
|
2661
2664
|
function x(h) {
|
|
2662
|
-
e.value = h.src, o.value = h.target, t.value = h.text, n.value = h.phonetic, l.value = h.result,
|
|
2665
|
+
e.value = h.src, o.value = h.target, t.value = h.text, n.value = h.phonetic, l.value = h.result, r.value = h.dictionary, i.value = h.definitions, s.value = h.synonyms, a.value = h.examples, u.value = h.tts;
|
|
2663
2666
|
}
|
|
2664
2667
|
function v() {
|
|
2665
2668
|
e.value = null, o.value = null, t.value = null, n.value = {
|
|
2666
2669
|
src: null,
|
|
2667
2670
|
target: null
|
|
2668
|
-
}, l.value = null,
|
|
2671
|
+
}, l.value = null, r.value = [], i.value = [], s.value = [], a.value = [], u.value = {
|
|
2669
2672
|
src: null,
|
|
2670
2673
|
target: null
|
|
2671
2674
|
};
|
|
@@ -2678,8 +2681,8 @@ const Nl = /* @__PURE__ */ Ue(Pl, [["render", Rl]]), Al = "data:image/svg+xml,%3
|
|
|
2678
2681
|
phonetic: n,
|
|
2679
2682
|
text: t,
|
|
2680
2683
|
result: l,
|
|
2681
|
-
dictionary:
|
|
2682
|
-
definitions:
|
|
2684
|
+
dictionary: r,
|
|
2685
|
+
definitions: i,
|
|
2683
2686
|
synonyms: s,
|
|
2684
2687
|
examples: a,
|
|
2685
2688
|
tts: u,
|
|
@@ -2695,28 +2698,28 @@ function Fe(e) {
|
|
|
2695
2698
|
}
|
|
2696
2699
|
const ql = typeof window < "u" && typeof document < "u";
|
|
2697
2700
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
2698
|
-
const
|
|
2701
|
+
const wt = () => {
|
|
2699
2702
|
};
|
|
2700
2703
|
function Jl(e, o) {
|
|
2701
2704
|
function t(...n) {
|
|
2702
|
-
return new Promise((l,
|
|
2703
|
-
Promise.resolve(e(() => o.apply(this, n), { fn: o, thisArg: this, args: n })).then(l).catch(
|
|
2705
|
+
return new Promise((l, r) => {
|
|
2706
|
+
Promise.resolve(e(() => o.apply(this, n), { fn: o, thisArg: this, args: n })).then(l).catch(r);
|
|
2704
2707
|
});
|
|
2705
2708
|
}
|
|
2706
2709
|
return t;
|
|
2707
2710
|
}
|
|
2708
2711
|
function Kl(e, o = {}) {
|
|
2709
|
-
let t, n, l =
|
|
2710
|
-
const
|
|
2711
|
-
clearTimeout(s), l(), l =
|
|
2712
|
+
let t, n, l = wt;
|
|
2713
|
+
const r = (s) => {
|
|
2714
|
+
clearTimeout(s), l(), l = wt;
|
|
2712
2715
|
};
|
|
2713
2716
|
return (s) => {
|
|
2714
2717
|
const a = Fe(e), u = Fe(o.maxWait);
|
|
2715
|
-
return t &&
|
|
2718
|
+
return t && r(t), a <= 0 || u !== void 0 && u <= 0 ? (n && (r(n), n = null), Promise.resolve(s())) : new Promise((f, p) => {
|
|
2716
2719
|
l = o.rejectOnCancel ? p : f, u && !n && (n = setTimeout(() => {
|
|
2717
|
-
t &&
|
|
2720
|
+
t && r(t), n = null, f(s());
|
|
2718
2721
|
}, u)), t = setTimeout(() => {
|
|
2719
|
-
n &&
|
|
2722
|
+
n && r(n), n = null, f(s());
|
|
2720
2723
|
}, a);
|
|
2721
2724
|
});
|
|
2722
2725
|
};
|
|
@@ -2727,7 +2730,7 @@ function Yl(e, o = 200, t = {}) {
|
|
|
2727
2730
|
e
|
|
2728
2731
|
);
|
|
2729
2732
|
}
|
|
2730
|
-
function
|
|
2733
|
+
function St(e) {
|
|
2731
2734
|
var o;
|
|
2732
2735
|
const t = Fe(e);
|
|
2733
2736
|
return (o = t == null ? void 0 : t.$el) != null ? o : t;
|
|
@@ -2745,16 +2748,16 @@ function es(e) {
|
|
|
2745
2748
|
}
|
|
2746
2749
|
function ts(e, o, t = {}) {
|
|
2747
2750
|
const { window: n = Ql, ...l } = t;
|
|
2748
|
-
let
|
|
2749
|
-
const
|
|
2750
|
-
|
|
2751
|
-
}, a = S(() => Array.isArray(e) ? e.map((p) =>
|
|
2751
|
+
let r;
|
|
2752
|
+
const i = es(() => n && "ResizeObserver" in n), s = () => {
|
|
2753
|
+
r && (r.disconnect(), r = void 0);
|
|
2754
|
+
}, a = S(() => Array.isArray(e) ? e.map((p) => St(p)) : [St(e)]), u = F(
|
|
2752
2755
|
a,
|
|
2753
2756
|
(p) => {
|
|
2754
|
-
if (s(),
|
|
2755
|
-
|
|
2757
|
+
if (s(), i.value && n) {
|
|
2758
|
+
r = new ResizeObserver(o);
|
|
2756
2759
|
for (const m of p)
|
|
2757
|
-
m &&
|
|
2760
|
+
m && r.observe(m, l);
|
|
2758
2761
|
}
|
|
2759
2762
|
},
|
|
2760
2763
|
{ immediate: !0, flush: "post" }
|
|
@@ -2762,27 +2765,27 @@ function ts(e, o, t = {}) {
|
|
|
2762
2765
|
s(), u();
|
|
2763
2766
|
};
|
|
2764
2767
|
return Gl(f), {
|
|
2765
|
-
isSupported:
|
|
2768
|
+
isSupported: i,
|
|
2766
2769
|
stop: f
|
|
2767
2770
|
};
|
|
2768
2771
|
}
|
|
2769
2772
|
function un(e) {
|
|
2770
2773
|
var o;
|
|
2771
|
-
const t = E(e == null ? void 0 : e.element), n = E(e == null ? void 0 : e.input), l = (o = e == null ? void 0 : e.styleProp) != null ? o : "height",
|
|
2772
|
-
function
|
|
2774
|
+
const t = E(e == null ? void 0 : e.element), n = E(e == null ? void 0 : e.input), l = (o = e == null ? void 0 : e.styleProp) != null ? o : "height", r = E(1);
|
|
2775
|
+
function i() {
|
|
2773
2776
|
var s;
|
|
2774
2777
|
if (!t.value)
|
|
2775
2778
|
return;
|
|
2776
2779
|
let a = "";
|
|
2777
|
-
t.value.style[l] = "1px",
|
|
2780
|
+
t.value.style[l] = "1px", r.value = (s = t.value) == null ? void 0 : s.scrollHeight, e != null && e.styleTarget ? Fe(e.styleTarget).style[l] = `${r.value}px` : a = `${r.value}px`, t.value.style[l] = a;
|
|
2778
2781
|
}
|
|
2779
|
-
return
|
|
2782
|
+
return F([n, t], () => Q(i), { immediate: !0 }), F(r, () => {
|
|
2780
2783
|
var s;
|
|
2781
2784
|
return (s = e == null ? void 0 : e.onResize) == null ? void 0 : s.call(e);
|
|
2782
|
-
}), ts(t, () =>
|
|
2785
|
+
}), ts(t, () => i()), e != null && e.watch && F(e.watch, i, { immediate: !0, deep: !0 }), {
|
|
2783
2786
|
textarea: t,
|
|
2784
2787
|
input: n,
|
|
2785
|
-
triggerResize:
|
|
2788
|
+
triggerResize: i
|
|
2786
2789
|
};
|
|
2787
2790
|
}
|
|
2788
2791
|
const ns = {
|
|
@@ -2795,7 +2798,7 @@ const ns = {
|
|
|
2795
2798
|
},
|
|
2796
2799
|
emits: ["change", "clear", "loadTTS"],
|
|
2797
2800
|
setup(e, { emit: o }) {
|
|
2798
|
-
const t = he(), n = e, l = E(""),
|
|
2801
|
+
const t = he(), n = e, l = E(""), r = S(() => t.src), i = S(() => t.srcLabel), s = S(() => {
|
|
2799
2802
|
var v;
|
|
2800
2803
|
return (v = t.phonetic) == null ? void 0 : v.src;
|
|
2801
2804
|
}), { textarea: a } = un({ input: l, styleProp: "minHeight" }), u = o, f = Yl(() => {
|
|
@@ -2814,15 +2817,15 @@ const ns = {
|
|
|
2814
2817
|
async function x() {
|
|
2815
2818
|
await Q(), a.value.select();
|
|
2816
2819
|
}
|
|
2817
|
-
return
|
|
2820
|
+
return F(
|
|
2818
2821
|
() => n.text,
|
|
2819
2822
|
(v) => {
|
|
2820
2823
|
l.value !== v && x(), l.value = v;
|
|
2821
2824
|
}
|
|
2822
2825
|
), (v, h) => (w(), $(Z, null, [
|
|
2823
|
-
|
|
2824
|
-
src:
|
|
2825
|
-
srcLabel:
|
|
2826
|
+
H(an, {
|
|
2827
|
+
src: r.value,
|
|
2828
|
+
srcLabel: i.value,
|
|
2826
2829
|
type: "src",
|
|
2827
2830
|
phonetic: s.value,
|
|
2828
2831
|
isClearBtn: !0,
|
|
@@ -2848,22 +2851,22 @@ const ns = {
|
|
|
2848
2851
|
])
|
|
2849
2852
|
], 64));
|
|
2850
2853
|
}
|
|
2851
|
-
}, os = /* @__PURE__ */ Ue(ns, [["__scopeId", "data-v-90bf3e0d"]]), cn = He("loader", () => ({ loading: E(!1) })), ls = (e) => (gn("data-v-4b9f4a7b"), e = e(), bn(), e), ss = { class: "flex flex-col" },
|
|
2854
|
+
}, os = /* @__PURE__ */ Ue(ns, [["__scopeId", "data-v-90bf3e0d"]]), cn = He("loader", () => ({ loading: E(!1) })), ls = (e) => (gn("data-v-4b9f4a7b"), e = e(), bn(), e), ss = { class: "flex flex-col" }, rs = /* @__PURE__ */ ls(() => /* @__PURE__ */ C("div", { class: "w-full flex align-item-center justify-end mt-2" }, null, -1)), is = {
|
|
2852
2855
|
__name: "TranslationResult",
|
|
2853
2856
|
props: {
|
|
2854
2857
|
isFavoriteFeatureEnabled: Boolean
|
|
2855
2858
|
},
|
|
2856
2859
|
emits: ["loadTTS"],
|
|
2857
2860
|
setup(e, { emit: o }) {
|
|
2858
|
-
const t = he(), n = E(!1), l = S(() => t.result),
|
|
2861
|
+
const t = he(), n = E(!1), l = S(() => t.result), r = S(() => t.target), i = S(() => t.targetLabel), s = S(() => {
|
|
2859
2862
|
var x;
|
|
2860
2863
|
return (x = t.phonetic) == null ? void 0 : x.target;
|
|
2861
2864
|
}), a = e, u = cn(), { textarea: f, input: p } = un({ input: l, styleProp: "minHeight" }), m = o;
|
|
2862
2865
|
return (x, v) => (w(), $(Z, null, [
|
|
2863
|
-
|
|
2866
|
+
H(an, {
|
|
2864
2867
|
loading: M(u).loading,
|
|
2865
|
-
src:
|
|
2866
|
-
srcLabel:
|
|
2868
|
+
src: r.value,
|
|
2869
|
+
srcLabel: i.value,
|
|
2867
2870
|
type: "target",
|
|
2868
2871
|
isFavoriteBtn: a.isFavoriteFeatureEnabled,
|
|
2869
2872
|
isFavorite: n.value,
|
|
@@ -2883,11 +2886,11 @@ const ns = {
|
|
|
2883
2886
|
}, null, 512), [
|
|
2884
2887
|
[Pt, M(p)]
|
|
2885
2888
|
]),
|
|
2886
|
-
|
|
2889
|
+
rs
|
|
2887
2890
|
])
|
|
2888
2891
|
], 64));
|
|
2889
2892
|
}
|
|
2890
|
-
}, as = /* @__PURE__ */ Ue(
|
|
2893
|
+
}, as = /* @__PURE__ */ Ue(is, [["__scopeId", "data-v-4b9f4a7b"]]), us = { class: "btn btn-sm btn-circle btn-ghost" }, Ze = {
|
|
2891
2894
|
__name: "ToggleBtn",
|
|
2892
2895
|
props: {
|
|
2893
2896
|
isExpanded: Boolean
|
|
@@ -2895,10 +2898,10 @@ const ns = {
|
|
|
2895
2898
|
setup(e) {
|
|
2896
2899
|
const o = e;
|
|
2897
2900
|
return (t, n) => (w(), $("button", us, [
|
|
2898
|
-
o.isExpanded ? (w(),
|
|
2901
|
+
o.isExpanded ? (w(), ee(M(Ro), {
|
|
2899
2902
|
key: 0,
|
|
2900
2903
|
class: "w-7 text-gray-400"
|
|
2901
|
-
})) : (w(),
|
|
2904
|
+
})) : (w(), ee(M(ko), {
|
|
2902
2905
|
key: 1,
|
|
2903
2906
|
class: "w-7 text-gray-400"
|
|
2904
2907
|
}))
|
|
@@ -2908,16 +2911,16 @@ const ns = {
|
|
|
2908
2911
|
__name: "Dictionary",
|
|
2909
2912
|
emits: ["translate"],
|
|
2910
2913
|
setup(e, { emit: o }) {
|
|
2911
|
-
const t = E(!0), n = he(), l = ze(),
|
|
2914
|
+
const t = E(!0), n = he(), l = ze(), r = S(() => n.dictionary), i = o, s = () => {
|
|
2912
2915
|
t.value = !t.value;
|
|
2913
2916
|
}, a = (u) => {
|
|
2914
|
-
|
|
2917
|
+
i("translate", u, n.target, n.src), l.src = n.target, l.target = n.src, window.scrollTo(0, 0);
|
|
2915
2918
|
};
|
|
2916
2919
|
return (u, f) => (w(), $("div", cs, [
|
|
2917
2920
|
C("div", ds, [
|
|
2918
2921
|
C("div", fs, [
|
|
2919
2922
|
ps,
|
|
2920
|
-
|
|
2923
|
+
H(Ze, {
|
|
2921
2924
|
isExpanded: t.value,
|
|
2922
2925
|
onClick: s
|
|
2923
2926
|
}, null, 8, ["isExpanded"])
|
|
@@ -2926,11 +2929,11 @@ const ns = {
|
|
|
2926
2929
|
class: Ce(["overflow-hidden transition-all duration-300 ease-in-out", t.value ? "max-h-[2000px] opacity-100" : "max-h-0 opacity-0"])
|
|
2927
2930
|
}, [
|
|
2928
2931
|
C("ul", null, [
|
|
2929
|
-
(w(!0), $(Z, null, se(
|
|
2932
|
+
(w(!0), $(Z, null, se(r.value, (p, m) => (w(), $("li", {
|
|
2930
2933
|
key: `${p.pos}-${m}`,
|
|
2931
2934
|
class: "mb-2"
|
|
2932
2935
|
}, [
|
|
2933
|
-
C("h5", vs,
|
|
2936
|
+
C("h5", vs, te(p.pos), 1),
|
|
2934
2937
|
C("ul", hs, [
|
|
2935
2938
|
(w(!0), $(Z, null, se(p.items, (x, v) => (w(), $("li", {
|
|
2936
2939
|
key: `${x.word}-${v}`
|
|
@@ -2938,8 +2941,8 @@ const ns = {
|
|
|
2938
2941
|
C("span", {
|
|
2939
2942
|
class: "p-3 m-0.5 font-normal badge badge-ghost bg-primaryColor text-white cursor-pointer border-0 rounded-lg",
|
|
2940
2943
|
onClick: (h) => a(x.word)
|
|
2941
|
-
},
|
|
2942
|
-
C("small", gs, " - " +
|
|
2944
|
+
}, te(x.word), 9, ms),
|
|
2945
|
+
C("small", gs, " - " + te(x.reverse_translation.join(", ")), 1)
|
|
2943
2946
|
]))), 128))
|
|
2944
2947
|
])
|
|
2945
2948
|
]))), 128))
|
|
@@ -2957,11 +2960,11 @@ const ns = {
|
|
|
2957
2960
|
const o = E(!0), t = he(), n = S(() => t.definitions), l = () => {
|
|
2958
2961
|
o.value = !o.value;
|
|
2959
2962
|
};
|
|
2960
|
-
return (
|
|
2963
|
+
return (r, i) => (w(), $("div", Cs, [
|
|
2961
2964
|
C("div", _s, [
|
|
2962
2965
|
C("div", xs, [
|
|
2963
2966
|
ys,
|
|
2964
|
-
|
|
2967
|
+
H(Ze, {
|
|
2965
2968
|
isExpanded: o.value,
|
|
2966
2969
|
onClick: l
|
|
2967
2970
|
}, null, 8, ["isExpanded"])
|
|
@@ -2974,15 +2977,15 @@ const ns = {
|
|
|
2974
2977
|
key: `${s.pos}-${a}`,
|
|
2975
2978
|
class: "mb-2"
|
|
2976
2979
|
}, [
|
|
2977
|
-
C("h5", ws,
|
|
2980
|
+
C("h5", ws, te(s.pos), 1),
|
|
2978
2981
|
C("ul", Ss, [
|
|
2979
2982
|
(w(!0), $(Z, null, se(s.items, (u, f) => (w(), $("li", {
|
|
2980
2983
|
key: `${u.gloss}-${f}`,
|
|
2981
2984
|
class: "mb-1"
|
|
2982
2985
|
}, [
|
|
2983
|
-
C("span", null,
|
|
2986
|
+
C("span", null, te(u.gloss), 1),
|
|
2984
2987
|
Es,
|
|
2985
|
-
u.example ? (w(), $("small", Os, '"' +
|
|
2988
|
+
u.example ? (w(), $("small", Os, '"' + te(u.example) + '"', 1)) : X("", !0)
|
|
2986
2989
|
]))), 128))
|
|
2987
2990
|
])
|
|
2988
2991
|
]))), 128))
|
|
@@ -2997,11 +3000,11 @@ const ns = {
|
|
|
2997
3000
|
const o = E(!0), t = he(), n = S(() => t.examples), l = () => {
|
|
2998
3001
|
o.value = !o.value;
|
|
2999
3002
|
};
|
|
3000
|
-
return (
|
|
3003
|
+
return (r, i) => (w(), $("div", Ts, [
|
|
3001
3004
|
C("div", Is, [
|
|
3002
3005
|
C("div", Ls, [
|
|
3003
3006
|
Ps,
|
|
3004
|
-
|
|
3007
|
+
H(Ze, {
|
|
3005
3008
|
isExpanded: o.value,
|
|
3006
3009
|
onClick: l
|
|
3007
3010
|
}, null, 8, ["isExpanded"])
|
|
@@ -3023,18 +3026,18 @@ const ns = {
|
|
|
3023
3026
|
__name: "Synonyms",
|
|
3024
3027
|
emits: ["translate"],
|
|
3025
3028
|
setup(e, { emit: o }) {
|
|
3026
|
-
const t = E(!0), n = he(), l = S(() => n.synonyms),
|
|
3029
|
+
const t = E(!0), n = he(), l = S(() => n.synonyms), r = o, i = () => {
|
|
3027
3030
|
t.value = !t.value;
|
|
3028
3031
|
}, s = (a) => {
|
|
3029
|
-
|
|
3032
|
+
r("translate", a), window.scrollTo(0, 0);
|
|
3030
3033
|
};
|
|
3031
3034
|
return (a, u) => (w(), $("div", Rs, [
|
|
3032
3035
|
C("div", Ns, [
|
|
3033
3036
|
C("div", As, [
|
|
3034
3037
|
Ds,
|
|
3035
|
-
|
|
3038
|
+
H(Ze, {
|
|
3036
3039
|
isExpanded: t.value,
|
|
3037
|
-
onClick:
|
|
3040
|
+
onClick: i
|
|
3038
3041
|
}, null, 8, ["isExpanded"])
|
|
3039
3042
|
]),
|
|
3040
3043
|
C("div", {
|
|
@@ -3045,7 +3048,7 @@ const ns = {
|
|
|
3045
3048
|
key: `${f.pos}-${p}`,
|
|
3046
3049
|
class: "mb-2"
|
|
3047
3050
|
}, [
|
|
3048
|
-
C("h5", Fs,
|
|
3051
|
+
C("h5", Fs, te(f.pos), 1),
|
|
3049
3052
|
C("ul", js, [
|
|
3050
3053
|
(w(!0), $(Z, null, se(f.items, (m, x) => (w(), $("li", {
|
|
3051
3054
|
key: `${m.word}-${x}`,
|
|
@@ -3056,7 +3059,7 @@ const ns = {
|
|
|
3056
3059
|
key: `${v}-${h}`,
|
|
3057
3060
|
class: "p-3 m-0.5 ml-0 font-normal badge badge-ghost bg-primaryColor text-white cursor-pointer border-0 rounded-lg",
|
|
3058
3061
|
onClick: (V) => s(v)
|
|
3059
|
-
},
|
|
3062
|
+
}, te(v), 9, Hs))), 128))
|
|
3060
3063
|
])
|
|
3061
3064
|
]))), 128))
|
|
3062
3065
|
])
|
|
@@ -3098,14 +3101,14 @@ const ns = {
|
|
|
3098
3101
|
},
|
|
3099
3102
|
emits: ["opt", "translate", "reader", "settings", "fullscreen", "loadTTS"],
|
|
3100
3103
|
setup(e, { emit: o }) {
|
|
3101
|
-
const t = fl(), n = he(t), l = rn(t),
|
|
3102
|
-
|
|
3104
|
+
const t = fl(), n = he(t), l = rn(t), r = ze(t), i = cn(t), s = e, a = o, u = E("");
|
|
3105
|
+
F(
|
|
3103
3106
|
() => s.translation,
|
|
3104
3107
|
(v) => {
|
|
3105
|
-
|
|
3108
|
+
i.loading = !1, u.value = v.text, n.init(v), l.reset();
|
|
3106
3109
|
},
|
|
3107
3110
|
{ immediate: !0 }
|
|
3108
|
-
),
|
|
3111
|
+
), F(
|
|
3109
3112
|
() => s.tts,
|
|
3110
3113
|
(v) => {
|
|
3111
3114
|
if (!v) {
|
|
@@ -3115,12 +3118,12 @@ const ns = {
|
|
|
3115
3118
|
l.set(v);
|
|
3116
3119
|
},
|
|
3117
3120
|
{ immediate: !0 }
|
|
3118
|
-
),
|
|
3119
|
-
|
|
3120
|
-
}),
|
|
3121
|
+
), F([() => s.opt, () => s.languages], ([v, h]) => {
|
|
3122
|
+
r.init(v, h);
|
|
3123
|
+
}), F([() => r.src, () => r.target], ([v, h]) => {
|
|
3121
3124
|
a("opt", { src: v, target: h }), x(u.value);
|
|
3122
3125
|
}), xe(() => {
|
|
3123
|
-
|
|
3126
|
+
r.init(s.opt, s.languages);
|
|
3124
3127
|
});
|
|
3125
3128
|
function f() {
|
|
3126
3129
|
u.value = "", n.reset();
|
|
@@ -3132,8 +3135,8 @@ const ns = {
|
|
|
3132
3135
|
const h = v === "src" ? n.text : n.result;
|
|
3133
3136
|
a("loadTTS", { type: v, data: h });
|
|
3134
3137
|
}
|
|
3135
|
-
function x(v, h =
|
|
3136
|
-
v && (u.value = v,
|
|
3138
|
+
function x(v, h = r.src, V = r.target) {
|
|
3139
|
+
v && (u.value = v, i.loading = !0, a("translate", {
|
|
3137
3140
|
src: h,
|
|
3138
3141
|
target: V,
|
|
3139
3142
|
text: v
|
|
@@ -3141,17 +3144,17 @@ const ns = {
|
|
|
3141
3144
|
}
|
|
3142
3145
|
return (v, h) => (w(), $("div", Us, [
|
|
3143
3146
|
C("div", Zs, [
|
|
3144
|
-
|
|
3147
|
+
H(Vn, {
|
|
3145
3148
|
onReader: h[0] || (h[0] = (V) => a("reader")),
|
|
3146
3149
|
onSettings: h[1] || (h[1] = (V) => a("settings")),
|
|
3147
3150
|
onFullScreen: h[2] || (h[2] = (V) => a("fullscreen"))
|
|
3148
3151
|
})
|
|
3149
3152
|
]),
|
|
3150
3153
|
C("div", Ws, [
|
|
3151
|
-
|
|
3154
|
+
H(gl, { class: "my-4" }),
|
|
3152
3155
|
C("div", Gs, [
|
|
3153
3156
|
C("div", qs, [
|
|
3154
|
-
|
|
3157
|
+
H(os, {
|
|
3155
3158
|
text: u.value,
|
|
3156
3159
|
onChange: p,
|
|
3157
3160
|
onClear: f,
|
|
@@ -3160,7 +3163,7 @@ const ns = {
|
|
|
3160
3163
|
]),
|
|
3161
3164
|
Js,
|
|
3162
3165
|
C("div", Ks, [
|
|
3163
|
-
|
|
3166
|
+
H(as, {
|
|
3164
3167
|
isFavoriteFeatureEnabled: e.isFavoriteFeatureEnabled,
|
|
3165
3168
|
onLoadTTS: h[4] || (h[4] = (V) => m("target"))
|
|
3166
3169
|
}, null, 8, ["isFavoriteFeatureEnabled"])
|
|
@@ -3168,19 +3171,19 @@ const ns = {
|
|
|
3168
3171
|
]),
|
|
3169
3172
|
s.translation ? (w(), $(Z, { key: 0 }, [
|
|
3170
3173
|
C("div", Ys, [
|
|
3171
|
-
M(n).dictionary.length ? (w(),
|
|
3174
|
+
M(n).dictionary.length ? (w(), ee(bs, {
|
|
3172
3175
|
key: 0,
|
|
3173
3176
|
onTranslate: x
|
|
3174
|
-
})) :
|
|
3175
|
-
M(n).definitions.length ? (w(),
|
|
3176
|
-
M(n).synonyms.length ? (w(),
|
|
3177
|
+
})) : X("", !0),
|
|
3178
|
+
M(n).definitions.length ? (w(), ee($s, { key: 1 })) : X("", !0),
|
|
3179
|
+
M(n).synonyms.length ? (w(), ee(zs, {
|
|
3177
3180
|
key: 2,
|
|
3178
3181
|
onTranslate: x
|
|
3179
|
-
})) :
|
|
3182
|
+
})) : X("", !0)
|
|
3180
3183
|
]),
|
|
3181
3184
|
M(n).examples.length ? (w(), $("div", Qs, [
|
|
3182
|
-
|
|
3183
|
-
])) :
|
|
3185
|
+
H(Ms)
|
|
3186
|
+
])) : X("", !0)
|
|
3184
3187
|
], 64)) : (w(), $("span", Xs, "Service unavailable"))
|
|
3185
3188
|
])
|
|
3186
3189
|
]));
|