@ptolemy2002/react-proxy-context 2.3.6 → 2.5.0
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/README.md +46 -20
- package/dist/main.d.ts +20 -9
- package/dist/main.js +409 -376
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import mr from "
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
1
|
+
var dr = Object.defineProperty;
|
|
2
|
+
var pr = (h, a, c) => a in h ? dr(h, a, { enumerable: !0, configurable: !0, writable: !0, value: c }) : h[a] = c;
|
|
3
|
+
var X = (h, a, c) => pr(h, typeof a != "symbol" ? a + "" : a, c);
|
|
4
|
+
import Oe, { createContext as br, useRef as Ce, useImperativeHandle as hr, useEffect as yr, useContext as mr, useCallback as Er, useSyncExternalStore as gr } from "react";
|
|
5
|
+
import { nanoid as _r } from "nanoid";
|
|
6
|
+
import Y from "is-callable";
|
|
7
|
+
import Rr from "@ptolemy2002/react-force-rerender";
|
|
8
|
+
import Tr from "@ptolemy2002/react-hook-result";
|
|
9
|
+
import { partialMemo as Sr } from "@ptolemy2002/react-utils";
|
|
10
|
+
var Q = { exports: {} }, $ = {};
|
|
8
11
|
/**
|
|
9
12
|
* @license React
|
|
10
13
|
* react-jsx-runtime.production.min.js
|
|
@@ -14,21 +17,21 @@ var oe = { exports: {} }, B = {};
|
|
|
14
17
|
* This source code is licensed under the MIT license found in the
|
|
15
18
|
* LICENSE file in the root directory of this source tree.
|
|
16
19
|
*/
|
|
17
|
-
var
|
|
18
|
-
function
|
|
19
|
-
if (
|
|
20
|
-
|
|
21
|
-
var
|
|
22
|
-
function
|
|
23
|
-
var
|
|
24
|
-
|
|
25
|
-
for (
|
|
26
|
-
if (
|
|
27
|
-
return { $$typeof:
|
|
20
|
+
var Pe;
|
|
21
|
+
function xr() {
|
|
22
|
+
if (Pe) return $;
|
|
23
|
+
Pe = 1;
|
|
24
|
+
var h = Oe, a = Symbol.for("react.element"), c = Symbol.for("react.fragment"), p = Object.prototype.hasOwnProperty, s = h.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, b = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
25
|
+
function i(v, d, x) {
|
|
26
|
+
var E, T = {}, P = null, k = null;
|
|
27
|
+
x !== void 0 && (P = "" + x), d.key !== void 0 && (P = "" + d.key), d.ref !== void 0 && (k = d.ref);
|
|
28
|
+
for (E in d) p.call(d, E) && !b.hasOwnProperty(E) && (T[E] = d[E]);
|
|
29
|
+
if (v && v.defaultProps) for (E in d = v.defaultProps, d) T[E] === void 0 && (T[E] = d[E]);
|
|
30
|
+
return { $$typeof: a, type: v, key: P, ref: k, props: T, _owner: s.current };
|
|
28
31
|
}
|
|
29
|
-
return
|
|
32
|
+
return $.Fragment = c, $.jsx = i, $.jsxs = i, $;
|
|
30
33
|
}
|
|
31
|
-
var
|
|
34
|
+
var W = {};
|
|
32
35
|
/**
|
|
33
36
|
* @license React
|
|
34
37
|
* react-jsx-runtime.development.js
|
|
@@ -38,91 +41,91 @@ var J = {};
|
|
|
38
41
|
* This source code is licensed under the MIT license found in the
|
|
39
42
|
* LICENSE file in the root directory of this source tree.
|
|
40
43
|
*/
|
|
41
|
-
var
|
|
42
|
-
function
|
|
43
|
-
return
|
|
44
|
-
var
|
|
45
|
-
function
|
|
44
|
+
var we;
|
|
45
|
+
function Pr() {
|
|
46
|
+
return we || (we = 1, process.env.NODE_ENV !== "production" && function() {
|
|
47
|
+
var h = Oe, a = Symbol.for("react.element"), c = Symbol.for("react.portal"), p = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), b = Symbol.for("react.profiler"), i = Symbol.for("react.provider"), v = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), x = Symbol.for("react.suspense"), E = Symbol.for("react.suspense_list"), T = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), k = Symbol.for("react.offscreen"), ee = Symbol.iterator, ke = "@@iterator";
|
|
48
|
+
function je(e) {
|
|
46
49
|
if (e === null || typeof e != "object")
|
|
47
50
|
return null;
|
|
48
|
-
var r =
|
|
51
|
+
var r = ee && e[ee] || e[ke];
|
|
49
52
|
return typeof r == "function" ? r : null;
|
|
50
53
|
}
|
|
51
|
-
var
|
|
52
|
-
function
|
|
54
|
+
var j = h.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
55
|
+
function g(e) {
|
|
53
56
|
{
|
|
54
57
|
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
|
|
55
58
|
t[n - 1] = arguments[n];
|
|
56
|
-
|
|
59
|
+
De("error", e, t);
|
|
57
60
|
}
|
|
58
61
|
}
|
|
59
|
-
function
|
|
62
|
+
function De(e, r, t) {
|
|
60
63
|
{
|
|
61
|
-
var n =
|
|
62
|
-
|
|
63
|
-
var
|
|
64
|
-
return String(
|
|
64
|
+
var n = j.ReactDebugCurrentFrame, l = n.getStackAddendum();
|
|
65
|
+
l !== "" && (r += "%s", t = t.concat([l]));
|
|
66
|
+
var f = t.map(function(u) {
|
|
67
|
+
return String(u);
|
|
65
68
|
});
|
|
66
|
-
|
|
69
|
+
f.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, f);
|
|
67
70
|
}
|
|
68
71
|
}
|
|
69
|
-
var
|
|
70
|
-
|
|
71
|
-
function
|
|
72
|
-
return !!(typeof e == "string" || typeof e == "function" || e ===
|
|
72
|
+
var Fe = !1, Ae = !1, Ie = !1, $e = !1, We = !1, re;
|
|
73
|
+
re = Symbol.for("react.module.reference");
|
|
74
|
+
function Ye(e) {
|
|
75
|
+
return !!(typeof e == "string" || typeof e == "function" || e === p || e === b || We || e === s || e === x || e === E || $e || e === k || Fe || Ae || Ie || typeof e == "object" && e !== null && (e.$$typeof === P || e.$$typeof === T || e.$$typeof === i || e.$$typeof === v || e.$$typeof === d || // This needs to include all possible module reference object
|
|
73
76
|
// types supported by any Flight configuration anywhere since
|
|
74
77
|
// we don't know which Flight build this will end up being used
|
|
75
78
|
// with.
|
|
76
|
-
e.$$typeof ===
|
|
79
|
+
e.$$typeof === re || e.getModuleId !== void 0));
|
|
77
80
|
}
|
|
78
|
-
function
|
|
81
|
+
function Ve(e, r, t) {
|
|
79
82
|
var n = e.displayName;
|
|
80
83
|
if (n)
|
|
81
84
|
return n;
|
|
82
|
-
var
|
|
83
|
-
return
|
|
85
|
+
var l = r.displayName || r.name || "";
|
|
86
|
+
return l !== "" ? t + "(" + l + ")" : t;
|
|
84
87
|
}
|
|
85
|
-
function
|
|
88
|
+
function te(e) {
|
|
86
89
|
return e.displayName || "Context";
|
|
87
90
|
}
|
|
88
|
-
function
|
|
91
|
+
function w(e) {
|
|
89
92
|
if (e == null)
|
|
90
93
|
return null;
|
|
91
|
-
if (typeof e.tag == "number" &&
|
|
94
|
+
if (typeof e.tag == "number" && g("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
92
95
|
return e.displayName || e.name || null;
|
|
93
96
|
if (typeof e == "string")
|
|
94
97
|
return e;
|
|
95
98
|
switch (e) {
|
|
96
|
-
case
|
|
99
|
+
case p:
|
|
97
100
|
return "Fragment";
|
|
98
|
-
case
|
|
101
|
+
case c:
|
|
99
102
|
return "Portal";
|
|
100
|
-
case
|
|
103
|
+
case b:
|
|
101
104
|
return "Profiler";
|
|
102
|
-
case
|
|
105
|
+
case s:
|
|
103
106
|
return "StrictMode";
|
|
104
|
-
case
|
|
107
|
+
case x:
|
|
105
108
|
return "Suspense";
|
|
106
|
-
case
|
|
109
|
+
case E:
|
|
107
110
|
return "SuspenseList";
|
|
108
111
|
}
|
|
109
112
|
if (typeof e == "object")
|
|
110
113
|
switch (e.$$typeof) {
|
|
111
|
-
case
|
|
114
|
+
case v:
|
|
112
115
|
var r = e;
|
|
113
|
-
return
|
|
114
|
-
case
|
|
116
|
+
return te(r) + ".Consumer";
|
|
117
|
+
case i:
|
|
115
118
|
var t = e;
|
|
116
|
-
return
|
|
117
|
-
case
|
|
118
|
-
return
|
|
119
|
-
case
|
|
119
|
+
return te(t._context) + ".Provider";
|
|
120
|
+
case d:
|
|
121
|
+
return Ve(e, e.render, "ForwardRef");
|
|
122
|
+
case T:
|
|
120
123
|
var n = e.displayName || null;
|
|
121
|
-
return n !== null ? n :
|
|
122
|
-
case
|
|
123
|
-
var
|
|
124
|
+
return n !== null ? n : w(e.type) || "Memo";
|
|
125
|
+
case P: {
|
|
126
|
+
var l = e, f = l._payload, u = l._init;
|
|
124
127
|
try {
|
|
125
|
-
return
|
|
128
|
+
return w(u(f));
|
|
126
129
|
} catch {
|
|
127
130
|
return null;
|
|
128
131
|
}
|
|
@@ -130,18 +133,18 @@ function hr() {
|
|
|
130
133
|
}
|
|
131
134
|
return null;
|
|
132
135
|
}
|
|
133
|
-
var
|
|
134
|
-
function
|
|
136
|
+
var O = Object.assign, A = 0, ne, ae, ie, oe, ue, se, ce;
|
|
137
|
+
function le() {
|
|
135
138
|
}
|
|
136
|
-
|
|
137
|
-
function
|
|
139
|
+
le.__reactDisabledLog = !0;
|
|
140
|
+
function Le() {
|
|
138
141
|
{
|
|
139
|
-
if (
|
|
140
|
-
|
|
142
|
+
if (A === 0) {
|
|
143
|
+
ne = console.log, ae = console.info, ie = console.warn, oe = console.error, ue = console.group, se = console.groupCollapsed, ce = console.groupEnd;
|
|
141
144
|
var e = {
|
|
142
145
|
configurable: !0,
|
|
143
146
|
enumerable: !0,
|
|
144
|
-
value:
|
|
147
|
+
value: le,
|
|
145
148
|
writable: !0
|
|
146
149
|
};
|
|
147
150
|
Object.defineProperties(console, {
|
|
@@ -154,250 +157,250 @@ function hr() {
|
|
|
154
157
|
groupEnd: e
|
|
155
158
|
});
|
|
156
159
|
}
|
|
157
|
-
|
|
160
|
+
A++;
|
|
158
161
|
}
|
|
159
162
|
}
|
|
160
|
-
function
|
|
163
|
+
function Me() {
|
|
161
164
|
{
|
|
162
|
-
if (
|
|
165
|
+
if (A--, A === 0) {
|
|
163
166
|
var e = {
|
|
164
167
|
configurable: !0,
|
|
165
168
|
enumerable: !0,
|
|
166
169
|
writable: !0
|
|
167
170
|
};
|
|
168
171
|
Object.defineProperties(console, {
|
|
169
|
-
log:
|
|
170
|
-
value:
|
|
172
|
+
log: O({}, e, {
|
|
173
|
+
value: ne
|
|
171
174
|
}),
|
|
172
|
-
info:
|
|
173
|
-
value:
|
|
175
|
+
info: O({}, e, {
|
|
176
|
+
value: ae
|
|
174
177
|
}),
|
|
175
|
-
warn:
|
|
176
|
-
value:
|
|
178
|
+
warn: O({}, e, {
|
|
179
|
+
value: ie
|
|
177
180
|
}),
|
|
178
|
-
error:
|
|
179
|
-
value:
|
|
181
|
+
error: O({}, e, {
|
|
182
|
+
value: oe
|
|
180
183
|
}),
|
|
181
|
-
group:
|
|
182
|
-
value:
|
|
184
|
+
group: O({}, e, {
|
|
185
|
+
value: ue
|
|
183
186
|
}),
|
|
184
|
-
groupCollapsed:
|
|
185
|
-
value:
|
|
187
|
+
groupCollapsed: O({}, e, {
|
|
188
|
+
value: se
|
|
186
189
|
}),
|
|
187
|
-
groupEnd:
|
|
188
|
-
value:
|
|
190
|
+
groupEnd: O({}, e, {
|
|
191
|
+
value: ce
|
|
189
192
|
})
|
|
190
193
|
});
|
|
191
194
|
}
|
|
192
|
-
|
|
195
|
+
A < 0 && g("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
193
196
|
}
|
|
194
197
|
}
|
|
195
|
-
var
|
|
196
|
-
function
|
|
198
|
+
var N = j.ReactCurrentDispatcher, B;
|
|
199
|
+
function V(e, r, t) {
|
|
197
200
|
{
|
|
198
|
-
if (
|
|
201
|
+
if (B === void 0)
|
|
199
202
|
try {
|
|
200
203
|
throw Error();
|
|
201
|
-
} catch (
|
|
202
|
-
var n =
|
|
203
|
-
|
|
204
|
+
} catch (l) {
|
|
205
|
+
var n = l.stack.trim().match(/\n( *(at )?)/);
|
|
206
|
+
B = n && n[1] || "";
|
|
204
207
|
}
|
|
205
208
|
return `
|
|
206
|
-
` +
|
|
209
|
+
` + B + e;
|
|
207
210
|
}
|
|
208
211
|
}
|
|
209
|
-
var
|
|
212
|
+
var J = !1, L;
|
|
210
213
|
{
|
|
211
|
-
var
|
|
212
|
-
|
|
214
|
+
var Ue = typeof WeakMap == "function" ? WeakMap : Map;
|
|
215
|
+
L = new Ue();
|
|
213
216
|
}
|
|
214
|
-
function
|
|
215
|
-
if (!e ||
|
|
217
|
+
function fe(e, r) {
|
|
218
|
+
if (!e || J)
|
|
216
219
|
return "";
|
|
217
220
|
{
|
|
218
|
-
var t =
|
|
221
|
+
var t = L.get(e);
|
|
219
222
|
if (t !== void 0)
|
|
220
223
|
return t;
|
|
221
224
|
}
|
|
222
225
|
var n;
|
|
223
|
-
|
|
224
|
-
var
|
|
226
|
+
J = !0;
|
|
227
|
+
var l = Error.prepareStackTrace;
|
|
225
228
|
Error.prepareStackTrace = void 0;
|
|
226
|
-
var
|
|
227
|
-
|
|
229
|
+
var f;
|
|
230
|
+
f = N.current, N.current = null, Le();
|
|
228
231
|
try {
|
|
229
232
|
if (r) {
|
|
230
|
-
var
|
|
233
|
+
var u = function() {
|
|
231
234
|
throw Error();
|
|
232
235
|
};
|
|
233
|
-
if (Object.defineProperty(
|
|
236
|
+
if (Object.defineProperty(u.prototype, "props", {
|
|
234
237
|
set: function() {
|
|
235
238
|
throw Error();
|
|
236
239
|
}
|
|
237
240
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
238
241
|
try {
|
|
239
|
-
Reflect.construct(
|
|
240
|
-
} catch (
|
|
241
|
-
n =
|
|
242
|
+
Reflect.construct(u, []);
|
|
243
|
+
} catch (R) {
|
|
244
|
+
n = R;
|
|
242
245
|
}
|
|
243
|
-
Reflect.construct(e, [],
|
|
246
|
+
Reflect.construct(e, [], u);
|
|
244
247
|
} else {
|
|
245
248
|
try {
|
|
246
|
-
|
|
247
|
-
} catch (
|
|
248
|
-
n =
|
|
249
|
+
u.call();
|
|
250
|
+
} catch (R) {
|
|
251
|
+
n = R;
|
|
249
252
|
}
|
|
250
|
-
e.call(
|
|
253
|
+
e.call(u.prototype);
|
|
251
254
|
}
|
|
252
255
|
} else {
|
|
253
256
|
try {
|
|
254
257
|
throw Error();
|
|
255
|
-
} catch (
|
|
256
|
-
n =
|
|
258
|
+
} catch (R) {
|
|
259
|
+
n = R;
|
|
257
260
|
}
|
|
258
261
|
e();
|
|
259
262
|
}
|
|
260
|
-
} catch (
|
|
261
|
-
if (
|
|
262
|
-
for (var
|
|
263
|
-
`),
|
|
264
|
-
`),
|
|
265
|
-
|
|
266
|
-
for (;
|
|
267
|
-
if (
|
|
268
|
-
if (
|
|
263
|
+
} catch (R) {
|
|
264
|
+
if (R && n && typeof R.stack == "string") {
|
|
265
|
+
for (var o = R.stack.split(`
|
|
266
|
+
`), _ = n.stack.split(`
|
|
267
|
+
`), y = o.length - 1, m = _.length - 1; y >= 1 && m >= 0 && o[y] !== _[m]; )
|
|
268
|
+
m--;
|
|
269
|
+
for (; y >= 1 && m >= 0; y--, m--)
|
|
270
|
+
if (o[y] !== _[m]) {
|
|
271
|
+
if (y !== 1 || m !== 1)
|
|
269
272
|
do
|
|
270
|
-
if (
|
|
271
|
-
var
|
|
272
|
-
` +
|
|
273
|
-
return e.displayName &&
|
|
273
|
+
if (y--, m--, m < 0 || o[y] !== _[m]) {
|
|
274
|
+
var S = `
|
|
275
|
+
` + o[y].replace(" at new ", " at ");
|
|
276
|
+
return e.displayName && S.includes("<anonymous>") && (S = S.replace("<anonymous>", e.displayName)), typeof e == "function" && L.set(e, S), S;
|
|
274
277
|
}
|
|
275
|
-
while (
|
|
278
|
+
while (y >= 1 && m >= 0);
|
|
276
279
|
break;
|
|
277
280
|
}
|
|
278
281
|
}
|
|
279
282
|
} finally {
|
|
280
|
-
|
|
283
|
+
J = !1, N.current = f, Me(), Error.prepareStackTrace = l;
|
|
281
284
|
}
|
|
282
|
-
var
|
|
283
|
-
return typeof e == "function" &&
|
|
285
|
+
var F = e ? e.displayName || e.name : "", C = F ? V(F) : "";
|
|
286
|
+
return typeof e == "function" && L.set(e, C), C;
|
|
284
287
|
}
|
|
285
|
-
function
|
|
286
|
-
return
|
|
288
|
+
function Ne(e, r, t) {
|
|
289
|
+
return fe(e, !1);
|
|
287
290
|
}
|
|
288
|
-
function
|
|
291
|
+
function Be(e) {
|
|
289
292
|
var r = e.prototype;
|
|
290
293
|
return !!(r && r.isReactComponent);
|
|
291
294
|
}
|
|
292
|
-
function
|
|
295
|
+
function M(e, r, t) {
|
|
293
296
|
if (e == null)
|
|
294
297
|
return "";
|
|
295
298
|
if (typeof e == "function")
|
|
296
|
-
return
|
|
299
|
+
return fe(e, Be(e));
|
|
297
300
|
if (typeof e == "string")
|
|
298
|
-
return
|
|
301
|
+
return V(e);
|
|
299
302
|
switch (e) {
|
|
300
|
-
case
|
|
301
|
-
return
|
|
302
|
-
case
|
|
303
|
-
return
|
|
303
|
+
case x:
|
|
304
|
+
return V("Suspense");
|
|
305
|
+
case E:
|
|
306
|
+
return V("SuspenseList");
|
|
304
307
|
}
|
|
305
308
|
if (typeof e == "object")
|
|
306
309
|
switch (e.$$typeof) {
|
|
307
|
-
case
|
|
308
|
-
return
|
|
309
|
-
case
|
|
310
|
-
return
|
|
311
|
-
case
|
|
312
|
-
var n = e,
|
|
310
|
+
case d:
|
|
311
|
+
return Ne(e.render);
|
|
312
|
+
case T:
|
|
313
|
+
return M(e.type, r, t);
|
|
314
|
+
case P: {
|
|
315
|
+
var n = e, l = n._payload, f = n._init;
|
|
313
316
|
try {
|
|
314
|
-
return
|
|
317
|
+
return M(f(l), r, t);
|
|
315
318
|
} catch {
|
|
316
319
|
}
|
|
317
320
|
}
|
|
318
321
|
}
|
|
319
322
|
return "";
|
|
320
323
|
}
|
|
321
|
-
var
|
|
322
|
-
function
|
|
324
|
+
var I = Object.prototype.hasOwnProperty, ve = {}, de = j.ReactDebugCurrentFrame;
|
|
325
|
+
function U(e) {
|
|
323
326
|
if (e) {
|
|
324
|
-
var r = e._owner, t =
|
|
325
|
-
|
|
327
|
+
var r = e._owner, t = M(e.type, e._source, r ? r.type : null);
|
|
328
|
+
de.setExtraStackFrame(t);
|
|
326
329
|
} else
|
|
327
|
-
|
|
330
|
+
de.setExtraStackFrame(null);
|
|
328
331
|
}
|
|
329
|
-
function
|
|
332
|
+
function Je(e, r, t, n, l) {
|
|
330
333
|
{
|
|
331
|
-
var
|
|
332
|
-
for (var
|
|
333
|
-
if (
|
|
334
|
-
var
|
|
334
|
+
var f = Function.call.bind(I);
|
|
335
|
+
for (var u in e)
|
|
336
|
+
if (f(e, u)) {
|
|
337
|
+
var o = void 0;
|
|
335
338
|
try {
|
|
336
|
-
if (typeof e[
|
|
337
|
-
var
|
|
338
|
-
throw
|
|
339
|
+
if (typeof e[u] != "function") {
|
|
340
|
+
var _ = 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`.");
|
|
341
|
+
throw _.name = "Invariant Violation", _;
|
|
339
342
|
}
|
|
340
|
-
|
|
341
|
-
} catch (
|
|
342
|
-
|
|
343
|
+
o = e[u](r, u, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
344
|
+
} catch (y) {
|
|
345
|
+
o = y;
|
|
343
346
|
}
|
|
344
|
-
|
|
347
|
+
o && !(o instanceof Error) && (U(l), g("%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), U(null)), o instanceof Error && !(o.message in ve) && (ve[o.message] = !0, U(l), g("Failed %s type: %s", t, o.message), U(null));
|
|
345
348
|
}
|
|
346
349
|
}
|
|
347
350
|
}
|
|
348
|
-
var
|
|
349
|
-
function
|
|
350
|
-
return
|
|
351
|
+
var qe = Array.isArray;
|
|
352
|
+
function q(e) {
|
|
353
|
+
return qe(e);
|
|
351
354
|
}
|
|
352
|
-
function
|
|
355
|
+
function Ke(e) {
|
|
353
356
|
{
|
|
354
357
|
var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
355
358
|
return t;
|
|
356
359
|
}
|
|
357
360
|
}
|
|
358
|
-
function
|
|
361
|
+
function Ge(e) {
|
|
359
362
|
try {
|
|
360
|
-
return
|
|
363
|
+
return pe(e), !1;
|
|
361
364
|
} catch {
|
|
362
365
|
return !0;
|
|
363
366
|
}
|
|
364
367
|
}
|
|
365
|
-
function
|
|
368
|
+
function pe(e) {
|
|
366
369
|
return "" + e;
|
|
367
370
|
}
|
|
368
|
-
function
|
|
369
|
-
if (
|
|
370
|
-
return
|
|
371
|
+
function be(e) {
|
|
372
|
+
if (Ge(e))
|
|
373
|
+
return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ke(e)), pe(e);
|
|
371
374
|
}
|
|
372
|
-
var he =
|
|
375
|
+
var he = j.ReactCurrentOwner, ze = {
|
|
373
376
|
key: !0,
|
|
374
377
|
ref: !0,
|
|
375
378
|
__self: !0,
|
|
376
379
|
__source: !0
|
|
377
|
-
},
|
|
378
|
-
function
|
|
379
|
-
if (
|
|
380
|
+
}, ye, me;
|
|
381
|
+
function He(e) {
|
|
382
|
+
if (I.call(e, "ref")) {
|
|
380
383
|
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
381
384
|
if (r && r.isReactWarning)
|
|
382
385
|
return !1;
|
|
383
386
|
}
|
|
384
387
|
return e.ref !== void 0;
|
|
385
388
|
}
|
|
386
|
-
function
|
|
387
|
-
if (
|
|
389
|
+
function Xe(e) {
|
|
390
|
+
if (I.call(e, "key")) {
|
|
388
391
|
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
389
392
|
if (r && r.isReactWarning)
|
|
390
393
|
return !1;
|
|
391
394
|
}
|
|
392
395
|
return e.key !== void 0;
|
|
393
396
|
}
|
|
394
|
-
function
|
|
397
|
+
function Ze(e, r) {
|
|
395
398
|
typeof e.ref == "string" && he.current;
|
|
396
399
|
}
|
|
397
|
-
function
|
|
400
|
+
function Qe(e, r) {
|
|
398
401
|
{
|
|
399
402
|
var t = function() {
|
|
400
|
-
|
|
403
|
+
ye || (ye = !0, g("%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));
|
|
401
404
|
};
|
|
402
405
|
t.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
403
406
|
get: t,
|
|
@@ -405,10 +408,10 @@ function hr() {
|
|
|
405
408
|
});
|
|
406
409
|
}
|
|
407
410
|
}
|
|
408
|
-
function
|
|
411
|
+
function er(e, r) {
|
|
409
412
|
{
|
|
410
413
|
var t = function() {
|
|
411
|
-
|
|
414
|
+
me || (me = !0, g("%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));
|
|
412
415
|
};
|
|
413
416
|
t.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
414
417
|
get: t,
|
|
@@ -416,70 +419,70 @@ function hr() {
|
|
|
416
419
|
});
|
|
417
420
|
}
|
|
418
421
|
}
|
|
419
|
-
var
|
|
420
|
-
var
|
|
422
|
+
var rr = function(e, r, t, n, l, f, u) {
|
|
423
|
+
var o = {
|
|
421
424
|
// This tag allows us to uniquely identify this as a React Element
|
|
422
|
-
$$typeof:
|
|
425
|
+
$$typeof: a,
|
|
423
426
|
// Built-in properties that belong on the element
|
|
424
427
|
type: e,
|
|
425
428
|
key: r,
|
|
426
429
|
ref: t,
|
|
427
|
-
props:
|
|
430
|
+
props: u,
|
|
428
431
|
// Record the component responsible for creating this element.
|
|
429
|
-
_owner:
|
|
432
|
+
_owner: f
|
|
430
433
|
};
|
|
431
|
-
return
|
|
434
|
+
return o._store = {}, Object.defineProperty(o._store, "validated", {
|
|
432
435
|
configurable: !1,
|
|
433
436
|
enumerable: !1,
|
|
434
437
|
writable: !0,
|
|
435
438
|
value: !1
|
|
436
|
-
}), Object.defineProperty(
|
|
439
|
+
}), Object.defineProperty(o, "_self", {
|
|
437
440
|
configurable: !1,
|
|
438
441
|
enumerable: !1,
|
|
439
442
|
writable: !1,
|
|
440
443
|
value: n
|
|
441
|
-
}), Object.defineProperty(
|
|
444
|
+
}), Object.defineProperty(o, "_source", {
|
|
442
445
|
configurable: !1,
|
|
443
446
|
enumerable: !1,
|
|
444
447
|
writable: !1,
|
|
445
|
-
value:
|
|
446
|
-
}), Object.freeze && (Object.freeze(
|
|
448
|
+
value: l
|
|
449
|
+
}), Object.freeze && (Object.freeze(o.props), Object.freeze(o)), o;
|
|
447
450
|
};
|
|
448
|
-
function
|
|
451
|
+
function tr(e, r, t, n, l) {
|
|
449
452
|
{
|
|
450
|
-
var
|
|
451
|
-
t !== void 0 && (
|
|
452
|
-
for (
|
|
453
|
-
|
|
453
|
+
var f, u = {}, o = null, _ = null;
|
|
454
|
+
t !== void 0 && (be(t), o = "" + t), Xe(r) && (be(r.key), o = "" + r.key), He(r) && (_ = r.ref, Ze(r, l));
|
|
455
|
+
for (f in r)
|
|
456
|
+
I.call(r, f) && !ze.hasOwnProperty(f) && (u[f] = r[f]);
|
|
454
457
|
if (e && e.defaultProps) {
|
|
455
|
-
var
|
|
456
|
-
for (
|
|
457
|
-
|
|
458
|
+
var y = e.defaultProps;
|
|
459
|
+
for (f in y)
|
|
460
|
+
u[f] === void 0 && (u[f] = y[f]);
|
|
458
461
|
}
|
|
459
|
-
if (
|
|
460
|
-
var
|
|
461
|
-
|
|
462
|
+
if (o || _) {
|
|
463
|
+
var m = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
464
|
+
o && Qe(u, m), _ && er(u, m);
|
|
462
465
|
}
|
|
463
|
-
return
|
|
466
|
+
return rr(e, o, _, l, n, he.current, u);
|
|
464
467
|
}
|
|
465
468
|
}
|
|
466
|
-
var
|
|
467
|
-
function
|
|
469
|
+
var K = j.ReactCurrentOwner, Ee = j.ReactDebugCurrentFrame;
|
|
470
|
+
function D(e) {
|
|
468
471
|
if (e) {
|
|
469
|
-
var r = e._owner, t =
|
|
470
|
-
|
|
472
|
+
var r = e._owner, t = M(e.type, e._source, r ? r.type : null);
|
|
473
|
+
Ee.setExtraStackFrame(t);
|
|
471
474
|
} else
|
|
472
|
-
|
|
475
|
+
Ee.setExtraStackFrame(null);
|
|
473
476
|
}
|
|
474
|
-
var
|
|
475
|
-
|
|
476
|
-
function
|
|
477
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
477
|
+
var G;
|
|
478
|
+
G = !1;
|
|
479
|
+
function z(e) {
|
|
480
|
+
return typeof e == "object" && e !== null && e.$$typeof === a;
|
|
478
481
|
}
|
|
479
|
-
function
|
|
482
|
+
function ge() {
|
|
480
483
|
{
|
|
481
|
-
if (
|
|
482
|
-
var e =
|
|
484
|
+
if (K.current) {
|
|
485
|
+
var e = w(K.current.type);
|
|
483
486
|
if (e)
|
|
484
487
|
return `
|
|
485
488
|
|
|
@@ -488,13 +491,13 @@ Check the render method of \`` + e + "`.";
|
|
|
488
491
|
return "";
|
|
489
492
|
}
|
|
490
493
|
}
|
|
491
|
-
function
|
|
494
|
+
function nr(e) {
|
|
492
495
|
return "";
|
|
493
496
|
}
|
|
494
|
-
var
|
|
495
|
-
function
|
|
497
|
+
var _e = {};
|
|
498
|
+
function ar(e) {
|
|
496
499
|
{
|
|
497
|
-
var r =
|
|
500
|
+
var r = ge();
|
|
498
501
|
if (!r) {
|
|
499
502
|
var t = typeof e == "string" ? e : e.displayName || e.name;
|
|
500
503
|
t && (r = `
|
|
@@ -504,39 +507,39 @@ Check the top-level render call using <` + t + ">.");
|
|
|
504
507
|
return r;
|
|
505
508
|
}
|
|
506
509
|
}
|
|
507
|
-
function
|
|
510
|
+
function Re(e, r) {
|
|
508
511
|
{
|
|
509
512
|
if (!e._store || e._store.validated || e.key != null)
|
|
510
513
|
return;
|
|
511
514
|
e._store.validated = !0;
|
|
512
|
-
var t =
|
|
513
|
-
if (
|
|
515
|
+
var t = ar(r);
|
|
516
|
+
if (_e[t])
|
|
514
517
|
return;
|
|
515
|
-
|
|
518
|
+
_e[t] = !0;
|
|
516
519
|
var n = "";
|
|
517
|
-
e && e._owner && e._owner !==
|
|
520
|
+
e && e._owner && e._owner !== K.current && (n = " It was passed a child from " + w(e._owner.type) + "."), D(e), g('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), D(null);
|
|
518
521
|
}
|
|
519
522
|
}
|
|
520
|
-
function
|
|
523
|
+
function Te(e, r) {
|
|
521
524
|
{
|
|
522
525
|
if (typeof e != "object")
|
|
523
526
|
return;
|
|
524
|
-
if (
|
|
527
|
+
if (q(e))
|
|
525
528
|
for (var t = 0; t < e.length; t++) {
|
|
526
529
|
var n = e[t];
|
|
527
|
-
|
|
530
|
+
z(n) && Re(n, r);
|
|
528
531
|
}
|
|
529
|
-
else if (
|
|
532
|
+
else if (z(e))
|
|
530
533
|
e._store && (e._store.validated = !0);
|
|
531
534
|
else if (e) {
|
|
532
|
-
var
|
|
533
|
-
if (typeof
|
|
534
|
-
for (var
|
|
535
|
-
|
|
535
|
+
var l = je(e);
|
|
536
|
+
if (typeof l == "function" && l !== e.entries)
|
|
537
|
+
for (var f = l.call(e), u; !(u = f.next()).done; )
|
|
538
|
+
z(u.value) && Re(u.value, r);
|
|
536
539
|
}
|
|
537
540
|
}
|
|
538
541
|
}
|
|
539
|
-
function
|
|
542
|
+
function ir(e) {
|
|
540
543
|
{
|
|
541
544
|
var r = e.type;
|
|
542
545
|
if (r == null || typeof r == "string")
|
|
@@ -544,21 +547,21 @@ Check the top-level render call using <` + t + ">.");
|
|
|
544
547
|
var t;
|
|
545
548
|
if (typeof r == "function")
|
|
546
549
|
t = r.propTypes;
|
|
547
|
-
else if (typeof r == "object" && (r.$$typeof ===
|
|
550
|
+
else if (typeof r == "object" && (r.$$typeof === d || // Note: Memo only checks outer props here.
|
|
548
551
|
// Inner props are checked in the reconciler.
|
|
549
|
-
r.$$typeof ===
|
|
552
|
+
r.$$typeof === T))
|
|
550
553
|
t = r.propTypes;
|
|
551
554
|
else
|
|
552
555
|
return;
|
|
553
556
|
if (t) {
|
|
554
|
-
var n =
|
|
555
|
-
|
|
556
|
-
} else if (r.PropTypes !== void 0 && !
|
|
557
|
-
|
|
558
|
-
var
|
|
559
|
-
|
|
557
|
+
var n = w(r);
|
|
558
|
+
Je(t, e.props, "prop", n, e);
|
|
559
|
+
} else if (r.PropTypes !== void 0 && !G) {
|
|
560
|
+
G = !0;
|
|
561
|
+
var l = w(r);
|
|
562
|
+
g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", l || "Unknown");
|
|
560
563
|
}
|
|
561
|
-
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved &&
|
|
564
|
+
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
562
565
|
}
|
|
563
566
|
}
|
|
564
567
|
function or(e) {
|
|
@@ -566,173 +569,203 @@ Check the top-level render call using <` + t + ">.");
|
|
|
566
569
|
for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
|
|
567
570
|
var n = r[t];
|
|
568
571
|
if (n !== "children" && n !== "key") {
|
|
569
|
-
|
|
572
|
+
D(e), g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), D(null);
|
|
570
573
|
break;
|
|
571
574
|
}
|
|
572
575
|
}
|
|
573
|
-
e.ref !== null && (
|
|
576
|
+
e.ref !== null && (D(e), g("Invalid attribute `ref` supplied to `React.Fragment`."), D(null));
|
|
574
577
|
}
|
|
575
578
|
}
|
|
576
|
-
var
|
|
577
|
-
function
|
|
579
|
+
var Se = {};
|
|
580
|
+
function xe(e, r, t, n, l, f) {
|
|
578
581
|
{
|
|
579
|
-
var
|
|
580
|
-
if (!
|
|
581
|
-
var
|
|
582
|
-
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (
|
|
583
|
-
var
|
|
584
|
-
|
|
585
|
-
var
|
|
586
|
-
e === null ?
|
|
582
|
+
var u = Ye(e);
|
|
583
|
+
if (!u) {
|
|
584
|
+
var o = "";
|
|
585
|
+
(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.");
|
|
586
|
+
var _ = nr();
|
|
587
|
+
_ ? o += _ : o += ge();
|
|
588
|
+
var y;
|
|
589
|
+
e === null ? y = "null" : q(e) ? y = "array" : e !== void 0 && e.$$typeof === a ? (y = "<" + (w(e.type) || "Unknown") + " />", o = " Did you accidentally export a JSX literal instead of a component?") : y = typeof e, g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", y, o);
|
|
587
590
|
}
|
|
588
|
-
var
|
|
589
|
-
if (
|
|
590
|
-
return
|
|
591
|
-
if (
|
|
592
|
-
var
|
|
593
|
-
if (
|
|
591
|
+
var m = tr(e, r, t, l, f);
|
|
592
|
+
if (m == null)
|
|
593
|
+
return m;
|
|
594
|
+
if (u) {
|
|
595
|
+
var S = r.children;
|
|
596
|
+
if (S !== void 0)
|
|
594
597
|
if (n)
|
|
595
|
-
if (
|
|
596
|
-
for (var
|
|
597
|
-
|
|
598
|
-
Object.freeze && Object.freeze(
|
|
598
|
+
if (q(S)) {
|
|
599
|
+
for (var F = 0; F < S.length; F++)
|
|
600
|
+
Te(S[F], e);
|
|
601
|
+
Object.freeze && Object.freeze(S);
|
|
599
602
|
} else
|
|
600
|
-
|
|
603
|
+
g("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
601
604
|
else
|
|
602
|
-
|
|
605
|
+
Te(S, e);
|
|
603
606
|
}
|
|
604
|
-
if (
|
|
605
|
-
var
|
|
606
|
-
return
|
|
607
|
-
}),
|
|
608
|
-
if (!
|
|
609
|
-
var fr =
|
|
610
|
-
|
|
607
|
+
if (I.call(r, "key")) {
|
|
608
|
+
var C = w(e), R = Object.keys(r).filter(function(vr) {
|
|
609
|
+
return vr !== "key";
|
|
610
|
+
}), H = R.length > 0 ? "{key: someKey, " + R.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
611
|
+
if (!Se[C + H]) {
|
|
612
|
+
var fr = R.length > 0 ? "{" + R.join(": ..., ") + ": ...}" : "{}";
|
|
613
|
+
g(`A props object containing a "key" prop is being spread into JSX:
|
|
611
614
|
let props = %s;
|
|
612
615
|
<%s {...props} />
|
|
613
616
|
React keys must be passed directly to JSX without using spread:
|
|
614
617
|
let props = %s;
|
|
615
|
-
<%s key={someKey} {...props} />`,
|
|
618
|
+
<%s key={someKey} {...props} />`, H, C, fr, C), Se[C + H] = !0;
|
|
616
619
|
}
|
|
617
620
|
}
|
|
618
|
-
return e ===
|
|
621
|
+
return e === p ? or(m) : ir(m), m;
|
|
619
622
|
}
|
|
620
623
|
}
|
|
621
|
-
function ir(e, r, t) {
|
|
622
|
-
return je(e, r, t, !0);
|
|
623
|
-
}
|
|
624
624
|
function ur(e, r, t) {
|
|
625
|
-
return
|
|
625
|
+
return xe(e, r, t, !0);
|
|
626
626
|
}
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
627
|
+
function sr(e, r, t) {
|
|
628
|
+
return xe(e, r, t, !1);
|
|
629
|
+
}
|
|
630
|
+
var cr = sr, lr = ur;
|
|
631
|
+
W.Fragment = p, W.jsx = cr, W.jsxs = lr;
|
|
632
|
+
}()), W;
|
|
630
633
|
}
|
|
631
|
-
process.env.NODE_ENV === "production" ?
|
|
632
|
-
var
|
|
633
|
-
function
|
|
634
|
+
process.env.NODE_ENV === "production" ? Q.exports = xr() : Q.exports = Pr();
|
|
635
|
+
var wr = Q.exports;
|
|
636
|
+
function $r(h) {
|
|
634
637
|
if (typeof Proxy > "u") throw new Error("Proxy is not supported in this environment.");
|
|
635
|
-
const
|
|
638
|
+
const a = br(
|
|
636
639
|
void 0
|
|
637
640
|
);
|
|
638
|
-
return
|
|
641
|
+
return a.name = h, a;
|
|
639
642
|
}
|
|
640
|
-
function
|
|
641
|
-
if (Array.isArray(
|
|
642
|
-
const [
|
|
643
|
-
return (
|
|
644
|
-
if (
|
|
645
|
-
let
|
|
646
|
-
for (const
|
|
647
|
-
|
|
648
|
-
return
|
|
643
|
+
function Or(h) {
|
|
644
|
+
if (Array.isArray(h)) {
|
|
645
|
+
const [a, ...c] = h;
|
|
646
|
+
return (p, s, b) => {
|
|
647
|
+
if (p !== a) return !1;
|
|
648
|
+
let i = s, v = b;
|
|
649
|
+
for (const d of c)
|
|
650
|
+
i = i == null ? void 0 : i[d], v = v == null ? void 0 : v[d];
|
|
651
|
+
return i !== v;
|
|
649
652
|
};
|
|
650
653
|
}
|
|
651
|
-
return
|
|
654
|
+
return h;
|
|
652
655
|
}
|
|
653
|
-
|
|
654
|
-
|
|
656
|
+
class Z {
|
|
657
|
+
constructor(a) {
|
|
658
|
+
X(this, "value");
|
|
659
|
+
X(this, "changeSubscribers", {});
|
|
660
|
+
this.set(a);
|
|
661
|
+
}
|
|
662
|
+
subscribe(a, c, p) {
|
|
663
|
+
const s = _r();
|
|
664
|
+
return this.changeSubscribers[s] = {
|
|
665
|
+
id: s,
|
|
666
|
+
deps: p,
|
|
667
|
+
propCallback: a,
|
|
668
|
+
reinitCallback: c
|
|
669
|
+
}, s;
|
|
670
|
+
}
|
|
671
|
+
unsubscribe(a) {
|
|
672
|
+
delete this.changeSubscribers[a];
|
|
673
|
+
}
|
|
674
|
+
emitChange(a, c, p) {
|
|
675
|
+
Object.values(this.changeSubscribers).forEach((s) => {
|
|
676
|
+
var i;
|
|
677
|
+
const b = (i = s.deps) == null ? void 0 : i.map(Or);
|
|
678
|
+
(!b || b.includes(a) && p !== c || b.some(
|
|
679
|
+
(v) => Y(v) && v(a, c, p, this.value)
|
|
680
|
+
)) && s.propCallback(a, c, p);
|
|
681
|
+
});
|
|
682
|
+
}
|
|
683
|
+
emitReinit(a, c, p = !1) {
|
|
684
|
+
Object.values(this.changeSubscribers).forEach((s) => {
|
|
685
|
+
s.reinitCallback(a, c, p);
|
|
686
|
+
});
|
|
687
|
+
}
|
|
688
|
+
get() {
|
|
689
|
+
return this.value;
|
|
690
|
+
}
|
|
691
|
+
set(a) {
|
|
692
|
+
const c = this;
|
|
693
|
+
if (a !== this.value) {
|
|
694
|
+
const p = this.value;
|
|
695
|
+
a != null ? this.value = new Proxy(a, {
|
|
696
|
+
get: function(s, b) {
|
|
697
|
+
const i = Reflect.get(s, b, a);
|
|
698
|
+
return Y(i) ? i.bind(c.value) : i;
|
|
699
|
+
},
|
|
700
|
+
set: (s, b, i) => {
|
|
701
|
+
const v = b, d = s[v];
|
|
702
|
+
return Reflect.set(s, v, i, a), i = s[v], this.emitChange(v, i, d), !0;
|
|
703
|
+
}
|
|
704
|
+
}) : this.value = a, this.emitReinit(this.value, p);
|
|
705
|
+
}
|
|
706
|
+
return this.value;
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
function Wr(h) {
|
|
710
|
+
return Sr(
|
|
655
711
|
({
|
|
656
|
-
children:
|
|
657
|
-
value:
|
|
658
|
-
onChangeProp:
|
|
659
|
-
onChangeReinit:
|
|
660
|
-
proxyRef:
|
|
712
|
+
children: a,
|
|
713
|
+
value: c,
|
|
714
|
+
onChangeProp: p,
|
|
715
|
+
onChangeReinit: s,
|
|
716
|
+
proxyRef: b
|
|
661
717
|
}) => {
|
|
662
|
-
const
|
|
663
|
-
|
|
664
|
-
const
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
(!O || O.includes(p) && d !== S || O.some(
|
|
679
|
-
($) => L($) && $(p, S, d, i.current)
|
|
680
|
-
)) && f.propCallback(p, S, d);
|
|
681
|
-
}), L(y) && y(p, S, d);
|
|
682
|
-
}, [y]), D = V((p, S) => {
|
|
683
|
-
Object.values(l.current).forEach((d) => {
|
|
684
|
-
d.reinitCallback(p, S);
|
|
685
|
-
}), L(T) && T(p, S);
|
|
686
|
-
}, [T]), M = V((p) => {
|
|
687
|
-
if (p !== i.current) {
|
|
688
|
-
const S = i.current;
|
|
689
|
-
p !== null ? i.current = new Proxy(p, {
|
|
690
|
-
get: function(d, f) {
|
|
691
|
-
const O = Reflect.get(d, f, p);
|
|
692
|
-
return L(O) ? O.bind(i.current) : O;
|
|
693
|
-
},
|
|
694
|
-
set: function(d, f, O) {
|
|
695
|
-
const k = f, $ = d[k];
|
|
696
|
-
return Reflect.set(d, k, O, p), O = d[k], x(k, O, $), !0;
|
|
697
|
-
}
|
|
698
|
-
}) : i.current = p, D(i.current, S), j();
|
|
699
|
-
}
|
|
700
|
-
return s.current.obj = i.current, i.current;
|
|
701
|
-
}, [y, T, x]);
|
|
702
|
-
return i.current === void 0 && (i.current = M(C)), s.current.obj = i.current, s.current.set = M, s.current.subscribe = m, s.current.unsubscribe = h, /* @__PURE__ */ gr.jsx(R.Provider, { value: s.current, children: _ });
|
|
718
|
+
const i = Ce(void 0);
|
|
719
|
+
i.current === void 0 && (i.current = c instanceof Z ? c : new Z(c), s == null || s(i.current.get(), c instanceof Z ? c.get() : void 0, !0));
|
|
720
|
+
const v = Rr();
|
|
721
|
+
return hr(b, () => i.current.get(), [i.current.get()]), yr(() => {
|
|
722
|
+
const d = i.current.subscribe(
|
|
723
|
+
p ?? (() => {
|
|
724
|
+
}),
|
|
725
|
+
(...x) => {
|
|
726
|
+
Y(s) && s(...x), v();
|
|
727
|
+
},
|
|
728
|
+
null
|
|
729
|
+
);
|
|
730
|
+
return () => {
|
|
731
|
+
i.current.unsubscribe(d);
|
|
732
|
+
};
|
|
733
|
+
}, [p, s, v]), /* @__PURE__ */ wr.jsx(h.Provider, { value: i.current, children: a });
|
|
703
734
|
},
|
|
704
735
|
["children", "onChangeProp", "onChangeReinit", "proxyRef"],
|
|
705
|
-
|
|
736
|
+
h.name + ".Provider"
|
|
706
737
|
);
|
|
707
738
|
}
|
|
708
|
-
function
|
|
709
|
-
const
|
|
710
|
-
if (
|
|
711
|
-
throw new Error(`No ${
|
|
712
|
-
const
|
|
713
|
-
const
|
|
714
|
-
(
|
|
715
|
-
|
|
739
|
+
function Yr(h, a = [], c, p, s = !0) {
|
|
740
|
+
const b = mr(h);
|
|
741
|
+
if (b === void 0)
|
|
742
|
+
throw new Error(`No ${h.name} provider found.`);
|
|
743
|
+
const i = Ce({ value: b }), v = Er((x) => {
|
|
744
|
+
const E = b.subscribe(
|
|
745
|
+
(T, P, k) => {
|
|
746
|
+
i.current = { value: b }, x(), Y(c) && c(T, P, k);
|
|
716
747
|
},
|
|
717
|
-
(
|
|
718
|
-
|
|
748
|
+
(T, P) => {
|
|
749
|
+
s && (i.current = { value: b }, x()), Y(p) && p(T, P);
|
|
719
750
|
},
|
|
720
|
-
|
|
751
|
+
a
|
|
721
752
|
);
|
|
722
|
-
return () =>
|
|
723
|
-
}, [
|
|
724
|
-
|
|
725
|
-
() =>
|
|
726
|
-
() =>
|
|
753
|
+
return () => b.unsubscribe(E);
|
|
754
|
+
}, [a, s, c, p, b]), d = gr(
|
|
755
|
+
v,
|
|
756
|
+
() => i.current,
|
|
757
|
+
() => i.current
|
|
727
758
|
);
|
|
728
|
-
return new
|
|
729
|
-
|
|
759
|
+
return new Tr(
|
|
760
|
+
// The binding is necessary to fix a strange issue I'm having.
|
|
761
|
+
{ value: d.value.get(), set: d.value.set.bind(d.value) },
|
|
730
762
|
["value", "set"]
|
|
731
763
|
);
|
|
732
764
|
}
|
|
733
765
|
export {
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
766
|
+
Z as ProxyContextValueWrapper,
|
|
767
|
+
$r as createProxyContext,
|
|
768
|
+
Wr as createProxyContextProvider,
|
|
769
|
+
Or as evaluateDependency,
|
|
770
|
+
Yr as useProxyContext
|
|
738
771
|
};
|