instaui 0.1.9__py3-none-any.whl → 0.1.10__py3-none-any.whl
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.
- instaui/_helper/observable_helper.py +11 -1
- instaui/arco/components/select.py +4 -1
- instaui/components/echarts/echarts.js +7 -5
- instaui/components/echarts/echarts.py +1 -1
- instaui/components/element.py +12 -22
- instaui/components/grid.py +63 -11
- instaui/components/html/paragraph.py +10 -0
- instaui/components/label.py +5 -0
- instaui/event/js_event.py +24 -0
- instaui/event/vue_event.py +66 -0
- instaui/event/web_event.py +36 -25
- instaui/handlers/_utils.py +27 -5
- instaui/static/insta-ui.css +1 -1
- instaui/static/insta-ui.esm-browser.prod.js +943 -932
- instaui/static/insta-ui.js.map +1 -1
- instaui/systems/func_system.py +15 -0
- instaui/ui/__init__.py +5 -1
- instaui/ui/__init__.pyi +5 -1
- instaui/ui_functions/ui_page.py +3 -3
- instaui/vars/js_computed.py +25 -1
- instaui/vars/state.py +15 -0
- instaui/vars/web_computed.py +36 -0
- instaui/watch/js_watch.py +37 -1
- instaui/watch/web_watch.py +53 -0
- instaui-0.1.10.dist-info/METADATA +153 -0
- {instaui-0.1.9.dist-info → instaui-0.1.10.dist-info}/RECORD +28 -26
- instaui-0.1.9.dist-info/METADATA +0 -153
- {instaui-0.1.9.dist-info → instaui-0.1.10.dist-info}/WHEEL +0 -0
- {instaui-0.1.9.dist-info → instaui-0.1.10.dist-info}/licenses/LICENSE +0 -0
@@ -2,16 +2,16 @@ var Bn = Object.defineProperty;
|
|
2
2
|
var Ln = (e, t, n) => t in e ? Bn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
3
3
|
var B = (e, t, n) => Ln(e, typeof t != "symbol" ? t + "" : t, n);
|
4
4
|
import * as Wn from "vue";
|
5
|
-
import { unref as L, watch as G, nextTick as
|
5
|
+
import { customRef as Ae, toValue as q, unref as L, watch as G, nextTick as Ne, isRef as Kt, shallowRef as J, ref as Z, watchEffect as Gt, computed as W, readonly as Un, provide as Ve, inject as ee, shallowReactive as Kn, defineComponent as F, reactive as Gn, h as A, getCurrentInstance as qt, normalizeStyle as qn, normalizeClass as ze, toDisplayString as Ht, onUnmounted as je, Fragment as $e, vModelDynamic as Hn, vShow as zn, resolveDynamicComponent as ut, normalizeProps as Jn, withDirectives as Qn, onErrorCaptured as Yn, openBlock as de, createElementBlock as Pe, createElementVNode as Xn, createVNode as Zn, withCtx as er, renderList as tr, createBlock as nr, TransitionGroup as zt, KeepAlive as rr } from "vue";
|
6
6
|
let Jt;
|
7
7
|
function or(e) {
|
8
8
|
Jt = e;
|
9
9
|
}
|
10
|
-
function
|
10
|
+
function Je() {
|
11
11
|
return Jt;
|
12
12
|
}
|
13
13
|
function ye() {
|
14
|
-
const { queryPath: e, pathParams: t, queryParams: n } =
|
14
|
+
const { queryPath: e, pathParams: t, queryParams: n } = Je();
|
15
15
|
return {
|
16
16
|
path: e,
|
17
17
|
...t === void 0 ? {} : { params: t },
|
@@ -33,108 +33,206 @@ class sr extends Map {
|
|
33
33
|
function we(e) {
|
34
34
|
return new sr(e);
|
35
35
|
}
|
36
|
-
function
|
36
|
+
function Et(e, t) {
|
37
|
+
Object.entries(e).forEach(([n, r]) => t(r, n));
|
38
|
+
}
|
39
|
+
function Ee(e, t) {
|
40
|
+
return Qt(e, {
|
41
|
+
valueFn: t
|
42
|
+
});
|
43
|
+
}
|
44
|
+
function Qt(e, t) {
|
45
|
+
const { valueFn: n, keyFn: r } = t;
|
46
|
+
return Object.fromEntries(
|
47
|
+
Object.entries(e).map(([o, s], i) => [
|
48
|
+
r ? r(o, s) : o,
|
49
|
+
n(s, o, i)
|
50
|
+
])
|
51
|
+
);
|
52
|
+
}
|
53
|
+
function Yt(e, t, n) {
|
54
|
+
if (Array.isArray(t)) {
|
55
|
+
const [o, ...s] = t;
|
56
|
+
switch (o) {
|
57
|
+
case "!":
|
58
|
+
return !e;
|
59
|
+
case "+":
|
60
|
+
return e + s[0];
|
61
|
+
case "~+":
|
62
|
+
return s[0] + e;
|
63
|
+
}
|
64
|
+
}
|
65
|
+
const r = Xt(t, n);
|
66
|
+
return e[r];
|
67
|
+
}
|
68
|
+
function Xt(e, t) {
|
69
|
+
if (typeof e == "string" || typeof e == "number")
|
70
|
+
return e;
|
71
|
+
if (!Array.isArray(e))
|
72
|
+
throw new Error(`Invalid path ${e}`);
|
73
|
+
const [n, ...r] = e;
|
74
|
+
switch (n) {
|
75
|
+
case "bind":
|
76
|
+
if (!t)
|
77
|
+
throw new Error("No bindable function provided");
|
78
|
+
return t(r[0]);
|
79
|
+
default:
|
80
|
+
throw new Error(`Invalid flag ${n} in array at ${e}`);
|
81
|
+
}
|
82
|
+
}
|
83
|
+
function _e(e, t, n) {
|
84
|
+
return t.reduce(
|
85
|
+
(r, o) => Yt(r, o, n),
|
86
|
+
e
|
87
|
+
);
|
88
|
+
}
|
89
|
+
function Qe(e, t, n, r) {
|
90
|
+
t.reduce((o, s, i) => {
|
91
|
+
if (i === t.length - 1)
|
92
|
+
o[Xt(s, r)] = n;
|
93
|
+
else
|
94
|
+
return Yt(o, s, r);
|
95
|
+
}, e);
|
96
|
+
}
|
97
|
+
function Zt(e) {
|
98
|
+
return JSON.parse(JSON.stringify(e));
|
99
|
+
}
|
100
|
+
function _t(e, t, n) {
|
101
|
+
const { paths: r, getBindableValueFn: o } = t, { paths: s, getBindableValueFn: i } = t;
|
102
|
+
return r === void 0 || r.length === 0 ? e : Ae(() => ({
|
103
|
+
get() {
|
104
|
+
try {
|
105
|
+
return _e(
|
106
|
+
q(e),
|
107
|
+
r,
|
108
|
+
o
|
109
|
+
);
|
110
|
+
} catch {
|
111
|
+
return;
|
112
|
+
}
|
113
|
+
},
|
114
|
+
set(c) {
|
115
|
+
Qe(
|
116
|
+
q(e),
|
117
|
+
s || r,
|
118
|
+
c,
|
119
|
+
i
|
120
|
+
);
|
121
|
+
}
|
122
|
+
}));
|
123
|
+
}
|
124
|
+
function en(e) {
|
125
|
+
return Ae((t, n) => ({
|
126
|
+
get() {
|
127
|
+
return t(), e;
|
128
|
+
},
|
129
|
+
set(r) {
|
130
|
+
JSON.stringify(r) !== JSON.stringify(e) && (e = r, n());
|
131
|
+
}
|
132
|
+
}));
|
133
|
+
}
|
134
|
+
function he(e) {
|
37
135
|
return typeof e == "function" ? e() : L(e);
|
38
136
|
}
|
39
137
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
40
|
-
const
|
138
|
+
const Ye = () => {
|
41
139
|
};
|
42
|
-
function
|
140
|
+
function Xe(e, t = !1, n = "Timeout") {
|
43
141
|
return new Promise((r, o) => {
|
44
142
|
setTimeout(t ? () => o(n) : r, e);
|
45
143
|
});
|
46
144
|
}
|
47
|
-
function
|
48
|
-
function n(
|
145
|
+
function Ze(e, t = !1) {
|
146
|
+
function n(u, { flush: f = "sync", deep: h = !1, timeout: v, throwOnTimeout: p } = {}) {
|
49
147
|
let g = null;
|
50
|
-
const _ = [new Promise((
|
148
|
+
const _ = [new Promise((O) => {
|
51
149
|
g = G(
|
52
150
|
e,
|
53
151
|
(R) => {
|
54
|
-
|
152
|
+
u(R) !== t && (g ? g() : Ne(() => g == null ? void 0 : g()), O(R));
|
55
153
|
},
|
56
154
|
{
|
57
155
|
flush: f,
|
58
|
-
deep:
|
156
|
+
deep: h,
|
59
157
|
immediate: !0
|
60
158
|
}
|
61
159
|
);
|
62
160
|
})];
|
63
161
|
return v != null && _.push(
|
64
|
-
|
162
|
+
Xe(v, p).then(() => he(e)).finally(() => g == null ? void 0 : g())
|
65
163
|
), Promise.race(_);
|
66
164
|
}
|
67
|
-
function r(
|
68
|
-
if (!Kt(
|
69
|
-
return n((R) => R ===
|
70
|
-
const { flush:
|
71
|
-
let
|
72
|
-
const
|
73
|
-
|
74
|
-
[e,
|
165
|
+
function r(u, f) {
|
166
|
+
if (!Kt(u))
|
167
|
+
return n((R) => R === u, f);
|
168
|
+
const { flush: h = "sync", deep: v = !1, timeout: p, throwOnTimeout: g } = f ?? {};
|
169
|
+
let y = null;
|
170
|
+
const O = [new Promise((R) => {
|
171
|
+
y = G(
|
172
|
+
[e, u],
|
75
173
|
([D, C]) => {
|
76
|
-
t !== (D === C) && (
|
174
|
+
t !== (D === C) && (y ? y() : Ne(() => y == null ? void 0 : y()), R(D));
|
77
175
|
},
|
78
176
|
{
|
79
|
-
flush:
|
177
|
+
flush: h,
|
80
178
|
deep: v,
|
81
179
|
immediate: !0
|
82
180
|
}
|
83
181
|
);
|
84
182
|
})];
|
85
|
-
return p != null &&
|
86
|
-
|
87
|
-
), Promise.race(
|
183
|
+
return p != null && O.push(
|
184
|
+
Xe(p, g).then(() => he(e)).finally(() => (y == null || y(), he(e)))
|
185
|
+
), Promise.race(O);
|
88
186
|
}
|
89
|
-
function o(
|
90
|
-
return n((f) => !!f,
|
187
|
+
function o(u) {
|
188
|
+
return n((f) => !!f, u);
|
91
189
|
}
|
92
|
-
function s(
|
93
|
-
return r(null,
|
190
|
+
function s(u) {
|
191
|
+
return r(null, u);
|
94
192
|
}
|
95
|
-
function i(
|
96
|
-
return r(void 0,
|
193
|
+
function i(u) {
|
194
|
+
return r(void 0, u);
|
97
195
|
}
|
98
|
-
function u
|
99
|
-
return n(Number.isNaN,
|
196
|
+
function c(u) {
|
197
|
+
return n(Number.isNaN, u);
|
100
198
|
}
|
101
|
-
function l(
|
102
|
-
return n((
|
103
|
-
const v = Array.from(
|
104
|
-
return v.includes(
|
199
|
+
function l(u, f) {
|
200
|
+
return n((h) => {
|
201
|
+
const v = Array.from(h);
|
202
|
+
return v.includes(u) || v.includes(he(u));
|
105
203
|
}, f);
|
106
204
|
}
|
107
|
-
function
|
108
|
-
return a(1,
|
205
|
+
function d(u) {
|
206
|
+
return a(1, u);
|
109
207
|
}
|
110
|
-
function a(
|
111
|
-
let
|
112
|
-
return n(() => (
|
208
|
+
function a(u = 1, f) {
|
209
|
+
let h = -1;
|
210
|
+
return n(() => (h += 1, h >= u), f);
|
113
211
|
}
|
114
|
-
return Array.isArray(
|
212
|
+
return Array.isArray(he(e)) ? {
|
115
213
|
toMatch: n,
|
116
214
|
toContains: l,
|
117
|
-
changed:
|
215
|
+
changed: d,
|
118
216
|
changedTimes: a,
|
119
217
|
get not() {
|
120
|
-
return
|
218
|
+
return Ze(e, !t);
|
121
219
|
}
|
122
220
|
} : {
|
123
221
|
toMatch: n,
|
124
222
|
toBe: r,
|
125
223
|
toBeTruthy: o,
|
126
224
|
toBeNull: s,
|
127
|
-
toBeNaN:
|
225
|
+
toBeNaN: c,
|
128
226
|
toBeUndefined: i,
|
129
|
-
changed:
|
227
|
+
changed: d,
|
130
228
|
changedTimes: a,
|
131
229
|
get not() {
|
132
|
-
return
|
230
|
+
return Ze(e, !t);
|
133
231
|
}
|
134
232
|
};
|
135
233
|
}
|
136
234
|
function ir(e) {
|
137
|
-
return
|
235
|
+
return Ze(e);
|
138
236
|
}
|
139
237
|
function ar(e, t, n) {
|
140
238
|
let r;
|
@@ -145,50 +243,50 @@ function ar(e, t, n) {
|
|
145
243
|
lazy: o = !1,
|
146
244
|
evaluating: s = void 0,
|
147
245
|
shallow: i = !0,
|
148
|
-
onError:
|
149
|
-
} = r, l = Z(!o),
|
246
|
+
onError: c = Ye
|
247
|
+
} = r, l = Z(!o), d = i ? J(t) : Z(t);
|
150
248
|
let a = 0;
|
151
|
-
return Gt(async (
|
249
|
+
return Gt(async (u) => {
|
152
250
|
if (!l.value)
|
153
251
|
return;
|
154
252
|
a++;
|
155
253
|
const f = a;
|
156
|
-
let
|
254
|
+
let h = !1;
|
157
255
|
s && Promise.resolve().then(() => {
|
158
256
|
s.value = !0;
|
159
257
|
});
|
160
258
|
try {
|
161
259
|
const v = await e((p) => {
|
162
|
-
|
163
|
-
s && (s.value = !1),
|
260
|
+
u(() => {
|
261
|
+
s && (s.value = !1), h || p();
|
164
262
|
});
|
165
263
|
});
|
166
|
-
f === a && (
|
264
|
+
f === a && (d.value = v);
|
167
265
|
} catch (v) {
|
168
|
-
|
266
|
+
c(v);
|
169
267
|
} finally {
|
170
|
-
s && f === a && (s.value = !1),
|
268
|
+
s && f === a && (s.value = !1), h = !0;
|
171
269
|
}
|
172
|
-
}), o ? W(() => (l.value = !0,
|
270
|
+
}), o ? W(() => (l.value = !0, d.value)) : d;
|
173
271
|
}
|
174
272
|
function cr(e, t, n) {
|
175
273
|
const {
|
176
274
|
immediate: r = !0,
|
177
275
|
delay: o = 0,
|
178
|
-
onError: s =
|
179
|
-
onSuccess: i =
|
180
|
-
resetOnExecute:
|
276
|
+
onError: s = Ye,
|
277
|
+
onSuccess: i = Ye,
|
278
|
+
resetOnExecute: c = !0,
|
181
279
|
shallow: l = !0,
|
182
|
-
throwError:
|
183
|
-
} = {}, a = l ?
|
184
|
-
async function v(
|
185
|
-
|
186
|
-
const
|
280
|
+
throwError: d
|
281
|
+
} = {}, a = l ? J(t) : Z(t), u = Z(!1), f = Z(!1), h = J(void 0);
|
282
|
+
async function v(y = 0, ..._) {
|
283
|
+
c && (a.value = t), h.value = void 0, u.value = !1, f.value = !0, y > 0 && await Xe(y);
|
284
|
+
const O = typeof e == "function" ? e(..._) : e;
|
187
285
|
try {
|
188
|
-
const R = await
|
189
|
-
a.value = R,
|
286
|
+
const R = await O;
|
287
|
+
a.value = R, u.value = !0, i(R);
|
190
288
|
} catch (R) {
|
191
|
-
if (
|
289
|
+
if (h.value = R, s(R), d)
|
192
290
|
throw R;
|
193
291
|
} finally {
|
194
292
|
f.value = !1;
|
@@ -198,24 +296,24 @@ function cr(e, t, n) {
|
|
198
296
|
r && v(o);
|
199
297
|
const p = {
|
200
298
|
state: a,
|
201
|
-
isReady:
|
299
|
+
isReady: u,
|
202
300
|
isLoading: f,
|
203
|
-
error:
|
301
|
+
error: h,
|
204
302
|
execute: v
|
205
303
|
};
|
206
304
|
function g() {
|
207
|
-
return new Promise((
|
208
|
-
ir(f).toBe(!1).then(() =>
|
305
|
+
return new Promise((y, _) => {
|
306
|
+
ir(f).toBe(!1).then(() => y(p)).catch(_);
|
209
307
|
});
|
210
308
|
}
|
211
309
|
return {
|
212
310
|
...p,
|
213
|
-
then(
|
214
|
-
return g().then(
|
311
|
+
then(y, _) {
|
312
|
+
return g().then(y, _);
|
215
313
|
}
|
216
314
|
};
|
217
315
|
}
|
218
|
-
function
|
316
|
+
function U(e, t) {
|
219
317
|
t = t || {};
|
220
318
|
const n = [...Object.keys(t), "__Vue"], r = [...Object.values(t), Wn];
|
221
319
|
try {
|
@@ -228,63 +326,64 @@ function ur(e) {
|
|
228
326
|
if (e.startsWith(":")) {
|
229
327
|
e = e.slice(1);
|
230
328
|
try {
|
231
|
-
return
|
329
|
+
return U(e);
|
232
330
|
} catch (t) {
|
233
331
|
throw new Error(t + " in function code: " + e);
|
234
332
|
}
|
235
333
|
}
|
236
334
|
}
|
237
|
-
function
|
335
|
+
function tn(e) {
|
238
336
|
return e.constructor.name === "AsyncFunction";
|
239
337
|
}
|
240
338
|
function lr(e, t) {
|
241
339
|
return Z(e.value);
|
242
340
|
}
|
243
341
|
function fr(e, t, n) {
|
244
|
-
const { bind: r = {}, code: o, const: s = [] } = e, i = Object.values(r).map((a,
|
245
|
-
if (
|
342
|
+
const { bind: r = {}, code: o, const: s = [] } = e, i = Object.values(r).map((a, u) => s[u] === 1 ? a : t.getVueRefObjectOrValue(a));
|
343
|
+
if (tn(new Function(o)))
|
246
344
|
return ar(
|
247
345
|
async () => {
|
248
346
|
const a = Object.fromEntries(
|
249
|
-
Object.keys(r).map((
|
347
|
+
Object.keys(r).map((u, f) => [u, i[f]])
|
250
348
|
);
|
251
|
-
return await
|
349
|
+
return await U(o, a)();
|
252
350
|
},
|
253
351
|
null,
|
254
352
|
{ lazy: !0 }
|
255
353
|
);
|
256
|
-
const
|
257
|
-
Object.keys(r).map((a,
|
258
|
-
), l =
|
354
|
+
const c = Object.fromEntries(
|
355
|
+
Object.keys(r).map((a, u) => [a, i[u]])
|
356
|
+
), l = U(o, c);
|
259
357
|
return W(l);
|
260
358
|
}
|
261
|
-
function
|
359
|
+
function dr(e, t, n) {
|
262
360
|
const {
|
263
361
|
inputs: r = [],
|
264
362
|
code: o,
|
265
363
|
slient: s,
|
266
364
|
data: i,
|
267
|
-
asyncInit:
|
268
|
-
|
269
|
-
|
365
|
+
asyncInit: c = null,
|
366
|
+
deepEqOnInput: l = 0
|
367
|
+
} = e, d = s || Array(r.length).fill(0), a = i || Array(r.length).fill(0), u = r.filter((g, y) => d[y] === 0 && a[y] === 0).map((g) => t.getVueRefObject(g));
|
368
|
+
function f() {
|
270
369
|
return r.map(
|
271
|
-
(
|
370
|
+
(g, y) => a[y] === 1 ? g : t.getObjectToValue(g)
|
272
371
|
);
|
273
372
|
}
|
274
|
-
const
|
275
|
-
return
|
276
|
-
|
373
|
+
const h = U(o), v = l === 0 ? J(null) : en(null), p = { immediate: !0, deep: !0 };
|
374
|
+
return tn(h) ? (v.value = c, G(
|
375
|
+
u,
|
277
376
|
async () => {
|
278
|
-
|
377
|
+
v.value = await h(...f());
|
279
378
|
},
|
280
|
-
|
379
|
+
p
|
281
380
|
)) : G(
|
282
|
-
|
381
|
+
u,
|
283
382
|
() => {
|
284
|
-
|
383
|
+
v.value = h(...f());
|
285
384
|
},
|
286
|
-
|
287
|
-
), Un(
|
385
|
+
p
|
386
|
+
), Un(v);
|
288
387
|
}
|
289
388
|
var N;
|
290
389
|
((e) => {
|
@@ -312,38 +411,31 @@ var N;
|
|
312
411
|
return f.type === "vf";
|
313
412
|
}
|
314
413
|
e.isVForItem = i;
|
315
|
-
function
|
414
|
+
function c(f) {
|
316
415
|
return f.type === "vf-i";
|
317
416
|
}
|
318
|
-
e.isVForIndex =
|
417
|
+
e.isVForIndex = c;
|
319
418
|
function l(f) {
|
320
419
|
return f.type === "sp";
|
321
420
|
}
|
322
421
|
e.isSlotProp = l;
|
323
|
-
function
|
422
|
+
function d(f) {
|
324
423
|
return f.type === "event";
|
325
424
|
}
|
326
|
-
e.isEventContext =
|
425
|
+
e.isEventContext = d;
|
327
426
|
function a(f) {
|
328
427
|
return f.type === "ele_ref";
|
329
428
|
}
|
330
429
|
e.isElementRef = a;
|
331
|
-
function
|
430
|
+
function u(f) {
|
332
431
|
return f.type !== void 0;
|
333
432
|
}
|
334
|
-
e.IsBinding =
|
433
|
+
e.IsBinding = u;
|
335
434
|
})(N || (N = {}));
|
336
|
-
|
337
|
-
((e) => {
|
338
|
-
function t(n) {
|
339
|
-
return n.type === "web";
|
340
|
-
}
|
341
|
-
e.isWebEventHandler = t;
|
342
|
-
})(Ze || (Ze = {}));
|
343
|
-
class dr {
|
435
|
+
class hr {
|
344
436
|
async eventSend(t, n) {
|
345
|
-
const { fType: r, hKey: o, key: s } = t, i =
|
346
|
-
let
|
437
|
+
const { fType: r, hKey: o, key: s } = t, i = Je().webServerInfo, c = s !== void 0 ? { key: s } : {}, l = r === "sync" ? i.event_url : i.event_async_url;
|
438
|
+
let d = {};
|
347
439
|
const a = await fetch(l, {
|
348
440
|
method: "POST",
|
349
441
|
headers: {
|
@@ -352,9 +444,9 @@ class dr {
|
|
352
444
|
body: JSON.stringify({
|
353
445
|
bind: n,
|
354
446
|
hKey: o,
|
355
|
-
...
|
447
|
+
...c,
|
356
448
|
page: ye(),
|
357
|
-
...
|
449
|
+
...d
|
358
450
|
})
|
359
451
|
});
|
360
452
|
if (!a.ok)
|
@@ -362,12 +454,9 @@ class dr {
|
|
362
454
|
return await a.json();
|
363
455
|
}
|
364
456
|
async watchSend(t) {
|
365
|
-
const { outputs: n, fType: r, key: o } = t.watchConfig
|
366
|
-
if (!n)
|
367
|
-
return null;
|
368
|
-
const s = Qe().webServerInfo, i = r === "sync" ? s.watch_url : s.watch_async_url, u = t.getServerInputs(), l = {
|
457
|
+
const { outputs: n, fType: r, key: o } = t.watchConfig, s = Je().webServerInfo, i = r === "sync" ? s.watch_url : s.watch_async_url, c = t.getServerInputs(), l = {
|
369
458
|
key: o,
|
370
|
-
input:
|
459
|
+
input: c,
|
371
460
|
page: ye()
|
372
461
|
};
|
373
462
|
return await (await fetch(i, {
|
@@ -382,22 +471,19 @@ class dr {
|
|
382
471
|
class pr {
|
383
472
|
async eventSend(t, n) {
|
384
473
|
const { fType: r, hKey: o, key: s } = t, i = s !== void 0 ? { key: s } : {};
|
385
|
-
let
|
474
|
+
let c = {};
|
386
475
|
const l = {
|
387
476
|
bind: n,
|
388
477
|
fType: r,
|
389
478
|
hKey: o,
|
390
479
|
...i,
|
391
480
|
page: ye(),
|
392
|
-
...
|
481
|
+
...c
|
393
482
|
};
|
394
483
|
return await window.pywebview.api.event_call(l);
|
395
484
|
}
|
396
485
|
async watchSend(t) {
|
397
|
-
const { outputs: n, fType: r, key: o } = t.watchConfig
|
398
|
-
if (!n)
|
399
|
-
return null;
|
400
|
-
const s = t.getServerInputs(), i = {
|
486
|
+
const { outputs: n, fType: r, key: o } = t.watchConfig, s = t.getServerInputs(), i = {
|
401
487
|
key: o,
|
402
488
|
input: s,
|
403
489
|
fType: r,
|
@@ -410,14 +496,14 @@ let et;
|
|
410
496
|
function mr(e) {
|
411
497
|
switch (e.mode) {
|
412
498
|
case "web":
|
413
|
-
et = new
|
499
|
+
et = new hr();
|
414
500
|
break;
|
415
501
|
case "webview":
|
416
502
|
et = new pr();
|
417
503
|
break;
|
418
504
|
}
|
419
505
|
}
|
420
|
-
function
|
506
|
+
function nn() {
|
421
507
|
return et;
|
422
508
|
}
|
423
509
|
class gr {
|
@@ -425,9 +511,9 @@ class gr {
|
|
425
511
|
return "";
|
426
512
|
}
|
427
513
|
}
|
428
|
-
const
|
514
|
+
const tt = new gr();
|
429
515
|
function vr(e) {
|
430
|
-
return e ===
|
516
|
+
return e === tt;
|
431
517
|
}
|
432
518
|
function yr(e, t, n) {
|
433
519
|
return new wr(e, t, n);
|
@@ -440,47 +526,47 @@ class wr {
|
|
440
526
|
this.snapshots = r;
|
441
527
|
const o = [], s = (i) => {
|
442
528
|
var l;
|
443
|
-
const
|
444
|
-
return this.id2TaskMap.set(
|
445
|
-
var f,
|
446
|
-
if (((f = i.data) == null ? void 0 : f[a]) === 0 && ((
|
447
|
-
const v = `${
|
448
|
-
this.input2TaskIdMap.getOrDefault(v).push(
|
529
|
+
const c = new Er(i, r);
|
530
|
+
return this.id2TaskMap.set(c.id, c), (l = i.inputs) == null || l.forEach((d, a) => {
|
531
|
+
var f, h;
|
532
|
+
if (((f = i.data) == null ? void 0 : f[a]) === 0 && ((h = i.slient) == null ? void 0 : h[a]) === 0) {
|
533
|
+
const v = `${d.sid}-${d.id}`;
|
534
|
+
this.input2TaskIdMap.getOrDefault(v).push(c.id);
|
449
535
|
}
|
450
|
-
}),
|
536
|
+
}), c;
|
451
537
|
};
|
452
538
|
t == null || t.forEach((i) => {
|
453
|
-
const
|
454
|
-
o.push(
|
539
|
+
const c = s(i);
|
540
|
+
o.push(c);
|
455
541
|
}), n == null || n.forEach((i) => {
|
456
|
-
const
|
542
|
+
const c = {
|
457
543
|
type: "var",
|
458
544
|
sid: i.sid,
|
459
545
|
id: i.id
|
460
546
|
}, l = {
|
461
547
|
...i,
|
462
548
|
immediate: !0,
|
463
|
-
outputs: [
|
464
|
-
},
|
465
|
-
o.push(
|
549
|
+
outputs: [c, ...i.outputs || []]
|
550
|
+
}, d = s(l);
|
551
|
+
o.push(d);
|
466
552
|
}), o.forEach((i) => {
|
467
553
|
const {
|
468
|
-
deep:
|
554
|
+
deep: c = !0,
|
469
555
|
once: l,
|
470
|
-
flush:
|
556
|
+
flush: d,
|
471
557
|
immediate: a = !0
|
472
|
-
} = i.watchConfig,
|
558
|
+
} = i.watchConfig, u = {
|
473
559
|
immediate: a,
|
474
|
-
deep:
|
560
|
+
deep: c,
|
475
561
|
once: l,
|
476
|
-
flush:
|
562
|
+
flush: d
|
477
563
|
}, f = this._getWatchTargets(i);
|
478
564
|
G(
|
479
565
|
f,
|
480
|
-
(
|
481
|
-
|
566
|
+
(h) => {
|
567
|
+
h.some(vr) || (i.modify = !0, this.taskQueue.push(new _r(i)), this._scheduleNextTick());
|
482
568
|
},
|
483
|
-
|
569
|
+
u
|
484
570
|
);
|
485
571
|
});
|
486
572
|
}
|
@@ -493,7 +579,7 @@ class wr {
|
|
493
579
|
).map((s) => this.snapshots.getVueRefObjectOrValue(s));
|
494
580
|
}
|
495
581
|
_scheduleNextTick() {
|
496
|
-
|
582
|
+
Ne(() => this._runAllTasks());
|
497
583
|
}
|
498
584
|
_runAllTasks() {
|
499
585
|
const t = this.taskQueue.slice();
|
@@ -629,36 +715,36 @@ class _r {
|
|
629
715
|
if (this.watchTask.modify) {
|
630
716
|
this.watchTask.modify = !1, this.watchTask.setRunning();
|
631
717
|
try {
|
632
|
-
await
|
718
|
+
await Or(this.watchTask);
|
633
719
|
} finally {
|
634
720
|
this.watchTask.taskDone();
|
635
721
|
}
|
636
722
|
}
|
637
723
|
}
|
638
724
|
}
|
639
|
-
async function
|
640
|
-
const { snapshot: t } = e, { outputs: n } = e.watchConfig, r = await
|
725
|
+
async function Or(e) {
|
726
|
+
const { snapshot: t } = e, { outputs: n } = e.watchConfig, r = await nn().watchSend(e);
|
641
727
|
r && t.updateOutputsRefFromServer(r, n);
|
642
728
|
}
|
643
|
-
function
|
729
|
+
function br() {
|
644
730
|
return [];
|
645
731
|
}
|
646
|
-
const
|
647
|
-
function
|
648
|
-
var s, i,
|
649
|
-
const n =
|
732
|
+
const Oe = we(br);
|
733
|
+
function rn(e, t) {
|
734
|
+
var s, i, c, l, d;
|
735
|
+
const n = Oe.getOrDefault(e.id), r = /* @__PURE__ */ new Map();
|
650
736
|
n.push(r), t.replaceSnapshot({
|
651
|
-
scopeSnapshot:
|
737
|
+
scopeSnapshot: on()
|
652
738
|
});
|
653
|
-
const o = (a,
|
654
|
-
r.set(a.id,
|
739
|
+
const o = (a, u) => {
|
740
|
+
r.set(a.id, u);
|
655
741
|
};
|
656
742
|
return (s = e.refs) == null || s.forEach((a) => {
|
657
743
|
o(a, lr(a));
|
658
744
|
}), (i = e.web_computed) == null || i.forEach((a) => {
|
659
|
-
const { init:
|
660
|
-
o(a,
|
661
|
-
}), (
|
745
|
+
const { init: u } = a, f = a.deepEqOnInput === void 0 ? J(u ?? tt) : en(u ?? tt);
|
746
|
+
o(a, f);
|
747
|
+
}), (c = e.vue_computed) == null || c.forEach((a) => {
|
662
748
|
o(
|
663
749
|
a,
|
664
750
|
fr(a, t)
|
@@ -666,29 +752,29 @@ function en(e, t) {
|
|
666
752
|
}), (l = e.js_computed) == null || l.forEach((a) => {
|
667
753
|
o(
|
668
754
|
a,
|
669
|
-
|
755
|
+
dr(a, t)
|
670
756
|
);
|
671
|
-
}), (
|
757
|
+
}), (d = e.data) == null || d.forEach((a) => {
|
672
758
|
o(a, a.value);
|
673
759
|
}), n.length - 1;
|
674
760
|
}
|
675
|
-
function
|
761
|
+
function on() {
|
676
762
|
const e = /* @__PURE__ */ new Map();
|
677
|
-
for (const [n, r] of
|
763
|
+
for (const [n, r] of Oe) {
|
678
764
|
const o = r[r.length - 1];
|
679
765
|
e.set(n, [o]);
|
680
766
|
}
|
681
767
|
function t(n) {
|
682
|
-
return
|
768
|
+
return sn(n, e);
|
683
769
|
}
|
684
770
|
return {
|
685
771
|
getVueRef: t
|
686
772
|
};
|
687
773
|
}
|
688
774
|
function Sr(e) {
|
689
|
-
return
|
775
|
+
return sn(e, Oe);
|
690
776
|
}
|
691
|
-
function
|
777
|
+
function sn(e, t) {
|
692
778
|
const n = t.get(e.sid);
|
693
779
|
if (!n)
|
694
780
|
throw new Error(`Scope ${e.sid} not found`);
|
@@ -698,48 +784,53 @@ function nn(e, t) {
|
|
698
784
|
return o;
|
699
785
|
}
|
700
786
|
function Rr(e) {
|
701
|
-
|
787
|
+
Oe.delete(e);
|
702
788
|
}
|
703
|
-
function
|
704
|
-
const n =
|
789
|
+
function an(e, t) {
|
790
|
+
const n = Oe.get(e);
|
705
791
|
n && n.splice(t, 1);
|
706
792
|
}
|
707
|
-
const
|
793
|
+
const lt = we(() => []);
|
708
794
|
function Pr(e) {
|
709
|
-
|
710
|
-
|
795
|
+
var r;
|
796
|
+
const t = /* @__PURE__ */ new Map(), n = lt.getOrDefault(e.id).push(t);
|
797
|
+
return (r = e.eRefs) == null || r.forEach((o) => {
|
798
|
+
const s = J();
|
799
|
+
t.set(o.id, s);
|
800
|
+
}), n;
|
711
801
|
}
|
712
|
-
function kr(e) {
|
713
|
-
|
802
|
+
function kr(e, t) {
|
803
|
+
const n = lt.get(e);
|
804
|
+
n && n.splice(t, 1);
|
714
805
|
}
|
715
|
-
function
|
806
|
+
function cn() {
|
716
807
|
const e = new Map(
|
717
|
-
Array.from(
|
808
|
+
Array.from(lt.entries()).map(([n, r]) => [
|
718
809
|
n,
|
719
810
|
r[r.length - 1]
|
720
811
|
])
|
721
812
|
);
|
722
813
|
function t(n) {
|
723
|
-
return e.get(n.sid);
|
814
|
+
return e.get(n.sid).get(n.id);
|
724
815
|
}
|
725
816
|
return {
|
726
817
|
getRef: t
|
727
818
|
};
|
728
819
|
}
|
729
|
-
const
|
820
|
+
const Ce = we(() => []);
|
730
821
|
function Vr(e) {
|
731
|
-
const t =
|
732
|
-
return t.push(
|
822
|
+
const t = Ce.getOrDefault(e);
|
823
|
+
return t.push(J({})), t.length - 1;
|
733
824
|
}
|
734
825
|
function Nr(e, t, n) {
|
735
|
-
|
826
|
+
Ce.get(e)[t].value = n;
|
736
827
|
}
|
737
828
|
function Ir(e) {
|
738
|
-
|
829
|
+
Ce.delete(e);
|
739
830
|
}
|
740
831
|
function Tr() {
|
741
832
|
const e = /* @__PURE__ */ new Map();
|
742
|
-
for (const [n, r] of
|
833
|
+
for (const [n, r] of Ce) {
|
743
834
|
const o = r[r.length - 1];
|
744
835
|
e.set(n, o);
|
745
836
|
}
|
@@ -750,82 +841,21 @@ function Tr() {
|
|
750
841
|
getPropsValue: t
|
751
842
|
};
|
752
843
|
}
|
753
|
-
function Et(e, t) {
|
754
|
-
Object.entries(e).forEach(([n, r]) => t(r, n));
|
755
|
-
}
|
756
|
-
function Ce(e, t) {
|
757
|
-
return sn(e, {
|
758
|
-
valueFn: t
|
759
|
-
});
|
760
|
-
}
|
761
|
-
function sn(e, t) {
|
762
|
-
const { valueFn: n, keyFn: r } = t;
|
763
|
-
return Object.fromEntries(
|
764
|
-
Object.entries(e).map(([o, s], i) => [
|
765
|
-
r ? r(o, s) : o,
|
766
|
-
n(s, o, i)
|
767
|
-
])
|
768
|
-
);
|
769
|
-
}
|
770
|
-
function an(e, t, n) {
|
771
|
-
if (Array.isArray(t)) {
|
772
|
-
const [o, ...s] = t;
|
773
|
-
switch (o) {
|
774
|
-
case "!":
|
775
|
-
return !e;
|
776
|
-
case "+":
|
777
|
-
return e + s[0];
|
778
|
-
case "~+":
|
779
|
-
return s[0] + e;
|
780
|
-
}
|
781
|
-
}
|
782
|
-
const r = cn(t, n);
|
783
|
-
return e[r];
|
784
|
-
}
|
785
|
-
function cn(e, t) {
|
786
|
-
if (typeof e == "string" || typeof e == "number")
|
787
|
-
return e;
|
788
|
-
if (!Array.isArray(e))
|
789
|
-
throw new Error(`Invalid path ${e}`);
|
790
|
-
const [n, ...r] = e;
|
791
|
-
switch (n) {
|
792
|
-
case "bind":
|
793
|
-
if (!t)
|
794
|
-
throw new Error("No bindable function provided");
|
795
|
-
return t(r[0]);
|
796
|
-
default:
|
797
|
-
throw new Error(`Invalid flag ${n} in array at ${e}`);
|
798
|
-
}
|
799
|
-
}
|
800
|
-
function _e(e, t, n) {
|
801
|
-
return t.reduce(
|
802
|
-
(r, o) => an(r, o, n),
|
803
|
-
e
|
804
|
-
);
|
805
|
-
}
|
806
|
-
function tt(e, t, n, r) {
|
807
|
-
t.reduce((o, s, i) => {
|
808
|
-
if (i === t.length - 1)
|
809
|
-
o[cn(s, r)] = n;
|
810
|
-
else
|
811
|
-
return an(o, s, r);
|
812
|
-
}, e);
|
813
|
-
}
|
814
844
|
const un = /* @__PURE__ */ new Map(), ft = we(() => /* @__PURE__ */ new Map()), ln = /* @__PURE__ */ new Set(), fn = Symbol("vfor");
|
815
845
|
function Ar(e) {
|
816
|
-
const t =
|
817
|
-
|
846
|
+
const t = dn() ?? {};
|
847
|
+
Ve(fn, { ...t, [e.fid]: e.key });
|
818
848
|
}
|
819
|
-
function
|
849
|
+
function dn() {
|
820
850
|
return ee(fn, void 0);
|
821
851
|
}
|
822
|
-
function
|
823
|
-
const e =
|
852
|
+
function jr() {
|
853
|
+
const e = dn(), t = /* @__PURE__ */ new Map();
|
824
854
|
return e === void 0 || Object.keys(e).forEach((n) => {
|
825
855
|
t.set(n, e[n]);
|
826
856
|
}), t;
|
827
857
|
}
|
828
|
-
function
|
858
|
+
function $r(e, t, n, r) {
|
829
859
|
if (r) {
|
830
860
|
ln.add(e);
|
831
861
|
return;
|
@@ -834,7 +864,7 @@ function jr(e, t, n, r) {
|
|
834
864
|
if (n)
|
835
865
|
o = new Lr(t);
|
836
866
|
else {
|
837
|
-
const s = Array.isArray(t) ? t : Object.entries(t).map(([i,
|
867
|
+
const s = Array.isArray(t) ? t : Object.entries(t).map(([i, c], l) => [c, i, l]);
|
838
868
|
o = new Br(s);
|
839
869
|
}
|
840
870
|
un.set(e, o);
|
@@ -860,7 +890,7 @@ function xr(e) {
|
|
860
890
|
};
|
861
891
|
}
|
862
892
|
function Dr(e) {
|
863
|
-
const t = e, n =
|
893
|
+
const t = e, n = jr();
|
864
894
|
function r(o) {
|
865
895
|
const s = n.get(o) ?? t;
|
866
896
|
return ft.get(o).get(s).value;
|
@@ -881,7 +911,7 @@ class Br {
|
|
881
911
|
}
|
882
912
|
createRefObjectWithPaths(t) {
|
883
913
|
const { binding: n } = t, { snapshot: r } = t, { path: o = [] } = n, s = [...o], i = r.getVForIndex(n.fid);
|
884
|
-
return s.unshift(i),
|
914
|
+
return s.unshift(i), Ae(() => ({
|
885
915
|
get: () => _e(
|
886
916
|
this.array,
|
887
917
|
s,
|
@@ -900,23 +930,23 @@ class Lr {
|
|
900
930
|
}
|
901
931
|
isDictSource(t) {
|
902
932
|
if (this._isDictSource === void 0) {
|
903
|
-
const n =
|
933
|
+
const n = q(t);
|
904
934
|
this._isDictSource = n !== null && !Array.isArray(n);
|
905
935
|
}
|
906
936
|
return this._isDictSource;
|
907
937
|
}
|
908
938
|
createRefObjectWithPaths(t) {
|
909
|
-
const { binding: n } = t, { path: r = [] } = n, o = [...r], { snapshot: s } = t, i = s.getVueRefObject(this.binding),
|
910
|
-
return o.unshift(l, ...
|
939
|
+
const { binding: n } = t, { path: r = [] } = n, o = [...r], { snapshot: s } = t, i = s.getVueRefObject(this.binding), c = this.isDictSource(i), l = s.getVForIndex(n.fid), d = c && o.length === 0 ? [0] : [];
|
940
|
+
return o.unshift(l, ...d), Ae(() => ({
|
911
941
|
get: () => {
|
912
|
-
const a =
|
913
|
-
|
942
|
+
const a = q(i), u = c ? Object.entries(a).map(([f, h], v) => [
|
943
|
+
h,
|
914
944
|
f,
|
915
945
|
v
|
916
946
|
]) : a;
|
917
947
|
try {
|
918
948
|
return _e(
|
919
|
-
|
949
|
+
q(u),
|
920
950
|
o,
|
921
951
|
s.getObjectToValue
|
922
952
|
);
|
@@ -925,22 +955,22 @@ class Lr {
|
|
925
955
|
}
|
926
956
|
},
|
927
957
|
set: (a) => {
|
928
|
-
const
|
929
|
-
if (
|
930
|
-
const f = Object.keys(
|
958
|
+
const u = q(i);
|
959
|
+
if (c) {
|
960
|
+
const f = Object.keys(u);
|
931
961
|
if (l >= f.length)
|
932
962
|
throw new Error("Cannot set value to a non-existent key");
|
933
|
-
const
|
934
|
-
|
935
|
-
|
936
|
-
[
|
963
|
+
const h = f[l];
|
964
|
+
Qe(
|
965
|
+
u,
|
966
|
+
[h],
|
937
967
|
a,
|
938
968
|
s.getObjectToValue
|
939
969
|
);
|
940
970
|
return;
|
941
971
|
}
|
942
|
-
|
943
|
-
|
972
|
+
Qe(
|
973
|
+
u,
|
944
974
|
o,
|
945
975
|
a,
|
946
976
|
s.getObjectToValue
|
@@ -950,64 +980,40 @@ class Lr {
|
|
950
980
|
}
|
951
981
|
}
|
952
982
|
function Wr(e, t, n = !1) {
|
953
|
-
return n && (e = `$computed(${e})`, t = { ...t, $computed: W }),
|
954
|
-
}
|
955
|
-
function _t(e, t, n) {
|
956
|
-
const { paths: r, getBindableValueFn: o } = t, { paths: s, getBindableValueFn: i } = t;
|
957
|
-
return r === void 0 || r.length === 0 ? e : ut(() => ({
|
958
|
-
get() {
|
959
|
-
try {
|
960
|
-
return _e(
|
961
|
-
H(e),
|
962
|
-
r,
|
963
|
-
o
|
964
|
-
);
|
965
|
-
} catch {
|
966
|
-
return;
|
967
|
-
}
|
968
|
-
},
|
969
|
-
set(u) {
|
970
|
-
tt(
|
971
|
-
H(e),
|
972
|
-
s || r,
|
973
|
-
u,
|
974
|
-
i
|
975
|
-
);
|
976
|
-
}
|
977
|
-
}));
|
983
|
+
return n && (e = `$computed(${e})`, t = { ...t, $computed: W }), U(e, t);
|
978
984
|
}
|
979
|
-
function
|
985
|
+
function Ot(e) {
|
980
986
|
return e == null;
|
981
987
|
}
|
982
988
|
function Ur() {
|
983
|
-
return
|
989
|
+
return hn().__VUE_DEVTOOLS_GLOBAL_HOOK__;
|
984
990
|
}
|
985
|
-
function
|
991
|
+
function hn() {
|
986
992
|
return typeof navigator < "u" && typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : {};
|
987
993
|
}
|
988
|
-
const Kr = typeof Proxy == "function", Gr = "devtools-plugin:setup",
|
994
|
+
const Kr = typeof Proxy == "function", Gr = "devtools-plugin:setup", qr = "plugin:settings:set";
|
989
995
|
let ie, nt;
|
990
|
-
function
|
996
|
+
function Hr() {
|
991
997
|
var e;
|
992
998
|
return ie !== void 0 || (typeof window < "u" && window.performance ? (ie = !0, nt = window.performance) : typeof globalThis < "u" && (!((e = globalThis.perf_hooks) === null || e === void 0) && e.performance) ? (ie = !0, nt = globalThis.perf_hooks.performance) : ie = !1), ie;
|
993
999
|
}
|
994
1000
|
function zr() {
|
995
|
-
return
|
1001
|
+
return Hr() ? nt.now() : Date.now();
|
996
1002
|
}
|
997
|
-
class
|
1003
|
+
class Jr {
|
998
1004
|
constructor(t, n) {
|
999
1005
|
this.target = null, this.targetQueue = [], this.onQueue = [], this.plugin = t, this.hook = n;
|
1000
1006
|
const r = {};
|
1001
1007
|
if (t.settings)
|
1002
1008
|
for (const i in t.settings) {
|
1003
|
-
const
|
1004
|
-
r[i] =
|
1009
|
+
const c = t.settings[i];
|
1010
|
+
r[i] = c.defaultValue;
|
1005
1011
|
}
|
1006
1012
|
const o = `__vue-devtools-plugin-settings__${t.id}`;
|
1007
1013
|
let s = Object.assign({}, r);
|
1008
1014
|
try {
|
1009
|
-
const i = localStorage.getItem(o),
|
1010
|
-
Object.assign(s,
|
1015
|
+
const i = localStorage.getItem(o), c = JSON.parse(i);
|
1016
|
+
Object.assign(s, c);
|
1011
1017
|
} catch {
|
1012
1018
|
}
|
1013
1019
|
this.fallbacks = {
|
@@ -1024,26 +1030,26 @@ class Qr {
|
|
1024
1030
|
now() {
|
1025
1031
|
return zr();
|
1026
1032
|
}
|
1027
|
-
}, n && n.on(
|
1028
|
-
i === this.plugin.id && this.fallbacks.setSettings(
|
1033
|
+
}, n && n.on(qr, (i, c) => {
|
1034
|
+
i === this.plugin.id && this.fallbacks.setSettings(c);
|
1029
1035
|
}), this.proxiedOn = new Proxy({}, {
|
1030
|
-
get: (i,
|
1036
|
+
get: (i, c) => this.target ? this.target.on[c] : (...l) => {
|
1031
1037
|
this.onQueue.push({
|
1032
|
-
method:
|
1038
|
+
method: c,
|
1033
1039
|
args: l
|
1034
1040
|
});
|
1035
1041
|
}
|
1036
1042
|
}), this.proxiedTarget = new Proxy({}, {
|
1037
|
-
get: (i,
|
1038
|
-
method:
|
1043
|
+
get: (i, c) => this.target ? this.target[c] : c === "on" ? this.proxiedOn : Object.keys(this.fallbacks).includes(c) ? (...l) => (this.targetQueue.push({
|
1044
|
+
method: c,
|
1039
1045
|
args: l,
|
1040
1046
|
resolve: () => {
|
1041
1047
|
}
|
1042
|
-
}), this.fallbacks[
|
1048
|
+
}), this.fallbacks[c](...l)) : (...l) => new Promise((d) => {
|
1043
1049
|
this.targetQueue.push({
|
1044
|
-
method:
|
1050
|
+
method: c,
|
1045
1051
|
args: l,
|
1046
|
-
resolve:
|
1052
|
+
resolve: d
|
1047
1053
|
});
|
1048
1054
|
})
|
1049
1055
|
});
|
@@ -1056,12 +1062,12 @@ class Qr {
|
|
1056
1062
|
n.resolve(await this.target[n.method](...n.args));
|
1057
1063
|
}
|
1058
1064
|
}
|
1059
|
-
function
|
1060
|
-
const n = e, r =
|
1065
|
+
function Qr(e, t) {
|
1066
|
+
const n = e, r = hn(), o = Ur(), s = Kr && n.enableEarlyProxy;
|
1061
1067
|
if (o && (r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !s))
|
1062
1068
|
o.emit(Gr, e, t);
|
1063
1069
|
else {
|
1064
|
-
const i = s ? new
|
1070
|
+
const i = s ? new Jr(n, o) : null;
|
1065
1071
|
(r.__VUE_DEVTOOLS_PLUGINS__ = r.__VUE_DEVTOOLS_PLUGINS__ || []).push({
|
1066
1072
|
pluginDescriptor: n,
|
1067
1073
|
setupFn: t,
|
@@ -1084,31 +1090,31 @@ function Ke(e, t) {
|
|
1084
1090
|
const n = {};
|
1085
1091
|
for (const r in t) {
|
1086
1092
|
const o = t[r];
|
1087
|
-
n[r] =
|
1093
|
+
n[r] = K(o) ? o.map(e) : e(o);
|
1088
1094
|
}
|
1089
1095
|
return n;
|
1090
1096
|
}
|
1091
1097
|
const ve = () => {
|
1092
|
-
},
|
1098
|
+
}, K = Array.isArray;
|
1093
1099
|
function P(e) {
|
1094
1100
|
const t = Array.from(arguments).slice(1);
|
1095
1101
|
console.warn.apply(console, ["[Vue Router warn]: " + e].concat(t));
|
1096
1102
|
}
|
1097
1103
|
const mn = /#/g, Xr = /&/g, Zr = /\//g, eo = /=/g, to = /\?/g, gn = /\+/g, no = /%5B/g, ro = /%5D/g, vn = /%5E/g, oo = /%60/g, yn = /%7B/g, so = /%7C/g, wn = /%7D/g, io = /%20/g;
|
1098
|
-
function
|
1104
|
+
function dt(e) {
|
1099
1105
|
return encodeURI("" + e).replace(so, "|").replace(no, "[").replace(ro, "]");
|
1100
1106
|
}
|
1101
1107
|
function ao(e) {
|
1102
|
-
return
|
1108
|
+
return dt(e).replace(yn, "{").replace(wn, "}").replace(vn, "^");
|
1103
1109
|
}
|
1104
1110
|
function rt(e) {
|
1105
|
-
return
|
1111
|
+
return dt(e).replace(gn, "%2B").replace(io, "+").replace(mn, "%23").replace(Xr, "%26").replace(oo, "`").replace(yn, "{").replace(wn, "}").replace(vn, "^");
|
1106
1112
|
}
|
1107
1113
|
function co(e) {
|
1108
1114
|
return rt(e).replace(eo, "%3D");
|
1109
1115
|
}
|
1110
1116
|
function uo(e) {
|
1111
|
-
return
|
1117
|
+
return dt(e).replace(mn, "%23").replace(to, "%3F");
|
1112
1118
|
}
|
1113
1119
|
function lo(e) {
|
1114
1120
|
return e == null ? "" : uo(e).replace(Zr, "%2F");
|
@@ -1124,9 +1130,9 @@ function ae(e) {
|
|
1124
1130
|
const fo = /\/$/, ho = (e) => e.replace(fo, "");
|
1125
1131
|
function Ge(e, t, n = "/") {
|
1126
1132
|
let r, o = {}, s = "", i = "";
|
1127
|
-
const
|
1133
|
+
const c = t.indexOf("#");
|
1128
1134
|
let l = t.indexOf("?");
|
1129
|
-
return
|
1135
|
+
return c < l && c >= 0 && (l = -1), l > -1 && (r = t.slice(0, l), s = t.slice(l + 1, c > -1 ? c : t.length), o = e(s)), c > -1 && (r = r || t.slice(0, c), i = t.slice(c, t.length)), r = go(r ?? t, n), {
|
1130
1136
|
fullPath: r + (s && "?") + s + i,
|
1131
1137
|
path: r,
|
1132
1138
|
query: o,
|
@@ -1137,7 +1143,7 @@ function po(e, t) {
|
|
1137
1143
|
const n = t.query ? e(t.query) : "";
|
1138
1144
|
return t.path + (n && "?") + n + (t.hash || "");
|
1139
1145
|
}
|
1140
|
-
function
|
1146
|
+
function bt(e, t) {
|
1141
1147
|
return !t || !e.toLowerCase().startsWith(t.toLowerCase()) ? e : e.slice(t.length) || "/";
|
1142
1148
|
}
|
1143
1149
|
function St(e, t, n) {
|
@@ -1156,10 +1162,10 @@ function En(e, t) {
|
|
1156
1162
|
return !0;
|
1157
1163
|
}
|
1158
1164
|
function mo(e, t) {
|
1159
|
-
return
|
1165
|
+
return K(e) ? Rt(e, t) : K(t) ? Rt(t, e) : e === t;
|
1160
1166
|
}
|
1161
1167
|
function Rt(e, t) {
|
1162
|
-
return
|
1168
|
+
return K(t) ? e.length === t.length && e.every((n, r) => n === t[r]) : e.length === 1 && e[0] === t;
|
1163
1169
|
}
|
1164
1170
|
function go(e, t) {
|
1165
1171
|
if (e.startsWith("/"))
|
@@ -1170,10 +1176,10 @@ function go(e, t) {
|
|
1170
1176
|
return t;
|
1171
1177
|
const n = t.split("/"), r = e.split("/"), o = r[r.length - 1];
|
1172
1178
|
(o === ".." || o === ".") && r.push("");
|
1173
|
-
let s = n.length - 1, i,
|
1179
|
+
let s = n.length - 1, i, c;
|
1174
1180
|
for (i = 0; i < r.length; i++)
|
1175
|
-
if (
|
1176
|
-
if (
|
1181
|
+
if (c = r[i], c !== ".")
|
1182
|
+
if (c === "..")
|
1177
1183
|
s > 1 && s--;
|
1178
1184
|
else
|
1179
1185
|
break;
|
@@ -1199,7 +1205,7 @@ var oe;
|
|
1199
1205
|
(function(e) {
|
1200
1206
|
e.back = "back", e.forward = "forward", e.unknown = "";
|
1201
1207
|
})(oe || (oe = {}));
|
1202
|
-
const
|
1208
|
+
const qe = "";
|
1203
1209
|
function _n(e) {
|
1204
1210
|
if (!e)
|
1205
1211
|
if (z) {
|
@@ -1210,7 +1216,7 @@ function _n(e) {
|
|
1210
1216
|
return e[0] !== "/" && e[0] !== "#" && (e = "/" + e), ho(e);
|
1211
1217
|
}
|
1212
1218
|
const vo = /^[^#]+#/;
|
1213
|
-
function
|
1219
|
+
function On(e, t) {
|
1214
1220
|
return e.replace(vo, "#") + t;
|
1215
1221
|
}
|
1216
1222
|
function yo(e, t) {
|
@@ -1261,30 +1267,30 @@ function _o(e) {
|
|
1261
1267
|
const t = ot.get(e);
|
1262
1268
|
return ot.delete(e), t;
|
1263
1269
|
}
|
1264
|
-
let
|
1265
|
-
function
|
1270
|
+
let Oo = () => location.protocol + "//" + location.host;
|
1271
|
+
function bn(e, t) {
|
1266
1272
|
const { pathname: n, search: r, hash: o } = t, s = e.indexOf("#");
|
1267
1273
|
if (s > -1) {
|
1268
|
-
let
|
1269
|
-
return l[0] !== "/" && (l = "/" + l),
|
1274
|
+
let c = o.includes(e.slice(s)) ? e.slice(s).length : 1, l = o.slice(c);
|
1275
|
+
return l[0] !== "/" && (l = "/" + l), bt(l, "");
|
1270
1276
|
}
|
1271
|
-
return
|
1277
|
+
return bt(n, e) + r + o;
|
1272
1278
|
}
|
1273
|
-
function
|
1279
|
+
function bo(e, t, n, r) {
|
1274
1280
|
let o = [], s = [], i = null;
|
1275
|
-
const
|
1276
|
-
const
|
1281
|
+
const c = ({ state: f }) => {
|
1282
|
+
const h = bn(e, location), v = n.value, p = t.value;
|
1277
1283
|
let g = 0;
|
1278
1284
|
if (f) {
|
1279
|
-
if (n.value =
|
1285
|
+
if (n.value = h, t.value = f, i && i === v) {
|
1280
1286
|
i = null;
|
1281
1287
|
return;
|
1282
1288
|
}
|
1283
1289
|
g = p ? f.position - p.position : 0;
|
1284
1290
|
} else
|
1285
|
-
r(
|
1286
|
-
o.forEach((
|
1287
|
-
|
1291
|
+
r(h);
|
1292
|
+
o.forEach((y) => {
|
1293
|
+
y(n.value, v, {
|
1288
1294
|
delta: g,
|
1289
1295
|
type: ce.pop,
|
1290
1296
|
direction: g ? g > 0 ? oe.forward : oe.back : oe.unknown
|
@@ -1294,29 +1300,29 @@ function Oo(e, t, n, r) {
|
|
1294
1300
|
function l() {
|
1295
1301
|
i = n.value;
|
1296
1302
|
}
|
1297
|
-
function
|
1303
|
+
function d(f) {
|
1298
1304
|
o.push(f);
|
1299
|
-
const
|
1305
|
+
const h = () => {
|
1300
1306
|
const v = o.indexOf(f);
|
1301
1307
|
v > -1 && o.splice(v, 1);
|
1302
1308
|
};
|
1303
|
-
return s.push(
|
1309
|
+
return s.push(h), h;
|
1304
1310
|
}
|
1305
1311
|
function a() {
|
1306
1312
|
const { history: f } = window;
|
1307
1313
|
f.state && f.replaceState(I({}, f.state, { scroll: xe() }), "");
|
1308
1314
|
}
|
1309
|
-
function
|
1315
|
+
function u() {
|
1310
1316
|
for (const f of s)
|
1311
1317
|
f();
|
1312
|
-
s = [], window.removeEventListener("popstate",
|
1318
|
+
s = [], window.removeEventListener("popstate", c), window.removeEventListener("beforeunload", a);
|
1313
1319
|
}
|
1314
|
-
return window.addEventListener("popstate",
|
1320
|
+
return window.addEventListener("popstate", c), window.addEventListener("beforeunload", a, {
|
1315
1321
|
passive: !0
|
1316
1322
|
}), {
|
1317
1323
|
pauseListeners: l,
|
1318
|
-
listen:
|
1319
|
-
destroy:
|
1324
|
+
listen: d,
|
1325
|
+
destroy: u
|
1320
1326
|
};
|
1321
1327
|
}
|
1322
1328
|
function kt(e, t, n, r = !1, o = !1) {
|
@@ -1331,7 +1337,7 @@ function kt(e, t, n, r = !1, o = !1) {
|
|
1331
1337
|
}
|
1332
1338
|
function So(e) {
|
1333
1339
|
const { history: t, location: n } = window, r = {
|
1334
|
-
value:
|
1340
|
+
value: bn(e, n)
|
1335
1341
|
}, o = { value: t.state };
|
1336
1342
|
o.value || s(r.value, {
|
1337
1343
|
back: null,
|
@@ -1344,25 +1350,25 @@ function So(e) {
|
|
1344
1350
|
// scrollBehavior to be triggered without a saved position
|
1345
1351
|
scroll: null
|
1346
1352
|
}, !0);
|
1347
|
-
function s(l,
|
1348
|
-
const
|
1353
|
+
function s(l, d, a) {
|
1354
|
+
const u = e.indexOf("#"), f = u > -1 ? (n.host && document.querySelector("base") ? e : e.slice(u)) + l : Oo() + e + l;
|
1349
1355
|
try {
|
1350
|
-
t[a ? "replaceState" : "pushState"](
|
1351
|
-
} catch (
|
1352
|
-
S.NODE_ENV !== "production" ? P("Error with push/replace State",
|
1356
|
+
t[a ? "replaceState" : "pushState"](d, "", f), o.value = d;
|
1357
|
+
} catch (h) {
|
1358
|
+
S.NODE_ENV !== "production" ? P("Error with push/replace State", h) : console.error(h), n[a ? "replace" : "assign"](f);
|
1353
1359
|
}
|
1354
1360
|
}
|
1355
|
-
function i(l,
|
1361
|
+
function i(l, d) {
|
1356
1362
|
const a = I({}, t.state, kt(
|
1357
1363
|
o.value.back,
|
1358
1364
|
// keep back and forward entries but override current position
|
1359
1365
|
l,
|
1360
1366
|
o.value.forward,
|
1361
1367
|
!0
|
1362
|
-
),
|
1368
|
+
), d, { position: o.value.position });
|
1363
1369
|
s(l, a, !0), r.value = l;
|
1364
1370
|
}
|
1365
|
-
function
|
1371
|
+
function c(l, d) {
|
1366
1372
|
const a = I(
|
1367
1373
|
{},
|
1368
1374
|
// use current history state to gracefully handle a wrong call to
|
@@ -1380,19 +1386,19 @@ function So(e) {
|
|
1380
1386
|
history.replaceState(history.state, '', url)
|
1381
1387
|
|
1382
1388
|
You can find more information at https://router.vuejs.org/guide/migration/#Usage-of-history-state`), s(a.current, a, !0);
|
1383
|
-
const
|
1384
|
-
s(l,
|
1389
|
+
const u = I({}, kt(r.value, l, null), { position: a.position + 1 }, d);
|
1390
|
+
s(l, u, !1), r.value = l;
|
1385
1391
|
}
|
1386
1392
|
return {
|
1387
1393
|
location: r,
|
1388
1394
|
state: o,
|
1389
|
-
push:
|
1395
|
+
push: c,
|
1390
1396
|
replace: i
|
1391
1397
|
};
|
1392
1398
|
}
|
1393
1399
|
function Sn(e) {
|
1394
1400
|
e = _n(e);
|
1395
|
-
const t = So(e), n =
|
1401
|
+
const t = So(e), n = bo(e, t.state, t.location, t.replace);
|
1396
1402
|
function r(s, i = !0) {
|
1397
1403
|
i || n.pauseListeners(), history.go(s);
|
1398
1404
|
}
|
@@ -1401,7 +1407,7 @@ function Sn(e) {
|
|
1401
1407
|
location: "",
|
1402
1408
|
base: e,
|
1403
1409
|
go: r,
|
1404
|
-
createHref:
|
1410
|
+
createHref: On.bind(null, e)
|
1405
1411
|
}, t, n);
|
1406
1412
|
return Object.defineProperty(o, "location", {
|
1407
1413
|
enumerable: !0,
|
@@ -1412,52 +1418,52 @@ function Sn(e) {
|
|
1412
1418
|
}), o;
|
1413
1419
|
}
|
1414
1420
|
function Ro(e = "") {
|
1415
|
-
let t = [], n = [
|
1421
|
+
let t = [], n = [qe], r = 0;
|
1416
1422
|
e = _n(e);
|
1417
|
-
function o(
|
1418
|
-
r++, r !== n.length && n.splice(r), n.push(
|
1423
|
+
function o(c) {
|
1424
|
+
r++, r !== n.length && n.splice(r), n.push(c);
|
1419
1425
|
}
|
1420
|
-
function s(
|
1421
|
-
const
|
1422
|
-
direction:
|
1426
|
+
function s(c, l, { direction: d, delta: a }) {
|
1427
|
+
const u = {
|
1428
|
+
direction: d,
|
1423
1429
|
delta: a,
|
1424
1430
|
type: ce.pop
|
1425
1431
|
};
|
1426
1432
|
for (const f of t)
|
1427
|
-
f(
|
1433
|
+
f(c, l, u);
|
1428
1434
|
}
|
1429
1435
|
const i = {
|
1430
1436
|
// rewritten by Object.defineProperty
|
1431
|
-
location:
|
1437
|
+
location: qe,
|
1432
1438
|
// TODO: should be kept in queue
|
1433
1439
|
state: {},
|
1434
1440
|
base: e,
|
1435
|
-
createHref:
|
1436
|
-
replace(
|
1437
|
-
n.splice(r--, 1), o(
|
1441
|
+
createHref: On.bind(null, e),
|
1442
|
+
replace(c) {
|
1443
|
+
n.splice(r--, 1), o(c);
|
1438
1444
|
},
|
1439
|
-
push(
|
1440
|
-
o(
|
1445
|
+
push(c, l) {
|
1446
|
+
o(c);
|
1441
1447
|
},
|
1442
|
-
listen(
|
1443
|
-
return t.push(
|
1444
|
-
const l = t.indexOf(
|
1448
|
+
listen(c) {
|
1449
|
+
return t.push(c), () => {
|
1450
|
+
const l = t.indexOf(c);
|
1445
1451
|
l > -1 && t.splice(l, 1);
|
1446
1452
|
};
|
1447
1453
|
},
|
1448
1454
|
destroy() {
|
1449
|
-
t = [], n = [
|
1455
|
+
t = [], n = [qe], r = 0;
|
1450
1456
|
},
|
1451
|
-
go(
|
1452
|
-
const
|
1457
|
+
go(c, l = !0) {
|
1458
|
+
const d = this.location, a = (
|
1453
1459
|
// we are considering delta === 0 going forward, but in abstract mode
|
1454
1460
|
// using 0 for the delta doesn't make sense like it does in html5 where
|
1455
1461
|
// it reloads the page
|
1456
|
-
|
1462
|
+
c < 0 ? oe.back : oe.forward
|
1457
1463
|
);
|
1458
|
-
r = Math.max(0, Math.min(r +
|
1464
|
+
r = Math.max(0, Math.min(r + c, n.length - 1)), l && s(this.location, d, {
|
1459
1465
|
direction: a,
|
1460
|
-
delta:
|
1466
|
+
delta: c
|
1461
1467
|
});
|
1462
1468
|
}
|
1463
1469
|
};
|
@@ -1510,7 +1516,7 @@ function ue(e, t) {
|
|
1510
1516
|
[st]: !0
|
1511
1517
|
}, t);
|
1512
1518
|
}
|
1513
|
-
function
|
1519
|
+
function H(e, t) {
|
1514
1520
|
return e instanceof Error && st in e && (t == null || !!(e.type & t));
|
1515
1521
|
}
|
1516
1522
|
const Vo = ["params", "query", "hash"];
|
@@ -1534,73 +1540,73 @@ function Ao(e, t) {
|
|
1534
1540
|
const n = I({}, Io, t), r = [];
|
1535
1541
|
let o = n.start ? "^" : "";
|
1536
1542
|
const s = [];
|
1537
|
-
for (const
|
1538
|
-
const a =
|
1543
|
+
for (const d of e) {
|
1544
|
+
const a = d.length ? [] : [
|
1539
1545
|
90
|
1540
1546
|
/* PathScore.Root */
|
1541
1547
|
];
|
1542
|
-
n.strict && !
|
1543
|
-
for (let
|
1544
|
-
const f =
|
1545
|
-
let
|
1548
|
+
n.strict && !d.length && (o += "/");
|
1549
|
+
for (let u = 0; u < d.length; u++) {
|
1550
|
+
const f = d[u];
|
1551
|
+
let h = 40 + (n.sensitive ? 0.25 : 0);
|
1546
1552
|
if (f.type === 0)
|
1547
|
-
|
1553
|
+
u || (o += "/"), o += f.value.replace(To, "\\$&"), h += 40;
|
1548
1554
|
else if (f.type === 1) {
|
1549
|
-
const { value: v, repeatable: p, optional: g, regexp:
|
1555
|
+
const { value: v, repeatable: p, optional: g, regexp: y } = f;
|
1550
1556
|
s.push({
|
1551
1557
|
name: v,
|
1552
1558
|
repeatable: p,
|
1553
1559
|
optional: g
|
1554
1560
|
});
|
1555
|
-
const _ =
|
1561
|
+
const _ = y || Nt;
|
1556
1562
|
if (_ !== Nt) {
|
1557
|
-
|
1563
|
+
h += 10;
|
1558
1564
|
try {
|
1559
1565
|
new RegExp(`(${_})`);
|
1560
1566
|
} catch (R) {
|
1561
1567
|
throw new Error(`Invalid custom RegExp for param "${v}" (${_}): ` + R.message);
|
1562
1568
|
}
|
1563
1569
|
}
|
1564
|
-
let
|
1565
|
-
|
1570
|
+
let O = p ? `((?:${_})(?:/(?:${_}))*)` : `(${_})`;
|
1571
|
+
u || (O = // avoid an optional / if there are more segments e.g. /:p?-static
|
1566
1572
|
// or /:p?-:p2
|
1567
|
-
g &&
|
1573
|
+
g && d.length < 2 ? `(?:/${O})` : "/" + O), g && (O += "?"), o += O, h += 20, g && (h += -8), p && (h += -20), _ === ".*" && (h += -50);
|
1568
1574
|
}
|
1569
|
-
a.push(
|
1575
|
+
a.push(h);
|
1570
1576
|
}
|
1571
1577
|
r.push(a);
|
1572
1578
|
}
|
1573
1579
|
if (n.strict && n.end) {
|
1574
|
-
const
|
1575
|
-
r[
|
1580
|
+
const d = r.length - 1;
|
1581
|
+
r[d][r[d].length - 1] += 0.7000000000000001;
|
1576
1582
|
}
|
1577
1583
|
n.strict || (o += "/?"), n.end ? o += "$" : n.strict && !o.endsWith("/") && (o += "(?:/|$)");
|
1578
1584
|
const i = new RegExp(o, n.sensitive ? "" : "i");
|
1579
|
-
function
|
1580
|
-
const a =
|
1585
|
+
function c(d) {
|
1586
|
+
const a = d.match(i), u = {};
|
1581
1587
|
if (!a)
|
1582
1588
|
return null;
|
1583
1589
|
for (let f = 1; f < a.length; f++) {
|
1584
|
-
const
|
1585
|
-
|
1590
|
+
const h = a[f] || "", v = s[f - 1];
|
1591
|
+
u[v.name] = h && v.repeatable ? h.split("/") : h;
|
1586
1592
|
}
|
1587
|
-
return
|
1593
|
+
return u;
|
1588
1594
|
}
|
1589
|
-
function l(
|
1590
|
-
let a = "",
|
1595
|
+
function l(d) {
|
1596
|
+
let a = "", u = !1;
|
1591
1597
|
for (const f of e) {
|
1592
|
-
(!
|
1593
|
-
for (const
|
1594
|
-
if (
|
1595
|
-
a +=
|
1596
|
-
else if (
|
1597
|
-
const { value: v, repeatable: p, optional: g } =
|
1598
|
-
if (
|
1598
|
+
(!u || !a.endsWith("/")) && (a += "/"), u = !1;
|
1599
|
+
for (const h of f)
|
1600
|
+
if (h.type === 0)
|
1601
|
+
a += h.value;
|
1602
|
+
else if (h.type === 1) {
|
1603
|
+
const { value: v, repeatable: p, optional: g } = h, y = v in d ? d[v] : "";
|
1604
|
+
if (K(y) && !p)
|
1599
1605
|
throw new Error(`Provided param "${v}" is an array but it is not repeatable (* or + modifiers)`);
|
1600
|
-
const _ =
|
1606
|
+
const _ = K(y) ? y.join("/") : y;
|
1601
1607
|
if (!_)
|
1602
1608
|
if (g)
|
1603
|
-
f.length < 2 && (a.endsWith("/") ? a = a.slice(0, -1) :
|
1609
|
+
f.length < 2 && (a.endsWith("/") ? a = a.slice(0, -1) : u = !0);
|
1604
1610
|
else
|
1605
1611
|
throw new Error(`Missing required param "${v}"`);
|
1606
1612
|
a += _;
|
@@ -1612,11 +1618,11 @@ function Ao(e, t) {
|
|
1612
1618
|
re: i,
|
1613
1619
|
score: r,
|
1614
1620
|
keys: s,
|
1615
|
-
parse:
|
1621
|
+
parse: c,
|
1616
1622
|
stringify: l
|
1617
1623
|
};
|
1618
1624
|
}
|
1619
|
-
function
|
1625
|
+
function jo(e, t) {
|
1620
1626
|
let n = 0;
|
1621
1627
|
for (; n < e.length && n < t.length; ) {
|
1622
1628
|
const r = t[n] - e[n];
|
@@ -1630,7 +1636,7 @@ function Pn(e, t) {
|
|
1630
1636
|
let n = 0;
|
1631
1637
|
const r = e.score, o = t.score;
|
1632
1638
|
for (; n < r.length && n < o.length; ) {
|
1633
|
-
const s =
|
1639
|
+
const s = jo(r[n], o[n]);
|
1634
1640
|
if (s)
|
1635
1641
|
return s;
|
1636
1642
|
n++;
|
@@ -1647,7 +1653,7 @@ function It(e) {
|
|
1647
1653
|
const t = e[e.length - 1];
|
1648
1654
|
return e.length > 0 && t[t.length - 1] < 0;
|
1649
1655
|
}
|
1650
|
-
const
|
1656
|
+
const $o = {
|
1651
1657
|
type: 0,
|
1652
1658
|
value: ""
|
1653
1659
|
}, Co = /[a-zA-Z0-9_]/;
|
@@ -1655,11 +1661,11 @@ function xo(e) {
|
|
1655
1661
|
if (!e)
|
1656
1662
|
return [[]];
|
1657
1663
|
if (e === "/")
|
1658
|
-
return [[
|
1664
|
+
return [[$o]];
|
1659
1665
|
if (!e.startsWith("/"))
|
1660
1666
|
throw new Error(S.NODE_ENV !== "production" ? `Route paths should start with a "/": "${e}" should be "/${e}".` : `Invalid path "${e}"`);
|
1661
|
-
function t(
|
1662
|
-
throw new Error(`ERR (${n})/"${
|
1667
|
+
function t(h) {
|
1668
|
+
throw new Error(`ERR (${n})/"${d}": ${h}`);
|
1663
1669
|
}
|
1664
1670
|
let n = 0, r = n;
|
1665
1671
|
const o = [];
|
@@ -1667,49 +1673,49 @@ function xo(e) {
|
|
1667
1673
|
function i() {
|
1668
1674
|
s && o.push(s), s = [];
|
1669
1675
|
}
|
1670
|
-
let
|
1671
|
-
function
|
1672
|
-
|
1676
|
+
let c = 0, l, d = "", a = "";
|
1677
|
+
function u() {
|
1678
|
+
d && (n === 0 ? s.push({
|
1673
1679
|
type: 0,
|
1674
|
-
value:
|
1675
|
-
}) : n === 1 || n === 2 || n === 3 ? (s.length > 1 && (l === "*" || l === "+") && t(`A repeatable param (${
|
1680
|
+
value: d
|
1681
|
+
}) : n === 1 || n === 2 || n === 3 ? (s.length > 1 && (l === "*" || l === "+") && t(`A repeatable param (${d}) must be alone in its segment. eg: '/:ids+.`), s.push({
|
1676
1682
|
type: 1,
|
1677
|
-
value:
|
1683
|
+
value: d,
|
1678
1684
|
regexp: a,
|
1679
1685
|
repeatable: l === "*" || l === "+",
|
1680
1686
|
optional: l === "*" || l === "?"
|
1681
|
-
})) : t("Invalid state to consume buffer"),
|
1687
|
+
})) : t("Invalid state to consume buffer"), d = "");
|
1682
1688
|
}
|
1683
1689
|
function f() {
|
1684
|
-
|
1690
|
+
d += l;
|
1685
1691
|
}
|
1686
|
-
for (;
|
1687
|
-
if (l = e[
|
1692
|
+
for (; c < e.length; ) {
|
1693
|
+
if (l = e[c++], l === "\\" && n !== 2) {
|
1688
1694
|
r = n, n = 4;
|
1689
1695
|
continue;
|
1690
1696
|
}
|
1691
1697
|
switch (n) {
|
1692
1698
|
case 0:
|
1693
|
-
l === "/" ? (
|
1699
|
+
l === "/" ? (d && u(), i()) : l === ":" ? (u(), n = 1) : f();
|
1694
1700
|
break;
|
1695
1701
|
case 4:
|
1696
1702
|
f(), n = r;
|
1697
1703
|
break;
|
1698
1704
|
case 1:
|
1699
|
-
l === "(" ? n = 2 : Co.test(l) ? f() : (
|
1705
|
+
l === "(" ? n = 2 : Co.test(l) ? f() : (u(), n = 0, l !== "*" && l !== "?" && l !== "+" && c--);
|
1700
1706
|
break;
|
1701
1707
|
case 2:
|
1702
1708
|
l === ")" ? a[a.length - 1] == "\\" ? a = a.slice(0, -1) + l : n = 3 : a += l;
|
1703
1709
|
break;
|
1704
1710
|
case 3:
|
1705
|
-
|
1711
|
+
u(), n = 0, l !== "*" && l !== "?" && l !== "+" && c--, a = "";
|
1706
1712
|
break;
|
1707
1713
|
default:
|
1708
1714
|
t("Unknown state");
|
1709
1715
|
break;
|
1710
1716
|
}
|
1711
1717
|
}
|
1712
|
-
return n === 2 && t(`Unfinished custom RegExp for param "${
|
1718
|
+
return n === 2 && t(`Unfinished custom RegExp for param "${d}"`), u(), i(), o;
|
1713
1719
|
}
|
1714
1720
|
function Do(e, t, n) {
|
1715
1721
|
const r = Ao(xo(e.path), n);
|
@@ -1729,34 +1735,34 @@ function Do(e, t, n) {
|
|
1729
1735
|
}
|
1730
1736
|
function Mo(e, t) {
|
1731
1737
|
const n = [], r = /* @__PURE__ */ new Map();
|
1732
|
-
t =
|
1733
|
-
function o(
|
1734
|
-
return r.get(
|
1735
|
-
}
|
1736
|
-
function s(
|
1737
|
-
const v = !
|
1738
|
-
S.NODE_ENV !== "production" && Wo(p, f), p.aliasOf =
|
1739
|
-
const g =
|
1740
|
-
if ("alias" in
|
1741
|
-
const R = typeof
|
1738
|
+
t = $t({ strict: !1, end: !0, sensitive: !1 }, t);
|
1739
|
+
function o(u) {
|
1740
|
+
return r.get(u);
|
1741
|
+
}
|
1742
|
+
function s(u, f, h) {
|
1743
|
+
const v = !h, p = At(u);
|
1744
|
+
S.NODE_ENV !== "production" && Wo(p, f), p.aliasOf = h && h.record;
|
1745
|
+
const g = $t(t, u), y = [p];
|
1746
|
+
if ("alias" in u) {
|
1747
|
+
const R = typeof u.alias == "string" ? [u.alias] : u.alias;
|
1742
1748
|
for (const D of R)
|
1743
|
-
|
1749
|
+
y.push(
|
1744
1750
|
// we need to normalize again to ensure the `mods` property
|
1745
1751
|
// being non enumerable
|
1746
1752
|
At(I({}, p, {
|
1747
1753
|
// this allows us to hold a copy of the `components` option
|
1748
1754
|
// so that async components cache is hold on the original record
|
1749
|
-
components:
|
1755
|
+
components: h ? h.record.components : p.components,
|
1750
1756
|
path: D,
|
1751
1757
|
// we might be the child of an alias
|
1752
|
-
aliasOf:
|
1758
|
+
aliasOf: h ? h.record : p
|
1753
1759
|
// the aliases are always of the same kind as the original since they
|
1754
1760
|
// are defined on the same record
|
1755
1761
|
}))
|
1756
1762
|
);
|
1757
1763
|
}
|
1758
|
-
let _,
|
1759
|
-
for (const R of
|
1764
|
+
let _, O;
|
1765
|
+
for (const R of y) {
|
1760
1766
|
const { path: D } = R;
|
1761
1767
|
if (f && D[0] !== "/") {
|
1762
1768
|
const C = f.record.path, x = C[C.length - 1] === "/" ? "" : "/";
|
@@ -1765,88 +1771,88 @@ function Mo(e, t) {
|
|
1765
1771
|
if (S.NODE_ENV !== "production" && R.path === "*")
|
1766
1772
|
throw new Error(`Catch all routes ("*") must now be defined using a param with a custom regexp.
|
1767
1773
|
See more at https://router.vuejs.org/guide/migration/#Removed-star-or-catch-all-routes.`);
|
1768
|
-
if (_ = Do(R, f, g), S.NODE_ENV !== "production" && f && D[0] === "/" && Ko(_, f),
|
1774
|
+
if (_ = Do(R, f, g), S.NODE_ENV !== "production" && f && D[0] === "/" && Ko(_, f), h ? (h.alias.push(_), S.NODE_ENV !== "production" && Lo(h, _)) : (O = O || _, O !== _ && O.alias.push(_), v && u.name && !jt(_) && (S.NODE_ENV !== "production" && Uo(u, f), i(u.name))), kn(_) && l(_), p.children) {
|
1769
1775
|
const C = p.children;
|
1770
1776
|
for (let x = 0; x < C.length; x++)
|
1771
|
-
s(C[x], _,
|
1777
|
+
s(C[x], _, h && h.children[x]);
|
1772
1778
|
}
|
1773
|
-
|
1779
|
+
h = h || _;
|
1774
1780
|
}
|
1775
|
-
return
|
1776
|
-
i(
|
1781
|
+
return O ? () => {
|
1782
|
+
i(O);
|
1777
1783
|
} : ve;
|
1778
1784
|
}
|
1779
|
-
function i(
|
1780
|
-
if (Rn(
|
1781
|
-
const f = r.get(
|
1782
|
-
f && (r.delete(
|
1785
|
+
function i(u) {
|
1786
|
+
if (Rn(u)) {
|
1787
|
+
const f = r.get(u);
|
1788
|
+
f && (r.delete(u), n.splice(n.indexOf(f), 1), f.children.forEach(i), f.alias.forEach(i));
|
1783
1789
|
} else {
|
1784
|
-
const f = n.indexOf(
|
1785
|
-
f > -1 && (n.splice(f, 1),
|
1790
|
+
const f = n.indexOf(u);
|
1791
|
+
f > -1 && (n.splice(f, 1), u.record.name && r.delete(u.record.name), u.children.forEach(i), u.alias.forEach(i));
|
1786
1792
|
}
|
1787
1793
|
}
|
1788
|
-
function
|
1794
|
+
function c() {
|
1789
1795
|
return n;
|
1790
1796
|
}
|
1791
|
-
function l(
|
1792
|
-
const f = Go(
|
1793
|
-
n.splice(f, 0,
|
1797
|
+
function l(u) {
|
1798
|
+
const f = Go(u, n);
|
1799
|
+
n.splice(f, 0, u), u.record.name && !jt(u) && r.set(u.record.name, u);
|
1794
1800
|
}
|
1795
|
-
function
|
1796
|
-
let
|
1797
|
-
if ("name" in
|
1798
|
-
if (
|
1801
|
+
function d(u, f) {
|
1802
|
+
let h, v = {}, p, g;
|
1803
|
+
if ("name" in u && u.name) {
|
1804
|
+
if (h = r.get(u.name), !h)
|
1799
1805
|
throw ue(1, {
|
1800
|
-
location:
|
1806
|
+
location: u
|
1801
1807
|
});
|
1802
1808
|
if (S.NODE_ENV !== "production") {
|
1803
|
-
const
|
1804
|
-
|
1809
|
+
const O = Object.keys(u.params || {}).filter((R) => !h.keys.find((D) => D.name === R));
|
1810
|
+
O.length && P(`Discarded invalid param(s) "${O.join('", "')}" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`);
|
1805
1811
|
}
|
1806
|
-
g =
|
1812
|
+
g = h.record.name, v = I(
|
1807
1813
|
// paramsFromLocation is a new object
|
1808
1814
|
Tt(
|
1809
1815
|
f.params,
|
1810
1816
|
// only keep params that exist in the resolved location
|
1811
1817
|
// only keep optional params coming from a parent record
|
1812
|
-
|
1818
|
+
h.keys.filter((O) => !O.optional).concat(h.parent ? h.parent.keys.filter((O) => O.optional) : []).map((O) => O.name)
|
1813
1819
|
),
|
1814
1820
|
// discard any existing params in the current location that do not exist here
|
1815
1821
|
// #1497 this ensures better active/exact matching
|
1816
|
-
|
1817
|
-
), p =
|
1818
|
-
} else if (
|
1819
|
-
p =
|
1822
|
+
u.params && Tt(u.params, h.keys.map((O) => O.name))
|
1823
|
+
), p = h.stringify(v);
|
1824
|
+
} else if (u.path != null)
|
1825
|
+
p = u.path, S.NODE_ENV !== "production" && !p.startsWith("/") && P(`The Matcher cannot resolve relative paths but received "${p}". Unless you directly called \`matcher.resolve("${p}")\`, this is probably a bug in vue-router. Please open an issue at https://github.com/vuejs/router/issues/new/choose.`), h = n.find((O) => O.re.test(p)), h && (v = h.parse(p), g = h.record.name);
|
1820
1826
|
else {
|
1821
|
-
if (
|
1827
|
+
if (h = f.name ? r.get(f.name) : n.find((O) => O.re.test(f.path)), !h)
|
1822
1828
|
throw ue(1, {
|
1823
|
-
location:
|
1829
|
+
location: u,
|
1824
1830
|
currentLocation: f
|
1825
1831
|
});
|
1826
|
-
g =
|
1832
|
+
g = h.record.name, v = I({}, f.params, u.params), p = h.stringify(v);
|
1827
1833
|
}
|
1828
|
-
const
|
1829
|
-
let _ =
|
1834
|
+
const y = [];
|
1835
|
+
let _ = h;
|
1830
1836
|
for (; _; )
|
1831
|
-
|
1837
|
+
y.unshift(_.record), _ = _.parent;
|
1832
1838
|
return {
|
1833
1839
|
name: g,
|
1834
1840
|
path: p,
|
1835
1841
|
params: v,
|
1836
|
-
matched:
|
1837
|
-
meta: Bo(
|
1842
|
+
matched: y,
|
1843
|
+
meta: Bo(y)
|
1838
1844
|
};
|
1839
1845
|
}
|
1840
|
-
e.forEach((
|
1846
|
+
e.forEach((u) => s(u));
|
1841
1847
|
function a() {
|
1842
1848
|
n.length = 0, r.clear();
|
1843
1849
|
}
|
1844
1850
|
return {
|
1845
1851
|
addRoute: s,
|
1846
|
-
resolve:
|
1852
|
+
resolve: d,
|
1847
1853
|
removeRoute: i,
|
1848
1854
|
clearRoutes: a,
|
1849
|
-
getRoutes:
|
1855
|
+
getRoutes: c,
|
1850
1856
|
getRecordMatcher: o
|
1851
1857
|
};
|
1852
1858
|
}
|
@@ -1887,7 +1893,7 @@ function Fo(e) {
|
|
1887
1893
|
t[r] = typeof n == "object" ? n[r] : n;
|
1888
1894
|
return t;
|
1889
1895
|
}
|
1890
|
-
function
|
1896
|
+
function jt(e) {
|
1891
1897
|
for (; e; ) {
|
1892
1898
|
if (e.record.aliasOf)
|
1893
1899
|
return !0;
|
@@ -1898,7 +1904,7 @@ function $t(e) {
|
|
1898
1904
|
function Bo(e) {
|
1899
1905
|
return e.reduce((t, n) => I(t, n.meta), {});
|
1900
1906
|
}
|
1901
|
-
function
|
1907
|
+
function $t(e, t) {
|
1902
1908
|
const n = {};
|
1903
1909
|
for (const r in e)
|
1904
1910
|
n[r] = r in t ? t[r] : e[r];
|
@@ -1934,10 +1940,10 @@ function Go(e, t) {
|
|
1934
1940
|
const s = n + r >> 1;
|
1935
1941
|
Pn(e, t[s]) < 0 ? r = s : n = s + 1;
|
1936
1942
|
}
|
1937
|
-
const o =
|
1943
|
+
const o = qo(e);
|
1938
1944
|
return o && (r = t.lastIndexOf(o, r - 1), S.NODE_ENV !== "production" && r < 0 && P(`Finding ancestor route "${o.record.path}" failed for "${e.record.path}"`)), r;
|
1939
1945
|
}
|
1940
|
-
function
|
1946
|
+
function qo(e) {
|
1941
1947
|
let t = e;
|
1942
1948
|
for (; t = t.parent; )
|
1943
1949
|
if (kn(t) && Pn(e, t) === 0)
|
@@ -1946,18 +1952,18 @@ function Ho(e) {
|
|
1946
1952
|
function kn({ record: e }) {
|
1947
1953
|
return !!(e.name || e.components && Object.keys(e.components).length || e.redirect);
|
1948
1954
|
}
|
1949
|
-
function
|
1955
|
+
function Ho(e) {
|
1950
1956
|
const t = {};
|
1951
1957
|
if (e === "" || e === "?")
|
1952
1958
|
return t;
|
1953
1959
|
const r = (e[0] === "?" ? e.slice(1) : e).split("&");
|
1954
1960
|
for (let o = 0; o < r.length; ++o) {
|
1955
|
-
const s = r[o].replace(gn, " "), i = s.indexOf("="),
|
1956
|
-
if (
|
1957
|
-
let
|
1958
|
-
|
1961
|
+
const s = r[o].replace(gn, " "), i = s.indexOf("="), c = ae(i < 0 ? s : s.slice(0, i)), l = i < 0 ? null : ae(s.slice(i + 1));
|
1962
|
+
if (c in t) {
|
1963
|
+
let d = t[c];
|
1964
|
+
K(d) || (d = t[c] = [d]), d.push(l);
|
1959
1965
|
} else
|
1960
|
-
t[
|
1966
|
+
t[c] = l;
|
1961
1967
|
}
|
1962
1968
|
return t;
|
1963
1969
|
}
|
@@ -1969,7 +1975,7 @@ function Ct(e) {
|
|
1969
1975
|
r !== void 0 && (t += (t.length ? "&" : "") + n);
|
1970
1976
|
continue;
|
1971
1977
|
}
|
1972
|
-
(
|
1978
|
+
(K(r) ? r.map((s) => s && rt(s)) : [r && rt(r)]).forEach((s) => {
|
1973
1979
|
s !== void 0 && (t += (t.length ? "&" : "") + n, s != null && (t += "=" + s));
|
1974
1980
|
});
|
1975
1981
|
}
|
@@ -1979,11 +1985,11 @@ function zo(e) {
|
|
1979
1985
|
const t = {};
|
1980
1986
|
for (const n in e) {
|
1981
1987
|
const r = e[n];
|
1982
|
-
r !== void 0 && (t[n] =
|
1988
|
+
r !== void 0 && (t[n] = K(r) ? r.map((o) => o == null ? null : "" + o) : r == null ? r : "" + r);
|
1983
1989
|
}
|
1984
1990
|
return t;
|
1985
1991
|
}
|
1986
|
-
const
|
1992
|
+
const Jo = Symbol(S.NODE_ENV !== "production" ? "router view location matched" : ""), xt = Symbol(S.NODE_ENV !== "production" ? "router view depth" : ""), De = Symbol(S.NODE_ENV !== "production" ? "router" : ""), ht = Symbol(S.NODE_ENV !== "production" ? "route location" : ""), at = Symbol(S.NODE_ENV !== "production" ? "router view location" : "");
|
1987
1993
|
function pe() {
|
1988
1994
|
let e = [];
|
1989
1995
|
function t(r) {
|
@@ -2004,8 +2010,8 @@ function pe() {
|
|
2004
2010
|
function X(e, t, n, r, o, s = (i) => i()) {
|
2005
2011
|
const i = r && // name is defined if record is because of the function overload
|
2006
2012
|
(r.enterCallbacks[o] = r.enterCallbacks[o] || []);
|
2007
|
-
return () => new Promise((
|
2008
|
-
const
|
2013
|
+
return () => new Promise((c, l) => {
|
2014
|
+
const d = (f) => {
|
2009
2015
|
f === !1 ? l(ue(4, {
|
2010
2016
|
from: n,
|
2011
2017
|
to: t
|
@@ -2013,58 +2019,58 @@ function X(e, t, n, r, o, s = (i) => i()) {
|
|
2013
2019
|
from: t,
|
2014
2020
|
to: f
|
2015
2021
|
})) : (i && // since enterCallbackArray is truthy, both record and name also are
|
2016
|
-
r.enterCallbacks[o] === i && typeof f == "function" && i.push(f),
|
2017
|
-
}, a = s(() => e.call(r && r.instances[o], t, n, S.NODE_ENV !== "production" ?
|
2018
|
-
let
|
2019
|
-
if (e.length < 3 && (
|
2022
|
+
r.enterCallbacks[o] === i && typeof f == "function" && i.push(f), c());
|
2023
|
+
}, a = s(() => e.call(r && r.instances[o], t, n, S.NODE_ENV !== "production" ? Qo(d, t, n) : d));
|
2024
|
+
let u = Promise.resolve(a);
|
2025
|
+
if (e.length < 3 && (u = u.then(d)), S.NODE_ENV !== "production" && e.length > 2) {
|
2020
2026
|
const f = `The "next" callback was never called inside of ${e.name ? '"' + e.name + '"' : ""}:
|
2021
2027
|
${e.toString()}
|
2022
2028
|
. If you are returning a value instead of calling "next", make sure to remove the "next" parameter from your function.`;
|
2023
2029
|
if (typeof a == "object" && "then" in a)
|
2024
|
-
|
2025
|
-
else if (a !== void 0 && !
|
2030
|
+
u = u.then((h) => d._called ? h : (P(f), Promise.reject(new Error("Invalid navigation guard"))));
|
2031
|
+
else if (a !== void 0 && !d._called) {
|
2026
2032
|
P(f), l(new Error("Invalid navigation guard"));
|
2027
2033
|
return;
|
2028
2034
|
}
|
2029
2035
|
}
|
2030
|
-
|
2036
|
+
u.catch((f) => l(f));
|
2031
2037
|
});
|
2032
2038
|
}
|
2033
|
-
function
|
2039
|
+
function Qo(e, t, n) {
|
2034
2040
|
let r = 0;
|
2035
2041
|
return function() {
|
2036
2042
|
r++ === 1 && P(`The "next" callback was called more than once in one navigation guard when going from "${n.fullPath}" to "${t.fullPath}". It should be called exactly one time in each navigation guard. This will fail in production.`), e._called = !0, r === 1 && e.apply(null, arguments);
|
2037
2043
|
};
|
2038
2044
|
}
|
2039
|
-
function
|
2045
|
+
function He(e, t, n, r, o = (s) => s()) {
|
2040
2046
|
const s = [];
|
2041
2047
|
for (const i of e) {
|
2042
2048
|
S.NODE_ENV !== "production" && !i.components && !i.children.length && P(`Record with path "${i.path}" is either missing a "component(s)" or "children" property.`);
|
2043
|
-
for (const
|
2044
|
-
let l = i.components[
|
2049
|
+
for (const c in i.components) {
|
2050
|
+
let l = i.components[c];
|
2045
2051
|
if (S.NODE_ENV !== "production") {
|
2046
2052
|
if (!l || typeof l != "object" && typeof l != "function")
|
2047
|
-
throw P(`Component "${
|
2053
|
+
throw P(`Component "${c}" in record with path "${i.path}" is not a valid component. Received "${String(l)}".`), new Error("Invalid route component");
|
2048
2054
|
if ("then" in l) {
|
2049
|
-
P(`Component "${
|
2050
|
-
const
|
2051
|
-
l = () =>
|
2055
|
+
P(`Component "${c}" in record with path "${i.path}" is a Promise instead of a function that returns a Promise. Did you write "import('./MyPage.vue')" instead of "() => import('./MyPage.vue')" ? This will break in production if not fixed.`);
|
2056
|
+
const d = l;
|
2057
|
+
l = () => d;
|
2052
2058
|
} else l.__asyncLoader && // warn only once per component
|
2053
|
-
!l.__warnedDefineAsync && (l.__warnedDefineAsync = !0, P(`Component "${
|
2059
|
+
!l.__warnedDefineAsync && (l.__warnedDefineAsync = !0, P(`Component "${c}" in record with path "${i.path}" is defined using "defineAsyncComponent()". Write "() => import('./MyPage.vue')" instead of "defineAsyncComponent(() => import('./MyPage.vue'))".`));
|
2054
2060
|
}
|
2055
|
-
if (!(t !== "beforeRouteEnter" && !i.instances[
|
2061
|
+
if (!(t !== "beforeRouteEnter" && !i.instances[c]))
|
2056
2062
|
if (pn(l)) {
|
2057
2063
|
const a = (l.__vccOpts || l)[t];
|
2058
|
-
a && s.push(X(a, n, r, i,
|
2064
|
+
a && s.push(X(a, n, r, i, c, o));
|
2059
2065
|
} else {
|
2060
|
-
let
|
2061
|
-
S.NODE_ENV !== "production" && !("catch" in
|
2066
|
+
let d = l();
|
2067
|
+
S.NODE_ENV !== "production" && !("catch" in d) && (P(`Component "${c}" in record with path "${i.path}" is a function that does not return a Promise. If you were passing a functional component, make sure to add a "displayName" to the component. This will break in production if not fixed.`), d = Promise.resolve(d)), s.push(() => d.then((a) => {
|
2062
2068
|
if (!a)
|
2063
|
-
throw new Error(`Couldn't resolve component "${
|
2064
|
-
const
|
2065
|
-
i.mods[
|
2066
|
-
const
|
2067
|
-
return
|
2069
|
+
throw new Error(`Couldn't resolve component "${c}" at "${i.path}"`);
|
2070
|
+
const u = Yr(a) ? a.default : a;
|
2071
|
+
i.mods[c] = a, i.components[c] = u;
|
2072
|
+
const h = (u.__vccOpts || u)[t];
|
2073
|
+
return h && X(h, n, r, i, c, o)();
|
2068
2074
|
}));
|
2069
2075
|
}
|
2070
2076
|
}
|
@@ -2072,7 +2078,7 @@ function qe(e, t, n, r, o = (s) => s()) {
|
|
2072
2078
|
return s;
|
2073
2079
|
}
|
2074
2080
|
function Dt(e) {
|
2075
|
-
const t = ee(De), n = ee(
|
2081
|
+
const t = ee(De), n = ee(ht);
|
2076
2082
|
let r = !1, o = null;
|
2077
2083
|
const s = W(() => {
|
2078
2084
|
const a = L(e.to);
|
@@ -2083,52 +2089,52 @@ function Dt(e) {
|
|
2083
2089
|
- to:`, a, `
|
2084
2090
|
- props:`, e)), o = a, r = !0), t.resolve(a);
|
2085
2091
|
}), i = W(() => {
|
2086
|
-
const { matched: a } = s.value, { length:
|
2087
|
-
if (!f || !
|
2092
|
+
const { matched: a } = s.value, { length: u } = a, f = a[u - 1], h = n.matched;
|
2093
|
+
if (!f || !h.length)
|
2088
2094
|
return -1;
|
2089
|
-
const v =
|
2095
|
+
const v = h.findIndex(te.bind(null, f));
|
2090
2096
|
if (v > -1)
|
2091
2097
|
return v;
|
2092
|
-
const p = Mt(a[
|
2098
|
+
const p = Mt(a[u - 2]);
|
2093
2099
|
return (
|
2094
2100
|
// we are dealing with nested routes
|
2095
|
-
|
2101
|
+
u > 1 && // if the parent and matched route have the same path, this link is
|
2096
2102
|
// referring to the empty child. Or we currently are on a different
|
2097
2103
|
// child of the same parent
|
2098
2104
|
Mt(f) === p && // avoid comparing the child with its parent
|
2099
|
-
|
2105
|
+
h[h.length - 1].path !== p ? h.findIndex(te.bind(null, a[u - 2])) : v
|
2100
2106
|
);
|
2101
|
-
}),
|
2102
|
-
function
|
2107
|
+
}), c = W(() => i.value > -1 && ts(n.params, s.value.params)), l = W(() => i.value > -1 && i.value === n.matched.length - 1 && En(n.params, s.value.params));
|
2108
|
+
function d(a = {}) {
|
2103
2109
|
if (es(a)) {
|
2104
|
-
const
|
2110
|
+
const u = t[L(e.replace) ? "replace" : "push"](
|
2105
2111
|
L(e.to)
|
2106
2112
|
// avoid uncaught errors are they are logged anyway
|
2107
2113
|
).catch(ve);
|
2108
|
-
return e.viewTransition && typeof document < "u" && "startViewTransition" in document && document.startViewTransition(() =>
|
2114
|
+
return e.viewTransition && typeof document < "u" && "startViewTransition" in document && document.startViewTransition(() => u), u;
|
2109
2115
|
}
|
2110
2116
|
return Promise.resolve();
|
2111
2117
|
}
|
2112
2118
|
if (S.NODE_ENV !== "production" && z) {
|
2113
|
-
const a =
|
2119
|
+
const a = qt();
|
2114
2120
|
if (a) {
|
2115
|
-
const
|
2121
|
+
const u = {
|
2116
2122
|
route: s.value,
|
2117
|
-
isActive:
|
2123
|
+
isActive: c.value,
|
2118
2124
|
isExactActive: l.value,
|
2119
2125
|
error: null
|
2120
2126
|
};
|
2121
|
-
a.__vrl_devtools = a.__vrl_devtools || [], a.__vrl_devtools.push(
|
2122
|
-
|
2127
|
+
a.__vrl_devtools = a.__vrl_devtools || [], a.__vrl_devtools.push(u), Gt(() => {
|
2128
|
+
u.route = s.value, u.isActive = c.value, u.isExactActive = l.value, u.error = Ie(L(e.to)) ? null : 'Invalid "to" value';
|
2123
2129
|
}, { flush: "post" });
|
2124
2130
|
}
|
2125
2131
|
}
|
2126
2132
|
return {
|
2127
2133
|
route: s,
|
2128
2134
|
href: W(() => s.value.href),
|
2129
|
-
isActive:
|
2135
|
+
isActive: c,
|
2130
2136
|
isExactActive: l,
|
2131
|
-
navigate:
|
2137
|
+
navigate: d
|
2132
2138
|
};
|
2133
2139
|
}
|
2134
2140
|
function Yo(e) {
|
@@ -2192,7 +2198,7 @@ function ts(e, t) {
|
|
2192
2198
|
if (typeof r == "string") {
|
2193
2199
|
if (r !== o)
|
2194
2200
|
return !1;
|
2195
|
-
} else if (!
|
2201
|
+
} else if (!K(o) || o.length !== r.length || r.some((s, i) => s !== o[i]))
|
2196
2202
|
return !1;
|
2197
2203
|
}
|
2198
2204
|
return !0;
|
@@ -2217,44 +2223,44 @@ const Ft = (e, t, n) => e ?? t ?? n, ns = /* @__PURE__ */ F({
|
|
2217
2223
|
setup(e, { attrs: t, slots: n }) {
|
2218
2224
|
S.NODE_ENV !== "production" && os();
|
2219
2225
|
const r = ee(at), o = W(() => e.route || r.value), s = ee(xt, 0), i = W(() => {
|
2220
|
-
let
|
2226
|
+
let d = L(s);
|
2221
2227
|
const { matched: a } = o.value;
|
2222
|
-
let
|
2223
|
-
for (; (
|
2224
|
-
|
2225
|
-
return
|
2226
|
-
}),
|
2227
|
-
|
2228
|
+
let u;
|
2229
|
+
for (; (u = a[d]) && !u.components; )
|
2230
|
+
d++;
|
2231
|
+
return d;
|
2232
|
+
}), c = W(() => o.value.matched[i.value]);
|
2233
|
+
Ve(xt, W(() => i.value + 1)), Ve(Jo, c), Ve(at, o);
|
2228
2234
|
const l = Z();
|
2229
|
-
return G(() => [l.value,
|
2230
|
-
a && (a.instances[
|
2235
|
+
return G(() => [l.value, c.value, e.name], ([d, a, u], [f, h, v]) => {
|
2236
|
+
a && (a.instances[u] = d, h && h !== a && d && d === f && (a.leaveGuards.size || (a.leaveGuards = h.leaveGuards), a.updateGuards.size || (a.updateGuards = h.updateGuards))), d && a && // if there is no instance but to and from are the same this might be
|
2231
2237
|
// the first visit
|
2232
|
-
(!
|
2238
|
+
(!h || !te(a, h) || !f) && (a.enterCallbacks[u] || []).forEach((p) => p(d));
|
2233
2239
|
}, { flush: "post" }), () => {
|
2234
|
-
const
|
2240
|
+
const d = o.value, a = e.name, u = c.value, f = u && u.components[a];
|
2235
2241
|
if (!f)
|
2236
|
-
return Bt(n.default, { Component: f, route:
|
2237
|
-
const
|
2238
|
-
onVnodeUnmounted: (
|
2239
|
-
|
2242
|
+
return Bt(n.default, { Component: f, route: d });
|
2243
|
+
const h = u.props[a], v = h ? h === !0 ? d.params : typeof h == "function" ? h(d) : h : null, g = A(f, I({}, v, t, {
|
2244
|
+
onVnodeUnmounted: (y) => {
|
2245
|
+
y.component.isUnmounted && (u.instances[a] = null);
|
2240
2246
|
},
|
2241
2247
|
ref: l
|
2242
2248
|
}));
|
2243
2249
|
if (S.NODE_ENV !== "production" && z && g.ref) {
|
2244
|
-
const
|
2250
|
+
const y = {
|
2245
2251
|
depth: i.value,
|
2246
|
-
name:
|
2247
|
-
path:
|
2248
|
-
meta:
|
2252
|
+
name: u.name,
|
2253
|
+
path: u.path,
|
2254
|
+
meta: u.meta
|
2249
2255
|
};
|
2250
|
-
(
|
2251
|
-
|
2256
|
+
(K(g.ref) ? g.ref.map((O) => O.i) : [g.ref.i]).forEach((O) => {
|
2257
|
+
O.__vrv_devtools = y;
|
2252
2258
|
});
|
2253
2259
|
}
|
2254
2260
|
return (
|
2255
2261
|
// pass the vnode to the slot as a prop.
|
2256
2262
|
// h and <component :is="..."> both accept vnodes
|
2257
|
-
Bt(n.default, { Component: g, route:
|
2263
|
+
Bt(n.default, { Component: g, route: d }) || g
|
2258
2264
|
);
|
2259
2265
|
};
|
2260
2266
|
}
|
@@ -2267,7 +2273,7 @@ function Bt(e, t) {
|
|
2267
2273
|
}
|
2268
2274
|
const rs = ns;
|
2269
2275
|
function os() {
|
2270
|
-
const e =
|
2276
|
+
const e = qt(), t = e.parent && e.parent.type.name, n = e.parent && e.parent.subTree && e.parent.subTree.type;
|
2271
2277
|
if (t && (t === "KeepAlive" || t.includes("Transition")) && typeof n == "object" && n.name === "RouterView") {
|
2272
2278
|
const r = t === "KeepAlive" ? "keep-alive" : "transition";
|
2273
2279
|
P(`<router-view> can no longer be used directly inside <transition> or <keep-alive>.
|
@@ -2295,7 +2301,7 @@ function me(e, t) {
|
|
2295
2301
|
}
|
2296
2302
|
};
|
2297
2303
|
}
|
2298
|
-
function
|
2304
|
+
function ke(e) {
|
2299
2305
|
return {
|
2300
2306
|
_custom: {
|
2301
2307
|
display: e
|
@@ -2308,7 +2314,7 @@ function is(e, t, n) {
|
|
2308
2314
|
return;
|
2309
2315
|
t.__hasDevtools = !0;
|
2310
2316
|
const r = ss++;
|
2311
|
-
|
2317
|
+
Qr({
|
2312
2318
|
id: "org.vuejs.router" + (r ? "." + r : ""),
|
2313
2319
|
label: "Vue Router",
|
2314
2320
|
packageName: "vue-router",
|
@@ -2317,16 +2323,16 @@ function is(e, t, n) {
|
|
2317
2323
|
componentStateTypes: ["Routing"],
|
2318
2324
|
app: e
|
2319
2325
|
}, (o) => {
|
2320
|
-
typeof o.now != "function" && console.warn("[Vue Router]: You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."), o.on.inspectComponent((a,
|
2326
|
+
typeof o.now != "function" && console.warn("[Vue Router]: You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."), o.on.inspectComponent((a, u) => {
|
2321
2327
|
a.instanceData && a.instanceData.state.push({
|
2322
2328
|
type: "Routing",
|
2323
2329
|
key: "$route",
|
2324
2330
|
editable: !1,
|
2325
2331
|
value: me(t.currentRoute.value, "Current Route")
|
2326
2332
|
});
|
2327
|
-
}), o.on.visitComponentTree(({ treeNode: a, componentInstance:
|
2328
|
-
if (
|
2329
|
-
const f =
|
2333
|
+
}), o.on.visitComponentTree(({ treeNode: a, componentInstance: u }) => {
|
2334
|
+
if (u.__vrv_devtools) {
|
2335
|
+
const f = u.__vrv_devtools;
|
2330
2336
|
a.tags.push({
|
2331
2337
|
label: (f.name ? `${f.name.toString()}: ` : "") + f.path,
|
2332
2338
|
textColor: 0,
|
@@ -2334,41 +2340,41 @@ function is(e, t, n) {
|
|
2334
2340
|
backgroundColor: Vn
|
2335
2341
|
});
|
2336
2342
|
}
|
2337
|
-
|
2338
|
-
let
|
2339
|
-
f.error ? (
|
2340
|
-
label:
|
2343
|
+
K(u.__vrl_devtools) && (u.__devtoolsApi = o, u.__vrl_devtools.forEach((f) => {
|
2344
|
+
let h = f.route.path, v = Tn, p = "", g = 0;
|
2345
|
+
f.error ? (h = f.error, v = fs, g = ds) : f.isExactActive ? (v = In, p = "This is exactly active") : f.isActive && (v = Nn, p = "This link is active"), a.tags.push({
|
2346
|
+
label: h,
|
2341
2347
|
textColor: g,
|
2342
2348
|
tooltip: p,
|
2343
2349
|
backgroundColor: v
|
2344
2350
|
});
|
2345
2351
|
}));
|
2346
2352
|
}), G(t.currentRoute, () => {
|
2347
|
-
l(), o.notifyComponentUpdate(), o.sendInspectorTree(
|
2353
|
+
l(), o.notifyComponentUpdate(), o.sendInspectorTree(c), o.sendInspectorState(c);
|
2348
2354
|
});
|
2349
2355
|
const s = "router:navigations:" + r;
|
2350
2356
|
o.addTimelineLayer({
|
2351
2357
|
id: s,
|
2352
2358
|
label: `Router${r ? " " + r : ""} Navigations`,
|
2353
2359
|
color: 4237508
|
2354
|
-
}), t.onError((a,
|
2360
|
+
}), t.onError((a, u) => {
|
2355
2361
|
o.addTimelineEvent({
|
2356
2362
|
layerId: s,
|
2357
2363
|
event: {
|
2358
2364
|
title: "Error during Navigation",
|
2359
|
-
subtitle:
|
2365
|
+
subtitle: u.fullPath,
|
2360
2366
|
logType: "error",
|
2361
2367
|
time: o.now(),
|
2362
2368
|
data: { error: a },
|
2363
|
-
groupId:
|
2369
|
+
groupId: u.meta.__navigationId
|
2364
2370
|
}
|
2365
2371
|
});
|
2366
2372
|
});
|
2367
2373
|
let i = 0;
|
2368
|
-
t.beforeEach((a,
|
2374
|
+
t.beforeEach((a, u) => {
|
2369
2375
|
const f = {
|
2370
|
-
guard:
|
2371
|
-
from: me(
|
2376
|
+
guard: ke("beforeEach"),
|
2377
|
+
from: me(u, "Current Location during this navigation"),
|
2372
2378
|
to: me(a, "Target location")
|
2373
2379
|
};
|
2374
2380
|
Object.defineProperty(a.meta, "__navigationId", {
|
@@ -2383,11 +2389,11 @@ function is(e, t, n) {
|
|
2383
2389
|
groupId: a.meta.__navigationId
|
2384
2390
|
}
|
2385
2391
|
});
|
2386
|
-
}), t.afterEach((a,
|
2387
|
-
const
|
2388
|
-
guard:
|
2392
|
+
}), t.afterEach((a, u, f) => {
|
2393
|
+
const h = {
|
2394
|
+
guard: ke("afterEach")
|
2389
2395
|
};
|
2390
|
-
f ? (
|
2396
|
+
f ? (h.failure = {
|
2391
2397
|
_custom: {
|
2392
2398
|
type: Error,
|
2393
2399
|
readOnly: !0,
|
@@ -2395,48 +2401,48 @@ function is(e, t, n) {
|
|
2395
2401
|
tooltip: "Navigation Failure",
|
2396
2402
|
value: f
|
2397
2403
|
}
|
2398
|
-
},
|
2404
|
+
}, h.status = ke("❌")) : h.status = ke("✅"), h.from = me(u, "Current Location during this navigation"), h.to = me(a, "Target location"), o.addTimelineEvent({
|
2399
2405
|
layerId: s,
|
2400
2406
|
event: {
|
2401
2407
|
title: "End of navigation",
|
2402
2408
|
subtitle: a.fullPath,
|
2403
2409
|
time: o.now(),
|
2404
|
-
data:
|
2410
|
+
data: h,
|
2405
2411
|
logType: f ? "warning" : "default",
|
2406
2412
|
groupId: a.meta.__navigationId
|
2407
2413
|
}
|
2408
2414
|
});
|
2409
2415
|
});
|
2410
|
-
const
|
2416
|
+
const c = "router-inspector:" + r;
|
2411
2417
|
o.addInspector({
|
2412
|
-
id:
|
2418
|
+
id: c,
|
2413
2419
|
label: "Routes" + (r ? " " + r : ""),
|
2414
2420
|
icon: "book",
|
2415
2421
|
treeFilterPlaceholder: "Search routes"
|
2416
2422
|
});
|
2417
2423
|
function l() {
|
2418
|
-
if (!
|
2424
|
+
if (!d)
|
2419
2425
|
return;
|
2420
|
-
const a =
|
2421
|
-
let
|
2426
|
+
const a = d;
|
2427
|
+
let u = n.getRoutes().filter((f) => !f.parent || // these routes have a parent with no component which will not appear in the view
|
2422
2428
|
// therefore we still need to include them
|
2423
2429
|
!f.parent.record.components);
|
2424
|
-
|
2430
|
+
u.forEach($n), a.filter && (u = u.filter((f) => (
|
2425
2431
|
// save matches state based on the payload
|
2426
2432
|
ct(f, a.filter.toLowerCase())
|
2427
|
-
))),
|
2433
|
+
))), u.forEach((f) => jn(f, t.currentRoute.value)), a.rootNodes = u.map(An);
|
2428
2434
|
}
|
2429
|
-
let
|
2435
|
+
let d;
|
2430
2436
|
o.on.getInspectorTree((a) => {
|
2431
|
-
|
2437
|
+
d = a, a.app === e && a.inspectorId === c && l();
|
2432
2438
|
}), o.on.getInspectorState((a) => {
|
2433
|
-
if (a.app === e && a.inspectorId ===
|
2434
|
-
const f = n.getRoutes().find((
|
2439
|
+
if (a.app === e && a.inspectorId === c) {
|
2440
|
+
const f = n.getRoutes().find((h) => h.record.__vd_id === a.nodeId);
|
2435
2441
|
f && (a.state = {
|
2436
2442
|
options: cs(f)
|
2437
2443
|
});
|
2438
2444
|
}
|
2439
|
-
}), o.sendInspectorTree(
|
2445
|
+
}), o.sendInspectorTree(c), o.sendInspectorState(c);
|
2440
2446
|
});
|
2441
2447
|
}
|
2442
2448
|
function as(e) {
|
@@ -2488,7 +2494,7 @@ function cs(e) {
|
|
2488
2494
|
}
|
2489
2495
|
}), n;
|
2490
2496
|
}
|
2491
|
-
const Vn = 15485081, Nn = 2450411, In = 8702998, us = 2282478, Tn = 16486972, ls = 6710886, fs = 16704226,
|
2497
|
+
const Vn = 15485081, Nn = 2450411, In = 8702998, us = 2282478, Tn = 16486972, ls = 6710886, fs = 16704226, ds = 12131356;
|
2492
2498
|
function An(e) {
|
2493
2499
|
const t = [], { record: n } = e;
|
2494
2500
|
n.name != null && t.push({
|
@@ -2517,21 +2523,21 @@ function An(e) {
|
|
2517
2523
|
backgroundColor: ls
|
2518
2524
|
});
|
2519
2525
|
let r = n.__vd_id;
|
2520
|
-
return r == null && (r = String(
|
2526
|
+
return r == null && (r = String(hs++), n.__vd_id = r), {
|
2521
2527
|
id: r,
|
2522
2528
|
label: n.path,
|
2523
2529
|
tags: t,
|
2524
2530
|
children: e.children.map(An)
|
2525
2531
|
};
|
2526
2532
|
}
|
2527
|
-
let
|
2533
|
+
let hs = 0;
|
2528
2534
|
const ps = /^\/(.*)\/([a-z]*)$/;
|
2529
|
-
function
|
2535
|
+
function jn(e, t) {
|
2530
2536
|
const n = t.matched.length && te(t.matched[t.matched.length - 1], e.record);
|
2531
|
-
e.__vd_exactActive = e.__vd_active = n, n || (e.__vd_active = t.matched.some((r) => te(r, e.record))), e.children.forEach((r) =>
|
2537
|
+
e.__vd_exactActive = e.__vd_active = n, n || (e.__vd_active = t.matched.some((r) => te(r, e.record))), e.children.forEach((r) => jn(r, t));
|
2532
2538
|
}
|
2533
|
-
function
|
2534
|
-
e.__vd_match = !1, e.children.forEach(
|
2539
|
+
function $n(e) {
|
2540
|
+
e.__vd_match = !1, e.children.forEach($n);
|
2535
2541
|
}
|
2536
2542
|
function ct(e, t) {
|
2537
2543
|
const n = String(e.re).match(ps);
|
@@ -2549,19 +2555,19 @@ function ms(e, t) {
|
|
2549
2555
|
return n;
|
2550
2556
|
}
|
2551
2557
|
function gs(e) {
|
2552
|
-
const t = Mo(e.routes, e), n = e.parseQuery ||
|
2558
|
+
const t = Mo(e.routes, e), n = e.parseQuery || Ho, r = e.stringifyQuery || Ct, o = e.history;
|
2553
2559
|
if (S.NODE_ENV !== "production" && !o)
|
2554
2560
|
throw new Error('Provide the "history" option when calling "createRouter()": https://router.vuejs.org/api/interfaces/RouterOptions.html#history');
|
2555
|
-
const s = pe(), i = pe(),
|
2556
|
-
let
|
2561
|
+
const s = pe(), i = pe(), c = pe(), l = J(Y);
|
2562
|
+
let d = Y;
|
2557
2563
|
z && e.scrollBehavior && "scrollRestoration" in history && (history.scrollRestoration = "manual");
|
2558
|
-
const a = Ke.bind(null, (m) => "" + m),
|
2564
|
+
const a = Ke.bind(null, (m) => "" + m), u = Ke.bind(null, lo), f = (
|
2559
2565
|
// @ts-expect-error: intentionally avoid the type check
|
2560
2566
|
Ke.bind(null, ae)
|
2561
2567
|
);
|
2562
|
-
function
|
2563
|
-
let
|
2564
|
-
return Rn(m) ? (
|
2568
|
+
function h(m, E) {
|
2569
|
+
let w, b;
|
2570
|
+
return Rn(m) ? (w = t.getRecordMatcher(m), S.NODE_ENV !== "production" && !w && P(`Parent route "${String(m)}" not found when adding child route`, E), b = E) : b = m, t.addRoute(b, w);
|
2565
2571
|
}
|
2566
2572
|
function v(m) {
|
2567
2573
|
const E = t.getRecordMatcher(m);
|
@@ -2573,11 +2579,11 @@ function gs(e) {
|
|
2573
2579
|
function g(m) {
|
2574
2580
|
return !!t.getRecordMatcher(m);
|
2575
2581
|
}
|
2576
|
-
function
|
2582
|
+
function y(m, E) {
|
2577
2583
|
if (E = I({}, E || l.value), typeof m == "string") {
|
2578
|
-
const k = Ge(n, m, E.path),
|
2579
|
-
return S.NODE_ENV !== "production" && (re.startsWith("//") ? P(`Location "${m}" resolved to "${re}". A resolved location cannot start with multiple slashes.`) :
|
2580
|
-
params: f(
|
2584
|
+
const k = Ge(n, m, E.path), j = t.resolve({ path: k.path }, E), re = o.createHref(k.fullPath);
|
2585
|
+
return S.NODE_ENV !== "production" && (re.startsWith("//") ? P(`Location "${m}" resolved to "${re}". A resolved location cannot start with multiple slashes.`) : j.matched.length || P(`No match found for location with path "${m}"`)), I(k, j, {
|
2586
|
+
params: f(j.params),
|
2581
2587
|
hash: ae(k.hash),
|
2582
2588
|
redirectedFrom: void 0,
|
2583
2589
|
href: re
|
@@ -2585,29 +2591,29 @@ function gs(e) {
|
|
2585
2591
|
}
|
2586
2592
|
if (S.NODE_ENV !== "production" && !Ie(m))
|
2587
2593
|
return P(`router.resolve() was passed an invalid location. This will fail in production.
|
2588
|
-
- Location:`, m),
|
2589
|
-
let
|
2594
|
+
- Location:`, m), y({});
|
2595
|
+
let w;
|
2590
2596
|
if (m.path != null)
|
2591
2597
|
S.NODE_ENV !== "production" && "params" in m && !("name" in m) && // @ts-expect-error: the type is never
|
2592
|
-
Object.keys(m.params).length && P(`Path "${m.path}" was passed with params but they will be ignored. Use a named route alongside params instead.`),
|
2598
|
+
Object.keys(m.params).length && P(`Path "${m.path}" was passed with params but they will be ignored. Use a named route alongside params instead.`), w = I({}, m, {
|
2593
2599
|
path: Ge(n, m.path, E.path).path
|
2594
2600
|
});
|
2595
2601
|
else {
|
2596
2602
|
const k = I({}, m.params);
|
2597
|
-
for (const
|
2598
|
-
k[
|
2599
|
-
|
2600
|
-
params:
|
2601
|
-
}), E.params =
|
2603
|
+
for (const j in k)
|
2604
|
+
k[j] == null && delete k[j];
|
2605
|
+
w = I({}, m, {
|
2606
|
+
params: u(k)
|
2607
|
+
}), E.params = u(E.params);
|
2602
2608
|
}
|
2603
|
-
const
|
2604
|
-
S.NODE_ENV !== "production" && T && !T.startsWith("#") && P(`A \`hash\` should always start with the character "#". Replace "${T}" with "#${T}".`),
|
2605
|
-
const
|
2609
|
+
const b = t.resolve(w, E), T = m.hash || "";
|
2610
|
+
S.NODE_ENV !== "production" && T && !T.startsWith("#") && P(`A \`hash\` should always start with the character "#". Replace "${T}" with "#${T}".`), b.params = a(f(b.params));
|
2611
|
+
const $ = po(r, I({}, m, {
|
2606
2612
|
hash: ao(T),
|
2607
|
-
path:
|
2608
|
-
})), V = o.createHref(
|
2609
|
-
return S.NODE_ENV !== "production" && (V.startsWith("//") ? P(`Location "${m}" resolved to "${V}". A resolved location cannot start with multiple slashes.`) :
|
2610
|
-
fullPath:
|
2613
|
+
path: b.path
|
2614
|
+
})), V = o.createHref($);
|
2615
|
+
return S.NODE_ENV !== "production" && (V.startsWith("//") ? P(`Location "${m}" resolved to "${V}". A resolved location cannot start with multiple slashes.`) : b.matched.length || P(`No match found for location with path "${m.path != null ? m.path : m}"`)), I({
|
2616
|
+
fullPath: $,
|
2611
2617
|
// keep the hash encoded so fullPath is effectively path + encodedQuery +
|
2612
2618
|
// hash
|
2613
2619
|
hash: T,
|
@@ -2619,7 +2625,7 @@ function gs(e) {
|
|
2619
2625
|
// https://github.com/vuejs/router/issues/328#issuecomment-649481567
|
2620
2626
|
r === Ct ? zo(m.query) : m.query || {}
|
2621
2627
|
)
|
2622
|
-
},
|
2628
|
+
}, b, {
|
2623
2629
|
redirectedFrom: void 0,
|
2624
2630
|
href: V
|
2625
2631
|
});
|
@@ -2627,8 +2633,8 @@ function gs(e) {
|
|
2627
2633
|
function _(m) {
|
2628
2634
|
return typeof m == "string" ? Ge(n, m, l.value.path) : I({}, m);
|
2629
2635
|
}
|
2630
|
-
function
|
2631
|
-
if (
|
2636
|
+
function O(m, E) {
|
2637
|
+
if (d !== m)
|
2632
2638
|
return ue(8, {
|
2633
2639
|
from: E,
|
2634
2640
|
to: m
|
@@ -2643,71 +2649,71 @@ function gs(e) {
|
|
2643
2649
|
function C(m) {
|
2644
2650
|
const E = m.matched[m.matched.length - 1];
|
2645
2651
|
if (E && E.redirect) {
|
2646
|
-
const { redirect:
|
2647
|
-
let
|
2648
|
-
if (typeof
|
2652
|
+
const { redirect: w } = E;
|
2653
|
+
let b = typeof w == "function" ? w(m) : w;
|
2654
|
+
if (typeof b == "string" && (b = b.includes("?") || b.includes("#") ? b = _(b) : (
|
2649
2655
|
// force empty params
|
2650
|
-
{ path:
|
2651
|
-
),
|
2656
|
+
{ path: b }
|
2657
|
+
), b.params = {}), S.NODE_ENV !== "production" && b.path == null && !("name" in b))
|
2652
2658
|
throw P(`Invalid redirect found:
|
2653
|
-
${JSON.stringify(
|
2659
|
+
${JSON.stringify(b, null, 2)}
|
2654
2660
|
when navigating to "${m.fullPath}". A redirect must contain a name or path. This will break in production.`), new Error("Invalid redirect");
|
2655
2661
|
return I({
|
2656
2662
|
query: m.query,
|
2657
2663
|
hash: m.hash,
|
2658
2664
|
// avoid transferring params if the redirect has a path
|
2659
|
-
params:
|
2660
|
-
},
|
2665
|
+
params: b.path != null ? {} : m.params
|
2666
|
+
}, b);
|
2661
2667
|
}
|
2662
2668
|
}
|
2663
2669
|
function x(m, E) {
|
2664
|
-
const
|
2670
|
+
const w = d = y(m), b = l.value, T = m.state, $ = m.force, V = m.replace === !0, k = C(w);
|
2665
2671
|
if (k)
|
2666
2672
|
return x(
|
2667
2673
|
I(_(k), {
|
2668
2674
|
state: typeof k == "object" ? I({}, T, k.state) : T,
|
2669
|
-
force:
|
2675
|
+
force: $,
|
2670
2676
|
replace: V
|
2671
2677
|
}),
|
2672
2678
|
// keep original redirectedFrom if it exists
|
2673
|
-
E ||
|
2679
|
+
E || w
|
2674
2680
|
);
|
2675
|
-
const
|
2676
|
-
|
2681
|
+
const j = w;
|
2682
|
+
j.redirectedFrom = E;
|
2677
2683
|
let re;
|
2678
|
-
return
|
2679
|
-
|
2680
|
-
|
2684
|
+
return !$ && St(r, b, w) && (re = ue(16, { to: j, from: b }), yt(
|
2685
|
+
b,
|
2686
|
+
b,
|
2681
2687
|
// this is a push, the only way for it to be triggered from a
|
2682
2688
|
// history.listen is with a redirect, which makes it become a push
|
2683
2689
|
!0,
|
2684
2690
|
// This cannot be the first navigation because the initial location
|
2685
2691
|
// cannot be manually navigated to
|
2686
2692
|
!1
|
2687
|
-
)), (re ? Promise.resolve(re) : pt(
|
2693
|
+
)), (re ? Promise.resolve(re) : pt(j, b)).catch((M) => H(M) ? (
|
2688
2694
|
// navigation redirects still mark the router as ready
|
2689
|
-
|
2695
|
+
H(
|
2690
2696
|
M,
|
2691
2697
|
2
|
2692
2698
|
/* ErrorTypes.NAVIGATION_GUARD_REDIRECT */
|
2693
2699
|
) ? M : Le(M)
|
2694
2700
|
) : (
|
2695
2701
|
// reject any unknown error
|
2696
|
-
Be(M,
|
2702
|
+
Be(M, j, b)
|
2697
2703
|
)).then((M) => {
|
2698
2704
|
if (M) {
|
2699
|
-
if (
|
2705
|
+
if (H(
|
2700
2706
|
M,
|
2701
2707
|
2
|
2702
2708
|
/* ErrorTypes.NAVIGATION_GUARD_REDIRECT */
|
2703
2709
|
))
|
2704
2710
|
return S.NODE_ENV !== "production" && // we are redirecting to the same location we were already at
|
2705
|
-
St(r,
|
2711
|
+
St(r, y(M.to), j) && // and we have done it a couple of times
|
2706
2712
|
E && // @ts-expect-error: added only in dev
|
2707
2713
|
(E._count = E._count ? (
|
2708
2714
|
// @ts-expect-error
|
2709
2715
|
E._count + 1
|
2710
|
-
) : 1) > 30 ? (P(`Detected a possibly infinite redirection in a navigation guard when going from "${
|
2716
|
+
) : 1) > 30 ? (P(`Detected a possibly infinite redirection in a navigation guard when going from "${b.fullPath}" to "${j.fullPath}". Aborting to avoid a Stack Overflow.
|
2711
2717
|
Are you always returning a new location within a navigation guard? That would lead to this error. Only return when redirecting or aborting, that should fix this. This might break in production if not fixed.`), Promise.reject(new Error("Infinite redirect in navigation guard"))) : x(
|
2712
2718
|
// keep options
|
2713
2719
|
I({
|
@@ -2715,95 +2721,95 @@ ${JSON.stringify(O, null, 2)}
|
|
2715
2721
|
replace: V
|
2716
2722
|
}, _(M.to), {
|
2717
2723
|
state: typeof M.to == "object" ? I({}, T, M.to.state) : T,
|
2718
|
-
force:
|
2724
|
+
force: $
|
2719
2725
|
}),
|
2720
2726
|
// preserve the original redirectedFrom if any
|
2721
|
-
E ||
|
2727
|
+
E || j
|
2722
2728
|
);
|
2723
2729
|
} else
|
2724
|
-
M = gt(
|
2725
|
-
return mt(
|
2730
|
+
M = gt(j, b, !0, V, T);
|
2731
|
+
return mt(j, b, M), M;
|
2726
2732
|
});
|
2727
2733
|
}
|
2728
2734
|
function Me(m, E) {
|
2729
|
-
const
|
2730
|
-
return
|
2735
|
+
const w = O(m, E);
|
2736
|
+
return w ? Promise.reject(w) : Promise.resolve();
|
2731
2737
|
}
|
2732
2738
|
function le(m) {
|
2733
|
-
const E =
|
2739
|
+
const E = Re.values().next().value;
|
2734
2740
|
return E && typeof E.runWithContext == "function" ? E.runWithContext(m) : m();
|
2735
2741
|
}
|
2736
2742
|
function pt(m, E) {
|
2737
|
-
let
|
2738
|
-
const [
|
2739
|
-
|
2740
|
-
for (const k of
|
2741
|
-
k.leaveGuards.forEach((
|
2742
|
-
|
2743
|
+
let w;
|
2744
|
+
const [b, T, $] = vs(m, E);
|
2745
|
+
w = He(b.reverse(), "beforeRouteLeave", m, E);
|
2746
|
+
for (const k of b)
|
2747
|
+
k.leaveGuards.forEach((j) => {
|
2748
|
+
w.push(X(j, m, E));
|
2743
2749
|
});
|
2744
2750
|
const V = Me.bind(null, m, E);
|
2745
|
-
return
|
2746
|
-
|
2751
|
+
return w.push(V), se(w).then(() => {
|
2752
|
+
w = [];
|
2747
2753
|
for (const k of s.list())
|
2748
|
-
|
2749
|
-
return
|
2754
|
+
w.push(X(k, m, E));
|
2755
|
+
return w.push(V), se(w);
|
2750
2756
|
}).then(() => {
|
2751
|
-
|
2757
|
+
w = He(T, "beforeRouteUpdate", m, E);
|
2752
2758
|
for (const k of T)
|
2753
|
-
k.updateGuards.forEach((
|
2754
|
-
|
2759
|
+
k.updateGuards.forEach((j) => {
|
2760
|
+
w.push(X(j, m, E));
|
2755
2761
|
});
|
2756
|
-
return
|
2762
|
+
return w.push(V), se(w);
|
2757
2763
|
}).then(() => {
|
2758
|
-
|
2759
|
-
for (const k of
|
2764
|
+
w = [];
|
2765
|
+
for (const k of $)
|
2760
2766
|
if (k.beforeEnter)
|
2761
|
-
if (
|
2762
|
-
for (const
|
2763
|
-
|
2767
|
+
if (K(k.beforeEnter))
|
2768
|
+
for (const j of k.beforeEnter)
|
2769
|
+
w.push(X(j, m, E));
|
2764
2770
|
else
|
2765
|
-
|
2766
|
-
return
|
2767
|
-
}).then(() => (m.matched.forEach((k) => k.enterCallbacks = {}),
|
2768
|
-
|
2771
|
+
w.push(X(k.beforeEnter, m, E));
|
2772
|
+
return w.push(V), se(w);
|
2773
|
+
}).then(() => (m.matched.forEach((k) => k.enterCallbacks = {}), w = He($, "beforeRouteEnter", m, E, le), w.push(V), se(w))).then(() => {
|
2774
|
+
w = [];
|
2769
2775
|
for (const k of i.list())
|
2770
|
-
|
2771
|
-
return
|
2772
|
-
}).catch((k) =>
|
2776
|
+
w.push(X(k, m, E));
|
2777
|
+
return w.push(V), se(w);
|
2778
|
+
}).catch((k) => H(
|
2773
2779
|
k,
|
2774
2780
|
8
|
2775
2781
|
/* ErrorTypes.NAVIGATION_CANCELLED */
|
2776
2782
|
) ? k : Promise.reject(k));
|
2777
2783
|
}
|
2778
|
-
function mt(m, E,
|
2779
|
-
|
2784
|
+
function mt(m, E, w) {
|
2785
|
+
c.list().forEach((b) => le(() => b(m, E, w)));
|
2780
2786
|
}
|
2781
|
-
function gt(m, E,
|
2782
|
-
const
|
2783
|
-
if (
|
2784
|
-
return
|
2787
|
+
function gt(m, E, w, b, T) {
|
2788
|
+
const $ = O(m, E);
|
2789
|
+
if ($)
|
2790
|
+
return $;
|
2785
2791
|
const V = E === Y, k = z ? history.state : {};
|
2786
|
-
|
2792
|
+
w && (b || V ? o.replace(m.fullPath, I({
|
2787
2793
|
scroll: V && k && k.scroll
|
2788
|
-
}, T)) : o.push(m.fullPath, T)), l.value = m, yt(m, E,
|
2794
|
+
}, T)) : o.push(m.fullPath, T)), l.value = m, yt(m, E, w, V), Le();
|
2789
2795
|
}
|
2790
2796
|
let fe;
|
2791
2797
|
function Mn() {
|
2792
|
-
fe || (fe = o.listen((m, E,
|
2798
|
+
fe || (fe = o.listen((m, E, w) => {
|
2793
2799
|
if (!wt.listening)
|
2794
2800
|
return;
|
2795
|
-
const
|
2801
|
+
const b = y(m), T = C(b);
|
2796
2802
|
if (T) {
|
2797
|
-
x(I(T, { replace: !0, force: !0 }),
|
2803
|
+
x(I(T, { replace: !0, force: !0 }), b).catch(ve);
|
2798
2804
|
return;
|
2799
2805
|
}
|
2800
|
-
|
2801
|
-
const
|
2802
|
-
z && Eo(Pt(
|
2806
|
+
d = b;
|
2807
|
+
const $ = l.value;
|
2808
|
+
z && Eo(Pt($.fullPath, w.delta), xe()), pt(b, $).catch((V) => H(
|
2803
2809
|
V,
|
2804
2810
|
12
|
2805
2811
|
/* ErrorTypes.NAVIGATION_CANCELLED */
|
2806
|
-
) ? V :
|
2812
|
+
) ? V : H(
|
2807
2813
|
V,
|
2808
2814
|
2
|
2809
2815
|
/* ErrorTypes.NAVIGATION_GUARD_REDIRECT */
|
@@ -2811,66 +2817,66 @@ ${JSON.stringify(O, null, 2)}
|
|
2811
2817
|
I(_(V.to), {
|
2812
2818
|
force: !0
|
2813
2819
|
}),
|
2814
|
-
|
2820
|
+
b
|
2815
2821
|
// avoid an uncaught rejection, let push call triggerError
|
2816
2822
|
).then((k) => {
|
2817
|
-
|
2823
|
+
H(
|
2818
2824
|
k,
|
2819
2825
|
20
|
2820
2826
|
/* ErrorTypes.NAVIGATION_DUPLICATED */
|
2821
|
-
) && !
|
2822
|
-
}).catch(ve), Promise.reject()) : (
|
2827
|
+
) && !w.delta && w.type === ce.pop && o.go(-1, !1);
|
2828
|
+
}).catch(ve), Promise.reject()) : (w.delta && o.go(-w.delta, !1), Be(V, b, $))).then((V) => {
|
2823
2829
|
V = V || gt(
|
2824
2830
|
// after navigation, all matched components are resolved
|
2825
|
-
|
2826
|
-
|
2831
|
+
b,
|
2832
|
+
$,
|
2827
2833
|
!1
|
2828
|
-
), V && (
|
2834
|
+
), V && (w.delta && // a new navigation has been triggered, so we do not want to revert, that will change the current history
|
2829
2835
|
// entry while a different route is displayed
|
2830
|
-
!
|
2836
|
+
!H(
|
2831
2837
|
V,
|
2832
2838
|
8
|
2833
2839
|
/* ErrorTypes.NAVIGATION_CANCELLED */
|
2834
|
-
) ? o.go(-
|
2840
|
+
) ? o.go(-w.delta, !1) : w.type === ce.pop && H(
|
2835
2841
|
V,
|
2836
2842
|
20
|
2837
2843
|
/* ErrorTypes.NAVIGATION_DUPLICATED */
|
2838
|
-
) && o.go(-1, !1)), mt(
|
2844
|
+
) && o.go(-1, !1)), mt(b, $, V);
|
2839
2845
|
}).catch(ve);
|
2840
2846
|
}));
|
2841
2847
|
}
|
2842
|
-
let Fe = pe(), vt = pe(),
|
2843
|
-
function Be(m, E,
|
2848
|
+
let Fe = pe(), vt = pe(), Se;
|
2849
|
+
function Be(m, E, w) {
|
2844
2850
|
Le(m);
|
2845
|
-
const
|
2846
|
-
return
|
2851
|
+
const b = vt.list();
|
2852
|
+
return b.length ? b.forEach((T) => T(m, E, w)) : (S.NODE_ENV !== "production" && P("uncaught error during route navigation:"), console.error(m)), Promise.reject(m);
|
2847
2853
|
}
|
2848
2854
|
function Fn() {
|
2849
|
-
return
|
2855
|
+
return Se && l.value !== Y ? Promise.resolve() : new Promise((m, E) => {
|
2850
2856
|
Fe.add([m, E]);
|
2851
2857
|
});
|
2852
2858
|
}
|
2853
2859
|
function Le(m) {
|
2854
|
-
return
|
2860
|
+
return Se || (Se = !m, Mn(), Fe.list().forEach(([E, w]) => m ? w(m) : E()), Fe.reset()), m;
|
2855
2861
|
}
|
2856
|
-
function yt(m, E,
|
2862
|
+
function yt(m, E, w, b) {
|
2857
2863
|
const { scrollBehavior: T } = e;
|
2858
2864
|
if (!z || !T)
|
2859
2865
|
return Promise.resolve();
|
2860
|
-
const
|
2861
|
-
return
|
2866
|
+
const $ = !w && _o(Pt(m.fullPath, 0)) || (b || !w) && history.state && history.state.scroll || null;
|
2867
|
+
return Ne().then(() => T(m, E, $)).then((V) => V && wo(V)).catch((V) => Be(V, m, E));
|
2862
2868
|
}
|
2863
2869
|
const We = (m) => o.go(m);
|
2864
2870
|
let Ue;
|
2865
|
-
const
|
2871
|
+
const Re = /* @__PURE__ */ new Set(), wt = {
|
2866
2872
|
currentRoute: l,
|
2867
2873
|
listening: !0,
|
2868
|
-
addRoute:
|
2874
|
+
addRoute: h,
|
2869
2875
|
removeRoute: v,
|
2870
2876
|
clearRoutes: t.clearRoutes,
|
2871
2877
|
hasRoute: g,
|
2872
2878
|
getRoutes: p,
|
2873
|
-
resolve:
|
2879
|
+
resolve: y,
|
2874
2880
|
options: e,
|
2875
2881
|
push: R,
|
2876
2882
|
replace: D,
|
@@ -2879,7 +2885,7 @@ ${JSON.stringify(O, null, 2)}
|
|
2879
2885
|
forward: () => We(1),
|
2880
2886
|
beforeEach: s.add,
|
2881
2887
|
beforeResolve: i.add,
|
2882
|
-
afterEach:
|
2888
|
+
afterEach: c.add,
|
2883
2889
|
onError: vt.add,
|
2884
2890
|
isReady: Fn,
|
2885
2891
|
install(m) {
|
@@ -2892,31 +2898,31 @@ ${JSON.stringify(O, null, 2)}
|
|
2892
2898
|
!Ue && l.value === Y && (Ue = !0, R(o.location).catch((T) => {
|
2893
2899
|
S.NODE_ENV !== "production" && P("Unexpected error when starting the router:", T);
|
2894
2900
|
}));
|
2895
|
-
const
|
2901
|
+
const w = {};
|
2896
2902
|
for (const T in Y)
|
2897
|
-
Object.defineProperty(
|
2903
|
+
Object.defineProperty(w, T, {
|
2898
2904
|
get: () => l.value[T],
|
2899
2905
|
enumerable: !0
|
2900
2906
|
});
|
2901
|
-
m.provide(De, E), m.provide(
|
2902
|
-
const
|
2903
|
-
|
2904
|
-
|
2907
|
+
m.provide(De, E), m.provide(ht, Kn(w)), m.provide(at, l);
|
2908
|
+
const b = m.unmount;
|
2909
|
+
Re.add(m), m.unmount = function() {
|
2910
|
+
Re.delete(m), Re.size < 1 && (d = Y, fe && fe(), fe = null, l.value = Y, Ue = !1, Se = !1), b();
|
2905
2911
|
}, S.NODE_ENV !== "production" && z && is(m, E, t);
|
2906
2912
|
}
|
2907
2913
|
};
|
2908
2914
|
function se(m) {
|
2909
|
-
return m.reduce((E,
|
2915
|
+
return m.reduce((E, w) => E.then(() => le(w)), Promise.resolve());
|
2910
2916
|
}
|
2911
2917
|
return wt;
|
2912
2918
|
}
|
2913
2919
|
function vs(e, t) {
|
2914
2920
|
const n = [], r = [], o = [], s = Math.max(t.matched.length, e.matched.length);
|
2915
2921
|
for (let i = 0; i < s; i++) {
|
2916
|
-
const
|
2917
|
-
|
2922
|
+
const c = t.matched[i];
|
2923
|
+
c && (e.matched.find((d) => te(d, c)) ? r.push(c) : n.push(c));
|
2918
2924
|
const l = e.matched[i];
|
2919
|
-
l && (t.matched.find((
|
2925
|
+
l && (t.matched.find((d) => te(d, l)) || o.push(l));
|
2920
2926
|
}
|
2921
2927
|
return [n, r, o];
|
2922
2928
|
}
|
@@ -2924,31 +2930,31 @@ function ys() {
|
|
2924
2930
|
return ee(De);
|
2925
2931
|
}
|
2926
2932
|
function ws(e) {
|
2927
|
-
return ee(
|
2933
|
+
return ee(ht);
|
2928
2934
|
}
|
2929
2935
|
function ne(e) {
|
2930
|
-
let t =
|
2931
|
-
function
|
2936
|
+
let t = on(), n = Tr(), r = Dr(e), o = cn(), s = ys(), i = ws();
|
2937
|
+
function c(p) {
|
2932
2938
|
p.scopeSnapshot && (t = p.scopeSnapshot), p.slotSnapshot && (n = p.slotSnapshot), p.vforSnapshot && (r = p.vforSnapshot), p.elementRefSnapshot && (o = p.elementRefSnapshot), p.routerSnapshot && (s = p.routerSnapshot);
|
2933
2939
|
}
|
2934
2940
|
function l(p) {
|
2935
2941
|
if (N.isVar(p))
|
2936
|
-
return
|
2942
|
+
return q(d(p));
|
2937
2943
|
if (N.isVForItem(p))
|
2938
|
-
return Fr(p.fid) ? r.getVForIndex(p.fid) :
|
2944
|
+
return Fr(p.fid) ? r.getVForIndex(p.fid) : q(d(p));
|
2939
2945
|
if (N.isVForIndex(p))
|
2940
2946
|
return r.getVForIndex(p.fid);
|
2941
2947
|
if (N.isJs(p)) {
|
2942
|
-
const { code: g, bind:
|
2948
|
+
const { code: g, bind: y } = p, _ = Ee(y, (O) => a(O));
|
2943
2949
|
return Wr(g, _)();
|
2944
2950
|
}
|
2945
2951
|
if (N.isSlotProp(p))
|
2946
2952
|
return n.getPropsValue(p);
|
2947
2953
|
if (N.isRouterParams(p))
|
2948
|
-
return
|
2954
|
+
return q(d(p));
|
2949
2955
|
throw new Error(`Invalid binding: ${p}`);
|
2950
2956
|
}
|
2951
|
-
function
|
2957
|
+
function d(p) {
|
2952
2958
|
if (N.isVar(p)) {
|
2953
2959
|
const g = t.getVueRef(p) || Sr(p);
|
2954
2960
|
return _t(g, {
|
@@ -2974,16 +2980,16 @@ function ne(e) {
|
|
2974
2980
|
}
|
2975
2981
|
function a(p) {
|
2976
2982
|
if (N.isVar(p) || N.isVForItem(p))
|
2977
|
-
return
|
2983
|
+
return d(p);
|
2978
2984
|
if (N.isVForIndex(p))
|
2979
2985
|
return l(p);
|
2980
2986
|
if (N.isJs(p))
|
2981
2987
|
return null;
|
2982
2988
|
if (N.isRouterParams(p))
|
2983
|
-
return
|
2989
|
+
return d(p);
|
2984
2990
|
throw new Error(`Invalid binding: ${p}`);
|
2985
2991
|
}
|
2986
|
-
function
|
2992
|
+
function u(p) {
|
2987
2993
|
if (N.isVar(p))
|
2988
2994
|
return {
|
2989
2995
|
sid: p.sid,
|
@@ -3004,57 +3010,57 @@ function ne(e) {
|
|
3004
3010
|
return null;
|
3005
3011
|
}
|
3006
3012
|
function f(p) {
|
3007
|
-
var g,
|
3013
|
+
var g, y;
|
3008
3014
|
(g = p.vars) == null || g.forEach((_) => {
|
3009
|
-
|
3010
|
-
}), (
|
3015
|
+
d({ type: "var", ..._ }).value = _.val;
|
3016
|
+
}), (y = p.ele_refs) == null || y.forEach((_) => {
|
3011
3017
|
o.getRef({
|
3012
3018
|
sid: _.sid,
|
3013
3019
|
id: _.id
|
3014
3020
|
}).value[_.method](..._.args);
|
3015
3021
|
});
|
3016
3022
|
}
|
3017
|
-
function
|
3018
|
-
if (
|
3023
|
+
function h(p, g) {
|
3024
|
+
if (Ot(g) || Ot(p.values))
|
3019
3025
|
return;
|
3020
3026
|
g = g;
|
3021
|
-
const
|
3022
|
-
g.forEach((
|
3027
|
+
const y = p.values, _ = p.skips || new Array(g.length).fill(0);
|
3028
|
+
g.forEach((O, R) => {
|
3023
3029
|
if (_[R] === 1)
|
3024
3030
|
return;
|
3025
|
-
if (N.isVar(
|
3026
|
-
const C =
|
3027
|
-
C.value =
|
3031
|
+
if (N.isVar(O)) {
|
3032
|
+
const C = d(O);
|
3033
|
+
C.value = y[R];
|
3028
3034
|
return;
|
3029
3035
|
}
|
3030
|
-
if (N.isRouterAction(
|
3031
|
-
const C =
|
3036
|
+
if (N.isRouterAction(O)) {
|
3037
|
+
const C = y[R], x = s[C.fn];
|
3032
3038
|
x(...C.args);
|
3033
3039
|
return;
|
3034
3040
|
}
|
3035
|
-
if (N.isElementRef(
|
3036
|
-
const C = o.getRef(
|
3041
|
+
if (N.isElementRef(O)) {
|
3042
|
+
const C = o.getRef(O).value, x = y[R], { method: Me, args: le = [] } = x;
|
3037
3043
|
C[Me](...le);
|
3038
3044
|
return;
|
3039
3045
|
}
|
3040
|
-
if (N.isJsOutput(
|
3041
|
-
const C =
|
3046
|
+
if (N.isJsOutput(O)) {
|
3047
|
+
const C = y[R], x = U(C);
|
3042
3048
|
typeof x == "function" && x();
|
3043
3049
|
return;
|
3044
3050
|
}
|
3045
|
-
const D =
|
3046
|
-
D.value =
|
3051
|
+
const D = d(O);
|
3052
|
+
D.value = y[R];
|
3047
3053
|
});
|
3048
3054
|
}
|
3049
3055
|
const v = {
|
3050
3056
|
getVForIndex: r.getVForIndex,
|
3051
3057
|
getObjectToValue: l,
|
3052
|
-
getVueRefObject:
|
3058
|
+
getVueRefObject: d,
|
3053
3059
|
getVueRefObjectOrValue: a,
|
3054
|
-
getBindingServerInfo:
|
3060
|
+
getBindingServerInfo: u,
|
3055
3061
|
updateRefFromServer: f,
|
3056
|
-
updateOutputsRefFromServer:
|
3057
|
-
replaceSnapshot:
|
3062
|
+
updateOutputsRefFromServer: h,
|
3063
|
+
replaceSnapshot: c
|
3058
3064
|
};
|
3059
3065
|
return v;
|
3060
3066
|
}
|
@@ -3065,17 +3071,17 @@ function Es(e, t) {
|
|
3065
3071
|
immediate: o,
|
3066
3072
|
deep: s,
|
3067
3073
|
once: i,
|
3068
|
-
flush:
|
3074
|
+
flush: c,
|
3069
3075
|
bind: l = {},
|
3070
|
-
onData:
|
3076
|
+
onData: d,
|
3071
3077
|
bindData: a
|
3072
|
-
} = e,
|
3078
|
+
} = e, u = d || new Array(n.length).fill(0), f = a || new Array(Object.keys(l).length).fill(0), h = Ee(
|
3073
3079
|
l,
|
3074
|
-
(g,
|
3075
|
-
), v =
|
3076
|
-
(g,
|
3080
|
+
(g, y, _) => f[_] === 0 ? t.getVueRefObject(g) : g
|
3081
|
+
), v = U(r, h), p = n.length === 1 ? Lt(u[0] === 1, n[0], t) : n.map(
|
3082
|
+
(g, y) => Lt(u[y] === 1, g, t)
|
3077
3083
|
);
|
3078
|
-
return G(p, v, { immediate: o, deep: s, once: i, flush:
|
3084
|
+
return G(p, v, { immediate: o, deep: s, once: i, flush: c });
|
3079
3085
|
}
|
3080
3086
|
function Lt(e, t, n) {
|
3081
3087
|
return e ? () => t : n.getVueRefObject(t);
|
@@ -3087,44 +3093,49 @@ function _s(e, t) {
|
|
3087
3093
|
slient: o,
|
3088
3094
|
data: s,
|
3089
3095
|
code: i,
|
3090
|
-
immediate:
|
3096
|
+
immediate: c = !0,
|
3091
3097
|
deep: l,
|
3092
|
-
once:
|
3098
|
+
once: d,
|
3093
3099
|
flush: a
|
3094
|
-
} = e,
|
3100
|
+
} = e, u = o || new Array(n.length).fill(0), f = s || new Array(n.length).fill(0), h = U(i), v = n.filter((g, y) => u[y] === 0 && f[y] === 0).map((g) => t.getVueRefObject(g));
|
3095
3101
|
function p() {
|
3096
|
-
return n.map((g,
|
3102
|
+
return n.map((g, y) => f[y] === 0 ? Zt(q(t.getVueRefObject(g))) : g);
|
3097
3103
|
}
|
3098
3104
|
G(
|
3099
3105
|
v,
|
3100
3106
|
() => {
|
3101
|
-
let g =
|
3107
|
+
let g = h(...p());
|
3102
3108
|
if (!r)
|
3103
3109
|
return;
|
3104
|
-
const _ = r.length === 1 ? [g] : g,
|
3110
|
+
const _ = r.length === 1 ? [g] : g, O = _.map((R) => R === void 0 ? 1 : 0);
|
3105
3111
|
t.updateOutputsRefFromServer(
|
3106
|
-
{ values: _, skips:
|
3112
|
+
{ values: _, skips: O },
|
3107
3113
|
r
|
3108
3114
|
);
|
3109
3115
|
},
|
3110
|
-
{ immediate:
|
3116
|
+
{ immediate: c, deep: l, once: d, flush: a }
|
3111
3117
|
);
|
3112
3118
|
}
|
3113
|
-
function
|
3119
|
+
function Os(e, t) {
|
3114
3120
|
return Object.assign(
|
3115
3121
|
{},
|
3116
3122
|
...Object.entries(e ?? {}).map(([n, r]) => {
|
3117
|
-
const o = r.map((
|
3118
|
-
if (
|
3119
|
-
const l =
|
3120
|
-
return Ss(
|
3121
|
-
} else
|
3122
|
-
|
3123
|
-
|
3123
|
+
const o = r.map((c) => {
|
3124
|
+
if (c.type === "web") {
|
3125
|
+
const l = bs(c.bind, t);
|
3126
|
+
return Ss(c, l, t);
|
3127
|
+
} else {
|
3128
|
+
if (c.type === "vue")
|
3129
|
+
return Ps(c, t);
|
3130
|
+
if (c.type === "js")
|
3131
|
+
return Rs(c, t);
|
3132
|
+
}
|
3133
|
+
throw new Error(`unknown event type ${c}`);
|
3134
|
+
}), i = U(
|
3124
3135
|
" (...args)=> Promise.all(promises(...args))",
|
3125
3136
|
{
|
3126
|
-
promises: (...
|
3127
|
-
await l(...
|
3137
|
+
promises: (...c) => o.map(async (l) => {
|
3138
|
+
await l(...c);
|
3128
3139
|
})
|
3129
3140
|
}
|
3130
3141
|
);
|
@@ -3132,12 +3143,12 @@ function bs(e, t) {
|
|
3132
3143
|
})
|
3133
3144
|
);
|
3134
3145
|
}
|
3135
|
-
function
|
3146
|
+
function bs(e, t) {
|
3136
3147
|
return (...n) => (e ?? []).map((r) => {
|
3137
3148
|
if (N.isEventContext(r)) {
|
3138
3149
|
if (r.path.startsWith(":")) {
|
3139
3150
|
const o = r.path.slice(1);
|
3140
|
-
return
|
3151
|
+
return U(o)(...n);
|
3141
3152
|
}
|
3142
3153
|
return _e(n[0], r.path.split("."));
|
3143
3154
|
}
|
@@ -3146,37 +3157,40 @@ function Os(e, t) {
|
|
3146
3157
|
}
|
3147
3158
|
function Ss(e, t, n) {
|
3148
3159
|
async function r(...o) {
|
3149
|
-
const s = t(...o), i = await
|
3160
|
+
const s = t(...o), i = await nn().eventSend(e, s);
|
3150
3161
|
i && n.updateOutputsRefFromServer(i, e.set);
|
3151
3162
|
}
|
3152
3163
|
return r;
|
3153
3164
|
}
|
3154
3165
|
function Rs(e, t) {
|
3155
|
-
const { code: n, inputs: r = [], set: o } = e, s =
|
3156
|
-
function i(...
|
3166
|
+
const { code: n, inputs: r = [], set: o } = e, s = U(n);
|
3167
|
+
function i(...c) {
|
3157
3168
|
const l = (r ?? []).map((a) => {
|
3158
3169
|
if (N.isEventContext(a)) {
|
3159
3170
|
if (a.path.startsWith(":")) {
|
3160
|
-
const
|
3161
|
-
return
|
3171
|
+
const u = a.path.slice(1);
|
3172
|
+
return U(u)(...c);
|
3162
3173
|
}
|
3163
|
-
return _e(
|
3174
|
+
return _e(c[0], a.path.split("."));
|
3164
3175
|
}
|
3165
|
-
|
3166
|
-
|
3167
|
-
return Ps(c);
|
3168
|
-
}
|
3169
|
-
return a;
|
3170
|
-
}), h = s(...l);
|
3176
|
+
return N.IsBinding(a) ? Zt(t.getObjectToValue(a)) : a;
|
3177
|
+
}), d = s(...l);
|
3171
3178
|
if (o !== void 0) {
|
3172
|
-
const
|
3173
|
-
t.updateOutputsRefFromServer({ values:
|
3179
|
+
const u = o.length === 1 ? [d] : d, f = u.map((h) => h === void 0 ? 1 : 0);
|
3180
|
+
t.updateOutputsRefFromServer({ values: u, skips: f }, o);
|
3174
3181
|
}
|
3175
3182
|
}
|
3176
3183
|
return i;
|
3177
3184
|
}
|
3178
|
-
function Ps(e) {
|
3179
|
-
|
3185
|
+
function Ps(e, t) {
|
3186
|
+
const { code: n, bind: r = {}, bindData: o } = e, s = o || new Array(Object.keys(r).length).fill(0), i = Ee(
|
3187
|
+
r,
|
3188
|
+
(d, a, u) => s[u] === 0 ? t.getVueRefObject(d) : d
|
3189
|
+
), c = U(n, i);
|
3190
|
+
function l(...d) {
|
3191
|
+
c(...d);
|
3192
|
+
}
|
3193
|
+
return l;
|
3180
3194
|
}
|
3181
3195
|
function ks(e, t) {
|
3182
3196
|
const n = [];
|
@@ -3184,13 +3198,13 @@ function ks(e, t) {
|
|
3184
3198
|
Array.isArray(s) ? n.push(
|
3185
3199
|
...s.map((i) => t.getObjectToValue(i))
|
3186
3200
|
) : n.push(
|
3187
|
-
|
3201
|
+
Ee(
|
3188
3202
|
s,
|
3189
3203
|
(i) => t.getObjectToValue(i)
|
3190
3204
|
)
|
3191
3205
|
);
|
3192
3206
|
});
|
3193
|
-
const r =
|
3207
|
+
const r = qn([e.style || {}, n]);
|
3194
3208
|
return {
|
3195
3209
|
hasStyle: r && Object.keys(r).length > 0,
|
3196
3210
|
styles: r
|
@@ -3204,11 +3218,11 @@ function Vs(e, t) {
|
|
3204
3218
|
return ze(n);
|
3205
3219
|
const { str: r, map: o, bind: s } = n, i = [];
|
3206
3220
|
return r && i.push(r), o && i.push(
|
3207
|
-
|
3221
|
+
Ee(
|
3208
3222
|
o,
|
3209
|
-
(
|
3223
|
+
(c) => t.getObjectToValue(c)
|
3210
3224
|
)
|
3211
|
-
), s && i.push(...s.map((
|
3225
|
+
), s && i.push(...s.map((c) => t.getObjectToValue(c))), ze(i);
|
3212
3226
|
}
|
3213
3227
|
function Ns(e, t) {
|
3214
3228
|
var r;
|
@@ -3217,17 +3231,17 @@ function Ns(e, t) {
|
|
3217
3231
|
n[s] = Is(t.getObjectToValue(o), s);
|
3218
3232
|
}), (r = e.proxyProps) == null || r.forEach((o) => {
|
3219
3233
|
const s = t.getObjectToValue(o);
|
3220
|
-
typeof s == "object" && Et(s, (i,
|
3221
|
-
n[
|
3234
|
+
typeof s == "object" && Et(s, (i, c) => {
|
3235
|
+
n[c] = i;
|
3222
3236
|
});
|
3223
3237
|
}), { ...e.props || {}, ...n };
|
3224
3238
|
}
|
3225
3239
|
function Is(e, t) {
|
3226
|
-
return t === "innerText" ?
|
3240
|
+
return t === "innerText" ? Ht(e) : e;
|
3227
3241
|
}
|
3228
3242
|
function Ts(e, { slots: t }) {
|
3229
3243
|
const { id: n, use: r } = e.propsInfo, o = Vr(n);
|
3230
|
-
return
|
3244
|
+
return je(() => {
|
3231
3245
|
Ir(n);
|
3232
3246
|
}), () => {
|
3233
3247
|
const s = e.propsValue;
|
@@ -3243,18 +3257,18 @@ function Ts(e, { slots: t }) {
|
|
3243
3257
|
const As = F(Ts, {
|
3244
3258
|
props: ["propsInfo", "propsValue"]
|
3245
3259
|
});
|
3246
|
-
function
|
3260
|
+
function js(e, t) {
|
3247
3261
|
if (!e.slots)
|
3248
3262
|
return null;
|
3249
3263
|
const n = e.slots ?? {};
|
3250
|
-
return Array.isArray(n) ? t ? ge(n) : () => ge(n) :
|
3251
|
-
const { items:
|
3264
|
+
return Array.isArray(n) ? t ? ge(n) : () => ge(n) : Qt(n, { keyFn: (i) => i === ":" ? "default" : i, valueFn: (i) => {
|
3265
|
+
const { items: c } = i;
|
3252
3266
|
return (l) => {
|
3253
3267
|
if (i.scope) {
|
3254
|
-
const
|
3255
|
-
return A(be, { scope: i.scope },
|
3268
|
+
const d = () => i.props ? Wt(i.props, l, c) : ge(c);
|
3269
|
+
return A(be, { scope: i.scope }, d);
|
3256
3270
|
}
|
3257
|
-
return i.props ? Wt(i.props, l,
|
3271
|
+
return i.props ? Wt(i.props, l, c) : ge(c);
|
3258
3272
|
};
|
3259
3273
|
} });
|
3260
3274
|
}
|
@@ -3266,24 +3280,24 @@ function Wt(e, t, n) {
|
|
3266
3280
|
);
|
3267
3281
|
}
|
3268
3282
|
function ge(e) {
|
3269
|
-
const t = (e ?? []).map((n) => A(
|
3283
|
+
const t = (e ?? []).map((n) => A(Q, {
|
3270
3284
|
component: n
|
3271
3285
|
}));
|
3272
3286
|
return t.length <= 0 ? null : t;
|
3273
3287
|
}
|
3274
|
-
function
|
3288
|
+
function $s(e, t) {
|
3275
3289
|
const n = {}, r = [];
|
3276
3290
|
return (e || []).forEach((o) => {
|
3277
|
-
const { sys: s, name: i, arg:
|
3291
|
+
const { sys: s, name: i, arg: c, value: l, mf: d } = o;
|
3278
3292
|
if (i === "vmodel") {
|
3279
3293
|
const a = t.getVueRefObject(l);
|
3280
|
-
if (n[`onUpdate:${
|
3281
|
-
a.value =
|
3294
|
+
if (n[`onUpdate:${c}`] = (u) => {
|
3295
|
+
a.value = u;
|
3282
3296
|
}, s === 1) {
|
3283
|
-
const
|
3284
|
-
r.push([
|
3297
|
+
const u = d ? Object.fromEntries(d.map((f) => [f, !0])) : {};
|
3298
|
+
r.push([Hn, a.value, void 0, u]);
|
3285
3299
|
} else
|
3286
|
-
n[
|
3300
|
+
n[c] = a.value;
|
3287
3301
|
} else if (i === "vshow") {
|
3288
3302
|
const a = t.getVueRefObject(l);
|
3289
3303
|
r.push([zn, a.value]);
|
@@ -3299,41 +3313,38 @@ function Cs(e, t) {
|
|
3299
3313
|
return n === void 0 ? {} : { ref: t.getRef(n) };
|
3300
3314
|
}
|
3301
3315
|
function xs(e) {
|
3302
|
-
const t = ne(), n =
|
3316
|
+
const t = ne(), n = cn();
|
3303
3317
|
return () => {
|
3304
|
-
const { tag: r } = e.component, o = N.IsBinding(r) ? t.getObjectToValue(r) : r, s =
|
3318
|
+
const { tag: r } = e.component, o = N.IsBinding(r) ? t.getObjectToValue(r) : r, s = ut(o), i = typeof s == "string", c = Vs(e.component, t), { styles: l, hasStyle: d } = ks(e.component, t), a = Os(e.component.events ?? {}, t), u = js(e.component, i), f = Ns(e.component, t), { newProps: h, directiveArray: v } = $s(
|
3305
3319
|
e.component.dir,
|
3306
3320
|
t
|
3307
3321
|
), p = Cs(
|
3308
3322
|
e.component,
|
3309
3323
|
n
|
3310
|
-
), g =
|
3324
|
+
), g = Jn({
|
3311
3325
|
...f,
|
3312
3326
|
...a,
|
3313
|
-
...
|
3327
|
+
...h,
|
3314
3328
|
...p
|
3315
3329
|
}) || {};
|
3316
|
-
|
3317
|
-
const
|
3318
|
-
return v.length > 0 ?
|
3330
|
+
d && (g.style = l), c && (g.class = c);
|
3331
|
+
const y = A(s, { ...g }, u);
|
3332
|
+
return v.length > 0 ? Qn(
|
3319
3333
|
// @ts-ignore
|
3320
|
-
|
3334
|
+
y,
|
3321
3335
|
v
|
3322
|
-
) :
|
3336
|
+
) : y;
|
3323
3337
|
};
|
3324
3338
|
}
|
3325
|
-
const
|
3339
|
+
const Q = F(xs, {
|
3326
3340
|
props: ["component"]
|
3327
3341
|
});
|
3328
3342
|
function Cn(e, t) {
|
3329
3343
|
var n, r;
|
3330
3344
|
if (e) {
|
3331
|
-
e
|
3332
|
-
|
3333
|
-
|
3334
|
-
const o = en(e, ne(t)), s = ne(t);
|
3335
|
-
yr(e.py_watch, e.web_computed, s), (n = e.vue_watch) == null || n.forEach((i) => Es(i, s)), (r = e.js_watch) == null || r.forEach((i) => _s(i, s)), Ae(() => {
|
3336
|
-
rn(e.id, o), kr(e.id);
|
3345
|
+
const o = Pr(e), s = rn(e, ne(t)), i = ne(t);
|
3346
|
+
yr(e.py_watch, e.web_computed, i), (n = e.vue_watch) == null || n.forEach((c) => Es(c, i)), (r = e.js_watch) == null || r.forEach((c) => _s(c, i)), je(() => {
|
3347
|
+
an(e.id, s), kr(e.id, o);
|
3337
3348
|
});
|
3338
3349
|
}
|
3339
3350
|
}
|
@@ -3346,10 +3357,10 @@ const be = F(Ds, {
|
|
3346
3357
|
}), Ms = F(
|
3347
3358
|
(e) => {
|
3348
3359
|
const { scope: t, items: n, vforInfo: r } = e;
|
3349
|
-
return Ar(r), Cn(t, r.key), n.length === 1 ? () => A(
|
3360
|
+
return Ar(r), Cn(t, r.key), n.length === 1 ? () => A(Q, {
|
3350
3361
|
component: n[0]
|
3351
3362
|
}) : () => n.map(
|
3352
|
-
(s) => A(
|
3363
|
+
(s) => A(Q, {
|
3353
3364
|
component: s
|
3354
3365
|
})
|
3355
3366
|
);
|
@@ -3397,10 +3408,10 @@ const Ls = { class: "app-box" }, Ws = {
|
|
3397
3408
|
pathParams: s.url.params,
|
3398
3409
|
webServerInfo: s.webInfo
|
3399
3410
|
}), mr(s));
|
3400
|
-
}), Yn(Bs), (s, i) => (
|
3401
|
-
L(r) ? (
|
3411
|
+
}), Yn(Bs), (s, i) => (de(), Pe("div", Ls, [
|
3412
|
+
L(r) ? (de(), Pe("div", Ws, i[0] || (i[0] = [
|
3402
3413
|
Xn("p", { style: { margin: "auto" } }, "Loading ...", -1)
|
3403
|
-
]))) : (
|
3414
|
+
]))) : (de(), Pe("div", {
|
3404
3415
|
key: 1,
|
3405
3416
|
class: ze(["insta-main", L(n).class])
|
3406
3417
|
}, [
|
@@ -3408,7 +3419,7 @@ const Ls = { class: "app-box" }, Ws = {
|
|
3408
3419
|
scope: L(o).scope
|
3409
3420
|
}, {
|
3410
3421
|
default: er(() => [
|
3411
|
-
(
|
3422
|
+
(de(!0), Pe($e, null, tr(L(o).items, (c) => (de(), nr(L(Q), { component: c }, null, 8, ["component"]))), 256))
|
3412
3423
|
]),
|
3413
3424
|
_: 1
|
3414
3425
|
}, 8, ["scope"])
|
@@ -3421,14 +3432,14 @@ function Ks(e) {
|
|
3421
3432
|
return () => {
|
3422
3433
|
const s = o.getObjectToValue(t);
|
3423
3434
|
return A(be, { scope: n }, () => s ? r.map(
|
3424
|
-
(
|
3435
|
+
(c) => A(Q, { component: c })
|
3425
3436
|
) : void 0);
|
3426
3437
|
};
|
3427
3438
|
}
|
3428
3439
|
const Gs = F(Ks, {
|
3429
3440
|
props: ["on", "scope", "items"]
|
3430
3441
|
});
|
3431
|
-
function
|
3442
|
+
function qs(e) {
|
3432
3443
|
const { start: t = 0, end: n, step: r = 1 } = e;
|
3433
3444
|
let o = [];
|
3434
3445
|
if (r > 0)
|
@@ -3439,22 +3450,22 @@ function Hs(e) {
|
|
3439
3450
|
o.push(s);
|
3440
3451
|
return o;
|
3441
3452
|
}
|
3442
|
-
function
|
3443
|
-
const { array: t, bArray: n, items: r, fkey: o, fid: s, scope: i, num:
|
3444
|
-
|
3453
|
+
function Hs(e) {
|
3454
|
+
const { array: t, bArray: n, items: r, fkey: o, fid: s, scope: i, num: c, tsGroup: l = {} } = e, d = t === void 0, a = c !== void 0, u = d ? n : t, f = ne();
|
3455
|
+
$r(s, u, d, a);
|
3445
3456
|
const v = Xs(o ?? "index");
|
3446
|
-
return
|
3457
|
+
return je(() => {
|
3447
3458
|
Rr(i.id);
|
3448
3459
|
}), () => {
|
3449
|
-
const p =
|
3460
|
+
const p = Js(
|
3450
3461
|
a,
|
3451
|
-
|
3452
|
-
|
3462
|
+
d,
|
3463
|
+
u,
|
3453
3464
|
f,
|
3454
|
-
|
3455
|
-
), g = xr(s),
|
3456
|
-
const R = v(_,
|
3457
|
-
return g.add(R), Cr(s, R,
|
3465
|
+
c
|
3466
|
+
), g = xr(s), y = p.map((_, O) => {
|
3467
|
+
const R = v(_, O);
|
3468
|
+
return g.add(R), Cr(s, R, O), A(Ms, {
|
3458
3469
|
scope: e.scope,
|
3459
3470
|
items: r,
|
3460
3471
|
vforInfo: {
|
@@ -3464,34 +3475,34 @@ function qs(e) {
|
|
3464
3475
|
key: R
|
3465
3476
|
});
|
3466
3477
|
});
|
3467
|
-
return g.removeUnusedKeys(), l && Object.keys(l).length > 0 ? A(
|
3468
|
-
default: () =>
|
3469
|
-
}) :
|
3478
|
+
return g.removeUnusedKeys(), l && Object.keys(l).length > 0 ? A(zt, l, {
|
3479
|
+
default: () => y
|
3480
|
+
}) : y;
|
3470
3481
|
};
|
3471
3482
|
}
|
3472
|
-
const zs = F(
|
3483
|
+
const zs = F(Hs, {
|
3473
3484
|
props: ["array", "items", "fid", "bArray", "scope", "num", "fkey", "tsGroup"]
|
3474
3485
|
});
|
3475
|
-
function
|
3486
|
+
function Js(e, t, n, r, o) {
|
3476
3487
|
if (e) {
|
3477
3488
|
let i = 0;
|
3478
|
-
return typeof o == "number" ? i = o : i = r.getObjectToValue(o) ?? 0,
|
3489
|
+
return typeof o == "number" ? i = o : i = r.getObjectToValue(o) ?? 0, qs({
|
3479
3490
|
end: Math.max(0, i)
|
3480
3491
|
});
|
3481
3492
|
}
|
3482
3493
|
const s = t ? r.getObjectToValue(n) || [] : n;
|
3483
3494
|
return typeof s == "object" ? Object.values(s) : s;
|
3484
3495
|
}
|
3485
|
-
const
|
3496
|
+
const Qs = (e) => e, Ys = (e, t) => t;
|
3486
3497
|
function Xs(e) {
|
3487
3498
|
const t = ur(e);
|
3488
|
-
return typeof t == "function" ? t : e === "item" ?
|
3499
|
+
return typeof t == "function" ? t : e === "item" ? Qs : Ys;
|
3489
3500
|
}
|
3490
3501
|
function Zs(e) {
|
3491
3502
|
return e.map((n) => {
|
3492
3503
|
if (n.tag)
|
3493
|
-
return A(
|
3494
|
-
const r =
|
3504
|
+
return A(Q, { component: n });
|
3505
|
+
const r = ut(xn);
|
3495
3506
|
return A(r, {
|
3496
3507
|
scope: n
|
3497
3508
|
});
|
@@ -3509,8 +3520,8 @@ const xn = F(
|
|
3509
3520
|
function ei(e) {
|
3510
3521
|
return e.map((t) => {
|
3511
3522
|
if (t.tag)
|
3512
|
-
return A(
|
3513
|
-
const n =
|
3523
|
+
return A(Q, { component: t });
|
3524
|
+
const n = ut(xn);
|
3514
3525
|
return A(n, {
|
3515
3526
|
scope: t
|
3516
3527
|
});
|
@@ -3518,12 +3529,12 @@ function ei(e) {
|
|
3518
3529
|
}
|
3519
3530
|
const ti = F(
|
3520
3531
|
(e) => {
|
3521
|
-
const { scope: t, on: n, items: r } = e, o =
|
3532
|
+
const { scope: t, on: n, items: r } = e, o = J(r), s = rn(t), i = ne();
|
3522
3533
|
return Te.createDynamicWatchRefresh(n, i, async () => {
|
3523
|
-
const { items:
|
3524
|
-
return o.value =
|
3525
|
-
}),
|
3526
|
-
|
3534
|
+
const { items: c, on: l } = await Te.fetchRemote(e, i);
|
3535
|
+
return o.value = c, l;
|
3536
|
+
}), je(() => {
|
3537
|
+
an(t.id, s);
|
3527
3538
|
}), () => ei(o.value);
|
3528
3539
|
},
|
3529
3540
|
{
|
@@ -3533,17 +3544,17 @@ const ti = F(
|
|
3533
3544
|
var Te;
|
3534
3545
|
((e) => {
|
3535
3546
|
function t(r, o, s) {
|
3536
|
-
let i = null,
|
3537
|
-
function
|
3547
|
+
let i = null, c = r, l = c.map((a) => o.getVueRefObject(a));
|
3548
|
+
function d() {
|
3538
3549
|
i && i(), i = G(
|
3539
3550
|
l,
|
3540
3551
|
async () => {
|
3541
|
-
|
3552
|
+
c = await s(), l = c.map((a) => o.getVueRefObject(a)), d();
|
3542
3553
|
},
|
3543
3554
|
{ deep: !0 }
|
3544
3555
|
);
|
3545
3556
|
}
|
3546
|
-
return
|
3557
|
+
return d(), () => {
|
3547
3558
|
i && i();
|
3548
3559
|
};
|
3549
3560
|
}
|
@@ -3558,13 +3569,13 @@ var Te;
|
|
3558
3569
|
bind: s,
|
3559
3570
|
hKey: r.hKey,
|
3560
3571
|
page: ye()
|
3561
|
-
},
|
3572
|
+
}, c = {
|
3562
3573
|
method: "POST",
|
3563
3574
|
headers: {
|
3564
3575
|
"Content-Type": "application/json"
|
3565
3576
|
},
|
3566
3577
|
body: JSON.stringify(i)
|
3567
|
-
}, l = await fetch(r.url,
|
3578
|
+
}, l = await fetch(r.url, c);
|
3568
3579
|
if (!l.ok)
|
3569
3580
|
throw new Error("Failed to fetch data");
|
3570
3581
|
return await l.json();
|
@@ -3574,7 +3585,7 @@ var Te;
|
|
3574
3585
|
function ni(e) {
|
3575
3586
|
const { scope: t, items: n } = e;
|
3576
3587
|
return () => {
|
3577
|
-
const r = n.map((o) => A(
|
3588
|
+
const r = n.map((o) => A(Q, { component: o }));
|
3578
3589
|
return A(be, { scope: t }, () => r);
|
3579
3590
|
};
|
3580
3591
|
}
|
@@ -3584,18 +3595,18 @@ const Ut = F(ni, {
|
|
3584
3595
|
function ri(e) {
|
3585
3596
|
const { on: t, case: n, default: r } = e, o = ne();
|
3586
3597
|
return () => {
|
3587
|
-
const s = o.getObjectToValue(t), i = n.map((
|
3588
|
-
const { value: l, items:
|
3598
|
+
const s = o.getObjectToValue(t), i = n.map((c) => {
|
3599
|
+
const { value: l, items: d, scope: a } = c.props;
|
3589
3600
|
if (s === l)
|
3590
3601
|
return A(Ut, {
|
3591
3602
|
scope: a,
|
3592
|
-
items:
|
3603
|
+
items: d,
|
3593
3604
|
key: ["case", l].join("-")
|
3594
3605
|
});
|
3595
|
-
}).filter((
|
3606
|
+
}).filter((c) => c);
|
3596
3607
|
if (r && !i.length) {
|
3597
|
-
const { items:
|
3598
|
-
i.push(A(Ut, { scope: l, items:
|
3608
|
+
const { items: c, scope: l } = r.props;
|
3609
|
+
i.push(A(Ut, { scope: l, items: c, key: "default" }));
|
3599
3610
|
}
|
3600
3611
|
return A($e, i);
|
3601
3612
|
};
|
@@ -3606,7 +3617,7 @@ const oi = F(ri, {
|
|
3606
3617
|
function si(e, { slots: t }) {
|
3607
3618
|
const { name: n = "fade", tag: r } = e;
|
3608
3619
|
return () => A(
|
3609
|
-
|
3620
|
+
zt,
|
3610
3621
|
{ name: n, tag: r },
|
3611
3622
|
{
|
3612
3623
|
default: t.default
|
@@ -3618,7 +3629,7 @@ const ii = F(si, {
|
|
3618
3629
|
});
|
3619
3630
|
function ai(e) {
|
3620
3631
|
const { content: t, r: n = 0 } = e, r = ne(), o = n === 1 ? () => r.getObjectToValue(t) : () => t;
|
3621
|
-
return () =>
|
3632
|
+
return () => Ht(o());
|
3622
3633
|
}
|
3623
3634
|
const ci = F(ai, {
|
3624
3635
|
props: ["content", "r"]
|
@@ -3638,19 +3649,19 @@ function Dn(e, t) {
|
|
3638
3649
|
throw new Error("Server-side rendering is not supported yet.");
|
3639
3650
|
return Promise.resolve(li(r, o, t));
|
3640
3651
|
}, i = (l = r.children) == null ? void 0 : l.map(
|
3641
|
-
(
|
3642
|
-
),
|
3652
|
+
(d) => Dn(d, t)
|
3653
|
+
), c = {
|
3643
3654
|
...r,
|
3644
3655
|
children: i,
|
3645
3656
|
component: s
|
3646
3657
|
};
|
3647
|
-
return r.component.length === 0 && delete
|
3658
|
+
return r.component.length === 0 && delete c.component, i === void 0 && delete c.children, c;
|
3648
3659
|
}
|
3649
3660
|
function li(e, t, n) {
|
3650
3661
|
const { path: r, component: o } = e, s = A(
|
3651
3662
|
be,
|
3652
3663
|
{ scope: t, key: r },
|
3653
|
-
() => o.map((
|
3664
|
+
() => o.map((c) => A(Q, { component: c }))
|
3654
3665
|
);
|
3655
3666
|
return n ? A(rr, null, () => s) : s;
|
3656
3667
|
}
|