triiiceratops 0.10.1 → 0.10.2

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.
@@ -4,7 +4,7 @@ var pt = (a) => {
4
4
  };
5
5
  var Rt = (a, t, s) => t in a ? Dt(a, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : a[t] = s;
6
6
  var ft = (a, t, s) => Rt(a, typeof t != "symbol" ? t + "" : t, s), Gt = (a, t, s) => t.has(a) || pt("Cannot " + s);
7
- var n = (a, t, s) => (Gt(a, t, "read from private field"), s ? s.call(a) : t.get(a)), l = (a, t, s) => t.has(a) ? pt("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(a) : t.set(a, s);
7
+ var n = (a, t, s) => (Gt(a, t, "read from private field"), s ? s.call(a) : t.get(a)), h = (a, t, s) => t.has(a) ? pt("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(a) : t.set(a, s);
8
8
  import * as e from "svelte/internal/client";
9
9
  import * as Bt from "manifesto.js";
10
10
  import "svelte/internal/disclose-version";
@@ -12,8 +12,8 @@ import { hasContext as Tt, getContext as jt } from "svelte";
12
12
  var E, D;
13
13
  class Vt {
14
14
  constructor() {
15
- l(this, E, e.state(e.proxy({})));
16
- l(this, D, e.state(e.proxy(/* @__PURE__ */ new Map())));
15
+ h(this, E, e.state(e.proxy({})));
16
+ h(this, D, e.state(e.proxy(/* @__PURE__ */ new Map())));
17
17
  }
18
18
  get manifests() {
19
19
  return e.get(n(this, E));
@@ -32,8 +32,8 @@ class Vt {
32
32
  return `${t}::${s}`;
33
33
  }
34
34
  setUserAnnotations(t, s, i) {
35
- const r = this.userAnnotationKey(t, s), u = new Map(this.userAnnotations);
36
- u.set(r, i), this.userAnnotations = u;
35
+ const r = this.userAnnotationKey(t, s), d = new Map(this.userAnnotations);
36
+ d.set(r, i), this.userAnnotations = d;
37
37
  }
38
38
  clearUserAnnotations(t, s) {
39
39
  const i = this.userAnnotationKey(t, s);
@@ -98,81 +98,81 @@ class Vt {
98
98
  if (!i) return [];
99
99
  const r = i.getSequences()[0].getCanvasById(s);
100
100
  if (!r) return [];
101
- const u = r.__jsonld;
102
- let v = [];
103
- const A = (c) => c.resources || c.items || [];
104
- return u.otherContent && u.otherContent.forEach((c) => {
105
- const d = c["@id"] || c.id;
106
- if (d && !c.resources) {
107
- const w = this.manifests[d];
101
+ const d = r.__jsonld;
102
+ let m = [];
103
+ const I = (g) => g.resources || g.items || [];
104
+ return d.otherContent && d.otherContent.forEach((g) => {
105
+ const v = g["@id"] || g.id;
106
+ if (v && !g.resources) {
107
+ const w = this.manifests[v];
108
108
  if (w) {
109
109
  if (w.json) {
110
- const _ = A(w.json);
111
- v.push(..._);
110
+ const A = I(w.json);
111
+ m.push(...A);
112
112
  }
113
113
  } else
114
- this.fetchAnnotationList(d);
115
- } else c.resources && v.push(...c.resources);
116
- }), u.annotations && u.annotations.forEach((c) => {
117
- const d = c.id || c["@id"];
118
- if (d && !c.items) {
119
- const w = this.manifests[d];
114
+ this.fetchAnnotationList(v);
115
+ } else g.resources && m.push(...g.resources);
116
+ }), d.annotations && d.annotations.forEach((g) => {
117
+ const v = g.id || g["@id"];
118
+ if (v && !g.items) {
119
+ const w = this.manifests[v];
120
120
  if (w) {
121
121
  if (w.json) {
122
- const _ = A(w.json);
123
- v.push(..._);
122
+ const A = I(w.json);
123
+ m.push(...A);
124
124
  }
125
125
  } else
126
- this.fetchAnnotationList(d);
127
- } else c.items && v.push(...c.items);
128
- }), v;
126
+ this.fetchAnnotationList(v);
127
+ } else g.items && m.push(...g.items);
128
+ }), m;
129
129
  }
130
130
  }
131
131
  E = new WeakMap(), D = new WeakMap();
132
- const k = new Vt();
132
+ const P = new Vt();
133
133
  var R, G, B, T, j, V, O, F, Q, Z, z, H, N, U, q, K, $, W, J, X, Y, tt, et, st, nt, at;
134
134
  class ae {
135
135
  constructor(t = null, s = null, i = []) {
136
- l(this, R, e.state(null));
137
- l(this, G, e.state(null));
138
- l(this, B, e.state(!1));
139
- l(this, T, e.state(!1));
140
- l(this, j, e.state(!1));
141
- l(this, V, e.state(!1));
142
- l(this, O, e.state(!1));
143
- l(this, F, e.state(!1));
144
- l(this, Q, e.state("bottom"));
145
- l(this, Z, e.state(e.proxy(/* @__PURE__ */ new Set())));
146
- l(this, z, e.state(e.proxy({})));
147
- l(
136
+ h(this, R, e.state(null));
137
+ h(this, G, e.state(null));
138
+ h(this, B, e.state(!1));
139
+ h(this, T, e.state(!1));
140
+ h(this, j, e.state(!1));
141
+ h(this, V, e.state(!1));
142
+ h(this, O, e.state(!1));
143
+ h(this, F, e.state(!1));
144
+ h(this, Q, e.state("bottom"));
145
+ h(this, Z, e.state(e.proxy(/* @__PURE__ */ new Set())));
146
+ h(this, z, e.state(e.proxy({})));
147
+ h(
148
148
  this,
149
149
  H,
150
150
  // Gallery State (Lifted for persistence during re-docking)
151
151
  e.state(e.proxy({ x: 20, y: 100 }))
152
152
  );
153
- l(this, N, e.state(e.proxy({ width: 300, height: 400 })));
154
- l(this, U, e.state(!1));
155
- l(this, q, e.state(e.proxy({ x: 0, y: 0 })));
156
- l(this, K, e.state(null));
157
- l(this, $, e.state(null));
153
+ h(this, N, e.state(e.proxy({ width: 300, height: 400 })));
154
+ h(this, U, e.state(!1));
155
+ h(this, q, e.state(e.proxy({ x: 0, y: 0 })));
156
+ h(this, K, e.state(null));
157
+ h(this, $, e.state(null));
158
158
  ft(this, "eventTarget", null);
159
- l(this, W, e.state(""));
160
- l(this, J, e.state(null));
161
- l(this, X, e.state(e.proxy([])));
162
- l(this, Y, e.state(!1));
163
- l(this, tt, e.state(!1));
164
- l(this, et, e.state(e.proxy([])));
165
- l(
159
+ h(this, W, e.state(""));
160
+ h(this, J, e.state(null));
161
+ h(this, X, e.state(e.proxy([])));
162
+ h(this, Y, e.state(!1));
163
+ h(this, tt, e.state(!1));
164
+ h(this, et, e.state(e.proxy([])));
165
+ h(
166
166
  this,
167
167
  st,
168
168
  // ==================== PLUGIN STATE ====================
169
169
  /** Plugin-registered menu buttons */
170
170
  e.state(e.proxy([]))
171
171
  );
172
- l(this, nt, e.state(e.proxy([])));
173
- l(this, at, e.state(null));
172
+ h(this, nt, e.state(e.proxy([])));
173
+ h(this, at, e.state(null));
174
174
  ft(this, "pluginEventHandlers", /* @__PURE__ */ new Map());
175
- this.manifestId = t || null, this.canvasId = s || null, this.manifestId && k.fetchManifest(this.manifestId);
175
+ this.manifestId = t || null, this.canvasId = s || null, this.manifestId && P.fetchManifest(this.manifestId);
176
176
  for (const r of i)
177
177
  this.registerPlugin(r);
178
178
  }
@@ -298,7 +298,7 @@ class ae {
298
298
  */
299
299
  getSnapshot() {
300
300
  let t = -1;
301
- return this.manifestId && this.canvasId && (t = k.getCanvases(this.manifestId).findIndex((i) => (i.id || i["@id"] || (i.getCanvasId ? i.getCanvasId() : null) || (i.getId ? i.getId() : null)) === this.canvasId)), {
301
+ return this.manifestId && this.canvasId && (t = P.getCanvases(this.manifestId).findIndex((i) => (i.id || i["@id"] || (i.getCanvasId ? i.getCanvasId() : null) || (i.getId ? i.getId() : null)) === this.canvasId)), {
302
302
  manifestId: this.manifestId,
303
303
  canvasId: this.canvasId,
304
304
  currentCanvasIndex: t,
@@ -324,13 +324,13 @@ class ae {
324
324
  });
325
325
  }
326
326
  get manifest() {
327
- return this.manifestId ? k.getManifest(this.manifestId) : null;
327
+ return this.manifestId ? P.getManifest(this.manifestId) : null;
328
328
  }
329
329
  get manifestEntry() {
330
- return this.manifestId ? k.getManifestEntry(this.manifestId) : null;
330
+ return this.manifestId ? P.getManifestEntry(this.manifestId) : null;
331
331
  }
332
332
  get canvases() {
333
- return this.manifestId ? k.getCanvases(this.manifestId) : [];
333
+ return this.manifestId ? P.getCanvases(this.manifestId) : [];
334
334
  }
335
335
  get currentCanvasIndex() {
336
336
  return this.canvasId ? this.canvases.findIndex((t) => (t.id || t["@id"] || (t.getCanvasId ? t.getCanvasId() : null) || (t.getId ? t.getId() : null)) === this.canvasId) : this.canvases.length > 0 ? 0 : -1;
@@ -354,7 +354,7 @@ class ae {
354
354
  }
355
355
  }
356
356
  setManifest(t) {
357
- this.manifestId = t, this.canvasId = null, k.fetchManifest(t), this.dispatchStateChange("manifestchange");
357
+ this.manifestId = t, this.canvasId = null, P.fetchManifest(t), this.dispatchStateChange("manifestchange");
358
358
  }
359
359
  setCanvas(t) {
360
360
  this.canvasId = t, this.dispatchStateChange("canvaschange");
@@ -364,8 +364,8 @@ class ae {
364
364
  const s = this.config;
365
365
  if (this.config = t, t.gallery && (t.gallery.open !== void 0 && (this.showThumbnailGallery = t.gallery.open), t.gallery.dockPosition !== void 0 && (this.dockSide = t.gallery.dockPosition)), t.search) {
366
366
  t.search.open !== void 0 && (this.showSearchPanel = t.search.open);
367
- const r = t.search.query, u = (i = s.search) == null ? void 0 : i.query;
368
- r !== void 0 && r !== u && r !== this.searchQuery && this._performSearch(r);
367
+ const r = t.search.query, d = (i = s.search) == null ? void 0 : i.query;
368
+ r !== void 0 && r !== d && r !== this.searchQuery && this._performSearch(r);
369
369
  }
370
370
  t.annotations && t.annotations.open !== void 0 && (this.showAnnotations = t.annotations.open);
371
371
  }
@@ -443,99 +443,94 @@ class ae {
443
443
  console.log("[ViewerState] Manifest not loaded, deferring search:", t), this.pendingSearchQuery = t;
444
444
  return;
445
445
  }
446
- let u = r.getService("http://iiif.io/api/search/1/search") || r.getService("http://iiif.io/api/search/0/search");
447
- if (u || r.__jsonld && r.__jsonld.service && (u = (Array.isArray(r.__jsonld.service) ? r.__jsonld.service : [r.__jsonld.service]).find((h) => h.profile === "http://iiif.io/api/search/1/search" || h.profile === "http://iiif.io/api/search/0/search")), !u) {
446
+ let d = r.getService("http://iiif.io/api/search/1/search") || r.getService("http://iiif.io/api/search/0/search");
447
+ if (d || r.__jsonld && r.__jsonld.service && (d = (Array.isArray(r.__jsonld.service) ? r.__jsonld.service : [r.__jsonld.service]).find((c) => c.profile === "http://iiif.io/api/search/1/search" || c.profile === "http://iiif.io/api/search/0/search")), !d) {
448
448
  console.warn("No IIIF search service found in manifest"), this.isSearching = !1;
449
449
  return;
450
450
  }
451
- const A = `${u.id || u["@id"]}?q=${encodeURIComponent(t)}`, c = await fetch(A);
452
- if (!c.ok) throw new Error("Search request failed");
453
- const d = await c.json(), w = d.resources || [], _ = [], it = (o) => {
454
- const h = typeof o == "string" ? o : o["@id"] || o.id;
455
- if (!h) return null;
456
- const g = h.split("#xywh=");
457
- if (g.length < 2) return null;
458
- const m = g[1].split(",").map(Number);
459
- return m.length === 4 ? m : null;
460
- };
461
- if (d.hits)
462
- for (const o of d.hits) {
463
- const h = o.annotations || [], g = /* @__PURE__ */ new Map();
464
- for (const m of h) {
465
- const f = w.find((p) => p["@id"] === m || p.id === m);
451
+ const I = `${d.id || d["@id"]}?q=${encodeURIComponent(t)}`, g = await fetch(I);
452
+ if (!g.ok) throw new Error("Search request failed");
453
+ const v = await g.json(), w = v.resources || [], A = /* @__PURE__ */ new Map(), it = (o) => {
454
+ const c = typeof o == "string" ? o : o["@id"] || o.id;
455
+ if (!c) return null;
456
+ const u = c.split("#xywh=");
457
+ if (u.length < 2) return null;
458
+ const S = u[1].split(",").map(Number);
459
+ return S.length === 4 ? S : null;
460
+ }, _ = (o) => o ? o.replace(/&lt;mark&gt;/g, "<mark>").replace(/&lt;\/mark&gt;/g, "</mark>") : "";
461
+ if (v.hits)
462
+ for (const o of v.hits) {
463
+ const c = o.annotations || [];
464
+ let u = -1, S = null, y = [];
465
+ for (const l of c) {
466
+ const f = w.find((p) => p["@id"] === l || p.id === l);
466
467
  if (f && f.on) {
467
- const p = typeof f.on == "string" ? f.on : f.on["@id"] || f.on.id, y = p.split("#")[0], S = it(p), L = this.canvases.findIndex((I) => I.id === y);
468
- if (L >= 0) {
469
- if (!g.has(L)) {
470
- const I = this.canvases[L];
471
- let x = "Canvas " + (L + 1);
472
- try {
473
- if (I.getLabel) {
474
- const b = I.getLabel();
475
- Array.isArray(b) && b.length > 0 ? x = b[0].value : typeof b == "string" && (x = b);
476
- } else I.label && (typeof I.label == "string" ? x = I.label : Array.isArray(I.label) && (x = (s = I.label[0]) == null ? void 0 : s.value));
477
- } catch {
478
- }
479
- g.set(L, { label: String(x), bounds: [] });
480
- }
481
- S && g.get(L).bounds.push(S);
482
- }
468
+ const p = typeof f.on == "string" ? f.on : f.on["@id"] || f.on.id, gt = p.split("#")[0], k = it(p), b = this.canvases.findIndex((x) => x.id === gt);
469
+ b >= 0 && (u === -1 && (u = b), k && (y.push(k), S || (S = k)));
483
470
  }
484
471
  }
485
- for (const [m, f] of g)
486
- _.push({
472
+ if (u >= 0) {
473
+ if (!A.has(u)) {
474
+ const l = this.canvases[u];
475
+ let f = "Canvas " + (u + 1);
476
+ try {
477
+ if (l.getLabel) {
478
+ const p = l.getLabel();
479
+ Array.isArray(p) && p.length > 0 ? f = p[0].value : typeof p == "string" && (f = p);
480
+ } else l.label && (typeof l.label == "string" ? f = l.label : Array.isArray(l.label) && (f = (s = l.label[0]) == null ? void 0 : s.value));
481
+ } catch {
482
+ }
483
+ A.set(u, { canvasIndex: u, canvasLabel: String(f), hits: [] });
484
+ }
485
+ A.get(u).hits.push({
487
486
  type: "hit",
488
- before: o.before,
489
- match: o.match,
490
- after: o.after,
491
- canvasIndex: m,
492
- canvasLabel: f.label,
493
- // Store all bounds for this hit on this canvas
494
- allBounds: f.bounds,
495
- // Keep first bounds for backwards compatibility
496
- bounds: f.bounds.length > 0 ? f.bounds[0] : null
487
+ before: _(o.before),
488
+ match: _(o.match),
489
+ after: _(o.after),
490
+ bounds: S,
491
+ allBounds: y
497
492
  });
493
+ }
498
494
  }
499
495
  else if (w.length > 0)
500
496
  for (const o of w) {
501
- const h = typeof o.on == "string" ? o.on : o.on["@id"] || o.on.id, g = h.split("#")[0], m = it(h), f = this.canvases.findIndex((p) => p.id === g);
502
- if (f >= 0) {
503
- const p = this.canvases[f];
504
- let y = "Canvas " + (f + 1);
497
+ const c = typeof o.on == "string" ? o.on : o.on["@id"] || o.on.id, u = c.split("#")[0], S = it(c), y = this.canvases.findIndex((l) => l.id === u);
498
+ if (y >= 0) {
499
+ const l = this.canvases[y];
500
+ let f = "Canvas " + (y + 1);
505
501
  try {
506
- if (p.getLabel) {
507
- const S = p.getLabel();
508
- Array.isArray(S) && S.length > 0 ? y = S[0].value : typeof S == "string" && (y = S);
509
- } else p.label && (typeof p.label == "string" ? y = p.label : Array.isArray(p.label) && (y = (i = p.label[0]) == null ? void 0 : i.value));
502
+ if (l.getLabel) {
503
+ const p = l.getLabel();
504
+ Array.isArray(p) && p.length > 0 ? f = p[0].value : typeof p == "string" && (f = p);
505
+ } else l.label && (typeof l.label == "string" ? f = l.label : Array.isArray(l.label) && (f = (i = l.label[0]) == null ? void 0 : i.value));
510
506
  } catch {
511
507
  }
512
- _.push({
508
+ A.has(y) || A.set(y, { canvasIndex: y, canvasLabel: String(f), hits: [] }), A.get(y).hits.push({
513
509
  type: "resource",
514
- match: o.resource && o.resource.chars ? o.resource.chars : o.chars || "",
515
- canvasIndex: f,
516
- canvasLabel: String(y),
517
- bounds: m
510
+ match: _(o.resource && o.resource.chars ? o.resource.chars : o.chars || ""),
511
+ bounds: S,
512
+ allBounds: S ? [S] : []
518
513
  });
519
514
  }
520
515
  }
521
- this.searchResults = _;
522
- let gt = 0;
523
- this.searchAnnotations = _.flatMap((o) => {
524
- const h = this.canvases[o.canvasIndex];
525
- return (o.allBounds && o.allBounds.length > 0 ? o.allBounds : o.bounds ? [o.bounds] : []).map((m) => {
526
- const f = `${h.id}#xywh=${m.join(",")}`;
516
+ this.searchResults = Array.from(A.values()).sort((o, c) => o.canvasIndex - c.canvasIndex);
517
+ let ut = 0;
518
+ this.searchAnnotations = this.searchResults.flatMap((o) => {
519
+ const c = this.canvases[o.canvasIndex];
520
+ return o.hits.flatMap((u) => (u.allBounds && u.allBounds.length > 0 ? u.allBounds : u.bounds ? [u.bounds] : []).map((y) => {
521
+ const l = `${c.id}#xywh=${y.join(",")}`;
527
522
  return {
528
- "@id": `urn:search-hit:${gt++}`,
523
+ "@id": `urn:search-hit:${ut++}`,
529
524
  "@type": "oa:Annotation",
530
525
  motivation: "sc:painting",
531
- on: f,
532
- canvasId: h.id,
533
- resource: { "@type": "cnt:ContentAsText", chars: o.match },
526
+ on: l,
527
+ canvasId: c.id,
528
+ resource: { "@type": "cnt:ContentAsText", chars: u.match },
534
529
  // Flag to identify styling in Overlay?
535
530
  // Or just standard rendering.
536
531
  isSearchHit: !0
537
532
  };
538
- });
533
+ }));
539
534
  });
540
535
  } catch (r) {
541
536
  console.error("Search error:", r);
@@ -575,7 +570,7 @@ class ae {
575
570
  isActive: () => e.get(i),
576
571
  order: 200
577
572
  // Default order for simple plugins
578
- }, u = {
573
+ }, d = {
579
574
  id: `${s}:panel`,
580
575
  component: t.panel,
581
576
  position: t.position || "left",
@@ -589,7 +584,7 @@ class ae {
589
584
  }
590
585
  }
591
586
  };
592
- this.pluginMenuButtons = [...this.pluginMenuButtons, r], this.pluginPanels = [...this.pluginPanels, u], t.onInit && t.onInit(this);
587
+ this.pluginMenuButtons = [...this.pluginMenuButtons, r], this.pluginPanels = [...this.pluginPanels, d], t.onInit && t.onInit(this);
593
588
  }
594
589
  /**
595
590
  * Unregister a plugin's UI components by ID prefix.
@@ -631,17 +626,17 @@ const Ft = "en", dt = (
631
626
  "baseLocale"
632
627
  ];
633
628
  globalThis.__paraglide = {};
634
- let ct, mt = !1, St = () => {
629
+ let ht, mt = !1, St = () => {
635
630
  let a;
636
631
  for (const t of wt) {
637
632
  if (t === "cookie")
638
633
  a = Nt();
639
634
  else if (t === "baseLocale")
640
635
  a = Ft;
641
- else if (t === "globalVariable" && ct !== void 0)
642
- a = ct;
643
- else if (At(t) && ut.has(t)) {
644
- const s = ut.get(t);
636
+ else if (t === "globalVariable" && ht !== void 0)
637
+ a = ht;
638
+ else if (It(t) && ct.has(t)) {
639
+ const s = ct.get(t);
645
640
  if (s) {
646
641
  const i = s.getLocale();
647
642
  if (i instanceof Promise)
@@ -651,7 +646,7 @@ let ct, mt = !1, St = () => {
651
646
  }
652
647
  if (a !== void 0) {
653
648
  const s = Ht(a);
654
- return mt || (ct = s, mt = !0, bt(s, { reload: !1 })), s;
649
+ return mt || (ht = s, mt = !0, At(s, { reload: !1 })), s;
655
650
  }
656
651
  }
657
652
  throw new Error("No locale found. Read the docs https://inlang.com/m/gerre34r/library-inlang-paraglideJs/errors#no-locale-found");
@@ -659,7 +654,7 @@ let ct, mt = !1, St = () => {
659
654
  const Zt = (a) => {
660
655
  window.location.reload();
661
656
  };
662
- let bt = (a, t) => {
657
+ let At = (a, t) => {
663
658
  const s = {
664
659
  reload: !0,
665
660
  ...t
@@ -670,40 +665,40 @@ let bt = (a, t) => {
670
665
  } catch {
671
666
  }
672
667
  const r = [];
673
- for (const v of wt)
674
- if (v === "globalVariable")
675
- ct = a;
676
- else if (v === "cookie") {
668
+ for (const m of wt)
669
+ if (m === "globalVariable")
670
+ ht = a;
671
+ else if (m === "cookie") {
677
672
  if (typeof document > "u" || typeof window > "u")
678
673
  continue;
679
- const A = `${yt}=${a}; path=/; max-age=${Qt}`;
680
- document.cookie = A;
674
+ const I = `${yt}=${a}; path=/; max-age=${Qt}`;
675
+ document.cookie = I;
681
676
  } else {
682
- if (v === "baseLocale")
677
+ if (m === "baseLocale")
683
678
  continue;
684
- if (At(v) && ut.has(v)) {
685
- const A = ut.get(v);
686
- if (A) {
687
- let c = A.setLocale(a);
688
- c instanceof Promise && (c = c.catch((d) => {
689
- throw new Error(`Custom strategy "${v}" setLocale failed.`, {
690
- cause: d
679
+ if (It(m) && ct.has(m)) {
680
+ const I = ct.get(m);
681
+ if (I) {
682
+ let g = I.setLocale(a);
683
+ g instanceof Promise && (g = g.catch((v) => {
684
+ throw new Error(`Custom strategy "${m}" setLocale failed.`, {
685
+ cause: v
691
686
  });
692
- }), r.push(c));
687
+ }), r.push(g));
693
688
  }
694
689
  }
695
690
  }
696
- const u = () => {
691
+ const d = () => {
697
692
  s.reload && window.location && a !== i && Zt();
698
693
  };
699
694
  if (r.length)
700
695
  return Promise.all(r).then(() => {
701
- u();
696
+ d();
702
697
  });
703
- u();
698
+ d();
704
699
  };
705
700
  const re = (a) => {
706
- bt = /** @type {SetLocaleFn} */
701
+ At = /** @type {SetLocaleFn} */
707
702
  a;
708
703
  };
709
704
  function zt(a) {
@@ -724,8 +719,8 @@ function Nt() {
724
719
  if (zt(t))
725
720
  return t;
726
721
  }
727
- const ut = /* @__PURE__ */ new Map();
728
- function At(a) {
722
+ const ct = /* @__PURE__ */ new Map();
723
+ function It(a) {
729
724
  return typeof a == "string" && /^custom-[A-Za-z0-9_-]+$/.test(a);
730
725
  }
731
726
  const Ut = (
@@ -745,131 +740,131 @@ var Kt = e.from_svg('<path d="M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208
745
740
  function le(a, t) {
746
741
  e.push(t, !0);
747
742
  const s = Ot();
748
- let i = e.rest_props(t, ["$$slots", "$$events", "$$legacy", "children"]), r = e.derived(() => t.weight ?? s.weight ?? "regular"), u = e.derived(() => t.color ?? s.color ?? "currentColor"), v = e.derived(() => t.size ?? s.size ?? "1em"), A = e.derived(() => t.mirrored ?? s.mirrored ?? !1);
749
- function c(h) {
750
- let { weight: g, color: m, size: f, mirrored: p, ...y } = h;
751
- return y;
743
+ let i = e.rest_props(t, ["$$slots", "$$events", "$$legacy", "children"]), r = e.derived(() => t.weight ?? s.weight ?? "regular"), d = e.derived(() => t.color ?? s.color ?? "currentColor"), m = e.derived(() => t.size ?? s.size ?? "1em"), I = e.derived(() => t.mirrored ?? s.mirrored ?? !1);
744
+ function g(o) {
745
+ let { weight: c, color: u, size: S, mirrored: y, ...l } = o;
746
+ return l;
752
747
  }
753
- var d = te();
748
+ var v = te();
754
749
  e.attribute_effect(
755
- d,
756
- (h, g) => ({
750
+ v,
751
+ (o, c) => ({
757
752
  xmlns: "http://www.w3.org/2000/svg",
758
753
  role: "img",
759
- width: e.get(v),
760
- height: e.get(v),
761
- fill: e.get(u),
762
- transform: e.get(A) ? "scale(-1, 1)" : void 0,
754
+ width: e.get(m),
755
+ height: e.get(m),
756
+ fill: e.get(d),
757
+ transform: e.get(I) ? "scale(-1, 1)" : void 0,
763
758
  viewBox: "0 0 256 256",
764
- ...h,
765
- ...g
759
+ ...o,
760
+ ...c
766
761
  }),
767
- [() => c(s), () => c(i)]
762
+ [() => g(s), () => g(i)]
768
763
  );
769
- var w = e.child(d);
764
+ var w = e.child(v);
770
765
  {
771
- var _ = (h) => {
772
- var g = e.comment(), m = e.first_child(g);
773
- e.snippet(m, () => t.children), e.append(h, g);
766
+ var A = (o) => {
767
+ var c = e.comment(), u = e.first_child(c);
768
+ e.snippet(u, () => t.children), e.append(o, c);
774
769
  };
775
- e.if(w, (h) => {
776
- t.children && h(_);
770
+ e.if(w, (o) => {
771
+ t.children && o(A);
777
772
  });
778
773
  }
779
774
  var it = e.sibling(w, 2);
780
775
  {
781
- var gt = (h) => {
782
- var g = Kt();
783
- e.append(h, g);
784
- }, o = (h) => {
785
- var g = e.comment(), m = e.first_child(g);
776
+ var _ = (o) => {
777
+ var c = Kt();
778
+ e.append(o, c);
779
+ }, ut = (o) => {
780
+ var c = e.comment(), u = e.first_child(c);
786
781
  {
787
- var f = (y) => {
788
- var S = $t();
789
- e.next(), e.append(y, S);
790
- }, p = (y) => {
791
- var S = e.comment(), L = e.first_child(S);
782
+ var S = (l) => {
783
+ var f = $t();
784
+ e.next(), e.append(l, f);
785
+ }, y = (l) => {
786
+ var f = e.comment(), p = e.first_child(f);
792
787
  {
793
- var I = (b) => {
794
- var rt = Wt();
795
- e.append(b, rt);
796
- }, x = (b) => {
797
- var rt = e.comment(), It = e.first_child(rt);
788
+ var gt = (b) => {
789
+ var x = Wt();
790
+ e.append(b, x);
791
+ }, k = (b) => {
792
+ var x = e.comment(), bt = e.first_child(x);
798
793
  {
799
- var _t = (M) => {
800
- var ot = Jt();
801
- e.append(M, ot);
802
- }, Lt = (M) => {
803
- var ot = e.comment(), xt = e.first_child(ot);
794
+ var _t = (L) => {
795
+ var rt = Jt();
796
+ e.append(L, rt);
797
+ }, xt = (L) => {
798
+ var rt = e.comment(), Lt = e.first_child(rt);
804
799
  {
805
- var Mt = (C) => {
806
- var lt = Xt();
807
- e.append(C, lt);
808
- }, Ct = (C) => {
809
- var lt = e.comment(), Pt = e.first_child(lt);
800
+ var Mt = (M) => {
801
+ var ot = Xt();
802
+ e.append(M, ot);
803
+ }, Ct = (M) => {
804
+ var ot = e.comment(), Pt = e.first_child(ot);
810
805
  {
811
- var kt = (P) => {
812
- var ht = Yt();
813
- e.append(P, ht);
814
- }, Et = (P) => {
815
- var ht = e.text();
816
- ht.nodeValue = (console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'), ""), e.append(P, ht);
806
+ var kt = (C) => {
807
+ var lt = Yt();
808
+ e.append(C, lt);
809
+ }, Et = (C) => {
810
+ var lt = e.text();
811
+ lt.nodeValue = (console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'), ""), e.append(C, lt);
817
812
  };
818
813
  e.if(
819
814
  Pt,
820
- (P) => {
821
- e.get(r) === "thin" ? P(kt) : P(Et, !1);
815
+ (C) => {
816
+ e.get(r) === "thin" ? C(kt) : C(Et, !1);
822
817
  },
823
818
  !0
824
819
  );
825
820
  }
826
- e.append(C, lt);
821
+ e.append(M, ot);
827
822
  };
828
823
  e.if(
829
- xt,
830
- (C) => {
831
- e.get(r) === "regular" ? C(Mt) : C(Ct, !1);
824
+ Lt,
825
+ (M) => {
826
+ e.get(r) === "regular" ? M(Mt) : M(Ct, !1);
832
827
  },
833
828
  !0
834
829
  );
835
830
  }
836
- e.append(M, ot);
831
+ e.append(L, rt);
837
832
  };
838
833
  e.if(
839
- It,
840
- (M) => {
841
- e.get(r) === "light" ? M(_t) : M(Lt, !1);
834
+ bt,
835
+ (L) => {
836
+ e.get(r) === "light" ? L(_t) : L(xt, !1);
842
837
  },
843
838
  !0
844
839
  );
845
840
  }
846
- e.append(b, rt);
841
+ e.append(b, x);
847
842
  };
848
843
  e.if(
849
- L,
844
+ p,
850
845
  (b) => {
851
- e.get(r) === "fill" ? b(I) : b(x, !1);
846
+ e.get(r) === "fill" ? b(gt) : b(k, !1);
852
847
  },
853
848
  !0
854
849
  );
855
850
  }
856
- e.append(y, S);
851
+ e.append(l, f);
857
852
  };
858
853
  e.if(
859
- m,
860
- (y) => {
861
- e.get(r) === "duotone" ? y(f) : y(p, !1);
854
+ u,
855
+ (l) => {
856
+ e.get(r) === "duotone" ? l(S) : l(y, !1);
862
857
  },
863
858
  !0
864
859
  );
865
860
  }
866
- e.append(h, g);
861
+ e.append(o, c);
867
862
  };
868
- e.if(it, (h) => {
869
- e.get(r) === "bold" ? h(gt) : h(o, !1);
863
+ e.if(it, (o) => {
864
+ e.get(r) === "bold" ? o(_) : o(ut, !1);
870
865
  });
871
866
  }
872
- e.reset(d), e.append(a, d), e.pop();
867
+ e.reset(v), e.append(a, v), e.pop();
873
868
  }
874
869
  export {
875
870
  Vt as M,
@@ -880,7 +875,7 @@ export {
880
875
  oe as c,
881
876
  Ot as g,
882
877
  dt as l,
883
- k as m,
878
+ P as m,
884
879
  re as o,
885
- bt as s
880
+ At as s
886
881
  };