@typeach/core 0.0.14 → 0.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/typeach.js +2150 -412
- package/dist/typeach.umd.cjs +2 -2
- package/package.json +4 -2
package/dist/typeach.js
CHANGED
|
@@ -1,83 +1,416 @@
|
|
|
1
|
-
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createVNode as a, defineComponent as o, getCurrentInstance as s, getCurrentScope as c, inject as l, markRaw as u, mergeModels as d, mergeProps as f, nextTick as p, onBeforeMount as
|
|
2
|
-
import { defineStore as
|
|
1
|
+
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createVNode as a, defineComponent as o, getCurrentInstance as s, getCurrentScope as c, inject as l, markRaw as u, mergeModels as d, mergeProps as f, nextTick as p, onBeforeMount as m, onBeforeUnmount as h, onMounted as g, onScopeDispose as ee, openBlock as _, provide as v, ref as y, renderSlot as b, resolveDynamicComponent as x, shallowReadonly as te, shallowRef as ne, toRefs as re, toValue as S, unref as C, useId as w, useModel as T, useTemplateRef as E, vModelDynamic as ie, vModelText as ae, watch as D, watchEffect as oe, withCtx as O, withDirectives as se, withKeys as ce, withModifiers as le } from "vue";
|
|
2
|
+
import { defineStore as ue } from "pinia";
|
|
3
|
+
//#region ../../node_modules/.pnpm/hotkeys-js@4.0.8/node_modules/hotkeys-js/dist/hotkeys-js.js
|
|
4
|
+
var de = typeof navigator < "u" && navigator.userAgent.toLowerCase().indexOf("firefox") > 0;
|
|
5
|
+
function fe(e, t, n, r) {
|
|
6
|
+
e.addEventListener ? e.addEventListener(t, n, r) : e.attachEvent && e.attachEvent(`on${t}`, n);
|
|
7
|
+
}
|
|
8
|
+
function k(e, t, n, r) {
|
|
9
|
+
e && (e.removeEventListener ? e.removeEventListener(t, n, r) : e.detachEvent && e.detachEvent(`on${t}`, n));
|
|
10
|
+
}
|
|
11
|
+
function pe(e, t) {
|
|
12
|
+
let n = t.slice(0, t.length - 1), r = [];
|
|
13
|
+
for (let t = 0; t < n.length; t++) r.push(e[n[t].toLowerCase()]);
|
|
14
|
+
return r;
|
|
15
|
+
}
|
|
16
|
+
function me(e) {
|
|
17
|
+
typeof e != "string" && (e = ""), e = e.replace(/\s/g, "");
|
|
18
|
+
let t = e.split(","), n = t.lastIndexOf("");
|
|
19
|
+
for (; n >= 0;) t[n - 1] += ",", t.splice(n, 1), n = t.lastIndexOf("");
|
|
20
|
+
return t;
|
|
21
|
+
}
|
|
22
|
+
function he(e, t) {
|
|
23
|
+
let n = e.length >= t.length ? e : t, r = e.length >= t.length ? t : e, i = !0;
|
|
24
|
+
for (let e = 0; e < n.length; e++) r.indexOf(n[e]) === -1 && (i = !1);
|
|
25
|
+
return i;
|
|
26
|
+
}
|
|
27
|
+
function ge(e, t, n) {
|
|
28
|
+
let r = e.keyCode || e.which || e.charCode;
|
|
29
|
+
if (e.key) {
|
|
30
|
+
let r = e.key.toLowerCase();
|
|
31
|
+
if (r in t) return t[r];
|
|
32
|
+
if (r in n) return n[r];
|
|
33
|
+
if (/^[0-9]$/.test(e.key)) return e.key.charCodeAt(0);
|
|
34
|
+
if (/^[a-z]$/i.test(e.key)) return e.key.toUpperCase().charCodeAt(0);
|
|
35
|
+
}
|
|
36
|
+
return e.code && /^Key[A-Z]$/.test(e.code) && (r = e.code.charCodeAt(3)), r;
|
|
37
|
+
}
|
|
38
|
+
var A = {
|
|
39
|
+
backspace: 8,
|
|
40
|
+
"⌫": 8,
|
|
41
|
+
tab: 9,
|
|
42
|
+
clear: 12,
|
|
43
|
+
enter: 13,
|
|
44
|
+
"↩": 13,
|
|
45
|
+
return: 13,
|
|
46
|
+
esc: 27,
|
|
47
|
+
escape: 27,
|
|
48
|
+
space: 32,
|
|
49
|
+
left: 37,
|
|
50
|
+
up: 38,
|
|
51
|
+
right: 39,
|
|
52
|
+
down: 40,
|
|
53
|
+
arrowup: 38,
|
|
54
|
+
arrowdown: 40,
|
|
55
|
+
arrowleft: 37,
|
|
56
|
+
arrowright: 39,
|
|
57
|
+
del: 46,
|
|
58
|
+
delete: 46,
|
|
59
|
+
ins: 45,
|
|
60
|
+
insert: 45,
|
|
61
|
+
home: 36,
|
|
62
|
+
end: 35,
|
|
63
|
+
pageup: 33,
|
|
64
|
+
pagedown: 34,
|
|
65
|
+
capslock: 20,
|
|
66
|
+
num_0: 96,
|
|
67
|
+
num_1: 97,
|
|
68
|
+
num_2: 98,
|
|
69
|
+
num_3: 99,
|
|
70
|
+
num_4: 100,
|
|
71
|
+
num_5: 101,
|
|
72
|
+
num_6: 102,
|
|
73
|
+
num_7: 103,
|
|
74
|
+
num_8: 104,
|
|
75
|
+
num_9: 105,
|
|
76
|
+
num_multiply: 106,
|
|
77
|
+
num_add: 107,
|
|
78
|
+
num_enter: 108,
|
|
79
|
+
num_subtract: 109,
|
|
80
|
+
num_decimal: 110,
|
|
81
|
+
num_divide: 111,
|
|
82
|
+
"⇪": 20,
|
|
83
|
+
",": 188,
|
|
84
|
+
".": 190,
|
|
85
|
+
"/": 191,
|
|
86
|
+
"`": 192,
|
|
87
|
+
"-": de ? 173 : 189,
|
|
88
|
+
"=": de ? 61 : 187,
|
|
89
|
+
";": de ? 59 : 186,
|
|
90
|
+
"'": 222,
|
|
91
|
+
"{": 219,
|
|
92
|
+
"}": 221,
|
|
93
|
+
"[": 219,
|
|
94
|
+
"]": 221,
|
|
95
|
+
"\\": 220
|
|
96
|
+
}, j = {
|
|
97
|
+
"⇧": 16,
|
|
98
|
+
shift: 16,
|
|
99
|
+
"⌥": 18,
|
|
100
|
+
alt: 18,
|
|
101
|
+
option: 18,
|
|
102
|
+
"⌃": 17,
|
|
103
|
+
ctrl: 17,
|
|
104
|
+
control: 17,
|
|
105
|
+
"⌘": 91,
|
|
106
|
+
cmd: 91,
|
|
107
|
+
meta: 91,
|
|
108
|
+
command: 91
|
|
109
|
+
}, _e = {
|
|
110
|
+
16: "shiftKey",
|
|
111
|
+
18: "altKey",
|
|
112
|
+
17: "ctrlKey",
|
|
113
|
+
91: "metaKey",
|
|
114
|
+
shiftKey: 16,
|
|
115
|
+
ctrlKey: 17,
|
|
116
|
+
altKey: 18,
|
|
117
|
+
metaKey: 91
|
|
118
|
+
}, M = {
|
|
119
|
+
16: !1,
|
|
120
|
+
18: !1,
|
|
121
|
+
17: !1,
|
|
122
|
+
91: !1
|
|
123
|
+
}, N = {};
|
|
124
|
+
for (let e = 1; e < 20; e++) A[`f${e}`] = 111 + e;
|
|
125
|
+
var P = [], ve = null, F = null, ye = "all", I = /* @__PURE__ */ new Map(), L = (e) => A[e.toLowerCase()] || j[e.toLowerCase()] || e.toUpperCase().charCodeAt(0), be = (e) => Object.keys(A).find((t) => A[t] === e), xe = (e) => Object.keys(j).find((t) => j[t] === e), Se = (e) => {
|
|
126
|
+
ye = e || "all";
|
|
127
|
+
}, R = () => ye || "all", Ce = () => P.slice(0), we = () => P.map((e) => be(e) || xe(e) || String.fromCharCode(e)), Te = () => {
|
|
128
|
+
let e = [];
|
|
129
|
+
return Object.keys(N).forEach((t) => {
|
|
130
|
+
N[t].forEach(({ key: t, scope: n, mods: r, shortcut: i }) => {
|
|
131
|
+
e.push({
|
|
132
|
+
scope: n,
|
|
133
|
+
shortcut: i,
|
|
134
|
+
mods: r,
|
|
135
|
+
keys: t.split("+").map((e) => L(e))
|
|
136
|
+
});
|
|
137
|
+
});
|
|
138
|
+
}), e;
|
|
139
|
+
}, Ee = (e) => {
|
|
140
|
+
let t = e.target || e.srcElement, { tagName: n } = t, r = !0, i = n === "INPUT" && ![
|
|
141
|
+
"checkbox",
|
|
142
|
+
"radio",
|
|
143
|
+
"range",
|
|
144
|
+
"button",
|
|
145
|
+
"file",
|
|
146
|
+
"reset",
|
|
147
|
+
"submit",
|
|
148
|
+
"color"
|
|
149
|
+
].includes(t.type);
|
|
150
|
+
return (t.isContentEditable || (i || n === "TEXTAREA" || n === "SELECT") && !t.readOnly) && (r = !1), r;
|
|
151
|
+
}, De = (e) => (typeof e == "string" && (e = L(e)), P.indexOf(e) !== -1), Oe = (e, t) => {
|
|
152
|
+
let n, r;
|
|
153
|
+
e ||= R();
|
|
154
|
+
for (let t in N) if (Object.prototype.hasOwnProperty.call(N, t)) for (n = N[t], r = 0; r < n.length;) n[r].scope === e ? n.splice(r, 1).forEach(({ element: e }) => Fe(e)) : r++;
|
|
155
|
+
R() === e && Se(t || "all");
|
|
156
|
+
};
|
|
157
|
+
function ke(e) {
|
|
158
|
+
let t = ge(e, A, j);
|
|
159
|
+
e.key && e.key.toLowerCase() === "capslock" && (t = L(e.key));
|
|
160
|
+
let n = P.indexOf(t);
|
|
161
|
+
if (n >= 0 && P.splice(n, 1), e.key && e.key.toLowerCase() === "meta" && P.splice(0, P.length), (t === 93 || t === 224) && (t = 91), t in M) {
|
|
162
|
+
M[t] = !1;
|
|
163
|
+
for (let e in j) j[e] === t && (z[e] = !1);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
var Ae = (e, ...t) => {
|
|
167
|
+
if (e === void 0) Object.keys(N).forEach((e) => {
|
|
168
|
+
Array.isArray(N[e]) && N[e].forEach((e) => je(e)), delete N[e];
|
|
169
|
+
}), Fe(null);
|
|
170
|
+
else if (Array.isArray(e)) e.forEach((e) => {
|
|
171
|
+
e.key && je(e);
|
|
172
|
+
});
|
|
173
|
+
else if (typeof e == "object") e.key && je(e);
|
|
174
|
+
else if (typeof e == "string") {
|
|
175
|
+
let [n, r] = t;
|
|
176
|
+
typeof n == "function" && (r = n, n = ""), je({
|
|
177
|
+
key: e,
|
|
178
|
+
scope: n,
|
|
179
|
+
method: r,
|
|
180
|
+
splitKey: "+"
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
}, je = ({ key: e, scope: t, method: n, splitKey: r = "+" }) => {
|
|
184
|
+
me(e).forEach((e) => {
|
|
185
|
+
let i = e.split(r), a = i.length, o = i[a - 1], s = o === "*" ? "*" : L(o);
|
|
186
|
+
if (!N[s]) return;
|
|
187
|
+
t ||= R();
|
|
188
|
+
let c = a > 1 ? pe(j, i) : [], l = [];
|
|
189
|
+
N[s] = N[s].filter((e) => {
|
|
190
|
+
let r = (!n || e.method === n) && e.scope === t && he(e.mods, c);
|
|
191
|
+
return r && l.push(e.element), !r;
|
|
192
|
+
}), l.forEach((e) => Fe(e));
|
|
193
|
+
});
|
|
194
|
+
};
|
|
195
|
+
function Me(e, t, n, r) {
|
|
196
|
+
if (t.element !== r) return;
|
|
197
|
+
let i;
|
|
198
|
+
if (t.scope === n || t.scope === "all") {
|
|
199
|
+
i = t.mods.length > 0;
|
|
200
|
+
for (let e in M) Object.prototype.hasOwnProperty.call(M, e) && (!M[e] && t.mods.indexOf(+e) > -1 || M[e] && t.mods.indexOf(+e) === -1) && (i = !1);
|
|
201
|
+
(t.mods.length === 0 && !M[16] && !M[18] && !M[17] && !M[91] || i || t.shortcut === "*") && (t.keys = [], t.keys = t.keys.concat(P), t.method(e, t) === !1 && (e.preventDefault ? e.preventDefault() : e.returnValue = !1, e.stopPropagation && e.stopPropagation(), e.cancelBubble &&= !0));
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
function Ne(e, t) {
|
|
205
|
+
let n = N["*"], r = ge(e, A, j);
|
|
206
|
+
if (e.key && e.key.toLowerCase() === "capslock" || !(z.filter || Ee).call(this, e)) return;
|
|
207
|
+
if ((r === 93 || r === 224) && (r = 91), P.indexOf(r) === -1 && r !== 229 && P.push(r), [
|
|
208
|
+
"metaKey",
|
|
209
|
+
"ctrlKey",
|
|
210
|
+
"altKey",
|
|
211
|
+
"shiftKey"
|
|
212
|
+
].forEach((t) => {
|
|
213
|
+
let n = _e[t];
|
|
214
|
+
e[t] && P.indexOf(n) === -1 ? P.push(n) : !e[t] && P.indexOf(n) > -1 ? P.splice(P.indexOf(n), 1) : t === "metaKey" && e[t] && (P = P.filter((e) => e in _e || e === r));
|
|
215
|
+
}), r in M) {
|
|
216
|
+
M[r] = !0;
|
|
217
|
+
for (let t in j) Object.prototype.hasOwnProperty.call(j, t) && (z[t] = e[_e[j[t]]]);
|
|
218
|
+
if (!n) return;
|
|
219
|
+
}
|
|
220
|
+
for (let t in M) Object.prototype.hasOwnProperty.call(M, t) && (M[t] = e[_e[t]]);
|
|
221
|
+
e.getModifierState && !(e.altKey && !e.ctrlKey) && e.getModifierState("AltGraph") && (P.indexOf(17) === -1 && P.push(17), P.indexOf(18) === -1 && P.push(18), M[17] = !0, M[18] = !0);
|
|
222
|
+
let i = R();
|
|
223
|
+
if (n) for (let r = 0; r < n.length; r++) n[r].scope === i && (e.type === "keydown" && n[r].keydown || e.type === "keyup" && n[r].keyup) && Me(e, n[r], i, t);
|
|
224
|
+
if (!(r in N)) return;
|
|
225
|
+
let a = N[r], o = a.length;
|
|
226
|
+
for (let n = 0; n < o; n++) if ((e.type === "keydown" && a[n].keydown || e.type === "keyup" && a[n].keyup) && a[n].key) {
|
|
227
|
+
let r = a[n], { splitKey: o } = r, s = r.key.split(o), c = [];
|
|
228
|
+
for (let e = 0; e < s.length; e++) c.push(L(s[e]));
|
|
229
|
+
c.sort().join("") === P.sort().join("") && Me(e, r, i, t);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
var z = function e(t, n, r) {
|
|
233
|
+
P = [];
|
|
234
|
+
let i = me(t), a = [], o = "all", s = document, c = 0, l = !1, u = !0, d = "+", f = !1, p = !1;
|
|
235
|
+
if (r === void 0 && typeof n == "function" && (r = n), Object.prototype.toString.call(n) === "[object Object]") {
|
|
236
|
+
let e = n;
|
|
237
|
+
e.scope && (o = e.scope), e.element && (s = e.element), e.keyup && (l = e.keyup), e.keydown !== void 0 && (u = e.keydown), e.capture !== void 0 && (f = e.capture), typeof e.splitKey == "string" && (d = e.splitKey), e.single === !0 && (p = !0);
|
|
238
|
+
}
|
|
239
|
+
for (typeof n == "string" && (o = n), p && Ae(t, o); c < i.length; c++) {
|
|
240
|
+
let e = i[c].split(d);
|
|
241
|
+
a = [], e.length > 1 && (a = pe(j, e));
|
|
242
|
+
let t = e[e.length - 1];
|
|
243
|
+
t = t === "*" ? "*" : L(t), t in N || (N[t] = []), N[t].push({
|
|
244
|
+
keyup: l,
|
|
245
|
+
keydown: u,
|
|
246
|
+
scope: o,
|
|
247
|
+
mods: a,
|
|
248
|
+
shortcut: i[c],
|
|
249
|
+
method: r,
|
|
250
|
+
key: i[c],
|
|
251
|
+
splitKey: d,
|
|
252
|
+
element: s
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
if (s !== void 0 && typeof window < "u") {
|
|
256
|
+
if (!I.has(s)) {
|
|
257
|
+
let e = (e = window.event) => Ne(e, s), t = (e = window.event) => {
|
|
258
|
+
Ne(e, s), ke(e);
|
|
259
|
+
};
|
|
260
|
+
I.set(s, {
|
|
261
|
+
keydownListener: e,
|
|
262
|
+
keyupListenr: t,
|
|
263
|
+
capture: f
|
|
264
|
+
}), fe(s, "keydown", e, f), fe(s, "keyup", t, f);
|
|
265
|
+
}
|
|
266
|
+
if (!ve) {
|
|
267
|
+
let e = () => {
|
|
268
|
+
P = [];
|
|
269
|
+
};
|
|
270
|
+
ve = {
|
|
271
|
+
listener: e,
|
|
272
|
+
capture: f
|
|
273
|
+
}, fe(window, "focus", e, f);
|
|
274
|
+
}
|
|
275
|
+
if (!F && typeof document < "u") {
|
|
276
|
+
let t = () => {
|
|
277
|
+
P = [];
|
|
278
|
+
for (let e in M) M[e] = !1;
|
|
279
|
+
for (let t in j) e[t] = !1;
|
|
280
|
+
}, n = t, r = t;
|
|
281
|
+
document.addEventListener("fullscreenchange", n), document.addEventListener("webkitfullscreenchange", r), F = {
|
|
282
|
+
fullscreen: n,
|
|
283
|
+
webkit: r
|
|
284
|
+
};
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
function Pe(e, t = "all") {
|
|
289
|
+
Object.keys(N).forEach((n) => {
|
|
290
|
+
N[n].filter((n) => n.scope === t && (n.shortcut === e || n.shortcut === "*")).forEach((e) => {
|
|
291
|
+
e && e.method && e.method({}, e);
|
|
292
|
+
});
|
|
293
|
+
});
|
|
294
|
+
}
|
|
295
|
+
function Fe(e) {
|
|
296
|
+
let t = Object.values(N).flat();
|
|
297
|
+
if (t.findIndex(({ element: t }) => t === e) < 0 && e) {
|
|
298
|
+
let { keydownListener: t, keyupListenr: n, capture: r } = I.get(e) || {};
|
|
299
|
+
t && n && (k(e, "keyup", n, r), k(e, "keydown", t, r), I.delete(e));
|
|
300
|
+
}
|
|
301
|
+
if (t.length <= 0 || I.size <= 0) {
|
|
302
|
+
if (Array.from(I.keys()).forEach((e) => {
|
|
303
|
+
let { keydownListener: t, keyupListenr: n, capture: r } = I.get(e) || {};
|
|
304
|
+
t && n && (k(e, "keyup", n, r), k(e, "keydown", t, r), I.delete(e));
|
|
305
|
+
}), I.clear(), Object.keys(N).forEach((e) => delete N[e]), ve) {
|
|
306
|
+
let { listener: e, capture: t } = ve;
|
|
307
|
+
k(window, "focus", e, t), ve = null;
|
|
308
|
+
}
|
|
309
|
+
F && typeof document < "u" && (document.removeEventListener("fullscreenchange", F.fullscreen), document.removeEventListener("webkitfullscreenchange", F.webkit), F = null);
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
var Ie = {
|
|
313
|
+
getPressedKeyString: we,
|
|
314
|
+
setScope: Se,
|
|
315
|
+
getScope: R,
|
|
316
|
+
deleteScope: Oe,
|
|
317
|
+
getPressedKeyCodes: Ce,
|
|
318
|
+
getAllKeyCodes: Te,
|
|
319
|
+
isPressed: De,
|
|
320
|
+
filter: Ee,
|
|
321
|
+
trigger: Pe,
|
|
322
|
+
unbind: Ae,
|
|
323
|
+
keyMap: A,
|
|
324
|
+
modifier: j,
|
|
325
|
+
modifierMap: _e
|
|
326
|
+
};
|
|
327
|
+
for (let e in Ie) {
|
|
328
|
+
let t = e;
|
|
329
|
+
Object.prototype.hasOwnProperty.call(Ie, t) && (z[t] = Ie[t]);
|
|
330
|
+
}
|
|
331
|
+
if (typeof window < "u") {
|
|
332
|
+
let e = window.hotkeys;
|
|
333
|
+
z.noConflict = (t) => (t && window.hotkeys === z && (window.hotkeys = e), z), window.hotkeys = z;
|
|
334
|
+
}
|
|
335
|
+
//#endregion
|
|
3
336
|
//#region src/utils/date/date-modifiers.ts
|
|
4
|
-
var
|
|
337
|
+
var B = (e, t) => {
|
|
5
338
|
let n = new Date(e);
|
|
6
339
|
return n.setDate(n.getDate() + t), n;
|
|
7
|
-
},
|
|
340
|
+
}, Le = (e, t) => {
|
|
8
341
|
let n = new Date(e);
|
|
9
342
|
return n.setMonth(n.getMonth() + t), n;
|
|
10
|
-
},
|
|
343
|
+
}, Re = (e, t) => {
|
|
11
344
|
let n = new Date(e);
|
|
12
345
|
return n.setFullYear(n.getFullYear() + t), n;
|
|
13
|
-
},
|
|
346
|
+
}, ze = (e) => B(e, 1), Be = (e) => B(e, -1), Ve = (e) => B(e, 7), He = (e) => B(e, -7), Ue = (e) => Le(e, 1), We = (e) => Le(e, -1), Ge = (e) => Re(e, 1), Ke = (e) => Re(e, -1), qe = (e, t) => {
|
|
14
347
|
let n = new Date(e), r = n.getDay(), i = r >= t ? r - t : 6 - r;
|
|
15
348
|
return n.setDate(n.getDate() - i), n;
|
|
16
|
-
},
|
|
349
|
+
}, Je = (e, t) => B(qe(e, t), 6), Ye = (e) => {
|
|
17
350
|
let t = `${e.getFullYear()}`.padStart(4, "0"), n = `${e.getMonth() + 1}`.padStart(2, "0");
|
|
18
|
-
return
|
|
19
|
-
},
|
|
20
|
-
let t =
|
|
351
|
+
return $e(/* @__PURE__ */ new Date(`${t}-${n}-01`));
|
|
352
|
+
}, Xe = (e) => {
|
|
353
|
+
let t = Ye(e);
|
|
21
354
|
return t.setMonth(t.getMonth() + 1), t.setDate(t.getDate() - 1), t;
|
|
22
|
-
},
|
|
355
|
+
}, Ze = (e) => new Date(e.getFullYear(), 0, 1), Qe = (e) => new Date(e.getFullYear(), 11, 31), $e = (e) => {
|
|
23
356
|
let t = new Date(e), n = t.getTimezoneOffset();
|
|
24
357
|
return t.setMinutes(t.getMinutes() + n), t;
|
|
25
|
-
},
|
|
358
|
+
}, et = (e, t) => Intl.DateTimeFormat(t, {
|
|
26
359
|
weekday: "long",
|
|
27
360
|
day: "numeric",
|
|
28
361
|
month: "long",
|
|
29
362
|
year: "numeric"
|
|
30
|
-
}).format(e),
|
|
363
|
+
}).format(e), tt = (e) => e.getDate(), nt = (e, t) => Intl.DateTimeFormat(t, { weekday: "long" }).format(e), rt = (e) => {
|
|
31
364
|
let t = new Date(e);
|
|
32
365
|
t.setDate(t.getDate() + 4 - t.getDay());
|
|
33
|
-
let n =
|
|
366
|
+
let n = Ze(e);
|
|
34
367
|
return Math.floor(((t - +n) / 864e5 + 1) / 7);
|
|
35
|
-
},
|
|
36
|
-
name:
|
|
368
|
+
}, it = (e, t) => ({
|
|
369
|
+
name: st(e, t),
|
|
37
370
|
number: e.getMonth() + 1
|
|
38
|
-
}),
|
|
371
|
+
}), at = (e) => e.getFullYear(), ot = (e, t) => Array.from({ length: 7 }).fill(void 0).map((t, n) => (e + n) % 7 + 1).map((e) => nt($e(/* @__PURE__ */ new Date(`2006-01-0${e}`)), t)), st = (e, t) => Intl.DateTimeFormat(t, { month: "long" }).format(e), ct = (e) => Array.from({ length: 12 }).fill(void 0).map((t, n) => it(/* @__PURE__ */ new Date(`2006-${String(n + 1).padStart(2, "0")}-01`), e)), lt = /* @__PURE__ */ function(e) {
|
|
39
372
|
return e[e.Monday = 1] = "Monday", e[e.Tuesday = 2] = "Tuesday", e[e.Wednesday = 3] = "Wednesday", e[e.Thursday = 4] = "Thursday", e[e.Friday = 5] = "Friday", e[e.Saturday = 6] = "Saturday", e[e.Sunday = 7] = "Sunday", e;
|
|
40
|
-
}({}),
|
|
41
|
-
let t = [], n =
|
|
42
|
-
for (; n.getMonth() === e.getMonth();) t.push(n), n =
|
|
373
|
+
}({}), ut = (e) => {
|
|
374
|
+
let t = [], n = Ye(e);
|
|
375
|
+
for (; n.getMonth() === e.getMonth();) t.push(n), n = ze(n);
|
|
43
376
|
return t;
|
|
44
|
-
},
|
|
45
|
-
let n =
|
|
377
|
+
}, dt = (e, t) => {
|
|
378
|
+
let n = ut(e), { daysBefore: r, daysAfter: i } = pt(e, t);
|
|
46
379
|
return [
|
|
47
380
|
...r,
|
|
48
381
|
...n,
|
|
49
382
|
...i
|
|
50
383
|
];
|
|
51
|
-
},
|
|
384
|
+
}, ft = (e) => {
|
|
52
385
|
let t = [];
|
|
53
386
|
for (let n = 0; n < e.length; n += 7) t.push(e.slice(n, n + 7));
|
|
54
387
|
return t.map((e) => ({
|
|
55
388
|
days: e,
|
|
56
|
-
number:
|
|
389
|
+
number: rt(e[e.length - 1])
|
|
57
390
|
}));
|
|
58
|
-
},
|
|
59
|
-
let n =
|
|
60
|
-
for (; l > 0;) s.push(u), u =
|
|
391
|
+
}, pt = (e, t) => {
|
|
392
|
+
let n = Ye(e), r = n.getDay() === 0 ? 7 : n.getDay(), i = Xe(e), a = i.getDay() === 0 ? 7 : i.getDay(), o = t === lt.Monday ? 7 : t - 1, s = [], c = [], l = (7 - t + r) % 7, u = Be(n);
|
|
393
|
+
for (; l > 0;) s.push(u), u = Be(u), --l;
|
|
61
394
|
s.reverse();
|
|
62
|
-
let d = (7 - a + o) % 7, f =
|
|
63
|
-
for (; d > 0;) c.push(f), f =
|
|
395
|
+
let d = (7 - a + o) % 7, f = ze(i);
|
|
396
|
+
for (; d > 0;) c.push(f), f = ze(f), --d;
|
|
64
397
|
return {
|
|
65
398
|
daysBefore: s,
|
|
66
399
|
daysAfter: c
|
|
67
400
|
};
|
|
68
|
-
},
|
|
401
|
+
}, mt = (e) => ({
|
|
69
402
|
start: e.start < e.end ? e.start : e.end,
|
|
70
403
|
end: e.start < e.end ? e.end : e.start
|
|
71
|
-
}),
|
|
72
|
-
let { start: n, end: r } =
|
|
404
|
+
}), ht = (e, t) => {
|
|
405
|
+
let { start: n, end: r } = mt(t);
|
|
73
406
|
return e >= n && e <= r;
|
|
74
|
-
},
|
|
75
|
-
let { start: n, end: r } =
|
|
407
|
+
}, gt = (e, t) => {
|
|
408
|
+
let { start: n, end: r } = mt(t);
|
|
76
409
|
return n.setHours(0, 0, 0, 0), r.setHours(23, 59, 59, 999), e >= n && e <= r;
|
|
77
|
-
},
|
|
410
|
+
}, _t = (e, t) => e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate(), vt = (e, t) => e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth(), yt = (e) => e == null, bt = (e) => e instanceof HTMLElement, V = (e) => {
|
|
78
411
|
let { disabled: t } = e.dataset;
|
|
79
|
-
return e.hasAttribute("disabled") || e.getAttribute("aria-disabled") === "true" || !
|
|
80
|
-
},
|
|
412
|
+
return e.hasAttribute("disabled") || e.getAttribute("aria-disabled") === "true" || !yt(t) && t !== "";
|
|
413
|
+
}, xt = (e) => !yt(e) && e === document.activeElement, St = (e) => xt(e) || e.getAttribute("tabindex") === "0", Ct = (e) => [...e].sort((e, t) => e === t ? 0 : e.compareDocumentPosition(t) & 2 ? 1 : -1), wt = (e) => e.match(/^[\P{Cc}\P{Cn}\P{Cs}]$/u) !== null, Tt = (e) => wt(e) && e !== " ", Et = (e, t) => e.length > 1 && e.split("").every((e) => e === t), Dt = (e, t) => e.trim().toLowerCase().startsWith(t.trim().toLowerCase()), Ot = (e, t = lt.Monday) => ({ onKeyDown(n) {
|
|
81
414
|
switch ([
|
|
82
415
|
"ArrowLeft",
|
|
83
416
|
"ArrowRight",
|
|
@@ -89,32 +422,32 @@ var E = (e, t) => {
|
|
|
89
422
|
"End"
|
|
90
423
|
].includes(n.key) && n.preventDefault(), n.key) {
|
|
91
424
|
case "ArrowLeft":
|
|
92
|
-
e.value =
|
|
425
|
+
e.value = Be(e.value);
|
|
93
426
|
break;
|
|
94
427
|
case "ArrowRight":
|
|
95
|
-
e.value =
|
|
428
|
+
e.value = ze(e.value);
|
|
96
429
|
break;
|
|
97
430
|
case "ArrowUp":
|
|
98
|
-
e.value =
|
|
431
|
+
e.value = He(e.value);
|
|
99
432
|
break;
|
|
100
433
|
case "ArrowDown":
|
|
101
|
-
e.value =
|
|
434
|
+
e.value = Ve(e.value);
|
|
102
435
|
break;
|
|
103
436
|
case "PageUp":
|
|
104
|
-
e.value = n.shiftKey ?
|
|
437
|
+
e.value = n.shiftKey ? Ke(e.value) : We(e.value);
|
|
105
438
|
break;
|
|
106
439
|
case "PageDown":
|
|
107
|
-
e.value = n.shiftKey ?
|
|
440
|
+
e.value = n.shiftKey ? Ge(e.value) : Ue(e.value);
|
|
108
441
|
break;
|
|
109
442
|
case "Home":
|
|
110
|
-
e.value = n.shiftKey ?
|
|
443
|
+
e.value = n.shiftKey ? Ye(e.value) : qe(e.value, t);
|
|
111
444
|
break;
|
|
112
445
|
case "End":
|
|
113
|
-
e.value = n.shiftKey ?
|
|
446
|
+
e.value = n.shiftKey ? Xe(e.value) : Je(e.value, t);
|
|
114
447
|
break;
|
|
115
448
|
default: break;
|
|
116
449
|
}
|
|
117
|
-
} }),
|
|
450
|
+
} }), kt = (e) => {
|
|
118
451
|
let t = (t, n, i = !1) => {
|
|
119
452
|
let { getElements: a, moveTo: o, isMovedTo: s } = e, c = a(), l = c.findIndex((e) => s(e)), u = n(l, c.length), d = c[u], f = t === "forwards" ? u++ : u--;
|
|
120
453
|
if (f < 0) return i ? "backwards" : r("start");
|
|
@@ -131,19 +464,19 @@ var E = (e, t) => {
|
|
|
131
464
|
moveToEdge: r,
|
|
132
465
|
moveByPages: i
|
|
133
466
|
};
|
|
134
|
-
},
|
|
467
|
+
}, At = (e) => {
|
|
135
468
|
let t = (e, t) => {
|
|
136
469
|
t.filter((t) => !e?.isSameNode(t)).forEach((e) => e.setAttribute("tabindex", "-1")), e?.setAttribute("tabindex", "0");
|
|
137
470
|
}, n = (n) => {
|
|
138
471
|
t(n, e()), n.focus();
|
|
139
472
|
};
|
|
140
|
-
|
|
473
|
+
D(e, (e) => {
|
|
141
474
|
let [n] = e, r = e.find((e) => e.matches(":focus"));
|
|
142
|
-
!r && n &&
|
|
475
|
+
!r && n && V(n) && (n = e.find((e) => !V(e))), t(r || n, e);
|
|
143
476
|
});
|
|
144
|
-
let { moveRelatively: r, moveToEdge: i, moveByPages: a } =
|
|
477
|
+
let { moveRelatively: r, moveToEdge: i, moveByPages: a } = kt({
|
|
145
478
|
getElements: e,
|
|
146
|
-
isMovedTo:
|
|
479
|
+
isMovedTo: St,
|
|
147
480
|
moveTo: n
|
|
148
481
|
});
|
|
149
482
|
return {
|
|
@@ -155,8 +488,8 @@ var E = (e, t) => {
|
|
|
155
488
|
return e().find((e) => e.matches(":focus") || e.tabIndex === 0);
|
|
156
489
|
}
|
|
157
490
|
};
|
|
158
|
-
},
|
|
159
|
-
let { moveRelatively: t, moveToEdge: n, moveTo: r, moveByPages: i } =
|
|
491
|
+
}, jt = Symbol("grid"), Mt = (e) => {
|
|
492
|
+
let { moveRelatively: t, moveToEdge: n, moveTo: r, moveByPages: i } = At(e);
|
|
160
493
|
return { onKeyDown(a, o) {
|
|
161
494
|
let s = [
|
|
162
495
|
"ArrowLeft",
|
|
@@ -168,7 +501,7 @@ var E = (e, t) => {
|
|
|
168
501
|
"Home",
|
|
169
502
|
"End"
|
|
170
503
|
];
|
|
171
|
-
if (!
|
|
504
|
+
if (!bt(o.target)) return;
|
|
172
505
|
s.includes(o.key) && o.preventDefault();
|
|
173
506
|
let c = e().filter((e) => e.matches(`[data-elements-${a}="true"]`)), [l, u] = [c[0], c[c.length - 1]], d = o.target.closest(`[data-elements-${a}="true"]`);
|
|
174
507
|
switch (o.key) {
|
|
@@ -191,8 +524,8 @@ var E = (e, t) => {
|
|
|
191
524
|
default: break;
|
|
192
525
|
}
|
|
193
526
|
} };
|
|
194
|
-
},
|
|
195
|
-
let { moveTo: n, moveRelatively: r, moveToEdge: i, moveByPages: a, getCurrentTabStop: o } =
|
|
527
|
+
}, Nt = Symbol("roving-tabindex"), Pt = (e, t) => {
|
|
528
|
+
let { moveTo: n, moveRelatively: r, moveToEdge: i, moveByPages: a, getCurrentTabStop: o } = At(t);
|
|
196
529
|
return {
|
|
197
530
|
moveTo: n,
|
|
198
531
|
moveRelatively: r,
|
|
@@ -200,7 +533,7 @@ var E = (e, t) => {
|
|
|
200
533
|
moveByPages: a,
|
|
201
534
|
getCurrentTabStop: o,
|
|
202
535
|
onKeyDown(t) {
|
|
203
|
-
let n =
|
|
536
|
+
let n = S(e) === "vertical", a = n ? "ArrowUp" : "ArrowLeft", o = n ? "ArrowDown" : "ArrowRight";
|
|
204
537
|
switch ([
|
|
205
538
|
o,
|
|
206
539
|
a,
|
|
@@ -219,14 +552,14 @@ var E = (e, t) => {
|
|
|
219
552
|
}
|
|
220
553
|
}
|
|
221
554
|
};
|
|
222
|
-
},
|
|
223
|
-
let { moveTo: i, moveRelatively: a, moveToEdge: o, onKeyDown: s, getCurrentTabStop: c } =
|
|
555
|
+
}, Ft = Symbol("listbox"), It = (e, t, n, r) => {
|
|
556
|
+
let { moveTo: i, moveRelatively: a, moveToEdge: o, onKeyDown: s, getCurrentTabStop: c } = Pt(e, r), l = () => {
|
|
224
557
|
c()?.dispatchEvent(new KeyboardEvent("keydown", { key: " " }));
|
|
225
558
|
}, u = (e, t) => {
|
|
226
559
|
let i = r(), a = i.findIndex((t) => t.getAttribute("data-value") === e), o = i.findIndex((e) => e.getAttribute("data-value") === t);
|
|
227
560
|
if (a < 0 || o < 0 || a === o) return;
|
|
228
|
-
let s = (a < o ? i.slice(a, o) : i.slice(o, a)).filter((e) => !
|
|
229
|
-
i[a] && !
|
|
561
|
+
let s = (a < o ? i.slice(a, o) : i.slice(o, a)).filter((e) => !V(e) && !!e.getAttribute("data-value")).map((e) => e.getAttribute("data-value"));
|
|
562
|
+
i[a] && !V(i[a]) && s.unshift(e), i[o] && !V(i[o]) && s.push(t), n.value = [...new Set(n.value.concat(s))];
|
|
230
563
|
}, d = (e, t) => {
|
|
231
564
|
let n = r().at(t === "start" ? 0 : -1)?.getAttribute("data-value");
|
|
232
565
|
n && u(e, n);
|
|
@@ -234,19 +567,19 @@ var E = (e, t) => {
|
|
|
234
567
|
return {
|
|
235
568
|
moveTo: i,
|
|
236
569
|
onSpace(e, i) {
|
|
237
|
-
if (!(
|
|
238
|
-
else if (
|
|
570
|
+
if (!(bt(i.target) && V(i.target))) if (n.value.includes(e)) n.value = n.value.filter((t) => t !== e);
|
|
571
|
+
else if (S(t)) n.value = [...n.value, e];
|
|
239
572
|
else {
|
|
240
|
-
let t = r().filter((e) =>
|
|
573
|
+
let t = r().filter((e) => V(e)), i = f(t);
|
|
241
574
|
(!n.value.length || !i.includes(n.value[0])) && (n.value = [e]);
|
|
242
575
|
}
|
|
243
576
|
},
|
|
244
577
|
onKeyDown(i, c) {
|
|
245
|
-
if (!
|
|
246
|
-
let u =
|
|
578
|
+
if (!S(t) || !c.shiftKey && !c.ctrlKey) return s(c);
|
|
579
|
+
let u = S(e) === "vertical";
|
|
247
580
|
if (c.ctrlKey && c.key === "a") {
|
|
248
581
|
c.preventDefault();
|
|
249
|
-
let e = r(), t = f(e), i = f(e.filter((e) =>
|
|
582
|
+
let e = r(), t = f(e), i = f(e.filter((e) => V(e)));
|
|
250
583
|
return t.filter((e) => !i.includes(e)).every((e) => n.value.includes(e)) ? n.value = n.value.filter((e) => i.includes(e)) : n.value = t.filter((e) => !i.includes(e) || n.value.includes(e));
|
|
251
584
|
}
|
|
252
585
|
if (c.shiftKey) switch (c.key) {
|
|
@@ -267,17 +600,17 @@ var E = (e, t) => {
|
|
|
267
600
|
};
|
|
268
601
|
//#endregion
|
|
269
602
|
//#region ../../node_modules/.pnpm/@vueuse+shared@14.4.0_vue@3.5.40_typescript@6.0.3_/node_modules/@vueuse/shared/dist/index.js
|
|
270
|
-
function
|
|
271
|
-
return c() ? (
|
|
603
|
+
function Lt(e, t) {
|
|
604
|
+
return c() ? (ee(e, t), !0) : !1;
|
|
272
605
|
}
|
|
273
|
-
var
|
|
606
|
+
var Rt = typeof window < "u" && typeof document < "u";
|
|
274
607
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
275
|
-
var
|
|
276
|
-
function
|
|
608
|
+
var zt = (e) => e != null, Bt = () => {};
|
|
609
|
+
function Vt(e) {
|
|
277
610
|
return Array.isArray(e) ? e : [e];
|
|
278
611
|
}
|
|
279
|
-
function
|
|
280
|
-
let { immediate: r = !0, immediateCallback: i = !1 } = n, a =
|
|
612
|
+
function Ht(e, t, n = {}) {
|
|
613
|
+
let { immediate: r = !0, immediateCallback: i = !1 } = n, a = ne(!1), o;
|
|
281
614
|
function s() {
|
|
282
615
|
o &&= (clearTimeout(o), void 0);
|
|
283
616
|
}
|
|
@@ -287,51 +620,51 @@ function tt(e, t, n = {}) {
|
|
|
287
620
|
function l(...n) {
|
|
288
621
|
i && e(), s(), a.value = !0, o = setTimeout(() => {
|
|
289
622
|
a.value = !1, o = void 0, e(...n);
|
|
290
|
-
},
|
|
623
|
+
}, S(t));
|
|
291
624
|
}
|
|
292
|
-
return r && (a.value = !0,
|
|
293
|
-
isPending:
|
|
625
|
+
return r && (a.value = !0, Rt && l()), Lt(c), {
|
|
626
|
+
isPending: te(a),
|
|
294
627
|
start: l,
|
|
295
628
|
stop: c
|
|
296
629
|
};
|
|
297
630
|
}
|
|
298
|
-
function
|
|
299
|
-
let { controls: r = !1, callback: i } = n, a =
|
|
631
|
+
function Ut(e = 1e3, n = {}) {
|
|
632
|
+
let { controls: r = !1, callback: i } = n, a = Ht(i ?? Bt, e, n), o = t(() => !a.isPending.value);
|
|
300
633
|
return r ? {
|
|
301
634
|
ready: o,
|
|
302
635
|
...a
|
|
303
636
|
} : o;
|
|
304
637
|
}
|
|
305
|
-
function
|
|
306
|
-
return
|
|
638
|
+
function Wt(e, t, n) {
|
|
639
|
+
return D(e, t, {
|
|
307
640
|
...n,
|
|
308
641
|
immediate: !0
|
|
309
642
|
});
|
|
310
643
|
}
|
|
311
644
|
//#endregion
|
|
312
645
|
//#region ../../node_modules/.pnpm/@vueuse+core@14.4.0_vue@3.5.40_typescript@6.0.3_/node_modules/@vueuse/core/dist/index.js
|
|
313
|
-
var
|
|
314
|
-
|
|
315
|
-
function
|
|
316
|
-
let t =
|
|
646
|
+
var Gt = Rt ? window : void 0;
|
|
647
|
+
Rt && window.document, Rt && window.navigator, Rt && window.location;
|
|
648
|
+
function Kt(e) {
|
|
649
|
+
let t = S(e);
|
|
317
650
|
return t?.$el ?? t;
|
|
318
651
|
}
|
|
319
|
-
function
|
|
320
|
-
let e =
|
|
321
|
-
return t &&
|
|
652
|
+
function qt() {
|
|
653
|
+
let e = ne(!1), t = s();
|
|
654
|
+
return t && g(() => {
|
|
322
655
|
e.value = !0;
|
|
323
656
|
}, t), e;
|
|
324
657
|
}
|
|
325
658
|
/* @__NO_SIDE_EFFECTS__ */
|
|
326
|
-
function
|
|
327
|
-
let n =
|
|
659
|
+
function Jt(e) {
|
|
660
|
+
let n = qt();
|
|
328
661
|
return t(() => (n.value, !!e()));
|
|
329
662
|
}
|
|
330
|
-
function
|
|
331
|
-
let { window: i =
|
|
663
|
+
function Yt(e, n, r = {}) {
|
|
664
|
+
let { window: i = Gt, ...a } = r, o, s = /* @__PURE__ */ Jt(() => i && "MutationObserver" in i), c = () => {
|
|
332
665
|
o &&= (o.disconnect(), void 0);
|
|
333
|
-
}, l =
|
|
334
|
-
let t =
|
|
666
|
+
}, l = D(t(() => {
|
|
667
|
+
let t = Vt(S(e)).map(Kt).filter(zt);
|
|
335
668
|
return new Set(t);
|
|
336
669
|
}), (e) => {
|
|
337
670
|
c(), s.value && e.size && (o = new MutationObserver(n), e.forEach((e) => o.observe(e, a)));
|
|
@@ -341,7 +674,7 @@ function st(e, n, r = {}) {
|
|
|
341
674
|
}), u = () => o?.takeRecords(), d = () => {
|
|
342
675
|
l(), c();
|
|
343
676
|
};
|
|
344
|
-
return
|
|
677
|
+
return Lt(d), {
|
|
345
678
|
isSupported: s,
|
|
346
679
|
stop: d,
|
|
347
680
|
takeRecords: u
|
|
@@ -349,35 +682,35 @@ function st(e, n, r = {}) {
|
|
|
349
682
|
}
|
|
350
683
|
//#endregion
|
|
351
684
|
//#region src/hooks/keyboard/useTypeahead.ts
|
|
352
|
-
var
|
|
353
|
-
let t =
|
|
685
|
+
var Xt = (e) => {
|
|
686
|
+
let t = y(""), n = Ut(500, {
|
|
354
687
|
controls: !0,
|
|
355
688
|
callback() {
|
|
356
689
|
t.value = "";
|
|
357
690
|
}
|
|
358
691
|
});
|
|
359
692
|
return { type(r) {
|
|
360
|
-
let { getElements: i, moveTo: a, isMovedTo: o } =
|
|
693
|
+
let { getElements: i, moveTo: a, isMovedTo: o } = S(e);
|
|
361
694
|
n.isPending.value && n.stop();
|
|
362
695
|
let s = r.toLowerCase();
|
|
363
696
|
t.value += s;
|
|
364
|
-
let c =
|
|
697
|
+
let c = Et(t.value, s) ? s : t.value, l = i(), u = l.filter((e) => Dt(e.textContent, c)), d = l.find((e) => o(e)), f = u[u.findIndex((e) => d?.isSameNode(e)) + 1];
|
|
365
698
|
f && a(f, d), n.start();
|
|
366
699
|
} };
|
|
367
|
-
},
|
|
368
|
-
function
|
|
700
|
+
}, Zt = /([\p{Ll}\d])(\p{Lu})/gu, Qt = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu, $t = /(\d)\p{Ll}|(\p{L})\d/u, en = /[^\p{L}\d]+/giu, tn = "$1\0$2", nn = "";
|
|
701
|
+
function rn(e) {
|
|
369
702
|
let t = e.trim();
|
|
370
|
-
t = t.replace(
|
|
703
|
+
t = t.replace(Zt, tn).replace(Qt, tn), t = t.replace(en, "\0");
|
|
371
704
|
let n = 0, r = t.length;
|
|
372
705
|
for (; t.charAt(n) === "\0";) n++;
|
|
373
706
|
if (n === r) return [];
|
|
374
707
|
for (; t.charAt(r - 1) === "\0";) r--;
|
|
375
708
|
return t.slice(n, r).split(/\0/g);
|
|
376
709
|
}
|
|
377
|
-
function
|
|
378
|
-
let t =
|
|
710
|
+
function an(e) {
|
|
711
|
+
let t = rn(e);
|
|
379
712
|
for (let e = 0; e < t.length; e++) {
|
|
380
|
-
let n = t[e], r =
|
|
713
|
+
let n = t[e], r = $t.exec(n);
|
|
381
714
|
if (r) {
|
|
382
715
|
let i = r.index + (r[1] ?? r[2]).length;
|
|
383
716
|
t.splice(e, 1, n.slice(0, i), n.slice(i));
|
|
@@ -385,21 +718,21 @@ function gt(e) {
|
|
|
385
718
|
}
|
|
386
719
|
return t;
|
|
387
720
|
}
|
|
388
|
-
function
|
|
389
|
-
let [n, r, i] =
|
|
390
|
-
return n + r.map(
|
|
721
|
+
function on(e, t) {
|
|
722
|
+
let [n, r, i] = ln(e, t);
|
|
723
|
+
return n + r.map(cn(t?.locale)).join(t?.delimiter ?? " ") + i;
|
|
391
724
|
}
|
|
392
|
-
function
|
|
393
|
-
return
|
|
725
|
+
function sn(e, t) {
|
|
726
|
+
return on(e, {
|
|
394
727
|
delimiter: "-",
|
|
395
728
|
...t
|
|
396
729
|
});
|
|
397
730
|
}
|
|
398
|
-
function
|
|
731
|
+
function cn(e) {
|
|
399
732
|
return e === !1 ? (e) => e.toLowerCase() : (t) => t.toLocaleLowerCase(e);
|
|
400
733
|
}
|
|
401
|
-
function
|
|
402
|
-
let n = t.split ?? (t.separateNumbers ?
|
|
734
|
+
function ln(e, t = {}) {
|
|
735
|
+
let n = t.split ?? (t.separateNumbers ? an : rn), r = t.prefixCharacters ?? nn, i = t.suffixCharacters ?? nn, a = 0, o = e.length;
|
|
403
736
|
for (; a < e.length;) {
|
|
404
737
|
let t = e.charAt(a);
|
|
405
738
|
if (!r.includes(t)) break;
|
|
@@ -418,29 +751,29 @@ function yt(e, t = {}) {
|
|
|
418
751
|
}
|
|
419
752
|
//#endregion
|
|
420
753
|
//#region src/hooks/useBemClass.ts
|
|
421
|
-
var
|
|
754
|
+
var un = (e, t) => {
|
|
422
755
|
let n = t ? `${t}-${e}` : e;
|
|
423
756
|
return (...e) => {
|
|
424
|
-
let t = [n, ...e].filter((e) => typeof e == "string").map((e) =>
|
|
757
|
+
let t = [n, ...e].filter((e) => typeof e == "string").map((e) => sn(e)).join("__"), r = { [t]: !0 };
|
|
425
758
|
for (let n of e.filter((e) => typeof e == "object")) for (let e of Object.keys(n)) {
|
|
426
759
|
let i = n[e];
|
|
427
|
-
typeof i == "string" && (r[`${t}--${i}`] = !0), typeof i == "number" && (r[`${t}--${
|
|
760
|
+
typeof i == "string" && (r[`${t}--${i}`] = !0), typeof i == "number" && (r[`${t}--${sn(e)}-${i}`] = !0), typeof i == "boolean" && (r[`${t}--${sn(e)}`] = i);
|
|
428
761
|
}
|
|
429
762
|
return r;
|
|
430
763
|
};
|
|
431
|
-
},
|
|
432
|
-
let i =
|
|
433
|
-
return
|
|
434
|
-
i.value =
|
|
435
|
-
}),
|
|
436
|
-
i.value =
|
|
764
|
+
}, dn = (e) => (t) => un(t, e), fn = (e, n = lt.Monday, r = "en") => {
|
|
765
|
+
let i = y(dt(e.value, S(n))), a = t(() => at(e.value)), o = t(() => it(e.value, S(r))), s = t(() => ft(i.value));
|
|
766
|
+
return D(t(() => `${a.value}${o.value.number}`), () => {
|
|
767
|
+
i.value = dt(e.value, S(n));
|
|
768
|
+
}), D(() => S(n), (t) => {
|
|
769
|
+
i.value = dt(e.value, t);
|
|
437
770
|
}), {
|
|
438
771
|
year: a,
|
|
439
772
|
month: o,
|
|
440
773
|
weeks: s
|
|
441
774
|
};
|
|
442
|
-
},
|
|
443
|
-
let n =
|
|
775
|
+
}, pn = (e) => {
|
|
776
|
+
let n = y([]), r = t(() => n.value.sort((e, t) => e === t ? 0 : e.compareDocumentPosition(t) & 2 ? 1 : -1)), i = () => document.querySelectorAll("h1, h2, h3, h4, h5, h6"), a = t(() => {
|
|
444
777
|
let e = [], t = [];
|
|
445
778
|
for (let n of r.value) {
|
|
446
779
|
let r = parseInt(n.tagName.substring(1), 10), i = {
|
|
@@ -460,59 +793,1235 @@ var bt = (e, t) => {
|
|
|
460
793
|
};
|
|
461
794
|
return t.children && (n.children = o(t.children)), n;
|
|
462
795
|
}) : t;
|
|
463
|
-
return
|
|
796
|
+
return g(async () => {
|
|
464
797
|
await p(), n.value = Array.from(i());
|
|
465
|
-
}),
|
|
798
|
+
}), Yt(document.body, (e) => {
|
|
466
799
|
let t = Array.from(i());
|
|
467
800
|
t.some((t) => e.some((e) => [...e.addedNodes, ...e.removedNodes].includes(t))) && (n.value = t);
|
|
468
801
|
}, {
|
|
469
802
|
childList: !0,
|
|
470
803
|
subtree: !0
|
|
471
804
|
}), { documentOutline: t(() => o(a.value)) };
|
|
472
|
-
},
|
|
473
|
-
let r =
|
|
805
|
+
}, H = (e, n) => {
|
|
806
|
+
let r = y(/* @__PURE__ */ new Map()), i = n ? {
|
|
474
807
|
items: r,
|
|
475
808
|
parent: n
|
|
476
809
|
} : l(`${e}-elements`, {
|
|
477
810
|
items: r,
|
|
478
|
-
parent:
|
|
811
|
+
parent: y()
|
|
479
812
|
});
|
|
480
|
-
return n &&
|
|
813
|
+
return n && v(`${e}-elements`, i), {
|
|
481
814
|
getElements: (t = !0) => {
|
|
482
815
|
let n = i.parent.value;
|
|
483
816
|
if (!n) return [];
|
|
484
817
|
let r = Array.from(n.querySelectorAll(`[data-elements-${e}="true"]`));
|
|
485
|
-
return
|
|
818
|
+
return Ct(Array.from(i.items.value.values()).sort((e, t) => r.indexOf(e) - r.indexOf(t)).filter((e) => t || !V(e)));
|
|
486
819
|
},
|
|
487
|
-
elements: t(() =>
|
|
820
|
+
elements: t(() => Ct(Array.from(i.items.value.values())))
|
|
488
821
|
};
|
|
489
|
-
},
|
|
822
|
+
}, U = (e, t, n) => {
|
|
490
823
|
let r = l(`${e}-elements`, void 0);
|
|
491
|
-
|
|
824
|
+
oe((e) => {
|
|
492
825
|
if (!t.value) return;
|
|
493
826
|
let i = u(t.value);
|
|
494
827
|
n?.value ? r?.items.value.delete(i) : r?.items.value.set(i, t.value), e(() => r?.items.value.delete(i));
|
|
495
|
-
}),
|
|
828
|
+
}), g(() => {
|
|
496
829
|
t.value?.setAttribute(`data-elements-${e}`, "true");
|
|
497
|
-
}),
|
|
830
|
+
}), h(() => {
|
|
498
831
|
t.value?.removeAttribute(`data-elements-${e}`);
|
|
499
832
|
});
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
833
|
+
};
|
|
834
|
+
//#endregion
|
|
835
|
+
//#region ../../node_modules/.pnpm/fuse.js@7.5.0/node_modules/fuse.js/dist/fuse.mjs
|
|
836
|
+
function W(e) {
|
|
837
|
+
return Array.isArray ? Array.isArray(e) : xn(e) === "[object Array]";
|
|
838
|
+
}
|
|
839
|
+
function mn(e) {
|
|
840
|
+
if (typeof e == "string") return e;
|
|
841
|
+
if (typeof e == "bigint") return e.toString();
|
|
842
|
+
let t = e + "";
|
|
843
|
+
return t == "0" && 1 / e == -Infinity ? "-0" : t;
|
|
844
|
+
}
|
|
845
|
+
function hn(e) {
|
|
846
|
+
return e == null ? "" : mn(e);
|
|
847
|
+
}
|
|
848
|
+
function G(e) {
|
|
849
|
+
return typeof e == "string";
|
|
850
|
+
}
|
|
851
|
+
function gn(e) {
|
|
852
|
+
return typeof e == "number";
|
|
853
|
+
}
|
|
854
|
+
function _n(e) {
|
|
855
|
+
return e === !0 || e === !1 || yn(e) && xn(e) == "[object Boolean]";
|
|
856
|
+
}
|
|
857
|
+
function vn(e) {
|
|
858
|
+
return typeof e == "object";
|
|
859
|
+
}
|
|
860
|
+
function yn(e) {
|
|
861
|
+
return vn(e) && e !== null;
|
|
862
|
+
}
|
|
863
|
+
function K(e) {
|
|
864
|
+
return e != null;
|
|
865
|
+
}
|
|
866
|
+
function bn(e) {
|
|
867
|
+
return !e.trim().length;
|
|
868
|
+
}
|
|
869
|
+
function xn(e) {
|
|
870
|
+
return e == null ? e === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(e);
|
|
871
|
+
}
|
|
872
|
+
var Sn = "Incorrect 'index' type", Cn = "Invalid doc index: must be a non-negative integer within the bounds of the docs array", wn = (e) => `Invalid value for key ${e}`, Tn = (e) => `Pattern length exceeds max of ${e}.`, En = (e) => `Missing ${e} property in key`, Dn = (e) => `Property 'weight' in key '${e}' must be a positive integer`, On = "Fuse.match does not support useTokenSearch: token search requires corpus-level statistics (df, fieldCount) that a one-off string comparison does not have. Use new Fuse(...).search(...) instead.", kn = Object.prototype.hasOwnProperty, An = class {
|
|
873
|
+
constructor(e) {
|
|
874
|
+
this._keys = [], this._keyMap = {};
|
|
875
|
+
let t = 0;
|
|
876
|
+
e.forEach((e) => {
|
|
877
|
+
let n = jn(e);
|
|
878
|
+
this._keys.push(n), this._keyMap[n.id] = n, t += n.weight;
|
|
879
|
+
}), this._keys.forEach((e) => {
|
|
880
|
+
e.weight /= t;
|
|
881
|
+
});
|
|
882
|
+
}
|
|
883
|
+
get(e) {
|
|
884
|
+
return this._keyMap[e];
|
|
885
|
+
}
|
|
886
|
+
keys() {
|
|
887
|
+
return this._keys;
|
|
888
|
+
}
|
|
889
|
+
toJSON() {
|
|
890
|
+
return JSON.stringify(this._keys);
|
|
891
|
+
}
|
|
892
|
+
};
|
|
893
|
+
function jn(e) {
|
|
894
|
+
let t = null, n = null, r = null, i = 1, a = null;
|
|
895
|
+
if (G(e) || W(e)) r = e, t = Mn(e), n = Nn(e);
|
|
896
|
+
else {
|
|
897
|
+
if (!kn.call(e, "name")) throw Error(En("name"));
|
|
898
|
+
let o = e.name;
|
|
899
|
+
if (r = o, kn.call(e, "weight") && e.weight !== void 0 && (i = e.weight, i <= 0)) throw Error(Dn(Nn(o)));
|
|
900
|
+
t = Mn(o), n = Nn(o), a = e.getFn ?? null;
|
|
901
|
+
}
|
|
902
|
+
return {
|
|
903
|
+
path: t,
|
|
904
|
+
id: n,
|
|
905
|
+
weight: i,
|
|
906
|
+
src: r,
|
|
907
|
+
getFn: a
|
|
908
|
+
};
|
|
909
|
+
}
|
|
910
|
+
function Mn(e) {
|
|
911
|
+
return W(e) ? e : e.split(".");
|
|
912
|
+
}
|
|
913
|
+
function Nn(e) {
|
|
914
|
+
return W(e) ? e.join(".") : e;
|
|
915
|
+
}
|
|
916
|
+
function Pn(e, t) {
|
|
917
|
+
let n = [], r = !1, i = (e, t, a, o) => {
|
|
918
|
+
if (K(e)) if (!t[a]) n.push(o === void 0 ? e : {
|
|
919
|
+
v: e,
|
|
920
|
+
i: o
|
|
921
|
+
});
|
|
922
|
+
else {
|
|
923
|
+
let s = e[t[a]];
|
|
924
|
+
if (!K(s)) return;
|
|
925
|
+
if (a === t.length - 1 && (G(s) || gn(s) || _n(s) || typeof s == "bigint")) n.push(o === void 0 ? hn(s) : {
|
|
926
|
+
v: hn(s),
|
|
927
|
+
i: o
|
|
928
|
+
});
|
|
929
|
+
else if (W(s)) {
|
|
930
|
+
r = !0;
|
|
931
|
+
for (let e = 0, n = s.length; e < n; e += 1) i(s[e], t, a + 1, e);
|
|
932
|
+
} else t.length && i(s, t, a + 1, o);
|
|
933
|
+
}
|
|
934
|
+
};
|
|
935
|
+
return i(e, G(t) ? t.split(".") : t, 0), r ? n : n[0];
|
|
936
|
+
}
|
|
937
|
+
var Fn = {
|
|
938
|
+
includeMatches: !1,
|
|
939
|
+
findAllMatches: !1,
|
|
940
|
+
minMatchCharLength: 1
|
|
941
|
+
}, In = {
|
|
942
|
+
isCaseSensitive: !1,
|
|
943
|
+
ignoreDiacritics: !1,
|
|
944
|
+
includeScore: !1,
|
|
945
|
+
keys: [],
|
|
946
|
+
shouldSort: !0,
|
|
947
|
+
sortFn: (e, t) => e.score === t.score ? e.idx < t.idx ? -1 : 1 : e.score < t.score ? -1 : 1
|
|
948
|
+
}, Ln = {
|
|
949
|
+
location: 0,
|
|
950
|
+
threshold: .6,
|
|
951
|
+
distance: 100
|
|
952
|
+
}, Rn = {
|
|
953
|
+
useExtendedSearch: !1,
|
|
954
|
+
useTokenSearch: !1,
|
|
955
|
+
tokenize: void 0,
|
|
956
|
+
tokenMatch: "any",
|
|
957
|
+
getFn: Pn,
|
|
958
|
+
ignoreLocation: !1,
|
|
959
|
+
ignoreFieldNorm: !1,
|
|
960
|
+
fieldNormWeight: 1
|
|
961
|
+
}, q = Object.freeze({
|
|
962
|
+
...In,
|
|
963
|
+
...Fn,
|
|
964
|
+
...Ln,
|
|
965
|
+
...Rn
|
|
966
|
+
});
|
|
967
|
+
function zn(e) {
|
|
968
|
+
return e >= 9 && e <= 13 || e === 32 || e === 160;
|
|
969
|
+
}
|
|
970
|
+
function Bn(e = 1, t = 3) {
|
|
971
|
+
let n = /* @__PURE__ */ new Map(), r = 10 ** t;
|
|
972
|
+
return {
|
|
973
|
+
get(t) {
|
|
974
|
+
let i = 0, a = !1;
|
|
975
|
+
for (let e = 0; e < t.length; e++) zn(t.charCodeAt(e)) ? a = !1 : a ||= (i++, !0);
|
|
976
|
+
if (i === 0 && (i = 1), n.has(i)) return n.get(i);
|
|
977
|
+
let o = Math.round(r / i ** (.5 * e)) / r;
|
|
978
|
+
return n.set(i, o), o;
|
|
505
979
|
},
|
|
506
|
-
|
|
507
|
-
|
|
980
|
+
clear() {
|
|
981
|
+
n.clear();
|
|
982
|
+
}
|
|
983
|
+
};
|
|
984
|
+
}
|
|
985
|
+
var Vn = class {
|
|
986
|
+
constructor({ getFn: e = q.getFn, fieldNormWeight: t = q.fieldNormWeight } = {}) {
|
|
987
|
+
this.norm = Bn(t, 3), this.getFn = e, this.isCreated = !1, this.docs = [], this.keys = [], this._keysMap = {}, this.setIndexRecords();
|
|
988
|
+
}
|
|
989
|
+
setSources(e = []) {
|
|
990
|
+
this.docs = e;
|
|
991
|
+
}
|
|
992
|
+
setIndexRecords(e = []) {
|
|
993
|
+
this.records = e;
|
|
994
|
+
}
|
|
995
|
+
setKeys(e = []) {
|
|
996
|
+
this.keys = e, this._keysMap = {}, e.forEach((e, t) => {
|
|
997
|
+
this._keysMap[e.id] = t;
|
|
998
|
+
});
|
|
999
|
+
}
|
|
1000
|
+
create() {
|
|
1001
|
+
if (this.isCreated || !this.docs.length) return;
|
|
1002
|
+
this.isCreated = !0;
|
|
1003
|
+
let e = this.docs.length;
|
|
1004
|
+
this.records = Array(e);
|
|
1005
|
+
let t = 0;
|
|
1006
|
+
if (G(this.docs[0])) for (let n = 0; n < e; n++) {
|
|
1007
|
+
let e = this._createStringRecord(this.docs[n], n);
|
|
1008
|
+
e && (this.records[t++] = e);
|
|
1009
|
+
}
|
|
1010
|
+
else for (let n = 0; n < e; n++) this.records[t++] = this._createObjectRecord(this.docs[n], n);
|
|
1011
|
+
this.records.length = t, this.norm.clear();
|
|
1012
|
+
}
|
|
1013
|
+
add(e, t) {
|
|
1014
|
+
if (!Number.isInteger(t) || t < 0) throw Error(Cn);
|
|
1015
|
+
if (G(e)) {
|
|
1016
|
+
let n = this._createStringRecord(e, t);
|
|
1017
|
+
return n && this.records.push(n), n;
|
|
1018
|
+
}
|
|
1019
|
+
let n = this._createObjectRecord(e, t);
|
|
1020
|
+
return this.records.push(n), n;
|
|
1021
|
+
}
|
|
1022
|
+
removeAt(e) {
|
|
1023
|
+
if (!Number.isInteger(e) || e < 0) throw Error(Cn);
|
|
1024
|
+
for (let t = 0, n = this.records.length; t < n; t += 1) if (this.records[t].i === e) {
|
|
1025
|
+
this.records.splice(t, 1);
|
|
1026
|
+
break;
|
|
1027
|
+
}
|
|
1028
|
+
for (let t = 0, n = this.records.length; t < n; t += 1) this.records[t].i > e && --this.records[t].i;
|
|
1029
|
+
}
|
|
1030
|
+
removeAll(e) {
|
|
1031
|
+
let t = /* @__PURE__ */ new Set();
|
|
1032
|
+
for (let n of e) Number.isInteger(n) && n >= 0 && t.add(n);
|
|
1033
|
+
if (t.size === 0) return;
|
|
1034
|
+
this.records = this.records.filter((e) => !t.has(e.i));
|
|
1035
|
+
let n = Array.from(t).sort((e, t) => e - t);
|
|
1036
|
+
for (let e of this.records) {
|
|
1037
|
+
let t = 0, r = n.length;
|
|
1038
|
+
for (; t < r;) {
|
|
1039
|
+
let i = t + r >>> 1;
|
|
1040
|
+
n[i] < e.i ? t = i + 1 : r = i;
|
|
1041
|
+
}
|
|
1042
|
+
e.i -= t;
|
|
508
1043
|
}
|
|
1044
|
+
}
|
|
1045
|
+
getValueForItemAtKeyId(e, t) {
|
|
1046
|
+
return e[this._keysMap[t]];
|
|
1047
|
+
}
|
|
1048
|
+
size() {
|
|
1049
|
+
return this.records.length;
|
|
1050
|
+
}
|
|
1051
|
+
_createStringRecord(e, t) {
|
|
1052
|
+
return !K(e) || bn(e) ? null : {
|
|
1053
|
+
v: e,
|
|
1054
|
+
i: t,
|
|
1055
|
+
n: this.norm.get(e)
|
|
1056
|
+
};
|
|
1057
|
+
}
|
|
1058
|
+
_createObjectRecord(e, t) {
|
|
1059
|
+
let n = {
|
|
1060
|
+
i: t,
|
|
1061
|
+
$: {}
|
|
1062
|
+
};
|
|
1063
|
+
for (let t = 0, r = this.keys.length; t < r; t++) {
|
|
1064
|
+
let r = this.keys[t], i = r.getFn ? r.getFn(e) : this.getFn(e, r.path);
|
|
1065
|
+
if (K(i)) {
|
|
1066
|
+
if (W(i)) {
|
|
1067
|
+
let e = [];
|
|
1068
|
+
for (let t = 0, n = i.length; t < n; t += 1) {
|
|
1069
|
+
let n = i[t];
|
|
1070
|
+
if (K(n)) {
|
|
1071
|
+
if (G(n)) {
|
|
1072
|
+
if (!bn(n)) {
|
|
1073
|
+
let r = {
|
|
1074
|
+
v: n,
|
|
1075
|
+
i: t,
|
|
1076
|
+
n: this.norm.get(n)
|
|
1077
|
+
};
|
|
1078
|
+
e.push(r);
|
|
1079
|
+
}
|
|
1080
|
+
} else if (K(n.v)) {
|
|
1081
|
+
let t = G(n.v) ? n.v : hn(n.v);
|
|
1082
|
+
if (!bn(t)) {
|
|
1083
|
+
let r = {
|
|
1084
|
+
v: t,
|
|
1085
|
+
i: n.i,
|
|
1086
|
+
n: this.norm.get(t)
|
|
1087
|
+
};
|
|
1088
|
+
e.push(r);
|
|
1089
|
+
}
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1092
|
+
}
|
|
1093
|
+
n.$[t] = e;
|
|
1094
|
+
} else if (G(i) && !bn(i)) {
|
|
1095
|
+
let e = {
|
|
1096
|
+
v: i,
|
|
1097
|
+
n: this.norm.get(i)
|
|
1098
|
+
};
|
|
1099
|
+
n.$[t] = e;
|
|
1100
|
+
}
|
|
1101
|
+
}
|
|
1102
|
+
}
|
|
1103
|
+
return n;
|
|
1104
|
+
}
|
|
1105
|
+
toJSON() {
|
|
1106
|
+
return {
|
|
1107
|
+
keys: this.keys.map(({ getFn: e, ...t }) => t),
|
|
1108
|
+
records: this.records
|
|
1109
|
+
};
|
|
1110
|
+
}
|
|
1111
|
+
};
|
|
1112
|
+
function Hn(e, t, { getFn: n = q.getFn, fieldNormWeight: r = q.fieldNormWeight } = {}) {
|
|
1113
|
+
let i = new Vn({
|
|
1114
|
+
getFn: n,
|
|
1115
|
+
fieldNormWeight: r
|
|
509
1116
|
});
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
1117
|
+
return i.setKeys(e.map(jn)), i.setSources(t), i.create(), i;
|
|
1118
|
+
}
|
|
1119
|
+
function Un(e, { getFn: t = q.getFn, fieldNormWeight: n = q.fieldNormWeight } = {}) {
|
|
1120
|
+
let { keys: r, records: i } = e, a = new Vn({
|
|
1121
|
+
getFn: t,
|
|
1122
|
+
fieldNormWeight: n
|
|
513
1123
|
});
|
|
514
|
-
|
|
515
|
-
|
|
1124
|
+
return a.setKeys(r), a.setIndexRecords(i), a;
|
|
1125
|
+
}
|
|
1126
|
+
function Wn(e = [], t = q.minMatchCharLength) {
|
|
1127
|
+
let n = [], r = -1, i = -1, a = 0;
|
|
1128
|
+
for (let o = e.length; a < o; a += 1) {
|
|
1129
|
+
let o = e[a];
|
|
1130
|
+
o && r === -1 ? r = a : !o && r !== -1 && (i = a - 1, i - r + 1 >= t && n.push([r, i]), r = -1);
|
|
1131
|
+
}
|
|
1132
|
+
return e[a - 1] && a - r >= t && n.push([r, a - 1]), n;
|
|
1133
|
+
}
|
|
1134
|
+
function Gn(e, t, n, { location: r = q.location, distance: i = q.distance, threshold: a = q.threshold, findAllMatches: o = q.findAllMatches, minMatchCharLength: s = q.minMatchCharLength, includeMatches: c = q.includeMatches, ignoreLocation: l = q.ignoreLocation } = {}) {
|
|
1135
|
+
if (t.length > 32) throw Error(Tn(32));
|
|
1136
|
+
let u = t.length, d = e.length, f = Math.max(0, Math.min(r, d)), p = a, m = f, h = (e, t) => {
|
|
1137
|
+
let n = e / u;
|
|
1138
|
+
if (l) return n;
|
|
1139
|
+
let r = Math.abs(f - t);
|
|
1140
|
+
return i ? n + r / i : r ? 1 : n;
|
|
1141
|
+
}, g = s > 1 || c, ee = g ? Array(d) : [], _;
|
|
1142
|
+
for (; (_ = e.indexOf(t, m)) > -1;) {
|
|
1143
|
+
let e = h(0, _);
|
|
1144
|
+
if (p = Math.min(e, p), m = _ + u, g) {
|
|
1145
|
+
let e = 0;
|
|
1146
|
+
for (; e < u;) ee[_ + e] = 1, e += 1;
|
|
1147
|
+
}
|
|
1148
|
+
}
|
|
1149
|
+
m = -1;
|
|
1150
|
+
let v = [], y = 1, b = 0, x = u + d, te = 1 << u - 1;
|
|
1151
|
+
for (let t = 0; t < u; t += 1) {
|
|
1152
|
+
let r = 0, i = x;
|
|
1153
|
+
for (; r < i;) h(t, f + i) <= p ? r = i : x = i, i = Math.floor((x - r) / 2 + r);
|
|
1154
|
+
x = i;
|
|
1155
|
+
let a = Math.max(1, f - i + 1), s = o ? d : Math.min(f + i, d) + u, c = Array(s + 2);
|
|
1156
|
+
c[s + 1] = (1 << t) - 1;
|
|
1157
|
+
for (let r = s; r >= a; --r) {
|
|
1158
|
+
let i = r - 1, o = n[e[i]];
|
|
1159
|
+
if (c[r] = (c[r + 1] << 1 | 1) & o, t && (c[r] |= (v[r + 1] | v[r]) << 1 | 1 | v[r + 1]), c[r] & te && (y = h(t, i), y <= p)) {
|
|
1160
|
+
if (p = y, m = i, b = t, m <= f) break;
|
|
1161
|
+
a = Math.max(1, 2 * f - m);
|
|
1162
|
+
}
|
|
1163
|
+
}
|
|
1164
|
+
if (h(t + 1, f) > p) break;
|
|
1165
|
+
v = c;
|
|
1166
|
+
}
|
|
1167
|
+
if (g && m >= 0) {
|
|
1168
|
+
let t = Math.min(d - 1, m + u - 1 + b);
|
|
1169
|
+
for (let r = m; r <= t; r += 1) n[e[r]] && (ee[r] = 1);
|
|
1170
|
+
}
|
|
1171
|
+
let ne = {
|
|
1172
|
+
isMatch: m >= 0,
|
|
1173
|
+
score: Math.max(.001, y)
|
|
1174
|
+
};
|
|
1175
|
+
if (g) {
|
|
1176
|
+
let e = Wn(ee, s);
|
|
1177
|
+
e.length ? c && (ne.indices = e) : ne.isMatch = !1;
|
|
1178
|
+
}
|
|
1179
|
+
return ne;
|
|
1180
|
+
}
|
|
1181
|
+
function Kn(e) {
|
|
1182
|
+
let t = {};
|
|
1183
|
+
for (let n = 0, r = e.length; n < r; n += 1) {
|
|
1184
|
+
let i = e.charAt(n);
|
|
1185
|
+
t[i] = (t[i] || 0) | 1 << r - n - 1;
|
|
1186
|
+
}
|
|
1187
|
+
return t;
|
|
1188
|
+
}
|
|
1189
|
+
function qn(e) {
|
|
1190
|
+
if (e.length <= 1) return e;
|
|
1191
|
+
e.sort((e, t) => e[0] - t[0] || e[1] - t[1]);
|
|
1192
|
+
let t = [e[0]];
|
|
1193
|
+
for (let n = 1, r = e.length; n < r; n += 1) {
|
|
1194
|
+
let r = t[t.length - 1], i = e[n];
|
|
1195
|
+
i[0] <= r[1] + 1 ? r[1] = Math.max(r[1], i[1]) : t.push(i);
|
|
1196
|
+
}
|
|
1197
|
+
return t;
|
|
1198
|
+
}
|
|
1199
|
+
var Jn = {
|
|
1200
|
+
ł: "l",
|
|
1201
|
+
Ł: "L",
|
|
1202
|
+
đ: "d",
|
|
1203
|
+
Đ: "D",
|
|
1204
|
+
ø: "o",
|
|
1205
|
+
Ø: "O",
|
|
1206
|
+
ħ: "h",
|
|
1207
|
+
Ħ: "H",
|
|
1208
|
+
ŧ: "t",
|
|
1209
|
+
Ŧ: "T",
|
|
1210
|
+
ı: "i",
|
|
1211
|
+
ß: "ss"
|
|
1212
|
+
}, Yn = RegExp("[" + Object.keys(Jn).join("") + "]", "g"), Xn = typeof String.prototype.normalize == "function" ? (e) => e.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g, "").replace(Yn, (e) => Jn[e]) : (e) => e, Zn = class {
|
|
1213
|
+
constructor(e, { location: t = q.location, threshold: n = q.threshold, distance: r = q.distance, includeMatches: i = q.includeMatches, findAllMatches: a = q.findAllMatches, minMatchCharLength: o = q.minMatchCharLength, isCaseSensitive: s = q.isCaseSensitive, ignoreDiacritics: c = q.ignoreDiacritics, ignoreLocation: l = q.ignoreLocation } = {}) {
|
|
1214
|
+
if (this.options = {
|
|
1215
|
+
location: t,
|
|
1216
|
+
threshold: n,
|
|
1217
|
+
distance: r,
|
|
1218
|
+
includeMatches: i,
|
|
1219
|
+
findAllMatches: a,
|
|
1220
|
+
minMatchCharLength: o,
|
|
1221
|
+
isCaseSensitive: s,
|
|
1222
|
+
ignoreDiacritics: c,
|
|
1223
|
+
ignoreLocation: l
|
|
1224
|
+
}, e = s ? e : e.toLowerCase(), e = c ? Xn(e) : e, this.pattern = e, this.chunks = [], !this.pattern.length) return;
|
|
1225
|
+
let u = (e, t) => {
|
|
1226
|
+
this.chunks.push({
|
|
1227
|
+
pattern: e,
|
|
1228
|
+
alphabet: Kn(e),
|
|
1229
|
+
startIndex: t
|
|
1230
|
+
});
|
|
1231
|
+
}, d = this.pattern.length;
|
|
1232
|
+
if (d > 32) {
|
|
1233
|
+
let e = 0, t = d % 32, n = d - t;
|
|
1234
|
+
for (; e < n;) u(this.pattern.substr(e, 32), e), e += 32;
|
|
1235
|
+
if (t) {
|
|
1236
|
+
let e = d - 32;
|
|
1237
|
+
u(this.pattern.substr(e), e);
|
|
1238
|
+
}
|
|
1239
|
+
} else u(this.pattern, 0);
|
|
1240
|
+
}
|
|
1241
|
+
searchIn(e) {
|
|
1242
|
+
let { isCaseSensitive: t, ignoreDiacritics: n, includeMatches: r } = this.options;
|
|
1243
|
+
if (e = t ? e : e.toLowerCase(), e = n ? Xn(e) : e, this.pattern === e) {
|
|
1244
|
+
if (e.length < this.options.minMatchCharLength) return {
|
|
1245
|
+
isMatch: !1,
|
|
1246
|
+
score: 1
|
|
1247
|
+
};
|
|
1248
|
+
let t = {
|
|
1249
|
+
isMatch: !0,
|
|
1250
|
+
score: 0
|
|
1251
|
+
};
|
|
1252
|
+
return r && (t.indices = [[0, e.length - 1]]), t;
|
|
1253
|
+
}
|
|
1254
|
+
let { location: i, distance: a, threshold: o, findAllMatches: s, minMatchCharLength: c, ignoreLocation: l } = this.options, u = [], d = 0, f = !1;
|
|
1255
|
+
this.chunks.forEach(({ pattern: t, alphabet: n, startIndex: p }) => {
|
|
1256
|
+
let { isMatch: m, score: h, indices: g } = Gn(e, t, n, {
|
|
1257
|
+
location: i + p,
|
|
1258
|
+
distance: a,
|
|
1259
|
+
threshold: o,
|
|
1260
|
+
findAllMatches: s,
|
|
1261
|
+
minMatchCharLength: c,
|
|
1262
|
+
includeMatches: r,
|
|
1263
|
+
ignoreLocation: l
|
|
1264
|
+
});
|
|
1265
|
+
m && (f = !0), d += h, m && g && u.push(...g);
|
|
1266
|
+
});
|
|
1267
|
+
let p = {
|
|
1268
|
+
isMatch: f,
|
|
1269
|
+
score: f ? d / this.chunks.length : 1
|
|
1270
|
+
};
|
|
1271
|
+
return f && r && (p.indices = qn(u)), p;
|
|
1272
|
+
}
|
|
1273
|
+
}, Qn = /* @__PURE__ */ new Set(["fuzzy", "include"]);
|
|
1274
|
+
function $n(e) {
|
|
1275
|
+
return e.startsWith("inverse");
|
|
1276
|
+
}
|
|
1277
|
+
var er = [
|
|
1278
|
+
{
|
|
1279
|
+
type: "exact",
|
|
1280
|
+
multiRegex: /^="(.*)"$/,
|
|
1281
|
+
singleRegex: /^=(.*)$/,
|
|
1282
|
+
create: (e) => ({
|
|
1283
|
+
type: "exact",
|
|
1284
|
+
search(t) {
|
|
1285
|
+
let n = t === e;
|
|
1286
|
+
return {
|
|
1287
|
+
isMatch: n,
|
|
1288
|
+
score: +!n,
|
|
1289
|
+
indices: [0, e.length - 1]
|
|
1290
|
+
};
|
|
1291
|
+
}
|
|
1292
|
+
})
|
|
1293
|
+
},
|
|
1294
|
+
{
|
|
1295
|
+
type: "include",
|
|
1296
|
+
multiRegex: /^'"(.*)"$/,
|
|
1297
|
+
singleRegex: /^'(.*)$/,
|
|
1298
|
+
create: (e) => ({
|
|
1299
|
+
type: "include",
|
|
1300
|
+
search(t) {
|
|
1301
|
+
let n = 0, r, i = [], a = e.length;
|
|
1302
|
+
for (; (r = t.indexOf(e, n)) > -1;) n = r + a, i.push([r, n - 1]);
|
|
1303
|
+
let o = !!i.length;
|
|
1304
|
+
return {
|
|
1305
|
+
isMatch: o,
|
|
1306
|
+
score: +!o,
|
|
1307
|
+
indices: i
|
|
1308
|
+
};
|
|
1309
|
+
}
|
|
1310
|
+
})
|
|
1311
|
+
},
|
|
1312
|
+
{
|
|
1313
|
+
type: "prefix-exact",
|
|
1314
|
+
multiRegex: /^\^"(.*)"$/,
|
|
1315
|
+
singleRegex: /^\^(.*)$/,
|
|
1316
|
+
create: (e) => ({
|
|
1317
|
+
type: "prefix-exact",
|
|
1318
|
+
search(t) {
|
|
1319
|
+
let n = t.startsWith(e);
|
|
1320
|
+
return {
|
|
1321
|
+
isMatch: n,
|
|
1322
|
+
score: +!n,
|
|
1323
|
+
indices: [0, e.length - 1]
|
|
1324
|
+
};
|
|
1325
|
+
}
|
|
1326
|
+
})
|
|
1327
|
+
},
|
|
1328
|
+
{
|
|
1329
|
+
type: "inverse-prefix-exact",
|
|
1330
|
+
multiRegex: /^!\^"(.*)"$/,
|
|
1331
|
+
singleRegex: /^!\^(.*)$/,
|
|
1332
|
+
create: (e) => ({
|
|
1333
|
+
type: "inverse-prefix-exact",
|
|
1334
|
+
search(t) {
|
|
1335
|
+
let n = !t.startsWith(e);
|
|
1336
|
+
return {
|
|
1337
|
+
isMatch: n,
|
|
1338
|
+
score: +!n,
|
|
1339
|
+
indices: [0, t.length - 1]
|
|
1340
|
+
};
|
|
1341
|
+
}
|
|
1342
|
+
})
|
|
1343
|
+
},
|
|
1344
|
+
{
|
|
1345
|
+
type: "inverse-suffix-exact",
|
|
1346
|
+
multiRegex: /^!"(.*)"\$$/,
|
|
1347
|
+
singleRegex: /^!(.*)\$$/,
|
|
1348
|
+
create: (e) => ({
|
|
1349
|
+
type: "inverse-suffix-exact",
|
|
1350
|
+
search(t) {
|
|
1351
|
+
let n = !t.endsWith(e);
|
|
1352
|
+
return {
|
|
1353
|
+
isMatch: n,
|
|
1354
|
+
score: +!n,
|
|
1355
|
+
indices: [0, t.length - 1]
|
|
1356
|
+
};
|
|
1357
|
+
}
|
|
1358
|
+
})
|
|
1359
|
+
},
|
|
1360
|
+
{
|
|
1361
|
+
type: "suffix-exact",
|
|
1362
|
+
multiRegex: /^"(.*)"\$$/,
|
|
1363
|
+
singleRegex: /^(.*)\$$/,
|
|
1364
|
+
create: (e) => ({
|
|
1365
|
+
type: "suffix-exact",
|
|
1366
|
+
search(t) {
|
|
1367
|
+
let n = t.endsWith(e);
|
|
1368
|
+
return {
|
|
1369
|
+
isMatch: n,
|
|
1370
|
+
score: +!n,
|
|
1371
|
+
indices: [t.length - e.length, t.length - 1]
|
|
1372
|
+
};
|
|
1373
|
+
}
|
|
1374
|
+
})
|
|
1375
|
+
},
|
|
1376
|
+
{
|
|
1377
|
+
type: "inverse-exact",
|
|
1378
|
+
multiRegex: /^!"(.*)"$/,
|
|
1379
|
+
singleRegex: /^!(.*)$/,
|
|
1380
|
+
create: (e) => ({
|
|
1381
|
+
type: "inverse-exact",
|
|
1382
|
+
search(t) {
|
|
1383
|
+
let n = t.indexOf(e) === -1;
|
|
1384
|
+
return {
|
|
1385
|
+
isMatch: n,
|
|
1386
|
+
score: +!n,
|
|
1387
|
+
indices: [0, t.length - 1]
|
|
1388
|
+
};
|
|
1389
|
+
}
|
|
1390
|
+
})
|
|
1391
|
+
},
|
|
1392
|
+
{
|
|
1393
|
+
type: "fuzzy",
|
|
1394
|
+
multiRegex: /^"(.*)"$/,
|
|
1395
|
+
singleRegex: /^(.*)$/,
|
|
1396
|
+
create: (e, t = {}) => {
|
|
1397
|
+
let n = new Zn(e, {
|
|
1398
|
+
location: t.location ?? q.location,
|
|
1399
|
+
threshold: t.threshold ?? q.threshold,
|
|
1400
|
+
distance: t.distance ?? q.distance,
|
|
1401
|
+
includeMatches: t.includeMatches ?? q.includeMatches,
|
|
1402
|
+
findAllMatches: t.findAllMatches ?? q.findAllMatches,
|
|
1403
|
+
minMatchCharLength: t.minMatchCharLength ?? q.minMatchCharLength,
|
|
1404
|
+
isCaseSensitive: t.isCaseSensitive ?? q.isCaseSensitive,
|
|
1405
|
+
ignoreDiacritics: t.ignoreDiacritics ?? q.ignoreDiacritics,
|
|
1406
|
+
ignoreLocation: t.ignoreLocation ?? q.ignoreLocation
|
|
1407
|
+
});
|
|
1408
|
+
return {
|
|
1409
|
+
type: "fuzzy",
|
|
1410
|
+
search(e) {
|
|
1411
|
+
return n.searchIn(e);
|
|
1412
|
+
}
|
|
1413
|
+
};
|
|
1414
|
+
}
|
|
1415
|
+
}
|
|
1416
|
+
], tr = er.length, nr = "\0", rr = "|";
|
|
1417
|
+
function ir(e) {
|
|
1418
|
+
let t = [], n = e.length, r = 0;
|
|
1419
|
+
for (; r < n;) {
|
|
1420
|
+
for (; r < n && e[r] === " ";) r++;
|
|
1421
|
+
if (r >= n) break;
|
|
1422
|
+
let i = r;
|
|
1423
|
+
for (; i < n && e[i] !== " " && e[i] !== "\"";) i++;
|
|
1424
|
+
if (i < n && e[i] === "\"") {
|
|
1425
|
+
for (i++; i < n;) {
|
|
1426
|
+
if (e[i] === "\"") {
|
|
1427
|
+
let t = i + 1;
|
|
1428
|
+
if (t >= n || e[t] === " ") {
|
|
1429
|
+
i++;
|
|
1430
|
+
break;
|
|
1431
|
+
}
|
|
1432
|
+
if (e[t] === "$" && (t + 1 >= n || e[t + 1] === " ")) {
|
|
1433
|
+
i += 2;
|
|
1434
|
+
break;
|
|
1435
|
+
}
|
|
1436
|
+
}
|
|
1437
|
+
i++;
|
|
1438
|
+
}
|
|
1439
|
+
t.push(e.substring(r, i)), r = i;
|
|
1440
|
+
} else {
|
|
1441
|
+
for (; i < n && e[i] !== " ";) i++;
|
|
1442
|
+
t.push(e.substring(r, i)), r = i;
|
|
1443
|
+
}
|
|
1444
|
+
}
|
|
1445
|
+
return t;
|
|
1446
|
+
}
|
|
1447
|
+
function ar(e, t) {
|
|
1448
|
+
let n = e.match(t);
|
|
1449
|
+
return n ? n[1] : null;
|
|
1450
|
+
}
|
|
1451
|
+
function or(e, t = {}) {
|
|
1452
|
+
return e.replace(/\\\|/g, nr).split(rr).map((e) => {
|
|
1453
|
+
let n = ir(e.replace(/\u0000/g, "|").trim()).filter((e) => e && !!e.trim()), r = [];
|
|
1454
|
+
for (let e = 0, i = n.length; e < i; e += 1) {
|
|
1455
|
+
let i = n[e], a = !1, o = -1;
|
|
1456
|
+
for (; !a && ++o < tr;) {
|
|
1457
|
+
let e = er[o], n = ar(i, e.multiRegex);
|
|
1458
|
+
n && (r.push(e.create(n, t)), a = !0);
|
|
1459
|
+
}
|
|
1460
|
+
if (!a) for (o = -1; ++o < tr;) {
|
|
1461
|
+
let e = er[o], n = ar(i, e.singleRegex);
|
|
1462
|
+
if (n) {
|
|
1463
|
+
r.push(e.create(n, t));
|
|
1464
|
+
break;
|
|
1465
|
+
}
|
|
1466
|
+
}
|
|
1467
|
+
}
|
|
1468
|
+
return r;
|
|
1469
|
+
});
|
|
1470
|
+
}
|
|
1471
|
+
var sr = class {
|
|
1472
|
+
constructor(e, { isCaseSensitive: t = q.isCaseSensitive, ignoreDiacritics: n = q.ignoreDiacritics, includeMatches: r = q.includeMatches, minMatchCharLength: i = q.minMatchCharLength, ignoreLocation: a = q.ignoreLocation, findAllMatches: o = q.findAllMatches, location: s = q.location, threshold: c = q.threshold, distance: l = q.distance } = {}) {
|
|
1473
|
+
this.query = null, this.options = {
|
|
1474
|
+
isCaseSensitive: t,
|
|
1475
|
+
ignoreDiacritics: n,
|
|
1476
|
+
includeMatches: r,
|
|
1477
|
+
minMatchCharLength: i,
|
|
1478
|
+
findAllMatches: o,
|
|
1479
|
+
ignoreLocation: a,
|
|
1480
|
+
location: s,
|
|
1481
|
+
threshold: c,
|
|
1482
|
+
distance: l
|
|
1483
|
+
}, e = t ? e : e.toLowerCase(), e = n ? Xn(e) : e, this.pattern = e, this.query = or(this.pattern, this.options);
|
|
1484
|
+
}
|
|
1485
|
+
static condition(e, t) {
|
|
1486
|
+
return t.useExtendedSearch;
|
|
1487
|
+
}
|
|
1488
|
+
searchIn(e) {
|
|
1489
|
+
let t = this.query;
|
|
1490
|
+
if (!t) return {
|
|
1491
|
+
isMatch: !1,
|
|
1492
|
+
score: 1
|
|
1493
|
+
};
|
|
1494
|
+
let { includeMatches: n, isCaseSensitive: r, ignoreDiacritics: i } = this.options;
|
|
1495
|
+
e = r ? e : e.toLowerCase(), e = i ? Xn(e) : e;
|
|
1496
|
+
let a = 0, o = [], s = 0, c = !1;
|
|
1497
|
+
for (let r = 0, i = t.length; r < i; r += 1) {
|
|
1498
|
+
let i = t[r];
|
|
1499
|
+
o.length = 0, a = 0, c = !1;
|
|
1500
|
+
for (let t = 0, r = i.length; t < r; t += 1) {
|
|
1501
|
+
let r = i[t], { isMatch: l, indices: u, score: d } = r.search(e);
|
|
1502
|
+
if (l) a += 1, s += d, $n(r.type) && (c = !0), n && (Qn.has(r.type) ? o.push(...u) : o.push(u));
|
|
1503
|
+
else {
|
|
1504
|
+
s = 0, a = 0, o.length = 0, c = !1;
|
|
1505
|
+
break;
|
|
1506
|
+
}
|
|
1507
|
+
}
|
|
1508
|
+
if (a) {
|
|
1509
|
+
let e = {
|
|
1510
|
+
isMatch: !0,
|
|
1511
|
+
score: s / a
|
|
1512
|
+
};
|
|
1513
|
+
return c && (e.hasInverse = !0), n && (e.indices = qn(o)), e;
|
|
1514
|
+
}
|
|
1515
|
+
}
|
|
1516
|
+
return {
|
|
1517
|
+
isMatch: !1,
|
|
1518
|
+
score: 1
|
|
1519
|
+
};
|
|
1520
|
+
}
|
|
1521
|
+
}, cr = [];
|
|
1522
|
+
function lr(...e) {
|
|
1523
|
+
cr.push(...e);
|
|
1524
|
+
}
|
|
1525
|
+
function ur(e, t) {
|
|
1526
|
+
for (let n = 0, r = cr.length; n < r; n += 1) {
|
|
1527
|
+
let r = cr[n];
|
|
1528
|
+
if (r.condition(e, t)) return new r(e, t);
|
|
1529
|
+
}
|
|
1530
|
+
return new Zn(e, t);
|
|
1531
|
+
}
|
|
1532
|
+
var dr = {
|
|
1533
|
+
AND: "$and",
|
|
1534
|
+
OR: "$or"
|
|
1535
|
+
}, fr = {
|
|
1536
|
+
PATH: "$path",
|
|
1537
|
+
PATTERN: "$val"
|
|
1538
|
+
}, pr = (e) => !!(e[dr.AND] || e[dr.OR]), mr = (e) => !!e[fr.PATH], hr = (e) => !W(e) && vn(e) && !pr(e), gr = (e) => ({ [dr.AND]: Object.keys(e).map((t) => ({ [t]: e[t] })) });
|
|
1539
|
+
function _r(e, t, { auto: n = !0 } = {}) {
|
|
1540
|
+
let r = (e) => {
|
|
1541
|
+
if (G(e)) {
|
|
1542
|
+
let r = {
|
|
1543
|
+
keyId: null,
|
|
1544
|
+
pattern: e
|
|
1545
|
+
};
|
|
1546
|
+
return n && (r.searcher = ur(e, t)), r;
|
|
1547
|
+
}
|
|
1548
|
+
let i = Object.keys(e), a = mr(e);
|
|
1549
|
+
if (!a && i.length > 1 && !pr(e)) return r(gr(e));
|
|
1550
|
+
if (hr(e)) {
|
|
1551
|
+
let r = a ? e[fr.PATH] : i[0], o = a ? e[fr.PATTERN] : e[r];
|
|
1552
|
+
if (!G(o)) throw Error(wn(r));
|
|
1553
|
+
let s = {
|
|
1554
|
+
keyId: Nn(r),
|
|
1555
|
+
pattern: o
|
|
1556
|
+
};
|
|
1557
|
+
return n && (s.searcher = ur(o, t)), s;
|
|
1558
|
+
}
|
|
1559
|
+
let o = {
|
|
1560
|
+
children: [],
|
|
1561
|
+
operator: i[0]
|
|
1562
|
+
};
|
|
1563
|
+
return i.forEach((t) => {
|
|
1564
|
+
let n = e[t];
|
|
1565
|
+
W(n) && n.forEach((e) => {
|
|
1566
|
+
o.children.push(r(e));
|
|
1567
|
+
});
|
|
1568
|
+
}), o;
|
|
1569
|
+
};
|
|
1570
|
+
return pr(e) || (e = gr(e)), r(e);
|
|
1571
|
+
}
|
|
1572
|
+
function vr(e, { ignoreFieldNorm: t = q.ignoreFieldNorm }) {
|
|
1573
|
+
let n = 1;
|
|
1574
|
+
return e.forEach(({ key: e, norm: r, score: i }) => {
|
|
1575
|
+
let a = e ? e.weight : null;
|
|
1576
|
+
n *= (i === 0 && a ? 2 ** -52 : i) ** +((a || 1) * (t ? 1 : r));
|
|
1577
|
+
}), n;
|
|
1578
|
+
}
|
|
1579
|
+
function yr(e, { ignoreFieldNorm: t = q.ignoreFieldNorm }) {
|
|
1580
|
+
e.forEach((e) => {
|
|
1581
|
+
e.score = vr(e.matches, { ignoreFieldNorm: t });
|
|
1582
|
+
});
|
|
1583
|
+
}
|
|
1584
|
+
var br = class {
|
|
1585
|
+
constructor(e, t) {
|
|
1586
|
+
this.limit = e, this.heap = [], this.comparator = t;
|
|
1587
|
+
}
|
|
1588
|
+
get size() {
|
|
1589
|
+
return this.heap.length;
|
|
1590
|
+
}
|
|
1591
|
+
insert(e) {
|
|
1592
|
+
this.size < this.limit ? (this.heap.push(e), this._bubbleUp(this.size - 1)) : this.comparator(e, this.heap[0]) < 0 && (this.heap[0] = e, this._sinkDown(0));
|
|
1593
|
+
}
|
|
1594
|
+
extractSorted() {
|
|
1595
|
+
return this.heap.sort(this.comparator);
|
|
1596
|
+
}
|
|
1597
|
+
_bubbleUp(e) {
|
|
1598
|
+
let t = this.heap;
|
|
1599
|
+
for (; e > 0;) {
|
|
1600
|
+
let n = e - 1 >> 1;
|
|
1601
|
+
if (this.comparator(t[e], t[n]) <= 0) break;
|
|
1602
|
+
let r = t[e];
|
|
1603
|
+
t[e] = t[n], t[n] = r, e = n;
|
|
1604
|
+
}
|
|
1605
|
+
}
|
|
1606
|
+
_sinkDown(e) {
|
|
1607
|
+
let t = this.heap, n = t.length, r = e;
|
|
1608
|
+
do {
|
|
1609
|
+
e = r;
|
|
1610
|
+
let i = 2 * e + 1, a = 2 * e + 2;
|
|
1611
|
+
if (i < n && this.comparator(t[i], t[r]) > 0 && (r = i), a < n && this.comparator(t[a], t[r]) > 0 && (r = a), r !== e) {
|
|
1612
|
+
let n = t[e];
|
|
1613
|
+
t[e] = t[r], t[r] = n;
|
|
1614
|
+
}
|
|
1615
|
+
} while (r !== e);
|
|
1616
|
+
}
|
|
1617
|
+
};
|
|
1618
|
+
function xr(e) {
|
|
1619
|
+
let t = [];
|
|
1620
|
+
return e.matches.forEach((e) => {
|
|
1621
|
+
if (!K(e.indices) || !e.indices.length) return;
|
|
1622
|
+
let n = {
|
|
1623
|
+
indices: e.indices,
|
|
1624
|
+
value: e.value
|
|
1625
|
+
};
|
|
1626
|
+
e.key && (n.key = e.key.id), e.idx > -1 && (n.refIndex = e.idx), t.push(n);
|
|
1627
|
+
}), t;
|
|
1628
|
+
}
|
|
1629
|
+
function Sr(e, t, { includeMatches: n = q.includeMatches, includeScore: r = q.includeScore } = {}) {
|
|
1630
|
+
return e.map((e) => {
|
|
1631
|
+
let { idx: i } = e, a = {
|
|
1632
|
+
item: t[i],
|
|
1633
|
+
refIndex: i
|
|
1634
|
+
};
|
|
1635
|
+
return n && (a.matches = xr(e)), r && (a.score = e.score), a;
|
|
1636
|
+
});
|
|
1637
|
+
}
|
|
1638
|
+
var Cr = /[\p{L}\p{M}\p{N}_]+/gu, wr = /* @__PURE__ */ new WeakSet();
|
|
1639
|
+
function Tr(e) {
|
|
1640
|
+
wr.has(e) || (wr.add(e), console.warn(`[Fuse] tokenize regex ${e} lacks the global flag; only the first match per text will be returned. Add the 'g' flag.`));
|
|
1641
|
+
}
|
|
1642
|
+
function Er(e) {
|
|
1643
|
+
if (typeof e == "function") {
|
|
1644
|
+
let t = !1;
|
|
1645
|
+
return (n) => {
|
|
1646
|
+
let r = e(n);
|
|
1647
|
+
if (!t && (t = !0, !Array.isArray(r) || r.some((e) => typeof e != "string"))) throw Error(`[Fuse] tokenize function must return string[]; received ${Array.isArray(r) ? "array containing non-strings" : typeof r}.`);
|
|
1648
|
+
return r;
|
|
1649
|
+
};
|
|
1650
|
+
}
|
|
1651
|
+
return e instanceof RegExp ? (e.global || Tr(e), (t) => t.match(e) || []) : (e) => e.match(Cr) || [];
|
|
1652
|
+
}
|
|
1653
|
+
function Dr({ isCaseSensitive: e = !1, ignoreDiacritics: t = !1, tokenize: n } = {}) {
|
|
1654
|
+
let r = Er(n);
|
|
1655
|
+
return { tokenize(n) {
|
|
1656
|
+
return e || (n = n.toLowerCase()), t && (n = Xn(n)), r(n);
|
|
1657
|
+
} };
|
|
1658
|
+
}
|
|
1659
|
+
var Or = class {
|
|
1660
|
+
static condition(e, t) {
|
|
1661
|
+
return t.useTokenSearch;
|
|
1662
|
+
}
|
|
1663
|
+
constructor(e, t) {
|
|
1664
|
+
this.options = t, this.analyzer = Dr({
|
|
1665
|
+
isCaseSensitive: t.isCaseSensitive,
|
|
1666
|
+
ignoreDiacritics: t.ignoreDiacritics,
|
|
1667
|
+
tokenize: t.tokenize
|
|
1668
|
+
});
|
|
1669
|
+
let n = this.analyzer.tokenize(e), { df: r, fieldCount: i } = t._invertedIndex;
|
|
1670
|
+
this.termSearchers = [], this.idfWeights = [];
|
|
1671
|
+
for (let e of n) {
|
|
1672
|
+
this.termSearchers.push(new Zn(e, {
|
|
1673
|
+
location: t.location,
|
|
1674
|
+
threshold: t.threshold,
|
|
1675
|
+
distance: t.distance,
|
|
1676
|
+
includeMatches: t.includeMatches,
|
|
1677
|
+
findAllMatches: t.findAllMatches,
|
|
1678
|
+
minMatchCharLength: t.minMatchCharLength,
|
|
1679
|
+
isCaseSensitive: t.isCaseSensitive,
|
|
1680
|
+
ignoreDiacritics: t.ignoreDiacritics,
|
|
1681
|
+
ignoreLocation: !0
|
|
1682
|
+
}));
|
|
1683
|
+
let n = r.get(e) || 0, a = Math.log(1 + (i - n + .5) / (n + .5));
|
|
1684
|
+
this.idfWeights.push(a);
|
|
1685
|
+
}
|
|
1686
|
+
this.combineAll = t.tokenMatch === "all", this.numTerms = this.termSearchers.length, this.useMask = this.numTerms <= 31;
|
|
1687
|
+
}
|
|
1688
|
+
searchIn(e) {
|
|
1689
|
+
if (!this.termSearchers.length) return {
|
|
1690
|
+
isMatch: !1,
|
|
1691
|
+
score: 1
|
|
1692
|
+
};
|
|
1693
|
+
let t = [], n = 0, r = 0, i = 0, a = 0, o = this.combineAll && !this.useMask ? /* @__PURE__ */ new Set() : null;
|
|
1694
|
+
for (let s = 0; s < this.termSearchers.length; s++) {
|
|
1695
|
+
let c = this.termSearchers[s].searchIn(e), l = this.idfWeights[s];
|
|
1696
|
+
r += l, c.isMatch && (i++, n += l * (1 - c.score), c.indices && t.push(...c.indices), this.combineAll && (this.useMask ? a |= 1 << s : o.add(s)));
|
|
1697
|
+
}
|
|
1698
|
+
if (i === 0) return {
|
|
1699
|
+
isMatch: !1,
|
|
1700
|
+
score: 1
|
|
1701
|
+
};
|
|
1702
|
+
let s = r > 0 ? 1 - n / r : 0, c = {
|
|
1703
|
+
isMatch: !0,
|
|
1704
|
+
score: Math.max(.001, s)
|
|
1705
|
+
};
|
|
1706
|
+
return this.options.includeMatches && t.length && (c.indices = qn(t)), this.combineAll && (this.useMask ? c.matchedMask = a : c.matchedTerms = o, c.termCount = this.numTerms), c;
|
|
1707
|
+
}
|
|
1708
|
+
};
|
|
1709
|
+
function kr(e, t, n, r) {
|
|
1710
|
+
let i = r.tokenize(t);
|
|
1711
|
+
if (!i.length) return;
|
|
1712
|
+
e.fieldCount++, e.docFieldCount.set(n, (e.docFieldCount.get(n) || 0) + 1);
|
|
1713
|
+
let a = new Set(i), o = e.docTermFieldHits.get(n);
|
|
1714
|
+
o || (o = /* @__PURE__ */ new Map(), e.docTermFieldHits.set(n, o));
|
|
1715
|
+
for (let t of a) o.set(t, (o.get(t) || 0) + 1), e.df.set(t, (e.df.get(t) || 0) + 1);
|
|
1716
|
+
}
|
|
1717
|
+
function Ar(e, t, n, r) {
|
|
1718
|
+
let { i, v: a, $: o } = t;
|
|
1719
|
+
if (a !== void 0) {
|
|
1720
|
+
kr(e, a, i, r);
|
|
1721
|
+
return;
|
|
1722
|
+
}
|
|
1723
|
+
if (o) for (let t = 0; t < n; t++) {
|
|
1724
|
+
let n = o[t];
|
|
1725
|
+
if (n) if (Array.isArray(n)) for (let t of n) kr(e, t.v, i, r);
|
|
1726
|
+
else kr(e, n.v, i, r);
|
|
1727
|
+
}
|
|
1728
|
+
}
|
|
1729
|
+
function jr(e, t, n) {
|
|
1730
|
+
let r = {
|
|
1731
|
+
fieldCount: 0,
|
|
1732
|
+
df: /* @__PURE__ */ new Map(),
|
|
1733
|
+
docFieldCount: /* @__PURE__ */ new Map(),
|
|
1734
|
+
docTermFieldHits: /* @__PURE__ */ new Map()
|
|
1735
|
+
};
|
|
1736
|
+
for (let i of e) Ar(r, i, t, n);
|
|
1737
|
+
return r;
|
|
1738
|
+
}
|
|
1739
|
+
function Mr(e, t, n, r) {
|
|
1740
|
+
Ar(e, t, n, r);
|
|
1741
|
+
}
|
|
1742
|
+
function Nr(e, t) {
|
|
1743
|
+
let n = e.docFieldCount.get(t);
|
|
1744
|
+
if (n === void 0) return;
|
|
1745
|
+
e.fieldCount -= n, e.docFieldCount.delete(t);
|
|
1746
|
+
let r = e.docTermFieldHits.get(t);
|
|
1747
|
+
if (r) {
|
|
1748
|
+
for (let [t, n] of r) {
|
|
1749
|
+
let r = (e.df.get(t) || 0) - n;
|
|
1750
|
+
r <= 0 ? e.df.delete(t) : e.df.set(t, r);
|
|
1751
|
+
}
|
|
1752
|
+
e.docTermFieldHits.delete(t);
|
|
1753
|
+
}
|
|
1754
|
+
}
|
|
1755
|
+
function Pr(e, t) {
|
|
1756
|
+
if (t.length === 0) return;
|
|
1757
|
+
let n = Array.from(new Set(t)).sort((e, t) => e - t);
|
|
1758
|
+
for (let t of n) Nr(e, t);
|
|
1759
|
+
let r = (e) => {
|
|
1760
|
+
let t = 0, r = n.length;
|
|
1761
|
+
for (; t < r;) {
|
|
1762
|
+
let i = t + r >>> 1;
|
|
1763
|
+
n[i] < e ? t = i + 1 : r = i;
|
|
1764
|
+
}
|
|
1765
|
+
return e - t;
|
|
1766
|
+
}, i = n[0], a = /* @__PURE__ */ new Map();
|
|
1767
|
+
for (let [t, n] of e.docFieldCount) a.set(t > i ? r(t) : t, n);
|
|
1768
|
+
e.docFieldCount = a;
|
|
1769
|
+
let o = /* @__PURE__ */ new Map();
|
|
1770
|
+
for (let [t, n] of e.docTermFieldHits) o.set(t > i ? r(t) : t, n);
|
|
1771
|
+
e.docTermFieldHits = o;
|
|
1772
|
+
}
|
|
1773
|
+
var J = class {
|
|
1774
|
+
constructor(e, t, n) {
|
|
1775
|
+
this.options = {
|
|
1776
|
+
...q,
|
|
1777
|
+
...t
|
|
1778
|
+
}, this.options.useExtendedSearch, this.options.useTokenSearch, this._keyStore = new An(this.options.keys), this._docs = e, this._myIndex = null, this._invertedIndex = null, this.setCollection(e, n), this._lastQuery = null, this._lastSearcher = null;
|
|
1779
|
+
}
|
|
1780
|
+
_getSearcher(e) {
|
|
1781
|
+
if (this._lastQuery === e) return this._lastSearcher;
|
|
1782
|
+
let t = ur(e, this._invertedIndex ? {
|
|
1783
|
+
...this.options,
|
|
1784
|
+
_invertedIndex: this._invertedIndex
|
|
1785
|
+
} : this.options);
|
|
1786
|
+
return this._lastQuery = e, this._lastSearcher = t, t;
|
|
1787
|
+
}
|
|
1788
|
+
setCollection(e, t) {
|
|
1789
|
+
if (this._docs = e, t && !(t instanceof Vn)) throw Error(Sn);
|
|
1790
|
+
if (this._myIndex = t || Hn(this.options.keys, this._docs, {
|
|
1791
|
+
getFn: this.options.getFn,
|
|
1792
|
+
fieldNormWeight: this.options.fieldNormWeight
|
|
1793
|
+
}), this.options.useTokenSearch) {
|
|
1794
|
+
let e = Dr({
|
|
1795
|
+
isCaseSensitive: this.options.isCaseSensitive,
|
|
1796
|
+
ignoreDiacritics: this.options.ignoreDiacritics,
|
|
1797
|
+
tokenize: this.options.tokenize
|
|
1798
|
+
});
|
|
1799
|
+
this._invertedIndex = jr(this._myIndex.records, this._myIndex.keys.length, e);
|
|
1800
|
+
}
|
|
1801
|
+
this._invalidateSearcherCache();
|
|
1802
|
+
}
|
|
1803
|
+
add(e) {
|
|
1804
|
+
if (!K(e)) return;
|
|
1805
|
+
this._docs.push(e);
|
|
1806
|
+
let t = this._myIndex.add(e, this._docs.length - 1);
|
|
1807
|
+
if (this._invertedIndex && t) {
|
|
1808
|
+
let e = Dr({
|
|
1809
|
+
isCaseSensitive: this.options.isCaseSensitive,
|
|
1810
|
+
ignoreDiacritics: this.options.ignoreDiacritics,
|
|
1811
|
+
tokenize: this.options.tokenize
|
|
1812
|
+
});
|
|
1813
|
+
Mr(this._invertedIndex, t, this._myIndex.keys.length, e);
|
|
1814
|
+
}
|
|
1815
|
+
this._invalidateSearcherCache();
|
|
1816
|
+
}
|
|
1817
|
+
remove(e = () => !1) {
|
|
1818
|
+
let t = [], n = [];
|
|
1819
|
+
for (let r = 0, i = this._docs.length; r < i; r += 1) e(this._docs[r], r) && (t.push(this._docs[r]), n.push(r));
|
|
1820
|
+
if (n.length) {
|
|
1821
|
+
this._invertedIndex && Pr(this._invertedIndex, n);
|
|
1822
|
+
let e = new Set(n);
|
|
1823
|
+
this._docs = this._docs.filter((t, n) => !e.has(n)), this._myIndex.removeAll(n), this._invalidateSearcherCache();
|
|
1824
|
+
}
|
|
1825
|
+
return t;
|
|
1826
|
+
}
|
|
1827
|
+
removeAt(e) {
|
|
1828
|
+
if (!Number.isInteger(e) || e < 0 || e >= this._docs.length) throw Error(Cn);
|
|
1829
|
+
this._invertedIndex && Pr(this._invertedIndex, [e]);
|
|
1830
|
+
let t = this._docs.splice(e, 1)[0];
|
|
1831
|
+
return this._myIndex.removeAt(e), this._invalidateSearcherCache(), t;
|
|
1832
|
+
}
|
|
1833
|
+
_invalidateSearcherCache() {
|
|
1834
|
+
this._lastQuery = null, this._lastSearcher = null;
|
|
1835
|
+
}
|
|
1836
|
+
getIndex() {
|
|
1837
|
+
return this._myIndex;
|
|
1838
|
+
}
|
|
1839
|
+
_normalizedKeys() {
|
|
1840
|
+
return this._myIndex.keys.map((e) => this._keyStore.get(e.id) || e);
|
|
1841
|
+
}
|
|
1842
|
+
search(e, t) {
|
|
1843
|
+
let { limit: n = -1 } = t || {}, { includeMatches: r, includeScore: i, shouldSort: a, sortFn: o, ignoreFieldNorm: s } = this.options;
|
|
1844
|
+
if (G(e) && !e.trim()) {
|
|
1845
|
+
let e = this._docs.map((e, t) => ({
|
|
1846
|
+
item: e,
|
|
1847
|
+
refIndex: t
|
|
1848
|
+
}));
|
|
1849
|
+
return gn(n) && n > -1 && (e = e.slice(0, n)), e;
|
|
1850
|
+
}
|
|
1851
|
+
let c = a && gn(n) && n > 0 && G(e), l = o, u = (e, t) => l(e, t) || e.idx - t.idx, d;
|
|
1852
|
+
if (c) {
|
|
1853
|
+
let t = new br(n, u);
|
|
1854
|
+
G(this._docs[0]) ? this._searchStringList(e, {
|
|
1855
|
+
heap: t,
|
|
1856
|
+
ignoreFieldNorm: s
|
|
1857
|
+
}) : this._searchObjectList(e, {
|
|
1858
|
+
heap: t,
|
|
1859
|
+
ignoreFieldNorm: s
|
|
1860
|
+
}), d = t.extractSorted();
|
|
1861
|
+
} else d = G(e) ? G(this._docs[0]) ? this._searchStringList(e) : this._searchObjectList(e) : this._searchLogical(e), yr(d, { ignoreFieldNorm: s }), a && d.sort(G(e) ? u : l), gn(n) && n > -1 && (d = d.slice(0, n));
|
|
1862
|
+
return Sr(d, this._docs, {
|
|
1863
|
+
includeMatches: r,
|
|
1864
|
+
includeScore: i
|
|
1865
|
+
});
|
|
1866
|
+
}
|
|
1867
|
+
_searchStringList(e, { heap: t, ignoreFieldNorm: n } = {}) {
|
|
1868
|
+
let r = this._getSearcher(e), i = this.options.useTokenSearch && this.options.tokenMatch === "all", { records: a } = this._myIndex, o = t ? null : [];
|
|
1869
|
+
return a.forEach(({ v: e, i: a, n: s }) => {
|
|
1870
|
+
if (!K(e)) return;
|
|
1871
|
+
let c = r.searchIn(e);
|
|
1872
|
+
if (c.isMatch) {
|
|
1873
|
+
let r = {
|
|
1874
|
+
score: c.score,
|
|
1875
|
+
value: e,
|
|
1876
|
+
norm: s,
|
|
1877
|
+
indices: c.indices
|
|
1878
|
+
};
|
|
1879
|
+
i && (r.matchedMask = c.matchedMask, r.matchedTerms = c.matchedTerms, r.termCount = c.termCount);
|
|
1880
|
+
let l = [r];
|
|
1881
|
+
if (!i || this._coversAllTokens(l)) {
|
|
1882
|
+
let r = {
|
|
1883
|
+
item: e,
|
|
1884
|
+
idx: a,
|
|
1885
|
+
matches: l
|
|
1886
|
+
};
|
|
1887
|
+
t ? (r.score = vr(r.matches, { ignoreFieldNorm: n }), t.insert(r)) : o.push(r);
|
|
1888
|
+
}
|
|
1889
|
+
}
|
|
1890
|
+
}), o;
|
|
1891
|
+
}
|
|
1892
|
+
_searchLogical(e) {
|
|
1893
|
+
let t = _r(e, this.options), n = this._normalizedKeys(), r = (e, t, i) => {
|
|
1894
|
+
if (!("children" in e)) {
|
|
1895
|
+
let { keyId: r, searcher: a } = e, o;
|
|
1896
|
+
return r === null ? (o = [], n.forEach((e, n) => {
|
|
1897
|
+
o.push(...this._findMatches({
|
|
1898
|
+
key: e,
|
|
1899
|
+
value: t[n],
|
|
1900
|
+
searcher: a
|
|
1901
|
+
}));
|
|
1902
|
+
})) : o = this._findMatches({
|
|
1903
|
+
key: this._keyStore.get(r),
|
|
1904
|
+
value: this._myIndex.getValueForItemAtKeyId(t, r),
|
|
1905
|
+
searcher: a
|
|
1906
|
+
}), o && o.length ? [{
|
|
1907
|
+
idx: i,
|
|
1908
|
+
item: t,
|
|
1909
|
+
matches: o
|
|
1910
|
+
}] : [];
|
|
1911
|
+
}
|
|
1912
|
+
let { children: a, operator: o } = e, s = [];
|
|
1913
|
+
for (let e = 0, n = a.length; e < n; e += 1) {
|
|
1914
|
+
let n = a[e], c = r(n, t, i);
|
|
1915
|
+
if (c.length) s.push(...c);
|
|
1916
|
+
else if (o === dr.AND) return [];
|
|
1917
|
+
}
|
|
1918
|
+
return s;
|
|
1919
|
+
}, i = this._myIndex.records, a = /* @__PURE__ */ new Map(), o = [];
|
|
1920
|
+
return i.forEach(({ $: e, i: n }) => {
|
|
1921
|
+
if (K(e)) {
|
|
1922
|
+
let i = r(t, e, n);
|
|
1923
|
+
i.length && (a.has(n) || (a.set(n, {
|
|
1924
|
+
idx: n,
|
|
1925
|
+
item: e,
|
|
1926
|
+
matches: []
|
|
1927
|
+
}), o.push(a.get(n))), i.forEach(({ matches: e }) => {
|
|
1928
|
+
a.get(n).matches.push(...e);
|
|
1929
|
+
}));
|
|
1930
|
+
}
|
|
1931
|
+
}), o;
|
|
1932
|
+
}
|
|
1933
|
+
_searchObjectList(e, { heap: t, ignoreFieldNorm: n } = {}) {
|
|
1934
|
+
let r = this._getSearcher(e), i = this.options.useTokenSearch && this.options.tokenMatch === "all", { records: a } = this._myIndex, o = this._normalizedKeys(), s = t ? null : [];
|
|
1935
|
+
return a.forEach(({ $: e, i: a }) => {
|
|
1936
|
+
if (!K(e)) return;
|
|
1937
|
+
let c = [], l = !1, u = !1;
|
|
1938
|
+
if (o.forEach((t, n) => {
|
|
1939
|
+
let i = this._findMatches({
|
|
1940
|
+
key: t,
|
|
1941
|
+
value: e[n],
|
|
1942
|
+
searcher: r
|
|
1943
|
+
});
|
|
1944
|
+
i.length ? (c.push(...i), i[0].hasInverse && (u = !0)) : l = !0;
|
|
1945
|
+
}), !(u && l) && c.length && (!i || this._coversAllTokens(c))) {
|
|
1946
|
+
let r = {
|
|
1947
|
+
idx: a,
|
|
1948
|
+
item: e,
|
|
1949
|
+
matches: c
|
|
1950
|
+
};
|
|
1951
|
+
t ? (r.score = vr(r.matches, { ignoreFieldNorm: n }), t.insert(r)) : s.push(r);
|
|
1952
|
+
}
|
|
1953
|
+
}), s;
|
|
1954
|
+
}
|
|
1955
|
+
_findMatches({ key: e, value: t, searcher: n }) {
|
|
1956
|
+
if (!K(t)) return [];
|
|
1957
|
+
let r = [];
|
|
1958
|
+
if (W(t)) t.forEach(({ v: t, i, n: a }) => {
|
|
1959
|
+
if (!K(t)) return;
|
|
1960
|
+
let o = n.searchIn(t);
|
|
1961
|
+
if (o.isMatch) {
|
|
1962
|
+
let n = {
|
|
1963
|
+
score: o.score,
|
|
1964
|
+
key: e,
|
|
1965
|
+
value: t,
|
|
1966
|
+
idx: i,
|
|
1967
|
+
norm: a,
|
|
1968
|
+
indices: o.indices,
|
|
1969
|
+
hasInverse: o.hasInverse
|
|
1970
|
+
};
|
|
1971
|
+
o.termCount !== void 0 && (n.matchedMask = o.matchedMask, n.matchedTerms = o.matchedTerms, n.termCount = o.termCount), r.push(n);
|
|
1972
|
+
}
|
|
1973
|
+
});
|
|
1974
|
+
else {
|
|
1975
|
+
let { v: i, n: a } = t, o = n.searchIn(i);
|
|
1976
|
+
if (o.isMatch) {
|
|
1977
|
+
let t = {
|
|
1978
|
+
score: o.score,
|
|
1979
|
+
key: e,
|
|
1980
|
+
value: i,
|
|
1981
|
+
norm: a,
|
|
1982
|
+
indices: o.indices,
|
|
1983
|
+
hasInverse: o.hasInverse
|
|
1984
|
+
};
|
|
1985
|
+
o.termCount !== void 0 && (t.matchedMask = o.matchedMask, t.matchedTerms = o.matchedTerms, t.termCount = o.termCount), r.push(t);
|
|
1986
|
+
}
|
|
1987
|
+
}
|
|
1988
|
+
return r;
|
|
1989
|
+
}
|
|
1990
|
+
_coversAllTokens(e) {
|
|
1991
|
+
let t = e.length ? e[0].termCount : void 0;
|
|
1992
|
+
if (t === void 0) return !0;
|
|
1993
|
+
if (t <= 31) {
|
|
1994
|
+
let n = 0;
|
|
1995
|
+
for (let t = 0; t < e.length; t++) n |= e[t].matchedMask || 0;
|
|
1996
|
+
return n === 2 ** t - 1;
|
|
1997
|
+
}
|
|
1998
|
+
let n = /* @__PURE__ */ new Set();
|
|
1999
|
+
for (let t = 0; t < e.length; t++) {
|
|
2000
|
+
let r = e[t].matchedTerms;
|
|
2001
|
+
if (r) for (let e of r) n.add(e);
|
|
2002
|
+
}
|
|
2003
|
+
return n.size === t;
|
|
2004
|
+
}
|
|
2005
|
+
};
|
|
2006
|
+
J.version = "7.5.0", J.createIndex = Hn, J.parseIndex = Un, J.config = q, J.match = function(e, t, n) {
|
|
2007
|
+
if (n && n.useTokenSearch) throw Error(On);
|
|
2008
|
+
return ur(e, {
|
|
2009
|
+
...q,
|
|
2010
|
+
...n
|
|
2011
|
+
}).searchIn(t);
|
|
2012
|
+
}, J.parseQuery = _r, lr(sr), lr(Or), J.use = function(...e) {
|
|
2013
|
+
e.forEach((e) => lr(e));
|
|
2014
|
+
};
|
|
2015
|
+
var Fr = J, Ir = (e, n, r) => t(() => {
|
|
2016
|
+
let t = S(e), i = S(n);
|
|
2017
|
+
if (!t) return i;
|
|
2018
|
+
let a = new Fr([...i], {
|
|
2019
|
+
threshold: .4,
|
|
2020
|
+
keys: r
|
|
2021
|
+
});
|
|
2022
|
+
return t ? a.search(t, { limit: 3 }).map((e) => e.item) : i;
|
|
2023
|
+
}), Lr = () => {
|
|
2024
|
+
let e = y(/* @__PURE__ */ new Map());
|
|
516
2025
|
return {
|
|
517
2026
|
set(t, n) {
|
|
518
2027
|
n ? e.value.set(t, n) : e.value.delete(t);
|
|
@@ -521,107 +2030,114 @@ var bt = (e, t) => {
|
|
|
521
2030
|
return e.value.get(t);
|
|
522
2031
|
}
|
|
523
2032
|
};
|
|
524
|
-
},
|
|
525
|
-
|
|
2033
|
+
}, Y = (e, t, n) => {
|
|
2034
|
+
Wt(n, (n) => {
|
|
526
2035
|
e.set(t, n);
|
|
527
2036
|
});
|
|
528
|
-
},
|
|
529
|
-
let e =
|
|
2037
|
+
}, Rr = ue("theme-settings", () => {
|
|
2038
|
+
let e = y(1), t = y(!0), n = (e, t) => {
|
|
530
2039
|
document.documentElement.style.setProperty(`--${e}`, t);
|
|
531
2040
|
};
|
|
532
|
-
return
|
|
2041
|
+
return Wt(e, (e) => {
|
|
533
2042
|
document.documentElement.style.setProperty("saturation", `${e}`);
|
|
534
|
-
}),
|
|
2043
|
+
}), Wt(t, (e) => {
|
|
535
2044
|
n("code-white-space", e ? "pre-wrap" : "pre");
|
|
536
2045
|
}), {
|
|
537
2046
|
saturation: e,
|
|
538
2047
|
wrapCode: t
|
|
539
2048
|
};
|
|
540
|
-
}),
|
|
2049
|
+
}), zr = (e) => l(e, { missingContext: !0 }), Br = Symbol("toolbar"), Vr = ["aria-orientation", "aria-controls"], Hr = /* @__PURE__ */ o({
|
|
541
2050
|
__name: "Toolbar",
|
|
542
2051
|
props: {
|
|
543
2052
|
orientation: { default: "horizontal" },
|
|
544
2053
|
controls: {}
|
|
545
2054
|
},
|
|
546
2055
|
setup(e) {
|
|
547
|
-
let { orientation: t } =
|
|
548
|
-
return
|
|
2056
|
+
let { orientation: t } = re(e), n = E("element"), { getElements: r } = H("toolbar", n), { onKeyDown: a, moveTo: o } = Pt(t, r);
|
|
2057
|
+
return v(Br, {
|
|
549
2058
|
onKeyDown: a,
|
|
550
2059
|
moveTo: o
|
|
551
|
-
}), (r, a) => (
|
|
2060
|
+
}), (r, a) => (_(), i("div", {
|
|
552
2061
|
ref_key: "element",
|
|
553
2062
|
ref: n,
|
|
554
|
-
"aria-orientation":
|
|
2063
|
+
"aria-orientation": C(t),
|
|
555
2064
|
"aria-controls": e.controls,
|
|
556
2065
|
role: "toolbar"
|
|
557
|
-
}, [
|
|
2066
|
+
}, [b(r.$slots, "default")], 8, Vr));
|
|
558
2067
|
}
|
|
559
|
-
}),
|
|
2068
|
+
}), Ur = [
|
|
560
2069
|
"aria-disabled",
|
|
2070
|
+
"aria-keyshortcuts",
|
|
561
2071
|
"disabled",
|
|
562
2072
|
"type"
|
|
563
|
-
],
|
|
2073
|
+
], X = /* @__PURE__ */ o({
|
|
564
2074
|
__name: "Button",
|
|
565
2075
|
props: {
|
|
566
2076
|
type: { default: "button" },
|
|
567
2077
|
disabled: {
|
|
568
2078
|
type: [Boolean, String],
|
|
569
2079
|
default: void 0
|
|
570
|
-
}
|
|
2080
|
+
},
|
|
2081
|
+
keyboardShortcut: { default: void 0 }
|
|
571
2082
|
},
|
|
572
2083
|
emits: ["click"],
|
|
573
2084
|
setup(e, { emit: t }) {
|
|
574
|
-
let n = e, r = t, a =
|
|
575
|
-
|
|
2085
|
+
let n = e, r = t, a = E("element"), { onKeyDown: o, moveTo: s } = zr(Br);
|
|
2086
|
+
U("toolbar", a);
|
|
576
2087
|
let c = (e) => {
|
|
577
2088
|
s?.(a.value), n.disabled || r("click", e);
|
|
578
2089
|
};
|
|
579
|
-
return (
|
|
2090
|
+
return z("*", () => {
|
|
2091
|
+
if (!n.keyboardShortcut) return;
|
|
2092
|
+
let e = z.getPressedKeyString();
|
|
2093
|
+
for (let t of n.keyboardShortcut.split(",")) if (t.split("+").map((e) => e.trim()).every((t) => e.includes(t))) return a.value?.click(), !1;
|
|
2094
|
+
}), (t, n) => (_(), i("button", {
|
|
580
2095
|
ref_key: "element",
|
|
581
2096
|
ref: a,
|
|
582
2097
|
"aria-disabled": e.disabled === !0 || void 0,
|
|
2098
|
+
"aria-keyshortcuts": e.keyboardShortcut,
|
|
583
2099
|
disabled: e.disabled === "without-focus" || void 0,
|
|
584
2100
|
type: e.type,
|
|
585
2101
|
onClick: c,
|
|
586
|
-
onKeydown: n[0] ||= (...e) =>
|
|
587
|
-
}, [
|
|
2102
|
+
onKeydown: n[0] ||= (...e) => C(o) && C(o)(...e)
|
|
2103
|
+
}, [b(t.$slots, "default")], 40, Ur));
|
|
588
2104
|
}
|
|
589
|
-
}),
|
|
2105
|
+
}), Wr = Symbol("calendar-table"), Gr = /* @__PURE__ */ o({
|
|
590
2106
|
__name: "Table",
|
|
591
2107
|
setup(e) {
|
|
592
|
-
return (e, t) => (
|
|
2108
|
+
return (e, t) => (_(), i("table", null, [b(e.$slots, "default")]));
|
|
593
2109
|
}
|
|
594
|
-
}),
|
|
2110
|
+
}), Kr = /* @__PURE__ */ o({
|
|
595
2111
|
__name: "TableBody",
|
|
596
2112
|
setup(e) {
|
|
597
|
-
return (e, t) => (
|
|
2113
|
+
return (e, t) => (_(), i("tbody", null, [b(e.$slots, "default")]));
|
|
598
2114
|
}
|
|
599
|
-
}),
|
|
2115
|
+
}), qr = /* @__PURE__ */ o({
|
|
600
2116
|
__name: "TableCell",
|
|
601
2117
|
props: { heading: { type: Boolean } },
|
|
602
2118
|
setup(e) {
|
|
603
|
-
return (t, r) => (
|
|
604
|
-
default:
|
|
2119
|
+
return (t, r) => (_(), n(x(e.heading ? "th" : "td"), { scope: e.heading ? "row" : void 0 }, {
|
|
2120
|
+
default: O(() => [b(t.$slots, "default")]),
|
|
605
2121
|
_: 3
|
|
606
2122
|
}, 8, ["scope"]));
|
|
607
2123
|
}
|
|
608
|
-
}),
|
|
2124
|
+
}), Jr = /* @__PURE__ */ o({
|
|
609
2125
|
__name: "TableHead",
|
|
610
2126
|
setup(e) {
|
|
611
|
-
return (e, t) => (
|
|
2127
|
+
return (e, t) => (_(), i("thead", null, [b(e.$slots, "default")]));
|
|
612
2128
|
}
|
|
613
|
-
}),
|
|
2129
|
+
}), Yr = ["aria-sort"], Xr = /* @__PURE__ */ o({
|
|
614
2130
|
__name: "TableHeadingCell",
|
|
615
2131
|
props: { sorted: {} },
|
|
616
2132
|
setup(e) {
|
|
617
|
-
return (t, n) => (
|
|
2133
|
+
return (t, n) => (_(), i("th", { "aria-sort": e.sorted }, [b(t.$slots, "default")], 8, Yr));
|
|
618
2134
|
}
|
|
619
|
-
}),
|
|
2135
|
+
}), Zr = /* @__PURE__ */ o({
|
|
620
2136
|
__name: "TableRow",
|
|
621
2137
|
setup(e) {
|
|
622
|
-
return (e, t) => (
|
|
2138
|
+
return (e, t) => (_(), i("tr", null, [b(e.$slots, "default")]));
|
|
623
2139
|
}
|
|
624
|
-
}),
|
|
2140
|
+
}), Qr = /* @__PURE__ */ o({
|
|
625
2141
|
__name: "CalendarTable",
|
|
626
2142
|
props: /*@__PURE__*/ d({ autoFocus: { type: Boolean } }, {
|
|
627
2143
|
modelValue: { default: () => /* @__PURE__ */ new Date() },
|
|
@@ -629,29 +2145,29 @@ var bt = (e, t) => {
|
|
|
629
2145
|
}),
|
|
630
2146
|
emits: ["update:modelValue"],
|
|
631
2147
|
setup(e) {
|
|
632
|
-
let r = e, i =
|
|
633
|
-
return
|
|
2148
|
+
let r = e, i = T(e, "modelValue"), a = qt();
|
|
2149
|
+
return v(Wr, {
|
|
634
2150
|
focusedDate: i,
|
|
635
2151
|
allowFocus: t(() => r.autoFocus || a.value)
|
|
636
|
-
}), (e, t) => (
|
|
637
|
-
default:
|
|
2152
|
+
}), (e, t) => (_(), n(C(Gr), { role: "grid" }, {
|
|
2153
|
+
default: O(() => [b(e.$slots, "default")]),
|
|
638
2154
|
_: 3
|
|
639
2155
|
}));
|
|
640
2156
|
}
|
|
641
|
-
}),
|
|
2157
|
+
}), $r = /* @__PURE__ */ o({
|
|
642
2158
|
__name: "CalendarTableCell",
|
|
643
2159
|
setup(e) {
|
|
644
|
-
return (e, t) => (
|
|
645
|
-
default:
|
|
2160
|
+
return (e, t) => (_(), n(C(qr), { role: "gridcell" }, {
|
|
2161
|
+
default: O(() => [b(e.$slots, "default")]),
|
|
646
2162
|
_: 3
|
|
647
2163
|
}));
|
|
648
2164
|
}
|
|
649
|
-
}),
|
|
2165
|
+
}), ei = [
|
|
650
2166
|
"aria-pressed",
|
|
651
2167
|
"aria-disabled",
|
|
652
2168
|
"aria-current",
|
|
653
2169
|
"tabindex"
|
|
654
|
-
],
|
|
2170
|
+
], ti = /* @__PURE__ */ o({
|
|
655
2171
|
__name: "CalendarTableCellButton",
|
|
656
2172
|
props: {
|
|
657
2173
|
date: {},
|
|
@@ -660,52 +2176,176 @@ var bt = (e, t) => {
|
|
|
660
2176
|
},
|
|
661
2177
|
emits: ["click"],
|
|
662
2178
|
setup(e, { emit: n }) {
|
|
663
|
-
let r = e, a = n, o =
|
|
664
|
-
return
|
|
2179
|
+
let r = e, a = n, o = E("element"), { focusedDate: s, allowFocus: c } = l(Wr), { onKeyDown: u } = Ot(s), d = t(() => _t(r.date, s.value));
|
|
2180
|
+
return Wt(d, async (e) => {
|
|
665
2181
|
e && c.value && (await p(), o.value?.focus());
|
|
666
|
-
}), (t, n) => (
|
|
2182
|
+
}), (t, n) => (_(), i("button", {
|
|
667
2183
|
ref_key: "element",
|
|
668
2184
|
ref: o,
|
|
669
2185
|
"aria-pressed": e.selected,
|
|
670
2186
|
"aria-disabled": e.disabled,
|
|
671
|
-
"aria-current":
|
|
672
|
-
tabindex:
|
|
2187
|
+
"aria-current": C(_t)(e.date, /* @__PURE__ */ new Date()) ? "date" : void 0,
|
|
2188
|
+
tabindex: d.value ? 0 : -1,
|
|
673
2189
|
onFocus: n[0] ||= (t) => s.value = e.date,
|
|
674
|
-
onKeydown: n[1] ||= (...e) =>
|
|
2190
|
+
onKeydown: n[1] ||= (...e) => C(u) && C(u)(...e),
|
|
675
2191
|
onClick: n[2] ||= (e) => a("click", e)
|
|
676
|
-
}, [
|
|
2192
|
+
}, [b(t.$slots, "default")], 40, ei));
|
|
677
2193
|
}
|
|
678
|
-
}),
|
|
2194
|
+
}), ni = "\n block-size: 1px;\n inline-size: 1px;\n\n position: absolute;\n overflow: hidden;\n\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n\n white-space: nowrap;\n", ri = /* @__PURE__ */ o({
|
|
679
2195
|
__name: "VisuallyHidden",
|
|
680
2196
|
setup(e) {
|
|
681
|
-
return (e, t) => (
|
|
2197
|
+
return (e, t) => (_(), i("div", { style: ni }, [b(e.$slots, "default")]));
|
|
682
2198
|
}
|
|
683
|
-
}),
|
|
2199
|
+
}), ii = /* @__PURE__ */ o({
|
|
684
2200
|
__name: "CopyButton",
|
|
685
2201
|
props: {
|
|
686
2202
|
content: {},
|
|
687
2203
|
preventAnnouncement: { type: Boolean },
|
|
688
|
-
onCopy: { type: Function }
|
|
2204
|
+
onCopy: { type: Function },
|
|
2205
|
+
disabled: { type: [Boolean, String] },
|
|
2206
|
+
keyboardShortcut: {}
|
|
689
2207
|
},
|
|
690
2208
|
emits: ["copy"],
|
|
691
2209
|
setup(o) {
|
|
692
|
-
let s =
|
|
2210
|
+
let s = y(!1), c = o, l = t(() => c.content ? typeof c.content == "string" ? [new ClipboardItem({ "text/plain": c.content })] : Array.isArray(c.content) ? c.content : [c.content] : []), u = async (e) => {
|
|
693
2211
|
c.content ? await navigator.clipboard.write(l.value) : await c.onCopy?.(e), s.value = !0, setTimeout(() => {
|
|
694
2212
|
s.value = !1;
|
|
695
2213
|
}, 4e3);
|
|
696
2214
|
};
|
|
697
|
-
return (t, c) => (
|
|
2215
|
+
return (t, c) => (_(), i(e, null, [o.preventAnnouncement ? r("", !0) : (_(), n(C(ri), {
|
|
698
2216
|
key: 0,
|
|
699
2217
|
"aria-live": "polite"
|
|
700
2218
|
}, {
|
|
701
|
-
default:
|
|
2219
|
+
default: O(() => [s.value ? b(t.$slots, "default", { isCopying: s.value }, void 0, void 0, 0) : r("", !0)]),
|
|
2220
|
+
_: 3
|
|
2221
|
+
})), a(C(X), f(t.$attrs, {
|
|
2222
|
+
disabled: o.disabled,
|
|
2223
|
+
"keyboard-shortcut": o.keyboardShortcut,
|
|
2224
|
+
onClick: u
|
|
2225
|
+
}), {
|
|
2226
|
+
default: O(() => [b(t.$slots, "default", { isCopying: s.value })]),
|
|
2227
|
+
_: 3
|
|
2228
|
+
}, 16, ["disabled", "keyboard-shortcut"])], 64));
|
|
2229
|
+
}
|
|
2230
|
+
}), Z = Symbol("dialog"), ai = /* @__PURE__ */ o({
|
|
2231
|
+
__name: "Dialog",
|
|
2232
|
+
props: /*@__PURE__*/ d({ modal: { type: [Boolean, String] } }, {
|
|
2233
|
+
modelValue: {
|
|
2234
|
+
type: Boolean,
|
|
2235
|
+
default: !1
|
|
2236
|
+
},
|
|
2237
|
+
modelModifiers: {}
|
|
2238
|
+
}),
|
|
2239
|
+
emits: ["update:modelValue"],
|
|
2240
|
+
setup(e) {
|
|
2241
|
+
let n = e;
|
|
2242
|
+
return v(Z, {
|
|
2243
|
+
sharedIds: Lr(),
|
|
2244
|
+
open: T(e, "modelValue"),
|
|
2245
|
+
modal: t(() => n.modal)
|
|
2246
|
+
}), (e, t) => b(e.$slots, "default");
|
|
2247
|
+
}
|
|
2248
|
+
}), oi = /* @__PURE__ */ o({
|
|
2249
|
+
__name: "DialogButton",
|
|
2250
|
+
props: {
|
|
2251
|
+
disabled: { type: [Boolean, String] },
|
|
2252
|
+
keyboardShortcut: {}
|
|
2253
|
+
},
|
|
2254
|
+
setup(e) {
|
|
2255
|
+
let { sharedIds: t, open: r, modal: i } = l(Z);
|
|
2256
|
+
return (a, o) => (_(), n(C(X), {
|
|
2257
|
+
"aria-haspopup": "dialog",
|
|
2258
|
+
"aria-expanded": C(r),
|
|
2259
|
+
disabled: e.disabled,
|
|
2260
|
+
"keyboard-shortcut": e.keyboardShortcut,
|
|
2261
|
+
commandfor: C(t).get("panel"),
|
|
2262
|
+
command: C(i) ? "show-modal" : "--show-non-modal"
|
|
2263
|
+
}, {
|
|
2264
|
+
default: O(() => [b(a.$slots, "default")]),
|
|
2265
|
+
_: 3
|
|
2266
|
+
}, 8, [
|
|
2267
|
+
"aria-expanded",
|
|
2268
|
+
"disabled",
|
|
2269
|
+
"keyboard-shortcut",
|
|
2270
|
+
"commandfor",
|
|
2271
|
+
"command"
|
|
2272
|
+
]));
|
|
2273
|
+
}
|
|
2274
|
+
}), si = /* @__PURE__ */ o({
|
|
2275
|
+
__name: "DialogCloseButton",
|
|
2276
|
+
props: {
|
|
2277
|
+
disabled: { type: [Boolean, String] },
|
|
2278
|
+
keyboardShortcut: {}
|
|
2279
|
+
},
|
|
2280
|
+
setup(e) {
|
|
2281
|
+
let { sharedIds: t } = l(Z);
|
|
2282
|
+
return (r, i) => (_(), n(C(X), {
|
|
2283
|
+
disabled: e.disabled,
|
|
2284
|
+
"keyboard-shortcut": e.keyboardShortcut,
|
|
2285
|
+
commandfor: C(t).get("panel"),
|
|
2286
|
+
command: "close"
|
|
2287
|
+
}, {
|
|
2288
|
+
default: O(() => [b(r.$slots, "default")]),
|
|
702
2289
|
_: 3
|
|
703
|
-
}
|
|
704
|
-
|
|
2290
|
+
}, 8, [
|
|
2291
|
+
"disabled",
|
|
2292
|
+
"keyboard-shortcut",
|
|
2293
|
+
"commandfor"
|
|
2294
|
+
]));
|
|
2295
|
+
}
|
|
2296
|
+
}), ci = [
|
|
2297
|
+
"id",
|
|
2298
|
+
"role",
|
|
2299
|
+
"aria-labelledby",
|
|
2300
|
+
"aria-describedby",
|
|
2301
|
+
"closedby"
|
|
2302
|
+
], li = /* @__PURE__ */ o({
|
|
2303
|
+
__name: "DialogPanel",
|
|
2304
|
+
props: {
|
|
2305
|
+
lightDismiss: { type: Boolean },
|
|
2306
|
+
id: { default: () => w() }
|
|
2307
|
+
},
|
|
2308
|
+
setup(e) {
|
|
2309
|
+
let t = e, n = E("element"), { sharedIds: r, open: a, modal: o } = l(Z);
|
|
2310
|
+
Y(r, "panel", () => t.id);
|
|
2311
|
+
let s = (e) => {
|
|
2312
|
+
e.command === "--show-non-modal" && n.value?.show();
|
|
2313
|
+
};
|
|
2314
|
+
return D(a, (e) => {
|
|
2315
|
+
n.value && (e ? o?.value ? n.value.showModal() : n.value.show() : n.value.close());
|
|
2316
|
+
}), (t, c) => (_(), i("dialog", {
|
|
2317
|
+
id: e.id,
|
|
2318
|
+
ref_key: "element",
|
|
2319
|
+
ref: n,
|
|
2320
|
+
role: C(o) === "alert" ? "alertdialog" : void 0,
|
|
2321
|
+
"aria-labelledby": C(r).get("heading"),
|
|
2322
|
+
"aria-describedby": C(r).get("description"),
|
|
2323
|
+
closedby: e.lightDismiss ? "any" : void 0,
|
|
2324
|
+
onCommand: s,
|
|
2325
|
+
onToggle: c[0] ||= (e) => a.value = e.newState === "open"
|
|
2326
|
+
}, [b(t.$slots, "default")], 40, ci));
|
|
2327
|
+
}
|
|
2328
|
+
}), ui = ["id"], di = /* @__PURE__ */ o({
|
|
2329
|
+
__name: "DialogDescription",
|
|
2330
|
+
props: { id: { default: () => w() } },
|
|
2331
|
+
setup(e) {
|
|
2332
|
+
let t = e, { sharedIds: n } = l(Z);
|
|
2333
|
+
return Y(n, "description", () => t.id), (t, n) => (_(), i("div", { id: e.id }, [b(t.$slots, "default")], 8, ui));
|
|
2334
|
+
}
|
|
2335
|
+
}), fi = /* @__PURE__ */ o({
|
|
2336
|
+
__name: "DialogHeading",
|
|
2337
|
+
props: {
|
|
2338
|
+
level: { default: 1 },
|
|
2339
|
+
id: { default: () => w() }
|
|
2340
|
+
},
|
|
2341
|
+
setup(e) {
|
|
2342
|
+
let t = e, { sharedIds: r } = l(Z);
|
|
2343
|
+
return Y(r, "heading", () => t.id), (t, r) => (_(), n(x(`h${e.level}`), { id: e.id }, {
|
|
2344
|
+
default: O(() => [b(t.$slots, "default")]),
|
|
705
2345
|
_: 3
|
|
706
|
-
},
|
|
2346
|
+
}, 8, ["id"]));
|
|
707
2347
|
}
|
|
708
|
-
}),
|
|
2348
|
+
}), pi = Symbol("disclosure"), mi = { key: 0 }, hi = /* @__PURE__ */ o({
|
|
709
2349
|
__name: "Disclosure",
|
|
710
2350
|
props: /*@__PURE__*/ d({
|
|
711
2351
|
render: { type: Boolean },
|
|
@@ -720,9 +2360,9 @@ var bt = (e, t) => {
|
|
|
720
2360
|
}),
|
|
721
2361
|
emits: ["update:modelValue"],
|
|
722
2362
|
setup(e) {
|
|
723
|
-
let n =
|
|
724
|
-
return
|
|
725
|
-
|
|
2363
|
+
let n = T(e, "modelValue"), r = e;
|
|
2364
|
+
return v(pi, {
|
|
2365
|
+
sharedIds: Lr(),
|
|
726
2366
|
disabled: t(() => r.disabled),
|
|
727
2367
|
popover: t(() => r.popover),
|
|
728
2368
|
open: t({
|
|
@@ -733,53 +2373,56 @@ var bt = (e, t) => {
|
|
|
733
2373
|
n.value = e;
|
|
734
2374
|
}
|
|
735
2375
|
})
|
|
736
|
-
}), (t, n) => e.render ? (
|
|
2376
|
+
}), (t, n) => e.render ? (_(), i("div", mi, [b(t.$slots, "default")])) : b(t.$slots, "default", {}, void 0, void 0, 1);
|
|
737
2377
|
}
|
|
738
|
-
}),
|
|
2378
|
+
}), gi = /* @__PURE__ */ o({
|
|
739
2379
|
__name: "DisclosureButton",
|
|
740
|
-
props: {
|
|
2380
|
+
props: {
|
|
2381
|
+
disabled: { type: [Boolean, String] },
|
|
2382
|
+
keyboardShortcut: {}
|
|
2383
|
+
},
|
|
741
2384
|
setup(e) {
|
|
742
|
-
let {
|
|
743
|
-
command: "toggle-popover",
|
|
744
|
-
commandfor: i.
|
|
745
|
-
}
|
|
746
|
-
|
|
747
|
-
} });
|
|
748
|
-
return (t, s) => b(o) ? r("", !0) : (m(), n(b(Z), f({
|
|
2385
|
+
let { sharedIds: i, open: a, disabled: o, popover: s } = l(pi), c = t(() => ({
|
|
2386
|
+
command: s.value ? "toggle-popover" : "--toggle-disclosure",
|
|
2387
|
+
commandfor: i.get("panel")
|
|
2388
|
+
}));
|
|
2389
|
+
return (t, s) => C(o) ? r("", !0) : (_(), n(C(X), f({
|
|
749
2390
|
key: 0,
|
|
750
|
-
"aria-expanded":
|
|
751
|
-
"aria-controls":
|
|
752
|
-
disabled: e.disabled
|
|
2391
|
+
"aria-expanded": C(a),
|
|
2392
|
+
"aria-controls": C(i).get("panel"),
|
|
2393
|
+
disabled: e.disabled,
|
|
2394
|
+
"keyboard-shortcut": e.keyboardShortcut
|
|
753
2395
|
}, c.value), {
|
|
754
|
-
default:
|
|
2396
|
+
default: O(() => [b(t.$slots, "default")]),
|
|
755
2397
|
_: 3
|
|
756
2398
|
}, 16, [
|
|
757
2399
|
"aria-expanded",
|
|
758
2400
|
"aria-controls",
|
|
759
|
-
"disabled"
|
|
2401
|
+
"disabled",
|
|
2402
|
+
"keyboard-shortcut"
|
|
760
2403
|
]));
|
|
761
2404
|
}
|
|
762
|
-
}),
|
|
2405
|
+
}), _i = y(0), vi = {
|
|
763
2406
|
beforeMount(e, { value: t }) {
|
|
764
|
-
let n = `a-l-${
|
|
765
|
-
e.setAttribute("data-labelledby-id", n), t && (
|
|
2407
|
+
let n = `a-l-${_i.value++}`;
|
|
2408
|
+
e.setAttribute("data-labelledby-id", n), t && (yi(t, n), e.setAttribute("aria-labelledby", n));
|
|
766
2409
|
},
|
|
767
2410
|
updated(e, { value: t, oldValue: n }) {
|
|
768
2411
|
if (t === n) return;
|
|
769
2412
|
let r = e.getAttribute("data-labelledby-id");
|
|
770
2413
|
if (r) {
|
|
771
2414
|
let n = document.getElementById(r);
|
|
772
|
-
t ? n ? n.innerText = t : (
|
|
2415
|
+
t ? n ? n.innerText = t : (yi(t, r), e.setAttribute("aria-labelledby", r)) : (e.removeAttribute("aria-labelledby"), n?.remove());
|
|
773
2416
|
}
|
|
774
2417
|
},
|
|
775
2418
|
beforeUnmount(e) {
|
|
776
2419
|
let t = e.getAttribute("data-labelledby-id");
|
|
777
2420
|
t && (e.removeAttribute("aria-labelledby"), document.getElementById(t)?.remove());
|
|
778
2421
|
}
|
|
779
|
-
},
|
|
2422
|
+
}, yi = (e, t) => {
|
|
780
2423
|
let n = document.createElement("span");
|
|
781
2424
|
return n.innerText = e, n.id = t, n.hidden = !0, document.documentElement.appendChild(n), n;
|
|
782
|
-
},
|
|
2425
|
+
}, bi = {
|
|
783
2426
|
beforeMount(e, { value: t }, { transition: n }) {
|
|
784
2427
|
n && t === !1 ? n.beforeEnter(e) : Q(e, t);
|
|
785
2428
|
},
|
|
@@ -794,214 +2437,235 @@ var bt = (e, t) => {
|
|
|
794
2437
|
}
|
|
795
2438
|
}, Q = (e, t) => {
|
|
796
2439
|
t ? e.setAttribute("hidden", `${t}`) : e.removeAttribute("hidden");
|
|
797
|
-
},
|
|
2440
|
+
}, xi = /* @__PURE__ */ o({
|
|
798
2441
|
__name: "DisclosurePanel",
|
|
799
2442
|
props: {
|
|
800
2443
|
hideFromSearch: { type: Boolean },
|
|
801
2444
|
as: { default: "div" },
|
|
802
|
-
id: { default:
|
|
2445
|
+
id: { default: () => w() }
|
|
803
2446
|
},
|
|
804
2447
|
setup(e) {
|
|
805
|
-
let r = e, {
|
|
806
|
-
|
|
807
|
-
let
|
|
808
|
-
e.newState === "open"
|
|
2448
|
+
let r = e, { sharedIds: i, popover: a, open: o } = l(pi);
|
|
2449
|
+
Y(i, "panel", () => r.id);
|
|
2450
|
+
let s = t(() => o.value ? void 0 : r.hideFromSearch ? !0 : "until-found"), c = (e) => {
|
|
2451
|
+
o.value = e.newState === "open";
|
|
2452
|
+
}, u = (e) => {
|
|
2453
|
+
e.command === "--toggle-disclosure" && (o.value = !o.value);
|
|
809
2454
|
};
|
|
810
|
-
return (t, r) =>
|
|
811
|
-
id:
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
2455
|
+
return (t, r) => se((_(), n(x(e.as), {
|
|
2456
|
+
id: e.id,
|
|
2457
|
+
ref: "element",
|
|
2458
|
+
popover: C(a) ? "auto" : void 0,
|
|
2459
|
+
onBeforematch: r[0] ||= (e) => o.value = !0,
|
|
2460
|
+
onToggle: c,
|
|
2461
|
+
onCommand: u
|
|
817
2462
|
}, {
|
|
818
|
-
default:
|
|
2463
|
+
default: O(() => [b(t.$slots, "default")]),
|
|
819
2464
|
_: 3
|
|
820
|
-
}, 40, ["id", "popover"])), [[
|
|
2465
|
+
}, 40, ["id", "popover"])), [[C(bi), s.value]]);
|
|
2466
|
+
}
|
|
2467
|
+
}), Si = ["href"], Ci = /* @__PURE__ */ o({
|
|
2468
|
+
__name: "Link",
|
|
2469
|
+
props: { url: {} },
|
|
2470
|
+
setup(e) {
|
|
2471
|
+
let t = E("element"), { onKeyDown: n, moveTo: r } = zr(Br);
|
|
2472
|
+
return U("toolbar", t), (a, o) => (_(), i("a", {
|
|
2473
|
+
ref_key: "element",
|
|
2474
|
+
ref: t,
|
|
2475
|
+
href: e.url,
|
|
2476
|
+
onKeydown: o[0] ||= (...e) => C(n) && C(n)(...e),
|
|
2477
|
+
onClick: o[1] ||= (e) => C(r)?.(t.value)
|
|
2478
|
+
}, [b(a.$slots, "default")], 40, Si));
|
|
821
2479
|
}
|
|
822
|
-
}),
|
|
2480
|
+
}), wi = /* @__PURE__ */ o({
|
|
823
2481
|
__name: "DownloadLink",
|
|
824
2482
|
props: {
|
|
825
2483
|
url: {},
|
|
826
2484
|
filename: {}
|
|
827
2485
|
},
|
|
828
2486
|
setup(e) {
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
onClick: o[1] ||= (e) => b(r)?.(t.value)
|
|
837
|
-
}, [_(a.$slots, "default")], 40, rn));
|
|
2487
|
+
return (t, r) => (_(), n(C(Ci), {
|
|
2488
|
+
url: e.url,
|
|
2489
|
+
download: e.filename || !0
|
|
2490
|
+
}, {
|
|
2491
|
+
default: O(() => [b(t.$slots, "default")]),
|
|
2492
|
+
_: 3
|
|
2493
|
+
}, 8, ["url", "download"]));
|
|
838
2494
|
}
|
|
839
|
-
}),
|
|
2495
|
+
}), Ti = ["id"], Ei = /* @__PURE__ */ o({
|
|
840
2496
|
__name: "FieldDescription",
|
|
2497
|
+
props: { id: { default: () => w() } },
|
|
841
2498
|
setup(e) {
|
|
842
|
-
let t =
|
|
843
|
-
return
|
|
844
|
-
id:
|
|
2499
|
+
let t = E("element");
|
|
2500
|
+
return U("field-description", t), (n, r) => (_(), i("div", {
|
|
2501
|
+
id: e.id,
|
|
845
2502
|
ref_key: "element",
|
|
846
|
-
ref:
|
|
847
|
-
}, [
|
|
2503
|
+
ref: t
|
|
2504
|
+
}, [b(n.$slots, "default")], 8, Ti));
|
|
848
2505
|
}
|
|
849
|
-
}),
|
|
2506
|
+
}), Di = ["id"], Oi = /* @__PURE__ */ o({
|
|
850
2507
|
__name: "FieldError",
|
|
2508
|
+
props: { id: { default: () => w() } },
|
|
851
2509
|
setup(e) {
|
|
852
|
-
let t =
|
|
853
|
-
return
|
|
854
|
-
id:
|
|
2510
|
+
let t = E("element");
|
|
2511
|
+
return U("field-error", t), (n, r) => (_(), i("div", {
|
|
2512
|
+
id: e.id,
|
|
855
2513
|
ref_key: "element",
|
|
856
|
-
ref:
|
|
857
|
-
}, [
|
|
2514
|
+
ref: t
|
|
2515
|
+
}, [b(n.$slots, "default")], 8, Di));
|
|
858
2516
|
}
|
|
859
|
-
}),
|
|
860
|
-
let { elements: r } =
|
|
861
|
-
return
|
|
862
|
-
|
|
2517
|
+
}), $ = Symbol("field"), ki = (e) => {
|
|
2518
|
+
let n = Lr(), { elements: r } = H("field-error", e), { elements: i } = H("field-description", e), a = (e) => e.filter((e) => e.id).map((e) => e.id);
|
|
2519
|
+
return v($, {
|
|
2520
|
+
sharedIds: n,
|
|
863
2521
|
hasErrors: t(() => r.value.length > 0),
|
|
864
2522
|
errorIds: t(() => a(r.value)),
|
|
865
2523
|
descriptionIds: t(() => a(i.value))
|
|
866
2524
|
});
|
|
867
|
-
},
|
|
2525
|
+
}, Ai = ["id", "for"], ji = /* @__PURE__ */ o({
|
|
868
2526
|
__name: "FieldLabel",
|
|
2527
|
+
props: { id: { default: () => w() } },
|
|
869
2528
|
setup(e) {
|
|
870
|
-
let
|
|
871
|
-
|
|
2529
|
+
let t = e, { sharedIds: n } = l($);
|
|
2530
|
+
Y(n, "label", () => t.id);
|
|
2531
|
+
let r = () => {
|
|
2532
|
+
document.getElementById(n.get("input"))?.focus();
|
|
872
2533
|
};
|
|
873
|
-
return (
|
|
874
|
-
id:
|
|
875
|
-
for:
|
|
876
|
-
onClick:
|
|
877
|
-
}, [
|
|
2534
|
+
return (t, a) => (_(), i("label", {
|
|
2535
|
+
id: e.id,
|
|
2536
|
+
for: C(n).get("input"),
|
|
2537
|
+
onClick: r
|
|
2538
|
+
}, [b(t.$slots, "default")], 8, Ai));
|
|
878
2539
|
}
|
|
879
|
-
}),
|
|
2540
|
+
}), Mi = /* @__PURE__ */ o({
|
|
880
2541
|
__name: "GridTable",
|
|
881
2542
|
setup(e) {
|
|
882
|
-
let r =
|
|
883
|
-
return
|
|
2543
|
+
let r = E("element"), i = t(() => r.value?.$el), { getElements: a } = H("table", i), { onKeyDown: o } = Mt(a);
|
|
2544
|
+
return v(jt, { onKeyDown: o }), (e, t) => (_(), n(C(Gr), {
|
|
884
2545
|
ref_key: "element",
|
|
885
2546
|
ref: i,
|
|
886
2547
|
role: "grid"
|
|
887
2548
|
}, {
|
|
888
|
-
default:
|
|
2549
|
+
default: O(() => [b(e.$slots, "default")]),
|
|
889
2550
|
_: 3
|
|
890
2551
|
}, 512));
|
|
891
2552
|
}
|
|
892
|
-
}),
|
|
893
|
-
let n = t(() => e.value?.$el), r =
|
|
894
|
-
|
|
895
|
-
let { onKeyDown: i } =
|
|
2553
|
+
}), Ni = (e) => {
|
|
2554
|
+
let n = t(() => e.value?.$el), r = l(Pi);
|
|
2555
|
+
U("table", n), U(r, n);
|
|
2556
|
+
let { onKeyDown: i } = l(jt);
|
|
896
2557
|
return {
|
|
897
2558
|
onKeyDown: i,
|
|
898
2559
|
rowId: r
|
|
899
2560
|
};
|
|
900
|
-
},
|
|
2561
|
+
}, Pi = Symbol("row"), Fi = /* @__PURE__ */ o({
|
|
901
2562
|
__name: "GridTableCell",
|
|
902
2563
|
props: { heading: { type: Boolean } },
|
|
903
2564
|
setup(e) {
|
|
904
|
-
let { rowId: t, onKeyDown: r } =
|
|
905
|
-
return (i, a) => (
|
|
2565
|
+
let { rowId: t, onKeyDown: r } = Ni(E("element"));
|
|
2566
|
+
return (i, a) => (_(), n(C(qr), {
|
|
906
2567
|
ref: "element",
|
|
907
2568
|
heading: e.heading,
|
|
908
2569
|
role: "gridcell",
|
|
909
|
-
onKeydown: a[0] ||= (e) =>
|
|
2570
|
+
onKeydown: a[0] ||= (e) => C(r)(C(t), e)
|
|
910
2571
|
}, {
|
|
911
|
-
default:
|
|
2572
|
+
default: O(() => [b(i.$slots, "default")]),
|
|
912
2573
|
_: 3
|
|
913
2574
|
}, 8, ["heading"]));
|
|
914
2575
|
}
|
|
915
|
-
}),
|
|
2576
|
+
}), Ii = /* @__PURE__ */ o({
|
|
916
2577
|
__name: "GridTableHeadingCell",
|
|
917
2578
|
props: { sorted: {} },
|
|
918
2579
|
setup(e) {
|
|
919
|
-
let { rowId: t, onKeyDown: r } =
|
|
920
|
-
return (i, a) => (
|
|
2580
|
+
let { rowId: t, onKeyDown: r } = Ni(E("element"));
|
|
2581
|
+
return (i, a) => (_(), n(C(Xr), {
|
|
921
2582
|
ref: "element",
|
|
922
2583
|
role: "gridcell",
|
|
923
2584
|
sorted: e.sorted,
|
|
924
|
-
onKeydown: a[0] ||= (e) =>
|
|
2585
|
+
onKeydown: a[0] ||= (e) => C(r)(C(t), e)
|
|
925
2586
|
}, {
|
|
926
|
-
default:
|
|
2587
|
+
default: O(() => [b(i.$slots, "default")]),
|
|
927
2588
|
_: 3
|
|
928
2589
|
}, 8, ["sorted"]));
|
|
929
2590
|
}
|
|
930
|
-
}),
|
|
2591
|
+
}), Li = /* @__PURE__ */ o({
|
|
931
2592
|
__name: "GridTableRow",
|
|
932
2593
|
setup(e) {
|
|
933
|
-
return
|
|
934
|
-
default:
|
|
2594
|
+
return v(Pi, w()), (e, t) => (_(), n(C(Zr), null, {
|
|
2595
|
+
default: O(() => [b(e.$slots, "default")]),
|
|
935
2596
|
_: 3
|
|
936
2597
|
}));
|
|
937
2598
|
}
|
|
938
|
-
}),
|
|
2599
|
+
}), Ri = /* @__PURE__ */ o({
|
|
939
2600
|
__name: "ListboxField",
|
|
940
2601
|
setup(e) {
|
|
941
|
-
let t =
|
|
942
|
-
return
|
|
2602
|
+
let t = E("element");
|
|
2603
|
+
return ki(t), (e, n) => (_(), i("div", {
|
|
943
2604
|
ref_key: "element",
|
|
944
|
-
ref:
|
|
945
|
-
}, [
|
|
2605
|
+
ref: t
|
|
2606
|
+
}, [b(e.$slots, "default")], 512));
|
|
946
2607
|
}
|
|
947
|
-
}),
|
|
2608
|
+
}), zi = Symbol("listbox-field"), Bi = Symbol("listbox-field-group"), Vi = ["aria-labelledby"], Hi = /* @__PURE__ */ o({
|
|
948
2609
|
__name: "ListboxFieldGroup",
|
|
949
2610
|
setup(e) {
|
|
950
|
-
let t =
|
|
951
|
-
return
|
|
2611
|
+
let t = w();
|
|
2612
|
+
return v(Bi, t), (e, n) => (_(), i("div", {
|
|
952
2613
|
role: "group",
|
|
953
|
-
"aria-labelledby":
|
|
954
|
-
}, [
|
|
2614
|
+
"aria-labelledby": C(t)
|
|
2615
|
+
}, [b(e.$slots, "default")], 8, Vi));
|
|
955
2616
|
}
|
|
956
|
-
}),
|
|
2617
|
+
}), Ui = ["id"], Wi = /* @__PURE__ */ o({
|
|
957
2618
|
__name: "ListboxFieldGroupTitle",
|
|
958
2619
|
setup(e) {
|
|
959
|
-
let t =
|
|
960
|
-
return (e, n) => (
|
|
2620
|
+
let t = l(Bi);
|
|
2621
|
+
return (e, n) => (_(), i("div", { id: C(t) }, [b(e.$slots, "default")], 8, Ui));
|
|
961
2622
|
}
|
|
962
|
-
}),
|
|
2623
|
+
}), Gi = [
|
|
963
2624
|
"id",
|
|
964
2625
|
"aria-labelledby",
|
|
965
2626
|
"aria-describedby",
|
|
966
2627
|
"aria-invalid",
|
|
967
2628
|
"aria-multiselectable",
|
|
968
2629
|
"aria-orientation"
|
|
969
|
-
],
|
|
2630
|
+
], Ki = /* @__PURE__ */ o({
|
|
970
2631
|
__name: "ListboxFieldInput",
|
|
971
2632
|
props: /*@__PURE__*/ d({
|
|
972
2633
|
multiselect: { type: Boolean },
|
|
973
2634
|
disabled: { type: Boolean },
|
|
974
|
-
orientation: { default: "vertical" }
|
|
2635
|
+
orientation: { default: "vertical" },
|
|
2636
|
+
id: { default: () => w() }
|
|
975
2637
|
}, {
|
|
976
2638
|
modelValue: { default: () => [] },
|
|
977
2639
|
modelModifiers: {}
|
|
978
2640
|
}),
|
|
979
2641
|
emits: ["update:modelValue"],
|
|
980
2642
|
setup(e) {
|
|
981
|
-
let n = e, r =
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
2643
|
+
let n = e, r = T(e, "modelValue"), { sharedIds: a, hasErrors: o, errorIds: s, descriptionIds: c } = l($);
|
|
2644
|
+
Y(a, "input", () => n.id);
|
|
2645
|
+
let u = E("element"), { getElements: d } = H("listbox", u), { onKeyDown: f, onSpace: p, moveTo: m } = It(() => n.orientation, () => n.multiselect, r, d);
|
|
2646
|
+
return v(zi, {
|
|
2647
|
+
onKeyDown: f,
|
|
2648
|
+
onSpace: p,
|
|
2649
|
+
moveTo: m,
|
|
986
2650
|
modelValue: r,
|
|
987
2651
|
multiselect: t(() => n.multiselect)
|
|
988
|
-
}), (t, n) => (
|
|
989
|
-
id:
|
|
2652
|
+
}), (t, n) => (_(), i("div", {
|
|
2653
|
+
id: e.id,
|
|
990
2654
|
ref_key: "element",
|
|
991
|
-
ref:
|
|
992
|
-
"aria-labelledby":
|
|
993
|
-
"aria-describedby": [
|
|
994
|
-
"aria-invalid":
|
|
2655
|
+
ref: u,
|
|
2656
|
+
"aria-labelledby": C(a).get("label"),
|
|
2657
|
+
"aria-describedby": [C(s), C(c)].flat().join(" "),
|
|
2658
|
+
"aria-invalid": C(o),
|
|
995
2659
|
"aria-multiselectable": e.multiselect,
|
|
996
2660
|
"aria-orientation": e.orientation,
|
|
997
2661
|
role: "listbox"
|
|
998
|
-
}, [
|
|
2662
|
+
}, [b(t.$slots, "default")], 8, Gi));
|
|
999
2663
|
}
|
|
1000
|
-
}),
|
|
2664
|
+
}), qi = [
|
|
1001
2665
|
"aria-selected",
|
|
1002
2666
|
"aria-disabled",
|
|
1003
2667
|
"data-value"
|
|
1004
|
-
],
|
|
2668
|
+
], Ji = /* @__PURE__ */ o({
|
|
1005
2669
|
__name: "ListboxFieldOption",
|
|
1006
2670
|
props: {
|
|
1007
2671
|
value: {},
|
|
@@ -1011,36 +2675,36 @@ var bt = (e, t) => {
|
|
|
1011
2675
|
}
|
|
1012
2676
|
},
|
|
1013
2677
|
setup(e) {
|
|
1014
|
-
let t = e, n =
|
|
1015
|
-
|
|
1016
|
-
let { onKeyDown: r, onSpace: a, moveTo: o, modelValue: s, multiselect: c } =
|
|
2678
|
+
let t = e, n = E("element");
|
|
2679
|
+
U("listbox", n);
|
|
2680
|
+
let { onKeyDown: r, onSpace: a, moveTo: o, modelValue: s, multiselect: c } = l(zi), u = () => {
|
|
1017
2681
|
o(n.value), !t.disabled && (s.value.includes(t.value) ? s.value = s.value.filter((e) => e !== t.value) : s.value = c.value ? [...s.value, t.value] : [t.value]);
|
|
1018
|
-
},
|
|
2682
|
+
}, d = () => {
|
|
1019
2683
|
t.disabled || s.value.includes(t.value) || (s.value = c.value ? [...s.value, t.value] : [t.value]);
|
|
1020
2684
|
};
|
|
1021
|
-
return (t, o) => (
|
|
2685
|
+
return (t, o) => (_(), i("div", {
|
|
1022
2686
|
ref_key: "element",
|
|
1023
2687
|
ref: n,
|
|
1024
|
-
"aria-selected":
|
|
2688
|
+
"aria-selected": C(s).includes(e.value),
|
|
1025
2689
|
"aria-disabled": e.disabled,
|
|
1026
2690
|
"data-value": e.value,
|
|
1027
2691
|
role: "option",
|
|
1028
2692
|
tabindex: "-1",
|
|
1029
|
-
onClick:
|
|
2693
|
+
onClick: u,
|
|
1030
2694
|
onKeydown: [
|
|
1031
|
-
|
|
1032
|
-
o[0] ||= le(
|
|
1033
|
-
o[1] ||= (t) =>
|
|
2695
|
+
ce(d, ["enter"]),
|
|
2696
|
+
o[0] ||= ce(le((t) => e.disabled ? void 0 : C(a)(e.value, t), ["prevent"]), ["space"]),
|
|
2697
|
+
o[1] ||= (t) => C(r)(e.value, t)
|
|
1034
2698
|
]
|
|
1035
|
-
}, [
|
|
2699
|
+
}, [b(t.$slots, "default", { selected: C(s).includes(e.value) })], 40, qi));
|
|
1036
2700
|
}
|
|
1037
|
-
}),
|
|
2701
|
+
}), Yi = ["aria-orientation"], Xi = /* @__PURE__ */ o({
|
|
1038
2702
|
__name: "Separator",
|
|
1039
2703
|
props: { orientation: { default: "horizontal" } },
|
|
1040
2704
|
setup(e) {
|
|
1041
|
-
return (t, n) => (
|
|
2705
|
+
return (t, n) => (_(), i("hr", { "aria-orientation": e.orientation }, null, 8, Yi));
|
|
1042
2706
|
}
|
|
1043
|
-
}),
|
|
2707
|
+
}), Zi = Symbol("Switch-field"), Qi = /* @__PURE__ */ o({
|
|
1044
2708
|
__name: "SwitchField",
|
|
1045
2709
|
props: {
|
|
1046
2710
|
modelValue: {
|
|
@@ -1051,36 +2715,38 @@ var bt = (e, t) => {
|
|
|
1051
2715
|
},
|
|
1052
2716
|
emits: ["update:modelValue"],
|
|
1053
2717
|
setup(e) {
|
|
1054
|
-
let t =
|
|
1055
|
-
return
|
|
1056
|
-
id: n,
|
|
1057
|
-
modelValue: t
|
|
1058
|
-
}), (e, t) => (m(), i("div", {
|
|
2718
|
+
let t = T(e, "modelValue"), n = E("element");
|
|
2719
|
+
return ki(n), v(Zi, { modelValue: t }), (e, t) => (_(), i("div", {
|
|
1059
2720
|
ref_key: "element",
|
|
1060
|
-
ref:
|
|
1061
|
-
}, [
|
|
2721
|
+
ref: n
|
|
2722
|
+
}, [b(e.$slots, "default")], 512));
|
|
1062
2723
|
}
|
|
1063
|
-
}),
|
|
2724
|
+
}), $i = { "aria-hidden": "true" }, ea = /* @__PURE__ */ o({
|
|
1064
2725
|
__name: "SwitchFieldStateLabel",
|
|
1065
2726
|
setup(e) {
|
|
1066
|
-
return (e, t) => (
|
|
2727
|
+
return (e, t) => (_(), i("div", $i, [b(e.$slots, "default")]));
|
|
1067
2728
|
}
|
|
1068
|
-
}),
|
|
2729
|
+
}), ta = /* @__PURE__ */ o({
|
|
1069
2730
|
__name: "SwitchFieldSwitchButton",
|
|
1070
|
-
props: {
|
|
2731
|
+
props: {
|
|
2732
|
+
id: { default: () => w() },
|
|
2733
|
+
disabled: { type: [Boolean, String] },
|
|
2734
|
+
keyboardShortcut: {}
|
|
2735
|
+
},
|
|
1071
2736
|
setup(e) {
|
|
1072
|
-
let { modelValue:
|
|
1073
|
-
return (
|
|
1074
|
-
id:
|
|
1075
|
-
"aria-checked":
|
|
1076
|
-
"aria-describedby": [
|
|
1077
|
-
"aria-invalid":
|
|
1078
|
-
"aria-labelledby":
|
|
2737
|
+
let t = e, { modelValue: r } = l(Zi), { sharedIds: i, hasErrors: a, errorIds: o, descriptionIds: s } = l($);
|
|
2738
|
+
return Y(i, "switch-button", () => t.id), (t, c) => (_(), n(C(X), {
|
|
2739
|
+
id: e.id,
|
|
2740
|
+
"aria-checked": C(r),
|
|
2741
|
+
"aria-describedby": [C(o), C(s)].flat().join(" ") || void 0,
|
|
2742
|
+
"aria-invalid": C(a) ? !0 : void 0,
|
|
2743
|
+
"aria-labelledby": C(i).get("label"),
|
|
1079
2744
|
disabled: e.disabled,
|
|
2745
|
+
"keyboard-shortcut": e.keyboardShortcut,
|
|
1080
2746
|
role: "switch",
|
|
1081
|
-
onClick: c[0] ||= (e) =>
|
|
2747
|
+
onClick: c[0] ||= (e) => r.value = !C(r)
|
|
1082
2748
|
}, {
|
|
1083
|
-
default:
|
|
2749
|
+
default: O(() => [b(t.$slots, "default")]),
|
|
1084
2750
|
_: 3
|
|
1085
2751
|
}, 8, [
|
|
1086
2752
|
"id",
|
|
@@ -1088,10 +2754,11 @@ var bt = (e, t) => {
|
|
|
1088
2754
|
"aria-describedby",
|
|
1089
2755
|
"aria-invalid",
|
|
1090
2756
|
"aria-labelledby",
|
|
1091
|
-
"disabled"
|
|
2757
|
+
"disabled",
|
|
2758
|
+
"keyboard-shortcut"
|
|
1092
2759
|
]));
|
|
1093
2760
|
}
|
|
1094
|
-
}),
|
|
2761
|
+
}), na = Symbol("tabs"), ra = Symbol("tabs-list"), ia = /* @__PURE__ */ o({
|
|
1095
2762
|
__name: "Tabs",
|
|
1096
2763
|
props: /*@__PURE__*/ d({ as: {} }, {
|
|
1097
2764
|
modelValue: {},
|
|
@@ -1099,20 +2766,20 @@ var bt = (e, t) => {
|
|
|
1099
2766
|
}),
|
|
1100
2767
|
emits: ["update:modelValue"],
|
|
1101
2768
|
setup(e) {
|
|
1102
|
-
let t =
|
|
1103
|
-
return
|
|
1104
|
-
|
|
2769
|
+
let t = T(e, "modelValue");
|
|
2770
|
+
return v(na, {
|
|
2771
|
+
sharedIds: Lr(),
|
|
1105
2772
|
selectedPanel: t
|
|
1106
|
-
}), (t, r) => e.as ? (
|
|
1107
|
-
default:
|
|
2773
|
+
}), (t, r) => e.as ? (_(), n(x(e.as), { key: 0 }, {
|
|
2774
|
+
default: O(() => [b(t.$slots, "default")]),
|
|
1108
2775
|
_: 3
|
|
1109
|
-
})) :
|
|
2776
|
+
})) : b(t.$slots, "default", {}, void 0, void 0, 1);
|
|
1110
2777
|
}
|
|
1111
|
-
}),
|
|
2778
|
+
}), aa = [
|
|
1112
2779
|
"tabindex",
|
|
1113
2780
|
"aria-disabled",
|
|
1114
2781
|
"disabled"
|
|
1115
|
-
],
|
|
2782
|
+
], oa = /* @__PURE__ */ o({
|
|
1116
2783
|
__name: "TabsActionButton",
|
|
1117
2784
|
props: {
|
|
1118
2785
|
value: {},
|
|
@@ -1120,94 +2787,165 @@ var bt = (e, t) => {
|
|
|
1120
2787
|
},
|
|
1121
2788
|
emits: ["click"],
|
|
1122
2789
|
setup(e, { emit: t }) {
|
|
1123
|
-
let n = e, r = t, { selectedPanel: a } =
|
|
2790
|
+
let n = e, r = t, { selectedPanel: a } = l(na), o = (e) => {
|
|
1124
2791
|
n.disabled || r("click", e);
|
|
1125
2792
|
};
|
|
1126
|
-
return (t, n) => (
|
|
2793
|
+
return (t, n) => (_(), i("button", {
|
|
1127
2794
|
ref: "button",
|
|
1128
|
-
tabindex:
|
|
2795
|
+
tabindex: C(a) === e.value ? 0 : -1,
|
|
1129
2796
|
"aria-disabled": e.disabled === !0 || void 0,
|
|
1130
2797
|
disabled: e.disabled === "without-focus" || void 0,
|
|
1131
2798
|
type: "button",
|
|
1132
2799
|
onClick: o
|
|
1133
|
-
}, [
|
|
2800
|
+
}, [b(t.$slots, "default")], 8, aa));
|
|
1134
2801
|
}
|
|
1135
|
-
}),
|
|
2802
|
+
}), sa = [
|
|
1136
2803
|
"id",
|
|
1137
2804
|
"aria-disabled",
|
|
1138
2805
|
"aria-selected",
|
|
1139
2806
|
"aria-controls"
|
|
1140
|
-
],
|
|
2807
|
+
], ca = /* @__PURE__ */ o({
|
|
1141
2808
|
__name: "TabsButton",
|
|
1142
2809
|
props: {
|
|
1143
2810
|
value: {},
|
|
1144
|
-
id: { default: (
|
|
2811
|
+
id: { default: () => w() },
|
|
1145
2812
|
disabled: { type: Boolean }
|
|
1146
2813
|
},
|
|
1147
2814
|
emits: ["delete"],
|
|
1148
2815
|
setup(e, { emit: t }) {
|
|
1149
|
-
let n = e, r =
|
|
1150
|
-
|
|
1151
|
-
let a = t, { selectedPanel: o,
|
|
1152
|
-
|
|
1153
|
-
let { onKeyDown: c, selectionFollowsFocus:
|
|
2816
|
+
let n = e, r = E("element");
|
|
2817
|
+
U("tabs-list", r);
|
|
2818
|
+
let a = t, { selectedPanel: o, sharedIds: s } = l(na);
|
|
2819
|
+
Y(s, `${n.value}-button`, () => n.id);
|
|
2820
|
+
let { onKeyDown: c, selectionFollowsFocus: u } = l(ra), d = () => {
|
|
1154
2821
|
n.disabled || (o.value = n.value);
|
|
1155
|
-
},
|
|
2822
|
+
}, f = () => {
|
|
1156
2823
|
n.disabled || a("delete");
|
|
1157
2824
|
};
|
|
1158
|
-
return
|
|
2825
|
+
return m(() => {
|
|
1159
2826
|
o.value ||= n.value;
|
|
1160
|
-
}), (t, a) => (
|
|
2827
|
+
}), (t, a) => (_(), i("button", {
|
|
1161
2828
|
id: e.id,
|
|
1162
2829
|
ref_key: "element",
|
|
1163
2830
|
ref: r,
|
|
1164
2831
|
"aria-disabled": e.disabled === !0 || void 0,
|
|
1165
|
-
"aria-selected":
|
|
1166
|
-
"aria-controls":
|
|
2832
|
+
"aria-selected": C(o) === e.value,
|
|
2833
|
+
"aria-controls": C(s).get(`${n.value}-panel`),
|
|
1167
2834
|
type: "button",
|
|
1168
2835
|
role: "tab",
|
|
1169
|
-
onFocus: a[0] ||= (t) =>
|
|
1170
|
-
onKeydown: [
|
|
1171
|
-
onClick:
|
|
1172
|
-
}, [
|
|
2836
|
+
onFocus: a[0] ||= (t) => C(u) ? o.value = e.value : void 0,
|
|
2837
|
+
onKeydown: [ce(f, ["delete"]), a[1] ||= (...e) => C(c) && C(c)(...e)],
|
|
2838
|
+
onClick: d
|
|
2839
|
+
}, [b(t.$slots, "default")], 40, sa));
|
|
1173
2840
|
}
|
|
1174
|
-
}),
|
|
2841
|
+
}), la = ["aria-orientation"], ua = /* @__PURE__ */ o({
|
|
1175
2842
|
__name: "TabsList",
|
|
1176
2843
|
props: {
|
|
1177
2844
|
orientation: { default: "horizontal" },
|
|
1178
2845
|
selectionFollowsFocus: { type: Boolean }
|
|
1179
2846
|
},
|
|
1180
2847
|
setup(e) {
|
|
1181
|
-
let n = e, { orientation: r } =
|
|
1182
|
-
return
|
|
2848
|
+
let n = e, { orientation: r } = re(n), a = E("element"), { getElements: o } = H("tabs-list", a), { onKeyDown: s } = Pt(r, o);
|
|
2849
|
+
return v(ra, {
|
|
1183
2850
|
selectionFollowsFocus: t(() => n.selectionFollowsFocus),
|
|
1184
2851
|
onKeyDown: s
|
|
1185
|
-
}), (e, t) => (
|
|
2852
|
+
}), (e, t) => (_(), i("div", {
|
|
1186
2853
|
ref_key: "element",
|
|
1187
2854
|
ref: a,
|
|
1188
|
-
"aria-orientation":
|
|
2855
|
+
"aria-orientation": C(r),
|
|
1189
2856
|
role: "tablist"
|
|
1190
|
-
}, [
|
|
2857
|
+
}, [b(e.$slots, "default")], 8, la));
|
|
1191
2858
|
}
|
|
1192
|
-
}),
|
|
2859
|
+
}), da = ["id", "aria-labelledby"], fa = /* @__PURE__ */ o({
|
|
1193
2860
|
__name: "TabsPanel",
|
|
1194
2861
|
props: {
|
|
1195
2862
|
value: {},
|
|
1196
|
-
id: { default: (
|
|
2863
|
+
id: { default: () => w() }
|
|
1197
2864
|
},
|
|
1198
2865
|
setup(e) {
|
|
1199
|
-
let n = e, { selectedPanel: a,
|
|
1200
|
-
|
|
2866
|
+
let n = e, { selectedPanel: a, sharedIds: o } = l(na);
|
|
2867
|
+
Y(o, `${n.value}-panel`, () => n.id);
|
|
1201
2868
|
let s = t(() => a.value === n.value);
|
|
1202
|
-
return (t, a) => s.value ? (
|
|
2869
|
+
return (t, a) => s.value ? (_(), i("div", {
|
|
1203
2870
|
key: 0,
|
|
1204
2871
|
id: e.id,
|
|
1205
2872
|
ref: "button",
|
|
1206
|
-
"aria-labelledby":
|
|
2873
|
+
"aria-labelledby": C(o).get(`${n.value}-button`),
|
|
1207
2874
|
tabindex: "-1",
|
|
1208
2875
|
role: "tabpanel"
|
|
1209
|
-
}, [
|
|
2876
|
+
}, [b(t.$slots, "default")], 8, da)) : r("", !0);
|
|
2877
|
+
}
|
|
2878
|
+
}), pa = { key: 0 }, ma = /* @__PURE__ */ o({
|
|
2879
|
+
__name: "TextareaField",
|
|
2880
|
+
setup(e) {
|
|
2881
|
+
return ki(E("element")), (e, t) => Object.keys(e.$attrs).length ? (_(), i("div", pa, [b(e.$slots, "default")])) : b(e.$slots, "default", {}, void 0, void 0, 1);
|
|
2882
|
+
}
|
|
2883
|
+
}), ha = [
|
|
2884
|
+
"id",
|
|
2885
|
+
"aria-invalid",
|
|
2886
|
+
"aria-describedby",
|
|
2887
|
+
"aria-labelledby",
|
|
2888
|
+
"disabled"
|
|
2889
|
+
], ga = /* @__PURE__ */ o({
|
|
2890
|
+
__name: "TextareaFieldInput",
|
|
2891
|
+
props: /*@__PURE__*/ d({
|
|
2892
|
+
disabled: { type: Boolean },
|
|
2893
|
+
id: { default: () => w() }
|
|
2894
|
+
}, {
|
|
2895
|
+
modelValue: {},
|
|
2896
|
+
modelModifiers: {}
|
|
2897
|
+
}),
|
|
2898
|
+
emits: ["update:modelValue"],
|
|
2899
|
+
setup(e) {
|
|
2900
|
+
let t = e, { sharedIds: n, hasErrors: r, errorIds: a, descriptionIds: o } = l($);
|
|
2901
|
+
Y(n, "input", () => t.id);
|
|
2902
|
+
let s = T(e, "modelValue");
|
|
2903
|
+
return (t, c) => se((_(), i("textarea", {
|
|
2904
|
+
id: e.id,
|
|
2905
|
+
"onUpdate:modelValue": c[0] ||= (e) => s.value = e,
|
|
2906
|
+
"aria-invalid": C(r),
|
|
2907
|
+
"aria-describedby": [C(a), C(o)].flat().join(" ") || void 0,
|
|
2908
|
+
"aria-labelledby": C(n).get("label"),
|
|
2909
|
+
disabled: e.disabled
|
|
2910
|
+
}, null, 8, ha)), [[ae, s.value]]);
|
|
2911
|
+
}
|
|
2912
|
+
}), _a = { key: 0 }, va = /* @__PURE__ */ o({
|
|
2913
|
+
__name: "TextField",
|
|
2914
|
+
setup(e) {
|
|
2915
|
+
return ki(E("element")), (e, t) => Object.keys(e.$attrs).length ? (_(), i("div", _a, [b(e.$slots, "default")])) : b(e.$slots, "default", {}, void 0, void 0, 1);
|
|
2916
|
+
}
|
|
2917
|
+
}), ya = [
|
|
2918
|
+
"id",
|
|
2919
|
+
"type",
|
|
2920
|
+
"aria-invalid",
|
|
2921
|
+
"aria-describedby",
|
|
2922
|
+
"aria-labelledby",
|
|
2923
|
+
"disabled"
|
|
2924
|
+
], ba = /* @__PURE__ */ o({
|
|
2925
|
+
__name: "TextFieldInput",
|
|
2926
|
+
props: /*@__PURE__*/ d({
|
|
2927
|
+
search: { type: Boolean },
|
|
2928
|
+
disabled: { type: Boolean },
|
|
2929
|
+
id: { default: () => w() }
|
|
2930
|
+
}, {
|
|
2931
|
+
modelValue: {},
|
|
2932
|
+
modelModifiers: {}
|
|
2933
|
+
}),
|
|
2934
|
+
emits: ["update:modelValue"],
|
|
2935
|
+
setup(e) {
|
|
2936
|
+
let t = e, { sharedIds: n, hasErrors: r, errorIds: a, descriptionIds: o } = l($);
|
|
2937
|
+
Y(n, "input", () => t.id);
|
|
2938
|
+
let s = T(e, "modelValue");
|
|
2939
|
+
return (t, c) => se((_(), i("input", {
|
|
2940
|
+
id: e.id,
|
|
2941
|
+
"onUpdate:modelValue": c[0] ||= (e) => s.value = e,
|
|
2942
|
+
type: e.search ? "search" : "text",
|
|
2943
|
+
"aria-invalid": C(r),
|
|
2944
|
+
"aria-describedby": [C(a), C(o)].flat().join(" ") || void 0,
|
|
2945
|
+
"aria-labelledby": C(n).get("label"),
|
|
2946
|
+
disabled: e.disabled
|
|
2947
|
+
}, null, 8, ya)), [[ie, s.value]]);
|
|
1210
2948
|
}
|
|
1211
2949
|
});
|
|
1212
2950
|
//#endregion
|
|
1213
|
-
export {
|
|
2951
|
+
export { jt as GridKey, Ft as ListboxKey, X as PeachyButton, Qr as PeachyCalendarTable, $r as PeachyCalendarTableCell, ti as PeachyCalendarTableCellButton, ii as PeachyCopyButton, ai as PeachyDialog, oi as PeachyDialogButton, si as PeachyDialogCloseButton, di as PeachyDialogDescription, fi as PeachyDialogHeading, li as PeachyDialogPanel, hi as PeachyDisclosure, gi as PeachyDisclosureButton, xi as PeachyDisclosurePanel, wi as PeachyDownloadLink, Ei as PeachyFieldDescription, Oi as PeachyFieldError, ji as PeachyFieldLabel, Mi as PeachyGridTable, Fi as PeachyGridTableCell, Ii as PeachyGridTableHeadingCell, Li as PeachyGridTableRow, Ci as PeachyLink, Ri as PeachyListboxField, Hi as PeachyListboxGroup, Wi as PeachyListboxGroupTitle, Ki as PeachyListboxInput, Ji as PeachyListboxOption, Xi as PeachySeparator, ta as PeachySwitchButton, Qi as PeachySwitchField, ea as PeachySwitchStateLabel, Gr as PeachyTable, Kr as PeachyTableBody, qr as PeachyTableCell, Jr as PeachyTableHead, Xr as PeachyTableHeadingCell, Zr as PeachyTableRow, ia as PeachyTabs, oa as PeachyTabsActionButton, ca as PeachyTabsButton, ua as PeachyTabsList, fa as PeachyTabsPanel, va as PeachyTextField, ba as PeachyTextFieldInput, ma as PeachyTextareaField, ga as PeachyTextareaFieldInput, Hr as PeachyToolbar, ri as PeachyVisuallyHidden, Nt as RovingTabindexKey, Br as ToolbarContextKey, lt as Weekday, et as formatDate, tt as getDate, dt as getDaysOfCalendarMonth, ut as getDaysOfMonth, Ye as getFirstDayOfMonth, qe as getFirstDayOfWeek, Ze as getFirstDayOfYear, Xe as getLastDayOfMonth, Je as getLastDayOfTheWeek, Qe as getLastDayOfYear, it as getMonth, ct as getMonths, st as getNameOfMonth, ze as getNextDay, Ue as getNextMonth, Ve as getNextWeek, Ge as getNextYear, Be as getPreviousDay, We as getPreviousMonth, He as getPreviousWeek, Ke as getPreviousYear, rt as getWeekNumber, ot as getWeekdays, at as getYear, gt as isDateInRange, ht as isDateTimeInRange, V as isDisabledElement, xt as isFocusedHtmlElement, St as isFocusedRovingTabindexElement, bt as isHtmlElement, yt as isNullish, wt as isPrintableCharacter, Et as isRepeatingCharacter, _t as isSameDate, vt as isSameMonth, Tt as isTypeaheadCharacter, zr as optionalInject, U as provideElement, $e as removeTimezoneOffset, Y as shareId, Ct as sortElementsByAppearance, mt as sortRange, ft as splitDaysIntoWeeks, Dt as startsWith, un as useBemClass, fn as useCalendar, Ot as useCalendarGrid, pn as useDocumentOutline, H as useElements, Ir as useFuzzySearch, dn as useGlobalBemClass, Mt as useGrid, It as useListbox, kt as useNavigableElements, Pt as useRovingTabindex, Lr as useSharedIds, At as useSingleTabStop, Rr as useThemeSettingsStore, Xt as useTypeahead, vi as vAriaLabelledby, bi as vHidden };
|