@stonecrop/atable 0.2.63 → 0.2.64
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/assets/index.css +1 -1
- package/dist/atable.d.ts +3 -3
- package/dist/atable.js +1742 -779
- package/dist/atable.js.map +1 -1
- package/dist/atable.umd.cjs +12 -2
- package/dist/atable.umd.cjs.map +1 -1
- package/dist/index.js +5 -2
- package/dist/src/index.d.ts +2 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/stores/table.d.ts +320 -0
- package/dist/src/stores/table.d.ts.map +1 -0
- package/dist/src/types/index.d.ts +3 -2
- package/dist/src/types/index.d.ts.map +1 -1
- package/dist/stores/table.js +174 -0
- package/package.json +5 -4
- package/src/components/ACell.vue +32 -63
- package/src/components/AExpansionRow.vue +9 -10
- package/src/components/ARow.vue +14 -33
- package/src/components/ATable.vue +47 -57
- package/src/components/ATableHeader.vue +10 -19
- package/src/components/ATableModal.vue +5 -8
- package/src/index.ts +6 -2
- package/src/stores/table.ts +208 -0
- package/src/types/index.ts +1 -3
- package/dist/components/index.js +0 -97
- package/dist/src/components/index.d.ts +0 -23
- package/dist/src/components/index.d.ts.map +0 -1
- package/src/components/index.ts +0 -120
package/dist/atable.js
CHANGED
|
@@ -1,984 +1,1946 @@
|
|
|
1
|
-
import
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
function Re(e) {
|
|
6
|
-
return ie() ? (se(e), !0) : !1;
|
|
1
|
+
import { effectScope as It, ref as O, markRaw as z, toRaw as ae, watch as T, unref as y, hasInjectionContext as nn, inject as on, getCurrentInstance as $e, reactive as sn, isRef as ce, isReactive as Je, toRef as Ee, nextTick as Ae, computed as $, getCurrentScope as Te, onScopeDispose as Pe, toRefs as lt, onMounted as ve, onBeforeUnmount as rn, readonly as ln, customRef as an, defineComponent as K, useTemplateRef as De, withDirectives as Ye, openBlock as I, createElementBlock as N, normalizeStyle as se, normalizeClass as ue, createBlock as Se, resolveDynamicComponent as kt, mergeProps as qe, toDisplayString as de, Fragment as Ce, createElementVNode as re, renderSlot as R, createCommentVNode as fe, vShow as At, renderList as We, createTextVNode as cn, createVNode as at, withCtx as ct } from "vue";
|
|
2
|
+
import './assets/index.css';var Ct = !1;
|
|
3
|
+
function we(e, t, o) {
|
|
4
|
+
return Array.isArray(e) ? (e.length = Math.max(e.length, t), e.splice(t, 1, o), o) : (e[t] = o, o);
|
|
7
5
|
}
|
|
8
|
-
function
|
|
9
|
-
|
|
6
|
+
function je(e, t) {
|
|
7
|
+
if (Array.isArray(e)) {
|
|
8
|
+
e.splice(t, 1);
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
delete e[t];
|
|
12
|
+
}
|
|
13
|
+
function un() {
|
|
14
|
+
return Nt().__VUE_DEVTOOLS_GLOBAL_HOOK__;
|
|
15
|
+
}
|
|
16
|
+
function Nt() {
|
|
17
|
+
return typeof navigator < "u" && typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : {};
|
|
18
|
+
}
|
|
19
|
+
const dn = typeof Proxy == "function", fn = "devtools-plugin:setup", pn = "plugin:settings:set";
|
|
20
|
+
let q, Fe;
|
|
21
|
+
function mn() {
|
|
22
|
+
var e;
|
|
23
|
+
return q !== void 0 || (typeof window < "u" && window.performance ? (q = !0, Fe = window.performance) : typeof globalThis < "u" && (!((e = globalThis.perf_hooks) === null || e === void 0) && e.performance) ? (q = !0, Fe = globalThis.perf_hooks.performance) : q = !1), q;
|
|
24
|
+
}
|
|
25
|
+
function hn() {
|
|
26
|
+
return mn() ? Fe.now() : Date.now();
|
|
27
|
+
}
|
|
28
|
+
class vn {
|
|
29
|
+
constructor(t, o) {
|
|
30
|
+
this.target = null, this.targetQueue = [], this.onQueue = [], this.plugin = t, this.hook = o;
|
|
31
|
+
const n = {};
|
|
32
|
+
if (t.settings)
|
|
33
|
+
for (const s in t.settings) {
|
|
34
|
+
const i = t.settings[s];
|
|
35
|
+
n[s] = i.defaultValue;
|
|
36
|
+
}
|
|
37
|
+
const r = `__vue-devtools-plugin-settings__${t.id}`;
|
|
38
|
+
let l = Object.assign({}, n);
|
|
39
|
+
try {
|
|
40
|
+
const s = localStorage.getItem(r), i = JSON.parse(s);
|
|
41
|
+
Object.assign(l, i);
|
|
42
|
+
} catch {
|
|
43
|
+
}
|
|
44
|
+
this.fallbacks = {
|
|
45
|
+
getSettings() {
|
|
46
|
+
return l;
|
|
47
|
+
},
|
|
48
|
+
setSettings(s) {
|
|
49
|
+
try {
|
|
50
|
+
localStorage.setItem(r, JSON.stringify(s));
|
|
51
|
+
} catch {
|
|
52
|
+
}
|
|
53
|
+
l = s;
|
|
54
|
+
},
|
|
55
|
+
now() {
|
|
56
|
+
return hn();
|
|
57
|
+
}
|
|
58
|
+
}, o && o.on(pn, (s, i) => {
|
|
59
|
+
s === this.plugin.id && this.fallbacks.setSettings(i);
|
|
60
|
+
}), this.proxiedOn = new Proxy({}, {
|
|
61
|
+
get: (s, i) => this.target ? this.target.on[i] : (...a) => {
|
|
62
|
+
this.onQueue.push({
|
|
63
|
+
method: i,
|
|
64
|
+
args: a
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
}), this.proxiedTarget = new Proxy({}, {
|
|
68
|
+
get: (s, i) => this.target ? this.target[i] : i === "on" ? this.proxiedOn : Object.keys(this.fallbacks).includes(i) ? (...a) => (this.targetQueue.push({
|
|
69
|
+
method: i,
|
|
70
|
+
args: a,
|
|
71
|
+
resolve: () => {
|
|
72
|
+
}
|
|
73
|
+
}), this.fallbacks[i](...a)) : (...a) => new Promise((c) => {
|
|
74
|
+
this.targetQueue.push({
|
|
75
|
+
method: i,
|
|
76
|
+
args: a,
|
|
77
|
+
resolve: c
|
|
78
|
+
});
|
|
79
|
+
})
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
async setRealTarget(t) {
|
|
83
|
+
this.target = t;
|
|
84
|
+
for (const o of this.onQueue)
|
|
85
|
+
this.target.on[o.method](...o.args);
|
|
86
|
+
for (const o of this.targetQueue)
|
|
87
|
+
o.resolve(await this.target[o.method](...o.args));
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
function $t(e, t) {
|
|
91
|
+
const o = e, n = Nt(), r = un(), l = dn && o.enableEarlyProxy;
|
|
92
|
+
if (r && (n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !l))
|
|
93
|
+
r.emit(fn, e, t);
|
|
94
|
+
else {
|
|
95
|
+
const s = l ? new vn(o, r) : null;
|
|
96
|
+
(n.__VUE_DEVTOOLS_PLUGINS__ = n.__VUE_DEVTOOLS_PLUGINS__ || []).push({
|
|
97
|
+
pluginDescriptor: o,
|
|
98
|
+
setupFn: t,
|
|
99
|
+
proxy: s
|
|
100
|
+
}), s && t(s.proxiedTarget);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
/*!
|
|
104
|
+
* pinia v2.3.0
|
|
105
|
+
* (c) 2024 Eduardo San Martin Morote
|
|
106
|
+
* @license MIT
|
|
107
|
+
*/
|
|
108
|
+
let ne;
|
|
109
|
+
const pe = (e) => ne = e, Tt = process.env.NODE_ENV !== "production" ? Symbol("pinia") : (
|
|
110
|
+
/* istanbul ignore next */
|
|
111
|
+
Symbol()
|
|
112
|
+
);
|
|
113
|
+
function J(e) {
|
|
114
|
+
return e && typeof e == "object" && Object.prototype.toString.call(e) === "[object Object]" && typeof e.toJSON != "function";
|
|
115
|
+
}
|
|
116
|
+
var j;
|
|
117
|
+
(function(e) {
|
|
118
|
+
e.direct = "direct", e.patchObject = "patch object", e.patchFunction = "patch function";
|
|
119
|
+
})(j || (j = {}));
|
|
120
|
+
const W = typeof window < "u", ut = typeof window == "object" && window.window === window ? window : typeof self == "object" && self.self === self ? self : typeof global == "object" && global.global === global ? global : typeof globalThis == "object" ? globalThis : { HTMLElement: null };
|
|
121
|
+
function gn(e, { autoBom: t = !1 } = {}) {
|
|
122
|
+
return t && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type) ? new Blob(["\uFEFF", e], { type: e.type }) : e;
|
|
123
|
+
}
|
|
124
|
+
function Qe(e, t, o) {
|
|
125
|
+
const n = new XMLHttpRequest();
|
|
126
|
+
n.open("GET", e), n.responseType = "blob", n.onload = function() {
|
|
127
|
+
Vt(n.response, t, o);
|
|
128
|
+
}, n.onerror = function() {
|
|
129
|
+
console.error("could not download file");
|
|
130
|
+
}, n.send();
|
|
131
|
+
}
|
|
132
|
+
function Pt(e) {
|
|
133
|
+
const t = new XMLHttpRequest();
|
|
134
|
+
t.open("HEAD", e, !1);
|
|
135
|
+
try {
|
|
136
|
+
t.send();
|
|
137
|
+
} catch {
|
|
138
|
+
}
|
|
139
|
+
return t.status >= 200 && t.status <= 299;
|
|
140
|
+
}
|
|
141
|
+
function Oe(e) {
|
|
142
|
+
try {
|
|
143
|
+
e.dispatchEvent(new MouseEvent("click"));
|
|
144
|
+
} catch {
|
|
145
|
+
const o = document.createEvent("MouseEvents");
|
|
146
|
+
o.initMouseEvent("click", !0, !0, window, 0, 0, 0, 80, 20, !1, !1, !1, !1, 0, null), e.dispatchEvent(o);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
const _e = typeof navigator == "object" ? navigator : { userAgent: "" }, Dt = /Macintosh/.test(_e.userAgent) && /AppleWebKit/.test(_e.userAgent) && !/Safari/.test(_e.userAgent), Vt = W ? (
|
|
150
|
+
// Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program
|
|
151
|
+
typeof HTMLAnchorElement < "u" && "download" in HTMLAnchorElement.prototype && !Dt ? yn : (
|
|
152
|
+
// Use msSaveOrOpenBlob as a second approach
|
|
153
|
+
"msSaveOrOpenBlob" in _e ? wn : (
|
|
154
|
+
// Fallback to using FileReader and a popup
|
|
155
|
+
bn
|
|
156
|
+
)
|
|
157
|
+
)
|
|
158
|
+
) : () => {
|
|
159
|
+
};
|
|
160
|
+
function yn(e, t = "download", o) {
|
|
161
|
+
const n = document.createElement("a");
|
|
162
|
+
n.download = t, n.rel = "noopener", typeof e == "string" ? (n.href = e, n.origin !== location.origin ? Pt(n.href) ? Qe(e, t, o) : (n.target = "_blank", Oe(n)) : Oe(n)) : (n.href = URL.createObjectURL(e), setTimeout(function() {
|
|
163
|
+
URL.revokeObjectURL(n.href);
|
|
164
|
+
}, 4e4), setTimeout(function() {
|
|
165
|
+
Oe(n);
|
|
166
|
+
}, 0));
|
|
167
|
+
}
|
|
168
|
+
function wn(e, t = "download", o) {
|
|
169
|
+
if (typeof e == "string")
|
|
170
|
+
if (Pt(e))
|
|
171
|
+
Qe(e, t, o);
|
|
172
|
+
else {
|
|
173
|
+
const n = document.createElement("a");
|
|
174
|
+
n.href = e, n.target = "_blank", setTimeout(function() {
|
|
175
|
+
Oe(n);
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
else
|
|
179
|
+
navigator.msSaveOrOpenBlob(gn(e, o), t);
|
|
180
|
+
}
|
|
181
|
+
function bn(e, t, o, n) {
|
|
182
|
+
if (n = n || open("", "_blank"), n && (n.document.title = n.document.body.innerText = "downloading..."), typeof e == "string")
|
|
183
|
+
return Qe(e, t, o);
|
|
184
|
+
const r = e.type === "application/octet-stream", l = /constructor/i.test(String(ut.HTMLElement)) || "safari" in ut, s = /CriOS\/[\d]+/.test(navigator.userAgent);
|
|
185
|
+
if ((s || r && l || Dt) && typeof FileReader < "u") {
|
|
186
|
+
const i = new FileReader();
|
|
187
|
+
i.onloadend = function() {
|
|
188
|
+
let a = i.result;
|
|
189
|
+
if (typeof a != "string")
|
|
190
|
+
throw n = null, new Error("Wrong reader.result type");
|
|
191
|
+
a = s ? a : a.replace(/^data:[^;]*;/, "data:attachment/file;"), n ? n.location.href = a : location.assign(a), n = null;
|
|
192
|
+
}, i.readAsDataURL(e);
|
|
193
|
+
} else {
|
|
194
|
+
const i = URL.createObjectURL(e);
|
|
195
|
+
n ? n.location.assign(i) : location.href = i, n = null, setTimeout(function() {
|
|
196
|
+
URL.revokeObjectURL(i);
|
|
197
|
+
}, 4e4);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
function A(e, t) {
|
|
201
|
+
const o = "🍍 " + e;
|
|
202
|
+
typeof __VUE_DEVTOOLS_TOAST__ == "function" ? __VUE_DEVTOOLS_TOAST__(o, t) : t === "error" ? console.error(o) : t === "warn" ? console.warn(o) : console.log(o);
|
|
203
|
+
}
|
|
204
|
+
function Xe(e) {
|
|
205
|
+
return "_a" in e && "install" in e;
|
|
206
|
+
}
|
|
207
|
+
function Lt() {
|
|
208
|
+
if (!("clipboard" in navigator))
|
|
209
|
+
return A("Your browser doesn't support the Clipboard API", "error"), !0;
|
|
210
|
+
}
|
|
211
|
+
function Rt(e) {
|
|
212
|
+
return e instanceof Error && e.message.toLowerCase().includes("document is not focused") ? (A('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.', "warn"), !0) : !1;
|
|
213
|
+
}
|
|
214
|
+
async function En(e) {
|
|
215
|
+
if (!Lt())
|
|
216
|
+
try {
|
|
217
|
+
await navigator.clipboard.writeText(JSON.stringify(e.state.value)), A("Global state copied to clipboard.");
|
|
218
|
+
} catch (t) {
|
|
219
|
+
if (Rt(t))
|
|
220
|
+
return;
|
|
221
|
+
A("Failed to serialize the state. Check the console for more details.", "error"), console.error(t);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
async function Sn(e) {
|
|
225
|
+
if (!Lt())
|
|
226
|
+
try {
|
|
227
|
+
jt(e, JSON.parse(await navigator.clipboard.readText())), A("Global state pasted from clipboard.");
|
|
228
|
+
} catch (t) {
|
|
229
|
+
if (Rt(t))
|
|
230
|
+
return;
|
|
231
|
+
A("Failed to deserialize the state from clipboard. Check the console for more details.", "error"), console.error(t);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
async function On(e) {
|
|
235
|
+
try {
|
|
236
|
+
Vt(new Blob([JSON.stringify(e.state.value)], {
|
|
237
|
+
type: "text/plain;charset=utf-8"
|
|
238
|
+
}), "pinia-state.json");
|
|
239
|
+
} catch (t) {
|
|
240
|
+
A("Failed to export the state as JSON. Check the console for more details.", "error"), console.error(t);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
let M;
|
|
244
|
+
function _n() {
|
|
245
|
+
M || (M = document.createElement("input"), M.type = "file", M.accept = ".json");
|
|
246
|
+
function e() {
|
|
247
|
+
return new Promise((t, o) => {
|
|
248
|
+
M.onchange = async () => {
|
|
249
|
+
const n = M.files;
|
|
250
|
+
if (!n)
|
|
251
|
+
return t(null);
|
|
252
|
+
const r = n.item(0);
|
|
253
|
+
return t(r ? { text: await r.text(), file: r } : null);
|
|
254
|
+
}, M.oncancel = () => t(null), M.onerror = o, M.click();
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
return e;
|
|
258
|
+
}
|
|
259
|
+
async function xn(e) {
|
|
260
|
+
try {
|
|
261
|
+
const o = await _n()();
|
|
262
|
+
if (!o)
|
|
263
|
+
return;
|
|
264
|
+
const { text: n, file: r } = o;
|
|
265
|
+
jt(e, JSON.parse(n)), A(`Global state imported from "${r.name}".`);
|
|
266
|
+
} catch (t) {
|
|
267
|
+
A("Failed to import the state from JSON. Check the console for more details.", "error"), console.error(t);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
function jt(e, t) {
|
|
271
|
+
for (const o in t) {
|
|
272
|
+
const n = e.state.value[o];
|
|
273
|
+
n ? Object.assign(n, t[o]) : e.state.value[o] = t[o];
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
function L(e) {
|
|
277
|
+
return {
|
|
278
|
+
_custom: {
|
|
279
|
+
display: e
|
|
280
|
+
}
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
const Mt = "🍍 Pinia (root)", xe = "_root";
|
|
284
|
+
function In(e) {
|
|
285
|
+
return Xe(e) ? {
|
|
286
|
+
id: xe,
|
|
287
|
+
label: Mt
|
|
288
|
+
} : {
|
|
289
|
+
id: e.$id,
|
|
290
|
+
label: e.$id
|
|
291
|
+
};
|
|
292
|
+
}
|
|
293
|
+
function kn(e) {
|
|
294
|
+
if (Xe(e)) {
|
|
295
|
+
const o = Array.from(e._s.keys()), n = e._s;
|
|
296
|
+
return {
|
|
297
|
+
state: o.map((l) => ({
|
|
298
|
+
editable: !0,
|
|
299
|
+
key: l,
|
|
300
|
+
value: e.state.value[l]
|
|
301
|
+
})),
|
|
302
|
+
getters: o.filter((l) => n.get(l)._getters).map((l) => {
|
|
303
|
+
const s = n.get(l);
|
|
304
|
+
return {
|
|
305
|
+
editable: !1,
|
|
306
|
+
key: l,
|
|
307
|
+
value: s._getters.reduce((i, a) => (i[a] = s[a], i), {})
|
|
308
|
+
};
|
|
309
|
+
})
|
|
310
|
+
};
|
|
311
|
+
}
|
|
312
|
+
const t = {
|
|
313
|
+
state: Object.keys(e.$state).map((o) => ({
|
|
314
|
+
editable: !0,
|
|
315
|
+
key: o,
|
|
316
|
+
value: e.$state[o]
|
|
317
|
+
}))
|
|
318
|
+
};
|
|
319
|
+
return e._getters && e._getters.length && (t.getters = e._getters.map((o) => ({
|
|
320
|
+
editable: !1,
|
|
321
|
+
key: o,
|
|
322
|
+
value: e[o]
|
|
323
|
+
}))), e._customProperties.size && (t.customProperties = Array.from(e._customProperties).map((o) => ({
|
|
324
|
+
editable: !0,
|
|
325
|
+
key: o,
|
|
326
|
+
value: e[o]
|
|
327
|
+
}))), t;
|
|
328
|
+
}
|
|
329
|
+
function An(e) {
|
|
330
|
+
return e ? Array.isArray(e) ? e.reduce((t, o) => (t.keys.push(o.key), t.operations.push(o.type), t.oldValue[o.key] = o.oldValue, t.newValue[o.key] = o.newValue, t), {
|
|
331
|
+
oldValue: {},
|
|
332
|
+
keys: [],
|
|
333
|
+
operations: [],
|
|
334
|
+
newValue: {}
|
|
335
|
+
}) : {
|
|
336
|
+
operation: L(e.type),
|
|
337
|
+
key: L(e.key),
|
|
338
|
+
oldValue: e.oldValue,
|
|
339
|
+
newValue: e.newValue
|
|
340
|
+
} : {};
|
|
341
|
+
}
|
|
342
|
+
function Cn(e) {
|
|
343
|
+
switch (e) {
|
|
344
|
+
case j.direct:
|
|
345
|
+
return "mutation";
|
|
346
|
+
case j.patchFunction:
|
|
347
|
+
return "$patch";
|
|
348
|
+
case j.patchObject:
|
|
349
|
+
return "$patch";
|
|
350
|
+
default:
|
|
351
|
+
return "unknown";
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
let X = !0;
|
|
355
|
+
const Ie = [], G = "pinia:mutations", C = "pinia", { assign: Nn } = Object, Ne = (e) => "🍍 " + e;
|
|
356
|
+
function $n(e, t) {
|
|
357
|
+
$t({
|
|
358
|
+
id: "dev.esm.pinia",
|
|
359
|
+
label: "Pinia 🍍",
|
|
360
|
+
logo: "https://pinia.vuejs.org/logo.svg",
|
|
361
|
+
packageName: "pinia",
|
|
362
|
+
homepage: "https://pinia.vuejs.org",
|
|
363
|
+
componentStateTypes: Ie,
|
|
364
|
+
app: e
|
|
365
|
+
}, (o) => {
|
|
366
|
+
typeof o.now != "function" && A("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."), o.addTimelineLayer({
|
|
367
|
+
id: G,
|
|
368
|
+
label: "Pinia 🍍",
|
|
369
|
+
color: 15064968
|
|
370
|
+
}), o.addInspector({
|
|
371
|
+
id: C,
|
|
372
|
+
label: "Pinia 🍍",
|
|
373
|
+
icon: "storage",
|
|
374
|
+
treeFilterPlaceholder: "Search stores",
|
|
375
|
+
actions: [
|
|
376
|
+
{
|
|
377
|
+
icon: "content_copy",
|
|
378
|
+
action: () => {
|
|
379
|
+
En(t);
|
|
380
|
+
},
|
|
381
|
+
tooltip: "Serialize and copy the state"
|
|
382
|
+
},
|
|
383
|
+
{
|
|
384
|
+
icon: "content_paste",
|
|
385
|
+
action: async () => {
|
|
386
|
+
await Sn(t), o.sendInspectorTree(C), o.sendInspectorState(C);
|
|
387
|
+
},
|
|
388
|
+
tooltip: "Replace the state with the content of your clipboard"
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
icon: "save",
|
|
392
|
+
action: () => {
|
|
393
|
+
On(t);
|
|
394
|
+
},
|
|
395
|
+
tooltip: "Save the state as a JSON file"
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
icon: "folder_open",
|
|
399
|
+
action: async () => {
|
|
400
|
+
await xn(t), o.sendInspectorTree(C), o.sendInspectorState(C);
|
|
401
|
+
},
|
|
402
|
+
tooltip: "Import the state from a JSON file"
|
|
403
|
+
}
|
|
404
|
+
],
|
|
405
|
+
nodeActions: [
|
|
406
|
+
{
|
|
407
|
+
icon: "restore",
|
|
408
|
+
tooltip: 'Reset the state (with "$reset")',
|
|
409
|
+
action: (n) => {
|
|
410
|
+
const r = t._s.get(n);
|
|
411
|
+
r ? typeof r.$reset != "function" ? A(`Cannot reset "${n}" store because it doesn't have a "$reset" method implemented.`, "warn") : (r.$reset(), A(`Store "${n}" reset.`)) : A(`Cannot reset "${n}" store because it wasn't found.`, "warn");
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
]
|
|
415
|
+
}), o.on.inspectComponent((n, r) => {
|
|
416
|
+
const l = n.componentInstance && n.componentInstance.proxy;
|
|
417
|
+
if (l && l._pStores) {
|
|
418
|
+
const s = n.componentInstance.proxy._pStores;
|
|
419
|
+
Object.values(s).forEach((i) => {
|
|
420
|
+
n.instanceData.state.push({
|
|
421
|
+
type: Ne(i.$id),
|
|
422
|
+
key: "state",
|
|
423
|
+
editable: !0,
|
|
424
|
+
value: i._isOptionsAPI ? {
|
|
425
|
+
_custom: {
|
|
426
|
+
value: ae(i.$state),
|
|
427
|
+
actions: [
|
|
428
|
+
{
|
|
429
|
+
icon: "restore",
|
|
430
|
+
tooltip: "Reset the state of this store",
|
|
431
|
+
action: () => i.$reset()
|
|
432
|
+
}
|
|
433
|
+
]
|
|
434
|
+
}
|
|
435
|
+
} : (
|
|
436
|
+
// NOTE: workaround to unwrap transferred refs
|
|
437
|
+
Object.keys(i.$state).reduce((a, c) => (a[c] = i.$state[c], a), {})
|
|
438
|
+
)
|
|
439
|
+
}), i._getters && i._getters.length && n.instanceData.state.push({
|
|
440
|
+
type: Ne(i.$id),
|
|
441
|
+
key: "getters",
|
|
442
|
+
editable: !1,
|
|
443
|
+
value: i._getters.reduce((a, c) => {
|
|
444
|
+
try {
|
|
445
|
+
a[c] = i[c];
|
|
446
|
+
} catch (d) {
|
|
447
|
+
a[c] = d;
|
|
448
|
+
}
|
|
449
|
+
return a;
|
|
450
|
+
}, {})
|
|
451
|
+
});
|
|
452
|
+
});
|
|
453
|
+
}
|
|
454
|
+
}), o.on.getInspectorTree((n) => {
|
|
455
|
+
if (n.app === e && n.inspectorId === C) {
|
|
456
|
+
let r = [t];
|
|
457
|
+
r = r.concat(Array.from(t._s.values())), n.rootNodes = (n.filter ? r.filter((l) => "$id" in l ? l.$id.toLowerCase().includes(n.filter.toLowerCase()) : Mt.toLowerCase().includes(n.filter.toLowerCase())) : r).map(In);
|
|
458
|
+
}
|
|
459
|
+
}), globalThis.$pinia = t, o.on.getInspectorState((n) => {
|
|
460
|
+
if (n.app === e && n.inspectorId === C) {
|
|
461
|
+
const r = n.nodeId === xe ? t : t._s.get(n.nodeId);
|
|
462
|
+
if (!r)
|
|
463
|
+
return;
|
|
464
|
+
r && (n.nodeId !== xe && (globalThis.$store = ae(r)), n.state = kn(r));
|
|
465
|
+
}
|
|
466
|
+
}), o.on.editInspectorState((n, r) => {
|
|
467
|
+
if (n.app === e && n.inspectorId === C) {
|
|
468
|
+
const l = n.nodeId === xe ? t : t._s.get(n.nodeId);
|
|
469
|
+
if (!l)
|
|
470
|
+
return A(`store "${n.nodeId}" not found`, "error");
|
|
471
|
+
const { path: s } = n;
|
|
472
|
+
Xe(l) ? s.unshift("state") : (s.length !== 1 || !l._customProperties.has(s[0]) || s[0] in l.$state) && s.unshift("$state"), X = !1, n.set(l, s, n.state.value), X = !0;
|
|
473
|
+
}
|
|
474
|
+
}), o.on.editComponentState((n) => {
|
|
475
|
+
if (n.type.startsWith("🍍")) {
|
|
476
|
+
const r = n.type.replace(/^🍍\s*/, ""), l = t._s.get(r);
|
|
477
|
+
if (!l)
|
|
478
|
+
return A(`store "${r}" not found`, "error");
|
|
479
|
+
const { path: s } = n;
|
|
480
|
+
if (s[0] !== "state")
|
|
481
|
+
return A(`Invalid path for store "${r}":
|
|
482
|
+
${s}
|
|
483
|
+
Only state can be modified.`);
|
|
484
|
+
s[0] = "$state", X = !1, n.set(l, s, n.state.value), X = !0;
|
|
485
|
+
}
|
|
486
|
+
});
|
|
487
|
+
});
|
|
488
|
+
}
|
|
489
|
+
function Tn(e, t) {
|
|
490
|
+
Ie.includes(Ne(t.$id)) || Ie.push(Ne(t.$id)), $t({
|
|
491
|
+
id: "dev.esm.pinia",
|
|
492
|
+
label: "Pinia 🍍",
|
|
493
|
+
logo: "https://pinia.vuejs.org/logo.svg",
|
|
494
|
+
packageName: "pinia",
|
|
495
|
+
homepage: "https://pinia.vuejs.org",
|
|
496
|
+
componentStateTypes: Ie,
|
|
497
|
+
app: e,
|
|
498
|
+
settings: {
|
|
499
|
+
logStoreChanges: {
|
|
500
|
+
label: "Notify about new/deleted stores",
|
|
501
|
+
type: "boolean",
|
|
502
|
+
defaultValue: !0
|
|
503
|
+
}
|
|
504
|
+
// useEmojis: {
|
|
505
|
+
// label: 'Use emojis in messages ⚡️',
|
|
506
|
+
// type: 'boolean',
|
|
507
|
+
// defaultValue: true,
|
|
508
|
+
// },
|
|
509
|
+
}
|
|
510
|
+
}, (o) => {
|
|
511
|
+
const n = typeof o.now == "function" ? o.now.bind(o) : Date.now;
|
|
512
|
+
t.$onAction(({ after: s, onError: i, name: a, args: c }) => {
|
|
513
|
+
const d = Ht++;
|
|
514
|
+
o.addTimelineEvent({
|
|
515
|
+
layerId: G,
|
|
516
|
+
event: {
|
|
517
|
+
time: n(),
|
|
518
|
+
title: "🛫 " + a,
|
|
519
|
+
subtitle: "start",
|
|
520
|
+
data: {
|
|
521
|
+
store: L(t.$id),
|
|
522
|
+
action: L(a),
|
|
523
|
+
args: c
|
|
524
|
+
},
|
|
525
|
+
groupId: d
|
|
526
|
+
}
|
|
527
|
+
}), s((f) => {
|
|
528
|
+
F = void 0, o.addTimelineEvent({
|
|
529
|
+
layerId: G,
|
|
530
|
+
event: {
|
|
531
|
+
time: n(),
|
|
532
|
+
title: "🛬 " + a,
|
|
533
|
+
subtitle: "end",
|
|
534
|
+
data: {
|
|
535
|
+
store: L(t.$id),
|
|
536
|
+
action: L(a),
|
|
537
|
+
args: c,
|
|
538
|
+
result: f
|
|
539
|
+
},
|
|
540
|
+
groupId: d
|
|
541
|
+
}
|
|
542
|
+
});
|
|
543
|
+
}), i((f) => {
|
|
544
|
+
F = void 0, o.addTimelineEvent({
|
|
545
|
+
layerId: G,
|
|
546
|
+
event: {
|
|
547
|
+
time: n(),
|
|
548
|
+
logType: "error",
|
|
549
|
+
title: "💥 " + a,
|
|
550
|
+
subtitle: "end",
|
|
551
|
+
data: {
|
|
552
|
+
store: L(t.$id),
|
|
553
|
+
action: L(a),
|
|
554
|
+
args: c,
|
|
555
|
+
error: f
|
|
556
|
+
},
|
|
557
|
+
groupId: d
|
|
558
|
+
}
|
|
559
|
+
});
|
|
560
|
+
});
|
|
561
|
+
}, !0), t._customProperties.forEach((s) => {
|
|
562
|
+
T(() => y(t[s]), (i, a) => {
|
|
563
|
+
o.notifyComponentUpdate(), o.sendInspectorState(C), X && o.addTimelineEvent({
|
|
564
|
+
layerId: G,
|
|
565
|
+
event: {
|
|
566
|
+
time: n(),
|
|
567
|
+
title: "Change",
|
|
568
|
+
subtitle: s,
|
|
569
|
+
data: {
|
|
570
|
+
newValue: i,
|
|
571
|
+
oldValue: a
|
|
572
|
+
},
|
|
573
|
+
groupId: F
|
|
574
|
+
}
|
|
575
|
+
});
|
|
576
|
+
}, { deep: !0 });
|
|
577
|
+
}), t.$subscribe(({ events: s, type: i }, a) => {
|
|
578
|
+
if (o.notifyComponentUpdate(), o.sendInspectorState(C), !X)
|
|
579
|
+
return;
|
|
580
|
+
const c = {
|
|
581
|
+
time: n(),
|
|
582
|
+
title: Cn(i),
|
|
583
|
+
data: Nn({ store: L(t.$id) }, An(s)),
|
|
584
|
+
groupId: F
|
|
585
|
+
};
|
|
586
|
+
i === j.patchFunction ? c.subtitle = "⤵️" : i === j.patchObject ? c.subtitle = "🧩" : s && !Array.isArray(s) && (c.subtitle = s.type), s && (c.data["rawEvent(s)"] = {
|
|
587
|
+
_custom: {
|
|
588
|
+
display: "DebuggerEvent",
|
|
589
|
+
type: "object",
|
|
590
|
+
tooltip: "raw DebuggerEvent[]",
|
|
591
|
+
value: s
|
|
592
|
+
}
|
|
593
|
+
}), o.addTimelineEvent({
|
|
594
|
+
layerId: G,
|
|
595
|
+
event: c
|
|
596
|
+
});
|
|
597
|
+
}, { detached: !0, flush: "sync" });
|
|
598
|
+
const r = t._hotUpdate;
|
|
599
|
+
t._hotUpdate = z((s) => {
|
|
600
|
+
r(s), o.addTimelineEvent({
|
|
601
|
+
layerId: G,
|
|
602
|
+
event: {
|
|
603
|
+
time: n(),
|
|
604
|
+
title: "🔥 " + t.$id,
|
|
605
|
+
subtitle: "HMR update",
|
|
606
|
+
data: {
|
|
607
|
+
store: L(t.$id),
|
|
608
|
+
info: L("HMR update")
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
}), o.notifyComponentUpdate(), o.sendInspectorTree(C), o.sendInspectorState(C);
|
|
612
|
+
});
|
|
613
|
+
const { $dispose: l } = t;
|
|
614
|
+
t.$dispose = () => {
|
|
615
|
+
l(), o.notifyComponentUpdate(), o.sendInspectorTree(C), o.sendInspectorState(C), o.getSettings().logStoreChanges && A(`Disposed "${t.$id}" store 🗑`);
|
|
616
|
+
}, o.notifyComponentUpdate(), o.sendInspectorTree(C), o.sendInspectorState(C), o.getSettings().logStoreChanges && A(`"${t.$id}" store installed 🆕`);
|
|
617
|
+
});
|
|
618
|
+
}
|
|
619
|
+
let Ht = 0, F;
|
|
620
|
+
function dt(e, t, o) {
|
|
621
|
+
const n = t.reduce((r, l) => (r[l] = ae(e)[l], r), {});
|
|
622
|
+
for (const r in n)
|
|
623
|
+
e[r] = function() {
|
|
624
|
+
const l = Ht, s = o ? new Proxy(e, {
|
|
625
|
+
get(...a) {
|
|
626
|
+
return F = l, Reflect.get(...a);
|
|
627
|
+
},
|
|
628
|
+
set(...a) {
|
|
629
|
+
return F = l, Reflect.set(...a);
|
|
630
|
+
}
|
|
631
|
+
}) : e;
|
|
632
|
+
F = l;
|
|
633
|
+
const i = n[r].apply(s, arguments);
|
|
634
|
+
return F = void 0, i;
|
|
635
|
+
};
|
|
10
636
|
}
|
|
11
|
-
|
|
637
|
+
function Pn({ app: e, store: t, options: o }) {
|
|
638
|
+
if (!t.$id.startsWith("__hot:")) {
|
|
639
|
+
if (t._isOptionsAPI = !!o.state, !t._p._testing) {
|
|
640
|
+
dt(t, Object.keys(o.actions), t._isOptionsAPI);
|
|
641
|
+
const n = t._hotUpdate;
|
|
642
|
+
ae(t)._hotUpdate = function(r) {
|
|
643
|
+
n.apply(this, arguments), dt(t, Object.keys(r._hmrPayload.actions), !!t._isOptionsAPI);
|
|
644
|
+
};
|
|
645
|
+
}
|
|
646
|
+
Tn(
|
|
647
|
+
e,
|
|
648
|
+
// FIXME: is there a way to allow the assignment from Store<Id, S, G, A> to StoreGeneric?
|
|
649
|
+
t
|
|
650
|
+
);
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
function Dn() {
|
|
654
|
+
const e = It(!0), t = e.run(() => O({}));
|
|
655
|
+
let o = [], n = [];
|
|
656
|
+
const r = z({
|
|
657
|
+
install(l) {
|
|
658
|
+
pe(r), r._a = l, l.provide(Tt, r), l.config.globalProperties.$pinia = r, process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && W && $n(l, r), n.forEach((s) => o.push(s)), n = [];
|
|
659
|
+
},
|
|
660
|
+
use(l) {
|
|
661
|
+
return !this._a && !Ct ? n.push(l) : o.push(l), this;
|
|
662
|
+
},
|
|
663
|
+
_p: o,
|
|
664
|
+
// it's actually undefined here
|
|
665
|
+
// @ts-expect-error
|
|
666
|
+
_a: null,
|
|
667
|
+
_e: e,
|
|
668
|
+
_s: /* @__PURE__ */ new Map(),
|
|
669
|
+
state: t
|
|
670
|
+
});
|
|
671
|
+
return process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && W && typeof Proxy < "u" && r.use(Pn), r;
|
|
672
|
+
}
|
|
673
|
+
function Ut(e, t) {
|
|
674
|
+
for (const o in t) {
|
|
675
|
+
const n = t[o];
|
|
676
|
+
if (!(o in e))
|
|
677
|
+
continue;
|
|
678
|
+
const r = e[o];
|
|
679
|
+
J(r) && J(n) && !ce(n) && !Je(n) ? e[o] = Ut(r, n) : e[o] = n;
|
|
680
|
+
}
|
|
681
|
+
return e;
|
|
682
|
+
}
|
|
683
|
+
const Wt = () => {
|
|
684
|
+
};
|
|
685
|
+
function ft(e, t, o, n = Wt) {
|
|
686
|
+
e.push(t);
|
|
687
|
+
const r = () => {
|
|
688
|
+
const l = e.indexOf(t);
|
|
689
|
+
l > -1 && (e.splice(l, 1), n());
|
|
690
|
+
};
|
|
691
|
+
return !o && Te() && Pe(r), r;
|
|
692
|
+
}
|
|
693
|
+
function Q(e, ...t) {
|
|
694
|
+
e.slice().forEach((o) => {
|
|
695
|
+
o(...t);
|
|
696
|
+
});
|
|
697
|
+
}
|
|
698
|
+
const Vn = (e) => e(), pt = Symbol(), Me = Symbol();
|
|
699
|
+
function Be(e, t) {
|
|
700
|
+
e instanceof Map && t instanceof Map ? t.forEach((o, n) => e.set(n, o)) : e instanceof Set && t instanceof Set && t.forEach(e.add, e);
|
|
701
|
+
for (const o in t) {
|
|
702
|
+
if (!t.hasOwnProperty(o))
|
|
703
|
+
continue;
|
|
704
|
+
const n = t[o], r = e[o];
|
|
705
|
+
J(r) && J(n) && e.hasOwnProperty(o) && !ce(n) && !Je(n) ? e[o] = Be(r, n) : e[o] = n;
|
|
706
|
+
}
|
|
707
|
+
return e;
|
|
708
|
+
}
|
|
709
|
+
const Ln = process.env.NODE_ENV !== "production" ? Symbol("pinia:skipHydration") : (
|
|
710
|
+
/* istanbul ignore next */
|
|
711
|
+
Symbol()
|
|
712
|
+
);
|
|
713
|
+
function Rn(e) {
|
|
714
|
+
return !J(e) || !e.hasOwnProperty(Ln);
|
|
715
|
+
}
|
|
716
|
+
const { assign: V } = Object;
|
|
717
|
+
function mt(e) {
|
|
718
|
+
return !!(ce(e) && e.effect);
|
|
719
|
+
}
|
|
720
|
+
function ht(e, t, o, n) {
|
|
721
|
+
const { state: r, actions: l, getters: s } = t, i = o.state.value[e];
|
|
722
|
+
let a;
|
|
723
|
+
function c() {
|
|
724
|
+
!i && (process.env.NODE_ENV === "production" || !n) && (o.state.value[e] = r ? r() : {});
|
|
725
|
+
const d = process.env.NODE_ENV !== "production" && n ? (
|
|
726
|
+
// use ref() to unwrap refs inside state TODO: check if this is still necessary
|
|
727
|
+
lt(O(r ? r() : {}).value)
|
|
728
|
+
) : lt(o.state.value[e]);
|
|
729
|
+
return V(d, l, Object.keys(s || {}).reduce((f, u) => (process.env.NODE_ENV !== "production" && u in d && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${u}" in store "${e}".`), f[u] = z($(() => {
|
|
730
|
+
pe(o);
|
|
731
|
+
const m = o._s.get(e);
|
|
732
|
+
return s[u].call(m, m);
|
|
733
|
+
})), f), {}));
|
|
734
|
+
}
|
|
735
|
+
return a = Ge(e, c, t, o, n, !0), a;
|
|
736
|
+
}
|
|
737
|
+
function Ge(e, t, o = {}, n, r, l) {
|
|
738
|
+
let s;
|
|
739
|
+
const i = V({ actions: {} }, o);
|
|
740
|
+
if (process.env.NODE_ENV !== "production" && !n._e.active)
|
|
741
|
+
throw new Error("Pinia destroyed");
|
|
742
|
+
const a = { deep: !0 };
|
|
743
|
+
process.env.NODE_ENV !== "production" && !Ct && (a.onTrigger = (h) => {
|
|
744
|
+
c ? m = h : c == !1 && !w._hotUpdating && (Array.isArray(m) ? m.push(h) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."));
|
|
745
|
+
});
|
|
746
|
+
let c, d, f = [], u = [], m;
|
|
747
|
+
const v = n.state.value[e];
|
|
748
|
+
!l && !v && (process.env.NODE_ENV === "production" || !r) && (n.state.value[e] = {});
|
|
749
|
+
const x = O({});
|
|
750
|
+
let _;
|
|
751
|
+
function S(h) {
|
|
752
|
+
let p;
|
|
753
|
+
c = d = !1, process.env.NODE_ENV !== "production" && (m = []), typeof h == "function" ? (h(n.state.value[e]), p = {
|
|
754
|
+
type: j.patchFunction,
|
|
755
|
+
storeId: e,
|
|
756
|
+
events: m
|
|
757
|
+
}) : (Be(n.state.value[e], h), p = {
|
|
758
|
+
type: j.patchObject,
|
|
759
|
+
payload: h,
|
|
760
|
+
storeId: e,
|
|
761
|
+
events: m
|
|
762
|
+
});
|
|
763
|
+
const b = _ = Symbol();
|
|
764
|
+
Ae().then(() => {
|
|
765
|
+
_ === b && (c = !0);
|
|
766
|
+
}), d = !0, Q(f, p, n.state.value[e]);
|
|
767
|
+
}
|
|
768
|
+
const P = l ? function() {
|
|
769
|
+
const { state: p } = o, b = p ? p() : {};
|
|
770
|
+
this.$patch((k) => {
|
|
771
|
+
V(k, b);
|
|
772
|
+
});
|
|
773
|
+
} : (
|
|
774
|
+
/* istanbul ignore next */
|
|
775
|
+
process.env.NODE_ENV !== "production" ? () => {
|
|
776
|
+
throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`);
|
|
777
|
+
} : Wt
|
|
778
|
+
);
|
|
779
|
+
function ye() {
|
|
780
|
+
s.stop(), f = [], u = [], n._s.delete(e);
|
|
781
|
+
}
|
|
782
|
+
const ee = (h, p = "") => {
|
|
783
|
+
if (pt in h)
|
|
784
|
+
return h[Me] = p, h;
|
|
785
|
+
const b = function() {
|
|
786
|
+
pe(n);
|
|
787
|
+
const k = Array.from(arguments), Y = [], Re = [];
|
|
788
|
+
function en(D) {
|
|
789
|
+
Y.push(D);
|
|
790
|
+
}
|
|
791
|
+
function tn(D) {
|
|
792
|
+
Re.push(D);
|
|
793
|
+
}
|
|
794
|
+
Q(u, {
|
|
795
|
+
args: k,
|
|
796
|
+
name: b[Me],
|
|
797
|
+
store: w,
|
|
798
|
+
after: en,
|
|
799
|
+
onError: tn
|
|
800
|
+
});
|
|
801
|
+
let te;
|
|
802
|
+
try {
|
|
803
|
+
te = h.apply(this && this.$id === e ? this : w, k);
|
|
804
|
+
} catch (D) {
|
|
805
|
+
throw Q(Re, D), D;
|
|
806
|
+
}
|
|
807
|
+
return te instanceof Promise ? te.then((D) => (Q(Y, D), D)).catch((D) => (Q(Re, D), Promise.reject(D))) : (Q(Y, te), te);
|
|
808
|
+
};
|
|
809
|
+
return b[pt] = !0, b[Me] = p, b;
|
|
810
|
+
}, B = /* @__PURE__ */ z({
|
|
811
|
+
actions: {},
|
|
812
|
+
getters: {},
|
|
813
|
+
state: [],
|
|
814
|
+
hotState: x
|
|
815
|
+
}), Le = {
|
|
816
|
+
_p: n,
|
|
817
|
+
// _s: scope,
|
|
818
|
+
$id: e,
|
|
819
|
+
$onAction: ft.bind(null, u),
|
|
820
|
+
$patch: S,
|
|
821
|
+
$reset: P,
|
|
822
|
+
$subscribe(h, p = {}) {
|
|
823
|
+
const b = ft(f, h, p.detached, () => k()), k = s.run(() => T(() => n.state.value[e], (Y) => {
|
|
824
|
+
(p.flush === "sync" ? d : c) && h({
|
|
825
|
+
storeId: e,
|
|
826
|
+
type: j.direct,
|
|
827
|
+
events: m
|
|
828
|
+
}, Y);
|
|
829
|
+
}, V({}, a, p)));
|
|
830
|
+
return b;
|
|
831
|
+
},
|
|
832
|
+
$dispose: ye
|
|
833
|
+
}, w = sn(process.env.NODE_ENV !== "production" || process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && W ? V(
|
|
834
|
+
{
|
|
835
|
+
_hmrPayload: B,
|
|
836
|
+
_customProperties: z(/* @__PURE__ */ new Set())
|
|
837
|
+
// devtools custom properties
|
|
838
|
+
},
|
|
839
|
+
Le
|
|
840
|
+
// must be added later
|
|
841
|
+
// setupStore
|
|
842
|
+
) : Le);
|
|
843
|
+
n._s.set(e, w);
|
|
844
|
+
const E = (n._a && n._a.runWithContext || Vn)(() => n._e.run(() => (s = It()).run(() => t({ action: ee }))));
|
|
845
|
+
for (const h in E) {
|
|
846
|
+
const p = E[h];
|
|
847
|
+
if (ce(p) && !mt(p) || Je(p))
|
|
848
|
+
process.env.NODE_ENV !== "production" && r ? we(x.value, h, Ee(E, h)) : l || (v && Rn(p) && (ce(p) ? p.value = v[h] : Be(p, v[h])), n.state.value[e][h] = p), process.env.NODE_ENV !== "production" && B.state.push(h);
|
|
849
|
+
else if (typeof p == "function") {
|
|
850
|
+
const b = process.env.NODE_ENV !== "production" && r ? p : ee(p, h);
|
|
851
|
+
E[h] = b, process.env.NODE_ENV !== "production" && (B.actions[h] = p), i.actions[h] = p;
|
|
852
|
+
} else process.env.NODE_ENV !== "production" && mt(p) && (B.getters[h] = l ? (
|
|
853
|
+
// @ts-expect-error
|
|
854
|
+
o.getters[h]
|
|
855
|
+
) : p, W && (E._getters || // @ts-expect-error: same
|
|
856
|
+
(E._getters = z([]))).push(h));
|
|
857
|
+
}
|
|
858
|
+
if (V(w, E), V(ae(w), E), Object.defineProperty(w, "$state", {
|
|
859
|
+
get: () => process.env.NODE_ENV !== "production" && r ? x.value : n.state.value[e],
|
|
860
|
+
set: (h) => {
|
|
861
|
+
if (process.env.NODE_ENV !== "production" && r)
|
|
862
|
+
throw new Error("cannot set hotState");
|
|
863
|
+
S((p) => {
|
|
864
|
+
V(p, h);
|
|
865
|
+
});
|
|
866
|
+
}
|
|
867
|
+
}), process.env.NODE_ENV !== "production" && (w._hotUpdate = z((h) => {
|
|
868
|
+
w._hotUpdating = !0, h._hmrPayload.state.forEach((p) => {
|
|
869
|
+
if (p in w.$state) {
|
|
870
|
+
const b = h.$state[p], k = w.$state[p];
|
|
871
|
+
typeof b == "object" && J(b) && J(k) ? Ut(b, k) : h.$state[p] = k;
|
|
872
|
+
}
|
|
873
|
+
we(w, p, Ee(h.$state, p));
|
|
874
|
+
}), Object.keys(w.$state).forEach((p) => {
|
|
875
|
+
p in h.$state || je(w, p);
|
|
876
|
+
}), c = !1, d = !1, n.state.value[e] = Ee(h._hmrPayload, "hotState"), d = !0, Ae().then(() => {
|
|
877
|
+
c = !0;
|
|
878
|
+
});
|
|
879
|
+
for (const p in h._hmrPayload.actions) {
|
|
880
|
+
const b = h[p];
|
|
881
|
+
we(w, p, ee(b, p));
|
|
882
|
+
}
|
|
883
|
+
for (const p in h._hmrPayload.getters) {
|
|
884
|
+
const b = h._hmrPayload.getters[p], k = l ? (
|
|
885
|
+
// special handling of options api
|
|
886
|
+
$(() => (pe(n), b.call(w, w)))
|
|
887
|
+
) : b;
|
|
888
|
+
we(w, p, k);
|
|
889
|
+
}
|
|
890
|
+
Object.keys(w._hmrPayload.getters).forEach((p) => {
|
|
891
|
+
p in h._hmrPayload.getters || je(w, p);
|
|
892
|
+
}), Object.keys(w._hmrPayload.actions).forEach((p) => {
|
|
893
|
+
p in h._hmrPayload.actions || je(w, p);
|
|
894
|
+
}), w._hmrPayload = h._hmrPayload, w._getters = h._getters, w._hotUpdating = !1;
|
|
895
|
+
})), process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && W) {
|
|
896
|
+
const h = {
|
|
897
|
+
writable: !0,
|
|
898
|
+
configurable: !0,
|
|
899
|
+
// avoid warning on devtools trying to display this property
|
|
900
|
+
enumerable: !1
|
|
901
|
+
};
|
|
902
|
+
["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((p) => {
|
|
903
|
+
Object.defineProperty(w, p, V({ value: w[p] }, h));
|
|
904
|
+
});
|
|
905
|
+
}
|
|
906
|
+
return n._p.forEach((h) => {
|
|
907
|
+
if (process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && W) {
|
|
908
|
+
const p = s.run(() => h({
|
|
909
|
+
store: w,
|
|
910
|
+
app: n._a,
|
|
911
|
+
pinia: n,
|
|
912
|
+
options: i
|
|
913
|
+
}));
|
|
914
|
+
Object.keys(p || {}).forEach((b) => w._customProperties.add(b)), V(w, p);
|
|
915
|
+
} else
|
|
916
|
+
V(w, s.run(() => h({
|
|
917
|
+
store: w,
|
|
918
|
+
app: n._a,
|
|
919
|
+
pinia: n,
|
|
920
|
+
options: i
|
|
921
|
+
})));
|
|
922
|
+
}), process.env.NODE_ENV !== "production" && w.$state && typeof w.$state == "object" && typeof w.$state.constructor == "function" && !w.$state.constructor.toString().includes("[native code]") && console.warn(`[🍍]: The "state" must be a plain object. It cannot be
|
|
923
|
+
state: () => new MyClass()
|
|
924
|
+
Found in store "${w.$id}".`), v && l && o.hydrate && o.hydrate(w.$state, v), c = !0, d = !0, w;
|
|
925
|
+
}
|
|
926
|
+
/*! #__NO_SIDE_EFFECTS__ */
|
|
927
|
+
// @__NO_SIDE_EFFECTS__
|
|
928
|
+
function jn(e, t, o) {
|
|
929
|
+
let n, r;
|
|
930
|
+
const l = typeof t == "function";
|
|
931
|
+
if (typeof e == "string")
|
|
932
|
+
n = e, r = l ? o : t;
|
|
933
|
+
else if (r = e, n = e.id, process.env.NODE_ENV !== "production" && typeof n != "string")
|
|
934
|
+
throw new Error('[🍍]: "defineStore()" must be passed a store id as its first argument.');
|
|
935
|
+
function s(i, a) {
|
|
936
|
+
const c = nn();
|
|
937
|
+
if (i = // in test mode, ignore the argument provided as we can always retrieve a
|
|
938
|
+
// pinia instance with getActivePinia()
|
|
939
|
+
(process.env.NODE_ENV === "test" && ne && ne._testing ? null : i) || (c ? on(Tt, null) : null), i && pe(i), process.env.NODE_ENV !== "production" && !ne)
|
|
940
|
+
throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
|
|
941
|
+
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
|
|
942
|
+
This will fail in production.`);
|
|
943
|
+
i = ne, i._s.has(n) || (l ? Ge(n, t, r, i) : ht(n, r, i), process.env.NODE_ENV !== "production" && (s._pinia = i));
|
|
944
|
+
const d = i._s.get(n);
|
|
945
|
+
if (process.env.NODE_ENV !== "production" && a) {
|
|
946
|
+
const f = "__hot:" + n, u = l ? Ge(f, t, r, i, !0) : ht(f, V({}, r), i, !0);
|
|
947
|
+
a._hotUpdate(u), delete i.state.value[f], i._s.delete(f);
|
|
948
|
+
}
|
|
949
|
+
if (process.env.NODE_ENV !== "production" && W) {
|
|
950
|
+
const f = $e();
|
|
951
|
+
if (f && f.proxy && // avoid adding stores that are just built for hot module replacement
|
|
952
|
+
!a) {
|
|
953
|
+
const u = f.proxy, m = "_pStores" in u ? u._pStores : u._pStores = {};
|
|
954
|
+
m[n] = d;
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
return d;
|
|
958
|
+
}
|
|
959
|
+
return s.$id = n, s;
|
|
960
|
+
}
|
|
961
|
+
function Ft(e) {
|
|
962
|
+
return Te() ? (Pe(e), !0) : !1;
|
|
963
|
+
}
|
|
964
|
+
function Ze(e) {
|
|
965
|
+
return typeof e == "function" ? e() : y(e);
|
|
966
|
+
}
|
|
967
|
+
const Mn = typeof window < "u" && typeof document < "u";
|
|
12
968
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
13
|
-
const
|
|
14
|
-
},
|
|
15
|
-
function
|
|
969
|
+
const Hn = (e) => e != null, Un = Object.prototype.toString, Wn = (e) => Un.call(e) === "[object Object]", Fn = () => {
|
|
970
|
+
}, ge = Mn ? window : void 0;
|
|
971
|
+
function me(e) {
|
|
16
972
|
var t;
|
|
17
|
-
const
|
|
18
|
-
return (t =
|
|
19
|
-
}
|
|
20
|
-
function
|
|
21
|
-
let t,
|
|
22
|
-
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([
|
|
23
|
-
return
|
|
24
|
-
Array.isArray(
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
},
|
|
28
|
-
() => [
|
|
29
|
-
([d,
|
|
30
|
-
if (
|
|
973
|
+
const o = Ze(e);
|
|
974
|
+
return (t = o == null ? void 0 : o.$el) != null ? t : o;
|
|
975
|
+
}
|
|
976
|
+
function he(...e) {
|
|
977
|
+
let t, o, n, r;
|
|
978
|
+
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([o, n, r] = e, t = ge) : [t, o, n, r] = e, !t)
|
|
979
|
+
return Fn;
|
|
980
|
+
Array.isArray(o) || (o = [o]), Array.isArray(n) || (n = [n]);
|
|
981
|
+
const l = [], s = () => {
|
|
982
|
+
l.forEach((d) => d()), l.length = 0;
|
|
983
|
+
}, i = (d, f, u, m) => (d.addEventListener(f, u, m), () => d.removeEventListener(f, u, m)), a = T(
|
|
984
|
+
() => [me(t), Ze(r)],
|
|
985
|
+
([d, f]) => {
|
|
986
|
+
if (s(), !d)
|
|
31
987
|
return;
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
...
|
|
988
|
+
const u = Wn(f) ? { ...f } : f;
|
|
989
|
+
l.push(
|
|
990
|
+
...o.flatMap((m) => n.map((v) => i(d, m, v, u)))
|
|
35
991
|
);
|
|
36
992
|
},
|
|
37
993
|
{ immediate: !0, flush: "post" }
|
|
38
|
-
),
|
|
39
|
-
|
|
994
|
+
), c = () => {
|
|
995
|
+
a(), s();
|
|
40
996
|
};
|
|
41
|
-
return
|
|
997
|
+
return Ft(c), c;
|
|
42
998
|
}
|
|
43
|
-
function
|
|
44
|
-
const e =
|
|
45
|
-
return t &&
|
|
999
|
+
function Bn() {
|
|
1000
|
+
const e = O(!1), t = $e();
|
|
1001
|
+
return t && ve(() => {
|
|
46
1002
|
e.value = !0;
|
|
47
1003
|
}, t), e;
|
|
48
1004
|
}
|
|
49
|
-
function
|
|
50
|
-
const t =
|
|
51
|
-
return
|
|
1005
|
+
function Gn(e) {
|
|
1006
|
+
const t = Bn();
|
|
1007
|
+
return $(() => (t.value, !!e()));
|
|
52
1008
|
}
|
|
53
|
-
function
|
|
54
|
-
const { window:
|
|
55
|
-
let
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
},
|
|
59
|
-
const
|
|
60
|
-
return new Set(
|
|
61
|
-
}),
|
|
62
|
-
() =>
|
|
63
|
-
(
|
|
64
|
-
|
|
1009
|
+
function zn(e, t, o = {}) {
|
|
1010
|
+
const { window: n = ge, ...r } = o;
|
|
1011
|
+
let l;
|
|
1012
|
+
const s = Gn(() => n && "MutationObserver" in n), i = () => {
|
|
1013
|
+
l && (l.disconnect(), l = void 0);
|
|
1014
|
+
}, a = $(() => {
|
|
1015
|
+
const u = Ze(e), m = (Array.isArray(u) ? u : [u]).map(me).filter(Hn);
|
|
1016
|
+
return new Set(m);
|
|
1017
|
+
}), c = T(
|
|
1018
|
+
() => a.value,
|
|
1019
|
+
(u) => {
|
|
1020
|
+
i(), s.value && u.size && (l = new MutationObserver(t), u.forEach((m) => l.observe(m, r)));
|
|
65
1021
|
},
|
|
66
1022
|
{ immediate: !0, flush: "post" }
|
|
67
|
-
), d = () =>
|
|
68
|
-
|
|
1023
|
+
), d = () => l == null ? void 0 : l.takeRecords(), f = () => {
|
|
1024
|
+
c(), i();
|
|
69
1025
|
};
|
|
70
|
-
return
|
|
71
|
-
isSupported:
|
|
72
|
-
stop:
|
|
1026
|
+
return Ft(f), {
|
|
1027
|
+
isSupported: s,
|
|
1028
|
+
stop: f,
|
|
73
1029
|
takeRecords: d
|
|
74
1030
|
};
|
|
75
1031
|
}
|
|
76
|
-
function
|
|
1032
|
+
function Jn(e = {}) {
|
|
77
1033
|
var t;
|
|
78
1034
|
const {
|
|
79
|
-
window:
|
|
80
|
-
deep:
|
|
81
|
-
triggerOnRemoval:
|
|
82
|
-
} = e,
|
|
83
|
-
var
|
|
84
|
-
let d =
|
|
85
|
-
if (
|
|
1035
|
+
window: o = ge,
|
|
1036
|
+
deep: n = !0,
|
|
1037
|
+
triggerOnRemoval: r = !1
|
|
1038
|
+
} = e, l = (t = e.document) != null ? t : o == null ? void 0 : o.document, s = () => {
|
|
1039
|
+
var c;
|
|
1040
|
+
let d = l == null ? void 0 : l.activeElement;
|
|
1041
|
+
if (n)
|
|
86
1042
|
for (; d != null && d.shadowRoot; )
|
|
87
|
-
d = (
|
|
1043
|
+
d = (c = d == null ? void 0 : d.shadowRoot) == null ? void 0 : c.activeElement;
|
|
88
1044
|
return d;
|
|
89
|
-
},
|
|
90
|
-
|
|
1045
|
+
}, i = O(), a = () => {
|
|
1046
|
+
i.value = s();
|
|
91
1047
|
};
|
|
92
|
-
return
|
|
93
|
-
|
|
94
|
-
}, !0),
|
|
95
|
-
|
|
96
|
-
d ===
|
|
1048
|
+
return o && (he(o, "blur", (c) => {
|
|
1049
|
+
c.relatedTarget === null && a();
|
|
1050
|
+
}, !0), he(o, "focus", a, !0)), r && zn(l, (c) => {
|
|
1051
|
+
c.filter((d) => d.removedNodes.length).map((d) => Array.from(d.removedNodes)).flat().forEach((d) => {
|
|
1052
|
+
d === i.value && a();
|
|
97
1053
|
});
|
|
98
1054
|
}, {
|
|
99
1055
|
childList: !0,
|
|
100
1056
|
subtree: !0
|
|
101
|
-
}),
|
|
1057
|
+
}), a(), i;
|
|
102
1058
|
}
|
|
103
|
-
const
|
|
104
|
-
function
|
|
105
|
-
const { window:
|
|
106
|
-
return !
|
|
1059
|
+
const Yn = "focusin", qn = "focusout";
|
|
1060
|
+
function Qn(e, t = {}) {
|
|
1061
|
+
const { window: o = ge } = t, n = $(() => me(e)), r = O(!1), l = $(() => r.value), s = Jn(t);
|
|
1062
|
+
return !o || !s.value ? { focused: l } : (he(n, Yn, () => r.value = !0), he(n, qn, () => r.value = !1), { focused: l });
|
|
107
1063
|
}
|
|
108
|
-
function
|
|
109
|
-
const
|
|
1064
|
+
function Xn(e, { window: t = ge, scrollTarget: o } = {}) {
|
|
1065
|
+
const n = O(!1), r = () => {
|
|
110
1066
|
if (!t) return;
|
|
111
|
-
const
|
|
112
|
-
if (!
|
|
113
|
-
|
|
1067
|
+
const l = t.document, s = me(e);
|
|
1068
|
+
if (!s)
|
|
1069
|
+
n.value = !1;
|
|
114
1070
|
else {
|
|
115
|
-
const
|
|
116
|
-
|
|
1071
|
+
const i = s.getBoundingClientRect();
|
|
1072
|
+
n.value = i.top <= (t.innerHeight || l.documentElement.clientHeight) && i.left <= (t.innerWidth || l.documentElement.clientWidth) && i.bottom >= 0 && i.right >= 0;
|
|
117
1073
|
}
|
|
118
1074
|
};
|
|
119
|
-
return
|
|
120
|
-
() =>
|
|
121
|
-
() =>
|
|
1075
|
+
return T(
|
|
1076
|
+
() => me(e),
|
|
1077
|
+
() => r(),
|
|
122
1078
|
{ immediate: !0, flush: "post" }
|
|
123
|
-
), t &&
|
|
1079
|
+
), t && he(o || t, "scroll", r, {
|
|
124
1080
|
capture: !1,
|
|
125
1081
|
passive: !0
|
|
126
|
-
}),
|
|
1082
|
+
}), n;
|
|
127
1083
|
}
|
|
128
|
-
const
|
|
129
|
-
let t =
|
|
1084
|
+
const H = (e) => {
|
|
1085
|
+
let t = Xn(e).value;
|
|
130
1086
|
return t = t && e.offsetHeight > 0, t;
|
|
131
|
-
},
|
|
1087
|
+
}, U = (e) => e.tabIndex >= 0, vt = (e) => {
|
|
132
1088
|
const t = e.target;
|
|
133
|
-
return
|
|
134
|
-
},
|
|
1089
|
+
return Ke(t);
|
|
1090
|
+
}, Ke = (e) => {
|
|
135
1091
|
var t;
|
|
136
|
-
let
|
|
1092
|
+
let o;
|
|
137
1093
|
if (e instanceof HTMLTableCellElement) {
|
|
138
|
-
const
|
|
139
|
-
if (
|
|
140
|
-
const
|
|
141
|
-
|
|
1094
|
+
const n = (t = e.parentElement) == null ? void 0 : t.previousElementSibling;
|
|
1095
|
+
if (n) {
|
|
1096
|
+
const r = Array.from(n.children)[e.cellIndex];
|
|
1097
|
+
r && (o = r);
|
|
142
1098
|
}
|
|
143
1099
|
} else if (e instanceof HTMLTableRowElement) {
|
|
144
|
-
const
|
|
145
|
-
|
|
1100
|
+
const n = e.previousElementSibling;
|
|
1101
|
+
n && (o = n);
|
|
146
1102
|
}
|
|
147
|
-
return
|
|
148
|
-
},
|
|
1103
|
+
return o && (!U(o) || !H(o)) ? Ke(o) : o;
|
|
1104
|
+
}, Zn = (e) => {
|
|
149
1105
|
var t;
|
|
150
|
-
const
|
|
151
|
-
let
|
|
152
|
-
if (
|
|
153
|
-
const
|
|
154
|
-
if (
|
|
155
|
-
const
|
|
156
|
-
|
|
1106
|
+
const o = e.target;
|
|
1107
|
+
let n;
|
|
1108
|
+
if (o instanceof HTMLTableCellElement) {
|
|
1109
|
+
const r = (t = o.parentElement) == null ? void 0 : t.parentElement;
|
|
1110
|
+
if (r) {
|
|
1111
|
+
const l = r.firstElementChild.children[o.cellIndex];
|
|
1112
|
+
l && (n = l);
|
|
157
1113
|
}
|
|
158
|
-
} else if (
|
|
159
|
-
const
|
|
160
|
-
if (
|
|
161
|
-
const
|
|
162
|
-
|
|
1114
|
+
} else if (o instanceof HTMLTableRowElement) {
|
|
1115
|
+
const r = o.parentElement;
|
|
1116
|
+
if (r) {
|
|
1117
|
+
const l = r.firstElementChild;
|
|
1118
|
+
l && (n = l);
|
|
163
1119
|
}
|
|
164
1120
|
}
|
|
165
|
-
return
|
|
166
|
-
},
|
|
1121
|
+
return n && (!U(n) || !H(n)) ? et(n) : n;
|
|
1122
|
+
}, gt = (e) => {
|
|
167
1123
|
const t = e.target;
|
|
168
|
-
return
|
|
169
|
-
},
|
|
1124
|
+
return et(t);
|
|
1125
|
+
}, et = (e) => {
|
|
170
1126
|
var t;
|
|
171
|
-
let
|
|
1127
|
+
let o;
|
|
172
1128
|
if (e instanceof HTMLTableCellElement) {
|
|
173
|
-
const
|
|
174
|
-
if (
|
|
175
|
-
const
|
|
176
|
-
|
|
1129
|
+
const n = (t = e.parentElement) == null ? void 0 : t.nextElementSibling;
|
|
1130
|
+
if (n) {
|
|
1131
|
+
const r = Array.from(n.children)[e.cellIndex];
|
|
1132
|
+
r && (o = r);
|
|
177
1133
|
}
|
|
178
1134
|
} else if (e instanceof HTMLTableRowElement) {
|
|
179
|
-
const
|
|
180
|
-
|
|
1135
|
+
const n = e.nextElementSibling;
|
|
1136
|
+
n && (o = n);
|
|
181
1137
|
}
|
|
182
|
-
return
|
|
183
|
-
},
|
|
1138
|
+
return o && (!U(o) || !H(o)) ? et(o) : o;
|
|
1139
|
+
}, Kn = (e) => {
|
|
184
1140
|
var t;
|
|
185
|
-
const
|
|
186
|
-
let
|
|
187
|
-
if (
|
|
188
|
-
const
|
|
189
|
-
if (
|
|
190
|
-
const
|
|
191
|
-
|
|
1141
|
+
const o = e.target;
|
|
1142
|
+
let n;
|
|
1143
|
+
if (o instanceof HTMLTableCellElement) {
|
|
1144
|
+
const r = (t = o.parentElement) == null ? void 0 : t.parentElement;
|
|
1145
|
+
if (r) {
|
|
1146
|
+
const l = r.lastElementChild.children[o.cellIndex];
|
|
1147
|
+
l && (n = l);
|
|
192
1148
|
}
|
|
193
|
-
} else if (
|
|
194
|
-
const
|
|
195
|
-
if (
|
|
196
|
-
const
|
|
197
|
-
|
|
1149
|
+
} else if (o instanceof HTMLTableRowElement) {
|
|
1150
|
+
const r = o.parentElement;
|
|
1151
|
+
if (r) {
|
|
1152
|
+
const l = r.lastElementChild;
|
|
1153
|
+
l && (n = l);
|
|
198
1154
|
}
|
|
199
1155
|
}
|
|
200
|
-
return
|
|
201
|
-
},
|
|
1156
|
+
return n && (!U(n) || !H(n)) ? Ke(n) : n;
|
|
1157
|
+
}, yt = (e) => {
|
|
202
1158
|
const t = e.target;
|
|
203
|
-
return
|
|
204
|
-
},
|
|
1159
|
+
return tt(t);
|
|
1160
|
+
}, tt = (e) => {
|
|
205
1161
|
var t;
|
|
206
|
-
let
|
|
1162
|
+
let o;
|
|
207
1163
|
if (e.previousElementSibling)
|
|
208
|
-
|
|
1164
|
+
o = e.previousElementSibling;
|
|
209
1165
|
else {
|
|
210
|
-
const
|
|
211
|
-
|
|
1166
|
+
const n = (t = e.parentElement) == null ? void 0 : t.previousElementSibling;
|
|
1167
|
+
o = n == null ? void 0 : n.lastElementChild;
|
|
212
1168
|
}
|
|
213
|
-
return
|
|
214
|
-
},
|
|
1169
|
+
return o && (!U(o) || !H(o)) ? tt(o) : o;
|
|
1170
|
+
}, wt = (e) => {
|
|
215
1171
|
const t = e.target;
|
|
216
|
-
return
|
|
217
|
-
},
|
|
1172
|
+
return nt(t);
|
|
1173
|
+
}, nt = (e) => {
|
|
218
1174
|
var t;
|
|
219
|
-
let
|
|
1175
|
+
let o;
|
|
220
1176
|
if (e.nextElementSibling)
|
|
221
|
-
|
|
1177
|
+
o = e.nextElementSibling;
|
|
222
1178
|
else {
|
|
223
|
-
const
|
|
224
|
-
|
|
1179
|
+
const n = (t = e.parentElement) == null ? void 0 : t.nextElementSibling;
|
|
1180
|
+
o = n == null ? void 0 : n.firstElementChild;
|
|
225
1181
|
}
|
|
226
|
-
return
|
|
227
|
-
},
|
|
1182
|
+
return o && (!U(o) || !H(o)) ? nt(o) : o;
|
|
1183
|
+
}, bt = (e) => {
|
|
228
1184
|
const t = e.target.parentElement.firstElementChild;
|
|
229
|
-
return t && (
|
|
230
|
-
},
|
|
1185
|
+
return t && (!U(t) || !H(t)) ? nt(t) : t;
|
|
1186
|
+
}, Et = (e) => {
|
|
231
1187
|
const t = e.target.parentElement.lastElementChild;
|
|
232
|
-
return t && (
|
|
233
|
-
},
|
|
1188
|
+
return t && (!U(t) || !H(t)) ? tt(t) : t;
|
|
1189
|
+
}, be = ["alt", "control", "shift", "meta"], eo = {
|
|
234
1190
|
ArrowUp: "up",
|
|
235
1191
|
ArrowDown: "down",
|
|
236
1192
|
ArrowLeft: "left",
|
|
237
1193
|
ArrowRight: "right"
|
|
238
|
-
},
|
|
1194
|
+
}, ot = {
|
|
239
1195
|
"keydown.up": (e) => {
|
|
240
|
-
const t =
|
|
1196
|
+
const t = vt(e);
|
|
241
1197
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
242
1198
|
},
|
|
243
1199
|
"keydown.down": (e) => {
|
|
244
|
-
const t =
|
|
1200
|
+
const t = gt(e);
|
|
245
1201
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
246
1202
|
},
|
|
247
1203
|
"keydown.left": (e) => {
|
|
248
|
-
const t =
|
|
1204
|
+
const t = yt(e);
|
|
249
1205
|
e.preventDefault(), e.stopPropagation(), t && t.focus();
|
|
250
1206
|
},
|
|
251
1207
|
"keydown.right": (e) => {
|
|
252
|
-
const t =
|
|
1208
|
+
const t = wt(e);
|
|
253
1209
|
e.preventDefault(), e.stopPropagation(), t && t.focus();
|
|
254
1210
|
},
|
|
255
1211
|
"keydown.control.up": (e) => {
|
|
256
|
-
const t =
|
|
1212
|
+
const t = Zn(e);
|
|
257
1213
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
258
1214
|
},
|
|
259
1215
|
"keydown.control.down": (e) => {
|
|
260
|
-
const t =
|
|
1216
|
+
const t = Kn(e);
|
|
261
1217
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
262
1218
|
},
|
|
263
1219
|
"keydown.control.left": (e) => {
|
|
264
|
-
const t =
|
|
1220
|
+
const t = bt(e);
|
|
265
1221
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
266
1222
|
},
|
|
267
1223
|
"keydown.control.right": (e) => {
|
|
268
|
-
const t =
|
|
1224
|
+
const t = Et(e);
|
|
269
1225
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
270
1226
|
},
|
|
271
1227
|
"keydown.end": (e) => {
|
|
272
|
-
const t =
|
|
1228
|
+
const t = Et(e);
|
|
273
1229
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
274
1230
|
},
|
|
275
1231
|
"keydown.enter": (e) => {
|
|
276
1232
|
if (e.target instanceof HTMLTableCellElement) {
|
|
277
1233
|
e.preventDefault(), e.stopPropagation();
|
|
278
|
-
const t =
|
|
1234
|
+
const t = gt(e);
|
|
279
1235
|
t && t.focus();
|
|
280
1236
|
}
|
|
281
1237
|
},
|
|
282
1238
|
"keydown.shift.enter": (e) => {
|
|
283
1239
|
if (e.target instanceof HTMLTableCellElement) {
|
|
284
1240
|
e.preventDefault(), e.stopPropagation();
|
|
285
|
-
const t =
|
|
1241
|
+
const t = vt(e);
|
|
286
1242
|
t && t.focus();
|
|
287
1243
|
}
|
|
288
1244
|
},
|
|
289
1245
|
"keydown.home": (e) => {
|
|
290
|
-
const t =
|
|
1246
|
+
const t = bt(e);
|
|
291
1247
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
292
1248
|
},
|
|
293
1249
|
"keydown.tab": (e) => {
|
|
294
|
-
const t =
|
|
1250
|
+
const t = wt(e);
|
|
295
1251
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
296
1252
|
},
|
|
297
1253
|
"keydown.shift.tab": (e) => {
|
|
298
|
-
const t =
|
|
1254
|
+
const t = yt(e);
|
|
299
1255
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
300
1256
|
}
|
|
301
1257
|
};
|
|
302
|
-
function
|
|
303
|
-
const t = (
|
|
304
|
-
let
|
|
305
|
-
return
|
|
306
|
-
},
|
|
307
|
-
const
|
|
308
|
-
let
|
|
309
|
-
if (typeof
|
|
310
|
-
|
|
311
|
-
else if (Array.isArray(
|
|
312
|
-
for (const
|
|
313
|
-
|
|
314
|
-
else if (
|
|
315
|
-
|
|
316
|
-
else if (Array.isArray(
|
|
317
|
-
for (const
|
|
318
|
-
|
|
1258
|
+
function st(e) {
|
|
1259
|
+
const t = (s) => {
|
|
1260
|
+
let i = null;
|
|
1261
|
+
return s.parent && (typeof s.parent == "string" ? i = document.querySelector(s.parent) : s.parent instanceof HTMLElement ? i = s.parent : i = s.parent.value), i;
|
|
1262
|
+
}, o = (s) => {
|
|
1263
|
+
const i = t(s);
|
|
1264
|
+
let a = [];
|
|
1265
|
+
if (typeof s.selectors == "string")
|
|
1266
|
+
a = i ? Array.from(i.querySelectorAll(s.selectors)) : Array.from(document.querySelectorAll(s.selectors));
|
|
1267
|
+
else if (Array.isArray(s.selectors))
|
|
1268
|
+
for (const c of s.selectors)
|
|
1269
|
+
c instanceof HTMLElement ? a.push(c) : a.push(c.$el);
|
|
1270
|
+
else if (s.selectors instanceof HTMLElement)
|
|
1271
|
+
a.push(s.selectors);
|
|
1272
|
+
else if (Array.isArray(s.selectors.value))
|
|
1273
|
+
for (const c of s.selectors.value)
|
|
1274
|
+
c instanceof HTMLElement ? a.push(c) : a.push(c.$el);
|
|
319
1275
|
else
|
|
320
|
-
|
|
321
|
-
return
|
|
322
|
-
},
|
|
323
|
-
const
|
|
324
|
-
let
|
|
325
|
-
return
|
|
326
|
-
},
|
|
327
|
-
const
|
|
328
|
-
if (
|
|
329
|
-
const
|
|
330
|
-
for (const d of Object.keys(
|
|
331
|
-
const [
|
|
332
|
-
if (
|
|
333
|
-
const
|
|
334
|
-
const
|
|
335
|
-
return
|
|
1276
|
+
a.push(s.selectors.value);
|
|
1277
|
+
return a;
|
|
1278
|
+
}, n = (s) => {
|
|
1279
|
+
const i = t(s);
|
|
1280
|
+
let a = [];
|
|
1281
|
+
return s.selectors ? a = o(s) : i && (a = Array.from(i.children).filter((c) => U(c) && H(c))), a;
|
|
1282
|
+
}, r = (s) => (i) => {
|
|
1283
|
+
const a = eo[i.key] || i.key.toLowerCase();
|
|
1284
|
+
if (be.includes(a)) return;
|
|
1285
|
+
const c = s.handlers || ot;
|
|
1286
|
+
for (const d of Object.keys(c)) {
|
|
1287
|
+
const [f, ...u] = d.split(".");
|
|
1288
|
+
if (f === "keydown" && u.includes(a)) {
|
|
1289
|
+
const m = c[d], v = u.filter((_) => be.includes(_)), x = be.some((_) => {
|
|
1290
|
+
const S = _.charAt(0).toUpperCase() + _.slice(1);
|
|
1291
|
+
return i.getModifierState(S);
|
|
336
1292
|
});
|
|
337
1293
|
if (v.length > 0) {
|
|
338
|
-
if (
|
|
339
|
-
for (const
|
|
340
|
-
if (
|
|
341
|
-
const
|
|
342
|
-
|
|
1294
|
+
if (x) {
|
|
1295
|
+
for (const _ of be)
|
|
1296
|
+
if (u.includes(_)) {
|
|
1297
|
+
const S = _.charAt(0).toUpperCase() + _.slice(1);
|
|
1298
|
+
i.getModifierState(S) && m(i);
|
|
343
1299
|
}
|
|
344
1300
|
}
|
|
345
1301
|
} else
|
|
346
|
-
|
|
1302
|
+
x || m(i);
|
|
347
1303
|
}
|
|
348
1304
|
}
|
|
349
|
-
},
|
|
350
|
-
|
|
351
|
-
for (const
|
|
352
|
-
const
|
|
353
|
-
for (const
|
|
354
|
-
const { focused:
|
|
355
|
-
v ?
|
|
1305
|
+
}, l = [];
|
|
1306
|
+
ve(() => {
|
|
1307
|
+
for (const s of e) {
|
|
1308
|
+
const i = t(s), a = n(s), c = r(s), d = i ? [i] : a;
|
|
1309
|
+
for (const f of d) {
|
|
1310
|
+
const { focused: u } = Qn(O(f)), m = T(u, (v) => {
|
|
1311
|
+
v ? f.addEventListener("keydown", c) : f.removeEventListener("keydown", c);
|
|
356
1312
|
});
|
|
357
|
-
|
|
1313
|
+
l.push(m);
|
|
358
1314
|
}
|
|
359
1315
|
}
|
|
360
|
-
}),
|
|
361
|
-
for (const
|
|
362
|
-
|
|
1316
|
+
}), rn(() => {
|
|
1317
|
+
for (const s of l)
|
|
1318
|
+
s();
|
|
363
1319
|
});
|
|
364
1320
|
}
|
|
365
|
-
function
|
|
366
|
-
return
|
|
1321
|
+
function Bt(e) {
|
|
1322
|
+
return Te() ? (Pe(e), !0) : !1;
|
|
367
1323
|
}
|
|
368
|
-
function
|
|
369
|
-
return typeof e == "function" ? e() :
|
|
1324
|
+
function ie(e) {
|
|
1325
|
+
return typeof e == "function" ? e() : y(e);
|
|
370
1326
|
}
|
|
371
|
-
const
|
|
1327
|
+
const Gt = typeof window < "u" && typeof document < "u";
|
|
372
1328
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
373
|
-
const
|
|
1329
|
+
const to = Object.prototype.toString, no = (e) => to.call(e) === "[object Object]", le = () => {
|
|
1330
|
+
}, ze = /* @__PURE__ */ oo();
|
|
1331
|
+
function oo() {
|
|
1332
|
+
var e, t;
|
|
1333
|
+
return Gt && ((e = window == null ? void 0 : window.navigator) == null ? void 0 : e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((t = window == null ? void 0 : window.navigator) == null ? void 0 : t.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));
|
|
1334
|
+
}
|
|
1335
|
+
const St = {
|
|
1336
|
+
mounted: "mounted",
|
|
1337
|
+
updated: "updated",
|
|
1338
|
+
unmounted: "unmounted"
|
|
374
1339
|
};
|
|
375
|
-
function
|
|
376
|
-
|
|
1340
|
+
function so(...e) {
|
|
1341
|
+
if (e.length !== 1)
|
|
1342
|
+
return Ee(...e);
|
|
1343
|
+
const t = e[0];
|
|
1344
|
+
return typeof t == "function" ? ln(an(() => ({ get: t, set: le }))) : O(t);
|
|
1345
|
+
}
|
|
1346
|
+
function oe(e) {
|
|
1347
|
+
var t;
|
|
1348
|
+
const o = ie(e);
|
|
1349
|
+
return (t = o == null ? void 0 : o.$el) != null ? t : o;
|
|
1350
|
+
}
|
|
1351
|
+
const zt = Gt ? window : void 0;
|
|
1352
|
+
function ke(...e) {
|
|
1353
|
+
let t, o, n, r;
|
|
1354
|
+
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([o, n, r] = e, t = zt) : [t, o, n, r] = e, !t)
|
|
1355
|
+
return le;
|
|
1356
|
+
Array.isArray(o) || (o = [o]), Array.isArray(n) || (n = [n]);
|
|
1357
|
+
const l = [], s = () => {
|
|
1358
|
+
l.forEach((d) => d()), l.length = 0;
|
|
1359
|
+
}, i = (d, f, u, m) => (d.addEventListener(f, u, m), () => d.removeEventListener(f, u, m)), a = T(
|
|
1360
|
+
() => [oe(t), ie(r)],
|
|
1361
|
+
([d, f]) => {
|
|
1362
|
+
if (s(), !d)
|
|
1363
|
+
return;
|
|
1364
|
+
const u = no(f) ? { ...f } : f;
|
|
1365
|
+
l.push(
|
|
1366
|
+
...o.flatMap((m) => n.map((v) => i(d, m, v, u)))
|
|
1367
|
+
);
|
|
1368
|
+
},
|
|
1369
|
+
{ immediate: !0, flush: "post" }
|
|
1370
|
+
), c = () => {
|
|
1371
|
+
a(), s();
|
|
1372
|
+
};
|
|
1373
|
+
return Bt(c), c;
|
|
377
1374
|
}
|
|
378
|
-
|
|
379
|
-
|
|
1375
|
+
let Ot = !1;
|
|
1376
|
+
function _t(e, t, o = {}) {
|
|
1377
|
+
const { window: n = zt, ignore: r = [], capture: l = !0, detectIframe: s = !1 } = o;
|
|
1378
|
+
if (!n)
|
|
1379
|
+
return le;
|
|
1380
|
+
ze && !Ot && (Ot = !0, Array.from(n.document.body.children).forEach((u) => u.addEventListener("click", le)), n.document.documentElement.addEventListener("click", le));
|
|
1381
|
+
let i = !0;
|
|
1382
|
+
const a = (u) => r.some((m) => {
|
|
1383
|
+
if (typeof m == "string")
|
|
1384
|
+
return Array.from(n.document.querySelectorAll(m)).some((v) => v === u.target || u.composedPath().includes(v));
|
|
1385
|
+
{
|
|
1386
|
+
const v = oe(m);
|
|
1387
|
+
return v && (u.target === v || u.composedPath().includes(v));
|
|
1388
|
+
}
|
|
1389
|
+
}), d = [
|
|
1390
|
+
ke(n, "click", (u) => {
|
|
1391
|
+
const m = oe(e);
|
|
1392
|
+
if (!(!m || m === u.target || u.composedPath().includes(m))) {
|
|
1393
|
+
if (u.detail === 0 && (i = !a(u)), !i) {
|
|
1394
|
+
i = !0;
|
|
1395
|
+
return;
|
|
1396
|
+
}
|
|
1397
|
+
t(u);
|
|
1398
|
+
}
|
|
1399
|
+
}, { passive: !0, capture: l }),
|
|
1400
|
+
ke(n, "pointerdown", (u) => {
|
|
1401
|
+
const m = oe(e);
|
|
1402
|
+
i = !a(u) && !!(m && !u.composedPath().includes(m));
|
|
1403
|
+
}, { passive: !0 }),
|
|
1404
|
+
s && ke(n, "blur", (u) => {
|
|
1405
|
+
setTimeout(() => {
|
|
1406
|
+
var m;
|
|
1407
|
+
const v = oe(e);
|
|
1408
|
+
((m = n.document.activeElement) == null ? void 0 : m.tagName) === "IFRAME" && !(v != null && v.contains(n.document.activeElement)) && t(u);
|
|
1409
|
+
}, 0);
|
|
1410
|
+
})
|
|
1411
|
+
].filter(Boolean);
|
|
1412
|
+
return () => d.forEach((u) => u());
|
|
380
1413
|
}
|
|
381
|
-
const
|
|
382
|
-
|
|
1414
|
+
const ro = {
|
|
1415
|
+
[St.mounted](e, t) {
|
|
1416
|
+
const o = !t.modifiers.bubble;
|
|
1417
|
+
if (typeof t.value == "function")
|
|
1418
|
+
e.__onClickOutside_stop = _t(e, t.value, { capture: o });
|
|
1419
|
+
else {
|
|
1420
|
+
const [n, r] = t.value;
|
|
1421
|
+
e.__onClickOutside_stop = _t(e, n, Object.assign({ capture: o }, r));
|
|
1422
|
+
}
|
|
1423
|
+
},
|
|
1424
|
+
[St.unmounted](e) {
|
|
1425
|
+
e.__onClickOutside_stop();
|
|
1426
|
+
}
|
|
1427
|
+
};
|
|
1428
|
+
function He(e) {
|
|
1429
|
+
return typeof Window < "u" && e instanceof Window ? e.document.documentElement : typeof Document < "u" && e instanceof Document ? e.documentElement : e;
|
|
1430
|
+
}
|
|
1431
|
+
function Jt(e) {
|
|
1432
|
+
const t = window.getComputedStyle(e);
|
|
1433
|
+
if (t.overflowX === "scroll" || t.overflowY === "scroll" || t.overflowX === "auto" && e.clientWidth < e.scrollWidth || t.overflowY === "auto" && e.clientHeight < e.scrollHeight)
|
|
1434
|
+
return !0;
|
|
1435
|
+
{
|
|
1436
|
+
const o = e.parentNode;
|
|
1437
|
+
return !o || o.tagName === "BODY" ? !1 : Jt(o);
|
|
1438
|
+
}
|
|
1439
|
+
}
|
|
1440
|
+
function io(e) {
|
|
1441
|
+
const t = e || window.event, o = t.target;
|
|
1442
|
+
return Jt(o) ? !1 : t.touches.length > 1 ? !0 : (t.preventDefault && t.preventDefault(), !1);
|
|
1443
|
+
}
|
|
1444
|
+
const Ue = /* @__PURE__ */ new WeakMap();
|
|
1445
|
+
function lo(e, t = !1) {
|
|
1446
|
+
const o = O(t);
|
|
1447
|
+
let n = null, r = "";
|
|
1448
|
+
T(so(e), (i) => {
|
|
1449
|
+
const a = He(ie(i));
|
|
1450
|
+
if (a) {
|
|
1451
|
+
const c = a;
|
|
1452
|
+
if (Ue.get(c) || Ue.set(c, c.style.overflow), c.style.overflow !== "hidden" && (r = c.style.overflow), c.style.overflow === "hidden")
|
|
1453
|
+
return o.value = !0;
|
|
1454
|
+
if (o.value)
|
|
1455
|
+
return c.style.overflow = "hidden";
|
|
1456
|
+
}
|
|
1457
|
+
}, {
|
|
1458
|
+
immediate: !0
|
|
1459
|
+
});
|
|
1460
|
+
const l = () => {
|
|
1461
|
+
const i = He(ie(e));
|
|
1462
|
+
!i || o.value || (ze && (n = ke(
|
|
1463
|
+
i,
|
|
1464
|
+
"touchmove",
|
|
1465
|
+
(a) => {
|
|
1466
|
+
io(a);
|
|
1467
|
+
},
|
|
1468
|
+
{ passive: !1 }
|
|
1469
|
+
)), i.style.overflow = "hidden", o.value = !0);
|
|
1470
|
+
}, s = () => {
|
|
1471
|
+
const i = He(ie(e));
|
|
1472
|
+
!i || !o.value || (ze && (n == null || n()), i.style.overflow = r, Ue.delete(i), o.value = !1);
|
|
1473
|
+
};
|
|
1474
|
+
return Bt(s), $({
|
|
1475
|
+
get() {
|
|
1476
|
+
return o.value;
|
|
1477
|
+
},
|
|
1478
|
+
set(i) {
|
|
1479
|
+
i ? l() : s();
|
|
1480
|
+
}
|
|
1481
|
+
});
|
|
1482
|
+
}
|
|
1483
|
+
function ao() {
|
|
1484
|
+
let e = !1;
|
|
1485
|
+
const t = O(!1);
|
|
1486
|
+
return (o, n) => {
|
|
1487
|
+
if (t.value = n.value, e)
|
|
1488
|
+
return;
|
|
1489
|
+
e = !0;
|
|
1490
|
+
const r = lo(o, n.value);
|
|
1491
|
+
T(t, (l) => r.value = l);
|
|
1492
|
+
};
|
|
1493
|
+
}
|
|
1494
|
+
ao();
|
|
1495
|
+
function rt(e) {
|
|
1496
|
+
return Te() ? (Pe(e), !0) : !1;
|
|
1497
|
+
}
|
|
1498
|
+
function Ve(e) {
|
|
1499
|
+
return typeof e == "function" ? e() : y(e);
|
|
1500
|
+
}
|
|
1501
|
+
const co = typeof window < "u" && typeof document < "u";
|
|
1502
|
+
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
1503
|
+
const uo = (e) => e != null, fo = Object.prototype.toString, po = (e) => fo.call(e) === "[object Object]", mo = () => {
|
|
1504
|
+
};
|
|
1505
|
+
function ho(e) {
|
|
1506
|
+
return $e();
|
|
1507
|
+
}
|
|
1508
|
+
function vo(e, t = !0, o) {
|
|
1509
|
+
ho() ? ve(e, o) : t ? e() : Ae(e);
|
|
1510
|
+
}
|
|
1511
|
+
const it = co ? window : void 0;
|
|
1512
|
+
function Z(e) {
|
|
383
1513
|
var t;
|
|
384
|
-
const
|
|
385
|
-
return (t =
|
|
386
|
-
}
|
|
387
|
-
function
|
|
388
|
-
let t,
|
|
389
|
-
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([
|
|
390
|
-
return
|
|
391
|
-
Array.isArray(
|
|
392
|
-
const
|
|
393
|
-
|
|
394
|
-
},
|
|
395
|
-
() => [
|
|
396
|
-
([d,
|
|
397
|
-
if (
|
|
1514
|
+
const o = Ve(e);
|
|
1515
|
+
return (t = o == null ? void 0 : o.$el) != null ? t : o;
|
|
1516
|
+
}
|
|
1517
|
+
function xt(...e) {
|
|
1518
|
+
let t, o, n, r;
|
|
1519
|
+
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([o, n, r] = e, t = it) : [t, o, n, r] = e, !t)
|
|
1520
|
+
return mo;
|
|
1521
|
+
Array.isArray(o) || (o = [o]), Array.isArray(n) || (n = [n]);
|
|
1522
|
+
const l = [], s = () => {
|
|
1523
|
+
l.forEach((d) => d()), l.length = 0;
|
|
1524
|
+
}, i = (d, f, u, m) => (d.addEventListener(f, u, m), () => d.removeEventListener(f, u, m)), a = T(
|
|
1525
|
+
() => [Z(t), Ve(r)],
|
|
1526
|
+
([d, f]) => {
|
|
1527
|
+
if (s(), !d)
|
|
398
1528
|
return;
|
|
399
|
-
const
|
|
400
|
-
|
|
401
|
-
...
|
|
1529
|
+
const u = po(f) ? { ...f } : f;
|
|
1530
|
+
l.push(
|
|
1531
|
+
...o.flatMap((m) => n.map((v) => i(d, m, v, u)))
|
|
402
1532
|
);
|
|
403
1533
|
},
|
|
404
1534
|
{ immediate: !0, flush: "post" }
|
|
405
|
-
),
|
|
406
|
-
|
|
1535
|
+
), c = () => {
|
|
1536
|
+
a(), s();
|
|
407
1537
|
};
|
|
408
|
-
return
|
|
1538
|
+
return rt(c), c;
|
|
409
1539
|
}
|
|
410
|
-
function
|
|
411
|
-
const e =
|
|
412
|
-
return t &&
|
|
1540
|
+
function go() {
|
|
1541
|
+
const e = O(!1), t = $e();
|
|
1542
|
+
return t && ve(() => {
|
|
413
1543
|
e.value = !0;
|
|
414
1544
|
}, t), e;
|
|
415
1545
|
}
|
|
416
|
-
function
|
|
417
|
-
const t =
|
|
418
|
-
return
|
|
1546
|
+
function Yt(e) {
|
|
1547
|
+
const t = go();
|
|
1548
|
+
return $(() => (t.value, !!e()));
|
|
419
1549
|
}
|
|
420
|
-
function
|
|
421
|
-
const { window:
|
|
422
|
-
let
|
|
423
|
-
const
|
|
424
|
-
|
|
425
|
-
},
|
|
426
|
-
const
|
|
427
|
-
return new Set(
|
|
428
|
-
}),
|
|
429
|
-
() =>
|
|
430
|
-
(
|
|
431
|
-
|
|
1550
|
+
function qt(e, t, o = {}) {
|
|
1551
|
+
const { window: n = it, ...r } = o;
|
|
1552
|
+
let l;
|
|
1553
|
+
const s = Yt(() => n && "MutationObserver" in n), i = () => {
|
|
1554
|
+
l && (l.disconnect(), l = void 0);
|
|
1555
|
+
}, a = $(() => {
|
|
1556
|
+
const u = Ve(e), m = (Array.isArray(u) ? u : [u]).map(Z).filter(uo);
|
|
1557
|
+
return new Set(m);
|
|
1558
|
+
}), c = T(
|
|
1559
|
+
() => a.value,
|
|
1560
|
+
(u) => {
|
|
1561
|
+
i(), s.value && u.size && (l = new MutationObserver(t), u.forEach((m) => l.observe(m, r)));
|
|
432
1562
|
},
|
|
433
1563
|
{ immediate: !0, flush: "post" }
|
|
434
|
-
), d = () =>
|
|
435
|
-
|
|
1564
|
+
), d = () => l == null ? void 0 : l.takeRecords(), f = () => {
|
|
1565
|
+
c(), i();
|
|
436
1566
|
};
|
|
437
|
-
return
|
|
438
|
-
isSupported:
|
|
439
|
-
stop:
|
|
1567
|
+
return rt(f), {
|
|
1568
|
+
isSupported: s,
|
|
1569
|
+
stop: f,
|
|
440
1570
|
takeRecords: d
|
|
441
1571
|
};
|
|
442
1572
|
}
|
|
443
|
-
function
|
|
444
|
-
const { window:
|
|
445
|
-
let
|
|
446
|
-
const
|
|
447
|
-
|
|
448
|
-
},
|
|
449
|
-
const
|
|
450
|
-
return Array.isArray(
|
|
451
|
-
}),
|
|
452
|
-
|
|
453
|
-
(
|
|
454
|
-
if (
|
|
455
|
-
|
|
456
|
-
for (const
|
|
457
|
-
|
|
1573
|
+
function yo(e, t, o = {}) {
|
|
1574
|
+
const { window: n = it, ...r } = o;
|
|
1575
|
+
let l;
|
|
1576
|
+
const s = Yt(() => n && "ResizeObserver" in n), i = () => {
|
|
1577
|
+
l && (l.disconnect(), l = void 0);
|
|
1578
|
+
}, a = $(() => {
|
|
1579
|
+
const f = Ve(e);
|
|
1580
|
+
return Array.isArray(f) ? f.map((u) => Z(u)) : [Z(f)];
|
|
1581
|
+
}), c = T(
|
|
1582
|
+
a,
|
|
1583
|
+
(f) => {
|
|
1584
|
+
if (i(), s.value && n) {
|
|
1585
|
+
l = new ResizeObserver(t);
|
|
1586
|
+
for (const u of f)
|
|
1587
|
+
u && l.observe(u, r);
|
|
458
1588
|
}
|
|
459
1589
|
},
|
|
460
1590
|
{ immediate: !0, flush: "post" }
|
|
461
1591
|
), d = () => {
|
|
462
|
-
|
|
1592
|
+
i(), c();
|
|
463
1593
|
};
|
|
464
|
-
return
|
|
465
|
-
isSupported:
|
|
1594
|
+
return rt(d), {
|
|
1595
|
+
isSupported: s,
|
|
466
1596
|
stop: d
|
|
467
1597
|
};
|
|
468
1598
|
}
|
|
469
|
-
function
|
|
1599
|
+
function wo(e, t = {}) {
|
|
470
1600
|
const {
|
|
471
|
-
reset:
|
|
472
|
-
windowResize:
|
|
473
|
-
windowScroll:
|
|
474
|
-
immediate:
|
|
475
|
-
updateTiming:
|
|
476
|
-
} = t,
|
|
477
|
-
function
|
|
478
|
-
const
|
|
479
|
-
if (!
|
|
480
|
-
|
|
1601
|
+
reset: o = !0,
|
|
1602
|
+
windowResize: n = !0,
|
|
1603
|
+
windowScroll: r = !0,
|
|
1604
|
+
immediate: l = !0,
|
|
1605
|
+
updateTiming: s = "sync"
|
|
1606
|
+
} = t, i = O(0), a = O(0), c = O(0), d = O(0), f = O(0), u = O(0), m = O(0), v = O(0);
|
|
1607
|
+
function x() {
|
|
1608
|
+
const S = Z(e);
|
|
1609
|
+
if (!S) {
|
|
1610
|
+
o && (i.value = 0, a.value = 0, c.value = 0, d.value = 0, f.value = 0, u.value = 0, m.value = 0, v.value = 0);
|
|
481
1611
|
return;
|
|
482
1612
|
}
|
|
483
|
-
const
|
|
484
|
-
|
|
1613
|
+
const P = S.getBoundingClientRect();
|
|
1614
|
+
i.value = P.height, a.value = P.bottom, c.value = P.left, d.value = P.right, f.value = P.top, u.value = P.width, m.value = P.x, v.value = P.y;
|
|
485
1615
|
}
|
|
486
|
-
function
|
|
487
|
-
|
|
1616
|
+
function _() {
|
|
1617
|
+
s === "sync" ? x() : s === "next-frame" && requestAnimationFrame(() => x());
|
|
488
1618
|
}
|
|
489
|
-
return
|
|
1619
|
+
return yo(e, _), T(() => Z(e), (S) => !S && _()), qt(e, _, {
|
|
490
1620
|
attributeFilter: ["style", "class"]
|
|
491
|
-
}),
|
|
492
|
-
|
|
1621
|
+
}), r && xt("scroll", _, { capture: !0, passive: !0 }), n && xt("resize", _, { passive: !0 }), vo(() => {
|
|
1622
|
+
l && _();
|
|
493
1623
|
}), {
|
|
494
|
-
height:
|
|
495
|
-
bottom:
|
|
496
|
-
left:
|
|
1624
|
+
height: i,
|
|
1625
|
+
bottom: a,
|
|
1626
|
+
left: c,
|
|
497
1627
|
right: d,
|
|
498
|
-
top:
|
|
499
|
-
width:
|
|
500
|
-
x:
|
|
1628
|
+
top: f,
|
|
1629
|
+
width: u,
|
|
1630
|
+
x: m,
|
|
501
1631
|
y: v,
|
|
502
|
-
update:
|
|
1632
|
+
update: _
|
|
503
1633
|
};
|
|
504
1634
|
}
|
|
505
|
-
const
|
|
1635
|
+
const bo = (e) => {
|
|
506
1636
|
const t = new DOMParser().parseFromString(e, "text/html");
|
|
507
|
-
return Array.from(t.body.childNodes).some((
|
|
508
|
-
},
|
|
1637
|
+
return Array.from(t.body.childNodes).some((o) => o.nodeType === 1);
|
|
1638
|
+
}, Eo = ["data-colindex", "data-rowindex", "data-editable", "contenteditable", "tabindex"], So = ["innerHTML"], Oo = { key: 2 }, Qt = /* @__PURE__ */ K({
|
|
509
1639
|
__name: "ACell",
|
|
510
1640
|
props: {
|
|
511
1641
|
colIndex: {},
|
|
512
1642
|
rowIndex: {},
|
|
513
|
-
|
|
1643
|
+
store: {},
|
|
514
1644
|
addNavigation: { type: [Boolean, Object], default: !0 },
|
|
515
1645
|
tabIndex: { default: 0 },
|
|
516
1646
|
pinned: { type: Boolean }
|
|
517
1647
|
},
|
|
518
1648
|
setup(e) {
|
|
519
|
-
const t =
|
|
520
|
-
var
|
|
1649
|
+
const t = De("cell"), { bottom: o, left: n } = wo(t), r = e.store.getCellData(e.colIndex, e.rowIndex), l = e.store.getCellDisplayValue(e.colIndex, e.rowIndex), s = O(""), i = O(!1), a = e.store.columns[e.colIndex], c = e.store.rows[e.rowIndex], d = a.align || "center", f = a.width || "40ch", u = $(() => typeof l == "string" ? bo(l) : !1), m = $(() => {
|
|
1650
|
+
var S;
|
|
521
1651
|
return {
|
|
522
|
-
textAlign:
|
|
523
|
-
width:
|
|
524
|
-
backgroundColor:
|
|
525
|
-
fontWeight:
|
|
526
|
-
paddingLeft:
|
|
1652
|
+
textAlign: d,
|
|
1653
|
+
width: f,
|
|
1654
|
+
backgroundColor: i.value ? "var(--sc-cell-modified)" : "inherit",
|
|
1655
|
+
fontWeight: i.value ? "bold" : "inherit",
|
|
1656
|
+
paddingLeft: e.store.getIndent(e.colIndex, (S = e.store.display[e.rowIndex]) == null ? void 0 : S.indent)
|
|
527
1657
|
};
|
|
528
|
-
}),
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
const A = r.format;
|
|
533
|
-
return A ? typeof A == "function" ? A(h, { table: f, row: d, column: r }) : typeof A == "string" ? Function(`"use strict";return (${A})`)()(h, { table: f, row: d, column: r }) : h : h;
|
|
534
|
-
}, E = () => {
|
|
535
|
-
r.mask, r.modalComponent && (t.modal.visible = !0, t.modal.colIndex = e.colIndex, t.modal.rowIndex = e.rowIndex, t.modal.parent = n.value, t.modal.top = o.value, t.modal.left = i.value, t.modal.width = c, typeof r.modalComponent == "function" ? t.modal.component = r.modalComponent({ table: f, row: d, column: r }) : t.modal.component = r.modalComponent, t.modal.componentProps = r.modalComponentExtraProps);
|
|
1658
|
+
}), v = () => {
|
|
1659
|
+
a.mask, a.modalComponent && e.store.$patch((S) => {
|
|
1660
|
+
S.modal.visible = !0, S.modal.colIndex = e.colIndex, S.modal.rowIndex = e.rowIndex, S.modal.parent = t.value, S.modal.top = o.value, S.modal.left = n.value, S.modal.width = f, typeof a.modalComponent == "function" ? S.modal.component = a.modalComponent({ table: S.table, row: c, column: a }) : S.modal.component = a.modalComponent, S.modal.componentProps = a.modalComponentExtraProps;
|
|
1661
|
+
});
|
|
536
1662
|
};
|
|
537
1663
|
if (e.addNavigation) {
|
|
538
|
-
let
|
|
539
|
-
...
|
|
540
|
-
"keydown.f2":
|
|
541
|
-
"keydown.alt.up":
|
|
542
|
-
"keydown.alt.down":
|
|
543
|
-
"keydown.alt.left":
|
|
544
|
-
"keydown.alt.right":
|
|
1664
|
+
let S = {
|
|
1665
|
+
...ot,
|
|
1666
|
+
"keydown.f2": v,
|
|
1667
|
+
"keydown.alt.up": v,
|
|
1668
|
+
"keydown.alt.down": v,
|
|
1669
|
+
"keydown.alt.left": v,
|
|
1670
|
+
"keydown.alt.right": v
|
|
545
1671
|
};
|
|
546
|
-
typeof e.addNavigation == "object" && (
|
|
547
|
-
...
|
|
1672
|
+
typeof e.addNavigation == "object" && (S = {
|
|
1673
|
+
...S,
|
|
548
1674
|
...e.addNavigation
|
|
549
|
-
}),
|
|
1675
|
+
}), st([
|
|
550
1676
|
{
|
|
551
|
-
selectors:
|
|
552
|
-
handlers:
|
|
1677
|
+
selectors: t,
|
|
1678
|
+
handlers: S
|
|
553
1679
|
}
|
|
554
1680
|
]);
|
|
555
1681
|
}
|
|
556
|
-
const
|
|
557
|
-
|
|
1682
|
+
const x = () => {
|
|
1683
|
+
t.value && (s.value = t.value.textContent);
|
|
558
1684
|
}, _ = () => {
|
|
559
|
-
|
|
560
|
-
}
|
|
561
|
-
return (
|
|
1685
|
+
t.value && (a.format ? i.value = t.value.textContent !== e.store.getFormattedValue(e.colIndex, e.rowIndex, r) : i.value = t.value.textContent !== r, t.value.textContent !== s.value && (s.value = t.value.textContent, t.value.dispatchEvent(new Event("change")), a.format || e.store.setCellData(e.colIndex, e.rowIndex, s.value)));
|
|
1686
|
+
};
|
|
1687
|
+
return (S, P) => Ye((I(), N("td", {
|
|
562
1688
|
ref: "cell",
|
|
563
|
-
"data-colindex":
|
|
564
|
-
"data-rowindex":
|
|
565
|
-
"data-editable":
|
|
566
|
-
contenteditable:
|
|
567
|
-
tabindex:
|
|
1689
|
+
"data-colindex": S.colIndex,
|
|
1690
|
+
"data-rowindex": S.rowIndex,
|
|
1691
|
+
"data-editable": y(a).edit,
|
|
1692
|
+
contenteditable: y(a).edit,
|
|
1693
|
+
tabindex: S.tabIndex,
|
|
568
1694
|
spellcheck: !1,
|
|
569
|
-
style:
|
|
570
|
-
onFocus:
|
|
1695
|
+
style: se(m.value),
|
|
1696
|
+
onFocus: x,
|
|
571
1697
|
onPaste: _,
|
|
572
1698
|
onBlur: _,
|
|
573
1699
|
onInput: _,
|
|
574
|
-
onClick:
|
|
575
|
-
|
|
576
|
-
class: N(["atable-cell", h.pinned ? "sticky-column" : ""])
|
|
1700
|
+
onClick: v,
|
|
1701
|
+
class: ue(["atable-cell", S.pinned ? "sticky-column" : ""])
|
|
577
1702
|
}, [
|
|
578
|
-
|
|
1703
|
+
y(a).cellComponent ? (I(), Se(kt(y(a).cellComponent), qe({
|
|
579
1704
|
key: 0,
|
|
580
|
-
value:
|
|
581
|
-
},
|
|
1705
|
+
value: y(l)
|
|
1706
|
+
}, y(a).cellComponentProps), null, 16, ["value"])) : u.value ? (I(), N("span", {
|
|
582
1707
|
key: 1,
|
|
583
|
-
innerHTML:
|
|
584
|
-
}, null, 8,
|
|
585
|
-
], 46,
|
|
1708
|
+
innerHTML: y(l)
|
|
1709
|
+
}, null, 8, So)) : (I(), N("span", Oo, de(y(l)), 1))
|
|
1710
|
+
], 46, Eo)), [
|
|
1711
|
+
[y(ro), S.store.closeModal]
|
|
1712
|
+
]);
|
|
586
1713
|
}
|
|
587
|
-
}),
|
|
1714
|
+
}), _o = ["tabindex"], xo = ["tabindex"], Io = ["colspan"], ko = /* @__PURE__ */ K({
|
|
588
1715
|
__name: "AExpansionRow",
|
|
589
1716
|
props: {
|
|
590
1717
|
rowIndex: {},
|
|
591
|
-
|
|
1718
|
+
store: {},
|
|
592
1719
|
tabIndex: { default: () => -1 },
|
|
593
1720
|
addNavigation: { type: [Boolean, Object] }
|
|
594
1721
|
},
|
|
595
1722
|
setup(e) {
|
|
596
|
-
const t =
|
|
1723
|
+
const t = De("rowEl"), o = $(() => e.store.display[e.rowIndex].expanded ? "▼" : "►");
|
|
597
1724
|
if (e.addNavigation) {
|
|
598
|
-
const
|
|
599
|
-
"keydown.control.g": (
|
|
600
|
-
|
|
1725
|
+
const n = {
|
|
1726
|
+
"keydown.control.g": (r) => {
|
|
1727
|
+
r.stopPropagation(), r.preventDefault(), e.store.toggleRowExpand(e.rowIndex);
|
|
601
1728
|
}
|
|
602
1729
|
};
|
|
603
|
-
typeof e.addNavigation == "object" && Object.assign(
|
|
1730
|
+
typeof e.addNavigation == "object" && Object.assign(n, e.addNavigation), st([
|
|
604
1731
|
{
|
|
605
|
-
selectors:
|
|
606
|
-
handlers:
|
|
1732
|
+
selectors: t,
|
|
1733
|
+
handlers: n
|
|
607
1734
|
}
|
|
608
1735
|
]);
|
|
609
1736
|
}
|
|
610
|
-
return (
|
|
611
|
-
|
|
1737
|
+
return (n, r) => (I(), N(Ce, null, [
|
|
1738
|
+
re("tr", qe(n.$attrs, {
|
|
612
1739
|
ref: "rowEl",
|
|
613
|
-
tabindex:
|
|
1740
|
+
tabindex: n.tabIndex,
|
|
614
1741
|
class: "expandable-row"
|
|
615
1742
|
}), [
|
|
616
|
-
|
|
1743
|
+
re("td", {
|
|
617
1744
|
tabIndex: -1,
|
|
618
|
-
onClick:
|
|
1745
|
+
onClick: r[0] || (r[0] = (l) => n.store.toggleRowExpand(n.rowIndex)),
|
|
619
1746
|
class: "row-index"
|
|
620
|
-
},
|
|
621
|
-
|
|
622
|
-
], 16,
|
|
623
|
-
|
|
1747
|
+
}, de(o.value), 1),
|
|
1748
|
+
R(n.$slots, "row")
|
|
1749
|
+
], 16, _o),
|
|
1750
|
+
n.store.display[n.rowIndex].expanded ? (I(), N("tr", {
|
|
624
1751
|
key: 0,
|
|
625
1752
|
ref: "rowExpanded",
|
|
626
|
-
tabindex:
|
|
1753
|
+
tabindex: n.tabIndex,
|
|
627
1754
|
class: "expanded-row"
|
|
628
1755
|
}, [
|
|
629
|
-
|
|
1756
|
+
re("td", {
|
|
630
1757
|
tabIndex: -1,
|
|
631
|
-
colspan:
|
|
1758
|
+
colspan: n.store.columns.length + 1,
|
|
632
1759
|
class: "expanded-row-content"
|
|
633
1760
|
}, [
|
|
634
|
-
|
|
635
|
-
], 8,
|
|
636
|
-
], 8,
|
|
1761
|
+
R(n.$slots, "content")
|
|
1762
|
+
], 8, Io)
|
|
1763
|
+
], 8, xo)) : fe("", !0)
|
|
637
1764
|
], 64));
|
|
638
1765
|
}
|
|
639
|
-
}),
|
|
1766
|
+
}), Ao = ["tabindex"], Xt = /* @__PURE__ */ K({
|
|
640
1767
|
__name: "ARow",
|
|
641
1768
|
props: {
|
|
642
1769
|
rowIndex: {},
|
|
643
|
-
|
|
1770
|
+
store: {},
|
|
644
1771
|
tabIndex: { default: () => -1 },
|
|
645
1772
|
addNavigation: { type: [Boolean, Object], default: !1 }
|
|
646
1773
|
},
|
|
647
1774
|
setup(e) {
|
|
648
|
-
const t =
|
|
649
|
-
t.toggleRowExpand(a);
|
|
650
|
-
};
|
|
1775
|
+
const t = De("rowEl"), o = e.store.isRowVisible(e.rowIndex), n = e.store.getRowExpandSymbol(e.rowIndex);
|
|
651
1776
|
if (e.addNavigation) {
|
|
652
|
-
let
|
|
653
|
-
typeof e.addNavigation == "object" && (
|
|
654
|
-
...
|
|
1777
|
+
let r = ot;
|
|
1778
|
+
typeof e.addNavigation == "object" && (r = {
|
|
1779
|
+
...r,
|
|
655
1780
|
...e.addNavigation
|
|
656
|
-
}),
|
|
1781
|
+
}), st([
|
|
657
1782
|
{
|
|
658
|
-
selectors:
|
|
659
|
-
handlers:
|
|
1783
|
+
selectors: t,
|
|
1784
|
+
handlers: r
|
|
660
1785
|
}
|
|
661
1786
|
]);
|
|
662
1787
|
}
|
|
663
|
-
return (
|
|
1788
|
+
return (r, l) => Ye((I(), N("tr", {
|
|
664
1789
|
ref: "rowEl",
|
|
665
|
-
tabindex:
|
|
1790
|
+
tabindex: r.tabIndex,
|
|
666
1791
|
class: "table-row"
|
|
667
1792
|
}, [
|
|
668
|
-
|
|
669
|
-
|
|
1793
|
+
r.store.config.view !== "uncounted" ? R(r.$slots, "index", { key: 0 }, () => [
|
|
1794
|
+
r.store.config.view === "list" ? (I(), N("td", {
|
|
670
1795
|
key: 0,
|
|
671
1796
|
tabIndex: -1,
|
|
672
|
-
class:
|
|
673
|
-
},
|
|
1797
|
+
class: ue(["list-index", r.store.hasPinnedColumns ? "sticky-index" : ""])
|
|
1798
|
+
}, de(r.rowIndex + 1), 3)) : r.store.config.view === "tree" ? (I(), N("td", {
|
|
674
1799
|
key: 1,
|
|
675
1800
|
tabIndex: -1,
|
|
676
|
-
class:
|
|
677
|
-
onClick:
|
|
678
|
-
},
|
|
679
|
-
]) :
|
|
680
|
-
|
|
681
|
-
], 8,
|
|
682
|
-
[
|
|
1801
|
+
class: ue(["tree-index", r.store.hasPinnedColumns ? "sticky-index" : ""]),
|
|
1802
|
+
onClick: l[0] || (l[0] = (s) => r.store.toggleRowExpand(r.rowIndex))
|
|
1803
|
+
}, de(y(n)), 3)) : fe("", !0)
|
|
1804
|
+
]) : fe("", !0),
|
|
1805
|
+
R(r.$slots, "default")
|
|
1806
|
+
], 8, Ao)), [
|
|
1807
|
+
[At, y(o)]
|
|
683
1808
|
]);
|
|
684
1809
|
}
|
|
685
|
-
})
|
|
686
|
-
function je(e) {
|
|
687
|
-
return ie() ? (se(e), !0) : !1;
|
|
688
|
-
}
|
|
689
|
-
function H(e) {
|
|
690
|
-
return typeof e == "function" ? e() : m(e);
|
|
691
|
-
}
|
|
692
|
-
const Ne = typeof window < "u" && typeof document < "u";
|
|
693
|
-
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
694
|
-
const Lt = Object.prototype.toString, Pt = (e) => Lt.call(e) === "[object Object]", j = () => {
|
|
695
|
-
}, le = /* @__PURE__ */ Wt();
|
|
696
|
-
function Wt() {
|
|
697
|
-
var e, t;
|
|
698
|
-
return Ne && ((e = window == null ? void 0 : window.navigator) == null ? void 0 : e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((t = window == null ? void 0 : window.navigator) == null ? void 0 : t.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));
|
|
699
|
-
}
|
|
700
|
-
const Se = {
|
|
701
|
-
mounted: "mounted",
|
|
702
|
-
updated: "updated",
|
|
703
|
-
unmounted: "unmounted"
|
|
704
|
-
};
|
|
705
|
-
function Ht(...e) {
|
|
706
|
-
if (e.length !== 1)
|
|
707
|
-
return Xe(...e);
|
|
708
|
-
const t = e[0];
|
|
709
|
-
return typeof t == "function" ? Je(Qe(() => ({ get: t, set: j }))) : g(t);
|
|
710
|
-
}
|
|
711
|
-
function L(e) {
|
|
712
|
-
var t;
|
|
713
|
-
const n = H(e);
|
|
714
|
-
return (t = n == null ? void 0 : n.$el) != null ? t : n;
|
|
715
|
-
}
|
|
716
|
-
const Be = Ne ? window : void 0;
|
|
717
|
-
function X(...e) {
|
|
718
|
-
let t, n, o, i;
|
|
719
|
-
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, o, i] = e, t = Be) : [t, n, o, i] = e, !t)
|
|
720
|
-
return j;
|
|
721
|
-
Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);
|
|
722
|
-
const s = [], l = () => {
|
|
723
|
-
s.forEach((d) => d()), s.length = 0;
|
|
724
|
-
}, a = (d, p, c, u) => (d.addEventListener(p, c, u), () => d.removeEventListener(p, c, u)), f = C(
|
|
725
|
-
() => [L(t), H(i)],
|
|
726
|
-
([d, p]) => {
|
|
727
|
-
if (l(), !d)
|
|
728
|
-
return;
|
|
729
|
-
const c = Pt(p) ? { ...p } : p;
|
|
730
|
-
s.push(
|
|
731
|
-
...n.flatMap((u) => o.map((v) => a(d, u, v, c)))
|
|
732
|
-
);
|
|
733
|
-
},
|
|
734
|
-
{ immediate: !0, flush: "post" }
|
|
735
|
-
), r = () => {
|
|
736
|
-
f(), l();
|
|
737
|
-
};
|
|
738
|
-
return je(r), r;
|
|
739
|
-
}
|
|
740
|
-
let Oe = !1;
|
|
741
|
-
function $e(e, t, n = {}) {
|
|
742
|
-
const { window: o = Be, ignore: i = [], capture: s = !0, detectIframe: l = !1 } = n;
|
|
743
|
-
if (!o)
|
|
744
|
-
return j;
|
|
745
|
-
le && !Oe && (Oe = !0, Array.from(o.document.body.children).forEach((c) => c.addEventListener("click", j)), o.document.documentElement.addEventListener("click", j));
|
|
746
|
-
let a = !0;
|
|
747
|
-
const f = (c) => i.some((u) => {
|
|
748
|
-
if (typeof u == "string")
|
|
749
|
-
return Array.from(o.document.querySelectorAll(u)).some((v) => v === c.target || c.composedPath().includes(v));
|
|
750
|
-
{
|
|
751
|
-
const v = L(u);
|
|
752
|
-
return v && (c.target === v || c.composedPath().includes(v));
|
|
753
|
-
}
|
|
754
|
-
}), d = [
|
|
755
|
-
X(o, "click", (c) => {
|
|
756
|
-
const u = L(e);
|
|
757
|
-
if (!(!u || u === c.target || c.composedPath().includes(u))) {
|
|
758
|
-
if (c.detail === 0 && (a = !f(c)), !a) {
|
|
759
|
-
a = !0;
|
|
760
|
-
return;
|
|
761
|
-
}
|
|
762
|
-
t(c);
|
|
763
|
-
}
|
|
764
|
-
}, { passive: !0, capture: s }),
|
|
765
|
-
X(o, "pointerdown", (c) => {
|
|
766
|
-
const u = L(e);
|
|
767
|
-
a = !f(c) && !!(u && !c.composedPath().includes(u));
|
|
768
|
-
}, { passive: !0 }),
|
|
769
|
-
l && X(o, "blur", (c) => {
|
|
770
|
-
setTimeout(() => {
|
|
771
|
-
var u;
|
|
772
|
-
const v = L(e);
|
|
773
|
-
((u = o.document.activeElement) == null ? void 0 : u.tagName) === "IFRAME" && !(v != null && v.contains(o.document.activeElement)) && t(c);
|
|
774
|
-
}, 0);
|
|
775
|
-
})
|
|
776
|
-
].filter(Boolean);
|
|
777
|
-
return () => d.forEach((c) => c());
|
|
778
|
-
}
|
|
779
|
-
const jt = {
|
|
780
|
-
[Se.mounted](e, t) {
|
|
781
|
-
const n = !t.modifiers.bubble;
|
|
782
|
-
if (typeof t.value == "function")
|
|
783
|
-
e.__onClickOutside_stop = $e(e, t.value, { capture: n });
|
|
784
|
-
else {
|
|
785
|
-
const [o, i] = t.value;
|
|
786
|
-
e.__onClickOutside_stop = $e(e, o, Object.assign({ capture: n }, i));
|
|
787
|
-
}
|
|
788
|
-
},
|
|
789
|
-
[Se.unmounted](e) {
|
|
790
|
-
e.__onClickOutside_stop();
|
|
791
|
-
}
|
|
792
|
-
};
|
|
793
|
-
function ee(e) {
|
|
794
|
-
return typeof Window < "u" && e instanceof Window ? e.document.documentElement : typeof Document < "u" && e instanceof Document ? e.documentElement : e;
|
|
795
|
-
}
|
|
796
|
-
function Ve(e) {
|
|
797
|
-
const t = window.getComputedStyle(e);
|
|
798
|
-
if (t.overflowX === "scroll" || t.overflowY === "scroll" || t.overflowX === "auto" && e.clientWidth < e.scrollWidth || t.overflowY === "auto" && e.clientHeight < e.scrollHeight)
|
|
799
|
-
return !0;
|
|
800
|
-
{
|
|
801
|
-
const n = e.parentNode;
|
|
802
|
-
return !n || n.tagName === "BODY" ? !1 : Ve(n);
|
|
803
|
-
}
|
|
804
|
-
}
|
|
805
|
-
function Nt(e) {
|
|
806
|
-
const t = e || window.event, n = t.target;
|
|
807
|
-
return Ve(n) ? !1 : t.touches.length > 1 ? !0 : (t.preventDefault && t.preventDefault(), !1);
|
|
808
|
-
}
|
|
809
|
-
const te = /* @__PURE__ */ new WeakMap();
|
|
810
|
-
function Bt(e, t = !1) {
|
|
811
|
-
const n = g(t);
|
|
812
|
-
let o = null, i = "";
|
|
813
|
-
C(Ht(e), (a) => {
|
|
814
|
-
const f = ee(H(a));
|
|
815
|
-
if (f) {
|
|
816
|
-
const r = f;
|
|
817
|
-
if (te.get(r) || te.set(r, r.style.overflow), r.style.overflow !== "hidden" && (i = r.style.overflow), r.style.overflow === "hidden")
|
|
818
|
-
return n.value = !0;
|
|
819
|
-
if (n.value)
|
|
820
|
-
return r.style.overflow = "hidden";
|
|
821
|
-
}
|
|
822
|
-
}, {
|
|
823
|
-
immediate: !0
|
|
824
|
-
});
|
|
825
|
-
const s = () => {
|
|
826
|
-
const a = ee(H(e));
|
|
827
|
-
!a || n.value || (le && (o = X(
|
|
828
|
-
a,
|
|
829
|
-
"touchmove",
|
|
830
|
-
(f) => {
|
|
831
|
-
Nt(f);
|
|
832
|
-
},
|
|
833
|
-
{ passive: !1 }
|
|
834
|
-
)), a.style.overflow = "hidden", n.value = !0);
|
|
835
|
-
}, l = () => {
|
|
836
|
-
const a = ee(H(e));
|
|
837
|
-
!a || !n.value || (le && (o == null || o()), a.style.overflow = i, te.delete(a), n.value = !1);
|
|
838
|
-
};
|
|
839
|
-
return je(l), x({
|
|
840
|
-
get() {
|
|
841
|
-
return n.value;
|
|
842
|
-
},
|
|
843
|
-
set(a) {
|
|
844
|
-
a ? s() : l();
|
|
845
|
-
}
|
|
846
|
-
});
|
|
847
|
-
}
|
|
848
|
-
function Vt() {
|
|
849
|
-
let e = !1;
|
|
850
|
-
const t = g(!1);
|
|
851
|
-
return (n, o) => {
|
|
852
|
-
if (t.value = o.value, e)
|
|
853
|
-
return;
|
|
854
|
-
e = !0;
|
|
855
|
-
const i = Bt(n, o.value);
|
|
856
|
-
C(t, (s) => i.value = s);
|
|
857
|
-
};
|
|
858
|
-
}
|
|
859
|
-
Vt();
|
|
860
|
-
class zt {
|
|
861
|
-
constructor(t, n, o, i, s, l) {
|
|
862
|
-
T(this, "id");
|
|
863
|
-
T(this, "rows");
|
|
864
|
-
T(this, "columns");
|
|
865
|
-
T(this, "config");
|
|
866
|
-
T(this, "table");
|
|
867
|
-
T(this, "display");
|
|
868
|
-
T(this, "modal");
|
|
869
|
-
this.id = t || crypto.randomUUID(), this.rows = o, this.columns = R(n), this.config = R(i), this.table = s || R(this.createTableObject()), this.display = this.createDisplayObject(l), this.modal = R({ visible: !1 });
|
|
870
|
-
}
|
|
871
|
-
createTableObject() {
|
|
872
|
-
const t = {};
|
|
873
|
-
for (const [n, o] of this.columns.entries())
|
|
874
|
-
for (const [i, s] of this.rows.entries())
|
|
875
|
-
t[`${n}:${i}`] = s[o.name];
|
|
876
|
-
return t;
|
|
877
|
-
}
|
|
878
|
-
createDisplayObject(t) {
|
|
879
|
-
const n = [Object.assign({}, { rowModified: !1 })];
|
|
880
|
-
if (t && "0:0" in t)
|
|
881
|
-
return t;
|
|
882
|
-
const o = /* @__PURE__ */ new Set();
|
|
883
|
-
for (let i = this.rows.length - 1; i >= 0; i--) {
|
|
884
|
-
const s = this.rows[i];
|
|
885
|
-
s.parent && o.add(s.parent), n[i] = {
|
|
886
|
-
childrenOpen: !1,
|
|
887
|
-
expanded: !1,
|
|
888
|
-
indent: s.indent || null,
|
|
889
|
-
isParent: o.has(i),
|
|
890
|
-
isRoot: s.parent === null || s.parent === void 0,
|
|
891
|
-
rowModified: !1,
|
|
892
|
-
open: s.parent === null || s.parent === void 0,
|
|
893
|
-
parent: s.parent
|
|
894
|
-
};
|
|
895
|
-
}
|
|
896
|
-
return R(n);
|
|
897
|
-
}
|
|
898
|
-
get zeroColumn() {
|
|
899
|
-
return ["list", "tree", "list-expansion"].includes(this.config.view);
|
|
900
|
-
}
|
|
901
|
-
get numberedRowWidth() {
|
|
902
|
-
return x(() => String(Math.ceil(this.rows.length / 100) + 1) + "ch");
|
|
903
|
-
}
|
|
904
|
-
cellData(t, n) {
|
|
905
|
-
return this.table[`${t}:${n}`];
|
|
906
|
-
}
|
|
907
|
-
setCellData(t, n, o) {
|
|
908
|
-
const i = `${n}:${t}`, s = this.columns[n];
|
|
909
|
-
return this.table[i] !== o && (this.display[t].rowModified = !0), this.table[i] = o, this.rows[t][s.name] = o, this.table[i];
|
|
910
|
-
}
|
|
911
|
-
toggleRowExpand(t) {
|
|
912
|
-
if (this.config.view === "tree") {
|
|
913
|
-
this.display[t].childrenOpen = !this.display[t].childrenOpen;
|
|
914
|
-
for (let n = this.rows.length - 1; n >= 0; n--)
|
|
915
|
-
this.display[n].parent === t && (this.display[n].open = !this.display[n].open, this.display[n].childrenOpen && this.toggleRowExpand(n));
|
|
916
|
-
} else this.config.view === "list-expansion" && (this.display[t].expanded = !this.display[t].expanded);
|
|
917
|
-
}
|
|
918
|
-
}
|
|
919
|
-
const Ft = {
|
|
1810
|
+
}), Co = {
|
|
920
1811
|
key: 0,
|
|
921
1812
|
id: "resizable"
|
|
922
|
-
},
|
|
1813
|
+
}, No = {
|
|
923
1814
|
class: "atable-header-row",
|
|
924
1815
|
tabindex: "-1"
|
|
925
|
-
},
|
|
1816
|
+
}, Zt = /* @__PURE__ */ K({
|
|
926
1817
|
__name: "ATableHeader",
|
|
927
1818
|
props: {
|
|
928
1819
|
columns: {},
|
|
929
|
-
|
|
1820
|
+
store: {}
|
|
930
1821
|
},
|
|
931
1822
|
setup(e) {
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
width: t.config.fullWidth ? "auto" : null
|
|
936
|
-
});
|
|
937
|
-
return (i, s) => i.columns.length ? (y(), k("thead", Ft, [
|
|
938
|
-
W("tr", Gt, [
|
|
939
|
-
m(t).zeroColumn ? (y(), k("th", {
|
|
1823
|
+
return (t, o) => t.columns.length ? (I(), N("thead", Co, [
|
|
1824
|
+
re("tr", No, [
|
|
1825
|
+
t.store.zeroColumn ? (I(), N("th", {
|
|
940
1826
|
key: 0,
|
|
941
1827
|
id: "header-index",
|
|
942
|
-
class:
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
1828
|
+
class: ue([[
|
|
1829
|
+
t.store.hasPinnedColumns ? "sticky-index" : "",
|
|
1830
|
+
t.store.config.view === "tree" ? "tree-index" : "",
|
|
1831
|
+
t.store.config.view === "list-expansion" ? "list-expansion-index" : ""
|
|
946
1832
|
], "list-index"])
|
|
947
|
-
}, null, 2)) :
|
|
948
|
-
(
|
|
949
|
-
key:
|
|
1833
|
+
}, null, 2)) : fe("", !0),
|
|
1834
|
+
(I(!0), N(Ce, null, We(t.columns, (n, r) => (I(), N("th", {
|
|
1835
|
+
key: n.name,
|
|
950
1836
|
tabindex: "-1",
|
|
951
|
-
style:
|
|
952
|
-
class:
|
|
1837
|
+
style: se(t.store.getHeaderCellStyle(n)),
|
|
1838
|
+
class: ue(n.pinned ? "sticky-column" : "")
|
|
953
1839
|
}, [
|
|
954
|
-
|
|
955
|
-
|
|
1840
|
+
R(t.$slots, "default", {}, () => [
|
|
1841
|
+
cn(de(n.label || String.fromCharCode(r + 97).toUpperCase()), 1)
|
|
956
1842
|
])
|
|
957
1843
|
], 6))), 128))
|
|
958
1844
|
])
|
|
959
|
-
])) :
|
|
1845
|
+
])) : fe("", !0);
|
|
960
1846
|
}
|
|
961
|
-
}),
|
|
1847
|
+
}), Kt = /* @__PURE__ */ K({
|
|
962
1848
|
__name: "ATableModal",
|
|
963
1849
|
props: {
|
|
964
1850
|
colIndex: {},
|
|
965
1851
|
rowIndex: {},
|
|
966
|
-
|
|
1852
|
+
store: {}
|
|
967
1853
|
},
|
|
968
1854
|
setup(e) {
|
|
969
|
-
const t = (
|
|
970
|
-
|
|
1855
|
+
const t = (o) => {
|
|
1856
|
+
o.stopPropagation();
|
|
971
1857
|
};
|
|
972
|
-
return (
|
|
1858
|
+
return (o, n) => (I(), N("div", {
|
|
973
1859
|
class: "amodal",
|
|
974
1860
|
tabindex: "-1",
|
|
975
1861
|
onClick: t,
|
|
976
1862
|
onInput: t
|
|
977
1863
|
}, [
|
|
978
|
-
|
|
1864
|
+
R(o.$slots, "default")
|
|
979
1865
|
], 32));
|
|
980
1866
|
}
|
|
981
|
-
}),
|
|
1867
|
+
}), $o = (e) => {
|
|
1868
|
+
const t = e.id || crypto.randomUUID();
|
|
1869
|
+
return (/* @__PURE__ */ jn(`table-${t}`, () => {
|
|
1870
|
+
const n = () => {
|
|
1871
|
+
const g = {};
|
|
1872
|
+
for (const [E, h] of l.value.entries())
|
|
1873
|
+
for (const [p, b] of s.value.entries())
|
|
1874
|
+
g[`${E}:${p}`] = b[h.name];
|
|
1875
|
+
return g;
|
|
1876
|
+
}, r = (g) => {
|
|
1877
|
+
const E = [Object.assign({}, { rowModified: !1 })];
|
|
1878
|
+
if (g && "0:0" in g)
|
|
1879
|
+
return g;
|
|
1880
|
+
const h = /* @__PURE__ */ new Set();
|
|
1881
|
+
for (let p = s.value.length - 1; p >= 0; p--) {
|
|
1882
|
+
const b = s.value[p];
|
|
1883
|
+
b.parent && h.add(b.parent), E[p] = {
|
|
1884
|
+
childrenOpen: !1,
|
|
1885
|
+
expanded: !1,
|
|
1886
|
+
indent: b.indent || null,
|
|
1887
|
+
isParent: h.has(p),
|
|
1888
|
+
isRoot: b.parent === null || b.parent === void 0,
|
|
1889
|
+
rowModified: !1,
|
|
1890
|
+
open: b.parent === null || b.parent === void 0,
|
|
1891
|
+
parent: b.parent
|
|
1892
|
+
};
|
|
1893
|
+
}
|
|
1894
|
+
return E;
|
|
1895
|
+
}, l = O(e.columns), s = O(e.rows), i = O(e.config || {}), a = O(e.table || n()), c = O(r(e.display)), d = O(e.modal || { visible: !1 }), f = $(() => l.value.some((g) => g.pinned)), u = $(() => `${Math.ceil(s.value.length / 100 + 1)}ch`), m = $(() => ["list", "tree", "list-expansion"].includes(i.value.view)), v = (g, E) => a.value[`${g}:${E}`], x = (g, E, h) => {
|
|
1896
|
+
const p = `${g}:${E}`, b = l.value[g];
|
|
1897
|
+
a.value[p] !== h && (c.value[E].rowModified = !0), a.value[p] = h, s.value[E][b.name] = h;
|
|
1898
|
+
}, _ = (g) => ({
|
|
1899
|
+
minWidth: g.width || "40ch",
|
|
1900
|
+
textAlign: g.align || "center",
|
|
1901
|
+
width: i.value.fullWidth ? "auto" : null
|
|
1902
|
+
}), S = (g) => i.value.view !== "tree" || c.value[g].isRoot || c.value[g].open, P = (g) => i.value.view !== "tree" ? "" : c.value[g].isRoot || c.value[g].isParent ? c.value[g].childrenOpen ? "-" : "+" : "", ye = (g) => {
|
|
1903
|
+
if (i.value.view === "tree") {
|
|
1904
|
+
c.value[g].childrenOpen = !c.value[g].childrenOpen;
|
|
1905
|
+
for (let E = s.value.length - 1; E >= 0; E--)
|
|
1906
|
+
c.value[E].parent === g && (c.value[E].open = !c.value[E].open, c.value[E].childrenOpen && ye(E));
|
|
1907
|
+
} else i.value.view === "list-expansion" && (c.value[g].expanded = !c.value[g].expanded);
|
|
1908
|
+
}, ee = (g, E) => {
|
|
1909
|
+
const h = v(g, E);
|
|
1910
|
+
return B(g, E, h);
|
|
1911
|
+
}, B = (g, E, h) => {
|
|
1912
|
+
const p = l.value[g], b = s.value[E], k = p.format;
|
|
1913
|
+
return k ? typeof k == "function" ? k(h, { table: a.value, row: b, column: p }) : typeof k == "string" ? Function(`"use strict";return (${k})`)()(h, { table: a.value, row: b, column: p }) : h : h;
|
|
1914
|
+
};
|
|
1915
|
+
return {
|
|
1916
|
+
// state
|
|
1917
|
+
columns: l,
|
|
1918
|
+
rows: s,
|
|
1919
|
+
config: i,
|
|
1920
|
+
table: a,
|
|
1921
|
+
display: c,
|
|
1922
|
+
modal: d,
|
|
1923
|
+
// getters
|
|
1924
|
+
hasPinnedColumns: f,
|
|
1925
|
+
numberedRowWidth: u,
|
|
1926
|
+
zeroColumn: m,
|
|
1927
|
+
// actions
|
|
1928
|
+
closeModal: (g) => {
|
|
1929
|
+
var E;
|
|
1930
|
+
g.target instanceof Node && (E = d.value.parent) != null && E.contains(g.target) || d.value.visible && (d.value.visible = !1);
|
|
1931
|
+
},
|
|
1932
|
+
getCellData: v,
|
|
1933
|
+
getCellDisplayValue: ee,
|
|
1934
|
+
getFormattedValue: B,
|
|
1935
|
+
getHeaderCellStyle: _,
|
|
1936
|
+
getIndent: (g, E) => E && g === 0 && E > 0 ? `${E}ch` : "inherit",
|
|
1937
|
+
getRowExpandSymbol: P,
|
|
1938
|
+
isRowVisible: S,
|
|
1939
|
+
setCellData: x,
|
|
1940
|
+
toggleRowExpand: ye
|
|
1941
|
+
};
|
|
1942
|
+
}))();
|
|
1943
|
+
}, To = /* @__PURE__ */ K({
|
|
982
1944
|
__name: "ATable",
|
|
983
1945
|
props: {
|
|
984
1946
|
id: {},
|
|
@@ -987,129 +1949,130 @@ const Ft = {
|
|
|
987
1949
|
rows: { default: () => [] },
|
|
988
1950
|
config: { default: () => new Object() }
|
|
989
1951
|
},
|
|
990
|
-
emits: ["update:modelValue"],
|
|
991
|
-
setup(e, { expose: t, emit:
|
|
992
|
-
const
|
|
993
|
-
|
|
994
|
-
()
|
|
995
|
-
|
|
996
|
-
|
|
1952
|
+
emits: ["update:modelValue", "cellUpdate"],
|
|
1953
|
+
setup(e, { expose: t, emit: o }) {
|
|
1954
|
+
const n = o, r = De("table"), l = e.modelValue ? e.modelValue : e.rows, s = $o({ columns: e.columns, rows: l, id: e.id, config: e.config });
|
|
1955
|
+
s.$onAction(({ name: a, store: c, args: d }) => {
|
|
1956
|
+
if (a === "setCellData") {
|
|
1957
|
+
const [f, u, m] = d, v = c.getCellData(f, u);
|
|
1958
|
+
n("cellUpdate", [f, u, m, v]);
|
|
1959
|
+
}
|
|
1960
|
+
}), T(
|
|
1961
|
+
() => s.rows,
|
|
1962
|
+
(a) => {
|
|
1963
|
+
n("update:modelValue", a);
|
|
997
1964
|
},
|
|
998
1965
|
{ deep: !0 }
|
|
999
|
-
),
|
|
1000
|
-
e.columns.some((
|
|
1966
|
+
), ve(() => {
|
|
1967
|
+
e.columns.some((a) => a.pinned) && (i(), s.config.view === "tree" && qt(r, i, { childList: !0, subtree: !0 }));
|
|
1001
1968
|
});
|
|
1002
|
-
const
|
|
1003
|
-
const
|
|
1004
|
-
for (const [u,
|
|
1005
|
-
const
|
|
1006
|
-
|
|
1969
|
+
const i = () => {
|
|
1970
|
+
const a = r.value, c = a.rows[0], d = a.rows[1], f = c ? Array.from(c.cells) : [];
|
|
1971
|
+
for (const [u, m] of f.entries()) {
|
|
1972
|
+
const v = d.cells[u];
|
|
1973
|
+
v && (m.style.width = `${v.offsetWidth}px`);
|
|
1007
1974
|
}
|
|
1008
|
-
for (const u of
|
|
1009
|
-
let
|
|
1010
|
-
const
|
|
1011
|
-
for (const
|
|
1012
|
-
(
|
|
1013
|
-
|
|
1975
|
+
for (const u of a.rows) {
|
|
1976
|
+
let m = 0;
|
|
1977
|
+
const v = [];
|
|
1978
|
+
for (const x of u.cells)
|
|
1979
|
+
(x.classList.contains("sticky-column") || x.classList.contains("sticky-index")) && (x.style.left = `${m}px`, m += x.offsetWidth, v.push(x));
|
|
1980
|
+
v.length > 0 && v[v.length - 1].classList.add("sticky-column-edge");
|
|
1014
1981
|
}
|
|
1015
|
-
}, f = (r) => {
|
|
1016
|
-
var d;
|
|
1017
|
-
r.target instanceof Node && (d = l.modal.parent) != null && d.contains(r.target) || l.modal.visible && (l.modal.visible = !1);
|
|
1018
1982
|
};
|
|
1019
|
-
return window.addEventListener("keydown", (
|
|
1020
|
-
if (
|
|
1021
|
-
|
|
1022
|
-
const
|
|
1023
|
-
|
|
1024
|
-
|
|
1983
|
+
return window.addEventListener("keydown", (a) => {
|
|
1984
|
+
if (a.key === "Escape" && s.modal.visible) {
|
|
1985
|
+
s.modal.visible = !1;
|
|
1986
|
+
const c = s.modal.parent;
|
|
1987
|
+
c && Ae().then(() => {
|
|
1988
|
+
c.focus();
|
|
1025
1989
|
});
|
|
1026
1990
|
}
|
|
1027
|
-
}), t({
|
|
1991
|
+
}), t({ store: s }), (a, c) => (I(), N("table", {
|
|
1028
1992
|
ref: "table",
|
|
1029
1993
|
class: "atable",
|
|
1030
|
-
style:
|
|
1994
|
+
style: se({ width: y(s).config.fullWidth ? "100%" : "auto" })
|
|
1031
1995
|
}, [
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
columns:
|
|
1035
|
-
|
|
1036
|
-
}, null, 8, ["columns", "
|
|
1996
|
+
R(a.$slots, "header", { data: y(s) }, () => [
|
|
1997
|
+
at(Zt, {
|
|
1998
|
+
columns: y(s).columns,
|
|
1999
|
+
store: y(s)
|
|
2000
|
+
}, null, 8, ["columns", "store"])
|
|
1037
2001
|
], !0),
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
(
|
|
1041
|
-
key:
|
|
1042
|
-
row:
|
|
1043
|
-
rowIndex:
|
|
1044
|
-
|
|
2002
|
+
re("tbody", null, [
|
|
2003
|
+
R(a.$slots, "body", { data: y(s) }, () => [
|
|
2004
|
+
(I(!0), N(Ce, null, We(y(s).rows, (d, f) => (I(), Se(Xt, {
|
|
2005
|
+
key: d.id,
|
|
2006
|
+
row: d,
|
|
2007
|
+
rowIndex: f,
|
|
2008
|
+
store: y(s)
|
|
1045
2009
|
}, {
|
|
1046
|
-
default:
|
|
1047
|
-
(
|
|
2010
|
+
default: ct(() => [
|
|
2011
|
+
(I(!0), N(Ce, null, We(y(s).columns, (u, m) => (I(), Se(Qt, {
|
|
1048
2012
|
key: u.name,
|
|
1049
|
-
|
|
2013
|
+
store: y(s),
|
|
1050
2014
|
col: u,
|
|
1051
2015
|
spellcheck: "false",
|
|
1052
2016
|
pinned: u.pinned,
|
|
1053
|
-
rowIndex:
|
|
1054
|
-
colIndex:
|
|
2017
|
+
rowIndex: f,
|
|
2018
|
+
colIndex: m,
|
|
1055
2019
|
component: u.cellComponent,
|
|
1056
|
-
style:
|
|
2020
|
+
style: se({
|
|
1057
2021
|
textAlign: (u == null ? void 0 : u.align) || "center",
|
|
1058
2022
|
minWidth: (u == null ? void 0 : u.width) || "40ch",
|
|
1059
|
-
width:
|
|
2023
|
+
width: y(s).config.fullWidth ? "auto" : null
|
|
1060
2024
|
})
|
|
1061
|
-
}, null, 8, ["
|
|
2025
|
+
}, null, 8, ["store", "col", "pinned", "rowIndex", "colIndex", "component", "style"]))), 128))
|
|
1062
2026
|
]),
|
|
1063
2027
|
_: 2
|
|
1064
|
-
}, 1032, ["row", "rowIndex", "
|
|
2028
|
+
}, 1032, ["row", "rowIndex", "store"]))), 128))
|
|
1065
2029
|
], !0)
|
|
1066
2030
|
]),
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
colIndex:
|
|
1071
|
-
rowIndex:
|
|
1072
|
-
|
|
1073
|
-
style:
|
|
1074
|
-
left:
|
|
1075
|
-
top:
|
|
1076
|
-
maxWidth:
|
|
2031
|
+
R(a.$slots, "footer", { data: y(s) }, void 0, !0),
|
|
2032
|
+
R(a.$slots, "modal", { data: y(s) }, () => [
|
|
2033
|
+
Ye(at(Kt, {
|
|
2034
|
+
colIndex: y(s).modal.colIndex,
|
|
2035
|
+
rowIndex: y(s).modal.rowIndex,
|
|
2036
|
+
store: y(s),
|
|
2037
|
+
style: se({
|
|
2038
|
+
left: y(s).modal.left + "px",
|
|
2039
|
+
top: y(s).modal.top + "px",
|
|
2040
|
+
maxWidth: y(s).modal.width + "px"
|
|
1077
2041
|
})
|
|
1078
2042
|
}, {
|
|
1079
|
-
default:
|
|
1080
|
-
(
|
|
1081
|
-
key: `${
|
|
1082
|
-
colIndex:
|
|
1083
|
-
rowIndex:
|
|
1084
|
-
|
|
1085
|
-
},
|
|
2043
|
+
default: ct(() => [
|
|
2044
|
+
(I(), Se(kt(y(s).modal.component), qe({
|
|
2045
|
+
key: `${y(s).modal.rowIndex}:${y(s).modal.colIndex}`,
|
|
2046
|
+
colIndex: y(s).modal.colIndex,
|
|
2047
|
+
rowIndex: y(s).modal.rowIndex,
|
|
2048
|
+
store: y(s)
|
|
2049
|
+
}, y(s).modal.componentProps), null, 16, ["colIndex", "rowIndex", "store"]))
|
|
1086
2050
|
]),
|
|
1087
2051
|
_: 1
|
|
1088
|
-
}, 8, ["colIndex", "rowIndex", "
|
|
1089
|
-
[
|
|
2052
|
+
}, 8, ["colIndex", "rowIndex", "store", "style"]), [
|
|
2053
|
+
[At, y(s).modal.visible]
|
|
1090
2054
|
])
|
|
1091
2055
|
], !0)
|
|
1092
|
-
], 4))
|
|
1093
|
-
[m(jt), f]
|
|
1094
|
-
]);
|
|
2056
|
+
], 4));
|
|
1095
2057
|
}
|
|
1096
|
-
}),
|
|
1097
|
-
const
|
|
1098
|
-
for (const [
|
|
1099
|
-
n
|
|
1100
|
-
return
|
|
1101
|
-
},
|
|
1102
|
-
function
|
|
1103
|
-
|
|
2058
|
+
}), Po = (e, t) => {
|
|
2059
|
+
const o = e.__vccOpts || e;
|
|
2060
|
+
for (const [n, r] of t)
|
|
2061
|
+
o[n] = r;
|
|
2062
|
+
return o;
|
|
2063
|
+
}, Do = /* @__PURE__ */ Po(To, [["__scopeId", "data-v-20244978"]]);
|
|
2064
|
+
function Lo(e) {
|
|
2065
|
+
const t = Dn();
|
|
2066
|
+
e.use(t), e.component("ACell", Qt), e.component("AExpansionRow", ko), e.component("ARow", Xt), e.component("ATable", Do), e.component("ATableHeader", Zt), e.component("ATableModal", Kt);
|
|
1104
2067
|
}
|
|
1105
2068
|
export {
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
2069
|
+
Qt as ACell,
|
|
2070
|
+
ko as AExpansionRow,
|
|
2071
|
+
Xt as ARow,
|
|
2072
|
+
Do as ATable,
|
|
2073
|
+
Zt as ATableHeader,
|
|
2074
|
+
Kt as ATableModal,
|
|
2075
|
+
$o as createTableStore,
|
|
2076
|
+
Lo as install
|
|
1114
2077
|
};
|
|
1115
2078
|
//# sourceMappingURL=atable.js.map
|