@stonecrop/stonecrop 0.2.33 → 0.2.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/stonecrop.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var pr = Object.defineProperty;
|
|
2
2
|
var mr = (e, t, n) => t in e ? pr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var V = (e, t, n) => mr(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
-
import { effectScope as gn, ref as oe, markRaw as ue, toRaw as Fe,
|
|
4
|
+
import { effectScope as gn, ref as oe, markRaw as ue, toRaw as Fe, watch as Te, unref as le, hasInjectionContext as gr, inject as de, getCurrentInstance as Et, reactive as vn, isRef as Ie, isReactive as bt, toRef as Ye, nextTick as it, computed as z, getCurrentScope as vr, onScopeDispose as yr, toRefs as xt, onBeforeMount as _r, shallowRef as Er, shallowReactive as br, defineComponent as yn, h as _n, provide as Xe, watchEffect as wr } from "vue";
|
|
5
5
|
function at(e) {
|
|
6
6
|
this.message = e || "";
|
|
7
7
|
}
|
|
@@ -228,7 +228,7 @@ function Sr() {
|
|
|
228
228
|
function bn() {
|
|
229
229
|
return typeof navigator < "u" && typeof window < "u" ? window : typeof global < "u" ? global : {};
|
|
230
230
|
}
|
|
231
|
-
const Or = typeof Proxy == "function",
|
|
231
|
+
const Or = typeof Proxy == "function", kr = "devtools-plugin:setup", Nr = "plugin:settings:set";
|
|
232
232
|
let me, ut;
|
|
233
233
|
function Pr() {
|
|
234
234
|
var e;
|
|
@@ -267,7 +267,7 @@ class Rr {
|
|
|
267
267
|
now() {
|
|
268
268
|
return $r();
|
|
269
269
|
}
|
|
270
|
-
}, n && n.on(
|
|
270
|
+
}, n && n.on(Nr, (i, a) => {
|
|
271
271
|
i === this.plugin.id && this.fallbacks.setSettings(a);
|
|
272
272
|
}), this.proxiedOn = new Proxy({}, {
|
|
273
273
|
get: (i, a) => this.target ? this.target.on[a] : (...c) => {
|
|
@@ -302,7 +302,7 @@ class Rr {
|
|
|
302
302
|
function wt(e, t) {
|
|
303
303
|
const n = e, r = bn(), o = Sr(), s = Or && n.enableEarlyProxy;
|
|
304
304
|
if (o && (r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !s))
|
|
305
|
-
o.emit(
|
|
305
|
+
o.emit(kr, e, t);
|
|
306
306
|
else {
|
|
307
307
|
const i = s ? new Rr(n, o) : null;
|
|
308
308
|
(r.__VUE_DEVTOOLS_PLUGINS__ = r.__VUE_DEVTOOLS_PLUGINS__ || []).push({
|
|
@@ -317,8 +317,8 @@ function wt(e, t) {
|
|
|
317
317
|
* (c) 2023 Eduardo San Martin Morote
|
|
318
318
|
* @license MIT
|
|
319
319
|
*/
|
|
320
|
-
let
|
|
321
|
-
const Ce = (e) =>
|
|
320
|
+
let Ne;
|
|
321
|
+
const Ce = (e) => Ne = e, wn = process.env.NODE_ENV !== "production" ? Symbol("pinia") : (
|
|
322
322
|
/* istanbul ignore next */
|
|
323
323
|
Symbol()
|
|
324
324
|
);
|
|
@@ -336,7 +336,7 @@ function Ir(e, { autoBom: t = !1 } = {}) {
|
|
|
336
336
|
function St(e, t, n) {
|
|
337
337
|
const r = new XMLHttpRequest();
|
|
338
338
|
r.open("GET", e), r.responseType = "blob", r.onload = function() {
|
|
339
|
-
|
|
339
|
+
kn(r.response, t, n);
|
|
340
340
|
}, r.onerror = function() {
|
|
341
341
|
console.error("could not download file");
|
|
342
342
|
}, r.send();
|
|
@@ -358,7 +358,7 @@ function je(e) {
|
|
|
358
358
|
n.initMouseEvent("click", !0, !0, window, 0, 0, 0, 80, 20, !1, !1, !1, !1, 0, null), e.dispatchEvent(n);
|
|
359
359
|
}
|
|
360
360
|
}
|
|
361
|
-
const Le = typeof navigator == "object" ? navigator : { userAgent: "" }, On = /Macintosh/.test(Le.userAgent) && /AppleWebKit/.test(Le.userAgent) && !/Safari/.test(Le.userAgent),
|
|
361
|
+
const Le = typeof navigator == "object" ? navigator : { userAgent: "" }, On = /Macintosh/.test(Le.userAgent) && /AppleWebKit/.test(Le.userAgent) && !/Safari/.test(Le.userAgent), kn = Ge ? (
|
|
362
362
|
// Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program
|
|
363
363
|
typeof HTMLAnchorElement < "u" && "download" in HTMLAnchorElement.prototype && !On ? Cr : (
|
|
364
364
|
// Use msSaveOrOpenBlob as a second approach
|
|
@@ -416,7 +416,7 @@ function x(e, t) {
|
|
|
416
416
|
function Ot(e) {
|
|
417
417
|
return "_a" in e && "install" in e;
|
|
418
418
|
}
|
|
419
|
-
function
|
|
419
|
+
function Nn() {
|
|
420
420
|
if (!("clipboard" in navigator))
|
|
421
421
|
return x("Your browser doesn't support the Clipboard API", "error"), !0;
|
|
422
422
|
}
|
|
@@ -424,7 +424,7 @@ function Pn(e) {
|
|
|
424
424
|
return e instanceof Error && e.message.toLowerCase().includes("document is not focused") ? (x('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.', "warn"), !0) : !1;
|
|
425
425
|
}
|
|
426
426
|
async function Dr(e) {
|
|
427
|
-
if (!
|
|
427
|
+
if (!Nn())
|
|
428
428
|
try {
|
|
429
429
|
await navigator.clipboard.writeText(JSON.stringify(e.state.value)), x("Global state copied to clipboard.");
|
|
430
430
|
} catch (t) {
|
|
@@ -434,7 +434,7 @@ async function Dr(e) {
|
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
436
|
async function Mr(e) {
|
|
437
|
-
if (!
|
|
437
|
+
if (!Nn())
|
|
438
438
|
try {
|
|
439
439
|
$n(e, JSON.parse(await navigator.clipboard.readText())), x("Global state pasted from clipboard.");
|
|
440
440
|
} catch (t) {
|
|
@@ -445,7 +445,7 @@ async function Mr(e) {
|
|
|
445
445
|
}
|
|
446
446
|
async function Vr(e) {
|
|
447
447
|
try {
|
|
448
|
-
|
|
448
|
+
kn(new Blob([JSON.stringify(e.state.value)], {
|
|
449
449
|
type: "text/plain;charset=utf-8"
|
|
450
450
|
}), "pinia-state.json");
|
|
451
451
|
} catch (t) {
|
|
@@ -937,8 +937,8 @@ function Ht(e, t, n, r) {
|
|
|
937
937
|
) : xt(n.state.value[e]);
|
|
938
938
|
return W(f, s, Object.keys(i || {}).reduce((l, d) => (process.env.NODE_ENV !== "production" && d in f && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${d}" in store "${e}".`), l[d] = ue(z(() => {
|
|
939
939
|
Ce(n);
|
|
940
|
-
const
|
|
941
|
-
return i[d].call(
|
|
940
|
+
const p = n._s.get(e);
|
|
941
|
+
return i[d].call(p, p);
|
|
942
942
|
})), l), {}));
|
|
943
943
|
}
|
|
944
944
|
return c = dt(e, u, t, n, r, !0), c;
|
|
@@ -953,31 +953,31 @@ function dt(e, t, n = {}, r, o, s) {
|
|
|
953
953
|
// flush: 'post',
|
|
954
954
|
};
|
|
955
955
|
process.env.NODE_ENV !== "production" && !En && (c.onTrigger = (E) => {
|
|
956
|
-
u ?
|
|
956
|
+
u ? p = E : u == !1 && !w._hotUpdating && (Array.isArray(p) ? p.push(E) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."));
|
|
957
957
|
});
|
|
958
|
-
let u, f, l = [], d = [],
|
|
958
|
+
let u, f, l = [], d = [], p;
|
|
959
959
|
const b = r.state.value[e];
|
|
960
960
|
!s && !b && (process.env.NODE_ENV === "production" || !o) && (r.state.value[e] = {});
|
|
961
961
|
const v = oe({});
|
|
962
962
|
let S;
|
|
963
963
|
function C(E) {
|
|
964
964
|
let y;
|
|
965
|
-
u = f = !1, process.env.NODE_ENV !== "production" && (
|
|
965
|
+
u = f = !1, process.env.NODE_ENV !== "production" && (p = []), typeof E == "function" ? (E(r.state.value[e]), y = {
|
|
966
966
|
type: Q.patchFunction,
|
|
967
967
|
storeId: e,
|
|
968
|
-
events:
|
|
968
|
+
events: p
|
|
969
969
|
}) : (ft(r.state.value[e], E), y = {
|
|
970
970
|
type: Q.patchObject,
|
|
971
971
|
payload: E,
|
|
972
972
|
storeId: e,
|
|
973
|
-
events:
|
|
973
|
+
events: p
|
|
974
974
|
});
|
|
975
975
|
const A = S = Symbol();
|
|
976
976
|
it().then(() => {
|
|
977
977
|
S === A && (u = !0);
|
|
978
978
|
}), f = !0, ge(l, y, r.state.value[e]);
|
|
979
979
|
}
|
|
980
|
-
const
|
|
980
|
+
const N = s ? function() {
|
|
981
981
|
const { state: y } = n, A = y ? y() : {};
|
|
982
982
|
this.$patch((M) => {
|
|
983
983
|
W(M, A);
|
|
@@ -1028,13 +1028,13 @@ function dt(e, t, n = {}, r, o, s) {
|
|
|
1028
1028
|
$id: e,
|
|
1029
1029
|
$onAction: Bt.bind(null, d),
|
|
1030
1030
|
$patch: C,
|
|
1031
|
-
$reset:
|
|
1031
|
+
$reset: N,
|
|
1032
1032
|
$subscribe(E, y = {}) {
|
|
1033
1033
|
const A = Bt(l, E, y.detached, () => M()), M = i.run(() => Te(() => r.state.value[e], (ie) => {
|
|
1034
1034
|
(y.flush === "sync" ? f : u) && E({
|
|
1035
1035
|
storeId: e,
|
|
1036
1036
|
type: Q.direct,
|
|
1037
|
-
events:
|
|
1037
|
+
events: p
|
|
1038
1038
|
}, ie);
|
|
1039
1039
|
}, W({}, c, y)));
|
|
1040
1040
|
return A;
|
|
@@ -1136,19 +1136,16 @@ Found in store "${w.$id}".`), b && s && n.hydrate && n.hydrate(w.$state, b), u =
|
|
|
1136
1136
|
function Yr(e, t, n) {
|
|
1137
1137
|
let r, o;
|
|
1138
1138
|
const s = typeof t == "function";
|
|
1139
|
-
|
|
1140
|
-
r = e, o = s ? n : t;
|
|
1141
|
-
else if (o = e, r = e.id, process.env.NODE_ENV !== "production" && typeof r != "string")
|
|
1142
|
-
throw new Error('[🍍]: "defineStore()" must be passed a store id as its first argument.');
|
|
1139
|
+
r = e, o = s ? n : t;
|
|
1143
1140
|
function i(a, c) {
|
|
1144
1141
|
const u = gr();
|
|
1145
1142
|
if (a = // in test mode, ignore the argument provided as we can always retrieve a
|
|
1146
1143
|
// pinia instance with getActivePinia()
|
|
1147
|
-
(process.env.NODE_ENV === "test" &&
|
|
1144
|
+
(process.env.NODE_ENV === "test" && Ne && Ne._testing ? null : a) || (u ? de(wn, null) : null), a && Ce(a), process.env.NODE_ENV !== "production" && !Ne)
|
|
1148
1145
|
throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
|
|
1149
1146
|
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
|
|
1150
1147
|
This will fail in production.`);
|
|
1151
|
-
a =
|
|
1148
|
+
a = Ne, a._s.has(r) || (s ? dt(r, t, o, a) : Ht(r, o, a), process.env.NODE_ENV !== "production" && (i._pinia = a));
|
|
1152
1149
|
const f = a._s.get(r);
|
|
1153
1150
|
if (process.env.NODE_ENV !== "production" && c) {
|
|
1154
1151
|
const l = "__hot:" + r, d = s ? dt(l, t, o, a, !0) : Ht(l, W({}, o), a, !0);
|
|
@@ -1158,8 +1155,8 @@ This will fail in production.`);
|
|
|
1158
1155
|
const l = Et();
|
|
1159
1156
|
if (l && l.proxy && // avoid adding stores that are just built for hot module replacement
|
|
1160
1157
|
!c) {
|
|
1161
|
-
const d = l.proxy,
|
|
1162
|
-
|
|
1158
|
+
const d = l.proxy, p = "_pStores" in d ? d._pStores : d._pStores = {};
|
|
1159
|
+
p[r] = f;
|
|
1163
1160
|
}
|
|
1164
1161
|
}
|
|
1165
1162
|
return f;
|
|
@@ -1245,20 +1242,20 @@ function O(e) {
|
|
|
1245
1242
|
console.warn.apply(console, ["[Vue Router warn]: " + e].concat(t));
|
|
1246
1243
|
}
|
|
1247
1244
|
const Tn = /#/g, eo = /&/g, to = /\//g, no = /=/g, ro = /\?/g, Dn = /\+/g, oo = /%5B/g, so = /%5D/g, Mn = /%5E/g, io = /%60/g, Vn = /%7B/g, ao = /%7C/g, xn = /%7D/g, co = /%20/g;
|
|
1248
|
-
function
|
|
1245
|
+
function kt(e) {
|
|
1249
1246
|
return encodeURI("" + e).replace(ao, "|").replace(oo, "[").replace(so, "]");
|
|
1250
1247
|
}
|
|
1251
1248
|
function uo(e) {
|
|
1252
|
-
return
|
|
1249
|
+
return kt(e).replace(Vn, "{").replace(xn, "}").replace(Mn, "^");
|
|
1253
1250
|
}
|
|
1254
1251
|
function pt(e) {
|
|
1255
|
-
return
|
|
1252
|
+
return kt(e).replace(Dn, "%2B").replace(co, "+").replace(Tn, "%23").replace(eo, "%26").replace(io, "`").replace(Vn, "{").replace(xn, "}").replace(Mn, "^");
|
|
1256
1253
|
}
|
|
1257
1254
|
function lo(e) {
|
|
1258
1255
|
return pt(e).replace(no, "%3D");
|
|
1259
1256
|
}
|
|
1260
1257
|
function fo(e) {
|
|
1261
|
-
return
|
|
1258
|
+
return kt(e).replace(Tn, "%23").replace(ro, "%3F");
|
|
1262
1259
|
}
|
|
1263
1260
|
function ho(e) {
|
|
1264
1261
|
return e == null ? "" : fo(e).replace(to, "%2F");
|
|
@@ -1406,11 +1403,11 @@ const mt = /* @__PURE__ */ new Map();
|
|
|
1406
1403
|
function Oo(e, t) {
|
|
1407
1404
|
mt.set(e, t);
|
|
1408
1405
|
}
|
|
1409
|
-
function
|
|
1406
|
+
function ko(e) {
|
|
1410
1407
|
const t = mt.get(e);
|
|
1411
1408
|
return mt.delete(e), t;
|
|
1412
1409
|
}
|
|
1413
|
-
let
|
|
1410
|
+
let No = () => location.protocol + "//" + location.host;
|
|
1414
1411
|
function Ln(e, t) {
|
|
1415
1412
|
const { pathname: n, search: r, hash: o } = t, s = e.indexOf("#");
|
|
1416
1413
|
if (s > -1) {
|
|
@@ -1422,16 +1419,16 @@ function Ln(e, t) {
|
|
|
1422
1419
|
function Po(e, t, n, r) {
|
|
1423
1420
|
let o = [], s = [], i = null;
|
|
1424
1421
|
const a = ({ state: d }) => {
|
|
1425
|
-
const
|
|
1422
|
+
const p = Ln(e, location), b = n.value, v = t.value;
|
|
1426
1423
|
let S = 0;
|
|
1427
1424
|
if (d) {
|
|
1428
|
-
if (n.value =
|
|
1425
|
+
if (n.value = p, t.value = d, i && i === b) {
|
|
1429
1426
|
i = null;
|
|
1430
1427
|
return;
|
|
1431
1428
|
}
|
|
1432
1429
|
S = v ? d.position - v.position : 0;
|
|
1433
1430
|
} else
|
|
1434
|
-
r(
|
|
1431
|
+
r(p);
|
|
1435
1432
|
o.forEach((C) => {
|
|
1436
1433
|
C(n.value, b, {
|
|
1437
1434
|
delta: S,
|
|
@@ -1445,11 +1442,11 @@ function Po(e, t, n, r) {
|
|
|
1445
1442
|
}
|
|
1446
1443
|
function u(d) {
|
|
1447
1444
|
o.push(d);
|
|
1448
|
-
const
|
|
1445
|
+
const p = () => {
|
|
1449
1446
|
const b = o.indexOf(d);
|
|
1450
1447
|
b > -1 && o.splice(b, 1);
|
|
1451
1448
|
};
|
|
1452
|
-
return s.push(
|
|
1449
|
+
return s.push(p), p;
|
|
1453
1450
|
}
|
|
1454
1451
|
function f() {
|
|
1455
1452
|
const { history: d } = window;
|
|
@@ -1494,11 +1491,11 @@ function $o(e) {
|
|
|
1494
1491
|
scroll: null
|
|
1495
1492
|
}, !0);
|
|
1496
1493
|
function s(c, u, f) {
|
|
1497
|
-
const l = e.indexOf("#"), d = l > -1 ? (n.host && document.querySelector("base") ? e : e.slice(l)) + c :
|
|
1494
|
+
const l = e.indexOf("#"), d = l > -1 ? (n.host && document.querySelector("base") ? e : e.slice(l)) + c : No() + e + c;
|
|
1498
1495
|
try {
|
|
1499
1496
|
t[f ? "replaceState" : "pushState"](u, "", d), o.value = u;
|
|
1500
|
-
} catch (
|
|
1501
|
-
process.env.NODE_ENV !== "production" ? O("Error with push/replace State",
|
|
1497
|
+
} catch (p) {
|
|
1498
|
+
process.env.NODE_ENV !== "production" ? O("Error with push/replace State", p) : console.error(p), n[f ? "replace" : "assign"](d);
|
|
1502
1499
|
}
|
|
1503
1500
|
}
|
|
1504
1501
|
function i(c, u) {
|
|
@@ -1632,9 +1629,9 @@ function Mo(e, t) {
|
|
|
1632
1629
|
n.strict && !u.length && (o += "/");
|
|
1633
1630
|
for (let l = 0; l < u.length; l++) {
|
|
1634
1631
|
const d = u[l];
|
|
1635
|
-
let
|
|
1632
|
+
let p = 40 + (n.sensitive ? 0.25 : 0);
|
|
1636
1633
|
if (d.type === 0)
|
|
1637
|
-
l || (o += "/"), o += d.value.replace(Do, "\\$&"),
|
|
1634
|
+
l || (o += "/"), o += d.value.replace(Do, "\\$&"), p += 40;
|
|
1638
1635
|
else if (d.type === 1) {
|
|
1639
1636
|
const { value: b, repeatable: v, optional: S, regexp: C } = d;
|
|
1640
1637
|
s.push({
|
|
@@ -1642,21 +1639,21 @@ function Mo(e, t) {
|
|
|
1642
1639
|
repeatable: v,
|
|
1643
1640
|
optional: S
|
|
1644
1641
|
});
|
|
1645
|
-
const
|
|
1646
|
-
if (
|
|
1647
|
-
|
|
1642
|
+
const N = C || Kt;
|
|
1643
|
+
if (N !== Kt) {
|
|
1644
|
+
p += 10;
|
|
1648
1645
|
try {
|
|
1649
|
-
new RegExp(`(${
|
|
1646
|
+
new RegExp(`(${N})`);
|
|
1650
1647
|
} catch (j) {
|
|
1651
|
-
throw new Error(`Invalid custom RegExp for param "${b}" (${
|
|
1648
|
+
throw new Error(`Invalid custom RegExp for param "${b}" (${N}): ` + j.message);
|
|
1652
1649
|
}
|
|
1653
1650
|
}
|
|
1654
|
-
let P = v ? `((?:${
|
|
1651
|
+
let P = v ? `((?:${N})(?:/(?:${N}))*)` : `(${N})`;
|
|
1655
1652
|
l || (P = // avoid an optional / if there are more segments e.g. /:p?-static
|
|
1656
1653
|
// or /:p?-:p2
|
|
1657
|
-
S && u.length < 2 ? `(?:/${P})` : "/" + P), S && (P += "?"), o += P,
|
|
1654
|
+
S && u.length < 2 ? `(?:/${P})` : "/" + P), S && (P += "?"), o += P, p += 20, S && (p += -8), v && (p += -20), N === ".*" && (p += -50);
|
|
1658
1655
|
}
|
|
1659
|
-
f.push(
|
|
1656
|
+
f.push(p);
|
|
1660
1657
|
}
|
|
1661
1658
|
r.push(f);
|
|
1662
1659
|
}
|
|
@@ -1671,8 +1668,8 @@ function Mo(e, t) {
|
|
|
1671
1668
|
if (!f)
|
|
1672
1669
|
return null;
|
|
1673
1670
|
for (let d = 1; d < f.length; d++) {
|
|
1674
|
-
const
|
|
1675
|
-
l[b.name] =
|
|
1671
|
+
const p = f[d] || "", b = s[d - 1];
|
|
1672
|
+
l[b.name] = p && b.repeatable ? p.split("/") : p;
|
|
1676
1673
|
}
|
|
1677
1674
|
return l;
|
|
1678
1675
|
}
|
|
@@ -1680,20 +1677,20 @@ function Mo(e, t) {
|
|
|
1680
1677
|
let f = "", l = !1;
|
|
1681
1678
|
for (const d of e) {
|
|
1682
1679
|
(!l || !f.endsWith("/")) && (f += "/"), l = !1;
|
|
1683
|
-
for (const
|
|
1684
|
-
if (
|
|
1685
|
-
f +=
|
|
1686
|
-
else if (
|
|
1687
|
-
const { value: b, repeatable: v, optional: S } =
|
|
1680
|
+
for (const p of d)
|
|
1681
|
+
if (p.type === 0)
|
|
1682
|
+
f += p.value;
|
|
1683
|
+
else if (p.type === 1) {
|
|
1684
|
+
const { value: b, repeatable: v, optional: S } = p, C = b in u ? u[b] : "";
|
|
1688
1685
|
if (F(C) && !v)
|
|
1689
1686
|
throw new Error(`Provided param "${b}" is an array but it is not repeatable (* or + modifiers)`);
|
|
1690
|
-
const
|
|
1691
|
-
if (!
|
|
1687
|
+
const N = F(C) ? C.join("/") : C;
|
|
1688
|
+
if (!N)
|
|
1692
1689
|
if (S)
|
|
1693
1690
|
d.length < 2 && (f.endsWith("/") ? f = f.slice(0, -1) : l = !0);
|
|
1694
1691
|
else
|
|
1695
1692
|
throw new Error(`Missing required param "${b}"`);
|
|
1696
|
-
f +=
|
|
1693
|
+
f += N;
|
|
1697
1694
|
}
|
|
1698
1695
|
}
|
|
1699
1696
|
return f || "/";
|
|
@@ -1748,8 +1745,8 @@ function Lo(e) {
|
|
|
1748
1745
|
return [[xo]];
|
|
1749
1746
|
if (!e.startsWith("/"))
|
|
1750
1747
|
throw new Error(process.env.NODE_ENV !== "production" ? `Route paths should start with a "/": "${e}" should be "/${e}".` : `Invalid path "${e}"`);
|
|
1751
|
-
function t(
|
|
1752
|
-
throw new Error(`ERR (${n})/"${u}": ${
|
|
1748
|
+
function t(p) {
|
|
1749
|
+
throw new Error(`ERR (${n})/"${u}": ${p}`);
|
|
1753
1750
|
}
|
|
1754
1751
|
let n = 0, r = n;
|
|
1755
1752
|
const o = [];
|
|
@@ -1823,9 +1820,9 @@ function Uo(e, t) {
|
|
|
1823
1820
|
function o(l) {
|
|
1824
1821
|
return r.get(l);
|
|
1825
1822
|
}
|
|
1826
|
-
function s(l, d,
|
|
1827
|
-
const b = !
|
|
1828
|
-
process.env.NODE_ENV !== "production" && zo(v, d), v.aliasOf =
|
|
1823
|
+
function s(l, d, p) {
|
|
1824
|
+
const b = !p, v = Ho(l);
|
|
1825
|
+
process.env.NODE_ENV !== "production" && zo(v, d), v.aliasOf = p && p.record;
|
|
1829
1826
|
const S = Zt(t, l), C = [
|
|
1830
1827
|
v
|
|
1831
1828
|
];
|
|
@@ -1835,15 +1832,15 @@ function Uo(e, t) {
|
|
|
1835
1832
|
C.push(I({}, v, {
|
|
1836
1833
|
// this allows us to hold a copy of the `components` option
|
|
1837
1834
|
// so that async components cache is hold on the original record
|
|
1838
|
-
components:
|
|
1835
|
+
components: p ? p.record.components : v.components,
|
|
1839
1836
|
path: U,
|
|
1840
1837
|
// we might be the child of an alias
|
|
1841
|
-
aliasOf:
|
|
1838
|
+
aliasOf: p ? p.record : v
|
|
1842
1839
|
// the aliases are always of the same kind as the original since they
|
|
1843
1840
|
// are defined on the same record
|
|
1844
1841
|
}));
|
|
1845
1842
|
}
|
|
1846
|
-
let
|
|
1843
|
+
let N, P;
|
|
1847
1844
|
for (const j of C) {
|
|
1848
1845
|
const { path: U } = j;
|
|
1849
1846
|
if (d && U[0] !== "/") {
|
|
@@ -1853,12 +1850,12 @@ function Uo(e, t) {
|
|
|
1853
1850
|
if (process.env.NODE_ENV !== "production" && j.path === "*")
|
|
1854
1851
|
throw new Error(`Catch all routes ("*") must now be defined using a param with a custom regexp.
|
|
1855
1852
|
See more at https://next.router.vuejs.org/guide/migration/#removed-star-or-catch-all-routes.`);
|
|
1856
|
-
if (
|
|
1853
|
+
if (N = Bo(j, d, S), process.env.NODE_ENV !== "production" && d && U[0] === "/" && qo(N, d), p ? (p.alias.push(N), process.env.NODE_ENV !== "production" && Wo(p, N)) : (P = P || N, P !== N && P.alias.push(N), b && l.name && !Xt(N) && i(l.name)), Hn(N) && c(N), v.children) {
|
|
1857
1854
|
const q = v.children;
|
|
1858
1855
|
for (let w = 0; w < q.length; w++)
|
|
1859
|
-
s(q[w],
|
|
1856
|
+
s(q[w], N, p && p.children[w]);
|
|
1860
1857
|
}
|
|
1861
|
-
|
|
1858
|
+
p = p || N;
|
|
1862
1859
|
}
|
|
1863
1860
|
return P ? () => {
|
|
1864
1861
|
i(P);
|
|
@@ -1881,42 +1878,42 @@ See more at https://next.router.vuejs.org/guide/migration/#removed-star-or-catch
|
|
|
1881
1878
|
n.splice(d, 0, l), l.record.name && !Xt(l) && r.set(l.record.name, l);
|
|
1882
1879
|
}
|
|
1883
1880
|
function u(l, d) {
|
|
1884
|
-
let
|
|
1881
|
+
let p, b = {}, v, S;
|
|
1885
1882
|
if ("name" in l && l.name) {
|
|
1886
|
-
if (
|
|
1883
|
+
if (p = r.get(l.name), !p)
|
|
1887
1884
|
throw we(1, {
|
|
1888
1885
|
location: l
|
|
1889
1886
|
});
|
|
1890
1887
|
if (process.env.NODE_ENV !== "production") {
|
|
1891
|
-
const P = Object.keys(l.params || {}).filter((j) => !
|
|
1888
|
+
const P = Object.keys(l.params || {}).filter((j) => !p.keys.find((U) => U.name === j));
|
|
1892
1889
|
P.length && O(`Discarded invalid param(s) "${P.join('", "')}" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`);
|
|
1893
1890
|
}
|
|
1894
|
-
S =
|
|
1891
|
+
S = p.record.name, b = I(
|
|
1895
1892
|
// paramsFromLocation is a new object
|
|
1896
1893
|
Yt(
|
|
1897
1894
|
d.params,
|
|
1898
1895
|
// only keep params that exist in the resolved location
|
|
1899
1896
|
// only keep optional params coming from a parent record
|
|
1900
|
-
|
|
1897
|
+
p.keys.filter((P) => !P.optional).concat(p.parent ? p.parent.keys.filter((P) => P.optional) : []).map((P) => P.name)
|
|
1901
1898
|
),
|
|
1902
1899
|
// discard any existing params in the current location that do not exist here
|
|
1903
1900
|
// #1497 this ensures better active/exact matching
|
|
1904
|
-
l.params && Yt(l.params,
|
|
1905
|
-
), v =
|
|
1901
|
+
l.params && Yt(l.params, p.keys.map((P) => P.name))
|
|
1902
|
+
), v = p.stringify(b);
|
|
1906
1903
|
} else if (l.path != null)
|
|
1907
|
-
v = l.path, process.env.NODE_ENV !== "production" && !v.startsWith("/") && O(`The Matcher cannot resolve relative paths but received "${v}". Unless you directly called \`matcher.resolve("${v}")\`, this is probably a bug in vue-router. Please open an issue at https://github.com/vuejs/router/issues/new/choose.`),
|
|
1904
|
+
v = l.path, process.env.NODE_ENV !== "production" && !v.startsWith("/") && O(`The Matcher cannot resolve relative paths but received "${v}". Unless you directly called \`matcher.resolve("${v}")\`, this is probably a bug in vue-router. Please open an issue at https://github.com/vuejs/router/issues/new/choose.`), p = n.find((P) => P.re.test(v)), p && (b = p.parse(v), S = p.record.name);
|
|
1908
1905
|
else {
|
|
1909
|
-
if (
|
|
1906
|
+
if (p = d.name ? r.get(d.name) : n.find((P) => P.re.test(d.path)), !p)
|
|
1910
1907
|
throw we(1, {
|
|
1911
1908
|
location: l,
|
|
1912
1909
|
currentLocation: d
|
|
1913
1910
|
});
|
|
1914
|
-
S =
|
|
1911
|
+
S = p.record.name, b = I({}, d.params, l.params), v = p.stringify(b);
|
|
1915
1912
|
}
|
|
1916
1913
|
const C = [];
|
|
1917
|
-
let
|
|
1918
|
-
for (;
|
|
1919
|
-
C.unshift(
|
|
1914
|
+
let N = p;
|
|
1915
|
+
for (; N; )
|
|
1916
|
+
C.unshift(N.record), N = N.parent;
|
|
1920
1917
|
return {
|
|
1921
1918
|
name: S,
|
|
1922
1919
|
path: v,
|
|
@@ -2061,7 +2058,7 @@ function Yo(e) {
|
|
|
2061
2058
|
}
|
|
2062
2059
|
return t;
|
|
2063
2060
|
}
|
|
2064
|
-
const Xo = Symbol(process.env.NODE_ENV !== "production" ? "router view location matched" : ""), tn = Symbol(process.env.NODE_ENV !== "production" ? "router view depth" : ""),
|
|
2061
|
+
const Xo = Symbol(process.env.NODE_ENV !== "production" ? "router view location matched" : ""), tn = Symbol(process.env.NODE_ENV !== "production" ? "router view depth" : ""), Nt = Symbol(process.env.NODE_ENV !== "production" ? "router" : ""), Fn = Symbol(process.env.NODE_ENV !== "production" ? "route location" : ""), yt = Symbol(process.env.NODE_ENV !== "production" ? "router view location" : "");
|
|
2065
2062
|
function Oe() {
|
|
2066
2063
|
let e = [];
|
|
2067
2064
|
function t(r) {
|
|
@@ -2099,7 +2096,7 @@ function ne(e, t, n, r, o, s = (i) => i()) {
|
|
|
2099
2096
|
${e.toString()}
|
|
2100
2097
|
. If you are returning a value instead of calling "next", make sure to remove the "next" parameter from your function.`;
|
|
2101
2098
|
if (typeof f == "object" && "then" in f)
|
|
2102
|
-
l = l.then((
|
|
2099
|
+
l = l.then((p) => u._called ? p : (O(d), Promise.reject(new Error("Invalid navigation guard"))));
|
|
2103
2100
|
else if (f !== void 0 && !u._called) {
|
|
2104
2101
|
O(d), c(new Error("Invalid navigation guard"));
|
|
2105
2102
|
return;
|
|
@@ -2141,8 +2138,8 @@ function nt(e, t, n, r, o = (s) => s()) {
|
|
|
2141
2138
|
return Promise.reject(new Error(`Couldn't resolve component "${a}" at "${i.path}"`));
|
|
2142
2139
|
const l = Zr(f) ? f.default : f;
|
|
2143
2140
|
i.components[a] = l;
|
|
2144
|
-
const
|
|
2145
|
-
return
|
|
2141
|
+
const p = (l.__vccOpts || l)[t];
|
|
2142
|
+
return p && ne(p, n, r, i, a, o)();
|
|
2146
2143
|
}));
|
|
2147
2144
|
}
|
|
2148
2145
|
}
|
|
@@ -2153,7 +2150,7 @@ function es(e) {
|
|
|
2153
2150
|
return typeof e == "object" || "displayName" in e || "props" in e || "__vccOpts" in e;
|
|
2154
2151
|
}
|
|
2155
2152
|
function nn(e) {
|
|
2156
|
-
const t = de(
|
|
2153
|
+
const t = de(Nt), n = de(Fn);
|
|
2157
2154
|
let r = !1, o = null;
|
|
2158
2155
|
const s = z(() => {
|
|
2159
2156
|
const f = le(e.to);
|
|
@@ -2164,10 +2161,10 @@ function nn(e) {
|
|
|
2164
2161
|
- to:`, f, `
|
|
2165
2162
|
- props:`, e)), o = f, r = !0), t.resolve(f);
|
|
2166
2163
|
}), i = z(() => {
|
|
2167
|
-
const { matched: f } = s.value, { length: l } = f, d = f[l - 1],
|
|
2168
|
-
if (!d || !
|
|
2164
|
+
const { matched: f } = s.value, { length: l } = f, d = f[l - 1], p = n.matched;
|
|
2165
|
+
if (!d || !p.length)
|
|
2169
2166
|
return -1;
|
|
2170
|
-
const b =
|
|
2167
|
+
const b = p.findIndex(se.bind(null, d));
|
|
2171
2168
|
if (b > -1)
|
|
2172
2169
|
return b;
|
|
2173
2170
|
const v = rn(f[l - 2]);
|
|
@@ -2177,7 +2174,7 @@ function nn(e) {
|
|
|
2177
2174
|
// referring to the empty child. Or we currently are on a different
|
|
2178
2175
|
// child of the same parent
|
|
2179
2176
|
rn(d) === v && // avoid comparing the child with its parent
|
|
2180
|
-
|
|
2177
|
+
p[p.length - 1].path !== v ? p.findIndex(se.bind(null, f[l - 2])) : b
|
|
2181
2178
|
);
|
|
2182
2179
|
}), a = z(() => i.value > -1 && os(n.params, s.value.params)), c = z(() => i.value > -1 && i.value === n.matched.length - 1 && jn(n.params, s.value.params));
|
|
2183
2180
|
function u(f = {}) {
|
|
@@ -2228,7 +2225,7 @@ const ts = /* @__PURE__ */ yn({
|
|
|
2228
2225
|
},
|
|
2229
2226
|
useLink: nn,
|
|
2230
2227
|
setup(e, { slots: t }) {
|
|
2231
|
-
const n = vn(nn(e)), { options: r } = de(
|
|
2228
|
+
const n = vn(nn(e)), { options: r } = de(Nt), o = z(() => ({
|
|
2232
2229
|
[on(e.activeClass, r.linkActiveClass, "router-link-active")]: n.isActive,
|
|
2233
2230
|
// [getLinkClass(
|
|
2234
2231
|
// props.inactiveClass,
|
|
@@ -2300,15 +2297,15 @@ const on = (e, t, n) => e ?? t ?? n, ss = /* @__PURE__ */ yn({
|
|
|
2300
2297
|
}), a = z(() => o.value.matched[i.value]);
|
|
2301
2298
|
Xe(tn, z(() => i.value + 1)), Xe(Xo, a), Xe(yt, o);
|
|
2302
2299
|
const c = oe();
|
|
2303
|
-
return Te(() => [c.value, a.value, e.name], ([u, f, l], [d,
|
|
2304
|
-
f && (f.instances[l] = u,
|
|
2300
|
+
return Te(() => [c.value, a.value, e.name], ([u, f, l], [d, p, b]) => {
|
|
2301
|
+
f && (f.instances[l] = u, p && p !== f && u && u === d && (f.leaveGuards.size || (f.leaveGuards = p.leaveGuards), f.updateGuards.size || (f.updateGuards = p.updateGuards))), u && f && // if there is no instance but to and from are the same this might be
|
|
2305
2302
|
// the first visit
|
|
2306
|
-
(!
|
|
2303
|
+
(!p || !se(f, p) || !d) && (f.enterCallbacks[l] || []).forEach((v) => v(u));
|
|
2307
2304
|
}, { flush: "post" }), () => {
|
|
2308
2305
|
const u = o.value, f = e.name, l = a.value, d = l && l.components[f];
|
|
2309
2306
|
if (!d)
|
|
2310
2307
|
return sn(n.default, { Component: d, route: u });
|
|
2311
|
-
const
|
|
2308
|
+
const p = l.props[f], b = p ? p === !0 ? u.params : typeof p == "function" ? p(u) : p : null, S = _n(d, I({}, b, t, {
|
|
2312
2309
|
onVnodeUnmounted: (C) => {
|
|
2313
2310
|
C.component.isUnmounted && (l.instances[f] = null);
|
|
2314
2311
|
},
|
|
@@ -2354,7 +2351,7 @@ Use slot props instead:
|
|
|
2354
2351
|
</router-view>`);
|
|
2355
2352
|
}
|
|
2356
2353
|
}
|
|
2357
|
-
function
|
|
2354
|
+
function ke(e, t) {
|
|
2358
2355
|
const n = I({}, e, {
|
|
2359
2356
|
// remove variables that can contain vue instances
|
|
2360
2357
|
matched: e.matched.map((r) => ys(r, ["instances", "children", "aliasOf"]))
|
|
@@ -2396,7 +2393,7 @@ function us(e, t, n) {
|
|
|
2396
2393
|
type: "Routing",
|
|
2397
2394
|
key: "$route",
|
|
2398
2395
|
editable: !1,
|
|
2399
|
-
value:
|
|
2396
|
+
value: ke(t.currentRoute.value, "Current Route")
|
|
2400
2397
|
});
|
|
2401
2398
|
}), o.on.visitComponentTree(({ treeNode: f, componentInstance: l }) => {
|
|
2402
2399
|
if (l.__vrv_devtools) {
|
|
@@ -2409,9 +2406,9 @@ function us(e, t, n) {
|
|
|
2409
2406
|
});
|
|
2410
2407
|
}
|
|
2411
2408
|
F(l.__vrl_devtools) && (l.__devtoolsApi = o, l.__vrl_devtools.forEach((d) => {
|
|
2412
|
-
let
|
|
2413
|
-
d.error ? (
|
|
2414
|
-
label:
|
|
2409
|
+
let p = d.route.path, b = qn, v = "", S = 0;
|
|
2410
|
+
d.error ? (p = d.error, b = ps, S = ms) : d.isExactActive ? (b = zn, v = "This is exactly active") : d.isActive && (b = Wn, v = "This link is active"), f.tags.push({
|
|
2411
|
+
label: p,
|
|
2415
2412
|
textColor: S,
|
|
2416
2413
|
tooltip: v,
|
|
2417
2414
|
backgroundColor: b
|
|
@@ -2442,8 +2439,8 @@ function us(e, t, n) {
|
|
|
2442
2439
|
t.beforeEach((f, l) => {
|
|
2443
2440
|
const d = {
|
|
2444
2441
|
guard: xe("beforeEach"),
|
|
2445
|
-
from:
|
|
2446
|
-
to:
|
|
2442
|
+
from: ke(l, "Current Location during this navigation"),
|
|
2443
|
+
to: ke(f, "Target location")
|
|
2447
2444
|
};
|
|
2448
2445
|
Object.defineProperty(f.meta, "__navigationId", {
|
|
2449
2446
|
value: i++
|
|
@@ -2458,10 +2455,10 @@ function us(e, t, n) {
|
|
|
2458
2455
|
}
|
|
2459
2456
|
});
|
|
2460
2457
|
}), t.afterEach((f, l, d) => {
|
|
2461
|
-
const
|
|
2458
|
+
const p = {
|
|
2462
2459
|
guard: xe("afterEach")
|
|
2463
2460
|
};
|
|
2464
|
-
d ? (
|
|
2461
|
+
d ? (p.failure = {
|
|
2465
2462
|
_custom: {
|
|
2466
2463
|
type: Error,
|
|
2467
2464
|
readOnly: !0,
|
|
@@ -2469,13 +2466,13 @@ function us(e, t, n) {
|
|
|
2469
2466
|
tooltip: "Navigation Failure",
|
|
2470
2467
|
value: d
|
|
2471
2468
|
}
|
|
2472
|
-
},
|
|
2469
|
+
}, p.status = xe("❌")) : p.status = xe("✅"), p.from = ke(l, "Current Location during this navigation"), p.to = ke(f, "Target location"), o.addTimelineEvent({
|
|
2473
2470
|
layerId: s,
|
|
2474
2471
|
event: {
|
|
2475
2472
|
title: "End of navigation",
|
|
2476
2473
|
subtitle: f.fullPath,
|
|
2477
2474
|
time: o.now(),
|
|
2478
|
-
data:
|
|
2475
|
+
data: p,
|
|
2479
2476
|
logType: d ? "warning" : "default",
|
|
2480
2477
|
groupId: f.meta.__navigationId
|
|
2481
2478
|
}
|
|
@@ -2505,7 +2502,7 @@ function us(e, t, n) {
|
|
|
2505
2502
|
u = f, f.app === e && f.inspectorId === a && c();
|
|
2506
2503
|
}), o.on.getInspectorState((f) => {
|
|
2507
2504
|
if (f.app === e && f.inspectorId === a) {
|
|
2508
|
-
const d = n.getRoutes().find((
|
|
2505
|
+
const d = n.getRoutes().find((p) => p.record.__vd_id === f.nodeId);
|
|
2509
2506
|
d && (f.state = {
|
|
2510
2507
|
options: fs(d)
|
|
2511
2508
|
});
|
|
@@ -2629,58 +2626,58 @@ function _s(e) {
|
|
|
2629
2626
|
const s = Oe(), i = Oe(), a = Oe(), c = Er(te);
|
|
2630
2627
|
let u = te;
|
|
2631
2628
|
Z && e.scrollBehavior && "scrollRestoration" in history && (history.scrollRestoration = "manual");
|
|
2632
|
-
const f = et.bind(null, (
|
|
2629
|
+
const f = et.bind(null, (h) => "" + h), l = et.bind(null, ho), d = (
|
|
2633
2630
|
// @ts-expect-error: intentionally avoid the type check
|
|
2634
2631
|
et.bind(null, be)
|
|
2635
2632
|
);
|
|
2636
|
-
function h
|
|
2633
|
+
function p(h, g) {
|
|
2637
2634
|
let m, _;
|
|
2638
|
-
return Bn(
|
|
2635
|
+
return Bn(h) ? (m = t.getRecordMatcher(h), process.env.NODE_ENV !== "production" && !m && O(`Parent route "${String(h)}" not found when adding child route`, g), _ = g) : _ = h, t.addRoute(_, m);
|
|
2639
2636
|
}
|
|
2640
|
-
function b(
|
|
2641
|
-
const g = t.getRecordMatcher(
|
|
2642
|
-
g ? t.removeRoute(g) : process.env.NODE_ENV !== "production" && O(`Cannot remove non-existent route "${String(
|
|
2637
|
+
function b(h) {
|
|
2638
|
+
const g = t.getRecordMatcher(h);
|
|
2639
|
+
g ? t.removeRoute(g) : process.env.NODE_ENV !== "production" && O(`Cannot remove non-existent route "${String(h)}"`);
|
|
2643
2640
|
}
|
|
2644
2641
|
function v() {
|
|
2645
|
-
return t.getRoutes().map((
|
|
2642
|
+
return t.getRoutes().map((h) => h.record);
|
|
2646
2643
|
}
|
|
2647
|
-
function S(
|
|
2648
|
-
return !!t.getRecordMatcher(
|
|
2644
|
+
function S(h) {
|
|
2645
|
+
return !!t.getRecordMatcher(h);
|
|
2649
2646
|
}
|
|
2650
|
-
function C(
|
|
2651
|
-
if (g = I({}, g || c.value), typeof
|
|
2652
|
-
const
|
|
2653
|
-
return process.env.NODE_ENV !== "production" && (ae.startsWith("//") ? O(`Location "${
|
|
2647
|
+
function C(h, g) {
|
|
2648
|
+
if (g = I({}, g || c.value), typeof h == "string") {
|
|
2649
|
+
const k = tt(n, h, g.path), T = t.resolve({ path: k.path }, g), ae = o.createHref(k.fullPath);
|
|
2650
|
+
return process.env.NODE_ENV !== "production" && (ae.startsWith("//") ? O(`Location "${h}" resolved to "${ae}". A resolved location cannot start with multiple slashes.`) : T.matched.length || O(`No match found for location with path "${h}"`)), I(k, T, {
|
|
2654
2651
|
params: d(T.params),
|
|
2655
|
-
hash: be(
|
|
2652
|
+
hash: be(k.hash),
|
|
2656
2653
|
redirectedFrom: void 0,
|
|
2657
2654
|
href: ae
|
|
2658
2655
|
});
|
|
2659
2656
|
}
|
|
2660
|
-
if (process.env.NODE_ENV !== "production" && !He(
|
|
2657
|
+
if (process.env.NODE_ENV !== "production" && !He(h))
|
|
2661
2658
|
return O(`router.resolve() was passed an invalid location. This will fail in production.
|
|
2662
|
-
- Location:`,
|
|
2659
|
+
- Location:`, h), C({});
|
|
2663
2660
|
let m;
|
|
2664
|
-
if (
|
|
2665
|
-
process.env.NODE_ENV !== "production" && "params" in
|
|
2666
|
-
Object.keys(
|
|
2667
|
-
path: tt(n,
|
|
2661
|
+
if (h.path != null)
|
|
2662
|
+
process.env.NODE_ENV !== "production" && "params" in h && !("name" in h) && // @ts-expect-error: the type is never
|
|
2663
|
+
Object.keys(h.params).length && O(`Path "${h.path}" was passed with params but they will be ignored. Use a named route alongside params instead.`), m = I({}, h, {
|
|
2664
|
+
path: tt(n, h.path, g.path).path
|
|
2668
2665
|
});
|
|
2669
2666
|
else {
|
|
2670
|
-
const
|
|
2671
|
-
for (const T in
|
|
2672
|
-
|
|
2673
|
-
m = I({},
|
|
2674
|
-
params: l(
|
|
2667
|
+
const k = I({}, h.params);
|
|
2668
|
+
for (const T in k)
|
|
2669
|
+
k[T] == null && delete k[T];
|
|
2670
|
+
m = I({}, h, {
|
|
2671
|
+
params: l(k)
|
|
2675
2672
|
}), g.params = l(g.params);
|
|
2676
2673
|
}
|
|
2677
|
-
const _ = t.resolve(m, g), R =
|
|
2674
|
+
const _ = t.resolve(m, g), R = h.hash || "";
|
|
2678
2675
|
process.env.NODE_ENV !== "production" && R && !R.startsWith("#") && O(`A \`hash\` should always start with the character "#". Replace "${R}" with "#${R}".`), _.params = f(d(_.params));
|
|
2679
|
-
const D = go(r, I({},
|
|
2676
|
+
const D = go(r, I({}, h, {
|
|
2680
2677
|
hash: uo(R),
|
|
2681
2678
|
path: _.path
|
|
2682
2679
|
})), $ = o.createHref(D);
|
|
2683
|
-
return process.env.NODE_ENV !== "production" && ($.startsWith("//") ? O(`Location "${
|
|
2680
|
+
return process.env.NODE_ENV !== "production" && ($.startsWith("//") ? O(`Location "${h}" resolved to "${$}". A resolved location cannot start with multiple slashes.`) : _.matched.length || O(`No match found for location with path "${h.path != null ? h.path : h}"`)), I({
|
|
2684
2681
|
fullPath: D,
|
|
2685
2682
|
// keep the hash encoded so fullPath is effectively path + encodedQuery +
|
|
2686
2683
|
// hash
|
|
@@ -2691,55 +2688,55 @@ function _s(e) {
|
|
|
2691
2688
|
// numbers at `$route.query`, but at the point, the user will have to
|
|
2692
2689
|
// use their own type anyway.
|
|
2693
2690
|
// https://github.com/vuejs/router/issues/328#issuecomment-649481567
|
|
2694
|
-
r === en ? Yo(
|
|
2691
|
+
r === en ? Yo(h.query) : h.query || {}
|
|
2695
2692
|
)
|
|
2696
2693
|
}, _, {
|
|
2697
2694
|
redirectedFrom: void 0,
|
|
2698
2695
|
href: $
|
|
2699
2696
|
});
|
|
2700
2697
|
}
|
|
2701
|
-
function
|
|
2702
|
-
return typeof
|
|
2698
|
+
function N(h) {
|
|
2699
|
+
return typeof h == "string" ? tt(n, h, c.value.path) : I({}, h);
|
|
2703
2700
|
}
|
|
2704
|
-
function P(
|
|
2705
|
-
if (u !==
|
|
2701
|
+
function P(h, g) {
|
|
2702
|
+
if (u !== h)
|
|
2706
2703
|
return we(8, {
|
|
2707
2704
|
from: g,
|
|
2708
|
-
to:
|
|
2705
|
+
to: h
|
|
2709
2706
|
});
|
|
2710
2707
|
}
|
|
2711
|
-
function j(
|
|
2712
|
-
return w(
|
|
2708
|
+
function j(h) {
|
|
2709
|
+
return w(h);
|
|
2713
2710
|
}
|
|
2714
|
-
function U(
|
|
2715
|
-
return j(I(
|
|
2711
|
+
function U(h) {
|
|
2712
|
+
return j(I(N(h), { replace: !0 }));
|
|
2716
2713
|
}
|
|
2717
|
-
function q(
|
|
2718
|
-
const g =
|
|
2714
|
+
function q(h) {
|
|
2715
|
+
const g = h.matched[h.matched.length - 1];
|
|
2719
2716
|
if (g && g.redirect) {
|
|
2720
2717
|
const { redirect: m } = g;
|
|
2721
|
-
let _ = typeof m == "function" ? m(
|
|
2722
|
-
if (typeof _ == "string" && (_ = _.includes("?") || _.includes("#") ? _ =
|
|
2718
|
+
let _ = typeof m == "function" ? m(h) : m;
|
|
2719
|
+
if (typeof _ == "string" && (_ = _.includes("?") || _.includes("#") ? _ = N(_) : (
|
|
2723
2720
|
// force empty params
|
|
2724
2721
|
{ path: _ }
|
|
2725
2722
|
), _.params = {}), process.env.NODE_ENV !== "production" && _.path == null && !("name" in _))
|
|
2726
2723
|
throw O(`Invalid redirect found:
|
|
2727
2724
|
${JSON.stringify(_, null, 2)}
|
|
2728
|
-
when navigating to "${
|
|
2725
|
+
when navigating to "${h.fullPath}". A redirect must contain a name or path. This will break in production.`), new Error("Invalid redirect");
|
|
2729
2726
|
return I({
|
|
2730
|
-
query:
|
|
2731
|
-
hash:
|
|
2727
|
+
query: h.query,
|
|
2728
|
+
hash: h.hash,
|
|
2732
2729
|
// avoid transferring params if the redirect has a path
|
|
2733
|
-
params: _.path != null ? {} :
|
|
2730
|
+
params: _.path != null ? {} : h.params
|
|
2734
2731
|
}, _);
|
|
2735
2732
|
}
|
|
2736
2733
|
}
|
|
2737
|
-
function w(
|
|
2738
|
-
const m = u = C(
|
|
2739
|
-
if (
|
|
2734
|
+
function w(h, g) {
|
|
2735
|
+
const m = u = C(h), _ = c.value, R = h.state, D = h.force, $ = h.replace === !0, k = q(m);
|
|
2736
|
+
if (k)
|
|
2740
2737
|
return w(
|
|
2741
|
-
I(k
|
|
2742
|
-
state: typeof
|
|
2738
|
+
I(N(k), {
|
|
2739
|
+
state: typeof k == "object" ? I({}, R, k.state) : R,
|
|
2743
2740
|
force: D,
|
|
2744
2741
|
replace: $
|
|
2745
2742
|
}),
|
|
@@ -2787,7 +2784,7 @@ ${JSON.stringify(_, null, 2)}
|
|
|
2787
2784
|
I({
|
|
2788
2785
|
// preserve an existing replacement but allow the redirect to override it
|
|
2789
2786
|
replace: $
|
|
2790
|
-
},
|
|
2787
|
+
}, N(H.to), {
|
|
2791
2788
|
state: typeof H.to == "object" ? I({}, R, H.to.state) : R,
|
|
2792
2789
|
force: D
|
|
2793
2790
|
}),
|
|
@@ -2799,74 +2796,74 @@ ${JSON.stringify(_, null, 2)}
|
|
|
2799
2796
|
return y(T, _, H), H;
|
|
2800
2797
|
});
|
|
2801
2798
|
}
|
|
2802
|
-
function Dt(
|
|
2803
|
-
const m = P(
|
|
2799
|
+
function Dt(h, g) {
|
|
2800
|
+
const m = P(h, g);
|
|
2804
2801
|
return m ? Promise.reject(m) : Promise.resolve();
|
|
2805
2802
|
}
|
|
2806
|
-
function G(
|
|
2803
|
+
function G(h) {
|
|
2807
2804
|
const g = Me.values().next().value;
|
|
2808
|
-
return g && typeof g.runWithContext == "function" ? g.runWithContext(
|
|
2805
|
+
return g && typeof g.runWithContext == "function" ? g.runWithContext(h) : h();
|
|
2809
2806
|
}
|
|
2810
|
-
function E(
|
|
2807
|
+
function E(h, g) {
|
|
2811
2808
|
let m;
|
|
2812
|
-
const [_, R, D] = Es(
|
|
2813
|
-
m = nt(_.reverse(), "beforeRouteLeave",
|
|
2814
|
-
for (const
|
|
2815
|
-
|
|
2816
|
-
m.push(ne(T,
|
|
2809
|
+
const [_, R, D] = Es(h, g);
|
|
2810
|
+
m = nt(_.reverse(), "beforeRouteLeave", h, g);
|
|
2811
|
+
for (const k of _)
|
|
2812
|
+
k.leaveGuards.forEach((T) => {
|
|
2813
|
+
m.push(ne(T, h, g));
|
|
2817
2814
|
});
|
|
2818
|
-
const $ = Dt.bind(null,
|
|
2815
|
+
const $ = Dt.bind(null, h, g);
|
|
2819
2816
|
return m.push($), pe(m).then(() => {
|
|
2820
2817
|
m = [];
|
|
2821
|
-
for (const
|
|
2822
|
-
m.push(ne(
|
|
2818
|
+
for (const k of s.list())
|
|
2819
|
+
m.push(ne(k, h, g));
|
|
2823
2820
|
return m.push($), pe(m);
|
|
2824
2821
|
}).then(() => {
|
|
2825
|
-
m = nt(R, "beforeRouteUpdate",
|
|
2826
|
-
for (const
|
|
2827
|
-
|
|
2828
|
-
m.push(ne(T,
|
|
2822
|
+
m = nt(R, "beforeRouteUpdate", h, g);
|
|
2823
|
+
for (const k of R)
|
|
2824
|
+
k.updateGuards.forEach((T) => {
|
|
2825
|
+
m.push(ne(T, h, g));
|
|
2829
2826
|
});
|
|
2830
2827
|
return m.push($), pe(m);
|
|
2831
2828
|
}).then(() => {
|
|
2832
2829
|
m = [];
|
|
2833
|
-
for (const
|
|
2834
|
-
if (
|
|
2835
|
-
if (F(
|
|
2836
|
-
for (const T of
|
|
2837
|
-
m.push(ne(T,
|
|
2830
|
+
for (const k of D)
|
|
2831
|
+
if (k.beforeEnter)
|
|
2832
|
+
if (F(k.beforeEnter))
|
|
2833
|
+
for (const T of k.beforeEnter)
|
|
2834
|
+
m.push(ne(T, h, g));
|
|
2838
2835
|
else
|
|
2839
|
-
m.push(ne(
|
|
2836
|
+
m.push(ne(k.beforeEnter, h, g));
|
|
2840
2837
|
return m.push($), pe(m);
|
|
2841
|
-
}).then(() => (
|
|
2838
|
+
}).then(() => (h.matched.forEach((k) => k.enterCallbacks = {}), m = nt(D, "beforeRouteEnter", h, g, G), m.push($), pe(m))).then(() => {
|
|
2842
2839
|
m = [];
|
|
2843
|
-
for (const
|
|
2844
|
-
m.push(ne(
|
|
2840
|
+
for (const k of i.list())
|
|
2841
|
+
m.push(ne(k, h, g));
|
|
2845
2842
|
return m.push($), pe(m);
|
|
2846
|
-
}).catch((
|
|
2847
|
-
|
|
2843
|
+
}).catch((k) => X(
|
|
2844
|
+
k,
|
|
2848
2845
|
8
|
|
2849
2846
|
/* ErrorTypes.NAVIGATION_CANCELLED */
|
|
2850
|
-
) ?
|
|
2847
|
+
) ? k : Promise.reject(k));
|
|
2851
2848
|
}
|
|
2852
|
-
function y(
|
|
2853
|
-
a.list().forEach((_) => G(() => _(
|
|
2849
|
+
function y(h, g, m) {
|
|
2850
|
+
a.list().forEach((_) => G(() => _(h, g, m)));
|
|
2854
2851
|
}
|
|
2855
|
-
function A(
|
|
2856
|
-
const D = P(
|
|
2852
|
+
function A(h, g, m, _, R) {
|
|
2853
|
+
const D = P(h, g);
|
|
2857
2854
|
if (D)
|
|
2858
2855
|
return D;
|
|
2859
|
-
const $ = g === te,
|
|
2860
|
-
m && (_ || $ ? o.replace(
|
|
2861
|
-
scroll: $ &&
|
|
2862
|
-
}, R)) : o.push(
|
|
2856
|
+
const $ = g === te, k = Z ? history.state : {};
|
|
2857
|
+
m && (_ || $ ? o.replace(h.fullPath, I({
|
|
2858
|
+
scroll: $ && k && k.scroll
|
|
2859
|
+
}, R)) : o.push(h.fullPath, R)), c.value = h, Mt(h, g, m, $), Je();
|
|
2863
2860
|
}
|
|
2864
2861
|
let M;
|
|
2865
2862
|
function ie() {
|
|
2866
|
-
M || (M = o.listen((
|
|
2863
|
+
M || (M = o.listen((h, g, m) => {
|
|
2867
2864
|
if (!Vt.listening)
|
|
2868
2865
|
return;
|
|
2869
|
-
const _ = C(
|
|
2866
|
+
const _ = C(h), R = q(_);
|
|
2870
2867
|
if (R) {
|
|
2871
2868
|
w(I(R, { replace: !0 }), _).catch($e);
|
|
2872
2869
|
return;
|
|
@@ -2885,9 +2882,9 @@ ${JSON.stringify(_, null, 2)}
|
|
|
2885
2882
|
$.to,
|
|
2886
2883
|
_
|
|
2887
2884
|
// avoid an uncaught rejection, let push call triggerError
|
|
2888
|
-
).then((
|
|
2885
|
+
).then((k) => {
|
|
2889
2886
|
X(
|
|
2890
|
-
|
|
2887
|
+
k,
|
|
2891
2888
|
20
|
|
2892
2889
|
/* ErrorTypes.NAVIGATION_DUPLICATED */
|
|
2893
2890
|
) && !m.delta && m.type === Ae.pop && o.go(-1, !1);
|
|
@@ -2912,32 +2909,32 @@ ${JSON.stringify(_, null, 2)}
|
|
|
2912
2909
|
}));
|
|
2913
2910
|
}
|
|
2914
2911
|
let Se = Oe(), De = Oe(), K;
|
|
2915
|
-
function L(
|
|
2916
|
-
Je(
|
|
2912
|
+
function L(h, g, m) {
|
|
2913
|
+
Je(h);
|
|
2917
2914
|
const _ = De.list();
|
|
2918
|
-
return _.length ? _.forEach((R) => R(
|
|
2915
|
+
return _.length ? _.forEach((R) => R(h, g, m)) : (process.env.NODE_ENV !== "production" && O("uncaught error during route navigation:"), console.error(h)), Promise.reject(h);
|
|
2919
2916
|
}
|
|
2920
2917
|
function hr() {
|
|
2921
|
-
return K && c.value !== te ? Promise.resolve() : new Promise((
|
|
2922
|
-
Se.add([
|
|
2918
|
+
return K && c.value !== te ? Promise.resolve() : new Promise((h, g) => {
|
|
2919
|
+
Se.add([h, g]);
|
|
2923
2920
|
});
|
|
2924
2921
|
}
|
|
2925
|
-
function Je(
|
|
2926
|
-
return K || (K = !
|
|
2922
|
+
function Je(h) {
|
|
2923
|
+
return K || (K = !h, ie(), Se.list().forEach(([g, m]) => h ? m(h) : g()), Se.reset()), h;
|
|
2927
2924
|
}
|
|
2928
|
-
function Mt(
|
|
2925
|
+
function Mt(h, g, m, _) {
|
|
2929
2926
|
const { scrollBehavior: R } = e;
|
|
2930
2927
|
if (!Z || !R)
|
|
2931
2928
|
return Promise.resolve();
|
|
2932
|
-
const D = !m &&
|
|
2933
|
-
return it().then(() => R(
|
|
2929
|
+
const D = !m && ko(zt(h.fullPath, 0)) || (_ || !m) && history.state && history.state.scroll || null;
|
|
2930
|
+
return it().then(() => R(h, g, D)).then(($) => $ && So($)).catch(($) => L($, h, g));
|
|
2934
2931
|
}
|
|
2935
|
-
const Ke = (
|
|
2932
|
+
const Ke = (h) => o.go(h);
|
|
2936
2933
|
let Qe;
|
|
2937
2934
|
const Me = /* @__PURE__ */ new Set(), Vt = {
|
|
2938
2935
|
currentRoute: c,
|
|
2939
2936
|
listening: !0,
|
|
2940
|
-
addRoute:
|
|
2937
|
+
addRoute: p,
|
|
2941
2938
|
removeRoute: b,
|
|
2942
2939
|
clearRoutes: t.clearRoutes,
|
|
2943
2940
|
hasRoute: S,
|
|
@@ -2954,9 +2951,9 @@ ${JSON.stringify(_, null, 2)}
|
|
|
2954
2951
|
afterEach: a.add,
|
|
2955
2952
|
onError: De.add,
|
|
2956
2953
|
isReady: hr,
|
|
2957
|
-
install(
|
|
2954
|
+
install(h) {
|
|
2958
2955
|
const g = this;
|
|
2959
|
-
|
|
2956
|
+
h.component("RouterLink", ns), h.component("RouterView", is), h.config.globalProperties.$router = g, Object.defineProperty(h.config.globalProperties, "$route", {
|
|
2960
2957
|
enumerable: !0,
|
|
2961
2958
|
get: () => le(c)
|
|
2962
2959
|
}), Z && // used for the initial navigation client side to avoid pushing
|
|
@@ -2970,15 +2967,15 @@ ${JSON.stringify(_, null, 2)}
|
|
|
2970
2967
|
get: () => c.value[R],
|
|
2971
2968
|
enumerable: !0
|
|
2972
2969
|
});
|
|
2973
|
-
|
|
2974
|
-
const _ =
|
|
2975
|
-
Me.add(
|
|
2976
|
-
Me.delete(
|
|
2977
|
-
}, process.env.NODE_ENV !== "production" && Z && us(
|
|
2970
|
+
h.provide(Nt, g), h.provide(Fn, br(m)), h.provide(yt, c);
|
|
2971
|
+
const _ = h.unmount;
|
|
2972
|
+
Me.add(h), h.unmount = function() {
|
|
2973
|
+
Me.delete(h), Me.size < 1 && (u = te, M && M(), M = null, c.value = te, Qe = !1, K = !1), _();
|
|
2974
|
+
}, process.env.NODE_ENV !== "production" && Z && us(h, g, t);
|
|
2978
2975
|
}
|
|
2979
2976
|
};
|
|
2980
|
-
function pe(
|
|
2981
|
-
return
|
|
2977
|
+
function pe(h) {
|
|
2978
|
+
return h.reduce((g, m) => g.then(() => G(m)), Promise.resolve());
|
|
2982
2979
|
}
|
|
2983
2980
|
return Vt;
|
|
2984
2981
|
}
|
|
@@ -3020,8 +3017,8 @@ function ze() {
|
|
|
3020
3017
|
var e = (/* @__PURE__ */ new Date()).getTime();
|
|
3021
3018
|
return e === an ? (rt++, e * 1e3 + rt) : (an = e, rt = 0, e * 1e3);
|
|
3022
3019
|
}
|
|
3023
|
-
var Os = ze,
|
|
3024
|
-
function
|
|
3020
|
+
var Os = ze, ks = "native";
|
|
3021
|
+
function Ns(e) {
|
|
3025
3022
|
var t = {
|
|
3026
3023
|
messagesCallback: null,
|
|
3027
3024
|
bc: new BroadcastChannel(e),
|
|
@@ -3059,12 +3056,12 @@ function Cs() {
|
|
|
3059
3056
|
return 150;
|
|
3060
3057
|
}
|
|
3061
3058
|
var As = {
|
|
3062
|
-
create:
|
|
3059
|
+
create: Ns,
|
|
3063
3060
|
close: Ps,
|
|
3064
3061
|
onMessage: Rs,
|
|
3065
3062
|
postMessage: $s,
|
|
3066
3063
|
canBeUsed: Is,
|
|
3067
|
-
type:
|
|
3064
|
+
type: ks,
|
|
3068
3065
|
averageResponseTime: Cs,
|
|
3069
3066
|
microSeconds: Os
|
|
3070
3067
|
}, Xn = (
|
|
@@ -3582,7 +3579,7 @@ function Si(e) {
|
|
|
3582
3579
|
function Oi(e) {
|
|
3583
3580
|
return Object.prototype.toString.call(e).slice(8, -1);
|
|
3584
3581
|
}
|
|
3585
|
-
function
|
|
3582
|
+
function ki(e) {
|
|
3586
3583
|
switch (e) {
|
|
3587
3584
|
case '"':
|
|
3588
3585
|
return '\\"';
|
|
@@ -3613,16 +3610,16 @@ function ye(e) {
|
|
|
3613
3610
|
let t = "", n = 0;
|
|
3614
3611
|
const r = e.length;
|
|
3615
3612
|
for (let o = 0; o < r; o += 1) {
|
|
3616
|
-
const s = e[o], i =
|
|
3613
|
+
const s = e[o], i = ki(s);
|
|
3617
3614
|
i && (t += e.slice(n, o) + i, n = o + 1);
|
|
3618
3615
|
}
|
|
3619
3616
|
return `"${n === 0 ? e : t + e.slice(n)}"`;
|
|
3620
3617
|
}
|
|
3621
3618
|
const At = -1, cr = -2, ur = -3, lr = -4, fr = -5, Tt = -6;
|
|
3622
3619
|
function pn(e, t) {
|
|
3623
|
-
return
|
|
3620
|
+
return Ni(JSON.parse(e));
|
|
3624
3621
|
}
|
|
3625
|
-
function
|
|
3622
|
+
function Ni(e, t) {
|
|
3626
3623
|
if (typeof e == "number") return o(e, !0);
|
|
3627
3624
|
if (!Array.isArray(e) || e.length === 0)
|
|
3628
3625
|
throw new Error("Invalid input");
|
|
@@ -3643,24 +3640,22 @@ function ki(e, t) {
|
|
|
3643
3640
|
r[s] = a;
|
|
3644
3641
|
else if (Array.isArray(a))
|
|
3645
3642
|
if (typeof a[0] == "string") {
|
|
3646
|
-
const c = a[0]
|
|
3647
|
-
if (u)
|
|
3648
|
-
return r[s] = u(o(a[1]));
|
|
3643
|
+
const c = a[0];
|
|
3649
3644
|
switch (c) {
|
|
3650
3645
|
case "Date":
|
|
3651
3646
|
r[s] = new Date(a[1]);
|
|
3652
3647
|
break;
|
|
3653
3648
|
case "Set":
|
|
3654
|
-
const
|
|
3655
|
-
r[s] =
|
|
3656
|
-
for (let
|
|
3657
|
-
|
|
3649
|
+
const u = /* @__PURE__ */ new Set();
|
|
3650
|
+
r[s] = u;
|
|
3651
|
+
for (let d = 1; d < a.length; d += 1)
|
|
3652
|
+
u.add(o(a[d]));
|
|
3658
3653
|
break;
|
|
3659
3654
|
case "Map":
|
|
3660
|
-
const
|
|
3661
|
-
r[s] =
|
|
3662
|
-
for (let
|
|
3663
|
-
|
|
3655
|
+
const f = /* @__PURE__ */ new Map();
|
|
3656
|
+
r[s] = f;
|
|
3657
|
+
for (let d = 1; d < a.length; d += 2)
|
|
3658
|
+
f.set(o(a[d]), o(a[d + 1]));
|
|
3664
3659
|
break;
|
|
3665
3660
|
case "RegExp":
|
|
3666
3661
|
r[s] = new RegExp(a[1], a[2]);
|
|
@@ -3672,10 +3667,10 @@ function ki(e, t) {
|
|
|
3672
3667
|
r[s] = BigInt(a[1]);
|
|
3673
3668
|
break;
|
|
3674
3669
|
case "null":
|
|
3675
|
-
const
|
|
3676
|
-
r[s] =
|
|
3677
|
-
for (let
|
|
3678
|
-
|
|
3670
|
+
const l = /* @__PURE__ */ Object.create(null);
|
|
3671
|
+
r[s] = l;
|
|
3672
|
+
for (let d = 1; d < a.length; d += 2)
|
|
3673
|
+
l[a[d]] = o(a[d + 1]);
|
|
3679
3674
|
break;
|
|
3680
3675
|
default:
|
|
3681
3676
|
throw new Error(`Unknown type ${c}`);
|
|
@@ -3717,8 +3712,8 @@ function mn(e, t) {
|
|
|
3717
3712
|
if (u === 0 && 1 / u < 0) return Tt;
|
|
3718
3713
|
const f = i++;
|
|
3719
3714
|
r.set(u, f);
|
|
3720
|
-
for (const { key: d, fn:
|
|
3721
|
-
const b =
|
|
3715
|
+
for (const { key: d, fn: p } of o) {
|
|
3716
|
+
const b = p(u);
|
|
3722
3717
|
if (b)
|
|
3723
3718
|
return n[f] = `["${d}",${a(b)}]`, f;
|
|
3724
3719
|
}
|
|
@@ -3739,8 +3734,8 @@ function mn(e, t) {
|
|
|
3739
3734
|
l = `["Date","${u.toISOString()}"]`;
|
|
3740
3735
|
break;
|
|
3741
3736
|
case "RegExp":
|
|
3742
|
-
const { source:
|
|
3743
|
-
l = b ? `["RegExp",${ye(
|
|
3737
|
+
const { source: p, flags: b } = u;
|
|
3738
|
+
l = b ? `["RegExp",${ye(p)},"${b}"]` : `["RegExp",${ye(p)}]`;
|
|
3744
3739
|
break;
|
|
3745
3740
|
case "Array":
|
|
3746
3741
|
l = "[";
|