@pie-players/pie-section-player-tools-shared 0.3.3 → 0.3.5
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/PanelWindowControls.svelte +55 -6
- package/dist/index.js +751 -687
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,75 +1,99 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var en = Object.defineProperty;
|
|
2
|
+
var he = (t) => {
|
|
3
3
|
throw TypeError(t);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var o = (t, e, n) => (qt(t, e, "read from private field"), n ? n.call(t) : e.get(t)),
|
|
8
|
-
var
|
|
9
|
-
typeof window < "u" && ((
|
|
10
|
-
const
|
|
11
|
-
var
|
|
12
|
-
const
|
|
5
|
+
var nn = (t, e, n) => e in t ? en(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
6
|
+
var U = (t, e, n) => nn(t, typeof e != "symbol" ? e + "" : e, n), qt = (t, e, n) => e.has(t) || he("Cannot " + n);
|
|
7
|
+
var o = (t, e, n) => (qt(t, e, "read from private field"), n ? n.call(t) : e.get(t)), g = (t, e, n) => e.has(t) ? he("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), X = (t, e, n, r) => (qt(t, e, "write to private field"), r ? r.call(t, n) : e.set(t, n), n), V = (t, e, n) => (qt(t, e, "access private method"), n);
|
|
8
|
+
var xe;
|
|
9
|
+
typeof window < "u" && ((xe = window.__svelte ?? (window.__svelte = {})).v ?? (xe.v = /* @__PURE__ */ new Set())).add("5");
|
|
10
|
+
const rn = 1, sn = 2, jt = /* @__PURE__ */ Symbol(), Ee = "http://www.w3.org/1999/xhtml", Zt = !1;
|
|
11
|
+
var ln = Array.prototype.indexOf, Et = Array.prototype.includes, on = Object.getOwnPropertyDescriptors, fn = Object.getPrototypeOf;
|
|
12
|
+
const an = () => {
|
|
13
13
|
};
|
|
14
|
-
function
|
|
14
|
+
function un(t) {
|
|
15
15
|
for (var e = 0; e < t.length; e++)
|
|
16
16
|
t[e]();
|
|
17
17
|
}
|
|
18
|
-
function
|
|
19
|
-
var t, e, n = new Promise((
|
|
20
|
-
t =
|
|
18
|
+
function ye() {
|
|
19
|
+
var t, e, n = new Promise((r, i) => {
|
|
20
|
+
t = r, e = i;
|
|
21
21
|
});
|
|
22
22
|
return { promise: n, resolve: t, reject: e };
|
|
23
23
|
}
|
|
24
|
-
const E = 2,
|
|
24
|
+
const E = 2, bt = 4, yt = 8, le = 1 << 24, st = 16, W = 32, xt = 64, cn = 128, D = 512, b = 1024, x = 2048, Y = 4096, F = 8192, K = 16384, Tt = 32768, kt = 65536, hn = 1 << 18, Xt = 1 << 19, dn = 1 << 20, it = 65536, Kt = 1 << 21, ke = 1 << 22, J = 1 << 23, vn = /* @__PURE__ */ Symbol(""), tt = new class extends Error {
|
|
25
25
|
constructor() {
|
|
26
26
|
super(...arguments);
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
U(this, "name", "StaleReactionError");
|
|
28
|
+
U(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
|
|
29
29
|
}
|
|
30
30
|
}();
|
|
31
|
-
function
|
|
31
|
+
function _n() {
|
|
32
32
|
throw new Error("https://svelte.dev/e/async_derived_orphan");
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function pn() {
|
|
35
35
|
throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function Me(t) {
|
|
38
38
|
return t === this.v;
|
|
39
39
|
}
|
|
40
|
-
let
|
|
41
|
-
function
|
|
42
|
-
|
|
40
|
+
let wn = !1, B = null;
|
|
41
|
+
function Ft(t) {
|
|
42
|
+
B = t;
|
|
43
|
+
}
|
|
44
|
+
function mn(t, e = !1, n) {
|
|
45
|
+
B = {
|
|
46
|
+
p: B,
|
|
47
|
+
i: !1,
|
|
48
|
+
c: null,
|
|
49
|
+
e: null,
|
|
50
|
+
s: t,
|
|
51
|
+
x: null,
|
|
52
|
+
l: null
|
|
53
|
+
};
|
|
43
54
|
}
|
|
44
|
-
function
|
|
55
|
+
function gn(t) {
|
|
56
|
+
var e = (
|
|
57
|
+
/** @type {ComponentContext} */
|
|
58
|
+
B
|
|
59
|
+
), n = e.e;
|
|
60
|
+
if (n !== null) {
|
|
61
|
+
e.e = null;
|
|
62
|
+
for (var r of n)
|
|
63
|
+
Un(r);
|
|
64
|
+
}
|
|
65
|
+
return e.i = !0, B = e.p, /** @type {T} */
|
|
66
|
+
{};
|
|
67
|
+
}
|
|
68
|
+
function bn() {
|
|
45
69
|
return !0;
|
|
46
70
|
}
|
|
47
|
-
let
|
|
48
|
-
function
|
|
49
|
-
var t =
|
|
50
|
-
|
|
71
|
+
let ot = [];
|
|
72
|
+
function xn() {
|
|
73
|
+
var t = ot;
|
|
74
|
+
ot = [], un(t);
|
|
51
75
|
}
|
|
52
|
-
function
|
|
53
|
-
if (
|
|
54
|
-
var e =
|
|
76
|
+
function de(t) {
|
|
77
|
+
if (ot.length === 0) {
|
|
78
|
+
var e = ot;
|
|
55
79
|
queueMicrotask(() => {
|
|
56
|
-
e ===
|
|
80
|
+
e === ot && xn();
|
|
57
81
|
});
|
|
58
82
|
}
|
|
59
|
-
|
|
83
|
+
ot.push(t);
|
|
60
84
|
}
|
|
61
|
-
function
|
|
85
|
+
function En(t) {
|
|
62
86
|
var e = _;
|
|
63
87
|
if (e === null)
|
|
64
|
-
return
|
|
65
|
-
if ((e.f &
|
|
88
|
+
return h.f |= J, t;
|
|
89
|
+
if ((e.f & Tt) === 0 && (e.f & bt) === 0)
|
|
66
90
|
throw t;
|
|
67
|
-
|
|
91
|
+
Lt(t, e);
|
|
68
92
|
}
|
|
69
|
-
function
|
|
93
|
+
function Lt(t, e) {
|
|
70
94
|
for (; e !== null; ) {
|
|
71
|
-
if ((e.f &
|
|
72
|
-
if ((e.f &
|
|
95
|
+
if ((e.f & cn) !== 0) {
|
|
96
|
+
if ((e.f & Tt) === 0)
|
|
73
97
|
throw t;
|
|
74
98
|
try {
|
|
75
99
|
e.b.error(t);
|
|
@@ -82,79 +106,79 @@ function Ft(t, e) {
|
|
|
82
106
|
}
|
|
83
107
|
throw t;
|
|
84
108
|
}
|
|
85
|
-
const
|
|
109
|
+
const yn = -7169;
|
|
86
110
|
function m(t, e) {
|
|
87
|
-
t.f = t.f &
|
|
111
|
+
t.f = t.f & yn | e;
|
|
88
112
|
}
|
|
89
|
-
function
|
|
90
|
-
(t.f & D) !== 0 || t.deps === null ? m(t,
|
|
113
|
+
function oe(t) {
|
|
114
|
+
(t.f & D) !== 0 || t.deps === null ? m(t, b) : m(t, Y);
|
|
91
115
|
}
|
|
92
|
-
function
|
|
116
|
+
function Se(t) {
|
|
93
117
|
if (t !== null)
|
|
94
118
|
for (const e of t)
|
|
95
|
-
(e.f & E) === 0 || (e.f &
|
|
119
|
+
(e.f & E) === 0 || (e.f & it) === 0 || (e.f ^= it, Se(
|
|
96
120
|
/** @type {Derived} */
|
|
97
121
|
e.deps
|
|
98
122
|
));
|
|
99
123
|
}
|
|
100
|
-
function
|
|
101
|
-
(t.f &
|
|
124
|
+
function kn(t, e, n) {
|
|
125
|
+
(t.f & x) !== 0 ? e.add(t) : (t.f & Y) !== 0 && n.add(t), Se(t.deps), m(t, b);
|
|
102
126
|
}
|
|
103
|
-
const
|
|
104
|
-
let p = null, I = null, N = [],
|
|
105
|
-
var
|
|
106
|
-
const
|
|
127
|
+
const Rt = /* @__PURE__ */ new Set();
|
|
128
|
+
let p = null, I = null, N = [], fe = null, vt = null, Mn = 1;
|
|
129
|
+
var q, at, nt, ut, ct, ht, G, P, dt, k, Jt, Qt, $t, te;
|
|
130
|
+
const ce = class ce {
|
|
107
131
|
constructor() {
|
|
108
|
-
|
|
132
|
+
g(this, k);
|
|
109
133
|
// for debugging. TODO remove once async is stable
|
|
110
|
-
|
|
134
|
+
U(this, "id", Mn++);
|
|
111
135
|
/**
|
|
112
136
|
* The current values of any sources that are updated in this batch
|
|
113
137
|
* They keys of this map are identical to `this.#previous`
|
|
114
138
|
* @type {Map<Source, any>}
|
|
115
139
|
*/
|
|
116
|
-
|
|
140
|
+
U(this, "current", /* @__PURE__ */ new Map());
|
|
117
141
|
/**
|
|
118
142
|
* The values of any sources that are updated in this batch _before_ those updates took place.
|
|
119
143
|
* They keys of this map are identical to `this.#current`
|
|
120
144
|
* @type {Map<Source, any>}
|
|
121
145
|
*/
|
|
122
|
-
|
|
146
|
+
U(this, "previous", /* @__PURE__ */ new Map());
|
|
123
147
|
/**
|
|
124
148
|
* When the batch is committed (and the DOM is updated), we need to remove old branches
|
|
125
149
|
* and append new ones by calling the functions added inside (if/each/key/etc) blocks
|
|
126
150
|
* @type {Set<(batch: Batch) => void>}
|
|
127
151
|
*/
|
|
128
|
-
|
|
152
|
+
g(this, q, /* @__PURE__ */ new Set());
|
|
129
153
|
/**
|
|
130
154
|
* If a fork is discarded, we need to destroy any effects that are no longer needed
|
|
131
155
|
* @type {Set<(batch: Batch) => void>}
|
|
132
156
|
*/
|
|
133
|
-
|
|
157
|
+
g(this, at, /* @__PURE__ */ new Set());
|
|
134
158
|
/**
|
|
135
159
|
* The number of async effects that are currently in flight
|
|
136
160
|
*/
|
|
137
|
-
|
|
161
|
+
g(this, nt, 0);
|
|
138
162
|
/**
|
|
139
163
|
* The number of async effects that are currently in flight, _not_ inside a pending boundary
|
|
140
164
|
*/
|
|
141
|
-
|
|
165
|
+
g(this, ut, 0);
|
|
142
166
|
/**
|
|
143
167
|
* A deferred that resolves when the batch is committed, used with `settled()`
|
|
144
168
|
* TODO replace with Promise.withResolvers once supported widely enough
|
|
145
169
|
* @type {{ promise: Promise<void>, resolve: (value?: any) => void, reject: (reason: unknown) => void } | null}
|
|
146
170
|
*/
|
|
147
|
-
|
|
171
|
+
g(this, ct, null);
|
|
148
172
|
/**
|
|
149
173
|
* Deferred effects (which run after async work has completed) that are DIRTY
|
|
150
174
|
* @type {Set<Effect>}
|
|
151
175
|
*/
|
|
152
|
-
|
|
176
|
+
g(this, ht, /* @__PURE__ */ new Set());
|
|
153
177
|
/**
|
|
154
178
|
* Deferred effects that are MAYBE_DIRTY
|
|
155
179
|
* @type {Set<Effect>}
|
|
156
180
|
*/
|
|
157
|
-
|
|
181
|
+
g(this, G, /* @__PURE__ */ new Set());
|
|
158
182
|
/**
|
|
159
183
|
* A map of branches that still exist, but will be destroyed when this batch
|
|
160
184
|
* is committed — we skip over these during `process`.
|
|
@@ -162,16 +186,16 @@ const ue = class ue {
|
|
|
162
186
|
* so they can be rescheduled if the branch survives.
|
|
163
187
|
* @type {Map<Effect, { d: Effect[], m: Effect[] }>}
|
|
164
188
|
*/
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
189
|
+
g(this, P, /* @__PURE__ */ new Map());
|
|
190
|
+
U(this, "is_fork", !1);
|
|
191
|
+
g(this, dt, !1);
|
|
168
192
|
}
|
|
169
193
|
/**
|
|
170
194
|
* Add an effect to the #skipped_branches map and reset its children
|
|
171
195
|
* @param {Effect} effect
|
|
172
196
|
*/
|
|
173
197
|
skip_effect(e) {
|
|
174
|
-
o(this,
|
|
198
|
+
o(this, P).has(e) || o(this, P).set(e, { d: [], m: [] });
|
|
175
199
|
}
|
|
176
200
|
/**
|
|
177
201
|
* Remove an effect from the #skipped_branches map and reschedule
|
|
@@ -179,13 +203,13 @@ const ue = class ue {
|
|
|
179
203
|
* @param {Effect} effect
|
|
180
204
|
*/
|
|
181
205
|
unskip_effect(e) {
|
|
182
|
-
var n = o(this,
|
|
206
|
+
var n = o(this, P).get(e);
|
|
183
207
|
if (n) {
|
|
184
|
-
o(this,
|
|
185
|
-
for (var
|
|
186
|
-
m(
|
|
187
|
-
for (
|
|
188
|
-
m(
|
|
208
|
+
o(this, P).delete(e);
|
|
209
|
+
for (var r of n.d)
|
|
210
|
+
m(r, x), Z(r);
|
|
211
|
+
for (r of n.m)
|
|
212
|
+
m(r, Y), Z(r);
|
|
189
213
|
}
|
|
190
214
|
}
|
|
191
215
|
/**
|
|
@@ -194,17 +218,17 @@ const ue = class ue {
|
|
|
194
218
|
*/
|
|
195
219
|
process(e) {
|
|
196
220
|
N = [], this.apply();
|
|
197
|
-
var n =
|
|
198
|
-
for (const
|
|
199
|
-
|
|
200
|
-
if (
|
|
201
|
-
|
|
202
|
-
for (const [
|
|
203
|
-
|
|
221
|
+
var n = vt = [], r = [];
|
|
222
|
+
for (const i of e)
|
|
223
|
+
V(this, k, Qt).call(this, i, n, r);
|
|
224
|
+
if (vt = null, V(this, k, Jt).call(this)) {
|
|
225
|
+
V(this, k, $t).call(this, r), V(this, k, $t).call(this, n);
|
|
226
|
+
for (const [i, s] of o(this, P))
|
|
227
|
+
Ae(i, s);
|
|
204
228
|
} else {
|
|
205
229
|
p = null;
|
|
206
|
-
for (const
|
|
207
|
-
o(this,
|
|
230
|
+
for (const i of o(this, q)) i(this);
|
|
231
|
+
o(this, q).clear(), o(this, nt) === 0 && V(this, k, te).call(this), ve(r), ve(n), o(this, ht).clear(), o(this, G).clear(), o(this, ct)?.resolve();
|
|
208
232
|
}
|
|
209
233
|
I = null;
|
|
210
234
|
}
|
|
@@ -215,7 +239,7 @@ const ue = class ue {
|
|
|
215
239
|
* @param {any} value
|
|
216
240
|
*/
|
|
217
241
|
capture(e, n) {
|
|
218
|
-
n !==
|
|
242
|
+
n !== jt && !this.previous.has(e) && this.previous.set(e, n), (e.f & J) === 0 && (this.current.set(e, e.v), I?.set(e, e.v));
|
|
219
243
|
}
|
|
220
244
|
activate() {
|
|
221
245
|
p = this, this.apply();
|
|
@@ -225,55 +249,55 @@ const ue = class ue {
|
|
|
225
249
|
}
|
|
226
250
|
flush() {
|
|
227
251
|
if (N.length > 0)
|
|
228
|
-
p = this,
|
|
229
|
-
else if (o(this,
|
|
230
|
-
for (const e of o(this,
|
|
231
|
-
o(this,
|
|
252
|
+
p = this, Sn();
|
|
253
|
+
else if (o(this, nt) === 0 && !this.is_fork) {
|
|
254
|
+
for (const e of o(this, q)) e(this);
|
|
255
|
+
o(this, q).clear(), V(this, k, te).call(this), o(this, ct)?.resolve();
|
|
232
256
|
}
|
|
233
257
|
this.deactivate();
|
|
234
258
|
}
|
|
235
259
|
discard() {
|
|
236
|
-
for (const e of o(this,
|
|
237
|
-
o(this,
|
|
260
|
+
for (const e of o(this, at)) e(this);
|
|
261
|
+
o(this, at).clear();
|
|
238
262
|
}
|
|
239
263
|
/**
|
|
240
264
|
*
|
|
241
265
|
* @param {boolean} blocking
|
|
242
266
|
*/
|
|
243
267
|
increment(e) {
|
|
244
|
-
X(this,
|
|
268
|
+
X(this, nt, o(this, nt) + 1), e && X(this, ut, o(this, ut) + 1);
|
|
245
269
|
}
|
|
246
270
|
/**
|
|
247
271
|
*
|
|
248
272
|
* @param {boolean} blocking
|
|
249
273
|
*/
|
|
250
274
|
decrement(e) {
|
|
251
|
-
X(this,
|
|
252
|
-
X(this,
|
|
275
|
+
X(this, nt, o(this, nt) - 1), e && X(this, ut, o(this, ut) - 1), !o(this, dt) && (X(this, dt, !0), de(() => {
|
|
276
|
+
X(this, dt, !1), V(this, k, Jt).call(this) ? N.length > 0 && this.flush() : this.revive();
|
|
253
277
|
}));
|
|
254
278
|
}
|
|
255
279
|
revive() {
|
|
256
|
-
for (const e of o(this,
|
|
257
|
-
o(this,
|
|
258
|
-
for (const e of o(this,
|
|
259
|
-
m(e, Y),
|
|
280
|
+
for (const e of o(this, ht))
|
|
281
|
+
o(this, G).delete(e), m(e, x), Z(e);
|
|
282
|
+
for (const e of o(this, G))
|
|
283
|
+
m(e, Y), Z(e);
|
|
260
284
|
this.flush();
|
|
261
285
|
}
|
|
262
286
|
/** @param {(batch: Batch) => void} fn */
|
|
263
287
|
oncommit(e) {
|
|
264
|
-
o(this,
|
|
288
|
+
o(this, q).add(e);
|
|
265
289
|
}
|
|
266
290
|
/** @param {(batch: Batch) => void} fn */
|
|
267
291
|
ondiscard(e) {
|
|
268
|
-
o(this,
|
|
292
|
+
o(this, at).add(e);
|
|
269
293
|
}
|
|
270
294
|
settled() {
|
|
271
|
-
return (o(this,
|
|
295
|
+
return (o(this, ct) ?? X(this, ct, ye())).promise;
|
|
272
296
|
}
|
|
273
297
|
static ensure() {
|
|
274
298
|
if (p === null) {
|
|
275
|
-
const e = p = new
|
|
276
|
-
|
|
299
|
+
const e = p = new ce();
|
|
300
|
+
Rt.add(p), de(() => {
|
|
277
301
|
p === e && e.flush();
|
|
278
302
|
});
|
|
279
303
|
}
|
|
@@ -282,8 +306,8 @@ const ue = class ue {
|
|
|
282
306
|
apply() {
|
|
283
307
|
}
|
|
284
308
|
};
|
|
285
|
-
|
|
286
|
-
return this.is_fork || o(this,
|
|
309
|
+
q = new WeakMap(), at = new WeakMap(), nt = new WeakMap(), ut = new WeakMap(), ct = new WeakMap(), ht = new WeakMap(), G = new WeakMap(), P = new WeakMap(), dt = new WeakMap(), k = new WeakSet(), Jt = function() {
|
|
310
|
+
return this.is_fork || o(this, ut) > 0;
|
|
287
311
|
}, /**
|
|
288
312
|
* Traverse the effect tree, executing effects or stashing
|
|
289
313
|
* them for later execution as appropriate
|
|
@@ -291,25 +315,25 @@ B = new WeakMap(), ot = new WeakMap(), tt = new WeakMap(), ft = new WeakMap(), a
|
|
|
291
315
|
* @param {Effect[]} effects
|
|
292
316
|
* @param {Effect[]} render_effects
|
|
293
317
|
*/
|
|
294
|
-
Qt = function(e, n,
|
|
295
|
-
e.f ^=
|
|
296
|
-
for (var
|
|
297
|
-
var
|
|
298
|
-
if (!c &&
|
|
299
|
-
l ? a || (
|
|
300
|
-
var
|
|
301
|
-
if (
|
|
302
|
-
|
|
318
|
+
Qt = function(e, n, r) {
|
|
319
|
+
e.f ^= b;
|
|
320
|
+
for (var i = e.first; i !== null; ) {
|
|
321
|
+
var s = i.f, l = (s & (W | xt)) !== 0, f = l && (s & b) !== 0, a = (s & F) !== 0, c = f || o(this, P).has(i);
|
|
322
|
+
if (!c && i.fn !== null) {
|
|
323
|
+
l ? a || (i.f ^= b) : (s & bt) !== 0 ? n.push(i) : (s & (yt | le)) !== 0 && a ? r.push(i) : At(i) && (gt(i), (s & st) !== 0 && (o(this, G).add(i), a && m(i, x)));
|
|
324
|
+
var d = i.first;
|
|
325
|
+
if (d !== null) {
|
|
326
|
+
i = d;
|
|
303
327
|
continue;
|
|
304
328
|
}
|
|
305
329
|
}
|
|
306
|
-
for (;
|
|
307
|
-
var u =
|
|
330
|
+
for (; i !== null; ) {
|
|
331
|
+
var u = i.next;
|
|
308
332
|
if (u !== null) {
|
|
309
|
-
|
|
333
|
+
i = u;
|
|
310
334
|
break;
|
|
311
335
|
}
|
|
312
|
-
|
|
336
|
+
i = i.parent;
|
|
313
337
|
}
|
|
314
338
|
}
|
|
315
339
|
}, /**
|
|
@@ -317,22 +341,22 @@ Qt = function(e, n, s) {
|
|
|
317
341
|
*/
|
|
318
342
|
$t = function(e) {
|
|
319
343
|
for (var n = 0; n < e.length; n += 1)
|
|
320
|
-
|
|
344
|
+
kn(e[n], o(this, ht), o(this, G));
|
|
321
345
|
}, te = function() {
|
|
322
|
-
var
|
|
323
|
-
if (
|
|
346
|
+
var s;
|
|
347
|
+
if (Rt.size > 1) {
|
|
324
348
|
this.previous.clear();
|
|
325
|
-
var e = p, n = I,
|
|
326
|
-
for (const l of
|
|
349
|
+
var e = p, n = I, r = !0;
|
|
350
|
+
for (const l of Rt) {
|
|
327
351
|
if (l === this) {
|
|
328
|
-
|
|
352
|
+
r = !1;
|
|
329
353
|
continue;
|
|
330
354
|
}
|
|
331
355
|
const f = [];
|
|
332
|
-
for (const [c,
|
|
356
|
+
for (const [c, d] of this.current) {
|
|
333
357
|
if (l.current.has(c))
|
|
334
|
-
if (
|
|
335
|
-
l.current.set(c,
|
|
358
|
+
if (r && d !== l.current.get(c))
|
|
359
|
+
l.current.set(c, d);
|
|
336
360
|
else
|
|
337
361
|
continue;
|
|
338
362
|
f.push(c);
|
|
@@ -341,174 +365,174 @@ $t = function(e) {
|
|
|
341
365
|
continue;
|
|
342
366
|
const a = [...l.current.keys()].filter((c) => !this.current.has(c));
|
|
343
367
|
if (a.length > 0) {
|
|
344
|
-
var
|
|
368
|
+
var i = N;
|
|
345
369
|
N = [];
|
|
346
|
-
const c = /* @__PURE__ */ new Set(),
|
|
370
|
+
const c = /* @__PURE__ */ new Set(), d = /* @__PURE__ */ new Map();
|
|
347
371
|
for (const u of f)
|
|
348
|
-
|
|
372
|
+
Ce(u, a, c, d);
|
|
349
373
|
if (N.length > 0) {
|
|
350
374
|
p = l, l.apply();
|
|
351
375
|
for (const u of N)
|
|
352
|
-
|
|
376
|
+
V(s = l, k, Qt).call(s, u, [], []);
|
|
353
377
|
l.deactivate();
|
|
354
378
|
}
|
|
355
|
-
N =
|
|
379
|
+
N = i;
|
|
356
380
|
}
|
|
357
381
|
}
|
|
358
382
|
p = e, I = n;
|
|
359
383
|
}
|
|
360
|
-
o(this,
|
|
384
|
+
o(this, P).clear(), Rt.delete(this);
|
|
361
385
|
};
|
|
362
|
-
let
|
|
363
|
-
function
|
|
386
|
+
let It = ce;
|
|
387
|
+
function Sn() {
|
|
364
388
|
var t = null;
|
|
365
389
|
try {
|
|
366
390
|
for (var e = 0; N.length > 0; ) {
|
|
367
|
-
var n =
|
|
391
|
+
var n = It.ensure();
|
|
368
392
|
if (e++ > 1e3) {
|
|
369
|
-
var
|
|
370
|
-
|
|
393
|
+
var r, i;
|
|
394
|
+
Cn();
|
|
371
395
|
}
|
|
372
|
-
n.process(N),
|
|
396
|
+
n.process(N), Q.clear();
|
|
373
397
|
}
|
|
374
398
|
} finally {
|
|
375
|
-
N = [],
|
|
399
|
+
N = [], fe = null, vt = null;
|
|
376
400
|
}
|
|
377
401
|
}
|
|
378
|
-
function
|
|
402
|
+
function Cn() {
|
|
379
403
|
try {
|
|
380
|
-
|
|
404
|
+
pn();
|
|
381
405
|
} catch (t) {
|
|
382
|
-
|
|
406
|
+
Lt(t, fe);
|
|
383
407
|
}
|
|
384
408
|
}
|
|
385
|
-
let
|
|
409
|
+
let z = null;
|
|
386
410
|
function ve(t) {
|
|
387
411
|
var e = t.length;
|
|
388
412
|
if (e !== 0) {
|
|
389
413
|
for (var n = 0; n < e; ) {
|
|
390
|
-
var
|
|
391
|
-
if ((
|
|
392
|
-
|
|
393
|
-
for (const
|
|
394
|
-
if ((
|
|
395
|
-
const
|
|
396
|
-
let l =
|
|
414
|
+
var r = t[n++];
|
|
415
|
+
if ((r.f & (K | F)) === 0 && At(r) && (z = /* @__PURE__ */ new Set(), gt(r), r.deps === null && r.first === null && r.nodes === null && r.teardown === null && r.ac === null && Xe(r), z?.size > 0)) {
|
|
416
|
+
Q.clear();
|
|
417
|
+
for (const i of z) {
|
|
418
|
+
if ((i.f & (K | F)) !== 0) continue;
|
|
419
|
+
const s = [i];
|
|
420
|
+
let l = i.parent;
|
|
397
421
|
for (; l !== null; )
|
|
398
|
-
|
|
399
|
-
for (let f =
|
|
400
|
-
const a =
|
|
401
|
-
(a.f & (
|
|
422
|
+
z.has(l) && (z.delete(l), s.push(l)), l = l.parent;
|
|
423
|
+
for (let f = s.length - 1; f >= 0; f--) {
|
|
424
|
+
const a = s[f];
|
|
425
|
+
(a.f & (K | F)) === 0 && gt(a);
|
|
402
426
|
}
|
|
403
427
|
}
|
|
404
|
-
|
|
428
|
+
z.clear();
|
|
405
429
|
}
|
|
406
430
|
}
|
|
407
|
-
|
|
431
|
+
z = null;
|
|
408
432
|
}
|
|
409
433
|
}
|
|
410
|
-
function
|
|
434
|
+
function Ce(t, e, n, r) {
|
|
411
435
|
if (!n.has(t) && (n.add(t), t.reactions !== null))
|
|
412
|
-
for (const
|
|
413
|
-
const
|
|
414
|
-
(
|
|
436
|
+
for (const i of t.reactions) {
|
|
437
|
+
const s = i.f;
|
|
438
|
+
(s & E) !== 0 ? Ce(
|
|
415
439
|
/** @type {Derived} */
|
|
416
|
-
|
|
440
|
+
i,
|
|
417
441
|
e,
|
|
418
442
|
n,
|
|
419
|
-
s
|
|
420
|
-
) : (i & (xe | st)) !== 0 && (i & b) === 0 && Se(r, e, s) && (m(r, b), q(
|
|
421
|
-
/** @type {Effect} */
|
|
422
443
|
r
|
|
444
|
+
) : (s & (ke | st)) !== 0 && (s & x) === 0 && Te(i, e, r) && (m(i, x), Z(
|
|
445
|
+
/** @type {Effect} */
|
|
446
|
+
i
|
|
423
447
|
));
|
|
424
448
|
}
|
|
425
449
|
}
|
|
426
|
-
function
|
|
427
|
-
const
|
|
428
|
-
if (
|
|
450
|
+
function Te(t, e, n) {
|
|
451
|
+
const r = n.get(t);
|
|
452
|
+
if (r !== void 0) return r;
|
|
429
453
|
if (t.deps !== null)
|
|
430
|
-
for (const
|
|
431
|
-
if (
|
|
454
|
+
for (const i of t.deps) {
|
|
455
|
+
if (Et.call(e, i))
|
|
432
456
|
return !0;
|
|
433
|
-
if ((
|
|
457
|
+
if ((i.f & E) !== 0 && Te(
|
|
434
458
|
/** @type {Derived} */
|
|
435
|
-
|
|
459
|
+
i,
|
|
436
460
|
e,
|
|
437
461
|
n
|
|
438
462
|
))
|
|
439
463
|
return n.set(
|
|
440
464
|
/** @type {Derived} */
|
|
441
|
-
|
|
465
|
+
i,
|
|
442
466
|
!0
|
|
443
467
|
), !0;
|
|
444
468
|
}
|
|
445
469
|
return n.set(t, !1), !1;
|
|
446
470
|
}
|
|
447
|
-
function
|
|
448
|
-
var e =
|
|
449
|
-
if (n?.is_pending && (t.f & (
|
|
471
|
+
function Z(t) {
|
|
472
|
+
var e = fe = t, n = e.b;
|
|
473
|
+
if (n?.is_pending && (t.f & (bt | yt | le)) !== 0 && (t.f & Tt) === 0) {
|
|
450
474
|
n.defer_effect(t);
|
|
451
475
|
return;
|
|
452
476
|
}
|
|
453
477
|
for (; e.parent !== null; ) {
|
|
454
478
|
e = e.parent;
|
|
455
|
-
var
|
|
456
|
-
if (
|
|
479
|
+
var r = e.f;
|
|
480
|
+
if (vt !== null && e === _ && (t.f & yt) === 0)
|
|
457
481
|
return;
|
|
458
|
-
if ((
|
|
459
|
-
if ((
|
|
482
|
+
if ((r & (xt | W)) !== 0) {
|
|
483
|
+
if ((r & b) === 0)
|
|
460
484
|
return;
|
|
461
|
-
e.f ^=
|
|
485
|
+
e.f ^= b;
|
|
462
486
|
}
|
|
463
487
|
}
|
|
464
488
|
N.push(e);
|
|
465
489
|
}
|
|
466
|
-
function
|
|
467
|
-
if (!((t.f & W) !== 0 && (t.f &
|
|
468
|
-
(t.f &
|
|
490
|
+
function Ae(t, e) {
|
|
491
|
+
if (!((t.f & W) !== 0 && (t.f & b) !== 0)) {
|
|
492
|
+
(t.f & x) !== 0 ? e.d.push(t) : (t.f & Y) !== 0 && e.m.push(t), m(t, b);
|
|
469
493
|
for (var n = t.first; n !== null; )
|
|
470
|
-
|
|
494
|
+
Ae(n, e), n = n.next;
|
|
471
495
|
}
|
|
472
496
|
}
|
|
473
|
-
function
|
|
474
|
-
const
|
|
475
|
-
var
|
|
476
|
-
if (n.length === 0 &&
|
|
477
|
-
|
|
497
|
+
function Tn(t, e, n, r) {
|
|
498
|
+
const i = Re;
|
|
499
|
+
var s = t.filter((u) => !u.settled);
|
|
500
|
+
if (n.length === 0 && s.length === 0) {
|
|
501
|
+
r(e.map(i));
|
|
478
502
|
return;
|
|
479
503
|
}
|
|
480
504
|
var l = (
|
|
481
505
|
/** @type {Effect} */
|
|
482
506
|
_
|
|
483
|
-
), f =
|
|
507
|
+
), f = An(), a = s.length === 1 ? s[0].promise : s.length > 1 ? Promise.all(s.map((u) => u.promise)) : null;
|
|
484
508
|
function c(u) {
|
|
485
509
|
f();
|
|
486
510
|
try {
|
|
487
|
-
|
|
488
|
-
} catch (
|
|
489
|
-
(l.f &
|
|
511
|
+
r(u);
|
|
512
|
+
} catch (w) {
|
|
513
|
+
(l.f & K) === 0 && Lt(w, l);
|
|
490
514
|
}
|
|
491
515
|
ee();
|
|
492
516
|
}
|
|
493
517
|
if (n.length === 0) {
|
|
494
|
-
a.then(() => c(e.map(
|
|
518
|
+
a.then(() => c(e.map(i)));
|
|
495
519
|
return;
|
|
496
520
|
}
|
|
497
|
-
function
|
|
498
|
-
f(), Promise.all(n.map((u) => /* @__PURE__ */
|
|
521
|
+
function d() {
|
|
522
|
+
f(), Promise.all(n.map((u) => /* @__PURE__ */ Nn(u))).then((u) => c([...e.map(i), ...u])).catch((u) => Lt(u, l));
|
|
499
523
|
}
|
|
500
|
-
a ? a.then(
|
|
524
|
+
a ? a.then(d) : d();
|
|
501
525
|
}
|
|
502
|
-
function
|
|
503
|
-
var t = _, e =
|
|
504
|
-
return function(
|
|
505
|
-
|
|
526
|
+
function An() {
|
|
527
|
+
var t = _, e = h, n = B, r = p;
|
|
528
|
+
return function(s = !0) {
|
|
529
|
+
mt(t), wt(e), Ft(n), s && r?.activate();
|
|
506
530
|
};
|
|
507
531
|
}
|
|
508
532
|
function ee(t = !0) {
|
|
509
|
-
|
|
533
|
+
mt(null), wt(null), Ft(null), t && p?.deactivate();
|
|
510
534
|
}
|
|
511
|
-
function
|
|
535
|
+
function Rn() {
|
|
512
536
|
var t = (
|
|
513
537
|
/** @type {Boundary} */
|
|
514
538
|
/** @type {Effect} */
|
|
@@ -522,23 +546,23 @@ function xn() {
|
|
|
522
546
|
};
|
|
523
547
|
}
|
|
524
548
|
// @__NO_SIDE_EFFECTS__
|
|
525
|
-
function
|
|
526
|
-
var e = E |
|
|
549
|
+
function Re(t) {
|
|
550
|
+
var e = E | x, n = h !== null && (h.f & E) !== 0 ? (
|
|
527
551
|
/** @type {Derived} */
|
|
528
|
-
|
|
552
|
+
h
|
|
529
553
|
) : null;
|
|
530
|
-
return _ !== null && (_.f |=
|
|
531
|
-
ctx:
|
|
554
|
+
return _ !== null && (_.f |= Xt), {
|
|
555
|
+
ctx: B,
|
|
532
556
|
deps: null,
|
|
533
557
|
effects: null,
|
|
534
|
-
equals:
|
|
558
|
+
equals: Me,
|
|
535
559
|
f: e,
|
|
536
560
|
fn: t,
|
|
537
561
|
reactions: null,
|
|
538
562
|
rv: 0,
|
|
539
563
|
v: (
|
|
540
564
|
/** @type {V} */
|
|
541
|
-
|
|
565
|
+
jt
|
|
542
566
|
),
|
|
543
567
|
wv: 0,
|
|
544
568
|
parent: n ?? _,
|
|
@@ -546,74 +570,79 @@ function yn(t) {
|
|
|
546
570
|
};
|
|
547
571
|
}
|
|
548
572
|
// @__NO_SIDE_EFFECTS__
|
|
549
|
-
function
|
|
573
|
+
function Nn(t, e, n) {
|
|
550
574
|
/** @type {Effect | null} */
|
|
551
|
-
_ === null &&
|
|
552
|
-
var
|
|
575
|
+
_ === null && _n();
|
|
576
|
+
var i = (
|
|
553
577
|
/** @type {Promise<V>} */
|
|
554
578
|
/** @type {unknown} */
|
|
555
579
|
void 0
|
|
556
|
-
),
|
|
580
|
+
), s = Pn(
|
|
557
581
|
/** @type {V} */
|
|
558
|
-
|
|
559
|
-
), l = !
|
|
560
|
-
return
|
|
561
|
-
var a =
|
|
562
|
-
|
|
582
|
+
jt
|
|
583
|
+
), l = !h, f = /* @__PURE__ */ new Map();
|
|
584
|
+
return Gn(() => {
|
|
585
|
+
var a = ye();
|
|
586
|
+
i = a.promise;
|
|
563
587
|
try {
|
|
564
588
|
Promise.resolve(t()).then(a.resolve, a.reject).finally(ee);
|
|
565
|
-
} catch (
|
|
566
|
-
a.reject(
|
|
589
|
+
} catch (w) {
|
|
590
|
+
a.reject(w), ee();
|
|
567
591
|
}
|
|
568
592
|
var c = (
|
|
569
593
|
/** @type {Batch} */
|
|
570
594
|
p
|
|
571
595
|
);
|
|
572
596
|
if (l) {
|
|
573
|
-
var
|
|
574
|
-
f.get(c)?.reject(
|
|
597
|
+
var d = Rn();
|
|
598
|
+
f.get(c)?.reject(tt), f.delete(c), f.set(c, a);
|
|
575
599
|
}
|
|
576
|
-
const u = (
|
|
577
|
-
if (c.activate(),
|
|
578
|
-
|
|
600
|
+
const u = (w, v = void 0) => {
|
|
601
|
+
if (c.activate(), v)
|
|
602
|
+
v !== tt && (s.f |= J, _e(s, v));
|
|
579
603
|
else {
|
|
580
|
-
(
|
|
581
|
-
for (const [
|
|
582
|
-
if (f.delete(
|
|
583
|
-
M.reject(
|
|
604
|
+
(s.f & J) !== 0 && (s.f ^= J), _e(s, w);
|
|
605
|
+
for (const [j, M] of f) {
|
|
606
|
+
if (f.delete(j), j === c) break;
|
|
607
|
+
M.reject(tt);
|
|
584
608
|
}
|
|
585
609
|
}
|
|
586
|
-
|
|
610
|
+
d && d();
|
|
587
611
|
};
|
|
588
|
-
a.promise.then(u, (
|
|
589
|
-
}),
|
|
612
|
+
a.promise.then(u, (w) => u(null, w || "unknown"));
|
|
613
|
+
}), Wn(() => {
|
|
590
614
|
for (const a of f.values())
|
|
591
|
-
a.reject(
|
|
615
|
+
a.reject(tt);
|
|
592
616
|
}), new Promise((a) => {
|
|
593
|
-
function c(
|
|
617
|
+
function c(d) {
|
|
594
618
|
function u() {
|
|
595
|
-
|
|
619
|
+
d === i ? a(s) : c(i);
|
|
596
620
|
}
|
|
597
|
-
|
|
621
|
+
d.then(u, u);
|
|
598
622
|
}
|
|
599
|
-
c(
|
|
623
|
+
c(i);
|
|
600
624
|
});
|
|
601
625
|
}
|
|
602
|
-
|
|
626
|
+
// @__NO_SIDE_EFFECTS__
|
|
627
|
+
function Dn(t) {
|
|
628
|
+
const e = /* @__PURE__ */ Re(t);
|
|
629
|
+
return er(e), e;
|
|
630
|
+
}
|
|
631
|
+
function Fn(t) {
|
|
603
632
|
var e = t.effects;
|
|
604
633
|
if (e !== null) {
|
|
605
634
|
t.effects = null;
|
|
606
635
|
for (var n = 0; n < e.length; n += 1)
|
|
607
|
-
|
|
636
|
+
$(
|
|
608
637
|
/** @type {Effect} */
|
|
609
638
|
e[n]
|
|
610
639
|
);
|
|
611
640
|
}
|
|
612
641
|
}
|
|
613
|
-
function
|
|
642
|
+
function Ln(t) {
|
|
614
643
|
for (var e = t.parent; e !== null; ) {
|
|
615
644
|
if ((e.f & E) === 0)
|
|
616
|
-
return (e.f &
|
|
645
|
+
return (e.f & K) === 0 ? (
|
|
617
646
|
/** @type {Effect} */
|
|
618
647
|
e
|
|
619
648
|
) : null;
|
|
@@ -621,155 +650,155 @@ function Sn(t) {
|
|
|
621
650
|
}
|
|
622
651
|
return null;
|
|
623
652
|
}
|
|
624
|
-
function
|
|
653
|
+
function ae(t) {
|
|
625
654
|
var e, n = _;
|
|
626
|
-
|
|
655
|
+
mt(Ln(t));
|
|
627
656
|
try {
|
|
628
|
-
t.f &= ~
|
|
657
|
+
t.f &= ~it, Fn(t), e = qe(t);
|
|
629
658
|
} finally {
|
|
630
|
-
|
|
659
|
+
mt(n);
|
|
631
660
|
}
|
|
632
661
|
return e;
|
|
633
662
|
}
|
|
634
|
-
function
|
|
635
|
-
var e =
|
|
636
|
-
if (!t.equals(e) && (t.wv =
|
|
637
|
-
m(t,
|
|
663
|
+
function Ne(t) {
|
|
664
|
+
var e = ae(t);
|
|
665
|
+
if (!t.equals(e) && (t.wv = We(), (!p?.is_fork || t.deps === null) && (t.v = e, t.deps === null))) {
|
|
666
|
+
m(t, b);
|
|
638
667
|
return;
|
|
639
668
|
}
|
|
640
|
-
|
|
669
|
+
pt || (I !== null ? (Oe() || p?.is_fork) && I.set(t, e) : oe(t));
|
|
641
670
|
}
|
|
642
|
-
function
|
|
671
|
+
function In(t) {
|
|
643
672
|
if (t.effects !== null)
|
|
644
673
|
for (const e of t.effects)
|
|
645
|
-
(e.teardown || e.ac) && (e.teardown?.(), e.ac?.abort(
|
|
674
|
+
(e.teardown || e.ac) && (e.teardown?.(), e.ac?.abort(tt), e.teardown = an, e.ac = null, Mt(e, 0), ue(e));
|
|
646
675
|
}
|
|
647
|
-
function
|
|
676
|
+
function De(t) {
|
|
648
677
|
if (t.effects !== null)
|
|
649
678
|
for (const e of t.effects)
|
|
650
|
-
e.teardown &&
|
|
679
|
+
e.teardown && gt(e);
|
|
651
680
|
}
|
|
652
681
|
let ne = /* @__PURE__ */ new Set();
|
|
653
|
-
const
|
|
654
|
-
let
|
|
655
|
-
function
|
|
682
|
+
const Q = /* @__PURE__ */ new Map();
|
|
683
|
+
let Fe = !1;
|
|
684
|
+
function Pn(t, e) {
|
|
656
685
|
var n = {
|
|
657
686
|
f: 0,
|
|
658
687
|
// TODO ideally we could skip this altogether, but it causes type errors
|
|
659
688
|
v: t,
|
|
660
689
|
reactions: null,
|
|
661
|
-
equals:
|
|
690
|
+
equals: Me,
|
|
662
691
|
rv: 0,
|
|
663
692
|
wv: 0
|
|
664
693
|
};
|
|
665
694
|
return n;
|
|
666
695
|
}
|
|
667
|
-
function
|
|
696
|
+
function _e(t, e) {
|
|
668
697
|
if (!t.equals(e)) {
|
|
669
698
|
var n = t.v;
|
|
670
|
-
|
|
671
|
-
var
|
|
672
|
-
if (
|
|
673
|
-
const
|
|
699
|
+
pt ? Q.set(t, e) : Q.set(t, n), t.v = e;
|
|
700
|
+
var r = It.ensure();
|
|
701
|
+
if (r.capture(t, n), (t.f & E) !== 0) {
|
|
702
|
+
const i = (
|
|
674
703
|
/** @type {Derived} */
|
|
675
704
|
t
|
|
676
705
|
);
|
|
677
|
-
(t.f &
|
|
706
|
+
(t.f & x) !== 0 && ae(i), oe(i);
|
|
678
707
|
}
|
|
679
|
-
t.wv =
|
|
708
|
+
t.wv = We(), Le(t, x), _ !== null && (_.f & b) !== 0 && (_.f & (W | xt)) === 0 && (R === null ? nr([t]) : R.push(t)), !r.is_fork && ne.size > 0 && !Fe && Hn();
|
|
680
709
|
}
|
|
681
710
|
return e;
|
|
682
711
|
}
|
|
683
|
-
function
|
|
684
|
-
|
|
712
|
+
function Hn() {
|
|
713
|
+
Fe = !1;
|
|
685
714
|
for (const t of ne)
|
|
686
|
-
(t.f &
|
|
715
|
+
(t.f & b) !== 0 && m(t, Y), At(t) && gt(t);
|
|
687
716
|
ne.clear();
|
|
688
717
|
}
|
|
689
|
-
function
|
|
718
|
+
function Le(t, e) {
|
|
690
719
|
var n = t.reactions;
|
|
691
720
|
if (n !== null)
|
|
692
|
-
for (var
|
|
693
|
-
var
|
|
694
|
-
if (f && m(
|
|
721
|
+
for (var r = n.length, i = 0; i < r; i++) {
|
|
722
|
+
var s = n[i], l = s.f, f = (l & x) === 0;
|
|
723
|
+
if (f && m(s, e), (l & E) !== 0) {
|
|
695
724
|
var a = (
|
|
696
725
|
/** @type {Derived} */
|
|
697
|
-
|
|
726
|
+
s
|
|
698
727
|
);
|
|
699
|
-
I?.delete(a), (l &
|
|
700
|
-
} else f && ((l & st) !== 0 &&
|
|
728
|
+
I?.delete(a), (l & it) === 0 && (l & D && (s.f |= it), Le(a, Y));
|
|
729
|
+
} else f && ((l & st) !== 0 && z !== null && z.add(
|
|
701
730
|
/** @type {Effect} */
|
|
702
|
-
|
|
703
|
-
),
|
|
731
|
+
s
|
|
732
|
+
), Z(
|
|
704
733
|
/** @type {Effect} */
|
|
705
|
-
|
|
734
|
+
s
|
|
706
735
|
));
|
|
707
736
|
}
|
|
708
737
|
}
|
|
709
|
-
var
|
|
710
|
-
function
|
|
738
|
+
var On, Yn, jn;
|
|
739
|
+
function pe(t = "") {
|
|
711
740
|
return document.createTextNode(t);
|
|
712
741
|
}
|
|
713
742
|
// @__NO_SIDE_EFFECTS__
|
|
714
|
-
function
|
|
743
|
+
function _t(t) {
|
|
715
744
|
return (
|
|
716
745
|
/** @type {TemplateNode | null} */
|
|
717
|
-
|
|
746
|
+
Yn.call(t)
|
|
718
747
|
);
|
|
719
748
|
}
|
|
720
749
|
// @__NO_SIDE_EFFECTS__
|
|
721
750
|
function Vt(t) {
|
|
722
751
|
return (
|
|
723
752
|
/** @type {TemplateNode | null} */
|
|
724
|
-
|
|
753
|
+
jn.call(t)
|
|
725
754
|
);
|
|
726
755
|
}
|
|
727
|
-
function
|
|
728
|
-
return /* @__PURE__ */
|
|
756
|
+
function Ie(t, e) {
|
|
757
|
+
return /* @__PURE__ */ _t(t);
|
|
729
758
|
}
|
|
730
|
-
function
|
|
759
|
+
function Xn(t, e = !1) {
|
|
731
760
|
{
|
|
732
|
-
var n = /* @__PURE__ */
|
|
761
|
+
var n = /* @__PURE__ */ _t(t);
|
|
733
762
|
return n instanceof Comment && n.data === "" ? /* @__PURE__ */ Vt(n) : n;
|
|
734
763
|
}
|
|
735
764
|
}
|
|
736
|
-
function
|
|
737
|
-
let
|
|
765
|
+
function Vn(t, e = 1, n = !1) {
|
|
766
|
+
let r = t;
|
|
738
767
|
for (; e--; )
|
|
739
|
-
|
|
740
|
-
/* @__PURE__ */ Vt(
|
|
741
|
-
return
|
|
768
|
+
r = /** @type {TemplateNode} */
|
|
769
|
+
/* @__PURE__ */ Vt(r);
|
|
770
|
+
return r;
|
|
742
771
|
}
|
|
743
|
-
function
|
|
772
|
+
function zn() {
|
|
744
773
|
return !1;
|
|
745
774
|
}
|
|
746
|
-
function
|
|
775
|
+
function Pe(t, e, n) {
|
|
747
776
|
return (
|
|
748
777
|
/** @type {T extends keyof HTMLElementTagNameMap ? HTMLElementTagNameMap[T] : Element} */
|
|
749
|
-
document.createElementNS(
|
|
778
|
+
document.createElementNS(Ee, t, void 0)
|
|
750
779
|
);
|
|
751
780
|
}
|
|
752
|
-
function
|
|
753
|
-
var e =
|
|
754
|
-
|
|
781
|
+
function He(t) {
|
|
782
|
+
var e = h, n = _;
|
|
783
|
+
wt(null), mt(null);
|
|
755
784
|
try {
|
|
756
785
|
return t();
|
|
757
786
|
} finally {
|
|
758
|
-
|
|
787
|
+
wt(e), mt(n);
|
|
759
788
|
}
|
|
760
789
|
}
|
|
761
|
-
function
|
|
790
|
+
function Bn(t, e) {
|
|
762
791
|
var n = e.last;
|
|
763
792
|
n === null ? e.last = e.first = t : (n.next = t, t.prev = n, e.last = t);
|
|
764
793
|
}
|
|
765
|
-
function
|
|
794
|
+
function lt(t, e) {
|
|
766
795
|
var n = _;
|
|
767
796
|
n !== null && (n.f & F) !== 0 && (t |= F);
|
|
768
|
-
var
|
|
769
|
-
ctx:
|
|
797
|
+
var r = {
|
|
798
|
+
ctx: B,
|
|
770
799
|
deps: null,
|
|
771
800
|
nodes: null,
|
|
772
|
-
f: t |
|
|
801
|
+
f: t | x | D,
|
|
773
802
|
first: null,
|
|
774
803
|
fn: e,
|
|
775
804
|
last: null,
|
|
@@ -780,393 +809,403 @@ function Tt(t, e) {
|
|
|
780
809
|
teardown: null,
|
|
781
810
|
wv: 0,
|
|
782
811
|
ac: null
|
|
783
|
-
},
|
|
784
|
-
if ((t &
|
|
785
|
-
|
|
812
|
+
}, i = r;
|
|
813
|
+
if ((t & bt) !== 0)
|
|
814
|
+
vt !== null ? vt.push(r) : Z(r);
|
|
786
815
|
else if (e !== null) {
|
|
787
816
|
try {
|
|
788
|
-
|
|
817
|
+
gt(r);
|
|
789
818
|
} catch (l) {
|
|
790
|
-
throw
|
|
819
|
+
throw $(r), l;
|
|
791
820
|
}
|
|
792
|
-
|
|
793
|
-
(
|
|
821
|
+
i.deps === null && i.teardown === null && i.nodes === null && i.first === i.last && // either `null`, or a singular child
|
|
822
|
+
(i.f & Xt) === 0 && (i = i.first, (t & st) !== 0 && (t & kt) !== 0 && i !== null && (i.f |= kt));
|
|
794
823
|
}
|
|
795
|
-
if (
|
|
796
|
-
var
|
|
824
|
+
if (i !== null && (i.parent = n, n !== null && Bn(i, n), h !== null && (h.f & E) !== 0 && (t & xt) === 0)) {
|
|
825
|
+
var s = (
|
|
797
826
|
/** @type {Derived} */
|
|
798
|
-
|
|
827
|
+
h
|
|
799
828
|
);
|
|
800
|
-
(
|
|
829
|
+
(s.effects ?? (s.effects = [])).push(i);
|
|
801
830
|
}
|
|
802
|
-
return
|
|
831
|
+
return r;
|
|
832
|
+
}
|
|
833
|
+
function Oe() {
|
|
834
|
+
return h !== null && !et;
|
|
803
835
|
}
|
|
804
|
-
function
|
|
805
|
-
|
|
836
|
+
function Wn(t) {
|
|
837
|
+
const e = lt(yt, null);
|
|
838
|
+
return m(e, b), e.teardown = t, e;
|
|
806
839
|
}
|
|
807
|
-
function
|
|
808
|
-
|
|
809
|
-
|
|
840
|
+
function Un(t) {
|
|
841
|
+
return lt(bt | dn, t);
|
|
842
|
+
}
|
|
843
|
+
function qn(t) {
|
|
844
|
+
return lt(bt, t);
|
|
810
845
|
}
|
|
811
|
-
function
|
|
812
|
-
return
|
|
846
|
+
function Gn(t) {
|
|
847
|
+
return lt(ke | Xt, t);
|
|
813
848
|
}
|
|
814
|
-
function
|
|
815
|
-
|
|
816
|
-
|
|
849
|
+
function Ye(t, e = [], n = [], r = []) {
|
|
850
|
+
Tn(r, e, n, (i) => {
|
|
851
|
+
lt(yt, () => t(...i.map(re)));
|
|
817
852
|
});
|
|
818
853
|
}
|
|
819
|
-
function
|
|
820
|
-
var n =
|
|
854
|
+
function Zn(t, e = 0) {
|
|
855
|
+
var n = lt(st | e, t);
|
|
821
856
|
return n;
|
|
822
857
|
}
|
|
823
|
-
function
|
|
824
|
-
return
|
|
858
|
+
function we(t) {
|
|
859
|
+
return lt(W | Xt, t);
|
|
825
860
|
}
|
|
826
|
-
function
|
|
861
|
+
function je(t) {
|
|
827
862
|
var e = t.teardown;
|
|
828
863
|
if (e !== null) {
|
|
829
|
-
const n =
|
|
830
|
-
me(!0),
|
|
864
|
+
const n = pt, r = h;
|
|
865
|
+
me(!0), wt(null);
|
|
831
866
|
try {
|
|
832
867
|
e.call(null);
|
|
833
868
|
} finally {
|
|
834
|
-
me(n),
|
|
869
|
+
me(n), wt(r);
|
|
835
870
|
}
|
|
836
871
|
}
|
|
837
872
|
}
|
|
838
|
-
function
|
|
873
|
+
function ue(t, e = !1) {
|
|
839
874
|
var n = t.first;
|
|
840
875
|
for (t.first = t.last = null; n !== null; ) {
|
|
841
|
-
const
|
|
842
|
-
|
|
843
|
-
|
|
876
|
+
const i = n.ac;
|
|
877
|
+
i !== null && He(() => {
|
|
878
|
+
i.abort(tt);
|
|
844
879
|
});
|
|
845
|
-
var
|
|
846
|
-
(n.f &
|
|
880
|
+
var r = n.next;
|
|
881
|
+
(n.f & xt) !== 0 ? n.parent = null : $(n, e), n = r;
|
|
847
882
|
}
|
|
848
883
|
}
|
|
849
|
-
function
|
|
884
|
+
function Kn(t) {
|
|
850
885
|
for (var e = t.first; e !== null; ) {
|
|
851
886
|
var n = e.next;
|
|
852
|
-
(e.f & W) === 0 &&
|
|
887
|
+
(e.f & W) === 0 && $(e), e = n;
|
|
853
888
|
}
|
|
854
889
|
}
|
|
855
|
-
function
|
|
890
|
+
function $(t, e = !0) {
|
|
856
891
|
var n = !1;
|
|
857
|
-
(e || (t.f &
|
|
892
|
+
(e || (t.f & hn) !== 0) && t.nodes !== null && t.nodes.end !== null && (Jn(
|
|
858
893
|
t.nodes.start,
|
|
859
894
|
/** @type {TemplateNode} */
|
|
860
895
|
t.nodes.end
|
|
861
|
-
), n = !0),
|
|
862
|
-
var
|
|
863
|
-
if (
|
|
864
|
-
for (const
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
var
|
|
868
|
-
|
|
869
|
-
}
|
|
870
|
-
function
|
|
896
|
+
), n = !0), ue(t, e && !n), Mt(t, 0), m(t, K);
|
|
897
|
+
var r = t.nodes && t.nodes.t;
|
|
898
|
+
if (r !== null)
|
|
899
|
+
for (const s of r)
|
|
900
|
+
s.stop();
|
|
901
|
+
je(t);
|
|
902
|
+
var i = t.parent;
|
|
903
|
+
i !== null && i.first !== null && Xe(t), t.next = t.prev = t.teardown = t.ctx = t.deps = t.fn = t.nodes = t.ac = null;
|
|
904
|
+
}
|
|
905
|
+
function Jn(t, e) {
|
|
871
906
|
for (; t !== null; ) {
|
|
872
907
|
var n = t === e ? null : /* @__PURE__ */ Vt(t);
|
|
873
908
|
t.remove(), t = n;
|
|
874
909
|
}
|
|
875
910
|
}
|
|
876
|
-
function
|
|
877
|
-
var e = t.parent, n = t.prev,
|
|
878
|
-
n !== null && (n.next =
|
|
879
|
-
}
|
|
880
|
-
function
|
|
881
|
-
var
|
|
882
|
-
|
|
883
|
-
var
|
|
884
|
-
n &&
|
|
885
|
-
},
|
|
886
|
-
if (
|
|
887
|
-
var l = () => --
|
|
888
|
-
for (var f of
|
|
911
|
+
function Xe(t) {
|
|
912
|
+
var e = t.parent, n = t.prev, r = t.next;
|
|
913
|
+
n !== null && (n.next = r), r !== null && (r.prev = n), e !== null && (e.first === t && (e.first = r), e.last === t && (e.last = n));
|
|
914
|
+
}
|
|
915
|
+
function Qn(t, e, n = !0) {
|
|
916
|
+
var r = [];
|
|
917
|
+
Ve(t, r, !0);
|
|
918
|
+
var i = () => {
|
|
919
|
+
n && $(t), e && e();
|
|
920
|
+
}, s = r.length;
|
|
921
|
+
if (s > 0) {
|
|
922
|
+
var l = () => --s || i();
|
|
923
|
+
for (var f of r)
|
|
889
924
|
f.out(l);
|
|
890
925
|
} else
|
|
891
|
-
|
|
926
|
+
i();
|
|
892
927
|
}
|
|
893
|
-
function
|
|
928
|
+
function Ve(t, e, n) {
|
|
894
929
|
if ((t.f & F) === 0) {
|
|
895
930
|
t.f ^= F;
|
|
896
|
-
var
|
|
897
|
-
if (
|
|
898
|
-
for (const f of
|
|
931
|
+
var r = t.nodes && t.nodes.t;
|
|
932
|
+
if (r !== null)
|
|
933
|
+
for (const f of r)
|
|
899
934
|
(f.is_global || n) && e.push(f);
|
|
900
|
-
for (var
|
|
901
|
-
var
|
|
935
|
+
for (var i = t.first; i !== null; ) {
|
|
936
|
+
var s = i.next, l = (i.f & kt) !== 0 || // If this is a branch effect without a block effect parent,
|
|
902
937
|
// it means the parent block effect was pruned. In that case,
|
|
903
938
|
// transparency information was transferred to the branch effect.
|
|
904
|
-
(
|
|
905
|
-
|
|
939
|
+
(i.f & W) !== 0 && (t.f & st) !== 0;
|
|
940
|
+
Ve(i, e, l ? n : !1), i = s;
|
|
906
941
|
}
|
|
907
942
|
}
|
|
908
943
|
}
|
|
909
|
-
function
|
|
910
|
-
|
|
944
|
+
function $n(t) {
|
|
945
|
+
ze(t, !0);
|
|
911
946
|
}
|
|
912
|
-
function
|
|
947
|
+
function ze(t, e) {
|
|
913
948
|
if ((t.f & F) !== 0) {
|
|
914
949
|
t.f ^= F;
|
|
915
950
|
for (var n = t.first; n !== null; ) {
|
|
916
|
-
var
|
|
917
|
-
|
|
951
|
+
var r = n.next, i = (n.f & kt) !== 0 || (n.f & W) !== 0;
|
|
952
|
+
ze(n, i ? e : !1), n = r;
|
|
918
953
|
}
|
|
919
|
-
var
|
|
920
|
-
if (
|
|
921
|
-
for (const l of
|
|
954
|
+
var s = t.nodes && t.nodes.t;
|
|
955
|
+
if (s !== null)
|
|
956
|
+
for (const l of s)
|
|
922
957
|
(l.is_global || e) && l.in();
|
|
923
958
|
}
|
|
924
959
|
}
|
|
925
|
-
function
|
|
960
|
+
function tr(t, e) {
|
|
926
961
|
if (t.nodes)
|
|
927
|
-
for (var n = t.nodes.start,
|
|
928
|
-
var
|
|
929
|
-
e.append(n), n =
|
|
962
|
+
for (var n = t.nodes.start, r = t.nodes.end; n !== null; ) {
|
|
963
|
+
var i = n === r ? null : /* @__PURE__ */ Vt(n);
|
|
964
|
+
e.append(n), n = i;
|
|
930
965
|
}
|
|
931
966
|
}
|
|
932
|
-
let
|
|
967
|
+
let Nt = !1, pt = !1;
|
|
933
968
|
function me(t) {
|
|
934
|
-
|
|
969
|
+
pt = t;
|
|
935
970
|
}
|
|
936
|
-
let
|
|
937
|
-
function
|
|
938
|
-
|
|
971
|
+
let h = null, et = !1;
|
|
972
|
+
function wt(t) {
|
|
973
|
+
h = t;
|
|
939
974
|
}
|
|
940
975
|
let _ = null;
|
|
941
|
-
function
|
|
976
|
+
function mt(t) {
|
|
942
977
|
_ = t;
|
|
943
978
|
}
|
|
944
|
-
let
|
|
945
|
-
function
|
|
979
|
+
let O = null;
|
|
980
|
+
function er(t) {
|
|
981
|
+
h !== null && (O === null ? O = [t] : O.push(t));
|
|
982
|
+
}
|
|
983
|
+
let y = null, C = 0, R = null;
|
|
984
|
+
function nr(t) {
|
|
946
985
|
R = t;
|
|
947
986
|
}
|
|
948
|
-
let
|
|
949
|
-
function
|
|
950
|
-
return ++
|
|
987
|
+
let Be = 1, ft = 0;
|
|
988
|
+
function We() {
|
|
989
|
+
return ++Be;
|
|
951
990
|
}
|
|
952
|
-
function
|
|
991
|
+
function At(t) {
|
|
953
992
|
var e = t.f;
|
|
954
|
-
if ((e &
|
|
993
|
+
if ((e & x) !== 0)
|
|
955
994
|
return !0;
|
|
956
|
-
if (e & E && (t.f &= ~
|
|
995
|
+
if (e & E && (t.f &= ~it), (e & Y) !== 0) {
|
|
957
996
|
for (var n = (
|
|
958
997
|
/** @type {Value[]} */
|
|
959
998
|
t.deps
|
|
960
|
-
),
|
|
961
|
-
var
|
|
962
|
-
if (
|
|
999
|
+
), r = n.length, i = 0; i < r; i++) {
|
|
1000
|
+
var s = n[i];
|
|
1001
|
+
if (At(
|
|
963
1002
|
/** @type {Derived} */
|
|
964
|
-
|
|
965
|
-
) &&
|
|
1003
|
+
s
|
|
1004
|
+
) && Ne(
|
|
966
1005
|
/** @type {Derived} */
|
|
967
|
-
|
|
968
|
-
),
|
|
1006
|
+
s
|
|
1007
|
+
), s.wv > t.wv)
|
|
969
1008
|
return !0;
|
|
970
1009
|
}
|
|
971
1010
|
(e & D) !== 0 && // During time traveling we don't want to reset the status so that
|
|
972
1011
|
// traversal of the graph in the other batches still happens
|
|
973
|
-
I === null && m(t,
|
|
1012
|
+
I === null && m(t, b);
|
|
974
1013
|
}
|
|
975
1014
|
return !1;
|
|
976
1015
|
}
|
|
977
|
-
function
|
|
978
|
-
var
|
|
979
|
-
if (
|
|
980
|
-
for (var
|
|
981
|
-
var
|
|
982
|
-
(
|
|
1016
|
+
function Ue(t, e, n = !0) {
|
|
1017
|
+
var r = t.reactions;
|
|
1018
|
+
if (r !== null && !(O !== null && Et.call(O, t)))
|
|
1019
|
+
for (var i = 0; i < r.length; i++) {
|
|
1020
|
+
var s = r[i];
|
|
1021
|
+
(s.f & E) !== 0 ? Ue(
|
|
983
1022
|
/** @type {Derived} */
|
|
984
|
-
|
|
1023
|
+
s,
|
|
985
1024
|
e,
|
|
986
1025
|
!1
|
|
987
|
-
) : e ===
|
|
1026
|
+
) : e === s && (n ? m(s, x) : (s.f & b) !== 0 && m(s, Y), Z(
|
|
988
1027
|
/** @type {Effect} */
|
|
989
|
-
|
|
1028
|
+
s
|
|
990
1029
|
));
|
|
991
1030
|
}
|
|
992
1031
|
}
|
|
993
|
-
function
|
|
994
|
-
var
|
|
995
|
-
var e = y, n =
|
|
1032
|
+
function qe(t) {
|
|
1033
|
+
var j;
|
|
1034
|
+
var e = y, n = C, r = R, i = h, s = O, l = B, f = et, a = t.f;
|
|
996
1035
|
y = /** @type {null | Value[]} */
|
|
997
|
-
null,
|
|
998
|
-
t.ac.abort(
|
|
1036
|
+
null, C = 0, R = null, h = (a & (W | xt)) === 0 ? t : null, O = null, Ft(t.ctx), et = !1, ++ft, t.ac !== null && (He(() => {
|
|
1037
|
+
t.ac.abort(tt);
|
|
999
1038
|
}), t.ac = null);
|
|
1000
1039
|
try {
|
|
1001
1040
|
t.f |= Kt;
|
|
1002
1041
|
var c = (
|
|
1003
1042
|
/** @type {Function} */
|
|
1004
1043
|
t.fn
|
|
1005
|
-
),
|
|
1006
|
-
t.f |=
|
|
1007
|
-
var u = t.deps,
|
|
1044
|
+
), d = c();
|
|
1045
|
+
t.f |= Tt;
|
|
1046
|
+
var u = t.deps, w = p?.is_fork;
|
|
1008
1047
|
if (y !== null) {
|
|
1009
|
-
var
|
|
1010
|
-
if (
|
|
1011
|
-
for (u.length =
|
|
1012
|
-
u[
|
|
1048
|
+
var v;
|
|
1049
|
+
if (w || Mt(t, C), u !== null && C > 0)
|
|
1050
|
+
for (u.length = C + y.length, v = 0; v < y.length; v++)
|
|
1051
|
+
u[C + v] = y[v];
|
|
1013
1052
|
else
|
|
1014
1053
|
t.deps = u = y;
|
|
1015
|
-
if (
|
|
1016
|
-
for (
|
|
1017
|
-
((
|
|
1018
|
-
} else !
|
|
1019
|
-
if (
|
|
1020
|
-
for (
|
|
1021
|
-
R.length;
|
|
1022
|
-
|
|
1023
|
-
R[
|
|
1054
|
+
if (Oe() && (t.f & D) !== 0)
|
|
1055
|
+
for (v = C; v < u.length; v++)
|
|
1056
|
+
((j = u[v]).reactions ?? (j.reactions = [])).push(t);
|
|
1057
|
+
} else !w && u !== null && C < u.length && (Mt(t, C), u.length = C);
|
|
1058
|
+
if (bn() && R !== null && !et && u !== null && (t.f & (E | Y | x)) === 0)
|
|
1059
|
+
for (v = 0; v < /** @type {Source[]} */
|
|
1060
|
+
R.length; v++)
|
|
1061
|
+
Ue(
|
|
1062
|
+
R[v],
|
|
1024
1063
|
/** @type {Effect} */
|
|
1025
1064
|
t
|
|
1026
1065
|
);
|
|
1027
|
-
if (
|
|
1028
|
-
if (
|
|
1066
|
+
if (i !== null && i !== t) {
|
|
1067
|
+
if (ft++, i.deps !== null)
|
|
1029
1068
|
for (let M = 0; M < n; M += 1)
|
|
1030
|
-
|
|
1069
|
+
i.deps[M].rv = ft;
|
|
1031
1070
|
if (e !== null)
|
|
1032
1071
|
for (const M of e)
|
|
1033
|
-
M.rv =
|
|
1034
|
-
R !== null && (
|
|
1072
|
+
M.rv = ft;
|
|
1073
|
+
R !== null && (r === null ? r = R : r.push(.../** @type {Source[]} */
|
|
1035
1074
|
R));
|
|
1036
1075
|
}
|
|
1037
|
-
return (t.f &
|
|
1076
|
+
return (t.f & J) !== 0 && (t.f ^= J), d;
|
|
1038
1077
|
} catch (M) {
|
|
1039
|
-
return
|
|
1078
|
+
return En(M);
|
|
1040
1079
|
} finally {
|
|
1041
|
-
t.f ^= Kt, y = e,
|
|
1080
|
+
t.f ^= Kt, y = e, C = n, R = r, h = i, O = s, Ft(l), et = f;
|
|
1042
1081
|
}
|
|
1043
1082
|
}
|
|
1044
|
-
function
|
|
1083
|
+
function rr(t, e) {
|
|
1045
1084
|
let n = e.reactions;
|
|
1046
1085
|
if (n !== null) {
|
|
1047
|
-
var
|
|
1048
|
-
if (
|
|
1049
|
-
var
|
|
1050
|
-
|
|
1086
|
+
var r = ln.call(n, t);
|
|
1087
|
+
if (r !== -1) {
|
|
1088
|
+
var i = n.length - 1;
|
|
1089
|
+
i === 0 ? n = e.reactions = null : (n[r] = n[i], n.pop());
|
|
1051
1090
|
}
|
|
1052
1091
|
}
|
|
1053
1092
|
if (n === null && (e.f & E) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
|
|
1054
1093
|
// to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
|
|
1055
1094
|
// allows us to skip the expensive work of disconnecting and immediately reconnecting it
|
|
1056
|
-
(y === null || !
|
|
1057
|
-
var
|
|
1095
|
+
(y === null || !Et.call(y, e))) {
|
|
1096
|
+
var s = (
|
|
1058
1097
|
/** @type {Derived} */
|
|
1059
1098
|
e
|
|
1060
1099
|
);
|
|
1061
|
-
(
|
|
1100
|
+
(s.f & D) !== 0 && (s.f ^= D, s.f &= ~it), oe(s), In(s), Mt(s, 0);
|
|
1062
1101
|
}
|
|
1063
1102
|
}
|
|
1064
|
-
function
|
|
1103
|
+
function Mt(t, e) {
|
|
1065
1104
|
var n = t.deps;
|
|
1066
1105
|
if (n !== null)
|
|
1067
|
-
for (var
|
|
1068
|
-
|
|
1106
|
+
for (var r = e; r < n.length; r++)
|
|
1107
|
+
rr(t, n[r]);
|
|
1069
1108
|
}
|
|
1070
|
-
function
|
|
1109
|
+
function gt(t) {
|
|
1071
1110
|
var e = t.f;
|
|
1072
|
-
if ((e &
|
|
1073
|
-
m(t,
|
|
1074
|
-
var n = _,
|
|
1075
|
-
_ = t,
|
|
1111
|
+
if ((e & K) === 0) {
|
|
1112
|
+
m(t, b);
|
|
1113
|
+
var n = _, r = Nt;
|
|
1114
|
+
_ = t, Nt = !0;
|
|
1076
1115
|
try {
|
|
1077
|
-
(e & (st |
|
|
1078
|
-
var
|
|
1079
|
-
t.teardown = typeof
|
|
1080
|
-
var
|
|
1081
|
-
|
|
1116
|
+
(e & (st | le)) !== 0 ? Kn(t) : ue(t), je(t);
|
|
1117
|
+
var i = qe(t);
|
|
1118
|
+
t.teardown = typeof i == "function" ? i : null, t.wv = Be;
|
|
1119
|
+
var s;
|
|
1120
|
+
Zt && wn && (t.f & x) !== 0 && t.deps;
|
|
1082
1121
|
} finally {
|
|
1083
|
-
|
|
1122
|
+
Nt = r, _ = n;
|
|
1084
1123
|
}
|
|
1085
1124
|
}
|
|
1086
1125
|
}
|
|
1087
|
-
function
|
|
1126
|
+
function re(t) {
|
|
1088
1127
|
var e = t.f, n = (e & E) !== 0;
|
|
1089
|
-
if (
|
|
1090
|
-
var
|
|
1091
|
-
if (!
|
|
1092
|
-
var
|
|
1093
|
-
if ((
|
|
1094
|
-
t.rv <
|
|
1128
|
+
if (h !== null && !et) {
|
|
1129
|
+
var r = _ !== null && (_.f & K) !== 0;
|
|
1130
|
+
if (!r && (O === null || !Et.call(O, t))) {
|
|
1131
|
+
var i = h.deps;
|
|
1132
|
+
if ((h.f & Kt) !== 0)
|
|
1133
|
+
t.rv < ft && (t.rv = ft, y === null && i !== null && i[C] === t ? C++ : y === null ? y = [t] : y.push(t));
|
|
1095
1134
|
else {
|
|
1096
|
-
(
|
|
1097
|
-
var
|
|
1098
|
-
|
|
1135
|
+
(h.deps ?? (h.deps = [])).push(t);
|
|
1136
|
+
var s = t.reactions;
|
|
1137
|
+
s === null ? t.reactions = [h] : Et.call(s, h) || s.push(h);
|
|
1099
1138
|
}
|
|
1100
1139
|
}
|
|
1101
1140
|
}
|
|
1102
|
-
if (
|
|
1103
|
-
return
|
|
1141
|
+
if (pt && Q.has(t))
|
|
1142
|
+
return Q.get(t);
|
|
1104
1143
|
if (n) {
|
|
1105
1144
|
var l = (
|
|
1106
1145
|
/** @type {Derived} */
|
|
1107
1146
|
t
|
|
1108
1147
|
);
|
|
1109
|
-
if (
|
|
1148
|
+
if (pt) {
|
|
1110
1149
|
var f = l.v;
|
|
1111
|
-
return ((l.f &
|
|
1150
|
+
return ((l.f & b) === 0 && l.reactions !== null || Ze(l)) && (f = ae(l)), Q.set(l, f), f;
|
|
1112
1151
|
}
|
|
1113
|
-
var a = (l.f & D) === 0 &&
|
|
1114
|
-
|
|
1152
|
+
var a = (l.f & D) === 0 && !et && h !== null && (Nt || (h.f & D) !== 0), c = (l.f & Tt) === 0;
|
|
1153
|
+
At(l) && (a && (l.f |= D), Ne(l)), a && !c && (De(l), Ge(l));
|
|
1115
1154
|
}
|
|
1116
1155
|
if (I?.has(t))
|
|
1117
1156
|
return I.get(t);
|
|
1118
|
-
if ((t.f &
|
|
1157
|
+
if ((t.f & J) !== 0)
|
|
1119
1158
|
throw t.v;
|
|
1120
1159
|
return t.v;
|
|
1121
1160
|
}
|
|
1122
|
-
function
|
|
1161
|
+
function Ge(t) {
|
|
1123
1162
|
if (t.f |= D, t.deps !== null)
|
|
1124
1163
|
for (const e of t.deps)
|
|
1125
|
-
(e.reactions ?? (e.reactions = [])).push(t), (e.f & E) !== 0 && (e.f & D) === 0 && (
|
|
1164
|
+
(e.reactions ?? (e.reactions = [])).push(t), (e.f & E) !== 0 && (e.f & D) === 0 && (De(
|
|
1126
1165
|
/** @type {Derived} */
|
|
1127
1166
|
e
|
|
1128
|
-
),
|
|
1167
|
+
), Ge(
|
|
1129
1168
|
/** @type {Derived} */
|
|
1130
1169
|
e
|
|
1131
1170
|
));
|
|
1132
1171
|
}
|
|
1133
|
-
function
|
|
1134
|
-
if (t.v ===
|
|
1172
|
+
function Ze(t) {
|
|
1173
|
+
if (t.v === jt) return !0;
|
|
1135
1174
|
if (t.deps === null) return !1;
|
|
1136
1175
|
for (const e of t.deps)
|
|
1137
|
-
if (
|
|
1176
|
+
if (Q.has(e) || (e.f & E) !== 0 && Ze(
|
|
1138
1177
|
/** @type {Derived} */
|
|
1139
1178
|
e
|
|
1140
1179
|
))
|
|
1141
1180
|
return !0;
|
|
1142
1181
|
return !1;
|
|
1143
1182
|
}
|
|
1144
|
-
const
|
|
1145
|
-
function
|
|
1146
|
-
(e[
|
|
1183
|
+
const Gt = /* @__PURE__ */ Symbol("events"), ir = /* @__PURE__ */ new Set(), sr = /* @__PURE__ */ new Set();
|
|
1184
|
+
function ie(t, e, n) {
|
|
1185
|
+
(e[Gt] ?? (e[Gt] = {}))[t] = n;
|
|
1147
1186
|
}
|
|
1148
|
-
function
|
|
1187
|
+
function Ke(t) {
|
|
1149
1188
|
for (var e = 0; e < t.length; e++)
|
|
1150
|
-
|
|
1151
|
-
for (var n of
|
|
1189
|
+
ir.add(t[e]);
|
|
1190
|
+
for (var n of sr)
|
|
1152
1191
|
n(t);
|
|
1153
1192
|
}
|
|
1154
|
-
const
|
|
1193
|
+
const lr = (
|
|
1155
1194
|
// We gotta write it like this because after downleveling the pure comment may end up in the wrong location
|
|
1156
1195
|
globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", {
|
|
1157
1196
|
/** @param {string} html */
|
|
1158
1197
|
createHTML: (t) => t
|
|
1159
1198
|
})
|
|
1160
1199
|
);
|
|
1161
|
-
function
|
|
1200
|
+
function or(t) {
|
|
1162
1201
|
return (
|
|
1163
1202
|
/** @type {string} */
|
|
1164
|
-
|
|
1203
|
+
lr?.createHTML(t) ?? t
|
|
1165
1204
|
);
|
|
1166
1205
|
}
|
|
1167
|
-
function
|
|
1168
|
-
var e =
|
|
1169
|
-
return e.innerHTML =
|
|
1206
|
+
function Je(t) {
|
|
1207
|
+
var e = Pe("template");
|
|
1208
|
+
return e.innerHTML = or(t.replaceAll("<!>", "<!---->")), e.content;
|
|
1170
1209
|
}
|
|
1171
1210
|
function se(t, e) {
|
|
1172
1211
|
var n = (
|
|
@@ -1176,19 +1215,19 @@ function se(t, e) {
|
|
|
1176
1215
|
n.nodes === null && (n.nodes = { start: t, end: e, a: null, t: null });
|
|
1177
1216
|
}
|
|
1178
1217
|
// @__NO_SIDE_EFFECTS__
|
|
1179
|
-
function
|
|
1180
|
-
var n = (e &
|
|
1218
|
+
function Qe(t, e) {
|
|
1219
|
+
var n = (e & rn) !== 0, r = (e & sn) !== 0, i, s = !t.startsWith("<!>");
|
|
1181
1220
|
return () => {
|
|
1182
|
-
|
|
1183
|
-
/* @__PURE__ */
|
|
1221
|
+
i === void 0 && (i = Je(s ? t : "<!>" + t), n || (i = /** @type {TemplateNode} */
|
|
1222
|
+
/* @__PURE__ */ _t(i)));
|
|
1184
1223
|
var l = (
|
|
1185
1224
|
/** @type {TemplateNode} */
|
|
1186
|
-
|
|
1225
|
+
r || On ? document.importNode(i, !0) : i.cloneNode(!0)
|
|
1187
1226
|
);
|
|
1188
1227
|
if (n) {
|
|
1189
1228
|
var f = (
|
|
1190
1229
|
/** @type {TemplateNode} */
|
|
1191
|
-
/* @__PURE__ */
|
|
1230
|
+
/* @__PURE__ */ _t(l)
|
|
1192
1231
|
), a = (
|
|
1193
1232
|
/** @type {TemplateNode} */
|
|
1194
1233
|
l.lastChild
|
|
@@ -1200,48 +1239,48 @@ function Ze(t, e) {
|
|
|
1200
1239
|
};
|
|
1201
1240
|
}
|
|
1202
1241
|
// @__NO_SIDE_EFFECTS__
|
|
1203
|
-
function
|
|
1204
|
-
var
|
|
1242
|
+
function fr(t, e, n = "svg") {
|
|
1243
|
+
var r = !t.startsWith("<!>"), i = `<${n}>${r ? t : "<!>" + t}</${n}>`, s;
|
|
1205
1244
|
return () => {
|
|
1206
|
-
if (!
|
|
1245
|
+
if (!s) {
|
|
1207
1246
|
var l = (
|
|
1208
1247
|
/** @type {DocumentFragment} */
|
|
1209
|
-
|
|
1248
|
+
Je(i)
|
|
1210
1249
|
), f = (
|
|
1211
1250
|
/** @type {Element} */
|
|
1212
|
-
/* @__PURE__ */
|
|
1251
|
+
/* @__PURE__ */ _t(l)
|
|
1213
1252
|
);
|
|
1214
|
-
|
|
1215
|
-
/* @__PURE__ */
|
|
1253
|
+
s = /** @type {Element} */
|
|
1254
|
+
/* @__PURE__ */ _t(f);
|
|
1216
1255
|
}
|
|
1217
1256
|
var a = (
|
|
1218
1257
|
/** @type {TemplateNode} */
|
|
1219
|
-
|
|
1258
|
+
s.cloneNode(!0)
|
|
1220
1259
|
);
|
|
1221
1260
|
return se(a, a), a;
|
|
1222
1261
|
};
|
|
1223
1262
|
}
|
|
1224
1263
|
// @__NO_SIDE_EFFECTS__
|
|
1225
|
-
function
|
|
1226
|
-
return /* @__PURE__ */
|
|
1264
|
+
function $e(t, e) {
|
|
1265
|
+
return /* @__PURE__ */ fr(t, e, "svg");
|
|
1227
1266
|
}
|
|
1228
|
-
function
|
|
1267
|
+
function Dt(t, e) {
|
|
1229
1268
|
t !== null && t.before(
|
|
1230
1269
|
/** @type {Node} */
|
|
1231
1270
|
e
|
|
1232
1271
|
);
|
|
1233
1272
|
}
|
|
1234
|
-
var
|
|
1235
|
-
class
|
|
1273
|
+
var L, H, T, rt, St, Ct, Yt;
|
|
1274
|
+
class ar {
|
|
1236
1275
|
/**
|
|
1237
1276
|
* @param {TemplateNode} anchor
|
|
1238
1277
|
* @param {boolean} transition
|
|
1239
1278
|
*/
|
|
1240
1279
|
constructor(e, n = !0) {
|
|
1241
1280
|
/** @type {TemplateNode} */
|
|
1242
|
-
|
|
1281
|
+
U(this, "anchor");
|
|
1243
1282
|
/** @type {Map<Batch, Key>} */
|
|
1244
|
-
|
|
1283
|
+
g(this, L, /* @__PURE__ */ new Map());
|
|
1245
1284
|
/**
|
|
1246
1285
|
* Map of keys to effects that are currently rendered in the DOM.
|
|
1247
1286
|
* These effects are visible and actively part of the document tree.
|
|
@@ -1256,68 +1295,68 @@ class tr {
|
|
|
1256
1295
|
* Can result in the entries `true->Effect` and `false->Effect`
|
|
1257
1296
|
* @type {Map<Key, Effect>}
|
|
1258
1297
|
*/
|
|
1259
|
-
|
|
1298
|
+
g(this, H, /* @__PURE__ */ new Map());
|
|
1260
1299
|
/**
|
|
1261
1300
|
* Similar to #onscreen with respect to the keys, but contains branches that are not yet
|
|
1262
1301
|
* in the DOM, because their insertion is deferred.
|
|
1263
1302
|
* @type {Map<Key, Branch>}
|
|
1264
1303
|
*/
|
|
1265
|
-
|
|
1304
|
+
g(this, T, /* @__PURE__ */ new Map());
|
|
1266
1305
|
/**
|
|
1267
1306
|
* Keys of effects that are currently outroing
|
|
1268
1307
|
* @type {Set<Key>}
|
|
1269
1308
|
*/
|
|
1270
|
-
|
|
1309
|
+
g(this, rt, /* @__PURE__ */ new Set());
|
|
1271
1310
|
/**
|
|
1272
1311
|
* Whether to pause (i.e. outro) on change, or destroy immediately.
|
|
1273
1312
|
* This is necessary for `<svelte:element>`
|
|
1274
1313
|
*/
|
|
1275
|
-
|
|
1314
|
+
g(this, St, !0);
|
|
1276
1315
|
/**
|
|
1277
1316
|
* @param {Batch} batch
|
|
1278
1317
|
*/
|
|
1279
|
-
|
|
1280
|
-
if (o(this,
|
|
1318
|
+
g(this, Ct, (e) => {
|
|
1319
|
+
if (o(this, L).has(e)) {
|
|
1281
1320
|
var n = (
|
|
1282
1321
|
/** @type {Key} */
|
|
1283
|
-
o(this,
|
|
1284
|
-
),
|
|
1285
|
-
if (
|
|
1286
|
-
|
|
1322
|
+
o(this, L).get(e)
|
|
1323
|
+
), r = o(this, H).get(n);
|
|
1324
|
+
if (r)
|
|
1325
|
+
$n(r), o(this, rt).delete(n);
|
|
1287
1326
|
else {
|
|
1288
|
-
var
|
|
1289
|
-
|
|
1327
|
+
var i = o(this, T).get(n);
|
|
1328
|
+
i && (i.effect.f & F) === 0 && (o(this, H).set(n, i.effect), o(this, T).delete(n), i.fragment.lastChild.remove(), this.anchor.before(i.fragment), r = i.effect);
|
|
1290
1329
|
}
|
|
1291
|
-
for (const [
|
|
1292
|
-
if (o(this,
|
|
1330
|
+
for (const [s, l] of o(this, L)) {
|
|
1331
|
+
if (o(this, L).delete(s), s === e)
|
|
1293
1332
|
break;
|
|
1294
|
-
const f = o(this,
|
|
1295
|
-
f && (
|
|
1333
|
+
const f = o(this, T).get(l);
|
|
1334
|
+
f && ($(f.effect), o(this, T).delete(l));
|
|
1296
1335
|
}
|
|
1297
|
-
for (const [
|
|
1298
|
-
if (
|
|
1336
|
+
for (const [s, l] of o(this, H)) {
|
|
1337
|
+
if (s === n || o(this, rt).has(s) || (l.f & F) !== 0) continue;
|
|
1299
1338
|
const f = () => {
|
|
1300
|
-
if (Array.from(o(this,
|
|
1339
|
+
if (Array.from(o(this, L).values()).includes(s)) {
|
|
1301
1340
|
var c = document.createDocumentFragment();
|
|
1302
|
-
|
|
1341
|
+
tr(l, c), c.append(pe()), o(this, T).set(s, { effect: l, fragment: c });
|
|
1303
1342
|
} else
|
|
1304
|
-
|
|
1305
|
-
o(this,
|
|
1343
|
+
$(l);
|
|
1344
|
+
o(this, rt).delete(s), o(this, H).delete(s);
|
|
1306
1345
|
};
|
|
1307
|
-
o(this,
|
|
1346
|
+
o(this, St) || !r ? (o(this, rt).add(s), Qn(l, f, !1)) : f();
|
|
1308
1347
|
}
|
|
1309
1348
|
}
|
|
1310
1349
|
});
|
|
1311
1350
|
/**
|
|
1312
1351
|
* @param {Batch} batch
|
|
1313
1352
|
*/
|
|
1314
|
-
|
|
1315
|
-
o(this,
|
|
1316
|
-
const n = Array.from(o(this,
|
|
1317
|
-
for (const [
|
|
1318
|
-
n.includes(
|
|
1353
|
+
g(this, Yt, (e) => {
|
|
1354
|
+
o(this, L).delete(e);
|
|
1355
|
+
const n = Array.from(o(this, L).values());
|
|
1356
|
+
for (const [r, i] of o(this, T))
|
|
1357
|
+
n.includes(r) || ($(i.effect), o(this, T).delete(r));
|
|
1319
1358
|
});
|
|
1320
|
-
this.anchor = e, X(this,
|
|
1359
|
+
this.anchor = e, X(this, St, n);
|
|
1321
1360
|
}
|
|
1322
1361
|
/**
|
|
1323
1362
|
*
|
|
@@ -1325,181 +1364,206 @@ class tr {
|
|
|
1325
1364
|
* @param {null | ((target: TemplateNode) => void)} fn
|
|
1326
1365
|
*/
|
|
1327
1366
|
ensure(e, n) {
|
|
1328
|
-
var
|
|
1367
|
+
var r = (
|
|
1329
1368
|
/** @type {Batch} */
|
|
1330
1369
|
p
|
|
1331
|
-
),
|
|
1332
|
-
if (n && !o(this, H).has(e) && !o(this,
|
|
1333
|
-
if (
|
|
1334
|
-
var
|
|
1335
|
-
|
|
1336
|
-
effect:
|
|
1337
|
-
fragment:
|
|
1370
|
+
), i = zn();
|
|
1371
|
+
if (n && !o(this, H).has(e) && !o(this, T).has(e))
|
|
1372
|
+
if (i) {
|
|
1373
|
+
var s = document.createDocumentFragment(), l = pe();
|
|
1374
|
+
s.append(l), o(this, T).set(e, {
|
|
1375
|
+
effect: we(() => n(l)),
|
|
1376
|
+
fragment: s
|
|
1338
1377
|
});
|
|
1339
1378
|
} else
|
|
1340
1379
|
o(this, H).set(
|
|
1341
1380
|
e,
|
|
1342
|
-
|
|
1381
|
+
we(() => n(this.anchor))
|
|
1343
1382
|
);
|
|
1344
|
-
if (o(this,
|
|
1383
|
+
if (o(this, L).set(r, e), i) {
|
|
1345
1384
|
for (const [f, a] of o(this, H))
|
|
1346
|
-
f === e ?
|
|
1347
|
-
for (const [f, a] of o(this,
|
|
1348
|
-
f === e ?
|
|
1349
|
-
|
|
1385
|
+
f === e ? r.unskip_effect(a) : r.skip_effect(a);
|
|
1386
|
+
for (const [f, a] of o(this, T))
|
|
1387
|
+
f === e ? r.unskip_effect(a.effect) : r.skip_effect(a.effect);
|
|
1388
|
+
r.oncommit(o(this, Ct)), r.ondiscard(o(this, Yt));
|
|
1350
1389
|
} else
|
|
1351
|
-
o(this,
|
|
1390
|
+
o(this, Ct).call(this, r);
|
|
1352
1391
|
}
|
|
1353
1392
|
}
|
|
1354
|
-
|
|
1355
|
-
function
|
|
1356
|
-
var
|
|
1357
|
-
function
|
|
1358
|
-
|
|
1393
|
+
L = new WeakMap(), H = new WeakMap(), T = new WeakMap(), rt = new WeakMap(), St = new WeakMap(), Ct = new WeakMap(), Yt = new WeakMap();
|
|
1394
|
+
function ur(t, e, n = !1) {
|
|
1395
|
+
var r = new ar(t), i = n ? kt : 0;
|
|
1396
|
+
function s(l, f) {
|
|
1397
|
+
r.ensure(l, f);
|
|
1359
1398
|
}
|
|
1360
|
-
|
|
1399
|
+
Zn(() => {
|
|
1361
1400
|
var l = !1;
|
|
1362
1401
|
e((f, a = 0) => {
|
|
1363
|
-
l = !0,
|
|
1364
|
-
}), l ||
|
|
1365
|
-
},
|
|
1402
|
+
l = !0, s(a, f);
|
|
1403
|
+
}), l || s(-1, null);
|
|
1404
|
+
}, i);
|
|
1405
|
+
}
|
|
1406
|
+
function cr(t, e) {
|
|
1407
|
+
qn(() => {
|
|
1408
|
+
var n = t.getRootNode(), r = (
|
|
1409
|
+
/** @type {ShadowRoot} */
|
|
1410
|
+
n.host ? (
|
|
1411
|
+
/** @type {ShadowRoot} */
|
|
1412
|
+
n
|
|
1413
|
+
) : (
|
|
1414
|
+
/** @type {Document} */
|
|
1415
|
+
n.head ?? /** @type {Document} */
|
|
1416
|
+
n.ownerDocument.head
|
|
1417
|
+
)
|
|
1418
|
+
);
|
|
1419
|
+
if (!r.querySelector("#" + e.hash)) {
|
|
1420
|
+
const i = Pe("style");
|
|
1421
|
+
i.id = e.hash, i.textContent = e.code, r.appendChild(i);
|
|
1422
|
+
}
|
|
1423
|
+
});
|
|
1366
1424
|
}
|
|
1367
|
-
function
|
|
1368
|
-
var e, n,
|
|
1369
|
-
if (typeof t == "string" || typeof t == "number")
|
|
1425
|
+
function tn(t) {
|
|
1426
|
+
var e, n, r = "";
|
|
1427
|
+
if (typeof t == "string" || typeof t == "number") r += t;
|
|
1370
1428
|
else if (typeof t == "object") if (Array.isArray(t)) {
|
|
1371
|
-
var
|
|
1372
|
-
for (e = 0; e <
|
|
1373
|
-
} else for (n in t) t[n] && (
|
|
1374
|
-
return
|
|
1429
|
+
var i = t.length;
|
|
1430
|
+
for (e = 0; e < i; e++) t[e] && (n = tn(t[e])) && (r && (r += " "), r += n);
|
|
1431
|
+
} else for (n in t) t[n] && (r && (r += " "), r += n);
|
|
1432
|
+
return r;
|
|
1375
1433
|
}
|
|
1376
|
-
function
|
|
1377
|
-
for (var t, e, n = 0,
|
|
1378
|
-
return
|
|
1434
|
+
function hr() {
|
|
1435
|
+
for (var t, e, n = 0, r = "", i = arguments.length; n < i; n++) (t = arguments[n]) && (e = tn(t)) && (r && (r += " "), r += e);
|
|
1436
|
+
return r;
|
|
1379
1437
|
}
|
|
1380
|
-
function
|
|
1381
|
-
return typeof t == "object" ?
|
|
1438
|
+
function Pt(t) {
|
|
1439
|
+
return typeof t == "object" ? hr(t) : t ?? "";
|
|
1382
1440
|
}
|
|
1383
|
-
function
|
|
1384
|
-
var
|
|
1385
|
-
return
|
|
1441
|
+
function dr(t, e, n) {
|
|
1442
|
+
var r = t == null ? "" : "" + t;
|
|
1443
|
+
return e && (r = r ? r + " " + e : e), r === "" ? null : r;
|
|
1386
1444
|
}
|
|
1387
|
-
function
|
|
1445
|
+
function Ht(t, e, n, r, i, s) {
|
|
1388
1446
|
var l = t.__className;
|
|
1389
1447
|
if (l !== n || l === void 0) {
|
|
1390
|
-
var f =
|
|
1448
|
+
var f = dr(n, r);
|
|
1391
1449
|
f == null ? t.removeAttribute("class") : e ? t.className = f : t.setAttribute("class", f), t.__className = n;
|
|
1392
1450
|
}
|
|
1393
|
-
return
|
|
1451
|
+
return s;
|
|
1394
1452
|
}
|
|
1395
|
-
const
|
|
1396
|
-
function
|
|
1397
|
-
var
|
|
1398
|
-
|
|
1453
|
+
const vr = /* @__PURE__ */ Symbol("is custom element"), _r = /* @__PURE__ */ Symbol("is html");
|
|
1454
|
+
function ge(t, e, n, r) {
|
|
1455
|
+
var i = pr(t);
|
|
1456
|
+
i[e] !== (i[e] = n) && (e === "loading" && (t[vn] = n), n == null ? t.removeAttribute(e) : typeof n != "string" && wr(t).includes(e) ? t[e] = n : t.setAttribute(e, n));
|
|
1399
1457
|
}
|
|
1400
|
-
function
|
|
1458
|
+
function pr(t) {
|
|
1401
1459
|
return (
|
|
1402
1460
|
/** @type {Record<string | symbol, unknown>} **/
|
|
1403
1461
|
// @ts-expect-error
|
|
1404
1462
|
t.__attributes ?? (t.__attributes = {
|
|
1405
|
-
[
|
|
1406
|
-
[
|
|
1463
|
+
[vr]: t.nodeName.includes("-"),
|
|
1464
|
+
[_r]: t.namespaceURI === Ee
|
|
1407
1465
|
})
|
|
1408
1466
|
);
|
|
1409
1467
|
}
|
|
1410
|
-
var
|
|
1411
|
-
function
|
|
1412
|
-
var e = t.getAttribute("is") || t.nodeName, n =
|
|
1468
|
+
var be = /* @__PURE__ */ new Map();
|
|
1469
|
+
function wr(t) {
|
|
1470
|
+
var e = t.getAttribute("is") || t.nodeName, n = be.get(e);
|
|
1413
1471
|
if (n) return n;
|
|
1414
|
-
|
|
1415
|
-
for (var
|
|
1416
|
-
|
|
1417
|
-
for (var l in
|
|
1418
|
-
|
|
1419
|
-
|
|
1472
|
+
be.set(e, n = []);
|
|
1473
|
+
for (var r, i = t, s = Element.prototype; s !== i; ) {
|
|
1474
|
+
r = on(i);
|
|
1475
|
+
for (var l in r)
|
|
1476
|
+
r[l].set && n.push(l);
|
|
1477
|
+
i = fn(i);
|
|
1420
1478
|
}
|
|
1421
1479
|
return n;
|
|
1422
1480
|
}
|
|
1423
|
-
function
|
|
1424
|
-
var
|
|
1481
|
+
function Ot(t, e, n, r) {
|
|
1482
|
+
var i = (
|
|
1425
1483
|
/** @type {V} */
|
|
1426
|
-
|
|
1427
|
-
),
|
|
1428
|
-
|
|
1484
|
+
r
|
|
1485
|
+
), s = !0, l = () => (s && (s = !1, i = /** @type {V} */
|
|
1486
|
+
r), i), f;
|
|
1429
1487
|
f = /** @type {V} */
|
|
1430
|
-
t[e], f === void 0 &&
|
|
1488
|
+
t[e], f === void 0 && r !== void 0 && (f = l());
|
|
1431
1489
|
var a;
|
|
1432
1490
|
return a = () => {
|
|
1433
1491
|
var c = (
|
|
1434
1492
|
/** @type {V} */
|
|
1435
1493
|
t[e]
|
|
1436
1494
|
);
|
|
1437
|
-
return c === void 0 ? l() : (
|
|
1495
|
+
return c === void 0 ? l() : (s = !0, c);
|
|
1438
1496
|
}, a;
|
|
1439
1497
|
}
|
|
1440
|
-
var
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1498
|
+
var mr = /* @__PURE__ */ $e('<svg xmlns="http://www.w3.org/2000/svg" class="pie-window-controls__icon svelte-7vww0g" width="12" height="12" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 15l7-7 7 7"></path></svg>'), gr = /* @__PURE__ */ $e('<svg xmlns="http://www.w3.org/2000/svg" class="pie-window-controls__icon svelte-7vww0g" width="12" height="12" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path></svg>'), br = /* @__PURE__ */ Qe('<button><!></button> <button title="Close" aria-label="Close panel"><svg xmlns="http://www.w3.org/2000/svg" class="pie-window-controls__icon svelte-7vww0g" width="12" height="12" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg></button>', 1);
|
|
1499
|
+
const xr = {
|
|
1500
|
+
hash: "svelte-7vww0g",
|
|
1501
|
+
code: ".pie-window-controls__button.svelte-7vww0g {display:inline-flex;align-items:center;justify-content:center;width:1.35rem;height:1.35rem;padding:0;border:1px solid rgba(148, 163, 184, 0.7);border-radius:9999px;background:rgba(255, 255, 255, 0.65);color:#334155;cursor:pointer;}.pie-window-controls__button.svelte-7vww0g:hover {background:rgba(241, 245, 249, 0.95);}.pie-window-controls__button.svelte-7vww0g:focus-visible {outline:2px solid #3b82f6;outline-offset:1px;}.pie-window-controls__icon.svelte-7vww0g {display:block;}"
|
|
1502
|
+
};
|
|
1503
|
+
function Sr(t, e) {
|
|
1504
|
+
mn(e, !0), cr(t, xr);
|
|
1505
|
+
let n = Ot(e, "minimized", 3, !1), r = Ot(e, "buttonClass", 3, "");
|
|
1506
|
+
const i = /* @__PURE__ */ Dn(() => (r() || "").trim() || "pie-window-controls__button");
|
|
1507
|
+
var s = br(), l = Xn(s), f = Ie(l);
|
|
1444
1508
|
{
|
|
1445
|
-
var
|
|
1446
|
-
var
|
|
1447
|
-
|
|
1448
|
-
},
|
|
1449
|
-
var
|
|
1450
|
-
|
|
1509
|
+
var a = (u) => {
|
|
1510
|
+
var w = mr();
|
|
1511
|
+
Dt(u, w);
|
|
1512
|
+
}, c = (u) => {
|
|
1513
|
+
var w = gr();
|
|
1514
|
+
Dt(u, w);
|
|
1451
1515
|
};
|
|
1452
|
-
|
|
1453
|
-
n() ?
|
|
1516
|
+
ur(f, (u) => {
|
|
1517
|
+
n() ? u(a) : u(c, -1);
|
|
1454
1518
|
});
|
|
1455
1519
|
}
|
|
1456
|
-
var
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
}),
|
|
1460
|
-
e.onToggle?.apply(this,
|
|
1461
|
-
}),
|
|
1462
|
-
e.onClose?.apply(this,
|
|
1463
|
-
}),
|
|
1464
|
-
}
|
|
1465
|
-
|
|
1466
|
-
var
|
|
1467
|
-
function
|
|
1468
|
-
let n =
|
|
1469
|
-
var
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
}),
|
|
1520
|
+
var d = Vn(l, 2);
|
|
1521
|
+
Ye(() => {
|
|
1522
|
+
Ht(l, 1, Pt(re(i)), "svelte-7vww0g"), ge(l, "title", n() ? "Maximize" : "Minimize"), ge(l, "aria-label", n() ? "Maximize panel" : "Minimize panel"), Ht(d, 1, Pt(re(i)), "svelte-7vww0g");
|
|
1523
|
+
}), ie("click", l, function(...u) {
|
|
1524
|
+
e.onToggle?.apply(this, u);
|
|
1525
|
+
}), ie("click", d, function(...u) {
|
|
1526
|
+
e.onClose?.apply(this, u);
|
|
1527
|
+
}), Dt(t, s), gn();
|
|
1528
|
+
}
|
|
1529
|
+
Ke(["click"]);
|
|
1530
|
+
var Er = /* @__PURE__ */ Qe('<div role="button" tabindex="0" title="Resize window"><svg viewBox="0 0 16 16" fill="currentColor"><path d="M16 16V14H14V16H16Z"></path><path d="M16 11V9H14V11H16Z"></path><path d="M13 16V14H11V16H13Z"></path></svg></div>');
|
|
1531
|
+
function Cr(t, e) {
|
|
1532
|
+
let n = Ot(e, "handleClass", 3, "absolute bottom-0 right-0 w-4 h-4 cursor-se-resize"), r = Ot(e, "iconClass", 3, "w-full h-full text-base-content/30");
|
|
1533
|
+
var i = Er(), s = Ie(i);
|
|
1534
|
+
Ye(() => {
|
|
1535
|
+
Ht(i, 1, Pt(n())), Ht(s, 0, Pt(r()));
|
|
1536
|
+
}), ie("mousedown", i, function(...l) {
|
|
1473
1537
|
e.onPointerDown?.apply(this, l);
|
|
1474
|
-
}),
|
|
1538
|
+
}), Dt(t, i);
|
|
1475
1539
|
}
|
|
1476
|
-
|
|
1477
|
-
function
|
|
1478
|
-
const n = (u,
|
|
1540
|
+
Ke(["mousedown"]);
|
|
1541
|
+
function Tr(t, e) {
|
|
1542
|
+
const n = (u, w, v) => Math.max(w, Math.min(u, v)), r = n(
|
|
1479
1543
|
Math.round(t.width * e.widthRatio),
|
|
1480
1544
|
e.minWidth,
|
|
1481
1545
|
e.maxWidth
|
|
1482
|
-
),
|
|
1546
|
+
), i = n(
|
|
1483
1547
|
Math.round(t.height * e.heightRatio),
|
|
1484
1548
|
e.minHeight,
|
|
1485
1549
|
e.maxHeight
|
|
1486
|
-
),
|
|
1487
|
-
return { x: c, y:
|
|
1550
|
+
), s = e.paddingX ?? 16, l = e.paddingY ?? 16, f = Math.max(s, t.width - r - s), a = Math.max(l, t.height - i - l), c = e.alignX === "left" ? s : e.alignX === "right" ? f : Math.max(s, Math.round((t.width - r) / 2)), d = e.alignY === "top" ? l : e.alignY === "bottom" ? a : Math.max(l, Math.round((t.height - i) / 2));
|
|
1551
|
+
return { x: c, y: d, width: r, height: i };
|
|
1488
1552
|
}
|
|
1489
|
-
function
|
|
1553
|
+
function Ar(t) {
|
|
1490
1554
|
const e = t.padding ?? 0;
|
|
1491
|
-
let n = !1,
|
|
1492
|
-
const
|
|
1555
|
+
let n = !1, r = !1, i = 0, s = 0, l = 0, f = 0, a = 0, c = 0, d = 0, u = 0;
|
|
1556
|
+
const w = (S) => {
|
|
1493
1557
|
if (!n) return;
|
|
1494
|
-
const A = t.getState(),
|
|
1558
|
+
const A = t.getState(), zt = S.clientX - i, Bt = S.clientY - s, Wt = Math.max(e, window.innerWidth - A.width - e), Ut = Math.max(e, window.innerHeight - 100 - e);
|
|
1495
1559
|
t.setState({
|
|
1496
1560
|
...A,
|
|
1497
|
-
x: Math.max(e, Math.min(l +
|
|
1498
|
-
y: Math.max(e, Math.min(f +
|
|
1561
|
+
x: Math.max(e, Math.min(l + zt, Wt)),
|
|
1562
|
+
y: Math.max(e, Math.min(f + Bt, Ut))
|
|
1499
1563
|
});
|
|
1500
|
-
},
|
|
1501
|
-
if (!
|
|
1502
|
-
const A = t.getState(),
|
|
1564
|
+
}, v = (S) => {
|
|
1565
|
+
if (!r) return;
|
|
1566
|
+
const A = t.getState(), zt = S.clientX - a, Bt = S.clientY - c, Wt = Math.max(
|
|
1503
1567
|
t.minWidth,
|
|
1504
1568
|
window.innerWidth - A.x - e
|
|
1505
1569
|
), Ut = Math.max(
|
|
@@ -1510,53 +1574,53 @@ function gr(t) {
|
|
|
1510
1574
|
...A,
|
|
1511
1575
|
width: Math.max(
|
|
1512
1576
|
t.minWidth,
|
|
1513
|
-
Math.min(
|
|
1577
|
+
Math.min(d + zt, Wt)
|
|
1514
1578
|
),
|
|
1515
1579
|
height: Math.max(
|
|
1516
1580
|
t.minHeight,
|
|
1517
|
-
Math.min(u +
|
|
1581
|
+
Math.min(u + Bt, Ut)
|
|
1518
1582
|
)
|
|
1519
1583
|
});
|
|
1520
|
-
},
|
|
1521
|
-
n = !1, document.removeEventListener("mousemove",
|
|
1584
|
+
}, j = () => {
|
|
1585
|
+
n = !1, document.removeEventListener("mousemove", w), document.removeEventListener("mouseup", j);
|
|
1522
1586
|
}, M = () => {
|
|
1523
|
-
|
|
1587
|
+
r = !1, document.removeEventListener("mousemove", v), document.removeEventListener("mouseup", M);
|
|
1524
1588
|
};
|
|
1525
1589
|
return {
|
|
1526
1590
|
startDrag(S) {
|
|
1527
|
-
n = !0,
|
|
1591
|
+
n = !0, i = S.clientX, s = S.clientY;
|
|
1528
1592
|
const A = t.getState();
|
|
1529
|
-
l = A.x, f = A.y, document.addEventListener("mousemove",
|
|
1593
|
+
l = A.x, f = A.y, document.addEventListener("mousemove", w), document.addEventListener("mouseup", j);
|
|
1530
1594
|
},
|
|
1531
1595
|
startResize(S) {
|
|
1532
|
-
|
|
1596
|
+
r = !0, a = S.clientX, c = S.clientY;
|
|
1533
1597
|
const A = t.getState();
|
|
1534
|
-
|
|
1598
|
+
d = A.width, u = A.height, document.addEventListener("mousemove", v), document.addEventListener("mouseup", M), S.preventDefault(), S.stopPropagation();
|
|
1535
1599
|
},
|
|
1536
1600
|
stop() {
|
|
1537
|
-
|
|
1601
|
+
j(), M();
|
|
1538
1602
|
}
|
|
1539
1603
|
};
|
|
1540
1604
|
}
|
|
1541
|
-
function
|
|
1605
|
+
function yr(t, e) {
|
|
1542
1606
|
return (t || void 0) === (e || void 0);
|
|
1543
1607
|
}
|
|
1544
|
-
function
|
|
1545
|
-
const
|
|
1546
|
-
return
|
|
1608
|
+
function Rr(t, e, n) {
|
|
1609
|
+
const r = t?.key?.sectionId || "", i = t?.key?.attemptId || void 0;
|
|
1610
|
+
return r !== e ? !1 : yr(i, n);
|
|
1547
1611
|
}
|
|
1548
|
-
function
|
|
1612
|
+
function Nr(t, e, n) {
|
|
1549
1613
|
return !t?.getSectionController || !e ? null : t.getSectionController({
|
|
1550
1614
|
sectionId: e,
|
|
1551
1615
|
attemptId: n
|
|
1552
1616
|
}) || null;
|
|
1553
1617
|
}
|
|
1554
1618
|
export {
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1619
|
+
Cr as PanelResizeHandle,
|
|
1620
|
+
Sr as PanelWindowControls,
|
|
1621
|
+
Tr as computePanelSizeFromViewport,
|
|
1622
|
+
Ar as createFloatingPanelPointerController,
|
|
1623
|
+
Nr as getSectionControllerFromCoordinator,
|
|
1624
|
+
Rr as isMatchingSectionControllerLifecycleEvent,
|
|
1625
|
+
yr as optionalIdsEqual
|
|
1562
1626
|
};
|