diff --git a/.wireit/6275696c64/cache/28175b20f0bbda381f4d82e225e3ba776c14144c0a5991c3a38b907bf276d2b4/dist/index.js b/.wireit/6275696c64/cache/28175b20f0bbda381f4d82e225e3ba776c14144c0a5991c3a38b907bf276d2b4/dist/index.js deleted file mode 100644 index 55ce130..0000000 --- a/.wireit/6275696c64/cache/28175b20f0bbda381f4d82e225e3ba776c14144c0a5991c3a38b907bf276d2b4/dist/index.js +++ /dev/null @@ -1,1074 +0,0 @@ -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __decorateClass = (decorators, target, key, kind) => { - var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target; - for (var i7 = decorators.length - 1, decorator; i7 >= 0; i7--) - if (decorator = decorators[i7]) - result = (kind ? decorator(target, key, result) : decorator(result)) || result; - if (kind && result) __defProp(target, key, result); - return result; -}; - -// 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(t6, e6, o8) { - if (this._$cssResult$ = true, o8 !== s) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead."); - this.cssText = t6, this.t = e6; - } - get styleSheet() { - let t6 = this.o; - const s4 = this.t; - if (e && void 0 === t6) { - const e6 = void 0 !== s4 && 1 === s4.length; - e6 && (t6 = o.get(s4)), void 0 === t6 && ((this.o = t6 = new CSSStyleSheet()).replaceSync(this.cssText), e6 && o.set(s4, t6)); - } - return t6; - } - toString() { - return this.cssText; - } -}; -var r = (t6) => new n("string" == typeof t6 ? t6 : t6 + "", void 0, s); -var i = (t6, ...e6) => { - const o8 = 1 === t6.length ? t6[0] : e6.reduce((e7, s4, o9) => e7 + ((t7) => { - if (true === t7._$cssResult$) return t7.cssText; - if ("number" == typeof t7) return t7; - throw Error("Value passed to 'css' function must be a 'css' function result: " + t7 + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security."); - })(s4) + t6[o9 + 1], t6[0]); - return new n(o8, t6, s); -}; -var S = (s4, o8) => { - if (e) s4.adoptedStyleSheets = o8.map((t6) => t6 instanceof CSSStyleSheet ? t6 : t6.styleSheet); - else for (const e6 of o8) { - const o9 = document.createElement("style"), n8 = t.litNonce; - void 0 !== n8 && o9.setAttribute("nonce", n8), o9.textContent = e6.cssText, s4.appendChild(o9); - } -}; -var c = e ? (t6) => t6 : (t6) => t6 instanceof CSSStyleSheet ? ((t7) => { - let e6 = ""; - for (const s4 of t7.cssRules) e6 += s4.cssText; - return r(e6); -})(t6) : t6; - -// 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 = (t6, s4) => t6; -var u = { toAttribute(t6, s4) { - switch (s4) { - case Boolean: - t6 = t6 ? l : null; - break; - case Object: - case Array: - t6 = null == t6 ? t6 : JSON.stringify(t6); - } - return t6; -}, fromAttribute(t6, s4) { - let i7 = t6; - switch (s4) { - case Boolean: - i7 = null !== t6; - break; - case Number: - i7 = null === t6 ? null : Number(t6); - break; - case Object: - case Array: - try { - i7 = JSON.parse(t6); - } catch (t7) { - i7 = null; - } - } - return i7; -} }; -var f = (t6, s4) => !i2(t6, s4); -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(t6) { - this._$Ei(), (this.l ??= []).push(t6); - } - static get observedAttributes() { - return this.finalize(), this._$Eh && [...this._$Eh.keys()]; - } - static createProperty(t6, s4 = y) { - if (s4.state && (s4.attribute = false), this._$Ei(), this.elementProperties.set(t6, s4), !s4.noAccessor) { - const i7 = Symbol(), r7 = this.getPropertyDescriptor(t6, i7, s4); - void 0 !== r7 && e2(this.prototype, t6, r7); - } - } - static getPropertyDescriptor(t6, s4, i7) { - const { get: e6, set: h5 } = r2(this.prototype, t6) ?? { get() { - return this[s4]; - }, set(t7) { - this[s4] = t7; - } }; - return { get() { - return e6?.call(this); - }, set(s5) { - const r7 = e6?.call(this); - h5.call(this, s5), this.requestUpdate(t6, r7, i7); - }, configurable: true, enumerable: true }; - } - static getPropertyOptions(t6) { - return this.elementProperties.get(t6) ?? y; - } - static _$Ei() { - if (this.hasOwnProperty(d("elementProperties"))) return; - const t6 = n2(this); - t6.finalize(), void 0 !== t6.l && (this.l = [...t6.l]), this.elementProperties = new Map(t6.elementProperties); - } - static finalize() { - if (this.hasOwnProperty(d("finalized"))) return; - if (this.finalized = true, this._$Ei(), this.hasOwnProperty(d("properties"))) { - const t7 = this.properties, s4 = [...h(t7), ...o2(t7)]; - for (const i7 of s4) this.createProperty(i7, t7[i7]); - } - const t6 = this[Symbol.metadata]; - if (null !== t6) { - const s4 = litPropertyMetadata.get(t6); - if (void 0 !== s4) for (const [t7, i7] of s4) this.elementProperties.set(t7, i7); - } - this._$Eh = /* @__PURE__ */ new Map(); - for (const [t7, s4] of this.elementProperties) { - const i7 = this._$Eu(t7, s4); - void 0 !== i7 && this._$Eh.set(i7, t7); - } - this.elementStyles = this.finalizeStyles(this.styles); - } - static finalizeStyles(s4) { - const i7 = []; - if (Array.isArray(s4)) { - const e6 = new Set(s4.flat(1 / 0).reverse()); - for (const s5 of e6) i7.unshift(c(s5)); - } else void 0 !== s4 && i7.push(c(s4)); - return i7; - } - static _$Eu(t6, s4) { - const i7 = s4.attribute; - return false === i7 ? void 0 : "string" == typeof i7 ? i7 : "string" == typeof t6 ? t6.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((t6) => this.enableUpdating = t6), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach((t6) => t6(this)); - } - addController(t6) { - (this._$EO ??= /* @__PURE__ */ new Set()).add(t6), void 0 !== this.renderRoot && this.isConnected && t6.hostConnected?.(); - } - removeController(t6) { - this._$EO?.delete(t6); - } - _$E_() { - const t6 = /* @__PURE__ */ new Map(), s4 = this.constructor.elementProperties; - for (const i7 of s4.keys()) this.hasOwnProperty(i7) && (t6.set(i7, this[i7]), delete this[i7]); - t6.size > 0 && (this._$Ep = t6); - } - createRenderRoot() { - const t6 = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions); - return S(t6, this.constructor.elementStyles), t6; - } - connectedCallback() { - this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(true), this._$EO?.forEach((t6) => t6.hostConnected?.()); - } - enableUpdating(t6) { - } - disconnectedCallback() { - this._$EO?.forEach((t6) => t6.hostDisconnected?.()); - } - attributeChangedCallback(t6, s4, i7) { - this._$AK(t6, i7); - } - _$EC(t6, s4) { - const i7 = this.constructor.elementProperties.get(t6), e6 = this.constructor._$Eu(t6, i7); - if (void 0 !== e6 && true === i7.reflect) { - const r7 = (void 0 !== i7.converter?.toAttribute ? i7.converter : u).toAttribute(s4, i7.type); - this._$Em = t6, null == r7 ? this.removeAttribute(e6) : this.setAttribute(e6, r7), this._$Em = null; - } - } - _$AK(t6, s4) { - const i7 = this.constructor, e6 = i7._$Eh.get(t6); - if (void 0 !== e6 && this._$Em !== e6) { - const t7 = i7.getPropertyOptions(e6), r7 = "function" == typeof t7.converter ? { fromAttribute: t7.converter } : void 0 !== t7.converter?.fromAttribute ? t7.converter : u; - this._$Em = e6, this[e6] = r7.fromAttribute(s4, t7.type), this._$Em = null; - } - } - requestUpdate(t6, s4, i7) { - if (void 0 !== t6) { - if (i7 ??= this.constructor.getPropertyOptions(t6), !(i7.hasChanged ?? f)(this[t6], s4)) return; - this.P(t6, s4, i7); - } - false === this.isUpdatePending && (this._$ES = this._$ET()); - } - P(t6, s4, i7) { - this._$AL.has(t6) || this._$AL.set(t6, s4), true === i7.reflect && this._$Em !== t6 && (this._$Ej ??= /* @__PURE__ */ new Set()).add(t6); - } - async _$ET() { - this.isUpdatePending = true; - try { - await this._$ES; - } catch (t7) { - Promise.reject(t7); - } - const t6 = this.scheduleUpdate(); - return null != t6 && await t6, !this.isUpdatePending; - } - scheduleUpdate() { - return this.performUpdate(); - } - performUpdate() { - if (!this.isUpdatePending) return; - if (!this.hasUpdated) { - if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) { - for (const [t8, s5] of this._$Ep) this[t8] = s5; - this._$Ep = void 0; - } - const t7 = this.constructor.elementProperties; - if (t7.size > 0) for (const [s5, i7] of t7) true !== i7.wrapped || this._$AL.has(s5) || void 0 === this[s5] || this.P(s5, this[s5], i7); - } - let t6 = false; - const s4 = this._$AL; - try { - t6 = this.shouldUpdate(s4), t6 ? (this.willUpdate(s4), this._$EO?.forEach((t7) => t7.hostUpdate?.()), this.update(s4)) : this._$EU(); - } catch (s5) { - throw t6 = false, this._$EU(), s5; - } - t6 && this._$AE(s4); - } - willUpdate(t6) { - } - _$AE(t6) { - this._$EO?.forEach((t7) => t7.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = true, this.firstUpdated(t6)), this.updated(t6); - } - _$EU() { - this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = false; - } - get updateComplete() { - return this.getUpdateComplete(); - } - getUpdateComplete() { - return this._$ES; - } - shouldUpdate(t6) { - return true; - } - update(t6) { - this._$Ej &&= this._$Ej.forEach((t7) => this._$EC(t7, this[t7])), this._$EU(); - } - updated(t6) { - } - firstUpdated(t6) { - } -}; -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: (t6) => t6 }) : 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 = (t6) => null === t6 || "object" != typeof t6 && "function" != typeof t6; -var a2 = Array.isArray; -var u2 = (t6) => a2(t6) || "function" == typeof t6?.[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 = (t6) => (i7, ...s4) => ({ _$litType$: t6, strings: i7, values: s4 }); -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(t6, i7) { - if (!a2(t6) || !t6.hasOwnProperty("raw")) throw Error("invalid template strings array"); - return void 0 !== s2 ? s2.createHTML(i7) : i7; -} -var V = (t6, i7) => { - const s4 = t6.length - 1, o8 = []; - let r7, l3 = 2 === i7 ? "" : 3 === i7 ? "" : "", c5 = f2; - for (let i8 = 0; i8 < s4; i8++) { - const s5 = t6[i8]; - let a3, u3, d3 = -1, y3 = 0; - for (; y3 < s5.length && (c5.lastIndex = y3, u3 = c5.exec(s5), null !== u3); ) y3 = c5.lastIndex, c5 === f2 ? "!--" === u3[1] ? c5 = v : void 0 !== u3[1] ? c5 = _ : void 0 !== u3[2] ? ($.test(u3[2]) && (r7 = RegExp("" === u3[0] ? (c5 = r7 ?? f2, d3 = -1) : void 0 === u3[1] ? d3 = -2 : (d3 = c5.lastIndex - u3[2].length, a3 = u3[1], c5 = void 0 === u3[3] ? m : '"' === u3[3] ? g : p2) : c5 === g || c5 === p2 ? c5 = m : c5 === v || c5 === _ ? c5 = f2 : (c5 = m, r7 = void 0); - const x2 = c5 === m && t6[i8 + 1].startsWith("/>") ? " " : ""; - l3 += c5 === f2 ? s5 + n3 : d3 >= 0 ? (o8.push(a3), s5.slice(0, d3) + e3 + s5.slice(d3) + h2 + x2) : s5 + h2 + (-2 === d3 ? i8 : x2); - } - return [P(t6, l3 + (t6[s4] || "") + (2 === i7 ? "" : 3 === i7 ? "" : "")), o8]; -}; -var N = class _N { - constructor({ strings: t6, _$litType$: s4 }, n8) { - let r7; - this.parts = []; - let c5 = 0, a3 = 0; - const u3 = t6.length - 1, d3 = this.parts, [f5, v2] = V(t6, s4); - if (this.el = _N.createElement(f5, n8), C.currentNode = this.el.content, 2 === s4 || 3 === s4) { - const t7 = this.el.content.firstChild; - t7.replaceWith(...t7.childNodes); - } - for (; null !== (r7 = C.nextNode()) && d3.length < u3; ) { - if (1 === r7.nodeType) { - if (r7.hasAttributes()) for (const t7 of r7.getAttributeNames()) if (t7.endsWith(e3)) { - const i7 = v2[a3++], s5 = r7.getAttribute(t7).split(h2), e6 = /([.?@])?(.*)/.exec(i7); - d3.push({ type: 1, index: c5, name: e6[2], strings: s5, ctor: "." === e6[1] ? H : "?" === e6[1] ? I : "@" === e6[1] ? L : k }), r7.removeAttribute(t7); - } else t7.startsWith(h2) && (d3.push({ type: 6, index: c5 }), r7.removeAttribute(t7)); - if ($.test(r7.tagName)) { - const t7 = r7.textContent.split(h2), s5 = t7.length - 1; - if (s5 > 0) { - r7.textContent = i3 ? i3.emptyScript : ""; - for (let i7 = 0; i7 < s5; i7++) r7.append(t7[i7], l2()), C.nextNode(), d3.push({ type: 2, index: ++c5 }); - r7.append(t7[s5], l2()); - } - } - } else if (8 === r7.nodeType) if (r7.data === o3) d3.push({ type: 2, index: c5 }); - else { - let t7 = -1; - for (; -1 !== (t7 = r7.data.indexOf(h2, t7 + 1)); ) d3.push({ type: 7, index: c5 }), t7 += h2.length - 1; - } - c5++; - } - } - static createElement(t6, i7) { - const s4 = r3.createElement("template"); - return s4.innerHTML = t6, s4; - } -}; -function S2(t6, i7, s4 = t6, e6) { - if (i7 === T) return i7; - let h5 = void 0 !== e6 ? s4._$Co?.[e6] : s4._$Cl; - const o8 = c3(i7) ? void 0 : i7._$litDirective$; - return h5?.constructor !== o8 && (h5?._$AO?.(false), void 0 === o8 ? h5 = void 0 : (h5 = new o8(t6), h5._$AT(t6, s4, e6)), void 0 !== e6 ? (s4._$Co ??= [])[e6] = h5 : s4._$Cl = h5), void 0 !== h5 && (i7 = S2(t6, h5._$AS(t6, i7.values), h5, e6)), i7; -} -var M = class { - constructor(t6, i7) { - this._$AV = [], this._$AN = void 0, this._$AD = t6, this._$AM = i7; - } - get parentNode() { - return this._$AM.parentNode; - } - get _$AU() { - return this._$AM._$AU; - } - u(t6) { - const { el: { content: i7 }, parts: s4 } = this._$AD, e6 = (t6?.creationScope ?? r3).importNode(i7, true); - C.currentNode = e6; - let h5 = C.nextNode(), o8 = 0, n8 = 0, l3 = s4[0]; - for (; void 0 !== l3; ) { - if (o8 === l3.index) { - let i8; - 2 === l3.type ? i8 = new R(h5, h5.nextSibling, this, t6) : 1 === l3.type ? i8 = new l3.ctor(h5, l3.name, l3.strings, this, t6) : 6 === l3.type && (i8 = new z(h5, this, t6)), this._$AV.push(i8), l3 = s4[++n8]; - } - o8 !== l3?.index && (h5 = C.nextNode(), o8++); - } - return C.currentNode = r3, e6; - } - p(t6) { - let i7 = 0; - for (const s4 of this._$AV) void 0 !== s4 && (void 0 !== s4.strings ? (s4._$AI(t6, s4, i7), i7 += s4.strings.length - 2) : s4._$AI(t6[i7])), i7++; - } -}; -var R = class _R { - get _$AU() { - return this._$AM?._$AU ?? this._$Cv; - } - constructor(t6, i7, s4, e6) { - this.type = 2, this._$AH = E, this._$AN = void 0, this._$AA = t6, this._$AB = i7, this._$AM = s4, this.options = e6, this._$Cv = e6?.isConnected ?? true; - } - get parentNode() { - let t6 = this._$AA.parentNode; - const i7 = this._$AM; - return void 0 !== i7 && 11 === t6?.nodeType && (t6 = i7.parentNode), t6; - } - get startNode() { - return this._$AA; - } - get endNode() { - return this._$AB; - } - _$AI(t6, i7 = this) { - t6 = S2(this, t6, i7), c3(t6) ? t6 === E || null == t6 || "" === t6 ? (this._$AH !== E && this._$AR(), this._$AH = E) : t6 !== this._$AH && t6 !== T && this._(t6) : void 0 !== t6._$litType$ ? this.$(t6) : void 0 !== t6.nodeType ? this.T(t6) : u2(t6) ? this.k(t6) : this._(t6); - } - O(t6) { - return this._$AA.parentNode.insertBefore(t6, this._$AB); - } - T(t6) { - this._$AH !== t6 && (this._$AR(), this._$AH = this.O(t6)); - } - _(t6) { - this._$AH !== E && c3(this._$AH) ? this._$AA.nextSibling.data = t6 : this.T(r3.createTextNode(t6)), this._$AH = t6; - } - $(t6) { - const { values: i7, _$litType$: s4 } = t6, e6 = "number" == typeof s4 ? this._$AC(t6) : (void 0 === s4.el && (s4.el = N.createElement(P(s4.h, s4.h[0]), this.options)), s4); - if (this._$AH?._$AD === e6) this._$AH.p(i7); - else { - const t7 = new M(e6, this), s5 = t7.u(this.options); - t7.p(i7), this.T(s5), this._$AH = t7; - } - } - _$AC(t6) { - let i7 = A.get(t6.strings); - return void 0 === i7 && A.set(t6.strings, i7 = new N(t6)), i7; - } - k(t6) { - a2(this._$AH) || (this._$AH = [], this._$AR()); - const i7 = this._$AH; - let s4, e6 = 0; - for (const h5 of t6) e6 === i7.length ? i7.push(s4 = new _R(this.O(l2()), this.O(l2()), this, this.options)) : s4 = i7[e6], s4._$AI(h5), e6++; - e6 < i7.length && (this._$AR(s4 && s4._$AB.nextSibling, e6), i7.length = e6); - } - _$AR(t6 = this._$AA.nextSibling, i7) { - for (this._$AP?.(false, true, i7); t6 && t6 !== this._$AB; ) { - const i8 = t6.nextSibling; - t6.remove(), t6 = i8; - } - } - setConnected(t6) { - void 0 === this._$AM && (this._$Cv = t6, this._$AP?.(t6)); - } -}; -var k = class { - get tagName() { - return this.element.tagName; - } - get _$AU() { - return this._$AM._$AU; - } - constructor(t6, i7, s4, e6, h5) { - this.type = 1, this._$AH = E, this._$AN = void 0, this.element = t6, this.name = i7, this._$AM = e6, this.options = h5, s4.length > 2 || "" !== s4[0] || "" !== s4[1] ? (this._$AH = Array(s4.length - 1).fill(new String()), this.strings = s4) : this._$AH = E; - } - _$AI(t6, i7 = this, s4, e6) { - const h5 = this.strings; - let o8 = false; - if (void 0 === h5) t6 = S2(this, t6, i7, 0), o8 = !c3(t6) || t6 !== this._$AH && t6 !== T, o8 && (this._$AH = t6); - else { - const e7 = t6; - let n8, r7; - for (t6 = h5[0], n8 = 0; n8 < h5.length - 1; n8++) r7 = S2(this, e7[s4 + n8], i7, n8), r7 === T && (r7 = this._$AH[n8]), o8 ||= !c3(r7) || r7 !== this._$AH[n8], r7 === E ? t6 = E : t6 !== E && (t6 += (r7 ?? "") + h5[n8 + 1]), this._$AH[n8] = r7; - } - o8 && !e6 && this.j(t6); - } - j(t6) { - t6 === E ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t6 ?? ""); - } -}; -var H = class extends k { - constructor() { - super(...arguments), this.type = 3; - } - j(t6) { - this.element[this.name] = t6 === E ? void 0 : t6; - } -}; -var I = class extends k { - constructor() { - super(...arguments), this.type = 4; - } - j(t6) { - this.element.toggleAttribute(this.name, !!t6 && t6 !== E); - } -}; -var L = class extends k { - constructor(t6, i7, s4, e6, h5) { - super(t6, i7, s4, e6, h5), this.type = 5; - } - _$AI(t6, i7 = this) { - if ((t6 = S2(this, t6, i7, 0) ?? E) === T) return; - const s4 = this._$AH, e6 = t6 === E && s4 !== E || t6.capture !== s4.capture || t6.once !== s4.once || t6.passive !== s4.passive, h5 = t6 !== E && (s4 === E || e6); - e6 && this.element.removeEventListener(this.name, this, s4), h5 && this.element.addEventListener(this.name, this, t6), this._$AH = t6; - } - handleEvent(t6) { - "function" == typeof this._$AH ? this._$AH.call(this.options?.host ?? this.element, t6) : this._$AH.handleEvent(t6); - } -}; -var z = class { - constructor(t6, i7, s4) { - this.element = t6, this.type = 6, this._$AN = void 0, this._$AM = i7, this.options = s4; - } - get _$AU() { - return this._$AM._$AU; - } - _$AI(t6) { - S2(this, t6); - } -}; -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 = (t6, i7, s4) => { - const e6 = s4?.renderBefore ?? i7; - let h5 = e6._$litPart$; - if (void 0 === h5) { - const t7 = s4?.renderBefore ?? null; - e6._$litPart$ = h5 = new R(i7.insertBefore(l2(), t7), t7, void 0, s4 ?? {}); - } - return h5._$AI(t6), h5; -}; - -// 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 t6 = super.createRenderRoot(); - return this.renderOptions.renderBefore ??= t6.firstChild, t6; - } - update(t6) { - const s4 = this.render(); - this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t6), this._$Do = B(s4, 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/@lit/reactive-element/decorators/custom-element.js -var t3 = (t6) => (e6, o8) => { - void 0 !== o8 ? o8.addInitializer(() => { - customElements.define(t6, e6); - }) : customElements.define(t6, e6); -}; - -// node_modules/@lit/reactive-element/decorators/property.js -var o4 = { attribute: true, type: String, converter: u, reflect: false, hasChanged: f }; -var r5 = (t6 = o4, e6, r7) => { - const { kind: n8, metadata: i7 } = r7; - let s4 = globalThis.litPropertyMetadata.get(i7); - if (void 0 === s4 && globalThis.litPropertyMetadata.set(i7, s4 = /* @__PURE__ */ new Map()), s4.set(r7.name, t6), "accessor" === n8) { - const { name: o8 } = r7; - return { set(r8) { - const n9 = e6.get.call(this); - e6.set.call(this, r8), this.requestUpdate(o8, n9, t6); - }, init(e7) { - return void 0 !== e7 && this.P(o8, void 0, t6), e7; - } }; - } - if ("setter" === n8) { - const { name: o8 } = r7; - return function(r8) { - const n9 = this[o8]; - e6.call(this, r8), this.requestUpdate(o8, n9, t6); - }; - } - throw Error("Unsupported decorator location: " + n8); -}; -function n4(t6) { - return (e6, o8) => "object" == typeof o8 ? r5(t6, e6, o8) : ((t7, e7, o9) => { - const r7 = e7.hasOwnProperty(o9); - return e7.constructor.createProperty(o9, r7 ? { ...t7, wrapped: true } : t7), r7 ? Object.getOwnPropertyDescriptor(e7, o9) : void 0; - })(t6, e6, o8); -} - -// node_modules/lit-html/directive.js -var t4 = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }; -var e4 = (t6) => (...e6) => ({ _$litDirective$: t6, values: e6 }); -var i5 = class { - constructor(t6) { - } - get _$AU() { - return this._$AM._$AU; - } - _$AT(t6, e6, i7) { - this._$Ct = t6, this._$AM = e6, this._$Ci = i7; - } - _$AS(t6, e6) { - return this.update(t6, e6); - } - update(t6, e6) { - return this.render(...e6); - } -}; - -// node_modules/lit-html/directives/style-map.js -var n5 = "important"; -var i6 = " !" + n5; -var o5 = e4(class extends i5 { - constructor(t6) { - if (super(t6), t6.type !== t4.ATTRIBUTE || "style" !== t6.name || t6.strings?.length > 2) throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute."); - } - render(t6) { - return Object.keys(t6).reduce((e6, r7) => { - const s4 = t6[r7]; - return null == s4 ? e6 : e6 + `${r7 = r7.includes("-") ? r7 : r7.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g, "-$&").toLowerCase()}:${s4};`; - }, ""); - } - update(e6, [r7]) { - const { style: s4 } = e6.element; - if (void 0 === this.ft) return this.ft = new Set(Object.keys(r7)), this.render(r7); - for (const t6 of this.ft) null == r7[t6] && (this.ft.delete(t6), t6.includes("-") ? s4.removeProperty(t6) : s4[t6] = null); - for (const t6 in r7) { - const e7 = r7[t6]; - if (null != e7) { - this.ft.add(t6); - const r8 = "string" == typeof e7 && e7.endsWith(i6); - t6.includes("-") || r8 ? s4.setProperty(t6, r8 ? e7.slice(0, -11) : e7, r8 ? n5 : "") : s4[t6] = e7; - } - } - return T; - } -}); - -// node_modules/lit-html/directive-helpers.js -var { I: t5 } = Z; -var f3 = (o8) => void 0 === o8.strings; - -// node_modules/lit-html/async-directive.js -var s3 = (i7, t6) => { - const e6 = i7._$AN; - if (void 0 === e6) return false; - for (const i8 of e6) i8._$AO?.(t6, false), s3(i8, t6); - return true; -}; -var o6 = (i7) => { - let t6, e6; - do { - if (void 0 === (t6 = i7._$AM)) break; - e6 = t6._$AN, e6.delete(i7), i7 = t6; - } while (0 === e6?.size); -}; -var r6 = (i7) => { - for (let t6; t6 = i7._$AM; i7 = t6) { - let e6 = t6._$AN; - if (void 0 === e6) t6._$AN = e6 = /* @__PURE__ */ new Set(); - else if (e6.has(i7)) break; - e6.add(i7), c4(t6); - } -}; -function h3(i7) { - void 0 !== this._$AN ? (o6(this), this._$AM = i7, r6(this)) : this._$AM = i7; -} -function n6(i7, t6 = false, e6 = 0) { - const r7 = this._$AH, h5 = this._$AN; - if (void 0 !== h5 && 0 !== h5.size) if (t6) if (Array.isArray(r7)) for (let i8 = e6; i8 < r7.length; i8++) s3(r7[i8], false), o6(r7[i8]); - else null != r7 && (s3(r7, false), o6(r7)); - else s3(this, i7); -} -var c4 = (i7) => { - i7.type == t4.CHILD && (i7._$AP ??= n6, i7._$AQ ??= h3); -}; -var f4 = class extends i5 { - constructor() { - super(...arguments), this._$AN = void 0; - } - _$AT(i7, t6, e6) { - super._$AT(i7, t6, e6), r6(this), this.isConnected = i7._$AU; - } - _$AO(i7, t6 = true) { - i7 !== this.isConnected && (this.isConnected = i7, i7 ? this.reconnected?.() : this.disconnected?.()), t6 && (s3(this, i7), o6(this)); - } - setValue(t6) { - if (f3(this._$Ct)) this._$Ct._$AI(t6, this); - else { - const i7 = [...this._$Ct._$AH]; - i7[this._$Ci] = t6, this._$Ct._$AI(i7, this, 0); - } - } - disconnected() { - } - reconnected() { - } -}; - -// node_modules/lit-html/directives/ref.js -var e5 = () => new h4(); -var h4 = class { -}; -var o7 = /* @__PURE__ */ new WeakMap(); -var n7 = e4(class extends f4 { - render(i7) { - return E; - } - update(i7, [s4]) { - const e6 = s4 !== this.Y; - return e6 && void 0 !== this.Y && this.rt(void 0), (e6 || this.lt !== this.ct) && (this.Y = s4, this.ht = i7.options?.host, this.rt(this.ct = i7.element)), E; - } - rt(t6) { - if (this.isConnected || (t6 = void 0), "function" == typeof this.Y) { - const i7 = this.ht ?? globalThis; - let s4 = o7.get(i7); - void 0 === s4 && (s4 = /* @__PURE__ */ new WeakMap(), o7.set(i7, s4)), void 0 !== s4.get(this.Y) && this.Y.call(this.ht, void 0), s4.set(this.Y, t6), void 0 !== t6 && this.Y.call(this.ht, t6); - } else this.Y.value = t6; - } - get lt() { - return "function" == typeof this.Y ? o7.get(this.ht ?? globalThis)?.get(this.Y) : this.Y?.value; - } - disconnected() { - this.lt === this.ct && this.rt(void 0); - } - reconnected() { - this.rt(this.ct); - } -}); - -// src/lit-events.ts -var LitDragStart = class _LitDragStart extends Event { - // container: HTMLElement; - constructor(source) { - super(_LitDragStart.eventName, { bubbles: true, composed: true }); - this.offsetX = 0; - this.offsetY = 0; - this.offsetX = source.translateX; - this.offsetY = source.translateY; - this.node = source.host; - } - static { - this.eventName = "lit-drag-start"; - } -}; -var LitDragging = class _LitDragging extends Event { - // container: HTMLElement; - constructor(source) { - super(_LitDragging.eventName, { bubbles: true, composed: true }); - this.offsetX = 0; - this.offsetY = 0; - this.offsetX = source.translateX; - this.offsetY = source.translateY; - this.node = source.host; - } - static { - this.eventName = "lit-dragging"; - } -}; -var LitDragEnd = class _LitDragEnd extends Event { - // container: HTMLElement; - constructor(source) { - super(_LitDragEnd.eventName, { bubbles: true, composed: true }); - this.offsetX = 0; - this.offsetY = 0; - this.offsetX = source.initialX; - this.offsetY = source.initialY; - this.node = source.host; - } - static { - this.eventName = "lit-drag-end"; - } -}; - -// src/lit-draggable.ts -var defaultOptions = { - preventSelect: true -}; -var LitDraggable = class { - constructor(host, options = defaultOptions) { - this.translateX = 0; - this.translateY = 0; - this.initialX = 0; - this.initialY = 0; - this.handleOffsetX = 0; - this.handleOffsetY = 0; - this.dragging = false; - this.pointers = /* @__PURE__ */ new Set(); - (this.host = host).addController(this); - this.options = options; - this.dragStart = this.dragStart.bind(this); - this.drag = this.drag.bind(this); - this.dragEnd = this.dragEnd.bind(this); - } - // TODO: Make this work with a handle, which will be a `ref` object. - hostConnected() { - console.log(this.host); - this.host.addEventListener("pointerdown", this.dragStart); - } - hostDisconnected() { - this.host.removeEventListener("pointerdown", this.dragStart); - } - dragStart(ev) { - if (ev.button === 2) { - return; - } - document.addEventListener("pointerup", this.dragEnd); - document.addEventListener("pointermove", this.drag); - const event_target = ev.composedPath()[0]; - if (!(event_target === this.host || this.host.shadowRoot?.contains(event_target))) { - console.log("HUH?"); - return; - } - this.pointers.add(ev.pointerId); - this.dragging = true; - if (this.options.preventSelect) { - this.currentSelect = document.body.style.userSelect; - document.body.style.userSelect = "none"; - } - const hostRect = this.host.getBoundingClientRect(); - this.initialX = ev.clientX; - this.initialY = ev.clientY; - this.handleOffsetX = this.initialX - hostRect.left; - this.handleOffsetY = this.initialY - hostRect.top; - this.host.dataset.litDrag = "true"; - this.host.dispatchEvent(new LitDragStart(this)); - } - drag(ev) { - if (!this.dragging || !this.pointers.has(ev.pointerId)) { - return; - } - this.host.dataset.litDragging = "true"; - ev.preventDefault(); - this.translateX = ev.clientX - this.initialX; - this.translateY = ev.clientY - this.initialY; - this.host.dispatchEvent(new LitDragging(this)); - this.host.style.setProperty("transform", `translate3d(${+this.translateX}px, ${+this.translateY}px, 0)`); - } - dragEnd(ev) { - document.removeEventListener("pointerup", this.dragEnd); - document.removeEventListener("pointermove", this.drag); - if (!this.dragging || !this.pointers.has(ev.pointerId)) { - return; - } - this.pointers.delete(ev.pointerId); - this.dragging = false; - delete this.host.dataset.litDrag; - delete this.host.dataset.litDragging; - if (this.currentSelect) { - document.body.style.userSelect = this.currentSelect; - this.currentSelect = void 0; - } - this.initialX = ev.clientX - this.handleOffsetX; - this.initialY = ev.clientY - this.handleOffsetY; - this.host.dispatchEvent(new LitDragEnd(this)); - this.host.style.removeProperty("transform"); - } -}; - -// src/fridge-tile.ts -var FridgeTile = class extends r4 { - constructor() { - super(); - this.word = ""; - this.transform = { - rotate: Math.random() * 30 - 15, - scale: 1 - }; - this.handle = e5(); - this.dragHandle = new LitDraggable(this); - this.onDragEnd = this.onDragEnd.bind(this); - this.onDragStart = this.onDragStart.bind(this); - this.addEventListener(LitDragEnd.eventName, this.onDragEnd); - this.addEventListener(LitDragStart.eventName, this.onDragStart); - } - static get styles() { - return i` - :host { - display: block; - position: absolute; - } - - :host([data-dragging="idle"]) { - cursor: grab; - } - - :host([data-dragging="dragging"]) { - cursor: grabbing; - } - - .word { - font-family: Georgia, Palatino, "Palatino Linotype", Times, "Times New Roman", serif; - box-shadow: 0 0 0.375rem 0.125rem #aaa; - text-align: center; - user-select: none; - cursor: pointer; - color: #444; - font-size: 0.9375rem; - padding: 0.1875rem 0.25rem 0.25rem 0.25rem; - position: relative; - background: white; - z-index: 100; - transition-property: transform; - transition-duration: 200ms; - transition-timing-function: ease-in-out; //other options are ease - } - - .word.dragging { - font-size: 1.1875rem; - } - `; - } - onDragEnd(ev) { - this.transform = { scale: 1, rotate: Math.random() * 30 - 15 }; - this.handle.value.style.setProperty( - "transform", - `scale(${+this.transform.scale}) rotate(${+this.transform.rotate}deg)` - ); - this.style.setProperty("top", `${+ev.offsetY}px`); - this.style.setProperty("left", `${+ev.offsetX}px`); - } - onDragStart(_ev) { - this.transform = { scale: 1.3, rotate: Math.random() * 30 - 15 }; - this.handle.value.style.setProperty( - "transform", - `scale(${+this.transform.scale}) rotate(${+this.transform.rotate}deg)` - ); - } - render() { - const styles = { - width: `${this.word.length}ch`, - transform: `rotate(${this.transform.rotate}deg)` - }; - return x`
${this.word}
`; - } -}; -__decorateClass([ - n4({ type: String }) -], FridgeTile.prototype, "word", 2); -FridgeTile = __decorateClass([ - t3("fridge-tile") -], FridgeTile); - -// src/fridge-magnets.ts -var FridgeMagnets = class extends r4 { - static get styles() { - return i` - :host { - display: block; - } - #fridgemagnets { - width: 100%; - height: 100%; - display: grid; - grid-template-rows: 100fr 18ex; - } - - #fridge { - overflow: hidden; - position: relative; - width: 100%; - background: url("./dist/pingbg.png") repeat; - } - - #footer { - background-color: #32cd32; - width: 100%; - height: 18ex; - } - `; - } - render() { - return x`
-
- -
- -
`; - } -}; -FridgeMagnets = __decorateClass([ - t3("fridge-magnets") -], FridgeMagnets); -/*! Bundled license information: - -@lit/reactive-element/css-tag.js: - (** - * @license - * Copyright 2019 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - *) - -@lit/reactive-element/reactive-element.js: - (** - * @license - * Copyright 2017 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - *) - -lit-html/lit-html.js: - (** - * @license - * Copyright 2017 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - *) - -lit-element/lit-element.js: - (** - * @license - * Copyright 2017 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - *) - -lit-html/is-server.js: - (** - * @license - * Copyright 2022 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - *) - -@lit/reactive-element/decorators/custom-element.js: - (** - * @license - * Copyright 2017 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - *) - -@lit/reactive-element/decorators/property.js: - (** - * @license - * Copyright 2017 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - *) - -lit-html/directive.js: - (** - * @license - * Copyright 2017 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - *) - -lit-html/directives/style-map.js: - (** - * @license - * Copyright 2018 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - *) - -lit-html/directive-helpers.js: - (** - * @license - * Copyright 2020 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - *) - -lit-html/async-directive.js: - (** - * @license - * Copyright 2017 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - *) - -lit-html/directives/ref.js: - (** - * @license - * Copyright 2020 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - *) -*/ -//# sourceMappingURL=index.js.map diff --git a/.wireit/6275696c64/cache/28175b20f0bbda381f4d82e225e3ba776c14144c0a5991c3a38b907bf276d2b4/dist/index.js.map b/.wireit/6275696c64/cache/28175b20f0bbda381f4d82e225e3ba776c14144c0a5991c3a38b907bf276d2b4/dist/index.js.map deleted file mode 100644 index 9e73aaf..0000000 --- a/.wireit/6275696c64/cache/28175b20f0bbda381f4d82e225e3ba776c14144c0a5991c3a38b907bf276d2b4/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../node_modules/@lit/reactive-element/src/css-tag.ts", "../node_modules/@lit/reactive-element/src/reactive-element.ts", "../node_modules/lit-html/src/lit-html.ts", "../node_modules/lit-element/src/lit-element.ts", "../node_modules/@lit/reactive-element/src/decorators/custom-element.ts", "../node_modules/@lit/reactive-element/src/decorators/property.ts", "../node_modules/lit-html/src/directive.ts", "../node_modules/lit-html/src/directives/style-map.ts", "../node_modules/lit-html/src/directive-helpers.ts", "../node_modules/lit-html/src/async-directive.ts", "../node_modules/lit-html/src/directives/ref.ts", "../src/lit-events.ts", "../src/lit-draggable.ts", "../src/fridge-tile.ts", "../src/fridge-magnets.ts"], - "sourcesContent": ["/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nconst NODE_MODE = false;\n\n// Allows minifiers to rename references to globalThis\nconst global = globalThis;\n\n/**\n * Whether the current browser supports `adoptedStyleSheets`.\n */\nexport const supportsAdoptingStyleSheets: boolean =\n global.ShadowRoot &&\n (global.ShadyCSS === undefined || global.ShadyCSS.nativeShadow) &&\n 'adoptedStyleSheets' in Document.prototype &&\n 'replace' in CSSStyleSheet.prototype;\n\n/**\n * A CSSResult or native CSSStyleSheet.\n *\n * In browsers that support constructible CSS style sheets, CSSStyleSheet\n * object can be used for styling along side CSSResult from the `css`\n * template tag.\n */\nexport type CSSResultOrNative = CSSResult | CSSStyleSheet;\n\nexport type CSSResultArray = Array;\n\n/**\n * A single CSSResult, CSSStyleSheet, or an array or nested arrays of those.\n */\nexport type CSSResultGroup = CSSResultOrNative | CSSResultArray;\n\nconst constructionToken = Symbol();\n\nconst cssTagCache = new WeakMap();\n\n/**\n * A container for a string of CSS text, that may be used to create a CSSStyleSheet.\n *\n * CSSResult is the return value of `css`-tagged template literals and\n * `unsafeCSS()`. In order to ensure that CSSResults are only created via the\n * `css` tag and `unsafeCSS()`, CSSResult cannot be constructed directly.\n */\nexport class CSSResult {\n // This property needs to remain unminified.\n ['_$cssResult$'] = true;\n readonly cssText: string;\n private _styleSheet?: CSSStyleSheet;\n private _strings: TemplateStringsArray | undefined;\n\n private constructor(\n cssText: string,\n strings: TemplateStringsArray | undefined,\n safeToken: symbol\n ) {\n if (safeToken !== constructionToken) {\n throw new Error(\n 'CSSResult is not constructable. Use `unsafeCSS` or `css` instead.'\n );\n }\n this.cssText = cssText;\n this._strings = strings;\n }\n\n // This is a getter so that it's lazy. In practice, this means stylesheets\n // are not created until the first element instance is made.\n get styleSheet(): CSSStyleSheet | undefined {\n // If `supportsAdoptingStyleSheets` is true then we assume CSSStyleSheet is\n // constructable.\n let styleSheet = this._styleSheet;\n const strings = this._strings;\n if (supportsAdoptingStyleSheets && styleSheet === undefined) {\n const cacheable = strings !== undefined && strings.length === 1;\n if (cacheable) {\n styleSheet = cssTagCache.get(strings);\n }\n if (styleSheet === undefined) {\n (this._styleSheet = styleSheet = new CSSStyleSheet()).replaceSync(\n this.cssText\n );\n if (cacheable) {\n cssTagCache.set(strings, styleSheet);\n }\n }\n }\n return styleSheet;\n }\n\n toString(): string {\n return this.cssText;\n }\n}\n\ntype ConstructableCSSResult = CSSResult & {\n new (\n cssText: string,\n strings: TemplateStringsArray | undefined,\n safeToken: symbol\n ): CSSResult;\n};\n\nconst textFromCSSResult = (value: CSSResultGroup | number) => {\n // This property needs to remain unminified.\n if ((value as CSSResult)['_$cssResult$'] === true) {\n return (value as CSSResult).cssText;\n } else if (typeof value === 'number') {\n return value;\n } else {\n throw new Error(\n `Value passed to 'css' function must be a 'css' function result: ` +\n `${value}. Use 'unsafeCSS' to pass non-literal values, but take care ` +\n `to ensure page security.`\n );\n }\n};\n\n/**\n * Wrap a value for interpolation in a {@linkcode css} tagged template literal.\n *\n * This is unsafe because untrusted CSS text can be used to phone home\n * or exfiltrate data to an attacker controlled site. Take care to only use\n * this with trusted input.\n */\nexport const unsafeCSS = (value: unknown) =>\n new (CSSResult as ConstructableCSSResult)(\n typeof value === 'string' ? value : String(value),\n undefined,\n constructionToken\n );\n\n/**\n * A template literal tag which can be used with LitElement's\n * {@linkcode LitElement.styles} property to set element styles.\n *\n * For security reasons, only literal string values and number may be used in\n * embedded expressions. To incorporate non-literal values {@linkcode unsafeCSS}\n * may be used inside an expression.\n */\nexport const css = (\n strings: TemplateStringsArray,\n ...values: (CSSResultGroup | number)[]\n): CSSResult => {\n const cssText =\n strings.length === 1\n ? strings[0]\n : values.reduce(\n (acc, v, idx) => acc + textFromCSSResult(v) + strings[idx + 1],\n strings[0]\n );\n return new (CSSResult as ConstructableCSSResult)(\n cssText,\n strings,\n constructionToken\n );\n};\n\n/**\n * Applies the given styles to a `shadowRoot`. When Shadow DOM is\n * available but `adoptedStyleSheets` is not, styles are appended to the\n * `shadowRoot` to [mimic spec behavior](https://wicg.github.io/construct-stylesheets/#using-constructed-stylesheets).\n * Note, when shimming is used, any styles that are subsequently placed into\n * the shadowRoot should be placed *before* any shimmed adopted styles. This\n * will match spec behavior that gives adopted sheets precedence over styles in\n * shadowRoot.\n */\nexport const adoptStyles = (\n renderRoot: ShadowRoot,\n styles: Array\n) => {\n if (supportsAdoptingStyleSheets) {\n (renderRoot as ShadowRoot).adoptedStyleSheets = styles.map((s) =>\n s instanceof CSSStyleSheet ? s : s.styleSheet!\n );\n } else {\n for (const s of styles) {\n const style = document.createElement('style');\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const nonce = (global as any)['litNonce'];\n if (nonce !== undefined) {\n style.setAttribute('nonce', nonce);\n }\n style.textContent = (s as CSSResult).cssText;\n renderRoot.appendChild(style);\n }\n }\n};\n\nconst cssResultFromStyleSheet = (sheet: CSSStyleSheet) => {\n let cssText = '';\n for (const rule of sheet.cssRules) {\n cssText += rule.cssText;\n }\n return unsafeCSS(cssText);\n};\n\nexport const getCompatibleStyle =\n supportsAdoptingStyleSheets ||\n (NODE_MODE && global.CSSStyleSheet === undefined)\n ? (s: CSSResultOrNative) => s\n : (s: CSSResultOrNative) =>\n s instanceof CSSStyleSheet ? cssResultFromStyleSheet(s) : s;\n", "/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/**\n * Use this module if you want to create your own base class extending\n * {@link ReactiveElement}.\n * @packageDocumentation\n */\n\nimport {\n getCompatibleStyle,\n adoptStyles,\n CSSResultGroup,\n CSSResultOrNative,\n} from './css-tag.js';\nimport type {\n ReactiveController,\n ReactiveControllerHost,\n} from './reactive-controller.js';\n\n// In the Node build, this import will be injected by Rollup:\n// import {HTMLElement, customElements} from '@lit-labs/ssr-dom-shim';\n\nexport * from './css-tag.js';\nexport type {\n ReactiveController,\n ReactiveControllerHost,\n} from './reactive-controller.js';\n\n/**\n * Removes the `readonly` modifier from properties in the union K.\n *\n * This is a safer way to cast a value to a type with a mutable version of a\n * readonly field, than casting to an interface with the field re-declared\n * because it preserves the type of all the fields and warns on typos.\n */\ntype Mutable = Omit & {\n -readonly [P in keyof Pick]: P extends K ? T[P] : never;\n};\n\n// TODO (justinfagnani): Add `hasOwn` here when we ship ES2022\nconst {\n is,\n defineProperty,\n getOwnPropertyDescriptor,\n getOwnPropertyNames,\n getOwnPropertySymbols,\n getPrototypeOf,\n} = Object;\n\nconst NODE_MODE = false;\n\n// Lets a minifier replace globalThis references with a minified name\nconst global = globalThis;\n\nif (NODE_MODE) {\n global.customElements ??= customElements;\n}\n\nconst DEV_MODE = true;\n\nlet issueWarning: (code: string, warning: string) => void;\n\nconst trustedTypes = (global as unknown as {trustedTypes?: {emptyScript: ''}})\n .trustedTypes;\n\n// Temporary workaround for https://crbug.com/993268\n// Currently, any attribute starting with \"on\" is considered to be a\n// TrustedScript source. Such boolean attributes must be set to the equivalent\n// trusted emptyScript value.\nconst emptyStringForBooleanAttribute = trustedTypes\n ? (trustedTypes.emptyScript as unknown as '')\n : '';\n\nconst polyfillSupport = DEV_MODE\n ? global.reactiveElementPolyfillSupportDevMode\n : global.reactiveElementPolyfillSupport;\n\nif (DEV_MODE) {\n // Ensure warnings are issued only 1x, even if multiple versions of Lit\n // are loaded.\n const issuedWarnings: Set = (global.litIssuedWarnings ??=\n new Set());\n\n // Issue a warning, if we haven't already.\n issueWarning = (code: string, warning: string) => {\n warning += ` See https://lit.dev/msg/${code} for more information.`;\n if (!issuedWarnings.has(warning)) {\n console.warn(warning);\n issuedWarnings.add(warning);\n }\n };\n\n issueWarning(\n 'dev-mode',\n `Lit is in dev mode. Not recommended for production!`\n );\n\n // Issue polyfill support warning.\n if (global.ShadyDOM?.inUse && polyfillSupport === undefined) {\n issueWarning(\n 'polyfill-support-missing',\n `Shadow DOM is being polyfilled via \\`ShadyDOM\\` but ` +\n `the \\`polyfill-support\\` module has not been loaded.`\n );\n }\n}\n\n/**\n * Contains types that are part of the unstable debug API.\n *\n * Everything in this API is not stable and may change or be removed in the future,\n * even on patch releases.\n */\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace ReactiveUnstable {\n /**\n * When Lit is running in dev mode and `window.emitLitDebugLogEvents` is true,\n * we will emit 'lit-debug' events to window, with live details about the update and render\n * lifecycle. These can be useful for writing debug tooling and visualizations.\n *\n * Please be aware that running with window.emitLitDebugLogEvents has performance overhead,\n * making certain operations that are normally very cheap (like a no-op render) much slower,\n * because we must copy data and dispatch events.\n */\n // eslint-disable-next-line @typescript-eslint/no-namespace\n export namespace DebugLog {\n export type Entry = Update;\n export interface Update {\n kind: 'update';\n }\n }\n}\n\ninterface DebugLoggingWindow {\n // Even in dev mode, we generally don't want to emit these events, as that's\n // another level of cost, so only emit them when DEV_MODE is true _and_ when\n // window.emitLitDebugEvents is true.\n emitLitDebugLogEvents?: boolean;\n}\n\n/**\n * Useful for visualizing and logging insights into what the Lit template system is doing.\n *\n * Compiled out of prod mode builds.\n */\nconst debugLogEvent = DEV_MODE\n ? (event: ReactiveUnstable.DebugLog.Entry) => {\n const shouldEmit = (global as unknown as DebugLoggingWindow)\n .emitLitDebugLogEvents;\n if (!shouldEmit) {\n return;\n }\n global.dispatchEvent(\n new CustomEvent('lit-debug', {\n detail: event,\n })\n );\n }\n : undefined;\n\n/*\n * When using Closure Compiler, JSCompiler_renameProperty(property, object) is\n * replaced at compile time by the munged name for object[property]. We cannot\n * alias this function, so we have to use a small shim that has the same\n * behavior when not compiling.\n */\n/*@__INLINE__*/\nconst JSCompiler_renameProperty =

