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