@annotorious/openseadragon 3.6.6 → 3.6.7

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.
@@ -87,7 +87,7 @@ const Go = (r) => {
87
87
  targetUpdated: og(r, t) ? { oldTarget: r.target, newTarget: t.target } : void 0
88
88
  };
89
89
  };
90
- var Lr = /* @__PURE__ */ ((r) => (r.LOCAL = "LOCAL", r.REMOTE = "REMOTE", r.SILENT = "SILENT", r))(Lr || {});
90
+ var Or = /* @__PURE__ */ ((r) => (r.LOCAL = "LOCAL", r.REMOTE = "REMOTE", r.SILENT = "SILENT", r))(Or || {});
91
91
  const lg = (r, t) => {
92
92
  const e = new Set((r.created || []).map((u) => u.id)), i = new Set((r.updated || []).map(({ newValue: u }) => u.id)), n = new Set((t.created || []).map((u) => u.id)), s = new Set((t.deleted || []).map((u) => u.id)), o = new Set((t.updated || []).map(({ oldValue: u }) => u.id)), a = new Set((t.updated || []).filter(({ oldValue: u }) => e.has(u.id) || i.has(u.id)).map(({ oldValue: u }) => u.id)), l = [
93
93
  ...(r.created || []).filter((u) => !s.has(u.id)).map((u) => o.has(u.id) ? t.updated.find(({ oldValue: d }) => d.id === u.id).newValue : u),
@@ -138,7 +138,7 @@ const cg = 250, ug = (r, t) => {
138
138
  }
139
139
  s = !1;
140
140
  };
141
- r.observe(a, { origin: Lr.LOCAL });
141
+ r.observe(a, { origin: Or.LOCAL });
142
142
  const l = (f) => f && f.length > 0 && r.bulkDeleteAnnotations(f), h = (f) => f && f.length > 0 && r.bulkAddAnnotations(f, !1), c = (f) => f && f.length > 0 && r.bulkUpdateAnnotations(f.map(({ oldValue: m }) => m)), u = (f) => f && f.length > 0 && r.bulkUpdateAnnotations(f.map(({ newValue: m }) => m)), d = (f) => f && f.length > 0 && r.bulkAddAnnotations(f, !1), p = (f) => f && f.length > 0 && r.bulkDeleteAnnotations(f);
143
143
  return {
144
144
  canRedo: () => i.length - 1 > n,
@@ -225,12 +225,12 @@ const cg = 250, ug = (r, t) => {
225
225
  const R = h.find((A) => A.id === b.id) || b;
226
226
  h = h.map((A) => A.id === b.id ? C : A), f("updateAnnotation", C, R);
227
227
  });
228
- }, { origin: Lr.LOCAL }), o.observe((v) => {
228
+ }, { origin: Or.LOCAL }), o.observe((v) => {
229
229
  if (h) {
230
230
  const y = new Set(h.map((b) => b.id)), g = (v.changes.updated || []).filter(({ newValue: b }) => y.has(b.id)).map(({ newValue: b }) => b);
231
231
  g.length > 0 && (h = h.map((b) => g.find((R) => R.id === b.id) || b));
232
232
  }
233
- }, { origin: Lr.REMOTE });
233
+ }, { origin: Or.REMOTE });
234
234
  const _ = (v) => (y) => {
235
235
  const { updated: g } = y;
236
236
  v ? (g || []).forEach((b) => f("updateAnnotation", b.oldValue, b.newValue)) : (g || []).forEach((b) => f("updateAnnotation", b.newValue, b.oldValue));
@@ -251,9 +251,9 @@ const cg = 250, ug = (r, t) => {
251
251
  const { store: i, selection: n } = r, s = (v) => {
252
252
  if (e) {
253
253
  const { parsed: y, error: g } = e.parse(v);
254
- y ? i.addAnnotation(y, Lr.REMOTE) : console.error(g);
254
+ y ? i.addAnnotation(y, Or.REMOTE) : console.error(g);
255
255
  } else
256
- i.addAnnotation(Go(v), Lr.REMOTE);
256
+ i.addAnnotation(Go(v), Or.REMOTE);
257
257
  }, o = () => n.clear(), a = () => i.clear(), l = (v) => {
258
258
  const y = i.getAnnotation(v);
259
259
  return e && y ? e.serialize(y) : y;
@@ -274,9 +274,9 @@ const cg = 250, ug = (r, t) => {
274
274
  }, p = (v, y = !0) => {
275
275
  if (e) {
276
276
  const g = e.parseAll || fg(e), { parsed: b, failed: C } = g(v);
277
- C.length > 0 && console.warn(`Discarded ${C.length} invalid annotations`, C), i.bulkAddAnnotations(b, y, Lr.REMOTE);
277
+ C.length > 0 && console.warn(`Discarded ${C.length} invalid annotations`, C), i.bulkAddAnnotations(b, y, Or.REMOTE);
278
278
  } else
279
- i.bulkAddAnnotations(v.map(Go), y, Lr.REMOTE);
279
+ i.bulkAddAnnotations(v.map(Go), y, Or.REMOTE);
280
280
  }, f = (v, y) => {
281
281
  v ? n.setSelected(v, y) : n.clear();
282
282
  }, m = (v) => {
@@ -604,7 +604,7 @@ function Qt(r, t) {
604
604
  const e = r.$$;
605
605
  e.fragment !== null && (Dg(e.after_update), Me(e.on_destroy), e.fragment && e.fragment.d(t), e.on_destroy = e.fragment = null, e.ctx = []);
606
606
  }
607
- function Og(r, t) {
607
+ function Bg(r, t) {
608
608
  r.$$.dirty[0] === -1 && (Mi.push(r), yf(), r.$$.dirty.fill(0)), r.$$.dirty[t / 31 | 0] |= 1 << t % 31;
609
609
  }
610
610
  function ye(r, t, e, i, n, s, o = null, a = [-1]) {
@@ -635,7 +635,7 @@ function ye(r, t, e, i, n, s, o = null, a = [-1]) {
635
635
  let c = !1;
636
636
  if (h.ctx = e ? e(r, t.props || {}, (u, d, ...p) => {
637
637
  const f = p.length ? p[0] : d;
638
- return h.ctx && n(h.ctx[u], h.ctx[u] = f) && (!h.skip_bound && h.bound[u] && h.bound[u](f), c && Og(r, u)), d;
638
+ return h.ctx && n(h.ctx[u], h.ctx[u] = f) && (!h.skip_bound && h.bound[u] && h.bound[u](f), c && Bg(r, u)), d;
639
639
  }) : [], h.update(), c = !0, Me(h.before_update), h.fragment = i ? i(h.ctx) : !1, t.target) {
640
640
  if (t.hydrate) {
641
641
  const u = Pg(t.target);
@@ -677,9 +677,9 @@ class _e {
677
677
  this.$$set && !Tg(t) && (this.$$.skip_bound = !0, this.$$set(t), this.$$.skip_bound = !1);
678
678
  }
679
679
  }
680
- const Lg = "4";
681
- typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(Lg);
682
- var yt = /* @__PURE__ */ ((r) => (r.ELLIPSE = "ELLIPSE", r.MULTIPOLYGON = "MULTIPOLYGON", r.POLYGON = "POLYGON", r.POLYLINE = "POLYLINE", r.RECTANGLE = "RECTANGLE", r.LINE = "LINE", r))(yt || {}), Bg = { exports: {} };
680
+ const Og = "4";
681
+ typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(Og);
682
+ var yt = /* @__PURE__ */ ((r) => (r.ELLIPSE = "ELLIPSE", r.MULTIPOLYGON = "MULTIPOLYGON", r.POLYGON = "POLYGON", r.POLYLINE = "POLYLINE", r.RECTANGLE = "RECTANGLE", r.LINE = "LINE", r))(yt || {}), Lg = { exports: {} };
683
683
  (function(r) {
684
684
  (function() {
685
685
  function t(a, l) {
@@ -717,7 +717,7 @@ var yt = /* @__PURE__ */ ((r) => (r.ELLIPSE = "ELLIPSE", r.MULTIPOLYGON = "MULTI
717
717
  }
718
718
  r.exports = o, r.exports.default = o;
719
719
  })();
720
- })(Bg);
720
+ })(Lg);
721
721
  const ch = {}, on = (r, t) => ch[r] = t, al = (r) => ch[r.type].area(r), Ng = (r, t, e, i) => ch[r.type].intersects(r, t, e, i), we = (r) => {
722
722
  let t = 1 / 0, e = 1 / 0, i = -1 / 0, n = -1 / 0;
723
723
  return r.forEach(([s, o]) => {
@@ -825,8 +825,8 @@ const Xg = {
825
825
  if (e.push(n.point), (i < r.length - 1 || t) && (n.type === "CURVE" || s.type == "CURVE")) {
826
826
  const o = bf(
827
827
  n.point,
828
- n.outHandle || n.point,
829
- s.inHandle || s.point,
828
+ n.type === "CURVE" && n.outHandle || n.point,
829
+ s.type === "CURVE" && s.inHandle || s.point,
830
830
  s.point,
831
831
  10
832
832
  // number of approximation segments
@@ -845,11 +845,11 @@ const Xg = {
845
845
  }, Vg = (r, t, e) => {
846
846
  for (let i = 0; i < r.points.length - 1; i++) {
847
847
  const n = r.points[i], s = r.points[i + 1];
848
- if (n.outHandle || s.inHandle) {
848
+ if (n.type === "CURVE" || s.type === "CURVE") {
849
849
  const o = bf(
850
850
  n.point,
851
- n.outHandle || n.point,
852
- s.inHandle || s.point,
851
+ n.type === "CURVE" && n.outHandle || n.point,
852
+ s.type === "CURVE" && s.inHandle || s.point,
853
853
  s.point,
854
854
  20
855
855
  // TODO make configurable? Based on scale factor? Length?
@@ -880,7 +880,7 @@ const Xg = {
880
880
  }
881
881
  if (r.closed) {
882
882
  const i = r.points[r.points.length - 1], n = r.points[0];
883
- if (i.outHandle || n.inHandle) {
883
+ if (i.type === "CURVE" || n.type === "CURVE") {
884
884
  const s = i.outHandle || i.point, o = n.inHandle || n.point, a = n.point;
885
885
  t.push(`C ${s[0]} ${s[1]} ${o[0]} ${o[1]} ${a[0]} ${a[1]}`);
886
886
  }
@@ -894,7 +894,7 @@ const zg = {
894
894
  intersects: (r, t, e) => t >= r.geometry.x && t <= r.geometry.x + r.geometry.w && e >= r.geometry.y && e <= r.geometry.y + r.geometry.h
895
895
  };
896
896
  on(yt.RECTANGLE, zg);
897
- const Be = (r) => Os(r.target), Os = (r) => {
897
+ const Le = (r) => Bs(r.target), Bs = (r) => {
898
898
  var t, e;
899
899
  return (r == null ? void 0 : r.annotation) !== void 0 && ((e = (t = r == null ? void 0 : r.selector) == null ? void 0 : t.geometry) == null ? void 0 : e.bounds) !== void 0;
900
900
  }, jg = (r, t = !1) => {
@@ -1448,25 +1448,25 @@ const Ey = (r, t) => {
1448
1448
  r.set(E.id, E), E.bodies.forEach((S) => t.set(S.id, E.id)), s(T, { created: [E] });
1449
1449
  }
1450
1450
  }, a = (I, T) => {
1451
- const E = ns(typeof I == "string" ? T : I), S = typeof I == "string" ? I : I.id, B = S && r.get(S);
1452
- if (B) {
1453
- const D = Af(B, E);
1454
- return S === E.id ? r.set(S, E) : (r.delete(S), r.set(E.id, E)), B.bodies.forEach((N) => t.delete(N.id)), E.bodies.forEach((N) => t.set(N.id, E.id)), D;
1451
+ const E = ns(typeof I == "string" ? T : I), S = typeof I == "string" ? I : I.id, L = S && r.get(S);
1452
+ if (L) {
1453
+ const D = Af(L, E);
1454
+ return S === E.id ? r.set(S, E) : (r.delete(S), r.set(E.id, E)), L.bodies.forEach((N) => t.delete(N.id)), E.bodies.forEach((N) => t.set(N.id, E.id)), D;
1455
1455
  } else
1456
1456
  console.warn(`Cannot update annotation ${S} - does not exist`);
1457
1457
  }, l = (I, T = Nt.LOCAL, E = Nt.LOCAL) => {
1458
- const S = Ay(T) ? E : T, B = a(I, T);
1459
- B && s(S, { updated: [B] });
1458
+ const S = Ay(T) ? E : T, L = a(I, T);
1459
+ L && s(S, { updated: [L] });
1460
1460
  }, h = (I, T = Nt.LOCAL) => {
1461
1461
  r.get(I.id) ? l(I, T) : o(I, T);
1462
1462
  }, c = (I, T = Nt.LOCAL) => {
1463
- const E = I.reduce((S, B) => {
1464
- const D = a(B);
1463
+ const E = I.reduce((S, L) => {
1464
+ const D = a(L);
1465
1465
  return D ? [...S, D] : S;
1466
1466
  }, []);
1467
1467
  E.length > 0 && s(T, { updated: E });
1468
1468
  }, u = (I, T = Nt.LOCAL) => {
1469
- const E = I.map(ns), { toAdd: S, toUpdate: B } = E.reduce((N, H) => r.get(H.id) ? { ...N, toUpdate: [...N.toUpdate, H] } : { ...N, toAdd: [...N.toAdd, H] }, { toAdd: [], toUpdate: [] }), D = B.map((N) => a(N, T)).filter(Boolean);
1469
+ const E = I.map(ns), { toAdd: S, toUpdate: L } = E.reduce((N, H) => r.get(H.id) ? { ...N, toUpdate: [...N.toUpdate, H] } : { ...N, toAdd: [...N.toAdd, H] }, { toAdd: [], toUpdate: [] }), D = L.map((N) => a(N, T)).filter(Boolean);
1470
1470
  S.forEach((N) => {
1471
1471
  r.set(N.id, N), N.bodies.forEach((H) => t.set(H.id, N.id));
1472
1472
  }), s(T, { created: S, updated: D });
@@ -1490,17 +1490,17 @@ const Ey = (r, t) => {
1490
1490
  }, m = (I, T = !0, E = Nt.LOCAL) => {
1491
1491
  const S = I.map(ns);
1492
1492
  if (T) {
1493
- const B = [...r.values()];
1493
+ const L = [...r.values()];
1494
1494
  r.clear(), t.clear(), S.forEach((D) => {
1495
1495
  r.set(D.id, D), D.bodies.forEach((N) => t.set(N.id, D.id));
1496
- }), s(E, { created: S, deleted: B });
1496
+ }), s(E, { created: S, deleted: L });
1497
1497
  } else {
1498
- const B = I.reduce((D, N) => {
1498
+ const L = I.reduce((D, N) => {
1499
1499
  const H = N.id && r.get(N.id);
1500
1500
  return H ? [...D, H] : D;
1501
1501
  }, []);
1502
- if (B.length > 0)
1503
- throw Error(`Bulk insert would overwrite the following annotations: ${B.map((D) => D.id).join(", ")}`);
1502
+ if (L.length > 0)
1503
+ throw Error(`Bulk insert would overwrite the following annotations: ${L.map((D) => D.id).join(", ")}`);
1504
1504
  S.forEach((D) => {
1505
1505
  r.set(D.id, D), D.bodies.forEach((N) => t.set(N.id, D.id));
1506
1506
  }), s(E, { created: S });
@@ -1514,8 +1514,8 @@ const Ey = (r, t) => {
1514
1514
  const E = _(I);
1515
1515
  E && s(T, { deleted: [E] });
1516
1516
  }, y = (I, T = Nt.LOCAL) => {
1517
- const E = I.reduce((S, B) => {
1518
- const D = _(B);
1517
+ const E = I.reduce((S, L) => {
1518
+ const D = _(L);
1519
1519
  return D ? [...S, D] : S;
1520
1520
  }, []);
1521
1521
  E.length > 0 && s(T, { deleted: E });
@@ -1527,7 +1527,7 @@ const Ey = (r, t) => {
1527
1527
  t.delete(E.id);
1528
1528
  const S = {
1529
1529
  ...T,
1530
- bodies: T.bodies.filter((B) => B.id !== I.id)
1530
+ bodies: T.bodies.filter((L) => L.id !== I.id)
1531
1531
  };
1532
1532
  return r.set(T.id, S), {
1533
1533
  oldValue: T,
@@ -1561,13 +1561,13 @@ const Ey = (r, t) => {
1561
1561
  throw "Annotation integrity violation: annotation ID must be the same when updating bodies";
1562
1562
  const E = r.get(I.annotation);
1563
1563
  if (E) {
1564
- const S = E.bodies.find((D) => D.id === I.id), B = {
1564
+ const S = E.bodies.find((D) => D.id === I.id), L = {
1565
1565
  ...E,
1566
1566
  bodies: E.bodies.map((D) => D.id === S.id ? T : D)
1567
1567
  };
1568
- return r.set(E.id, B), S.id !== T.id && (t.delete(S.id), t.set(T.id, B.id)), {
1568
+ return r.set(E.id, L), S.id !== T.id && (t.delete(S.id), t.set(T.id, L.id)), {
1569
1569
  oldValue: E,
1570
- newValue: B,
1570
+ newValue: L,
1571
1571
  bodiesUpdated: [{ oldBody: S, newBody: T }]
1572
1572
  };
1573
1573
  } else
@@ -1769,7 +1769,7 @@ const Py = 250, Ry = (r, t) => {
1769
1769
  v ? (g || []).forEach((b) => f("updateAnnotation", b.oldValue, b.newValue)) : (g || []).forEach((b) => f("updateAnnotation", b.newValue, b.oldValue));
1770
1770
  };
1771
1771
  return t.on("undo", _(!0)), t.on("redo", _(!1)), { on: d, off: p, emit: f };
1772
- }, Oy = (r) => (t) => t.reduce((e, i) => {
1772
+ }, By = (r) => (t) => t.reduce((e, i) => {
1773
1773
  const { parsed: n, error: s } = r.parse(i);
1774
1774
  return s ? {
1775
1775
  parsed: e.parsed,
@@ -1780,7 +1780,7 @@ const Py = 250, Ry = (r, t) => {
1780
1780
  } : {
1781
1781
  ...e
1782
1782
  };
1783
- }, { parsed: [], failed: [] }), Ly = (r, t, e) => {
1783
+ }, { parsed: [], failed: [] }), Oy = (r, t, e) => {
1784
1784
  const { store: i, selection: n } = r, s = (v) => {
1785
1785
  if (e) {
1786
1786
  const { parsed: y, error: g } = e.parse(v);
@@ -1806,7 +1806,7 @@ const Py = 250, Ry = (r, t) => {
1806
1806
  }
1807
1807
  }, p = (v, y = !0) => {
1808
1808
  if (e) {
1809
- const g = e.parseAll || Oy(e), { parsed: b, failed: C } = g(v);
1809
+ const g = e.parseAll || By(e), { parsed: b, failed: C } = g(v);
1810
1810
  C.length > 0 && console.warn(`Discarded ${C.length} invalid annotations`, C), i.bulkAddAnnotations(b, y, Nt.REMOTE);
1811
1811
  } else
1812
1812
  i.bulkAddAnnotations(v.map(Wo), y, Nt.REMOTE);
@@ -1851,7 +1851,7 @@ const Py = 250, Ry = (r, t) => {
1851
1851
  ...n || {},
1852
1852
  ...s || {}
1853
1853
  };
1854
- }, By = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
1854
+ }, Ly = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
1855
1855
  let Ny = (r) => crypto.getRandomValues(new Uint8Array(r)), Fy = (r, t, e) => {
1856
1856
  let i = (2 << Math.log2(r.length - 1)) - 1, n = -~(1.6 * i * t / r.length);
1857
1857
  return (s = t) => {
@@ -1865,7 +1865,7 @@ let Ny = (r) => crypto.getRandomValues(new Uint8Array(r)), Fy = (r, t, e) => {
1865
1865
  }, ky = (r, t = 21) => Fy(r, t | 0, Ny), Uy = (r = 21) => {
1866
1866
  let t = "", e = crypto.getRandomValues(new Uint8Array(r |= 0));
1867
1867
  for (; r--; )
1868
- t += By[e[r] & 63];
1868
+ t += Ly[e[r] & 63];
1869
1869
  return t;
1870
1870
  };
1871
1871
  const Gy = () => ({ isGuest: !0, id: ky("1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_", 20)() }), $y = (r) => {
@@ -3201,12 +3201,12 @@ function u0(r, t, e) {
3201
3201
  const o = Xr();
3202
3202
  let { shape: a } = t, { computedStyle: l } = t, { transform: h } = t, { viewportScale: c = 1 } = t, { svgEl: u } = t, d, p = !1, f, m = [];
3203
3203
  const _ = () => e(7, p = !0), v = () => e(7, p = !1), y = (E) => {
3204
- if (m.length > 0 || !n.some((L) => L.visible)) {
3204
+ if (m.length > 0 || !n.some((O) => O.visible)) {
3205
3205
  e(6, d = void 0);
3206
3206
  return;
3207
3207
  }
3208
- const [S, B] = h.elementToImage(E.offsetX, E.offsetY), D = (L) => Math.pow(L[0] - S, 2) + Math.pow(L[1] - B, 2), N = i.points.reduce((L, $) => D($) < D(L) ? $ : L), H = n.filter((L) => L.visible).reduce((L, $) => D($.point) < D(L.point) ? $ : L), O = Math.pow(h0 / c, 2);
3209
- D(N) < O || D(H.point) < O ? e(6, d = n.indexOf(H)) : e(6, d = void 0);
3208
+ const [S, L] = h.elementToImage(E.offsetX, E.offsetY), D = (O) => Math.pow(O[0] - S, 2) + Math.pow(O[1] - L, 2), N = i.points.reduce((O, $) => D($) < D(O) ? $ : O), H = n.filter((O) => O.visible).reduce((O, $) => D($.point) < D(O.point) ? $ : O), B = Math.pow(h0 / c, 2);
3209
+ D(N) < B || D(H.point) < B ? e(6, d = n.indexOf(H)) : e(6, d = void 0);
3210
3210
  }, g = () => {
3211
3211
  document.activeElement !== u && u.focus();
3212
3212
  }, b = () => {
@@ -3215,23 +3215,23 @@ function u0(r, t, e) {
3215
3215
  e(7, p = !0), E.preventDefault(), E.stopPropagation(), f = performance.now();
3216
3216
  }, R = (E) => (S) => {
3217
3217
  if (!f || Er || performance.now() - f > l0) return;
3218
- const B = m.includes(E);
3219
- S.metaKey || S.ctrlKey || S.shiftKey ? B ? e(8, m = m.filter((D) => D !== E)) : e(8, m = [...m, E]) : B && m.length > 1 ? e(8, m = [E]) : B ? e(8, m = []) : e(8, m = [E]), g();
3220
- }, A = (E, S, B) => {
3218
+ const L = m.includes(E);
3219
+ S.metaKey || S.ctrlKey || S.shiftKey ? L ? e(8, m = m.filter((D) => D !== E)) : e(8, m = [...m, E]) : L && m.length > 1 ? e(8, m = [E]) : L ? e(8, m = []) : e(8, m = [E]), g();
3220
+ }, A = (E, S, L) => {
3221
3221
  g();
3222
3222
  let D;
3223
3223
  const N = E.geometry;
3224
- m.length > 1 ? D = N.points.map(([O, L], $) => m.includes($) ? [O + B[0], L + B[1]] : [O, L]) : S === "SHAPE" ? D = N.points.map(([O, L]) => [O + B[0], L + B[1]]) : D = N.points.map(([O, L], $) => S === `HANDLE-${$}` ? [O + B[0], L + B[1]] : [O, L]);
3224
+ m.length > 1 ? D = N.points.map(([B, O], $) => m.includes($) ? [B + L[0], O + L[1]] : [B, O]) : S === "SHAPE" ? D = N.points.map(([B, O]) => [B + L[0], O + L[1]]) : D = N.points.map(([B, O], $) => S === `HANDLE-${$}` ? [B + L[0], O + L[1]] : [B, O]);
3225
3225
  const H = we(D);
3226
3226
  return { ...E, geometry: { points: D, bounds: H } };
3227
3227
  }, P = (E) => async (S) => {
3228
3228
  S.stopPropagation();
3229
- const B = [
3229
+ const L = [
3230
3230
  ...i.points.slice(0, E + 1),
3231
3231
  n[E].point,
3232
3232
  ...i.points.slice(E + 1)
3233
- ], D = we(B);
3234
- o("change", { ...a, geometry: { points: B, bounds: D } }), await _f();
3233
+ ], D = we(L);
3234
+ o("change", { ...a, geometry: { points: L, bounds: D } }), await _f();
3235
3235
  const N = [...document.querySelectorAll(".a9s-handle")][E + 1];
3236
3236
  if (N != null && N.firstChild) {
3237
3237
  const H = new PointerEvent(
@@ -3251,7 +3251,7 @@ function u0(r, t, e) {
3251
3251
  }
3252
3252
  }, M = () => {
3253
3253
  if (i.points.length - m.length < 3) return;
3254
- const E = i.points.filter((B, D) => !m.includes(D)), S = we(E);
3254
+ const E = i.points.filter((L, D) => !m.includes(D)), S = we(E);
3255
3255
  o("change", { ...a, geometry: { points: E, bounds: S } }), e(8, m = []);
3256
3256
  };
3257
3257
  pi(() => {
@@ -3279,7 +3279,7 @@ function u0(r, t, e) {
3279
3279
  r.$$.dirty[0] & /*shape*/
3280
3280
  1 && e(5, i = a.geometry), r.$$.dirty[0] & /*geom, viewportScale*/
3281
3281
  40 && e(10, n = Er ? [] : i.points.map((E, S) => {
3282
- const B = S === i.points.length - 1 ? i.points[0] : i.points[S + 1], D = (E[0] + B[0]) / 2, N = (E[1] + B[1]) / 2, H = Math.sqrt(Math.pow(B[0] - D, 2) + Math.pow(B[1] - N, 2)) > c0 / c;
3282
+ const L = S === i.points.length - 1 ? i.points[0] : i.points[S + 1], D = (E[0] + L[0]) / 2, N = (E[1] + L[1]) / 2, H = Math.sqrt(Math.pow(L[0] - D, 2) + Math.pow(L[1] - N, 2)) > c0 / c;
3283
3283
  return { point: [D, N], visible: H };
3284
3284
  })), r.$$.dirty[0] & /*geom, viewportScale*/
3285
3285
  40 && e(9, s = xo(i.bounds, Un / c));
@@ -3330,7 +3330,7 @@ class d0 extends _e {
3330
3330
  }
3331
3331
  }
3332
3332
  function f0(r) {
3333
- let t, e, i, n, s, o, a, l, h, c, u, d, p, f, m, _, v, y, g, b, C, R, A, P, M, k, U, I, T, E, S, B, D, N, H, O, L, $, F, X, V, dt, pt, z, bt, rt, ft, _t, It, Dt, ie, Gt, Q, Oe, fn;
3333
+ let t, e, i, n, s, o, a, l, h, c, u, d, p, f, m, _, v, y, g, b, C, R, A, P, M, k, U, I, T, E, S, L, D, N, H, B, O, $, F, X, V, dt, pt, z, bt, rt, ft, _t, It, Dt, ie, Gt, Q, Be, fn;
3334
3334
  return rt = new $i({
3335
3335
  props: {
3336
3336
  class: "a9s-corner-handle-topleft",
@@ -3421,7 +3421,7 @@ function f0(r) {
3421
3421
  ) && r[12]("BOTTOM_LEFT").apply(this, arguments);
3422
3422
  }), {
3423
3423
  c() {
3424
- t = W("defs"), e = W("mask"), i = W("rect"), l = W("rect"), p = be(), f = W("rect"), g = be(), b = W("rect"), M = be(), k = W("rect"), E = be(), S = W("rect"), H = be(), O = W("rect"), X = be(), V = W("rect"), bt = be(), re(rt.$$.fragment), ft = be(), re(_t.$$.fragment), It = be(), re(Dt.$$.fragment), ie = be(), re(Gt.$$.fragment), x(i, "class", "rect-mask-bg svelte-1njczvj"), x(i, "x", n = /*mask*/
3424
+ t = W("defs"), e = W("mask"), i = W("rect"), l = W("rect"), p = be(), f = W("rect"), g = be(), b = W("rect"), M = be(), k = W("rect"), E = be(), S = W("rect"), H = be(), B = W("rect"), X = be(), V = W("rect"), bt = be(), re(rt.$$.fragment), ft = be(), re(_t.$$.fragment), It = be(), re(Dt.$$.fragment), ie = be(), re(Gt.$$.fragment), x(i, "class", "rect-mask-bg svelte-1njczvj"), x(i, "x", n = /*mask*/
3425
3425
  r[6].x), x(i, "y", s = /*mask*/
3426
3426
  r[6].y), x(i, "width", o = /*mask*/
3427
3427
  r[6].w), x(i, "height", a = /*mask*/
@@ -3451,21 +3451,21 @@ function f0(r) {
3451
3451
  r[5].h), x(k, "class", "a9s-edge-handle a9s-edge-handle-top"), x(k, "x", U = /*geom*/
3452
3452
  r[5].x), x(k, "y", I = /*geom*/
3453
3453
  r[5].y), x(k, "height", 1), x(k, "width", T = /*geom*/
3454
- r[5].w), x(S, "class", "a9s-edge-handle a9s-edge-handle-right"), x(S, "x", B = /*geom*/
3454
+ r[5].w), x(S, "class", "a9s-edge-handle a9s-edge-handle-right"), x(S, "x", L = /*geom*/
3455
3455
  r[5].x + /*geom*/
3456
3456
  r[5].w), x(S, "y", D = /*geom*/
3457
3457
  r[5].y), x(S, "height", N = /*geom*/
3458
- r[5].h), x(S, "width", 1), x(O, "class", "a9s-edge-handle a9s-edge-handle-bottom"), x(O, "x", L = /*geom*/
3459
- r[5].x), x(O, "y", $ = /*geom*/
3458
+ r[5].h), x(S, "width", 1), x(B, "class", "a9s-edge-handle a9s-edge-handle-bottom"), x(B, "x", O = /*geom*/
3459
+ r[5].x), x(B, "y", $ = /*geom*/
3460
3460
  r[5].y + /*geom*/
3461
- r[5].h), x(O, "height", 1), x(O, "width", F = /*geom*/
3461
+ r[5].h), x(B, "height", 1), x(B, "width", F = /*geom*/
3462
3462
  r[5].w), x(V, "class", "a9s-edge-handle a9s-edge-handle-left"), x(V, "x", dt = /*geom*/
3463
3463
  r[5].x), x(V, "y", pt = /*geom*/
3464
3464
  r[5].y), x(V, "height", z = /*geom*/
3465
3465
  r[5].h), x(V, "width", 1);
3466
3466
  },
3467
3467
  m(Y, G) {
3468
- it(Y, t, G), xt(t, e), xt(e, i), xt(e, l), it(Y, p, G), it(Y, f, G), it(Y, g, G), it(Y, b, G), it(Y, M, G), it(Y, k, G), it(Y, E, G), it(Y, S, G), it(Y, H, G), it(Y, O, G), it(Y, X, G), it(Y, V, G), it(Y, bt, G), Jt(rt, Y, G), it(Y, ft, G), Jt(_t, Y, G), it(Y, It, G), Jt(Dt, Y, G), it(Y, ie, G), Jt(Gt, Y, G), Q = !0, Oe || (fn = [
3468
+ it(Y, t, G), xt(t, e), xt(e, i), xt(e, l), it(Y, p, G), it(Y, f, G), it(Y, g, G), it(Y, b, G), it(Y, M, G), it(Y, k, G), it(Y, E, G), it(Y, S, G), it(Y, H, G), it(Y, B, G), it(Y, X, G), it(Y, V, G), it(Y, bt, G), Jt(rt, Y, G), it(Y, ft, G), Jt(_t, Y, G), it(Y, It, G), Jt(Dt, Y, G), it(Y, ie, G), Jt(Gt, Y, G), Q = !0, Be || (fn = [
3469
3469
  Ct(f, "pointerdown", function() {
3470
3470
  Ht(
3471
3471
  /*grab*/
@@ -3490,7 +3490,7 @@ function f0(r) {
3490
3490
  r[12]("RIGHT")
3491
3491
  ) && r[12]("RIGHT").apply(this, arguments);
3492
3492
  }),
3493
- Ct(O, "pointerdown", function() {
3493
+ Ct(B, "pointerdown", function() {
3494
3494
  Ht(
3495
3495
  /*grab*/
3496
3496
  r[12]("BOTTOM")
@@ -3502,7 +3502,7 @@ function f0(r) {
3502
3502
  r[12]("LEFT")
3503
3503
  ) && r[12]("LEFT").apply(this, arguments);
3504
3504
  })
3505
- ], Oe = !0);
3505
+ ], Be = !0);
3506
3506
  },
3507
3507
  p(Y, G) {
3508
3508
  r = Y, (!Q || G & /*mask*/
@@ -3550,20 +3550,20 @@ function f0(r) {
3550
3550
  r[5].y)) && x(k, "y", I), (!Q || G & /*geom*/
3551
3551
  32 && T !== (T = /*geom*/
3552
3552
  r[5].w)) && x(k, "width", T), (!Q || G & /*geom*/
3553
- 32 && B !== (B = /*geom*/
3553
+ 32 && L !== (L = /*geom*/
3554
3554
  r[5].x + /*geom*/
3555
- r[5].w)) && x(S, "x", B), (!Q || G & /*geom*/
3555
+ r[5].w)) && x(S, "x", L), (!Q || G & /*geom*/
3556
3556
  32 && D !== (D = /*geom*/
3557
3557
  r[5].y)) && x(S, "y", D), (!Q || G & /*geom*/
3558
3558
  32 && N !== (N = /*geom*/
3559
3559
  r[5].h)) && x(S, "height", N), (!Q || G & /*geom*/
3560
- 32 && L !== (L = /*geom*/
3561
- r[5].x)) && x(O, "x", L), (!Q || G & /*geom*/
3560
+ 32 && O !== (O = /*geom*/
3561
+ r[5].x)) && x(B, "x", O), (!Q || G & /*geom*/
3562
3562
  32 && $ !== ($ = /*geom*/
3563
3563
  r[5].y + /*geom*/
3564
- r[5].h)) && x(O, "y", $), (!Q || G & /*geom*/
3564
+ r[5].h)) && x(B, "y", $), (!Q || G & /*geom*/
3565
3565
  32 && F !== (F = /*geom*/
3566
- r[5].w)) && x(O, "width", F), (!Q || G & /*geom*/
3566
+ r[5].w)) && x(B, "width", F), (!Q || G & /*geom*/
3567
3567
  32 && dt !== (dt = /*geom*/
3568
3568
  r[5].x)) && x(V, "x", dt), (!Q || G & /*geom*/
3569
3569
  32 && pt !== (pt = /*geom*/
@@ -3614,7 +3614,7 @@ function f0(r) {
3614
3614
  gt(rt.$$.fragment, Y), gt(_t.$$.fragment, Y), gt(Dt.$$.fragment, Y), gt(Gt.$$.fragment, Y), Q = !1;
3615
3615
  },
3616
3616
  d(Y) {
3617
- Y && (tt(t), tt(p), tt(f), tt(g), tt(b), tt(M), tt(k), tt(E), tt(S), tt(H), tt(O), tt(X), tt(V), tt(bt), tt(ft), tt(It), tt(ie)), Qt(rt, Y), Qt(_t, Y), Qt(Dt, Y), Qt(Gt, Y), Oe = !1, Me(fn);
3617
+ Y && (tt(t), tt(p), tt(f), tt(g), tt(b), tt(M), tt(k), tt(E), tt(S), tt(H), tt(B), tt(X), tt(V), tt(bt), tt(ft), tt(It), tt(ie)), Qt(rt, Y), Qt(_t, Y), Qt(Dt, Y), Qt(Gt, Y), Be = !1, Me(fn);
3618
3618
  }
3619
3619
  };
3620
3620
  }
@@ -4431,31 +4431,31 @@ function E0(r, t, e) {
4431
4431
  e(6, d = void 0);
4432
4432
  return;
4433
4433
  }
4434
- const [B, D] = h.elementToImage(S.offsetX, S.offsetY), N = ($) => Math.pow($[0] - B, 2) + Math.pow($[1] - D, 2), H = $g(i).reduce(($, F) => N(F) < N($) ? F : $), O = n.filter(($) => $.visible).reduce(($, F) => N(F.point) < N($.point) ? F : $), L = Math.pow(w0 / c, 2);
4435
- N(H) < L || N(O.point) < L ? e(6, d = n.indexOf(O)) : e(6, d = void 0);
4434
+ const [L, D] = h.elementToImage(S.offsetX, S.offsetY), N = ($) => Math.pow($[0] - L, 2) + Math.pow($[1] - D, 2), H = $g(i).reduce(($, F) => N(F) < N($) ? F : $), B = n.filter(($) => $.visible).reduce(($, F) => N(F.point) < N($.point) ? F : $), O = Math.pow(w0 / c, 2);
4435
+ N(H) < O || N(B.point) < O ? e(6, d = n.indexOf(B)) : e(6, d = void 0);
4436
4436
  }, g = () => {
4437
4437
  document.activeElement !== u && u.focus();
4438
4438
  }, b = () => {
4439
4439
  e(8, m = []), g();
4440
4440
  }, C = (S) => {
4441
4441
  e(7, p = !0), S.preventDefault(), S.stopPropagation(), f = performance.now();
4442
- }, R = (S, B, D) => (N) => {
4442
+ }, R = (S, L, D) => (N) => {
4443
4443
  if (!f || Er || performance.now() - f > x0) return;
4444
- const H = (L) => L.polygon === S && L.ring === B && L.point === D, O = m.some(H);
4445
- N.metaKey || N.ctrlKey || N.shiftKey ? O ? e(8, m = m.filter((L) => !H(L))) : e(8, m = [...m, { polygon: S, ring: B, point: D }]) : O && m.length > 1 ? e(8, m = [{ polygon: S, ring: B, point: D }]) : O ? e(8, m = []) : e(8, m = [{ polygon: S, ring: B, point: D }]), g();
4446
- }, A = (S, B, D) => {
4444
+ const H = (O) => O.polygon === S && O.ring === L && O.point === D, B = m.some(H);
4445
+ N.metaKey || N.ctrlKey || N.shiftKey ? B ? e(8, m = m.filter((O) => !H(O))) : e(8, m = [...m, { polygon: S, ring: L, point: D }]) : B && m.length > 1 ? e(8, m = [{ polygon: S, ring: L, point: D }]) : B ? e(8, m = []) : e(8, m = [{ polygon: S, ring: L, point: D }]), g();
4446
+ }, A = (S, L, D) => {
4447
4447
  g();
4448
4448
  const N = S.geometry.polygons;
4449
4449
  let H;
4450
- if (B === "SHAPE")
4451
- H = N.map((O) => {
4452
- const L = O.rings.map((F, X) => ({ points: F.points.map((V, dt) => [V[0] + D[0], V[1] + D[1]]) })), $ = we(L[0].points);
4453
- return { rings: L, bounds: $ };
4450
+ if (L === "SHAPE")
4451
+ H = N.map((B) => {
4452
+ const O = B.rings.map((F, X) => ({ points: F.points.map((V, dt) => [V[0] + D[0], V[1] + D[1]]) })), $ = we(O[0].points);
4453
+ return { rings: O, bounds: $ };
4454
4454
  });
4455
4455
  else {
4456
- const [O, L, $, F] = B.split("-").map((X) => parseInt(X));
4456
+ const [B, O, $, F] = L.split("-").map((X) => parseInt(X));
4457
4457
  H = N.map((X, V) => {
4458
- if (V === L) {
4458
+ if (V === O) {
4459
4459
  const dt = X.rings.map((z, bt) => bt === $ ? { points: z.points.map((rt, ft) => ft === F ? [rt[0] + D[0], rt[1] + D[1]] : rt) } : z), pt = we(dt[0].points);
4460
4460
  return { rings: dt, bounds: pt };
4461
4461
  } else
@@ -4469,18 +4469,18 @@ function E0(r, t, e) {
4469
4469
  bounds: Xo(H)
4470
4470
  }
4471
4471
  };
4472
- }, P = (S) => async (B) => {
4473
- B.stopPropagation();
4474
- const D = n[S], N = i.polygons.map((O, L) => {
4475
- if (L === D.elementIdx) {
4476
- const $ = O.rings.map((X, V) => V === D.ringIdx ? { points: [
4472
+ }, P = (S) => async (L) => {
4473
+ L.stopPropagation();
4474
+ const D = n[S], N = i.polygons.map((B, O) => {
4475
+ if (O === D.elementIdx) {
4476
+ const $ = B.rings.map((X, V) => V === D.ringIdx ? { points: [
4477
4477
  ...X.points.slice(0, D.pointIdx + 1),
4478
4478
  D.point,
4479
4479
  ...X.points.slice(D.pointIdx + 1)
4480
4480
  ] } : X), F = we($[0].points);
4481
4481
  return { rings: $, bounds: F };
4482
4482
  } else
4483
- return O;
4483
+ return B;
4484
4484
  });
4485
4485
  o("change", {
4486
4486
  ...a,
@@ -4491,31 +4491,31 @@ function E0(r, t, e) {
4491
4491
  }), await _f();
4492
4492
  const H = [...document.querySelectorAll(".a9s-handle")][S + 1];
4493
4493
  if (H != null && H.firstChild) {
4494
- const O = new PointerEvent(
4494
+ const B = new PointerEvent(
4495
4495
  "pointerdown",
4496
4496
  {
4497
4497
  bubbles: !0,
4498
4498
  cancelable: !0,
4499
- clientX: B.clientX,
4500
- clientY: B.clientY,
4501
- pointerId: B.pointerId,
4502
- pointerType: B.pointerType,
4503
- isPrimary: B.isPrimary,
4504
- buttons: B.buttons
4499
+ clientX: L.clientX,
4500
+ clientY: L.clientY,
4501
+ pointerId: L.pointerId,
4502
+ pointerType: L.pointerType,
4503
+ isPrimary: L.isPrimary,
4504
+ buttons: L.buttons
4505
4505
  }
4506
4506
  );
4507
- H.firstChild.dispatchEvent(O);
4507
+ H.firstChild.dispatchEvent(B);
4508
4508
  }
4509
4509
  }, M = () => {
4510
- const S = i.polygons.map((B, D) => {
4510
+ const S = i.polygons.map((L, D) => {
4511
4511
  if (m.some((N) => N.polygon === D)) {
4512
- const N = B.rings.map((O, L) => {
4513
- const $ = m.filter((F) => F.polygon === D && F.ring === L);
4514
- return $.length && O.points.length - $.length >= 3 ? { points: O.points.filter((F, X) => !$.some((V) => V.point === X)) } : O;
4512
+ const N = L.rings.map((B, O) => {
4513
+ const $ = m.filter((F) => F.polygon === D && F.ring === O);
4514
+ return $.length && B.points.length - $.length >= 3 ? { points: B.points.filter((F, X) => !$.some((V) => V.point === X)) } : B;
4515
4515
  }), H = we(N[0].points);
4516
4516
  return { rings: N, bounds: H };
4517
4517
  } else
4518
- return B;
4518
+ return L;
4519
4519
  });
4520
4520
  !hl(i.polygons, S) && (o("change", {
4521
4521
  ...a,
@@ -4527,14 +4527,14 @@ function E0(r, t, e) {
4527
4527
  };
4528
4528
  pi(() => {
4529
4529
  if (Er) return;
4530
- const S = (B) => {
4531
- (B.key === "Delete" || B.key === "Backspace") && (B.preventDefault(), M());
4530
+ const S = (L) => {
4531
+ (L.key === "Delete" || L.key === "Backspace") && (L.preventDefault(), M());
4532
4532
  };
4533
4533
  return u.addEventListener("pointermove", y), u.addEventListener("keydown", S), () => {
4534
4534
  u.removeEventListener("pointermove", y), u.removeEventListener("keydown", S);
4535
4535
  };
4536
4536
  });
4537
- const k = `polygon-mask-${Math.random().toString(36).substring(2, 12)}`, U = (S, B, D, { polygon: N, ring: H, point: O }) => N === S && H === B && O === D;
4537
+ const k = `polygon-mask-${Math.random().toString(36).substring(2, 12)}`, U = (S, L, D, { polygon: N, ring: H, point: B }) => N === S && H === L && B === D;
4538
4538
  function I(S) {
4539
4539
  pe.call(this, r, S);
4540
4540
  }
@@ -5066,8 +5066,8 @@ function D0(r) {
5066
5066
  }
5067
5067
  };
5068
5068
  }
5069
- const O0 = 20, L0 = 1500;
5070
- function B0(r, t, e) {
5069
+ const B0 = 20, O0 = 1500;
5070
+ function L0(r, t, e) {
5071
5071
  let i, n, s;
5072
5072
  const o = Xr();
5073
5073
  let { addEventListener: a } = t, { drawingMode: l } = t, { transform: h } = t, { viewportScale: c = 1 } = t, u, d = [], p, f, m = !1;
@@ -5082,13 +5082,13 @@ function B0(r, t, e) {
5082
5082
  if (f && clearTimeout(f), d.length > 0) {
5083
5083
  if (e(10, p = h.elementToImage(A.offsetX, A.offsetY)), d.length > 2) {
5084
5084
  const P = Ds(p, d[0]) * c;
5085
- e(1, m = P < O0);
5085
+ e(1, m = P < B0);
5086
5086
  }
5087
5087
  A.pointerType === "touch" && (f = setTimeout(
5088
5088
  () => {
5089
5089
  g();
5090
5090
  },
5091
- L0
5091
+ O0
5092
5092
  ));
5093
5093
  }
5094
5094
  }, y = (R) => {
@@ -5159,7 +5159,7 @@ function B0(r, t, e) {
5159
5159
  }
5160
5160
  class N0 extends _e {
5161
5161
  constructor(t) {
5162
- super(), ye(this, t, B0, D0, Kt, {
5162
+ super(), ye(this, t, L0, D0, Kt, {
5163
5163
  addEventListener: 6,
5164
5164
  drawingMode: 7,
5165
5165
  transform: 8,
@@ -6129,7 +6129,7 @@ function Ec(r) {
6129
6129
  };
6130
6130
  }
6131
6131
  function Tc(r) {
6132
- let t = Be(
6132
+ let t = Le(
6133
6133
  /*annotation*/
6134
6134
  r[42]
6135
6135
  ) && !/*isEditable*/
@@ -6146,7 +6146,7 @@ function Tc(r) {
6146
6146
  },
6147
6147
  p(s, o) {
6148
6148
  o[0] & /*$store, isEditable*/
6149
- 132096 && (t = Be(
6149
+ 132096 && (t = Le(
6150
6150
  /*annotation*/
6151
6151
  s[42]
6152
6152
  ) && !/*isEditable*/
@@ -6588,16 +6588,16 @@ function m_(r, t, e) {
6588
6588
  const k = () => e(7, M += 1), U = () => R, I = () => v;
6589
6589
  let T, E, S;
6590
6590
  pi(() => _(e(9, S = Yy(y, E))));
6591
- const { hover: B, selection: D, store: N } = b;
6592
- $o(r, B, (z) => e(16, u = z)), $o(r, D, (z) => e(33, d = z)), $o(r, N, (z) => e(17, p = z));
6593
- let H, O;
6594
- const L = (z) => {
6591
+ const { hover: L, selection: D, store: N } = b;
6592
+ $o(r, L, (z) => e(16, u = z)), $o(r, D, (z) => e(33, d = z)), $o(r, N, (z) => e(17, p = z));
6593
+ let H, B;
6594
+ const O = (z) => {
6595
6595
  H && N.unobserve(H);
6596
6596
  const bt = z.filter(({ editable: rt }) => rt).map(({ id: rt }) => rt);
6597
- bt.length > 0 ? (e(5, O = bt.map((rt) => N.getAnnotation(rt)).filter((rt) => rt && Be(rt))), H = (rt) => {
6597
+ bt.length > 0 ? (e(5, B = bt.map((rt) => N.getAnnotation(rt)).filter((rt) => rt && Le(rt))), H = (rt) => {
6598
6598
  const { updated: ft } = rt.changes;
6599
- e(5, O = ft == null ? void 0 : ft.map((_t) => _t.newValue));
6600
- }, N.observe(H, { annotations: bt })) : e(5, O = void 0);
6599
+ e(5, B = ft == null ? void 0 : ft.map((_t) => _t.newValue));
6600
+ }, N.observe(H, { annotations: bt })) : e(5, B = void 0);
6601
6601
  }, $ = (z) => {
6602
6602
  const bt = Ef(), rt = {
6603
6603
  id: bt,
@@ -6622,8 +6622,8 @@ function m_(r, t, e) {
6622
6622
  });
6623
6623
  }, X = (z) => {
6624
6624
  const { x: bt, y: rt } = Mf(z, E), ft = N.getAt(bt, rt, void 0, 2);
6625
- ft ? u !== ft.id && B.set(ft.id) : B.set(void 0);
6626
- }, V = (z) => Be(z);
6625
+ ft ? u !== ft.id && L.set(ft.id) : L.set(void 0);
6626
+ }, V = (z) => Le(z);
6627
6627
  function dt(z) {
6628
6628
  Ws[z ? "unshift" : "push"](() => {
6629
6629
  T = z, e(8, T);
@@ -6643,8 +6643,8 @@ function m_(r, t, e) {
6643
6643
  2 && e(14, s = (n == null ? void 0 : n.drawingMode) || g), r.$$.dirty[0] & /*svgEl*/
6644
6644
  16 && e(13, o = i_(E)), r.$$.dirty[0] & /*svgEl*/
6645
6645
  16 && e(12, { onPointerDown: a, onPointerUp: l } = s_(E, N), a, (e(11, l), e(4, E))), r.$$.dirty[1] & /*$selection*/
6646
- 4 && L(d.selected), r.$$.dirty[0] & /*editableAnnotations*/
6647
- 32 && e(6, h = O ? O.map((z) => ({
6646
+ 4 && O(d.selected), r.$$.dirty[0] & /*editableAnnotations*/
6647
+ 32 && e(6, h = B ? B.map((z) => ({
6648
6648
  annotation: z,
6649
6649
  editor: ph(z.target.selector)
6650
6650
  })).filter((z) => z.editor) : void 0), r.$$.dirty[0] & /*editors*/
@@ -6655,7 +6655,7 @@ function m_(r, t, e) {
6655
6655
  R,
6656
6656
  P,
6657
6657
  E,
6658
- O,
6658
+ B,
6659
6659
  h,
6660
6660
  M,
6661
6661
  T,
@@ -6669,7 +6669,7 @@ function m_(r, t, e) {
6669
6669
  u,
6670
6670
  p,
6671
6671
  f,
6672
- B,
6672
+ L,
6673
6673
  D,
6674
6674
  N,
6675
6675
  $,
@@ -6996,11 +6996,11 @@ const T_ = () => {
6996
6996
  const r = new __(), t = /* @__PURE__ */ new Map(), e = () => [...t.values()], i = () => {
6997
6997
  r.clear(), t.clear();
6998
6998
  }, n = (o) => {
6999
- if (!Os(o)) return;
6999
+ if (!Bs(o)) return;
7000
7000
  const { minX: a, minY: l, maxX: h, maxY: c } = o.selector.geometry.bounds, u = { minX: a, minY: l, maxX: h, maxY: c, target: o };
7001
7001
  r.insert(u), t.set(o.annotation, u);
7002
7002
  }, s = (o) => {
7003
- if (!Os(o)) return;
7003
+ if (!Bs(o)) return;
7004
7004
  const a = t.get(o.annotation);
7005
7005
  a && r.remove(a), t.delete(o.annotation);
7006
7006
  };
@@ -7027,7 +7027,7 @@ const T_ = () => {
7027
7027
  set: (o, a = !0) => {
7028
7028
  a && i();
7029
7029
  const l = o.reduce((h, c) => {
7030
- if (Os(c)) {
7030
+ if (Bs(c)) {
7031
7031
  const { minX: u, minY: d, maxX: p, maxY: f } = c.selector.geometry.bounds;
7032
7032
  return [...h, { minX: u, minY: d, maxX: p, maxY: f, target: c }];
7033
7033
  } else
@@ -7040,7 +7040,7 @@ const T_ = () => {
7040
7040
  s(o), n(a);
7041
7041
  }
7042
7042
  };
7043
- }, Of = (r) => {
7043
+ }, Bf = (r) => {
7044
7044
  const t = Sy(), e = T_(), i = dy(t, r.userSelectAction, r.adapter), n = uy(t), s = My();
7045
7045
  return t.observe(({ changes: o }) => {
7046
7046
  e.set((o.created || []).map((a) => a.target), !1), (o.deleted || []).forEach((a) => e.remove(a.target)), (o.updated || []).forEach(({ oldValue: a, newValue: l }) => e.update(a.target, l.target));
@@ -7063,7 +7063,7 @@ const T_ = () => {
7063
7063
  viewport: s
7064
7064
  };
7065
7065
  }, A_ = (r) => {
7066
- const t = Of(r);
7066
+ const t = Bf(r);
7067
7067
  return {
7068
7068
  ...t,
7069
7069
  store: Cy(t.store)
@@ -7083,10 +7083,10 @@ const T_ = () => {
7083
7083
  i += h;
7084
7084
  }
7085
7085
  return i / 81;
7086
- }, Lf = (r) => {
7086
+ }, Of = (r) => {
7087
7087
  const t = S_(r), e = t > 0.6 ? "dark" : "light";
7088
7088
  return console.log(`[Annotorious] Image brightness: ${t.toFixed(1)}. Setting ${e} theme.`), e;
7089
- }, Rc = (r, t, e) => t.setAttribute("data-theme", e === "auto" ? Lf(r) : e), Bf = (r, t) => ({
7089
+ }, Rc = (r, t, e) => t.setAttribute("data-theme", e === "auto" ? Of(r) : e), Lf = (r, t) => ({
7090
7090
  ...r,
7091
7091
  drawingEnabled: r.drawingEnabled === void 0 ? t.drawingEnabled : r.drawingEnabled,
7092
7092
  drawingMode: r.drawingMode || t.drawingMode,
@@ -7108,7 +7108,7 @@ const T_ = () => {
7108
7108
  }, uC = (r, t = {}) => {
7109
7109
  if (!r)
7110
7110
  throw "Missing argument: image";
7111
- const e = typeof r == "string" ? document.getElementById(r) : r, i = Bf(t, {
7111
+ const e = typeof r == "string" ? document.getElementById(r) : r, i = Lf(t, {
7112
7112
  drawingEnabled: !0,
7113
7113
  drawingMode: "drag",
7114
7114
  userSelectAction: Tf.EDIT,
@@ -7138,7 +7138,7 @@ const T_ = () => {
7138
7138
  const { originalEvent: T, annotation: E } = I.detail;
7139
7139
  E ? s.userSelect(E.id, T) : s.isEmpty() || s.clear();
7140
7140
  });
7141
- const p = Ly(n, a, i.adapter), f = () => d.cancelDrawing(), m = () => {
7141
+ const p = Oy(n, a, i.adapter), f = () => d.cancelDrawing(), m = () => {
7142
7142
  d.$destroy(), h.parentNode.insertBefore(e, h), h.parentNode.removeChild(h), c.destroy(), a.destroy();
7143
7143
  }, _ = () => d.getDrawingTool(), v = () => u, y = () => d.isDrawingEnabled(), g = (I, T, E) => Rf(I, T, E), b = (I, T) => Pf(I, T), C = (I) => {
7144
7144
  if (!Eo(I))
@@ -7253,7 +7253,7 @@ function Hf(r) {
7253
7253
  }
7254
7254
  return -1;
7255
7255
  }
7256
- function Oc(r) {
7256
+ function Bc(r) {
7257
7257
  const t = {};
7258
7258
  for (const e in r) e[0] !== "$" && (t[e] = r[e]);
7259
7259
  return t;
@@ -7342,9 +7342,9 @@ function me(r, t) {
7342
7342
  const e = r.$$.callbacks[t.type];
7343
7343
  e && e.slice().forEach((i) => i.call(this, t));
7344
7344
  }
7345
- const Oi = [], Zs = [];
7345
+ const Bi = [], Zs = [];
7346
7346
  let ji = [];
7347
- const Lc = [], Xf = /* @__PURE__ */ Promise.resolve();
7347
+ const Oc = [], Xf = /* @__PURE__ */ Promise.resolve();
7348
7348
  let ul = !1;
7349
7349
  function Vf() {
7350
7350
  ul || (ul = !0, Xf.then(jf));
@@ -7363,36 +7363,36 @@ function jf() {
7363
7363
  const r = $n;
7364
7364
  do {
7365
7365
  try {
7366
- for (; Ti < Oi.length; ) {
7367
- const t = Oi[Ti];
7368
- Ti++, Rn(t), O_(t.$$);
7366
+ for (; Ti < Bi.length; ) {
7367
+ const t = Bi[Ti];
7368
+ Ti++, Rn(t), B_(t.$$);
7369
7369
  }
7370
7370
  } catch (t) {
7371
- throw Oi.length = 0, Ti = 0, t;
7371
+ throw Bi.length = 0, Ti = 0, t;
7372
7372
  }
7373
- for (Rn(null), Oi.length = 0, Ti = 0; Zs.length; ) Zs.pop()();
7373
+ for (Rn(null), Bi.length = 0, Ti = 0; Zs.length; ) Zs.pop()();
7374
7374
  for (let t = 0; t < ji.length; t += 1) {
7375
7375
  const e = ji[t];
7376
7376
  na.has(e) || (na.add(e), e());
7377
7377
  }
7378
7378
  ji.length = 0;
7379
- } while (Oi.length);
7380
- for (; Lc.length; )
7381
- Lc.pop()();
7379
+ } while (Bi.length);
7380
+ for (; Oc.length; )
7381
+ Oc.pop()();
7382
7382
  ul = !1, na.clear(), Rn(r);
7383
7383
  }
7384
- function O_(r) {
7384
+ function B_(r) {
7385
7385
  if (r.fragment !== null) {
7386
7386
  r.update(), ke(r.before_update);
7387
7387
  const t = r.dirty;
7388
7388
  r.dirty = [-1], r.fragment && r.fragment.p(r.ctx, t), r.after_update.forEach(dl);
7389
7389
  }
7390
7390
  }
7391
- function L_(r) {
7391
+ function O_(r) {
7392
7392
  const t = [], e = [];
7393
7393
  ji.forEach((i) => r.indexOf(i) === -1 ? t.push(i) : e.push(i)), e.forEach((i) => i()), ji = t;
7394
7394
  }
7395
- const Ls = /* @__PURE__ */ new Set();
7395
+ const Os = /* @__PURE__ */ new Set();
7396
7396
  let ni;
7397
7397
  function ae() {
7398
7398
  ni = {
@@ -7406,35 +7406,35 @@ function le() {
7406
7406
  ni.r || ke(ni.c), ni = ni.p;
7407
7407
  }
7408
7408
  function q(r, t) {
7409
- r && r.i && (Ls.delete(r), r.i(t));
7409
+ r && r.i && (Os.delete(r), r.i(t));
7410
7410
  }
7411
7411
  function ot(r, t, e, i) {
7412
7412
  if (r && r.o) {
7413
- if (Ls.has(r)) return;
7414
- Ls.add(r), ni.c.push(() => {
7415
- Ls.delete(r), i && (e && r.d(1), i());
7413
+ if (Os.has(r)) return;
7414
+ Os.add(r), ni.c.push(() => {
7415
+ Os.delete(r), i && (e && r.d(1), i());
7416
7416
  }), r.o(t);
7417
7417
  } else i && i();
7418
7418
  }
7419
7419
  function ve(r) {
7420
7420
  return (r == null ? void 0 : r.length) !== void 0 ? r : Array.from(r);
7421
7421
  }
7422
- function Bt(r) {
7422
+ function Lt(r) {
7423
7423
  r && r.c();
7424
7424
  }
7425
- function Ot(r, t, e) {
7425
+ function Bt(r, t, e) {
7426
7426
  const { fragment: i, after_update: n } = r.$$;
7427
7427
  i && i.m(t, e), dl(() => {
7428
7428
  const s = r.$$.on_mount.map(Ff).filter(Yt);
7429
7429
  r.$$.on_destroy ? r.$$.on_destroy.push(...s) : ke(s), r.$$.on_mount = [];
7430
7430
  }), n.forEach(dl);
7431
7431
  }
7432
- function Lt(r, t) {
7432
+ function Ot(r, t) {
7433
7433
  const e = r.$$;
7434
- e.fragment !== null && (L_(e.after_update), ke(e.on_destroy), e.fragment && e.fragment.d(t), e.on_destroy = e.fragment = null, e.ctx = []);
7434
+ e.fragment !== null && (O_(e.after_update), ke(e.on_destroy), e.fragment && e.fragment.d(t), e.on_destroy = e.fragment = null, e.ctx = []);
7435
7435
  }
7436
- function B_(r, t) {
7437
- r.$$.dirty[0] === -1 && (Oi.push(r), Vf(), r.$$.dirty.fill(0)), r.$$.dirty[t / 31 | 0] |= 1 << t % 31;
7436
+ function L_(r, t) {
7437
+ r.$$.dirty[0] === -1 && (Bi.push(r), Vf(), r.$$.dirty.fill(0)), r.$$.dirty[t / 31 | 0] |= 1 << t % 31;
7438
7438
  }
7439
7439
  function jt(r, t, e, i, n, s, o = null, a = [-1]) {
7440
7440
  const l = $n;
@@ -7464,14 +7464,14 @@ function jt(r, t, e, i, n, s, o = null, a = [-1]) {
7464
7464
  let c = !1;
7465
7465
  if (h.ctx = e ? e(r, t.props || {}, (u, d, ...p) => {
7466
7466
  const f = p.length ? p[0] : d;
7467
- return h.ctx && n(h.ctx[u], h.ctx[u] = f) && (!h.skip_bound && h.bound[u] && h.bound[u](f), c && B_(r, u)), d;
7467
+ return h.ctx && n(h.ctx[u], h.ctx[u] = f) && (!h.skip_bound && h.bound[u] && h.bound[u](f), c && L_(r, u)), d;
7468
7468
  }) : [], h.update(), c = !0, ke(h.before_update), h.fragment = i ? i(h.ctx) : !1, t.target) {
7469
7469
  if (t.hydrate) {
7470
7470
  const u = P_(t.target);
7471
7471
  h.fragment && h.fragment.l(u), u.forEach(nt);
7472
7472
  } else
7473
7473
  h.fragment && h.fragment.c();
7474
- t.intro && q(r.$$.fragment), Ot(r, t.target, t.anchor), jf();
7474
+ t.intro && q(r.$$.fragment), Bt(r, t.target, t.anchor), jf();
7475
7475
  }
7476
7476
  Rn(l);
7477
7477
  }
@@ -7496,7 +7496,7 @@ class Wt {
7496
7496
  }
7497
7497
  /** @returns {void} */
7498
7498
  $destroy() {
7499
- Lt(this, 1), this.$destroy = kt;
7499
+ Ot(this, 1), this.$destroy = kt;
7500
7500
  }
7501
7501
  /**
7502
7502
  * @template {Extract<keyof Events, string>} K
@@ -7654,7 +7654,7 @@ const V_ = {
7654
7654
  }
7655
7655
  return !1;
7656
7656
  }
7657
- }, Bs = (r) => {
7657
+ }, Ls = (r) => {
7658
7658
  const t = r.reduce((e, i) => [...e, ...i.rings[0].points], []);
7659
7659
  return sr(t);
7660
7660
  }, Ai = (r) => r.rings.map((e) => G_(e.points)).join(" "), z_ = (r) => r.polygons.reduce((t, e) => [
@@ -7674,7 +7674,7 @@ const V_ = {
7674
7674
  rings: s,
7675
7675
  bounds: o
7676
7676
  };
7677
- }), i = Bs(e);
7677
+ }), i = Ls(e);
7678
7678
  return {
7679
7679
  ...r,
7680
7680
  geometry: {
@@ -7711,26 +7711,26 @@ const q_ = {
7711
7711
  const t = r.geometry;
7712
7712
  if (!t.closed || t.points.length < 3)
7713
7713
  return 0;
7714
- const e = Bc(t.points, t.closed);
7714
+ const e = Lc(t.points, t.closed);
7715
7715
  return Js(e);
7716
7716
  },
7717
7717
  intersects: (r, t, e, i = 2) => {
7718
7718
  const n = r.geometry;
7719
7719
  if (n.closed) {
7720
- const s = Bc(n.points, n.closed);
7720
+ const s = Lc(n.points, n.closed);
7721
7721
  return Qs(s, t, e);
7722
7722
  } else
7723
7723
  return K_(n, [t, e], i);
7724
7724
  }
7725
- }, Bc = (r, t = !1) => {
7725
+ }, Lc = (r, t = !1) => {
7726
7726
  const e = [];
7727
7727
  for (let i = 0; i < r.length; i++) {
7728
7728
  const n = r[i], s = r[(i + 1) % r.length];
7729
7729
  if (e.push(n.point), (i < r.length - 1 || t) && (n.type === "CURVE" || s.type == "CURVE")) {
7730
7730
  const a = qf(
7731
7731
  n.point,
7732
- n.outHandle || n.point,
7733
- s.inHandle || s.point,
7732
+ n.type === "CURVE" && n.outHandle || n.point,
7733
+ s.type === "CURVE" && s.inHandle || s.point,
7734
7734
  s.point,
7735
7735
  10
7736
7736
  // number of approximation segments
@@ -7749,11 +7749,11 @@ const q_ = {
7749
7749
  }, K_ = (r, t, e) => {
7750
7750
  for (let i = 0; i < r.points.length - 1; i++) {
7751
7751
  const n = r.points[i], s = r.points[i + 1];
7752
- if (n.outHandle || s.inHandle) {
7752
+ if (n.type === "CURVE" || s.type === "CURVE") {
7753
7753
  const a = qf(
7754
7754
  n.point,
7755
- n.outHandle || n.point,
7756
- s.inHandle || s.point,
7755
+ n.type === "CURVE" && n.outHandle || n.point,
7756
+ s.type === "CURVE" && s.inHandle || s.point,
7757
7757
  s.point,
7758
7758
  20
7759
7759
  // TODO make configurable? Based on scale factor? Length?
@@ -8288,11 +8288,11 @@ function cv(r, t, e) {
8288
8288
  me.call(this, r, y);
8289
8289
  }
8290
8290
  return r.$$set = (y) => {
8291
- e(8, t = cl(cl({}, t), Oc(y))), "x" in y && e(0, n = y.x), "y" in y && e(1, s = y.y), "scale" in y && e(2, o = y.scale), "selected" in y && e(3, a = y.selected);
8291
+ e(8, t = cl(cl({}, t), Bc(y))), "x" in y && e(0, n = y.x), "y" in y && e(1, s = y.y), "scale" in y && e(2, o = y.scale), "selected" in y && e(3, a = y.selected);
8292
8292
  }, r.$$.update = () => {
8293
8293
  r.$$.dirty & /*scale*/
8294
8294
  4 && e(5, i = 4 / o);
8295
- }, t = Oc(t), [
8295
+ }, t = Bc(t), [
8296
8296
  n,
8297
8297
  s,
8298
8298
  o,
@@ -8682,10 +8682,10 @@ function Xc(r) {
8682
8682
  )
8683
8683
  ), {
8684
8684
  c() {
8685
- Bt(t.$$.fragment);
8685
+ Lt(t.$$.fragment);
8686
8686
  },
8687
8687
  m(i, n) {
8688
- Ot(t, i, n), e = !0;
8688
+ Bt(t, i, n), e = !0;
8689
8689
  },
8690
8690
  p(i, n) {
8691
8691
  r = i;
@@ -8710,7 +8710,7 @@ function Xc(r) {
8710
8710
  ot(t.$$.fragment, i), e = !1;
8711
8711
  },
8712
8712
  d(i) {
8713
- Lt(t, i);
8713
+ Ot(t, i);
8714
8714
  }
8715
8715
  };
8716
8716
  }
@@ -8744,10 +8744,10 @@ function Vc(r) {
8744
8744
  ).apply(this, arguments);
8745
8745
  }), {
8746
8746
  c() {
8747
- Bt(t.$$.fragment);
8747
+ Lt(t.$$.fragment);
8748
8748
  },
8749
8749
  m(i, n) {
8750
- Ot(t, i, n), e = !0;
8750
+ Bt(t, i, n), e = !0;
8751
8751
  },
8752
8752
  p(i, n) {
8753
8753
  r = i;
@@ -8767,7 +8767,7 @@ function Vc(r) {
8767
8767
  ot(t.$$.fragment, i), e = !1;
8768
8768
  },
8769
8769
  d(i) {
8770
- Lt(t, i);
8770
+ Ot(t, i);
8771
8771
  }
8772
8772
  };
8773
8773
  }
@@ -8961,10 +8961,10 @@ function gv(r) {
8961
8961
  r[22]
8962
8962
  ), {
8963
8963
  c() {
8964
- Bt(t.$$.fragment);
8964
+ Lt(t.$$.fragment);
8965
8965
  },
8966
8966
  m(i, n) {
8967
- Ot(t, i, n), e = !0;
8967
+ Bt(t, i, n), e = !0;
8968
8968
  },
8969
8969
  p(i, n) {
8970
8970
  const s = {};
@@ -8985,7 +8985,7 @@ function gv(r) {
8985
8985
  ot(t.$$.fragment, i), e = !1;
8986
8986
  },
8987
8987
  d(i) {
8988
- Lt(t, i);
8988
+ Ot(t, i);
8989
8989
  }
8990
8990
  };
8991
8991
  }
@@ -8999,8 +8999,8 @@ function bv(r, t, e) {
8999
8999
  e(6, d = void 0);
9000
9000
  return;
9001
9001
  }
9002
- const [S, B] = h.elementToImage(E.offsetX, E.offsetY), D = ($) => Math.pow($[0] - S, 2) + Math.pow($[1] - B, 2), N = i.points.reduce(($, F) => D(F) < D($) ? F : $), H = n.filter(($) => $.visible).reduce(($, F) => D(F.point) < D($.point) ? F : $), O = Math.pow(_v / c, 2);
9003
- D(N) < O || D(H.point) < O ? e(6, d = n.indexOf(H)) : e(6, d = void 0);
9002
+ const [S, L] = h.elementToImage(E.offsetX, E.offsetY), D = ($) => Math.pow($[0] - S, 2) + Math.pow($[1] - L, 2), N = i.points.reduce(($, F) => D(F) < D($) ? F : $), H = n.filter(($) => $.visible).reduce(($, F) => D(F.point) < D($.point) ? F : $), B = Math.pow(_v / c, 2);
9003
+ D(N) < B || D(H.point) < B ? e(6, d = n.indexOf(H)) : e(6, d = void 0);
9004
9004
  }, g = () => {
9005
9005
  document.activeElement !== u && u.focus();
9006
9006
  }, b = () => {
@@ -9009,23 +9009,23 @@ function bv(r, t, e) {
9009
9009
  e(7, p = !0), E.preventDefault(), E.stopPropagation(), f = performance.now();
9010
9010
  }, R = (E) => (S) => {
9011
9011
  if (!f || Ur || performance.now() - f > yv) return;
9012
- const B = m.includes(E);
9013
- S.metaKey || S.ctrlKey || S.shiftKey ? B ? e(8, m = m.filter((D) => D !== E)) : e(8, m = [...m, E]) : B && m.length > 1 ? e(8, m = [E]) : B ? e(8, m = []) : e(8, m = [E]), g();
9014
- }, A = (E, S, B) => {
9012
+ const L = m.includes(E);
9013
+ S.metaKey || S.ctrlKey || S.shiftKey ? L ? e(8, m = m.filter((D) => D !== E)) : e(8, m = [...m, E]) : L && m.length > 1 ? e(8, m = [E]) : L ? e(8, m = []) : e(8, m = [E]), g();
9014
+ }, A = (E, S, L) => {
9015
9015
  g();
9016
9016
  let D;
9017
9017
  const N = E.geometry;
9018
- m.length > 1 ? D = N.points.map(([O, L], $) => m.includes($) ? [O + B[0], L + B[1]] : [O, L]) : S === "SHAPE" ? D = N.points.map(([O, L]) => [O + B[0], L + B[1]]) : D = N.points.map(([O, L], $) => S === `HANDLE-${$}` ? [O + B[0], L + B[1]] : [O, L]);
9018
+ m.length > 1 ? D = N.points.map(([B, O], $) => m.includes($) ? [B + L[0], O + L[1]] : [B, O]) : S === "SHAPE" ? D = N.points.map(([B, O]) => [B + L[0], O + L[1]]) : D = N.points.map(([B, O], $) => S === `HANDLE-${$}` ? [B + L[0], O + L[1]] : [B, O]);
9019
9019
  const H = sr(D);
9020
9020
  return { ...E, geometry: { points: D, bounds: H } };
9021
9021
  }, P = (E) => async (S) => {
9022
9022
  S.stopPropagation();
9023
- const B = [
9023
+ const L = [
9024
9024
  ...i.points.slice(0, E + 1),
9025
9025
  n[E].point,
9026
9026
  ...i.points.slice(E + 1)
9027
- ], D = sr(B);
9028
- o("change", { ...a, geometry: { points: B, bounds: D } }), await zf();
9027
+ ], D = sr(L);
9028
+ o("change", { ...a, geometry: { points: L, bounds: D } }), await zf();
9029
9029
  const N = [...document.querySelectorAll(".a9s-handle")][E + 1];
9030
9030
  if (N != null && N.firstChild) {
9031
9031
  const H = new PointerEvent(
@@ -9045,7 +9045,7 @@ function bv(r, t, e) {
9045
9045
  }
9046
9046
  }, M = () => {
9047
9047
  if (i.points.length - m.length < 3) return;
9048
- const E = i.points.filter((B, D) => !m.includes(D)), S = sr(E);
9048
+ const E = i.points.filter((L, D) => !m.includes(D)), S = sr(E);
9049
9049
  o("change", { ...a, geometry: { points: E, bounds: S } }), e(8, m = []);
9050
9050
  };
9051
9051
  gi(() => {
@@ -9073,8 +9073,8 @@ function bv(r, t, e) {
9073
9073
  r.$$.dirty[0] & /*shape*/
9074
9074
  1 && e(5, i = a.geometry), r.$$.dirty[0] & /*geom, viewportScale*/
9075
9075
  40 && e(10, n = Ur ? [] : i.points.map((E, S) => {
9076
- const B = S === i.points.length - 1 ? i.points[0] : i.points[S + 1], D = (E[0] + B[0]) / 2, N = (E[1] + B[1]) / 2, O = Math.sqrt(Math.pow(B[0] - D, 2) + Math.pow(B[1] - N, 2)) > vv / c;
9077
- return { point: [D, N], visible: O };
9076
+ const L = S === i.points.length - 1 ? i.points[0] : i.points[S + 1], D = (E[0] + L[0]) / 2, N = (E[1] + L[1]) / 2, B = Math.sqrt(Math.pow(L[0] - D, 2) + Math.pow(L[1] - N, 2)) > vv / c;
9077
+ return { point: [D, N], visible: B };
9078
9078
  })), r.$$.dirty[0] & /*geom, viewportScale*/
9079
9079
  40 && e(9, s = bh(i.bounds, Hn / c));
9080
9080
  }, [
@@ -9124,7 +9124,7 @@ class xv extends Wt {
9124
9124
  }
9125
9125
  }
9126
9126
  function wv(r) {
9127
- let t, e, i, n, s, o, a, l, h, c, u, d, p, f, m, _, v, y, g, b, C, R, A, P, M, k, U, I, T, E, S, B, D, N, H, O, L, $, F, X, V, dt, pt, z, bt, rt, ft, _t, It, Dt, ie, Gt, Q, Oe, fn;
9127
+ let t, e, i, n, s, o, a, l, h, c, u, d, p, f, m, _, v, y, g, b, C, R, A, P, M, k, U, I, T, E, S, L, D, N, H, B, O, $, F, X, V, dt, pt, z, bt, rt, ft, _t, It, Dt, ie, Gt, Q, Be, fn;
9128
9128
  return rt = new Hi({
9129
9129
  props: {
9130
9130
  class: "a9s-corner-handle-topleft",
@@ -9215,7 +9215,7 @@ function wv(r) {
9215
9215
  ) && r[12]("BOTTOM_LEFT").apply(this, arguments);
9216
9216
  }), {
9217
9217
  c() {
9218
- t = et("defs"), e = et("mask"), i = et("rect"), l = et("rect"), p = xe(), f = et("rect"), g = xe(), b = et("rect"), M = xe(), k = et("rect"), E = xe(), S = et("rect"), H = xe(), O = et("rect"), X = xe(), V = et("rect"), bt = xe(), Bt(rt.$$.fragment), ft = xe(), Bt(_t.$$.fragment), It = xe(), Bt(Dt.$$.fragment), ie = xe(), Bt(Gt.$$.fragment), w(i, "class", "rect-mask-bg svelte-1njczvj"), w(i, "x", n = /*mask*/
9218
+ t = et("defs"), e = et("mask"), i = et("rect"), l = et("rect"), p = xe(), f = et("rect"), g = xe(), b = et("rect"), M = xe(), k = et("rect"), E = xe(), S = et("rect"), H = xe(), B = et("rect"), X = xe(), V = et("rect"), bt = xe(), Lt(rt.$$.fragment), ft = xe(), Lt(_t.$$.fragment), It = xe(), Lt(Dt.$$.fragment), ie = xe(), Lt(Gt.$$.fragment), w(i, "class", "rect-mask-bg svelte-1njczvj"), w(i, "x", n = /*mask*/
9219
9219
  r[6].x), w(i, "y", s = /*mask*/
9220
9220
  r[6].y), w(i, "width", o = /*mask*/
9221
9221
  r[6].w), w(i, "height", a = /*mask*/
@@ -9245,21 +9245,21 @@ function wv(r) {
9245
9245
  r[5].h), w(k, "class", "a9s-edge-handle a9s-edge-handle-top"), w(k, "x", U = /*geom*/
9246
9246
  r[5].x), w(k, "y", I = /*geom*/
9247
9247
  r[5].y), w(k, "height", 1), w(k, "width", T = /*geom*/
9248
- r[5].w), w(S, "class", "a9s-edge-handle a9s-edge-handle-right"), w(S, "x", B = /*geom*/
9248
+ r[5].w), w(S, "class", "a9s-edge-handle a9s-edge-handle-right"), w(S, "x", L = /*geom*/
9249
9249
  r[5].x + /*geom*/
9250
9250
  r[5].w), w(S, "y", D = /*geom*/
9251
9251
  r[5].y), w(S, "height", N = /*geom*/
9252
- r[5].h), w(S, "width", 1), w(O, "class", "a9s-edge-handle a9s-edge-handle-bottom"), w(O, "x", L = /*geom*/
9253
- r[5].x), w(O, "y", $ = /*geom*/
9252
+ r[5].h), w(S, "width", 1), w(B, "class", "a9s-edge-handle a9s-edge-handle-bottom"), w(B, "x", O = /*geom*/
9253
+ r[5].x), w(B, "y", $ = /*geom*/
9254
9254
  r[5].y + /*geom*/
9255
- r[5].h), w(O, "height", 1), w(O, "width", F = /*geom*/
9255
+ r[5].h), w(B, "height", 1), w(B, "width", F = /*geom*/
9256
9256
  r[5].w), w(V, "class", "a9s-edge-handle a9s-edge-handle-left"), w(V, "x", dt = /*geom*/
9257
9257
  r[5].x), w(V, "y", pt = /*geom*/
9258
9258
  r[5].y), w(V, "height", z = /*geom*/
9259
9259
  r[5].h), w(V, "width", 1);
9260
9260
  },
9261
9261
  m(Y, G) {
9262
- st(Y, t, G), At(t, e), At(e, i), At(e, l), st(Y, p, G), st(Y, f, G), st(Y, g, G), st(Y, b, G), st(Y, M, G), st(Y, k, G), st(Y, E, G), st(Y, S, G), st(Y, H, G), st(Y, O, G), st(Y, X, G), st(Y, V, G), st(Y, bt, G), Ot(rt, Y, G), st(Y, ft, G), Ot(_t, Y, G), st(Y, It, G), Ot(Dt, Y, G), st(Y, ie, G), Ot(Gt, Y, G), Q = !0, Oe || (fn = [
9262
+ st(Y, t, G), At(t, e), At(e, i), At(e, l), st(Y, p, G), st(Y, f, G), st(Y, g, G), st(Y, b, G), st(Y, M, G), st(Y, k, G), st(Y, E, G), st(Y, S, G), st(Y, H, G), st(Y, B, G), st(Y, X, G), st(Y, V, G), st(Y, bt, G), Bt(rt, Y, G), st(Y, ft, G), Bt(_t, Y, G), st(Y, It, G), Bt(Dt, Y, G), st(Y, ie, G), Bt(Gt, Y, G), Q = !0, Be || (fn = [
9263
9263
  Rt(f, "pointerdown", function() {
9264
9264
  Yt(
9265
9265
  /*grab*/
@@ -9284,7 +9284,7 @@ function wv(r) {
9284
9284
  r[12]("RIGHT")
9285
9285
  ) && r[12]("RIGHT").apply(this, arguments);
9286
9286
  }),
9287
- Rt(O, "pointerdown", function() {
9287
+ Rt(B, "pointerdown", function() {
9288
9288
  Yt(
9289
9289
  /*grab*/
9290
9290
  r[12]("BOTTOM")
@@ -9296,7 +9296,7 @@ function wv(r) {
9296
9296
  r[12]("LEFT")
9297
9297
  ) && r[12]("LEFT").apply(this, arguments);
9298
9298
  })
9299
- ], Oe = !0);
9299
+ ], Be = !0);
9300
9300
  },
9301
9301
  p(Y, G) {
9302
9302
  r = Y, (!Q || G & /*mask*/
@@ -9344,20 +9344,20 @@ function wv(r) {
9344
9344
  r[5].y)) && w(k, "y", I), (!Q || G & /*geom*/
9345
9345
  32 && T !== (T = /*geom*/
9346
9346
  r[5].w)) && w(k, "width", T), (!Q || G & /*geom*/
9347
- 32 && B !== (B = /*geom*/
9347
+ 32 && L !== (L = /*geom*/
9348
9348
  r[5].x + /*geom*/
9349
- r[5].w)) && w(S, "x", B), (!Q || G & /*geom*/
9349
+ r[5].w)) && w(S, "x", L), (!Q || G & /*geom*/
9350
9350
  32 && D !== (D = /*geom*/
9351
9351
  r[5].y)) && w(S, "y", D), (!Q || G & /*geom*/
9352
9352
  32 && N !== (N = /*geom*/
9353
9353
  r[5].h)) && w(S, "height", N), (!Q || G & /*geom*/
9354
- 32 && L !== (L = /*geom*/
9355
- r[5].x)) && w(O, "x", L), (!Q || G & /*geom*/
9354
+ 32 && O !== (O = /*geom*/
9355
+ r[5].x)) && w(B, "x", O), (!Q || G & /*geom*/
9356
9356
  32 && $ !== ($ = /*geom*/
9357
9357
  r[5].y + /*geom*/
9358
- r[5].h)) && w(O, "y", $), (!Q || G & /*geom*/
9358
+ r[5].h)) && w(B, "y", $), (!Q || G & /*geom*/
9359
9359
  32 && F !== (F = /*geom*/
9360
- r[5].w)) && w(O, "width", F), (!Q || G & /*geom*/
9360
+ r[5].w)) && w(B, "width", F), (!Q || G & /*geom*/
9361
9361
  32 && dt !== (dt = /*geom*/
9362
9362
  r[5].x)) && w(V, "x", dt), (!Q || G & /*geom*/
9363
9363
  32 && pt !== (pt = /*geom*/
@@ -9408,7 +9408,7 @@ function wv(r) {
9408
9408
  ot(rt.$$.fragment, Y), ot(_t.$$.fragment, Y), ot(Dt.$$.fragment, Y), ot(Gt.$$.fragment, Y), Q = !1;
9409
9409
  },
9410
9410
  d(Y) {
9411
- Y && (nt(t), nt(p), nt(f), nt(g), nt(b), nt(M), nt(k), nt(E), nt(S), nt(H), nt(O), nt(X), nt(V), nt(bt), nt(ft), nt(It), nt(ie)), Lt(rt, Y), Lt(_t, Y), Lt(Dt, Y), Lt(Gt, Y), Oe = !1, ke(fn);
9411
+ Y && (nt(t), nt(p), nt(f), nt(g), nt(b), nt(M), nt(k), nt(E), nt(S), nt(H), nt(B), nt(X), nt(V), nt(bt), nt(ft), nt(It), nt(ie)), Ot(rt, Y), Ot(_t, Y), Ot(Dt, Y), Ot(Gt, Y), Be = !1, ke(fn);
9412
9412
  }
9413
9413
  };
9414
9414
  }
@@ -9455,10 +9455,10 @@ function Ev(r) {
9455
9455
  r[11]
9456
9456
  ), {
9457
9457
  c() {
9458
- Bt(t.$$.fragment);
9458
+ Lt(t.$$.fragment);
9459
9459
  },
9460
9460
  m(i, n) {
9461
- Ot(t, i, n), e = !0;
9461
+ Bt(t, i, n), e = !0;
9462
9462
  },
9463
9463
  p(i, [n]) {
9464
9464
  const s = {};
@@ -9478,7 +9478,7 @@ function Ev(r) {
9478
9478
  ot(t.$$.fragment, i), e = !1;
9479
9479
  },
9480
9480
  d(i) {
9481
- Lt(t, i);
9481
+ Ot(t, i);
9482
9482
  }
9483
9483
  };
9484
9484
  }
@@ -9791,10 +9791,10 @@ function tu(r) {
9791
9791
  )
9792
9792
  ), {
9793
9793
  c() {
9794
- Bt(t.$$.fragment);
9794
+ Lt(t.$$.fragment);
9795
9795
  },
9796
9796
  m(n, s) {
9797
- Ot(t, n, s), e = !0;
9797
+ Bt(t, n, s), e = !0;
9798
9798
  },
9799
9799
  p(n, s) {
9800
9800
  r = n;
@@ -9816,7 +9816,7 @@ function tu(r) {
9816
9816
  ot(t.$$.fragment, n), e = !1;
9817
9817
  },
9818
9818
  d(n) {
9819
- Lt(t, n);
9819
+ Ot(t, n);
9820
9820
  }
9821
9821
  };
9822
9822
  }
@@ -10051,10 +10051,10 @@ function iu(r) {
10051
10051
  ).apply(this, arguments);
10052
10052
  }), {
10053
10053
  c() {
10054
- Bt(t.$$.fragment);
10054
+ Lt(t.$$.fragment);
10055
10055
  },
10056
10056
  m(i, n) {
10057
- Ot(t, i, n), e = !0;
10057
+ Bt(t, i, n), e = !0;
10058
10058
  },
10059
10059
  p(i, n) {
10060
10060
  r = i;
@@ -10074,7 +10074,7 @@ function iu(r) {
10074
10074
  ot(t.$$.fragment, i), e = !1;
10075
10075
  },
10076
10076
  d(i) {
10077
- Lt(t, i);
10077
+ Ot(t, i);
10078
10078
  }
10079
10079
  };
10080
10080
  }
@@ -10188,10 +10188,10 @@ function Pv(r) {
10188
10188
  r[22]
10189
10189
  ), {
10190
10190
  c() {
10191
- Bt(t.$$.fragment);
10191
+ Lt(t.$$.fragment);
10192
10192
  },
10193
10193
  m(i, n) {
10194
- Ot(t, i, n), e = !0;
10194
+ Bt(t, i, n), e = !0;
10195
10195
  },
10196
10196
  p(i, n) {
10197
10197
  const s = {};
@@ -10212,7 +10212,7 @@ function Pv(r) {
10212
10212
  ot(t.$$.fragment, i), e = !1;
10213
10213
  },
10214
10214
  d(i) {
10215
- Lt(t, i);
10215
+ Ot(t, i);
10216
10216
  }
10217
10217
  };
10218
10218
  }
@@ -10226,31 +10226,31 @@ function Dv(r, t, e) {
10226
10226
  e(6, d = void 0);
10227
10227
  return;
10228
10228
  }
10229
- const [B, D] = h.elementToImage(S.offsetX, S.offsetY), N = (F) => Math.pow(F[0] - B, 2) + Math.pow(F[1] - D, 2), H = z_(i).reduce((F, X) => N(X) < N(F) ? X : F), O = n.filter((F) => F.visible).reduce((F, X) => N(X.point) < N(F.point) ? X : F), L = Math.pow(Mv / c, 2);
10230
- N(H) < L || N(O.point) < L ? e(6, d = n.indexOf(O)) : e(6, d = void 0);
10229
+ const [L, D] = h.elementToImage(S.offsetX, S.offsetY), N = (F) => Math.pow(F[0] - L, 2) + Math.pow(F[1] - D, 2), H = z_(i).reduce((F, X) => N(X) < N(F) ? X : F), B = n.filter((F) => F.visible).reduce((F, X) => N(X.point) < N(F.point) ? X : F), O = Math.pow(Mv / c, 2);
10230
+ N(H) < O || N(B.point) < O ? e(6, d = n.indexOf(B)) : e(6, d = void 0);
10231
10231
  }, g = () => {
10232
10232
  document.activeElement !== u && u.focus();
10233
10233
  }, b = () => {
10234
10234
  e(8, m = []), g();
10235
10235
  }, C = (S) => {
10236
10236
  e(7, p = !0), S.preventDefault(), S.stopPropagation(), f = performance.now();
10237
- }, R = (S, B, D) => (N) => {
10237
+ }, R = (S, L, D) => (N) => {
10238
10238
  if (!f || Ur || performance.now() - f > Rv) return;
10239
- const H = (L) => L.polygon === S && L.ring === B && L.point === D, O = m.some(H);
10240
- N.metaKey || N.ctrlKey || N.shiftKey ? O ? e(8, m = m.filter((L) => !H(L))) : e(8, m = [...m, { polygon: S, ring: B, point: D }]) : O && m.length > 1 ? e(8, m = [{ polygon: S, ring: B, point: D }]) : O ? e(8, m = []) : e(8, m = [{ polygon: S, ring: B, point: D }]), g();
10241
- }, A = (S, B, D) => {
10239
+ const H = (O) => O.polygon === S && O.ring === L && O.point === D, B = m.some(H);
10240
+ N.metaKey || N.ctrlKey || N.shiftKey ? B ? e(8, m = m.filter((O) => !H(O))) : e(8, m = [...m, { polygon: S, ring: L, point: D }]) : B && m.length > 1 ? e(8, m = [{ polygon: S, ring: L, point: D }]) : B ? e(8, m = []) : e(8, m = [{ polygon: S, ring: L, point: D }]), g();
10241
+ }, A = (S, L, D) => {
10242
10242
  g();
10243
10243
  const N = S.geometry.polygons;
10244
10244
  let H;
10245
- if (B === "SHAPE")
10246
- H = N.map((O) => {
10247
- const L = O.rings.map((F, X) => ({ points: F.points.map((dt, pt) => [dt[0] + D[0], dt[1] + D[1]]) })), $ = sr(L[0].points);
10248
- return { rings: L, bounds: $ };
10245
+ if (L === "SHAPE")
10246
+ H = N.map((B) => {
10247
+ const O = B.rings.map((F, X) => ({ points: F.points.map((dt, pt) => [dt[0] + D[0], dt[1] + D[1]]) })), $ = sr(O[0].points);
10248
+ return { rings: O, bounds: $ };
10249
10249
  });
10250
10250
  else {
10251
- const [O, L, $, F] = B.split("-").map((X) => parseInt(X));
10251
+ const [B, O, $, F] = L.split("-").map((X) => parseInt(X));
10252
10252
  H = N.map((X, V) => {
10253
- if (V === L) {
10253
+ if (V === O) {
10254
10254
  const dt = X.rings.map((z, bt) => bt === $ ? { points: z.points.map((ft, _t) => _t === F ? [ft[0] + D[0], ft[1] + D[1]] : ft) } : z), pt = sr(dt[0].points);
10255
10255
  return { rings: dt, bounds: pt };
10256
10256
  } else
@@ -10261,54 +10261,54 @@ function Dv(r, t, e) {
10261
10261
  ...S,
10262
10262
  geometry: {
10263
10263
  polygons: H,
10264
- bounds: Bs(H)
10264
+ bounds: Ls(H)
10265
10265
  }
10266
10266
  };
10267
- }, P = (S) => async (B) => {
10268
- B.stopPropagation();
10269
- const D = n[S], N = i.polygons.map((O, L) => {
10270
- if (L === D.elementIdx) {
10271
- const $ = O.rings.map((X, V) => V === D.ringIdx ? { points: [
10267
+ }, P = (S) => async (L) => {
10268
+ L.stopPropagation();
10269
+ const D = n[S], N = i.polygons.map((B, O) => {
10270
+ if (O === D.elementIdx) {
10271
+ const $ = B.rings.map((X, V) => V === D.ringIdx ? { points: [
10272
10272
  ...X.points.slice(0, D.pointIdx + 1),
10273
10273
  D.point,
10274
10274
  ...X.points.slice(D.pointIdx + 1)
10275
10275
  ] } : X), F = sr($[0].points);
10276
10276
  return { rings: $, bounds: F };
10277
10277
  } else
10278
- return O;
10278
+ return B;
10279
10279
  });
10280
10280
  o("change", {
10281
10281
  ...a,
10282
10282
  geometry: {
10283
10283
  polygons: N,
10284
- bounds: Bs(N)
10284
+ bounds: Ls(N)
10285
10285
  }
10286
10286
  }), await zf();
10287
10287
  const H = [...document.querySelectorAll(".a9s-handle")][S + 1];
10288
10288
  if (H != null && H.firstChild) {
10289
- const O = new PointerEvent(
10289
+ const B = new PointerEvent(
10290
10290
  "pointerdown",
10291
10291
  {
10292
10292
  bubbles: !0,
10293
10293
  cancelable: !0,
10294
- clientX: B.clientX,
10295
- clientY: B.clientY,
10296
- pointerId: B.pointerId,
10297
- pointerType: B.pointerType,
10298
- isPrimary: B.isPrimary,
10299
- buttons: B.buttons
10294
+ clientX: L.clientX,
10295
+ clientY: L.clientY,
10296
+ pointerId: L.pointerId,
10297
+ pointerType: L.pointerType,
10298
+ isPrimary: L.isPrimary,
10299
+ buttons: L.buttons
10300
10300
  }
10301
10301
  );
10302
- H.firstChild.dispatchEvent(O);
10302
+ H.firstChild.dispatchEvent(B);
10303
10303
  }
10304
10304
  }, M = () => {
10305
10305
  const S = i.polygons.map((D, N) => {
10306
- if (m.some((O) => O.polygon === N)) {
10307
- const O = D.rings.map(($, F) => {
10306
+ if (m.some((B) => B.polygon === N)) {
10307
+ const B = D.rings.map(($, F) => {
10308
10308
  const X = m.filter((V) => V.polygon === N && V.ring === F);
10309
10309
  return X.length && $.points.length - X.length >= 3 ? { points: $.points.filter((dt, pt) => !X.some((z) => z.point === pt)) } : $;
10310
- }), L = sr(O[0].points);
10311
- return { rings: O, bounds: L };
10310
+ }), O = sr(B[0].points);
10311
+ return { rings: B, bounds: O };
10312
10312
  } else
10313
10313
  return D;
10314
10314
  });
@@ -10316,20 +10316,20 @@ function Dv(r, t, e) {
10316
10316
  ...a,
10317
10317
  geometry: {
10318
10318
  polygons: S,
10319
- bounds: Bs(S)
10319
+ bounds: Ls(S)
10320
10320
  }
10321
10321
  }), e(8, m = []));
10322
10322
  };
10323
10323
  gi(() => {
10324
10324
  if (Ur) return;
10325
- const S = (B) => {
10326
- (B.key === "Delete" || B.key === "Backspace") && (B.preventDefault(), M());
10325
+ const S = (L) => {
10326
+ (L.key === "Delete" || L.key === "Backspace") && (L.preventDefault(), M());
10327
10327
  };
10328
10328
  return u.addEventListener("pointermove", y), u.addEventListener("keydown", S), () => {
10329
10329
  u.removeEventListener("pointermove", y), u.removeEventListener("keydown", S);
10330
10330
  };
10331
10331
  });
10332
- const k = `polygon-mask-${Math.random().toString(36).substring(2, 12)}`, U = (S, B, D, { polygon: N, ring: H, point: O }) => N === S && H === B && O === D;
10332
+ const k = `polygon-mask-${Math.random().toString(36).substring(2, 12)}`, U = (S, L, D, { polygon: N, ring: H, point: B }) => N === S && H === L && B === D;
10333
10333
  function I(S) {
10334
10334
  me.call(this, r, S);
10335
10335
  }
@@ -10372,7 +10372,7 @@ function Dv(r, t, e) {
10372
10372
  E
10373
10373
  ];
10374
10374
  }
10375
- class Ov extends Wt {
10375
+ class Bv extends Wt {
10376
10376
  constructor(t) {
10377
10377
  super(), jt(
10378
10378
  this,
@@ -10393,7 +10393,7 @@ class Ov extends Wt {
10393
10393
  }
10394
10394
  }
10395
10395
  ar.RECTANGLE, ar.POLYGON, ar.MULTIPOLYGON;
10396
- function Lv(r, t, e) {
10396
+ function Ov(r, t, e) {
10397
10397
  let i;
10398
10398
  const n = an();
10399
10399
  let { annotation: s } = t, { editor: o } = t, { style: a } = t, { target: l } = t, { transform: h } = t, { viewportScale: c } = t, u;
@@ -10430,9 +10430,9 @@ function Lv(r, t, e) {
10430
10430
  i
10431
10431
  ];
10432
10432
  }
10433
- class Bv extends Wt {
10433
+ class Lv extends Wt {
10434
10434
  constructor(t) {
10435
- super(), jt(this, t, Lv, null, Ut, {
10435
+ super(), jt(this, t, Ov, null, Ut, {
10436
10436
  annotation: 0,
10437
10437
  editor: 1,
10438
10438
  style: 2,
@@ -10947,81 +10947,81 @@ to.exports;
10947
10947
  "not-basic": "Illegal input >= 0x80 (not a basic code point)",
10948
10948
  "invalid-input": "Invalid input"
10949
10949
  }, b = l - h, C = Math.floor, R = String.fromCharCode, A;
10950
- function P(O) {
10951
- throw new RangeError(g[O]);
10950
+ function P(B) {
10951
+ throw new RangeError(g[B]);
10952
10952
  }
10953
- function M(O, L) {
10954
- for (var $ = O.length, F = []; $--; )
10955
- F[$] = L(O[$]);
10953
+ function M(B, O) {
10954
+ for (var $ = B.length, F = []; $--; )
10955
+ F[$] = O(B[$]);
10956
10956
  return F;
10957
10957
  }
10958
- function k(O, L) {
10959
- var $ = O.split("@"), F = "";
10960
- $.length > 1 && (F = $[0] + "@", O = $[1]), O = O.replace(y, ".");
10961
- var X = O.split("."), V = M(X, L).join(".");
10958
+ function k(B, O) {
10959
+ var $ = B.split("@"), F = "";
10960
+ $.length > 1 && (F = $[0] + "@", B = $[1]), B = B.replace(y, ".");
10961
+ var X = B.split("."), V = M(X, O).join(".");
10962
10962
  return F + V;
10963
10963
  }
10964
- function U(O) {
10965
- for (var L = [], $ = 0, F = O.length, X, V; $ < F; )
10966
- X = O.charCodeAt($++), X >= 55296 && X <= 56319 && $ < F ? (V = O.charCodeAt($++), (V & 64512) == 56320 ? L.push(((X & 1023) << 10) + (V & 1023) + 65536) : (L.push(X), $--)) : L.push(X);
10967
- return L;
10964
+ function U(B) {
10965
+ for (var O = [], $ = 0, F = B.length, X, V; $ < F; )
10966
+ X = B.charCodeAt($++), X >= 55296 && X <= 56319 && $ < F ? (V = B.charCodeAt($++), (V & 64512) == 56320 ? O.push(((X & 1023) << 10) + (V & 1023) + 65536) : (O.push(X), $--)) : O.push(X);
10967
+ return O;
10968
10968
  }
10969
- function I(O) {
10970
- return M(O, function(L) {
10969
+ function I(B) {
10970
+ return M(B, function(O) {
10971
10971
  var $ = "";
10972
- return L > 65535 && (L -= 65536, $ += R(L >>> 10 & 1023 | 55296), L = 56320 | L & 1023), $ += R(L), $;
10972
+ return O > 65535 && (O -= 65536, $ += R(O >>> 10 & 1023 | 55296), O = 56320 | O & 1023), $ += R(O), $;
10973
10973
  }).join("");
10974
10974
  }
10975
- function T(O) {
10976
- return O - 48 < 10 ? O - 22 : O - 65 < 26 ? O - 65 : O - 97 < 26 ? O - 97 : l;
10975
+ function T(B) {
10976
+ return B - 48 < 10 ? B - 22 : B - 65 < 26 ? B - 65 : B - 97 < 26 ? B - 97 : l;
10977
10977
  }
10978
- function E(O, L) {
10979
- return O + 22 + 75 * (O < 26) - ((L != 0) << 5);
10978
+ function E(B, O) {
10979
+ return B + 22 + 75 * (B < 26) - ((O != 0) << 5);
10980
10980
  }
10981
- function S(O, L, $) {
10981
+ function S(B, O, $) {
10982
10982
  var F = 0;
10983
- for (O = $ ? C(O / d) : O >> 1, O += C(O / L); O > b * c >> 1; F += l)
10984
- O = C(O / b);
10985
- return C(F + (b + 1) * O / (O + u));
10986
- }
10987
- function B(O) {
10988
- var L = [], $ = O.length, F, X = 0, V = f, dt = p, pt, z, bt, rt, ft, _t, It, Dt, ie;
10989
- for (pt = O.lastIndexOf(m), pt < 0 && (pt = 0), z = 0; z < pt; ++z)
10990
- O.charCodeAt(z) >= 128 && P("not-basic"), L.push(O.charCodeAt(z));
10983
+ for (B = $ ? C(B / d) : B >> 1, B += C(B / O); B > b * c >> 1; F += l)
10984
+ B = C(B / b);
10985
+ return C(F + (b + 1) * B / (B + u));
10986
+ }
10987
+ function L(B) {
10988
+ var O = [], $ = B.length, F, X = 0, V = f, dt = p, pt, z, bt, rt, ft, _t, It, Dt, ie;
10989
+ for (pt = B.lastIndexOf(m), pt < 0 && (pt = 0), z = 0; z < pt; ++z)
10990
+ B.charCodeAt(z) >= 128 && P("not-basic"), O.push(B.charCodeAt(z));
10991
10991
  for (bt = pt > 0 ? pt + 1 : 0; bt < $; ) {
10992
- for (rt = X, ft = 1, _t = l; bt >= $ && P("invalid-input"), It = T(O.charCodeAt(bt++)), (It >= l || It > C((a - X) / ft)) && P("overflow"), X += It * ft, Dt = _t <= dt ? h : _t >= dt + c ? c : _t - dt, !(It < Dt); _t += l)
10992
+ for (rt = X, ft = 1, _t = l; bt >= $ && P("invalid-input"), It = T(B.charCodeAt(bt++)), (It >= l || It > C((a - X) / ft)) && P("overflow"), X += It * ft, Dt = _t <= dt ? h : _t >= dt + c ? c : _t - dt, !(It < Dt); _t += l)
10993
10993
  ie = l - Dt, ft > C(a / ie) && P("overflow"), ft *= ie;
10994
- F = L.length + 1, dt = S(X - rt, F, rt == 0), C(X / F) > a - V && P("overflow"), V += C(X / F), X %= F, L.splice(X++, 0, V);
10994
+ F = O.length + 1, dt = S(X - rt, F, rt == 0), C(X / F) > a - V && P("overflow"), V += C(X / F), X %= F, O.splice(X++, 0, V);
10995
10995
  }
10996
- return I(L);
10996
+ return I(O);
10997
10997
  }
10998
- function D(O) {
10999
- var L, $, F, X, V, dt, pt, z, bt, rt, ft, _t = [], It, Dt, ie, Gt;
11000
- for (O = U(O), It = O.length, L = f, $ = 0, V = p, dt = 0; dt < It; ++dt)
11001
- ft = O[dt], ft < 128 && _t.push(R(ft));
10998
+ function D(B) {
10999
+ var O, $, F, X, V, dt, pt, z, bt, rt, ft, _t = [], It, Dt, ie, Gt;
11000
+ for (B = U(B), It = B.length, O = f, $ = 0, V = p, dt = 0; dt < It; ++dt)
11001
+ ft = B[dt], ft < 128 && _t.push(R(ft));
11002
11002
  for (F = X = _t.length, X && _t.push(m); F < It; ) {
11003
11003
  for (pt = a, dt = 0; dt < It; ++dt)
11004
- ft = O[dt], ft >= L && ft < pt && (pt = ft);
11005
- for (Dt = F + 1, pt - L > C((a - $) / Dt) && P("overflow"), $ += (pt - L) * Dt, L = pt, dt = 0; dt < It; ++dt)
11006
- if (ft = O[dt], ft < L && ++$ > a && P("overflow"), ft == L) {
11004
+ ft = B[dt], ft >= O && ft < pt && (pt = ft);
11005
+ for (Dt = F + 1, pt - O > C((a - $) / Dt) && P("overflow"), $ += (pt - O) * Dt, O = pt, dt = 0; dt < It; ++dt)
11006
+ if (ft = B[dt], ft < O && ++$ > a && P("overflow"), ft == O) {
11007
11007
  for (z = $, bt = l; rt = bt <= V ? h : bt >= V + c ? c : bt - V, !(z < rt); bt += l)
11008
11008
  Gt = z - rt, ie = l - rt, _t.push(
11009
11009
  R(E(rt + Gt % ie, 0))
11010
11010
  ), z = C(Gt / ie);
11011
11011
  _t.push(R(E(z, 0))), V = S($, Dt, F == X), $ = 0, ++F;
11012
11012
  }
11013
- ++$, ++L;
11013
+ ++$, ++O;
11014
11014
  }
11015
11015
  return _t.join("");
11016
11016
  }
11017
- function N(O) {
11018
- return k(O, function(L) {
11019
- return _.test(L) ? B(L.slice(4).toLowerCase()) : L;
11017
+ function N(B) {
11018
+ return k(B, function(O) {
11019
+ return _.test(O) ? L(O.slice(4).toLowerCase()) : O;
11020
11020
  });
11021
11021
  }
11022
- function H(O) {
11023
- return k(O, function(L) {
11024
- return v.test(L) ? "xn--" + D(L) : L;
11022
+ function H(B) {
11023
+ return k(B, function(O) {
11024
+ return v.test(O) ? "xn--" + D(O) : O;
11025
11025
  });
11026
11026
  }
11027
11027
  if (o = {
@@ -11042,7 +11042,7 @@ to.exports;
11042
11042
  decode: U,
11043
11043
  encode: I
11044
11044
  },
11045
- decode: B,
11045
+ decode: L,
11046
11046
  encode: D,
11047
11047
  toASCII: H,
11048
11048
  toUnicode: N
@@ -11061,7 +11061,7 @@ const n1 = {}, s1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
11061
11061
  __proto__: null,
11062
11062
  default: n1
11063
11063
  }, Symbol.toStringTag, { value: "Module" })), o1 = /* @__PURE__ */ F_(s1);
11064
- var Th = typeof Map == "function" && Map.prototype, pa = Object.getOwnPropertyDescriptor && Th ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, eo = Th && pa && typeof pa.get == "function" ? pa.get : null, yu = Th && Map.prototype.forEach, Ah = typeof Set == "function" && Set.prototype, ma = Object.getOwnPropertyDescriptor && Ah ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, ro = Ah && ma && typeof ma.get == "function" ? ma.get : null, _u = Ah && Set.prototype.forEach, a1 = typeof WeakMap == "function" && WeakMap.prototype, Dn = a1 ? WeakMap.prototype.has : null, l1 = typeof WeakSet == "function" && WeakSet.prototype, On = l1 ? WeakSet.prototype.has : null, h1 = typeof WeakRef == "function" && WeakRef.prototype, vu = h1 ? WeakRef.prototype.deref : null, c1 = Boolean.prototype.valueOf, u1 = Object.prototype.toString, d1 = Function.prototype.toString, f1 = String.prototype.match, Sh = String.prototype.slice, Br = String.prototype.replace, p1 = String.prototype.toUpperCase, bu = String.prototype.toLowerCase, rp = RegExp.prototype.test, xu = Array.prototype.concat, nr = Array.prototype.join, m1 = Array.prototype.slice, wu = Math.floor, _l = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, ga = Object.getOwnPropertySymbols, vl = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, rn = typeof Symbol == "function" && typeof Symbol.iterator == "object", Ln = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === rn || !0) ? Symbol.toStringTag : null, ip = Object.prototype.propertyIsEnumerable, Eu = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(r) {
11064
+ var Th = typeof Map == "function" && Map.prototype, pa = Object.getOwnPropertyDescriptor && Th ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, eo = Th && pa && typeof pa.get == "function" ? pa.get : null, yu = Th && Map.prototype.forEach, Ah = typeof Set == "function" && Set.prototype, ma = Object.getOwnPropertyDescriptor && Ah ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, ro = Ah && ma && typeof ma.get == "function" ? ma.get : null, _u = Ah && Set.prototype.forEach, a1 = typeof WeakMap == "function" && WeakMap.prototype, Dn = a1 ? WeakMap.prototype.has : null, l1 = typeof WeakSet == "function" && WeakSet.prototype, Bn = l1 ? WeakSet.prototype.has : null, h1 = typeof WeakRef == "function" && WeakRef.prototype, vu = h1 ? WeakRef.prototype.deref : null, c1 = Boolean.prototype.valueOf, u1 = Object.prototype.toString, d1 = Function.prototype.toString, f1 = String.prototype.match, Sh = String.prototype.slice, Lr = String.prototype.replace, p1 = String.prototype.toUpperCase, bu = String.prototype.toLowerCase, rp = RegExp.prototype.test, xu = Array.prototype.concat, nr = Array.prototype.join, m1 = Array.prototype.slice, wu = Math.floor, _l = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, ga = Object.getOwnPropertySymbols, vl = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, rn = typeof Symbol == "function" && typeof Symbol.iterator == "object", On = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === rn || !0) ? Symbol.toStringTag : null, ip = Object.prototype.propertyIsEnumerable, Eu = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(r) {
11065
11065
  return r.__proto__;
11066
11066
  } : null);
11067
11067
  function Tu(r, t) {
@@ -11072,10 +11072,10 @@ function Tu(r, t) {
11072
11072
  var i = r < 0 ? -wu(-r) : wu(r);
11073
11073
  if (i !== r) {
11074
11074
  var n = String(i), s = Sh.call(t, n.length + 1);
11075
- return Br.call(n, e, "$&_") + "." + Br.call(Br.call(s, /([0-9]{3})/g, "$&_"), /_$/, "");
11075
+ return Lr.call(n, e, "$&_") + "." + Lr.call(Lr.call(s, /([0-9]{3})/g, "$&_"), /_$/, "");
11076
11076
  }
11077
11077
  }
11078
- return Br.call(t, e, "$&_");
11078
+ return Lr.call(t, e, "$&_");
11079
11079
  }
11080
11080
  var bl = o1, Au = bl.custom, Su = op(Au) ? Au : null, np = {
11081
11081
  __proto__: null,
@@ -11120,17 +11120,17 @@ var bl = o1, Au = bl.custom, Su = op(Au) ? Au : null, np = {
11120
11120
  var c = typeof s.depth > "u" ? 5 : s.depth;
11121
11121
  if (typeof i > "u" && (i = 0), i >= c && c > 0 && typeof t == "object")
11122
11122
  return xl(t) ? "[Array]" : "[Object]";
11123
- var u = L1(s, i);
11123
+ var u = O1(s, i);
11124
11124
  if (typeof n > "u")
11125
11125
  n = [];
11126
11126
  else if (ap(n, t) >= 0)
11127
11127
  return "[Circular]";
11128
11128
  function d(T, E, S) {
11129
11129
  if (E && (n = m1.call(n), n.push(E)), S) {
11130
- var B = {
11130
+ var L = {
11131
11131
  depth: s.depth
11132
11132
  };
11133
- return _r(s, "quoteStyle") && (B.quoteStyle = s.quoteStyle), r(T, B, i + 1, n);
11133
+ return _r(s, "quoteStyle") && (L.quoteStyle = s.quoteStyle), r(T, L, i + 1, n);
11134
11134
  }
11135
11135
  return r(T, s, i + 1, n);
11136
11136
  }
@@ -11139,7 +11139,7 @@ var bl = o1, Au = bl.custom, Su = op(Au) ? Au : null, np = {
11139
11139
  return "[Function" + (p ? ": " + p : " (anonymous)") + "]" + (f.length > 0 ? " { " + nr.call(f, ", ") + " }" : "");
11140
11140
  }
11141
11141
  if (op(t)) {
11142
- var m = rn ? Br.call(String(t), /^(Symbol\(.*\))_[^)]*$/, "$1") : vl.call(t);
11142
+ var m = rn ? Lr.call(String(t), /^(Symbol\(.*\))_[^)]*$/, "$1") : vl.call(t);
11143
11143
  return typeof t == "object" && !rn ? mn(m) : m;
11144
11144
  }
11145
11145
  if (M1(t)) {
@@ -11151,7 +11151,7 @@ var bl = o1, Au = bl.custom, Su = op(Au) ? Au : null, np = {
11151
11151
  if (t.length === 0)
11152
11152
  return "[]";
11153
11153
  var g = cs(t, d);
11154
- return u && !O1(g) ? "[" + wl(g, u) + "]" : "[ " + nr.call(g, ", ") + " ]";
11154
+ return u && !B1(g) ? "[" + wl(g, u) + "]" : "[ " + nr.call(g, ", ") + " ]";
11155
11155
  }
11156
11156
  if (v1(t)) {
11157
11157
  var b = cs(t, d);
@@ -11194,7 +11194,7 @@ var bl = o1, Au = bl.custom, Su = op(Au) ? Au : null, np = {
11194
11194
  if (typeof globalThis < "u" && t === globalThis || typeof Mn < "u" && t === Mn)
11195
11195
  return "{ [object globalThis] }";
11196
11196
  if (!_1(t) && !Cu(t)) {
11197
- var A = cs(t, d), P = Eu ? Eu(t) === Object.prototype : t instanceof Object || t.constructor === Object, M = t instanceof Object ? "" : "null prototype", k = !P && Ln && Object(t) === t && Ln in t ? Sh.call(zr(t), 8, -1) : M ? "Object" : "", U = P || typeof t.constructor != "function" ? "" : t.constructor.name ? t.constructor.name + " " : "", I = U + (k || M ? "[" + nr.call(xu.call([], k || [], M || []), ": ") + "] " : "");
11197
+ var A = cs(t, d), P = Eu ? Eu(t) === Object.prototype : t instanceof Object || t.constructor === Object, M = t instanceof Object ? "" : "null prototype", k = !P && On && Object(t) === t && On in t ? Sh.call(zr(t), 8, -1) : M ? "Object" : "", U = P || typeof t.constructor != "function" ? "" : t.constructor.name ? t.constructor.name + " " : "", I = U + (k || M ? "[" + nr.call(xu.call([], k || [], M || []), ": ") + "] " : "");
11198
11198
  return A.length === 0 ? I + "{}" : u ? I + "{" + wl(A, u) + "}" : I + "{ " + nr.call(A, ", ") + " }";
11199
11199
  }
11200
11200
  return String(t);
@@ -11204,10 +11204,10 @@ function sp(r, t, e) {
11204
11204
  return n + r + n;
11205
11205
  }
11206
11206
  function y1(r) {
11207
- return Br.call(String(r), /"/g, "&quot;");
11207
+ return Lr.call(String(r), /"/g, "&quot;");
11208
11208
  }
11209
11209
  function _i(r) {
11210
- return !Ln || !(typeof r == "object" && (Ln in r || typeof r[Ln] < "u"));
11210
+ return !On || !(typeof r == "object" && (On in r || typeof r[On] < "u"));
11211
11211
  }
11212
11212
  function xl(r) {
11213
11213
  return zr(r) === "[object Array]" && _i(r);
@@ -11296,7 +11296,7 @@ function C1(r) {
11296
11296
  try {
11297
11297
  Dn.call(r, Dn);
11298
11298
  try {
11299
- On.call(r, On);
11299
+ Bn.call(r, Bn);
11300
11300
  } catch {
11301
11301
  return !0;
11302
11302
  }
@@ -11330,10 +11330,10 @@ function P1(r) {
11330
11330
  return !1;
11331
11331
  }
11332
11332
  function R1(r) {
11333
- if (!On || !r || typeof r != "object")
11333
+ if (!Bn || !r || typeof r != "object")
11334
11334
  return !1;
11335
11335
  try {
11336
- On.call(r, On);
11336
+ Bn.call(r, Bn);
11337
11337
  try {
11338
11338
  Dn.call(r, Dn);
11339
11339
  } catch {
@@ -11354,7 +11354,7 @@ function lp(r, t) {
11354
11354
  }
11355
11355
  var n = g1[t.quoteStyle || "single"];
11356
11356
  n.lastIndex = 0;
11357
- var s = Br.call(Br.call(r, n, "\\$1"), /[\x00-\x1f]/g, D1);
11357
+ var s = Lr.call(Lr.call(r, n, "\\$1"), /[\x00-\x1f]/g, D1);
11358
11358
  return sp(s, "single", t);
11359
11359
  }
11360
11360
  function D1(r) {
@@ -11377,14 +11377,14 @@ function Iu(r, t, e, i) {
11377
11377
  var n = i ? wl(e, i) : nr.call(e, ", ");
11378
11378
  return r + " (" + t + ") {" + n + "}";
11379
11379
  }
11380
- function O1(r) {
11380
+ function B1(r) {
11381
11381
  for (var t = 0; t < r.length; t++)
11382
11382
  if (ap(r[t], `
11383
11383
  `) >= 0)
11384
11384
  return !1;
11385
11385
  return !0;
11386
11386
  }
11387
- function L1(r, t) {
11387
+ function O1(r, t) {
11388
11388
  var e;
11389
11389
  if (r.indent === " ")
11390
11390
  e = " ";
@@ -11425,7 +11425,7 @@ function cs(r, t) {
11425
11425
  ip.call(r, s[h]) && i.push("[" + t(s[h]) + "]: " + t(r[s[h]], r));
11426
11426
  return i;
11427
11427
  }
11428
- var B1 = So, N1 = hn, Co = function(r, t, e) {
11428
+ var L1 = So, N1 = hn, Co = function(r, t, e) {
11429
11429
  for (var i = r, n; (n = i.next) != null; i = n)
11430
11430
  if (n.key === t)
11431
11431
  return i.next = n.next, e || (n.next = /** @type {NonNullable<typeof list.next>} */
@@ -11453,7 +11453,7 @@ var B1 = So, N1 = hn, Co = function(r, t, e) {
11453
11453
  var t, e = {
11454
11454
  assert: function(i) {
11455
11455
  if (!e.has(i))
11456
- throw new N1("Side channel does not contain " + B1(i));
11456
+ throw new N1("Side channel does not contain " + L1(i));
11457
11457
  },
11458
11458
  delete: function(i) {
11459
11459
  var n = t && t.next, s = G1(t, i);
@@ -11545,7 +11545,7 @@ function dp() {
11545
11545
  var r = hp;
11546
11546
  return xa = r.getPrototypeOf || null, xa;
11547
11547
  }
11548
- var ab = "Function.prototype.bind called on incompatible ", lb = Object.prototype.toString, hb = Math.max, cb = "[object Function]", Ou = function(t, e) {
11548
+ var ab = "Function.prototype.bind called on incompatible ", lb = Object.prototype.toString, hb = Math.max, cb = "[object Function]", Bu = function(t, e) {
11549
11549
  for (var i = [], n = 0; n < t.length; n += 1)
11550
11550
  i[n] = t[n];
11551
11551
  for (var s = 0; s < e.length; s += 1)
@@ -11567,13 +11567,13 @@ var ab = "Function.prototype.bind called on incompatible ", lb = Object.prototyp
11567
11567
  if (this instanceof n) {
11568
11568
  var c = e.apply(
11569
11569
  this,
11570
- Ou(i, arguments)
11570
+ Bu(i, arguments)
11571
11571
  );
11572
11572
  return Object(c) === c ? c : this;
11573
11573
  }
11574
11574
  return e.apply(
11575
11575
  t,
11576
- Ou(i, arguments)
11576
+ Bu(i, arguments)
11577
11577
  );
11578
11578
  }, o = hb(0, e.length - i.length), a = [], l = 0; l < o; l++)
11579
11579
  a[l] = "$" + l;
@@ -11583,18 +11583,18 @@ var ab = "Function.prototype.bind called on incompatible ", lb = Object.prototyp
11583
11583
  h.prototype = e.prototype, n.prototype = new h(), h.prototype = null;
11584
11584
  }
11585
11585
  return n;
11586
- }, pb = fb, Io = Function.prototype.bind || pb, Ch = Function.prototype.call, wa, Lu;
11586
+ }, pb = fb, Io = Function.prototype.bind || pb, Ch = Function.prototype.call, wa, Ou;
11587
11587
  function fp() {
11588
- return Lu || (Lu = 1, wa = Function.prototype.apply), wa;
11588
+ return Ou || (Ou = 1, wa = Function.prototype.apply), wa;
11589
11589
  }
11590
11590
  var mb = typeof Reflect < "u" && Reflect && Reflect.apply, gb = Io, yb = fp(), _b = Ch, vb = mb, bb = vb || gb.call(_b, yb), xb = Io, wb = hn, Eb = Ch, Tb = bb, pp = function(t) {
11591
11591
  if (t.length < 1 || typeof t[0] != "function")
11592
11592
  throw new wb("a function is required");
11593
11593
  return Tb(xb, Eb, t);
11594
- }, Ea, Bu;
11594
+ }, Ea, Lu;
11595
11595
  function Ab() {
11596
- if (Bu) return Ea;
11597
- Bu = 1;
11596
+ if (Lu) return Ea;
11597
+ Lu = 1;
11598
11598
  var r = pp, t = cp, e;
11599
11599
  try {
11600
11600
  e = /** @type {{ __proto__?: typeof Array.prototype }} */
@@ -11637,7 +11637,7 @@ function Cb() {
11637
11637
  var r = Function.prototype.call, t = Object.prototype.hasOwnProperty, e = Io;
11638
11638
  return Aa = e.call(r, t), Aa;
11639
11639
  }
11640
- var Et, Ib = hp, Pb = H1, Rb = X1, Mb = V1, Db = z1, nn = j1, Yi = hn, Ob = W1, Lb = Y1, Bb = q1, Nb = K1, Fb = Z1, kb = J1, Ub = Q1, Gb = rb, mp = Function, Sa = function(r) {
11640
+ var Et, Ib = hp, Pb = H1, Rb = X1, Mb = V1, Db = z1, nn = j1, Yi = hn, Bb = W1, Ob = Y1, Lb = q1, Nb = K1, Fb = Z1, kb = J1, Ub = Q1, Gb = rb, mp = Function, Sa = function(r) {
11641
11641
  try {
11642
11642
  return mp('"use strict"; return (' + r + ").constructor;")();
11643
11643
  } catch {
@@ -11654,17 +11654,17 @@ var Et, Ib = hp, Pb = H1, Rb = X1, Mb = V1, Db = z1, nn = j1, Yi = hn, Ob = W1,
11654
11654
  return Ca;
11655
11655
  }
11656
11656
  }
11657
- }() : Ca, Ci = ob()(), ne = Sb(), Xb = dp(), Vb = up(), gp = fp(), Zn = Ch, Li = {}, zb = typeof Uint8Array > "u" || !ne ? Et : ne(Uint8Array), oi = {
11657
+ }() : Ca, Ci = ob()(), ne = Sb(), Xb = dp(), Vb = up(), gp = fp(), Zn = Ch, Oi = {}, zb = typeof Uint8Array > "u" || !ne ? Et : ne(Uint8Array), oi = {
11658
11658
  __proto__: null,
11659
11659
  "%AggregateError%": typeof AggregateError > "u" ? Et : AggregateError,
11660
11660
  "%Array%": Array,
11661
11661
  "%ArrayBuffer%": typeof ArrayBuffer > "u" ? Et : ArrayBuffer,
11662
11662
  "%ArrayIteratorPrototype%": Ci && ne ? ne([][Symbol.iterator]()) : Et,
11663
11663
  "%AsyncFromSyncIteratorPrototype%": Et,
11664
- "%AsyncFunction%": Li,
11665
- "%AsyncGenerator%": Li,
11666
- "%AsyncGeneratorFunction%": Li,
11667
- "%AsyncIteratorPrototype%": Li,
11664
+ "%AsyncFunction%": Oi,
11665
+ "%AsyncGenerator%": Oi,
11666
+ "%AsyncGeneratorFunction%": Oi,
11667
+ "%AsyncIteratorPrototype%": Oi,
11668
11668
  "%Atomics%": typeof Atomics > "u" ? Et : Atomics,
11669
11669
  "%BigInt%": typeof BigInt > "u" ? Et : BigInt,
11670
11670
  "%BigInt64Array%": typeof BigInt64Array > "u" ? Et : BigInt64Array,
@@ -11685,7 +11685,7 @@ var Et, Ib = hp, Pb = H1, Rb = X1, Mb = V1, Db = z1, nn = j1, Yi = hn, Ob = W1,
11685
11685
  "%Float64Array%": typeof Float64Array > "u" ? Et : Float64Array,
11686
11686
  "%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? Et : FinalizationRegistry,
11687
11687
  "%Function%": mp,
11688
- "%GeneratorFunction%": Li,
11688
+ "%GeneratorFunction%": Oi,
11689
11689
  "%Int8Array%": typeof Int8Array > "u" ? Et : Int8Array,
11690
11690
  "%Int16Array%": typeof Int16Array > "u" ? Et : Int16Array,
11691
11691
  "%Int32Array%": typeof Int32Array > "u" ? Et : Int32Array,
@@ -11721,7 +11721,7 @@ var Et, Ib = hp, Pb = H1, Rb = X1, Mb = V1, Db = z1, nn = j1, Yi = hn, Ob = W1,
11721
11721
  "%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? Et : Uint8ClampedArray,
11722
11722
  "%Uint16Array%": typeof Uint16Array > "u" ? Et : Uint16Array,
11723
11723
  "%Uint32Array%": typeof Uint32Array > "u" ? Et : Uint32Array,
11724
- "%URIError%": Ob,
11724
+ "%URIError%": Bb,
11725
11725
  "%WeakMap%": typeof WeakMap > "u" ? Et : WeakMap,
11726
11726
  "%WeakRef%": typeof WeakRef > "u" ? Et : WeakRef,
11727
11727
  "%WeakSet%": typeof WeakSet > "u" ? Et : WeakSet,
@@ -11729,8 +11729,8 @@ var Et, Ib = hp, Pb = H1, Rb = X1, Mb = V1, Db = z1, nn = j1, Yi = hn, Ob = W1,
11729
11729
  "%Function.prototype.apply%": gp,
11730
11730
  "%Object.defineProperty%": $b,
11731
11731
  "%Object.getPrototypeOf%": Xb,
11732
- "%Math.abs%": Lb,
11733
- "%Math.floor%": Bb,
11732
+ "%Math.abs%": Ob,
11733
+ "%Math.floor%": Lb,
11734
11734
  "%Math.max%": Nb,
11735
11735
  "%Math.min%": Fb,
11736
11736
  "%Math.pow%": kb,
@@ -11828,7 +11828,7 @@ var Wb = function r(t) {
11828
11828
  var i = t, n;
11829
11829
  if (io(ku, i) && (n = ku[i], i = "%" + n[0] + "%"), io(oi, i)) {
11830
11830
  var s = oi[i];
11831
- if (s === Li && (s = Wb(i)), typeof s > "u" && !e)
11831
+ if (s === Oi && (s = Wb(i)), typeof s > "u" && !e)
11832
11832
  throw new Yi("intrinsic " + t + " exists, but is not available. Please file an issue!");
11833
11833
  return {
11834
11834
  alias: n,
@@ -12052,16 +12052,16 @@ function() {
12052
12052
  a += c.join("");
12053
12053
  }
12054
12054
  return a;
12055
- }, Ox = function(t) {
12055
+ }, Bx = function(t) {
12056
12056
  for (var e = [{ obj: { o: t }, prop: "o" }], i = [], n = 0; n < e.length; ++n)
12057
12057
  for (var s = e[n], o = s.obj[s.prop], a = Object.keys(o), l = 0; l < a.length; ++l) {
12058
12058
  var h = a[l], c = o[h];
12059
12059
  typeof c == "object" && c !== null && i.indexOf(c) === -1 && (e.push({ obj: o, prop: h }), i.push(c));
12060
12060
  }
12061
12061
  return Ix(e), t;
12062
- }, Lx = function(t) {
12062
+ }, Ox = function(t) {
12063
12063
  return Object.prototype.toString.call(t) === "[object RegExp]";
12064
- }, Bx = function(t) {
12064
+ }, Lx = function(t) {
12065
12065
  return !t || typeof t != "object" ? !1 : !!(t.constructor && t.constructor.isBuffer && t.constructor.isBuffer(t));
12066
12066
  }, Nx = function(t, e) {
12067
12067
  return [].concat(t, e);
@@ -12076,14 +12076,14 @@ function() {
12076
12076
  arrayToObject: xp,
12077
12077
  assign: Rx,
12078
12078
  combine: Nx,
12079
- compact: Ox,
12079
+ compact: Bx,
12080
12080
  decode: Mx,
12081
12081
  encode: Dx,
12082
- isBuffer: Bx,
12083
- isRegExp: Lx,
12082
+ isBuffer: Lx,
12083
+ isRegExp: Ox,
12084
12084
  maybeMap: Fx,
12085
12085
  merge: Px
12086
- }, Ep = Tx, ks = wp, Bn = Ph, kx = Object.prototype.hasOwnProperty, Tp = {
12086
+ }, Ep = Tx, ks = wp, Ln = Ph, kx = Object.prototype.hasOwnProperty, Tp = {
12087
12087
  brackets: function(t) {
12088
12088
  return t + "[]";
12089
12089
  },
@@ -12096,7 +12096,7 @@ function() {
12096
12096
  }
12097
12097
  }, rr = Array.isArray, Ux = Array.prototype.push, Ap = function(r, t) {
12098
12098
  Ux.apply(r, rr(t) ? t : [t]);
12099
- }, Gx = Date.prototype.toISOString, $u = Bn.default, te = {
12099
+ }, Gx = Date.prototype.toISOString, $u = Ln.default, te = {
12100
12100
  addQueryPrefix: !1,
12101
12101
  allowDots: !1,
12102
12102
  allowEmptyArrays: !1,
@@ -12111,7 +12111,7 @@ function() {
12111
12111
  encodeValuesOnly: !1,
12112
12112
  filter: void 0,
12113
12113
  format: $u,
12114
- formatter: Bn.formatters[$u],
12114
+ formatter: Ln.formatters[$u],
12115
12115
  // deprecated
12116
12116
  indices: !1,
12117
12117
  serializeDate: function(t) {
@@ -12131,8 +12131,8 @@ function() {
12131
12131
  }
12132
12132
  typeof b.get(Ma) > "u" && (C = 0);
12133
12133
  }
12134
- if (typeof c == "function" ? g = c(e, g) : g instanceof Date ? g = p(g) : i === "comma" && rr(g) && (g = ks.maybeMap(g, function(O) {
12135
- return O instanceof Date ? p(O) : O;
12134
+ if (typeof c == "function" ? g = c(e, g) : g instanceof Date ? g = p(g) : i === "comma" && rr(g) && (g = ks.maybeMap(g, function(B) {
12135
+ return B instanceof Date ? p(B) : B;
12136
12136
  })), g === null) {
12137
12137
  if (o)
12138
12138
  return h && !_ ? h(e, te.encoder, v, "key", f) : e;
@@ -12161,13 +12161,13 @@ function() {
12161
12161
  if (s && rr(g) && g.length === 0)
12162
12162
  return T + "[]";
12163
12163
  for (var E = 0; E < k.length; ++E) {
12164
- var S = k[E], B = typeof S == "object" && S && typeof S.value < "u" ? S.value : g[S];
12165
- if (!(a && B === null)) {
12164
+ var S = k[E], L = typeof S == "object" && S && typeof S.value < "u" ? S.value : g[S];
12165
+ if (!(a && L === null)) {
12166
12166
  var D = d && l ? String(S).replace(/\./g, "%2E") : String(S), N = rr(g) ? typeof i == "function" ? i(T, D) : T : T + (d ? "." + D : "[" + D + "]");
12167
12167
  y.set(t, C);
12168
12168
  var H = Ep();
12169
12169
  H.set(Ma, y), Ap(M, r(
12170
- B,
12170
+ L,
12171
12171
  N,
12172
12172
  i,
12173
12173
  n,
@@ -12201,13 +12201,13 @@ function() {
12201
12201
  var e = t.charset || te.charset;
12202
12202
  if (typeof t.charset < "u" && t.charset !== "utf-8" && t.charset !== "iso-8859-1")
12203
12203
  throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
12204
- var i = Bn.default;
12204
+ var i = Ln.default;
12205
12205
  if (typeof t.format < "u") {
12206
- if (!kx.call(Bn.formatters, t.format))
12206
+ if (!kx.call(Ln.formatters, t.format))
12207
12207
  throw new TypeError("Unknown format option provided.");
12208
12208
  i = t.format;
12209
12209
  }
12210
- var n = Bn.formatters[i], s = te.filter;
12210
+ var n = Ln.formatters[i], s = te.filter;
12211
12211
  (typeof t.filter == "function" || rr(t.filter)) && (s = t.filter);
12212
12212
  var o;
12213
12213
  if (t.arrayFormat in Tp ? o = t.arrayFormat : "indices" in t ? o = t.indices ? "indices" : "repeat" : o = te.arrayFormat, "commaRoundTrip" in t && typeof t.commaRoundTrip != "boolean")
@@ -12537,8 +12537,8 @@ Tr.prototype.parse = function(r, t, e) {
12537
12537
  }
12538
12538
  var S = a.indexOf("#");
12539
12539
  S !== -1 && (this.hash = a.substr(S), a = a.slice(0, S));
12540
- var B = a.indexOf("?");
12541
- if (B !== -1 ? (this.search = a.substr(B), this.query = a.substr(B + 1), t && (this.query = Sl.parse(this.query)), a = a.slice(0, B)) : t && (this.search = "", this.query = {}), a && (this.pathname = a), qi[c] && this.hostname && !this.pathname && (this.pathname = "/"), this.pathname || this.search) {
12540
+ var L = a.indexOf("?");
12541
+ if (L !== -1 ? (this.search = a.substr(L), this.query = a.substr(L + 1), t && (this.query = Sl.parse(this.query)), a = a.slice(0, L)) : t && (this.search = "", this.query = {}), a && (this.pathname = a), qi[c] && this.hostname && !this.pathname && (this.pathname = "/"), this.pathname || this.search) {
12542
12542
  var U = this.pathname || "", D = this.search || "";
12543
12543
  this.path = U + D;
12544
12544
  }
@@ -12953,9 +12953,9 @@ async function gw() {
12953
12953
  return r.readPixels(0, 0, 1, 1, r.RGBA, r.UNSIGNED_BYTE, n), r.deleteFramebuffer(i), r.deleteTexture(e), (s = r.getExtension("WEBGL_lose_context")) == null || s.loseContext(), n[0] <= n[3] ? Se.PMA : Se.UNPACK;
12954
12954
  })()), Da;
12955
12955
  }
12956
- let Oa;
12956
+ let Ba;
12957
12957
  function yw() {
12958
- return typeof Oa > "u" && (Oa = function() {
12958
+ return typeof Ba > "u" && (Ba = function() {
12959
12959
  var t;
12960
12960
  const r = {
12961
12961
  stencil: !0,
@@ -12975,7 +12975,7 @@ function yw() {
12975
12975
  } catch {
12976
12976
  return !1;
12977
12977
  }
12978
- }()), Oa;
12978
+ }()), Ba;
12979
12979
  }
12980
12980
  var _w = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, yr = function(r) {
12981
12981
  return typeof r == "string" ? r.length > 0 : typeof r == "number";
@@ -12987,7 +12987,7 @@ var _w = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, yr = function(r) {
12987
12987
  return (r = isFinite(r) ? r % 360 : 0) > 0 ? r : r + 360;
12988
12988
  }, Wu = function(r) {
12989
12989
  return { r: Fe(r.r, 0, 255), g: Fe(r.g, 0, 255), b: Fe(r.b, 0, 255), a: Fe(r.a) };
12990
- }, La = function(r) {
12990
+ }, Oa = function(r) {
12991
12991
  return { r: se(r.r), g: se(r.g), b: se(r.b), a: se(r.a, 3) };
12992
12992
  }, vw = /^#([0-9a-f]{3,8})$/i, ds = function(r) {
12993
12993
  var t = r.toString(16);
@@ -13044,7 +13044,7 @@ var _w = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, yr = function(r) {
13044
13044
  return [null, void 0];
13045
13045
  }, Tw = function(r) {
13046
13046
  return typeof r == "string" ? Zu(r.trim(), Cl.string) : typeof r == "object" && r !== null ? Zu(r, Cl.object) : [null, void 0];
13047
- }, Ba = function(r, t) {
13047
+ }, La = function(r, t) {
13048
13048
  var e = Nn(r);
13049
13049
  return { h: e.h, s: Fe(e.s + 100 * t, 0, 100), l: e.l, a: e.a };
13050
13050
  }, Na = function(r) {
@@ -13065,12 +13065,12 @@ var _w = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, yr = function(r) {
13065
13065
  }, r.prototype.isLight = function() {
13066
13066
  return Na(this.rgba) >= 0.5;
13067
13067
  }, r.prototype.toHex = function() {
13068
- return t = La(this.rgba), e = t.r, i = t.g, n = t.b, o = (s = t.a) < 1 ? ds(se(255 * s)) : "", "#" + ds(e) + ds(i) + ds(n) + o;
13068
+ return t = Oa(this.rgba), e = t.r, i = t.g, n = t.b, o = (s = t.a) < 1 ? ds(se(255 * s)) : "", "#" + ds(e) + ds(i) + ds(n) + o;
13069
13069
  var t, e, i, n, s, o;
13070
13070
  }, r.prototype.toRgb = function() {
13071
- return La(this.rgba);
13071
+ return Oa(this.rgba);
13072
13072
  }, r.prototype.toRgbString = function() {
13073
- return t = La(this.rgba), e = t.r, i = t.g, n = t.b, (s = t.a) < 1 ? "rgba(" + e + ", " + i + ", " + n + ", " + s + ")" : "rgb(" + e + ", " + i + ", " + n + ")";
13073
+ return t = Oa(this.rgba), e = t.r, i = t.g, n = t.b, (s = t.a) < 1 ? "rgba(" + e + ", " + i + ", " + n + ", " + s + ")" : "rgb(" + e + ", " + i + ", " + n + ")";
13074
13074
  var t, e, i, n, s;
13075
13075
  }, r.prototype.toHsl = function() {
13076
13076
  return qu(Nn(this.rgba));
@@ -13084,11 +13084,11 @@ var _w = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, yr = function(r) {
13084
13084
  return Ke({ r: 255 - (t = this.rgba).r, g: 255 - t.g, b: 255 - t.b, a: t.a });
13085
13085
  var t;
13086
13086
  }, r.prototype.saturate = function(t) {
13087
- return t === void 0 && (t = 0.1), Ke(Ba(this.rgba, t));
13087
+ return t === void 0 && (t = 0.1), Ke(La(this.rgba, t));
13088
13088
  }, r.prototype.desaturate = function(t) {
13089
- return t === void 0 && (t = 0.1), Ke(Ba(this.rgba, -t));
13089
+ return t === void 0 && (t = 0.1), Ke(La(this.rgba, -t));
13090
13090
  }, r.prototype.grayscale = function() {
13091
- return Ke(Ba(this.rgba, -1));
13091
+ return Ke(La(this.rgba, -1));
13092
13092
  }, r.prototype.lighten = function(t) {
13093
13093
  return t === void 0 && (t = 0.1), Ke(Ju(this.rgba, t));
13094
13094
  }, r.prototype.darken = function(t) {
@@ -13134,7 +13134,7 @@ function Sw(r, t) {
13134
13134
  }, "name"]);
13135
13135
  }
13136
13136
  Aw([Sw]);
13137
- const Bi = class Us {
13137
+ const Li = class Us {
13138
13138
  /**
13139
13139
  * @param {PIXI.ColorSource} value - Optional value to use, if not provided, white is used.
13140
13140
  */
@@ -13394,14 +13394,14 @@ const Bi = class Us {
13394
13394
  }), t);
13395
13395
  }
13396
13396
  };
13397
- Bi.shared = new Bi(), /**
13397
+ Li.shared = new Li(), /**
13398
13398
  * Temporary Color object for static uses internally.
13399
13399
  * As to not conflict with Color.shared.
13400
13400
  * @ignore
13401
13401
  */
13402
- Bi.temp = new Bi(), /** Pattern for hex strings */
13403
- Bi.HEX_PATTERN = /^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;
13404
- let Mt = Bi;
13402
+ Li.temp = new Li(), /** Pattern for hex strings */
13403
+ Li.HEX_PATTERN = /^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;
13404
+ let Mt = Li;
13405
13405
  function Cw(r) {
13406
13406
  return Tt("7.2.0", "utils.hex2string is deprecated, use Color#toHex instead"), Mt.shared.setValue(r).toHex();
13407
13407
  }
@@ -13568,7 +13568,7 @@ function sd(r, t, e, i, n) {
13568
13568
  return !1;
13569
13569
  return !0;
13570
13570
  }
13571
- function Ow(r) {
13571
+ function Bw(r) {
13572
13572
  const { width: t, height: e } = r, i = r.getContext("2d", {
13573
13573
  willReadFrequently: !0
13574
13574
  });
@@ -13588,8 +13588,8 @@ function Ow(r) {
13588
13588
  --a;
13589
13589
  return ++a, ++l, new rd(s, o, a, l);
13590
13590
  }
13591
- function Lw(r) {
13592
- const t = Ow(r), { width: e, height: i } = t;
13591
+ function Ow(r) {
13592
+ const t = Bw(r), { width: e, height: i } = t;
13593
13593
  let n = null;
13594
13594
  if (!t.isEmpty()) {
13595
13595
  const s = r.getContext("2d");
@@ -13604,7 +13604,7 @@ function Lw(r) {
13604
13604
  }
13605
13605
  return { width: e, height: i, data: n };
13606
13606
  }
13607
- function Bw(r, t = globalThis.location) {
13607
+ function Lw(r, t = globalThis.location) {
13608
13608
  if (r.startsWith("data:"))
13609
13609
  return "";
13610
13610
  t = t || globalThis.location;
@@ -13893,7 +13893,7 @@ ur.prototype.toString = function() {
13893
13893
  return `[@pixi/core:State blendMode=${this.blendMode} clockwiseFrontFace=${this.clockwiseFrontFace} culling=${this.culling} depthMask=${this.depthMask} polygonOffset=${this.polygonOffset}]`;
13894
13894
  };
13895
13895
  const Dl = [];
13896
- function Op(r, t) {
13896
+ function Bp(r, t) {
13897
13897
  if (!r)
13898
13898
  return null;
13899
13899
  let e = "";
@@ -14165,7 +14165,7 @@ class Ro extends Yn {
14165
14165
  const Uw = {
14166
14166
  scaleMode: vr.NEAREST,
14167
14167
  alphaMode: Se.NPM
14168
- }, Ol = class Ni extends Kn {
14168
+ }, Bl = class Ni extends Kn {
14169
14169
  /**
14170
14170
  * @param {PIXI.Resource|PIXI.ImageSource|string} [resource=null] -
14171
14171
  * The current resource to use, for things that aren't Resource objects, will be converted
@@ -14201,7 +14201,7 @@ const Uw = {
14201
14201
  resolution: p,
14202
14202
  resourceOptions: f
14203
14203
  } = e;
14204
- t && !(t instanceof Yn) && (t = Op(t, f), t.internal = !0), this.resolution = p || J.RESOLUTION, this.width = Math.round((a || 0) * this.resolution) / this.resolution, this.height = Math.round((l || 0) * this.resolution) / this.resolution, this._mipmap = n, this.anisotropicLevel = s, this._wrapMode = h, this._scaleMode = o, this.format = c, this.type = u, this.target = d, this.alphaMode = i, this.uid = ui(), this.touched = 0, this.isPowerOfTwo = !1, this._refreshPOT(), this._glTextures = {}, this.dirtyId = 0, this.dirtyStyleId = 0, this.cacheId = null, this.valid = a > 0 && l > 0, this.textureCacheIds = [], this.destroyed = !1, this.resource = null, this._batchEnabled = 0, this._batchLocation = 0, this.parentTextureArray = null, this.setResource(t);
14204
+ t && !(t instanceof Yn) && (t = Bp(t, f), t.internal = !0), this.resolution = p || J.RESOLUTION, this.width = Math.round((a || 0) * this.resolution) / this.resolution, this.height = Math.round((l || 0) * this.resolution) / this.resolution, this._mipmap = n, this.anisotropicLevel = s, this._wrapMode = h, this._scaleMode = o, this.format = c, this.type = u, this.target = d, this.alphaMode = i, this.uid = ui(), this.touched = 0, this.isPowerOfTwo = !1, this._refreshPOT(), this._glTextures = {}, this.dirtyId = 0, this.dirtyStyleId = 0, this.cacheId = null, this.valid = a > 0 && l > 0, this.textureCacheIds = [], this.destroyed = !1, this.resource = null, this._batchEnabled = 0, this._batchLocation = 0, this.parentTextureArray = null, this.setResource(t);
14205
14205
  }
14206
14206
  /**
14207
14207
  * Pixel width of the source of this texture
@@ -14421,7 +14421,7 @@ const Uw = {
14421
14421
  return null;
14422
14422
  }
14423
14423
  };
14424
- Ol.defaultOptions = {
14424
+ Bl.defaultOptions = {
14425
14425
  /**
14426
14426
  * If mipmapping is enabled for texture.
14427
14427
  * @type {PIXI.MIPMAP_MODES}
@@ -14467,9 +14467,9 @@ Ol.defaultOptions = {
14467
14467
  */
14468
14468
  type: ut.UNSIGNED_BYTE
14469
14469
  }, /** Global number of the texture batch, used by multi-texture renderers. */
14470
- Ol._globalBatch = 0;
14471
- let vt = Ol;
14472
- class Ll {
14470
+ Bl._globalBatch = 0;
14471
+ let vt = Bl;
14472
+ class Ol {
14473
14473
  constructor() {
14474
14474
  this.texArray = null, this.blend = 0, this.type = or.TRIANGLES, this.start = 0, this.size = 0, this.data = null;
14475
14475
  }
@@ -14755,7 +14755,7 @@ class $r {
14755
14755
  return e;
14756
14756
  }
14757
14757
  }
14758
- class Lp extends $r {
14758
+ class Op extends $r {
14759
14759
  /**
14760
14760
  * @param {boolean} [_static=false] - Optimization flag, where `false`
14761
14761
  * is updated every frame, `true` doesn't change frame-to-frame.
@@ -15082,7 +15082,7 @@ class ai {
15082
15082
  ai.prototype.toString = function() {
15083
15083
  return `[@pixi/math:PolygoncloseStroke=${this.closeStroke}points=${this.points.reduce((r, t) => `${r}, ${t}`, "")}]`;
15084
15084
  };
15085
- class Oo {
15085
+ class Bo {
15086
15086
  /**
15087
15087
  * @param x - The X coordinate of the upper-left corner of the rounded rectangle
15088
15088
  * @param y - The Y coordinate of the upper-left corner of the rounded rectangle
@@ -15098,7 +15098,7 @@ class Oo {
15098
15098
  * @returns - A copy of the rounded rectangle.
15099
15099
  */
15100
15100
  clone() {
15101
- return new Oo(this.x, this.y, this.width, this.height, this.radius);
15101
+ return new Bo(this.x, this.y, this.width, this.height, this.radius);
15102
15102
  }
15103
15103
  /**
15104
15104
  * Checks whether the x and y coordinates given are contained within this Rounded Rectangle
@@ -15121,7 +15121,7 @@ class Oo {
15121
15121
  return !1;
15122
15122
  }
15123
15123
  }
15124
- Oo.prototype.toString = function() {
15124
+ Bo.prototype.toString = function() {
15125
15125
  return `[@pixi/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`;
15126
15126
  };
15127
15127
  class Ft {
@@ -15329,11 +15329,11 @@ class Ft {
15329
15329
  Ft.prototype.toString = function() {
15330
15330
  return `[@pixi/math:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`;
15331
15331
  };
15332
- const qr = [1, 1, 0, -1, -1, -1, 0, 1, 1, 1, 0, -1, -1, -1, 0, 1], Kr = [0, 1, 1, 1, 0, -1, -1, -1, 0, 1, 1, 1, 0, -1, -1, -1], Zr = [0, -1, -1, -1, 0, 1, 1, 1, 0, 1, 1, 1, 0, -1, -1, -1], Jr = [1, 1, 0, -1, -1, -1, 0, 1, -1, -1, 0, 1, 1, 1, 0, -1], Bl = [], Bp = [], ps = Math.sign;
15332
+ const qr = [1, 1, 0, -1, -1, -1, 0, 1, 1, 1, 0, -1, -1, -1, 0, 1], Kr = [0, 1, 1, 1, 0, -1, -1, -1, 0, 1, 1, 1, 0, -1, -1, -1], Zr = [0, -1, -1, -1, 0, 1, 1, 1, 0, 1, 1, 1, 0, -1, -1, -1], Jr = [1, 1, 0, -1, -1, -1, 0, 1, -1, -1, 0, 1, 1, 1, 0, -1], Ll = [], Lp = [], ps = Math.sign;
15333
15333
  function Ww() {
15334
15334
  for (let r = 0; r < 16; r++) {
15335
15335
  const t = [];
15336
- Bl.push(t);
15336
+ Ll.push(t);
15337
15337
  for (let e = 0; e < 16; e++) {
15338
15338
  const i = ps(qr[r] * qr[e] + Zr[r] * Kr[e]), n = ps(Kr[r] * qr[e] + Jr[r] * Kr[e]), s = ps(qr[r] * Zr[e] + Zr[r] * Jr[e]), o = ps(Kr[r] * Zr[e] + Jr[r] * Jr[e]);
15339
15339
  for (let a = 0; a < 16; a++)
@@ -15345,7 +15345,7 @@ function Ww() {
15345
15345
  }
15346
15346
  for (let r = 0; r < 16; r++) {
15347
15347
  const t = new Ft();
15348
- t.set(qr[r], Kr[r], Zr[r], Jr[r], 0, 0), Bp.push(t);
15348
+ t.set(qr[r], Kr[r], Zr[r], Jr[r], 0, 0), Lp.push(t);
15349
15349
  }
15350
15350
  }
15351
15351
  Ww();
@@ -15480,14 +15480,14 @@ const $t = {
15480
15480
  * is the column in the above cayley table.
15481
15481
  * @returns {PIXI.GD8Symmetry} Composed operation
15482
15482
  */
15483
- add: (r, t) => Bl[r][t],
15483
+ add: (r, t) => Ll[r][t],
15484
15484
  /**
15485
15485
  * Reverse of `add`.
15486
15486
  * @param {PIXI.GD8Symmetry} rotationSecond - Second operation
15487
15487
  * @param {PIXI.GD8Symmetry} rotationFirst - First operation
15488
15488
  * @returns {PIXI.GD8Symmetry} Result
15489
15489
  */
15490
- sub: (r, t) => Bl[r][$t.inv(t)],
15490
+ sub: (r, t) => Ll[r][$t.inv(t)],
15491
15491
  /**
15492
15492
  * Adds 180 degrees to rotation, which is a commutative
15493
15493
  * operation.
@@ -15520,7 +15520,7 @@ const $t = {
15520
15520
  * @param {number} ty - sprite anchoring
15521
15521
  */
15522
15522
  matrixAppendRotationInv: (r, t, e = 0, i = 0) => {
15523
- const n = Bp[$t.inv(t)];
15523
+ const n = Lp[$t.inv(t)];
15524
15524
  n.tx = e, n.ty = i, r.append(n);
15525
15525
  }
15526
15526
  };
@@ -16473,7 +16473,7 @@ function lE(r) {
16473
16473
  }
16474
16474
  return t ? r : 4;
16475
16475
  }
16476
- class Lo {
16476
+ class Oo {
16477
16477
  /**
16478
16478
  * @param renderer - The renderer this manager works for.
16479
16479
  */
@@ -16539,14 +16539,14 @@ void main(void){
16539
16539
  vColor = aColor * tint;
16540
16540
  }
16541
16541
  `;
16542
- const wn = class $e extends Lo {
16542
+ const wn = class $e extends Oo {
16543
16543
  /**
16544
16544
  * This will hook onto the renderer's `contextChange`
16545
16545
  * and `prerender` signals.
16546
16546
  * @param {PIXI.Renderer} renderer - The renderer this works for.
16547
16547
  */
16548
16548
  constructor(t) {
16549
- super(t), this.setShaderGenerator(), this.geometryClass = Lp, this.vertexSize = 6, this.state = ur.for2d(), this.size = $e.defaultBatchSize * 4, this._vertexCount = 0, this._indexCount = 0, this._bufferedElements = [], this._bufferedTextures = [], this._bufferSize = 0, this._shader = null, this._packedGeometries = [], this._packedGeometryPoolSize = 2, this._flushId = 0, this._aBuffers = {}, this._iBuffers = {}, this.maxTextures = 1, this.renderer.on("prerender", this.onPrerender, this), t.runners.contextChange.add(this), this._dcIndex = 0, this._aIndex = 0, this._iIndex = 0, this._attributeBuffer = null, this._indexBuffer = null, this._tempBoundTextures = [];
16549
+ super(t), this.setShaderGenerator(), this.geometryClass = Op, this.vertexSize = 6, this.state = ur.for2d(), this.size = $e.defaultBatchSize * 4, this._vertexCount = 0, this._indexCount = 0, this._bufferedElements = [], this._bufferedTextures = [], this._bufferSize = 0, this._shader = null, this._packedGeometries = [], this._packedGeometryPoolSize = 2, this._flushId = 0, this._aBuffers = {}, this._iBuffers = {}, this.maxTextures = 1, this.renderer.on("prerender", this.onPrerender, this), t.runners.contextChange.add(this), this._dcIndex = 0, this._aIndex = 0, this._iIndex = 0, this._attributeBuffer = null, this._indexBuffer = null, this._tempBoundTextures = [];
16550
16550
  }
16551
16551
  /**
16552
16552
  * The maximum textures that this device supports.
@@ -16628,7 +16628,7 @@ const wn = class $e extends Lo {
16628
16628
  _textureArrayPool: e
16629
16629
  } = $e, i = this.size / 4, n = Math.floor(i / this.maxTextures) + 1;
16630
16630
  for (; t.length < i; )
16631
- t.push(new Ll());
16631
+ t.push(new Ol());
16632
16632
  for (; e.length < n; )
16633
16633
  e.push(new kl());
16634
16634
  for (let s = 0; s < this.maxTextures; s++)
@@ -16975,7 +16975,7 @@ class Gp {
16975
16975
  * @param renderer - The renderer this System works for.
16976
16976
  */
16977
16977
  constructor(t) {
16978
- this.renderer = t, this.emptyRenderer = new Lo(t), this.currentRenderer = this.emptyRenderer;
16978
+ this.renderer = t, this.emptyRenderer = new Oo(t), this.currentRenderer = this.emptyRenderer;
16979
16979
  }
16980
16980
  /**
16981
16981
  * Changes the current renderer to the one given in parameter
@@ -17383,7 +17383,7 @@ class Sr extends Yn {
17383
17383
  * @param crossorigin - Cross origin value to use
17384
17384
  */
17385
17385
  static crossOrigin(t, e, i) {
17386
- i === void 0 && !e.startsWith("data:") ? t.crossOrigin = Bw(e) : i !== !1 && (t.crossOrigin = typeof i == "string" ? i : "anonymous");
17386
+ i === void 0 && !e.startsWith("data:") ? t.crossOrigin = Lw(e) : i !== !1 && (t.crossOrigin = typeof i == "string" ? i : "anonymous");
17387
17387
  }
17388
17388
  /**
17389
17389
  * Upload the texture to the GPU.
@@ -19852,15 +19852,15 @@ co.extension = {
19852
19852
  name: "startup"
19853
19853
  };
19854
19854
  ht.add(co);
19855
- function OE(r, t = []) {
19855
+ function BE(r, t = []) {
19856
19856
  return t[mt.NORMAL] = [r.ONE, r.ONE_MINUS_SRC_ALPHA], t[mt.ADD] = [r.ONE, r.ONE], t[mt.MULTIPLY] = [r.DST_COLOR, r.ONE_MINUS_SRC_ALPHA, r.ONE, r.ONE_MINUS_SRC_ALPHA], t[mt.SCREEN] = [r.ONE, r.ONE_MINUS_SRC_COLOR, r.ONE, r.ONE_MINUS_SRC_ALPHA], t[mt.OVERLAY] = [r.ONE, r.ONE_MINUS_SRC_ALPHA], t[mt.DARKEN] = [r.ONE, r.ONE_MINUS_SRC_ALPHA], t[mt.LIGHTEN] = [r.ONE, r.ONE_MINUS_SRC_ALPHA], t[mt.COLOR_DODGE] = [r.ONE, r.ONE_MINUS_SRC_ALPHA], t[mt.COLOR_BURN] = [r.ONE, r.ONE_MINUS_SRC_ALPHA], t[mt.HARD_LIGHT] = [r.ONE, r.ONE_MINUS_SRC_ALPHA], t[mt.SOFT_LIGHT] = [r.ONE, r.ONE_MINUS_SRC_ALPHA], t[mt.DIFFERENCE] = [r.ONE, r.ONE_MINUS_SRC_ALPHA], t[mt.EXCLUSION] = [r.ONE, r.ONE_MINUS_SRC_ALPHA], t[mt.HUE] = [r.ONE, r.ONE_MINUS_SRC_ALPHA], t[mt.SATURATION] = [r.ONE, r.ONE_MINUS_SRC_ALPHA], t[mt.COLOR] = [r.ONE, r.ONE_MINUS_SRC_ALPHA], t[mt.LUMINOSITY] = [r.ONE, r.ONE_MINUS_SRC_ALPHA], t[mt.NONE] = [0, 0], t[mt.NORMAL_NPM] = [r.SRC_ALPHA, r.ONE_MINUS_SRC_ALPHA, r.ONE, r.ONE_MINUS_SRC_ALPHA], t[mt.ADD_NPM] = [r.SRC_ALPHA, r.ONE, r.ONE, r.ONE], t[mt.SCREEN_NPM] = [r.SRC_ALPHA, r.ONE_MINUS_SRC_COLOR, r.ONE, r.ONE_MINUS_SRC_ALPHA], t[mt.SRC_IN] = [r.DST_ALPHA, r.ZERO], t[mt.SRC_OUT] = [r.ONE_MINUS_DST_ALPHA, r.ZERO], t[mt.SRC_ATOP] = [r.DST_ALPHA, r.ONE_MINUS_SRC_ALPHA], t[mt.DST_OVER] = [r.ONE_MINUS_DST_ALPHA, r.ONE], t[mt.DST_IN] = [r.ZERO, r.SRC_ALPHA], t[mt.DST_OUT] = [r.ZERO, r.ONE_MINUS_SRC_ALPHA], t[mt.DST_ATOP] = [r.ONE_MINUS_DST_ALPHA, r.SRC_ALPHA], t[mt.XOR] = [r.ONE_MINUS_DST_ALPHA, r.ONE_MINUS_SRC_ALPHA], t[mt.SUBTRACT] = [r.ONE, r.ONE, r.ONE, r.ONE, r.FUNC_REVERSE_SUBTRACT, r.FUNC_ADD], t;
19857
19857
  }
19858
- const LE = 0, BE = 1, NE = 2, FE = 3, kE = 4, UE = 5, sm = class $l {
19858
+ const OE = 0, LE = 1, NE = 2, FE = 3, kE = 4, UE = 5, sm = class $l {
19859
19859
  constructor() {
19860
- this.gl = null, this.stateId = 0, this.polygonOffset = 0, this.blendMode = mt.NONE, this._blendEq = !1, this.map = [], this.map[LE] = this.setBlend, this.map[BE] = this.setOffset, this.map[NE] = this.setCullFace, this.map[FE] = this.setDepthTest, this.map[kE] = this.setFrontFace, this.map[UE] = this.setDepthMask, this.checks = [], this.defaultState = new ur(), this.defaultState.blend = !0;
19860
+ this.gl = null, this.stateId = 0, this.polygonOffset = 0, this.blendMode = mt.NONE, this._blendEq = !1, this.map = [], this.map[OE] = this.setBlend, this.map[LE] = this.setOffset, this.map[NE] = this.setCullFace, this.map[FE] = this.setDepthTest, this.map[kE] = this.setFrontFace, this.map[UE] = this.setDepthMask, this.checks = [], this.defaultState = new ur(), this.defaultState.blend = !0;
19861
19861
  }
19862
19862
  contextChange(t) {
19863
- this.gl = t, this.blendModes = OE(t), this.set(this.defaultState), this.reset();
19863
+ this.gl = t, this.blendModes = BE(t), this.set(this.defaultState), this.reset();
19864
19864
  }
19865
19865
  /**
19866
19866
  * Sets the current state
@@ -21758,7 +21758,7 @@ class gm extends Yn {
21758
21758
  */
21759
21759
  initFromArray(t, e) {
21760
21760
  for (let i = 0; i < this.length; i++)
21761
- t[i] && (t[i].castToBaseTexture ? this.addBaseTextureAt(t[i].castToBaseTexture(), i) : t[i] instanceof Yn ? this.addResourceAt(t[i], i) : this.addResourceAt(Op(t[i], e), i));
21761
+ t[i] && (t[i].castToBaseTexture ? this.addBaseTextureAt(t[i].castToBaseTexture(), i) : t[i] instanceof Yn ? this.addResourceAt(t[i], i) : this.addResourceAt(Bp(t[i], e), i));
21762
21762
  }
21763
21763
  /** Destroy this BaseImageResource. */
21764
21764
  dispose() {
@@ -26631,7 +26631,7 @@ const CT = {
26631
26631
  renderId: -1
26632
26632
  };
26633
26633
  Vt.mixin(CT);
26634
- const IT = 9, xs = 100, PT = 0, RT = 0, bd = 2, xd = 1, MT = -1e3, DT = -1e3, OT = 2;
26634
+ const IT = 9, xs = 100, PT = 0, RT = 0, bd = 2, xd = 1, MT = -1e3, DT = -1e3, BT = 2;
26635
26635
  class xm {
26636
26636
  // 2fps
26637
26637
  /**
@@ -26664,7 +26664,7 @@ class xm {
26664
26664
  */
26665
26665
  createTouchHook() {
26666
26666
  const t = document.createElement("button");
26667
- t.style.width = `${xd}px`, t.style.height = `${xd}px`, t.style.position = "absolute", t.style.top = `${MT}px`, t.style.left = `${DT}px`, t.style.zIndex = OT.toString(), t.style.backgroundColor = "#FF0000", t.title = "select to enable accessibility for this content", t.addEventListener("focus", () => {
26667
+ t.style.width = `${xd}px`, t.style.height = `${xd}px`, t.style.position = "absolute", t.style.top = `${MT}px`, t.style.left = `${DT}px`, t.style.zIndex = BT.toString(), t.style.backgroundColor = "#FF0000", t.title = "select to enable accessibility for this content", t.addEventListener("focus", () => {
26668
26668
  this._isMobileAccessibility = !0, this.activate(), this.destroyTouchHook();
26669
26669
  }), document.body.appendChild(t), this._hookDiv = t;
26670
26670
  }
@@ -26874,8 +26874,8 @@ const wm = class Ql {
26874
26874
  }
26875
26875
  };
26876
26876
  wm._plugins = [];
26877
- let LT = wm;
26878
- ht.handleByList(K.Application, LT._plugins);
26877
+ let OT = wm;
26878
+ ht.handleByList(K.Application, OT._plugins);
26879
26879
  class Em {
26880
26880
  /**
26881
26881
  * Initialize the plugin with scope of application instance
@@ -26949,7 +26949,7 @@ ht.handle(K.Asset, (r) => {
26949
26949
  const t = r.ref;
26950
26950
  Object.keys(wd).filter((e) => !!t[e]).forEach((e) => ht.remove(t[e]));
26951
26951
  });
26952
- class BT {
26952
+ class LT {
26953
26953
  /**
26954
26954
  * @param loader
26955
26955
  * @param verbose - should the loader log to the console
@@ -27433,7 +27433,7 @@ async function nA(r) {
27433
27433
  const e = await t.blob();
27434
27434
  return await createImageBitmap(e);
27435
27435
  }
27436
- const Bo = {
27436
+ const Lo = {
27437
27437
  name: "loadTextures",
27438
27438
  extension: {
27439
27439
  type: K.LoadParser,
@@ -27464,7 +27464,7 @@ const Bo = {
27464
27464
  r.destroy(!0);
27465
27465
  }
27466
27466
  };
27467
- ht.add(Bo);
27467
+ ht.add(Lo);
27468
27468
  const sA = ".svg", oA = "image/svg+xml", aA = {
27469
27469
  extension: {
27470
27470
  type: K.LoadParser,
@@ -27490,7 +27490,7 @@ const sA = ".svg", oA = "image/svg+xml", aA = {
27490
27490
  async load(r, t) {
27491
27491
  return (await J.ADAPTER.fetch(r)).text();
27492
27492
  },
27493
- unload: Bo.unload
27493
+ unload: Lo.unload
27494
27494
  };
27495
27495
  ht.add(aA);
27496
27496
  const lA = [".mp4", ".m4v", ".webm", ".ogv"], hA = [
@@ -27931,7 +27931,7 @@ Please use Assets.add({ alias, src, data, format, loadParser }) instead.`), o.pu
27931
27931
  }
27932
27932
  class dA {
27933
27933
  constructor() {
27934
- this._detections = [], this._initialized = !1, this.resolver = new uA(), this.loader = new kT(), this.cache = ri, this._backgroundLoader = new BT(this.loader), this._backgroundLoader.active = !0, this.reset();
27934
+ this._detections = [], this._initialized = !1, this.resolver = new uA(), this.loader = new kT(), this.cache = ri, this._backgroundLoader = new LT(this.loader), this._backgroundLoader.active = !0, this.reset();
27935
27935
  }
27936
27936
  /**
27937
27937
  * Best practice is to call this function before any loading commences
@@ -28232,7 +28232,7 @@ class dA {
28232
28232
  * @see {@link Assets.setPreferences}
28233
28233
  */
28234
28234
  get preferWorkers() {
28235
- return Bo.config.preferWorkers;
28235
+ return Lo.config.preferWorkers;
28236
28236
  }
28237
28237
  set preferWorkers(t) {
28238
28238
  Tt("7.2.0", "Assets.prefersWorkers is deprecated, use Assets.setPreferences({ preferWorkers: true }) instead."), this.setPreferences({ preferWorkers: t });
@@ -28321,7 +28321,7 @@ const Ad = ["png", "jpg", "jpeg"], gA = {
28321
28321
  };
28322
28322
  ht.add(gA);
28323
28323
  const yA = "WorkerGlobalScope" in globalThis && globalThis instanceof globalThis.WorkerGlobalScope;
28324
- function Oh(r) {
28324
+ function Bh(r) {
28325
28325
  return yA ? !1 : document.createElement("video").canPlayType(r) !== "";
28326
28326
  }
28327
28327
  const _A = {
@@ -28329,7 +28329,7 @@ const _A = {
28329
28329
  type: K.DetectionParser,
28330
28330
  priority: 0
28331
28331
  },
28332
- test: async () => Oh("video/webm"),
28332
+ test: async () => Bh("video/webm"),
28333
28333
  add: async (r) => [...r, "webm"],
28334
28334
  remove: async (r) => r.filter((t) => t !== "webm")
28335
28335
  };
@@ -28339,7 +28339,7 @@ const vA = {
28339
28339
  type: K.DetectionParser,
28340
28340
  priority: 0
28341
28341
  },
28342
- test: async () => Oh("video/mp4"),
28342
+ test: async () => Bh("video/mp4"),
28343
28343
  add: async (r) => [...r, "mp4", "m4v"],
28344
28344
  remove: async (r) => r.filter((t) => t !== "mp4" && t !== "m4v")
28345
28345
  };
@@ -28349,14 +28349,14 @@ const bA = {
28349
28349
  type: K.DetectionParser,
28350
28350
  priority: 0
28351
28351
  },
28352
- test: async () => Oh("video/ogg"),
28352
+ test: async () => Bh("video/ogg"),
28353
28353
  add: async (r) => [...r, "ogv"],
28354
28354
  remove: async (r) => r.filter((t) => t !== "ogv")
28355
28355
  };
28356
28356
  ht.add(bA);
28357
28357
  const xA = {
28358
28358
  extension: K.ResolveParser,
28359
- test: Bo.test,
28359
+ test: Lo.test,
28360
28360
  parse: (r) => {
28361
28361
  var t;
28362
28362
  return {
@@ -28584,10 +28584,10 @@ const Ka = 4, Es = 124, TA = 32, Cd = 20, AA = 542327876, Ts = {
28584
28584
  RESOURCE_DIMENSION: 1,
28585
28585
  MISC_FLAG: 2,
28586
28586
  ARRAY_SIZE: 3
28587
- }, CA = 1, IA = 2, PA = 4, RA = 64, MA = 512, DA = 131072, OA = 827611204, LA = 861165636, BA = 894720068, NA = 808540228, FA = 4, kA = {
28588
- [OA]: fe.COMPRESSED_RGBA_S3TC_DXT1_EXT,
28589
- [LA]: fe.COMPRESSED_RGBA_S3TC_DXT3_EXT,
28590
- [BA]: fe.COMPRESSED_RGBA_S3TC_DXT5_EXT
28587
+ }, CA = 1, IA = 2, PA = 4, RA = 64, MA = 512, DA = 131072, BA = 827611204, OA = 861165636, LA = 894720068, NA = 808540228, FA = 4, kA = {
28588
+ [BA]: fe.COMPRESSED_RGBA_S3TC_DXT1_EXT,
28589
+ [OA]: fe.COMPRESSED_RGBA_S3TC_DXT3_EXT,
28590
+ [LA]: fe.COMPRESSED_RGBA_S3TC_DXT5_EXT
28591
28591
  }, UA = {
28592
28592
  // WEBGL_compressed_texture_s3tc
28593
28593
  70: fe.COMPRESSED_RGBA_S3TC_DXT1_EXT,
@@ -28717,9 +28717,9 @@ function VA(r, t, e = !1) {
28717
28717
  for (let T = 0; T < p; T++) {
28718
28718
  const E = i.getUint32(I, n);
28719
28719
  let S = I + 4;
28720
- for (let B = 0; B < u; B++) {
28721
- let D = g[B];
28722
- D || (D = g[B] = new Array(p)), D[T] = {
28720
+ for (let L = 0; L < u; L++) {
28721
+ let D = g[L];
28722
+ D || (D = g[L] = new Array(p)), D[T] = {
28723
28723
  levelID: T,
28724
28724
  // don't align mipWidth when texture not compressed! (glType not zero)
28725
28725
  levelWidth: p > 1 || s !== 0 ? P : k,
@@ -29192,7 +29192,7 @@ const Im = {
29192
29192
  yo.triangulate(r, t);
29193
29193
  }
29194
29194
  };
29195
- var Le = /* @__PURE__ */ ((r) => (r.MITER = "miter", r.BEVEL = "bevel", r.ROUND = "round", r))(Le || {}), Fr = /* @__PURE__ */ ((r) => (r.BUTT = "butt", r.ROUND = "round", r.SQUARE = "square", r))(Fr || {});
29195
+ var Oe = /* @__PURE__ */ ((r) => (r.MITER = "miter", r.BEVEL = "bevel", r.ROUND = "round", r))(Oe || {}), Fr = /* @__PURE__ */ ((r) => (r.BUTT = "butt", r.ROUND = "round", r.SQUARE = "square", r))(Fr || {});
29196
29196
  const sn = {
29197
29197
  adaptive: !0,
29198
29198
  maxLength: 10,
@@ -29287,7 +29287,7 @@ class rS {
29287
29287
  this.style = null, this.size = 0, this.start = 0, this.attribStart = 0, this.attribSize = 0;
29288
29288
  }
29289
29289
  }
29290
- class Lh {
29290
+ class Oh {
29291
29291
  /**
29292
29292
  * Calculate length of bezier curve.
29293
29293
  * Analytical solution is impossible, since it involves an integral that does not integrate in general.
@@ -29326,7 +29326,7 @@ class Lh {
29326
29326
  const l = a[a.length - 2], h = a[a.length - 1];
29327
29327
  a.length -= 2;
29328
29328
  const c = sn._segmentsCount(
29329
- Lh.curveLength(l, h, t, e, i, n, s, o)
29329
+ Oh.curveLength(l, h, t, e, i, n, s, o)
29330
29330
  );
29331
29331
  let u = 0, d = 0, p = 0, f = 0, m = 0;
29332
29332
  a.push(l, h);
@@ -29433,14 +29433,14 @@ function iS(r, t) {
29433
29433
  );
29434
29434
  for (let D = 1; D < u - 1; ++D) {
29435
29435
  v = i[(D - 1) * 2], y = i[(D - 1) * 2 + 1], g = i[D * 2], b = i[D * 2 + 1], C = i[(D + 1) * 2], R = i[(D + 1) * 2 + 1], A = -(y - b), P = v - g, U = Math.sqrt(A * A + P * P), A /= U, P /= U, A *= f, P *= f, M = -(b - R), k = g - C, U = Math.sqrt(M * M + k * k), M /= U, k /= U, M *= f, k *= f;
29436
- const N = g - v, H = y - b, O = g - C, L = R - b, $ = N * O + H * L, F = H * O - L * N, X = F < 0;
29436
+ const N = g - v, H = y - b, B = g - C, O = R - b, $ = N * B + H * O, F = H * B - O * N, X = F < 0;
29437
29437
  if (Math.abs(F) < 1e-3 * Math.abs($)) {
29438
29438
  c.push(
29439
29439
  g - A * T,
29440
29440
  b - P * T,
29441
29441
  g + A * E,
29442
29442
  b + P * E
29443
- ), $ >= 0 && (s.join === Le.ROUND ? d += Yr(
29443
+ ), $ >= 0 && (s.join === Oe.ROUND ? d += Yr(
29444
29444
  g,
29445
29445
  b,
29446
29446
  g - A * T,
@@ -29457,11 +29457,11 @@ function iS(r, t) {
29457
29457
  ));
29458
29458
  continue;
29459
29459
  }
29460
- const V = (-A + v) * (-P + b) - (-A + g) * (-P + y), dt = (-M + C) * (-k + b) - (-M + g) * (-k + R), pt = (N * dt - O * V) / F, z = (L * V - H * dt) / F, bt = (pt - g) * (pt - g) + (z - b) * (z - b), rt = g + (pt - g) * T, ft = b + (z - b) * T, _t = g - (pt - g) * E, It = b - (z - b) * E, Dt = Math.min(N * N + H * H, O * O + L * L), ie = X ? T : E, Gt = Dt + ie * ie * m, Q = bt <= Gt;
29461
- let Oe = s.join;
29462
- if (Oe === Le.MITER && bt / m > _ && (Oe = Le.BEVEL), Q)
29463
- switch (Oe) {
29464
- case Le.MITER: {
29460
+ const V = (-A + v) * (-P + b) - (-A + g) * (-P + y), dt = (-M + C) * (-k + b) - (-M + g) * (-k + R), pt = (N * dt - B * V) / F, z = (O * V - H * dt) / F, bt = (pt - g) * (pt - g) + (z - b) * (z - b), rt = g + (pt - g) * T, ft = b + (z - b) * T, _t = g - (pt - g) * E, It = b - (z - b) * E, Dt = Math.min(N * N + H * H, B * B + O * O), ie = X ? T : E, Gt = Dt + ie * ie * m, Q = bt <= Gt;
29461
+ let Be = s.join;
29462
+ if (Be === Oe.MITER && bt / m > _ && (Be = Oe.BEVEL), Q)
29463
+ switch (Be) {
29464
+ case Oe.MITER: {
29465
29465
  c.push(
29466
29466
  rt,
29467
29467
  ft,
@@ -29470,7 +29470,7 @@ function iS(r, t) {
29470
29470
  );
29471
29471
  break;
29472
29472
  }
29473
- case Le.BEVEL: {
29473
+ case Oe.BEVEL: {
29474
29474
  X ? c.push(
29475
29475
  rt,
29476
29476
  ft,
@@ -29498,7 +29498,7 @@ function iS(r, t) {
29498
29498
  ), d += 2;
29499
29499
  break;
29500
29500
  }
29501
- case Le.ROUND: {
29501
+ case Oe.ROUND: {
29502
29502
  X ? (c.push(
29503
29503
  rt,
29504
29504
  ft,
@@ -29548,8 +29548,8 @@ function iS(r, t) {
29548
29548
  // first segment's inner vertex
29549
29549
  g + A * E,
29550
29550
  b + P * E
29551
- ), Oe) {
29552
- case Le.MITER: {
29551
+ ), Be) {
29552
+ case Oe.MITER: {
29553
29553
  X ? c.push(
29554
29554
  _t,
29555
29555
  It,
@@ -29565,7 +29565,7 @@ function iS(r, t) {
29565
29565
  ), d += 2;
29566
29566
  break;
29567
29567
  }
29568
- case Le.ROUND: {
29568
+ case Oe.ROUND: {
29569
29569
  X ? d += Yr(
29570
29570
  g,
29571
29571
  b,
@@ -29612,9 +29612,9 @@ function iS(r, t) {
29612
29612
  c,
29613
29613
  !1
29614
29614
  ) + 2 : s.cap === Fr.SQUARE && (d += Dd(g, b, A, P, T, E, !1, c)));
29615
- const S = t.indices, B = sn.epsilon * sn.epsilon;
29615
+ const S = t.indices, L = sn.epsilon * sn.epsilon;
29616
29616
  for (let D = p; D < d + p - 2; ++D)
29617
- v = c[D * 2], y = c[D * 2 + 1], g = c[(D + 1) * 2], b = c[(D + 1) * 2 + 1], C = c[(D + 2) * 2], R = c[(D + 2) * 2 + 1], !(Math.abs(v * (b - R) + g * (R - y) + C * (y - b)) < B) && S.push(D, D + 1, D + 2);
29617
+ v = c[D * 2], y = c[D * 2 + 1], g = c[(D + 1) * 2], b = c[(D + 1) * 2 + 1], C = c[(D + 2) * 2], R = c[(D + 2) * 2 + 1], !(Math.abs(v * (b - R) + g * (R - y) + C * (y - b)) < L) && S.push(D, D + 1, D + 2);
29618
29618
  }
29619
29619
  function nS(r, t) {
29620
29620
  let e = 0;
@@ -29627,10 +29627,10 @@ function nS(r, t) {
29627
29627
  o.push(n[e * 2], n[e * 2 + 1]), a.push(c, c + 1), c++;
29628
29628
  s && a.push(c, h);
29629
29629
  }
29630
- function Od(r, t) {
29630
+ function Bd(r, t) {
29631
29631
  r.lineStyle.native ? nS(r, t) : iS(r, t);
29632
29632
  }
29633
- class Bh {
29633
+ class Lh {
29634
29634
  /**
29635
29635
  * Calculate length of quadratic curve
29636
29636
  * @see {@link http://www.malczak.linuxpl.com/blog/quadratic-bezier-curve-length/}
@@ -29660,7 +29660,7 @@ class Bh {
29660
29660
  */
29661
29661
  static curveTo(t, e, i, n, s) {
29662
29662
  const o = s[s.length - 2], a = s[s.length - 1], l = sn._segmentsCount(
29663
- Bh.curveLength(o, a, t, e, i, n)
29663
+ Lh.curveLength(o, a, t, e, i, n)
29664
29664
  );
29665
29665
  let h = 0, c = 0;
29666
29666
  for (let u = 1; u <= l; ++u) {
@@ -29678,7 +29678,7 @@ const Za = {
29678
29678
  [ge.ELIP]: yo,
29679
29679
  [ge.RECT]: tS,
29680
29680
  [ge.RREC]: eS
29681
- }, Ld = [], Cs = [];
29681
+ }, Od = [], Cs = [];
29682
29682
  class _o {
29683
29683
  /**
29684
29684
  * @param {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} shape - The shape object to draw.
@@ -29706,7 +29706,7 @@ class _o {
29706
29706
  this.shape = null, this.holes.length = 0, this.holes = null, this.points.length = 0, this.points = null, this.lineStyle = null, this.fillStyle = null;
29707
29707
  }
29708
29708
  }
29709
- const Ri = new St(), Pm = class Rm extends Lp {
29709
+ const Ri = new St(), Pm = class Rm extends Op {
29710
29710
  // eslint-disable-next-line @typescript-eslint/no-useless-constructor
29711
29711
  constructor() {
29712
29712
  super(), this.closePointEps = 1e-4, this.boundsPadding = 0, this.uvsFloat32 = null, this.indicesUint16 = null, this.batchable = !1, this.points = [], this.colors = [], this.uvs = [], this.indices = [], this.textureIds = [], this.graphicsData = [], this.drawCalls = [], this.batchDirty = -1, this.batches = [], this.dirty = 0, this.cacheDirty = -1, this.clearDirty = 0, this.shapeIndex = 0, this._bounds = new fo(), this.boundsDirty = -1;
@@ -29731,7 +29731,7 @@ const Ri = new St(), Pm = class Rm extends Lp {
29731
29731
  this.drawCalls.length = 0;
29732
29732
  for (let t = 0; t < this.batches.length; t++) {
29733
29733
  const e = this.batches[t];
29734
- e.reset(), Ld.push(e);
29734
+ e.reset(), Od.push(e);
29735
29735
  }
29736
29736
  this.batches.length = 0;
29737
29737
  }
@@ -29823,7 +29823,7 @@ const Ri = new St(), Pm = class Rm extends Lp {
29823
29823
  const f = p.texture.baseTexture, m = this.indices.length, _ = this.points.length / 2;
29824
29824
  f.wrapMode = Gr.REPEAT, d === 0 ? this.processFill(h) : this.processLine(h);
29825
29825
  const v = this.points.length / 2 - _;
29826
- v !== 0 && (i && !this._compareStyles(n, p) && (i.end(m, _), i = null), i || (i = Ld.pop() || new rS(), i.begin(p, m, _), this.batches.push(i), n = p), this.addUvs(this.points, t, p.texture, _, v, p.matrix));
29826
+ v !== 0 && (i && !this._compareStyles(n, p) && (i.end(m, _), i = null), i || (i = Od.pop() || new rS(), i.begin(p, m, _), this.batches.push(i), n = p), this.addUvs(this.points, t, p.texture, _, v, p.matrix));
29827
29827
  }
29828
29828
  }
29829
29829
  const s = this.indices.length, o = this.points.length / 2;
@@ -29886,12 +29886,12 @@ const Ri = new St(), Pm = class Rm extends Lp {
29886
29886
  this.drawCalls.length = 0;
29887
29887
  const e = this.colors, i = this.textureIds;
29888
29888
  let n = Cs.pop();
29889
- n || (n = new Ll(), n.texArray = new kl()), n.texArray.count = 0, n.start = 0, n.size = 0, n.type = or.TRIANGLES;
29889
+ n || (n = new Ol(), n.texArray = new kl()), n.texArray.count = 0, n.start = 0, n.size = 0, n.type = or.TRIANGLES;
29890
29890
  let s = 0, o = null, a = 0, l = !1, h = or.TRIANGLES, c = 0;
29891
29891
  this.drawCalls.push(n);
29892
29892
  for (let u = 0; u < this.batches.length; u++) {
29893
29893
  const d = this.batches[u], p = 8, f = d.style, m = f.texture.baseTexture;
29894
- l !== !!f.native && (l = !!f.native, h = l ? or.LINES : or.TRIANGLES, o = null, s = p, t++), o !== m && (o = m, m._batchEnabled !== t && (s === p && (t++, s = 0, n.size > 0 && (n = Cs.pop(), n || (n = new Ll(), n.texArray = new kl()), this.drawCalls.push(n)), n.start = c, n.size = 0, n.texArray.count = 0, n.type = h), m.touched = 1, m._batchEnabled = t, m._batchLocation = s, m.wrapMode = Gr.REPEAT, n.texArray.elements[n.texArray.count++] = m, s++)), n.size += d.size, c += d.size, a = m._batchLocation, this.addColors(e, f.color, f.alpha, d.attribSize, d.attribStart), this.addTextureIds(i, a, d.attribSize, d.attribStart);
29894
+ l !== !!f.native && (l = !!f.native, h = l ? or.LINES : or.TRIANGLES, o = null, s = p, t++), o !== m && (o = m, m._batchEnabled !== t && (s === p && (t++, s = 0, n.size > 0 && (n = Cs.pop(), n || (n = new Ol(), n.texArray = new kl()), this.drawCalls.push(n)), n.start = c, n.size = 0, n.texArray.count = 0, n.type = h), m.touched = 1, m._batchEnabled = t, m._batchLocation = s, m.wrapMode = Gr.REPEAT, n.texArray.elements[n.texArray.count++] = m, s++)), n.size += d.size, c += d.size, a = m._batchLocation, this.addColors(e, f.color, f.alpha, d.attribSize, d.attribStart), this.addTextureIds(i, a, d.attribSize, d.attribStart);
29895
29895
  }
29896
29896
  vt._globalBatch = t, this.packAttributes();
29897
29897
  }
@@ -29915,9 +29915,9 @@ const Ri = new St(), Pm = class Rm extends Lp {
29915
29915
  * @param data
29916
29916
  */
29917
29917
  processLine(t) {
29918
- Od(t, this);
29918
+ Bd(t, this);
29919
29919
  for (let e = 0; e < t.holes.length; e++)
29920
- Od(t.holes[e], this);
29920
+ Bd(t.holes[e], this);
29921
29921
  }
29922
29922
  /**
29923
29923
  * Process the holes data.
@@ -30034,7 +30034,7 @@ class No {
30034
30034
  }
30035
30035
  class Nh extends No {
30036
30036
  constructor() {
30037
- super(...arguments), this.width = 0, this.alignment = 0.5, this.native = !1, this.cap = Fr.BUTT, this.join = Le.MITER, this.miterLimit = 10;
30037
+ super(...arguments), this.width = 0, this.alignment = 0.5, this.native = !1, this.cap = Fr.BUTT, this.join = Oe.MITER, this.miterLimit = 10;
30038
30038
  }
30039
30039
  /** Clones the object. */
30040
30040
  clone() {
@@ -30043,7 +30043,7 @@ class Nh extends No {
30043
30043
  }
30044
30044
  /** Reset the line style to default. */
30045
30045
  reset() {
30046
- super.reset(), this.color = 0, this.alignment = 0.5, this.width = 0, this.native = !1, this.cap = Fr.BUTT, this.join = Le.MITER, this.miterLimit = 10;
30046
+ super.reset(), this.color = 0, this.alignment = 0.5, this.width = 0, this.native = !1, this.cap = Fr.BUTT, this.join = Oe.MITER, this.miterLimit = 10;
30047
30047
  }
30048
30048
  }
30049
30049
  const Ja = {}, ih = class Vs extends We {
@@ -30138,7 +30138,7 @@ const Ja = {}, ih = class Vs extends We {
30138
30138
  alignment: 0.5,
30139
30139
  native: !1,
30140
30140
  cap: Fr.BUTT,
30141
- join: Le.MITER,
30141
+ join: Oe.MITER,
30142
30142
  miterLimit: 10
30143
30143
  };
30144
30144
  t = Object.assign(e, t), this.normalizeColor(t), this.currentPath && this.startPoly();
@@ -30204,7 +30204,7 @@ const Ja = {}, ih = class Vs extends We {
30204
30204
  quadraticCurveTo(t, e, i, n) {
30205
30205
  this._initCurve();
30206
30206
  const s = this.currentPath.points;
30207
- return s.length === 0 && this.moveTo(0, 0), Bh.curveTo(t, e, i, n, s), this;
30207
+ return s.length === 0 && this.moveTo(0, 0), Lh.curveTo(t, e, i, n, s), this;
30208
30208
  }
30209
30209
  /**
30210
30210
  * Calculate the points for a bezier curve and then draws it.
@@ -30217,7 +30217,7 @@ const Ja = {}, ih = class Vs extends We {
30217
30217
  * @returns This Graphics object. Good for chaining method calls
30218
30218
  */
30219
30219
  bezierCurveTo(t, e, i, n, s, o) {
30220
- return this._initCurve(), Lh.curveTo(t, e, i, n, s, o, this.currentPath.points), this;
30220
+ return this._initCurve(), Oh.curveTo(t, e, i, n, s, o, this.currentPath.points), this;
30221
30221
  }
30222
30222
  /**
30223
30223
  * The `arcTo` method creates an arc/curve between two tangents on the canvas.
@@ -30335,7 +30335,7 @@ const Ja = {}, ih = class Vs extends We {
30335
30335
  * @returns - This Graphics object. Good for chaining method calls
30336
30336
  */
30337
30337
  drawRoundedRect(t, e, i, n, s) {
30338
- return this.drawShape(new Oo(t, e, i, n, s));
30338
+ return this.drawShape(new Bo(t, e, i, n, s));
30339
30339
  }
30340
30340
  /**
30341
30341
  * Draws a circle.
@@ -30614,7 +30614,7 @@ class oS {
30614
30614
  (!this.data || this.data.length !== e.length) && (this.data = new Float32Array(e.length)), this.uvMatrix.multiplyUvs(e, this.data), this._updateID++;
30615
30615
  }
30616
30616
  }
30617
- const Qa = new St(), Bd = new ai(), Mm = class Dm extends We {
30617
+ const Qa = new St(), Ld = new ai(), Mm = class Dm extends We {
30618
30618
  /**
30619
30619
  * @param geometry - The geometry the mesh will use.
30620
30620
  * @param {PIXI.MeshMaterial} shader - The shader the mesh will use.
@@ -30774,10 +30774,10 @@ const Qa = new St(), Bd = new ai(), Mm = class Dm extends We {
30774
30774
  if (!this.getBounds().contains(t.x, t.y))
30775
30775
  return !1;
30776
30776
  this.worldTransform.applyInverse(t, Qa);
30777
- const e = this.geometry.getBuffer("aVertexPosition").data, i = Bd.points, n = this.geometry.getIndex().data, s = n.length, o = this.drawMode === 4 ? 3 : 1;
30777
+ const e = this.geometry.getBuffer("aVertexPosition").data, i = Ld.points, n = this.geometry.getIndex().data, s = n.length, o = this.drawMode === 4 ? 3 : 1;
30778
30778
  for (let a = 0; a + 2 < s; a += o) {
30779
30779
  const l = n[a] * 2, h = n[a + 1] * 2, c = n[a + 2] * 2;
30780
- if (i[0] = e[l], i[1] = e[l + 1], i[2] = e[h], i[3] = e[h + 1], i[4] = e[c], i[5] = e[c + 1], Bd.contains(Qa.x, Qa.y))
30780
+ if (i[0] = e[l], i[1] = e[l + 1], i[2] = e[h], i[3] = e[h + 1], i[4] = e[c], i[5] = e[c + 1], Ld.contains(Qa.x, Qa.y))
30781
30781
  return !0;
30782
30782
  }
30783
30783
  return !1;
@@ -31043,7 +31043,7 @@ void main(void){
31043
31043
  vColor = aColor * uColor;
31044
31044
  }
31045
31045
  `;
31046
- class Om extends Lo {
31046
+ class Bm extends Oo {
31047
31047
  /**
31048
31048
  * @param renderer - The renderer this sprite batch works for.
31049
31049
  */
@@ -31214,11 +31214,11 @@ class Om extends Lo {
31214
31214
  super.destroy(), this.shader && (this.shader.destroy(), this.shader = null), this.tempMatrix = null;
31215
31215
  }
31216
31216
  }
31217
- Om.extension = {
31217
+ Bm.extension = {
31218
31218
  name: "particle",
31219
31219
  type: K.RendererPlugin
31220
31220
  };
31221
- ht.add(Om);
31221
+ ht.add(Bm);
31222
31222
  var Fo = /* @__PURE__ */ ((r) => (r[r.LINEAR_VERTICAL = 0] = "LINEAR_VERTICAL", r[r.LINEAR_HORIZONTAL = 1] = "LINEAR_HORIZONTAL", r))(Fo || {});
31223
31223
  const Is = {
31224
31224
  // TextMetrics requires getImageData readback for measuring fonts.
@@ -31644,7 +31644,7 @@ const dS = [
31644
31644
  "cursive",
31645
31645
  "fantasy",
31646
31646
  "system-ui"
31647
- ], Lm = class Cn {
31647
+ ], Om = class Cn {
31648
31648
  /**
31649
31649
  * @param style - TextStyle properties to be set on the text. See {@link PIXI.TextStyle.defaultStyle}
31650
31650
  * for the default values.
@@ -31957,7 +31957,7 @@ const dS = [
31957
31957
  return `${this.fontStyle} ${this.fontVariant} ${this.fontWeight} ${t} ${e.join(",")}`;
31958
31958
  }
31959
31959
  };
31960
- Lm.defaultStyle = {
31960
+ Om.defaultStyle = {
31961
31961
  /**
31962
31962
  * See {@link PIXI.TextStyle.align}
31963
31963
  * @type {'left'|'center'|'right'|'justify'}
@@ -32065,7 +32065,7 @@ Lm.defaultStyle = {
32065
32065
  /** See {@link PIXI.TextStyle.wordWrapWidth} */
32066
32066
  wordWrapWidth: 100
32067
32067
  };
32068
- let Hr = Lm;
32068
+ let Hr = Om;
32069
32069
  function tl(r) {
32070
32070
  const t = Mt.shared, e = (i) => {
32071
32071
  const n = t.setValue(i);
@@ -32089,7 +32089,7 @@ const pS = {
32089
32089
  texture: !0,
32090
32090
  children: !1,
32091
32091
  baseTexture: !0
32092
- }, Bm = class nh extends cn {
32092
+ }, Lm = class nh extends cn {
32093
32093
  /**
32094
32094
  * @param text - The string that you would like the text to display
32095
32095
  * @param style - The style parameters
@@ -32189,7 +32189,7 @@ const pS = {
32189
32189
  updateTexture() {
32190
32190
  const t = this.canvas;
32191
32191
  if (this._style.trim) {
32192
- const o = Lw(t);
32192
+ const o = Ow(t);
32193
32193
  o.data && (t.width = o.width, t.height = o.height, this.context.putImageData(o.data, 0, 0));
32194
32194
  }
32195
32195
  const e = this._texture, i = this._style, n = i.trim ? 0 : i.padding, s = e.baseTexture;
@@ -32340,8 +32340,8 @@ const pS = {
32340
32340
  this._autoResolution = !1, this._resolution !== t && (this._resolution = t, this.dirty = !0);
32341
32341
  }
32342
32342
  };
32343
- Bm.defaultAutoResolution = !0;
32344
- let Nm = Bm;
32343
+ Lm.defaultAutoResolution = !0;
32344
+ let Nm = Lm;
32345
32345
  class mS {
32346
32346
  /**
32347
32347
  * @param maxItemsPerFrame - The maximum number of items that can be prepared each frame.
@@ -32669,7 +32669,7 @@ void main(void)
32669
32669
  }
32670
32670
  `;
32671
32671
  const Ps = new Ft();
32672
- class $m extends Lo {
32672
+ class $m extends Oo {
32673
32673
  /**
32674
32674
  * constructor for renderer
32675
32675
  * @param {PIXI.Renderer} renderer - The renderer this tiling awesomeness works for.
@@ -33140,7 +33140,7 @@ function DS(r, t, e, i, n, s) {
33140
33140
  }
33141
33141
  return a;
33142
33142
  }
33143
- function OS(r, t, e, i, n, s, o) {
33143
+ function BS(r, t, e, i, n, s, o) {
33144
33144
  const a = e.text, l = e.fontProperties;
33145
33145
  t.translate(i, n), t.scale(s, s);
33146
33146
  const h = o.strokeThickness / 2, c = -(o.strokeThickness / 2);
@@ -33157,7 +33157,7 @@ function js(r) {
33157
33157
  function Vm(r) {
33158
33158
  return Array.from ? Array.from(r) : r.split("");
33159
33159
  }
33160
- function LS(r) {
33160
+ function OS(r) {
33161
33161
  typeof r == "string" && (r = [r]);
33162
33162
  const t = [];
33163
33163
  for (let e = 0, i = r.length; e < i; e++) {
@@ -33310,7 +33310,7 @@ const Ir = class tr {
33310
33310
  textureWidth: a,
33311
33311
  textureHeight: l,
33312
33312
  ...h
33313
- } = Object.assign({}, tr.defaultOptions, i), c = LS(n), u = e instanceof Hr ? e : new Hr(e), d = a, p = new vo();
33313
+ } = Object.assign({}, tr.defaultOptions, i), c = OS(n), u = e instanceof Hr ? e : new Hr(e), d = a, p = new vo();
33314
33314
  p.info[0] = {
33315
33315
  face: u.fontFamily,
33316
33316
  size: u.fontSize
@@ -33337,7 +33337,7 @@ const Ir = class tr {
33337
33337
  --R, m += g * o, m = Math.ceil(m), f = 0, g = 0;
33338
33338
  continue;
33339
33339
  }
33340
- OS(_, v, P, f, m, o, u);
33340
+ BS(_, v, P, f, m, o, u);
33341
33341
  const I = js(P.text);
33342
33342
  p.char.push({
33343
33343
  id: I,
@@ -33399,7 +33399,7 @@ Ir.defaultOptions = {
33399
33399
  }, /** Collection of available/installed fonts. */
33400
33400
  Ir.available = {};
33401
33401
  let Pr = Ir;
33402
- var BS = `// Pixi texture info\r
33402
+ var LS = `// Pixi texture info\r
33403
33403
  varying vec2 vTextureCoord;\r
33404
33404
  uniform sampler2D uSampler;\r
33405
33405
  \r
@@ -33497,14 +33497,14 @@ const $d = [], Hd = [], Xd = [], FS = class zm extends We {
33497
33497
  if (!S)
33498
33498
  continue;
33499
33499
  d && S.kerning[d] && (n.x += S.kerning[d]);
33500
- const B = Xd.pop() || {
33500
+ const L = Xd.pop() || {
33501
33501
  texture: at.EMPTY,
33502
33502
  line: 0,
33503
33503
  charCode: 0,
33504
33504
  prevSpaces: 0,
33505
33505
  position: new St()
33506
33506
  };
33507
- B.texture = S.texture, B.line = m, B.charCode = E, B.position.x = Math.round(n.x + S.xOffset + this._letterSpacing / 2), B.position.y = Math.round(n.y + S.yOffset), B.prevSpaces = b, s.push(B), p = B.position.x + Math.max(S.xAdvance - S.xOffset, S.texture.orig.width), n.x += S.xAdvance + this._letterSpacing, g = Math.max(g, S.yOffset + S.texture.height), d = E, _ !== -1 && c > 0 && n.x > c && (++y, Ki(s, 1 + _ - y, 1 + I - _), I = _, _ = -1, o.push(v), a.push(s.length > 0 ? s[s.length - 1].prevSpaces : 0), f = Math.max(f, v), m++, n.x = 0, n.y += t.lineHeight, d = null, b = 0);
33507
+ L.texture = S.texture, L.line = m, L.charCode = E, L.position.x = Math.round(n.x + S.xOffset + this._letterSpacing / 2), L.position.y = Math.round(n.y + S.yOffset), L.prevSpaces = b, s.push(L), p = L.position.x + Math.max(S.xAdvance - S.xOffset, S.texture.orig.width), n.x += S.xAdvance + this._letterSpacing, g = Math.max(g, S.yOffset + S.texture.height), d = E, _ !== -1 && c > 0 && n.x > c && (++y, Ki(s, 1 + _ - y, 1 + I - _), I = _, _ = -1, o.push(v), a.push(s.length > 0 ? s[s.length - 1].prevSpaces : 0), f = Math.max(f, v), m++, n.x = 0, n.y += t.lineHeight, d = null, b = 0);
33508
33508
  }
33509
33509
  const C = h[h.length - 1];
33510
33510
  C !== "\r" && C !== `
@@ -33525,24 +33525,24 @@ const $d = [], Hd = [], Xd = [], FS = class zm extends We {
33525
33525
  let N, H;
33526
33526
  t.distanceFieldType === "none" ? (N = new Fd(at.EMPTY), H = mt.NORMAL) : (N = new Fd(
33527
33527
  at.EMPTY,
33528
- { program: wr.from(NS, BS), uniforms: { uFWidth: 0 } }
33528
+ { program: wr.from(NS, LS), uniforms: { uFWidth: 0 } }
33529
33529
  ), H = mt.NORMAL_NPM);
33530
- const O = new Nd(D, N);
33531
- O.blendMode = H, S = {
33530
+ const B = new Nd(D, N);
33531
+ B.blendMode = H, S = {
33532
33532
  index: 0,
33533
33533
  indexCount: 0,
33534
33534
  vertexCount: 0,
33535
33535
  uvsCount: 0,
33536
33536
  total: 0,
33537
- mesh: O,
33537
+ mesh: B,
33538
33538
  vertices: null,
33539
33539
  uvs: null,
33540
33540
  indices: null
33541
33541
  };
33542
33542
  }
33543
33543
  S.index = 0, S.indexCount = 0, S.vertexCount = 0, S.uvsCount = 0, S.total = 0;
33544
- const { _textureCache: B } = this;
33545
- B[E] = B[E] || new at(T.baseTexture), S.mesh.texture = B[E], S.mesh.tint = this._tintColor.value, M.push(S), P[E] = S;
33544
+ const { _textureCache: L } = this;
33545
+ L[E] = L[E] || new at(T.baseTexture), S.mesh.texture = L[E], S.mesh.tint = this._tintColor.value, M.push(S), P[E] = S;
33546
33546
  }
33547
33547
  P[E].total++;
33548
33548
  }
@@ -33556,9 +33556,9 @@ const $d = [], Hd = [], Xd = [], FS = class zm extends We {
33556
33556
  if (!(((U = T.indices) == null ? void 0 : U.length) > 6 * E) || T.vertices.length < Nd.BATCHABLE_SIZE * 2)
33557
33557
  T.vertices = new Float32Array(4 * 2 * E), T.uvs = new Float32Array(4 * 2 * E), T.indices = new Uint16Array(6 * E);
33558
33558
  else {
33559
- const S = T.total, B = T.vertices;
33560
- for (let D = S * 4 * 2; D < B.length; D++)
33561
- B[D] = 0;
33559
+ const S = T.total, L = T.vertices;
33560
+ for (let D = S * 4 * 2; D < L.length; D++)
33561
+ L[D] = 0;
33562
33562
  }
33563
33563
  T.mesh.size = 6 * E;
33564
33564
  }
@@ -33566,8 +33566,8 @@ const $d = [], Hd = [], Xd = [], FS = class zm extends We {
33566
33566
  const T = s[I];
33567
33567
  let E = T.position.x + R[T.line] * (this._align === "justify" ? T.prevSpaces : 1);
33568
33568
  this._roundPixels && (E = Math.round(E));
33569
- const S = E * i, B = T.position.y * i, D = T.texture, N = P[D.baseTexture.uid], H = D.frame, O = D._uvs, L = N.index++;
33570
- N.indices[L * 6 + 0] = 0 + L * 4, N.indices[L * 6 + 1] = 1 + L * 4, N.indices[L * 6 + 2] = 2 + L * 4, N.indices[L * 6 + 3] = 0 + L * 4, N.indices[L * 6 + 4] = 2 + L * 4, N.indices[L * 6 + 5] = 3 + L * 4, N.vertices[L * 8 + 0] = S, N.vertices[L * 8 + 1] = B, N.vertices[L * 8 + 2] = S + H.width * i, N.vertices[L * 8 + 3] = B, N.vertices[L * 8 + 4] = S + H.width * i, N.vertices[L * 8 + 5] = B + H.height * i, N.vertices[L * 8 + 6] = S, N.vertices[L * 8 + 7] = B + H.height * i, N.uvs[L * 8 + 0] = O.x0, N.uvs[L * 8 + 1] = O.y0, N.uvs[L * 8 + 2] = O.x1, N.uvs[L * 8 + 3] = O.y1, N.uvs[L * 8 + 4] = O.x2, N.uvs[L * 8 + 5] = O.y2, N.uvs[L * 8 + 6] = O.x3, N.uvs[L * 8 + 7] = O.y3;
33569
+ const S = E * i, L = T.position.y * i, D = T.texture, N = P[D.baseTexture.uid], H = D.frame, B = D._uvs, O = N.index++;
33570
+ N.indices[O * 6 + 0] = 0 + O * 4, N.indices[O * 6 + 1] = 1 + O * 4, N.indices[O * 6 + 2] = 2 + O * 4, N.indices[O * 6 + 3] = 0 + O * 4, N.indices[O * 6 + 4] = 2 + O * 4, N.indices[O * 6 + 5] = 3 + O * 4, N.vertices[O * 8 + 0] = S, N.vertices[O * 8 + 1] = L, N.vertices[O * 8 + 2] = S + H.width * i, N.vertices[O * 8 + 3] = L, N.vertices[O * 8 + 4] = S + H.width * i, N.vertices[O * 8 + 5] = L + H.height * i, N.vertices[O * 8 + 6] = S, N.vertices[O * 8 + 7] = L + H.height * i, N.uvs[O * 8 + 0] = B.x0, N.uvs[O * 8 + 1] = B.y0, N.uvs[O * 8 + 2] = B.x1, N.uvs[O * 8 + 3] = B.y1, N.uvs[O * 8 + 4] = B.x2, N.uvs[O * 8 + 5] = B.y2, N.uvs[O * 8 + 6] = B.x3, N.uvs[O * 8 + 7] = B.y3;
33571
33571
  }
33572
33572
  this._textWidth = f * i, this._textHeight = (n.y + t.lineHeight) * i;
33573
33573
  for (const I in P) {
@@ -33575,12 +33575,12 @@ const $d = [], Hd = [], Xd = [], FS = class zm extends We {
33575
33575
  if (this.anchor.x !== 0 || this.anchor.y !== 0) {
33576
33576
  let D = 0;
33577
33577
  const N = this._textWidth * this.anchor.x, H = this._textHeight * this.anchor.y;
33578
- for (let O = 0; O < T.total; O++)
33578
+ for (let B = 0; B < T.total; B++)
33579
33579
  T.vertices[D++] -= N, T.vertices[D++] -= H, T.vertices[D++] -= N, T.vertices[D++] -= H, T.vertices[D++] -= N, T.vertices[D++] -= H, T.vertices[D++] -= N, T.vertices[D++] -= H;
33580
33580
  }
33581
33581
  this._maxLineHeight = g * i;
33582
- const E = T.mesh.geometry.getBuffer("aVertexPosition"), S = T.mesh.geometry.getBuffer("aTextureCoord"), B = T.mesh.geometry.getIndex();
33583
- E.data = T.vertices, S.data = T.uvs, B.data = T.indices, E.update(), S.update(), B.update();
33582
+ const E = T.mesh.geometry.getBuffer("aVertexPosition"), S = T.mesh.geometry.getBuffer("aTextureCoord"), L = T.mesh.geometry.getIndex();
33583
+ E.data = T.vertices, S.data = T.uvs, L.data = T.indices, E.update(), S.update(), L.update();
33584
33584
  }
33585
33585
  for (let I = 0; I < s.length; I++)
33586
33586
  Xd.push(s[I]);
@@ -34269,7 +34269,7 @@ Rs.defaultMaxWidth = 2024, /** Default maxHeight, set at construction */
34269
34269
  Rs.defaultMaxHeight = 2024, /** Default autoResolution for all HTMLText objects */
34270
34270
  Rs.defaultAutoResolution = !0;
34271
34271
  const GS = 16777215, $S = 0.25, HS = 16777215, XS = 1, VS = 1.5;
34272
- let Or = !1, en;
34272
+ let Br = !1, en;
34273
34273
  const hh = (r) => {
34274
34274
  const t = {
34275
34275
  tint: r != null && r.fill ? new Mt(r.fill).toNumber() : GS,
@@ -34332,9 +34332,9 @@ const hh = (r) => {
34332
34332
  return r.viewport.getZoom(!0) * t / r.world.getContentFactor();
34333
34333
  }, Vd = (r, t, e, i) => () => {
34334
34334
  const n = r.viewport.viewportToImageRectangle(r.viewport.getBounds(!0)), s = jm(r);
34335
- (s !== en || !Or) && (Or = !0, e.forEach(({ stroke: d, strokeWidth: p }) => {
34335
+ (s !== en || !Br) && (Br = !0, e.forEach(({ stroke: d, strokeWidth: p }) => {
34336
34336
  const { lineStyle: f } = d.geometry.graphicsData[0];
34337
- p > 1 ? (Or = s === en, f.width = p / s, f.native = !1, d.geometry.invalidate()) : p === 1 && !f.native && (f.width = 1, f.native = !0, d.geometry.invalidate());
34337
+ p > 1 ? (Br = s === en, f.width = p / s, f.native = !1, d.geometry.invalidate()) : p === 1 && !f.native && (f.width = 1, f.native = !0, d.geometry.invalidate());
34338
34338
  })), en = s;
34339
34339
  const o = r.viewport.getFlip();
34340
34340
  let a = Math.PI * r.viewport.getRotation(!0) / 180;
@@ -34357,7 +34357,7 @@ const hh = (r) => {
34357
34357
  let s = /* @__PURE__ */ new Set(), o, a;
34358
34358
  en = jm(r);
34359
34359
  const l = (g, b) => {
34360
- Or = !1;
34360
+ Br = !1;
34361
34361
  const C = n.get(g.id);
34362
34362
  C && (C.fill.destroy(), C.stroke.destroy());
34363
34363
  const { selector: R } = g.target, A = typeof a == "function" ? a(g, b) : a;
@@ -34379,7 +34379,7 @@ const hh = (r) => {
34379
34379
  const b = n.get(g.id);
34380
34380
  b && (n.delete(g.id), b.fill.destroy(), b.stroke.destroy());
34381
34381
  }, c = (g, b, C) => {
34382
- Or = !1;
34382
+ Br = !1;
34383
34383
  const R = n.get(g.id);
34384
34384
  if (R && (n.delete(g.id), R.fill.destroy(), R.stroke.destroy(), l(b, C), s.has(b.id))) {
34385
34385
  const { fill: A, stroke: P } = n.get(b.id);
@@ -34391,7 +34391,7 @@ const hh = (r) => {
34391
34391
  }, d = (g, b) => {
34392
34392
  i.resize(g, b), i.render(e);
34393
34393
  }, p = (g) => {
34394
- Or = !1;
34394
+ Br = !1;
34395
34395
  const { children: b } = e;
34396
34396
  n.forEach(({ fill: C, stroke: R, annotation: A }) => {
34397
34397
  const P = g ? s.has(A.id) || g(A) : !0;
@@ -34411,7 +34411,7 @@ const hh = (r) => {
34411
34411
  }, _ = (g) => {
34412
34412
  if (typeof g == "function")
34413
34413
  n.forEach(({ annotation: b, fill: C, stroke: R, strokeWidth: A }, P) => {
34414
- A > 1 && (Or = !1);
34414
+ A > 1 && (Br = !1);
34415
34415
  const M = {
34416
34416
  selected: s.has(b.id),
34417
34417
  hovered: o === b.id
@@ -34420,7 +34420,7 @@ const hh = (r) => {
34420
34420
  });
34421
34421
  else {
34422
34422
  const { fillStyle: b, strokeStyle: C } = hh(g);
34423
- C.lineWidth > 1 && (Or = !1), n.forEach(({ annotation: R, fill: A, stroke: P, strokeWidth: M }, k) => {
34423
+ C.lineWidth > 1 && (Br = !1), n.forEach(({ annotation: R, fill: A, stroke: P, strokeWidth: M }, k) => {
34424
34424
  A.tint = b.tint, A.alpha = b.alpha, P.tint = C.tint || 16777215, P.alpha = C.alpha, n.set(R.id, { annotation: R, fill: A, stroke: P, strokeWidth: C.lineWidth });
34425
34425
  });
34426
34426
  }
@@ -34462,7 +34462,7 @@ function JS(r, t, e) {
34462
34462
  if (!_) return;
34463
34463
  const P = A.originalEvent, { x: M, y: k } = A.position, U = M - _.x, I = k - _.y;
34464
34464
  if (Math.sqrt(U * U + I * I) < 5) {
34465
- const { x: E, y: S } = v(A.position), B = y(), D = c.getAt(E, S, s, B);
34465
+ const { x: E, y: S } = v(A.position), L = y(), D = c.getAt(E, S, s, L);
34466
34466
  D ? f("click", { originalEvent: P, annotation: D }) : f("click", { originalEvent: P });
34467
34467
  }
34468
34468
  _ = void 0;
@@ -34476,8 +34476,8 @@ function JS(r, t, e) {
34476
34476
  M.addEventListener("pointermove", k);
34477
34477
  const U = new ResizeObserver((N) => {
34478
34478
  try {
34479
- const { width: H, height: O } = N[0].contentRect;
34480
- M.width = H, M.height = O, m.resize(H, O);
34479
+ const { width: H, height: B } = N[0].contentRect;
34480
+ M.width = H, M.height = B, m.resize(H, B);
34481
34481
  } catch {
34482
34482
  console.warn("WebGL canvas already disposed");
34483
34483
  }
@@ -34486,38 +34486,38 @@ function JS(r, t, e) {
34486
34486
  const I = () => {
34487
34487
  const N = l.viewport.getBounds();
34488
34488
  R = l.viewport.viewportToImageRectangle(N);
34489
- const { x: H, y: O, width: L, height: $ } = R, F = c.getIntersecting(H, O, L, $);
34489
+ const { x: H, y: B, width: O, height: $ } = R, F = c.getIntersecting(H, B, O, $);
34490
34490
  p.set(F.map((X) => X.id));
34491
34491
  };
34492
34492
  l.addHandler("canvas-press", g), l.addHandler("canvas-release", C), l.addHandler("update-viewport", m.redraw), l.addHandler("animation-finish", I);
34493
- const T = (N) => N.filter((H) => Be(H)), E = (N) => Be(N.oldValue) && Be(N.newValue), S = (N) => {
34493
+ const T = (N) => N.filter((H) => Le(H)), E = (N) => Le(N.oldValue) && Le(N.newValue), S = (N) => {
34494
34494
  const { selector: H } = N.target;
34495
34495
  if (H.type === yt.POLYGON) {
34496
- const O = Y_(H);
34496
+ const B = Y_(H);
34497
34497
  return {
34498
34498
  ...N,
34499
- target: { ...N.target, selector: { ...O } }
34499
+ target: { ...N.target, selector: { ...B } }
34500
34500
  };
34501
34501
  } else if (H.type === yt.MULTIPOLYGON) {
34502
- const O = j_(H);
34502
+ const B = j_(H);
34503
34503
  return {
34504
34504
  ...N,
34505
- target: { ...N.target, selector: { ...O } }
34505
+ target: { ...N.target, selector: { ...B } }
34506
34506
  };
34507
34507
  } else
34508
34508
  return N;
34509
- }, B = (N) => {
34510
- const { created: H, updated: O, deleted: L } = N.changes, $ = (H || []).filter((F) => Be(F)).map(S);
34511
- if (T(L || []).forEach((F) => m.removeAnnotation(F)), $.forEach((F) => m.addAnnotation(F)), (O || []).filter((F) => E(F)).map(({ oldValue: F, newValue: X }) => ({ oldValue: F, newValue: S(X) })).forEach(({ oldValue: F, newValue: X }) => m.updateAnnotation(F, X)), R) {
34509
+ }, L = (N) => {
34510
+ const { created: H, updated: B, deleted: O } = N.changes, $ = (H || []).filter((F) => Le(F)).map(S);
34511
+ if (T(O || []).forEach((F) => m.removeAnnotation(F)), $.forEach((F) => m.addAnnotation(F)), (B || []).filter((F) => E(F)).map(({ oldValue: F, newValue: X }) => ({ oldValue: F, newValue: S(X) })).forEach(({ oldValue: F, newValue: X }) => m.updateAnnotation(F, X)), R) {
34512
34512
  const { x: F, y: X, width: V, height: dt } = R, pt = c.getIntersecting(F, X, V, dt);
34513
34513
  p.set(pt.map((z) => z.id));
34514
34514
  } else
34515
34515
  p.set(c.all().map((F) => F.id));
34516
34516
  m.redraw();
34517
34517
  };
34518
- return c.observe(B), () => {
34518
+ return c.observe(L), () => {
34519
34519
  var N;
34520
- M.removeEventListener("pointermove", k), U.disconnect(), l.removeHandler("canvas-press", g), l.removeHandler("canvas-release", C), l.removeHandler("update-viewport", m.redraw), l.removeHandler("animation-finish", I), c.unobserve(B), m.destroy(), (N = M.parentNode) == null || N.removeChild(M);
34520
+ M.removeEventListener("pointermove", k), U.disconnect(), l.removeHandler("canvas-press", g), l.removeHandler("canvas-release", C), l.removeHandler("update-viewport", m.redraw), l.removeHandler("animation-finish", I), c.unobserve(L), m.destroy(), (N = M.parentNode) == null || N.removeChild(M);
34521
34521
  };
34522
34522
  }), r.$$set = (A) => {
34523
34523
  "filter" in A && e(2, s = A.filter), "state" in A && e(3, o = A.state), "style" in A && e(4, a = A.style), "viewer" in A && e(5, l = A.viewer), "visible" in A && e(6, h = A.visible);
@@ -34839,10 +34839,10 @@ function Wd(r) {
34839
34839
  r[16]
34840
34840
  ), {
34841
34841
  c() {
34842
- Bt(t.$$.fragment);
34842
+ Lt(t.$$.fragment);
34843
34843
  },
34844
34844
  m(i, n) {
34845
- Ot(t, i, n), e = !0;
34845
+ Bt(t, i, n), e = !0;
34846
34846
  },
34847
34847
  p(i, n) {
34848
34848
  const s = {};
@@ -34867,7 +34867,7 @@ function Wd(r) {
34867
34867
  ot(t.$$.fragment, i), e = !1;
34868
34868
  },
34869
34869
  d(i) {
34870
- Lt(t, i);
34870
+ Ot(t, i);
34871
34871
  }
34872
34872
  };
34873
34873
  }
@@ -34901,7 +34901,7 @@ function Yd(r) {
34901
34901
  }
34902
34902
  function qd(r) {
34903
34903
  let t, e;
34904
- return t = new Bv({
34904
+ return t = new Lv({
34905
34905
  props: {
34906
34906
  target: (
34907
34907
  /*drawingEl*/
@@ -34954,10 +34954,10 @@ function qd(r) {
34954
34954
  r[14]
34955
34955
  ), {
34956
34956
  c() {
34957
- Bt(t.$$.fragment);
34957
+ Lt(t.$$.fragment);
34958
34958
  },
34959
34959
  m(i, n) {
34960
- Ot(t, i, n), e = !0;
34960
+ Bt(t, i, n), e = !0;
34961
34961
  },
34962
34962
  p(i, n) {
34963
34963
  r = i;
@@ -34984,7 +34984,7 @@ function qd(r) {
34984
34984
  ot(t.$$.fragment, i), e = !1;
34985
34985
  },
34986
34986
  d(i) {
34987
- Lt(t, i);
34987
+ Ot(t, i);
34988
34988
  }
34989
34989
  };
34990
34990
  }
@@ -35113,10 +35113,10 @@ function h2(r) {
35113
35113
  }
35114
35114
  }), {
35115
35115
  c() {
35116
- Bt(t.$$.fragment);
35116
+ Lt(t.$$.fragment);
35117
35117
  },
35118
35118
  m(i, n) {
35119
- Ot(t, i, n), e = !0;
35119
+ Bt(t, i, n), e = !0;
35120
35120
  },
35121
35121
  p(i, n) {
35122
35122
  const s = {};
@@ -35133,7 +35133,7 @@ function h2(r) {
35133
35133
  ot(t.$$.fragment, i), e = !1;
35134
35134
  },
35135
35135
  d(i) {
35136
- Lt(t, i);
35136
+ Ot(t, i);
35137
35137
  }
35138
35138
  };
35139
35139
  }
@@ -35157,7 +35157,7 @@ function c2(r, t, e) {
35157
35157
  }, E = () => {
35158
35158
  const F = m.viewport.getContainerSize().x;
35159
35159
  return m.viewport.getZoom(!0) * F / m.world.getContentFactor();
35160
- }, S = () => 2 / E(), B = (F) => {
35160
+ }, S = () => 2 / E(), L = (F) => {
35161
35161
  m.setMouseNavEnabled(!1), U = F.timeStamp;
35162
35162
  }, D = (F) => {
35163
35163
  if (m.setMouseNavEnabled(!0), performance.now() - (U || 0) < 300) {
@@ -35190,7 +35190,7 @@ function c2(r, t, e) {
35190
35190
  }
35191
35191
  };
35192
35192
  R.addAnnotation(V), A.setSelected(V.id), m.setMouseNavEnabled(!0);
35193
- }, O = (F) => ph(F);
35193
+ }, B = (F) => ph(F);
35194
35194
  gi(() => {
35195
35195
  const F = (X) => {
35196
35196
  if (o.selected.length === 0) return;
@@ -35202,7 +35202,7 @@ function c2(r, t, e) {
35202
35202
  (X = m.element) == null || X.removeEventListener("pointermove", F);
35203
35203
  };
35204
35204
  });
35205
- const L = (F) => Be(F);
35205
+ const O = (F) => Le(F);
35206
35206
  function $(F) {
35207
35207
  Zs[F ? "unshift" : "push"](() => {
35208
35208
  C = F, e(8, C);
@@ -35232,11 +35232,11 @@ function c2(r, t, e) {
35232
35232
  i,
35233
35233
  A,
35234
35234
  T,
35235
- B,
35235
+ L,
35236
35236
  D,
35237
35237
  N,
35238
35238
  H,
35239
- O,
35239
+ B,
35240
35240
  l,
35241
35241
  h,
35242
35242
  c,
@@ -35246,7 +35246,7 @@ function c2(r, t, e) {
35246
35246
  g,
35247
35247
  b,
35248
35248
  o,
35249
- L,
35249
+ O,
35250
35250
  $
35251
35251
  ];
35252
35252
  }
@@ -35395,12 +35395,12 @@ function p2(r) {
35395
35395
  }
35396
35396
  }), {
35397
35397
  c() {
35398
- t = et("g"), Bt(e.$$.fragment), i = et("polygon"), w(i, "class", "a9s-presence-shape a9s-presence-polygon svelte-fgq4n0"), w(i, "stroke", n = /*user*/
35398
+ t = et("g"), Lt(e.$$.fragment), i = et("polygon"), w(i, "class", "a9s-presence-shape a9s-presence-polygon svelte-fgq4n0"), w(i, "stroke", n = /*user*/
35399
35399
  r[0].appearance.color), w(i, "fill", "transparent"), w(i, "points", s = /*geom*/
35400
35400
  r[2].points.map(Zd).join(" ")), w(t, "class", "a9s-presence-overlay");
35401
35401
  },
35402
35402
  m(a, l) {
35403
- st(a, t, l), Ot(e, t, null), At(t, i), o = !0;
35403
+ st(a, t, l), Bt(e, t, null), At(t, i), o = !0;
35404
35404
  },
35405
35405
  p(a, [l]) {
35406
35406
  const h = {};
@@ -35425,7 +35425,7 @@ function p2(r) {
35425
35425
  ot(e.$$.fragment, a), o = !1;
35426
35426
  },
35427
35427
  d(a) {
35428
- a && nt(t), Lt(e);
35428
+ a && nt(t), Ot(e);
35429
35429
  }
35430
35430
  };
35431
35431
  }
@@ -35474,7 +35474,7 @@ function y2(r) {
35474
35474
  }
35475
35475
  }), {
35476
35476
  c() {
35477
- t = et("g"), Bt(e.$$.fragment), i = et("rect"), w(i, "class", "a9s-presence-shape a9s-presence-rectangle svelte-gze948"), w(i, "stroke", n = /*user*/
35477
+ t = et("g"), Lt(e.$$.fragment), i = et("rect"), w(i, "class", "a9s-presence-shape a9s-presence-rectangle svelte-gze948"), w(i, "stroke", n = /*user*/
35478
35478
  r[0].appearance.color), w(i, "fill", "transparent"), w(i, "x", s = /*geom*/
35479
35479
  r[2].x), w(i, "y", o = /*geom*/
35480
35480
  r[2].y), w(i, "width", a = /*geom*/
@@ -35482,7 +35482,7 @@ function y2(r) {
35482
35482
  r[2].h), w(t, "class", "a9s-presence-overlay");
35483
35483
  },
35484
35484
  m(c, u) {
35485
- st(c, t, u), Ot(e, t, null), At(t, i), h = !0;
35485
+ st(c, t, u), Bt(e, t, null), At(t, i), h = !0;
35486
35486
  },
35487
35487
  p(c, [u]) {
35488
35488
  const d = {};
@@ -35513,7 +35513,7 @@ function y2(r) {
35513
35513
  ot(e.$$.fragment, c), h = !1;
35514
35514
  },
35515
35515
  d(c) {
35516
- c && nt(t), Lt(e);
35516
+ c && nt(t), Ot(e);
35517
35517
  }
35518
35518
  };
35519
35519
  }
@@ -35555,10 +35555,10 @@ function Qd(r) {
35555
35555
  }
35556
35556
  }), {
35557
35557
  c() {
35558
- Bt(t.$$.fragment);
35558
+ Lt(t.$$.fragment);
35559
35559
  },
35560
35560
  m(i, n) {
35561
- Ot(t, i, n), e = !0;
35561
+ Bt(t, i, n), e = !0;
35562
35562
  },
35563
35563
  p(i, n) {
35564
35564
  const s = {};
@@ -35574,7 +35574,7 @@ function Qd(r) {
35574
35574
  ot(t.$$.fragment, i), e = !1;
35575
35575
  },
35576
35576
  d(i) {
35577
- Lt(t, i);
35577
+ Ot(t, i);
35578
35578
  }
35579
35579
  };
35580
35580
  }
@@ -35653,10 +35653,10 @@ function x2(r) {
35653
35653
  }
35654
35654
  }), {
35655
35655
  c() {
35656
- Bt(t.$$.fragment);
35656
+ Lt(t.$$.fragment);
35657
35657
  },
35658
35658
  m(i, n) {
35659
- Ot(t, i, n), e = !0;
35659
+ Bt(t, i, n), e = !0;
35660
35660
  },
35661
35661
  p(i, n) {
35662
35662
  const s = {};
@@ -35675,7 +35675,7 @@ function x2(r) {
35675
35675
  ot(t.$$.fragment, i), e = !1;
35676
35676
  },
35677
35677
  d(i) {
35678
- Lt(t, i);
35678
+ Ot(t, i);
35679
35679
  }
35680
35680
  };
35681
35681
  }
@@ -35698,10 +35698,10 @@ function w2(r) {
35698
35698
  }
35699
35699
  }), {
35700
35700
  c() {
35701
- Bt(t.$$.fragment);
35701
+ Lt(t.$$.fragment);
35702
35702
  },
35703
35703
  m(i, n) {
35704
- Ot(t, i, n), e = !0;
35704
+ Bt(t, i, n), e = !0;
35705
35705
  },
35706
35706
  p(i, n) {
35707
35707
  const s = {};
@@ -35720,7 +35720,7 @@ function w2(r) {
35720
35720
  ot(t.$$.fragment, i), e = !1;
35721
35721
  },
35722
35722
  d(i) {
35723
- Lt(t, i);
35723
+ Ot(t, i);
35724
35724
  }
35725
35725
  };
35726
35726
  }
@@ -35974,7 +35974,7 @@ function nf(r) {
35974
35974
  }
35975
35975
  };
35976
35976
  }
35977
- function O2(r) {
35977
+ function B2(r) {
35978
35978
  let t, e = ve(
35979
35979
  /*polygons*/
35980
35980
  r[0]
@@ -36016,16 +36016,16 @@ function O2(r) {
36016
36016
  }
36017
36017
  };
36018
36018
  }
36019
- function L2(r, t, e) {
36019
+ function O2(r, t, e) {
36020
36020
  let { annotation: i } = t;
36021
36021
  const { polygons: n } = i.target.selector.geometry;
36022
36022
  return r.$$set = (s) => {
36023
36023
  "annotation" in s && e(1, i = s.annotation);
36024
36024
  }, [n, i];
36025
36025
  }
36026
- class B2 extends Wt {
36026
+ class L2 extends Wt {
36027
36027
  constructor(t) {
36028
- super(), jt(this, t, L2, O2, Ut, { annotation: 1 });
36028
+ super(), jt(this, t, O2, B2, Ut, { annotation: 1 });
36029
36029
  }
36030
36030
  }
36031
36031
  function N2(r) {
@@ -36179,10 +36179,10 @@ function af(r) {
36179
36179
  }
36180
36180
  }), {
36181
36181
  c() {
36182
- Bt(t.$$.fragment);
36182
+ Lt(t.$$.fragment);
36183
36183
  },
36184
36184
  m(i, n) {
36185
- Ot(t, i, n), e = !0;
36185
+ Bt(t, i, n), e = !0;
36186
36186
  },
36187
36187
  p(i, n) {
36188
36188
  const s = {};
@@ -36198,7 +36198,7 @@ function af(r) {
36198
36198
  ot(t.$$.fragment, i), e = !1;
36199
36199
  },
36200
36200
  d(i) {
36201
- Lt(t, i);
36201
+ Ot(t, i);
36202
36202
  }
36203
36203
  };
36204
36204
  }
@@ -36209,10 +36209,10 @@ function j2(r) {
36209
36209
  r[10]
36210
36210
  ) } }), {
36211
36211
  c() {
36212
- Bt(t.$$.fragment);
36212
+ Lt(t.$$.fragment);
36213
36213
  },
36214
36214
  m(i, n) {
36215
- Ot(t, i, n), e = !0;
36215
+ Bt(t, i, n), e = !0;
36216
36216
  },
36217
36217
  p(i, n) {
36218
36218
  const s = {};
@@ -36227,7 +36227,7 @@ function j2(r) {
36227
36227
  ot(t.$$.fragment, i), e = !1;
36228
36228
  },
36229
36229
  d(i) {
36230
- Lt(t, i);
36230
+ Ot(t, i);
36231
36231
  }
36232
36232
  };
36233
36233
  }
@@ -36238,10 +36238,10 @@ function W2(r) {
36238
36238
  r[10]
36239
36239
  ) } }), {
36240
36240
  c() {
36241
- Bt(t.$$.fragment);
36241
+ Lt(t.$$.fragment);
36242
36242
  },
36243
36243
  m(i, n) {
36244
- Ot(t, i, n), e = !0;
36244
+ Bt(t, i, n), e = !0;
36245
36245
  },
36246
36246
  p(i, n) {
36247
36247
  const s = {};
@@ -36256,7 +36256,7 @@ function W2(r) {
36256
36256
  ot(t.$$.fragment, i), e = !1;
36257
36257
  },
36258
36258
  d(i) {
36259
- Lt(t, i);
36259
+ Ot(t, i);
36260
36260
  }
36261
36261
  };
36262
36262
  }
@@ -36267,10 +36267,10 @@ function Y2(r) {
36267
36267
  r[10]
36268
36268
  ) } }), {
36269
36269
  c() {
36270
- Bt(t.$$.fragment);
36270
+ Lt(t.$$.fragment);
36271
36271
  },
36272
36272
  m(i, n) {
36273
- Ot(t, i, n), e = !0;
36273
+ Bt(t, i, n), e = !0;
36274
36274
  },
36275
36275
  p(i, n) {
36276
36276
  const s = {};
@@ -36285,21 +36285,21 @@ function Y2(r) {
36285
36285
  ot(t.$$.fragment, i), e = !1;
36286
36286
  },
36287
36287
  d(i) {
36288
- Lt(t, i);
36288
+ Ot(t, i);
36289
36289
  }
36290
36290
  };
36291
36291
  }
36292
36292
  function q2(r) {
36293
36293
  let t, e;
36294
- return t = new B2({ props: { annotation: (
36294
+ return t = new L2({ props: { annotation: (
36295
36295
  /*a*/
36296
36296
  r[10]
36297
36297
  ) } }), {
36298
36298
  c() {
36299
- Bt(t.$$.fragment);
36299
+ Lt(t.$$.fragment);
36300
36300
  },
36301
36301
  m(i, n) {
36302
- Ot(t, i, n), e = !0;
36302
+ Bt(t, i, n), e = !0;
36303
36303
  },
36304
36304
  p(i, n) {
36305
36305
  const s = {};
@@ -36314,7 +36314,7 @@ function q2(r) {
36314
36314
  ot(t.$$.fragment, i), e = !1;
36315
36315
  },
36316
36316
  d(i) {
36317
- Lt(t, i);
36317
+ Ot(t, i);
36318
36318
  }
36319
36319
  };
36320
36320
  }
@@ -36325,10 +36325,10 @@ function K2(r) {
36325
36325
  r[10]
36326
36326
  ) } }), {
36327
36327
  c() {
36328
- Bt(t.$$.fragment);
36328
+ Lt(t.$$.fragment);
36329
36329
  },
36330
36330
  m(i, n) {
36331
- Ot(t, i, n), e = !0;
36331
+ Bt(t, i, n), e = !0;
36332
36332
  },
36333
36333
  p(i, n) {
36334
36334
  const s = {};
@@ -36343,7 +36343,7 @@ function K2(r) {
36343
36343
  ot(t.$$.fragment, i), e = !1;
36344
36344
  },
36345
36345
  d(i) {
36346
- Lt(t, i);
36346
+ Ot(t, i);
36347
36347
  }
36348
36348
  };
36349
36349
  }
@@ -36354,10 +36354,10 @@ function Z2(r) {
36354
36354
  r[10]
36355
36355
  ) } }), {
36356
36356
  c() {
36357
- Bt(t.$$.fragment);
36357
+ Lt(t.$$.fragment);
36358
36358
  },
36359
36359
  m(i, n) {
36360
- Ot(t, i, n), e = !0;
36360
+ Bt(t, i, n), e = !0;
36361
36361
  },
36362
36362
  p(i, n) {
36363
36363
  const s = {};
@@ -36372,7 +36372,7 @@ function Z2(r) {
36372
36372
  ot(t.$$.fragment, i), e = !1;
36373
36373
  },
36374
36374
  d(i) {
36375
- Lt(t, i);
36375
+ Ot(t, i);
36376
36376
  }
36377
36377
  };
36378
36378
  }
@@ -36592,12 +36592,12 @@ function tC(r, t, e) {
36592
36592
  Ks(r, h, (d) => e(5, s = d));
36593
36593
  const c = (d) => {
36594
36594
  let p = -1 / 0, f = -1 / 0, m = 1 / 0, _ = 1 / 0;
36595
- for (let v of d.filter((y) => Be(y))) {
36595
+ for (let v of d.filter((y) => Le(y))) {
36596
36596
  const { bounds: y } = v.target.selector.geometry;
36597
36597
  y.maxX > p && (p = y.maxX), y.maxY > f && (f = y.maxY), y.minX < m && (m = y.minX), y.minY < _ && (_ = y.minY);
36598
36598
  }
36599
36599
  return a.forceRedraw(), { maxX: p, maxY: f, minX: m, minY: _ };
36600
- }, u = (d) => Be(d);
36600
+ }, u = (d) => Le(d);
36601
36601
  return r.$$set = (d) => {
36602
36602
  "state" in d && e(4, o = d.state), "viewer" in d && e(0, a = d.viewer);
36603
36603
  }, r.$$.update = () => {
@@ -36617,26 +36617,26 @@ const hf = (r, t) => {
36617
36617
  r.world.getItemAt(i - 1).addOnceHandler("fully-loaded-change", (s) => {
36618
36618
  const { fullyLoaded: o } = s;
36619
36619
  if (o) {
36620
- const a = r.canvas.querySelector("canvas"), l = Lf(a);
36620
+ const a = r.canvas.querySelector("canvas"), l = Of(a);
36621
36621
  r.element.setAttribute("data-theme", l);
36622
36622
  }
36623
36623
  });
36624
36624
  }) : r.element.setAttribute("data-theme", t);
36625
36625
  }, qm = (r, t, e) => (i, n = {}) => {
36626
36626
  const s = typeof i == "string" ? i : i.id, o = t.getAnnotation(s);
36627
- if (!o || !Be(o)) return;
36627
+ if (!o || !Le(o)) return;
36628
36628
  const a = r.container.getBoundingClientRect(), { padding: l } = n;
36629
36629
  let [h, c, u, d] = l ? Array.isArray(l) ? l : [l, l, l, l] : [0, 0, 0, 0];
36630
36630
  h = h / a.height, c = c / a.width, u = u / a.height, d = d / a.width;
36631
36631
  const { minX: p, minY: f, maxX: m, maxY: _ } = o.target.selector.geometry.bounds, v = m - p, y = _ - f, g = p - d * v, b = f - h * y, C = v + (c + d) * v, R = y + (h + u) * y, A = r.viewport.imageToViewportRectangle(g, b, C, R);
36632
36632
  r.viewport[e](A, n.immediately);
36633
36633
  }, rC = (r, t) => qm(r, t, "fitBounds"), iC = (r, t) => qm(r, t, "fitBoundsWithConstraints"), fC = (r, t = {}) => {
36634
- const e = Bf(t, {
36634
+ const e = Lf(t, {
36635
36635
  drawingEnabled: !1,
36636
36636
  drawingMode: Er ? "drag" : "click",
36637
36637
  userSelectAction: cf.EDIT,
36638
36638
  theme: "light"
36639
- }), i = Of(e), { hover: n, selection: s, store: o } = i, a = ug(o, e.initialHistory), l = dg(
36639
+ }), i = Bf(e), { hover: n, selection: s, store: o } = i, a = ug(o, e.initialHistory), l = dg(
36640
36640
  i,
36641
36641
  a,
36642
36642
  e.adapter,
@@ -36677,35 +36677,35 @@ const hf = (r, t) => {
36677
36677
  viewer: r
36678
36678
  }
36679
36679
  });
36680
- f.$on("click", (L) => {
36681
- const { originalEvent: $, annotation: F } = L.detail, X = (V) => Wm(V.id, $, s, e.multiSelect);
36680
+ f.$on("click", (O) => {
36681
+ const { originalEvent: $, annotation: F } = O.detail, X = (V) => Wm(V.id, $, s, e.multiSelect);
36682
36682
  d ? s.isEmpty() && F && s.userSelect(X(F), $) : F && !(u === "click" && c) ? s.userSelect(X(F), $) : s.isEmpty() || s.clear();
36683
- }), r.element.addEventListener("pointerdown", (L) => {
36683
+ }), r.element.addEventListener("pointerdown", (O) => {
36684
36684
  if (n.current) {
36685
36685
  const $ = o.getAnnotation(n.current);
36686
- l.emit("clickAnnotation", $, L);
36686
+ l.emit("clickAnnotation", $, O);
36687
36687
  }
36688
36688
  }), hf(r, e.theme);
36689
36689
  const y = pg(i, a, e.adapter), g = () => _.cancelDrawing(), b = () => {
36690
36690
  f.$destroy(), m.$destroy(), _.$destroy(), v.$destroy(), p.destroy(), a.destroy();
36691
- }, C = rC(r, o), R = iC(r, o), A = () => _.getDrawingTool(), P = () => h, M = () => _.isDrawingEnabled(), k = (L, $, F) => Rf(L, $, F), U = (L, $) => Pf(L, $), I = (L) => {
36692
- if (!Eo(L))
36693
- throw `No drawing tool named ${L}`;
36694
- _.$set({ toolName: L });
36695
- }, T = (L) => {
36696
- c = L, _.$set({ drawingEnabled: L });
36697
- }, E = (L) => {
36698
- f.$set({ filter: L }), _.$set({ filter: L });
36699
- }, S = (L) => d = L, B = (L) => {
36700
- f.$set({ style: L }), _.$set({ style: L });
36701
- }, D = (L) => (
36691
+ }, C = rC(r, o), R = iC(r, o), A = () => _.getDrawingTool(), P = () => h, M = () => _.isDrawingEnabled(), k = (O, $, F) => Rf(O, $, F), U = (O, $) => Pf(O, $), I = (O) => {
36692
+ if (!Eo(O))
36693
+ throw `No drawing tool named ${O}`;
36694
+ _.$set({ toolName: O });
36695
+ }, T = (O) => {
36696
+ c = O, _.$set({ drawingEnabled: O });
36697
+ }, E = (O) => {
36698
+ f.$set({ filter: O }), _.$set({ filter: O });
36699
+ }, S = (O) => d = O, L = (O) => {
36700
+ f.$set({ style: O }), _.$set({ style: O });
36701
+ }, D = (O) => (
36702
36702
  // @ts-ignore
36703
- m.$set({ provider: L })
36704
- ), N = (L) => hf(r, L), H = (L) => {
36705
- h = L, _.$set({ user: L });
36706
- }, O = (L) => (
36703
+ m.$set({ provider: O })
36704
+ ), N = (O) => hf(r, O), H = (O) => {
36705
+ h = O, _.$set({ user: O });
36706
+ }, B = (O) => (
36707
36707
  // @ts-ignore
36708
- f.$set({ visible: L })
36708
+ f.$set({ visible: O })
36709
36709
  );
36710
36710
  return {
36711
36711
  ...y,
@@ -36726,10 +36726,10 @@ const hf = (r, t) => {
36726
36726
  setFilter: E,
36727
36727
  setModalSelect: S,
36728
36728
  setPresenceProvider: D,
36729
- setStyle: B,
36729
+ setStyle: L,
36730
36730
  setTheme: N,
36731
36731
  setUser: H,
36732
- setVisible: O,
36732
+ setVisible: B,
36733
36733
  state: i,
36734
36734
  viewer: r
36735
36735
  };