@stonecrop/desktop 0.12.3 → 0.12.5
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/desktop.css +1 -1
- package/dist/desktop.js +1113 -1094
- package/dist/desktop.js.map +1 -1
- package/package.json +6 -6
- package/src/components/Desktop.vue +29 -1
package/dist/desktop.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const Mi = { class: "action-menu-icon" }, Ti = { class: "action-element-header" }, Pi = ["disabled", "onClick"], qi = { key: 0 },
|
|
1
|
+
import { defineComponent as Ue, ref as C, onMounted as yr, openBlock as P, createElementBlock as F, normalizeClass as ee, createElementVNode as T, Fragment as ne, renderList as xe, toDisplayString as Rt, createCommentVNode as Wt, withDirectives as sr, vShow as Wr, useTemplateRef as bo, computed as x, watch as rt, nextTick as oe, createBlock as ar, Teleport as zi, createVNode as re, Transition as Ai, withCtx as $e, withModifiers as So, vModelText as Eo, renderSlot as zr, createTextVNode as ur, toRaw as Io, isRef as ie, isReactive as _r, toRef as Kt, hasInjectionContext as Kr, inject as je, getCurrentInstance as Oo, reactive as ko, markRaw as Ee, effectScope as Ni, getCurrentScope as an, onScopeDispose as un, toRefs as qn, provide as De, shallowRef as Fe, toValue as wt, readonly as gr, customRef as cn, unref as or, useModel as Ci, watchEffect as xi, resolveDynamicComponent as Ln, mergeProps as $i, mergeModels as Vn, resolveComponent as ji, withKeys as be, normalizeStyle as Ar } from "vue";
|
|
2
|
+
const Mi = { class: "action-menu-icon" }, Ti = { class: "action-element-header" }, Pi = ["disabled", "onClick"], qi = { key: 0 }, Li = { class: "dropdown-header" }, Vi = ["onClick"], Ui = ["onClick"], Fi = { class: "dropdown-container" }, Bi = { class: "dropdown" }, Wi = ["onClick"], Ki = ["href"], Hi = { class: "dropdown-item" }, Ji = /* @__PURE__ */ Ue({
|
|
3
3
|
__name: "ActionSet",
|
|
4
4
|
props: {
|
|
5
5
|
elements: { default: () => [] }
|
|
6
6
|
},
|
|
7
7
|
emits: ["actionClick"],
|
|
8
8
|
setup(t, { emit: e }) {
|
|
9
|
-
const r = e, n =
|
|
10
|
-
|
|
9
|
+
const r = e, n = C({}), o = C(!0), i = C([]);
|
|
10
|
+
yr(() => {
|
|
11
11
|
s();
|
|
12
12
|
});
|
|
13
13
|
const s = () => {
|
|
@@ -20,7 +20,7 @@ const Mi = { class: "action-menu-icon" }, Ti = { class: "action-element-header"
|
|
|
20
20
|
}, c = (l, f) => {
|
|
21
21
|
r("actionClick", f, l);
|
|
22
22
|
};
|
|
23
|
-
return (l, f) => (P(),
|
|
23
|
+
return (l, f) => (P(), F("div", {
|
|
24
24
|
class: ee([{ collapsed: !o.value }, "action-set"])
|
|
25
25
|
}, [
|
|
26
26
|
T("div", Mi, [
|
|
@@ -31,50 +31,50 @@ const Mi = { class: "action-menu-icon" }, Ti = { class: "action-element-header"
|
|
|
31
31
|
}, "×", 2)
|
|
32
32
|
]),
|
|
33
33
|
f[0] || (f[0] = T("div", { style: { "margin-right": "30px" } }, null, -1)),
|
|
34
|
-
(P(!0),
|
|
34
|
+
(P(!0), F(ne, null, xe(t.elements, (h, p) => (P(), F("div", {
|
|
35
35
|
key: h.label,
|
|
36
36
|
class: "action-element"
|
|
37
37
|
}, [
|
|
38
38
|
T("div", Ti, [
|
|
39
|
-
h.type == "button" ? (P(),
|
|
39
|
+
h.type == "button" ? (P(), F("button", {
|
|
40
40
|
key: 0,
|
|
41
41
|
disabled: h.disabled,
|
|
42
42
|
class: "button-default",
|
|
43
|
-
onClick: (
|
|
44
|
-
},
|
|
43
|
+
onClick: (v) => c(h.action, h.label)
|
|
44
|
+
}, Rt(h.label), 9, Pi)) : Wt("", !0)
|
|
45
45
|
]),
|
|
46
|
-
h.type == "dropdown" ? (P(),
|
|
47
|
-
T("div",
|
|
46
|
+
h.type == "dropdown" ? (P(), F("div", qi, [
|
|
47
|
+
T("div", Li, [
|
|
48
48
|
T("div", {
|
|
49
49
|
class: ee(["cross", { rotated: i.value[p] }]),
|
|
50
|
-
onClick: (
|
|
51
|
-
}, "×", 10,
|
|
50
|
+
onClick: (v) => u(p)
|
|
51
|
+
}, "×", 10, Vi),
|
|
52
52
|
T("button", {
|
|
53
53
|
class: "button-default dropdown-title",
|
|
54
|
-
onClick: (
|
|
55
|
-
},
|
|
54
|
+
onClick: (v) => u(p)
|
|
55
|
+
}, Rt(h.label), 9, Ui)
|
|
56
56
|
]),
|
|
57
|
-
|
|
57
|
+
sr(T("div", Fi, [
|
|
58
58
|
T("div", Bi, [
|
|
59
|
-
(P(!0),
|
|
60
|
-
key:
|
|
59
|
+
(P(!0), F(ne, null, xe(h.actions, (v) => (P(), F("div", {
|
|
60
|
+
key: v.label
|
|
61
61
|
}, [
|
|
62
|
-
|
|
62
|
+
v.action != null ? (P(), F("button", {
|
|
63
63
|
key: 0,
|
|
64
64
|
class: "dropdown-item",
|
|
65
|
-
onClick: (y) => c(
|
|
66
|
-
},
|
|
65
|
+
onClick: (y) => c(v.action, v.label)
|
|
66
|
+
}, Rt(v.label), 9, Wi)) : v.link != null ? (P(), F("a", {
|
|
67
67
|
key: 1,
|
|
68
|
-
href:
|
|
68
|
+
href: v.link
|
|
69
69
|
}, [
|
|
70
|
-
T("button", Hi,
|
|
71
|
-
], 8, Ki)) :
|
|
70
|
+
T("button", Hi, Rt(v.label), 1)
|
|
71
|
+
], 8, Ki)) : Wt("", !0)
|
|
72
72
|
]))), 128))
|
|
73
73
|
])
|
|
74
74
|
], 512), [
|
|
75
|
-
[
|
|
75
|
+
[Wr, n.value[p]]
|
|
76
76
|
])
|
|
77
|
-
])) :
|
|
77
|
+
])) : Wt("", !0)
|
|
78
78
|
]))), 128))
|
|
79
79
|
], 2));
|
|
80
80
|
}
|
|
@@ -83,13 +83,13 @@ const Mi = { class: "action-menu-icon" }, Ti = { class: "action-element-header"
|
|
|
83
83
|
for (const [n, o] of e)
|
|
84
84
|
r[n] = o;
|
|
85
85
|
return r;
|
|
86
|
-
},
|
|
86
|
+
}, Ro = /* @__PURE__ */ Do(Ji, [["__scopeId", "data-v-07634099"]]), Gi = { class: "command-palette-header" }, Qi = ["placeholder"], Yi = {
|
|
87
87
|
key: 0,
|
|
88
88
|
class: "command-palette-results"
|
|
89
89
|
}, Xi = ["onClick", "onMouseover"], Zi = { class: "result-title" }, ts = { class: "result-content" }, es = {
|
|
90
90
|
key: 1,
|
|
91
91
|
class: "command-palette-no-results"
|
|
92
|
-
},
|
|
92
|
+
}, zo = /* @__PURE__ */ Ue({
|
|
93
93
|
__name: "CommandPalette",
|
|
94
94
|
props: {
|
|
95
95
|
search: { type: Function },
|
|
@@ -99,7 +99,7 @@ const Mi = { class: "action-menu-icon" }, Ti = { class: "action-element-header"
|
|
|
99
99
|
},
|
|
100
100
|
emits: ["select", "close"],
|
|
101
101
|
setup(t, { emit: e }) {
|
|
102
|
-
const r = e, n =
|
|
102
|
+
const r = e, n = C(""), o = C(0), i = bo("input"), s = x(() => n.value ? t.search(n.value).slice(0, t.maxResults) : []);
|
|
103
103
|
rt(
|
|
104
104
|
() => t.isOpen,
|
|
105
105
|
async (l) => {
|
|
@@ -128,10 +128,10 @@ const Mi = { class: "action-menu-icon" }, Ti = { class: "action-element-header"
|
|
|
128
128
|
}, c = (l) => {
|
|
129
129
|
r("select", l), a();
|
|
130
130
|
};
|
|
131
|
-
return (l, f) => (P(),
|
|
132
|
-
re(
|
|
133
|
-
default:
|
|
134
|
-
t.isOpen ? (P(),
|
|
131
|
+
return (l, f) => (P(), ar(zi, { to: "body" }, [
|
|
132
|
+
re(Ai, { name: "fade" }, {
|
|
133
|
+
default: $e(() => [
|
|
134
|
+
t.isOpen ? (P(), F("div", {
|
|
135
135
|
key: 0,
|
|
136
136
|
class: "command-palette-overlay",
|
|
137
137
|
onClick: a
|
|
@@ -142,7 +142,7 @@ const Mi = { class: "action-menu-icon" }, Ti = { class: "action-element-header"
|
|
|
142
142
|
}, ["stop"]))
|
|
143
143
|
}, [
|
|
144
144
|
T("div", Gi, [
|
|
145
|
-
|
|
145
|
+
sr(T("input", {
|
|
146
146
|
ref: "input",
|
|
147
147
|
"onUpdate:modelValue": f[0] || (f[0] = (h) => n.value = h),
|
|
148
148
|
type: "text",
|
|
@@ -151,15 +151,15 @@ const Mi = { class: "action-menu-icon" }, Ti = { class: "action-element-header"
|
|
|
151
151
|
autofocus: "",
|
|
152
152
|
onKeydown: u
|
|
153
153
|
}, null, 40, Qi), [
|
|
154
|
-
[
|
|
154
|
+
[Eo, n.value]
|
|
155
155
|
])
|
|
156
156
|
]),
|
|
157
|
-
s.value.length ? (P(),
|
|
158
|
-
(P(!0),
|
|
157
|
+
s.value.length ? (P(), F("div", Yi, [
|
|
158
|
+
(P(!0), F(ne, null, xe(s.value, (h, p) => (P(), F("div", {
|
|
159
159
|
key: p,
|
|
160
160
|
class: ee(["command-palette-result", { selected: p === o.value }]),
|
|
161
|
-
onClick: (
|
|
162
|
-
onMouseover: (
|
|
161
|
+
onClick: (v) => c(h),
|
|
162
|
+
onMouseover: (v) => o.value = p
|
|
163
163
|
}, [
|
|
164
164
|
T("div", Zi, [
|
|
165
165
|
zr(l.$slots, "title", { result: h })
|
|
@@ -168,13 +168,13 @@ const Mi = { class: "action-menu-icon" }, Ti = { class: "action-element-header"
|
|
|
168
168
|
zr(l.$slots, "content", { result: h })
|
|
169
169
|
])
|
|
170
170
|
], 42, Xi))), 128))
|
|
171
|
-
])) : n.value && !s.value.length ? (P(),
|
|
171
|
+
])) : n.value && !s.value.length ? (P(), F("div", es, [
|
|
172
172
|
zr(l.$slots, "empty", {}, () => [
|
|
173
|
-
|
|
173
|
+
ur(' No results found for "' + Rt(n.value) + '" ', 1)
|
|
174
174
|
])
|
|
175
|
-
])) :
|
|
175
|
+
])) : Wt("", !0)
|
|
176
176
|
])
|
|
177
|
-
])) :
|
|
177
|
+
])) : Wt("", !0)
|
|
178
178
|
]),
|
|
179
179
|
_: 3
|
|
180
180
|
})
|
|
@@ -182,33 +182,33 @@ const Mi = { class: "action-menu-icon" }, Ti = { class: "action-element-header"
|
|
|
182
182
|
}
|
|
183
183
|
});
|
|
184
184
|
const Zt = typeof window < "u";
|
|
185
|
-
let
|
|
186
|
-
const
|
|
185
|
+
let Bt;
|
|
186
|
+
const cr = (t) => Bt = t;
|
|
187
187
|
process.env.NODE_ENV;
|
|
188
188
|
const Hr = process.env.NODE_ENV !== "production" ? /* @__PURE__ */ Symbol("pinia") : (
|
|
189
189
|
/* istanbul ignore next */
|
|
190
190
|
/* @__PURE__ */ Symbol()
|
|
191
191
|
);
|
|
192
|
-
function
|
|
192
|
+
function Ht(t) {
|
|
193
193
|
return t && typeof t == "object" && Object.prototype.toString.call(t) === "[object Object]" && typeof t.toJSON != "function";
|
|
194
194
|
}
|
|
195
|
-
var
|
|
195
|
+
var Re;
|
|
196
196
|
(function(t) {
|
|
197
197
|
t.direct = "direct", t.patchObject = "patch object", t.patchFunction = "patch function";
|
|
198
|
-
})(
|
|
199
|
-
function
|
|
198
|
+
})(Re || (Re = {}));
|
|
199
|
+
function Ao(t, e) {
|
|
200
200
|
for (const r in e) {
|
|
201
201
|
const n = e[r];
|
|
202
202
|
if (!(r in t))
|
|
203
203
|
continue;
|
|
204
204
|
const o = t[r];
|
|
205
|
-
|
|
205
|
+
Ht(o) && Ht(n) && !ie(n) && !_r(n) ? t[r] = Ao(o, n) : t[r] = n;
|
|
206
206
|
}
|
|
207
207
|
return t;
|
|
208
208
|
}
|
|
209
209
|
const No = () => {
|
|
210
210
|
};
|
|
211
|
-
function
|
|
211
|
+
function Un(t, e, r, n = No) {
|
|
212
212
|
t.add(e);
|
|
213
213
|
const o = () => {
|
|
214
214
|
t.delete(e) && n();
|
|
@@ -220,14 +220,14 @@ function Xt(t, ...e) {
|
|
|
220
220
|
r(...e);
|
|
221
221
|
});
|
|
222
222
|
}
|
|
223
|
-
const rs = (t) => t(),
|
|
223
|
+
const rs = (t) => t(), Fn = /* @__PURE__ */ Symbol(), Nr = /* @__PURE__ */ Symbol();
|
|
224
224
|
function Jr(t, e) {
|
|
225
225
|
t instanceof Map && e instanceof Map ? e.forEach((r, n) => t.set(n, r)) : t instanceof Set && e instanceof Set && e.forEach(t.add, t);
|
|
226
226
|
for (const r in e) {
|
|
227
227
|
if (!e.hasOwnProperty(r))
|
|
228
228
|
continue;
|
|
229
229
|
const n = e[r], o = t[r];
|
|
230
|
-
|
|
230
|
+
Ht(o) && Ht(n) && t.hasOwnProperty(r) && !ie(n) && !_r(n) ? t[r] = Jr(o, n) : t[r] = n;
|
|
231
231
|
}
|
|
232
232
|
return t;
|
|
233
233
|
}
|
|
@@ -236,7 +236,7 @@ const ns = process.env.NODE_ENV !== "production" ? /* @__PURE__ */ Symbol("pinia
|
|
|
236
236
|
/* @__PURE__ */ Symbol()
|
|
237
237
|
);
|
|
238
238
|
function os(t) {
|
|
239
|
-
return !
|
|
239
|
+
return !Ht(t) || !Object.prototype.hasOwnProperty.call(t, ns);
|
|
240
240
|
}
|
|
241
241
|
const { assign: gt } = Object;
|
|
242
242
|
function Bn(t) {
|
|
@@ -249,10 +249,10 @@ function Wn(t, e, r, n) {
|
|
|
249
249
|
!a && (process.env.NODE_ENV === "production" || !n) && (r.state.value[t] = o ? o() : {});
|
|
250
250
|
const l = process.env.NODE_ENV !== "production" && n ? (
|
|
251
251
|
// use ref() to unwrap refs inside state TODO: check if this is still necessary
|
|
252
|
-
qn(
|
|
252
|
+
qn(C(o ? o() : {}).value)
|
|
253
253
|
) : qn(r.state.value[t]);
|
|
254
|
-
return gt(l, i, Object.keys(s || {}).reduce((f, h) => (process.env.NODE_ENV !== "production" && h in l && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${h}" in store "${t}".`), f[h] =
|
|
255
|
-
|
|
254
|
+
return gt(l, i, Object.keys(s || {}).reduce((f, h) => (process.env.NODE_ENV !== "production" && h in l && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${h}" in store "${t}".`), f[h] = Ee(x(() => {
|
|
255
|
+
cr(r);
|
|
256
256
|
const p = r._s.get(t);
|
|
257
257
|
return s[h].call(p, p);
|
|
258
258
|
})), f), {}));
|
|
@@ -265,35 +265,35 @@ function Gr(t, e, r = {}, n, o, i) {
|
|
|
265
265
|
if (process.env.NODE_ENV !== "production" && !n._e.active)
|
|
266
266
|
throw new Error("Pinia destroyed");
|
|
267
267
|
const u = { deep: !0 };
|
|
268
|
-
process.env.NODE_ENV !== "production" && (u.onTrigger = (
|
|
269
|
-
c ? p =
|
|
268
|
+
process.env.NODE_ENV !== "production" && (u.onTrigger = (S) => {
|
|
269
|
+
c ? p = S : c == !1 && !k._hotUpdating && (Array.isArray(p) ? p.push(S) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."));
|
|
270
270
|
});
|
|
271
271
|
let c, l, f = /* @__PURE__ */ new Set(), h = /* @__PURE__ */ new Set(), p;
|
|
272
|
-
const
|
|
273
|
-
!i && !
|
|
274
|
-
const y =
|
|
272
|
+
const v = n.state.value[t];
|
|
273
|
+
!i && !v && (process.env.NODE_ENV === "production" || !o) && (n.state.value[t] = {});
|
|
274
|
+
const y = C({});
|
|
275
275
|
let D;
|
|
276
|
-
function
|
|
276
|
+
function j(S) {
|
|
277
277
|
let w;
|
|
278
|
-
c = l = !1, process.env.NODE_ENV !== "production" && (p = []), typeof
|
|
279
|
-
type:
|
|
278
|
+
c = l = !1, process.env.NODE_ENV !== "production" && (p = []), typeof S == "function" ? (S(n.state.value[t]), w = {
|
|
279
|
+
type: Re.patchFunction,
|
|
280
280
|
storeId: t,
|
|
281
281
|
events: p
|
|
282
|
-
}) : (Jr(n.state.value[t],
|
|
283
|
-
type:
|
|
284
|
-
payload:
|
|
282
|
+
}) : (Jr(n.state.value[t], S), w = {
|
|
283
|
+
type: Re.patchObject,
|
|
284
|
+
payload: S,
|
|
285
285
|
storeId: t,
|
|
286
286
|
events: p
|
|
287
287
|
});
|
|
288
|
-
const
|
|
288
|
+
const N = D = /* @__PURE__ */ Symbol();
|
|
289
289
|
oe().then(() => {
|
|
290
|
-
D ===
|
|
290
|
+
D === N && (c = !0);
|
|
291
291
|
}), l = !0, Xt(f, w, n.state.value[t]);
|
|
292
292
|
}
|
|
293
293
|
const tt = i ? function() {
|
|
294
|
-
const { state: w } = r,
|
|
294
|
+
const { state: w } = r, N = w ? w() : {};
|
|
295
295
|
this.$patch((J) => {
|
|
296
|
-
gt(J,
|
|
296
|
+
gt(J, N);
|
|
297
297
|
});
|
|
298
298
|
} : (
|
|
299
299
|
/* istanbul ignore next */
|
|
@@ -304,11 +304,11 @@ function Gr(t, e, r = {}, n, o, i) {
|
|
|
304
304
|
function ut() {
|
|
305
305
|
s.stop(), f.clear(), h.clear(), n._s.delete(t);
|
|
306
306
|
}
|
|
307
|
-
const
|
|
308
|
-
if (
|
|
309
|
-
return
|
|
310
|
-
const
|
|
311
|
-
|
|
307
|
+
const Et = (S, w = "") => {
|
|
308
|
+
if (Fn in S)
|
|
309
|
+
return S[Nr] = w, S;
|
|
310
|
+
const N = function() {
|
|
311
|
+
cr(n);
|
|
312
312
|
const J = Array.from(arguments), z = /* @__PURE__ */ new Set(), q = /* @__PURE__ */ new Set();
|
|
313
313
|
function Q(m) {
|
|
314
314
|
z.add(m);
|
|
@@ -318,21 +318,21 @@ function Gr(t, e, r = {}, n, o, i) {
|
|
|
318
318
|
}
|
|
319
319
|
Xt(h, {
|
|
320
320
|
args: J,
|
|
321
|
-
name:
|
|
321
|
+
name: N[Nr],
|
|
322
322
|
store: k,
|
|
323
323
|
after: Q,
|
|
324
324
|
onError: Ot
|
|
325
325
|
});
|
|
326
326
|
let ot;
|
|
327
327
|
try {
|
|
328
|
-
ot =
|
|
328
|
+
ot = S.apply(this && this.$id === t ? this : k, J);
|
|
329
329
|
} catch (m) {
|
|
330
330
|
throw Xt(q, m), m;
|
|
331
331
|
}
|
|
332
332
|
return ot instanceof Promise ? ot.then((m) => (Xt(z, m), m)).catch((m) => (Xt(q, m), Promise.reject(m))) : (Xt(z, ot), ot);
|
|
333
333
|
};
|
|
334
|
-
return
|
|
335
|
-
}, Y = /* @__PURE__ */
|
|
334
|
+
return N[Fn] = !0, N[Nr] = w, N;
|
|
335
|
+
}, Y = /* @__PURE__ */ Ee({
|
|
336
336
|
actions: {},
|
|
337
337
|
getters: {},
|
|
338
338
|
state: [],
|
|
@@ -341,24 +341,24 @@ function Gr(t, e, r = {}, n, o, i) {
|
|
|
341
341
|
_p: n,
|
|
342
342
|
// _s: scope,
|
|
343
343
|
$id: t,
|
|
344
|
-
$onAction:
|
|
345
|
-
$patch:
|
|
344
|
+
$onAction: Un.bind(null, h),
|
|
345
|
+
$patch: j,
|
|
346
346
|
$reset: tt,
|
|
347
|
-
$subscribe(
|
|
348
|
-
const
|
|
349
|
-
(w.flush === "sync" ? l : c) &&
|
|
347
|
+
$subscribe(S, w = {}) {
|
|
348
|
+
const N = Un(f, S, w.detached, () => J()), J = s.run(() => rt(() => n.state.value[t], (z) => {
|
|
349
|
+
(w.flush === "sync" ? l : c) && S({
|
|
350
350
|
storeId: t,
|
|
351
|
-
type:
|
|
351
|
+
type: Re.direct,
|
|
352
352
|
events: p
|
|
353
353
|
}, z);
|
|
354
354
|
}, gt({}, u, w)));
|
|
355
|
-
return
|
|
355
|
+
return N;
|
|
356
356
|
},
|
|
357
357
|
$dispose: ut
|
|
358
358
|
}, k = ko(process.env.NODE_ENV !== "production" || process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && Zt ? gt(
|
|
359
359
|
{
|
|
360
360
|
_hmrPayload: Y,
|
|
361
|
-
_customProperties:
|
|
361
|
+
_customProperties: Ee(/* @__PURE__ */ new Set())
|
|
362
362
|
// devtools custom properties
|
|
363
363
|
},
|
|
364
364
|
_t
|
|
@@ -366,81 +366,81 @@ function Gr(t, e, r = {}, n, o, i) {
|
|
|
366
366
|
// setupStore
|
|
367
367
|
) : _t);
|
|
368
368
|
n._s.set(t, k);
|
|
369
|
-
const
|
|
370
|
-
for (const
|
|
371
|
-
const w =
|
|
372
|
-
if (ie(w) && !Bn(w) ||
|
|
373
|
-
process.env.NODE_ENV !== "production" && o ? y.value[
|
|
369
|
+
const L = (n._a && n._a.runWithContext || rs)(() => n._e.run(() => (s = Ni()).run(() => e({ action: Et }))));
|
|
370
|
+
for (const S in L) {
|
|
371
|
+
const w = L[S];
|
|
372
|
+
if (ie(w) && !Bn(w) || _r(w))
|
|
373
|
+
process.env.NODE_ENV !== "production" && o ? y.value[S] = Kt(L, S) : i || (v && os(w) && (ie(w) ? w.value = v[S] : Jr(w, v[S])), n.state.value[t][S] = w), process.env.NODE_ENV !== "production" && Y.state.push(S);
|
|
374
374
|
else if (typeof w == "function") {
|
|
375
|
-
const
|
|
376
|
-
|
|
377
|
-
} else process.env.NODE_ENV !== "production" && Bn(w) && (Y.getters[
|
|
375
|
+
const N = process.env.NODE_ENV !== "production" && o ? w : Et(w, S);
|
|
376
|
+
L[S] = N, process.env.NODE_ENV !== "production" && (Y.actions[S] = w), a.actions[S] = w;
|
|
377
|
+
} else process.env.NODE_ENV !== "production" && Bn(w) && (Y.getters[S] = i ? (
|
|
378
378
|
// @ts-expect-error
|
|
379
|
-
r.getters[
|
|
380
|
-
) : w, Zt && (
|
|
381
|
-
(
|
|
379
|
+
r.getters[S]
|
|
380
|
+
) : w, Zt && (L._getters || // @ts-expect-error: same
|
|
381
|
+
(L._getters = Ee([]))).push(S));
|
|
382
382
|
}
|
|
383
|
-
if (gt(k,
|
|
383
|
+
if (gt(k, L), gt(Io(k), L), Object.defineProperty(k, "$state", {
|
|
384
384
|
get: () => process.env.NODE_ENV !== "production" && o ? y.value : n.state.value[t],
|
|
385
|
-
set: (
|
|
385
|
+
set: (S) => {
|
|
386
386
|
if (process.env.NODE_ENV !== "production" && o)
|
|
387
387
|
throw new Error("cannot set hotState");
|
|
388
|
-
|
|
389
|
-
gt(w,
|
|
388
|
+
j((w) => {
|
|
389
|
+
gt(w, S);
|
|
390
390
|
});
|
|
391
391
|
}
|
|
392
|
-
}), process.env.NODE_ENV !== "production" && (k._hotUpdate =
|
|
393
|
-
k._hotUpdating = !0,
|
|
392
|
+
}), process.env.NODE_ENV !== "production" && (k._hotUpdate = Ee((S) => {
|
|
393
|
+
k._hotUpdating = !0, S._hmrPayload.state.forEach((w) => {
|
|
394
394
|
if (w in k.$state) {
|
|
395
|
-
const
|
|
396
|
-
typeof
|
|
395
|
+
const N = S.$state[w], J = k.$state[w];
|
|
396
|
+
typeof N == "object" && Ht(N) && Ht(J) ? Ao(N, J) : S.$state[w] = J;
|
|
397
397
|
}
|
|
398
|
-
k[w] =
|
|
398
|
+
k[w] = Kt(S.$state, w);
|
|
399
399
|
}), Object.keys(k.$state).forEach((w) => {
|
|
400
|
-
w in
|
|
401
|
-
}), c = !1, l = !1, n.state.value[t] =
|
|
400
|
+
w in S.$state || delete k[w];
|
|
401
|
+
}), c = !1, l = !1, n.state.value[t] = Kt(S._hmrPayload, "hotState"), l = !0, oe().then(() => {
|
|
402
402
|
c = !0;
|
|
403
403
|
});
|
|
404
|
-
for (const w in
|
|
405
|
-
const
|
|
404
|
+
for (const w in S._hmrPayload.actions) {
|
|
405
|
+
const N = S[w];
|
|
406
406
|
k[w] = //
|
|
407
|
-
|
|
407
|
+
Et(N, w);
|
|
408
408
|
}
|
|
409
|
-
for (const w in
|
|
410
|
-
const
|
|
409
|
+
for (const w in S._hmrPayload.getters) {
|
|
410
|
+
const N = S._hmrPayload.getters[w], J = i ? (
|
|
411
411
|
// special handling of options api
|
|
412
|
-
|
|
413
|
-
) :
|
|
412
|
+
x(() => (cr(n), N.call(k, k)))
|
|
413
|
+
) : N;
|
|
414
414
|
k[w] = //
|
|
415
415
|
J;
|
|
416
416
|
}
|
|
417
417
|
Object.keys(k._hmrPayload.getters).forEach((w) => {
|
|
418
|
-
w in
|
|
418
|
+
w in S._hmrPayload.getters || delete k[w];
|
|
419
419
|
}), Object.keys(k._hmrPayload.actions).forEach((w) => {
|
|
420
|
-
w in
|
|
421
|
-
}), k._hmrPayload =
|
|
420
|
+
w in S._hmrPayload.actions || delete k[w];
|
|
421
|
+
}), k._hmrPayload = S._hmrPayload, k._getters = S._getters, k._hotUpdating = !1;
|
|
422
422
|
})), process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && Zt) {
|
|
423
|
-
const
|
|
423
|
+
const S = {
|
|
424
424
|
writable: !0,
|
|
425
425
|
configurable: !0,
|
|
426
426
|
// avoid warning on devtools trying to display this property
|
|
427
427
|
enumerable: !1
|
|
428
428
|
};
|
|
429
429
|
["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((w) => {
|
|
430
|
-
Object.defineProperty(k, w, gt({ value: k[w] },
|
|
430
|
+
Object.defineProperty(k, w, gt({ value: k[w] }, S));
|
|
431
431
|
});
|
|
432
432
|
}
|
|
433
|
-
return n._p.forEach((
|
|
433
|
+
return n._p.forEach((S) => {
|
|
434
434
|
if (process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && Zt) {
|
|
435
|
-
const w = s.run(() =>
|
|
435
|
+
const w = s.run(() => S({
|
|
436
436
|
store: k,
|
|
437
437
|
app: n._a,
|
|
438
438
|
pinia: n,
|
|
439
439
|
options: a
|
|
440
440
|
}));
|
|
441
|
-
Object.keys(w || {}).forEach((
|
|
441
|
+
Object.keys(w || {}).forEach((N) => k._customProperties.add(N)), gt(k, w);
|
|
442
442
|
} else
|
|
443
|
-
gt(k, s.run(() =>
|
|
443
|
+
gt(k, s.run(() => S({
|
|
444
444
|
store: k,
|
|
445
445
|
app: n._a,
|
|
446
446
|
pinia: n,
|
|
@@ -448,7 +448,7 @@ function Gr(t, e, r = {}, n, o, i) {
|
|
|
448
448
|
})));
|
|
449
449
|
}), process.env.NODE_ENV !== "production" && k.$state && typeof k.$state == "object" && typeof k.$state.constructor == "function" && !k.$state.constructor.toString().includes("[native code]") && console.warn(`[🍍]: The "state" must be a plain object. It cannot be
|
|
450
450
|
state: () => new MyClass()
|
|
451
|
-
Found in store "${k.$id}".`),
|
|
451
|
+
Found in store "${k.$id}".`), v && i && r.hydrate && r.hydrate(k.$state, v), c = !0, l = !0, k;
|
|
452
452
|
}
|
|
453
453
|
// @__NO_SIDE_EFFECTS__
|
|
454
454
|
function is(t, e, r) {
|
|
@@ -456,14 +456,14 @@ function is(t, e, r) {
|
|
|
456
456
|
const o = typeof e == "function";
|
|
457
457
|
n = o ? r : e;
|
|
458
458
|
function i(s, a) {
|
|
459
|
-
const u =
|
|
459
|
+
const u = Kr();
|
|
460
460
|
if (s = // in test mode, ignore the argument provided as we can always retrieve a
|
|
461
461
|
// pinia instance with getActivePinia()
|
|
462
|
-
(process.env.NODE_ENV === "test" &&
|
|
462
|
+
(process.env.NODE_ENV === "test" && Bt && Bt._testing ? null : s) || (u ? je(Hr, null) : null), s && cr(s), process.env.NODE_ENV !== "production" && !Bt)
|
|
463
463
|
throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
|
|
464
464
|
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
|
|
465
465
|
This will fail in production.`);
|
|
466
|
-
s =
|
|
466
|
+
s = Bt, s._s.has(t) || (o ? Gr(t, e, n, s) : Wn(t, n, s), process.env.NODE_ENV !== "production" && (i._pinia = s));
|
|
467
467
|
const c = s._s.get(t);
|
|
468
468
|
if (process.env.NODE_ENV !== "production" && a) {
|
|
469
469
|
const l = "__hot:" + t, f = o ? Gr(l, e, n, s, !0) : Wn(l, gt({}, n), s, !0);
|
|
@@ -482,17 +482,17 @@ This will fail in production.`);
|
|
|
482
482
|
return i.$id = t, i;
|
|
483
483
|
}
|
|
484
484
|
function ss(t) {
|
|
485
|
-
const e =
|
|
485
|
+
const e = Io(t), r = {};
|
|
486
486
|
for (const n in e) {
|
|
487
487
|
const o = e[n];
|
|
488
488
|
o.effect ? r[n] = // ...
|
|
489
|
-
|
|
489
|
+
x({
|
|
490
490
|
get: () => t[n],
|
|
491
491
|
set(i) {
|
|
492
492
|
t[n] = i;
|
|
493
493
|
}
|
|
494
|
-
}) : (ie(o) ||
|
|
495
|
-
|
|
494
|
+
}) : (ie(o) || _r(o)) && (r[n] = // ---
|
|
495
|
+
Kt(t, n));
|
|
496
496
|
}
|
|
497
497
|
return r;
|
|
498
498
|
}
|
|
@@ -501,12 +501,12 @@ typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
|
501
501
|
const us = Object.prototype.toString, cs = (t) => us.call(t) === "[object Object]", ls = () => {
|
|
502
502
|
};
|
|
503
503
|
function fs(...t) {
|
|
504
|
-
if (t.length !== 1) return
|
|
504
|
+
if (t.length !== 1) return Kt(...t);
|
|
505
505
|
const e = t[0];
|
|
506
|
-
return typeof e == "function" ?
|
|
506
|
+
return typeof e == "function" ? gr(cn(() => ({
|
|
507
507
|
get: e,
|
|
508
508
|
set: ls
|
|
509
|
-
}))) :
|
|
509
|
+
}))) : C(e);
|
|
510
510
|
}
|
|
511
511
|
function hs(t, e) {
|
|
512
512
|
function r(...n) {
|
|
@@ -533,13 +533,13 @@ function ps(t = Co, e = {}) {
|
|
|
533
533
|
n.value && t(...a);
|
|
534
534
|
};
|
|
535
535
|
return {
|
|
536
|
-
isActive:
|
|
536
|
+
isActive: gr(n),
|
|
537
537
|
pause: o,
|
|
538
538
|
resume: i,
|
|
539
539
|
eventFilter: s
|
|
540
540
|
};
|
|
541
541
|
}
|
|
542
|
-
function
|
|
542
|
+
function Cr(t) {
|
|
543
543
|
return Array.isArray(t) ? t : [t];
|
|
544
544
|
}
|
|
545
545
|
function ds(t) {
|
|
@@ -562,7 +562,7 @@ function ys(t, e, r = {}) {
|
|
|
562
562
|
};
|
|
563
563
|
}
|
|
564
564
|
function _s(t, e = !0, r) {
|
|
565
|
-
ds() ?
|
|
565
|
+
ds() ? yr(t, r) : e ? t() : oe(t);
|
|
566
566
|
}
|
|
567
567
|
function gs(t, e, r) {
|
|
568
568
|
return rt(t, e, {
|
|
@@ -570,23 +570,23 @@ function gs(t, e, r) {
|
|
|
570
570
|
immediate: !0
|
|
571
571
|
});
|
|
572
572
|
}
|
|
573
|
-
const
|
|
573
|
+
const lr = as ? window : void 0;
|
|
574
574
|
function ms(t) {
|
|
575
575
|
var e;
|
|
576
576
|
const r = wt(t);
|
|
577
577
|
return (e = r?.$el) !== null && e !== void 0 ? e : r;
|
|
578
578
|
}
|
|
579
579
|
function Kn(...t) {
|
|
580
|
-
const e = (n, o, i, s) => (n.addEventListener(o, i, s), () => n.removeEventListener(o, i, s)), r =
|
|
581
|
-
const n =
|
|
580
|
+
const e = (n, o, i, s) => (n.addEventListener(o, i, s), () => n.removeEventListener(o, i, s)), r = x(() => {
|
|
581
|
+
const n = Cr(wt(t[0])).filter((o) => o != null);
|
|
582
582
|
return n.every((o) => typeof o != "string") ? n : void 0;
|
|
583
583
|
});
|
|
584
584
|
return gs(() => {
|
|
585
585
|
var n, o;
|
|
586
586
|
return [
|
|
587
|
-
(n = (o = r.value) === null || o === void 0 ? void 0 : o.map((i) => ms(i))) !== null && n !== void 0 ? n : [
|
|
588
|
-
|
|
589
|
-
|
|
587
|
+
(n = (o = r.value) === null || o === void 0 ? void 0 : o.map((i) => ms(i))) !== null && n !== void 0 ? n : [lr].filter((i) => i != null),
|
|
588
|
+
Cr(wt(r.value ? t[1] : t[0])),
|
|
589
|
+
Cr(or(r.value ? t[2] : t[1])),
|
|
590
590
|
wt(r.value ? t[3] : t[2])
|
|
591
591
|
];
|
|
592
592
|
}, ([n, o, i, s], a, u) => {
|
|
@@ -597,17 +597,17 @@ function Kn(...t) {
|
|
|
597
597
|
});
|
|
598
598
|
}, { flush: "post" });
|
|
599
599
|
}
|
|
600
|
-
const
|
|
600
|
+
const Ye = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Xe = "__vueuse_ssr_handlers__", ws = /* @__PURE__ */ bs();
|
|
601
601
|
function bs() {
|
|
602
|
-
return
|
|
602
|
+
return Xe in Ye || (Ye[Xe] = Ye[Xe] || {}), Ye[Xe];
|
|
603
603
|
}
|
|
604
604
|
function Ss(t, e) {
|
|
605
605
|
return ws[t] || e;
|
|
606
606
|
}
|
|
607
|
-
function
|
|
607
|
+
function Es(t) {
|
|
608
608
|
return t == null ? "any" : t instanceof Set ? "set" : t instanceof Map ? "map" : t instanceof Date ? "date" : typeof t == "boolean" ? "boolean" : typeof t == "string" ? "string" : typeof t == "object" ? "object" : Number.isNaN(t) ? "any" : "number";
|
|
609
609
|
}
|
|
610
|
-
const
|
|
610
|
+
const Is = {
|
|
611
611
|
boolean: {
|
|
612
612
|
read: (t) => t === "true",
|
|
613
613
|
write: (t) => String(t)
|
|
@@ -643,31 +643,31 @@ const Es = {
|
|
|
643
643
|
}, Hn = "vueuse-storage";
|
|
644
644
|
function Os(t, e, r, n = {}) {
|
|
645
645
|
var o;
|
|
646
|
-
const { flush: i = "pre", deep: s = !0, listenToStorageChanges: a = !0, writeDefaults: u = !0, mergeDefaults: c = !1, shallow: l, window: f =
|
|
646
|
+
const { flush: i = "pre", deep: s = !0, listenToStorageChanges: a = !0, writeDefaults: u = !0, mergeDefaults: c = !1, shallow: l, window: f = lr, eventFilter: h, onError: p = (z) => {
|
|
647
647
|
console.error(z);
|
|
648
|
-
}, initOnMounted:
|
|
648
|
+
}, initOnMounted: v } = n, y = (l ? Fe : C)(e), D = x(() => wt(t));
|
|
649
649
|
if (!r) try {
|
|
650
|
-
r = Ss("getDefaultStorage", () =>
|
|
650
|
+
r = Ss("getDefaultStorage", () => lr?.localStorage)();
|
|
651
651
|
} catch (z) {
|
|
652
652
|
p(z);
|
|
653
653
|
}
|
|
654
654
|
if (!r) return y;
|
|
655
|
-
const
|
|
655
|
+
const j = wt(e), tt = Es(j), ut = (o = n.serializer) !== null && o !== void 0 ? o : Is[tt], { pause: Et, resume: Y } = ys(y, (z) => S(z), {
|
|
656
656
|
flush: i,
|
|
657
657
|
deep: s,
|
|
658
658
|
eventFilter: h
|
|
659
659
|
});
|
|
660
|
-
rt(D, () =>
|
|
660
|
+
rt(D, () => N(), { flush: i });
|
|
661
661
|
let _t = !1;
|
|
662
662
|
const k = (z) => {
|
|
663
|
-
|
|
664
|
-
},
|
|
665
|
-
|
|
663
|
+
v && !_t || N(z);
|
|
664
|
+
}, xt = (z) => {
|
|
665
|
+
v && !_t || J(z);
|
|
666
666
|
};
|
|
667
|
-
f && a && (r instanceof Storage ? Kn(f, "storage", k, { passive: !0 }) : Kn(f, Hn,
|
|
668
|
-
_t = !0,
|
|
669
|
-
}) :
|
|
670
|
-
function
|
|
667
|
+
f && a && (r instanceof Storage ? Kn(f, "storage", k, { passive: !0 }) : Kn(f, Hn, xt)), v ? _s(() => {
|
|
668
|
+
_t = !0, N();
|
|
669
|
+
}) : N();
|
|
670
|
+
function L(z, q) {
|
|
671
671
|
if (f) {
|
|
672
672
|
const Q = {
|
|
673
673
|
key: D.value,
|
|
@@ -678,14 +678,14 @@ function Os(t, e, r, n = {}) {
|
|
|
678
678
|
f.dispatchEvent(r instanceof Storage ? new StorageEvent("storage", Q) : new CustomEvent(Hn, { detail: Q }));
|
|
679
679
|
}
|
|
680
680
|
}
|
|
681
|
-
function
|
|
681
|
+
function S(z) {
|
|
682
682
|
try {
|
|
683
683
|
const q = r.getItem(D.value);
|
|
684
684
|
if (z == null)
|
|
685
|
-
|
|
685
|
+
L(q, null), r.removeItem(D.value);
|
|
686
686
|
else {
|
|
687
687
|
const Q = ut.write(z);
|
|
688
|
-
q !== Q && (r.setItem(D.value, Q),
|
|
688
|
+
q !== Q && (r.setItem(D.value, Q), L(q, Q));
|
|
689
689
|
}
|
|
690
690
|
} catch (q) {
|
|
691
691
|
p(q);
|
|
@@ -694,23 +694,23 @@ function Os(t, e, r, n = {}) {
|
|
|
694
694
|
function w(z) {
|
|
695
695
|
const q = z ? z.newValue : r.getItem(D.value);
|
|
696
696
|
if (q == null)
|
|
697
|
-
return u &&
|
|
697
|
+
return u && j != null && r.setItem(D.value, ut.write(j)), j;
|
|
698
698
|
if (!z && c) {
|
|
699
699
|
const Q = ut.read(q);
|
|
700
|
-
return typeof c == "function" ? c(Q,
|
|
701
|
-
|
|
700
|
+
return typeof c == "function" ? c(Q, j) : tt === "object" && !Array.isArray(Q) ? {
|
|
701
|
+
...j,
|
|
702
702
|
...Q
|
|
703
703
|
} : Q;
|
|
704
704
|
} else return typeof q != "string" ? q : ut.read(q);
|
|
705
705
|
}
|
|
706
|
-
function
|
|
706
|
+
function N(z) {
|
|
707
707
|
if (!(z && z.storageArea !== r)) {
|
|
708
708
|
if (z && z.key == null) {
|
|
709
|
-
y.value =
|
|
709
|
+
y.value = j;
|
|
710
710
|
return;
|
|
711
711
|
}
|
|
712
712
|
if (!(z && z.key !== D.value)) {
|
|
713
|
-
|
|
713
|
+
Et();
|
|
714
714
|
try {
|
|
715
715
|
const q = ut.write(y.value);
|
|
716
716
|
(z === void 0 || z?.newValue !== q) && (y.value = w(z));
|
|
@@ -723,18 +723,18 @@ function Os(t, e, r, n = {}) {
|
|
|
723
723
|
}
|
|
724
724
|
}
|
|
725
725
|
function J(z) {
|
|
726
|
-
|
|
726
|
+
N(z.detail);
|
|
727
727
|
}
|
|
728
728
|
return y;
|
|
729
729
|
}
|
|
730
730
|
function ks(t, e, r = {}) {
|
|
731
|
-
const { window: n =
|
|
731
|
+
const { window: n = lr } = r;
|
|
732
732
|
return Os(t, e, n?.localStorage, r);
|
|
733
733
|
}
|
|
734
|
-
function
|
|
734
|
+
function xr() {
|
|
735
735
|
return typeof crypto < "u" && crypto.randomUUID ? crypto.randomUUID() : `${Date.now()}-${Math.random().toString(36).substring(2, 9)}`;
|
|
736
736
|
}
|
|
737
|
-
function
|
|
737
|
+
function Ze(t) {
|
|
738
738
|
const e = {
|
|
739
739
|
type: t.type,
|
|
740
740
|
clientId: t.clientId,
|
|
@@ -763,18 +763,18 @@ function Ds(t) {
|
|
|
763
763
|
}))), e;
|
|
764
764
|
}
|
|
765
765
|
const xo = /* @__PURE__ */ is("hst-operation-log", () => {
|
|
766
|
-
const t =
|
|
766
|
+
const t = C({
|
|
767
767
|
maxOperations: 100,
|
|
768
768
|
enableCrossTabSync: !0,
|
|
769
769
|
autoSyncInterval: 3e4,
|
|
770
770
|
enablePersistence: !1,
|
|
771
771
|
persistenceKeyPrefix: "stonecrop-ops"
|
|
772
|
-
}), e =
|
|
772
|
+
}), e = C([]), r = C(-1), n = C(xr()), o = C(!1), i = C([]), s = x(() => r.value < 0 ? !1 : e.value[r.value]?.reversible ?? !1), a = x(() => r.value < e.value.length - 1), u = x(() => {
|
|
773
773
|
let m = 0;
|
|
774
|
-
for (let
|
|
774
|
+
for (let E = r.value; E >= 0 && e.value[E]?.reversible; E--)
|
|
775
775
|
m++;
|
|
776
776
|
return m;
|
|
777
|
-
}), c =
|
|
777
|
+
}), c = x(() => e.value.length - 1 - r.value), l = x(
|
|
778
778
|
() => ({
|
|
779
779
|
canUndo: s.value,
|
|
780
780
|
canRedo: a.value,
|
|
@@ -784,189 +784,189 @@ const xo = /* @__PURE__ */ is("hst-operation-log", () => {
|
|
|
784
784
|
})
|
|
785
785
|
);
|
|
786
786
|
function f(m) {
|
|
787
|
-
t.value = { ...t.value, ...m }, t.value.enablePersistence && (Q(), ot()), t.value.enableCrossTabSync &&
|
|
787
|
+
t.value = { ...t.value, ...m }, t.value.enablePersistence && (Q(), ot()), t.value.enableCrossTabSync && S();
|
|
788
788
|
}
|
|
789
|
-
function h(m,
|
|
790
|
-
const
|
|
789
|
+
function h(m, E = "user") {
|
|
790
|
+
const I = {
|
|
791
791
|
...m,
|
|
792
|
-
id:
|
|
792
|
+
id: xr(),
|
|
793
793
|
timestamp: /* @__PURE__ */ new Date(),
|
|
794
|
-
source:
|
|
794
|
+
source: E,
|
|
795
795
|
userId: t.value.userId
|
|
796
796
|
};
|
|
797
|
-
if (t.value.operationFilter && !t.value.operationFilter(
|
|
798
|
-
return
|
|
797
|
+
if (t.value.operationFilter && !t.value.operationFilter(I))
|
|
798
|
+
return I.id;
|
|
799
799
|
if (o.value && i.value.length > 0)
|
|
800
|
-
return i.value[i.value.length - 1].operations.push(
|
|
801
|
-
if (r.value < e.value.length - 1 && (e.value = e.value.slice(0, r.value + 1)), e.value.push(
|
|
802
|
-
const
|
|
803
|
-
e.value = e.value.slice(
|
|
800
|
+
return i.value[i.value.length - 1].operations.push(I), I.id;
|
|
801
|
+
if (r.value < e.value.length - 1 && (e.value = e.value.slice(0, r.value + 1)), e.value.push(I), r.value++, t.value.maxOperations && e.value.length > t.value.maxOperations) {
|
|
802
|
+
const d = e.value.length - t.value.maxOperations;
|
|
803
|
+
e.value = e.value.slice(d), r.value -= d;
|
|
804
804
|
}
|
|
805
|
-
return t.value.enableCrossTabSync && w(
|
|
805
|
+
return t.value.enableCrossTabSync && w(I), I.id;
|
|
806
806
|
}
|
|
807
807
|
function p() {
|
|
808
808
|
o.value = !0, i.value.push({
|
|
809
|
-
id:
|
|
809
|
+
id: xr(),
|
|
810
810
|
operations: []
|
|
811
811
|
});
|
|
812
812
|
}
|
|
813
|
-
function
|
|
813
|
+
function v(m) {
|
|
814
814
|
if (!o.value || i.value.length === 0)
|
|
815
815
|
return null;
|
|
816
|
-
const
|
|
817
|
-
if (
|
|
816
|
+
const E = i.value.pop(), I = E.operations;
|
|
817
|
+
if (I.length === 0)
|
|
818
818
|
return i.value.length === 0 && (o.value = !1), null;
|
|
819
|
-
const
|
|
820
|
-
id:
|
|
819
|
+
const d = E.id, _ = I.every((O) => O.reversible), g = {
|
|
820
|
+
id: d,
|
|
821
821
|
type: "batch",
|
|
822
822
|
path: "",
|
|
823
823
|
// Batch doesn't have a single path
|
|
824
824
|
fieldname: "",
|
|
825
825
|
beforeValue: null,
|
|
826
826
|
afterValue: null,
|
|
827
|
-
doctype:
|
|
827
|
+
doctype: I[0]?.doctype || "",
|
|
828
828
|
timestamp: /* @__PURE__ */ new Date(),
|
|
829
829
|
source: "user",
|
|
830
830
|
reversible: _,
|
|
831
831
|
irreversibleReason: _ ? void 0 : "Contains irreversible operations",
|
|
832
|
-
descendantOperationIds:
|
|
832
|
+
descendantOperationIds: I.map((O) => O.id),
|
|
833
833
|
metadata: { description: m }
|
|
834
834
|
};
|
|
835
|
-
return
|
|
836
|
-
O.ancestorOperationId =
|
|
837
|
-
}), i.value.length > 0 ? i.value[i.value.length - 1].operations.push(g) : (e.value.push(...
|
|
835
|
+
return I.forEach((O) => {
|
|
836
|
+
O.ancestorOperationId = d;
|
|
837
|
+
}), i.value.length > 0 ? i.value[i.value.length - 1].operations.push(g) : (e.value.push(...I, g), r.value = e.value.length - 1), t.value.enableCrossTabSync && N(I, g), i.value.length === 0 && (o.value = !1), d;
|
|
838
838
|
}
|
|
839
839
|
function y() {
|
|
840
840
|
i.value = [], o.value = !1;
|
|
841
841
|
}
|
|
842
842
|
function D(m) {
|
|
843
843
|
if (!s.value) return !1;
|
|
844
|
-
const
|
|
845
|
-
if (!
|
|
846
|
-
return typeof console < "u" &&
|
|
844
|
+
const E = e.value[r.value];
|
|
845
|
+
if (!E.reversible)
|
|
846
|
+
return typeof console < "u" && E.irreversibleReason && console.warn("Cannot undo irreversible operation:", E.irreversibleReason), !1;
|
|
847
847
|
try {
|
|
848
|
-
if (
|
|
849
|
-
for (let
|
|
850
|
-
const
|
|
848
|
+
if (E.type === "batch" && E.descendantOperationIds)
|
|
849
|
+
for (let I = E.descendantOperationIds.length - 1; I >= 0; I--) {
|
|
850
|
+
const d = E.descendantOperationIds[I], _ = e.value.find((g) => g.id === d);
|
|
851
851
|
_ && tt(_, m);
|
|
852
852
|
}
|
|
853
853
|
else
|
|
854
|
-
tt(
|
|
855
|
-
return r.value--, t.value.enableCrossTabSync && J(
|
|
856
|
-
} catch (
|
|
857
|
-
return typeof console < "u" && console.error("Undo failed:",
|
|
854
|
+
tt(E, m);
|
|
855
|
+
return r.value--, t.value.enableCrossTabSync && J(E), !0;
|
|
856
|
+
} catch (I) {
|
|
857
|
+
return typeof console < "u" && console.error("Undo failed:", I), !1;
|
|
858
858
|
}
|
|
859
859
|
}
|
|
860
|
-
function
|
|
860
|
+
function j(m) {
|
|
861
861
|
if (!a.value) return !1;
|
|
862
|
-
const
|
|
862
|
+
const E = e.value[r.value + 1];
|
|
863
863
|
try {
|
|
864
|
-
if (
|
|
865
|
-
for (const
|
|
866
|
-
const
|
|
867
|
-
|
|
864
|
+
if (E.type === "batch" && E.descendantOperationIds)
|
|
865
|
+
for (const I of E.descendantOperationIds) {
|
|
866
|
+
const d = e.value.find((_) => _.id === I);
|
|
867
|
+
d && ut(d, m);
|
|
868
868
|
}
|
|
869
869
|
else
|
|
870
|
-
ut(
|
|
871
|
-
return r.value++, t.value.enableCrossTabSync && z(
|
|
872
|
-
} catch (
|
|
873
|
-
return typeof console < "u" && console.error("Redo failed:",
|
|
870
|
+
ut(E, m);
|
|
871
|
+
return r.value++, t.value.enableCrossTabSync && z(E), !0;
|
|
872
|
+
} catch (I) {
|
|
873
|
+
return typeof console < "u" && console.error("Redo failed:", I), !1;
|
|
874
874
|
}
|
|
875
875
|
}
|
|
876
|
-
function tt(m,
|
|
877
|
-
(m.type === "set" || m.type === "delete") &&
|
|
876
|
+
function tt(m, E) {
|
|
877
|
+
(m.type === "set" || m.type === "delete") && E && typeof E.set == "function" && E.set(m.path, m.beforeValue, "undo");
|
|
878
878
|
}
|
|
879
|
-
function ut(m,
|
|
880
|
-
(m.type === "set" || m.type === "delete") &&
|
|
879
|
+
function ut(m, E) {
|
|
880
|
+
(m.type === "set" || m.type === "delete") && E && typeof E.set == "function" && E.set(m.path, m.afterValue, "redo");
|
|
881
881
|
}
|
|
882
|
-
function
|
|
883
|
-
const m = e.value.filter((
|
|
882
|
+
function Et() {
|
|
883
|
+
const m = e.value.filter((I) => I.reversible).length, E = e.value.map((I) => I.timestamp);
|
|
884
884
|
return {
|
|
885
885
|
operations: [...e.value],
|
|
886
886
|
currentIndex: r.value,
|
|
887
887
|
totalOperations: e.value.length,
|
|
888
888
|
reversibleOperations: m,
|
|
889
889
|
irreversibleOperations: e.value.length - m,
|
|
890
|
-
oldestOperation:
|
|
891
|
-
newestOperation:
|
|
890
|
+
oldestOperation: E.length > 0 ? new Date(Math.min(...E.map((I) => I.getTime()))) : void 0,
|
|
891
|
+
newestOperation: E.length > 0 ? new Date(Math.max(...E.map((I) => I.getTime()))) : void 0
|
|
892
892
|
};
|
|
893
893
|
}
|
|
894
894
|
function Y() {
|
|
895
895
|
e.value = [], r.value = -1;
|
|
896
896
|
}
|
|
897
|
-
function _t(m,
|
|
898
|
-
return e.value.filter((
|
|
897
|
+
function _t(m, E) {
|
|
898
|
+
return e.value.filter((I) => I.doctype === m && (E === void 0 || I.recordId === E));
|
|
899
899
|
}
|
|
900
|
-
function k(m,
|
|
901
|
-
const
|
|
902
|
-
|
|
900
|
+
function k(m, E) {
|
|
901
|
+
const I = e.value.find((d) => d.id === m);
|
|
902
|
+
I && (I.reversible = !1, I.irreversibleReason = E);
|
|
903
903
|
}
|
|
904
|
-
function
|
|
904
|
+
function xt(m, E, I, d = "success", _) {
|
|
905
905
|
const g = {
|
|
906
906
|
type: "action",
|
|
907
|
-
path:
|
|
907
|
+
path: I && I.length > 0 ? `${m}.${I[0]}` : m,
|
|
908
908
|
fieldname: "",
|
|
909
909
|
beforeValue: null,
|
|
910
910
|
afterValue: null,
|
|
911
911
|
doctype: m,
|
|
912
|
-
recordId:
|
|
912
|
+
recordId: I && I.length > 0 ? I[0] : void 0,
|
|
913
913
|
reversible: !1,
|
|
914
914
|
// Actions are typically not reversible
|
|
915
|
-
actionName:
|
|
916
|
-
actionRecordIds:
|
|
917
|
-
actionResult:
|
|
915
|
+
actionName: E,
|
|
916
|
+
actionRecordIds: I,
|
|
917
|
+
actionResult: d,
|
|
918
918
|
actionError: _
|
|
919
919
|
};
|
|
920
920
|
return h(g);
|
|
921
921
|
}
|
|
922
|
-
let
|
|
923
|
-
function
|
|
924
|
-
typeof window > "u" || !window.BroadcastChannel || (
|
|
925
|
-
const
|
|
926
|
-
if (!
|
|
927
|
-
const
|
|
928
|
-
|
|
922
|
+
let L = null;
|
|
923
|
+
function S() {
|
|
924
|
+
typeof window > "u" || !window.BroadcastChannel || (L = new BroadcastChannel("stonecrop-operation-log"), L.addEventListener("message", (m) => {
|
|
925
|
+
const E = m.data;
|
|
926
|
+
if (!E || typeof E != "object") return;
|
|
927
|
+
const I = Ds(E);
|
|
928
|
+
I.clientId !== n.value && (I.type === "operation" && I.operation ? (e.value.push({ ...I.operation, source: "sync" }), r.value = e.value.length - 1) : I.type === "operation" && I.operations && (e.value.push(...I.operations.map((d) => ({ ...d, source: "sync" }))), r.value = e.value.length - 1));
|
|
929
929
|
}));
|
|
930
930
|
}
|
|
931
931
|
function w(m) {
|
|
932
|
-
if (!
|
|
933
|
-
const
|
|
932
|
+
if (!L) return;
|
|
933
|
+
const E = {
|
|
934
934
|
type: "operation",
|
|
935
935
|
operation: m,
|
|
936
936
|
clientId: n.value,
|
|
937
937
|
timestamp: /* @__PURE__ */ new Date()
|
|
938
938
|
};
|
|
939
|
-
|
|
939
|
+
L.postMessage(Ze(E));
|
|
940
940
|
}
|
|
941
|
-
function
|
|
942
|
-
if (!
|
|
943
|
-
const
|
|
941
|
+
function N(m, E) {
|
|
942
|
+
if (!L) return;
|
|
943
|
+
const I = {
|
|
944
944
|
type: "operation",
|
|
945
|
-
operations: [...m,
|
|
945
|
+
operations: [...m, E],
|
|
946
946
|
clientId: n.value,
|
|
947
947
|
timestamp: /* @__PURE__ */ new Date()
|
|
948
948
|
};
|
|
949
|
-
|
|
949
|
+
L.postMessage(Ze(I));
|
|
950
950
|
}
|
|
951
951
|
function J(m) {
|
|
952
|
-
if (!
|
|
953
|
-
const
|
|
952
|
+
if (!L) return;
|
|
953
|
+
const E = {
|
|
954
954
|
type: "undo",
|
|
955
955
|
operation: m,
|
|
956
956
|
clientId: n.value,
|
|
957
957
|
timestamp: /* @__PURE__ */ new Date()
|
|
958
958
|
};
|
|
959
|
-
|
|
959
|
+
L.postMessage(Ze(E));
|
|
960
960
|
}
|
|
961
961
|
function z(m) {
|
|
962
|
-
if (!
|
|
963
|
-
const
|
|
962
|
+
if (!L) return;
|
|
963
|
+
const E = {
|
|
964
964
|
type: "redo",
|
|
965
965
|
operation: m,
|
|
966
966
|
clientId: n.value,
|
|
967
967
|
timestamp: /* @__PURE__ */ new Date()
|
|
968
968
|
};
|
|
969
|
-
|
|
969
|
+
L.postMessage(Ze(E));
|
|
970
970
|
}
|
|
971
971
|
const q = ks("stonecrop-operations", null, {
|
|
972
972
|
serializer: {
|
|
@@ -984,9 +984,9 @@ const xo = /* @__PURE__ */ is("hst-operation-log", () => {
|
|
|
984
984
|
if (!(typeof window > "u"))
|
|
985
985
|
try {
|
|
986
986
|
const m = q.value;
|
|
987
|
-
m && Array.isArray(m.operations) && (e.value = m.operations.map((
|
|
988
|
-
...
|
|
989
|
-
timestamp: new Date(
|
|
987
|
+
m && Array.isArray(m.operations) && (e.value = m.operations.map((E) => ({
|
|
988
|
+
...E,
|
|
989
|
+
timestamp: new Date(E.timestamp)
|
|
990
990
|
})), r.value = m.currentIndex ?? -1);
|
|
991
991
|
} catch (m) {
|
|
992
992
|
typeof console < "u" && console.error("Failed to load operations from persistence:", m);
|
|
@@ -1031,18 +1031,18 @@ const xo = /* @__PURE__ */ is("hst-operation-log", () => {
|
|
|
1031
1031
|
configure: f,
|
|
1032
1032
|
addOperation: h,
|
|
1033
1033
|
startBatch: p,
|
|
1034
|
-
commitBatch:
|
|
1034
|
+
commitBatch: v,
|
|
1035
1035
|
cancelBatch: y,
|
|
1036
1036
|
undo: D,
|
|
1037
|
-
redo:
|
|
1037
|
+
redo: j,
|
|
1038
1038
|
clear: Y,
|
|
1039
1039
|
getOperationsFor: _t,
|
|
1040
|
-
getSnapshot:
|
|
1040
|
+
getSnapshot: Et,
|
|
1041
1041
|
markIrreversible: k,
|
|
1042
|
-
logAction:
|
|
1042
|
+
logAction: xt
|
|
1043
1043
|
};
|
|
1044
1044
|
});
|
|
1045
|
-
|
|
1045
|
+
class ze {
|
|
1046
1046
|
/**
|
|
1047
1047
|
* The root FieldTriggerEngine instance
|
|
1048
1048
|
*/
|
|
@@ -1063,9 +1063,9 @@ let zs = class nr {
|
|
|
1063
1063
|
* @param options - Configuration options for the field trigger engine
|
|
1064
1064
|
*/
|
|
1065
1065
|
constructor(e = {}) {
|
|
1066
|
-
if (
|
|
1067
|
-
return
|
|
1068
|
-
|
|
1066
|
+
if (ze._root)
|
|
1067
|
+
return ze._root;
|
|
1068
|
+
ze._root = this, this.options = {
|
|
1069
1069
|
defaultTimeout: e.defaultTimeout ?? 5e3,
|
|
1070
1070
|
debug: e.debug ?? !1,
|
|
1071
1071
|
enableRollback: e.enableRollback ?? !0,
|
|
@@ -1174,13 +1174,13 @@ let zs = class nr {
|
|
|
1174
1174
|
break;
|
|
1175
1175
|
}
|
|
1176
1176
|
} catch (D) {
|
|
1177
|
-
const
|
|
1177
|
+
const j = {
|
|
1178
1178
|
success: !1,
|
|
1179
1179
|
error: D instanceof Error ? D : new Error(String(D)),
|
|
1180
1180
|
executionTime: 0,
|
|
1181
1181
|
action: y
|
|
1182
1182
|
};
|
|
1183
|
-
a.push(
|
|
1183
|
+
a.push(j), u = !0;
|
|
1184
1184
|
break;
|
|
1185
1185
|
}
|
|
1186
1186
|
if (h && u && l && e.store)
|
|
@@ -1189,9 +1189,9 @@ let zs = class nr {
|
|
|
1189
1189
|
} catch (y) {
|
|
1190
1190
|
console.error("[FieldTriggers] Rollback failed:", y);
|
|
1191
1191
|
}
|
|
1192
|
-
const p = performance.now() - s,
|
|
1193
|
-
if (
|
|
1194
|
-
for (const y of
|
|
1192
|
+
const p = performance.now() - s, v = a.filter((y) => !y.success && y.error != null);
|
|
1193
|
+
if (v.length > 0 && this.options.errorHandler)
|
|
1194
|
+
for (const y of v)
|
|
1195
1195
|
try {
|
|
1196
1196
|
y.error && this.options.errorHandler(y.error, e, y.action);
|
|
1197
1197
|
} catch (D) {
|
|
@@ -1385,9 +1385,9 @@ let zs = class nr {
|
|
|
1385
1385
|
throw console.error("[FieldTriggers] Failed to restore snapshot:", n), n;
|
|
1386
1386
|
}
|
|
1387
1387
|
}
|
|
1388
|
-
}
|
|
1388
|
+
}
|
|
1389
1389
|
function Qr(t) {
|
|
1390
|
-
return new
|
|
1390
|
+
return new ze(t);
|
|
1391
1391
|
}
|
|
1392
1392
|
function Jn() {
|
|
1393
1393
|
try {
|
|
@@ -1437,7 +1437,7 @@ class te {
|
|
|
1437
1437
|
return r.registry[e];
|
|
1438
1438
|
}
|
|
1439
1439
|
}
|
|
1440
|
-
class
|
|
1440
|
+
class fr {
|
|
1441
1441
|
target;
|
|
1442
1442
|
ancestorPath;
|
|
1443
1443
|
rootNode;
|
|
@@ -1463,7 +1463,7 @@ class lr {
|
|
|
1463
1463
|
getNode(e) {
|
|
1464
1464
|
const r = this.resolvePath(e), n = this.resolveValue(e), o = r.split(".");
|
|
1465
1465
|
let i = this.doctype;
|
|
1466
|
-
return this.doctype === "StonecropStore" && o.length >= 1 && (i = o[0]), typeof n == "object" && n !== null && !this.isPrimitive(n) ? new
|
|
1466
|
+
return this.doctype === "StonecropStore" && o.length >= 1 && (i = o[0]), typeof n == "object" && n !== null && !this.isPrimitive(n) ? new fr(n, i, r, this.rootNode) : new fr(n, i, r, this.rootNode);
|
|
1467
1467
|
}
|
|
1468
1468
|
set(e, r, n = "user") {
|
|
1469
1469
|
const o = this.resolvePath(e);
|
|
@@ -1677,10 +1677,10 @@ class lr {
|
|
|
1677
1677
|
return e ? e.replace(/\[(\d+)\]/g, ".$1").split(".").filter((r) => r.length > 0) : [];
|
|
1678
1678
|
}
|
|
1679
1679
|
}
|
|
1680
|
-
function
|
|
1681
|
-
return new
|
|
1680
|
+
function Rs(t, e) {
|
|
1681
|
+
return new fr(t, e, "", null);
|
|
1682
1682
|
}
|
|
1683
|
-
class
|
|
1683
|
+
class Ae {
|
|
1684
1684
|
/**
|
|
1685
1685
|
* Singleton instance of Stonecrop. Only one Stonecrop instance can exist
|
|
1686
1686
|
* per application, ensuring consistent HST state and registry access.
|
|
@@ -1702,9 +1702,9 @@ class ze {
|
|
|
1702
1702
|
* @param options - Options including the data client (can be set later via setClient)
|
|
1703
1703
|
*/
|
|
1704
1704
|
constructor(e, r, n) {
|
|
1705
|
-
if (
|
|
1706
|
-
return
|
|
1707
|
-
|
|
1705
|
+
if (Ae._root)
|
|
1706
|
+
return Ae._root;
|
|
1707
|
+
Ae._root = this, this.registry = e, this._operationLogConfig = r, this._client = n?.client, this.initializeHSTStore(), this.setupRegistrySync();
|
|
1708
1708
|
}
|
|
1709
1709
|
/**
|
|
1710
1710
|
* Set the data client for fetching doctype metadata and records.
|
|
@@ -1743,7 +1743,7 @@ class ze {
|
|
|
1743
1743
|
const e = {};
|
|
1744
1744
|
Object.keys(this.registry.registry).forEach((r) => {
|
|
1745
1745
|
e[r] = {};
|
|
1746
|
-
}), this.hstStore =
|
|
1746
|
+
}), this.hstStore = Rs(ko(e), "StonecropStore");
|
|
1747
1747
|
}
|
|
1748
1748
|
/**
|
|
1749
1749
|
* Setup automatic sync with Registry when doctypes are added
|
|
@@ -1847,7 +1847,7 @@ class ze {
|
|
|
1847
1847
|
try {
|
|
1848
1848
|
const p = f.getAction(h);
|
|
1849
1849
|
if (!p) throw new Error(`Action "${h}" is not registered in FieldTriggerEngine`);
|
|
1850
|
-
const
|
|
1850
|
+
const v = {
|
|
1851
1851
|
path: `${e.slug}.${i?.[0] ?? ""}`,
|
|
1852
1852
|
fieldname: r,
|
|
1853
1853
|
beforeValue: void 0,
|
|
@@ -1857,7 +1857,7 @@ class ze {
|
|
|
1857
1857
|
recordId: s,
|
|
1858
1858
|
timestamp: /* @__PURE__ */ new Date()
|
|
1859
1859
|
};
|
|
1860
|
-
p(
|
|
1860
|
+
p(v);
|
|
1861
1861
|
} catch (p) {
|
|
1862
1862
|
throw c = "failure", l = p instanceof Error ? p.message : "Unknown error", p;
|
|
1863
1863
|
}
|
|
@@ -2084,11 +2084,11 @@ function Gn(t, e) {
|
|
|
2084
2084
|
const r = new Error(t);
|
|
2085
2085
|
return r.code = e, r;
|
|
2086
2086
|
}
|
|
2087
|
-
function
|
|
2087
|
+
function zs(t) {
|
|
2088
2088
|
t || (t = {});
|
|
2089
|
-
const e = t.registry ||
|
|
2090
|
-
|
|
2091
|
-
const y =
|
|
2089
|
+
const e = t.registry || je("$registry"), r = je("$stonecrop"), n = C(), o = C(), i = C({}), s = C(), a = C(), u = C([]), c = C(!1), l = C(null), f = C(), h = x(() => !n.value || !f.value || !t.recordId || t.recordId === "new" ? !0 : n.value.isWorkflowReady(f.value, t.recordId).ready), p = x(() => !n.value || !f.value || !t.recordId || t.recordId === "new" ? [] : n.value.isWorkflowReady(f.value, t.recordId).blockedLinks ?? []), v = r || Ae._root;
|
|
2090
|
+
v && (n.value = v), t?.doctype && typeof t.doctype != "string" && (f.value = t.doctype);
|
|
2091
|
+
const y = C([]), D = C(-1), j = x(() => n.value?.getOperationLogStore().canUndo ?? !1), tt = x(() => n.value?.getOperationLogStore().canRedo ?? !1), ut = x(() => n.value?.getOperationLogStore().undoCount ?? 0), Et = x(() => n.value?.getOperationLogStore().redoCount ?? 0), Y = x(
|
|
2092
2092
|
() => n.value?.getOperationLogStore().undoRedoState ?? {
|
|
2093
2093
|
canUndo: !1,
|
|
2094
2094
|
canRedo: !1,
|
|
@@ -2096,13 +2096,13 @@ function Rs(t) {
|
|
|
2096
2096
|
redoCount: 0,
|
|
2097
2097
|
currentIndex: -1
|
|
2098
2098
|
}
|
|
2099
|
-
), _t = (g) => n.value?.getOperationLogStore().undo(g) ?? !1, k = (g) => n.value?.getOperationLogStore().redo(g) ?? !1,
|
|
2099
|
+
), _t = (g) => n.value?.getOperationLogStore().undo(g) ?? !1, k = (g) => n.value?.getOperationLogStore().redo(g) ?? !1, xt = () => {
|
|
2100
2100
|
n.value?.getOperationLogStore().startBatch();
|
|
2101
|
-
},
|
|
2101
|
+
}, L = (g) => n.value?.getOperationLogStore().commitBatch(g) ?? null, S = () => {
|
|
2102
2102
|
n.value?.getOperationLogStore().cancelBatch();
|
|
2103
2103
|
}, w = () => {
|
|
2104
2104
|
n.value?.getOperationLogStore().clear();
|
|
2105
|
-
},
|
|
2105
|
+
}, N = (g, O) => n.value?.getOperationLogStore().getOperationsFor(g, O) ?? [], J = () => n.value?.getOperationLogStore().getSnapshot() ?? {
|
|
2106
2106
|
operations: [],
|
|
2107
2107
|
currentIndex: -1,
|
|
2108
2108
|
totalOperations: 0,
|
|
@@ -2110,7 +2110,7 @@ function Rs(t) {
|
|
|
2110
2110
|
irreversibleOperations: 0
|
|
2111
2111
|
}, z = (g, O) => {
|
|
2112
2112
|
n.value?.getOperationLogStore().markIrreversible(g, O);
|
|
2113
|
-
}, q = (g, O,
|
|
2113
|
+
}, q = (g, O, b, R = "success", A) => n.value?.getOperationLogStore().logAction(g, O, b, R, A) ?? "", Q = (g) => {
|
|
2114
2114
|
n.value?.getOperationLogStore().configure(g);
|
|
2115
2115
|
};
|
|
2116
2116
|
if (e && n.value)
|
|
@@ -2118,44 +2118,44 @@ function Rs(t) {
|
|
|
2118
2118
|
const g = n.value.getOperationLogStore(), O = ss(g);
|
|
2119
2119
|
y.value = O.operations.value, D.value = O.currentIndex.value, rt(
|
|
2120
2120
|
() => O.operations.value,
|
|
2121
|
-
(
|
|
2122
|
-
y.value =
|
|
2121
|
+
(b) => {
|
|
2122
|
+
y.value = b;
|
|
2123
2123
|
}
|
|
2124
2124
|
), rt(
|
|
2125
2125
|
() => O.currentIndex.value,
|
|
2126
|
-
(
|
|
2127
|
-
D.value =
|
|
2126
|
+
(b) => {
|
|
2127
|
+
D.value = b;
|
|
2128
2128
|
}
|
|
2129
2129
|
);
|
|
2130
2130
|
} catch {
|
|
2131
2131
|
}
|
|
2132
|
-
t.doctype && typeof t.doctype != "string" && e && n.value && (o.value = n.value.getStore(), u.value = e.resolveSchema(t.doctype), (!t.recordId || t.recordId === "new") && (i.value = e.initializeRecord(u.value)), o.value &&
|
|
2132
|
+
t.doctype && typeof t.doctype != "string" && e && n.value && (o.value = n.value.getStore(), u.value = e.resolveSchema(t.doctype), (!t.recordId || t.recordId === "new") && (i.value = e.initializeRecord(u.value)), o.value && $r(t.doctype, t.recordId || "new", i, o.value)), yr(async () => {
|
|
2133
2133
|
if (!(!e || !n.value)) {
|
|
2134
2134
|
if (!t.doctype && e.router) {
|
|
2135
2135
|
const g = e.router.currentRoute.value;
|
|
2136
2136
|
if (!g.path) return;
|
|
2137
|
-
const O = g.path.split("/").filter((
|
|
2137
|
+
const O = g.path.split("/").filter((R) => R.length > 0), b = O[1]?.toLowerCase();
|
|
2138
2138
|
if (O.length > 0) {
|
|
2139
|
-
const
|
|
2139
|
+
const R = {
|
|
2140
2140
|
path: g.path,
|
|
2141
2141
|
segments: O
|
|
2142
|
-
},
|
|
2143
|
-
if (
|
|
2144
|
-
if (e.addDoctype(
|
|
2145
|
-
const
|
|
2146
|
-
if (
|
|
2147
|
-
i.value =
|
|
2142
|
+
}, A = await e.getMeta?.(R);
|
|
2143
|
+
if (A) {
|
|
2144
|
+
if (e.addDoctype(A), n.value.setup(A), s.value = A, a.value = b, o.value = n.value.getStore(), e && (u.value = e.resolveSchema(A)), b && b !== "new") {
|
|
2145
|
+
const kt = n.value.getRecordById(A, b);
|
|
2146
|
+
if (kt)
|
|
2147
|
+
i.value = kt.get("") || {};
|
|
2148
2148
|
else
|
|
2149
2149
|
try {
|
|
2150
|
-
await n.value.getRecord(
|
|
2151
|
-
const
|
|
2152
|
-
|
|
2150
|
+
await n.value.getRecord(A, b);
|
|
2151
|
+
const $t = n.value.getRecordById(A, b);
|
|
2152
|
+
$t && (i.value = $t.get("") || {});
|
|
2153
2153
|
} catch {
|
|
2154
2154
|
i.value = e.initializeRecord(u.value);
|
|
2155
2155
|
}
|
|
2156
2156
|
} else
|
|
2157
2157
|
i.value = e.initializeRecord(u.value);
|
|
2158
|
-
o.value &&
|
|
2158
|
+
o.value && $r(A, b || "new", i, o.value), n.value.runAction(A, "load", b ? [b] : void 0);
|
|
2159
2159
|
}
|
|
2160
2160
|
}
|
|
2161
2161
|
}
|
|
@@ -2164,46 +2164,46 @@ function Rs(t) {
|
|
|
2164
2164
|
if (typeof t.doctype == "string") {
|
|
2165
2165
|
const O = t.doctype;
|
|
2166
2166
|
o.value = n.value.getStore(), c.value = !0, l.value = null;
|
|
2167
|
-
let
|
|
2167
|
+
let b;
|
|
2168
2168
|
try {
|
|
2169
|
-
if (
|
|
2170
|
-
const
|
|
2169
|
+
if (b = e.getDoctype(O), !b && e.getMeta) {
|
|
2170
|
+
const R = {
|
|
2171
2171
|
path: `/${O}`,
|
|
2172
2172
|
segments: [O]
|
|
2173
2173
|
};
|
|
2174
|
-
|
|
2174
|
+
b = await e.getMeta(R), b && e.addDoctype(b);
|
|
2175
2175
|
}
|
|
2176
|
-
|
|
2177
|
-
} catch (
|
|
2178
|
-
l.value =
|
|
2176
|
+
b || (l.value = new Error(`Doctype '${O}' not found in registry and getMeta returned no result`));
|
|
2177
|
+
} catch (R) {
|
|
2178
|
+
l.value = R instanceof Error ? R : new Error(String(R));
|
|
2179
2179
|
} finally {
|
|
2180
2180
|
c.value = !1;
|
|
2181
2181
|
}
|
|
2182
|
-
if (f.value =
|
|
2183
|
-
if (u.value = e.resolveSchema(
|
|
2184
|
-
const
|
|
2185
|
-
if (
|
|
2186
|
-
i.value =
|
|
2182
|
+
if (f.value = b, !b) return;
|
|
2183
|
+
if (u.value = e.resolveSchema(b), g && g !== "new") {
|
|
2184
|
+
const R = n.value.getRecordById(b, g);
|
|
2185
|
+
if (R)
|
|
2186
|
+
i.value = R.get("") || {};
|
|
2187
2187
|
else
|
|
2188
2188
|
try {
|
|
2189
|
-
await n.value.getRecord(
|
|
2190
|
-
const
|
|
2191
|
-
|
|
2189
|
+
await n.value.getRecord(b, g);
|
|
2190
|
+
const A = n.value.getRecordById(b, g);
|
|
2191
|
+
A && (i.value = A.get("") || {});
|
|
2192
2192
|
} catch {
|
|
2193
2193
|
i.value = e.initializeRecord(u.value);
|
|
2194
2194
|
}
|
|
2195
2195
|
} else
|
|
2196
2196
|
i.value = e.initializeRecord(u.value);
|
|
2197
|
-
o.value &&
|
|
2197
|
+
o.value && $r(b, g || "new", i, o.value);
|
|
2198
2198
|
} else if (g && g !== "new") {
|
|
2199
|
-
const O = t.doctype,
|
|
2200
|
-
if (
|
|
2201
|
-
i.value =
|
|
2199
|
+
const O = t.doctype, b = n.value.getRecordById(O, g);
|
|
2200
|
+
if (b)
|
|
2201
|
+
i.value = b.get("") || {};
|
|
2202
2202
|
else
|
|
2203
2203
|
try {
|
|
2204
2204
|
await n.value.getRecord(O, g);
|
|
2205
|
-
const
|
|
2206
|
-
|
|
2205
|
+
const R = n.value.getRecordById(O, g);
|
|
2206
|
+
R && (i.value = R.get("") || {});
|
|
2207
2207
|
} catch {
|
|
2208
2208
|
i.value = e.initializeRecord(u.value);
|
|
2209
2209
|
}
|
|
@@ -2212,70 +2212,70 @@ function Rs(t) {
|
|
|
2212
2212
|
}
|
|
2213
2213
|
});
|
|
2214
2214
|
const Ot = (g, O) => {
|
|
2215
|
-
const
|
|
2216
|
-
if (!
|
|
2217
|
-
const
|
|
2218
|
-
return `${
|
|
2215
|
+
const b = f.value || s.value;
|
|
2216
|
+
if (!b) return "";
|
|
2217
|
+
const R = O || t.recordId || a.value || "new";
|
|
2218
|
+
return `${b.slug}.${R}.${g}`;
|
|
2219
2219
|
}, ot = (g) => {
|
|
2220
2220
|
const O = f.value || s.value;
|
|
2221
2221
|
if (!(!o.value || !n.value || !O))
|
|
2222
2222
|
try {
|
|
2223
|
-
const
|
|
2224
|
-
if (
|
|
2225
|
-
const
|
|
2226
|
-
if (o.value.has(`${
|
|
2227
|
-
const ki = `${
|
|
2228
|
-
let
|
|
2229
|
-
for (let
|
|
2230
|
-
if (
|
|
2231
|
-
const Di =
|
|
2232
|
-
o.value.set(
|
|
2223
|
+
const b = g.path.split(".");
|
|
2224
|
+
if (b.length >= 2) {
|
|
2225
|
+
const kt = b[0], $t = b[1];
|
|
2226
|
+
if (o.value.has(`${kt}.${$t}`) || n.value.addRecord(O, $t, { ...i.value }), b.length > 3) {
|
|
2227
|
+
const ki = `${kt}.${$t}`, Dr = b.slice(2);
|
|
2228
|
+
let Rr = ki;
|
|
2229
|
+
for (let Qe = 0; Qe < Dr.length - 1; Qe++)
|
|
2230
|
+
if (Rr += `.${Dr[Qe]}`, !o.value.has(Rr)) {
|
|
2231
|
+
const Di = Dr[Qe + 1], Ri = !isNaN(Number(Di));
|
|
2232
|
+
o.value.set(Rr, Ri ? [] : {});
|
|
2233
2233
|
}
|
|
2234
2234
|
}
|
|
2235
2235
|
}
|
|
2236
2236
|
o.value.set(g.path, g.value);
|
|
2237
|
-
const
|
|
2238
|
-
|
|
2237
|
+
const R = g.fieldname.split("."), A = { ...i.value };
|
|
2238
|
+
R.length === 1 ? A[R[0]] = g.value : As(A, R, g.value), i.value = A;
|
|
2239
2239
|
} catch {
|
|
2240
2240
|
}
|
|
2241
2241
|
};
|
|
2242
|
-
(t.doctype || e?.router) && (
|
|
2242
|
+
(t.doctype || e?.router) && (De("hstPathProvider", Ot), De("hstChangeHandler", ot));
|
|
2243
2243
|
const m = (g, O) => {
|
|
2244
2244
|
if (!n.value)
|
|
2245
2245
|
throw new Error("Stonecrop instance not available");
|
|
2246
2246
|
return n.value.initializeNestedData(g, O);
|
|
2247
|
-
},
|
|
2247
|
+
}, E = async (g, O, b, R) => {
|
|
2248
2248
|
if (!n.value)
|
|
2249
2249
|
throw new Error("Stonecrop instance not available");
|
|
2250
|
-
return n.value.fetchNestedData(g, O,
|
|
2251
|
-
},
|
|
2250
|
+
return n.value.fetchNestedData(g, O, b, R);
|
|
2251
|
+
}, I = (g, O) => {
|
|
2252
2252
|
if (!n.value)
|
|
2253
2253
|
throw new Error("Stonecrop instance not available");
|
|
2254
2254
|
return n.value.collectRecordPayload(g, O);
|
|
2255
|
-
},
|
|
2256
|
-
provideHSTPath: (
|
|
2257
|
-
handleHSTChange: (
|
|
2258
|
-
const
|
|
2255
|
+
}, d = (g, O) => ({
|
|
2256
|
+
provideHSTPath: (b) => `${g}.${b}`,
|
|
2257
|
+
handleHSTChange: (b) => {
|
|
2258
|
+
const R = b.path.startsWith(g) ? b.path : `${g}.${b.fieldname}`;
|
|
2259
2259
|
ot({
|
|
2260
|
-
...
|
|
2261
|
-
path:
|
|
2260
|
+
...b,
|
|
2261
|
+
path: R
|
|
2262
2262
|
});
|
|
2263
2263
|
}
|
|
2264
2264
|
}), _ = {
|
|
2265
2265
|
operations: y,
|
|
2266
2266
|
currentIndex: D,
|
|
2267
2267
|
undoRedoState: Y,
|
|
2268
|
-
canUndo:
|
|
2268
|
+
canUndo: j,
|
|
2269
2269
|
canRedo: tt,
|
|
2270
2270
|
undoCount: ut,
|
|
2271
|
-
redoCount:
|
|
2271
|
+
redoCount: Et,
|
|
2272
2272
|
undo: _t,
|
|
2273
2273
|
redo: k,
|
|
2274
|
-
startBatch:
|
|
2275
|
-
commitBatch:
|
|
2276
|
-
cancelBatch:
|
|
2274
|
+
startBatch: xt,
|
|
2275
|
+
commitBatch: L,
|
|
2276
|
+
cancelBatch: S,
|
|
2277
2277
|
clear: w,
|
|
2278
|
-
getOperationsFor:
|
|
2278
|
+
getOperationsFor: N,
|
|
2279
2279
|
getSnapshot: J,
|
|
2280
2280
|
markIrreversible: z,
|
|
2281
2281
|
logAction: q,
|
|
@@ -2290,9 +2290,9 @@ function Rs(t) {
|
|
|
2290
2290
|
formData: i,
|
|
2291
2291
|
resolvedSchema: u,
|
|
2292
2292
|
initializeNestedData: m,
|
|
2293
|
-
fetchNestedData:
|
|
2294
|
-
collectRecordPayload:
|
|
2295
|
-
createNestedContext:
|
|
2293
|
+
fetchNestedData: E,
|
|
2294
|
+
collectRecordPayload: I,
|
|
2295
|
+
createNestedContext: d,
|
|
2296
2296
|
isLoading: c,
|
|
2297
2297
|
error: l,
|
|
2298
2298
|
resolvedDoctype: f,
|
|
@@ -2307,9 +2307,9 @@ function Rs(t) {
|
|
|
2307
2307
|
formData: i,
|
|
2308
2308
|
resolvedSchema: u,
|
|
2309
2309
|
initializeNestedData: m,
|
|
2310
|
-
fetchNestedData:
|
|
2311
|
-
collectRecordPayload:
|
|
2312
|
-
createNestedContext:
|
|
2310
|
+
fetchNestedData: E,
|
|
2311
|
+
collectRecordPayload: I,
|
|
2312
|
+
createNestedContext: d,
|
|
2313
2313
|
isLoading: c,
|
|
2314
2314
|
error: l,
|
|
2315
2315
|
resolvedDoctype: f,
|
|
@@ -2320,7 +2320,7 @@ function Rs(t) {
|
|
|
2320
2320
|
operationLog: _
|
|
2321
2321
|
};
|
|
2322
2322
|
}
|
|
2323
|
-
function
|
|
2323
|
+
function $r(t, e, r, n) {
|
|
2324
2324
|
rt(
|
|
2325
2325
|
r,
|
|
2326
2326
|
(o) => {
|
|
@@ -2336,7 +2336,7 @@ function xr(t, e, r, n) {
|
|
|
2336
2336
|
{ deep: !0 }
|
|
2337
2337
|
);
|
|
2338
2338
|
}
|
|
2339
|
-
function
|
|
2339
|
+
function As(t, e, r) {
|
|
2340
2340
|
let n = t;
|
|
2341
2341
|
for (let i = 0; i < e.length - 1; i++) {
|
|
2342
2342
|
const s = e[i];
|
|
@@ -2345,34 +2345,34 @@ function Ns(t, e, r) {
|
|
|
2345
2345
|
const o = e[e.length - 1];
|
|
2346
2346
|
n[o] = r;
|
|
2347
2347
|
}
|
|
2348
|
-
var
|
|
2348
|
+
var hr = "@@__IMMUTABLE_INDEXED__@@";
|
|
2349
2349
|
function bt(t) {
|
|
2350
2350
|
return !!(t && // @ts-expect-error: maybeIndexed is typed as `{}`, need to change in 6.0 to `maybeIndexed && typeof maybeIndexed === 'object' && IS_INDEXED_SYMBOL in maybeIndexed`
|
|
2351
|
-
t[
|
|
2351
|
+
t[hr]);
|
|
2352
2352
|
}
|
|
2353
|
-
var
|
|
2353
|
+
var pr = "@@__IMMUTABLE_KEYED__@@";
|
|
2354
2354
|
function K(t) {
|
|
2355
2355
|
return !!(t && // @ts-expect-error: maybeKeyed is typed as `{}`, need to change in 6.0 to `maybeKeyed && typeof maybeKeyed === 'object' && IS_KEYED_SYMBOL in maybeKeyed`
|
|
2356
|
-
t[
|
|
2356
|
+
t[pr]);
|
|
2357
2357
|
}
|
|
2358
2358
|
function ln(t) {
|
|
2359
2359
|
return K(t) || bt(t);
|
|
2360
2360
|
}
|
|
2361
|
-
var
|
|
2361
|
+
var $o = "@@__IMMUTABLE_ITERABLE__@@";
|
|
2362
2362
|
function dt(t) {
|
|
2363
2363
|
return !!(t && // @ts-expect-error: maybeCollection is typed as `{}`, need to change in 6.0 to `maybeCollection && typeof maybeCollection === 'object' && IS_COLLECTION_SYMBOL in maybeCollection`
|
|
2364
|
-
t[
|
|
2364
|
+
t[$o]);
|
|
2365
2365
|
}
|
|
2366
2366
|
var et = function(t) {
|
|
2367
2367
|
return dt(t) ? t : ct(t);
|
|
2368
2368
|
}, St = /* @__PURE__ */ (function(t) {
|
|
2369
2369
|
function e(r) {
|
|
2370
|
-
return K(r) ? r :
|
|
2370
|
+
return K(r) ? r : Ut(r);
|
|
2371
2371
|
}
|
|
2372
2372
|
return t && (e.__proto__ = t), e.prototype = Object.create(t && t.prototype), e.prototype.constructor = e, e;
|
|
2373
|
-
})(et),
|
|
2373
|
+
})(et), Jt = /* @__PURE__ */ (function(t) {
|
|
2374
2374
|
function e(r) {
|
|
2375
|
-
return bt(r) ? r :
|
|
2375
|
+
return bt(r) ? r : It(r);
|
|
2376
2376
|
}
|
|
2377
2377
|
return t && (e.__proto__ = t), e.prototype = Object.create(t && t.prototype), e.prototype.constructor = e, e;
|
|
2378
2378
|
})(et), de = /* @__PURE__ */ (function(t) {
|
|
@@ -2382,9 +2382,9 @@ var et = function(t) {
|
|
|
2382
2382
|
return t && (e.__proto__ = t), e.prototype = Object.create(t && t.prototype), e.prototype.constructor = e, e;
|
|
2383
2383
|
})(et);
|
|
2384
2384
|
et.Keyed = St;
|
|
2385
|
-
et.Indexed =
|
|
2385
|
+
et.Indexed = Jt;
|
|
2386
2386
|
et.Set = de;
|
|
2387
|
-
var ve = 0, vt = 1, yt = 2, Yr = typeof Symbol == "function" && Symbol.iterator,
|
|
2387
|
+
var ve = 0, vt = 1, yt = 2, Yr = typeof Symbol == "function" && Symbol.iterator, jo = "@@iterator", mr = Yr || jo, M = function(t) {
|
|
2388
2388
|
this.next = t;
|
|
2389
2389
|
};
|
|
2390
2390
|
M.prototype.toString = function() {
|
|
@@ -2396,7 +2396,7 @@ M.ENTRIES = yt;
|
|
|
2396
2396
|
M.prototype.inspect = M.prototype.toSource = function() {
|
|
2397
2397
|
return this.toString();
|
|
2398
2398
|
};
|
|
2399
|
-
M.prototype[
|
|
2399
|
+
M.prototype[mr] = function() {
|
|
2400
2400
|
return this;
|
|
2401
2401
|
};
|
|
2402
2402
|
function H(t, e, r, n) {
|
|
@@ -2411,32 +2411,32 @@ function st() {
|
|
|
2411
2411
|
return { value: void 0, done: !0 };
|
|
2412
2412
|
}
|
|
2413
2413
|
function Mo(t) {
|
|
2414
|
-
return Array.isArray(t) ? !0 : !!
|
|
2414
|
+
return Array.isArray(t) ? !0 : !!wr(t);
|
|
2415
2415
|
}
|
|
2416
2416
|
function Qn(t) {
|
|
2417
2417
|
return !!(t && // @ts-expect-error: maybeIterator is typed as `{}`
|
|
2418
2418
|
typeof t.next == "function");
|
|
2419
2419
|
}
|
|
2420
2420
|
function Xr(t) {
|
|
2421
|
-
var e =
|
|
2421
|
+
var e = wr(t);
|
|
2422
2422
|
return e && e.call(t);
|
|
2423
2423
|
}
|
|
2424
|
-
function
|
|
2424
|
+
function wr(t) {
|
|
2425
2425
|
var e = t && // @ts-expect-error: maybeIterator is typed as `{}`
|
|
2426
2426
|
(Yr && t[Yr] || // @ts-expect-error: maybeIterator is typed as `{}`
|
|
2427
|
-
t[
|
|
2427
|
+
t[jo]);
|
|
2428
2428
|
if (typeof e == "function")
|
|
2429
2429
|
return e;
|
|
2430
2430
|
}
|
|
2431
|
-
function
|
|
2432
|
-
var e =
|
|
2431
|
+
function Ns(t) {
|
|
2432
|
+
var e = wr(t);
|
|
2433
2433
|
return e && e === t.entries;
|
|
2434
2434
|
}
|
|
2435
|
-
function
|
|
2436
|
-
var e =
|
|
2435
|
+
function Cs(t) {
|
|
2436
|
+
var e = wr(t);
|
|
2437
2437
|
return e && e === t.keys;
|
|
2438
2438
|
}
|
|
2439
|
-
var
|
|
2439
|
+
var Be = "delete", U = 5, ht = 1 << U, it = ht - 1, $ = {};
|
|
2440
2440
|
function Zr() {
|
|
2441
2441
|
return { value: !1 };
|
|
2442
2442
|
}
|
|
@@ -2448,7 +2448,7 @@ function fn() {
|
|
|
2448
2448
|
function se(t) {
|
|
2449
2449
|
return t.size === void 0 && (t.size = t.__iterate(To)), t.size;
|
|
2450
2450
|
}
|
|
2451
|
-
function
|
|
2451
|
+
function qt(t, e) {
|
|
2452
2452
|
if (typeof e != "number") {
|
|
2453
2453
|
var r = e >>> 0;
|
|
2454
2454
|
if ("" + r !== e || r === 4294967295)
|
|
@@ -2460,13 +2460,13 @@ function Pt(t, e) {
|
|
|
2460
2460
|
function To() {
|
|
2461
2461
|
return !0;
|
|
2462
2462
|
}
|
|
2463
|
-
function
|
|
2463
|
+
function br(t, e, r) {
|
|
2464
2464
|
return (t === 0 && !qo(t) || r !== void 0 && t <= -r) && (e === void 0 || r !== void 0 && e >= r);
|
|
2465
2465
|
}
|
|
2466
|
-
function
|
|
2466
|
+
function We(t, e) {
|
|
2467
2467
|
return Po(t, e, 0);
|
|
2468
2468
|
}
|
|
2469
|
-
function
|
|
2469
|
+
function Sr(t, e) {
|
|
2470
2470
|
return Po(t, e, e);
|
|
2471
2471
|
}
|
|
2472
2472
|
function Po(t, e, r) {
|
|
@@ -2475,26 +2475,26 @@ function Po(t, e, r) {
|
|
|
2475
2475
|
function qo(t) {
|
|
2476
2476
|
return t < 0 || t === 0 && 1 / t === -1 / 0;
|
|
2477
2477
|
}
|
|
2478
|
-
var
|
|
2479
|
-
function
|
|
2478
|
+
var Lo = "@@__IMMUTABLE_RECORD__@@";
|
|
2479
|
+
function Gt(t) {
|
|
2480
2480
|
return !!(t && // @ts-expect-error: maybeRecord is typed as `{}`, need to change in 6.0 to `maybeRecord && typeof maybeRecord === 'object' && IS_RECORD_SYMBOL in maybeRecord`
|
|
2481
|
-
t[
|
|
2481
|
+
t[Lo]);
|
|
2482
2482
|
}
|
|
2483
|
-
function
|
|
2484
|
-
return dt(t) ||
|
|
2483
|
+
function Nt(t) {
|
|
2484
|
+
return dt(t) || Gt(t);
|
|
2485
2485
|
}
|
|
2486
|
-
var
|
|
2486
|
+
var Lt = "@@__IMMUTABLE_ORDERED__@@";
|
|
2487
2487
|
function At(t) {
|
|
2488
2488
|
return !!(t && // @ts-expect-error: maybeOrdered is typed as `{}`, need to change in 6.0 to `maybeOrdered && typeof maybeOrdered === 'object' && IS_ORDERED_SYMBOL in maybeOrdered`
|
|
2489
|
-
t[
|
|
2489
|
+
t[Lt]);
|
|
2490
2490
|
}
|
|
2491
|
-
var
|
|
2491
|
+
var Vo = "@@__IMMUTABLE_SEQ__@@";
|
|
2492
2492
|
function hn(t) {
|
|
2493
2493
|
return !!(t && // @ts-expect-error: maybeSeq is typed as `{}`, need to change in 6.0 to `maybeSeq && typeof maybeSeq === 'object' && MAYBE_SEQ_SYMBOL in maybeSeq`
|
|
2494
|
-
t[
|
|
2494
|
+
t[Vo]);
|
|
2495
2495
|
}
|
|
2496
2496
|
var ye = Object.prototype.hasOwnProperty;
|
|
2497
|
-
function
|
|
2497
|
+
function Uo(t) {
|
|
2498
2498
|
return Array.isArray(t) || typeof t == "string" ? !0 : t && typeof t == "object" && // @ts-expect-error check that `'length' in value &&`
|
|
2499
2499
|
Number.isInteger(t.length) && // @ts-expect-error check that `'length' in value &&`
|
|
2500
2500
|
t.length >= 0 && // @ts-expect-error check that `'length' in value &&`
|
|
@@ -2510,7 +2510,7 @@ function Fo(t) {
|
|
|
2510
2510
|
}
|
|
2511
2511
|
var ct = /* @__PURE__ */ (function(t) {
|
|
2512
2512
|
function e(r) {
|
|
2513
|
-
return r == null ? dn() :
|
|
2513
|
+
return r == null ? dn() : Nt(r) ? r.toSeq() : $s(r);
|
|
2514
2514
|
}
|
|
2515
2515
|
return t && (e.__proto__ = t), e.prototype = Object.create(t && t.prototype), e.prototype.constructor = e, e.prototype.toSeq = function() {
|
|
2516
2516
|
return this;
|
|
@@ -2542,16 +2542,16 @@ var ct = /* @__PURE__ */ (function(t) {
|
|
|
2542
2542
|
}
|
|
2543
2543
|
return this.__iteratorUncached(r, n);
|
|
2544
2544
|
}, e;
|
|
2545
|
-
})(et),
|
|
2545
|
+
})(et), Ut = /* @__PURE__ */ (function(t) {
|
|
2546
2546
|
function e(r) {
|
|
2547
|
-
return r == null ? dn().toKeyedSeq() : dt(r) ? K(r) ? r.toSeq() : r.fromEntrySeq() :
|
|
2547
|
+
return r == null ? dn().toKeyedSeq() : dt(r) ? K(r) ? r.toSeq() : r.fromEntrySeq() : Gt(r) ? r.toSeq() : vn(r);
|
|
2548
2548
|
}
|
|
2549
2549
|
return t && (e.__proto__ = t), e.prototype = Object.create(t && t.prototype), e.prototype.constructor = e, e.prototype.toKeyedSeq = function() {
|
|
2550
2550
|
return this;
|
|
2551
2551
|
}, e;
|
|
2552
|
-
})(ct),
|
|
2552
|
+
})(ct), It = /* @__PURE__ */ (function(t) {
|
|
2553
2553
|
function e(r) {
|
|
2554
|
-
return r == null ? dn() : dt(r) ? K(r) ? r.entrySeq() : r.toIndexedSeq() :
|
|
2554
|
+
return r == null ? dn() : dt(r) ? K(r) ? r.entrySeq() : r.toIndexedSeq() : Gt(r) ? r.toSeq().entrySeq() : Fo(r);
|
|
2555
2555
|
}
|
|
2556
2556
|
return t && (e.__proto__ = t), e.prototype = Object.create(t && t.prototype), e.prototype.constructor = e, e.of = function() {
|
|
2557
2557
|
return e(arguments);
|
|
@@ -2562,7 +2562,7 @@ var ct = /* @__PURE__ */ (function(t) {
|
|
|
2562
2562
|
}, e;
|
|
2563
2563
|
})(ct), _e = /* @__PURE__ */ (function(t) {
|
|
2564
2564
|
function e(r) {
|
|
2565
|
-
return (dt(r) && !ln(r) ? r :
|
|
2565
|
+
return (dt(r) && !ln(r) ? r : It(r)).toSetSeq();
|
|
2566
2566
|
}
|
|
2567
2567
|
return t && (e.__proto__ = t), e.prototype = Object.create(t && t.prototype), e.prototype.constructor = e, e.of = function() {
|
|
2568
2568
|
return e(arguments);
|
|
@@ -2571,16 +2571,16 @@ var ct = /* @__PURE__ */ (function(t) {
|
|
|
2571
2571
|
}, e;
|
|
2572
2572
|
})(ct);
|
|
2573
2573
|
ct.isSeq = hn;
|
|
2574
|
-
ct.Keyed =
|
|
2574
|
+
ct.Keyed = Ut;
|
|
2575
2575
|
ct.Set = _e;
|
|
2576
|
-
ct.Indexed =
|
|
2577
|
-
ct.prototype[
|
|
2576
|
+
ct.Indexed = It;
|
|
2577
|
+
ct.prototype[Vo] = !0;
|
|
2578
2578
|
var ae = /* @__PURE__ */ (function(t) {
|
|
2579
2579
|
function e(r) {
|
|
2580
2580
|
this._array = r, this.size = r.length;
|
|
2581
2581
|
}
|
|
2582
2582
|
return t && (e.__proto__ = t), e.prototype = Object.create(t && t.prototype), e.prototype.constructor = e, e.prototype.get = function(r, n) {
|
|
2583
|
-
return this.has(r) ? this._array[
|
|
2583
|
+
return this.has(r) ? this._array[qt(this, r)] : n;
|
|
2584
2584
|
}, e.prototype.__iterate = function(r, n) {
|
|
2585
2585
|
for (var o = this._array, i = o.length, s = 0; s !== i; ) {
|
|
2586
2586
|
var a = n ? i - ++s : s++;
|
|
@@ -2597,7 +2597,7 @@ var ae = /* @__PURE__ */ (function(t) {
|
|
|
2597
2597
|
return H(r, a, o[a]);
|
|
2598
2598
|
});
|
|
2599
2599
|
}, e;
|
|
2600
|
-
})(
|
|
2600
|
+
})(It), pn = /* @__PURE__ */ (function(t) {
|
|
2601
2601
|
function e(r) {
|
|
2602
2602
|
var n = Object.keys(r).concat(
|
|
2603
2603
|
Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(r) : []
|
|
@@ -2624,9 +2624,9 @@ var ae = /* @__PURE__ */ (function(t) {
|
|
|
2624
2624
|
return H(r, u, o[u]);
|
|
2625
2625
|
});
|
|
2626
2626
|
}, e;
|
|
2627
|
-
})(
|
|
2628
|
-
pn.prototype[
|
|
2629
|
-
var
|
|
2627
|
+
})(Ut);
|
|
2628
|
+
pn.prototype[Lt] = !0;
|
|
2629
|
+
var xs = /* @__PURE__ */ (function(t) {
|
|
2630
2630
|
function e(r) {
|
|
2631
2631
|
this._collection = r, this.size = r.length || r.size;
|
|
2632
2632
|
}
|
|
@@ -2650,7 +2650,7 @@ var js = /* @__PURE__ */ (function(t) {
|
|
|
2650
2650
|
return a.done ? a : H(r, s++, a.value);
|
|
2651
2651
|
});
|
|
2652
2652
|
}, e;
|
|
2653
|
-
})(
|
|
2653
|
+
})(It), Yn;
|
|
2654
2654
|
function dn() {
|
|
2655
2655
|
return Yn || (Yn = new ae([]));
|
|
2656
2656
|
}
|
|
@@ -2664,7 +2664,7 @@ function vn(t) {
|
|
|
2664
2664
|
"Expected Array or collection object of [k, v] entries, or keyed object: " + t
|
|
2665
2665
|
);
|
|
2666
2666
|
}
|
|
2667
|
-
function
|
|
2667
|
+
function Fo(t) {
|
|
2668
2668
|
var e = yn(t);
|
|
2669
2669
|
if (e)
|
|
2670
2670
|
return e;
|
|
@@ -2675,7 +2675,7 @@ function Uo(t) {
|
|
|
2675
2675
|
function $s(t) {
|
|
2676
2676
|
var e = yn(t);
|
|
2677
2677
|
if (e)
|
|
2678
|
-
return
|
|
2678
|
+
return Ns(t) ? e.fromEntrySeq() : Cs(t) ? e.toSetSeq() : e;
|
|
2679
2679
|
if (typeof t == "object")
|
|
2680
2680
|
return new pn(t);
|
|
2681
2681
|
throw new TypeError(
|
|
@@ -2683,12 +2683,12 @@ function $s(t) {
|
|
|
2683
2683
|
);
|
|
2684
2684
|
}
|
|
2685
2685
|
function yn(t) {
|
|
2686
|
-
return
|
|
2686
|
+
return Uo(t) ? new ae(t) : Mo(t) ? new xs(t) : void 0;
|
|
2687
2687
|
}
|
|
2688
|
-
function
|
|
2688
|
+
function Ke() {
|
|
2689
2689
|
return this.__ensureOwner();
|
|
2690
2690
|
}
|
|
2691
|
-
function
|
|
2691
|
+
function He() {
|
|
2692
2692
|
return this.__ownerID ? this : this.__ensureOwner(new fn());
|
|
2693
2693
|
}
|
|
2694
2694
|
var Se = typeof Math.imul == "function" && Math.imul(4294967295, 2) === -2 ? Math.imul : function(t, e) {
|
|
@@ -2696,30 +2696,30 @@ var Se = typeof Math.imul == "function" && Math.imul(4294967295, 2) === -2 ? Mat
|
|
|
2696
2696
|
var r = t & 65535, n = e & 65535;
|
|
2697
2697
|
return r * n + ((t >>> 16) * n + r * (e >>> 16) << 16 >>> 0) | 0;
|
|
2698
2698
|
};
|
|
2699
|
-
function
|
|
2699
|
+
function Er(t) {
|
|
2700
2700
|
return t >>> 1 & 1073741824 | t & 3221225471;
|
|
2701
2701
|
}
|
|
2702
|
-
var
|
|
2702
|
+
var js = Object.prototype.valueOf;
|
|
2703
2703
|
function lt(t) {
|
|
2704
2704
|
if (t == null)
|
|
2705
2705
|
return Xn(t);
|
|
2706
2706
|
if (typeof t.hashCode == "function")
|
|
2707
|
-
return
|
|
2708
|
-
var e =
|
|
2707
|
+
return Er(t.hashCode(t));
|
|
2708
|
+
var e = Vs(t);
|
|
2709
2709
|
if (e == null)
|
|
2710
2710
|
return Xn(e);
|
|
2711
2711
|
switch (typeof e) {
|
|
2712
2712
|
case "boolean":
|
|
2713
2713
|
return e ? 1108378657 : 1108378656;
|
|
2714
2714
|
case "number":
|
|
2715
|
-
return
|
|
2715
|
+
return Ms(e);
|
|
2716
2716
|
case "string":
|
|
2717
|
-
return e.length > Us ?
|
|
2717
|
+
return e.length > Us ? Ts(e) : tn(e);
|
|
2718
2718
|
case "object":
|
|
2719
2719
|
case "function":
|
|
2720
|
-
return Vs(e);
|
|
2721
|
-
case "symbol":
|
|
2722
2720
|
return qs(e);
|
|
2721
|
+
case "symbol":
|
|
2722
|
+
return Ps(e);
|
|
2723
2723
|
default:
|
|
2724
2724
|
if (typeof e.toString == "function")
|
|
2725
2725
|
return tn(e.toString());
|
|
@@ -2732,28 +2732,28 @@ function Xn(t) {
|
|
|
2732
2732
|
1108378659
|
|
2733
2733
|
);
|
|
2734
2734
|
}
|
|
2735
|
-
function
|
|
2735
|
+
function Ms(t) {
|
|
2736
2736
|
if (t !== t || t === 1 / 0)
|
|
2737
2737
|
return 0;
|
|
2738
2738
|
var e = t | 0;
|
|
2739
2739
|
for (e !== t && (e ^= t * 4294967295); t > 4294967295; )
|
|
2740
2740
|
t /= 4294967295, e ^= t;
|
|
2741
|
-
return
|
|
2741
|
+
return Er(e);
|
|
2742
2742
|
}
|
|
2743
|
-
function
|
|
2744
|
-
var e =
|
|
2745
|
-
return e === void 0 && (e = tn(t),
|
|
2743
|
+
function Ts(t) {
|
|
2744
|
+
var e = Tr[t];
|
|
2745
|
+
return e === void 0 && (e = tn(t), Mr === Fs && (Mr = 0, Tr = {}), Mr++, Tr[t] = e), e;
|
|
2746
2746
|
}
|
|
2747
2747
|
function tn(t) {
|
|
2748
2748
|
for (var e = 0, r = 0; r < t.length; r++)
|
|
2749
2749
|
e = 31 * e + t.charCodeAt(r) | 0;
|
|
2750
|
-
return
|
|
2750
|
+
return Er(e);
|
|
2751
2751
|
}
|
|
2752
|
-
function
|
|
2752
|
+
function Ps(t) {
|
|
2753
2753
|
var e = eo[t];
|
|
2754
2754
|
return e !== void 0 || (e = Bo(), eo[t] = e), e;
|
|
2755
2755
|
}
|
|
2756
|
-
function
|
|
2756
|
+
function qs(t) {
|
|
2757
2757
|
var e;
|
|
2758
2758
|
if (en && (e = rn.get(t), e !== void 0) || (e = t[Ft], e !== void 0) || !to && (e = t.propertyIsEnumerable && t.propertyIsEnumerable[Ft], e !== void 0 || (e = Ls(t), e !== void 0)))
|
|
2759
2759
|
return e;
|
|
@@ -2800,8 +2800,8 @@ function Ls(t) {
|
|
|
2800
2800
|
return t.documentElement && t.documentElement.uniqueID;
|
|
2801
2801
|
}
|
|
2802
2802
|
}
|
|
2803
|
-
function
|
|
2804
|
-
return t.valueOf !==
|
|
2803
|
+
function Vs(t) {
|
|
2804
|
+
return t.valueOf !== js && typeof t.valueOf == "function" ? (
|
|
2805
2805
|
// @ts-expect-error weird the "obj" parameter as `valueOf` should not have a parameter
|
|
2806
2806
|
t.valueOf(t)
|
|
2807
2807
|
) : t;
|
|
@@ -2814,7 +2814,7 @@ var en = typeof WeakMap == "function", rn;
|
|
|
2814
2814
|
en && (rn = /* @__PURE__ */ new WeakMap());
|
|
2815
2815
|
var eo = /* @__PURE__ */ Object.create(null), jr = 0, Ft = "__immutablehash__";
|
|
2816
2816
|
typeof Symbol == "function" && (Ft = Symbol(Ft));
|
|
2817
|
-
var Us = 16,
|
|
2817
|
+
var Us = 16, Fs = 255, Mr = 0, Tr = {}, Ir = /* @__PURE__ */ (function(t) {
|
|
2818
2818
|
function e(r, n) {
|
|
2819
2819
|
this._iter = r, this._useKeys = n, this.size = r.size;
|
|
2820
2820
|
}
|
|
@@ -2842,8 +2842,8 @@ var Us = 16, Bs = 255, $r = 0, Mr = {}, Ir = /* @__PURE__ */ (function(t) {
|
|
|
2842
2842
|
}, e.prototype.__iterator = function(r, n) {
|
|
2843
2843
|
return this._iter.__iterator(r, n);
|
|
2844
2844
|
}, e;
|
|
2845
|
-
})(
|
|
2846
|
-
Ir.prototype[
|
|
2845
|
+
})(Ut);
|
|
2846
|
+
Ir.prototype[Lt] = !0;
|
|
2847
2847
|
var Wo = /* @__PURE__ */ (function(t) {
|
|
2848
2848
|
function e(r) {
|
|
2849
2849
|
this._iter = r, this.size = r.size;
|
|
@@ -2870,7 +2870,7 @@ var Wo = /* @__PURE__ */ (function(t) {
|
|
|
2870
2870
|
);
|
|
2871
2871
|
});
|
|
2872
2872
|
}, e;
|
|
2873
|
-
})(
|
|
2873
|
+
})(It), Ko = /* @__PURE__ */ (function(t) {
|
|
2874
2874
|
function e(r) {
|
|
2875
2875
|
this._iter = r, this.size = r.size;
|
|
2876
2876
|
}
|
|
@@ -2928,10 +2928,10 @@ var Wo = /* @__PURE__ */ (function(t) {
|
|
|
2928
2928
|
}
|
|
2929
2929
|
});
|
|
2930
2930
|
}, e;
|
|
2931
|
-
})(
|
|
2931
|
+
})(Ut);
|
|
2932
2932
|
Wo.prototype.cacheResult = Ir.prototype.cacheResult = Ko.prototype.cacheResult = Ho.prototype.cacheResult = wn;
|
|
2933
2933
|
function Jo(t) {
|
|
2934
|
-
var e =
|
|
2934
|
+
var e = Ct(t);
|
|
2935
2935
|
return e._iter = t, e.size = t.size, e.flip = function() {
|
|
2936
2936
|
return t;
|
|
2937
2937
|
}, e.reverse = function() {
|
|
@@ -2967,12 +2967,12 @@ function Jo(t) {
|
|
|
2967
2967
|
}, e;
|
|
2968
2968
|
}
|
|
2969
2969
|
function Go(t, e, r) {
|
|
2970
|
-
var n =
|
|
2970
|
+
var n = Ct(t);
|
|
2971
2971
|
return n.size = t.size, n.has = function(o) {
|
|
2972
2972
|
return t.has(o);
|
|
2973
2973
|
}, n.get = function(o, i) {
|
|
2974
|
-
var s = t.get(o,
|
|
2975
|
-
return s ===
|
|
2974
|
+
var s = t.get(o, $);
|
|
2975
|
+
return s === $ ? i : e.call(r, s, o, t);
|
|
2976
2976
|
}, n.__iterateUncached = function(o, i) {
|
|
2977
2977
|
var s = this;
|
|
2978
2978
|
return t.__iterate(
|
|
@@ -2998,7 +2998,7 @@ function Go(t, e, r) {
|
|
|
2998
2998
|
}, n;
|
|
2999
2999
|
}
|
|
3000
3000
|
function _n(t, e) {
|
|
3001
|
-
var r = this, n =
|
|
3001
|
+
var r = this, n = Ct(t);
|
|
3002
3002
|
return n._iter = t, n.size = t.size, n.reverse = function() {
|
|
3003
3003
|
return t;
|
|
3004
3004
|
}, t.flip && (n.flip = function() {
|
|
@@ -3039,13 +3039,13 @@ function _n(t, e) {
|
|
|
3039
3039
|
}, n;
|
|
3040
3040
|
}
|
|
3041
3041
|
function Qo(t, e, r, n) {
|
|
3042
|
-
var o =
|
|
3042
|
+
var o = Ct(t);
|
|
3043
3043
|
return n && (o.has = function(i) {
|
|
3044
|
-
var s = t.get(i,
|
|
3045
|
-
return s !==
|
|
3044
|
+
var s = t.get(i, $);
|
|
3045
|
+
return s !== $ && !!e.call(r, s, i, t);
|
|
3046
3046
|
}, o.get = function(i, s) {
|
|
3047
|
-
var a = t.get(i,
|
|
3048
|
-
return a !==
|
|
3047
|
+
var a = t.get(i, $);
|
|
3048
|
+
return a !== $ && e.call(r, a, i, t) ? a : s;
|
|
3049
3049
|
}), o.__iterateUncached = function(i, s) {
|
|
3050
3050
|
var a = this, u = 0;
|
|
3051
3051
|
return t.__iterate(function(c, l, f) {
|
|
@@ -3066,7 +3066,7 @@ function Qo(t, e, r, n) {
|
|
|
3066
3066
|
});
|
|
3067
3067
|
}, o;
|
|
3068
3068
|
}
|
|
3069
|
-
function
|
|
3069
|
+
function Bs(t, e, r) {
|
|
3070
3070
|
var n = ge().asMutable();
|
|
3071
3071
|
return t.__iterate(function(o, i) {
|
|
3072
3072
|
n.update(e.call(r, o, i, t), 0, function(s) {
|
|
@@ -3074,8 +3074,8 @@ function Ws(t, e, r) {
|
|
|
3074
3074
|
});
|
|
3075
3075
|
}), n.asImmutable();
|
|
3076
3076
|
}
|
|
3077
|
-
function
|
|
3078
|
-
var n = K(t), o = (At(t) ?
|
|
3077
|
+
function Ws(t, e, r) {
|
|
3078
|
+
var n = K(t), o = (At(t) ? Mt() : ge()).asMutable();
|
|
3079
3079
|
t.__iterate(function(s, a) {
|
|
3080
3080
|
o.update(
|
|
3081
3081
|
e.call(r, s, a, t),
|
|
@@ -3086,10 +3086,10 @@ function Ks(t, e, r) {
|
|
|
3086
3086
|
});
|
|
3087
3087
|
var i = mn(t);
|
|
3088
3088
|
return o.map(function(s) {
|
|
3089
|
-
return
|
|
3089
|
+
return V(t, i(s));
|
|
3090
3090
|
}).asImmutable();
|
|
3091
3091
|
}
|
|
3092
|
-
function
|
|
3092
|
+
function Ks(t, e, r) {
|
|
3093
3093
|
var n = K(t), o = [[], []];
|
|
3094
3094
|
t.__iterate(function(s, a) {
|
|
3095
3095
|
o[e.call(r, s, a, t) ? 1 : 0].push(
|
|
@@ -3098,49 +3098,49 @@ function Hs(t, e, r) {
|
|
|
3098
3098
|
});
|
|
3099
3099
|
var i = mn(t);
|
|
3100
3100
|
return o.map(function(s) {
|
|
3101
|
-
return
|
|
3101
|
+
return V(t, i(s));
|
|
3102
3102
|
});
|
|
3103
3103
|
}
|
|
3104
3104
|
function gn(t, e, r, n) {
|
|
3105
3105
|
var o = t.size;
|
|
3106
|
-
if (
|
|
3106
|
+
if (br(e, r, o))
|
|
3107
3107
|
return t;
|
|
3108
3108
|
if (typeof o > "u" && (e < 0 || r < 0))
|
|
3109
3109
|
return gn(t.toSeq().cacheResult(), e, r, n);
|
|
3110
|
-
var i =
|
|
3110
|
+
var i = We(e, o), s = Sr(r, o), a = s - i, u;
|
|
3111
3111
|
a === a && (u = a < 0 ? 0 : a);
|
|
3112
|
-
var c =
|
|
3112
|
+
var c = Ct(t);
|
|
3113
3113
|
return c.size = u === 0 ? u : t.size && u || void 0, !n && hn(t) && u >= 0 && (c.get = function(l, f) {
|
|
3114
|
-
return l =
|
|
3114
|
+
return l = qt(this, l), l >= 0 && l < u ? t.get(l + i, f) : f;
|
|
3115
3115
|
}), c.__iterateUncached = function(l, f) {
|
|
3116
3116
|
var h = this;
|
|
3117
3117
|
if (u === 0)
|
|
3118
3118
|
return 0;
|
|
3119
3119
|
if (f)
|
|
3120
3120
|
return this.cacheResult().__iterate(l, f);
|
|
3121
|
-
var p = 0,
|
|
3122
|
-
return t.__iterate(function(D,
|
|
3123
|
-
if (!(
|
|
3124
|
-
return y++, l(D, n ?
|
|
3121
|
+
var p = 0, v = !0, y = 0;
|
|
3122
|
+
return t.__iterate(function(D, j) {
|
|
3123
|
+
if (!(v && (v = p++ < i)))
|
|
3124
|
+
return y++, l(D, n ? j : y - 1, h) !== !1 && y !== u;
|
|
3125
3125
|
}), y;
|
|
3126
3126
|
}, c.__iteratorUncached = function(l, f) {
|
|
3127
3127
|
if (u !== 0 && f)
|
|
3128
3128
|
return this.cacheResult().__iterator(l, f);
|
|
3129
3129
|
if (u === 0)
|
|
3130
3130
|
return new M(st);
|
|
3131
|
-
var h = t.__iterator(l, f), p = 0,
|
|
3131
|
+
var h = t.__iterator(l, f), p = 0, v = 0;
|
|
3132
3132
|
return new M(function() {
|
|
3133
3133
|
for (; p++ < i; )
|
|
3134
3134
|
h.next();
|
|
3135
|
-
if (++
|
|
3135
|
+
if (++v > u)
|
|
3136
3136
|
return st();
|
|
3137
3137
|
var y = h.next();
|
|
3138
|
-
return n || l === vt || y.done ? y : l === ve ? H(l,
|
|
3138
|
+
return n || l === vt || y.done ? y : l === ve ? H(l, v - 1, void 0, y) : H(l, v - 1, y.value[1], y);
|
|
3139
3139
|
});
|
|
3140
3140
|
}, c;
|
|
3141
3141
|
}
|
|
3142
|
-
function
|
|
3143
|
-
var n =
|
|
3142
|
+
function Hs(t, e, r) {
|
|
3143
|
+
var n = Ct(t);
|
|
3144
3144
|
return n.__iterateUncached = function(o, i) {
|
|
3145
3145
|
var s = this;
|
|
3146
3146
|
if (i)
|
|
@@ -3168,7 +3168,7 @@ function Js(t, e, r) {
|
|
|
3168
3168
|
}, n;
|
|
3169
3169
|
}
|
|
3170
3170
|
function Yo(t, e, r, n) {
|
|
3171
|
-
var o =
|
|
3171
|
+
var o = Ct(t);
|
|
3172
3172
|
return o.__iterateUncached = function(i, s) {
|
|
3173
3173
|
var a = this;
|
|
3174
3174
|
if (s)
|
|
@@ -3188,14 +3188,14 @@ function Yo(t, e, r, n) {
|
|
|
3188
3188
|
do {
|
|
3189
3189
|
if (f = u.next(), f.done)
|
|
3190
3190
|
return n || i === vt ? f : i === ve ? H(i, l++, void 0, f) : H(i, l++, f.value[1], f);
|
|
3191
|
-
var
|
|
3192
|
-
h =
|
|
3191
|
+
var v = f.value;
|
|
3192
|
+
h = v[0], p = v[1], c && (c = e.call(r, p, h, a));
|
|
3193
3193
|
} while (c);
|
|
3194
3194
|
return i === yt ? f : H(i, h, p, f);
|
|
3195
3195
|
});
|
|
3196
3196
|
}, o;
|
|
3197
3197
|
}
|
|
3198
|
-
var
|
|
3198
|
+
var Js = /* @__PURE__ */ (function(t) {
|
|
3199
3199
|
function e(r) {
|
|
3200
3200
|
this._wrappedIterables = r.flatMap(function(n) {
|
|
3201
3201
|
return n._wrappedIterables ? n._wrappedIterables : [n];
|
|
@@ -3205,7 +3205,7 @@ var Gs = /* @__PURE__ */ (function(t) {
|
|
|
3205
3205
|
if (i !== void 0)
|
|
3206
3206
|
return n + i;
|
|
3207
3207
|
}
|
|
3208
|
-
}, 0), this[
|
|
3208
|
+
}, 0), this[pr] = this._wrappedIterables[0][pr], this[hr] = this._wrappedIterables[0][hr], this[Lt] = this._wrappedIterables[0][Lt];
|
|
3209
3209
|
}
|
|
3210
3210
|
return t && (e.__proto__ = t), e.prototype = Object.create(t && t.prototype), e.prototype.constructor = e, e.prototype.__iterateUncached = function(r, n) {
|
|
3211
3211
|
if (this._wrappedIterables.length !== 0) {
|
|
@@ -3251,9 +3251,9 @@ var Gs = /* @__PURE__ */ (function(t) {
|
|
|
3251
3251
|
});
|
|
3252
3252
|
}, e;
|
|
3253
3253
|
})(ct);
|
|
3254
|
-
function
|
|
3254
|
+
function Gs(t, e) {
|
|
3255
3255
|
var r = K(t), n = [t].concat(e).map(function(i) {
|
|
3256
|
-
return dt(i) ? r && (i = St(i)) : i = r ? vn(i) :
|
|
3256
|
+
return dt(i) ? r && (i = St(i)) : i = r ? vn(i) : Fo(Array.isArray(i) ? i : [i]), i;
|
|
3257
3257
|
}).filter(function(i) {
|
|
3258
3258
|
return i.size !== 0;
|
|
3259
3259
|
});
|
|
@@ -3264,10 +3264,10 @@ function Qs(t, e) {
|
|
|
3264
3264
|
if (o === t || r && K(o) || bt(t) && bt(o))
|
|
3265
3265
|
return o;
|
|
3266
3266
|
}
|
|
3267
|
-
return new
|
|
3267
|
+
return new Js(n);
|
|
3268
3268
|
}
|
|
3269
3269
|
function Xo(t, e, r) {
|
|
3270
|
-
var n =
|
|
3270
|
+
var n = Ct(t);
|
|
3271
3271
|
return n.__iterateUncached = function(o, i) {
|
|
3272
3272
|
if (i)
|
|
3273
3273
|
return this.cacheResult().__iterate(o, i);
|
|
@@ -3299,14 +3299,14 @@ function Xo(t, e, r) {
|
|
|
3299
3299
|
});
|
|
3300
3300
|
}, n;
|
|
3301
3301
|
}
|
|
3302
|
-
function
|
|
3302
|
+
function Qs(t, e, r) {
|
|
3303
3303
|
var n = mn(t);
|
|
3304
3304
|
return t.toSeq().map(function(o, i) {
|
|
3305
3305
|
return n(e.call(r, o, i, t));
|
|
3306
3306
|
}).flatten(!0);
|
|
3307
3307
|
}
|
|
3308
|
-
function
|
|
3309
|
-
var r =
|
|
3308
|
+
function Ys(t, e) {
|
|
3309
|
+
var r = Ct(t);
|
|
3310
3310
|
return r.size = t.size && t.size * 2 - 1, r.__iterateUncached = function(n, o) {
|
|
3311
3311
|
var i = this, s = 0;
|
|
3312
3312
|
return t.__iterate(
|
|
@@ -3335,9 +3335,9 @@ function ue(t, e, r) {
|
|
|
3335
3335
|
} : function(s, a) {
|
|
3336
3336
|
i[a] = s[1];
|
|
3337
3337
|
}
|
|
3338
|
-
), n ?
|
|
3338
|
+
), n ? Ut(i) : bt(t) ? It(i) : _e(i);
|
|
3339
3339
|
}
|
|
3340
|
-
function
|
|
3340
|
+
function tr(t, e, r) {
|
|
3341
3341
|
if (e || (e = Zo), r) {
|
|
3342
3342
|
var n = t.toSeq().map(function(o, i) {
|
|
3343
3343
|
return [o, r(o, i, t)];
|
|
@@ -3354,8 +3354,8 @@ function ro(t, e, r) {
|
|
|
3354
3354
|
var n = t(r, e);
|
|
3355
3355
|
return n === 0 && r !== e && (r == null || r !== r) || n > 0;
|
|
3356
3356
|
}
|
|
3357
|
-
function
|
|
3358
|
-
var o =
|
|
3357
|
+
function er(t, e, r, n) {
|
|
3358
|
+
var o = Ct(t), i = new ae(r).map(function(s) {
|
|
3359
3359
|
return s.size;
|
|
3360
3360
|
});
|
|
3361
3361
|
return o.size = n ? i.max() : i.min(), o.__iterate = function(s, a) {
|
|
@@ -3389,7 +3389,7 @@ function Ze(t, e, r, n) {
|
|
|
3389
3389
|
});
|
|
3390
3390
|
}, o;
|
|
3391
3391
|
}
|
|
3392
|
-
function
|
|
3392
|
+
function V(t, e) {
|
|
3393
3393
|
return t === e ? t : hn(t) ? e : t.constructor(e);
|
|
3394
3394
|
}
|
|
3395
3395
|
function no(t) {
|
|
@@ -3397,11 +3397,11 @@ function no(t) {
|
|
|
3397
3397
|
throw new TypeError("Expected [K, V] tuple: " + t);
|
|
3398
3398
|
}
|
|
3399
3399
|
function mn(t) {
|
|
3400
|
-
return K(t) ? St : bt(t) ?
|
|
3400
|
+
return K(t) ? St : bt(t) ? Jt : de;
|
|
3401
3401
|
}
|
|
3402
|
-
function
|
|
3402
|
+
function Ct(t) {
|
|
3403
3403
|
return Object.create(
|
|
3404
|
-
(K(t) ?
|
|
3404
|
+
(K(t) ? Ut : bt(t) ? It : _e).prototype
|
|
3405
3405
|
);
|
|
3406
3406
|
}
|
|
3407
3407
|
function wn() {
|
|
@@ -3452,14 +3452,14 @@ function ni(t, e, r) {
|
|
|
3452
3452
|
var i = St(e[o]);
|
|
3453
3453
|
i.size !== 0 && n.push(i);
|
|
3454
3454
|
}
|
|
3455
|
-
return n.length === 0 ? t : t.toSeq().size === 0 && !t.__ownerID && n.length === 1 ?
|
|
3455
|
+
return n.length === 0 ? t : t.toSeq().size === 0 && !t.__ownerID && n.length === 1 ? Gt(t) ? t : t.constructor(n[0]) : t.withMutations(function(s) {
|
|
3456
3456
|
for (var a = r ? function(c, l) {
|
|
3457
3457
|
ti(
|
|
3458
3458
|
s,
|
|
3459
3459
|
l,
|
|
3460
|
-
|
|
3460
|
+
$,
|
|
3461
3461
|
function(f) {
|
|
3462
|
-
return f ===
|
|
3462
|
+
return f === $ ? c : r(f, c, l);
|
|
3463
3463
|
}
|
|
3464
3464
|
);
|
|
3465
3465
|
} : function(c, l) {
|
|
@@ -3468,9 +3468,9 @@ function ni(t, e, r) {
|
|
|
3468
3468
|
n[u].forEach(a);
|
|
3469
3469
|
});
|
|
3470
3470
|
}
|
|
3471
|
-
var
|
|
3472
|
-
function
|
|
3473
|
-
if (!t || typeof t != "object" ||
|
|
3471
|
+
var Xs = Object.prototype.toString;
|
|
3472
|
+
function Zs(t) {
|
|
3473
|
+
if (!t || typeof t != "object" || Xs.call(t) !== "[object Object]")
|
|
3474
3474
|
return !1;
|
|
3475
3475
|
var e = Object.getPrototypeOf(t);
|
|
3476
3476
|
if (e === null)
|
|
@@ -3480,48 +3480,48 @@ function ta(t) {
|
|
|
3480
3480
|
return r === e;
|
|
3481
3481
|
}
|
|
3482
3482
|
function Vt(t) {
|
|
3483
|
-
return typeof t == "object" && (
|
|
3483
|
+
return typeof t == "object" && (Nt(t) || Array.isArray(t) || Zs(t));
|
|
3484
3484
|
}
|
|
3485
|
-
function
|
|
3485
|
+
function Dt(t, e) {
|
|
3486
3486
|
e = e || 0;
|
|
3487
3487
|
for (var r = Math.max(0, t.length - e), n = new Array(r), o = 0; o < r; o++)
|
|
3488
3488
|
n[o] = t[o + e];
|
|
3489
3489
|
return n;
|
|
3490
3490
|
}
|
|
3491
|
-
function
|
|
3491
|
+
function dr(t) {
|
|
3492
3492
|
if (Array.isArray(t))
|
|
3493
|
-
return
|
|
3493
|
+
return Dt(t);
|
|
3494
3494
|
var e = {};
|
|
3495
3495
|
for (var r in t)
|
|
3496
3496
|
ye.call(t, r) && (e[r] = t[r]);
|
|
3497
3497
|
return e;
|
|
3498
3498
|
}
|
|
3499
3499
|
function bn(t, e, r) {
|
|
3500
|
-
return Sn(t, e,
|
|
3500
|
+
return Sn(t, e, ta(r));
|
|
3501
3501
|
}
|
|
3502
3502
|
function Sn(t, e, r) {
|
|
3503
3503
|
if (!Vt(t))
|
|
3504
3504
|
throw new TypeError(
|
|
3505
3505
|
"Cannot merge into non-data-structure value: " + t
|
|
3506
3506
|
);
|
|
3507
|
-
if (
|
|
3507
|
+
if (Nt(t))
|
|
3508
3508
|
return typeof r == "function" && t.mergeWith ? t.mergeWith.apply(t, [r].concat(e)) : t.merge ? t.merge.apply(t, e) : t.concat.apply(t, e);
|
|
3509
|
-
for (var n = Array.isArray(t), o = t, i = n ?
|
|
3510
|
-
o === t && (o =
|
|
3509
|
+
for (var n = Array.isArray(t), o = t, i = n ? Jt : St, s = n ? function(u) {
|
|
3510
|
+
o === t && (o = dr(o)), o.push(u);
|
|
3511
3511
|
} : function(u, c) {
|
|
3512
3512
|
var l = ye.call(o, c), f = l && r ? r(o[c], u, c) : u;
|
|
3513
|
-
(!l || f !== o[c]) && (o === t && (o =
|
|
3513
|
+
(!l || f !== o[c]) && (o === t && (o = dr(o)), o[c] = f);
|
|
3514
3514
|
}, a = 0; a < e.length; a++)
|
|
3515
3515
|
i(e[a]).forEach(s);
|
|
3516
3516
|
return o;
|
|
3517
3517
|
}
|
|
3518
|
-
function
|
|
3518
|
+
function ta(t) {
|
|
3519
3519
|
function e(r, n, o) {
|
|
3520
|
-
return Vt(r) && Vt(n) &&
|
|
3520
|
+
return Vt(r) && Vt(n) && ea(r, n) ? Sn(r, [n], e) : t ? t(r, n, o) : n;
|
|
3521
3521
|
}
|
|
3522
3522
|
return e;
|
|
3523
3523
|
}
|
|
3524
|
-
function
|
|
3524
|
+
function ea(t, e) {
|
|
3525
3525
|
var r = ct(t), n = ct(e);
|
|
3526
3526
|
return bt(r) === bt(n) && K(r) === K(n);
|
|
3527
3527
|
}
|
|
@@ -3533,7 +3533,7 @@ function ii(t) {
|
|
|
3533
3533
|
for (var e = [], r = arguments.length - 1; r-- > 0; ) e[r] = arguments[r + 1];
|
|
3534
3534
|
return bn(this, e, t);
|
|
3535
3535
|
}
|
|
3536
|
-
function
|
|
3536
|
+
function En(t) {
|
|
3537
3537
|
for (var e = [], r = arguments.length - 1; r-- > 0; ) e[r] = arguments[r + 1];
|
|
3538
3538
|
return me(
|
|
3539
3539
|
this,
|
|
@@ -3544,19 +3544,19 @@ function In(t) {
|
|
|
3544
3544
|
}
|
|
3545
3545
|
);
|
|
3546
3546
|
}
|
|
3547
|
-
function
|
|
3547
|
+
function In(t) {
|
|
3548
3548
|
for (var e = [], r = arguments.length - 1; r-- > 0; ) e[r] = arguments[r + 1];
|
|
3549
3549
|
return me(this, t, zt(), function(n) {
|
|
3550
3550
|
return Sn(n, e);
|
|
3551
3551
|
});
|
|
3552
3552
|
}
|
|
3553
|
-
function
|
|
3554
|
-
return me(t, e,
|
|
3553
|
+
function ra(t, e, r) {
|
|
3554
|
+
return me(t, e, $, function() {
|
|
3555
3555
|
return r;
|
|
3556
3556
|
});
|
|
3557
3557
|
}
|
|
3558
3558
|
function On(t, e) {
|
|
3559
|
-
return
|
|
3559
|
+
return ra(this, t, e);
|
|
3560
3560
|
}
|
|
3561
3561
|
function kn(t, e, r) {
|
|
3562
3562
|
return arguments.length === 1 ? t(this) : ti(this, t, e, r);
|
|
@@ -3564,28 +3564,28 @@ function kn(t, e, r) {
|
|
|
3564
3564
|
function Dn(t, e, r) {
|
|
3565
3565
|
return me(this, t, e, r);
|
|
3566
3566
|
}
|
|
3567
|
-
function
|
|
3567
|
+
function Rn() {
|
|
3568
3568
|
return this.__altered;
|
|
3569
3569
|
}
|
|
3570
|
-
function
|
|
3570
|
+
function Je(t) {
|
|
3571
3571
|
var e = this.asMutable();
|
|
3572
3572
|
return t(e), e.wasAltered() ? e.__ensureOwner(this.__ownerID) : this;
|
|
3573
3573
|
}
|
|
3574
3574
|
var si = "@@__IMMUTABLE_MAP__@@";
|
|
3575
|
-
function
|
|
3575
|
+
function zn(t) {
|
|
3576
3576
|
return !!(t && // @ts-expect-error: maybeMap is typed as `{}`, need to change in 6.0 to `maybeMap && typeof maybeMap === 'object' && IS_MAP_SYMBOL in maybeMap`
|
|
3577
3577
|
t[si]);
|
|
3578
3578
|
}
|
|
3579
|
-
function
|
|
3579
|
+
function Ne(t, e) {
|
|
3580
3580
|
if (!t)
|
|
3581
3581
|
throw new Error(e);
|
|
3582
3582
|
}
|
|
3583
3583
|
function ft(t) {
|
|
3584
|
-
|
|
3584
|
+
Ne(t !== 1 / 0, "Cannot perform this action with an infinite size.");
|
|
3585
3585
|
}
|
|
3586
3586
|
var ge = /* @__PURE__ */ (function(t) {
|
|
3587
3587
|
function e(r) {
|
|
3588
|
-
return r == null ? zt() :
|
|
3588
|
+
return r == null ? zt() : zn(r) && !At(r) ? r : zt().withMutations(function(n) {
|
|
3589
3589
|
var o = t(r);
|
|
3590
3590
|
ft(o.size), o.forEach(function(i, s) {
|
|
3591
3591
|
return n.set(s, i);
|
|
@@ -3599,7 +3599,7 @@ var ge = /* @__PURE__ */ (function(t) {
|
|
|
3599
3599
|
}, e.prototype.set = function(r, n) {
|
|
3600
3600
|
return ao(this, r, n);
|
|
3601
3601
|
}, e.prototype.remove = function(r) {
|
|
3602
|
-
return ao(this, r,
|
|
3602
|
+
return ao(this, r, $);
|
|
3603
3603
|
}, e.prototype.deleteAll = function(r) {
|
|
3604
3604
|
var n = et(r);
|
|
3605
3605
|
return n.size === 0 ? this : this.withMutations(function(o) {
|
|
@@ -3610,9 +3610,9 @@ var ge = /* @__PURE__ */ (function(t) {
|
|
|
3610
3610
|
}, e.prototype.clear = function() {
|
|
3611
3611
|
return this.size === 0 ? this : this.__ownerID ? (this.size = 0, this._root = null, this.__hash = void 0, this.__altered = !0, this) : zt();
|
|
3612
3612
|
}, e.prototype.sort = function(r) {
|
|
3613
|
-
return
|
|
3613
|
+
return Mt(ue(this, r));
|
|
3614
3614
|
}, e.prototype.sortBy = function(r, n) {
|
|
3615
|
-
return
|
|
3615
|
+
return Mt(ue(this, n, r));
|
|
3616
3616
|
}, e.prototype.map = function(r, n) {
|
|
3617
3617
|
var o = this;
|
|
3618
3618
|
return this.withMutations(function(i) {
|
|
@@ -3621,20 +3621,20 @@ var ge = /* @__PURE__ */ (function(t) {
|
|
|
3621
3621
|
});
|
|
3622
3622
|
});
|
|
3623
3623
|
}, e.prototype.__iterator = function(r, n) {
|
|
3624
|
-
return new
|
|
3624
|
+
return new na(this, r, n);
|
|
3625
3625
|
}, e.prototype.__iterate = function(r, n) {
|
|
3626
3626
|
var o = this, i = 0;
|
|
3627
3627
|
return this._root && this._root.iterate(function(s) {
|
|
3628
3628
|
return i++, r(s[1], s[0], o);
|
|
3629
3629
|
}, n), i;
|
|
3630
3630
|
}, e.prototype.__ensureOwner = function(r) {
|
|
3631
|
-
return r === this.__ownerID ? this : r ?
|
|
3631
|
+
return r === this.__ownerID ? this : r ? An(this.size, this._root, r, this.__hash) : this.size === 0 ? zt() : (this.__ownerID = r, this.__altered = !1, this);
|
|
3632
3632
|
}, e;
|
|
3633
3633
|
})(St);
|
|
3634
|
-
ge.isMap =
|
|
3634
|
+
ge.isMap = zn;
|
|
3635
3635
|
var W = ge.prototype;
|
|
3636
3636
|
W[si] = !0;
|
|
3637
|
-
W[
|
|
3637
|
+
W[Be] = W.remove;
|
|
3638
3638
|
W.removeAll = W.deleteAll;
|
|
3639
3639
|
W.setIn = On;
|
|
3640
3640
|
W.removeIn = W.deleteIn = xn;
|
|
@@ -3644,38 +3644,38 @@ W.merge = W.concat = ei;
|
|
|
3644
3644
|
W.mergeWith = ri;
|
|
3645
3645
|
W.mergeDeep = oi;
|
|
3646
3646
|
W.mergeDeepWith = ii;
|
|
3647
|
-
W.mergeIn =
|
|
3648
|
-
W.mergeDeepIn =
|
|
3649
|
-
W.withMutations =
|
|
3650
|
-
W.wasAltered =
|
|
3651
|
-
W.asImmutable =
|
|
3652
|
-
W["@@transducer/init"] = W.asMutable =
|
|
3647
|
+
W.mergeIn = In;
|
|
3648
|
+
W.mergeDeepIn = En;
|
|
3649
|
+
W.withMutations = Je;
|
|
3650
|
+
W.wasAltered = Rn;
|
|
3651
|
+
W.asImmutable = Ke;
|
|
3652
|
+
W["@@transducer/init"] = W.asMutable = He;
|
|
3653
3653
|
W["@@transducer/step"] = function(t, e) {
|
|
3654
3654
|
return t.set(e[0], e[1]);
|
|
3655
3655
|
};
|
|
3656
3656
|
W["@@transducer/result"] = function(t) {
|
|
3657
3657
|
return t.asImmutable();
|
|
3658
3658
|
};
|
|
3659
|
-
var
|
|
3659
|
+
var Me = function(t, e) {
|
|
3660
3660
|
this.ownerID = t, this.entries = e;
|
|
3661
3661
|
};
|
|
3662
|
-
|
|
3662
|
+
Me.prototype.get = function(t, e, r, n) {
|
|
3663
3663
|
for (var o = this.entries, i = 0, s = o.length; i < s; i++)
|
|
3664
3664
|
if (pt(r, o[i][0]))
|
|
3665
3665
|
return o[i][1];
|
|
3666
3666
|
return n;
|
|
3667
3667
|
};
|
|
3668
|
-
|
|
3669
|
-
for (var a = o ===
|
|
3668
|
+
Me.prototype.update = function(t, e, r, n, o, i, s) {
|
|
3669
|
+
for (var a = o === $, u = this.entries, c = 0, l = u.length; c < l && !pt(n, u[c][0]); c++)
|
|
3670
3670
|
;
|
|
3671
3671
|
var f = c < l;
|
|
3672
3672
|
if (f ? u[c][1] === o : a)
|
|
3673
3673
|
return this;
|
|
3674
3674
|
if (mt(s), (a || !f) && mt(i), !(a && u.length === 1)) {
|
|
3675
|
-
if (!f && !a && u.length >=
|
|
3676
|
-
return
|
|
3677
|
-
var h = t && t === this.ownerID, p = h ? u :
|
|
3678
|
-
return f ? a ? c === l - 1 ? p.pop() : p[c] = p.pop() : p[c] = [n, o] : p.push([n, o]), h ? (this.entries = p, this) : new
|
|
3675
|
+
if (!f && !a && u.length >= ca)
|
|
3676
|
+
return oa(t, u, n, o);
|
|
3677
|
+
var h = t && t === this.ownerID, p = h ? u : Dt(u);
|
|
3678
|
+
return f ? a ? c === l - 1 ? p.pop() : p[c] = p.pop() : p[c] = [n, o] : p.push([n, o]), h ? (this.entries = p, this) : new Me(t, p);
|
|
3679
3679
|
}
|
|
3680
3680
|
};
|
|
3681
3681
|
var ce = function(t, e, r) {
|
|
@@ -3685,7 +3685,7 @@ ce.prototype.get = function(t, e, r, n) {
|
|
|
3685
3685
|
e === void 0 && (e = lt(r));
|
|
3686
3686
|
var o = 1 << ((t === 0 ? e : e >>> t) & it), i = this.bitmap;
|
|
3687
3687
|
return (i & o) === 0 ? n : this.nodes[ai(i & o - 1)].get(
|
|
3688
|
-
t +
|
|
3688
|
+
t + U,
|
|
3689
3689
|
e,
|
|
3690
3690
|
r,
|
|
3691
3691
|
n
|
|
@@ -3694,46 +3694,46 @@ ce.prototype.get = function(t, e, r, n) {
|
|
|
3694
3694
|
ce.prototype.update = function(t, e, r, n, o, i, s) {
|
|
3695
3695
|
r === void 0 && (r = lt(n));
|
|
3696
3696
|
var a = (e === 0 ? r : r >>> e) & it, u = 1 << a, c = this.bitmap, l = (c & u) !== 0;
|
|
3697
|
-
if (!l && o ===
|
|
3697
|
+
if (!l && o === $)
|
|
3698
3698
|
return this;
|
|
3699
|
-
var f = ai(c & u - 1), h = this.nodes, p = l ? h[f] : void 0,
|
|
3699
|
+
var f = ai(c & u - 1), h = this.nodes, p = l ? h[f] : void 0, v = Nn(
|
|
3700
3700
|
p,
|
|
3701
3701
|
t,
|
|
3702
|
-
e +
|
|
3702
|
+
e + U,
|
|
3703
3703
|
r,
|
|
3704
3704
|
n,
|
|
3705
3705
|
o,
|
|
3706
3706
|
i,
|
|
3707
3707
|
s
|
|
3708
3708
|
);
|
|
3709
|
-
if (
|
|
3709
|
+
if (v === p)
|
|
3710
3710
|
return this;
|
|
3711
|
-
if (!l &&
|
|
3712
|
-
return
|
|
3713
|
-
if (l && !
|
|
3711
|
+
if (!l && v && h.length >= la)
|
|
3712
|
+
return sa(t, h, c, a, v);
|
|
3713
|
+
if (l && !v && h.length === 2 && uo(h[f ^ 1]))
|
|
3714
3714
|
return h[f ^ 1];
|
|
3715
|
-
if (l &&
|
|
3716
|
-
return
|
|
3717
|
-
var y = t && t === this.ownerID, D = l ?
|
|
3718
|
-
return y ? (this.bitmap = D, this.nodes =
|
|
3715
|
+
if (l && v && h.length === 1 && uo(v))
|
|
3716
|
+
return v;
|
|
3717
|
+
var y = t && t === this.ownerID, D = l ? v ? c : c ^ u : c | u, j = l ? v ? ui(h, f, v, y) : ua(h, f, y) : aa(h, f, v, y);
|
|
3718
|
+
return y ? (this.bitmap = D, this.nodes = j, this) : new ce(t, D, j);
|
|
3719
3719
|
};
|
|
3720
|
-
var
|
|
3720
|
+
var Te = function(t, e, r) {
|
|
3721
3721
|
this.ownerID = t, this.count = e, this.nodes = r;
|
|
3722
3722
|
};
|
|
3723
|
-
|
|
3723
|
+
Te.prototype.get = function(t, e, r, n) {
|
|
3724
3724
|
e === void 0 && (e = lt(r));
|
|
3725
3725
|
var o = (t === 0 ? e : e >>> t) & it, i = this.nodes[o];
|
|
3726
|
-
return i ? i.get(t +
|
|
3726
|
+
return i ? i.get(t + U, e, r, n) : n;
|
|
3727
3727
|
};
|
|
3728
|
-
|
|
3728
|
+
Te.prototype.update = function(t, e, r, n, o, i, s) {
|
|
3729
3729
|
r === void 0 && (r = lt(n));
|
|
3730
|
-
var a = (e === 0 ? r : r >>> e) & it, u = o ===
|
|
3730
|
+
var a = (e === 0 ? r : r >>> e) & it, u = o === $, c = this.nodes, l = c[a];
|
|
3731
3731
|
if (u && !l)
|
|
3732
3732
|
return this;
|
|
3733
3733
|
var f = Nn(
|
|
3734
3734
|
l,
|
|
3735
3735
|
t,
|
|
3736
|
-
e +
|
|
3736
|
+
e + U,
|
|
3737
3737
|
r,
|
|
3738
3738
|
n,
|
|
3739
3739
|
o,
|
|
@@ -3745,10 +3745,10 @@ $e.prototype.update = function(t, e, r, n, o, i, s) {
|
|
|
3745
3745
|
var h = this.count;
|
|
3746
3746
|
if (!l)
|
|
3747
3747
|
h++;
|
|
3748
|
-
else if (!f && (h--, h <
|
|
3749
|
-
return
|
|
3750
|
-
var p = t && t === this.ownerID,
|
|
3751
|
-
return p ? (this.count = h, this.nodes =
|
|
3748
|
+
else if (!f && (h--, h < fa))
|
|
3749
|
+
return ia(t, c, h, a);
|
|
3750
|
+
var p = t && t === this.ownerID, v = ui(c, a, f, p);
|
|
3751
|
+
return p ? (this.count = h, this.nodes = v, this) : new Te(t, h, v);
|
|
3752
3752
|
};
|
|
3753
3753
|
var le = function(t, e, r) {
|
|
3754
3754
|
this.ownerID = t, this.keyHash = e, this.entries = r;
|
|
@@ -3761,7 +3761,7 @@ le.prototype.get = function(t, e, r, n) {
|
|
|
3761
3761
|
};
|
|
3762
3762
|
le.prototype.update = function(t, e, r, n, o, i, s) {
|
|
3763
3763
|
r === void 0 && (r = lt(n));
|
|
3764
|
-
var a = o ===
|
|
3764
|
+
var a = o === $;
|
|
3765
3765
|
if (r !== this.keyHash)
|
|
3766
3766
|
return a ? this : (mt(s), mt(i), Cn(this, t, e, r, [n, o]));
|
|
3767
3767
|
for (var u = this.entries, c = 0, l = u.length; c < l && !pt(n, u[c][0]); c++)
|
|
@@ -3771,7 +3771,7 @@ le.prototype.update = function(t, e, r, n, o, i, s) {
|
|
|
3771
3771
|
return this;
|
|
3772
3772
|
if (mt(s), (a || !f) && mt(i), a && l === 2)
|
|
3773
3773
|
return new jt(t, this.keyHash, u[c ^ 1]);
|
|
3774
|
-
var h = t && t === this.ownerID, p = h ? u :
|
|
3774
|
+
var h = t && t === this.ownerID, p = h ? u : Dt(u);
|
|
3775
3775
|
return f ? a ? c === l - 1 ? p.pop() : p[c] = p.pop() : p[c] = [n, o] : p.push([n, o]), h ? (this.entries = p, this) : new le(t, this.keyHash, p);
|
|
3776
3776
|
};
|
|
3777
3777
|
var jt = function(t, e, r) {
|
|
@@ -3781,7 +3781,7 @@ jt.prototype.get = function(t, e, r, n) {
|
|
|
3781
3781
|
return pt(r, this.entry[0]) ? this.entry[1] : n;
|
|
3782
3782
|
};
|
|
3783
3783
|
jt.prototype.update = function(t, e, r, n, o, i, s) {
|
|
3784
|
-
var a = o ===
|
|
3784
|
+
var a = o === $, u = pt(n, this.entry[0]);
|
|
3785
3785
|
if (u ? o === this.entry[1] : a)
|
|
3786
3786
|
return this;
|
|
3787
3787
|
if (mt(s), a) {
|
|
@@ -3790,12 +3790,12 @@ jt.prototype.update = function(t, e, r, n, o, i, s) {
|
|
|
3790
3790
|
}
|
|
3791
3791
|
return u ? t && t === this.ownerID ? (this.entry[1] = o, this) : new jt(t, this.keyHash, [n, o]) : (mt(i), Cn(this, t, e, lt(n), [n, o]));
|
|
3792
3792
|
};
|
|
3793
|
-
|
|
3793
|
+
Me.prototype.iterate = le.prototype.iterate = function(t, e) {
|
|
3794
3794
|
for (var r = this.entries, n = 0, o = r.length - 1; n <= o; n++)
|
|
3795
3795
|
if (t(r[e ? o - n : n]) === !1)
|
|
3796
3796
|
return !1;
|
|
3797
3797
|
};
|
|
3798
|
-
ce.prototype.iterate =
|
|
3798
|
+
ce.prototype.iterate = Te.prototype.iterate = function(t, e) {
|
|
3799
3799
|
for (var r = this.nodes, n = 0, o = r.length - 1; n <= o; n++) {
|
|
3800
3800
|
var i = r[e ? o - n : n];
|
|
3801
3801
|
if (i && i.iterate(t, e) === !1)
|
|
@@ -3805,7 +3805,7 @@ ce.prototype.iterate = $e.prototype.iterate = function(t, e) {
|
|
|
3805
3805
|
jt.prototype.iterate = function(t, e) {
|
|
3806
3806
|
return t(this.entry);
|
|
3807
3807
|
};
|
|
3808
|
-
var
|
|
3808
|
+
var na = /* @__PURE__ */ (function(t) {
|
|
3809
3809
|
function e(r, n, o) {
|
|
3810
3810
|
this._type = n, this._reverse = o, this._stack = r._root && io(r._root);
|
|
3811
3811
|
}
|
|
@@ -3814,10 +3814,10 @@ var oa = /* @__PURE__ */ (function(t) {
|
|
|
3814
3814
|
var o = n.node, i = n.index++, s = void 0;
|
|
3815
3815
|
if (o.entry) {
|
|
3816
3816
|
if (i === 0)
|
|
3817
|
-
return
|
|
3817
|
+
return Pr(r, o.entry);
|
|
3818
3818
|
} else if (o.entries) {
|
|
3819
3819
|
if (s = o.entries.length - 1, i <= s)
|
|
3820
|
-
return
|
|
3820
|
+
return Pr(
|
|
3821
3821
|
r,
|
|
3822
3822
|
o.entries[this._reverse ? s - i : i]
|
|
3823
3823
|
);
|
|
@@ -3825,7 +3825,7 @@ var oa = /* @__PURE__ */ (function(t) {
|
|
|
3825
3825
|
var a = o.nodes[this._reverse ? s - i : i];
|
|
3826
3826
|
if (a) {
|
|
3827
3827
|
if (a.entry)
|
|
3828
|
-
return
|
|
3828
|
+
return Pr(r, a.entry);
|
|
3829
3829
|
n = this._stack = io(a, n);
|
|
3830
3830
|
}
|
|
3831
3831
|
continue;
|
|
@@ -3835,7 +3835,7 @@ var oa = /* @__PURE__ */ (function(t) {
|
|
|
3835
3835
|
return st();
|
|
3836
3836
|
}, e;
|
|
3837
3837
|
})(M);
|
|
3838
|
-
function
|
|
3838
|
+
function Pr(t, e) {
|
|
3839
3839
|
return H(t, e[0], e[1]);
|
|
3840
3840
|
}
|
|
3841
3841
|
function io(t, e) {
|
|
@@ -3845,13 +3845,13 @@ function io(t, e) {
|
|
|
3845
3845
|
__prev: e
|
|
3846
3846
|
};
|
|
3847
3847
|
}
|
|
3848
|
-
function
|
|
3848
|
+
function An(t, e, r, n) {
|
|
3849
3849
|
var o = Object.create(W);
|
|
3850
3850
|
return o.size = t, o._root = e, o.__ownerID = r, o.__hash = n, o.__altered = !1, o;
|
|
3851
3851
|
}
|
|
3852
3852
|
var so;
|
|
3853
3853
|
function zt() {
|
|
3854
|
-
return so || (so =
|
|
3854
|
+
return so || (so = An(0));
|
|
3855
3855
|
}
|
|
3856
3856
|
function ao(t, e, r) {
|
|
3857
3857
|
var n, o;
|
|
@@ -3868,13 +3868,13 @@ function ao(t, e, r) {
|
|
|
3868
3868
|
s
|
|
3869
3869
|
), !s.value)
|
|
3870
3870
|
return t;
|
|
3871
|
-
o = t.size + (i.value ? r ===
|
|
3871
|
+
o = t.size + (i.value ? r === $ ? -1 : 1 : 0);
|
|
3872
3872
|
} else {
|
|
3873
|
-
if (r ===
|
|
3873
|
+
if (r === $)
|
|
3874
3874
|
return t;
|
|
3875
|
-
o = 1, n = new
|
|
3875
|
+
o = 1, n = new Me(t.__ownerID, [[e, r]]);
|
|
3876
3876
|
}
|
|
3877
|
-
return t.__ownerID ? (t.size = o, t._root = n, t.__hash = void 0, t.__altered = !0, t) : n ?
|
|
3877
|
+
return t.__ownerID ? (t.size = o, t._root = n, t.__hash = void 0, t.__altered = !0, t) : n ? An(o, n) : zt();
|
|
3878
3878
|
}
|
|
3879
3879
|
function Nn(t, e, r, n, o, i, s, a) {
|
|
3880
3880
|
return t ? t.update(
|
|
@@ -3885,7 +3885,7 @@ function Nn(t, e, r, n, o, i, s, a) {
|
|
|
3885
3885
|
i,
|
|
3886
3886
|
s,
|
|
3887
3887
|
a
|
|
3888
|
-
) : i ===
|
|
3888
|
+
) : i === $ ? t : (mt(a), mt(s), new jt(e, n, [o, i]));
|
|
3889
3889
|
}
|
|
3890
3890
|
function uo(t) {
|
|
3891
3891
|
return t.constructor === jt || t.constructor === le;
|
|
@@ -3893,10 +3893,10 @@ function uo(t) {
|
|
|
3893
3893
|
function Cn(t, e, r, n, o) {
|
|
3894
3894
|
if (t.keyHash === n)
|
|
3895
3895
|
return new le(e, n, [t.entry, o]);
|
|
3896
|
-
var i = (r === 0 ? t.keyHash : t.keyHash >>> r) & it, s = (r === 0 ? n : n >>> r) & it, a, u = i === s ? [Cn(t, e, r +
|
|
3896
|
+
var i = (r === 0 ? t.keyHash : t.keyHash >>> r) & it, s = (r === 0 ? n : n >>> r) & it, a, u = i === s ? [Cn(t, e, r + U, n, o)] : (a = new jt(e, n, o), i < s ? [t, a] : [a, t]);
|
|
3897
3897
|
return new ce(e, 1 << i | 1 << s, u);
|
|
3898
3898
|
}
|
|
3899
|
-
function
|
|
3899
|
+
function oa(t, e, r, n) {
|
|
3900
3900
|
t || (t = new fn());
|
|
3901
3901
|
for (var o = new jt(t, lt(r), [r, n]), i = 0; i < e.length; i++) {
|
|
3902
3902
|
var s = e[i];
|
|
@@ -3904,26 +3904,26 @@ function ia(t, e, r, n) {
|
|
|
3904
3904
|
}
|
|
3905
3905
|
return o;
|
|
3906
3906
|
}
|
|
3907
|
-
function
|
|
3907
|
+
function ia(t, e, r, n) {
|
|
3908
3908
|
for (var o = 0, i = 0, s = new Array(r), a = 0, u = 1, c = e.length; a < c; a++, u <<= 1) {
|
|
3909
3909
|
var l = e[a];
|
|
3910
3910
|
l !== void 0 && a !== n && (o |= u, s[i++] = l);
|
|
3911
3911
|
}
|
|
3912
3912
|
return new ce(t, o, s);
|
|
3913
3913
|
}
|
|
3914
|
-
function
|
|
3914
|
+
function sa(t, e, r, n, o) {
|
|
3915
3915
|
for (var i = 0, s = new Array(ht), a = 0; r !== 0; a++, r >>>= 1)
|
|
3916
3916
|
s[a] = r & 1 ? e[i++] : void 0;
|
|
3917
|
-
return s[n] = o, new
|
|
3917
|
+
return s[n] = o, new Te(t, i + 1, s);
|
|
3918
3918
|
}
|
|
3919
3919
|
function ai(t) {
|
|
3920
3920
|
return t -= t >> 1 & 1431655765, t = (t & 858993459) + (t >> 2 & 858993459), t = t + (t >> 4) & 252645135, t += t >> 8, t += t >> 16, t & 127;
|
|
3921
3921
|
}
|
|
3922
3922
|
function ui(t, e, r, n) {
|
|
3923
|
-
var o = n ? t :
|
|
3923
|
+
var o = n ? t : Dt(t);
|
|
3924
3924
|
return o[e] = r, o;
|
|
3925
3925
|
}
|
|
3926
|
-
function
|
|
3926
|
+
function aa(t, e, r, n) {
|
|
3927
3927
|
var o = t.length + 1;
|
|
3928
3928
|
if (n && e + 1 === o)
|
|
3929
3929
|
return t[e] = r, t;
|
|
@@ -3931,7 +3931,7 @@ function ua(t, e, r, n) {
|
|
|
3931
3931
|
a === e ? (i[a] = r, s = -1) : i[a] = t[a + s];
|
|
3932
3932
|
return i;
|
|
3933
3933
|
}
|
|
3934
|
-
function
|
|
3934
|
+
function ua(t, e, r) {
|
|
3935
3935
|
var n = t.length - 1;
|
|
3936
3936
|
if (r && e === n)
|
|
3937
3937
|
return t.pop(), t;
|
|
@@ -3939,23 +3939,23 @@ function ca(t, e, r) {
|
|
|
3939
3939
|
s === e && (i = 1), o[s] = t[s + i];
|
|
3940
3940
|
return o;
|
|
3941
3941
|
}
|
|
3942
|
-
var
|
|
3942
|
+
var ca = ht / 4, la = ht / 2, fa = ht / 4;
|
|
3943
3943
|
function ci(t) {
|
|
3944
|
-
if (
|
|
3944
|
+
if (Uo(t) && typeof t != "string")
|
|
3945
3945
|
return t;
|
|
3946
3946
|
if (At(t))
|
|
3947
3947
|
return t.toArray();
|
|
3948
3948
|
throw new TypeError("Invalid keyPath: expected Ordered Collection or Array: " + t);
|
|
3949
3949
|
}
|
|
3950
|
-
function
|
|
3950
|
+
function Pe(t) {
|
|
3951
3951
|
try {
|
|
3952
3952
|
return typeof t == "string" ? JSON.stringify(t) : String(t);
|
|
3953
3953
|
} catch {
|
|
3954
3954
|
return JSON.stringify(t);
|
|
3955
3955
|
}
|
|
3956
3956
|
}
|
|
3957
|
-
function
|
|
3958
|
-
return
|
|
3957
|
+
function ha(t, e) {
|
|
3958
|
+
return Nt(t) ? (
|
|
3959
3959
|
// @ts-expect-error key might be a number or symbol, which is not handled be Record key type
|
|
3960
3960
|
t.has(e)
|
|
3961
3961
|
) : (
|
|
@@ -3964,7 +3964,7 @@ function pa(t, e) {
|
|
|
3964
3964
|
);
|
|
3965
3965
|
}
|
|
3966
3966
|
function li(t, e, r) {
|
|
3967
|
-
return
|
|
3967
|
+
return Nt(t) ? t.get(e, r) : ha(t, e) ? (
|
|
3968
3968
|
// @ts-expect-error weird "get" here,
|
|
3969
3969
|
typeof t.get == "function" ? (
|
|
3970
3970
|
// @ts-expect-error weird "get" here,
|
|
@@ -3975,36 +3975,36 @@ function li(t, e, r) {
|
|
|
3975
3975
|
)
|
|
3976
3976
|
) : r;
|
|
3977
3977
|
}
|
|
3978
|
-
function
|
|
3978
|
+
function pa(t, e) {
|
|
3979
3979
|
if (!Vt(t))
|
|
3980
3980
|
throw new TypeError("Cannot update non-data-structure value: " + t);
|
|
3981
|
-
if (
|
|
3981
|
+
if (Nt(t)) {
|
|
3982
3982
|
if (!t.remove)
|
|
3983
3983
|
throw new TypeError("Cannot update immutable value without .remove() method: " + t);
|
|
3984
3984
|
return t.remove(e);
|
|
3985
3985
|
}
|
|
3986
3986
|
if (!ye.call(t, e))
|
|
3987
3987
|
return t;
|
|
3988
|
-
var r =
|
|
3988
|
+
var r = dr(t);
|
|
3989
3989
|
return Array.isArray(r) ? r.splice(e, 1) : delete r[e], r;
|
|
3990
3990
|
}
|
|
3991
|
-
function
|
|
3991
|
+
function da(t, e, r) {
|
|
3992
3992
|
if (!Vt(t))
|
|
3993
3993
|
throw new TypeError("Cannot update non-data-structure value: " + t);
|
|
3994
|
-
if (
|
|
3994
|
+
if (Nt(t)) {
|
|
3995
3995
|
if (!t.set)
|
|
3996
3996
|
throw new TypeError("Cannot update immutable value without .set() method: " + t);
|
|
3997
3997
|
return t.set(e, r);
|
|
3998
3998
|
}
|
|
3999
3999
|
if (ye.call(t, e) && r === t[e])
|
|
4000
4000
|
return t;
|
|
4001
|
-
var n =
|
|
4001
|
+
var n = dr(t);
|
|
4002
4002
|
return n[e] = r, n;
|
|
4003
4003
|
}
|
|
4004
4004
|
function me(t, e, r, n) {
|
|
4005
4005
|
n || (n = r, r = void 0);
|
|
4006
4006
|
var o = fi(
|
|
4007
|
-
|
|
4007
|
+
Nt(t),
|
|
4008
4008
|
// @ts-expect-error type issues with Record and mixed types
|
|
4009
4009
|
t,
|
|
4010
4010
|
ci(e),
|
|
@@ -4012,18 +4012,18 @@ function me(t, e, r, n) {
|
|
|
4012
4012
|
r,
|
|
4013
4013
|
n
|
|
4014
4014
|
);
|
|
4015
|
-
return o ===
|
|
4015
|
+
return o === $ ? r : o;
|
|
4016
4016
|
}
|
|
4017
4017
|
function fi(t, e, r, n, o, i) {
|
|
4018
|
-
var s = e ===
|
|
4018
|
+
var s = e === $;
|
|
4019
4019
|
if (n === r.length) {
|
|
4020
4020
|
var a = s ? o : e, u = i(a);
|
|
4021
4021
|
return u === a ? e : u;
|
|
4022
4022
|
}
|
|
4023
4023
|
if (!s && !Vt(e))
|
|
4024
|
-
throw new TypeError("Cannot update within non-data-structure value in path [" + Array.from(r).slice(0, n).map(
|
|
4025
|
-
var c = r[n], l = s ?
|
|
4026
|
-
l ===
|
|
4024
|
+
throw new TypeError("Cannot update within non-data-structure value in path [" + Array.from(r).slice(0, n).map(Pe) + "]: " + e);
|
|
4025
|
+
var c = r[n], l = s ? $ : li(e, c, $), f = fi(
|
|
4026
|
+
l === $ ? t : Nt(l),
|
|
4027
4027
|
// @ts-expect-error mixed type
|
|
4028
4028
|
l,
|
|
4029
4029
|
r,
|
|
@@ -4031,30 +4031,30 @@ function fi(t, e, r, n, o, i) {
|
|
|
4031
4031
|
o,
|
|
4032
4032
|
i
|
|
4033
4033
|
);
|
|
4034
|
-
return f === l ? e : f ===
|
|
4034
|
+
return f === l ? e : f === $ ? pa(e, c) : da(s ? t ? zt() : {} : e, c, f);
|
|
4035
4035
|
}
|
|
4036
|
-
function
|
|
4036
|
+
function va(t, e) {
|
|
4037
4037
|
return me(t, e, function() {
|
|
4038
|
-
return
|
|
4038
|
+
return $;
|
|
4039
4039
|
});
|
|
4040
4040
|
}
|
|
4041
4041
|
function xn(t) {
|
|
4042
|
-
return
|
|
4042
|
+
return va(this, t);
|
|
4043
4043
|
}
|
|
4044
4044
|
var hi = "@@__IMMUTABLE_LIST__@@";
|
|
4045
4045
|
function pi(t) {
|
|
4046
4046
|
return !!(t && // @ts-expect-error: maybeList is typed as `{}`, need to change in 6.0 to `maybeList && typeof maybeList === 'object' && IS_LIST_SYMBOL in maybeList`
|
|
4047
4047
|
t[hi]);
|
|
4048
4048
|
}
|
|
4049
|
-
var
|
|
4049
|
+
var Or = /* @__PURE__ */ (function(t) {
|
|
4050
4050
|
function e(r) {
|
|
4051
|
-
var n =
|
|
4051
|
+
var n = ir();
|
|
4052
4052
|
if (r == null)
|
|
4053
4053
|
return n;
|
|
4054
4054
|
if (pi(r))
|
|
4055
4055
|
return r;
|
|
4056
4056
|
var o = t(r), i = o.size;
|
|
4057
|
-
return i === 0 ? n : (ft(i), i > 0 && i < ht ?
|
|
4057
|
+
return i === 0 ? n : (ft(i), i > 0 && i < ht ? qe(0, i, U, null, new Pt(o.toArray())) : n.withMutations(function(s) {
|
|
4058
4058
|
s.setSize(i), o.forEach(function(a, u) {
|
|
4059
4059
|
return s.set(u, a);
|
|
4060
4060
|
});
|
|
@@ -4065,38 +4065,38 @@ var Er = /* @__PURE__ */ (function(t) {
|
|
|
4065
4065
|
}, e.prototype.toString = function() {
|
|
4066
4066
|
return this.__toString("List [", "]");
|
|
4067
4067
|
}, e.prototype.get = function(r, n) {
|
|
4068
|
-
if (r =
|
|
4068
|
+
if (r = qt(this, r), r >= 0 && r < this.size) {
|
|
4069
4069
|
r += this._origin;
|
|
4070
4070
|
var o = di(this, r);
|
|
4071
4071
|
return o && o.array[r & it];
|
|
4072
4072
|
}
|
|
4073
4073
|
return n;
|
|
4074
4074
|
}, e.prototype.set = function(r, n) {
|
|
4075
|
-
return
|
|
4075
|
+
return ya(this, r, n);
|
|
4076
4076
|
}, e.prototype.remove = function(r) {
|
|
4077
4077
|
return this.has(r) ? r === 0 ? this.shift() : r === this.size - 1 ? this.pop() : this.splice(r, 1) : this;
|
|
4078
4078
|
}, e.prototype.insert = function(r, n) {
|
|
4079
4079
|
return this.splice(r, 0, n);
|
|
4080
4080
|
}, e.prototype.clear = function() {
|
|
4081
|
-
return this.size === 0 ? this : this.__ownerID ? (this.size = this._origin = this._capacity = 0, this._level =
|
|
4081
|
+
return this.size === 0 ? this : this.__ownerID ? (this.size = this._origin = this._capacity = 0, this._level = U, this._root = this._tail = this.__hash = void 0, this.__altered = !0, this) : ir();
|
|
4082
4082
|
}, e.prototype.push = function() {
|
|
4083
4083
|
var r = arguments, n = this.size;
|
|
4084
4084
|
return this.withMutations(function(o) {
|
|
4085
|
-
|
|
4085
|
+
Tt(o, 0, n + r.length);
|
|
4086
4086
|
for (var i = 0; i < r.length; i++)
|
|
4087
4087
|
o.set(n + i, r[i]);
|
|
4088
4088
|
});
|
|
4089
4089
|
}, e.prototype.pop = function() {
|
|
4090
|
-
return
|
|
4090
|
+
return Tt(this, 0, -1);
|
|
4091
4091
|
}, e.prototype.unshift = function() {
|
|
4092
4092
|
var r = arguments;
|
|
4093
4093
|
return this.withMutations(function(n) {
|
|
4094
|
-
|
|
4094
|
+
Tt(n, -r.length);
|
|
4095
4095
|
for (var o = 0; o < r.length; o++)
|
|
4096
4096
|
n.set(o, r[o]);
|
|
4097
4097
|
});
|
|
4098
4098
|
}, e.prototype.shift = function() {
|
|
4099
|
-
return
|
|
4099
|
+
return Tt(this, 1);
|
|
4100
4100
|
}, e.prototype.shuffle = function(r) {
|
|
4101
4101
|
return r === void 0 && (r = Math.random), this.withMutations(function(n) {
|
|
4102
4102
|
for (var o = n.size, i, s; o; )
|
|
@@ -4117,7 +4117,7 @@ var Er = /* @__PURE__ */ (function(t) {
|
|
|
4117
4117
|
});
|
|
4118
4118
|
});
|
|
4119
4119
|
}, e.prototype.setSize = function(r) {
|
|
4120
|
-
return
|
|
4120
|
+
return Tt(this, 0, r);
|
|
4121
4121
|
}, e.prototype.map = function(r, n) {
|
|
4122
4122
|
var o = this;
|
|
4123
4123
|
return this.withMutations(function(i) {
|
|
@@ -4126,23 +4126,23 @@ var Er = /* @__PURE__ */ (function(t) {
|
|
|
4126
4126
|
});
|
|
4127
4127
|
}, e.prototype.slice = function(r, n) {
|
|
4128
4128
|
var o = this.size;
|
|
4129
|
-
return
|
|
4129
|
+
return br(r, n, o) ? this : Tt(
|
|
4130
4130
|
this,
|
|
4131
|
-
|
|
4132
|
-
|
|
4131
|
+
We(r, o),
|
|
4132
|
+
Sr(n, o)
|
|
4133
4133
|
);
|
|
4134
4134
|
}, e.prototype.__iterator = function(r, n) {
|
|
4135
4135
|
var o = n ? this.size : 0, i = co(this, n);
|
|
4136
4136
|
return new M(function() {
|
|
4137
4137
|
var s = i();
|
|
4138
|
-
return s ===
|
|
4138
|
+
return s === Ce ? st() : H(r, n ? --o : o++, s);
|
|
4139
4139
|
});
|
|
4140
4140
|
}, e.prototype.__iterate = function(r, n) {
|
|
4141
|
-
for (var o = n ? this.size : 0, i = co(this, n), s; (s = i()) !==
|
|
4141
|
+
for (var o = n ? this.size : 0, i = co(this, n), s; (s = i()) !== Ce && r(s, n ? --o : o++, this) !== !1; )
|
|
4142
4142
|
;
|
|
4143
4143
|
return o;
|
|
4144
4144
|
}, e.prototype.__ensureOwner = function(r) {
|
|
4145
|
-
return r === this.__ownerID ? this : r ?
|
|
4145
|
+
return r === this.__ownerID ? this : r ? qe(
|
|
4146
4146
|
this._origin,
|
|
4147
4147
|
this._capacity,
|
|
4148
4148
|
this._level,
|
|
@@ -4150,43 +4150,43 @@ var Er = /* @__PURE__ */ (function(t) {
|
|
|
4150
4150
|
this._tail,
|
|
4151
4151
|
r,
|
|
4152
4152
|
this.__hash
|
|
4153
|
-
) : this.size === 0 ?
|
|
4153
|
+
) : this.size === 0 ? ir() : (this.__ownerID = r, this.__altered = !1, this);
|
|
4154
4154
|
}, e;
|
|
4155
|
-
})(
|
|
4156
|
-
|
|
4157
|
-
var G =
|
|
4155
|
+
})(Jt);
|
|
4156
|
+
Or.isList = pi;
|
|
4157
|
+
var G = Or.prototype;
|
|
4158
4158
|
G[hi] = !0;
|
|
4159
|
-
G[
|
|
4159
|
+
G[Be] = G.remove;
|
|
4160
4160
|
G.merge = G.concat;
|
|
4161
4161
|
G.setIn = On;
|
|
4162
4162
|
G.deleteIn = G.removeIn = xn;
|
|
4163
4163
|
G.update = kn;
|
|
4164
4164
|
G.updateIn = Dn;
|
|
4165
|
-
G.mergeIn =
|
|
4166
|
-
G.mergeDeepIn =
|
|
4167
|
-
G.withMutations =
|
|
4168
|
-
G.wasAltered =
|
|
4169
|
-
G.asImmutable =
|
|
4170
|
-
G["@@transducer/init"] = G.asMutable =
|
|
4165
|
+
G.mergeIn = In;
|
|
4166
|
+
G.mergeDeepIn = En;
|
|
4167
|
+
G.withMutations = Je;
|
|
4168
|
+
G.wasAltered = Rn;
|
|
4169
|
+
G.asImmutable = Ke;
|
|
4170
|
+
G["@@transducer/init"] = G.asMutable = He;
|
|
4171
4171
|
G["@@transducer/step"] = function(t, e) {
|
|
4172
4172
|
return t.push(e);
|
|
4173
4173
|
};
|
|
4174
4174
|
G["@@transducer/result"] = function(t) {
|
|
4175
4175
|
return t.asImmutable();
|
|
4176
4176
|
};
|
|
4177
|
-
var
|
|
4177
|
+
var Pt = function(t, e) {
|
|
4178
4178
|
this.array = t, this.ownerID = e;
|
|
4179
4179
|
};
|
|
4180
|
-
|
|
4181
|
-
if ((r & (1 << e +
|
|
4180
|
+
Pt.prototype.removeBefore = function(t, e, r) {
|
|
4181
|
+
if ((r & (1 << e + U) - 1) === 0 || this.array.length === 0)
|
|
4182
4182
|
return this;
|
|
4183
4183
|
var n = r >>> e & it;
|
|
4184
4184
|
if (n >= this.array.length)
|
|
4185
|
-
return new
|
|
4185
|
+
return new Pt([], t);
|
|
4186
4186
|
var o = n === 0, i;
|
|
4187
4187
|
if (e > 0) {
|
|
4188
4188
|
var s = this.array[n];
|
|
4189
|
-
if (i = s && s.removeBefore(t, e -
|
|
4189
|
+
if (i = s && s.removeBefore(t, e - U, r), i === s && o)
|
|
4190
4190
|
return this;
|
|
4191
4191
|
}
|
|
4192
4192
|
if (o && !i)
|
|
@@ -4197,8 +4197,8 @@ Tt.prototype.removeBefore = function(t, e, r) {
|
|
|
4197
4197
|
a.array[u] = void 0;
|
|
4198
4198
|
return i && (a.array[n] = i), a;
|
|
4199
4199
|
};
|
|
4200
|
-
|
|
4201
|
-
if (r === (e ? 1 << e +
|
|
4200
|
+
Pt.prototype.removeAfter = function(t, e, r) {
|
|
4201
|
+
if (r === (e ? 1 << e + U : ht) || this.array.length === 0)
|
|
4202
4202
|
return this;
|
|
4203
4203
|
var n = r - 1 >>> e & it;
|
|
4204
4204
|
if (n >= this.array.length)
|
|
@@ -4206,15 +4206,15 @@ Tt.prototype.removeAfter = function(t, e, r) {
|
|
|
4206
4206
|
var o;
|
|
4207
4207
|
if (e > 0) {
|
|
4208
4208
|
var i = this.array[n];
|
|
4209
|
-
if (o = i && i.removeAfter(t, e -
|
|
4209
|
+
if (o = i && i.removeAfter(t, e - U, r), o === i && n === this.array.length - 1)
|
|
4210
4210
|
return this;
|
|
4211
4211
|
}
|
|
4212
4212
|
var s = fe(this, t);
|
|
4213
4213
|
return s.array.splice(n + 1), o && (s.array[n] = o), s;
|
|
4214
4214
|
};
|
|
4215
|
-
var
|
|
4215
|
+
var Ce = {};
|
|
4216
4216
|
function co(t, e) {
|
|
4217
|
-
var r = t._origin, n = t._capacity, o =
|
|
4217
|
+
var r = t._origin, n = t._capacity, o = Le(n), i = t._tail;
|
|
4218
4218
|
return s(t._root, t._level, 0);
|
|
4219
4219
|
function s(c, l, f) {
|
|
4220
4220
|
return l === 0 ? a(c, f) : u(c, l, f);
|
|
@@ -4223,57 +4223,57 @@ function co(t, e) {
|
|
|
4223
4223
|
var f = l === o ? i && i.array : c && c.array, h = l > r ? 0 : r - l, p = n - l;
|
|
4224
4224
|
return p > ht && (p = ht), function() {
|
|
4225
4225
|
if (h === p)
|
|
4226
|
-
return
|
|
4227
|
-
var
|
|
4228
|
-
return f && f[
|
|
4226
|
+
return Ce;
|
|
4227
|
+
var v = e ? --p : h++;
|
|
4228
|
+
return f && f[v];
|
|
4229
4229
|
};
|
|
4230
4230
|
}
|
|
4231
4231
|
function u(c, l, f) {
|
|
4232
|
-
var h, p = c && c.array,
|
|
4232
|
+
var h, p = c && c.array, v = f > r ? 0 : r - f >> l, y = (n - f >> l) + 1;
|
|
4233
4233
|
return y > ht && (y = ht), function() {
|
|
4234
4234
|
for (; ; ) {
|
|
4235
4235
|
if (h) {
|
|
4236
4236
|
var D = h();
|
|
4237
|
-
if (D !==
|
|
4237
|
+
if (D !== Ce)
|
|
4238
4238
|
return D;
|
|
4239
4239
|
h = null;
|
|
4240
4240
|
}
|
|
4241
|
-
if (
|
|
4242
|
-
return
|
|
4243
|
-
var
|
|
4241
|
+
if (v === y)
|
|
4242
|
+
return Ce;
|
|
4243
|
+
var j = e ? --y : v++;
|
|
4244
4244
|
h = s(
|
|
4245
|
-
p && p[
|
|
4246
|
-
l -
|
|
4247
|
-
f + (
|
|
4245
|
+
p && p[j],
|
|
4246
|
+
l - U,
|
|
4247
|
+
f + (j << l)
|
|
4248
4248
|
);
|
|
4249
4249
|
}
|
|
4250
4250
|
};
|
|
4251
4251
|
}
|
|
4252
4252
|
}
|
|
4253
|
-
function
|
|
4253
|
+
function qe(t, e, r, n, o, i, s) {
|
|
4254
4254
|
var a = Object.create(G);
|
|
4255
4255
|
return a.size = e - t, a._origin = t, a._capacity = e, a._level = r, a._root = n, a._tail = o, a.__ownerID = i, a.__hash = s, a.__altered = !1, a;
|
|
4256
4256
|
}
|
|
4257
|
-
function
|
|
4258
|
-
return
|
|
4257
|
+
function ir() {
|
|
4258
|
+
return qe(0, 0, U);
|
|
4259
4259
|
}
|
|
4260
|
-
function
|
|
4261
|
-
if (e =
|
|
4260
|
+
function ya(t, e, r) {
|
|
4261
|
+
if (e = qt(t, e), e !== e)
|
|
4262
4262
|
return t;
|
|
4263
4263
|
if (e >= t.size || e < 0)
|
|
4264
4264
|
return t.withMutations(function(s) {
|
|
4265
|
-
e < 0 ?
|
|
4265
|
+
e < 0 ? Tt(s, e).set(0, r) : Tt(s, 0, e + 1).set(e, r);
|
|
4266
4266
|
});
|
|
4267
4267
|
e += t._origin;
|
|
4268
4268
|
var n = t._tail, o = t._root, i = Zr();
|
|
4269
|
-
return e >=
|
|
4269
|
+
return e >= Le(t._capacity) ? n = nn(n, t.__ownerID, 0, e, r, i) : o = nn(
|
|
4270
4270
|
o,
|
|
4271
4271
|
t.__ownerID,
|
|
4272
4272
|
t._level,
|
|
4273
4273
|
e,
|
|
4274
4274
|
r,
|
|
4275
4275
|
i
|
|
4276
|
-
), i.value ? t.__ownerID ? (t._root = o, t._tail = n, t.__hash = void 0, t.__altered = !0, t) :
|
|
4276
|
+
), i.value ? t.__ownerID ? (t._root = o, t._tail = n, t.__hash = void 0, t.__altered = !0, t) : qe(t._origin, t._capacity, t._level, o, n) : t;
|
|
4277
4277
|
}
|
|
4278
4278
|
function nn(t, e, r, n, o, i) {
|
|
4279
4279
|
var s = n >>> r & it, a = t && s < t.array.length;
|
|
@@ -4284,7 +4284,7 @@ function nn(t, e, r, n, o, i) {
|
|
|
4284
4284
|
var c = t && t.array[s], l = nn(
|
|
4285
4285
|
c,
|
|
4286
4286
|
e,
|
|
4287
|
-
r -
|
|
4287
|
+
r - U,
|
|
4288
4288
|
n,
|
|
4289
4289
|
o,
|
|
4290
4290
|
i
|
|
@@ -4294,18 +4294,18 @@ function nn(t, e, r, n, o, i) {
|
|
|
4294
4294
|
return a && t.array[s] === o ? t : (i && mt(i), u = fe(t, e), o === void 0 && s === u.array.length - 1 ? u.array.pop() : u.array[s] = o, u);
|
|
4295
4295
|
}
|
|
4296
4296
|
function fe(t, e) {
|
|
4297
|
-
return e && t && e === t.ownerID ? t : new
|
|
4297
|
+
return e && t && e === t.ownerID ? t : new Pt(t ? t.array.slice() : [], e);
|
|
4298
4298
|
}
|
|
4299
4299
|
function di(t, e) {
|
|
4300
|
-
if (e >=
|
|
4300
|
+
if (e >= Le(t._capacity))
|
|
4301
4301
|
return t._tail;
|
|
4302
|
-
if (e < 1 << t._level +
|
|
4302
|
+
if (e < 1 << t._level + U) {
|
|
4303
4303
|
for (var r = t._root, n = t._level; r && n > 0; )
|
|
4304
|
-
r = r.array[e >>> n & it], n -=
|
|
4304
|
+
r = r.array[e >>> n & it], n -= U;
|
|
4305
4305
|
return r;
|
|
4306
4306
|
}
|
|
4307
4307
|
}
|
|
4308
|
-
function
|
|
4308
|
+
function Tt(t, e, r) {
|
|
4309
4309
|
e !== void 0 && (e |= 0), r !== void 0 && (r |= 0);
|
|
4310
4310
|
var n = t.__ownerID || new fn(), o = t._origin, i = t._capacity, s = o + e, a = r === void 0 ? i : r < 0 ? i + r : o + r;
|
|
4311
4311
|
if (s === o && a === i)
|
|
@@ -4313,33 +4313,33 @@ function Mt(t, e, r) {
|
|
|
4313
4313
|
if (s >= a)
|
|
4314
4314
|
return t.clear();
|
|
4315
4315
|
for (var u = t._level, c = t._root, l = 0; s + l < 0; )
|
|
4316
|
-
c = new
|
|
4316
|
+
c = new Pt(
|
|
4317
4317
|
c && c.array.length ? [void 0, c] : [],
|
|
4318
4318
|
n
|
|
4319
|
-
), u +=
|
|
4319
|
+
), u += U, l += 1 << u;
|
|
4320
4320
|
l && (s += l, o += l, a += l, i += l);
|
|
4321
|
-
for (var f =
|
|
4322
|
-
c = new
|
|
4321
|
+
for (var f = Le(i), h = Le(a); h >= 1 << u + U; )
|
|
4322
|
+
c = new Pt(
|
|
4323
4323
|
c && c.array.length ? [c] : [],
|
|
4324
4324
|
n
|
|
4325
|
-
), u +=
|
|
4326
|
-
var p = t._tail,
|
|
4325
|
+
), u += U;
|
|
4326
|
+
var p = t._tail, v = h < f ? di(t, a - 1) : h > f ? new Pt([], n) : p;
|
|
4327
4327
|
if (p && h > f && s < i && p.array.length) {
|
|
4328
4328
|
c = fe(c, n);
|
|
4329
|
-
for (var y = c, D = u; D >
|
|
4330
|
-
var
|
|
4331
|
-
y = y.array[
|
|
4329
|
+
for (var y = c, D = u; D > U; D -= U) {
|
|
4330
|
+
var j = f >>> D & it;
|
|
4331
|
+
y = y.array[j] = fe(y.array[j], n);
|
|
4332
4332
|
}
|
|
4333
|
-
y.array[f >>>
|
|
4333
|
+
y.array[f >>> U & it] = p;
|
|
4334
4334
|
}
|
|
4335
|
-
if (a < i && (
|
|
4336
|
-
s -= h, a -= h, u =
|
|
4335
|
+
if (a < i && (v = v && v.removeAfter(n, 0, a)), s >= h)
|
|
4336
|
+
s -= h, a -= h, u = U, c = null, v = v && v.removeBefore(n, 0, s);
|
|
4337
4337
|
else if (s > o || h < f) {
|
|
4338
4338
|
for (l = 0; c; ) {
|
|
4339
4339
|
var tt = s >>> u & it;
|
|
4340
4340
|
if (tt !== h >>> u & it)
|
|
4341
4341
|
break;
|
|
4342
|
-
tt && (l += (1 << u) * tt), u -=
|
|
4342
|
+
tt && (l += (1 << u) * tt), u -= U, c = c.array[tt];
|
|
4343
4343
|
}
|
|
4344
4344
|
c && s > o && (c = c.removeBefore(n, u, s - l)), c && h < f && (c = c.removeAfter(
|
|
4345
4345
|
n,
|
|
@@ -4347,17 +4347,17 @@ function Mt(t, e, r) {
|
|
|
4347
4347
|
h - l
|
|
4348
4348
|
)), l && (s -= l, a -= l);
|
|
4349
4349
|
}
|
|
4350
|
-
return t.__ownerID ? (t.size = a - s, t._origin = s, t._capacity = a, t._level = u, t._root = c, t._tail =
|
|
4350
|
+
return t.__ownerID ? (t.size = a - s, t._origin = s, t._capacity = a, t._level = u, t._root = c, t._tail = v, t.__hash = void 0, t.__altered = !0, t) : qe(s, a, u, c, v);
|
|
4351
4351
|
}
|
|
4352
|
-
function
|
|
4353
|
-
return t < ht ? 0 : t - 1 >>>
|
|
4352
|
+
function Le(t) {
|
|
4353
|
+
return t < ht ? 0 : t - 1 >>> U << U;
|
|
4354
4354
|
}
|
|
4355
4355
|
function vi(t) {
|
|
4356
|
-
return
|
|
4356
|
+
return zn(t) && At(t);
|
|
4357
4357
|
}
|
|
4358
|
-
var
|
|
4358
|
+
var Mt = /* @__PURE__ */ (function(t) {
|
|
4359
4359
|
function e(r) {
|
|
4360
|
-
return r == null ?
|
|
4360
|
+
return r == null ? Ie() : vi(r) ? r : Ie().withMutations(function(n) {
|
|
4361
4361
|
var o = St(r);
|
|
4362
4362
|
ft(o.size), o.forEach(function(i, s) {
|
|
4363
4363
|
return n.set(s, i);
|
|
@@ -4372,11 +4372,11 @@ var $t = /* @__PURE__ */ (function(t) {
|
|
|
4372
4372
|
var o = this._map.get(r);
|
|
4373
4373
|
return o !== void 0 ? this._list.get(o)[1] : n;
|
|
4374
4374
|
}, e.prototype.clear = function() {
|
|
4375
|
-
return this.size === 0 ? this : this.__ownerID ? (this.size = 0, this._map.clear(), this._list.clear(), this.__altered = !0, this) :
|
|
4375
|
+
return this.size === 0 ? this : this.__ownerID ? (this.size = 0, this._map.clear(), this._list.clear(), this.__altered = !0, this) : Ie();
|
|
4376
4376
|
}, e.prototype.set = function(r, n) {
|
|
4377
4377
|
return fo(this, r, n);
|
|
4378
4378
|
}, e.prototype.remove = function(r) {
|
|
4379
|
-
return fo(this, r,
|
|
4379
|
+
return fo(this, r, $);
|
|
4380
4380
|
}, e.prototype.__iterate = function(r, n) {
|
|
4381
4381
|
var o = this;
|
|
4382
4382
|
return this._list.__iterate(
|
|
@@ -4391,23 +4391,23 @@ var $t = /* @__PURE__ */ (function(t) {
|
|
|
4391
4391
|
if (r === this.__ownerID)
|
|
4392
4392
|
return this;
|
|
4393
4393
|
var n = this._map.__ensureOwner(r), o = this._list.__ensureOwner(r);
|
|
4394
|
-
return r ?
|
|
4394
|
+
return r ? $n(n, o, r, this.__hash) : this.size === 0 ? Ie() : (this.__ownerID = r, this.__altered = !1, this._map = n, this._list = o, this);
|
|
4395
4395
|
}, e;
|
|
4396
4396
|
})(ge);
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
function
|
|
4401
|
-
var o = Object.create(
|
|
4397
|
+
Mt.isOrderedMap = vi;
|
|
4398
|
+
Mt.prototype[Lt] = !0;
|
|
4399
|
+
Mt.prototype[Be] = Mt.prototype.remove;
|
|
4400
|
+
function $n(t, e, r, n) {
|
|
4401
|
+
var o = Object.create(Mt.prototype);
|
|
4402
4402
|
return o.size = t ? t.size : 0, o._map = t, o._list = e, o.__ownerID = r, o.__hash = n, o.__altered = !1, o;
|
|
4403
4403
|
}
|
|
4404
4404
|
var lo;
|
|
4405
|
-
function
|
|
4406
|
-
return lo || (lo =
|
|
4405
|
+
function Ie() {
|
|
4406
|
+
return lo || (lo = $n(zt(), ir()));
|
|
4407
4407
|
}
|
|
4408
4408
|
function fo(t, e, r) {
|
|
4409
4409
|
var n = t._map, o = t._list, i = n.get(e), s = i !== void 0, a, u;
|
|
4410
|
-
if (r ===
|
|
4410
|
+
if (r === $) {
|
|
4411
4411
|
if (!s)
|
|
4412
4412
|
return t;
|
|
4413
4413
|
o.size >= ht && o.size >= n.size * 2 ? (u = o.filter(function(c, l) {
|
|
@@ -4421,16 +4421,16 @@ function fo(t, e, r) {
|
|
|
4421
4421
|
a = n, u = o.set(i, [e, r]);
|
|
4422
4422
|
} else
|
|
4423
4423
|
a = n.set(e, o.size), u = o.set(o.size, [e, r]);
|
|
4424
|
-
return t.__ownerID ? (t.size = a.size, t._map = a, t._list = u, t.__hash = void 0, t.__altered = !0, t) :
|
|
4424
|
+
return t.__ownerID ? (t.size = a.size, t._map = a, t._list = u, t.__hash = void 0, t.__altered = !0, t) : $n(a, u);
|
|
4425
4425
|
}
|
|
4426
4426
|
var yi = "@@__IMMUTABLE_STACK__@@";
|
|
4427
4427
|
function on(t) {
|
|
4428
4428
|
return !!(t && // @ts-expect-error: maybeStack is typed as `{}`, need to change in 6.0 to `maybeStack && typeof maybeStack === 'object' && MAYBE_STACK_SYMBOL in maybeStack`
|
|
4429
4429
|
t[yi]);
|
|
4430
4430
|
}
|
|
4431
|
-
var
|
|
4431
|
+
var jn = /* @__PURE__ */ (function(t) {
|
|
4432
4432
|
function e(r) {
|
|
4433
|
-
return r == null ?
|
|
4433
|
+
return r == null ? rr() : on(r) ? r : rr().pushAll(r);
|
|
4434
4434
|
}
|
|
4435
4435
|
return t && (e.__proto__ = t), e.prototype = Object.create(t && t.prototype), e.prototype.constructor = e, e.of = function() {
|
|
4436
4436
|
return this(arguments);
|
|
@@ -4438,7 +4438,7 @@ var $n = /* @__PURE__ */ (function(t) {
|
|
|
4438
4438
|
return this.__toString("Stack [", "]");
|
|
4439
4439
|
}, e.prototype.get = function(r, n) {
|
|
4440
4440
|
var o = this._head;
|
|
4441
|
-
for (r =
|
|
4441
|
+
for (r = qt(this, r); o && r--; )
|
|
4442
4442
|
o = o.next;
|
|
4443
4443
|
return o ? o.value : n;
|
|
4444
4444
|
}, e.prototype.peek = function() {
|
|
@@ -4473,18 +4473,18 @@ var $n = /* @__PURE__ */ (function(t) {
|
|
|
4473
4473
|
}, e.prototype.pop = function() {
|
|
4474
4474
|
return this.slice(1);
|
|
4475
4475
|
}, e.prototype.clear = function() {
|
|
4476
|
-
return this.size === 0 ? this : this.__ownerID ? (this.size = 0, this._head = void 0, this.__hash = void 0, this.__altered = !0, this) :
|
|
4476
|
+
return this.size === 0 ? this : this.__ownerID ? (this.size = 0, this._head = void 0, this.__hash = void 0, this.__altered = !0, this) : rr();
|
|
4477
4477
|
}, e.prototype.slice = function(r, n) {
|
|
4478
|
-
if (
|
|
4478
|
+
if (br(r, n, this.size))
|
|
4479
4479
|
return this;
|
|
4480
|
-
var o =
|
|
4480
|
+
var o = We(r, this.size), i = Sr(n, this.size);
|
|
4481
4481
|
if (i !== this.size)
|
|
4482
4482
|
return t.prototype.slice.call(this, r, n);
|
|
4483
4483
|
for (var s = this.size - o, a = this._head; o--; )
|
|
4484
4484
|
a = a.next;
|
|
4485
4485
|
return this.__ownerID ? (this.size = s, this._head = a, this.__hash = void 0, this.__altered = !0, this) : Oe(s, a);
|
|
4486
4486
|
}, e.prototype.__ensureOwner = function(r) {
|
|
4487
|
-
return r === this.__ownerID ? this : r ? Oe(this.size, this._head, r, this.__hash) : this.size === 0 ?
|
|
4487
|
+
return r === this.__ownerID ? this : r ? Oe(this.size, this._head, r, this.__hash) : this.size === 0 ? rr() : (this.__ownerID = r, this.__altered = !1, this);
|
|
4488
4488
|
}, e.prototype.__iterate = function(r, n) {
|
|
4489
4489
|
var o = this;
|
|
4490
4490
|
if (n)
|
|
@@ -4509,17 +4509,17 @@ var $n = /* @__PURE__ */ (function(t) {
|
|
|
4509
4509
|
return st();
|
|
4510
4510
|
});
|
|
4511
4511
|
}, e;
|
|
4512
|
-
})(
|
|
4513
|
-
|
|
4514
|
-
var at =
|
|
4512
|
+
})(Jt);
|
|
4513
|
+
jn.isStack = on;
|
|
4514
|
+
var at = jn.prototype;
|
|
4515
4515
|
at[yi] = !0;
|
|
4516
4516
|
at.shift = at.pop;
|
|
4517
4517
|
at.unshift = at.push;
|
|
4518
4518
|
at.unshiftAll = at.pushAll;
|
|
4519
|
-
at.withMutations =
|
|
4520
|
-
at.wasAltered =
|
|
4521
|
-
at.asImmutable =
|
|
4522
|
-
at["@@transducer/init"] = at.asMutable =
|
|
4519
|
+
at.withMutations = Je;
|
|
4520
|
+
at.wasAltered = Rn;
|
|
4521
|
+
at.asImmutable = Ke;
|
|
4522
|
+
at["@@transducer/init"] = at.asMutable = He;
|
|
4523
4523
|
at["@@transducer/step"] = function(t, e) {
|
|
4524
4524
|
return t.unshift(e);
|
|
4525
4525
|
};
|
|
@@ -4531,7 +4531,7 @@ function Oe(t, e, r, n) {
|
|
|
4531
4531
|
return o.size = t, o._head = e, o.__ownerID = r, o.__hash = n, o.__altered = !1, o;
|
|
4532
4532
|
}
|
|
4533
4533
|
var ho;
|
|
4534
|
-
function
|
|
4534
|
+
function rr() {
|
|
4535
4535
|
return ho || (ho = Oe(0));
|
|
4536
4536
|
}
|
|
4537
4537
|
function po(t, e, r, n, o, i) {
|
|
@@ -4539,13 +4539,13 @@ function po(t, e, r, n, o, i) {
|
|
|
4539
4539
|
o ? (o = !1, r = s) : r = e.call(n, r, s, a, u);
|
|
4540
4540
|
}, i), r;
|
|
4541
4541
|
}
|
|
4542
|
-
function
|
|
4542
|
+
function _a(t, e) {
|
|
4543
4543
|
return e;
|
|
4544
4544
|
}
|
|
4545
|
-
function
|
|
4545
|
+
function ga(t, e) {
|
|
4546
4546
|
return [e, t];
|
|
4547
4547
|
}
|
|
4548
|
-
function
|
|
4548
|
+
function qr(t) {
|
|
4549
4549
|
return function() {
|
|
4550
4550
|
for (var e = [], r = arguments.length; r--; ) e[r] = arguments[r];
|
|
4551
4551
|
return !t.apply(this, e);
|
|
@@ -4597,10 +4597,10 @@ function _i(t, e) {
|
|
|
4597
4597
|
!t.has(u)
|
|
4598
4598
|
) : o ? (
|
|
4599
4599
|
// @ts-expect-error type of `get` does not "catch" the version with `notSetValue`
|
|
4600
|
-
!pt(u, t.get(c,
|
|
4600
|
+
!pt(u, t.get(c, $))
|
|
4601
4601
|
) : (
|
|
4602
4602
|
// @ts-expect-error type of `get` does not "catch" the version with `notSetValue`
|
|
4603
|
-
!pt(t.get(c,
|
|
4603
|
+
!pt(t.get(c, $), u)
|
|
4604
4604
|
))
|
|
4605
4605
|
return s = !1, !1;
|
|
4606
4606
|
})
|
|
@@ -4608,31 +4608,31 @@ function _i(t, e) {
|
|
|
4608
4608
|
return s && // @ts-expect-error size should exists on Collection
|
|
4609
4609
|
t.size === a;
|
|
4610
4610
|
}
|
|
4611
|
-
var
|
|
4611
|
+
var ma = /* @__PURE__ */ (function(t) {
|
|
4612
4612
|
function e(r, n, o) {
|
|
4613
4613
|
if (o === void 0 && (o = 1), !(this instanceof e))
|
|
4614
4614
|
return new e(r, n, o);
|
|
4615
|
-
if (
|
|
4615
|
+
if (Ne(o !== 0, "Cannot step a Range by 0"), Ne(
|
|
4616
4616
|
r !== void 0,
|
|
4617
4617
|
"You must define a start value when using Range"
|
|
4618
|
-
),
|
|
4618
|
+
), Ne(
|
|
4619
4619
|
n !== void 0,
|
|
4620
4620
|
"You must define an end value when using Range"
|
|
4621
4621
|
), o = Math.abs(o), n < r && (o = -o), this._start = r, this._end = n, this._step = o, this.size = Math.max(0, Math.ceil((n - r) / o - 1) + 1), this.size === 0) {
|
|
4622
|
-
if (
|
|
4623
|
-
return
|
|
4624
|
-
|
|
4622
|
+
if (Lr)
|
|
4623
|
+
return Lr;
|
|
4624
|
+
Lr = this;
|
|
4625
4625
|
}
|
|
4626
4626
|
}
|
|
4627
4627
|
return t && (e.__proto__ = t), e.prototype = Object.create(t && t.prototype), e.prototype.constructor = e, e.prototype.toString = function() {
|
|
4628
4628
|
return this.size === 0 ? "Range []" : "Range [ " + this._start + "..." + this._end + (this._step !== 1 ? " by " + this._step : "") + " ]";
|
|
4629
4629
|
}, e.prototype.get = function(r, n) {
|
|
4630
|
-
return this.has(r) ? this._start +
|
|
4630
|
+
return this.has(r) ? this._start + qt(this, r) * this._step : n;
|
|
4631
4631
|
}, e.prototype.includes = function(r) {
|
|
4632
4632
|
var n = (r - this._start) / this._step;
|
|
4633
4633
|
return n >= 0 && n < this.size && n === Math.floor(n);
|
|
4634
4634
|
}, e.prototype.slice = function(r, n) {
|
|
4635
|
-
return
|
|
4635
|
+
return br(r, n, this.size) ? this : (r = We(r, this.size), n = Sr(n, this.size), n <= r ? new e(0, 0) : new e(
|
|
4636
4636
|
this.get(r, this._end),
|
|
4637
4637
|
this.get(n, this._end),
|
|
4638
4638
|
this._step
|
|
@@ -4662,12 +4662,12 @@ var wa = /* @__PURE__ */ (function(t) {
|
|
|
4662
4662
|
}, e.prototype.equals = function(r) {
|
|
4663
4663
|
return r instanceof e ? this._start === r._start && this._end === r._end && this._step === r._step : _i(this, r);
|
|
4664
4664
|
}, e;
|
|
4665
|
-
})(
|
|
4665
|
+
})(It), Lr, gi = "@@__IMMUTABLE_SET__@@";
|
|
4666
4666
|
function Mn(t) {
|
|
4667
4667
|
return !!(t && // @ts-expect-error: maybeSet is typed as `{}`, need to change in 6.0 to `maybeSeq && typeof maybeSet === 'object' && MAYBE_SET_SYMBOL in maybeSet`
|
|
4668
4668
|
t[gi]);
|
|
4669
4669
|
}
|
|
4670
|
-
var
|
|
4670
|
+
var kr = /* @__PURE__ */ (function(t) {
|
|
4671
4671
|
function e(r) {
|
|
4672
4672
|
return r == null ? ke() : Mn(r) && !At(r) ? r : ke().withMutations(function(n) {
|
|
4673
4673
|
var o = t(r);
|
|
@@ -4689,13 +4689,13 @@ var Or = /* @__PURE__ */ (function(t) {
|
|
|
4689
4689
|
}, e.prototype.has = function(r) {
|
|
4690
4690
|
return this._map.has(r);
|
|
4691
4691
|
}, e.prototype.add = function(r) {
|
|
4692
|
-
return
|
|
4692
|
+
return nr(this, this._map.set(r, r));
|
|
4693
4693
|
}, e.prototype.remove = function(r) {
|
|
4694
|
-
return
|
|
4694
|
+
return nr(this, this._map.remove(r));
|
|
4695
4695
|
}, e.prototype.clear = function() {
|
|
4696
|
-
return
|
|
4696
|
+
return nr(this, this._map.clear());
|
|
4697
4697
|
}, e.prototype.map = function(r, n) {
|
|
4698
|
-
var o = this, i = !1, s =
|
|
4698
|
+
var o = this, i = !1, s = nr(
|
|
4699
4699
|
this,
|
|
4700
4700
|
this._map.mapEntries(function(a) {
|
|
4701
4701
|
var u = a[1], c = r.call(n, u, u, o);
|
|
@@ -4748,9 +4748,9 @@ var Or = /* @__PURE__ */ (function(t) {
|
|
|
4748
4748
|
});
|
|
4749
4749
|
});
|
|
4750
4750
|
}, e.prototype.sort = function(r) {
|
|
4751
|
-
return
|
|
4751
|
+
return Ve(ue(this, r));
|
|
4752
4752
|
}, e.prototype.sortBy = function(r, n) {
|
|
4753
|
-
return
|
|
4753
|
+
return Ve(ue(this, n, r));
|
|
4754
4754
|
}, e.prototype.wasAltered = function() {
|
|
4755
4755
|
return this._map.wasAltered();
|
|
4756
4756
|
}, e.prototype.__iterate = function(r, n) {
|
|
@@ -4767,14 +4767,14 @@ var Or = /* @__PURE__ */ (function(t) {
|
|
|
4767
4767
|
return r ? this.__make(n, r) : this.size === 0 ? this.__empty() : (this.__ownerID = r, this._map = n, this);
|
|
4768
4768
|
}, e;
|
|
4769
4769
|
})(de);
|
|
4770
|
-
|
|
4771
|
-
var Z =
|
|
4770
|
+
kr.isSet = Mn;
|
|
4771
|
+
var Z = kr.prototype;
|
|
4772
4772
|
Z[gi] = !0;
|
|
4773
|
-
Z[
|
|
4773
|
+
Z[Be] = Z.remove;
|
|
4774
4774
|
Z.merge = Z.concat = Z.union;
|
|
4775
|
-
Z.withMutations =
|
|
4776
|
-
Z.asImmutable =
|
|
4777
|
-
Z["@@transducer/init"] = Z.asMutable =
|
|
4775
|
+
Z.withMutations = Je;
|
|
4776
|
+
Z.asImmutable = Ke;
|
|
4777
|
+
Z["@@transducer/init"] = Z.asMutable = He;
|
|
4778
4778
|
Z["@@transducer/step"] = function(t, e) {
|
|
4779
4779
|
return t.add(e);
|
|
4780
4780
|
};
|
|
@@ -4783,7 +4783,7 @@ Z["@@transducer/result"] = function(t) {
|
|
|
4783
4783
|
};
|
|
4784
4784
|
Z.__empty = ke;
|
|
4785
4785
|
Z.__make = mi;
|
|
4786
|
-
function
|
|
4786
|
+
function nr(t, e) {
|
|
4787
4787
|
return t.__ownerID ? (t.size = e.size, t._map = e, t) : e === t._map ? t : e.size === 0 ? t.__empty() : t.__make(e);
|
|
4788
4788
|
}
|
|
4789
4789
|
function mi(t, e) {
|
|
@@ -4796,18 +4796,18 @@ function ke() {
|
|
|
4796
4796
|
}
|
|
4797
4797
|
function wi(t, e, r) {
|
|
4798
4798
|
for (var n = ci(e), o = 0; o !== n.length; )
|
|
4799
|
-
if (t = li(t, n[o++],
|
|
4799
|
+
if (t = li(t, n[o++], $), t === $)
|
|
4800
4800
|
return r;
|
|
4801
4801
|
return t;
|
|
4802
4802
|
}
|
|
4803
4803
|
function bi(t, e) {
|
|
4804
4804
|
return wi(this, t, e);
|
|
4805
4805
|
}
|
|
4806
|
-
function
|
|
4807
|
-
return wi(t, e,
|
|
4806
|
+
function wa(t, e) {
|
|
4807
|
+
return wi(t, e, $) !== $;
|
|
4808
4808
|
}
|
|
4809
|
-
function
|
|
4810
|
-
return
|
|
4809
|
+
function ba(t) {
|
|
4810
|
+
return wa(this, t);
|
|
4811
4811
|
}
|
|
4812
4812
|
function Si() {
|
|
4813
4813
|
ft(this.size);
|
|
@@ -4816,7 +4816,7 @@ function Si() {
|
|
|
4816
4816
|
t[r] = e;
|
|
4817
4817
|
}), t;
|
|
4818
4818
|
}
|
|
4819
|
-
function
|
|
4819
|
+
function vr(t) {
|
|
4820
4820
|
if (!t || typeof t != "object")
|
|
4821
4821
|
return t;
|
|
4822
4822
|
if (!dt(t)) {
|
|
@@ -4827,15 +4827,15 @@ function dr(t) {
|
|
|
4827
4827
|
if (K(t)) {
|
|
4828
4828
|
var e = {};
|
|
4829
4829
|
return t.__iterate(function(n, o) {
|
|
4830
|
-
e[o] =
|
|
4830
|
+
e[o] = vr(n);
|
|
4831
4831
|
}), e;
|
|
4832
4832
|
}
|
|
4833
4833
|
var r = [];
|
|
4834
4834
|
return t.__iterate(function(n) {
|
|
4835
|
-
r.push(
|
|
4835
|
+
r.push(vr(n));
|
|
4836
4836
|
}), r;
|
|
4837
4837
|
}
|
|
4838
|
-
function
|
|
4838
|
+
function Sa(t) {
|
|
4839
4839
|
if (t.size === 1 / 0)
|
|
4840
4840
|
return 0;
|
|
4841
4841
|
var e = At(t), r = K(t), n = e ? 1 : 0;
|
|
@@ -4850,19 +4850,19 @@ function Ia(t) {
|
|
|
4850
4850
|
}), Ea(t.size, n);
|
|
4851
4851
|
}
|
|
4852
4852
|
function Ea(t, e) {
|
|
4853
|
-
return e = Se(e, 3432918353), e = Se(e << 15 | e >>> -15, 461845907), e = Se(e << 13 | e >>> -13, 5), e = (e + 3864292196 | 0) ^ t, e = Se(e ^ e >>> 16, 2246822507), e = Se(e ^ e >>> 13, 3266489909), e =
|
|
4853
|
+
return e = Se(e, 3432918353), e = Se(e << 15 | e >>> -15, 461845907), e = Se(e << 13 | e >>> -13, 5), e = (e + 3864292196 | 0) ^ t, e = Se(e ^ e >>> 16, 2246822507), e = Se(e ^ e >>> 13, 3266489909), e = Er(e ^ e >>> 16), e;
|
|
4854
4854
|
}
|
|
4855
4855
|
function go(t, e) {
|
|
4856
4856
|
return t ^ e + 2654435769 + (t << 6) + (t >> 2) | 0;
|
|
4857
4857
|
}
|
|
4858
|
-
function
|
|
4858
|
+
function Qt(t, e) {
|
|
4859
4859
|
var r = function(n) {
|
|
4860
4860
|
t.prototype[n] = e[n];
|
|
4861
4861
|
};
|
|
4862
4862
|
return Object.keys(e).forEach(r), Object.getOwnPropertySymbols && Object.getOwnPropertySymbols(e).forEach(r), t;
|
|
4863
4863
|
}
|
|
4864
4864
|
et.Iterator = M;
|
|
4865
|
-
|
|
4865
|
+
Qt(et, {
|
|
4866
4866
|
// ### Conversion to other types
|
|
4867
4867
|
toArray: function() {
|
|
4868
4868
|
ft(this.size);
|
|
@@ -4875,7 +4875,7 @@ Gt(et, {
|
|
|
4875
4875
|
return new Wo(this);
|
|
4876
4876
|
},
|
|
4877
4877
|
toJS: function() {
|
|
4878
|
-
return
|
|
4878
|
+
return vr(this);
|
|
4879
4879
|
},
|
|
4880
4880
|
toKeyedSeq: function() {
|
|
4881
4881
|
return new Ir(this, !0);
|
|
@@ -4885,13 +4885,13 @@ Gt(et, {
|
|
|
4885
4885
|
},
|
|
4886
4886
|
toObject: Si,
|
|
4887
4887
|
toOrderedMap: function() {
|
|
4888
|
-
return
|
|
4888
|
+
return Mt(this.toKeyedSeq());
|
|
4889
4889
|
},
|
|
4890
4890
|
toOrderedSet: function() {
|
|
4891
|
-
return
|
|
4891
|
+
return Ve(K(this) ? this.valueSeq() : this);
|
|
4892
4892
|
},
|
|
4893
4893
|
toSet: function() {
|
|
4894
|
-
return
|
|
4894
|
+
return kr(K(this) ? this.valueSeq() : this);
|
|
4895
4895
|
},
|
|
4896
4896
|
toSetSeq: function() {
|
|
4897
4897
|
return new Ko(this);
|
|
@@ -4900,10 +4900,10 @@ Gt(et, {
|
|
|
4900
4900
|
return bt(this) ? this.toIndexedSeq() : K(this) ? this.toKeyedSeq() : this.toSetSeq();
|
|
4901
4901
|
},
|
|
4902
4902
|
toStack: function() {
|
|
4903
|
-
return
|
|
4903
|
+
return jn(K(this) ? this.valueSeq() : this);
|
|
4904
4904
|
},
|
|
4905
4905
|
toList: function() {
|
|
4906
|
-
return
|
|
4906
|
+
return Or(K(this) ? this.valueSeq() : this);
|
|
4907
4907
|
},
|
|
4908
4908
|
// ### Common JavaScript methods and properties
|
|
4909
4909
|
toString: function() {
|
|
@@ -4915,7 +4915,7 @@ Gt(et, {
|
|
|
4915
4915
|
// ### ES6 Collection methods (ES6 Array and Map)
|
|
4916
4916
|
concat: function() {
|
|
4917
4917
|
for (var t = [], e = arguments.length; e--; ) t[e] = arguments[e];
|
|
4918
|
-
return
|
|
4918
|
+
return V(this, Gs(this, t));
|
|
4919
4919
|
},
|
|
4920
4920
|
includes: function(t) {
|
|
4921
4921
|
return this.some(function(e) {
|
|
@@ -4934,10 +4934,10 @@ Gt(et, {
|
|
|
4934
4934
|
}), r;
|
|
4935
4935
|
},
|
|
4936
4936
|
filter: function(t, e) {
|
|
4937
|
-
return
|
|
4937
|
+
return V(this, Qo(this, t, e, !0));
|
|
4938
4938
|
},
|
|
4939
4939
|
partition: function(t, e) {
|
|
4940
|
-
return
|
|
4940
|
+
return Ks(this, t, e);
|
|
4941
4941
|
},
|
|
4942
4942
|
find: function(t, e, r) {
|
|
4943
4943
|
var n = this.findEntry(t, e);
|
|
@@ -4957,7 +4957,7 @@ Gt(et, {
|
|
|
4957
4957
|
return this.__iterator(ve);
|
|
4958
4958
|
},
|
|
4959
4959
|
map: function(t, e) {
|
|
4960
|
-
return
|
|
4960
|
+
return V(this, Go(this, t, e));
|
|
4961
4961
|
},
|
|
4962
4962
|
reduce: function(t, e, r) {
|
|
4963
4963
|
return po(
|
|
@@ -4980,10 +4980,10 @@ Gt(et, {
|
|
|
4980
4980
|
);
|
|
4981
4981
|
},
|
|
4982
4982
|
reverse: function() {
|
|
4983
|
-
return
|
|
4983
|
+
return V(this, _n(this, !0));
|
|
4984
4984
|
},
|
|
4985
4985
|
slice: function(t, e) {
|
|
4986
|
-
return
|
|
4986
|
+
return V(this, gn(this, t, e, !0));
|
|
4987
4987
|
},
|
|
4988
4988
|
some: function(t, e) {
|
|
4989
4989
|
ft(this.size);
|
|
@@ -4994,7 +4994,7 @@ Gt(et, {
|
|
|
4994
4994
|
}), r;
|
|
4995
4995
|
},
|
|
4996
4996
|
sort: function(t) {
|
|
4997
|
-
return
|
|
4997
|
+
return V(this, ue(this, t));
|
|
4998
4998
|
},
|
|
4999
4999
|
values: function() {
|
|
5000
5000
|
return this.__iterator(vt);
|
|
@@ -5014,7 +5014,7 @@ Gt(et, {
|
|
|
5014
5014
|
);
|
|
5015
5015
|
},
|
|
5016
5016
|
countBy: function(t, e) {
|
|
5017
|
-
return
|
|
5017
|
+
return Bs(this, t, e);
|
|
5018
5018
|
},
|
|
5019
5019
|
equals: function(t) {
|
|
5020
5020
|
return _i(this, t);
|
|
@@ -5023,13 +5023,13 @@ Gt(et, {
|
|
|
5023
5023
|
var t = this;
|
|
5024
5024
|
if (t._cache)
|
|
5025
5025
|
return new ae(t._cache);
|
|
5026
|
-
var e = t.toSeq().map(
|
|
5026
|
+
var e = t.toSeq().map(ga).toIndexedSeq();
|
|
5027
5027
|
return e.fromEntrySeq = function() {
|
|
5028
5028
|
return t.toSeq();
|
|
5029
5029
|
}, e;
|
|
5030
5030
|
},
|
|
5031
5031
|
filterNot: function(t, e) {
|
|
5032
|
-
return this.filter(
|
|
5032
|
+
return this.filter(qr(t), e);
|
|
5033
5033
|
},
|
|
5034
5034
|
findEntry: function(t, e, r) {
|
|
5035
5035
|
var n = r;
|
|
@@ -5055,10 +5055,10 @@ Gt(et, {
|
|
|
5055
5055
|
return this.find(To, null, t);
|
|
5056
5056
|
},
|
|
5057
5057
|
flatMap: function(t, e) {
|
|
5058
|
-
return
|
|
5058
|
+
return V(this, Qs(this, t, e));
|
|
5059
5059
|
},
|
|
5060
5060
|
flatten: function(t) {
|
|
5061
|
-
return
|
|
5061
|
+
return V(this, Xo(this, t, !0));
|
|
5062
5062
|
},
|
|
5063
5063
|
fromEntrySeq: function() {
|
|
5064
5064
|
return new Ho(this);
|
|
@@ -5070,12 +5070,12 @@ Gt(et, {
|
|
|
5070
5070
|
},
|
|
5071
5071
|
getIn: bi,
|
|
5072
5072
|
groupBy: function(t, e) {
|
|
5073
|
-
return
|
|
5073
|
+
return Ws(this, t, e);
|
|
5074
5074
|
},
|
|
5075
5075
|
has: function(t) {
|
|
5076
|
-
return this.get(t,
|
|
5076
|
+
return this.get(t, $) !== $;
|
|
5077
5077
|
},
|
|
5078
|
-
hasIn:
|
|
5078
|
+
hasIn: ba,
|
|
5079
5079
|
isSubset: function(t) {
|
|
5080
5080
|
return t = typeof t.includes == "function" ? t : et(t), this.every(function(e) {
|
|
5081
5081
|
return t.includes(e);
|
|
@@ -5090,7 +5090,7 @@ Gt(et, {
|
|
|
5090
5090
|
});
|
|
5091
5091
|
},
|
|
5092
5092
|
keySeq: function() {
|
|
5093
|
-
return this.toSeq().map(
|
|
5093
|
+
return this.toSeq().map(_a).toIndexedSeq();
|
|
5094
5094
|
},
|
|
5095
5095
|
last: function(t) {
|
|
5096
5096
|
return this.toSeq().reverse().first(t);
|
|
@@ -5099,19 +5099,19 @@ Gt(et, {
|
|
|
5099
5099
|
return this.toKeyedSeq().reverse().keyOf(t);
|
|
5100
5100
|
},
|
|
5101
5101
|
max: function(t) {
|
|
5102
|
-
return
|
|
5102
|
+
return tr(this, t);
|
|
5103
5103
|
},
|
|
5104
5104
|
maxBy: function(t, e) {
|
|
5105
|
-
return
|
|
5105
|
+
return tr(this, e, t);
|
|
5106
5106
|
},
|
|
5107
5107
|
min: function(t) {
|
|
5108
|
-
return
|
|
5108
|
+
return tr(
|
|
5109
5109
|
this,
|
|
5110
5110
|
t ? vo(t) : yo
|
|
5111
5111
|
);
|
|
5112
5112
|
},
|
|
5113
5113
|
minBy: function(t, e) {
|
|
5114
|
-
return
|
|
5114
|
+
return tr(
|
|
5115
5115
|
this,
|
|
5116
5116
|
e ? vo(e) : yo,
|
|
5117
5117
|
t
|
|
@@ -5127,13 +5127,13 @@ Gt(et, {
|
|
|
5127
5127
|
return t === 0 ? this : this.slice(0, -Math.max(0, t));
|
|
5128
5128
|
},
|
|
5129
5129
|
skipWhile: function(t, e) {
|
|
5130
|
-
return
|
|
5130
|
+
return V(this, Yo(this, t, e, !0));
|
|
5131
5131
|
},
|
|
5132
5132
|
skipUntil: function(t, e) {
|
|
5133
|
-
return this.skipWhile(
|
|
5133
|
+
return this.skipWhile(qr(t), e);
|
|
5134
5134
|
},
|
|
5135
5135
|
sortBy: function(t, e) {
|
|
5136
|
-
return
|
|
5136
|
+
return V(this, ue(this, e, t));
|
|
5137
5137
|
},
|
|
5138
5138
|
take: function(t) {
|
|
5139
5139
|
return this.slice(0, Math.max(0, t));
|
|
@@ -5142,10 +5142,10 @@ Gt(et, {
|
|
|
5142
5142
|
return this.slice(-Math.max(0, t));
|
|
5143
5143
|
},
|
|
5144
5144
|
takeWhile: function(t, e) {
|
|
5145
|
-
return
|
|
5145
|
+
return V(this, Hs(this, t, e));
|
|
5146
5146
|
},
|
|
5147
5147
|
takeUntil: function(t, e) {
|
|
5148
|
-
return this.takeWhile(
|
|
5148
|
+
return this.takeWhile(qr(t), e);
|
|
5149
5149
|
},
|
|
5150
5150
|
update: function(t) {
|
|
5151
5151
|
return t(this);
|
|
@@ -5155,30 +5155,30 @@ Gt(et, {
|
|
|
5155
5155
|
},
|
|
5156
5156
|
// ### Hashable Object
|
|
5157
5157
|
hashCode: function() {
|
|
5158
|
-
return this.__hash || (this.__hash =
|
|
5158
|
+
return this.__hash || (this.__hash = Sa(this));
|
|
5159
5159
|
}
|
|
5160
5160
|
// ### Internal
|
|
5161
5161
|
// abstract __iterate(fn, reverse)
|
|
5162
5162
|
// abstract __iterator(type, reverse)
|
|
5163
5163
|
});
|
|
5164
5164
|
var nt = et.prototype;
|
|
5165
|
-
nt[
|
|
5166
|
-
nt[
|
|
5165
|
+
nt[$o] = !0;
|
|
5166
|
+
nt[mr] = nt.values;
|
|
5167
5167
|
nt.toJSON = nt.toArray;
|
|
5168
|
-
nt.__toStringMapper =
|
|
5168
|
+
nt.__toStringMapper = Pe;
|
|
5169
5169
|
nt.inspect = nt.toSource = function() {
|
|
5170
5170
|
return this.toString();
|
|
5171
5171
|
};
|
|
5172
5172
|
nt.chain = nt.flatMap;
|
|
5173
5173
|
nt.contains = nt.includes;
|
|
5174
|
-
|
|
5174
|
+
Qt(St, {
|
|
5175
5175
|
// ### More sequential methods
|
|
5176
5176
|
flip: function() {
|
|
5177
|
-
return
|
|
5177
|
+
return V(this, Jo(this));
|
|
5178
5178
|
},
|
|
5179
5179
|
mapEntries: function(t, e) {
|
|
5180
5180
|
var r = this, n = 0;
|
|
5181
|
-
return
|
|
5181
|
+
return V(
|
|
5182
5182
|
this,
|
|
5183
5183
|
this.toSeq().map(function(o, i) {
|
|
5184
5184
|
return t.call(e, [i, o], n++, r);
|
|
@@ -5187,7 +5187,7 @@ Gt(St, {
|
|
|
5187
5187
|
},
|
|
5188
5188
|
mapKeys: function(t, e) {
|
|
5189
5189
|
var r = this;
|
|
5190
|
-
return
|
|
5190
|
+
return V(
|
|
5191
5191
|
this,
|
|
5192
5192
|
this.toSeq().flip().map(function(n, o) {
|
|
5193
5193
|
return t.call(e, n, o, r);
|
|
@@ -5195,21 +5195,21 @@ Gt(St, {
|
|
|
5195
5195
|
);
|
|
5196
5196
|
}
|
|
5197
5197
|
});
|
|
5198
|
-
var
|
|
5199
|
-
|
|
5200
|
-
|
|
5201
|
-
|
|
5202
|
-
|
|
5203
|
-
return
|
|
5198
|
+
var Ge = St.prototype;
|
|
5199
|
+
Ge[pr] = !0;
|
|
5200
|
+
Ge[mr] = nt.entries;
|
|
5201
|
+
Ge.toJSON = Si;
|
|
5202
|
+
Ge.__toStringMapper = function(t, e) {
|
|
5203
|
+
return Pe(e) + ": " + Pe(t);
|
|
5204
5204
|
};
|
|
5205
|
-
|
|
5205
|
+
Qt(Jt, {
|
|
5206
5206
|
// ### Conversion to other types
|
|
5207
5207
|
toKeyedSeq: function() {
|
|
5208
5208
|
return new Ir(this, !1);
|
|
5209
5209
|
},
|
|
5210
5210
|
// ### ES6 Collection methods (ES6 Array and Map)
|
|
5211
5211
|
filter: function(t, e) {
|
|
5212
|
-
return
|
|
5212
|
+
return V(this, Qo(this, t, e, !1));
|
|
5213
5213
|
},
|
|
5214
5214
|
findIndex: function(t, e) {
|
|
5215
5215
|
var r = this.findEntry(t, e);
|
|
@@ -5224,20 +5224,20 @@ Gt(Ht, {
|
|
|
5224
5224
|
return e === void 0 ? -1 : e;
|
|
5225
5225
|
},
|
|
5226
5226
|
reverse: function() {
|
|
5227
|
-
return
|
|
5227
|
+
return V(this, _n(this, !1));
|
|
5228
5228
|
},
|
|
5229
5229
|
slice: function(t, e) {
|
|
5230
|
-
return
|
|
5230
|
+
return V(this, gn(this, t, e, !1));
|
|
5231
5231
|
},
|
|
5232
5232
|
splice: function(t, e) {
|
|
5233
5233
|
var r = arguments.length;
|
|
5234
5234
|
if (e = Math.max(e || 0, 0), r === 0 || r === 2 && !e)
|
|
5235
5235
|
return this;
|
|
5236
|
-
t =
|
|
5236
|
+
t = We(t, t < 0 ? this.count() : this.size);
|
|
5237
5237
|
var n = this.slice(0, t);
|
|
5238
|
-
return
|
|
5238
|
+
return V(
|
|
5239
5239
|
this,
|
|
5240
|
-
r === 1 ? n : n.concat(
|
|
5240
|
+
r === 1 ? n : n.concat(Dt(arguments, 2), this.slice(t + e))
|
|
5241
5241
|
);
|
|
5242
5242
|
},
|
|
5243
5243
|
// ### More collection methods
|
|
@@ -5249,49 +5249,49 @@ Gt(Ht, {
|
|
|
5249
5249
|
return this.get(0, t);
|
|
5250
5250
|
},
|
|
5251
5251
|
flatten: function(t) {
|
|
5252
|
-
return
|
|
5252
|
+
return V(this, Xo(this, t, !1));
|
|
5253
5253
|
},
|
|
5254
5254
|
get: function(t, e) {
|
|
5255
|
-
return t =
|
|
5255
|
+
return t = qt(this, t), t < 0 || this.size === 1 / 0 || this.size !== void 0 && t > this.size ? e : this.find(function(r, n) {
|
|
5256
5256
|
return n === t;
|
|
5257
5257
|
}, void 0, e);
|
|
5258
5258
|
},
|
|
5259
5259
|
has: function(t) {
|
|
5260
|
-
return t =
|
|
5260
|
+
return t = qt(this, t), t >= 0 && (this.size !== void 0 ? this.size === 1 / 0 || t < this.size : this.indexOf(t) !== -1);
|
|
5261
5261
|
},
|
|
5262
5262
|
interpose: function(t) {
|
|
5263
|
-
return
|
|
5263
|
+
return V(this, Ys(this, t));
|
|
5264
5264
|
},
|
|
5265
5265
|
interleave: function() {
|
|
5266
|
-
var t = [this].concat(
|
|
5267
|
-
return e.size && (r.size = e.size * t.length),
|
|
5266
|
+
var t = [this].concat(Dt(arguments)), e = er(this.toSeq(), It.of, t), r = e.flatten(!0);
|
|
5267
|
+
return e.size && (r.size = e.size * t.length), V(this, r);
|
|
5268
5268
|
},
|
|
5269
5269
|
keySeq: function() {
|
|
5270
|
-
return
|
|
5270
|
+
return ma(0, this.size);
|
|
5271
5271
|
},
|
|
5272
5272
|
last: function(t) {
|
|
5273
5273
|
return this.get(-1, t);
|
|
5274
5274
|
},
|
|
5275
5275
|
skipWhile: function(t, e) {
|
|
5276
|
-
return
|
|
5276
|
+
return V(this, Yo(this, t, e, !1));
|
|
5277
5277
|
},
|
|
5278
5278
|
zip: function() {
|
|
5279
|
-
var t = [this].concat(
|
|
5280
|
-
return
|
|
5279
|
+
var t = [this].concat(Dt(arguments));
|
|
5280
|
+
return V(this, er(this, mo, t));
|
|
5281
5281
|
},
|
|
5282
5282
|
zipAll: function() {
|
|
5283
|
-
var t = [this].concat(
|
|
5284
|
-
return
|
|
5283
|
+
var t = [this].concat(Dt(arguments));
|
|
5284
|
+
return V(this, er(this, mo, t, !0));
|
|
5285
5285
|
},
|
|
5286
5286
|
zipWith: function(t) {
|
|
5287
|
-
var e =
|
|
5288
|
-
return e[0] = this,
|
|
5287
|
+
var e = Dt(arguments);
|
|
5288
|
+
return e[0] = this, V(this, er(this, t, e));
|
|
5289
5289
|
}
|
|
5290
5290
|
});
|
|
5291
|
-
var we =
|
|
5292
|
-
we[
|
|
5293
|
-
we[
|
|
5294
|
-
|
|
5291
|
+
var we = Jt.prototype;
|
|
5292
|
+
we[hr] = !0;
|
|
5293
|
+
we[Lt] = !0;
|
|
5294
|
+
Qt(de, {
|
|
5295
5295
|
// ### ES6 Collection methods (ES6 Array and Map)
|
|
5296
5296
|
get: function(t, e) {
|
|
5297
5297
|
return this.has(t) ? t : e;
|
|
@@ -5308,18 +5308,18 @@ var he = de.prototype;
|
|
|
5308
5308
|
he.has = nt.includes;
|
|
5309
5309
|
he.contains = he.includes;
|
|
5310
5310
|
he.keys = he.values;
|
|
5311
|
-
|
|
5312
|
-
|
|
5313
|
-
|
|
5311
|
+
Qt(Ut, Ge);
|
|
5312
|
+
Qt(It, we);
|
|
5313
|
+
Qt(_e, he);
|
|
5314
5314
|
function mo() {
|
|
5315
|
-
return
|
|
5315
|
+
return Dt(arguments);
|
|
5316
5316
|
}
|
|
5317
|
-
function
|
|
5317
|
+
function Ei(t) {
|
|
5318
5318
|
return Mn(t) && At(t);
|
|
5319
5319
|
}
|
|
5320
|
-
var
|
|
5320
|
+
var Ve = /* @__PURE__ */ (function(t) {
|
|
5321
5321
|
function e(r) {
|
|
5322
|
-
return r == null ? sn() :
|
|
5322
|
+
return r == null ? sn() : Ei(r) ? r : sn().withMutations(function(n) {
|
|
5323
5323
|
var o = de(r);
|
|
5324
5324
|
ft(o.size), o.forEach(function(i) {
|
|
5325
5325
|
return n.add(i);
|
|
@@ -5333,29 +5333,29 @@ var qe = /* @__PURE__ */ (function(t) {
|
|
|
5333
5333
|
}, e.prototype.toString = function() {
|
|
5334
5334
|
return this.__toString("OrderedSet {", "}");
|
|
5335
5335
|
}, e;
|
|
5336
|
-
})(
|
|
5337
|
-
|
|
5338
|
-
var
|
|
5339
|
-
|
|
5340
|
-
|
|
5341
|
-
|
|
5342
|
-
|
|
5343
|
-
|
|
5344
|
-
|
|
5345
|
-
function
|
|
5346
|
-
var r = Object.create(
|
|
5336
|
+
})(kr);
|
|
5337
|
+
Ve.isOrderedSet = Ei;
|
|
5338
|
+
var Yt = Ve.prototype;
|
|
5339
|
+
Yt[Lt] = !0;
|
|
5340
|
+
Yt.zip = we.zip;
|
|
5341
|
+
Yt.zipWith = we.zipWith;
|
|
5342
|
+
Yt.zipAll = we.zipAll;
|
|
5343
|
+
Yt.__empty = sn;
|
|
5344
|
+
Yt.__make = Ii;
|
|
5345
|
+
function Ii(t, e) {
|
|
5346
|
+
var r = Object.create(Yt);
|
|
5347
5347
|
return r.size = t ? t.size : 0, r._map = t, r.__ownerID = e, r;
|
|
5348
5348
|
}
|
|
5349
5349
|
var wo;
|
|
5350
5350
|
function sn() {
|
|
5351
|
-
return wo || (wo =
|
|
5351
|
+
return wo || (wo = Ii(Ie()));
|
|
5352
5352
|
}
|
|
5353
|
-
function
|
|
5354
|
-
if (
|
|
5353
|
+
function Ia(t) {
|
|
5354
|
+
if (Gt(t))
|
|
5355
5355
|
throw new Error(
|
|
5356
5356
|
"Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead."
|
|
5357
5357
|
);
|
|
5358
|
-
if (
|
|
5358
|
+
if (Nt(t))
|
|
5359
5359
|
throw new Error(
|
|
5360
5360
|
"Can not call `Record` with an immutable Collection as default values. Use a plain javascript object instead."
|
|
5361
5361
|
);
|
|
@@ -5366,7 +5366,7 @@ function Oa(t) {
|
|
|
5366
5366
|
}
|
|
5367
5367
|
var X = function(t, e) {
|
|
5368
5368
|
var r;
|
|
5369
|
-
|
|
5369
|
+
Ia(t);
|
|
5370
5370
|
var n = function(i) {
|
|
5371
5371
|
var s = this;
|
|
5372
5372
|
if (i instanceof n)
|
|
@@ -5381,10 +5381,10 @@ var X = function(t, e) {
|
|
|
5381
5381
|
var l = a[c];
|
|
5382
5382
|
u[l] = c, o[l] ? typeof console == "object" && console.warn && console.warn(
|
|
5383
5383
|
"Cannot define " + Pn(this) + ' with property "' + l + '" since that property name is part of the Record API.'
|
|
5384
|
-
) :
|
|
5384
|
+
) : Oa(o, l);
|
|
5385
5385
|
}
|
|
5386
5386
|
}
|
|
5387
|
-
return this.__ownerID = void 0, this._values =
|
|
5387
|
+
return this.__ownerID = void 0, this._values = Or().withMutations(function(f) {
|
|
5388
5388
|
f.setSize(s._keys.length), St(i).forEach(function(h, p) {
|
|
5389
5389
|
f.set(s._indices[p], h === s._defaultValues[p] ? void 0 : h);
|
|
5390
5390
|
});
|
|
@@ -5394,11 +5394,11 @@ var X = function(t, e) {
|
|
|
5394
5394
|
};
|
|
5395
5395
|
X.prototype.toString = function() {
|
|
5396
5396
|
for (var t = Pn(this) + " { ", e = this._keys, r, n = 0, o = e.length; n !== o; n++)
|
|
5397
|
-
r = e[n], t += (n ? ", " : "") + r + ": " +
|
|
5397
|
+
r = e[n], t += (n ? ", " : "") + r + ": " + Pe(this.get(r));
|
|
5398
5398
|
return t + " }";
|
|
5399
5399
|
};
|
|
5400
5400
|
X.prototype.equals = function(t) {
|
|
5401
|
-
return this === t ||
|
|
5401
|
+
return this === t || Gt(t) && pe(this).equals(pe(t));
|
|
5402
5402
|
};
|
|
5403
5403
|
X.prototype.hashCode = function() {
|
|
5404
5404
|
return pe(this).hashCode();
|
|
@@ -5437,7 +5437,7 @@ X.prototype.toSeq = function() {
|
|
|
5437
5437
|
return pe(this);
|
|
5438
5438
|
};
|
|
5439
5439
|
X.prototype.toJS = function() {
|
|
5440
|
-
return
|
|
5440
|
+
return vr(this);
|
|
5441
5441
|
};
|
|
5442
5442
|
X.prototype.entries = function() {
|
|
5443
5443
|
return this.__iterator(yt);
|
|
@@ -5454,27 +5454,27 @@ X.prototype.__ensureOwner = function(t) {
|
|
|
5454
5454
|
var e = this._values.__ensureOwner(t);
|
|
5455
5455
|
return t ? Tn(this, e, t) : (this.__ownerID = t, this._values = e, this);
|
|
5456
5456
|
};
|
|
5457
|
-
X.isRecord =
|
|
5457
|
+
X.isRecord = Gt;
|
|
5458
5458
|
X.getDescriptiveName = Pn;
|
|
5459
5459
|
var B = X.prototype;
|
|
5460
|
-
B[
|
|
5461
|
-
B[
|
|
5460
|
+
B[Lo] = !0;
|
|
5461
|
+
B[Be] = B.remove;
|
|
5462
5462
|
B.deleteIn = B.removeIn = xn;
|
|
5463
5463
|
B.getIn = bi;
|
|
5464
5464
|
B.hasIn = nt.hasIn;
|
|
5465
5465
|
B.merge = ei;
|
|
5466
5466
|
B.mergeWith = ri;
|
|
5467
|
-
B.mergeIn =
|
|
5467
|
+
B.mergeIn = In;
|
|
5468
5468
|
B.mergeDeep = oi;
|
|
5469
5469
|
B.mergeDeepWith = ii;
|
|
5470
|
-
B.mergeDeepIn =
|
|
5470
|
+
B.mergeDeepIn = En;
|
|
5471
5471
|
B.setIn = On;
|
|
5472
5472
|
B.update = kn;
|
|
5473
5473
|
B.updateIn = Dn;
|
|
5474
|
-
B.withMutations =
|
|
5475
|
-
B.asMutable =
|
|
5476
|
-
B.asImmutable =
|
|
5477
|
-
B[
|
|
5474
|
+
B.withMutations = Je;
|
|
5475
|
+
B.asMutable = He;
|
|
5476
|
+
B.asImmutable = Ke;
|
|
5477
|
+
B[mr] = B.entries;
|
|
5478
5478
|
B.toJSON = B.toObject = nt.toObject;
|
|
5479
5479
|
B.inspect = B.toSource = function() {
|
|
5480
5480
|
return this.toString();
|
|
@@ -5491,46 +5491,46 @@ function pe(t) {
|
|
|
5491
5491
|
return [e, t.get(e)];
|
|
5492
5492
|
}));
|
|
5493
5493
|
}
|
|
5494
|
-
function
|
|
5494
|
+
function Oa(t, e) {
|
|
5495
5495
|
try {
|
|
5496
5496
|
Object.defineProperty(t, e, {
|
|
5497
5497
|
get: function() {
|
|
5498
5498
|
return this.get(e);
|
|
5499
5499
|
},
|
|
5500
5500
|
set: function(r) {
|
|
5501
|
-
|
|
5501
|
+
Ne(this.__ownerID, "Cannot set on an immutable record."), this.set(e, r);
|
|
5502
5502
|
}
|
|
5503
5503
|
});
|
|
5504
5504
|
} catch {
|
|
5505
5505
|
}
|
|
5506
5506
|
}
|
|
5507
5507
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
5508
|
-
function
|
|
5508
|
+
function ka(t, e) {
|
|
5509
5509
|
return an() ? (un(t, e), !0) : !1;
|
|
5510
5510
|
}
|
|
5511
5511
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
5512
|
-
const
|
|
5512
|
+
const Da = () => {
|
|
5513
5513
|
};
|
|
5514
|
-
function
|
|
5515
|
-
if (t.length !== 1) return
|
|
5514
|
+
function Ra(...t) {
|
|
5515
|
+
if (t.length !== 1) return Kt(...t);
|
|
5516
5516
|
const e = t[0];
|
|
5517
|
-
return typeof e == "function" ?
|
|
5517
|
+
return typeof e == "function" ? gr(cn(() => ({
|
|
5518
5518
|
get: e,
|
|
5519
|
-
set:
|
|
5520
|
-
}))) :
|
|
5519
|
+
set: Da
|
|
5520
|
+
}))) : C(e);
|
|
5521
5521
|
}
|
|
5522
5522
|
function Vr(t) {
|
|
5523
5523
|
return typeof Window < "u" && t instanceof Window ? t.document.documentElement : typeof Document < "u" && t instanceof Document ? t.documentElement : t;
|
|
5524
5524
|
}
|
|
5525
|
-
const
|
|
5526
|
-
function
|
|
5527
|
-
const r =
|
|
5525
|
+
const Ur = /* @__PURE__ */ new WeakMap();
|
|
5526
|
+
function za(t, e = !1) {
|
|
5527
|
+
const r = Fe(e);
|
|
5528
5528
|
let n = "";
|
|
5529
|
-
rt(
|
|
5529
|
+
rt(Ra(t), (s) => {
|
|
5530
5530
|
const a = Vr(wt(s));
|
|
5531
5531
|
if (a) {
|
|
5532
5532
|
const u = a;
|
|
5533
|
-
if (
|
|
5533
|
+
if (Ur.get(u) || Ur.set(u, u.style.overflow), u.style.overflow !== "hidden" && (n = u.style.overflow), u.style.overflow === "hidden") return r.value = !0;
|
|
5534
5534
|
if (r.value) return u.style.overflow = "hidden";
|
|
5535
5535
|
}
|
|
5536
5536
|
}, { immediate: !0 });
|
|
@@ -5539,9 +5539,9 @@ function Ra(t, e = !1) {
|
|
|
5539
5539
|
!s || r.value || (s.style.overflow = "hidden", r.value = !0);
|
|
5540
5540
|
}, i = () => {
|
|
5541
5541
|
const s = Vr(wt(t));
|
|
5542
|
-
!s || !r.value || (s.style.overflow = n,
|
|
5542
|
+
!s || !r.value || (s.style.overflow = n, Ur.delete(s), r.value = !1);
|
|
5543
5543
|
};
|
|
5544
|
-
return
|
|
5544
|
+
return ka(i), x({
|
|
5545
5545
|
get() {
|
|
5546
5546
|
return r.value;
|
|
5547
5547
|
},
|
|
@@ -5550,49 +5550,49 @@ function Ra(t, e = !1) {
|
|
|
5550
5550
|
}
|
|
5551
5551
|
});
|
|
5552
5552
|
}
|
|
5553
|
-
function
|
|
5553
|
+
function Aa() {
|
|
5554
5554
|
let t = !1;
|
|
5555
|
-
const e =
|
|
5555
|
+
const e = Fe(!1);
|
|
5556
5556
|
return (r, n) => {
|
|
5557
5557
|
if (e.value = n.value, t) return;
|
|
5558
5558
|
t = !0;
|
|
5559
|
-
const o =
|
|
5559
|
+
const o = za(r, n.value);
|
|
5560
5560
|
rt(e, (i) => o.value = i);
|
|
5561
5561
|
};
|
|
5562
5562
|
}
|
|
5563
|
-
|
|
5564
|
-
const
|
|
5563
|
+
Aa();
|
|
5564
|
+
const Na = (t, e) => {
|
|
5565
5565
|
const r = t.__vccOpts || t;
|
|
5566
5566
|
for (const [n, o] of e)
|
|
5567
5567
|
r[n] = o;
|
|
5568
5568
|
return r;
|
|
5569
5569
|
};
|
|
5570
|
-
function
|
|
5570
|
+
function Ca(t, e) {
|
|
5571
5571
|
return an() ? (un(t, e), !0) : !1;
|
|
5572
5572
|
}
|
|
5573
5573
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
5574
|
-
const
|
|
5574
|
+
const xa = () => {
|
|
5575
5575
|
};
|
|
5576
5576
|
function $a(...t) {
|
|
5577
|
-
if (t.length !== 1) return
|
|
5577
|
+
if (t.length !== 1) return Kt(...t);
|
|
5578
5578
|
const e = t[0];
|
|
5579
|
-
return typeof e == "function" ?
|
|
5579
|
+
return typeof e == "function" ? gr(cn(() => ({
|
|
5580
5580
|
get: e,
|
|
5581
|
-
set:
|
|
5582
|
-
}))) :
|
|
5581
|
+
set: xa
|
|
5582
|
+
}))) : C(e);
|
|
5583
5583
|
}
|
|
5584
5584
|
function Fr(t) {
|
|
5585
5585
|
return typeof Window < "u" && t instanceof Window ? t.document.documentElement : typeof Document < "u" && t instanceof Document ? t.documentElement : t;
|
|
5586
5586
|
}
|
|
5587
|
-
const
|
|
5588
|
-
function
|
|
5589
|
-
const r =
|
|
5587
|
+
const Br = /* @__PURE__ */ new WeakMap();
|
|
5588
|
+
function ja(t, e = !1) {
|
|
5589
|
+
const r = Fe(e);
|
|
5590
5590
|
let n = "";
|
|
5591
5591
|
rt($a(t), (s) => {
|
|
5592
5592
|
const a = Fr(wt(s));
|
|
5593
5593
|
if (a) {
|
|
5594
5594
|
const u = a;
|
|
5595
|
-
if (
|
|
5595
|
+
if (Br.get(u) || Br.set(u, u.style.overflow), u.style.overflow !== "hidden" && (n = u.style.overflow), u.style.overflow === "hidden") return r.value = !0;
|
|
5596
5596
|
if (r.value) return u.style.overflow = "hidden";
|
|
5597
5597
|
}
|
|
5598
5598
|
}, { immediate: !0 });
|
|
@@ -5601,9 +5601,9 @@ function Ma(t, e = !1) {
|
|
|
5601
5601
|
!s || r.value || (s.style.overflow = "hidden", r.value = !0);
|
|
5602
5602
|
}, i = () => {
|
|
5603
5603
|
const s = Fr(wt(t));
|
|
5604
|
-
!s || !r.value || (s.style.overflow = n,
|
|
5604
|
+
!s || !r.value || (s.style.overflow = n, Br.delete(s), r.value = !1);
|
|
5605
5605
|
};
|
|
5606
|
-
return
|
|
5606
|
+
return Ca(i), x({
|
|
5607
5607
|
get() {
|
|
5608
5608
|
return r.value;
|
|
5609
5609
|
},
|
|
@@ -5612,92 +5612,92 @@ function Ma(t, e = !1) {
|
|
|
5612
5612
|
}
|
|
5613
5613
|
});
|
|
5614
5614
|
}
|
|
5615
|
-
function
|
|
5615
|
+
function Ma() {
|
|
5616
5616
|
let t = !1;
|
|
5617
|
-
const e =
|
|
5617
|
+
const e = Fe(!1);
|
|
5618
5618
|
return (r, n) => {
|
|
5619
5619
|
if (e.value = n.value, t) return;
|
|
5620
5620
|
t = !0;
|
|
5621
|
-
const o =
|
|
5621
|
+
const o = ja(r, n.value);
|
|
5622
5622
|
rt(e, (i) => o.value = i);
|
|
5623
5623
|
};
|
|
5624
5624
|
}
|
|
5625
|
-
|
|
5625
|
+
Ma();
|
|
5626
5626
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
5627
|
-
const
|
|
5627
|
+
const Ta = { class: "aform" }, Pa = {
|
|
5628
5628
|
key: 0,
|
|
5629
5629
|
class: "aform-nested-section"
|
|
5630
|
-
},
|
|
5630
|
+
}, qa = {
|
|
5631
5631
|
key: 0,
|
|
5632
5632
|
class: "aform-nested-label"
|
|
5633
|
-
}, La = /* @__PURE__ */
|
|
5633
|
+
}, La = /* @__PURE__ */ Ue({
|
|
5634
5634
|
__name: "AForm",
|
|
5635
|
-
props: /* @__PURE__ */
|
|
5635
|
+
props: /* @__PURE__ */ Vn({
|
|
5636
5636
|
schema: {},
|
|
5637
5637
|
mode: { default: "edit" }
|
|
5638
5638
|
}, {
|
|
5639
5639
|
data: { required: !0 },
|
|
5640
5640
|
dataModifiers: {}
|
|
5641
5641
|
}),
|
|
5642
|
-
emits: /* @__PURE__ */
|
|
5642
|
+
emits: /* @__PURE__ */ Vn(["update:schema", "update:data"], ["update:data"]),
|
|
5643
5643
|
setup(t, { emit: e }) {
|
|
5644
|
-
const r = e, n = Ci(t, "data"), o = (p) => "schema" in p && Array.isArray(p.schema) && p.schema.length > 0 && (!("kind" in p) || p.kind !== "table"), i =
|
|
5644
|
+
const r = e, n = Ci(t, "data"), o = (p) => "schema" in p && Array.isArray(p.schema) && p.schema.length > 0 && (!("kind" in p) || p.kind !== "table"), i = C({});
|
|
5645
5645
|
rt(
|
|
5646
5646
|
() => n.value,
|
|
5647
5647
|
(p) => {
|
|
5648
|
-
!t.schema || !p || t.schema.forEach((
|
|
5649
|
-
o(
|
|
5648
|
+
!t.schema || !p || t.schema.forEach((v) => {
|
|
5649
|
+
o(v) && (i.value[v.fieldname] = p[v.fieldname] ?? {});
|
|
5650
5650
|
});
|
|
5651
5651
|
},
|
|
5652
5652
|
{ immediate: !0 }
|
|
5653
5653
|
);
|
|
5654
|
-
const s = (p,
|
|
5655
|
-
i.value[p] =
|
|
5654
|
+
const s = (p, v) => {
|
|
5655
|
+
i.value[p] = v, n.value && (n.value[p] = v, r("update:data", { ...n.value }));
|
|
5656
5656
|
}, a = (p) => {
|
|
5657
|
-
const
|
|
5657
|
+
const v = {};
|
|
5658
5658
|
for (const [y, D] of Object.entries(p))
|
|
5659
|
-
["component", "fieldtype", "hidden", "mode", "width"].includes(y) || (
|
|
5659
|
+
["component", "fieldtype", "hidden", "mode", "width"].includes(y) || (v[y] = D);
|
|
5660
5660
|
if ("columns" in p || "kind" in p && p.kind === "table") {
|
|
5661
5661
|
const y = p.rows;
|
|
5662
|
-
(!y || Array.isArray(y) && y.length === 0) && (
|
|
5662
|
+
(!y || Array.isArray(y) && y.length === 0) && (v.rows = n.value[p.fieldname] || []);
|
|
5663
5663
|
}
|
|
5664
|
-
return
|
|
5664
|
+
return v;
|
|
5665
5665
|
}, u = (p) => {
|
|
5666
|
-
const
|
|
5667
|
-
return
|
|
5668
|
-
}, c =
|
|
5666
|
+
const v = p.width;
|
|
5667
|
+
return v ? { flexBasis: v, width: v } : {};
|
|
5668
|
+
}, c = x(() => t.mode ?? "edit");
|
|
5669
5669
|
function l(p) {
|
|
5670
5670
|
return p.mode || c.value;
|
|
5671
5671
|
}
|
|
5672
|
-
const f =
|
|
5672
|
+
const f = C([]);
|
|
5673
5673
|
xi(() => {
|
|
5674
|
-
t.schema && f.value.length !== t.schema.length && (f.value = t.schema.map((p,
|
|
5674
|
+
t.schema && f.value.length !== t.schema.length && (f.value = t.schema.map((p, v) => x({
|
|
5675
5675
|
get() {
|
|
5676
|
-
return n.value?.[t.schema[
|
|
5676
|
+
return n.value?.[t.schema[v].fieldname];
|
|
5677
5677
|
},
|
|
5678
5678
|
set: (y) => {
|
|
5679
|
-
const D = t.schema[
|
|
5679
|
+
const D = t.schema[v].fieldname;
|
|
5680
5680
|
D && n.value && (n.value[D] = y, r("update:data", { ...n.value })), r("update:schema", t.schema);
|
|
5681
5681
|
}
|
|
5682
5682
|
})));
|
|
5683
5683
|
});
|
|
5684
|
-
const h =
|
|
5685
|
-
return (p,
|
|
5686
|
-
(P(!0),
|
|
5687
|
-
o(y) ? (P(),
|
|
5688
|
-
y.label && !("collapsible" in y) ? (P(),
|
|
5689
|
-
(P(),
|
|
5684
|
+
const h = x(() => f.value);
|
|
5685
|
+
return (p, v) => (P(), F("form", Ta, [
|
|
5686
|
+
(P(!0), F(ne, null, xe(t.schema, (y, D) => (P(), F(ne, { key: D }, [
|
|
5687
|
+
o(y) ? (P(), F("div", Pa, [
|
|
5688
|
+
y.label && !("collapsible" in y) ? (P(), F("h4", qa, Rt(y.label), 1)) : Wt("", !0),
|
|
5689
|
+
(P(), ar(Ln(y.component ?? "AForm"), {
|
|
5690
5690
|
data: i.value[y.fieldname],
|
|
5691
5691
|
mode: l(y),
|
|
5692
5692
|
schema: y.schema,
|
|
5693
5693
|
label: y.label,
|
|
5694
5694
|
collapsible: y.collapsible,
|
|
5695
|
-
"onUpdate:data": (
|
|
5695
|
+
"onUpdate:data": (j) => s(y.fieldname, j)
|
|
5696
5696
|
}, null, 40, ["data", "mode", "schema", "label", "collapsible", "onUpdate:data"]))
|
|
5697
|
-
])) : y.hidden ?
|
|
5697
|
+
])) : y.hidden ? Wt("", !0) : (P(), ar(Ln(y.component), $i({
|
|
5698
5698
|
key: 1,
|
|
5699
5699
|
modelValue: h.value[D].value,
|
|
5700
|
-
"onUpdate:modelValue": (
|
|
5700
|
+
"onUpdate:modelValue": (j) => h.value[D].value = j,
|
|
5701
5701
|
style: u(y),
|
|
5702
5702
|
schema: y,
|
|
5703
5703
|
data: n.value[y.fieldname],
|
|
@@ -5706,13 +5706,13 @@ const Pa = { class: "aform" }, qa = {
|
|
|
5706
5706
|
], 64))), 128))
|
|
5707
5707
|
]));
|
|
5708
5708
|
}
|
|
5709
|
-
}),
|
|
5709
|
+
}), Va = /* @__PURE__ */ Na(La, [["__scopeId", "data-v-70086a8f"]]), Ua = { class: "tabs" }, Fa = { tabindex: "0" }, Ba = { tabindex: "0" }, Wa = /* @__PURE__ */ Ue({
|
|
5710
5710
|
__name: "SheetNav",
|
|
5711
5711
|
props: {
|
|
5712
5712
|
breadcrumbs: { default: () => [] }
|
|
5713
5713
|
},
|
|
5714
5714
|
setup(t) {
|
|
5715
|
-
const e =
|
|
5715
|
+
const e = C(!0), r = C(!1), n = C(""), o = bo("searchinput"), i = x(() => e.value ? "unrotated" : "rotated"), s = () => {
|
|
5716
5716
|
e.value = !e.value;
|
|
5717
5717
|
}, a = async () => {
|
|
5718
5718
|
r.value = !r.value, await oe(() => {
|
|
@@ -5725,15 +5725,15 @@ const Pa = { class: "aform" }, qa = {
|
|
|
5725
5725
|
}, l = () => {
|
|
5726
5726
|
};
|
|
5727
5727
|
return (f, h) => {
|
|
5728
|
-
const p =
|
|
5729
|
-
return P(),
|
|
5728
|
+
const p = ji("router-link");
|
|
5729
|
+
return P(), F("footer", null, [
|
|
5730
5730
|
T("ul", Ua, [
|
|
5731
5731
|
T("li", {
|
|
5732
5732
|
class: "hidebreadcrumbs",
|
|
5733
5733
|
onClick: s,
|
|
5734
5734
|
onKeydown: be(s, ["enter"])
|
|
5735
5735
|
}, [
|
|
5736
|
-
T("a",
|
|
5736
|
+
T("a", Fa, [
|
|
5737
5737
|
T("div", {
|
|
5738
5738
|
class: ee(i.value)
|
|
5739
5739
|
}, "×", 2)
|
|
@@ -5749,7 +5749,7 @@ const Pa = { class: "aform" }, qa = {
|
|
|
5749
5749
|
to: "/",
|
|
5750
5750
|
tabindex: "0"
|
|
5751
5751
|
}, {
|
|
5752
|
-
default:
|
|
5752
|
+
default: $e(() => [...h[5] || (h[5] = [
|
|
5753
5753
|
T("svg", {
|
|
5754
5754
|
class: "icon",
|
|
5755
5755
|
"aria-label": "Home",
|
|
@@ -5769,8 +5769,8 @@ const Pa = { class: "aform" }, qa = {
|
|
|
5769
5769
|
class: ee(["searchtab", { "search-active": r.value }]),
|
|
5770
5770
|
style: Ar({ display: e.value ? "block" : "none" })
|
|
5771
5771
|
}, [
|
|
5772
|
-
T("a",
|
|
5773
|
-
|
|
5772
|
+
T("a", Ba, [
|
|
5773
|
+
sr((P(), F("svg", {
|
|
5774
5774
|
class: "icon search-icon",
|
|
5775
5775
|
role: "button",
|
|
5776
5776
|
"aria-label": "Search",
|
|
@@ -5788,37 +5788,37 @@ const Pa = { class: "aform" }, qa = {
|
|
|
5788
5788
|
}, null, -1),
|
|
5789
5789
|
T("path", { d: "M21 21l-4.35-4.35" }, null, -1)
|
|
5790
5790
|
])], 544)), [
|
|
5791
|
-
[
|
|
5791
|
+
[Wr, !r.value]
|
|
5792
5792
|
]),
|
|
5793
|
-
|
|
5793
|
+
sr(T("input", {
|
|
5794
5794
|
ref: "searchinput",
|
|
5795
|
-
"onUpdate:modelValue": h[0] || (h[0] = (
|
|
5795
|
+
"onUpdate:modelValue": h[0] || (h[0] = (v) => n.value = v),
|
|
5796
5796
|
type: "text",
|
|
5797
5797
|
placeholder: "Search...",
|
|
5798
5798
|
onClick: h[1] || (h[1] = So(() => {
|
|
5799
5799
|
}, ["stop"])),
|
|
5800
|
-
onInput: h[2] || (h[2] = (
|
|
5801
|
-
onBlur: h[3] || (h[3] = (
|
|
5800
|
+
onInput: h[2] || (h[2] = (v) => u(v)),
|
|
5801
|
+
onBlur: h[3] || (h[3] = (v) => c(v)),
|
|
5802
5802
|
onKeydown: [
|
|
5803
|
-
h[4] || (h[4] = be((
|
|
5803
|
+
h[4] || (h[4] = be((v) => c(v), ["enter"])),
|
|
5804
5804
|
be(a, ["escape"])
|
|
5805
5805
|
]
|
|
5806
5806
|
}, null, 544), [
|
|
5807
|
-
[
|
|
5808
|
-
[
|
|
5807
|
+
[Wr, r.value],
|
|
5808
|
+
[Eo, n.value]
|
|
5809
5809
|
])
|
|
5810
5810
|
])
|
|
5811
5811
|
], 6),
|
|
5812
|
-
(P(!0),
|
|
5813
|
-
key:
|
|
5812
|
+
(P(!0), F(ne, null, xe(t.breadcrumbs, (v) => (P(), F("li", {
|
|
5813
|
+
key: v.title,
|
|
5814
5814
|
style: Ar({ display: e.value ? "block" : "none" })
|
|
5815
5815
|
}, [
|
|
5816
5816
|
re(p, {
|
|
5817
5817
|
tabindex: "0",
|
|
5818
|
-
to:
|
|
5818
|
+
to: v.to
|
|
5819
5819
|
}, {
|
|
5820
|
-
default:
|
|
5821
|
-
|
|
5820
|
+
default: $e(() => [
|
|
5821
|
+
ur(Rt(v.title), 1)
|
|
5822
5822
|
]),
|
|
5823
5823
|
_: 2
|
|
5824
5824
|
}, 1032, ["to"])
|
|
@@ -5827,13 +5827,13 @@ const Pa = { class: "aform" }, qa = {
|
|
|
5827
5827
|
]);
|
|
5828
5828
|
};
|
|
5829
5829
|
}
|
|
5830
|
-
}), Oi = /* @__PURE__ */ Do(
|
|
5830
|
+
}), Oi = /* @__PURE__ */ Do(Wa, [["__scopeId", "data-v-0072260b"]]), Ka = {
|
|
5831
5831
|
key: 1,
|
|
5832
5832
|
class: "loading"
|
|
5833
|
-
},
|
|
5833
|
+
}, Ha = {
|
|
5834
5834
|
key: 2,
|
|
5835
5835
|
class: "loading"
|
|
5836
|
-
},
|
|
5836
|
+
}, Ja = /* @__PURE__ */ Ue({
|
|
5837
5837
|
__name: "Desktop",
|
|
5838
5838
|
props: {
|
|
5839
5839
|
availableDoctypes: {},
|
|
@@ -5843,7 +5843,7 @@ const Pa = { class: "aform" }, qa = {
|
|
|
5843
5843
|
},
|
|
5844
5844
|
emits: ["action", "navigate", "record:open", "load-records", "load-record"],
|
|
5845
5845
|
setup(t, { emit: e }) {
|
|
5846
|
-
const r = t, n = e, { availableDoctypes: o = [] } = r, { stonecrop: i } =
|
|
5846
|
+
const r = t, n = e, { availableDoctypes: o = [] } = r, { stonecrop: i } = zs(), s = C(!1), a = C(!1), u = x({
|
|
5847
5847
|
get() {
|
|
5848
5848
|
if (!i.value || !f.value || !p.value)
|
|
5849
5849
|
return {};
|
|
@@ -5853,44 +5853,44 @@ const Pa = { class: "aform" }, qa = {
|
|
|
5853
5853
|
return {};
|
|
5854
5854
|
}
|
|
5855
5855
|
},
|
|
5856
|
-
set(
|
|
5856
|
+
set(d) {
|
|
5857
5857
|
if (!(!i.value || !f.value || !p.value))
|
|
5858
5858
|
try {
|
|
5859
5859
|
const _ = i.value.getStore();
|
|
5860
|
-
for (const [g, O] of Object.entries(
|
|
5861
|
-
const
|
|
5862
|
-
(_.has(
|
|
5860
|
+
for (const [g, O] of Object.entries(d)) {
|
|
5861
|
+
const b = `${f.value}.${p.value}.${g}`;
|
|
5862
|
+
(_.has(b) ? _.get(b) : void 0) !== O && _.set(b, O);
|
|
5863
5863
|
}
|
|
5864
5864
|
} catch (_) {
|
|
5865
5865
|
console.warn("HST update failed:", _);
|
|
5866
5866
|
}
|
|
5867
5867
|
}
|
|
5868
|
-
}), c =
|
|
5868
|
+
}), c = x(() => r.routeAdapter ? null : or(i.value?.registry.router?.currentRoute)), l = x(() => r.routeAdapter ? null : i.value?.registry.router), f = x(() => {
|
|
5869
5869
|
if (r.routeAdapter) return r.routeAdapter.getCurrentDoctype();
|
|
5870
5870
|
if (!c.value) return "";
|
|
5871
5871
|
if (c.value.meta?.actualDoctype)
|
|
5872
5872
|
return c.value.meta.actualDoctype;
|
|
5873
5873
|
if (c.value.params.doctype)
|
|
5874
5874
|
return c.value.params.doctype.toString();
|
|
5875
|
-
const
|
|
5876
|
-
return
|
|
5877
|
-
}), h =
|
|
5875
|
+
const d = c.value.params.pathMatch;
|
|
5876
|
+
return d && d.length > 0 ? d[0] : "";
|
|
5877
|
+
}), h = x(() => {
|
|
5878
5878
|
if (r.routeAdapter) return r.routeAdapter.getCurrentDoctype();
|
|
5879
5879
|
if (!c.value) return "";
|
|
5880
5880
|
if (c.value.meta?.doctype)
|
|
5881
5881
|
return c.value.meta.doctype;
|
|
5882
5882
|
if (c.value.params.doctype)
|
|
5883
5883
|
return c.value.params.doctype.toString();
|
|
5884
|
-
const
|
|
5885
|
-
return
|
|
5886
|
-
}), p =
|
|
5884
|
+
const d = c.value.params.pathMatch;
|
|
5885
|
+
return d && d.length > 0 ? d[0] : "";
|
|
5886
|
+
}), p = x(() => {
|
|
5887
5887
|
if (r.routeAdapter) return r.routeAdapter.getCurrentRecordId();
|
|
5888
5888
|
if (!c.value) return "";
|
|
5889
5889
|
if (c.value.params.recordId)
|
|
5890
5890
|
return c.value.params.recordId.toString();
|
|
5891
|
-
const
|
|
5892
|
-
return
|
|
5893
|
-
}),
|
|
5891
|
+
const d = c.value.params.pathMatch;
|
|
5892
|
+
return d && d.length > 1 ? d[1] : "";
|
|
5893
|
+
}), v = x(() => p.value?.startsWith("new-")), y = x(() => {
|
|
5894
5894
|
if (r.routeAdapter) return r.routeAdapter.getCurrentView();
|
|
5895
5895
|
if (!c.value || c.value.name === "home" || c.value.path === "/")
|
|
5896
5896
|
return "doctypes";
|
|
@@ -5901,44 +5901,44 @@ const Pa = { class: "aform" }, qa = {
|
|
|
5901
5901
|
if (_.includes("list") || c.value.params.doctype)
|
|
5902
5902
|
return "records";
|
|
5903
5903
|
}
|
|
5904
|
-
const
|
|
5905
|
-
return
|
|
5904
|
+
const d = c.value.params.pathMatch;
|
|
5905
|
+
return d && d.length > 0 ? d.length === 1 ? "records" : "record" : "doctypes";
|
|
5906
5906
|
}), D = () => {
|
|
5907
5907
|
if (!i.value || !f.value || !p.value)
|
|
5908
5908
|
return [];
|
|
5909
5909
|
try {
|
|
5910
|
-
const
|
|
5911
|
-
if (!
|
|
5912
|
-
const _ = i.value.getRecordState(f.value, p.value), g =
|
|
5913
|
-
return g.map(({ name:
|
|
5914
|
-
label: `${
|
|
5910
|
+
const d = i.value.registry.getDoctype(f.value);
|
|
5911
|
+
if (!d?.workflow) return [];
|
|
5912
|
+
const _ = i.value.getRecordState(f.value, p.value), g = d.getAvailableTransitions(_), O = u.value || {};
|
|
5913
|
+
return g.map(({ name: b, targetState: R }) => ({
|
|
5914
|
+
label: `${b} (→ ${R})`,
|
|
5915
5915
|
action: () => {
|
|
5916
5916
|
n("action", {
|
|
5917
|
-
name:
|
|
5917
|
+
name: b,
|
|
5918
5918
|
doctype: f.value,
|
|
5919
5919
|
recordId: p.value,
|
|
5920
5920
|
data: O
|
|
5921
5921
|
});
|
|
5922
5922
|
}
|
|
5923
5923
|
}));
|
|
5924
|
-
} catch (
|
|
5925
|
-
return console.warn("Error getting available transitions:",
|
|
5924
|
+
} catch (d) {
|
|
5925
|
+
return console.warn("Error getting available transitions:", d), [];
|
|
5926
5926
|
}
|
|
5927
|
-
},
|
|
5928
|
-
const
|
|
5927
|
+
}, j = x(() => {
|
|
5928
|
+
const d = [];
|
|
5929
5929
|
switch (y.value) {
|
|
5930
5930
|
case "records":
|
|
5931
|
-
|
|
5931
|
+
d.push({
|
|
5932
5932
|
type: "button",
|
|
5933
5933
|
label: "New Record",
|
|
5934
5934
|
action: () => {
|
|
5935
|
-
|
|
5935
|
+
S();
|
|
5936
5936
|
}
|
|
5937
5937
|
});
|
|
5938
5938
|
break;
|
|
5939
5939
|
case "record": {
|
|
5940
5940
|
const _ = D();
|
|
5941
|
-
_.length > 0 &&
|
|
5941
|
+
_.length > 0 && d.push({
|
|
5942
5942
|
type: "dropdown",
|
|
5943
5943
|
label: "Actions",
|
|
5944
5944
|
actions: _
|
|
@@ -5946,24 +5946,24 @@ const Pa = { class: "aform" }, qa = {
|
|
|
5946
5946
|
break;
|
|
5947
5947
|
}
|
|
5948
5948
|
}
|
|
5949
|
-
return
|
|
5950
|
-
}), tt =
|
|
5951
|
-
const
|
|
5949
|
+
return d;
|
|
5950
|
+
}), tt = x(() => {
|
|
5951
|
+
const d = [];
|
|
5952
5952
|
if (y.value === "records" && h.value)
|
|
5953
|
-
|
|
5953
|
+
d.push(
|
|
5954
5954
|
{ title: "Home", to: "/" },
|
|
5955
5955
|
{ title: Y(h.value), to: `/${h.value}` }
|
|
5956
5956
|
);
|
|
5957
5957
|
else if (y.value === "record" && h.value) {
|
|
5958
5958
|
const _ = p.value ? `/${h.value}/${p.value}` : c.value?.fullPath ?? "";
|
|
5959
|
-
|
|
5959
|
+
d.push(
|
|
5960
5960
|
{ title: "Home", to: "/" },
|
|
5961
5961
|
{ title: Y(h.value), to: `/${h.value}` },
|
|
5962
|
-
{ title:
|
|
5962
|
+
{ title: v.value ? "New Record" : "Edit Record", to: _ }
|
|
5963
5963
|
);
|
|
5964
5964
|
}
|
|
5965
|
-
return
|
|
5966
|
-
}), ut = (
|
|
5965
|
+
return d;
|
|
5966
|
+
}), ut = (d) => {
|
|
5967
5967
|
const _ = [
|
|
5968
5968
|
{
|
|
5969
5969
|
title: "Go Home",
|
|
@@ -5988,7 +5988,7 @@ const Pa = { class: "aform" }, qa = {
|
|
|
5988
5988
|
title: `Create New ${Y(h.value)}`,
|
|
5989
5989
|
description: `Create a new ${h.value} record`,
|
|
5990
5990
|
action: () => {
|
|
5991
|
-
|
|
5991
|
+
S();
|
|
5992
5992
|
}
|
|
5993
5993
|
})), o.forEach((g) => {
|
|
5994
5994
|
_.push({
|
|
@@ -5998,24 +5998,24 @@ const Pa = { class: "aform" }, qa = {
|
|
|
5998
5998
|
k({ view: "records", doctype: g });
|
|
5999
5999
|
}
|
|
6000
6000
|
});
|
|
6001
|
-
}),
|
|
6002
|
-
(g) => g.title.toLowerCase().includes(
|
|
6001
|
+
}), d ? _.filter(
|
|
6002
|
+
(g) => g.title.toLowerCase().includes(d.toLowerCase()) || g.description.toLowerCase().includes(d.toLowerCase())
|
|
6003
6003
|
) : _;
|
|
6004
|
-
},
|
|
6005
|
-
|
|
6006
|
-
}, Y = (
|
|
6007
|
-
n("navigate",
|
|
6008
|
-
},
|
|
6009
|
-
await k({ view: "records", doctype:
|
|
6010
|
-
},
|
|
6004
|
+
}, Et = (d) => {
|
|
6005
|
+
d.action(), a.value = !1;
|
|
6006
|
+
}, Y = (d) => d.split("-").map((_) => _.charAt(0).toUpperCase() + _.slice(1)).join(" "), _t = (d) => i.value ? i.value.getRecordIds(d).length : 0, k = async (d) => {
|
|
6007
|
+
n("navigate", d), r.routeAdapter ? await r.routeAdapter.navigate(d) : d.view === "doctypes" ? await l.value?.push("/") : d.view === "records" && d.doctype ? await l.value?.push(`/${d.doctype}`) : d.view === "record" && d.doctype && d.recordId && await l.value?.push(`/${d.doctype}/${d.recordId}`);
|
|
6008
|
+
}, xt = async (d) => {
|
|
6009
|
+
await k({ view: "records", doctype: d });
|
|
6010
|
+
}, L = async (d) => {
|
|
6011
6011
|
const _ = h.value;
|
|
6012
|
-
n("record:open", { doctype: _, recordId:
|
|
6013
|
-
},
|
|
6014
|
-
const
|
|
6015
|
-
await k({ view: "record", doctype: h.value, recordId:
|
|
6012
|
+
n("record:open", { doctype: _, recordId: d }), await k({ view: "record", doctype: _, recordId: d });
|
|
6013
|
+
}, S = async () => {
|
|
6014
|
+
const d = `new-${Date.now()}`;
|
|
6015
|
+
await k({ view: "record", doctype: h.value, recordId: d });
|
|
6016
6016
|
}, w = () => {
|
|
6017
6017
|
if (!o.length) return [];
|
|
6018
|
-
const
|
|
6018
|
+
const d = o.map((_) => ({
|
|
6019
6019
|
id: _,
|
|
6020
6020
|
doctype: _,
|
|
6021
6021
|
display_name: Y(_),
|
|
@@ -6064,20 +6064,20 @@ const Pa = { class: "aform" }, qa = {
|
|
|
6064
6064
|
view: "list",
|
|
6065
6065
|
fullWidth: !0
|
|
6066
6066
|
},
|
|
6067
|
-
rows:
|
|
6067
|
+
rows: d
|
|
6068
6068
|
}
|
|
6069
6069
|
];
|
|
6070
|
-
},
|
|
6070
|
+
}, N = () => {
|
|
6071
6071
|
if (!f.value) return [];
|
|
6072
6072
|
if (!i.value) return [];
|
|
6073
|
-
const
|
|
6073
|
+
const d = i.value.registry, _ = d.registry[f.value];
|
|
6074
6074
|
if (!_) return [];
|
|
6075
|
-
const g =
|
|
6075
|
+
const g = d.resolveSchema(_);
|
|
6076
6076
|
if (g.length === 0) return [];
|
|
6077
|
-
const O = z(),
|
|
6078
|
-
...
|
|
6077
|
+
const O = z(), b = r.recordIdField || "id", R = O.map((A) => ({
|
|
6078
|
+
...A,
|
|
6079
6079
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
6080
|
-
id:
|
|
6080
|
+
id: A[b] || A.id || "",
|
|
6081
6081
|
actions: "Edit | Delete"
|
|
6082
6082
|
}));
|
|
6083
6083
|
return [
|
|
@@ -6090,15 +6090,15 @@ const Pa = { class: "aform" }, qa = {
|
|
|
6090
6090
|
view: "list",
|
|
6091
6091
|
fullWidth: !0
|
|
6092
6092
|
},
|
|
6093
|
-
rows:
|
|
6093
|
+
rows: R
|
|
6094
6094
|
}
|
|
6095
6095
|
];
|
|
6096
6096
|
}, J = () => {
|
|
6097
6097
|
if (!f.value) return [];
|
|
6098
6098
|
if (!i.value) return [];
|
|
6099
6099
|
try {
|
|
6100
|
-
const
|
|
6101
|
-
return _?.schema ?
|
|
6100
|
+
const d = i.value?.registry, _ = d?.registry[f.value];
|
|
6101
|
+
return _?.schema ? d.resolveSchema(_) : [];
|
|
6102
6102
|
} catch {
|
|
6103
6103
|
return [];
|
|
6104
6104
|
}
|
|
@@ -6107,21 +6107,21 @@ const Pa = { class: "aform" }, qa = {
|
|
|
6107
6107
|
return [];
|
|
6108
6108
|
const _ = i.value.records(f.value)?.get("");
|
|
6109
6109
|
return _ && typeof _ == "object" && !Array.isArray(_) ? Object.values(_) : [];
|
|
6110
|
-
}, q =
|
|
6110
|
+
}, q = x(() => {
|
|
6111
6111
|
switch (y.value) {
|
|
6112
6112
|
case "doctypes":
|
|
6113
6113
|
return w();
|
|
6114
6114
|
case "records":
|
|
6115
|
-
return
|
|
6115
|
+
return N();
|
|
6116
6116
|
case "record":
|
|
6117
6117
|
return J();
|
|
6118
6118
|
default:
|
|
6119
6119
|
return [];
|
|
6120
6120
|
}
|
|
6121
|
-
}), Q = (
|
|
6121
|
+
}), Q = (d, _) => {
|
|
6122
6122
|
_ && _();
|
|
6123
|
-
}, Ot = async (
|
|
6124
|
-
const _ =
|
|
6123
|
+
}, Ot = async (d) => {
|
|
6124
|
+
const _ = d || p.value;
|
|
6125
6125
|
if (!_) return;
|
|
6126
6126
|
(r.confirmFn ? await r.confirmFn("Are you sure you want to delete this record?") : confirm("Are you sure you want to delete this record?")) && n("action", {
|
|
6127
6127
|
name: "DELETE",
|
|
@@ -6129,44 +6129,44 @@ const Pa = { class: "aform" }, qa = {
|
|
|
6129
6129
|
recordId: _,
|
|
6130
6130
|
data: u.value || {}
|
|
6131
6131
|
});
|
|
6132
|
-
}, ot = (
|
|
6133
|
-
const _ =
|
|
6132
|
+
}, ot = (d) => {
|
|
6133
|
+
const _ = d.querySelector("td[data-rowindex]");
|
|
6134
6134
|
if (!_) return null;
|
|
6135
6135
|
const g = _.getAttribute("data-rowindex");
|
|
6136
6136
|
if (g === null) return null;
|
|
6137
6137
|
const O = parseInt(g, 10);
|
|
6138
6138
|
if (isNaN(O)) return null;
|
|
6139
|
-
const
|
|
6140
|
-
if (!
|
|
6141
|
-
const
|
|
6142
|
-
return A
|
|
6143
|
-
}, m = async (
|
|
6144
|
-
const _ =
|
|
6145
|
-
_.getAttribute("data-action") === "create" && await
|
|
6139
|
+
const R = z()[O];
|
|
6140
|
+
if (!R) return null;
|
|
6141
|
+
const A = r.recordIdField || "id";
|
|
6142
|
+
return R[A] || R.id || null;
|
|
6143
|
+
}, m = async (d) => {
|
|
6144
|
+
const _ = d.target;
|
|
6145
|
+
_.getAttribute("data-action") === "create" && await S();
|
|
6146
6146
|
const O = _.closest("td, th");
|
|
6147
6147
|
if (O) {
|
|
6148
|
-
const
|
|
6149
|
-
if (
|
|
6150
|
-
const
|
|
6151
|
-
if (
|
|
6152
|
-
const
|
|
6153
|
-
|
|
6148
|
+
const b = O.textContent?.trim(), R = O.closest("tr");
|
|
6149
|
+
if (b === "View Records" && R) {
|
|
6150
|
+
const A = R.querySelectorAll("td");
|
|
6151
|
+
if (A.length > 0) {
|
|
6152
|
+
const $t = A[1].textContent?.trim();
|
|
6153
|
+
$t && await xt($t);
|
|
6154
6154
|
}
|
|
6155
|
-
} else if (
|
|
6156
|
-
const
|
|
6157
|
-
|
|
6158
|
-
} else if (
|
|
6159
|
-
const
|
|
6160
|
-
|
|
6155
|
+
} else if (b?.includes("Edit") && R) {
|
|
6156
|
+
const A = ot(R);
|
|
6157
|
+
A && await L(A);
|
|
6158
|
+
} else if (b?.includes("Delete") && R) {
|
|
6159
|
+
const A = ot(R);
|
|
6160
|
+
A && await Ot(A);
|
|
6161
6161
|
}
|
|
6162
6162
|
}
|
|
6163
|
-
},
|
|
6164
|
-
if (!(!i.value || !f.value ||
|
|
6163
|
+
}, E = async () => {
|
|
6164
|
+
if (!(!i.value || !f.value || v.value) && !i.value.getRecordById(f.value, p.value) && i.value.getClient()) {
|
|
6165
6165
|
s.value = !0;
|
|
6166
6166
|
try {
|
|
6167
6167
|
await i.value.getRecord(f.value, p.value);
|
|
6168
|
-
} catch (
|
|
6169
|
-
console.warn("Error fetching record:",
|
|
6168
|
+
} catch (d) {
|
|
6169
|
+
console.warn("Error fetching record:", d);
|
|
6170
6170
|
} finally {
|
|
6171
6171
|
s.value = !1;
|
|
6172
6172
|
}
|
|
@@ -6175,79 +6175,98 @@ const Pa = { class: "aform" }, qa = {
|
|
|
6175
6175
|
return rt(
|
|
6176
6176
|
[y, f, p],
|
|
6177
6177
|
() => {
|
|
6178
|
-
y.value === "records" && f.value ? n("load-records", { doctype: f.value }) : y.value === "record" && f.value && p.value && (n("load-record", { doctype: f.value, recordId: p.value }),
|
|
6178
|
+
y.value === "records" && f.value ? n("load-records", { doctype: f.value }) : y.value === "record" && f.value && p.value && (n("load-record", { doctype: f.value, recordId: p.value }), E());
|
|
6179
6179
|
},
|
|
6180
6180
|
{ immediate: !0 }
|
|
6181
|
-
),
|
|
6182
|
-
navigateToDoctype:
|
|
6183
|
-
openRecord:
|
|
6184
|
-
createNewRecord:
|
|
6181
|
+
), De("desktopMethods", {
|
|
6182
|
+
navigateToDoctype: xt,
|
|
6183
|
+
openRecord: L,
|
|
6184
|
+
createNewRecord: S,
|
|
6185
6185
|
handleDelete: Ot,
|
|
6186
6186
|
/**
|
|
6187
6187
|
* Convenience wrapper so child components (e.g. slot content) can emit
|
|
6188
6188
|
* an action event without needing a direct reference to the emit function.
|
|
6189
6189
|
*/
|
|
6190
|
-
emitAction: (
|
|
6190
|
+
emitAction: (d, _) => {
|
|
6191
6191
|
n("action", {
|
|
6192
|
-
name:
|
|
6192
|
+
name: d,
|
|
6193
6193
|
doctype: f.value,
|
|
6194
6194
|
recordId: p.value,
|
|
6195
6195
|
data: _ ?? u.value ?? {}
|
|
6196
6196
|
});
|
|
6197
6197
|
}
|
|
6198
|
-
}),
|
|
6199
|
-
|
|
6198
|
+
}), De("aformLinkNavigator", {
|
|
6199
|
+
navigate: (d, _) => {
|
|
6200
|
+
k({ view: "record", doctype: d, recordId: String(_) });
|
|
6201
|
+
}
|
|
6202
|
+
}), De("aformLinkResolver", async (d, _) => {
|
|
6203
|
+
if (i.value)
|
|
6204
|
+
try {
|
|
6205
|
+
const g = (A) => {
|
|
6206
|
+
if (!A) return;
|
|
6207
|
+
const kt = A.name ?? A.title ?? A.displayText;
|
|
6208
|
+
return typeof kt == "string" || typeof kt == "number" ? String(kt) : void 0;
|
|
6209
|
+
}, O = i.value.getRecordById(d, _)?.get(""), b = g(O);
|
|
6210
|
+
if (b != null) return b;
|
|
6211
|
+
await i.value.getRecord(d, _);
|
|
6212
|
+
const R = i.value.getRecordById(d, _)?.get("");
|
|
6213
|
+
return g(R);
|
|
6214
|
+
} catch {
|
|
6215
|
+
return;
|
|
6216
|
+
}
|
|
6217
|
+
}), yr(() => {
|
|
6218
|
+
const d = (_) => {
|
|
6200
6219
|
(_.ctrlKey || _.metaKey) && _.key === "k" && (_.preventDefault(), a.value = !0), _.key === "Escape" && a.value && (a.value = !1);
|
|
6201
6220
|
};
|
|
6202
|
-
return document.addEventListener("keydown",
|
|
6203
|
-
document.removeEventListener("keydown",
|
|
6221
|
+
return document.addEventListener("keydown", d), () => {
|
|
6222
|
+
document.removeEventListener("keydown", d);
|
|
6204
6223
|
};
|
|
6205
|
-
}), (
|
|
6224
|
+
}), (d, _) => (P(), F("div", {
|
|
6206
6225
|
class: "desktop",
|
|
6207
6226
|
onClick: m
|
|
6208
6227
|
}, [
|
|
6209
|
-
re(
|
|
6210
|
-
elements:
|
|
6228
|
+
re(Ro, {
|
|
6229
|
+
elements: j.value,
|
|
6211
6230
|
onActionClick: Q
|
|
6212
6231
|
}, null, 8, ["elements"]),
|
|
6213
|
-
q.value.length > 0 ? (P(),
|
|
6232
|
+
q.value.length > 0 ? (P(), ar(or(Va), {
|
|
6214
6233
|
key: 0,
|
|
6215
6234
|
data: u.value,
|
|
6216
6235
|
"onUpdate:data": _[0] || (_[0] = (g) => u.value = g),
|
|
6217
6236
|
schema: q.value
|
|
6218
|
-
}, null, 8, ["data", "schema"])) :
|
|
6219
|
-
T("p", null, "Loading " +
|
|
6220
|
-
])) : (P(),
|
|
6237
|
+
}, null, 8, ["data", "schema"])) : or(i) ? (P(), F("div", Ha, [
|
|
6238
|
+
T("p", null, "Loading " + Rt(y.value) + " data...", 1)
|
|
6239
|
+
])) : (P(), F("div", Ka, [..._[2] || (_[2] = [
|
|
6221
6240
|
T("p", null, "Initializing Stonecrop...", -1)
|
|
6222
6241
|
])])),
|
|
6223
6242
|
re(Oi, { breadcrumbs: tt.value }, null, 8, ["breadcrumbs"]),
|
|
6224
|
-
re(
|
|
6243
|
+
re(zo, {
|
|
6225
6244
|
"is-open": a.value,
|
|
6226
6245
|
search: ut,
|
|
6227
6246
|
placeholder: "Type a command or search...",
|
|
6228
|
-
onSelect:
|
|
6247
|
+
onSelect: Et,
|
|
6229
6248
|
onClose: _[1] || (_[1] = (g) => a.value = !1)
|
|
6230
6249
|
}, {
|
|
6231
|
-
title:
|
|
6232
|
-
|
|
6250
|
+
title: $e(({ result: g }) => [
|
|
6251
|
+
ur(Rt(g.title), 1)
|
|
6233
6252
|
]),
|
|
6234
|
-
content:
|
|
6235
|
-
|
|
6253
|
+
content: $e(({ result: g }) => [
|
|
6254
|
+
ur(Rt(g.description), 1)
|
|
6236
6255
|
]),
|
|
6237
6256
|
_: 1
|
|
6238
6257
|
}, 8, ["is-open"])
|
|
6239
6258
|
]));
|
|
6240
6259
|
}
|
|
6241
|
-
}),
|
|
6260
|
+
}), Qa = {
|
|
6242
6261
|
install: (t) => {
|
|
6243
|
-
t.component("ActionSet",
|
|
6262
|
+
t.component("ActionSet", Ro), t.component("CommandPalette", zo), t.component("Desktop", Ja), t.component("SheetNav", Oi);
|
|
6244
6263
|
}
|
|
6245
6264
|
};
|
|
6246
6265
|
export {
|
|
6247
|
-
|
|
6248
|
-
|
|
6249
|
-
|
|
6266
|
+
Ro as ActionSet,
|
|
6267
|
+
zo as CommandPalette,
|
|
6268
|
+
Ja as Desktop,
|
|
6250
6269
|
Oi as SheetNav,
|
|
6251
|
-
|
|
6270
|
+
Qa as StonecropDesktop
|
|
6252
6271
|
};
|
|
6253
6272
|
//# sourceMappingURL=desktop.js.map
|