@instockng/storefront-ui 1.0.67 → 1.0.69
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/components/ProductAddOns.d.ts.map +1 -1
- package/dist/index10.mjs +36 -40
- package/dist/index100.mjs +68 -53
- package/dist/index101.mjs +34 -6
- package/dist/index102.mjs +42 -4
- package/dist/index103.mjs +2 -179
- package/dist/index104.mjs +26 -51
- package/dist/index105.mjs +18 -69
- package/dist/index106.mjs +215 -2
- package/dist/index107.mjs +180 -34
- package/dist/index108.mjs +21 -42
- package/dist/index109.mjs +23 -2
- package/dist/index110.mjs +31 -21
- package/dist/index111.mjs +151 -13
- package/dist/index112.mjs +15 -210
- package/dist/index113.mjs +26 -176
- package/dist/index114.mjs +77 -15
- package/dist/index115.mjs +30 -15
- package/dist/index116.mjs +138 -26
- package/dist/index117.mjs +42 -143
- package/dist/index118.mjs +17 -14
- package/dist/index119.mjs +19 -23
- package/dist/index120.mjs +17 -78
- package/dist/index121.mjs +18 -31
- package/dist/index122.mjs +16 -140
- package/dist/index123.mjs +17 -51
- package/dist/index124.mjs +13 -15
- package/dist/index125.mjs +58 -20
- package/dist/index126.mjs +11 -16
- package/dist/index127.mjs +31 -17
- package/dist/index128.mjs +17 -14
- package/dist/index129.mjs +27 -15
- package/dist/index13.mjs +1 -1
- package/dist/index130.mjs +20 -14
- package/dist/index131.mjs +12 -58
- package/dist/index132.mjs +12 -9
- package/dist/index133.mjs +39 -31
- package/dist/index134.mjs +15 -16
- package/dist/index135.mjs +262 -28
- package/dist/index136.mjs +62 -19
- package/dist/index137.mjs +7 -18
- package/dist/index138.mjs +2 -21
- package/dist/index139.mjs +2 -47
- package/dist/index140.mjs +28 -18
- package/dist/index141.mjs +2 -268
- package/dist/index142.mjs +20 -69
- package/dist/index143.mjs +55 -7
- package/dist/index144.mjs +29 -2
- package/dist/index145.mjs +7 -2
- package/dist/index146.mjs +52 -2
- package/dist/index147.mjs +6 -33
- package/dist/index148.mjs +12 -2
- package/dist/index149.mjs +9 -19
- package/dist/index15.mjs +4 -4
- package/dist/index150.mjs +30 -16
- package/dist/index151.mjs +4 -64
- package/dist/index152.mjs +70 -2
- package/dist/index153.mjs +167 -2
- package/dist/index154.mjs +2 -2
- package/dist/index155.mjs +2 -2
- package/dist/index156.mjs +2 -134
- package/dist/index157.mjs +2 -22
- package/dist/index158.mjs +11 -31
- package/dist/index159.mjs +32 -2
- package/dist/index16.mjs +2 -2
- package/dist/index160.mjs +29 -31
- package/dist/index161.mjs +13 -42
- package/dist/index162.mjs +17 -20
- package/dist/index163.mjs +2 -56
- package/dist/index164.mjs +19 -28
- package/dist/index165.mjs +45 -6
- package/dist/index166.mjs +2 -52
- package/dist/index167.mjs +30 -6
- package/dist/index168.mjs +17 -11
- package/dist/index169.mjs +2 -7
- package/dist/index170.mjs +2 -28
- package/dist/index171.mjs +2 -2
- package/dist/index172.mjs +2 -70
- package/dist/index173.mjs +66 -161
- package/dist/index174.mjs +2 -2
- package/dist/index175.mjs +53 -2
- package/dist/index176.mjs +2 -2
- package/dist/index177.mjs +29 -11
- package/dist/index178.mjs +145 -25
- package/dist/index179.mjs +2 -38
- package/dist/index18.mjs +1 -1
- package/dist/index180.mjs +2 -18
- package/dist/index181.mjs +11 -10
- package/dist/index182.mjs +2 -2
- package/dist/index183.mjs +2 -20
- package/dist/index184.mjs +18 -38
- package/dist/index186.mjs +2 -30
- package/dist/index187.mjs +18 -12
- package/dist/index188.mjs +23 -2
- package/dist/index189.mjs +2 -2
- package/dist/index19.mjs +1 -1
- package/dist/index190.mjs +2 -2
- package/dist/index191.mjs +2 -2
- package/dist/index192.mjs +18 -67
- package/dist/index193.mjs +2 -2
- package/dist/index194.mjs +18 -48
- package/dist/index195.mjs +2 -2
- package/dist/index196.mjs +2 -36
- package/dist/index197.mjs +2 -152
- package/dist/index198.mjs +23 -2
- package/dist/index199.mjs +2 -2
- package/dist/index200.mjs +14 -10
- package/dist/index201.mjs +2 -2
- package/dist/index202.mjs +2 -2
- package/dist/index203.mjs +2 -26
- package/dist/index204.mjs +2 -2
- package/dist/index205.mjs +2 -2
- package/dist/index206.mjs +2 -24
- package/dist/index207.mjs +2 -23
- package/dist/index208.mjs +2 -2
- package/dist/index209.mjs +127 -2
- package/dist/index210.mjs +2 -2
- package/dist/index211.mjs +71 -20
- package/dist/index212.mjs +74 -2
- package/dist/index213.mjs +30 -22
- package/dist/index214.mjs +11 -2
- package/dist/index215.mjs +4 -2
- package/dist/index216.mjs +4 -2
- package/dist/index217.mjs +13 -23
- package/dist/index218.mjs +7 -2
- package/dist/index219.mjs +11 -22
- package/dist/index22.mjs +2 -2
- package/dist/index220.mjs +5 -2
- package/dist/index221.mjs +33 -2
- package/dist/index222.mjs +31 -2
- package/dist/index223.mjs +28 -2
- package/dist/index224.mjs +61 -2
- package/dist/index225.mjs +2 -2
- package/dist/index226.mjs +2 -2
- package/dist/index227.mjs +2 -2
- package/dist/index228.mjs +2 -127
- package/dist/index23.mjs +14 -13
- package/dist/index230.mjs +2 -74
- package/dist/index231.mjs +2 -74
- package/dist/index232.mjs +2 -2
- package/dist/index233.mjs +100 -640
- package/dist/index234.mjs +2 -2
- package/dist/index235.mjs +2 -2
- package/dist/index236.mjs +2 -43
- package/dist/index237.mjs +33 -16
- package/dist/index238.mjs +2 -19
- package/dist/index240.mjs +2 -2
- package/dist/index241.mjs +243 -30
- package/dist/index242.mjs +2 -11
- package/dist/index243.mjs +32 -3
- package/dist/index244.mjs +64 -3
- package/dist/index245.mjs +25 -13
- package/dist/index246.mjs +2 -7
- package/dist/index247.mjs +2 -12
- package/dist/index248.mjs +2 -5
- package/dist/index249.mjs +2 -33
- package/dist/index25.mjs +2 -2
- package/dist/index250.mjs +2 -31
- package/dist/index251.mjs +2 -28
- package/dist/index252.mjs +2 -61
- package/dist/index253.mjs +4 -2
- package/dist/index254.mjs +2 -2
- package/dist/index255.mjs +2 -2
- package/dist/index256.mjs +3 -2
- package/dist/index257.mjs +2 -2
- package/dist/index258.mjs +2 -2
- package/dist/index259.mjs +16 -107
- package/dist/index26.mjs +7 -6
- package/dist/index260.mjs +13 -2
- package/dist/index261.mjs +6 -2
- package/dist/index262.mjs +30 -2
- package/dist/index264.mjs +2 -37
- package/dist/index265.mjs +18 -2
- package/dist/index266.mjs +47 -2
- package/dist/index267.mjs +2 -2
- package/dist/index268.mjs +2 -244
- package/dist/index269.mjs +2 -2
- package/dist/index27.mjs +17 -17
- package/dist/index270.mjs +2 -33
- package/dist/index271.mjs +88 -62
- package/dist/index272.mjs +2 -25
- package/dist/index274.mjs +2 -2
- package/dist/index275.mjs +2 -2
- package/dist/index28.mjs +45 -45
- package/dist/index29.mjs +7 -7
- package/dist/index30.mjs +5 -5
- package/dist/index31.mjs +6 -6
- package/dist/index32.mjs +4 -0
- package/dist/index34.mjs +72 -68
- package/dist/index35.mjs +1 -1
- package/dist/index36.mjs +1 -1
- package/dist/index37.mjs +1 -1
- package/dist/index38.mjs +1 -1
- package/dist/index39.mjs +1 -1
- package/dist/index40.mjs +2 -2
- package/dist/index42.mjs +2 -2
- package/dist/index43.mjs +32 -6
- package/dist/index44.mjs +7 -32
- package/dist/index45.mjs +1432 -6
- package/dist/index46.mjs +69 -1432
- package/dist/index47.mjs +2 -70
- package/dist/index48.mjs +60 -2
- package/dist/index49.mjs +48 -57
- package/dist/index50.mjs +33 -51
- package/dist/index51.mjs +15 -33
- package/dist/index52.mjs +2260 -12
- package/dist/index53.mjs +36 -2263
- package/dist/index54.mjs +44 -36
- package/dist/index55.mjs +99 -44
- package/dist/index56.mjs +81 -99
- package/dist/index57.mjs +13 -107
- package/dist/index58.mjs +100 -52
- package/dist/index59.mjs +84 -66
- package/dist/index60.mjs +57 -73
- package/dist/index61.mjs +89 -57
- package/dist/index62.mjs +79 -51
- package/dist/index63.mjs +14 -13
- package/dist/index64.mjs +89 -14
- package/dist/index65.mjs +61 -43
- package/dist/index66.mjs +43 -105
- package/dist/index67.mjs +46 -113
- package/dist/index68.mjs +21 -20
- package/dist/index69.mjs +2 -24
- package/dist/index70.mjs +75 -2
- package/dist/index71.mjs +17 -40
- package/dist/index72.mjs +63 -2
- package/dist/index73.mjs +19 -149
- package/dist/index74.mjs +152 -4
- package/dist/index75.mjs +4 -74
- package/dist/index76.mjs +2 -15
- package/dist/index77.mjs +5 -62
- package/dist/index78.mjs +1133 -5
- package/dist/index79.mjs +20 -356
- package/dist/index80.mjs +51 -215
- package/dist/index81.mjs +25 -51
- package/dist/index83.mjs +2 -2
- package/dist/index84.mjs +235 -2
- package/dist/index85.mjs +5 -1134
- package/dist/index86.mjs +131 -17
- package/dist/index87.mjs +67 -54
- package/dist/index88.mjs +84 -30
- package/dist/index89.mjs +23 -229
- package/dist/index90.mjs +8 -5
- package/dist/index91.mjs +66 -125
- package/dist/index92.mjs +3 -67
- package/dist/index93.mjs +2 -87
- package/dist/index94.mjs +78 -24
- package/dist/index95.mjs +52 -7
- package/dist/index96.mjs +5 -74
- package/dist/index97.mjs +4 -3
- package/dist/index98.mjs +179 -2
- package/dist/index99.mjs +49 -79
- package/dist/providers/StorefrontProvider.d.ts +0 -1
- package/dist/providers/StorefrontProvider.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/components/ProductAddOns.tsx +4 -8
- package/src/providers/StorefrontProvider.tsx +0 -1
- package/dist/index276.mjs +0 -5
- package/dist/index277.mjs +0 -5
- package/dist/index278.mjs +0 -5
- package/dist/index279.mjs +0 -5
- package/dist/index280.mjs +0 -5
- package/dist/index281.mjs +0 -7
- package/dist/index282.mjs +0 -5
- package/dist/index283.mjs +0 -5
- package/dist/index284.mjs +0 -5
- package/dist/index285.mjs +0 -5
- package/dist/index286.mjs +0 -5
- package/dist/index287.mjs +0 -5
- package/dist/index288.mjs +0 -6
- package/dist/index289.mjs +0 -5
- package/dist/index290.mjs +0 -5
- package/dist/index291.mjs +0 -20
- package/dist/index292.mjs +0 -16
- package/dist/index293.mjs +0 -9
- package/dist/index294.mjs +0 -33
- package/dist/index295.mjs +0 -5
- package/dist/index296.mjs +0 -5
- package/dist/index297.mjs +0 -21
- package/dist/index298.mjs +0 -50
- package/dist/index299.mjs +0 -5
- package/dist/index300.mjs +0 -5
- package/dist/index301.mjs +0 -5
- package/dist/index302.mjs +0 -5
- package/dist/index303.mjs +0 -94
- package/dist/index304.mjs +0 -5
- package/dist/index305.mjs +0 -5
- package/dist/index306.mjs +0 -5
- package/dist/index307.mjs +0 -5
package/dist/index233.mjs
CHANGED
|
@@ -1,651 +1,111 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
3
|
-
var
|
|
4
|
-
function
|
|
5
|
-
return
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
|
|
2
|
+
import { __exports as m } from "./index263.mjs";
|
|
3
|
+
var p;
|
|
4
|
+
function S() {
|
|
5
|
+
return p ? m : (p = 1, function(d) {
|
|
6
|
+
Object.defineProperty(d, "__esModule", {
|
|
7
|
+
value: !0
|
|
8
|
+
});
|
|
9
|
+
function g(o, e) {
|
|
10
|
+
for (var r in e) Object.defineProperty(o, r, {
|
|
11
|
+
enumerable: !0,
|
|
12
|
+
get: e[r]
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
g(d, {
|
|
16
|
+
getSortedRouteObjects: function() {
|
|
17
|
+
return w;
|
|
18
|
+
},
|
|
19
|
+
getSortedRoutes: function() {
|
|
20
|
+
return f;
|
|
16
21
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
return
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
a = s[a] || a;
|
|
41
|
-
const u = { ...y }, C = typeof u.maxLength == "number" ? Math.min(D, u.maxLength) : D;
|
|
42
|
-
let d = a.length;
|
|
43
|
-
if (d > C)
|
|
44
|
-
throw new SyntaxError(`Input length: ${d}, exceeds maximum allowed length: ${C}`);
|
|
45
|
-
const G = { type: "bos", value: "", output: u.prepend || "" }, x = [G], m = u.capture ? "" : "?:", Q = b.globChars(u.windows), $ = b.extglobChars(Q), { DOT_LITERAL: Z, PLUS_LITERAL: S, SLASH_LITERAL: tt, ONE_CHAR: P, DOTS_SLASH: Y, NO_DOT: w, NO_DOT_SLASH: st, NO_DOTS_SLASH: K, QMARK: E, QMARK_NO_DOT: N, STAR: ut, START_ANCHOR: rt } = Q, z = (r) => `(${m}(?:(?!${rt}${r.dot ? Y : Z}).)*?)`, L = u.dot ? "" : w, ot = u.dot ? E : N;
|
|
46
|
-
let q = u.bash === !0 ? z(u) : ut;
|
|
47
|
-
u.capture && (q = `(${q})`), typeof u.noext == "boolean" && (u.noextglob = u.noext);
|
|
48
|
-
const n = { input: a, index: -1, start: 0, dot: u.dot === !0, consumed: "", output: "", prefix: "", backtrack: !1, negated: !1, brackets: 0, braces: 0, parens: 0, quotes: 0, globstar: !1, tokens: x };
|
|
49
|
-
a = H.removePrefix(a, n), d = a.length;
|
|
50
|
-
const I = [], et = [], ct = [];
|
|
51
|
-
let t = G, e;
|
|
52
|
-
const at = () => n.index === d - 1, i = n.peek = (r = 1) => a[n.index + r], _ = n.advance = () => a[++n.index] || "", J = () => a.slice(n.index + 1), nt = (r = "", g = 0) => {
|
|
53
|
-
n.consumed += r, n.index += g;
|
|
54
|
-
}, U = (r) => {
|
|
55
|
-
n.output += r.output != null ? r.output : r.value, nt(r.value);
|
|
56
|
-
}, M = () => {
|
|
57
|
-
let r = 1;
|
|
58
|
-
for (; i() === "!" && (i(2) !== "(" || i(3) === "?"); )
|
|
59
|
-
_(), n.start++, r++;
|
|
60
|
-
return r % 2 === 0 ? !1 : (n.negated = !0, n.start++, !0);
|
|
61
|
-
}, it = (r) => {
|
|
62
|
-
n[r]++, ct.push(r);
|
|
63
|
-
}, V = (r) => {
|
|
64
|
-
n[r]--, ct.pop();
|
|
65
|
-
}, l = (r) => {
|
|
66
|
-
if (t.type === "globstar") {
|
|
67
|
-
const g = n.braces > 0 && (r.type === "comma" || r.type === "brace"), o = r.extglob === !0 || I.length && (r.type === "pipe" || r.type === "paren");
|
|
68
|
-
r.type !== "slash" && r.type !== "paren" && !g && !o && (n.output = n.output.slice(0, -t.output.length), t.type = "star", t.value = "*", t.output = q, n.output += t.output);
|
|
69
|
-
}
|
|
70
|
-
if (I.length && r.type !== "paren" && (I[I.length - 1].inner += r.value), (r.value || r.output) && U(r), t && t.type === "text" && r.type === "text") {
|
|
71
|
-
t.output = (t.output || t.value) + r.value, t.value += r.value;
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
r.prev = t, x.push(r), t = r;
|
|
75
|
-
}, W = (r, g) => {
|
|
76
|
-
const o = { ...$[g], conditions: 1, inner: "" };
|
|
77
|
-
o.prev = t, o.parens = n.parens, o.output = n.output;
|
|
78
|
-
const R = (u.capture ? "(" : "") + o.open;
|
|
79
|
-
it("parens"), l({ type: r, value: g, output: n.output ? "" : P }), l({ type: "paren", extglob: !0, value: _(), output: R }), I.push(o);
|
|
80
|
-
}, X = (r) => {
|
|
81
|
-
let g = r.close + (u.capture ? ")" : ""), o;
|
|
82
|
-
if (r.type === "negate") {
|
|
83
|
-
let R = q;
|
|
84
|
-
if (r.inner && r.inner.length > 1 && r.inner.includes("/") && (R = z(u)), (R !== q || at() || /^\)+$/.test(J())) && (g = r.close = `)$))${R}`), r.inner.includes("*") && (o = J()) && /^\.[^\\/.]+$/.test(o)) {
|
|
85
|
-
const T = v(o, { ...y, fastpaths: !1 }).output;
|
|
86
|
-
g = r.close = `)${T})${R})`;
|
|
87
|
-
}
|
|
88
|
-
r.prev.type === "bos" && (n.negatedExtglob = !0);
|
|
89
|
-
}
|
|
90
|
-
l({ type: "paren", extglob: !0, value: e, output: g }), V("parens");
|
|
91
|
-
};
|
|
92
|
-
if (u.fastpaths !== !1 && !/(^[*!]|[/()[\]{}"])/.test(a)) {
|
|
93
|
-
let r = !1, g = a.replace(p, (o, R, T, j, B, At) => j === "\\" ? (r = !0, o) : j === "?" ? R ? R + j + (B ? E.repeat(B.length) : "") : At === 0 ? ot + (B ? E.repeat(B.length) : "") : E.repeat(T.length) : j === "." ? Z.repeat(T.length) : j === "*" ? R ? R + j + (B ? q : "") : q : R ? o : `\\${o}`);
|
|
94
|
-
return r === !0 && (u.unescape === !0 ? g = g.replace(/\\/g, "") : g = g.replace(/\\+/g, (o) => o.length % 2 === 0 ? "\\\\" : o ? "\\" : "")), g === a && u.contains === !0 ? (n.output = a, n) : (n.output = H.wrapOutput(g, n, y), n);
|
|
95
|
-
}
|
|
96
|
-
for (; !at(); ) {
|
|
97
|
-
if (e = _(), e === "\0")
|
|
98
|
-
continue;
|
|
99
|
-
if (e === "\\") {
|
|
100
|
-
const o = i();
|
|
101
|
-
if (o === "/" && u.bash !== !0 || o === "." || o === ";")
|
|
102
|
-
continue;
|
|
103
|
-
if (!o) {
|
|
104
|
-
e += "\\", l({ type: "text", value: e });
|
|
105
|
-
continue;
|
|
106
|
-
}
|
|
107
|
-
const R = /^\\+/.exec(J());
|
|
108
|
-
let T = 0;
|
|
109
|
-
if (R && R[0].length > 2 && (T = R[0].length, n.index += T, T % 2 !== 0 && (e += "\\")), u.unescape === !0 ? e = _() : e += _(), n.brackets === 0) {
|
|
110
|
-
l({ type: "text", value: e });
|
|
111
|
-
continue;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
if (n.brackets > 0 && (e !== "]" || t.value === "[" || t.value === "[^")) {
|
|
115
|
-
if (u.posix !== !1 && e === ":") {
|
|
116
|
-
const o = t.value.slice(1);
|
|
117
|
-
if (o.includes("[") && (t.posix = !0, o.includes(":"))) {
|
|
118
|
-
const R = t.value.lastIndexOf("["), T = t.value.slice(0, R), j = t.value.slice(R + 2), B = k[j];
|
|
119
|
-
if (B) {
|
|
120
|
-
t.value = T + B, n.backtrack = !0, _(), !G.output && x.indexOf(t) === 1 && (G.output = P);
|
|
121
|
-
continue;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
(e === "[" && i() !== ":" || e === "-" && i() === "]") && (e = `\\${e}`), e === "]" && (t.value === "[" || t.value === "[^") && (e = `\\${e}`), u.posix === !0 && e === "!" && t.value === "[" && (e = "^"), t.value += e, U({ value: e });
|
|
126
|
-
continue;
|
|
127
|
-
}
|
|
128
|
-
if (n.quotes === 1 && e !== '"') {
|
|
129
|
-
e = H.escapeRegex(e), t.value += e, U({ value: e });
|
|
130
|
-
continue;
|
|
131
|
-
}
|
|
132
|
-
if (e === '"') {
|
|
133
|
-
n.quotes = n.quotes === 1 ? 0 : 1, u.keepQuotes === !0 && l({ type: "text", value: e });
|
|
134
|
-
continue;
|
|
135
|
-
}
|
|
136
|
-
if (e === "(") {
|
|
137
|
-
it("parens"), l({ type: "paren", value: e });
|
|
138
|
-
continue;
|
|
139
|
-
}
|
|
140
|
-
if (e === ")") {
|
|
141
|
-
if (n.parens === 0 && u.strictBrackets === !0)
|
|
142
|
-
throw new SyntaxError(A("opening", "("));
|
|
143
|
-
const o = I[I.length - 1];
|
|
144
|
-
if (o && n.parens === o.parens + 1) {
|
|
145
|
-
X(I.pop());
|
|
146
|
-
continue;
|
|
147
|
-
}
|
|
148
|
-
l({ type: "paren", value: e, output: n.parens ? ")" : "\\)" }), V("parens");
|
|
149
|
-
continue;
|
|
150
|
-
}
|
|
151
|
-
if (e === "[") {
|
|
152
|
-
if (u.nobracket === !0 || !J().includes("]")) {
|
|
153
|
-
if (u.nobracket !== !0 && u.strictBrackets === !0)
|
|
154
|
-
throw new SyntaxError(A("closing", "]"));
|
|
155
|
-
e = `\\${e}`;
|
|
156
|
-
} else
|
|
157
|
-
it("brackets");
|
|
158
|
-
l({ type: "bracket", value: e });
|
|
159
|
-
continue;
|
|
160
|
-
}
|
|
161
|
-
if (e === "]") {
|
|
162
|
-
if (u.nobracket === !0 || t && t.type === "bracket" && t.value.length === 1) {
|
|
163
|
-
l({ type: "text", value: e, output: `\\${e}` });
|
|
164
|
-
continue;
|
|
165
|
-
}
|
|
166
|
-
if (n.brackets === 0) {
|
|
167
|
-
if (u.strictBrackets === !0)
|
|
168
|
-
throw new SyntaxError(A("opening", "["));
|
|
169
|
-
l({ type: "text", value: e, output: `\\${e}` });
|
|
170
|
-
continue;
|
|
171
|
-
}
|
|
172
|
-
V("brackets");
|
|
173
|
-
const o = t.value.slice(1);
|
|
174
|
-
if (t.posix !== !0 && o[0] === "^" && !o.includes("/") && (e = `/${e}`), t.value += e, U({ value: e }), u.literalBrackets === !1 || H.hasRegexChars(o))
|
|
175
|
-
continue;
|
|
176
|
-
const R = H.escapeRegex(t.value);
|
|
177
|
-
if (n.output = n.output.slice(0, -t.value.length), u.literalBrackets === !0) {
|
|
178
|
-
n.output += R, t.value = R;
|
|
179
|
-
continue;
|
|
180
|
-
}
|
|
181
|
-
t.value = `(${m}${R}|${t.value})`, n.output += t.value;
|
|
182
|
-
continue;
|
|
183
|
-
}
|
|
184
|
-
if (e === "{" && u.nobrace !== !0) {
|
|
185
|
-
it("braces");
|
|
186
|
-
const o = { type: "brace", value: e, output: "(", outputIndex: n.output.length, tokensIndex: n.tokens.length };
|
|
187
|
-
et.push(o), l(o);
|
|
188
|
-
continue;
|
|
189
|
-
}
|
|
190
|
-
if (e === "}") {
|
|
191
|
-
const o = et[et.length - 1];
|
|
192
|
-
if (u.nobrace === !0 || !o) {
|
|
193
|
-
l({ type: "text", value: e, output: e });
|
|
194
|
-
continue;
|
|
195
|
-
}
|
|
196
|
-
let R = ")";
|
|
197
|
-
if (o.dots === !0) {
|
|
198
|
-
const T = x.slice(), j = [];
|
|
199
|
-
for (let B = T.length - 1; B >= 0 && (x.pop(), T[B].type !== "brace"); B--)
|
|
200
|
-
T[B].type !== "dots" && j.unshift(T[B].value);
|
|
201
|
-
R = c(j, u), n.backtrack = !0;
|
|
202
|
-
}
|
|
203
|
-
if (o.comma !== !0 && o.dots !== !0) {
|
|
204
|
-
const T = n.output.slice(0, o.outputIndex), j = n.tokens.slice(o.tokensIndex);
|
|
205
|
-
o.value = o.output = "\\{", e = R = "\\}", n.output = T;
|
|
206
|
-
for (const B of j)
|
|
207
|
-
n.output += B.output || B.value;
|
|
208
|
-
}
|
|
209
|
-
l({ type: "brace", value: e, output: R }), V("braces"), et.pop();
|
|
210
|
-
continue;
|
|
211
|
-
}
|
|
212
|
-
if (e === "|") {
|
|
213
|
-
I.length > 0 && I[I.length - 1].conditions++, l({ type: "text", value: e });
|
|
214
|
-
continue;
|
|
215
|
-
}
|
|
216
|
-
if (e === ",") {
|
|
217
|
-
let o = e;
|
|
218
|
-
const R = et[et.length - 1];
|
|
219
|
-
R && ct[ct.length - 1] === "braces" && (R.comma = !0, o = "|"), l({ type: "comma", value: e, output: o });
|
|
220
|
-
continue;
|
|
221
|
-
}
|
|
222
|
-
if (e === "/") {
|
|
223
|
-
if (t.type === "dot" && n.index === n.start + 1) {
|
|
224
|
-
n.start = n.index + 1, n.consumed = "", n.output = "", x.pop(), t = G;
|
|
225
|
-
continue;
|
|
226
|
-
}
|
|
227
|
-
l({ type: "slash", value: e, output: tt });
|
|
228
|
-
continue;
|
|
229
|
-
}
|
|
230
|
-
if (e === ".") {
|
|
231
|
-
if (n.braces > 0 && t.type === "dot") {
|
|
232
|
-
t.value === "." && (t.output = Z);
|
|
233
|
-
const o = et[et.length - 1];
|
|
234
|
-
t.type = "dots", t.output += e, t.value += e, o.dots = !0;
|
|
235
|
-
continue;
|
|
236
|
-
}
|
|
237
|
-
if (n.braces + n.parens === 0 && t.type !== "bos" && t.type !== "slash") {
|
|
238
|
-
l({ type: "text", value: e, output: Z });
|
|
239
|
-
continue;
|
|
240
|
-
}
|
|
241
|
-
l({ type: "dot", value: e, output: Z });
|
|
242
|
-
continue;
|
|
243
|
-
}
|
|
244
|
-
if (e === "?") {
|
|
245
|
-
if (!(t && t.value === "(") && u.noextglob !== !0 && i() === "(" && i(2) !== "?") {
|
|
246
|
-
W("qmark", e);
|
|
247
|
-
continue;
|
|
248
|
-
}
|
|
249
|
-
if (t && t.type === "paren") {
|
|
250
|
-
const R = i();
|
|
251
|
-
let T = e;
|
|
252
|
-
(t.value === "(" && !/[!=<:]/.test(R) || R === "<" && !/<([!=]|\w+>)/.test(J())) && (T = `\\${e}`), l({ type: "text", value: e, output: T });
|
|
253
|
-
continue;
|
|
254
|
-
}
|
|
255
|
-
if (u.dot !== !0 && (t.type === "slash" || t.type === "bos")) {
|
|
256
|
-
l({ type: "qmark", value: e, output: N });
|
|
257
|
-
continue;
|
|
258
|
-
}
|
|
259
|
-
l({ type: "qmark", value: e, output: E });
|
|
260
|
-
continue;
|
|
261
|
-
}
|
|
262
|
-
if (e === "!") {
|
|
263
|
-
if (u.noextglob !== !0 && i() === "(" && (i(2) !== "?" || !/[!=<:]/.test(i(3)))) {
|
|
264
|
-
W("negate", e);
|
|
265
|
-
continue;
|
|
266
|
-
}
|
|
267
|
-
if (u.nonegate !== !0 && n.index === 0) {
|
|
268
|
-
M();
|
|
269
|
-
continue;
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
if (e === "+") {
|
|
273
|
-
if (u.noextglob !== !0 && i() === "(" && i(2) !== "?") {
|
|
274
|
-
W("plus", e);
|
|
275
|
-
continue;
|
|
276
|
-
}
|
|
277
|
-
if (t && t.value === "(" || u.regex === !1) {
|
|
278
|
-
l({ type: "plus", value: e, output: S });
|
|
279
|
-
continue;
|
|
280
|
-
}
|
|
281
|
-
if (t && (t.type === "bracket" || t.type === "paren" || t.type === "brace") || n.parens > 0) {
|
|
282
|
-
l({ type: "plus", value: e });
|
|
283
|
-
continue;
|
|
284
|
-
}
|
|
285
|
-
l({ type: "plus", value: S });
|
|
286
|
-
continue;
|
|
287
|
-
}
|
|
288
|
-
if (e === "@") {
|
|
289
|
-
if (u.noextglob !== !0 && i() === "(" && i(2) !== "?") {
|
|
290
|
-
l({ type: "at", extglob: !0, value: e, output: "" });
|
|
291
|
-
continue;
|
|
292
|
-
}
|
|
293
|
-
l({ type: "text", value: e });
|
|
294
|
-
continue;
|
|
295
|
-
}
|
|
296
|
-
if (e !== "*") {
|
|
297
|
-
(e === "$" || e === "^") && (e = `\\${e}`);
|
|
298
|
-
const o = f.exec(J());
|
|
299
|
-
o && (e += o[0], n.index += o[0].length), l({ type: "text", value: e });
|
|
300
|
-
continue;
|
|
301
|
-
}
|
|
302
|
-
if (t && (t.type === "globstar" || t.star === !0)) {
|
|
303
|
-
t.type = "star", t.star = !0, t.value += e, t.output = q, n.backtrack = !0, n.globstar = !0, nt(e);
|
|
304
|
-
continue;
|
|
305
|
-
}
|
|
306
|
-
let r = J();
|
|
307
|
-
if (u.noextglob !== !0 && /^\([^?]/.test(r)) {
|
|
308
|
-
W("star", e);
|
|
309
|
-
continue;
|
|
310
|
-
}
|
|
311
|
-
if (t.type === "star") {
|
|
312
|
-
if (u.noglobstar === !0) {
|
|
313
|
-
nt(e);
|
|
314
|
-
continue;
|
|
315
|
-
}
|
|
316
|
-
const o = t.prev, R = o.prev, T = o.type === "slash" || o.type === "bos", j = R && (R.type === "star" || R.type === "globstar");
|
|
317
|
-
if (u.bash === !0 && (!T || r[0] && r[0] !== "/")) {
|
|
318
|
-
l({ type: "star", value: e, output: "" });
|
|
319
|
-
continue;
|
|
320
|
-
}
|
|
321
|
-
const B = n.braces > 0 && (o.type === "comma" || o.type === "brace"), At = I.length && (o.type === "pipe" || o.type === "paren");
|
|
322
|
-
if (!T && o.type !== "paren" && !B && !At) {
|
|
323
|
-
l({ type: "star", value: e, output: "" });
|
|
324
|
-
continue;
|
|
325
|
-
}
|
|
326
|
-
for (; r.slice(0, 3) === "/**"; ) {
|
|
327
|
-
const lt = a[n.index + 4];
|
|
328
|
-
if (lt && lt !== "/")
|
|
329
|
-
break;
|
|
330
|
-
r = r.slice(3), nt("/**", 3);
|
|
331
|
-
}
|
|
332
|
-
if (o.type === "bos" && at()) {
|
|
333
|
-
t.type = "globstar", t.value += e, t.output = z(u), n.output = t.output, n.globstar = !0, nt(e);
|
|
334
|
-
continue;
|
|
335
|
-
}
|
|
336
|
-
if (o.type === "slash" && o.prev.type !== "bos" && !j && at()) {
|
|
337
|
-
n.output = n.output.slice(0, -(o.output + t.output).length), o.output = `(?:${o.output}`, t.type = "globstar", t.output = z(u) + (u.strictSlashes ? ")" : "|$)"), t.value += e, n.globstar = !0, n.output += o.output + t.output, nt(e);
|
|
338
|
-
continue;
|
|
339
|
-
}
|
|
340
|
-
if (o.type === "slash" && o.prev.type !== "bos" && r[0] === "/") {
|
|
341
|
-
const lt = r[1] !== void 0 ? "|$" : "";
|
|
342
|
-
n.output = n.output.slice(0, -(o.output + t.output).length), o.output = `(?:${o.output}`, t.type = "globstar", t.output = `${z(u)}${tt}|${tt}${lt})`, t.value += e, n.output += o.output + t.output, n.globstar = !0, nt(e + _()), l({ type: "slash", value: "/", output: "" });
|
|
343
|
-
continue;
|
|
344
|
-
}
|
|
345
|
-
if (o.type === "bos" && r[0] === "/") {
|
|
346
|
-
t.type = "globstar", t.value += e, t.output = `(?:^|${tt}|${z(u)}${tt})`, n.output = t.output, n.globstar = !0, nt(e + _()), l({ type: "slash", value: "/", output: "" });
|
|
347
|
-
continue;
|
|
348
|
-
}
|
|
349
|
-
n.output = n.output.slice(0, -t.output.length), t.type = "globstar", t.output = z(u), t.value += e, n.output += t.output, n.globstar = !0, nt(e);
|
|
350
|
-
continue;
|
|
351
|
-
}
|
|
352
|
-
const g = { type: "star", value: e, output: q };
|
|
353
|
-
if (u.bash === !0) {
|
|
354
|
-
g.output = ".*?", (t.type === "bos" || t.type === "slash") && (g.output = L + g.output), l(g);
|
|
355
|
-
continue;
|
|
356
|
-
}
|
|
357
|
-
if (t && (t.type === "bracket" || t.type === "paren") && u.regex === !0) {
|
|
358
|
-
g.output = e, l(g);
|
|
359
|
-
continue;
|
|
360
|
-
}
|
|
361
|
-
(n.index === n.start || t.type === "slash" || t.type === "dot") && (t.type === "dot" ? (n.output += st, t.output += st) : u.dot === !0 ? (n.output += K, t.output += K) : (n.output += L, t.output += L), i() !== "*" && (n.output += P, t.output += P)), l(g);
|
|
362
|
-
}
|
|
363
|
-
for (; n.brackets > 0; ) {
|
|
364
|
-
if (u.strictBrackets === !0) throw new SyntaxError(A("closing", "]"));
|
|
365
|
-
n.output = H.escapeLast(n.output, "["), V("brackets");
|
|
366
|
-
}
|
|
367
|
-
for (; n.parens > 0; ) {
|
|
368
|
-
if (u.strictBrackets === !0) throw new SyntaxError(A("closing", ")"));
|
|
369
|
-
n.output = H.escapeLast(n.output, "("), V("parens");
|
|
370
|
-
}
|
|
371
|
-
for (; n.braces > 0; ) {
|
|
372
|
-
if (u.strictBrackets === !0) throw new SyntaxError(A("closing", "}"));
|
|
373
|
-
n.output = H.escapeLast(n.output, "{"), V("braces");
|
|
374
|
-
}
|
|
375
|
-
if (u.strictSlashes !== !0 && (t.type === "star" || t.type === "bracket") && l({ type: "maybe_slash", value: "", output: `${tt}?` }), n.backtrack === !0) {
|
|
376
|
-
n.output = "";
|
|
377
|
-
for (const r of n.tokens)
|
|
378
|
-
n.output += r.output != null ? r.output : r.value, r.suffix && (n.output += r.suffix);
|
|
379
|
-
}
|
|
380
|
-
return n;
|
|
381
|
-
};
|
|
382
|
-
v.fastpaths = (a, y) => {
|
|
383
|
-
const u = { ...y }, C = typeof u.maxLength == "number" ? Math.min(D, u.maxLength) : D, d = a.length;
|
|
384
|
-
if (d > C)
|
|
385
|
-
throw new SyntaxError(`Input length: ${d}, exceeds maximum allowed length: ${C}`);
|
|
386
|
-
a = s[a] || a;
|
|
387
|
-
const { DOT_LITERAL: G, SLASH_LITERAL: x, ONE_CHAR: m, DOTS_SLASH: Q, NO_DOT: $, NO_DOTS: Z, NO_DOTS_SLASH: S, STAR: tt, START_ANCHOR: P } = b.globChars(u.windows), Y = u.dot ? Z : $, w = u.dot ? S : $, st = u.capture ? "" : "?:", K = { negated: !1, prefix: "" };
|
|
388
|
-
let E = u.bash === !0 ? ".*?" : tt;
|
|
389
|
-
u.capture && (E = `(${E})`);
|
|
390
|
-
const N = (L) => L.noglobstar === !0 ? E : `(${st}(?:(?!${P}${L.dot ? Q : G}).)*?)`, ut = (L) => {
|
|
391
|
-
switch (L) {
|
|
392
|
-
case "*":
|
|
393
|
-
return `${Y}${m}${E}`;
|
|
394
|
-
case ".*":
|
|
395
|
-
return `${G}${m}${E}`;
|
|
396
|
-
case "*.*":
|
|
397
|
-
return `${Y}${E}${G}${m}${E}`;
|
|
398
|
-
case "*/*":
|
|
399
|
-
return `${Y}${E}${x}${m}${w}${E}`;
|
|
400
|
-
case "**":
|
|
401
|
-
return Y + N(u);
|
|
402
|
-
case "**/*":
|
|
403
|
-
return `(?:${Y}${N(u)}${x})?${w}${m}${E}`;
|
|
404
|
-
case "**/*.*":
|
|
405
|
-
return `(?:${Y}${N(u)}${x})?${w}${E}${G}${m}${E}`;
|
|
406
|
-
case "**/.*":
|
|
407
|
-
return `(?:${Y}${N(u)}${x})?${G}${m}${E}`;
|
|
408
|
-
default: {
|
|
409
|
-
const ot = /^(.*?)\.(\w+)$/.exec(L);
|
|
410
|
-
if (!ot) return;
|
|
411
|
-
const q = ut(ot[1]);
|
|
412
|
-
return q ? q + G + ot[2] : void 0;
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
}, rt = H.removePrefix(a, K);
|
|
416
|
-
let z = ut(rt);
|
|
417
|
-
return z && u.strictSlashes !== !0 && (z += `${x}?`), z;
|
|
418
|
-
}, F.exports = v;
|
|
419
|
-
}, 510: (F, h, O) => {
|
|
420
|
-
const b = O(716), H = O(697), D = O(96), k = O(154), f = (s) => s && typeof s == "object" && !Array.isArray(s), p = (s, c, A = !1) => {
|
|
421
|
-
if (Array.isArray(s)) {
|
|
422
|
-
const x = s.map((Q) => p(Q, c, A));
|
|
423
|
-
return (Q) => {
|
|
424
|
-
for (const $ of x) {
|
|
425
|
-
const Z = $(Q);
|
|
426
|
-
if (Z) return Z;
|
|
427
|
-
}
|
|
428
|
-
return !1;
|
|
429
|
-
};
|
|
430
|
-
}
|
|
431
|
-
const v = f(s) && s.tokens && s.input;
|
|
432
|
-
if (s === "" || typeof s != "string" && !v)
|
|
433
|
-
throw new TypeError("Expected pattern to be a non-empty string");
|
|
434
|
-
const a = c || {}, y = a.windows, u = v ? p.compileRe(s, c) : p.makeRe(s, c, !1, !0), C = u.state;
|
|
435
|
-
delete u.state;
|
|
436
|
-
let d = () => !1;
|
|
437
|
-
if (a.ignore) {
|
|
438
|
-
const x = { ...c, ignore: null, onMatch: null, onResult: null };
|
|
439
|
-
d = p(a.ignore, x, A);
|
|
440
|
-
}
|
|
441
|
-
const G = (x, m = !1) => {
|
|
442
|
-
const { isMatch: Q, match: $, output: Z } = p.test(x, u, c, { glob: s, posix: y }), S = { glob: s, state: C, regex: u, posix: y, input: x, output: Z, match: $, isMatch: Q };
|
|
443
|
-
return typeof a.onResult == "function" && a.onResult(S), Q === !1 ? (S.isMatch = !1, m ? S : !1) : d(x) ? (typeof a.onIgnore == "function" && a.onIgnore(S), S.isMatch = !1, m ? S : !1) : (typeof a.onMatch == "function" && a.onMatch(S), m ? S : !0);
|
|
444
|
-
};
|
|
445
|
-
return A && (G.state = C), G;
|
|
446
|
-
};
|
|
447
|
-
p.test = (s, c, A, { glob: v, posix: a } = {}) => {
|
|
448
|
-
if (typeof s != "string")
|
|
449
|
-
throw new TypeError("Expected input to be a string");
|
|
450
|
-
if (s === "")
|
|
451
|
-
return { isMatch: !1, output: "" };
|
|
452
|
-
const y = A || {}, u = y.format || (a ? D.toPosixSlashes : null);
|
|
453
|
-
let C = s === v, d = C && u ? u(s) : s;
|
|
454
|
-
return C === !1 && (d = u ? u(s) : s, C = d === v), (C === !1 || y.capture === !0) && (y.matchBase === !0 || y.basename === !0 ? C = p.matchBase(s, c, A, a) : C = c.exec(d)), { isMatch: !!C, match: C, output: d };
|
|
455
|
-
}, p.matchBase = (s, c, A) => (c instanceof RegExp ? c : p.makeRe(c, A)).test(D.basename(s)), p.isMatch = (s, c, A) => p(c, A)(s), p.parse = (s, c) => Array.isArray(s) ? s.map((A) => p.parse(A, c)) : H(s, { ...c, fastpaths: !1 }), p.scan = (s, c) => b(s, c), p.compileRe = (s, c, A = !1, v = !1) => {
|
|
456
|
-
if (A === !0)
|
|
457
|
-
return s.output;
|
|
458
|
-
const a = c || {}, y = a.contains ? "" : "^", u = a.contains ? "" : "$";
|
|
459
|
-
let C = `${y}(?:${s.output})${u}`;
|
|
460
|
-
s && s.negated === !0 && (C = `^(?!${C}).*$`);
|
|
461
|
-
const d = p.toRegex(C, c);
|
|
462
|
-
return v === !0 && (d.state = s), d;
|
|
463
|
-
}, p.makeRe = (s, c = {}, A = !1, v = !1) => {
|
|
464
|
-
if (!s || typeof s != "string")
|
|
465
|
-
throw new TypeError("Expected a non-empty string");
|
|
466
|
-
let a = { negated: !1, fastpaths: !0 };
|
|
467
|
-
return c.fastpaths !== !1 && (s[0] === "." || s[0] === "*") && (a.output = H.fastpaths(s, c)), a.output || (a = H(s, c)), p.compileRe(a, c, A, v);
|
|
468
|
-
}, p.toRegex = (s, c) => {
|
|
469
|
-
try {
|
|
470
|
-
const A = c || {};
|
|
471
|
-
return new RegExp(s, A.flags || (A.nocase ? "i" : ""));
|
|
472
|
-
} catch (A) {
|
|
473
|
-
if (c && c.debug === !0) throw A;
|
|
474
|
-
return /$^/;
|
|
22
|
+
});
|
|
23
|
+
class h {
|
|
24
|
+
insert(e) {
|
|
25
|
+
this._insert(e.split("/").filter(Boolean), [], !1);
|
|
26
|
+
}
|
|
27
|
+
smoosh() {
|
|
28
|
+
return this._smoosh();
|
|
29
|
+
}
|
|
30
|
+
_smoosh(e) {
|
|
31
|
+
e === void 0 && (e = "/");
|
|
32
|
+
const r = [
|
|
33
|
+
...this.children.keys()
|
|
34
|
+
].sort();
|
|
35
|
+
this.slugName !== null && r.splice(r.indexOf("[]"), 1), this.restSlugName !== null && r.splice(r.indexOf("[...]"), 1), this.optionalRestSlugName !== null && r.splice(r.indexOf("[[...]]"), 1);
|
|
36
|
+
const n = r.map((s) => this.children.get(s)._smoosh("" + e + s + "/")).reduce((s, t) => [
|
|
37
|
+
...s,
|
|
38
|
+
...t
|
|
39
|
+
], []);
|
|
40
|
+
if (this.slugName !== null && n.push(...this.children.get("[]")._smoosh(e + "[" + this.slugName + "]/")), !this.placeholder) {
|
|
41
|
+
const s = e === "/" ? "/" : e.slice(0, -1);
|
|
42
|
+
if (this.optionalRestSlugName != null)
|
|
43
|
+
throw new Error('You cannot define a route with the same specificity as a optional catch-all route ("' + s + '" and "' + s + "[[..." + this.optionalRestSlugName + ']]").');
|
|
44
|
+
n.unshift(s);
|
|
475
45
|
}
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
let K = $, E = -1, N = 0, ut = 0, rt = !1, z = !1, L = !1, ot = !1, q = !1, n = !1, I = !1, et = !1, ct = !1, t = !1, e = 0, at, i, _ = { value: "", depth: 0, isGlob: !1 };
|
|
483
|
-
const J = () => E >= tt, nt = () => K.charCodeAt(E + 1), U = () => (at = i, K.charCodeAt(++E));
|
|
484
|
-
for (; E < tt; ) {
|
|
485
|
-
i = U();
|
|
486
|
-
let W;
|
|
487
|
-
if (i === k) {
|
|
488
|
-
I = _.backslashes = !0, i = U(), i === A && (n = !0);
|
|
489
|
-
continue;
|
|
490
|
-
}
|
|
491
|
-
if (n === !0 || i === A) {
|
|
492
|
-
for (e++; J() !== !0 && (i = U()); ) {
|
|
493
|
-
if (i === k) {
|
|
494
|
-
I = _.backslashes = !0, U();
|
|
495
|
-
continue;
|
|
496
|
-
}
|
|
497
|
-
if (i === A) {
|
|
498
|
-
e++;
|
|
499
|
-
continue;
|
|
500
|
-
}
|
|
501
|
-
if (n !== !0 && i === p && (i = U()) === p) {
|
|
502
|
-
if (rt = _.isBrace = !0, L = _.isGlob = !0, t = !0, P === !0)
|
|
503
|
-
continue;
|
|
504
|
-
break;
|
|
505
|
-
}
|
|
506
|
-
if (n !== !0 && i === f) {
|
|
507
|
-
if (rt = _.isBrace = !0, L = _.isGlob = !0, t = !0, P === !0)
|
|
508
|
-
continue;
|
|
509
|
-
break;
|
|
510
|
-
}
|
|
511
|
-
if (i === C && (e--, e === 0)) {
|
|
512
|
-
n = !1, rt = _.isBrace = !0, t = !0;
|
|
513
|
-
break;
|
|
514
|
-
}
|
|
515
|
-
}
|
|
516
|
-
if (P === !0)
|
|
517
|
-
continue;
|
|
518
|
-
break;
|
|
519
|
-
}
|
|
520
|
-
if (i === c) {
|
|
521
|
-
if (Y.push(E), w.push(_), _ = { value: "", depth: 0, isGlob: !1 }, t === !0) continue;
|
|
522
|
-
if (at === p && E === N + 1) {
|
|
523
|
-
N += 2;
|
|
524
|
-
continue;
|
|
525
|
-
}
|
|
526
|
-
ut = E + 1;
|
|
527
|
-
continue;
|
|
528
|
-
}
|
|
529
|
-
if (S.noext !== !0 && (i === y || i === D || i === H || i === u || i === s) === !0 && nt() === v) {
|
|
530
|
-
if (L = _.isGlob = !0, ot = _.isExtglob = !0, t = !0, i === s && E === N && (ct = !0), P === !0) {
|
|
531
|
-
for (; J() !== !0 && (i = U()); ) {
|
|
532
|
-
if (i === k) {
|
|
533
|
-
I = _.backslashes = !0, i = U();
|
|
534
|
-
continue;
|
|
535
|
-
}
|
|
536
|
-
if (i === d) {
|
|
537
|
-
L = _.isGlob = !0, t = !0;
|
|
538
|
-
break;
|
|
539
|
-
}
|
|
540
|
-
}
|
|
541
|
-
continue;
|
|
542
|
-
}
|
|
543
|
-
break;
|
|
544
|
-
}
|
|
545
|
-
if (i === H) {
|
|
546
|
-
if (at === H && (q = _.isGlobstar = !0), L = _.isGlob = !0, t = !0, P === !0)
|
|
547
|
-
continue;
|
|
548
|
-
break;
|
|
549
|
-
}
|
|
550
|
-
if (i === u) {
|
|
551
|
-
if (L = _.isGlob = !0, t = !0, P === !0)
|
|
552
|
-
continue;
|
|
553
|
-
break;
|
|
554
|
-
}
|
|
555
|
-
if (i === a) {
|
|
556
|
-
for (; J() !== !0 && (W = U()); ) {
|
|
557
|
-
if (W === k) {
|
|
558
|
-
I = _.backslashes = !0, U();
|
|
559
|
-
continue;
|
|
560
|
-
}
|
|
561
|
-
if (W === G) {
|
|
562
|
-
z = _.isBracket = !0, L = _.isGlob = !0, t = !0;
|
|
563
|
-
break;
|
|
564
|
-
}
|
|
565
|
-
}
|
|
566
|
-
if (P === !0)
|
|
567
|
-
continue;
|
|
568
|
-
break;
|
|
569
|
-
}
|
|
570
|
-
if (S.nonegate !== !0 && i === s && E === N) {
|
|
571
|
-
et = _.negated = !0, N++;
|
|
572
|
-
continue;
|
|
573
|
-
}
|
|
574
|
-
if (S.noparen !== !0 && i === v) {
|
|
575
|
-
if (L = _.isGlob = !0, P === !0) {
|
|
576
|
-
for (; J() !== !0 && (i = U()); ) {
|
|
577
|
-
if (i === v) {
|
|
578
|
-
I = _.backslashes = !0, i = U();
|
|
579
|
-
continue;
|
|
580
|
-
}
|
|
581
|
-
if (i === d) {
|
|
582
|
-
t = !0;
|
|
583
|
-
break;
|
|
584
|
-
}
|
|
585
|
-
}
|
|
586
|
-
continue;
|
|
587
|
-
}
|
|
588
|
-
break;
|
|
589
|
-
}
|
|
590
|
-
if (L === !0) {
|
|
591
|
-
if (t = !0, P === !0)
|
|
592
|
-
continue;
|
|
593
|
-
break;
|
|
594
|
-
}
|
|
46
|
+
return this.restSlugName !== null && n.push(...this.children.get("[...]")._smoosh(e + "[..." + this.restSlugName + "]/")), this.optionalRestSlugName !== null && n.push(...this.children.get("[[...]]")._smoosh(e + "[[..." + this.optionalRestSlugName + "]]/")), n;
|
|
47
|
+
}
|
|
48
|
+
_insert(e, r, n) {
|
|
49
|
+
if (e.length === 0) {
|
|
50
|
+
this.placeholder = !1;
|
|
51
|
+
return;
|
|
595
52
|
}
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
53
|
+
if (n)
|
|
54
|
+
throw new Error("Catch-all must be the last part of the URL.");
|
|
55
|
+
let s = e[0];
|
|
56
|
+
if (s.startsWith("[") && s.endsWith("]")) {
|
|
57
|
+
let l = function(u, a) {
|
|
58
|
+
if (u !== null && u !== a)
|
|
59
|
+
throw new Error("You cannot use different slug names for the same dynamic path ('" + u + "' !== '" + a + "').");
|
|
60
|
+
r.forEach((c) => {
|
|
61
|
+
if (c === a)
|
|
62
|
+
throw new Error('You cannot have the same slug name "' + a + '" repeat within a single dynamic path');
|
|
63
|
+
if (c.replace(/\W/g, "") === s.replace(/\W/g, ""))
|
|
64
|
+
throw new Error('You cannot have the slug names "' + c + '" and "' + a + '" differ only by non-word symbols within a single dynamic path');
|
|
65
|
+
}), r.push(a);
|
|
66
|
+
}, t = s.slice(1, -1), i = !1;
|
|
67
|
+
if (t.startsWith("[") && t.endsWith("]") && (t = t.slice(1, -1), i = !0), t.startsWith("…"))
|
|
68
|
+
throw new Error("Detected a three-dot character ('…') at ('" + t + "'). Did you mean ('...')?");
|
|
69
|
+
if (t.startsWith("...") && (t = t.substring(3), n = !0), t.startsWith("[") || t.endsWith("]"))
|
|
70
|
+
throw new Error("Segment names may not start or end with extra brackets ('" + t + "').");
|
|
71
|
+
if (t.startsWith("."))
|
|
72
|
+
throw new Error("Segment names may not start with erroneous periods ('" + t + "').");
|
|
73
|
+
if (n)
|
|
74
|
+
if (i) {
|
|
75
|
+
if (this.restSlugName != null)
|
|
76
|
+
throw new Error('You cannot use both an required and optional catch-all route at the same level ("[...' + this.restSlugName + ']" and "' + e[0] + '" ).');
|
|
77
|
+
l(this.optionalRestSlugName, t), this.optionalRestSlugName = t, s = "[[...]]";
|
|
78
|
+
} else {
|
|
79
|
+
if (this.optionalRestSlugName != null)
|
|
80
|
+
throw new Error('You cannot use both an optional and required catch-all route at the same level ("[[...' + this.optionalRestSlugName + ']]" and "' + e[0] + '").');
|
|
81
|
+
l(this.restSlugName, t), this.restSlugName = t, s = "[...]";
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
if (i)
|
|
85
|
+
throw new Error('Optional route parameters are not yet supported ("' + e[0] + '").');
|
|
86
|
+
l(this.slugName, t), this.slugName = t, s = "[]";
|
|
605
87
|
}
|
|
606
|
-
if (W && W + 1 < $.length) {
|
|
607
|
-
const X = $.slice(W + 1);
|
|
608
|
-
st.push(X), S.tokens && (w[w.length - 1].value = X, m(w[w.length - 1]), l.maxDepth += w[w.length - 1].depth);
|
|
609
|
-
}
|
|
610
|
-
l.slashes = Y, l.parts = st;
|
|
611
88
|
}
|
|
612
|
-
|
|
613
|
-
}
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
}, h.basename = (f, { windows: p } = {}) => {
|
|
628
|
-
const s = f.split(p ? /[\\/]/ : "/"), c = s[s.length - 1];
|
|
629
|
-
return c === "" ? s[s.length - 2] : c;
|
|
630
|
-
};
|
|
631
|
-
} }, ft = {};
|
|
632
|
-
function pt(F) {
|
|
633
|
-
var h = ft[F];
|
|
634
|
-
if (h !== void 0)
|
|
635
|
-
return h.exports;
|
|
636
|
-
var O = ft[F] = { exports: {} }, b = !0;
|
|
637
|
-
try {
|
|
638
|
-
ht[F](O, O.exports, pt), b = !1;
|
|
639
|
-
} finally {
|
|
640
|
-
b && delete ft[F];
|
|
89
|
+
this.children.has(s) || this.children.set(s, new h()), this.children.get(s)._insert(e.slice(1), r, n);
|
|
90
|
+
}
|
|
91
|
+
constructor() {
|
|
92
|
+
this.placeholder = !0, this.children = /* @__PURE__ */ new Map(), this.slugName = null, this.restSlugName = null, this.optionalRestSlugName = null;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
function f(o) {
|
|
96
|
+
const e = new h();
|
|
97
|
+
return o.forEach((r) => e.insert(r)), e.smoosh();
|
|
98
|
+
}
|
|
99
|
+
function w(o, e) {
|
|
100
|
+
const r = {}, n = [];
|
|
101
|
+
for (let t = 0; t < o.length; t++) {
|
|
102
|
+
const i = e(o[t]);
|
|
103
|
+
r[i] = t, n[t] = i;
|
|
641
104
|
}
|
|
642
|
-
return
|
|
105
|
+
return f(n).map((t) => o[r[t]]);
|
|
643
106
|
}
|
|
644
|
-
|
|
645
|
-
var Et = pt(170);
|
|
646
|
-
Rt.exports = Et;
|
|
647
|
-
})(), Rt.exports);
|
|
107
|
+
}(m), m);
|
|
648
108
|
}
|
|
649
109
|
export {
|
|
650
|
-
|
|
110
|
+
S as __require
|
|
651
111
|
};
|