(\n prop: P,\n _obj: unknown\n): P => prop;\n\n/**\n * Converts property values to and from attribute values.\n */\nexport interface ComplexAttributeConverter {\n /**\n * Called to convert an attribute value to a property\n * value.\n */\n fromAttribute?(value: string | null, type?: TypeHint): Type;\n\n /**\n * Called to convert a property value to an attribute\n * value.\n *\n * It returns unknown instead of string, to be compatible with\n * https://github.com/WICG/trusted-types (and similar efforts).\n */\n toAttribute?(value: Type, type?: TypeHint): unknown;\n}\n\ntype AttributeConverter =\n | ComplexAttributeConverter\n | ((value: string | null, type?: TypeHint) => Type);\n\n/**\n * Defines options for a property accessor.\n */\nexport interface PropertyDeclaration {\n /**\n * When set to `true`, indicates the property is internal private state. The\n * property should not be set by users. When using TypeScript, this property\n * should be marked as `private` or `protected`, and it is also a common\n * practice to use a leading `_` in the name. The property is not added to\n * `observedAttributes`.\n */\n readonly state?: boolean;\n\n /**\n * Indicates how and whether the property becomes an observed attribute.\n * If the value is `false`, the property is not added to `observedAttributes`.\n * If true or absent, the lowercased property name is observed (e.g. `fooBar`\n * becomes `foobar`). If a string, the string value is observed (e.g\n * `attribute: 'foo-bar'`).\n */\n readonly attribute?: boolean | string;\n\n /**\n * Indicates the type of the property. This is used only as a hint for the\n * `converter` to determine how to convert the attribute\n * to/from a property.\n */\n readonly type?: TypeHint;\n\n /**\n * Indicates how to convert the attribute to/from a property. If this value\n * is a function, it is used to convert the attribute value a the property\n * value. If it's an object, it can have keys for `fromAttribute` and\n * `toAttribute`. If no `toAttribute` function is provided and\n * `reflect` is set to `true`, the property value is set directly to the\n * attribute. A default `converter` is used if none is provided; it supports\n * `Boolean`, `String`, `Number`, `Object`, and `Array`. Note,\n * when a property changes and the converter is used to update the attribute,\n * the property is never updated again as a result of the attribute changing,\n * and vice versa.\n */\n readonly converter?: AttributeConverter;\n\n /**\n * Indicates if the property should reflect to an attribute.\n * If `true`, when the property is set, the attribute is set using the\n * attribute name determined according to the rules for the `attribute`\n * property option and the value of the property converted using the rules\n * from the `converter` property option.\n */\n readonly reflect?: boolean;\n\n /**\n * A function that indicates if a property should be considered changed when\n * it is set. The function should take the `newValue` and `oldValue` and\n * return `true` if an update should be requested.\n */\n hasChanged?(value: Type, oldValue: Type): boolean;\n\n /**\n * Indicates whether an accessor will be created for this property. By\n * default, an accessor will be generated for this property that requests an\n * update when set. If this flag is `true`, no accessor will be created, and\n * it will be the user's responsibility to call\n * `this.requestUpdate(propertyName, oldValue)` to request an update when\n * the property changes.\n */\n readonly noAccessor?: boolean;\n\n /**\n * Whether this property is wrapping accessors. This is set by `@property`\n * to control the initial value change and reflection logic.\n *\n * @internal\n */\n wrapped?: boolean;\n}\n\n/**\n * Map of properties to PropertyDeclaration options. For each property an\n * accessor is made, and the property is processed according to the\n * PropertyDeclaration options.\n */\nexport interface PropertyDeclarations {\n readonly [key: string]: PropertyDeclaration;\n}\n\ntype PropertyDeclarationMap = Map;\n\ntype AttributeMap = Map;\n\n/**\n * A Map of property keys to values.\n *\n * Takes an optional type parameter T, which when specified as a non-any,\n * non-unknown type, will make the Map more strongly-typed, associating the map\n * keys with their corresponding value type on T.\n *\n * Use `PropertyValues` when overriding ReactiveElement.update() and\n * other lifecycle methods in order to get stronger type-checking on keys\n * and values.\n */\n// This type is conditional so that if the parameter T is not specified, or\n// is `any`, the type will include `Map`. Since T is not\n// given in the uses of PropertyValues in this file, all uses here fallback to\n// meaning `Map`, but if a developer uses\n// `PropertyValues` (or any other value for T) they will get a\n// strongly-typed Map type.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type PropertyValues = T extends object\n ? PropertyValueMap\n : Map;\n\n/**\n * Do not use, instead prefer {@linkcode PropertyValues}.\n */\n// This type must be exported such that JavaScript generated by the Google\n// Closure Compiler can import a type reference.\nexport interface PropertyValueMap extends Map {\n get(k: K): T[K] | undefined;\n set(key: K, value: T[K]): this;\n has(k: K): boolean;\n delete(k: K): boolean;\n}\n\nexport const defaultConverter: ComplexAttributeConverter = {\n toAttribute(value: unknown, type?: unknown): unknown {\n switch (type) {\n case Boolean:\n value = value ? emptyStringForBooleanAttribute : null;\n break;\n case Object:\n case Array:\n // if the value is `null` or `undefined` pass this through\n // to allow removing/no change behavior.\n value = value == null ? value : JSON.stringify(value);\n break;\n }\n return value;\n },\n\n fromAttribute(value: string | null, type?: unknown) {\n let fromValue: unknown = value;\n switch (type) {\n case Boolean:\n fromValue = value !== null;\n break;\n case Number:\n fromValue = value === null ? null : Number(value);\n break;\n case Object:\n case Array:\n // Do *not* generate exception when invalid JSON is set as elements\n // don't normally complain on being mis-configured.\n // TODO(sorvell): Do generate exception in *dev mode*.\n try {\n // Assert to adhere to Bazel's \"must type assert JSON parse\" rule.\n fromValue = JSON.parse(value!) as unknown;\n } catch (e) {\n fromValue = null;\n }\n break;\n }\n return fromValue;\n },\n};\n\nexport interface HasChanged {\n (value: unknown, old: unknown): boolean;\n}\n\n/**\n * Change function that returns true if `value` is different from `oldValue`.\n * This method is used as the default for a property's `hasChanged` function.\n */\nexport const notEqual: HasChanged = (value: unknown, old: unknown): boolean =>\n !is(value, old);\n\nconst defaultPropertyDeclaration: PropertyDeclaration = {\n attribute: true,\n type: String,\n converter: defaultConverter,\n reflect: false,\n hasChanged: notEqual,\n};\n\n/**\n * A string representing one of the supported dev mode warning categories.\n */\nexport type WarningKind =\n | 'change-in-update'\n | 'migration'\n | 'async-perform-update';\n\nexport type Initializer = (element: ReactiveElement) => void;\n\n// Temporary, until google3 is on TypeScript 5.2\ndeclare global {\n interface SymbolConstructor {\n readonly metadata: unique symbol;\n }\n}\n\n// Ensure metadata is enabled. TypeScript does not polyfill\n// Symbol.metadata, so we must ensure that it exists.\n(Symbol as {metadata: symbol}).metadata ??= Symbol('metadata');\n\ndeclare global {\n // This is public global API, do not change!\n // eslint-disable-next-line no-var\n var litPropertyMetadata: WeakMap<\n object,\n Map\n >;\n}\n\n// Map from a class's metadata object to property options\n// Note that we must use nullish-coalescing assignment so that we only use one\n// map even if we load multiple version of this module.\nglobal.litPropertyMetadata ??= new WeakMap<\n object,\n Map\n>();\n\n/**\n * Base element class which manages element properties and attributes. When\n * properties change, the `update` method is asynchronously called. This method\n * should be supplied by subclasses to render updates as desired.\n * @noInheritDoc\n */\nexport abstract class ReactiveElement\n // In the Node build, this `extends` clause will be substituted with\n // `(globalThis.HTMLElement ?? HTMLElement)`.\n //\n // This way, we will first prefer any global `HTMLElement` polyfill that the\n // user has assigned, and then fall back to the `HTMLElement` shim which has\n // been imported (see note at the top of this file about how this import is\n // generated by Rollup). Note that the `HTMLElement` variable has been\n // shadowed by this import, so it no longer refers to the global.\n extends HTMLElement\n implements ReactiveControllerHost\n{\n // Note: these are patched in only in DEV_MODE.\n /**\n * Read or set all the enabled warning categories for this class.\n *\n * This property is only used in development builds.\n *\n * @nocollapse\n * @category dev-mode\n */\n static enabledWarnings?: WarningKind[];\n\n /**\n * Enable the given warning category for this class.\n *\n * This method only exists in development builds, so it should be accessed\n * with a guard like:\n *\n * ```ts\n * // Enable for all ReactiveElement subclasses\n * ReactiveElement.enableWarning?.('migration');\n *\n * // Enable for only MyElement and subclasses\n * MyElement.enableWarning?.('migration');\n * ```\n *\n * @nocollapse\n * @category dev-mode\n */\n static enableWarning?: (warningKind: WarningKind) => void;\n\n /**\n * Disable the given warning category for this class.\n *\n * This method only exists in development builds, so it should be accessed\n * with a guard like:\n *\n * ```ts\n * // Disable for all ReactiveElement subclasses\n * ReactiveElement.disableWarning?.('migration');\n *\n * // Disable for only MyElement and subclasses\n * MyElement.disableWarning?.('migration');\n * ```\n *\n * @nocollapse\n * @category dev-mode\n */\n static disableWarning?: (warningKind: WarningKind) => void;\n\n /**\n * Adds an initializer function to the class that is called during instance\n * construction.\n *\n * This is useful for code that runs against a `ReactiveElement`\n * subclass, such as a decorator, that needs to do work for each\n * instance, such as setting up a `ReactiveController`.\n *\n * ```ts\n * const myDecorator = (target: typeof ReactiveElement, key: string) => {\n * target.addInitializer((instance: ReactiveElement) => {\n * // This is run during construction of the element\n * new MyController(instance);\n * });\n * }\n * ```\n *\n * Decorating a field will then cause each instance to run an initializer\n * that adds a controller:\n *\n * ```ts\n * class MyElement extends LitElement {\n * @myDecorator foo;\n * }\n * ```\n *\n * Initializers are stored per-constructor. Adding an initializer to a\n * subclass does not add it to a superclass. Since initializers are run in\n * constructors, initializers will run in order of the class hierarchy,\n * starting with superclasses and progressing to the instance's class.\n *\n * @nocollapse\n */\n static addInitializer(initializer: Initializer) {\n this.__prepare();\n (this._initializers ??= []).push(initializer);\n }\n\n static _initializers?: Initializer[];\n\n /*\n * Due to closure compiler ES6 compilation bugs, @nocollapse is required on\n * all static methods and properties with initializers. Reference:\n * - https://github.com/google/closure-compiler/issues/1776\n */\n\n /**\n * Maps attribute names to properties; for example `foobar` attribute to\n * `fooBar` property. Created lazily on user subclasses when finalizing the\n * class.\n * @nocollapse\n */\n private static __attributeToPropertyMap: AttributeMap;\n\n /**\n * Marks class as having been finalized, which includes creating properties\n * from `static properties`, but does *not* include all properties created\n * from decorators.\n * @nocollapse\n */\n protected static finalized: true | undefined;\n\n /**\n * Memoized list of all element properties, including any superclass\n * properties. Created lazily on user subclasses when finalizing the class.\n *\n * @nocollapse\n * @category properties\n */\n static elementProperties: PropertyDeclarationMap;\n\n /**\n * User-supplied object that maps property names to `PropertyDeclaration`\n * objects containing options for configuring reactive properties. When\n * a reactive property is set the element will update and render.\n *\n * By default properties are public fields, and as such, they should be\n * considered as primarily settable by element users, either via attribute or\n * the property itself.\n *\n * Generally, properties that are changed by the element should be private or\n * protected fields and should use the `state: true` option. Properties\n * marked as `state` do not reflect from the corresponding attribute\n *\n * However, sometimes element code does need to set a public property. This\n * should typically only be done in response to user interaction, and an event\n * should be fired informing the user; for example, a checkbox sets its\n * `checked` property when clicked and fires a `changed` event. Mutating\n * public properties should typically not be done for non-primitive (object or\n * array) properties. In other cases when an element needs to manage state, a\n * private property set with the `state: true` option should be used. When\n * needed, state properties can be initialized via public properties to\n * facilitate complex interactions.\n * @nocollapse\n * @category properties\n */\n static properties: PropertyDeclarations;\n\n /**\n * Memoized list of all element styles.\n * Created lazily on user subclasses when finalizing the class.\n * @nocollapse\n * @category styles\n */\n static elementStyles: Array = [];\n\n /**\n * Array of styles to apply to the element. The styles should be defined\n * using the {@linkcode css} tag function, via constructible stylesheets, or\n * imported from native CSS module scripts.\n *\n * Note on Content Security Policy:\n *\n * Element styles are implemented with `