@everymatrix/svg-image 0.0.1

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.
@@ -0,0 +1,1214 @@
1
+ var bn = Object.defineProperty, yn = Object.defineProperties;
2
+ var Sn = Object.getOwnPropertyDescriptors;
3
+ var ke = Object.getOwnPropertySymbols;
4
+ var $n = Object.prototype.hasOwnProperty, Ln = Object.prototype.propertyIsEnumerable;
5
+ var Vt = (e, t, i) => t in e ? bn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i, Pe = (e, t) => {
6
+ for (var i in t || (t = {}))
7
+ $n.call(t, i) && Vt(e, i, t[i]);
8
+ if (ke)
9
+ for (var i of ke(t))
10
+ Ln.call(t, i) && Vt(e, i, t[i]);
11
+ return e;
12
+ }, ve = (e, t) => yn(e, Sn(t));
13
+ var I = (e, t, i) => (Vt(e, typeof t != "symbol" ? t + "" : t, i), i);
14
+ var Xt = (e, t, i) => new Promise((o, s) => {
15
+ var a = (h) => {
16
+ try {
17
+ d(i.next(h));
18
+ } catch (f) {
19
+ s(f);
20
+ }
21
+ }, u = (h) => {
22
+ try {
23
+ d(i.throw(h));
24
+ } catch (f) {
25
+ s(f);
26
+ }
27
+ }, d = (h) => h.done ? o(h.value) : Promise.resolve(h.value).then(a, u);
28
+ d((i = i.apply(e, t)).next());
29
+ });
30
+ function pt() {
31
+ }
32
+ function Ke(e) {
33
+ return e();
34
+ }
35
+ function Ue() {
36
+ return /* @__PURE__ */ Object.create(null);
37
+ }
38
+ function Nt(e) {
39
+ e.forEach(Ke);
40
+ }
41
+ function Ze(e) {
42
+ return typeof e == "function";
43
+ }
44
+ function Rn(e, t) {
45
+ return e != e ? t == t : e !== t || e && typeof e == "object" || typeof e == "function";
46
+ }
47
+ let $t;
48
+ function Fe(e, t) {
49
+ return e === t ? !0 : ($t || ($t = document.createElement("a")), $t.href = t, e === $t.href);
50
+ }
51
+ function wn(e) {
52
+ return Object.keys(e).length === 0;
53
+ }
54
+ function On(e, t) {
55
+ e.appendChild(t);
56
+ }
57
+ function Nn(e, t, i) {
58
+ const o = Cn(e);
59
+ if (!o.getElementById(t)) {
60
+ const s = Dt("style");
61
+ s.id = t, s.textContent = i, Dn(o, s);
62
+ }
63
+ }
64
+ function Cn(e) {
65
+ if (!e)
66
+ return document;
67
+ const t = e.getRootNode ? e.getRootNode() : e.ownerDocument;
68
+ return t && /** @type {ShadowRoot} */
69
+ t.host ? (
70
+ /** @type {ShadowRoot} */
71
+ t
72
+ ) : e.ownerDocument;
73
+ }
74
+ function Dn(e, t) {
75
+ return On(
76
+ /** @type {Document} */
77
+ e.head || e,
78
+ t
79
+ ), t.sheet;
80
+ }
81
+ function se(e, t, i) {
82
+ e.insertBefore(t, i || null);
83
+ }
84
+ function Ct(e) {
85
+ e.parentNode && e.parentNode.removeChild(e);
86
+ }
87
+ function Dt(e) {
88
+ return document.createElement(e);
89
+ }
90
+ function W(e, t, i) {
91
+ i == null ? e.removeAttribute(t) : e.getAttribute(t) !== i && e.setAttribute(t, i);
92
+ }
93
+ function In(e) {
94
+ return Array.from(e.childNodes);
95
+ }
96
+ function Mn(e) {
97
+ const t = {};
98
+ return e.childNodes.forEach(
99
+ /** @param {Element} node */
100
+ (i) => {
101
+ t[i.slot || "default"] = !0;
102
+ }
103
+ ), t;
104
+ }
105
+ let _t;
106
+ function ht(e) {
107
+ _t = e;
108
+ }
109
+ function Je() {
110
+ if (!_t)
111
+ throw new Error("Function called outside component initialization");
112
+ return _t;
113
+ }
114
+ function xn(e) {
115
+ Je().$$.on_mount.push(e);
116
+ }
117
+ function kn(e) {
118
+ Je().$$.on_destroy.push(e);
119
+ }
120
+ const nt = [], ee = [];
121
+ let ot = [];
122
+ const He = [], Pn = /* @__PURE__ */ Promise.resolve();
123
+ let ne = !1;
124
+ function vn() {
125
+ ne || (ne = !0, Pn.then(Y));
126
+ }
127
+ function ie(e) {
128
+ ot.push(e);
129
+ }
130
+ const qt = /* @__PURE__ */ new Set();
131
+ let et = 0;
132
+ function Y() {
133
+ if (et !== 0)
134
+ return;
135
+ const e = _t;
136
+ do {
137
+ try {
138
+ for (; et < nt.length; ) {
139
+ const t = nt[et];
140
+ et++, ht(t), Un(t.$$);
141
+ }
142
+ } catch (t) {
143
+ throw nt.length = 0, et = 0, t;
144
+ }
145
+ for (ht(null), nt.length = 0, et = 0; ee.length; )
146
+ ee.pop()();
147
+ for (let t = 0; t < ot.length; t += 1) {
148
+ const i = ot[t];
149
+ qt.has(i) || (qt.add(i), i());
150
+ }
151
+ ot.length = 0;
152
+ } while (nt.length);
153
+ for (; He.length; )
154
+ He.pop()();
155
+ ne = !1, qt.clear(), ht(e);
156
+ }
157
+ function Un(e) {
158
+ if (e.fragment !== null) {
159
+ e.update(), Nt(e.before_update);
160
+ const t = e.dirty;
161
+ e.dirty = [-1], e.fragment && e.fragment.p(e.ctx, t), e.after_update.forEach(ie);
162
+ }
163
+ }
164
+ function Fn(e) {
165
+ const t = [], i = [];
166
+ ot.forEach((o) => e.indexOf(o) === -1 ? t.push(o) : i.push(o)), i.forEach((o) => o()), ot = t;
167
+ }
168
+ const Hn = /* @__PURE__ */ new Set();
169
+ function Bn(e, t) {
170
+ e && e.i && (Hn.delete(e), e.i(t));
171
+ }
172
+ function zn(e, t, i) {
173
+ const { fragment: o, after_update: s } = e.$$;
174
+ o && o.m(t, i), ie(() => {
175
+ const a = e.$$.on_mount.map(Ke).filter(Ze);
176
+ e.$$.on_destroy ? e.$$.on_destroy.push(...a) : Nt(a), e.$$.on_mount = [];
177
+ }), s.forEach(ie);
178
+ }
179
+ function Gn(e, t) {
180
+ const i = e.$$;
181
+ i.fragment !== null && (Fn(i.after_update), Nt(i.on_destroy), i.fragment && i.fragment.d(t), i.on_destroy = i.fragment = null, i.ctx = []);
182
+ }
183
+ function Wn(e, t) {
184
+ e.$$.dirty[0] === -1 && (nt.push(e), vn(), e.$$.dirty.fill(0)), e.$$.dirty[t / 31 | 0] |= 1 << t % 31;
185
+ }
186
+ function jn(e, t, i, o, s, a, u = null, d = [-1]) {
187
+ const h = _t;
188
+ ht(e);
189
+ const f = e.$$ = {
190
+ fragment: null,
191
+ ctx: [],
192
+ // state
193
+ props: a,
194
+ update: pt,
195
+ not_equal: s,
196
+ bound: Ue(),
197
+ // lifecycle
198
+ on_mount: [],
199
+ on_destroy: [],
200
+ on_disconnect: [],
201
+ before_update: [],
202
+ after_update: [],
203
+ context: new Map(t.context || (h ? h.$$.context : [])),
204
+ // everything else
205
+ callbacks: Ue(),
206
+ dirty: d,
207
+ skip_bound: !1,
208
+ root: t.target || h.$$.root
209
+ };
210
+ u && u(f.root);
211
+ let S = !1;
212
+ if (f.ctx = i ? i(e, t.props || {}, (T, L, ...H) => {
213
+ const P = H.length ? H[0] : L;
214
+ return f.ctx && s(f.ctx[T], f.ctx[T] = P) && (!f.skip_bound && f.bound[T] && f.bound[T](P), S && Wn(e, T)), L;
215
+ }) : [], f.update(), S = !0, Nt(f.before_update), f.fragment = o ? o(f.ctx) : !1, t.target) {
216
+ if (t.hydrate) {
217
+ const T = In(t.target);
218
+ f.fragment && f.fragment.l(T), T.forEach(Ct);
219
+ } else
220
+ f.fragment && f.fragment.c();
221
+ t.intro && Bn(e.$$.fragment), zn(e, t.target, t.anchor), Y();
222
+ }
223
+ ht(h);
224
+ }
225
+ let Qe;
226
+ typeof HTMLElement == "function" && (Qe = class extends HTMLElement {
227
+ constructor(t, i, o) {
228
+ super();
229
+ /** The Svelte component constructor */
230
+ I(this, "$$ctor");
231
+ /** Slots */
232
+ I(this, "$$s");
233
+ /** The Svelte component instance */
234
+ I(this, "$$c");
235
+ /** Whether or not the custom element is connected */
236
+ I(this, "$$cn", !1);
237
+ /** Component props data */
238
+ I(this, "$$d", {});
239
+ /** `true` if currently in the process of reflecting component props back to attributes */
240
+ I(this, "$$r", !1);
241
+ /** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
242
+ I(this, "$$p_d", {});
243
+ /** @type {Record<string, Function[]>} Event listeners */
244
+ I(this, "$$l", {});
245
+ /** @type {Map<Function, Function>} Event listener unsubscribe functions */
246
+ I(this, "$$l_u", /* @__PURE__ */ new Map());
247
+ this.$$ctor = t, this.$$s = i, o && this.attachShadow({ mode: "open" });
248
+ }
249
+ addEventListener(t, i, o) {
250
+ if (this.$$l[t] = this.$$l[t] || [], this.$$l[t].push(i), this.$$c) {
251
+ const s = this.$$c.$on(t, i);
252
+ this.$$l_u.set(i, s);
253
+ }
254
+ super.addEventListener(t, i, o);
255
+ }
256
+ removeEventListener(t, i, o) {
257
+ if (super.removeEventListener(t, i, o), this.$$c) {
258
+ const s = this.$$l_u.get(i);
259
+ s && (s(), this.$$l_u.delete(i));
260
+ }
261
+ }
262
+ connectedCallback() {
263
+ return Xt(this, null, function* () {
264
+ if (this.$$cn = !0, !this.$$c) {
265
+ let t = function(a) {
266
+ return () => {
267
+ let u;
268
+ return {
269
+ c: function() {
270
+ u = Dt("slot"), a !== "default" && W(u, "name", a);
271
+ },
272
+ /**
273
+ * @param {HTMLElement} target
274
+ * @param {HTMLElement} [anchor]
275
+ */
276
+ m: function(f, S) {
277
+ se(f, u, S);
278
+ },
279
+ d: function(f) {
280
+ f && Ct(u);
281
+ }
282
+ };
283
+ };
284
+ };
285
+ if (yield Promise.resolve(), !this.$$cn || this.$$c)
286
+ return;
287
+ const i = {}, o = Mn(this);
288
+ for (const a of this.$$s)
289
+ a in o && (i[a] = [t(a)]);
290
+ for (const a of this.attributes) {
291
+ const u = this.$$g_p(a.name);
292
+ u in this.$$d || (this.$$d[u] = wt(u, a.value, this.$$p_d, "toProp"));
293
+ }
294
+ for (const a in this.$$p_d)
295
+ !(a in this.$$d) && this[a] !== void 0 && (this.$$d[a] = this[a], delete this[a]);
296
+ this.$$c = new this.$$ctor({
297
+ target: this.shadowRoot || this,
298
+ props: ve(Pe({}, this.$$d), {
299
+ $$slots: i,
300
+ $$scope: {
301
+ ctx: []
302
+ }
303
+ })
304
+ });
305
+ const s = () => {
306
+ this.$$r = !0;
307
+ for (const a in this.$$p_d)
308
+ if (this.$$d[a] = this.$$c.$$.ctx[this.$$c.$$.props[a]], this.$$p_d[a].reflect) {
309
+ const u = wt(
310
+ a,
311
+ this.$$d[a],
312
+ this.$$p_d,
313
+ "toAttribute"
314
+ );
315
+ u == null ? this.removeAttribute(this.$$p_d[a].attribute || a) : this.setAttribute(this.$$p_d[a].attribute || a, u);
316
+ }
317
+ this.$$r = !1;
318
+ };
319
+ this.$$c.$$.after_update.push(s), s();
320
+ for (const a in this.$$l)
321
+ for (const u of this.$$l[a]) {
322
+ const d = this.$$c.$on(a, u);
323
+ this.$$l_u.set(u, d);
324
+ }
325
+ this.$$l = {};
326
+ }
327
+ });
328
+ }
329
+ // We don't need this when working within Svelte code, but for compatibility of people using this outside of Svelte
330
+ // and setting attributes through setAttribute etc, this is helpful
331
+ attributeChangedCallback(t, i, o) {
332
+ var s;
333
+ this.$$r || (t = this.$$g_p(t), this.$$d[t] = wt(t, o, this.$$p_d, "toProp"), (s = this.$$c) == null || s.$set({ [t]: this.$$d[t] }));
334
+ }
335
+ disconnectedCallback() {
336
+ this.$$cn = !1, Promise.resolve().then(() => {
337
+ !this.$$cn && this.$$c && (this.$$c.$destroy(), this.$$c = void 0);
338
+ });
339
+ }
340
+ $$g_p(t) {
341
+ return Object.keys(this.$$p_d).find(
342
+ (i) => this.$$p_d[i].attribute === t || !this.$$p_d[i].attribute && i.toLowerCase() === t
343
+ ) || t;
344
+ }
345
+ });
346
+ function wt(e, t, i, o) {
347
+ var a;
348
+ const s = (a = i[e]) == null ? void 0 : a.type;
349
+ if (t = s === "Boolean" && typeof t != "boolean" ? t != null : t, !o || !i[e])
350
+ return t;
351
+ if (o === "toAttribute")
352
+ switch (s) {
353
+ case "Object":
354
+ case "Array":
355
+ return t == null ? null : JSON.stringify(t);
356
+ case "Boolean":
357
+ return t ? "" : null;
358
+ case "Number":
359
+ return t == null ? null : t;
360
+ default:
361
+ return t;
362
+ }
363
+ else
364
+ switch (s) {
365
+ case "Object":
366
+ case "Array":
367
+ return t && JSON.parse(t);
368
+ case "Boolean":
369
+ return t;
370
+ case "Number":
371
+ return t != null ? +t : t;
372
+ default:
373
+ return t;
374
+ }
375
+ }
376
+ function Yn(e, t, i, o, s, a) {
377
+ let u = class extends Qe {
378
+ constructor() {
379
+ super(e, i, s), this.$$p_d = t;
380
+ }
381
+ static get observedAttributes() {
382
+ return Object.keys(t).map(
383
+ (d) => (t[d].attribute || d).toLowerCase()
384
+ );
385
+ }
386
+ };
387
+ return Object.keys(t).forEach((d) => {
388
+ Object.defineProperty(u.prototype, d, {
389
+ get() {
390
+ return this.$$c && d in this.$$c ? this.$$c[d] : this.$$d[d];
391
+ },
392
+ set(h) {
393
+ var f;
394
+ h = wt(d, h, t), this.$$d[d] = h, (f = this.$$c) == null || f.$set({ [d]: h });
395
+ }
396
+ });
397
+ }), o.forEach((d) => {
398
+ Object.defineProperty(u.prototype, d, {
399
+ get() {
400
+ var h;
401
+ return (h = this.$$c) == null ? void 0 : h[d];
402
+ }
403
+ });
404
+ }), e.element = /** @type {any} */
405
+ u, u;
406
+ }
407
+ class Vn {
408
+ constructor() {
409
+ /**
410
+ * ### PRIVATE API
411
+ *
412
+ * Do not use, may change at any time
413
+ *
414
+ * @type {any}
415
+ */
416
+ I(this, "$$");
417
+ /**
418
+ * ### PRIVATE API
419
+ *
420
+ * Do not use, may change at any time
421
+ *
422
+ * @type {any}
423
+ */
424
+ I(this, "$$set");
425
+ }
426
+ /** @returns {void} */
427
+ $destroy() {
428
+ Gn(this, 1), this.$destroy = pt;
429
+ }
430
+ /**
431
+ * @template {Extract<keyof Events, string>} K
432
+ * @param {K} type
433
+ * @param {((e: Events[K]) => void) | null | undefined} callback
434
+ * @returns {() => void}
435
+ */
436
+ $on(t, i) {
437
+ if (!Ze(i))
438
+ return pt;
439
+ const o = this.$$.callbacks[t] || (this.$$.callbacks[t] = []);
440
+ return o.push(i), () => {
441
+ const s = o.indexOf(i);
442
+ s !== -1 && o.splice(s, 1);
443
+ };
444
+ }
445
+ /**
446
+ * @param {Partial<Props>} props
447
+ * @returns {void}
448
+ */
449
+ $set(t) {
450
+ this.$$set && !wn(t) && (this.$$.skip_bound = !0, this.$$set(t), this.$$.skip_bound = !1);
451
+ }
452
+ }
453
+ const Xn = "4";
454
+ typeof window != "undefined" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(Xn);
455
+ const it = "__WIDGET_GLOBAL_STYLE_CACHE__";
456
+ function qn(e, t) {
457
+ if (e) {
458
+ const i = document.createElement("style");
459
+ i.innerHTML = t, e.appendChild(i);
460
+ }
461
+ }
462
+ function Kn(e, t) {
463
+ if (!e || !t)
464
+ return;
465
+ const i = new URL(t);
466
+ fetch(i.href).then((o) => o.text()).then((o) => {
467
+ const s = document.createElement("style");
468
+ s.innerHTML = o, e && e.appendChild(s);
469
+ }).catch((o) => {
470
+ console.error("There was an error while trying to load client styling from URL", o);
471
+ });
472
+ }
473
+ function Zn(e, t, i, o = !1) {
474
+ if (!window.emMessageBus)
475
+ return;
476
+ if (!("adoptedStyleSheets" in Document.prototype) || !o)
477
+ return i = Jn(e, t), i;
478
+ window[it] || (window[it] = {}), i = Qn(e, t);
479
+ const a = i.unsubscribe.bind(i), u = () => {
480
+ if (window[it][t]) {
481
+ const d = window[it][t];
482
+ d.refCount > 1 ? d.refCount = d.refCount - 1 : delete window[it][t];
483
+ }
484
+ a();
485
+ };
486
+ return i.unsubscribe = u, i;
487
+ }
488
+ function Jn(e, t) {
489
+ const i = document.createElement("style");
490
+ return window.emMessageBus.subscribe(t, (o) => {
491
+ e && (i.innerHTML = o, e.appendChild(i));
492
+ });
493
+ }
494
+ function Qn(e, t) {
495
+ return window.emMessageBus.subscribe(t, (i) => {
496
+ if (!e)
497
+ return;
498
+ const o = e.getRootNode(), s = window[it];
499
+ let a = s[t] && s[t].sheet;
500
+ a ? s[t].refCount = s[t].refCount + 1 : (a = new CSSStyleSheet(), a.replaceSync(i), s[t] = {
501
+ sheet: a,
502
+ refCount: 1
503
+ });
504
+ const u = o.adoptedStyleSheets || [];
505
+ u.includes(a) || (o.adoptedStyleSheets = [...u, a]);
506
+ });
507
+ }
508
+ /*! @license DOMPurify 3.1.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.6/LICENSE */
509
+ const {
510
+ entries: tn,
511
+ setPrototypeOf: Be,
512
+ isFrozen: ti,
513
+ getPrototypeOf: ei,
514
+ getOwnPropertyDescriptor: ni
515
+ } = Object;
516
+ let {
517
+ freeze: N,
518
+ seal: M,
519
+ create: en
520
+ } = Object, {
521
+ apply: oe,
522
+ construct: re
523
+ } = typeof Reflect != "undefined" && Reflect;
524
+ N || (N = function(t) {
525
+ return t;
526
+ });
527
+ M || (M = function(t) {
528
+ return t;
529
+ });
530
+ oe || (oe = function(t, i, o) {
531
+ return t.apply(i, o);
532
+ });
533
+ re || (re = function(t, i) {
534
+ return new t(...i);
535
+ });
536
+ const Lt = D(Array.prototype.forEach), ze = D(Array.prototype.pop), ct = D(Array.prototype.push), Ot = D(String.prototype.toLowerCase), Kt = D(String.prototype.toString), Ge = D(String.prototype.match), ut = D(String.prototype.replace), ii = D(String.prototype.indexOf), oi = D(String.prototype.trim), k = D(Object.prototype.hasOwnProperty), O = D(RegExp.prototype.test), ft = ri(TypeError);
537
+ function D(e) {
538
+ return function(t) {
539
+ for (var i = arguments.length, o = new Array(i > 1 ? i - 1 : 0), s = 1; s < i; s++)
540
+ o[s - 1] = arguments[s];
541
+ return oe(e, t, o);
542
+ };
543
+ }
544
+ function ri(e) {
545
+ return function() {
546
+ for (var t = arguments.length, i = new Array(t), o = 0; o < t; o++)
547
+ i[o] = arguments[o];
548
+ return re(e, i);
549
+ };
550
+ }
551
+ function m(e, t) {
552
+ let i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Ot;
553
+ Be && Be(e, null);
554
+ let o = t.length;
555
+ for (; o--; ) {
556
+ let s = t[o];
557
+ if (typeof s == "string") {
558
+ const a = i(s);
559
+ a !== s && (ti(t) || (t[o] = a), s = a);
560
+ }
561
+ e[s] = !0;
562
+ }
563
+ return e;
564
+ }
565
+ function si(e) {
566
+ for (let t = 0; t < e.length; t++)
567
+ k(e, t) || (e[t] = null);
568
+ return e;
569
+ }
570
+ function X(e) {
571
+ const t = en(null);
572
+ for (const [i, o] of tn(e))
573
+ k(e, i) && (Array.isArray(o) ? t[i] = si(o) : o && typeof o == "object" && o.constructor === Object ? t[i] = X(o) : t[i] = o);
574
+ return t;
575
+ }
576
+ function mt(e, t) {
577
+ for (; e !== null; ) {
578
+ const o = ni(e, t);
579
+ if (o) {
580
+ if (o.get)
581
+ return D(o.get);
582
+ if (typeof o.value == "function")
583
+ return D(o.value);
584
+ }
585
+ e = ei(e);
586
+ }
587
+ function i() {
588
+ return null;
589
+ }
590
+ return i;
591
+ }
592
+ const We = N(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), Zt = N(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Jt = N(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), ai = N(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), Qt = N(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), li = N(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), je = N(["#text"]), Ye = N(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), te = N(["accent-height", "accumulate", "additive", "alignment-baseline", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), Ve = N(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), Rt = N(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), ci = M(/\{\{[\w\W]*|[\w\W]*\}\}/gm), ui = M(/<%[\w\W]*|[\w\W]*%>/gm), fi = M(/\${[\w\W]*}/gm), mi = M(/^data-[\-\w.\u00B7-\uFFFF]/), di = M(/^aria-[\-\w]+$/), nn = M(
593
+ /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
594
+ // eslint-disable-line no-useless-escape
595
+ ), hi = M(/^(?:\w+script|data):/i), pi = M(
596
+ /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
597
+ // eslint-disable-line no-control-regex
598
+ ), on = M(/^html$/i), _i = M(/^[a-z][.\w]*(-[.\w]+)+$/i);
599
+ var Xe = /* @__PURE__ */ Object.freeze({
600
+ __proto__: null,
601
+ MUSTACHE_EXPR: ci,
602
+ ERB_EXPR: ui,
603
+ TMPLIT_EXPR: fi,
604
+ DATA_ATTR: mi,
605
+ ARIA_ATTR: di,
606
+ IS_ALLOWED_URI: nn,
607
+ IS_SCRIPT_OR_DATA: hi,
608
+ ATTR_WHITESPACE: pi,
609
+ DOCTYPE_NAME: on,
610
+ CUSTOM_ELEMENT: _i
611
+ });
612
+ const dt = {
613
+ element: 1,
614
+ text: 3,
615
+ // Deprecated
616
+ progressingInstruction: 7,
617
+ comment: 8,
618
+ document: 9
619
+ }, gi = function() {
620
+ return typeof window == "undefined" ? null : window;
621
+ }, Ei = function(t, i) {
622
+ if (typeof t != "object" || typeof t.createPolicy != "function")
623
+ return null;
624
+ let o = null;
625
+ const s = "data-tt-policy-suffix";
626
+ i && i.hasAttribute(s) && (o = i.getAttribute(s));
627
+ const a = "dompurify" + (o ? "#" + o : "");
628
+ try {
629
+ return t.createPolicy(a, {
630
+ createHTML(u) {
631
+ return u;
632
+ },
633
+ createScriptURL(u) {
634
+ return u;
635
+ }
636
+ });
637
+ } catch (u) {
638
+ return console.warn("TrustedTypes policy " + a + " could not be created."), null;
639
+ }
640
+ };
641
+ function rn() {
642
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : gi();
643
+ const t = (c) => rn(c);
644
+ if (t.version = "3.1.6", t.removed = [], !e || !e.document || e.document.nodeType !== dt.document)
645
+ return t.isSupported = !1, t;
646
+ let {
647
+ document: i
648
+ } = e;
649
+ const o = i, s = o.currentScript, {
650
+ DocumentFragment: a,
651
+ HTMLTemplateElement: u,
652
+ Node: d,
653
+ Element: h,
654
+ NodeFilter: f,
655
+ NamedNodeMap: S = e.NamedNodeMap || e.MozNamedAttrMap,
656
+ HTMLFormElement: T,
657
+ DOMParser: L,
658
+ trustedTypes: H
659
+ } = e, P = h.prototype, It = mt(P, "cloneNode"), Mt = mt(P, "remove"), _ = mt(P, "nextSibling"), x = mt(P, "childNodes"), j = mt(P, "parentNode");
660
+ if (typeof u == "function") {
661
+ const c = i.createElement("template");
662
+ c.content && c.content.ownerDocument && (i = c.content.ownerDocument);
663
+ }
664
+ let E, B = "";
665
+ const {
666
+ implementation: gt,
667
+ createNodeIterator: Et,
668
+ createDocumentFragment: sn,
669
+ getElementsByTagName: an
670
+ } = i, {
671
+ importNode: ln
672
+ } = o;
673
+ let v = {};
674
+ t.isSupported = typeof tn == "function" && typeof j == "function" && gt && gt.createHTMLDocument !== void 0;
675
+ const {
676
+ MUSTACHE_EXPR: xt,
677
+ ERB_EXPR: kt,
678
+ TMPLIT_EXPR: Pt,
679
+ DATA_ATTR: cn,
680
+ ARIA_ATTR: un,
681
+ IS_SCRIPT_OR_DATA: fn,
682
+ ATTR_WHITESPACE: ae,
683
+ CUSTOM_ELEMENT: mn
684
+ } = Xe;
685
+ let {
686
+ IS_ALLOWED_URI: le
687
+ } = Xe, A = null;
688
+ const ce = m({}, [...We, ...Zt, ...Jt, ...Qt, ...je]);
689
+ let b = null;
690
+ const ue = m({}, [...Ye, ...te, ...Ve, ...Rt]);
691
+ let g = Object.seal(en(null, {
692
+ tagNameCheck: {
693
+ writable: !0,
694
+ configurable: !1,
695
+ enumerable: !0,
696
+ value: null
697
+ },
698
+ attributeNameCheck: {
699
+ writable: !0,
700
+ configurable: !1,
701
+ enumerable: !0,
702
+ value: null
703
+ },
704
+ allowCustomizedBuiltInElements: {
705
+ writable: !0,
706
+ configurable: !1,
707
+ enumerable: !0,
708
+ value: !1
709
+ }
710
+ })), rt = null, vt = null, fe = !0, Ut = !0, me = !1, de = !0, q = !1, Ft = !0, V = !1, Ht = !1, Bt = !1, K = !1, Tt = !1, At = !1, he = !0, pe = !1;
711
+ const dn = "user-content-";
712
+ let zt = !0, st = !1, Z = {}, J = null;
713
+ const _e = m({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
714
+ let ge = null;
715
+ const Ee = m({}, ["audio", "video", "img", "source", "image", "track"]);
716
+ let Gt = null;
717
+ const Te = m({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), bt = "http://www.w3.org/1998/Math/MathML", yt = "http://www.w3.org/2000/svg", z = "http://www.w3.org/1999/xhtml";
718
+ let Q = z, Wt = !1, jt = null;
719
+ const hn = m({}, [bt, yt, z], Kt);
720
+ let at = null;
721
+ const pn = ["application/xhtml+xml", "text/html"], _n = "text/html";
722
+ let y = null, tt = null;
723
+ const gn = i.createElement("form"), Ae = function(n) {
724
+ return n instanceof RegExp || n instanceof Function;
725
+ }, Yt = function() {
726
+ let n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
727
+ if (!(tt && tt === n)) {
728
+ if ((!n || typeof n != "object") && (n = {}), n = X(n), at = // eslint-disable-next-line unicorn/prefer-includes
729
+ pn.indexOf(n.PARSER_MEDIA_TYPE) === -1 ? _n : n.PARSER_MEDIA_TYPE, y = at === "application/xhtml+xml" ? Kt : Ot, A = k(n, "ALLOWED_TAGS") ? m({}, n.ALLOWED_TAGS, y) : ce, b = k(n, "ALLOWED_ATTR") ? m({}, n.ALLOWED_ATTR, y) : ue, jt = k(n, "ALLOWED_NAMESPACES") ? m({}, n.ALLOWED_NAMESPACES, Kt) : hn, Gt = k(n, "ADD_URI_SAFE_ATTR") ? m(
730
+ X(Te),
731
+ // eslint-disable-line indent
732
+ n.ADD_URI_SAFE_ATTR,
733
+ // eslint-disable-line indent
734
+ y
735
+ // eslint-disable-line indent
736
+ ) : Te, ge = k(n, "ADD_DATA_URI_TAGS") ? m(
737
+ X(Ee),
738
+ // eslint-disable-line indent
739
+ n.ADD_DATA_URI_TAGS,
740
+ // eslint-disable-line indent
741
+ y
742
+ // eslint-disable-line indent
743
+ ) : Ee, J = k(n, "FORBID_CONTENTS") ? m({}, n.FORBID_CONTENTS, y) : _e, rt = k(n, "FORBID_TAGS") ? m({}, n.FORBID_TAGS, y) : {}, vt = k(n, "FORBID_ATTR") ? m({}, n.FORBID_ATTR, y) : {}, Z = k(n, "USE_PROFILES") ? n.USE_PROFILES : !1, fe = n.ALLOW_ARIA_ATTR !== !1, Ut = n.ALLOW_DATA_ATTR !== !1, me = n.ALLOW_UNKNOWN_PROTOCOLS || !1, de = n.ALLOW_SELF_CLOSE_IN_ATTR !== !1, q = n.SAFE_FOR_TEMPLATES || !1, Ft = n.SAFE_FOR_XML !== !1, V = n.WHOLE_DOCUMENT || !1, K = n.RETURN_DOM || !1, Tt = n.RETURN_DOM_FRAGMENT || !1, At = n.RETURN_TRUSTED_TYPE || !1, Bt = n.FORCE_BODY || !1, he = n.SANITIZE_DOM !== !1, pe = n.SANITIZE_NAMED_PROPS || !1, zt = n.KEEP_CONTENT !== !1, st = n.IN_PLACE || !1, le = n.ALLOWED_URI_REGEXP || nn, Q = n.NAMESPACE || z, g = n.CUSTOM_ELEMENT_HANDLING || {}, n.CUSTOM_ELEMENT_HANDLING && Ae(n.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (g.tagNameCheck = n.CUSTOM_ELEMENT_HANDLING.tagNameCheck), n.CUSTOM_ELEMENT_HANDLING && Ae(n.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (g.attributeNameCheck = n.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), n.CUSTOM_ELEMENT_HANDLING && typeof n.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (g.allowCustomizedBuiltInElements = n.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), q && (Ut = !1), Tt && (K = !0), Z && (A = m({}, je), b = [], Z.html === !0 && (m(A, We), m(b, Ye)), Z.svg === !0 && (m(A, Zt), m(b, te), m(b, Rt)), Z.svgFilters === !0 && (m(A, Jt), m(b, te), m(b, Rt)), Z.mathMl === !0 && (m(A, Qt), m(b, Ve), m(b, Rt))), n.ADD_TAGS && (A === ce && (A = X(A)), m(A, n.ADD_TAGS, y)), n.ADD_ATTR && (b === ue && (b = X(b)), m(b, n.ADD_ATTR, y)), n.ADD_URI_SAFE_ATTR && m(Gt, n.ADD_URI_SAFE_ATTR, y), n.FORBID_CONTENTS && (J === _e && (J = X(J)), m(J, n.FORBID_CONTENTS, y)), zt && (A["#text"] = !0), V && m(A, ["html", "head", "body"]), A.table && (m(A, ["tbody"]), delete rt.tbody), n.TRUSTED_TYPES_POLICY) {
744
+ if (typeof n.TRUSTED_TYPES_POLICY.createHTML != "function")
745
+ throw ft('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
746
+ if (typeof n.TRUSTED_TYPES_POLICY.createScriptURL != "function")
747
+ throw ft('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
748
+ E = n.TRUSTED_TYPES_POLICY, B = E.createHTML("");
749
+ } else
750
+ E === void 0 && (E = Ei(H, s)), E !== null && typeof B == "string" && (B = E.createHTML(""));
751
+ N && N(n), tt = n;
752
+ }
753
+ }, be = m({}, ["mi", "mo", "mn", "ms", "mtext"]), ye = m({}, ["foreignobject", "annotation-xml"]), En = m({}, ["title", "style", "font", "a", "script"]), Se = m({}, [...Zt, ...Jt, ...ai]), $e = m({}, [...Qt, ...li]), Tn = function(n) {
754
+ let r = j(n);
755
+ (!r || !r.tagName) && (r = {
756
+ namespaceURI: Q,
757
+ tagName: "template"
758
+ });
759
+ const l = Ot(n.tagName), p = Ot(r.tagName);
760
+ return jt[n.namespaceURI] ? n.namespaceURI === yt ? r.namespaceURI === z ? l === "svg" : r.namespaceURI === bt ? l === "svg" && (p === "annotation-xml" || be[p]) : !!Se[l] : n.namespaceURI === bt ? r.namespaceURI === z ? l === "math" : r.namespaceURI === yt ? l === "math" && ye[p] : !!$e[l] : n.namespaceURI === z ? r.namespaceURI === yt && !ye[p] || r.namespaceURI === bt && !be[p] ? !1 : !$e[l] && (En[l] || !Se[l]) : !!(at === "application/xhtml+xml" && jt[n.namespaceURI]) : !1;
761
+ }, U = function(n) {
762
+ ct(t.removed, {
763
+ element: n
764
+ });
765
+ try {
766
+ j(n).removeChild(n);
767
+ } catch (r) {
768
+ Mt(n);
769
+ }
770
+ }, St = function(n, r) {
771
+ try {
772
+ ct(t.removed, {
773
+ attribute: r.getAttributeNode(n),
774
+ from: r
775
+ });
776
+ } catch (l) {
777
+ ct(t.removed, {
778
+ attribute: null,
779
+ from: r
780
+ });
781
+ }
782
+ if (r.removeAttribute(n), n === "is" && !b[n])
783
+ if (K || Tt)
784
+ try {
785
+ U(r);
786
+ } catch (l) {
787
+ }
788
+ else
789
+ try {
790
+ r.setAttribute(n, "");
791
+ } catch (l) {
792
+ }
793
+ }, Le = function(n) {
794
+ let r = null, l = null;
795
+ if (Bt)
796
+ n = "<remove></remove>" + n;
797
+ else {
798
+ const $ = Ge(n, /^[\r\n\t ]+/);
799
+ l = $ && $[0];
800
+ }
801
+ at === "application/xhtml+xml" && Q === z && (n = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + n + "</body></html>");
802
+ const p = E ? E.createHTML(n) : n;
803
+ if (Q === z)
804
+ try {
805
+ r = new L().parseFromString(p, at);
806
+ } catch ($) {
807
+ }
808
+ if (!r || !r.documentElement) {
809
+ r = gt.createDocument(Q, "template", null);
810
+ try {
811
+ r.documentElement.innerHTML = Wt ? B : p;
812
+ } catch ($) {
813
+ }
814
+ }
815
+ const R = r.body || r.documentElement;
816
+ return n && l && R.insertBefore(i.createTextNode(l), R.childNodes[0] || null), Q === z ? an.call(r, V ? "html" : "body")[0] : V ? r.documentElement : R;
817
+ }, Re = function(n) {
818
+ return Et.call(
819
+ n.ownerDocument || n,
820
+ n,
821
+ // eslint-disable-next-line no-bitwise
822
+ f.SHOW_ELEMENT | f.SHOW_COMMENT | f.SHOW_TEXT | f.SHOW_PROCESSING_INSTRUCTION | f.SHOW_CDATA_SECTION,
823
+ null
824
+ );
825
+ }, we = function(n) {
826
+ return n instanceof T && (typeof n.nodeName != "string" || typeof n.textContent != "string" || typeof n.removeChild != "function" || !(n.attributes instanceof S) || typeof n.removeAttribute != "function" || typeof n.setAttribute != "function" || typeof n.namespaceURI != "string" || typeof n.insertBefore != "function" || typeof n.hasChildNodes != "function");
827
+ }, Oe = function(n) {
828
+ return typeof d == "function" && n instanceof d;
829
+ }, G = function(n, r, l) {
830
+ v[n] && Lt(v[n], (p) => {
831
+ p.call(t, r, l, tt);
832
+ });
833
+ }, Ne = function(n) {
834
+ let r = null;
835
+ if (G("beforeSanitizeElements", n, null), we(n))
836
+ return U(n), !0;
837
+ const l = y(n.nodeName);
838
+ if (G("uponSanitizeElement", n, {
839
+ tagName: l,
840
+ allowedTags: A
841
+ }), n.hasChildNodes() && !Oe(n.firstElementChild) && O(/<[/\w]/g, n.innerHTML) && O(/<[/\w]/g, n.textContent) || n.nodeType === dt.progressingInstruction || Ft && n.nodeType === dt.comment && O(/<[/\w]/g, n.data))
842
+ return U(n), !0;
843
+ if (!A[l] || rt[l]) {
844
+ if (!rt[l] && De(l) && (g.tagNameCheck instanceof RegExp && O(g.tagNameCheck, l) || g.tagNameCheck instanceof Function && g.tagNameCheck(l)))
845
+ return !1;
846
+ if (zt && !J[l]) {
847
+ const p = j(n) || n.parentNode, R = x(n) || n.childNodes;
848
+ if (R && p) {
849
+ const $ = R.length;
850
+ for (let C = $ - 1; C >= 0; --C) {
851
+ const F = It(R[C], !0);
852
+ F.__removalCount = (n.__removalCount || 0) + 1, p.insertBefore(F, _(n));
853
+ }
854
+ }
855
+ }
856
+ return U(n), !0;
857
+ }
858
+ return n instanceof h && !Tn(n) || (l === "noscript" || l === "noembed" || l === "noframes") && O(/<\/no(script|embed|frames)/i, n.innerHTML) ? (U(n), !0) : (q && n.nodeType === dt.text && (r = n.textContent, Lt([xt, kt, Pt], (p) => {
859
+ r = ut(r, p, " ");
860
+ }), n.textContent !== r && (ct(t.removed, {
861
+ element: n.cloneNode()
862
+ }), n.textContent = r)), G("afterSanitizeElements", n, null), !1);
863
+ }, Ce = function(n, r, l) {
864
+ if (he && (r === "id" || r === "name") && (l in i || l in gn))
865
+ return !1;
866
+ if (!(Ut && !vt[r] && O(cn, r))) {
867
+ if (!(fe && O(un, r))) {
868
+ if (!b[r] || vt[r]) {
869
+ if (
870
+ // First condition does a very basic check if a) it's basically a valid custom element tagname AND
871
+ // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
872
+ // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
873
+ !(De(n) && (g.tagNameCheck instanceof RegExp && O(g.tagNameCheck, n) || g.tagNameCheck instanceof Function && g.tagNameCheck(n)) && (g.attributeNameCheck instanceof RegExp && O(g.attributeNameCheck, r) || g.attributeNameCheck instanceof Function && g.attributeNameCheck(r)) || // Alternative, second condition checks if it's an `is`-attribute, AND
874
+ // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
875
+ r === "is" && g.allowCustomizedBuiltInElements && (g.tagNameCheck instanceof RegExp && O(g.tagNameCheck, l) || g.tagNameCheck instanceof Function && g.tagNameCheck(l)))
876
+ )
877
+ return !1;
878
+ } else if (!Gt[r]) {
879
+ if (!O(le, ut(l, ae, ""))) {
880
+ if (!((r === "src" || r === "xlink:href" || r === "href") && n !== "script" && ii(l, "data:") === 0 && ge[n])) {
881
+ if (!(me && !O(fn, ut(l, ae, "")))) {
882
+ if (l)
883
+ return !1;
884
+ }
885
+ }
886
+ }
887
+ }
888
+ }
889
+ }
890
+ return !0;
891
+ }, De = function(n) {
892
+ return n !== "annotation-xml" && Ge(n, mn);
893
+ }, Ie = function(n) {
894
+ G("beforeSanitizeAttributes", n, null);
895
+ const {
896
+ attributes: r
897
+ } = n;
898
+ if (!r)
899
+ return;
900
+ const l = {
901
+ attrName: "",
902
+ attrValue: "",
903
+ keepAttr: !0,
904
+ allowedAttributes: b
905
+ };
906
+ let p = r.length;
907
+ for (; p--; ) {
908
+ const R = r[p], {
909
+ name: $,
910
+ namespaceURI: C,
911
+ value: F
912
+ } = R, lt = y($);
913
+ let w = $ === "value" ? F : oi(F);
914
+ if (l.attrName = lt, l.attrValue = w, l.keepAttr = !0, l.forceKeepAttr = void 0, G("uponSanitizeAttribute", n, l), w = l.attrValue, Ft && O(/((--!?|])>)|<\/(style|title)/i, w)) {
915
+ St($, n);
916
+ continue;
917
+ }
918
+ if (l.forceKeepAttr || (St($, n), !l.keepAttr))
919
+ continue;
920
+ if (!de && O(/\/>/i, w)) {
921
+ St($, n);
922
+ continue;
923
+ }
924
+ q && Lt([xt, kt, Pt], (xe) => {
925
+ w = ut(w, xe, " ");
926
+ });
927
+ const Me = y(n.nodeName);
928
+ if (Ce(Me, lt, w)) {
929
+ if (pe && (lt === "id" || lt === "name") && (St($, n), w = dn + w), E && typeof H == "object" && typeof H.getAttributeType == "function" && !C)
930
+ switch (H.getAttributeType(Me, lt)) {
931
+ case "TrustedHTML": {
932
+ w = E.createHTML(w);
933
+ break;
934
+ }
935
+ case "TrustedScriptURL": {
936
+ w = E.createScriptURL(w);
937
+ break;
938
+ }
939
+ }
940
+ try {
941
+ C ? n.setAttributeNS(C, $, w) : n.setAttribute($, w), we(n) ? U(n) : ze(t.removed);
942
+ } catch (xe) {
943
+ }
944
+ }
945
+ }
946
+ G("afterSanitizeAttributes", n, null);
947
+ }, An = function c(n) {
948
+ let r = null;
949
+ const l = Re(n);
950
+ for (G("beforeSanitizeShadowDOM", n, null); r = l.nextNode(); )
951
+ G("uponSanitizeShadowNode", r, null), !Ne(r) && (r.content instanceof a && c(r.content), Ie(r));
952
+ G("afterSanitizeShadowDOM", n, null);
953
+ };
954
+ return t.sanitize = function(c) {
955
+ let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = null, l = null, p = null, R = null;
956
+ if (Wt = !c, Wt && (c = "<!-->"), typeof c != "string" && !Oe(c))
957
+ if (typeof c.toString == "function") {
958
+ if (c = c.toString(), typeof c != "string")
959
+ throw ft("dirty is not a string, aborting");
960
+ } else
961
+ throw ft("toString is not a function");
962
+ if (!t.isSupported)
963
+ return c;
964
+ if (Ht || Yt(n), t.removed = [], typeof c == "string" && (st = !1), st) {
965
+ if (c.nodeName) {
966
+ const F = y(c.nodeName);
967
+ if (!A[F] || rt[F])
968
+ throw ft("root node is forbidden and cannot be sanitized in-place");
969
+ }
970
+ } else if (c instanceof d)
971
+ r = Le("<!---->"), l = r.ownerDocument.importNode(c, !0), l.nodeType === dt.element && l.nodeName === "BODY" || l.nodeName === "HTML" ? r = l : r.appendChild(l);
972
+ else {
973
+ if (!K && !q && !V && // eslint-disable-next-line unicorn/prefer-includes
974
+ c.indexOf("<") === -1)
975
+ return E && At ? E.createHTML(c) : c;
976
+ if (r = Le(c), !r)
977
+ return K ? null : At ? B : "";
978
+ }
979
+ r && Bt && U(r.firstChild);
980
+ const $ = Re(st ? c : r);
981
+ for (; p = $.nextNode(); )
982
+ Ne(p) || (p.content instanceof a && An(p.content), Ie(p));
983
+ if (st)
984
+ return c;
985
+ if (K) {
986
+ if (Tt)
987
+ for (R = sn.call(r.ownerDocument); r.firstChild; )
988
+ R.appendChild(r.firstChild);
989
+ else
990
+ R = r;
991
+ return (b.shadowroot || b.shadowrootmode) && (R = ln.call(o, R, !0)), R;
992
+ }
993
+ let C = V ? r.outerHTML : r.innerHTML;
994
+ return V && A["!doctype"] && r.ownerDocument && r.ownerDocument.doctype && r.ownerDocument.doctype.name && O(on, r.ownerDocument.doctype.name) && (C = "<!DOCTYPE " + r.ownerDocument.doctype.name + `>
995
+ ` + C), q && Lt([xt, kt, Pt], (F) => {
996
+ C = ut(C, F, " ");
997
+ }), E && At ? E.createHTML(C) : C;
998
+ }, t.setConfig = function() {
999
+ let c = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1000
+ Yt(c), Ht = !0;
1001
+ }, t.clearConfig = function() {
1002
+ tt = null, Ht = !1;
1003
+ }, t.isValidAttribute = function(c, n, r) {
1004
+ tt || Yt({});
1005
+ const l = y(c), p = y(n);
1006
+ return Ce(l, p, r);
1007
+ }, t.addHook = function(c, n) {
1008
+ typeof n == "function" && (v[c] = v[c] || [], ct(v[c], n));
1009
+ }, t.removeHook = function(c) {
1010
+ if (v[c])
1011
+ return ze(v[c]);
1012
+ }, t.removeHooks = function(c) {
1013
+ v[c] && (v[c] = []);
1014
+ }, t.removeAllHooks = function() {
1015
+ v = {};
1016
+ }, t;
1017
+ }
1018
+ var Ti = rn();
1019
+ function Ai(e) {
1020
+ Nn(e, "svelte-88v9np", ".InlineSvgContainer{display:inline-flex}");
1021
+ }
1022
+ function qe(e) {
1023
+ let t, i;
1024
+ return {
1025
+ c() {
1026
+ t = Dt("img"), Fe(t.src, i = /*src*/
1027
+ e[0]) || W(t, "src", i), W(
1028
+ t,
1029
+ "class",
1030
+ /*className*/
1031
+ e[1]
1032
+ ), W(
1033
+ t,
1034
+ "alt",
1035
+ /*ariaLabel*/
1036
+ e[2]
1037
+ );
1038
+ },
1039
+ m(o, s) {
1040
+ se(o, t, s);
1041
+ },
1042
+ p(o, s) {
1043
+ s & /*src*/
1044
+ 1 && !Fe(t.src, i = /*src*/
1045
+ o[0]) && W(t, "src", i), s & /*className*/
1046
+ 2 && W(
1047
+ t,
1048
+ "class",
1049
+ /*className*/
1050
+ o[1]
1051
+ ), s & /*ariaLabel*/
1052
+ 4 && W(
1053
+ t,
1054
+ "alt",
1055
+ /*ariaLabel*/
1056
+ o[2]
1057
+ );
1058
+ },
1059
+ d(o) {
1060
+ o && Ct(t);
1061
+ }
1062
+ };
1063
+ }
1064
+ function bi(e) {
1065
+ let t, i = (
1066
+ /*failed*/
1067
+ e[4] && qe(e)
1068
+ );
1069
+ return {
1070
+ c() {
1071
+ t = Dt("span"), i && i.c(), W(t, "class", "InlineSvgContainer"), W(t, "part", "svg-container");
1072
+ },
1073
+ m(o, s) {
1074
+ se(o, t, s), i && i.m(t, null), e[8](t);
1075
+ },
1076
+ p(o, [s]) {
1077
+ /*failed*/
1078
+ o[4] ? i ? i.p(o, s) : (i = qe(o), i.c(), i.m(t, null)) : i && (i.d(1), i = null);
1079
+ },
1080
+ i: pt,
1081
+ o: pt,
1082
+ d(o) {
1083
+ o && Ct(t), i && i.d(), e[8](null);
1084
+ }
1085
+ };
1086
+ }
1087
+ function yi(e, t, i) {
1088
+ let { src: o } = t, { className: s = "" } = t, { ariaLabel: a = "" } = t, { clientstyling: u = "" } = t, { clientstylingurl: d = "" } = t, { mbsource: h } = t, f = !1, S = null, T, L, H;
1089
+ function P(_) {
1090
+ return Xt(this, null, function* () {
1091
+ if (_) {
1092
+ if (i(4, f = !1), T == null || T.abort(), T = new AbortController(), !_.toLowerCase().endsWith(".svg")) {
1093
+ i(4, f = !0);
1094
+ return;
1095
+ }
1096
+ try {
1097
+ const x = yield fetch(_, { signal: T.signal });
1098
+ if (!x.ok)
1099
+ throw new Error("Fetch failed");
1100
+ const j = yield x.text(), E = Ti.sanitize(j, {
1101
+ USE_PROFILES: { svg: !0, svgFilters: !0 },
1102
+ FORBID_TAGS: ["foreignObject"],
1103
+ FORBID_ATTR: ["onload", "onerror", "onclick", "onmouseover"]
1104
+ }), Et = new DOMParser().parseFromString(E, "image/svg+xml").querySelector("svg");
1105
+ if (!Et)
1106
+ throw new Error("No SVG element found");
1107
+ if (S = Et, a ? (S.setAttribute("role", "img"), S.setAttribute("aria-label", a)) : S.setAttribute("aria-hidden", "true"), S.setAttribute("part", "svg-icon"), !L)
1108
+ return;
1109
+ L.replaceChildren(S);
1110
+ } catch (x) {
1111
+ if (x.name === "AbortError")
1112
+ return;
1113
+ console.error("Inline SVG error:", x), i(4, f = !0);
1114
+ }
1115
+ }
1116
+ });
1117
+ }
1118
+ function It(_) {
1119
+ var E, B;
1120
+ if (!S)
1121
+ return;
1122
+ const x = (E = _ == null ? void 0 : _.trim()) != null ? E : "", j = (B = S.getAttribute("class")) != null ? B : "";
1123
+ x !== j && (x ? S.setAttribute("class", x) : S.removeAttribute("class"));
1124
+ }
1125
+ xn(() => () => {
1126
+ }), kn(() => {
1127
+ T == null || T.abort();
1128
+ });
1129
+ function Mt(_) {
1130
+ ee[_ ? "unshift" : "push"](() => {
1131
+ L = _, i(3, L);
1132
+ });
1133
+ }
1134
+ return e.$$set = (_) => {
1135
+ "src" in _ && i(0, o = _.src), "className" in _ && i(1, s = _.className), "ariaLabel" in _ && i(2, a = _.ariaLabel), "clientstyling" in _ && i(5, u = _.clientstyling), "clientstylingurl" in _ && i(6, d = _.clientstylingurl), "mbsource" in _ && i(7, h = _.mbsource);
1136
+ }, e.$$.update = () => {
1137
+ e.$$.dirty & /*src*/
1138
+ 1 && o && P(o), e.$$.dirty & /*className*/
1139
+ 2 && It(s), e.$$.dirty & /*clientstyling, customStylingContainer*/
1140
+ 40 && u && L && qn(L, u), e.$$.dirty & /*clientstylingurl, customStylingContainer*/
1141
+ 72 && d && L && Kn(L, d), e.$$.dirty & /*mbsource, customStylingContainer*/
1142
+ 136 && h && L && Zn(L, `${h}.Style`, H);
1143
+ }, [
1144
+ o,
1145
+ s,
1146
+ a,
1147
+ L,
1148
+ f,
1149
+ u,
1150
+ d,
1151
+ h,
1152
+ Mt
1153
+ ];
1154
+ }
1155
+ class Si extends Vn {
1156
+ constructor(t) {
1157
+ super(), jn(
1158
+ this,
1159
+ t,
1160
+ yi,
1161
+ bi,
1162
+ Rn,
1163
+ {
1164
+ src: 0,
1165
+ className: 1,
1166
+ ariaLabel: 2,
1167
+ clientstyling: 5,
1168
+ clientstylingurl: 6,
1169
+ mbsource: 7
1170
+ },
1171
+ Ai
1172
+ );
1173
+ }
1174
+ get src() {
1175
+ return this.$$.ctx[0];
1176
+ }
1177
+ set src(t) {
1178
+ this.$$set({ src: t }), Y();
1179
+ }
1180
+ get className() {
1181
+ return this.$$.ctx[1];
1182
+ }
1183
+ set className(t) {
1184
+ this.$$set({ className: t }), Y();
1185
+ }
1186
+ get ariaLabel() {
1187
+ return this.$$.ctx[2];
1188
+ }
1189
+ set ariaLabel(t) {
1190
+ this.$$set({ ariaLabel: t }), Y();
1191
+ }
1192
+ get clientstyling() {
1193
+ return this.$$.ctx[5];
1194
+ }
1195
+ set clientstyling(t) {
1196
+ this.$$set({ clientstyling: t }), Y();
1197
+ }
1198
+ get clientstylingurl() {
1199
+ return this.$$.ctx[6];
1200
+ }
1201
+ set clientstylingurl(t) {
1202
+ this.$$set({ clientstylingurl: t }), Y();
1203
+ }
1204
+ get mbsource() {
1205
+ return this.$$.ctx[7];
1206
+ }
1207
+ set mbsource(t) {
1208
+ this.$$set({ mbsource: t }), Y();
1209
+ }
1210
+ }
1211
+ Yn(Si, { src: {}, className: {}, ariaLabel: {}, clientstyling: {}, clientstylingurl: {}, mbsource: {} }, [], [], !0);
1212
+ export {
1213
+ Si as default
1214
+ };