@arenarium/maps 1.3.3 → 1.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +448 -450
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
class qt {
|
|
2
2
|
invoked = !1;
|
|
3
|
+
running = !1;
|
|
3
4
|
interval;
|
|
4
5
|
timeout;
|
|
5
6
|
callback;
|
|
@@ -11,17 +12,17 @@ class qt {
|
|
|
11
12
|
this.invoked = !1, await this.callback() || !this.invoked ? this.stop() : this.timeout = window.setTimeout(this.process.bind(this), this.interval);
|
|
12
13
|
}
|
|
13
14
|
run() {
|
|
14
|
-
this.invoked = !0, this.
|
|
15
|
+
this.invoked = !0, this.running || (this.running = !0, this.timeout = window.setTimeout(this.process.bind(this), 0));
|
|
15
16
|
}
|
|
16
17
|
stop() {
|
|
17
|
-
this.invoked = !1, this.timeout && window.clearTimeout(this.timeout), this.timeout = void 0;
|
|
18
|
+
this.invoked = !1, this.running = !1, this.timeout && window.clearTimeout(this.timeout), this.timeout = void 0;
|
|
18
19
|
}
|
|
19
20
|
}
|
|
20
21
|
class xi {
|
|
21
22
|
properites;
|
|
22
23
|
state;
|
|
23
|
-
constructor(e, n, r, i, s, a,
|
|
24
|
-
this.properites = { id: e, lat: n, lng: r, rank: i, pin: s, tooltip: a, popup:
|
|
24
|
+
constructor(e, n, r, i, s, a, u) {
|
|
25
|
+
this.properites = { id: e, lat: n, lng: r, rank: i, pin: s, tooltip: a, popup: u }, this.state = void 0;
|
|
25
26
|
}
|
|
26
27
|
get input() {
|
|
27
28
|
const e = this.properites, n = e.tooltip.dimensions;
|
|
@@ -111,7 +112,7 @@ class fr {
|
|
|
111
112
|
this.workerInvocations.forEach((e) => e.reject(new Error("Terminated"))), this.workerInvocations.clear(), this.worker.terminate();
|
|
112
113
|
}
|
|
113
114
|
}
|
|
114
|
-
class
|
|
115
|
+
class We {
|
|
115
116
|
remove;
|
|
116
117
|
insert;
|
|
117
118
|
constructor(e, n) {
|
|
@@ -119,10 +120,10 @@ class Be {
|
|
|
119
120
|
}
|
|
120
121
|
static from(e, n) {
|
|
121
122
|
const r = new Set(e), i = new Set(n), s = Array.from(r.difference(i)), a = Array.from(i.difference(r));
|
|
122
|
-
return new
|
|
123
|
+
return new We(s, a);
|
|
123
124
|
}
|
|
124
125
|
static empty() {
|
|
125
|
-
return new
|
|
126
|
+
return new We([], []);
|
|
126
127
|
}
|
|
127
128
|
}
|
|
128
129
|
const hr = '(function(){"use strict";function w(l,t,e){return{x:T(t)*e,y:I(l)*e}}function m(l,t,e){return{lat:R(t/e),lng:P(l/e)}}function T(l){return(180+l)/360}function I(l){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+l*Math.PI/360)))/360}function P(l){return l*360-180}function R(l){return 360/Math.PI*Math.atan(Math.exp((180-l*360)*Math.PI/180))-90}class c{sw;ne;constructor(t,e,n,s){if(n<t)throw new Error(`Invalid bounds: ${t}, ${e}, ${n}, ${s}`);if(s<e)throw new Error(`Invalid bounds: ${t}, ${e}, ${n}, ${s}`);this.sw={lat:t,lng:e},this.ne={lat:n,lng:s}}contains(t,e){return!(t<this.sw.lat||this.ne.lat<t||e<this.sw.lng||this.ne.lng<e)}intersects(t){return!(t.ne.lat<this.sw.lat||this.ne.lat<t.sw.lat||t.ne.lng<this.sw.lng||this.ne.lng<t.sw.lng)}}class h{blockL;blockR;sw;ne;constructor(t,e,n,s){if(n<t)throw new Error(`Invalid bounds: ${t}, ${e}, ${n}, ${s}`);this.sw={lat:t,lng:e},this.ne={lat:n,lng:s},e<s?(this.blockL=new c(t,e,n,s),this.blockR=new c(0,0,0,0)):(this.blockL=new c(t,-180,n,s),this.blockR=new c(t,e,n,180))}static bounds(t){const e=t.bounds,n=t.center;return e.sw.lng<=n.lng&&e.ne.lng<=n.lng?{sw:{lat:e.sw.lat,lng:-180},ne:{lat:e.ne.lat,lng:180}}:e.sw.lng>=n.lng&&e.ne.lng>=n.lng?{sw:{lat:e.sw.lat,lng:-180},ne:{lat:e.ne.lat,lng:180}}:Math.abs(e.ne.lng-n.lng)+Math.abs(e.sw.lng-n.lng)>360?{sw:{lat:e.sw.lat,lng:-180},ne:{lat:e.ne.lat,lng:180}}:e.ne.lng-e.sw.lng>360?{sw:{lat:e.sw.lat,lng:-180},ne:{lat:e.ne.lat,lng:180}}:t.bounds}static create(t){const e=this.bounds(t),n=e.sw,s=e.ne;return new h(n.lat,n.lng,s.lat,s.lng)}static offset(t,e,n){const s=this.bounds(t),r=t.zoom,o=e*Math.pow(2,r),i=w(s.sw.lat,s.sw.lng,o),a=w(s.ne.lat,s.ne.lng,o);let g=Math.max(i.x-n.left,0),f=Math.min(i.y+n.bottom,o),D=Math.min(a.x+n.right,o),N=Math.max(a.y-n.top,0);const z=m(g,f,o),C=m(D,N,o);return new h(z.lat,z.lng,C.lat,C.lng)}contains(t,e){return this.blockL.contains(t,e)||this.blockR.contains(t,e)}intersects(t){return this.blockL.intersects(t)||this.blockR.intersects(t)}}class S{id;bounds;markers;constructor(t,e){this.id=t,this.bounds=e,this.markers=[]}belongs(t){const e=this.bounds.sw;if(t.lat<e.lat||t.lng<e.lng)return!1;const n=this.bounds.ne;return!(n.lat<t.lat||n.lng<t.lng)}neighbours(t,e){const n=Math.abs(t.id.length-this.id.length);if(n>e)return!1;const s=Math.min(this.id.length,t.id.length)-e+n;for(let r=0;r<s;r++)if(this.id[r]!=t.id[r])return!1;return!0}}class u{tree;zoom;cell;branches;constructor(t,e,n,s){this.tree=t,this.zoom=n,this.cell=new S(e,s),this.branches=new Array}split(){const t=this.cell.bounds,e=Math.pow(2,this.tree.depth),n=(t.ne.lat-t.sw.lat)/e,s=(t.ne.lng-t.sw.lng)/e;for(let r=0;r<e;r++)for(let o=0;o<e;o++){const i=t.sw.lat+r*n,a=t.sw.lng+o*s,g=i+n,f=a+s;this.branches.push(new u(this.tree,`${this.cell.id}${r*2+o}`,this.zoom+this.tree.depth,{sw:{lat:i,lng:a},ne:{lat:g,lng:f}}))}}add(t){if(this.cell.belongs(t)==!1)return!1;if(this.cell.markers.length<this.tree.capacity)return this.cell.markers.push(t),!0;this.branches.length==0&&this.split();for(let e=0;e<this.branches.length;e++)if(this.branches[e].add(t))return!0;throw new Error("Failed to add marker to branch")}compact(){if(this.branches.length==0)return;for(let s=0;s<this.branches.length;s++)this.branches[s].compact();const t=new Array,e=new Array;for(let s=0;s<this.branches.length;s++){const r=this.branches[s];t.push(...r.branches),e.push(...r.cell.markers)}const n=new u(this.tree,this.cell.id,this.zoom+this.tree.depth,this.cell.bounds);n.branches=t,n.cell.markers=e,this.branches=[n]}cells(t,e,n){if(t<this.zoom||e.intersects(this.cell.bounds)==!1)return n;n.push(this.cell);for(let s=0;s<this.branches.length;s++)this.branches[s].cells(t,e,n);return n}print(t){console.log(`${"---".repeat(t)}|${this.cell.id} zoom=[${this.zoom}] markers=[${this.cell.markers.length}]`);for(let e=0;e<this.branches.length;e++)this.branches[e].print(t+1)}count(){return this.cell.markers.length+this.branches.reduce((t,e)=>t+e.count(),0)}}class x{capacity;depth;root;constructor(t,e,n){this.capacity=n,this.depth=e,this.root=new u(this,"R",t,{sw:{lat:-90,lng:-180},ne:{lat:90,lng:180}})}add(t){return this.root.add(t)}compact(){this.root.compact()}cells(t,e){const n=new Array;return this.root.cells(t,e,n),n}print(){this.root.print(0)}}const A=16,p=2,k=1,M=A*4;let b,d,E=p,$=k,y=M;const v={update(l,t,e){const n=-Math.floor(Math.log2(l.mapSize/y)),s=new x(n,$,E);for(let o=0;o<t.length;o++){const i=t[o];if(!s.add(i))throw new Error("Failed to add marker to tree")}const r=-n;for(let o=0;o<r;o++)s.compact();b=s,d=e},configure(l){E=l?.process?.visibility?.cell?.capacity??p,$=l?.process?.visibility?.cell?.depth??k,y=l?.process?.visibility?.cell?.size??M},filter(l,t){if(!b||!d)return[];const e=h.create(t);let n=[],s=t.zoom;for(;s<l.zoomMax&&n.length<d;)n=b.cells(s,e).flatMap(r=>r.markers),s++;return n.map(r=>r.index)}};class _{methods;constructor(t){this.methods=t}listen(){self.onmessage=this.onmessage.bind(this)}async onmessage(t){const{id:e,method:n,args:s}=t.data;try{const r=this.methods[n];if(typeof r!="function")throw new Error(`Unknown method: ${n}`);const o=await r(...s),i={id:e,result:o};self.postMessage(i)}catch(r){const o=r instanceof Error?r.message:String(r),i={id:e,error:o};self.postMessage(i)}}}new _(v).listen()})();\n', zn = typeof self < "u" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);", hr], { type: "text/javascript;charset=utf-8" });
|
|
@@ -202,10 +203,10 @@ class ut {
|
|
|
202
203
|
* @param offsetY - The y offset of the map in pixels at zoom level n.
|
|
203
204
|
*/
|
|
204
205
|
static offset(e, n, r) {
|
|
205
|
-
const i = this.bounds(e), s = e.zoom, a = n * Math.pow(2, s),
|
|
206
|
-
let
|
|
207
|
-
const m = On(
|
|
208
|
-
return new ut(m.lat, m.lng,
|
|
206
|
+
const i = this.bounds(e), s = e.zoom, a = n * Math.pow(2, s), u = at(i.sw.lat, i.sw.lng, a), o = at(i.ne.lat, i.ne.lng, a);
|
|
207
|
+
let l = Math.max(u.x - r.left, 0), c = Math.min(u.y + r.bottom, a), f = Math.min(o.x + r.right, a), h = Math.max(o.y - r.top, 0);
|
|
208
|
+
const m = On(l, c, a), p = On(f, h, a);
|
|
209
|
+
return new ut(m.lat, m.lng, p.lat, p.lng);
|
|
209
210
|
}
|
|
210
211
|
contains(e, n) {
|
|
211
212
|
return this.blockL.contains(e, n) || this.blockR.contains(e, n);
|
|
@@ -214,29 +215,29 @@ class ut {
|
|
|
214
215
|
return this.blockL.intersects(e) || this.blockR.intersects(e);
|
|
215
216
|
}
|
|
216
217
|
}
|
|
217
|
-
const Di = 75, zi = 150, Ln = 25e-5, Oi = 1e6, Li = 2e6, Fn = 3e6, pr = 10, $n = 16, Fi = 8, Vn = 2,
|
|
218
|
-
class
|
|
218
|
+
const Di = 75, zi = 150, Ln = 25e-5, Oi = 1e6, Li = 2e6, Fn = 3e6, pr = 10, $n = 16, Fi = 8, Vn = 2, Ue = 0.5, $i = "0px 2px 2px rgba(0, 0, 0, 0.5)", Un = 8, Vi = 8, Ui = "drop-shadow(0px 2px 2px rgba(0, 0, 0, 0.5))", jn = "white", ji = "darkgreen", Wn = 1024;
|
|
219
|
+
class Wi {
|
|
219
220
|
// State
|
|
220
221
|
markers;
|
|
221
222
|
markersVisible;
|
|
222
223
|
markerVisibilityTreeWorker;
|
|
223
224
|
markerVisibilityTreeWorkerClient;
|
|
224
|
-
markerVisibilityTreeLimit =
|
|
225
|
+
markerVisibilityTreeLimit = Wn;
|
|
225
226
|
set configuration(e) {
|
|
226
|
-
this.markerVisibilityTreeWorkerClient?.invoke("configure", e), this.markerVisibilityTreeLimit = e?.process?.visibility?.limit ??
|
|
227
|
+
this.markerVisibilityTreeWorkerClient?.invoke("configure", e), this.markerVisibilityTreeLimit = e?.process?.visibility?.limit ?? Wn;
|
|
227
228
|
}
|
|
228
229
|
getMarkers() {
|
|
229
230
|
return Array.from(this.markersVisible ?? []);
|
|
230
231
|
}
|
|
231
232
|
async getMarkersDelta(e, n) {
|
|
232
233
|
if (this.markerVisibilityTreeWorkerClient && this.markers) {
|
|
233
|
-
const r = await this.markerVisibilityTreeWorkerClient.invoke("filter", e, n), i = this.markersVisible, s = r.map((
|
|
234
|
+
const r = await this.markerVisibilityTreeWorkerClient.invoke("filter", e, n), i = this.markersVisible, s = r.map((u) => this.markers[u]), a = We.from(i, s);
|
|
234
235
|
return this.markersVisible = s, a;
|
|
235
236
|
} else if (this.markers != this.markersVisible) {
|
|
236
|
-
const r = this.markersVisible, i = this.markers, s =
|
|
237
|
+
const r = this.markersVisible, i = this.markers, s = We.from(r, i);
|
|
237
238
|
return this.markersVisible = i, s;
|
|
238
239
|
} else
|
|
239
|
-
return
|
|
240
|
+
return We.empty();
|
|
240
241
|
}
|
|
241
242
|
async updateMarkers(e, n) {
|
|
242
243
|
this.markers = n, n.length > this.markerVisibilityTreeLimit ? (this.markerVisibilityTreeWorker = new Ii(), this.markerVisibilityTreeWorkerClient = new fr(this.markerVisibilityTreeWorker), await this.markerVisibilityTreeWorkerClient.invoke(
|
|
@@ -251,7 +252,7 @@ class Bi {
|
|
|
251
252
|
}
|
|
252
253
|
}
|
|
253
254
|
const Kt = !1;
|
|
254
|
-
var
|
|
255
|
+
var Bi = Array.isArray, Hi = Array.prototype.indexOf, Ze = Array.prototype.includes, qi = Array.from, Yi = Object.defineProperty, ot = Object.getOwnPropertyDescriptor, Zi = Object.prototype, Xi = Array.prototype, Ji = Object.getPrototypeOf, Bn = Object.isExtensible;
|
|
255
256
|
const Gi = () => {
|
|
256
257
|
};
|
|
257
258
|
function Ki(t) {
|
|
@@ -324,19 +325,19 @@ function ln(t) {
|
|
|
324
325
|
function wr() {
|
|
325
326
|
return !0;
|
|
326
327
|
}
|
|
327
|
-
let
|
|
328
|
+
let je = [];
|
|
328
329
|
function fs() {
|
|
329
|
-
var t =
|
|
330
|
-
|
|
330
|
+
var t = je;
|
|
331
|
+
je = [], Ki(t);
|
|
331
332
|
}
|
|
332
333
|
function Re(t) {
|
|
333
|
-
if (
|
|
334
|
-
var e =
|
|
334
|
+
if (je.length === 0) {
|
|
335
|
+
var e = je;
|
|
335
336
|
queueMicrotask(() => {
|
|
336
|
-
e ===
|
|
337
|
+
e === je && fs();
|
|
337
338
|
});
|
|
338
339
|
}
|
|
339
|
-
|
|
340
|
+
je.push(t);
|
|
340
341
|
}
|
|
341
342
|
function kr(t) {
|
|
342
343
|
var e = y;
|
|
@@ -494,12 +495,12 @@ class Se {
|
|
|
494
495
|
#l(e, n, r) {
|
|
495
496
|
e.f ^= D;
|
|
496
497
|
for (var i = e.first; i !== null; ) {
|
|
497
|
-
var s = i.f, a = (s & (Te | Fe)) !== 0,
|
|
498
|
-
if (!
|
|
498
|
+
var s = i.f, a = (s & (Te | Fe)) !== 0, u = a && (s & D) !== 0, o = u || (s & Me) !== 0 || this.#t.has(i);
|
|
499
|
+
if (!o && i.fn !== null) {
|
|
499
500
|
a ? i.f ^= D : (s & pt) !== 0 ? n.push(i) : dt(i) && ((s & we) !== 0 && this.#e.add(i), Ke(i));
|
|
500
|
-
var
|
|
501
|
-
if (
|
|
502
|
-
i =
|
|
501
|
+
var l = i.first;
|
|
502
|
+
if (l !== null) {
|
|
503
|
+
i = l;
|
|
503
504
|
continue;
|
|
504
505
|
}
|
|
505
506
|
}
|
|
@@ -556,27 +557,27 @@ class Se {
|
|
|
556
557
|
continue;
|
|
557
558
|
}
|
|
558
559
|
const s = [];
|
|
559
|
-
for (const [
|
|
560
|
-
if (i.current.has(
|
|
561
|
-
if (n &&
|
|
562
|
-
i.current.set(
|
|
560
|
+
for (const [u, o] of this.current) {
|
|
561
|
+
if (i.current.has(u))
|
|
562
|
+
if (n && o !== i.current.get(u))
|
|
563
|
+
i.current.set(u, o);
|
|
563
564
|
else
|
|
564
565
|
continue;
|
|
565
|
-
s.push(
|
|
566
|
+
s.push(u);
|
|
566
567
|
}
|
|
567
568
|
if (s.length === 0)
|
|
568
569
|
continue;
|
|
569
|
-
const a = [...i.current.keys()].filter((
|
|
570
|
+
const a = [...i.current.keys()].filter((u) => !this.current.has(u));
|
|
570
571
|
if (a.length > 0) {
|
|
571
572
|
var r = K;
|
|
572
573
|
K = [];
|
|
573
|
-
const
|
|
574
|
-
for (const
|
|
575
|
-
_r(
|
|
574
|
+
const u = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Map();
|
|
575
|
+
for (const l of s)
|
|
576
|
+
_r(l, a, u, o);
|
|
576
577
|
if (K.length > 0) {
|
|
577
578
|
x = i, i.apply();
|
|
578
|
-
for (const
|
|
579
|
-
i.#l(
|
|
579
|
+
for (const l of K)
|
|
580
|
+
i.#l(l, [], []);
|
|
580
581
|
i.deactivate();
|
|
581
582
|
}
|
|
582
583
|
K = r;
|
|
@@ -669,9 +670,9 @@ function qn(t) {
|
|
|
669
670
|
let a = i.parent;
|
|
670
671
|
for (; a !== null; )
|
|
671
672
|
ve.has(a) && (ve.delete(a), s.push(a)), a = a.parent;
|
|
672
|
-
for (let
|
|
673
|
-
const
|
|
674
|
-
(
|
|
673
|
+
for (let u = s.length - 1; u >= 0; u--) {
|
|
674
|
+
const o = s[u];
|
|
675
|
+
(o.f & (Ee | Me)) === 0 && Ke(o);
|
|
675
676
|
}
|
|
676
677
|
}
|
|
677
678
|
ve.clear();
|
|
@@ -861,7 +862,7 @@ class ws {
|
|
|
861
862
|
this.#o(this.#r);
|
|
862
863
|
}), this.#l > 0) {
|
|
863
864
|
var e = this.#a = document.createDocumentFragment();
|
|
864
|
-
|
|
865
|
+
Us(this.#s, e);
|
|
865
866
|
const n = (
|
|
866
867
|
/** @type {(anchor: Node) => void} */
|
|
867
868
|
this.#i.pending
|
|
@@ -962,29 +963,29 @@ class ws {
|
|
|
962
963
|
}), this.#v(() => {
|
|
963
964
|
Se.ensure(), this.#g();
|
|
964
965
|
});
|
|
965
|
-
},
|
|
966
|
+
}, u = (o) => {
|
|
966
967
|
try {
|
|
967
|
-
s = !0, n?.(
|
|
968
|
-
} catch (
|
|
969
|
-
_e(
|
|
968
|
+
s = !0, n?.(o, a), s = !1;
|
|
969
|
+
} catch (l) {
|
|
970
|
+
_e(l, this.#n && this.#n.parent);
|
|
970
971
|
}
|
|
971
972
|
r && (this.#t = this.#v(() => {
|
|
972
973
|
Se.ensure();
|
|
973
974
|
try {
|
|
974
975
|
return Ae(() => {
|
|
975
|
-
var
|
|
976
|
+
var l = (
|
|
976
977
|
/** @type {Effect} */
|
|
977
978
|
y
|
|
978
979
|
);
|
|
979
|
-
|
|
980
|
+
l.b = this, l.f |= Qt, r(
|
|
980
981
|
this.#r,
|
|
981
|
-
() =>
|
|
982
|
+
() => o,
|
|
982
983
|
() => a
|
|
983
984
|
);
|
|
984
985
|
});
|
|
985
|
-
} catch (
|
|
986
|
+
} catch (l) {
|
|
986
987
|
return _e(
|
|
987
|
-
|
|
988
|
+
l,
|
|
988
989
|
/** @type {Effect} */
|
|
989
990
|
this.#n.parent
|
|
990
991
|
), null;
|
|
@@ -992,19 +993,19 @@ class ws {
|
|
|
992
993
|
}));
|
|
993
994
|
};
|
|
994
995
|
Re(() => {
|
|
995
|
-
var
|
|
996
|
+
var o;
|
|
996
997
|
try {
|
|
997
|
-
|
|
998
|
-
} catch (
|
|
999
|
-
_e(
|
|
998
|
+
o = this.transform_error(e);
|
|
999
|
+
} catch (l) {
|
|
1000
|
+
_e(l, this.#n && this.#n.parent);
|
|
1000
1001
|
return;
|
|
1001
1002
|
}
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1003
|
+
o !== null && typeof o == "object" && typeof /** @type {any} */
|
|
1004
|
+
o.then == "function" ? o.then(
|
|
1005
|
+
u,
|
|
1005
1006
|
/** @param {unknown} e */
|
|
1006
|
-
(
|
|
1007
|
-
) : o
|
|
1007
|
+
(l) => _e(l, this.#n && this.#n.parent)
|
|
1008
|
+
) : u(o);
|
|
1008
1009
|
});
|
|
1009
1010
|
}
|
|
1010
1011
|
}
|
|
@@ -1018,24 +1019,24 @@ function ks(t, e, n, r) {
|
|
|
1018
1019
|
var a = (
|
|
1019
1020
|
/** @type {Effect} */
|
|
1020
1021
|
y
|
|
1021
|
-
),
|
|
1022
|
-
function
|
|
1023
|
-
|
|
1022
|
+
), u = ys(), o = s.length === 1 ? s[0].promise : s.length > 1 ? Promise.all(s.map((f) => f.promise)) : null;
|
|
1023
|
+
function l(f) {
|
|
1024
|
+
u();
|
|
1024
1025
|
try {
|
|
1025
1026
|
r(f);
|
|
1026
|
-
} catch (
|
|
1027
|
-
(a.f & Ee) === 0 && _e(
|
|
1027
|
+
} catch (h) {
|
|
1028
|
+
(a.f & Ee) === 0 && _e(h, a);
|
|
1028
1029
|
}
|
|
1029
1030
|
nn();
|
|
1030
1031
|
}
|
|
1031
1032
|
if (n.length === 0) {
|
|
1032
|
-
|
|
1033
|
+
o.then(() => l(e.map(i)));
|
|
1033
1034
|
return;
|
|
1034
1035
|
}
|
|
1035
1036
|
function c() {
|
|
1036
|
-
|
|
1037
|
+
u(), Promise.all(n.map((f) => /* @__PURE__ */ Ms(f))).then((f) => l([...e.map(i), ...f])).catch((f) => _e(f, a));
|
|
1037
1038
|
}
|
|
1038
|
-
|
|
1039
|
+
o ? o.then(c) : c();
|
|
1039
1040
|
}
|
|
1040
1041
|
function ys() {
|
|
1041
1042
|
var t = y, e = k, n = le, r = x;
|
|
@@ -1094,47 +1095,47 @@ function Ms(t, e, n) {
|
|
|
1094
1095
|
), s = Dt(
|
|
1095
1096
|
/** @type {V} */
|
|
1096
1097
|
R
|
|
1097
|
-
), a = !k,
|
|
1098
|
+
), a = !k, u = /* @__PURE__ */ new Map();
|
|
1098
1099
|
return Ls(() => {
|
|
1099
|
-
var
|
|
1100
|
-
i =
|
|
1100
|
+
var o = dr();
|
|
1101
|
+
i = o.promise;
|
|
1101
1102
|
try {
|
|
1102
|
-
Promise.resolve(t()).then(
|
|
1103
|
-
} catch (
|
|
1104
|
-
|
|
1103
|
+
Promise.resolve(t()).then(o.resolve, o.reject).finally(nn);
|
|
1104
|
+
} catch (h) {
|
|
1105
|
+
o.reject(h), nn();
|
|
1105
1106
|
}
|
|
1106
|
-
var
|
|
1107
|
+
var l = (
|
|
1107
1108
|
/** @type {Batch} */
|
|
1108
1109
|
x
|
|
1109
1110
|
);
|
|
1110
1111
|
if (a) {
|
|
1111
1112
|
var c = bs();
|
|
1112
|
-
|
|
1113
|
+
u.get(l)?.reject(Ne), u.delete(l), u.set(l, o);
|
|
1113
1114
|
}
|
|
1114
|
-
const f = (
|
|
1115
|
-
if (
|
|
1115
|
+
const f = (h, m = void 0) => {
|
|
1116
|
+
if (l.activate(), m)
|
|
1116
1117
|
m !== Ne && (s.f |= xe, At(s, m));
|
|
1117
1118
|
else {
|
|
1118
|
-
(s.f & xe) !== 0 && (s.f ^= xe), At(s,
|
|
1119
|
-
for (const [
|
|
1120
|
-
if (
|
|
1119
|
+
(s.f & xe) !== 0 && (s.f ^= xe), At(s, h);
|
|
1120
|
+
for (const [p, v] of u) {
|
|
1121
|
+
if (u.delete(p), p === l) break;
|
|
1121
1122
|
v.reject(Ne);
|
|
1122
1123
|
}
|
|
1123
1124
|
}
|
|
1124
1125
|
c && c();
|
|
1125
1126
|
};
|
|
1126
|
-
|
|
1127
|
+
o.promise.then(f, (h) => f(null, h || "unknown"));
|
|
1127
1128
|
}), Rs(() => {
|
|
1128
|
-
for (const
|
|
1129
|
-
|
|
1130
|
-
}), new Promise((
|
|
1131
|
-
function
|
|
1129
|
+
for (const o of u.values())
|
|
1130
|
+
o.reject(Ne);
|
|
1131
|
+
}), new Promise((o) => {
|
|
1132
|
+
function l(c) {
|
|
1132
1133
|
function f() {
|
|
1133
|
-
c === i ?
|
|
1134
|
+
c === i ? o(s) : l(i);
|
|
1134
1135
|
}
|
|
1135
1136
|
c.then(f, f);
|
|
1136
1137
|
}
|
|
1137
|
-
|
|
1138
|
+
l(i);
|
|
1138
1139
|
});
|
|
1139
1140
|
}
|
|
1140
1141
|
function Es(t) {
|
|
@@ -1163,7 +1164,7 @@ function fn(t) {
|
|
|
1163
1164
|
var e, n = y;
|
|
1164
1165
|
he(xs(t));
|
|
1165
1166
|
try {
|
|
1166
|
-
t.f &= ~Le, Es(t), e =
|
|
1167
|
+
t.f &= ~Le, Es(t), e = jr(t);
|
|
1167
1168
|
} finally {
|
|
1168
1169
|
he(n);
|
|
1169
1170
|
}
|
|
@@ -1203,11 +1204,11 @@ function Dt(t, e) {
|
|
|
1203
1204
|
return n;
|
|
1204
1205
|
}
|
|
1205
1206
|
// @__NO_SIDE_EFFECTS__
|
|
1206
|
-
function
|
|
1207
|
+
function U(t, e) {
|
|
1207
1208
|
const n = Dt(t);
|
|
1208
|
-
return
|
|
1209
|
+
return js(n), n;
|
|
1209
1210
|
}
|
|
1210
|
-
function
|
|
1211
|
+
function W(t, e, n = !1) {
|
|
1211
1212
|
k !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
|
|
1212
1213
|
// to ensure we error if state is set inside an inspect effect
|
|
1213
1214
|
(!ae || (k.f & Hn) !== 0) && wr() && (k.f & (z | we | an | Hn)) !== 0 && (te === null || !Ze.call(te, t)) && is();
|
|
@@ -1226,7 +1227,7 @@ function At(t, e) {
|
|
|
1226
1227
|
);
|
|
1227
1228
|
(t.f & F) !== 0 && fn(i), un(i);
|
|
1228
1229
|
}
|
|
1229
|
-
t.wv = Vr(), Tr(t, F), y !== null && (y.f & D) !== 0 && (y.f & (Te | Fe)) === 0 && (G === null ?
|
|
1230
|
+
t.wv = Vr(), Tr(t, F), y !== null && (y.f & D) !== 0 && (y.f & (Te | Fe)) === 0 && (G === null ? Ws([t]) : G.push(t)), !r.is_fork && rn.size > 0 && !Pr && Ps();
|
|
1230
1231
|
}
|
|
1231
1232
|
return e;
|
|
1232
1233
|
}
|
|
@@ -1237,20 +1238,20 @@ function Ps() {
|
|
|
1237
1238
|
rn.clear();
|
|
1238
1239
|
}
|
|
1239
1240
|
function lt(t) {
|
|
1240
|
-
|
|
1241
|
+
W(t, t.v + 1);
|
|
1241
1242
|
}
|
|
1242
1243
|
function Tr(t, e) {
|
|
1243
1244
|
var n = t.reactions;
|
|
1244
1245
|
if (n !== null)
|
|
1245
1246
|
for (var r = n.length, i = 0; i < r; i++) {
|
|
1246
|
-
var s = n[i], a = s.f,
|
|
1247
|
-
if (
|
|
1248
|
-
var
|
|
1247
|
+
var s = n[i], a = s.f, u = (a & F) === 0;
|
|
1248
|
+
if (u && S(s, e), (a & z) !== 0) {
|
|
1249
|
+
var o = (
|
|
1249
1250
|
/** @type {Derived} */
|
|
1250
1251
|
s
|
|
1251
1252
|
);
|
|
1252
|
-
se?.delete(
|
|
1253
|
-
} else
|
|
1253
|
+
se?.delete(o), (a & Le) === 0 && (a & ee && (s.f |= Le), Tr(o, oe));
|
|
1254
|
+
} else u && ((a & we) !== 0 && ve !== null && ve.add(
|
|
1254
1255
|
/** @type {Effect} */
|
|
1255
1256
|
s
|
|
1256
1257
|
), ce(
|
|
@@ -1265,122 +1266,122 @@ function rt(t) {
|
|
|
1265
1266
|
const e = Ji(t);
|
|
1266
1267
|
if (e !== Zi && e !== Xi)
|
|
1267
1268
|
return t;
|
|
1268
|
-
var n = /* @__PURE__ */ new Map(), r =
|
|
1269
|
+
var n = /* @__PURE__ */ new Map(), r = Bi(t), i = /* @__PURE__ */ U(0), s = De, a = (u) => {
|
|
1269
1270
|
if (De === s)
|
|
1270
|
-
return
|
|
1271
|
-
var
|
|
1271
|
+
return u();
|
|
1272
|
+
var o = k, l = De;
|
|
1272
1273
|
ne(null), Jn(s);
|
|
1273
|
-
var c =
|
|
1274
|
-
return ne(
|
|
1274
|
+
var c = u();
|
|
1275
|
+
return ne(o), Jn(l), c;
|
|
1275
1276
|
};
|
|
1276
|
-
return r && n.set("length", /* @__PURE__ */
|
|
1277
|
+
return r && n.set("length", /* @__PURE__ */ U(
|
|
1277
1278
|
/** @type {any[]} */
|
|
1278
1279
|
t.length
|
|
1279
1280
|
)), new Proxy(
|
|
1280
1281
|
/** @type {any} */
|
|
1281
1282
|
t,
|
|
1282
1283
|
{
|
|
1283
|
-
defineProperty(o, l
|
|
1284
|
-
(!("value" in
|
|
1285
|
-
var c = n.get(
|
|
1284
|
+
defineProperty(u, o, l) {
|
|
1285
|
+
(!("value" in l) || l.configurable === !1 || l.enumerable === !1 || l.writable === !1) && ns();
|
|
1286
|
+
var c = n.get(o);
|
|
1286
1287
|
return c === void 0 ? a(() => {
|
|
1287
|
-
var f = /* @__PURE__ */
|
|
1288
|
-
return n.set(
|
|
1289
|
-
}) :
|
|
1288
|
+
var f = /* @__PURE__ */ U(l.value);
|
|
1289
|
+
return n.set(o, f), f;
|
|
1290
|
+
}) : W(c, l.value, !0), !0;
|
|
1290
1291
|
},
|
|
1291
|
-
deleteProperty(
|
|
1292
|
-
var
|
|
1293
|
-
if (
|
|
1294
|
-
if (
|
|
1295
|
-
const c = a(() => /* @__PURE__ */
|
|
1296
|
-
n.set(
|
|
1292
|
+
deleteProperty(u, o) {
|
|
1293
|
+
var l = n.get(o);
|
|
1294
|
+
if (l === void 0) {
|
|
1295
|
+
if (o in u) {
|
|
1296
|
+
const c = a(() => /* @__PURE__ */ U(R));
|
|
1297
|
+
n.set(o, c), lt(i);
|
|
1297
1298
|
}
|
|
1298
1299
|
} else
|
|
1299
|
-
|
|
1300
|
+
W(l, R), lt(i);
|
|
1300
1301
|
return !0;
|
|
1301
1302
|
},
|
|
1302
|
-
get(o, l
|
|
1303
|
-
if (
|
|
1303
|
+
get(u, o, l) {
|
|
1304
|
+
if (o === St)
|
|
1304
1305
|
return t;
|
|
1305
|
-
var c = n.get(
|
|
1306
|
-
if (c === void 0 && (!f || ot(
|
|
1307
|
-
var m = rt(f ? o
|
|
1308
|
-
return
|
|
1309
|
-
}), n.set(
|
|
1310
|
-
var
|
|
1311
|
-
return
|
|
1306
|
+
var c = n.get(o), f = o in u;
|
|
1307
|
+
if (c === void 0 && (!f || ot(u, o)?.writable) && (c = a(() => {
|
|
1308
|
+
var m = rt(f ? u[o] : R), p = /* @__PURE__ */ U(m);
|
|
1309
|
+
return p;
|
|
1310
|
+
}), n.set(o, c)), c !== void 0) {
|
|
1311
|
+
var h = E(c);
|
|
1312
|
+
return h === R ? void 0 : h;
|
|
1312
1313
|
}
|
|
1313
|
-
return Reflect.get(o, l
|
|
1314
|
+
return Reflect.get(u, o, l);
|
|
1314
1315
|
},
|
|
1315
|
-
getOwnPropertyDescriptor(
|
|
1316
|
-
var
|
|
1317
|
-
if (
|
|
1318
|
-
var c = n.get(
|
|
1319
|
-
c && (
|
|
1320
|
-
} else if (
|
|
1321
|
-
var f = n.get(
|
|
1322
|
-
if (f !== void 0 &&
|
|
1316
|
+
getOwnPropertyDescriptor(u, o) {
|
|
1317
|
+
var l = Reflect.getOwnPropertyDescriptor(u, o);
|
|
1318
|
+
if (l && "value" in l) {
|
|
1319
|
+
var c = n.get(o);
|
|
1320
|
+
c && (l.value = E(c));
|
|
1321
|
+
} else if (l === void 0) {
|
|
1322
|
+
var f = n.get(o), h = f?.v;
|
|
1323
|
+
if (f !== void 0 && h !== R)
|
|
1323
1324
|
return {
|
|
1324
1325
|
enumerable: !0,
|
|
1325
1326
|
configurable: !0,
|
|
1326
|
-
value:
|
|
1327
|
+
value: h,
|
|
1327
1328
|
writable: !0
|
|
1328
1329
|
};
|
|
1329
1330
|
}
|
|
1330
|
-
return
|
|
1331
|
+
return l;
|
|
1331
1332
|
},
|
|
1332
|
-
has(
|
|
1333
|
-
if (
|
|
1333
|
+
has(u, o) {
|
|
1334
|
+
if (o === St)
|
|
1334
1335
|
return !0;
|
|
1335
|
-
var
|
|
1336
|
-
if (
|
|
1337
|
-
|
|
1338
|
-
var
|
|
1336
|
+
var l = n.get(o), c = l !== void 0 && l.v !== R || Reflect.has(u, o);
|
|
1337
|
+
if (l !== void 0 || y !== null && (!c || ot(u, o)?.writable)) {
|
|
1338
|
+
l === void 0 && (l = a(() => {
|
|
1339
|
+
var h = c ? rt(u[o]) : R, m = /* @__PURE__ */ U(h);
|
|
1339
1340
|
return m;
|
|
1340
|
-
}), n.set(
|
|
1341
|
-
var f = E(
|
|
1341
|
+
}), n.set(o, l));
|
|
1342
|
+
var f = E(l);
|
|
1342
1343
|
if (f === R)
|
|
1343
1344
|
return !1;
|
|
1344
1345
|
}
|
|
1345
1346
|
return c;
|
|
1346
1347
|
},
|
|
1347
|
-
set(o, l,
|
|
1348
|
-
var f = n.get(
|
|
1349
|
-
if (r &&
|
|
1350
|
-
for (var m =
|
|
1348
|
+
set(u, o, l, c) {
|
|
1349
|
+
var f = n.get(o), h = o in u;
|
|
1350
|
+
if (r && o === "length")
|
|
1351
|
+
for (var m = l; m < /** @type {Source<number>} */
|
|
1351
1352
|
f.v; m += 1) {
|
|
1352
|
-
var
|
|
1353
|
-
|
|
1353
|
+
var p = n.get(m + "");
|
|
1354
|
+
p !== void 0 ? W(p, R) : m in u && (p = a(() => /* @__PURE__ */ U(R)), n.set(m + "", p));
|
|
1354
1355
|
}
|
|
1355
1356
|
if (f === void 0)
|
|
1356
|
-
(!
|
|
1357
|
+
(!h || ot(u, o)?.writable) && (f = a(() => /* @__PURE__ */ U(void 0)), W(f, rt(l)), n.set(o, f));
|
|
1357
1358
|
else {
|
|
1358
|
-
|
|
1359
|
-
var v = a(() => rt(
|
|
1360
|
-
|
|
1359
|
+
h = f.v !== R;
|
|
1360
|
+
var v = a(() => rt(l));
|
|
1361
|
+
W(f, v);
|
|
1361
1362
|
}
|
|
1362
|
-
var
|
|
1363
|
-
if (
|
|
1364
|
-
if (r && typeof
|
|
1363
|
+
var b = Reflect.getOwnPropertyDescriptor(u, o);
|
|
1364
|
+
if (b?.set && b.set.call(c, l), !h) {
|
|
1365
|
+
if (r && typeof o == "string") {
|
|
1365
1366
|
var C = (
|
|
1366
1367
|
/** @type {Source<number>} */
|
|
1367
1368
|
n.get("length")
|
|
1368
|
-
), $ = Number(
|
|
1369
|
-
Number.isInteger($) && $ >= C.v &&
|
|
1369
|
+
), $ = Number(o);
|
|
1370
|
+
Number.isInteger($) && $ >= C.v && W(C, $ + 1);
|
|
1370
1371
|
}
|
|
1371
1372
|
lt(i);
|
|
1372
1373
|
}
|
|
1373
1374
|
return !0;
|
|
1374
1375
|
},
|
|
1375
|
-
ownKeys(
|
|
1376
|
+
ownKeys(u) {
|
|
1376
1377
|
E(i);
|
|
1377
|
-
var
|
|
1378
|
-
var
|
|
1379
|
-
return
|
|
1378
|
+
var o = Reflect.ownKeys(u).filter((f) => {
|
|
1379
|
+
var h = n.get(f);
|
|
1380
|
+
return h === void 0 || h.v !== R;
|
|
1380
1381
|
});
|
|
1381
|
-
for (var [
|
|
1382
|
-
c.v !== R && !(
|
|
1383
|
-
return
|
|
1382
|
+
for (var [l, c] of n)
|
|
1383
|
+
c.v !== R && !(l in u) && o.push(l);
|
|
1384
|
+
return o;
|
|
1384
1385
|
},
|
|
1385
1386
|
setPrototypeOf() {
|
|
1386
1387
|
rs();
|
|
@@ -1393,7 +1394,7 @@ function Ts() {
|
|
|
1393
1394
|
if (Yn === void 0) {
|
|
1394
1395
|
Yn = window, Ir = /Firefox/.test(navigator.userAgent);
|
|
1395
1396
|
var t = Element.prototype, e = Node.prototype, n = Text.prototype;
|
|
1396
|
-
Ar = ot(e, "firstChild").get, Nr = ot(e, "nextSibling").get,
|
|
1397
|
+
Ar = ot(e, "firstChild").get, Nr = ot(e, "nextSibling").get, Bn(t) && (t.__click = void 0, t.__className = void 0, t.__attributes = null, t.__style = void 0, t.__e = void 0), Bn(n) && (n.__t = void 0);
|
|
1397
1398
|
}
|
|
1398
1399
|
}
|
|
1399
1400
|
function Cr(t = "") {
|
|
@@ -1470,8 +1471,8 @@ function ke(t, e, n) {
|
|
|
1470
1471
|
if (n)
|
|
1471
1472
|
try {
|
|
1472
1473
|
Ke(i);
|
|
1473
|
-
} catch (
|
|
1474
|
-
throw fe(i),
|
|
1474
|
+
} catch (u) {
|
|
1475
|
+
throw fe(i), u;
|
|
1475
1476
|
}
|
|
1476
1477
|
else e !== null && ce(i);
|
|
1477
1478
|
var s = i;
|
|
@@ -1587,8 +1588,8 @@ function Pt(t, e, n = !0) {
|
|
|
1587
1588
|
}, s = r.length;
|
|
1588
1589
|
if (s > 0) {
|
|
1589
1590
|
var a = () => --s || i();
|
|
1590
|
-
for (var
|
|
1591
|
-
|
|
1591
|
+
for (var u of r)
|
|
1592
|
+
u.out(a);
|
|
1592
1593
|
} else
|
|
1593
1594
|
i();
|
|
1594
1595
|
}
|
|
@@ -1597,8 +1598,8 @@ function Fr(t, e, n) {
|
|
|
1597
1598
|
t.f ^= Me;
|
|
1598
1599
|
var r = t.nodes && t.nodes.t;
|
|
1599
1600
|
if (r !== null)
|
|
1600
|
-
for (const
|
|
1601
|
-
(
|
|
1601
|
+
for (const u of r)
|
|
1602
|
+
(u.is_global || n) && e.push(u);
|
|
1602
1603
|
for (var i = t.first; i !== null; ) {
|
|
1603
1604
|
var s = i.next, a = (i.f & It) !== 0 || // If this is a branch effect without a block effect parent,
|
|
1604
1605
|
// it means the parent block effect was pruned. In that case,
|
|
@@ -1608,7 +1609,7 @@ function Fr(t, e, n) {
|
|
|
1608
1609
|
}
|
|
1609
1610
|
}
|
|
1610
1611
|
}
|
|
1611
|
-
function
|
|
1612
|
+
function Us(t, e) {
|
|
1612
1613
|
if (t.nodes)
|
|
1613
1614
|
for (var n = t.nodes.start, r = t.nodes.end; n !== null; ) {
|
|
1614
1615
|
var i = n === r ? null : /* @__PURE__ */ zt(n);
|
|
@@ -1628,11 +1629,11 @@ function he(t) {
|
|
|
1628
1629
|
y = t;
|
|
1629
1630
|
}
|
|
1630
1631
|
let te = null;
|
|
1631
|
-
function
|
|
1632
|
+
function js(t) {
|
|
1632
1633
|
k !== null && (te === null ? te = [t] : te.push(t));
|
|
1633
1634
|
}
|
|
1634
|
-
let
|
|
1635
|
-
function
|
|
1635
|
+
let j = null, Z = 0, G = null;
|
|
1636
|
+
function Ws(t) {
|
|
1636
1637
|
G = t;
|
|
1637
1638
|
}
|
|
1638
1639
|
let $r = 1, Ce = 0, De = Ce;
|
|
@@ -1667,12 +1668,12 @@ function dt(t) {
|
|
|
1667
1668
|
}
|
|
1668
1669
|
return !1;
|
|
1669
1670
|
}
|
|
1670
|
-
function
|
|
1671
|
+
function Ur(t, e, n = !0) {
|
|
1671
1672
|
var r = t.reactions;
|
|
1672
1673
|
if (r !== null && !(te !== null && Ze.call(te, t)))
|
|
1673
1674
|
for (var i = 0; i < r.length; i++) {
|
|
1674
1675
|
var s = r[i];
|
|
1675
|
-
(s.f & z) !== 0 ?
|
|
1676
|
+
(s.f & z) !== 0 ? Ur(
|
|
1676
1677
|
/** @type {Derived} */
|
|
1677
1678
|
s,
|
|
1678
1679
|
e,
|
|
@@ -1683,10 +1684,10 @@ function jr(t, e, n = !0) {
|
|
|
1683
1684
|
));
|
|
1684
1685
|
}
|
|
1685
1686
|
}
|
|
1686
|
-
function
|
|
1687
|
-
var e =
|
|
1688
|
-
|
|
1689
|
-
null, Z = 0, G = null, k = (
|
|
1687
|
+
function jr(t) {
|
|
1688
|
+
var e = j, n = Z, r = G, i = k, s = te, a = le, u = ae, o = De, l = t.f;
|
|
1689
|
+
j = /** @type {null | Value[]} */
|
|
1690
|
+
null, Z = 0, G = null, k = (l & (Te | Fe)) === 0 ? t : null, te = null, Je(t.ctx), ae = !1, De = ++Ce, t.ac !== null && (Rr(() => {
|
|
1690
1691
|
t.ac.abort(Ne);
|
|
1691
1692
|
}), t.ac = null);
|
|
1692
1693
|
try {
|
|
@@ -1696,23 +1697,23 @@ function Ur(t) {
|
|
|
1696
1697
|
t.fn
|
|
1697
1698
|
), f = c();
|
|
1698
1699
|
t.f |= Xe;
|
|
1699
|
-
var
|
|
1700
|
-
if (
|
|
1701
|
-
var
|
|
1702
|
-
if (m || ct(t, Z),
|
|
1703
|
-
for (
|
|
1704
|
-
|
|
1700
|
+
var h = t.deps, m = x?.is_fork;
|
|
1701
|
+
if (j !== null) {
|
|
1702
|
+
var p;
|
|
1703
|
+
if (m || ct(t, Z), h !== null && Z > 0)
|
|
1704
|
+
for (h.length = Z + j.length, p = 0; p < j.length; p++)
|
|
1705
|
+
h[Z + p] = j[p];
|
|
1705
1706
|
else
|
|
1706
|
-
t.deps =
|
|
1707
|
+
t.deps = h = j;
|
|
1707
1708
|
if (hn() && (t.f & ee) !== 0)
|
|
1708
|
-
for (
|
|
1709
|
-
(p
|
|
1710
|
-
} else !m &&
|
|
1711
|
-
if (wr() && G !== null && !ae &&
|
|
1712
|
-
for (
|
|
1713
|
-
G.length;
|
|
1714
|
-
|
|
1715
|
-
G[
|
|
1709
|
+
for (p = Z; p < h.length; p++)
|
|
1710
|
+
(h[p].reactions ??= []).push(t);
|
|
1711
|
+
} else !m && h !== null && Z < h.length && (ct(t, Z), h.length = Z);
|
|
1712
|
+
if (wr() && G !== null && !ae && h !== null && (t.f & (z | oe | F)) === 0)
|
|
1713
|
+
for (p = 0; p < /** @type {Source[]} */
|
|
1714
|
+
G.length; p++)
|
|
1715
|
+
Ur(
|
|
1716
|
+
G[p],
|
|
1716
1717
|
/** @type {Effect} */
|
|
1717
1718
|
t
|
|
1718
1719
|
);
|
|
@@ -1730,10 +1731,10 @@ function Ur(t) {
|
|
|
1730
1731
|
} catch (v) {
|
|
1731
1732
|
return kr(v);
|
|
1732
1733
|
} finally {
|
|
1733
|
-
t.f ^= en,
|
|
1734
|
+
t.f ^= en, j = e, Z = n, G = r, k = i, te = s, Je(a), ae = u, De = o;
|
|
1734
1735
|
}
|
|
1735
1736
|
}
|
|
1736
|
-
function
|
|
1737
|
+
function Bs(t, e) {
|
|
1737
1738
|
let n = e.reactions;
|
|
1738
1739
|
if (n !== null) {
|
|
1739
1740
|
var r = Hi.call(n, t);
|
|
@@ -1745,7 +1746,7 @@ function Ws(t, e) {
|
|
|
1745
1746
|
if (n === null && (e.f & z) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
|
|
1746
1747
|
// to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
|
|
1747
1748
|
// allows us to skip the expensive work of disconnecting and immediately reconnecting it
|
|
1748
|
-
(
|
|
1749
|
+
(j === null || !Ze.call(j, e))) {
|
|
1749
1750
|
var s = (
|
|
1750
1751
|
/** @type {Derived} */
|
|
1751
1752
|
e
|
|
@@ -1757,7 +1758,7 @@ function ct(t, e) {
|
|
|
1757
1758
|
var n = t.deps;
|
|
1758
1759
|
if (n !== null)
|
|
1759
1760
|
for (var r = e; r < n.length; r++)
|
|
1760
|
-
|
|
1761
|
+
Bs(t, n[r]);
|
|
1761
1762
|
}
|
|
1762
1763
|
function Ke(t) {
|
|
1763
1764
|
var e = t.f;
|
|
@@ -1767,7 +1768,7 @@ function Ke(t) {
|
|
|
1767
1768
|
y = t, Tt = !0;
|
|
1768
1769
|
try {
|
|
1769
1770
|
(e & (we | mr)) !== 0 ? $s(t) : pn(t), Or(t);
|
|
1770
|
-
var i =
|
|
1771
|
+
var i = jr(t);
|
|
1771
1772
|
t.teardown = typeof i == "function" ? i : null, t.wv = $r;
|
|
1772
1773
|
var s;
|
|
1773
1774
|
Kt && cs && (t.f & F) !== 0 && t.deps;
|
|
@@ -1783,7 +1784,7 @@ function E(t) {
|
|
|
1783
1784
|
if (!r && (te === null || !Ze.call(te, t))) {
|
|
1784
1785
|
var i = k.deps;
|
|
1785
1786
|
if ((k.f & en) !== 0)
|
|
1786
|
-
t.rv < Ce && (t.rv = Ce,
|
|
1787
|
+
t.rv < Ce && (t.rv = Ce, j === null && i !== null && i[Z] === t ? Z++ : j === null ? j = [t] : j.push(t));
|
|
1787
1788
|
else {
|
|
1788
1789
|
(k.deps ??= []).push(t);
|
|
1789
1790
|
var s = t.reactions;
|
|
@@ -1799,11 +1800,11 @@ function E(t) {
|
|
|
1799
1800
|
t
|
|
1800
1801
|
);
|
|
1801
1802
|
if (Ge) {
|
|
1802
|
-
var
|
|
1803
|
-
return ((a.f & D) === 0 && a.reactions !== null ||
|
|
1803
|
+
var u = a.v;
|
|
1804
|
+
return ((a.f & D) === 0 && a.reactions !== null || Br(a)) && (u = fn(a)), Pe.set(a, u), u;
|
|
1804
1805
|
}
|
|
1805
|
-
var
|
|
1806
|
-
dt(a) && (
|
|
1806
|
+
var o = (a.f & ee) === 0 && !ae && k !== null && (Tt || (k.f & ee) !== 0), l = (a.f & Xe) === 0;
|
|
1807
|
+
dt(a) && (o && (a.f |= ee), xr(a)), o && !l && (Sr(a), Wr(a));
|
|
1807
1808
|
}
|
|
1808
1809
|
if (se?.has(t))
|
|
1809
1810
|
return se.get(t);
|
|
@@ -1811,22 +1812,22 @@ function E(t) {
|
|
|
1811
1812
|
throw t.v;
|
|
1812
1813
|
return t.v;
|
|
1813
1814
|
}
|
|
1814
|
-
function
|
|
1815
|
+
function Wr(t) {
|
|
1815
1816
|
if (t.f |= ee, t.deps !== null)
|
|
1816
1817
|
for (const e of t.deps)
|
|
1817
1818
|
(e.reactions ??= []).push(t), (e.f & z) !== 0 && (e.f & ee) === 0 && (Sr(
|
|
1818
1819
|
/** @type {Derived} */
|
|
1819
1820
|
e
|
|
1820
|
-
),
|
|
1821
|
+
), Wr(
|
|
1821
1822
|
/** @type {Derived} */
|
|
1822
1823
|
e
|
|
1823
1824
|
));
|
|
1824
1825
|
}
|
|
1825
|
-
function
|
|
1826
|
+
function Br(t) {
|
|
1826
1827
|
if (t.v === R) return !0;
|
|
1827
1828
|
if (t.deps === null) return !1;
|
|
1828
1829
|
for (const e of t.deps)
|
|
1829
|
-
if (Pe.has(e) || (e.f & z) !== 0 &&
|
|
1830
|
+
if (Pe.has(e) || (e.f & z) !== 0 && Br(
|
|
1830
1831
|
/** @type {Derived} */
|
|
1831
1832
|
e
|
|
1832
1833
|
))
|
|
@@ -1856,18 +1857,18 @@ function Qn(t) {
|
|
|
1856
1857
|
i[0] || t.target
|
|
1857
1858
|
);
|
|
1858
1859
|
Kn = t;
|
|
1859
|
-
var a = 0,
|
|
1860
|
-
if (
|
|
1861
|
-
var
|
|
1862
|
-
if (
|
|
1860
|
+
var a = 0, u = Kn === t && t[_t];
|
|
1861
|
+
if (u) {
|
|
1862
|
+
var o = i.indexOf(u);
|
|
1863
|
+
if (o !== -1 && (e === document || e === /** @type {any} */
|
|
1863
1864
|
window)) {
|
|
1864
1865
|
t[_t] = e;
|
|
1865
1866
|
return;
|
|
1866
1867
|
}
|
|
1867
|
-
var
|
|
1868
|
-
if (
|
|
1868
|
+
var l = i.indexOf(e);
|
|
1869
|
+
if (l === -1)
|
|
1869
1870
|
return;
|
|
1870
|
-
|
|
1871
|
+
o <= l && (a = o);
|
|
1871
1872
|
}
|
|
1872
1873
|
if (s = /** @type {Element} */
|
|
1873
1874
|
i[a] || t.target, s !== e) {
|
|
@@ -1880,8 +1881,8 @@ function Qn(t) {
|
|
|
1880
1881
|
var c = k, f = y;
|
|
1881
1882
|
ne(null), he(null);
|
|
1882
1883
|
try {
|
|
1883
|
-
for (var
|
|
1884
|
-
var
|
|
1884
|
+
for (var h, m = []; s !== null; ) {
|
|
1885
|
+
var p = s.assignedSlot || s.parentNode || /** @type {any} */
|
|
1885
1886
|
s.host || null;
|
|
1886
1887
|
try {
|
|
1887
1888
|
var v = s[_t]?.[r];
|
|
@@ -1889,19 +1890,19 @@ function Qn(t) {
|
|
|
1889
1890
|
s.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
|
|
1890
1891
|
// -> the target could not have been disabled because it emits the event in the first place
|
|
1891
1892
|
t.target === s) && v.call(s, t);
|
|
1892
|
-
} catch (
|
|
1893
|
-
|
|
1893
|
+
} catch (b) {
|
|
1894
|
+
h ? m.push(b) : h = b;
|
|
1894
1895
|
}
|
|
1895
|
-
if (t.cancelBubble ||
|
|
1896
|
+
if (t.cancelBubble || p === e || p === null)
|
|
1896
1897
|
break;
|
|
1897
|
-
s =
|
|
1898
|
+
s = p;
|
|
1898
1899
|
}
|
|
1899
|
-
if (
|
|
1900
|
-
for (let
|
|
1900
|
+
if (h) {
|
|
1901
|
+
for (let b of m)
|
|
1901
1902
|
queueMicrotask(() => {
|
|
1902
|
-
throw
|
|
1903
|
+
throw b;
|
|
1903
1904
|
});
|
|
1904
|
-
throw
|
|
1905
|
+
throw h;
|
|
1905
1906
|
}
|
|
1906
1907
|
} finally {
|
|
1907
1908
|
t[_t] = e, delete t.currentTarget, ne(c), he(f);
|
|
@@ -1943,14 +1944,14 @@ function Hr(t, e) {
|
|
|
1943
1944
|
r || Ir ? document.importNode(i, !0) : i.cloneNode(!0)
|
|
1944
1945
|
);
|
|
1945
1946
|
if (n) {
|
|
1946
|
-
var
|
|
1947
|
+
var u = (
|
|
1947
1948
|
/** @type {TemplateNode} */
|
|
1948
1949
|
/* @__PURE__ */ Nt(a)
|
|
1949
|
-
),
|
|
1950
|
+
), o = (
|
|
1950
1951
|
/** @type {TemplateNode} */
|
|
1951
1952
|
a.lastChild
|
|
1952
1953
|
);
|
|
1953
|
-
er(
|
|
1954
|
+
er(u, o);
|
|
1954
1955
|
} else
|
|
1955
1956
|
er(a, a);
|
|
1956
1957
|
return a;
|
|
@@ -1966,9 +1967,9 @@ function dn(t, e) {
|
|
|
1966
1967
|
return Gs(t, e);
|
|
1967
1968
|
}
|
|
1968
1969
|
const Mt = /* @__PURE__ */ new Map();
|
|
1969
|
-
function Gs(t, { target: e, anchor: n, props: r = {}, events: i, context: s, intro: a = !0, transformError:
|
|
1970
|
+
function Gs(t, { target: e, anchor: n, props: r = {}, events: i, context: s, intro: a = !0, transformError: u }) {
|
|
1970
1971
|
Ts();
|
|
1971
|
-
var
|
|
1972
|
+
var o = void 0, l = zs(() => {
|
|
1972
1973
|
var c = n ?? e.appendChild(Cr());
|
|
1973
1974
|
gs(
|
|
1974
1975
|
/** @type {TemplateNode} */
|
|
@@ -1979,45 +1980,45 @@ function Gs(t, { target: e, anchor: n, props: r = {}, events: i, context: s, int
|
|
|
1979
1980
|
},
|
|
1980
1981
|
(m) => {
|
|
1981
1982
|
on({});
|
|
1982
|
-
var
|
|
1983
|
+
var p = (
|
|
1983
1984
|
/** @type {ComponentContext} */
|
|
1984
1985
|
le
|
|
1985
1986
|
);
|
|
1986
|
-
s && (
|
|
1987
|
+
s && (p.c = s), i && (r.$$events = i), o = t(m, r) || {}, ln();
|
|
1987
1988
|
},
|
|
1988
|
-
|
|
1989
|
+
u
|
|
1989
1990
|
);
|
|
1990
|
-
var f = /* @__PURE__ */ new Set(),
|
|
1991
|
-
for (var
|
|
1992
|
-
var v = m[
|
|
1991
|
+
var f = /* @__PURE__ */ new Set(), h = (m) => {
|
|
1992
|
+
for (var p = 0; p < m.length; p++) {
|
|
1993
|
+
var v = m[p];
|
|
1993
1994
|
if (!f.has(v)) {
|
|
1994
1995
|
f.add(v);
|
|
1995
|
-
var
|
|
1996
|
+
var b = qs(v);
|
|
1996
1997
|
for (const re of [e, document]) {
|
|
1997
1998
|
var C = Mt.get(re);
|
|
1998
1999
|
C === void 0 && (C = /* @__PURE__ */ new Map(), Mt.set(re, C));
|
|
1999
2000
|
var $ = C.get(v);
|
|
2000
|
-
$ === void 0 ? (re.addEventListener(v, Qn, { passive:
|
|
2001
|
+
$ === void 0 ? (re.addEventListener(v, Qn, { passive: b }), C.set(v, 1)) : C.set(v, $ + 1);
|
|
2001
2002
|
}
|
|
2002
2003
|
}
|
|
2003
2004
|
}
|
|
2004
2005
|
};
|
|
2005
|
-
return
|
|
2006
|
+
return h(qi(Ys)), Gn.add(h), () => {
|
|
2006
2007
|
for (var m of f)
|
|
2007
|
-
for (const
|
|
2008
|
-
var
|
|
2008
|
+
for (const b of [e, document]) {
|
|
2009
|
+
var p = (
|
|
2009
2010
|
/** @type {Map<string, number>} */
|
|
2010
|
-
Mt.get(
|
|
2011
|
+
Mt.get(b)
|
|
2011
2012
|
), v = (
|
|
2012
2013
|
/** @type {number} */
|
|
2013
|
-
|
|
2014
|
+
p.get(m)
|
|
2014
2015
|
);
|
|
2015
|
-
--v == 0 ? (
|
|
2016
|
+
--v == 0 ? (b.removeEventListener(m, Qn), p.delete(m), p.size === 0 && Mt.delete(b)) : p.set(m, v);
|
|
2016
2017
|
}
|
|
2017
|
-
Gn.delete(
|
|
2018
|
+
Gn.delete(h), c !== n && c.parentNode?.removeChild(c);
|
|
2018
2019
|
};
|
|
2019
2020
|
});
|
|
2020
|
-
return Ks.set(
|
|
2021
|
+
return Ks.set(o, l), o;
|
|
2021
2022
|
}
|
|
2022
2023
|
let Ks = /* @__PURE__ */ new WeakMap();
|
|
2023
2024
|
function Yr(t) {
|
|
@@ -2058,8 +2059,8 @@ function ta(t, e) {
|
|
|
2058
2059
|
function Xr(t, e, n, r, i, s) {
|
|
2059
2060
|
var a = t.__className;
|
|
2060
2061
|
if (a !== n || a === void 0) {
|
|
2061
|
-
var
|
|
2062
|
-
|
|
2062
|
+
var u = ea(n, r);
|
|
2063
|
+
u == null ? t.removeAttribute("class") : t.className = u, t.__className = n;
|
|
2063
2064
|
}
|
|
2064
2065
|
return s;
|
|
2065
2066
|
}
|
|
@@ -2174,7 +2175,7 @@ class Gr {
|
|
|
2174
2175
|
var ra = /* @__PURE__ */ Hr("<div></div>");
|
|
2175
2176
|
function ia(t, e) {
|
|
2176
2177
|
on(e, !0);
|
|
2177
|
-
let n = Q(() => e.id), r = Q(() => e.element), i = Q(() => e.style), s = Q(() => e.dimensions), a = Q(() => e.initialize),
|
|
2178
|
+
let n = Q(() => e.id), r = Q(() => e.element), i = Q(() => e.style), s = Q(() => e.dimensions), a = Q(() => e.initialize), u = {
|
|
2178
2179
|
setDisplayed: $,
|
|
2179
2180
|
getDisplayed: re,
|
|
2180
2181
|
setSuppressed: be,
|
|
@@ -2182,69 +2183,69 @@ function ia(t, e) {
|
|
|
2182
2183
|
getCollapsed: J,
|
|
2183
2184
|
setScale: Ot
|
|
2184
2185
|
};
|
|
2185
|
-
function
|
|
2186
|
-
return
|
|
2186
|
+
function o() {
|
|
2187
|
+
return u;
|
|
2187
2188
|
}
|
|
2188
|
-
let
|
|
2189
|
-
function $(
|
|
2190
|
-
|
|
2189
|
+
let l, c = s.width, f = s.height, h = s.padding, m = i?.background ?? ji, p = i?.radius ?? Fi, v = i?.shadow ?? $i, b = /* @__PURE__ */ U(!1), C = !1;
|
|
2190
|
+
function $(_) {
|
|
2191
|
+
_ == !0 && (l && r && r.parentElement != l && l.appendChild(r), C == !1 && a && r && (C = !0, setTimeout(async () => await a(n, r), 0))), _ != E(b) && (W(b, _, !0), _ == !1 && Y.end());
|
|
2191
2192
|
}
|
|
2192
2193
|
function re() {
|
|
2193
|
-
return E(
|
|
2194
|
+
return E(b);
|
|
2194
2195
|
}
|
|
2195
|
-
let ye = /* @__PURE__ */
|
|
2196
|
-
function be(
|
|
2197
|
-
|
|
2196
|
+
let ye = /* @__PURE__ */ U(!0);
|
|
2197
|
+
function be(_) {
|
|
2198
|
+
_ != E(ye) && (W(ye, _, !0), _ && (ie = Ue, Y.set(Ue)));
|
|
2198
2199
|
}
|
|
2199
|
-
let pe = /* @__PURE__ */
|
|
2200
|
-
function Ie(
|
|
2201
|
-
|
|
2200
|
+
let pe = /* @__PURE__ */ U(!0);
|
|
2201
|
+
function Ie(_) {
|
|
2202
|
+
_ != E(pe) && (W(pe, _, !0), Y.target(E(pe) ? 0 : ie));
|
|
2202
2203
|
}
|
|
2203
2204
|
function J() {
|
|
2204
|
-
return E(
|
|
2205
|
+
return E(b) ? Y.expired() : !0;
|
|
2205
2206
|
}
|
|
2206
|
-
let ie =
|
|
2207
|
-
value:
|
|
2207
|
+
let ie = Ue, Y = new Gr({
|
|
2208
|
+
value: Ue,
|
|
2208
2209
|
min: 0,
|
|
2209
2210
|
max: 1,
|
|
2210
2211
|
timespan: Di,
|
|
2211
2212
|
easing: Jr,
|
|
2212
2213
|
callback: vt
|
|
2213
2214
|
});
|
|
2214
|
-
function Ot(
|
|
2215
|
-
ie =
|
|
2215
|
+
function Ot(_) {
|
|
2216
|
+
ie = _, Y.target(_);
|
|
2216
2217
|
}
|
|
2217
|
-
function vt(
|
|
2218
|
-
|
|
2218
|
+
function vt(_) {
|
|
2219
|
+
l.style.scale = _.toString(), l.style.filter = `brightness(${de(_)})`;
|
|
2219
2220
|
}
|
|
2220
|
-
function de(
|
|
2221
|
-
return 0.25 + 0.75 *
|
|
2221
|
+
function de(_) {
|
|
2222
|
+
return 0.25 + 0.75 * _;
|
|
2222
2223
|
}
|
|
2223
|
-
var Lt = { invoke:
|
|
2224
|
+
var Lt = { invoke: o }, $e = ra();
|
|
2224
2225
|
let Ve;
|
|
2225
|
-
return st($e, (
|
|
2226
|
-
(
|
|
2226
|
+
return st($e, (_) => l = _, () => l), zr(
|
|
2227
|
+
(_) => {
|
|
2227
2228
|
Xr(
|
|
2228
2229
|
$e,
|
|
2229
2230
|
1,
|
|
2230
2231
|
Zr([
|
|
2231
2232
|
"pin",
|
|
2232
|
-
E(
|
|
2233
|
+
E(b) && "displayed",
|
|
2233
2234
|
E(ye) && "suppressed"
|
|
2234
2235
|
]),
|
|
2235
2236
|
"svelte-10kxbrm"
|
|
2236
|
-
), Ve = it($e, "", Ve,
|
|
2237
|
+
), Ve = it($e, "", Ve, _);
|
|
2237
2238
|
},
|
|
2238
2239
|
[
|
|
2239
2240
|
() => ({
|
|
2240
2241
|
width: `${c}px`,
|
|
2241
2242
|
height: `${f}px`,
|
|
2242
|
-
padding: `${
|
|
2243
|
-
"border-radius": `${
|
|
2243
|
+
padding: `${h}px`,
|
|
2244
|
+
"border-radius": `${p}px`,
|
|
2244
2245
|
"background-color": `rgb(from ${m} r g b / 1)`,
|
|
2245
2246
|
"box-shadow": v,
|
|
2246
|
-
scale:
|
|
2247
|
-
filter: `brightness(${de(
|
|
2247
|
+
scale: Ue,
|
|
2248
|
+
filter: `brightness(${de(Ue)})`
|
|
2248
2249
|
})
|
|
2249
2250
|
]
|
|
2250
2251
|
), qr(t, $e), ln(Lt);
|
|
@@ -2320,33 +2321,33 @@ class rr {
|
|
|
2320
2321
|
}
|
|
2321
2322
|
function sn(t, e, n) {
|
|
2322
2323
|
if (t <= 0 || e <= 0) return { x: 0, y: 0 };
|
|
2323
|
-
let r = t / 2, i = e / 2, s = Math.sqrt(r * r + i * i), a = Math.atan(i / r) * (180 / Math.PI),
|
|
2324
|
-
return n < 180 ? n < 90 ? n < a ? { x: 0, y: s * Math.sin(
|
|
2324
|
+
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);
|
|
2325
|
+
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 };
|
|
2325
2326
|
}
|
|
2326
2327
|
var aa = /* @__PURE__ */ Hr('<div><div class="element pointer svelte-1no6o2a"></div> <div class="element bubble svelte-1no6o2a"></div></div> <div class="element body svelte-1no6o2a"></div>', 1);
|
|
2327
2328
|
function Kr(t, e) {
|
|
2328
2329
|
on(e, !0);
|
|
2329
|
-
let n = Q(() => e.id), r = Q(() => e.element), i = Q(() => e.style), s = Q(() => e.dimensions), a = Q(() => e.initialize),
|
|
2330
|
+
let n = Q(() => e.id), r = Q(() => e.element), i = Q(() => e.style), s = Q(() => e.dimensions), a = Q(() => e.initialize), u = {
|
|
2330
2331
|
setDisplayed: Lt,
|
|
2331
2332
|
getDisplayed: $e,
|
|
2332
|
-
setCollapsed:
|
|
2333
|
+
setCollapsed: _,
|
|
2333
2334
|
getCollapsed: pi,
|
|
2334
2335
|
getExpanded: di,
|
|
2335
2336
|
setAngle: vi
|
|
2336
2337
|
};
|
|
2337
|
-
function
|
|
2338
|
-
return
|
|
2338
|
+
function o() {
|
|
2339
|
+
return u;
|
|
2339
2340
|
}
|
|
2340
|
-
let
|
|
2341
|
+
let l = s.width + 2 * s.padding, c = s.height + 2 * s.padding, f = s.padding, h, m = i?.filter ?? Ui, p, v = s.padding * 2, b = Math.max(2, (i?.radius ?? Un) / v), C = i?.background ?? jn, $, re = s.width, ye = s.height, be = i?.radius ?? Un, pe = Math.min(1, 2 * be / Math.min(ye, re)), Ie = i?.background ?? jn, J, ie = s.width, Y = s.height, Ot = i?.radius, vt = !1, de = /* @__PURE__ */ U(!1);
|
|
2341
2342
|
function Lt(g) {
|
|
2342
|
-
g != E(de) && (
|
|
2343
|
+
g != E(de) && (W(de, g, !0), g == !0 && (r && r.parentElement != J && J.appendChild(r), vt == !1 && a && r && (vt = !0, setTimeout(async () => await a(n, r), 0))), g == !1 && (gt.end(), $t.end(), Vt.end()));
|
|
2343
2344
|
}
|
|
2344
2345
|
function $e() {
|
|
2345
2346
|
return E(de);
|
|
2346
2347
|
}
|
|
2347
|
-
let Ve = /* @__PURE__ */
|
|
2348
|
-
function
|
|
2349
|
-
g != E(Ve) && (
|
|
2348
|
+
let Ve = /* @__PURE__ */ U(!0);
|
|
2349
|
+
function _(g) {
|
|
2350
|
+
g != E(Ve) && (W(Ve, g, !0), gt.target(E(Ve) ? 0 : 1));
|
|
2350
2351
|
}
|
|
2351
2352
|
function pi() {
|
|
2352
2353
|
return E(de) ? gt.expired() : !0;
|
|
@@ -2363,11 +2364,11 @@ function Kr(t, e) {
|
|
|
2363
2364
|
callback: mi
|
|
2364
2365
|
});
|
|
2365
2366
|
function mi(g) {
|
|
2366
|
-
|
|
2367
|
+
h.style.opacity = `${g}`, p.style.scale = `${g}`, $.style.scale = `${g}`, J.style.scale = `${g}`;
|
|
2367
2368
|
}
|
|
2368
|
-
let wt = NaN, Ft = /* @__PURE__ */
|
|
2369
|
-
value: -
|
|
2370
|
-
min: -
|
|
2369
|
+
let wt = NaN, Ft = /* @__PURE__ */ U(!1), kn = -l / 2, $t = new rr({
|
|
2370
|
+
value: -l / 2,
|
|
2371
|
+
min: -l,
|
|
2371
2372
|
max: 0,
|
|
2372
2373
|
precision: 1,
|
|
2373
2374
|
stiffness: Ln,
|
|
@@ -2382,18 +2383,18 @@ function Kr(t, e) {
|
|
|
2382
2383
|
});
|
|
2383
2384
|
function vi(g, kt) {
|
|
2384
2385
|
if (Number.isNaN(g)) {
|
|
2385
|
-
wt = NaN,
|
|
2386
|
+
wt = NaN, W(Ft, !1);
|
|
2386
2387
|
return;
|
|
2387
2388
|
}
|
|
2388
2389
|
if (E(Ft) == !1 || kt == !0) {
|
|
2389
|
-
|
|
2390
|
-
const me = sn(
|
|
2390
|
+
W(Ft, !0), wt = g;
|
|
2391
|
+
const me = sn(l, c, g);
|
|
2391
2392
|
$t.set(Math.round(me.x)), Vt.set(Math.round(me.y));
|
|
2392
2393
|
return;
|
|
2393
2394
|
}
|
|
2394
2395
|
if (wt != g) {
|
|
2395
2396
|
wt = g;
|
|
2396
|
-
const me = sn(
|
|
2397
|
+
const me = sn(l, c, g);
|
|
2397
2398
|
$t.target(Math.round(me.x)), Vt.target(Math.round(me.y));
|
|
2398
2399
|
return;
|
|
2399
2400
|
}
|
|
@@ -2405,24 +2406,24 @@ function Kr(t, e) {
|
|
|
2405
2406
|
yn = g, bn();
|
|
2406
2407
|
}
|
|
2407
2408
|
function bn() {
|
|
2408
|
-
const g = kn, kt = yn, me = g +
|
|
2409
|
-
|
|
2409
|
+
const g = kn, kt = yn, me = g + l / 2, jt = kt + c / 2, Wt = c < l ? me * c / l : me, Bt = c > l ? jt * l / c : jt, yi = Math.atan2(Bt, Wt) / Math.PI * 180 - 45, Ht = Math.sqrt(Wt * Wt + Bt * Bt), nt = Math.min(l, c) / 2, bi = nt * Math.SQRT2, In = (Ht - nt) / (bi - nt), An = 15, Nn = An + In * (22.5 - An), _i = Ht < nt ? Ht / nt : 1, Mi = g + f, Ei = kt + f, Cn = f * 2 * pe * In, Rn = Mi - Cn * (me / l), Dn = Ei - Cn * (jt / c);
|
|
2410
|
+
p.style.transform = `scale(${_i}) rotate(${yi}deg) skew(${Nn}deg, ${Nn}deg)`, $.style.transform = `translate(${Math.round(Rn)}px, ${Math.round(Dn)}px)`, J.style.transform = `translate(${Math.round(Rn)}px, ${Math.round(Dn)}px)`;
|
|
2410
2411
|
}
|
|
2411
|
-
var ki = { invoke:
|
|
2412
|
+
var ki = { invoke: o }, _n = aa(), tt = As(_n);
|
|
2412
2413
|
let Mn;
|
|
2413
|
-
var
|
|
2414
|
+
var Ut = Is(tt);
|
|
2414
2415
|
let En;
|
|
2415
|
-
st(
|
|
2416
|
-
var xn = Zn(
|
|
2416
|
+
st(Ut, (g) => p = g, () => p);
|
|
2417
|
+
var xn = Zn(Ut, 2);
|
|
2417
2418
|
let Sn;
|
|
2418
|
-
st(xn, (g) => $ = g, () => $), st(tt, (g) =>
|
|
2419
|
+
st(xn, (g) => $ = g, () => $), st(tt, (g) => h = g, () => h);
|
|
2419
2420
|
var Pn = Zn(tt, 2);
|
|
2420
2421
|
let Tn;
|
|
2421
2422
|
return st(Pn, (g) => J = g, () => J), zr(() => {
|
|
2422
|
-
Xr(tt, 1, Zr(["element anchor", E(de) && "displayed"]), "svelte-1no6o2a"), Mn = it(tt, "", Mn, { filter: m }), En = it(
|
|
2423
|
+
Xr(tt, 1, Zr(["element anchor", E(de) && "displayed"]), "svelte-1no6o2a"), Mn = it(tt, "", Mn, { filter: m }), En = it(Ut, "", En, {
|
|
2423
2424
|
width: `${v}px`,
|
|
2424
2425
|
height: `${v}px`,
|
|
2425
|
-
"border-radius": `${
|
|
2426
|
+
"border-radius": `${b}px`,
|
|
2426
2427
|
"background-color": `rgb(from ${C} r g b / 1)`
|
|
2427
2428
|
}), Sn = it(xn, "", Sn, {
|
|
2428
2429
|
width: `${re}px`,
|
|
@@ -2476,8 +2477,8 @@ class ua {
|
|
|
2476
2477
|
tooltip;
|
|
2477
2478
|
popup;
|
|
2478
2479
|
constructor(e, n) {
|
|
2479
|
-
const r = n.properites.id, i = n.properites.lat, s = n.properites.lng, a = n.properites.rank,
|
|
2480
|
-
this.id = r, this.pin = new sa(e, r, i, s, a,
|
|
2480
|
+
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;
|
|
2481
|
+
this.id = r, this.pin = new sa(e, r, i, s, a, u), this.tooltip = new oa(e, r, i, s, a, o), this.popup = l ? new la(e, r, i, s, a, l) : void 0;
|
|
2481
2482
|
}
|
|
2482
2483
|
}
|
|
2483
2484
|
const Zt = 4;
|
|
@@ -2553,9 +2554,9 @@ class ha {
|
|
|
2553
2554
|
for (const a of this.tooltips)
|
|
2554
2555
|
if (s.contains(a.lat, a.lng))
|
|
2555
2556
|
if (Number.isNaN(a.zoom) == !1 && a.shown && a.zoom <= r) {
|
|
2556
|
-
const
|
|
2557
|
-
if (
|
|
2558
|
-
a.angle =
|
|
2557
|
+
const u = a.directions.findLast((o) => o.zoom <= r)?.angle;
|
|
2558
|
+
if (u == null) throw new Error("Failed to find angle");
|
|
2559
|
+
a.angle = u, a.component.invoke().setDisplayed(!0), a.component.invoke().setCollapsed(!1), a.component.invoke().setAngle(u), a.marker.insert();
|
|
2559
2560
|
} else
|
|
2560
2561
|
a.component.invoke().setCollapsed(!0), a.component.invoke().getCollapsed() && (a.component.invoke().setDisplayed(!1), a.marker.remove());
|
|
2561
2562
|
else
|
|
@@ -2581,11 +2582,11 @@ class pa {
|
|
|
2581
2582
|
}
|
|
2582
2583
|
show(e, n) {
|
|
2583
2584
|
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;
|
|
2584
|
-
const r = e.popup, i = n.getViewport(), s = i.bounds, a = i.zoom,
|
|
2585
|
+
const r = e.popup, i = n.getViewport(), s = i.bounds, a = i.zoom, o = n.getParameters().mapSize * Math.pow(2, a), l = at(s.ne.lat, s.sw.lng, o), c = at(s.sw.lat, s.ne.lng, o), f = c.x - l.x, h = c.y - l.y, m = r.width + r.padding * 8, p = r.height + r.padding * 8, v = at(r.lat, r.lng, o), b = sn(m, p, e.tooltip.angle), C = v.x + b.x, $ = C + m, re = v.y + b.y, ye = re + p, be = C - l.x, pe = c.x - $, Ie = re - l.y, J = c.y - ye;
|
|
2585
2586
|
let ie = 0;
|
|
2586
2587
|
f < m ? ie = (be - pe) / 2 : (be < 0 && (ie = be), pe < 0 && (ie = -pe));
|
|
2587
2588
|
let Y = 0;
|
|
2588
|
-
|
|
2589
|
+
h < p ? Y = (Ie - J) / 2 : (Ie < 0 && (Y = Ie), J < 0 && (Y = -J)), (ie != 0 || Y != 0) && n.panBy(ie, Y);
|
|
2589
2590
|
}
|
|
2590
2591
|
hide(e) {
|
|
2591
2592
|
!e.popup || !e.tooltip || !e.pin || (e.pin.shown = !0, e.tooltip.shown = !0, e.popup.shown = !1);
|
|
@@ -2652,7 +2653,7 @@ class da {
|
|
|
2652
2653
|
}
|
|
2653
2654
|
//#endregion
|
|
2654
2655
|
}
|
|
2655
|
-
const Qr = '(function(){"use strict";var h=[0,30,60,90,120,150,180,210,240,270,300,330],l=",";function i(e,t){return parseFloat(e[t]+e[t+1]+"."+e[t+2])}function f(e,t){return h[parseInt(e[t],16)]}function m(e){if(!e||e.length===0)return[];let t=[],
|
|
2656
|
+
const Qr = '(function(){"use strict";var h=[0,30,60,90,120,150,180,210,240,270,300,330],l=",";function i(e,t){return parseFloat(e[t]+e[t+1]+"."+e[t+2])}function f(e,t){return h[parseInt(e[t],16)]}function m(e){if(!e||e.length===0)return[];let t=[],n=e.split(l);for(let o=0;o<n.length;o++){let s=n[o],r=i(s,0),a=[];for(let c=3;c<s.length;c+=4){let v=i(s,c),T=f(s,c+3);a.push({zoom:v,angle:T})}t.push({zoom:r,directions:a})}return t}var d=e=>new Promise(t=>setTimeout(t,e));async function u(e,t){let n=0,o=Math.max(1,t?.retry?.times??1);for(;n<o;)try{return{data:await e(),error:null}}catch(s){if(n++,n==o){if(s instanceof Error)return(!t?.exceptions||t.exceptions.some(r=>s instanceof r)==!1)&&t?.catch?.(s),{data:null,error:s};throw t?.catch?.(s),s}else t?.retry?.delay&&await d(t.retry.delay)}throw Error("Unreachable code")}async function w(e,t,n,o,s){let r=await u(async()=>await fetch(e,{...n,method:"POST",body:t?JSON.stringify(t):void 0}),{retry:{times:o,delay:s}});if(r.error)throw r.error;let a=r.data;if(!a.ok)throw Error(await a.text());return await a.json()}const y="https://maps.api.arenarium.dev/states",p=3,E=500,S={async fetch(e){const n={headers:{"Cache-Control":self?.location.host.startsWith("localhost")||self?.location.host.startsWith("127.0.0.1")?"no-cache":""}},o=await w(y,e,n,p,E),s=m(o.states),r=o.jwt;return{states:s,jwt:r}}};class k{methods;constructor(t){this.methods=t}listen(){self.onmessage=this.onmessage.bind(this)}async onmessage(t){const{id:n,method:o,args:s}=t.data;try{const r=this.methods[o];if(typeof r!="function")throw new Error(`Unknown method: ${o}`);const a=await r(...s),c={id:n,result:a};self.postMessage(c)}catch(r){const a=r instanceof Error?r.message:String(r),c={id:n,error:a};self.postMessage(c)}}}new k(S).listen()})();\n', ir = typeof self < "u" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);", Qr], { type: "text/javascript;charset=utf-8" });
|
|
2656
2657
|
function ma(t) {
|
|
2657
2658
|
let e;
|
|
2658
2659
|
try {
|
|
@@ -2687,36 +2688,36 @@ async function ei(t, e) {
|
|
|
2687
2688
|
throw Error("Unreachable code");
|
|
2688
2689
|
}
|
|
2689
2690
|
async function ga(t, e, n, r, i) {
|
|
2690
|
-
let s = await ei(async () => await fetch(t, { ...n, method: "POST", body: e ? JSON.stringify(e) : void 0
|
|
2691
|
+
let s = await ei(async () => await fetch(t, { ...n, method: "POST", body: e ? JSON.stringify(e) : void 0 }), { retry: { times: r, delay: i } });
|
|
2691
2692
|
if (s.error) throw s.error;
|
|
2692
2693
|
let a = s.data;
|
|
2693
2694
|
if (!a.ok) throw Error(await a.text());
|
|
2694
2695
|
return await a.json();
|
|
2695
2696
|
}
|
|
2696
2697
|
async function wa(t, e, n, r, i) {
|
|
2697
|
-
let s = await ei(async () => await fetch(t, { ...n, method: "PUT", body: e ? JSON.stringify(e) : void 0
|
|
2698
|
+
let s = await ei(async () => await fetch(t, { ...n, method: "PUT", body: e ? JSON.stringify(e) : void 0 }), { retry: { times: r, delay: i } });
|
|
2698
2699
|
if (s.error) throw s.error;
|
|
2699
2700
|
let a = s.data;
|
|
2700
2701
|
if (!a.ok) throw Error(await a.text());
|
|
2701
2702
|
}
|
|
2702
|
-
const
|
|
2703
|
+
const Be = 0xc3a5c85c97cb3127n, ue = 0xb492b66fbe98f273n, He = 0x9ae16a3b2f90404fn, ti = 0xc949d7c7509e6557n, B = 0xffffffffffffffffn;
|
|
2703
2704
|
function d(t) {
|
|
2704
|
-
return t &
|
|
2705
|
+
return t & B;
|
|
2705
2706
|
}
|
|
2706
2707
|
function A(t, e) {
|
|
2707
|
-
return e === 0 ? t &
|
|
2708
|
+
return e === 0 ? t & B : (t = t & B, (t >> BigInt(e) | t << BigInt(64 - e)) & B);
|
|
2708
2709
|
}
|
|
2709
2710
|
function ka(t, e) {
|
|
2710
|
-
return t = t &
|
|
2711
|
+
return t = t & B, (t >> BigInt(e) | t << BigInt(64 - e)) & B;
|
|
2711
2712
|
}
|
|
2712
2713
|
function ft(t) {
|
|
2713
2714
|
return d(t ^ t >> 47n);
|
|
2714
2715
|
}
|
|
2715
|
-
function
|
|
2716
|
+
function M(t, e = 0) {
|
|
2716
2717
|
let n = 0n;
|
|
2717
2718
|
for (let r = 0; r < 8; r++)
|
|
2718
2719
|
e + r < t.length && (n |= BigInt(t[e + r]) << BigInt(r * 8));
|
|
2719
|
-
return n &
|
|
2720
|
+
return n & B;
|
|
2720
2721
|
}
|
|
2721
2722
|
function sr(t, e = 0) {
|
|
2722
2723
|
let n = 0n;
|
|
@@ -2726,10 +2727,10 @@ function sr(t, e = 0) {
|
|
|
2726
2727
|
}
|
|
2727
2728
|
function ya(t) {
|
|
2728
2729
|
const e = 0x9ddfea08eb382d69n;
|
|
2729
|
-
let n = (t.first ^ t.second) * e &
|
|
2730
|
-
n ^= n >> 47n, n = n &
|
|
2731
|
-
let r = (t.second ^ n) * e &
|
|
2732
|
-
return r ^= r >> 47n, r = r * e &
|
|
2730
|
+
let n = (t.first ^ t.second) * e & B;
|
|
2731
|
+
n ^= n >> 47n, n = n & B;
|
|
2732
|
+
let r = (t.second ^ n) * e & B;
|
|
2733
|
+
return r ^= r >> 47n, r = r * e & B, r;
|
|
2733
2734
|
}
|
|
2734
2735
|
function qe(t, e) {
|
|
2735
2736
|
return ya({ first: t, second: e });
|
|
@@ -2737,12 +2738,12 @@ function qe(t, e) {
|
|
|
2737
2738
|
function ba(t) {
|
|
2738
2739
|
const e = t.length;
|
|
2739
2740
|
if (e > 8) {
|
|
2740
|
-
const n =
|
|
2741
|
-
return (qe(n, ka(r + BigInt(e) &
|
|
2741
|
+
const n = M(t), r = M(t, e - 8);
|
|
2742
|
+
return (qe(n, ka(r + BigInt(e) & B, e)) ^ r) & B;
|
|
2742
2743
|
}
|
|
2743
2744
|
if (e >= 4) {
|
|
2744
2745
|
const n = sr(t);
|
|
2745
|
-
return qe(BigInt(e) + (n << 3n) &
|
|
2746
|
+
return qe(BigInt(e) + (n << 3n) & B, sr(t, e - 4));
|
|
2746
2747
|
}
|
|
2747
2748
|
if (e > 0) {
|
|
2748
2749
|
const n = BigInt(t[0]), r = BigInt(t[e >> 1]), i = BigInt(t[e - 1]), s = d(n + (r << 8n)), a = d(BigInt(e) + (i << 2n));
|
|
@@ -2751,7 +2752,7 @@ function ba(t) {
|
|
|
2751
2752
|
return He;
|
|
2752
2753
|
}
|
|
2753
2754
|
function _a(t) {
|
|
2754
|
-
const e = t.length, n = d(
|
|
2755
|
+
const e = t.length, n = d(M(t) * ue), r = M(t, 8), i = d(M(t, e - 8) * He), s = d(M(t, e - 16) * Be);
|
|
2755
2756
|
return qe(d(A(d(n - r), 43) + A(i, 30) + s), d(n + A(r ^ ti, 20) - i + BigInt(e)));
|
|
2756
2757
|
}
|
|
2757
2758
|
function Ma(t, e, n, r, i, s) {
|
|
@@ -2760,18 +2761,18 @@ function Ma(t, e, n, r, i, s) {
|
|
|
2760
2761
|
return i = d(i + e), i = d(i + n), s = d(s + A(i, 44)), { first: d(i + r), second: d(s + a) };
|
|
2761
2762
|
}
|
|
2762
2763
|
function Et(t, e, n, r) {
|
|
2763
|
-
return Ma(
|
|
2764
|
+
return Ma(M(t, e), M(t, e + 8), M(t, e + 16), M(t, e + 24), n, r);
|
|
2764
2765
|
}
|
|
2765
2766
|
function Ea(t) {
|
|
2766
|
-
const e = t.length, n =
|
|
2767
|
-
let r = d(
|
|
2768
|
-
r = d(r +
|
|
2769
|
-
const a = d(r + n),
|
|
2770
|
-
r = d(
|
|
2771
|
-
const
|
|
2772
|
-
i = A(d(r +
|
|
2773
|
-
const
|
|
2774
|
-
return d(ft(d(f *
|
|
2767
|
+
const e = t.length, n = M(t, 24);
|
|
2768
|
+
let r = d(M(t) + d((BigInt(e) + M(t, e - 16)) * Be)), i = A(d(r + n), 52), s = A(r, 37);
|
|
2769
|
+
r = d(r + M(t, 8)), s = d(s + A(r, 7)), r = d(r + M(t, 16));
|
|
2770
|
+
const a = d(r + n), u = d(i + A(r, 31) + s);
|
|
2771
|
+
r = d(M(t, 16) + M(t, e - 32));
|
|
2772
|
+
const o = M(t, e - 8);
|
|
2773
|
+
i = A(d(r + o), 52), s = A(r, 37), r = d(r + M(t, e - 24)), s = d(s + A(r, 7)), r = d(r + M(t, e - 16));
|
|
2774
|
+
const l = d(r + o), c = d(i + A(r, 31) + s), f = ft(d(d(a + c) * He + d(l + u) * Be));
|
|
2775
|
+
return d(ft(d(f * Be + u)) * He);
|
|
2775
2776
|
}
|
|
2776
2777
|
function xa(t) {
|
|
2777
2778
|
let e;
|
|
@@ -2781,12 +2782,12 @@ function xa(t) {
|
|
|
2781
2782
|
return n <= 16 ? ba(e) : _a(e);
|
|
2782
2783
|
if (n <= 64)
|
|
2783
2784
|
return Ea(e);
|
|
2784
|
-
let r =
|
|
2785
|
+
let r = M(e), i = d(M(e, n - 16) ^ ue), s = d(M(e, n - 56) ^ Be), a = Et(e, n - 64, BigInt(n), i), u = Et(e, n - 32, d(BigInt(n) * ue), Be);
|
|
2785
2786
|
s = d(s + ft(a.second) * ue), r = d(A(d(s + r), 39) * ue), i = d(A(i, 33) * ue);
|
|
2786
|
-
let
|
|
2787
|
-
for (;
|
|
2788
|
-
r = d(A(d(r + i + a.first +
|
|
2789
|
-
return qe(qe(a.first,
|
|
2787
|
+
let o = n - 1 & -64, l = 0;
|
|
2788
|
+
for (; o > 0; )
|
|
2789
|
+
r = d(A(d(r + i + a.first + M(e, l + 16)), 37) * ue), i = d(A(d(i + a.second + M(e, l + 48)), 42) * ue), r ^= u.second, i ^= a.first, s = A(s ^ u.first, 33), a = Et(e, l, d(a.second * ue), d(r + u.first)), u = Et(e, l + 32, d(s + u.second), i), [s, r] = [r, s], l += 64, o -= 64;
|
|
2790
|
+
return qe(qe(a.first, u.first) + d(ft(i) * ue) + s, qe(a.second, u.second) + r);
|
|
2790
2791
|
}
|
|
2791
2792
|
function Sa(t) {
|
|
2792
2793
|
return xa(JSON.stringify(t)).toString();
|
|
@@ -2822,21 +2823,21 @@ function Qe(t) {
|
|
|
2822
2823
|
return e === "string" ? `"${t}"` : e === "number" || e === "bigint" || e === "boolean" ? `${t}` : e === "object" || e === "function" ? (t && Object.getPrototypeOf(t)?.constructor?.name) ?? "null" : e;
|
|
2823
2824
|
}
|
|
2824
2825
|
function N(t, e, n, r, i) {
|
|
2825
|
-
const s = i && "input" in i ? i.input : n.value, a = i?.expected ?? t.expects ?? null,
|
|
2826
|
+
const s = i && "input" in i ? i.input : n.value, a = i?.expected ?? t.expects ?? null, u = i?.received ?? /* @__PURE__ */ Qe(s), o = {
|
|
2826
2827
|
kind: t.kind,
|
|
2827
2828
|
type: t.type,
|
|
2828
2829
|
input: s,
|
|
2829
2830
|
expected: a,
|
|
2830
|
-
received:
|
|
2831
|
-
message: `Invalid ${e}: ${a ? `Expected ${a} but r` : "R"}eceived ${
|
|
2831
|
+
received: u,
|
|
2832
|
+
message: `Invalid ${e}: ${a ? `Expected ${a} but r` : "R"}eceived ${u}`,
|
|
2832
2833
|
requirement: t.requirement,
|
|
2833
2834
|
path: i?.path,
|
|
2834
2835
|
issues: i?.issues,
|
|
2835
2836
|
lang: r.lang,
|
|
2836
2837
|
abortEarly: r.abortEarly,
|
|
2837
2838
|
abortPipeEarly: r.abortPipeEarly
|
|
2838
|
-
},
|
|
2839
|
-
c !== void 0 && (
|
|
2839
|
+
}, l = t.kind === "schema", c = i?.message ?? t.message ?? /* @__PURE__ */ Ca(t.reference, o.lang) ?? (l ? /* @__PURE__ */ Aa(o.lang) : null) ?? r.message ?? /* @__PURE__ */ Ta(o.lang);
|
|
2840
|
+
c !== void 0 && (o.message = typeof c == "function" ? c(o) : c), l && (n.typed = !1), n.issues ? n.issues.push(o) : n.issues = [o];
|
|
2840
2841
|
}
|
|
2841
2842
|
// @__NO_SIDE_EFFECTS__
|
|
2842
2843
|
function X(t) {
|
|
@@ -3000,23 +3001,23 @@ function ai(t, e) {
|
|
|
3000
3001
|
if (Array.isArray(i)) {
|
|
3001
3002
|
n.typed = !0, n.value = [];
|
|
3002
3003
|
for (let s = 0; s < i.length; s++) {
|
|
3003
|
-
const a = i[s],
|
|
3004
|
-
if (
|
|
3005
|
-
const
|
|
3004
|
+
const a = i[s], u = this.item["~run"]({ value: a }, r);
|
|
3005
|
+
if (u.issues) {
|
|
3006
|
+
const o = {
|
|
3006
3007
|
type: "array",
|
|
3007
3008
|
origin: "value",
|
|
3008
3009
|
input: i,
|
|
3009
3010
|
key: s,
|
|
3010
3011
|
value: a
|
|
3011
3012
|
};
|
|
3012
|
-
for (const
|
|
3013
|
-
|
|
3014
|
-
if (n.issues || (n.issues =
|
|
3013
|
+
for (const l of u.issues)
|
|
3014
|
+
l.path ? l.path.unshift(o) : l.path = [o], n.issues?.push(l);
|
|
3015
|
+
if (n.issues || (n.issues = u.issues), r.abortEarly) {
|
|
3015
3016
|
n.typed = !1;
|
|
3016
3017
|
break;
|
|
3017
3018
|
}
|
|
3018
3019
|
}
|
|
3019
|
-
|
|
3020
|
+
u.typed || (n.typed = !1), n.value.push(u.value);
|
|
3020
3021
|
}
|
|
3021
3022
|
} else N(this, "type", n, r);
|
|
3022
3023
|
return n;
|
|
@@ -3130,23 +3131,23 @@ function H(t, e) {
|
|
|
3130
3131
|
for (const s in this.entries) {
|
|
3131
3132
|
const a = this.entries[s];
|
|
3132
3133
|
if (s in i || (a.type === "exact_optional" || a.type === "optional" || a.type === "nullish") && a.default !== void 0) {
|
|
3133
|
-
const
|
|
3134
|
-
if (
|
|
3135
|
-
const
|
|
3134
|
+
const u = s in i ? i[s] : /* @__PURE__ */ si(a), o = a["~run"]({ value: u }, r);
|
|
3135
|
+
if (o.issues) {
|
|
3136
|
+
const l = {
|
|
3136
3137
|
type: "object",
|
|
3137
3138
|
origin: "value",
|
|
3138
3139
|
input: i,
|
|
3139
3140
|
key: s,
|
|
3140
|
-
value:
|
|
3141
|
+
value: u
|
|
3141
3142
|
};
|
|
3142
|
-
for (const c of
|
|
3143
|
-
c.path ? c.path.unshift(
|
|
3144
|
-
if (n.issues || (n.issues =
|
|
3143
|
+
for (const c of o.issues)
|
|
3144
|
+
c.path ? c.path.unshift(l) : c.path = [l], n.issues?.push(c);
|
|
3145
|
+
if (n.issues || (n.issues = o.issues), r.abortEarly) {
|
|
3145
3146
|
n.typed = !1;
|
|
3146
3147
|
break;
|
|
3147
3148
|
}
|
|
3148
3149
|
}
|
|
3149
|
-
|
|
3150
|
+
o.typed || (n.typed = !1), n.value[s] = o.value;
|
|
3150
3151
|
} else if (a.fallback !== void 0) n.value[s] = /* @__PURE__ */ Da(a);
|
|
3151
3152
|
else if (a.type !== "exact_optional" && a.type !== "optional" && a.type !== "nullish" && (N(this, "key", n, r, {
|
|
3152
3153
|
input: void 0,
|
|
@@ -3219,23 +3220,23 @@ function L(t, e) {
|
|
|
3219
3220
|
if (Array.isArray(i)) {
|
|
3220
3221
|
n.typed = !0, n.value = [];
|
|
3221
3222
|
for (let s = 0; s < this.items.length; s++) {
|
|
3222
|
-
const a = i[s],
|
|
3223
|
-
if (
|
|
3224
|
-
const
|
|
3223
|
+
const a = i[s], u = this.items[s]["~run"]({ value: a }, r);
|
|
3224
|
+
if (u.issues) {
|
|
3225
|
+
const o = {
|
|
3225
3226
|
type: "array",
|
|
3226
3227
|
origin: "value",
|
|
3227
3228
|
input: i,
|
|
3228
3229
|
key: s,
|
|
3229
3230
|
value: a
|
|
3230
3231
|
};
|
|
3231
|
-
for (const
|
|
3232
|
-
|
|
3233
|
-
if (n.issues || (n.issues =
|
|
3232
|
+
for (const l of u.issues)
|
|
3233
|
+
l.path ? l.path.unshift(o) : l.path = [o], n.issues?.push(l);
|
|
3234
|
+
if (n.issues || (n.issues = u.issues), r.abortEarly) {
|
|
3234
3235
|
n.typed = !1;
|
|
3235
3236
|
break;
|
|
3236
3237
|
}
|
|
3237
3238
|
}
|
|
3238
|
-
|
|
3239
|
+
u.typed || (n.typed = !1), n.value.push(u.value);
|
|
3239
3240
|
}
|
|
3240
3241
|
} else N(this, "type", n, r);
|
|
3241
3242
|
return n;
|
|
@@ -3263,14 +3264,14 @@ function wn(t, e) {
|
|
|
3263
3264
|
},
|
|
3264
3265
|
"~run"(n, r) {
|
|
3265
3266
|
let i, s, a;
|
|
3266
|
-
for (const
|
|
3267
|
-
const
|
|
3268
|
-
if (
|
|
3267
|
+
for (const u of this.options) {
|
|
3268
|
+
const o = u["~run"]({ value: n.value }, r);
|
|
3269
|
+
if (o.typed) if (o.issues) s ? s.push(o) : s = [o];
|
|
3269
3270
|
else {
|
|
3270
|
-
i =
|
|
3271
|
+
i = o;
|
|
3271
3272
|
break;
|
|
3272
3273
|
}
|
|
3273
|
-
else a ? a.push(
|
|
3274
|
+
else a ? a.push(o) : a = [o];
|
|
3274
3275
|
}
|
|
3275
3276
|
if (i) return i;
|
|
3276
3277
|
if (s) {
|
|
@@ -3326,9 +3327,9 @@ function w(...t) {
|
|
|
3326
3327
|
}
|
|
3327
3328
|
};
|
|
3328
3329
|
}
|
|
3329
|
-
var ui = /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ q(-90), /* @__PURE__ */ ht(90)), ci = /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ q(-180), /* @__PURE__ */ ht(180)), Ct = /* @__PURE__ */ H({ lat: ui, lng: ci }), fi = /* @__PURE__ */ H({ sw: Ct, ne: Ct }), za = /* @__PURE__ */ H({ bounds: fi, center: Ct, zoom: /* @__PURE__ */ P() }), Ye = /* @__PURE__ */ li((t) => t instanceof HTMLElement, "Must be an HTMLElement"), Oa = /* @__PURE__ */ H({ mapSize: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ q(1)), zoomMin: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ q(0)), zoomMax: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ q(0)), zoomScale: /* @__PURE__ */ wn([/* @__PURE__ */ ze(1), /* @__PURE__ */ ze(2), /* @__PURE__ */ ze(10)]) }), La = /* @__PURE__ */ H({ inserted: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([])), /* @__PURE__ */ V(/* @__PURE__ */ oi())), insert: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([])), /* @__PURE__ */ V(/* @__PURE__ */ Oe())), remove: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([])), /* @__PURE__ */ V(/* @__PURE__ */ Oe())), update: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([/* @__PURE__ */ P()])), /* @__PURE__ */ V(/* @__PURE__ */ Oe())) }), or = /* @__PURE__ */ wn([/* @__PURE__ */ ze("idle"), /* @__PURE__ */ ze("move"), /* @__PURE__ */ ze("click")]), Fa = /* @__PURE__ */ H({ getParameters: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([])), /* @__PURE__ */ V(Oa)), getContainer: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([])), /* @__PURE__ */ V(Ye)), getZoom: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([])), /* @__PURE__ */ V(/* @__PURE__ */ P())), getBounds: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([])), /* @__PURE__ */ V(fi)), getCenter: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([])), /* @__PURE__ */ V(Ct)), getViewport: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([])), /* @__PURE__ */ V(za)), panBy: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([/* @__PURE__ */ P(), /* @__PURE__ */ P()])), /* @__PURE__ */ V(/* @__PURE__ */ Oe())), createMarker: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([Ye, ui, ci, /* @__PURE__ */ P()])), /* @__PURE__ */ V(La)), subscribe: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([or, /* @__PURE__ */ I()])), /* @__PURE__ */ V(/* @__PURE__ */ Oe())), unsubscribe: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([or, /* @__PURE__ */ I()])), /* @__PURE__ */ V(/* @__PURE__ */ Oe())) }), Jt = /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([/* @__PURE__ */ ge(), Ye]))), Gt = /* @__PURE__ */ w(/* @__PURE__ */ H({ width: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ q(0)), height: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ q(0)), padding: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ q(0)) }), /* @__PURE__ */ ri((t) => Math.min(t.width, t.height) / t.padding >= 4, "Minimum of width or height must be greater than or equal to 4 * padding")), $a = /* @__PURE__ */ H({ background: /* @__PURE__ */ T(/* @__PURE__ */ ge()), radius: /* @__PURE__ */ T(/* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ q(0))), shadow: /* @__PURE__ */ T(/* @__PURE__ */ ge()) }), lr = /* @__PURE__ */ H({ background: /* @__PURE__ */ T(/* @__PURE__ */ ge()), radius: /* @__PURE__ */ T(/* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ q(0))), filter: /* @__PURE__ */ T(/* @__PURE__ */ ge()) }), Va = /* @__PURE__ */ H({ id: /* @__PURE__ */ w(/* @__PURE__ */ ge(), /* @__PURE__ */ gn(1)), rank: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ q(0)), lat: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ q(-90), /* @__PURE__ */ ht(90)), lng: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ q(-180), /* @__PURE__ */ ht(180)), tooltip: /* @__PURE__ */ H({ element: Ye, style: /* @__PURE__ */ T(lr), dimensions: /* @__PURE__ */ T(Gt), initialize: /* @__PURE__ */ T(Jt) }), pin: /* @__PURE__ */ T(/* @__PURE__ */ H({ element: /* @__PURE__ */ T(Ye), style: /* @__PURE__ */ T($a), dimensions: /* @__PURE__ */ T(Gt), initialize: /* @__PURE__ */ T(Jt) })), popup: /* @__PURE__ */ T(/* @__PURE__ */ H({ element: Ye, style: /* @__PURE__ */ T(lr), dimensions: /* @__PURE__ */ T(Gt), initialize: /* @__PURE__ */ T(Jt) })) }),
|
|
3330
|
-
const
|
|
3331
|
-
class
|
|
3330
|
+
var ui = /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ q(-90), /* @__PURE__ */ ht(90)), ci = /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ q(-180), /* @__PURE__ */ ht(180)), Ct = /* @__PURE__ */ H({ lat: ui, lng: ci }), fi = /* @__PURE__ */ H({ sw: Ct, ne: Ct }), za = /* @__PURE__ */ H({ bounds: fi, center: Ct, zoom: /* @__PURE__ */ P() }), Ye = /* @__PURE__ */ li((t) => t instanceof HTMLElement, "Must be an HTMLElement"), Oa = /* @__PURE__ */ H({ mapSize: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ q(1)), zoomMin: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ q(0)), zoomMax: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ q(0)), zoomScale: /* @__PURE__ */ wn([/* @__PURE__ */ ze(1), /* @__PURE__ */ ze(2), /* @__PURE__ */ ze(10)]) }), La = /* @__PURE__ */ H({ inserted: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([])), /* @__PURE__ */ V(/* @__PURE__ */ oi())), insert: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([])), /* @__PURE__ */ V(/* @__PURE__ */ Oe())), remove: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([])), /* @__PURE__ */ V(/* @__PURE__ */ Oe())), update: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([/* @__PURE__ */ P()])), /* @__PURE__ */ V(/* @__PURE__ */ Oe())) }), or = /* @__PURE__ */ wn([/* @__PURE__ */ ze("idle"), /* @__PURE__ */ ze("move"), /* @__PURE__ */ ze("click")]), Fa = /* @__PURE__ */ H({ getParameters: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([])), /* @__PURE__ */ V(Oa)), getContainer: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([])), /* @__PURE__ */ V(Ye)), getZoom: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([])), /* @__PURE__ */ V(/* @__PURE__ */ P())), getBounds: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([])), /* @__PURE__ */ V(fi)), getCenter: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([])), /* @__PURE__ */ V(Ct)), getViewport: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([])), /* @__PURE__ */ V(za)), panBy: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([/* @__PURE__ */ P(), /* @__PURE__ */ P()])), /* @__PURE__ */ V(/* @__PURE__ */ Oe())), createMarker: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([Ye, ui, ci, /* @__PURE__ */ P()])), /* @__PURE__ */ V(La)), subscribe: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([or, /* @__PURE__ */ I()])), /* @__PURE__ */ V(/* @__PURE__ */ Oe())), unsubscribe: /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([or, /* @__PURE__ */ I()])), /* @__PURE__ */ V(/* @__PURE__ */ Oe())) }), Jt = /* @__PURE__ */ w(/* @__PURE__ */ I(), /* @__PURE__ */ O(/* @__PURE__ */ L([/* @__PURE__ */ ge(), Ye]))), Gt = /* @__PURE__ */ w(/* @__PURE__ */ H({ width: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ q(0)), height: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ q(0)), padding: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ q(0)) }), /* @__PURE__ */ ri((t) => Math.min(t.width, t.height) / t.padding >= 4, "Minimum of width or height must be greater than or equal to 4 * padding")), $a = /* @__PURE__ */ H({ background: /* @__PURE__ */ T(/* @__PURE__ */ ge()), radius: /* @__PURE__ */ T(/* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ q(0))), shadow: /* @__PURE__ */ T(/* @__PURE__ */ ge()) }), lr = /* @__PURE__ */ H({ background: /* @__PURE__ */ T(/* @__PURE__ */ ge()), radius: /* @__PURE__ */ T(/* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ q(0))), filter: /* @__PURE__ */ T(/* @__PURE__ */ ge()) }), Va = /* @__PURE__ */ H({ id: /* @__PURE__ */ w(/* @__PURE__ */ ge(), /* @__PURE__ */ gn(1)), rank: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ q(0)), lat: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ q(-90), /* @__PURE__ */ ht(90)), lng: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ q(-180), /* @__PURE__ */ ht(180)), tooltip: /* @__PURE__ */ H({ element: Ye, style: /* @__PURE__ */ T(lr), dimensions: /* @__PURE__ */ T(Gt), initialize: /* @__PURE__ */ T(Jt) }), pin: /* @__PURE__ */ T(/* @__PURE__ */ H({ element: /* @__PURE__ */ T(Ye), style: /* @__PURE__ */ T($a), dimensions: /* @__PURE__ */ T(Gt), initialize: /* @__PURE__ */ T(Jt) })), popup: /* @__PURE__ */ T(/* @__PURE__ */ H({ element: Ye, style: /* @__PURE__ */ T(lr), dimensions: /* @__PURE__ */ T(Gt), initialize: /* @__PURE__ */ T(Jt) })) }), Ua = /* @__PURE__ */ w(/* @__PURE__ */ ge(), /* @__PURE__ */ ii(32)), ja = /* @__PURE__ */ w(/* @__PURE__ */ ge(), /* @__PURE__ */ gn(1));
|
|
3331
|
+
const Wa = "1.3.4";
|
|
3332
|
+
class Ba {
|
|
3332
3333
|
apiKey;
|
|
3333
3334
|
apiJwt;
|
|
3334
3335
|
markerStatesStore;
|
|
@@ -3348,13 +3349,13 @@ class Wa {
|
|
|
3348
3349
|
}
|
|
3349
3350
|
async updateStates(e, n) {
|
|
3350
3351
|
if (e.length == 0) return;
|
|
3351
|
-
e.sort((a,
|
|
3352
|
+
e.sort((a, u) => a.properites.id.localeCompare(u.properites.id));
|
|
3352
3353
|
const r = e.map((a) => a.input), i = Sa(r);
|
|
3353
3354
|
let s = this.markerStatesStore.get(i);
|
|
3354
3355
|
s == null && (s = await this.fetchStates(r, n), this.markerStatesStore.set(i, s));
|
|
3355
3356
|
for (let a = 0; a < e.length; a++) {
|
|
3356
|
-
const
|
|
3357
|
-
|
|
3357
|
+
const u = e[a];
|
|
3358
|
+
u.state = s[a];
|
|
3358
3359
|
}
|
|
3359
3360
|
}
|
|
3360
3361
|
async fetchStates(e, n) {
|
|
@@ -3363,14 +3364,14 @@ class Wa {
|
|
|
3363
3364
|
const r = {
|
|
3364
3365
|
key: this.apiKey,
|
|
3365
3366
|
jwt: this.apiJwt,
|
|
3366
|
-
version:
|
|
3367
|
+
version: Wa,
|
|
3367
3368
|
input: e,
|
|
3368
3369
|
parameters: n
|
|
3369
3370
|
}, i = await this.markerStatesWorkerClient.invoke("fetch", r);
|
|
3370
3371
|
return i.jwt && (this.apiJwt = i.jwt), i.states;
|
|
3371
3372
|
}
|
|
3372
3373
|
}
|
|
3373
|
-
const ur = "1.3.
|
|
3374
|
+
const ur = "1.3.4", Ha = "https://maps.api.arenarium.dev/auth", qa = "https://maps.api.arenarium.dev/log", cr = 500;
|
|
3374
3375
|
class hi {
|
|
3375
3376
|
apiKey;
|
|
3376
3377
|
mapProvider;
|
|
@@ -3385,14 +3386,14 @@ class hi {
|
|
|
3385
3386
|
markerStatesProcessDelay = cr;
|
|
3386
3387
|
markerStatesProcessTimeout = void 0;
|
|
3387
3388
|
constructor(e, n, r, i) {
|
|
3388
|
-
xt(
|
|
3389
|
+
xt(Ua, e), xt(ja, n), xt(Fa, r), this.apiKey = e, this.mapProvider = r, this.mapStateProvider = new Ti(
|
|
3389
3390
|
this.mapProvider,
|
|
3390
3391
|
this.detached.bind(this),
|
|
3391
3392
|
this.error.bind(this),
|
|
3392
3393
|
this.onMapMove.bind(this),
|
|
3393
3394
|
this.onMapIdle.bind(this),
|
|
3394
3395
|
this.onMapClick.bind(this)
|
|
3395
|
-
), this.markers = /* @__PURE__ */ new Map(), this.markerVisibilityManager = new
|
|
3396
|
+
), this.markers = /* @__PURE__ */ new Map(), this.markerVisibilityManager = new Wi(), this.markerElementsManager = new da(this.mapProvider), this.markerStatesManager = new Ba(e, n), this.markerVisibilityProcessor = new qt(this.onMarkersVisiblityProcess.bind(this)), this.markerElementsProcessor = new qt(this.onMarkersRenderProcess.bind(this)), this.markerStateProcessor = new qt(this.onMarkersStateProcess.bind(this)), this.configuration = i;
|
|
3396
3397
|
}
|
|
3397
3398
|
//#region Core
|
|
3398
3399
|
static async create(e, n, r) {
|
|
@@ -3463,7 +3464,7 @@ class hi {
|
|
|
3463
3464
|
try {
|
|
3464
3465
|
if (this.detached()) return !0;
|
|
3465
3466
|
const e = this.mapProvider.getParameters(), n = this.mapProvider.getViewport(), r = await this.markerVisibilityManager.getMarkersDelta(e, n);
|
|
3466
|
-
return this.markerStatesManager.resetStates(r.remove), this.markerElementsManager.removeElements(r.remove), this.markerElementsManager.insertElements(r.insert, this.onMapMarkerClick.bind(this)), this.markerElementsProcessor.run(), this.mapStateProvider.idle() && this.
|
|
3467
|
+
return this.markerStatesManager.resetStates(r.remove), this.markerElementsManager.removeElements(r.remove), this.markerElementsManager.insertElements(r.insert, this.onMapMarkerClick.bind(this)), this.markerElementsProcessor.run(), this.mapStateProvider.idle() && this.markerStateProcessor.run(), !1;
|
|
3467
3468
|
} catch (e) {
|
|
3468
3469
|
return this.clear(), this.error("Process markers visibility error", e), !0;
|
|
3469
3470
|
}
|
|
@@ -3490,65 +3491,62 @@ class hi {
|
|
|
3490
3491
|
//#region Markers
|
|
3491
3492
|
getMarkers(e) {
|
|
3492
3493
|
const n = new Array(), r = new Array();
|
|
3493
|
-
for (const
|
|
3494
|
-
const
|
|
3495
|
-
|
|
3494
|
+
for (const o of e) {
|
|
3495
|
+
const l = this.markers.get(o.id);
|
|
3496
|
+
l ? n.push(l) : r.push(o);
|
|
3496
3497
|
}
|
|
3497
|
-
const i =
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
}
|
|
3505
|
-
const s = (o, l) => {
|
|
3506
|
-
if (l) return l;
|
|
3507
|
-
if (o) {
|
|
3508
|
-
const u = o.getBoundingClientRect();
|
|
3509
|
-
return { width: u.width, height: u.height, padding: Vn };
|
|
3510
|
-
} else
|
|
3511
|
-
return { width: $n, height: $n, padding: Vn };
|
|
3512
|
-
}, a = (o, l) => {
|
|
3513
|
-
if (l) return l;
|
|
3514
|
-
const u = o.getBoundingClientRect();
|
|
3515
|
-
return { width: u.width, height: u.height, padding: Math.min(Math.round(Math.min(u.width, u.height) / 4), Vi) };
|
|
3516
|
-
};
|
|
3517
|
-
for (const o of r) {
|
|
3518
|
-
const l = o.id, u = o.lat, c = o.lng, f = o.rank;
|
|
3519
|
-
let p = {
|
|
3520
|
-
id: l,
|
|
3521
|
-
initialize: o.pin?.initialize,
|
|
3522
|
-
element: o.pin?.element,
|
|
3523
|
-
style: o.pin?.style,
|
|
3524
|
-
dimensions: s(o.pin?.element, o.pin?.dimensions)
|
|
3525
|
-
}, m = {
|
|
3526
|
-
id: l,
|
|
3527
|
-
initialize: o.tooltip.initialize,
|
|
3528
|
-
element: o.tooltip.element,
|
|
3529
|
-
style: o.tooltip.style,
|
|
3530
|
-
dimensions: a(o.tooltip.element, o.tooltip.dimensions)
|
|
3531
|
-
}, h;
|
|
3532
|
-
o.popup && (h = {
|
|
3533
|
-
id: l,
|
|
3534
|
-
initialize: o.popup.initialize,
|
|
3535
|
-
element: o.popup.element,
|
|
3536
|
-
style: o.popup.style,
|
|
3537
|
-
dimensions: a(o.popup.element, o.popup.dimensions)
|
|
3538
|
-
});
|
|
3539
|
-
const v = new xi(l, u, c, f, p, m, h);
|
|
3540
|
-
n.push(v);
|
|
3498
|
+
const i = this.mapProvider.getContainer(), s = (o) => {
|
|
3499
|
+
const l = document.createElement("div");
|
|
3500
|
+
l.style.position = "absolute", l.style.visibility = "hidden", l.style.zIndex = "-1";
|
|
3501
|
+
try {
|
|
3502
|
+
return l.appendChild(o), i.appendChild(l), l.getBoundingClientRect();
|
|
3503
|
+
} finally {
|
|
3504
|
+
i.removeChild(l);
|
|
3541
3505
|
}
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3506
|
+
}, a = (o, l) => {
|
|
3507
|
+
if (l) return l;
|
|
3508
|
+
if (o) {
|
|
3509
|
+
const c = s(o), f = c.width, h = c.height;
|
|
3510
|
+
return { width: f, height: h, padding: Vn };
|
|
3511
|
+
} else
|
|
3512
|
+
return { width: $n, height: $n, padding: Vn };
|
|
3513
|
+
}, u = (o, l) => {
|
|
3514
|
+
if (l) return l;
|
|
3515
|
+
const c = s(o), f = c.width, h = c.height, m = Math.min(Math.round(Math.min(f, h) / 4), Vi);
|
|
3516
|
+
return { width: f, height: h, padding: m };
|
|
3517
|
+
};
|
|
3518
|
+
for (const o of r) {
|
|
3519
|
+
const l = o.id, c = o.lat, f = o.lng, h = o.rank;
|
|
3520
|
+
let m = {
|
|
3521
|
+
id: l,
|
|
3522
|
+
initialize: o.pin?.initialize,
|
|
3523
|
+
element: o.pin?.element,
|
|
3524
|
+
style: o.pin?.style,
|
|
3525
|
+
dimensions: a(o.pin?.element, o.pin?.dimensions)
|
|
3526
|
+
}, p = {
|
|
3527
|
+
id: l,
|
|
3528
|
+
initialize: o.tooltip.initialize,
|
|
3529
|
+
element: o.tooltip.element,
|
|
3530
|
+
style: o.tooltip.style,
|
|
3531
|
+
dimensions: u(o.tooltip.element, o.tooltip.dimensions)
|
|
3532
|
+
}, v;
|
|
3533
|
+
o.popup && (v = {
|
|
3534
|
+
id: l,
|
|
3535
|
+
initialize: o.popup.initialize,
|
|
3536
|
+
element: o.popup.element,
|
|
3537
|
+
style: o.popup.style,
|
|
3538
|
+
dimensions: u(o.popup.element, o.popup.dimensions)
|
|
3539
|
+
});
|
|
3540
|
+
const b = new xi(l, c, f, h, m, p, v);
|
|
3541
|
+
n.push(b);
|
|
3545
3542
|
}
|
|
3543
|
+
return n.forEach((o) => this.markers.set(o.properites.id, o)), n.sort((o, l) => l.properites.rank - o.properites.rank), n;
|
|
3546
3544
|
}
|
|
3547
3545
|
async updateMarkers(e) {
|
|
3548
3546
|
xt(/* @__PURE__ */ ai(Va), e);
|
|
3549
3547
|
try {
|
|
3550
3548
|
const n = this.mapProvider.getParameters(), r = this.getMarkers(e);
|
|
3551
|
-
await this.markerVisibilityManager.updateMarkers(n, r), this.mapStateProvider.start(), this.markerVisibilityProcessor.run()
|
|
3549
|
+
await this.markerVisibilityManager.updateMarkers(n, r), this.mapStateProvider.start(), this.markerVisibilityProcessor.run();
|
|
3552
3550
|
} catch (n) {
|
|
3553
3551
|
throw this.clear(), this.error("Failed to update markers", n), n;
|
|
3554
3552
|
}
|