coinley-checkout
Version:
A React SDK for Coinley cryptocurrency payment processing with multi-network support
580 lines (579 loc) • 24 kB
JavaScript
var n, l$1, u$1, t$1, i$1, o$1, r$2, f$1, e$1, c$1, s$1, a$1, h$1 = {}, v$1 = [], p$1 = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, y$1 = Array.isArray;
function d$1(n2, l2) {
for (var u2 in l2)
n2[u2] = l2[u2];
return n2;
}
function w$1(n2) {
n2 && n2.parentNode && n2.parentNode.removeChild(n2);
}
function _$1(l2, u2, t2) {
var i2, o2, r2, f2 = {};
for (r2 in u2)
"key" == r2 ? i2 = u2[r2] : "ref" == r2 ? o2 = u2[r2] : f2[r2] = u2[r2];
if (arguments.length > 2 && (f2.children = arguments.length > 3 ? n.call(arguments, 2) : t2), "function" == typeof l2 && null != l2.defaultProps)
for (r2 in l2.defaultProps)
void 0 === f2[r2] && (f2[r2] = l2.defaultProps[r2]);
return g$1(l2, f2, i2, o2, null);
}
function g$1(n2, t2, i2, o2, r2) {
var f2 = { type: n2, props: t2, key: i2, ref: o2, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, constructor: void 0, __v: null == r2 ? ++u$1 : r2, __i: -1, __u: 0 };
return null == r2 && null != l$1.vnode && l$1.vnode(f2), f2;
}
function m$1() {
return { current: null };
}
function b$1(n2) {
return n2.children;
}
function k$1(n2, l2) {
this.props = n2, this.context = l2;
}
function x$1(n2, l2) {
if (null == l2)
return n2.__ ? x$1(n2.__, n2.__i + 1) : null;
for (var u2; l2 < n2.__k.length; l2++)
if (null != (u2 = n2.__k[l2]) && null != u2.__e)
return u2.__e;
return "function" == typeof n2.type ? x$1(n2) : null;
}
function C$1(n2) {
var l2, u2;
if (null != (n2 = n2.__) && null != n2.__c) {
for (n2.__e = n2.__c.base = null, l2 = 0; l2 < n2.__k.length; l2++)
if (null != (u2 = n2.__k[l2]) && null != u2.__e) {
n2.__e = n2.__c.base = u2.__e;
break;
}
return C$1(n2);
}
}
function M(n2) {
(!n2.__d && (n2.__d = true) && i$1.push(n2) && !P$1.__r++ || o$1 !== l$1.debounceRendering) && ((o$1 = l$1.debounceRendering) || r$2)(P$1);
}
function P$1() {
var n2, u2, t2, o2, r2, e2, c2, s2;
for (i$1.sort(f$1); n2 = i$1.shift(); )
n2.__d && (u2 = i$1.length, o2 = void 0, e2 = (r2 = (t2 = n2).__v).__e, c2 = [], s2 = [], t2.__P && ((o2 = d$1({}, r2)).__v = r2.__v + 1, l$1.vnode && l$1.vnode(o2), O(t2.__P, o2, r2, t2.__n, t2.__P.namespaceURI, 32 & r2.__u ? [e2] : null, c2, null == e2 ? x$1(r2) : e2, !!(32 & r2.__u), s2), o2.__v = r2.__v, o2.__.__k[o2.__i] = o2, j$1(c2, o2, s2), o2.__e != e2 && C$1(o2)), i$1.length > u2 && i$1.sort(f$1));
P$1.__r = 0;
}
function S(n2, l2, u2, t2, i2, o2, r2, f2, e2, c2, s2) {
var a2, p2, y2, d2, w2, _2 = t2 && t2.__k || v$1, g2 = l2.length;
for (u2.__d = e2, $(u2, l2, _2), e2 = u2.__d, a2 = 0; a2 < g2; a2++)
null != (y2 = u2.__k[a2]) && (p2 = -1 === y2.__i ? h$1 : _2[y2.__i] || h$1, y2.__i = a2, O(n2, y2, p2, i2, o2, r2, f2, e2, c2, s2), d2 = y2.__e, y2.ref && p2.ref != y2.ref && (p2.ref && N(p2.ref, null, y2), s2.push(y2.ref, y2.__c || d2, y2)), null == w2 && null != d2 && (w2 = d2), 65536 & y2.__u || p2.__k === y2.__k ? e2 = I(y2, e2, n2) : "function" == typeof y2.type && void 0 !== y2.__d ? e2 = y2.__d : d2 && (e2 = d2.nextSibling), y2.__d = void 0, y2.__u &= -196609);
u2.__d = e2, u2.__e = w2;
}
function $(n2, l2, u2) {
var t2, i2, o2, r2, f2, e2 = l2.length, c2 = u2.length, s2 = c2, a2 = 0;
for (n2.__k = [], t2 = 0; t2 < e2; t2++)
null != (i2 = l2[t2]) && "boolean" != typeof i2 && "function" != typeof i2 ? (r2 = t2 + a2, (i2 = n2.__k[t2] = "string" == typeof i2 || "number" == typeof i2 || "bigint" == typeof i2 || i2.constructor == String ? g$1(null, i2, null, null, null) : y$1(i2) ? g$1(b$1, { children: i2 }, null, null, null) : void 0 === i2.constructor && i2.__b > 0 ? g$1(i2.type, i2.props, i2.key, i2.ref ? i2.ref : null, i2.__v) : i2).__ = n2, i2.__b = n2.__b + 1, o2 = null, -1 !== (f2 = i2.__i = L(i2, u2, r2, s2)) && (s2--, (o2 = u2[f2]) && (o2.__u |= 131072)), null == o2 || null === o2.__v ? (-1 == f2 && a2--, "function" != typeof i2.type && (i2.__u |= 65536)) : f2 !== r2 && (f2 == r2 - 1 ? a2-- : f2 == r2 + 1 ? a2++ : (f2 > r2 ? a2-- : a2++, i2.__u |= 65536))) : i2 = n2.__k[t2] = null;
if (s2)
for (t2 = 0; t2 < c2; t2++)
null != (o2 = u2[t2]) && 0 == (131072 & o2.__u) && (o2.__e == n2.__d && (n2.__d = x$1(o2)), V(o2, o2));
}
function I(n2, l2, u2) {
var t2, i2;
if ("function" == typeof n2.type) {
for (t2 = n2.__k, i2 = 0; t2 && i2 < t2.length; i2++)
t2[i2] && (t2[i2].__ = n2, l2 = I(t2[i2], l2, u2));
return l2;
}
n2.__e != l2 && (l2 && n2.type && !u2.contains(l2) && (l2 = x$1(n2)), u2.insertBefore(n2.__e, l2 || null), l2 = n2.__e);
do {
l2 = l2 && l2.nextSibling;
} while (null != l2 && 8 === l2.nodeType);
return l2;
}
function H(n2, l2) {
return l2 = l2 || [], null == n2 || "boolean" == typeof n2 || (y$1(n2) ? n2.some(function(n3) {
H(n3, l2);
}) : l2.push(n2)), l2;
}
function L(n2, l2, u2, t2) {
var i2 = n2.key, o2 = n2.type, r2 = u2 - 1, f2 = u2 + 1, e2 = l2[u2];
if (null === e2 || e2 && i2 == e2.key && o2 === e2.type && 0 == (131072 & e2.__u))
return u2;
if (t2 > (null != e2 && 0 == (131072 & e2.__u) ? 1 : 0))
for (; r2 >= 0 || f2 < l2.length; ) {
if (r2 >= 0) {
if ((e2 = l2[r2]) && 0 == (131072 & e2.__u) && i2 == e2.key && o2 === e2.type)
return r2;
r2--;
}
if (f2 < l2.length) {
if ((e2 = l2[f2]) && 0 == (131072 & e2.__u) && i2 == e2.key && o2 === e2.type)
return f2;
f2++;
}
}
return -1;
}
function T$1(n2, l2, u2) {
"-" === l2[0] ? n2.setProperty(l2, null == u2 ? "" : u2) : n2[l2] = null == u2 ? "" : "number" != typeof u2 || p$1.test(l2) ? u2 : u2 + "px";
}
function A$1(n2, l2, u2, t2, i2) {
var o2;
n:
if ("style" === l2)
if ("string" == typeof u2)
n2.style.cssText = u2;
else {
if ("string" == typeof t2 && (n2.style.cssText = t2 = ""), t2)
for (l2 in t2)
u2 && l2 in u2 || T$1(n2.style, l2, "");
if (u2)
for (l2 in u2)
t2 && u2[l2] === t2[l2] || T$1(n2.style, l2, u2[l2]);
}
else if ("o" === l2[0] && "n" === l2[1])
o2 = l2 !== (l2 = l2.replace(/(PointerCapture)$|Capture$/i, "$1")), l2 = l2.toLowerCase() in n2 || "onFocusOut" === l2 || "onFocusIn" === l2 ? l2.toLowerCase().slice(2) : l2.slice(2), n2.l || (n2.l = {}), n2.l[l2 + o2] = u2, u2 ? t2 ? u2.u = t2.u : (u2.u = e$1, n2.addEventListener(l2, o2 ? s$1 : c$1, o2)) : n2.removeEventListener(l2, o2 ? s$1 : c$1, o2);
else {
if ("http://www.w3.org/2000/svg" == i2)
l2 = l2.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
else if ("width" != l2 && "height" != l2 && "href" != l2 && "list" != l2 && "form" != l2 && "tabIndex" != l2 && "download" != l2 && "rowSpan" != l2 && "colSpan" != l2 && "role" != l2 && "popover" != l2 && l2 in n2)
try {
n2[l2] = null == u2 ? "" : u2;
break n;
} catch (n3) {
}
"function" == typeof u2 || (null == u2 || false === u2 && "-" !== l2[4] ? n2.removeAttribute(l2) : n2.setAttribute(l2, "popover" == l2 && 1 == u2 ? "" : u2));
}
}
function F$1(n2) {
return function(u2) {
if (this.l) {
var t2 = this.l[u2.type + n2];
if (null == u2.t)
u2.t = e$1++;
else if (u2.t < t2.u)
return;
return t2(l$1.event ? l$1.event(u2) : u2);
}
};
}
function O(n2, u2, t2, i2, o2, r2, f2, e2, c2, s2) {
var a2, h2, v2, p2, w2, _2, g2, m2, x2, C2, M2, P2, $2, I2, H2, L2, T2 = u2.type;
if (void 0 !== u2.constructor)
return null;
128 & t2.__u && (c2 = !!(32 & t2.__u), r2 = [e2 = u2.__e = t2.__e]), (a2 = l$1.__b) && a2(u2);
n:
if ("function" == typeof T2)
try {
if (m2 = u2.props, x2 = "prototype" in T2 && T2.prototype.render, C2 = (a2 = T2.contextType) && i2[a2.__c], M2 = a2 ? C2 ? C2.props.value : a2.__ : i2, t2.__c ? g2 = (h2 = u2.__c = t2.__c).__ = h2.__E : (x2 ? u2.__c = h2 = new T2(m2, M2) : (u2.__c = h2 = new k$1(m2, M2), h2.constructor = T2, h2.render = q$1), C2 && C2.sub(h2), h2.props = m2, h2.state || (h2.state = {}), h2.context = M2, h2.__n = i2, v2 = h2.__d = true, h2.__h = [], h2._sb = []), x2 && null == h2.__s && (h2.__s = h2.state), x2 && null != T2.getDerivedStateFromProps && (h2.__s == h2.state && (h2.__s = d$1({}, h2.__s)), d$1(h2.__s, T2.getDerivedStateFromProps(m2, h2.__s))), p2 = h2.props, w2 = h2.state, h2.__v = u2, v2)
x2 && null == T2.getDerivedStateFromProps && null != h2.componentWillMount && h2.componentWillMount(), x2 && null != h2.componentDidMount && h2.__h.push(h2.componentDidMount);
else {
if (x2 && null == T2.getDerivedStateFromProps && m2 !== p2 && null != h2.componentWillReceiveProps && h2.componentWillReceiveProps(m2, M2), !h2.__e && (null != h2.shouldComponentUpdate && false === h2.shouldComponentUpdate(m2, h2.__s, M2) || u2.__v === t2.__v)) {
for (u2.__v !== t2.__v && (h2.props = m2, h2.state = h2.__s, h2.__d = false), u2.__e = t2.__e, u2.__k = t2.__k, u2.__k.some(function(n3) {
n3 && (n3.__ = u2);
}), P2 = 0; P2 < h2._sb.length; P2++)
h2.__h.push(h2._sb[P2]);
h2._sb = [], h2.__h.length && f2.push(h2);
break n;
}
null != h2.componentWillUpdate && h2.componentWillUpdate(m2, h2.__s, M2), x2 && null != h2.componentDidUpdate && h2.__h.push(function() {
h2.componentDidUpdate(p2, w2, _2);
});
}
if (h2.context = M2, h2.props = m2, h2.__P = n2, h2.__e = false, $2 = l$1.__r, I2 = 0, x2) {
for (h2.state = h2.__s, h2.__d = false, $2 && $2(u2), a2 = h2.render(h2.props, h2.state, h2.context), H2 = 0; H2 < h2._sb.length; H2++)
h2.__h.push(h2._sb[H2]);
h2._sb = [];
} else
do {
h2.__d = false, $2 && $2(u2), a2 = h2.render(h2.props, h2.state, h2.context), h2.state = h2.__s;
} while (h2.__d && ++I2 < 25);
h2.state = h2.__s, null != h2.getChildContext && (i2 = d$1(d$1({}, i2), h2.getChildContext())), x2 && !v2 && null != h2.getSnapshotBeforeUpdate && (_2 = h2.getSnapshotBeforeUpdate(p2, w2)), S(n2, y$1(L2 = null != a2 && a2.type === b$1 && null == a2.key ? a2.props.children : a2) ? L2 : [L2], u2, t2, i2, o2, r2, f2, e2, c2, s2), h2.base = u2.__e, u2.__u &= -161, h2.__h.length && f2.push(h2), g2 && (h2.__E = h2.__ = null);
} catch (n3) {
if (u2.__v = null, c2 || null != r2) {
for (u2.__u |= c2 ? 160 : 32; e2 && 8 === e2.nodeType && e2.nextSibling; )
e2 = e2.nextSibling;
r2[r2.indexOf(e2)] = null, u2.__e = e2;
} else
u2.__e = t2.__e, u2.__k = t2.__k;
l$1.__e(n3, u2, t2);
}
else
null == r2 && u2.__v === t2.__v ? (u2.__k = t2.__k, u2.__e = t2.__e) : u2.__e = z$1(t2.__e, u2, t2, i2, o2, r2, f2, c2, s2);
(a2 = l$1.diffed) && a2(u2);
}
function j$1(n2, u2, t2) {
u2.__d = void 0;
for (var i2 = 0; i2 < t2.length; i2++)
N(t2[i2], t2[++i2], t2[++i2]);
l$1.__c && l$1.__c(u2, n2), n2.some(function(u3) {
try {
n2 = u3.__h, u3.__h = [], n2.some(function(n3) {
n3.call(u3);
});
} catch (n3) {
l$1.__e(n3, u3.__v);
}
});
}
function z$1(u2, t2, i2, o2, r2, f2, e2, c2, s2) {
var a2, v2, p2, d2, _2, g2, m2, b2 = i2.props, k2 = t2.props, C2 = t2.type;
if ("svg" === C2 ? r2 = "http://www.w3.org/2000/svg" : "math" === C2 ? r2 = "http://www.w3.org/1998/Math/MathML" : r2 || (r2 = "http://www.w3.org/1999/xhtml"), null != f2) {
for (a2 = 0; a2 < f2.length; a2++)
if ((_2 = f2[a2]) && "setAttribute" in _2 == !!C2 && (C2 ? _2.localName === C2 : 3 === _2.nodeType)) {
u2 = _2, f2[a2] = null;
break;
}
}
if (null == u2) {
if (null === C2)
return document.createTextNode(k2);
u2 = document.createElementNS(r2, C2, k2.is && k2), c2 && (l$1.__m && l$1.__m(t2, f2), c2 = false), f2 = null;
}
if (null === C2)
b2 === k2 || c2 && u2.data === k2 || (u2.data = k2);
else {
if (f2 = f2 && n.call(u2.childNodes), b2 = i2.props || h$1, !c2 && null != f2)
for (b2 = {}, a2 = 0; a2 < u2.attributes.length; a2++)
b2[(_2 = u2.attributes[a2]).name] = _2.value;
for (a2 in b2)
if (_2 = b2[a2], "children" == a2)
;
else if ("dangerouslySetInnerHTML" == a2)
p2 = _2;
else if (!(a2 in k2)) {
if ("value" == a2 && "defaultValue" in k2 || "checked" == a2 && "defaultChecked" in k2)
continue;
A$1(u2, a2, null, _2, r2);
}
for (a2 in k2)
_2 = k2[a2], "children" == a2 ? d2 = _2 : "dangerouslySetInnerHTML" == a2 ? v2 = _2 : "value" == a2 ? g2 = _2 : "checked" == a2 ? m2 = _2 : c2 && "function" != typeof _2 || b2[a2] === _2 || A$1(u2, a2, _2, b2[a2], r2);
if (v2)
c2 || p2 && (v2.__html === p2.__html || v2.__html === u2.innerHTML) || (u2.innerHTML = v2.__html), t2.__k = [];
else if (p2 && (u2.innerHTML = ""), S(u2, y$1(d2) ? d2 : [d2], t2, i2, o2, "foreignObject" === C2 ? "http://www.w3.org/1999/xhtml" : r2, f2, e2, f2 ? f2[0] : i2.__k && x$1(i2, 0), c2, s2), null != f2)
for (a2 = f2.length; a2--; )
w$1(f2[a2]);
c2 || (a2 = "value", "progress" === C2 && null == g2 ? u2.removeAttribute("value") : void 0 !== g2 && (g2 !== u2[a2] || "progress" === C2 && !g2 || "option" === C2 && g2 !== b2[a2]) && A$1(u2, a2, g2, b2[a2], r2), a2 = "checked", void 0 !== m2 && m2 !== u2[a2] && A$1(u2, a2, m2, b2[a2], r2));
}
return u2;
}
function N(n2, u2, t2) {
try {
if ("function" == typeof n2) {
var i2 = "function" == typeof n2.__u;
i2 && n2.__u(), i2 && null == u2 || (n2.__u = n2(u2));
} else
n2.current = u2;
} catch (n3) {
l$1.__e(n3, t2);
}
}
function V(n2, u2, t2) {
var i2, o2;
if (l$1.unmount && l$1.unmount(n2), (i2 = n2.ref) && (i2.current && i2.current !== n2.__e || N(i2, null, u2)), null != (i2 = n2.__c)) {
if (i2.componentWillUnmount)
try {
i2.componentWillUnmount();
} catch (n3) {
l$1.__e(n3, u2);
}
i2.base = i2.__P = null;
}
if (i2 = n2.__k)
for (o2 = 0; o2 < i2.length; o2++)
i2[o2] && V(i2[o2], u2, t2 || "function" != typeof n2.type);
t2 || w$1(n2.__e), n2.__c = n2.__ = n2.__e = n2.__d = void 0;
}
function q$1(n2, l2, u2) {
return this.constructor(n2, u2);
}
function B$1(u2, t2, i2) {
var o2, r2, f2, e2;
l$1.__ && l$1.__(u2, t2), r2 = (o2 = "function" == typeof i2) ? null : i2 && i2.__k || t2.__k, f2 = [], e2 = [], O(t2, u2 = (!o2 && i2 || t2).__k = _$1(b$1, null, [u2]), r2 || h$1, h$1, t2.namespaceURI, !o2 && i2 ? [i2] : r2 ? null : t2.firstChild ? n.call(t2.childNodes) : null, f2, !o2 && i2 ? i2 : r2 ? r2.__e : t2.firstChild, o2, e2), j$1(f2, u2, e2);
}
function D$1(n2, l2) {
B$1(n2, l2, D$1);
}
function E(l2, u2, t2) {
var i2, o2, r2, f2, e2 = d$1({}, l2.props);
for (r2 in l2.type && l2.type.defaultProps && (f2 = l2.type.defaultProps), u2)
"key" == r2 ? i2 = u2[r2] : "ref" == r2 ? o2 = u2[r2] : e2[r2] = void 0 === u2[r2] && void 0 !== f2 ? f2[r2] : u2[r2];
return arguments.length > 2 && (e2.children = arguments.length > 3 ? n.call(arguments, 2) : t2), g$1(l2.type, e2, i2 || l2.key, o2 || l2.ref, null);
}
function G(n2, l2) {
var u2 = { __c: l2 = "__cC" + a$1++, __: n2, Consumer: function(n3, l3) {
return n3.children(l3);
}, Provider: function(n3) {
var u3, t2;
return this.getChildContext || (u3 = [], (t2 = {})[l2] = this, this.getChildContext = function() {
return t2;
}, this.componentWillUnmount = function() {
u3 = null;
}, this.shouldComponentUpdate = function(n4) {
this.props.value !== n4.value && u3.some(function(n5) {
n5.__e = true, M(n5);
});
}, this.sub = function(n4) {
u3.push(n4);
var l3 = n4.componentWillUnmount;
n4.componentWillUnmount = function() {
u3 && u3.splice(u3.indexOf(n4), 1), l3 && l3.call(n4);
};
}), n3.children;
} };
return u2.Provider.__ = u2.Consumer.contextType = u2;
}
n = v$1.slice, l$1 = { __e: function(n2, l2, u2, t2) {
for (var i2, o2, r2; l2 = l2.__; )
if ((i2 = l2.__c) && !i2.__)
try {
if ((o2 = i2.constructor) && null != o2.getDerivedStateFromError && (i2.setState(o2.getDerivedStateFromError(n2)), r2 = i2.__d), null != i2.componentDidCatch && (i2.componentDidCatch(n2, t2 || {}), r2 = i2.__d), r2)
return i2.__E = i2;
} catch (l3) {
n2 = l3;
}
throw n2;
} }, u$1 = 0, t$1 = function(n2) {
return null != n2 && null == n2.constructor;
}, k$1.prototype.setState = function(n2, l2) {
var u2;
u2 = null != this.__s && this.__s !== this.state ? this.__s : this.__s = d$1({}, this.state), "function" == typeof n2 && (n2 = n2(d$1({}, u2), this.props)), n2 && d$1(u2, n2), null != n2 && this.__v && (l2 && this._sb.push(l2), M(this));
}, k$1.prototype.forceUpdate = function(n2) {
this.__v && (this.__e = true, n2 && this.__h.push(n2), M(this));
}, k$1.prototype.render = b$1, i$1 = [], r$2 = "function" == typeof Promise ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, f$1 = function(n2, l2) {
return n2.__v.__b - l2.__v.__b;
}, P$1.__r = 0, e$1 = 0, c$1 = F$1(false), s$1 = F$1(true), a$1 = 0;
const preact_module = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
Component: k$1,
Fragment: b$1,
cloneElement: E,
createContext: G,
createElement: _$1,
createRef: m$1,
h: _$1,
hydrate: D$1,
get isValidElement() {
return t$1;
},
get options() {
return l$1;
},
render: B$1,
toChildArray: H
}, Symbol.toStringTag, { value: "Module" }));
function r$1(e2) {
var t2, f2, n2 = "";
if ("string" == typeof e2 || "number" == typeof e2)
n2 += e2;
else if ("object" == typeof e2)
if (Array.isArray(e2))
for (t2 = 0; t2 < e2.length; t2++)
e2[t2] && (f2 = r$1(e2[t2])) && (n2 && (n2 += " "), n2 += f2);
else
for (t2 in e2)
e2[t2] && (n2 && (n2 += " "), n2 += t2);
return n2;
}
function clsx() {
for (var e2, t2, f2 = 0, n2 = ""; f2 < arguments.length; )
(e2 = arguments[f2++]) && (t2 = r$1(e2)) && (n2 && (n2 += " "), n2 += t2);
return n2;
}
const clsx_m = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
clsx,
default: clsx
}, Symbol.toStringTag, { value: "Module" }));
var t, r, u, i, o = 0, f = [], c = l$1, e = c.__b, a = c.__r, v = c.diffed, l = c.__c, m = c.unmount, s = c.__;
function d(n2, t2) {
c.__h && c.__h(r, n2, o || t2), o = 0;
var u2 = r.__H || (r.__H = { __: [], __h: [] });
return n2 >= u2.__.length && u2.__.push({}), u2.__[n2];
}
function h(n2) {
return o = 1, p(D, n2);
}
function p(n2, u2, i2) {
var o2 = d(t++, 2);
if (o2.t = n2, !o2.__c && (o2.__ = [i2 ? i2(u2) : D(void 0, u2), function(n3) {
var t2 = o2.__N ? o2.__N[0] : o2.__[0], r2 = o2.t(t2, n3);
t2 !== r2 && (o2.__N = [r2, o2.__[1]], o2.__c.setState({}));
}], o2.__c = r, !r.u)) {
var f2 = function(n3, t2, r2) {
if (!o2.__c.__H)
return true;
var u3 = o2.__c.__H.__.filter(function(n4) {
return !!n4.__c;
});
if (u3.every(function(n4) {
return !n4.__N;
}))
return !c2 || c2.call(this, n3, t2, r2);
var i3 = false;
return u3.forEach(function(n4) {
if (n4.__N) {
var t3 = n4.__[0];
n4.__ = n4.__N, n4.__N = void 0, t3 !== n4.__[0] && (i3 = true);
}
}), !(!i3 && o2.__c.props === n3) && (!c2 || c2.call(this, n3, t2, r2));
};
r.u = true;
var c2 = r.shouldComponentUpdate, e2 = r.componentWillUpdate;
r.componentWillUpdate = function(n3, t2, r2) {
if (this.__e) {
var u3 = c2;
c2 = void 0, f2(n3, t2, r2), c2 = u3;
}
e2 && e2.call(this, n3, t2, r2);
}, r.shouldComponentUpdate = f2;
}
return o2.__N || o2.__;
}
function y(n2, u2) {
var i2 = d(t++, 3);
!c.__s && C(i2.__H, u2) && (i2.__ = n2, i2.i = u2, r.__H.__h.push(i2));
}
function _(n2, u2) {
var i2 = d(t++, 4);
!c.__s && C(i2.__H, u2) && (i2.__ = n2, i2.i = u2, r.__h.push(i2));
}
function A(n2) {
return o = 5, T(function() {
return { current: n2 };
}, []);
}
function F(n2, t2, r2) {
o = 6, _(function() {
return "function" == typeof n2 ? (n2(t2()), function() {
return n2(null);
}) : n2 ? (n2.current = t2(), function() {
return n2.current = null;
}) : void 0;
}, null == r2 ? r2 : r2.concat(n2));
}
function T(n2, r2) {
var u2 = d(t++, 7);
return C(u2.__H, r2) && (u2.__ = n2(), u2.__H = r2, u2.__h = n2), u2.__;
}
function q(n2, t2) {
return o = 8, T(function() {
return n2;
}, t2);
}
function x(n2) {
var u2 = r.context[n2.__c], i2 = d(t++, 9);
return i2.c = n2, u2 ? (null == i2.__ && (i2.__ = true, u2.sub(r)), u2.props.value) : n2.__;
}
function P(n2, t2) {
c.useDebugValue && c.useDebugValue(t2 ? t2(n2) : n2);
}
function b(n2) {
var u2 = d(t++, 10), i2 = h();
return u2.__ = n2, r.componentDidCatch || (r.componentDidCatch = function(n3, t2) {
u2.__ && u2.__(n3, t2), i2[1](n3);
}), [i2[0], function() {
i2[1](void 0);
}];
}
function g() {
var n2 = d(t++, 11);
if (!n2.__) {
for (var u2 = r.__v; null !== u2 && !u2.__m && null !== u2.__; )
u2 = u2.__;
var i2 = u2.__m || (u2.__m = [0, 0]);
n2.__ = "P" + i2[0] + "-" + i2[1]++;
}
return n2.__;
}
function j() {
for (var n2; n2 = f.shift(); )
if (n2.__P && n2.__H)
try {
n2.__H.__h.forEach(z), n2.__H.__h.forEach(B), n2.__H.__h = [];
} catch (t2) {
n2.__H.__h = [], c.__e(t2, n2.__v);
}
}
c.__b = function(n2) {
r = null, e && e(n2);
}, c.__ = function(n2, t2) {
n2 && t2.__k && t2.__k.__m && (n2.__m = t2.__k.__m), s && s(n2, t2);
}, c.__r = function(n2) {
a && a(n2), t = 0;
var i2 = (r = n2.__c).__H;
i2 && (u === r ? (i2.__h = [], r.__h = [], i2.__.forEach(function(n3) {
n3.__N && (n3.__ = n3.__N), n3.i = n3.__N = void 0;
})) : (i2.__h.forEach(z), i2.__h.forEach(B), i2.__h = [], t = 0)), u = r;
}, c.diffed = function(n2) {
v && v(n2);
var t2 = n2.__c;
t2 && t2.__H && (t2.__H.__h.length && (1 !== f.push(t2) && i === c.requestAnimationFrame || ((i = c.requestAnimationFrame) || w)(j)), t2.__H.__.forEach(function(n3) {
n3.i && (n3.__H = n3.i), n3.i = void 0;
})), u = r = null;
}, c.__c = function(n2, t2) {
t2.some(function(n3) {
try {
n3.__h.forEach(z), n3.__h = n3.__h.filter(function(n4) {
return !n4.__ || B(n4);
});
} catch (r2) {
t2.some(function(n4) {
n4.__h && (n4.__h = []);
}), t2 = [], c.__e(r2, n3.__v);
}
}), l && l(n2, t2);
}, c.unmount = function(n2) {
m && m(n2);
var t2, r2 = n2.__c;
r2 && r2.__H && (r2.__H.__.forEach(function(n3) {
try {
z(n3);
} catch (n4) {
t2 = n4;
}
}), r2.__H = void 0, t2 && c.__e(t2, r2.__v));
};
var k = "function" == typeof requestAnimationFrame;
function w(n2) {
var t2, r2 = function() {
clearTimeout(u2), k && cancelAnimationFrame(t2), setTimeout(n2);
}, u2 = setTimeout(r2, 100);
k && (t2 = requestAnimationFrame(r2));
}
function z(n2) {
var t2 = r, u2 = n2.__c;
"function" == typeof u2 && (n2.__c = void 0, u2()), r = t2;
}
function B(n2) {
var t2 = r;
n2.__c = n2.__(), r = t2;
}
function C(n2, t2) {
return !n2 || n2.length !== t2.length || t2.some(function(t3, r2) {
return t3 !== n2[r2];
});
}
function D(n2, t2) {
return "function" == typeof t2 ? t2(n2) : t2;
}
const hooks_module = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
useCallback: q,
useContext: x,
useDebugValue: P,
useEffect: y,
useErrorBoundary: b,
useId: g,
useImperativeHandle: F,
useLayoutEffect: _,
useMemo: T,
useReducer: p,
useRef: A,
useState: h
}, Symbol.toStringTag, { value: "Module" }));
export {
B$1 as B,
_$1 as _,
clsx_m as a,
hooks_module as b,
clsx as c,
h,
preact_module as p,
y
};
//# sourceMappingURL=hooks.module-69e9d77d.mjs.map