UNPKG

@webwriter/branching-scenario

Version:

Create adaptable learning experiences by authoring a gamebook, where you present the student with choices on how to continue.

1,103 lines (1,098 loc) 789 kB
var __create = Object.create; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __knownSymbol = (name, symbol) => (symbol = Symbol[name]) ? symbol : Symbol.for("Symbol." + name); var __typeError = (msg2) => { throw TypeError(msg2); }; var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __decoratorStart = (base) => [, , , __create(base?.[__knownSymbol("metadata")] ?? null)]; var __decoratorStrings = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"]; var __expectFn = (fn) => fn !== void 0 && typeof fn !== "function" ? __typeError("Function expected") : fn; var __decoratorContext = (kind, name, done, metadata, fns) => ({ kind: __decoratorStrings[kind], name, metadata, addInitializer: (fn) => done._ ? __typeError("Already initialized") : fns.push(__expectFn(fn || null)) }); var __decoratorMetadata = (array, target) => __defNormalProp(target, __knownSymbol("metadata"), array[3]); var __runInitializers = (array, flags, self2, value) => { for (var i10 = 0, fns = array[flags >> 1], n12 = fns && fns.length; i10 < n12; i10++) flags & 1 ? fns[i10].call(self2) : value = fns[i10].call(self2, value); return value; }; var __decorateElement = (array, flags, name, decorators, target, extra) => { var fn, it, done, ctx, access, k3 = flags & 7, s9 = !!(flags & 8), p5 = !!(flags & 16); var j3 = k3 > 3 ? array.length + 1 : k3 ? s9 ? 1 : 2 : 0, key = __decoratorStrings[k3 + 5]; var initializers = k3 > 3 && (array[j3 - 1] = []), extraInitializers = array[j3] || (array[j3] = []); var desc = k3 && (!p5 && !s9 && (target = target.prototype), k3 < 5 && (k3 > 3 || !p5) && __getOwnPropDesc(k3 < 4 ? target : { get [name]() { return __privateGet(this, extra); }, set [name](x3) { return __privateSet(this, extra, x3); } }, name)); k3 ? p5 && k3 < 4 && __name(extra, (k3 > 2 ? "set " : k3 > 1 ? "get " : "") + name) : __name(target, name); for (var i10 = decorators.length - 1; i10 >= 0; i10--) { ctx = __decoratorContext(k3, name, done = {}, array[3], extraInitializers); if (k3) { ctx.static = s9, ctx.private = p5, access = ctx.access = { has: p5 ? (x3) => __privateIn(target, x3) : (x3) => name in x3 }; if (k3 ^ 3) access.get = p5 ? (x3) => (k3 ^ 1 ? __privateGet : __privateMethod)(x3, target, k3 ^ 4 ? extra : desc.get) : (x3) => x3[name]; if (k3 > 2) access.set = p5 ? (x3, y4) => __privateSet(x3, target, y4, k3 ^ 4 ? extra : desc.set) : (x3, y4) => x3[name] = y4; } it = (0, decorators[i10])(k3 ? k3 < 4 ? p5 ? extra : desc[key] : k3 > 4 ? void 0 : { get: desc.get, set: desc.set } : target, ctx), done._ = 1; if (k3 ^ 4 || it === void 0) __expectFn(it) && (k3 > 4 ? initializers.unshift(it) : k3 ? p5 ? extra = it : desc[key] = it : target = it); else if (typeof it !== "object" || it === null) __typeError("Object expected"); else __expectFn(fn = it.get) && (desc.get = fn), __expectFn(fn = it.set) && (desc.set = fn), __expectFn(fn = it.init) && initializers.unshift(fn); } return k3 || __decoratorMetadata(array, target), desc && __defProp(target, name, desc), p5 ? k3 ^ 4 ? extra : desc : target; }; var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); var __accessCheck = (obj, member, msg2) => member.has(obj) || __typeError("Cannot " + msg2); var __privateIn = (member, obj) => Object(obj) !== obj ? __typeError('Cannot use the "in" operator on this value') : member.has(obj); var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj)); var __privateAdd = (obj, member, value) => member.has(obj) ? __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), value); var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method); // 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(t8, e13, o16) { if (this._$cssResult$ = true, o16 !== s) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead."); this.cssText = t8, this.t = e13; } get styleSheet() { let t8 = this.o; const s9 = this.t; if (e && void 0 === t8) { const e13 = void 0 !== s9 && 1 === s9.length; e13 && (t8 = o.get(s9)), void 0 === t8 && ((this.o = t8 = new CSSStyleSheet()).replaceSync(this.cssText), e13 && o.set(s9, t8)); } return t8; } toString() { return this.cssText; } }; var r = (t8) => new n("string" == typeof t8 ? t8 : t8 + "", void 0, s); var i = (t8, ...e13) => { const o16 = 1 === t8.length ? t8[0] : e13.reduce((e14, s9, o17) => e14 + ((t9) => { if (true === t9._$cssResult$) return t9.cssText; if ("number" == typeof t9) return t9; throw Error("Value passed to 'css' function must be a 'css' function result: " + t9 + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security."); })(s9) + t8[o17 + 1], t8[0]); return new n(o16, t8, s); }; var S = (s9, o16) => { if (e) s9.adoptedStyleSheets = o16.map((t8) => t8 instanceof CSSStyleSheet ? t8 : t8.styleSheet); else for (const e13 of o16) { const o17 = document.createElement("style"), n12 = t.litNonce; void 0 !== n12 && o17.setAttribute("nonce", n12), o17.textContent = e13.cssText, s9.appendChild(o17); } }; var c = e ? (t8) => t8 : (t8) => t8 instanceof CSSStyleSheet ? ((t9) => { let e13 = ""; for (const s9 of t9.cssRules) e13 += s9.cssText; return r(e13); })(t8) : t8; // node_modules/@lit/reactive-element/reactive-element.js var { is: i2, defineProperty: e2, getOwnPropertyDescriptor: h, getOwnPropertyNames: r2, getOwnPropertySymbols: o2, getPrototypeOf: n2 } = Object; var a = globalThis; var c2 = a.trustedTypes; var l = c2 ? c2.emptyScript : ""; var p = a.reactiveElementPolyfillSupport; var d = (t8, s9) => t8; var u = { toAttribute(t8, s9) { switch (s9) { case Boolean: t8 = t8 ? l : null; break; case Object: case Array: t8 = null == t8 ? t8 : JSON.stringify(t8); } return t8; }, fromAttribute(t8, s9) { let i10 = t8; switch (s9) { case Boolean: i10 = null !== t8; break; case Number: i10 = null === t8 ? null : Number(t8); break; case Object: case Array: try { i10 = JSON.parse(t8); } catch (t9) { i10 = null; } } return i10; } }; var f = (t8, s9) => !i2(t8, s9); var b = { attribute: true, type: String, converter: u, reflect: false, useDefault: false, hasChanged: f }; Symbol.metadata ??= Symbol("metadata"), a.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap(); var y = class extends HTMLElement { static addInitializer(t8) { this._$Ei(), (this.l ??= []).push(t8); } static get observedAttributes() { return this.finalize(), this._$Eh && [...this._$Eh.keys()]; } static createProperty(t8, s9 = b) { if (s9.state && (s9.attribute = false), this._$Ei(), this.prototype.hasOwnProperty(t8) && ((s9 = Object.create(s9)).wrapped = true), this.elementProperties.set(t8, s9), !s9.noAccessor) { const i10 = Symbol(), h6 = this.getPropertyDescriptor(t8, i10, s9); void 0 !== h6 && e2(this.prototype, t8, h6); } } static getPropertyDescriptor(t8, s9, i10) { const { get: e13, set: r11 } = h(this.prototype, t8) ?? { get() { return this[s9]; }, set(t9) { this[s9] = t9; } }; return { get: e13, set(s10) { const h6 = e13?.call(this); r11?.call(this, s10), this.requestUpdate(t8, h6, i10); }, configurable: true, enumerable: true }; } static getPropertyOptions(t8) { return this.elementProperties.get(t8) ?? b; } static _$Ei() { if (this.hasOwnProperty(d("elementProperties"))) return; const t8 = n2(this); t8.finalize(), void 0 !== t8.l && (this.l = [...t8.l]), this.elementProperties = new Map(t8.elementProperties); } static finalize() { if (this.hasOwnProperty(d("finalized"))) return; if (this.finalized = true, this._$Ei(), this.hasOwnProperty(d("properties"))) { const t9 = this.properties, s9 = [...r2(t9), ...o2(t9)]; for (const i10 of s9) this.createProperty(i10, t9[i10]); } const t8 = this[Symbol.metadata]; if (null !== t8) { const s9 = litPropertyMetadata.get(t8); if (void 0 !== s9) for (const [t9, i10] of s9) this.elementProperties.set(t9, i10); } this._$Eh = /* @__PURE__ */ new Map(); for (const [t9, s9] of this.elementProperties) { const i10 = this._$Eu(t9, s9); void 0 !== i10 && this._$Eh.set(i10, t9); } this.elementStyles = this.finalizeStyles(this.styles); } static finalizeStyles(s9) { const i10 = []; if (Array.isArray(s9)) { const e13 = new Set(s9.flat(1 / 0).reverse()); for (const s10 of e13) i10.unshift(c(s10)); } else void 0 !== s9 && i10.push(c(s9)); return i10; } static _$Eu(t8, s9) { const i10 = s9.attribute; return false === i10 ? void 0 : "string" == typeof i10 ? i10 : "string" == typeof t8 ? t8.toLowerCase() : void 0; } constructor() { super(), this._$Ep = void 0, this.isUpdatePending = false, this.hasUpdated = false, this._$Em = null, this._$Ev(); } _$Ev() { this._$ES = new Promise((t8) => this.enableUpdating = t8), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach((t8) => t8(this)); } addController(t8) { (this._$EO ??= /* @__PURE__ */ new Set()).add(t8), void 0 !== this.renderRoot && this.isConnected && t8.hostConnected?.(); } removeController(t8) { this._$EO?.delete(t8); } _$E_() { const t8 = /* @__PURE__ */ new Map(), s9 = this.constructor.elementProperties; for (const i10 of s9.keys()) this.hasOwnProperty(i10) && (t8.set(i10, this[i10]), delete this[i10]); t8.size > 0 && (this._$Ep = t8); } createRenderRoot() { const t8 = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions); return S(t8, this.constructor.elementStyles), t8; } connectedCallback() { this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(true), this._$EO?.forEach((t8) => t8.hostConnected?.()); } enableUpdating(t8) { } disconnectedCallback() { this._$EO?.forEach((t8) => t8.hostDisconnected?.()); } attributeChangedCallback(t8, s9, i10) { this._$AK(t8, i10); } _$ET(t8, s9) { const i10 = this.constructor.elementProperties.get(t8), e13 = this.constructor._$Eu(t8, i10); if (void 0 !== e13 && true === i10.reflect) { const h6 = (void 0 !== i10.converter?.toAttribute ? i10.converter : u).toAttribute(s9, i10.type); this._$Em = t8, null == h6 ? this.removeAttribute(e13) : this.setAttribute(e13, h6), this._$Em = null; } } _$AK(t8, s9) { const i10 = this.constructor, e13 = i10._$Eh.get(t8); if (void 0 !== e13 && this._$Em !== e13) { const t9 = i10.getPropertyOptions(e13), h6 = "function" == typeof t9.converter ? { fromAttribute: t9.converter } : void 0 !== t9.converter?.fromAttribute ? t9.converter : u; this._$Em = e13; const r11 = h6.fromAttribute(s9, t9.type); this[e13] = r11 ?? this._$Ej?.get(e13) ?? r11, this._$Em = null; } } requestUpdate(t8, s9, i10, e13 = false, h6) { if (void 0 !== t8) { const r11 = this.constructor; if (false === e13 && (h6 = this[t8]), i10 ??= r11.getPropertyOptions(t8), !((i10.hasChanged ?? f)(h6, s9) || i10.useDefault && i10.reflect && h6 === this._$Ej?.get(t8) && !this.hasAttribute(r11._$Eu(t8, i10)))) return; this.C(t8, s9, i10); } false === this.isUpdatePending && (this._$ES = this._$EP()); } C(t8, s9, { useDefault: i10, reflect: e13, wrapped: h6 }, r11) { i10 && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t8) && (this._$Ej.set(t8, r11 ?? s9 ?? this[t8]), true !== h6 || void 0 !== r11) || (this._$AL.has(t8) || (this.hasUpdated || i10 || (s9 = void 0), this._$AL.set(t8, s9)), true === e13 && this._$Em !== t8 && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t8)); } async _$EP() { this.isUpdatePending = true; try { await this._$ES; } catch (t9) { Promise.reject(t9); } const t8 = this.scheduleUpdate(); return null != t8 && await t8, !this.isUpdatePending; } scheduleUpdate() { return this.performUpdate(); } performUpdate() { if (!this.isUpdatePending) return; if (!this.hasUpdated) { if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) { for (const [t10, s10] of this._$Ep) this[t10] = s10; this._$Ep = void 0; } const t9 = this.constructor.elementProperties; if (t9.size > 0) for (const [s10, i10] of t9) { const { wrapped: t10 } = i10, e13 = this[s10]; true !== t10 || this._$AL.has(s10) || void 0 === e13 || this.C(s10, void 0, i10, e13); } } let t8 = false; const s9 = this._$AL; try { t8 = this.shouldUpdate(s9), t8 ? (this.willUpdate(s9), this._$EO?.forEach((t9) => t9.hostUpdate?.()), this.update(s9)) : this._$EM(); } catch (s10) { throw t8 = false, this._$EM(), s10; } t8 && this._$AE(s9); } willUpdate(t8) { } _$AE(t8) { this._$EO?.forEach((t9) => t9.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = true, this.firstUpdated(t8)), this.updated(t8); } _$EM() { this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = false; } get updateComplete() { return this.getUpdateComplete(); } getUpdateComplete() { return this._$ES; } shouldUpdate(t8) { return true; } update(t8) { this._$Eq &&= this._$Eq.forEach((t9) => this._$ET(t9, this[t9])), this._$EM(); } updated(t8) { } firstUpdated(t8) { } }; y.elementStyles = [], y.shadowRootOptions = { mode: "open" }, y[d("elementProperties")] = /* @__PURE__ */ new Map(), y[d("finalized")] = /* @__PURE__ */ new Map(), p?.({ ReactiveElement: y }), (a.reactiveElementVersions ??= []).push("2.1.2"); // node_modules/lit-html/lit-html.js var t2 = globalThis; var i3 = (t8) => t8; var s2 = t2.trustedTypes; var e3 = s2 ? s2.createPolicy("lit-html", { createHTML: (t8) => t8 }) : void 0; var h2 = "$lit$"; var o3 = `lit$${Math.random().toFixed(9).slice(2)}$`; var n3 = "?" + o3; var r3 = `<${n3}>`; var l2 = document; var c3 = () => l2.createComment(""); var a2 = (t8) => null === t8 || "object" != typeof t8 && "function" != typeof t8; var u2 = Array.isArray; var d2 = (t8) => u2(t8) || "function" == typeof t8?.[Symbol.iterator]; var f2 = "[ \n\f\r]"; var v = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g; var _ = /-->/g; var m = />/g; var p2 = RegExp(`>|${f2}(?:([^\\s"'>=/]+)(${f2}*=${f2}*(?:[^ \f\r"'\`<>=]|("|')|))|$)`, "g"); var g = /'/g; var $ = /"/g; var y2 = /^(?:script|style|textarea|title)$/i; var x = (t8) => (i10, ...s9) => ({ _$litType$: t8, strings: i10, values: s9 }); var b2 = x(1); var w = x(2); var T = x(3); var E = Symbol.for("lit-noChange"); var A = Symbol.for("lit-nothing"); var C = /* @__PURE__ */ new WeakMap(); var P = l2.createTreeWalker(l2, 129); function V(t8, i10) { if (!u2(t8) || !t8.hasOwnProperty("raw")) throw Error("invalid template strings array"); return void 0 !== e3 ? e3.createHTML(i10) : i10; } var N = (t8, i10) => { const s9 = t8.length - 1, e13 = []; let n12, l7 = 2 === i10 ? "<svg>" : 3 === i10 ? "<math>" : "", c8 = v; for (let i11 = 0; i11 < s9; i11++) { const s10 = t8[i11]; let a5, u5, d4 = -1, f5 = 0; for (; f5 < s10.length && (c8.lastIndex = f5, u5 = c8.exec(s10), null !== u5); ) f5 = c8.lastIndex, c8 === v ? "!--" === u5[1] ? c8 = _ : void 0 !== u5[1] ? c8 = m : void 0 !== u5[2] ? (y2.test(u5[2]) && (n12 = RegExp("</" + u5[2], "g")), c8 = p2) : void 0 !== u5[3] && (c8 = p2) : c8 === p2 ? ">" === u5[0] ? (c8 = n12 ?? v, d4 = -1) : void 0 === u5[1] ? d4 = -2 : (d4 = c8.lastIndex - u5[2].length, a5 = u5[1], c8 = void 0 === u5[3] ? p2 : '"' === u5[3] ? $ : g) : c8 === $ || c8 === g ? c8 = p2 : c8 === _ || c8 === m ? c8 = v : (c8 = p2, n12 = void 0); const x3 = c8 === p2 && t8[i11 + 1].startsWith("/>") ? " " : ""; l7 += c8 === v ? s10 + r3 : d4 >= 0 ? (e13.push(a5), s10.slice(0, d4) + h2 + s10.slice(d4) + o3 + x3) : s10 + o3 + (-2 === d4 ? i11 : x3); } return [V(t8, l7 + (t8[s9] || "<?>") + (2 === i10 ? "</svg>" : 3 === i10 ? "</math>" : "")), e13]; }; var S2 = class _S { constructor({ strings: t8, _$litType$: i10 }, e13) { let r11; this.parts = []; let l7 = 0, a5 = 0; const u5 = t8.length - 1, d4 = this.parts, [f5, v3] = N(t8, i10); if (this.el = _S.createElement(f5, e13), P.currentNode = this.el.content, 2 === i10 || 3 === i10) { const t9 = this.el.content.firstChild; t9.replaceWith(...t9.childNodes); } for (; null !== (r11 = P.nextNode()) && d4.length < u5; ) { if (1 === r11.nodeType) { if (r11.hasAttributes()) for (const t9 of r11.getAttributeNames()) if (t9.endsWith(h2)) { const i11 = v3[a5++], s9 = r11.getAttribute(t9).split(o3), e14 = /([.?@])?(.*)/.exec(i11); d4.push({ type: 1, index: l7, name: e14[2], strings: s9, ctor: "." === e14[1] ? I : "?" === e14[1] ? L : "@" === e14[1] ? z : H }), r11.removeAttribute(t9); } else t9.startsWith(o3) && (d4.push({ type: 6, index: l7 }), r11.removeAttribute(t9)); if (y2.test(r11.tagName)) { const t9 = r11.textContent.split(o3), i11 = t9.length - 1; if (i11 > 0) { r11.textContent = s2 ? s2.emptyScript : ""; for (let s9 = 0; s9 < i11; s9++) r11.append(t9[s9], c3()), P.nextNode(), d4.push({ type: 2, index: ++l7 }); r11.append(t9[i11], c3()); } } } else if (8 === r11.nodeType) if (r11.data === n3) d4.push({ type: 2, index: l7 }); else { let t9 = -1; for (; -1 !== (t9 = r11.data.indexOf(o3, t9 + 1)); ) d4.push({ type: 7, index: l7 }), t9 += o3.length - 1; } l7++; } } static createElement(t8, i10) { const s9 = l2.createElement("template"); return s9.innerHTML = t8, s9; } }; function M(t8, i10, s9 = t8, e13) { if (i10 === E) return i10; let h6 = void 0 !== e13 ? s9._$Co?.[e13] : s9._$Cl; const o16 = a2(i10) ? void 0 : i10._$litDirective$; return h6?.constructor !== o16 && (h6?._$AO?.(false), void 0 === o16 ? h6 = void 0 : (h6 = new o16(t8), h6._$AT(t8, s9, e13)), void 0 !== e13 ? (s9._$Co ??= [])[e13] = h6 : s9._$Cl = h6), void 0 !== h6 && (i10 = M(t8, h6._$AS(t8, i10.values), h6, e13)), i10; } var R = class { constructor(t8, i10) { this._$AV = [], this._$AN = void 0, this._$AD = t8, this._$AM = i10; } get parentNode() { return this._$AM.parentNode; } get _$AU() { return this._$AM._$AU; } u(t8) { const { el: { content: i10 }, parts: s9 } = this._$AD, e13 = (t8?.creationScope ?? l2).importNode(i10, true); P.currentNode = e13; let h6 = P.nextNode(), o16 = 0, n12 = 0, r11 = s9[0]; for (; void 0 !== r11; ) { if (o16 === r11.index) { let i11; 2 === r11.type ? i11 = new k(h6, h6.nextSibling, this, t8) : 1 === r11.type ? i11 = new r11.ctor(h6, r11.name, r11.strings, this, t8) : 6 === r11.type && (i11 = new Z(h6, this, t8)), this._$AV.push(i11), r11 = s9[++n12]; } o16 !== r11?.index && (h6 = P.nextNode(), o16++); } return P.currentNode = l2, e13; } p(t8) { let i10 = 0; for (const s9 of this._$AV) void 0 !== s9 && (void 0 !== s9.strings ? (s9._$AI(t8, s9, i10), i10 += s9.strings.length - 2) : s9._$AI(t8[i10])), i10++; } }; var k = class _k { get _$AU() { return this._$AM?._$AU ?? this._$Cv; } constructor(t8, i10, s9, e13) { this.type = 2, this._$AH = A, this._$AN = void 0, this._$AA = t8, this._$AB = i10, this._$AM = s9, this.options = e13, this._$Cv = e13?.isConnected ?? true; } get parentNode() { let t8 = this._$AA.parentNode; const i10 = this._$AM; return void 0 !== i10 && 11 === t8?.nodeType && (t8 = i10.parentNode), t8; } get startNode() { return this._$AA; } get endNode() { return this._$AB; } _$AI(t8, i10 = this) { t8 = M(this, t8, i10), a2(t8) ? t8 === A || null == t8 || "" === t8 ? (this._$AH !== A && this._$AR(), this._$AH = A) : t8 !== this._$AH && t8 !== E && this._(t8) : void 0 !== t8._$litType$ ? this.$(t8) : void 0 !== t8.nodeType ? this.T(t8) : d2(t8) ? this.k(t8) : this._(t8); } O(t8) { return this._$AA.parentNode.insertBefore(t8, this._$AB); } T(t8) { this._$AH !== t8 && (this._$AR(), this._$AH = this.O(t8)); } _(t8) { this._$AH !== A && a2(this._$AH) ? this._$AA.nextSibling.data = t8 : this.T(l2.createTextNode(t8)), this._$AH = t8; } $(t8) { const { values: i10, _$litType$: s9 } = t8, e13 = "number" == typeof s9 ? this._$AC(t8) : (void 0 === s9.el && (s9.el = S2.createElement(V(s9.h, s9.h[0]), this.options)), s9); if (this._$AH?._$AD === e13) this._$AH.p(i10); else { const t9 = new R(e13, this), s10 = t9.u(this.options); t9.p(i10), this.T(s10), this._$AH = t9; } } _$AC(t8) { let i10 = C.get(t8.strings); return void 0 === i10 && C.set(t8.strings, i10 = new S2(t8)), i10; } k(t8) { u2(this._$AH) || (this._$AH = [], this._$AR()); const i10 = this._$AH; let s9, e13 = 0; for (const h6 of t8) e13 === i10.length ? i10.push(s9 = new _k(this.O(c3()), this.O(c3()), this, this.options)) : s9 = i10[e13], s9._$AI(h6), e13++; e13 < i10.length && (this._$AR(s9 && s9._$AB.nextSibling, e13), i10.length = e13); } _$AR(t8 = this._$AA.nextSibling, s9) { for (this._$AP?.(false, true, s9); t8 !== this._$AB; ) { const s10 = i3(t8).nextSibling; i3(t8).remove(), t8 = s10; } } setConnected(t8) { void 0 === this._$AM && (this._$Cv = t8, this._$AP?.(t8)); } }; var H = class { get tagName() { return this.element.tagName; } get _$AU() { return this._$AM._$AU; } constructor(t8, i10, s9, e13, h6) { this.type = 1, this._$AH = A, this._$AN = void 0, this.element = t8, this.name = i10, this._$AM = e13, this.options = h6, s9.length > 2 || "" !== s9[0] || "" !== s9[1] ? (this._$AH = Array(s9.length - 1).fill(new String()), this.strings = s9) : this._$AH = A; } _$AI(t8, i10 = this, s9, e13) { const h6 = this.strings; let o16 = false; if (void 0 === h6) t8 = M(this, t8, i10, 0), o16 = !a2(t8) || t8 !== this._$AH && t8 !== E, o16 && (this._$AH = t8); else { const e14 = t8; let n12, r11; for (t8 = h6[0], n12 = 0; n12 < h6.length - 1; n12++) r11 = M(this, e14[s9 + n12], i10, n12), r11 === E && (r11 = this._$AH[n12]), o16 ||= !a2(r11) || r11 !== this._$AH[n12], r11 === A ? t8 = A : t8 !== A && (t8 += (r11 ?? "") + h6[n12 + 1]), this._$AH[n12] = r11; } o16 && !e13 && this.j(t8); } j(t8) { t8 === A ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t8 ?? ""); } }; var I = class extends H { constructor() { super(...arguments), this.type = 3; } j(t8) { this.element[this.name] = t8 === A ? void 0 : t8; } }; var L = class extends H { constructor() { super(...arguments), this.type = 4; } j(t8) { this.element.toggleAttribute(this.name, !!t8 && t8 !== A); } }; var z = class extends H { constructor(t8, i10, s9, e13, h6) { super(t8, i10, s9, e13, h6), this.type = 5; } _$AI(t8, i10 = this) { if ((t8 = M(this, t8, i10, 0) ?? A) === E) return; const s9 = this._$AH, e13 = t8 === A && s9 !== A || t8.capture !== s9.capture || t8.once !== s9.once || t8.passive !== s9.passive, h6 = t8 !== A && (s9 === A || e13); e13 && this.element.removeEventListener(this.name, this, s9), h6 && this.element.addEventListener(this.name, this, t8), this._$AH = t8; } handleEvent(t8) { "function" == typeof this._$AH ? this._$AH.call(this.options?.host ?? this.element, t8) : this._$AH.handleEvent(t8); } }; var Z = class { constructor(t8, i10, s9) { this.element = t8, this.type = 6, this._$AN = void 0, this._$AM = i10, this.options = s9; } get _$AU() { return this._$AM._$AU; } _$AI(t8) { M(this, t8); } }; var j = { M: h2, P: o3, A: n3, C: 1, L: N, R, D: d2, V: M, I: k, H, N: L, U: z, B: I, F: Z }; var B = t2.litHtmlPolyfillSupport; B?.(S2, k), (t2.litHtmlVersions ??= []).push("3.3.2"); var D = (t8, i10, s9) => { const e13 = s9?.renderBefore ?? i10; let h6 = e13._$litPart$; if (void 0 === h6) { const t9 = s9?.renderBefore ?? null; e13._$litPart$ = h6 = new k(i10.insertBefore(c3(), t9), t9, void 0, s9 ?? {}); } return h6._$AI(t8), h6; }; // node_modules/lit-element/lit-element.js var s3 = globalThis; var i4 = class extends y { constructor() { super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0; } createRenderRoot() { const t8 = super.createRenderRoot(); return this.renderOptions.renderBefore ??= t8.firstChild, t8; } update(t8) { const r11 = this.render(); this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t8), this._$Do = D(r11, this.renderRoot, this.renderOptions); } connectedCallback() { super.connectedCallback(), this._$Do?.setConnected(true); } disconnectedCallback() { super.disconnectedCallback(), this._$Do?.setConnected(false); } render() { return E; } }; i4._$litElement$ = true, i4["finalized"] = true, s3.litElementHydrateSupport?.({ LitElement: i4 }); var o4 = s3.litElementPolyfillSupport; o4?.({ LitElement: i4 }); (s3.litElementVersions ??= []).push("4.2.2"); // node_modules/@webwriter/lit/index.js var __create2 = Object.create; var __defProp2 = Object.defineProperty; var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; var __knownSymbol2 = (name, symbol) => (symbol = Symbol[name]) ? symbol : Symbol.for("Symbol." + name); var __typeError2 = (msg2) => { throw TypeError(msg2); }; var __defNormalProp2 = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; var __name2 = (target, value) => __defProp2(target, "name", { value, configurable: true }); var __decoratorStart2 = (base) => [, , , __create2(base?.[__knownSymbol2("metadata")] ?? null)]; var __decoratorStrings2 = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"]; var __expectFn2 = (fn) => fn !== void 0 && typeof fn !== "function" ? __typeError2("Function expected") : fn; var __decoratorContext2 = (kind, name, done, metadata, fns) => ({ kind: __decoratorStrings2[kind], name, metadata, addInitializer: (fn) => done._ ? __typeError2("Already initialized") : fns.push(__expectFn2(fn || null)) }); var __decoratorMetadata2 = (array, target) => __defNormalProp2(target, __knownSymbol2("metadata"), array[3]); var __runInitializers2 = (array, flags, self2, value) => { for (var i52 = 0, fns = array[flags >> 1], n52 = fns && fns.length; i52 < n52; i52++) flags & 1 ? fns[i52].call(self2) : value = fns[i52].call(self2, value); return value; }; var __decorateElement2 = (array, flags, name, decorators, target, extra) => { var fn, it, done, ctx, access, k22 = flags & 7, s42 = !!(flags & 8), p32 = !!(flags & 16); var j22 = k22 > 3 ? array.length + 1 : k22 ? s42 ? 1 : 2 : 0, key = __decoratorStrings2[k22 + 5]; var initializers = k22 > 3 && (array[j22 - 1] = []), extraInitializers = array[j22] || (array[j22] = []); var desc = k22 && (!p32 && !s42 && (target = target.prototype), k22 < 5 && (k22 > 3 || !p32) && __getOwnPropDesc2(k22 < 4 ? target : { get [name]() { return __privateGet2(this, extra); }, set [name](x22) { return __privateSet2(this, extra, x22); } }, name)); k22 ? p32 && k22 < 4 && __name2(extra, (k22 > 2 ? "set " : k22 > 1 ? "get " : "") + name) : __name2(target, name); for (var i52 = decorators.length - 1; i52 >= 0; i52--) { ctx = __decoratorContext2(k22, name, done = {}, array[3], extraInitializers); if (k22) { ctx.static = s42, ctx.private = p32, access = ctx.access = { has: p32 ? (x22) => __privateIn2(target, x22) : (x22) => name in x22 }; if (k22 ^ 3) access.get = p32 ? (x22) => (k22 ^ 1 ? __privateGet2 : __privateMethod2)(x22, target, k22 ^ 4 ? extra : desc.get) : (x22) => x22[name]; if (k22 > 2) access.set = p32 ? (x22, y32) => __privateSet2(x22, target, y32, k22 ^ 4 ? extra : desc.set) : (x22, y32) => x22[name] = y32; } it = (0, decorators[i52])(k22 ? k22 < 4 ? p32 ? extra : desc[key] : k22 > 4 ? void 0 : { get: desc.get, set: desc.set } : target, ctx), done._ = 1; if (k22 ^ 4 || it === void 0) __expectFn2(it) && (k22 > 4 ? initializers.unshift(it) : k22 ? p32 ? extra = it : desc[key] = it : target = it); else if (typeof it !== "object" || it === null) __typeError2("Object expected"); else __expectFn2(fn = it.get) && (desc.get = fn), __expectFn2(fn = it.set) && (desc.set = fn), __expectFn2(fn = it.init) && initializers.unshift(fn); } return k22 || __decoratorMetadata2(array, target), desc && __defProp2(target, name, desc), p32 ? k22 ^ 4 ? extra : desc : target; }; var __publicField2 = (obj, key, value) => __defNormalProp2(obj, typeof key !== "symbol" ? key + "" : key, value); var __accessCheck2 = (obj, member, msg2) => member.has(obj) || __typeError2("Cannot " + msg2); var __privateIn2 = (member, obj) => Object(obj) !== obj ? __typeError2('Cannot use the "in" operator on this value') : member.has(obj); var __privateGet2 = (obj, member, getter) => (__accessCheck2(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj)); var __privateAdd2 = (obj, member, value) => member.has(obj) ? __typeError2("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value); var __privateSet2 = (obj, member, value, setter) => (__accessCheck2(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value); var __privateMethod2 = (obj, member, method) => (__accessCheck2(obj, member, "access private method"), method); var t3 = globalThis; var e4 = t3.ShadowRoot && (void 0 === t3.ShadyCSS || t3.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype; var s4 = Symbol(); var o5 = /* @__PURE__ */ new WeakMap(); var n4 = class { constructor(t32, e52, o62) { if (this._$cssResult$ = true, o62 !== s4) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead."); this.cssText = t32, this.t = e52; } get styleSheet() { let t32 = this.o; const s42 = this.t; if (e4 && void 0 === t32) { const e52 = void 0 !== s42 && 1 === s42.length; e52 && (t32 = o5.get(s42)), void 0 === t32 && ((this.o = t32 = new CSSStyleSheet()).replaceSync(this.cssText), e52 && o5.set(s42, t32)); } return t32; } toString() { return this.cssText; } }; var r4 = (t32) => new n4("string" == typeof t32 ? t32 : t32 + "", void 0, s4); var S3 = (s42, o62) => { if (e4) s42.adoptedStyleSheets = o62.map((t32) => t32 instanceof CSSStyleSheet ? t32 : t32.styleSheet); else for (const e52 of o62) { const o72 = document.createElement("style"), n52 = t3.litNonce; void 0 !== n52 && o72.setAttribute("nonce", n52), o72.textContent = e52.cssText, s42.appendChild(o72); } }; var c4 = e4 ? (t32) => t32 : (t32) => t32 instanceof CSSStyleSheet ? ((t42) => { let e52 = ""; for (const s42 of t42.cssRules) e52 += s42.cssText; return r4(e52); })(t32) : t32; var { is: i22, defineProperty: e22, getOwnPropertyDescriptor: h3, getOwnPropertyNames: r22, getOwnPropertySymbols: o22, getPrototypeOf: n22 } = Object; var a3 = globalThis; var c22 = a3.trustedTypes; var l3 = c22 ? c22.emptyScript : ""; var p3 = a3.reactiveElementPolyfillSupport; var d3 = (t32, s42) => t32; var u3 = { toAttribute(t32, s42) { switch (s42) { case Boolean: t32 = t32 ? l3 : null; break; case Object: case Array: t32 = null == t32 ? t32 : JSON.stringify(t32); } return t32; }, fromAttribute(t32, s42) { let i52 = t32; switch (s42) { case Boolean: i52 = null !== t32; break; case Number: i52 = null === t32 ? null : Number(t32); break; case Object: case Array: try { i52 = JSON.parse(t32); } catch (t42) { i52 = null; } } return i52; } }; var f3 = (t32, s42) => !i22(t32, s42); var b3 = { attribute: true, type: String, converter: u3, reflect: false, useDefault: false, hasChanged: f3 }; Symbol.metadata ??= Symbol("metadata"), a3.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap(); var y3 = class extends HTMLElement { static addInitializer(t32) { this._$Ei(), (this.l ??= []).push(t32); } static get observedAttributes() { return this.finalize(), this._$Eh && [...this._$Eh.keys()]; } static createProperty(t32, s42 = b3) { if (s42.state && (s42.attribute = false), this._$Ei(), this.prototype.hasOwnProperty(t32) && ((s42 = Object.create(s42)).wrapped = true), this.elementProperties.set(t32, s42), !s42.noAccessor) { const i52 = Symbol(), h32 = this.getPropertyDescriptor(t32, i52, s42); void 0 !== h32 && e22(this.prototype, t32, h32); } } static getPropertyDescriptor(t32, s42, i52) { const { get: e52, set: r52 } = h3(this.prototype, t32) ?? { get() { return this[s42]; }, set(t42) { this[s42] = t42; } }; return { get: e52, set(s52) { const h32 = e52?.call(this); r52?.call(this, s52), this.requestUpdate(t32, h32, i52); }, configurable: true, enumerable: true }; } static getPropertyOptions(t32) { return this.elementProperties.get(t32) ?? b3; } static _$Ei() { if (this.hasOwnProperty(d3("elementProperties"))) return; const t32 = n22(this); t32.finalize(), void 0 !== t32.l && (this.l = [...t32.l]), this.elementProperties = new Map(t32.elementProperties); } static finalize() { if (this.hasOwnProperty(d3("finalized"))) return; if (this.finalized = true, this._$Ei(), this.hasOwnProperty(d3("properties"))) { const t42 = this.properties, s42 = [...r22(t42), ...o22(t42)]; for (const i52 of s42) this.createProperty(i52, t42[i52]); } const t32 = this[Symbol.metadata]; if (null !== t32) { const s42 = litPropertyMetadata.get(t32); if (void 0 !== s42) for (const [t42, i52] of s42) this.elementProperties.set(t42, i52); } this._$Eh = /* @__PURE__ */ new Map(); for (const [t42, s42] of this.elementProperties) { const i52 = this._$Eu(t42, s42); void 0 !== i52 && this._$Eh.set(i52, t42); } this.elementStyles = this.finalizeStyles(this.styles); } static finalizeStyles(s42) { const i52 = []; if (Array.isArray(s42)) { const e52 = new Set(s42.flat(1 / 0).reverse()); for (const s52 of e52) i52.unshift(c4(s52)); } else void 0 !== s42 && i52.push(c4(s42)); return i52; } static _$Eu(t32, s42) { const i52 = s42.attribute; return false === i52 ? void 0 : "string" == typeof i52 ? i52 : "string" == typeof t32 ? t32.toLowerCase() : void 0; } constructor() { super(), this._$Ep = void 0, this.isUpdatePending = false, this.hasUpdated = false, this._$Em = null, this._$Ev(); } _$Ev() { this._$ES = new Promise((t32) => this.enableUpdating = t32), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach((t32) => t32(this)); } addController(t32) { (this._$EO ??= /* @__PURE__ */ new Set()).add(t32), void 0 !== this.renderRoot && this.isConnected && t32.hostConnected?.(); } removeController(t32) { this._$EO?.delete(t32); } _$E_() { const t32 = /* @__PURE__ */ new Map(), s42 = this.constructor.elementProperties; for (const i52 of s42.keys()) this.hasOwnProperty(i52) && (t32.set(i52, this[i52]), delete this[i52]); t32.size > 0 && (this._$Ep = t32); } createRenderRoot() { const t32 = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions); return S3(t32, this.constructor.elementStyles), t32; } connectedCallback() { this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(true), this._$EO?.forEach((t32) => t32.hostConnected?.()); } enableUpdating(t32) { } disconnectedCallback() { this._$EO?.forEach((t32) => t32.hostDisconnected?.()); } attributeChangedCallback(t32, s42, i52) { this._$AK(t32, i52); } _$ET(t32, s42) { const i52 = this.constructor.elementProperties.get(t32), e52 = this.constructor._$Eu(t32, i52); if (void 0 !== e52 && true === i52.reflect) { const h32 = (void 0 !== i52.converter?.toAttribute ? i52.converter : u3).toAttribute(s42, i52.type); this._$Em = t32, null == h32 ? this.removeAttribute(e52) : this.setAttribute(e52, h32), this._$Em = null; } } _$AK(t32, s42) { const i52 = this.constructor, e52 = i52._$Eh.get(t32); if (void 0 !== e52 && this._$Em !== e52) { const t42 = i52.getPropertyOptions(e52), h32 = "function" == typeof t42.converter ? { fromAttribute: t42.converter } : void 0 !== t42.converter?.fromAttribute ? t42.converter : u3; this._$Em = e52, this[e52] = h32.fromAttribute(s42, t42.type) ?? this._$Ej?.get(e52) ?? null, this._$Em = null; } } requestUpdate(t32, s42, i52) { if (void 0 !== t32) { const e52 = this.constructor, h32 = this[t32]; if (i52 ??= e52.getPropertyOptions(t32), !((i52.hasChanged ?? f3)(h32, s42) || i52.useDefault && i52.reflect && h32 === this._$Ej?.get(t32) && !this.hasAttribute(e52._$Eu(t32, i52)))) return; this.C(t32, s42, i52); } false === this.isUpdatePending && (this._$ES = this._$EP()); } C(t32, s42, { useDefault: i52, reflect: e52, wrapped: h32 }, r52) { i52 && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t32) && (this._$Ej.set(t32, r52 ?? s42 ?? this[t32]), true !== h32 || void 0 !== r52) || (this._$AL.has(t32) || (this.hasUpdated || i52 || (s42 = void 0), this._$AL.set(t32, s42)), true === e52 && this._$Em !== t32 && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t32)); } async _$EP() { this.isUpdatePending = true; try { await this._$ES; } catch (t42) { Promise.reject(t42); } const t32 = this.scheduleUpdate(); return null != t32 && await t32, !this.isUpdatePending; } scheduleUpdate() { return this.performUpdate(); } performUpdate() { if (!this.isUpdatePending) return; if (!this.hasUpdated) { if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) { for (const [t52, s52] of this._$Ep) this[t52] = s52; this._$Ep = void 0; } const t42 = this.constructor.elementProperties; if (t42.size > 0) for (const [s52, i52] of t42) { const { wrapped: t52 } = i52, e52 = this[s52]; true !== t52 || this._$AL.has(s52) || void 0 === e52 || this.C(s52, void 0, i52, e52); } } let t32 = false; const s42 = this._$AL; try { t32 = this.shouldUpdate(s42), t32 ? (this.willUpdate(s42), this._$EO?.forEach((t42) => t42.hostUpdate?.()), this.update(s42)) : this._$EM(); } catch (s52) { throw t32 = false, this._$EM(), s52; } t32 && this._$AE(s42); } willUpdate(t32) { } _$AE(t32) { this._$EO?.forEach((t42) => t42.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = true, this.firstUpdated(t32)), this.updated(t32); } _$EM() { this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = false; } get updateComplete() { return this.getUpdateComplete(); } getUpdateComplete() { return this._$ES; } shouldUpdate(t32) { return true; } update(t32) { this._$Eq &&= this._$Eq.forEach((t42) => this._$ET(t42, this[t42])), this._$EM(); } updated(t32) { } firstUpdated(t32) { } }; y3.elementStyles = [], y3.shadowRootOptions = { mode: "open" }, y3[d3("elementProperties")] = /* @__PURE__ */ new Map(), y3[d3("finalized")] = /* @__PURE__ */ new Map(), p3?.({ ReactiveElement: y3 }), (a3.reactiveElementVersions ??= []).push("2.1.0"); var t22 = globalThis; var i32 = t22.trustedTypes; var s22 = i32 ? i32.createPolicy("lit-html", { createHTML: (t32) => t32 }) : void 0; var e32 = "$lit$"; var h22 = `lit$${Math.random().toFixed(9).slice(2)}$`; var o32 = "?" + h22; var n32 = `<${o32}>`; var r32 = document; var l22 = () => r32.createComment(""); var c32 = (t32) => null === t32 || "object" != typeof t32 && "function" != typeof t32; var a22 = Array.isArray; var u22 = (t32) => a22(t32) || "function" == typeof t32?.[Symbol.iterator]; var d22 = "[ \n\f\r]"; var f22 = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g; var v2 = /-->/g; var _2 = />/g; var m2 = RegExp(`>|${d22}(?:([^\\s"'>=/]+)(${d22}*=${d22}*(?:[^ \f\r"'\`<>=]|("|')|))|$)`, "g"); var p22 = /'/g; var g2 = /"/g; var $2 = /^(?:script|style|textarea|title)$/i; var y22 = (t32) => (i52, ...s42) => ({ _$litType$: t32, strings: i52, values: s42 }); var x2 = y22(1); var b22 = y22(2); var w2 = y22(3); var T2 = Symbol.for("lit-noChange"); var E2 = Symbol.for("lit-nothing"); var A2 = /* @__PURE__ */ new WeakMap(); var C2 = r32.createTreeWalker(r32, 129); function P2(t32, i52) { if (!a22(t32) || !t32.hasOwnProperty("raw")) throw Error("invalid template strings array"); return void 0 !== s22 ? s22.createHTML(i52) : i52; } var V2 = (t32, i52) => { const s42 = t32.length - 1, o62 = []; let r52, l32 = 2 === i52 ? "<svg>" : 3 === i52 ? "<math>" : "", c42 = f22; for (let i62 = 0; i62 < s42; i62++) { const s52 = t32[i62]; let a32, u32, d32 = -1, y32 = 0; for (; y32 < s52.length && (c42.lastIndex = y32, u32 = c42.exec(s52), null !== u32); ) y32 = c42.lastIndex, c42 === f22 ? "!--" === u32[1] ? c42 = v2 : void 0 !== u32[1] ? c42 = _2 : void 0 !== u32[2] ? ($2.test(u32[2]) && (r52 = RegExp("</" + u32[2], "g")), c42 = m2) : void 0 !== u32[3] && (c42 = m2) : c42 === m2 ? ">" === u32[0] ? (c42 = r52 ?? f22, d32 = -1) : void 0 === u32[1] ? d32 = -2 : (d32 = c42.lastIndex - u32[2].length, a32 = u32[1], c42 = void 0 === u32[3] ? m2 : '"' === u32[3] ? g2 : p22) : c42 === g2 || c42 === p22 ? c42 = m2 : c42 === v2 || c42 === _2 ? c42 = f22 : (c42 = m2, r52 = void 0); const x22 = c42 === m2 && t32[i62 + 1].startsWith("/>") ? " " : ""; l32 += c42 === f22 ? s52 + n32 : d32 >= 0 ? (o62.push(a32), s52.slice(0, d32) + e32 + s52.slice(d32) + h22 + x22) : s52 + h22 + (-2 === d32 ? i62 : x22); } return [P2(t32, l32 + (t32[s42] || "<?>") + (2 === i52 ? "</svg>" : 3 === i52 ? "</math>" : "")), o62]; }; var N2 = class _N { constructor({ strings: t32, _$litType$: s42 }, n52) { let r52; this.parts = []; let c42 = 0, a32 = 0; const u32 = t32.length - 1, d32 = this.parts, [f32, v22] = V2(t32, s42); if (this.el = _N.createElement(f32, n52), C2.currentNode = this.el.content, 2 === s42 || 3 === s42) { const t42 = this.el.content.firstChild; t42.replaceWith(...t42.childNodes); } for (; null !== (r52 = C2.nextNode()) && d32.length < u32; ) { if (1 === r52.nodeType) { if (r52.hasAttributes()) for (const t42 of r52.getAttributeNames()) if (t42.endsWith(e32)) { const i52 = v22[a32++], s52 = r52.getAttribute(t42).split(h22), e52 = /([.?@])?(.*)/.exec(i52); d32.push({ type: 1, index: c42, name: e52[2], strings: s52, ctor: "." === e52[1] ? H2 : "?" === e52[1] ? I2 : "@" === e52[1] ? L2 : k2 }), r52.removeAttribute(t42); } else t42.startsWith(h22) && (d32.push({ type: 6, index: c42 }), r52.removeAttribute(t42)); if ($2.test(r52.tagName)) { const t42 = r52.textContent.split(h22), s52 = t42.length - 1; if (s52 > 0) { r52.textContent = i32 ? i32.emptyScript : ""; for (let i52 = 0; i52 < s52; i52++) r52.append(t42[i52], l22()), C2.nextNode(), d32.push({ type: 2, index: ++c42 }); r52.append(t42[s52], l22()); } } } else if (8 === r52.nodeType) if (r52.data === o32) d32.push({ type: 2, index: c42 }); else { let t42 = -1; for (; -1 !== (t42 = r52.data.indexOf(h22, t42 + 1)); ) d32.push({ type: 7, index: c42 }), t42 += h22.length - 1; } c42++; } } static createElement(t32, i52) { const s42 = r32.createElement("template"); return s42.innerHTML = t32, s42; } }; function S22(t32, i52, s42 = t32, e52) { if (i52 === T2) return i52; let h32 = void 0 !== e52 ? s42._$Co?.[e52] : s42._$Cl; const o62 = c32(i52) ? void 0 : i52._$litDirective$; return h32?.constructor !== o62 && (h32?._$AO?.(false), void 0 === o62 ? h32 = void 0 : (h32 = new o62(t32), h32._$AT(t32, s42, e52)), void 0 !== e52 ? (s42._$Co ??= [])[e52] = h32 : s42._$Cl = h32), void 0 !== h32 && (i52 = S22(t32, h32._$AS(t32, i52.values), h32, e52)), i52; } var M2 = class { constructor(t32, i52) { this._$AV = [], this._$AN = void 0, this._$AD = t32, this._$AM = i52; } get parentNode() { return this._$AM.parentNode; } get _$AU() { return this._$AM._$AU; } u(t32) { const { el: { content: i52 }, parts: s42 } = this._$AD, e52 = (t32?.creationScope ?? r32).importNode(i52, true); C2.currentNode = e52; let h32 = C2.nextNode(), o62 = 0, n52 = 0, l32 = s42[0]; for (; void 0 !== l32; ) { if (o62 === l32.index) { let i62; 2 === l32.type ? i62 = new R2(h32, h32.nextSibling, this, t32) : 1 === l32.type ? i62 = new l32.ctor(h32, l32.name, l32.strings, this, t32) : 6 === l32.type && (i62 = new z2(h32, this, t32)), this._$AV.push(i62), l32 = s42[++n52]; } o62 !== l32?.index && (h32 = C2.nextNode(), o62++); } return C2.currentNode = r32, e52; } p(t32) { let i52 = 0; for (const s42 of this._$AV) void 0 !== s42 && (void 0 !== s42.strings ? (s42._$AI(t32, s42, i52), i52 += s42.strings.length - 2) : s42._$AI(t32[i52])), i52++; } }; var R2 = class _R { get _$AU() { return this._$AM?._$AU ?? this._$Cv; } constructor(t32, i52, s42, e52) { this.type = 2, this._$AH = E2, this._$AN = void 0, this._$AA = t32, this._$AB = i52, this._$AM = s42, this.options = e52, this._$Cv = e52?.isConnected ?? true; } get parentNode() { let t32 = this._$AA.parentNode; const i52 = this._$AM; return void 0 !== i52 && 11 === t32?.nodeType && (t32 = i52.parentNode), t32; } get startNode() { return this._$AA; } get endNode() { return this._$AB; } _$AI(t32, i52 = this) { t32 = S22(this, t32, i52), c32(t32) ? t32 === E2 || null == t32 || "" === t32 ? (this._$AH !== E2 && this._$AR(), this._$AH = E2) : t32 !== this._$AH && t32 !== T2 && this._(t32) : void 0 !== t32._$litType$ ? this.$(t32) : void 0 !== t32.nodeType ? this.T(t32) : u22(t32) ? this.k(t32) : this._(t32); } O(t32) { return this._$AA.parentNode.insertBefore(t32, this._$AB); } T(t32) { this._$AH !== t32 && (this._$AR(), this._$AH = this.O(t32)); } _(t32) { this._$AH !== E2 && c32(this._$AH) ? this._$AA.nextSibling.data = t32 : this.T(r32.createTextNode(t32)), this._$AH = t32; } $(t32) { const { values: i52, _$litType$: s42 } = t32, e52 = "number" == typeof s42 ? this._$AC(t32) : (void 0 === s42.el && (s42.el = N2.createElement(P2(s42.h, s42.h[0]), this.options)), s42); if (this._$AH?._$AD === e52) this._$AH.p(i52); else { const t42 = new M2(e52, this), s52 = t42.u(this.options); t42.p(i52), this.T(s52), this._$AH = t42; } } _$AC(t32) { let i52 = A2.get(t32.strings); return void 0 === i52 && A2.set(t32.strings, i52 = new N2(t32)), i52; } k(t32) { a22(this._$AH) || (this._$AH = [], this._$AR()); const i52 = this._$AH; let s42, e52 = 0; for (const h32 of t32) e52 === i52.length ? i52.push(s42 = new _R(this.O(l22()), this.O(l22()), this, this.options)) : s42 = i52[e52], s42._$AI(h32), e52++; e52 < i52.length && (this._$AR(s42 && s42._$AB.nextSibling, e52), i52.length = e52); } _$AR(t32 = this._$AA.nextSibling, i52) { for (this._$AP?.(false, true, i52); t32 && t32 !== this._$AB; ) { const i62 = t32.nextSibling; t32.remove(), t32 = i62; } } setConnected(t32) { void 0 === this._$AM && (this._$Cv = t32, this._$AP?.(t32)); } }; var k2 = class { get tagName() { return this.element.tagName; } get _$AU() { return this._$AM._$AU; } constructor(t32, i52, s42, e52, h32) { this.type = 1, this._$AH = E2, this._$AN = void 0, this.element = t32, this.name = i52, this._$AM = e52, this.options = h32, s42.length > 2 || "" !== s42[0] || "" !== s42[1] ? (this._$AH = Array(s42.length - 1).fill(new String()), this.strings = s42) : this._$AH = E2; } _$AI(t32, i52 = this, s42, e52) { const h32 = this.strings; let o62 = false; if (void 0 === h32) t32 = S22(this, t32, i52, 0), o62 = !c32(t32) || t32 !== this._$AH && t32 !== T2, o62 && (this._$AH = t32); else { const e62 = t32; let n52, r52; for (t32 = h32[0], n52 = 0; n52 < h32.length - 1; n52++) r52 = S22(this, e62[s42 + n52], i52, n52), r52 === T2 && (r52 = this._$AH[n52]), o62 ||= !c32(r52) || r52 !== this._$AH[n52], r52 === E2 ? t32 = E2 : t32 !== E2 && (t32 += (r52 ?? "") + h32[n52 + 1]), this._$AH[n52] = r52; } o62 && !e52 &