@arenarium/maps 1.3.10 → 1.3.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +672 -672
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -18,7 +18,7 @@ class Zt {
|
|
|
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 Ei {
|
|
22
22
|
properites;
|
|
23
23
|
state;
|
|
24
24
|
constructor(e, n, r, i, s, a, u) {
|
|
@@ -36,7 +36,7 @@ class Mi {
|
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
class
|
|
39
|
+
class xi {
|
|
40
40
|
callback;
|
|
41
41
|
timeout;
|
|
42
42
|
id;
|
|
@@ -51,8 +51,8 @@ class Ei {
|
|
|
51
51
|
this.id != null && (window.clearInterval(this.id), this.id = void 0);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
const
|
|
55
|
-
class
|
|
54
|
+
const Si = 100;
|
|
55
|
+
class Pi {
|
|
56
56
|
viewport = void 0;
|
|
57
57
|
state = "idle";
|
|
58
58
|
provider;
|
|
@@ -63,7 +63,7 @@ class Si {
|
|
|
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 xi(this.onInterval.bind(this), Si / (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));
|
|
@@ -112,7 +112,7 @@ class sr {
|
|
|
112
112
|
this.workerInvocations.forEach((e) => e.reject(new Error("Terminated"))), this.workerInvocations.clear(), this.worker.terminate();
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
|
-
class
|
|
115
|
+
class Ue {
|
|
116
116
|
remove;
|
|
117
117
|
insert;
|
|
118
118
|
constructor(e, n) {
|
|
@@ -120,14 +120,14 @@ class We {
|
|
|
120
120
|
}
|
|
121
121
|
static from(e, n) {
|
|
122
122
|
const r = new Set(e), i = new Set(n), s = Array.from(r.difference(i)), a = Array.from(i.difference(r));
|
|
123
|
-
return new
|
|
123
|
+
return new Ue(s, a);
|
|
124
124
|
}
|
|
125
125
|
static empty() {
|
|
126
|
-
return new
|
|
126
|
+
return new Ue([], []);
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
|
-
const ar = '(function(){"use strict";function w(l,t,e){return{x:
|
|
130
|
-
function
|
|
129
|
+
const ar = '(function(){"use strict";class T{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)}}}function w(l,t,e){return{x:I(t)*e,y:P(l)*e}}function m(l,t,e){return{lat:S(t/e),lng:R(l/e)}}function I(l){return(180+l)/360}function P(l){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+l*Math.PI/360)))/360}function R(l){return l*360-180}function S(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 x{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 x(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 A{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 v=16,p=2,k=1,M=v*4;let b,d,E=p,$=k,y=M;const _={update(l,t,e){const n=-Math.floor(Math.log2(l.mapSize/y)),s=new A(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)}};new T(_).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 Ti(t) {
|
|
131
131
|
let e;
|
|
132
132
|
try {
|
|
133
133
|
if (e = Nn && (self.URL || self.webkitURL).createObjectURL(Nn), !e) throw "";
|
|
@@ -146,25 +146,25 @@ function Pi(t) {
|
|
|
146
146
|
);
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
|
-
function
|
|
150
|
-
return { x:
|
|
149
|
+
function it(t, e, n) {
|
|
150
|
+
return { x: Ii(e) * n, y: Ai(t) * n };
|
|
151
151
|
}
|
|
152
152
|
function Cn(t, e, n) {
|
|
153
|
-
return { lat:
|
|
153
|
+
return { lat: Ci(e / n), lng: Ni(t / n) };
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function Ii(t) {
|
|
156
156
|
return (180 + t) / 360;
|
|
157
157
|
}
|
|
158
|
-
function
|
|
158
|
+
function Ai(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 Ni(t) {
|
|
162
162
|
return t * 360 - 180;
|
|
163
163
|
}
|
|
164
|
-
function
|
|
164
|
+
function Ci(t) {
|
|
165
165
|
return 360 / Math.PI * Math.atan(Math.exp((180 - t * 360) * Math.PI / 180)) - 90;
|
|
166
166
|
}
|
|
167
|
-
class
|
|
167
|
+
class bt {
|
|
168
168
|
sw;
|
|
169
169
|
ne;
|
|
170
170
|
constructor(e, n, r, i) {
|
|
@@ -179,14 +179,14 @@ class _t {
|
|
|
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 ot {
|
|
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 bt(e, n, r, i), this.blockR = new bt(0, 0, 0, 0)) : (this.blockL = new bt(e, -180, r, i), this.blockR = new bt(e, n, r, 180));
|
|
190
190
|
}
|
|
191
191
|
static bounds(e) {
|
|
192
192
|
const n = e.bounds, r = e.center;
|
|
@@ -197,7 +197,7 @@ class ut {
|
|
|
197
197
|
*/
|
|
198
198
|
static create(e) {
|
|
199
199
|
const n = this.bounds(e), r = n.sw, i = n.ne;
|
|
200
|
-
return new
|
|
200
|
+
return new ot(r.lat, r.lng, i.lat, i.lng);
|
|
201
201
|
}
|
|
202
202
|
/**
|
|
203
203
|
* @param viewport - The viewport of the map.
|
|
@@ -206,10 +206,10 @@ class ut {
|
|
|
206
206
|
* @param offsetY - The y offset of the map in pixels at zoom level n.
|
|
207
207
|
*/
|
|
208
208
|
static offset(e, n, r) {
|
|
209
|
-
const i = this.bounds(e), s = e.zoom, a = n * Math.pow(2, s), u =
|
|
210
|
-
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),
|
|
211
|
-
const m = Cn(l, c, a),
|
|
212
|
-
return new
|
|
209
|
+
const i = this.bounds(e), s = e.zoom, a = n * Math.pow(2, s), u = it(i.sw.lat, i.sw.lng, a), o = it(i.ne.lat, i.ne.lng, a);
|
|
210
|
+
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), h = Math.max(o.y - r.top, 0);
|
|
211
|
+
const m = Cn(l, c, a), d = Cn(f, h, a);
|
|
212
|
+
return new ot(m.lat, m.lng, d.lat, d.lng);
|
|
213
213
|
}
|
|
214
214
|
contains(e, n) {
|
|
215
215
|
return this.blockL.contains(e, n) || this.blockR.contains(e, n);
|
|
@@ -218,8 +218,8 @@ class ut {
|
|
|
218
218
|
return this.blockL.intersects(e) || this.blockR.intersects(e);
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
|
-
const
|
|
222
|
-
class
|
|
221
|
+
const Ri = 75, Di = 125, Rn = 25e-5, zi = 1e6, Oi = 2e6, Dn = 3e6, or = 10, zn = 16, Li = 8, On = 2, Ve = 0.5, Fi = "0px 2px 2px rgba(0, 0, 0, 0.5)", $i = 8, Vi = 8, ji = "drop-shadow(0px 2px 2px rgba(0, 0, 0, 0.5))", Ln = "white", Ui = "darkgreen", Fn = 1024;
|
|
222
|
+
class Wi {
|
|
223
223
|
// State
|
|
224
224
|
markers;
|
|
225
225
|
markersVisible;
|
|
@@ -234,16 +234,16 @@ class Ui {
|
|
|
234
234
|
}
|
|
235
235
|
async getMarkersDelta(e, n) {
|
|
236
236
|
if (this.markerVisibilityTreeWorkerClient && this.markers) {
|
|
237
|
-
const r = await this.markerVisibilityTreeWorkerClient.invoke("filter", e, n), i = this.markersVisible, s = r.map((u) => this.markers[u]), a =
|
|
237
|
+
const r = await this.markerVisibilityTreeWorkerClient.invoke("filter", e, n), i = this.markersVisible, s = r.map((u) => this.markers[u]), a = Ue.from(i, s);
|
|
238
238
|
return this.markersVisible = s, a;
|
|
239
239
|
} else if (this.markers != this.markersVisible) {
|
|
240
|
-
const r = this.markersVisible, i = this.markers, s =
|
|
240
|
+
const r = this.markersVisible, i = this.markers, s = Ue.from(r, i);
|
|
241
241
|
return this.markersVisible = i, s;
|
|
242
242
|
} else
|
|
243
|
-
return
|
|
243
|
+
return Ue.empty();
|
|
244
244
|
}
|
|
245
245
|
async updateMarkers(e, n) {
|
|
246
|
-
this.markers = n, n.length > this.markerVisibilityTreeLimit ? (this.markerVisibilityTreeWorker = new
|
|
246
|
+
this.markers = n, n.length > this.markerVisibilityTreeLimit ? (this.markerVisibilityTreeWorker = new Ti(), this.markerVisibilityTreeWorkerClient = new sr(this.markerVisibilityTreeWorker), await this.markerVisibilityTreeWorkerClient.invoke(
|
|
247
247
|
"update",
|
|
248
248
|
e,
|
|
249
249
|
n.map((r, i) => ({ index: i, lat: r.properites.lat, lng: r.properites.lng })),
|
|
@@ -255,10 +255,10 @@ class Ui {
|
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
257
|
const Qt = !1;
|
|
258
|
-
var
|
|
259
|
-
const
|
|
258
|
+
var Bi = Array.isArray, Hi = Array.prototype.indexOf, Ze = Array.prototype.includes, qi = Array.from, Zi = Object.defineProperty, st = Object.getOwnPropertyDescriptor, Yi = Object.prototype, Ji = Array.prototype, Xi = Object.getPrototypeOf, $n = Object.isExtensible;
|
|
259
|
+
const Ki = () => {
|
|
260
260
|
};
|
|
261
|
-
function
|
|
261
|
+
function Gi(t) {
|
|
262
262
|
for (var e = 0; e < t.length; e++)
|
|
263
263
|
t[e]();
|
|
264
264
|
}
|
|
@@ -268,42 +268,42 @@ function lr() {
|
|
|
268
268
|
});
|
|
269
269
|
return { promise: n, resolve: t, reject: e };
|
|
270
270
|
}
|
|
271
|
-
const z = 2,
|
|
271
|
+
const z = 2, ft = 4, Rt = 8, ur = 1 << 24, ge = 16, Pe = 32, Fe = 64, en = 128, ee = 512, D = 1024, F = 2048, oe = 4096, _e = 8192, Me = 16384, Ye = 32768, At = 65536, Vn = 1 << 17, cr = 1 << 18, Qe = 1 << 19, Qi = 1 << 20, Le = 65536, tn = 1 << 21, on = 1 << 22, Ee = 1 << 23, Pt = /* @__PURE__ */ Symbol("$state"), Ne = new class extends Error {
|
|
272
272
|
name = "StaleReactionError";
|
|
273
273
|
message = "The reaction that called `getAbortSignal()` was re-run or destroyed";
|
|
274
274
|
}();
|
|
275
|
-
function
|
|
275
|
+
function es() {
|
|
276
276
|
throw new Error("https://svelte.dev/e/async_derived_orphan");
|
|
277
277
|
}
|
|
278
|
-
function
|
|
278
|
+
function ts() {
|
|
279
279
|
throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
|
|
280
280
|
}
|
|
281
|
-
function
|
|
281
|
+
function ns() {
|
|
282
282
|
throw new Error("https://svelte.dev/e/state_descriptors_fixed");
|
|
283
283
|
}
|
|
284
|
-
function
|
|
284
|
+
function rs() {
|
|
285
285
|
throw new Error("https://svelte.dev/e/state_prototype_fixed");
|
|
286
286
|
}
|
|
287
|
-
function
|
|
287
|
+
function is() {
|
|
288
288
|
throw new Error("https://svelte.dev/e/state_unsafe_mutation");
|
|
289
289
|
}
|
|
290
|
-
function
|
|
290
|
+
function ss() {
|
|
291
291
|
throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
|
|
292
292
|
}
|
|
293
|
-
const R = /* @__PURE__ */ Symbol(),
|
|
294
|
-
function
|
|
293
|
+
const R = /* @__PURE__ */ Symbol(), as = "http://www.w3.org/1999/xhtml";
|
|
294
|
+
function os() {
|
|
295
295
|
console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
|
|
296
296
|
}
|
|
297
297
|
function fr(t) {
|
|
298
298
|
return t === this.v;
|
|
299
299
|
}
|
|
300
|
-
let
|
|
301
|
-
function
|
|
302
|
-
|
|
300
|
+
let ls = !1, le = null;
|
|
301
|
+
function Je(t) {
|
|
302
|
+
le = t;
|
|
303
303
|
}
|
|
304
304
|
function ln(t, e = !1, n) {
|
|
305
|
-
|
|
306
|
-
p:
|
|
305
|
+
le = {
|
|
306
|
+
p: le,
|
|
307
307
|
i: !1,
|
|
308
308
|
c: null,
|
|
309
309
|
e: null,
|
|
@@ -315,45 +315,45 @@ function ln(t, e = !1, n) {
|
|
|
315
315
|
function un(t) {
|
|
316
316
|
var e = (
|
|
317
317
|
/** @type {ComponentContext} */
|
|
318
|
-
|
|
318
|
+
le
|
|
319
319
|
), n = e.e;
|
|
320
320
|
if (n !== null) {
|
|
321
321
|
e.e = null;
|
|
322
322
|
for (var r of n)
|
|
323
|
-
|
|
323
|
+
Ns(r);
|
|
324
324
|
}
|
|
325
|
-
return t !== void 0 && (e.x = t), e.i = !0,
|
|
325
|
+
return t !== void 0 && (e.x = t), e.i = !0, le = e.p, t ?? /** @type {T} */
|
|
326
326
|
{};
|
|
327
327
|
}
|
|
328
328
|
function hr() {
|
|
329
329
|
return !0;
|
|
330
330
|
}
|
|
331
|
-
let
|
|
332
|
-
function
|
|
333
|
-
var t =
|
|
334
|
-
|
|
331
|
+
let je = [];
|
|
332
|
+
function us() {
|
|
333
|
+
var t = je;
|
|
334
|
+
je = [], Gi(t);
|
|
335
335
|
}
|
|
336
336
|
function Re(t) {
|
|
337
|
-
if (
|
|
338
|
-
var e =
|
|
337
|
+
if (je.length === 0) {
|
|
338
|
+
var e = je;
|
|
339
339
|
queueMicrotask(() => {
|
|
340
|
-
e ===
|
|
340
|
+
e === je && us();
|
|
341
341
|
});
|
|
342
342
|
}
|
|
343
|
-
|
|
343
|
+
je.push(t);
|
|
344
344
|
}
|
|
345
345
|
function pr(t) {
|
|
346
|
-
var e =
|
|
346
|
+
var e = b;
|
|
347
347
|
if (e === null)
|
|
348
|
-
return
|
|
349
|
-
if ((e.f &
|
|
348
|
+
return y.f |= Ee, t;
|
|
349
|
+
if ((e.f & Ye) === 0 && (e.f & ft) === 0)
|
|
350
350
|
throw t;
|
|
351
351
|
be(t, e);
|
|
352
352
|
}
|
|
353
353
|
function be(t, e) {
|
|
354
354
|
for (; e !== null; ) {
|
|
355
355
|
if ((e.f & en) !== 0) {
|
|
356
|
-
if ((e.f &
|
|
356
|
+
if ((e.f & Ye) === 0)
|
|
357
357
|
throw t;
|
|
358
358
|
try {
|
|
359
359
|
e.b.error(t);
|
|
@@ -366,12 +366,12 @@ function be(t, e) {
|
|
|
366
366
|
}
|
|
367
367
|
throw t;
|
|
368
368
|
}
|
|
369
|
-
const
|
|
369
|
+
const cs = -7169;
|
|
370
370
|
function S(t, e) {
|
|
371
|
-
t.f = t.f &
|
|
371
|
+
t.f = t.f & cs | e;
|
|
372
372
|
}
|
|
373
373
|
function cn(t) {
|
|
374
|
-
(t.f & ee) !== 0 || t.deps === null ? S(t, D) : S(t,
|
|
374
|
+
(t.f & ee) !== 0 || t.deps === null ? S(t, D) : S(t, oe);
|
|
375
375
|
}
|
|
376
376
|
function dr(t) {
|
|
377
377
|
if (t !== null)
|
|
@@ -382,10 +382,10 @@ function dr(t) {
|
|
|
382
382
|
));
|
|
383
383
|
}
|
|
384
384
|
function mr(t, e, n) {
|
|
385
|
-
(t.f & F) !== 0 ? e.add(t) : (t.f &
|
|
385
|
+
(t.f & F) !== 0 ? e.add(t) : (t.f & oe) !== 0 && n.add(t), dr(t.deps), S(t, D);
|
|
386
386
|
}
|
|
387
|
-
const
|
|
388
|
-
let x = null,
|
|
387
|
+
const _t = /* @__PURE__ */ new Set();
|
|
388
|
+
let x = null, se = null, G = [], fn = null, nn = !1;
|
|
389
389
|
class xe {
|
|
390
390
|
/**
|
|
391
391
|
* The current values of any sources that are updated in this batch
|
|
@@ -464,9 +464,9 @@ class xe {
|
|
|
464
464
|
if (n) {
|
|
465
465
|
this.#t.delete(e);
|
|
466
466
|
for (var r of n.d)
|
|
467
|
-
S(r, F),
|
|
467
|
+
S(r, F), fe(r);
|
|
468
468
|
for (r of n.m)
|
|
469
|
-
S(r,
|
|
469
|
+
S(r, oe), fe(r);
|
|
470
470
|
}
|
|
471
471
|
}
|
|
472
472
|
/**
|
|
@@ -486,7 +486,7 @@ class xe {
|
|
|
486
486
|
for (const i of this.#r) i();
|
|
487
487
|
this.#r.clear(), this.#i === 0 && this.#h(), x = null, jn(r), jn(n), this.#s.clear(), this.#e.clear(), this.#n?.resolve();
|
|
488
488
|
}
|
|
489
|
-
|
|
489
|
+
se = null;
|
|
490
490
|
}
|
|
491
491
|
/**
|
|
492
492
|
* Traverse the effect tree, executing effects or stashing
|
|
@@ -500,7 +500,7 @@ class xe {
|
|
|
500
500
|
for (var i = e.first; i !== null; ) {
|
|
501
501
|
var s = i.f, a = (s & (Pe | Fe)) !== 0, u = a && (s & D) !== 0, o = u || (s & _e) !== 0 || this.#t.has(i);
|
|
502
502
|
if (!o && i.fn !== null) {
|
|
503
|
-
a ? i.f ^= D : (s &
|
|
503
|
+
a ? i.f ^= D : (s & ft) !== 0 ? n.push(i) : ht(i) && ((s & ge) !== 0 && this.#e.add(i), Ke(i));
|
|
504
504
|
var l = i.first;
|
|
505
505
|
if (l !== null) {
|
|
506
506
|
i = l;
|
|
@@ -531,17 +531,17 @@ class xe {
|
|
|
531
531
|
* @param {any} value
|
|
532
532
|
*/
|
|
533
533
|
capture(e, n) {
|
|
534
|
-
n !== R && !this.previous.has(e) && this.previous.set(e, n), (e.f & Ee) === 0 && (this.current.set(e, e.v),
|
|
534
|
+
n !== R && !this.previous.has(e) && this.previous.set(e, n), (e.f & Ee) === 0 && (this.current.set(e, e.v), se?.set(e, e.v));
|
|
535
535
|
}
|
|
536
536
|
activate() {
|
|
537
537
|
x = this, this.apply();
|
|
538
538
|
}
|
|
539
539
|
deactivate() {
|
|
540
|
-
x === this && (x = null,
|
|
540
|
+
x === this && (x = null, se = null);
|
|
541
541
|
}
|
|
542
542
|
flush() {
|
|
543
543
|
if (this.activate(), G.length > 0) {
|
|
544
|
-
if (
|
|
544
|
+
if (fs(), x !== null && x !== this)
|
|
545
545
|
return;
|
|
546
546
|
} else this.#i === 0 && this.process([]);
|
|
547
547
|
this.deactivate();
|
|
@@ -551,10 +551,10 @@ class xe {
|
|
|
551
551
|
this.#p.clear();
|
|
552
552
|
}
|
|
553
553
|
#h() {
|
|
554
|
-
if (
|
|
554
|
+
if (_t.size > 1) {
|
|
555
555
|
this.previous.clear();
|
|
556
|
-
var e =
|
|
557
|
-
for (const i of
|
|
556
|
+
var e = se, n = !0;
|
|
557
|
+
for (const i of _t) {
|
|
558
558
|
if (i === this) {
|
|
559
559
|
n = !1;
|
|
560
560
|
continue;
|
|
@@ -586,9 +586,9 @@ class xe {
|
|
|
586
586
|
G = r;
|
|
587
587
|
}
|
|
588
588
|
}
|
|
589
|
-
x = null,
|
|
589
|
+
x = null, se = e;
|
|
590
590
|
}
|
|
591
|
-
this.#t.clear(),
|
|
591
|
+
this.#t.clear(), _t.delete(this);
|
|
592
592
|
}
|
|
593
593
|
/**
|
|
594
594
|
*
|
|
@@ -608,9 +608,9 @@ class xe {
|
|
|
608
608
|
}
|
|
609
609
|
revive() {
|
|
610
610
|
for (const e of this.#s)
|
|
611
|
-
this.#e.delete(e), S(e, F),
|
|
611
|
+
this.#e.delete(e), S(e, F), fe(e);
|
|
612
612
|
for (const e of this.#e)
|
|
613
|
-
S(e,
|
|
613
|
+
S(e, oe), fe(e);
|
|
614
614
|
this.flush();
|
|
615
615
|
}
|
|
616
616
|
/** @param {() => void} fn */
|
|
@@ -627,7 +627,7 @@ class xe {
|
|
|
627
627
|
static ensure() {
|
|
628
628
|
if (x === null) {
|
|
629
629
|
const e = x = new xe();
|
|
630
|
-
|
|
630
|
+
_t.add(x), Re(() => {
|
|
631
631
|
x === e && e.flush();
|
|
632
632
|
});
|
|
633
633
|
}
|
|
@@ -636,7 +636,7 @@ class xe {
|
|
|
636
636
|
apply() {
|
|
637
637
|
}
|
|
638
638
|
}
|
|
639
|
-
function
|
|
639
|
+
function fs() {
|
|
640
640
|
nn = !0;
|
|
641
641
|
var t = null;
|
|
642
642
|
try {
|
|
@@ -644,7 +644,7 @@ function cs() {
|
|
|
644
644
|
var n = xe.ensure();
|
|
645
645
|
if (e++ > 1e3) {
|
|
646
646
|
var r, i;
|
|
647
|
-
|
|
647
|
+
hs();
|
|
648
648
|
}
|
|
649
649
|
n.process(G), Se.clear();
|
|
650
650
|
}
|
|
@@ -652,36 +652,36 @@ function cs() {
|
|
|
652
652
|
G = [], nn = !1, fn = null;
|
|
653
653
|
}
|
|
654
654
|
}
|
|
655
|
-
function
|
|
655
|
+
function hs() {
|
|
656
656
|
try {
|
|
657
|
-
|
|
657
|
+
ts();
|
|
658
658
|
} catch (t) {
|
|
659
659
|
be(t, fn);
|
|
660
660
|
}
|
|
661
661
|
}
|
|
662
|
-
let
|
|
662
|
+
let me = null;
|
|
663
663
|
function jn(t) {
|
|
664
664
|
var e = t.length;
|
|
665
665
|
if (e !== 0) {
|
|
666
666
|
for (var n = 0; n < e; ) {
|
|
667
667
|
var r = t[n++];
|
|
668
|
-
if ((r.f & (Me | _e)) === 0 &&
|
|
668
|
+
if ((r.f & (Me | _e)) === 0 && ht(r) && (me = /* @__PURE__ */ new Set(), Ke(r), r.deps === null && r.first === null && r.nodes === null && r.teardown === null && r.ac === null && Cr(r), me?.size > 0)) {
|
|
669
669
|
Se.clear();
|
|
670
|
-
for (const i of
|
|
670
|
+
for (const i of me) {
|
|
671
671
|
if ((i.f & (Me | _e)) !== 0) continue;
|
|
672
672
|
const s = [i];
|
|
673
673
|
let a = i.parent;
|
|
674
674
|
for (; a !== null; )
|
|
675
|
-
|
|
675
|
+
me.has(a) && (me.delete(a), s.push(a)), a = a.parent;
|
|
676
676
|
for (let u = s.length - 1; u >= 0; u--) {
|
|
677
677
|
const o = s[u];
|
|
678
|
-
(o.f & (Me | _e)) === 0 &&
|
|
678
|
+
(o.f & (Me | _e)) === 0 && Ke(o);
|
|
679
679
|
}
|
|
680
680
|
}
|
|
681
|
-
|
|
681
|
+
me.clear();
|
|
682
682
|
}
|
|
683
683
|
}
|
|
684
|
-
|
|
684
|
+
me = null;
|
|
685
685
|
}
|
|
686
686
|
}
|
|
687
687
|
function vr(t, e, n, r) {
|
|
@@ -694,7 +694,7 @@ function vr(t, e, n, r) {
|
|
|
694
694
|
e,
|
|
695
695
|
n,
|
|
696
696
|
r
|
|
697
|
-
) : (s & (on |
|
|
697
|
+
) : (s & (on | ge)) !== 0 && (s & F) === 0 && gr(i, e, r) && (S(i, F), fe(
|
|
698
698
|
/** @type {Effect} */
|
|
699
699
|
i
|
|
700
700
|
));
|
|
@@ -705,7 +705,7 @@ function gr(t, e, n) {
|
|
|
705
705
|
if (r !== void 0) return r;
|
|
706
706
|
if (t.deps !== null)
|
|
707
707
|
for (const i of t.deps) {
|
|
708
|
-
if (
|
|
708
|
+
if (Ze.call(e, i))
|
|
709
709
|
return !0;
|
|
710
710
|
if ((i.f & z) !== 0 && gr(
|
|
711
711
|
/** @type {Derived} */
|
|
@@ -721,16 +721,16 @@ function gr(t, e, n) {
|
|
|
721
721
|
}
|
|
722
722
|
return n.set(t, !1), !1;
|
|
723
723
|
}
|
|
724
|
-
function
|
|
724
|
+
function fe(t) {
|
|
725
725
|
var e = fn = t, n = e.b;
|
|
726
|
-
if (n?.is_pending && (t.f & (
|
|
726
|
+
if (n?.is_pending && (t.f & (ft | Rt | ur)) !== 0 && (t.f & Ye) === 0) {
|
|
727
727
|
n.defer_effect(t);
|
|
728
728
|
return;
|
|
729
729
|
}
|
|
730
730
|
for (; e.parent !== null; ) {
|
|
731
731
|
e = e.parent;
|
|
732
732
|
var r = e.f;
|
|
733
|
-
if (nn && e ===
|
|
733
|
+
if (nn && e === b && (r & ge) !== 0 && (r & cr) === 0 && (r & Ye) !== 0)
|
|
734
734
|
return;
|
|
735
735
|
if ((r & (Fe | Pe)) !== 0) {
|
|
736
736
|
if ((r & D) === 0)
|
|
@@ -742,26 +742,26 @@ function ce(t) {
|
|
|
742
742
|
}
|
|
743
743
|
function wr(t, e) {
|
|
744
744
|
if (!((t.f & Pe) !== 0 && (t.f & D) !== 0)) {
|
|
745
|
-
(t.f & F) !== 0 ? e.d.push(t) : (t.f &
|
|
745
|
+
(t.f & F) !== 0 ? e.d.push(t) : (t.f & oe) !== 0 && e.m.push(t), S(t, D);
|
|
746
746
|
for (var n = t.first; n !== null; )
|
|
747
747
|
wr(n, e), n = n.next;
|
|
748
748
|
}
|
|
749
749
|
}
|
|
750
|
-
function
|
|
751
|
-
let e = 0, n =
|
|
750
|
+
function ps(t) {
|
|
751
|
+
let e = 0, n = Dt(0), r;
|
|
752
752
|
return () => {
|
|
753
|
-
dn() && (E(n), Ir(() => (e === 0 && (r = Q(() => t(() =>
|
|
753
|
+
dn() && (E(n), Ir(() => (e === 0 && (r = Q(() => t(() => at(n)))), e += 1, () => {
|
|
754
754
|
Re(() => {
|
|
755
|
-
e -= 1, e === 0 && (r?.(), r = void 0,
|
|
755
|
+
e -= 1, e === 0 && (r?.(), r = void 0, at(n));
|
|
756
756
|
});
|
|
757
757
|
})));
|
|
758
758
|
};
|
|
759
759
|
}
|
|
760
|
-
var
|
|
761
|
-
function
|
|
762
|
-
new
|
|
760
|
+
var ds = At | Qe;
|
|
761
|
+
function ms(t, e, n, r) {
|
|
762
|
+
new vs(t, e, n, r);
|
|
763
763
|
}
|
|
764
|
-
class
|
|
764
|
+
class vs {
|
|
765
765
|
/** @type {Boundary | null} */
|
|
766
766
|
parent;
|
|
767
767
|
is_pending = !1;
|
|
@@ -804,7 +804,7 @@ class ms {
|
|
|
804
804
|
* @type {Source<number> | null}
|
|
805
805
|
*/
|
|
806
806
|
#f = null;
|
|
807
|
-
#k =
|
|
807
|
+
#k = ps(() => (this.#f = Dt(this.#u), () => {
|
|
808
808
|
this.#f = null;
|
|
809
809
|
}));
|
|
810
810
|
/**
|
|
@@ -817,13 +817,13 @@ class ms {
|
|
|
817
817
|
this.#r = e, this.#i = n, this.#o = (s) => {
|
|
818
818
|
var a = (
|
|
819
819
|
/** @type {Effect} */
|
|
820
|
-
|
|
820
|
+
b
|
|
821
821
|
);
|
|
822
822
|
a.b = this, a.f |= en, r(s);
|
|
823
823
|
}, this.parent = /** @type {Effect} */
|
|
824
|
-
|
|
824
|
+
b.b, this.transform_error = i ?? this.parent?.transform_error ?? ((s) => s), this.#n = zs(() => {
|
|
825
825
|
this.#g();
|
|
826
|
-
},
|
|
826
|
+
}, ds);
|
|
827
827
|
}
|
|
828
828
|
#y() {
|
|
829
829
|
try {
|
|
@@ -850,7 +850,7 @@ class ms {
|
|
|
850
850
|
const e = this.#i.pending;
|
|
851
851
|
e && (this.is_pending = !0, this.#e = Ae(() => e(this.#r)), Re(() => {
|
|
852
852
|
var n = this.#a = document.createDocumentFragment(), r = Sr();
|
|
853
|
-
n.append(r), this.#s = this.#v(() => (xe.ensure(), Ae(() => this.#o(r)))), this.#l === 0 && (this.#r.before(n), this.#a = null,
|
|
853
|
+
n.append(r), this.#s = this.#v(() => (xe.ensure(), Ae(() => this.#o(r)))), this.#l === 0 && (this.#r.before(n), this.#a = null, Tt(
|
|
854
854
|
/** @type {Effect} */
|
|
855
855
|
this.#e,
|
|
856
856
|
() => {
|
|
@@ -865,7 +865,7 @@ class ms {
|
|
|
865
865
|
this.#o(this.#r);
|
|
866
866
|
}), this.#l > 0) {
|
|
867
867
|
var e = this.#a = document.createDocumentFragment();
|
|
868
|
-
|
|
868
|
+
Fs(this.#s, e);
|
|
869
869
|
const n = (
|
|
870
870
|
/** @type {(anchor: Node) => void} */
|
|
871
871
|
this.#i.pending
|
|
@@ -880,9 +880,9 @@ class ms {
|
|
|
880
880
|
#m() {
|
|
881
881
|
this.is_pending = !1;
|
|
882
882
|
for (const e of this.#h)
|
|
883
|
-
S(e, F),
|
|
883
|
+
S(e, F), fe(e);
|
|
884
884
|
for (const e of this.#d)
|
|
885
|
-
S(e,
|
|
885
|
+
S(e, oe), fe(e);
|
|
886
886
|
this.#h.clear(), this.#d.clear();
|
|
887
887
|
}
|
|
888
888
|
/**
|
|
@@ -907,14 +907,14 @@ class ms {
|
|
|
907
907
|
* @param {() => T} fn
|
|
908
908
|
*/
|
|
909
909
|
#v(e) {
|
|
910
|
-
var n =
|
|
911
|
-
|
|
910
|
+
var n = b, r = y, i = le;
|
|
911
|
+
pe(this.#n), ne(this.#n), Je(this.#n.ctx);
|
|
912
912
|
try {
|
|
913
913
|
return e();
|
|
914
914
|
} catch (s) {
|
|
915
915
|
return pr(s), null;
|
|
916
916
|
} finally {
|
|
917
|
-
|
|
917
|
+
pe(n), ne(r), Je(i);
|
|
918
918
|
}
|
|
919
919
|
}
|
|
920
920
|
/**
|
|
@@ -927,7 +927,7 @@ class ms {
|
|
|
927
927
|
this.parent && this.parent.#w(e);
|
|
928
928
|
return;
|
|
929
929
|
}
|
|
930
|
-
this.#l += e, this.#l === 0 && (this.#m(), this.#e &&
|
|
930
|
+
this.#l += e, this.#l === 0 && (this.#m(), this.#e && Tt(this.#e, () => {
|
|
931
931
|
this.#e = null;
|
|
932
932
|
}), this.#a && (this.#r.before(this.#a), this.#a = null));
|
|
933
933
|
}
|
|
@@ -939,7 +939,7 @@ class ms {
|
|
|
939
939
|
*/
|
|
940
940
|
update_pending_count(e) {
|
|
941
941
|
this.#w(e), this.#u += e, !(!this.#f || this.#c) && (this.#c = !0, Re(() => {
|
|
942
|
-
this.#c = !1, this.#f &&
|
|
942
|
+
this.#c = !1, this.#f && Nt(this.#f, this.#u);
|
|
943
943
|
}));
|
|
944
944
|
}
|
|
945
945
|
get_effect_pending() {
|
|
@@ -954,14 +954,14 @@ class ms {
|
|
|
954
954
|
let r = this.#i.failed;
|
|
955
955
|
if (!n && !r)
|
|
956
956
|
throw e;
|
|
957
|
-
this.#s && (
|
|
957
|
+
this.#s && (he(this.#s), this.#s = null), this.#e && (he(this.#e), this.#e = null), this.#t && (he(this.#t), this.#t = null);
|
|
958
958
|
var i = !1, s = !1;
|
|
959
959
|
const a = () => {
|
|
960
960
|
if (i) {
|
|
961
|
-
|
|
961
|
+
os();
|
|
962
962
|
return;
|
|
963
963
|
}
|
|
964
|
-
i = !0, s &&
|
|
964
|
+
i = !0, s && ss(), this.#t !== null && Tt(this.#t, () => {
|
|
965
965
|
this.#t = null;
|
|
966
966
|
}), this.#v(() => {
|
|
967
967
|
xe.ensure(), this.#g();
|
|
@@ -978,7 +978,7 @@ class ms {
|
|
|
978
978
|
return Ae(() => {
|
|
979
979
|
var l = (
|
|
980
980
|
/** @type {Effect} */
|
|
981
|
-
|
|
981
|
+
b
|
|
982
982
|
);
|
|
983
983
|
l.b = this, l.f |= en, r(
|
|
984
984
|
this.#r,
|
|
@@ -1012,8 +1012,8 @@ class ms {
|
|
|
1012
1012
|
});
|
|
1013
1013
|
}
|
|
1014
1014
|
}
|
|
1015
|
-
function
|
|
1016
|
-
const i =
|
|
1015
|
+
function gs(t, e, n, r) {
|
|
1016
|
+
const i = ys;
|
|
1017
1017
|
var s = t.filter((f) => !f.settled);
|
|
1018
1018
|
if (n.length === 0 && s.length === 0) {
|
|
1019
1019
|
r(e.map(i));
|
|
@@ -1021,14 +1021,14 @@ function vs(t, e, n, r) {
|
|
|
1021
1021
|
}
|
|
1022
1022
|
var a = (
|
|
1023
1023
|
/** @type {Effect} */
|
|
1024
|
-
|
|
1025
|
-
), u =
|
|
1024
|
+
b
|
|
1025
|
+
), u = ws(), o = s.length === 1 ? s[0].promise : s.length > 1 ? Promise.all(s.map((f) => f.promise)) : null;
|
|
1026
1026
|
function l(f) {
|
|
1027
1027
|
u();
|
|
1028
1028
|
try {
|
|
1029
1029
|
r(f);
|
|
1030
|
-
} catch (
|
|
1031
|
-
(a.f & Me) === 0 && be(
|
|
1030
|
+
} catch (h) {
|
|
1031
|
+
(a.f & Me) === 0 && be(h, a);
|
|
1032
1032
|
}
|
|
1033
1033
|
rn();
|
|
1034
1034
|
}
|
|
@@ -1037,24 +1037,24 @@ function vs(t, e, n, r) {
|
|
|
1037
1037
|
return;
|
|
1038
1038
|
}
|
|
1039
1039
|
function c() {
|
|
1040
|
-
u(), Promise.all(n.map((f) => /* @__PURE__ */
|
|
1040
|
+
u(), Promise.all(n.map((f) => /* @__PURE__ */ bs(f))).then((f) => l([...e.map(i), ...f])).catch((f) => be(f, a));
|
|
1041
1041
|
}
|
|
1042
1042
|
o ? o.then(c) : c();
|
|
1043
1043
|
}
|
|
1044
|
-
function
|
|
1045
|
-
var t =
|
|
1044
|
+
function ws() {
|
|
1045
|
+
var t = b, e = y, n = le, r = x;
|
|
1046
1046
|
return function(s = !0) {
|
|
1047
|
-
|
|
1047
|
+
pe(t), ne(e), Je(n), s && r?.activate();
|
|
1048
1048
|
};
|
|
1049
1049
|
}
|
|
1050
1050
|
function rn(t = !0) {
|
|
1051
|
-
|
|
1051
|
+
pe(null), ne(null), Je(null), t && x?.deactivate();
|
|
1052
1052
|
}
|
|
1053
|
-
function
|
|
1053
|
+
function ks() {
|
|
1054
1054
|
var t = (
|
|
1055
1055
|
/** @type {Boundary} */
|
|
1056
1056
|
/** @type {Effect} */
|
|
1057
|
-
|
|
1057
|
+
b.b
|
|
1058
1058
|
), e = (
|
|
1059
1059
|
/** @type {Batch} */
|
|
1060
1060
|
x
|
|
@@ -1064,13 +1064,13 @@ function ws() {
|
|
|
1064
1064
|
};
|
|
1065
1065
|
}
|
|
1066
1066
|
// @__NO_SIDE_EFFECTS__
|
|
1067
|
-
function
|
|
1068
|
-
var e = z | F, n =
|
|
1067
|
+
function ys(t) {
|
|
1068
|
+
var e = z | F, n = y !== null && (y.f & z) !== 0 ? (
|
|
1069
1069
|
/** @type {Derived} */
|
|
1070
|
-
|
|
1070
|
+
y
|
|
1071
1071
|
) : null;
|
|
1072
|
-
return
|
|
1073
|
-
ctx:
|
|
1072
|
+
return b !== null && (b.f |= Qe), {
|
|
1073
|
+
ctx: le,
|
|
1074
1074
|
deps: null,
|
|
1075
1075
|
effects: null,
|
|
1076
1076
|
equals: fr,
|
|
@@ -1083,52 +1083,52 @@ function ks(t) {
|
|
|
1083
1083
|
R
|
|
1084
1084
|
),
|
|
1085
1085
|
wv: 0,
|
|
1086
|
-
parent: n ??
|
|
1086
|
+
parent: n ?? b,
|
|
1087
1087
|
ac: null
|
|
1088
1088
|
};
|
|
1089
1089
|
}
|
|
1090
1090
|
// @__NO_SIDE_EFFECTS__
|
|
1091
|
-
function
|
|
1091
|
+
function bs(t, e, n) {
|
|
1092
1092
|
/** @type {Effect | null} */
|
|
1093
|
-
|
|
1093
|
+
b === null && es();
|
|
1094
1094
|
var i = (
|
|
1095
1095
|
/** @type {Promise<V>} */
|
|
1096
1096
|
/** @type {unknown} */
|
|
1097
1097
|
void 0
|
|
1098
|
-
), s =
|
|
1098
|
+
), s = Dt(
|
|
1099
1099
|
/** @type {V} */
|
|
1100
1100
|
R
|
|
1101
|
-
), a = !
|
|
1102
|
-
return
|
|
1101
|
+
), a = !y, u = /* @__PURE__ */ new Map();
|
|
1102
|
+
return Ds(() => {
|
|
1103
1103
|
var o = lr();
|
|
1104
1104
|
i = o.promise;
|
|
1105
1105
|
try {
|
|
1106
1106
|
Promise.resolve(t()).then(o.resolve, o.reject).finally(rn);
|
|
1107
|
-
} catch (
|
|
1108
|
-
o.reject(
|
|
1107
|
+
} catch (h) {
|
|
1108
|
+
o.reject(h), rn();
|
|
1109
1109
|
}
|
|
1110
1110
|
var l = (
|
|
1111
1111
|
/** @type {Batch} */
|
|
1112
1112
|
x
|
|
1113
1113
|
);
|
|
1114
1114
|
if (a) {
|
|
1115
|
-
var c =
|
|
1115
|
+
var c = ks();
|
|
1116
1116
|
u.get(l)?.reject(Ne), u.delete(l), u.set(l, o);
|
|
1117
1117
|
}
|
|
1118
|
-
const f = (
|
|
1118
|
+
const f = (h, m = void 0) => {
|
|
1119
1119
|
if (l.activate(), m)
|
|
1120
|
-
m !== Ne && (s.f |= Ee,
|
|
1120
|
+
m !== Ne && (s.f |= Ee, Nt(s, m));
|
|
1121
1121
|
else {
|
|
1122
|
-
(s.f & Ee) !== 0 && (s.f ^= Ee),
|
|
1123
|
-
for (const [
|
|
1124
|
-
if (u.delete(
|
|
1122
|
+
(s.f & Ee) !== 0 && (s.f ^= Ee), Nt(s, h);
|
|
1123
|
+
for (const [d, v] of u) {
|
|
1124
|
+
if (u.delete(d), d === l) break;
|
|
1125
1125
|
v.reject(Ne);
|
|
1126
1126
|
}
|
|
1127
1127
|
}
|
|
1128
1128
|
c && c();
|
|
1129
1129
|
};
|
|
1130
|
-
o.promise.then(f, (
|
|
1131
|
-
}),
|
|
1130
|
+
o.promise.then(f, (h) => f(null, h || "unknown"));
|
|
1131
|
+
}), As(() => {
|
|
1132
1132
|
for (const o of u.values())
|
|
1133
1133
|
o.reject(Ne);
|
|
1134
1134
|
}), new Promise((o) => {
|
|
@@ -1141,18 +1141,18 @@ function ys(t, e, n) {
|
|
|
1141
1141
|
l(i);
|
|
1142
1142
|
});
|
|
1143
1143
|
}
|
|
1144
|
-
function
|
|
1144
|
+
function _s(t) {
|
|
1145
1145
|
var e = t.effects;
|
|
1146
1146
|
if (e !== null) {
|
|
1147
1147
|
t.effects = null;
|
|
1148
1148
|
for (var n = 0; n < e.length; n += 1)
|
|
1149
|
-
|
|
1149
|
+
he(
|
|
1150
1150
|
/** @type {Effect} */
|
|
1151
1151
|
e[n]
|
|
1152
1152
|
);
|
|
1153
1153
|
}
|
|
1154
1154
|
}
|
|
1155
|
-
function
|
|
1155
|
+
function Ms(t) {
|
|
1156
1156
|
for (var e = t.parent; e !== null; ) {
|
|
1157
1157
|
if ((e.f & z) === 0)
|
|
1158
1158
|
return (e.f & Me) === 0 ? (
|
|
@@ -1164,12 +1164,12 @@ function _s(t) {
|
|
|
1164
1164
|
return null;
|
|
1165
1165
|
}
|
|
1166
1166
|
function hn(t) {
|
|
1167
|
-
var e, n =
|
|
1168
|
-
|
|
1167
|
+
var e, n = b;
|
|
1168
|
+
pe(Ms(t));
|
|
1169
1169
|
try {
|
|
1170
|
-
t.f &= ~Le,
|
|
1170
|
+
t.f &= ~Le, _s(t), e = Lr(t);
|
|
1171
1171
|
} finally {
|
|
1172
|
-
|
|
1172
|
+
pe(n);
|
|
1173
1173
|
}
|
|
1174
1174
|
return e;
|
|
1175
1175
|
}
|
|
@@ -1179,22 +1179,22 @@ function kr(t) {
|
|
|
1179
1179
|
S(t, D);
|
|
1180
1180
|
return;
|
|
1181
1181
|
}
|
|
1182
|
-
|
|
1182
|
+
Xe || (se !== null ? (dn() || x?.is_fork) && se.set(t, e) : cn(t));
|
|
1183
1183
|
}
|
|
1184
|
-
function
|
|
1184
|
+
function Es(t) {
|
|
1185
1185
|
if (t.effects !== null)
|
|
1186
1186
|
for (const e of t.effects)
|
|
1187
|
-
(e.teardown || e.ac) && (e.teardown?.(), e.ac?.abort(Ne), e.teardown =
|
|
1187
|
+
(e.teardown || e.ac) && (e.teardown?.(), e.ac?.abort(Ne), e.teardown = Ki, e.ac = null, lt(e, 0), mn(e));
|
|
1188
1188
|
}
|
|
1189
1189
|
function yr(t) {
|
|
1190
1190
|
if (t.effects !== null)
|
|
1191
1191
|
for (const e of t.effects)
|
|
1192
|
-
e.teardown &&
|
|
1192
|
+
e.teardown && Ke(e);
|
|
1193
1193
|
}
|
|
1194
1194
|
let sn = /* @__PURE__ */ new Set();
|
|
1195
1195
|
const Se = /* @__PURE__ */ new Map();
|
|
1196
1196
|
let br = !1;
|
|
1197
|
-
function
|
|
1197
|
+
function Dt(t, e) {
|
|
1198
1198
|
var n = {
|
|
1199
1199
|
f: 0,
|
|
1200
1200
|
// TODO ideally we could skip this altogether, but it causes type errors
|
|
@@ -1207,21 +1207,21 @@ function zt(t, e) {
|
|
|
1207
1207
|
return n;
|
|
1208
1208
|
}
|
|
1209
1209
|
// @__NO_SIDE_EFFECTS__
|
|
1210
|
-
function
|
|
1211
|
-
const n =
|
|
1212
|
-
return
|
|
1210
|
+
function j(t, e) {
|
|
1211
|
+
const n = Dt(t);
|
|
1212
|
+
return $s(n), n;
|
|
1213
1213
|
}
|
|
1214
|
-
function
|
|
1215
|
-
|
|
1214
|
+
function W(t, e, n = !1) {
|
|
1215
|
+
y !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
|
|
1216
1216
|
// to ensure we error if state is set inside an inspect effect
|
|
1217
|
-
(!
|
|
1218
|
-
let r = n ?
|
|
1219
|
-
return
|
|
1217
|
+
(!ae || (y.f & Vn) !== 0) && hr() && (y.f & (z | ge | on | Vn)) !== 0 && (te === null || !Ze.call(te, t)) && is();
|
|
1218
|
+
let r = n ? tt(e) : e;
|
|
1219
|
+
return Nt(t, r);
|
|
1220
1220
|
}
|
|
1221
|
-
function
|
|
1221
|
+
function Nt(t, e) {
|
|
1222
1222
|
if (!t.equals(e)) {
|
|
1223
1223
|
var n = t.v;
|
|
1224
|
-
|
|
1224
|
+
Xe ? Se.set(t, e) : Se.set(t, n), t.v = e;
|
|
1225
1225
|
var r = xe.ensure();
|
|
1226
1226
|
if (r.capture(t, n), (t.f & z) !== 0) {
|
|
1227
1227
|
const i = (
|
|
@@ -1230,18 +1230,18 @@ function Ct(t, e) {
|
|
|
1230
1230
|
);
|
|
1231
1231
|
(t.f & F) !== 0 && hn(i), cn(i);
|
|
1232
1232
|
}
|
|
1233
|
-
t.wv = zr(), _r(t, F),
|
|
1233
|
+
t.wv = zr(), _r(t, F), b !== null && (b.f & D) !== 0 && (b.f & (Pe | Fe)) === 0 && (K === null ? Vs([t]) : K.push(t)), !r.is_fork && sn.size > 0 && !br && xs();
|
|
1234
1234
|
}
|
|
1235
1235
|
return e;
|
|
1236
1236
|
}
|
|
1237
|
-
function
|
|
1237
|
+
function xs() {
|
|
1238
1238
|
br = !1;
|
|
1239
1239
|
for (const t of sn)
|
|
1240
|
-
(t.f & D) !== 0 && S(t,
|
|
1240
|
+
(t.f & D) !== 0 && S(t, oe), ht(t) && Ke(t);
|
|
1241
1241
|
sn.clear();
|
|
1242
1242
|
}
|
|
1243
|
-
function
|
|
1244
|
-
|
|
1243
|
+
function at(t) {
|
|
1244
|
+
W(t, t.v + 1);
|
|
1245
1245
|
}
|
|
1246
1246
|
function _r(t, e) {
|
|
1247
1247
|
var n = t.reactions;
|
|
@@ -1253,31 +1253,31 @@ function _r(t, e) {
|
|
|
1253
1253
|
/** @type {Derived} */
|
|
1254
1254
|
s
|
|
1255
1255
|
);
|
|
1256
|
-
|
|
1257
|
-
} else u && ((a &
|
|
1256
|
+
se?.delete(o), (a & Le) === 0 && (a & ee && (s.f |= Le), _r(o, oe));
|
|
1257
|
+
} else u && ((a & ge) !== 0 && me !== null && me.add(
|
|
1258
1258
|
/** @type {Effect} */
|
|
1259
1259
|
s
|
|
1260
|
-
),
|
|
1260
|
+
), fe(
|
|
1261
1261
|
/** @type {Effect} */
|
|
1262
1262
|
s
|
|
1263
1263
|
));
|
|
1264
1264
|
}
|
|
1265
1265
|
}
|
|
1266
|
-
function
|
|
1267
|
-
if (typeof t != "object" || t === null ||
|
|
1266
|
+
function tt(t) {
|
|
1267
|
+
if (typeof t != "object" || t === null || Pt in t)
|
|
1268
1268
|
return t;
|
|
1269
|
-
const e =
|
|
1270
|
-
if (e !==
|
|
1269
|
+
const e = Xi(t);
|
|
1270
|
+
if (e !== Yi && e !== Ji)
|
|
1271
1271
|
return t;
|
|
1272
|
-
var n = /* @__PURE__ */ new Map(), r =
|
|
1272
|
+
var n = /* @__PURE__ */ new Map(), r = Bi(t), i = /* @__PURE__ */ j(0), s = De, a = (u) => {
|
|
1273
1273
|
if (De === s)
|
|
1274
1274
|
return u();
|
|
1275
|
-
var o =
|
|
1275
|
+
var o = y, l = De;
|
|
1276
1276
|
ne(null), Hn(s);
|
|
1277
1277
|
var c = u();
|
|
1278
1278
|
return ne(o), Hn(l), c;
|
|
1279
1279
|
};
|
|
1280
|
-
return r && n.set("length", /* @__PURE__ */
|
|
1280
|
+
return r && n.set("length", /* @__PURE__ */ j(
|
|
1281
1281
|
/** @type {any[]} */
|
|
1282
1282
|
t.length
|
|
1283
1283
|
)), new Proxy(
|
|
@@ -1285,34 +1285,34 @@ function rt(t) {
|
|
|
1285
1285
|
t,
|
|
1286
1286
|
{
|
|
1287
1287
|
defineProperty(u, o, l) {
|
|
1288
|
-
(!("value" in l) || l.configurable === !1 || l.enumerable === !1 || l.writable === !1) &&
|
|
1288
|
+
(!("value" in l) || l.configurable === !1 || l.enumerable === !1 || l.writable === !1) && ns();
|
|
1289
1289
|
var c = n.get(o);
|
|
1290
1290
|
return c === void 0 ? a(() => {
|
|
1291
|
-
var f = /* @__PURE__ */
|
|
1291
|
+
var f = /* @__PURE__ */ j(l.value);
|
|
1292
1292
|
return n.set(o, f), f;
|
|
1293
|
-
}) :
|
|
1293
|
+
}) : W(c, l.value, !0), !0;
|
|
1294
1294
|
},
|
|
1295
1295
|
deleteProperty(u, o) {
|
|
1296
1296
|
var l = n.get(o);
|
|
1297
1297
|
if (l === void 0) {
|
|
1298
1298
|
if (o in u) {
|
|
1299
|
-
const c = a(() => /* @__PURE__ */
|
|
1300
|
-
n.set(o, c),
|
|
1299
|
+
const c = a(() => /* @__PURE__ */ j(R));
|
|
1300
|
+
n.set(o, c), at(i);
|
|
1301
1301
|
}
|
|
1302
1302
|
} else
|
|
1303
|
-
|
|
1303
|
+
W(l, R), at(i);
|
|
1304
1304
|
return !0;
|
|
1305
1305
|
},
|
|
1306
1306
|
get(u, o, l) {
|
|
1307
|
-
if (o ===
|
|
1307
|
+
if (o === Pt)
|
|
1308
1308
|
return t;
|
|
1309
1309
|
var c = n.get(o), f = o in u;
|
|
1310
|
-
if (c === void 0 && (!f ||
|
|
1311
|
-
var m =
|
|
1312
|
-
return
|
|
1310
|
+
if (c === void 0 && (!f || st(u, o)?.writable) && (c = a(() => {
|
|
1311
|
+
var m = tt(f ? u[o] : R), d = /* @__PURE__ */ j(m);
|
|
1312
|
+
return d;
|
|
1313
1313
|
}), n.set(o, c)), c !== void 0) {
|
|
1314
|
-
var
|
|
1315
|
-
return
|
|
1314
|
+
var h = E(c);
|
|
1315
|
+
return h === R ? void 0 : h;
|
|
1316
1316
|
}
|
|
1317
1317
|
return Reflect.get(u, o, l);
|
|
1318
1318
|
},
|
|
@@ -1322,24 +1322,24 @@ function rt(t) {
|
|
|
1322
1322
|
var c = n.get(o);
|
|
1323
1323
|
c && (l.value = E(c));
|
|
1324
1324
|
} else if (l === void 0) {
|
|
1325
|
-
var f = n.get(o),
|
|
1326
|
-
if (f !== void 0 &&
|
|
1325
|
+
var f = n.get(o), h = f?.v;
|
|
1326
|
+
if (f !== void 0 && h !== R)
|
|
1327
1327
|
return {
|
|
1328
1328
|
enumerable: !0,
|
|
1329
1329
|
configurable: !0,
|
|
1330
|
-
value:
|
|
1330
|
+
value: h,
|
|
1331
1331
|
writable: !0
|
|
1332
1332
|
};
|
|
1333
1333
|
}
|
|
1334
1334
|
return l;
|
|
1335
1335
|
},
|
|
1336
1336
|
has(u, o) {
|
|
1337
|
-
if (o ===
|
|
1337
|
+
if (o === Pt)
|
|
1338
1338
|
return !0;
|
|
1339
1339
|
var l = n.get(o), c = l !== void 0 && l.v !== R || Reflect.has(u, o);
|
|
1340
|
-
if (l !== void 0 ||
|
|
1340
|
+
if (l !== void 0 || b !== null && (!c || st(u, o)?.writable)) {
|
|
1341
1341
|
l === void 0 && (l = a(() => {
|
|
1342
|
-
var
|
|
1342
|
+
var h = c ? tt(u[o]) : R, m = /* @__PURE__ */ j(h);
|
|
1343
1343
|
return m;
|
|
1344
1344
|
}), n.set(o, l));
|
|
1345
1345
|
var f = E(l);
|
|
@@ -1349,55 +1349,55 @@ function rt(t) {
|
|
|
1349
1349
|
return c;
|
|
1350
1350
|
},
|
|
1351
1351
|
set(u, o, l, c) {
|
|
1352
|
-
var f = n.get(o),
|
|
1352
|
+
var f = n.get(o), h = o in u;
|
|
1353
1353
|
if (r && o === "length")
|
|
1354
1354
|
for (var m = l; m < /** @type {Source<number>} */
|
|
1355
1355
|
f.v; m += 1) {
|
|
1356
|
-
var
|
|
1357
|
-
|
|
1356
|
+
var d = n.get(m + "");
|
|
1357
|
+
d !== void 0 ? W(d, R) : m in u && (d = a(() => /* @__PURE__ */ j(R)), n.set(m + "", d));
|
|
1358
1358
|
}
|
|
1359
1359
|
if (f === void 0)
|
|
1360
|
-
(!
|
|
1360
|
+
(!h || st(u, o)?.writable) && (f = a(() => /* @__PURE__ */ j(void 0)), W(f, tt(l)), n.set(o, f));
|
|
1361
1361
|
else {
|
|
1362
|
-
|
|
1363
|
-
var v = a(() =>
|
|
1364
|
-
|
|
1362
|
+
h = f.v !== R;
|
|
1363
|
+
var v = a(() => tt(l));
|
|
1364
|
+
W(f, v);
|
|
1365
1365
|
}
|
|
1366
|
-
var
|
|
1367
|
-
if (
|
|
1366
|
+
var g = Reflect.getOwnPropertyDescriptor(u, o);
|
|
1367
|
+
if (g?.set && g.set.call(c, l), !h) {
|
|
1368
1368
|
if (r && typeof o == "string") {
|
|
1369
|
-
var
|
|
1369
|
+
var I = (
|
|
1370
1370
|
/** @type {Source<number>} */
|
|
1371
1371
|
n.get("length")
|
|
1372
1372
|
), J = Number(o);
|
|
1373
|
-
Number.isInteger(J) && J >=
|
|
1373
|
+
Number.isInteger(J) && J >= I.v && W(I, J + 1);
|
|
1374
1374
|
}
|
|
1375
|
-
|
|
1375
|
+
at(i);
|
|
1376
1376
|
}
|
|
1377
1377
|
return !0;
|
|
1378
1378
|
},
|
|
1379
1379
|
ownKeys(u) {
|
|
1380
1380
|
E(i);
|
|
1381
1381
|
var o = Reflect.ownKeys(u).filter((f) => {
|
|
1382
|
-
var
|
|
1383
|
-
return
|
|
1382
|
+
var h = n.get(f);
|
|
1383
|
+
return h === void 0 || h.v !== R;
|
|
1384
1384
|
});
|
|
1385
1385
|
for (var [l, c] of n)
|
|
1386
1386
|
c.v !== R && !(l in u) && o.push(l);
|
|
1387
1387
|
return o;
|
|
1388
1388
|
},
|
|
1389
1389
|
setPrototypeOf() {
|
|
1390
|
-
|
|
1390
|
+
rs();
|
|
1391
1391
|
}
|
|
1392
1392
|
}
|
|
1393
1393
|
);
|
|
1394
1394
|
}
|
|
1395
1395
|
var Un, Mr, Er, xr;
|
|
1396
|
-
function
|
|
1396
|
+
function Ss() {
|
|
1397
1397
|
if (Un === void 0) {
|
|
1398
1398
|
Un = window, Mr = /Firefox/.test(navigator.userAgent);
|
|
1399
1399
|
var t = Element.prototype, e = Node.prototype, n = Text.prototype;
|
|
1400
|
-
Er =
|
|
1400
|
+
Er = st(e, "firstChild").get, xr = st(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);
|
|
1401
1401
|
}
|
|
1402
1402
|
}
|
|
1403
1403
|
function Sr(t = "") {
|
|
@@ -1420,37 +1420,37 @@ function pn(t) {
|
|
|
1420
1420
|
function Wn(t, e) {
|
|
1421
1421
|
return /* @__PURE__ */ Pr(t);
|
|
1422
1422
|
}
|
|
1423
|
-
function
|
|
1423
|
+
function Ps(t, e = 1, n = !1) {
|
|
1424
1424
|
let r = t;
|
|
1425
1425
|
for (; e--; )
|
|
1426
1426
|
r = /** @type {TemplateNode} */
|
|
1427
1427
|
/* @__PURE__ */ pn(r);
|
|
1428
1428
|
return r;
|
|
1429
1429
|
}
|
|
1430
|
-
function
|
|
1430
|
+
function Ts(t, e, n) {
|
|
1431
1431
|
return (
|
|
1432
1432
|
/** @type {T extends keyof HTMLElementTagNameMap ? HTMLElementTagNameMap[T] : Element} */
|
|
1433
|
-
document.createElementNS(
|
|
1433
|
+
document.createElementNS(as, t, void 0)
|
|
1434
1434
|
);
|
|
1435
1435
|
}
|
|
1436
1436
|
function Tr(t) {
|
|
1437
|
-
var e =
|
|
1438
|
-
ne(null),
|
|
1437
|
+
var e = y, n = b;
|
|
1438
|
+
ne(null), pe(null);
|
|
1439
1439
|
try {
|
|
1440
1440
|
return t();
|
|
1441
1441
|
} finally {
|
|
1442
|
-
ne(e),
|
|
1442
|
+
ne(e), pe(n);
|
|
1443
1443
|
}
|
|
1444
1444
|
}
|
|
1445
|
-
function
|
|
1445
|
+
function Is(t, e) {
|
|
1446
1446
|
var n = e.last;
|
|
1447
1447
|
n === null ? e.last = e.first = t : (n.next = t, t.prev = n, e.last = t);
|
|
1448
1448
|
}
|
|
1449
|
-
function
|
|
1450
|
-
var r =
|
|
1449
|
+
function we(t, e, n) {
|
|
1450
|
+
var r = b;
|
|
1451
1451
|
r !== null && (r.f & _e) !== 0 && (t |= _e);
|
|
1452
1452
|
var i = {
|
|
1453
|
-
ctx:
|
|
1453
|
+
ctx: le,
|
|
1454
1454
|
deps: null,
|
|
1455
1455
|
nodes: null,
|
|
1456
1456
|
f: t | F | ee,
|
|
@@ -1467,66 +1467,66 @@ function ke(t, e, n) {
|
|
|
1467
1467
|
};
|
|
1468
1468
|
if (n)
|
|
1469
1469
|
try {
|
|
1470
|
-
|
|
1470
|
+
Ke(i);
|
|
1471
1471
|
} catch (u) {
|
|
1472
|
-
throw
|
|
1472
|
+
throw he(i), u;
|
|
1473
1473
|
}
|
|
1474
|
-
else e !== null &&
|
|
1474
|
+
else e !== null && fe(i);
|
|
1475
1475
|
var s = i;
|
|
1476
1476
|
if (n && s.deps === null && s.teardown === null && s.nodes === null && s.first === s.last && // either `null`, or a singular child
|
|
1477
|
-
(s.f &
|
|
1477
|
+
(s.f & Qe) === 0 && (s = s.first, (t & ge) !== 0 && (t & At) !== 0 && s !== null && (s.f |= At)), s !== null && (s.parent = r, r !== null && Is(s, r), y !== null && (y.f & z) !== 0 && (t & Fe) === 0)) {
|
|
1478
1478
|
var a = (
|
|
1479
1479
|
/** @type {Derived} */
|
|
1480
|
-
|
|
1480
|
+
y
|
|
1481
1481
|
);
|
|
1482
1482
|
(a.effects ??= []).push(s);
|
|
1483
1483
|
}
|
|
1484
1484
|
return i;
|
|
1485
1485
|
}
|
|
1486
1486
|
function dn() {
|
|
1487
|
-
return
|
|
1488
|
-
}
|
|
1489
|
-
function Is(t) {
|
|
1490
|
-
const e = ke(Dt, null, !1);
|
|
1491
|
-
return S(e, D), e.teardown = t, e;
|
|
1487
|
+
return y !== null && !ae;
|
|
1492
1488
|
}
|
|
1493
1489
|
function As(t) {
|
|
1494
|
-
|
|
1490
|
+
const e = we(Rt, null, !1);
|
|
1491
|
+
return S(e, D), e.teardown = t, e;
|
|
1495
1492
|
}
|
|
1496
1493
|
function Ns(t) {
|
|
1494
|
+
return we(ft | Qi, t, !1);
|
|
1495
|
+
}
|
|
1496
|
+
function Cs(t) {
|
|
1497
1497
|
xe.ensure();
|
|
1498
|
-
const e =
|
|
1498
|
+
const e = we(Fe | Qe, t, !0);
|
|
1499
1499
|
return (n = {}) => new Promise((r) => {
|
|
1500
|
-
n.outro ?
|
|
1501
|
-
|
|
1502
|
-
}) : (
|
|
1500
|
+
n.outro ? Tt(e, () => {
|
|
1501
|
+
he(e), r(void 0);
|
|
1502
|
+
}) : (he(e), r(void 0));
|
|
1503
1503
|
});
|
|
1504
1504
|
}
|
|
1505
|
-
function Cs(t) {
|
|
1506
|
-
return ke(pt, t, !1);
|
|
1507
|
-
}
|
|
1508
1505
|
function Rs(t) {
|
|
1509
|
-
return
|
|
1506
|
+
return we(ft, t, !1);
|
|
1507
|
+
}
|
|
1508
|
+
function Ds(t) {
|
|
1509
|
+
return we(on | Qe, t, !0);
|
|
1510
1510
|
}
|
|
1511
1511
|
function Ir(t, e = 0) {
|
|
1512
|
-
return
|
|
1512
|
+
return we(Rt | e, t, !0);
|
|
1513
1513
|
}
|
|
1514
1514
|
function Ar(t, e = [], n = [], r = []) {
|
|
1515
|
-
|
|
1516
|
-
|
|
1515
|
+
gs(r, e, n, (i) => {
|
|
1516
|
+
we(Rt, () => t(...i.map(E)), !0);
|
|
1517
1517
|
});
|
|
1518
1518
|
}
|
|
1519
|
-
function
|
|
1520
|
-
var n =
|
|
1519
|
+
function zs(t, e = 0) {
|
|
1520
|
+
var n = we(ge | e, t, !0);
|
|
1521
1521
|
return n;
|
|
1522
1522
|
}
|
|
1523
1523
|
function Ae(t) {
|
|
1524
|
-
return
|
|
1524
|
+
return we(Pe | Qe, t, !0);
|
|
1525
1525
|
}
|
|
1526
1526
|
function Nr(t) {
|
|
1527
1527
|
var e = t.teardown;
|
|
1528
1528
|
if (e !== null) {
|
|
1529
|
-
const n =
|
|
1529
|
+
const n = Xe, r = y;
|
|
1530
1530
|
Bn(!0), ne(null);
|
|
1531
1531
|
try {
|
|
1532
1532
|
e.call(null);
|
|
@@ -1543,22 +1543,22 @@ function mn(t, e = !1) {
|
|
|
1543
1543
|
i.abort(Ne);
|
|
1544
1544
|
});
|
|
1545
1545
|
var r = n.next;
|
|
1546
|
-
(n.f & Fe) !== 0 ? n.parent = null :
|
|
1546
|
+
(n.f & Fe) !== 0 ? n.parent = null : he(n, e), n = r;
|
|
1547
1547
|
}
|
|
1548
1548
|
}
|
|
1549
|
-
function
|
|
1549
|
+
function Os(t) {
|
|
1550
1550
|
for (var e = t.first; e !== null; ) {
|
|
1551
1551
|
var n = e.next;
|
|
1552
|
-
(e.f & Pe) === 0 &&
|
|
1552
|
+
(e.f & Pe) === 0 && he(e), e = n;
|
|
1553
1553
|
}
|
|
1554
1554
|
}
|
|
1555
|
-
function
|
|
1555
|
+
function he(t, e = !0) {
|
|
1556
1556
|
var n = !1;
|
|
1557
|
-
(e || (t.f & cr) !== 0) && t.nodes !== null && t.nodes.end !== null && (
|
|
1557
|
+
(e || (t.f & cr) !== 0) && t.nodes !== null && t.nodes.end !== null && (Ls(
|
|
1558
1558
|
t.nodes.start,
|
|
1559
1559
|
/** @type {TemplateNode} */
|
|
1560
1560
|
t.nodes.end
|
|
1561
|
-
), n = !0), mn(t, e && !n),
|
|
1561
|
+
), n = !0), mn(t, e && !n), lt(t, 0), S(t, Me);
|
|
1562
1562
|
var r = t.nodes && t.nodes.t;
|
|
1563
1563
|
if (r !== null)
|
|
1564
1564
|
for (const s of r)
|
|
@@ -1567,7 +1567,7 @@ function fe(t, e = !0) {
|
|
|
1567
1567
|
var i = t.parent;
|
|
1568
1568
|
i !== null && i.first !== null && Cr(t), t.next = t.prev = t.teardown = t.ctx = t.deps = t.fn = t.nodes = t.ac = null;
|
|
1569
1569
|
}
|
|
1570
|
-
function
|
|
1570
|
+
function Ls(t, e) {
|
|
1571
1571
|
for (; t !== null; ) {
|
|
1572
1572
|
var n = t === e ? null : /* @__PURE__ */ pn(t);
|
|
1573
1573
|
t.remove(), t = n;
|
|
@@ -1577,11 +1577,11 @@ function Cr(t) {
|
|
|
1577
1577
|
var e = t.parent, n = t.prev, r = t.next;
|
|
1578
1578
|
n !== null && (n.next = r), r !== null && (r.prev = n), e !== null && (e.first === t && (e.first = r), e.last === t && (e.last = n));
|
|
1579
1579
|
}
|
|
1580
|
-
function
|
|
1580
|
+
function Tt(t, e, n = !0) {
|
|
1581
1581
|
var r = [];
|
|
1582
1582
|
Rr(t, r, !0);
|
|
1583
1583
|
var i = () => {
|
|
1584
|
-
n &&
|
|
1584
|
+
n && he(t), e && e();
|
|
1585
1585
|
}, s = r.length;
|
|
1586
1586
|
if (s > 0) {
|
|
1587
1587
|
var a = () => --s || i();
|
|
@@ -1598,39 +1598,39 @@ function Rr(t, e, n) {
|
|
|
1598
1598
|
for (const u of r)
|
|
1599
1599
|
(u.is_global || n) && e.push(u);
|
|
1600
1600
|
for (var i = t.first; i !== null; ) {
|
|
1601
|
-
var s = i.next, a = (i.f &
|
|
1601
|
+
var s = i.next, a = (i.f & At) !== 0 || // If this is a branch effect without a block effect parent,
|
|
1602
1602
|
// it means the parent block effect was pruned. In that case,
|
|
1603
1603
|
// transparency information was transferred to the branch effect.
|
|
1604
|
-
(i.f & Pe) !== 0 && (t.f &
|
|
1604
|
+
(i.f & Pe) !== 0 && (t.f & ge) !== 0;
|
|
1605
1605
|
Rr(i, e, a ? n : !1), i = s;
|
|
1606
1606
|
}
|
|
1607
1607
|
}
|
|
1608
1608
|
}
|
|
1609
|
-
function
|
|
1609
|
+
function Fs(t, e) {
|
|
1610
1610
|
if (t.nodes)
|
|
1611
1611
|
for (var n = t.nodes.start, r = t.nodes.end; n !== null; ) {
|
|
1612
1612
|
var i = n === r ? null : /* @__PURE__ */ pn(n);
|
|
1613
1613
|
e.append(n), n = i;
|
|
1614
1614
|
}
|
|
1615
1615
|
}
|
|
1616
|
-
let
|
|
1616
|
+
let It = !1, Xe = !1;
|
|
1617
1617
|
function Bn(t) {
|
|
1618
|
-
|
|
1618
|
+
Xe = t;
|
|
1619
1619
|
}
|
|
1620
|
-
let
|
|
1620
|
+
let y = null, ae = !1;
|
|
1621
1621
|
function ne(t) {
|
|
1622
|
-
k = t;
|
|
1623
|
-
}
|
|
1624
|
-
let y = null;
|
|
1625
|
-
function he(t) {
|
|
1626
1622
|
y = t;
|
|
1627
1623
|
}
|
|
1628
|
-
let
|
|
1629
|
-
function
|
|
1630
|
-
|
|
1624
|
+
let b = null;
|
|
1625
|
+
function pe(t) {
|
|
1626
|
+
b = t;
|
|
1631
1627
|
}
|
|
1632
|
-
let
|
|
1628
|
+
let te = null;
|
|
1633
1629
|
function $s(t) {
|
|
1630
|
+
y !== null && (te === null ? te = [t] : te.push(t));
|
|
1631
|
+
}
|
|
1632
|
+
let U = null, Z = 0, K = null;
|
|
1633
|
+
function Vs(t) {
|
|
1634
1634
|
K = t;
|
|
1635
1635
|
}
|
|
1636
1636
|
let Dr = 1, Ce = 0, De = Ce;
|
|
@@ -1640,17 +1640,17 @@ function Hn(t) {
|
|
|
1640
1640
|
function zr() {
|
|
1641
1641
|
return ++Dr;
|
|
1642
1642
|
}
|
|
1643
|
-
function
|
|
1643
|
+
function ht(t) {
|
|
1644
1644
|
var e = t.f;
|
|
1645
1645
|
if ((e & F) !== 0)
|
|
1646
1646
|
return !0;
|
|
1647
|
-
if (e & z && (t.f &= ~Le), (e &
|
|
1647
|
+
if (e & z && (t.f &= ~Le), (e & oe) !== 0) {
|
|
1648
1648
|
for (var n = (
|
|
1649
1649
|
/** @type {Value[]} */
|
|
1650
1650
|
t.deps
|
|
1651
1651
|
), r = n.length, i = 0; i < r; i++) {
|
|
1652
1652
|
var s = n[i];
|
|
1653
|
-
if (
|
|
1653
|
+
if (ht(
|
|
1654
1654
|
/** @type {Derived} */
|
|
1655
1655
|
s
|
|
1656
1656
|
) && kr(
|
|
@@ -1661,13 +1661,13 @@ function dt(t) {
|
|
|
1661
1661
|
}
|
|
1662
1662
|
(e & ee) !== 0 && // During time traveling we don't want to reset the status so that
|
|
1663
1663
|
// traversal of the graph in the other batches still happens
|
|
1664
|
-
|
|
1664
|
+
se === null && S(t, D);
|
|
1665
1665
|
}
|
|
1666
1666
|
return !1;
|
|
1667
1667
|
}
|
|
1668
1668
|
function Or(t, e, n = !0) {
|
|
1669
1669
|
var r = t.reactions;
|
|
1670
|
-
if (r !== null && !(te !== null &&
|
|
1670
|
+
if (r !== null && !(te !== null && Ze.call(te, t)))
|
|
1671
1671
|
for (var i = 0; i < r.length; i++) {
|
|
1672
1672
|
var s = r[i];
|
|
1673
1673
|
(s.f & z) !== 0 ? Or(
|
|
@@ -1675,16 +1675,16 @@ function Or(t, e, n = !0) {
|
|
|
1675
1675
|
s,
|
|
1676
1676
|
e,
|
|
1677
1677
|
!1
|
|
1678
|
-
) : e === s && (n ? S(s, F) : (s.f & D) !== 0 && S(s,
|
|
1678
|
+
) : e === s && (n ? S(s, F) : (s.f & D) !== 0 && S(s, oe), fe(
|
|
1679
1679
|
/** @type {Effect} */
|
|
1680
1680
|
s
|
|
1681
1681
|
));
|
|
1682
1682
|
}
|
|
1683
1683
|
}
|
|
1684
1684
|
function Lr(t) {
|
|
1685
|
-
var e =
|
|
1686
|
-
|
|
1687
|
-
null, Z = 0, K = null,
|
|
1685
|
+
var e = U, n = Z, r = K, i = y, s = te, a = le, u = ae, o = De, l = t.f;
|
|
1686
|
+
U = /** @type {null | Value[]} */
|
|
1687
|
+
null, Z = 0, K = null, y = (l & (Pe | Fe)) === 0 ? t : null, te = null, Je(t.ctx), ae = !1, De = ++Ce, t.ac !== null && (Tr(() => {
|
|
1688
1688
|
t.ac.abort(Ne);
|
|
1689
1689
|
}), t.ac = null);
|
|
1690
1690
|
try {
|
|
@@ -1693,24 +1693,24 @@ function Lr(t) {
|
|
|
1693
1693
|
/** @type {Function} */
|
|
1694
1694
|
t.fn
|
|
1695
1695
|
), f = c();
|
|
1696
|
-
t.f |=
|
|
1697
|
-
var
|
|
1698
|
-
if (
|
|
1699
|
-
var
|
|
1700
|
-
if (m ||
|
|
1701
|
-
for (
|
|
1702
|
-
|
|
1696
|
+
t.f |= Ye;
|
|
1697
|
+
var h = t.deps, m = x?.is_fork;
|
|
1698
|
+
if (U !== null) {
|
|
1699
|
+
var d;
|
|
1700
|
+
if (m || lt(t, Z), h !== null && Z > 0)
|
|
1701
|
+
for (h.length = Z + U.length, d = 0; d < U.length; d++)
|
|
1702
|
+
h[Z + d] = U[d];
|
|
1703
1703
|
else
|
|
1704
|
-
t.deps =
|
|
1704
|
+
t.deps = h = U;
|
|
1705
1705
|
if (dn() && (t.f & ee) !== 0)
|
|
1706
|
-
for (
|
|
1707
|
-
(
|
|
1708
|
-
} else !m &&
|
|
1709
|
-
if (hr() && K !== null && !
|
|
1710
|
-
for (
|
|
1711
|
-
K.length;
|
|
1706
|
+
for (d = Z; d < h.length; d++)
|
|
1707
|
+
(h[d].reactions ??= []).push(t);
|
|
1708
|
+
} else !m && h !== null && Z < h.length && (lt(t, Z), h.length = Z);
|
|
1709
|
+
if (hr() && K !== null && !ae && h !== null && (t.f & (z | oe | F)) === 0)
|
|
1710
|
+
for (d = 0; d < /** @type {Source[]} */
|
|
1711
|
+
K.length; d++)
|
|
1712
1712
|
Or(
|
|
1713
|
-
K[
|
|
1713
|
+
K[d],
|
|
1714
1714
|
/** @type {Effect} */
|
|
1715
1715
|
t
|
|
1716
1716
|
);
|
|
@@ -1728,13 +1728,13 @@ function Lr(t) {
|
|
|
1728
1728
|
} catch (v) {
|
|
1729
1729
|
return pr(v);
|
|
1730
1730
|
} finally {
|
|
1731
|
-
t.f ^= tn,
|
|
1731
|
+
t.f ^= tn, U = e, Z = n, K = r, y = i, te = s, Je(a), ae = u, De = o;
|
|
1732
1732
|
}
|
|
1733
1733
|
}
|
|
1734
|
-
function
|
|
1734
|
+
function js(t, e) {
|
|
1735
1735
|
let n = e.reactions;
|
|
1736
1736
|
if (n !== null) {
|
|
1737
|
-
var r =
|
|
1737
|
+
var r = Hi.call(n, t);
|
|
1738
1738
|
if (r !== -1) {
|
|
1739
1739
|
var i = n.length - 1;
|
|
1740
1740
|
i === 0 ? n = e.reactions = null : (n[r] = n[i], n.pop());
|
|
@@ -1743,68 +1743,68 @@ function Vs(t, e) {
|
|
|
1743
1743
|
if (n === null && (e.f & z) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
|
|
1744
1744
|
// to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
|
|
1745
1745
|
// allows us to skip the expensive work of disconnecting and immediately reconnecting it
|
|
1746
|
-
(
|
|
1746
|
+
(U === null || !Ze.call(U, e))) {
|
|
1747
1747
|
var s = (
|
|
1748
1748
|
/** @type {Derived} */
|
|
1749
1749
|
e
|
|
1750
1750
|
);
|
|
1751
|
-
(s.f & ee) !== 0 && (s.f ^= ee, s.f &= ~Le), cn(s),
|
|
1751
|
+
(s.f & ee) !== 0 && (s.f ^= ee, s.f &= ~Le), cn(s), Es(s), lt(s, 0);
|
|
1752
1752
|
}
|
|
1753
1753
|
}
|
|
1754
|
-
function
|
|
1754
|
+
function lt(t, e) {
|
|
1755
1755
|
var n = t.deps;
|
|
1756
1756
|
if (n !== null)
|
|
1757
1757
|
for (var r = e; r < n.length; r++)
|
|
1758
|
-
|
|
1758
|
+
js(t, n[r]);
|
|
1759
1759
|
}
|
|
1760
|
-
function
|
|
1760
|
+
function Ke(t) {
|
|
1761
1761
|
var e = t.f;
|
|
1762
1762
|
if ((e & Me) === 0) {
|
|
1763
1763
|
S(t, D);
|
|
1764
|
-
var n =
|
|
1765
|
-
|
|
1764
|
+
var n = b, r = It;
|
|
1765
|
+
b = t, It = !0;
|
|
1766
1766
|
try {
|
|
1767
|
-
(e & (
|
|
1767
|
+
(e & (ge | ur)) !== 0 ? Os(t) : mn(t), Nr(t);
|
|
1768
1768
|
var i = Lr(t);
|
|
1769
1769
|
t.teardown = typeof i == "function" ? i : null, t.wv = Dr;
|
|
1770
1770
|
var s;
|
|
1771
|
-
Qt &&
|
|
1771
|
+
Qt && ls && (t.f & F) !== 0 && t.deps;
|
|
1772
1772
|
} finally {
|
|
1773
|
-
|
|
1773
|
+
It = r, b = n;
|
|
1774
1774
|
}
|
|
1775
1775
|
}
|
|
1776
1776
|
}
|
|
1777
1777
|
function E(t) {
|
|
1778
1778
|
var e = t.f, n = (e & z) !== 0;
|
|
1779
|
-
if (
|
|
1780
|
-
var r =
|
|
1781
|
-
if (!r && (te === null || !
|
|
1782
|
-
var i =
|
|
1783
|
-
if ((
|
|
1784
|
-
t.rv < Ce && (t.rv = Ce,
|
|
1779
|
+
if (y !== null && !ae) {
|
|
1780
|
+
var r = b !== null && (b.f & Me) !== 0;
|
|
1781
|
+
if (!r && (te === null || !Ze.call(te, t))) {
|
|
1782
|
+
var i = y.deps;
|
|
1783
|
+
if ((y.f & tn) !== 0)
|
|
1784
|
+
t.rv < Ce && (t.rv = Ce, U === null && i !== null && i[Z] === t ? Z++ : U === null ? U = [t] : U.push(t));
|
|
1785
1785
|
else {
|
|
1786
|
-
(
|
|
1786
|
+
(y.deps ??= []).push(t);
|
|
1787
1787
|
var s = t.reactions;
|
|
1788
|
-
s === null ? t.reactions = [
|
|
1788
|
+
s === null ? t.reactions = [y] : Ze.call(s, y) || s.push(y);
|
|
1789
1789
|
}
|
|
1790
1790
|
}
|
|
1791
1791
|
}
|
|
1792
|
-
if (
|
|
1792
|
+
if (Xe && Se.has(t))
|
|
1793
1793
|
return Se.get(t);
|
|
1794
1794
|
if (n) {
|
|
1795
1795
|
var a = (
|
|
1796
1796
|
/** @type {Derived} */
|
|
1797
1797
|
t
|
|
1798
1798
|
);
|
|
1799
|
-
if (
|
|
1799
|
+
if (Xe) {
|
|
1800
1800
|
var u = a.v;
|
|
1801
1801
|
return ((a.f & D) === 0 && a.reactions !== null || $r(a)) && (u = hn(a)), Se.set(a, u), u;
|
|
1802
1802
|
}
|
|
1803
|
-
var o = (a.f & ee) === 0 && !
|
|
1804
|
-
|
|
1803
|
+
var o = (a.f & ee) === 0 && !ae && y !== null && (It || (y.f & ee) !== 0), l = (a.f & Ye) === 0;
|
|
1804
|
+
ht(a) && (o && (a.f |= ee), kr(a)), o && !l && (yr(a), Fr(a));
|
|
1805
1805
|
}
|
|
1806
|
-
if (
|
|
1807
|
-
return
|
|
1806
|
+
if (se?.has(t))
|
|
1807
|
+
return se.get(t);
|
|
1808
1808
|
if ((t.f & Ee) !== 0)
|
|
1809
1809
|
throw t.v;
|
|
1810
1810
|
return t.v;
|
|
@@ -1832,18 +1832,18 @@ function $r(t) {
|
|
|
1832
1832
|
return !1;
|
|
1833
1833
|
}
|
|
1834
1834
|
function Q(t) {
|
|
1835
|
-
var e =
|
|
1835
|
+
var e = ae;
|
|
1836
1836
|
try {
|
|
1837
|
-
return
|
|
1837
|
+
return ae = !0, t();
|
|
1838
1838
|
} finally {
|
|
1839
|
-
|
|
1839
|
+
ae = e;
|
|
1840
1840
|
}
|
|
1841
1841
|
}
|
|
1842
|
-
const
|
|
1843
|
-
function
|
|
1844
|
-
return
|
|
1842
|
+
const Us = ["touchstart", "touchmove"];
|
|
1843
|
+
function Ws(t) {
|
|
1844
|
+
return Us.includes(t);
|
|
1845
1845
|
}
|
|
1846
|
-
const
|
|
1846
|
+
const Mt = /* @__PURE__ */ Symbol("events"), Bs = /* @__PURE__ */ new Set(), qn = /* @__PURE__ */ new Set();
|
|
1847
1847
|
let Zn = null;
|
|
1848
1848
|
function Yn(t) {
|
|
1849
1849
|
var e = this, n = (
|
|
@@ -1854,12 +1854,12 @@ function Yn(t) {
|
|
|
1854
1854
|
i[0] || t.target
|
|
1855
1855
|
);
|
|
1856
1856
|
Zn = t;
|
|
1857
|
-
var a = 0, u = Zn === t && t[
|
|
1857
|
+
var a = 0, u = Zn === t && t[Mt];
|
|
1858
1858
|
if (u) {
|
|
1859
1859
|
var o = i.indexOf(u);
|
|
1860
1860
|
if (o !== -1 && (e === document || e === /** @type {any} */
|
|
1861
1861
|
window)) {
|
|
1862
|
-
t[
|
|
1862
|
+
t[Mt] = e;
|
|
1863
1863
|
return;
|
|
1864
1864
|
}
|
|
1865
1865
|
var l = i.indexOf(e);
|
|
@@ -1869,64 +1869,64 @@ function Yn(t) {
|
|
|
1869
1869
|
}
|
|
1870
1870
|
if (s = /** @type {Element} */
|
|
1871
1871
|
i[a] || t.target, s !== e) {
|
|
1872
|
-
|
|
1872
|
+
Zi(t, "currentTarget", {
|
|
1873
1873
|
configurable: !0,
|
|
1874
1874
|
get() {
|
|
1875
1875
|
return s || n;
|
|
1876
1876
|
}
|
|
1877
1877
|
});
|
|
1878
|
-
var c =
|
|
1879
|
-
ne(null),
|
|
1878
|
+
var c = y, f = b;
|
|
1879
|
+
ne(null), pe(null);
|
|
1880
1880
|
try {
|
|
1881
|
-
for (var
|
|
1882
|
-
var
|
|
1881
|
+
for (var h, m = []; s !== null; ) {
|
|
1882
|
+
var d = s.assignedSlot || s.parentNode || /** @type {any} */
|
|
1883
1883
|
s.host || null;
|
|
1884
1884
|
try {
|
|
1885
|
-
var v = s[
|
|
1885
|
+
var v = s[Mt]?.[r];
|
|
1886
1886
|
v != null && (!/** @type {any} */
|
|
1887
1887
|
s.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
|
|
1888
1888
|
// -> the target could not have been disabled because it emits the event in the first place
|
|
1889
1889
|
t.target === s) && v.call(s, t);
|
|
1890
|
-
} catch (
|
|
1891
|
-
|
|
1890
|
+
} catch (g) {
|
|
1891
|
+
h ? m.push(g) : h = g;
|
|
1892
1892
|
}
|
|
1893
|
-
if (t.cancelBubble ||
|
|
1893
|
+
if (t.cancelBubble || d === e || d === null)
|
|
1894
1894
|
break;
|
|
1895
|
-
s =
|
|
1895
|
+
s = d;
|
|
1896
1896
|
}
|
|
1897
|
-
if (
|
|
1898
|
-
for (let
|
|
1897
|
+
if (h) {
|
|
1898
|
+
for (let g of m)
|
|
1899
1899
|
queueMicrotask(() => {
|
|
1900
|
-
throw
|
|
1900
|
+
throw g;
|
|
1901
1901
|
});
|
|
1902
|
-
throw
|
|
1902
|
+
throw h;
|
|
1903
1903
|
}
|
|
1904
1904
|
} finally {
|
|
1905
|
-
t[
|
|
1905
|
+
t[Mt] = e, delete t.currentTarget, ne(c), pe(f);
|
|
1906
1906
|
}
|
|
1907
1907
|
}
|
|
1908
1908
|
}
|
|
1909
|
-
const
|
|
1909
|
+
const Hs = (
|
|
1910
1910
|
// We gotta write it like this because after downleveling the pure comment may end up in the wrong location
|
|
1911
1911
|
globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", {
|
|
1912
1912
|
/** @param {string} html */
|
|
1913
1913
|
createHTML: (t) => t
|
|
1914
1914
|
})
|
|
1915
1915
|
);
|
|
1916
|
-
function
|
|
1916
|
+
function qs(t) {
|
|
1917
1917
|
return (
|
|
1918
1918
|
/** @type {string} */
|
|
1919
|
-
|
|
1919
|
+
Hs?.createHTML(t) ?? t
|
|
1920
1920
|
);
|
|
1921
1921
|
}
|
|
1922
|
-
function
|
|
1923
|
-
var e =
|
|
1924
|
-
return e.innerHTML =
|
|
1922
|
+
function Zs(t) {
|
|
1923
|
+
var e = Ts("template");
|
|
1924
|
+
return e.innerHTML = qs(t.replaceAll("<!>", "<!---->")), e.content;
|
|
1925
1925
|
}
|
|
1926
|
-
function
|
|
1926
|
+
function Ys(t, e) {
|
|
1927
1927
|
var n = (
|
|
1928
1928
|
/** @type {Effect} */
|
|
1929
|
-
|
|
1929
|
+
b
|
|
1930
1930
|
);
|
|
1931
1931
|
n.nodes === null && (n.nodes = { start: t, end: e, a: null, t: null });
|
|
1932
1932
|
}
|
|
@@ -1934,13 +1934,13 @@ function Zs(t, e) {
|
|
|
1934
1934
|
function Vr(t, e) {
|
|
1935
1935
|
var n, r = !t.startsWith("<!>");
|
|
1936
1936
|
return () => {
|
|
1937
|
-
n === void 0 && (n =
|
|
1937
|
+
n === void 0 && (n = Zs(r ? t : "<!>" + t), n = /** @type {TemplateNode} */
|
|
1938
1938
|
/* @__PURE__ */ Pr(n));
|
|
1939
1939
|
var i = (
|
|
1940
1940
|
/** @type {TemplateNode} */
|
|
1941
1941
|
Mr ? document.importNode(n, !0) : n.cloneNode(!0)
|
|
1942
1942
|
);
|
|
1943
|
-
return
|
|
1943
|
+
return Ys(i, i), i;
|
|
1944
1944
|
};
|
|
1945
1945
|
}
|
|
1946
1946
|
function jr(t, e) {
|
|
@@ -1950,14 +1950,14 @@ function jr(t, e) {
|
|
|
1950
1950
|
);
|
|
1951
1951
|
}
|
|
1952
1952
|
function vn(t, e) {
|
|
1953
|
-
return
|
|
1953
|
+
return Js(t, e);
|
|
1954
1954
|
}
|
|
1955
|
-
const
|
|
1956
|
-
function
|
|
1957
|
-
|
|
1958
|
-
var o = void 0, l =
|
|
1955
|
+
const Et = /* @__PURE__ */ new Map();
|
|
1956
|
+
function Js(t, { target: e, anchor: n, props: r = {}, events: i, context: s, intro: a = !0, transformError: u }) {
|
|
1957
|
+
Ss();
|
|
1958
|
+
var o = void 0, l = Cs(() => {
|
|
1959
1959
|
var c = n ?? e.appendChild(Sr());
|
|
1960
|
-
|
|
1960
|
+
ms(
|
|
1961
1961
|
/** @type {TemplateNode} */
|
|
1962
1962
|
c,
|
|
1963
1963
|
{
|
|
@@ -1966,47 +1966,47 @@ function Ys(t, { target: e, anchor: n, props: r = {}, events: i, context: s, int
|
|
|
1966
1966
|
},
|
|
1967
1967
|
(m) => {
|
|
1968
1968
|
ln({});
|
|
1969
|
-
var
|
|
1969
|
+
var d = (
|
|
1970
1970
|
/** @type {ComponentContext} */
|
|
1971
|
-
|
|
1971
|
+
le
|
|
1972
1972
|
);
|
|
1973
|
-
s && (
|
|
1973
|
+
s && (d.c = s), i && (r.$$events = i), o = t(m, r) || {}, un();
|
|
1974
1974
|
},
|
|
1975
1975
|
u
|
|
1976
1976
|
);
|
|
1977
|
-
var f = /* @__PURE__ */ new Set(),
|
|
1978
|
-
for (var
|
|
1979
|
-
var v = m[
|
|
1977
|
+
var f = /* @__PURE__ */ new Set(), h = (m) => {
|
|
1978
|
+
for (var d = 0; d < m.length; d++) {
|
|
1979
|
+
var v = m[d];
|
|
1980
1980
|
if (!f.has(v)) {
|
|
1981
1981
|
f.add(v);
|
|
1982
|
-
var
|
|
1983
|
-
for (const
|
|
1984
|
-
var
|
|
1985
|
-
|
|
1986
|
-
var J =
|
|
1987
|
-
J === void 0 ? (
|
|
1982
|
+
var g = Ws(v);
|
|
1983
|
+
for (const ue of [e, document]) {
|
|
1984
|
+
var I = Et.get(ue);
|
|
1985
|
+
I === void 0 && (I = /* @__PURE__ */ new Map(), Et.set(ue, I));
|
|
1986
|
+
var J = I.get(v);
|
|
1987
|
+
J === void 0 ? (ue.addEventListener(v, Yn, { passive: g }), I.set(v, 1)) : I.set(v, J + 1);
|
|
1988
1988
|
}
|
|
1989
1989
|
}
|
|
1990
1990
|
}
|
|
1991
1991
|
};
|
|
1992
|
-
return
|
|
1992
|
+
return h(qi(Bs)), qn.add(h), () => {
|
|
1993
1993
|
for (var m of f)
|
|
1994
|
-
for (const
|
|
1995
|
-
var
|
|
1994
|
+
for (const g of [e, document]) {
|
|
1995
|
+
var d = (
|
|
1996
1996
|
/** @type {Map<string, number>} */
|
|
1997
|
-
|
|
1997
|
+
Et.get(g)
|
|
1998
1998
|
), v = (
|
|
1999
1999
|
/** @type {number} */
|
|
2000
|
-
|
|
2000
|
+
d.get(m)
|
|
2001
2001
|
);
|
|
2002
|
-
--v == 0 ? (
|
|
2002
|
+
--v == 0 ? (g.removeEventListener(m, Yn), d.delete(m), d.size === 0 && Et.delete(g)) : d.set(m, v);
|
|
2003
2003
|
}
|
|
2004
|
-
qn.delete(
|
|
2004
|
+
qn.delete(h), c !== n && c.parentNode?.removeChild(c);
|
|
2005
2005
|
};
|
|
2006
2006
|
});
|
|
2007
|
-
return
|
|
2007
|
+
return Xs.set(o, l), o;
|
|
2008
2008
|
}
|
|
2009
|
-
let
|
|
2009
|
+
let Xs = /* @__PURE__ */ new WeakMap();
|
|
2010
2010
|
function Ur(t) {
|
|
2011
2011
|
var e, n, r = "";
|
|
2012
2012
|
if (typeof t == "string" || typeof t == "number") r += t;
|
|
@@ -2016,14 +2016,14 @@ function Ur(t) {
|
|
|
2016
2016
|
} else for (n in t) t[n] && (r && (r += " "), r += n);
|
|
2017
2017
|
return r;
|
|
2018
2018
|
}
|
|
2019
|
-
function
|
|
2019
|
+
function Ks() {
|
|
2020
2020
|
for (var t, e, n = 0, r = "", i = arguments.length; n < i; n++) (t = arguments[n]) && (e = Ur(t)) && (r && (r += " "), r += e);
|
|
2021
2021
|
return r;
|
|
2022
2022
|
}
|
|
2023
2023
|
function Wr(t) {
|
|
2024
|
-
return typeof t == "object" ?
|
|
2024
|
+
return typeof t == "object" ? Ks(t) : t ?? "";
|
|
2025
2025
|
}
|
|
2026
|
-
function
|
|
2026
|
+
function Gs(t, e, n) {
|
|
2027
2027
|
var r = t == null ? "" : "" + t;
|
|
2028
2028
|
return e && (r = r ? r + " " + e : e), r === "" ? null : r;
|
|
2029
2029
|
}
|
|
@@ -2035,7 +2035,7 @@ function Jn(t, e = !1) {
|
|
|
2035
2035
|
}
|
|
2036
2036
|
return r;
|
|
2037
2037
|
}
|
|
2038
|
-
function
|
|
2038
|
+
function Qs(t, e) {
|
|
2039
2039
|
if (e) {
|
|
2040
2040
|
var n = "", r, i;
|
|
2041
2041
|
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;
|
|
@@ -2045,7 +2045,7 @@ function Gs(t, e) {
|
|
|
2045
2045
|
function Br(t, e, n, r, i, s) {
|
|
2046
2046
|
var a = t.__className;
|
|
2047
2047
|
if (a !== n || a === void 0) {
|
|
2048
|
-
var u =
|
|
2048
|
+
var u = Gs(n, r);
|
|
2049
2049
|
u == null ? t.removeAttribute("class") : t.className = u, t.__className = n;
|
|
2050
2050
|
}
|
|
2051
2051
|
return s;
|
|
@@ -2056,19 +2056,19 @@ function Yt(t, e = {}, n, r) {
|
|
|
2056
2056
|
e[i] !== s && (n[i] == null ? t.style.removeProperty(i) : t.style.setProperty(i, s, r));
|
|
2057
2057
|
}
|
|
2058
2058
|
}
|
|
2059
|
-
function
|
|
2059
|
+
function nt(t, e, n, r) {
|
|
2060
2060
|
var i = t.__style;
|
|
2061
2061
|
if (i !== e) {
|
|
2062
|
-
var s =
|
|
2062
|
+
var s = Qs(e, r);
|
|
2063
2063
|
s == null ? t.removeAttribute("style") : t.style.cssText = s, t.__style = e;
|
|
2064
2064
|
} else r && (Array.isArray(r) ? (Yt(t, n?.[0], r[0]), Yt(t, n?.[1], r[1], "important")) : Yt(t, n, r));
|
|
2065
2065
|
return r;
|
|
2066
2066
|
}
|
|
2067
2067
|
function Xn(t, e) {
|
|
2068
|
-
return t === e || t?.[
|
|
2068
|
+
return t === e || t?.[Pt] === e;
|
|
2069
2069
|
}
|
|
2070
|
-
function
|
|
2071
|
-
return
|
|
2070
|
+
function rt(t = {}, e, n, r) {
|
|
2071
|
+
return Rs(() => {
|
|
2072
2072
|
var i, s;
|
|
2073
2073
|
return Ir(() => {
|
|
2074
2074
|
i = s, s = [], Q(() => {
|
|
@@ -2097,7 +2097,7 @@ class gn {
|
|
|
2097
2097
|
this.marker.update(e);
|
|
2098
2098
|
}
|
|
2099
2099
|
}
|
|
2100
|
-
class
|
|
2100
|
+
class pt {
|
|
2101
2101
|
shown;
|
|
2102
2102
|
id;
|
|
2103
2103
|
lat;
|
|
@@ -2105,12 +2105,12 @@ class mt {
|
|
|
2105
2105
|
rank;
|
|
2106
2106
|
marker;
|
|
2107
2107
|
constructor(e, n, r, i, s) {
|
|
2108
|
-
if (new.target ===
|
|
2108
|
+
if (new.target === pt) throw new Error("Unsupported code");
|
|
2109
2109
|
this.shown = !0, this.id = e, this.lat = n, this.lng = r, this.rank = i, this.marker = s;
|
|
2110
2110
|
}
|
|
2111
2111
|
}
|
|
2112
|
-
const
|
|
2113
|
-
typeof window < "u" && ((window.__svelte ??= {}).v ??= /* @__PURE__ */ new Set()).add(
|
|
2112
|
+
const ea = "5";
|
|
2113
|
+
typeof window < "u" && ((window.__svelte ??= {}).v ??= /* @__PURE__ */ new Set()).add(ea);
|
|
2114
2114
|
function Hr(t) {
|
|
2115
2115
|
return -0.5 * (Math.cos(Math.PI * t) - 1);
|
|
2116
2116
|
}
|
|
@@ -2158,97 +2158,97 @@ class qr {
|
|
|
2158
2158
|
return performance.now() > this.time.end;
|
|
2159
2159
|
}
|
|
2160
2160
|
}
|
|
2161
|
-
var
|
|
2162
|
-
function
|
|
2161
|
+
var ta = /* @__PURE__ */ Vr("<div></div>");
|
|
2162
|
+
function na(t, e) {
|
|
2163
2163
|
ln(e, !0);
|
|
2164
2164
|
let n = Q(() => e.id), r = Q(() => e.element), i = Q(() => e.style), s = Q(() => e.dimensions), a = Q(() => e.initialize), u = {
|
|
2165
2165
|
setDisplayed: J,
|
|
2166
|
-
getDisplayed:
|
|
2166
|
+
getDisplayed: ue,
|
|
2167
2167
|
setSuppressed: de,
|
|
2168
|
-
setCollapsed:
|
|
2169
|
-
getCollapsed:
|
|
2170
|
-
setScale:
|
|
2168
|
+
setCollapsed: ke,
|
|
2169
|
+
getCollapsed: ye,
|
|
2170
|
+
setScale: zt
|
|
2171
2171
|
};
|
|
2172
2172
|
function o() {
|
|
2173
2173
|
return u;
|
|
2174
2174
|
}
|
|
2175
|
-
let l, c = s.width, f = s.height,
|
|
2175
|
+
let l, c = s.width, f = s.height, h = s.padding, m = i?.background ?? Ui, d = i?.radius ?? Li, v = i?.shadow ?? Fi, g = /* @__PURE__ */ j(!1), I = !1;
|
|
2176
2176
|
function J(_) {
|
|
2177
|
-
_ == !0 && (l && r && r.parentElement != l && l.appendChild(r),
|
|
2177
|
+
_ == !0 && (l && r && r.parentElement != l && l.appendChild(r), I == !1 && a && r && (I = !0, setTimeout(async () => await a(n, r), 0))), _ != E(g) && (W(g, _, !0), _ == !1 && V.end());
|
|
2178
2178
|
}
|
|
2179
|
-
function
|
|
2180
|
-
return E(
|
|
2179
|
+
function ue() {
|
|
2180
|
+
return E(g);
|
|
2181
2181
|
}
|
|
2182
|
-
let
|
|
2182
|
+
let Te = /* @__PURE__ */ j(!0);
|
|
2183
2183
|
function de(_) {
|
|
2184
|
-
_ != E(
|
|
2184
|
+
_ != E(Te) && (W(Te, _, !0), _ && (ie = Ve, V.set(Ve)));
|
|
2185
2185
|
}
|
|
2186
|
-
let
|
|
2187
|
-
function
|
|
2188
|
-
_ != E(
|
|
2186
|
+
let re = /* @__PURE__ */ j(!0);
|
|
2187
|
+
function ke(_) {
|
|
2188
|
+
_ != E(re) && (W(re, _, !0), V.target(E(re) ? 0 : ie));
|
|
2189
2189
|
}
|
|
2190
|
-
function
|
|
2191
|
-
return E(
|
|
2190
|
+
function ye() {
|
|
2191
|
+
return E(g) ? V.expired() : !0;
|
|
2192
2192
|
}
|
|
2193
|
-
let
|
|
2194
|
-
value:
|
|
2193
|
+
let ie = Ve, V = new qr({
|
|
2194
|
+
value: Ve,
|
|
2195
2195
|
min: 0,
|
|
2196
2196
|
max: 1,
|
|
2197
|
-
timespan:
|
|
2197
|
+
timespan: Ri,
|
|
2198
2198
|
easing: Hr,
|
|
2199
|
-
callback:
|
|
2199
|
+
callback: Ot
|
|
2200
2200
|
});
|
|
2201
|
-
function
|
|
2202
|
-
|
|
2201
|
+
function zt(_) {
|
|
2202
|
+
ie = _, V.target(_);
|
|
2203
2203
|
}
|
|
2204
|
-
function
|
|
2205
|
-
l.style.scale = _.toString(), l.style.filter = `brightness(${
|
|
2204
|
+
function Ot(_) {
|
|
2205
|
+
l.style.scale = _.toString(), l.style.filter = `brightness(${dt(_)})`;
|
|
2206
2206
|
}
|
|
2207
|
-
function
|
|
2207
|
+
function dt(_) {
|
|
2208
2208
|
return 0.25 + 0.75 * _;
|
|
2209
2209
|
}
|
|
2210
|
-
var
|
|
2211
|
-
let
|
|
2212
|
-
return
|
|
2210
|
+
var Lt = { invoke: o }, X = ta();
|
|
2211
|
+
let mt;
|
|
2212
|
+
return rt(X, (_) => l = _, () => l), Ar(
|
|
2213
2213
|
(_) => {
|
|
2214
2214
|
Br(
|
|
2215
|
-
|
|
2215
|
+
X,
|
|
2216
2216
|
1,
|
|
2217
2217
|
Wr([
|
|
2218
2218
|
"pin",
|
|
2219
|
-
E(
|
|
2220
|
-
E(
|
|
2219
|
+
E(g) && "displayed",
|
|
2220
|
+
E(Te) && "suppressed"
|
|
2221
2221
|
]),
|
|
2222
2222
|
"svelte-10kxbrm"
|
|
2223
|
-
),
|
|
2223
|
+
), mt = nt(X, "", mt, _);
|
|
2224
2224
|
},
|
|
2225
2225
|
[
|
|
2226
2226
|
() => ({
|
|
2227
2227
|
width: `${c}px`,
|
|
2228
2228
|
height: `${f}px`,
|
|
2229
|
-
padding: `${
|
|
2230
|
-
"border-radius": `${
|
|
2229
|
+
padding: `${h}px`,
|
|
2230
|
+
"border-radius": `${d}px`,
|
|
2231
2231
|
"background-color": `rgb(from ${m} r g b / 1)`,
|
|
2232
2232
|
"box-shadow": v,
|
|
2233
|
-
scale:
|
|
2234
|
-
filter: `brightness(${
|
|
2233
|
+
scale: Ve,
|
|
2234
|
+
filter: `brightness(${dt(Ve)})`
|
|
2235
2235
|
})
|
|
2236
2236
|
]
|
|
2237
|
-
), jr(t,
|
|
2237
|
+
), jr(t, X), un(Lt);
|
|
2238
2238
|
}
|
|
2239
|
-
class
|
|
2239
|
+
class ra extends pt {
|
|
2240
2240
|
width;
|
|
2241
2241
|
height;
|
|
2242
2242
|
zoom;
|
|
2243
2243
|
component;
|
|
2244
2244
|
constructor(e, n, r, i, s, a) {
|
|
2245
|
-
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(
|
|
2245
|
+
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(na, {
|
|
2246
2246
|
target: this.marker.div,
|
|
2247
2247
|
props: a
|
|
2248
2248
|
});
|
|
2249
2249
|
}
|
|
2250
2250
|
get zIndex() {
|
|
2251
|
-
return Number.isNaN(this.zoom) ? this.rank : Math.round(-this.zoom * or) +
|
|
2251
|
+
return Number.isNaN(this.zoom) ? this.rank : Math.round(-this.zoom * or) + zi;
|
|
2252
2252
|
}
|
|
2253
2253
|
}
|
|
2254
2254
|
class Kn {
|
|
@@ -2310,121 +2310,121 @@ function an(t, e, n) {
|
|
|
2310
2310
|
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);
|
|
2311
2311
|
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 };
|
|
2312
2312
|
}
|
|
2313
|
-
var
|
|
2313
|
+
var ia = /* @__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>');
|
|
2314
2314
|
function Zr(t, e) {
|
|
2315
2315
|
ln(e, !0);
|
|
2316
2316
|
let n = Q(() => e.id), r = Q(() => e.element), i = Q(() => e.style), s = Q(() => e.dimensions), a = Q(() => e.initialize), u = {
|
|
2317
|
-
setDisplayed:
|
|
2318
|
-
getDisplayed:
|
|
2319
|
-
setCollapsed:
|
|
2320
|
-
getCollapsed:
|
|
2321
|
-
getExpanded:
|
|
2322
|
-
setAngle:
|
|
2317
|
+
setDisplayed: ui,
|
|
2318
|
+
getDisplayed: ci,
|
|
2319
|
+
setCollapsed: fi,
|
|
2320
|
+
getCollapsed: hi,
|
|
2321
|
+
getExpanded: pi,
|
|
2322
|
+
setAngle: mi
|
|
2323
2323
|
};
|
|
2324
2324
|
function o() {
|
|
2325
2325
|
return u;
|
|
2326
2326
|
}
|
|
2327
|
-
let l, c, f,
|
|
2328
|
-
const
|
|
2329
|
-
let bn = !1,
|
|
2330
|
-
function
|
|
2331
|
-
|
|
2332
|
-
}
|
|
2333
|
-
function ui() {
|
|
2334
|
-
return E(Ve);
|
|
2327
|
+
let l, c, f, h;
|
|
2328
|
+
const m = Math.min(4, 1 + 3 * (s.width * s.height) / 65536), d = i?.filter ?? ji, v = s.width + 2 * s.padding, g = s.height + 2 * s.padding, I = s.padding, J = s.width, ue = s.height, Te = i?.radius ?? 0, de = s.width, re = s.height, ke = Math.min(i?.radius ?? $i, Math.min(de, re) / 2), ye = Math.min(1, 2 * ke / Math.min(re, de)), ie = i?.background ?? Ln, V = s.padding * 2, zt = s.padding * 0.5 * ye, Ot = i?.background ?? Ln, dt = g < v ? g / v : 1, Lt = v < g ? v / g : 1, X = Math.min(v, g) / 2, mt = X * Math.SQRT2, _ = 15, li = 15 * Math.SQRT2;
|
|
2329
|
+
let bn = !1, $e = /* @__PURE__ */ j(!1);
|
|
2330
|
+
function ui(w) {
|
|
2331
|
+
w != E($e) && (W($e, w, !0), w == !0 && (r && r.parentElement != c && c.appendChild(r), bn == !1 && a && r && (bn = !0, setTimeout(async () => await a(n, r), 0))), w == !1 && (vt.end(), jt.end(), Wt.end()));
|
|
2335
2332
|
}
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
g != E(Ft) && (U(Ft, g, !0), gt.target(E(Ft) ? 0 : 1));
|
|
2333
|
+
function ci() {
|
|
2334
|
+
return E($e);
|
|
2339
2335
|
}
|
|
2340
|
-
|
|
2341
|
-
|
|
2336
|
+
let Ft = /* @__PURE__ */ j(!0);
|
|
2337
|
+
function fi(w) {
|
|
2338
|
+
w != E(Ft) && (W(Ft, w, !0), vt.target(E(Ft) ? 0 : 1));
|
|
2342
2339
|
}
|
|
2343
2340
|
function hi() {
|
|
2344
|
-
return E(
|
|
2341
|
+
return E($e) ? vt.expired() : !0;
|
|
2342
|
+
}
|
|
2343
|
+
function pi() {
|
|
2344
|
+
return E($e) ? vt.expired() : !1;
|
|
2345
2345
|
}
|
|
2346
|
-
let
|
|
2346
|
+
let vt = new qr({
|
|
2347
2347
|
value: 0,
|
|
2348
2348
|
min: 0,
|
|
2349
2349
|
max: 1,
|
|
2350
|
-
timespan:
|
|
2350
|
+
timespan: Di * Math.cbrt(m),
|
|
2351
2351
|
easing: Hr,
|
|
2352
|
-
callback:
|
|
2352
|
+
callback: di
|
|
2353
2353
|
});
|
|
2354
|
-
function
|
|
2355
|
-
l.style.opacity = `${
|
|
2354
|
+
function di(w) {
|
|
2355
|
+
l.style.opacity = `${w}`, l.style.scale = `${w}`, c.style.opacity = `${w}`;
|
|
2356
2356
|
}
|
|
2357
|
-
let
|
|
2358
|
-
value: -h / 2,
|
|
2359
|
-
min: -h,
|
|
2360
|
-
max: 0,
|
|
2361
|
-
precision: 1,
|
|
2362
|
-
stiffness: Rn,
|
|
2363
|
-
callback: mi
|
|
2364
|
-
}), Ut = -v / 2, Wt = new Kn({
|
|
2357
|
+
let gt = NaN, $t = /* @__PURE__ */ j(!1), Vt = -v / 2, jt = new Kn({
|
|
2365
2358
|
value: -v / 2,
|
|
2366
2359
|
min: -v,
|
|
2367
2360
|
max: 0,
|
|
2368
2361
|
precision: 1,
|
|
2369
|
-
stiffness: Rn,
|
|
2362
|
+
stiffness: Rn / m,
|
|
2370
2363
|
callback: vi
|
|
2364
|
+
}), Ut = -g / 2, Wt = new Kn({
|
|
2365
|
+
value: -g / 2,
|
|
2366
|
+
min: -g,
|
|
2367
|
+
max: 0,
|
|
2368
|
+
precision: 1,
|
|
2369
|
+
stiffness: Rn / m,
|
|
2370
|
+
callback: gi
|
|
2371
2371
|
});
|
|
2372
|
-
function
|
|
2373
|
-
if (Number.isNaN(
|
|
2374
|
-
|
|
2372
|
+
function mi(w, wt) {
|
|
2373
|
+
if (Number.isNaN(w)) {
|
|
2374
|
+
gt = NaN, W($t, !1);
|
|
2375
2375
|
return;
|
|
2376
2376
|
}
|
|
2377
|
-
if (E($t) == !1 ||
|
|
2378
|
-
|
|
2379
|
-
const Ie = an(
|
|
2377
|
+
if (E($t) == !1 || wt == !0) {
|
|
2378
|
+
W($t, !0), gt = w;
|
|
2379
|
+
const Ie = an(v, g, w);
|
|
2380
2380
|
jt.set(Math.round(Ie.x)), Wt.set(Math.round(Ie.y));
|
|
2381
2381
|
return;
|
|
2382
2382
|
}
|
|
2383
|
-
if (
|
|
2384
|
-
|
|
2385
|
-
const Ie = an(
|
|
2383
|
+
if (gt != w) {
|
|
2384
|
+
gt = w;
|
|
2385
|
+
const Ie = an(v, g, w);
|
|
2386
2386
|
jt.target(Math.round(Ie.x)), Wt.target(Math.round(Ie.y));
|
|
2387
2387
|
return;
|
|
2388
2388
|
}
|
|
2389
2389
|
}
|
|
2390
|
-
function
|
|
2391
|
-
Vt =
|
|
2390
|
+
function vi(w) {
|
|
2391
|
+
Vt = w, _n(Vt, Ut);
|
|
2392
2392
|
}
|
|
2393
|
-
function
|
|
2394
|
-
Ut =
|
|
2393
|
+
function gi(w) {
|
|
2394
|
+
Ut = w, _n(Vt, Ut);
|
|
2395
2395
|
}
|
|
2396
|
-
function _n(
|
|
2397
|
-
const Ie =
|
|
2398
|
-
|
|
2396
|
+
function _n(w, wt) {
|
|
2397
|
+
const Ie = w + v / 2, ki = wt + g / 2, kt = Ie * dt, yt = ki * Lt, qt = Math.sqrt(kt * kt + yt * yt), Tn = (qt - X) / (mt - X), yi = Math.atan2(yt, kt) / Math.PI * 180 - 45, In = _ + Tn * (li - _), bi = qt < X ? qt / X : 1, An = 0.5 * ((1 + 0.5 * ye) * Tn), _i = w + I * (1 - An * (kt / X)), Mi = wt + I * (1 - An * (yt / X));
|
|
2398
|
+
h.style.transform = `scale(${bi}) rotate(${yi}deg) skew(${In}deg, ${In}deg)`, f.style.transform = `translate(${Math.round(_i)}px, ${Math.round(Mi)}px)`;
|
|
2399
2399
|
}
|
|
2400
|
-
var
|
|
2400
|
+
var wi = { invoke: o }, et = ia();
|
|
2401
2401
|
let Mn;
|
|
2402
|
-
var Bt = Wn(
|
|
2402
|
+
var Bt = Wn(et);
|
|
2403
2403
|
let En;
|
|
2404
|
-
|
|
2405
|
-
var Ht =
|
|
2404
|
+
rt(Bt, (w) => h = w, () => h);
|
|
2405
|
+
var Ht = Ps(Bt, 2);
|
|
2406
2406
|
let xn;
|
|
2407
2407
|
var Sn = Wn(Ht);
|
|
2408
2408
|
let Pn;
|
|
2409
|
-
return
|
|
2410
|
-
Br(
|
|
2411
|
-
width: `${
|
|
2412
|
-
height: `${
|
|
2413
|
-
"border-radius": `${
|
|
2409
|
+
return rt(Sn, (w) => c = w, () => c), rt(Ht, (w) => f = w, () => f), rt(et, (w) => l = w, () => l), Ar(() => {
|
|
2410
|
+
Br(et, 1, Wr(["element anchor", E($e) && "displayed"]), "svelte-1no6o2a"), Mn = nt(et, "", Mn, { filter: d }), En = nt(Bt, "", En, {
|
|
2411
|
+
width: `${V}px`,
|
|
2412
|
+
height: `${V}px`,
|
|
2413
|
+
"border-radius": `${zt}px`,
|
|
2414
2414
|
"background-color": `rgb(from ${Ot} r g b / 1)`
|
|
2415
|
-
}), xn =
|
|
2416
|
-
width: `${
|
|
2417
|
-
height: `${
|
|
2418
|
-
"border-radius": `${
|
|
2419
|
-
"background-color": `rgb(from ${
|
|
2420
|
-
}), Pn =
|
|
2421
|
-
width: `${
|
|
2422
|
-
height: `${
|
|
2423
|
-
"border-radius": `${
|
|
2415
|
+
}), xn = nt(Ht, "", xn, {
|
|
2416
|
+
width: `${de}px`,
|
|
2417
|
+
height: `${re}px`,
|
|
2418
|
+
"border-radius": `${ke}px`,
|
|
2419
|
+
"background-color": `rgb(from ${ie} r g b / 1)`
|
|
2420
|
+
}), Pn = nt(Sn, "", Pn, {
|
|
2421
|
+
width: `${J}px`,
|
|
2422
|
+
height: `${ue}px`,
|
|
2423
|
+
"border-radius": `${Te}px`
|
|
2424
2424
|
});
|
|
2425
|
-
}), jr(t,
|
|
2425
|
+
}), jr(t, et), un(wi);
|
|
2426
2426
|
}
|
|
2427
|
-
class
|
|
2427
|
+
class sa extends pt {
|
|
2428
2428
|
width;
|
|
2429
2429
|
height;
|
|
2430
2430
|
zoom;
|
|
@@ -2438,10 +2438,10 @@ class ia extends mt {
|
|
|
2438
2438
|
});
|
|
2439
2439
|
}
|
|
2440
2440
|
get zIndex() {
|
|
2441
|
-
return Number.isNaN(this.zoom) ? this.rank : Math.round(-this.zoom * or) +
|
|
2441
|
+
return Number.isNaN(this.zoom) ? this.rank : Math.round(-this.zoom * or) + Oi;
|
|
2442
2442
|
}
|
|
2443
2443
|
}
|
|
2444
|
-
class
|
|
2444
|
+
class aa extends pt {
|
|
2445
2445
|
width;
|
|
2446
2446
|
height;
|
|
2447
2447
|
padding;
|
|
@@ -2457,7 +2457,7 @@ class sa extends mt {
|
|
|
2457
2457
|
return Dn;
|
|
2458
2458
|
}
|
|
2459
2459
|
}
|
|
2460
|
-
class
|
|
2460
|
+
class oa {
|
|
2461
2461
|
id;
|
|
2462
2462
|
state = void 0;
|
|
2463
2463
|
pin;
|
|
@@ -2465,11 +2465,11 @@ class aa {
|
|
|
2465
2465
|
popup;
|
|
2466
2466
|
constructor(e, n) {
|
|
2467
2467
|
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;
|
|
2468
|
-
this.id = r, this.pin = new
|
|
2468
|
+
this.id = r, this.pin = new ra(e, r, i, s, a, u), this.tooltip = new sa(e, r, i, s, a, o), this.popup = l ? new aa(e, r, i, s, a, l) : void 0;
|
|
2469
2469
|
}
|
|
2470
2470
|
}
|
|
2471
2471
|
const Jt = 4;
|
|
2472
|
-
class
|
|
2472
|
+
class la {
|
|
2473
2473
|
// Elements
|
|
2474
2474
|
pins = /* @__PURE__ */ new Set();
|
|
2475
2475
|
// Configuration
|
|
@@ -2498,7 +2498,7 @@ class oa {
|
|
|
2498
2498
|
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));
|
|
2499
2499
|
}
|
|
2500
2500
|
render(e, n) {
|
|
2501
|
-
const r = e.zoom, i = n.mapSize, s =
|
|
2501
|
+
const r = e.zoom, i = n.mapSize, s = ot.offset(e, i, {
|
|
2502
2502
|
top: this.pinMaxHeight,
|
|
2503
2503
|
bottom: this.pinMaxHeight,
|
|
2504
2504
|
right: this.pinMaxWidth,
|
|
@@ -2508,8 +2508,8 @@ class oa {
|
|
|
2508
2508
|
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());
|
|
2509
2509
|
}
|
|
2510
2510
|
}
|
|
2511
|
-
var
|
|
2512
|
-
class
|
|
2511
|
+
var ua = (t) => 9;
|
|
2512
|
+
class ca {
|
|
2513
2513
|
// Elements
|
|
2514
2514
|
tooltips = /* @__PURE__ */ new Set();
|
|
2515
2515
|
// Configuration
|
|
@@ -2532,7 +2532,7 @@ class ua {
|
|
|
2532
2532
|
this.tooltipMaxWidth = e.reduce((n, r) => Math.max(n, r.width), 0), this.tooltipMaxHeight = e.reduce((n, r) => Math.max(n, r.height), 0);
|
|
2533
2533
|
}
|
|
2534
2534
|
render(e, n) {
|
|
2535
|
-
const r = e.zoom, i = n.mapSize, s =
|
|
2535
|
+
const r = e.zoom, i = n.mapSize, s = ot.offset(e, i, {
|
|
2536
2536
|
top: this.tooltipMaxHeight,
|
|
2537
2537
|
bottom: this.tooltipMaxHeight,
|
|
2538
2538
|
right: this.tooltipMaxWidth,
|
|
@@ -2550,7 +2550,7 @@ class ua {
|
|
|
2550
2550
|
a.component.invoke().setDisplayed(!1), a.marker.remove();
|
|
2551
2551
|
}
|
|
2552
2552
|
}
|
|
2553
|
-
class
|
|
2553
|
+
class fa {
|
|
2554
2554
|
// Elements
|
|
2555
2555
|
popups = /* @__PURE__ */ new Set();
|
|
2556
2556
|
// Configuration
|
|
@@ -2569,11 +2569,11 @@ class ca {
|
|
|
2569
2569
|
}
|
|
2570
2570
|
show(e, n) {
|
|
2571
2571
|
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;
|
|
2572
|
-
const r = e.popup, i = n.getViewport(), s = i.bounds, a = i.zoom, o = n.getParameters().mapSize * Math.pow(2, a), l =
|
|
2573
|
-
let
|
|
2574
|
-
f < m ?
|
|
2575
|
-
let
|
|
2576
|
-
|
|
2572
|
+
const r = e.popup, i = n.getViewport(), s = i.bounds, a = i.zoom, o = n.getParameters().mapSize * Math.pow(2, a), l = it(s.ne.lat, s.sw.lng, o), c = it(s.sw.lat, s.ne.lng, o), f = c.x - l.x, h = c.y - l.y, m = r.width + r.padding * 8, d = r.height + r.padding * 8, v = it(r.lat, r.lng, o), g = an(m, d, e.tooltip.angle), I = v.x + g.x, J = I + m, ue = v.y + g.y, Te = ue + d, de = I - l.x, re = c.x - J, ke = ue - l.y, ye = c.y - Te;
|
|
2573
|
+
let ie = 0;
|
|
2574
|
+
f < m ? ie = (de - re) / 2 : (de < 0 && (ie = de), re < 0 && (ie = -re));
|
|
2575
|
+
let V = 0;
|
|
2576
|
+
h < d ? V = (ke - ye) / 2 : (ke < 0 && (V = ke), ye < 0 && (V = -ye)), (ie != 0 || V != 0) && n.panBy(ie, V);
|
|
2577
2577
|
}
|
|
2578
2578
|
hide(e) {
|
|
2579
2579
|
!e.popup || !e.tooltip || !e.pin || (e.pin.shown = !0, e.tooltip.shown = !0, e.popup.shown = !1);
|
|
@@ -2583,14 +2583,14 @@ class ca {
|
|
|
2583
2583
|
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()));
|
|
2584
2584
|
}
|
|
2585
2585
|
}
|
|
2586
|
-
class
|
|
2586
|
+
class ha {
|
|
2587
2587
|
provider;
|
|
2588
2588
|
pinManager;
|
|
2589
2589
|
tooltipManager;
|
|
2590
2590
|
popupManager;
|
|
2591
2591
|
elementsStore;
|
|
2592
2592
|
constructor(e) {
|
|
2593
|
-
this.provider = e, this.pinManager = new
|
|
2593
|
+
this.provider = e, this.pinManager = new la(), this.tooltipManager = new ca(), this.popupManager = new fa(), this.elementsStore = /* @__PURE__ */ new Map();
|
|
2594
2594
|
}
|
|
2595
2595
|
set configuration(e) {
|
|
2596
2596
|
this.pinManager.configuration = e, this.popupManager.configuration = e;
|
|
@@ -2615,7 +2615,7 @@ class fa {
|
|
|
2615
2615
|
insertElements(e, n) {
|
|
2616
2616
|
for (const r of e) {
|
|
2617
2617
|
let i = this.elementsStore.get(r.properites.id);
|
|
2618
|
-
i == null && (i = new
|
|
2618
|
+
i == null && (i = new oa(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);
|
|
2619
2619
|
}
|
|
2620
2620
|
this.pinManager.refresh(), this.tooltipManager.refresh();
|
|
2621
2621
|
}
|
|
@@ -2640,8 +2640,8 @@ class fa {
|
|
|
2640
2640
|
}
|
|
2641
2641
|
//#endregion
|
|
2642
2642
|
}
|
|
2643
|
-
const Yr = '(function(){"use strict";
|
|
2644
|
-
function
|
|
2643
|
+
const Yr = '(function(){"use strict";class h{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)}}}var l=[0,30,60,90,120,150,180,210,240,270,300,330],f=",";function i(e,t){return parseFloat(e[t]+e[t+1]+"."+e[t+2])}function m(e,t){return l[parseInt(e[t],16)]}function d(e){if(!e||e.length===0)return[];let t=[],n=e.split(f);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=m(s,c+3);a.push({zoom:v,angle:T})}t.push({zoom:r,directions:a})}return t}var u=e=>new Promise(t=>setTimeout(t,e));async function w(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 u(t.retry.delay)}throw Error("Unreachable code")}async function y(e,t,n,o,s){let r=await w(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 p="https://maps.api.arenarium.dev/states",E=3,S=500,k={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 y(p,e,n,E,S),s=d(o.states),r=o.jwt;return{states:s,jwt:r}}};new h(k).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" });
|
|
2644
|
+
function pa(t) {
|
|
2645
2645
|
let e;
|
|
2646
2646
|
try {
|
|
2647
2647
|
if (e = Gn && (self.URL || self.webkitURL).createObjectURL(Gn), !e) throw "";
|
|
@@ -2660,7 +2660,7 @@ function ha(t) {
|
|
|
2660
2660
|
);
|
|
2661
2661
|
}
|
|
2662
2662
|
}
|
|
2663
|
-
var
|
|
2663
|
+
var da = (t) => new Promise((e) => setTimeout(e, t));
|
|
2664
2664
|
async function Jr(t, e) {
|
|
2665
2665
|
let n = 0, r = Math.max(1, e?.retry?.times ?? 1);
|
|
2666
2666
|
for (; n < r; ) try {
|
|
@@ -2670,41 +2670,41 @@ async function Jr(t, e) {
|
|
|
2670
2670
|
if (i instanceof Error)
|
|
2671
2671
|
return (!e?.exceptions || e.exceptions.some((s) => i instanceof s) == !1) && e?.catch?.(i), { data: null, error: i };
|
|
2672
2672
|
throw e?.catch?.(i), i;
|
|
2673
|
-
} else e?.retry?.delay && await
|
|
2673
|
+
} else e?.retry?.delay && await da(e.retry.delay);
|
|
2674
2674
|
}
|
|
2675
2675
|
throw Error("Unreachable code");
|
|
2676
2676
|
}
|
|
2677
|
-
async function
|
|
2677
|
+
async function ma(t, e, n, r, i) {
|
|
2678
2678
|
let s = await Jr(async () => await fetch(t, { ...n, method: "POST", body: e ? JSON.stringify(e) : void 0 }), { retry: { times: r, delay: i } });
|
|
2679
2679
|
if (s.error) throw s.error;
|
|
2680
2680
|
let a = s.data;
|
|
2681
2681
|
if (!a.ok) throw Error(await a.text());
|
|
2682
2682
|
return await a.json();
|
|
2683
2683
|
}
|
|
2684
|
-
async function
|
|
2684
|
+
async function va(t, e, n, r, i) {
|
|
2685
2685
|
let s = await Jr(async () => await fetch(t, { ...n, method: "PUT", body: e ? JSON.stringify(e) : void 0 }), { retry: { times: r, delay: i } });
|
|
2686
2686
|
if (s.error) throw s.error;
|
|
2687
2687
|
let a = s.data;
|
|
2688
2688
|
if (!a.ok) throw Error(await a.text());
|
|
2689
2689
|
}
|
|
2690
|
-
const
|
|
2691
|
-
function
|
|
2692
|
-
return t &
|
|
2690
|
+
const We = 0xc3a5c85c97cb3127n, ce = 0xb492b66fbe98f273n, Be = 0x9ae16a3b2f90404fn, Xr = 0xc949d7c7509e6557n, B = 0xffffffffffffffffn;
|
|
2691
|
+
function p(t) {
|
|
2692
|
+
return t & B;
|
|
2693
2693
|
}
|
|
2694
|
-
function
|
|
2695
|
-
return e === 0 ? t &
|
|
2694
|
+
function N(t, e) {
|
|
2695
|
+
return e === 0 ? t & B : (t = t & B, (t >> BigInt(e) | t << BigInt(64 - e)) & B);
|
|
2696
2696
|
}
|
|
2697
|
-
function
|
|
2698
|
-
return t = t &
|
|
2697
|
+
function ga(t, e) {
|
|
2698
|
+
return t = t & B, (t >> BigInt(e) | t << BigInt(64 - e)) & B;
|
|
2699
2699
|
}
|
|
2700
|
-
function
|
|
2701
|
-
return
|
|
2700
|
+
function ut(t) {
|
|
2701
|
+
return p(t ^ t >> 47n);
|
|
2702
2702
|
}
|
|
2703
2703
|
function M(t, e = 0) {
|
|
2704
2704
|
let n = 0n;
|
|
2705
2705
|
for (let r = 0; r < 8; r++)
|
|
2706
2706
|
e + r < t.length && (n |= BigInt(t[e + r]) << BigInt(r * 8));
|
|
2707
|
-
return n &
|
|
2707
|
+
return n & B;
|
|
2708
2708
|
}
|
|
2709
2709
|
function Qn(t, e = 0) {
|
|
2710
2710
|
let n = 0n;
|
|
@@ -2712,72 +2712,72 @@ function Qn(t, e = 0) {
|
|
|
2712
2712
|
e + r < t.length && (n |= BigInt(t[e + r]) << BigInt(r * 8));
|
|
2713
2713
|
return n & 0xffffffffn;
|
|
2714
2714
|
}
|
|
2715
|
-
function
|
|
2715
|
+
function wa(t) {
|
|
2716
2716
|
const e = 0x9ddfea08eb382d69n;
|
|
2717
|
-
let n = (t.first ^ t.second) * e &
|
|
2718
|
-
n ^= n >> 47n, n = n &
|
|
2719
|
-
let r = (t.second ^ n) * e &
|
|
2720
|
-
return r ^= r >> 47n, r = r * e &
|
|
2717
|
+
let n = (t.first ^ t.second) * e & B;
|
|
2718
|
+
n ^= n >> 47n, n = n & B;
|
|
2719
|
+
let r = (t.second ^ n) * e & B;
|
|
2720
|
+
return r ^= r >> 47n, r = r * e & B, r;
|
|
2721
2721
|
}
|
|
2722
|
-
function
|
|
2723
|
-
return
|
|
2722
|
+
function He(t, e) {
|
|
2723
|
+
return wa({ first: t, second: e });
|
|
2724
2724
|
}
|
|
2725
|
-
function
|
|
2725
|
+
function ka(t) {
|
|
2726
2726
|
const e = t.length;
|
|
2727
2727
|
if (e > 8) {
|
|
2728
2728
|
const n = M(t), r = M(t, e - 8);
|
|
2729
|
-
return (
|
|
2729
|
+
return (He(n, ga(r + BigInt(e) & B, e)) ^ r) & B;
|
|
2730
2730
|
}
|
|
2731
2731
|
if (e >= 4) {
|
|
2732
2732
|
const n = Qn(t);
|
|
2733
|
-
return
|
|
2733
|
+
return He(BigInt(e) + (n << 3n) & B, Qn(t, e - 4));
|
|
2734
2734
|
}
|
|
2735
2735
|
if (e > 0) {
|
|
2736
|
-
const n = BigInt(t[0]), r = BigInt(t[e >> 1]), i = BigInt(t[e - 1]), s =
|
|
2737
|
-
return
|
|
2736
|
+
const n = BigInt(t[0]), r = BigInt(t[e >> 1]), i = BigInt(t[e - 1]), s = p(n + (r << 8n)), a = p(BigInt(e) + (i << 2n));
|
|
2737
|
+
return p(ut(p(s * Be) ^ p(a * Xr)) * Be);
|
|
2738
2738
|
}
|
|
2739
|
-
return
|
|
2739
|
+
return Be;
|
|
2740
2740
|
}
|
|
2741
|
-
function
|
|
2742
|
-
const e = t.length, n =
|
|
2743
|
-
return
|
|
2741
|
+
function ya(t) {
|
|
2742
|
+
const e = t.length, n = p(M(t) * ce), r = M(t, 8), i = p(M(t, e - 8) * Be), s = p(M(t, e - 16) * We);
|
|
2743
|
+
return He(p(N(p(n - r), 43) + N(i, 30) + s), p(n + N(r ^ Xr, 20) - i + BigInt(e)));
|
|
2744
2744
|
}
|
|
2745
|
-
function
|
|
2746
|
-
i =
|
|
2745
|
+
function ba(t, e, n, r, i, s) {
|
|
2746
|
+
i = p(i + t), s = N(p(s + i + r), 21);
|
|
2747
2747
|
const a = i;
|
|
2748
|
-
return i =
|
|
2748
|
+
return i = p(i + e), i = p(i + n), s = p(s + N(i, 44)), { first: p(i + r), second: p(s + a) };
|
|
2749
2749
|
}
|
|
2750
|
-
function
|
|
2751
|
-
return
|
|
2750
|
+
function xt(t, e, n, r) {
|
|
2751
|
+
return ba(M(t, e), M(t, e + 8), M(t, e + 16), M(t, e + 24), n, r);
|
|
2752
2752
|
}
|
|
2753
|
-
function
|
|
2753
|
+
function _a(t) {
|
|
2754
2754
|
const e = t.length, n = M(t, 24);
|
|
2755
|
-
let r =
|
|
2756
|
-
r =
|
|
2757
|
-
const a =
|
|
2758
|
-
r =
|
|
2755
|
+
let r = p(M(t) + p((BigInt(e) + M(t, e - 16)) * We)), i = N(p(r + n), 52), s = N(r, 37);
|
|
2756
|
+
r = p(r + M(t, 8)), s = p(s + N(r, 7)), r = p(r + M(t, 16));
|
|
2757
|
+
const a = p(r + n), u = p(i + N(r, 31) + s);
|
|
2758
|
+
r = p(M(t, 16) + M(t, e - 32));
|
|
2759
2759
|
const o = M(t, e - 8);
|
|
2760
|
-
i =
|
|
2761
|
-
const l =
|
|
2762
|
-
return
|
|
2760
|
+
i = N(p(r + o), 52), s = N(r, 37), r = p(r + M(t, e - 24)), s = p(s + N(r, 7)), r = p(r + M(t, e - 16));
|
|
2761
|
+
const l = p(r + o), c = p(i + N(r, 31) + s), f = ut(p(p(a + c) * Be + p(l + u) * We));
|
|
2762
|
+
return p(ut(p(f * We + u)) * Be);
|
|
2763
2763
|
}
|
|
2764
|
-
function
|
|
2764
|
+
function Ma(t) {
|
|
2765
2765
|
let e;
|
|
2766
2766
|
typeof t == "string" ? e = new TextEncoder().encode(t) : e = t;
|
|
2767
2767
|
const n = e.length;
|
|
2768
2768
|
if (n <= 32)
|
|
2769
|
-
return n <= 16 ?
|
|
2769
|
+
return n <= 16 ? ka(e) : ya(e);
|
|
2770
2770
|
if (n <= 64)
|
|
2771
|
-
return
|
|
2772
|
-
let r = M(e), i =
|
|
2773
|
-
s =
|
|
2771
|
+
return _a(e);
|
|
2772
|
+
let r = M(e), i = p(M(e, n - 16) ^ ce), s = p(M(e, n - 56) ^ We), a = xt(e, n - 64, BigInt(n), i), u = xt(e, n - 32, p(BigInt(n) * ce), We);
|
|
2773
|
+
s = p(s + ut(a.second) * ce), r = p(N(p(s + r), 39) * ce), i = p(N(i, 33) * ce);
|
|
2774
2774
|
let o = n - 1 & -64, l = 0;
|
|
2775
2775
|
for (; o > 0; )
|
|
2776
|
-
r =
|
|
2777
|
-
return
|
|
2776
|
+
r = p(N(p(r + i + a.first + M(e, l + 16)), 37) * ce), i = p(N(p(i + a.second + M(e, l + 48)), 42) * ce), r ^= u.second, i ^= a.first, s = N(s ^ u.first, 33), a = xt(e, l, p(a.second * ce), p(r + u.first)), u = xt(e, l + 32, p(s + u.second), i), [s, r] = [r, s], l += 64, o -= 64;
|
|
2777
|
+
return He(He(a.first, u.first) + p(ut(i) * ce) + s, He(a.second, u.second) + r);
|
|
2778
2778
|
}
|
|
2779
|
-
function
|
|
2780
|
-
return
|
|
2779
|
+
function Ea(t) {
|
|
2780
|
+
return Ma(JSON.stringify(t)).toString();
|
|
2781
2781
|
}
|
|
2782
2782
|
let Xt;
|
|
2783
2783
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2789,28 +2789,28 @@ function Kr(t) {
|
|
|
2789
2789
|
abortPipeEarly: Xt?.abortPipeEarly
|
|
2790
2790
|
};
|
|
2791
2791
|
}
|
|
2792
|
-
let
|
|
2792
|
+
let xa;
|
|
2793
2793
|
// @__NO_SIDE_EFFECTS__
|
|
2794
|
-
function
|
|
2795
|
-
return
|
|
2794
|
+
function Sa(t) {
|
|
2795
|
+
return xa?.get(t);
|
|
2796
2796
|
}
|
|
2797
|
-
let
|
|
2797
|
+
let Pa;
|
|
2798
2798
|
// @__NO_SIDE_EFFECTS__
|
|
2799
|
-
function
|
|
2800
|
-
return
|
|
2799
|
+
function Ta(t) {
|
|
2800
|
+
return Pa?.get(t);
|
|
2801
2801
|
}
|
|
2802
|
-
let
|
|
2802
|
+
let Ia;
|
|
2803
2803
|
// @__NO_SIDE_EFFECTS__
|
|
2804
|
-
function
|
|
2805
|
-
return
|
|
2804
|
+
function Aa(t, e) {
|
|
2805
|
+
return Ia?.get(t)?.get(e);
|
|
2806
2806
|
}
|
|
2807
2807
|
// @__NO_SIDE_EFFECTS__
|
|
2808
|
-
function
|
|
2808
|
+
function Ge(t) {
|
|
2809
2809
|
const e = typeof t;
|
|
2810
2810
|
return e === "string" ? `"${t}"` : e === "number" || e === "bigint" || e === "boolean" ? `${t}` : e === "object" || e === "function" ? (t && Object.getPrototypeOf(t)?.constructor?.name) ?? "null" : e;
|
|
2811
2811
|
}
|
|
2812
|
-
function
|
|
2813
|
-
const s = i && "input" in i ? i.input : n.value, a = i?.expected ?? t.expects ?? null, u = i?.received ?? /* @__PURE__ */
|
|
2812
|
+
function C(t, e, n, r, i) {
|
|
2813
|
+
const s = i && "input" in i ? i.input : n.value, a = i?.expected ?? t.expects ?? null, u = i?.received ?? /* @__PURE__ */ Ge(s), o = {
|
|
2814
2814
|
kind: t.kind,
|
|
2815
2815
|
type: t.type,
|
|
2816
2816
|
input: s,
|
|
@@ -2823,7 +2823,7 @@ function N(t, e, n, r, i) {
|
|
|
2823
2823
|
lang: r.lang,
|
|
2824
2824
|
abortEarly: r.abortEarly,
|
|
2825
2825
|
abortPipeEarly: r.abortPipeEarly
|
|
2826
|
-
}, l = t.kind === "schema", c = i?.message ?? t.message ?? /* @__PURE__ */
|
|
2826
|
+
}, l = t.kind === "schema", c = i?.message ?? t.message ?? /* @__PURE__ */ Aa(t.reference, o.lang) ?? (l ? /* @__PURE__ */ Ta(o.lang) : null) ?? r.message ?? /* @__PURE__ */ Sa(o.lang);
|
|
2827
2827
|
c !== void 0 && (o.message = typeof c == "function" ? c(o) : c), l && (n.typed = !1), n.issues ? n.issues.push(o) : n.issues = [o];
|
|
2828
2828
|
}
|
|
2829
2829
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2837,7 +2837,7 @@ function Y(t) {
|
|
|
2837
2837
|
};
|
|
2838
2838
|
}
|
|
2839
2839
|
// @__NO_SIDE_EFFECTS__
|
|
2840
|
-
function
|
|
2840
|
+
function Na(t, e) {
|
|
2841
2841
|
const n = [...new Set(t)];
|
|
2842
2842
|
return n.length > 1 ? `(${n.join(` ${e} `)})` : n[0] ?? "never";
|
|
2843
2843
|
}
|
|
@@ -2880,7 +2880,7 @@ function Gr(t, e) {
|
|
|
2880
2880
|
requirement: t,
|
|
2881
2881
|
message: e,
|
|
2882
2882
|
"~run"(n, r) {
|
|
2883
|
-
return n.typed && !this.requirement(n.value) &&
|
|
2883
|
+
return n.typed && !this.requirement(n.value) && C(this, "input", n, r), n;
|
|
2884
2884
|
}
|
|
2885
2885
|
};
|
|
2886
2886
|
}
|
|
@@ -2895,22 +2895,22 @@ function Qr(t, e) {
|
|
|
2895
2895
|
requirement: t,
|
|
2896
2896
|
message: e,
|
|
2897
2897
|
"~run"(n, r) {
|
|
2898
|
-
return n.typed && n.value.length !== this.requirement &&
|
|
2898
|
+
return n.typed && n.value.length !== this.requirement && C(this, "length", n, r, { received: `${n.value.length}` }), n;
|
|
2899
2899
|
}
|
|
2900
2900
|
};
|
|
2901
2901
|
}
|
|
2902
2902
|
// @__NO_SIDE_EFFECTS__
|
|
2903
|
-
function
|
|
2903
|
+
function ct(t, e) {
|
|
2904
2904
|
return {
|
|
2905
2905
|
kind: "validation",
|
|
2906
2906
|
type: "max_value",
|
|
2907
|
-
reference:
|
|
2907
|
+
reference: ct,
|
|
2908
2908
|
async: !1,
|
|
2909
|
-
expects: `<=${t instanceof Date ? t.toJSON() : /* @__PURE__ */
|
|
2909
|
+
expects: `<=${t instanceof Date ? t.toJSON() : /* @__PURE__ */ Ge(t)}`,
|
|
2910
2910
|
requirement: t,
|
|
2911
2911
|
message: e,
|
|
2912
2912
|
"~run"(n, r) {
|
|
2913
|
-
return n.typed && !(n.value <= this.requirement) &&
|
|
2913
|
+
return n.typed && !(n.value <= this.requirement) && C(this, "value", n, r, { received: n.value instanceof Date ? n.value.toJSON() : /* @__PURE__ */ Ge(n.value) }), n;
|
|
2914
2914
|
}
|
|
2915
2915
|
};
|
|
2916
2916
|
}
|
|
@@ -2925,22 +2925,22 @@ function kn(t, e) {
|
|
|
2925
2925
|
requirement: t,
|
|
2926
2926
|
message: e,
|
|
2927
2927
|
"~run"(n, r) {
|
|
2928
|
-
return n.typed && n.value.length < this.requirement &&
|
|
2928
|
+
return n.typed && n.value.length < this.requirement && C(this, "length", n, r, { received: `${n.value.length}` }), n;
|
|
2929
2929
|
}
|
|
2930
2930
|
};
|
|
2931
2931
|
}
|
|
2932
2932
|
// @__NO_SIDE_EFFECTS__
|
|
2933
|
-
function
|
|
2933
|
+
function q(t, e) {
|
|
2934
2934
|
return {
|
|
2935
2935
|
kind: "validation",
|
|
2936
2936
|
type: "min_value",
|
|
2937
|
-
reference:
|
|
2937
|
+
reference: q,
|
|
2938
2938
|
async: !1,
|
|
2939
|
-
expects: `>=${t instanceof Date ? t.toJSON() : /* @__PURE__ */
|
|
2939
|
+
expects: `>=${t instanceof Date ? t.toJSON() : /* @__PURE__ */ Ge(t)}`,
|
|
2940
2940
|
requirement: t,
|
|
2941
2941
|
message: e,
|
|
2942
2942
|
"~run"(n, r) {
|
|
2943
|
-
return n.typed && !(n.value >= this.requirement) &&
|
|
2943
|
+
return n.typed && !(n.value >= this.requirement) && C(this, "value", n, r, { received: n.value instanceof Date ? n.value.toJSON() : /* @__PURE__ */ Ge(n.value) }), n;
|
|
2944
2944
|
}
|
|
2945
2945
|
};
|
|
2946
2946
|
}
|
|
@@ -2963,7 +2963,7 @@ function $(t) {
|
|
|
2963
2963
|
};
|
|
2964
2964
|
}
|
|
2965
2965
|
// @__NO_SIDE_EFFECTS__
|
|
2966
|
-
function
|
|
2966
|
+
function Ca(t, e, n) {
|
|
2967
2967
|
return typeof t.fallback == "function" ? t.fallback(e, n) : t.fallback;
|
|
2968
2968
|
}
|
|
2969
2969
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -3006,7 +3006,7 @@ function ti(t, e) {
|
|
|
3006
3006
|
}
|
|
3007
3007
|
u.typed || (n.typed = !1), n.value.push(u.value);
|
|
3008
3008
|
}
|
|
3009
|
-
} else
|
|
3009
|
+
} else C(this, "type", n, r);
|
|
3010
3010
|
return n;
|
|
3011
3011
|
}
|
|
3012
3012
|
};
|
|
@@ -3024,7 +3024,7 @@ function ni(t) {
|
|
|
3024
3024
|
return /* @__PURE__ */ Y(this);
|
|
3025
3025
|
},
|
|
3026
3026
|
"~run"(e, n) {
|
|
3027
|
-
return typeof e.value == "boolean" ? e.typed = !0 :
|
|
3027
|
+
return typeof e.value == "boolean" ? e.typed = !0 : C(this, "type", e, n), e;
|
|
3028
3028
|
}
|
|
3029
3029
|
};
|
|
3030
3030
|
}
|
|
@@ -3042,16 +3042,16 @@ function ri(t, e) {
|
|
|
3042
3042
|
return /* @__PURE__ */ Y(this);
|
|
3043
3043
|
},
|
|
3044
3044
|
"~run"(n, r) {
|
|
3045
|
-
return this.check(n.value) ? n.typed = !0 :
|
|
3045
|
+
return this.check(n.value) ? n.typed = !0 : C(this, "type", n, r), n;
|
|
3046
3046
|
}
|
|
3047
3047
|
};
|
|
3048
3048
|
}
|
|
3049
3049
|
// @__NO_SIDE_EFFECTS__
|
|
3050
|
-
function
|
|
3050
|
+
function A(t) {
|
|
3051
3051
|
return {
|
|
3052
3052
|
kind: "schema",
|
|
3053
3053
|
type: "function",
|
|
3054
|
-
reference:
|
|
3054
|
+
reference: A,
|
|
3055
3055
|
expects: "Function",
|
|
3056
3056
|
async: !1,
|
|
3057
3057
|
message: t,
|
|
@@ -3059,7 +3059,7 @@ function I(t) {
|
|
|
3059
3059
|
return /* @__PURE__ */ Y(this);
|
|
3060
3060
|
},
|
|
3061
3061
|
"~run"(e, n) {
|
|
3062
|
-
return typeof e.value == "function" ? e.typed = !0 :
|
|
3062
|
+
return typeof e.value == "function" ? e.typed = !0 : C(this, "type", e, n), e;
|
|
3063
3063
|
}
|
|
3064
3064
|
};
|
|
3065
3065
|
}
|
|
@@ -3069,7 +3069,7 @@ function ze(t, e) {
|
|
|
3069
3069
|
kind: "schema",
|
|
3070
3070
|
type: "literal",
|
|
3071
3071
|
reference: ze,
|
|
3072
|
-
expects: /* @__PURE__ */
|
|
3072
|
+
expects: /* @__PURE__ */ Ge(t),
|
|
3073
3073
|
async: !1,
|
|
3074
3074
|
literal: t,
|
|
3075
3075
|
message: e,
|
|
@@ -3077,7 +3077,7 @@ function ze(t, e) {
|
|
|
3077
3077
|
return /* @__PURE__ */ Y(this);
|
|
3078
3078
|
},
|
|
3079
3079
|
"~run"(n, r) {
|
|
3080
|
-
return n.value === this.literal ? n.typed = !0 :
|
|
3080
|
+
return n.value === this.literal ? n.typed = !0 : C(this, "type", n, r), n;
|
|
3081
3081
|
}
|
|
3082
3082
|
};
|
|
3083
3083
|
}
|
|
@@ -3094,16 +3094,16 @@ function P(t) {
|
|
|
3094
3094
|
return /* @__PURE__ */ Y(this);
|
|
3095
3095
|
},
|
|
3096
3096
|
"~run"(e, n) {
|
|
3097
|
-
return typeof e.value == "number" && !isNaN(e.value) ? e.typed = !0 :
|
|
3097
|
+
return typeof e.value == "number" && !isNaN(e.value) ? e.typed = !0 : C(this, "type", e, n), e;
|
|
3098
3098
|
}
|
|
3099
3099
|
};
|
|
3100
3100
|
}
|
|
3101
3101
|
// @__NO_SIDE_EFFECTS__
|
|
3102
|
-
function
|
|
3102
|
+
function H(t, e) {
|
|
3103
3103
|
return {
|
|
3104
3104
|
kind: "schema",
|
|
3105
3105
|
type: "object",
|
|
3106
|
-
reference:
|
|
3106
|
+
reference: H,
|
|
3107
3107
|
expects: "Object",
|
|
3108
3108
|
async: !1,
|
|
3109
3109
|
entries: t,
|
|
@@ -3135,8 +3135,8 @@ function B(t, e) {
|
|
|
3135
3135
|
}
|
|
3136
3136
|
}
|
|
3137
3137
|
o.typed || (n.typed = !1), n.value[s] = o.value;
|
|
3138
|
-
} else if (a.fallback !== void 0) n.value[s] = /* @__PURE__ */
|
|
3139
|
-
else if (a.type !== "exact_optional" && a.type !== "optional" && a.type !== "nullish" && (
|
|
3138
|
+
} else if (a.fallback !== void 0) n.value[s] = /* @__PURE__ */ Ca(a);
|
|
3139
|
+
else if (a.type !== "exact_optional" && a.type !== "optional" && a.type !== "nullish" && (C(this, "key", n, r, {
|
|
3140
3140
|
input: void 0,
|
|
3141
3141
|
expected: `"${s}"`,
|
|
3142
3142
|
path: [{
|
|
@@ -3149,7 +3149,7 @@ function B(t, e) {
|
|
|
3149
3149
|
}), r.abortEarly))
|
|
3150
3150
|
break;
|
|
3151
3151
|
}
|
|
3152
|
-
} else
|
|
3152
|
+
} else C(this, "type", n, r);
|
|
3153
3153
|
return n;
|
|
3154
3154
|
}
|
|
3155
3155
|
};
|
|
@@ -3173,11 +3173,11 @@ function T(t, e) {
|
|
|
3173
3173
|
};
|
|
3174
3174
|
}
|
|
3175
3175
|
// @__NO_SIDE_EFFECTS__
|
|
3176
|
-
function
|
|
3176
|
+
function ve(t) {
|
|
3177
3177
|
return {
|
|
3178
3178
|
kind: "schema",
|
|
3179
3179
|
type: "string",
|
|
3180
|
-
reference:
|
|
3180
|
+
reference: ve,
|
|
3181
3181
|
expects: "string",
|
|
3182
3182
|
async: !1,
|
|
3183
3183
|
message: t,
|
|
@@ -3185,7 +3185,7 @@ function ge(t) {
|
|
|
3185
3185
|
return /* @__PURE__ */ Y(this);
|
|
3186
3186
|
},
|
|
3187
3187
|
"~run"(e, n) {
|
|
3188
|
-
return typeof e.value == "string" ? e.typed = !0 :
|
|
3188
|
+
return typeof e.value == "string" ? e.typed = !0 : C(this, "type", e, n), e;
|
|
3189
3189
|
}
|
|
3190
3190
|
};
|
|
3191
3191
|
}
|
|
@@ -3225,7 +3225,7 @@ function L(t, e) {
|
|
|
3225
3225
|
}
|
|
3226
3226
|
u.typed || (n.typed = !1), n.value.push(u.value);
|
|
3227
3227
|
}
|
|
3228
|
-
} else
|
|
3228
|
+
} else C(this, "type", n, r);
|
|
3229
3229
|
return n;
|
|
3230
3230
|
}
|
|
3231
3231
|
};
|
|
@@ -3242,7 +3242,7 @@ function yn(t, e) {
|
|
|
3242
3242
|
kind: "schema",
|
|
3243
3243
|
type: "union",
|
|
3244
3244
|
reference: yn,
|
|
3245
|
-
expects: /* @__PURE__ */
|
|
3245
|
+
expects: /* @__PURE__ */ Na(t.map((n) => n.expects), "|"),
|
|
3246
3246
|
async: !1,
|
|
3247
3247
|
options: t,
|
|
3248
3248
|
message: e,
|
|
@@ -3263,10 +3263,10 @@ function yn(t, e) {
|
|
|
3263
3263
|
if (i) return i;
|
|
3264
3264
|
if (s) {
|
|
3265
3265
|
if (s.length === 1) return s[0];
|
|
3266
|
-
|
|
3266
|
+
C(this, "type", n, r, { issues: /* @__PURE__ */ er(s) }), n.typed = !0;
|
|
3267
3267
|
} else {
|
|
3268
3268
|
if (a?.length === 1) return a[0];
|
|
3269
|
-
|
|
3269
|
+
C(this, "type", n, r, { issues: /* @__PURE__ */ er(a) });
|
|
3270
3270
|
}
|
|
3271
3271
|
return n;
|
|
3272
3272
|
}
|
|
@@ -3285,17 +3285,17 @@ function Oe(t) {
|
|
|
3285
3285
|
return /* @__PURE__ */ Y(this);
|
|
3286
3286
|
},
|
|
3287
3287
|
"~run"(e, n) {
|
|
3288
|
-
return e.value === void 0 ? e.typed = !0 :
|
|
3288
|
+
return e.value === void 0 ? e.typed = !0 : C(this, "type", e, n), e;
|
|
3289
3289
|
}
|
|
3290
3290
|
};
|
|
3291
3291
|
}
|
|
3292
|
-
function
|
|
3292
|
+
function St(t, e, n) {
|
|
3293
3293
|
const r = t["~run"]({ value: e }, /* @__PURE__ */ Kr(n));
|
|
3294
3294
|
if (r.issues) throw new wn(r.issues);
|
|
3295
3295
|
return r.value;
|
|
3296
3296
|
}
|
|
3297
3297
|
// @__NO_SIDE_EFFECTS__
|
|
3298
|
-
function
|
|
3298
|
+
function k(...t) {
|
|
3299
3299
|
return {
|
|
3300
3300
|
...t[0],
|
|
3301
3301
|
pipe: t,
|
|
@@ -3314,16 +3314,16 @@ function w(...t) {
|
|
|
3314
3314
|
}
|
|
3315
3315
|
};
|
|
3316
3316
|
}
|
|
3317
|
-
var ii = /* @__PURE__ */
|
|
3318
|
-
const
|
|
3319
|
-
class
|
|
3317
|
+
var ii = /* @__PURE__ */ k(/* @__PURE__ */ P(), /* @__PURE__ */ q(-90), /* @__PURE__ */ ct(90)), si = /* @__PURE__ */ k(/* @__PURE__ */ P(), /* @__PURE__ */ q(-180), /* @__PURE__ */ ct(180)), Ct = /* @__PURE__ */ H({ lat: ii, lng: si }), ai = /* @__PURE__ */ H({ sw: Ct, ne: Ct }), Ra = /* @__PURE__ */ H({ bounds: ai, center: Ct, zoom: /* @__PURE__ */ P() }), qe = /* @__PURE__ */ ri((t) => t instanceof HTMLElement, "Must be an HTMLElement"), Da = /* @__PURE__ */ H({ mapSize: /* @__PURE__ */ k(/* @__PURE__ */ P(), /* @__PURE__ */ q(1)), zoomMin: /* @__PURE__ */ k(/* @__PURE__ */ P(), /* @__PURE__ */ q(0)), zoomMax: /* @__PURE__ */ k(/* @__PURE__ */ P(), /* @__PURE__ */ q(0)), zoomScale: /* @__PURE__ */ yn([/* @__PURE__ */ ze(1), /* @__PURE__ */ ze(2), /* @__PURE__ */ ze(10)]) }), za = /* @__PURE__ */ H({ inserted: /* @__PURE__ */ k(/* @__PURE__ */ A(), /* @__PURE__ */ O(/* @__PURE__ */ L([])), /* @__PURE__ */ $(/* @__PURE__ */ ni())), insert: /* @__PURE__ */ k(/* @__PURE__ */ A(), /* @__PURE__ */ O(/* @__PURE__ */ L([])), /* @__PURE__ */ $(/* @__PURE__ */ Oe())), remove: /* @__PURE__ */ k(/* @__PURE__ */ A(), /* @__PURE__ */ O(/* @__PURE__ */ L([])), /* @__PURE__ */ $(/* @__PURE__ */ Oe())), update: /* @__PURE__ */ k(/* @__PURE__ */ A(), /* @__PURE__ */ O(/* @__PURE__ */ L([/* @__PURE__ */ P()])), /* @__PURE__ */ $(/* @__PURE__ */ Oe())) }), tr = /* @__PURE__ */ yn([/* @__PURE__ */ ze("idle"), /* @__PURE__ */ ze("move"), /* @__PURE__ */ ze("click")]), Oa = /* @__PURE__ */ H({ getParameters: /* @__PURE__ */ k(/* @__PURE__ */ A(), /* @__PURE__ */ O(/* @__PURE__ */ L([])), /* @__PURE__ */ $(Da)), getContainer: /* @__PURE__ */ k(/* @__PURE__ */ A(), /* @__PURE__ */ O(/* @__PURE__ */ L([])), /* @__PURE__ */ $(qe)), getZoom: /* @__PURE__ */ k(/* @__PURE__ */ A(), /* @__PURE__ */ O(/* @__PURE__ */ L([])), /* @__PURE__ */ $(/* @__PURE__ */ P())), getBounds: /* @__PURE__ */ k(/* @__PURE__ */ A(), /* @__PURE__ */ O(/* @__PURE__ */ L([])), /* @__PURE__ */ $(ai)), getCenter: /* @__PURE__ */ k(/* @__PURE__ */ A(), /* @__PURE__ */ O(/* @__PURE__ */ L([])), /* @__PURE__ */ $(Ct)), getViewport: /* @__PURE__ */ k(/* @__PURE__ */ A(), /* @__PURE__ */ O(/* @__PURE__ */ L([])), /* @__PURE__ */ $(Ra)), panBy: /* @__PURE__ */ k(/* @__PURE__ */ A(), /* @__PURE__ */ O(/* @__PURE__ */ L([/* @__PURE__ */ P(), /* @__PURE__ */ P()])), /* @__PURE__ */ $(/* @__PURE__ */ Oe())), createMarker: /* @__PURE__ */ k(/* @__PURE__ */ A(), /* @__PURE__ */ O(/* @__PURE__ */ L([qe, ii, si, /* @__PURE__ */ P()])), /* @__PURE__ */ $(za)), subscribe: /* @__PURE__ */ k(/* @__PURE__ */ A(), /* @__PURE__ */ O(/* @__PURE__ */ L([tr, /* @__PURE__ */ A()])), /* @__PURE__ */ $(/* @__PURE__ */ Oe())), unsubscribe: /* @__PURE__ */ k(/* @__PURE__ */ A(), /* @__PURE__ */ O(/* @__PURE__ */ L([tr, /* @__PURE__ */ A()])), /* @__PURE__ */ $(/* @__PURE__ */ Oe())) }), Kt = /* @__PURE__ */ k(/* @__PURE__ */ A(), /* @__PURE__ */ O(/* @__PURE__ */ L([/* @__PURE__ */ ve(), qe]))), Gt = /* @__PURE__ */ k(/* @__PURE__ */ H({ width: /* @__PURE__ */ k(/* @__PURE__ */ P(), /* @__PURE__ */ q(0)), height: /* @__PURE__ */ k(/* @__PURE__ */ P(), /* @__PURE__ */ q(0)), padding: /* @__PURE__ */ k(/* @__PURE__ */ P(), /* @__PURE__ */ q(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")), La = /* @__PURE__ */ H({ background: /* @__PURE__ */ T(/* @__PURE__ */ ve()), radius: /* @__PURE__ */ T(/* @__PURE__ */ k(/* @__PURE__ */ P(), /* @__PURE__ */ q(0))), shadow: /* @__PURE__ */ T(/* @__PURE__ */ ve()) }), nr = /* @__PURE__ */ H({ background: /* @__PURE__ */ T(/* @__PURE__ */ ve()), radius: /* @__PURE__ */ T(/* @__PURE__ */ k(/* @__PURE__ */ P(), /* @__PURE__ */ q(0))), filter: /* @__PURE__ */ T(/* @__PURE__ */ ve()) }), Fa = /* @__PURE__ */ H({ id: /* @__PURE__ */ k(/* @__PURE__ */ ve(), /* @__PURE__ */ kn(1)), rank: /* @__PURE__ */ k(/* @__PURE__ */ P(), /* @__PURE__ */ q(0)), lat: /* @__PURE__ */ k(/* @__PURE__ */ P(), /* @__PURE__ */ q(-90), /* @__PURE__ */ ct(90)), lng: /* @__PURE__ */ k(/* @__PURE__ */ P(), /* @__PURE__ */ q(-180), /* @__PURE__ */ ct(180)), tooltip: /* @__PURE__ */ H({ element: qe, style: /* @__PURE__ */ T(nr), dimensions: /* @__PURE__ */ T(Gt), initialize: /* @__PURE__ */ T(Kt) }), pin: /* @__PURE__ */ T(/* @__PURE__ */ H({ element: /* @__PURE__ */ T(qe), style: /* @__PURE__ */ T(La), dimensions: /* @__PURE__ */ T(Gt), initialize: /* @__PURE__ */ T(Kt) })), popup: /* @__PURE__ */ T(/* @__PURE__ */ H({ element: qe, style: /* @__PURE__ */ T(nr), dimensions: /* @__PURE__ */ T(Gt), initialize: /* @__PURE__ */ T(Kt) })) }), $a = /* @__PURE__ */ k(/* @__PURE__ */ ve(), /* @__PURE__ */ Qr(32)), Va = /* @__PURE__ */ k(/* @__PURE__ */ ve(), /* @__PURE__ */ kn(1));
|
|
3318
|
+
const ja = "1.3.10";
|
|
3319
|
+
class Ua {
|
|
3320
3320
|
apiKey;
|
|
3321
3321
|
apiJwt;
|
|
3322
3322
|
markerStatesStore;
|
|
3323
3323
|
markerStatesWorker;
|
|
3324
3324
|
markerStatesWorkerClient;
|
|
3325
3325
|
constructor(e, n) {
|
|
3326
|
-
this.apiKey = e, this.apiJwt = n, this.markerStatesStore = /* @__PURE__ */ new Map(), this.markerStatesWorker = new
|
|
3326
|
+
this.apiKey = e, this.apiJwt = n, this.markerStatesStore = /* @__PURE__ */ new Map(), this.markerStatesWorker = new pa(), this.markerStatesWorkerClient = new sr(this.markerStatesWorker);
|
|
3327
3327
|
}
|
|
3328
3328
|
clearStates() {
|
|
3329
3329
|
this.markerStatesStore.clear();
|
|
@@ -3337,7 +3337,7 @@ class ja {
|
|
|
3337
3337
|
async updateStates(e, n) {
|
|
3338
3338
|
if (e.length == 0) return;
|
|
3339
3339
|
e.sort((a, u) => a.properites.id.localeCompare(u.properites.id));
|
|
3340
|
-
const r = e.map((a) => a.input), i =
|
|
3340
|
+
const r = e.map((a) => a.input), i = Ea(r);
|
|
3341
3341
|
let s = this.markerStatesStore.get(i);
|
|
3342
3342
|
s == null && (s = await this.fetchStates(r, n), this.markerStatesStore.set(i, s));
|
|
3343
3343
|
for (let a = 0; a < e.length; a++) {
|
|
@@ -3347,18 +3347,18 @@ class ja {
|
|
|
3347
3347
|
}
|
|
3348
3348
|
async fetchStates(e, n) {
|
|
3349
3349
|
if (e.length == 0) return [];
|
|
3350
|
-
if (e.length == 1) return [{ zoom: 0, directions: [{ zoom: 0, angle:
|
|
3350
|
+
if (e.length == 1) return [{ zoom: 0, directions: [{ zoom: 0, angle: ua() }] }];
|
|
3351
3351
|
const r = {
|
|
3352
3352
|
key: this.apiKey,
|
|
3353
3353
|
jwt: this.apiJwt,
|
|
3354
|
-
version:
|
|
3354
|
+
version: ja,
|
|
3355
3355
|
input: e,
|
|
3356
3356
|
parameters: n
|
|
3357
3357
|
}, i = await this.markerStatesWorkerClient.invoke("fetch", r);
|
|
3358
3358
|
return i.jwt && (this.apiJwt = i.jwt), i.states;
|
|
3359
3359
|
}
|
|
3360
3360
|
}
|
|
3361
|
-
const rr = "1.3.
|
|
3361
|
+
const rr = "1.3.10", Wa = "https://maps.api.arenarium.dev/auth", Ba = "https://maps.api.arenarium.dev/log", ir = 500;
|
|
3362
3362
|
class oi {
|
|
3363
3363
|
apiKey;
|
|
3364
3364
|
mapProvider;
|
|
@@ -3373,18 +3373,18 @@ class oi {
|
|
|
3373
3373
|
markerStatesProcessDelay = ir;
|
|
3374
3374
|
markerStatesProcessTimeout = void 0;
|
|
3375
3375
|
constructor(e, n, r, i) {
|
|
3376
|
-
|
|
3376
|
+
St($a, e), St(Va, n), St(Oa, r), this.apiKey = e, this.mapProvider = r, this.mapStateProvider = new Pi(
|
|
3377
3377
|
this.mapProvider,
|
|
3378
3378
|
this.detached.bind(this),
|
|
3379
3379
|
this.error.bind(this),
|
|
3380
3380
|
this.onMapMove.bind(this),
|
|
3381
3381
|
this.onMapIdle.bind(this),
|
|
3382
3382
|
this.onMapClick.bind(this)
|
|
3383
|
-
), this.markers = /* @__PURE__ */ new Map(), this.markerVisibilityManager = new
|
|
3383
|
+
), this.markers = /* @__PURE__ */ new Map(), this.markerVisibilityManager = new Wi(), this.markerElementsManager = new ha(this.mapProvider), this.markerStatesManager = new Ua(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;
|
|
3384
3384
|
}
|
|
3385
3385
|
//#region Core
|
|
3386
3386
|
static async create(e, n, r) {
|
|
3387
|
-
const a = (await
|
|
3387
|
+
const a = (await ma(Wa, { key: e, version: rr })).jwt;
|
|
3388
3388
|
if (!a) throw new Error("Failed to get api jwt");
|
|
3389
3389
|
return new oi(e, a, n, r);
|
|
3390
3390
|
}
|
|
@@ -3426,7 +3426,7 @@ class oi {
|
|
|
3426
3426
|
stack: r.stack
|
|
3427
3427
|
}
|
|
3428
3428
|
};
|
|
3429
|
-
await
|
|
3429
|
+
await va(Ba, i);
|
|
3430
3430
|
} catch (i) {
|
|
3431
3431
|
console.error(i);
|
|
3432
3432
|
}
|
|
@@ -3493,24 +3493,24 @@ class oi {
|
|
|
3493
3493
|
}, a = (o, l) => {
|
|
3494
3494
|
if (l) return l;
|
|
3495
3495
|
if (o) {
|
|
3496
|
-
const c = s(o), f = c.width,
|
|
3497
|
-
return { width: f, height:
|
|
3496
|
+
const c = s(o), f = c.width, h = c.height;
|
|
3497
|
+
return { width: f, height: h, padding: On };
|
|
3498
3498
|
} else
|
|
3499
3499
|
return { width: zn, height: zn, padding: On };
|
|
3500
3500
|
}, u = (o, l) => {
|
|
3501
3501
|
if (l) return l;
|
|
3502
|
-
const c = s(o), f = c.width,
|
|
3503
|
-
return { width: f, height:
|
|
3502
|
+
const c = s(o), f = c.width, h = c.height, m = Math.min(Math.round(Math.min(f, h) / 4), Vi);
|
|
3503
|
+
return { width: f, height: h, padding: m };
|
|
3504
3504
|
};
|
|
3505
3505
|
for (const o of r) {
|
|
3506
|
-
const l = o.id, c = o.lat, f = o.lng,
|
|
3506
|
+
const l = o.id, c = o.lat, f = o.lng, h = o.rank;
|
|
3507
3507
|
let m = {
|
|
3508
3508
|
id: l,
|
|
3509
3509
|
initialize: o.pin?.initialize,
|
|
3510
3510
|
element: o.pin?.element,
|
|
3511
3511
|
style: o.pin?.style,
|
|
3512
3512
|
dimensions: a(o.pin?.element, o.pin?.dimensions)
|
|
3513
|
-
},
|
|
3513
|
+
}, d = {
|
|
3514
3514
|
id: l,
|
|
3515
3515
|
initialize: o.tooltip.initialize,
|
|
3516
3516
|
element: o.tooltip.element,
|
|
@@ -3524,13 +3524,13 @@ class oi {
|
|
|
3524
3524
|
style: o.popup.style,
|
|
3525
3525
|
dimensions: u(o.popup.element, o.popup.dimensions)
|
|
3526
3526
|
});
|
|
3527
|
-
const
|
|
3528
|
-
n.push(
|
|
3527
|
+
const g = new Ei(l, c, f, h, m, d, v);
|
|
3528
|
+
n.push(g);
|
|
3529
3529
|
}
|
|
3530
3530
|
return n.forEach((o) => this.markers.set(o.properites.id, o)), n.sort((o, l) => l.properites.rank - o.properites.rank), n;
|
|
3531
3531
|
}
|
|
3532
3532
|
async updateMarkers(e) {
|
|
3533
|
-
|
|
3533
|
+
St(/* @__PURE__ */ ti(Fa), e);
|
|
3534
3534
|
try {
|
|
3535
3535
|
const n = this.mapProvider.getParameters(), r = this.getMarkers(e);
|
|
3536
3536
|
await this.markerVisibilityManager.updateMarkers(n, r), this.mapStateProvider.start(), this.markerVisibilityProcessor.run();
|