@arenarium/maps 1.3.8 → 1.3.9
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/main.js +918 -919
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
class
|
|
1
|
+
class Zt {
|
|
2
2
|
invoked = !1;
|
|
3
3
|
running = !1;
|
|
4
4
|
interval;
|
|
@@ -18,7 +18,7 @@ class Ht {
|
|
|
18
18
|
this.invoked = !1, this.running = !1, this.timeout && window.clearTimeout(this.timeout), this.timeout = void 0;
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
class
|
|
21
|
+
class Mi {
|
|
22
22
|
properites;
|
|
23
23
|
state;
|
|
24
24
|
constructor(e, n, r, i, s, a, u) {
|
|
@@ -36,7 +36,7 @@ class bi {
|
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
class
|
|
39
|
+
class Ei {
|
|
40
40
|
callback;
|
|
41
41
|
timeout;
|
|
42
42
|
id;
|
|
@@ -51,8 +51,8 @@ class _i {
|
|
|
51
51
|
this.id != null && (window.clearInterval(this.id), this.id = void 0);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
const
|
|
55
|
-
class
|
|
54
|
+
const xi = 100;
|
|
55
|
+
class Si {
|
|
56
56
|
viewport = void 0;
|
|
57
57
|
state = "idle";
|
|
58
58
|
provider;
|
|
@@ -63,7 +63,7 @@ class Ei {
|
|
|
63
63
|
onIdle;
|
|
64
64
|
onClick;
|
|
65
65
|
constructor(e, n, r, i, s, a) {
|
|
66
|
-
this.provider = e, this.interval = new
|
|
66
|
+
this.provider = e, this.interval = new Ei(this.onInterval.bind(this), xi / (navigator?.hardwareConcurrency ?? 1)), this.onCancel = n, this.onError = r, this.onMove = i, this.onIdle = s, this.onClick = a;
|
|
67
67
|
}
|
|
68
68
|
start() {
|
|
69
69
|
this.interval.start(), this.provider.getContainer().addEventListener("click", this.onClick.bind(this));
|
|
@@ -87,7 +87,7 @@ class Ei {
|
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
|
-
class
|
|
90
|
+
class sr {
|
|
91
91
|
worker;
|
|
92
92
|
workerInvocations;
|
|
93
93
|
workerInvocationCounter = 0;
|
|
@@ -126,11 +126,11 @@ class We {
|
|
|
126
126
|
return new We([], []);
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
|
-
const
|
|
130
|
-
function
|
|
129
|
+
const ar = '(function(){"use strict";function w(l,t,e){return{x:T(t)*e,y:I(l)*e}}function m(l,t,e){return{lat:R(t/e),lng:P(l/e)}}function T(l){return(180+l)/360}function I(l){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+l*Math.PI/360)))/360}function P(l){return l*360-180}function R(l){return 360/Math.PI*Math.atan(Math.exp((180-l*360)*Math.PI/180))-90}class c{sw;ne;constructor(t,e,n,s){if(n<t)throw new Error(`Invalid bounds: ${t}, ${e}, ${n}, ${s}`);if(s<e)throw new Error(`Invalid bounds: ${t}, ${e}, ${n}, ${s}`);this.sw={lat:t,lng:e},this.ne={lat:n,lng:s}}contains(t,e){return!(t<this.sw.lat||this.ne.lat<t||e<this.sw.lng||this.ne.lng<e)}intersects(t){return!(t.ne.lat<this.sw.lat||this.ne.lat<t.sw.lat||t.ne.lng<this.sw.lng||this.ne.lng<t.sw.lng)}}class h{blockL;blockR;sw;ne;constructor(t,e,n,s){if(n<t)throw new Error(`Invalid bounds: ${t}, ${e}, ${n}, ${s}`);this.sw={lat:t,lng:e},this.ne={lat:n,lng:s},e<s?(this.blockL=new c(t,e,n,s),this.blockR=new c(0,0,0,0)):(this.blockL=new c(t,-180,n,s),this.blockR=new c(t,e,n,180))}static bounds(t){const e=t.bounds,n=t.center;return e.sw.lng<=n.lng&&e.ne.lng<=n.lng?{sw:{lat:e.sw.lat,lng:-180},ne:{lat:e.ne.lat,lng:180}}:e.sw.lng>=n.lng&&e.ne.lng>=n.lng?{sw:{lat:e.sw.lat,lng:-180},ne:{lat:e.ne.lat,lng:180}}:Math.abs(e.ne.lng-n.lng)+Math.abs(e.sw.lng-n.lng)>360?{sw:{lat:e.sw.lat,lng:-180},ne:{lat:e.ne.lat,lng:180}}:e.ne.lng-e.sw.lng>360?{sw:{lat:e.sw.lat,lng:-180},ne:{lat:e.ne.lat,lng:180}}:t.bounds}static create(t){const e=this.bounds(t),n=e.sw,s=e.ne;return new h(n.lat,n.lng,s.lat,s.lng)}static offset(t,e,n){const s=this.bounds(t),r=t.zoom,o=e*Math.pow(2,r),i=w(s.sw.lat,s.sw.lng,o),a=w(s.ne.lat,s.ne.lng,o);let g=Math.max(i.x-n.left,0),f=Math.min(i.y+n.bottom,o),D=Math.min(a.x+n.right,o),N=Math.max(a.y-n.top,0);const z=m(g,f,o),C=m(D,N,o);return new h(z.lat,z.lng,C.lat,C.lng)}contains(t,e){return this.blockL.contains(t,e)||this.blockR.contains(t,e)}intersects(t){return this.blockL.intersects(t)||this.blockR.intersects(t)}}class S{id;bounds;markers;constructor(t,e){this.id=t,this.bounds=e,this.markers=[]}belongs(t){const e=this.bounds.sw;if(t.lat<e.lat||t.lng<e.lng)return!1;const n=this.bounds.ne;return!(n.lat<t.lat||n.lng<t.lng)}neighbours(t,e){const n=Math.abs(t.id.length-this.id.length);if(n>e)return!1;const s=Math.min(this.id.length,t.id.length)-e+n;for(let r=0;r<s;r++)if(this.id[r]!=t.id[r])return!1;return!0}}class u{tree;zoom;cell;branches;constructor(t,e,n,s){this.tree=t,this.zoom=n,this.cell=new S(e,s),this.branches=new Array}split(){const t=this.cell.bounds,e=Math.pow(2,this.tree.depth),n=(t.ne.lat-t.sw.lat)/e,s=(t.ne.lng-t.sw.lng)/e;for(let r=0;r<e;r++)for(let o=0;o<e;o++){const i=t.sw.lat+r*n,a=t.sw.lng+o*s,g=i+n,f=a+s;this.branches.push(new u(this.tree,`${this.cell.id}${r*2+o}`,this.zoom+this.tree.depth,{sw:{lat:i,lng:a},ne:{lat:g,lng:f}}))}}add(t){if(this.cell.belongs(t)==!1)return!1;if(this.cell.markers.length<this.tree.capacity)return this.cell.markers.push(t),!0;this.branches.length==0&&this.split();for(let e=0;e<this.branches.length;e++)if(this.branches[e].add(t))return!0;throw new Error("Failed to add marker to branch")}compact(){if(this.branches.length==0)return;for(let s=0;s<this.branches.length;s++)this.branches[s].compact();const t=new Array,e=new Array;for(let s=0;s<this.branches.length;s++){const r=this.branches[s];t.push(...r.branches),e.push(...r.cell.markers)}const n=new u(this.tree,this.cell.id,this.zoom+this.tree.depth,this.cell.bounds);n.branches=t,n.cell.markers=e,this.branches=[n]}cells(t,e,n){if(t<this.zoom||e.intersects(this.cell.bounds)==!1)return n;n.push(this.cell);for(let s=0;s<this.branches.length;s++)this.branches[s].cells(t,e,n);return n}print(t){console.log(`${"---".repeat(t)}|${this.cell.id} zoom=[${this.zoom}] markers=[${this.cell.markers.length}]`);for(let e=0;e<this.branches.length;e++)this.branches[e].print(t+1)}count(){return this.cell.markers.length+this.branches.reduce((t,e)=>t+e.count(),0)}}class x{capacity;depth;root;constructor(t,e,n){this.capacity=n,this.depth=e,this.root=new u(this,"R",t,{sw:{lat:-90,lng:-180},ne:{lat:90,lng:180}})}add(t){return this.root.add(t)}compact(){this.root.compact()}cells(t,e){const n=new Array;return this.root.cells(t,e,n),n}print(){this.root.print(0)}}const A=16,p=2,k=1,M=A*4;let b,d,E=p,$=k,y=M;const v={update(l,t,e){const n=-Math.floor(Math.log2(l.mapSize/y)),s=new x(n,$,E);for(let o=0;o<t.length;o++){const i=t[o];if(!s.add(i))throw new Error("Failed to add marker to tree")}const r=-n;for(let o=0;o<r;o++)s.compact();b=s,d=e},configure(l){E=l?.process?.visibility?.cell?.capacity??p,$=l?.process?.visibility?.cell?.depth??k,y=l?.process?.visibility?.cell?.size??M},filter(l,t){if(!b||!d)return[];const e=h.create(t);let n=[],s=t.zoom;for(;s<l.zoomMax&&n.length<d;)n=b.cells(s,e).flatMap(r=>r.markers),s++;return n.map(r=>r.index)}};class _{methods;constructor(t){this.methods=t}listen(){self.onmessage=this.onmessage.bind(this)}async onmessage(t){const{id:e,method:n,args:s}=t.data;try{const r=this.methods[n];if(typeof r!="function")throw new Error(`Unknown method: ${n}`);const o=await r(...s),i={id:e,result:o};self.postMessage(i)}catch(r){const o=r instanceof Error?r.message:String(r),i={id:e,error:o};self.postMessage(i)}}}new _(v).listen()})();\n', Nn = typeof self < "u" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);", ar], { type: "text/javascript;charset=utf-8" });
|
|
130
|
+
function Pi(t) {
|
|
131
131
|
let e;
|
|
132
132
|
try {
|
|
133
|
-
if (e =
|
|
133
|
+
if (e = Nn && (self.URL || self.webkitURL).createObjectURL(Nn), !e) throw "";
|
|
134
134
|
const n = new Worker(e, {
|
|
135
135
|
name: t?.name
|
|
136
136
|
});
|
|
@@ -139,32 +139,32 @@ function xi(t) {
|
|
|
139
139
|
}), n;
|
|
140
140
|
} catch {
|
|
141
141
|
return new Worker(
|
|
142
|
-
"data:text/javascript;charset=utf-8," + encodeURIComponent(
|
|
142
|
+
"data:text/javascript;charset=utf-8," + encodeURIComponent(ar),
|
|
143
143
|
{
|
|
144
144
|
name: t?.name
|
|
145
145
|
}
|
|
146
146
|
);
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
|
-
function
|
|
150
|
-
return { x:
|
|
149
|
+
function at(t, e, n) {
|
|
150
|
+
return { x: Ti(e) * n, y: Ii(t) * n };
|
|
151
151
|
}
|
|
152
|
-
function
|
|
153
|
-
return { lat:
|
|
152
|
+
function Cn(t, e, n) {
|
|
153
|
+
return { lat: Ni(e / n), lng: Ai(t / n) };
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function Ti(t) {
|
|
156
156
|
return (180 + t) / 360;
|
|
157
157
|
}
|
|
158
|
-
function
|
|
158
|
+
function Ii(t) {
|
|
159
159
|
return (180 - 180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + t * Math.PI / 360))) / 360;
|
|
160
160
|
}
|
|
161
|
-
function
|
|
161
|
+
function Ai(t) {
|
|
162
162
|
return t * 360 - 180;
|
|
163
163
|
}
|
|
164
|
-
function
|
|
164
|
+
function Ni(t) {
|
|
165
165
|
return 360 / Math.PI * Math.atan(Math.exp((180 - t * 360) * Math.PI / 180)) - 90;
|
|
166
166
|
}
|
|
167
|
-
class
|
|
167
|
+
class _t {
|
|
168
168
|
sw;
|
|
169
169
|
ne;
|
|
170
170
|
constructor(e, n, r, i) {
|
|
@@ -179,14 +179,14 @@ class yt {
|
|
|
179
179
|
return !(e.ne.lat < this.sw.lat || this.ne.lat < e.sw.lat || e.ne.lng < this.sw.lng || this.ne.lng < e.sw.lng);
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
|
-
class
|
|
182
|
+
class ut {
|
|
183
183
|
blockL;
|
|
184
184
|
blockR;
|
|
185
185
|
sw;
|
|
186
186
|
ne;
|
|
187
187
|
constructor(e, n, r, i) {
|
|
188
188
|
if (r < e) throw new Error(`Invalid bounds: ${e}, ${n}, ${r}, ${i}`);
|
|
189
|
-
this.sw = { lat: e, lng: n }, this.ne = { lat: r, lng: i }, n < i ? (this.blockL = new
|
|
189
|
+
this.sw = { lat: e, lng: n }, this.ne = { lat: r, lng: i }, n < i ? (this.blockL = new _t(e, n, r, i), this.blockR = new _t(0, 0, 0, 0)) : (this.blockL = new _t(e, -180, r, i), this.blockR = new _t(e, n, r, 180));
|
|
190
190
|
}
|
|
191
191
|
static bounds(e) {
|
|
192
192
|
const n = e.bounds, r = e.center;
|
|
@@ -194,7 +194,7 @@ class lt {
|
|
|
194
194
|
}
|
|
195
195
|
static create(e) {
|
|
196
196
|
const n = this.bounds(e), r = n.sw, i = n.ne;
|
|
197
|
-
return new
|
|
197
|
+
return new ut(r.lat, r.lng, i.lat, i.lng);
|
|
198
198
|
}
|
|
199
199
|
/**
|
|
200
200
|
* @param viewport - The viewport of the map.
|
|
@@ -203,10 +203,10 @@ class lt {
|
|
|
203
203
|
* @param offsetY - The y offset of the map in pixels at zoom level n.
|
|
204
204
|
*/
|
|
205
205
|
static offset(e, n, r) {
|
|
206
|
-
const i = this.bounds(e), s = e.zoom, a = n * Math.pow(2, s), u =
|
|
207
|
-
let l = Math.max(u.x - r.left, 0), c = Math.min(u.y + r.bottom, a), f = Math.min(o.x + r.right, a),
|
|
208
|
-
const m =
|
|
209
|
-
return new
|
|
206
|
+
const i = this.bounds(e), s = e.zoom, a = n * Math.pow(2, s), u = at(i.sw.lat, i.sw.lng, a), o = at(i.ne.lat, i.ne.lng, a);
|
|
207
|
+
let l = Math.max(u.x - r.left, 0), c = Math.min(u.y + r.bottom, a), f = Math.min(o.x + r.right, a), p = Math.max(o.y - r.top, 0);
|
|
208
|
+
const m = Cn(l, c, a), h = Cn(f, p, a);
|
|
209
|
+
return new ut(m.lat, m.lng, h.lat, h.lng);
|
|
210
210
|
}
|
|
211
211
|
contains(e, n) {
|
|
212
212
|
return this.blockL.contains(e, n) || this.blockR.contains(e, n);
|
|
@@ -215,16 +215,16 @@ class lt {
|
|
|
215
215
|
return this.blockL.intersects(e) || this.blockR.intersects(e);
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
|
-
const
|
|
219
|
-
class
|
|
218
|
+
const Ci = 75, Ri = 150, Rn = 25e-5, Di = 1e6, zi = 2e6, Dn = 3e6, or = 10, zn = 16, Oi = 8, On = 2, je = 0.5, Li = "0px 2px 2px rgba(0, 0, 0, 0.5)", Fi = 8, $i = 8, Vi = "drop-shadow(0px 2px 2px rgba(0, 0, 0, 0.5))", Ln = "white", ji = "darkgreen", Fn = 1024;
|
|
219
|
+
class Ui {
|
|
220
220
|
// State
|
|
221
221
|
markers;
|
|
222
222
|
markersVisible;
|
|
223
223
|
markerVisibilityTreeWorker;
|
|
224
224
|
markerVisibilityTreeWorkerClient;
|
|
225
|
-
markerVisibilityTreeLimit =
|
|
225
|
+
markerVisibilityTreeLimit = Fn;
|
|
226
226
|
set configuration(e) {
|
|
227
|
-
this.markerVisibilityTreeWorkerClient?.invoke("configure", e), this.markerVisibilityTreeLimit = e?.process?.visibility?.limit ??
|
|
227
|
+
this.markerVisibilityTreeWorkerClient?.invoke("configure", e), this.markerVisibilityTreeLimit = e?.process?.visibility?.limit ?? Fn;
|
|
228
228
|
}
|
|
229
229
|
getMarkers() {
|
|
230
230
|
return Array.from(this.markersVisible ?? []);
|
|
@@ -240,7 +240,7 @@ class $i {
|
|
|
240
240
|
return We.empty();
|
|
241
241
|
}
|
|
242
242
|
async updateMarkers(e, n) {
|
|
243
|
-
this.markers = n, n.length > this.markerVisibilityTreeLimit ? (this.markerVisibilityTreeWorker = new
|
|
243
|
+
this.markers = n, n.length > this.markerVisibilityTreeLimit ? (this.markerVisibilityTreeWorker = new Pi(), this.markerVisibilityTreeWorkerClient = new sr(this.markerVisibilityTreeWorker), await this.markerVisibilityTreeWorkerClient.invoke(
|
|
244
244
|
"update",
|
|
245
245
|
e,
|
|
246
246
|
n.map((r, i) => ({ index: i, lat: r.properites.lat, lng: r.properites.lng })),
|
|
@@ -251,56 +251,56 @@ class $i {
|
|
|
251
251
|
this.markers = void 0, this.markersVisible = void 0, this.markerVisibilityTreeWorker = void 0, this.markerVisibilityTreeWorkerClient = void 0;
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
|
-
const
|
|
255
|
-
var
|
|
256
|
-
const
|
|
254
|
+
const Qt = !1;
|
|
255
|
+
var Wi = Array.isArray, Bi = Array.prototype.indexOf, Ye = Array.prototype.includes, Hi = Array.from, qi = Object.defineProperty, ot = Object.getOwnPropertyDescriptor, Zi = Object.prototype, Yi = Array.prototype, Ji = Object.getPrototypeOf, $n = Object.isExtensible;
|
|
256
|
+
const Xi = () => {
|
|
257
257
|
};
|
|
258
|
-
function
|
|
258
|
+
function Ki(t) {
|
|
259
259
|
for (var e = 0; e < t.length; e++)
|
|
260
260
|
t[e]();
|
|
261
261
|
}
|
|
262
|
-
function
|
|
262
|
+
function lr() {
|
|
263
263
|
var t, e, n = new Promise((r, i) => {
|
|
264
264
|
t = r, e = i;
|
|
265
265
|
});
|
|
266
266
|
return { promise: n, resolve: t, reject: e };
|
|
267
267
|
}
|
|
268
|
-
const
|
|
268
|
+
const z = 2, pt = 4, Dt = 8, ur = 1 << 24, we = 16, Pe = 32, Fe = 64, en = 128, ee = 512, D = 1024, F = 2048, se = 4096, _e = 8192, Me = 16384, Je = 32768, Nt = 65536, Vn = 1 << 17, cr = 1 << 18, et = 1 << 19, Gi = 1 << 20, Le = 65536, tn = 1 << 21, on = 1 << 22, Ee = 1 << 23, Tt = /* @__PURE__ */ Symbol("$state"), Ne = new class extends Error {
|
|
269
269
|
name = "StaleReactionError";
|
|
270
270
|
message = "The reaction that called `getAbortSignal()` was re-run or destroyed";
|
|
271
271
|
}();
|
|
272
|
-
function
|
|
272
|
+
function Qi() {
|
|
273
273
|
throw new Error("https://svelte.dev/e/async_derived_orphan");
|
|
274
274
|
}
|
|
275
|
-
function
|
|
275
|
+
function es() {
|
|
276
276
|
throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
|
|
277
277
|
}
|
|
278
|
-
function
|
|
278
|
+
function ts() {
|
|
279
279
|
throw new Error("https://svelte.dev/e/state_descriptors_fixed");
|
|
280
280
|
}
|
|
281
|
-
function
|
|
281
|
+
function ns() {
|
|
282
282
|
throw new Error("https://svelte.dev/e/state_prototype_fixed");
|
|
283
283
|
}
|
|
284
|
-
function
|
|
284
|
+
function rs() {
|
|
285
285
|
throw new Error("https://svelte.dev/e/state_unsafe_mutation");
|
|
286
286
|
}
|
|
287
|
-
function
|
|
287
|
+
function is() {
|
|
288
288
|
throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
|
|
289
289
|
}
|
|
290
|
-
const
|
|
291
|
-
function
|
|
290
|
+
const R = /* @__PURE__ */ Symbol(), ss = "http://www.w3.org/1999/xhtml";
|
|
291
|
+
function as() {
|
|
292
292
|
console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
|
|
293
293
|
}
|
|
294
|
-
function
|
|
294
|
+
function fr(t) {
|
|
295
295
|
return t === this.v;
|
|
296
296
|
}
|
|
297
|
-
let
|
|
297
|
+
let os = !1, ae = null;
|
|
298
298
|
function Xe(t) {
|
|
299
|
-
|
|
299
|
+
ae = t;
|
|
300
300
|
}
|
|
301
|
-
function
|
|
302
|
-
|
|
303
|
-
p:
|
|
301
|
+
function ln(t, e = !1, n) {
|
|
302
|
+
ae = {
|
|
303
|
+
p: ae,
|
|
304
304
|
i: !1,
|
|
305
305
|
c: null,
|
|
306
306
|
e: null,
|
|
@@ -309,47 +309,47 @@ function an(t, e = !1, n) {
|
|
|
309
309
|
l: null
|
|
310
310
|
};
|
|
311
311
|
}
|
|
312
|
-
function
|
|
312
|
+
function un(t) {
|
|
313
313
|
var e = (
|
|
314
314
|
/** @type {ComponentContext} */
|
|
315
|
-
|
|
315
|
+
ae
|
|
316
316
|
), n = e.e;
|
|
317
317
|
if (n !== null) {
|
|
318
318
|
e.e = null;
|
|
319
319
|
for (var r of n)
|
|
320
|
-
|
|
320
|
+
As(r);
|
|
321
321
|
}
|
|
322
|
-
return t !== void 0 && (e.x = t), e.i = !0,
|
|
322
|
+
return t !== void 0 && (e.x = t), e.i = !0, ae = e.p, t ?? /** @type {T} */
|
|
323
323
|
{};
|
|
324
324
|
}
|
|
325
|
-
function
|
|
325
|
+
function hr() {
|
|
326
326
|
return !0;
|
|
327
327
|
}
|
|
328
328
|
let Ue = [];
|
|
329
|
-
function
|
|
329
|
+
function ls() {
|
|
330
330
|
var t = Ue;
|
|
331
|
-
Ue = [],
|
|
331
|
+
Ue = [], Ki(t);
|
|
332
332
|
}
|
|
333
333
|
function Re(t) {
|
|
334
334
|
if (Ue.length === 0) {
|
|
335
335
|
var e = Ue;
|
|
336
336
|
queueMicrotask(() => {
|
|
337
|
-
e === Ue &&
|
|
337
|
+
e === Ue && ls();
|
|
338
338
|
});
|
|
339
339
|
}
|
|
340
340
|
Ue.push(t);
|
|
341
341
|
}
|
|
342
|
-
function
|
|
343
|
-
var e =
|
|
342
|
+
function pr(t) {
|
|
343
|
+
var e = y;
|
|
344
344
|
if (e === null)
|
|
345
|
-
return k.f |=
|
|
346
|
-
if ((e.f & Je) === 0 && (e.f &
|
|
345
|
+
return k.f |= Ee, t;
|
|
346
|
+
if ((e.f & Je) === 0 && (e.f & pt) === 0)
|
|
347
347
|
throw t;
|
|
348
|
-
|
|
348
|
+
be(t, e);
|
|
349
349
|
}
|
|
350
|
-
function
|
|
350
|
+
function be(t, e) {
|
|
351
351
|
for (; e !== null; ) {
|
|
352
|
-
if ((e.f &
|
|
352
|
+
if ((e.f & en) !== 0) {
|
|
353
353
|
if ((e.f & Je) === 0)
|
|
354
354
|
throw t;
|
|
355
355
|
try {
|
|
@@ -363,27 +363,27 @@ function ye(t, e) {
|
|
|
363
363
|
}
|
|
364
364
|
throw t;
|
|
365
365
|
}
|
|
366
|
-
const
|
|
366
|
+
const us = -7169;
|
|
367
367
|
function S(t, e) {
|
|
368
|
-
t.f = t.f &
|
|
368
|
+
t.f = t.f & us | e;
|
|
369
369
|
}
|
|
370
|
-
function
|
|
371
|
-
(t.f &
|
|
370
|
+
function cn(t) {
|
|
371
|
+
(t.f & ee) !== 0 || t.deps === null ? S(t, D) : S(t, se);
|
|
372
372
|
}
|
|
373
|
-
function
|
|
373
|
+
function dr(t) {
|
|
374
374
|
if (t !== null)
|
|
375
375
|
for (const e of t)
|
|
376
|
-
(e.f &
|
|
376
|
+
(e.f & z) === 0 || (e.f & Le) === 0 || (e.f ^= Le, dr(
|
|
377
377
|
/** @type {Derived} */
|
|
378
378
|
e.deps
|
|
379
379
|
));
|
|
380
380
|
}
|
|
381
|
-
function
|
|
382
|
-
(t.f &
|
|
381
|
+
function mr(t, e, n) {
|
|
382
|
+
(t.f & F) !== 0 ? e.add(t) : (t.f & se) !== 0 && n.add(t), dr(t.deps), S(t, D);
|
|
383
383
|
}
|
|
384
|
-
const
|
|
385
|
-
let x = null,
|
|
386
|
-
class
|
|
384
|
+
const Mt = /* @__PURE__ */ new Set();
|
|
385
|
+
let x = null, re = null, G = [], fn = null, nn = !1;
|
|
386
|
+
class xe {
|
|
387
387
|
/**
|
|
388
388
|
* The current values of any sources that are updated in this batch
|
|
389
389
|
* They keys of this map are identical to `this.#previous`
|
|
@@ -461,9 +461,9 @@ class Ee {
|
|
|
461
461
|
if (n) {
|
|
462
462
|
this.#t.delete(e);
|
|
463
463
|
for (var r of n.d)
|
|
464
|
-
S(r,
|
|
464
|
+
S(r, F), ce(r);
|
|
465
465
|
for (r of n.m)
|
|
466
|
-
S(r,
|
|
466
|
+
S(r, se), ce(r);
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
469
|
/**
|
|
@@ -471,19 +471,19 @@ class Ee {
|
|
|
471
471
|
* @param {Effect[]} root_effects
|
|
472
472
|
*/
|
|
473
473
|
process(e) {
|
|
474
|
-
|
|
474
|
+
G = [], this.apply();
|
|
475
475
|
var n = [], r = [];
|
|
476
476
|
for (const i of e)
|
|
477
477
|
this.#l(i, n, r);
|
|
478
478
|
if (this.#u()) {
|
|
479
479
|
this.#c(r), this.#c(n);
|
|
480
480
|
for (const [i, s] of this.#t)
|
|
481
|
-
|
|
481
|
+
wr(i, s);
|
|
482
482
|
} else {
|
|
483
483
|
for (const i of this.#r) i();
|
|
484
|
-
this.#r.clear(), this.#i === 0 && this.#h(), x = null,
|
|
484
|
+
this.#r.clear(), this.#i === 0 && this.#h(), x = null, jn(r), jn(n), this.#s.clear(), this.#e.clear(), this.#n?.resolve();
|
|
485
485
|
}
|
|
486
|
-
|
|
486
|
+
re = null;
|
|
487
487
|
}
|
|
488
488
|
/**
|
|
489
489
|
* Traverse the effect tree, executing effects or stashing
|
|
@@ -493,11 +493,11 @@ class Ee {
|
|
|
493
493
|
* @param {Effect[]} render_effects
|
|
494
494
|
*/
|
|
495
495
|
#l(e, n, r) {
|
|
496
|
-
e.f ^=
|
|
496
|
+
e.f ^= D;
|
|
497
497
|
for (var i = e.first; i !== null; ) {
|
|
498
|
-
var s = i.f, a = (s & (
|
|
498
|
+
var s = i.f, a = (s & (Pe | Fe)) !== 0, u = a && (s & D) !== 0, o = u || (s & _e) !== 0 || this.#t.has(i);
|
|
499
499
|
if (!o && i.fn !== null) {
|
|
500
|
-
a ? i.f ^=
|
|
500
|
+
a ? i.f ^= D : (s & pt) !== 0 ? n.push(i) : dt(i) && ((s & we) !== 0 && this.#e.add(i), Ge(i));
|
|
501
501
|
var l = i.first;
|
|
502
502
|
if (l !== null) {
|
|
503
503
|
i = l;
|
|
@@ -519,7 +519,7 @@ class Ee {
|
|
|
519
519
|
*/
|
|
520
520
|
#c(e) {
|
|
521
521
|
for (var n = 0; n < e.length; n += 1)
|
|
522
|
-
|
|
522
|
+
mr(e[n], this.#s, this.#e);
|
|
523
523
|
}
|
|
524
524
|
/**
|
|
525
525
|
* Associate a change to a given source with the current
|
|
@@ -528,17 +528,17 @@ class Ee {
|
|
|
528
528
|
* @param {any} value
|
|
529
529
|
*/
|
|
530
530
|
capture(e, n) {
|
|
531
|
-
n !==
|
|
531
|
+
n !== R && !this.previous.has(e) && this.previous.set(e, n), (e.f & Ee) === 0 && (this.current.set(e, e.v), re?.set(e, e.v));
|
|
532
532
|
}
|
|
533
533
|
activate() {
|
|
534
534
|
x = this, this.apply();
|
|
535
535
|
}
|
|
536
536
|
deactivate() {
|
|
537
|
-
x === this && (x = null,
|
|
537
|
+
x === this && (x = null, re = null);
|
|
538
538
|
}
|
|
539
539
|
flush() {
|
|
540
|
-
if (this.activate(),
|
|
541
|
-
if (
|
|
540
|
+
if (this.activate(), G.length > 0) {
|
|
541
|
+
if (cs(), x !== null && x !== this)
|
|
542
542
|
return;
|
|
543
543
|
} else this.#i === 0 && this.process([]);
|
|
544
544
|
this.deactivate();
|
|
@@ -548,10 +548,10 @@ class Ee {
|
|
|
548
548
|
this.#p.clear();
|
|
549
549
|
}
|
|
550
550
|
#h() {
|
|
551
|
-
if (
|
|
551
|
+
if (Mt.size > 1) {
|
|
552
552
|
this.previous.clear();
|
|
553
|
-
var e =
|
|
554
|
-
for (const i of
|
|
553
|
+
var e = re, n = !0;
|
|
554
|
+
for (const i of Mt) {
|
|
555
555
|
if (i === this) {
|
|
556
556
|
n = !1;
|
|
557
557
|
continue;
|
|
@@ -569,23 +569,23 @@ class Ee {
|
|
|
569
569
|
continue;
|
|
570
570
|
const a = [...i.current.keys()].filter((u) => !this.current.has(u));
|
|
571
571
|
if (a.length > 0) {
|
|
572
|
-
var r =
|
|
573
|
-
|
|
572
|
+
var r = G;
|
|
573
|
+
G = [];
|
|
574
574
|
const u = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Map();
|
|
575
575
|
for (const l of s)
|
|
576
|
-
|
|
577
|
-
if (
|
|
576
|
+
vr(l, a, u, o);
|
|
577
|
+
if (G.length > 0) {
|
|
578
578
|
x = i, i.apply();
|
|
579
|
-
for (const l of
|
|
579
|
+
for (const l of G)
|
|
580
580
|
i.#l(l, [], []);
|
|
581
581
|
i.deactivate();
|
|
582
582
|
}
|
|
583
|
-
|
|
583
|
+
G = r;
|
|
584
584
|
}
|
|
585
585
|
}
|
|
586
|
-
x = null,
|
|
586
|
+
x = null, re = e;
|
|
587
587
|
}
|
|
588
|
-
this.#t.clear(),
|
|
588
|
+
this.#t.clear(), Mt.delete(this);
|
|
589
589
|
}
|
|
590
590
|
/**
|
|
591
591
|
*
|
|
@@ -600,14 +600,14 @@ class Ee {
|
|
|
600
600
|
*/
|
|
601
601
|
decrement(e) {
|
|
602
602
|
this.#i -= 1, e && (this.#o -= 1), !this.#a && (this.#a = !0, Re(() => {
|
|
603
|
-
this.#a = !1, this.#u() ?
|
|
603
|
+
this.#a = !1, this.#u() ? G.length > 0 && this.flush() : this.revive();
|
|
604
604
|
}));
|
|
605
605
|
}
|
|
606
606
|
revive() {
|
|
607
607
|
for (const e of this.#s)
|
|
608
|
-
this.#e.delete(e), S(e,
|
|
608
|
+
this.#e.delete(e), S(e, F), ce(e);
|
|
609
609
|
for (const e of this.#e)
|
|
610
|
-
S(e,
|
|
610
|
+
S(e, se), ce(e);
|
|
611
611
|
this.flush();
|
|
612
612
|
}
|
|
613
613
|
/** @param {() => void} fn */
|
|
@@ -619,12 +619,12 @@ class Ee {
|
|
|
619
619
|
this.#p.add(e);
|
|
620
620
|
}
|
|
621
621
|
settled() {
|
|
622
|
-
return (this.#n ??=
|
|
622
|
+
return (this.#n ??= lr()).promise;
|
|
623
623
|
}
|
|
624
624
|
static ensure() {
|
|
625
625
|
if (x === null) {
|
|
626
|
-
const e = x = new
|
|
627
|
-
|
|
626
|
+
const e = x = new xe();
|
|
627
|
+
Mt.add(x), Re(() => {
|
|
628
628
|
x === e && e.flush();
|
|
629
629
|
});
|
|
630
630
|
}
|
|
@@ -633,46 +633,46 @@ class Ee {
|
|
|
633
633
|
apply() {
|
|
634
634
|
}
|
|
635
635
|
}
|
|
636
|
-
function
|
|
637
|
-
|
|
636
|
+
function cs() {
|
|
637
|
+
nn = !0;
|
|
638
638
|
var t = null;
|
|
639
639
|
try {
|
|
640
|
-
for (var e = 0;
|
|
641
|
-
var n =
|
|
640
|
+
for (var e = 0; G.length > 0; ) {
|
|
641
|
+
var n = xe.ensure();
|
|
642
642
|
if (e++ > 1e3) {
|
|
643
643
|
var r, i;
|
|
644
|
-
|
|
644
|
+
fs();
|
|
645
645
|
}
|
|
646
|
-
n.process(
|
|
646
|
+
n.process(G), Se.clear();
|
|
647
647
|
}
|
|
648
648
|
} finally {
|
|
649
|
-
|
|
649
|
+
G = [], nn = !1, fn = null;
|
|
650
650
|
}
|
|
651
651
|
}
|
|
652
|
-
function
|
|
652
|
+
function fs() {
|
|
653
653
|
try {
|
|
654
|
-
|
|
654
|
+
es();
|
|
655
655
|
} catch (t) {
|
|
656
|
-
|
|
656
|
+
be(t, fn);
|
|
657
657
|
}
|
|
658
658
|
}
|
|
659
659
|
let ve = null;
|
|
660
|
-
function
|
|
660
|
+
function jn(t) {
|
|
661
661
|
var e = t.length;
|
|
662
662
|
if (e !== 0) {
|
|
663
663
|
for (var n = 0; n < e; ) {
|
|
664
664
|
var r = t[n++];
|
|
665
|
-
if ((r.f & (
|
|
666
|
-
|
|
665
|
+
if ((r.f & (Me | _e)) === 0 && dt(r) && (ve = /* @__PURE__ */ new Set(), Ge(r), r.deps === null && r.first === null && r.nodes === null && r.teardown === null && r.ac === null && Cr(r), ve?.size > 0)) {
|
|
666
|
+
Se.clear();
|
|
667
667
|
for (const i of ve) {
|
|
668
|
-
if ((i.f & (
|
|
668
|
+
if ((i.f & (Me | _e)) !== 0) continue;
|
|
669
669
|
const s = [i];
|
|
670
670
|
let a = i.parent;
|
|
671
671
|
for (; a !== null; )
|
|
672
672
|
ve.has(a) && (ve.delete(a), s.push(a)), a = a.parent;
|
|
673
673
|
for (let u = s.length - 1; u >= 0; u--) {
|
|
674
674
|
const o = s[u];
|
|
675
|
-
(o.f & (
|
|
675
|
+
(o.f & (Me | _e)) === 0 && Ge(o);
|
|
676
676
|
}
|
|
677
677
|
}
|
|
678
678
|
ve.clear();
|
|
@@ -681,30 +681,30 @@ function Vn(t) {
|
|
|
681
681
|
ve = null;
|
|
682
682
|
}
|
|
683
683
|
}
|
|
684
|
-
function
|
|
684
|
+
function vr(t, e, n, r) {
|
|
685
685
|
if (!n.has(t) && (n.add(t), t.reactions !== null))
|
|
686
686
|
for (const i of t.reactions) {
|
|
687
687
|
const s = i.f;
|
|
688
|
-
(s &
|
|
688
|
+
(s & z) !== 0 ? vr(
|
|
689
689
|
/** @type {Derived} */
|
|
690
690
|
i,
|
|
691
691
|
e,
|
|
692
692
|
n,
|
|
693
693
|
r
|
|
694
|
-
) : (s & (
|
|
694
|
+
) : (s & (on | we)) !== 0 && (s & F) === 0 && gr(i, e, r) && (S(i, F), ce(
|
|
695
695
|
/** @type {Effect} */
|
|
696
696
|
i
|
|
697
697
|
));
|
|
698
698
|
}
|
|
699
699
|
}
|
|
700
|
-
function
|
|
700
|
+
function gr(t, e, n) {
|
|
701
701
|
const r = n.get(t);
|
|
702
702
|
if (r !== void 0) return r;
|
|
703
703
|
if (t.deps !== null)
|
|
704
704
|
for (const i of t.deps) {
|
|
705
705
|
if (Ye.call(e, i))
|
|
706
706
|
return !0;
|
|
707
|
-
if ((i.f &
|
|
707
|
+
if ((i.f & z) !== 0 && gr(
|
|
708
708
|
/** @type {Derived} */
|
|
709
709
|
i,
|
|
710
710
|
e,
|
|
@@ -718,47 +718,47 @@ function vr(t, e, n) {
|
|
|
718
718
|
}
|
|
719
719
|
return n.set(t, !1), !1;
|
|
720
720
|
}
|
|
721
|
-
function
|
|
722
|
-
var e =
|
|
723
|
-
if (n?.is_pending && (t.f & (
|
|
721
|
+
function ce(t) {
|
|
722
|
+
var e = fn = t, n = e.b;
|
|
723
|
+
if (n?.is_pending && (t.f & (pt | Dt | ur)) !== 0 && (t.f & Je) === 0) {
|
|
724
724
|
n.defer_effect(t);
|
|
725
725
|
return;
|
|
726
726
|
}
|
|
727
727
|
for (; e.parent !== null; ) {
|
|
728
728
|
e = e.parent;
|
|
729
729
|
var r = e.f;
|
|
730
|
-
if (
|
|
730
|
+
if (nn && e === y && (r & we) !== 0 && (r & cr) === 0 && (r & Je) !== 0)
|
|
731
731
|
return;
|
|
732
|
-
if ((r & (Fe |
|
|
733
|
-
if ((r &
|
|
732
|
+
if ((r & (Fe | Pe)) !== 0) {
|
|
733
|
+
if ((r & D) === 0)
|
|
734
734
|
return;
|
|
735
|
-
e.f ^=
|
|
735
|
+
e.f ^= D;
|
|
736
736
|
}
|
|
737
737
|
}
|
|
738
|
-
|
|
738
|
+
G.push(e);
|
|
739
739
|
}
|
|
740
|
-
function
|
|
741
|
-
if (!((t.f &
|
|
742
|
-
(t.f &
|
|
740
|
+
function wr(t, e) {
|
|
741
|
+
if (!((t.f & Pe) !== 0 && (t.f & D) !== 0)) {
|
|
742
|
+
(t.f & F) !== 0 ? e.d.push(t) : (t.f & se) !== 0 && e.m.push(t), S(t, D);
|
|
743
743
|
for (var n = t.first; n !== null; )
|
|
744
|
-
|
|
744
|
+
wr(n, e), n = n.next;
|
|
745
745
|
}
|
|
746
746
|
}
|
|
747
|
-
function
|
|
748
|
-
let e = 0, n =
|
|
747
|
+
function hs(t) {
|
|
748
|
+
let e = 0, n = zt(0), r;
|
|
749
749
|
return () => {
|
|
750
|
-
|
|
750
|
+
dn() && (E(n), Ir(() => (e === 0 && (r = Q(() => t(() => lt(n)))), e += 1, () => {
|
|
751
751
|
Re(() => {
|
|
752
|
-
e -= 1, e === 0 && (r?.(), r = void 0,
|
|
752
|
+
e -= 1, e === 0 && (r?.(), r = void 0, lt(n));
|
|
753
753
|
});
|
|
754
754
|
})));
|
|
755
755
|
};
|
|
756
756
|
}
|
|
757
|
-
var
|
|
758
|
-
function
|
|
759
|
-
new
|
|
757
|
+
var ps = Nt | et;
|
|
758
|
+
function ds(t, e, n, r) {
|
|
759
|
+
new ms(t, e, n, r);
|
|
760
760
|
}
|
|
761
|
-
class
|
|
761
|
+
class ms {
|
|
762
762
|
/** @type {Boundary | null} */
|
|
763
763
|
parent;
|
|
764
764
|
is_pending = !1;
|
|
@@ -801,7 +801,7 @@ class hs {
|
|
|
801
801
|
* @type {Source<number> | null}
|
|
802
802
|
*/
|
|
803
803
|
#f = null;
|
|
804
|
-
#k =
|
|
804
|
+
#k = hs(() => (this.#f = zt(this.#u), () => {
|
|
805
805
|
this.#f = null;
|
|
806
806
|
}));
|
|
807
807
|
/**
|
|
@@ -814,13 +814,13 @@ class hs {
|
|
|
814
814
|
this.#r = e, this.#i = n, this.#o = (s) => {
|
|
815
815
|
var a = (
|
|
816
816
|
/** @type {Effect} */
|
|
817
|
-
|
|
817
|
+
y
|
|
818
818
|
);
|
|
819
|
-
a.b = this, a.f |=
|
|
819
|
+
a.b = this, a.f |= en, r(s);
|
|
820
820
|
}, this.parent = /** @type {Effect} */
|
|
821
|
-
|
|
821
|
+
y.b, this.transform_error = i ?? this.parent?.transform_error ?? ((s) => s), this.#n = Ds(() => {
|
|
822
822
|
this.#g();
|
|
823
|
-
},
|
|
823
|
+
}, ps);
|
|
824
824
|
}
|
|
825
825
|
#y() {
|
|
826
826
|
try {
|
|
@@ -846,8 +846,8 @@ class hs {
|
|
|
846
846
|
#_() {
|
|
847
847
|
const e = this.#i.pending;
|
|
848
848
|
e && (this.is_pending = !0, this.#e = Ae(() => e(this.#r)), Re(() => {
|
|
849
|
-
var n = this.#a = document.createDocumentFragment(), r =
|
|
850
|
-
n.append(r), this.#s = this.#v(() => (
|
|
849
|
+
var n = this.#a = document.createDocumentFragment(), r = Sr();
|
|
850
|
+
n.append(r), this.#s = this.#v(() => (xe.ensure(), Ae(() => this.#o(r)))), this.#l === 0 && (this.#r.before(n), this.#a = null, It(
|
|
851
851
|
/** @type {Effect} */
|
|
852
852
|
this.#e,
|
|
853
853
|
() => {
|
|
@@ -862,7 +862,7 @@ class hs {
|
|
|
862
862
|
this.#o(this.#r);
|
|
863
863
|
}), this.#l > 0) {
|
|
864
864
|
var e = this.#a = document.createDocumentFragment();
|
|
865
|
-
|
|
865
|
+
Ls(this.#s, e);
|
|
866
866
|
const n = (
|
|
867
867
|
/** @type {(anchor: Node) => void} */
|
|
868
868
|
this.#i.pending
|
|
@@ -877,9 +877,9 @@ class hs {
|
|
|
877
877
|
#m() {
|
|
878
878
|
this.is_pending = !1;
|
|
879
879
|
for (const e of this.#h)
|
|
880
|
-
S(e,
|
|
880
|
+
S(e, F), ce(e);
|
|
881
881
|
for (const e of this.#d)
|
|
882
|
-
S(e,
|
|
882
|
+
S(e, se), ce(e);
|
|
883
883
|
this.#h.clear(), this.#d.clear();
|
|
884
884
|
}
|
|
885
885
|
/**
|
|
@@ -887,7 +887,7 @@ class hs {
|
|
|
887
887
|
* @param {Effect} effect
|
|
888
888
|
*/
|
|
889
889
|
defer_effect(e) {
|
|
890
|
-
|
|
890
|
+
mr(e, this.#h, this.#d);
|
|
891
891
|
}
|
|
892
892
|
/**
|
|
893
893
|
* Returns `false` if the effect exists inside a boundary whose pending snippet is shown
|
|
@@ -904,14 +904,14 @@ class hs {
|
|
|
904
904
|
* @param {() => T} fn
|
|
905
905
|
*/
|
|
906
906
|
#v(e) {
|
|
907
|
-
var n =
|
|
908
|
-
|
|
907
|
+
var n = y, r = k, i = ae;
|
|
908
|
+
he(this.#n), ne(this.#n), Xe(this.#n.ctx);
|
|
909
909
|
try {
|
|
910
910
|
return e();
|
|
911
911
|
} catch (s) {
|
|
912
|
-
return
|
|
912
|
+
return pr(s), null;
|
|
913
913
|
} finally {
|
|
914
|
-
|
|
914
|
+
he(n), ne(r), Xe(i);
|
|
915
915
|
}
|
|
916
916
|
}
|
|
917
917
|
/**
|
|
@@ -924,7 +924,7 @@ class hs {
|
|
|
924
924
|
this.parent && this.parent.#w(e);
|
|
925
925
|
return;
|
|
926
926
|
}
|
|
927
|
-
this.#l += e, this.#l === 0 && (this.#m(), this.#e &&
|
|
927
|
+
this.#l += e, this.#l === 0 && (this.#m(), this.#e && It(this.#e, () => {
|
|
928
928
|
this.#e = null;
|
|
929
929
|
}), this.#a && (this.#r.before(this.#a), this.#a = null));
|
|
930
930
|
}
|
|
@@ -936,7 +936,7 @@ class hs {
|
|
|
936
936
|
*/
|
|
937
937
|
update_pending_count(e) {
|
|
938
938
|
this.#w(e), this.#u += e, !(!this.#f || this.#c) && (this.#c = !0, Re(() => {
|
|
939
|
-
this.#c = !1, this.#f &&
|
|
939
|
+
this.#c = !1, this.#f && Ct(this.#f, this.#u);
|
|
940
940
|
}));
|
|
941
941
|
}
|
|
942
942
|
get_effect_pending() {
|
|
@@ -951,40 +951,40 @@ class hs {
|
|
|
951
951
|
let r = this.#i.failed;
|
|
952
952
|
if (!n && !r)
|
|
953
953
|
throw e;
|
|
954
|
-
this.#s && (
|
|
954
|
+
this.#s && (fe(this.#s), this.#s = null), this.#e && (fe(this.#e), this.#e = null), this.#t && (fe(this.#t), this.#t = null);
|
|
955
955
|
var i = !1, s = !1;
|
|
956
956
|
const a = () => {
|
|
957
957
|
if (i) {
|
|
958
|
-
|
|
958
|
+
as();
|
|
959
959
|
return;
|
|
960
960
|
}
|
|
961
|
-
i = !0, s &&
|
|
961
|
+
i = !0, s && is(), this.#t !== null && It(this.#t, () => {
|
|
962
962
|
this.#t = null;
|
|
963
963
|
}), this.#v(() => {
|
|
964
|
-
|
|
964
|
+
xe.ensure(), this.#g();
|
|
965
965
|
});
|
|
966
966
|
}, u = (o) => {
|
|
967
967
|
try {
|
|
968
968
|
s = !0, n?.(o, a), s = !1;
|
|
969
969
|
} catch (l) {
|
|
970
|
-
|
|
970
|
+
be(l, this.#n && this.#n.parent);
|
|
971
971
|
}
|
|
972
972
|
r && (this.#t = this.#v(() => {
|
|
973
|
-
|
|
973
|
+
xe.ensure();
|
|
974
974
|
try {
|
|
975
975
|
return Ae(() => {
|
|
976
976
|
var l = (
|
|
977
977
|
/** @type {Effect} */
|
|
978
|
-
|
|
978
|
+
y
|
|
979
979
|
);
|
|
980
|
-
l.b = this, l.f |=
|
|
980
|
+
l.b = this, l.f |= en, r(
|
|
981
981
|
this.#r,
|
|
982
982
|
() => o,
|
|
983
983
|
() => a
|
|
984
984
|
);
|
|
985
985
|
});
|
|
986
986
|
} catch (l) {
|
|
987
|
-
return
|
|
987
|
+
return be(
|
|
988
988
|
l,
|
|
989
989
|
/** @type {Effect} */
|
|
990
990
|
this.#n.parent
|
|
@@ -997,20 +997,20 @@ class hs {
|
|
|
997
997
|
try {
|
|
998
998
|
o = this.transform_error(e);
|
|
999
999
|
} catch (l) {
|
|
1000
|
-
|
|
1000
|
+
be(l, this.#n && this.#n.parent);
|
|
1001
1001
|
return;
|
|
1002
1002
|
}
|
|
1003
1003
|
o !== null && typeof o == "object" && typeof /** @type {any} */
|
|
1004
1004
|
o.then == "function" ? o.then(
|
|
1005
1005
|
u,
|
|
1006
1006
|
/** @param {unknown} e */
|
|
1007
|
-
(l) =>
|
|
1007
|
+
(l) => be(l, this.#n && this.#n.parent)
|
|
1008
1008
|
) : u(o);
|
|
1009
1009
|
});
|
|
1010
1010
|
}
|
|
1011
1011
|
}
|
|
1012
|
-
function
|
|
1013
|
-
const i =
|
|
1012
|
+
function vs(t, e, n, r) {
|
|
1013
|
+
const i = ks;
|
|
1014
1014
|
var s = t.filter((f) => !f.settled);
|
|
1015
1015
|
if (n.length === 0 && s.length === 0) {
|
|
1016
1016
|
r(e.map(i));
|
|
@@ -1018,40 +1018,40 @@ function ps(t, e, n, r) {
|
|
|
1018
1018
|
}
|
|
1019
1019
|
var a = (
|
|
1020
1020
|
/** @type {Effect} */
|
|
1021
|
-
|
|
1022
|
-
), u =
|
|
1021
|
+
y
|
|
1022
|
+
), u = gs(), o = s.length === 1 ? s[0].promise : s.length > 1 ? Promise.all(s.map((f) => f.promise)) : null;
|
|
1023
1023
|
function l(f) {
|
|
1024
1024
|
u();
|
|
1025
1025
|
try {
|
|
1026
1026
|
r(f);
|
|
1027
|
-
} catch (
|
|
1028
|
-
(a.f &
|
|
1027
|
+
} catch (p) {
|
|
1028
|
+
(a.f & Me) === 0 && be(p, a);
|
|
1029
1029
|
}
|
|
1030
|
-
|
|
1030
|
+
rn();
|
|
1031
1031
|
}
|
|
1032
1032
|
if (n.length === 0) {
|
|
1033
1033
|
o.then(() => l(e.map(i)));
|
|
1034
1034
|
return;
|
|
1035
1035
|
}
|
|
1036
1036
|
function c() {
|
|
1037
|
-
u(), Promise.all(n.map((f) => /* @__PURE__ */
|
|
1037
|
+
u(), Promise.all(n.map((f) => /* @__PURE__ */ ys(f))).then((f) => l([...e.map(i), ...f])).catch((f) => be(f, a));
|
|
1038
1038
|
}
|
|
1039
1039
|
o ? o.then(c) : c();
|
|
1040
1040
|
}
|
|
1041
|
-
function
|
|
1042
|
-
var t =
|
|
1041
|
+
function gs() {
|
|
1042
|
+
var t = y, e = k, n = ae, r = x;
|
|
1043
1043
|
return function(s = !0) {
|
|
1044
|
-
|
|
1044
|
+
he(t), ne(e), Xe(n), s && r?.activate();
|
|
1045
1045
|
};
|
|
1046
1046
|
}
|
|
1047
|
-
function
|
|
1048
|
-
|
|
1047
|
+
function rn(t = !0) {
|
|
1048
|
+
he(null), ne(null), Xe(null), t && x?.deactivate();
|
|
1049
1049
|
}
|
|
1050
|
-
function
|
|
1050
|
+
function ws() {
|
|
1051
1051
|
var t = (
|
|
1052
1052
|
/** @type {Boundary} */
|
|
1053
1053
|
/** @type {Effect} */
|
|
1054
|
-
|
|
1054
|
+
y.b
|
|
1055
1055
|
), e = (
|
|
1056
1056
|
/** @type {Batch} */
|
|
1057
1057
|
x
|
|
@@ -1061,71 +1061,71 @@ function ms() {
|
|
|
1061
1061
|
};
|
|
1062
1062
|
}
|
|
1063
1063
|
// @__NO_SIDE_EFFECTS__
|
|
1064
|
-
function
|
|
1065
|
-
var e =
|
|
1064
|
+
function ks(t) {
|
|
1065
|
+
var e = z | F, n = k !== null && (k.f & z) !== 0 ? (
|
|
1066
1066
|
/** @type {Derived} */
|
|
1067
1067
|
k
|
|
1068
1068
|
) : null;
|
|
1069
|
-
return
|
|
1070
|
-
ctx:
|
|
1069
|
+
return y !== null && (y.f |= et), {
|
|
1070
|
+
ctx: ae,
|
|
1071
1071
|
deps: null,
|
|
1072
1072
|
effects: null,
|
|
1073
|
-
equals:
|
|
1073
|
+
equals: fr,
|
|
1074
1074
|
f: e,
|
|
1075
1075
|
fn: t,
|
|
1076
1076
|
reactions: null,
|
|
1077
1077
|
rv: 0,
|
|
1078
1078
|
v: (
|
|
1079
1079
|
/** @type {V} */
|
|
1080
|
-
|
|
1080
|
+
R
|
|
1081
1081
|
),
|
|
1082
1082
|
wv: 0,
|
|
1083
|
-
parent: n ??
|
|
1083
|
+
parent: n ?? y,
|
|
1084
1084
|
ac: null
|
|
1085
1085
|
};
|
|
1086
1086
|
}
|
|
1087
1087
|
// @__NO_SIDE_EFFECTS__
|
|
1088
|
-
function
|
|
1088
|
+
function ys(t, e, n) {
|
|
1089
1089
|
/** @type {Effect | null} */
|
|
1090
|
-
|
|
1090
|
+
y === null && Qi();
|
|
1091
1091
|
var i = (
|
|
1092
1092
|
/** @type {Promise<V>} */
|
|
1093
1093
|
/** @type {unknown} */
|
|
1094
1094
|
void 0
|
|
1095
|
-
), s =
|
|
1095
|
+
), s = zt(
|
|
1096
1096
|
/** @type {V} */
|
|
1097
|
-
|
|
1097
|
+
R
|
|
1098
1098
|
), a = !k, u = /* @__PURE__ */ new Map();
|
|
1099
|
-
return
|
|
1100
|
-
var o =
|
|
1099
|
+
return Rs(() => {
|
|
1100
|
+
var o = lr();
|
|
1101
1101
|
i = o.promise;
|
|
1102
1102
|
try {
|
|
1103
|
-
Promise.resolve(t()).then(o.resolve, o.reject).finally(
|
|
1104
|
-
} catch (
|
|
1105
|
-
o.reject(
|
|
1103
|
+
Promise.resolve(t()).then(o.resolve, o.reject).finally(rn);
|
|
1104
|
+
} catch (p) {
|
|
1105
|
+
o.reject(p), rn();
|
|
1106
1106
|
}
|
|
1107
1107
|
var l = (
|
|
1108
1108
|
/** @type {Batch} */
|
|
1109
1109
|
x
|
|
1110
1110
|
);
|
|
1111
1111
|
if (a) {
|
|
1112
|
-
var c =
|
|
1112
|
+
var c = ws();
|
|
1113
1113
|
u.get(l)?.reject(Ne), u.delete(l), u.set(l, o);
|
|
1114
1114
|
}
|
|
1115
|
-
const f = (
|
|
1115
|
+
const f = (p, m = void 0) => {
|
|
1116
1116
|
if (l.activate(), m)
|
|
1117
|
-
m !== Ne && (s.f |=
|
|
1117
|
+
m !== Ne && (s.f |= Ee, Ct(s, m));
|
|
1118
1118
|
else {
|
|
1119
|
-
(s.f &
|
|
1120
|
-
for (const [
|
|
1121
|
-
if (u.delete(
|
|
1119
|
+
(s.f & Ee) !== 0 && (s.f ^= Ee), Ct(s, p);
|
|
1120
|
+
for (const [h, v] of u) {
|
|
1121
|
+
if (u.delete(h), h === l) break;
|
|
1122
1122
|
v.reject(Ne);
|
|
1123
1123
|
}
|
|
1124
1124
|
}
|
|
1125
1125
|
c && c();
|
|
1126
1126
|
};
|
|
1127
|
-
o.promise.then(f, (
|
|
1128
|
-
}),
|
|
1127
|
+
o.promise.then(f, (p) => f(null, p || "unknown"));
|
|
1128
|
+
}), Is(() => {
|
|
1129
1129
|
for (const o of u.values())
|
|
1130
1130
|
o.reject(Ne);
|
|
1131
1131
|
}), new Promise((o) => {
|
|
@@ -1138,21 +1138,21 @@ function gs(t, e, n) {
|
|
|
1138
1138
|
l(i);
|
|
1139
1139
|
});
|
|
1140
1140
|
}
|
|
1141
|
-
function
|
|
1141
|
+
function bs(t) {
|
|
1142
1142
|
var e = t.effects;
|
|
1143
1143
|
if (e !== null) {
|
|
1144
1144
|
t.effects = null;
|
|
1145
1145
|
for (var n = 0; n < e.length; n += 1)
|
|
1146
|
-
|
|
1146
|
+
fe(
|
|
1147
1147
|
/** @type {Effect} */
|
|
1148
1148
|
e[n]
|
|
1149
1149
|
);
|
|
1150
1150
|
}
|
|
1151
1151
|
}
|
|
1152
|
-
function
|
|
1152
|
+
function _s(t) {
|
|
1153
1153
|
for (var e = t.parent; e !== null; ) {
|
|
1154
|
-
if ((e.f &
|
|
1155
|
-
return (e.f &
|
|
1154
|
+
if ((e.f & z) === 0)
|
|
1155
|
+
return (e.f & Me) === 0 ? (
|
|
1156
1156
|
/** @type {Effect} */
|
|
1157
1157
|
e
|
|
1158
1158
|
) : null;
|
|
@@ -1160,121 +1160,121 @@ function ks(t) {
|
|
|
1160
1160
|
}
|
|
1161
1161
|
return null;
|
|
1162
1162
|
}
|
|
1163
|
-
function
|
|
1164
|
-
var e, n =
|
|
1165
|
-
|
|
1163
|
+
function hn(t) {
|
|
1164
|
+
var e, n = y;
|
|
1165
|
+
he(_s(t));
|
|
1166
1166
|
try {
|
|
1167
|
-
t.f &= ~Le,
|
|
1167
|
+
t.f &= ~Le, bs(t), e = Lr(t);
|
|
1168
1168
|
} finally {
|
|
1169
|
-
|
|
1169
|
+
he(n);
|
|
1170
1170
|
}
|
|
1171
1171
|
return e;
|
|
1172
1172
|
}
|
|
1173
|
-
function
|
|
1174
|
-
var e =
|
|
1175
|
-
if (!t.equals(e) && (t.wv =
|
|
1176
|
-
S(t,
|
|
1173
|
+
function kr(t) {
|
|
1174
|
+
var e = hn(t);
|
|
1175
|
+
if (!t.equals(e) && (t.wv = zr(), (!x?.is_fork || t.deps === null) && (t.v = e, t.deps === null))) {
|
|
1176
|
+
S(t, D);
|
|
1177
1177
|
return;
|
|
1178
1178
|
}
|
|
1179
|
-
Ke || (
|
|
1179
|
+
Ke || (re !== null ? (dn() || x?.is_fork) && re.set(t, e) : cn(t));
|
|
1180
1180
|
}
|
|
1181
|
-
function
|
|
1181
|
+
function Ms(t) {
|
|
1182
1182
|
if (t.effects !== null)
|
|
1183
1183
|
for (const e of t.effects)
|
|
1184
|
-
(e.teardown || e.ac) && (e.teardown?.(), e.ac?.abort(Ne), e.teardown =
|
|
1184
|
+
(e.teardown || e.ac) && (e.teardown?.(), e.ac?.abort(Ne), e.teardown = Xi, e.ac = null, ct(e, 0), mn(e));
|
|
1185
1185
|
}
|
|
1186
|
-
function
|
|
1186
|
+
function yr(t) {
|
|
1187
1187
|
if (t.effects !== null)
|
|
1188
1188
|
for (const e of t.effects)
|
|
1189
1189
|
e.teardown && Ge(e);
|
|
1190
1190
|
}
|
|
1191
|
-
let
|
|
1192
|
-
const
|
|
1193
|
-
let
|
|
1194
|
-
function
|
|
1191
|
+
let sn = /* @__PURE__ */ new Set();
|
|
1192
|
+
const Se = /* @__PURE__ */ new Map();
|
|
1193
|
+
let br = !1;
|
|
1194
|
+
function zt(t, e) {
|
|
1195
1195
|
var n = {
|
|
1196
1196
|
f: 0,
|
|
1197
1197
|
// TODO ideally we could skip this altogether, but it causes type errors
|
|
1198
1198
|
v: t,
|
|
1199
1199
|
reactions: null,
|
|
1200
|
-
equals:
|
|
1200
|
+
equals: fr,
|
|
1201
1201
|
rv: 0,
|
|
1202
1202
|
wv: 0
|
|
1203
1203
|
};
|
|
1204
1204
|
return n;
|
|
1205
1205
|
}
|
|
1206
1206
|
// @__NO_SIDE_EFFECTS__
|
|
1207
|
-
function
|
|
1208
|
-
const n =
|
|
1209
|
-
return
|
|
1207
|
+
function V(t, e) {
|
|
1208
|
+
const n = zt(t);
|
|
1209
|
+
return Fs(n), n;
|
|
1210
1210
|
}
|
|
1211
|
-
function
|
|
1211
|
+
function U(t, e, n = !1) {
|
|
1212
1212
|
k !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
|
|
1213
1213
|
// to ensure we error if state is set inside an inspect effect
|
|
1214
|
-
(!
|
|
1215
|
-
let r = n ?
|
|
1216
|
-
return
|
|
1214
|
+
(!ie || (k.f & Vn) !== 0) && hr() && (k.f & (z | we | on | Vn)) !== 0 && (te === null || !Ye.call(te, t)) && rs();
|
|
1215
|
+
let r = n ? rt(e) : e;
|
|
1216
|
+
return Ct(t, r);
|
|
1217
1217
|
}
|
|
1218
|
-
function
|
|
1218
|
+
function Ct(t, e) {
|
|
1219
1219
|
if (!t.equals(e)) {
|
|
1220
1220
|
var n = t.v;
|
|
1221
|
-
Ke ?
|
|
1222
|
-
var r =
|
|
1223
|
-
if (r.capture(t, n), (t.f &
|
|
1221
|
+
Ke ? Se.set(t, e) : Se.set(t, n), t.v = e;
|
|
1222
|
+
var r = xe.ensure();
|
|
1223
|
+
if (r.capture(t, n), (t.f & z) !== 0) {
|
|
1224
1224
|
const i = (
|
|
1225
1225
|
/** @type {Derived} */
|
|
1226
1226
|
t
|
|
1227
1227
|
);
|
|
1228
|
-
(t.f &
|
|
1228
|
+
(t.f & F) !== 0 && hn(i), cn(i);
|
|
1229
1229
|
}
|
|
1230
|
-
t.wv =
|
|
1230
|
+
t.wv = zr(), _r(t, F), y !== null && (y.f & D) !== 0 && (y.f & (Pe | Fe)) === 0 && (K === null ? $s([t]) : K.push(t)), !r.is_fork && sn.size > 0 && !br && Es();
|
|
1231
1231
|
}
|
|
1232
1232
|
return e;
|
|
1233
1233
|
}
|
|
1234
|
-
function
|
|
1235
|
-
|
|
1236
|
-
for (const t of
|
|
1237
|
-
(t.f &
|
|
1238
|
-
|
|
1234
|
+
function Es() {
|
|
1235
|
+
br = !1;
|
|
1236
|
+
for (const t of sn)
|
|
1237
|
+
(t.f & D) !== 0 && S(t, se), dt(t) && Ge(t);
|
|
1238
|
+
sn.clear();
|
|
1239
1239
|
}
|
|
1240
|
-
function
|
|
1241
|
-
|
|
1240
|
+
function lt(t) {
|
|
1241
|
+
U(t, t.v + 1);
|
|
1242
1242
|
}
|
|
1243
|
-
function
|
|
1243
|
+
function _r(t, e) {
|
|
1244
1244
|
var n = t.reactions;
|
|
1245
1245
|
if (n !== null)
|
|
1246
1246
|
for (var r = n.length, i = 0; i < r; i++) {
|
|
1247
|
-
var s = n[i], a = s.f, u = (a &
|
|
1248
|
-
if (u && S(s, e), (a &
|
|
1247
|
+
var s = n[i], a = s.f, u = (a & F) === 0;
|
|
1248
|
+
if (u && S(s, e), (a & z) !== 0) {
|
|
1249
1249
|
var o = (
|
|
1250
1250
|
/** @type {Derived} */
|
|
1251
1251
|
s
|
|
1252
1252
|
);
|
|
1253
|
-
|
|
1253
|
+
re?.delete(o), (a & Le) === 0 && (a & ee && (s.f |= Le), _r(o, se));
|
|
1254
1254
|
} else u && ((a & we) !== 0 && ve !== null && ve.add(
|
|
1255
1255
|
/** @type {Effect} */
|
|
1256
1256
|
s
|
|
1257
|
-
),
|
|
1257
|
+
), ce(
|
|
1258
1258
|
/** @type {Effect} */
|
|
1259
1259
|
s
|
|
1260
1260
|
));
|
|
1261
1261
|
}
|
|
1262
1262
|
}
|
|
1263
|
-
function
|
|
1264
|
-
if (typeof t != "object" || t === null ||
|
|
1263
|
+
function rt(t) {
|
|
1264
|
+
if (typeof t != "object" || t === null || Tt in t)
|
|
1265
1265
|
return t;
|
|
1266
|
-
const e =
|
|
1267
|
-
if (e !==
|
|
1266
|
+
const e = Ji(t);
|
|
1267
|
+
if (e !== Zi && e !== Yi)
|
|
1268
1268
|
return t;
|
|
1269
|
-
var n = /* @__PURE__ */ new Map(), r =
|
|
1269
|
+
var n = /* @__PURE__ */ new Map(), r = Wi(t), i = /* @__PURE__ */ V(0), s = De, a = (u) => {
|
|
1270
1270
|
if (De === s)
|
|
1271
1271
|
return u();
|
|
1272
1272
|
var o = k, l = De;
|
|
1273
|
-
|
|
1273
|
+
ne(null), Hn(s);
|
|
1274
1274
|
var c = u();
|
|
1275
|
-
return
|
|
1275
|
+
return ne(o), Hn(l), c;
|
|
1276
1276
|
};
|
|
1277
|
-
return r && n.set("length", /* @__PURE__ */
|
|
1277
|
+
return r && n.set("length", /* @__PURE__ */ V(
|
|
1278
1278
|
/** @type {any[]} */
|
|
1279
1279
|
t.length
|
|
1280
1280
|
)), new Proxy(
|
|
@@ -1282,34 +1282,34 @@ function nt(t) {
|
|
|
1282
1282
|
t,
|
|
1283
1283
|
{
|
|
1284
1284
|
defineProperty(u, o, l) {
|
|
1285
|
-
(!("value" in l) || l.configurable === !1 || l.enumerable === !1 || l.writable === !1) &&
|
|
1285
|
+
(!("value" in l) || l.configurable === !1 || l.enumerable === !1 || l.writable === !1) && ts();
|
|
1286
1286
|
var c = n.get(o);
|
|
1287
1287
|
return c === void 0 ? a(() => {
|
|
1288
|
-
var f = /* @__PURE__ */
|
|
1288
|
+
var f = /* @__PURE__ */ V(l.value);
|
|
1289
1289
|
return n.set(o, f), f;
|
|
1290
|
-
}) :
|
|
1290
|
+
}) : U(c, l.value, !0), !0;
|
|
1291
1291
|
},
|
|
1292
1292
|
deleteProperty(u, o) {
|
|
1293
1293
|
var l = n.get(o);
|
|
1294
1294
|
if (l === void 0) {
|
|
1295
1295
|
if (o in u) {
|
|
1296
|
-
const c = a(() => /* @__PURE__ */
|
|
1297
|
-
n.set(o, c),
|
|
1296
|
+
const c = a(() => /* @__PURE__ */ V(R));
|
|
1297
|
+
n.set(o, c), lt(i);
|
|
1298
1298
|
}
|
|
1299
1299
|
} else
|
|
1300
|
-
|
|
1300
|
+
U(l, R), lt(i);
|
|
1301
1301
|
return !0;
|
|
1302
1302
|
},
|
|
1303
1303
|
get(u, o, l) {
|
|
1304
|
-
if (o ===
|
|
1304
|
+
if (o === Tt)
|
|
1305
1305
|
return t;
|
|
1306
1306
|
var c = n.get(o), f = o in u;
|
|
1307
|
-
if (c === void 0 && (!f ||
|
|
1308
|
-
var m =
|
|
1309
|
-
return
|
|
1307
|
+
if (c === void 0 && (!f || ot(u, o)?.writable) && (c = a(() => {
|
|
1308
|
+
var m = rt(f ? u[o] : R), h = /* @__PURE__ */ V(m);
|
|
1309
|
+
return h;
|
|
1310
1310
|
}), n.set(o, c)), c !== void 0) {
|
|
1311
|
-
var
|
|
1312
|
-
return
|
|
1311
|
+
var p = E(c);
|
|
1312
|
+
return p === R ? void 0 : p;
|
|
1313
1313
|
}
|
|
1314
1314
|
return Reflect.get(u, o, l);
|
|
1315
1315
|
},
|
|
@@ -1319,138 +1319,138 @@ function nt(t) {
|
|
|
1319
1319
|
var c = n.get(o);
|
|
1320
1320
|
c && (l.value = E(c));
|
|
1321
1321
|
} else if (l === void 0) {
|
|
1322
|
-
var f = n.get(o),
|
|
1323
|
-
if (f !== void 0 &&
|
|
1322
|
+
var f = n.get(o), p = f?.v;
|
|
1323
|
+
if (f !== void 0 && p !== R)
|
|
1324
1324
|
return {
|
|
1325
1325
|
enumerable: !0,
|
|
1326
1326
|
configurable: !0,
|
|
1327
|
-
value:
|
|
1327
|
+
value: p,
|
|
1328
1328
|
writable: !0
|
|
1329
1329
|
};
|
|
1330
1330
|
}
|
|
1331
1331
|
return l;
|
|
1332
1332
|
},
|
|
1333
1333
|
has(u, o) {
|
|
1334
|
-
if (o ===
|
|
1334
|
+
if (o === Tt)
|
|
1335
1335
|
return !0;
|
|
1336
|
-
var l = n.get(o), c = l !== void 0 && l.v !==
|
|
1337
|
-
if (l !== void 0 ||
|
|
1336
|
+
var l = n.get(o), c = l !== void 0 && l.v !== R || Reflect.has(u, o);
|
|
1337
|
+
if (l !== void 0 || y !== null && (!c || ot(u, o)?.writable)) {
|
|
1338
1338
|
l === void 0 && (l = a(() => {
|
|
1339
|
-
var
|
|
1339
|
+
var p = c ? rt(u[o]) : R, m = /* @__PURE__ */ V(p);
|
|
1340
1340
|
return m;
|
|
1341
1341
|
}), n.set(o, l));
|
|
1342
1342
|
var f = E(l);
|
|
1343
|
-
if (f ===
|
|
1343
|
+
if (f === R)
|
|
1344
1344
|
return !1;
|
|
1345
1345
|
}
|
|
1346
1346
|
return c;
|
|
1347
1347
|
},
|
|
1348
1348
|
set(u, o, l, c) {
|
|
1349
|
-
var f = n.get(o),
|
|
1349
|
+
var f = n.get(o), p = o in u;
|
|
1350
1350
|
if (r && o === "length")
|
|
1351
1351
|
for (var m = l; m < /** @type {Source<number>} */
|
|
1352
1352
|
f.v; m += 1) {
|
|
1353
|
-
var
|
|
1354
|
-
|
|
1353
|
+
var h = n.get(m + "");
|
|
1354
|
+
h !== void 0 ? U(h, R) : m in u && (h = a(() => /* @__PURE__ */ V(R)), n.set(m + "", h));
|
|
1355
1355
|
}
|
|
1356
1356
|
if (f === void 0)
|
|
1357
|
-
(!
|
|
1357
|
+
(!p || ot(u, o)?.writable) && (f = a(() => /* @__PURE__ */ V(void 0)), U(f, rt(l)), n.set(o, f));
|
|
1358
1358
|
else {
|
|
1359
|
-
|
|
1360
|
-
var v = a(() =>
|
|
1361
|
-
|
|
1359
|
+
p = f.v !== R;
|
|
1360
|
+
var v = a(() => rt(l));
|
|
1361
|
+
U(f, v);
|
|
1362
1362
|
}
|
|
1363
|
-
var
|
|
1364
|
-
if (
|
|
1363
|
+
var b = Reflect.getOwnPropertyDescriptor(u, o);
|
|
1364
|
+
if (b?.set && b.set.call(c, l), !p) {
|
|
1365
1365
|
if (r && typeof o == "string") {
|
|
1366
|
-
var
|
|
1366
|
+
var C = (
|
|
1367
1367
|
/** @type {Source<number>} */
|
|
1368
1368
|
n.get("length")
|
|
1369
|
-
),
|
|
1370
|
-
Number.isInteger(
|
|
1369
|
+
), J = Number(o);
|
|
1370
|
+
Number.isInteger(J) && J >= C.v && U(C, J + 1);
|
|
1371
1371
|
}
|
|
1372
|
-
|
|
1372
|
+
lt(i);
|
|
1373
1373
|
}
|
|
1374
1374
|
return !0;
|
|
1375
1375
|
},
|
|
1376
1376
|
ownKeys(u) {
|
|
1377
1377
|
E(i);
|
|
1378
1378
|
var o = Reflect.ownKeys(u).filter((f) => {
|
|
1379
|
-
var
|
|
1380
|
-
return
|
|
1379
|
+
var p = n.get(f);
|
|
1380
|
+
return p === void 0 || p.v !== R;
|
|
1381
1381
|
});
|
|
1382
1382
|
for (var [l, c] of n)
|
|
1383
|
-
c.v !==
|
|
1383
|
+
c.v !== R && !(l in u) && o.push(l);
|
|
1384
1384
|
return o;
|
|
1385
1385
|
},
|
|
1386
1386
|
setPrototypeOf() {
|
|
1387
|
-
|
|
1387
|
+
ns();
|
|
1388
1388
|
}
|
|
1389
1389
|
}
|
|
1390
1390
|
);
|
|
1391
1391
|
}
|
|
1392
|
-
var
|
|
1393
|
-
function
|
|
1394
|
-
if (
|
|
1395
|
-
|
|
1392
|
+
var Un, Mr, Er, xr;
|
|
1393
|
+
function xs() {
|
|
1394
|
+
if (Un === void 0) {
|
|
1395
|
+
Un = window, Mr = /Firefox/.test(navigator.userAgent);
|
|
1396
1396
|
var t = Element.prototype, e = Node.prototype, n = Text.prototype;
|
|
1397
|
-
|
|
1397
|
+
Er = ot(e, "firstChild").get, xr = ot(e, "nextSibling").get, $n(t) && (t.__click = void 0, t.__className = void 0, t.__attributes = null, t.__style = void 0, t.__e = void 0), $n(n) && (n.__t = void 0);
|
|
1398
1398
|
}
|
|
1399
1399
|
}
|
|
1400
|
-
function
|
|
1400
|
+
function Sr(t = "") {
|
|
1401
1401
|
return document.createTextNode(t);
|
|
1402
1402
|
}
|
|
1403
1403
|
// @__NO_SIDE_EFFECTS__
|
|
1404
|
-
function
|
|
1404
|
+
function Pr(t) {
|
|
1405
1405
|
return (
|
|
1406
1406
|
/** @type {TemplateNode | null} */
|
|
1407
|
-
|
|
1407
|
+
Er.call(t)
|
|
1408
1408
|
);
|
|
1409
1409
|
}
|
|
1410
1410
|
// @__NO_SIDE_EFFECTS__
|
|
1411
|
-
function
|
|
1411
|
+
function pn(t) {
|
|
1412
1412
|
return (
|
|
1413
1413
|
/** @type {TemplateNode | null} */
|
|
1414
|
-
|
|
1414
|
+
xr.call(t)
|
|
1415
1415
|
);
|
|
1416
1416
|
}
|
|
1417
|
-
function
|
|
1418
|
-
return /* @__PURE__ */
|
|
1417
|
+
function Wn(t, e) {
|
|
1418
|
+
return /* @__PURE__ */ Pr(t);
|
|
1419
1419
|
}
|
|
1420
|
-
function
|
|
1420
|
+
function Ss(t, e = 1, n = !1) {
|
|
1421
1421
|
let r = t;
|
|
1422
1422
|
for (; e--; )
|
|
1423
1423
|
r = /** @type {TemplateNode} */
|
|
1424
|
-
/* @__PURE__ */
|
|
1424
|
+
/* @__PURE__ */ pn(r);
|
|
1425
1425
|
return r;
|
|
1426
1426
|
}
|
|
1427
|
-
function
|
|
1427
|
+
function Ps(t, e, n) {
|
|
1428
1428
|
return (
|
|
1429
1429
|
/** @type {T extends keyof HTMLElementTagNameMap ? HTMLElementTagNameMap[T] : Element} */
|
|
1430
|
-
document.createElementNS(
|
|
1430
|
+
document.createElementNS(ss, t, void 0)
|
|
1431
1431
|
);
|
|
1432
1432
|
}
|
|
1433
|
-
function
|
|
1434
|
-
var e = k, n =
|
|
1435
|
-
|
|
1433
|
+
function Tr(t) {
|
|
1434
|
+
var e = k, n = y;
|
|
1435
|
+
ne(null), he(null);
|
|
1436
1436
|
try {
|
|
1437
1437
|
return t();
|
|
1438
1438
|
} finally {
|
|
1439
|
-
|
|
1439
|
+
ne(e), he(n);
|
|
1440
1440
|
}
|
|
1441
1441
|
}
|
|
1442
|
-
function
|
|
1442
|
+
function Ts(t, e) {
|
|
1443
1443
|
var n = e.last;
|
|
1444
1444
|
n === null ? e.last = e.first = t : (n.next = t, t.prev = n, e.last = t);
|
|
1445
1445
|
}
|
|
1446
1446
|
function ke(t, e, n) {
|
|
1447
|
-
var r =
|
|
1448
|
-
r !== null && (r.f &
|
|
1447
|
+
var r = y;
|
|
1448
|
+
r !== null && (r.f & _e) !== 0 && (t |= _e);
|
|
1449
1449
|
var i = {
|
|
1450
|
-
ctx:
|
|
1450
|
+
ctx: ae,
|
|
1451
1451
|
deps: null,
|
|
1452
1452
|
nodes: null,
|
|
1453
|
-
f: t |
|
|
1453
|
+
f: t | F | ee,
|
|
1454
1454
|
first: null,
|
|
1455
1455
|
fn: e,
|
|
1456
1456
|
last: null,
|
|
@@ -1466,12 +1466,12 @@ function ke(t, e, n) {
|
|
|
1466
1466
|
try {
|
|
1467
1467
|
Ge(i);
|
|
1468
1468
|
} catch (u) {
|
|
1469
|
-
throw
|
|
1469
|
+
throw fe(i), u;
|
|
1470
1470
|
}
|
|
1471
|
-
else e !== null &&
|
|
1471
|
+
else e !== null && ce(i);
|
|
1472
1472
|
var s = i;
|
|
1473
1473
|
if (n && s.deps === null && s.teardown === null && s.nodes === null && s.first === s.last && // either `null`, or a singular child
|
|
1474
|
-
(s.f & et) === 0 && (s = s.first, (t & we) !== 0 && (t &
|
|
1474
|
+
(s.f & et) === 0 && (s = s.first, (t & we) !== 0 && (t & Nt) !== 0 && s !== null && (s.f |= Nt)), s !== null && (s.parent = r, r !== null && Ts(s, r), k !== null && (k.f & z) !== 0 && (t & Fe) === 0)) {
|
|
1475
1475
|
var a = (
|
|
1476
1476
|
/** @type {Derived} */
|
|
1477
1477
|
k
|
|
@@ -1480,105 +1480,105 @@ function ke(t, e, n) {
|
|
|
1480
1480
|
}
|
|
1481
1481
|
return i;
|
|
1482
1482
|
}
|
|
1483
|
-
function
|
|
1484
|
-
return k !== null && !
|
|
1483
|
+
function dn() {
|
|
1484
|
+
return k !== null && !ie;
|
|
1485
1485
|
}
|
|
1486
|
-
function
|
|
1487
|
-
const e = ke(
|
|
1488
|
-
return S(e,
|
|
1486
|
+
function Is(t) {
|
|
1487
|
+
const e = ke(Dt, null, !1);
|
|
1488
|
+
return S(e, D), e.teardown = t, e;
|
|
1489
1489
|
}
|
|
1490
|
-
function
|
|
1491
|
-
return ke(
|
|
1490
|
+
function As(t) {
|
|
1491
|
+
return ke(pt | Gi, t, !1);
|
|
1492
1492
|
}
|
|
1493
|
-
function
|
|
1494
|
-
|
|
1493
|
+
function Ns(t) {
|
|
1494
|
+
xe.ensure();
|
|
1495
1495
|
const e = ke(Fe | et, t, !0);
|
|
1496
1496
|
return (n = {}) => new Promise((r) => {
|
|
1497
|
-
n.outro ?
|
|
1498
|
-
|
|
1499
|
-
}) : (
|
|
1497
|
+
n.outro ? It(e, () => {
|
|
1498
|
+
fe(e), r(void 0);
|
|
1499
|
+
}) : (fe(e), r(void 0));
|
|
1500
1500
|
});
|
|
1501
1501
|
}
|
|
1502
|
-
function
|
|
1503
|
-
return ke(
|
|
1502
|
+
function Cs(t) {
|
|
1503
|
+
return ke(pt, t, !1);
|
|
1504
1504
|
}
|
|
1505
|
-
function
|
|
1506
|
-
return ke(
|
|
1505
|
+
function Rs(t) {
|
|
1506
|
+
return ke(on | et, t, !0);
|
|
1507
1507
|
}
|
|
1508
|
-
function
|
|
1509
|
-
return ke(
|
|
1508
|
+
function Ir(t, e = 0) {
|
|
1509
|
+
return ke(Dt | e, t, !0);
|
|
1510
1510
|
}
|
|
1511
|
-
function
|
|
1512
|
-
|
|
1513
|
-
ke(
|
|
1511
|
+
function Ar(t, e = [], n = [], r = []) {
|
|
1512
|
+
vs(r, e, n, (i) => {
|
|
1513
|
+
ke(Dt, () => t(...i.map(E)), !0);
|
|
1514
1514
|
});
|
|
1515
1515
|
}
|
|
1516
|
-
function
|
|
1516
|
+
function Ds(t, e = 0) {
|
|
1517
1517
|
var n = ke(we | e, t, !0);
|
|
1518
1518
|
return n;
|
|
1519
1519
|
}
|
|
1520
1520
|
function Ae(t) {
|
|
1521
|
-
return ke(
|
|
1521
|
+
return ke(Pe | et, t, !0);
|
|
1522
1522
|
}
|
|
1523
|
-
function
|
|
1523
|
+
function Nr(t) {
|
|
1524
1524
|
var e = t.teardown;
|
|
1525
1525
|
if (e !== null) {
|
|
1526
1526
|
const n = Ke, r = k;
|
|
1527
|
-
|
|
1527
|
+
Bn(!0), ne(null);
|
|
1528
1528
|
try {
|
|
1529
1529
|
e.call(null);
|
|
1530
1530
|
} finally {
|
|
1531
|
-
|
|
1531
|
+
Bn(n), ne(r);
|
|
1532
1532
|
}
|
|
1533
1533
|
}
|
|
1534
1534
|
}
|
|
1535
|
-
function
|
|
1535
|
+
function mn(t, e = !1) {
|
|
1536
1536
|
var n = t.first;
|
|
1537
1537
|
for (t.first = t.last = null; n !== null; ) {
|
|
1538
1538
|
const i = n.ac;
|
|
1539
|
-
i !== null &&
|
|
1539
|
+
i !== null && Tr(() => {
|
|
1540
1540
|
i.abort(Ne);
|
|
1541
1541
|
});
|
|
1542
1542
|
var r = n.next;
|
|
1543
|
-
(n.f & Fe) !== 0 ? n.parent = null :
|
|
1543
|
+
(n.f & Fe) !== 0 ? n.parent = null : fe(n, e), n = r;
|
|
1544
1544
|
}
|
|
1545
1545
|
}
|
|
1546
|
-
function
|
|
1546
|
+
function zs(t) {
|
|
1547
1547
|
for (var e = t.first; e !== null; ) {
|
|
1548
1548
|
var n = e.next;
|
|
1549
|
-
(e.f &
|
|
1549
|
+
(e.f & Pe) === 0 && fe(e), e = n;
|
|
1550
1550
|
}
|
|
1551
1551
|
}
|
|
1552
|
-
function
|
|
1552
|
+
function fe(t, e = !0) {
|
|
1553
1553
|
var n = !1;
|
|
1554
|
-
(e || (t.f &
|
|
1554
|
+
(e || (t.f & cr) !== 0) && t.nodes !== null && t.nodes.end !== null && (Os(
|
|
1555
1555
|
t.nodes.start,
|
|
1556
1556
|
/** @type {TemplateNode} */
|
|
1557
1557
|
t.nodes.end
|
|
1558
|
-
), n = !0),
|
|
1558
|
+
), n = !0), mn(t, e && !n), ct(t, 0), S(t, Me);
|
|
1559
1559
|
var r = t.nodes && t.nodes.t;
|
|
1560
1560
|
if (r !== null)
|
|
1561
1561
|
for (const s of r)
|
|
1562
1562
|
s.stop();
|
|
1563
|
-
|
|
1563
|
+
Nr(t);
|
|
1564
1564
|
var i = t.parent;
|
|
1565
|
-
i !== null && i.first !== null &&
|
|
1565
|
+
i !== null && i.first !== null && Cr(t), t.next = t.prev = t.teardown = t.ctx = t.deps = t.fn = t.nodes = t.ac = null;
|
|
1566
1566
|
}
|
|
1567
|
-
function
|
|
1567
|
+
function Os(t, e) {
|
|
1568
1568
|
for (; t !== null; ) {
|
|
1569
|
-
var n = t === e ? null : /* @__PURE__ */
|
|
1569
|
+
var n = t === e ? null : /* @__PURE__ */ pn(t);
|
|
1570
1570
|
t.remove(), t = n;
|
|
1571
1571
|
}
|
|
1572
1572
|
}
|
|
1573
|
-
function
|
|
1573
|
+
function Cr(t) {
|
|
1574
1574
|
var e = t.parent, n = t.prev, r = t.next;
|
|
1575
1575
|
n !== null && (n.next = r), r !== null && (r.prev = n), e !== null && (e.first === t && (e.first = r), e.last === t && (e.last = n));
|
|
1576
1576
|
}
|
|
1577
|
-
function
|
|
1577
|
+
function It(t, e, n = !0) {
|
|
1578
1578
|
var r = [];
|
|
1579
|
-
|
|
1579
|
+
Rr(t, r, !0);
|
|
1580
1580
|
var i = () => {
|
|
1581
|
-
n &&
|
|
1581
|
+
n && fe(t), e && e();
|
|
1582
1582
|
}, s = r.length;
|
|
1583
1583
|
if (s > 0) {
|
|
1584
1584
|
var a = () => --s || i();
|
|
@@ -1587,127 +1587,127 @@ function Pt(t, e, n = !0) {
|
|
|
1587
1587
|
} else
|
|
1588
1588
|
i();
|
|
1589
1589
|
}
|
|
1590
|
-
function
|
|
1591
|
-
if ((t.f &
|
|
1592
|
-
t.f ^=
|
|
1590
|
+
function Rr(t, e, n) {
|
|
1591
|
+
if ((t.f & _e) === 0) {
|
|
1592
|
+
t.f ^= _e;
|
|
1593
1593
|
var r = t.nodes && t.nodes.t;
|
|
1594
1594
|
if (r !== null)
|
|
1595
1595
|
for (const u of r)
|
|
1596
1596
|
(u.is_global || n) && e.push(u);
|
|
1597
1597
|
for (var i = t.first; i !== null; ) {
|
|
1598
|
-
var s = i.next, a = (i.f &
|
|
1598
|
+
var s = i.next, a = (i.f & Nt) !== 0 || // If this is a branch effect without a block effect parent,
|
|
1599
1599
|
// it means the parent block effect was pruned. In that case,
|
|
1600
1600
|
// transparency information was transferred to the branch effect.
|
|
1601
|
-
(i.f &
|
|
1602
|
-
|
|
1601
|
+
(i.f & Pe) !== 0 && (t.f & we) !== 0;
|
|
1602
|
+
Rr(i, e, a ? n : !1), i = s;
|
|
1603
1603
|
}
|
|
1604
1604
|
}
|
|
1605
1605
|
}
|
|
1606
|
-
function
|
|
1606
|
+
function Ls(t, e) {
|
|
1607
1607
|
if (t.nodes)
|
|
1608
1608
|
for (var n = t.nodes.start, r = t.nodes.end; n !== null; ) {
|
|
1609
|
-
var i = n === r ? null : /* @__PURE__ */
|
|
1609
|
+
var i = n === r ? null : /* @__PURE__ */ pn(n);
|
|
1610
1610
|
e.append(n), n = i;
|
|
1611
1611
|
}
|
|
1612
1612
|
}
|
|
1613
|
-
let
|
|
1614
|
-
function
|
|
1613
|
+
let At = !1, Ke = !1;
|
|
1614
|
+
function Bn(t) {
|
|
1615
1615
|
Ke = t;
|
|
1616
1616
|
}
|
|
1617
|
-
let k = null,
|
|
1618
|
-
function
|
|
1617
|
+
let k = null, ie = !1;
|
|
1618
|
+
function ne(t) {
|
|
1619
1619
|
k = t;
|
|
1620
1620
|
}
|
|
1621
|
-
let
|
|
1622
|
-
function
|
|
1623
|
-
|
|
1621
|
+
let y = null;
|
|
1622
|
+
function he(t) {
|
|
1623
|
+
y = t;
|
|
1624
1624
|
}
|
|
1625
|
-
let
|
|
1626
|
-
function
|
|
1627
|
-
k !== null && (
|
|
1625
|
+
let te = null;
|
|
1626
|
+
function Fs(t) {
|
|
1627
|
+
k !== null && (te === null ? te = [t] : te.push(t));
|
|
1628
1628
|
}
|
|
1629
|
-
let
|
|
1630
|
-
function
|
|
1631
|
-
|
|
1629
|
+
let j = null, Z = 0, K = null;
|
|
1630
|
+
function $s(t) {
|
|
1631
|
+
K = t;
|
|
1632
1632
|
}
|
|
1633
|
-
let
|
|
1634
|
-
function
|
|
1633
|
+
let Dr = 1, Ce = 0, De = Ce;
|
|
1634
|
+
function Hn(t) {
|
|
1635
1635
|
De = t;
|
|
1636
1636
|
}
|
|
1637
|
-
function
|
|
1638
|
-
return ++
|
|
1637
|
+
function zr() {
|
|
1638
|
+
return ++Dr;
|
|
1639
1639
|
}
|
|
1640
|
-
function
|
|
1640
|
+
function dt(t) {
|
|
1641
1641
|
var e = t.f;
|
|
1642
|
-
if ((e &
|
|
1642
|
+
if ((e & F) !== 0)
|
|
1643
1643
|
return !0;
|
|
1644
|
-
if (e &
|
|
1644
|
+
if (e & z && (t.f &= ~Le), (e & se) !== 0) {
|
|
1645
1645
|
for (var n = (
|
|
1646
1646
|
/** @type {Value[]} */
|
|
1647
1647
|
t.deps
|
|
1648
1648
|
), r = n.length, i = 0; i < r; i++) {
|
|
1649
1649
|
var s = n[i];
|
|
1650
|
-
if (
|
|
1650
|
+
if (dt(
|
|
1651
1651
|
/** @type {Derived} */
|
|
1652
1652
|
s
|
|
1653
|
-
) &&
|
|
1653
|
+
) && kr(
|
|
1654
1654
|
/** @type {Derived} */
|
|
1655
1655
|
s
|
|
1656
1656
|
), s.wv > t.wv)
|
|
1657
1657
|
return !0;
|
|
1658
1658
|
}
|
|
1659
|
-
(e &
|
|
1659
|
+
(e & ee) !== 0 && // During time traveling we don't want to reset the status so that
|
|
1660
1660
|
// traversal of the graph in the other batches still happens
|
|
1661
|
-
|
|
1661
|
+
re === null && S(t, D);
|
|
1662
1662
|
}
|
|
1663
1663
|
return !1;
|
|
1664
1664
|
}
|
|
1665
|
-
function
|
|
1665
|
+
function Or(t, e, n = !0) {
|
|
1666
1666
|
var r = t.reactions;
|
|
1667
|
-
if (r !== null && !(
|
|
1667
|
+
if (r !== null && !(te !== null && Ye.call(te, t)))
|
|
1668
1668
|
for (var i = 0; i < r.length; i++) {
|
|
1669
1669
|
var s = r[i];
|
|
1670
|
-
(s.f &
|
|
1670
|
+
(s.f & z) !== 0 ? Or(
|
|
1671
1671
|
/** @type {Derived} */
|
|
1672
1672
|
s,
|
|
1673
1673
|
e,
|
|
1674
1674
|
!1
|
|
1675
|
-
) : e === s && (n ? S(s,
|
|
1675
|
+
) : e === s && (n ? S(s, F) : (s.f & D) !== 0 && S(s, se), ce(
|
|
1676
1676
|
/** @type {Effect} */
|
|
1677
1677
|
s
|
|
1678
1678
|
));
|
|
1679
1679
|
}
|
|
1680
1680
|
}
|
|
1681
|
-
function
|
|
1682
|
-
var e =
|
|
1683
|
-
|
|
1684
|
-
null,
|
|
1681
|
+
function Lr(t) {
|
|
1682
|
+
var e = j, n = Z, r = K, i = k, s = te, a = ae, u = ie, o = De, l = t.f;
|
|
1683
|
+
j = /** @type {null | Value[]} */
|
|
1684
|
+
null, Z = 0, K = null, k = (l & (Pe | Fe)) === 0 ? t : null, te = null, Xe(t.ctx), ie = !1, De = ++Ce, t.ac !== null && (Tr(() => {
|
|
1685
1685
|
t.ac.abort(Ne);
|
|
1686
1686
|
}), t.ac = null);
|
|
1687
1687
|
try {
|
|
1688
|
-
t.f |=
|
|
1688
|
+
t.f |= tn;
|
|
1689
1689
|
var c = (
|
|
1690
1690
|
/** @type {Function} */
|
|
1691
1691
|
t.fn
|
|
1692
1692
|
), f = c();
|
|
1693
1693
|
t.f |= Je;
|
|
1694
|
-
var
|
|
1695
|
-
if (
|
|
1696
|
-
var
|
|
1697
|
-
if (m ||
|
|
1698
|
-
for (
|
|
1699
|
-
|
|
1694
|
+
var p = t.deps, m = x?.is_fork;
|
|
1695
|
+
if (j !== null) {
|
|
1696
|
+
var h;
|
|
1697
|
+
if (m || ct(t, Z), p !== null && Z > 0)
|
|
1698
|
+
for (p.length = Z + j.length, h = 0; h < j.length; h++)
|
|
1699
|
+
p[Z + h] = j[h];
|
|
1700
1700
|
else
|
|
1701
|
-
t.deps =
|
|
1702
|
-
if (
|
|
1703
|
-
for (
|
|
1704
|
-
(h
|
|
1705
|
-
} else !m &&
|
|
1706
|
-
if (
|
|
1707
|
-
for (
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1701
|
+
t.deps = p = j;
|
|
1702
|
+
if (dn() && (t.f & ee) !== 0)
|
|
1703
|
+
for (h = Z; h < p.length; h++)
|
|
1704
|
+
(p[h].reactions ??= []).push(t);
|
|
1705
|
+
} else !m && p !== null && Z < p.length && (ct(t, Z), p.length = Z);
|
|
1706
|
+
if (hr() && K !== null && !ie && p !== null && (t.f & (z | se | F)) === 0)
|
|
1707
|
+
for (h = 0; h < /** @type {Source[]} */
|
|
1708
|
+
K.length; h++)
|
|
1709
|
+
Or(
|
|
1710
|
+
K[h],
|
|
1711
1711
|
/** @type {Effect} */
|
|
1712
1712
|
t
|
|
1713
1713
|
);
|
|
@@ -1718,67 +1718,67 @@ function Or(t) {
|
|
|
1718
1718
|
if (e !== null)
|
|
1719
1719
|
for (const v of e)
|
|
1720
1720
|
v.rv = Ce;
|
|
1721
|
-
|
|
1722
|
-
|
|
1721
|
+
K !== null && (r === null ? r = K : r.push(.../** @type {Source[]} */
|
|
1722
|
+
K));
|
|
1723
1723
|
}
|
|
1724
|
-
return (t.f &
|
|
1724
|
+
return (t.f & Ee) !== 0 && (t.f ^= Ee), f;
|
|
1725
1725
|
} catch (v) {
|
|
1726
|
-
return
|
|
1726
|
+
return pr(v);
|
|
1727
1727
|
} finally {
|
|
1728
|
-
t.f ^=
|
|
1728
|
+
t.f ^= tn, j = e, Z = n, K = r, k = i, te = s, Xe(a), ie = u, De = o;
|
|
1729
1729
|
}
|
|
1730
1730
|
}
|
|
1731
|
-
function
|
|
1731
|
+
function Vs(t, e) {
|
|
1732
1732
|
let n = e.reactions;
|
|
1733
1733
|
if (n !== null) {
|
|
1734
|
-
var r =
|
|
1734
|
+
var r = Bi.call(n, t);
|
|
1735
1735
|
if (r !== -1) {
|
|
1736
1736
|
var i = n.length - 1;
|
|
1737
1737
|
i === 0 ? n = e.reactions = null : (n[r] = n[i], n.pop());
|
|
1738
1738
|
}
|
|
1739
1739
|
}
|
|
1740
|
-
if (n === null && (e.f &
|
|
1740
|
+
if (n === null && (e.f & z) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
|
|
1741
1741
|
// to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
|
|
1742
1742
|
// allows us to skip the expensive work of disconnecting and immediately reconnecting it
|
|
1743
|
-
(
|
|
1743
|
+
(j === null || !Ye.call(j, e))) {
|
|
1744
1744
|
var s = (
|
|
1745
1745
|
/** @type {Derived} */
|
|
1746
1746
|
e
|
|
1747
1747
|
);
|
|
1748
|
-
(s.f &
|
|
1748
|
+
(s.f & ee) !== 0 && (s.f ^= ee, s.f &= ~Le), cn(s), Ms(s), ct(s, 0);
|
|
1749
1749
|
}
|
|
1750
1750
|
}
|
|
1751
|
-
function
|
|
1751
|
+
function ct(t, e) {
|
|
1752
1752
|
var n = t.deps;
|
|
1753
1753
|
if (n !== null)
|
|
1754
1754
|
for (var r = e; r < n.length; r++)
|
|
1755
|
-
|
|
1755
|
+
Vs(t, n[r]);
|
|
1756
1756
|
}
|
|
1757
1757
|
function Ge(t) {
|
|
1758
1758
|
var e = t.f;
|
|
1759
|
-
if ((e &
|
|
1760
|
-
S(t,
|
|
1761
|
-
var n =
|
|
1762
|
-
|
|
1759
|
+
if ((e & Me) === 0) {
|
|
1760
|
+
S(t, D);
|
|
1761
|
+
var n = y, r = At;
|
|
1762
|
+
y = t, At = !0;
|
|
1763
1763
|
try {
|
|
1764
|
-
(e & (we |
|
|
1765
|
-
var i =
|
|
1766
|
-
t.teardown = typeof i == "function" ? i : null, t.wv =
|
|
1764
|
+
(e & (we | ur)) !== 0 ? zs(t) : mn(t), Nr(t);
|
|
1765
|
+
var i = Lr(t);
|
|
1766
|
+
t.teardown = typeof i == "function" ? i : null, t.wv = Dr;
|
|
1767
1767
|
var s;
|
|
1768
|
-
|
|
1768
|
+
Qt && os && (t.f & F) !== 0 && t.deps;
|
|
1769
1769
|
} finally {
|
|
1770
|
-
|
|
1770
|
+
At = r, y = n;
|
|
1771
1771
|
}
|
|
1772
1772
|
}
|
|
1773
1773
|
}
|
|
1774
1774
|
function E(t) {
|
|
1775
|
-
var e = t.f, n = (e &
|
|
1776
|
-
if (k !== null && !
|
|
1777
|
-
var r =
|
|
1778
|
-
if (!r && (
|
|
1775
|
+
var e = t.f, n = (e & z) !== 0;
|
|
1776
|
+
if (k !== null && !ie) {
|
|
1777
|
+
var r = y !== null && (y.f & Me) !== 0;
|
|
1778
|
+
if (!r && (te === null || !Ye.call(te, t))) {
|
|
1779
1779
|
var i = k.deps;
|
|
1780
|
-
if ((k.f &
|
|
1781
|
-
t.rv < Ce && (t.rv = Ce,
|
|
1780
|
+
if ((k.f & tn) !== 0)
|
|
1781
|
+
t.rv < Ce && (t.rv = Ce, j === null && i !== null && i[Z] === t ? Z++ : j === null ? j = [t] : j.push(t));
|
|
1782
1782
|
else {
|
|
1783
1783
|
(k.deps ??= []).push(t);
|
|
1784
1784
|
var s = t.reactions;
|
|
@@ -1786,8 +1786,8 @@ function E(t) {
|
|
|
1786
1786
|
}
|
|
1787
1787
|
}
|
|
1788
1788
|
}
|
|
1789
|
-
if (Ke &&
|
|
1790
|
-
return
|
|
1789
|
+
if (Ke && Se.has(t))
|
|
1790
|
+
return Se.get(t);
|
|
1791
1791
|
if (n) {
|
|
1792
1792
|
var a = (
|
|
1793
1793
|
/** @type {Derived} */
|
|
@@ -1795,54 +1795,54 @@ function E(t) {
|
|
|
1795
1795
|
);
|
|
1796
1796
|
if (Ke) {
|
|
1797
1797
|
var u = a.v;
|
|
1798
|
-
return ((a.f &
|
|
1798
|
+
return ((a.f & D) === 0 && a.reactions !== null || $r(a)) && (u = hn(a)), Se.set(a, u), u;
|
|
1799
1799
|
}
|
|
1800
|
-
var o = (a.f &
|
|
1801
|
-
|
|
1800
|
+
var o = (a.f & ee) === 0 && !ie && k !== null && (At || (k.f & ee) !== 0), l = (a.f & Je) === 0;
|
|
1801
|
+
dt(a) && (o && (a.f |= ee), kr(a)), o && !l && (yr(a), Fr(a));
|
|
1802
1802
|
}
|
|
1803
|
-
if (
|
|
1804
|
-
return
|
|
1805
|
-
if ((t.f &
|
|
1803
|
+
if (re?.has(t))
|
|
1804
|
+
return re.get(t);
|
|
1805
|
+
if ((t.f & Ee) !== 0)
|
|
1806
1806
|
throw t.v;
|
|
1807
1807
|
return t.v;
|
|
1808
1808
|
}
|
|
1809
|
-
function
|
|
1810
|
-
if (t.f |=
|
|
1809
|
+
function Fr(t) {
|
|
1810
|
+
if (t.f |= ee, t.deps !== null)
|
|
1811
1811
|
for (const e of t.deps)
|
|
1812
|
-
(e.reactions ??= []).push(t), (e.f &
|
|
1812
|
+
(e.reactions ??= []).push(t), (e.f & z) !== 0 && (e.f & ee) === 0 && (yr(
|
|
1813
1813
|
/** @type {Derived} */
|
|
1814
1814
|
e
|
|
1815
|
-
),
|
|
1815
|
+
), Fr(
|
|
1816
1816
|
/** @type {Derived} */
|
|
1817
1817
|
e
|
|
1818
1818
|
));
|
|
1819
1819
|
}
|
|
1820
|
-
function
|
|
1821
|
-
if (t.v ===
|
|
1820
|
+
function $r(t) {
|
|
1821
|
+
if (t.v === R) return !0;
|
|
1822
1822
|
if (t.deps === null) return !1;
|
|
1823
1823
|
for (const e of t.deps)
|
|
1824
|
-
if (
|
|
1824
|
+
if (Se.has(e) || (e.f & z) !== 0 && $r(
|
|
1825
1825
|
/** @type {Derived} */
|
|
1826
1826
|
e
|
|
1827
1827
|
))
|
|
1828
1828
|
return !0;
|
|
1829
1829
|
return !1;
|
|
1830
1830
|
}
|
|
1831
|
-
function
|
|
1832
|
-
var e =
|
|
1831
|
+
function Q(t) {
|
|
1832
|
+
var e = ie;
|
|
1833
1833
|
try {
|
|
1834
|
-
return
|
|
1834
|
+
return ie = !0, t();
|
|
1835
1835
|
} finally {
|
|
1836
|
-
|
|
1836
|
+
ie = e;
|
|
1837
1837
|
}
|
|
1838
1838
|
}
|
|
1839
|
-
const
|
|
1840
|
-
function
|
|
1841
|
-
return
|
|
1839
|
+
const js = ["touchstart", "touchmove"];
|
|
1840
|
+
function Us(t) {
|
|
1841
|
+
return js.includes(t);
|
|
1842
1842
|
}
|
|
1843
|
-
const
|
|
1844
|
-
let
|
|
1845
|
-
function
|
|
1843
|
+
const Et = /* @__PURE__ */ Symbol("events"), Ws = /* @__PURE__ */ new Set(), qn = /* @__PURE__ */ new Set();
|
|
1844
|
+
let Zn = null;
|
|
1845
|
+
function Yn(t) {
|
|
1846
1846
|
var e = this, n = (
|
|
1847
1847
|
/** @type {Node} */
|
|
1848
1848
|
e.ownerDocument
|
|
@@ -1850,13 +1850,13 @@ function Zn(t) {
|
|
|
1850
1850
|
/** @type {null | Element} */
|
|
1851
1851
|
i[0] || t.target
|
|
1852
1852
|
);
|
|
1853
|
-
|
|
1854
|
-
var a = 0, u =
|
|
1853
|
+
Zn = t;
|
|
1854
|
+
var a = 0, u = Zn === t && t[Et];
|
|
1855
1855
|
if (u) {
|
|
1856
1856
|
var o = i.indexOf(u);
|
|
1857
1857
|
if (o !== -1 && (e === document || e === /** @type {any} */
|
|
1858
1858
|
window)) {
|
|
1859
|
-
t[
|
|
1859
|
+
t[Et] = e;
|
|
1860
1860
|
return;
|
|
1861
1861
|
}
|
|
1862
1862
|
var l = i.indexOf(e);
|
|
@@ -1866,95 +1866,95 @@ function Zn(t) {
|
|
|
1866
1866
|
}
|
|
1867
1867
|
if (s = /** @type {Element} */
|
|
1868
1868
|
i[a] || t.target, s !== e) {
|
|
1869
|
-
|
|
1869
|
+
qi(t, "currentTarget", {
|
|
1870
1870
|
configurable: !0,
|
|
1871
1871
|
get() {
|
|
1872
1872
|
return s || n;
|
|
1873
1873
|
}
|
|
1874
1874
|
});
|
|
1875
|
-
var c = k, f =
|
|
1876
|
-
|
|
1875
|
+
var c = k, f = y;
|
|
1876
|
+
ne(null), he(null);
|
|
1877
1877
|
try {
|
|
1878
|
-
for (var
|
|
1879
|
-
var
|
|
1878
|
+
for (var p, m = []; s !== null; ) {
|
|
1879
|
+
var h = s.assignedSlot || s.parentNode || /** @type {any} */
|
|
1880
1880
|
s.host || null;
|
|
1881
1881
|
try {
|
|
1882
|
-
var v = s[
|
|
1882
|
+
var v = s[Et]?.[r];
|
|
1883
1883
|
v != null && (!/** @type {any} */
|
|
1884
1884
|
s.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
|
|
1885
1885
|
// -> the target could not have been disabled because it emits the event in the first place
|
|
1886
1886
|
t.target === s) && v.call(s, t);
|
|
1887
|
-
} catch (
|
|
1888
|
-
|
|
1887
|
+
} catch (b) {
|
|
1888
|
+
p ? m.push(b) : p = b;
|
|
1889
1889
|
}
|
|
1890
|
-
if (t.cancelBubble ||
|
|
1890
|
+
if (t.cancelBubble || h === e || h === null)
|
|
1891
1891
|
break;
|
|
1892
|
-
s =
|
|
1892
|
+
s = h;
|
|
1893
1893
|
}
|
|
1894
|
-
if (
|
|
1895
|
-
for (let
|
|
1894
|
+
if (p) {
|
|
1895
|
+
for (let b of m)
|
|
1896
1896
|
queueMicrotask(() => {
|
|
1897
|
-
throw
|
|
1897
|
+
throw b;
|
|
1898
1898
|
});
|
|
1899
|
-
throw
|
|
1899
|
+
throw p;
|
|
1900
1900
|
}
|
|
1901
1901
|
} finally {
|
|
1902
|
-
t[
|
|
1902
|
+
t[Et] = e, delete t.currentTarget, ne(c), he(f);
|
|
1903
1903
|
}
|
|
1904
1904
|
}
|
|
1905
1905
|
}
|
|
1906
|
-
const
|
|
1906
|
+
const Bs = (
|
|
1907
1907
|
// We gotta write it like this because after downleveling the pure comment may end up in the wrong location
|
|
1908
1908
|
globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", {
|
|
1909
1909
|
/** @param {string} html */
|
|
1910
1910
|
createHTML: (t) => t
|
|
1911
1911
|
})
|
|
1912
1912
|
);
|
|
1913
|
-
function
|
|
1913
|
+
function Hs(t) {
|
|
1914
1914
|
return (
|
|
1915
1915
|
/** @type {string} */
|
|
1916
|
-
|
|
1916
|
+
Bs?.createHTML(t) ?? t
|
|
1917
1917
|
);
|
|
1918
1918
|
}
|
|
1919
|
-
function
|
|
1920
|
-
var e =
|
|
1921
|
-
return e.innerHTML =
|
|
1919
|
+
function qs(t) {
|
|
1920
|
+
var e = Ps("template");
|
|
1921
|
+
return e.innerHTML = Hs(t.replaceAll("<!>", "<!---->")), e.content;
|
|
1922
1922
|
}
|
|
1923
|
-
function
|
|
1923
|
+
function Zs(t, e) {
|
|
1924
1924
|
var n = (
|
|
1925
1925
|
/** @type {Effect} */
|
|
1926
|
-
|
|
1926
|
+
y
|
|
1927
1927
|
);
|
|
1928
1928
|
n.nodes === null && (n.nodes = { start: t, end: e, a: null, t: null });
|
|
1929
1929
|
}
|
|
1930
1930
|
// @__NO_SIDE_EFFECTS__
|
|
1931
|
-
function
|
|
1931
|
+
function Vr(t, e) {
|
|
1932
1932
|
var n, r = !t.startsWith("<!>");
|
|
1933
1933
|
return () => {
|
|
1934
|
-
n === void 0 && (n =
|
|
1935
|
-
/* @__PURE__ */
|
|
1934
|
+
n === void 0 && (n = qs(r ? t : "<!>" + t), n = /** @type {TemplateNode} */
|
|
1935
|
+
/* @__PURE__ */ Pr(n));
|
|
1936
1936
|
var i = (
|
|
1937
1937
|
/** @type {TemplateNode} */
|
|
1938
|
-
|
|
1938
|
+
Mr ? document.importNode(n, !0) : n.cloneNode(!0)
|
|
1939
1939
|
);
|
|
1940
|
-
return
|
|
1940
|
+
return Zs(i, i), i;
|
|
1941
1941
|
};
|
|
1942
1942
|
}
|
|
1943
|
-
function
|
|
1943
|
+
function jr(t, e) {
|
|
1944
1944
|
t !== null && t.before(
|
|
1945
1945
|
/** @type {Node} */
|
|
1946
1946
|
e
|
|
1947
1947
|
);
|
|
1948
1948
|
}
|
|
1949
|
-
function
|
|
1950
|
-
return
|
|
1949
|
+
function vn(t, e) {
|
|
1950
|
+
return Ys(t, e);
|
|
1951
1951
|
}
|
|
1952
|
-
const
|
|
1953
|
-
function
|
|
1954
|
-
|
|
1955
|
-
var o = void 0, l =
|
|
1956
|
-
var c = n ?? e.appendChild(
|
|
1957
|
-
|
|
1952
|
+
const xt = /* @__PURE__ */ new Map();
|
|
1953
|
+
function Ys(t, { target: e, anchor: n, props: r = {}, events: i, context: s, intro: a = !0, transformError: u }) {
|
|
1954
|
+
xs();
|
|
1955
|
+
var o = void 0, l = Ns(() => {
|
|
1956
|
+
var c = n ?? e.appendChild(Sr());
|
|
1957
|
+
ds(
|
|
1958
1958
|
/** @type {TemplateNode} */
|
|
1959
1959
|
c,
|
|
1960
1960
|
{
|
|
@@ -1962,69 +1962,69 @@ function Hs(t, { target: e, anchor: n, props: r = {}, events: i, context: s, int
|
|
|
1962
1962
|
}
|
|
1963
1963
|
},
|
|
1964
1964
|
(m) => {
|
|
1965
|
-
|
|
1966
|
-
var
|
|
1965
|
+
ln({});
|
|
1966
|
+
var h = (
|
|
1967
1967
|
/** @type {ComponentContext} */
|
|
1968
|
-
|
|
1968
|
+
ae
|
|
1969
1969
|
);
|
|
1970
|
-
s && (
|
|
1970
|
+
s && (h.c = s), i && (r.$$events = i), o = t(m, r) || {}, un();
|
|
1971
1971
|
},
|
|
1972
1972
|
u
|
|
1973
1973
|
);
|
|
1974
|
-
var f = /* @__PURE__ */ new Set(),
|
|
1975
|
-
for (var
|
|
1976
|
-
var v = m[
|
|
1974
|
+
var f = /* @__PURE__ */ new Set(), p = (m) => {
|
|
1975
|
+
for (var h = 0; h < m.length; h++) {
|
|
1976
|
+
var v = m[h];
|
|
1977
1977
|
if (!f.has(v)) {
|
|
1978
1978
|
f.add(v);
|
|
1979
|
-
var
|
|
1980
|
-
for (const
|
|
1981
|
-
var
|
|
1982
|
-
|
|
1983
|
-
var
|
|
1984
|
-
|
|
1979
|
+
var b = Us(v);
|
|
1980
|
+
for (const oe of [e, document]) {
|
|
1981
|
+
var C = xt.get(oe);
|
|
1982
|
+
C === void 0 && (C = /* @__PURE__ */ new Map(), xt.set(oe, C));
|
|
1983
|
+
var J = C.get(v);
|
|
1984
|
+
J === void 0 ? (oe.addEventListener(v, Yn, { passive: b }), C.set(v, 1)) : C.set(v, J + 1);
|
|
1985
1985
|
}
|
|
1986
1986
|
}
|
|
1987
1987
|
}
|
|
1988
1988
|
};
|
|
1989
|
-
return
|
|
1989
|
+
return p(Hi(Ws)), qn.add(p), () => {
|
|
1990
1990
|
for (var m of f)
|
|
1991
|
-
for (const
|
|
1992
|
-
var
|
|
1991
|
+
for (const b of [e, document]) {
|
|
1992
|
+
var h = (
|
|
1993
1993
|
/** @type {Map<string, number>} */
|
|
1994
|
-
|
|
1994
|
+
xt.get(b)
|
|
1995
1995
|
), v = (
|
|
1996
1996
|
/** @type {number} */
|
|
1997
|
-
|
|
1997
|
+
h.get(m)
|
|
1998
1998
|
);
|
|
1999
|
-
--v == 0 ? (
|
|
1999
|
+
--v == 0 ? (b.removeEventListener(m, Yn), h.delete(m), h.size === 0 && xt.delete(b)) : h.set(m, v);
|
|
2000
2000
|
}
|
|
2001
|
-
|
|
2001
|
+
qn.delete(p), c !== n && c.parentNode?.removeChild(c);
|
|
2002
2002
|
};
|
|
2003
2003
|
});
|
|
2004
|
-
return
|
|
2004
|
+
return Js.set(o, l), o;
|
|
2005
2005
|
}
|
|
2006
|
-
let
|
|
2007
|
-
function
|
|
2006
|
+
let Js = /* @__PURE__ */ new WeakMap();
|
|
2007
|
+
function Ur(t) {
|
|
2008
2008
|
var e, n, r = "";
|
|
2009
2009
|
if (typeof t == "string" || typeof t == "number") r += t;
|
|
2010
2010
|
else if (typeof t == "object") if (Array.isArray(t)) {
|
|
2011
2011
|
var i = t.length;
|
|
2012
|
-
for (e = 0; e < i; e++) t[e] && (n =
|
|
2012
|
+
for (e = 0; e < i; e++) t[e] && (n = Ur(t[e])) && (r && (r += " "), r += n);
|
|
2013
2013
|
} else for (n in t) t[n] && (r && (r += " "), r += n);
|
|
2014
2014
|
return r;
|
|
2015
2015
|
}
|
|
2016
|
-
function
|
|
2017
|
-
for (var t, e, n = 0, r = "", i = arguments.length; n < i; n++) (t = arguments[n]) && (e =
|
|
2016
|
+
function Xs() {
|
|
2017
|
+
for (var t, e, n = 0, r = "", i = arguments.length; n < i; n++) (t = arguments[n]) && (e = Ur(t)) && (r && (r += " "), r += e);
|
|
2018
2018
|
return r;
|
|
2019
2019
|
}
|
|
2020
|
-
function
|
|
2021
|
-
return typeof t == "object" ?
|
|
2020
|
+
function Wr(t) {
|
|
2021
|
+
return typeof t == "object" ? Xs(t) : t ?? "";
|
|
2022
2022
|
}
|
|
2023
|
-
function
|
|
2023
|
+
function Ks(t, e, n) {
|
|
2024
2024
|
var r = t == null ? "" : "" + t;
|
|
2025
2025
|
return e && (r = r ? r + " " + e : e), r === "" ? null : r;
|
|
2026
2026
|
}
|
|
2027
|
-
function
|
|
2027
|
+
function Jn(t, e = !1) {
|
|
2028
2028
|
var n = e ? " !important;" : ";", r = "";
|
|
2029
2029
|
for (var i of Object.keys(t)) {
|
|
2030
2030
|
var s = t[i];
|
|
@@ -2032,53 +2032,53 @@ function Yn(t, e = !1) {
|
|
|
2032
2032
|
}
|
|
2033
2033
|
return r;
|
|
2034
2034
|
}
|
|
2035
|
-
function
|
|
2035
|
+
function Gs(t, e) {
|
|
2036
2036
|
if (e) {
|
|
2037
2037
|
var n = "", r, i;
|
|
2038
|
-
return Array.isArray(e) ? (r = e[0], i = e[1]) : r = e, r && (n +=
|
|
2038
|
+
return Array.isArray(e) ? (r = e[0], i = e[1]) : r = e, r && (n += Jn(r)), i && (n += Jn(i, !0)), n = n.trim(), n === "" ? null : n;
|
|
2039
2039
|
}
|
|
2040
2040
|
return String(t);
|
|
2041
2041
|
}
|
|
2042
|
-
function
|
|
2042
|
+
function Br(t, e, n, r, i, s) {
|
|
2043
2043
|
var a = t.__className;
|
|
2044
2044
|
if (a !== n || a === void 0) {
|
|
2045
|
-
var u =
|
|
2045
|
+
var u = Ks(n, r);
|
|
2046
2046
|
u == null ? t.removeAttribute("class") : t.className = u, t.__className = n;
|
|
2047
2047
|
}
|
|
2048
2048
|
return s;
|
|
2049
2049
|
}
|
|
2050
|
-
function
|
|
2050
|
+
function Yt(t, e = {}, n, r) {
|
|
2051
2051
|
for (var i in n) {
|
|
2052
2052
|
var s = n[i];
|
|
2053
2053
|
e[i] !== s && (n[i] == null ? t.style.removeProperty(i) : t.style.setProperty(i, s, r));
|
|
2054
2054
|
}
|
|
2055
2055
|
}
|
|
2056
|
-
function
|
|
2056
|
+
function it(t, e, n, r) {
|
|
2057
2057
|
var i = t.__style;
|
|
2058
2058
|
if (i !== e) {
|
|
2059
|
-
var s =
|
|
2059
|
+
var s = Gs(e, r);
|
|
2060
2060
|
s == null ? t.removeAttribute("style") : t.style.cssText = s, t.__style = e;
|
|
2061
|
-
} else r && (Array.isArray(r) ? (
|
|
2061
|
+
} else r && (Array.isArray(r) ? (Yt(t, n?.[0], r[0]), Yt(t, n?.[1], r[1], "important")) : Yt(t, n, r));
|
|
2062
2062
|
return r;
|
|
2063
2063
|
}
|
|
2064
|
-
function
|
|
2065
|
-
return t === e || t?.[
|
|
2064
|
+
function Xn(t, e) {
|
|
2065
|
+
return t === e || t?.[Tt] === e;
|
|
2066
2066
|
}
|
|
2067
|
-
function
|
|
2068
|
-
return
|
|
2067
|
+
function st(t = {}, e, n, r) {
|
|
2068
|
+
return Cs(() => {
|
|
2069
2069
|
var i, s;
|
|
2070
|
-
return
|
|
2071
|
-
i = s, s = [],
|
|
2072
|
-
t !== n(...s) && (e(t, ...s), i &&
|
|
2070
|
+
return Ir(() => {
|
|
2071
|
+
i = s, s = [], Q(() => {
|
|
2072
|
+
t !== n(...s) && (e(t, ...s), i && Xn(n(...i), t) && e(null, ...i));
|
|
2073
2073
|
});
|
|
2074
2074
|
}), () => {
|
|
2075
2075
|
Re(() => {
|
|
2076
|
-
s &&
|
|
2076
|
+
s && Xn(n(...s), t) && e(null, ...s);
|
|
2077
2077
|
});
|
|
2078
2078
|
};
|
|
2079
2079
|
}), t;
|
|
2080
2080
|
}
|
|
2081
|
-
class
|
|
2081
|
+
class gn {
|
|
2082
2082
|
div;
|
|
2083
2083
|
marker;
|
|
2084
2084
|
constructor(e, n, r, i) {
|
|
@@ -2094,7 +2094,7 @@ class mn {
|
|
|
2094
2094
|
this.marker.update(e);
|
|
2095
2095
|
}
|
|
2096
2096
|
}
|
|
2097
|
-
class
|
|
2097
|
+
class mt {
|
|
2098
2098
|
shown;
|
|
2099
2099
|
id;
|
|
2100
2100
|
lat;
|
|
@@ -2102,16 +2102,16 @@ class dt {
|
|
|
2102
2102
|
rank;
|
|
2103
2103
|
marker;
|
|
2104
2104
|
constructor(e, n, r, i, s) {
|
|
2105
|
-
if (new.target ===
|
|
2105
|
+
if (new.target === mt) throw new Error("Unsupported code");
|
|
2106
2106
|
this.shown = !0, this.id = e, this.lat = n, this.lng = r, this.rank = i, this.marker = s;
|
|
2107
2107
|
}
|
|
2108
2108
|
}
|
|
2109
|
-
const
|
|
2110
|
-
typeof window < "u" && ((window.__svelte ??= {}).v ??= /* @__PURE__ */ new Set()).add(
|
|
2111
|
-
function
|
|
2109
|
+
const Qs = "5";
|
|
2110
|
+
typeof window < "u" && ((window.__svelte ??= {}).v ??= /* @__PURE__ */ new Set()).add(Qs);
|
|
2111
|
+
function Hr(t) {
|
|
2112
2112
|
return -0.5 * (Math.cos(Math.PI * t) - 1);
|
|
2113
2113
|
}
|
|
2114
|
-
class
|
|
2114
|
+
class qr {
|
|
2115
2115
|
animating;
|
|
2116
2116
|
animationEasing;
|
|
2117
2117
|
animationCallback;
|
|
@@ -2155,100 +2155,100 @@ class Hr {
|
|
|
2155
2155
|
return performance.now() > this.time.end;
|
|
2156
2156
|
}
|
|
2157
2157
|
}
|
|
2158
|
-
var
|
|
2159
|
-
function
|
|
2160
|
-
|
|
2161
|
-
let n =
|
|
2162
|
-
setDisplayed:
|
|
2163
|
-
getDisplayed:
|
|
2158
|
+
var ea = /* @__PURE__ */ Vr("<div></div>");
|
|
2159
|
+
function ta(t, e) {
|
|
2160
|
+
ln(e, !0);
|
|
2161
|
+
let n = Q(() => e.id), r = Q(() => e.element), i = Q(() => e.style), s = Q(() => e.dimensions), a = Q(() => e.initialize), u = {
|
|
2162
|
+
setDisplayed: J,
|
|
2163
|
+
getDisplayed: oe,
|
|
2164
2164
|
setSuppressed: de,
|
|
2165
|
-
setCollapsed:
|
|
2166
|
-
getCollapsed:
|
|
2167
|
-
setScale:
|
|
2165
|
+
setCollapsed: ye,
|
|
2166
|
+
getCollapsed: Te,
|
|
2167
|
+
setScale: Ot
|
|
2168
2168
|
};
|
|
2169
2169
|
function o() {
|
|
2170
2170
|
return u;
|
|
2171
2171
|
}
|
|
2172
|
-
let l, c = s.width, f = s.height,
|
|
2173
|
-
function
|
|
2174
|
-
|
|
2172
|
+
let l, c = s.width, f = s.height, p = s.padding, m = i?.background ?? ji, h = i?.radius ?? Oi, v = i?.shadow ?? Li, b = /* @__PURE__ */ V(!1), C = !1;
|
|
2173
|
+
function J(_) {
|
|
2174
|
+
_ == !0 && (l && r && r.parentElement != l && l.appendChild(r), C == !1 && a && r && (C = !0, setTimeout(async () => await a(n, r), 0))), _ != E(b) && (U(b, _, !0), _ == !1 && q.end());
|
|
2175
2175
|
}
|
|
2176
|
-
function
|
|
2177
|
-
return E(
|
|
2176
|
+
function oe() {
|
|
2177
|
+
return E(b);
|
|
2178
2178
|
}
|
|
2179
|
-
let
|
|
2180
|
-
function de(
|
|
2181
|
-
|
|
2179
|
+
let pe = /* @__PURE__ */ V(!0);
|
|
2180
|
+
function de(_) {
|
|
2181
|
+
_ != E(pe) && (U(pe, _, !0), _ && (X = je, q.set(je)));
|
|
2182
2182
|
}
|
|
2183
|
-
let
|
|
2184
|
-
function
|
|
2185
|
-
|
|
2183
|
+
let le = /* @__PURE__ */ V(!0);
|
|
2184
|
+
function ye(_) {
|
|
2185
|
+
_ != E(le) && (U(le, _, !0), q.target(E(le) ? 0 : X));
|
|
2186
2186
|
}
|
|
2187
|
-
function
|
|
2188
|
-
return E(
|
|
2187
|
+
function Te() {
|
|
2188
|
+
return E(b) ? q.expired() : !0;
|
|
2189
2189
|
}
|
|
2190
|
-
let
|
|
2190
|
+
let X = je, q = new qr({
|
|
2191
2191
|
value: je,
|
|
2192
2192
|
min: 0,
|
|
2193
2193
|
max: 1,
|
|
2194
|
-
timespan:
|
|
2195
|
-
easing:
|
|
2196
|
-
callback:
|
|
2194
|
+
timespan: Ci,
|
|
2195
|
+
easing: Hr,
|
|
2196
|
+
callback: Lt
|
|
2197
2197
|
});
|
|
2198
|
-
function
|
|
2199
|
-
|
|
2198
|
+
function Ot(_) {
|
|
2199
|
+
X = _, q.target(_);
|
|
2200
2200
|
}
|
|
2201
|
-
function
|
|
2202
|
-
l.style.scale =
|
|
2201
|
+
function Lt(_) {
|
|
2202
|
+
l.style.scale = _.toString(), l.style.filter = `brightness(${vt(_)})`;
|
|
2203
2203
|
}
|
|
2204
|
-
function
|
|
2205
|
-
return 0.25 + 0.75 *
|
|
2204
|
+
function vt(_) {
|
|
2205
|
+
return 0.25 + 0.75 * _;
|
|
2206
2206
|
}
|
|
2207
|
-
var
|
|
2208
|
-
let
|
|
2209
|
-
return
|
|
2210
|
-
(
|
|
2211
|
-
|
|
2212
|
-
|
|
2207
|
+
var me = { invoke: o }, $e = ea();
|
|
2208
|
+
let tt;
|
|
2209
|
+
return st($e, (_) => l = _, () => l), Ar(
|
|
2210
|
+
(_) => {
|
|
2211
|
+
Br(
|
|
2212
|
+
$e,
|
|
2213
2213
|
1,
|
|
2214
|
-
|
|
2214
|
+
Wr([
|
|
2215
2215
|
"pin",
|
|
2216
|
-
E(
|
|
2217
|
-
E(
|
|
2216
|
+
E(b) && "displayed",
|
|
2217
|
+
E(pe) && "suppressed"
|
|
2218
2218
|
]),
|
|
2219
2219
|
"svelte-10kxbrm"
|
|
2220
|
-
),
|
|
2220
|
+
), tt = it($e, "", tt, _);
|
|
2221
2221
|
},
|
|
2222
2222
|
[
|
|
2223
2223
|
() => ({
|
|
2224
2224
|
width: `${c}px`,
|
|
2225
2225
|
height: `${f}px`,
|
|
2226
|
-
padding: `${
|
|
2227
|
-
"border-radius": `${
|
|
2226
|
+
padding: `${p}px`,
|
|
2227
|
+
"border-radius": `${h}px`,
|
|
2228
2228
|
"background-color": `rgb(from ${m} r g b / 1)`,
|
|
2229
2229
|
"box-shadow": v,
|
|
2230
2230
|
scale: je,
|
|
2231
|
-
filter: `brightness(${
|
|
2231
|
+
filter: `brightness(${vt(je)})`
|
|
2232
2232
|
})
|
|
2233
2233
|
]
|
|
2234
|
-
),
|
|
2234
|
+
), jr(t, $e), un(me);
|
|
2235
2235
|
}
|
|
2236
|
-
class
|
|
2236
|
+
class na extends mt {
|
|
2237
2237
|
width;
|
|
2238
2238
|
height;
|
|
2239
2239
|
zoom;
|
|
2240
2240
|
component;
|
|
2241
2241
|
constructor(e, n, r, i, s, a) {
|
|
2242
|
-
super(n, r, i, s, new
|
|
2242
|
+
super(n, r, i, s, new gn(e, r, i, s)), this.width = a.dimensions.width, this.height = a.dimensions.height, this.zoom = NaN, this.component = vn(ta, {
|
|
2243
2243
|
target: this.marker.div,
|
|
2244
2244
|
props: a
|
|
2245
2245
|
});
|
|
2246
2246
|
}
|
|
2247
2247
|
get zIndex() {
|
|
2248
|
-
return Number.isNaN(this.zoom) ? this.rank : Math.round(-this.zoom *
|
|
2248
|
+
return Number.isNaN(this.zoom) ? this.rank : Math.round(-this.zoom * or) + Di;
|
|
2249
2249
|
}
|
|
2250
2250
|
}
|
|
2251
|
-
class
|
|
2251
|
+
class Kn {
|
|
2252
2252
|
animating;
|
|
2253
2253
|
animationTimestamp;
|
|
2254
2254
|
animationEnd;
|
|
@@ -2302,127 +2302,126 @@ class Xn {
|
|
|
2302
2302
|
return performance.now() > this.animationEnd;
|
|
2303
2303
|
}
|
|
2304
2304
|
}
|
|
2305
|
-
function
|
|
2305
|
+
function an(t, e, n) {
|
|
2306
2306
|
if (t <= 0 || e <= 0) return { x: 0, y: 0 };
|
|
2307
2307
|
let r = t / 2, i = e / 2, s = Math.sqrt(r * r + i * i), a = Math.atan(i / r) * (180 / Math.PI), u = n * (Math.PI / 180);
|
|
2308
2308
|
return n < 180 ? n < 90 ? n < a ? { x: 0, y: s * Math.sin(u) - i } : { x: s * Math.cos(u) - r, y: 0 } : n < 180 - a ? { x: s * Math.cos(u) - r, y: 0 } : { x: -t, y: s * Math.sin(u) - i } : n < 270 ? n < 180 + a ? { x: -t, y: s * Math.sin(u) - i } : { x: s * Math.cos(u) - r, y: -e } : n < 360 - a ? { x: s * Math.cos(u) - r, y: -e } : { x: 0, y: s * Math.sin(u) - i };
|
|
2309
2309
|
}
|
|
2310
|
-
var
|
|
2311
|
-
function
|
|
2312
|
-
|
|
2313
|
-
let n =
|
|
2314
|
-
setDisplayed:
|
|
2315
|
-
getDisplayed:
|
|
2316
|
-
setCollapsed:
|
|
2317
|
-
getCollapsed:
|
|
2318
|
-
getExpanded:
|
|
2319
|
-
setAngle:
|
|
2310
|
+
var ra = /* @__PURE__ */ Vr('<div><div class="element pointer svelte-1no6o2a"></div> <div class="element bubble svelte-1no6o2a"><div class="element body svelte-1no6o2a"></div></div></div>');
|
|
2311
|
+
function Zr(t, e) {
|
|
2312
|
+
ln(e, !0);
|
|
2313
|
+
let n = Q(() => e.id), r = Q(() => e.element), i = Q(() => e.style), s = Q(() => e.dimensions), a = Q(() => e.initialize), u = {
|
|
2314
|
+
setDisplayed: li,
|
|
2315
|
+
getDisplayed: ui,
|
|
2316
|
+
setCollapsed: ci,
|
|
2317
|
+
getCollapsed: fi,
|
|
2318
|
+
getExpanded: hi,
|
|
2319
|
+
setAngle: di
|
|
2320
2320
|
};
|
|
2321
2321
|
function o() {
|
|
2322
2322
|
return u;
|
|
2323
2323
|
}
|
|
2324
|
-
let l
|
|
2325
|
-
s.width, s.height, i?.radius;
|
|
2326
|
-
let
|
|
2327
|
-
function
|
|
2328
|
-
g != E(
|
|
2324
|
+
let l, c, f, p, m = i?.filter ?? Vi;
|
|
2325
|
+
const h = s.width + 2 * s.padding, v = s.height + 2 * s.padding, b = s.padding, C = s.width, J = s.height, oe = i?.radius, pe = s.width, de = s.height, le = Math.min(i?.radius ?? Fi, Math.min(pe, de) / 2), ye = Math.min(1, 2 * le / Math.min(de, pe)), Te = i?.background ?? Ln, X = s.padding * 2, q = s.padding * 0.5 * ye, Ot = i?.background ?? Ln, Lt = v < h ? v / h : 1, vt = h < v ? h / v : 1, me = Math.min(h, v) / 2, $e = me * Math.SQRT2, tt = 15, _ = 15 * Math.SQRT2;
|
|
2326
|
+
let bn = !1, Ve = /* @__PURE__ */ V(!1);
|
|
2327
|
+
function li(g) {
|
|
2328
|
+
g != E(Ve) && (U(Ve, g, !0), g == !0 && (r && r.parentElement != c && c.appendChild(r), bn == !1 && a && r && (bn = !0, setTimeout(async () => await a(n, r), 0))), g == !1 && (gt.end(), jt.end(), Wt.end()));
|
|
2329
2329
|
}
|
|
2330
|
-
function
|
|
2331
|
-
return E(
|
|
2330
|
+
function ui() {
|
|
2331
|
+
return E(Ve);
|
|
2332
2332
|
}
|
|
2333
|
-
let
|
|
2334
|
-
function
|
|
2335
|
-
g != E(
|
|
2333
|
+
let Ft = /* @__PURE__ */ V(!0);
|
|
2334
|
+
function ci(g) {
|
|
2335
|
+
g != E(Ft) && (U(Ft, g, !0), gt.target(E(Ft) ? 0 : 1));
|
|
2336
2336
|
}
|
|
2337
|
-
function
|
|
2338
|
-
return E(
|
|
2337
|
+
function fi() {
|
|
2338
|
+
return E(Ve) ? gt.expired() : !0;
|
|
2339
2339
|
}
|
|
2340
|
-
function
|
|
2341
|
-
return E(
|
|
2340
|
+
function hi() {
|
|
2341
|
+
return E(Ve) ? gt.expired() : !1;
|
|
2342
2342
|
}
|
|
2343
|
-
let
|
|
2343
|
+
let gt = new qr({
|
|
2344
2344
|
value: 0,
|
|
2345
2345
|
min: 0,
|
|
2346
2346
|
max: 1,
|
|
2347
|
-
timespan:
|
|
2348
|
-
easing:
|
|
2349
|
-
callback:
|
|
2347
|
+
timespan: Ri,
|
|
2348
|
+
easing: Hr,
|
|
2349
|
+
callback: pi
|
|
2350
2350
|
});
|
|
2351
|
-
function
|
|
2352
|
-
|
|
2351
|
+
function pi(g) {
|
|
2352
|
+
l.style.opacity = `${g}`, l.style.scale = `${g}`, c.style.opacity = `${g}`;
|
|
2353
2353
|
}
|
|
2354
|
-
let
|
|
2355
|
-
value: -
|
|
2356
|
-
min: -
|
|
2354
|
+
let wt = NaN, $t = /* @__PURE__ */ V(!1), Vt = -h / 2, jt = new Kn({
|
|
2355
|
+
value: -h / 2,
|
|
2356
|
+
min: -h,
|
|
2357
2357
|
max: 0,
|
|
2358
2358
|
precision: 1,
|
|
2359
|
-
stiffness:
|
|
2360
|
-
callback:
|
|
2361
|
-
}),
|
|
2362
|
-
value: -
|
|
2363
|
-
min: -
|
|
2359
|
+
stiffness: Rn,
|
|
2360
|
+
callback: mi
|
|
2361
|
+
}), Ut = -v / 2, Wt = new Kn({
|
|
2362
|
+
value: -v / 2,
|
|
2363
|
+
min: -v,
|
|
2364
2364
|
max: 0,
|
|
2365
2365
|
precision: 1,
|
|
2366
|
-
stiffness:
|
|
2367
|
-
callback:
|
|
2366
|
+
stiffness: Rn,
|
|
2367
|
+
callback: vi
|
|
2368
2368
|
});
|
|
2369
|
-
function
|
|
2369
|
+
function di(g, kt) {
|
|
2370
2370
|
if (Number.isNaN(g)) {
|
|
2371
|
-
|
|
2371
|
+
wt = NaN, U($t, !1);
|
|
2372
2372
|
return;
|
|
2373
2373
|
}
|
|
2374
|
-
if (E(
|
|
2375
|
-
|
|
2376
|
-
const Ie =
|
|
2377
|
-
|
|
2374
|
+
if (E($t) == !1 || kt == !0) {
|
|
2375
|
+
U($t, !0), wt = g;
|
|
2376
|
+
const Ie = an(h, v, g);
|
|
2377
|
+
jt.set(Math.round(Ie.x)), Wt.set(Math.round(Ie.y));
|
|
2378
2378
|
return;
|
|
2379
2379
|
}
|
|
2380
|
-
if (
|
|
2381
|
-
|
|
2382
|
-
const Ie =
|
|
2383
|
-
|
|
2380
|
+
if (wt != g) {
|
|
2381
|
+
wt = g;
|
|
2382
|
+
const Ie = an(h, v, g);
|
|
2383
|
+
jt.target(Math.round(Ie.x)), Wt.target(Math.round(Ie.y));
|
|
2384
2384
|
return;
|
|
2385
2385
|
}
|
|
2386
2386
|
}
|
|
2387
|
-
function
|
|
2388
|
-
|
|
2387
|
+
function mi(g) {
|
|
2388
|
+
Vt = g, _n(Vt, Ut);
|
|
2389
2389
|
}
|
|
2390
|
-
function
|
|
2391
|
-
|
|
2392
|
-
}
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
}
|
|
2398
|
-
var mi = { invoke: o }, tt = ea();
|
|
2399
|
-
let bn;
|
|
2400
|
-
var Ut = Un(tt);
|
|
2401
|
-
let _n;
|
|
2402
|
-
it(Ut, (g) => d = g, () => d);
|
|
2403
|
-
var Wt = Ms(Ut, 2);
|
|
2390
|
+
function vi(g) {
|
|
2391
|
+
Ut = g, _n(Vt, Ut);
|
|
2392
|
+
}
|
|
2393
|
+
function _n(g, kt) {
|
|
2394
|
+
const Ie = g + h / 2, wi = kt + v / 2, yt = Ie * Lt, bt = wi * vt, qt = Math.sqrt(yt * yt + bt * bt), Tn = (qt - me) / ($e - me), ki = Math.atan2(bt, yt) / Math.PI * 180 - 45, In = tt + Tn * (_ - tt), yi = qt < me ? qt / me : 1, An = 0.5 * ((1 + 0.5 * ye) * Tn), bi = g + b * (1 - An * (yt / me)), _i = kt + b * (1 - An * (bt / me));
|
|
2395
|
+
p.style.transform = `scale(${yi}) rotate(${ki}deg) skew(${In}deg, ${In}deg)`, f.style.transform = `translate(${Math.round(bi)}px, ${Math.round(_i)}px)`;
|
|
2396
|
+
}
|
|
2397
|
+
var gi = { invoke: o }, nt = ra();
|
|
2404
2398
|
let Mn;
|
|
2405
|
-
var
|
|
2399
|
+
var Bt = Wn(nt);
|
|
2400
|
+
let En;
|
|
2401
|
+
st(Bt, (g) => p = g, () => p);
|
|
2402
|
+
var Ht = Ss(Bt, 2);
|
|
2406
2403
|
let xn;
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2404
|
+
var Sn = Wn(Ht);
|
|
2405
|
+
let Pn;
|
|
2406
|
+
return st(Sn, (g) => c = g, () => c), st(Ht, (g) => f = g, () => f), st(nt, (g) => l = g, () => l), Ar(() => {
|
|
2407
|
+
Br(nt, 1, Wr(["element anchor", E(Ve) && "displayed"]), "svelte-1no6o2a"), Mn = it(nt, "", Mn, { filter: m }), En = it(Bt, "", En, {
|
|
2408
|
+
width: `${X}px`,
|
|
2409
|
+
height: `${X}px`,
|
|
2410
|
+
"border-radius": `${q}px`,
|
|
2411
|
+
"background-color": `rgb(from ${Ot} r g b / 1)`
|
|
2412
|
+
}), xn = it(Ht, "", xn, {
|
|
2413
|
+
width: `${pe}px`,
|
|
2414
|
+
height: `${de}px`,
|
|
2415
|
+
"border-radius": `${le}px`,
|
|
2416
|
+
"background-color": `rgb(from ${Te} r g b / 1)`
|
|
2417
|
+
}), Pn = it(Sn, "", Pn, {
|
|
2418
|
+
width: `${C}px`,
|
|
2419
|
+
height: `${J}px`,
|
|
2420
|
+
"border-radius": `${oe}px`
|
|
2422
2421
|
});
|
|
2423
|
-
}),
|
|
2422
|
+
}), jr(t, nt), un(gi);
|
|
2424
2423
|
}
|
|
2425
|
-
class
|
|
2424
|
+
class ia extends mt {
|
|
2426
2425
|
width;
|
|
2427
2426
|
height;
|
|
2428
2427
|
zoom;
|
|
@@ -2430,32 +2429,32 @@ class ta extends dt {
|
|
|
2430
2429
|
directions;
|
|
2431
2430
|
component;
|
|
2432
2431
|
constructor(e, n, r, i, s, a) {
|
|
2433
|
-
super(n, r, i, s, new
|
|
2432
|
+
super(n, r, i, s, new gn(e, r, i, s)), this.width = a.dimensions.width + a.dimensions.padding * 2, this.height = a.dimensions.height + a.dimensions.padding * 2, this.zoom = NaN, this.angle = NaN, this.directions = [], this.component = vn(Zr, {
|
|
2434
2433
|
target: this.marker.div,
|
|
2435
2434
|
props: a
|
|
2436
2435
|
});
|
|
2437
2436
|
}
|
|
2438
2437
|
get zIndex() {
|
|
2439
|
-
return Number.isNaN(this.zoom) ? this.rank : Math.round(-this.zoom *
|
|
2438
|
+
return Number.isNaN(this.zoom) ? this.rank : Math.round(-this.zoom * or) + zi;
|
|
2440
2439
|
}
|
|
2441
2440
|
}
|
|
2442
|
-
class
|
|
2441
|
+
class sa extends mt {
|
|
2443
2442
|
width;
|
|
2444
2443
|
height;
|
|
2445
2444
|
padding;
|
|
2446
2445
|
angle;
|
|
2447
2446
|
component;
|
|
2448
2447
|
constructor(e, n, r, i, s, a) {
|
|
2449
|
-
super(n, r, i, s, new
|
|
2448
|
+
super(n, r, i, s, new gn(e, r, i, Dn)), this.width = a.dimensions.width, this.height = a.dimensions.height, this.padding = a.dimensions.padding, this.angle = NaN, this.shown = !1, this.component = vn(Zr, {
|
|
2450
2449
|
target: this.marker.div,
|
|
2451
2450
|
props: a
|
|
2452
2451
|
});
|
|
2453
2452
|
}
|
|
2454
2453
|
get zIndex() {
|
|
2455
|
-
return
|
|
2454
|
+
return Dn;
|
|
2456
2455
|
}
|
|
2457
2456
|
}
|
|
2458
|
-
class
|
|
2457
|
+
class aa {
|
|
2459
2458
|
id;
|
|
2460
2459
|
state = void 0;
|
|
2461
2460
|
pin;
|
|
@@ -2463,21 +2462,21 @@ class ra {
|
|
|
2463
2462
|
popup;
|
|
2464
2463
|
constructor(e, n) {
|
|
2465
2464
|
const r = n.properites.id, i = n.properites.lat, s = n.properites.lng, a = n.properites.rank, u = n.properites.pin, o = n.properites.tooltip, l = n.properites.popup;
|
|
2466
|
-
this.id = r, this.pin = new
|
|
2465
|
+
this.id = r, this.pin = new na(e, r, i, s, a, u), this.tooltip = new ia(e, r, i, s, a, o), this.popup = l ? new sa(e, r, i, s, a, l) : void 0;
|
|
2467
2466
|
}
|
|
2468
2467
|
}
|
|
2469
|
-
const
|
|
2470
|
-
class
|
|
2468
|
+
const Jt = 4;
|
|
2469
|
+
class oa {
|
|
2471
2470
|
// Elements
|
|
2472
2471
|
pins = /* @__PURE__ */ new Set();
|
|
2473
2472
|
// Configuration
|
|
2474
2473
|
pinMaxWidth = 0;
|
|
2475
2474
|
pinMaxHeight = 0;
|
|
2476
2475
|
pinFade = !1;
|
|
2477
|
-
pinZoomMax =
|
|
2478
|
-
pinZoomDelta =
|
|
2476
|
+
pinZoomMax = Jt;
|
|
2477
|
+
pinZoomDelta = Jt;
|
|
2479
2478
|
set configuration(e) {
|
|
2480
|
-
this.pinFade = e?.pin?.fade ?? !0, this.pinZoomMax = e?.pin?.maxZoom ??
|
|
2479
|
+
this.pinFade = e?.pin?.fade ?? !0, this.pinZoomMax = e?.pin?.maxZoom ?? Jt, this.pinZoomDelta = this.pinZoomMax;
|
|
2481
2480
|
}
|
|
2482
2481
|
insert(e, n) {
|
|
2483
2482
|
this.update(e, n), this.pins.add(e);
|
|
@@ -2496,7 +2495,7 @@ class ia {
|
|
|
2496
2495
|
this.pinMaxWidth = e.reduce((n, r) => Math.max(n, r.width), 0), this.pinMaxHeight = e.reduce((n, r) => Math.max(n, r.height), 0), this.pinZoomDelta = Math.max(1, this.pinZoomMax - Math.log10(e.length));
|
|
2497
2496
|
}
|
|
2498
2497
|
render(e, n) {
|
|
2499
|
-
const r = e.zoom, i = n.mapSize, s =
|
|
2498
|
+
const r = e.zoom, i = n.mapSize, s = ut.offset(e, i, {
|
|
2500
2499
|
top: this.pinMaxHeight,
|
|
2501
2500
|
bottom: this.pinMaxHeight,
|
|
2502
2501
|
right: this.pinMaxWidth,
|
|
@@ -2506,8 +2505,8 @@ class ia {
|
|
|
2506
2505
|
s.contains(a.lat, a.lng) ? Number.isNaN(a.zoom) ? (a.component.invoke().setDisplayed(!0), a.component.invoke().setSuppressed(!0), a.component.invoke().setCollapsed(!1), a.marker.insert()) : (a.component.invoke().setSuppressed(!1), a.shown && r < a.zoom && a.zoom < r + this.pinZoomDelta ? (a.component.invoke().setDisplayed(!0), a.component.invoke().setCollapsed(!1), a.component.invoke().setScale(this.pinFade ? Math.max(0, 1 - (a.zoom - r) * 0.2) : 1), a.marker.insert()) : (a.component.invoke().setCollapsed(!0), a.component.invoke().getCollapsed() && (a.component.invoke().setDisplayed(!1), a.marker.remove()))) : (a.component.invoke().setDisplayed(!1), a.marker.remove());
|
|
2507
2506
|
}
|
|
2508
2507
|
}
|
|
2509
|
-
var
|
|
2510
|
-
class
|
|
2508
|
+
var la = (t) => 9;
|
|
2509
|
+
class ua {
|
|
2511
2510
|
// Elements
|
|
2512
2511
|
tooltips = /* @__PURE__ */ new Set();
|
|
2513
2512
|
// Configuration
|
|
@@ -2530,7 +2529,7 @@ class aa {
|
|
|
2530
2529
|
this.tooltipMaxWidth = e.reduce((n, r) => Math.max(n, r.width), 0), this.tooltipMaxHeight = e.reduce((n, r) => Math.max(n, r.height), 0);
|
|
2531
2530
|
}
|
|
2532
2531
|
render(e, n) {
|
|
2533
|
-
const r = e.zoom, i = n.mapSize, s =
|
|
2532
|
+
const r = e.zoom, i = n.mapSize, s = ut.offset(e, i, {
|
|
2534
2533
|
top: this.tooltipMaxHeight,
|
|
2535
2534
|
bottom: this.tooltipMaxHeight,
|
|
2536
2535
|
right: this.tooltipMaxWidth,
|
|
@@ -2548,7 +2547,7 @@ class aa {
|
|
|
2548
2547
|
a.component.invoke().setDisplayed(!1), a.marker.remove();
|
|
2549
2548
|
}
|
|
2550
2549
|
}
|
|
2551
|
-
class
|
|
2550
|
+
class ca {
|
|
2552
2551
|
// Elements
|
|
2553
2552
|
popups = /* @__PURE__ */ new Set();
|
|
2554
2553
|
// Configuration
|
|
@@ -2567,11 +2566,11 @@ class oa {
|
|
|
2567
2566
|
}
|
|
2568
2567
|
show(e, n) {
|
|
2569
2568
|
if (!e.popup || !e.tooltip || !e.pin || (e.pin.shown = !1, e.tooltip.shown = !1, e.popup.angle = e.tooltip.angle, e.popup.shown = !0, this.pan == !1)) return;
|
|
2570
|
-
const r = e.popup, i = n.getViewport(), s = i.bounds, a = i.zoom, o = n.getParameters().mapSize * Math.pow(2, a), l =
|
|
2571
|
-
let
|
|
2572
|
-
f < m ?
|
|
2573
|
-
let
|
|
2574
|
-
|
|
2569
|
+
const r = e.popup, i = n.getViewport(), s = i.bounds, a = i.zoom, o = n.getParameters().mapSize * Math.pow(2, a), l = at(s.ne.lat, s.sw.lng, o), c = at(s.sw.lat, s.ne.lng, o), f = c.x - l.x, p = c.y - l.y, m = r.width + r.padding * 8, h = r.height + r.padding * 8, v = at(r.lat, r.lng, o), b = an(m, h, e.tooltip.angle), C = v.x + b.x, J = C + m, oe = v.y + b.y, pe = oe + h, de = C - l.x, le = c.x - J, ye = oe - l.y, Te = c.y - pe;
|
|
2570
|
+
let X = 0;
|
|
2571
|
+
f < m ? X = (de - le) / 2 : (de < 0 && (X = de), le < 0 && (X = -le));
|
|
2572
|
+
let q = 0;
|
|
2573
|
+
p < h ? q = (ye - Te) / 2 : (ye < 0 && (q = ye), Te < 0 && (q = -Te)), (X != 0 || q != 0) && n.panBy(X, q);
|
|
2575
2574
|
}
|
|
2576
2575
|
hide(e) {
|
|
2577
2576
|
!e.popup || !e.tooltip || !e.pin || (e.pin.shown = !0, e.tooltip.shown = !0, e.popup.shown = !1);
|
|
@@ -2581,14 +2580,14 @@ class oa {
|
|
|
2581
2580
|
e.shown ? (e.component.invoke().setDisplayed(!0), e.component.invoke().setCollapsed(!1), e.component.invoke().setAngle(e.angle, !0), e.marker.insert()) : (e.component.invoke().setCollapsed(!0), e.component.invoke().getCollapsed() && (e.component.invoke().setDisplayed(!1), e.marker.remove()));
|
|
2582
2581
|
}
|
|
2583
2582
|
}
|
|
2584
|
-
class
|
|
2583
|
+
class fa {
|
|
2585
2584
|
provider;
|
|
2586
2585
|
pinManager;
|
|
2587
2586
|
tooltipManager;
|
|
2588
2587
|
popupManager;
|
|
2589
2588
|
elementsStore;
|
|
2590
2589
|
constructor(e) {
|
|
2591
|
-
this.provider = e, this.pinManager = new
|
|
2590
|
+
this.provider = e, this.pinManager = new oa(), this.tooltipManager = new ua(), this.popupManager = new ca(), this.elementsStore = /* @__PURE__ */ new Map();
|
|
2592
2591
|
}
|
|
2593
2592
|
set configuration(e) {
|
|
2594
2593
|
this.pinManager.configuration = e, this.popupManager.configuration = e;
|
|
@@ -2613,7 +2612,7 @@ class la {
|
|
|
2613
2612
|
insertElements(e, n) {
|
|
2614
2613
|
for (const r of e) {
|
|
2615
2614
|
let i = this.elementsStore.get(r.properites.id);
|
|
2616
|
-
i == null && (i = new
|
|
2615
|
+
i == null && (i = new aa(this.provider, r), i.tooltip.marker.div.addEventListener("click", (s) => n(s, r.properites.id)), this.elementsStore.set(r.properites.id, i)), this.pinManager.insert(i.pin, r.state), this.tooltipManager.insert(i.tooltip, r.state), i.popup != null && this.popupManager.insert(i.popup);
|
|
2617
2616
|
}
|
|
2618
2617
|
this.pinManager.refresh(), this.tooltipManager.refresh();
|
|
2619
2618
|
}
|
|
@@ -2638,11 +2637,11 @@ class la {
|
|
|
2638
2637
|
}
|
|
2639
2638
|
//#endregion
|
|
2640
2639
|
}
|
|
2641
|
-
const
|
|
2642
|
-
function
|
|
2640
|
+
const Yr = '(function(){"use strict";var h=[0,30,60,90,120,150,180,210,240,270,300,330],l=",";function i(e,t){return parseFloat(e[t]+e[t+1]+"."+e[t+2])}function f(e,t){return h[parseInt(e[t],16)]}function m(e){if(!e||e.length===0)return[];let t=[],n=e.split(l);for(let o=0;o<n.length;o++){let s=n[o],r=i(s,0),a=[];for(let c=3;c<s.length;c+=4){let v=i(s,c),T=f(s,c+3);a.push({zoom:v,angle:T})}t.push({zoom:r,directions:a})}return t}var d=e=>new Promise(t=>setTimeout(t,e));async function u(e,t){let n=0,o=Math.max(1,t?.retry?.times??1);for(;n<o;)try{return{data:await e(),error:null}}catch(s){if(n++,n==o){if(s instanceof Error)return(!t?.exceptions||t.exceptions.some(r=>s instanceof r)==!1)&&t?.catch?.(s),{data:null,error:s};throw t?.catch?.(s),s}else t?.retry?.delay&&await d(t.retry.delay)}throw Error("Unreachable code")}async function w(e,t,n,o,s){let r=await u(async()=>await fetch(e,{...n,method:"POST",body:t?JSON.stringify(t):void 0}),{retry:{times:o,delay:s}});if(r.error)throw r.error;let a=r.data;if(!a.ok)throw Error(await a.text());return await a.json()}const y="https://maps.api.arenarium.dev/states",p=3,E=500,S={async fetch(e){const n={headers:{"Cache-Control":self?.location.host.startsWith("localhost")||self?.location.host.startsWith("127.0.0.1")?"no-cache":""}},o=await w(y,e,n,p,E),s=m(o.states),r=o.jwt;return{states:s,jwt:r}}};class k{methods;constructor(t){this.methods=t}listen(){self.onmessage=this.onmessage.bind(this)}async onmessage(t){const{id:n,method:o,args:s}=t.data;try{const r=this.methods[o];if(typeof r!="function")throw new Error(`Unknown method: ${o}`);const a=await r(...s),c={id:n,result:a};self.postMessage(c)}catch(r){const a=r instanceof Error?r.message:String(r),c={id:n,error:a};self.postMessage(c)}}}new k(S).listen()})();\n', Gn = typeof self < "u" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);", Yr], { type: "text/javascript;charset=utf-8" });
|
|
2641
|
+
function ha(t) {
|
|
2643
2642
|
let e;
|
|
2644
2643
|
try {
|
|
2645
|
-
if (e =
|
|
2644
|
+
if (e = Gn && (self.URL || self.webkitURL).createObjectURL(Gn), !e) throw "";
|
|
2646
2645
|
const n = new Worker(e, {
|
|
2647
2646
|
name: t?.name
|
|
2648
2647
|
});
|
|
@@ -2651,15 +2650,15 @@ function ua(t) {
|
|
|
2651
2650
|
}), n;
|
|
2652
2651
|
} catch {
|
|
2653
2652
|
return new Worker(
|
|
2654
|
-
"data:text/javascript;charset=utf-8," + encodeURIComponent(
|
|
2653
|
+
"data:text/javascript;charset=utf-8," + encodeURIComponent(Yr),
|
|
2655
2654
|
{
|
|
2656
2655
|
name: t?.name
|
|
2657
2656
|
}
|
|
2658
2657
|
);
|
|
2659
2658
|
}
|
|
2660
2659
|
}
|
|
2661
|
-
var
|
|
2662
|
-
async function
|
|
2660
|
+
var pa = (t) => new Promise((e) => setTimeout(e, t));
|
|
2661
|
+
async function Jr(t, e) {
|
|
2663
2662
|
let n = 0, r = Math.max(1, e?.retry?.times ?? 1);
|
|
2664
2663
|
for (; n < r; ) try {
|
|
2665
2664
|
return { data: await t(), error: null };
|
|
@@ -2668,146 +2667,146 @@ async function Yr(t, e) {
|
|
|
2668
2667
|
if (i instanceof Error)
|
|
2669
2668
|
return (!e?.exceptions || e.exceptions.some((s) => i instanceof s) == !1) && e?.catch?.(i), { data: null, error: i };
|
|
2670
2669
|
throw e?.catch?.(i), i;
|
|
2671
|
-
} else e?.retry?.delay && await
|
|
2670
|
+
} else e?.retry?.delay && await pa(e.retry.delay);
|
|
2672
2671
|
}
|
|
2673
2672
|
throw Error("Unreachable code");
|
|
2674
2673
|
}
|
|
2675
|
-
async function
|
|
2676
|
-
let s = await
|
|
2674
|
+
async function da(t, e, n, r, i) {
|
|
2675
|
+
let s = await Jr(async () => await fetch(t, { ...n, method: "POST", body: e ? JSON.stringify(e) : void 0 }), { retry: { times: r, delay: i } });
|
|
2677
2676
|
if (s.error) throw s.error;
|
|
2678
2677
|
let a = s.data;
|
|
2679
2678
|
if (!a.ok) throw Error(await a.text());
|
|
2680
2679
|
return await a.json();
|
|
2681
2680
|
}
|
|
2682
|
-
async function
|
|
2683
|
-
let s = await
|
|
2681
|
+
async function ma(t, e, n, r, i) {
|
|
2682
|
+
let s = await Jr(async () => await fetch(t, { ...n, method: "PUT", body: e ? JSON.stringify(e) : void 0 }), { retry: { times: r, delay: i } });
|
|
2684
2683
|
if (s.error) throw s.error;
|
|
2685
2684
|
let a = s.data;
|
|
2686
2685
|
if (!a.ok) throw Error(await a.text());
|
|
2687
2686
|
}
|
|
2688
|
-
const Be = 0xc3a5c85c97cb3127n,
|
|
2689
|
-
function
|
|
2690
|
-
return t &
|
|
2687
|
+
const Be = 0xc3a5c85c97cb3127n, ue = 0xb492b66fbe98f273n, He = 0x9ae16a3b2f90404fn, Xr = 0xc949d7c7509e6557n, W = 0xffffffffffffffffn;
|
|
2688
|
+
function d(t) {
|
|
2689
|
+
return t & W;
|
|
2691
2690
|
}
|
|
2692
|
-
function
|
|
2693
|
-
return e === 0 ? t &
|
|
2691
|
+
function A(t, e) {
|
|
2692
|
+
return e === 0 ? t & W : (t = t & W, (t >> BigInt(e) | t << BigInt(64 - e)) & W);
|
|
2694
2693
|
}
|
|
2695
|
-
function
|
|
2696
|
-
return t = t &
|
|
2694
|
+
function va(t, e) {
|
|
2695
|
+
return t = t & W, (t >> BigInt(e) | t << BigInt(64 - e)) & W;
|
|
2697
2696
|
}
|
|
2698
|
-
function
|
|
2699
|
-
return
|
|
2697
|
+
function ft(t) {
|
|
2698
|
+
return d(t ^ t >> 47n);
|
|
2700
2699
|
}
|
|
2701
2700
|
function M(t, e = 0) {
|
|
2702
2701
|
let n = 0n;
|
|
2703
2702
|
for (let r = 0; r < 8; r++)
|
|
2704
2703
|
e + r < t.length && (n |= BigInt(t[e + r]) << BigInt(r * 8));
|
|
2705
|
-
return n &
|
|
2704
|
+
return n & W;
|
|
2706
2705
|
}
|
|
2707
|
-
function
|
|
2706
|
+
function Qn(t, e = 0) {
|
|
2708
2707
|
let n = 0n;
|
|
2709
2708
|
for (let r = 0; r < 4; r++)
|
|
2710
2709
|
e + r < t.length && (n |= BigInt(t[e + r]) << BigInt(r * 8));
|
|
2711
2710
|
return n & 0xffffffffn;
|
|
2712
2711
|
}
|
|
2713
|
-
function
|
|
2712
|
+
function ga(t) {
|
|
2714
2713
|
const e = 0x9ddfea08eb382d69n;
|
|
2715
|
-
let n = (t.first ^ t.second) * e &
|
|
2716
|
-
n ^= n >> 47n, n = n &
|
|
2717
|
-
let r = (t.second ^ n) * e &
|
|
2718
|
-
return r ^= r >> 47n, r = r * e &
|
|
2714
|
+
let n = (t.first ^ t.second) * e & W;
|
|
2715
|
+
n ^= n >> 47n, n = n & W;
|
|
2716
|
+
let r = (t.second ^ n) * e & W;
|
|
2717
|
+
return r ^= r >> 47n, r = r * e & W, r;
|
|
2719
2718
|
}
|
|
2720
2719
|
function qe(t, e) {
|
|
2721
|
-
return
|
|
2720
|
+
return ga({ first: t, second: e });
|
|
2722
2721
|
}
|
|
2723
|
-
function
|
|
2722
|
+
function wa(t) {
|
|
2724
2723
|
const e = t.length;
|
|
2725
2724
|
if (e > 8) {
|
|
2726
2725
|
const n = M(t), r = M(t, e - 8);
|
|
2727
|
-
return (qe(n,
|
|
2726
|
+
return (qe(n, va(r + BigInt(e) & W, e)) ^ r) & W;
|
|
2728
2727
|
}
|
|
2729
2728
|
if (e >= 4) {
|
|
2730
|
-
const n =
|
|
2731
|
-
return qe(BigInt(e) + (n << 3n) &
|
|
2729
|
+
const n = Qn(t);
|
|
2730
|
+
return qe(BigInt(e) + (n << 3n) & W, Qn(t, e - 4));
|
|
2732
2731
|
}
|
|
2733
2732
|
if (e > 0) {
|
|
2734
|
-
const n = BigInt(t[0]), r = BigInt(t[e >> 1]), i = BigInt(t[e - 1]), s =
|
|
2735
|
-
return
|
|
2733
|
+
const n = BigInt(t[0]), r = BigInt(t[e >> 1]), i = BigInt(t[e - 1]), s = d(n + (r << 8n)), a = d(BigInt(e) + (i << 2n));
|
|
2734
|
+
return d(ft(d(s * He) ^ d(a * Xr)) * He);
|
|
2736
2735
|
}
|
|
2737
2736
|
return He;
|
|
2738
2737
|
}
|
|
2739
|
-
function
|
|
2740
|
-
const e = t.length, n =
|
|
2741
|
-
return qe(
|
|
2738
|
+
function ka(t) {
|
|
2739
|
+
const e = t.length, n = d(M(t) * ue), r = M(t, 8), i = d(M(t, e - 8) * He), s = d(M(t, e - 16) * Be);
|
|
2740
|
+
return qe(d(A(d(n - r), 43) + A(i, 30) + s), d(n + A(r ^ Xr, 20) - i + BigInt(e)));
|
|
2742
2741
|
}
|
|
2743
|
-
function
|
|
2744
|
-
i =
|
|
2742
|
+
function ya(t, e, n, r, i, s) {
|
|
2743
|
+
i = d(i + t), s = A(d(s + i + r), 21);
|
|
2745
2744
|
const a = i;
|
|
2746
|
-
return i =
|
|
2745
|
+
return i = d(i + e), i = d(i + n), s = d(s + A(i, 44)), { first: d(i + r), second: d(s + a) };
|
|
2747
2746
|
}
|
|
2748
|
-
function
|
|
2749
|
-
return
|
|
2747
|
+
function St(t, e, n, r) {
|
|
2748
|
+
return ya(M(t, e), M(t, e + 8), M(t, e + 16), M(t, e + 24), n, r);
|
|
2750
2749
|
}
|
|
2751
|
-
function
|
|
2750
|
+
function ba(t) {
|
|
2752
2751
|
const e = t.length, n = M(t, 24);
|
|
2753
|
-
let r =
|
|
2754
|
-
r =
|
|
2755
|
-
const a =
|
|
2756
|
-
r =
|
|
2752
|
+
let r = d(M(t) + d((BigInt(e) + M(t, e - 16)) * Be)), i = A(d(r + n), 52), s = A(r, 37);
|
|
2753
|
+
r = d(r + M(t, 8)), s = d(s + A(r, 7)), r = d(r + M(t, 16));
|
|
2754
|
+
const a = d(r + n), u = d(i + A(r, 31) + s);
|
|
2755
|
+
r = d(M(t, 16) + M(t, e - 32));
|
|
2757
2756
|
const o = M(t, e - 8);
|
|
2758
|
-
i =
|
|
2759
|
-
const l =
|
|
2760
|
-
return
|
|
2757
|
+
i = A(d(r + o), 52), s = A(r, 37), r = d(r + M(t, e - 24)), s = d(s + A(r, 7)), r = d(r + M(t, e - 16));
|
|
2758
|
+
const l = d(r + o), c = d(i + A(r, 31) + s), f = ft(d(d(a + c) * He + d(l + u) * Be));
|
|
2759
|
+
return d(ft(d(f * Be + u)) * He);
|
|
2761
2760
|
}
|
|
2762
|
-
function
|
|
2761
|
+
function _a(t) {
|
|
2763
2762
|
let e;
|
|
2764
2763
|
typeof t == "string" ? e = new TextEncoder().encode(t) : e = t;
|
|
2765
2764
|
const n = e.length;
|
|
2766
2765
|
if (n <= 32)
|
|
2767
|
-
return n <= 16 ?
|
|
2766
|
+
return n <= 16 ? wa(e) : ka(e);
|
|
2768
2767
|
if (n <= 64)
|
|
2769
|
-
return
|
|
2770
|
-
let r = M(e), i =
|
|
2771
|
-
s =
|
|
2768
|
+
return ba(e);
|
|
2769
|
+
let r = M(e), i = d(M(e, n - 16) ^ ue), s = d(M(e, n - 56) ^ Be), a = St(e, n - 64, BigInt(n), i), u = St(e, n - 32, d(BigInt(n) * ue), Be);
|
|
2770
|
+
s = d(s + ft(a.second) * ue), r = d(A(d(s + r), 39) * ue), i = d(A(i, 33) * ue);
|
|
2772
2771
|
let o = n - 1 & -64, l = 0;
|
|
2773
2772
|
for (; o > 0; )
|
|
2774
|
-
r =
|
|
2775
|
-
return qe(qe(a.first, u.first) +
|
|
2773
|
+
r = d(A(d(r + i + a.first + M(e, l + 16)), 37) * ue), i = d(A(d(i + a.second + M(e, l + 48)), 42) * ue), r ^= u.second, i ^= a.first, s = A(s ^ u.first, 33), a = St(e, l, d(a.second * ue), d(r + u.first)), u = St(e, l + 32, d(s + u.second), i), [s, r] = [r, s], l += 64, o -= 64;
|
|
2774
|
+
return qe(qe(a.first, u.first) + d(ft(i) * ue) + s, qe(a.second, u.second) + r);
|
|
2776
2775
|
}
|
|
2777
|
-
function
|
|
2778
|
-
return
|
|
2776
|
+
function Ma(t) {
|
|
2777
|
+
return _a(JSON.stringify(t)).toString();
|
|
2779
2778
|
}
|
|
2780
|
-
let
|
|
2779
|
+
let Xt;
|
|
2781
2780
|
// @__NO_SIDE_EFFECTS__
|
|
2782
|
-
function
|
|
2781
|
+
function Kr(t) {
|
|
2783
2782
|
return {
|
|
2784
|
-
lang:
|
|
2783
|
+
lang: Xt?.lang,
|
|
2785
2784
|
message: t?.message,
|
|
2786
|
-
abortEarly:
|
|
2787
|
-
abortPipeEarly:
|
|
2785
|
+
abortEarly: Xt?.abortEarly,
|
|
2786
|
+
abortPipeEarly: Xt?.abortPipeEarly
|
|
2788
2787
|
};
|
|
2789
2788
|
}
|
|
2790
|
-
let
|
|
2789
|
+
let Ea;
|
|
2791
2790
|
// @__NO_SIDE_EFFECTS__
|
|
2792
|
-
function
|
|
2793
|
-
return
|
|
2791
|
+
function xa(t) {
|
|
2792
|
+
return Ea?.get(t);
|
|
2794
2793
|
}
|
|
2795
|
-
let
|
|
2794
|
+
let Sa;
|
|
2796
2795
|
// @__NO_SIDE_EFFECTS__
|
|
2797
|
-
function
|
|
2798
|
-
return
|
|
2796
|
+
function Pa(t) {
|
|
2797
|
+
return Sa?.get(t);
|
|
2799
2798
|
}
|
|
2800
|
-
let
|
|
2799
|
+
let Ta;
|
|
2801
2800
|
// @__NO_SIDE_EFFECTS__
|
|
2802
|
-
function
|
|
2803
|
-
return
|
|
2801
|
+
function Ia(t, e) {
|
|
2802
|
+
return Ta?.get(t)?.get(e);
|
|
2804
2803
|
}
|
|
2805
2804
|
// @__NO_SIDE_EFFECTS__
|
|
2806
2805
|
function Qe(t) {
|
|
2807
2806
|
const e = typeof t;
|
|
2808
2807
|
return e === "string" ? `"${t}"` : e === "number" || e === "bigint" || e === "boolean" ? `${t}` : e === "object" || e === "function" ? (t && Object.getPrototypeOf(t)?.constructor?.name) ?? "null" : e;
|
|
2809
2808
|
}
|
|
2810
|
-
function
|
|
2809
|
+
function N(t, e, n, r, i) {
|
|
2811
2810
|
const s = i && "input" in i ? i.input : n.value, a = i?.expected ?? t.expects ?? null, u = i?.received ?? /* @__PURE__ */ Qe(s), o = {
|
|
2812
2811
|
kind: t.kind,
|
|
2813
2812
|
type: t.type,
|
|
@@ -2821,25 +2820,25 @@ function C(t, e, n, r, i) {
|
|
|
2821
2820
|
lang: r.lang,
|
|
2822
2821
|
abortEarly: r.abortEarly,
|
|
2823
2822
|
abortPipeEarly: r.abortPipeEarly
|
|
2824
|
-
}, l = t.kind === "schema", c = i?.message ?? t.message ?? /* @__PURE__ */
|
|
2823
|
+
}, l = t.kind === "schema", c = i?.message ?? t.message ?? /* @__PURE__ */ Ia(t.reference, o.lang) ?? (l ? /* @__PURE__ */ Pa(o.lang) : null) ?? r.message ?? /* @__PURE__ */ xa(o.lang);
|
|
2825
2824
|
c !== void 0 && (o.message = typeof c == "function" ? c(o) : c), l && (n.typed = !1), n.issues ? n.issues.push(o) : n.issues = [o];
|
|
2826
2825
|
}
|
|
2827
2826
|
// @__NO_SIDE_EFFECTS__
|
|
2828
|
-
function
|
|
2827
|
+
function Y(t) {
|
|
2829
2828
|
return {
|
|
2830
2829
|
version: 1,
|
|
2831
2830
|
vendor: "valibot",
|
|
2832
2831
|
validate(e) {
|
|
2833
|
-
return t["~run"]({ value: e }, /* @__PURE__ */
|
|
2832
|
+
return t["~run"]({ value: e }, /* @__PURE__ */ Kr());
|
|
2834
2833
|
}
|
|
2835
2834
|
};
|
|
2836
2835
|
}
|
|
2837
2836
|
// @__NO_SIDE_EFFECTS__
|
|
2838
|
-
function
|
|
2837
|
+
function Aa(t, e) {
|
|
2839
2838
|
const n = [...new Set(t)];
|
|
2840
2839
|
return n.length > 1 ? `(${n.join(` ${e} `)})` : n[0] ?? "never";
|
|
2841
2840
|
}
|
|
2842
|
-
var
|
|
2841
|
+
var wn = class extends Error {
|
|
2843
2842
|
/**
|
|
2844
2843
|
* Creates a Valibot error with useful information.
|
|
2845
2844
|
*
|
|
@@ -2850,136 +2849,136 @@ var vn = class extends Error {
|
|
|
2850
2849
|
}
|
|
2851
2850
|
};
|
|
2852
2851
|
// @__NO_SIDE_EFFECTS__
|
|
2853
|
-
function
|
|
2852
|
+
function O(t) {
|
|
2854
2853
|
return {
|
|
2855
2854
|
kind: "transformation",
|
|
2856
2855
|
type: "args",
|
|
2857
|
-
reference:
|
|
2856
|
+
reference: O,
|
|
2858
2857
|
async: !1,
|
|
2859
2858
|
schema: t,
|
|
2860
2859
|
"~run"(e, n) {
|
|
2861
2860
|
const r = e.value;
|
|
2862
2861
|
return e.value = (...i) => {
|
|
2863
2862
|
const s = this.schema["~run"]({ value: i }, n);
|
|
2864
|
-
if (s.issues) throw new
|
|
2863
|
+
if (s.issues) throw new wn(s.issues);
|
|
2865
2864
|
return r(...s.value);
|
|
2866
2865
|
}, e;
|
|
2867
2866
|
}
|
|
2868
2867
|
};
|
|
2869
2868
|
}
|
|
2870
2869
|
// @__NO_SIDE_EFFECTS__
|
|
2871
|
-
function
|
|
2870
|
+
function Gr(t, e) {
|
|
2872
2871
|
return {
|
|
2873
2872
|
kind: "validation",
|
|
2874
2873
|
type: "check",
|
|
2875
|
-
reference:
|
|
2874
|
+
reference: Gr,
|
|
2876
2875
|
async: !1,
|
|
2877
2876
|
expects: null,
|
|
2878
2877
|
requirement: t,
|
|
2879
2878
|
message: e,
|
|
2880
2879
|
"~run"(n, r) {
|
|
2881
|
-
return n.typed && !this.requirement(n.value) &&
|
|
2880
|
+
return n.typed && !this.requirement(n.value) && N(this, "input", n, r), n;
|
|
2882
2881
|
}
|
|
2883
2882
|
};
|
|
2884
2883
|
}
|
|
2885
2884
|
// @__NO_SIDE_EFFECTS__
|
|
2886
|
-
function
|
|
2885
|
+
function Qr(t, e) {
|
|
2887
2886
|
return {
|
|
2888
2887
|
kind: "validation",
|
|
2889
2888
|
type: "length",
|
|
2890
|
-
reference:
|
|
2889
|
+
reference: Qr,
|
|
2891
2890
|
async: !1,
|
|
2892
2891
|
expects: `${t}`,
|
|
2893
2892
|
requirement: t,
|
|
2894
2893
|
message: e,
|
|
2895
2894
|
"~run"(n, r) {
|
|
2896
|
-
return n.typed && n.value.length !== this.requirement &&
|
|
2895
|
+
return n.typed && n.value.length !== this.requirement && N(this, "length", n, r, { received: `${n.value.length}` }), n;
|
|
2897
2896
|
}
|
|
2898
2897
|
};
|
|
2899
2898
|
}
|
|
2900
2899
|
// @__NO_SIDE_EFFECTS__
|
|
2901
|
-
function
|
|
2900
|
+
function ht(t, e) {
|
|
2902
2901
|
return {
|
|
2903
2902
|
kind: "validation",
|
|
2904
2903
|
type: "max_value",
|
|
2905
|
-
reference:
|
|
2904
|
+
reference: ht,
|
|
2906
2905
|
async: !1,
|
|
2907
2906
|
expects: `<=${t instanceof Date ? t.toJSON() : /* @__PURE__ */ Qe(t)}`,
|
|
2908
2907
|
requirement: t,
|
|
2909
2908
|
message: e,
|
|
2910
2909
|
"~run"(n, r) {
|
|
2911
|
-
return n.typed && !(n.value <= this.requirement) &&
|
|
2910
|
+
return n.typed && !(n.value <= this.requirement) && N(this, "value", n, r, { received: n.value instanceof Date ? n.value.toJSON() : /* @__PURE__ */ Qe(n.value) }), n;
|
|
2912
2911
|
}
|
|
2913
2912
|
};
|
|
2914
2913
|
}
|
|
2915
2914
|
// @__NO_SIDE_EFFECTS__
|
|
2916
|
-
function
|
|
2915
|
+
function kn(t, e) {
|
|
2917
2916
|
return {
|
|
2918
2917
|
kind: "validation",
|
|
2919
2918
|
type: "min_length",
|
|
2920
|
-
reference:
|
|
2919
|
+
reference: kn,
|
|
2921
2920
|
async: !1,
|
|
2922
2921
|
expects: `>=${t}`,
|
|
2923
2922
|
requirement: t,
|
|
2924
2923
|
message: e,
|
|
2925
2924
|
"~run"(n, r) {
|
|
2926
|
-
return n.typed && n.value.length < this.requirement &&
|
|
2925
|
+
return n.typed && n.value.length < this.requirement && N(this, "length", n, r, { received: `${n.value.length}` }), n;
|
|
2927
2926
|
}
|
|
2928
2927
|
};
|
|
2929
2928
|
}
|
|
2930
2929
|
// @__NO_SIDE_EFFECTS__
|
|
2931
|
-
function
|
|
2930
|
+
function H(t, e) {
|
|
2932
2931
|
return {
|
|
2933
2932
|
kind: "validation",
|
|
2934
2933
|
type: "min_value",
|
|
2935
|
-
reference:
|
|
2934
|
+
reference: H,
|
|
2936
2935
|
async: !1,
|
|
2937
2936
|
expects: `>=${t instanceof Date ? t.toJSON() : /* @__PURE__ */ Qe(t)}`,
|
|
2938
2937
|
requirement: t,
|
|
2939
2938
|
message: e,
|
|
2940
2939
|
"~run"(n, r) {
|
|
2941
|
-
return n.typed && !(n.value >= this.requirement) &&
|
|
2940
|
+
return n.typed && !(n.value >= this.requirement) && N(this, "value", n, r, { received: n.value instanceof Date ? n.value.toJSON() : /* @__PURE__ */ Qe(n.value) }), n;
|
|
2942
2941
|
}
|
|
2943
2942
|
};
|
|
2944
2943
|
}
|
|
2945
2944
|
// @__NO_SIDE_EFFECTS__
|
|
2946
|
-
function
|
|
2945
|
+
function $(t) {
|
|
2947
2946
|
return {
|
|
2948
2947
|
kind: "transformation",
|
|
2949
2948
|
type: "returns",
|
|
2950
|
-
reference:
|
|
2949
|
+
reference: $,
|
|
2951
2950
|
async: !1,
|
|
2952
2951
|
schema: t,
|
|
2953
2952
|
"~run"(e, n) {
|
|
2954
2953
|
const r = e.value;
|
|
2955
2954
|
return e.value = (...i) => {
|
|
2956
2955
|
const s = this.schema["~run"]({ value: r(...i) }, n);
|
|
2957
|
-
if (s.issues) throw new
|
|
2956
|
+
if (s.issues) throw new wn(s.issues);
|
|
2958
2957
|
return s.value;
|
|
2959
2958
|
}, e;
|
|
2960
2959
|
}
|
|
2961
2960
|
};
|
|
2962
2961
|
}
|
|
2963
2962
|
// @__NO_SIDE_EFFECTS__
|
|
2964
|
-
function
|
|
2963
|
+
function Na(t, e, n) {
|
|
2965
2964
|
return typeof t.fallback == "function" ? t.fallback(e, n) : t.fallback;
|
|
2966
2965
|
}
|
|
2967
2966
|
// @__NO_SIDE_EFFECTS__
|
|
2968
|
-
function
|
|
2967
|
+
function ei(t, e, n) {
|
|
2969
2968
|
return typeof t.default == "function" ? t.default(e, n) : t.default;
|
|
2970
2969
|
}
|
|
2971
2970
|
// @__NO_SIDE_EFFECTS__
|
|
2972
|
-
function
|
|
2971
|
+
function ti(t, e) {
|
|
2973
2972
|
return {
|
|
2974
2973
|
kind: "schema",
|
|
2975
2974
|
type: "array",
|
|
2976
|
-
reference:
|
|
2975
|
+
reference: ti,
|
|
2977
2976
|
expects: "Array",
|
|
2978
2977
|
async: !1,
|
|
2979
2978
|
item: t,
|
|
2980
2979
|
message: e,
|
|
2981
2980
|
get "~standard"() {
|
|
2982
|
-
return /* @__PURE__ */
|
|
2981
|
+
return /* @__PURE__ */ Y(this);
|
|
2983
2982
|
},
|
|
2984
2983
|
"~run"(n, r) {
|
|
2985
2984
|
const i = n.value;
|
|
@@ -3004,60 +3003,60 @@ function ei(t, e) {
|
|
|
3004
3003
|
}
|
|
3005
3004
|
u.typed || (n.typed = !1), n.value.push(u.value);
|
|
3006
3005
|
}
|
|
3007
|
-
} else
|
|
3006
|
+
} else N(this, "type", n, r);
|
|
3008
3007
|
return n;
|
|
3009
3008
|
}
|
|
3010
3009
|
};
|
|
3011
3010
|
}
|
|
3012
3011
|
// @__NO_SIDE_EFFECTS__
|
|
3013
|
-
function
|
|
3012
|
+
function ni(t) {
|
|
3014
3013
|
return {
|
|
3015
3014
|
kind: "schema",
|
|
3016
3015
|
type: "boolean",
|
|
3017
|
-
reference:
|
|
3016
|
+
reference: ni,
|
|
3018
3017
|
expects: "boolean",
|
|
3019
3018
|
async: !1,
|
|
3020
3019
|
message: t,
|
|
3021
3020
|
get "~standard"() {
|
|
3022
|
-
return /* @__PURE__ */
|
|
3021
|
+
return /* @__PURE__ */ Y(this);
|
|
3023
3022
|
},
|
|
3024
3023
|
"~run"(e, n) {
|
|
3025
|
-
return typeof e.value == "boolean" ? e.typed = !0 :
|
|
3024
|
+
return typeof e.value == "boolean" ? e.typed = !0 : N(this, "type", e, n), e;
|
|
3026
3025
|
}
|
|
3027
3026
|
};
|
|
3028
3027
|
}
|
|
3029
3028
|
// @__NO_SIDE_EFFECTS__
|
|
3030
|
-
function
|
|
3029
|
+
function ri(t, e) {
|
|
3031
3030
|
return {
|
|
3032
3031
|
kind: "schema",
|
|
3033
3032
|
type: "custom",
|
|
3034
|
-
reference:
|
|
3033
|
+
reference: ri,
|
|
3035
3034
|
expects: "unknown",
|
|
3036
3035
|
async: !1,
|
|
3037
3036
|
check: t,
|
|
3038
3037
|
message: e,
|
|
3039
3038
|
get "~standard"() {
|
|
3040
|
-
return /* @__PURE__ */
|
|
3039
|
+
return /* @__PURE__ */ Y(this);
|
|
3041
3040
|
},
|
|
3042
3041
|
"~run"(n, r) {
|
|
3043
|
-
return this.check(n.value) ? n.typed = !0 :
|
|
3042
|
+
return this.check(n.value) ? n.typed = !0 : N(this, "type", n, r), n;
|
|
3044
3043
|
}
|
|
3045
3044
|
};
|
|
3046
3045
|
}
|
|
3047
3046
|
// @__NO_SIDE_EFFECTS__
|
|
3048
|
-
function
|
|
3047
|
+
function I(t) {
|
|
3049
3048
|
return {
|
|
3050
3049
|
kind: "schema",
|
|
3051
3050
|
type: "function",
|
|
3052
|
-
reference:
|
|
3051
|
+
reference: I,
|
|
3053
3052
|
expects: "Function",
|
|
3054
3053
|
async: !1,
|
|
3055
3054
|
message: t,
|
|
3056
3055
|
get "~standard"() {
|
|
3057
|
-
return /* @__PURE__ */
|
|
3056
|
+
return /* @__PURE__ */ Y(this);
|
|
3058
3057
|
},
|
|
3059
3058
|
"~run"(e, n) {
|
|
3060
|
-
return typeof e.value == "function" ? e.typed = !0 :
|
|
3059
|
+
return typeof e.value == "function" ? e.typed = !0 : N(this, "type", e, n), e;
|
|
3061
3060
|
}
|
|
3062
3061
|
};
|
|
3063
3062
|
}
|
|
@@ -3072,10 +3071,10 @@ function ze(t, e) {
|
|
|
3072
3071
|
literal: t,
|
|
3073
3072
|
message: e,
|
|
3074
3073
|
get "~standard"() {
|
|
3075
|
-
return /* @__PURE__ */
|
|
3074
|
+
return /* @__PURE__ */ Y(this);
|
|
3076
3075
|
},
|
|
3077
3076
|
"~run"(n, r) {
|
|
3078
|
-
return n.value === this.literal ? n.typed = !0 :
|
|
3077
|
+
return n.value === this.literal ? n.typed = !0 : N(this, "type", n, r), n;
|
|
3079
3078
|
}
|
|
3080
3079
|
};
|
|
3081
3080
|
}
|
|
@@ -3089,25 +3088,25 @@ function P(t) {
|
|
|
3089
3088
|
async: !1,
|
|
3090
3089
|
message: t,
|
|
3091
3090
|
get "~standard"() {
|
|
3092
|
-
return /* @__PURE__ */
|
|
3091
|
+
return /* @__PURE__ */ Y(this);
|
|
3093
3092
|
},
|
|
3094
3093
|
"~run"(e, n) {
|
|
3095
|
-
return typeof e.value == "number" && !isNaN(e.value) ? e.typed = !0 :
|
|
3094
|
+
return typeof e.value == "number" && !isNaN(e.value) ? e.typed = !0 : N(this, "type", e, n), e;
|
|
3096
3095
|
}
|
|
3097
3096
|
};
|
|
3098
3097
|
}
|
|
3099
3098
|
// @__NO_SIDE_EFFECTS__
|
|
3100
|
-
function
|
|
3099
|
+
function B(t, e) {
|
|
3101
3100
|
return {
|
|
3102
3101
|
kind: "schema",
|
|
3103
3102
|
type: "object",
|
|
3104
|
-
reference:
|
|
3103
|
+
reference: B,
|
|
3105
3104
|
expects: "Object",
|
|
3106
3105
|
async: !1,
|
|
3107
3106
|
entries: t,
|
|
3108
3107
|
message: e,
|
|
3109
3108
|
get "~standard"() {
|
|
3110
|
-
return /* @__PURE__ */
|
|
3109
|
+
return /* @__PURE__ */ Y(this);
|
|
3111
3110
|
},
|
|
3112
3111
|
"~run"(n, r) {
|
|
3113
3112
|
const i = n.value;
|
|
@@ -3116,7 +3115,7 @@ function q(t, e) {
|
|
|
3116
3115
|
for (const s in this.entries) {
|
|
3117
3116
|
const a = this.entries[s];
|
|
3118
3117
|
if (s in i || (a.type === "exact_optional" || a.type === "optional" || a.type === "nullish") && a.default !== void 0) {
|
|
3119
|
-
const u = s in i ? i[s] : /* @__PURE__ */
|
|
3118
|
+
const u = s in i ? i[s] : /* @__PURE__ */ ei(a), o = a["~run"]({ value: u }, r);
|
|
3120
3119
|
if (o.issues) {
|
|
3121
3120
|
const l = {
|
|
3122
3121
|
type: "object",
|
|
@@ -3133,8 +3132,8 @@ function q(t, e) {
|
|
|
3133
3132
|
}
|
|
3134
3133
|
}
|
|
3135
3134
|
o.typed || (n.typed = !1), n.value[s] = o.value;
|
|
3136
|
-
} else if (a.fallback !== void 0) n.value[s] = /* @__PURE__ */
|
|
3137
|
-
else if (a.type !== "exact_optional" && a.type !== "optional" && a.type !== "nullish" && (
|
|
3135
|
+
} else if (a.fallback !== void 0) n.value[s] = /* @__PURE__ */ Na(a);
|
|
3136
|
+
else if (a.type !== "exact_optional" && a.type !== "optional" && a.type !== "nullish" && (N(this, "key", n, r, {
|
|
3138
3137
|
input: void 0,
|
|
3139
3138
|
expected: `"${s}"`,
|
|
3140
3139
|
path: [{
|
|
@@ -3147,7 +3146,7 @@ function q(t, e) {
|
|
|
3147
3146
|
}), r.abortEarly))
|
|
3148
3147
|
break;
|
|
3149
3148
|
}
|
|
3150
|
-
} else
|
|
3149
|
+
} else N(this, "type", n, r);
|
|
3151
3150
|
return n;
|
|
3152
3151
|
}
|
|
3153
3152
|
};
|
|
@@ -3163,10 +3162,10 @@ function T(t, e) {
|
|
|
3163
3162
|
wrapped: t,
|
|
3164
3163
|
default: e,
|
|
3165
3164
|
get "~standard"() {
|
|
3166
|
-
return /* @__PURE__ */
|
|
3165
|
+
return /* @__PURE__ */ Y(this);
|
|
3167
3166
|
},
|
|
3168
3167
|
"~run"(n, r) {
|
|
3169
|
-
return n.value === void 0 && (this.default !== void 0 && (n.value = /* @__PURE__ */
|
|
3168
|
+
return n.value === void 0 && (this.default !== void 0 && (n.value = /* @__PURE__ */ ei(this, n, r)), n.value === void 0) ? (n.typed = !0, n) : this.wrapped["~run"](n, r);
|
|
3170
3169
|
}
|
|
3171
3170
|
};
|
|
3172
3171
|
}
|
|
@@ -3180,25 +3179,25 @@ function ge(t) {
|
|
|
3180
3179
|
async: !1,
|
|
3181
3180
|
message: t,
|
|
3182
3181
|
get "~standard"() {
|
|
3183
|
-
return /* @__PURE__ */
|
|
3182
|
+
return /* @__PURE__ */ Y(this);
|
|
3184
3183
|
},
|
|
3185
3184
|
"~run"(e, n) {
|
|
3186
|
-
return typeof e.value == "string" ? e.typed = !0 :
|
|
3185
|
+
return typeof e.value == "string" ? e.typed = !0 : N(this, "type", e, n), e;
|
|
3187
3186
|
}
|
|
3188
3187
|
};
|
|
3189
3188
|
}
|
|
3190
3189
|
// @__NO_SIDE_EFFECTS__
|
|
3191
|
-
function
|
|
3190
|
+
function L(t, e) {
|
|
3192
3191
|
return {
|
|
3193
3192
|
kind: "schema",
|
|
3194
3193
|
type: "tuple",
|
|
3195
|
-
reference:
|
|
3194
|
+
reference: L,
|
|
3196
3195
|
expects: "Array",
|
|
3197
3196
|
async: !1,
|
|
3198
3197
|
items: t,
|
|
3199
3198
|
message: e,
|
|
3200
3199
|
get "~standard"() {
|
|
3201
|
-
return /* @__PURE__ */
|
|
3200
|
+
return /* @__PURE__ */ Y(this);
|
|
3202
3201
|
},
|
|
3203
3202
|
"~run"(n, r) {
|
|
3204
3203
|
const i = n.value;
|
|
@@ -3223,29 +3222,29 @@ function F(t, e) {
|
|
|
3223
3222
|
}
|
|
3224
3223
|
u.typed || (n.typed = !1), n.value.push(u.value);
|
|
3225
3224
|
}
|
|
3226
|
-
} else
|
|
3225
|
+
} else N(this, "type", n, r);
|
|
3227
3226
|
return n;
|
|
3228
3227
|
}
|
|
3229
3228
|
};
|
|
3230
3229
|
}
|
|
3231
3230
|
// @__NO_SIDE_EFFECTS__
|
|
3232
|
-
function
|
|
3231
|
+
function er(t) {
|
|
3233
3232
|
let e;
|
|
3234
3233
|
if (t) for (const n of t) e ? e.push(...n.issues) : e = n.issues;
|
|
3235
3234
|
return e;
|
|
3236
3235
|
}
|
|
3237
3236
|
// @__NO_SIDE_EFFECTS__
|
|
3238
|
-
function
|
|
3237
|
+
function yn(t, e) {
|
|
3239
3238
|
return {
|
|
3240
3239
|
kind: "schema",
|
|
3241
3240
|
type: "union",
|
|
3242
|
-
reference:
|
|
3243
|
-
expects: /* @__PURE__ */
|
|
3241
|
+
reference: yn,
|
|
3242
|
+
expects: /* @__PURE__ */ Aa(t.map((n) => n.expects), "|"),
|
|
3244
3243
|
async: !1,
|
|
3245
3244
|
options: t,
|
|
3246
3245
|
message: e,
|
|
3247
3246
|
get "~standard"() {
|
|
3248
|
-
return /* @__PURE__ */
|
|
3247
|
+
return /* @__PURE__ */ Y(this);
|
|
3249
3248
|
},
|
|
3250
3249
|
"~run"(n, r) {
|
|
3251
3250
|
let i, s, a;
|
|
@@ -3261,10 +3260,10 @@ function wn(t, e) {
|
|
|
3261
3260
|
if (i) return i;
|
|
3262
3261
|
if (s) {
|
|
3263
3262
|
if (s.length === 1) return s[0];
|
|
3264
|
-
|
|
3263
|
+
N(this, "type", n, r, { issues: /* @__PURE__ */ er(s) }), n.typed = !0;
|
|
3265
3264
|
} else {
|
|
3266
3265
|
if (a?.length === 1) return a[0];
|
|
3267
|
-
|
|
3266
|
+
N(this, "type", n, r, { issues: /* @__PURE__ */ er(a) });
|
|
3268
3267
|
}
|
|
3269
3268
|
return n;
|
|
3270
3269
|
}
|
|
@@ -3280,16 +3279,16 @@ function Oe(t) {
|
|
|
3280
3279
|
async: !1,
|
|
3281
3280
|
message: t,
|
|
3282
3281
|
get "~standard"() {
|
|
3283
|
-
return /* @__PURE__ */
|
|
3282
|
+
return /* @__PURE__ */ Y(this);
|
|
3284
3283
|
},
|
|
3285
3284
|
"~run"(e, n) {
|
|
3286
|
-
return e.value === void 0 ? e.typed = !0 :
|
|
3285
|
+
return e.value === void 0 ? e.typed = !0 : N(this, "type", e, n), e;
|
|
3287
3286
|
}
|
|
3288
3287
|
};
|
|
3289
3288
|
}
|
|
3290
|
-
function
|
|
3291
|
-
const r = t["~run"]({ value: e }, /* @__PURE__ */
|
|
3292
|
-
if (r.issues) throw new
|
|
3289
|
+
function Pt(t, e, n) {
|
|
3290
|
+
const r = t["~run"]({ value: e }, /* @__PURE__ */ Kr(n));
|
|
3291
|
+
if (r.issues) throw new wn(r.issues);
|
|
3293
3292
|
return r.value;
|
|
3294
3293
|
}
|
|
3295
3294
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -3298,7 +3297,7 @@ function w(...t) {
|
|
|
3298
3297
|
...t[0],
|
|
3299
3298
|
pipe: t,
|
|
3300
3299
|
get "~standard"() {
|
|
3301
|
-
return /* @__PURE__ */
|
|
3300
|
+
return /* @__PURE__ */ Y(this);
|
|
3302
3301
|
},
|
|
3303
3302
|
"~run"(e, n) {
|
|
3304
3303
|
for (const r of t) if (r.kind !== "metadata") {
|
|
@@ -3312,16 +3311,16 @@ function w(...t) {
|
|
|
3312
3311
|
}
|
|
3313
3312
|
};
|
|
3314
3313
|
}
|
|
3315
|
-
var
|
|
3316
|
-
const
|
|
3317
|
-
class
|
|
3314
|
+
var ii = /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ H(-90), /* @__PURE__ */ ht(90)), si = /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ H(-180), /* @__PURE__ */ ht(180)), Rt = /* @__PURE__ */ B({ lat: ii, lng: si }), ai = /* @__PURE__ */ B({ sw: Rt, ne: Rt }), Ca = /* @__PURE__ */ B({ bounds: ai, center: Rt, zoom: /* @__PURE__ */ P() }), Ze = /* @__PURE__ */ ri((t) => t instanceof HTMLElement, "Must be an HTMLElement"), Ra = /* @__PURE__ */ B({ mapSize: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ H(1)), zoomMin: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ H(0)), zoomMax: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ H(0)), zoomScale: /* @__PURE__ */ yn([/* @__PURE__ */ ze(1), /* @__PURE__ */ ze(2), /* @__PURE__ */ ze(10)]) }), Da = /* @__PURE__ */ B({ inserted: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([])), /* @__PURE__ */ $(/* @__PURE__ */ ni())), insert: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([])), /* @__PURE__ */ $(/* @__PURE__ */ Oe())), remove: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([])), /* @__PURE__ */ $(/* @__PURE__ */ Oe())), update: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([/* @__PURE__ */ P()])), /* @__PURE__ */ $(/* @__PURE__ */ Oe())) }), tr = /* @__PURE__ */ yn([/* @__PURE__ */ ze("idle"), /* @__PURE__ */ ze("move"), /* @__PURE__ */ ze("click")]), za = /* @__PURE__ */ B({ getParameters: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([])), /* @__PURE__ */ $(Ra)), getContainer: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([])), /* @__PURE__ */ $(Ze)), getZoom: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([])), /* @__PURE__ */ $(/* @__PURE__ */ P())), getBounds: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([])), /* @__PURE__ */ $(ai)), getCenter: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([])), /* @__PURE__ */ $(Rt)), getViewport: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([])), /* @__PURE__ */ $(Ca)), panBy: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([/* @__PURE__ */ P(), /* @__PURE__ */ P()])), /* @__PURE__ */ $(/* @__PURE__ */ Oe())), createMarker: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([Ze, ii, si, /* @__PURE__ */ P()])), /* @__PURE__ */ $(Da)), subscribe: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([tr, /* @__PURE__ */ I()])), /* @__PURE__ */ $(/* @__PURE__ */ Oe())), unsubscribe: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([tr, /* @__PURE__ */ I()])), /* @__PURE__ */ $(/* @__PURE__ */ Oe())) }), Kt = /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([/* @__PURE__ */ ge(), Ze]))), Gt = /* @__PURE__ */ w(/* @__PURE__ */ B({ width: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ H(0)), height: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ H(0)), padding: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ H(0)) }), /* @__PURE__ */ Gr((t) => Math.min(t.width, t.height) / t.padding >= 4, "Minimum of width or height must be greater than or equal to 4 * padding")), Oa = /* @__PURE__ */ B({ background: /* @__PURE__ */ T(/* @__PURE__ */ ge()), radius: /* @__PURE__ */ T(/* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ H(0))), shadow: /* @__PURE__ */ T(/* @__PURE__ */ ge()) }), nr = /* @__PURE__ */ B({ background: /* @__PURE__ */ T(/* @__PURE__ */ ge()), radius: /* @__PURE__ */ T(/* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ H(0))), filter: /* @__PURE__ */ T(/* @__PURE__ */ ge()) }), La = /* @__PURE__ */ B({ id: /* @__PURE__ */ w(/* @__PURE__ */ ge(), /* @__PURE__ */ kn(1)), rank: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ H(0)), lat: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ H(-90), /* @__PURE__ */ ht(90)), lng: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ H(-180), /* @__PURE__ */ ht(180)), tooltip: /* @__PURE__ */ B({ element: Ze, style: /* @__PURE__ */ T(nr), dimensions: /* @__PURE__ */ T(Gt), initialize: /* @__PURE__ */ T(Kt) }), pin: /* @__PURE__ */ T(/* @__PURE__ */ B({ element: /* @__PURE__ */ T(Ze), style: /* @__PURE__ */ T(Oa), dimensions: /* @__PURE__ */ T(Gt), initialize: /* @__PURE__ */ T(Kt) })), popup: /* @__PURE__ */ T(/* @__PURE__ */ B({ element: Ze, style: /* @__PURE__ */ T(nr), dimensions: /* @__PURE__ */ T(Gt), initialize: /* @__PURE__ */ T(Kt) })) }), Fa = /* @__PURE__ */ w(/* @__PURE__ */ ge(), /* @__PURE__ */ Qr(32)), $a = /* @__PURE__ */ w(/* @__PURE__ */ ge(), /* @__PURE__ */ kn(1));
|
|
3315
|
+
const Va = "1.3.8";
|
|
3316
|
+
class ja {
|
|
3318
3317
|
apiKey;
|
|
3319
3318
|
apiJwt;
|
|
3320
3319
|
markerStatesStore;
|
|
3321
3320
|
markerStatesWorker;
|
|
3322
3321
|
markerStatesWorkerClient;
|
|
3323
3322
|
constructor(e, n) {
|
|
3324
|
-
this.apiKey = e, this.apiJwt = n, this.markerStatesStore = /* @__PURE__ */ new Map(), this.markerStatesWorker = new
|
|
3323
|
+
this.apiKey = e, this.apiJwt = n, this.markerStatesStore = /* @__PURE__ */ new Map(), this.markerStatesWorker = new ha(), this.markerStatesWorkerClient = new sr(this.markerStatesWorker);
|
|
3325
3324
|
}
|
|
3326
3325
|
clearStates() {
|
|
3327
3326
|
this.markerStatesStore.clear();
|
|
@@ -3335,7 +3334,7 @@ class Fa {
|
|
|
3335
3334
|
async updateStates(e, n) {
|
|
3336
3335
|
if (e.length == 0) return;
|
|
3337
3336
|
e.sort((a, u) => a.properites.id.localeCompare(u.properites.id));
|
|
3338
|
-
const r = e.map((a) => a.input), i =
|
|
3337
|
+
const r = e.map((a) => a.input), i = Ma(r);
|
|
3339
3338
|
let s = this.markerStatesStore.get(i);
|
|
3340
3339
|
s == null && (s = await this.fetchStates(r, n), this.markerStatesStore.set(i, s));
|
|
3341
3340
|
for (let a = 0; a < e.length; a++) {
|
|
@@ -3345,19 +3344,19 @@ class Fa {
|
|
|
3345
3344
|
}
|
|
3346
3345
|
async fetchStates(e, n) {
|
|
3347
3346
|
if (e.length == 0) return [];
|
|
3348
|
-
if (e.length == 1) return [{ zoom: 0, directions: [{ zoom: 0, angle:
|
|
3347
|
+
if (e.length == 1) return [{ zoom: 0, directions: [{ zoom: 0, angle: la() }] }];
|
|
3349
3348
|
const r = {
|
|
3350
3349
|
key: this.apiKey,
|
|
3351
3350
|
jwt: this.apiJwt,
|
|
3352
|
-
version:
|
|
3351
|
+
version: Va,
|
|
3353
3352
|
input: e,
|
|
3354
3353
|
parameters: n
|
|
3355
3354
|
}, i = await this.markerStatesWorkerClient.invoke("fetch", r);
|
|
3356
3355
|
return i.jwt && (this.apiJwt = i.jwt), i.states;
|
|
3357
3356
|
}
|
|
3358
3357
|
}
|
|
3359
|
-
const
|
|
3360
|
-
class
|
|
3358
|
+
const rr = "1.3.8", Ua = "https://maps.api.arenarium.dev/auth", Wa = "https://maps.api.arenarium.dev/log", ir = 500;
|
|
3359
|
+
class oi {
|
|
3361
3360
|
apiKey;
|
|
3362
3361
|
mapProvider;
|
|
3363
3362
|
mapStateProvider;
|
|
@@ -3368,26 +3367,26 @@ class ai {
|
|
|
3368
3367
|
markerVisibilityProcessor;
|
|
3369
3368
|
markerElementsProcessor;
|
|
3370
3369
|
markerStateProcessor;
|
|
3371
|
-
markerStatesProcessDelay =
|
|
3370
|
+
markerStatesProcessDelay = ir;
|
|
3372
3371
|
markerStatesProcessTimeout = void 0;
|
|
3373
3372
|
constructor(e, n, r, i) {
|
|
3374
|
-
|
|
3373
|
+
Pt(Fa, e), Pt($a, n), Pt(za, r), this.apiKey = e, this.mapProvider = r, this.mapStateProvider = new Si(
|
|
3375
3374
|
this.mapProvider,
|
|
3376
3375
|
this.detached.bind(this),
|
|
3377
3376
|
this.error.bind(this),
|
|
3378
3377
|
this.onMapMove.bind(this),
|
|
3379
3378
|
this.onMapIdle.bind(this),
|
|
3380
3379
|
this.onMapClick.bind(this)
|
|
3381
|
-
), this.markers = /* @__PURE__ */ new Map(), this.markerVisibilityManager = new
|
|
3380
|
+
), this.markers = /* @__PURE__ */ new Map(), this.markerVisibilityManager = new Ui(), this.markerElementsManager = new fa(this.mapProvider), this.markerStatesManager = new ja(e, n), this.markerVisibilityProcessor = new Zt(this.onMarkersVisiblityProcess.bind(this)), this.markerElementsProcessor = new Zt(this.onMarkersRenderProcess.bind(this)), this.markerStateProcessor = new Zt(this.onMarkersStateProcess.bind(this)), this.configuration = i;
|
|
3382
3381
|
}
|
|
3383
3382
|
//#region Core
|
|
3384
3383
|
static async create(e, n, r) {
|
|
3385
|
-
let a = (await
|
|
3384
|
+
let a = (await da(Ua, { key: e, version: rr })).jwt;
|
|
3386
3385
|
if (!a) throw new Error("Failed to get api jwt");
|
|
3387
|
-
return new
|
|
3386
|
+
return new oi(e, a, n, r);
|
|
3388
3387
|
}
|
|
3389
3388
|
set configuration(e) {
|
|
3390
|
-
this.markerStatesProcessDelay = e?.process?.states?.delay ??
|
|
3389
|
+
this.markerStatesProcessDelay = e?.process?.states?.delay ?? ir, this.markerVisibilityManager.configuration = e, this.markerElementsManager.configuration = e;
|
|
3391
3390
|
}
|
|
3392
3391
|
clear() {
|
|
3393
3392
|
this.markers.clear(), this.markerVisibilityManager.clearMarkers(), this.markerStatesManager.clearStates(), this.markerElementsManager.clearElements(), this.mapStateProvider.stop(), this.markerVisibilityProcessor.stop(), this.markerStateProcessor.stop(), this.markerElementsProcessor.stop();
|
|
@@ -3416,7 +3415,7 @@ class ai {
|
|
|
3416
3415
|
title: n,
|
|
3417
3416
|
level: e,
|
|
3418
3417
|
content: {
|
|
3419
|
-
version:
|
|
3418
|
+
version: rr,
|
|
3420
3419
|
key: this.apiKey,
|
|
3421
3420
|
name: r.name,
|
|
3422
3421
|
message: r.message,
|
|
@@ -3424,7 +3423,7 @@ class ai {
|
|
|
3424
3423
|
stack: r.stack
|
|
3425
3424
|
}
|
|
3426
3425
|
};
|
|
3427
|
-
await
|
|
3426
|
+
await ma(Wa, i);
|
|
3428
3427
|
} catch (i) {
|
|
3429
3428
|
console.error(i);
|
|
3430
3429
|
}
|
|
@@ -3491,24 +3490,24 @@ class ai {
|
|
|
3491
3490
|
}, a = (o, l) => {
|
|
3492
3491
|
if (l) return l;
|
|
3493
3492
|
if (o) {
|
|
3494
|
-
const c = s(o), f = c.width,
|
|
3495
|
-
return { width: f, height:
|
|
3493
|
+
const c = s(o), f = c.width, p = c.height;
|
|
3494
|
+
return { width: f, height: p, padding: On };
|
|
3496
3495
|
} else
|
|
3497
|
-
return { width:
|
|
3496
|
+
return { width: zn, height: zn, padding: On };
|
|
3498
3497
|
}, u = (o, l) => {
|
|
3499
3498
|
if (l) return l;
|
|
3500
|
-
const c = s(o), f = c.width,
|
|
3501
|
-
return { width: f, height:
|
|
3499
|
+
const c = s(o), f = c.width, p = c.height, m = Math.min(Math.round(Math.min(f, p) / 4), $i);
|
|
3500
|
+
return { width: f, height: p, padding: m };
|
|
3502
3501
|
};
|
|
3503
3502
|
for (const o of r) {
|
|
3504
|
-
const l = o.id, c = o.lat, f = o.lng,
|
|
3503
|
+
const l = o.id, c = o.lat, f = o.lng, p = o.rank;
|
|
3505
3504
|
let m = {
|
|
3506
3505
|
id: l,
|
|
3507
3506
|
initialize: o.pin?.initialize,
|
|
3508
3507
|
element: o.pin?.element,
|
|
3509
3508
|
style: o.pin?.style,
|
|
3510
3509
|
dimensions: a(o.pin?.element, o.pin?.dimensions)
|
|
3511
|
-
},
|
|
3510
|
+
}, h = {
|
|
3512
3511
|
id: l,
|
|
3513
3512
|
initialize: o.tooltip.initialize,
|
|
3514
3513
|
element: o.tooltip.element,
|
|
@@ -3522,13 +3521,13 @@ class ai {
|
|
|
3522
3521
|
style: o.popup.style,
|
|
3523
3522
|
dimensions: u(o.popup.element, o.popup.dimensions)
|
|
3524
3523
|
});
|
|
3525
|
-
const
|
|
3526
|
-
n.push(
|
|
3524
|
+
const b = new Mi(l, c, f, p, m, h, v);
|
|
3525
|
+
n.push(b);
|
|
3527
3526
|
}
|
|
3528
3527
|
return n.forEach((o) => this.markers.set(o.properites.id, o)), n.sort((o, l) => l.properites.rank - o.properites.rank), n;
|
|
3529
3528
|
}
|
|
3530
3529
|
async updateMarkers(e) {
|
|
3531
|
-
|
|
3530
|
+
Pt(/* @__PURE__ */ ti(La), e);
|
|
3532
3531
|
try {
|
|
3533
3532
|
const n = this.mapProvider.getParameters(), r = this.getMarkers(e);
|
|
3534
3533
|
await this.markerVisibilityManager.updateMarkers(n, r), this.mapStateProvider.start(), this.markerVisibilityProcessor.run();
|
|
@@ -3568,5 +3567,5 @@ class ai {
|
|
|
3568
3567
|
//#endregion
|
|
3569
3568
|
}
|
|
3570
3569
|
export {
|
|
3571
|
-
|
|
3570
|
+
oi as MapManager
|
|
3572
3571
|
};
|