const e = "duet"; let t = !1; const l = "undefined" != typeof window ? window : {}, n = l.CSS, s = l.document || { head: {} }, o = { t: 0, l: "", jmp: e => e(), raf: e => requestAnimationFrame(e), ael: (e, t, l, n) => e.addEventListener(t, l, n), rel: (e, t, l, n) => e.removeEventListener(t, l, n), ce: (e, t) => new CustomEvent(e, t) }, i = e => Promise.resolve(e), c = (() => { try { return new CSSStyleSheet, "function" == typeof (new CSSStyleSheet).replace } catch (e) {} return !1 })(), r = (e, t, l) => { l && l.map((([l, n, s]) => { const i = a(e, l), c = u(t, s), r = f(l); o.ael(i, n, c, r), (t.o = t.o || []).push((() => o.rel(i, n, c, r))) })) }, u = (e, t) => l => { try { 256 & e.t ? e.i[t](l) : (e.u = e.u || []).push([t, l]) } catch (e) { le(e) } }, a = (e, t) => 4 & t ? s : e, f = e => 0 != (2 & e), $ = new WeakMap, d = e => "sc-" + e.$, h = {}, y = e => "object" == (e = typeof e) || "function" === e, p = (e, t, ...l) => { let n = null, s = null, o = !1, i = !1, c = []; const r = t => { for (let l = 0; l < t.length; l++) n = t[l], Array.isArray(n) ? r(n) : null != n && "boolean" != typeof n && ((o = "function" != typeof e && !y(n)) && (n += ""), o && i ? c[c.length - 1].h += n : c.push(o ? m(null, n) : n), i = o) }; if (r(l), t) { t.key && (s = t.key); { const e = t.className || t.class; e && (t.class = "object" != typeof e ? e : Object.keys(e).filter((t => e[t])).join(" ")) } } if ("function" == typeof e) return e(null === t ? {} : t, c, b); const u = m(e, null); return u.p = t, c.length > 0 && (u.m = c), u.g = s, u }, m = (e, t) => ({ t: 0, v: e, h: t, j: null, m: null, p: null, g: null }), w = {}, b = { forEach: (e, t) => e.map(g).forEach(t), map: (e, t) => e.map(g).map(t).map(v) }, g = e => ({ vattrs: e.p, vchildren: e.m, vkey: e.g, vname: e.k, vtag: e.v, vtext: e.h }), v = e => { if ("function" == typeof e.vtag) { const t = Object.assign({}, e.vattrs); return e.vkey && (t.key = e.vkey), e.vname && (t.name = e.vname), p(e.vtag, t, ...e.vchildren || []) } const t = m(e.vtag, e.vtext); return t.p = e.vattrs, t.m = e.vchildren, t.g = e.vkey, t.k = e.vname, t }, j = (e, t, n, s, i, c) => { if (n !== s) { let r = te(e, t), u = t.toLowerCase(); if ("class" === t) { const t = e.classList, l = S(n), o = S(s); t.remove(...l.filter((e => e && !o.includes(e)))), t.add(...o.filter((e => e && !l.includes(e)))) } else if ("key" === t); else if ("ref" === t) s && s(e); else if (r || "o" !== t[0] || "n" !== t[1]) { const l = y(s); if ((r || l && null !== s) && !i) try { if (e.tagName.includes("-")) e[t] = s; else { let l = null == s ? "" : s; "list" === t ? r = !1 : null != n && e[t] == l || (e[t] = l) } } catch (e) {} null == s || !1 === s ? !1 === s && "" !== e.getAttribute(t) || e.removeAttribute(t) : (!r || 4 & c || i) && !l && e.setAttribute(t, s = !0 === s ? "" : s) } else t = "-" === t[2] ? t.slice(3) : te(l, u) ? u.slice(2) : u[2] + t.slice(3), n && o.rel(e, t, n, !1), s && o.ael(e, t, s, !1) } }, k = /\s/, S = e => e ? e.split(k) : [], O = (e, t, l, n) => { const s = 11 === t.j.nodeType && t.j.host ? t.j.host : t.j, o = e && e.p || h, i = t.p || h; for (n in o) n in i || j(s, n, o[n], void 0, l, t.t); for (n in i) j(s, n, o[n], i[n], l, t.t) }, x = (e, l, n) => { let o, i, c = l.m[n], r = 0; if (null !== c.h) o = c.j = s.createTextNode(c.h); else { if (t || (t = "svg" === c.v), o = c.j = s.createElementNS(t ? "http://www.w3.org/2000/svg" : "http://www.w3.org/1999/xhtml", c.v), t && "foreignObject" === c.v && (t = !1), O(null, c, t), c.m) for (r = 0; r < c.m.length; ++r) i = x(e, c, r), i && o.appendChild(i); "svg" === c.v ? t = !1 : "foreignObject" === o.tagName && (t = !0) } return o }, M = (e, t, l, n, s, o) => { let i, c = e; for (; s <= o; ++s) n[s] && (i = x(null, l, s), i && (n[s].j = i, c.insertBefore(i, t))) }, C = (e, t, l, n, s) => { for (; t <= l; ++t)(n = e[t]) && (s = n.j, E(n), s.remove()) }, P = (e, t) => e.v === t.v && e.g === t.g, _ = (e, l) => { const n = l.j = e.j, s = e.m, o = l.m, i = l.v, c = l.h; null === c ? (t = "svg" === i || "foreignObject" !== i && t, O(e, l, t), null !== s && null !== o ? ((e, t, l, n) => { let s, o, i = 0, c = 0, r = 0, u = 0, a = t.length - 1, f = t[0], $ = t[a], d = n.length - 1, h = n[0], y = n[d]; for (; i <= a && c <= d;) if (null == f) f = t[++i]; else if (null == $) $ = t[--a]; else if (null == h) h = n[++c]; else if (null == y) y = n[--d]; else if (P(f, h)) _(f, h), f = t[++i], h = n[++c]; else if (P($, y)) _($, y), $ = t[--a], y = n[--d]; else if (P(f, y)) _(f, y), e.insertBefore(f.j, $.j.nextSibling), f = t[++i], y = n[--d]; else if (P($, h)) _($, h), e.insertBefore($.j, f.j), $ = t[--a], h = n[++c]; else { for (r = -1, u = i; u <= a; ++u) if (t[u] && null !== t[u].g && t[u].g === h.g) { r = u; break } r >= 0 ? (o = t[r], o.v !== h.v ? s = x(t && t[c], l, r) : (_(o, h), t[r] = void 0, s = o.j), h = n[++c]) : (s = x(t && t[c], l, c), h = n[++c]), s && f.j.parentNode.insertBefore(s, f.j) } i > a ? M(e, null == n[d + 1] ? null : n[d + 1].j, l, n, c, d) : c > d && C(t, i, a) })(n, s, l, o) : null !== o ? (null !== e.h && (n.textContent = ""), M(n, null, l, o, 0, o.length - 1)) : null !== s && C(s, 0, s.length - 1), t && "svg" === i && (t = !1)) : e.h !== c && (n.data = c) }, E = e => { e.p && e.p.ref && e.p.ref(null), e.m && e.m.map(E) }, I = e => Y(e).S, T = (e, t, l) => { const n = I(e); return { emit: e => A(n, t, { bubbles: !!(4 & l), composed: !!(2 & l), cancelable: !!(1 & l), detail: e }) } }, A = (e, t, l) => { const n = o.ce(t, l); return e.dispatchEvent(n), n }, F = (e, t) => { t && !e.O && t["s-p"] && t["s-p"].push(new Promise((t => e.O = t))) }, H = (e, t) => { if (!(4 & e.t)) return F(e, e.M), L(e, t); e.t |= 512 }, L = (e, t) => { const l = e.i; return t && (e.t |= 256, e.u && (e.u.map((([e, t]) => q(l, e, t))), e.u = null)), V(void 0, (() => N(e, l, t))) }, N = async (e, t, l) => { const n = e.S, o = n["s-rc"]; l && (e => { const t = e.C; ((e, t) => { let l = d(t), n = oe.get(l); if (e = 11 === e.nodeType ? e : s, n) if ("string" == typeof n) { let t, o = $.get(e = e.head || e); o || $.set(e, o = new Set), o.has(l) || (e.host && (t = e.querySelector(`[sty-id="${l}"]`)) ? t.innerHTML = n : (t = s.createElement("style"), t.innerHTML = n, e.insertBefore(t, e.querySelector("link"))), o && o.add(l)) } else e.adoptedStyleSheets.includes(n) || (e.adoptedStyleSheets = [...e.adoptedStyleSheets, n]) })(e.S.getRootNode(), t) })(e); R(e, t), o && (o.map((e => e())), n["s-rc"] = void 0); { const t = n["s-p"], l = () => U(e); 0 === t.length ? l() : (Promise.all(t).then(l), e.t |= 4, t.length = 0) } }, R = (e, t) => { try { t = t.render(), e.t |= 2, ((e, t) => { const l = e.S, n = e.C, s = e.P || m(null, null), o = (e => e && e.v === w)(t) ? t : p(null, null, t); n._ && (o.p = o.p || {}, n._.map((([e, t]) => o.p[t] = l[e]))), o.v = null, o.t |= 4, e.P = o, o.j = s.j = l, _(s, o) })(e, t) } catch (t) { le(t, e.S) } return null }, U = e => { const t = e.S, l = e.M; 64 & e.t || (e.t |= 64, z(t), e.I(t), l || W()), e.T(t), e.O && (e.O(), e.O = void 0), 512 & e.t && ie((() => H(e, !1))), e.t &= -517 }, W = () => { z(s.documentElement), ie((() => A(l, "appload", { detail: { namespace: "duet" } }))) }, q = (e, t, l) => { if (e && e[t]) try { return e[t](l) } catch (e) { le(e) } }, V = (e, t) => e && e.then ? e.then(t) : t(), z = e => e.classList.add("hydrated"), B = (e, t, l, n, s, o, i) => { let c, r, u, a; if (1 === o.nodeType) { for (c = o.getAttribute("c-id"), c && (r = c.split("."), r[0] !== i && "0" !== r[0] || (u = { t: 0, A: r[0], F: r[1], H: r[2], L: r[3], v: o.tagName.toLowerCase(), j: o, p: null, m: null, g: null, k: null, h: null }, t.push(u), o.removeAttribute("c-id"), e.m || (e.m = []), e.m[u.L] = u, e = u, n && "0" === u.H && (n[u.L] = u.j))), a = o.childNodes.length - 1; a >= 0; a--) B(e, t, l, n, s, o.childNodes[a], i); if (o.shadowRoot) for (a = o.shadowRoot.childNodes.length - 1; a >= 0; a--) B(e, t, l, n, s, o.shadowRoot.childNodes[a], i) } else if (8 === o.nodeType) r = o.nodeValue.split("."), r[1] !== i && "0" !== r[1] || (c = r[0], u = { t: 0, A: r[1], F: r[2], H: r[3], L: r[4], j: o, p: null, m: null, g: null, k: null, v: null, h: null }, "t" === c ? (u.j = o.nextSibling, u.j && 3 === u.j.nodeType && (u.h = u.j.textContent, t.push(u), o.remove(), e.m || (e.m = []), e.m[u.L] = u, n && "0" === u.H && (n[u.L] = u.j))) : u.A === i && "s" === c && (u.v = "slot", o["s-sn"] = r[5] ? u.k = r[5] : "", o["s-sr"] = !0, l.push(u), e.m || (e.m = []), e.m[u.L] = u)); else if (e && "style" === e.v) { const t = m(null, o.textContent); t.j = o, t.L = "0", e.m = [t] } }, D = (e, t) => { if (1 === e.nodeType) { let l = 0; for (; l < e.childNodes.length; l++) D(e.childNodes[l], t); if (e.shadowRoot) for (l = 0; l < e.shadowRoot.childNodes.length; l++) D(e.shadowRoot.childNodes[l], t) } else if (8 === e.nodeType) { const l = e.nodeValue.split("."); "o" === l[0] && (t.set(l[1] + "." + l[2], e), e.nodeValue = "", e["s-en"] = l[3]) } }, G = (e, t, l) => { if (t.N) { e.watchers && (t.R = e.watchers); const n = Object.entries(t.N), s = e.prototype; if (n.map((([e, [n]]) => { 31 & n || 2 & l && 32 & n ? Object.defineProperty(s, e, { get() { return ((e, t) => Y(this).U.get(t))(0, e) }, set(l) { ((e, t, l, n) => { const s = Y(e), o = s.S, i = s.U.get(t), c = s.t, r = s.i; if (l = ((e, t) => null == e || y(e) ? e : 4 & t ? "false" !== e && ("" === e || !!e) : 2 & t ? parseFloat(e) : 1 & t ? e + "" : e)(l, n.N[t][0]), !(8 & c && void 0 !== i || l === i) && (s.U.set(t, l), r)) { if (n.R && 128 & c) { const e = n.R[t]; e && e.map((e => { try { r[e](l, i, t) } catch (e) { le(e, o) } })) } 2 == (18 & c) && H(s, !1) } })(this, e, l, t) }, configurable: !0, enumerable: !0 }) : 1 & l && 64 & n && Object.defineProperty(s, e, { value(...t) { const l = Y(this); return l.W.then((() => l.i[e](...t))) } }) })), 1 & l) { const l = new Map; s.attributeChangedCallback = function (e, t, n) { o.jmp((() => { const t = l.get(e); this[t] = (null !== n || "boolean" != typeof this[t]) && n })) }, e.observedAttributes = n.filter((([e, t]) => 15 & t[0])).map((([e, n]) => { const s = n[1] || e; return l.set(s, e), 512 & n[0] && t._.push([e, s]), s })) } } return e }, J = e => { q(e, "connectedCallback") }, K = e => { if (0 == (1 & o.t)) { const t = Y(e), l = t.C, n = () => {}; if (1 & t.t) r(e, t, l.q), J(t.i); else { let n; t.t |= 1, n = e.getAttribute("s-id"), n && ((e, t, l, n) => { const i = e.shadowRoot, c = [], r = n.P = m(t, null); o.V || D(s.body, o.V = new Map), e["s-id"] = l, e.removeAttribute("s-id"), B(r, c, [], null, e, e, l), c.map((e => { const l = e.A + "." + e.F, n = o.V.get(l), s = e.j; n && "" === n["s-en"] && n.parentNode.insertBefore(s, n.nextSibling), i || (s["s-hn"] = t, n && (s["s-ol"] = n, s["s-ol"]["s-nr"] = s)), o.V.delete(l) })) })(e, l.$, n, t); { let l = e; for (; l = l.parentNode || l.host;) if (1 === l.nodeType && l.hasAttribute("s-id") && l["s-p"] || l["s-p"]) { F(t, t.M = l); break } } l.N && Object.entries(l.N).map((([t, [l]]) => { if (31 & l && e.hasOwnProperty(t)) { const l = e[t]; delete e[t], e[t] = l } })), ie((() => (async (e, t, l, n, s) => { if (0 == (32 & t.t)) { { if (t.t |= 32, (s = se(l)).then) { const e = () => {}; s = await s, e() } s.isProxied || (l.R = s.watchers, G(s, l, 2), s.isProxied = !0); const e = () => {}; t.t |= 8; try { new s(t) } catch (e) { le(e) } t.t &= -9, t.t |= 128, e(), J(t.i) } if (s.style) { let e = s.style; const t = d(l); if (!oe.has(t)) { const n = () => {}; ((e, t, l) => { let n = oe.get(e); c && l ? (n = n || new CSSStyleSheet, n.replace(t)) : n = t, oe.set(e, n) })(t, e, !!(1 & l.t)), n() } } } const o = t.M, i = () => H(t, !0); o && o["s-rc"] ? o["s-rc"].push(i) : i() })(0, t, l))) } n() } }, Q = (e, t = {}) => { const n = [], i = t.exclude || [], c = l.customElements, r = s.head, u = r.querySelector("meta[charset]"), a = s.createElement("style"), f = []; let $, d = !0; Object.assign(o, t), o.l = new URL(t.resourcesUrl || "./", s.baseURI).href, o.t |= 2, e.map((e => e[1].map((t => { const l = { t: t[0], $: t[1], N: t[2], q: t[3] }; l.N = t[2], l.q = t[3], l._ = [], l.R = {}; const s = l.$, r = class extends HTMLElement { constructor(e) { super(e), ee(e = this, l) } connectedCallback() { $ && (clearTimeout($), $ = null), d ? f.push(this) : o.jmp((() => K(this))) } disconnectedCallback() { o.jmp((() => (() => { if (0 == (1 & o.t)) { const e = Y(this); e.o && (e.o.map((e => e())), e.o = void 0) } })())) } componentOnReady() { return Y(this).B } }; l.D = e[0], i.includes(s) || c.get(s) || (n.push(s), c.define(s, G(r, l, 1))) })))), a.innerHTML = n + "{visibility:hidden}.hydrated{visibility:inherit}", a.setAttribute("data-styles", ""), r.insertBefore(a, u ? u.nextSibling : r.firstChild), d = !1, f.length ? f.map((e => e.connectedCallback())) : o.jmp((() => $ = setTimeout(W, 30))) }, X = new WeakMap, Y = e => X.get(e), Z = (e, t) => X.set(t.i = e, t), ee = (e, t) => { const l = { t: 0, S: e, C: t, U: new Map }; return l.W = new Promise((e => l.T = e)), l.B = new Promise((e => l.I = e)), e["s-p"] = [], e["s-rc"] = [], r(e, l, t.q), X.set(e, l) }, te = (e, t) => t in e, le = (e, t) => (0, console.error)(e, t), ne = new Map, se = e => { const t = e.$.replace(/-/g, "_"), l = e.D, n = ne.get(l); return n ? n[t] : __sc_import_duet(`./${l}.entry.js`).then((e => (ne.set(l, e), e[t])), le) }, oe = new Map, ie = e => i().then(e); export { n as C, w as H, e as N, i as a, Q as b, T as c, s as d, I as g, p as h, o as p, Z as r, l as w }