@texonom/nreact 1.6.6 → 1.6.8

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.
@@ -1,1360 +1 @@
1
- import { a as e, i as t, n, o as r, r as i, t as a } from "../rolldown-runtime-CEFd7nDs.js";
2
- //#region ../../node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.production.min.js
3
- var o = /* @__PURE__ */ a(((e) => {
4
- var t = typeof Symbol == "function" && Symbol.for, n = t ? Symbol.for("react.element") : 60103, r = t ? Symbol.for("react.portal") : 60106, i = t ? Symbol.for("react.fragment") : 60107, a = t ? Symbol.for("react.strict_mode") : 60108, o = t ? Symbol.for("react.profiler") : 60114, s = t ? Symbol.for("react.provider") : 60109, c = t ? Symbol.for("react.context") : 60110, l = t ? Symbol.for("react.async_mode") : 60111, u = t ? Symbol.for("react.concurrent_mode") : 60111, d = t ? Symbol.for("react.forward_ref") : 60112, f = t ? Symbol.for("react.suspense") : 60113, p = t ? Symbol.for("react.suspense_list") : 60120, m = t ? Symbol.for("react.memo") : 60115, h = t ? Symbol.for("react.lazy") : 60116, g = t ? Symbol.for("react.block") : 60121, _ = t ? Symbol.for("react.fundamental") : 60117, v = t ? Symbol.for("react.responder") : 60118, y = t ? Symbol.for("react.scope") : 60119;
5
- function b(e) {
6
- if (typeof e == "object" && e) {
7
- var t = e.$$typeof;
8
- switch (t) {
9
- case n: switch (e = e.type, e) {
10
- case l:
11
- case u:
12
- case i:
13
- case o:
14
- case a:
15
- case f: return e;
16
- default: switch (e = e && e.$$typeof, e) {
17
- case c:
18
- case d:
19
- case h:
20
- case m:
21
- case s: return e;
22
- default: return t;
23
- }
24
- }
25
- case r: return t;
26
- }
27
- }
28
- }
29
- function x(e) {
30
- return b(e) === u;
31
- }
32
- e.AsyncMode = l, e.ConcurrentMode = u, e.ContextConsumer = c, e.ContextProvider = s, e.Element = n, e.ForwardRef = d, e.Fragment = i, e.Lazy = h, e.Memo = m, e.Portal = r, e.Profiler = o, e.StrictMode = a, e.Suspense = f, e.isAsyncMode = function(e) {
33
- return x(e) || b(e) === l;
34
- }, e.isConcurrentMode = x, e.isContextConsumer = function(e) {
35
- return b(e) === c;
36
- }, e.isContextProvider = function(e) {
37
- return b(e) === s;
38
- }, e.isElement = function(e) {
39
- return typeof e == "object" && !!e && e.$$typeof === n;
40
- }, e.isForwardRef = function(e) {
41
- return b(e) === d;
42
- }, e.isFragment = function(e) {
43
- return b(e) === i;
44
- }, e.isLazy = function(e) {
45
- return b(e) === h;
46
- }, e.isMemo = function(e) {
47
- return b(e) === m;
48
- }, e.isPortal = function(e) {
49
- return b(e) === r;
50
- }, e.isProfiler = function(e) {
51
- return b(e) === o;
52
- }, e.isStrictMode = function(e) {
53
- return b(e) === a;
54
- }, e.isSuspense = function(e) {
55
- return b(e) === f;
56
- }, e.isValidElementType = function(e) {
57
- return typeof e == "string" || typeof e == "function" || e === i || e === u || e === o || e === a || e === f || e === p || typeof e == "object" && !!e && (e.$$typeof === h || e.$$typeof === m || e.$$typeof === s || e.$$typeof === c || e.$$typeof === d || e.$$typeof === _ || e.$$typeof === v || e.$$typeof === y || e.$$typeof === g);
58
- }, e.typeOf = b;
59
- })), s = /* @__PURE__ */ a(((e) => {
60
- process.env.NODE_ENV !== "production" && (function() {
61
- var t = typeof Symbol == "function" && Symbol.for, n = t ? Symbol.for("react.element") : 60103, r = t ? Symbol.for("react.portal") : 60106, i = t ? Symbol.for("react.fragment") : 60107, a = t ? Symbol.for("react.strict_mode") : 60108, o = t ? Symbol.for("react.profiler") : 60114, s = t ? Symbol.for("react.provider") : 60109, c = t ? Symbol.for("react.context") : 60110, l = t ? Symbol.for("react.async_mode") : 60111, u = t ? Symbol.for("react.concurrent_mode") : 60111, d = t ? Symbol.for("react.forward_ref") : 60112, f = t ? Symbol.for("react.suspense") : 60113, p = t ? Symbol.for("react.suspense_list") : 60120, m = t ? Symbol.for("react.memo") : 60115, h = t ? Symbol.for("react.lazy") : 60116, g = t ? Symbol.for("react.block") : 60121, _ = t ? Symbol.for("react.fundamental") : 60117, v = t ? Symbol.for("react.responder") : 60118, y = t ? Symbol.for("react.scope") : 60119;
62
- function b(e) {
63
- return typeof e == "string" || typeof e == "function" || e === i || e === u || e === o || e === a || e === f || e === p || typeof e == "object" && !!e && (e.$$typeof === h || e.$$typeof === m || e.$$typeof === s || e.$$typeof === c || e.$$typeof === d || e.$$typeof === _ || e.$$typeof === v || e.$$typeof === y || e.$$typeof === g);
64
- }
65
- function x(e) {
66
- if (typeof e == "object" && e) {
67
- var t = e.$$typeof;
68
- switch (t) {
69
- case n:
70
- var p = e.type;
71
- switch (p) {
72
- case l:
73
- case u:
74
- case i:
75
- case o:
76
- case a:
77
- case f: return p;
78
- default:
79
- var g = p && p.$$typeof;
80
- switch (g) {
81
- case c:
82
- case d:
83
- case h:
84
- case m:
85
- case s: return g;
86
- default: return t;
87
- }
88
- }
89
- case r: return t;
90
- }
91
- }
92
- }
93
- var S = l, C = u, w = c, T = s, E = n, D = d, O = i, k = h, A = m, j = r, M = o, N = a, P = f, F = !1;
94
- function I(e) {
95
- return F || (F = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), L(e) || x(e) === l;
96
- }
97
- function L(e) {
98
- return x(e) === u;
99
- }
100
- function R(e) {
101
- return x(e) === c;
102
- }
103
- function z(e) {
104
- return x(e) === s;
105
- }
106
- function B(e) {
107
- return typeof e == "object" && !!e && e.$$typeof === n;
108
- }
109
- function V(e) {
110
- return x(e) === d;
111
- }
112
- function H(e) {
113
- return x(e) === i;
114
- }
115
- function U(e) {
116
- return x(e) === h;
117
- }
118
- function W(e) {
119
- return x(e) === m;
120
- }
121
- function G(e) {
122
- return x(e) === r;
123
- }
124
- function K(e) {
125
- return x(e) === o;
126
- }
127
- function q(e) {
128
- return x(e) === a;
129
- }
130
- function J(e) {
131
- return x(e) === f;
132
- }
133
- e.AsyncMode = S, e.ConcurrentMode = C, e.ContextConsumer = w, e.ContextProvider = T, e.Element = E, e.ForwardRef = D, e.Fragment = O, e.Lazy = k, e.Memo = A, e.Portal = j, e.Profiler = M, e.StrictMode = N, e.Suspense = P, e.isAsyncMode = I, e.isConcurrentMode = L, e.isContextConsumer = R, e.isContextProvider = z, e.isElement = B, e.isForwardRef = V, e.isFragment = H, e.isLazy = U, e.isMemo = W, e.isPortal = G, e.isProfiler = K, e.isStrictMode = q, e.isSuspense = J, e.isValidElementType = b, e.typeOf = x;
134
- })();
135
- })), c = /* @__PURE__ */ a(((e, t) => {
136
- t.exports = process.env.NODE_ENV === "production" ? o() : s();
137
- })), l = /* @__PURE__ */ a(((e, t) => {
138
- var n = Object.getOwnPropertySymbols, r = Object.prototype.hasOwnProperty, i = Object.prototype.propertyIsEnumerable;
139
- function a(e) {
140
- if (e == null) throw TypeError("Object.assign cannot be called with null or undefined");
141
- return Object(e);
142
- }
143
- function o() {
144
- try {
145
- if (!Object.assign) return !1;
146
- var e = /* @__PURE__ */ new String("abc");
147
- if (e[5] = "de", Object.getOwnPropertyNames(e)[0] === "5") return !1;
148
- for (var t = {}, n = 0; n < 10; n++) t["_" + String.fromCharCode(n)] = n;
149
- if (Object.getOwnPropertyNames(t).map(function(e) {
150
- return t[e];
151
- }).join("") !== "0123456789") return !1;
152
- var r = {};
153
- return "abcdefghijklmnopqrst".split("").forEach(function(e) {
154
- r[e] = e;
155
- }), Object.keys(Object.assign({}, r)).join("") === "abcdefghijklmnopqrst";
156
- } catch (e) {
157
- return !1;
158
- }
159
- }
160
- t.exports = o() ? Object.assign : function(e, t) {
161
- for (var o, s = a(e), c, l = 1; l < arguments.length; l++) {
162
- for (var u in o = Object(arguments[l]), o) r.call(o, u) && (s[u] = o[u]);
163
- if (n) {
164
- c = n(o);
165
- for (var d = 0; d < c.length; d++) i.call(o, c[d]) && (s[c[d]] = o[c[d]]);
166
- }
167
- }
168
- return s;
169
- };
170
- })), u = /* @__PURE__ */ a(((e, t) => {
171
- t.exports = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
172
- })), d = /* @__PURE__ */ a(((e, t) => {
173
- t.exports = Function.call.bind(Object.prototype.hasOwnProperty);
174
- })), f = /* @__PURE__ */ a(((e, t) => {
175
- var n = function() {};
176
- if (process.env.NODE_ENV !== "production") {
177
- var r = u(), i = {}, a = d();
178
- n = function(e) {
179
- var t = "Warning: " + e;
180
- typeof console < "u" && console.error(t);
181
- try {
182
- throw Error(t);
183
- } catch (e) {}
184
- };
185
- }
186
- function o(e, t, o, s, c) {
187
- if (process.env.NODE_ENV !== "production") {
188
- for (var l in e) if (a(e, l)) {
189
- var u;
190
- try {
191
- if (typeof e[l] != "function") {
192
- var d = Error((s || "React class") + ": " + o + " type `" + l + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[l] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
193
- throw d.name = "Invariant Violation", d;
194
- }
195
- u = e[l](t, l, s, o, null, r);
196
- } catch (e) {
197
- u = e;
198
- }
199
- if (u && !(u instanceof Error) && n((s || "React class") + ": type specification of " + o + " `" + l + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof u + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."), u instanceof Error && !(u.message in i)) {
200
- i[u.message] = !0;
201
- var f = c ? c() : "";
202
- n("Failed " + o + " type: " + u.message + (f == null ? "" : f));
203
- }
204
- }
205
- }
206
- }
207
- o.resetWarningCache = function() {
208
- process.env.NODE_ENV !== "production" && (i = {});
209
- }, t.exports = o;
210
- })), p = /* @__PURE__ */ a(((e, t) => {
211
- var n = c(), r = l(), i = u(), a = d(), o = f(), s = function() {};
212
- process.env.NODE_ENV !== "production" && (s = function(e) {
213
- var t = "Warning: " + e;
214
- typeof console < "u" && console.error(t);
215
- try {
216
- throw Error(t);
217
- } catch (e) {}
218
- });
219
- function p() {
220
- return null;
221
- }
222
- t.exports = function(e, t) {
223
- var c = typeof Symbol == "function" && Symbol.iterator, l = "@@iterator";
224
- function u(e) {
225
- var t = e && (c && e[c] || e[l]);
226
- if (typeof t == "function") return t;
227
- }
228
- var d = "<<anonymous>>", f = {
229
- array: _("array"),
230
- bigint: _("bigint"),
231
- bool: _("boolean"),
232
- func: _("function"),
233
- number: _("number"),
234
- object: _("object"),
235
- string: _("string"),
236
- symbol: _("symbol"),
237
- any: v(),
238
- arrayOf: y,
239
- element: b(),
240
- elementType: x(),
241
- instanceOf: S,
242
- node: E(),
243
- objectOf: w,
244
- oneOf: C,
245
- oneOfType: T,
246
- shape: O,
247
- exact: k
248
- };
249
- function m(e, t) {
250
- return e === t ? e !== 0 || 1 / e == 1 / t : e !== e && t !== t;
251
- }
252
- function h(e, t) {
253
- this.message = e, this.data = t && typeof t == "object" ? t : {}, this.stack = "";
254
- }
255
- h.prototype = Error.prototype;
256
- function g(e) {
257
- if (process.env.NODE_ENV !== "production") var n = {}, r = 0;
258
- function a(a, o, c, l, u, f, p) {
259
- if (l = l || d, f = f || c, p !== i) {
260
- if (t) {
261
- var m = /* @__PURE__ */ Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");
262
- throw m.name = "Invariant Violation", m;
263
- }
264
- if (process.env.NODE_ENV !== "production" && typeof console < "u") {
265
- var g = l + ":" + c;
266
- !n[g] && r < 3 && (s("You are manually calling a React.PropTypes validation function for the `" + f + "` prop on `" + l + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."), n[g] = !0, r++);
267
- }
268
- }
269
- return o[c] == null ? a ? o[c] === null ? new h("The " + u + " `" + f + "` is marked as required " + ("in `" + l + "`, but its value is `null`.")) : new h("The " + u + " `" + f + "` is marked as required in " + ("`" + l + "`, but its value is `undefined`.")) : null : e(o, c, l, u, f);
270
- }
271
- var o = a.bind(null, !1);
272
- return o.isRequired = a.bind(null, !0), o;
273
- }
274
- function _(e) {
275
- function t(t, n, r, i, a, o) {
276
- var s = t[n];
277
- if (M(s) !== e) {
278
- var c = N(s);
279
- return new h("Invalid " + i + " `" + a + "` of type " + ("`" + c + "` supplied to `" + r + "`, expected ") + ("`" + e + "`."), { expectedType: e });
280
- }
281
- return null;
282
- }
283
- return g(t);
284
- }
285
- function v() {
286
- return g(p);
287
- }
288
- function y(e) {
289
- function t(t, n, r, a, o) {
290
- if (typeof e != "function") return new h("Property `" + o + "` of component `" + r + "` has invalid PropType notation inside arrayOf.");
291
- var s = t[n];
292
- if (!Array.isArray(s)) {
293
- var c = M(s);
294
- return new h("Invalid " + a + " `" + o + "` of type " + ("`" + c + "` supplied to `" + r + "`, expected an array."));
295
- }
296
- for (var l = 0; l < s.length; l++) {
297
- var u = e(s, l, r, a, o + "[" + l + "]", i);
298
- if (u instanceof Error) return u;
299
- }
300
- return null;
301
- }
302
- return g(t);
303
- }
304
- function b() {
305
- function t(t, n, r, i, a) {
306
- var o = t[n];
307
- if (!e(o)) {
308
- var s = M(o);
309
- return new h("Invalid " + i + " `" + a + "` of type " + ("`" + s + "` supplied to `" + r + "`, expected a single ReactElement."));
310
- }
311
- return null;
312
- }
313
- return g(t);
314
- }
315
- function x() {
316
- function e(e, t, r, i, a) {
317
- var o = e[t];
318
- if (!n.isValidElementType(o)) {
319
- var s = M(o);
320
- return new h("Invalid " + i + " `" + a + "` of type " + ("`" + s + "` supplied to `" + r + "`, expected a single ReactElement type."));
321
- }
322
- return null;
323
- }
324
- return g(e);
325
- }
326
- function S(e) {
327
- function t(t, n, r, i, a) {
328
- if (!(t[n] instanceof e)) {
329
- var o = e.name || d, s = F(t[n]);
330
- return new h("Invalid " + i + " `" + a + "` of type " + ("`" + s + "` supplied to `" + r + "`, expected ") + ("instance of `" + o + "`."));
331
- }
332
- return null;
333
- }
334
- return g(t);
335
- }
336
- function C(e) {
337
- if (!Array.isArray(e)) return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? s("Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).") : s("Invalid argument supplied to oneOf, expected an array.")), p;
338
- function t(t, n, r, i, a) {
339
- for (var o = t[n], s = 0; s < e.length; s++) if (m(o, e[s])) return null;
340
- var c = JSON.stringify(e, function(e, t) {
341
- return N(t) === "symbol" ? String(t) : t;
342
- });
343
- return new h("Invalid " + i + " `" + a + "` of value `" + String(o) + "` " + ("supplied to `" + r + "`, expected one of " + c + "."));
344
- }
345
- return g(t);
346
- }
347
- function w(e) {
348
- function t(t, n, r, o, s) {
349
- if (typeof e != "function") return new h("Property `" + s + "` of component `" + r + "` has invalid PropType notation inside objectOf.");
350
- var c = t[n], l = M(c);
351
- if (l !== "object") return new h("Invalid " + o + " `" + s + "` of type " + ("`" + l + "` supplied to `" + r + "`, expected an object."));
352
- for (var u in c) if (a(c, u)) {
353
- var d = e(c, u, r, o, s + "." + u, i);
354
- if (d instanceof Error) return d;
355
- }
356
- return null;
357
- }
358
- return g(t);
359
- }
360
- function T(e) {
361
- if (!Array.isArray(e)) return process.env.NODE_ENV !== "production" && s("Invalid argument supplied to oneOfType, expected an instance of array."), p;
362
- for (var t = 0; t < e.length; t++) {
363
- var n = e[t];
364
- if (typeof n != "function") return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + P(n) + " at index " + t + "."), p;
365
- }
366
- function r(t, n, r, o, s) {
367
- for (var c = [], l = 0; l < e.length; l++) {
368
- var u = e[l], d = u(t, n, r, o, s, i);
369
- if (d == null) return null;
370
- d.data && a(d.data, "expectedType") && c.push(d.data.expectedType);
371
- }
372
- var f = c.length > 0 ? ", expected one of type [" + c.join(", ") + "]" : "";
373
- return new h("Invalid " + o + " `" + s + "` supplied to " + ("`" + r + "`" + f + "."));
374
- }
375
- return g(r);
376
- }
377
- function E() {
378
- function e(e, t, n, r, i) {
379
- return A(e[t]) ? null : new h("Invalid " + r + " `" + i + "` supplied to " + ("`" + n + "`, expected a ReactNode."));
380
- }
381
- return g(e);
382
- }
383
- function D(e, t, n, r, i) {
384
- return new h((e || "React class") + ": " + t + " type `" + n + "." + r + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + i + "`.");
385
- }
386
- function O(e) {
387
- function t(t, n, r, a, o) {
388
- var s = t[n], c = M(s);
389
- if (c !== "object") return new h("Invalid " + a + " `" + o + "` of type `" + c + "` " + ("supplied to `" + r + "`, expected `object`."));
390
- for (var l in e) {
391
- var u = e[l];
392
- if (typeof u != "function") return D(r, a, o, l, N(u));
393
- var d = u(s, l, r, a, o + "." + l, i);
394
- if (d) return d;
395
- }
396
- return null;
397
- }
398
- return g(t);
399
- }
400
- function k(e) {
401
- function t(t, n, o, s, c) {
402
- var l = t[n], u = M(l);
403
- if (u !== "object") return new h("Invalid " + s + " `" + c + "` of type `" + u + "` " + ("supplied to `" + o + "`, expected `object`."));
404
- for (var d in r({}, t[n], e)) {
405
- var f = e[d];
406
- if (a(e, d) && typeof f != "function") return D(o, s, c, d, N(f));
407
- if (!f) return new h("Invalid " + s + " `" + c + "` key `" + d + "` supplied to `" + o + "`.\nBad object: " + JSON.stringify(t[n], null, " ") + "\nValid keys: " + JSON.stringify(Object.keys(e), null, " "));
408
- var p = f(l, d, o, s, c + "." + d, i);
409
- if (p) return p;
410
- }
411
- return null;
412
- }
413
- return g(t);
414
- }
415
- function A(t) {
416
- switch (typeof t) {
417
- case "number":
418
- case "string":
419
- case "undefined": return !0;
420
- case "boolean": return !t;
421
- case "object":
422
- if (Array.isArray(t)) return t.every(A);
423
- if (t === null || e(t)) return !0;
424
- var n = u(t);
425
- if (n) {
426
- var r = n.call(t), i;
427
- if (n !== t.entries) {
428
- for (; !(i = r.next()).done;) if (!A(i.value)) return !1;
429
- } else for (; !(i = r.next()).done;) {
430
- var a = i.value;
431
- if (a && !A(a[1])) return !1;
432
- }
433
- } else return !1;
434
- return !0;
435
- default: return !1;
436
- }
437
- }
438
- function j(e, t) {
439
- return e === "symbol" ? !0 : t ? t["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && t instanceof Symbol : !1;
440
- }
441
- function M(e) {
442
- var t = typeof e;
443
- return Array.isArray(e) ? "array" : e instanceof RegExp ? "object" : j(t, e) ? "symbol" : t;
444
- }
445
- function N(e) {
446
- if (e == null) return "" + e;
447
- var t = M(e);
448
- if (t === "object") {
449
- if (e instanceof Date) return "date";
450
- if (e instanceof RegExp) return "regexp";
451
- }
452
- return t;
453
- }
454
- function P(e) {
455
- var t = N(e);
456
- switch (t) {
457
- case "array":
458
- case "object": return "an " + t;
459
- case "boolean":
460
- case "date":
461
- case "regexp": return "a " + t;
462
- default: return t;
463
- }
464
- }
465
- function F(e) {
466
- return !e.constructor || !e.constructor.name ? d : e.constructor.name;
467
- }
468
- return f.checkPropTypes = o, f.resetWarningCache = o.resetWarningCache, f.PropTypes = f, f;
469
- };
470
- })), m = /* @__PURE__ */ a(((e, t) => {
471
- var n = u();
472
- function r() {}
473
- function i() {}
474
- i.resetWarningCache = r, t.exports = function() {
475
- function e(e, t, r, i, a, o) {
476
- if (o !== n) {
477
- var s = /* @__PURE__ */ Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");
478
- throw s.name = "Invariant Violation", s;
479
- }
480
- }
481
- e.isRequired = e;
482
- function t() {
483
- return e;
484
- }
485
- var a = {
486
- array: e,
487
- bigint: e,
488
- bool: e,
489
- func: e,
490
- number: e,
491
- object: e,
492
- string: e,
493
- symbol: e,
494
- any: e,
495
- arrayOf: t,
496
- element: e,
497
- elementType: e,
498
- instanceOf: t,
499
- node: e,
500
- objectOf: t,
501
- oneOf: t,
502
- oneOfType: t,
503
- shape: t,
504
- exact: t,
505
- checkPropTypes: i,
506
- resetWarningCache: r
507
- };
508
- return a.PropTypes = a, a;
509
- };
510
- })), h = /* @__PURE__ */ a(((e, t) => {
511
- if (process.env.NODE_ENV !== "production") {
512
- var n = c();
513
- t.exports = p()(n.isElement, !0);
514
- } else t.exports = m()();
515
- })), g = /* @__PURE__ */ a(((e, t) => {
516
- Object.defineProperty(e, "__esModule", { value: !0 }), e.default = u;
517
- var n = "none", r = "contents", i = /^(input|select|textarea|button|object|iframe)$/;
518
- function a(e, t) {
519
- return t.getPropertyValue("overflow") !== "visible" || e.scrollWidth <= 0 && e.scrollHeight <= 0;
520
- }
521
- function o(e) {
522
- var t = e.offsetWidth <= 0 && e.offsetHeight <= 0;
523
- if (t && !e.innerHTML) return !0;
524
- try {
525
- var i = window.getComputedStyle(e), o = i.getPropertyValue("display");
526
- return t ? o !== r && a(e, i) : o === n;
527
- } catch (e) {
528
- return console.warn("Failed to inspect element style"), !1;
529
- }
530
- }
531
- function s(e) {
532
- for (var t = e, n = e.getRootNode && e.getRootNode(); t && t !== document.body;) {
533
- if (n && t === n && (t = n.host.parentNode), o(t)) return !1;
534
- t = t.parentNode;
535
- }
536
- return !0;
537
- }
538
- function c(e, t) {
539
- var n = e.nodeName.toLowerCase();
540
- return (i.test(n) && !e.disabled || n === "a" && e.href || t) && s(e);
541
- }
542
- function l(e) {
543
- var t = e.getAttribute("tabindex");
544
- t === null && (t = void 0);
545
- var n = isNaN(t);
546
- return (n || t >= 0) && c(e, !n);
547
- }
548
- function u(e) {
549
- return [].slice.call(e.querySelectorAll("*"), 0).reduce(function(e, t) {
550
- return e.concat(t.shadowRoot ? u(t.shadowRoot) : [t]);
551
- }, []).filter(l);
552
- }
553
- t.exports = e.default;
554
- })), _ = /* @__PURE__ */ a(((e) => {
555
- Object.defineProperty(e, "__esModule", { value: !0 }), e.resetState = o, e.log = s, e.handleBlur = c, e.handleFocus = l, e.markForFocusLater = u, e.returnFocus = d, e.popWithoutFocus = f, e.setupScopedFocus = p, e.teardownScopedFocus = m;
556
- var t = n(g());
557
- function n(e) {
558
- return e && e.__esModule ? e : { default: e };
559
- }
560
- var r = [], i = null, a = !1;
561
- /* istanbul ignore next */
562
- function o() {
563
- r = [];
564
- }
565
- /* istanbul ignore next */
566
- function s() {
567
- process.env.NODE_ENV !== "production" && (console.log("focusManager ----------"), r.forEach(function(e) {
568
- var t = e || {};
569
- console.log(t.nodeName, t.className, t.id);
570
- }), console.log("end focusManager ----------"));
571
- }
572
- function c() {
573
- a = !0;
574
- }
575
- function l() {
576
- if (a) {
577
- if (a = !1, !i) return;
578
- setTimeout(function() {
579
- i.contains(document.activeElement) || ((0, t.default)(i)[0] || i).focus();
580
- }, 0);
581
- }
582
- }
583
- function u() {
584
- r.push(document.activeElement);
585
- }
586
- function d() {
587
- var e = arguments.length > 0 && arguments[0] !== void 0 && arguments[0], t = null;
588
- try {
589
- r.length !== 0 && (t = r.pop(), t.focus({ preventScroll: e }));
590
- return;
591
- } catch (e) {
592
- console.warn([
593
- "You tried to return focus to",
594
- t,
595
- "but it is not in the DOM anymore"
596
- ].join(" "));
597
- }
598
- }
599
- function f() {
600
- r.length > 0 && r.pop();
601
- }
602
- function p(e) {
603
- i = e, window.addEventListener ? (window.addEventListener("blur", c, !1), document.addEventListener("focus", l, !0)) : (window.attachEvent("onBlur", c), document.attachEvent("onFocus", l));
604
- }
605
- function m() {
606
- i = null, window.addEventListener ? (window.removeEventListener("blur", c), document.removeEventListener("focus", l)) : (window.detachEvent("onBlur", c), document.detachEvent("onFocus", l));
607
- }
608
- })), v = /* @__PURE__ */ a(((e, t) => {
609
- Object.defineProperty(e, "__esModule", { value: !0 }), e.default = a;
610
- var n = r(g());
611
- function r(e) {
612
- return e && e.__esModule ? e : { default: e };
613
- }
614
- function i() {
615
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : document;
616
- return e.activeElement.shadowRoot ? i(e.activeElement.shadowRoot) : e.activeElement;
617
- }
618
- function a(e, t) {
619
- var r = (0, n.default)(e);
620
- if (!r.length) t.preventDefault();
621
- else {
622
- var a = void 0, o = t.shiftKey, s = r[0], c = r[r.length - 1], l = i();
623
- if (e === l) {
624
- if (!o) return;
625
- a = c;
626
- }
627
- if (c === l && !o && (a = s), s === l && o && (a = c), a) t.preventDefault(), a.focus();
628
- else {
629
- var u = /(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent);
630
- if (u != null && u[1] != "Chrome" && /\biPod\b|\biPad\b/g.exec(navigator.userAgent) == null) {
631
- var d = r.indexOf(l);
632
- d > -1 && (d += o ? -1 : 1), a = r[d], a === void 0 ? (t.preventDefault(), a = o ? c : s, a.focus()) : (t.preventDefault(), a.focus());
633
- }
634
- }
635
- }
636
- }
637
- t.exports = e.default;
638
- })), y = /* @__PURE__ */ a(((e, t) => {
639
- var n = process.env.NODE_ENV !== "production", r = function() {};
640
- if (n) {
641
- var i = function(e, t) {
642
- var n = arguments.length;
643
- t = Array(n > 1 ? n - 1 : 0);
644
- for (var r = 1; r < n; r++) t[r - 1] = arguments[r];
645
- var i = 0, a = "Warning: " + e.replace(/%s/g, function() {
646
- return t[i++];
647
- });
648
- typeof console < "u" && console.error(a);
649
- try {
650
- throw Error(a);
651
- } catch (e) {}
652
- };
653
- r = function(e, t, n) {
654
- var r = arguments.length;
655
- n = Array(r > 2 ? r - 2 : 0);
656
- for (var a = 2; a < r; a++) n[a - 2] = arguments[a];
657
- if (t === void 0) throw Error("`warning(condition, format, ...args)` requires a warning message argument");
658
- e || i.apply(null, [t].concat(n));
659
- };
660
- }
661
- t.exports = r;
662
- })), b = /* @__PURE__ */ a(((e, t) => {
663
- (function() {
664
- var e = !!(typeof window < "u" && window.document && window.document.createElement), n = {
665
- canUseDOM: e,
666
- canUseWorkers: typeof Worker < "u",
667
- canUseEventListeners: e && !!(window.addEventListener || window.attachEvent),
668
- canUseViewport: e && !!window.screen
669
- };
670
- typeof define == "function" && typeof define.amd == "object" && define.amd ? define(function() {
671
- return n;
672
- }) : t !== void 0 && t.exports ? t.exports = n : window.ExecutionEnvironment = n;
673
- })();
674
- })), x = /* @__PURE__ */ a(((e) => {
675
- Object.defineProperty(e, "__esModule", { value: !0 }), e.canUseDOM = e.SafeNodeList = e.SafeHTMLCollection = void 0;
676
- var t = n(b());
677
- function n(e) {
678
- return e && e.__esModule ? e : { default: e };
679
- }
680
- var r = t.default, i = r.canUseDOM ? window.HTMLElement : {};
681
- e.SafeHTMLCollection = r.canUseDOM ? window.HTMLCollection : {}, e.SafeNodeList = r.canUseDOM ? window.NodeList : {}, e.canUseDOM = r.canUseDOM, e.default = i;
682
- })), S = /* @__PURE__ */ a(((e) => {
683
- Object.defineProperty(e, "__esModule", { value: !0 }), e.resetState = a, e.log = o, e.assertNodeList = s, e.setElement = c, e.validateElement = l, e.hide = u, e.show = d, e.documentNotReadyOrSSRTesting = f;
684
- var t = r(y()), n = x();
685
- function r(e) {
686
- return e && e.__esModule ? e : { default: e };
687
- }
688
- var i = null;
689
- /* istanbul ignore next */
690
- function a() {
691
- i && (i.removeAttribute ? i.removeAttribute("aria-hidden") : i.length == null ? document.querySelectorAll(i).forEach(function(e) {
692
- return e.removeAttribute("aria-hidden");
693
- }) : i.forEach(function(e) {
694
- return e.removeAttribute("aria-hidden");
695
- })), i = null;
696
- }
697
- /* istanbul ignore next */
698
- function o() {
699
- if (process.env.NODE_ENV !== "production") {
700
- var e = i || {};
701
- console.log("ariaAppHider ----------"), console.log(e.nodeName, e.className, e.id), console.log("end ariaAppHider ----------");
702
- }
703
- }
704
- function s(e, t) {
705
- if (!e || !e.length) throw Error("react-modal: No elements were found for selector " + t + ".");
706
- }
707
- function c(e) {
708
- var t = e;
709
- if (typeof t == "string" && n.canUseDOM) {
710
- var r = document.querySelectorAll(t);
711
- s(r, t), t = r;
712
- }
713
- return i = t || i, i;
714
- }
715
- function l(e) {
716
- var n = e || i;
717
- return n ? Array.isArray(n) || n instanceof HTMLCollection || n instanceof NodeList ? n : [n] : ((0, t.default)(!1, [
718
- "react-modal: App element is not defined.",
719
- "Please use `Modal.setAppElement(el)` or set `appElement={el}`.",
720
- "This is needed so screen readers don't see main content",
721
- "when modal is opened. It is not recommended, but you can opt-out",
722
- "by setting `ariaHideApp={false}`."
723
- ].join(" ")), []);
724
- }
725
- function u(e) {
726
- var t = !0, n = !1, r = void 0;
727
- try {
728
- for (var i = l(e)[Symbol.iterator](), a; !(t = (a = i.next()).done); t = !0) a.value.setAttribute("aria-hidden", "true");
729
- } catch (e) {
730
- n = !0, r = e;
731
- } finally {
732
- try {
733
- !t && i.return && i.return();
734
- } finally {
735
- if (n) throw r;
736
- }
737
- }
738
- }
739
- function d(e) {
740
- var t = !0, n = !1, r = void 0;
741
- try {
742
- for (var i = l(e)[Symbol.iterator](), a; !(t = (a = i.next()).done); t = !0) a.value.removeAttribute("aria-hidden");
743
- } catch (e) {
744
- n = !0, r = e;
745
- } finally {
746
- try {
747
- !t && i.return && i.return();
748
- } finally {
749
- if (n) throw r;
750
- }
751
- }
752
- }
753
- function f() {
754
- i = null;
755
- }
756
- })), C = /* @__PURE__ */ a(((e) => {
757
- Object.defineProperty(e, "__esModule", { value: !0 }), e.resetState = i, e.log = a;
758
- var t = {}, n = {};
759
- /* istanbul ignore next */
760
- function r(e, t) {
761
- e.classList.remove(t);
762
- }
763
- /* istanbul ignore next */
764
- function i() {
765
- var e = document.getElementsByTagName("html")[0];
766
- for (var i in t) r(e, t[i]);
767
- var a = document.body;
768
- for (var o in n) r(a, n[o]);
769
- t = {}, n = {};
770
- }
771
- /* istanbul ignore next */
772
- function a() {
773
- if (process.env.NODE_ENV !== "production") {
774
- var e = document.getElementsByTagName("html")[0].className, r = "Show tracked classes:\n\n";
775
- for (var i in r += "<html /> (" + e + "):\n ", t) r += " " + i + " " + t[i] + "\n ";
776
- for (var a in e = document.body.className, r += "\n\ndoc.body (" + e + "):\n ", n) r += " " + a + " " + n[a] + "\n ";
777
- r += "\n", console.log(r);
778
- }
779
- }
780
- var o = function(e, t) {
781
- return e[t] || (e[t] = 0), e[t] += 1, t;
782
- }, s = function(e, t) {
783
- return e[t] && --e[t], t;
784
- }, c = function(e, t, n) {
785
- n.forEach(function(n) {
786
- o(t, n), e.add(n);
787
- });
788
- }, l = function(e, t, n) {
789
- n.forEach(function(n) {
790
- s(t, n), t[n] === 0 && e.remove(n);
791
- });
792
- };
793
- e.add = function(e, r) {
794
- return c(e.classList, e.nodeName.toLowerCase() == "html" ? t : n, r.split(" "));
795
- }, e.remove = function(e, r) {
796
- return l(e.classList, e.nodeName.toLowerCase() == "html" ? t : n, r.split(" "));
797
- };
798
- })), w = /* @__PURE__ */ a(((e) => {
799
- Object.defineProperty(e, "__esModule", { value: !0 }), e.log = i, e.resetState = a;
800
- function t(e, t) {
801
- if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
802
- }
803
- var n = function e() {
804
- var n = this;
805
- t(this, e), this.register = function(e) {
806
- n.openInstances.indexOf(e) === -1 ? (n.openInstances.push(e), n.emit("register")) : process.env.NODE_ENV !== "production" && console.warn("React-Modal: Cannot register modal instance that's already open");
807
- }, this.deregister = function(e) {
808
- var t = n.openInstances.indexOf(e);
809
- t === -1 ? process.env.NODE_ENV !== "production" && console.warn("React-Modal: Unable to deregister " + e + " as it was never registered") : (n.openInstances.splice(t, 1), n.emit("deregister"));
810
- }, this.subscribe = function(e) {
811
- n.subscribers.push(e);
812
- }, this.emit = function(e) {
813
- n.subscribers.forEach(function(t) {
814
- return t(e, n.openInstances.slice());
815
- });
816
- }, this.openInstances = [], this.subscribers = [];
817
- }, r = new n();
818
- /* istanbul ignore next */
819
- function i() {
820
- console.log("portalOpenInstances ----------"), console.log(r.openInstances.length), r.openInstances.forEach(function(e) {
821
- return console.log(e);
822
- }), console.log("end portalOpenInstances ----------");
823
- }
824
- /* istanbul ignore next */
825
- function a() {
826
- r = new n();
827
- }
828
- e.default = r;
829
- })), T = /* @__PURE__ */ a(((e) => {
830
- Object.defineProperty(e, "__esModule", { value: !0 }), e.resetState = o, e.log = s;
831
- var t = n(w());
832
- function n(e) {
833
- return e && e.__esModule ? e : { default: e };
834
- }
835
- var r = void 0, i = void 0, a = [];
836
- /* istanbul ignore next */
837
- function o() {
838
- for (var e = [r, i], t = 0; t < e.length; t++) {
839
- var n = e[t];
840
- n && n.parentNode && n.parentNode.removeChild(n);
841
- }
842
- r = i = null, a = [];
843
- }
844
- /* istanbul ignore next */
845
- function s() {
846
- console.log("bodyTrap ----------"), console.log(a.length);
847
- for (var e = [r, i], t = 0; t < e.length; t++) {
848
- var n = e[t] || {};
849
- console.log(n.nodeName, n.className, n.id);
850
- }
851
- console.log("edn bodyTrap ----------");
852
- }
853
- function c() {
854
- a.length === 0 ? process.env.NODE_ENV !== "production" && console.warn("React-Modal: Open instances > 0 expected") : a[a.length - 1].focusContent();
855
- }
856
- function l(e, t) {
857
- !r && !i && (r = document.createElement("div"), r.setAttribute("data-react-modal-body-trap", ""), r.style.position = "absolute", r.style.opacity = "0", r.setAttribute("tabindex", "0"), r.addEventListener("focus", c), i = r.cloneNode(), i.addEventListener("focus", c)), a = t, a.length > 0 ? (document.body.firstChild !== r && document.body.insertBefore(r, document.body.firstChild), document.body.lastChild !== i && document.body.appendChild(i)) : (r.parentElement && r.parentElement.removeChild(r), i.parentElement && i.parentElement.removeChild(i));
858
- }
859
- t.default.subscribe(l);
860
- })), E = /* @__PURE__ */ a(((e, n) => {
861
- Object.defineProperty(e, "__esModule", { value: !0 });
862
- var r = Object.assign || function(e) {
863
- for (var t = 1; t < arguments.length; t++) {
864
- var n = arguments[t];
865
- for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
866
- }
867
- return e;
868
- }, i = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
869
- return typeof e;
870
- } : function(e) {
871
- return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
872
- }, a = function() {
873
- function e(e, t) {
874
- for (var n = 0; n < t.length; n++) {
875
- var r = t[n];
876
- r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
877
- }
878
- }
879
- return function(t, n, r) {
880
- return n && e(t.prototype, n), r && e(t, r), t;
881
- };
882
- }(), o = t("react"), s = y(h()), c = g(_()), l = y(v()), u = g(S()), d = g(C()), f = x(), p = y(f), m = y(w());
883
- T();
884
- function g(e) {
885
- if (e && e.__esModule) return e;
886
- var t = {};
887
- if (e != null) for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]);
888
- return t.default = e, t;
889
- }
890
- function y(e) {
891
- return e && e.__esModule ? e : { default: e };
892
- }
893
- function b(e, t) {
894
- if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
895
- }
896
- function E(e, t) {
897
- if (!e) throw ReferenceError("this hasn't been initialised - super() hasn't been called");
898
- return t && (typeof t == "object" || typeof t == "function") ? t : e;
899
- }
900
- function D(e, t) {
901
- if (typeof t != "function" && t !== null) throw TypeError("Super expression must either be null or a function, not " + typeof t);
902
- e.prototype = Object.create(t && t.prototype, { constructor: {
903
- value: e,
904
- enumerable: !1,
905
- writable: !0,
906
- configurable: !0
907
- } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);
908
- }
909
- var O = {
910
- overlay: "ReactModal__Overlay",
911
- content: "ReactModal__Content"
912
- }, k = function(e) {
913
- return e.code === "Tab" || e.keyCode === 9;
914
- }, A = function(e) {
915
- return e.code === "Escape" || e.keyCode === 27;
916
- }, j = 0, M = function(e) {
917
- D(t, e);
918
- function t(e) {
919
- b(this, t);
920
- var n = E(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e));
921
- return n.setOverlayRef = function(e) {
922
- n.overlay = e, n.props.overlayRef && n.props.overlayRef(e);
923
- }, n.setContentRef = function(e) {
924
- n.content = e, n.props.contentRef && n.props.contentRef(e);
925
- }, n.afterClose = function() {
926
- var e = n.props, t = e.appElement, r = e.ariaHideApp, i = e.htmlOpenClassName, a = e.bodyOpenClassName, o = e.parentSelector, s = o && o().ownerDocument || document;
927
- a && d.remove(s.body, a), i && d.remove(s.getElementsByTagName("html")[0], i), r && j > 0 && (--j, j === 0 && u.show(t)), n.props.shouldFocusAfterRender && (n.props.shouldReturnFocusAfterClose ? (c.returnFocus(n.props.preventScroll), c.teardownScopedFocus()) : c.popWithoutFocus()), n.props.onAfterClose && n.props.onAfterClose(), m.default.deregister(n);
928
- }, n.open = function() {
929
- n.beforeOpen(), n.state.afterOpen && n.state.beforeClose ? (clearTimeout(n.closeTimer), n.setState({ beforeClose: !1 })) : (n.props.shouldFocusAfterRender && (c.setupScopedFocus(n.node), c.markForFocusLater()), n.setState({ isOpen: !0 }, function() {
930
- n.openAnimationFrame = requestAnimationFrame(function() {
931
- n.setState({ afterOpen: !0 }), n.props.isOpen && n.props.onAfterOpen && n.props.onAfterOpen({
932
- overlayEl: n.overlay,
933
- contentEl: n.content
934
- });
935
- });
936
- }));
937
- }, n.close = function() {
938
- n.props.closeTimeoutMS > 0 ? n.closeWithTimeout() : n.closeWithoutTimeout();
939
- }, n.focusContent = function() {
940
- return n.content && !n.contentHasFocus() && n.content.focus({ preventScroll: !0 });
941
- }, n.closeWithTimeout = function() {
942
- var e = Date.now() + n.props.closeTimeoutMS;
943
- n.setState({
944
- beforeClose: !0,
945
- closesAt: e
946
- }, function() {
947
- n.closeTimer = setTimeout(n.closeWithoutTimeout, n.state.closesAt - Date.now());
948
- });
949
- }, n.closeWithoutTimeout = function() {
950
- n.setState({
951
- beforeClose: !1,
952
- isOpen: !1,
953
- afterOpen: !1,
954
- closesAt: null
955
- }, n.afterClose);
956
- }, n.handleKeyDown = function(e) {
957
- k(e) && (0, l.default)(n.content, e), n.props.shouldCloseOnEsc && A(e) && (e.stopPropagation(), n.requestClose(e));
958
- }, n.handleOverlayOnClick = function(e) {
959
- n.shouldClose === null && (n.shouldClose = !0), n.shouldClose && n.props.shouldCloseOnOverlayClick && (n.ownerHandlesClose() ? n.requestClose(e) : n.focusContent()), n.shouldClose = null;
960
- }, n.handleContentOnMouseUp = function() {
961
- n.shouldClose = !1;
962
- }, n.handleOverlayOnMouseDown = function(e) {
963
- !n.props.shouldCloseOnOverlayClick && e.target == n.overlay && e.preventDefault();
964
- }, n.handleContentOnClick = function() {
965
- n.shouldClose = !1;
966
- }, n.handleContentOnMouseDown = function() {
967
- n.shouldClose = !1;
968
- }, n.requestClose = function(e) {
969
- return n.ownerHandlesClose() && n.props.onRequestClose(e);
970
- }, n.ownerHandlesClose = function() {
971
- return n.props.onRequestClose;
972
- }, n.shouldBeClosed = function() {
973
- return !n.state.isOpen && !n.state.beforeClose;
974
- }, n.contentHasFocus = function() {
975
- return document.activeElement === n.content || n.content.contains(document.activeElement);
976
- }, n.buildClassName = function(e, t) {
977
- var r = (t === void 0 ? "undefined" : i(t)) === "object" ? t : {
978
- base: O[e],
979
- afterOpen: O[e] + "--after-open",
980
- beforeClose: O[e] + "--before-close"
981
- }, a = r.base;
982
- return n.state.afterOpen && (a = a + " " + r.afterOpen), n.state.beforeClose && (a = a + " " + r.beforeClose), typeof t == "string" && t ? a + " " + t : a;
983
- }, n.attributesFromObject = function(e, t) {
984
- return Object.keys(t).reduce(function(n, r) {
985
- return n[e + "-" + r] = t[r], n;
986
- }, {});
987
- }, n.state = {
988
- afterOpen: !1,
989
- beforeClose: !1
990
- }, n.shouldClose = null, n.moveFromContentToOverlay = null, n;
991
- }
992
- return a(t, [
993
- {
994
- key: "componentDidMount",
995
- value: function() {
996
- this.props.isOpen && this.open();
997
- }
998
- },
999
- {
1000
- key: "componentDidUpdate",
1001
- value: function(e, t) {
1002
- process.env.NODE_ENV !== "production" && (e.bodyOpenClassName !== this.props.bodyOpenClassName && console.warn("React-Modal: \"bodyOpenClassName\" prop has been modified. This may cause unexpected behavior when multiple modals are open."), e.htmlOpenClassName !== this.props.htmlOpenClassName && console.warn("React-Modal: \"htmlOpenClassName\" prop has been modified. This may cause unexpected behavior when multiple modals are open.")), this.props.isOpen && !e.isOpen ? this.open() : !this.props.isOpen && e.isOpen && this.close(), this.props.shouldFocusAfterRender && this.state.isOpen && !t.isOpen && this.focusContent();
1003
- }
1004
- },
1005
- {
1006
- key: "componentWillUnmount",
1007
- value: function() {
1008
- this.state.isOpen && this.afterClose(), clearTimeout(this.closeTimer), cancelAnimationFrame(this.openAnimationFrame);
1009
- }
1010
- },
1011
- {
1012
- key: "beforeOpen",
1013
- value: function() {
1014
- var e = this.props, t = e.appElement, n = e.ariaHideApp, r = e.htmlOpenClassName, i = e.bodyOpenClassName, a = e.parentSelector, o = a && a().ownerDocument || document;
1015
- i && d.add(o.body, i), r && d.add(o.getElementsByTagName("html")[0], r), n && (j += 1, u.hide(t)), m.default.register(this);
1016
- }
1017
- },
1018
- {
1019
- key: "render",
1020
- value: function() {
1021
- var e = this.props, t = e.id, n = e.className, i = e.overlayClassName, a = e.defaultStyles, o = e.children, s = n ? {} : a.content, c = i ? {} : a.overlay;
1022
- if (this.shouldBeClosed()) return null;
1023
- var l = {
1024
- ref: this.setOverlayRef,
1025
- className: this.buildClassName("overlay", i),
1026
- style: r({}, c, this.props.style.overlay),
1027
- onClick: this.handleOverlayOnClick,
1028
- onMouseDown: this.handleOverlayOnMouseDown
1029
- }, u = r({
1030
- id: t,
1031
- ref: this.setContentRef,
1032
- style: r({}, s, this.props.style.content),
1033
- className: this.buildClassName("content", n),
1034
- tabIndex: "-1",
1035
- onKeyDown: this.handleKeyDown,
1036
- onMouseDown: this.handleContentOnMouseDown,
1037
- onMouseUp: this.handleContentOnMouseUp,
1038
- onClick: this.handleContentOnClick,
1039
- role: this.props.role,
1040
- "aria-label": this.props.contentLabel
1041
- }, this.attributesFromObject("aria", r({ modal: !0 }, this.props.aria)), this.attributesFromObject("data", this.props.data || {}), { "data-testid": this.props.testId }), d = this.props.contentElement(u, o);
1042
- return this.props.overlayElement(l, d);
1043
- }
1044
- }
1045
- ]), t;
1046
- }(o.Component);
1047
- M.defaultProps = {
1048
- style: {
1049
- overlay: {},
1050
- content: {}
1051
- },
1052
- defaultStyles: {}
1053
- }, M.propTypes = {
1054
- isOpen: s.default.bool.isRequired,
1055
- defaultStyles: s.default.shape({
1056
- content: s.default.object,
1057
- overlay: s.default.object
1058
- }),
1059
- style: s.default.shape({
1060
- content: s.default.object,
1061
- overlay: s.default.object
1062
- }),
1063
- className: s.default.oneOfType([s.default.string, s.default.object]),
1064
- overlayClassName: s.default.oneOfType([s.default.string, s.default.object]),
1065
- parentSelector: s.default.func,
1066
- bodyOpenClassName: s.default.string,
1067
- htmlOpenClassName: s.default.string,
1068
- ariaHideApp: s.default.bool,
1069
- appElement: s.default.oneOfType([
1070
- s.default.instanceOf(p.default),
1071
- s.default.instanceOf(f.SafeHTMLCollection),
1072
- s.default.instanceOf(f.SafeNodeList),
1073
- s.default.arrayOf(s.default.instanceOf(p.default))
1074
- ]),
1075
- onAfterOpen: s.default.func,
1076
- onAfterClose: s.default.func,
1077
- onRequestClose: s.default.func,
1078
- closeTimeoutMS: s.default.number,
1079
- shouldFocusAfterRender: s.default.bool,
1080
- shouldCloseOnOverlayClick: s.default.bool,
1081
- shouldReturnFocusAfterClose: s.default.bool,
1082
- preventScroll: s.default.bool,
1083
- role: s.default.string,
1084
- contentLabel: s.default.string,
1085
- aria: s.default.object,
1086
- data: s.default.object,
1087
- children: s.default.node,
1088
- shouldCloseOnEsc: s.default.bool,
1089
- overlayRef: s.default.func,
1090
- contentRef: s.default.func,
1091
- id: s.default.string,
1092
- overlayElement: s.default.func,
1093
- contentElement: s.default.func,
1094
- testId: s.default.string
1095
- }, e.default = M, n.exports = e.default;
1096
- })), D = /* @__PURE__ */ i({ polyfill: () => j });
1097
- function O() {
1098
- var e = this.constructor.getDerivedStateFromProps(this.props, this.state);
1099
- e != null && this.setState(e);
1100
- }
1101
- function k(e) {
1102
- function t(t) {
1103
- var n = this.constructor.getDerivedStateFromProps(e, t);
1104
- return n == null ? null : n;
1105
- }
1106
- this.setState(t.bind(this));
1107
- }
1108
- function A(e, t) {
1109
- try {
1110
- var n = this.props, r = this.state;
1111
- this.props = e, this.state = t, this.__reactInternalSnapshotFlag = !0, this.__reactInternalSnapshot = this.getSnapshotBeforeUpdate(n, r);
1112
- } finally {
1113
- this.props = n, this.state = r;
1114
- }
1115
- }
1116
- function j(e) {
1117
- var t = e.prototype;
1118
- if (!t || !t.isReactComponent) throw Error("Can only polyfill class components");
1119
- if (typeof e.getDerivedStateFromProps != "function" && typeof t.getSnapshotBeforeUpdate != "function") return e;
1120
- var n = null, r = null, i = null;
1121
- if (typeof t.componentWillMount == "function" ? n = "componentWillMount" : typeof t.UNSAFE_componentWillMount == "function" && (n = "UNSAFE_componentWillMount"), typeof t.componentWillReceiveProps == "function" ? r = "componentWillReceiveProps" : typeof t.UNSAFE_componentWillReceiveProps == "function" && (r = "UNSAFE_componentWillReceiveProps"), typeof t.componentWillUpdate == "function" ? i = "componentWillUpdate" : typeof t.UNSAFE_componentWillUpdate == "function" && (i = "UNSAFE_componentWillUpdate"), n !== null || r !== null || i !== null) {
1122
- var a = e.displayName || e.name, o = typeof e.getDerivedStateFromProps == "function" ? "getDerivedStateFromProps()" : "getSnapshotBeforeUpdate()";
1123
- throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n" + a + " uses " + o + " but also contains the following legacy lifecycles:" + (n === null ? "" : "\n " + n) + (r === null ? "" : "\n " + r) + (i === null ? "" : "\n " + i) + "\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks");
1124
- }
1125
- if (typeof e.getDerivedStateFromProps == "function" && (t.componentWillMount = O, t.componentWillReceiveProps = k), typeof t.getSnapshotBeforeUpdate == "function") {
1126
- if (typeof t.componentDidUpdate != "function") throw Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");
1127
- t.componentWillUpdate = A;
1128
- var s = t.componentDidUpdate;
1129
- t.componentDidUpdate = function(e, t, n) {
1130
- var r = this.__reactInternalSnapshotFlag ? this.__reactInternalSnapshot : n;
1131
- s.call(this, e, t, r);
1132
- };
1133
- }
1134
- return e;
1135
- }
1136
- var M = n((() => {
1137
- O.__suppressDeprecationWarning = !0, k.__suppressDeprecationWarning = !0, A.__suppressDeprecationWarning = !0;
1138
- })), N = /* @__PURE__ */ a(((n) => {
1139
- Object.defineProperty(n, "__esModule", { value: !0 }), n.bodyOpenClassName = n.portalClassName = void 0;
1140
- var r = Object.assign || function(e) {
1141
- for (var t = 1; t < arguments.length; t++) {
1142
- var n = arguments[t];
1143
- for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
1144
- }
1145
- return e;
1146
- }, i = function() {
1147
- function e(e, t) {
1148
- for (var n = 0; n < t.length; n++) {
1149
- var r = t[n];
1150
- r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
1151
- }
1152
- }
1153
- return function(t, n, r) {
1154
- return n && e(t.prototype, n), r && e(t, r), t;
1155
- };
1156
- }(), a = t("react"), o = g(a), s = g(t("react-dom")), c = g(h()), l = g(E()), u = m(S()), d = x(), f = g(d), p = (M(), e(D));
1157
- function m(e) {
1158
- if (e && e.__esModule) return e;
1159
- var t = {};
1160
- if (e != null) for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]);
1161
- return t.default = e, t;
1162
- }
1163
- function g(e) {
1164
- return e && e.__esModule ? e : { default: e };
1165
- }
1166
- function _(e, t) {
1167
- if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
1168
- }
1169
- function v(e, t) {
1170
- if (!e) throw ReferenceError("this hasn't been initialised - super() hasn't been called");
1171
- return t && (typeof t == "object" || typeof t == "function") ? t : e;
1172
- }
1173
- function y(e, t) {
1174
- if (typeof t != "function" && t !== null) throw TypeError("Super expression must either be null or a function, not " + typeof t);
1175
- e.prototype = Object.create(t && t.prototype, { constructor: {
1176
- value: e,
1177
- enumerable: !1,
1178
- writable: !0,
1179
- configurable: !0
1180
- } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);
1181
- }
1182
- var b = n.portalClassName = "ReactModalPortal", C = n.bodyOpenClassName = "ReactModal__Body--open", w = d.canUseDOM && s.default.createPortal !== void 0, T = function(e) {
1183
- return document.createElement(e);
1184
- }, O = function() {
1185
- return w ? s.default.createPortal : s.default.unstable_renderSubtreeIntoContainer;
1186
- };
1187
- function k(e) {
1188
- return e();
1189
- }
1190
- var A = function(e) {
1191
- y(t, e);
1192
- function t() {
1193
- var e, n, i, a;
1194
- _(this, t);
1195
- var c = [...arguments];
1196
- return a = (n = (i = v(this, (e = t.__proto__ || Object.getPrototypeOf(t)).call.apply(e, [this].concat(c))), i), i.removePortal = function() {
1197
- !w && s.default.unmountComponentAtNode(i.node);
1198
- var e = k(i.props.parentSelector);
1199
- e && e.contains(i.node) ? e.removeChild(i.node) : console.warn("React-Modal: \"parentSelector\" prop did not returned any DOM element. Make sure that the parent element is unmounted to avoid any memory leaks.");
1200
- }, i.portalRef = function(e) {
1201
- i.portal = e;
1202
- }, i.renderPortal = function(e) {
1203
- var n = O()(i, o.default.createElement(l.default, r({ defaultStyles: t.defaultStyles }, e)), i.node);
1204
- i.portalRef(n);
1205
- }, n), v(i, a);
1206
- }
1207
- return i(t, [
1208
- {
1209
- key: "componentDidMount",
1210
- value: function() {
1211
- d.canUseDOM && (w || (this.node = T("div")), this.node.className = this.props.portalClassName, k(this.props.parentSelector).appendChild(this.node), !w && this.renderPortal(this.props));
1212
- }
1213
- },
1214
- {
1215
- key: "getSnapshotBeforeUpdate",
1216
- value: function(e) {
1217
- return {
1218
- prevParent: k(e.parentSelector),
1219
- nextParent: k(this.props.parentSelector)
1220
- };
1221
- }
1222
- },
1223
- {
1224
- key: "componentDidUpdate",
1225
- value: function(e, t, n) {
1226
- if (d.canUseDOM) {
1227
- var r = this.props, i = r.isOpen, a = r.portalClassName;
1228
- e.portalClassName !== a && (this.node.className = a);
1229
- var o = n.prevParent, s = n.nextParent;
1230
- s !== o && (o.removeChild(this.node), s.appendChild(this.node)), (e.isOpen || i) && !w && this.renderPortal(this.props);
1231
- }
1232
- }
1233
- },
1234
- {
1235
- key: "componentWillUnmount",
1236
- value: function() {
1237
- if (d.canUseDOM && this.node && this.portal) {
1238
- var e = this.portal.state, t = Date.now(), n = e.isOpen && this.props.closeTimeoutMS && (e.closesAt || t + this.props.closeTimeoutMS);
1239
- n ? (e.beforeClose || this.portal.closeWithTimeout(), setTimeout(this.removePortal, n - t)) : this.removePortal();
1240
- }
1241
- }
1242
- },
1243
- {
1244
- key: "render",
1245
- value: function() {
1246
- return !d.canUseDOM || !w ? null : (!this.node && w && (this.node = T("div")), O()(o.default.createElement(l.default, r({
1247
- ref: this.portalRef,
1248
- defaultStyles: t.defaultStyles
1249
- }, this.props)), this.node));
1250
- }
1251
- }
1252
- ], [{
1253
- key: "setAppElement",
1254
- value: function(e) {
1255
- u.setElement(e);
1256
- }
1257
- }]), t;
1258
- }(a.Component);
1259
- A.propTypes = {
1260
- isOpen: c.default.bool.isRequired,
1261
- style: c.default.shape({
1262
- content: c.default.object,
1263
- overlay: c.default.object
1264
- }),
1265
- portalClassName: c.default.string,
1266
- bodyOpenClassName: c.default.string,
1267
- htmlOpenClassName: c.default.string,
1268
- className: c.default.oneOfType([c.default.string, c.default.shape({
1269
- base: c.default.string.isRequired,
1270
- afterOpen: c.default.string.isRequired,
1271
- beforeClose: c.default.string.isRequired
1272
- })]),
1273
- overlayClassName: c.default.oneOfType([c.default.string, c.default.shape({
1274
- base: c.default.string.isRequired,
1275
- afterOpen: c.default.string.isRequired,
1276
- beforeClose: c.default.string.isRequired
1277
- })]),
1278
- appElement: c.default.oneOfType([
1279
- c.default.instanceOf(f.default),
1280
- c.default.instanceOf(d.SafeHTMLCollection),
1281
- c.default.instanceOf(d.SafeNodeList),
1282
- c.default.arrayOf(c.default.instanceOf(f.default))
1283
- ]),
1284
- onAfterOpen: c.default.func,
1285
- onRequestClose: c.default.func,
1286
- closeTimeoutMS: c.default.number,
1287
- ariaHideApp: c.default.bool,
1288
- shouldFocusAfterRender: c.default.bool,
1289
- shouldCloseOnOverlayClick: c.default.bool,
1290
- shouldReturnFocusAfterClose: c.default.bool,
1291
- preventScroll: c.default.bool,
1292
- parentSelector: c.default.func,
1293
- aria: c.default.object,
1294
- data: c.default.object,
1295
- role: c.default.string,
1296
- contentLabel: c.default.string,
1297
- shouldCloseOnEsc: c.default.bool,
1298
- overlayRef: c.default.func,
1299
- contentRef: c.default.func,
1300
- id: c.default.string,
1301
- overlayElement: c.default.func,
1302
- contentElement: c.default.func
1303
- }, A.defaultProps = {
1304
- isOpen: !1,
1305
- portalClassName: b,
1306
- bodyOpenClassName: C,
1307
- role: "dialog",
1308
- ariaHideApp: !0,
1309
- closeTimeoutMS: 0,
1310
- shouldFocusAfterRender: !0,
1311
- shouldCloseOnEsc: !0,
1312
- shouldCloseOnOverlayClick: !0,
1313
- shouldReturnFocusAfterClose: !0,
1314
- preventScroll: !1,
1315
- parentSelector: function() {
1316
- return document.body;
1317
- },
1318
- overlayElement: function(e, t) {
1319
- return o.default.createElement("div", e, t);
1320
- },
1321
- contentElement: function(e, t) {
1322
- return o.default.createElement("div", e, t);
1323
- }
1324
- }, A.defaultStyles = {
1325
- overlay: {
1326
- position: "fixed",
1327
- top: 0,
1328
- left: 0,
1329
- right: 0,
1330
- bottom: 0,
1331
- backgroundColor: "rgba(255, 255, 255, 0.75)"
1332
- },
1333
- content: {
1334
- position: "absolute",
1335
- top: "40px",
1336
- left: "40px",
1337
- right: "40px",
1338
- bottom: "40px",
1339
- border: "1px solid #ccc",
1340
- background: "#fff",
1341
- overflow: "auto",
1342
- WebkitOverflowScrolling: "touch",
1343
- borderRadius: "4px",
1344
- outline: "none",
1345
- padding: "20px"
1346
- }
1347
- }, (0, p.polyfill)(A), process.env.NODE_ENV !== "production" && (A.setCreateHTMLElement = function(e) {
1348
- return T = e;
1349
- }), n.default = A;
1350
- })), P = (/* @__PURE__ */ r((/* @__PURE__ */ a(((e, t) => {
1351
- Object.defineProperty(e, "__esModule", { value: !0 });
1352
- var n = r(N());
1353
- function r(e) {
1354
- return e && e.__esModule ? e : { default: e };
1355
- }
1356
- e.default = n.default, t.exports = e.default;
1357
- })))(), 1)).default;
1358
- export { P as Modal };
1359
-
1360
- //# sourceMappingURL=modal.js.map
1
+ export { default as Modal } from "react-modal";