var Se = Object.defineProperty;
var Ce = (o, e, t) => e in o ? Se(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
var d = (o, e, t) => Ce(o, typeof e != "symbol" ? e + "" : e, t);
/**
* @license
* Copyright 2019 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
const B = globalThis, re = B.ShadowRoot && (B.ShadyCSS === void 0 || B.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, ie = Symbol(), se = /* @__PURE__ */ new WeakMap();
let ve = class {
constructor(e, t, r) {
if (this._$cssResult$ = !0, r !== ie) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
this.cssText = e, this.t = t;
}
get styleSheet() {
let e = this.o;
const t = this.t;
if (re && e === void 0) {
const r = t !== void 0 && t.length === 1;
r && (e = se.get(t)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), r && se.set(t, e));
}
return e;
}
toString() {
return this.cssText;
}
};
const ze = (o) => new ve(typeof o == "string" ? o : o + "", void 0, ie), f = (o, ...e) => {
const t = o.length === 1 ? o[0] : e.reduce((r, i, n) => r + ((s) => {
if (s._$cssResult$ === !0) return s.cssText;
if (typeof s == "number") return s;
throw Error("Value passed to 'css' function must be a 'css' function result: " + s + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
})(i) + o[n + 1], o[0]);
return new ve(t, o, ie);
}, Me = (o, e) => {
if (re) o.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet);
else for (const t of e) {
const r = document.createElement("style"), i = B.litNonce;
i !== void 0 && r.setAttribute("nonce", i), r.textContent = t.cssText, o.appendChild(r);
}
}, ne = re ? (o) => o : (o) => o instanceof CSSStyleSheet ? ((e) => {
let t = "";
for (const r of e.cssRules) t += r.cssText;
return ze(t);
})(o) : o;
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
const { is: Te, defineProperty: Pe, getOwnPropertyDescriptor: Ue, getOwnPropertyNames: Oe, getOwnPropertySymbols: Re, getPrototypeOf: He } = Object, y = globalThis, ae = y.trustedTypes, Be = ae ? ae.emptyScript : "", D = y.reactiveElementPolyfillSupport, M = (o, e) => o, F = { toAttribute(o, e) {
switch (e) {
case Boolean:
o = o ? Be : null;
break;
case Object:
case Array:
o = o == null ? o : JSON.stringify(o);
}
return o;
}, fromAttribute(o, e) {
let t = o;
switch (e) {
case Boolean:
t = o !== null;
break;
case Number:
t = o === null ? null : Number(o);
break;
case Object:
case Array:
try {
t = JSON.parse(o);
} catch {
t = null;
}
}
return t;
} }, be = (o, e) => !Te(o, e), le = { attribute: !0, type: String, converter: F, reflect: !1, useDefault: !1, hasChanged: be };
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), y.litPropertyMetadata ?? (y.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
let E = class extends HTMLElement {
static addInitializer(e) {
this._$Ei(), (this.l ?? (this.l = [])).push(e);
}
static get observedAttributes() {
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
}
static createProperty(e, t = le) {
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) {
const r = Symbol(), i = this.getPropertyDescriptor(e, r, t);
i !== void 0 && Pe(this.prototype, e, i);
}
}
static getPropertyDescriptor(e, t, r) {
const { get: i, set: n } = Ue(this.prototype, e) ?? { get() {
return this[t];
}, set(s) {
this[t] = s;
} };
return { get: i, set(s) {
const l = i == null ? void 0 : i.call(this);
n == null || n.call(this, s), this.requestUpdate(e, l, r);
}, configurable: !0, enumerable: !0 };
}
static getPropertyOptions(e) {
return this.elementProperties.get(e) ?? le;
}
static _$Ei() {
if (this.hasOwnProperty(M("elementProperties"))) return;
const e = He(this);
e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties);
}
static finalize() {
if (this.hasOwnProperty(M("finalized"))) return;
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(M("properties"))) {
const t = this.properties, r = [...Oe(t), ...Re(t)];
for (const i of r) this.createProperty(i, t[i]);
}
const e = this[Symbol.metadata];
if (e !== null) {
const t = litPropertyMetadata.get(e);
if (t !== void 0) for (const [r, i] of t) this.elementProperties.set(r, i);
}
this._$Eh = /* @__PURE__ */ new Map();
for (const [t, r] of this.elementProperties) {
const i = this._$Eu(t, r);
i !== void 0 && this._$Eh.set(i, t);
}
this.elementStyles = this.finalizeStyles(this.styles);
}
static finalizeStyles(e) {
const t = [];
if (Array.isArray(e)) {
const r = new Set(e.flat(1 / 0).reverse());
for (const i of r) t.unshift(ne(i));
} else e !== void 0 && t.push(ne(e));
return t;
}
static _$Eu(e, t) {
const r = t.attribute;
return r === !1 ? void 0 : typeof r == "string" ? r : 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() {
var e;
this._$ES = new Promise((t) => this.enableUpdating = t), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), (e = this.constructor.l) == null || e.forEach((t) => t(this));
}
addController(e) {
var t;
(this._$EO ?? (this._$EO = /* @__PURE__ */ new Set())).add(e), this.renderRoot !== void 0 && this.isConnected && ((t = e.hostConnected) == null || t.call(e));
}
removeController(e) {
var t;
(t = this._$EO) == null || t.delete(e);
}
_$E_() {
const e = /* @__PURE__ */ new Map(), t = this.constructor.elementProperties;
for (const r of t.keys()) this.hasOwnProperty(r) && (e.set(r, this[r]), delete this[r]);
e.size > 0 && (this._$Ep = e);
}
createRenderRoot() {
const e = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
return Me(e, this.constructor.elementStyles), e;
}
connectedCallback() {
var e;
this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (e = this._$EO) == null || e.forEach((t) => {
var r;
return (r = t.hostConnected) == null ? void 0 : r.call(t);
});
}
enableUpdating(e) {
}
disconnectedCallback() {
var e;
(e = this._$EO) == null || e.forEach((t) => {
var r;
return (r = t.hostDisconnected) == null ? void 0 : r.call(t);
});
}
attributeChangedCallback(e, t, r) {
this._$AK(e, r);
}
_$ET(e, t) {
var n;
const r = this.constructor.elementProperties.get(e), i = this.constructor._$Eu(e, r);
if (i !== void 0 && r.reflect === !0) {
const s = (((n = r.converter) == null ? void 0 : n.toAttribute) !== void 0 ? r.converter : F).toAttribute(t, r.type);
this._$Em = e, s == null ? this.removeAttribute(i) : this.setAttribute(i, s), this._$Em = null;
}
}
_$AK(e, t) {
var n, s;
const r = this.constructor, i = r._$Eh.get(e);
if (i !== void 0 && this._$Em !== i) {
const l = r.getPropertyOptions(i), a = typeof l.converter == "function" ? { fromAttribute: l.converter } : ((n = l.converter) == null ? void 0 : n.fromAttribute) !== void 0 ? l.converter : F;
this._$Em = i;
const p = a.fromAttribute(t, l.type);
this[i] = p ?? ((s = this._$Ej) == null ? void 0 : s.get(i)) ?? p, this._$Em = null;
}
}
requestUpdate(e, t, r, i = !1, n) {
var s;
if (e !== void 0) {
const l = this.constructor;
if (i === !1 && (n = this[e]), r ?? (r = l.getPropertyOptions(e)), !((r.hasChanged ?? be)(n, t) || r.useDefault && r.reflect && n === ((s = this._$Ej) == null ? void 0 : s.get(e)) && !this.hasAttribute(l._$Eu(e, r)))) return;
this.C(e, t, r);
}
this.isUpdatePending === !1 && (this._$ES = this._$EP());
}
C(e, t, { useDefault: r, reflect: i, wrapped: n }, s) {
r && !(this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Map())).has(e) && (this._$Ej.set(e, s ?? t ?? this[e]), n !== !0 || s !== void 0) || (this._$AL.has(e) || (this.hasUpdated || r || (t = void 0), this._$AL.set(e, t)), i === !0 && this._$Em !== e && (this._$Eq ?? (this._$Eq = /* @__PURE__ */ new Set())).add(e));
}
async _$EP() {
this.isUpdatePending = !0;
try {
await this._$ES;
} catch (t) {
Promise.reject(t);
}
const e = this.scheduleUpdate();
return e != null && await e, !this.isUpdatePending;
}
scheduleUpdate() {
return this.performUpdate();
}
performUpdate() {
var r;
if (!this.isUpdatePending) return;
if (!this.hasUpdated) {
if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
for (const [n, s] of this._$Ep) this[n] = s;
this._$Ep = void 0;
}
const i = this.constructor.elementProperties;
if (i.size > 0) for (const [n, s] of i) {
const { wrapped: l } = s, a = this[n];
l !== !0 || this._$AL.has(n) || a === void 0 || this.C(n, void 0, s, a);
}
}
let e = !1;
const t = this._$AL;
try {
e = this.shouldUpdate(t), e ? (this.willUpdate(t), (r = this._$EO) == null || r.forEach((i) => {
var n;
return (n = i.hostUpdate) == null ? void 0 : n.call(i);
}), this.update(t)) : this._$EM();
} catch (i) {
throw e = !1, this._$EM(), i;
}
e && this._$AE(t);
}
willUpdate(e) {
}
_$AE(e) {
var t;
(t = this._$EO) == null || t.forEach((r) => {
var i;
return (i = r.hostUpdated) == null ? void 0 : i.call(r);
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(e)), this.updated(e);
}
_$EM() {
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
}
get updateComplete() {
return this.getUpdateComplete();
}
getUpdateComplete() {
return this._$ES;
}
shouldUpdate(e) {
return !0;
}
update(e) {
this._$Eq && (this._$Eq = this._$Eq.forEach((t) => this._$ET(t, this[t]))), this._$EM();
}
updated(e) {
}
firstUpdated(e) {
}
};
E.elementStyles = [], E.shadowRootOptions = { mode: "open" }, E[M("elementProperties")] = /* @__PURE__ */ new Map(), E[M("finalized")] = /* @__PURE__ */ new Map(), D == null || D({ ReactiveElement: E }), (y.reactiveElementVersions ?? (y.reactiveElementVersions = [])).push("2.1.2");
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
const T = globalThis, ce = (o) => o, N = T.trustedTypes, de = N ? N.createPolicy("lit-html", { createHTML: (o) => o }) : void 0, xe = "$lit$", x = `lit$${Math.random().toFixed(9).slice(2)}$`, ye = "?" + x, Ne = `<${ye}>`, A = document, P = () => A.createComment(""), U = (o) => o === null || typeof o != "object" && typeof o != "function", oe = Array.isArray, je = (o) => oe(o) || typeof (o == null ? void 0 : o[Symbol.iterator]) == "function", I = `[
\f\r]`, z = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, pe = /-->/g, he = />/g, w = RegExp(`>|${I}(?:([^\\s"'>=/]+)(${I}*=${I}*(?:[^
\f\r"'\`<>=]|("|')|))|$)`, "g"), ue = /'/g, ge = /"/g, we = /^(?:script|style|textarea|title)$/i, $e = (o) => (e, ...t) => ({ _$litType$: o, strings: e, values: t }), c = $e(1), $ = $e(2), S = Symbol.for("lit-noChange"), g = Symbol.for("lit-nothing"), me = /* @__PURE__ */ new WeakMap(), _ = A.createTreeWalker(A, 129);
function _e(o, e) {
if (!oe(o) || !o.hasOwnProperty("raw")) throw Error("invalid template strings array");
return de !== void 0 ? de.createHTML(e) : e;
}
const De = (o, e) => {
const t = o.length - 1, r = [];
let i, n = e === 2 ? "" : e === 3 ? "" : "")), r];
};
class O {
constructor({ strings: e, _$litType$: t }, r) {
let i;
this.parts = [];
let n = 0, s = 0;
const l = e.length - 1, a = this.parts, [p, u] = De(e, t);
if (this.el = O.createElement(p, r), _.currentNode = this.el.content, t === 2 || t === 3) {
const h = this.el.content.firstChild;
h.replaceWith(...h.childNodes);
}
for (; (i = _.nextNode()) !== null && a.length < l; ) {
if (i.nodeType === 1) {
if (i.hasAttributes()) for (const h of i.getAttributeNames()) if (h.endsWith(xe)) {
const v = u[s++], b = i.getAttribute(h).split(x), H = /([.?@])?(.*)/.exec(v);
a.push({ type: 1, index: n, name: H[2], strings: b, ctor: H[1] === "." ? Le : H[1] === "?" ? Ve : H[1] === "@" ? Fe : j }), i.removeAttribute(h);
} else h.startsWith(x) && (a.push({ type: 6, index: n }), i.removeAttribute(h));
if (we.test(i.tagName)) {
const h = i.textContent.split(x), v = h.length - 1;
if (v > 0) {
i.textContent = N ? N.emptyScript : "";
for (let b = 0; b < v; b++) i.append(h[b], P()), _.nextNode(), a.push({ type: 2, index: ++n });
i.append(h[v], P());
}
}
} else if (i.nodeType === 8) if (i.data === ye) a.push({ type: 2, index: n });
else {
let h = -1;
for (; (h = i.data.indexOf(x, h + 1)) !== -1; ) a.push({ type: 7, index: n }), h += x.length - 1;
}
n++;
}
}
static createElement(e, t) {
const r = A.createElement("template");
return r.innerHTML = e, r;
}
}
function C(o, e, t = o, r) {
var s, l;
if (e === S) return e;
let i = r !== void 0 ? (s = t._$Co) == null ? void 0 : s[r] : t._$Cl;
const n = U(e) ? void 0 : e._$litDirective$;
return (i == null ? void 0 : i.constructor) !== n && ((l = i == null ? void 0 : i._$AO) == null || l.call(i, !1), n === void 0 ? i = void 0 : (i = new n(o), i._$AT(o, t, r)), r !== void 0 ? (t._$Co ?? (t._$Co = []))[r] = i : t._$Cl = i), i !== void 0 && (e = C(o, i._$AS(o, e.values), i, r)), e;
}
class Ie {
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) {
const { el: { content: t }, parts: r } = this._$AD, i = ((e == null ? void 0 : e.creationScope) ?? A).importNode(t, !0);
_.currentNode = i;
let n = _.nextNode(), s = 0, l = 0, a = r[0];
for (; a !== void 0; ) {
if (s === a.index) {
let p;
a.type === 2 ? p = new R(n, n.nextSibling, this, e) : a.type === 1 ? p = new a.ctor(n, a.name, a.strings, this, e) : a.type === 6 && (p = new Ye(n, this, e)), this._$AV.push(p), a = r[++l];
}
s !== (a == null ? void 0 : a.index) && (n = _.nextNode(), s++);
}
return _.currentNode = A, i;
}
p(e) {
let t = 0;
for (const r of this._$AV) r !== void 0 && (r.strings !== void 0 ? (r._$AI(e, r, t), t += r.strings.length - 2) : r._$AI(e[t])), t++;
}
}
class R {
get _$AU() {
var e;
return ((e = this._$AM) == null ? void 0 : e._$AU) ?? this._$Cv;
}
constructor(e, t, r, i) {
this.type = 2, this._$AH = g, this._$AN = void 0, this._$AA = e, this._$AB = t, this._$AM = r, this.options = i, this._$Cv = (i == null ? void 0 : i.isConnected) ?? !0;
}
get parentNode() {
let e = this._$AA.parentNode;
const t = this._$AM;
return t !== void 0 && (e == null ? void 0 : e.nodeType) === 11 && (e = t.parentNode), e;
}
get startNode() {
return this._$AA;
}
get endNode() {
return this._$AB;
}
_$AI(e, t = this) {
e = C(this, e, t), U(e) ? e === g || e == null || e === "" ? (this._$AH !== g && this._$AR(), this._$AH = g) : e !== this._$AH && e !== S && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : je(e) ? this.k(e) : this._(e);
}
O(e) {
return this._$AA.parentNode.insertBefore(e, this._$AB);
}
T(e) {
this._$AH !== e && (this._$AR(), this._$AH = this.O(e));
}
_(e) {
this._$AH !== g && U(this._$AH) ? this._$AA.nextSibling.data = e : this.T(A.createTextNode(e)), this._$AH = e;
}
$(e) {
var n;
const { values: t, _$litType$: r } = e, i = typeof r == "number" ? this._$AC(e) : (r.el === void 0 && (r.el = O.createElement(_e(r.h, r.h[0]), this.options)), r);
if (((n = this._$AH) == null ? void 0 : n._$AD) === i) this._$AH.p(t);
else {
const s = new Ie(i, this), l = s.u(this.options);
s.p(t), this.T(l), this._$AH = s;
}
}
_$AC(e) {
let t = me.get(e.strings);
return t === void 0 && me.set(e.strings, t = new O(e)), t;
}
k(e) {
oe(this._$AH) || (this._$AH = [], this._$AR());
const t = this._$AH;
let r, i = 0;
for (const n of e) i === t.length ? t.push(r = new R(this.O(P()), this.O(P()), this, this.options)) : r = t[i], r._$AI(n), i++;
i < t.length && (this._$AR(r && r._$AB.nextSibling, i), t.length = i);
}
_$AR(e = this._$AA.nextSibling, t) {
var r;
for ((r = this._$AP) == null ? void 0 : r.call(this, !1, !0, t); e !== this._$AB; ) {
const i = ce(e).nextSibling;
ce(e).remove(), e = i;
}
}
setConnected(e) {
var t;
this._$AM === void 0 && (this._$Cv = e, (t = this._$AP) == null || t.call(this, e));
}
}
class j {
get tagName() {
return this.element.tagName;
}
get _$AU() {
return this._$AM._$AU;
}
constructor(e, t, r, i, n) {
this.type = 1, this._$AH = g, this._$AN = void 0, this.element = e, this.name = t, this._$AM = i, this.options = n, r.length > 2 || r[0] !== "" || r[1] !== "" ? (this._$AH = Array(r.length - 1).fill(new String()), this.strings = r) : this._$AH = g;
}
_$AI(e, t = this, r, i) {
const n = this.strings;
let s = !1;
if (n === void 0) e = C(this, e, t, 0), s = !U(e) || e !== this._$AH && e !== S, s && (this._$AH = e);
else {
const l = e;
let a, p;
for (e = n[0], a = 0; a < n.length - 1; a++) p = C(this, l[r + a], t, a), p === S && (p = this._$AH[a]), s || (s = !U(p) || p !== this._$AH[a]), p === g ? e = g : e !== g && (e += (p ?? "") + n[a + 1]), this._$AH[a] = p;
}
s && !i && this.j(e);
}
j(e) {
e === g ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
}
}
class Le extends j {
constructor() {
super(...arguments), this.type = 3;
}
j(e) {
this.element[this.name] = e === g ? void 0 : e;
}
}
class Ve extends j {
constructor() {
super(...arguments), this.type = 4;
}
j(e) {
this.element.toggleAttribute(this.name, !!e && e !== g);
}
}
class Fe extends j {
constructor(e, t, r, i, n) {
super(e, t, r, i, n), this.type = 5;
}
_$AI(e, t = this) {
if ((e = C(this, e, t, 0) ?? g) === S) return;
const r = this._$AH, i = e === g && r !== g || e.capture !== r.capture || e.once !== r.once || e.passive !== r.passive, n = e !== g && (r === g || i);
i && this.element.removeEventListener(this.name, this, r), n && this.element.addEventListener(this.name, this, e), this._$AH = e;
}
handleEvent(e) {
var t;
typeof this._$AH == "function" ? this._$AH.call(((t = this.options) == null ? void 0 : t.host) ?? this.element, e) : this._$AH.handleEvent(e);
}
}
class Ye {
constructor(e, t, r) {
this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = r;
}
get _$AU() {
return this._$AM._$AU;
}
_$AI(e) {
C(this, e);
}
}
const L = T.litHtmlPolyfillSupport;
L == null || L(O, R), (T.litHtmlVersions ?? (T.litHtmlVersions = [])).push("3.3.2");
const qe = (o, e, t) => {
const r = (t == null ? void 0 : t.renderBefore) ?? e;
let i = r._$litPart$;
if (i === void 0) {
const n = (t == null ? void 0 : t.renderBefore) ?? null;
r._$litPart$ = i = new R(e.insertBefore(P(), n), n, void 0, t ?? {});
}
return i._$AI(o), i;
};
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
const k = globalThis;
class m extends E {
constructor() {
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
}
createRenderRoot() {
var t;
const e = super.createRenderRoot();
return (t = this.renderOptions).renderBefore ?? (t.renderBefore = e.firstChild), e;
}
update(e) {
const t = this.render();
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = qe(t, this.renderRoot, this.renderOptions);
}
connectedCallback() {
var e;
super.connectedCallback(), (e = this._$Do) == null || e.setConnected(!0);
}
disconnectedCallback() {
var e;
super.disconnectedCallback(), (e = this._$Do) == null || e.setConnected(!1);
}
render() {
return S;
}
}
var fe;
m._$litElement$ = !0, m.finalized = !0, (fe = k.litElementHydrateSupport) == null || fe.call(k, { LitElement: m });
const V = k.litElementPolyfillSupport;
V == null || V({ LitElement: m });
(k.litElementVersions ?? (k.litElementVersions = [])).push("4.2.2");
class Y extends m {
render() {
return c`
${this.imageUrl ? c`` : ""}
${this.text}
${this.hasAttachment ? c`` : ""}Hello from luumiCORE!
`; } } d(Ee, "styles", f` :host { display: block; padding: 16px; color: var(--luumicore-text-color, black); border: 1px solid var(--luumicore-primary, blue); } `); customElements.define("luumicore-element", Ee); export { Ee as LuumicoreElement };