🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@headless-primitives/drawer

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@headless-primitives/drawer - npm Package Compare versions

Comparing version
1.0.0
to
1.1.0
+426
-401
dist/index.js

@@ -1,11 +0,11 @@

var R = globalThis, W = R.ShadowRoot && (R.ShadyCSS === void 0 || R.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, vt = Symbol(), tt = /* @__PURE__ */ new WeakMap(), Ot = class {
constructor(t, e, i) {
if (this._$cssResult$ = !0, i !== vt) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
this.cssText = t, this.t = e;
var R = globalThis, W = R.ShadowRoot && (R.ShadyCSS === void 0 || R.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, gt = Symbol(), tt = /* @__PURE__ */ new WeakMap(), xt = class {
constructor(t, s, i) {
if (this._$cssResult$ = !0, i !== gt) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
this.cssText = t, this.t = s;
}
get styleSheet() {
let t = this.o, e = this.t;
let t = this.o, s = this.t;
if (W && t === void 0) {
let i = e !== void 0 && e.length === 1;
i && (t = tt.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && tt.set(e, t));
let i = s !== void 0 && s.length === 1;
i && (t = tt.get(s)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && tt.set(s, t));
}

@@ -17,32 +17,32 @@ return t;

}
}, xt = (s) => new Ot(typeof s == "string" ? s : s + "", void 0, vt), Dt = (s, t) => {
if (W) s.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
else for (let e of t) {
}, Dt = (e) => new xt(typeof e == "string" ? e : e + "", void 0, gt), Mt = (e, t) => {
if (W) e.adoptedStyleSheets = t.map((s) => s instanceof CSSStyleSheet ? s : s.styleSheet);
else for (let s of t) {
let i = document.createElement("style"), r = R.litNonce;
r !== void 0 && i.setAttribute("nonce", r), i.textContent = e.cssText, s.appendChild(i);
r !== void 0 && i.setAttribute("nonce", r), i.textContent = s.cssText, e.appendChild(i);
}
}, et = W ? (s) => s : (s) => s instanceof CSSStyleSheet ? ((t) => {
let e = "";
for (let i of t.cssRules) e += i.cssText;
return xt(e);
})(s) : s, { is: Mt, defineProperty: Rt, getOwnPropertyDescriptor: Tt, getOwnPropertyNames: Ht, getOwnPropertySymbols: Lt, getPrototypeOf: Nt } = Object, N = globalThis, st = N.trustedTypes, jt = st ? st.emptyScript : "", It = N.reactiveElementPolyfillSupport, P = (s, t) => s, K = {
toAttribute(s, t) {
}, et = W ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((t) => {
let s = "";
for (let i of t.cssRules) s += i.cssText;
return Dt(s);
})(e) : e, { is: Rt, defineProperty: Tt, getOwnPropertyDescriptor: Ht, getOwnPropertyNames: Lt, getOwnPropertySymbols: Nt, getPrototypeOf: jt } = Object, N = globalThis, st = N.trustedTypes, It = st ? st.emptyScript : "", zt = N.reactiveElementPolyfillSupport, P = (e, t) => e, K = {
toAttribute(e, t) {
switch (t) {
case Boolean:
s = s ? jt : null;
e = e ? It : null;
break;
case Object:
case Array:
s = s == null ? s : JSON.stringify(s);
e = e == null ? e : JSON.stringify(e);
}
return s;
return e;
},
fromAttribute(s, t) {
let e = s;
fromAttribute(e, t) {
let s = e;
switch (t) {
case Boolean:
e = s !== null;
s = e !== null;
break;
case Number:
e = s === null ? null : Number(s);
s = e === null ? null : Number(e);
break;

@@ -52,10 +52,10 @@ case Object:

try {
e = JSON.parse(s);
s = JSON.parse(e);
} catch {
e = null;
s = null;
}
}
return e;
return s;
}
}, gt = (s, t) => !Mt(s, t), it = {
}, At = (e, t) => !Rt(e, t), it = {
attribute: !0,

@@ -66,8 +66,8 @@ type: String,

useDefault: !1,
hasChanged: gt
hasChanged: At
};
Symbol.metadata ??= Symbol("metadata"), N.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
var v = class extends HTMLElement {
static addInitializer(t) {
this._$Ei(), (this.l ??= []).push(t);
var A = class extends HTMLElement {
static addInitializer(e) {
this._$Ei(), (this.l ??= []).push(e);
}

@@ -77,22 +77,22 @@ static get observedAttributes() {

}
static createProperty(t, e = it) {
if (e.state && (e.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((e = Object.create(e)).wrapped = !0), this.elementProperties.set(t, e), !e.noAccessor) {
let i = Symbol(), r = this.getPropertyDescriptor(t, i, e);
r !== void 0 && Rt(this.prototype, t, r);
static createProperty(e, t = it) {
if (t.state && (t.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(e) && ((t = Object.create(t)).wrapped = !0), this.elementProperties.set(e, t), !t.noAccessor) {
let s = Symbol(), i = this.getPropertyDescriptor(e, s, t);
i !== void 0 && Tt(this.prototype, e, i);
}
}
static getPropertyDescriptor(t, e, i) {
let { get: r, set: n } = Tt(this.prototype, t) ?? {
static getPropertyDescriptor(e, t, s) {
let { get: i, set: r } = Ht(this.prototype, e) ?? {
get() {
return this[e];
return this[t];
},
set(o) {
this[e] = o;
set(n) {
this[t] = n;
}
};
return {
get: r,
set(o) {
let a = r?.call(this);
n?.call(this, o), this.requestUpdate(t, a, i);
get: i,
set(n) {
let o = i?.call(this);
r?.call(this, n), this.requestUpdate(e, o, s);
},

@@ -103,9 +103,9 @@ configurable: !0,

}
static getPropertyOptions(t) {
return this.elementProperties.get(t) ?? it;
static getPropertyOptions(e) {
return this.elementProperties.get(e) ?? it;
}
static _$Ei() {
if (this.hasOwnProperty(P("elementProperties"))) return;
let t = Nt(this);
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
let e = jt(this);
e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties);
}

@@ -115,28 +115,28 @@ static finalize() {

if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(P("properties"))) {
let e = this.properties, i = [...Ht(e), ...Lt(e)];
for (let r of i) this.createProperty(r, e[r]);
let t = this.properties, s = [...Lt(t), ...Nt(t)];
for (let i of s) this.createProperty(i, t[i]);
}
let t = this[Symbol.metadata];
if (t !== null) {
let e = litPropertyMetadata.get(t);
if (e !== void 0) for (let [i, r] of e) this.elementProperties.set(i, r);
let e = this[Symbol.metadata];
if (e !== null) {
let t = litPropertyMetadata.get(e);
if (t !== void 0) for (let [s, i] of t) this.elementProperties.set(s, i);
}
this._$Eh = /* @__PURE__ */ new Map();
for (let [e, i] of this.elementProperties) {
let r = this._$Eu(e, i);
r !== void 0 && this._$Eh.set(r, e);
for (let [t, s] of this.elementProperties) {
let i = this._$Eu(t, s);
i !== void 0 && this._$Eh.set(i, t);
}
this.elementStyles = this.finalizeStyles(this.styles);
}
static finalizeStyles(t) {
let e = [];
if (Array.isArray(t)) {
let i = new Set(t.flat(1 / 0).reverse());
for (let r of i) e.unshift(et(r));
} else t !== void 0 && e.push(et(t));
return e;
static finalizeStyles(e) {
let t = [];
if (Array.isArray(e)) {
let s = new Set(e.flat(1 / 0).reverse());
for (let i of s) t.unshift(et(i));
} else e !== void 0 && t.push(et(e));
return t;
}
static _$Eu(t, e) {
let i = e.attribute;
return i === !1 ? void 0 : typeof i == "string" ? i : typeof t == "string" ? t.toLowerCase() : void 0;
static _$Eu(e, t) {
let s = t.attribute;
return s === !1 ? void 0 : typeof s == "string" ? s : typeof e == "string" ? e.toLowerCase() : void 0;
}

@@ -147,56 +147,56 @@ constructor() {

_$Ev() {
this._$ES = new Promise((t) => this.enableUpdating = t), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach((t) => t(this));
this._$ES = new Promise((e) => this.enableUpdating = e), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach((e) => e(this));
}
addController(t) {
(this._$EO ??= /* @__PURE__ */ new Set()).add(t), this.renderRoot !== void 0 && this.isConnected && t.hostConnected?.();
addController(e) {
(this._$EO ??= /* @__PURE__ */ new Set()).add(e), this.renderRoot !== void 0 && this.isConnected && e.hostConnected?.();
}
removeController(t) {
this._$EO?.delete(t);
removeController(e) {
this._$EO?.delete(e);
}
_$E_() {
let t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
for (let i of e.keys()) this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
t.size > 0 && (this._$Ep = t);
let e = /* @__PURE__ */ new Map(), t = this.constructor.elementProperties;
for (let s of t.keys()) this.hasOwnProperty(s) && (e.set(s, this[s]), delete this[s]);
e.size > 0 && (this._$Ep = e);
}
createRenderRoot() {
let t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
return Dt(t, this.constructor.elementStyles), t;
let e = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
return Mt(e, this.constructor.elementStyles), e;
}
connectedCallback() {
this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach((t) => t.hostConnected?.());
this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach((e) => e.hostConnected?.());
}
enableUpdating(t) {
enableUpdating(e) {
}
disconnectedCallback() {
this._$EO?.forEach((t) => t.hostDisconnected?.());
this._$EO?.forEach((e) => e.hostDisconnected?.());
}
attributeChangedCallback(t, e, i) {
this._$AK(t, i);
attributeChangedCallback(e, t, s) {
this._$AK(e, s);
}
_$ET(t, e) {
let i = this.constructor.elementProperties.get(t), r = this.constructor._$Eu(t, i);
if (r !== void 0 && i.reflect === !0) {
let n = (i.converter?.toAttribute === void 0 ? K : i.converter).toAttribute(e, i.type);
this._$Em = t, n == null ? this.removeAttribute(r) : this.setAttribute(r, n), this._$Em = null;
_$ET(e, t) {
let s = this.constructor.elementProperties.get(e), i = this.constructor._$Eu(e, s);
if (i !== void 0 && s.reflect === !0) {
let r = (s.converter?.toAttribute === void 0 ? K : s.converter).toAttribute(t, s.type);
this._$Em = e, r == null ? this.removeAttribute(i) : this.setAttribute(i, r), this._$Em = null;
}
}
_$AK(t, e) {
let i = this.constructor, r = i._$Eh.get(t);
if (r !== void 0 && this._$Em !== r) {
let n = i.getPropertyOptions(r), o = typeof n.converter == "function" ? { fromAttribute: n.converter } : n.converter?.fromAttribute === void 0 ? K : n.converter;
this._$Em = r;
let a = o.fromAttribute(e, n.type);
this[r] = a ?? this._$Ej?.get(r) ?? a, this._$Em = null;
_$AK(e, t) {
let s = this.constructor, i = s._$Eh.get(e);
if (i !== void 0 && this._$Em !== i) {
let r = s.getPropertyOptions(i), n = typeof r.converter == "function" ? { fromAttribute: r.converter } : r.converter?.fromAttribute === void 0 ? K : r.converter;
this._$Em = i;
let o = n.fromAttribute(t, r.type);
this[i] = o ?? this._$Ej?.get(i) ?? o, this._$Em = null;
}
}
requestUpdate(t, e, i, r = !1, n) {
if (t !== void 0) {
let o = this.constructor;
if (r === !1 && (n = this[t]), i ??= o.getPropertyOptions(t), !((i.hasChanged ?? gt)(n, e) || i.useDefault && i.reflect && n === this._$Ej?.get(t) && !this.hasAttribute(o._$Eu(t, i)))) return;
this.C(t, e, i);
requestUpdate(e, t, s, i = !1, r) {
if (e !== void 0) {
let n = this.constructor;
if (i === !1 && (r = this[e]), s ??= n.getPropertyOptions(e), !((s.hasChanged ?? At)(r, t) || s.useDefault && s.reflect && r === this._$Ej?.get(e) && !this.hasAttribute(n._$Eu(e, s)))) return;
this.C(e, t, s);
}
this.isUpdatePending === !1 && (this._$ES = this._$EP());
}
C(t, e, { useDefault: i, reflect: r, wrapped: n }, o) {
i && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t) && (this._$Ej.set(t, o ?? e ?? this[t]), n !== !0 || o !== void 0) || (this._$AL.has(t) || (this.hasUpdated || i || (e = void 0), this._$AL.set(t, e)), r === !0 && this._$Em !== t && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t));
C(e, t, { useDefault: s, reflect: i, wrapped: r }, n) {
s && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(e) && (this._$Ej.set(e, n ?? t ?? this[e]), r !== !0 || n !== void 0) || (this._$AL.has(e) || (this.hasUpdated || s || (t = void 0), this._$AL.set(e, t)), i === !0 && this._$Em !== e && (this._$Eq ??= /* @__PURE__ */ new Set()).add(e));
}

@@ -207,7 +207,7 @@ async _$EP() {

await this._$ES;
} catch (e) {
Promise.reject(e);
} catch (t) {
Promise.reject(t);
}
let t = this.scheduleUpdate();
return t != null && await t, !this.isUpdatePending;
let e = this.scheduleUpdate();
return e != null && await e, !this.isUpdatePending;
}

@@ -221,23 +221,23 @@ scheduleUpdate() {

if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
for (let [r, n] of this._$Ep) this[r] = n;
for (let [i, r] of this._$Ep) this[i] = r;
this._$Ep = void 0;
}
let i = this.constructor.elementProperties;
if (i.size > 0) for (let [r, n] of i) {
let { wrapped: o } = n, a = this[r];
o !== !0 || this._$AL.has(r) || a === void 0 || this.C(r, void 0, n, a);
let s = this.constructor.elementProperties;
if (s.size > 0) for (let [i, r] of s) {
let { wrapped: n } = r, o = this[i];
n !== !0 || this._$AL.has(i) || o === void 0 || this.C(i, void 0, r, o);
}
}
let t = !1, e = this._$AL;
let e = !1, t = this._$AL;
try {
t = this.shouldUpdate(e), t ? (this.willUpdate(e), this._$EO?.forEach((i) => i.hostUpdate?.()), this.update(e)) : this._$EM();
} catch (i) {
throw t = !1, this._$EM(), i;
e = this.shouldUpdate(t), e ? (this.willUpdate(t), this._$EO?.forEach((s) => s.hostUpdate?.()), this.update(t)) : this._$EM();
} catch (s) {
throw e = !1, this._$EM(), s;
}
t && this._$AE(e);
e && this._$AE(t);
}
willUpdate(t) {
willUpdate(e) {
}
_$AE(t) {
this._$EO?.forEach((e) => e.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
_$AE(e) {
this._$EO?.forEach((t) => t.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(e)), this.updated(e);
}

@@ -253,43 +253,43 @@ _$EM() {

}
shouldUpdate(t) {
shouldUpdate(e) {
return !0;
}
update(t) {
this._$Eq &&= this._$Eq.forEach((e) => this._$ET(e, this[e])), this._$EM();
update(e) {
this._$Eq &&= this._$Eq.forEach((t) => this._$ET(t, this[t])), this._$EM();
}
updated(t) {
updated(e) {
}
firstUpdated(t) {
firstUpdated(e) {
}
};
v.elementStyles = [], v.shadowRootOptions = { mode: "open" }, v[P("elementProperties")] = /* @__PURE__ */ new Map(), v[P("finalized")] = /* @__PURE__ */ new Map(), It?.({ ReactiveElement: v }), (N.reactiveElementVersions ??= []).push("2.1.2");
var J = globalThis, rt = (s) => s, H = J.trustedTypes, nt = H ? H.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, At = "$lit$", f = `lit$${Math.random().toFixed(9).slice(2)}$`, Et = "?" + f, zt = `<${Et}>`, b = document, O = () => b.createComment(""), x = (s) => s === null || typeof s != "object" && typeof s != "function", Z = Array.isArray, qt = (s) => Z(s) || typeof s?.[Symbol.iterator] == "function", z = `[
\f\r]`, S = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ot = /-->/g, at = />/g, y = RegExp(`>|${z}(?:([^\\s"'>=/]+)(${z}*=${z}*(?:[^
\f\r"'\`<>=]|("|')|))|$)`, "g"), ht = /'/g, lt = /"/g, wt = /^(?:script|style|textarea|title)$/i, g = Symbol.for("lit-noChange"), d = Symbol.for("lit-nothing"), dt = /* @__PURE__ */ new WeakMap(), m = b.createTreeWalker(b, 129);
function St(s, t) {
if (!Z(s) || !s.hasOwnProperty("raw")) throw Error("invalid template strings array");
A.elementStyles = [], A.shadowRootOptions = { mode: "open" }, A[P("elementProperties")] = /* @__PURE__ */ new Map(), A[P("finalized")] = /* @__PURE__ */ new Map(), zt?.({ ReactiveElement: A }), (N.reactiveElementVersions ??= []).push("2.1.2");
var J = globalThis, rt = (e) => e, H = J.trustedTypes, nt = H ? H.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, Et = "$lit$", $ = `lit$${Math.random().toFixed(9).slice(2)}$`, wt = "?" + $, qt = `<${wt}>`, m = document, O = () => m.createComment(""), x = (e) => e === null || typeof e != "object" && typeof e != "function", Z = Array.isArray, Kt = (e) => Z(e) || typeof e?.[Symbol.iterator] == "function", z = `[
\f\r]`, S = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ot = /-->/g, at = />/g, b = RegExp(`>|${z}(?:([^\\s"'>=/]+)(${z}*=${z}*(?:[^
\f\r"'\`<>=]|("|')|))|$)`, "g"), ht = /'/g, lt = /"/g, St = /^(?:script|style|textarea|title)$/i, E = Symbol.for("lit-noChange"), d = Symbol.for("lit-nothing"), dt = /* @__PURE__ */ new WeakMap(), y = m.createTreeWalker(m, 129);
function Ct(e, t) {
if (!Z(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
return nt === void 0 ? t : nt.createHTML(t);
}
var Kt = (s, t) => {
let e = s.length - 1, i = [], r, n = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = S;
for (let a = 0; a < e; a++) {
let h = s[a], D, p, l = -1, u = 0;
for (; u < h.length && (o.lastIndex = u, p = o.exec(h), p !== null); ) u = o.lastIndex, o === S ? p[1] === "!--" ? o = ot : p[1] === void 0 ? p[2] === void 0 ? p[3] !== void 0 && (o = y) : (wt.test(p[2]) && (r = RegExp("</" + p[2], "g")), o = y) : o = at : o === y ? p[0] === ">" ? (o = r ?? S, l = -1) : p[1] === void 0 ? l = -2 : (l = o.lastIndex - p[2].length, D = p[1], o = p[3] === void 0 ? y : p[3] === '"' ? lt : ht) : o === lt || o === ht ? o = y : o === ot || o === at ? o = S : (o = y, r = void 0);
let _ = o === y && s[a + 1].startsWith("/>") ? " " : "";
n += o === S ? h + zt : l >= 0 ? (i.push(D), h.slice(0, l) + At + h.slice(l) + f + _) : h + f + (l === -2 ? a : _);
var Bt = (e, t) => {
let s = e.length - 1, i = [], r, n = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = S;
for (let a = 0; a < s; a++) {
let h = e[a], D, p, l = -1, u = 0;
for (; u < h.length && (o.lastIndex = u, p = o.exec(h), p !== null); ) u = o.lastIndex, o === S ? p[1] === "!--" ? o = ot : p[1] === void 0 ? p[2] === void 0 ? p[3] !== void 0 && (o = b) : (St.test(p[2]) && (r = RegExp("</" + p[2], "g")), o = b) : o = at : o === b ? p[0] === ">" ? (o = r ?? S, l = -1) : p[1] === void 0 ? l = -2 : (l = o.lastIndex - p[2].length, D = p[1], o = p[3] === void 0 ? b : p[3] === '"' ? lt : ht) : o === lt || o === ht ? o = b : o === ot || o === at ? o = S : (o = b, r = void 0);
let f = o === b && e[a + 1].startsWith("/>") ? " " : "";
n += o === S ? h + qt : l >= 0 ? (i.push(D), h.slice(0, l) + Et + h.slice(l) + $ + f) : h + $ + (l === -2 ? a : f);
}
return [St(s, n + (s[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), i];
}, B = class Ct {
constructor({ strings: t, _$litType$: e }, i) {
return [Ct(e, n + (e[s] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), i];
}, B = class Pt {
constructor({ strings: t, _$litType$: s }, i) {
let r;
this.parts = [];
let n = 0, o = 0, a = t.length - 1, h = this.parts, [D, p] = Kt(t, e);
if (this.el = Ct.createElement(D, i), m.currentNode = this.el.content, e === 2 || e === 3) {
let n = 0, o = 0, a = t.length - 1, h = this.parts, [D, p] = Bt(t, s);
if (this.el = Pt.createElement(D, i), y.currentNode = this.el.content, s === 2 || s === 3) {
let l = this.el.content.firstChild;
l.replaceWith(...l.childNodes);
}
for (; (r = m.nextNode()) !== null && h.length < a; ) {
for (; (r = y.nextNode()) !== null && h.length < a; ) {
if (r.nodeType === 1) {
if (r.hasAttributes()) for (let l of r.getAttributeNames()) if (l.endsWith(At)) {
let u = p[o++], _ = r.getAttribute(l).split(f), M = /([.?@])?(.*)/.exec(u);
if (r.hasAttributes()) for (let l of r.getAttributeNames()) if (l.endsWith(Et)) {
let u = p[o++], f = r.getAttribute(l).split($), M = /([.?@])?(.*)/.exec(u);
h.push({

@@ -299,14 +299,14 @@ type: 1,

name: M[2],
strings: _,
ctor: M[1] === "." ? Ft : M[1] === "?" ? Vt : M[1] === "@" ? Wt : j
strings: f,
ctor: M[1] === "." ? Vt : M[1] === "?" ? Wt : M[1] === "@" ? Jt : j
}), r.removeAttribute(l);
} else l.startsWith(f) && (h.push({
} else l.startsWith($) && (h.push({
type: 6,
index: n
}), r.removeAttribute(l));
if (wt.test(r.tagName)) {
let l = r.textContent.split(f), u = l.length - 1;
if (St.test(r.tagName)) {
let l = r.textContent.split($), u = l.length - 1;
if (u > 0) {
r.textContent = H ? H.emptyScript : "";
for (let _ = 0; _ < u; _++) r.append(l[_], O()), m.nextNode(), h.push({
for (let f = 0; f < u; f++) r.append(l[f], O()), y.nextNode(), h.push({
type: 2,

@@ -318,3 +318,3 @@ index: ++n

}
} else if (r.nodeType === 8) if (r.data === Et) h.push({
} else if (r.nodeType === 8) if (r.data === wt) h.push({
type: 2,

@@ -325,6 +325,6 @@ index: n

let l = -1;
for (; (l = r.data.indexOf(f, l + 1)) !== -1; ) h.push({
for (; (l = r.data.indexOf($, l + 1)) !== -1; ) h.push({
type: 7,
index: n
}), l += f.length - 1;
}), l += $.length - 1;
}

@@ -334,15 +334,15 @@ n++;

}
static createElement(t, e) {
let i = b.createElement("template");
static createElement(t, s) {
let i = m.createElement("template");
return i.innerHTML = t, i;
}
};
function A(s, t, e = s, i) {
if (t === g) return t;
let r = i === void 0 ? e._$Cl : e._$Co?.[i], n = x(t) ? void 0 : t._$litDirective$;
return r?.constructor !== n && (r?._$AO?.(!1), n === void 0 ? r = void 0 : (r = new n(s), r._$AT(s, e, i)), i === void 0 ? e._$Cl = r : (e._$Co ??= [])[i] = r), r !== void 0 && (t = A(s, r._$AS(s, t.values), r, i)), t;
function w(e, t, s = e, i) {
if (t === E) return t;
let r = i === void 0 ? s._$Cl : s._$Co?.[i], n = x(t) ? void 0 : t._$litDirective$;
return r?.constructor !== n && (r?._$AO?.(!1), n === void 0 ? r = void 0 : (r = new n(e), r._$AT(e, s, i)), i === void 0 ? s._$Cl = r : (s._$Co ??= [])[i] = r), r !== void 0 && (t = w(e, r._$AS(e, t.values), r, i)), t;
}
var Bt = class {
constructor(s, t) {
this._$AV = [], this._$AN = void 0, this._$AD = s, this._$AM = t;
var Ft = class {
constructor(e, t) {
this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = t;
}

@@ -355,29 +355,29 @@ get parentNode() {

}
u(s) {
let { el: { content: t }, parts: e } = this._$AD, i = (s?.creationScope ?? b).importNode(t, !0);
m.currentNode = i;
let r = m.nextNode(), n = 0, o = 0, a = e[0];
u(e) {
let { el: { content: t }, parts: s } = this._$AD, i = (e?.creationScope ?? m).importNode(t, !0);
y.currentNode = i;
let r = y.nextNode(), n = 0, o = 0, a = s[0];
for (; a !== void 0; ) {
if (n === a.index) {
let h;
a.type === 2 ? h = new Y(r, r.nextSibling, this, s) : a.type === 1 ? h = new a.ctor(r, a.name, a.strings, this, s) : a.type === 6 && (h = new Jt(r, this, s)), this._$AV.push(h), a = e[++o];
a.type === 2 ? h = new Y(r, r.nextSibling, this, e) : a.type === 1 ? h = new a.ctor(r, a.name, a.strings, this, e) : a.type === 6 && (h = new Zt(r, this, e)), this._$AV.push(h), a = s[++o];
}
n !== a?.index && (r = m.nextNode(), n++);
n !== a?.index && (r = y.nextNode(), n++);
}
return m.currentNode = b, i;
return y.currentNode = m, i;
}
p(s) {
p(e) {
let t = 0;
for (let e of this._$AV) e !== void 0 && (e.strings === void 0 ? e._$AI(s[t]) : (e._$AI(s, e, t), t += e.strings.length - 2)), t++;
for (let s of this._$AV) s !== void 0 && (s.strings === void 0 ? s._$AI(e[t]) : (s._$AI(e, s, t), t += s.strings.length - 2)), t++;
}
}, Y = class Pt {
}, Y = class kt {
get _$AU() {
return this._$AM?._$AU ?? this._$Cv;
}
constructor(t, e, i, r) {
this.type = 2, this._$AH = d, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = i, this.options = r, this._$Cv = r?.isConnected ?? !0;
constructor(t, s, i, r) {
this.type = 2, this._$AH = d, this._$AN = void 0, this._$AA = t, this._$AB = s, this._$AM = i, this.options = r, this._$Cv = r?.isConnected ?? !0;
}
get parentNode() {
let t = this._$AA.parentNode, e = this._$AM;
return e !== void 0 && t?.nodeType === 11 && (t = e.parentNode), t;
let t = this._$AA.parentNode, s = this._$AM;
return s !== void 0 && t?.nodeType === 11 && (t = s.parentNode), t;
}

@@ -390,4 +390,4 @@ get startNode() {

}
_$AI(t, e = this) {
t = A(this, t, e), x(t) ? t === d || t == null || t === "" ? (this._$AH !== d && this._$AR(), this._$AH = d) : t !== this._$AH && t !== g && this._(t) : t._$litType$ === void 0 ? t.nodeType === void 0 ? qt(t) ? this.k(t) : this._(t) : this.T(t) : this.$(t);
_$AI(t, s = this) {
t = w(this, t, s), x(t) ? t === d || t == null || t === "" ? (this._$AH !== d && this._$AR(), this._$AH = d) : t !== this._$AH && t !== E && this._(t) : t._$litType$ === void 0 ? t.nodeType === void 0 ? Kt(t) ? this.k(t) : this._(t) : this.T(t) : this.$(t);
}

@@ -401,24 +401,24 @@ O(t) {

_(t) {
this._$AH !== d && x(this._$AH) ? this._$AA.nextSibling.data = t : this.T(b.createTextNode(t)), this._$AH = t;
this._$AH !== d && x(this._$AH) ? this._$AA.nextSibling.data = t : this.T(m.createTextNode(t)), this._$AH = t;
}
$(t) {
let { values: e, _$litType$: i } = t, r = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = B.createElement(St(i.h, i.h[0]), this.options)), i);
if (this._$AH?._$AD === r) this._$AH.p(e);
let { values: s, _$litType$: i } = t, r = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = B.createElement(Ct(i.h, i.h[0]), this.options)), i);
if (this._$AH?._$AD === r) this._$AH.p(s);
else {
let n = new Bt(r, this), o = n.u(this.options);
n.p(e), this.T(o), this._$AH = n;
let n = new Ft(r, this), o = n.u(this.options);
n.p(s), this.T(o), this._$AH = n;
}
}
_$AC(t) {
let e = dt.get(t.strings);
return e === void 0 && dt.set(t.strings, e = new B(t)), e;
let s = dt.get(t.strings);
return s === void 0 && dt.set(t.strings, s = new B(t)), s;
}
k(t) {
Z(this._$AH) || (this._$AH = [], this._$AR());
let e = this._$AH, i, r = 0;
for (let n of t) r === e.length ? e.push(i = new Pt(this.O(O()), this.O(O()), this, this.options)) : i = e[r], i._$AI(n), r++;
r < e.length && (this._$AR(i && i._$AB.nextSibling, r), e.length = r);
let s = this._$AH, i, r = 0;
for (let n of t) r === s.length ? s.push(i = new kt(this.O(O()), this.O(O()), this, this.options)) : i = s[r], i._$AI(n), r++;
r < s.length && (this._$AR(i && i._$AB.nextSibling, r), s.length = r);
}
_$AR(t = this._$AA.nextSibling, e) {
for (this._$AP?.(!1, !0, e); t !== this._$AB; ) {
_$AR(t = this._$AA.nextSibling, s) {
for (this._$AP?.(!1, !0, s); t !== this._$AB; ) {
let i = rt(t).nextSibling;

@@ -438,46 +438,46 @@ rt(t).remove(), t = i;

}
constructor(s, t, e, i, r) {
this.type = 1, this._$AH = d, this._$AN = void 0, this.element = s, this.name = t, this._$AM = i, this.options = r, e.length > 2 || e[0] !== "" || e[1] !== "" ? (this._$AH = Array(e.length - 1).fill(/* @__PURE__ */ new String()), this.strings = e) : this._$AH = d;
constructor(e, t, s, i, r) {
this.type = 1, this._$AH = d, this._$AN = void 0, this.element = e, this.name = t, this._$AM = i, this.options = r, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(/* @__PURE__ */ new String()), this.strings = s) : this._$AH = d;
}
_$AI(s, t = this, e, i) {
_$AI(e, t = this, s, i) {
let r = this.strings, n = !1;
if (r === void 0) s = A(this, s, t, 0), n = !x(s) || s !== this._$AH && s !== g, n && (this._$AH = s);
if (r === void 0) e = w(this, e, t, 0), n = !x(e) || e !== this._$AH && e !== E, n && (this._$AH = e);
else {
let o = s, a, h;
for (s = r[0], a = 0; a < r.length - 1; a++) h = A(this, o[e + a], t, a), h === g && (h = this._$AH[a]), n ||= !x(h) || h !== this._$AH[a], h === d ? s = d : s !== d && (s += (h ?? "") + r[a + 1]), this._$AH[a] = h;
let o = e, a, h;
for (e = r[0], a = 0; a < r.length - 1; a++) h = w(this, o[s + a], t, a), h === E && (h = this._$AH[a]), n ||= !x(h) || h !== this._$AH[a], h === d ? e = d : e !== d && (e += (h ?? "") + r[a + 1]), this._$AH[a] = h;
}
n && !i && this.j(s);
n && !i && this.j(e);
}
j(s) {
s === d ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, s ?? "");
j(e) {
e === d ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
}
}, Ft = class extends j {
}, Vt = class extends j {
constructor() {
super(...arguments), this.type = 3;
}
j(s) {
this.element[this.name] = s === d ? void 0 : s;
j(e) {
this.element[this.name] = e === d ? void 0 : e;
}
}, Vt = class extends j {
}, Wt = class extends j {
constructor() {
super(...arguments), this.type = 4;
}
j(s) {
this.element.toggleAttribute(this.name, !!s && s !== d);
j(e) {
this.element.toggleAttribute(this.name, !!e && e !== d);
}
}, Wt = class extends j {
constructor(s, t, e, i, r) {
super(s, t, e, i, r), this.type = 5;
}, Jt = class extends j {
constructor(e, t, s, i, r) {
super(e, t, s, i, r), this.type = 5;
}
_$AI(s, t = this) {
if ((s = A(this, s, t, 0) ?? d) === g) return;
let e = this._$AH, i = s === d && e !== d || s.capture !== e.capture || s.once !== e.once || s.passive !== e.passive, r = s !== d && (e === d || i);
i && this.element.removeEventListener(this.name, this, e), r && this.element.addEventListener(this.name, this, s), this._$AH = s;
_$AI(e, t = this) {
if ((e = w(this, e, t, 0) ?? d) === E) return;
let s = this._$AH, i = e === d && s !== d || e.capture !== s.capture || e.once !== s.once || e.passive !== s.passive, r = e !== d && (s === d || i);
i && this.element.removeEventListener(this.name, this, s), r && this.element.addEventListener(this.name, this, e), this._$AH = e;
}
handleEvent(s) {
typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, s) : this._$AH.handleEvent(s);
handleEvent(e) {
typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, e) : this._$AH.handleEvent(e);
}
}, Jt = class {
constructor(s, t, e) {
this.element = s, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = e;
}, Zt = class {
constructor(e, t, s) {
this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = s;
}

@@ -487,15 +487,15 @@ get _$AU() {

}
_$AI(s) {
A(this, s);
_$AI(e) {
w(this, e);
}
}, Zt = J.litHtmlPolyfillSupport;
Zt?.(B, Y), (J.litHtmlVersions ??= []).push("3.3.2");
var Yt = (s, t, e) => {
let i = e?.renderBefore ?? t, r = i._$litPart$;
}, Yt = J.litHtmlPolyfillSupport;
Yt?.(B, Y), (J.litHtmlVersions ??= []).push("3.3.2");
var Gt = (e, t, s) => {
let i = s?.renderBefore ?? t, r = i._$litPart$;
if (r === void 0) {
let n = e?.renderBefore ?? null;
i._$litPart$ = r = new Y(t.insertBefore(O(), n), n, void 0, e ?? {});
let n = s?.renderBefore ?? null;
i._$litPart$ = r = new Y(t.insertBefore(O(), n), n, void 0, s ?? {});
}
return r._$AI(s), r;
}, G = globalThis, U = class extends v {
return r._$AI(e), r;
}, G = globalThis, k = class extends A {
constructor() {

@@ -505,8 +505,8 @@ super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;

createRenderRoot() {
let s = super.createRenderRoot();
return this.renderOptions.renderBefore ??= s.firstChild, s;
let e = super.createRenderRoot();
return this.renderOptions.renderBefore ??= e.firstChild, e;
}
update(s) {
update(e) {
let t = this.render();
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(s), this._$Do = Yt(t, this.renderRoot, this.renderOptions);
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = Gt(t, this.renderRoot, this.renderOptions);
}

@@ -520,15 +520,15 @@ connectedCallback() {

render() {
return g;
return E;
}
};
U._$litElement$ = !0, U.finalized = !0, G.litElementHydrateSupport?.({ LitElement: U });
var Gt = G.litElementPolyfillSupport;
Gt?.({ LitElement: U }), (G.litElementVersions ??= []).push("4.2.2");
k._$litElement$ = !0, k.finalized = !0, G.litElementHydrateSupport?.({ LitElement: k });
var Qt = G.litElementPolyfillSupport;
Qt?.({ LitElement: k }), (G.litElementVersions ??= []).push("4.2.2");
var c = [];
for (let s = 0; s < 256; ++s) c.push((s + 256).toString(16).slice(1));
function Qt(s, t = 0) {
return (c[s[t + 0]] + c[s[t + 1]] + c[s[t + 2]] + c[s[t + 3]] + "-" + c[s[t + 4]] + c[s[t + 5]] + "-" + c[s[t + 6]] + c[s[t + 7]] + "-" + c[s[t + 8]] + c[s[t + 9]] + "-" + c[s[t + 10]] + c[s[t + 11]] + c[s[t + 12]] + c[s[t + 13]] + c[s[t + 14]] + c[s[t + 15]]).toLowerCase();
for (let e = 0; e < 256; ++e) c.push((e + 256).toString(16).slice(1));
function Xt(e, t = 0) {
return (c[e[t + 0]] + c[e[t + 1]] + c[e[t + 2]] + c[e[t + 3]] + "-" + c[e[t + 4]] + c[e[t + 5]] + "-" + c[e[t + 6]] + c[e[t + 7]] + "-" + c[e[t + 8]] + c[e[t + 9]] + "-" + c[e[t + 10]] + c[e[t + 11]] + c[e[t + 12]] + c[e[t + 13]] + c[e[t + 14]] + c[e[t + 15]]).toLowerCase();
}
var q, Xt = new Uint8Array(16);
function te() {
var q, te = new Uint8Array(16);
function ee() {
if (!q) {

@@ -538,23 +538,23 @@ if (typeof crypto > "u" || !crypto.getRandomValues) throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");

}
return q(Xt);
return q(te);
}
var ct = { randomUUID: typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto) };
function ee(s, t, e) {
s ||= {};
let i = s.random ?? s.rng?.() ?? te();
function se(e, t, s) {
e ||= {};
let i = e.random ?? e.rng?.() ?? ee();
if (i.length < 16) throw Error("Random bytes length must be >= 16");
return i[6] = i[6] & 15 | 64, i[8] = i[8] & 63 | 128, Qt(i);
return i[6] = i[6] & 15 | 64, i[8] = i[8] & 63 | 128, Xt(i);
}
function se(s, t, e) {
return ct.randomUUID && !t && !s ? ct.randomUUID() : ee(s, t);
function ie(e, t, s) {
return ct.randomUUID && !t && !e ? ct.randomUUID() : se(e, t);
}
function ie(s = "hp") {
return `${s}-${se()}`;
function re(e = "hp") {
return `${e}-${ie()}`;
}
var E = class extends U {
var v = class extends k {
createRenderRoot() {
return this;
}
emit(s, t) {
let e = new CustomEvent(`hp-${s}`, {
emit(e, t) {
let s = new CustomEvent(`hp-${e}`, {
detail: t,

@@ -565,15 +565,25 @@ bubbles: !0,

});
return this.dispatchEvent(e), e;
return this.dispatchEvent(s), s;
}
_hpId = ie();
_hpId = re();
get hpId() {
return this._hpId;
}
_abortController = null;
get signal() {
return (!this._abortController || this._abortController.signal.aborted) && (this._abortController = new AbortController()), this._abortController.signal;
}
connectedCallback() {
super.connectedCallback(), (!this._abortController || this._abortController.signal.aborted) && (this._abortController = new AbortController());
}
disconnectedCallback() {
super.disconnectedCallback(), this._abortController?.abort(), this._abortController = null;
}
};
function w(s) {
function g(e) {
return function(t) {
typeof window < "u" && (customElements.get(s) || customElements.define(s, t));
typeof window < "u" && (customElements.get(e) || customElements.define(e, t));
};
}
var re = class {
var ne = class {
_container;

@@ -583,4 +593,4 @@ _active = !1;

_focusableElements = [];
constructor(s) {
this._container = s;
constructor(e) {
this._container = e;
}

@@ -604,12 +614,12 @@ activate() {

}
_handleFocusIn = (s) => {
_handleFocusIn = (e) => {
if (!this._active) return;
let t = s.target;
let t = e.target;
this._container.contains(t) || this._focusableElements.length > 0 && this._focusableElements[0].focus();
};
_handleKeyDown = (s) => {
if (!this._active || s.key !== "Tab") return;
s.preventDefault();
let t = this._focusableElements.indexOf(document.activeElement), e;
e = s.shiftKey ? t > 0 ? t - 1 : this._focusableElements.length - 1 : t < this._focusableElements.length - 1 ? t + 1 : 0, this._focusableElements[e].focus();
_handleKeyDown = (e) => {
if (!this._active || e.key !== "Tab") return;
e.preventDefault();
let t = this._focusableElements.indexOf(document.activeElement), s;
s = e.shiftKey ? t > 0 ? t - 1 : this._focusableElements.length - 1 : t < this._focusableElements.length - 1 ? t + 1 : 0, this._focusableElements[s].focus();
};

@@ -623,13 +633,13 @@ };

const T = globalThis, Q = T.ShadowRoot && (T.ShadyCSS === void 0 || T.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Ut = Symbol(), pt = /* @__PURE__ */ new WeakMap();
let ne = class {
constructor(t, e, i) {
let oe = class {
constructor(t, s, i) {
if (this._$cssResult$ = !0, i !== Ut) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
this.cssText = t, this.t = e;
this.cssText = t, this.t = s;
}
get styleSheet() {
let t = this.o;
const e = this.t;
const s = this.t;
if (Q && t === void 0) {
const i = e !== void 0 && e.length === 1;
i && (t = pt.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && pt.set(e, t));
const i = s !== void 0 && s.length === 1;
i && (t = pt.get(s)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && pt.set(s, t));
}

@@ -642,13 +652,13 @@ return t;

};
const oe = (s) => new ne(typeof s == "string" ? s : s + "", void 0, Ut), ae = (s, t) => {
if (Q) s.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
else for (const e of t) {
const ae = (e) => new oe(typeof e == "string" ? e : e + "", void 0, Ut), he = (e, t) => {
if (Q) e.adoptedStyleSheets = t.map((s) => s instanceof CSSStyleSheet ? s : s.styleSheet);
else for (const s of t) {
const i = document.createElement("style"), r = T.litNonce;
r !== void 0 && i.setAttribute("nonce", r), i.textContent = e.cssText, s.appendChild(i);
r !== void 0 && i.setAttribute("nonce", r), i.textContent = s.cssText, e.appendChild(i);
}
}, ut = Q ? (s) => s : (s) => s instanceof CSSStyleSheet ? ((t) => {
let e = "";
for (const i of t.cssRules) e += i.cssText;
return oe(e);
})(s) : s;
}, ut = Q ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((t) => {
let s = "";
for (const i of t.cssRules) s += i.cssText;
return ae(s);
})(e) : e;
/**

@@ -659,20 +669,20 @@ * @license

*/
const { is: he, defineProperty: le, getOwnPropertyDescriptor: de, getOwnPropertyNames: ce, getOwnPropertySymbols: pe, getPrototypeOf: ue } = Object, I = globalThis, _t = I.trustedTypes, _e = _t ? _t.emptyScript : "", fe = I.reactiveElementPolyfillSupport, k = (s, t) => s, L = { toAttribute(s, t) {
const { is: le, defineProperty: de, getOwnPropertyDescriptor: ce, getOwnPropertyNames: pe, getOwnPropertySymbols: ue, getPrototypeOf: _e } = Object, I = globalThis, _t = I.trustedTypes, fe = _t ? _t.emptyScript : "", $e = I.reactiveElementPolyfillSupport, U = (e, t) => e, L = { toAttribute(e, t) {
switch (t) {
case Boolean:
s = s ? _e : null;
e = e ? fe : null;
break;
case Object:
case Array:
s = s == null ? s : JSON.stringify(s);
e = e == null ? e : JSON.stringify(e);
}
return s;
}, fromAttribute(s, t) {
let e = s;
return e;
}, fromAttribute(e, t) {
let s = e;
switch (t) {
case Boolean:
e = s !== null;
s = e !== null;
break;
case Number:
e = s === null ? null : Number(s);
s = e === null ? null : Number(e);
break;

@@ -682,9 +692,9 @@ case Object:

try {
e = JSON.parse(s);
s = JSON.parse(e);
} catch {
e = null;
s = null;
}
}
return e;
} }, X = (s, t) => !he(s, t), ft = { attribute: !0, type: String, converter: L, reflect: !1, useDefault: !1, hasChanged: X };
return s;
} }, X = (e, t) => !le(e, t), ft = { attribute: !0, type: String, converter: L, reflect: !1, useDefault: !1, hasChanged: X };
Symbol.metadata ??= Symbol("metadata"), I.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();

@@ -698,13 +708,13 @@ class C extends HTMLElement {

}
static createProperty(t, e = ft) {
if (e.state && (e.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((e = Object.create(e)).wrapped = !0), this.elementProperties.set(t, e), !e.noAccessor) {
const i = Symbol(), r = this.getPropertyDescriptor(t, i, e);
r !== void 0 && le(this.prototype, t, r);
static createProperty(t, s = ft) {
if (s.state && (s.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((s = Object.create(s)).wrapped = !0), this.elementProperties.set(t, s), !s.noAccessor) {
const i = Symbol(), r = this.getPropertyDescriptor(t, i, s);
r !== void 0 && de(this.prototype, t, r);
}
}
static getPropertyDescriptor(t, e, i) {
const { get: r, set: n } = de(this.prototype, t) ?? { get() {
return this[e];
static getPropertyDescriptor(t, s, i) {
const { get: r, set: n } = ce(this.prototype, t) ?? { get() {
return this[s];
}, set(o) {
this[e] = o;
this[s] = o;
} };

@@ -720,21 +730,21 @@ return { get: r, set(o) {

static _$Ei() {
if (this.hasOwnProperty(k("elementProperties"))) return;
const t = ue(this);
if (this.hasOwnProperty(U("elementProperties"))) return;
const t = _e(this);
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
}
static finalize() {
if (this.hasOwnProperty(k("finalized"))) return;
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(k("properties"))) {
const e = this.properties, i = [...ce(e), ...pe(e)];
for (const r of i) this.createProperty(r, e[r]);
if (this.hasOwnProperty(U("finalized"))) return;
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(U("properties"))) {
const s = this.properties, i = [...pe(s), ...ue(s)];
for (const r of i) this.createProperty(r, s[r]);
}
const t = this[Symbol.metadata];
if (t !== null) {
const e = litPropertyMetadata.get(t);
if (e !== void 0) for (const [i, r] of e) this.elementProperties.set(i, r);
const s = litPropertyMetadata.get(t);
if (s !== void 0) for (const [i, r] of s) this.elementProperties.set(i, r);
}
this._$Eh = /* @__PURE__ */ new Map();
for (const [e, i] of this.elementProperties) {
const r = this._$Eu(e, i);
r !== void 0 && this._$Eh.set(r, e);
for (const [s, i] of this.elementProperties) {
const r = this._$Eu(s, i);
r !== void 0 && this._$Eh.set(r, s);
}

@@ -744,11 +754,11 @@ this.elementStyles = this.finalizeStyles(this.styles);

static finalizeStyles(t) {
const e = [];
const s = [];
if (Array.isArray(t)) {
const i = new Set(t.flat(1 / 0).reverse());
for (const r of i) e.unshift(ut(r));
} else t !== void 0 && e.push(ut(t));
return e;
for (const r of i) s.unshift(ut(r));
} else t !== void 0 && s.push(ut(t));
return s;
}
static _$Eu(t, e) {
const i = e.attribute;
static _$Eu(t, s) {
const i = s.attribute;
return i === !1 ? void 0 : typeof i == "string" ? i : typeof t == "string" ? t.toLowerCase() : void 0;

@@ -769,4 +779,4 @@ }

_$E_() {
const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
for (const i of e.keys()) this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
const t = /* @__PURE__ */ new Map(), s = this.constructor.elementProperties;
for (const i of s.keys()) this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
t.size > 0 && (this._$Ep = t);

@@ -776,3 +786,3 @@ }

const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
return ae(t, this.constructor.elementStyles), t;
return he(t, this.constructor.elementStyles), t;
}

@@ -787,13 +797,13 @@ connectedCallback() {

}
attributeChangedCallback(t, e, i) {
attributeChangedCallback(t, s, i) {
this._$AK(t, i);
}
_$ET(t, e) {
_$ET(t, s) {
const i = this.constructor.elementProperties.get(t), r = this.constructor._$Eu(t, i);
if (r !== void 0 && i.reflect === !0) {
const n = (i.converter?.toAttribute !== void 0 ? i.converter : L).toAttribute(e, i.type);
const n = (i.converter?.toAttribute !== void 0 ? i.converter : L).toAttribute(s, i.type);
this._$Em = t, n == null ? this.removeAttribute(r) : this.setAttribute(r, n), this._$Em = null;
}
}
_$AK(t, e) {
_$AK(t, s) {
const i = this.constructor, r = i._$Eh.get(t);

@@ -803,16 +813,16 @@ if (r !== void 0 && this._$Em !== r) {

this._$Em = r;
const a = o.fromAttribute(e, n.type);
const a = o.fromAttribute(s, n.type);
this[r] = a ?? this._$Ej?.get(r) ?? a, this._$Em = null;
}
}
requestUpdate(t, e, i, r = !1, n) {
requestUpdate(t, s, i, r = !1, n) {
if (t !== void 0) {
const o = this.constructor;
if (r === !1 && (n = this[t]), i ??= o.getPropertyOptions(t), !((i.hasChanged ?? X)(n, e) || i.useDefault && i.reflect && n === this._$Ej?.get(t) && !this.hasAttribute(o._$Eu(t, i)))) return;
this.C(t, e, i);
if (r === !1 && (n = this[t]), i ??= o.getPropertyOptions(t), !((i.hasChanged ?? X)(n, s) || i.useDefault && i.reflect && n === this._$Ej?.get(t) && !this.hasAttribute(o._$Eu(t, i)))) return;
this.C(t, s, i);
}
this.isUpdatePending === !1 && (this._$ES = this._$EP());
}
C(t, e, { useDefault: i, reflect: r, wrapped: n }, o) {
i && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t) && (this._$Ej.set(t, o ?? e ?? this[t]), n !== !0 || o !== void 0) || (this._$AL.has(t) || (this.hasUpdated || i || (e = void 0), this._$AL.set(t, e)), r === !0 && this._$Em !== t && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t));
C(t, s, { useDefault: i, reflect: r, wrapped: n }, o) {
i && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t) && (this._$Ej.set(t, o ?? s ?? this[t]), n !== !0 || o !== void 0) || (this._$AL.has(t) || (this.hasUpdated || i || (s = void 0), this._$AL.set(t, s)), r === !0 && this._$Em !== t && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t));
}

@@ -823,4 +833,4 @@ async _$EP() {

await this._$ES;
} catch (e) {
Promise.reject(e);
} catch (s) {
Promise.reject(s);
}

@@ -847,9 +857,9 @@ const t = this.scheduleUpdate();

let t = !1;
const e = this._$AL;
const s = this._$AL;
try {
t = this.shouldUpdate(e), t ? (this.willUpdate(e), this._$EO?.forEach((i) => i.hostUpdate?.()), this.update(e)) : this._$EM();
t = this.shouldUpdate(s), t ? (this.willUpdate(s), this._$EO?.forEach((i) => i.hostUpdate?.()), this.update(s)) : this._$EM();
} catch (i) {
throw t = !1, this._$EM(), i;
}
t && this._$AE(e);
t && this._$AE(s);
}

@@ -859,3 +869,3 @@ willUpdate(t) {

_$AE(t) {
this._$EO?.forEach((e) => e.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
this._$EO?.forEach((s) => s.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
}

@@ -875,3 +885,3 @@ _$EM() {

update(t) {
this._$Eq &&= this._$Eq.forEach((e) => this._$ET(e, this[e])), this._$EM();
this._$Eq &&= this._$Eq.forEach((s) => this._$ET(s, this[s])), this._$EM();
}

@@ -883,3 +893,3 @@ updated(t) {

}
C.elementStyles = [], C.shadowRootOptions = { mode: "open" }, C[k("elementProperties")] = /* @__PURE__ */ new Map(), C[k("finalized")] = /* @__PURE__ */ new Map(), fe?.({ ReactiveElement: C }), (I.reactiveElementVersions ??= []).push("2.1.2");
C.elementStyles = [], C.shadowRootOptions = { mode: "open" }, C[U("elementProperties")] = /* @__PURE__ */ new Map(), C[U("finalized")] = /* @__PURE__ */ new Map(), $e?.({ ReactiveElement: C }), (I.reactiveElementVersions ??= []).push("2.1.2");
/**

@@ -890,19 +900,19 @@ * @license

*/
const $e = { attribute: !0, type: String, converter: L, reflect: !1, hasChanged: X }, ye = (s = $e, t, e) => {
const { kind: i, metadata: r } = e;
const be = { attribute: !0, type: String, converter: L, reflect: !1, hasChanged: X }, ye = (e = be, t, s) => {
const { kind: i, metadata: r } = s;
let n = globalThis.litPropertyMetadata.get(r);
if (n === void 0 && globalThis.litPropertyMetadata.set(r, n = /* @__PURE__ */ new Map()), i === "setter" && ((s = Object.create(s)).wrapped = !0), n.set(e.name, s), i === "accessor") {
const { name: o } = e;
if (n === void 0 && globalThis.litPropertyMetadata.set(r, n = /* @__PURE__ */ new Map()), i === "setter" && ((e = Object.create(e)).wrapped = !0), n.set(s.name, e), i === "accessor") {
const { name: o } = s;
return { set(a) {
const h = t.get.call(this);
t.set.call(this, a), this.requestUpdate(o, h, s, !0, a);
t.set.call(this, a), this.requestUpdate(o, h, e, !0, a);
}, init(a) {
return a !== void 0 && this.C(o, void 0, s, a), a;
return a !== void 0 && this.C(o, void 0, e, a), a;
} };
}
if (i === "setter") {
const { name: o } = e;
const { name: o } = s;
return function(a) {
const h = this[o];
t.call(this, a), this.requestUpdate(o, h, s, !0, a);
t.call(this, a), this.requestUpdate(o, h, e, !0, a);
};

@@ -912,14 +922,14 @@ }

};
function kt(s) {
return (t, e) => typeof e == "object" ? ye(s, t, e) : ((i, r, n) => {
function Ot(e) {
return (t, s) => typeof s == "object" ? ye(e, t, s) : ((i, r, n) => {
const o = r.hasOwnProperty(n);
return r.constructor.createProperty(n, i), o ? Object.getOwnPropertyDescriptor(r, n) : void 0;
})(s, t, e);
})(e, t, s);
}
var me = Object.defineProperty, be = Object.getOwnPropertyDescriptor, $ = (s, t, e, i) => {
for (var r = i > 1 ? void 0 : i ? be(t, e) : t, n = s.length - 1, o; n >= 0; n--)
(o = s[n]) && (r = (i ? o(t, e, r) : o(r)) || r);
return i && r && me(t, e, r), r;
var me = Object.defineProperty, ve = Object.getOwnPropertyDescriptor, _ = (e, t, s, i) => {
for (var r = i > 1 ? void 0 : i ? ve(t, s) : t, n = e.length - 1, o; n >= 0; n--)
(o = e[n]) && (r = (i ? o(t, s, r) : o(r)) || r);
return i && r && me(t, s, r), r;
};
let F = class extends E {
let F = class extends v {
_isOpen = !1;

@@ -933,4 +943,4 @@ _focusTrap = null;

}
set position(s) {
this._position = s, this._syncPosition();
set position(e) {
this._position = e, this._syncPosition();
}

@@ -947,8 +957,8 @@ // show()/hide()/toggle() are the public API.

_setup() {
const s = this._content, t = this._backdrop, e = this._trigger;
s && !this._setupDone && (this._setupDone = !0, s.setAttribute("role", "dialog"), s.setAttribute("aria-modal", "true"), s.setAttribute("data-hp-overlay-content", ""), s.setAttribute("data-hp-drawer-content", ""), s.setAttribute("data-state", "closed"), s.setAttribute("aria-hidden", "true"), s.addEventListener("keydown", this._handleKeyDown), this._focusTrap = new re(s), this._syncPosition()), t && !t.hasAttribute("data-hp-backdrop") && (t.setAttribute("data-hp-backdrop", ""), t.setAttribute("data-hp-drawer-backdrop", ""), t.setAttribute("data-state", "closed"), t.addEventListener("click", this._hide)), e && !e.hasAttribute("data-hp-setup") && (e.setAttribute("data-hp-setup", ""), e.addEventListener("click", this._show));
const e = this._content, t = this._backdrop, s = this._trigger;
e && !this._setupDone && (this._setupDone = !0, e.setAttribute("role", "dialog"), e.setAttribute("aria-modal", "true"), e.setAttribute("data-hp-overlay-content", ""), e.setAttribute("data-hp-drawer-content", ""), e.setAttribute("data-state", "closed"), e.setAttribute("aria-hidden", "true"), e.addEventListener("keydown", this._handleKeyDown), this._focusTrap = new ne(e), this._syncPosition()), t && !t.hasAttribute("data-hp-backdrop") && (t.setAttribute("data-hp-backdrop", ""), t.setAttribute("data-hp-drawer-backdrop", ""), t.setAttribute("data-state", "closed"), t.addEventListener("click", this._hide)), s && !s.hasAttribute("data-hp-setup") && (s.setAttribute("data-hp-setup", ""), s.addEventListener("click", this._show));
}
_syncPosition() {
const s = this._content;
s && s.setAttribute("data-position", this._position);
const e = this._content;
e && e.setAttribute("data-position", this._position);
}

@@ -967,4 +977,4 @@ get _trigger() {

this._setup(), this._isOpen = !0, this._previousScrollPosition = window.scrollY, document.body.style.overflow = "hidden";
const s = this._content, t = this._backdrop, e = this._trigger;
s && (s.setAttribute("data-state", "open"), s.removeAttribute("aria-hidden")), t && t.setAttribute("data-state", "open"), e && s && (e.setAttribute("aria-expanded", "true"), e.setAttribute("aria-controls", s.id || "")), this._focusTrap?.activate(), this.emit("show");
const e = this._content, t = this._backdrop, s = this._trigger;
e && (e.setAttribute("data-state", "open"), e.removeAttribute("aria-hidden")), t && t.setAttribute("data-state", "open"), s && e && (s.setAttribute("aria-expanded", "true"), s.setAttribute("aria-controls", e.id || "")), this._focusTrap?.activate(), this.emit("show");
};

@@ -974,4 +984,4 @@ _hide = () => {

this._isOpen = !1, document.body.style.overflow = "", window.scrollTo(0, this._previousScrollPosition);
const s = this._content, t = this._backdrop, e = this._trigger;
s && (s.setAttribute("data-state", "closed"), s.setAttribute("aria-hidden", "true")), t && t.setAttribute("data-state", "closed"), e && (e.setAttribute("aria-expanded", "false"), e.removeAttribute("aria-controls")), this._focusTrap?.deactivate(), this.emit("hide");
const e = this._content, t = this._backdrop, s = this._trigger;
e && (e.setAttribute("data-state", "closed"), e.setAttribute("aria-hidden", "true")), t && t.setAttribute("data-state", "closed"), s && (s.setAttribute("aria-expanded", "false"), s.removeAttribute("aria-controls")), this._focusTrap?.deactivate(), this.emit("hide");
};

@@ -991,13 +1001,13 @@ /** Public API */

}
_handleKeyDown = (s) => {
s.key === "Escape" && (s.preventDefault(), this._hide());
_handleKeyDown = (e) => {
e.key === "Escape" && (e.preventDefault(), this._hide());
};
};
$([
kt({ type: String, reflect: !0 })
_([
Ot({ type: String, reflect: !0 })
], F.prototype, "position", 1);
F = $([
w("hp-drawer")
F = _([
g("hp-drawer")
], F);
let V = class extends E {
let V = class extends v {
disabled = !1;

@@ -1010,24 +1020,30 @@ connectedCallback() {

}
attributeChangedCallback(s, t, e) {
super.attributeChangedCallback(s, t, e), s === "disabled" && (e !== null ? (this.setAttribute("aria-disabled", "true"), this.removeAttribute("tabindex")) : (this.removeAttribute("aria-disabled"), this.setAttribute("tabindex", "0")));
attributeChangedCallback(e, t, s) {
super.attributeChangedCallback(e, t, s), e === "disabled" && (s !== null ? (this.setAttribute("aria-disabled", "true"), this.removeAttribute("tabindex")) : (this.removeAttribute("aria-disabled"), this.setAttribute("tabindex", "0")));
}
_handleKeyDown = (s) => {
(s.key === "Enter" || s.key === " ") && (s.preventDefault(), this.click());
_handleKeyDown = (e) => {
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), this.click());
};
};
$([
kt({ type: Boolean, reflect: !0 })
_([
Ot({ type: Boolean, reflect: !0 })
], V.prototype, "disabled", 2);
V = $([
w("hp-drawer-trigger")
V = _([
g("hp-drawer-trigger")
], V);
let $t = class extends E {
let $t = class extends v {
connectedCallback() {
super.connectedCallback(), this.setAttribute("data-hp-component", "drawer-content"), this.id || (this.id = `hp-drawer-content-${this.hpId}`);
super.connectedCallback(), this.setAttribute("data-hp-component", "drawer-content"), this.id || (this.id = `hp-drawer-content-${this.hpId}`), this._linkAria(), requestAnimationFrame(() => this._linkAria());
}
_linkAria() {
const e = this.closest("hp-drawer");
if (!e) return;
const t = e.querySelector("hp-drawer-title"), s = e.querySelector("hp-drawer-description");
t?.id ? this.setAttribute("aria-labelledby", t.id) : this.removeAttribute("aria-labelledby"), s?.id ? this.setAttribute("aria-describedby", s.id) : this.removeAttribute("aria-describedby");
}
};
$t = $([
w("hp-drawer-content")
$t = _([
g("hp-drawer-content")
], $t);
let yt = class extends E {
let bt = class extends v {
connectedCallback() {

@@ -1037,14 +1053,22 @@ super.connectedCallback(), this.setAttribute("data-hp-component", "drawer-backdrop");

};
yt = $([
w("hp-drawer-backdrop")
bt = _([
g("hp-drawer-backdrop")
], bt);
let yt = class extends v {
connectedCallback() {
super.connectedCallback(), this.setAttribute("data-hp-component", "drawer-title"), this.id || (this.id = `hp-drawer-title-${this.hpId}`);
}
};
yt = _([
g("hp-drawer-title")
], yt);
let mt = class extends E {
let mt = class extends v {
connectedCallback() {
super.connectedCallback(), this.setAttribute("data-hp-component", "drawer-title");
super.connectedCallback(), this.setAttribute("data-hp-component", "drawer-description"), this.id || (this.id = `hp-drawer-description-${this.hpId}`);
}
};
mt = $([
w("hp-drawer-title")
mt = _([
g("hp-drawer-description")
], mt);
let bt = class extends E {
let vt = class extends v {
connectedCallback() {

@@ -1059,16 +1083,17 @@ super.connectedCallback(), this.setAttribute("data-hp-component", "drawer-close"), this.hasAttribute("role") || this.setAttribute("role", "button"), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "0"), this.addEventListener("click", this._onClick), this.addEventListener("keydown", this._onKeyDown);

};
_onKeyDown = (s) => {
(s.key === "Enter" || s.key === " ") && (s.preventDefault(), this._onClick());
_onKeyDown = (e) => {
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), this._onClick());
};
};
bt = $([
w("hp-drawer-close")
], bt);
vt = _([
g("hp-drawer-close")
], vt);
export {
F as HeadlessDrawer,
yt as HeadlessDrawerBackdrop,
bt as HeadlessDrawerClose,
bt as HeadlessDrawerBackdrop,
vt as HeadlessDrawerClose,
$t as HeadlessDrawerContent,
mt as HeadlessDrawerTitle,
mt as HeadlessDrawerDescription,
yt as HeadlessDrawerTitle,
V as HeadlessDrawerTrigger
};

@@ -1,15 +0,15 @@

(function(l,f){typeof exports=="object"&&typeof module<"u"?f(exports):typeof define=="function"&&define.amd?define(["exports"],f):(l=typeof globalThis<"u"?globalThis:l||self,f(l.HeadlessPrimitivesDrawer={}))})(this,function(l){"use strict";var f=globalThis,q=f.ShadowRoot&&(f.ShadyCSS===void 0||f.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,X=Symbol(),tt=new WeakMap,St=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==X)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(q&&t===void 0){let i=e!==void 0&&e.length===1;i&&(t=tt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&tt.set(e,t))}return t}toString(){return this.cssText}},Ct=s=>new St(typeof s=="string"?s:s+"",void 0,X),Pt=(s,t)=>{if(q)s.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let i=document.createElement("style"),r=f.litNonce;r!==void 0&&i.setAttribute("nonce",r),i.textContent=e.cssText,s.appendChild(i)}},et=q?s=>s:s=>s instanceof CSSStyleSheet?(t=>{let e="";for(let i of t.cssRules)e+=i.cssText;return Ct(e)})(s):s,{is:kt,defineProperty:Ut,getOwnPropertyDescriptor:Ot,getOwnPropertyNames:Dt,getOwnPropertySymbols:Ht,getPrototypeOf:Tt}=Object,M=globalThis,st=M.trustedTypes,Mt=st?st.emptyScript:"",Rt=M.reactiveElementPolyfillSupport,P=(s,t)=>s,B={toAttribute(s,t){switch(t){case Boolean:s=s?Mt:null;break;case Object:case Array:s=s==null?s:JSON.stringify(s)}return s},fromAttribute(s,t){let e=s;switch(t){case Boolean:e=s!==null;break;case Number:e=s===null?null:Number(s);break;case Object:case Array:try{e=JSON.parse(s)}catch{e=null}}return e}},it=(s,t)=>!kt(s,t),rt={attribute:!0,type:String,converter:B,reflect:!1,useDefault:!1,hasChanged:it};Symbol.metadata??=Symbol("metadata"),M.litPropertyMetadata??=new WeakMap;var A=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=rt){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let i=Symbol(),r=this.getPropertyDescriptor(t,i,e);r!==void 0&&Ut(this.prototype,t,r)}}static getPropertyDescriptor(t,e,i){let{get:r,set:n}=Ot(this.prototype,t)??{get(){return this[e]},set(o){this[e]=o}};return{get:r,set(o){let a=r?.call(this);n?.call(this,o),this.requestUpdate(t,a,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??rt}static _$Ei(){if(this.hasOwnProperty(P("elementProperties")))return;let t=Tt(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(P("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(P("properties"))){let e=this.properties,i=[...Dt(e),...Ht(e)];for(let r of i)this.createProperty(r,e[r])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[i,r]of e)this.elementProperties.set(i,r)}this._$Eh=new Map;for(let[e,i]of this.elementProperties){let r=this._$Eu(e,i);r!==void 0&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let i=new Set(t.flat(1/0).reverse());for(let r of i)e.unshift(et(r))}else t!==void 0&&e.push(et(t));return e}static _$Eu(t,e){let i=e.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Pt(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ET(t,e){let i=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,i);if(r!==void 0&&i.reflect===!0){let n=(i.converter?.toAttribute===void 0?B:i.converter).toAttribute(e,i.type);this._$Em=t,n==null?this.removeAttribute(r):this.setAttribute(r,n),this._$Em=null}}_$AK(t,e){let i=this.constructor,r=i._$Eh.get(t);if(r!==void 0&&this._$Em!==r){let n=i.getPropertyOptions(r),o=typeof n.converter=="function"?{fromAttribute:n.converter}:n.converter?.fromAttribute===void 0?B:n.converter;this._$Em=r;let a=o.fromAttribute(e,n.type);this[r]=a??this._$Ej?.get(r)??a,this._$Em=null}}requestUpdate(t,e,i,r=!1,n){if(t!==void 0){let o=this.constructor;if(r===!1&&(n=this[t]),i??=o.getPropertyOptions(t),!((i.hasChanged??it)(n,e)||i.useDefault&&i.reflect&&n===this._$Ej?.get(t)&&!this.hasAttribute(o._$Eu(t,i))))return;this.C(t,e,i)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:i,reflect:r,wrapped:n},o){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,o??e??this[t]),n!==!0||o!==void 0)||(this._$AL.has(t)||(this.hasUpdated||i||(e=void 0),this._$AL.set(t,e)),r===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[r,n]of this._$Ep)this[r]=n;this._$Ep=void 0}let i=this.constructor.elementProperties;if(i.size>0)for(let[r,n]of i){let{wrapped:o}=n,a=this[r];o!==!0||this._$AL.has(r)||a===void 0||this.C(r,void 0,n,a)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(i=>i.hostUpdate?.()),this.update(e)):this._$EM()}catch(i){throw t=!1,this._$EM(),i}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(t){}firstUpdated(t){}};A.elementStyles=[],A.shadowRootOptions={mode:"open"},A[P("elementProperties")]=new Map,A[P("finalized")]=new Map,Rt?.({ReactiveElement:A}),(M.reactiveElementVersions??=[]).push("2.1.2");var K=globalThis,nt=s=>s,R=K.trustedTypes,ot=R?R.createPolicy("lit-html",{createHTML:s=>s}):void 0,at="$lit$",$=`lit$${Math.random().toFixed(9).slice(2)}$`,ht="?"+$,xt=`<${ht}>`,b=document,k=()=>b.createComment(""),U=s=>s===null||typeof s!="object"&&typeof s!="function",F=Array.isArray,Lt=s=>F(s)||typeof s?.[Symbol.iterator]=="function",V=`[
\f\r]`,O=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,lt=/-->/g,dt=/>/g,g=RegExp(`>|${V}(?:([^\\s"'>=/]+)(${V}*=${V}*(?:[^
\f\r"'\`<>=]|("|')|))|$)`,"g"),ct=/'/g,ut=/"/g,pt=/^(?:script|style|textarea|title)$/i,E=Symbol.for("lit-noChange"),c=Symbol.for("lit-nothing"),_t=new WeakMap,v=b.createTreeWalker(b,129);function ft(s,t){if(!F(s)||!s.hasOwnProperty("raw"))throw Error("invalid template strings array");return ot===void 0?t:ot.createHTML(t)}var Nt=(s,t)=>{let e=s.length-1,i=[],r,n=t===2?"<svg>":t===3?"<math>":"",o=O;for(let a=0;a<e;a++){let h=s[a],I,p,d=-1,_=0;for(;_<h.length&&(o.lastIndex=_,p=o.exec(h),p!==null);)_=o.lastIndex,o===O?p[1]==="!--"?o=lt:p[1]===void 0?p[2]===void 0?p[3]!==void 0&&(o=g):(pt.test(p[2])&&(r=RegExp("</"+p[2],"g")),o=g):o=dt:o===g?p[0]===">"?(o=r??O,d=-1):p[1]===void 0?d=-2:(d=o.lastIndex-p[2].length,I=p[1],o=p[3]===void 0?g:p[3]==='"'?ut:ct):o===ut||o===ct?o=g:o===lt||o===dt?o=O:(o=g,r=void 0);let m=o===g&&s[a+1].startsWith("/>")?" ":"";n+=o===O?h+xt:d>=0?(i.push(I),h.slice(0,d)+at+h.slice(d)+$+m):h+$+(d===-2?a:m)}return[ft(s,n+(s[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),i]},W=class Et{constructor({strings:t,_$litType$:e},i){let r;this.parts=[];let n=0,o=0,a=t.length-1,h=this.parts,[I,p]=Nt(t,e);if(this.el=Et.createElement(I,i),v.currentNode=this.el.content,e===2||e===3){let d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(r=v.nextNode())!==null&&h.length<a;){if(r.nodeType===1){if(r.hasAttributes())for(let d of r.getAttributeNames())if(d.endsWith(at)){let _=p[o++],m=r.getAttribute(d).split($),z=/([.?@])?(.*)/.exec(_);h.push({type:1,index:n,name:z[2],strings:m,ctor:z[1]==="."?It:z[1]==="?"?zt:z[1]==="@"?qt:x}),r.removeAttribute(d)}else d.startsWith($)&&(h.push({type:6,index:n}),r.removeAttribute(d));if(pt.test(r.tagName)){let d=r.textContent.split($),_=d.length-1;if(_>0){r.textContent=R?R.emptyScript:"";for(let m=0;m<_;m++)r.append(d[m],k()),v.nextNode(),h.push({type:2,index:++n});r.append(d[_],k())}}}else if(r.nodeType===8)if(r.data===ht)h.push({type:2,index:n});else{let d=-1;for(;(d=r.data.indexOf($,d+1))!==-1;)h.push({type:7,index:n}),d+=$.length-1}n++}}static createElement(t,e){let i=b.createElement("template");return i.innerHTML=t,i}};function w(s,t,e=s,i){if(t===E)return t;let r=i===void 0?e._$Cl:e._$Co?.[i],n=U(t)?void 0:t._$litDirective$;return r?.constructor!==n&&(r?._$AO?.(!1),n===void 0?r=void 0:(r=new n(s),r._$AT(s,e,i)),i===void 0?e._$Cl=r:(e._$Co??=[])[i]=r),r!==void 0&&(t=w(s,r._$AS(s,t.values),r,i)),t}var jt=class{constructor(s,t){this._$AV=[],this._$AN=void 0,this._$AD=s,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(s){let{el:{content:t},parts:e}=this._$AD,i=(s?.creationScope??b).importNode(t,!0);v.currentNode=i;let r=v.nextNode(),n=0,o=0,a=e[0];for(;a!==void 0;){if(n===a.index){let h;a.type===2?h=new J(r,r.nextSibling,this,s):a.type===1?h=new a.ctor(r,a.name,a.strings,this,s):a.type===6&&(h=new Bt(r,this,s)),this._$AV.push(h),a=e[++o]}n!==a?.index&&(r=v.nextNode(),n++)}return v.currentNode=b,i}p(s){let t=0;for(let e of this._$AV)e!==void 0&&(e.strings===void 0?e._$AI(s[t]):(e._$AI(s,e,t),t+=e.strings.length-2)),t++}},J=class wt{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,i,r){this.type=2,this._$AH=c,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=w(this,t,e),U(t)?t===c||t==null||t===""?(this._$AH!==c&&this._$AR(),this._$AH=c):t!==this._$AH&&t!==E&&this._(t):t._$litType$===void 0?t.nodeType===void 0?Lt(t)?this.k(t):this._(t):this.T(t):this.$(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==c&&U(this._$AH)?this._$AA.nextSibling.data=t:this.T(b.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:i}=t,r=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=W.createElement(ft(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===r)this._$AH.p(e);else{let n=new jt(r,this),o=n.u(this.options);n.p(e),this.T(o),this._$AH=n}}_$AC(t){let e=_t.get(t.strings);return e===void 0&&_t.set(t.strings,e=new W(t)),e}k(t){F(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,i,r=0;for(let n of t)r===e.length?e.push(i=new wt(this.O(k()),this.O(k()),this,this.options)):i=e[r],i._$AI(n),r++;r<e.length&&(this._$AR(i&&i._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let i=nt(t).nextSibling;nt(t).remove(),t=i}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},x=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(s,t,e,i,r){this.type=1,this._$AH=c,this._$AN=void 0,this.element=s,this.name=t,this._$AM=i,this.options=r,e.length>2||e[0]!==""||e[1]!==""?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=c}_$AI(s,t=this,e,i){let r=this.strings,n=!1;if(r===void 0)s=w(this,s,t,0),n=!U(s)||s!==this._$AH&&s!==E,n&&(this._$AH=s);else{let o=s,a,h;for(s=r[0],a=0;a<r.length-1;a++)h=w(this,o[e+a],t,a),h===E&&(h=this._$AH[a]),n||=!U(h)||h!==this._$AH[a],h===c?s=c:s!==c&&(s+=(h??"")+r[a+1]),this._$AH[a]=h}n&&!i&&this.j(s)}j(s){s===c?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,s??"")}},It=class extends x{constructor(){super(...arguments),this.type=3}j(s){this.element[this.name]=s===c?void 0:s}},zt=class extends x{constructor(){super(...arguments),this.type=4}j(s){this.element.toggleAttribute(this.name,!!s&&s!==c)}},qt=class extends x{constructor(s,t,e,i,r){super(s,t,e,i,r),this.type=5}_$AI(s,t=this){if((s=w(this,s,t,0)??c)===E)return;let e=this._$AH,i=s===c&&e!==c||s.capture!==e.capture||s.once!==e.once||s.passive!==e.passive,r=s!==c&&(e===c||i);i&&this.element.removeEventListener(this.name,this,e),r&&this.element.addEventListener(this.name,this,s),this._$AH=s}handleEvent(s){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,s):this._$AH.handleEvent(s)}},Bt=class{constructor(s,t,e){this.element=s,this.type=6,this._$AN=void 0,this._$AM=t,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(s){w(this,s)}},Kt=K.litHtmlPolyfillSupport;Kt?.(W,J),(K.litHtmlVersions??=[]).push("3.3.2");var Ft=(s,t,e)=>{let i=e?.renderBefore??t,r=i._$litPart$;if(r===void 0){let n=e?.renderBefore??null;i._$litPart$=r=new J(t.insertBefore(k(),n),n,void 0,e??{})}return r._$AI(s),r},Z=globalThis,D=class extends A{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let s=super.createRenderRoot();return this.renderOptions.renderBefore??=s.firstChild,s}update(s){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(s),this._$Do=Ft(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return E}};D._$litElement$=!0,D.finalized=!0,Z.litElementHydrateSupport?.({LitElement:D});var Vt=Z.litElementPolyfillSupport;Vt?.({LitElement:D}),(Z.litElementVersions??=[]).push("4.2.2");var u=[];for(let s=0;s<256;++s)u.push((s+256).toString(16).slice(1));function Wt(s,t=0){return(u[s[t+0]]+u[s[t+1]]+u[s[t+2]]+u[s[t+3]]+"-"+u[s[t+4]]+u[s[t+5]]+"-"+u[s[t+6]]+u[s[t+7]]+"-"+u[s[t+8]]+u[s[t+9]]+"-"+u[s[t+10]]+u[s[t+11]]+u[s[t+12]]+u[s[t+13]]+u[s[t+14]]+u[s[t+15]]).toLowerCase()}var Y,Jt=new Uint8Array(16);function Zt(){if(!Y){if(typeof crypto>"u"||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Y=crypto.getRandomValues.bind(crypto)}return Y(Jt)}var $t={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Yt(s,t,e){s||={};let i=s.random??s.rng?.()??Zt();if(i.length<16)throw Error("Random bytes length must be >= 16");return i[6]=i[6]&15|64,i[8]=i[8]&63|128,Wt(i)}function Gt(s,t,e){return $t.randomUUID&&!t&&!s?$t.randomUUID():Yt(s,t)}function Qt(s="hp"){return`${s}-${Gt()}`}var S=class extends D{createRenderRoot(){return this}emit(s,t){let e=new CustomEvent(`hp-${s}`,{detail:t,bubbles:!0,composed:!0,cancelable:!0});return this.dispatchEvent(e),e}_hpId=Qt();get hpId(){return this._hpId}};function C(s){return function(t){typeof window<"u"&&(customElements.get(s)||customElements.define(s,t))}}var Xt=class{_container;_active=!1;_previouslyFocusedElement=null;_focusableElements=[];constructor(s){this._container=s}activate(){this._active||(this._active=!0,this._previouslyFocusedElement=document.activeElement,this._updateFocusableElements(),this._focusableElements.length>0&&this._focusableElements[0].focus(),document.addEventListener("focusin",this._handleFocusIn),document.addEventListener("keydown",this._handleKeyDown))}deactivate(){this._active&&(this._active=!1,document.removeEventListener("focusin",this._handleFocusIn),document.removeEventListener("keydown",this._handleKeyDown),this._previouslyFocusedElement&&this._previouslyFocusedElement.focus())}_updateFocusableElements(){this._focusableElements=Array.from(this._container.querySelectorAll(["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])","[tabindex]:not([tabindex='-1'])","[contenteditable='true']"].join(", ")))}_handleFocusIn=s=>{if(!this._active)return;let t=s.target;this._container.contains(t)||this._focusableElements.length>0&&this._focusableElements[0].focus()};_handleKeyDown=s=>{if(!this._active||s.key!=="Tab")return;s.preventDefault();let t=this._focusableElements.indexOf(document.activeElement),e;e=s.shiftKey?t>0?t-1:this._focusableElements.length-1:t<this._focusableElements.length-1?t+1:0,this._focusableElements[e].focus()}};/**
(function(l,$){typeof exports=="object"&&typeof module<"u"?$(exports):typeof define=="function"&&define.amd?define(["exports"],$):(l=typeof globalThis<"u"?globalThis:l||self,$(l.HeadlessPrimitivesDrawer={}))})(this,function(l){"use strict";var $=globalThis,q=$.ShadowRoot&&($.ShadyCSS===void 0||$.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,X=Symbol(),tt=new WeakMap,St=class{constructor(t,s,i){if(this._$cssResult$=!0,i!==X)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=s}get styleSheet(){let t=this.o,s=this.t;if(q&&t===void 0){let i=s!==void 0&&s.length===1;i&&(t=tt.get(s)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&tt.set(s,t))}return t}toString(){return this.cssText}},Ct=e=>new St(typeof e=="string"?e:e+"",void 0,X),Pt=(e,t)=>{if(q)e.adoptedStyleSheets=t.map(s=>s instanceof CSSStyleSheet?s:s.styleSheet);else for(let s of t){let i=document.createElement("style"),r=$.litNonce;r!==void 0&&i.setAttribute("nonce",r),i.textContent=s.cssText,e.appendChild(i)}},et=q?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let s="";for(let i of t.cssRules)s+=i.cssText;return Ct(s)})(e):e,{is:kt,defineProperty:Dt,getOwnPropertyDescriptor:Ut,getOwnPropertyNames:Ot,getOwnPropertySymbols:Ht,getPrototypeOf:Tt}=Object,M=globalThis,st=M.trustedTypes,Mt=st?st.emptyScript:"",Rt=M.reactiveElementPolyfillSupport,P=(e,t)=>e,B={toAttribute(e,t){switch(t){case Boolean:e=e?Mt:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let s=e;switch(t){case Boolean:s=e!==null;break;case Number:s=e===null?null:Number(e);break;case Object:case Array:try{s=JSON.parse(e)}catch{s=null}}return s}},it=(e,t)=>!kt(e,t),rt={attribute:!0,type:String,converter:B,reflect:!1,useDefault:!1,hasChanged:it};Symbol.metadata??=Symbol("metadata"),M.litPropertyMetadata??=new WeakMap;var E=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=rt){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let s=Symbol(),i=this.getPropertyDescriptor(e,s,t);i!==void 0&&Dt(this.prototype,e,i)}}static getPropertyDescriptor(e,t,s){let{get:i,set:r}=Ut(this.prototype,e)??{get(){return this[t]},set(n){this[t]=n}};return{get:i,set(n){let o=i?.call(this);r?.call(this,n),this.requestUpdate(e,o,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??rt}static _$Ei(){if(this.hasOwnProperty(P("elementProperties")))return;let e=Tt(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(P("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(P("properties"))){let t=this.properties,s=[...Ot(t),...Ht(t)];for(let i of s)this.createProperty(i,t[i])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[s,i]of t)this.elementProperties.set(s,i)}this._$Eh=new Map;for(let[t,s]of this.elementProperties){let i=this._$Eu(t,s);i!==void 0&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let s=new Set(e.flat(1/0).reverse());for(let i of s)t.unshift(et(i))}else e!==void 0&&t.push(et(e));return t}static _$Eu(e,t){let s=t.attribute;return s===!1?void 0:typeof s=="string"?s:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let s of t.keys())this.hasOwnProperty(s)&&(e.set(s,this[s]),delete this[s]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Pt(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,s){this._$AK(e,s)}_$ET(e,t){let s=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,s);if(i!==void 0&&s.reflect===!0){let r=(s.converter?.toAttribute===void 0?B:s.converter).toAttribute(t,s.type);this._$Em=e,r==null?this.removeAttribute(i):this.setAttribute(i,r),this._$Em=null}}_$AK(e,t){let s=this.constructor,i=s._$Eh.get(e);if(i!==void 0&&this._$Em!==i){let r=s.getPropertyOptions(i),n=typeof r.converter=="function"?{fromAttribute:r.converter}:r.converter?.fromAttribute===void 0?B:r.converter;this._$Em=i;let o=n.fromAttribute(t,r.type);this[i]=o??this._$Ej?.get(i)??o,this._$Em=null}}requestUpdate(e,t,s,i=!1,r){if(e!==void 0){let n=this.constructor;if(i===!1&&(r=this[e]),s??=n.getPropertyOptions(e),!((s.hasChanged??it)(r,t)||s.useDefault&&s.reflect&&r===this._$Ej?.get(e)&&!this.hasAttribute(n._$Eu(e,s))))return;this.C(e,t,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:s,reflect:i,wrapped:r},n){s&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,n??t??this[e]),r!==!0||n!==void 0)||(this._$AL.has(e)||(this.hasUpdated||s||(t=void 0),this._$AL.set(e,t)),i===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[i,r]of this._$Ep)this[i]=r;this._$Ep=void 0}let s=this.constructor.elementProperties;if(s.size>0)for(let[i,r]of s){let{wrapped:n}=r,o=this[i];n!==!0||this._$AL.has(i)||o===void 0||this.C(i,void 0,r,o)}}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(s=>s.hostUpdate?.()),this.update(t)):this._$EM()}catch(s){throw e=!1,this._$EM(),s}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(e){}firstUpdated(e){}};E.elementStyles=[],E.shadowRootOptions={mode:"open"},E[P("elementProperties")]=new Map,E[P("finalized")]=new Map,Rt?.({ReactiveElement:E}),(M.reactiveElementVersions??=[]).push("2.1.2");var K=globalThis,nt=e=>e,R=K.trustedTypes,ot=R?R.createPolicy("lit-html",{createHTML:e=>e}):void 0,at="$lit$",b=`lit$${Math.random().toFixed(9).slice(2)}$`,ht="?"+b,xt=`<${ht}>`,m=document,k=()=>m.createComment(""),D=e=>e===null||typeof e!="object"&&typeof e!="function",F=Array.isArray,Lt=e=>F(e)||typeof e?.[Symbol.iterator]=="function",V=`[
\f\r]`,U=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,lt=/-->/g,dt=/>/g,g=RegExp(`>|${V}(?:([^\\s"'>=/]+)(${V}*=${V}*(?:[^
\f\r"'\`<>=]|("|')|))|$)`,"g"),ct=/'/g,ut=/"/g,pt=/^(?:script|style|textarea|title)$/i,S=Symbol.for("lit-noChange"),c=Symbol.for("lit-nothing"),_t=new WeakMap,v=m.createTreeWalker(m,129);function ft(e,t){if(!F(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return ot===void 0?t:ot.createHTML(t)}var Nt=(e,t)=>{let s=e.length-1,i=[],r,n=t===2?"<svg>":t===3?"<math>":"",o=U;for(let a=0;a<s;a++){let h=e[a],I,p,d=-1,f=0;for(;f<h.length&&(o.lastIndex=f,p=o.exec(h),p!==null);)f=o.lastIndex,o===U?p[1]==="!--"?o=lt:p[1]===void 0?p[2]===void 0?p[3]!==void 0&&(o=g):(pt.test(p[2])&&(r=RegExp("</"+p[2],"g")),o=g):o=dt:o===g?p[0]===">"?(o=r??U,d=-1):p[1]===void 0?d=-2:(d=o.lastIndex-p[2].length,I=p[1],o=p[3]===void 0?g:p[3]==='"'?ut:ct):o===ut||o===ct?o=g:o===lt||o===dt?o=U:(o=g,r=void 0);let y=o===g&&e[a+1].startsWith("/>")?" ":"";n+=o===U?h+xt:d>=0?(i.push(I),h.slice(0,d)+at+h.slice(d)+b+y):h+b+(d===-2?a:y)}return[ft(e,n+(e[s]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),i]},W=class wt{constructor({strings:t,_$litType$:s},i){let r;this.parts=[];let n=0,o=0,a=t.length-1,h=this.parts,[I,p]=Nt(t,s);if(this.el=wt.createElement(I,i),v.currentNode=this.el.content,s===2||s===3){let d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(r=v.nextNode())!==null&&h.length<a;){if(r.nodeType===1){if(r.hasAttributes())for(let d of r.getAttributeNames())if(d.endsWith(at)){let f=p[o++],y=r.getAttribute(d).split(b),z=/([.?@])?(.*)/.exec(f);h.push({type:1,index:n,name:z[2],strings:y,ctor:z[1]==="."?It:z[1]==="?"?zt:z[1]==="@"?qt:x}),r.removeAttribute(d)}else d.startsWith(b)&&(h.push({type:6,index:n}),r.removeAttribute(d));if(pt.test(r.tagName)){let d=r.textContent.split(b),f=d.length-1;if(f>0){r.textContent=R?R.emptyScript:"";for(let y=0;y<f;y++)r.append(d[y],k()),v.nextNode(),h.push({type:2,index:++n});r.append(d[f],k())}}}else if(r.nodeType===8)if(r.data===ht)h.push({type:2,index:n});else{let d=-1;for(;(d=r.data.indexOf(b,d+1))!==-1;)h.push({type:7,index:n}),d+=b.length-1}n++}}static createElement(t,s){let i=m.createElement("template");return i.innerHTML=t,i}};function C(e,t,s=e,i){if(t===S)return t;let r=i===void 0?s._$Cl:s._$Co?.[i],n=D(t)?void 0:t._$litDirective$;return r?.constructor!==n&&(r?._$AO?.(!1),n===void 0?r=void 0:(r=new n(e),r._$AT(e,s,i)),i===void 0?s._$Cl=r:(s._$Co??=[])[i]=r),r!==void 0&&(t=C(e,r._$AS(e,t.values),r,i)),t}var jt=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:s}=this._$AD,i=(e?.creationScope??m).importNode(t,!0);v.currentNode=i;let r=v.nextNode(),n=0,o=0,a=s[0];for(;a!==void 0;){if(n===a.index){let h;a.type===2?h=new J(r,r.nextSibling,this,e):a.type===1?h=new a.ctor(r,a.name,a.strings,this,e):a.type===6&&(h=new Bt(r,this,e)),this._$AV.push(h),a=s[++o]}n!==a?.index&&(r=v.nextNode(),n++)}return v.currentNode=m,i}p(e){let t=0;for(let s of this._$AV)s!==void 0&&(s.strings===void 0?s._$AI(e[t]):(s._$AI(e,s,t),t+=s.strings.length-2)),t++}},J=class Et{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,s,i,r){this.type=2,this._$AH=c,this._$AN=void 0,this._$AA=t,this._$AB=s,this._$AM=i,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,s=this._$AM;return s!==void 0&&t?.nodeType===11&&(t=s.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,s=this){t=C(this,t,s),D(t)?t===c||t==null||t===""?(this._$AH!==c&&this._$AR(),this._$AH=c):t!==this._$AH&&t!==S&&this._(t):t._$litType$===void 0?t.nodeType===void 0?Lt(t)?this.k(t):this._(t):this.T(t):this.$(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==c&&D(this._$AH)?this._$AA.nextSibling.data=t:this.T(m.createTextNode(t)),this._$AH=t}$(t){let{values:s,_$litType$:i}=t,r=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=W.createElement(ft(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===r)this._$AH.p(s);else{let n=new jt(r,this),o=n.u(this.options);n.p(s),this.T(o),this._$AH=n}}_$AC(t){let s=_t.get(t.strings);return s===void 0&&_t.set(t.strings,s=new W(t)),s}k(t){F(this._$AH)||(this._$AH=[],this._$AR());let s=this._$AH,i,r=0;for(let n of t)r===s.length?s.push(i=new Et(this.O(k()),this.O(k()),this,this.options)):i=s[r],i._$AI(n),r++;r<s.length&&(this._$AR(i&&i._$AB.nextSibling,r),s.length=r)}_$AR(t=this._$AA.nextSibling,s){for(this._$AP?.(!1,!0,s);t!==this._$AB;){let i=nt(t).nextSibling;nt(t).remove(),t=i}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},x=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,s,i,r){this.type=1,this._$AH=c,this._$AN=void 0,this.element=e,this.name=t,this._$AM=i,this.options=r,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=c}_$AI(e,t=this,s,i){let r=this.strings,n=!1;if(r===void 0)e=C(this,e,t,0),n=!D(e)||e!==this._$AH&&e!==S,n&&(this._$AH=e);else{let o=e,a,h;for(e=r[0],a=0;a<r.length-1;a++)h=C(this,o[s+a],t,a),h===S&&(h=this._$AH[a]),n||=!D(h)||h!==this._$AH[a],h===c?e=c:e!==c&&(e+=(h??"")+r[a+1]),this._$AH[a]=h}n&&!i&&this.j(e)}j(e){e===c?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},It=class extends x{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===c?void 0:e}},zt=class extends x{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==c)}},qt=class extends x{constructor(e,t,s,i,r){super(e,t,s,i,r),this.type=5}_$AI(e,t=this){if((e=C(this,e,t,0)??c)===S)return;let s=this._$AH,i=e===c&&s!==c||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,r=e!==c&&(s===c||i);i&&this.element.removeEventListener(this.name,this,s),r&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},Bt=class{constructor(e,t,s){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(e){C(this,e)}},Kt=K.litHtmlPolyfillSupport;Kt?.(W,J),(K.litHtmlVersions??=[]).push("3.3.2");var Ft=(e,t,s)=>{let i=s?.renderBefore??t,r=i._$litPart$;if(r===void 0){let n=s?.renderBefore??null;i._$litPart$=r=new J(t.insertBefore(k(),n),n,void 0,s??{})}return r._$AI(e),r},Z=globalThis,O=class extends E{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Ft(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return S}};O._$litElement$=!0,O.finalized=!0,Z.litElementHydrateSupport?.({LitElement:O});var Vt=Z.litElementPolyfillSupport;Vt?.({LitElement:O}),(Z.litElementVersions??=[]).push("4.2.2");var u=[];for(let e=0;e<256;++e)u.push((e+256).toString(16).slice(1));function Wt(e,t=0){return(u[e[t+0]]+u[e[t+1]]+u[e[t+2]]+u[e[t+3]]+"-"+u[e[t+4]]+u[e[t+5]]+"-"+u[e[t+6]]+u[e[t+7]]+"-"+u[e[t+8]]+u[e[t+9]]+"-"+u[e[t+10]]+u[e[t+11]]+u[e[t+12]]+u[e[t+13]]+u[e[t+14]]+u[e[t+15]]).toLowerCase()}var Y,Jt=new Uint8Array(16);function Zt(){if(!Y){if(typeof crypto>"u"||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Y=crypto.getRandomValues.bind(crypto)}return Y(Jt)}var $t={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Yt(e,t,s){e||={};let i=e.random??e.rng?.()??Zt();if(i.length<16)throw Error("Random bytes length must be >= 16");return i[6]=i[6]&15|64,i[8]=i[8]&63|128,Wt(i)}function Gt(e,t,s){return $t.randomUUID&&!t&&!e?$t.randomUUID():Yt(e,t)}function Qt(e="hp"){return`${e}-${Gt()}`}var A=class extends O{createRenderRoot(){return this}emit(e,t){let s=new CustomEvent(`hp-${e}`,{detail:t,bubbles:!0,composed:!0,cancelable:!0});return this.dispatchEvent(s),s}_hpId=Qt();get hpId(){return this._hpId}_abortController=null;get signal(){return(!this._abortController||this._abortController.signal.aborted)&&(this._abortController=new AbortController),this._abortController.signal}connectedCallback(){super.connectedCallback(),(!this._abortController||this._abortController.signal.aborted)&&(this._abortController=new AbortController)}disconnectedCallback(){super.disconnectedCallback(),this._abortController?.abort(),this._abortController=null}};function w(e){return function(t){typeof window<"u"&&(customElements.get(e)||customElements.define(e,t))}}var Xt=class{_container;_active=!1;_previouslyFocusedElement=null;_focusableElements=[];constructor(e){this._container=e}activate(){this._active||(this._active=!0,this._previouslyFocusedElement=document.activeElement,this._updateFocusableElements(),this._focusableElements.length>0&&this._focusableElements[0].focus(),document.addEventListener("focusin",this._handleFocusIn),document.addEventListener("keydown",this._handleKeyDown))}deactivate(){this._active&&(this._active=!1,document.removeEventListener("focusin",this._handleFocusIn),document.removeEventListener("keydown",this._handleKeyDown),this._previouslyFocusedElement&&this._previouslyFocusedElement.focus())}_updateFocusableElements(){this._focusableElements=Array.from(this._container.querySelectorAll(["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])","[tabindex]:not([tabindex='-1'])","[contenteditable='true']"].join(", ")))}_handleFocusIn=e=>{if(!this._active)return;let t=e.target;this._container.contains(t)||this._focusableElements.length>0&&this._focusableElements[0].focus()};_handleKeyDown=e=>{if(!this._active||e.key!=="Tab")return;e.preventDefault();let t=this._focusableElements.indexOf(document.activeElement),s;s=e.shiftKey?t>0?t-1:this._focusableElements.length-1:t<this._focusableElements.length-1?t+1:0,this._focusableElements[s].focus()}};/**
* @license
* Copyright 2019 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const L=globalThis,G=L.ShadowRoot&&(L.ShadyCSS===void 0||L.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,yt=Symbol(),mt=new WeakMap;let te=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==yt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(G&&t===void 0){const i=e!==void 0&&e.length===1;i&&(t=mt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&mt.set(e,t))}return t}toString(){return this.cssText}};const ee=s=>new te(typeof s=="string"?s:s+"",void 0,yt),se=(s,t)=>{if(G)s.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const i=document.createElement("style"),r=L.litNonce;r!==void 0&&i.setAttribute("nonce",r),i.textContent=e.cssText,s.appendChild(i)}},bt=G?s=>s:s=>s instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return ee(e)})(s):s;/**
*/const L=globalThis,G=L.ShadowRoot&&(L.ShadyCSS===void 0||L.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,bt=Symbol(),yt=new WeakMap;let te=class{constructor(t,s,i){if(this._$cssResult$=!0,i!==bt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=s}get styleSheet(){let t=this.o;const s=this.t;if(G&&t===void 0){const i=s!==void 0&&s.length===1;i&&(t=yt.get(s)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&yt.set(s,t))}return t}toString(){return this.cssText}};const ee=e=>new te(typeof e=="string"?e:e+"",void 0,bt),se=(e,t)=>{if(G)e.adoptedStyleSheets=t.map(s=>s instanceof CSSStyleSheet?s:s.styleSheet);else for(const s of t){const i=document.createElement("style"),r=L.litNonce;r!==void 0&&i.setAttribute("nonce",r),i.textContent=s.cssText,e.appendChild(i)}},mt=G?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let s="";for(const i of t.cssRules)s+=i.cssText;return ee(s)})(e):e;/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const{is:ie,defineProperty:re,getOwnPropertyDescriptor:ne,getOwnPropertyNames:oe,getOwnPropertySymbols:ae,getPrototypeOf:he}=Object,N=globalThis,gt=N.trustedTypes,le=gt?gt.emptyScript:"",de=N.reactiveElementPolyfillSupport,H=(s,t)=>s,j={toAttribute(s,t){switch(t){case Boolean:s=s?le:null;break;case Object:case Array:s=s==null?s:JSON.stringify(s)}return s},fromAttribute(s,t){let e=s;switch(t){case Boolean:e=s!==null;break;case Number:e=s===null?null:Number(s);break;case Object:case Array:try{e=JSON.parse(s)}catch{e=null}}return e}},Q=(s,t)=>!ie(s,t),vt={attribute:!0,type:String,converter:j,reflect:!1,useDefault:!1,hasChanged:Q};Symbol.metadata??=Symbol("metadata"),N.litPropertyMetadata??=new WeakMap;class T extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=vt){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(t,i,e);r!==void 0&&re(this.prototype,t,r)}}static getPropertyDescriptor(t,e,i){const{get:r,set:n}=ne(this.prototype,t)??{get(){return this[e]},set(o){this[e]=o}};return{get:r,set(o){const a=r?.call(this);n?.call(this,o),this.requestUpdate(t,a,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??vt}static _$Ei(){if(this.hasOwnProperty(H("elementProperties")))return;const t=he(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(H("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(H("properties"))){const e=this.properties,i=[...oe(e),...ae(e)];for(const r of i)this.createProperty(r,e[r])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[i,r]of e)this.elementProperties.set(i,r)}this._$Eh=new Map;for(const[e,i]of this.elementProperties){const r=this._$Eu(e,i);r!==void 0&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const r of i)e.unshift(bt(r))}else t!==void 0&&e.push(bt(t));return e}static _$Eu(t,e){const i=e.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return se(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ET(t,e){const i=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,i);if(r!==void 0&&i.reflect===!0){const n=(i.converter?.toAttribute!==void 0?i.converter:j).toAttribute(e,i.type);this._$Em=t,n==null?this.removeAttribute(r):this.setAttribute(r,n),this._$Em=null}}_$AK(t,e){const i=this.constructor,r=i._$Eh.get(t);if(r!==void 0&&this._$Em!==r){const n=i.getPropertyOptions(r),o=typeof n.converter=="function"?{fromAttribute:n.converter}:n.converter?.fromAttribute!==void 0?n.converter:j;this._$Em=r;const a=o.fromAttribute(e,n.type);this[r]=a??this._$Ej?.get(r)??a,this._$Em=null}}requestUpdate(t,e,i,r=!1,n){if(t!==void 0){const o=this.constructor;if(r===!1&&(n=this[t]),i??=o.getPropertyOptions(t),!((i.hasChanged??Q)(n,e)||i.useDefault&&i.reflect&&n===this._$Ej?.get(t)&&!this.hasAttribute(o._$Eu(t,i))))return;this.C(t,e,i)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:i,reflect:r,wrapped:n},o){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,o??e??this[t]),n!==!0||o!==void 0)||(this._$AL.has(t)||(this.hasUpdated||i||(e=void 0),this._$AL.set(t,e)),r===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[r,n]of this._$Ep)this[r]=n;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[r,n]of i){const{wrapped:o}=n,a=this[r];o!==!0||this._$AL.has(r)||a===void 0||this.C(r,void 0,n,a)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(i=>i.hostUpdate?.()),this.update(e)):this._$EM()}catch(i){throw t=!1,this._$EM(),i}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(t){}firstUpdated(t){}}T.elementStyles=[],T.shadowRootOptions={mode:"open"},T[H("elementProperties")]=new Map,T[H("finalized")]=new Map,de?.({ReactiveElement:T}),(N.reactiveElementVersions??=[]).push("2.1.2");/**
*/const{is:ie,defineProperty:re,getOwnPropertyDescriptor:ne,getOwnPropertyNames:oe,getOwnPropertySymbols:ae,getPrototypeOf:he}=Object,N=globalThis,gt=N.trustedTypes,le=gt?gt.emptyScript:"",de=N.reactiveElementPolyfillSupport,H=(e,t)=>e,j={toAttribute(e,t){switch(t){case Boolean:e=e?le:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let s=e;switch(t){case Boolean:s=e!==null;break;case Number:s=e===null?null:Number(e);break;case Object:case Array:try{s=JSON.parse(e)}catch{s=null}}return s}},Q=(e,t)=>!ie(e,t),vt={attribute:!0,type:String,converter:j,reflect:!1,useDefault:!1,hasChanged:Q};Symbol.metadata??=Symbol("metadata"),N.litPropertyMetadata??=new WeakMap;class T extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=vt){if(s.state&&(s.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=!0),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(t,i,s);r!==void 0&&re(this.prototype,t,r)}}static getPropertyDescriptor(t,s,i){const{get:r,set:n}=ne(this.prototype,t)??{get(){return this[s]},set(o){this[s]=o}};return{get:r,set(o){const a=r?.call(this);n?.call(this,o),this.requestUpdate(t,a,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??vt}static _$Ei(){if(this.hasOwnProperty(H("elementProperties")))return;const t=he(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(H("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(H("properties"))){const s=this.properties,i=[...oe(s),...ae(s)];for(const r of i)this.createProperty(r,s[r])}const t=this[Symbol.metadata];if(t!==null){const s=litPropertyMetadata.get(t);if(s!==void 0)for(const[i,r]of s)this.elementProperties.set(i,r)}this._$Eh=new Map;for(const[s,i]of this.elementProperties){const r=this._$Eu(s,i);r!==void 0&&this._$Eh.set(r,s)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const s=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const r of i)s.unshift(mt(r))}else t!==void 0&&s.push(mt(t));return s}static _$Eu(t,s){const i=s.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return se(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,s,i){this._$AK(t,i)}_$ET(t,s){const i=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,i);if(r!==void 0&&i.reflect===!0){const n=(i.converter?.toAttribute!==void 0?i.converter:j).toAttribute(s,i.type);this._$Em=t,n==null?this.removeAttribute(r):this.setAttribute(r,n),this._$Em=null}}_$AK(t,s){const i=this.constructor,r=i._$Eh.get(t);if(r!==void 0&&this._$Em!==r){const n=i.getPropertyOptions(r),o=typeof n.converter=="function"?{fromAttribute:n.converter}:n.converter?.fromAttribute!==void 0?n.converter:j;this._$Em=r;const a=o.fromAttribute(s,n.type);this[r]=a??this._$Ej?.get(r)??a,this._$Em=null}}requestUpdate(t,s,i,r=!1,n){if(t!==void 0){const o=this.constructor;if(r===!1&&(n=this[t]),i??=o.getPropertyOptions(t),!((i.hasChanged??Q)(n,s)||i.useDefault&&i.reflect&&n===this._$Ej?.get(t)&&!this.hasAttribute(o._$Eu(t,i))))return;this.C(t,s,i)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,s,{useDefault:i,reflect:r,wrapped:n},o){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,o??s??this[t]),n!==!0||o!==void 0)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),r===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(s){Promise.reject(s)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[r,n]of this._$Ep)this[r]=n;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[r,n]of i){const{wrapped:o}=n,a=this[r];o!==!0||this._$AL.has(r)||a===void 0||this.C(r,void 0,n,a)}}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach(i=>i.hostUpdate?.()),this.update(s)):this._$EM()}catch(i){throw t=!1,this._$EM(),i}t&&this._$AE(s)}willUpdate(t){}_$AE(t){this._$EO?.forEach(s=>s.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(s=>this._$ET(s,this[s])),this._$EM()}updated(t){}firstUpdated(t){}}T.elementStyles=[],T.shadowRootOptions={mode:"open"},T[H("elementProperties")]=new Map,T[H("finalized")]=new Map,de?.({ReactiveElement:T}),(N.reactiveElementVersions??=[]).push("2.1.2");/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const ce={attribute:!0,type:String,converter:j,reflect:!1,hasChanged:Q},ue=(s=ce,t,e)=>{const{kind:i,metadata:r}=e;let n=globalThis.litPropertyMetadata.get(r);if(n===void 0&&globalThis.litPropertyMetadata.set(r,n=new Map),i==="setter"&&((s=Object.create(s)).wrapped=!0),n.set(e.name,s),i==="accessor"){const{name:o}=e;return{set(a){const h=t.get.call(this);t.set.call(this,a),this.requestUpdate(o,h,s,!0,a)},init(a){return a!==void 0&&this.C(o,void 0,s,a),a}}}if(i==="setter"){const{name:o}=e;return function(a){const h=this[o];t.call(this,a),this.requestUpdate(o,h,s,!0,a)}}throw Error("Unsupported decorator location: "+i)};function At(s){return(t,e)=>typeof e=="object"?ue(s,t,e):((i,r,n)=>{const o=r.hasOwnProperty(n);return r.constructor.createProperty(n,i),o?Object.getOwnPropertyDescriptor(r,n):void 0})(s,t,e)}var pe=Object.defineProperty,_e=Object.getOwnPropertyDescriptor,y=(s,t,e,i)=>{for(var r=i>1?void 0:i?_e(t,e):t,n=s.length-1,o;n>=0;n--)(o=s[n])&&(r=(i?o(t,e,r):o(r))||r);return i&&r&&pe(t,e,r),r};l.HeadlessDrawer=class extends S{_isOpen=!1;_focusTrap=null;_previousScrollPosition=0;_setupDone=!1;_position="left";get position(){return this._position}set position(t){this._position=t,this._syncPosition()}connectedCallback(){super.connectedCallback(),this.setAttribute("data-hp-component","drawer"),this.addEventListener("hp-hide",this._hide),this._setup(),requestAnimationFrame(()=>this._setup())}disconnectedCallback(){super.disconnectedCallback(),this._setupDone=!1,this._content?.removeEventListener("keydown",this._handleKeyDown),this._backdrop?.removeEventListener("click",this._hide),this._trigger?.removeEventListener("click",this._show),this.removeEventListener("hp-hide",this._hide)}_setup(){const t=this._content,e=this._backdrop,i=this._trigger;t&&!this._setupDone&&(this._setupDone=!0,t.setAttribute("role","dialog"),t.setAttribute("aria-modal","true"),t.setAttribute("data-hp-overlay-content",""),t.setAttribute("data-hp-drawer-content",""),t.setAttribute("data-state","closed"),t.setAttribute("aria-hidden","true"),t.addEventListener("keydown",this._handleKeyDown),this._focusTrap=new Xt(t),this._syncPosition()),e&&!e.hasAttribute("data-hp-backdrop")&&(e.setAttribute("data-hp-backdrop",""),e.setAttribute("data-hp-drawer-backdrop",""),e.setAttribute("data-state","closed"),e.addEventListener("click",this._hide)),i&&!i.hasAttribute("data-hp-setup")&&(i.setAttribute("data-hp-setup",""),i.addEventListener("click",this._show))}_syncPosition(){const t=this._content;t&&t.setAttribute("data-position",this._position)}get _trigger(){return this.querySelector("hp-drawer-trigger")}get _content(){return this.querySelector("hp-drawer-content")}get _backdrop(){return this.querySelector("hp-drawer-backdrop")}_show=()=>{if(this._isOpen)return;this._setup(),this._isOpen=!0,this._previousScrollPosition=window.scrollY,document.body.style.overflow="hidden";const t=this._content,e=this._backdrop,i=this._trigger;t&&(t.setAttribute("data-state","open"),t.removeAttribute("aria-hidden")),e&&e.setAttribute("data-state","open"),i&&t&&(i.setAttribute("aria-expanded","true"),i.setAttribute("aria-controls",t.id||"")),this._focusTrap?.activate(),this.emit("show")};_hide=()=>{if(!this._isOpen)return;this._isOpen=!1,document.body.style.overflow="",window.scrollTo(0,this._previousScrollPosition);const t=this._content,e=this._backdrop,i=this._trigger;t&&(t.setAttribute("data-state","closed"),t.setAttribute("aria-hidden","true")),e&&e.setAttribute("data-state","closed"),i&&(i.setAttribute("aria-expanded","false"),i.removeAttribute("aria-controls")),this._focusTrap?.deactivate(),this.emit("hide")};show(){this._show()}hide(){this._hide()}toggle(){this._isOpen?this._hide():this._show()}get isOpen(){return this._isOpen}_handleKeyDown=t=>{t.key==="Escape"&&(t.preventDefault(),this._hide())}},y([At({type:String,reflect:!0})],l.HeadlessDrawer.prototype,"position",1),l.HeadlessDrawer=y([C("hp-drawer")],l.HeadlessDrawer),l.HeadlessDrawerTrigger=class extends S{disabled=!1;connectedCallback(){super.connectedCallback(),this.setAttribute("data-hp-component","drawer-trigger"),this.hasAttribute("role")||this.setAttribute("role","button"),this.disabled||this.setAttribute("tabindex","0"),this.addEventListener("keydown",this._handleKeyDown)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this._handleKeyDown)}attributeChangedCallback(t,e,i){super.attributeChangedCallback(t,e,i),t==="disabled"&&(i!==null?(this.setAttribute("aria-disabled","true"),this.removeAttribute("tabindex")):(this.removeAttribute("aria-disabled"),this.setAttribute("tabindex","0")))}_handleKeyDown=t=>{(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),this.click())}},y([At({type:Boolean,reflect:!0})],l.HeadlessDrawerTrigger.prototype,"disabled",2),l.HeadlessDrawerTrigger=y([C("hp-drawer-trigger")],l.HeadlessDrawerTrigger),l.HeadlessDrawerContent=class extends S{connectedCallback(){super.connectedCallback(),this.setAttribute("data-hp-component","drawer-content"),this.id||(this.id=`hp-drawer-content-${this.hpId}`)}},l.HeadlessDrawerContent=y([C("hp-drawer-content")],l.HeadlessDrawerContent),l.HeadlessDrawerBackdrop=class extends S{connectedCallback(){super.connectedCallback(),this.setAttribute("data-hp-component","drawer-backdrop")}},l.HeadlessDrawerBackdrop=y([C("hp-drawer-backdrop")],l.HeadlessDrawerBackdrop),l.HeadlessDrawerTitle=class extends S{connectedCallback(){super.connectedCallback(),this.setAttribute("data-hp-component","drawer-title")}},l.HeadlessDrawerTitle=y([C("hp-drawer-title")],l.HeadlessDrawerTitle),l.HeadlessDrawerClose=class extends S{connectedCallback(){super.connectedCallback(),this.setAttribute("data-hp-component","drawer-close"),this.hasAttribute("role")||this.setAttribute("role","button"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.addEventListener("click",this._onClick),this.addEventListener("keydown",this._onKeyDown)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._onClick),this.removeEventListener("keydown",this._onKeyDown)}_onClick=()=>{this.emit("hide")};_onKeyDown=t=>{(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),this._onClick())}},l.HeadlessDrawerClose=y([C("hp-drawer-close")],l.HeadlessDrawerClose),Object.defineProperty(l,Symbol.toStringTag,{value:"Module"})});
*/const ce={attribute:!0,type:String,converter:j,reflect:!1,hasChanged:Q},ue=(e=ce,t,s)=>{const{kind:i,metadata:r}=s;let n=globalThis.litPropertyMetadata.get(r);if(n===void 0&&globalThis.litPropertyMetadata.set(r,n=new Map),i==="setter"&&((e=Object.create(e)).wrapped=!0),n.set(s.name,e),i==="accessor"){const{name:o}=s;return{set(a){const h=t.get.call(this);t.set.call(this,a),this.requestUpdate(o,h,e,!0,a)},init(a){return a!==void 0&&this.C(o,void 0,e,a),a}}}if(i==="setter"){const{name:o}=s;return function(a){const h=this[o];t.call(this,a),this.requestUpdate(o,h,e,!0,a)}}throw Error("Unsupported decorator location: "+i)};function At(e){return(t,s)=>typeof s=="object"?ue(e,t,s):((i,r,n)=>{const o=r.hasOwnProperty(n);return r.constructor.createProperty(n,i),o?Object.getOwnPropertyDescriptor(r,n):void 0})(e,t,s)}var pe=Object.defineProperty,_e=Object.getOwnPropertyDescriptor,_=(e,t,s,i)=>{for(var r=i>1?void 0:i?_e(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(r=(i?o(t,s,r):o(r))||r);return i&&r&&pe(t,s,r),r};l.HeadlessDrawer=class extends A{_isOpen=!1;_focusTrap=null;_previousScrollPosition=0;_setupDone=!1;_position="left";get position(){return this._position}set position(t){this._position=t,this._syncPosition()}connectedCallback(){super.connectedCallback(),this.setAttribute("data-hp-component","drawer"),this.addEventListener("hp-hide",this._hide),this._setup(),requestAnimationFrame(()=>this._setup())}disconnectedCallback(){super.disconnectedCallback(),this._setupDone=!1,this._content?.removeEventListener("keydown",this._handleKeyDown),this._backdrop?.removeEventListener("click",this._hide),this._trigger?.removeEventListener("click",this._show),this.removeEventListener("hp-hide",this._hide)}_setup(){const t=this._content,s=this._backdrop,i=this._trigger;t&&!this._setupDone&&(this._setupDone=!0,t.setAttribute("role","dialog"),t.setAttribute("aria-modal","true"),t.setAttribute("data-hp-overlay-content",""),t.setAttribute("data-hp-drawer-content",""),t.setAttribute("data-state","closed"),t.setAttribute("aria-hidden","true"),t.addEventListener("keydown",this._handleKeyDown),this._focusTrap=new Xt(t),this._syncPosition()),s&&!s.hasAttribute("data-hp-backdrop")&&(s.setAttribute("data-hp-backdrop",""),s.setAttribute("data-hp-drawer-backdrop",""),s.setAttribute("data-state","closed"),s.addEventListener("click",this._hide)),i&&!i.hasAttribute("data-hp-setup")&&(i.setAttribute("data-hp-setup",""),i.addEventListener("click",this._show))}_syncPosition(){const t=this._content;t&&t.setAttribute("data-position",this._position)}get _trigger(){return this.querySelector("hp-drawer-trigger")}get _content(){return this.querySelector("hp-drawer-content")}get _backdrop(){return this.querySelector("hp-drawer-backdrop")}_show=()=>{if(this._isOpen)return;this._setup(),this._isOpen=!0,this._previousScrollPosition=window.scrollY,document.body.style.overflow="hidden";const t=this._content,s=this._backdrop,i=this._trigger;t&&(t.setAttribute("data-state","open"),t.removeAttribute("aria-hidden")),s&&s.setAttribute("data-state","open"),i&&t&&(i.setAttribute("aria-expanded","true"),i.setAttribute("aria-controls",t.id||"")),this._focusTrap?.activate(),this.emit("show")};_hide=()=>{if(!this._isOpen)return;this._isOpen=!1,document.body.style.overflow="",window.scrollTo(0,this._previousScrollPosition);const t=this._content,s=this._backdrop,i=this._trigger;t&&(t.setAttribute("data-state","closed"),t.setAttribute("aria-hidden","true")),s&&s.setAttribute("data-state","closed"),i&&(i.setAttribute("aria-expanded","false"),i.removeAttribute("aria-controls")),this._focusTrap?.deactivate(),this.emit("hide")};show(){this._show()}hide(){this._hide()}toggle(){this._isOpen?this._hide():this._show()}get isOpen(){return this._isOpen}_handleKeyDown=t=>{t.key==="Escape"&&(t.preventDefault(),this._hide())}},_([At({type:String,reflect:!0})],l.HeadlessDrawer.prototype,"position",1),l.HeadlessDrawer=_([w("hp-drawer")],l.HeadlessDrawer),l.HeadlessDrawerTrigger=class extends A{disabled=!1;connectedCallback(){super.connectedCallback(),this.setAttribute("data-hp-component","drawer-trigger"),this.hasAttribute("role")||this.setAttribute("role","button"),this.disabled||this.setAttribute("tabindex","0"),this.addEventListener("keydown",this._handleKeyDown)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this._handleKeyDown)}attributeChangedCallback(t,s,i){super.attributeChangedCallback(t,s,i),t==="disabled"&&(i!==null?(this.setAttribute("aria-disabled","true"),this.removeAttribute("tabindex")):(this.removeAttribute("aria-disabled"),this.setAttribute("tabindex","0")))}_handleKeyDown=t=>{(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),this.click())}},_([At({type:Boolean,reflect:!0})],l.HeadlessDrawerTrigger.prototype,"disabled",2),l.HeadlessDrawerTrigger=_([w("hp-drawer-trigger")],l.HeadlessDrawerTrigger),l.HeadlessDrawerContent=class extends A{connectedCallback(){super.connectedCallback(),this.setAttribute("data-hp-component","drawer-content"),this.id||(this.id=`hp-drawer-content-${this.hpId}`),this._linkAria(),requestAnimationFrame(()=>this._linkAria())}_linkAria(){const t=this.closest("hp-drawer");if(!t)return;const s=t.querySelector("hp-drawer-title"),i=t.querySelector("hp-drawer-description");s?.id?this.setAttribute("aria-labelledby",s.id):this.removeAttribute("aria-labelledby"),i?.id?this.setAttribute("aria-describedby",i.id):this.removeAttribute("aria-describedby")}},l.HeadlessDrawerContent=_([w("hp-drawer-content")],l.HeadlessDrawerContent),l.HeadlessDrawerBackdrop=class extends A{connectedCallback(){super.connectedCallback(),this.setAttribute("data-hp-component","drawer-backdrop")}},l.HeadlessDrawerBackdrop=_([w("hp-drawer-backdrop")],l.HeadlessDrawerBackdrop),l.HeadlessDrawerTitle=class extends A{connectedCallback(){super.connectedCallback(),this.setAttribute("data-hp-component","drawer-title"),this.id||(this.id=`hp-drawer-title-${this.hpId}`)}},l.HeadlessDrawerTitle=_([w("hp-drawer-title")],l.HeadlessDrawerTitle),l.HeadlessDrawerDescription=class extends A{connectedCallback(){super.connectedCallback(),this.setAttribute("data-hp-component","drawer-description"),this.id||(this.id=`hp-drawer-description-${this.hpId}`)}},l.HeadlessDrawerDescription=_([w("hp-drawer-description")],l.HeadlessDrawerDescription),l.HeadlessDrawerClose=class extends A{connectedCallback(){super.connectedCallback(),this.setAttribute("data-hp-component","drawer-close"),this.hasAttribute("role")||this.setAttribute("role","button"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.addEventListener("click",this._onClick),this.addEventListener("keydown",this._onKeyDown)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._onClick),this.removeEventListener("keydown",this._onKeyDown)}_onClick=()=>{this.emit("hide")};_onKeyDown=t=>{(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),this._onClick())}},l.HeadlessDrawerClose=_([w("hp-drawer-close")],l.HeadlessDrawerClose),Object.defineProperty(l,Symbol.toStringTag,{value:"Module"})});
{
"name": "@headless-primitives/drawer",
"version": "1.0.0",
"version": "1.1.0",
"description": "Headless drawer primitive for slide-in panels",

@@ -37,3 +37,3 @@ "keywords": [

"lit": "^3.3.2",
"@headless-primitives/utils": "1.0.0"
"@headless-primitives/utils": "1.1.0"
},

@@ -40,0 +40,0 @@ "devDependencies": {