/* THIS IS A GENERATED/BUNDLED FILE BY ESBUILD if you want to view the source, please visit the github repository of this plugin */ var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); var __accessCheck = (obj, member, msg) => { if (!member.has(obj)) throw TypeError("Cannot " + msg); }; var __privateGet = (obj, member, getter) => { __accessCheck(obj, member, "read from private field"); return getter ? getter.call(obj) : member.get(obj); }; var __privateAdd = (obj, member, value) => { if (member.has(obj)) throw TypeError("Cannot add the same private member more than once"); member instanceof WeakSet ? member.add(obj) : member.set(obj, value); }; var __privateSet = (obj, member, value, setter) => { __accessCheck(obj, member, "write to private field"); setter ? setter.call(obj, value) : member.set(obj, value); return value; }; var __privateWrapper = (obj, member, setter, getter) => ({ set _(value) { __privateSet(obj, member, value, setter); }, get _() { return __privateGet(obj, member, getter); } }); var __privateMethod = (obj, member, method) => { __accessCheck(obj, member, "access private method"); return method; }; // main.ts var main_exports = {}; __export(main_exports, { BaseView: () => BaseView, VIEW_TYPE: () => VIEW_TYPE, default: () => Crafty }); module.exports = __toCommonJS(main_exports); // node_modules/.pnpm/@lit+reactive-element@2.0.4/node_modules/@lit/reactive-element/css-tag.js var t = globalThis; var e = t.ShadowRoot && (void 0 === t.ShadyCSS || t.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype; var s = Symbol(); var o = /* @__PURE__ */ new WeakMap(); var n = class { constructor(t7, e11, o10) { if (this._$cssResult$ = true, o10 !== s) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead."); this.cssText = t7, this.t = e11; } get styleSheet() { let t7 = this.o; const s5 = this.t; if (e && void 0 === t7) { const e11 = void 0 !== s5 && 1 === s5.length; e11 && (t7 = o.get(s5)), void 0 === t7 && ((this.o = t7 = new CSSStyleSheet()).replaceSync(this.cssText), e11 && o.set(s5, t7)); } return t7; } toString() { return this.cssText; } }; var r = (t7) => new n("string" == typeof t7 ? t7 : t7 + "", void 0, s); var i = (t7, ...e11) => { const o10 = 1 === t7.length ? t7[0] : e11.reduce((e12, s5, o11) => e12 + ((t8) => { if (true === t8._$cssResult$) return t8.cssText; if ("number" == typeof t8) return t8; throw Error("Value passed to 'css' function must be a 'css' function result: " + t8 + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security."); })(s5) + t7[o11 + 1], t7[0]); return new n(o10, t7, s); }; var S = (s5, o10) => { if (e) s5.adoptedStyleSheets = o10.map((t7) => t7 instanceof CSSStyleSheet ? t7 : t7.styleSheet); else for (const e11 of o10) { const o11 = document.createElement("style"), n7 = t.litNonce; void 0 !== n7 && o11.setAttribute("nonce", n7), o11.textContent = e11.cssText, s5.appendChild(o11); } }; var c = e ? (t7) => t7 : (t7) => t7 instanceof CSSStyleSheet ? ((t8) => { let e11 = ""; for (const s5 of t8.cssRules) e11 += s5.cssText; return r(e11); })(t7) : t7; // node_modules/.pnpm/@lit+reactive-element@2.0.4/node_modules/@lit/reactive-element/reactive-element.js var { is: i2, defineProperty: e2, getOwnPropertyDescriptor: r2, getOwnPropertyNames: h, getOwnPropertySymbols: o2, getPrototypeOf: n2 } = Object; var a = globalThis; var c2 = a.trustedTypes; var l = c2 ? c2.emptyScript : ""; var p = a.reactiveElementPolyfillSupport; var d = (t7, s5) => t7; var u = { toAttribute(t7, s5) { switch (s5) { case Boolean: t7 = t7 ? l : null; break; case Object: case Array: t7 = null == t7 ? t7 : JSON.stringify(t7); } return t7; }, fromAttribute(t7, s5) { let i6 = t7; switch (s5) { case Boolean: i6 = null !== t7; break; case Number: i6 = null === t7 ? null : Number(t7); break; case Object: case Array: try { i6 = JSON.parse(t7); } catch (t8) { i6 = null; } } return i6; } }; var f = (t7, s5) => !i2(t7, s5); var y = { attribute: true, type: String, converter: u, reflect: false, hasChanged: f }; var _a, _b; (_a = Symbol.metadata) != null ? _a : Symbol.metadata = Symbol("metadata"), (_b = a.litPropertyMetadata) != null ? _b : a.litPropertyMetadata = /* @__PURE__ */ new WeakMap(); var b = class extends HTMLElement { static addInitializer(t7) { var _a6; this._$Ei(), ((_a6 = this.l) != null ? _a6 : this.l = []).push(t7); } static get observedAttributes() { return this.finalize(), this._$Eh && [...this._$Eh.keys()]; } static createProperty(t7, s5 = y) { if (s5.state && (s5.attribute = false), this._$Ei(), this.elementProperties.set(t7, s5), !s5.noAccessor) { const i6 = Symbol(), r8 = this.getPropertyDescriptor(t7, i6, s5); void 0 !== r8 && e2(this.prototype, t7, r8); } } static getPropertyDescriptor(t7, s5, i6) { var _a6; const { get: e11, set: h3 } = (_a6 = r2(this.prototype, t7)) != null ? _a6 : { get() { return this[s5]; }, set(t8) { this[s5] = t8; } }; return { get() { return e11 == null ? void 0 : e11.call(this); }, set(s6) { const r8 = e11 == null ? void 0 : e11.call(this); h3.call(this, s6), this.requestUpdate(t7, r8, i6); }, configurable: true, enumerable: true }; } static getPropertyOptions(t7) { var _a6; return (_a6 = this.elementProperties.get(t7)) != null ? _a6 : y; } static _$Ei() { if (this.hasOwnProperty(d("elementProperties"))) return; const t7 = n2(this); t7.finalize(), void 0 !== t7.l && (this.l = [...t7.l]), this.elementProperties = new Map(t7.elementProperties); } static finalize() { if (this.hasOwnProperty(d("finalized"))) return; if (this.finalized = true, this._$Ei(), this.hasOwnProperty(d("properties"))) { const t8 = this.properties, s5 = [...h(t8), ...o2(t8)]; for (const i6 of s5) this.createProperty(i6, t8[i6]); } const t7 = this[Symbol.metadata]; if (null !== t7) { const s5 = litPropertyMetadata.get(t7); if (void 0 !== s5) for (const [t8, i6] of s5) this.elementProperties.set(t8, i6); } this._$Eh = /* @__PURE__ */ new Map(); for (const [t8, s5] of this.elementProperties) { const i6 = this._$Eu(t8, s5); void 0 !== i6 && this._$Eh.set(i6, t8); } this.elementStyles = this.finalizeStyles(this.styles); } static finalizeStyles(s5) { const i6 = []; if (Array.isArray(s5)) { const e11 = new Set(s5.flat(1 / 0).reverse()); for (const s6 of e11) i6.unshift(c(s6)); } else void 0 !== s5 && i6.push(c(s5)); return i6; } static _$Eu(t7, s5) { const i6 = s5.attribute; return false === i6 ? void 0 : "string" == typeof i6 ? i6 : "string" == typeof t7 ? t7.toLowerCase() : void 0; } constructor() { super(), this._$Ep = void 0, this.isUpdatePending = false, this.hasUpdated = false, this._$Em = null, this._$Ev(); } _$Ev() { var _a6; this._$ES = new Promise((t7) => this.enableUpdating = t7), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), (_a6 = this.constructor.l) == null ? void 0 : _a6.forEach((t7) => t7(this)); } addController(t7) { var _a6, _b3; ((_a6 = this._$EO) != null ? _a6 : this._$EO = /* @__PURE__ */ new Set()).add(t7), void 0 !== this.renderRoot && this.isConnected && ((_b3 = t7.hostConnected) == null ? void 0 : _b3.call(t7)); } removeController(t7) { var _a6; (_a6 = this._$EO) == null ? void 0 : _a6.delete(t7); } _$E_() { const t7 = /* @__PURE__ */ new Map(), s5 = this.constructor.elementProperties; for (const i6 of s5.keys()) this.hasOwnProperty(i6) && (t7.set(i6, this[i6]), delete this[i6]); t7.size > 0 && (this._$Ep = t7); } createRenderRoot() { var _a6; const t7 = (_a6 = this.shadowRoot) != null ? _a6 : this.attachShadow(this.constructor.shadowRootOptions); return S(t7, this.constructor.elementStyles), t7; } connectedCallback() { var _a6, _b3; (_a6 = this.renderRoot) != null ? _a6 : this.renderRoot = this.createRenderRoot(), this.enableUpdating(true), (_b3 = this._$EO) == null ? void 0 : _b3.forEach((t7) => { var _a7; return (_a7 = t7.hostConnected) == null ? void 0 : _a7.call(t7); }); } enableUpdating(t7) { } disconnectedCallback() { var _a6; (_a6 = this._$EO) == null ? void 0 : _a6.forEach((t7) => { var _a7; return (_a7 = t7.hostDisconnected) == null ? void 0 : _a7.call(t7); }); } attributeChangedCallback(t7, s5, i6) { this._$AK(t7, i6); } _$EC(t7, s5) { var _a6; const i6 = this.constructor.elementProperties.get(t7), e11 = this.constructor._$Eu(t7, i6); if (void 0 !== e11 && true === i6.reflect) { const r8 = (void 0 !== ((_a6 = i6.converter) == null ? void 0 : _a6.toAttribute) ? i6.converter : u).toAttribute(s5, i6.type); this._$Em = t7, null == r8 ? this.removeAttribute(e11) : this.setAttribute(e11, r8), this._$Em = null; } } _$AK(t7, s5) { var _a6; const i6 = this.constructor, e11 = i6._$Eh.get(t7); if (void 0 !== e11 && this._$Em !== e11) { const t8 = i6.getPropertyOptions(e11), r8 = "function" == typeof t8.converter ? { fromAttribute: t8.converter } : void 0 !== ((_a6 = t8.converter) == null ? void 0 : _a6.fromAttribute) ? t8.converter : u; this._$Em = e11, this[e11] = r8.fromAttribute(s5, t8.type), this._$Em = null; } } requestUpdate(t7, s5, i6) { var _a6; if (void 0 !== t7) { if (i6 != null ? i6 : i6 = this.constructor.getPropertyOptions(t7), !((_a6 = i6.hasChanged) != null ? _a6 : f)(this[t7], s5)) return; this.P(t7, s5, i6); } false === this.isUpdatePending && (this._$ES = this._$ET()); } P(t7, s5, i6) { var _a6; this._$AL.has(t7) || this._$AL.set(t7, s5), true === i6.reflect && this._$Em !== t7 && ((_a6 = this._$Ej) != null ? _a6 : this._$Ej = /* @__PURE__ */ new Set()).add(t7); } async _$ET() { this.isUpdatePending = true; try { await this._$ES; } catch (t8) { Promise.reject(t8); } const t7 = this.scheduleUpdate(); return null != t7 && await t7, !this.isUpdatePending; } scheduleUpdate() { return this.performUpdate(); } performUpdate() { var _a6, _b3; if (!this.isUpdatePending) return; if (!this.hasUpdated) { if ((_a6 = this.renderRoot) != null ? _a6 : this.renderRoot = this.createRenderRoot(), this._$Ep) { for (const [t9, s6] of this._$Ep) this[t9] = s6; this._$Ep = void 0; } const t8 = this.constructor.elementProperties; if (t8.size > 0) for (const [s6, i6] of t8) true !== i6.wrapped || this._$AL.has(s6) || void 0 === this[s6] || this.P(s6, this[s6], i6); } let t7 = false; const s5 = this._$AL; try { t7 = this.shouldUpdate(s5), t7 ? (this.willUpdate(s5), (_b3 = this._$EO) == null ? void 0 : _b3.forEach((t8) => { var _a7; return (_a7 = t8.hostUpdate) == null ? void 0 : _a7.call(t8); }), this.update(s5)) : this._$EU(); } catch (s6) { throw t7 = false, this._$EU(), s6; } t7 && this._$AE(s5); } willUpdate(t7) { } _$AE(t7) { var _a6; (_a6 = this._$EO) == null ? void 0 : _a6.forEach((t8) => { var _a7; return (_a7 = t8.hostUpdated) == null ? void 0 : _a7.call(t8); }), this.hasUpdated || (this.hasUpdated = true, this.firstUpdated(t7)), this.updated(t7); } _$EU() { this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = false; } get updateComplete() { return this.getUpdateComplete(); } getUpdateComplete() { return this._$ES; } shouldUpdate(t7) { return true; } update(t7) { this._$Ej && (this._$Ej = this._$Ej.forEach((t8) => this._$EC(t8, this[t8]))), this._$EU(); } updated(t7) { } firstUpdated(t7) { } }; var _a2; b.elementStyles = [], b.shadowRootOptions = { mode: "open" }, b[d("elementProperties")] = /* @__PURE__ */ new Map(), b[d("finalized")] = /* @__PURE__ */ new Map(), p == null ? void 0 : p({ ReactiveElement: b }), ((_a2 = a.reactiveElementVersions) != null ? _a2 : a.reactiveElementVersions = []).push("2.0.4"); // node_modules/.pnpm/lit-html@3.1.2/node_modules/lit-html/lit-html.js var t2 = globalThis; var i3 = t2.trustedTypes; var s2 = i3 ? i3.createPolicy("lit-html", { createHTML: (t7) => t7 }) : void 0; var e3 = "$lit$"; var h2 = `lit$${(Math.random() + "").slice(9)}$`; var o3 = "?" + h2; var n3 = `<${o3}>`; var r3 = document; var l2 = () => r3.createComment(""); var c3 = (t7) => null === t7 || "object" != typeof t7 && "function" != typeof t7; var a2 = Array.isArray; var u2 = (t7) => a2(t7) || "function" == typeof (t7 == null ? void 0 : t7[Symbol.iterator]); var d2 = "[ \n\f\r]"; var f2 = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g; var v = /-->/g; var _ = />/g; var m = RegExp(`>|${d2}(?:([^\\s"'>=/]+)(${d2}*=${d2}*(?:[^ \f\r"'\`<>=]|("|')|))|$)`, "g"); var p2 = /'/g; var g = /"/g; var $ = /^(?:script|style|textarea|title)$/i; var y2 = (t7) => (i6, ...s5) => ({ _$litType$: t7, strings: i6, values: s5 }); var x = y2(1); var b2 = y2(2); var w = Symbol.for("lit-noChange"); var T = Symbol.for("lit-nothing"); var A = /* @__PURE__ */ new WeakMap(); var E = r3.createTreeWalker(r3, 129); function C(t7, i6) { if (!Array.isArray(t7) || !t7.hasOwnProperty("raw")) throw Error("invalid template strings array"); return void 0 !== s2 ? s2.createHTML(i6) : i6; } var P = (t7, i6) => { const s5 = t7.length - 1, o10 = []; let r8, l5 = 2 === i6 ? "" : "")), o10]; }; var V = class { constructor({ strings: t7, _$litType$: s5 }, n7) { let r8; this.parts = []; let c4 = 0, a4 = 0; const u5 = t7.length - 1, d3 = this.parts, [f4, v2] = P(t7, s5); if (this.el = V.createElement(f4, n7), E.currentNode = this.el.content, 2 === s5) { const t8 = this.el.content.firstChild; t8.replaceWith(...t8.childNodes); } for (; null !== (r8 = E.nextNode()) && d3.length < u5; ) { if (1 === r8.nodeType) { if (r8.hasAttributes()) for (const t8 of r8.getAttributeNames()) if (t8.endsWith(e3)) { const i6 = v2[a4++], s6 = r8.getAttribute(t8).split(h2), e11 = /([.?@])?(.*)/.exec(i6); d3.push({ type: 1, index: c4, name: e11[2], strings: s6, ctor: "." === e11[1] ? k : "?" === e11[1] ? H : "@" === e11[1] ? I : R }), r8.removeAttribute(t8); } else t8.startsWith(h2) && (d3.push({ type: 6, index: c4 }), r8.removeAttribute(t8)); if ($.test(r8.tagName)) { const t8 = r8.textContent.split(h2), s6 = t8.length - 1; if (s6 > 0) { r8.textContent = i3 ? i3.emptyScript : ""; for (let i6 = 0; i6 < s6; i6++) r8.append(t8[i6], l2()), E.nextNode(), d3.push({ type: 2, index: ++c4 }); r8.append(t8[s6], l2()); } } } else if (8 === r8.nodeType) if (r8.data === o3) d3.push({ type: 2, index: c4 }); else { let t8 = -1; for (; -1 !== (t8 = r8.data.indexOf(h2, t8 + 1)); ) d3.push({ type: 7, index: c4 }), t8 += h2.length - 1; } c4++; } } static createElement(t7, i6) { const s5 = r3.createElement("template"); return s5.innerHTML = t7, s5; } }; function N(t7, i6, s5 = t7, e11) { var _a6, _b2, _c; if (i6 === w) return i6; let h3 = void 0 !== e11 ? (_a6 = s5._$Co) == null ? void 0 : _a6[e11] : s5._$Cl; const o10 = c3(i6) ? void 0 : i6._$litDirective$; return (h3 == null ? void 0 : h3.constructor) !== o10 && ((_b2 = h3 == null ? void 0 : h3._$AO) == null ? void 0 : _b2.call(h3, false), void 0 === o10 ? h3 = void 0 : (h3 = new o10(t7), h3._$AT(t7, s5, e11)), void 0 !== e11 ? ((_c = s5._$Co) != null ? _c : s5._$Co = [])[e11] = h3 : s5._$Cl = h3), void 0 !== h3 && (i6 = N(t7, h3._$AS(t7, i6.values), h3, e11)), i6; } var S2 = class { constructor(t7, i6) { this._$AV = [], this._$AN = void 0, this._$AD = t7, this._$AM = i6; } get parentNode() { return this._$AM.parentNode; } get _$AU() { return this._$AM._$AU; } u(t7) { var _a6; const { el: { content: i6 }, parts: s5 } = this._$AD, e11 = ((_a6 = t7 == null ? void 0 : t7.creationScope) != null ? _a6 : r3).importNode(i6, true); E.currentNode = e11; let h3 = E.nextNode(), o10 = 0, n7 = 0, l5 = s5[0]; for (; void 0 !== l5; ) { if (o10 === l5.index) { let i7; 2 === l5.type ? i7 = new M(h3, h3.nextSibling, this, t7) : 1 === l5.type ? i7 = new l5.ctor(h3, l5.name, l5.strings, this, t7) : 6 === l5.type && (i7 = new L(h3, this, t7)), this._$AV.push(i7), l5 = s5[++n7]; } o10 !== (l5 == null ? void 0 : l5.index) && (h3 = E.nextNode(), o10++); } return E.currentNode = r3, e11; } p(t7) { let i6 = 0; for (const s5 of this._$AV) void 0 !== s5 && (void 0 !== s5.strings ? (s5._$AI(t7, s5, i6), i6 += s5.strings.length - 2) : s5._$AI(t7[i6])), i6++; } }; var M = class { get _$AU() { var _a6, _b2; return (_b2 = (_a6 = this._$AM) == null ? void 0 : _a6._$AU) != null ? _b2 : this._$Cv; } constructor(t7, i6, s5, e11) { var _a6; this.type = 2, this._$AH = T, this._$AN = void 0, this._$AA = t7, this._$AB = i6, this._$AM = s5, this.options = e11, this._$Cv = (_a6 = e11 == null ? void 0 : e11.isConnected) != null ? _a6 : true; } get parentNode() { let t7 = this._$AA.parentNode; const i6 = this._$AM; return void 0 !== i6 && 11 === (t7 == null ? void 0 : t7.nodeType) && (t7 = i6.parentNode), t7; } get startNode() { return this._$AA; } get endNode() { return this._$AB; } _$AI(t7, i6 = this) { t7 = N(this, t7, i6), c3(t7) ? t7 === T || null == t7 || "" === t7 ? (this._$AH !== T && this._$AR(), this._$AH = T) : t7 !== this._$AH && t7 !== w && this._(t7) : void 0 !== t7._$litType$ ? this.$(t7) : void 0 !== t7.nodeType ? this.T(t7) : u2(t7) ? this.k(t7) : this._(t7); } S(t7) { return this._$AA.parentNode.insertBefore(t7, this._$AB); } T(t7) { this._$AH !== t7 && (this._$AR(), this._$AH = this.S(t7)); } _(t7) { this._$AH !== T && c3(this._$AH) ? this._$AA.nextSibling.data = t7 : this.T(r3.createTextNode(t7)), this._$AH = t7; } $(t7) { var _a6; const { values: i6, _$litType$: s5 } = t7, e11 = "number" == typeof s5 ? this._$AC(t7) : (void 0 === s5.el && (s5.el = V.createElement(C(s5.h, s5.h[0]), this.options)), s5); if (((_a6 = this._$AH) == null ? void 0 : _a6._$AD) === e11) this._$AH.p(i6); else { const t8 = new S2(e11, this), s6 = t8.u(this.options); t8.p(i6), this.T(s6), this._$AH = t8; } } _$AC(t7) { let i6 = A.get(t7.strings); return void 0 === i6 && A.set(t7.strings, i6 = new V(t7)), i6; } k(t7) { a2(this._$AH) || (this._$AH = [], this._$AR()); const i6 = this._$AH; let s5, e11 = 0; for (const h3 of t7) e11 === i6.length ? i6.push(s5 = new M(this.S(l2()), this.S(l2()), this, this.options)) : s5 = i6[e11], s5._$AI(h3), e11++; e11 < i6.length && (this._$AR(s5 && s5._$AB.nextSibling, e11), i6.length = e11); } _$AR(t7 = this._$AA.nextSibling, i6) { var _a6; for ((_a6 = this._$AP) == null ? void 0 : _a6.call(this, false, true, i6); t7 && t7 !== this._$AB; ) { const i7 = t7.nextSibling; t7.remove(), t7 = i7; } } setConnected(t7) { var _a6; void 0 === this._$AM && (this._$Cv = t7, (_a6 = this._$AP) == null ? void 0 : _a6.call(this, t7)); } }; var R = class { get tagName() { return this.element.tagName; } get _$AU() { return this._$AM._$AU; } constructor(t7, i6, s5, e11, h3) { this.type = 1, this._$AH = T, this._$AN = void 0, this.element = t7, this.name = i6, this._$AM = e11, this.options = h3, s5.length > 2 || "" !== s5[0] || "" !== s5[1] ? (this._$AH = Array(s5.length - 1).fill(new String()), this.strings = s5) : this._$AH = T; } _$AI(t7, i6 = this, s5, e11) { const h3 = this.strings; let o10 = false; if (void 0 === h3) t7 = N(this, t7, i6, 0), o10 = !c3(t7) || t7 !== this._$AH && t7 !== w, o10 && (this._$AH = t7); else { const e12 = t7; let n7, r8; for (t7 = h3[0], n7 = 0; n7 < h3.length - 1; n7++) r8 = N(this, e12[s5 + n7], i6, n7), r8 === w && (r8 = this._$AH[n7]), o10 || (o10 = !c3(r8) || r8 !== this._$AH[n7]), r8 === T ? t7 = T : t7 !== T && (t7 += (r8 != null ? r8 : "") + h3[n7 + 1]), this._$AH[n7] = r8; } o10 && !e11 && this.j(t7); } j(t7) { t7 === T ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t7 != null ? t7 : ""); } }; var k = class extends R { constructor() { super(...arguments), this.type = 3; } j(t7) { this.element[this.name] = t7 === T ? void 0 : t7; } }; var H = class extends R { constructor() { super(...arguments), this.type = 4; } j(t7) { this.element.toggleAttribute(this.name, !!t7 && t7 !== T); } }; var I = class extends R { constructor(t7, i6, s5, e11, h3) { super(t7, i6, s5, e11, h3), this.type = 5; } _$AI(t7, i6 = this) { var _a6; if ((t7 = (_a6 = N(this, t7, i6, 0)) != null ? _a6 : T) === w) return; const s5 = this._$AH, e11 = t7 === T && s5 !== T || t7.capture !== s5.capture || t7.once !== s5.once || t7.passive !== s5.passive, h3 = t7 !== T && (s5 === T || e11); e11 && this.element.removeEventListener(this.name, this, s5), h3 && this.element.addEventListener(this.name, this, t7), this._$AH = t7; } handleEvent(t7) { var _a6, _b2; "function" == typeof this._$AH ? this._$AH.call((_b2 = (_a6 = this.options) == null ? void 0 : _a6.host) != null ? _b2 : this.element, t7) : this._$AH.handleEvent(t7); } }; var L = class { constructor(t7, i6, s5) { this.element = t7, this.type = 6, this._$AN = void 0, this._$AM = i6, this.options = s5; } get _$AU() { return this._$AM._$AU; } _$AI(t7) { N(this, t7); } }; var z = { P: e3, A: h2, C: o3, M: 1, L: P, R: S2, D: u2, V: N, I: M, H: R, N: H, U: I, B: k, F: L }; var Z = t2.litHtmlPolyfillSupport; var _a3; Z == null ? void 0 : Z(V, M), ((_a3 = t2.litHtmlVersions) != null ? _a3 : t2.litHtmlVersions = []).push("3.1.2"); var j = (t7, i6, s5) => { var _a6, _b2; const e11 = (_a6 = s5 == null ? void 0 : s5.renderBefore) != null ? _a6 : i6; let h3 = e11._$litPart$; if (void 0 === h3) { const t8 = (_b2 = s5 == null ? void 0 : s5.renderBefore) != null ? _b2 : null; e11._$litPart$ = h3 = new M(i6.insertBefore(l2(), t8), t8, void 0, s5 != null ? s5 : {}); } return h3._$AI(t7), h3; }; // node_modules/.pnpm/lit-element@4.0.4/node_modules/lit-element/lit-element.js var s3 = class extends b { constructor() { super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0; } createRenderRoot() { var _a6, _b2; const t7 = super.createRenderRoot(); return (_b2 = (_a6 = this.renderOptions).renderBefore) != null ? _b2 : _a6.renderBefore = t7.firstChild, t7; } update(t7) { const i6 = this.render(); this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t7), this._$Do = j(i6, this.renderRoot, this.renderOptions); } connectedCallback() { var _a6; super.connectedCallback(), (_a6 = this._$Do) == null ? void 0 : _a6.setConnected(true); } disconnectedCallback() { var _a6; super.disconnectedCallback(), (_a6 = this._$Do) == null ? void 0 : _a6.setConnected(false); } render() { return w; } }; var _a4; s3._$litElement$ = true, s3["finalized", "finalized"] = true, (_a4 = globalThis.litElementHydrateSupport) == null ? void 0 : _a4.call(globalThis, { LitElement: s3 }); var r4 = globalThis.litElementPolyfillSupport; r4 == null ? void 0 : r4({ LitElement: s3 }); var _a5; ((_a5 = globalThis.litElementVersions) != null ? _a5 : globalThis.litElementVersions = []).push("4.0.4"); // node_modules/.pnpm/@shoelace-style+shoelace@2.15.0_@types+react@18.3.1/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.7DUCI5S4.js var spinner_styles_default = i` :host { --track-width: 2px; --track-color: rgb(128 128 128 / 25%); --indicator-color: var(--sl-color-primary-600); --speed: 2s; display: inline-flex; width: 1em; height: 1em; flex: none; } .spinner { flex: 1 1 auto; height: 100%; width: 100%; } .spinner__track, .spinner__indicator { fill: none; stroke-width: var(--track-width); r: calc(0.5em - var(--track-width) / 2); cx: 0.5em; cy: 0.5em; transform-origin: 50% 50%; } .spinner__track { stroke: var(--track-color); transform-origin: 0% 0%; } .spinner__indicator { stroke: var(--indicator-color); stroke-linecap: round; stroke-dasharray: 150% 75%; animation: spin var(--speed) linear infinite; } @keyframes spin { 0% { transform: rotate(0deg); stroke-dasharray: 0.05em, 3em; } 50% { transform: rotate(450deg); stroke-dasharray: 1.375em, 1.375em; } 100% { transform: rotate(1080deg); stroke-dasharray: 0.05em, 3em; } } `; // node_modules/.pnpm/@shoelace-style+localize@3.1.2/node_modules/@shoelace-style/localize/dist/index.js var connectedElements = /* @__PURE__ */ new Set(); var documentElementObserver = new MutationObserver(update); var translations = /* @__PURE__ */ new Map(); var documentDirection = document.documentElement.dir || "ltr"; var documentLanguage = document.documentElement.lang || navigator.language; var fallback; documentElementObserver.observe(document.documentElement, { attributes: true, attributeFilter: ["dir", "lang"] }); function registerTranslation(...translation2) { translation2.map((t7) => { const code = t7.$code.toLowerCase(); if (translations.has(code)) { translations.set(code, Object.assign(Object.assign({}, translations.get(code)), t7)); } else { translations.set(code, t7); } if (!fallback) { fallback = t7; } }); update(); } function update() { documentDirection = document.documentElement.dir || "ltr"; documentLanguage = document.documentElement.lang || navigator.language; [...connectedElements.keys()].map((el) => { if (typeof el.requestUpdate === "function") { el.requestUpdate(); } }); } var LocalizeController = class { constructor(host) { this.host = host; this.host.addController(this); } hostConnected() { connectedElements.add(this.host); } hostDisconnected() { connectedElements.delete(this.host); } dir() { return `${this.host.dir || documentDirection}`.toLowerCase(); } lang() { return `${this.host.lang || documentLanguage}`.toLowerCase(); } getTranslationData(lang) { var _a6, _b2; const locale = new Intl.Locale(lang.replace(/_/g, "-")); const language = locale === null || locale === void 0 ? void 0 : locale.language.toLowerCase(); const region = (_b2 = (_a6 = locale === null || locale === void 0 ? void 0 : locale.region) === null || _a6 === void 0 ? void 0 : _a6.toLowerCase()) !== null && _b2 !== void 0 ? _b2 : ""; const primary = translations.get(`${language}-${region}`); const secondary = translations.get(language); return { locale, language, region, primary, secondary }; } exists(key, options) { var _a6; const { primary, secondary } = this.getTranslationData((_a6 = options.lang) !== null && _a6 !== void 0 ? _a6 : this.lang()); options = Object.assign({ includeFallback: false }, options); if (primary && primary[key] || secondary && secondary[key] || options.includeFallback && fallback && fallback[key]) { return true; } return false; } term(key, ...args) { const { primary, secondary } = this.getTranslationData(this.lang()); let term; if (primary && primary[key]) { term = primary[key]; } else if (secondary && secondary[key]) { term = secondary[key]; } else if (fallback && fallback[key]) { term = fallback[key]; } else { console.error(`No translation found for: ${String(key)}`); return String(key); } if (typeof term === "function") { return term(...args); } return term; } date(dateToFormat, options) { dateToFormat = new Date(dateToFormat); return new Intl.DateTimeFormat(this.lang(), options).format(dateToFormat); } number(numberToFormat, options) { numberToFormat = Number(numberToFormat); return isNaN(numberToFormat) ? "" : new Intl.NumberFormat(this.lang(), options).format(numberToFormat); } relativeTime(value, unit, options) { return new Intl.RelativeTimeFormat(this.lang(), options).format(value, unit); } }; // node_modules/.pnpm/@shoelace-style+shoelace@2.15.0_@types+react@18.3.1/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.MAS2SHYD.js var translation = { $code: "en", $name: "English", $dir: "ltr", carousel: "Carousel", clearEntry: "Clear entry", close: "Close", copied: "Copied", copy: "Copy", currentValue: "Current value", error: "Error", goToSlide: (slide, count) => `Go to slide ${slide} of ${count}`, hidePassword: "Hide password", loading: "Loading", nextSlide: "Next slide", numOptionsSelected: (num) => { if (num === 0) return "No options selected"; if (num === 1) return "1 option selected"; return `${num} options selected`; }, previousSlide: "Previous slide", progress: "Progress", remove: "Remove", resize: "Resize", scrollToEnd: "Scroll to end", scrollToStart: "Scroll to start", selectAColorFromTheScreen: "Select a color from the screen", showPassword: "Show password", slideNum: (slide) => `Slide ${slide}`, toggleColorFormat: "Toggle color format" }; registerTranslation(translation); var en_default = translation; // node_modules/.pnpm/@shoelace-style+shoelace@2.15.0_@types+react@18.3.1/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.WLV3FVBR.js var LocalizeController2 = class extends LocalizeController { }; registerTranslation(en_default); // node_modules/.pnpm/@shoelace-style+shoelace@2.15.0_@types+react@18.3.1/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.TUVJKY7S.js var component_styles_default = i` :host { box-sizing: border-box; } :host *, :host *::before, :host *::after { box-sizing: inherit; } [hidden] { display: none !important; } `; // node_modules/.pnpm/@shoelace-style+shoelace@2.15.0_@types+react@18.3.1/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.IFDWM6P4.js var __defProp2 = Object.defineProperty; var __defProps = Object.defineProperties; var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; var __getOwnPropDescs = Object.getOwnPropertyDescriptors; var __getOwnPropSymbols = Object.getOwnPropertySymbols; var __hasOwnProp2 = Object.prototype.hasOwnProperty; var __propIsEnum = Object.prototype.propertyIsEnumerable; var __defNormalProp = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; var __spreadValues = (a4, b3) => { for (var prop in b3 || (b3 = {})) if (__hasOwnProp2.call(b3, prop)) __defNormalProp(a4, prop, b3[prop]); if (__getOwnPropSymbols) for (var prop of __getOwnPropSymbols(b3)) { if (__propIsEnum.call(b3, prop)) __defNormalProp(a4, prop, b3[prop]); } return a4; }; var __spreadProps = (a4, b3) => __defProps(a4, __getOwnPropDescs(b3)); var __decorateClass = (decorators, target, key, kind) => { var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc2(target, key) : target; for (var i6 = decorators.length - 1, decorator; i6 >= 0; i6--) if (decorator = decorators[i6]) result = (kind ? decorator(target, key, result) : decorator(result)) || result; if (kind && result) __defProp2(target, key, result); return result; }; // node_modules/.pnpm/@lit+reactive-element@2.0.4/node_modules/@lit/reactive-element/decorators/property.js var o4 = { attribute: true, type: String, converter: u, reflect: false, hasChanged: f }; var r5 = (t7 = o4, e11, r8) => { const { kind: n7, metadata: i6 } = r8; let s5 = globalThis.litPropertyMetadata.get(i6); if (void 0 === s5 && globalThis.litPropertyMetadata.set(i6, s5 = /* @__PURE__ */ new Map()), s5.set(r8.name, t7), "accessor" === n7) { const { name: o10 } = r8; return { set(r9) { const n8 = e11.get.call(this); e11.set.call(this, r9), this.requestUpdate(o10, n8, t7); }, init(e12) { return void 0 !== e12 && this.P(o10, void 0, t7), e12; } }; } if ("setter" === n7) { const { name: o10 } = r8; return function(r9) { const n8 = this[o10]; e11.call(this, r9), this.requestUpdate(o10, n8, t7); }; } throw Error("Unsupported decorator location: " + n7); }; function n4(t7) { return (e11, o10) => "object" == typeof o10 ? r5(t7, e11, o10) : ((t8, e12, o11) => { const r8 = e12.hasOwnProperty(o11); return e12.constructor.createProperty(o11, r8 ? { ...t8, wrapped: true } : t8), r8 ? Object.getOwnPropertyDescriptor(e12, o11) : void 0; })(t7, e11, o10); } // node_modules/.pnpm/@lit+reactive-element@2.0.4/node_modules/@lit/reactive-element/decorators/state.js function r6(r8) { return n4({ ...r8, state: true, attribute: false }); } // node_modules/.pnpm/@lit+reactive-element@2.0.4/node_modules/@lit/reactive-element/decorators/event-options.js function t3(t7) { return (n7, o10) => { const c4 = "function" == typeof n7 ? n7 : n7[o10]; Object.assign(c4, t7); }; } // node_modules/.pnpm/@lit+reactive-element@2.0.4/node_modules/@lit/reactive-element/decorators/base.js var e4 = (e11, t7, c4) => (c4.configurable = true, c4.enumerable = true, Reflect.decorate && "object" != typeof t7 && Object.defineProperty(e11, t7, c4), c4); // node_modules/.pnpm/@lit+reactive-element@2.0.4/node_modules/@lit/reactive-element/decorators/query.js function e5(e11, r8) { return (n7, s5, i6) => { const o10 = (t7) => { var _a6, _b2; return (_b2 = (_a6 = t7.renderRoot) == null ? void 0 : _a6.querySelector(e11)) != null ? _b2 : null; }; if (r8) { const { get: e12, set: r9 } = "object" == typeof s5 ? n7 : i6 != null ? i6 : (() => { const t7 = Symbol(); return { get() { return this[t7]; }, set(e13) { this[t7] = e13; } }; })(); return e4(n7, s5, { get() { let t7 = e12.call(this); return void 0 === t7 && (t7 = o10(this), (null !== t7 || this.hasUpdated) && r9.call(this, t7)), t7; } }); } return e4(n7, s5, { get() { return o10(this); } }); }; } // node_modules/.pnpm/@shoelace-style+shoelace@2.15.0_@types+react@18.3.1/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.SFSTXCXC.js var ShoelaceElement = class extends s3 { constructor() { super(); Object.entries(this.constructor.dependencies).forEach(([name, component]) => { this.constructor.define(name, component); }); } emit(name, options) { const event = new CustomEvent(name, __spreadValues({ bubbles: true, cancelable: false, composed: true, detail: {} }, options)); this.dispatchEvent(event); return event; } /* eslint-enable */ static define(name, elementConstructor = this, options = {}) { const currentlyRegisteredConstructor = customElements.get(name); if (!currentlyRegisteredConstructor) { customElements.define(name, class extends elementConstructor { }, options); return; } let newVersion = " (unknown version)"; let existingVersion = newVersion; if ("version" in elementConstructor && elementConstructor.version) { newVersion = " v" + elementConstructor.version; } if ("version" in currentlyRegisteredConstructor && currentlyRegisteredConstructor.version) { existingVersion = " v" + currentlyRegisteredConstructor.version; } if (newVersion && existingVersion && newVersion === existingVersion) { return; } console.warn( `Attempted to register <${name}>${newVersion}, but <${name}>${existingVersion} has already been registered.` ); } }; ShoelaceElement.version = "2.15.0"; ShoelaceElement.dependencies = {}; __decorateClass([ n4() ], ShoelaceElement.prototype, "dir", 2); __decorateClass([ n4() ], ShoelaceElement.prototype, "lang", 2); // node_modules/.pnpm/@shoelace-style+shoelace@2.15.0_@types+react@18.3.1/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.RADK4UXU.js var SlSpinner = class extends ShoelaceElement { constructor() { super(...arguments); this.localize = new LocalizeController2(this); } render() { return x` `; } }; SlSpinner.styles = [component_styles_default, spinner_styles_default]; // node_modules/.pnpm/@shoelace-style+shoelace@2.15.0_@types+react@18.3.1/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.KWPBDQ6I.js var formCollections = /* @__PURE__ */ new WeakMap(); var reportValidityOverloads = /* @__PURE__ */ new WeakMap(); var checkValidityOverloads = /* @__PURE__ */ new WeakMap(); var userInteractedControls = /* @__PURE__ */ new WeakSet(); var interactions = /* @__PURE__ */ new WeakMap(); var FormControlController = class { constructor(host, options) { this.handleFormData = (event) => { const disabled = this.options.disabled(this.host); const name = this.options.name(this.host); const value = this.options.value(this.host); const isButton = this.host.tagName.toLowerCase() === "sl-button"; if (this.host.isConnected && !disabled && !isButton && typeof name === "string" && name.length > 0 && typeof value !== "undefined") { if (Array.isArray(value)) { value.forEach((val) => { event.formData.append(name, val.toString()); }); } else { event.formData.append(name, value.toString()); } } }; this.handleFormSubmit = (event) => { var _a6; const disabled = this.options.disabled(this.host); const reportValidity = this.options.reportValidity; if (this.form && !this.form.noValidate) { (_a6 = formCollections.get(this.form)) == null ? void 0 : _a6.forEach((control) => { this.setUserInteracted(control, true); }); } if (this.form && !this.form.noValidate && !disabled && !reportValidity(this.host)) { event.preventDefault(); event.stopImmediatePropagation(); } }; this.handleFormReset = () => { this.options.setValue(this.host, this.options.defaultValue(this.host)); this.setUserInteracted(this.host, false); interactions.set(this.host, []); }; this.handleInteraction = (event) => { const emittedEvents = interactions.get(this.host); if (!emittedEvents.includes(event.type)) { emittedEvents.push(event.type); } if (emittedEvents.length === this.options.assumeInteractionOn.length) { this.setUserInteracted(this.host, true); } }; this.checkFormValidity = () => { if (this.form && !this.form.noValidate) { const elements = this.form.querySelectorAll("*"); for (const element of elements) { if (typeof element.checkValidity === "function") { if (!element.checkValidity()) { return false; } } } } return true; }; this.reportFormValidity = () => { if (this.form && !this.form.noValidate) { const elements = this.form.querySelectorAll("*"); for (const element of elements) { if (typeof element.reportValidity === "function") { if (!element.reportValidity()) { return false; } } } } return true; }; (this.host = host).addController(this); this.options = __spreadValues({ form: (input) => { const formId = input.form; if (formId) { const root = input.getRootNode(); const form = root.querySelector(`#${formId}`); if (form) { return form; } } return input.closest("form"); }, name: (input) => input.name, value: (input) => input.value, defaultValue: (input) => input.defaultValue, disabled: (input) => { var _a6; return (_a6 = input.disabled) != null ? _a6 : false; }, reportValidity: (input) => typeof input.reportValidity === "function" ? input.reportValidity() : true, checkValidity: (input) => typeof input.checkValidity === "function" ? input.checkValidity() : true, setValue: (input, value) => input.value = value, assumeInteractionOn: ["sl-input"] }, options); } hostConnected() { const form = this.options.form(this.host); if (form) { this.attachForm(form); } interactions.set(this.host, []); this.options.assumeInteractionOn.forEach((event) => { this.host.addEventListener(event, this.handleInteraction); }); } hostDisconnected() { this.detachForm(); interactions.delete(this.host); this.options.assumeInteractionOn.forEach((event) => { this.host.removeEventListener(event, this.handleInteraction); }); } hostUpdated() { const form = this.options.form(this.host); if (!form) { this.detachForm(); } if (form && this.form !== form) { this.detachForm(); this.attachForm(form); } if (this.host.hasUpdated) { this.setValidity(this.host.validity.valid); } } attachForm(form) { if (form) { this.form = form; if (formCollections.has(this.form)) { formCollections.get(this.form).add(this.host); } else { formCollections.set(this.form, /* @__PURE__ */ new Set([this.host])); } this.form.addEventListener("formdata", this.handleFormData); this.form.addEventListener("submit", this.handleFormSubmit); this.form.addEventListener("reset", this.handleFormReset); if (!reportValidityOverloads.has(this.form)) { reportValidityOverloads.set(this.form, this.form.reportValidity); this.form.reportValidity = () => this.reportFormValidity(); } if (!checkValidityOverloads.has(this.form)) { checkValidityOverloads.set(this.form, this.form.checkValidity); this.form.checkValidity = () => this.checkFormValidity(); } } else { this.form = void 0; } } detachForm() { if (!this.form) return; const formCollection = formCollections.get(this.form); if (!formCollection) { return; } formCollection.delete(this.host); if (formCollection.size <= 0) { this.form.removeEventListener("formdata", this.handleFormData); this.form.removeEventListener("submit", this.handleFormSubmit); this.form.removeEventListener("reset", this.handleFormReset); if (reportValidityOverloads.has(this.form)) { this.form.reportValidity = reportValidityOverloads.get(this.form); reportValidityOverloads.delete(this.form); } if (checkValidityOverloads.has(this.form)) { this.form.checkValidity = checkValidityOverloads.get(this.form); checkValidityOverloads.delete(this.form); } this.form = void 0; } } setUserInteracted(el, hasInteracted) { if (hasInteracted) { userInteractedControls.add(el); } else { userInteractedControls.delete(el); } el.requestUpdate(); } doAction(type, submitter) { if (this.form) { const button = document.createElement("button"); button.type = type; button.style.position = "absolute"; button.style.width = "0"; button.style.height = "0"; button.style.clipPath = "inset(50%)"; button.style.overflow = "hidden"; button.style.whiteSpace = "nowrap"; if (submitter) { button.name = submitter.name; button.value = submitter.value; ["formaction", "formenctype", "formmethod", "formnovalidate", "formtarget"].forEach((attr) => { if (submitter.hasAttribute(attr)) { button.setAttribute(attr, submitter.getAttribute(attr)); } }); } this.form.append(button); button.click(); button.remove(); } } /** Returns the associated `