UNPKG

@webwriter/interactive-video

Version:

(WIP) Enhance learning by adding interactive content in popups to videos for an engaging, interactive experience.

1,132 lines (1,127 loc) 861 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 = (msg) => { throw TypeError(msg); }; 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, s8 = !!(flags & 8), p4 = !!(flags & 16); var j3 = k3 > 3 ? array.length + 1 : k3 ? s8 ? 1 : 2 : 0, key = __decoratorStrings[k3 + 5]; var initializers = k3 > 3 && (array[j3 - 1] = []), extraInitializers = array[j3] || (array[j3] = []); var desc = k3 && (!p4 && !s8 && (target = target.prototype), k3 < 5 && (k3 > 3 || !p4) && __getOwnPropDesc(k3 < 4 ? target : { get [name]() { return __privateGet(this, extra); }, set [name](x3) { return __privateSet(this, extra, x3); } }, name)); k3 ? p4 && 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 = s8, ctx.private = p4, access = ctx.access = { has: p4 ? (x3) => __privateIn(target, x3) : (x3) => name in x3 }; if (k3 ^ 3) access.get = p4 ? (x3) => (k3 ^ 1 ? __privateGet : __privateMethod)(x3, target, k3 ^ 4 ? extra : desc.get) : (x3) => x3[name]; if (k3 > 2) access.set = p4 ? (x3, y4) => __privateSet(x3, target, y4, k3 ^ 4 ? extra : desc.set) : (x3, y4) => x3[name] = y4; } it = (0, decorators[i10])(k3 ? k3 < 4 ? p4 ? 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 ? p4 ? 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), p4 ? k3 ^ 4 ? extra : desc : target; }; var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg); 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, e15, o15) { if (this._$cssResult$ = true, o15 !== s) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead."); this.cssText = t8, this.t = e15; } get styleSheet() { let t8 = this.o; const s8 = this.t; if (e && void 0 === t8) { const e15 = void 0 !== s8 && 1 === s8.length; e15 && (t8 = o.get(s8)), void 0 === t8 && ((this.o = t8 = new CSSStyleSheet()).replaceSync(this.cssText), e15 && o.set(s8, t8)); } return t8; } toString() { return this.cssText; } }; var r = (t8) => new n("string" == typeof t8 ? t8 : t8 + "", void 0, s); var i = (t8, ...e15) => { const o15 = 1 === t8.length ? t8[0] : e15.reduce((e16, s8, o16) => e16 + ((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."); })(s8) + t8[o16 + 1], t8[0]); return new n(o15, t8, s); }; var S = (s8, o15) => { if (e) s8.adoptedStyleSheets = o15.map((t8) => t8 instanceof CSSStyleSheet ? t8 : t8.styleSheet); else for (const e15 of o15) { const o16 = document.createElement("style"), n12 = t.litNonce; void 0 !== n12 && o16.setAttribute("nonce", n12), o16.textContent = e15.cssText, s8.appendChild(o16); } }; var c = e ? (t8) => t8 : (t8) => t8 instanceof CSSStyleSheet ? ((t9) => { let e15 = ""; for (const s8 of t9.cssRules) e15 += s8.cssText; return r(e15); })(t8) : t8; // 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 = (t8, s8) => t8; var u = { toAttribute(t8, s8) { switch (s8) { case Boolean: t8 = t8 ? l : null; break; case Object: case Array: t8 = null == t8 ? t8 : JSON.stringify(t8); } return t8; }, fromAttribute(t8, s8) { let i10 = t8; switch (s8) { 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, s8) => !i2(t8, s8); var y = { attribute: true, type: String, converter: u, reflect: false, hasChanged: f }; Symbol.metadata ??= Symbol("metadata"), a.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap(); var b = 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, s8 = y) { if (s8.state && (s8.attribute = false), this._$Ei(), this.elementProperties.set(t8, s8), !s8.noAccessor) { const i10 = Symbol(), r11 = this.getPropertyDescriptor(t8, i10, s8); void 0 !== r11 && e2(this.prototype, t8, r11); } } static getPropertyDescriptor(t8, s8, i10) { const { get: e15, set: h6 } = r2(this.prototype, t8) ?? { get() { return this[s8]; }, set(t9) { this[s8] = t9; } }; return { get() { return e15?.call(this); }, set(s9) { const r11 = e15?.call(this); h6.call(this, s9), this.requestUpdate(t8, r11, i10); }, configurable: true, enumerable: true }; } static getPropertyOptions(t8) { return this.elementProperties.get(t8) ?? y; } 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, s8 = [...h(t9), ...o2(t9)]; for (const i10 of s8) this.createProperty(i10, t9[i10]); } const t8 = this[Symbol.metadata]; if (null !== t8) { const s8 = litPropertyMetadata.get(t8); if (void 0 !== s8) for (const [t9, i10] of s8) this.elementProperties.set(t9, i10); } this._$Eh = /* @__PURE__ */ new Map(); for (const [t9, s8] of this.elementProperties) { const i10 = this._$Eu(t9, s8); void 0 !== i10 && this._$Eh.set(i10, t9); } this.elementStyles = this.finalizeStyles(this.styles); } static finalizeStyles(s8) { const i10 = []; if (Array.isArray(s8)) { const e15 = new Set(s8.flat(1 / 0).reverse()); for (const s9 of e15) i10.unshift(c(s9)); } else void 0 !== s8 && i10.push(c(s8)); return i10; } static _$Eu(t8, s8) { const i10 = s8.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(), s8 = this.constructor.elementProperties; for (const i10 of s8.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, s8, i10) { this._$AK(t8, i10); } _$EC(t8, s8) { const i10 = this.constructor.elementProperties.get(t8), e15 = this.constructor._$Eu(t8, i10); if (void 0 !== e15 && true === i10.reflect) { const r11 = (void 0 !== i10.converter?.toAttribute ? i10.converter : u).toAttribute(s8, i10.type); this._$Em = t8, null == r11 ? this.removeAttribute(e15) : this.setAttribute(e15, r11), this._$Em = null; } } _$AK(t8, s8) { const i10 = this.constructor, e15 = i10._$Eh.get(t8); if (void 0 !== e15 && this._$Em !== e15) { const t9 = i10.getPropertyOptions(e15), r11 = "function" == typeof t9.converter ? { fromAttribute: t9.converter } : void 0 !== t9.converter?.fromAttribute ? t9.converter : u; this._$Em = e15, this[e15] = r11.fromAttribute(s8, t9.type), this._$Em = null; } } requestUpdate(t8, s8, i10) { if (void 0 !== t8) { if (i10 ??= this.constructor.getPropertyOptions(t8), !(i10.hasChanged ?? f)(this[t8], s8)) return; this.P(t8, s8, i10); } false === this.isUpdatePending && (this._$ES = this._$ET()); } P(t8, s8, i10) { this._$AL.has(t8) || this._$AL.set(t8, s8), true === i10.reflect && this._$Em !== t8 && (this._$Ej ??= /* @__PURE__ */ new Set()).add(t8); } async _$ET() { 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, s9] of this._$Ep) this[t10] = s9; this._$Ep = void 0; } const t9 = this.constructor.elementProperties; if (t9.size > 0) for (const [s9, i10] of t9) true !== i10.wrapped || this._$AL.has(s9) || void 0 === this[s9] || this.P(s9, this[s9], i10); } let t8 = false; const s8 = this._$AL; try { t8 = this.shouldUpdate(s8), t8 ? (this.willUpdate(s8), this._$EO?.forEach((t9) => t9.hostUpdate?.()), this.update(s8)) : this._$EU(); } catch (s9) { throw t8 = false, this._$EU(), s9; } t8 && this._$AE(s8); } willUpdate(t8) { } _$AE(t8) { this._$EO?.forEach((t9) => t9.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = true, this.firstUpdated(t8)), this.updated(t8); } _$EU() { this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = false; } get updateComplete() { return this.getUpdateComplete(); } getUpdateComplete() { return this._$ES; } shouldUpdate(t8) { return true; } update(t8) { this._$Ej &&= this._$Ej.forEach((t9) => this._$EC(t9, this[t9])), this._$EU(); } updated(t8) { } firstUpdated(t8) { } }; b.elementStyles = [], b.shadowRootOptions = { mode: "open" }, b[d("elementProperties")] = /* @__PURE__ */ new Map(), b[d("finalized")] = /* @__PURE__ */ new Map(), p?.({ ReactiveElement: b }), (a.reactiveElementVersions ??= []).push("2.0.4"); // node_modules/lit-html/lit-html.js var t2 = globalThis; var i3 = t2.trustedTypes; var s2 = i3 ? i3.createPolicy("lit-html", { createHTML: (t8) => t8 }) : void 0; var e3 = "$lit$"; var h2 = `lit$${Math.random().toFixed(9).slice(2)}$`; var o3 = "?" + h2; var n3 = `<${o3}>`; var r3 = document; var l2 = () => r3.createComment(""); var c3 = (t8) => null === t8 || "object" != typeof t8 && "function" != typeof t8; var a2 = Array.isArray; var u2 = (t8) => a2(t8) || "function" == typeof t8?.[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 = (t8) => (i10, ...s8) => ({ _$litType$: t8, strings: i10, values: s8 }); var x = y2(1); var b2 = y2(2); var w = y2(3); var T = Symbol.for("lit-noChange"); var E = Symbol.for("lit-nothing"); var A = /* @__PURE__ */ new WeakMap(); var C = r3.createTreeWalker(r3, 129); function P(t8, i10) { if (!a2(t8) || !t8.hasOwnProperty("raw")) throw Error("invalid template strings array"); return void 0 !== s2 ? s2.createHTML(i10) : i10; } var V = (t8, i10) => { const s8 = t8.length - 1, o15 = []; let r11, l6 = 2 === i10 ? "<svg>" : 3 === i10 ? "<math>" : "", c8 = f2; for (let i11 = 0; i11 < s8; i11++) { const s9 = t8[i11]; let a5, u6, d4 = -1, y4 = 0; for (; y4 < s9.length && (c8.lastIndex = y4, u6 = c8.exec(s9), null !== u6); ) y4 = c8.lastIndex, c8 === f2 ? "!--" === u6[1] ? c8 = v : void 0 !== u6[1] ? c8 = _ : void 0 !== u6[2] ? ($.test(u6[2]) && (r11 = RegExp("</" + u6[2], "g")), c8 = m) : void 0 !== u6[3] && (c8 = m) : c8 === m ? ">" === u6[0] ? (c8 = r11 ?? f2, d4 = -1) : void 0 === u6[1] ? d4 = -2 : (d4 = c8.lastIndex - u6[2].length, a5 = u6[1], c8 = void 0 === u6[3] ? m : '"' === u6[3] ? g : p2) : c8 === g || c8 === p2 ? c8 = m : c8 === v || c8 === _ ? c8 = f2 : (c8 = m, r11 = void 0); const x3 = c8 === m && t8[i11 + 1].startsWith("/>") ? " " : ""; l6 += c8 === f2 ? s9 + n3 : d4 >= 0 ? (o15.push(a5), s9.slice(0, d4) + e3 + s9.slice(d4) + h2 + x3) : s9 + h2 + (-2 === d4 ? i11 : x3); } return [P(t8, l6 + (t8[s8] || "<?>") + (2 === i10 ? "</svg>" : 3 === i10 ? "</math>" : "")), o15]; }; var N = class _N { constructor({ strings: t8, _$litType$: s8 }, n12) { let r11; this.parts = []; let c8 = 0, a5 = 0; const u6 = t8.length - 1, d4 = this.parts, [f6, v3] = V(t8, s8); if (this.el = _N.createElement(f6, n12), C.currentNode = this.el.content, 2 === s8 || 3 === s8) { const t9 = this.el.content.firstChild; t9.replaceWith(...t9.childNodes); } for (; null !== (r11 = C.nextNode()) && d4.length < u6; ) { if (1 === r11.nodeType) { if (r11.hasAttributes()) for (const t9 of r11.getAttributeNames()) if (t9.endsWith(e3)) { const i10 = v3[a5++], s9 = r11.getAttribute(t9).split(h2), e15 = /([.?@])?(.*)/.exec(i10); d4.push({ type: 1, index: c8, name: e15[2], strings: s9, ctor: "." === e15[1] ? H : "?" === e15[1] ? I : "@" === e15[1] ? L : k }), r11.removeAttribute(t9); } else t9.startsWith(h2) && (d4.push({ type: 6, index: c8 }), r11.removeAttribute(t9)); if ($.test(r11.tagName)) { const t9 = r11.textContent.split(h2), s9 = t9.length - 1; if (s9 > 0) { r11.textContent = i3 ? i3.emptyScript : ""; for (let i10 = 0; i10 < s9; i10++) r11.append(t9[i10], l2()), C.nextNode(), d4.push({ type: 2, index: ++c8 }); r11.append(t9[s9], l2()); } } } else if (8 === r11.nodeType) if (r11.data === o3) d4.push({ type: 2, index: c8 }); else { let t9 = -1; for (; -1 !== (t9 = r11.data.indexOf(h2, t9 + 1)); ) d4.push({ type: 7, index: c8 }), t9 += h2.length - 1; } c8++; } } static createElement(t8, i10) { const s8 = r3.createElement("template"); return s8.innerHTML = t8, s8; } }; function S2(t8, i10, s8 = t8, e15) { if (i10 === T) return i10; let h6 = void 0 !== e15 ? s8._$Co?.[e15] : s8._$Cl; const o15 = c3(i10) ? void 0 : i10._$litDirective$; return h6?.constructor !== o15 && (h6?._$AO?.(false), void 0 === o15 ? h6 = void 0 : (h6 = new o15(t8), h6._$AT(t8, s8, e15)), void 0 !== e15 ? (s8._$Co ??= [])[e15] = h6 : s8._$Cl = h6), void 0 !== h6 && (i10 = S2(t8, h6._$AS(t8, i10.values), h6, e15)), i10; } var M = 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: s8 } = this._$AD, e15 = (t8?.creationScope ?? r3).importNode(i10, true); C.currentNode = e15; let h6 = C.nextNode(), o15 = 0, n12 = 0, l6 = s8[0]; for (; void 0 !== l6; ) { if (o15 === l6.index) { let i11; 2 === l6.type ? i11 = new R(h6, h6.nextSibling, this, t8) : 1 === l6.type ? i11 = new l6.ctor(h6, l6.name, l6.strings, this, t8) : 6 === l6.type && (i11 = new z(h6, this, t8)), this._$AV.push(i11), l6 = s8[++n12]; } o15 !== l6?.index && (h6 = C.nextNode(), o15++); } return C.currentNode = r3, e15; } p(t8) { let i10 = 0; for (const s8 of this._$AV) void 0 !== s8 && (void 0 !== s8.strings ? (s8._$AI(t8, s8, i10), i10 += s8.strings.length - 2) : s8._$AI(t8[i10])), i10++; } }; var R = class _R { get _$AU() { return this._$AM?._$AU ?? this._$Cv; } constructor(t8, i10, s8, e15) { this.type = 2, this._$AH = E, this._$AN = void 0, this._$AA = t8, this._$AB = i10, this._$AM = s8, this.options = e15, this._$Cv = e15?.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 = S2(this, t8, i10), c3(t8) ? t8 === E || null == t8 || "" === t8 ? (this._$AH !== E && this._$AR(), this._$AH = E) : t8 !== this._$AH && t8 !== T && this._(t8) : void 0 !== t8._$litType$ ? this.$(t8) : void 0 !== t8.nodeType ? this.T(t8) : u2(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 !== E && c3(this._$AH) ? this._$AA.nextSibling.data = t8 : this.T(r3.createTextNode(t8)), this._$AH = t8; } $(t8) { const { values: i10, _$litType$: s8 } = t8, e15 = "number" == typeof s8 ? this._$AC(t8) : (void 0 === s8.el && (s8.el = N.createElement(P(s8.h, s8.h[0]), this.options)), s8); if (this._$AH?._$AD === e15) this._$AH.p(i10); else { const t9 = new M(e15, this), s9 = t9.u(this.options); t9.p(i10), this.T(s9), this._$AH = t9; } } _$AC(t8) { let i10 = A.get(t8.strings); return void 0 === i10 && A.set(t8.strings, i10 = new N(t8)), i10; } k(t8) { a2(this._$AH) || (this._$AH = [], this._$AR()); const i10 = this._$AH; let s8, e15 = 0; for (const h6 of t8) e15 === i10.length ? i10.push(s8 = new _R(this.O(l2()), this.O(l2()), this, this.options)) : s8 = i10[e15], s8._$AI(h6), e15++; e15 < i10.length && (this._$AR(s8 && s8._$AB.nextSibling, e15), i10.length = e15); } _$AR(t8 = this._$AA.nextSibling, i10) { for (this._$AP?.(false, true, i10); t8 && t8 !== this._$AB; ) { const i11 = t8.nextSibling; t8.remove(), t8 = i11; } } setConnected(t8) { void 0 === this._$AM && (this._$Cv = t8, this._$AP?.(t8)); } }; var k = class { get tagName() { return this.element.tagName; } get _$AU() { return this._$AM._$AU; } constructor(t8, i10, s8, e15, h6) { this.type = 1, this._$AH = E, this._$AN = void 0, this.element = t8, this.name = i10, this._$AM = e15, this.options = h6, s8.length > 2 || "" !== s8[0] || "" !== s8[1] ? (this._$AH = Array(s8.length - 1).fill(new String()), this.strings = s8) : this._$AH = E; } _$AI(t8, i10 = this, s8, e15) { const h6 = this.strings; let o15 = false; if (void 0 === h6) t8 = S2(this, t8, i10, 0), o15 = !c3(t8) || t8 !== this._$AH && t8 !== T, o15 && (this._$AH = t8); else { const e16 = t8; let n12, r11; for (t8 = h6[0], n12 = 0; n12 < h6.length - 1; n12++) r11 = S2(this, e16[s8 + n12], i10, n12), r11 === T && (r11 = this._$AH[n12]), o15 ||= !c3(r11) || r11 !== this._$AH[n12], r11 === E ? t8 = E : t8 !== E && (t8 += (r11 ?? "") + h6[n12 + 1]), this._$AH[n12] = r11; } o15 && !e15 && this.j(t8); } j(t8) { t8 === E ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t8 ?? ""); } }; var H = class extends k { constructor() { super(...arguments), this.type = 3; } j(t8) { this.element[this.name] = t8 === E ? void 0 : t8; } }; var I = class extends k { constructor() { super(...arguments), this.type = 4; } j(t8) { this.element.toggleAttribute(this.name, !!t8 && t8 !== E); } }; var L = class extends k { constructor(t8, i10, s8, e15, h6) { super(t8, i10, s8, e15, h6), this.type = 5; } _$AI(t8, i10 = this) { if ((t8 = S2(this, t8, i10, 0) ?? E) === T) return; const s8 = this._$AH, e15 = t8 === E && s8 !== E || t8.capture !== s8.capture || t8.once !== s8.once || t8.passive !== s8.passive, h6 = t8 !== E && (s8 === E || e15); e15 && this.element.removeEventListener(this.name, this, s8), 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, s8) { this.element = t8, this.type = 6, this._$AN = void 0, this._$AM = i10, this.options = s8; } get _$AU() { return this._$AM._$AU; } _$AI(t8) { S2(this, t8); } }; var Z = { M: e3, P: h2, A: o3, C: 1, L: V, R: M, D: u2, V: S2, I: R, H: k, N: I, U: L, B: H, F: z }; var j = t2.litHtmlPolyfillSupport; j?.(N, R), (t2.litHtmlVersions ??= []).push("3.2.1"); var B = (t8, i10, s8) => { const e15 = s8?.renderBefore ?? i10; let h6 = e15._$litPart$; if (void 0 === h6) { const t9 = s8?.renderBefore ?? null; e15._$litPart$ = h6 = new R(i10.insertBefore(l2(), t9), t9, void 0, s8 ?? {}); } return h6._$AI(t8), h6; }; // node_modules/lit-element/lit-element.js var r4 = class extends b { 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 s8 = this.render(); this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t8), this._$Do = B(s8, this.renderRoot, this.renderOptions); } connectedCallback() { super.connectedCallback(), this._$Do?.setConnected(true); } disconnectedCallback() { super.disconnectedCallback(), this._$Do?.setConnected(false); } render() { return T; } }; r4._$litElement$ = true, r4["finalized"] = true, globalThis.litElementHydrateSupport?.({ LitElement: r4 }); var i4 = globalThis.litElementPolyfillSupport; i4?.({ LitElement: r4 }); (globalThis.litElementVersions ??= []).push("4.1.1"); // 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 = (msg) => { throw TypeError(msg); }; 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 i32 = 0, fns = array[flags >> 1], n52 = fns && fns.length; i32 < n52; i32++) flags & 1 ? fns[i32].call(self2) : value = fns[i32].call(self2, value); return value; }; var __decorateElement2 = (array, flags, name, decorators, target, extra) => { var fn, it, done, ctx, access, k22 = flags & 7, s22 = !!(flags & 8), p22 = !!(flags & 16); var j22 = k22 > 3 ? array.length + 1 : k22 ? s22 ? 1 : 2 : 0, key = __decoratorStrings2[k22 + 5]; var initializers = k22 > 3 && (array[j22 - 1] = []), extraInitializers = array[j22] || (array[j22] = []); var desc = k22 && (!p22 && !s22 && (target = target.prototype), k22 < 5 && (k22 > 3 || !p22) && __getOwnPropDesc2(k22 < 4 ? target : { get [name]() { return __privateGet2(this, extra); }, set [name](x22) { return __privateSet2(this, extra, x22); } }, name)); k22 ? p22 && k22 < 4 && __name2(extra, (k22 > 2 ? "set " : k22 > 1 ? "get " : "") + name) : __name2(target, name); for (var i32 = decorators.length - 1; i32 >= 0; i32--) { ctx = __decoratorContext2(k22, name, done = {}, array[3], extraInitializers); if (k22) { ctx.static = s22, ctx.private = p22, access = ctx.access = { has: p22 ? (x22) => __privateIn2(target, x22) : (x22) => name in x22 }; if (k22 ^ 3) access.get = p22 ? (x22) => (k22 ^ 1 ? __privateGet2 : __privateMethod2)(x22, target, k22 ^ 4 ? extra : desc.get) : (x22) => x22[name]; if (k22 > 2) access.set = p22 ? (x22, y22) => __privateSet2(x22, target, y22, k22 ^ 4 ? extra : desc.set) : (x22, y22) => x22[name] = y22; } it = (0, decorators[i32])(k22 ? k22 < 4 ? p22 ? 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 ? p22 ? 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), p22 ? k22 ^ 4 ? extra : desc : target; }; var __publicField2 = (obj, key, value) => __defNormalProp2(obj, typeof key !== "symbol" ? key + "" : key, value); var __accessCheck2 = (obj, member, msg) => member.has(obj) || __typeError2("Cannot " + msg); 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 s3 = Symbol(); var o4 = /* @__PURE__ */ new WeakMap(); var n4 = class { constructor(t22, e42, o42) { if (this._$cssResult$ = true, o42 !== s3) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead."); this.cssText = t22, this.t = e42; } get styleSheet() { let t22 = this.o; const s22 = this.t; if (e4 && void 0 === t22) { const e42 = void 0 !== s22 && 1 === s22.length; e42 && (t22 = o4.get(s22)), void 0 === t22 && ((this.o = t22 = new CSSStyleSheet()).replaceSync(this.cssText), e42 && o4.set(s22, t22)); } return t22; } toString() { return this.cssText; } }; var r5 = (t22) => new n4("string" == typeof t22 ? t22 : t22 + "", void 0, s3); var S3 = (s22, o42) => { if (e4) s22.adoptedStyleSheets = o42.map((t22) => t22 instanceof CSSStyleSheet ? t22 : t22.styleSheet); else for (const e42 of o42) { const o52 = document.createElement("style"), n52 = t3.litNonce; void 0 !== n52 && o52.setAttribute("nonce", n52), o52.textContent = e42.cssText, s22.appendChild(o52); } }; var c4 = e4 ? (t22) => t22 : (t22) => t22 instanceof CSSStyleSheet ? ((t32) => { let e42 = ""; for (const s22 of t32.cssRules) e42 += s22.cssText; return r5(e42); })(t22) : t22; var { is: i22, defineProperty: e22, getOwnPropertyDescriptor: r22, getOwnPropertyNames: h3, getOwnPropertySymbols: o22, getPrototypeOf: n22 } = Object; var a3 = globalThis; var c22 = a3.trustedTypes; var l3 = c22 ? c22.emptyScript : ""; var p3 = a3.reactiveElementPolyfillSupport; var d3 = (t22, s22) => t22; var u3 = { toAttribute(t22, s22) { switch (s22) { case Boolean: t22 = t22 ? l3 : null; break; case Object: case Array: t22 = null == t22 ? t22 : JSON.stringify(t22); } return t22; }, fromAttribute(t22, s22) { let i32 = t22; switch (s22) { case Boolean: i32 = null !== t22; break; case Number: i32 = null === t22 ? null : Number(t22); break; case Object: case Array: try { i32 = JSON.parse(t22); } catch (t32) { i32 = null; } } return i32; } }; var f3 = (t22, s22) => !i22(t22, s22); var y3 = { attribute: true, type: String, converter: u3, reflect: false, hasChanged: f3 }; Symbol.metadata ??= Symbol("metadata"), a3.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap(); var b3 = class extends HTMLElement { static addInitializer(t22) { this._$Ei(), (this.l ??= []).push(t22); } static get observedAttributes() { return this.finalize(), this._$Eh && [...this._$Eh.keys()]; } static createProperty(t22, s22 = y3) { if (s22.state && (s22.attribute = false), this._$Ei(), this.elementProperties.set(t22, s22), !s22.noAccessor) { const i32 = Symbol(), r42 = this.getPropertyDescriptor(t22, i32, s22); void 0 !== r42 && e22(this.prototype, t22, r42); } } static getPropertyDescriptor(t22, s22, i32) { const { get: e42, set: h42 } = r22(this.prototype, t22) ?? { get() { return this[s22]; }, set(t32) { this[s22] = t32; } }; return { get() { return e42?.call(this); }, set(s32) { const r42 = e42?.call(this); h42.call(this, s32), this.requestUpdate(t22, r42, i32); }, configurable: true, enumerable: true }; } static getPropertyOptions(t22) { return this.elementProperties.get(t22) ?? y3; } static _$Ei() { if (this.hasOwnProperty(d3("elementProperties"))) return; const t22 = n22(this); t22.finalize(), void 0 !== t22.l && (this.l = [...t22.l]), this.elementProperties = new Map(t22.elementProperties); } static finalize() { if (this.hasOwnProperty(d3("finalized"))) return; if (this.finalized = true, this._$Ei(), this.hasOwnProperty(d3("properties"))) { const t32 = this.properties, s22 = [...h3(t32), ...o22(t32)]; for (const i32 of s22) this.createProperty(i32, t32[i32]); } const t22 = this[Symbol.metadata]; if (null !== t22) { const s22 = litPropertyMetadata.get(t22); if (void 0 !== s22) for (const [t32, i32] of s22) this.elementProperties.set(t32, i32); } this._$Eh = /* @__PURE__ */ new Map(); for (const [t32, s22] of this.elementProperties) { const i32 = this._$Eu(t32, s22); void 0 !== i32 && this._$Eh.set(i32, t32); } this.elementStyles = this.finalizeStyles(this.styles); } static finalizeStyles(s22) { const i32 = []; if (Array.isArray(s22)) { const e42 = new Set(s22.flat(1 / 0).reverse()); for (const s32 of e42) i32.unshift(c4(s32)); } else void 0 !== s22 && i32.push(c4(s22)); return i32; } static _$Eu(t22, s22) { const i32 = s22.attribute; return false === i32 ? void 0 : "string" == typeof i32 ? i32 : "string" == typeof t22 ? t22.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((t22) => this.enableUpdating = t22), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach((t22) => t22(this)); } addController(t22) { (this._$EO ??= /* @__PURE__ */ new Set()).add(t22), void 0 !== this.renderRoot && this.isConnected && t22.hostConnected?.(); } removeController(t22) { this._$EO?.delete(t22); } _$E_() { const t22 = /* @__PURE__ */ new Map(), s22 = this.constructor.elementProperties; for (const i32 of s22.keys()) this.hasOwnProperty(i32) && (t22.set(i32, this[i32]), delete this[i32]); t22.size > 0 && (this._$Ep = t22); } createRenderRoot() { const t22 = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions); return S3(t22, this.constructor.elementStyles), t22; } connectedCallback() { this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(true), this._$EO?.forEach((t22) => t22.hostConnected?.()); } enableUpdating(t22) { } disconnectedCallback() { this._$EO?.forEach((t22) => t22.hostDisconnected?.()); } attributeChangedCallback(t22, s22, i32) { this._$AK(t22, i32); } _$EC(t22, s22) { const i32 = this.constructor.elementProperties.get(t22), e42 = this.constructor._$Eu(t22, i32); if (void 0 !== e42 && true === i32.reflect) { const r42 = (void 0 !== i32.converter?.toAttribute ? i32.converter : u3).toAttribute(s22, i32.type); this._$Em = t22, null == r42 ? this.removeAttribute(e42) : this.setAttribute(e42, r42), this._$Em = null; } } _$AK(t22, s22) { const i32 = this.constructor, e42 = i32._$Eh.get(t22); if (void 0 !== e42 && this._$Em !== e42) { const t32 = i32.getPropertyOptions(e42), r42 = "function" == typeof t32.converter ? { fromAttribute: t32.converter } : void 0 !== t32.converter?.fromAttribute ? t32.converter : u3; this._$Em = e42, this[e42] = r42.fromAttribute(s22, t32.type), this._$Em = null; } } requestUpdate(t22, s22, i32) { if (void 0 !== t22) { if (i32 ??= this.constructor.getPropertyOptions(t22), !(i32.hasChanged ?? f3)(this[t22], s22)) return; this.P(t22, s22, i32); } false === this.isUpdatePending && (this._$ES = this._$ET()); } P(t22, s22, i32) { this._$AL.has(t22) || this._$AL.set(t22, s22), true === i32.reflect && this._$Em !== t22 && (this._$Ej ??= /* @__PURE__ */ new Set()).add(t22); } async _$ET() { this.isUpdatePending = true; try { await this._$ES; } catch (t32) { Promise.reject(t32); } const t22 = this.scheduleUpdate(); return null != t22 && await t22, !this.isUpdatePending; } scheduleUpdate() { return this.performUpdate(); } performUpdate() { if (!this.isUpdatePending) return; if (!this.hasUpdated) { if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) { for (const [t42, s32] of this._$Ep) this[t42] = s32; this._$Ep = void 0; } const t32 = this.constructor.elementProperties; if (t32.size > 0) for (const [s32, i32] of t32) true !== i32.wrapped || this._$AL.has(s32) || void 0 === this[s32] || this.P(s32, this[s32], i32); } let t22 = false; const s22 = this._$AL; try { t22 = this.shouldUpdate(s22), t22 ? (this.willUpdate(s22), this._$EO?.forEach((t32) => t32.hostUpdate?.()), this.update(s22)) : this._$EU(); } catch (s32) { throw t22 = false, this._$EU(), s32; } t22 && this._$AE(s22); } willUpdate(t22) { } _$AE(t22) { this._$EO?.forEach((t32) => t32.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = true, this.firstUpdated(t22)), this.updated(t22); } _$EU() { this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = false; } get updateComplete() { return this.getUpdateComplete(); } getUpdateComplete() { return this._$ES; } shouldUpdate(t22) { return true; } update(t22) { this._$Ej &&= this._$Ej.forEach((t32) => this._$EC(t32, this[t32])), this._$EU(); } updated(t22) { } firstUpdated(t22) { } }; b3.elementStyles = [], b3.shadowRootOptions = { mode: "open" }, b3[d3("elementProperties")] = /* @__PURE__ */ new Map(), b3[d3("finalized")] = /* @__PURE__ */ new Map(), p3?.({ ReactiveElement: b3 }), (a3.reactiveElementVersions ??= []).push("2.0.4"); var n32 = globalThis; var c32 = n32.trustedTypes; var h22 = c32 ? c32.createPolicy("lit-html", { createHTML: (t22) => t22 }) : void 0; var f22 = "$lit$"; var v2 = `lit$${Math.random().toFixed(9).slice(2)}$`; var m2 = "?" + v2; var _2 = `<${m2}>`; var w2 = document; var lt = () => w2.createComment(""); var st = (t22) => null === t22 || "object" != typeof t22 && "function" != typeof t22; var g2 = Array.isArray; var $2 = (t22) => g2(t22) || "function" == typeof t22?.[Symbol.iterator]; var x2 = "[ \n\f\r]"; var T2 = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g; var E2 = /-->/g; var k2 = />/g; var O = RegExp(`>|${x2}(?:([^\\s"'>=/]+)(${x2}*=${x2}*(?:[^ \f\r"'\`<>=]|("|')|))|$)`, "g"); var S22 = /'/g; var j2 = /"/g; var M2 = /^(?:script|style|textarea|title)$/i; var P2 = (t22) => (i32, ...s22) => ({ _$litType$: t22, strings: i32, values: s22 }); var ke = P2(1); var Oe = P2(2); var Se = P2(3); var R2 = Symbol.for("lit-noChange"); var D = Symbol.for("lit-nothing"); var V2 = /* @__PURE__ */ new WeakMap(); var I2 = w2.createTreeWalker(w2, 129); function N2(t22, i32) { if (!g2(t22) || !t22.hasOwnProperty("raw")) throw Error("invalid template strings array"); return void 0 !== h22 ? h22.createHTML(i32) : i32; } var U = (t22, i32) => { const s22 = t22.length - 1, e42 = []; let h42, o42 = 2 === i32 ? "<svg>" : 3 === i32 ? "<math>" : "", n52 = T2; for (let i42 = 0; i42 < s22; i42++) { const s32 = t22[i42]; let r42, l22, c42 = -1, a22 = 0; for (; a22 < s32.length && (n52.lastIndex = a22, l22 = n52.exec(s32), null !== l22); ) a22 = n52.lastIndex, n52 === T2 ? "!--" === l22[1] ? n52 = E2 : void 0 !== l22[1] ? n52 = k2 : void 0 !== l22[2] ? (M2.test(l22[2]) && (h42 = RegExp("</" + l22[2], "g")), n52 = O) : void 0 !== l22[3] && (n52 = O) : n52 === O ? ">" === l22[0] ? (n52 = h42 ?? T2, c42 = -1) : void 0 === l22[1] ? c42 = -2 : (c42 = n52.lastIndex - l22[2].length, r42 = l22[1], n52 = void 0 === l22[3] ? O : '"' === l22[3] ? j2 : S22) : n52 === j2 || n52 === S22 ? n52 = O : n52 === E2 || n52 === k2 ? n52 = T2 : (n52 = O, h42 = void 0); const u22 = n52 === O && t22[i42 + 1].startsWith("/>") ? " " : ""; o42 += n52 === T2 ? s32 + _2 : c42 >= 0 ? (e42.push(r42), s32.slice(0, c42) + f22 + s32.slice(c42) + v2 + u22) : s32 + v2 + (-2 === c42 ? i42 : u22); } return [N2(t22, o42 + (t22[s22] || "<?>") + (2 === i32 ? "</svg>" : 3 === i32 ? "</math>" : "")), e42]; }; var B2 = class _B { constructor({ strings: t22, _$litType$: i32 }, s22) { let e42; this.parts = []; let h42 = 0, o42 = 0; const n52 = t22.length - 1, r42 = this.parts, [l22, a22] = U(t22, i32); if (this.el = _B.createElement(l22, s22), I2.currentNode = this.el.content, 2 === i32 || 3 === i32) { const t32 = this.el.content.firstChild; t32.replaceWith(...t32.childNodes); } for (; null !== (e42 = I2.nextNode()) && r42.length < n52; ) { if (1 === e42.nodeType) { if (e42.hasAttributes()) for (const t32 of e42.getAttributeNames()) if (t32.endsWith(f22)) { const i42 = a22[o42++], s32 = e42.getAttribute(t32).split(v2), n62 = /([.?@])?(.*)/.exec(i42); r42.push({ type: 1, index: h42, name: n62[2], strings: s32, ctor: "." === n62[1] ? Y : "?" === n62[1] ? Z2 : "@" === n62[1] ? q : G }), e42.removeAttribute(t32); } else t32.startsWith(v2) && (r42.push({ type: 6, index: h42 }), e42.removeAttribute(t32)); if (M2.test(e42.tagName)) { const t32 = e42.textContent.split(v2), i42 = t32.length - 1; if (i42 > 0) { e42.textContent = c32 ? c32.emptyScript : ""; for (let s32 = 0; s32 < i42; s32++) e42.append(t32[s32], lt()), I2.nextNode(), r42.push({ type: 2, index: ++h42 }); e42.append(t32[i42], lt()); } } } else if (8 === e42.nodeType) if (e42.data === m2) r42.push({ type: 2, index: h42 }); else { let t32 = -1; for (; -1 !== (t32 = e42.data.indexOf(v2, t32 + 1)); ) r42.push({ type: 7, index: h42 }), t32 += v2.length - 1; } h42++; } } static createElement(t22, i32) { const s22 = w2.createElement("template"); return s22.innerHTML = t22, s22; } }; function z2(t22, i32, s22 = t22, e42) { if (i32 === R2) return i32; let h42 = void 0 !== e42 ? s22.o?.[e42] : s22.l; const o42 = st(i32) ? void 0 : i32._$litDirective$; return h42?.constructor !== o42 && (h42?._$AO?.(false), void 0 === o42 ? h42 = void 0 : (h42 = new o42(t22), h42._$AT(t22, s22, e42)), void 0 !== e42 ? (s22.o ??= [])[e42] = h42 : s22.l = h42), void 0 !== h42 && (i32 = z2(t22, h42._$AS(t22, i32.values), h42, e42)), i32; } var F = class { constructor(t22, i32) { this._$AV = [], this._$AN = void 0, this._$AD = t22, this._$AM = i32; } get parentNode() { return this._$AM.parentNode; } get _$AU() { return this._$AM._$AU; } u(t22) { const { el: { content: i32 }, parts: s22 } = this._$AD, e42 = (t22?.creationScope ?? w2).importNode(i32, true); I2.currentNode = e42; let h42 = I2.nextNode(), o42 = 0, n52 = 0, r42 = s22[0]; for (; void 0 !== r42; ) { if (o42 === r42.index) { let i42; 2 === r42.type ? i42 = new et(h42, h42.nextSibling, this, t22) : 1 === r42.type ? i42 = new r42.ctor(h42, r42.name, r42.strings, this, t22) : 6 === r42.type && (i42 = new K(h42, this, t22)), this._$AV.push(i42), r42 = s22[++n52]; } o42 !== r42?.index && (h42 = I2.nextNode(), o42++); } return I2.currentNode = w2, e42; } p(t22) { let i32 = 0; for (const s22 of this._$AV) void 0 !== s22 && (void 0 !== s22.strings ? (s22._$AI(t22, s22, i32), i32 += s22.strings.length - 2) : s22._$AI(t22[i32])), i32++; } }; var et = class _et { get _$AU() { return this._$AM?._$AU ?? this.v; } constructor(t22, i32, s22, e42) { this.type = 2, this._$AH = D, this._$AN = void 0, this._$AA = t22, this._$AB = i32, this._$AM = s22, this.options = e42, this.v = e42?.isConnected ?? true; } get parentNode() { let t22 = this._$AA.parentNode; const i32 = this._$AM; return void 0 !== i32 && 11 === t22?.nodeType && (t22 = i32.parentNode), t22; } get startNode() { return this._$AA; } get endNode() { return this._$AB; } _$AI(t22, i32 = this) { t22 = z2(this, t22, i32), st(t22) ? t22 === D || null == t22 || "" === t22 ? (this._$AH !== D && this._$AR(), this._$AH = D) : t22 !== this._$AH && t22 !== R2 && this._(t22) : void 0 !== t22._$litType$ ? this.$(t22) : void 0 !== t22.nodeType ? this.T(t22) : $2(t22) ? this.k(t22) : this._(t22); } O(t22) { return this._$AA.parentNode.insertBefore(t22, this._$AB); } T(t22) { this._$AH !== t22 && (this._$AR(), this._$AH = this.O(t22)); } _(t22) { this._$AH !== D && st(this._$AH) ? this._$AA.nextSibling.data = t22 : this.T(w2.createTextNode(t22)), this._$AH = t22; } $(t22) { const { values: i32, _$litType$: s22 } = t22, e42 = "number" == typeof s22 ? this._$AC(t22) : (void 0 === s22.el && (s22.el = B2.createElement(N2(s22.h, s22.h[0]), this.options)), s22); if (this._$AH?._$AD === e42) this._$AH.p(i32); else { const t32 = new F(e42, this), s32 = t32.u(this.options); t32.p(i32), this.T(s32), this._$AH = t32; } } _$AC(t22) { let i32 = V2.get(t22.strings); return void 0 === i32 && V2.set(t22.strings, i32 = new B2(t22)), i32; } k(t22) { g2(this._$AH) || (this._$AH = [], this._$AR()); const i32 = this._$AH; let s22, e42 = 0; for (const h42 of t22) e42 === i32.length ? i32.push(s22 = new _et(this.O(lt()), this.O(lt()), this, this.options)) : s22 = i32[e42], s22._$AI(h42), e42++; e42 < i32.length && (this._$AR(s22 && s22._$AB.nextSibling, e42), i32.length = e42); } _$AR(t22 = this._$AA.nextSibling, i32) { for (this._$AP?.(false, true, i32); t22 && t22 !== this._$AB; ) { const i42 = t22.nextSibling; t22.remove(), t22 = i42; } } setConnected(t22) { void 0 === this._$AM && (this.v = t22, this._$AP?.(t22)); } }; var G = class { get tagName() { return this.element.tagName; } get _$AU() { return this._$AM._$AU; } constructor(t22, i32, s22, e42, h42) { this.type = 1, this._$AH = D, this._$AN = void 0, this.element = t22, this.name = i32, this._$AM = e42, this.options = h42, s22.length > 2 || "" !== s22[0] || "" !== s22[1] ? (this._$AH = Array(s22.length - 1).fill(new String()), this.strings = s22) : this._$AH = D; } _$AI(t22, i32 = this, s22, e42) { const h42 = this.strings; let o42 = false; if (void 0 === h42) t22 = z2(this, t22, i32, 0), o42 = !st(t22) || t22 !== this._$AH && t22 !== R2, o42 && (this._$AH = t22); else { const e52 = t22; let n52, r42; for (t22 = h42[0], n52 = 0; n52 < h42.length - 1; n52++) r42 = z2(this, e52[s22 + n52], i32, n52), r42 === R2 && (r42 = this._$AH[n52]), o42 ||= !st(r42) || r42 !== this._$AH[n52], r42 === D ? t22 = D : t22 !== D && (t22 += (r42 ?? "") + h42[n52 + 1]), this._$AH[n52] = r42; } o42 && !e42 && this.j(t22); } j(t22) { t22 === D ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t22 ?? ""); } }; var Y = class extends G { constructor() { super(...arguments), this.type = 3; } j(t22) { this.element[this.name] = t22 === D ? void 0 : t22; } }; var Z2 = class extends G { constructor() { super(...arguments), this.type = 4; } j(t22) { this.element.toggleAttribute(this.name, !!t22 && t22 !== D); } }; var q = class extends G { constructor(t22, i32, s22, e42, h42) { super(t22, i32, s22, e42, h42), this.type = 5; } _$AI(t22, i32 = this) { if ((t22 = z2(this, t22, i32, 0) ?? D) === R2) return; const s22 = this._$AH, e42 = t22 === D && s22 !== D || t22.capture !== s22.capture || t22.once !== s22.once || t22.passive !== s22.passive, h42 = t22 !== D && (s22 === D || e42); e42 && this.element.removeEventListener(this.name, this, s22), h42 && this.element.addEventListener(this.name, this, t22), this._$AH = t22; } handleEvent(t22) { "function" == typeof this._$AH ? this._$AH.call(this.options?.host ?? this.element, t22) : this._$AH.handleEvent(t22); } }; var K = class { constructor(t22, i32, s22) { this.element = t22, this.type = 6, this._$AN =