@ptolemy2002/react-proxy-context 2.3.2 → 2.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +118 -118
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Fe, { createContext as vr, useRef as
|
|
1
|
+
import Fe, { createContext as vr, useRef as X, useImperativeHandle as pr, useCallback as B, useContext as br, useSyncExternalStore as yr } from "react";
|
|
2
2
|
import { nanoid as mr } from "nanoid";
|
|
3
3
|
import L from "is-callable";
|
|
4
4
|
import Rr from "@ptolemy2002/react-force-rerender";
|
|
@@ -18,13 +18,13 @@ var De;
|
|
|
18
18
|
function hr() {
|
|
19
19
|
if (De) return J;
|
|
20
20
|
De = 1;
|
|
21
|
-
var R = Fe,
|
|
22
|
-
function y(i, s,
|
|
23
|
-
var b,
|
|
24
|
-
|
|
25
|
-
for (b in s) m.call(s, b) && !
|
|
26
|
-
if (i && i.defaultProps) for (b in s = i.defaultProps, s)
|
|
27
|
-
return { $$typeof:
|
|
21
|
+
var R = Fe, h = Symbol.for("react.element"), C = Symbol.for("react.fragment"), m = Object.prototype.hasOwnProperty, x = R.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, _ = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
22
|
+
function y(i, s, j) {
|
|
23
|
+
var b, E = {}, w = null, I = null;
|
|
24
|
+
j !== void 0 && (w = "" + j), s.key !== void 0 && (w = "" + s.key), s.ref !== void 0 && (I = s.ref);
|
|
25
|
+
for (b in s) m.call(s, b) && !_.hasOwnProperty(b) && (E[b] = s[b]);
|
|
26
|
+
if (i && i.defaultProps) for (b in s = i.defaultProps, s) E[b] === void 0 && (E[b] = s[b]);
|
|
27
|
+
return { $$typeof: h, type: i, key: w, ref: I, props: E, _owner: x.current };
|
|
28
28
|
}
|
|
29
29
|
return J.Fragment = C, J.jsx = y, J.jsxs = y, J;
|
|
30
30
|
}
|
|
@@ -41,7 +41,7 @@ var q = {};
|
|
|
41
41
|
var Ae;
|
|
42
42
|
function _r() {
|
|
43
43
|
return Ae || (Ae = 1, process.env.NODE_ENV !== "production" && function() {
|
|
44
|
-
var R = Fe,
|
|
44
|
+
var R = Fe, h = Symbol.for("react.element"), C = Symbol.for("react.portal"), m = Symbol.for("react.fragment"), x = Symbol.for("react.strict_mode"), _ = Symbol.for("react.profiler"), y = Symbol.for("react.provider"), i = Symbol.for("react.context"), s = Symbol.for("react.forward_ref"), j = Symbol.for("react.suspense"), b = Symbol.for("react.suspense_list"), E = Symbol.for("react.memo"), w = Symbol.for("react.lazy"), I = Symbol.for("react.offscreen"), V = Symbol.iterator, v = "@@iterator";
|
|
45
45
|
function S(e) {
|
|
46
46
|
if (e === null || typeof e != "object")
|
|
47
47
|
return null;
|
|
@@ -69,7 +69,7 @@ function _r() {
|
|
|
69
69
|
var D = !1, $ = !1, Ie = !1, $e = !1, We = !1, se;
|
|
70
70
|
se = Symbol.for("react.module.reference");
|
|
71
71
|
function Ye(e) {
|
|
72
|
-
return !!(typeof e == "string" || typeof e == "function" || e === m || e ===
|
|
72
|
+
return !!(typeof e == "string" || typeof e == "function" || e === m || e === _ || We || e === x || e === j || e === b || $e || e === I || D || $ || Ie || typeof e == "object" && e !== null && (e.$$typeof === w || e.$$typeof === E || e.$$typeof === y || e.$$typeof === i || e.$$typeof === s || // This needs to include all possible module reference object
|
|
73
73
|
// types supported by any Flight configuration anywhere since
|
|
74
74
|
// we don't know which Flight build this will end up being used
|
|
75
75
|
// with.
|
|
@@ -97,11 +97,11 @@ function _r() {
|
|
|
97
97
|
return "Fragment";
|
|
98
98
|
case C:
|
|
99
99
|
return "Portal";
|
|
100
|
-
case
|
|
100
|
+
case _:
|
|
101
101
|
return "Profiler";
|
|
102
|
-
case
|
|
102
|
+
case x:
|
|
103
103
|
return "StrictMode";
|
|
104
|
-
case
|
|
104
|
+
case j:
|
|
105
105
|
return "Suspense";
|
|
106
106
|
case b:
|
|
107
107
|
return "SuspenseList";
|
|
@@ -116,10 +116,10 @@ function _r() {
|
|
|
116
116
|
return ce(t._context) + ".Provider";
|
|
117
117
|
case s:
|
|
118
118
|
return Le(e, e.render, "ForwardRef");
|
|
119
|
-
case
|
|
119
|
+
case E:
|
|
120
120
|
var n = e.displayName || null;
|
|
121
121
|
return n !== null ? n : k(e.type) || "Memo";
|
|
122
|
-
case
|
|
122
|
+
case w: {
|
|
123
123
|
var u = e, f = u._payload, o = u._init;
|
|
124
124
|
try {
|
|
125
125
|
return k(o(f));
|
|
@@ -130,14 +130,14 @@ function _r() {
|
|
|
130
130
|
}
|
|
131
131
|
return null;
|
|
132
132
|
}
|
|
133
|
-
var A = Object.assign, M = 0, fe, le, de, ve, pe,
|
|
133
|
+
var A = Object.assign, M = 0, fe, le, de, ve, pe, be, ye;
|
|
134
134
|
function me() {
|
|
135
135
|
}
|
|
136
136
|
me.__reactDisabledLog = !0;
|
|
137
137
|
function Ve() {
|
|
138
138
|
{
|
|
139
139
|
if (M === 0) {
|
|
140
|
-
fe = console.log, le = console.info, de = console.warn, ve = console.error, pe = console.group,
|
|
140
|
+
fe = console.log, le = console.info, de = console.warn, ve = console.error, pe = console.group, be = console.groupCollapsed, ye = console.groupEnd;
|
|
141
141
|
var e = {
|
|
142
142
|
configurable: !0,
|
|
143
143
|
enumerable: !0,
|
|
@@ -182,37 +182,37 @@ function _r() {
|
|
|
182
182
|
value: pe
|
|
183
183
|
}),
|
|
184
184
|
groupCollapsed: A({}, e, {
|
|
185
|
-
value:
|
|
185
|
+
value: be
|
|
186
186
|
}),
|
|
187
187
|
groupEnd: A({}, e, {
|
|
188
|
-
value:
|
|
188
|
+
value: ye
|
|
189
189
|
})
|
|
190
190
|
});
|
|
191
191
|
}
|
|
192
192
|
M < 0 && c("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
|
-
var
|
|
195
|
+
var Z = l.ReactCurrentDispatcher, Q;
|
|
196
196
|
function K(e, r, t) {
|
|
197
197
|
{
|
|
198
|
-
if (
|
|
198
|
+
if (Q === void 0)
|
|
199
199
|
try {
|
|
200
200
|
throw Error();
|
|
201
201
|
} catch (u) {
|
|
202
202
|
var n = u.stack.trim().match(/\n( *(at )?)/);
|
|
203
|
-
|
|
203
|
+
Q = n && n[1] || "";
|
|
204
204
|
}
|
|
205
205
|
return `
|
|
206
|
-
` +
|
|
206
|
+
` + Q + e;
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
|
-
var
|
|
209
|
+
var ee = !1, G;
|
|
210
210
|
{
|
|
211
211
|
var Ue = typeof WeakMap == "function" ? WeakMap : Map;
|
|
212
212
|
G = new Ue();
|
|
213
213
|
}
|
|
214
214
|
function Re(e, r) {
|
|
215
|
-
if (!e ||
|
|
215
|
+
if (!e || ee)
|
|
216
216
|
return "";
|
|
217
217
|
{
|
|
218
218
|
var t = G.get(e);
|
|
@@ -220,11 +220,11 @@ function _r() {
|
|
|
220
220
|
return t;
|
|
221
221
|
}
|
|
222
222
|
var n;
|
|
223
|
-
|
|
223
|
+
ee = !0;
|
|
224
224
|
var u = Error.prepareStackTrace;
|
|
225
225
|
Error.prepareStackTrace = void 0;
|
|
226
226
|
var f;
|
|
227
|
-
f =
|
|
227
|
+
f = Z.current, Z.current = null, Ve();
|
|
228
228
|
try {
|
|
229
229
|
if (r) {
|
|
230
230
|
var o = function() {
|
|
@@ -237,37 +237,37 @@ function _r() {
|
|
|
237
237
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
238
238
|
try {
|
|
239
239
|
Reflect.construct(o, []);
|
|
240
|
-
} catch (
|
|
241
|
-
n =
|
|
240
|
+
} catch (T) {
|
|
241
|
+
n = T;
|
|
242
242
|
}
|
|
243
243
|
Reflect.construct(e, [], o);
|
|
244
244
|
} else {
|
|
245
245
|
try {
|
|
246
246
|
o.call();
|
|
247
|
-
} catch (
|
|
248
|
-
n =
|
|
247
|
+
} catch (T) {
|
|
248
|
+
n = T;
|
|
249
249
|
}
|
|
250
250
|
e.call(o.prototype);
|
|
251
251
|
}
|
|
252
252
|
} else {
|
|
253
253
|
try {
|
|
254
254
|
throw Error();
|
|
255
|
-
} catch (
|
|
256
|
-
n =
|
|
255
|
+
} catch (T) {
|
|
256
|
+
n = T;
|
|
257
257
|
}
|
|
258
258
|
e();
|
|
259
259
|
}
|
|
260
|
-
} catch (
|
|
261
|
-
if (
|
|
262
|
-
for (var a =
|
|
263
|
-
`),
|
|
264
|
-
`), d = a.length - 1, p =
|
|
260
|
+
} catch (T) {
|
|
261
|
+
if (T && n && typeof T.stack == "string") {
|
|
262
|
+
for (var a = T.stack.split(`
|
|
263
|
+
`), g = n.stack.split(`
|
|
264
|
+
`), d = a.length - 1, p = g.length - 1; d >= 1 && p >= 0 && a[d] !== g[p]; )
|
|
265
265
|
p--;
|
|
266
266
|
for (; d >= 1 && p >= 0; d--, p--)
|
|
267
|
-
if (a[d] !==
|
|
267
|
+
if (a[d] !== g[p]) {
|
|
268
268
|
if (d !== 1 || p !== 1)
|
|
269
269
|
do
|
|
270
|
-
if (d--, p--, p < 0 || a[d] !==
|
|
270
|
+
if (d--, p--, p < 0 || a[d] !== g[p]) {
|
|
271
271
|
var O = `
|
|
272
272
|
` + a[d].replace(" at new ", " at ");
|
|
273
273
|
return e.displayName && O.includes("<anonymous>") && (O = O.replace("<anonymous>", e.displayName)), typeof e == "function" && G.set(e, O), O;
|
|
@@ -277,7 +277,7 @@ function _r() {
|
|
|
277
277
|
}
|
|
278
278
|
}
|
|
279
279
|
} finally {
|
|
280
|
-
|
|
280
|
+
ee = !1, Z.current = f, Me(), Error.prepareStackTrace = u;
|
|
281
281
|
}
|
|
282
282
|
var Y = e ? e.displayName || e.name : "", F = Y ? K(Y) : "";
|
|
283
283
|
return typeof e == "function" && G.set(e, F), F;
|
|
@@ -297,7 +297,7 @@ function _r() {
|
|
|
297
297
|
if (typeof e == "string")
|
|
298
298
|
return K(e);
|
|
299
299
|
switch (e) {
|
|
300
|
-
case
|
|
300
|
+
case j:
|
|
301
301
|
return K("Suspense");
|
|
302
302
|
case b:
|
|
303
303
|
return K("SuspenseList");
|
|
@@ -306,9 +306,9 @@ function _r() {
|
|
|
306
306
|
switch (e.$$typeof) {
|
|
307
307
|
case s:
|
|
308
308
|
return Ne(e.render);
|
|
309
|
-
case
|
|
309
|
+
case E:
|
|
310
310
|
return z(e.type, r, t);
|
|
311
|
-
case
|
|
311
|
+
case w: {
|
|
312
312
|
var n = e, u = n._payload, f = n._init;
|
|
313
313
|
try {
|
|
314
314
|
return z(f(u), r, t);
|
|
@@ -334,8 +334,8 @@ function _r() {
|
|
|
334
334
|
var a = void 0;
|
|
335
335
|
try {
|
|
336
336
|
if (typeof e[o] != "function") {
|
|
337
|
-
var
|
|
338
|
-
throw
|
|
337
|
+
var g = Error((n || "React class") + ": " + t + " type `" + o + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[o] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
338
|
+
throw g.name = "Invariant Violation", g;
|
|
339
339
|
}
|
|
340
340
|
a = e[o](r, o, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
341
341
|
} catch (d) {
|
|
@@ -346,7 +346,7 @@ function _r() {
|
|
|
346
346
|
}
|
|
347
347
|
}
|
|
348
348
|
var qe = Array.isArray;
|
|
349
|
-
function
|
|
349
|
+
function re(e) {
|
|
350
350
|
return qe(e);
|
|
351
351
|
}
|
|
352
352
|
function Ke(e) {
|
|
@@ -374,8 +374,8 @@ function _r() {
|
|
|
374
374
|
ref: !0,
|
|
375
375
|
__self: !0,
|
|
376
376
|
__source: !0
|
|
377
|
-
}, Te, xe,
|
|
378
|
-
|
|
377
|
+
}, Te, xe, te;
|
|
378
|
+
te = {};
|
|
379
379
|
function He(e) {
|
|
380
380
|
if (U.call(e, "ref")) {
|
|
381
381
|
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
@@ -395,7 +395,7 @@ function _r() {
|
|
|
395
395
|
function Ze(e, r) {
|
|
396
396
|
if (typeof e.ref == "string" && N.current && r && N.current.stateNode !== r) {
|
|
397
397
|
var t = k(N.current.type);
|
|
398
|
-
|
|
398
|
+
te[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(N.current.type), e.ref), te[t] = !0);
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
401
|
function Qe(e, r) {
|
|
@@ -423,7 +423,7 @@ function _r() {
|
|
|
423
423
|
var rr = function(e, r, t, n, u, f, o) {
|
|
424
424
|
var a = {
|
|
425
425
|
// This tag allows us to uniquely identify this as a React Element
|
|
426
|
-
$$typeof:
|
|
426
|
+
$$typeof: h,
|
|
427
427
|
// Built-in properties that belong on the element
|
|
428
428
|
type: e,
|
|
429
429
|
key: r,
|
|
@@ -451,8 +451,8 @@ function _r() {
|
|
|
451
451
|
};
|
|
452
452
|
function tr(e, r, t, n, u) {
|
|
453
453
|
{
|
|
454
|
-
var f, o = {}, a = null,
|
|
455
|
-
t !== void 0 && (_e(t), a = "" + t), Xe(r) && (_e(r.key), a = "" + r.key), He(r) && (
|
|
454
|
+
var f, o = {}, a = null, g = null;
|
|
455
|
+
t !== void 0 && (_e(t), a = "" + t), Xe(r) && (_e(r.key), a = "" + r.key), He(r) && (g = r.ref, Ze(r, u));
|
|
456
456
|
for (f in r)
|
|
457
457
|
U.call(r, f) && !ze.hasOwnProperty(f) && (o[f] = r[f]);
|
|
458
458
|
if (e && e.defaultProps) {
|
|
@@ -460,14 +460,14 @@ function _r() {
|
|
|
460
460
|
for (f in d)
|
|
461
461
|
o[f] === void 0 && (o[f] = d[f]);
|
|
462
462
|
}
|
|
463
|
-
if (a ||
|
|
463
|
+
if (a || g) {
|
|
464
464
|
var p = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
465
|
-
a && Qe(o, p),
|
|
465
|
+
a && Qe(o, p), g && er(o, p);
|
|
466
466
|
}
|
|
467
|
-
return rr(e, a,
|
|
467
|
+
return rr(e, a, g, u, n, N.current, o);
|
|
468
468
|
}
|
|
469
469
|
}
|
|
470
|
-
var
|
|
470
|
+
var ne = l.ReactCurrentOwner, Se = l.ReactDebugCurrentFrame;
|
|
471
471
|
function W(e) {
|
|
472
472
|
if (e) {
|
|
473
473
|
var r = e._owner, t = z(e.type, e._source, r ? r.type : null);
|
|
@@ -475,15 +475,15 @@ function _r() {
|
|
|
475
475
|
} else
|
|
476
476
|
Se.setExtraStackFrame(null);
|
|
477
477
|
}
|
|
478
|
-
var
|
|
479
|
-
|
|
480
|
-
function
|
|
481
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
478
|
+
var ae;
|
|
479
|
+
ae = !1;
|
|
480
|
+
function oe(e) {
|
|
481
|
+
return typeof e == "object" && e !== null && e.$$typeof === h;
|
|
482
482
|
}
|
|
483
483
|
function Pe() {
|
|
484
484
|
{
|
|
485
|
-
if (
|
|
486
|
-
var e = k(
|
|
485
|
+
if (ne.current) {
|
|
486
|
+
var e = k(ne.current.type);
|
|
487
487
|
if (e)
|
|
488
488
|
return `
|
|
489
489
|
|
|
@@ -518,25 +518,25 @@ Check the top-level render call using <` + t + ">.");
|
|
|
518
518
|
return;
|
|
519
519
|
we[t] = !0;
|
|
520
520
|
var n = "";
|
|
521
|
-
e && e._owner && e._owner !==
|
|
521
|
+
e && e._owner && e._owner !== ne.current && (n = " It was passed a child from " + k(e._owner.type) + "."), W(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), W(null);
|
|
522
522
|
}
|
|
523
523
|
}
|
|
524
524
|
function Ce(e, r) {
|
|
525
525
|
{
|
|
526
526
|
if (typeof e != "object")
|
|
527
527
|
return;
|
|
528
|
-
if (
|
|
528
|
+
if (re(e))
|
|
529
529
|
for (var t = 0; t < e.length; t++) {
|
|
530
530
|
var n = e[t];
|
|
531
|
-
|
|
531
|
+
oe(n) && Oe(n, r);
|
|
532
532
|
}
|
|
533
|
-
else if (
|
|
533
|
+
else if (oe(e))
|
|
534
534
|
e._store && (e._store.validated = !0);
|
|
535
535
|
else if (e) {
|
|
536
536
|
var u = S(e);
|
|
537
537
|
if (typeof u == "function" && u !== e.entries)
|
|
538
538
|
for (var f = u.call(e), o; !(o = f.next()).done; )
|
|
539
|
-
|
|
539
|
+
oe(o.value) && Oe(o.value, r);
|
|
540
540
|
}
|
|
541
541
|
}
|
|
542
542
|
}
|
|
@@ -550,15 +550,15 @@ Check the top-level render call using <` + t + ">.");
|
|
|
550
550
|
t = r.propTypes;
|
|
551
551
|
else if (typeof r == "object" && (r.$$typeof === s || // Note: Memo only checks outer props here.
|
|
552
552
|
// Inner props are checked in the reconciler.
|
|
553
|
-
r.$$typeof ===
|
|
553
|
+
r.$$typeof === E))
|
|
554
554
|
t = r.propTypes;
|
|
555
555
|
else
|
|
556
556
|
return;
|
|
557
557
|
if (t) {
|
|
558
558
|
var n = k(r);
|
|
559
559
|
Je(t, e.props, "prop", n, e);
|
|
560
|
-
} else if (r.PropTypes !== void 0 && !
|
|
561
|
-
|
|
560
|
+
} else if (r.PropTypes !== void 0 && !ae) {
|
|
561
|
+
ae = !0;
|
|
562
562
|
var u = k(r);
|
|
563
563
|
c("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", u || "Unknown");
|
|
564
564
|
}
|
|
@@ -584,10 +584,10 @@ Check the top-level render call using <` + t + ">.");
|
|
|
584
584
|
if (!o) {
|
|
585
585
|
var a = "";
|
|
586
586
|
(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.");
|
|
587
|
-
var
|
|
588
|
-
|
|
587
|
+
var g = nr();
|
|
588
|
+
g ? a += g : a += Pe();
|
|
589
589
|
var d;
|
|
590
|
-
e === null ? d = "null" :
|
|
590
|
+
e === null ? d = "null" : re(e) ? d = "array" : e !== void 0 && e.$$typeof === h ? (d = "<" + (k(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : d = 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", d, a);
|
|
591
591
|
}
|
|
592
592
|
var p = tr(e, r, t, u, f);
|
|
593
593
|
if (p == null)
|
|
@@ -596,7 +596,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
596
596
|
var O = r.children;
|
|
597
597
|
if (O !== void 0)
|
|
598
598
|
if (n)
|
|
599
|
-
if (
|
|
599
|
+
if (re(O)) {
|
|
600
600
|
for (var Y = 0; Y < O.length; Y++)
|
|
601
601
|
Ce(O[Y], e);
|
|
602
602
|
Object.freeze && Object.freeze(O);
|
|
@@ -606,17 +606,17 @@ Check the top-level render call using <` + t + ">.");
|
|
|
606
606
|
Ce(O, e);
|
|
607
607
|
}
|
|
608
608
|
if (U.call(r, "key")) {
|
|
609
|
-
var F = k(e),
|
|
609
|
+
var F = k(e), T = Object.keys(r).filter(function(dr) {
|
|
610
610
|
return dr !== "key";
|
|
611
|
-
}),
|
|
612
|
-
if (!je[F +
|
|
613
|
-
var lr =
|
|
611
|
+
}), ie = T.length > 0 ? "{key: someKey, " + T.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
612
|
+
if (!je[F + ie]) {
|
|
613
|
+
var lr = T.length > 0 ? "{" + T.join(": ..., ") + ": ...}" : "{}";
|
|
614
614
|
c(`A props object containing a "key" prop is being spread into JSX:
|
|
615
615
|
let props = %s;
|
|
616
616
|
<%s {...props} />
|
|
617
617
|
React keys must be passed directly to JSX without using spread:
|
|
618
618
|
let props = %s;
|
|
619
|
-
<%s key={someKey} {...props} />`,
|
|
619
|
+
<%s key={someKey} {...props} />`, ie, F, lr, F), je[F + ie] = !0;
|
|
620
620
|
}
|
|
621
621
|
}
|
|
622
622
|
return e === m ? ir(p) : or(p), p;
|
|
@@ -636,17 +636,17 @@ process.env.NODE_ENV === "production" ? ue.exports = hr() : ue.exports = _r();
|
|
|
636
636
|
var Tr = ue.exports;
|
|
637
637
|
function kr(R) {
|
|
638
638
|
if (typeof Proxy > "u") throw new Error("Proxy is not supported in this environment.");
|
|
639
|
-
const
|
|
639
|
+
const h = vr(
|
|
640
640
|
void 0
|
|
641
641
|
);
|
|
642
|
-
return
|
|
642
|
+
return h.name = R, h;
|
|
643
643
|
}
|
|
644
644
|
function xr(R) {
|
|
645
645
|
if (Array.isArray(R)) {
|
|
646
|
-
const [
|
|
647
|
-
return (m,
|
|
648
|
-
if (m !==
|
|
649
|
-
let y =
|
|
646
|
+
const [h, ...C] = R;
|
|
647
|
+
return (m, x, _) => {
|
|
648
|
+
if (m !== h) return !1;
|
|
649
|
+
let y = x, i = _;
|
|
650
650
|
for (const s of C)
|
|
651
651
|
y = y == null ? void 0 : y[s], i = i == null ? void 0 : i[s];
|
|
652
652
|
return y !== i;
|
|
@@ -657,14 +657,14 @@ function xr(R) {
|
|
|
657
657
|
function Dr(R) {
|
|
658
658
|
return gr(
|
|
659
659
|
({
|
|
660
|
-
children:
|
|
660
|
+
children: h,
|
|
661
661
|
value: C,
|
|
662
662
|
onChangeProp: m,
|
|
663
|
-
onChangeReinit:
|
|
664
|
-
proxyRef:
|
|
663
|
+
onChangeReinit: x,
|
|
664
|
+
proxyRef: _
|
|
665
665
|
}) => {
|
|
666
|
-
const y =
|
|
667
|
-
pr(
|
|
666
|
+
const y = X({}), i = X(), s = X({}), j = Rr();
|
|
667
|
+
pr(_, () => i.current, [i.current]);
|
|
668
668
|
const b = B((v, S, l) => {
|
|
669
669
|
const c = mr();
|
|
670
670
|
return y.current[c] = {
|
|
@@ -673,9 +673,9 @@ function Dr(R) {
|
|
|
673
673
|
propCallback: v,
|
|
674
674
|
reinitCallback: S
|
|
675
675
|
}, c;
|
|
676
|
-
}, []),
|
|
676
|
+
}, []), E = B((v) => {
|
|
677
677
|
delete y.current[v];
|
|
678
|
-
}, []),
|
|
678
|
+
}, []), w = B((v, S, l) => {
|
|
679
679
|
Object.values(y.current).forEach((c) => {
|
|
680
680
|
var D;
|
|
681
681
|
const P = (D = c.deps) == null ? void 0 : D.map(xr);
|
|
@@ -686,8 +686,8 @@ function Dr(R) {
|
|
|
686
686
|
}, [m]), I = B((v, S) => {
|
|
687
687
|
Object.values(y.current).forEach((l) => {
|
|
688
688
|
l.reinitCallback(v, S);
|
|
689
|
-
}), L(
|
|
690
|
-
}, [
|
|
689
|
+
}), L(x) && x(v, S);
|
|
690
|
+
}, [x]), V = B((v) => {
|
|
691
691
|
if (v !== i.current) {
|
|
692
692
|
const S = i.current;
|
|
693
693
|
v !== null ? i.current = new Proxy(v, {
|
|
@@ -697,40 +697,40 @@ function Dr(R) {
|
|
|
697
697
|
},
|
|
698
698
|
set: function(l, c, P) {
|
|
699
699
|
const D = c, $ = l[D];
|
|
700
|
-
return Reflect.set(l, D, P, v), P = l[D],
|
|
700
|
+
return Reflect.set(l, D, P, v), P = l[D], w(D, P, $), !0;
|
|
701
701
|
}
|
|
702
|
-
}) : i.current = v, I(i.current, S),
|
|
702
|
+
}) : i.current = v, I(i.current, S), j();
|
|
703
703
|
}
|
|
704
704
|
return s.current.obj = i.current, i.current;
|
|
705
|
-
}, [m,
|
|
706
|
-
return i.current === void 0 && (i.current = V(C)), s.current.obj = i.current, s.current.set = V, s.current.subscribe = b, s.current.unsubscribe =
|
|
705
|
+
}, [m, x, w]);
|
|
706
|
+
return i.current === void 0 && (i.current = V(C)), s.current.obj = i.current, s.current.set = V, s.current.subscribe = b, s.current.unsubscribe = E, /* @__PURE__ */ Tr.jsx(R.Provider, { value: s.current, children: h });
|
|
707
707
|
},
|
|
708
708
|
["children", "onChangeProp", "onChangeReinit", "proxyRef"],
|
|
709
709
|
R.name + ".Provider"
|
|
710
710
|
);
|
|
711
711
|
}
|
|
712
|
-
function Ar(R,
|
|
713
|
-
const
|
|
714
|
-
if (
|
|
712
|
+
function Ar(R, h = [], C, m, x = !0) {
|
|
713
|
+
const _ = br(R);
|
|
714
|
+
if (_ === void 0)
|
|
715
715
|
throw new Error(`No ${R.name} provider found.`);
|
|
716
|
-
const y =
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
(
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
(
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
() =>
|
|
730
|
-
() =>
|
|
716
|
+
const y = X((s) => {
|
|
717
|
+
const j = _.subscribe(
|
|
718
|
+
(b, E, w) => {
|
|
719
|
+
s(), L(C) && C(b, E, w);
|
|
720
|
+
},
|
|
721
|
+
(b, E) => {
|
|
722
|
+
x && s(), L(m) && m(b, E);
|
|
723
|
+
},
|
|
724
|
+
h
|
|
725
|
+
);
|
|
726
|
+
return () => _.unsubscribe(j);
|
|
727
|
+
}), i = yr(
|
|
728
|
+
y.current,
|
|
729
|
+
() => _,
|
|
730
|
+
() => _
|
|
731
731
|
);
|
|
732
732
|
return new Er(
|
|
733
|
-
{ value:
|
|
733
|
+
{ value: i.obj, set: i.set },
|
|
734
734
|
["value", "set"]
|
|
735
735
|
);
|
|
736
736
|
}
|