@clicktap/state 0.13.2 → 0.13.4
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/index.js +27 -27
- package/index.mjs +335 -335
- package/package.json +3 -3
package/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as Ge } from "react/jsx-runtime";
|
|
2
|
-
import { createContext as ze, useContext as Je, useState as Pe, useEffect as
|
|
3
|
-
function
|
|
2
|
+
import { createContext as ze, useContext as Je, useState as Pe, useEffect as Rt, cloneElement as Tn } from "react";
|
|
3
|
+
function _n(e, t) {
|
|
4
4
|
for (var n = 0; n < t.length; n++) {
|
|
5
5
|
const s = t[n];
|
|
6
6
|
if (typeof s != "string" && !Array.isArray(s)) {
|
|
@@ -16,7 +16,7 @@ function Tn(e, t) {
|
|
|
16
16
|
}
|
|
17
17
|
return Object.freeze(Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }));
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function In() {
|
|
20
20
|
if (typeof globalThis < "u")
|
|
21
21
|
return globalThis;
|
|
22
22
|
if (typeof self < "u")
|
|
@@ -26,15 +26,15 @@ function _n() {
|
|
|
26
26
|
if (typeof global < "u")
|
|
27
27
|
return global;
|
|
28
28
|
}
|
|
29
|
-
function
|
|
30
|
-
const e =
|
|
29
|
+
function Sn() {
|
|
30
|
+
const e = In();
|
|
31
31
|
if (e.__xstate__)
|
|
32
32
|
return e.__xstate__;
|
|
33
33
|
}
|
|
34
|
-
const
|
|
34
|
+
const xn = (e) => {
|
|
35
35
|
if (typeof window > "u")
|
|
36
36
|
return;
|
|
37
|
-
const t =
|
|
37
|
+
const t = Sn();
|
|
38
38
|
t && t.register(e);
|
|
39
39
|
};
|
|
40
40
|
class at {
|
|
@@ -66,8 +66,8 @@ class at {
|
|
|
66
66
|
this._last = null;
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
|
-
const
|
|
70
|
-
function
|
|
69
|
+
const Lt = ".", An = "", Mt = "", wn = "#", bn = "*", Pt = "xstate.init", On = "xstate.error", ae = "xstate.stop";
|
|
70
|
+
function Nn(e, t) {
|
|
71
71
|
return {
|
|
72
72
|
type: `xstate.after.${e}.${t}`
|
|
73
73
|
};
|
|
@@ -78,21 +78,21 @@ function qe(e, t) {
|
|
|
78
78
|
output: t
|
|
79
79
|
};
|
|
80
80
|
}
|
|
81
|
-
function
|
|
81
|
+
function kn(e, t) {
|
|
82
82
|
return {
|
|
83
83
|
type: `xstate.done.actor.${e}`,
|
|
84
84
|
output: t
|
|
85
85
|
};
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function qt(e, t) {
|
|
88
88
|
return {
|
|
89
89
|
type: `xstate.error.actor.${e}`,
|
|
90
90
|
error: t
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function Ft(e) {
|
|
94
94
|
return {
|
|
95
|
-
type:
|
|
95
|
+
type: Pt,
|
|
96
96
|
input: e
|
|
97
97
|
};
|
|
98
98
|
}
|
|
@@ -101,12 +101,12 @@ function q(e) {
|
|
|
101
101
|
throw e;
|
|
102
102
|
});
|
|
103
103
|
}
|
|
104
|
-
const
|
|
104
|
+
const Cn = (() => typeof Symbol == "function" && Symbol.observable || "@@observable")();
|
|
105
105
|
function ct(e, t) {
|
|
106
106
|
return `${e.sessionId}.${t}`;
|
|
107
107
|
}
|
|
108
|
-
let
|
|
109
|
-
function
|
|
108
|
+
let Dn = 0;
|
|
109
|
+
function Rn(e, t) {
|
|
110
110
|
const n = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new WeakMap(), i = /* @__PURE__ */ new Set(), o = {}, {
|
|
111
111
|
clock: a,
|
|
112
112
|
logger: c
|
|
@@ -151,7 +151,7 @@ function Dn(e, t) {
|
|
|
151
151
|
_snapshot: {
|
|
152
152
|
_scheduledEvents: ((t == null ? void 0 : t.snapshot) && t.snapshot.scheduler) ?? {}
|
|
153
153
|
},
|
|
154
|
-
_bookId: () => `x:${
|
|
154
|
+
_bookId: () => `x:${Dn++}`,
|
|
155
155
|
_register: (h, m) => (n.set(h, m), h),
|
|
156
156
|
_unregister: (h) => {
|
|
157
157
|
n.delete(h.sessionId);
|
|
@@ -202,12 +202,12 @@ function Dn(e, t) {
|
|
|
202
202
|
};
|
|
203
203
|
return d;
|
|
204
204
|
}
|
|
205
|
-
function
|
|
205
|
+
function Ut(e, t) {
|
|
206
206
|
const n = ut(e), s = ut(t);
|
|
207
|
-
return typeof s == "string" ? typeof n == "string" ? s === n : !1 : typeof n == "string" ? n in s : Object.keys(n).every((r) => r in s ?
|
|
207
|
+
return typeof s == "string" ? typeof n == "string" ? s === n : !1 : typeof n == "string" ? n in s : Object.keys(n).every((r) => r in s ? Ut(n[r], s[r]) : !1);
|
|
208
208
|
}
|
|
209
209
|
function Ye(e) {
|
|
210
|
-
if (
|
|
210
|
+
if (jt(e))
|
|
211
211
|
return e;
|
|
212
212
|
let t = [], n = "";
|
|
213
213
|
for (let s = 0; s < e.length; s++) {
|
|
@@ -224,14 +224,14 @@ function Ye(e) {
|
|
|
224
224
|
return t.push(n), t;
|
|
225
225
|
}
|
|
226
226
|
function ut(e) {
|
|
227
|
-
if (
|
|
227
|
+
if (ls(e))
|
|
228
228
|
return e.value;
|
|
229
229
|
if (typeof e != "string")
|
|
230
230
|
return e;
|
|
231
231
|
const t = Ye(e);
|
|
232
|
-
return
|
|
232
|
+
return Ln(t);
|
|
233
233
|
}
|
|
234
|
-
function
|
|
234
|
+
function Ln(e) {
|
|
235
235
|
if (e.length === 1)
|
|
236
236
|
return e[0];
|
|
237
237
|
const t = {};
|
|
@@ -253,11 +253,11 @@ function lt(e, t) {
|
|
|
253
253
|
}
|
|
254
254
|
return n;
|
|
255
255
|
}
|
|
256
|
-
function
|
|
257
|
-
return
|
|
256
|
+
function Bt(e) {
|
|
257
|
+
return jt(e) ? e : [e];
|
|
258
258
|
}
|
|
259
259
|
function F(e) {
|
|
260
|
-
return e === void 0 ? [] :
|
|
260
|
+
return e === void 0 ? [] : Bt(e);
|
|
261
261
|
}
|
|
262
262
|
function Fe(e, t, n, s) {
|
|
263
263
|
return typeof e == "function" ? e({
|
|
@@ -266,19 +266,19 @@ function Fe(e, t, n, s) {
|
|
|
266
266
|
self: s
|
|
267
267
|
}) : e;
|
|
268
268
|
}
|
|
269
|
-
function
|
|
269
|
+
function jt(e) {
|
|
270
270
|
return Array.isArray(e);
|
|
271
271
|
}
|
|
272
|
-
function
|
|
272
|
+
function Mn(e) {
|
|
273
273
|
return e.type.startsWith("xstate.error.actor");
|
|
274
274
|
}
|
|
275
275
|
function X(e) {
|
|
276
|
-
return
|
|
276
|
+
return Bt(e).map((t) => typeof t > "u" || typeof t == "string" ? {
|
|
277
277
|
target: t
|
|
278
278
|
} : t);
|
|
279
279
|
}
|
|
280
|
-
function
|
|
281
|
-
if (!(e === void 0 || e ===
|
|
280
|
+
function $t(e) {
|
|
281
|
+
if (!(e === void 0 || e === An))
|
|
282
282
|
return F(e);
|
|
283
283
|
}
|
|
284
284
|
function dt(e, t, n) {
|
|
@@ -304,7 +304,7 @@ const Qe = 1;
|
|
|
304
304
|
let k = /* @__PURE__ */ function(e) {
|
|
305
305
|
return e[e.NotStarted = 0] = "NotStarted", e[e.Running = 1] = "Running", e[e.Stopped = 2] = "Stopped", e;
|
|
306
306
|
}({});
|
|
307
|
-
const
|
|
307
|
+
const Pn = {
|
|
308
308
|
clock: {
|
|
309
309
|
setTimeout: (e, t) => setTimeout(e, t),
|
|
310
310
|
clearTimeout: (e) => clearTimeout(e)
|
|
@@ -312,7 +312,7 @@ const Mn = {
|
|
|
312
312
|
logger: console.log.bind(console),
|
|
313
313
|
devTools: !1
|
|
314
314
|
};
|
|
315
|
-
class
|
|
315
|
+
class qn {
|
|
316
316
|
/**
|
|
317
317
|
* Creates a new actor instance for the given logic with the provided options, if any.
|
|
318
318
|
*
|
|
@@ -322,7 +322,7 @@ class Pn {
|
|
|
322
322
|
constructor(t, n) {
|
|
323
323
|
this.logic = t, this._snapshot = void 0, this.clock = void 0, this.options = void 0, this.id = void 0, this.mailbox = new at(this._process.bind(this)), this.observers = /* @__PURE__ */ new Set(), this.eventListeners = /* @__PURE__ */ new Map(), this.logger = void 0, this._processingStatus = k.NotStarted, this._parent = void 0, this._syncSnapshot = void 0, this.ref = void 0, this._actorScope = void 0, this._systemId = void 0, this.sessionId = void 0, this.system = void 0, this._doneEvent = void 0, this.src = void 0, this._deferred = [];
|
|
324
324
|
const s = {
|
|
325
|
-
...
|
|
325
|
+
...Pn,
|
|
326
326
|
...n
|
|
327
327
|
}, {
|
|
328
328
|
clock: r,
|
|
@@ -333,7 +333,7 @@ class Pn {
|
|
|
333
333
|
systemId: u,
|
|
334
334
|
inspect: f
|
|
335
335
|
} = s;
|
|
336
|
-
this.system = o ? o.system :
|
|
336
|
+
this.system = o ? o.system : Rn(this, {
|
|
337
337
|
clock: r,
|
|
338
338
|
logger: i
|
|
339
339
|
}), f && !o && this.system.inspect(dt(f)), this.sessionId = this.system._bookId(), this.id = c ?? this.sessionId, this.logger = (n == null ? void 0 : n.logger) ?? this.system._logger, this.clock = (n == null ? void 0 : n.clock) ?? this.system._clock, this._parent = o, this._syncSnapshot = a, this.options = s, this.src = s.src ?? t, this.ref = this, this._actorScope = {
|
|
@@ -403,7 +403,7 @@ class Pn {
|
|
|
403
403
|
} catch (a) {
|
|
404
404
|
q(a);
|
|
405
405
|
}
|
|
406
|
-
this._stopProcedure(), this._complete(), this._doneEvent =
|
|
406
|
+
this._stopProcedure(), this._complete(), this._doneEvent = kn(this.id, this._snapshot.output), this._parent && this.system._relay(this, this._parent, this._doneEvent);
|
|
407
407
|
break;
|
|
408
408
|
case "error":
|
|
409
409
|
this._error(this._snapshot.error);
|
|
@@ -523,7 +523,7 @@ class Pn {
|
|
|
523
523
|
error: () => {
|
|
524
524
|
}
|
|
525
525
|
}), this.system._register(this.sessionId, this), this._systemId && this.system._set(this._systemId, this), this._processingStatus = k.Running;
|
|
526
|
-
const t =
|
|
526
|
+
const t = Ft(this.options.input);
|
|
527
527
|
switch (this.system._sendInspectionEvent({
|
|
528
528
|
type: "@xstate.event",
|
|
529
529
|
sourceRef: this._parent,
|
|
@@ -610,7 +610,7 @@ class Pn {
|
|
|
610
610
|
this.observers.clear(), n && q(t);
|
|
611
611
|
}
|
|
612
612
|
_error(t) {
|
|
613
|
-
this._stopProcedure(), this._reportError(t), this._parent && this.system._relay(this, this._parent,
|
|
613
|
+
this._stopProcedure(), this._reportError(t), this._parent && this.system._relay(this, this._parent, qt(this.id, t));
|
|
614
614
|
}
|
|
615
615
|
// TODO: atm children don't belong entirely to the actor so
|
|
616
616
|
// in a way - it's not even super aware of them
|
|
@@ -638,7 +638,7 @@ class Pn {
|
|
|
638
638
|
const {
|
|
639
639
|
devTools: t
|
|
640
640
|
} = this.options;
|
|
641
|
-
t && (typeof t == "function" ? t :
|
|
641
|
+
t && (typeof t == "function" ? t : xn)(this);
|
|
642
642
|
}
|
|
643
643
|
toJSON() {
|
|
644
644
|
return {
|
|
@@ -661,7 +661,7 @@ class Pn {
|
|
|
661
661
|
getPersistedSnapshot(t) {
|
|
662
662
|
return this.logic.getPersistedSnapshot(this._snapshot, t);
|
|
663
663
|
}
|
|
664
|
-
[
|
|
664
|
+
[Cn]() {
|
|
665
665
|
return this;
|
|
666
666
|
}
|
|
667
667
|
/**
|
|
@@ -683,25 +683,25 @@ class Pn {
|
|
|
683
683
|
}
|
|
684
684
|
}
|
|
685
685
|
function U(e, ...[t]) {
|
|
686
|
-
return new
|
|
686
|
+
return new qn(e, t);
|
|
687
687
|
}
|
|
688
|
-
function
|
|
688
|
+
function Fn(e, t, n, s, {
|
|
689
689
|
sendId: r
|
|
690
690
|
}) {
|
|
691
691
|
const i = typeof r == "function" ? r(n, s) : r;
|
|
692
692
|
return [t, i];
|
|
693
693
|
}
|
|
694
|
-
function
|
|
694
|
+
function Un(e, t) {
|
|
695
695
|
e.defer(() => {
|
|
696
696
|
e.system.scheduler.cancel(e.self, t);
|
|
697
697
|
});
|
|
698
698
|
}
|
|
699
|
-
function
|
|
699
|
+
function Bn(e) {
|
|
700
700
|
function t(n, s) {
|
|
701
701
|
}
|
|
702
|
-
return t.type = "xstate.cancel", t.sendId = e, t.resolve =
|
|
702
|
+
return t.type = "xstate.cancel", t.sendId = e, t.resolve = Fn, t.execute = Un, t;
|
|
703
703
|
}
|
|
704
|
-
function
|
|
704
|
+
function jn(e, t, n, s, {
|
|
705
705
|
id: r,
|
|
706
706
|
systemId: i,
|
|
707
707
|
src: o,
|
|
@@ -731,7 +731,7 @@ function Bn(e, t, n, s, {
|
|
|
731
731
|
actorRef: d
|
|
732
732
|
}];
|
|
733
733
|
}
|
|
734
|
-
function
|
|
734
|
+
function $n(e, {
|
|
735
735
|
id: t,
|
|
736
736
|
actorRef: n
|
|
737
737
|
}) {
|
|
@@ -739,7 +739,7 @@ function jn(e, {
|
|
|
739
739
|
n._processingStatus !== k.Stopped && n.start();
|
|
740
740
|
});
|
|
741
741
|
}
|
|
742
|
-
function
|
|
742
|
+
function Vn(...[e, {
|
|
743
743
|
id: t,
|
|
744
744
|
systemId: n,
|
|
745
745
|
input: s,
|
|
@@ -747,9 +747,9 @@ function $n(...[e, {
|
|
|
747
747
|
} = {}]) {
|
|
748
748
|
function i(o, a) {
|
|
749
749
|
}
|
|
750
|
-
return i.type = "snapshot.spawnChild", i.id = t, i.systemId = n, i.src = e, i.input = s, i.syncSnapshot = r, i.resolve =
|
|
750
|
+
return i.type = "snapshot.spawnChild", i.id = t, i.systemId = n, i.src = e, i.input = s, i.syncSnapshot = r, i.resolve = jn, i.execute = $n, i;
|
|
751
751
|
}
|
|
752
|
-
function
|
|
752
|
+
function Hn(e, t, n, s, {
|
|
753
753
|
actorRef: r
|
|
754
754
|
}) {
|
|
755
755
|
const i = typeof r == "function" ? r(n, s) : r, o = typeof i == "string" ? t.children[i] : i;
|
|
@@ -760,7 +760,7 @@ function Vn(e, t, n, s, {
|
|
|
760
760
|
children: a
|
|
761
761
|
}), o];
|
|
762
762
|
}
|
|
763
|
-
function
|
|
763
|
+
function Gn(e, t) {
|
|
764
764
|
if (t) {
|
|
765
765
|
if (e.system._unregister(t), t._processingStatus !== k.Running) {
|
|
766
766
|
e.stopChild(t);
|
|
@@ -771,10 +771,10 @@ function Hn(e, t) {
|
|
|
771
771
|
});
|
|
772
772
|
}
|
|
773
773
|
}
|
|
774
|
-
function
|
|
774
|
+
function Vt(e) {
|
|
775
775
|
function t(n, s) {
|
|
776
776
|
}
|
|
777
|
-
return t.type = "xstate.stopChild", t.actorRef = e, t.resolve =
|
|
777
|
+
return t.type = "xstate.stopChild", t.actorRef = e, t.resolve = Hn, t.execute = Gn, t;
|
|
778
778
|
}
|
|
779
779
|
function We(e, t, n, s) {
|
|
780
780
|
const {
|
|
@@ -812,7 +812,7 @@ function ue(e, t) {
|
|
|
812
812
|
return n;
|
|
813
813
|
}
|
|
814
814
|
function ve(e) {
|
|
815
|
-
const t = new Set(e), n =
|
|
815
|
+
const t = new Set(e), n = Gt(t);
|
|
816
816
|
for (const s of t)
|
|
817
817
|
if (s.type === "compound" && (!n.get(s) || !n.get(s).length))
|
|
818
818
|
ft(s).forEach((r) => t.add(r));
|
|
@@ -831,7 +831,7 @@ function ve(e) {
|
|
|
831
831
|
}
|
|
832
832
|
return t;
|
|
833
833
|
}
|
|
834
|
-
function
|
|
834
|
+
function Ht(e, t) {
|
|
835
835
|
const n = t.get(e);
|
|
836
836
|
if (!n)
|
|
837
837
|
return {};
|
|
@@ -845,26 +845,26 @@ function Vt(e, t) {
|
|
|
845
845
|
}
|
|
846
846
|
const s = {};
|
|
847
847
|
for (const r of n)
|
|
848
|
-
s[r.key] =
|
|
848
|
+
s[r.key] = Ht(r, t);
|
|
849
849
|
return s;
|
|
850
850
|
}
|
|
851
|
-
function
|
|
851
|
+
function Gt(e) {
|
|
852
852
|
const t = /* @__PURE__ */ new Map();
|
|
853
853
|
for (const n of e)
|
|
854
854
|
t.has(n) || t.set(n, []), n.parent && (t.has(n.parent) || t.set(n.parent, []), t.get(n.parent).push(n));
|
|
855
855
|
return t;
|
|
856
856
|
}
|
|
857
|
-
function
|
|
857
|
+
function zt(e, t) {
|
|
858
858
|
const n = ve(t);
|
|
859
|
-
return
|
|
859
|
+
return Ht(e, Gt(n));
|
|
860
860
|
}
|
|
861
861
|
function Ze(e, t) {
|
|
862
862
|
return t.type === "compound" ? Z(t).some((n) => n.type === "final" && e.has(n)) : t.type === "parallel" ? Z(t).every((n) => Ze(e, n)) : t.type === "final";
|
|
863
863
|
}
|
|
864
|
-
const Se = (e) => e[0] ===
|
|
865
|
-
function
|
|
864
|
+
const Se = (e) => e[0] === wn;
|
|
865
|
+
function zn(e, t) {
|
|
866
866
|
return e.transitions.get(t) || [...e.transitions.keys()].filter((s) => {
|
|
867
|
-
if (s ===
|
|
867
|
+
if (s === bn)
|
|
868
868
|
return !0;
|
|
869
869
|
if (!s.endsWith(".*"))
|
|
870
870
|
return !1;
|
|
@@ -879,16 +879,16 @@ function Gn(e, t) {
|
|
|
879
879
|
return !0;
|
|
880
880
|
}).sort((s, r) => r.length - s.length).flatMap((s) => e.transitions.get(s));
|
|
881
881
|
}
|
|
882
|
-
function
|
|
882
|
+
function Jn(e) {
|
|
883
883
|
const t = e.config.after;
|
|
884
884
|
if (!t)
|
|
885
885
|
return [];
|
|
886
886
|
const n = (r, i) => {
|
|
887
|
-
const o =
|
|
888
|
-
return e.entry.push(
|
|
887
|
+
const o = Nn(r, e.id), a = o.type;
|
|
888
|
+
return e.entry.push(vs(o, {
|
|
889
889
|
id: a,
|
|
890
890
|
delay: r
|
|
891
|
-
})), e.exit.push(
|
|
891
|
+
})), e.exit.push(Bn(a)), a;
|
|
892
892
|
};
|
|
893
893
|
return Object.keys(t).flatMap((r, i) => {
|
|
894
894
|
const o = t[r], a = typeof o == "string" ? {
|
|
@@ -910,7 +910,7 @@ function zn(e) {
|
|
|
910
910
|
});
|
|
911
911
|
}
|
|
912
912
|
function $(e, t, n) {
|
|
913
|
-
const s =
|
|
913
|
+
const s = $t(n.target), r = n.reenter ?? !1, i = Qn(e, s), o = {
|
|
914
914
|
...n,
|
|
915
915
|
actions: F(n.actions),
|
|
916
916
|
guard: n.guard,
|
|
@@ -926,11 +926,11 @@ function $(e, t, n) {
|
|
|
926
926
|
};
|
|
927
927
|
return o;
|
|
928
928
|
}
|
|
929
|
-
function
|
|
929
|
+
function Yn(e) {
|
|
930
930
|
const t = /* @__PURE__ */ new Map();
|
|
931
931
|
if (e.config.on)
|
|
932
932
|
for (const n of Object.keys(e.config.on)) {
|
|
933
|
-
if (n ===
|
|
933
|
+
if (n === Mt)
|
|
934
934
|
throw new Error('Null events ("") cannot be specified as a transition key. Use `always: { ... }` instead.');
|
|
935
935
|
const s = e.config.on[n];
|
|
936
936
|
t.set(n, X(s).map((r) => $(e, n, r)));
|
|
@@ -959,7 +959,7 @@ function Jn(e) {
|
|
|
959
959
|
}
|
|
960
960
|
return t;
|
|
961
961
|
}
|
|
962
|
-
function
|
|
962
|
+
function Xn(e, t) {
|
|
963
963
|
const n = typeof t == "string" ? e.states[t] : t ? e.states[t.target] : void 0;
|
|
964
964
|
if (!n && t)
|
|
965
965
|
throw new Error(`Initial state node "${t}" not found on parent state node #${e.id}`);
|
|
@@ -977,14 +977,14 @@ function Yn(e, t) {
|
|
|
977
977
|
};
|
|
978
978
|
return s;
|
|
979
979
|
}
|
|
980
|
-
function
|
|
980
|
+
function Qn(e, t) {
|
|
981
981
|
if (t !== void 0)
|
|
982
982
|
return t.map((n) => {
|
|
983
983
|
if (typeof n != "string")
|
|
984
984
|
return n;
|
|
985
985
|
if (Se(n))
|
|
986
986
|
return e.machine.getStateNodeById(n);
|
|
987
|
-
const s = n[0] ===
|
|
987
|
+
const s = n[0] === Lt;
|
|
988
988
|
if (s && !e.parent)
|
|
989
989
|
return Te(e, n.slice(1));
|
|
990
990
|
const r = s ? e.key + n : n;
|
|
@@ -999,8 +999,8 @@ ${i.message}`);
|
|
|
999
999
|
throw new Error(`Invalid target: "${n}" is not a valid target from the root node. Did you mean ".${n}"?`);
|
|
1000
1000
|
});
|
|
1001
1001
|
}
|
|
1002
|
-
function
|
|
1003
|
-
const t =
|
|
1002
|
+
function Jt(e) {
|
|
1003
|
+
const t = $t(e.config.target);
|
|
1004
1004
|
return t ? {
|
|
1005
1005
|
target: t.map((n) => typeof n == "string" ? Te(e.parent, n) : n)
|
|
1006
1006
|
} : e.parent.initial;
|
|
@@ -1009,13 +1009,13 @@ function V(e) {
|
|
|
1009
1009
|
return e.type === "history";
|
|
1010
1010
|
}
|
|
1011
1011
|
function ft(e) {
|
|
1012
|
-
const t =
|
|
1012
|
+
const t = Yt(e);
|
|
1013
1013
|
for (const n of t)
|
|
1014
1014
|
for (const s of ue(n, e))
|
|
1015
1015
|
t.add(s);
|
|
1016
1016
|
return t;
|
|
1017
1017
|
}
|
|
1018
|
-
function
|
|
1018
|
+
function Yt(e) {
|
|
1019
1019
|
const t = /* @__PURE__ */ new Set();
|
|
1020
1020
|
function n(s) {
|
|
1021
1021
|
if (!t.has(s)) {
|
|
@@ -1070,15 +1070,15 @@ function _e(e, t) {
|
|
|
1070
1070
|
return r.concat(a);
|
|
1071
1071
|
}, []));
|
|
1072
1072
|
}
|
|
1073
|
-
function
|
|
1073
|
+
function Wn(e, t, n, s) {
|
|
1074
1074
|
const i = ee(e, t).next(n, s);
|
|
1075
1075
|
return !i || !i.length ? e.next(n, s) : i;
|
|
1076
1076
|
}
|
|
1077
|
-
function
|
|
1077
|
+
function Kn(e, t, n, s) {
|
|
1078
1078
|
const r = Object.keys(t), i = ee(e, r[0]), o = et(i, t[r[0]], n, s);
|
|
1079
1079
|
return !o || !o.length ? e.next(n, s) : o;
|
|
1080
1080
|
}
|
|
1081
|
-
function
|
|
1081
|
+
function Zn(e, t, n, s) {
|
|
1082
1082
|
const r = [];
|
|
1083
1083
|
for (const i of Object.keys(t)) {
|
|
1084
1084
|
const o = t[i];
|
|
@@ -1090,9 +1090,9 @@ function Kn(e, t, n, s) {
|
|
|
1090
1090
|
return r.length ? r : e.next(n, s);
|
|
1091
1091
|
}
|
|
1092
1092
|
function et(e, t, n, s) {
|
|
1093
|
-
return typeof t == "string" ?
|
|
1093
|
+
return typeof t == "string" ? Wn(e, t, n, s) : Object.keys(t).length === 1 ? Kn(e, t, n, s) : Zn(e, t, n, s);
|
|
1094
1094
|
}
|
|
1095
|
-
function
|
|
1095
|
+
function es(e) {
|
|
1096
1096
|
return Object.keys(e.states).map((t) => e.states[t]).filter((t) => t.type === "history");
|
|
1097
1097
|
}
|
|
1098
1098
|
function B(e, t) {
|
|
@@ -1101,7 +1101,7 @@ function B(e, t) {
|
|
|
1101
1101
|
n = n.parent;
|
|
1102
1102
|
return n.parent === t;
|
|
1103
1103
|
}
|
|
1104
|
-
function
|
|
1104
|
+
function ts(e, t) {
|
|
1105
1105
|
const n = new Set(e), s = new Set(t);
|
|
1106
1106
|
for (const r of n)
|
|
1107
1107
|
if (s.has(r))
|
|
@@ -1111,13 +1111,13 @@ function es(e, t) {
|
|
|
1111
1111
|
return !0;
|
|
1112
1112
|
return !1;
|
|
1113
1113
|
}
|
|
1114
|
-
function
|
|
1114
|
+
function Xt(e, t, n) {
|
|
1115
1115
|
const s = /* @__PURE__ */ new Set();
|
|
1116
1116
|
for (const r of e) {
|
|
1117
1117
|
let i = !1;
|
|
1118
1118
|
const o = /* @__PURE__ */ new Set();
|
|
1119
1119
|
for (const a of s)
|
|
1120
|
-
if (
|
|
1120
|
+
if (ts(Ue([r], t, n), Ue([a], t, n)))
|
|
1121
1121
|
if (B(r.source, a.source))
|
|
1122
1122
|
o.add(a);
|
|
1123
1123
|
else {
|
|
@@ -1132,7 +1132,7 @@ function Yt(e, t, n) {
|
|
|
1132
1132
|
}
|
|
1133
1133
|
return Array.from(s);
|
|
1134
1134
|
}
|
|
1135
|
-
function
|
|
1135
|
+
function ns(e) {
|
|
1136
1136
|
const [t, ...n] = e;
|
|
1137
1137
|
for (const s of ue(t, void 0))
|
|
1138
1138
|
if (n.every((r) => B(r, s)))
|
|
@@ -1148,19 +1148,19 @@ function tt(e, t) {
|
|
|
1148
1148
|
for (const r of t[s.id])
|
|
1149
1149
|
n.add(r);
|
|
1150
1150
|
else
|
|
1151
|
-
for (const r of tt(
|
|
1151
|
+
for (const r of tt(Jt(s), t))
|
|
1152
1152
|
n.add(r);
|
|
1153
1153
|
else
|
|
1154
1154
|
n.add(s);
|
|
1155
1155
|
return [...n];
|
|
1156
1156
|
}
|
|
1157
|
-
function
|
|
1157
|
+
function Qt(e, t) {
|
|
1158
1158
|
const n = tt(e, t);
|
|
1159
1159
|
if (!n)
|
|
1160
1160
|
return;
|
|
1161
1161
|
if (!e.reenter && n.every((r) => r === e.source || B(r, e.source)))
|
|
1162
1162
|
return e.source;
|
|
1163
|
-
const s =
|
|
1163
|
+
const s = ns(n.concat(e.source));
|
|
1164
1164
|
if (s)
|
|
1165
1165
|
return s;
|
|
1166
1166
|
if (!e.reenter)
|
|
@@ -1171,14 +1171,14 @@ function Ue(e, t, n) {
|
|
|
1171
1171
|
const s = /* @__PURE__ */ new Set();
|
|
1172
1172
|
for (const i of e)
|
|
1173
1173
|
if ((r = i.target) != null && r.length) {
|
|
1174
|
-
const o =
|
|
1174
|
+
const o = Qt(i, n);
|
|
1175
1175
|
i.reenter && i.source === o && s.add(o);
|
|
1176
1176
|
for (const a of t)
|
|
1177
1177
|
B(a, o) && s.add(a);
|
|
1178
1178
|
}
|
|
1179
1179
|
return [...s];
|
|
1180
1180
|
}
|
|
1181
|
-
function
|
|
1181
|
+
function ss(e, t) {
|
|
1182
1182
|
if (e.length !== t.size)
|
|
1183
1183
|
return !1;
|
|
1184
1184
|
for (const n of e)
|
|
@@ -1191,13 +1191,13 @@ function Be(e, t, n, s, r, i) {
|
|
|
1191
1191
|
return t;
|
|
1192
1192
|
const o = new Set(t._nodes);
|
|
1193
1193
|
let a = t.historyValue;
|
|
1194
|
-
const c =
|
|
1194
|
+
const c = Xt(e, o, a);
|
|
1195
1195
|
let u = t;
|
|
1196
|
-
r || ([u, a] =
|
|
1196
|
+
r || ([u, a] = as(u, s, n, c, o, a, i)), u = te(u, s, n, c.flatMap((d) => d.actions), i), u = is(u, s, n, c, o, i, a, r);
|
|
1197
1197
|
const f = [...o];
|
|
1198
1198
|
u.status === "done" && (u = te(u, s, n, f.sort((d, h) => h.order - d.order).flatMap((d) => d.exit), i));
|
|
1199
1199
|
try {
|
|
1200
|
-
return a === t.historyValue &&
|
|
1200
|
+
return a === t.historyValue && ss(t._nodes, o) ? u : H(u, {
|
|
1201
1201
|
_nodes: f,
|
|
1202
1202
|
historyValue: a
|
|
1203
1203
|
});
|
|
@@ -1205,23 +1205,23 @@ function Be(e, t, n, s, r, i) {
|
|
|
1205
1205
|
throw d;
|
|
1206
1206
|
}
|
|
1207
1207
|
}
|
|
1208
|
-
function
|
|
1208
|
+
function rs(e, t, n, s, r) {
|
|
1209
1209
|
if (s.output === void 0)
|
|
1210
1210
|
return;
|
|
1211
1211
|
const i = qe(r.id, r.output !== void 0 && r.parent ? Fe(r.output, e.context, t, n.self) : void 0);
|
|
1212
1212
|
return Fe(s.output, e.context, i, n.self);
|
|
1213
1213
|
}
|
|
1214
|
-
function
|
|
1214
|
+
function is(e, t, n, s, r, i, o, a) {
|
|
1215
1215
|
let c = e;
|
|
1216
1216
|
const u = /* @__PURE__ */ new Set(), f = /* @__PURE__ */ new Set();
|
|
1217
|
-
|
|
1217
|
+
os(s, o, f, u), a && f.add(e.machine.root);
|
|
1218
1218
|
const d = /* @__PURE__ */ new Set();
|
|
1219
1219
|
for (const h of [...u].sort((m, y) => m.order - y.order)) {
|
|
1220
1220
|
r.add(h);
|
|
1221
1221
|
const m = [];
|
|
1222
1222
|
m.push(...h.entry);
|
|
1223
1223
|
for (const y of h.invoke)
|
|
1224
|
-
m.push(
|
|
1224
|
+
m.push(Vn(y.src, {
|
|
1225
1225
|
...y,
|
|
1226
1226
|
syncSnapshot: !!y.onSnapshot
|
|
1227
1227
|
}));
|
|
@@ -1238,15 +1238,15 @@ function rs(e, t, n, s, r, i, o, a) {
|
|
|
1238
1238
|
continue;
|
|
1239
1239
|
c = H(c, {
|
|
1240
1240
|
status: "done",
|
|
1241
|
-
output:
|
|
1241
|
+
output: rs(c, t, n, c.machine.root, S)
|
|
1242
1242
|
});
|
|
1243
1243
|
}
|
|
1244
1244
|
}
|
|
1245
1245
|
return c;
|
|
1246
1246
|
}
|
|
1247
|
-
function
|
|
1247
|
+
function os(e, t, n, s) {
|
|
1248
1248
|
for (const r of e) {
|
|
1249
|
-
const i =
|
|
1249
|
+
const i = Qt(r, t);
|
|
1250
1250
|
for (const a of r.target || [])
|
|
1251
1251
|
!V(a) && // if the target is different than the source then it will *definitely* be entered
|
|
1252
1252
|
(r.source !== a || // we know that the domain can't lie within the source
|
|
@@ -1256,7 +1256,7 @@ function is(e, t, n, s) {
|
|
|
1256
1256
|
const o = tt(r, t);
|
|
1257
1257
|
for (const a of o) {
|
|
1258
1258
|
const c = ue(a, i);
|
|
1259
|
-
(i == null ? void 0 : i.type) === "parallel" && c.push(i),
|
|
1259
|
+
(i == null ? void 0 : i.type) === "parallel" && c.push(i), Wt(s, t, n, c, !r.source.parent && r.reenter ? void 0 : i);
|
|
1260
1260
|
}
|
|
1261
1261
|
}
|
|
1262
1262
|
}
|
|
@@ -1270,7 +1270,7 @@ function Q(e, t, n, s) {
|
|
|
1270
1270
|
for (const o of i)
|
|
1271
1271
|
Ne(o, e.parent, s, t, n);
|
|
1272
1272
|
} else {
|
|
1273
|
-
const i =
|
|
1273
|
+
const i = Jt(e);
|
|
1274
1274
|
for (const o of i.target)
|
|
1275
1275
|
s.add(o), i === ((r = e.parent) == null ? void 0 : r.initial) && n.add(e.parent), Q(o, t, n, s);
|
|
1276
1276
|
for (const o of i.target)
|
|
@@ -1283,33 +1283,33 @@ function Q(e, t, n, s) {
|
|
|
1283
1283
|
for (const i of Z(e).filter((o) => !V(o)))
|
|
1284
1284
|
[...s].some((o) => B(o, i)) || (V(i) || (s.add(i), n.add(i)), Q(i, t, n, s));
|
|
1285
1285
|
}
|
|
1286
|
-
function
|
|
1286
|
+
function Wt(e, t, n, s, r) {
|
|
1287
1287
|
for (const i of s)
|
|
1288
1288
|
if ((!r || B(i, r)) && e.add(i), i.type === "parallel")
|
|
1289
1289
|
for (const o of Z(i).filter((a) => !V(a)))
|
|
1290
1290
|
[...e].some((a) => B(a, o)) || (e.add(o), Q(o, t, n, e));
|
|
1291
1291
|
}
|
|
1292
1292
|
function Ne(e, t, n, s, r) {
|
|
1293
|
-
|
|
1293
|
+
Wt(n, s, r, ue(e, t));
|
|
1294
1294
|
}
|
|
1295
|
-
function
|
|
1295
|
+
function as(e, t, n, s, r, i, o) {
|
|
1296
1296
|
let a = e;
|
|
1297
1297
|
const c = Ue(s, r, i);
|
|
1298
1298
|
c.sort((f, d) => d.order - f.order);
|
|
1299
1299
|
let u;
|
|
1300
1300
|
for (const f of c)
|
|
1301
|
-
for (const d of
|
|
1301
|
+
for (const d of es(f)) {
|
|
1302
1302
|
let h;
|
|
1303
1303
|
d.history === "deep" ? h = (m) => Ke(m) && B(m, f) : h = (m) => m.parent === f, u ?? (u = {
|
|
1304
1304
|
...i
|
|
1305
1305
|
}), u[d.id] = Array.from(r).filter(h);
|
|
1306
1306
|
}
|
|
1307
1307
|
for (const f of c)
|
|
1308
|
-
a = te(a, t, n, [...f.exit, ...f.invoke.map((d) =>
|
|
1308
|
+
a = te(a, t, n, [...f.exit, ...f.invoke.map((d) => Vt(d.id))], o), r.delete(f);
|
|
1309
1309
|
return [a, u || i];
|
|
1310
1310
|
}
|
|
1311
1311
|
let pt = !1;
|
|
1312
|
-
function
|
|
1312
|
+
function Kt(e, t, n, s, r, i) {
|
|
1313
1313
|
const {
|
|
1314
1314
|
machine: o
|
|
1315
1315
|
} = e;
|
|
@@ -1362,12 +1362,12 @@ function Wt(e, t, n, s, r, i) {
|
|
|
1362
1362
|
// this holds all params
|
|
1363
1363
|
r
|
|
1364
1364
|
);
|
|
1365
|
-
a = v, "retryResolve" in y && (i == null || i.push([y, S])), "execute" in y && (n.self._processingStatus === k.Running ? y.execute(n, S) : n.defer(y.execute.bind(null, n, S))), A && (a =
|
|
1365
|
+
a = v, "retryResolve" in y && (i == null || i.push([y, S])), "execute" in y && (n.self._processingStatus === k.Running ? y.execute(n, S) : n.defer(y.execute.bind(null, n, S))), A && (a = Kt(a, t, n, A, r, i));
|
|
1366
1366
|
}
|
|
1367
1367
|
return a;
|
|
1368
1368
|
}
|
|
1369
1369
|
function te(e, t, n, s, r, i) {
|
|
1370
|
-
const o = i ? [] : void 0, a =
|
|
1370
|
+
const o = i ? [] : void 0, a = Kt(e, t, n, s, {
|
|
1371
1371
|
internalQueue: r,
|
|
1372
1372
|
deferredActorIds: i
|
|
1373
1373
|
}, o);
|
|
@@ -1395,8 +1395,8 @@ function ke(e, t, n, s = []) {
|
|
|
1395
1395
|
microstates: i
|
|
1396
1396
|
};
|
|
1397
1397
|
let a = t;
|
|
1398
|
-
if (a.type !==
|
|
1399
|
-
const u = a, f =
|
|
1398
|
+
if (a.type !== Pt) {
|
|
1399
|
+
const u = a, f = Mn(u), d = mt(u, r);
|
|
1400
1400
|
if (f && !d.length)
|
|
1401
1401
|
return r = H(e, {
|
|
1402
1402
|
status: "error",
|
|
@@ -1417,7 +1417,7 @@ function ke(e, t, n, s = []) {
|
|
|
1417
1417
|
}
|
|
1418
1418
|
let c = !0;
|
|
1419
1419
|
for (; r.status === "active"; ) {
|
|
1420
|
-
let u = c ?
|
|
1420
|
+
let u = c ? cs(r, a) : [];
|
|
1421
1421
|
const f = u.length ? r : void 0;
|
|
1422
1422
|
if (!u.length) {
|
|
1423
1423
|
if (!s.length)
|
|
@@ -1432,12 +1432,12 @@ function ke(e, t, n, s = []) {
|
|
|
1432
1432
|
};
|
|
1433
1433
|
}
|
|
1434
1434
|
function yt(e, t, n) {
|
|
1435
|
-
return te(e, t, n, Object.values(e.children).map((s) =>
|
|
1435
|
+
return te(e, t, n, Object.values(e.children).map((s) => Vt(s)), []);
|
|
1436
1436
|
}
|
|
1437
1437
|
function mt(e, t) {
|
|
1438
1438
|
return t.machine.getTransitionData(t, e);
|
|
1439
1439
|
}
|
|
1440
|
-
function
|
|
1440
|
+
function cs(e, t) {
|
|
1441
1441
|
const n = /* @__PURE__ */ new Set(), s = e._nodes.filter(Ke);
|
|
1442
1442
|
for (const r of s)
|
|
1443
1443
|
e:
|
|
@@ -1449,24 +1449,24 @@ function as(e, t) {
|
|
|
1449
1449
|
break e;
|
|
1450
1450
|
}
|
|
1451
1451
|
}
|
|
1452
|
-
return
|
|
1452
|
+
return Xt(Array.from(n), new Set(e._nodes), e.historyValue);
|
|
1453
1453
|
}
|
|
1454
|
-
function
|
|
1454
|
+
function us(e, t) {
|
|
1455
1455
|
const n = ve(_e(e, t));
|
|
1456
|
-
return
|
|
1456
|
+
return zt(e, [...n]);
|
|
1457
1457
|
}
|
|
1458
|
-
function
|
|
1458
|
+
function ls(e) {
|
|
1459
1459
|
return !!e && typeof e == "object" && "machine" in e && "value" in e;
|
|
1460
1460
|
}
|
|
1461
|
-
const
|
|
1462
|
-
return
|
|
1463
|
-
}, ds = function(t) {
|
|
1464
|
-
return this.tags.has(t);
|
|
1461
|
+
const ds = function(t) {
|
|
1462
|
+
return Ut(t, this.value);
|
|
1465
1463
|
}, hs = function(t) {
|
|
1464
|
+
return this.tags.has(t);
|
|
1465
|
+
}, fs = function(t) {
|
|
1466
1466
|
const n = this.machine.getTransitionData(this, t);
|
|
1467
1467
|
return !!(n != null && n.length) && // Check that at least one transition is not forbidden
|
|
1468
1468
|
n.some((s) => s.target !== void 0 || s.actions.length);
|
|
1469
|
-
},
|
|
1469
|
+
}, ps = function() {
|
|
1470
1470
|
const {
|
|
1471
1471
|
_nodes: t,
|
|
1472
1472
|
tags: n,
|
|
@@ -1482,7 +1482,7 @@ const ls = function(t) {
|
|
|
1482
1482
|
...u,
|
|
1483
1483
|
tags: Array.from(n)
|
|
1484
1484
|
};
|
|
1485
|
-
},
|
|
1485
|
+
}, ys = function() {
|
|
1486
1486
|
return this._nodes.reduce((t, n) => (n.meta !== void 0 && (t[n.id] = n.meta), t), {});
|
|
1487
1487
|
};
|
|
1488
1488
|
function ye(e, t) {
|
|
@@ -1493,15 +1493,15 @@ function ye(e, t) {
|
|
|
1493
1493
|
machine: t,
|
|
1494
1494
|
context: e.context,
|
|
1495
1495
|
_nodes: e._nodes,
|
|
1496
|
-
value:
|
|
1496
|
+
value: zt(t.root, e._nodes),
|
|
1497
1497
|
tags: new Set(e._nodes.flatMap((n) => n.tags)),
|
|
1498
1498
|
children: e.children,
|
|
1499
1499
|
historyValue: e.historyValue || {},
|
|
1500
|
-
matches:
|
|
1501
|
-
hasTag:
|
|
1502
|
-
can:
|
|
1503
|
-
getMeta:
|
|
1504
|
-
toJSON:
|
|
1500
|
+
matches: ds,
|
|
1501
|
+
hasTag: hs,
|
|
1502
|
+
can: fs,
|
|
1503
|
+
getMeta: ys,
|
|
1504
|
+
toJSON: ps
|
|
1505
1505
|
};
|
|
1506
1506
|
}
|
|
1507
1507
|
function H(e, t = {}) {
|
|
@@ -1510,7 +1510,7 @@ function H(e, t = {}) {
|
|
|
1510
1510
|
...t
|
|
1511
1511
|
}, e.machine);
|
|
1512
1512
|
}
|
|
1513
|
-
function
|
|
1513
|
+
function ms(e, t) {
|
|
1514
1514
|
const {
|
|
1515
1515
|
_nodes: n,
|
|
1516
1516
|
tags: s,
|
|
@@ -1535,11 +1535,11 @@ function ys(e, t) {
|
|
|
1535
1535
|
}
|
|
1536
1536
|
return {
|
|
1537
1537
|
...h,
|
|
1538
|
-
context:
|
|
1538
|
+
context: Zt(o),
|
|
1539
1539
|
children: m
|
|
1540
1540
|
};
|
|
1541
1541
|
}
|
|
1542
|
-
function
|
|
1542
|
+
function Zt(e) {
|
|
1543
1543
|
let t;
|
|
1544
1544
|
for (const n in e) {
|
|
1545
1545
|
const s = e[n];
|
|
@@ -1552,7 +1552,7 @@ function Kt(e) {
|
|
|
1552
1552
|
id: s.id
|
|
1553
1553
|
};
|
|
1554
1554
|
else {
|
|
1555
|
-
const r =
|
|
1555
|
+
const r = Zt(s);
|
|
1556
1556
|
r !== s && (t ?? (t = Array.isArray(e) ? e.slice() : {
|
|
1557
1557
|
...e
|
|
1558
1558
|
}), t[n] = r);
|
|
@@ -1560,7 +1560,7 @@ function Kt(e) {
|
|
|
1560
1560
|
}
|
|
1561
1561
|
return t ?? e;
|
|
1562
1562
|
}
|
|
1563
|
-
function
|
|
1563
|
+
function gs(e, t, n, s, {
|
|
1564
1564
|
event: r,
|
|
1565
1565
|
id: i,
|
|
1566
1566
|
delay: o
|
|
@@ -1583,7 +1583,7 @@ function ms(e, t, n, s, {
|
|
|
1583
1583
|
delay: f
|
|
1584
1584
|
}];
|
|
1585
1585
|
}
|
|
1586
|
-
function
|
|
1586
|
+
function Es(e, t) {
|
|
1587
1587
|
const {
|
|
1588
1588
|
event: n,
|
|
1589
1589
|
delay: s,
|
|
@@ -1597,13 +1597,13 @@ function gs(e, t) {
|
|
|
1597
1597
|
return;
|
|
1598
1598
|
}
|
|
1599
1599
|
}
|
|
1600
|
-
function
|
|
1600
|
+
function vs(e, t) {
|
|
1601
1601
|
function n(s, r) {
|
|
1602
1602
|
}
|
|
1603
|
-
return n.type = "xstate.raise", n.event = e, n.id = t == null ? void 0 : t.id, n.delay = t == null ? void 0 : t.delay, n.resolve =
|
|
1603
|
+
return n.type = "xstate.raise", n.event = e, n.id = t == null ? void 0 : t.id, n.delay = t == null ? void 0 : t.delay, n.resolve = gs, n.execute = Es, n;
|
|
1604
1604
|
}
|
|
1605
1605
|
const gt = /* @__PURE__ */ new WeakMap();
|
|
1606
|
-
function
|
|
1606
|
+
function Ts(e) {
|
|
1607
1607
|
return {
|
|
1608
1608
|
config: e,
|
|
1609
1609
|
start: (n, s) => {
|
|
@@ -1714,7 +1714,7 @@ function K(e) {
|
|
|
1714
1714
|
restoreSnapshot: (n) => n
|
|
1715
1715
|
};
|
|
1716
1716
|
}
|
|
1717
|
-
function
|
|
1717
|
+
function _s(e, {
|
|
1718
1718
|
machine: t,
|
|
1719
1719
|
context: n
|
|
1720
1720
|
}, s, r) {
|
|
@@ -1757,7 +1757,7 @@ function Ts(e, {
|
|
|
1757
1757
|
}), c;
|
|
1758
1758
|
};
|
|
1759
1759
|
}
|
|
1760
|
-
function
|
|
1760
|
+
function Is(e, t, n, s, {
|
|
1761
1761
|
assignment: r
|
|
1762
1762
|
}) {
|
|
1763
1763
|
if (!t.context)
|
|
@@ -1765,7 +1765,7 @@ function _s(e, t, n, s, {
|
|
|
1765
1765
|
const i = {}, o = {
|
|
1766
1766
|
context: t.context,
|
|
1767
1767
|
event: n.event,
|
|
1768
|
-
spawn:
|
|
1768
|
+
spawn: _s(e, t, n.event, i),
|
|
1769
1769
|
self: e.self,
|
|
1770
1770
|
system: e.system
|
|
1771
1771
|
};
|
|
@@ -1789,12 +1789,12 @@ function _s(e, t, n, s, {
|
|
|
1789
1789
|
function C(e) {
|
|
1790
1790
|
function t(n, s) {
|
|
1791
1791
|
}
|
|
1792
|
-
return t.type = "xstate.assign", t.assignment = e, t.resolve =
|
|
1792
|
+
return t.type = "xstate.assign", t.assignment = e, t.resolve = Is, t;
|
|
1793
1793
|
}
|
|
1794
1794
|
let Tt = /* @__PURE__ */ function(e) {
|
|
1795
1795
|
return e.Parent = "#_parent", e.Internal = "#_internal", e;
|
|
1796
1796
|
}({});
|
|
1797
|
-
function
|
|
1797
|
+
function Ss(e, t, n, s, {
|
|
1798
1798
|
to: r,
|
|
1799
1799
|
event: i,
|
|
1800
1800
|
id: o,
|
|
@@ -1825,10 +1825,10 @@ function Is(e, t, n, s, {
|
|
|
1825
1825
|
delay: d
|
|
1826
1826
|
}];
|
|
1827
1827
|
}
|
|
1828
|
-
function
|
|
1828
|
+
function xs(e, t, n) {
|
|
1829
1829
|
typeof n.to == "string" && (n.to = t.children[n.to]);
|
|
1830
1830
|
}
|
|
1831
|
-
function
|
|
1831
|
+
function As(e, t) {
|
|
1832
1832
|
e.defer(() => {
|
|
1833
1833
|
const {
|
|
1834
1834
|
to: n,
|
|
@@ -1845,14 +1845,14 @@ function xs(e, t) {
|
|
|
1845
1845
|
// at this point, in a deferred task, it should already be mutated by retryResolveSendTo
|
|
1846
1846
|
// if it initially started as a string
|
|
1847
1847
|
n,
|
|
1848
|
-
s.type ===
|
|
1848
|
+
s.type === On ? qt(e.self.id, s.data) : s
|
|
1849
1849
|
);
|
|
1850
1850
|
});
|
|
1851
1851
|
}
|
|
1852
1852
|
function _t(e, t, n) {
|
|
1853
1853
|
function s(r, i) {
|
|
1854
1854
|
}
|
|
1855
|
-
return s.type = "xsnapshot.sendTo", s.to = e, s.event = t, s.id = n == null ? void 0 : n.id, s.delay = n == null ? void 0 : n.delay, s.resolve =
|
|
1855
|
+
return s.type = "xsnapshot.sendTo", s.to = e, s.event = t, s.id = n == null ? void 0 : n.id, s.delay = n == null ? void 0 : n.delay, s.resolve = Ss, s.retryResolve = xs, s.execute = As, s;
|
|
1856
1856
|
}
|
|
1857
1857
|
const It = /* @__PURE__ */ new WeakMap();
|
|
1858
1858
|
function J(e, t, n) {
|
|
@@ -1861,7 +1861,7 @@ function J(e, t, n) {
|
|
|
1861
1861
|
[t]: n()
|
|
1862
1862
|
}, It.set(e, s)), s[t];
|
|
1863
1863
|
}
|
|
1864
|
-
const
|
|
1864
|
+
const ws = {}, re = (e) => typeof e == "string" ? {
|
|
1865
1865
|
type: e
|
|
1866
1866
|
} : typeof e == "function" ? "resolve" in e ? {
|
|
1867
1867
|
type: e.type
|
|
@@ -1870,17 +1870,17 @@ const As = {}, re = (e) => typeof e == "string" ? {
|
|
|
1870
1870
|
} : e;
|
|
1871
1871
|
class nt {
|
|
1872
1872
|
constructor(t, n) {
|
|
1873
|
-
if (this.config = t, this.key = void 0, this.id = void 0, this.type = void 0, this.path = void 0, this.states = void 0, this.history = void 0, this.entry = void 0, this.exit = void 0, this.parent = void 0, this.machine = void 0, this.meta = void 0, this.output = void 0, this.order = -1, this.description = void 0, this.tags = [], this.transitions = void 0, this.always = void 0, this.parent = n._parent, this.key = n._key, this.machine = n._machine, this.path = this.parent ? this.parent.path.concat(this.key) : [], this.id = this.config.id || [this.machine.id, ...this.path].join(
|
|
1873
|
+
if (this.config = t, this.key = void 0, this.id = void 0, this.type = void 0, this.path = void 0, this.states = void 0, this.history = void 0, this.entry = void 0, this.exit = void 0, this.parent = void 0, this.machine = void 0, this.meta = void 0, this.output = void 0, this.order = -1, this.description = void 0, this.tags = [], this.transitions = void 0, this.always = void 0, this.parent = n._parent, this.key = n._key, this.machine = n._machine, this.path = this.parent ? this.parent.path.concat(this.key) : [], this.id = this.config.id || [this.machine.id, ...this.path].join(Lt), this.type = this.config.type || (this.config.states && Object.keys(this.config.states).length ? "compound" : this.config.history ? "history" : "atomic"), this.description = this.config.description, this.order = this.machine.idMap.size, this.machine.idMap.set(this.id, this), this.states = this.config.states ? lt(this.config.states, (s, r) => new nt(s, {
|
|
1874
1874
|
_parent: this,
|
|
1875
1875
|
_key: r,
|
|
1876
1876
|
_machine: this.machine
|
|
1877
|
-
})) :
|
|
1877
|
+
})) : ws, this.type === "compound" && !this.config.initial)
|
|
1878
1878
|
throw new Error(`No initial state specified for compound state node "#${this.id}". Try adding { initial: "${Object.keys(this.states)[0]}" } to the state config.`);
|
|
1879
1879
|
this.history = this.config.history === !0 ? "shallow" : this.config.history || !1, this.entry = F(this.config.entry).slice(), this.exit = F(this.config.exit).slice(), this.meta = this.config.meta, this.output = this.type === "final" || !this.parent ? this.config.output : void 0, this.tags = F(t.tags).slice();
|
|
1880
1880
|
}
|
|
1881
1881
|
/** @internal */
|
|
1882
1882
|
_initialize() {
|
|
1883
|
-
this.transitions =
|
|
1883
|
+
this.transitions = Yn(this), this.config.always && (this.always = X(this.config.always).map((t) => $(this, Mt, t))), Object.keys(this.states).forEach((t) => {
|
|
1884
1884
|
this.states[t]._initialize();
|
|
1885
1885
|
});
|
|
1886
1886
|
}
|
|
@@ -1964,16 +1964,16 @@ class nt {
|
|
|
1964
1964
|
return J(this, "on", () => [...this.transitions].flatMap(([n, s]) => s.map((r) => [n, r])).reduce((n, [s, r]) => (n[s] = n[s] || [], n[s].push(r), n), {}));
|
|
1965
1965
|
}
|
|
1966
1966
|
get after() {
|
|
1967
|
-
return J(this, "delayedTransitions", () =>
|
|
1967
|
+
return J(this, "delayedTransitions", () => Jn(this));
|
|
1968
1968
|
}
|
|
1969
1969
|
get initial() {
|
|
1970
|
-
return J(this, "initial", () =>
|
|
1970
|
+
return J(this, "initial", () => Xn(this, this.config.initial));
|
|
1971
1971
|
}
|
|
1972
1972
|
/** @internal */
|
|
1973
1973
|
next(t, n) {
|
|
1974
1974
|
const s = n.type, r = [];
|
|
1975
1975
|
let i;
|
|
1976
|
-
const o = J(this, `candidates-${s}`, () =>
|
|
1976
|
+
const o = J(this, `candidates-${s}`, () => zn(this, s));
|
|
1977
1977
|
for (const a of o) {
|
|
1978
1978
|
const {
|
|
1979
1979
|
guard: c
|
|
@@ -2021,7 +2021,7 @@ ${d.message}`);
|
|
|
2021
2021
|
return Array.from(t);
|
|
2022
2022
|
}
|
|
2023
2023
|
}
|
|
2024
|
-
const
|
|
2024
|
+
const bs = "#";
|
|
2025
2025
|
class st {
|
|
2026
2026
|
constructor(t, n) {
|
|
2027
2027
|
this.config = t, this.version = void 0, this.schemas = void 0, this.implementations = void 0, this.__xstatenode = !0, this.idMap = /* @__PURE__ */ new Map(), this.root = void 0, this.id = void 0, this.states = void 0, this.events = void 0, this.__TResolvedTypesMeta = void 0, this.id = t.id || "(machine)", this.implementations = {
|
|
@@ -2070,7 +2070,7 @@ class st {
|
|
|
2070
2070
|
});
|
|
2071
2071
|
}
|
|
2072
2072
|
resolveState(t) {
|
|
2073
|
-
const n =
|
|
2073
|
+
const n = us(this.root, t.value), s = ve(_e(this.root, n));
|
|
2074
2074
|
return ye({
|
|
2075
2075
|
_nodes: [...s],
|
|
2076
2076
|
context: t.context || {},
|
|
@@ -2131,8 +2131,8 @@ class st {
|
|
|
2131
2131
|
* Returns the initial `State` instance, with reference to `self` as an `ActorRef`.
|
|
2132
2132
|
*/
|
|
2133
2133
|
getInitialSnapshot(t, n) {
|
|
2134
|
-
const s =
|
|
2135
|
-
target: [...
|
|
2134
|
+
const s = Ft(n), r = [], i = this.getPreInitialState(t, s, r), o = Be([{
|
|
2135
|
+
target: [...Yt(this.root)],
|
|
2136
2136
|
source: this.root,
|
|
2137
2137
|
reenter: !0,
|
|
2138
2138
|
actions: [],
|
|
@@ -2150,7 +2150,7 @@ class st {
|
|
|
2150
2150
|
});
|
|
2151
2151
|
}
|
|
2152
2152
|
getStateNodeById(t) {
|
|
2153
|
-
const n = Ye(t), s = n.slice(1), r = Se(n[0]) ? n[0].slice(
|
|
2153
|
+
const n = Ye(t), s = n.slice(1), r = Se(n[0]) ? n[0].slice(bs.length) : n[0], i = this.idMap.get(r);
|
|
2154
2154
|
if (!i)
|
|
2155
2155
|
throw new Error(`Child state node '#${r}' does not exist on machine '${this.id}'`);
|
|
2156
2156
|
return Te(i, s);
|
|
@@ -2162,7 +2162,7 @@ class st {
|
|
|
2162
2162
|
return this.definition;
|
|
2163
2163
|
}
|
|
2164
2164
|
getPersistedSnapshot(t, n) {
|
|
2165
|
-
return
|
|
2165
|
+
return ms(t, n);
|
|
2166
2166
|
}
|
|
2167
2167
|
restoreSnapshot(t, n) {
|
|
2168
2168
|
const s = {}, r = t.children;
|
|
@@ -2204,7 +2204,7 @@ class st {
|
|
|
2204
2204
|
return a(i.context, s), i;
|
|
2205
2205
|
}
|
|
2206
2206
|
}
|
|
2207
|
-
function
|
|
2207
|
+
function Os(e, t) {
|
|
2208
2208
|
return new st(e, t);
|
|
2209
2209
|
}
|
|
2210
2210
|
function xe({
|
|
@@ -2215,7 +2215,7 @@ function xe({
|
|
|
2215
2215
|
delays: r
|
|
2216
2216
|
}) {
|
|
2217
2217
|
return {
|
|
2218
|
-
createMachine: (i) =>
|
|
2218
|
+
createMachine: (i) => Os({
|
|
2219
2219
|
...i,
|
|
2220
2220
|
schemas: e
|
|
2221
2221
|
}, {
|
|
@@ -2530,13 +2530,13 @@ const St = xe({
|
|
|
2530
2530
|
// },
|
|
2531
2531
|
// },
|
|
2532
2532
|
}
|
|
2533
|
-
}),
|
|
2533
|
+
}), en = ze(
|
|
2534
2534
|
{}
|
|
2535
2535
|
), jr = () => {
|
|
2536
|
-
const e = Je(
|
|
2536
|
+
const e = Je(en), [t, n] = Pe(
|
|
2537
2537
|
typeof window < "u" && e.getSnapshot().value === "loggedIn"
|
|
2538
2538
|
);
|
|
2539
|
-
return
|
|
2539
|
+
return Rt(() => {
|
|
2540
2540
|
if (typeof window > "u")
|
|
2541
2541
|
return;
|
|
2542
2542
|
const s = e.subscribe((r) => {
|
|
@@ -2568,12 +2568,12 @@ const St = xe({
|
|
|
2568
2568
|
inspect: t.inspect
|
|
2569
2569
|
}).start();
|
|
2570
2570
|
function Vr({ actor: e, children: t }) {
|
|
2571
|
-
return /* @__PURE__ */ Ge(
|
|
2571
|
+
return /* @__PURE__ */ Ge(en.Provider, { value: e, children: t });
|
|
2572
2572
|
}
|
|
2573
|
-
let
|
|
2574
|
-
const
|
|
2573
|
+
let Ns = (e = 21) => crypto.getRandomValues(new Uint8Array(e)).reduce((t, n) => (n &= 63, n < 36 ? t += n.toString(36) : n < 62 ? t += (n - 26).toString(36).toUpperCase() : n > 62 ? t += "-" : t += "_", t), "");
|
|
2574
|
+
const ks = xe({
|
|
2575
2575
|
actors: {
|
|
2576
|
-
tick:
|
|
2576
|
+
tick: Ts(
|
|
2577
2577
|
({ sendBack: e, input: t }) => {
|
|
2578
2578
|
const n = setInterval(() => {
|
|
2579
2579
|
e({ type: "TICK" });
|
|
@@ -2651,7 +2651,7 @@ const Ns = xe({
|
|
|
2651
2651
|
}
|
|
2652
2652
|
}), Hr = xe({
|
|
2653
2653
|
actors: {
|
|
2654
|
-
timer:
|
|
2654
|
+
timer: ks
|
|
2655
2655
|
},
|
|
2656
2656
|
types: {
|
|
2657
2657
|
context: {},
|
|
@@ -2662,7 +2662,7 @@ const Ns = xe({
|
|
|
2662
2662
|
addItem: C(({ context: e, event: t }) => {
|
|
2663
2663
|
if (t.type !== "ADD_ITEM")
|
|
2664
2664
|
return e;
|
|
2665
|
-
const n = `notification-${
|
|
2665
|
+
const n = `notification-${Ns()}`, s = t.duration ?? e.duration, r = Tn(t.item, {
|
|
2666
2666
|
duration: s,
|
|
2667
2667
|
id: n,
|
|
2668
2668
|
key: t.item.key ?? n,
|
|
@@ -2779,14 +2779,14 @@ const Ns = xe({
|
|
|
2779
2779
|
}
|
|
2780
2780
|
}
|
|
2781
2781
|
}
|
|
2782
|
-
}),
|
|
2782
|
+
}), tn = ze({}), Gr = () => Je(tn);
|
|
2783
2783
|
function zr({
|
|
2784
2784
|
children: e,
|
|
2785
2785
|
actor: t
|
|
2786
2786
|
}) {
|
|
2787
|
-
return /* @__PURE__ */ Ge(
|
|
2787
|
+
return /* @__PURE__ */ Ge(tn.Provider, { value: t, children: e });
|
|
2788
2788
|
}
|
|
2789
|
-
function
|
|
2789
|
+
function Cs({
|
|
2790
2790
|
context: e,
|
|
2791
2791
|
event: t
|
|
2792
2792
|
}) {
|
|
@@ -2798,7 +2798,7 @@ function ks({
|
|
|
2798
2798
|
...n.output.quote
|
|
2799
2799
|
};
|
|
2800
2800
|
}
|
|
2801
|
-
function
|
|
2801
|
+
function Ds({
|
|
2802
2802
|
context: e,
|
|
2803
2803
|
event: t
|
|
2804
2804
|
}) {
|
|
@@ -2807,7 +2807,7 @@ function Cs({
|
|
|
2807
2807
|
const n = t;
|
|
2808
2808
|
return n.output.type !== "REMOVE_ITEMS_SUCCESS" ? e : { ...e.quote, ...n.output.quote };
|
|
2809
2809
|
}
|
|
2810
|
-
function
|
|
2810
|
+
function Rs({
|
|
2811
2811
|
context: e,
|
|
2812
2812
|
event: t
|
|
2813
2813
|
}) {
|
|
@@ -2821,26 +2821,26 @@ function Ds({
|
|
|
2821
2821
|
}
|
|
2822
2822
|
};
|
|
2823
2823
|
}
|
|
2824
|
-
const rt = JSON,
|
|
2824
|
+
const rt = JSON, Ls = (e) => e.toUpperCase(), Ms = (e) => {
|
|
2825
2825
|
const t = {};
|
|
2826
2826
|
return e.forEach((n, s) => {
|
|
2827
2827
|
t[s] = n;
|
|
2828
2828
|
}), t;
|
|
2829
|
-
},
|
|
2829
|
+
}, Ps = (e, t, n) => e.document ? e : {
|
|
2830
2830
|
document: e,
|
|
2831
2831
|
variables: t,
|
|
2832
2832
|
requestHeaders: n,
|
|
2833
2833
|
signal: void 0
|
|
2834
|
-
},
|
|
2834
|
+
}, qs = (e, t, n) => e.query ? e : {
|
|
2835
2835
|
query: e,
|
|
2836
2836
|
variables: t,
|
|
2837
2837
|
requestHeaders: n,
|
|
2838
2838
|
signal: void 0
|
|
2839
|
-
},
|
|
2839
|
+
}, Fs = (e, t) => e.documents ? e : {
|
|
2840
2840
|
documents: e,
|
|
2841
2841
|
requestHeaders: t,
|
|
2842
2842
|
signal: void 0
|
|
2843
|
-
},
|
|
2843
|
+
}, Us = (e, t, ...n) => {
|
|
2844
2844
|
const [s, r] = n;
|
|
2845
2845
|
return e.document ? e : {
|
|
2846
2846
|
url: e,
|
|
@@ -2854,20 +2854,20 @@ function me(e, t) {
|
|
|
2854
2854
|
if (!!!e)
|
|
2855
2855
|
throw new Error(t);
|
|
2856
2856
|
}
|
|
2857
|
-
function
|
|
2857
|
+
function Bs(e) {
|
|
2858
2858
|
return typeof e == "object" && e !== null;
|
|
2859
2859
|
}
|
|
2860
|
-
function
|
|
2860
|
+
function js(e, t) {
|
|
2861
2861
|
if (!!!e)
|
|
2862
2862
|
throw new Error(
|
|
2863
2863
|
t ?? "Unexpected invariant triggered."
|
|
2864
2864
|
);
|
|
2865
2865
|
}
|
|
2866
|
-
const
|
|
2866
|
+
const $s = /\r\n|[\n\r]/g;
|
|
2867
2867
|
function je(e, t) {
|
|
2868
2868
|
let n = 0, s = 1;
|
|
2869
|
-
for (const r of e.body.matchAll(
|
|
2870
|
-
if (typeof r.index == "number" ||
|
|
2869
|
+
for (const r of e.body.matchAll($s)) {
|
|
2870
|
+
if (typeof r.index == "number" || js(!1), r.index >= t)
|
|
2871
2871
|
break;
|
|
2872
2872
|
n = r.index + r[0].length, s += 1;
|
|
2873
2873
|
}
|
|
@@ -2876,13 +2876,13 @@ function je(e, t) {
|
|
|
2876
2876
|
column: t + 1 - n
|
|
2877
2877
|
};
|
|
2878
2878
|
}
|
|
2879
|
-
function
|
|
2880
|
-
return
|
|
2879
|
+
function Vs(e) {
|
|
2880
|
+
return nn(
|
|
2881
2881
|
e.source,
|
|
2882
2882
|
je(e.source, e.start)
|
|
2883
2883
|
);
|
|
2884
2884
|
}
|
|
2885
|
-
function
|
|
2885
|
+
function nn(e, t) {
|
|
2886
2886
|
const n = e.locationOffset.column - 1, s = "".padStart(n) + e.body, r = t.line - 1, i = e.locationOffset.line - 1, o = t.line + i, a = t.line === 1 ? n : 0, c = t.column + a, u = `${e.name}:${o}:${c}
|
|
2887
2887
|
`, f = s.split(/\r\n|[\n\r]/g), d = f[r];
|
|
2888
2888
|
if (d.length > 120) {
|
|
@@ -2909,7 +2909,7 @@ function xt(e) {
|
|
|
2909
2909
|
return t.map(([s, r]) => s.padStart(n) + (r ? " " + r : "")).join(`
|
|
2910
2910
|
`);
|
|
2911
2911
|
}
|
|
2912
|
-
function
|
|
2912
|
+
function Hs(e) {
|
|
2913
2913
|
const t = e[0];
|
|
2914
2914
|
return t == null || "kind" in t || "length" in t ? {
|
|
2915
2915
|
nodes: t,
|
|
@@ -2961,7 +2961,7 @@ class it extends Error {
|
|
|
2961
2961
|
*/
|
|
2962
2962
|
constructor(t, ...n) {
|
|
2963
2963
|
var s, r, i;
|
|
2964
|
-
const { nodes: o, source: a, positions: c, path: u, originalError: f, extensions: d } =
|
|
2964
|
+
const { nodes: o, source: a, positions: c, path: u, originalError: f, extensions: d } = Hs(n);
|
|
2965
2965
|
super(t), this.name = "GraphQLError", this.path = u ?? void 0, this.originalError = f ?? void 0, this.nodes = At(
|
|
2966
2966
|
Array.isArray(o) ? o : o ? [o] : void 0
|
|
2967
2967
|
);
|
|
@@ -2969,7 +2969,7 @@ class it extends Error {
|
|
|
2969
2969
|
(s = this.nodes) === null || s === void 0 ? void 0 : s.map((y) => y.loc).filter((y) => y != null)
|
|
2970
2970
|
);
|
|
2971
2971
|
this.source = a ?? (h == null || (r = h[0]) === null || r === void 0 ? void 0 : r.source), this.positions = c ?? (h == null ? void 0 : h.map((y) => y.start)), this.locations = c && a ? c.map((y) => je(a, y)) : h == null ? void 0 : h.map((y) => je(y.source, y.start));
|
|
2972
|
-
const m =
|
|
2972
|
+
const m = Bs(
|
|
2973
2973
|
f == null ? void 0 : f.extensions
|
|
2974
2974
|
) ? f == null ? void 0 : f.extensions : void 0;
|
|
2975
2975
|
this.extensions = (i = d ?? m) !== null && i !== void 0 ? i : /* @__PURE__ */ Object.create(null), Object.defineProperties(this, {
|
|
@@ -3011,12 +3011,12 @@ class it extends Error {
|
|
|
3011
3011
|
for (const n of this.nodes)
|
|
3012
3012
|
n.loc && (t += `
|
|
3013
3013
|
|
|
3014
|
-
` +
|
|
3014
|
+
` + Vs(n.loc));
|
|
3015
3015
|
else if (this.source && this.locations)
|
|
3016
3016
|
for (const n of this.locations)
|
|
3017
3017
|
t += `
|
|
3018
3018
|
|
|
3019
|
-
` +
|
|
3019
|
+
` + nn(this.source, n);
|
|
3020
3020
|
return t;
|
|
3021
3021
|
}
|
|
3022
3022
|
toJSON() {
|
|
@@ -3035,7 +3035,7 @@ function b(e, t, n) {
|
|
|
3035
3035
|
positions: [t]
|
|
3036
3036
|
});
|
|
3037
3037
|
}
|
|
3038
|
-
class
|
|
3038
|
+
class Gs {
|
|
3039
3039
|
/**
|
|
3040
3040
|
* The character offset at which this Node begins.
|
|
3041
3041
|
*/
|
|
@@ -3064,7 +3064,7 @@ class Hs {
|
|
|
3064
3064
|
};
|
|
3065
3065
|
}
|
|
3066
3066
|
}
|
|
3067
|
-
class
|
|
3067
|
+
class sn {
|
|
3068
3068
|
/**
|
|
3069
3069
|
* The kind of Token.
|
|
3070
3070
|
*/
|
|
@@ -3106,7 +3106,7 @@ class nn {
|
|
|
3106
3106
|
};
|
|
3107
3107
|
}
|
|
3108
3108
|
}
|
|
3109
|
-
const
|
|
3109
|
+
const rn = {
|
|
3110
3110
|
Name: [],
|
|
3111
3111
|
Document: ["definitions"],
|
|
3112
3112
|
OperationDefinition: [
|
|
@@ -3180,10 +3180,10 @@ const sn = {
|
|
|
3180
3180
|
UnionTypeExtension: ["name", "directives", "types"],
|
|
3181
3181
|
EnumTypeExtension: ["name", "directives", "values"],
|
|
3182
3182
|
InputObjectTypeExtension: ["name", "directives", "fields"]
|
|
3183
|
-
},
|
|
3183
|
+
}, zs = new Set(Object.keys(rn));
|
|
3184
3184
|
function wt(e) {
|
|
3185
3185
|
const t = e == null ? void 0 : e.kind;
|
|
3186
|
-
return typeof t == "string" &&
|
|
3186
|
+
return typeof t == "string" && zs.has(t);
|
|
3187
3187
|
}
|
|
3188
3188
|
var W;
|
|
3189
3189
|
(function(e) {
|
|
@@ -3203,22 +3203,22 @@ function Ve(e) {
|
|
|
3203
3203
|
function ce(e) {
|
|
3204
3204
|
return e >= 48 && e <= 57;
|
|
3205
3205
|
}
|
|
3206
|
-
function
|
|
3206
|
+
function on(e) {
|
|
3207
3207
|
return e >= 97 && e <= 122 || // A-Z
|
|
3208
3208
|
e >= 65 && e <= 90;
|
|
3209
3209
|
}
|
|
3210
|
-
function
|
|
3211
|
-
return
|
|
3212
|
-
}
|
|
3213
|
-
function zs(e) {
|
|
3214
|
-
return rn(e) || ce(e) || e === 95;
|
|
3210
|
+
function an(e) {
|
|
3211
|
+
return on(e) || e === 95;
|
|
3215
3212
|
}
|
|
3216
3213
|
function Js(e) {
|
|
3214
|
+
return on(e) || ce(e) || e === 95;
|
|
3215
|
+
}
|
|
3216
|
+
function Ys(e) {
|
|
3217
3217
|
var t;
|
|
3218
3218
|
let n = Number.MAX_SAFE_INTEGER, s = null, r = -1;
|
|
3219
3219
|
for (let o = 0; o < e.length; ++o) {
|
|
3220
3220
|
var i;
|
|
3221
|
-
const a = e[o], c =
|
|
3221
|
+
const a = e[o], c = Xs(a);
|
|
3222
3222
|
c !== a.length && (s = (i = s) !== null && i !== void 0 ? i : o, r = o, o !== 0 && c < n && (n = c));
|
|
3223
3223
|
}
|
|
3224
3224
|
return e.map((o, a) => a === 0 ? o : o.slice(n)).slice(
|
|
@@ -3226,13 +3226,13 @@ function Js(e) {
|
|
|
3226
3226
|
r + 1
|
|
3227
3227
|
);
|
|
3228
3228
|
}
|
|
3229
|
-
function
|
|
3229
|
+
function Xs(e) {
|
|
3230
3230
|
let t = 0;
|
|
3231
3231
|
for (; t < e.length && Ve(e.charCodeAt(t)); )
|
|
3232
3232
|
++t;
|
|
3233
3233
|
return t;
|
|
3234
3234
|
}
|
|
3235
|
-
function
|
|
3235
|
+
function Qs(e, t) {
|
|
3236
3236
|
const n = e.replace(/"""/g, '\\"""'), s = n.split(/\r\n|[\n\r]/g), r = s.length === 1, i = s.length > 1 && s.slice(1).every((m) => m.length === 0 || Ve(m.charCodeAt(0))), o = n.endsWith('\\"""'), a = e.endsWith('"') && !o, c = e.endsWith("\\"), u = a || c, f = !(t != null && t.minimize) && // add leading and trailing new lines only if it improves readability
|
|
3237
3237
|
(!r || e.length > 70 || u || i || o);
|
|
3238
3238
|
let d = "";
|
|
@@ -3245,7 +3245,7 @@ var p;
|
|
|
3245
3245
|
(function(e) {
|
|
3246
3246
|
e.SOF = "<SOF>", e.EOF = "<EOF>", e.BANG = "!", e.DOLLAR = "$", e.AMP = "&", e.PAREN_L = "(", e.PAREN_R = ")", e.SPREAD = "...", e.COLON = ":", e.EQUALS = "=", e.AT = "@", e.BRACKET_L = "[", e.BRACKET_R = "]", e.BRACE_L = "{", e.PIPE = "|", e.BRACE_R = "}", e.NAME = "Name", e.INT = "Int", e.FLOAT = "Float", e.STRING = "String", e.BLOCK_STRING = "BlockString", e.COMMENT = "Comment";
|
|
3247
3247
|
})(p || (p = {}));
|
|
3248
|
-
class
|
|
3248
|
+
class Ws {
|
|
3249
3249
|
/**
|
|
3250
3250
|
* The previously focused non-ignored token.
|
|
3251
3251
|
*/
|
|
@@ -3259,7 +3259,7 @@ class Qs {
|
|
|
3259
3259
|
* The character offset at which the current line begins.
|
|
3260
3260
|
*/
|
|
3261
3261
|
constructor(t) {
|
|
3262
|
-
const n = new
|
|
3262
|
+
const n = new sn(p.SOF, 0, 0, 0, 0);
|
|
3263
3263
|
this.source = t, this.lastToken = n, this.token = n, this.line = 1, this.lineStart = 0;
|
|
3264
3264
|
}
|
|
3265
3265
|
get [Symbol.toStringTag]() {
|
|
@@ -3282,26 +3282,26 @@ class Qs {
|
|
|
3282
3282
|
if (t.next)
|
|
3283
3283
|
t = t.next;
|
|
3284
3284
|
else {
|
|
3285
|
-
const n =
|
|
3285
|
+
const n = Zs(this, t.end);
|
|
3286
3286
|
t.next = n, n.prev = t, t = n;
|
|
3287
3287
|
}
|
|
3288
3288
|
while (t.kind === p.COMMENT);
|
|
3289
3289
|
return t;
|
|
3290
3290
|
}
|
|
3291
3291
|
}
|
|
3292
|
-
function
|
|
3292
|
+
function Ks(e) {
|
|
3293
3293
|
return e === p.BANG || e === p.DOLLAR || e === p.AMP || e === p.PAREN_L || e === p.PAREN_R || e === p.SPREAD || e === p.COLON || e === p.EQUALS || e === p.AT || e === p.BRACKET_L || e === p.BRACKET_R || e === p.BRACE_L || e === p.PIPE || e === p.BRACE_R;
|
|
3294
3294
|
}
|
|
3295
3295
|
function ne(e) {
|
|
3296
3296
|
return e >= 0 && e <= 55295 || e >= 57344 && e <= 1114111;
|
|
3297
3297
|
}
|
|
3298
3298
|
function Ae(e, t) {
|
|
3299
|
-
return
|
|
3299
|
+
return cn(e.charCodeAt(t)) && un(e.charCodeAt(t + 1));
|
|
3300
3300
|
}
|
|
3301
|
-
function
|
|
3301
|
+
function cn(e) {
|
|
3302
3302
|
return e >= 55296 && e <= 56319;
|
|
3303
3303
|
}
|
|
3304
|
-
function
|
|
3304
|
+
function un(e) {
|
|
3305
3305
|
return e >= 56320 && e <= 57343;
|
|
3306
3306
|
}
|
|
3307
3307
|
function G(e, t) {
|
|
@@ -3316,9 +3316,9 @@ function G(e, t) {
|
|
|
3316
3316
|
}
|
|
3317
3317
|
function w(e, t, n, s, r) {
|
|
3318
3318
|
const i = e.line, o = 1 + n - e.lineStart;
|
|
3319
|
-
return new
|
|
3319
|
+
return new sn(t, n, s, i, o, r);
|
|
3320
3320
|
}
|
|
3321
|
-
function
|
|
3321
|
+
function Zs(e, t) {
|
|
3322
3322
|
const n = e.source.body, s = n.length;
|
|
3323
3323
|
let r = t;
|
|
3324
3324
|
for (; r < s; ) {
|
|
@@ -3337,7 +3337,7 @@ function Ks(e, t) {
|
|
|
3337
3337
|
n.charCodeAt(r + 1) === 10 ? r += 2 : ++r, ++e.line, e.lineStart = r;
|
|
3338
3338
|
continue;
|
|
3339
3339
|
case 35:
|
|
3340
|
-
return
|
|
3340
|
+
return er(e, r);
|
|
3341
3341
|
case 33:
|
|
3342
3342
|
return w(e, p.BANG, r, r + 1);
|
|
3343
3343
|
case 36:
|
|
@@ -3369,12 +3369,12 @@ function Ks(e, t) {
|
|
|
3369
3369
|
case 125:
|
|
3370
3370
|
return w(e, p.BRACE_R, r, r + 1);
|
|
3371
3371
|
case 34:
|
|
3372
|
-
return n.charCodeAt(r + 1) === 34 && n.charCodeAt(r + 2) === 34 ?
|
|
3372
|
+
return n.charCodeAt(r + 1) === 34 && n.charCodeAt(r + 2) === 34 ? or(e, r) : nr(e, r);
|
|
3373
3373
|
}
|
|
3374
3374
|
if (ce(i) || i === 45)
|
|
3375
|
-
return
|
|
3376
|
-
if (
|
|
3377
|
-
return
|
|
3375
|
+
return tr(e, r, i);
|
|
3376
|
+
if (an(i))
|
|
3377
|
+
return ar(e, r);
|
|
3378
3378
|
throw b(
|
|
3379
3379
|
e.source,
|
|
3380
3380
|
r,
|
|
@@ -3383,7 +3383,7 @@ function Ks(e, t) {
|
|
|
3383
3383
|
}
|
|
3384
3384
|
return w(e, p.EOF, s, s);
|
|
3385
3385
|
}
|
|
3386
|
-
function
|
|
3386
|
+
function er(e, t) {
|
|
3387
3387
|
const n = e.source.body, s = n.length;
|
|
3388
3388
|
let r = t + 1;
|
|
3389
3389
|
for (; r < s; ) {
|
|
@@ -3405,7 +3405,7 @@ function Zs(e, t) {
|
|
|
3405
3405
|
n.slice(t + 1, r)
|
|
3406
3406
|
);
|
|
3407
3407
|
}
|
|
3408
|
-
function
|
|
3408
|
+
function tr(e, t, n) {
|
|
3409
3409
|
const s = e.source.body;
|
|
3410
3410
|
let r = t, i = n, o = !1;
|
|
3411
3411
|
if (i === 45 && (i = s.charCodeAt(++r)), i === 48) {
|
|
@@ -3420,7 +3420,7 @@ function er(e, t, n) {
|
|
|
3420
3420
|
);
|
|
3421
3421
|
} else
|
|
3422
3422
|
r = De(e, r, i), i = s.charCodeAt(r);
|
|
3423
|
-
if (i === 46 && (o = !0, i = s.charCodeAt(++r), r = De(e, r, i), i = s.charCodeAt(r)), (i === 69 || i === 101) && (o = !0, i = s.charCodeAt(++r), (i === 43 || i === 45) && (i = s.charCodeAt(++r)), r = De(e, r, i), i = s.charCodeAt(r)), i === 46 ||
|
|
3423
|
+
if (i === 46 && (o = !0, i = s.charCodeAt(++r), r = De(e, r, i), i = s.charCodeAt(r)), (i === 69 || i === 101) && (o = !0, i = s.charCodeAt(++r), (i === 43 || i === 45) && (i = s.charCodeAt(++r)), r = De(e, r, i), i = s.charCodeAt(r)), i === 46 || an(i))
|
|
3424
3424
|
throw b(
|
|
3425
3425
|
e.source,
|
|
3426
3426
|
r,
|
|
@@ -3453,7 +3453,7 @@ function De(e, t, n) {
|
|
|
3453
3453
|
++r;
|
|
3454
3454
|
return r;
|
|
3455
3455
|
}
|
|
3456
|
-
function
|
|
3456
|
+
function nr(e, t) {
|
|
3457
3457
|
const n = e.source.body, s = n.length;
|
|
3458
3458
|
let r = t + 1, i = r, o = "";
|
|
3459
3459
|
for (; r < s; ) {
|
|
@@ -3462,7 +3462,7 @@ function tr(e, t) {
|
|
|
3462
3462
|
return o += n.slice(i, r), w(e, p.STRING, t, r + 1, o);
|
|
3463
3463
|
if (a === 92) {
|
|
3464
3464
|
o += n.slice(i, r);
|
|
3465
|
-
const c = n.charCodeAt(r + 1) === 117 ? n.charCodeAt(r + 2) === 123 ?
|
|
3465
|
+
const c = n.charCodeAt(r + 1) === 117 ? n.charCodeAt(r + 2) === 123 ? sr(e, r) : rr(e, r) : ir(e, r);
|
|
3466
3466
|
o += c.value, r += c.size, i = r;
|
|
3467
3467
|
continue;
|
|
3468
3468
|
}
|
|
@@ -3484,7 +3484,7 @@ function tr(e, t) {
|
|
|
3484
3484
|
}
|
|
3485
3485
|
throw b(e.source, r, "Unterminated string.");
|
|
3486
3486
|
}
|
|
3487
|
-
function
|
|
3487
|
+
function sr(e, t) {
|
|
3488
3488
|
const n = e.source.body;
|
|
3489
3489
|
let s = 0, r = 3;
|
|
3490
3490
|
for (; r < 12; ) {
|
|
@@ -3509,16 +3509,16 @@ function nr(e, t) {
|
|
|
3509
3509
|
)}".`
|
|
3510
3510
|
);
|
|
3511
3511
|
}
|
|
3512
|
-
function
|
|
3512
|
+
function rr(e, t) {
|
|
3513
3513
|
const n = e.source.body, s = bt(n, t + 2);
|
|
3514
3514
|
if (ne(s))
|
|
3515
3515
|
return {
|
|
3516
3516
|
value: String.fromCodePoint(s),
|
|
3517
3517
|
size: 6
|
|
3518
3518
|
};
|
|
3519
|
-
if (
|
|
3519
|
+
if (cn(s) && n.charCodeAt(t + 6) === 92 && n.charCodeAt(t + 7) === 117) {
|
|
3520
3520
|
const r = bt(n, t + 8);
|
|
3521
|
-
if (
|
|
3521
|
+
if (un(r))
|
|
3522
3522
|
return {
|
|
3523
3523
|
value: String.fromCodePoint(s, r),
|
|
3524
3524
|
size: 12
|
|
@@ -3536,7 +3536,7 @@ function bt(e, t) {
|
|
|
3536
3536
|
function ie(e) {
|
|
3537
3537
|
return e >= 48 && e <= 57 ? e - 48 : e >= 65 && e <= 70 ? e - 55 : e >= 97 && e <= 102 ? e - 87 : -1;
|
|
3538
3538
|
}
|
|
3539
|
-
function
|
|
3539
|
+
function ir(e, t) {
|
|
3540
3540
|
const n = e.source.body;
|
|
3541
3541
|
switch (n.charCodeAt(t + 1)) {
|
|
3542
3542
|
case 34:
|
|
@@ -3590,7 +3590,7 @@ function rr(e, t) {
|
|
|
3590
3590
|
)}".`
|
|
3591
3591
|
);
|
|
3592
3592
|
}
|
|
3593
|
-
function
|
|
3593
|
+
function or(e, t) {
|
|
3594
3594
|
const n = e.source.body, s = n.length;
|
|
3595
3595
|
let r = e.lineStart, i = t + 3, o = i, a = "";
|
|
3596
3596
|
const c = [];
|
|
@@ -3604,7 +3604,7 @@ function ir(e, t) {
|
|
|
3604
3604
|
t,
|
|
3605
3605
|
i + 3,
|
|
3606
3606
|
// Return a string of the lines joined with U+000A.
|
|
3607
|
-
|
|
3607
|
+
Ys(c).join(`
|
|
3608
3608
|
`)
|
|
3609
3609
|
);
|
|
3610
3610
|
return e.line += c.length - 1, e.lineStart = r, f;
|
|
@@ -3633,12 +3633,12 @@ function ir(e, t) {
|
|
|
3633
3633
|
}
|
|
3634
3634
|
throw b(e.source, i, "Unterminated string.");
|
|
3635
3635
|
}
|
|
3636
|
-
function
|
|
3636
|
+
function ar(e, t) {
|
|
3637
3637
|
const n = e.source.body, s = n.length;
|
|
3638
3638
|
let r = t + 1;
|
|
3639
3639
|
for (; r < s; ) {
|
|
3640
3640
|
const i = n.charCodeAt(r);
|
|
3641
|
-
if (
|
|
3641
|
+
if (Js(i))
|
|
3642
3642
|
++r;
|
|
3643
3643
|
else
|
|
3644
3644
|
break;
|
|
@@ -3651,7 +3651,7 @@ function or(e, t) {
|
|
|
3651
3651
|
n.slice(t, r)
|
|
3652
3652
|
);
|
|
3653
3653
|
}
|
|
3654
|
-
const
|
|
3654
|
+
const cr = 10, ln = 2;
|
|
3655
3655
|
function ot(e) {
|
|
3656
3656
|
return we(e, []);
|
|
3657
3657
|
}
|
|
@@ -3662,45 +3662,45 @@ function we(e, t) {
|
|
|
3662
3662
|
case "function":
|
|
3663
3663
|
return e.name ? `[function ${e.name}]` : "[function]";
|
|
3664
3664
|
case "object":
|
|
3665
|
-
return
|
|
3665
|
+
return ur(e, t);
|
|
3666
3666
|
default:
|
|
3667
3667
|
return String(e);
|
|
3668
3668
|
}
|
|
3669
3669
|
}
|
|
3670
|
-
function
|
|
3670
|
+
function ur(e, t) {
|
|
3671
3671
|
if (e === null)
|
|
3672
3672
|
return "null";
|
|
3673
3673
|
if (t.includes(e))
|
|
3674
3674
|
return "[Circular]";
|
|
3675
3675
|
const n = [...t, e];
|
|
3676
|
-
if (
|
|
3676
|
+
if (lr(e)) {
|
|
3677
3677
|
const s = e.toJSON();
|
|
3678
3678
|
if (s !== e)
|
|
3679
3679
|
return typeof s == "string" ? s : we(s, n);
|
|
3680
3680
|
} else if (Array.isArray(e))
|
|
3681
|
-
return
|
|
3682
|
-
return
|
|
3681
|
+
return hr(e, n);
|
|
3682
|
+
return dr(e, n);
|
|
3683
3683
|
}
|
|
3684
|
-
function
|
|
3684
|
+
function lr(e) {
|
|
3685
3685
|
return typeof e.toJSON == "function";
|
|
3686
3686
|
}
|
|
3687
|
-
function
|
|
3687
|
+
function dr(e, t) {
|
|
3688
3688
|
const n = Object.entries(e);
|
|
3689
|
-
return n.length === 0 ? "{}" : t.length >
|
|
3689
|
+
return n.length === 0 ? "{}" : t.length > ln ? "[" + fr(e) + "]" : "{ " + n.map(
|
|
3690
3690
|
([r, i]) => r + ": " + we(i, t)
|
|
3691
3691
|
).join(", ") + " }";
|
|
3692
3692
|
}
|
|
3693
|
-
function
|
|
3693
|
+
function hr(e, t) {
|
|
3694
3694
|
if (e.length === 0)
|
|
3695
3695
|
return "[]";
|
|
3696
|
-
if (t.length >
|
|
3696
|
+
if (t.length > ln)
|
|
3697
3697
|
return "[Array]";
|
|
3698
|
-
const n = Math.min(
|
|
3698
|
+
const n = Math.min(cr, e.length), s = e.length - n, r = [];
|
|
3699
3699
|
for (let i = 0; i < n; ++i)
|
|
3700
3700
|
r.push(we(e[i], t));
|
|
3701
3701
|
return s === 1 ? r.push("... 1 more item") : s > 1 && r.push(`... ${s} more items`), "[" + r.join(", ") + "]";
|
|
3702
3702
|
}
|
|
3703
|
-
function
|
|
3703
|
+
function fr(e) {
|
|
3704
3704
|
const t = Object.prototype.toString.call(e).replace(/^\[object /, "").replace(/]$/, "");
|
|
3705
3705
|
if (t === "Object" && typeof e.constructor == "function") {
|
|
3706
3706
|
const n = e.constructor.name;
|
|
@@ -3709,7 +3709,7 @@ function hr(e) {
|
|
|
3709
3709
|
}
|
|
3710
3710
|
return t;
|
|
3711
3711
|
}
|
|
3712
|
-
const
|
|
3712
|
+
const pr = (
|
|
3713
3713
|
/* c8 ignore next 6 */
|
|
3714
3714
|
// FIXME: https://github.com/graphql/graphql-js/issues/2317
|
|
3715
3715
|
globalThis.process && globalThis.process.env.NODE_ENV === "production" ? function(t, n) {
|
|
@@ -3742,7 +3742,7 @@ spurious results.`);
|
|
|
3742
3742
|
return !1;
|
|
3743
3743
|
}
|
|
3744
3744
|
);
|
|
3745
|
-
class
|
|
3745
|
+
class dn {
|
|
3746
3746
|
constructor(t, n = "GraphQL request", s = {
|
|
3747
3747
|
line: 1,
|
|
3748
3748
|
column: 1
|
|
@@ -3759,16 +3759,16 @@ class ln {
|
|
|
3759
3759
|
return "Source";
|
|
3760
3760
|
}
|
|
3761
3761
|
}
|
|
3762
|
-
function
|
|
3763
|
-
return
|
|
3762
|
+
function yr(e) {
|
|
3763
|
+
return pr(e, dn);
|
|
3764
3764
|
}
|
|
3765
|
-
function
|
|
3766
|
-
return new
|
|
3765
|
+
function mr(e, t) {
|
|
3766
|
+
return new gr(e, t).parseDocument();
|
|
3767
3767
|
}
|
|
3768
|
-
class
|
|
3768
|
+
class gr {
|
|
3769
3769
|
constructor(t, n = {}) {
|
|
3770
|
-
const s =
|
|
3771
|
-
this._lexer = new
|
|
3770
|
+
const s = yr(t) ? t : new dn(t);
|
|
3771
|
+
this._lexer = new Ws(s), this._options = n, this._tokenCounter = 0;
|
|
3772
3772
|
}
|
|
3773
3773
|
/**
|
|
3774
3774
|
* Converts a name lex token into a name parse node.
|
|
@@ -4735,7 +4735,7 @@ class mr {
|
|
|
4735
4735
|
* given parsed object.
|
|
4736
4736
|
*/
|
|
4737
4737
|
node(t, n) {
|
|
4738
|
-
return this._options.noLocation !== !0 && (n.loc = new
|
|
4738
|
+
return this._options.noLocation !== !0 && (n.loc = new Gs(
|
|
4739
4739
|
t,
|
|
4740
4740
|
this._lexer.lastToken,
|
|
4741
4741
|
this._lexer.source
|
|
@@ -4758,7 +4758,7 @@ class mr {
|
|
|
4758
4758
|
throw b(
|
|
4759
4759
|
this._lexer.source,
|
|
4760
4760
|
n.start,
|
|
4761
|
-
`Expected ${
|
|
4761
|
+
`Expected ${hn(t)}, found ${pe(n)}.`
|
|
4762
4762
|
);
|
|
4763
4763
|
}
|
|
4764
4764
|
/**
|
|
@@ -4868,19 +4868,19 @@ class mr {
|
|
|
4868
4868
|
}
|
|
4869
4869
|
function pe(e) {
|
|
4870
4870
|
const t = e.value;
|
|
4871
|
-
return
|
|
4871
|
+
return hn(e.kind) + (t != null ? ` "${t}"` : "");
|
|
4872
4872
|
}
|
|
4873
|
-
function
|
|
4874
|
-
return
|
|
4873
|
+
function hn(e) {
|
|
4874
|
+
return Ks(e) ? `"${e}"` : e;
|
|
4875
4875
|
}
|
|
4876
|
-
function
|
|
4877
|
-
return `"${e.replace(
|
|
4876
|
+
function Er(e) {
|
|
4877
|
+
return `"${e.replace(vr, Tr)}"`;
|
|
4878
4878
|
}
|
|
4879
|
-
const
|
|
4880
|
-
function
|
|
4881
|
-
return
|
|
4879
|
+
const vr = /[\x00-\x1f\x22\x5c\x7f-\x9f]/g;
|
|
4880
|
+
function Tr(e) {
|
|
4881
|
+
return _r[e.charCodeAt(0)];
|
|
4882
4882
|
}
|
|
4883
|
-
const
|
|
4883
|
+
const _r = [
|
|
4884
4884
|
"\\u0000",
|
|
4885
4885
|
"\\u0001",
|
|
4886
4886
|
"\\u0002",
|
|
@@ -5046,11 +5046,11 @@ const Tr = [
|
|
|
5046
5046
|
"\\u009D",
|
|
5047
5047
|
"\\u009E",
|
|
5048
5048
|
"\\u009F"
|
|
5049
|
-
],
|
|
5050
|
-
function
|
|
5049
|
+
], Ir = Object.freeze({});
|
|
5050
|
+
function Sr(e, t, n = rn) {
|
|
5051
5051
|
const s = /* @__PURE__ */ new Map();
|
|
5052
5052
|
for (const A of Object.values(T))
|
|
5053
|
-
s.set(A,
|
|
5053
|
+
s.set(A, xr(t, A));
|
|
5054
5054
|
let r, i = Array.isArray(e), o = [e], a = -1, c = [], u = e, f, d;
|
|
5055
5055
|
const h = [], m = [];
|
|
5056
5056
|
do {
|
|
@@ -5084,7 +5084,7 @@ function Ir(e, t, n = sn) {
|
|
|
5084
5084
|
var y, v;
|
|
5085
5085
|
wt(u) || me(!1, `Invalid AST Node: ${ot(u)}.`);
|
|
5086
5086
|
const L = A ? (y = s.get(u.kind)) === null || y === void 0 ? void 0 : y.leave : (v = s.get(u.kind)) === null || v === void 0 ? void 0 : v.enter;
|
|
5087
|
-
if (D = L == null ? void 0 : L.call(t, u, f, d, h, m), D ===
|
|
5087
|
+
if (D = L == null ? void 0 : L.call(t, u, f, d, h, m), D === Ir)
|
|
5088
5088
|
break;
|
|
5089
5089
|
if (D === !1) {
|
|
5090
5090
|
if (!A) {
|
|
@@ -5114,7 +5114,7 @@ function Ir(e, t, n = sn) {
|
|
|
5114
5114
|
} while (r !== void 0);
|
|
5115
5115
|
return c.length !== 0 ? c[c.length - 1][1] : e;
|
|
5116
5116
|
}
|
|
5117
|
-
function
|
|
5117
|
+
function xr(e, t) {
|
|
5118
5118
|
const n = e[t];
|
|
5119
5119
|
return typeof n == "object" ? n : typeof n == "function" ? {
|
|
5120
5120
|
enter: n,
|
|
@@ -5124,10 +5124,10 @@ function Sr(e, t) {
|
|
|
5124
5124
|
leave: e.leave
|
|
5125
5125
|
};
|
|
5126
5126
|
}
|
|
5127
|
-
function
|
|
5128
|
-
return
|
|
5127
|
+
function fn(e) {
|
|
5128
|
+
return Sr(e, wr);
|
|
5129
5129
|
}
|
|
5130
|
-
const
|
|
5130
|
+
const Ar = 80, wr = {
|
|
5131
5131
|
Name: {
|
|
5132
5132
|
leave: (e) => e.value
|
|
5133
5133
|
},
|
|
@@ -5163,7 +5163,7 @@ const xr = 80, Ar = {
|
|
|
5163
5163
|
leave({ alias: e, name: t, arguments: n, directives: s, selectionSet: r }) {
|
|
5164
5164
|
const i = I("", e, ": ") + t;
|
|
5165
5165
|
let o = i + I("(", E(n, ", "), ")");
|
|
5166
|
-
return o.length >
|
|
5166
|
+
return o.length > Ar && (o = i + I(`(
|
|
5167
5167
|
`, ge(E(n, `
|
|
5168
5168
|
`)), `
|
|
5169
5169
|
)`)), E([o, E(s, " "), r], " ");
|
|
@@ -5201,7 +5201,7 @@ const xr = 80, Ar = {
|
|
|
5201
5201
|
leave: ({ value: e }) => e
|
|
5202
5202
|
},
|
|
5203
5203
|
StringValue: {
|
|
5204
|
-
leave: ({ value: e, block: t }) => t ?
|
|
5204
|
+
leave: ({ value: e, block: t }) => t ? Qs(e) : Er(e)
|
|
5205
5205
|
},
|
|
5206
5206
|
BooleanValue: {
|
|
5207
5207
|
leave: ({ value: e }) => e ? "true" : "false"
|
|
@@ -5395,14 +5395,14 @@ const Nt = (e) => {
|
|
|
5395
5395
|
if (typeof e == "string") {
|
|
5396
5396
|
let n;
|
|
5397
5397
|
try {
|
|
5398
|
-
const s =
|
|
5398
|
+
const s = mr(e);
|
|
5399
5399
|
n = Nt(s);
|
|
5400
5400
|
} catch {
|
|
5401
5401
|
}
|
|
5402
5402
|
return { query: e, operationName: n };
|
|
5403
5403
|
}
|
|
5404
5404
|
const t = Nt(e);
|
|
5405
|
-
return { query:
|
|
5405
|
+
return { query: fn(e), operationName: t };
|
|
5406
5406
|
};
|
|
5407
5407
|
class oe extends Error {
|
|
5408
5408
|
constructor(t, n) {
|
|
@@ -5417,13 +5417,13 @@ class oe extends Error {
|
|
|
5417
5417
|
return ((s = (n = t.errors) == null ? void 0 : n[0]) == null ? void 0 : s.message) ?? `GraphQL Error (Code: ${t.status})`;
|
|
5418
5418
|
}
|
|
5419
5419
|
}
|
|
5420
|
-
var
|
|
5421
|
-
function
|
|
5420
|
+
var br = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
5421
|
+
function Or(e) {
|
|
5422
5422
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
5423
5423
|
}
|
|
5424
5424
|
var He = { exports: {} };
|
|
5425
5425
|
(function(e, t) {
|
|
5426
|
-
var n = typeof self < "u" ? self :
|
|
5426
|
+
var n = typeof self < "u" ? self : br, s = function() {
|
|
5427
5427
|
function i() {
|
|
5428
5428
|
this.fetch = !1, this.DOMException = n.DOMException;
|
|
5429
5429
|
}
|
|
@@ -5581,7 +5581,7 @@ var He = { exports: {} };
|
|
|
5581
5581
|
throw new Error("could not read FormData body as text");
|
|
5582
5582
|
return Promise.resolve(this._bodyText);
|
|
5583
5583
|
}, a.formData && (this.formData = function() {
|
|
5584
|
-
return this.text().then(
|
|
5584
|
+
return this.text().then(gn);
|
|
5585
5585
|
}), this.json = function() {
|
|
5586
5586
|
return this.text().then(JSON.parse);
|
|
5587
5587
|
}, this;
|
|
@@ -5607,7 +5607,7 @@ var He = { exports: {} };
|
|
|
5607
5607
|
j.prototype.clone = function() {
|
|
5608
5608
|
return new j(this, { body: this._bodyInit });
|
|
5609
5609
|
};
|
|
5610
|
-
function
|
|
5610
|
+
function gn(l) {
|
|
5611
5611
|
var g = new FormData();
|
|
5612
5612
|
return l.trim().split("&").forEach(function(_) {
|
|
5613
5613
|
if (_) {
|
|
@@ -5616,7 +5616,7 @@ var He = { exports: {} };
|
|
|
5616
5616
|
}
|
|
5617
5617
|
}), g;
|
|
5618
5618
|
}
|
|
5619
|
-
function
|
|
5619
|
+
function En(l) {
|
|
5620
5620
|
var g = new y(), _ = l.replace(/\r?\n[\t ]+/g, " ");
|
|
5621
5621
|
return _.split(/\r?\n/).forEach(function(N) {
|
|
5622
5622
|
var O = N.split(":"), x = O.shift().trim();
|
|
@@ -5641,9 +5641,9 @@ var He = { exports: {} };
|
|
|
5641
5641
|
var l = new P(null, { status: 0, statusText: "" });
|
|
5642
5642
|
return l.type = "error", l;
|
|
5643
5643
|
};
|
|
5644
|
-
var
|
|
5644
|
+
var vn = [301, 302, 303, 307, 308];
|
|
5645
5645
|
P.redirect = function(l, g) {
|
|
5646
|
-
if (
|
|
5646
|
+
if (vn.indexOf(g) === -1)
|
|
5647
5647
|
throw new RangeError("Invalid status code");
|
|
5648
5648
|
return new P(null, { status: g, headers: { location: l } });
|
|
5649
5649
|
}, o.DOMException = i.DOMException;
|
|
@@ -5669,7 +5669,7 @@ var He = { exports: {} };
|
|
|
5669
5669
|
var se = {
|
|
5670
5670
|
status: x.status,
|
|
5671
5671
|
statusText: x.statusText,
|
|
5672
|
-
headers:
|
|
5672
|
+
headers: En(x.getAllResponseHeaders() || "")
|
|
5673
5673
|
};
|
|
5674
5674
|
se.url = "responseURL" in x ? x.responseURL : se.headers.get("X-Request-URL");
|
|
5675
5675
|
var Oe = "response" in x ? x.response : x.responseText;
|
|
@@ -5694,15 +5694,15 @@ var He = { exports: {} };
|
|
|
5694
5694
|
t = r.fetch, t.default = r.fetch, t.fetch = r.fetch, t.Headers = r.Headers, t.Request = r.Request, t.Response = r.Response, e.exports = t;
|
|
5695
5695
|
})(He, He.exports);
|
|
5696
5696
|
var Ie = He.exports;
|
|
5697
|
-
const Ee = /* @__PURE__ */
|
|
5697
|
+
const Ee = /* @__PURE__ */ Or(Ie), Nr = /* @__PURE__ */ _n({
|
|
5698
5698
|
__proto__: null,
|
|
5699
5699
|
default: Ee
|
|
5700
5700
|
}, [Ie]), Y = (e) => {
|
|
5701
5701
|
let t = {};
|
|
5702
|
-
return e && (typeof Headers < "u" && e instanceof Headers ||
|
|
5702
|
+
return e && (typeof Headers < "u" && e instanceof Headers || Nr && Ie.Headers && e instanceof Ie.Headers ? t = Ms(e) : Array.isArray(e) ? e.forEach(([n, s]) => {
|
|
5703
5703
|
n && s !== void 0 && (t[n] = s);
|
|
5704
5704
|
}) : t = e), t;
|
|
5705
|
-
}, kt = (e) => e.replace(/([\s,]|#[^\n\r]+)+/g, " ").trim(),
|
|
5705
|
+
}, kt = (e) => e.replace(/([\s,]|#[^\n\r]+)+/g, " ").trim(), kr = (e) => {
|
|
5706
5706
|
if (!Array.isArray(e.query)) {
|
|
5707
5707
|
const s = e, r = [`query=${encodeURIComponent(kt(s.query))}`];
|
|
5708
5708
|
return e.variables && r.push(`variables=${encodeURIComponent(s.jsonSerializer.stringify(s.variables))}`), s.operationName && r.push(`operationName=${encodeURIComponent(s.operationName)}`), r.join("&");
|
|
@@ -5714,10 +5714,10 @@ const Ee = /* @__PURE__ */ br(Ie), Or = /* @__PURE__ */ Tn({
|
|
|
5714
5714
|
variables: t.variables ? t.jsonSerializer.stringify(t.variables[i]) : void 0
|
|
5715
5715
|
}), s), []);
|
|
5716
5716
|
return `query=${encodeURIComponent(t.jsonSerializer.stringify(n))}`;
|
|
5717
|
-
},
|
|
5717
|
+
}, Cr = (e) => async (t) => {
|
|
5718
5718
|
const { url: n, query: s, variables: r, operationName: i, fetch: o, fetchOptions: a, middleware: c } = t, u = { ...t.headers };
|
|
5719
5719
|
let f = "", d;
|
|
5720
|
-
e === "POST" ? (d =
|
|
5720
|
+
e === "POST" ? (d = Dr(s, r, i, a.jsonSerializer), typeof d == "string" && (u["Content-Type"] = "application/json")) : f = kr({
|
|
5721
5721
|
query: s,
|
|
5722
5722
|
variables: r,
|
|
5723
5723
|
operationName: i,
|
|
@@ -5736,10 +5736,10 @@ const Ee = /* @__PURE__ */ br(Ie), Or = /* @__PURE__ */ Tn({
|
|
|
5736
5736
|
}
|
|
5737
5737
|
return f && (m = `${m}?${f}`), await o(m, y);
|
|
5738
5738
|
};
|
|
5739
|
-
class
|
|
5739
|
+
class pn {
|
|
5740
5740
|
constructor(t, n = {}) {
|
|
5741
5741
|
this.url = t, this.requestConfig = n, this.rawRequest = async (...s) => {
|
|
5742
|
-
const [r, i, o] = s, a =
|
|
5742
|
+
const [r, i, o] = s, a = qs(r, i, o), { headers: c, fetch: u = Ee, method: f = "POST", requestMiddleware: d, responseMiddleware: h, ...m } = this.requestConfig, { url: y } = this;
|
|
5743
5743
|
a.signal !== void 0 && (m.signal = a.signal);
|
|
5744
5744
|
const { operationName: v } = Re(a.query);
|
|
5745
5745
|
return Le({
|
|
@@ -5761,7 +5761,7 @@ class fn {
|
|
|
5761
5761
|
};
|
|
5762
5762
|
}
|
|
5763
5763
|
async request(t, ...n) {
|
|
5764
|
-
const [s, r] = n, i =
|
|
5764
|
+
const [s, r] = n, i = Ps(t, s, r), { headers: o, fetch: a = Ee, method: c = "POST", requestMiddleware: u, responseMiddleware: f, ...d } = this.requestConfig, { url: h } = this;
|
|
5765
5765
|
i.signal !== void 0 && (d.signal = i.signal);
|
|
5766
5766
|
const { query: m, operationName: y } = Re(i.document);
|
|
5767
5767
|
return Le({
|
|
@@ -5783,7 +5783,7 @@ class fn {
|
|
|
5783
5783
|
}
|
|
5784
5784
|
// prettier-ignore
|
|
5785
5785
|
batchRequests(t, n) {
|
|
5786
|
-
const s =
|
|
5786
|
+
const s = Fs(t, n), { headers: r, ...i } = this.requestConfig;
|
|
5787
5787
|
s.signal !== void 0 && (i.signal = s.signal);
|
|
5788
5788
|
const o = s.documents.map(({ document: c }) => Re(c).query), a = s.documents.map(({ variables: c }) => c);
|
|
5789
5789
|
return Le({
|
|
@@ -5822,7 +5822,7 @@ class fn {
|
|
|
5822
5822
|
}
|
|
5823
5823
|
}
|
|
5824
5824
|
const Le = async (e) => {
|
|
5825
|
-
const { query: t, variables: n, fetchOptions: s } = e, r =
|
|
5825
|
+
const { query: t, variables: n, fetchOptions: s } = e, r = Cr(Ls(e.method ?? "post")), i = Array.isArray(e.query), o = await r(e), a = await Rr(o, s.jsonSerializer ?? rt), c = Array.isArray(a) ? !a.some(({ data: f }) => !f) : !!a.data, u = Array.isArray(a) || !a.errors || Array.isArray(a.errors) && !a.errors.length || s.errorPolicy === "all" || s.errorPolicy === "ignore";
|
|
5826
5826
|
if (o.ok && u && c) {
|
|
5827
5827
|
const { errors: f, ...d } = (Array.isArray(a), a), h = s.errorPolicy === "ignore" ? d : a;
|
|
5828
5828
|
return {
|
|
@@ -5841,13 +5841,13 @@ const Le = async (e) => {
|
|
|
5841
5841
|
);
|
|
5842
5842
|
}
|
|
5843
5843
|
};
|
|
5844
|
-
async function
|
|
5845
|
-
const s =
|
|
5846
|
-
return new
|
|
5844
|
+
async function yn(e, t, ...n) {
|
|
5845
|
+
const s = Us(e, t, ...n);
|
|
5846
|
+
return new pn(s.url).request({
|
|
5847
5847
|
...s
|
|
5848
5848
|
});
|
|
5849
5849
|
}
|
|
5850
|
-
const
|
|
5850
|
+
const Dr = (e, t, n, s) => {
|
|
5851
5851
|
const r = s ?? rt;
|
|
5852
5852
|
if (!Array.isArray(e))
|
|
5853
5853
|
return r.stringify({ query: e, variables: t, operationName: n });
|
|
@@ -5855,12 +5855,12 @@ const Cr = (e, t, n, s) => {
|
|
|
5855
5855
|
throw new Error("Cannot create request body with given variable type, array expected");
|
|
5856
5856
|
const i = e.reduce((o, a, c) => (o.push({ query: a, variables: t ? t[c] : void 0 }), o), []);
|
|
5857
5857
|
return r.stringify(i);
|
|
5858
|
-
},
|
|
5858
|
+
}, Rr = async (e, t) => {
|
|
5859
5859
|
let n;
|
|
5860
5860
|
return e.headers.forEach((s, r) => {
|
|
5861
5861
|
r.toLowerCase() === "content-type" && (n = s);
|
|
5862
5862
|
}), n && (n.toLowerCase().startsWith("application/json") || n.toLowerCase().startsWith("application/graphql+json") || n.toLowerCase().startsWith("application/graphql-response+json")) ? t.parse(await e.text()) : e.text();
|
|
5863
|
-
}, Me = (e) => typeof e == "function" ? e() : e,
|
|
5863
|
+
}, Me = (e) => typeof e == "function" ? e() : e, Lr = K(
|
|
5864
5864
|
async ({ input: e }) => {
|
|
5865
5865
|
var t;
|
|
5866
5866
|
if (!e.endpoint || e.endpoint === "")
|
|
@@ -5872,7 +5872,7 @@ const Cr = (e, t, n, s) => {
|
|
|
5872
5872
|
if (!e.requestHeaders)
|
|
5873
5873
|
throw new Error("No request headers provided.");
|
|
5874
5874
|
try {
|
|
5875
|
-
const n = await
|
|
5875
|
+
const n = await yn(
|
|
5876
5876
|
e.endpoint,
|
|
5877
5877
|
e.document,
|
|
5878
5878
|
{ items: e.items },
|
|
@@ -5885,14 +5885,14 @@ const Cr = (e, t, n, s) => {
|
|
|
5885
5885
|
throw new Error("Request to add item(s) failed.");
|
|
5886
5886
|
}
|
|
5887
5887
|
}
|
|
5888
|
-
),
|
|
5888
|
+
), Mr = K(async ({ input: e }) => {
|
|
5889
5889
|
var t;
|
|
5890
5890
|
if (!e.endpoint || e.endpoint === "")
|
|
5891
5891
|
throw new Error("No endpoint provided.");
|
|
5892
5892
|
if (e.items.length < 1)
|
|
5893
5893
|
throw new Error("No items provided.");
|
|
5894
5894
|
try {
|
|
5895
|
-
const n = await
|
|
5895
|
+
const n = await yn(
|
|
5896
5896
|
e.endpoint,
|
|
5897
5897
|
""
|
|
5898
5898
|
// input.document,
|
|
@@ -5908,7 +5908,7 @@ const Cr = (e, t, n, s) => {
|
|
|
5908
5908
|
} catch {
|
|
5909
5909
|
throw new Error("Request to remove item(s) failed.");
|
|
5910
5910
|
}
|
|
5911
|
-
}),
|
|
5911
|
+
}), Ct = typeof window > "u", Pr = K(
|
|
5912
5912
|
async ({ input: e }) => {
|
|
5913
5913
|
var n, s, r, i;
|
|
5914
5914
|
if (!e.endpoint)
|
|
@@ -5921,12 +5921,12 @@ const Cr = (e, t, n, s) => {
|
|
|
5921
5921
|
throw console.log("no request document"), new Error("No request document provided.");
|
|
5922
5922
|
if (!e.requestHeaders)
|
|
5923
5923
|
throw console.log("no headers"), new Error("No request headers provided.");
|
|
5924
|
-
const t = new
|
|
5925
|
-
|
|
5926
|
-
{
|
|
5924
|
+
const t = new pn(
|
|
5925
|
+
Ct ? e.endpointSsr : e.endpoint,
|
|
5926
|
+
Ct ? { method: "POST" } : {
|
|
5927
5927
|
credentials: "include",
|
|
5928
|
-
|
|
5929
|
-
|
|
5928
|
+
method: "POST",
|
|
5929
|
+
mode: "cors"
|
|
5930
5930
|
}
|
|
5931
5931
|
);
|
|
5932
5932
|
console.log("input", e), console.log(
|
|
@@ -5935,7 +5935,7 @@ const Cr = (e, t, n, s) => {
|
|
|
5935
5935
|
);
|
|
5936
5936
|
try {
|
|
5937
5937
|
const { data: o, headers: a, status: c, errors: u, extensions: f } = await t.rawRequest(
|
|
5938
|
-
|
|
5938
|
+
fn(e.document),
|
|
5939
5939
|
{},
|
|
5940
5940
|
typeof window > "u" ? {
|
|
5941
5941
|
...e.requestHeaders,
|
|
@@ -5954,20 +5954,20 @@ const Cr = (e, t, n, s) => {
|
|
|
5954
5954
|
throw console.log("refresh error", o), new Error("Request to add item(s) failed.");
|
|
5955
5955
|
}
|
|
5956
5956
|
}
|
|
5957
|
-
), qr = ({ context: e }) => typeof window > "u" && e.quote.id !== "" || typeof window < "u", Fr = ({ context: e }) => !!e.quote.items && e.quote.items.length > 0,
|
|
5957
|
+
), qr = ({ context: e }) => typeof window > "u" && e.quote.id !== "" || typeof window < "u", Fr = ({ context: e }) => !!e.quote.items && e.quote.items.length > 0, Dt = xe({
|
|
5958
5958
|
types: {
|
|
5959
5959
|
context: {},
|
|
5960
5960
|
events: {},
|
|
5961
5961
|
input: {}
|
|
5962
5962
|
},
|
|
5963
5963
|
actions: {
|
|
5964
|
-
addItems: C(
|
|
5965
|
-
removeItems: C(
|
|
5966
|
-
refresh: C(
|
|
5964
|
+
addItems: C(Cs),
|
|
5965
|
+
removeItems: C(Ds),
|
|
5966
|
+
refresh: C(Rs)
|
|
5967
5967
|
},
|
|
5968
5968
|
actors: {
|
|
5969
|
-
addItems:
|
|
5970
|
-
removeItems:
|
|
5969
|
+
addItems: Lr,
|
|
5970
|
+
removeItems: Mr,
|
|
5971
5971
|
refresh: Pr
|
|
5972
5972
|
},
|
|
5973
5973
|
guards: {
|
|
@@ -6235,16 +6235,16 @@ const Cr = (e, t, n, s) => {
|
|
|
6235
6235
|
// removingGiftCard: {},
|
|
6236
6236
|
// applyingSettings: {},
|
|
6237
6237
|
}
|
|
6238
|
-
}),
|
|
6238
|
+
}), mn = ze(
|
|
6239
6239
|
{}
|
|
6240
6240
|
), Jr = () => {
|
|
6241
6241
|
var i;
|
|
6242
|
-
const e = Je(
|
|
6242
|
+
const e = Je(mn), [t, n] = Pe(
|
|
6243
6243
|
e.getSnapshot().context.quote.items ?? []
|
|
6244
6244
|
), [s, r] = Pe(
|
|
6245
6245
|
((i = e.getSnapshot().context.quote.items) == null ? void 0 : i.length) ?? 0
|
|
6246
6246
|
);
|
|
6247
|
-
return
|
|
6247
|
+
return Rt(() => {
|
|
6248
6248
|
const o = e.getSnapshot().context.quote.items ?? [];
|
|
6249
6249
|
n(o), r(o.length);
|
|
6250
6250
|
}, [e]), { quoteActor: e, items: t, itemsCount: s };
|
|
@@ -6255,14 +6255,14 @@ const Cr = (e, t, n, s) => {
|
|
|
6255
6255
|
graphql: {}
|
|
6256
6256
|
}) => typeof window < "u" ? (console.warn(
|
|
6257
6257
|
"App.getInitialProps::getAuth should not be run on the frontend. You are probably missing getServerSideProps in your page."
|
|
6258
|
-
), U(
|
|
6258
|
+
), U(Dt, {
|
|
6259
6259
|
inspect: e.inspect,
|
|
6260
6260
|
input: {
|
|
6261
6261
|
initialContext: {
|
|
6262
6262
|
endpoints: e.endpoints
|
|
6263
6263
|
}
|
|
6264
6264
|
}
|
|
6265
|
-
}).start()) : U(
|
|
6265
|
+
}).start()) : U(Dt, {
|
|
6266
6266
|
input: {
|
|
6267
6267
|
initialContext: {
|
|
6268
6268
|
endpoints: e.endpoints,
|
|
@@ -6276,20 +6276,20 @@ const Cr = (e, t, n, s) => {
|
|
|
6276
6276
|
inspect: e.inspect
|
|
6277
6277
|
}).start();
|
|
6278
6278
|
function Xr({ actor: e, children: t }) {
|
|
6279
|
-
return /* @__PURE__ */ Ge(
|
|
6279
|
+
return /* @__PURE__ */ Ge(mn.Provider, { value: e, children: t });
|
|
6280
6280
|
}
|
|
6281
6281
|
export {
|
|
6282
|
-
|
|
6282
|
+
en as AuthContext,
|
|
6283
6283
|
Vr as AuthProvider,
|
|
6284
|
-
|
|
6284
|
+
mn as QuoteContext,
|
|
6285
6285
|
Xr as QuoteProvider,
|
|
6286
|
-
|
|
6286
|
+
tn as ToastContext,
|
|
6287
6287
|
zr as ToastProvider,
|
|
6288
6288
|
St as authMachine,
|
|
6289
6289
|
$r as getAuth,
|
|
6290
6290
|
Yr as getQuote,
|
|
6291
|
-
|
|
6292
|
-
|
|
6291
|
+
Dt as quoteMachine,
|
|
6292
|
+
ks as timerMachine,
|
|
6293
6293
|
Hr as toastMachine,
|
|
6294
6294
|
jr as useAuth,
|
|
6295
6295
|
Jr as useQuote,
|