Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-reactive-hooks

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-reactive-hooks - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

610

index.js

@@ -1,5 +0,5 @@

import De, { useRef as D, useState as fr, useCallback as V, createContext as lr, useContext as vr } from "react";
import Fe, { useRef as F, useState as fr, useCallback as U, createContext as lr, useContext as vr } from "react";
import { produce as dr } from "immer";
import je from "lodash.clonedeep";
var ae = { exports: {} }, U = {};
import Ae from "lodash.clonedeep";
var oe = { exports: {} }, L = {};
/**

@@ -17,18 +17,18 @@ * @license React

if (ke)
return U;
return L;
ke = 1;
var b = De, g = Symbol.for("react.element"), p = Symbol.for("react.fragment"), d = Object.prototype.hasOwnProperty, m = b.__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)
d.call(l, C) && !E.hasOwnProperty(C) && (O[C] = l[C]);
if (w && w.defaultProps)
for (C in l = w.defaultProps, l)
O[C] === void 0 && (O[C] = l[C]);
return { $$typeof: g, type: w, key: j, ref: a, props: O, _owner: m.current };
var b = Fe, g = Symbol.for("react.element"), p = Symbol.for("react.fragment"), d = Object.prototype.hasOwnProperty, y = b.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, R = { key: !0, ref: !0, __self: !0, __source: !0 };
function S(P, l, E) {
var T, O = {}, A = null, o = null;
E !== void 0 && (A = "" + E), l.key !== void 0 && (A = "" + l.key), l.ref !== void 0 && (o = l.ref);
for (T in l)
d.call(l, T) && !R.hasOwnProperty(T) && (O[T] = l[T]);
if (P && P.defaultProps)
for (T in l = P.defaultProps, l)
O[T] === void 0 && (O[T] = l[T]);
return { $$typeof: g, type: P, key: A, ref: o, props: O, _owner: y.current };
}
return U.Fragment = p, U.jsx = P, U.jsxs = P, U;
return L.Fragment = p, L.jsx = S, L.jsxs = S, L;
}
var L = {};
var N = {};
/**

@@ -43,26 +43,26 @@ * @license React

*/
var Ae;
var De;
function gr() {
return Ae || (Ae = 1, process.env.NODE_ENV !== "production" && function() {
var b = De, g = Symbol.for("react.element"), p = Symbol.for("react.portal"), d = 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";
return De || (De = 1, process.env.NODE_ENV !== "production" && function() {
var b = Fe, g = Symbol.for("react.element"), p = Symbol.for("react.portal"), d = Symbol.for("react.fragment"), y = Symbol.for("react.strict_mode"), R = Symbol.for("react.profiler"), S = Symbol.for("react.provider"), P = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), E = Symbol.for("react.suspense"), T = Symbol.for("react.suspense_list"), O = Symbol.for("react.memo"), A = Symbol.for("react.lazy"), o = Symbol.for("react.offscreen"), s = Symbol.iterator, w = "@@iterator";
function h(e) {
if (e === null || typeof e != "object")
return null;
var r = i && e[i] || e[T];
var r = s && e[s] || e[w];
return typeof r == "function" ? r : null;
}
var s = b.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
function f(e) {
var c = b.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
function u(e) {
{
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
t[n - 1] = arguments[n];
J("error", e, t);
j("error", e, t);
}
}
function J(e, r, t) {
function j(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);
var n = c.ReactDebugCurrentFrame, f = n.getStackAddendum();
f !== "" && (r += "%s", t = t.concat([f]));
var v = t.map(function(i) {
return String(i);
});

@@ -72,10 +72,10 @@ v.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, v);

}
var G = !1, K = !1, Fe = !1, Ie = !1, We = !1, ue;
ue = Symbol.for("react.module.reference");
var K = !1, M = !1, H = !1, Ie = !1, We = !1, ie;
ie = Symbol.for("react.module.reference");
function $e(e) {
return !!(typeof e == "string" || typeof e == "function" || e === d || 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
return !!(typeof e == "string" || typeof e == "function" || e === d || e === R || We || e === y || e === E || e === T || Ie || e === o || K || M || H || typeof e == "object" && e !== null && (e.$$typeof === A || e.$$typeof === O || e.$$typeof === S || e.$$typeof === P || 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 === ue || e.getModuleId !== void 0));
e.$$typeof === ie || e.getModuleId !== void 0));
}

@@ -86,6 +86,6 @@ function Ye(e, r, t) {

return n;
var c = r.displayName || r.name || "";
return c !== "" ? t + "(" + c + ")" : t;
var f = r.displayName || r.name || "";
return f !== "" ? t + "(" + f + ")" : t;
}
function ie(e) {
function se(e) {
return e.displayName || "Context";

@@ -96,3 +96,3 @@ }

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")
if (typeof e.tag == "number" && u("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;

@@ -106,9 +106,9 @@ if (typeof e == "string")

return "Portal";
case E:
case R:
return "Profiler";
case m:
case y:
return "StrictMode";
case y:
case E:
return "Suspense";
case C:
case T:
return "SuspenseList";

@@ -118,8 +118,8 @@ }

switch (e.$$typeof) {
case w:
case P:
var r = e;
return ie(r) + ".Consumer";
case P:
return se(r) + ".Consumer";
case S:
var t = e;
return ie(t._context) + ".Provider";
return se(t._context) + ".Provider";
case l:

@@ -130,6 +130,6 @@ return Ye(e, e.render, "ForwardRef");

return n !== null ? n : k(e.type) || "Memo";
case j: {
var c = e, v = c._payload, u = c._init;
case A: {
var f = e, v = f._payload, i = f._init;
try {
return k(u(v));
return k(i(v));
} catch {

@@ -142,14 +142,14 @@ return null;

}
var F = Object.assign, $ = 0, se, ce, fe, le, ve, de, pe;
function ge() {
var I = Object.assign, Y = 0, ce, fe, le, ve, de, pe, ge;
function he() {
}
ge.__reactDisabledLog = !0;
he.__reactDisabledLog = !0;
function Ve() {
{
if ($ === 0) {
se = console.log, ce = console.info, fe = console.warn, le = console.error, ve = console.group, de = console.groupCollapsed, pe = console.groupEnd;
if (Y === 0) {
ce = console.log, fe = console.info, le = console.warn, ve = console.error, de = console.group, pe = console.groupCollapsed, ge = console.groupEnd;
var e = {
configurable: !0,
enumerable: !0,
value: ge,
value: he,
writable: !0

@@ -167,3 +167,3 @@ };

}
$++;
Y++;
}

@@ -173,3 +173,3 @@ }

{
if ($--, $ === 0) {
if (Y--, Y === 0) {
var e = {

@@ -181,52 +181,52 @@ configurable: !0,

Object.defineProperties(console, {
log: F({}, e, {
value: se
}),
info: F({}, e, {
log: I({}, e, {
value: ce
}),
warn: F({}, e, {
info: I({}, e, {
value: fe
}),
error: F({}, e, {
warn: I({}, e, {
value: le
}),
group: F({}, e, {
error: I({}, e, {
value: ve
}),
groupCollapsed: F({}, e, {
group: I({}, e, {
value: de
}),
groupEnd: F({}, e, {
groupCollapsed: I({}, e, {
value: pe
}),
groupEnd: I({}, e, {
value: ge
})
});
}
$ < 0 && f("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
Y < 0 && u("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
}
}
var H = s.ReactCurrentDispatcher, X;
function N(e, r, t) {
var X = c.ReactCurrentDispatcher, Z;
function B(e, r, t) {
{
if (X === void 0)
if (Z === void 0)
try {
throw Error();
} catch (c) {
var n = c.stack.trim().match(/\n( *(at )?)/);
X = n && n[1] || "";
} catch (f) {
var n = f.stack.trim().match(/\n( *(at )?)/);
Z = n && n[1] || "";
}
return `
` + X + e;
` + Z + e;
}
}
var Z = !1, M;
var Q = !1, q;
{
var Le = typeof WeakMap == "function" ? WeakMap : Map;
M = new Le();
q = new Le();
}
function he(e, r) {
if (!e || Z)
function _e(e, r) {
if (!e || Q)
return "";
{
var t = M.get(e);
var t = q.get(e);
if (t !== void 0)

@@ -236,13 +236,13 @@ return t;

var n;
Z = !0;
var c = Error.prepareStackTrace;
Q = !0;
var f = Error.prepareStackTrace;
Error.prepareStackTrace = void 0;
var v;
v = H.current, H.current = null, Ve();
v = X.current, X.current = null, Ve();
try {
if (r) {
var u = function() {
var i = function() {
throw Error();
};
if (Object.defineProperty(u.prototype, "props", {
if (Object.defineProperty(i.prototype, "props", {
set: function() {

@@ -253,14 +253,14 @@ throw Error();

try {
Reflect.construct(u, []);
} catch (A) {
n = A;
Reflect.construct(i, []);
} catch (D) {
n = D;
}
Reflect.construct(e, [], u);
Reflect.construct(e, [], i);
} else {
try {
u.call();
} catch (A) {
n = A;
i.call();
} catch (D) {
n = D;
}
e.call(u.prototype);
e.call(i.prototype);
}

@@ -270,23 +270,23 @@ } else {

throw Error();
} catch (A) {
n = A;
} catch (D) {
n = D;
}
e();
}
} catch (A) {
if (A && n && typeof A.stack == "string") {
for (var o = A.stack.split(`
`), S = n.stack.split(`
`), _ = o.length - 1, R = S.length - 1; _ >= 1 && R >= 0 && o[_] !== S[R]; )
R--;
for (; _ >= 1 && R >= 0; _--, R--)
if (o[_] !== S[R]) {
if (_ !== 1 || R !== 1)
} catch (D) {
if (D && n && typeof D.stack == "string") {
for (var a = D.stack.split(`
`), C = n.stack.split(`
`), _ = a.length - 1, m = C.length - 1; _ >= 1 && m >= 0 && a[_] !== C[m]; )
m--;
for (; _ >= 1 && m >= 0; _--, m--)
if (a[_] !== C[m]) {
if (_ !== 1 || m !== 1)
do
if (_--, R--, R < 0 || o[_] !== S[R]) {
if (_--, m--, m < 0 || a[_] !== C[m]) {
var x = `
` + o[_].replace(" at new ", " at ");
return e.displayName && x.includes("<anonymous>") && (x = x.replace("<anonymous>", e.displayName)), typeof e == "function" && M.set(e, x), x;
` + a[_].replace(" at new ", " at ");
return e.displayName && x.includes("<anonymous>") && (x = x.replace("<anonymous>", e.displayName)), typeof e == "function" && q.set(e, x), x;
}
while (_ >= 1 && R >= 0);
while (_ >= 1 && m >= 0);
break;

@@ -296,9 +296,9 @@ }

} finally {
Z = !1, H.current = v, Ue(), Error.prepareStackTrace = c;
Q = !1, X.current = v, Ue(), Error.prepareStackTrace = f;
}
var W = e ? e.displayName || e.name : "", xe = W ? N(W) : "";
return typeof e == "function" && M.set(e, xe), xe;
var $ = e ? e.displayName || e.name : "", je = $ ? B($) : "";
return typeof e == "function" && q.set(e, je), je;
}
function Ne(e, r, t) {
return he(e, !1);
return _e(e, !1);
}

@@ -309,14 +309,14 @@ function Me(e) {

}
function B(e, r, t) {
function z(e, r, t) {
if (e == null)
return "";
if (typeof e == "function")
return he(e, Me(e));
return _e(e, Me(e));
if (typeof e == "string")
return N(e);
return B(e);
switch (e) {
case y:
return N("Suspense");
case C:
return N("SuspenseList");
case E:
return B("Suspense");
case T:
return B("SuspenseList");
}

@@ -328,7 +328,7 @@ if (typeof e == "object")

case O:
return B(e.type, r, t);
case j: {
var n = e, c = n._payload, v = n._init;
return z(e.type, r, t);
case A: {
var n = e, f = n._payload, v = n._init;
try {
return B(v(c), r, t);
return z(v(f), r, t);
} catch {

@@ -340,26 +340,26 @@ }

}
var q = Object.prototype.hasOwnProperty, _e = {}, be = s.ReactDebugCurrentFrame;
function z(e) {
var J = Object.prototype.hasOwnProperty, be = {}, ye = c.ReactDebugCurrentFrame;
function G(e) {
if (e) {
var r = e._owner, t = B(e.type, e._source, r ? r.type : null);
be.setExtraStackFrame(t);
var r = e._owner, t = z(e.type, e._source, r ? r.type : null);
ye.setExtraStackFrame(t);
} else
be.setExtraStackFrame(null);
ye.setExtraStackFrame(null);
}
function Be(e, r, t, n, c) {
function Be(e, r, t, n, f) {
{
var v = Function.call.bind(q);
for (var u in e)
if (v(e, u)) {
var o = void 0;
var v = Function.call.bind(J);
for (var i in e)
if (v(e, i)) {
var a = void 0;
try {
if (typeof e[u] != "function") {
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;
if (typeof e[i] != "function") {
var C = Error((n || "React class") + ": " + t + " type `" + i + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[i] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
throw C.name = "Invariant Violation", C;
}
o = e[u](r, u, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
a = e[i](r, i, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
} catch (_) {
o = _;
a = _;
}
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));
a && !(a instanceof Error) && (G(f), u("%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, i, typeof a), G(null)), a instanceof Error && !(a.message in be) && (be[a.message] = !0, G(f), u("Failed %s type: %s", t, a.message), G(null));
}

@@ -369,3 +369,3 @@ }

var qe = Array.isArray;
function Q(e) {
function ee(e) {
return qe(e);

@@ -391,5 +391,5 @@ }

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);
return u("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 = s.ReactCurrentOwner, Ge = {
var V = c.ReactCurrentOwner, Ge = {
key: !0,

@@ -399,6 +399,6 @@ ref: !0,

__source: !0
}, Ee, ye, ee;
ee = {};
}, Ee, we, re;
re = {};
function Ke(e) {
if (q.call(e, "ref")) {
if (J.call(e, "ref")) {
var r = Object.getOwnPropertyDescriptor(e, "ref").get;

@@ -411,3 +411,3 @@ if (r && r.isReactWarning)

function He(e) {
if (q.call(e, "key")) {
if (J.call(e, "key")) {
var r = Object.getOwnPropertyDescriptor(e, "key").get;

@@ -420,5 +420,5 @@ if (r && r.isReactWarning)

function Xe(e, r) {
if (typeof e.ref == "string" && Y.current && r && Y.current.stateNode !== r) {
var t = k(Y.current.type);
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);
if (typeof e.ref == "string" && V.current && r && V.current.stateNode !== r) {
var t = k(V.current.type);
re[t] || (u('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(V.current.type), e.ref), re[t] = !0);
}

@@ -429,3 +429,3 @@ }

var t = function() {
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));
Ee || (Ee = !0, u("%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));
};

@@ -441,3 +441,3 @@ t.isReactWarning = !0, Object.defineProperty(e, "key", {

var t = function() {
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));
we || (we = !0, u("%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));
};

@@ -450,4 +450,4 @@ t.isReactWarning = !0, Object.defineProperty(e, "ref", {

}
var er = function(e, r, t, n, c, v, u) {
var o = {
var er = function(e, r, t, n, f, v, i) {
var a = {
// This tag allows us to uniquely identify this as a React Element

@@ -459,7 +459,7 @@ $$typeof: g,

ref: t,
props: u,
props: i,
// Record the component responsible for creating this element.
_owner: v
};
return o._store = {}, Object.defineProperty(o._store, "validated", {
return a._store = {}, Object.defineProperty(a._store, "validated", {
configurable: !1,

@@ -469,3 +469,3 @@ enumerable: !1,

value: !1
}), Object.defineProperty(o, "_self", {
}), Object.defineProperty(a, "_self", {
configurable: !1,

@@ -475,31 +475,31 @@ enumerable: !1,

value: n
}), Object.defineProperty(o, "_source", {
}), Object.defineProperty(a, "_source", {
configurable: !1,
enumerable: !1,
writable: !1,
value: c
}), Object.freeze && (Object.freeze(o.props), Object.freeze(o)), o;
value: f
}), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
};
function rr(e, r, t, n, c) {
function rr(e, r, t, n, 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));
var v, i = {}, a = null, C = null;
t !== void 0 && (Re(t), a = "" + t), He(r) && (Re(r.key), a = "" + r.key), Ke(r) && (C = r.ref, Xe(r, f));
for (v in r)
q.call(r, v) && !Ge.hasOwnProperty(v) && (u[v] = r[v]);
J.call(r, v) && !Ge.hasOwnProperty(v) && (i[v] = r[v]);
if (e && e.defaultProps) {
var _ = e.defaultProps;
for (v in _)
u[v] === void 0 && (u[v] = _[v]);
i[v] === void 0 && (i[v] = _[v]);
}
if (o || S) {
var R = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
o && Ze(u, R), S && Qe(u, R);
if (a || C) {
var m = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
a && Ze(i, m), C && Qe(i, m);
}
return er(e, o, S, c, n, Y.current, u);
return er(e, a, C, f, n, V.current, i);
}
}
var re = s.ReactCurrentOwner, Te = s.ReactDebugCurrentFrame;
function I(e) {
var te = c.ReactCurrentOwner, Te = c.ReactDebugCurrentFrame;
function W(e) {
if (e) {
var r = e._owner, t = B(e.type, e._source, r ? r.type : null);
var r = e._owner, t = z(e.type, e._source, r ? r.type : null);
Te.setExtraStackFrame(t);

@@ -509,5 +509,5 @@ } else

}
var te;
te = !1;
function ne(e) {
var ne;
ne = !1;
function ae(e) {
return typeof e == "object" && e !== null && e.$$typeof === g;

@@ -517,4 +517,4 @@ }

{
if (re.current) {
var e = k(re.current.type);
if (te.current) {
var e = k(te.current.type);
if (e)

@@ -562,21 +562,21 @@ return `

var n = "";
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);
e && e._owner && e._owner !== te.current && (n = " It was passed a child from " + k(e._owner.type) + "."), W(e), u('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 we(e, r) {
function Oe(e, r) {
{
if (typeof e != "object")
return;
if (Q(e))
if (ee(e))
for (var t = 0; t < e.length; t++) {
var n = e[t];
ne(n) && Pe(n, r);
ae(n) && Pe(n, r);
}
else if (ne(e))
else if (ae(e))
e._store && (e._store.validated = !0);
else if (e) {
var c = h(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);
var f = h(e);
if (typeof f == "function" && f !== e.entries)
for (var v = f.call(e), i; !(i = v.next()).done; )
ae(i.value) && Pe(i.value, r);
}

@@ -602,8 +602,8 @@ }

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");
} else if (r.PropTypes !== void 0 && !ne) {
ne = !0;
var f = k(r);
u("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", f || "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.");
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && u("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
}

@@ -616,170 +616,176 @@ }

if (n !== "children" && n !== "key") {
I(e), f("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), I(null);
W(e), u("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), W(null);
break;
}
}
e.ref !== null && (I(e), f("Invalid attribute `ref` supplied to `React.Fragment`."), I(null));
e.ref !== null && (W(e), u("Invalid attribute `ref` supplied to `React.Fragment`."), W(null));
}
}
function Oe(e, r, t, n, c, v) {
function xe(e, r, t, n, f, v) {
{
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 S = tr(c);
S ? o += S : o += Ce();
var i = $e(e);
if (!i) {
var a = "";
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (a += " 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 C = tr(f);
C ? a += C : a += Ce();
var _;
e === null ? _ = "null" : Q(e) ? _ = "array" : e !== void 0 && e.$$typeof === g ? (_ = "<" + (k(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);
e === null ? _ = "null" : ee(e) ? _ = "array" : e !== void 0 && e.$$typeof === g ? (_ = "<" + (k(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : _ = typeof e, u("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", _, a);
}
var R = rr(e, r, t, c, v);
if (R == null)
return R;
if (u) {
var m = rr(e, r, t, f, v);
if (m == null)
return m;
if (i) {
var x = r.children;
if (x !== void 0)
if (n)
if (Q(x)) {
for (var W = 0; W < x.length; W++)
we(x[W], e);
if (ee(x)) {
for (var $ = 0; $ < x.length; $++)
Oe(x[$], e);
Object.freeze && Object.freeze(x);
} 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.");
u("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
we(x, e);
Oe(x, e);
}
return e === d ? or(R) : ar(R), R;
return e === d ? or(m) : ar(m), m;
}
}
function ur(e, r, t) {
return Oe(e, r, t, !0);
return xe(e, r, t, !0);
}
function ir(e, r, t) {
return Oe(e, r, t, !1);
return xe(e, r, t, !1);
}
var sr = ir, cr = ur;
L.Fragment = d, L.jsx = sr, L.jsxs = cr;
}()), L;
N.Fragment = d, N.jsx = sr, N.jsxs = cr;
}()), N;
}
process.env.NODE_ENV === "production" ? ae.exports = pr() : ae.exports = gr();
var hr = ae.exports;
process.env.NODE_ENV === "production" ? oe.exports = pr() : oe.exports = gr();
var hr = oe.exports;
const _r = (b, g) => dr(b, (p) => {
for (const [d, m] of g) {
let E = p;
const P = d.length;
for (const w of d.slice(0, P - 1))
E = E[w];
E[d[P - 1]] = m;
for (const [d, y] of g) {
let R = p;
const S = d.length;
for (const P of d.slice(0, S - 1))
R = R[P];
R[d[S - 1]] = y;
}
}), oe = (b, g = {}) => {
const p = D(
}), ue = (b, g = {}) => {
const p = F(
typeof b == "function" ? b() : b
), d = D(/* @__PURE__ */ new Map()), m = D(
), d = F(/* @__PURE__ */ new Map()), y = F(
/* @__PURE__ */ new Map()
), E = D(!1), [P, w] = fr(!1), l = V((a) => {
if (a.some((i) => typeof i == "symbol")) {
for (const [i, T] of m.current)
if (i.length === a.length && i.every((h, s) => h === a[s]))
return T;
), R = F(!1), [S, P] = fr(!1), l = U((o) => {
if (o.some((s) => typeof s == "symbol")) {
for (const [s, w] of y.current)
if (s.length === o.length && s.every((h, c) => h === o[c]))
return w;
return;
}
return d.current.get(a.join("."));
}, []), y = V(
(a, 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((h, s) => h === a[s])) {
m.current.set(T, i);
return d.current.get(o.join("."));
}, []), E = U(
(o, s) => {
if (R.current = !0, o.some((w) => typeof w == "symbol")) {
for (const w of y.current.keys())
if (!(w.length < o.length) && w.every((h, c) => h === o[c])) {
y.current.set(w, s);
return;
}
m.current.set(a, i);
y.current.set(o, s);
return;
}
d.current.set(a.join("."), i), w(!P);
d.current.set(o.join("."), s), P(!S);
},
[P]
), C = V(() => {
var T;
const a = [...m.current.entries()];
m.current.clear();
for (const [h, s] of d.current)
a.push([h.split("."), s]);
[S]
), T = U(() => {
var w;
const o = [...y.current.entries()];
y.current.clear();
for (const [h, c] of d.current)
o.push([h.split("."), c]);
d.current.clear();
const i = _r(p.current, a);
E.current = !1, (T = g.onStateChange) == null || T.call(g, p.current, i), p.current = i;
}, [g.onStateChange]), O = V(
(a, i = []) => new Proxy(
const s = _r(p.current, o);
R.current = !1, (w = g.onStateChange) == null || w.call(g, p.current, s), p.current = s;
}, [g.onStateChange]), O = U(
(o, s = []) => new Proxy(
// If the object is frozen, it can't be proxied,
// so a new object is created to be proxied
Object.isFrozen(a) ? { ...a } : a,
Object.isFrozen(o) ? { ...o } : o,
{
get(T, h) {
const s = l([...i, h]) ?? T[h];
return Array.isArray(s) ? j(s, [...i, h]) : typeof s == "object" && s !== null ? O(s, [...i, h]) : s;
get(w, h) {
const c = l([...s, h]) ?? w[h];
return Array.isArray(c) ? A(c, [...s, h]) : typeof c == "object" && c !== null ? O(c, [...s, h]) : c;
},
set(T, h, s) {
return y([...i, h], s), !0;
set(w, h, c) {
return E([...s, h], c), !0;
}
}
),
[l, y]
), j = V(
(a, i = []) => new Proxy(
[l, E]
), A = U(
(o, s = []) => new Proxy(
// If the array is frozen, it can't be proxied,
// so a new array is created to be proxied
Object.isFrozen(a) ? [...a] : a,
Object.isFrozen(o) ? [...o] : o,
{
get(T, h) {
const s = l([...i, h]) ?? T[h];
if (Array.isArray(s))
return j(s, [...i, h]);
if (typeof s == "object" && s !== null)
return O(s, [...i, h]);
if (typeof s == "function")
get(w, h) {
const c = l([...s, h]) ?? w[h];
if (Array.isArray(c))
return A(c, [...s, h]);
if (typeof c == "object" && c !== null)
return O(c, [...s, h]);
if (typeof c == "function")
switch (h) {
case "push":
return (...f) => (y(i, [...a, ...f]), a.length + f.length);
return (...u) => (E(s, [...o, ...u]), o.length + u.length);
case "pop":
return () => {
const f = a.pop();
return y(i, a), f;
const u = [...o], j = u.pop();
return E(s, u), j;
};
case "shift":
return () => {
const f = a.shift();
return y(i, a), f;
const u = [...o], j = u.shift();
return E(s, u), j;
};
case "unshift":
return (...f) => (y(i, [...f, ...a]), f.length + a.length);
return (...u) => (E(s, [...u, ...o]), u.length + o.length);
case "splice":
return (f, J, ...G) => {
const K = a.splice(f, J, ...G);
return y(i, a), K;
return (u, j, ...K) => {
const M = [...o], H = M.splice(u, j, ...K);
return E(s, M), H;
};
case "sort":
return (f) => (a.sort(f), y(i, a), a);
return (u) => {
const j = [...o];
return j.sort(u), E(s, j), j;
};
case "reverse":
return () => (a.reverse(), y(i, a), a);
return () => {
const u = [...o];
return u.reverse(), E(s, u), u;
};
}
return s;
return c;
},
set(T, h, s) {
return y([...i, h], s), !0;
set(w, h, c) {
return E([...s, h], c), !0;
}
}
),
[l, y]
[l, E]
);
return E.current && C(), O(p.current);
}, Er = (b) => ({
return R.current && T(), O(p.current);
}, Rr = (b) => ({
__Context: lr(b),
__initialState: b
}), yr = ({
}), Er = ({
children: b,
store: g
}) => {
const p = oe(g.__initialState);
const p = ue(g.__initialState);
return /* @__PURE__ */ hr.jsx(g.__Context.Provider, { value: p, children: b });
}, Tr = (b) => vr(b.__Context), Cr = (b) => {
const g = D([]), p = D([]), d = D(!1), m = D(!1), E = oe(
}, wr = (b) => vr(b.__Context), Tr = (b) => {
const g = F([]), p = F([]), d = F(!1), y = F(!1), R = ue(
{ value: b },

@@ -792,4 +798,4 @@ {

}
if (m.current) {
m.current = !1;
if (y.current) {
y.current = !1;
return;

@@ -800,3 +806,3 @@ }

}
), P = () => {
), S = () => {
if (g.current.length === 0)

@@ -806,25 +812,25 @@ return;

const l = g.current.pop();
l && (p.current.push(je(E.value)), E.value = l);
}, w = () => {
l && (p.current.push(Ae(R.value)), R.value = l);
}, P = () => {
if (p.current.length === 0)
return;
m.current = !0;
y.current = !0;
const l = p.current.pop();
l && (g.current.push(je(E.value)), E.value = l);
l && (g.current.push(Ae(R.value)), R.value = l);
};
return { state: E.value, undo: P, redo: w };
}, Sr = (b) => {
const g = oe({ value: b });
return { state: R.value, undo: S, redo: P };
}, Cr = (b) => {
const g = ue({ value: b });
return new Proxy(g, {
get: (p, d) => d === "value" ? p.value : p.value[d],
set: (p, d, m) => (d === "value" ? p.value = m : p.value[d] = m, !0)
set: (p, d, y) => (d === "value" ? p.value = y : p.value[d] = y, !0)
});
};
export {
yr as ReactiveProvider,
Er as createReactiveStore,
oe as useReactive,
Tr as useReactiveStore,
Cr as useReactiveUndo,
Sr as useReactiveValue
Er as ReactiveProvider,
Rr as createReactiveStore,
ue as useReactive,
wr as useReactiveStore,
Tr as useReactiveUndo,
Cr as useReactiveValue
};

@@ -1,2 +0,2 @@

(function(O,h){typeof exports=="object"&&typeof module<"u"?h(exports,require("react"),require("immer"),require("lodash.clonedeep")):typeof define=="function"&&define.amd?define(["exports","react","immer","lodash.clonedeep"],h):(O=typeof globalThis<"u"?globalThis:O||self,h(O["react-reactive-hooks"]={},O.require$$0,O.immer,O.cloneDeep))})(this,function(O,h,De,ue){"use strict";var H={exports:{}},Y={};/**
(function(P,h){typeof exports=="object"&&typeof module<"u"?h(exports,require("react"),require("immer"),require("lodash.clonedeep")):typeof define=="function"&&define.amd?define(["exports","react","immer","lodash.clonedeep"],h):(P=typeof globalThis<"u"?globalThis:P||self,h(P["react-reactive-hooks"]={},P.require$$0,P.immer,P.cloneDeep))})(this,function(P,h,Fe,ie){"use strict";var Z={exports:{}},U={};/**
* @license React

@@ -9,3 +9,3 @@ * react-jsx-runtime.production.min.js

* LICENSE file in the root directory of this source tree.
*/var ie;function Fe(){if(ie)return Y;ie=1;var _=h,g=Symbol.for("react.element"),p=Symbol.for("react.fragment"),d=Object.prototype.hasOwnProperty,m=_.__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)d.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:g,type:j,key:A,ref:a,props:x,_owner:m.current}}return Y.Fragment=p,Y.jsx=w,Y.jsxs=w,Y}var U={};/**
*/var se;function Ie(){if(se)return U;se=1;var y=h,g=Symbol.for("react.element"),p=Symbol.for("react.fragment"),d=Object.prototype.hasOwnProperty,_=y.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,E={key:!0,ref:!0,__self:!0,__source:!0};function O(j,l,C){var T,x={},D=null,o=null;C!==void 0&&(D=""+C),l.key!==void 0&&(D=""+l.key),l.ref!==void 0&&(o=l.ref);for(T in l)d.call(l,T)&&!E.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:g,type:j,key:D,ref:o,props:x,_owner:_.current}}return U.Fragment=p,U.jsx=O,U.jsxs=O,U}var L={};/**
* @license React

@@ -18,12 +18,12 @@ * react-jsx-runtime.development.js

* LICENSE file in the root directory of this source tree.
*/var se;function Ie(){return se||(se=1,process.env.NODE_ENV!=="production"&&function(){var _=h,g=Symbol.for("react.element"),p=Symbol.for("react.portal"),d=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 R(e){if(e===null||typeof e!="object")return null;var r=i&&e[i]||e[S];return typeof r=="function"?r:null}var s=_.__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,Be=!1,ze=!1,Je=!1,ce;ce=Symbol.for("react.module.reference");function Ge(e){return!!(typeof e=="string"||typeof e=="function"||e===d||e===y||Je||e===m||e===C||e===T||ze||e===a||Z||Q||Be||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 Ke(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 d:return"Fragment";case p: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 Ke(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 He(){{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 Xe(){{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 Ze=typeof WeakMap=="function"?WeakMap:Map;z=new Ze}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,He();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(`
`),b=o.length-1,E=P.length-1;b>=1&&E>=0&&o[b]!==P[E];)E--;for(;b>=1&&E>=0;b--,E--)if(o[b]!==P[E]){if(b!==1||E!==1)do if(b--,E--,E<0||o[b]!==P[E]){var k=`
`+o[b].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(b>=1&&E>=0);break}}}finally{ee=!1,q.current=v,Xe(),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 qe(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,qe(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 $e(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(b){o=b}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 er=Array.isArray;function re(e){return er(e)}function rr(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function tr(e){try{return ye(e),!1}catch{return!0}}function ye(e){return""+e}function Ce(e){if(tr(e))return f("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",rr(e)),ye(e)}var M=s.ReactCurrentOwner,nr={key:!0,ref:!0,__self:!0,__source:!0},Se,Te,te;te={};function ar(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 or(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 ur(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 ir(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 sr(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 cr=function(e,r,t,n,c,v,u){var o={$$typeof:g,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 fr(e,r,t,n,c){{var v,u={},o=null,P=null;t!==void 0&&(Ce(t),o=""+t),or(r)&&(Ce(r.key),o=""+r.key),ar(r)&&(P=r.ref,ur(r,c));for(v in r)G.call(r,v)&&!nr.hasOwnProperty(v)&&(u[v]=r[v]);if(e&&e.defaultProps){var b=e.defaultProps;for(v in b)u[v]===void 0&&(u[v]=b[v])}if(o||P){var E=typeof e=="function"?e.displayName||e.name||"Unknown":e;o&&ir(u,E),P&&sr(u,E)}return cr(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===g}function Oe(){{if(ne.current){var e=D(ne.current.type);if(e)return`
*/var ce;function We(){return ce||(ce=1,process.env.NODE_ENV!=="production"&&function(){var y=h,g=Symbol.for("react.element"),p=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),O=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"),D=Symbol.for("react.lazy"),o=Symbol.for("react.offscreen"),s=Symbol.iterator,S="@@iterator";function R(e){if(e===null||typeof e!="object")return null;var r=s&&e[s]||e[S];return typeof r=="function"?r:null}var c=y.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function u(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];A("error",e,t)}}function A(e,r,t){{var n=c.ReactDebugCurrentFrame,f=n.getStackAddendum();f!==""&&(r+="%s",t=t.concat([f]));var v=t.map(function(i){return String(i)});v.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,v)}}var Q=!1,z=!1,q=!1,ze=!1,Je=!1,fe;fe=Symbol.for("react.module.reference");function Ge(e){return!!(typeof e=="string"||typeof e=="function"||e===d||e===E||Je||e===_||e===C||e===T||ze||e===o||Q||z||q||typeof e=="object"&&e!==null&&(e.$$typeof===D||e.$$typeof===x||e.$$typeof===O||e.$$typeof===j||e.$$typeof===l||e.$$typeof===fe||e.getModuleId!==void 0))}function Ke(e,r,t){var n=e.displayName;if(n)return n;var f=r.displayName||r.name||"";return f!==""?t+"("+f+")":t}function le(e){return e.displayName||"Context"}function F(e){if(e==null)return null;if(typeof e.tag=="number"&&u("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 d:return"Fragment";case p:return"Portal";case E:return"Profiler";case _:return"StrictMode";case C:return"Suspense";case T:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case j:var r=e;return le(r)+".Consumer";case O:var t=e;return le(t._context)+".Provider";case l:return Ke(e,e.render,"ForwardRef");case x:var n=e.displayName||null;return n!==null?n:F(e.type)||"Memo";case D:{var f=e,v=f._payload,i=f._init;try{return F(i(v))}catch{return null}}}return null}var W=Object.assign,M=0,ve,de,pe,he,ge,Re,be;function ye(){}ye.__reactDisabledLog=!0;function He(){{if(M===0){ve=console.log,de=console.info,pe=console.warn,he=console.error,ge=console.group,Re=console.groupCollapsed,be=console.groupEnd;var e={configurable:!0,enumerable:!0,value:ye,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}M++}}function Xe(){{if(M--,M===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:W({},e,{value:ve}),info:W({},e,{value:de}),warn:W({},e,{value:pe}),error:W({},e,{value:he}),group:W({},e,{value:ge}),groupCollapsed:W({},e,{value:Re}),groupEnd:W({},e,{value:be})})}M<0&&u("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var $=c.ReactCurrentDispatcher,ee;function J(e,r,t){{if(ee===void 0)try{throw Error()}catch(f){var n=f.stack.trim().match(/\n( *(at )?)/);ee=n&&n[1]||""}return`
`+ee+e}}var re=!1,G;{var Ze=typeof WeakMap=="function"?WeakMap:Map;G=new Ze}function _e(e,r){if(!e||re)return"";{var t=G.get(e);if(t!==void 0)return t}var n;re=!0;var f=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var v;v=$.current,$.current=null,He();try{if(r){var i=function(){throw Error()};if(Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(I){n=I}Reflect.construct(e,[],i)}else{try{i.call()}catch(I){n=I}e.call(i.prototype)}}else{try{throw Error()}catch(I){n=I}e()}}catch(I){if(I&&n&&typeof I.stack=="string"){for(var a=I.stack.split(`
`),w=n.stack.split(`
`),b=a.length-1,m=w.length-1;b>=1&&m>=0&&a[b]!==w[m];)m--;for(;b>=1&&m>=0;b--,m--)if(a[b]!==w[m]){if(b!==1||m!==1)do if(b--,m--,m<0||a[b]!==w[m]){var k=`
`+a[b].replace(" at new "," at ");return e.displayName&&k.includes("<anonymous>")&&(k=k.replace("<anonymous>",e.displayName)),typeof e=="function"&&G.set(e,k),k}while(b>=1&&m>=0);break}}}finally{re=!1,$.current=v,Xe(),Error.prepareStackTrace=f}var Y=e?e.displayName||e.name:"",De=Y?J(Y):"";return typeof e=="function"&&G.set(e,De),De}function Qe(e,r,t){return _e(e,!1)}function qe(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function K(e,r,t){if(e==null)return"";if(typeof e=="function")return _e(e,qe(e));if(typeof e=="string")return J(e);switch(e){case C:return J("Suspense");case T:return J("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case l:return Qe(e.render);case x:return K(e.type,r,t);case D:{var n=e,f=n._payload,v=n._init;try{return K(v(f),r,t)}catch{}}}return""}var H=Object.prototype.hasOwnProperty,me={},Ee=c.ReactDebugCurrentFrame;function X(e){if(e){var r=e._owner,t=K(e.type,e._source,r?r.type:null);Ee.setExtraStackFrame(t)}else Ee.setExtraStackFrame(null)}function $e(e,r,t,n,f){{var v=Function.call.bind(H);for(var i in e)if(v(e,i)){var a=void 0;try{if(typeof e[i]!="function"){var w=Error((n||"React class")+": "+t+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw w.name="Invariant Violation",w}a=e[i](r,i,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(b){a=b}a&&!(a instanceof Error)&&(X(f),u("%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,i,typeof a),X(null)),a instanceof Error&&!(a.message in me)&&(me[a.message]=!0,X(f),u("Failed %s type: %s",t,a.message),X(null))}}}var er=Array.isArray;function te(e){return er(e)}function rr(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function tr(e){try{return Ce(e),!1}catch{return!0}}function Ce(e){return""+e}function Se(e){if(tr(e))return u("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",rr(e)),Ce(e)}var N=c.ReactCurrentOwner,nr={key:!0,ref:!0,__self:!0,__source:!0},Te,we,ne;ne={};function ar(e){if(H.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function or(e){if(H.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function ur(e,r){if(typeof e.ref=="string"&&N.current&&r&&N.current.stateNode!==r){var t=F(N.current.type);ne[t]||(u('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',F(N.current.type),e.ref),ne[t]=!0)}}function ir(e,r){{var t=function(){Te||(Te=!0,u("%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 sr(e,r){{var t=function(){we||(we=!0,u("%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 cr=function(e,r,t,n,f,v,i){var a={$$typeof:g,type:e,key:r,ref:t,props:i,_owner:v};return a._store={},Object.defineProperty(a._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(a,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(a,"_source",{configurable:!1,enumerable:!1,writable:!1,value:f}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a};function fr(e,r,t,n,f){{var v,i={},a=null,w=null;t!==void 0&&(Se(t),a=""+t),or(r)&&(Se(r.key),a=""+r.key),ar(r)&&(w=r.ref,ur(r,f));for(v in r)H.call(r,v)&&!nr.hasOwnProperty(v)&&(i[v]=r[v]);if(e&&e.defaultProps){var b=e.defaultProps;for(v in b)i[v]===void 0&&(i[v]=b[v])}if(a||w){var m=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&ir(i,m),w&&sr(i,m)}return cr(e,a,w,f,n,N.current,i)}}var ae=c.ReactCurrentOwner,Pe=c.ReactDebugCurrentFrame;function V(e){if(e){var r=e._owner,t=K(e.type,e._source,r?r.type:null);Pe.setExtraStackFrame(t)}else Pe.setExtraStackFrame(null)}var oe;oe=!1;function ue(e){return typeof e=="object"&&e!==null&&e.$$typeof===g}function Oe(){{if(ae.current){var e=F(ae.current.type);if(e)return`
Check the render method of \``+e+"`."}return""}}function lr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),t=e.lineNumber;return`
Check your code at `+r+":"+t+"."}return""}}var we={};function vr(e){{var r=Oe();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
Check your code at `+r+":"+t+"."}return""}}var je={};function vr(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 je(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=vr(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=R(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 dr(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);$e(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 pr(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=Ge(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=lr(c);P?o+=P:o+=Oe();var b;e===null?b="null":re(e)?b="array":e!==void 0&&e.$$typeof===g?(b="<"+(D(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 E=fr(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===d?pr(E):dr(E),E}}function hr(e,r,t){return ke(e,r,t,!0)}function gr(e,r,t){return ke(e,r,t,!1)}var Rr=gr,br=hr;U.Fragment=d,U.jsx=Rr,U.jsxs=br}()),U}process.env.NODE_ENV==="production"?H.exports=Fe():H.exports=Ie();var We=H.exports;const Ve=(_,g)=>De.produce(_,p=>{for(const[d,m]of g){let y=p;const w=d.length;for(const j of d.slice(0,w-1))y=y[j];y[d[w-1]]=m}}),N=(_,g={})=>{const p=h.useRef(typeof _=="function"?_():_),d=h.useRef(new Map),m=h.useRef(new Map),y=h.useRef(!1),[w,j]=h.useState(!1),l=h.useCallback(a=>{if(a.some(i=>typeof i=="symbol")){for(const[i,S]of m.current)if(i.length===a.length&&i.every((R,s)=>R===a[s]))return S;return}return d.current.get(a.join("."))},[]),C=h.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((R,s)=>R===a[s])){m.current.set(S,i);return}m.current.set(a,i);return}d.current.set(a.join("."),i),j(!w)},[w]),T=h.useCallback(()=>{var S;const a=[...m.current.entries()];m.current.clear();for(const[R,s]of d.current)a.push([R.split("."),s]);d.current.clear();const i=Ve(p.current,a);y.current=!1,(S=g.onStateChange)==null||S.call(g,p.current,i),p.current=i},[g.onStateChange]),x=h.useCallback((a,i=[])=>new Proxy(Object.isFrozen(a)?{...a}:a,{get(S,R){const s=l([...i,R])??S[R];return Array.isArray(s)?A(s,[...i,R]):typeof s=="object"&&s!==null?x(s,[...i,R]):s},set(S,R,s){return C([...i,R],s),!0}}),[l,C]),A=h.useCallback((a,i=[])=>new Proxy(Object.isFrozen(a)?[...a]:a,{get(S,R){const s=l([...i,R])??S[R];if(Array.isArray(s))return A(s,[...i,R]);if(typeof s=="object"&&s!==null)return x(s,[...i,R]);if(typeof s=="function")switch(R){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,R,s){return C([...i,R],s),!0}}),[l,C]);return y.current&&T(),x(p.current)},Ye=_=>({__Context:h.createContext(_),__initialState:_}),Ue=({children:_,store:g})=>{const p=N(g.__initialState);return We.jsx(g.__Context.Provider,{value:p,children:_})},Le=_=>h.useContext(_.__Context),Me=_=>{const g=h.useRef([]),p=h.useRef([]),d=h.useRef(!1),m=h.useRef(!1),y=N({value:_},{onStateChange:l=>{if(d.current){d.current=!1;return}if(m.current){m.current=!1;return}g.current.push(l.value),p.current=[]}}),w=()=>{if(g.current.length===0)return;d.current=!0;const l=g.current.pop();l&&(p.current.push(ue(y.value)),y.value=l)},j=()=>{if(p.current.length===0)return;m.current=!0;const l=p.current.pop();l&&(g.current.push(ue(y.value)),y.value=l)};return{state:y.value,undo:w,redo:j}},Ne=_=>{const g=N({value:_});return new Proxy(g,{get:(p,d)=>d==="value"?p.value:p.value[d],set:(p,d,m)=>(d==="value"?p.value=m:p.value[d]=m,!0)})};O.ReactiveProvider=Ue,O.createReactiveStore=Ye,O.useReactive=N,O.useReactiveStore=Le,O.useReactiveUndo=Me,O.useReactiveValue=Ne,Object.defineProperty(O,Symbol.toStringTag,{value:"Module"})});
Check the top-level render call using <`+t+">.")}return r}}function xe(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=vr(r);if(je[t])return;je[t]=!0;var n="";e&&e._owner&&e._owner!==ae.current&&(n=" It was passed a child from "+F(e._owner.type)+"."),V(e),u('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),V(null)}}function ke(e,r){{if(typeof e!="object")return;if(te(e))for(var t=0;t<e.length;t++){var n=e[t];ue(n)&&xe(n,r)}else if(ue(e))e._store&&(e._store.validated=!0);else if(e){var f=R(e);if(typeof f=="function"&&f!==e.entries)for(var v=f.call(e),i;!(i=v.next()).done;)ue(i.value)&&xe(i.value,r)}}}function dr(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=F(r);$e(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!oe){oe=!0;var f=F(r);u("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",f||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&u("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function pr(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){V(e),u("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),V(null);break}}e.ref!==null&&(V(e),u("Invalid attribute `ref` supplied to `React.Fragment`."),V(null))}}function Ae(e,r,t,n,f,v){{var i=Ge(e);if(!i){var a="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(a+=" 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 w=lr(f);w?a+=w:a+=Oe();var b;e===null?b="null":te(e)?b="array":e!==void 0&&e.$$typeof===g?(b="<"+(F(e.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):b=typeof e,u("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",b,a)}var m=fr(e,r,t,f,v);if(m==null)return m;if(i){var k=r.children;if(k!==void 0)if(n)if(te(k)){for(var Y=0;Y<k.length;Y++)ke(k[Y],e);Object.freeze&&Object.freeze(k)}else u("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 ke(k,e)}return e===d?pr(m):dr(m),m}}function hr(e,r,t){return Ae(e,r,t,!0)}function gr(e,r,t){return Ae(e,r,t,!1)}var Rr=gr,br=hr;L.Fragment=d,L.jsx=Rr,L.jsxs=br}()),L}process.env.NODE_ENV==="production"?Z.exports=Ie():Z.exports=We();var Ve=Z.exports;const Ye=(y,g)=>Fe.produce(y,p=>{for(const[d,_]of g){let E=p;const O=d.length;for(const j of d.slice(0,O-1))E=E[j];E[d[O-1]]=_}}),B=(y,g={})=>{const p=h.useRef(typeof y=="function"?y():y),d=h.useRef(new Map),_=h.useRef(new Map),E=h.useRef(!1),[O,j]=h.useState(!1),l=h.useCallback(o=>{if(o.some(s=>typeof s=="symbol")){for(const[s,S]of _.current)if(s.length===o.length&&s.every((R,c)=>R===o[c]))return S;return}return d.current.get(o.join("."))},[]),C=h.useCallback((o,s)=>{if(E.current=!0,o.some(S=>typeof S=="symbol")){for(const S of _.current.keys())if(!(S.length<o.length)&&S.every((R,c)=>R===o[c])){_.current.set(S,s);return}_.current.set(o,s);return}d.current.set(o.join("."),s),j(!O)},[O]),T=h.useCallback(()=>{var S;const o=[..._.current.entries()];_.current.clear();for(const[R,c]of d.current)o.push([R.split("."),c]);d.current.clear();const s=Ye(p.current,o);E.current=!1,(S=g.onStateChange)==null||S.call(g,p.current,s),p.current=s},[g.onStateChange]),x=h.useCallback((o,s=[])=>new Proxy(Object.isFrozen(o)?{...o}:o,{get(S,R){const c=l([...s,R])??S[R];return Array.isArray(c)?D(c,[...s,R]):typeof c=="object"&&c!==null?x(c,[...s,R]):c},set(S,R,c){return C([...s,R],c),!0}}),[l,C]),D=h.useCallback((o,s=[])=>new Proxy(Object.isFrozen(o)?[...o]:o,{get(S,R){const c=l([...s,R])??S[R];if(Array.isArray(c))return D(c,[...s,R]);if(typeof c=="object"&&c!==null)return x(c,[...s,R]);if(typeof c=="function")switch(R){case"push":return(...u)=>(C(s,[...o,...u]),o.length+u.length);case"pop":return()=>{const u=[...o],A=u.pop();return C(s,u),A};case"shift":return()=>{const u=[...o],A=u.shift();return C(s,u),A};case"unshift":return(...u)=>(C(s,[...u,...o]),u.length+o.length);case"splice":return(u,A,...Q)=>{const z=[...o],q=z.splice(u,A,...Q);return C(s,z),q};case"sort":return u=>{const A=[...o];return A.sort(u),C(s,A),A};case"reverse":return()=>{const u=[...o];return u.reverse(),C(s,u),u}}return c},set(S,R,c){return C([...s,R],c),!0}}),[l,C]);return E.current&&T(),x(p.current)},Ue=y=>({__Context:h.createContext(y),__initialState:y}),Le=({children:y,store:g})=>{const p=B(g.__initialState);return Ve.jsx(g.__Context.Provider,{value:p,children:y})},Me=y=>h.useContext(y.__Context),Ne=y=>{const g=h.useRef([]),p=h.useRef([]),d=h.useRef(!1),_=h.useRef(!1),E=B({value:y},{onStateChange:l=>{if(d.current){d.current=!1;return}if(_.current){_.current=!1;return}g.current.push(l.value),p.current=[]}}),O=()=>{if(g.current.length===0)return;d.current=!0;const l=g.current.pop();l&&(p.current.push(ie(E.value)),E.value=l)},j=()=>{if(p.current.length===0)return;_.current=!0;const l=p.current.pop();l&&(g.current.push(ie(E.value)),E.value=l)};return{state:E.value,undo:O,redo:j}},Be=y=>{const g=B({value:y});return new Proxy(g,{get:(p,d)=>d==="value"?p.value:p.value[d],set:(p,d,_)=>(d==="value"?p.value=_:p.value[d]=_,!0)})};P.ReactiveProvider=Le,P.createReactiveStore=Ue,P.useReactive=B,P.useReactiveStore=Me,P.useReactiveUndo=Ne,P.useReactiveValue=Be,Object.defineProperty(P,Symbol.toStringTag,{value:"Module"})});
{
"name": "react-reactive-hooks",
"version": "0.1.4",
"version": "0.1.5",
"description": "A set of React hooks for reactive programming",

@@ -5,0 +5,0 @@ "keywords": [

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc