flemo 1.4.1 → 1.5.1
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/index.d.ts +1 -0
- package/dist/index.mjs +412 -413
- package/package.json +11 -13
- package/dist/screen/ScreenFreeze.d.ts +0 -8
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import { transform as
|
|
4
|
-
var H = {},
|
|
5
|
-
function
|
|
6
|
-
if (
|
|
7
|
-
|
|
1
|
+
import { jsx as x, jsxs as yt } from "react/jsx-runtime";
|
|
2
|
+
import at, { useEffect as Y, createContext as Et, useContext as St, useReducer as qt, Children as Mt, useImperativeHandle as Bt, useState as ot, useRef as $, useLayoutEffect as Tt, Activity as Ct } from "react";
|
|
3
|
+
import { transform as bt, useAnimate as Rt, motion as At, useDragControls as Xt, AnimatePresence as Kt, MotionConfig as Wt } from "motion/react";
|
|
4
|
+
var H = {}, Lt;
|
|
5
|
+
function zt() {
|
|
6
|
+
if (Lt) return H;
|
|
7
|
+
Lt = 1, Object.defineProperty(H, "__esModule", { value: !0 }), H.PathError = H.TokenData = void 0, H.parse = l, H.compile = E, H.match = L, H.pathToRegexp = D, H.stringify = Q;
|
|
8
8
|
const n = "/", e = (i) => i, t = /^[$_\p{ID_Start}]$/u, s = /^[$\u200c\u200d\p{ID_Continue}]$/u, r = {
|
|
9
9
|
// Groups.
|
|
10
10
|
"{": "{",
|
|
@@ -24,118 +24,118 @@ function Wt() {
|
|
|
24
24
|
function o(i) {
|
|
25
25
|
return i.replace(/[.+*?^${}()[\]|/\\]/g, "\\$&");
|
|
26
26
|
}
|
|
27
|
-
class
|
|
27
|
+
class c {
|
|
28
28
|
constructor(d, y) {
|
|
29
29
|
this.tokens = d, this.originalPath = y;
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
H.TokenData =
|
|
33
|
-
class
|
|
32
|
+
H.TokenData = c;
|
|
33
|
+
class f extends TypeError {
|
|
34
34
|
constructor(d, y) {
|
|
35
35
|
let m = d;
|
|
36
36
|
y && (m += `: ${y}`), m += "; visit https://git.new/pathToRegexpError for info", super(m), this.originalPath = y;
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
H.PathError =
|
|
39
|
+
H.PathError = f;
|
|
40
40
|
function l(i, d = {}) {
|
|
41
|
-
const { encodePath: y = e } = d, m = [...i],
|
|
41
|
+
const { encodePath: y = e } = d, m = [...i], h = [];
|
|
42
42
|
let p = 0, S = 0;
|
|
43
43
|
function T() {
|
|
44
|
-
let
|
|
44
|
+
let w = "";
|
|
45
45
|
if (t.test(m[p]))
|
|
46
46
|
do
|
|
47
|
-
|
|
47
|
+
w += m[p++];
|
|
48
48
|
while (s.test(m[p]));
|
|
49
49
|
else if (m[p] === '"') {
|
|
50
|
-
let
|
|
50
|
+
let R = p;
|
|
51
51
|
for (; p++ < m.length; ) {
|
|
52
52
|
if (m[p] === '"') {
|
|
53
|
-
p++,
|
|
53
|
+
p++, R = 0;
|
|
54
54
|
break;
|
|
55
55
|
}
|
|
56
|
-
m[p] === "\\" && p++,
|
|
56
|
+
m[p] === "\\" && p++, w += m[p];
|
|
57
57
|
}
|
|
58
|
-
if (
|
|
59
|
-
throw new
|
|
58
|
+
if (R)
|
|
59
|
+
throw new f(`Unterminated quote at index ${R}`, i);
|
|
60
60
|
}
|
|
61
|
-
if (!
|
|
62
|
-
throw new
|
|
63
|
-
return
|
|
61
|
+
if (!w)
|
|
62
|
+
throw new f(`Missing parameter name at index ${p}`, i);
|
|
63
|
+
return w;
|
|
64
64
|
}
|
|
65
65
|
for (; p < m.length; ) {
|
|
66
|
-
const
|
|
67
|
-
|
|
66
|
+
const w = m[p], R = r[w];
|
|
67
|
+
R ? h.push({ type: R, index: p++, value: w }) : w === "\\" ? h.push({ type: "escape", index: p++, value: m[p++] }) : w === ":" ? h.push({ type: "param", index: p++, value: T() }) : w === "*" ? h.push({ type: "wildcard", index: p++, value: T() }) : h.push({ type: "char", index: p++, value: w });
|
|
68
68
|
}
|
|
69
|
-
|
|
70
|
-
function C(
|
|
71
|
-
const
|
|
69
|
+
h.push({ type: "end", index: p, value: "" });
|
|
70
|
+
function C(w) {
|
|
71
|
+
const R = [];
|
|
72
72
|
for (; ; ) {
|
|
73
|
-
const N =
|
|
74
|
-
if (N.type ===
|
|
73
|
+
const N = h[S++];
|
|
74
|
+
if (N.type === w)
|
|
75
75
|
break;
|
|
76
76
|
if (N.type === "char" || N.type === "escape") {
|
|
77
|
-
let O = N.value, j =
|
|
77
|
+
let O = N.value, j = h[S];
|
|
78
78
|
for (; j.type === "char" || j.type === "escape"; )
|
|
79
|
-
O += j.value, j =
|
|
80
|
-
|
|
79
|
+
O += j.value, j = h[++S];
|
|
80
|
+
R.push({
|
|
81
81
|
type: "text",
|
|
82
82
|
value: y(O)
|
|
83
83
|
});
|
|
84
84
|
continue;
|
|
85
85
|
}
|
|
86
86
|
if (N.type === "param" || N.type === "wildcard") {
|
|
87
|
-
|
|
87
|
+
R.push({
|
|
88
88
|
type: N.type,
|
|
89
89
|
name: N.value
|
|
90
90
|
});
|
|
91
91
|
continue;
|
|
92
92
|
}
|
|
93
93
|
if (N.type === "{") {
|
|
94
|
-
|
|
94
|
+
R.push({
|
|
95
95
|
type: "group",
|
|
96
96
|
tokens: C("}")
|
|
97
97
|
});
|
|
98
98
|
continue;
|
|
99
99
|
}
|
|
100
|
-
throw new
|
|
100
|
+
throw new f(`Unexpected ${N.type} at index ${N.index}, expected ${w}`, i);
|
|
101
101
|
}
|
|
102
|
-
return
|
|
102
|
+
return R;
|
|
103
103
|
}
|
|
104
|
-
return new
|
|
104
|
+
return new c(C("end"), i);
|
|
105
105
|
}
|
|
106
|
-
function
|
|
107
|
-
const { encode: y = encodeURIComponent, delimiter: m = n } = d,
|
|
106
|
+
function E(i, d = {}) {
|
|
107
|
+
const { encode: y = encodeURIComponent, delimiter: m = n } = d, h = typeof i == "object" ? i : l(i, d), p = g(h.tokens, m, y);
|
|
108
108
|
return function(T = {}) {
|
|
109
|
-
const [C, ...
|
|
110
|
-
if (
|
|
111
|
-
throw new TypeError(`Missing parameters: ${
|
|
109
|
+
const [C, ...w] = p(T);
|
|
110
|
+
if (w.length)
|
|
111
|
+
throw new TypeError(`Missing parameters: ${w.join(", ")}`);
|
|
112
112
|
return C;
|
|
113
113
|
};
|
|
114
114
|
}
|
|
115
115
|
function g(i, d, y) {
|
|
116
|
-
const m = i.map((
|
|
117
|
-
return (
|
|
116
|
+
const m = i.map((h) => u(h, d, y));
|
|
117
|
+
return (h) => {
|
|
118
118
|
const p = [""];
|
|
119
119
|
for (const S of m) {
|
|
120
|
-
const [T, ...C] = S(
|
|
120
|
+
const [T, ...C] = S(h);
|
|
121
121
|
p[0] += T, p.push(...C);
|
|
122
122
|
}
|
|
123
123
|
return p;
|
|
124
124
|
};
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function u(i, d, y) {
|
|
127
127
|
if (i.type === "text")
|
|
128
128
|
return () => [i.value];
|
|
129
129
|
if (i.type === "group") {
|
|
130
|
-
const
|
|
130
|
+
const h = g(i.tokens, d, y);
|
|
131
131
|
return (p) => {
|
|
132
|
-
const [S, ...T] =
|
|
132
|
+
const [S, ...T] = h(p);
|
|
133
133
|
return T.length ? [""] : [S];
|
|
134
134
|
};
|
|
135
135
|
}
|
|
136
136
|
const m = y || e;
|
|
137
|
-
return i.type === "wildcard" && y !== !1 ? (
|
|
138
|
-
const p =
|
|
137
|
+
return i.type === "wildcard" && y !== !1 ? (h) => {
|
|
138
|
+
const p = h[i.name];
|
|
139
139
|
if (p == null)
|
|
140
140
|
return ["", i.name];
|
|
141
141
|
if (!Array.isArray(p) || p.length === 0)
|
|
@@ -147,8 +147,8 @@ function Wt() {
|
|
|
147
147
|
return m(S);
|
|
148
148
|
}).join(d)
|
|
149
149
|
];
|
|
150
|
-
} : (
|
|
151
|
-
const p =
|
|
150
|
+
} : (h) => {
|
|
151
|
+
const p = h[i.name];
|
|
152
152
|
if (p == null)
|
|
153
153
|
return ["", i.name];
|
|
154
154
|
if (typeof p != "string")
|
|
@@ -156,36 +156,36 @@ function Wt() {
|
|
|
156
156
|
return [m(p)];
|
|
157
157
|
};
|
|
158
158
|
}
|
|
159
|
-
function
|
|
160
|
-
const { decode: y = decodeURIComponent, delimiter: m = n } = d, { regexp:
|
|
159
|
+
function L(i, d = {}) {
|
|
160
|
+
const { decode: y = decodeURIComponent, delimiter: m = n } = d, { regexp: h, keys: p } = D(i, d), S = p.map((T) => y === !1 ? e : T.type === "param" ? y : (C) => C.split(m).map(y));
|
|
161
161
|
return function(C) {
|
|
162
|
-
const
|
|
163
|
-
if (!
|
|
162
|
+
const w = h.exec(C);
|
|
163
|
+
if (!w)
|
|
164
164
|
return !1;
|
|
165
|
-
const
|
|
166
|
-
for (let O = 1; O <
|
|
167
|
-
if (
|
|
165
|
+
const R = w[0], N = /* @__PURE__ */ Object.create(null);
|
|
166
|
+
for (let O = 1; O < w.length; O++) {
|
|
167
|
+
if (w[O] === void 0)
|
|
168
168
|
continue;
|
|
169
|
-
const j = p[O - 1],
|
|
170
|
-
N[j.name] =
|
|
169
|
+
const j = p[O - 1], ut = S[O - 1];
|
|
170
|
+
N[j.name] = ut(w[O]);
|
|
171
171
|
}
|
|
172
|
-
return { path:
|
|
172
|
+
return { path: R, params: N };
|
|
173
173
|
};
|
|
174
174
|
}
|
|
175
|
-
function
|
|
176
|
-
const { delimiter: y = n, end: m = !0, sensitive:
|
|
177
|
-
for (const N of
|
|
175
|
+
function D(i, d = {}) {
|
|
176
|
+
const { delimiter: y = n, end: m = !0, sensitive: h = !1, trailing: p = !0 } = d, S = [], T = h ? "" : "i", C = [];
|
|
177
|
+
for (const N of I(i, [])) {
|
|
178
178
|
const O = typeof N == "object" ? N : l(N, d);
|
|
179
179
|
for (const j of P(O.tokens, 0, []))
|
|
180
180
|
C.push(M(j, y, S, O.originalPath));
|
|
181
181
|
}
|
|
182
|
-
let
|
|
183
|
-
return p && (
|
|
182
|
+
let w = `^(?:${C.join("|")})`;
|
|
183
|
+
return p && (w += `(?:${o(y)}$)?`), w += m ? "$" : `(?=${o(y)}|$)`, { regexp: new RegExp(w, T), keys: S };
|
|
184
184
|
}
|
|
185
|
-
function
|
|
185
|
+
function I(i, d) {
|
|
186
186
|
if (Array.isArray(i))
|
|
187
187
|
for (const y of i)
|
|
188
|
-
|
|
188
|
+
I(y, d);
|
|
189
189
|
else
|
|
190
190
|
d.push(i);
|
|
191
191
|
return d;
|
|
@@ -195,55 +195,55 @@ function Wt() {
|
|
|
195
195
|
return yield y;
|
|
196
196
|
const m = i[d];
|
|
197
197
|
if (m.type === "group")
|
|
198
|
-
for (const
|
|
199
|
-
yield* P(i, d + 1,
|
|
198
|
+
for (const h of P(m.tokens, 0, y.slice()))
|
|
199
|
+
yield* P(i, d + 1, h);
|
|
200
200
|
else
|
|
201
201
|
y.push(m);
|
|
202
202
|
yield* P(i, d + 1, y);
|
|
203
203
|
}
|
|
204
204
|
function M(i, d, y, m) {
|
|
205
|
-
let
|
|
205
|
+
let h = "", p = "", S = !0;
|
|
206
206
|
for (const T of i) {
|
|
207
207
|
if (T.type === "text") {
|
|
208
|
-
|
|
208
|
+
h += o(T.value), p += T.value, S || (S = T.value.includes(d));
|
|
209
209
|
continue;
|
|
210
210
|
}
|
|
211
211
|
if (T.type === "param" || T.type === "wildcard") {
|
|
212
212
|
if (!S && !p)
|
|
213
|
-
throw new
|
|
214
|
-
T.type === "param" ?
|
|
213
|
+
throw new f(`Missing text before "${T.name}" ${T.type}`, m);
|
|
214
|
+
T.type === "param" ? h += `(${W(d, S ? "" : p)}+)` : h += "([\\s\\S]+)", y.push(T), p = "", S = !1;
|
|
215
215
|
continue;
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
|
-
return
|
|
218
|
+
return h;
|
|
219
219
|
}
|
|
220
|
-
function
|
|
220
|
+
function W(i, d) {
|
|
221
221
|
return d.length < 2 ? i.length < 2 ? `[^${o(i + d)}]` : `(?:(?!${o(i)})[^${o(d)}])` : i.length < 2 ? `(?:(?!${o(d)})[^${o(i)}])` : `(?:(?!${o(d)}|${o(i)})[\\s\\S])`;
|
|
222
222
|
}
|
|
223
223
|
function _(i) {
|
|
224
224
|
let d = "", y = 0;
|
|
225
|
-
function m(
|
|
226
|
-
return k(
|
|
225
|
+
function m(h) {
|
|
226
|
+
return k(h) && b(i[y]) ? h : JSON.stringify(h);
|
|
227
227
|
}
|
|
228
228
|
for (; y < i.length; ) {
|
|
229
|
-
const
|
|
230
|
-
if (
|
|
231
|
-
d += a(
|
|
229
|
+
const h = i[y++];
|
|
230
|
+
if (h.type === "text") {
|
|
231
|
+
d += a(h.value);
|
|
232
232
|
continue;
|
|
233
233
|
}
|
|
234
|
-
if (
|
|
235
|
-
d += `{${_(
|
|
234
|
+
if (h.type === "group") {
|
|
235
|
+
d += `{${_(h.tokens)}}`;
|
|
236
236
|
continue;
|
|
237
237
|
}
|
|
238
|
-
if (
|
|
239
|
-
d += `:${m(
|
|
238
|
+
if (h.type === "param") {
|
|
239
|
+
d += `:${m(h.name)}`;
|
|
240
240
|
continue;
|
|
241
241
|
}
|
|
242
|
-
if (
|
|
243
|
-
d += `*${m(
|
|
242
|
+
if (h.type === "wildcard") {
|
|
243
|
+
d += `*${m(h.name)}`;
|
|
244
244
|
continue;
|
|
245
245
|
}
|
|
246
|
-
throw new TypeError(`Unknown token type: ${
|
|
246
|
+
throw new TypeError(`Unknown token type: ${h.type}`);
|
|
247
247
|
}
|
|
248
248
|
return d;
|
|
249
249
|
}
|
|
@@ -254,17 +254,17 @@ function Wt() {
|
|
|
254
254
|
const [d, ...y] = i;
|
|
255
255
|
return t.test(d) && y.every((m) => s.test(m));
|
|
256
256
|
}
|
|
257
|
-
function
|
|
257
|
+
function b(i) {
|
|
258
258
|
return i && i.type === "text" ? !s.test(i.value[0]) : !0;
|
|
259
259
|
}
|
|
260
260
|
return H;
|
|
261
261
|
}
|
|
262
|
-
var
|
|
262
|
+
var K = zt();
|
|
263
263
|
function Jt(n, e, t) {
|
|
264
|
-
const s = Array.isArray(n) ? n.find((
|
|
264
|
+
const s = Array.isArray(n) ? n.find((c) => K.pathToRegexp(c).regexp.test(e)) || "" : K.pathToRegexp(n).regexp.test(e) ? n : "", r = K.match(s)(e), a = new URLSearchParams(t), o = Object.fromEntries(a.entries());
|
|
265
265
|
return r ? { ...r.params, ...o } : {};
|
|
266
266
|
}
|
|
267
|
-
function
|
|
267
|
+
function Dt() {
|
|
268
268
|
return typeof document > "u";
|
|
269
269
|
}
|
|
270
270
|
class Zt {
|
|
@@ -335,7 +335,7 @@ class Zt {
|
|
|
335
335
|
return new Promise((r, a) => {
|
|
336
336
|
this.taskQueue = this.taskQueue.then(async () => {
|
|
337
337
|
try {
|
|
338
|
-
const { control: o, validate:
|
|
338
|
+
const { control: o, validate: c, rollback: f, dependencies: l = [], delay: E } = t, g = new AbortController(), u = {
|
|
339
339
|
id: s,
|
|
340
340
|
execute: e,
|
|
341
341
|
timestamp: Date.now(),
|
|
@@ -343,31 +343,31 @@ class Zt {
|
|
|
343
343
|
status: "PENDING",
|
|
344
344
|
dependencies: l,
|
|
345
345
|
instanceId: this.instanceId,
|
|
346
|
-
validate:
|
|
347
|
-
rollback:
|
|
346
|
+
validate: c,
|
|
347
|
+
rollback: f,
|
|
348
348
|
control: o,
|
|
349
349
|
abortController: g
|
|
350
350
|
};
|
|
351
|
-
this.tasks.set(
|
|
351
|
+
this.tasks.set(u.id, u), this.pendingTaskQueue.length > 0 && (this.pendingTaskQueue.push(u), await this.waitForPendingTasks(), this.pendingTaskQueue = this.pendingTaskQueue.filter((D) => D.id !== u.id));
|
|
352
352
|
try {
|
|
353
|
-
if (!await this.acquireLock(
|
|
354
|
-
throw
|
|
353
|
+
if (!await this.acquireLock(u.id))
|
|
354
|
+
throw u.status = "FAILED", new Error("FAILED");
|
|
355
355
|
try {
|
|
356
|
-
|
|
357
|
-
for (const P of
|
|
356
|
+
u.status = "PROCESSING";
|
|
357
|
+
for (const P of u.dependencies) {
|
|
358
358
|
const M = this.tasks.get(P);
|
|
359
359
|
if (!M || M.status !== "COMPLETED")
|
|
360
|
-
throw
|
|
360
|
+
throw u.status = "FAILED", new Error("FAILED");
|
|
361
361
|
}
|
|
362
|
-
if (
|
|
363
|
-
throw
|
|
364
|
-
|
|
365
|
-
const
|
|
366
|
-
if (
|
|
367
|
-
|
|
362
|
+
if (u.validate && !await u.validate())
|
|
363
|
+
throw u.status = "FAILED", new Error("FAILED");
|
|
364
|
+
E && E > 0 && await new Promise((P) => setTimeout(P, E));
|
|
365
|
+
const I = await u.execute(u.abortController);
|
|
366
|
+
if (u.abortController.signal.aborted) {
|
|
367
|
+
u.status = "COMPLETED", await this.onTaskStatusChange(u.id, "COMPLETED"), r({
|
|
368
368
|
success: !0,
|
|
369
369
|
result: void 0,
|
|
370
|
-
taskId:
|
|
370
|
+
taskId: u.id,
|
|
371
371
|
timestamp: Date.now(),
|
|
372
372
|
instanceId: this.instanceId
|
|
373
373
|
});
|
|
@@ -376,37 +376,37 @@ class Zt {
|
|
|
376
376
|
if (t.control) {
|
|
377
377
|
const P = t.control;
|
|
378
378
|
if (P.delay && P.delay > 0 && await new Promise((M) => setTimeout(M, P.delay)), P.manual) {
|
|
379
|
-
|
|
379
|
+
u.status = "MANUAL_PENDING", u.manualResolver = { resolve: r, reject: a, result: I }, this.pendingTaskQueue.push(u), await this.onTaskStatusChange(u.id, "MANUAL_PENDING");
|
|
380
380
|
return;
|
|
381
381
|
}
|
|
382
382
|
if (P.signal) {
|
|
383
|
-
|
|
383
|
+
u.status = "SIGNAL_PENDING", u.manualResolver = { resolve: r, reject: a, result: I }, this.signalListeners.has(P.signal) || this.signalListeners.set(P.signal, /* @__PURE__ */ new Set()), this.signalListeners.get(P.signal).add(u.id), this.pendingTaskQueue.push(u), await this.onTaskStatusChange(u.id, "SIGNAL_PENDING");
|
|
384
384
|
return;
|
|
385
385
|
}
|
|
386
386
|
if (P.condition && !await P.condition()) {
|
|
387
|
-
|
|
387
|
+
u.status = "MANUAL_PENDING", u.manualResolver = { resolve: r, reject: a, result: I }, this.pendingTaskQueue.push(u), await this.onTaskStatusChange(u.id, "MANUAL_PENDING");
|
|
388
388
|
return;
|
|
389
389
|
}
|
|
390
390
|
}
|
|
391
|
-
|
|
391
|
+
u.status = "COMPLETED", await this.onTaskStatusChange(u.id, "COMPLETED"), r({
|
|
392
392
|
success: !0,
|
|
393
|
-
result:
|
|
394
|
-
taskId:
|
|
393
|
+
result: I,
|
|
394
|
+
taskId: u.id,
|
|
395
395
|
timestamp: Date.now(),
|
|
396
396
|
instanceId: this.instanceId
|
|
397
397
|
});
|
|
398
|
-
} catch (
|
|
399
|
-
if (
|
|
398
|
+
} catch (I) {
|
|
399
|
+
if (u.status = "FAILED", u.rollback)
|
|
400
400
|
try {
|
|
401
|
-
await
|
|
401
|
+
await u.rollback(), u.status = "ROLLEDBACK";
|
|
402
402
|
} catch {
|
|
403
403
|
}
|
|
404
|
-
throw await this.onTaskStatusChange(
|
|
404
|
+
throw await this.onTaskStatusChange(u.id, u.status), I;
|
|
405
405
|
} finally {
|
|
406
|
-
this.releaseLock(
|
|
406
|
+
this.releaseLock(u.id);
|
|
407
407
|
}
|
|
408
|
-
} catch (
|
|
409
|
-
a(
|
|
408
|
+
} catch (D) {
|
|
409
|
+
a(D);
|
|
410
410
|
}
|
|
411
411
|
} catch (o) {
|
|
412
412
|
a(o);
|
|
@@ -440,29 +440,29 @@ class Zt {
|
|
|
440
440
|
await Promise.all(e.map((t) => this.resolveTask(t.id)));
|
|
441
441
|
}
|
|
442
442
|
}
|
|
443
|
-
const
|
|
443
|
+
const F = new Zt(), It = (n) => {
|
|
444
444
|
let e;
|
|
445
|
-
const t = /* @__PURE__ */ new Set(), s = (l,
|
|
445
|
+
const t = /* @__PURE__ */ new Set(), s = (l, E) => {
|
|
446
446
|
const g = typeof l == "function" ? l(e) : l;
|
|
447
447
|
if (!Object.is(g, e)) {
|
|
448
|
-
const
|
|
449
|
-
e =
|
|
448
|
+
const u = e;
|
|
449
|
+
e = E ?? (typeof g != "object" || g === null) ? g : Object.assign({}, e, g), t.forEach((L) => L(e, u));
|
|
450
450
|
}
|
|
451
|
-
}, r = () => e,
|
|
452
|
-
return
|
|
453
|
-
}, te = ((n) => n ?
|
|
451
|
+
}, r = () => e, c = { setState: s, getState: r, getInitialState: () => f, subscribe: (l) => (t.add(l), () => t.delete(l)) }, f = e = n(s, r, c);
|
|
452
|
+
return c;
|
|
453
|
+
}, te = ((n) => n ? It(n) : It), ee = (n) => n;
|
|
454
454
|
function ne(n, e = ee) {
|
|
455
|
-
const t =
|
|
455
|
+
const t = at.useSyncExternalStore(
|
|
456
456
|
n.subscribe,
|
|
457
|
-
|
|
458
|
-
|
|
457
|
+
at.useCallback(() => e(n.getState()), [n, e]),
|
|
458
|
+
at.useCallback(() => e(n.getInitialState()), [n, e])
|
|
459
459
|
);
|
|
460
|
-
return
|
|
460
|
+
return at.useDebugValue(t), t;
|
|
461
461
|
}
|
|
462
|
-
const
|
|
462
|
+
const xt = (n) => {
|
|
463
463
|
const e = te(n), t = (s) => ne(e, s);
|
|
464
464
|
return Object.assign(t, e), t;
|
|
465
|
-
},
|
|
465
|
+
}, it = ((n) => n ? xt(n) : xt), q = it((n) => ({
|
|
466
466
|
index: -1,
|
|
467
467
|
histories: [],
|
|
468
468
|
addHistory: (e) => n((t) => ({
|
|
@@ -477,7 +477,7 @@ const It = (n) => {
|
|
|
477
477
|
index: t.index - 1,
|
|
478
478
|
histories: t.histories.filter((s, r) => r !== e)
|
|
479
479
|
}))
|
|
480
|
-
})), U =
|
|
480
|
+
})), U = it((n) => ({
|
|
481
481
|
status: "IDLE",
|
|
482
482
|
setStatus: (e) => n({ status: e })
|
|
483
483
|
}));
|
|
@@ -485,27 +485,27 @@ function re() {
|
|
|
485
485
|
return Y(() => {
|
|
486
486
|
const n = async (e) => {
|
|
487
487
|
const t = e.state?.id;
|
|
488
|
-
(await
|
|
488
|
+
(await F.addTask(
|
|
489
489
|
async (s) => {
|
|
490
|
-
const r = e.state?.index, a = e.state?.status, o = e.state?.params,
|
|
491
|
-
if (!
|
|
490
|
+
const r = e.state?.index, a = e.state?.status, o = e.state?.params, c = e.state?.transitionName, f = e.state?.layoutId, l = U.getState().setStatus, { index: E, addHistory: g, popHistory: u } = q.getState(), L = r < E, D = a === "PUSHING" && r > E, I = a === "REPLACING" && r > E, P = window.location.pathname;
|
|
491
|
+
if (!L && !D && !I) {
|
|
492
492
|
s.abort();
|
|
493
493
|
return;
|
|
494
494
|
}
|
|
495
|
-
return
|
|
495
|
+
return L ? l("POPPING") : D ? (l("PUSHING"), g({
|
|
496
496
|
id: t,
|
|
497
497
|
pathname: P,
|
|
498
498
|
params: o,
|
|
499
|
-
transitionName:
|
|
500
|
-
layoutId:
|
|
501
|
-
})) :
|
|
499
|
+
transitionName: c,
|
|
500
|
+
layoutId: f
|
|
501
|
+
})) : I && (l("REPLACING"), g({
|
|
502
502
|
id: t,
|
|
503
503
|
pathname: P,
|
|
504
504
|
params: o,
|
|
505
|
-
transitionName:
|
|
506
|
-
layoutId:
|
|
505
|
+
transitionName: c,
|
|
506
|
+
layoutId: f
|
|
507
507
|
})), async () => {
|
|
508
|
-
|
|
508
|
+
L && u(r + 1), l("COMPLETED");
|
|
509
509
|
};
|
|
510
510
|
},
|
|
511
511
|
{
|
|
@@ -521,17 +521,12 @@ function re() {
|
|
|
521
521
|
};
|
|
522
522
|
}, []), null;
|
|
523
523
|
}
|
|
524
|
-
const
|
|
524
|
+
const Ot = Et({}), Gt = Et(() => {
|
|
525
525
|
});
|
|
526
526
|
function se(n, e) {
|
|
527
|
-
|
|
528
|
-
case "SET":
|
|
529
|
-
return e.params;
|
|
530
|
-
default:
|
|
531
|
-
return n;
|
|
532
|
-
}
|
|
527
|
+
return e.type === "SET" ? e.params : n;
|
|
533
528
|
}
|
|
534
|
-
const
|
|
529
|
+
const $t = Et({
|
|
535
530
|
id: "",
|
|
536
531
|
isActive: !1,
|
|
537
532
|
isRoot: !0,
|
|
@@ -544,31 +539,31 @@ const Ot = Et({
|
|
|
544
539
|
layoutId: null
|
|
545
540
|
});
|
|
546
541
|
function Z() {
|
|
547
|
-
return St(
|
|
542
|
+
return St($t);
|
|
548
543
|
}
|
|
549
544
|
function ae({ children: n }) {
|
|
550
|
-
const { isActive: e, params: t } = Z(), [s, r] =
|
|
545
|
+
const { isActive: e, params: t } = Z(), [s, r] = qt(se, t);
|
|
551
546
|
return Y(() => {
|
|
552
547
|
const a = async (o) => {
|
|
553
|
-
o.state?.step && await
|
|
548
|
+
o.state?.step && await F.addTask(async () => {
|
|
554
549
|
r({ type: "SET", params: o.state?.params || {} });
|
|
555
550
|
});
|
|
556
551
|
};
|
|
557
552
|
return e && window.addEventListener("popstate", a), () => {
|
|
558
553
|
window.removeEventListener("popstate", a);
|
|
559
554
|
};
|
|
560
|
-
}, [e, r]), /* @__PURE__ */
|
|
555
|
+
}, [e, r]), /* @__PURE__ */ x(Gt.Provider, { value: r, children: /* @__PURE__ */ x(Ot.Provider, { value: s, children: n }) });
|
|
561
556
|
}
|
|
562
557
|
function oe({ children: n }) {
|
|
563
558
|
const e = q((s) => s.index), t = q((s) => s.histories);
|
|
564
559
|
return t.map(
|
|
565
|
-
(s) =>
|
|
566
|
-
(r) =>
|
|
560
|
+
(s) => Mt.toArray(n).filter(
|
|
561
|
+
(r) => K.pathToRegexp(r.props.path).regexp.test(
|
|
567
562
|
s.pathname
|
|
568
563
|
)
|
|
569
564
|
)
|
|
570
|
-
).map(([s], r) => /* @__PURE__ */
|
|
571
|
-
|
|
565
|
+
).map(([s], r) => /* @__PURE__ */ x(
|
|
566
|
+
$t.Provider,
|
|
572
567
|
{
|
|
573
568
|
value: {
|
|
574
569
|
id: t[r].id,
|
|
@@ -582,7 +577,7 @@ function oe({ children: n }) {
|
|
|
582
577
|
prevTransitionName: t[e - 1]?.transitionName,
|
|
583
578
|
layoutId: t[r].layoutId
|
|
584
579
|
},
|
|
585
|
-
children: /* @__PURE__ */
|
|
580
|
+
children: /* @__PURE__ */ x(ae, { children: s })
|
|
586
581
|
},
|
|
587
582
|
t[r].id
|
|
588
583
|
));
|
|
@@ -665,11 +660,11 @@ const ce = ie({
|
|
|
665
660
|
}
|
|
666
661
|
)
|
|
667
662
|
}
|
|
668
|
-
}), Pt = /* @__PURE__ */ new Map([["overlay", ce]]), mt =
|
|
663
|
+
}), Pt = /* @__PURE__ */ new Map([["overlay", ce]]), mt = it((n) => ({
|
|
669
664
|
defaultTransitionName: "cupertino",
|
|
670
665
|
setDefaultTransitionName: (e) => n({ defaultTransitionName: e })
|
|
671
666
|
}));
|
|
672
|
-
function
|
|
667
|
+
function ct({
|
|
673
668
|
name: n,
|
|
674
669
|
initial: e,
|
|
675
670
|
idle: t,
|
|
@@ -677,7 +672,7 @@ function ut({
|
|
|
677
672
|
enterBack: r,
|
|
678
673
|
exit: a,
|
|
679
674
|
exitBack: o,
|
|
680
|
-
options:
|
|
675
|
+
options: c
|
|
681
676
|
}) {
|
|
682
677
|
return {
|
|
683
678
|
name: n,
|
|
@@ -694,10 +689,10 @@ function ut({
|
|
|
694
689
|
"COMPLETED-false": a,
|
|
695
690
|
"COMPLETED-true": s
|
|
696
691
|
},
|
|
697
|
-
...
|
|
692
|
+
...c
|
|
698
693
|
};
|
|
699
694
|
}
|
|
700
|
-
const ue =
|
|
695
|
+
const ue = ct({
|
|
701
696
|
name: "cupertino",
|
|
702
697
|
initial: {
|
|
703
698
|
x: "100%"
|
|
@@ -751,11 +746,11 @@ const ue = ut({
|
|
|
751
746
|
swipeDirection: "x",
|
|
752
747
|
onSwipeStart: async () => !0,
|
|
753
748
|
onSwipe: (n, e, { animate: t, currentScreen: s, prevScreen: r, onProgress: a }) => {
|
|
754
|
-
const { offset: o } = e,
|
|
755
|
-
return a?.(!0,
|
|
749
|
+
const { offset: o } = e, c = o.x, f = bt(c, [0, window.innerWidth], [0, 100]);
|
|
750
|
+
return a?.(!0, f), t(
|
|
756
751
|
s,
|
|
757
752
|
{
|
|
758
|
-
x: Math.max(0,
|
|
753
|
+
x: Math.max(0, c)
|
|
759
754
|
},
|
|
760
755
|
{
|
|
761
756
|
duration: 0
|
|
@@ -763,15 +758,15 @@ const ue = ut({
|
|
|
763
758
|
), t(
|
|
764
759
|
r,
|
|
765
760
|
{
|
|
766
|
-
x: -100 +
|
|
761
|
+
x: -100 + f
|
|
767
762
|
},
|
|
768
763
|
{
|
|
769
764
|
duration: 0
|
|
770
765
|
}
|
|
771
|
-
),
|
|
766
|
+
), f;
|
|
772
767
|
},
|
|
773
768
|
onSwipeEnd: async (n, e, { animate: t, currentScreen: s, prevScreen: r, onStart: a }) => {
|
|
774
|
-
const { offset: o, velocity:
|
|
769
|
+
const { offset: o, velocity: c } = e, l = o.x > 50 || c.x > 20;
|
|
775
770
|
return a?.(l), await Promise.all([
|
|
776
771
|
t(
|
|
777
772
|
s,
|
|
@@ -796,7 +791,7 @@ const ue = ut({
|
|
|
796
791
|
]), l;
|
|
797
792
|
}
|
|
798
793
|
}
|
|
799
|
-
}), le =
|
|
794
|
+
}), le = ct({
|
|
800
795
|
name: "layout",
|
|
801
796
|
initial: {
|
|
802
797
|
opacity: 0.97
|
|
@@ -846,20 +841,20 @@ const ue = ut({
|
|
|
846
841
|
swipeDirection: "y",
|
|
847
842
|
onSwipeStart: async () => !0,
|
|
848
843
|
onSwipe: (n, e, { animate: t, currentScreen: s, onProgress: r }) => {
|
|
849
|
-
const { offset: a } = e, o = a.y,
|
|
844
|
+
const { offset: a } = e, o = a.y, c = Math.max(0, Math.min(56, o)), f = bt(c, [0, 56], [1, 0.96]), l = Math.max(0, o - 56), E = Math.min(1, l / 160), g = Math.sqrt(E) * 12, u = Math.max(0, c + g), L = Math.min(56, u);
|
|
850
845
|
return r?.(!0, 100), t(
|
|
851
846
|
s,
|
|
852
847
|
{
|
|
853
|
-
y:
|
|
854
|
-
opacity:
|
|
848
|
+
y: u,
|
|
849
|
+
opacity: f
|
|
855
850
|
},
|
|
856
851
|
{
|
|
857
852
|
duration: 0
|
|
858
853
|
}
|
|
859
|
-
),
|
|
854
|
+
), L;
|
|
860
855
|
},
|
|
861
856
|
onSwipeEnd: async (n, e, { animate: t, currentScreen: s, prevScreen: r, onStart: a }) => {
|
|
862
|
-
const { offset: o, velocity:
|
|
857
|
+
const { offset: o, velocity: c } = e, l = o.y > 56 || c.y > 20;
|
|
863
858
|
return a?.(l), await Promise.all([
|
|
864
859
|
t(
|
|
865
860
|
s,
|
|
@@ -884,7 +879,7 @@ const ue = ut({
|
|
|
884
879
|
]), l;
|
|
885
880
|
}
|
|
886
881
|
}
|
|
887
|
-
}), de =
|
|
882
|
+
}), de = ct({
|
|
888
883
|
name: "material",
|
|
889
884
|
initial: {
|
|
890
885
|
y: "100%"
|
|
@@ -937,11 +932,11 @@ const ue = ut({
|
|
|
937
932
|
swipeDirection: "y",
|
|
938
933
|
onSwipeStart: async () => !0,
|
|
939
934
|
onSwipe: (n, e, { animate: t, currentScreen: s, prevScreen: r, onProgress: a }) => {
|
|
940
|
-
const { offset: o } = e,
|
|
941
|
-
return a?.(!0,
|
|
935
|
+
const { offset: o } = e, c = o.y, f = Math.max(0, Math.min(56, c)), l = Math.max(0, c - 56), E = Math.min(1, l / 160), g = Math.sqrt(E) * 12, u = Math.max(0, f + g), L = Math.min(56, u);
|
|
936
|
+
return a?.(!0, L), t(
|
|
942
937
|
s,
|
|
943
938
|
{
|
|
944
|
-
y:
|
|
939
|
+
y: u
|
|
945
940
|
},
|
|
946
941
|
{
|
|
947
942
|
duration: 0
|
|
@@ -949,13 +944,13 @@ const ue = ut({
|
|
|
949
944
|
), t(
|
|
950
945
|
r,
|
|
951
946
|
{
|
|
952
|
-
y: -56 +
|
|
947
|
+
y: -56 + L
|
|
953
948
|
},
|
|
954
949
|
{ duration: 0 }
|
|
955
|
-
),
|
|
950
|
+
), L;
|
|
956
951
|
},
|
|
957
952
|
onSwipeEnd: async (n, e, { animate: t, currentScreen: s, prevScreen: r, onStart: a }) => {
|
|
958
|
-
const { offset: o, velocity:
|
|
953
|
+
const { offset: o, velocity: c } = e, l = o.y > 56 || c.y > 20;
|
|
959
954
|
return a?.(l), await Promise.all([
|
|
960
955
|
t(
|
|
961
956
|
s,
|
|
@@ -980,7 +975,7 @@ const ue = ut({
|
|
|
980
975
|
]), l;
|
|
981
976
|
}
|
|
982
977
|
}
|
|
983
|
-
}), pe =
|
|
978
|
+
}), pe = ct({
|
|
984
979
|
name: "none",
|
|
985
980
|
initial: {},
|
|
986
981
|
idle: {
|
|
@@ -1027,14 +1022,14 @@ const ue = ut({
|
|
|
1027
1022
|
}
|
|
1028
1023
|
return n;
|
|
1029
1024
|
})();
|
|
1030
|
-
function
|
|
1025
|
+
function Se({
|
|
1031
1026
|
children: n,
|
|
1032
1027
|
initPath: e = "/",
|
|
1033
1028
|
defaultTransitionName: t = "cupertino",
|
|
1034
1029
|
transitions: s = [],
|
|
1035
1030
|
decorators: r = []
|
|
1036
1031
|
}) {
|
|
1037
|
-
const a =
|
|
1032
|
+
const a = Dt() ? e || "/" : window.location.pathname, o = Dt() ? a.split("?")[1] || "" : window.location.search;
|
|
1038
1033
|
return mt.setState({
|
|
1039
1034
|
defaultTransitionName: t
|
|
1040
1035
|
}), q.setState({
|
|
@@ -1044,7 +1039,7 @@ function ve({
|
|
|
1044
1039
|
id: "root",
|
|
1045
1040
|
pathname: a,
|
|
1046
1041
|
params: Jt(
|
|
1047
|
-
|
|
1042
|
+
Mt.toArray(n).map((c) => c.props.path).flat(),
|
|
1048
1043
|
a,
|
|
1049
1044
|
o
|
|
1050
1045
|
),
|
|
@@ -1053,7 +1048,9 @@ function ve({
|
|
|
1053
1048
|
}
|
|
1054
1049
|
]
|
|
1055
1050
|
}), Y(() => {
|
|
1056
|
-
window.history.state?.index
|
|
1051
|
+
if (window.history.state?.index) return;
|
|
1052
|
+
const { pathname: c, search: f } = window.location;
|
|
1053
|
+
window.history.replaceState(
|
|
1057
1054
|
{
|
|
1058
1055
|
id: "root",
|
|
1059
1056
|
index: 0,
|
|
@@ -1063,12 +1060,12 @@ function ve({
|
|
|
1063
1060
|
layoutId: null
|
|
1064
1061
|
},
|
|
1065
1062
|
"",
|
|
1066
|
-
|
|
1063
|
+
`${c}${f}`
|
|
1067
1064
|
);
|
|
1068
1065
|
}, [t]), Y(() => {
|
|
1069
|
-
s.forEach((
|
|
1066
|
+
s.forEach((c) => et.set(c.name, c));
|
|
1070
1067
|
}, [s]), Y(() => {
|
|
1071
|
-
r.forEach((
|
|
1068
|
+
r.forEach((c) => Pt.set(c.name, c));
|
|
1072
1069
|
}, [r]), /* @__PURE__ */ yt(
|
|
1073
1070
|
"div",
|
|
1074
1071
|
{
|
|
@@ -1080,53 +1077,53 @@ function ve({
|
|
|
1080
1077
|
height: "100%"
|
|
1081
1078
|
},
|
|
1082
1079
|
children: [
|
|
1083
|
-
/* @__PURE__ */
|
|
1084
|
-
/* @__PURE__ */
|
|
1080
|
+
/* @__PURE__ */ x(re, {}),
|
|
1081
|
+
/* @__PURE__ */ x(oe, { children: n })
|
|
1085
1082
|
]
|
|
1086
1083
|
}
|
|
1087
1084
|
);
|
|
1088
1085
|
}
|
|
1089
|
-
function
|
|
1086
|
+
function Pe({ element: n }) {
|
|
1090
1087
|
return n;
|
|
1091
1088
|
}
|
|
1092
|
-
function
|
|
1089
|
+
function ve() {
|
|
1093
1090
|
return {
|
|
1094
1091
|
push: async (s, r, a = {}) => {
|
|
1095
|
-
const { status: o, setStatus:
|
|
1092
|
+
const { status: o, setStatus: c } = U.getState();
|
|
1096
1093
|
if (o !== "COMPLETED" && o !== "IDLE")
|
|
1097
1094
|
return;
|
|
1098
|
-
const { index:
|
|
1099
|
-
(await
|
|
1095
|
+
const { index: f, addHistory: l } = q.getState(), E = mt.getState().defaultTransitionName, { transitionName: g = E, layoutId: u = null } = a, L = F.generateTaskId();
|
|
1096
|
+
(await F.addTask(
|
|
1100
1097
|
async () => {
|
|
1101
|
-
|
|
1102
|
-
const
|
|
1103
|
-
Object.entries(r).map(([k,
|
|
1104
|
-
), P =
|
|
1098
|
+
c("PUSHING");
|
|
1099
|
+
const D = K.compile(s), I = Object.fromEntries(
|
|
1100
|
+
Object.entries(r).map(([k, b]) => [k, String(b)])
|
|
1101
|
+
), P = D(I), M = K.parse(s).tokens.filter((k) => k.type === "param").map((k) => k.name), W = Object.fromEntries(
|
|
1105
1102
|
Object.entries(r).filter(([k]) => !M.includes(k))
|
|
1106
|
-
), _ = new URLSearchParams(
|
|
1103
|
+
), _ = new URLSearchParams(W).toString(), Q = `${P}${_ ? `?${_}` : ""}`;
|
|
1107
1104
|
return window.history.pushState(
|
|
1108
1105
|
{
|
|
1109
|
-
id:
|
|
1110
|
-
index:
|
|
1106
|
+
id: L,
|
|
1107
|
+
index: f + 1,
|
|
1111
1108
|
status: "PUSHING",
|
|
1112
1109
|
params: r,
|
|
1113
1110
|
transitionName: g,
|
|
1114
|
-
layoutId:
|
|
1111
|
+
layoutId: u
|
|
1115
1112
|
},
|
|
1116
1113
|
"",
|
|
1117
1114
|
Q
|
|
1118
1115
|
), l({
|
|
1119
|
-
id:
|
|
1116
|
+
id: L,
|
|
1120
1117
|
pathname: P,
|
|
1121
1118
|
params: r,
|
|
1122
1119
|
transitionName: g,
|
|
1123
|
-
layoutId:
|
|
1120
|
+
layoutId: u
|
|
1124
1121
|
}), () => {
|
|
1125
|
-
|
|
1122
|
+
c("COMPLETED");
|
|
1126
1123
|
};
|
|
1127
1124
|
},
|
|
1128
1125
|
{
|
|
1129
|
-
id:
|
|
1126
|
+
id: L,
|
|
1130
1127
|
control: {
|
|
1131
1128
|
manual: !0
|
|
1132
1129
|
}
|
|
@@ -1134,41 +1131,41 @@ function Le() {
|
|
|
1134
1131
|
)).result?.();
|
|
1135
1132
|
},
|
|
1136
1133
|
replace: async (s, r, a = {}) => {
|
|
1137
|
-
const { status: o, setStatus:
|
|
1134
|
+
const { status: o, setStatus: c } = U.getState();
|
|
1138
1135
|
if (o !== "COMPLETED" && o !== "IDLE")
|
|
1139
1136
|
return;
|
|
1140
|
-
const { index:
|
|
1141
|
-
(await
|
|
1137
|
+
const { index: f, addHistory: l } = q.getState(), E = q.getState().replaceHistory, g = mt.getState().defaultTransitionName, { transitionName: u = g, layoutId: L = null } = a, D = F.generateTaskId();
|
|
1138
|
+
(await F.addTask(
|
|
1142
1139
|
async () => {
|
|
1143
|
-
|
|
1144
|
-
const
|
|
1145
|
-
Object.entries(r).map(([
|
|
1146
|
-
), M =
|
|
1147
|
-
Object.entries(r).filter(([
|
|
1140
|
+
c("REPLACING");
|
|
1141
|
+
const I = K.compile(s), P = Object.fromEntries(
|
|
1142
|
+
Object.entries(r).map(([b, i]) => [b, String(i)])
|
|
1143
|
+
), M = I(P), W = K.parse(s).tokens.filter((b) => b.type === "param").map((b) => b.name), _ = Object.fromEntries(
|
|
1144
|
+
Object.entries(r).filter(([b]) => !W.includes(b))
|
|
1148
1145
|
), Q = new URLSearchParams(_).toString(), k = `${M}${Q ? `?${Q}` : ""}`;
|
|
1149
1146
|
return window.history.replaceState(
|
|
1150
1147
|
{
|
|
1151
|
-
id:
|
|
1152
|
-
index:
|
|
1148
|
+
id: D,
|
|
1149
|
+
index: f,
|
|
1153
1150
|
status: "REPLACING",
|
|
1154
1151
|
params: r,
|
|
1155
|
-
transitionName:
|
|
1156
|
-
layoutId:
|
|
1152
|
+
transitionName: u,
|
|
1153
|
+
layoutId: L
|
|
1157
1154
|
},
|
|
1158
1155
|
"",
|
|
1159
1156
|
k
|
|
1160
1157
|
), l({
|
|
1161
|
-
id:
|
|
1158
|
+
id: D,
|
|
1162
1159
|
pathname: M,
|
|
1163
1160
|
params: r,
|
|
1164
|
-
transitionName:
|
|
1165
|
-
layoutId:
|
|
1161
|
+
transitionName: u,
|
|
1162
|
+
layoutId: L
|
|
1166
1163
|
}), async () => {
|
|
1167
|
-
|
|
1164
|
+
E(f), c("COMPLETED");
|
|
1168
1165
|
};
|
|
1169
1166
|
},
|
|
1170
1167
|
{
|
|
1171
|
-
id:
|
|
1168
|
+
id: D,
|
|
1172
1169
|
control: {
|
|
1173
1170
|
manual: !0
|
|
1174
1171
|
}
|
|
@@ -1181,13 +1178,13 @@ function Le() {
|
|
|
1181
1178
|
}
|
|
1182
1179
|
};
|
|
1183
1180
|
}
|
|
1184
|
-
function
|
|
1185
|
-
const n = St(
|
|
1181
|
+
function Te() {
|
|
1182
|
+
const n = St(Gt);
|
|
1186
1183
|
return {
|
|
1187
1184
|
pushStep: async (r) => {
|
|
1188
1185
|
const a = U.getState().status;
|
|
1189
|
-
a !== "COMPLETED" && a !== "IDLE" || (await
|
|
1190
|
-
const o = new URLSearchParams(r).toString(),
|
|
1186
|
+
a !== "COMPLETED" && a !== "IDLE" || (await F.addTask(async () => {
|
|
1187
|
+
const o = new URLSearchParams(r).toString(), c = `${window.location.pathname}${o ? `?${o}` : ""}`;
|
|
1191
1188
|
return window.history.state?.step || window.history.replaceState(
|
|
1192
1189
|
{
|
|
1193
1190
|
...window.history.state,
|
|
@@ -1202,14 +1199,14 @@ function De() {
|
|
|
1202
1199
|
params: r
|
|
1203
1200
|
},
|
|
1204
1201
|
"",
|
|
1205
|
-
|
|
1202
|
+
c
|
|
1206
1203
|
), async () => n({ type: "SET", params: r });
|
|
1207
1204
|
})).result?.();
|
|
1208
1205
|
},
|
|
1209
1206
|
replaceStep: async (r) => {
|
|
1210
1207
|
const a = U.getState().status;
|
|
1211
|
-
a !== "COMPLETED" && a !== "IDLE" || (await
|
|
1212
|
-
const o = new URLSearchParams(r).toString(),
|
|
1208
|
+
a !== "COMPLETED" && a !== "IDLE" || (await F.addTask(async () => {
|
|
1209
|
+
const o = new URLSearchParams(r).toString(), c = `${window.location.pathname}${o ? `?${o}` : ""}`;
|
|
1213
1210
|
return window.history.replaceState(
|
|
1214
1211
|
{
|
|
1215
1212
|
...window.history.state,
|
|
@@ -1217,7 +1214,7 @@ function De() {
|
|
|
1217
1214
|
params: r
|
|
1218
1215
|
},
|
|
1219
1216
|
"",
|
|
1220
|
-
|
|
1217
|
+
c
|
|
1221
1218
|
), async () => n({ type: "SET", params: r });
|
|
1222
1219
|
})).result?.();
|
|
1223
1220
|
},
|
|
@@ -1227,10 +1224,10 @@ function De() {
|
|
|
1227
1224
|
}
|
|
1228
1225
|
};
|
|
1229
1226
|
}
|
|
1230
|
-
function
|
|
1231
|
-
return St(
|
|
1227
|
+
function Le() {
|
|
1228
|
+
return St(Ot);
|
|
1232
1229
|
}
|
|
1233
|
-
function
|
|
1230
|
+
function De({
|
|
1234
1231
|
name: n,
|
|
1235
1232
|
initial: e,
|
|
1236
1233
|
idle: t,
|
|
@@ -1238,10 +1235,10 @@ function xe({
|
|
|
1238
1235
|
pushOnExit: r,
|
|
1239
1236
|
replaceOnEnter: a,
|
|
1240
1237
|
replaceOnExit: o,
|
|
1241
|
-
popOnEnter:
|
|
1242
|
-
popOnExit:
|
|
1238
|
+
popOnEnter: c,
|
|
1239
|
+
popOnExit: f,
|
|
1243
1240
|
completedOnExit: l,
|
|
1244
|
-
completedOnEnter:
|
|
1241
|
+
completedOnEnter: E,
|
|
1245
1242
|
options: g
|
|
1246
1243
|
}) {
|
|
1247
1244
|
return {
|
|
@@ -1254,15 +1251,15 @@ function xe({
|
|
|
1254
1251
|
"PUSHING-true": s,
|
|
1255
1252
|
"REPLACING-false": o,
|
|
1256
1253
|
"REPLACING-true": a,
|
|
1257
|
-
"POPPING-false":
|
|
1258
|
-
"POPPING-true":
|
|
1254
|
+
"POPPING-false": f,
|
|
1255
|
+
"POPPING-true": c,
|
|
1259
1256
|
"COMPLETED-false": l,
|
|
1260
|
-
"COMPLETED-true":
|
|
1257
|
+
"COMPLETED-true": E
|
|
1261
1258
|
},
|
|
1262
1259
|
...g
|
|
1263
1260
|
};
|
|
1264
1261
|
}
|
|
1265
|
-
function
|
|
1262
|
+
function Ie({
|
|
1266
1263
|
name: n,
|
|
1267
1264
|
initial: e,
|
|
1268
1265
|
idle: t,
|
|
@@ -1270,10 +1267,10 @@ function Ne({
|
|
|
1270
1267
|
pushOnExit: r,
|
|
1271
1268
|
replaceOnEnter: a,
|
|
1272
1269
|
replaceOnExit: o,
|
|
1273
|
-
popOnEnter:
|
|
1274
|
-
popOnExit:
|
|
1270
|
+
popOnEnter: c,
|
|
1271
|
+
popOnExit: f,
|
|
1275
1272
|
completedOnEnter: l,
|
|
1276
|
-
completedOnExit:
|
|
1273
|
+
completedOnExit: E,
|
|
1277
1274
|
options: g
|
|
1278
1275
|
}) {
|
|
1279
1276
|
return {
|
|
@@ -1286,47 +1283,34 @@ function Ne({
|
|
|
1286
1283
|
"PUSHING-true": s,
|
|
1287
1284
|
"REPLACING-false": o,
|
|
1288
1285
|
"REPLACING-true": a,
|
|
1289
|
-
"POPPING-false":
|
|
1290
|
-
"POPPING-true":
|
|
1291
|
-
"COMPLETED-false":
|
|
1286
|
+
"POPPING-false": f,
|
|
1287
|
+
"POPPING-true": c,
|
|
1288
|
+
"COMPLETED-false": E,
|
|
1292
1289
|
"COMPLETED-true": l
|
|
1293
1290
|
},
|
|
1294
1291
|
...g
|
|
1295
1292
|
};
|
|
1296
1293
|
}
|
|
1297
|
-
|
|
1298
|
-
} };
|
|
1299
|
-
function ge({
|
|
1300
|
-
freeze: n,
|
|
1301
|
-
children: e
|
|
1302
|
-
}) {
|
|
1303
|
-
if (n)
|
|
1304
|
-
throw he;
|
|
1305
|
-
return e;
|
|
1306
|
-
}
|
|
1307
|
-
function Gt({ freeze: n, children: e, placeholder: t }) {
|
|
1308
|
-
return /* @__PURE__ */ D(qt, { fallback: t, children: /* @__PURE__ */ D(ge, { freeze: n, children: e }) });
|
|
1309
|
-
}
|
|
1310
|
-
function xt(n, e) {
|
|
1294
|
+
function Nt(n, e) {
|
|
1311
1295
|
const {
|
|
1312
1296
|
direction: t = "x",
|
|
1313
1297
|
markerSelector: s = "[data-swipe-at-edge]",
|
|
1314
1298
|
depthLimit: r = 24,
|
|
1315
1299
|
verifyByScroll: a = !1
|
|
1316
|
-
} = e ?? {}, o =
|
|
1300
|
+
} = e ?? {}, o = he(n);
|
|
1317
1301
|
if (!o) return { element: null, hasMarker: !1 };
|
|
1318
|
-
const
|
|
1319
|
-
if (
|
|
1320
|
-
return { element:
|
|
1321
|
-
let
|
|
1322
|
-
for (;
|
|
1323
|
-
if (wt(
|
|
1324
|
-
return { element:
|
|
1325
|
-
|
|
1302
|
+
const c = o.closest?.(s);
|
|
1303
|
+
if (c instanceof HTMLElement && wt(c, t) && (!a || kt(c, t)))
|
|
1304
|
+
return { element: c, hasMarker: !0 };
|
|
1305
|
+
let f = o, l = 0;
|
|
1306
|
+
for (; f && f !== document.body && l < r; ) {
|
|
1307
|
+
if (wt(f, t) && (!a || kt(f, t)))
|
|
1308
|
+
return { element: f, hasMarker: !1 };
|
|
1309
|
+
f = f.parentElement, l++;
|
|
1326
1310
|
}
|
|
1327
1311
|
return { element: null, hasMarker: !1 };
|
|
1328
1312
|
}
|
|
1329
|
-
function
|
|
1313
|
+
function he(n) {
|
|
1330
1314
|
if (!n) return null;
|
|
1331
1315
|
const e = n, t = typeof e.composedPath == "function" ? e.composedPath() : void 0;
|
|
1332
1316
|
if (t && t.length) {
|
|
@@ -1338,7 +1322,7 @@ function ye(n) {
|
|
|
1338
1322
|
function wt(n, e) {
|
|
1339
1323
|
return e === "y" ? n.scrollHeight - n.clientHeight > 1 : n.scrollWidth - n.clientWidth > 1;
|
|
1340
1324
|
}
|
|
1341
|
-
function
|
|
1325
|
+
function kt(n, e) {
|
|
1342
1326
|
if (!wt(n, e)) return !1;
|
|
1343
1327
|
if (e === "y") {
|
|
1344
1328
|
const t = n.scrollTop;
|
|
@@ -1356,19 +1340,19 @@ function Nt(n, e) {
|
|
|
1356
1340
|
return n.scrollLeft = t, r;
|
|
1357
1341
|
}
|
|
1358
1342
|
}
|
|
1359
|
-
function
|
|
1360
|
-
const { isActive: s, transitionName: r } = Z(), [a, o] =
|
|
1343
|
+
function ge({ children: n, ref: e, ...t }) {
|
|
1344
|
+
const { isActive: s, transitionName: r } = Z(), [a, o] = Rt();
|
|
1361
1345
|
Bt(e, () => a.current);
|
|
1362
|
-
const
|
|
1346
|
+
const c = U((u) => u.status), f = et.get(r), { decoratorName: l } = f, { initial: E, variants: g } = Pt.get(l);
|
|
1363
1347
|
return Y(() => {
|
|
1364
1348
|
if (!a.current) return;
|
|
1365
|
-
const { value:
|
|
1366
|
-
o(a.current,
|
|
1367
|
-
}, [
|
|
1368
|
-
|
|
1349
|
+
const { value: u, options: L } = g[`${c}-${s}`];
|
|
1350
|
+
o(a.current, u, L);
|
|
1351
|
+
}, [c, s, o, g, a]), /* @__PURE__ */ x(
|
|
1352
|
+
At.div,
|
|
1369
1353
|
{
|
|
1370
1354
|
ref: a,
|
|
1371
|
-
initial:
|
|
1355
|
+
initial: E,
|
|
1372
1356
|
style: {
|
|
1373
1357
|
position: "absolute",
|
|
1374
1358
|
top: 0,
|
|
@@ -1382,15 +1366,15 @@ function me({ children: n, ref: e, ...t }) {
|
|
|
1382
1366
|
}
|
|
1383
1367
|
);
|
|
1384
1368
|
}
|
|
1385
|
-
const J =
|
|
1369
|
+
const J = it((n) => ({
|
|
1386
1370
|
dragStatus: "IDLE",
|
|
1387
1371
|
replaceTransitionStatus: "IDLE",
|
|
1388
1372
|
setDragStatus: (e) => n({ dragStatus: e }),
|
|
1389
1373
|
setReplaceTransitionStatus: (e) => n({ replaceTransitionStatus: e })
|
|
1390
1374
|
}));
|
|
1391
1375
|
let gt = 0;
|
|
1392
|
-
function
|
|
1393
|
-
const [n, e] =
|
|
1376
|
+
function ye() {
|
|
1377
|
+
const [n, e] = ot(0), [t, s] = ot(0);
|
|
1394
1378
|
return Y(() => {
|
|
1395
1379
|
const r = () => {
|
|
1396
1380
|
let a = document.documentElement.scrollHeight - (window.visualViewport?.height || 0);
|
|
@@ -1403,7 +1387,7 @@ function we() {
|
|
|
1403
1387
|
};
|
|
1404
1388
|
}, []), { viewportScrollHeight: n, changedViewportScrollHeight: t };
|
|
1405
1389
|
}
|
|
1406
|
-
function
|
|
1390
|
+
function Ht({
|
|
1407
1391
|
children: n,
|
|
1408
1392
|
statusBarHeight: e,
|
|
1409
1393
|
statusBarColor: t,
|
|
@@ -1411,86 +1395,86 @@ function $t({
|
|
|
1411
1395
|
systemNavigationBarColor: r,
|
|
1412
1396
|
sharedAppBar: a,
|
|
1413
1397
|
sharedNavigationBar: o,
|
|
1414
|
-
appBar:
|
|
1415
|
-
navigationBar:
|
|
1398
|
+
appBar: c,
|
|
1399
|
+
navigationBar: f,
|
|
1416
1400
|
hideStatusBar: l,
|
|
1417
|
-
hideSystemNavigationBar:
|
|
1401
|
+
hideSystemNavigationBar: E,
|
|
1418
1402
|
backgroundColor: g = "white",
|
|
1419
|
-
contentScrollable:
|
|
1420
|
-
...
|
|
1403
|
+
contentScrollable: u = !0,
|
|
1404
|
+
...L
|
|
1421
1405
|
}) {
|
|
1422
|
-
const [
|
|
1406
|
+
const [D, I] = Rt(), { id: P, isActive: M, isRoot: W, transitionName: _, prevTransitionName: Q } = Z(), k = Xt(), b = U((v) => v.status), i = J((v) => v.dragStatus), d = J.getState().setDragStatus, y = J.getState().setReplaceTransitionStatus, m = et.get(_), { variants: h, initial: p, swipeDirection: S, decoratorName: T } = m, C = Pt.get(T), { viewportScrollHeight: w } = ye(), R = w > 0, [N, O] = ot(0), [j, ut] = ot(0), vt = $(null), nt = $(null), rt = $(null), st = $(null), B = $(!1), tt = $(!1), X = $({
|
|
1423
1407
|
element: null,
|
|
1424
1408
|
hasMarker: !1
|
|
1425
|
-
}),
|
|
1426
|
-
if (!S ||
|
|
1409
|
+
}), z = $({ element: null, hasMarker: !1 }), lt = $(0), dt = $(0), pt = $(null), ft = $(null), Ut = async (v, G) => {
|
|
1410
|
+
if (!S || w > 10)
|
|
1427
1411
|
return;
|
|
1428
|
-
const A =
|
|
1429
|
-
|
|
1430
|
-
const
|
|
1431
|
-
animate:
|
|
1432
|
-
currentScreen:
|
|
1433
|
-
prevScreen:
|
|
1412
|
+
const A = vt.current?.previousSibling;
|
|
1413
|
+
nt.current = A?.querySelector("[data-screen]"), st.current = A?.querySelector("[data-decorator]");
|
|
1414
|
+
const V = await m?.onSwipeStart(v, G, {
|
|
1415
|
+
animate: I,
|
|
1416
|
+
currentScreen: D.current,
|
|
1417
|
+
prevScreen: nt.current,
|
|
1434
1418
|
dragControls: k,
|
|
1435
1419
|
onStart: (ht) => C?.onSwipeStart?.(ht, {
|
|
1436
|
-
animate:
|
|
1437
|
-
currentDecorator:
|
|
1438
|
-
prevDecorator:
|
|
1420
|
+
animate: I,
|
|
1421
|
+
currentDecorator: rt.current,
|
|
1422
|
+
prevDecorator: st.current
|
|
1439
1423
|
})
|
|
1440
1424
|
});
|
|
1441
|
-
d(
|
|
1442
|
-
},
|
|
1443
|
-
!S || i !== "PENDING" ||
|
|
1444
|
-
animate:
|
|
1445
|
-
currentScreen:
|
|
1446
|
-
prevScreen:
|
|
1425
|
+
d(V ? "PENDING" : "IDLE");
|
|
1426
|
+
}, _t = (v, G) => {
|
|
1427
|
+
!S || i !== "PENDING" || w > 10 || m?.onSwipe(v, G, {
|
|
1428
|
+
animate: I,
|
|
1429
|
+
currentScreen: D.current,
|
|
1430
|
+
prevScreen: nt.current,
|
|
1447
1431
|
dragControls: k,
|
|
1448
|
-
onProgress: (A,
|
|
1449
|
-
animate:
|
|
1450
|
-
currentDecorator:
|
|
1451
|
-
prevDecorator:
|
|
1432
|
+
onProgress: (A, V) => C?.onSwipe?.(A, V, {
|
|
1433
|
+
animate: I,
|
|
1434
|
+
currentDecorator: rt.current,
|
|
1435
|
+
prevDecorator: st.current
|
|
1452
1436
|
})
|
|
1453
1437
|
});
|
|
1454
|
-
},
|
|
1455
|
-
if (!S || i !== "PENDING" ||
|
|
1438
|
+
}, jt = async (v, G) => {
|
|
1439
|
+
if (!S || i !== "PENDING" || w > 10)
|
|
1456
1440
|
return;
|
|
1457
1441
|
await m?.onSwipeEnd(v, G, {
|
|
1458
|
-
animate:
|
|
1459
|
-
currentScreen:
|
|
1460
|
-
prevScreen:
|
|
1461
|
-
onStart: (
|
|
1462
|
-
animate:
|
|
1463
|
-
currentDecorator:
|
|
1464
|
-
prevDecorator:
|
|
1442
|
+
animate: I,
|
|
1443
|
+
currentScreen: D.current,
|
|
1444
|
+
prevScreen: nt.current,
|
|
1445
|
+
onStart: (V) => C?.onSwipeEnd?.(V, {
|
|
1446
|
+
animate: I,
|
|
1447
|
+
currentDecorator: rt.current,
|
|
1448
|
+
prevDecorator: st.current
|
|
1465
1449
|
})
|
|
1466
1450
|
}) ? window.history.back() : d("IDLE");
|
|
1467
|
-
},
|
|
1468
|
-
if (!(!
|
|
1451
|
+
}, Vt = (v) => {
|
|
1452
|
+
if (!(!W && M && b === "COMPLETED" && i === "IDLE" && !!S && w < 10))
|
|
1469
1453
|
return;
|
|
1470
|
-
X.current =
|
|
1454
|
+
X.current = Nt(v.target, {
|
|
1471
1455
|
direction: "x",
|
|
1472
1456
|
verifyByScroll: !0
|
|
1473
|
-
}),
|
|
1457
|
+
}), z.current = Nt(v.target, {
|
|
1474
1458
|
direction: "y",
|
|
1475
1459
|
verifyByScroll: !0
|
|
1476
|
-
}), lt.current = v.clientX, dt.current = v.clientY, (!X.current.element && !
|
|
1477
|
-
},
|
|
1478
|
-
if (
|
|
1460
|
+
}), lt.current = v.clientX, dt.current = v.clientY, (!X.current.element && !z.current.element || X.current.element || z.current.element) && (B.current = !0);
|
|
1461
|
+
}, Qt = (v) => {
|
|
1462
|
+
if (w > 10)
|
|
1479
1463
|
return;
|
|
1480
|
-
const G = !X.current.element && !
|
|
1464
|
+
const G = !X.current.element && !z.current.element;
|
|
1481
1465
|
if (B.current && G) {
|
|
1482
1466
|
B.current = !1, tt.current = !0;
|
|
1483
|
-
const A = v.clientY - dt.current,
|
|
1484
|
-
(S === "y" && A > 0 || S === "x" &&
|
|
1467
|
+
const A = v.clientY - dt.current, V = v.clientX - lt.current;
|
|
1468
|
+
(S === "y" && A > 0 || S === "x" && V > 0) && k.start(v);
|
|
1485
1469
|
} else if (B.current && !G) {
|
|
1486
|
-
const A = v.clientX - lt.current,
|
|
1487
|
-
(S === "y" && (ht || X.current.element) &&
|
|
1470
|
+
const A = v.clientX - lt.current, V = v.clientY - dt.current, ht = z.current.element && z.current.element.scrollTop <= 0, Yt = X.current.element && X.current.element.scrollLeft <= 0 && X.current.hasMarker;
|
|
1471
|
+
(S === "y" && (ht || X.current.element) && V > 0 && Math.abs(A) < 2 || S === "x" && (Yt || z.current.element) && A > 0 && Math.abs(V) < 2) && (B.current = !1, tt.current = !0, k.start(v));
|
|
1488
1472
|
}
|
|
1489
|
-
},
|
|
1473
|
+
}, Ft = () => {
|
|
1490
1474
|
B.current = !1, tt.current = !1;
|
|
1491
1475
|
};
|
|
1492
1476
|
return Y(() => {
|
|
1493
|
-
const v =
|
|
1477
|
+
const v = D.current;
|
|
1494
1478
|
if (!v) return;
|
|
1495
1479
|
const G = (A) => {
|
|
1496
1480
|
tt.current && A.preventDefault(), A.target?.dataset.swipeAtEdgeBar === "true" && A.preventDefault();
|
|
@@ -1500,32 +1484,32 @@ function $t({
|
|
|
1500
1484
|
}), () => {
|
|
1501
1485
|
v.removeEventListener("touchmove", G);
|
|
1502
1486
|
};
|
|
1503
|
-
}, [
|
|
1504
|
-
|
|
1505
|
-
const { value: v, options: G } =
|
|
1506
|
-
!M &&
|
|
1487
|
+
}, [D]), Y(() => {
|
|
1488
|
+
D.current && (async () => {
|
|
1489
|
+
const { value: v, options: G } = h[`${b}-${M}`];
|
|
1490
|
+
!M && b === "REPLACING" && Q !== _ && (y("PENDING"), await I(D.current, fe, {
|
|
1507
1491
|
duration: 0.1
|
|
1508
|
-
})), M &&
|
|
1492
|
+
})), M && b === "COMPLETED" && (d("IDLE"), y("IDLE")), await I(D.current, v, G), await F.resolveTask(P);
|
|
1509
1493
|
})();
|
|
1510
1494
|
}, [
|
|
1511
|
-
|
|
1495
|
+
b,
|
|
1512
1496
|
M,
|
|
1513
1497
|
P,
|
|
1514
1498
|
Q,
|
|
1515
1499
|
_,
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1500
|
+
I,
|
|
1501
|
+
D,
|
|
1502
|
+
h,
|
|
1519
1503
|
d,
|
|
1520
1504
|
y
|
|
1521
|
-
]),
|
|
1522
|
-
pt.current &&
|
|
1523
|
-
}, [a]),
|
|
1524
|
-
ft.current &&
|
|
1505
|
+
]), Tt(() => {
|
|
1506
|
+
pt.current && O(pt.current.offsetHeight);
|
|
1507
|
+
}, [a]), Tt(() => {
|
|
1508
|
+
ft.current && ut(ft.current.offsetHeight);
|
|
1525
1509
|
}, [o]), /* @__PURE__ */ yt(
|
|
1526
1510
|
"div",
|
|
1527
1511
|
{
|
|
1528
|
-
ref:
|
|
1512
|
+
ref: vt,
|
|
1529
1513
|
style: {
|
|
1530
1514
|
position: "absolute",
|
|
1531
1515
|
top: 0,
|
|
@@ -1540,7 +1524,7 @@ function $t({
|
|
|
1540
1524
|
overscrollBehavior: "contain"
|
|
1541
1525
|
},
|
|
1542
1526
|
children: [
|
|
1543
|
-
/* @__PURE__ */
|
|
1527
|
+
/* @__PURE__ */ x(
|
|
1544
1528
|
"div",
|
|
1545
1529
|
{
|
|
1546
1530
|
"data-swipe-at-edge-bar": !0,
|
|
@@ -1554,7 +1538,7 @@ function $t({
|
|
|
1554
1538
|
}
|
|
1555
1539
|
}
|
|
1556
1540
|
),
|
|
1557
|
-
a && /* @__PURE__ */
|
|
1541
|
+
a && /* @__PURE__ */ x(
|
|
1558
1542
|
"div",
|
|
1559
1543
|
{
|
|
1560
1544
|
ref: pt,
|
|
@@ -1568,31 +1552,35 @@ function $t({
|
|
|
1568
1552
|
}
|
|
1569
1553
|
),
|
|
1570
1554
|
/* @__PURE__ */ yt(
|
|
1571
|
-
|
|
1555
|
+
At.div,
|
|
1572
1556
|
{
|
|
1573
|
-
ref:
|
|
1574
|
-
...
|
|
1557
|
+
ref: D,
|
|
1558
|
+
...L,
|
|
1575
1559
|
initial: p,
|
|
1576
1560
|
drag: S,
|
|
1577
1561
|
dragListener: !1,
|
|
1578
1562
|
dragControls: k,
|
|
1579
|
-
onDragStart:
|
|
1580
|
-
onDrag:
|
|
1581
|
-
onDragEnd:
|
|
1582
|
-
onPointerDown:
|
|
1583
|
-
onPointerMove:
|
|
1584
|
-
onPointerUp:
|
|
1563
|
+
onDragStart: Ut,
|
|
1564
|
+
onDrag: _t,
|
|
1565
|
+
onDragEnd: jt,
|
|
1566
|
+
onPointerDown: Vt,
|
|
1567
|
+
onPointerMove: Qt,
|
|
1568
|
+
onPointerUp: Ft,
|
|
1569
|
+
transition: {
|
|
1570
|
+
inherit: !0,
|
|
1571
|
+
...L.transition
|
|
1572
|
+
},
|
|
1585
1573
|
"data-screen": !0,
|
|
1586
1574
|
style: {
|
|
1587
1575
|
display: "flex",
|
|
1588
1576
|
flexDirection: "column",
|
|
1589
1577
|
height: "100%",
|
|
1590
1578
|
backgroundColor: g,
|
|
1591
|
-
overflowY:
|
|
1592
|
-
...
|
|
1579
|
+
overflowY: u ? void 0 : "auto",
|
|
1580
|
+
...L.style
|
|
1593
1581
|
},
|
|
1594
1582
|
children: [
|
|
1595
|
-
!l && e && /* @__PURE__ */
|
|
1583
|
+
!l && e && /* @__PURE__ */ x("div", { style: { minHeight: e }, children: /* @__PURE__ */ x(
|
|
1596
1584
|
"div",
|
|
1597
1585
|
{
|
|
1598
1586
|
style: {
|
|
@@ -1604,68 +1592,78 @@ function $t({
|
|
|
1604
1592
|
}
|
|
1605
1593
|
}
|
|
1606
1594
|
) }),
|
|
1607
|
-
a && /* @__PURE__ */
|
|
1595
|
+
a && /* @__PURE__ */ x(
|
|
1608
1596
|
"div",
|
|
1609
1597
|
{
|
|
1610
1598
|
style: {
|
|
1611
1599
|
width: "100%",
|
|
1612
|
-
minHeight:
|
|
1600
|
+
minHeight: N
|
|
1613
1601
|
}
|
|
1614
1602
|
}
|
|
1615
1603
|
),
|
|
1616
|
-
|
|
1617
|
-
/* @__PURE__ */
|
|
1604
|
+
c,
|
|
1605
|
+
/* @__PURE__ */ x(
|
|
1618
1606
|
"div",
|
|
1619
1607
|
{
|
|
1620
1608
|
style: {
|
|
1621
1609
|
display: "flex",
|
|
1622
1610
|
flexDirection: "column",
|
|
1623
1611
|
flexGrow: 1,
|
|
1624
|
-
overflowY:
|
|
1612
|
+
overflowY: u ? "auto" : void 0
|
|
1625
1613
|
},
|
|
1626
1614
|
children: n
|
|
1627
1615
|
}
|
|
1628
1616
|
),
|
|
1629
|
-
|
|
1630
|
-
o && /* @__PURE__ */
|
|
1617
|
+
f,
|
|
1618
|
+
o && /* @__PURE__ */ x(
|
|
1631
1619
|
"div",
|
|
1632
1620
|
{
|
|
1633
1621
|
style: {
|
|
1622
|
+
display: R ? "none" : void 0,
|
|
1634
1623
|
width: "100%",
|
|
1635
|
-
minHeight:
|
|
1624
|
+
minHeight: j
|
|
1636
1625
|
}
|
|
1637
1626
|
}
|
|
1638
1627
|
),
|
|
1639
|
-
!
|
|
1628
|
+
!E && s && /* @__PURE__ */ x(
|
|
1640
1629
|
"div",
|
|
1641
1630
|
{
|
|
1642
1631
|
style: {
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1632
|
+
display: R ? "none" : void 0,
|
|
1633
|
+
minHeight: s
|
|
1634
|
+
},
|
|
1635
|
+
children: /* @__PURE__ */ x(
|
|
1636
|
+
"div",
|
|
1637
|
+
{
|
|
1638
|
+
style: {
|
|
1639
|
+
position: "fixed",
|
|
1640
|
+
bottom: 0,
|
|
1641
|
+
width: "100%",
|
|
1642
|
+
minHeight: s,
|
|
1643
|
+
backgroundColor: r
|
|
1644
|
+
}
|
|
1645
|
+
}
|
|
1646
|
+
)
|
|
1649
1647
|
}
|
|
1650
|
-
)
|
|
1648
|
+
)
|
|
1651
1649
|
]
|
|
1652
1650
|
}
|
|
1653
1651
|
),
|
|
1654
|
-
o && /* @__PURE__ */
|
|
1652
|
+
o && /* @__PURE__ */ x(
|
|
1655
1653
|
"div",
|
|
1656
1654
|
{
|
|
1657
1655
|
ref: ft,
|
|
1658
1656
|
style: {
|
|
1659
1657
|
position: "absolute",
|
|
1660
|
-
bottom:
|
|
1658
|
+
bottom: E ? 0 : s,
|
|
1661
1659
|
left: 0,
|
|
1662
1660
|
width: "100%"
|
|
1663
1661
|
},
|
|
1664
1662
|
children: o
|
|
1665
1663
|
}
|
|
1666
1664
|
),
|
|
1667
|
-
C && /* @__PURE__ */
|
|
1668
|
-
/* @__PURE__ */
|
|
1665
|
+
C && /* @__PURE__ */ x(ge, { ref: rt }),
|
|
1666
|
+
/* @__PURE__ */ x(
|
|
1669
1667
|
"div",
|
|
1670
1668
|
{
|
|
1671
1669
|
"data-swipe-at-edge-bar": !0,
|
|
@@ -1683,28 +1681,28 @@ function $t({
|
|
|
1683
1681
|
}
|
|
1684
1682
|
);
|
|
1685
1683
|
}
|
|
1686
|
-
function
|
|
1687
|
-
const { isActive: t, isPrev: s, zIndex: r } = Z(), a = q((g) => g.index), o = U((g) => g.status),
|
|
1688
|
-
return /* @__PURE__ */
|
|
1684
|
+
function xe({ children: n, ...e }) {
|
|
1685
|
+
const { isActive: t, isPrev: s, zIndex: r } = Z(), a = q((g) => g.index), o = U((g) => g.status), c = J((g) => g.dragStatus), f = J((g) => g.replaceTransitionStatus), E = !t && (o === "COMPLETED" && c === "IDLE") || s && a - 2 <= r && f === "IDLE" || s && a - 2 > r;
|
|
1686
|
+
return /* @__PURE__ */ x(Ht, { ...e, children: /* @__PURE__ */ x(Ct, { mode: E ? "hidden" : "visible", children: n }) });
|
|
1689
1687
|
}
|
|
1690
|
-
function
|
|
1691
|
-
const { isActive: t, isPrev: s, zIndex: r } = Z(), a = q((g) => g.index), o = U((g) => g.status),
|
|
1692
|
-
return /* @__PURE__ */
|
|
1693
|
-
|
|
1688
|
+
function Ne({ children: n, ...e }) {
|
|
1689
|
+
const { isActive: t, isPrev: s, zIndex: r } = Z(), a = q((g) => g.index), o = U((g) => g.status), c = J((g) => g.dragStatus), f = J((g) => g.replaceTransitionStatus), E = !t && (o === "COMPLETED" && c === "IDLE") || s && a - 2 <= r && f === "IDLE" || s && a - 2 > r;
|
|
1690
|
+
return /* @__PURE__ */ x(
|
|
1691
|
+
Ht,
|
|
1694
1692
|
{
|
|
1695
1693
|
...e,
|
|
1696
1694
|
style: {
|
|
1697
1695
|
backgroundColor: "transparent",
|
|
1698
1696
|
...e.style
|
|
1699
1697
|
},
|
|
1700
|
-
children: /* @__PURE__ */
|
|
1698
|
+
children: /* @__PURE__ */ x(Kt, { children: /* @__PURE__ */ x(Ct, { mode: E ? "hidden" : "visible", children: n }) })
|
|
1701
1699
|
}
|
|
1702
|
-
)
|
|
1700
|
+
);
|
|
1703
1701
|
}
|
|
1704
|
-
function
|
|
1702
|
+
function ke({ children: n, ...e }) {
|
|
1705
1703
|
const { isActive: t, transitionName: s } = Z(), r = U((o) => o.status), a = et.get(s);
|
|
1706
|
-
return /* @__PURE__ */
|
|
1707
|
-
|
|
1704
|
+
return /* @__PURE__ */ x(
|
|
1705
|
+
Wt,
|
|
1708
1706
|
{
|
|
1709
1707
|
transition: a?.variants[`${r}-${t}`]?.options,
|
|
1710
1708
|
...e,
|
|
@@ -1713,17 +1711,18 @@ function Ce({ children: n, ...e }) {
|
|
|
1713
1711
|
);
|
|
1714
1712
|
}
|
|
1715
1713
|
export {
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1714
|
+
ke as LayoutConfig,
|
|
1715
|
+
Ne as LayoutScreen,
|
|
1716
|
+
Pe as Route,
|
|
1717
|
+
Se as Router,
|
|
1718
|
+
xe as Screen,
|
|
1721
1719
|
ie as createDecorator,
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1720
|
+
Ie as createRawDecorator,
|
|
1721
|
+
De as createRawTransition,
|
|
1722
|
+
ct as createTransition,
|
|
1723
|
+
ve as useNavigate,
|
|
1724
|
+
Le as useParams,
|
|
1727
1725
|
Z as useScreen,
|
|
1728
|
-
|
|
1726
|
+
Te as useStep,
|
|
1727
|
+
ye as useViewportScrollHeight
|
|
1729
1728
|
};
|