react-reactive-hooks
Advanced tools
Comparing version 0.1.1 to 0.1.2
652
index.js
@@ -1,12 +0,12 @@ | ||
import Ae, { useState as xe, useRef as W, useCallback as z, useLayoutEffect as lr, createContext as vr, useContext as dr } from "react"; | ||
import { produce as pr } from "immer"; | ||
import De, { useRef as D, useState as fr, useCallback as V, createContext as lr, useContext as vr } from "react"; | ||
import { produce as dr } from "immer"; | ||
import je from "lodash.clonedeep"; | ||
var ne = {}, gr = { | ||
var ae = {}, pr = { | ||
get exports() { | ||
return ne; | ||
return ae; | ||
}, | ||
set exports(v) { | ||
ne = v; | ||
set exports(d) { | ||
ae = d; | ||
} | ||
}, V = {}; | ||
}, U = {}; | ||
/** | ||
@@ -22,18 +22,18 @@ * @license React | ||
var ke; | ||
function hr() { | ||
function gr() { | ||
if (ke) | ||
return V; | ||
return U; | ||
ke = 1; | ||
var v = Ae, h = Symbol.for("react.element"), d = Symbol.for("react.fragment"), p = Object.prototype.hasOwnProperty, y = v.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, _ = { key: !0, ref: !0, __self: !0, __source: !0 }; | ||
function O(w, c, T) { | ||
var S, x = {}, a = null, i = null; | ||
T !== void 0 && (a = "" + T), c.key !== void 0 && (a = "" + c.key), c.ref !== void 0 && (i = c.ref); | ||
for (S in c) | ||
p.call(c, S) && !_.hasOwnProperty(S) && (x[S] = c[S]); | ||
var d = De, h = Symbol.for("react.element"), g = Symbol.for("react.fragment"), p = Object.prototype.hasOwnProperty, m = d.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, E = { key: !0, ref: !0, __self: !0, __source: !0 }; | ||
function P(w, l, y) { | ||
var C, O = {}, j = null, a = null; | ||
y !== void 0 && (j = "" + y), l.key !== void 0 && (j = "" + l.key), l.ref !== void 0 && (a = l.ref); | ||
for (C in l) | ||
p.call(l, C) && !E.hasOwnProperty(C) && (O[C] = l[C]); | ||
if (w && w.defaultProps) | ||
for (S in c = w.defaultProps, c) | ||
x[S] === void 0 && (x[S] = c[S]); | ||
return { $$typeof: h, type: w, key: a, ref: i, props: x, _owner: y.current }; | ||
for (C in l = w.defaultProps, l) | ||
O[C] === void 0 && (O[C] = l[C]); | ||
return { $$typeof: h, type: w, key: j, ref: a, props: O, _owner: m.current }; | ||
} | ||
return V.Fragment = d, V.jsx = O, V.jsxs = O, V; | ||
return U.Fragment = g, U.jsx = P, U.jsxs = P, U; | ||
} | ||
@@ -50,14 +50,14 @@ var L = {}; | ||
*/ | ||
var De; | ||
function _r() { | ||
return De || (De = 1, process.env.NODE_ENV !== "production" && function() { | ||
var v = Ae, h = Symbol.for("react.element"), d = Symbol.for("react.portal"), p = Symbol.for("react.fragment"), y = Symbol.for("react.strict_mode"), _ = Symbol.for("react.profiler"), O = Symbol.for("react.provider"), w = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), T = Symbol.for("react.suspense"), S = Symbol.for("react.suspense_list"), x = Symbol.for("react.memo"), a = Symbol.for("react.lazy"), i = Symbol.for("react.offscreen"), E = Symbol.iterator, g = "@@iterator"; | ||
function l(e) { | ||
var Ae; | ||
function hr() { | ||
return Ae || (Ae = 1, process.env.NODE_ENV !== "production" && function() { | ||
var d = De, h = Symbol.for("react.element"), g = Symbol.for("react.portal"), p = Symbol.for("react.fragment"), m = Symbol.for("react.strict_mode"), E = Symbol.for("react.profiler"), P = Symbol.for("react.provider"), w = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), y = Symbol.for("react.suspense"), C = Symbol.for("react.suspense_list"), O = Symbol.for("react.memo"), j = Symbol.for("react.lazy"), a = Symbol.for("react.offscreen"), i = Symbol.iterator, T = "@@iterator"; | ||
function _(e) { | ||
if (e === null || typeof e != "object") | ||
return null; | ||
var r = E && e[E] || e[g]; | ||
var r = i && e[i] || e[T]; | ||
return typeof r == "function" ? r : null; | ||
} | ||
var m = v.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; | ||
function C(e) { | ||
var s = d.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; | ||
function f(e) { | ||
{ | ||
@@ -71,27 +71,27 @@ for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++) | ||
{ | ||
var n = m.ReactDebugCurrentFrame, s = n.getStackAddendum(); | ||
s !== "" && (r += "%s", t = t.concat([s])); | ||
var f = t.map(function(u) { | ||
var n = s.ReactDebugCurrentFrame, c = n.getStackAddendum(); | ||
c !== "" && (r += "%s", t = t.concat([c])); | ||
var v = t.map(function(u) { | ||
return String(u); | ||
}); | ||
f.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, f); | ||
v.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, v); | ||
} | ||
} | ||
var G = !1, Fe = !1, Ie = !1, We = !1, $e = !1, oe; | ||
oe = Symbol.for("react.module.reference"); | ||
function Ye(e) { | ||
return !!(typeof e == "string" || typeof e == "function" || e === p || e === _ || $e || e === y || e === T || e === S || We || e === i || G || Fe || Ie || typeof e == "object" && e !== null && (e.$$typeof === a || e.$$typeof === x || e.$$typeof === O || e.$$typeof === w || e.$$typeof === c || // This needs to include all possible module reference object | ||
var G = !1, K = !1, Fe = !1, Ie = !1, We = !1, ue; | ||
ue = Symbol.for("react.module.reference"); | ||
function $e(e) { | ||
return !!(typeof e == "string" || typeof e == "function" || e === p || e === E || We || e === m || e === y || e === C || Ie || e === a || G || K || Fe || typeof e == "object" && e !== null && (e.$$typeof === j || e.$$typeof === O || e.$$typeof === P || e.$$typeof === w || e.$$typeof === l || // This needs to include all possible module reference object | ||
// types supported by any Flight configuration anywhere since | ||
// we don't know which Flight build this will end up being used | ||
// with. | ||
e.$$typeof === oe || e.getModuleId !== void 0)); | ||
e.$$typeof === ue || e.getModuleId !== void 0)); | ||
} | ||
function Ve(e, r, t) { | ||
function Ye(e, r, t) { | ||
var n = e.displayName; | ||
if (n) | ||
return n; | ||
var s = r.displayName || r.name || ""; | ||
return s !== "" ? t + "(" + s + ")" : t; | ||
var c = r.displayName || r.name || ""; | ||
return c !== "" ? t + "(" + c + ")" : t; | ||
} | ||
function ue(e) { | ||
function ie(e) { | ||
return e.displayName || "Context"; | ||
@@ -102,3 +102,3 @@ } | ||
return null; | ||
if (typeof e.tag == "number" && C("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function") | ||
if (typeof e.tag == "number" && f("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function") | ||
return e.displayName || e.name || null; | ||
@@ -110,11 +110,11 @@ if (typeof e == "string") | ||
return "Fragment"; | ||
case d: | ||
case g: | ||
return "Portal"; | ||
case _: | ||
case E: | ||
return "Profiler"; | ||
case m: | ||
return "StrictMode"; | ||
case y: | ||
return "StrictMode"; | ||
case T: | ||
return "Suspense"; | ||
case S: | ||
case C: | ||
return "SuspenseList"; | ||
@@ -126,15 +126,15 @@ } | ||
var r = e; | ||
return ue(r) + ".Consumer"; | ||
return ie(r) + ".Consumer"; | ||
case P: | ||
var t = e; | ||
return ie(t._context) + ".Provider"; | ||
case l: | ||
return Ye(e, e.render, "ForwardRef"); | ||
case O: | ||
var t = e; | ||
return ue(t._context) + ".Provider"; | ||
case c: | ||
return Ve(e, e.render, "ForwardRef"); | ||
case x: | ||
var n = e.displayName || null; | ||
return n !== null ? n : k(e.type) || "Memo"; | ||
case a: { | ||
var s = e, f = s._payload, u = s._init; | ||
case j: { | ||
var c = e, v = c._payload, u = c._init; | ||
try { | ||
return k(u(f)); | ||
return k(u(v)); | ||
} catch { | ||
@@ -147,14 +147,14 @@ return null; | ||
} | ||
var A = Object.assign, $ = 0, ie, se, ce, fe, le, ve, de; | ||
function pe() { | ||
var F = Object.assign, $ = 0, se, ce, fe, le, ve, de, pe; | ||
function ge() { | ||
} | ||
pe.__reactDisabledLog = !0; | ||
function Le() { | ||
ge.__reactDisabledLog = !0; | ||
function Ve() { | ||
{ | ||
if ($ === 0) { | ||
ie = console.log, se = console.info, ce = console.warn, fe = console.error, le = console.group, ve = console.groupCollapsed, de = console.groupEnd; | ||
se = console.log, ce = console.info, fe = console.warn, le = console.error, ve = console.group, de = console.groupCollapsed, pe = console.groupEnd; | ||
var e = { | ||
configurable: !0, | ||
enumerable: !0, | ||
value: pe, | ||
value: ge, | ||
writable: !0 | ||
@@ -175,3 +175,3 @@ }; | ||
} | ||
function Ne() { | ||
function Ue() { | ||
{ | ||
@@ -185,52 +185,52 @@ if ($--, $ === 0) { | ||
Object.defineProperties(console, { | ||
log: A({}, e, { | ||
value: ie | ||
}), | ||
info: A({}, e, { | ||
log: F({}, e, { | ||
value: se | ||
}), | ||
warn: A({}, e, { | ||
info: F({}, e, { | ||
value: ce | ||
}), | ||
error: A({}, e, { | ||
warn: F({}, e, { | ||
value: fe | ||
}), | ||
group: A({}, e, { | ||
error: F({}, e, { | ||
value: le | ||
}), | ||
groupCollapsed: A({}, e, { | ||
group: F({}, e, { | ||
value: ve | ||
}), | ||
groupEnd: A({}, e, { | ||
groupCollapsed: F({}, e, { | ||
value: de | ||
}), | ||
groupEnd: F({}, e, { | ||
value: pe | ||
}) | ||
}); | ||
} | ||
$ < 0 && C("disabledDepth fell below zero. This is a bug in React. Please file an issue."); | ||
$ < 0 && f("disabledDepth fell below zero. This is a bug in React. Please file an issue."); | ||
} | ||
} | ||
var K = m.ReactCurrentDispatcher, H; | ||
var H = s.ReactCurrentDispatcher, X; | ||
function N(e, r, t) { | ||
{ | ||
if (H === void 0) | ||
if (X === void 0) | ||
try { | ||
throw Error(); | ||
} catch (s) { | ||
var n = s.stack.trim().match(/\n( *(at )?)/); | ||
H = n && n[1] || ""; | ||
} catch (c) { | ||
var n = c.stack.trim().match(/\n( *(at )?)/); | ||
X = n && n[1] || ""; | ||
} | ||
return ` | ||
` + H + e; | ||
` + X + e; | ||
} | ||
} | ||
var X = !1, U; | ||
var Z = !1, M; | ||
{ | ||
var Ue = typeof WeakMap == "function" ? WeakMap : Map; | ||
U = new Ue(); | ||
var Le = typeof WeakMap == "function" ? WeakMap : Map; | ||
M = new Le(); | ||
} | ||
function ge(e, r) { | ||
if (!e || X) | ||
function he(e, r) { | ||
if (!e || Z) | ||
return ""; | ||
{ | ||
var t = U.get(e); | ||
var t = M.get(e); | ||
if (t !== void 0) | ||
@@ -240,7 +240,7 @@ return t; | ||
var n; | ||
X = !0; | ||
var s = Error.prepareStackTrace; | ||
Z = !0; | ||
var c = Error.prepareStackTrace; | ||
Error.prepareStackTrace = void 0; | ||
var f; | ||
f = K.current, K.current = null, Le(); | ||
var v; | ||
v = H.current, H.current = null, Ve(); | ||
try { | ||
@@ -258,4 +258,4 @@ if (r) { | ||
Reflect.construct(u, []); | ||
} catch (D) { | ||
n = D; | ||
} catch (A) { | ||
n = A; | ||
} | ||
@@ -266,4 +266,4 @@ Reflect.construct(e, [], u); | ||
u.call(); | ||
} catch (D) { | ||
n = D; | ||
} catch (A) { | ||
n = A; | ||
} | ||
@@ -275,21 +275,21 @@ e.call(u.prototype); | ||
throw Error(); | ||
} catch (D) { | ||
n = D; | ||
} catch (A) { | ||
n = A; | ||
} | ||
e(); | ||
} | ||
} catch (D) { | ||
if (D && n && typeof D.stack == "string") { | ||
for (var o = D.stack.split(` | ||
`), P = n.stack.split(` | ||
`), b = o.length - 1, R = P.length - 1; b >= 1 && R >= 0 && o[b] !== P[R]; ) | ||
} catch (A) { | ||
if (A && n && typeof A.stack == "string") { | ||
for (var o = A.stack.split(` | ||
`), S = n.stack.split(` | ||
`), b = o.length - 1, R = S.length - 1; b >= 1 && R >= 0 && o[b] !== S[R]; ) | ||
R--; | ||
for (; b >= 1 && R >= 0; b--, R--) | ||
if (o[b] !== P[R]) { | ||
if (o[b] !== S[R]) { | ||
if (b !== 1 || R !== 1) | ||
do | ||
if (b--, R--, R < 0 || o[b] !== P[R]) { | ||
var j = ` | ||
if (b--, R--, R < 0 || o[b] !== S[R]) { | ||
var x = ` | ||
` + o[b].replace(" at new ", " at "); | ||
return e.displayName && j.includes("<anonymous>") && (j = j.replace("<anonymous>", e.displayName)), typeof e == "function" && U.set(e, j), j; | ||
return e.displayName && x.includes("<anonymous>") && (x = x.replace("<anonymous>", e.displayName)), typeof e == "function" && M.set(e, x), x; | ||
} | ||
@@ -301,25 +301,25 @@ while (b >= 1 && R >= 0); | ||
} finally { | ||
X = !1, K.current = f, Ne(), Error.prepareStackTrace = s; | ||
Z = !1, H.current = v, Ue(), Error.prepareStackTrace = c; | ||
} | ||
var I = e ? e.displayName || e.name : "", Oe = I ? N(I) : ""; | ||
return typeof e == "function" && U.set(e, Oe), Oe; | ||
var W = e ? e.displayName || e.name : "", xe = W ? N(W) : ""; | ||
return typeof e == "function" && M.set(e, xe), xe; | ||
} | ||
function Me(e, r, t) { | ||
return ge(e, !1); | ||
function Ne(e, r, t) { | ||
return he(e, !1); | ||
} | ||
function Be(e) { | ||
function Me(e) { | ||
var r = e.prototype; | ||
return !!(r && r.isReactComponent); | ||
} | ||
function M(e, r, t) { | ||
function B(e, r, t) { | ||
if (e == null) | ||
return ""; | ||
if (typeof e == "function") | ||
return ge(e, Be(e)); | ||
return he(e, Me(e)); | ||
if (typeof e == "string") | ||
return N(e); | ||
switch (e) { | ||
case T: | ||
case y: | ||
return N("Suspense"); | ||
case S: | ||
case C: | ||
return N("SuspenseList"); | ||
@@ -329,10 +329,10 @@ } | ||
switch (e.$$typeof) { | ||
case c: | ||
return Me(e.render); | ||
case x: | ||
return M(e.type, r, t); | ||
case a: { | ||
var n = e, s = n._payload, f = n._init; | ||
case l: | ||
return Ne(e.render); | ||
case O: | ||
return B(e.type, r, t); | ||
case j: { | ||
var n = e, c = n._payload, v = n._init; | ||
try { | ||
return M(f(s), r, t); | ||
return B(v(c), r, t); | ||
} catch { | ||
@@ -344,20 +344,20 @@ } | ||
} | ||
var B = Object.prototype.hasOwnProperty, he = {}, _e = m.ReactDebugCurrentFrame; | ||
function q(e) { | ||
var q = Object.prototype.hasOwnProperty, _e = {}, be = s.ReactDebugCurrentFrame; | ||
function z(e) { | ||
if (e) { | ||
var r = e._owner, t = M(e.type, e._source, r ? r.type : null); | ||
_e.setExtraStackFrame(t); | ||
var r = e._owner, t = B(e.type, e._source, r ? r.type : null); | ||
be.setExtraStackFrame(t); | ||
} else | ||
_e.setExtraStackFrame(null); | ||
be.setExtraStackFrame(null); | ||
} | ||
function qe(e, r, t, n, s) { | ||
function Be(e, r, t, n, c) { | ||
{ | ||
var f = Function.call.bind(B); | ||
var v = Function.call.bind(q); | ||
for (var u in e) | ||
if (f(e, u)) { | ||
if (v(e, u)) { | ||
var o = void 0; | ||
try { | ||
if (typeof e[u] != "function") { | ||
var P = Error((n || "React class") + ": " + t + " type `" + u + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[u] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); | ||
throw P.name = "Invariant Violation", P; | ||
var S = Error((n || "React class") + ": " + t + " type `" + u + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[u] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); | ||
throw S.name = "Invariant Violation", S; | ||
} | ||
@@ -368,11 +368,11 @@ o = e[u](r, u, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); | ||
} | ||
o && !(o instanceof Error) && (q(s), C("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", n || "React class", t, u, typeof o), q(null)), o instanceof Error && !(o.message in he) && (he[o.message] = !0, q(s), C("Failed %s type: %s", t, o.message), q(null)); | ||
o && !(o instanceof Error) && (z(c), f("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", n || "React class", t, u, typeof o), z(null)), o instanceof Error && !(o.message in _e) && (_e[o.message] = !0, z(c), f("Failed %s type: %s", t, o.message), z(null)); | ||
} | ||
} | ||
} | ||
var ze = Array.isArray; | ||
function Z(e) { | ||
return ze(e); | ||
var qe = Array.isArray; | ||
function Q(e) { | ||
return qe(e); | ||
} | ||
function Je(e) { | ||
function ze(e) { | ||
{ | ||
@@ -383,5 +383,5 @@ var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object"; | ||
} | ||
function Ge(e) { | ||
function Je(e) { | ||
try { | ||
return be(e), !1; | ||
return me(e), !1; | ||
} catch { | ||
@@ -391,10 +391,10 @@ return !0; | ||
} | ||
function be(e) { | ||
function me(e) { | ||
return "" + e; | ||
} | ||
function me(e) { | ||
if (Ge(e)) | ||
return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Je(e)), be(e); | ||
function Re(e) { | ||
if (Je(e)) | ||
return f("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ze(e)), me(e); | ||
} | ||
var Y = m.ReactCurrentOwner, Ke = { | ||
var Y = s.ReactCurrentOwner, Ge = { | ||
key: !0, | ||
@@ -404,6 +404,6 @@ ref: !0, | ||
__source: !0 | ||
}, Re, Ee, Q; | ||
Q = {}; | ||
function He(e) { | ||
if (B.call(e, "ref")) { | ||
}, Ee, ye, ee; | ||
ee = {}; | ||
function Ke(e) { | ||
if (q.call(e, "ref")) { | ||
var r = Object.getOwnPropertyDescriptor(e, "ref").get; | ||
@@ -415,4 +415,4 @@ if (r && r.isReactWarning) | ||
} | ||
function Xe(e) { | ||
if (B.call(e, "key")) { | ||
function He(e) { | ||
if (q.call(e, "key")) { | ||
var r = Object.getOwnPropertyDescriptor(e, "key").get; | ||
@@ -424,12 +424,12 @@ if (r && r.isReactWarning) | ||
} | ||
function Ze(e, r) { | ||
function Xe(e, r) { | ||
if (typeof e.ref == "string" && Y.current && r && Y.current.stateNode !== r) { | ||
var t = k(Y.current.type); | ||
Q[t] || (C('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', k(Y.current.type), e.ref), Q[t] = !0); | ||
ee[t] || (f('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', k(Y.current.type), e.ref), ee[t] = !0); | ||
} | ||
} | ||
function Qe(e, r) { | ||
function Ze(e, r) { | ||
{ | ||
var t = function() { | ||
Re || (Re = !0, C("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r)); | ||
Ee || (Ee = !0, f("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r)); | ||
}; | ||
@@ -442,6 +442,6 @@ t.isReactWarning = !0, Object.defineProperty(e, "key", { | ||
} | ||
function er(e, r) { | ||
function Qe(e, r) { | ||
{ | ||
var t = function() { | ||
Ee || (Ee = !0, C("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r)); | ||
ye || (ye = !0, f("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r)); | ||
}; | ||
@@ -454,3 +454,3 @@ t.isReactWarning = !0, Object.defineProperty(e, "ref", { | ||
} | ||
var rr = function(e, r, t, n, s, f, u) { | ||
var er = function(e, r, t, n, c, v, u) { | ||
var o = { | ||
@@ -465,3 +465,3 @@ // This tag allows us to uniquely identify this as a React Element | ||
// Record the component responsible for creating this element. | ||
_owner: f | ||
_owner: v | ||
}; | ||
@@ -482,40 +482,40 @@ return o._store = {}, Object.defineProperty(o._store, "validated", { | ||
writable: !1, | ||
value: s | ||
value: c | ||
}), Object.freeze && (Object.freeze(o.props), Object.freeze(o)), o; | ||
}; | ||
function tr(e, r, t, n, s) { | ||
function rr(e, r, t, n, c) { | ||
{ | ||
var f, u = {}, o = null, P = null; | ||
t !== void 0 && (me(t), o = "" + t), Xe(r) && (me(r.key), o = "" + r.key), He(r) && (P = r.ref, Ze(r, s)); | ||
for (f in r) | ||
B.call(r, f) && !Ke.hasOwnProperty(f) && (u[f] = r[f]); | ||
var v, u = {}, o = null, S = null; | ||
t !== void 0 && (Re(t), o = "" + t), He(r) && (Re(r.key), o = "" + r.key), Ke(r) && (S = r.ref, Xe(r, c)); | ||
for (v in r) | ||
q.call(r, v) && !Ge.hasOwnProperty(v) && (u[v] = r[v]); | ||
if (e && e.defaultProps) { | ||
var b = e.defaultProps; | ||
for (f in b) | ||
u[f] === void 0 && (u[f] = b[f]); | ||
for (v in b) | ||
u[v] === void 0 && (u[v] = b[v]); | ||
} | ||
if (o || P) { | ||
if (o || S) { | ||
var R = typeof e == "function" ? e.displayName || e.name || "Unknown" : e; | ||
o && Qe(u, R), P && er(u, R); | ||
o && Ze(u, R), S && Qe(u, R); | ||
} | ||
return rr(e, o, P, s, n, Y.current, u); | ||
return er(e, o, S, c, n, Y.current, u); | ||
} | ||
} | ||
var ee = m.ReactCurrentOwner, ye = m.ReactDebugCurrentFrame; | ||
function F(e) { | ||
var re = s.ReactCurrentOwner, Te = s.ReactDebugCurrentFrame; | ||
function I(e) { | ||
if (e) { | ||
var r = e._owner, t = M(e.type, e._source, r ? r.type : null); | ||
ye.setExtraStackFrame(t); | ||
var r = e._owner, t = B(e.type, e._source, r ? r.type : null); | ||
Te.setExtraStackFrame(t); | ||
} else | ||
ye.setExtraStackFrame(null); | ||
Te.setExtraStackFrame(null); | ||
} | ||
var re; | ||
re = !1; | ||
function te(e) { | ||
var te; | ||
te = !1; | ||
function ne(e) { | ||
return typeof e == "object" && e !== null && e.$$typeof === h; | ||
} | ||
function Te() { | ||
function Ce() { | ||
{ | ||
if (ee.current) { | ||
var e = k(ee.current.type); | ||
if (re.current) { | ||
var e = k(re.current.type); | ||
if (e) | ||
@@ -529,3 +529,3 @@ return ` | ||
} | ||
function nr(e) { | ||
function tr(e) { | ||
{ | ||
@@ -542,5 +542,5 @@ if (e !== void 0) { | ||
var Se = {}; | ||
function ar(e) { | ||
function nr(e) { | ||
{ | ||
var r = Te(); | ||
var r = Ce(); | ||
if (!r) { | ||
@@ -555,3 +555,3 @@ var t = typeof e == "string" ? e : e.displayName || e.name; | ||
} | ||
function Ce(e, r) { | ||
function Pe(e, r) { | ||
{ | ||
@@ -561,3 +561,3 @@ if (!e._store || e._store.validated || e.key != null) | ||
e._store.validated = !0; | ||
var t = ar(r); | ||
var t = nr(r); | ||
if (Se[t]) | ||
@@ -567,25 +567,25 @@ return; | ||
var n = ""; | ||
e && e._owner && e._owner !== ee.current && (n = " It was passed a child from " + k(e._owner.type) + "."), F(e), C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), F(null); | ||
e && e._owner && e._owner !== re.current && (n = " It was passed a child from " + k(e._owner.type) + "."), I(e), f('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), I(null); | ||
} | ||
} | ||
function Pe(e, r) { | ||
function we(e, r) { | ||
{ | ||
if (typeof e != "object") | ||
return; | ||
if (Z(e)) | ||
if (Q(e)) | ||
for (var t = 0; t < e.length; t++) { | ||
var n = e[t]; | ||
te(n) && Ce(n, r); | ||
ne(n) && Pe(n, r); | ||
} | ||
else if (te(e)) | ||
else if (ne(e)) | ||
e._store && (e._store.validated = !0); | ||
else if (e) { | ||
var s = l(e); | ||
if (typeof s == "function" && s !== e.entries) | ||
for (var f = s.call(e), u; !(u = f.next()).done; ) | ||
te(u.value) && Ce(u.value, r); | ||
var c = _(e); | ||
if (typeof c == "function" && c !== e.entries) | ||
for (var v = c.call(e), u; !(u = v.next()).done; ) | ||
ne(u.value) && Pe(u.value, r); | ||
} | ||
} | ||
} | ||
function or(e) { | ||
function ar(e) { | ||
{ | ||
@@ -598,5 +598,5 @@ var r = e.type; | ||
t = r.propTypes; | ||
else if (typeof r == "object" && (r.$$typeof === c || // Note: Memo only checks outer props here. | ||
else if (typeof r == "object" && (r.$$typeof === l || // Note: Memo only checks outer props here. | ||
// Inner props are checked in the reconciler. | ||
r.$$typeof === x)) | ||
r.$$typeof === O)) | ||
t = r.propTypes; | ||
@@ -607,12 +607,12 @@ else | ||
var n = k(r); | ||
qe(t, e.props, "prop", n, e); | ||
} else if (r.PropTypes !== void 0 && !re) { | ||
re = !0; | ||
var s = k(r); | ||
C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", s || "Unknown"); | ||
Be(t, e.props, "prop", n, e); | ||
} else if (r.PropTypes !== void 0 && !te) { | ||
te = !0; | ||
var c = k(r); | ||
f("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", c || "Unknown"); | ||
} | ||
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); | ||
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && f("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); | ||
} | ||
} | ||
function ur(e) { | ||
function or(e) { | ||
{ | ||
@@ -622,101 +622,97 @@ for (var r = Object.keys(e.props), t = 0; t < r.length; t++) { | ||
if (n !== "children" && n !== "key") { | ||
F(e), C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), F(null); | ||
I(e), f("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), I(null); | ||
break; | ||
} | ||
} | ||
e.ref !== null && (F(e), C("Invalid attribute `ref` supplied to `React.Fragment`."), F(null)); | ||
e.ref !== null && (I(e), f("Invalid attribute `ref` supplied to `React.Fragment`."), I(null)); | ||
} | ||
} | ||
function we(e, r, t, n, s, f) { | ||
function Oe(e, r, t, n, c, v) { | ||
{ | ||
var u = Ye(e); | ||
var u = $e(e); | ||
if (!u) { | ||
var o = ""; | ||
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (o += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."); | ||
var P = nr(s); | ||
P ? o += P : o += Te(); | ||
var S = tr(c); | ||
S ? o += S : o += Ce(); | ||
var b; | ||
e === null ? b = "null" : Z(e) ? b = "array" : e !== void 0 && e.$$typeof === h ? (b = "<" + (k(e.type) || "Unknown") + " />", o = " Did you accidentally export a JSX literal instead of a component?") : b = typeof e, C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", b, o); | ||
e === null ? b = "null" : Q(e) ? b = "array" : e !== void 0 && e.$$typeof === h ? (b = "<" + (k(e.type) || "Unknown") + " />", o = " Did you accidentally export a JSX literal instead of a component?") : b = typeof e, f("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", b, o); | ||
} | ||
var R = tr(e, r, t, s, f); | ||
var R = rr(e, r, t, c, v); | ||
if (R == null) | ||
return R; | ||
if (u) { | ||
var j = r.children; | ||
if (j !== void 0) | ||
var x = r.children; | ||
if (x !== void 0) | ||
if (n) | ||
if (Z(j)) { | ||
for (var I = 0; I < j.length; I++) | ||
Pe(j[I], e); | ||
Object.freeze && Object.freeze(j); | ||
if (Q(x)) { | ||
for (var W = 0; W < x.length; W++) | ||
we(x[W], e); | ||
Object.freeze && Object.freeze(x); | ||
} else | ||
C("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."); | ||
f("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."); | ||
else | ||
Pe(j, e); | ||
we(x, e); | ||
} | ||
return e === p ? ur(R) : or(R), R; | ||
return e === p ? or(R) : ar(R), R; | ||
} | ||
} | ||
function ur(e, r, t) { | ||
return Oe(e, r, t, !0); | ||
} | ||
function ir(e, r, t) { | ||
return we(e, r, t, !0); | ||
return Oe(e, r, t, !1); | ||
} | ||
function sr(e, r, t) { | ||
return we(e, r, t, !1); | ||
} | ||
var cr = sr, fr = ir; | ||
L.Fragment = p, L.jsx = cr, L.jsxs = fr; | ||
var sr = ir, cr = ur; | ||
L.Fragment = p, L.jsx = sr, L.jsxs = cr; | ||
}()), L; | ||
} | ||
(function(v) { | ||
process.env.NODE_ENV === "production" ? v.exports = hr() : v.exports = _r(); | ||
})(gr); | ||
const br = ne.jsx, mr = (v, h) => pr(v, (d) => { | ||
for (const [p, y] of h) { | ||
let _ = d; | ||
const O = p.length; | ||
for (const w of p.slice(0, O - 1)) | ||
_ = _[w]; | ||
_[p[O - 1]] = y; | ||
(function(d) { | ||
process.env.NODE_ENV === "production" ? d.exports = gr() : d.exports = hr(); | ||
})(pr); | ||
const _r = ae.jsx, br = (d, h) => dr(d, (g) => { | ||
for (const [p, m] of h) { | ||
let E = g; | ||
const P = p.length; | ||
for (const w of p.slice(0, P - 1)) | ||
E = E[w]; | ||
E[p[P - 1]] = m; | ||
} | ||
}), ae = (v, h = {}) => { | ||
const [d, p] = xe( | ||
() => typeof v == "function" ? v() : v | ||
), y = W(/* @__PURE__ */ new Map()), _ = W( | ||
}), oe = (d, h = {}) => { | ||
const g = D( | ||
typeof d == "function" ? d() : d | ||
), p = D(/* @__PURE__ */ new Map()), m = D( | ||
/* @__PURE__ */ new Map() | ||
), [O, w] = xe(!1), c = z((a) => { | ||
), E = D(!1), [P, w] = fr(!1), l = V((a) => { | ||
if (a.some((i) => typeof i == "symbol")) { | ||
for (const [i, E] of _.current) | ||
if (i.length === a.length && i.every((g, l) => g === a[l])) | ||
return E; | ||
for (const [i, T] of m.current) | ||
if (i.length === a.length && i.every((_, s) => _ === a[s])) | ||
return T; | ||
return; | ||
} | ||
return y.current.get(a.join(".")); | ||
}, []), T = z( | ||
return p.current.get(a.join(".")); | ||
}, []), y = V( | ||
(a, i) => { | ||
if (w(!0), a.some((E) => typeof E == "symbol")) { | ||
for (const E of _.current.keys()) | ||
if (!(E.length < a.length) && E.every((g, l) => g === a[l])) { | ||
_.current.set(E, i); | ||
if (E.current = !0, a.some((T) => typeof T == "symbol")) { | ||
for (const T of m.current.keys()) | ||
if (!(T.length < a.length) && T.every((_, s) => _ === a[s])) { | ||
m.current.set(T, i); | ||
return; | ||
} | ||
_.current.set(a, i); | ||
m.current.set(a, i); | ||
return; | ||
} | ||
y.current.set(a.join("."), i); | ||
p.current.set(a.join("."), i), w(!P); | ||
}, | ||
[] | ||
); | ||
lr(() => { | ||
var E; | ||
if (!O) | ||
return; | ||
const a = [..._.current.entries()]; | ||
_.current.clear(); | ||
for (const [g, l] of y.current) | ||
a.push([g.split("."), l]); | ||
y.current.clear(); | ||
const i = mr(d, a); | ||
w(!1), (E = h.onStateChange) == null || E.call(h, d, i), p(i); | ||
}, [O]); | ||
const S = z( | ||
[P] | ||
), C = V(() => { | ||
var T; | ||
const a = [...m.current.entries()]; | ||
m.current.clear(); | ||
for (const [_, s] of p.current) | ||
a.push([_.split("."), s]); | ||
p.current.clear(); | ||
const i = br(g.current, a); | ||
E.current = !1, (T = h.onStateChange) == null || T.call(h, g.current, i), g.current = i; | ||
}, [h.onStateChange]), O = V( | ||
(a, i = []) => new Proxy( | ||
@@ -727,13 +723,13 @@ // If the object is frozen, it can't be proxied, | ||
{ | ||
get(E, g) { | ||
const l = c([...i, g]) ?? E[g]; | ||
return Array.isArray(l) ? x(l, [...i, g]) : typeof l == "object" && l !== null ? S(l, [...i, g]) : l; | ||
get(T, _) { | ||
const s = l([...i, _]) ?? T[_]; | ||
return Array.isArray(s) ? j(s, [...i, _]) : typeof s == "object" && s !== null ? O(s, [...i, _]) : s; | ||
}, | ||
set(E, g, l) { | ||
return T([...i, g], l), !0; | ||
set(T, _, s) { | ||
return y([...i, _], s), !0; | ||
} | ||
} | ||
), | ||
[c, T] | ||
), x = z( | ||
[l, y] | ||
), j = V( | ||
(a, i = []) => new Proxy( | ||
@@ -744,58 +740,58 @@ // If the array is frozen, it can't be proxied, | ||
{ | ||
get(E, g) { | ||
const l = c([...i, g]) ?? E[g]; | ||
if (Array.isArray(l)) | ||
return x(l, [...i, g]); | ||
if (typeof l == "object" && l !== null) | ||
return S(l, [...i, g]); | ||
if (typeof l == "function") | ||
switch (g) { | ||
get(T, _) { | ||
const s = l([...i, _]) ?? T[_]; | ||
if (Array.isArray(s)) | ||
return j(s, [...i, _]); | ||
if (typeof s == "object" && s !== null) | ||
return O(s, [...i, _]); | ||
if (typeof s == "function") | ||
switch (_) { | ||
case "push": | ||
return (...m) => (T(i, [...a, ...m]), a.length + m.length); | ||
return (...f) => (y(i, [...a, ...f]), a.length + f.length); | ||
case "pop": | ||
return () => { | ||
const m = a.pop(); | ||
return T(i, a), m; | ||
const f = a.pop(); | ||
return y(i, a), f; | ||
}; | ||
case "shift": | ||
return () => { | ||
const m = a.shift(); | ||
return T(i, a), m; | ||
const f = a.shift(); | ||
return y(i, a), f; | ||
}; | ||
case "unshift": | ||
return (...m) => (T(i, [...m, ...a]), m.length + a.length); | ||
return (...f) => (y(i, [...f, ...a]), f.length + a.length); | ||
case "splice": | ||
return (m, C, ...J) => { | ||
const G = a.splice(m, C, ...J); | ||
return T(i, a), G; | ||
return (f, J, ...G) => { | ||
const K = a.splice(f, J, ...G); | ||
return y(i, a), K; | ||
}; | ||
case "sort": | ||
return (m) => (a.sort(m), T(i, a), a); | ||
return (f) => (a.sort(f), y(i, a), a); | ||
case "reverse": | ||
return () => (a.reverse(), T(i, a), a); | ||
return () => (a.reverse(), y(i, a), a); | ||
} | ||
return l; | ||
return s; | ||
}, | ||
set(E, g, l) { | ||
return T([...i, g], l), !0; | ||
set(T, _, s) { | ||
return y([...i, _], s), !0; | ||
} | ||
} | ||
), | ||
[c, T] | ||
[l, y] | ||
); | ||
return S(d); | ||
}, Tr = (v) => ({ | ||
__Context: vr(v), | ||
__initialState: v | ||
}), Sr = ({ | ||
children: v, | ||
return E.current && C(), O(g.current); | ||
}, yr = (d) => ({ | ||
__Context: lr(d), | ||
__initialState: d | ||
}), Tr = ({ | ||
children: d, | ||
store: h | ||
}) => { | ||
const d = ae(h.__initialState); | ||
return /* @__PURE__ */ br(h.__Context.Provider, { value: d, children: v }); | ||
}, Cr = (v) => dr(v.__Context), Pr = (v) => { | ||
const h = W([]), d = W([]), p = W(!1), y = W(!1), _ = ae( | ||
{ value: v }, | ||
const g = oe(h.__initialState); | ||
return /* @__PURE__ */ _r(h.__Context.Provider, { value: g, children: d }); | ||
}, Cr = (d) => vr(d.__Context), Sr = (d) => { | ||
const h = D([]), g = D([]), p = D(!1), m = D(!1), E = oe( | ||
{ value: d }, | ||
{ | ||
onStateChange: (c) => { | ||
onStateChange: (l) => { | ||
if (p.current) { | ||
@@ -805,37 +801,37 @@ p.current = !1; | ||
} | ||
if (y.current) { | ||
y.current = !1; | ||
if (m.current) { | ||
m.current = !1; | ||
return; | ||
} | ||
h.current.push(c.value), d.current = []; | ||
h.current.push(l.value), g.current = []; | ||
} | ||
} | ||
), O = () => { | ||
), P = () => { | ||
if (h.current.length === 0) | ||
return; | ||
p.current = !0; | ||
const c = h.current.pop(); | ||
c && (d.current.push(je(_.value)), _.value = c); | ||
const l = h.current.pop(); | ||
l && (g.current.push(je(E.value)), E.value = l); | ||
}, w = () => { | ||
if (d.current.length === 0) | ||
if (g.current.length === 0) | ||
return; | ||
y.current = !0; | ||
const c = d.current.pop(); | ||
c && (h.current.push(je(_.value)), _.value = c); | ||
m.current = !0; | ||
const l = g.current.pop(); | ||
l && (h.current.push(je(E.value)), E.value = l); | ||
}; | ||
return { state: _.value, undo: O, redo: w }; | ||
}, wr = (v) => { | ||
const h = ae({ value: v }); | ||
return { state: E.value, undo: P, redo: w }; | ||
}, Pr = (d) => { | ||
const h = oe({ value: d }); | ||
return new Proxy(h, { | ||
get: (d, p) => p === "value" ? d.value : d.value[p], | ||
set: (d, p, y) => (p === "value" ? d.value = y : d.value[p] = y, !0) | ||
get: (g, p) => p === "value" ? g.value : g.value[p], | ||
set: (g, p, m) => (p === "value" ? g.value = m : g.value[p] = m, !0) | ||
}); | ||
}; | ||
export { | ||
Sr as ReactiveProvider, | ||
Tr as createReactiveStore, | ||
ae as useReactive, | ||
Tr as ReactiveProvider, | ||
yr as createReactiveStore, | ||
oe as useReactive, | ||
Cr as useReactiveStore, | ||
Pr as useReactiveUndo, | ||
wr as useReactiveValue | ||
Sr as useReactiveUndo, | ||
Pr as useReactiveValue | ||
}; |
@@ -1,2 +0,2 @@ | ||
(function(w,g){typeof exports=="object"&&typeof module<"u"?g(exports,require("react"),require("immer"),require("lodash.clonedeep")):typeof define=="function"&&define.amd?define(["exports","react","immer","lodash.clonedeep"],g):(w=typeof globalThis<"u"?globalThis:w||self,g(w["react-reactive-hooks"]={},w.require$$0,w.immer,w.cloneDeep))})(this,function(w,g,Ae,oe){"use strict";var H={},De={get exports(){return H},set exports(v){H=v}},Y={};/** | ||
(function(O,g){typeof exports=="object"&&typeof module<"u"?g(exports,require("react"),require("immer"),require("lodash.clonedeep")):typeof define=="function"&&define.amd?define(["exports","react","immer","lodash.clonedeep"],g):(O=typeof globalThis<"u"?globalThis:O||self,g(O["react-reactive-hooks"]={},O.require$$0,O.immer,O.cloneDeep))})(this,function(O,g,De,ue){"use strict";var H={},Fe={get exports(){return H},set exports(d){H=d}},Y={};/** | ||
* @license React | ||
@@ -9,3 +9,3 @@ * react-jsx-runtime.production.min.js | ||
* LICENSE file in the root directory of this source tree. | ||
*/var ue;function Fe(){if(ue)return Y;ue=1;var v=g,R=Symbol.for("react.element"),d=Symbol.for("react.fragment"),p=Object.prototype.hasOwnProperty,S=v.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,b={key:!0,ref:!0,__self:!0,__source:!0};function x(j,c,T){var C,k={},a=null,i=null;T!==void 0&&(a=""+T),c.key!==void 0&&(a=""+c.key),c.ref!==void 0&&(i=c.ref);for(C in c)p.call(c,C)&&!b.hasOwnProperty(C)&&(k[C]=c[C]);if(j&&j.defaultProps)for(C in c=j.defaultProps,c)k[C]===void 0&&(k[C]=c[C]);return{$$typeof:R,type:j,key:a,ref:i,props:k,_owner:S.current}}return Y.Fragment=d,Y.jsx=x,Y.jsxs=x,Y}var L={};/** | ||
*/var ie;function Ie(){if(ie)return Y;ie=1;var d=g,R=Symbol.for("react.element"),h=Symbol.for("react.fragment"),p=Object.prototype.hasOwnProperty,m=d.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,y={key:!0,ref:!0,__self:!0,__source:!0};function w(j,l,C){var T,x={},A=null,a=null;C!==void 0&&(A=""+C),l.key!==void 0&&(A=""+l.key),l.ref!==void 0&&(a=l.ref);for(T in l)p.call(l,T)&&!y.hasOwnProperty(T)&&(x[T]=l[T]);if(j&&j.defaultProps)for(T in l=j.defaultProps,l)x[T]===void 0&&(x[T]=l[T]);return{$$typeof:R,type:j,key:A,ref:a,props:x,_owner:m.current}}return Y.Fragment=h,Y.jsx=w,Y.jsxs=w,Y}var U={};/** | ||
* @license React | ||
@@ -18,12 +18,12 @@ * react-jsx-runtime.development.js | ||
* LICENSE file in the root directory of this source tree. | ||
*/var ie;function Ie(){return ie||(ie=1,process.env.NODE_ENV!=="production"&&function(){var v=g,R=Symbol.for("react.element"),d=Symbol.for("react.portal"),p=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),x=Symbol.for("react.provider"),j=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),a=Symbol.for("react.lazy"),i=Symbol.for("react.offscreen"),E=Symbol.iterator,h="@@iterator";function l(e){if(e===null||typeof e!="object")return null;var r=E&&e[E]||e[h];return typeof r=="function"?r:null}var m=v.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function P(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];X("error",e,t)}}function X(e,r,t){{var n=m.ReactDebugCurrentFrame,s=n.getStackAddendum();s!==""&&(r+="%s",t=t.concat([s]));var f=t.map(function(u){return String(u)});f.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,f)}}var Z=!1,Be=!1,ze=!1,Je=!1,Ge=!1,se;se=Symbol.for("react.module.reference");function Ke(e){return!!(typeof e=="string"||typeof e=="function"||e===p||e===b||Ge||e===S||e===T||e===C||Je||e===i||Z||Be||ze||typeof e=="object"&&e!==null&&(e.$$typeof===a||e.$$typeof===k||e.$$typeof===x||e.$$typeof===j||e.$$typeof===c||e.$$typeof===se||e.getModuleId!==void 0))}function He(e,r,t){var n=e.displayName;if(n)return n;var s=r.displayName||r.name||"";return s!==""?t+"("+s+")":t}function ce(e){return e.displayName||"Context"}function D(e){if(e==null)return null;if(typeof e.tag=="number"&&P("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case p:return"Fragment";case d:return"Portal";case b:return"Profiler";case S:return"StrictMode";case T:return"Suspense";case C:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case j:var r=e;return ce(r)+".Consumer";case x:var t=e;return ce(t._context)+".Provider";case c:return He(e,e.render,"ForwardRef");case k:var n=e.displayName||null;return n!==null?n:D(e.type)||"Memo";case a:{var s=e,f=s._payload,u=s._init;try{return D(u(f))}catch{return null}}}return null}var I=Object.assign,U=0,fe,le,ve,de,pe,he,ge;function Re(){}Re.__reactDisabledLog=!0;function Xe(){{if(U===0){fe=console.log,le=console.info,ve=console.warn,de=console.error,pe=console.group,he=console.groupCollapsed,ge=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Re,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}U++}}function Ze(){{if(U--,U===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:I({},e,{value:fe}),info:I({},e,{value:le}),warn:I({},e,{value:ve}),error:I({},e,{value:de}),group:I({},e,{value:pe}),groupCollapsed:I({},e,{value:he}),groupEnd:I({},e,{value:ge})})}U<0&&P("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Q=m.ReactCurrentDispatcher,q;function B(e,r,t){{if(q===void 0)try{throw Error()}catch(s){var n=s.stack.trim().match(/\n( *(at )?)/);q=n&&n[1]||""}return` | ||
`+q+e}}var $=!1,z;{var Qe=typeof WeakMap=="function"?WeakMap:Map;z=new Qe}function be(e,r){if(!e||$)return"";{var t=z.get(e);if(t!==void 0)return t}var n;$=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var f;f=Q.current,Q.current=null,Xe();try{if(r){var u=function(){throw Error()};if(Object.defineProperty(u.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(u,[])}catch(F){n=F}Reflect.construct(e,[],u)}else{try{u.call()}catch(F){n=F}e.call(u.prototype)}}else{try{throw Error()}catch(F){n=F}e()}}catch(F){if(F&&n&&typeof F.stack=="string"){for(var o=F.stack.split(` | ||
`),O=n.stack.split(` | ||
`),_=o.length-1,y=O.length-1;_>=1&&y>=0&&o[_]!==O[y];)y--;for(;_>=1&&y>=0;_--,y--)if(o[_]!==O[y]){if(_!==1||y!==1)do if(_--,y--,y<0||o[_]!==O[y]){var A=` | ||
`+o[_].replace(" at new "," at ");return e.displayName&&A.includes("<anonymous>")&&(A=A.replace("<anonymous>",e.displayName)),typeof e=="function"&&z.set(e,A),A}while(_>=1&&y>=0);break}}}finally{$=!1,Q.current=f,Ze(),Error.prepareStackTrace=s}var V=e?e.displayName||e.name:"",ke=V?B(V):"";return typeof e=="function"&&z.set(e,ke),ke}function qe(e,r,t){return be(e,!1)}function $e(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function J(e,r,t){if(e==null)return"";if(typeof e=="function")return be(e,$e(e));if(typeof e=="string")return B(e);switch(e){case T:return B("Suspense");case C:return B("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case c:return qe(e.render);case k:return J(e.type,r,t);case a:{var n=e,s=n._payload,f=n._init;try{return J(f(s),r,t)}catch{}}}return""}var G=Object.prototype.hasOwnProperty,_e={},me=m.ReactDebugCurrentFrame;function K(e){if(e){var r=e._owner,t=J(e.type,e._source,r?r.type:null);me.setExtraStackFrame(t)}else me.setExtraStackFrame(null)}function er(e,r,t,n,s){{var f=Function.call.bind(G);for(var u in e)if(f(e,u)){var o=void 0;try{if(typeof e[u]!="function"){var O=Error((n||"React class")+": "+t+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw O.name="Invariant Violation",O}o=e[u](r,u,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(_){o=_}o&&!(o instanceof Error)&&(K(s),P("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",t,u,typeof o),K(null)),o instanceof Error&&!(o.message in _e)&&(_e[o.message]=!0,K(s),P("Failed %s type: %s",t,o.message),K(null))}}}var rr=Array.isArray;function ee(e){return rr(e)}function tr(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function nr(e){try{return ye(e),!1}catch{return!0}}function ye(e){return""+e}function Ee(e){if(nr(e))return P("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",tr(e)),ye(e)}var M=m.ReactCurrentOwner,ar={key:!0,ref:!0,__self:!0,__source:!0},Se,Te,re;re={};function or(e){if(G.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function ur(e){if(G.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function ir(e,r){if(typeof e.ref=="string"&&M.current&&r&&M.current.stateNode!==r){var t=D(M.current.type);re[t]||(P('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',D(M.current.type),e.ref),re[t]=!0)}}function sr(e,r){{var t=function(){Se||(Se=!0,P("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function cr(e,r){{var t=function(){Te||(Te=!0,P("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var fr=function(e,r,t,n,s,f,u){var o={$$typeof:R,type:e,key:r,ref:t,props:u,_owner:f};return o._store={},Object.defineProperty(o._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(o,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(o,"_source",{configurable:!1,enumerable:!1,writable:!1,value:s}),Object.freeze&&(Object.freeze(o.props),Object.freeze(o)),o};function lr(e,r,t,n,s){{var f,u={},o=null,O=null;t!==void 0&&(Ee(t),o=""+t),ur(r)&&(Ee(r.key),o=""+r.key),or(r)&&(O=r.ref,ir(r,s));for(f in r)G.call(r,f)&&!ar.hasOwnProperty(f)&&(u[f]=r[f]);if(e&&e.defaultProps){var _=e.defaultProps;for(f in _)u[f]===void 0&&(u[f]=_[f])}if(o||O){var y=typeof e=="function"?e.displayName||e.name||"Unknown":e;o&&sr(u,y),O&&cr(u,y)}return fr(e,o,O,s,n,M.current,u)}}var te=m.ReactCurrentOwner,Ce=m.ReactDebugCurrentFrame;function W(e){if(e){var r=e._owner,t=J(e.type,e._source,r?r.type:null);Ce.setExtraStackFrame(t)}else Ce.setExtraStackFrame(null)}var ne;ne=!1;function ae(e){return typeof e=="object"&&e!==null&&e.$$typeof===R}function Pe(){{if(te.current){var e=D(te.current.type);if(e)return` | ||
*/var se;function We(){return se||(se=1,process.env.NODE_ENV!=="production"&&function(){var d=g,R=Symbol.for("react.element"),h=Symbol.for("react.portal"),p=Symbol.for("react.fragment"),m=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),w=Symbol.for("react.provider"),j=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),x=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),a=Symbol.for("react.offscreen"),i=Symbol.iterator,S="@@iterator";function b(e){if(e===null||typeof e!="object")return null;var r=i&&e[i]||e[S];return typeof r=="function"?r:null}var s=d.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function f(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];X("error",e,t)}}function X(e,r,t){{var n=s.ReactDebugCurrentFrame,c=n.getStackAddendum();c!==""&&(r+="%s",t=t.concat([c]));var v=t.map(function(u){return String(u)});v.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,v)}}var Z=!1,Q=!1,ze=!1,Je=!1,Ge=!1,ce;ce=Symbol.for("react.module.reference");function Ke(e){return!!(typeof e=="string"||typeof e=="function"||e===p||e===y||Ge||e===m||e===C||e===T||Je||e===a||Z||Q||ze||typeof e=="object"&&e!==null&&(e.$$typeof===A||e.$$typeof===x||e.$$typeof===w||e.$$typeof===j||e.$$typeof===l||e.$$typeof===ce||e.getModuleId!==void 0))}function He(e,r,t){var n=e.displayName;if(n)return n;var c=r.displayName||r.name||"";return c!==""?t+"("+c+")":t}function fe(e){return e.displayName||"Context"}function D(e){if(e==null)return null;if(typeof e.tag=="number"&&f("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case p:return"Fragment";case h:return"Portal";case y:return"Profiler";case m:return"StrictMode";case C:return"Suspense";case T:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case j:var r=e;return fe(r)+".Consumer";case w:var t=e;return fe(t._context)+".Provider";case l:return He(e,e.render,"ForwardRef");case x:var n=e.displayName||null;return n!==null?n:D(e.type)||"Memo";case A:{var c=e,v=c._payload,u=c._init;try{return D(u(v))}catch{return null}}}return null}var I=Object.assign,L=0,le,ve,de,pe,he,ge,Re;function be(){}be.__reactDisabledLog=!0;function Xe(){{if(L===0){le=console.log,ve=console.info,de=console.warn,pe=console.error,he=console.group,ge=console.groupCollapsed,Re=console.groupEnd;var e={configurable:!0,enumerable:!0,value:be,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}L++}}function Ze(){{if(L--,L===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:I({},e,{value:le}),info:I({},e,{value:ve}),warn:I({},e,{value:de}),error:I({},e,{value:pe}),group:I({},e,{value:he}),groupCollapsed:I({},e,{value:ge}),groupEnd:I({},e,{value:Re})})}L<0&&f("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var q=s.ReactCurrentDispatcher,$;function B(e,r,t){{if($===void 0)try{throw Error()}catch(c){var n=c.stack.trim().match(/\n( *(at )?)/);$=n&&n[1]||""}return` | ||
`+$+e}}var ee=!1,z;{var Qe=typeof WeakMap=="function"?WeakMap:Map;z=new Qe}function _e(e,r){if(!e||ee)return"";{var t=z.get(e);if(t!==void 0)return t}var n;ee=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var v;v=q.current,q.current=null,Xe();try{if(r){var u=function(){throw Error()};if(Object.defineProperty(u.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(u,[])}catch(F){n=F}Reflect.construct(e,[],u)}else{try{u.call()}catch(F){n=F}e.call(u.prototype)}}else{try{throw Error()}catch(F){n=F}e()}}catch(F){if(F&&n&&typeof F.stack=="string"){for(var o=F.stack.split(` | ||
`),P=n.stack.split(` | ||
`),_=o.length-1,E=P.length-1;_>=1&&E>=0&&o[_]!==P[E];)E--;for(;_>=1&&E>=0;_--,E--)if(o[_]!==P[E]){if(_!==1||E!==1)do if(_--,E--,E<0||o[_]!==P[E]){var k=` | ||
`+o[_].replace(" at new "," at ");return e.displayName&&k.includes("<anonymous>")&&(k=k.replace("<anonymous>",e.displayName)),typeof e=="function"&&z.set(e,k),k}while(_>=1&&E>=0);break}}}finally{ee=!1,q.current=v,Ze(),Error.prepareStackTrace=c}var V=e?e.displayName||e.name:"",Ae=V?B(V):"";return typeof e=="function"&&z.set(e,Ae),Ae}function qe(e,r,t){return _e(e,!1)}function $e(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function J(e,r,t){if(e==null)return"";if(typeof e=="function")return _e(e,$e(e));if(typeof e=="string")return B(e);switch(e){case C:return B("Suspense");case T:return B("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case l:return qe(e.render);case x:return J(e.type,r,t);case A:{var n=e,c=n._payload,v=n._init;try{return J(v(c),r,t)}catch{}}}return""}var G=Object.prototype.hasOwnProperty,me={},Ee=s.ReactDebugCurrentFrame;function K(e){if(e){var r=e._owner,t=J(e.type,e._source,r?r.type:null);Ee.setExtraStackFrame(t)}else Ee.setExtraStackFrame(null)}function er(e,r,t,n,c){{var v=Function.call.bind(G);for(var u in e)if(v(e,u)){var o=void 0;try{if(typeof e[u]!="function"){var P=Error((n||"React class")+": "+t+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw P.name="Invariant Violation",P}o=e[u](r,u,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(_){o=_}o&&!(o instanceof Error)&&(K(c),f("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",t,u,typeof o),K(null)),o instanceof Error&&!(o.message in me)&&(me[o.message]=!0,K(c),f("Failed %s type: %s",t,o.message),K(null))}}}var rr=Array.isArray;function re(e){return rr(e)}function tr(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function nr(e){try{return ye(e),!1}catch{return!0}}function ye(e){return""+e}function Ce(e){if(nr(e))return f("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",tr(e)),ye(e)}var M=s.ReactCurrentOwner,ar={key:!0,ref:!0,__self:!0,__source:!0},Se,Te,te;te={};function or(e){if(G.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function ur(e){if(G.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function ir(e,r){if(typeof e.ref=="string"&&M.current&&r&&M.current.stateNode!==r){var t=D(M.current.type);te[t]||(f('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',D(M.current.type),e.ref),te[t]=!0)}}function sr(e,r){{var t=function(){Se||(Se=!0,f("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function cr(e,r){{var t=function(){Te||(Te=!0,f("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var fr=function(e,r,t,n,c,v,u){var o={$$typeof:R,type:e,key:r,ref:t,props:u,_owner:v};return o._store={},Object.defineProperty(o._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(o,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(o,"_source",{configurable:!1,enumerable:!1,writable:!1,value:c}),Object.freeze&&(Object.freeze(o.props),Object.freeze(o)),o};function lr(e,r,t,n,c){{var v,u={},o=null,P=null;t!==void 0&&(Ce(t),o=""+t),ur(r)&&(Ce(r.key),o=""+r.key),or(r)&&(P=r.ref,ir(r,c));for(v in r)G.call(r,v)&&!ar.hasOwnProperty(v)&&(u[v]=r[v]);if(e&&e.defaultProps){var _=e.defaultProps;for(v in _)u[v]===void 0&&(u[v]=_[v])}if(o||P){var E=typeof e=="function"?e.displayName||e.name||"Unknown":e;o&&sr(u,E),P&&cr(u,E)}return fr(e,o,P,c,n,M.current,u)}}var ne=s.ReactCurrentOwner,Pe=s.ReactDebugCurrentFrame;function W(e){if(e){var r=e._owner,t=J(e.type,e._source,r?r.type:null);Pe.setExtraStackFrame(t)}else Pe.setExtraStackFrame(null)}var ae;ae=!1;function oe(e){return typeof e=="object"&&e!==null&&e.$$typeof===R}function Oe(){{if(ne.current){var e=D(ne.current.type);if(e)return` | ||
Check the render method of \``+e+"`."}return""}}function vr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),t=e.lineNumber;return` | ||
Check your code at `+r+":"+t+"."}return""}}var Oe={};function dr(e){{var r=Pe();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=` | ||
Check your code at `+r+":"+t+"."}return""}}var we={};function dr(e){{var r=Oe();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=` | ||
Check the top-level render call using <`+t+">.")}return r}}function we(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=dr(r);if(Oe[t])return;Oe[t]=!0;var n="";e&&e._owner&&e._owner!==te.current&&(n=" It was passed a child from "+D(e._owner.type)+"."),W(e),P('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,n),W(null)}}function je(e,r){{if(typeof e!="object")return;if(ee(e))for(var t=0;t<e.length;t++){var n=e[t];ae(n)&&we(n,r)}else if(ae(e))e._store&&(e._store.validated=!0);else if(e){var s=l(e);if(typeof s=="function"&&s!==e.entries)for(var f=s.call(e),u;!(u=f.next()).done;)ae(u.value)&&we(u.value,r)}}}function pr(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===c||r.$$typeof===k))t=r.propTypes;else return;if(t){var n=D(r);er(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!ne){ne=!0;var s=D(r);P("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",s||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&P("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function hr(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){W(e),P("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),W(null);break}}e.ref!==null&&(W(e),P("Invalid attribute `ref` supplied to `React.Fragment`."),W(null))}}function xe(e,r,t,n,s,f){{var u=Ke(e);if(!u){var o="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(o+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var O=vr(s);O?o+=O:o+=Pe();var _;e===null?_="null":ee(e)?_="array":e!==void 0&&e.$$typeof===R?(_="<"+(D(e.type)||"Unknown")+" />",o=" Did you accidentally export a JSX literal instead of a component?"):_=typeof e,P("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",_,o)}var y=lr(e,r,t,s,f);if(y==null)return y;if(u){var A=r.children;if(A!==void 0)if(n)if(ee(A)){for(var V=0;V<A.length;V++)je(A[V],e);Object.freeze&&Object.freeze(A)}else P("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else je(A,e)}return e===p?hr(y):pr(y),y}}function gr(e,r,t){return xe(e,r,t,!0)}function Rr(e,r,t){return xe(e,r,t,!1)}var br=Rr,_r=gr;L.Fragment=p,L.jsx=br,L.jsxs=_r}()),L}(function(v){process.env.NODE_ENV==="production"?v.exports=Fe():v.exports=Ie()})(De);const We=H.jsx,Ve=(v,R)=>Ae.produce(v,d=>{for(const[p,S]of R){let b=d;const x=p.length;for(const j of p.slice(0,x-1))b=b[j];b[p[x-1]]=S}}),N=(v,R={})=>{const[d,p]=g.useState(()=>typeof v=="function"?v():v),S=g.useRef(new Map),b=g.useRef(new Map),[x,j]=g.useState(!1),c=g.useCallback(a=>{if(a.some(i=>typeof i=="symbol")){for(const[i,E]of b.current)if(i.length===a.length&&i.every((h,l)=>h===a[l]))return E;return}return S.current.get(a.join("."))},[]),T=g.useCallback((a,i)=>{if(j(!0),a.some(E=>typeof E=="symbol")){for(const E of b.current.keys())if(!(E.length<a.length)&&E.every((h,l)=>h===a[l])){b.current.set(E,i);return}b.current.set(a,i);return}S.current.set(a.join("."),i)},[]);g.useLayoutEffect(()=>{var E;if(!x)return;const a=[...b.current.entries()];b.current.clear();for(const[h,l]of S.current)a.push([h.split("."),l]);S.current.clear();const i=Ve(d,a);j(!1),(E=R.onStateChange)==null||E.call(R,d,i),p(i)},[x]);const C=g.useCallback((a,i=[])=>new Proxy(Object.isFrozen(a)?{...a}:a,{get(E,h){const l=c([...i,h])??E[h];return Array.isArray(l)?k(l,[...i,h]):typeof l=="object"&&l!==null?C(l,[...i,h]):l},set(E,h,l){return T([...i,h],l),!0}}),[c,T]),k=g.useCallback((a,i=[])=>new Proxy(Object.isFrozen(a)?[...a]:a,{get(E,h){const l=c([...i,h])??E[h];if(Array.isArray(l))return k(l,[...i,h]);if(typeof l=="object"&&l!==null)return C(l,[...i,h]);if(typeof l=="function")switch(h){case"push":return(...m)=>(T(i,[...a,...m]),a.length+m.length);case"pop":return()=>{const m=a.pop();return T(i,a),m};case"shift":return()=>{const m=a.shift();return T(i,a),m};case"unshift":return(...m)=>(T(i,[...m,...a]),m.length+a.length);case"splice":return(m,P,...X)=>{const Z=a.splice(m,P,...X);return T(i,a),Z};case"sort":return m=>(a.sort(m),T(i,a),a);case"reverse":return()=>(a.reverse(),T(i,a),a)}return l},set(E,h,l){return T([...i,h],l),!0}}),[c,T]);return C(d)},Ye=v=>({__Context:g.createContext(v),__initialState:v}),Le=({children:v,store:R})=>{const d=N(R.__initialState);return We(R.__Context.Provider,{value:d,children:v})},Ue=v=>g.useContext(v.__Context),Me=v=>{const R=g.useRef([]),d=g.useRef([]),p=g.useRef(!1),S=g.useRef(!1),b=N({value:v},{onStateChange:c=>{if(p.current){p.current=!1;return}if(S.current){S.current=!1;return}R.current.push(c.value),d.current=[]}}),x=()=>{if(R.current.length===0)return;p.current=!0;const c=R.current.pop();c&&(d.current.push(oe(b.value)),b.value=c)},j=()=>{if(d.current.length===0)return;S.current=!0;const c=d.current.pop();c&&(R.current.push(oe(b.value)),b.value=c)};return{state:b.value,undo:x,redo:j}},Ne=v=>{const R=N({value:v});return new Proxy(R,{get:(d,p)=>p==="value"?d.value:d.value[p],set:(d,p,S)=>(p==="value"?d.value=S:d.value[p]=S,!0)})};w.ReactiveProvider=Le,w.createReactiveStore=Ye,w.useReactive=N,w.useReactiveStore=Ue,w.useReactiveUndo=Me,w.useReactiveValue=Ne,Object.defineProperty(w,Symbol.toStringTag,{value:"Module"})}); | ||
Check the top-level render call using <`+t+">.")}return r}}function je(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=dr(r);if(we[t])return;we[t]=!0;var n="";e&&e._owner&&e._owner!==ne.current&&(n=" It was passed a child from "+D(e._owner.type)+"."),W(e),f('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,n),W(null)}}function xe(e,r){{if(typeof e!="object")return;if(re(e))for(var t=0;t<e.length;t++){var n=e[t];oe(n)&&je(n,r)}else if(oe(e))e._store&&(e._store.validated=!0);else if(e){var c=b(e);if(typeof c=="function"&&c!==e.entries)for(var v=c.call(e),u;!(u=v.next()).done;)oe(u.value)&&je(u.value,r)}}}function pr(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===l||r.$$typeof===x))t=r.propTypes;else return;if(t){var n=D(r);er(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!ae){ae=!0;var c=D(r);f("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",c||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&f("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function hr(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){W(e),f("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),W(null);break}}e.ref!==null&&(W(e),f("Invalid attribute `ref` supplied to `React.Fragment`."),W(null))}}function ke(e,r,t,n,c,v){{var u=Ke(e);if(!u){var o="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(o+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var P=vr(c);P?o+=P:o+=Oe();var _;e===null?_="null":re(e)?_="array":e!==void 0&&e.$$typeof===R?(_="<"+(D(e.type)||"Unknown")+" />",o=" Did you accidentally export a JSX literal instead of a component?"):_=typeof e,f("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",_,o)}var E=lr(e,r,t,c,v);if(E==null)return E;if(u){var k=r.children;if(k!==void 0)if(n)if(re(k)){for(var V=0;V<k.length;V++)xe(k[V],e);Object.freeze&&Object.freeze(k)}else f("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else xe(k,e)}return e===p?hr(E):pr(E),E}}function gr(e,r,t){return ke(e,r,t,!0)}function Rr(e,r,t){return ke(e,r,t,!1)}var br=Rr,_r=gr;U.Fragment=p,U.jsx=br,U.jsxs=_r}()),U}(function(d){process.env.NODE_ENV==="production"?d.exports=Ie():d.exports=We()})(Fe);const Ve=H.jsx,Ye=(d,R)=>De.produce(d,h=>{for(const[p,m]of R){let y=h;const w=p.length;for(const j of p.slice(0,w-1))y=y[j];y[p[w-1]]=m}}),N=(d,R={})=>{const h=g.useRef(typeof d=="function"?d():d),p=g.useRef(new Map),m=g.useRef(new Map),y=g.useRef(!1),[w,j]=g.useState(!1),l=g.useCallback(a=>{if(a.some(i=>typeof i=="symbol")){for(const[i,S]of m.current)if(i.length===a.length&&i.every((b,s)=>b===a[s]))return S;return}return p.current.get(a.join("."))},[]),C=g.useCallback((a,i)=>{if(y.current=!0,a.some(S=>typeof S=="symbol")){for(const S of m.current.keys())if(!(S.length<a.length)&&S.every((b,s)=>b===a[s])){m.current.set(S,i);return}m.current.set(a,i);return}p.current.set(a.join("."),i),j(!w)},[w]),T=g.useCallback(()=>{var S;const a=[...m.current.entries()];m.current.clear();for(const[b,s]of p.current)a.push([b.split("."),s]);p.current.clear();const i=Ye(h.current,a);y.current=!1,(S=R.onStateChange)==null||S.call(R,h.current,i),h.current=i},[R.onStateChange]),x=g.useCallback((a,i=[])=>new Proxy(Object.isFrozen(a)?{...a}:a,{get(S,b){const s=l([...i,b])??S[b];return Array.isArray(s)?A(s,[...i,b]):typeof s=="object"&&s!==null?x(s,[...i,b]):s},set(S,b,s){return C([...i,b],s),!0}}),[l,C]),A=g.useCallback((a,i=[])=>new Proxy(Object.isFrozen(a)?[...a]:a,{get(S,b){const s=l([...i,b])??S[b];if(Array.isArray(s))return A(s,[...i,b]);if(typeof s=="object"&&s!==null)return x(s,[...i,b]);if(typeof s=="function")switch(b){case"push":return(...f)=>(C(i,[...a,...f]),a.length+f.length);case"pop":return()=>{const f=a.pop();return C(i,a),f};case"shift":return()=>{const f=a.shift();return C(i,a),f};case"unshift":return(...f)=>(C(i,[...f,...a]),f.length+a.length);case"splice":return(f,X,...Z)=>{const Q=a.splice(f,X,...Z);return C(i,a),Q};case"sort":return f=>(a.sort(f),C(i,a),a);case"reverse":return()=>(a.reverse(),C(i,a),a)}return s},set(S,b,s){return C([...i,b],s),!0}}),[l,C]);return y.current&&T(),x(h.current)},Ue=d=>({__Context:g.createContext(d),__initialState:d}),Le=({children:d,store:R})=>{const h=N(R.__initialState);return Ve(R.__Context.Provider,{value:h,children:d})},Me=d=>g.useContext(d.__Context),Ne=d=>{const R=g.useRef([]),h=g.useRef([]),p=g.useRef(!1),m=g.useRef(!1),y=N({value:d},{onStateChange:l=>{if(p.current){p.current=!1;return}if(m.current){m.current=!1;return}R.current.push(l.value),h.current=[]}}),w=()=>{if(R.current.length===0)return;p.current=!0;const l=R.current.pop();l&&(h.current.push(ue(y.value)),y.value=l)},j=()=>{if(h.current.length===0)return;m.current=!0;const l=h.current.pop();l&&(R.current.push(ue(y.value)),y.value=l)};return{state:y.value,undo:w,redo:j}},Be=d=>{const R=N({value:d});return new Proxy(R,{get:(h,p)=>p==="value"?h.value:h.value[p],set:(h,p,m)=>(p==="value"?h.value=m:h.value[p]=m,!0)})};O.ReactiveProvider=Le,O.createReactiveStore=Ue,O.useReactive=N,O.useReactiveStore=Me,O.useReactiveUndo=Ne,O.useReactiveValue=Be,Object.defineProperty(O,Symbol.toStringTag,{value:"Module"})}); |
{ | ||
"name": "react-reactive-hooks", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "A set of React hooks for reactive programming", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
58155
966