gemi 0.4.9 → 0.4.11
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/app/App.d.ts.map +1 -1
- package/dist/app/index.js +2 -10
- package/dist/bin/index.js +43 -2
- package/dist/client/ClientRouter.d.ts.map +1 -1
- package/dist/client/ClientRouterContext.d.ts +1 -0
- package/dist/client/ClientRouterContext.d.ts.map +1 -1
- package/dist/client/ComponentContext.d.ts +10 -0
- package/dist/client/ComponentContext.d.ts.map +1 -0
- package/dist/client/index.js +858 -134
- package/dist/server/index.js +43 -2
- package/package.json +1 -1
- package/dist/client/index-DiGoPyjN.mjs +0 -717
package/dist/client/index.js
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
|
+
var __typeError = (msg) => {
|
|
3
|
+
throw TypeError(msg);
|
|
4
|
+
};
|
|
2
5
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
6
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
-
|
|
7
|
+
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
|
|
8
|
+
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
|
|
9
|
+
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
10
|
+
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
|
|
11
|
+
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
12
|
+
var _i, _n, _t, _e, _s, _l, _o, _d, _p, _g, _H_instances, r_fn, R_fn, b_fn, u_fn, m_fn, a_fn, P_fn, E_fn, S_fn, O_fn, k_fn, x_fn, h_fn, f_fn, T_fn, A_fn, y_fn, w_fn, c_fn, C_fn, _a, _i2, _n2, _t2, _e2, _s2, _l2, _b;
|
|
13
|
+
import require$$1, { createContext, useContext, useState, useEffect, useRef, lazy, startTransition, StrictMode, Suspense } from "react";
|
|
5
14
|
import { jsx, Fragment } from "react/jsx-runtime";
|
|
6
15
|
import require$$2 from "react-dom";
|
|
7
16
|
const ServerDataContext = createContext({});
|
|
@@ -275,14 +284,14 @@ function useMutationStatus() {
|
|
|
275
284
|
return { isPending };
|
|
276
285
|
}
|
|
277
286
|
const ValidationErrors = (props) => {
|
|
278
|
-
var
|
|
287
|
+
var _a2;
|
|
279
288
|
const {
|
|
280
289
|
render = (props2) => /* @__PURE__ */ jsx("div", { ...props2 }),
|
|
281
290
|
name
|
|
282
291
|
} = props;
|
|
283
292
|
const { validationErrors } = useContext(MutationContext);
|
|
284
293
|
const Comp = render;
|
|
285
|
-
if (((
|
|
294
|
+
if (((_a2 = validationErrors[name]) == null ? void 0 : _a2.length) > 0) {
|
|
286
295
|
return /* @__PURE__ */ jsx(Fragment, { children: validationErrors[name].map((error) => {
|
|
287
296
|
return /* @__PURE__ */ jsx(Comp, { className: props.className, children: error }, error);
|
|
288
297
|
}) });
|
|
@@ -569,6 +578,733 @@ class Subject {
|
|
|
569
578
|
return this.value;
|
|
570
579
|
}
|
|
571
580
|
}
|
|
581
|
+
function flattenComponentTree(componentTree) {
|
|
582
|
+
let out = [];
|
|
583
|
+
for (const [root, branches] of componentTree) {
|
|
584
|
+
out.push(root, ...flattenComponentTree(branches).flat());
|
|
585
|
+
}
|
|
586
|
+
return Array.from(new Set(out));
|
|
587
|
+
}
|
|
588
|
+
let viewImportMap = null;
|
|
589
|
+
if (typeof window !== "undefined" && process.env.NODE_ENV !== "test") {
|
|
590
|
+
viewImportMap = {};
|
|
591
|
+
const { componentTree } = window.__GEMI_DATA__;
|
|
592
|
+
for (const viewName of flattenComponentTree(componentTree)) {
|
|
593
|
+
viewImportMap[viewName] = lazy(window.loaders[viewName]);
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
const ComponentsContext = createContext({ viewImportMap });
|
|
597
|
+
const ComponentsProvider = (props) => {
|
|
598
|
+
return /* @__PURE__ */ jsx(
|
|
599
|
+
ComponentsContext.Provider,
|
|
600
|
+
{
|
|
601
|
+
value: { viewImportMap: props.viewImportMap ?? viewImportMap },
|
|
602
|
+
children: props.children
|
|
603
|
+
}
|
|
604
|
+
);
|
|
605
|
+
};
|
|
606
|
+
var R = class {
|
|
607
|
+
constructor(t, r, n, o, c, l) {
|
|
608
|
+
__publicField(this, "type", 3);
|
|
609
|
+
__publicField(this, "name", "");
|
|
610
|
+
__publicField(this, "prefix", "");
|
|
611
|
+
__publicField(this, "value", "");
|
|
612
|
+
__publicField(this, "suffix", "");
|
|
613
|
+
__publicField(this, "modifier", 3);
|
|
614
|
+
this.type = t, this.name = r, this.prefix = n, this.value = o, this.suffix = c, this.modifier = l;
|
|
615
|
+
}
|
|
616
|
+
hasCustomName() {
|
|
617
|
+
return this.name !== "" && typeof this.name != "number";
|
|
618
|
+
}
|
|
619
|
+
}, be = /[$_\p{ID_Start}]/u, Pe = /[$_\u200C\u200D\p{ID_Continue}]/u, M = ".*";
|
|
620
|
+
function Re(e, t) {
|
|
621
|
+
return /^[\x00-\x7F]*$/.test(e);
|
|
622
|
+
}
|
|
623
|
+
function v(e, t = false) {
|
|
624
|
+
let r = [], n = 0;
|
|
625
|
+
for (; n < e.length; ) {
|
|
626
|
+
let o = e[n], c = function(l) {
|
|
627
|
+
if (!t) throw new TypeError(l);
|
|
628
|
+
r.push({ type: "INVALID_CHAR", index: n, value: e[n++] });
|
|
629
|
+
};
|
|
630
|
+
if (o === "*") {
|
|
631
|
+
r.push({ type: "ASTERISK", index: n, value: e[n++] });
|
|
632
|
+
continue;
|
|
633
|
+
}
|
|
634
|
+
if (o === "+" || o === "?") {
|
|
635
|
+
r.push({ type: "OTHER_MODIFIER", index: n, value: e[n++] });
|
|
636
|
+
continue;
|
|
637
|
+
}
|
|
638
|
+
if (o === "\\") {
|
|
639
|
+
r.push({ type: "ESCAPED_CHAR", index: n++, value: e[n++] });
|
|
640
|
+
continue;
|
|
641
|
+
}
|
|
642
|
+
if (o === "{") {
|
|
643
|
+
r.push({ type: "OPEN", index: n, value: e[n++] });
|
|
644
|
+
continue;
|
|
645
|
+
}
|
|
646
|
+
if (o === "}") {
|
|
647
|
+
r.push({ type: "CLOSE", index: n, value: e[n++] });
|
|
648
|
+
continue;
|
|
649
|
+
}
|
|
650
|
+
if (o === ":") {
|
|
651
|
+
let l = "", s = n + 1;
|
|
652
|
+
for (; s < e.length; ) {
|
|
653
|
+
let i = e.substr(s, 1);
|
|
654
|
+
if (s === n + 1 && be.test(i) || s !== n + 1 && Pe.test(i)) {
|
|
655
|
+
l += e[s++];
|
|
656
|
+
continue;
|
|
657
|
+
}
|
|
658
|
+
break;
|
|
659
|
+
}
|
|
660
|
+
if (!l) {
|
|
661
|
+
c(`Missing parameter name at ${n}`);
|
|
662
|
+
continue;
|
|
663
|
+
}
|
|
664
|
+
r.push({ type: "NAME", index: n, value: l }), n = s;
|
|
665
|
+
continue;
|
|
666
|
+
}
|
|
667
|
+
if (o === "(") {
|
|
668
|
+
let l = 1, s = "", i = n + 1, a = false;
|
|
669
|
+
if (e[i] === "?") {
|
|
670
|
+
c(`Pattern cannot start with "?" at ${i}`);
|
|
671
|
+
continue;
|
|
672
|
+
}
|
|
673
|
+
for (; i < e.length; ) {
|
|
674
|
+
if (!Re(e[i])) {
|
|
675
|
+
c(`Invalid character '${e[i]}' at ${i}.`), a = true;
|
|
676
|
+
break;
|
|
677
|
+
}
|
|
678
|
+
if (e[i] === "\\") {
|
|
679
|
+
s += e[i++] + e[i++];
|
|
680
|
+
continue;
|
|
681
|
+
}
|
|
682
|
+
if (e[i] === ")") {
|
|
683
|
+
if (l--, l === 0) {
|
|
684
|
+
i++;
|
|
685
|
+
break;
|
|
686
|
+
}
|
|
687
|
+
} else if (e[i] === "(" && (l++, e[i + 1] !== "?")) {
|
|
688
|
+
c(`Capturing groups are not allowed at ${i}`), a = true;
|
|
689
|
+
break;
|
|
690
|
+
}
|
|
691
|
+
s += e[i++];
|
|
692
|
+
}
|
|
693
|
+
if (a) continue;
|
|
694
|
+
if (l) {
|
|
695
|
+
c(`Unbalanced pattern at ${n}`);
|
|
696
|
+
continue;
|
|
697
|
+
}
|
|
698
|
+
if (!s) {
|
|
699
|
+
c(`Missing pattern at ${n}`);
|
|
700
|
+
continue;
|
|
701
|
+
}
|
|
702
|
+
r.push({ type: "REGEX", index: n, value: s }), n = i;
|
|
703
|
+
continue;
|
|
704
|
+
}
|
|
705
|
+
r.push({ type: "CHAR", index: n, value: e[n++] });
|
|
706
|
+
}
|
|
707
|
+
return r.push({ type: "END", index: n, value: "" }), r;
|
|
708
|
+
}
|
|
709
|
+
function D(e, t = {}) {
|
|
710
|
+
let r = v(e);
|
|
711
|
+
t.delimiter ?? (t.delimiter = "/#?"), t.prefixes ?? (t.prefixes = "./");
|
|
712
|
+
let n = `[^${S(t.delimiter)}]+?`, o = [], c = 0, l = 0, i = /* @__PURE__ */ new Set(), a = (h) => {
|
|
713
|
+
if (l < r.length && r[l].type === h) return r[l++].value;
|
|
714
|
+
}, f = () => a("OTHER_MODIFIER") ?? a("ASTERISK"), d = (h) => {
|
|
715
|
+
let u = a(h);
|
|
716
|
+
if (u !== void 0) return u;
|
|
717
|
+
let { type: p, index: A } = r[l];
|
|
718
|
+
throw new TypeError(`Unexpected ${p} at ${A}, expected ${h}`);
|
|
719
|
+
}, T = () => {
|
|
720
|
+
let h = "", u;
|
|
721
|
+
for (; u = a("CHAR") ?? a("ESCAPED_CHAR"); ) h += u;
|
|
722
|
+
return h;
|
|
723
|
+
}, Se = (h) => h, L = t.encodePart || Se, I = "", U = (h) => {
|
|
724
|
+
I += h;
|
|
725
|
+
}, $ = () => {
|
|
726
|
+
I.length && (o.push(new R(3, "", "", L(I), "", 3)), I = "");
|
|
727
|
+
}, V = (h, u, p, A, Y) => {
|
|
728
|
+
let g = 3;
|
|
729
|
+
switch (Y) {
|
|
730
|
+
case "?":
|
|
731
|
+
g = 1;
|
|
732
|
+
break;
|
|
733
|
+
case "*":
|
|
734
|
+
g = 0;
|
|
735
|
+
break;
|
|
736
|
+
case "+":
|
|
737
|
+
g = 2;
|
|
738
|
+
break;
|
|
739
|
+
}
|
|
740
|
+
if (!u && !p && g === 3) {
|
|
741
|
+
U(h);
|
|
742
|
+
return;
|
|
743
|
+
}
|
|
744
|
+
if ($(), !u && !p) {
|
|
745
|
+
if (!h) return;
|
|
746
|
+
o.push(new R(3, "", "", L(h), "", g));
|
|
747
|
+
return;
|
|
748
|
+
}
|
|
749
|
+
let m;
|
|
750
|
+
p ? p === "*" ? m = M : m = p : m = n;
|
|
751
|
+
let O = 2;
|
|
752
|
+
m === n ? (O = 1, m = "") : m === M && (O = 0, m = "");
|
|
753
|
+
let P;
|
|
754
|
+
if (u ? P = u : p && (P = c++), i.has(P)) throw new TypeError(`Duplicate name '${P}'.`);
|
|
755
|
+
i.add(P), o.push(new R(O, P, L(h), m, L(A), g));
|
|
756
|
+
};
|
|
757
|
+
for (; l < r.length; ) {
|
|
758
|
+
let h = a("CHAR"), u = a("NAME"), p = a("REGEX");
|
|
759
|
+
if (!u && !p && (p = a("ASTERISK")), u || p) {
|
|
760
|
+
let g = h ?? "";
|
|
761
|
+
t.prefixes.indexOf(g) === -1 && (U(g), g = ""), $();
|
|
762
|
+
let m = f();
|
|
763
|
+
V(g, u, p, "", m);
|
|
764
|
+
continue;
|
|
765
|
+
}
|
|
766
|
+
let A = h ?? a("ESCAPED_CHAR");
|
|
767
|
+
if (A) {
|
|
768
|
+
U(A);
|
|
769
|
+
continue;
|
|
770
|
+
}
|
|
771
|
+
if (a("OPEN")) {
|
|
772
|
+
let g = T(), m = a("NAME"), O = a("REGEX");
|
|
773
|
+
!m && !O && (O = a("ASTERISK"));
|
|
774
|
+
let P = T();
|
|
775
|
+
d("CLOSE");
|
|
776
|
+
let xe = f();
|
|
777
|
+
V(g, m, O, P, xe);
|
|
778
|
+
continue;
|
|
779
|
+
}
|
|
780
|
+
$(), d("END");
|
|
781
|
+
}
|
|
782
|
+
return o;
|
|
783
|
+
}
|
|
784
|
+
function S(e) {
|
|
785
|
+
return e.replace(/([.+*?^${}()[\]|/\\])/g, "\\$1");
|
|
786
|
+
}
|
|
787
|
+
function X(e) {
|
|
788
|
+
return e && e.ignoreCase ? "ui" : "u";
|
|
789
|
+
}
|
|
790
|
+
function Z(e, t, r) {
|
|
791
|
+
return F(D(e, r), t, r);
|
|
792
|
+
}
|
|
793
|
+
function k(e) {
|
|
794
|
+
switch (e) {
|
|
795
|
+
case 0:
|
|
796
|
+
return "*";
|
|
797
|
+
case 1:
|
|
798
|
+
return "?";
|
|
799
|
+
case 2:
|
|
800
|
+
return "+";
|
|
801
|
+
case 3:
|
|
802
|
+
return "";
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
function F(e, t, r = {}) {
|
|
806
|
+
r.delimiter ?? (r.delimiter = "/#?"), r.prefixes ?? (r.prefixes = "./"), r.sensitive ?? (r.sensitive = false), r.strict ?? (r.strict = false), r.end ?? (r.end = true), r.start ?? (r.start = true), r.endsWith = "";
|
|
807
|
+
let n = r.start ? "^" : "";
|
|
808
|
+
for (let s of e) {
|
|
809
|
+
if (s.type === 3) {
|
|
810
|
+
s.modifier === 3 ? n += S(s.value) : n += `(?:${S(s.value)})${k(s.modifier)}`;
|
|
811
|
+
continue;
|
|
812
|
+
}
|
|
813
|
+
t && t.push(s.name);
|
|
814
|
+
let i = `[^${S(r.delimiter)}]+?`, a = s.value;
|
|
815
|
+
if (s.type === 1 ? a = i : s.type === 0 && (a = M), !s.prefix.length && !s.suffix.length) {
|
|
816
|
+
s.modifier === 3 || s.modifier === 1 ? n += `(${a})${k(s.modifier)}` : n += `((?:${a})${k(s.modifier)})`;
|
|
817
|
+
continue;
|
|
818
|
+
}
|
|
819
|
+
if (s.modifier === 3 || s.modifier === 1) {
|
|
820
|
+
n += `(?:${S(s.prefix)}(${a})${S(s.suffix)})`, n += k(s.modifier);
|
|
821
|
+
continue;
|
|
822
|
+
}
|
|
823
|
+
n += `(?:${S(s.prefix)}`, n += `((?:${a})(?:`, n += S(s.suffix), n += S(s.prefix), n += `(?:${a}))*)${S(s.suffix)})`, s.modifier === 0 && (n += "?");
|
|
824
|
+
}
|
|
825
|
+
let o = `[${S(r.endsWith)}]|$`, c = `[${S(r.delimiter)}]`;
|
|
826
|
+
if (r.end) return r.strict || (n += `${c}?`), r.endsWith.length ? n += `(?=${o})` : n += "$", new RegExp(n, X(r));
|
|
827
|
+
r.strict || (n += `(?:${c}(?=${o}))?`);
|
|
828
|
+
let l = false;
|
|
829
|
+
if (e.length) {
|
|
830
|
+
let s = e[e.length - 1];
|
|
831
|
+
s.type === 3 && s.modifier === 3 && (l = r.delimiter.indexOf(s) > -1);
|
|
832
|
+
}
|
|
833
|
+
return l || (n += `(?=${c}|${o})`), new RegExp(n, X(r));
|
|
834
|
+
}
|
|
835
|
+
var x = { delimiter: "", prefixes: "", sensitive: true, strict: true }, B = { delimiter: ".", prefixes: "", sensitive: true, strict: true }, q = { delimiter: "/", prefixes: "/", sensitive: true, strict: true };
|
|
836
|
+
function J(e, t) {
|
|
837
|
+
return e.length ? e[0] === "/" ? true : !t || e.length < 2 ? false : (e[0] == "\\" || e[0] == "{") && e[1] == "/" : false;
|
|
838
|
+
}
|
|
839
|
+
function Q(e, t) {
|
|
840
|
+
return e.startsWith(t) ? e.substring(t.length, e.length) : e;
|
|
841
|
+
}
|
|
842
|
+
function Ee(e, t) {
|
|
843
|
+
return e.endsWith(t) ? e.substr(0, e.length - t.length) : e;
|
|
844
|
+
}
|
|
845
|
+
function W(e) {
|
|
846
|
+
return !e || e.length < 2 ? false : e[0] === "[" || (e[0] === "\\" || e[0] === "{") && e[1] === "[";
|
|
847
|
+
}
|
|
848
|
+
var ee = ["ftp", "file", "http", "https", "ws", "wss"];
|
|
849
|
+
function N(e) {
|
|
850
|
+
if (!e) return true;
|
|
851
|
+
for (let t of ee) if (e.test(t)) return true;
|
|
852
|
+
return false;
|
|
853
|
+
}
|
|
854
|
+
function te(e, t) {
|
|
855
|
+
if (e = Q(e, "#"), t || e === "") return e;
|
|
856
|
+
let r = new URL("https://example.com");
|
|
857
|
+
return r.hash = e, r.hash ? r.hash.substring(1, r.hash.length) : "";
|
|
858
|
+
}
|
|
859
|
+
function re(e, t) {
|
|
860
|
+
if (e = Q(e, "?"), t || e === "") return e;
|
|
861
|
+
let r = new URL("https://example.com");
|
|
862
|
+
return r.search = e, r.search ? r.search.substring(1, r.search.length) : "";
|
|
863
|
+
}
|
|
864
|
+
function ne(e, t) {
|
|
865
|
+
return t || e === "" ? e : W(e) ? j(e) : z(e);
|
|
866
|
+
}
|
|
867
|
+
function se(e, t) {
|
|
868
|
+
if (t || e === "") return e;
|
|
869
|
+
let r = new URL("https://example.com");
|
|
870
|
+
return r.password = e, r.password;
|
|
871
|
+
}
|
|
872
|
+
function ie(e, t) {
|
|
873
|
+
if (t || e === "") return e;
|
|
874
|
+
let r = new URL("https://example.com");
|
|
875
|
+
return r.username = e, r.username;
|
|
876
|
+
}
|
|
877
|
+
function ae(e, t, r) {
|
|
878
|
+
if (r || e === "") return e;
|
|
879
|
+
if (t && !ee.includes(t)) return new URL(`${t}:${e}`).pathname;
|
|
880
|
+
let n = e[0] == "/";
|
|
881
|
+
return e = new URL(n ? e : "/-" + e, "https://example.com").pathname, n || (e = e.substring(2, e.length)), e;
|
|
882
|
+
}
|
|
883
|
+
function oe(e, t, r) {
|
|
884
|
+
return _(t) === e && (e = ""), r || e === "" ? e : K(e);
|
|
885
|
+
}
|
|
886
|
+
function ce(e, t) {
|
|
887
|
+
return e = Ee(e, ":"), t || e === "" ? e : y(e);
|
|
888
|
+
}
|
|
889
|
+
function _(e) {
|
|
890
|
+
switch (e) {
|
|
891
|
+
case "ws":
|
|
892
|
+
case "http":
|
|
893
|
+
return "80";
|
|
894
|
+
case "wws":
|
|
895
|
+
case "https":
|
|
896
|
+
return "443";
|
|
897
|
+
case "ftp":
|
|
898
|
+
return "21";
|
|
899
|
+
default:
|
|
900
|
+
return "";
|
|
901
|
+
}
|
|
902
|
+
}
|
|
903
|
+
function y(e) {
|
|
904
|
+
if (e === "") return e;
|
|
905
|
+
if (/^[-+.A-Za-z0-9]*$/.test(e)) return e.toLowerCase();
|
|
906
|
+
throw new TypeError(`Invalid protocol '${e}'.`);
|
|
907
|
+
}
|
|
908
|
+
function le(e) {
|
|
909
|
+
if (e === "") return e;
|
|
910
|
+
let t = new URL("https://example.com");
|
|
911
|
+
return t.username = e, t.username;
|
|
912
|
+
}
|
|
913
|
+
function fe(e) {
|
|
914
|
+
if (e === "") return e;
|
|
915
|
+
let t = new URL("https://example.com");
|
|
916
|
+
return t.password = e, t.password;
|
|
917
|
+
}
|
|
918
|
+
function z(e) {
|
|
919
|
+
if (e === "") return e;
|
|
920
|
+
if (/[\t\n\r #%/:<>?@[\]^\\|]/g.test(e)) throw new TypeError(`Invalid hostname '${e}'`);
|
|
921
|
+
let t = new URL("https://example.com");
|
|
922
|
+
return t.hostname = e, t.hostname;
|
|
923
|
+
}
|
|
924
|
+
function j(e) {
|
|
925
|
+
if (e === "") return e;
|
|
926
|
+
if (/[^0-9a-fA-F[\]:]/g.test(e)) throw new TypeError(`Invalid IPv6 hostname '${e}'`);
|
|
927
|
+
return e.toLowerCase();
|
|
928
|
+
}
|
|
929
|
+
function K(e) {
|
|
930
|
+
if (e === "" || /^[0-9]*$/.test(e) && parseInt(e) <= 65535) return e;
|
|
931
|
+
throw new TypeError(`Invalid port '${e}'.`);
|
|
932
|
+
}
|
|
933
|
+
function he(e) {
|
|
934
|
+
if (e === "") return e;
|
|
935
|
+
let t = new URL("https://example.com");
|
|
936
|
+
return t.pathname = e[0] !== "/" ? "/-" + e : e, e[0] !== "/" ? t.pathname.substring(2, t.pathname.length) : t.pathname;
|
|
937
|
+
}
|
|
938
|
+
function ue(e) {
|
|
939
|
+
return e === "" ? e : new URL(`data:${e}`).pathname;
|
|
940
|
+
}
|
|
941
|
+
function de(e) {
|
|
942
|
+
if (e === "") return e;
|
|
943
|
+
let t = new URL("https://example.com");
|
|
944
|
+
return t.search = e, t.search.substring(1, t.search.length);
|
|
945
|
+
}
|
|
946
|
+
function pe(e) {
|
|
947
|
+
if (e === "") return e;
|
|
948
|
+
let t = new URL("https://example.com");
|
|
949
|
+
return t.hash = e, t.hash.substring(1, t.hash.length);
|
|
950
|
+
}
|
|
951
|
+
var H = (_a = class {
|
|
952
|
+
constructor(t) {
|
|
953
|
+
__privateAdd(this, _H_instances);
|
|
954
|
+
__privateAdd(this, _i);
|
|
955
|
+
__privateAdd(this, _n, []);
|
|
956
|
+
__privateAdd(this, _t, {});
|
|
957
|
+
__privateAdd(this, _e, 0);
|
|
958
|
+
__privateAdd(this, _s, 1);
|
|
959
|
+
__privateAdd(this, _l, 0);
|
|
960
|
+
__privateAdd(this, _o, 0);
|
|
961
|
+
__privateAdd(this, _d, 0);
|
|
962
|
+
__privateAdd(this, _p, 0);
|
|
963
|
+
__privateAdd(this, _g, false);
|
|
964
|
+
__privateSet(this, _i, t);
|
|
965
|
+
}
|
|
966
|
+
get result() {
|
|
967
|
+
return __privateGet(this, _t);
|
|
968
|
+
}
|
|
969
|
+
parse() {
|
|
970
|
+
for (__privateSet(this, _n, v(__privateGet(this, _i), true)); __privateGet(this, _e) < __privateGet(this, _n).length; __privateSet(this, _e, __privateGet(this, _e) + __privateGet(this, _s))) {
|
|
971
|
+
if (__privateSet(this, _s, 1), __privateGet(this, _n)[__privateGet(this, _e)].type === "END") {
|
|
972
|
+
if (__privateGet(this, _o) === 0) {
|
|
973
|
+
__privateMethod(this, _H_instances, b_fn).call(this), __privateMethod(this, _H_instances, f_fn).call(this) ? __privateMethod(this, _H_instances, r_fn).call(this, 9, 1) : __privateMethod(this, _H_instances, h_fn).call(this) ? __privateMethod(this, _H_instances, r_fn).call(this, 8, 1) : __privateMethod(this, _H_instances, r_fn).call(this, 7, 0);
|
|
974
|
+
continue;
|
|
975
|
+
} else if (__privateGet(this, _o) === 2) {
|
|
976
|
+
__privateMethod(this, _H_instances, u_fn).call(this, 5);
|
|
977
|
+
continue;
|
|
978
|
+
}
|
|
979
|
+
__privateMethod(this, _H_instances, r_fn).call(this, 10, 0);
|
|
980
|
+
break;
|
|
981
|
+
}
|
|
982
|
+
if (__privateGet(this, _d) > 0) if (__privateMethod(this, _H_instances, A_fn).call(this)) __privateSet(this, _d, __privateGet(this, _d) - 1);
|
|
983
|
+
else continue;
|
|
984
|
+
if (__privateMethod(this, _H_instances, T_fn).call(this)) {
|
|
985
|
+
__privateSet(this, _d, __privateGet(this, _d) + 1);
|
|
986
|
+
continue;
|
|
987
|
+
}
|
|
988
|
+
switch (__privateGet(this, _o)) {
|
|
989
|
+
case 0:
|
|
990
|
+
__privateMethod(this, _H_instances, P_fn).call(this) && __privateMethod(this, _H_instances, u_fn).call(this, 1);
|
|
991
|
+
break;
|
|
992
|
+
case 1:
|
|
993
|
+
if (__privateMethod(this, _H_instances, P_fn).call(this)) {
|
|
994
|
+
__privateMethod(this, _H_instances, C_fn).call(this);
|
|
995
|
+
let t = 7, r = 1;
|
|
996
|
+
__privateMethod(this, _H_instances, E_fn).call(this) ? (t = 2, r = 3) : __privateGet(this, _g) && (t = 2), __privateMethod(this, _H_instances, r_fn).call(this, t, r);
|
|
997
|
+
}
|
|
998
|
+
break;
|
|
999
|
+
case 2:
|
|
1000
|
+
__privateMethod(this, _H_instances, S_fn).call(this) ? __privateMethod(this, _H_instances, u_fn).call(this, 3) : (__privateMethod(this, _H_instances, x_fn).call(this) || __privateMethod(this, _H_instances, h_fn).call(this) || __privateMethod(this, _H_instances, f_fn).call(this)) && __privateMethod(this, _H_instances, u_fn).call(this, 5);
|
|
1001
|
+
break;
|
|
1002
|
+
case 3:
|
|
1003
|
+
__privateMethod(this, _H_instances, O_fn).call(this) ? __privateMethod(this, _H_instances, r_fn).call(this, 4, 1) : __privateMethod(this, _H_instances, S_fn).call(this) && __privateMethod(this, _H_instances, r_fn).call(this, 5, 1);
|
|
1004
|
+
break;
|
|
1005
|
+
case 4:
|
|
1006
|
+
__privateMethod(this, _H_instances, S_fn).call(this) && __privateMethod(this, _H_instances, r_fn).call(this, 5, 1);
|
|
1007
|
+
break;
|
|
1008
|
+
case 5:
|
|
1009
|
+
__privateMethod(this, _H_instances, y_fn).call(this) ? __privateSet(this, _p, __privateGet(this, _p) + 1) : __privateMethod(this, _H_instances, w_fn).call(this) && __privateSet(this, _p, __privateGet(this, _p) - 1), __privateMethod(this, _H_instances, k_fn).call(this) && !__privateGet(this, _p) ? __privateMethod(this, _H_instances, r_fn).call(this, 6, 1) : __privateMethod(this, _H_instances, x_fn).call(this) ? __privateMethod(this, _H_instances, r_fn).call(this, 7, 0) : __privateMethod(this, _H_instances, h_fn).call(this) ? __privateMethod(this, _H_instances, r_fn).call(this, 8, 1) : __privateMethod(this, _H_instances, f_fn).call(this) && __privateMethod(this, _H_instances, r_fn).call(this, 9, 1);
|
|
1010
|
+
break;
|
|
1011
|
+
case 6:
|
|
1012
|
+
__privateMethod(this, _H_instances, x_fn).call(this) ? __privateMethod(this, _H_instances, r_fn).call(this, 7, 0) : __privateMethod(this, _H_instances, h_fn).call(this) ? __privateMethod(this, _H_instances, r_fn).call(this, 8, 1) : __privateMethod(this, _H_instances, f_fn).call(this) && __privateMethod(this, _H_instances, r_fn).call(this, 9, 1);
|
|
1013
|
+
break;
|
|
1014
|
+
case 7:
|
|
1015
|
+
__privateMethod(this, _H_instances, h_fn).call(this) ? __privateMethod(this, _H_instances, r_fn).call(this, 8, 1) : __privateMethod(this, _H_instances, f_fn).call(this) && __privateMethod(this, _H_instances, r_fn).call(this, 9, 1);
|
|
1016
|
+
break;
|
|
1017
|
+
case 8:
|
|
1018
|
+
__privateMethod(this, _H_instances, f_fn).call(this) && __privateMethod(this, _H_instances, r_fn).call(this, 9, 1);
|
|
1019
|
+
break;
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
1022
|
+
__privateGet(this, _t).hostname !== void 0 && __privateGet(this, _t).port === void 0 && (__privateGet(this, _t).port = "");
|
|
1023
|
+
}
|
|
1024
|
+
}, _i = new WeakMap(), _n = new WeakMap(), _t = new WeakMap(), _e = new WeakMap(), _s = new WeakMap(), _l = new WeakMap(), _o = new WeakMap(), _d = new WeakMap(), _p = new WeakMap(), _g = new WeakMap(), _H_instances = new WeakSet(), r_fn = function(t, r) {
|
|
1025
|
+
var _a2, _b2, _c;
|
|
1026
|
+
switch (__privateGet(this, _o)) {
|
|
1027
|
+
case 0:
|
|
1028
|
+
break;
|
|
1029
|
+
case 1:
|
|
1030
|
+
__privateGet(this, _t).protocol = __privateMethod(this, _H_instances, c_fn).call(this);
|
|
1031
|
+
break;
|
|
1032
|
+
case 2:
|
|
1033
|
+
break;
|
|
1034
|
+
case 3:
|
|
1035
|
+
__privateGet(this, _t).username = __privateMethod(this, _H_instances, c_fn).call(this);
|
|
1036
|
+
break;
|
|
1037
|
+
case 4:
|
|
1038
|
+
__privateGet(this, _t).password = __privateMethod(this, _H_instances, c_fn).call(this);
|
|
1039
|
+
break;
|
|
1040
|
+
case 5:
|
|
1041
|
+
__privateGet(this, _t).hostname = __privateMethod(this, _H_instances, c_fn).call(this);
|
|
1042
|
+
break;
|
|
1043
|
+
case 6:
|
|
1044
|
+
__privateGet(this, _t).port = __privateMethod(this, _H_instances, c_fn).call(this);
|
|
1045
|
+
break;
|
|
1046
|
+
case 7:
|
|
1047
|
+
__privateGet(this, _t).pathname = __privateMethod(this, _H_instances, c_fn).call(this);
|
|
1048
|
+
break;
|
|
1049
|
+
case 8:
|
|
1050
|
+
__privateGet(this, _t).search = __privateMethod(this, _H_instances, c_fn).call(this);
|
|
1051
|
+
break;
|
|
1052
|
+
case 9:
|
|
1053
|
+
__privateGet(this, _t).hash = __privateMethod(this, _H_instances, c_fn).call(this);
|
|
1054
|
+
break;
|
|
1055
|
+
}
|
|
1056
|
+
__privateGet(this, _o) !== 0 && t !== 10 && ([1, 2, 3, 4].includes(__privateGet(this, _o)) && [6, 7, 8, 9].includes(t) && ((_a2 = __privateGet(this, _t)).hostname ?? (_a2.hostname = "")), [1, 2, 3, 4, 5, 6].includes(__privateGet(this, _o)) && [8, 9].includes(t) && ((_b2 = __privateGet(this, _t)).pathname ?? (_b2.pathname = __privateGet(this, _g) ? "/" : "")), [1, 2, 3, 4, 5, 6, 7].includes(__privateGet(this, _o)) && t === 9 && ((_c = __privateGet(this, _t)).search ?? (_c.search = ""))), __privateMethod(this, _H_instances, R_fn).call(this, t, r);
|
|
1057
|
+
}, R_fn = function(t, r) {
|
|
1058
|
+
__privateSet(this, _o, t), __privateSet(this, _l, __privateGet(this, _e) + r), __privateSet(this, _e, __privateGet(this, _e) + r), __privateSet(this, _s, 0);
|
|
1059
|
+
}, b_fn = function() {
|
|
1060
|
+
__privateSet(this, _e, __privateGet(this, _l)), __privateSet(this, _s, 0);
|
|
1061
|
+
}, u_fn = function(t) {
|
|
1062
|
+
__privateMethod(this, _H_instances, b_fn).call(this), __privateSet(this, _o, t);
|
|
1063
|
+
}, m_fn = function(t) {
|
|
1064
|
+
return t < 0 && (t = __privateGet(this, _n).length - t), t < __privateGet(this, _n).length ? __privateGet(this, _n)[t] : __privateGet(this, _n)[__privateGet(this, _n).length - 1];
|
|
1065
|
+
}, a_fn = function(t, r) {
|
|
1066
|
+
let n = __privateMethod(this, _H_instances, m_fn).call(this, t);
|
|
1067
|
+
return n.value === r && (n.type === "CHAR" || n.type === "ESCAPED_CHAR" || n.type === "INVALID_CHAR");
|
|
1068
|
+
}, P_fn = function() {
|
|
1069
|
+
return __privateMethod(this, _H_instances, a_fn).call(this, __privateGet(this, _e), ":");
|
|
1070
|
+
}, E_fn = function() {
|
|
1071
|
+
return __privateMethod(this, _H_instances, a_fn).call(this, __privateGet(this, _e) + 1, "/") && __privateMethod(this, _H_instances, a_fn).call(this, __privateGet(this, _e) + 2, "/");
|
|
1072
|
+
}, S_fn = function() {
|
|
1073
|
+
return __privateMethod(this, _H_instances, a_fn).call(this, __privateGet(this, _e), "@");
|
|
1074
|
+
}, O_fn = function() {
|
|
1075
|
+
return __privateMethod(this, _H_instances, a_fn).call(this, __privateGet(this, _e), ":");
|
|
1076
|
+
}, k_fn = function() {
|
|
1077
|
+
return __privateMethod(this, _H_instances, a_fn).call(this, __privateGet(this, _e), ":");
|
|
1078
|
+
}, x_fn = function() {
|
|
1079
|
+
return __privateMethod(this, _H_instances, a_fn).call(this, __privateGet(this, _e), "/");
|
|
1080
|
+
}, h_fn = function() {
|
|
1081
|
+
if (__privateMethod(this, _H_instances, a_fn).call(this, __privateGet(this, _e), "?")) return true;
|
|
1082
|
+
if (__privateGet(this, _n)[__privateGet(this, _e)].value !== "?") return false;
|
|
1083
|
+
let t = __privateMethod(this, _H_instances, m_fn).call(this, __privateGet(this, _e) - 1);
|
|
1084
|
+
return t.type !== "NAME" && t.type !== "REGEX" && t.type !== "CLOSE" && t.type !== "ASTERISK";
|
|
1085
|
+
}, f_fn = function() {
|
|
1086
|
+
return __privateMethod(this, _H_instances, a_fn).call(this, __privateGet(this, _e), "#");
|
|
1087
|
+
}, T_fn = function() {
|
|
1088
|
+
return __privateGet(this, _n)[__privateGet(this, _e)].type == "OPEN";
|
|
1089
|
+
}, A_fn = function() {
|
|
1090
|
+
return __privateGet(this, _n)[__privateGet(this, _e)].type == "CLOSE";
|
|
1091
|
+
}, y_fn = function() {
|
|
1092
|
+
return __privateMethod(this, _H_instances, a_fn).call(this, __privateGet(this, _e), "[");
|
|
1093
|
+
}, w_fn = function() {
|
|
1094
|
+
return __privateMethod(this, _H_instances, a_fn).call(this, __privateGet(this, _e), "]");
|
|
1095
|
+
}, c_fn = function() {
|
|
1096
|
+
let t = __privateGet(this, _n)[__privateGet(this, _e)], r = __privateMethod(this, _H_instances, m_fn).call(this, __privateGet(this, _l)).index;
|
|
1097
|
+
return __privateGet(this, _i).substring(r, t.index);
|
|
1098
|
+
}, C_fn = function() {
|
|
1099
|
+
let t = {};
|
|
1100
|
+
Object.assign(t, x), t.encodePart = y;
|
|
1101
|
+
let r = Z(__privateMethod(this, _H_instances, c_fn).call(this), void 0, t);
|
|
1102
|
+
__privateSet(this, _g, N(r));
|
|
1103
|
+
}, _a);
|
|
1104
|
+
var G = ["protocol", "username", "password", "hostname", "port", "pathname", "search", "hash"], E = "*";
|
|
1105
|
+
function ge(e, t) {
|
|
1106
|
+
if (typeof e != "string") throw new TypeError("parameter 1 is not of type 'string'.");
|
|
1107
|
+
let r = new URL(e, t);
|
|
1108
|
+
return { protocol: r.protocol.substring(0, r.protocol.length - 1), username: r.username, password: r.password, hostname: r.hostname, port: r.port, pathname: r.pathname, search: r.search !== "" ? r.search.substring(1, r.search.length) : void 0, hash: r.hash !== "" ? r.hash.substring(1, r.hash.length) : void 0 };
|
|
1109
|
+
}
|
|
1110
|
+
function b(e, t) {
|
|
1111
|
+
return t ? C(e) : e;
|
|
1112
|
+
}
|
|
1113
|
+
function w(e, t, r) {
|
|
1114
|
+
let n;
|
|
1115
|
+
if (typeof t.baseURL == "string") try {
|
|
1116
|
+
n = new URL(t.baseURL), t.protocol === void 0 && (e.protocol = b(n.protocol.substring(0, n.protocol.length - 1), r)), !r && t.protocol === void 0 && t.hostname === void 0 && t.port === void 0 && t.username === void 0 && (e.username = b(n.username, r)), !r && t.protocol === void 0 && t.hostname === void 0 && t.port === void 0 && t.username === void 0 && t.password === void 0 && (e.password = b(n.password, r)), t.protocol === void 0 && t.hostname === void 0 && (e.hostname = b(n.hostname, r)), t.protocol === void 0 && t.hostname === void 0 && t.port === void 0 && (e.port = b(n.port, r)), t.protocol === void 0 && t.hostname === void 0 && t.port === void 0 && t.pathname === void 0 && (e.pathname = b(n.pathname, r)), t.protocol === void 0 && t.hostname === void 0 && t.port === void 0 && t.pathname === void 0 && t.search === void 0 && (e.search = b(n.search.substring(1, n.search.length), r)), t.protocol === void 0 && t.hostname === void 0 && t.port === void 0 && t.pathname === void 0 && t.search === void 0 && t.hash === void 0 && (e.hash = b(n.hash.substring(1, n.hash.length), r));
|
|
1117
|
+
} catch {
|
|
1118
|
+
throw new TypeError(`invalid baseURL '${t.baseURL}'.`);
|
|
1119
|
+
}
|
|
1120
|
+
if (typeof t.protocol == "string" && (e.protocol = ce(t.protocol, r)), typeof t.username == "string" && (e.username = ie(t.username, r)), typeof t.password == "string" && (e.password = se(t.password, r)), typeof t.hostname == "string" && (e.hostname = ne(t.hostname, r)), typeof t.port == "string" && (e.port = oe(t.port, e.protocol, r)), typeof t.pathname == "string") {
|
|
1121
|
+
if (e.pathname = t.pathname, n && !J(e.pathname, r)) {
|
|
1122
|
+
let o = n.pathname.lastIndexOf("/");
|
|
1123
|
+
o >= 0 && (e.pathname = b(n.pathname.substring(0, o + 1), r) + e.pathname);
|
|
1124
|
+
}
|
|
1125
|
+
e.pathname = ae(e.pathname, e.protocol, r);
|
|
1126
|
+
}
|
|
1127
|
+
return typeof t.search == "string" && (e.search = re(t.search, r)), typeof t.hash == "string" && (e.hash = te(t.hash, r)), e;
|
|
1128
|
+
}
|
|
1129
|
+
function C(e) {
|
|
1130
|
+
return e.replace(/([+*?:{}()\\])/g, "\\$1");
|
|
1131
|
+
}
|
|
1132
|
+
function Oe(e) {
|
|
1133
|
+
return e.replace(/([.+*?^${}()[\]|/\\])/g, "\\$1");
|
|
1134
|
+
}
|
|
1135
|
+
function ke(e, t) {
|
|
1136
|
+
t.delimiter ?? (t.delimiter = "/#?"), t.prefixes ?? (t.prefixes = "./"), t.sensitive ?? (t.sensitive = false), t.strict ?? (t.strict = false), t.end ?? (t.end = true), t.start ?? (t.start = true), t.endsWith = "";
|
|
1137
|
+
let r = ".*", n = `[^${Oe(t.delimiter)}]+?`, o = /[$_\u200C\u200D\p{ID_Continue}]/u, c = "";
|
|
1138
|
+
for (let l = 0; l < e.length; ++l) {
|
|
1139
|
+
let s = e[l];
|
|
1140
|
+
if (s.type === 3) {
|
|
1141
|
+
if (s.modifier === 3) {
|
|
1142
|
+
c += C(s.value);
|
|
1143
|
+
continue;
|
|
1144
|
+
}
|
|
1145
|
+
c += `{${C(s.value)}}${k(s.modifier)}`;
|
|
1146
|
+
continue;
|
|
1147
|
+
}
|
|
1148
|
+
let i = s.hasCustomName(), a = !!s.suffix.length || !!s.prefix.length && (s.prefix.length !== 1 || !t.prefixes.includes(s.prefix)), f = l > 0 ? e[l - 1] : null, d = l < e.length - 1 ? e[l + 1] : null;
|
|
1149
|
+
if (!a && i && s.type === 1 && s.modifier === 3 && d && !d.prefix.length && !d.suffix.length) if (d.type === 3) {
|
|
1150
|
+
let T = d.value.length > 0 ? d.value[0] : "";
|
|
1151
|
+
a = o.test(T);
|
|
1152
|
+
} else a = !d.hasCustomName();
|
|
1153
|
+
if (!a && !s.prefix.length && f && f.type === 3) {
|
|
1154
|
+
let T = f.value[f.value.length - 1];
|
|
1155
|
+
a = t.prefixes.includes(T);
|
|
1156
|
+
}
|
|
1157
|
+
a && (c += "{"), c += C(s.prefix), i && (c += `:${s.name}`), s.type === 2 ? c += `(${s.value})` : s.type === 1 ? i || (c += `(${n})`) : s.type === 0 && (!i && (!f || f.type === 3 || f.modifier !== 3 || a || s.prefix !== "") ? c += "*" : c += `(${r})`), s.type === 1 && i && s.suffix.length && o.test(s.suffix[0]) && (c += "\\"), c += C(s.suffix), a && (c += "}"), s.modifier !== 3 && (c += k(s.modifier));
|
|
1158
|
+
}
|
|
1159
|
+
return c;
|
|
1160
|
+
}
|
|
1161
|
+
var me = (_b = class {
|
|
1162
|
+
constructor(t = {}, r, n) {
|
|
1163
|
+
__privateAdd(this, _i2);
|
|
1164
|
+
__privateAdd(this, _n2, {});
|
|
1165
|
+
__privateAdd(this, _t2, {});
|
|
1166
|
+
__privateAdd(this, _e2, {});
|
|
1167
|
+
__privateAdd(this, _s2, {});
|
|
1168
|
+
__privateAdd(this, _l2, false);
|
|
1169
|
+
try {
|
|
1170
|
+
let o;
|
|
1171
|
+
if (typeof r == "string" ? o = r : n = r, typeof t == "string") {
|
|
1172
|
+
let i = new H(t);
|
|
1173
|
+
if (i.parse(), t = i.result, o === void 0 && typeof t.protocol != "string") throw new TypeError("A base URL must be provided for a relative constructor string.");
|
|
1174
|
+
t.baseURL = o;
|
|
1175
|
+
} else {
|
|
1176
|
+
if (!t || typeof t != "object") throw new TypeError("parameter 1 is not of type 'string' and cannot convert to dictionary.");
|
|
1177
|
+
if (o) throw new TypeError("parameter 1 is not of type 'string'.");
|
|
1178
|
+
}
|
|
1179
|
+
typeof n > "u" && (n = { ignoreCase: false });
|
|
1180
|
+
let c = { ignoreCase: n.ignoreCase === true }, l = { pathname: E, protocol: E, username: E, password: E, hostname: E, port: E, search: E, hash: E };
|
|
1181
|
+
__privateSet(this, _i2, w(l, t, true)), _(__privateGet(this, _i2).protocol) === __privateGet(this, _i2).port && (__privateGet(this, _i2).port = "");
|
|
1182
|
+
let s;
|
|
1183
|
+
for (s of G) {
|
|
1184
|
+
if (!(s in __privateGet(this, _i2))) continue;
|
|
1185
|
+
let i = {}, a = __privateGet(this, _i2)[s];
|
|
1186
|
+
switch (__privateGet(this, _t2)[s] = [], s) {
|
|
1187
|
+
case "protocol":
|
|
1188
|
+
Object.assign(i, x), i.encodePart = y;
|
|
1189
|
+
break;
|
|
1190
|
+
case "username":
|
|
1191
|
+
Object.assign(i, x), i.encodePart = le;
|
|
1192
|
+
break;
|
|
1193
|
+
case "password":
|
|
1194
|
+
Object.assign(i, x), i.encodePart = fe;
|
|
1195
|
+
break;
|
|
1196
|
+
case "hostname":
|
|
1197
|
+
Object.assign(i, B), W(a) ? i.encodePart = j : i.encodePart = z;
|
|
1198
|
+
break;
|
|
1199
|
+
case "port":
|
|
1200
|
+
Object.assign(i, x), i.encodePart = K;
|
|
1201
|
+
break;
|
|
1202
|
+
case "pathname":
|
|
1203
|
+
N(__privateGet(this, _n2).protocol) ? (Object.assign(i, q, c), i.encodePart = he) : (Object.assign(i, x, c), i.encodePart = ue);
|
|
1204
|
+
break;
|
|
1205
|
+
case "search":
|
|
1206
|
+
Object.assign(i, x, c), i.encodePart = de;
|
|
1207
|
+
break;
|
|
1208
|
+
case "hash":
|
|
1209
|
+
Object.assign(i, x, c), i.encodePart = pe;
|
|
1210
|
+
break;
|
|
1211
|
+
}
|
|
1212
|
+
try {
|
|
1213
|
+
__privateGet(this, _s2)[s] = D(a, i), __privateGet(this, _n2)[s] = F(__privateGet(this, _s2)[s], __privateGet(this, _t2)[s], i), __privateGet(this, _e2)[s] = ke(__privateGet(this, _s2)[s], i), __privateSet(this, _l2, __privateGet(this, _l2) || __privateGet(this, _s2)[s].some((f) => f.type === 2));
|
|
1214
|
+
} catch {
|
|
1215
|
+
throw new TypeError(`invalid ${s} pattern '${__privateGet(this, _i2)[s]}'.`);
|
|
1216
|
+
}
|
|
1217
|
+
}
|
|
1218
|
+
} catch (o) {
|
|
1219
|
+
throw new TypeError(`Failed to construct 'URLPattern': ${o.message}`);
|
|
1220
|
+
}
|
|
1221
|
+
}
|
|
1222
|
+
test(t = {}, r) {
|
|
1223
|
+
let n = { pathname: "", protocol: "", username: "", password: "", hostname: "", port: "", search: "", hash: "" };
|
|
1224
|
+
if (typeof t != "string" && r) throw new TypeError("parameter 1 is not of type 'string'.");
|
|
1225
|
+
if (typeof t > "u") return false;
|
|
1226
|
+
try {
|
|
1227
|
+
typeof t == "object" ? n = w(n, t, false) : n = w(n, ge(t, r), false);
|
|
1228
|
+
} catch {
|
|
1229
|
+
return false;
|
|
1230
|
+
}
|
|
1231
|
+
let o;
|
|
1232
|
+
for (o of G) if (!__privateGet(this, _n2)[o].exec(n[o])) return false;
|
|
1233
|
+
return true;
|
|
1234
|
+
}
|
|
1235
|
+
exec(t = {}, r) {
|
|
1236
|
+
let n = { pathname: "", protocol: "", username: "", password: "", hostname: "", port: "", search: "", hash: "" };
|
|
1237
|
+
if (typeof t != "string" && r) throw new TypeError("parameter 1 is not of type 'string'.");
|
|
1238
|
+
if (typeof t > "u") return;
|
|
1239
|
+
try {
|
|
1240
|
+
typeof t == "object" ? n = w(n, t, false) : n = w(n, ge(t, r), false);
|
|
1241
|
+
} catch {
|
|
1242
|
+
return null;
|
|
1243
|
+
}
|
|
1244
|
+
let o = {};
|
|
1245
|
+
r ? o.inputs = [t, r] : o.inputs = [t];
|
|
1246
|
+
let c;
|
|
1247
|
+
for (c of G) {
|
|
1248
|
+
let l = __privateGet(this, _n2)[c].exec(n[c]);
|
|
1249
|
+
if (!l) return null;
|
|
1250
|
+
let s = {};
|
|
1251
|
+
for (let [i, a] of __privateGet(this, _t2)[c].entries()) if (typeof a == "string" || typeof a == "number") {
|
|
1252
|
+
let f = l[i + 1];
|
|
1253
|
+
s[a] = f;
|
|
1254
|
+
}
|
|
1255
|
+
o[c] = { input: n[c] ?? "", groups: s };
|
|
1256
|
+
}
|
|
1257
|
+
return o;
|
|
1258
|
+
}
|
|
1259
|
+
static compareComponent(t, r, n) {
|
|
1260
|
+
let o = (i, a) => {
|
|
1261
|
+
for (let f of ["type", "modifier", "prefix", "value", "suffix"]) {
|
|
1262
|
+
if (i[f] < a[f]) return -1;
|
|
1263
|
+
if (i[f] === a[f]) continue;
|
|
1264
|
+
return 1;
|
|
1265
|
+
}
|
|
1266
|
+
return 0;
|
|
1267
|
+
}, c = new R(3, "", "", "", "", 3), l = new R(0, "", "", "", "", 3), s = (i, a) => {
|
|
1268
|
+
let f = 0;
|
|
1269
|
+
for (; f < Math.min(i.length, a.length); ++f) {
|
|
1270
|
+
let d = o(i[f], a[f]);
|
|
1271
|
+
if (d) return d;
|
|
1272
|
+
}
|
|
1273
|
+
return i.length === a.length ? 0 : o(i[f] ?? c, a[f] ?? c);
|
|
1274
|
+
};
|
|
1275
|
+
return !__privateGet(r, _e2)[t] && !__privateGet(n, _e2)[t] ? 0 : __privateGet(r, _e2)[t] && !__privateGet(n, _e2)[t] ? s(__privateGet(r, _s2)[t], [l]) : !__privateGet(r, _e2)[t] && __privateGet(n, _e2)[t] ? s([l], __privateGet(n, _s2)[t]) : s(__privateGet(r, _s2)[t], __privateGet(n, _s2)[t]);
|
|
1276
|
+
}
|
|
1277
|
+
get protocol() {
|
|
1278
|
+
return __privateGet(this, _e2).protocol;
|
|
1279
|
+
}
|
|
1280
|
+
get username() {
|
|
1281
|
+
return __privateGet(this, _e2).username;
|
|
1282
|
+
}
|
|
1283
|
+
get password() {
|
|
1284
|
+
return __privateGet(this, _e2).password;
|
|
1285
|
+
}
|
|
1286
|
+
get hostname() {
|
|
1287
|
+
return __privateGet(this, _e2).hostname;
|
|
1288
|
+
}
|
|
1289
|
+
get port() {
|
|
1290
|
+
return __privateGet(this, _e2).port;
|
|
1291
|
+
}
|
|
1292
|
+
get pathname() {
|
|
1293
|
+
return __privateGet(this, _e2).pathname;
|
|
1294
|
+
}
|
|
1295
|
+
get search() {
|
|
1296
|
+
return __privateGet(this, _e2).search;
|
|
1297
|
+
}
|
|
1298
|
+
get hash() {
|
|
1299
|
+
return __privateGet(this, _e2).hash;
|
|
1300
|
+
}
|
|
1301
|
+
get hasRegExpGroups() {
|
|
1302
|
+
return __privateGet(this, _l2);
|
|
1303
|
+
}
|
|
1304
|
+
}, _i2 = new WeakMap(), _n2 = new WeakMap(), _t2 = new WeakMap(), _e2 = new WeakMap(), _s2 = new WeakMap(), _l2 = new WeakMap(), _b);
|
|
1305
|
+
if (!globalThis.URLPattern) {
|
|
1306
|
+
globalThis.URLPattern = me;
|
|
1307
|
+
}
|
|
572
1308
|
const ClientRouterContext = createContext(
|
|
573
1309
|
{}
|
|
574
1310
|
);
|
|
@@ -609,29 +1345,27 @@ const ClientRouterProvider = (props) => {
|
|
|
609
1345
|
window.scrollY
|
|
610
1346
|
);
|
|
611
1347
|
};
|
|
1348
|
+
const getViewPathsFromPathname = (pathname2) => {
|
|
1349
|
+
for (const [route, views] of Object.entries(routeManifest)) {
|
|
1350
|
+
const urlPattern = new me({ pathname: route });
|
|
1351
|
+
if (urlPattern.test({ pathname: pathname2 })) {
|
|
1352
|
+
return views;
|
|
1353
|
+
}
|
|
1354
|
+
}
|
|
1355
|
+
return [];
|
|
1356
|
+
};
|
|
612
1357
|
useEffect(() => {
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
if (urlPattern.test({ pathname: location.pathname })) {
|
|
625
|
-
setParameters(
|
|
626
|
-
(_b = urlPattern.exec({ pathname: location.pathname })) == null ? void 0 : _b.pathname.groups
|
|
627
|
-
);
|
|
628
|
-
return views;
|
|
629
|
-
}
|
|
630
|
-
}
|
|
631
|
-
return [];
|
|
632
|
-
})()
|
|
633
|
-
);
|
|
634
|
-
});
|
|
1358
|
+
history == null ? void 0 : history.listen(({ location }) => {
|
|
1359
|
+
locationSubject.next(structuredClone(location));
|
|
1360
|
+
viewEntriesSubject.current.next(
|
|
1361
|
+
(() => {
|
|
1362
|
+
var _a2;
|
|
1363
|
+
if (((_a2 = location.state) == null ? void 0 : _a2.status) === 404) {
|
|
1364
|
+
return ["404"];
|
|
1365
|
+
}
|
|
1366
|
+
return getViewPathsFromPathname(location.pathname);
|
|
1367
|
+
})()
|
|
1368
|
+
);
|
|
635
1369
|
});
|
|
636
1370
|
window.addEventListener("scrollend", handleScroll);
|
|
637
1371
|
return () => {
|
|
@@ -639,9 +1373,9 @@ const ClientRouterProvider = (props) => {
|
|
|
639
1373
|
};
|
|
640
1374
|
}, []);
|
|
641
1375
|
const updatePageData = (newPageData) => {
|
|
642
|
-
var
|
|
1376
|
+
var _a2;
|
|
643
1377
|
const [key, value] = Object.entries(newPageData)[0];
|
|
644
|
-
if (!((
|
|
1378
|
+
if (!((_a2 = pageDataRef.current) == null ? void 0 : _a2[key])) {
|
|
645
1379
|
pageDataRef.current[key] = {};
|
|
646
1380
|
}
|
|
647
1381
|
pageDataRef.current[key] = value;
|
|
@@ -653,6 +1387,7 @@ const ClientRouterProvider = (props) => {
|
|
|
653
1387
|
ClientRouterContext.Provider,
|
|
654
1388
|
{
|
|
655
1389
|
value: {
|
|
1390
|
+
getViewPathsFromPathname,
|
|
656
1391
|
history,
|
|
657
1392
|
params: parameters,
|
|
658
1393
|
locationSubject,
|
|
@@ -688,23 +1423,35 @@ function useParams() {
|
|
|
688
1423
|
return params;
|
|
689
1424
|
}
|
|
690
1425
|
function useRouter() {
|
|
691
|
-
const { updatePageData, history } = useContext(ClientRouterContext);
|
|
1426
|
+
const { updatePageData, history, getViewPathsFromPathname } = useContext(ClientRouterContext);
|
|
1427
|
+
useContext(ComponentsContext);
|
|
692
1428
|
return {
|
|
693
1429
|
push: async (to, state) => {
|
|
694
|
-
var
|
|
1430
|
+
var _a2;
|
|
695
1431
|
let path = "";
|
|
1432
|
+
let urlSearchParams;
|
|
1433
|
+
let hash = "";
|
|
696
1434
|
if (typeof to === "string") {
|
|
697
|
-
|
|
1435
|
+
const [_path, search = ""] = to.split("?");
|
|
1436
|
+
path = _path;
|
|
1437
|
+
urlSearchParams = new URLSearchParams(search);
|
|
1438
|
+
urlSearchParams.set("json", "true");
|
|
698
1439
|
} else {
|
|
699
|
-
const { hash, pathname, search } = to;
|
|
700
|
-
|
|
1440
|
+
const { hash: _hash, pathname, search } = to;
|
|
1441
|
+
urlSearchParams = new URLSearchParams(search);
|
|
701
1442
|
urlSearchParams.set("json", "true");
|
|
702
|
-
path =
|
|
703
|
-
|
|
704
|
-
|
|
1443
|
+
path = pathname;
|
|
1444
|
+
hash = _hash;
|
|
1445
|
+
}
|
|
1446
|
+
const components = getViewPathsFromPathname(path);
|
|
1447
|
+
const fetchPath = `${path}?${urlSearchParams.toString()}${hash}`;
|
|
1448
|
+
const [res] = await Promise.all([
|
|
1449
|
+
fetch(fetchPath),
|
|
1450
|
+
...components.map((component) => window.loaders[component]())
|
|
1451
|
+
]);
|
|
705
1452
|
if (res.ok) {
|
|
706
1453
|
const { data } = await res.json();
|
|
707
|
-
const is404 = ((
|
|
1454
|
+
const is404 = ((_a2 = Object.values(data[to])[0]) == null ? void 0 : _a2.status) === 404;
|
|
708
1455
|
updatePageData(data);
|
|
709
1456
|
history == null ? void 0 : history.push(to, is404 ? { status: 404 } : state);
|
|
710
1457
|
window.scrollTo(0, 0);
|
|
@@ -788,9 +1535,9 @@ function requireScheduler_production() {
|
|
|
788
1535
|
}
|
|
789
1536
|
return first;
|
|
790
1537
|
}
|
|
791
|
-
function compare(a,
|
|
792
|
-
var diff = a.sortIndex -
|
|
793
|
-
return 0 !== diff ? diff : a.id -
|
|
1538
|
+
function compare(a, b2) {
|
|
1539
|
+
var diff = a.sortIndex - b2.sortIndex;
|
|
1540
|
+
return 0 !== diff ? diff : a.id - b2.id;
|
|
794
1541
|
}
|
|
795
1542
|
exports.unstable_now = void 0;
|
|
796
1543
|
if ("object" === typeof performance && "function" === typeof performance.now) {
|
|
@@ -1118,9 +1865,9 @@ function requireScheduler_development() {
|
|
|
1118
1865
|
}
|
|
1119
1866
|
return first;
|
|
1120
1867
|
}
|
|
1121
|
-
function compare(a,
|
|
1122
|
-
var diff = a.sortIndex -
|
|
1123
|
-
return 0 !== diff ? diff : a.id -
|
|
1868
|
+
function compare(a, b2) {
|
|
1869
|
+
var diff = a.sortIndex - b2.sortIndex;
|
|
1870
|
+
return 0 !== diff ? diff : a.id - b2.id;
|
|
1124
1871
|
}
|
|
1125
1872
|
function advanceTimers(currentTime) {
|
|
1126
1873
|
for (var timer = peek(timerQueue); null !== timer; ) {
|
|
@@ -1347,8 +2094,8 @@ function requireReactDomClient_production() {
|
|
|
1347
2094
|
if (void 0 === prefix)
|
|
1348
2095
|
try {
|
|
1349
2096
|
throw Error();
|
|
1350
|
-
} catch (
|
|
1351
|
-
var match =
|
|
2097
|
+
} catch (x2) {
|
|
2098
|
+
var match = x2.stack.trim().match(/\n( *(at )?)/);
|
|
1352
2099
|
prefix = match && match[1] || "";
|
|
1353
2100
|
}
|
|
1354
2101
|
return "\n" + prefix + name;
|
|
@@ -1374,8 +2121,8 @@ function requireReactDomClient_production() {
|
|
|
1374
2121
|
if ("object" === typeof Reflect && Reflect.construct) {
|
|
1375
2122
|
try {
|
|
1376
2123
|
Reflect.construct(Fake, []);
|
|
1377
|
-
} catch (
|
|
1378
|
-
var control =
|
|
2124
|
+
} catch (x2) {
|
|
2125
|
+
var control = x2;
|
|
1379
2126
|
}
|
|
1380
2127
|
Reflect.construct(fn, [], Fake);
|
|
1381
2128
|
} else {
|
|
@@ -1472,8 +2219,8 @@ function requireReactDomClient_production() {
|
|
|
1472
2219
|
info += describeFiber(workInProgress2), workInProgress2 = workInProgress2.return;
|
|
1473
2220
|
while (workInProgress2);
|
|
1474
2221
|
return info;
|
|
1475
|
-
} catch (
|
|
1476
|
-
return "\nError generating stack: " +
|
|
2222
|
+
} catch (x2) {
|
|
2223
|
+
return "\nError generating stack: " + x2.message + "\n" + x2.stack;
|
|
1477
2224
|
}
|
|
1478
2225
|
}
|
|
1479
2226
|
function getNearestMountedFiber(fiber) {
|
|
@@ -1506,14 +2253,14 @@ function requireReactDomClient_production() {
|
|
|
1506
2253
|
if (null === alternate) throw Error(formatProdErrorMessage(188));
|
|
1507
2254
|
return alternate !== fiber ? null : fiber;
|
|
1508
2255
|
}
|
|
1509
|
-
for (var a = fiber,
|
|
2256
|
+
for (var a = fiber, b2 = alternate; ; ) {
|
|
1510
2257
|
var parentA = a.return;
|
|
1511
2258
|
if (null === parentA) break;
|
|
1512
2259
|
var parentB = parentA.alternate;
|
|
1513
2260
|
if (null === parentB) {
|
|
1514
|
-
|
|
1515
|
-
if (null !==
|
|
1516
|
-
a =
|
|
2261
|
+
b2 = parentA.return;
|
|
2262
|
+
if (null !== b2) {
|
|
2263
|
+
a = b2;
|
|
1517
2264
|
continue;
|
|
1518
2265
|
}
|
|
1519
2266
|
break;
|
|
@@ -1521,23 +2268,23 @@ function requireReactDomClient_production() {
|
|
|
1521
2268
|
if (parentA.child === parentB.child) {
|
|
1522
2269
|
for (parentB = parentA.child; parentB; ) {
|
|
1523
2270
|
if (parentB === a) return assertIsMounted(parentA), fiber;
|
|
1524
|
-
if (parentB ===
|
|
2271
|
+
if (parentB === b2) return assertIsMounted(parentA), alternate;
|
|
1525
2272
|
parentB = parentB.sibling;
|
|
1526
2273
|
}
|
|
1527
2274
|
throw Error(formatProdErrorMessage(188));
|
|
1528
2275
|
}
|
|
1529
|
-
if (a.return !==
|
|
2276
|
+
if (a.return !== b2.return) a = parentA, b2 = parentB;
|
|
1530
2277
|
else {
|
|
1531
2278
|
for (var didFindChild = false, child$2 = parentA.child; child$2; ) {
|
|
1532
2279
|
if (child$2 === a) {
|
|
1533
2280
|
didFindChild = true;
|
|
1534
2281
|
a = parentA;
|
|
1535
|
-
|
|
2282
|
+
b2 = parentB;
|
|
1536
2283
|
break;
|
|
1537
2284
|
}
|
|
1538
|
-
if (child$2 ===
|
|
2285
|
+
if (child$2 === b2) {
|
|
1539
2286
|
didFindChild = true;
|
|
1540
|
-
|
|
2287
|
+
b2 = parentA;
|
|
1541
2288
|
a = parentB;
|
|
1542
2289
|
break;
|
|
1543
2290
|
}
|
|
@@ -1548,12 +2295,12 @@ function requireReactDomClient_production() {
|
|
|
1548
2295
|
if (child$2 === a) {
|
|
1549
2296
|
didFindChild = true;
|
|
1550
2297
|
a = parentB;
|
|
1551
|
-
|
|
2298
|
+
b2 = parentA;
|
|
1552
2299
|
break;
|
|
1553
2300
|
}
|
|
1554
|
-
if (child$2 ===
|
|
2301
|
+
if (child$2 === b2) {
|
|
1555
2302
|
didFindChild = true;
|
|
1556
|
-
|
|
2303
|
+
b2 = parentB;
|
|
1557
2304
|
a = parentA;
|
|
1558
2305
|
break;
|
|
1559
2306
|
}
|
|
@@ -1562,7 +2309,7 @@ function requireReactDomClient_production() {
|
|
|
1562
2309
|
if (!didFindChild) throw Error(formatProdErrorMessage(189));
|
|
1563
2310
|
}
|
|
1564
2311
|
}
|
|
1565
|
-
if (a.alternate !==
|
|
2312
|
+
if (a.alternate !== b2) throw Error(formatProdErrorMessage(190));
|
|
1566
2313
|
}
|
|
1567
2314
|
if (3 !== a.tag) throw Error(formatProdErrorMessage(188));
|
|
1568
2315
|
return a.stateNode.current === a ? fiber : alternate;
|
|
@@ -1671,9 +2418,9 @@ function requireReactDomClient_production() {
|
|
|
1671
2418
|
}
|
|
1672
2419
|
}
|
|
1673
2420
|
var clz32 = Math.clz32 ? Math.clz32 : clz32Fallback, log = Math.log, LN2 = Math.LN2;
|
|
1674
|
-
function clz32Fallback(
|
|
1675
|
-
|
|
1676
|
-
return 0 ===
|
|
2421
|
+
function clz32Fallback(x2) {
|
|
2422
|
+
x2 >>>= 0;
|
|
2423
|
+
return 0 === x2 ? 32 : 31 - (log(x2) / LN2 | 0) | 0;
|
|
1677
2424
|
}
|
|
1678
2425
|
var nextTransitionLane = 128, nextRetryLane = 4194304;
|
|
1679
2426
|
function getHighestPriorityLanes(lanes) {
|
|
@@ -2331,8 +3078,8 @@ function requireReactDomClient_production() {
|
|
|
2331
3078
|
}
|
|
2332
3079
|
}
|
|
2333
3080
|
var isInsideEventHandler = false;
|
|
2334
|
-
function batchedUpdates$1(fn, a,
|
|
2335
|
-
if (isInsideEventHandler) return fn(a,
|
|
3081
|
+
function batchedUpdates$1(fn, a, b2) {
|
|
3082
|
+
if (isInsideEventHandler) return fn(a, b2);
|
|
2336
3083
|
isInsideEventHandler = true;
|
|
2337
3084
|
try {
|
|
2338
3085
|
var JSCompiler_inline_result = fn(a);
|
|
@@ -2748,8 +3495,8 @@ function requireReactDomClient_production() {
|
|
|
2748
3495
|
if ("input" === domEventName || "change" === domEventName)
|
|
2749
3496
|
return getInstIfValueChanged(targetInst);
|
|
2750
3497
|
}
|
|
2751
|
-
function is(
|
|
2752
|
-
return
|
|
3498
|
+
function is(x2, y2) {
|
|
3499
|
+
return x2 === y2 && (0 !== x2 || 1 / x2 === 1 / y2) || x2 !== x2 && y2 !== y2;
|
|
2753
3500
|
}
|
|
2754
3501
|
var objectIs = "function" === typeof Object.is ? Object.is : is;
|
|
2755
3502
|
function shallowEqual(objA, objB) {
|
|
@@ -3643,9 +4390,9 @@ function requireReactDomClient_production() {
|
|
|
3643
4390
|
);
|
|
3644
4391
|
thenableState$1 = null;
|
|
3645
4392
|
return firstChildFiber;
|
|
3646
|
-
} catch (
|
|
3647
|
-
if (
|
|
3648
|
-
var fiber = createFiber(29,
|
|
4393
|
+
} catch (x2) {
|
|
4394
|
+
if (x2 === SuspenseException) throw x2;
|
|
4395
|
+
var fiber = createFiber(29, x2, null, returnFiber.mode);
|
|
3649
4396
|
fiber.lanes = lanes;
|
|
3650
4397
|
fiber.return = returnFiber;
|
|
3651
4398
|
return fiber;
|
|
@@ -12163,7 +12910,7 @@ function requireReactDomClient_development() {
|
|
|
12163
12910
|
type = type._init;
|
|
12164
12911
|
try {
|
|
12165
12912
|
return getComponentNameFromType(type(innerType));
|
|
12166
|
-
} catch (
|
|
12913
|
+
} catch (x2) {
|
|
12167
12914
|
}
|
|
12168
12915
|
}
|
|
12169
12916
|
return null;
|
|
@@ -12282,8 +13029,8 @@ function requireReactDomClient_development() {
|
|
|
12282
13029
|
if (void 0 === prefix)
|
|
12283
13030
|
try {
|
|
12284
13031
|
throw Error();
|
|
12285
|
-
} catch (
|
|
12286
|
-
var match =
|
|
13032
|
+
} catch (x2) {
|
|
13033
|
+
var match = x2.stack.trim().match(/\n( *(at )?)/);
|
|
12287
13034
|
prefix = match && match[1] || "";
|
|
12288
13035
|
}
|
|
12289
13036
|
return "\n" + prefix + name;
|
|
@@ -12314,8 +13061,8 @@ function requireReactDomClient_development() {
|
|
|
12314
13061
|
if ("object" === typeof Reflect && Reflect.construct) {
|
|
12315
13062
|
try {
|
|
12316
13063
|
Reflect.construct(Fake, []);
|
|
12317
|
-
} catch (
|
|
12318
|
-
var control =
|
|
13064
|
+
} catch (x2) {
|
|
13065
|
+
var control = x2;
|
|
12319
13066
|
}
|
|
12320
13067
|
Reflect.construct(fn, [], Fake);
|
|
12321
13068
|
} else {
|
|
@@ -12455,8 +13202,8 @@ function requireReactDomClient_development() {
|
|
|
12455
13202
|
workInProgress2 = workInProgress2.return;
|
|
12456
13203
|
} while (workInProgress2);
|
|
12457
13204
|
return info;
|
|
12458
|
-
} catch (
|
|
12459
|
-
return "\nError generating stack: " +
|
|
13205
|
+
} catch (x2) {
|
|
13206
|
+
return "\nError generating stack: " + x2.message + "\n" + x2.stack;
|
|
12460
13207
|
}
|
|
12461
13208
|
}
|
|
12462
13209
|
function getCurrentFiberOwnerNameInDevOrNull() {
|
|
@@ -12515,14 +13262,14 @@ function requireReactDomClient_development() {
|
|
|
12515
13262
|
throw Error("Unable to find node on an unmounted component.");
|
|
12516
13263
|
return alternate !== fiber ? null : fiber;
|
|
12517
13264
|
}
|
|
12518
|
-
for (var a = fiber,
|
|
13265
|
+
for (var a = fiber, b2 = alternate; ; ) {
|
|
12519
13266
|
var parentA = a.return;
|
|
12520
13267
|
if (null === parentA) break;
|
|
12521
13268
|
var parentB = parentA.alternate;
|
|
12522
13269
|
if (null === parentB) {
|
|
12523
|
-
|
|
12524
|
-
if (null !==
|
|
12525
|
-
a =
|
|
13270
|
+
b2 = parentA.return;
|
|
13271
|
+
if (null !== b2) {
|
|
13272
|
+
a = b2;
|
|
12526
13273
|
continue;
|
|
12527
13274
|
}
|
|
12528
13275
|
break;
|
|
@@ -12530,23 +13277,23 @@ function requireReactDomClient_development() {
|
|
|
12530
13277
|
if (parentA.child === parentB.child) {
|
|
12531
13278
|
for (parentB = parentA.child; parentB; ) {
|
|
12532
13279
|
if (parentB === a) return assertIsMounted(parentA), fiber;
|
|
12533
|
-
if (parentB ===
|
|
13280
|
+
if (parentB === b2) return assertIsMounted(parentA), alternate;
|
|
12534
13281
|
parentB = parentB.sibling;
|
|
12535
13282
|
}
|
|
12536
13283
|
throw Error("Unable to find node on an unmounted component.");
|
|
12537
13284
|
}
|
|
12538
|
-
if (a.return !==
|
|
13285
|
+
if (a.return !== b2.return) a = parentA, b2 = parentB;
|
|
12539
13286
|
else {
|
|
12540
13287
|
for (var didFindChild = false, _child = parentA.child; _child; ) {
|
|
12541
13288
|
if (_child === a) {
|
|
12542
13289
|
didFindChild = true;
|
|
12543
13290
|
a = parentA;
|
|
12544
|
-
|
|
13291
|
+
b2 = parentB;
|
|
12545
13292
|
break;
|
|
12546
13293
|
}
|
|
12547
|
-
if (_child ===
|
|
13294
|
+
if (_child === b2) {
|
|
12548
13295
|
didFindChild = true;
|
|
12549
|
-
|
|
13296
|
+
b2 = parentA;
|
|
12550
13297
|
a = parentB;
|
|
12551
13298
|
break;
|
|
12552
13299
|
}
|
|
@@ -12557,12 +13304,12 @@ function requireReactDomClient_development() {
|
|
|
12557
13304
|
if (_child === a) {
|
|
12558
13305
|
didFindChild = true;
|
|
12559
13306
|
a = parentB;
|
|
12560
|
-
|
|
13307
|
+
b2 = parentA;
|
|
12561
13308
|
break;
|
|
12562
13309
|
}
|
|
12563
|
-
if (_child ===
|
|
13310
|
+
if (_child === b2) {
|
|
12564
13311
|
didFindChild = true;
|
|
12565
|
-
|
|
13312
|
+
b2 = parentB;
|
|
12566
13313
|
a = parentA;
|
|
12567
13314
|
break;
|
|
12568
13315
|
}
|
|
@@ -12574,7 +13321,7 @@ function requireReactDomClient_development() {
|
|
|
12574
13321
|
);
|
|
12575
13322
|
}
|
|
12576
13323
|
}
|
|
12577
|
-
if (a.alternate !==
|
|
13324
|
+
if (a.alternate !== b2)
|
|
12578
13325
|
throw Error(
|
|
12579
13326
|
"Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue."
|
|
12580
13327
|
);
|
|
@@ -12808,9 +13555,9 @@ function requireReactDomClient_development() {
|
|
|
12808
13555
|
function markStateUpdateScheduled(fiber, lane) {
|
|
12809
13556
|
null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markStateUpdateScheduled && injectedProfilingHooks.markStateUpdateScheduled(fiber, lane);
|
|
12810
13557
|
}
|
|
12811
|
-
function clz32Fallback(
|
|
12812
|
-
|
|
12813
|
-
return 0 ===
|
|
13558
|
+
function clz32Fallback(x2) {
|
|
13559
|
+
x2 >>>= 0;
|
|
13560
|
+
return 0 === x2 ? 32 : 31 - (log(x2) / LN2 | 0) | 0;
|
|
12814
13561
|
}
|
|
12815
13562
|
function getLabelForLane(lane) {
|
|
12816
13563
|
if (lane & SyncHydrationLane) return "SyncHydrationLane";
|
|
@@ -13602,7 +14349,7 @@ function requireReactDomClient_development() {
|
|
|
13602
14349
|
node.textContent = text;
|
|
13603
14350
|
}
|
|
13604
14351
|
function camelize(string) {
|
|
13605
|
-
return string.replace(hyphenPattern, function(
|
|
14352
|
+
return string.replace(hyphenPattern, function(_2, character) {
|
|
13606
14353
|
return character.toUpperCase();
|
|
13607
14354
|
});
|
|
13608
14355
|
}
|
|
@@ -14011,8 +14758,8 @@ function requireReactDomClient_development() {
|
|
|
14011
14758
|
}
|
|
14012
14759
|
}
|
|
14013
14760
|
}
|
|
14014
|
-
function batchedUpdates$1(fn, a,
|
|
14015
|
-
if (isInsideEventHandler) return fn(a,
|
|
14761
|
+
function batchedUpdates$1(fn, a, b2) {
|
|
14762
|
+
if (isInsideEventHandler) return fn(a, b2);
|
|
14016
14763
|
isInsideEventHandler = true;
|
|
14017
14764
|
try {
|
|
14018
14765
|
var JSCompiler_inline_result = fn(a);
|
|
@@ -14225,8 +14972,8 @@ function requireReactDomClient_development() {
|
|
|
14225
14972
|
if ("input" === domEventName || "change" === domEventName)
|
|
14226
14973
|
return getInstIfValueChanged(targetInst);
|
|
14227
14974
|
}
|
|
14228
|
-
function is(
|
|
14229
|
-
return
|
|
14975
|
+
function is(x2, y2) {
|
|
14976
|
+
return x2 === y2 && (0 !== x2 || 1 / x2 === 1 / y2) || x2 !== x2 && y2 !== y2;
|
|
14230
14977
|
}
|
|
14231
14978
|
function shallowEqual(objA, objB) {
|
|
14232
14979
|
if (objectIs(objA, objB)) return true;
|
|
@@ -14854,7 +15601,7 @@ function requireReactDomClient_development() {
|
|
|
14854
15601
|
function describeDiff(rootNode) {
|
|
14855
15602
|
try {
|
|
14856
15603
|
return "\n\n" + describeNode(rootNode, 0);
|
|
14857
|
-
} catch (
|
|
15604
|
+
} catch (x2) {
|
|
14858
15605
|
return "";
|
|
14859
15606
|
}
|
|
14860
15607
|
}
|
|
@@ -15793,9 +16540,9 @@ function requireReactDomClient_development() {
|
|
|
15793
16540
|
);
|
|
15794
16541
|
thenableState$1 = null;
|
|
15795
16542
|
return firstChildFiber;
|
|
15796
|
-
} catch (
|
|
15797
|
-
if (
|
|
15798
|
-
var fiber = createFiber(29,
|
|
16543
|
+
} catch (x2) {
|
|
16544
|
+
if (x2 === SuspenseException) throw x2;
|
|
16545
|
+
var fiber = createFiber(29, x2, null, returnFiber.mode);
|
|
15799
16546
|
fiber.lanes = lanes;
|
|
15800
16547
|
fiber.return = returnFiber;
|
|
15801
16548
|
var debugInfo = fiber._debugInfo = currentDebugInfo;
|
|
@@ -18356,9 +19103,9 @@ function requireReactDomClient_development() {
|
|
|
18356
19103
|
}
|
|
18357
19104
|
else if (i = getIteratorFn(nextProps), "function" === typeof i) {
|
|
18358
19105
|
if (i = i.call(nextProps))
|
|
18359
|
-
for (var step = i.next(),
|
|
18360
|
-
if (!validateSuspenseListNestedChild(step.value,
|
|
18361
|
-
|
|
19106
|
+
for (var step = i.next(), _i3 = 0; !step.done; step = i.next()) {
|
|
19107
|
+
if (!validateSuspenseListNestedChild(step.value, _i3)) break a;
|
|
19108
|
+
_i3++;
|
|
18362
19109
|
}
|
|
18363
19110
|
} else
|
|
18364
19111
|
error$jscomp$0(
|
|
@@ -29376,22 +30123,6 @@ if (process.env.NODE_ENV === "production") {
|
|
|
29376
30123
|
client.exports = requireReactDomClient_development();
|
|
29377
30124
|
}
|
|
29378
30125
|
var clientExports = client.exports;
|
|
29379
|
-
function flattenComponentTree(componentTree) {
|
|
29380
|
-
let out = [];
|
|
29381
|
-
for (const [root, branches] of componentTree) {
|
|
29382
|
-
out.push(root, ...flattenComponentTree(branches).flat());
|
|
29383
|
-
}
|
|
29384
|
-
return Array.from(new Set(out));
|
|
29385
|
-
}
|
|
29386
|
-
let viewImportMap = null;
|
|
29387
|
-
if (typeof window !== "undefined" && process.env.NODE_ENV !== "test") {
|
|
29388
|
-
viewImportMap = {};
|
|
29389
|
-
const { componentTree } = window.__GEMI_DATA__;
|
|
29390
|
-
for (const viewName of flattenComponentTree(componentTree)) {
|
|
29391
|
-
viewImportMap[viewName] = lazy(window.loaders[viewName]);
|
|
29392
|
-
}
|
|
29393
|
-
}
|
|
29394
|
-
const ComponentsContext = createContext({ viewImportMap });
|
|
29395
30126
|
const Route = (props) => {
|
|
29396
30127
|
const { componentPath } = props;
|
|
29397
30128
|
const { viewImportMap: viewImportMap2 } = useContext(ComponentsContext);
|
|
@@ -29415,7 +30146,8 @@ const Route = (props) => {
|
|
|
29415
30146
|
if (Component) {
|
|
29416
30147
|
return /* @__PURE__ */ jsx(Component, { ...data, children: props.children });
|
|
29417
30148
|
}
|
|
29418
|
-
|
|
30149
|
+
const NotFound = viewImportMap2["404"];
|
|
30150
|
+
return /* @__PURE__ */ jsx(NotFound, {});
|
|
29419
30151
|
};
|
|
29420
30152
|
const Routes = (props) => {
|
|
29421
30153
|
const { componentTree } = props;
|
|
@@ -29430,7 +30162,7 @@ const Routes = (props) => {
|
|
|
29430
30162
|
const ClientRouter = (props) => {
|
|
29431
30163
|
const { RootLayout } = props;
|
|
29432
30164
|
const { routeManifest, router, componentTree, pageData, auth } = useContext(ServerDataContext);
|
|
29433
|
-
return /* @__PURE__ */ jsx(
|
|
30165
|
+
return /* @__PURE__ */ jsx(ComponentsProvider, { viewImportMap: props.viewImportMap, children: /* @__PURE__ */ jsx(
|
|
29434
30166
|
ClientRouterProvider,
|
|
29435
30167
|
{
|
|
29436
30168
|
params: router.params,
|
|
@@ -29439,17 +30171,9 @@ const ClientRouter = (props) => {
|
|
|
29439
30171
|
pathname: router.pathname,
|
|
29440
30172
|
currentPath: router.currentPath,
|
|
29441
30173
|
routeManifest,
|
|
29442
|
-
children: /* @__PURE__ */ jsx(
|
|
29443
|
-
ComponentsContext.Provider,
|
|
29444
|
-
{
|
|
29445
|
-
value: {
|
|
29446
|
-
viewImportMap: props.viewImportMap ?? viewImportMap
|
|
29447
|
-
},
|
|
29448
|
-
children: /* @__PURE__ */ jsx(StrictMode, { children: /* @__PURE__ */ jsx(RootLayout, { children: /* @__PURE__ */ jsx(Routes, { componentTree }) }) })
|
|
29449
|
-
}
|
|
29450
|
-
)
|
|
30174
|
+
children: /* @__PURE__ */ jsx(StrictMode, { children: /* @__PURE__ */ jsx(RootLayout, { children: /* @__PURE__ */ jsx(Routes, { componentTree }) }) })
|
|
29451
30175
|
}
|
|
29452
|
-
);
|
|
30176
|
+
) });
|
|
29453
30177
|
};
|
|
29454
30178
|
function init(RootLayout) {
|
|
29455
30179
|
clientExports.hydrateRoot(
|