UNPKG

@bikematrix/web-components

Version:
1,360 lines 761 kB
var _i, W, Ia, Ra, Xt, go, za, Zn, qa, di = {}, $a = [], ac = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, pn = Array.isArray; function yt(r, e) { for (var t in e) r[t] = e[t]; return r; } function Va(r) { var e = r.parentNode; e && e.removeChild(r); } function z(r, e, t) { var i, n, s, o = {}; for (s in e) s == "key" ? i = e[s] : s == "ref" ? n = e[s] : o[s] = e[s]; if (arguments.length > 2 && (o.children = arguments.length > 3 ? _i.call(arguments, 2) : t), typeof r == "function" && r.defaultProps != null) for (s in r.defaultProps) o[s] === void 0 && (o[s] = r.defaultProps[s]); return ri(r, o, i, n, null); } function ri(r, e, t, i, n) { var s = { type: r, props: e, key: t, ref: i, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, constructor: void 0, __v: n ?? ++Ia, __i: -1, __u: 0 }; return n == null && W.vnode != null && W.vnode(s), s; } function lc() { return { current: null }; } function $(r) { return r.children; } function Qe(r, e) { this.props = r, this.context = e; } function kr(r, e) { if (e == null) return r.__ ? kr(r.__, r.__i + 1) : null; for (var t; e < r.__k.length; e++) if ((t = r.__k[e]) != null && t.__e != null) return t.__e; return typeof r.type == "function" ? kr(r) : null; } function ja(r) { var e, t; if ((r = r.__) != null && r.__c != null) { for (r.__e = r.__c.base = null, e = 0; e < r.__k.length; e++) if ((t = r.__k[e]) != null && t.__e != null) { r.__e = r.__c.base = t.__e; break; } return ja(r); } } function Xn(r) { (!r.__d && (r.__d = !0) && Xt.push(r) && !Vi.__r++ || go !== W.debounceRendering) && ((go = W.debounceRendering) || za)(Vi); } function Vi() { var r, e, t, i, n, s, o, a, l; for (Xt.sort(Zn); r = Xt.shift(); ) r.__d && (e = Xt.length, i = void 0, s = (n = (t = r).__v).__e, a = [], l = [], (o = t.__P) && ((i = yt({}, n)).__v = n.__v + 1, W.vnode && W.vnode(i), Ss(o, i, n, t.__n, o.ownerSVGElement !== void 0, 32 & n.__u ? [s] : null, a, s ?? kr(n), !!(32 & n.__u), l), i.__v = n.__v, i.__.__k[i.__i] = i, Ga(a, i, l), i.__e != s && ja(i)), Xt.length > e && Xt.sort(Zn)); Vi.__r = 0; } function Ua(r, e, t, i, n, s, o, a, l, u, c) { var d, h, f, v, g, w = i && i.__k || $a, b = e.length; for (t.__d = l, uc(t, e, w), l = t.__d, d = 0; d < b; d++) (f = t.__k[d]) != null && typeof f != "boolean" && typeof f != "function" && (h = f.__i === -1 ? di : w[f.__i] || di, f.__i = d, Ss(r, f, h, n, s, o, a, l, u, c), v = f.__e, f.ref && h.ref != f.ref && (h.ref && Es(h.ref, null, f), c.push(f.ref, f.__c || v, f)), g == null && v != null && (g = v), 65536 & f.__u || h.__k === f.__k ? l = Ha(f, l, r) : typeof f.type == "function" && f.__d !== void 0 ? l = f.__d : v && (l = v.nextSibling), f.__d = void 0, f.__u &= -196609); t.__d = l, t.__e = g; } function uc(r, e, t) { var i, n, s, o, a, l = e.length, u = t.length, c = u, d = 0; for (r.__k = [], i = 0; i < l; i++) o = i + d, (n = r.__k[i] = (n = e[i]) == null || typeof n == "boolean" || typeof n == "function" ? null : typeof n == "string" || typeof n == "number" || typeof n == "bigint" || n.constructor == String ? ri(null, n, null, null, null) : pn(n) ? ri($, { children: n }, null, null, null) : n.constructor === void 0 && n.__b > 0 ? ri(n.type, n.props, n.key, n.ref ? n.ref : null, n.__v) : n) != null ? (n.__ = r, n.__b = r.__b + 1, a = cc(n, t, o, c), n.__i = a, s = null, a !== -1 && (c--, (s = t[a]) && (s.__u |= 131072)), s == null || s.__v === null ? (a == -1 && d--, typeof n.type != "function" && (n.__u |= 65536)) : a !== o && (a === o + 1 ? d++ : a > o ? c > l - o ? d += a - o : d-- : a < o ? a == o - 1 && (d = a - o) : d = 0, a !== i + d && (n.__u |= 65536))) : (s = t[o]) && s.key == null && s.__e && !(131072 & s.__u) && (s.__e == r.__d && (r.__d = kr(s)), Jn(s, s, !1), t[o] = null, c--); if (c) for (i = 0; i < u; i++) (s = t[i]) != null && !(131072 & s.__u) && (s.__e == r.__d && (r.__d = kr(s)), Jn(s, s)); } function Ha(r, e, t) { var i, n; if (typeof r.type == "function") { for (i = r.__k, n = 0; i && n < i.length; n++) i[n] && (i[n].__ = r, e = Ha(i[n], e, t)); return e; } r.__e != e && (t.insertBefore(r.__e, e || null), e = r.__e); do e = e && e.nextSibling; while (e != null && e.nodeType === 8); return e; } function Ct(r, e) { return e = e || [], r == null || typeof r == "boolean" || (pn(r) ? r.some(function(t) { Ct(t, e); }) : e.push(r)), e; } function cc(r, e, t, i) { var n = r.key, s = r.type, o = t - 1, a = t + 1, l = e[t]; if (l === null || l && n == l.key && s === l.type && !(131072 & l.__u)) return t; if (i > (l != null && !(131072 & l.__u) ? 1 : 0)) for (; o >= 0 || a < e.length; ) { if (o >= 0) { if ((l = e[o]) && !(131072 & l.__u) && n == l.key && s === l.type) return o; o--; } if (a < e.length) { if ((l = e[a]) && !(131072 & l.__u) && n == l.key && s === l.type) return a; a++; } } return -1; } function mo(r, e, t) { e[0] === "-" ? r.setProperty(e, t ?? "") : r[e] = t == null ? "" : typeof t != "number" || ac.test(e) ? t : t + "px"; } function Ei(r, e, t, i, n) { var s; e: if (e === "style") if (typeof t == "string") r.style.cssText = t; else { if (typeof i == "string" && (r.style.cssText = i = ""), i) for (e in i) t && e in t || mo(r.style, e, ""); if (t) for (e in t) i && t[e] === i[e] || mo(r.style, e, t[e]); } else if (e[0] === "o" && e[1] === "n") s = e !== (e = e.replace(/(PointerCapture)$|Capture$/i, "$1")), e = e.toLowerCase() in r ? e.toLowerCase().slice(2) : e.slice(2), r.l || (r.l = {}), r.l[e + s] = t, t ? i ? t.u = i.u : (t.u = Date.now(), r.addEventListener(e, s ? vo : bo, s)) : r.removeEventListener(e, s ? vo : bo, s); else { if (n) e = e.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s"); else if (e !== "width" && e !== "height" && e !== "href" && e !== "list" && e !== "form" && e !== "tabIndex" && e !== "download" && e !== "rowSpan" && e !== "colSpan" && e !== "role" && e in r) try { r[e] = t ?? ""; break e; } catch { } typeof t == "function" || (t == null || t === !1 && e[4] !== "-" ? r.removeAttribute(e) : r.setAttribute(e, t)); } } function bo(r) { if (this.l) { var e = this.l[r.type + !1]; if (r.t) { if (r.t <= e.u) return; } else r.t = Date.now(); return e(W.event ? W.event(r) : r); } } function vo(r) { if (this.l) return this.l[r.type + !0](W.event ? W.event(r) : r); } function Ss(r, e, t, i, n, s, o, a, l, u) { var c, d, h, f, v, g, w, b, m, x, _, y, k, A, C, D = e.type; if (e.constructor !== void 0) return null; 128 & t.__u && (l = !!(32 & t.__u), s = [a = e.__e = t.__e]), (c = W.__b) && c(e); e: if (typeof D == "function") try { if (b = e.props, m = (c = D.contextType) && i[c.__c], x = c ? m ? m.props.value : c.__ : i, t.__c ? w = (d = e.__c = t.__c).__ = d.__E : ("prototype" in D && D.prototype.render ? e.__c = d = new D(b, x) : (e.__c = d = new Qe(b, x), d.constructor = D, d.render = pc), m && m.sub(d), d.props = b, d.state || (d.state = {}), d.context = x, d.__n = i, h = d.__d = !0, d.__h = [], d._sb = []), d.__s == null && (d.__s = d.state), D.getDerivedStateFromProps != null && (d.__s == d.state && (d.__s = yt({}, d.__s)), yt(d.__s, D.getDerivedStateFromProps(b, d.__s))), f = d.props, v = d.state, d.__v = e, h) D.getDerivedStateFromProps == null && d.componentWillMount != null && d.componentWillMount(), d.componentDidMount != null && d.__h.push(d.componentDidMount); else { if (D.getDerivedStateFromProps == null && b !== f && d.componentWillReceiveProps != null && d.componentWillReceiveProps(b, x), !d.__e && (d.shouldComponentUpdate != null && d.shouldComponentUpdate(b, d.__s, x) === !1 || e.__v === t.__v)) { for (e.__v !== t.__v && (d.props = b, d.state = d.__s, d.__d = !1), e.__e = t.__e, e.__k = t.__k, e.__k.forEach(function(S) { S && (S.__ = e); }), _ = 0; _ < d._sb.length; _++) d.__h.push(d._sb[_]); d._sb = [], d.__h.length && o.push(d); break e; } d.componentWillUpdate != null && d.componentWillUpdate(b, d.__s, x), d.componentDidUpdate != null && d.__h.push(function() { d.componentDidUpdate(f, v, g); }); } if (d.context = x, d.props = b, d.__P = r, d.__e = !1, y = W.__r, k = 0, "prototype" in D && D.prototype.render) { for (d.state = d.__s, d.__d = !1, y && y(e), c = d.render(d.props, d.state, d.context), A = 0; A < d._sb.length; A++) d.__h.push(d._sb[A]); d._sb = []; } else do d.__d = !1, y && y(e), c = d.render(d.props, d.state, d.context), d.state = d.__s; while (d.__d && ++k < 25); d.state = d.__s, d.getChildContext != null && (i = yt(yt({}, i), d.getChildContext())), h || d.getSnapshotBeforeUpdate == null || (g = d.getSnapshotBeforeUpdate(f, v)), Ua(r, pn(C = c != null && c.type === $ && c.key == null ? c.props.children : c) ? C : [C], e, t, i, n, s, o, a, l, u), d.base = e.__e, e.__u &= -161, d.__h.length && o.push(d), w && (d.__E = d.__ = null); } catch (S) { e.__v = null, l || s != null ? (e.__e = a, e.__u |= l ? 160 : 32, s[s.indexOf(a)] = null) : (e.__e = t.__e, e.__k = t.__k), W.__e(S, e, t); } else s == null && e.__v === t.__v ? (e.__k = t.__k, e.__e = t.__e) : e.__e = dc(t.__e, e, t, i, n, s, o, l, u); (c = W.diffed) && c(e); } function Ga(r, e, t) { e.__d = void 0; for (var i = 0; i < t.length; i++) Es(t[i], t[++i], t[++i]); W.__c && W.__c(e, r), r.some(function(n) { try { r = n.__h, n.__h = [], r.some(function(s) { s.call(n); }); } catch (s) { W.__e(s, n.__v); } }); } function dc(r, e, t, i, n, s, o, a, l) { var u, c, d, h, f, v, g, w = t.props, b = e.props, m = e.type; if (m === "svg" && (n = !0), s != null) { for (u = 0; u < s.length; u++) if ((f = s[u]) && "setAttribute" in f == !!m && (m ? f.localName === m : f.nodeType === 3)) { r = f, s[u] = null; break; } } if (r == null) { if (m === null) return document.createTextNode(b); r = n ? document.createElementNS("http://www.w3.org/2000/svg", m) : document.createElement(m, b.is && b), s = null, a = !1; } if (m === null) w === b || a && r.data === b || (r.data = b); else { if (s = s && _i.call(r.childNodes), w = t.props || di, !a && s != null) for (w = {}, u = 0; u < r.attributes.length; u++) w[(f = r.attributes[u]).name] = f.value; for (u in w) f = w[u], u == "children" || (u == "dangerouslySetInnerHTML" ? d = f : u === "key" || u in b || Ei(r, u, null, f, n)); for (u in b) f = b[u], u == "children" ? h = f : u == "dangerouslySetInnerHTML" ? c = f : u == "value" ? v = f : u == "checked" ? g = f : u === "key" || a && typeof f != "function" || w[u] === f || Ei(r, u, f, w[u], n); if (c) a || d && (c.__html === d.__html || c.__html === r.innerHTML) || (r.innerHTML = c.__html), e.__k = []; else if (d && (r.innerHTML = ""), Ua(r, pn(h) ? h : [h], e, t, i, n && m !== "foreignObject", s, o, s ? s[0] : t.__k && kr(t, 0), a, l), s != null) for (u = s.length; u--; ) s[u] != null && Va(s[u]); a || (u = "value", v !== void 0 && (v !== r[u] || m === "progress" && !v || m === "option" && v !== w[u]) && Ei(r, u, v, w[u], !1), u = "checked", g !== void 0 && g !== r[u] && Ei(r, u, g, w[u], !1)); } return r; } function Es(r, e, t) { try { typeof r == "function" ? r(e) : r.current = e; } catch (i) { W.__e(i, t); } } function Jn(r, e, t) { var i, n; if (W.unmount && W.unmount(r), (i = r.ref) && (i.current && i.current !== r.__e || Es(i, null, e)), (i = r.__c) != null) { if (i.componentWillUnmount) try { i.componentWillUnmount(); } catch (s) { W.__e(s, e); } i.base = i.__P = null, r.__c = void 0; } if (i = r.__k) for (n = 0; n < i.length; n++) i[n] && Jn(i[n], e, t || typeof r.type != "function"); t || r.__e == null || Va(r.__e), r.__ = r.__e = r.__d = void 0; } function pc(r, e, t) { return this.constructor(r, t); } function qt(r, e, t) { var i, n, s, o; W.__ && W.__(r, e), n = (i = typeof t == "function") ? null : t && t.__k || e.__k, s = [], o = [], Ss(e, r = (!i && t || e).__k = z($, null, [r]), n || di, di, e.ownerSVGElement !== void 0, !i && t ? [t] : n ? null : e.firstChild ? _i.call(e.childNodes) : null, s, !i && t ? t : n ? n.__e : e.firstChild, i, o), Ga(s, r, o); } function Bs(r, e) { qt(r, e, Bs); } function Ls(r, e, t) { var i, n, s, o, a = yt({}, r.props); for (s in r.type && r.type.defaultProps && (o = r.type.defaultProps), e) s == "key" ? i = e[s] : s == "ref" ? n = e[s] : a[s] = e[s] === void 0 && o !== void 0 ? o[s] : e[s]; return arguments.length > 2 && (a.children = arguments.length > 3 ? _i.call(arguments, 2) : t), ri(r.type, a, i || r.key, n || r.ref, null); } function yi(r, e) { var t = { __c: e = "__cC" + qa++, __: r, Consumer: function(i, n) { return i.children(n); }, Provider: function(i) { var n, s; return this.getChildContext || (n = [], (s = {})[e] = this, this.getChildContext = function() { return s; }, this.shouldComponentUpdate = function(o) { this.props.value !== o.value && n.some(function(a) { a.__e = !0, Xn(a); }); }, this.sub = function(o) { n.push(o); var a = o.componentWillUnmount; o.componentWillUnmount = function() { n.splice(n.indexOf(o), 1), a && a.call(o); }; }), i.children; } }; return t.Provider.__ = t.Consumer.contextType = t; } _i = $a.slice, W = { __e: function(r, e, t, i) { for (var n, s, o; e = e.__; ) if ((n = e.__c) && !n.__) try { if ((s = n.constructor) && s.getDerivedStateFromError != null && (n.setState(s.getDerivedStateFromError(r)), o = n.__d), n.componentDidCatch != null && (n.componentDidCatch(r, i || {}), o = n.__d), o) return n.__E = n; } catch (a) { r = a; } throw r; } }, Ia = 0, Ra = function(r) { return r != null && r.constructor == null; }, Qe.prototype.setState = function(r, e) { var t; t = this.__s != null && this.__s !== this.state ? this.__s : this.__s = yt({}, this.state), typeof r == "function" && (r = r(yt({}, t), this.props)), r && yt(t, r), r != null && this.__v && (e && this._sb.push(e), Xn(this)); }, Qe.prototype.forceUpdate = function(r) { this.__v && (this.__e = !0, r && this.__h.push(r), Xn(this)); }, Qe.prototype.render = $, Xt = [], za = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, Zn = function(r, e) { return r.__v.__b - e.__v.__b; }, Vi.__r = 0, qa = 0; function Ts() { return (Ts = Object.assign ? Object.assign.bind() : function(r) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var i in t) Object.prototype.hasOwnProperty.call(t, i) && (r[i] = t[i]); } return r; }).apply(this, arguments); } var fc = ["context", "children"]; function hc(r) { this.getChildContext = function() { return r.context; }; var e = r.children, t = function(i, n) { if (i == null) return {}; var s, o, a = {}, l = Object.keys(i); for (o = 0; o < l.length; o++) n.indexOf(s = l[o]) >= 0 || (a[s] = i[s]); return a; }(r, fc); return Ls(e, t); } function gc() { var r = new CustomEvent("_preact", { detail: {}, bubbles: !0, cancelable: !0 }); this.dispatchEvent(r), this._vdom = z(hc, Ts({}, this._props, { context: r.detail.context }), function e(t, i) { if (t.nodeType === 3) return t.data; if (t.nodeType !== 1) return null; var n = [], s = {}, o = 0, a = t.attributes, l = t.childNodes; for (o = a.length; o--; ) a[o].name !== "slot" && (s[a[o].name] = a[o].value, s[Wa(a[o].name)] = a[o].value); for (o = l.length; o--; ) { var u = e(l[o], null), c = l[o].slot; c ? s[c] = z(wo, { name: c }, u) : n[o] = u; } var d = i ? z(wo, null, n) : n; return z(i || t.nodeName.toLowerCase(), s, d); }(this, this._vdomComponent)), (this.hasAttribute("hydrate") ? Bs : qt)(this._vdom, this._root); } function Wa(r) { return r.replace(/-(\w)/g, function(e, t) { return t ? t.toUpperCase() : ""; }); } function mc(r, e, t) { if (this._vdom) { var i = {}; i[r] = t = t ?? void 0, i[Wa(r)] = t, this._vdom = Ls(this._vdom, i), qt(this._vdom, this._root); } } function bc() { qt(this._vdom = null, this._root); } function wo(r, e) { var t = this; return z("slot", Ts({}, r, { ref: function(i) { i ? (t.ref = i, t._listener || (t._listener = function(n) { n.stopPropagation(), n.detail.context = e; }, i.addEventListener("_preact", t._listener))) : t.ref.removeEventListener("_preact", t._listener); } })); } function vc(r, e, t, i) { function n() { var s = Reflect.construct(HTMLElement, [], n); return s._vdomComponent = r, s._root = i && i.shadow ? s.attachShadow({ mode: i.mode || "open" }) : s, s; } return (n.prototype = Object.create(HTMLElement.prototype)).constructor = n, n.prototype.connectedCallback = gc, n.prototype.attributeChangedCallback = mc, n.prototype.disconnectedCallback = bc, t = t || r.observedAttributes || Object.keys(r.propTypes || {}), n.observedAttributes = t, t.forEach(function(s) { Object.defineProperty(n.prototype, s, { get: function() { return this._vdom.props[s]; }, set: function(o) { this._vdom ? this.attributeChangedCallback(s, null, o) : (this._props || (this._props = {}), this._props[s] = o, this.connectedCallback()); var a = typeof o; o != null && a !== "string" && a !== "boolean" && a !== "number" || this.setAttribute(s, o); } }); }), customElements.define(e || r.tagName || r.displayName || r.name, n); } var $t, ae, _n, xo, Dr = 0, Ya = [], Mi = [], ce = W, _o = ce.__b, yo = ce.__r, Co = ce.diffed, ko = ce.__c, Do = ce.unmount, Ao = ce.__; function Or(r, e) { ce.__h && ce.__h(ae, r, Dr || e), Dr = 0; var t = ae.__H || (ae.__H = { __: [], __h: [] }); return r >= t.__.length && t.__.push({ __V: Mi }), t.__[r]; } function O(r) { return Dr = 1, Ka(Xa, r); } function Ka(r, e, t) { var i = Or($t++, 2); if (i.t = r, !i.__c && (i.__ = [t ? t(e) : Xa(void 0, e), function(a) { var l = i.__N ? i.__N[0] : i.__[0], u = i.t(l, a); l !== u && (i.__N = [u, i.__[1]], i.__c.setState({})); }], i.__c = ae, !ae.u)) { var n = function(a, l, u) { if (!i.__c.__H) return !0; var c = i.__c.__H.__.filter(function(h) { return !!h.__c; }); if (c.every(function(h) { return !h.__N; })) return !s || s.call(this, a, l, u); var d = !1; return c.forEach(function(h) { if (h.__N) { var f = h.__[0]; h.__ = h.__N, h.__N = void 0, f !== h.__[0] && (d = !0); } }), !(!d && i.__c.props === a) && (!s || s.call(this, a, l, u)); }; ae.u = !0; var s = ae.shouldComponentUpdate, o = ae.componentWillUpdate; ae.componentWillUpdate = function(a, l, u) { if (this.__e) { var c = s; s = void 0, n(a, l, u), s = c; } o && o.call(this, a, l, u); }, ae.shouldComponentUpdate = n; } return i.__N || i.__; } function U(r, e) { var t = Or($t++, 3); !ce.__s && Fs(t.__H, e) && (t.__ = r, t.i = e, ae.__H.__h.push(t)); } function Ir(r, e) { var t = Or($t++, 4); !ce.__s && Fs(t.__H, e) && (t.__ = r, t.i = e, ae.__h.push(t)); } function Y(r) { return Dr = 5, ut(function() { return { current: r }; }, []); } function wc(r, e, t) { Dr = 6, Ir(function() { return typeof r == "function" ? (r(e()), function() { return r(null); }) : r ? (r.current = e(), function() { return r.current = null; }) : void 0; }, t == null ? t : t.concat(r)); } function ut(r, e) { var t = Or($t++, 7); return Fs(t.__H, e) ? (t.__V = r(), t.i = e, t.__h = r, t.__V) : t.__; } function Za(r, e) { return Dr = 8, ut(function() { return r; }, e); } function fn(r) { var e = ae.context[r.__c], t = Or($t++, 9); return t.c = r, e ? (t.__ == null && (t.__ = !0, e.sub(ae)), e.props.value) : r.__; } function xc(r, e) { ce.useDebugValue && ce.useDebugValue(e ? e(r) : r); } function _c() { var r = Or($t++, 11); if (!r.__) { for (var e = ae.__v; e !== null && !e.__m && e.__ !== null; ) e = e.__; var t = e.__m || (e.__m = [0, 0]); r.__ = "P" + t[0] + "-" + t[1]++; } return r.__; } function yc() { for (var r; r = Ya.shift(); ) if (r.__P && r.__H) try { r.__H.__h.forEach(Pi), r.__H.__h.forEach(Qn), r.__H.__h = []; } catch (e) { r.__H.__h = [], ce.__e(e, r.__v); } } ce.__b = function(r) { ae = null, _o && _o(r); }, ce.__ = function(r, e) { r && e.__k && e.__k.__m && (r.__m = e.__k.__m), Ao && Ao(r, e); }, ce.__r = function(r) { yo && yo(r), $t = 0; var e = (ae = r.__c).__H; e && (_n === ae ? (e.__h = [], ae.__h = [], e.__.forEach(function(t) { t.__N && (t.__ = t.__N), t.__V = Mi, t.__N = t.i = void 0; })) : (e.__h.forEach(Pi), e.__h.forEach(Qn), e.__h = [], $t = 0)), _n = ae; }, ce.diffed = function(r) { Co && Co(r); var e = r.__c; e && e.__H && (e.__H.__h.length && (Ya.push(e) !== 1 && xo === ce.requestAnimationFrame || ((xo = ce.requestAnimationFrame) || Cc)(yc)), e.__H.__.forEach(function(t) { t.i && (t.__H = t.i), t.__V !== Mi && (t.__ = t.__V), t.i = void 0, t.__V = Mi; })), _n = ae = null; }, ce.__c = function(r, e) { e.some(function(t) { try { t.__h.forEach(Pi), t.__h = t.__h.filter(function(i) { return !i.__ || Qn(i); }); } catch (i) { e.some(function(n) { n.__h && (n.__h = []); }), e = [], ce.__e(i, t.__v); } }), ko && ko(r, e); }, ce.unmount = function(r) { Do && Do(r); var e, t = r.__c; t && t.__H && (t.__H.__.forEach(function(i) { try { Pi(i); } catch (n) { e = n; } }), t.__H = void 0, e && ce.__e(e, t.__v)); }; var So = typeof requestAnimationFrame == "function"; function Cc(r) { var e, t = function() { clearTimeout(i), So && cancelAnimationFrame(e), setTimeout(r); }, i = setTimeout(t, 100); So && (e = requestAnimationFrame(t)); } function Pi(r) { var e = ae, t = r.__c; typeof t == "function" && (r.__c = void 0, t()), ae = e; } function Qn(r) { var e = ae; r.__c = r.__(), ae = e; } function Fs(r, e) { return !r || r.length !== e.length || e.some(function(t, i) { return t !== r[i]; }); } function Xa(r, e) { return typeof e == "function" ? e(r) : e; } function Ja(r, e) { for (var t in e) r[t] = e[t]; return r; } function es(r, e) { for (var t in r) if (t !== "__source" && !(t in e)) return !0; for (var i in e) if (i !== "__source" && r[i] !== e[i]) return !0; return !1; } function ts(r, e) { this.props = r, this.context = e; } function kc(r, e) { function t(n) { var s = this.props.ref, o = s == n.ref; return !o && s && (s.call ? s(null) : s.current = null), e ? !e(this.props, n) || !o : es(this.props, n); } function i(n) { return this.shouldComponentUpdate = t, z(r, n); } return i.displayName = "Memo(" + (r.displayName || r.name) + ")", i.prototype.isReactComponent = !0, i.__f = !0, i; } (ts.prototype = new Qe()).isPureReactComponent = !0, ts.prototype.shouldComponentUpdate = function(r, e) { return es(this.props, r) || es(this.state, e); }; var Eo = W.__b; W.__b = function(r) { r.type && r.type.__f && r.ref && (r.props.ref = r.ref, r.ref = null), Eo && Eo(r); }; var Dc = typeof Symbol < "u" && Symbol.for && Symbol.for("react.forward_ref") || 3911; function Ns(r) { function e(t) { var i = Ja({}, t); return delete i.ref, r(i, t.ref || null); } return e.$$typeof = Dc, e.render = e, e.prototype.isReactComponent = e.__f = !0, e.displayName = "ForwardRef(" + (r.displayName || r.name) + ")", e; } var Bo = function(r, e) { return r == null ? null : Ct(Ct(r).map(e)); }, Qa = { map: Bo, forEach: Bo, count: function(r) { return r ? Ct(r).length : 0; }, only: function(r) { var e = Ct(r); if (e.length !== 1) throw "Children.only"; return e[0]; }, toArray: Ct }, Ac = W.__e; W.__e = function(r, e, t, i) { if (r.then) { for (var n, s = e; s = s.__; ) if ((n = s.__c) && n.__c) return e.__e == null && (e.__e = t.__e, e.__k = t.__k), n.__c(r, e); } Ac(r, e, t, i); }; var Lo = W.unmount; function el(r, e, t) { return r && (r.__c && r.__c.__H && (r.__c.__H.__.forEach(function(i) { typeof i.__c == "function" && i.__c(); }), r.__c.__H = null), (r = Ja({}, r)).__c != null && (r.__c.__P === t && (r.__c.__P = e), r.__c = null), r.__k = r.__k && r.__k.map(function(i) { return el(i, e, t); })), r; } function tl(r, e, t) { return r && t && (r.__v = null, r.__k = r.__k && r.__k.map(function(i) { return tl(i, e, t); }), r.__c && r.__c.__P === e && (r.__e && t.appendChild(r.__e), r.__c.__e = !0, r.__c.__P = t)), r; } function Oi() { this.__u = 0, this.t = null, this.__b = null; } function rl(r) { var e = r.__.__c; return e && e.__a && e.__a(r); } function Sc(r) { var e, t, i; function n(s) { if (e || (e = r()).then(function(o) { t = o.default || o; }, function(o) { i = o; }), i) throw i; if (!t) throw e; return z(t, s); } return n.displayName = "Lazy", n.__f = !0, n; } function Xr() { this.u = null, this.o = null; } W.unmount = function(r) { var e = r.__c; e && e.__R && e.__R(), e && 32 & r.__u && (r.type = null), Lo && Lo(r); }, (Oi.prototype = new Qe()).__c = function(r, e) { var t = e.__c, i = this; i.t == null && (i.t = []), i.t.push(t); var n = rl(i.__v), s = !1, o = function() { s || (s = !0, t.__R = null, n ? n(a) : a()); }; t.__R = o; var a = function() { if (!--i.__u) { if (i.state.__a) { var l = i.state.__a; i.__v.__k[0] = tl(l, l.__c.__P, l.__c.__O); } var u; for (i.setState({ __a: i.__b = null }); u = i.t.pop(); ) u.forceUpdate(); } }; i.__u++ || 32 & e.__u || i.setState({ __a: i.__b = i.__v.__k[0] }), r.then(o, o); }, Oi.prototype.componentWillUnmount = function() { this.t = []; }, Oi.prototype.render = function(r, e) { if (this.__b) { if (this.__v.__k) { var t = document.createElement("div"), i = this.__v.__k[0].__c; this.__v.__k[0] = el(this.__b, t, i.__O = i.__P); } this.__b = null; } var n = e.__a && z($, null, r.fallback); return n && (n.__u &= -33), [z($, null, e.__a ? null : r.children), n]; }; var To = function(r, e, t) { if (++t[1] === t[0] && r.o.delete(e), r.props.revealOrder && (r.props.revealOrder[0] !== "t" || !r.o.size)) for (t = r.u; t; ) { for (; t.length > 3; ) t.pop()(); if (t[1] < t[0]) break; r.u = t = t[2]; } }; function Ec(r) { return this.getChildContext = function() { return r.context; }, r.children; } function Bc(r) { var e = this, t = r.i; e.componentWillUnmount = function() { qt(null, e.l), e.l = null, e.i = null; }, e.i && e.i !== t && e.componentWillUnmount(), e.l || (e.i = t, e.l = { nodeType: 1, parentNode: t, childNodes: [], appendChild: function(i) { this.childNodes.push(i), e.i.appendChild(i); }, insertBefore: function(i, n) { this.childNodes.push(i), e.i.appendChild(i); }, removeChild: function(i) { this.childNodes.splice(this.childNodes.indexOf(i) >>> 1, 1), e.i.removeChild(i); } }), qt(z(Ec, { context: e.context }, r.__v), e.l); } function Lc(r, e) { var t = z(Bc, { __v: r, i: e }); return t.containerInfo = e, t; } (Xr.prototype = new Qe()).__a = function(r) { var e = this, t = rl(e.__v), i = e.o.get(r); return i[0]++, function(n) { var s = function() { e.props.revealOrder ? (i.push(n), To(e, r, i)) : n(); }; t ? t(s) : s(); }; }, Xr.prototype.render = function(r) { this.u = null, this.o = /* @__PURE__ */ new Map(); var e = Ct(r.children); r.revealOrder && r.revealOrder[0] === "b" && e.reverse(); for (var t = e.length; t--; ) this.o.set(e[t], this.u = [1, 0, this.u]); return r.children; }, Xr.prototype.componentDidUpdate = Xr.prototype.componentDidMount = function() { var r = this; this.o.forEach(function(e, t) { To(r, t, e); }); }; var il = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60103, Tc = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/, Fc = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, Nc = /[A-Z0-9]/g, Mc = typeof document < "u", Pc = function(r) { return (typeof Symbol < "u" && typeof Symbol() == "symbol" ? /fil|che|rad/ : /fil|che|ra/).test(r); }; function Oc(r, e, t) { return e.__k == null && (e.textContent = ""), qt(r, e), typeof t == "function" && t(), r ? r.__c : null; } function Ic(r, e, t) { return Bs(r, e), typeof t == "function" && t(), r ? r.__c : null; } Qe.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(r) { Object.defineProperty(Qe.prototype, r, { configurable: !0, get: function() { return this["UNSAFE_" + r]; }, set: function(e) { Object.defineProperty(this, r, { configurable: !0, writable: !0, value: e }); } }); }); var Fo = W.event; function Rc() { } function zc() { return this.cancelBubble; } function qc() { return this.defaultPrevented; } W.event = function(r) { return Fo && (r = Fo(r)), r.persist = Rc, r.isPropagationStopped = zc, r.isDefaultPrevented = qc, r.nativeEvent = r; }; var Ms, $c = { enumerable: !1, configurable: !0, get: function() { return this.class; } }, No = W.vnode; W.vnode = function(r) { typeof r.type == "string" && function(e) { var t = e.props, i = e.type, n = {}; for (var s in t) { var o = t[s]; if (!(s === "value" && "defaultValue" in t && o == null || Mc && s === "children" && i === "noscript" || s === "class" || s === "className")) { var a = s.toLowerCase(); s === "defaultValue" && "value" in t && t.value == null ? s = "value" : s === "download" && o === !0 ? o = "" : a === "translate" && o === "no" ? o = !1 : a === "ondoubleclick" ? s = "ondblclick" : a !== "onchange" || i !== "input" && i !== "textarea" || Pc(t.type) ? a === "onfocus" ? s = "onfocusin" : a === "onblur" ? s = "onfocusout" : Fc.test(s) ? s = a : i.indexOf("-") === -1 && Tc.test(s) ? s = s.replace(Nc, "-$&").toLowerCase() : o === null && (o = void 0) : a = s = "oninput", a === "oninput" && n[s = a] && (s = "oninputCapture"), n[s] = o; } } i == "select" && n.multiple && Array.isArray(n.value) && (n.value = Ct(t.children).forEach(function(l) { l.props.selected = n.value.indexOf(l.props.value) != -1; })), i == "select" && n.defaultValue != null && (n.value = Ct(t.children).forEach(function(l) { l.props.selected = n.multiple ? n.defaultValue.indexOf(l.props.value) != -1 : n.defaultValue == l.props.value; })), t.class && !t.className ? (n.class = t.class, Object.defineProperty(n, "className", $c)) : (t.className && !t.class || t.class && t.className) && (n.class = n.className = t.className), e.props = n; }(r), r.$$typeof = il, No && No(r); }; var Mo = W.__r; W.__r = function(r) { Mo && Mo(r), Ms = r.__c; }; var Po = W.diffed; W.diffed = function(r) { Po && Po(r); var e = r.props, t = r.__e; t != null && r.type === "textarea" && "value" in e && e.value !== t.value && (t.value = e.value == null ? "" : e.value), Ms = null; }; var Vc = { ReactCurrentDispatcher: { current: { readContext: function(r) { return Ms.__n[r.__c].props.value; } } } }; function jc(r) { return z.bind(null, r); } function Vt(r) { return !!r && r.$$typeof === il; } function Uc(r) { return Vt(r) && r.type === $; } function nl(r) { return Vt(r) ? Ls.apply(null, arguments) : r; } function Hc(r) { return !!r.__k && (qt(null, r), !0); } function Gc(r) { return r && (r.base || r.nodeType === 1 && r) || null; } var Wc = function(r, e) { return r(e); }, Yc = function(r, e) { return r(e); }, Kc = $; function sl(r) { r(); } function Zc(r) { return r; } function Xc() { return [!1, sl]; } var Jc = Ir, Qc = Vt; function ed(r, e) { var t = e(), i = O({ h: { __: t, v: e } }), n = i[0].h, s = i[1]; return Ir(function() { n.__ = t, n.v = e, yn(n) && s({ h: n }); }, [r, t, e]), U(function() { return yn(n) && s({ h: n }), r(function() { yn(n) && s({ h: n }); }); }, [r]), t; } function yn(r) { var e, t, i = r.v, n = r.__; try { var s = i(); return !((e = n) === (t = s) && (e !== 0 || 1 / e == 1 / t) || e != e && t != t); } catch { return !0; } } var ve = { useState: O, useId: _c, useReducer: Ka, useEffect: U, useLayoutEffect: Ir, useInsertionEffect: Jc, useTransition: Xc, useDeferredValue: Zc, useSyncExternalStore: ed, startTransition: sl, useRef: Y, useImperativeHandle: wc, useMemo: ut, useCallback: Za, useContext: fn, useDebugValue: xc, version: "17.0.2", Children: Qa, render: Oc, hydrate: Ic, unmountComponentAtNode: Hc, createPortal: Lc, createElement: z, createContext: yi, createFactory: jc, cloneElement: nl, createRef: lc, Fragment: $, isValidElement: Vt, isElement: Qc, isFragment: Uc, findDOMNode: Gc, Component: Qe, PureComponent: ts, memo: kc, forwardRef: Ns, flushSync: Yc, unstable_batchedUpdates: Wc, StrictMode: Kc, Suspense: Oi, SuspenseList: Xr, lazy: Sc, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: Vc }, Cn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; function ol(r) { return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r; } var td = { area: !0, base: !0, br: !0, col: !0, embed: !0, hr: !0, img: !0, input: !0, link: !0, meta: !0, param: !0, source: !0, track: !0, wbr: !0 }; const rd = /* @__PURE__ */ ol(td); var id = /\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g; function Oo(r) { var e = { type: "tag", name: "", voidElement: !1, attrs: {}, children: [] }, t = r.match(/<\/?([^\s]+?)[/\s>]/); if (t && (e.name = t[1], (rd[t[1]] || r.charAt(r.length - 2) === "/") && (e.voidElement = !0), e.name.startsWith("!--"))) { var i = r.indexOf("-->"); return { type: "comment", comment: i !== -1 ? r.slice(4, i) : "" }; } for (var n = new RegExp(id), s = null; (s = n.exec(r)) !== null; ) if (s[0].trim()) if (s[1]) { var o = s[1].trim(), a = [o, ""]; o.indexOf("=") > -1 && (a = o.split("=")), e.attrs[a[0]] = a[1], n.lastIndex--; } else s[2] && (e.attrs[s[2]] = s[3].trim().substring(1, s[3].length - 1)); return e; } var nd = /<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g, sd = /^\s*$/, od = /* @__PURE__ */ Object.create(null); function al(r, e) { switch (e.type) { case "text": return r + e.content; case "tag": return r += "<" + e.name + (e.attrs ? function(t) { var i = []; for (var n in t) i.push(n + '="' + t[n] + '"'); return i.length ? " " + i.join(" ") : ""; }(e.attrs) : "") + (e.voidElement ? "/>" : ">"), e.voidElement ? r : r + e.children.reduce(al, "") + "</" + e.name + ">"; case "comment": return r + "<!--" + e.comment + "-->"; } } var ad = { parse: function(r, e) { e || (e = {}), e.components || (e.components = od); var t, i = [], n = [], s = -1, o = !1; if (r.indexOf("<") !== 0) { var a = r.indexOf("<"); i.push({ type: "text", content: a === -1 ? r : r.substring(0, a) }); } return r.replace(nd, function(l, u) { if (o) { if (l !== "</" + t.name + ">") return; o = !1; } var c, d = l.charAt(1) !== "/", h = l.startsWith("<!--"), f = u + l.length, v = r.charAt(f); if (h) { var g = Oo(l); return s < 0 ? (i.push(g), i) : ((c = n[s]).children.push(g), i); } if (d && (s++, (t = Oo(l)).type === "tag" && e.components[t.name] && (t.type = "component", o = !0), t.voidElement || o || !v || v === "<" || t.children.push({ type: "text", content: r.slice(f, r.indexOf("<", f)) }), s === 0 && i.push(t), (c = n[s - 1]) && c.children.push(t), n[s] = t), (!d || t.voidElement) && (s > -1 && (t.voidElement || t.name === l.slice(2, -1)) && (s--, t = s === -1 ? i : n[s]), !o && v !== "<" && v)) { c = s === -1 ? i : n[s].children; var w = r.indexOf("<", f), b = r.slice(f, w === -1 ? void 0 : w); sd.test(b) && (b = " "), (w > -1 && s + c.length >= 0 || b !== " ") && c.push({ type: "text", content: b }); } }), i; }, stringify: function(r) { return r.reduce(function(e, t) { return e + al("", t); }, ""); } }; const Ii = (...r) => { console != null && console.warn && (Ze(r[0]) && (r[0] = `react-i18next:: ${r[0]}`), console.warn(...r)); }, Io = {}, ji = (...r) => { Ze(r[0]) && Io[r[0]] || (Ze(r[0]) && (Io[r[0]] = /* @__PURE__ */ new Date()), Ii(...r)); }, ll = (r, e) => () => { if (r.isInitialized) e(); else { const t = () => { setTimeout(() => { r.off("initialized", t); }, 0), e(); }; r.on("initialized", t); } }, Ro = (r, e, t) => { r.loadNamespaces(e, ll(r, t)); }, zo = (r, e, t, i) => { Ze(t) && (t = [t]), t.forEach((n) => { r.options.ns.indexOf(n) < 0 && r.options.ns.push(n); }), r.loadLanguages(e, ll(r, i)); }, ld = (r, e, t = {}) => !e.languages || !e.languages.length ? (ji("i18n.languages were undefined or empty", e.languages), !0) : e.hasLoadedNamespace(r, { lng: t.lng, precheck: (i, n) => { var s; if (((s = t.bindI18n) == null ? void 0 : s.indexOf("languageChanging")) > -1 && i.services.backendConnector.backend && i.isLanguageChangingTo && !n(i.isLanguageChangingTo, r)) return !1; } }), Ze = (r) => typeof r == "string", fr = (r) => typeof r == "object" && r !== null, ud = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, cd = { "&amp;": "&", "&#38;": "&", "&lt;": "<", "&#60;": "<", "&gt;": ">", "&#62;": ">", "&apos;": "'", "&#39;": "'", "&quot;": '"', "&#34;": '"', "&nbsp;": " ", "&#160;": " ", "&copy;": "©", "&#169;": "©", "&reg;": "®", "&#174;": "®", "&hellip;": "…", "&#8230;": "…", "&#x2F;": "/", "&#47;": "/" }, dd = (r) => cd[r], pd = (r) => r.replace(ud, dd); let rs = { bindI18n: "languageChanged", bindI18nStore: "", transEmptyNodeValue: "", transSupportBasicHtmlNodes: !0, transWrapTextNodes: "", transKeepBasicHtmlNodesFor: ["br", "strong", "i", "p"], useSuspense: !0, unescape: pd }; const fd = (r = {}) => { rs = { ...rs, ...r }; }, ul = () => rs; let cl; const hd = (r) => { cl = r; }, jt = () => cl, kn = (r, e) => { var i; if (!r) return !1; const t = ((i = r.props) == null ? void 0 : i.children) ?? r.children; return e ? t.length > 0 : !!t; }, Dn = (r) => { var t, i; if (!r) return []; const e = ((t = r.props) == null ? void 0 : t.children) ?? r.children; return (i = r.props) != null && i.i18nIsDynamicList ? hr(e) : e; }, gd = (r) => Array.isArray(r) && r.every(Vt), hr = (r) => Array.isArray(r) ? r : [r], md = (r, e) => { const t = { ...e }; return t.props = Object.assign(r.props, e.props), t; }, dl = (r, e) => { if (!r) return ""; let t = ""; const i = hr(r), n = e != null && e.transSupportBasicHtmlNodes ? e.transKeepBasicHtmlNodesFor ?? [] : []; return i.forEach((s, o) => { if (Ze(s)) t += `${s}`; else if (Vt(s)) { const { props: a, type: l } = s, u = Object.keys(a).length, c = n.indexOf(l) > -1, d = a.children; if (!d && c && !u) t += `<${l}/>`; else if (!d && (!c || u) || a.i18nIsDynamicList) t += `<${o}></${o}>`; else if (c && u === 1 && Ze(d)) t += `<${l}>${d}</${l}>`; else { const h = dl(d, e); t += `<${o}>${h}</${o}>`; } } else if (s === null) Ii("Trans: the passed in value is invalid - seems you passed in a null child."); else if (fr(s)) { const { format: a, ...l } = s, u = Object.keys(l); if (u.length === 1) { const c = a ? `${u[0]}, ${a}` : u[0]; t += `{{${c}}}`; } else Ii("react-i18next: the passed in object contained more than one variable - the object should look like {{ value, format }} where format is optional.", s); } else Ii("Trans: the passed in value is invalid - seems you passed in a variable like {number} - please pass in variables for interpolation as full objects like {{number}}.", s); }), t; }, bd = (r, e, t, i, n, s) => { if (e === "") return []; const o = i.transKeepBasicHtmlNodesFor || [], a = e && new RegExp(o.map((w) => `<${w}`).join("|")).test(e); if (!r && !a && !s) return [e]; const l = {}, u = (w) => { hr(w).forEach((m) => { Ze(m) || (kn(m) ? u(Dn(m)) : fr(m) && !Vt(m) && Object.assign(l, m)); }); }; u(r); const c = ad.parse(`<0>${e}</0>`), d = { ...l, ...n }, h = (w, b, m) => { var y; const x = Dn(w), _ = v(x, b.children, m); return gd(x) && _.length === 0 || (y = w.props) != null && y.i18nIsDynamicList ? x : _; }, f = (w, b, m, x, _) => { w.dummy ? (w.children = b, m.push(nl(w, { key: x }, _ ? void 0 : b))) : m.push(...Qa.map([w], (y) => { const k = { ...y.props }; return delete k.i18nIsDynamicList, z(y.type, { ...k, key: x, ref: y.ref }, _ ? null : b); })); }, v = (w, b, m) => { const x = hr(w); return hr(b).reduce((y, k, A) => { var D, S; const C = ((S = (D = k.children) == null ? void 0 : D[0]) == null ? void 0 : S.content) && t.services.interpolator.interpolate(k.children[0].content, d, t.language); if (k.type === "tag") { let T = x[parseInt(k.name, 10)]; m.length === 1 && !T && (T = m[0][k.name]), T || (T = {}); const L = Object.keys(k.attrs).length !== 0 ? md({ props: k.attrs }, T) : T, F = Vt(L), M = F && kn(k, !0) && !k.voidElement, N = a && fr(L) && L.dummy && !F, q = fr(r) && Object.hasOwnProperty.call(r, k.name); if (Ze(L)) { const P = t.services.interpolator.interpolate(L, d, t.language); y.push(P); } else if (kn(L) || M) { const P = h(L, k, m); f(L, P, y, A); } else if (N) { const P = v(x, k.children, m); f(L, P, y, A); } else if (Number.isNaN(parseFloat(k.name))) if (q) { const P = h(L, k, m); f(L, P, y, A, k.voidElement); } else if (i.transSupportBasicHtmlNodes && o.indexOf(k.name) > -1) if (k.voidElement) y.push(z(k.name, { key: `${k.name}-${A}` })); else { const P = v(x, k.children, m); y.push(z(k.name, { key: `${k.name}-${A}` }, P)); } else if (k.voidElement) y.push(`<${k.name} />`); else { const P = v(x, k.children, m); y.push(`<${k.name}>${P}</${k.name}>`); } else if (fr(L) && !F) { const P = k.children[0] ? C : null; P && y.push(P); } else f(L, C, y, A, k.children.length !== 1 || !C); } else if (k.type === "text") { const T = i.transWrapTextNodes, L = s ? i.unescape(t.services.interpolator.interpolate(k.content, d, t.language)) : t.services.interpolator.interpolate(k.content, d, t.language); T ? y.push(z(T, { key: `${k.name}-${A}` }, L)) : y.push(L); } return y; }, []); }, g = v([{ dummy: !0, children: r || [] }], c, hr(r || [])); return Dn(g[0]); }; function vd({ children: r, count: e, parent: t, i18nKey: i, context: n, tOptions: s = {}, values: o, defaults: a, components: l, ns: u, i18n: c, t: d, shouldUnescape: h, ...f }) { var T, L, F, M, N, q; const v = c || jt(); if (!v) return ji("You will need to pass in an i18next instance by using i18nextReactModule"), r; const g = d || v.t.bind(v) || ((P) => P), w = { ...ul(), ...(T = v.options) == null ? void 0 : T.react }; let b = u || g.ns || ((L = v.options) == null ? void 0 : L.defaultNS); b = Ze(b) ? [b] : b || ["translation"]; const m = dl(r, w), x = a || m || w.transEmptyNodeValue || i, { hashTransKey: _ } = w, y = i || (_ ? _(m || x) : m || x); (M = (F = v.options) == null ? void 0 : F.interpolation) != null && M.defaultVariables && (o = o && Object.keys(o).length > 0 ? { ...o, ...v.options.interpolation.defaultVariables } : { ...v.options.interpolation.defaultVariables }); const k = o || e !== void 0 && !((q = (N = v.options) == null ? void 0 : N.interpolation) != null && q.alwaysFormat) || !r ? s.interpolation : { interpolation: { ...s.interpolation, prefix: "#$?", suffix: "?$#" } }, A = { ...s, context: n || s.context, count: e, ...o, ...k, defaultValue: x, ns: b }, C = y ? g(y, A) : x; l && Object.keys(l).forEach((P) => { const E = l[P]; if (typeof E.type == "function" || !E.props || !E.props.children || C.indexOf(`${P}/>`) < 0 && C.indexOf(`${P} />`) < 0) return; function B() { return z($, null, E); } l[P] = z(B); }); const D = bd(l || r, C, v, w, A, h), S = t ?? w.defaultTransParent; return S ? z(S, f, D) : D; } const wd = { type: "3rdParty", init(r) { fd(r.options.react), hd(r); } }, pl = yi(); class xd { constructor() { this.usedNamespaces = {}; } addUsedNamespaces(e) { e.forEach((t) => { this.usedNamespaces[t] || (this.usedNamespaces[t] = !0); }); } getUsedNamespaces() { return Object.keys(this.usedNamespaces); } } function qo({ children: r, count: e, parent: t, i18nKey: i, context: n, tOptions: s = {}, values: o, defaults: a, components: l, ns: u, i18n: c, t: d, shouldUnescape: h, ...f }) { var m; const { i18n: v, defaultNS: g } = fn(pl) || {}, w = c || v || jt(), b = d || (w == null ? void 0 : w.t.bind(w)); return vd({ children: r, count: e, parent: t, i18nKey: i, context: n, tOptions: s, values: o, defaults: a, components: l, ns: u || (b == null ? void 0 : b.ns) || g || ((m = w == null ? void 0 : w.options) == null ? void 0 : m.defaultNS), i18n: w, t: d, shouldUnescape: h, ...f }); } const _d = (r, e) => { const t = Y(); return U(() => { t.current = e ? t.current : r; }, [r, e]), t.current; }, fl = (r, e, t, i) => r.getFixedT(e, t, i), yd = (r, e, t, i) => Za(fl(r, e, t, i), [r, e, t, i]), ee = (r, e = {}) => { var _, y, k, A; const { i18n: t } = e, { i18n: i, defaultNS: n } = fn(pl) || {}, s = t || i || jt(); if (s && !s.reportNamespaces && (s.reportNamespaces = new xd()), !s) { ji("You will need to pass in an i18next instance by using initReactI18next"); const C = (S, T) => Ze(T) ? T : fr(T) && Ze(T.defaultValue) ? T.defaultValue : Array.isArray(S) ? S[S.length - 1] : S, D = [C, {}, !1]; return D.t = C, D.i18n = {}, D.ready = !1, D; } (_ = s.options.react) != null && _.wait && ji("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour."); const o = { ...ul(), ...s.options.react, ...e }, { useSuspense: a, keyPrefix: l } = o; let u = r || n || ((y = s.options) == null ? void 0 : y.defaultNS); u = Ze(u) ? [u] : u || ["translation"], (A = (k = s.reportNamespaces).addUsedNamespaces) == null || A.call(k, u); const c = (s.isInitialized || s.initializedStoreOnce) && u.every((C) => ld(C, s, o)), d = yd(s, e.lng || null, o.nsMode === "fallback" ? u : u[0], l), h = () => d, f = () => fl(s, e.lng || null, o.nsMode === "fallback" ? u : u[0], l), [v, g] = O(h); let w = u.join(); e.lng && (w = `${e.lng}${w}`); const b = _d(w), m = Y(!0); U(() => { const { bindI18n: C, bindI18nStore: D } = o; m.current = !0, !c && !a && (e.lng ? zo(s, e.lng, u, () => { m.current && g(f); }) : Ro(s, u, () => { m.current && g(f); })), c && b && b !== w && m.current && g(f); const S = () => { m.current && g(f); }; return C && (s == null || s.on(C, S)), D && (s == null || s.store.on(D, S)), () => { m.current = !1, s && (C == null || C.split(" ").forEach((T) => s.off(T, S))), D && s && D.split(" ").forEach((T) => s.store.off(T, S)); }; }, [s, w]), U(() => { m.current && c && g(h); }, [s, l, c]); const x = [v, s, c]; if (x.t = v, x.i18n = s, x.ready = c, c || !c && !a) return x; throw new Promise((C) => { e.lng ? zo(s, e.lng, u, () => C()) : Ro(s, u, () => C()); }); }; var Cd = Symbol.for("preact-signals"); function hn() { if (It > 1) It--; else { for (var r, e = !1; ii !== void 0; ) { var t = ii; for (ii = void 0, is++; t !== void 0; ) { var i = t.o; if (t.o = void 0, t.f &= -3, !(8 & t.f) && gl(t)) try { t.c(); } catch (n) { e || (r = n, e = !0); } t = i; } } if (i