@acrool/react-picker 0.1.1-alpha.1 → 0.1.2-alpha.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.
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { motion as
|
|
4
|
-
var I = /* @__PURE__ */ ((t) => (t.bottom = "bottom", t.top = "top", t))(I || {}),
|
|
5
|
-
const
|
|
1
|
+
import je, { createContext as Mr, useContext as $r, useEffect as z, forwardRef as Se, useRef as K, useCallback as N, useState as de } from "react";
|
|
2
|
+
import Ir from "react-dom";
|
|
3
|
+
import { motion as er, AnimatePresence as Wr } from "framer-motion";
|
|
4
|
+
var I = /* @__PURE__ */ ((t) => (t.bottom = "bottom", t.top = "top", t))(I || {}), ee = /* @__PURE__ */ ((t) => (t.left = "left", t.right = "right", t))(ee || {});
|
|
5
|
+
const te = [
|
|
6
6
|
"color: #fff",
|
|
7
7
|
"display: inline-block",
|
|
8
8
|
"font-size: 11px",
|
|
9
9
|
"line-height: 20px",
|
|
10
10
|
"padding-right: 8px",
|
|
11
11
|
"border-radius: 4px"
|
|
12
|
-
],
|
|
12
|
+
], ne = {
|
|
13
13
|
primary: "#0055a9",
|
|
14
14
|
success: "#009422",
|
|
15
15
|
info: "#17a2b8",
|
|
16
16
|
warning: "#d7a000",
|
|
17
17
|
danger: "#ec2127"
|
|
18
18
|
};
|
|
19
|
-
function
|
|
20
|
-
console.log(`%c ${t}`,
|
|
19
|
+
function ae(t, a, ...o) {
|
|
20
|
+
console.log(`%c ${t}`, a, ...o);
|
|
21
21
|
}
|
|
22
|
-
function
|
|
23
|
-
const
|
|
24
|
-
`background-color: ${
|
|
22
|
+
function Lr(t, ...a) {
|
|
23
|
+
const o = te.concat([
|
|
24
|
+
`background-color: ${ne.primary}`
|
|
25
25
|
]).join(";");
|
|
26
|
-
|
|
26
|
+
ae(t, o, ...a);
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
const
|
|
30
|
-
`background-color: ${
|
|
28
|
+
function Vr(t, ...a) {
|
|
29
|
+
const o = te.concat([
|
|
30
|
+
`background-color: ${ne.success}`
|
|
31
31
|
]).join(";");
|
|
32
|
-
|
|
32
|
+
ae(t, o, ...a);
|
|
33
33
|
}
|
|
34
|
-
function
|
|
35
|
-
const
|
|
36
|
-
`background-color: ${
|
|
34
|
+
function Yr(t, ...a) {
|
|
35
|
+
const o = te.concat([
|
|
36
|
+
`background-color: ${ne.info}`
|
|
37
37
|
]).join(";");
|
|
38
|
-
|
|
38
|
+
ae(t, o, ...a);
|
|
39
39
|
}
|
|
40
|
-
function
|
|
41
|
-
const
|
|
42
|
-
`background-color: ${
|
|
40
|
+
function Ur(t, ...a) {
|
|
41
|
+
const o = te.concat([
|
|
42
|
+
`background-color: ${ne.warning}`
|
|
43
43
|
]).join(";");
|
|
44
|
-
|
|
44
|
+
ae(t, o, ...a);
|
|
45
45
|
}
|
|
46
|
-
function
|
|
47
|
-
const
|
|
48
|
-
`background-color: ${
|
|
46
|
+
function Hr(t, ...a) {
|
|
47
|
+
const o = te.concat([
|
|
48
|
+
`background-color: ${ne.danger}`
|
|
49
49
|
]).join(";");
|
|
50
|
-
|
|
50
|
+
ae(t, o, ...a);
|
|
51
51
|
}
|
|
52
|
-
const
|
|
53
|
-
primary:
|
|
54
|
-
success:
|
|
55
|
-
info:
|
|
56
|
-
warning:
|
|
57
|
-
danger:
|
|
58
|
-
},
|
|
59
|
-
hide: () =>
|
|
60
|
-
show: () =>
|
|
61
|
-
toggle: () =>
|
|
52
|
+
const V = {
|
|
53
|
+
primary: Lr,
|
|
54
|
+
success: Vr,
|
|
55
|
+
info: Yr,
|
|
56
|
+
warning: Ur,
|
|
57
|
+
danger: Hr
|
|
58
|
+
}, Ae = Mr({
|
|
59
|
+
hide: () => V.warning("No hide method detected, did you embed your app with Acrool/PickerPortal?"),
|
|
60
|
+
show: () => V.warning("No show method detected, did you embed your app with Acrool/PickerPortal?"),
|
|
61
|
+
toggle: () => V.warning("No toggle method detected, did you embed your app with Acrool/PickerPortal?"),
|
|
62
62
|
isVisible: !1,
|
|
63
|
-
inputFocus: () =>
|
|
64
|
-
inputBlur: () =>
|
|
63
|
+
inputFocus: () => V.warning("No focus method detected, did you embed your app with Acrool/PickerPortal?"),
|
|
64
|
+
inputBlur: () => V.warning("No blur method detected, did you embed your app with Acrool/PickerPortal?"),
|
|
65
65
|
isInputFocus: !1,
|
|
66
|
-
onChange: () =>
|
|
66
|
+
onChange: () => V.warning("No onChange method detected, did you embed your app with Acrool/PickerPortal?"),
|
|
67
67
|
vertical: I.bottom,
|
|
68
|
-
setVertical: () =>
|
|
69
|
-
}),
|
|
70
|
-
var
|
|
68
|
+
setVertical: () => V.warning("No onChange method detected, did you embed your app with Acrool/PickerPortal?")
|
|
69
|
+
}), bt = Ae.Consumer, Br = () => $r(Ae);
|
|
70
|
+
var Te = { exports: {} }, Z = {};
|
|
71
71
|
/**
|
|
72
72
|
* @license React
|
|
73
73
|
* react-jsx-runtime.production.min.js
|
|
@@ -77,25 +77,25 @@ var xe = { exports: {} }, X = {};
|
|
|
77
77
|
* This source code is licensed under the MIT license found in the
|
|
78
78
|
* LICENSE file in the root directory of this source tree.
|
|
79
79
|
*/
|
|
80
|
-
var
|
|
81
|
-
function
|
|
82
|
-
if (
|
|
83
|
-
return
|
|
84
|
-
|
|
85
|
-
var t =
|
|
86
|
-
function R(u,
|
|
87
|
-
var g,
|
|
88
|
-
|
|
89
|
-
for (g in
|
|
90
|
-
|
|
80
|
+
var rr;
|
|
81
|
+
function Jr() {
|
|
82
|
+
if (rr)
|
|
83
|
+
return Z;
|
|
84
|
+
rr = 1;
|
|
85
|
+
var t = je, a = Symbol.for("react.element"), o = Symbol.for("react.fragment"), m = Object.prototype.hasOwnProperty, E = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, d = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
86
|
+
function R(u, l, _) {
|
|
87
|
+
var g, C = {}, O = null, x = null;
|
|
88
|
+
_ !== void 0 && (O = "" + _), l.key !== void 0 && (O = "" + l.key), l.ref !== void 0 && (x = l.ref);
|
|
89
|
+
for (g in l)
|
|
90
|
+
m.call(l, g) && !d.hasOwnProperty(g) && (C[g] = l[g]);
|
|
91
91
|
if (u && u.defaultProps)
|
|
92
|
-
for (g in
|
|
93
|
-
|
|
94
|
-
return { $$typeof:
|
|
92
|
+
for (g in l = u.defaultProps, l)
|
|
93
|
+
C[g] === void 0 && (C[g] = l[g]);
|
|
94
|
+
return { $$typeof: a, type: u, key: O, ref: x, props: C, _owner: E.current };
|
|
95
95
|
}
|
|
96
|
-
return
|
|
96
|
+
return Z.Fragment = o, Z.jsx = R, Z.jsxs = R, Z;
|
|
97
97
|
}
|
|
98
|
-
var
|
|
98
|
+
var Q = {};
|
|
99
99
|
/**
|
|
100
100
|
* @license React
|
|
101
101
|
* react-jsx-runtime.development.js
|
|
@@ -105,18 +105,18 @@ var Z = {};
|
|
|
105
105
|
* This source code is licensed under the MIT license found in the
|
|
106
106
|
* LICENSE file in the root directory of this source tree.
|
|
107
107
|
*/
|
|
108
|
-
var
|
|
109
|
-
function
|
|
110
|
-
return
|
|
111
|
-
var t =
|
|
108
|
+
var tr;
|
|
109
|
+
function qr() {
|
|
110
|
+
return tr || (tr = 1, process.env.NODE_ENV !== "production" && function() {
|
|
111
|
+
var t = je, a = Symbol.for("react.element"), o = Symbol.for("react.portal"), m = Symbol.for("react.fragment"), E = Symbol.for("react.strict_mode"), d = Symbol.for("react.profiler"), R = Symbol.for("react.provider"), u = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), _ = Symbol.for("react.suspense"), g = Symbol.for("react.suspense_list"), C = Symbol.for("react.memo"), O = Symbol.for("react.lazy"), x = Symbol.for("react.offscreen"), M = Symbol.iterator, D = "@@iterator";
|
|
112
112
|
function F(e) {
|
|
113
113
|
if (e === null || typeof e != "object")
|
|
114
114
|
return null;
|
|
115
|
-
var r =
|
|
115
|
+
var r = M && e[M] || e[D];
|
|
116
116
|
return typeof r == "function" ? r : null;
|
|
117
117
|
}
|
|
118
118
|
var w = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
119
|
-
function
|
|
119
|
+
function h(e) {
|
|
120
120
|
{
|
|
121
121
|
for (var r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), i = 1; i < r; i++)
|
|
122
122
|
n[i - 1] = arguments[i];
|
|
@@ -133,42 +133,42 @@ function Jr() {
|
|
|
133
133
|
v.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, v);
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
|
-
var
|
|
137
|
-
|
|
138
|
-
function
|
|
139
|
-
return !!(typeof e == "string" || typeof e == "function" || e ===
|
|
136
|
+
var W = !1, B = !1, oe = !1, me = !1, he = !1, ie;
|
|
137
|
+
ie = Symbol.for("react.module.reference");
|
|
138
|
+
function ge(e) {
|
|
139
|
+
return !!(typeof e == "string" || typeof e == "function" || e === m || e === d || he || e === E || e === _ || e === g || me || e === x || W || B || oe || typeof e == "object" && e !== null && (e.$$typeof === O || e.$$typeof === C || e.$$typeof === R || e.$$typeof === u || e.$$typeof === l || // This needs to include all possible module reference object
|
|
140
140
|
// types supported by any Flight configuration anywhere since
|
|
141
141
|
// we don't know which Flight build this will end up being used
|
|
142
142
|
// with.
|
|
143
|
-
e.$$typeof ===
|
|
143
|
+
e.$$typeof === ie || e.getModuleId !== void 0));
|
|
144
144
|
}
|
|
145
|
-
function
|
|
145
|
+
function be(e, r, n) {
|
|
146
146
|
var i = e.displayName;
|
|
147
147
|
if (i)
|
|
148
148
|
return i;
|
|
149
149
|
var f = r.displayName || r.name || "";
|
|
150
150
|
return f !== "" ? n + "(" + f + ")" : n;
|
|
151
151
|
}
|
|
152
|
-
function
|
|
152
|
+
function ce(e) {
|
|
153
153
|
return e.displayName || "Context";
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function j(e) {
|
|
156
156
|
if (e == null)
|
|
157
157
|
return null;
|
|
158
|
-
if (typeof e.tag == "number" &&
|
|
158
|
+
if (typeof e.tag == "number" && h("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
159
159
|
return e.displayName || e.name || null;
|
|
160
160
|
if (typeof e == "string")
|
|
161
161
|
return e;
|
|
162
162
|
switch (e) {
|
|
163
|
-
case
|
|
163
|
+
case m:
|
|
164
164
|
return "Fragment";
|
|
165
|
-
case
|
|
165
|
+
case o:
|
|
166
166
|
return "Portal";
|
|
167
|
-
case
|
|
167
|
+
case d:
|
|
168
168
|
return "Profiler";
|
|
169
|
-
case
|
|
169
|
+
case E:
|
|
170
170
|
return "StrictMode";
|
|
171
|
-
case
|
|
171
|
+
case _:
|
|
172
172
|
return "Suspense";
|
|
173
173
|
case g:
|
|
174
174
|
return "SuspenseList";
|
|
@@ -177,19 +177,19 @@ function Jr() {
|
|
|
177
177
|
switch (e.$$typeof) {
|
|
178
178
|
case u:
|
|
179
179
|
var r = e;
|
|
180
|
-
return
|
|
180
|
+
return ce(r) + ".Consumer";
|
|
181
181
|
case R:
|
|
182
182
|
var n = e;
|
|
183
|
-
return
|
|
184
|
-
case
|
|
185
|
-
return
|
|
186
|
-
case
|
|
183
|
+
return ce(n._context) + ".Provider";
|
|
184
|
+
case l:
|
|
185
|
+
return be(e, e.render, "ForwardRef");
|
|
186
|
+
case C:
|
|
187
187
|
var i = e.displayName || null;
|
|
188
|
-
return i !== null ? i :
|
|
189
|
-
case
|
|
188
|
+
return i !== null ? i : j(e.type) || "Memo";
|
|
189
|
+
case O: {
|
|
190
190
|
var f = e, v = f._payload, s = f._init;
|
|
191
191
|
try {
|
|
192
|
-
return
|
|
192
|
+
return j(s(v));
|
|
193
193
|
} catch {
|
|
194
194
|
return null;
|
|
195
195
|
}
|
|
@@ -197,14 +197,14 @@ function Jr() {
|
|
|
197
197
|
}
|
|
198
198
|
return null;
|
|
199
199
|
}
|
|
200
|
-
var
|
|
200
|
+
var $ = Object.assign, p = 0, S, L, Fe, Ne, Me, $e, Ie;
|
|
201
201
|
function We() {
|
|
202
202
|
}
|
|
203
203
|
We.__reactDisabledLog = !0;
|
|
204
|
-
function
|
|
204
|
+
function ur() {
|
|
205
205
|
{
|
|
206
|
-
if (
|
|
207
|
-
|
|
206
|
+
if (p === 0) {
|
|
207
|
+
S = console.log, L = console.info, Fe = console.warn, Ne = console.error, Me = console.group, $e = console.groupCollapsed, Ie = console.groupEnd;
|
|
208
208
|
var e = {
|
|
209
209
|
configurable: !0,
|
|
210
210
|
enumerable: !0,
|
|
@@ -221,77 +221,77 @@ function Jr() {
|
|
|
221
221
|
groupEnd: e
|
|
222
222
|
});
|
|
223
223
|
}
|
|
224
|
-
|
|
224
|
+
p++;
|
|
225
225
|
}
|
|
226
226
|
}
|
|
227
|
-
function
|
|
227
|
+
function lr() {
|
|
228
228
|
{
|
|
229
|
-
if (
|
|
229
|
+
if (p--, p === 0) {
|
|
230
230
|
var e = {
|
|
231
231
|
configurable: !0,
|
|
232
232
|
enumerable: !0,
|
|
233
233
|
writable: !0
|
|
234
234
|
};
|
|
235
235
|
Object.defineProperties(console, {
|
|
236
|
-
log:
|
|
237
|
-
value:
|
|
236
|
+
log: $({}, e, {
|
|
237
|
+
value: S
|
|
238
238
|
}),
|
|
239
|
-
info:
|
|
240
|
-
value:
|
|
239
|
+
info: $({}, e, {
|
|
240
|
+
value: L
|
|
241
241
|
}),
|
|
242
|
-
warn:
|
|
242
|
+
warn: $({}, e, {
|
|
243
243
|
value: Fe
|
|
244
244
|
}),
|
|
245
|
-
error:
|
|
245
|
+
error: $({}, e, {
|
|
246
246
|
value: Ne
|
|
247
247
|
}),
|
|
248
|
-
group:
|
|
248
|
+
group: $({}, e, {
|
|
249
|
+
value: Me
|
|
250
|
+
}),
|
|
251
|
+
groupCollapsed: $({}, e, {
|
|
249
252
|
value: $e
|
|
250
253
|
}),
|
|
251
|
-
|
|
254
|
+
groupEnd: $({}, e, {
|
|
252
255
|
value: Ie
|
|
253
|
-
}),
|
|
254
|
-
groupEnd: p({}, e, {
|
|
255
|
-
value: Me
|
|
256
256
|
})
|
|
257
257
|
});
|
|
258
258
|
}
|
|
259
|
-
|
|
259
|
+
p < 0 && h("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
260
260
|
}
|
|
261
261
|
}
|
|
262
|
-
var
|
|
263
|
-
function
|
|
262
|
+
var ye = w.ReactCurrentDispatcher, we;
|
|
263
|
+
function se(e, r, n) {
|
|
264
264
|
{
|
|
265
|
-
if (
|
|
265
|
+
if (we === void 0)
|
|
266
266
|
try {
|
|
267
267
|
throw Error();
|
|
268
268
|
} catch (f) {
|
|
269
269
|
var i = f.stack.trim().match(/\n( *(at )?)/);
|
|
270
|
-
|
|
270
|
+
we = i && i[1] || "";
|
|
271
271
|
}
|
|
272
272
|
return `
|
|
273
|
-
` +
|
|
273
|
+
` + we + e;
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
|
-
var
|
|
276
|
+
var Ee = !1, ue;
|
|
277
277
|
{
|
|
278
|
-
var
|
|
279
|
-
|
|
278
|
+
var fr = typeof WeakMap == "function" ? WeakMap : Map;
|
|
279
|
+
ue = new fr();
|
|
280
280
|
}
|
|
281
281
|
function Le(e, r) {
|
|
282
|
-
if (!e ||
|
|
282
|
+
if (!e || Ee)
|
|
283
283
|
return "";
|
|
284
284
|
{
|
|
285
|
-
var n =
|
|
285
|
+
var n = ue.get(e);
|
|
286
286
|
if (n !== void 0)
|
|
287
287
|
return n;
|
|
288
288
|
}
|
|
289
289
|
var i;
|
|
290
|
-
|
|
290
|
+
Ee = !0;
|
|
291
291
|
var f = Error.prepareStackTrace;
|
|
292
292
|
Error.prepareStackTrace = void 0;
|
|
293
293
|
var v;
|
|
294
|
-
v =
|
|
294
|
+
v = ye.current, ye.current = null, ur();
|
|
295
295
|
try {
|
|
296
296
|
if (r) {
|
|
297
297
|
var s = function() {
|
|
@@ -304,125 +304,125 @@ function Jr() {
|
|
|
304
304
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
305
305
|
try {
|
|
306
306
|
Reflect.construct(s, []);
|
|
307
|
-
} catch (
|
|
308
|
-
i =
|
|
307
|
+
} catch (T) {
|
|
308
|
+
i = T;
|
|
309
309
|
}
|
|
310
310
|
Reflect.construct(e, [], s);
|
|
311
311
|
} else {
|
|
312
312
|
try {
|
|
313
313
|
s.call();
|
|
314
|
-
} catch (
|
|
315
|
-
i =
|
|
314
|
+
} catch (T) {
|
|
315
|
+
i = T;
|
|
316
316
|
}
|
|
317
317
|
e.call(s.prototype);
|
|
318
318
|
}
|
|
319
319
|
} else {
|
|
320
320
|
try {
|
|
321
321
|
throw Error();
|
|
322
|
-
} catch (
|
|
323
|
-
i =
|
|
322
|
+
} catch (T) {
|
|
323
|
+
i = T;
|
|
324
324
|
}
|
|
325
325
|
e();
|
|
326
326
|
}
|
|
327
|
-
} catch (
|
|
328
|
-
if (
|
|
329
|
-
for (var c =
|
|
330
|
-
`),
|
|
331
|
-
`), b = c.length - 1, y =
|
|
327
|
+
} catch (T) {
|
|
328
|
+
if (T && i && typeof T.stack == "string") {
|
|
329
|
+
for (var c = T.stack.split(`
|
|
330
|
+
`), P = i.stack.split(`
|
|
331
|
+
`), b = c.length - 1, y = P.length - 1; b >= 1 && y >= 0 && c[b] !== P[y]; )
|
|
332
332
|
y--;
|
|
333
333
|
for (; b >= 1 && y >= 0; b--, y--)
|
|
334
|
-
if (c[b] !==
|
|
334
|
+
if (c[b] !== P[y]) {
|
|
335
335
|
if (b !== 1 || y !== 1)
|
|
336
336
|
do
|
|
337
|
-
if (b--, y--, y < 0 || c[b] !==
|
|
338
|
-
var
|
|
337
|
+
if (b--, y--, y < 0 || c[b] !== P[y]) {
|
|
338
|
+
var A = `
|
|
339
339
|
` + c[b].replace(" at new ", " at ");
|
|
340
|
-
return e.displayName &&
|
|
340
|
+
return e.displayName && A.includes("<anonymous>") && (A = A.replace("<anonymous>", e.displayName)), typeof e == "function" && ue.set(e, A), A;
|
|
341
341
|
}
|
|
342
342
|
while (b >= 1 && y >= 0);
|
|
343
343
|
break;
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
346
|
} finally {
|
|
347
|
-
|
|
347
|
+
Ee = !1, ye.current = v, lr(), Error.prepareStackTrace = f;
|
|
348
348
|
}
|
|
349
|
-
var
|
|
350
|
-
return typeof e == "function" &&
|
|
349
|
+
var q = e ? e.displayName || e.name : "", Y = q ? se(q) : "";
|
|
350
|
+
return typeof e == "function" && ue.set(e, Y), Y;
|
|
351
351
|
}
|
|
352
|
-
function
|
|
352
|
+
function dr(e, r, n) {
|
|
353
353
|
return Le(e, !1);
|
|
354
354
|
}
|
|
355
|
-
function
|
|
355
|
+
function pr(e) {
|
|
356
356
|
var r = e.prototype;
|
|
357
357
|
return !!(r && r.isReactComponent);
|
|
358
358
|
}
|
|
359
|
-
function
|
|
359
|
+
function le(e, r, n) {
|
|
360
360
|
if (e == null)
|
|
361
361
|
return "";
|
|
362
362
|
if (typeof e == "function")
|
|
363
|
-
return Le(e,
|
|
363
|
+
return Le(e, pr(e));
|
|
364
364
|
if (typeof e == "string")
|
|
365
|
-
return
|
|
365
|
+
return se(e);
|
|
366
366
|
switch (e) {
|
|
367
|
-
case
|
|
368
|
-
return
|
|
367
|
+
case _:
|
|
368
|
+
return se("Suspense");
|
|
369
369
|
case g:
|
|
370
|
-
return
|
|
370
|
+
return se("SuspenseList");
|
|
371
371
|
}
|
|
372
372
|
if (typeof e == "object")
|
|
373
373
|
switch (e.$$typeof) {
|
|
374
|
-
case
|
|
375
|
-
return
|
|
376
|
-
case
|
|
377
|
-
return
|
|
378
|
-
case
|
|
374
|
+
case l:
|
|
375
|
+
return dr(e.render);
|
|
376
|
+
case C:
|
|
377
|
+
return le(e.type, r, n);
|
|
378
|
+
case O: {
|
|
379
379
|
var i = e, f = i._payload, v = i._init;
|
|
380
380
|
try {
|
|
381
|
-
return
|
|
381
|
+
return le(v(f), r, n);
|
|
382
382
|
} catch {
|
|
383
383
|
}
|
|
384
384
|
}
|
|
385
385
|
}
|
|
386
386
|
return "";
|
|
387
387
|
}
|
|
388
|
-
var
|
|
389
|
-
function
|
|
388
|
+
var G = Object.prototype.hasOwnProperty, Ve = {}, Ye = w.ReactDebugCurrentFrame;
|
|
389
|
+
function fe(e) {
|
|
390
390
|
if (e) {
|
|
391
|
-
var r = e._owner, n =
|
|
391
|
+
var r = e._owner, n = le(e.type, e._source, r ? r.type : null);
|
|
392
392
|
Ye.setExtraStackFrame(n);
|
|
393
393
|
} else
|
|
394
394
|
Ye.setExtraStackFrame(null);
|
|
395
395
|
}
|
|
396
|
-
function
|
|
396
|
+
function vr(e, r, n, i, f) {
|
|
397
397
|
{
|
|
398
|
-
var v = Function.call.bind(
|
|
398
|
+
var v = Function.call.bind(G);
|
|
399
399
|
for (var s in e)
|
|
400
400
|
if (v(e, s)) {
|
|
401
401
|
var c = void 0;
|
|
402
402
|
try {
|
|
403
403
|
if (typeof e[s] != "function") {
|
|
404
|
-
var
|
|
405
|
-
throw
|
|
404
|
+
var P = Error((i || "React class") + ": " + n + " type `" + s + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[s] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
405
|
+
throw P.name = "Invariant Violation", P;
|
|
406
406
|
}
|
|
407
407
|
c = e[s](r, s, i, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
408
408
|
} catch (b) {
|
|
409
409
|
c = b;
|
|
410
410
|
}
|
|
411
|
-
c && !(c instanceof Error) && (
|
|
411
|
+
c && !(c instanceof Error) && (fe(f), h("%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).", i || "React class", n, s, typeof c), fe(null)), c instanceof Error && !(c.message in Ve) && (Ve[c.message] = !0, fe(f), h("Failed %s type: %s", n, c.message), fe(null));
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
414
|
}
|
|
415
|
-
var
|
|
416
|
-
function
|
|
417
|
-
return
|
|
415
|
+
var mr = Array.isArray;
|
|
416
|
+
function _e(e) {
|
|
417
|
+
return mr(e);
|
|
418
418
|
}
|
|
419
|
-
function
|
|
419
|
+
function hr(e) {
|
|
420
420
|
{
|
|
421
421
|
var r = typeof Symbol == "function" && Symbol.toStringTag, n = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
422
422
|
return n;
|
|
423
423
|
}
|
|
424
424
|
}
|
|
425
|
-
function
|
|
425
|
+
function gr(e) {
|
|
426
426
|
try {
|
|
427
427
|
return Ue(e), !1;
|
|
428
428
|
} catch {
|
|
@@ -433,42 +433,42 @@ function Jr() {
|
|
|
433
433
|
return "" + e;
|
|
434
434
|
}
|
|
435
435
|
function He(e) {
|
|
436
|
-
if (
|
|
437
|
-
return
|
|
436
|
+
if (gr(e))
|
|
437
|
+
return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", hr(e)), Ue(e);
|
|
438
438
|
}
|
|
439
|
-
var
|
|
439
|
+
var X = w.ReactCurrentOwner, br = {
|
|
440
440
|
key: !0,
|
|
441
441
|
ref: !0,
|
|
442
442
|
__self: !0,
|
|
443
443
|
__source: !0
|
|
444
|
-
}, Be, Je,
|
|
445
|
-
|
|
446
|
-
function
|
|
447
|
-
if (
|
|
444
|
+
}, Be, Je, ke;
|
|
445
|
+
ke = {};
|
|
446
|
+
function yr(e) {
|
|
447
|
+
if (G.call(e, "ref")) {
|
|
448
448
|
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
449
449
|
if (r && r.isReactWarning)
|
|
450
450
|
return !1;
|
|
451
451
|
}
|
|
452
452
|
return e.ref !== void 0;
|
|
453
453
|
}
|
|
454
|
-
function
|
|
455
|
-
if (
|
|
454
|
+
function wr(e) {
|
|
455
|
+
if (G.call(e, "key")) {
|
|
456
456
|
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
457
457
|
if (r && r.isReactWarning)
|
|
458
458
|
return !1;
|
|
459
459
|
}
|
|
460
460
|
return e.key !== void 0;
|
|
461
461
|
}
|
|
462
|
-
function
|
|
463
|
-
if (typeof e.ref == "string" &&
|
|
464
|
-
var n =
|
|
465
|
-
|
|
462
|
+
function Er(e, r) {
|
|
463
|
+
if (typeof e.ref == "string" && X.current && r && X.current.stateNode !== r) {
|
|
464
|
+
var n = j(X.current.type);
|
|
465
|
+
ke[n] || (h('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', j(X.current.type), e.ref), ke[n] = !0);
|
|
466
466
|
}
|
|
467
467
|
}
|
|
468
|
-
function
|
|
468
|
+
function _r(e, r) {
|
|
469
469
|
{
|
|
470
470
|
var n = function() {
|
|
471
|
-
Be || (Be = !0,
|
|
471
|
+
Be || (Be = !0, h("%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));
|
|
472
472
|
};
|
|
473
473
|
n.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
474
474
|
get: n,
|
|
@@ -476,10 +476,10 @@ function Jr() {
|
|
|
476
476
|
});
|
|
477
477
|
}
|
|
478
478
|
}
|
|
479
|
-
function
|
|
479
|
+
function kr(e, r) {
|
|
480
480
|
{
|
|
481
481
|
var n = function() {
|
|
482
|
-
Je || (Je = !0,
|
|
482
|
+
Je || (Je = !0, h("%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));
|
|
483
483
|
};
|
|
484
484
|
n.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
485
485
|
get: n,
|
|
@@ -487,10 +487,10 @@ function Jr() {
|
|
|
487
487
|
});
|
|
488
488
|
}
|
|
489
489
|
}
|
|
490
|
-
var
|
|
490
|
+
var Rr = function(e, r, n, i, f, v, s) {
|
|
491
491
|
var c = {
|
|
492
492
|
// This tag allows us to uniquely identify this as a React Element
|
|
493
|
-
$$typeof:
|
|
493
|
+
$$typeof: a,
|
|
494
494
|
// Built-in properties that belong on the element
|
|
495
495
|
type: e,
|
|
496
496
|
key: r,
|
|
@@ -516,41 +516,41 @@ function Jr() {
|
|
|
516
516
|
value: f
|
|
517
517
|
}), Object.freeze && (Object.freeze(c.props), Object.freeze(c)), c;
|
|
518
518
|
};
|
|
519
|
-
function
|
|
519
|
+
function Pr(e, r, n, i, f) {
|
|
520
520
|
{
|
|
521
|
-
var v, s = {}, c = null,
|
|
522
|
-
n !== void 0 && (He(n), c = "" + n),
|
|
521
|
+
var v, s = {}, c = null, P = null;
|
|
522
|
+
n !== void 0 && (He(n), c = "" + n), wr(r) && (He(r.key), c = "" + r.key), yr(r) && (P = r.ref, Er(r, f));
|
|
523
523
|
for (v in r)
|
|
524
|
-
|
|
524
|
+
G.call(r, v) && !br.hasOwnProperty(v) && (s[v] = r[v]);
|
|
525
525
|
if (e && e.defaultProps) {
|
|
526
526
|
var b = e.defaultProps;
|
|
527
527
|
for (v in b)
|
|
528
528
|
s[v] === void 0 && (s[v] = b[v]);
|
|
529
529
|
}
|
|
530
|
-
if (c ||
|
|
530
|
+
if (c || P) {
|
|
531
531
|
var y = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
532
|
-
c &&
|
|
532
|
+
c && _r(s, y), P && kr(s, y);
|
|
533
533
|
}
|
|
534
|
-
return
|
|
534
|
+
return Rr(e, c, P, f, i, X.current, s);
|
|
535
535
|
}
|
|
536
536
|
}
|
|
537
537
|
var Re = w.ReactCurrentOwner, qe = w.ReactDebugCurrentFrame;
|
|
538
|
-
function
|
|
538
|
+
function J(e) {
|
|
539
539
|
if (e) {
|
|
540
|
-
var r = e._owner, n =
|
|
540
|
+
var r = e._owner, n = le(e.type, e._source, r ? r.type : null);
|
|
541
541
|
qe.setExtraStackFrame(n);
|
|
542
542
|
} else
|
|
543
543
|
qe.setExtraStackFrame(null);
|
|
544
544
|
}
|
|
545
|
-
var
|
|
546
|
-
|
|
547
|
-
function
|
|
548
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
545
|
+
var Pe;
|
|
546
|
+
Pe = !1;
|
|
547
|
+
function Ce(e) {
|
|
548
|
+
return typeof e == "object" && e !== null && e.$$typeof === a;
|
|
549
549
|
}
|
|
550
550
|
function ze() {
|
|
551
551
|
{
|
|
552
552
|
if (Re.current) {
|
|
553
|
-
var e =
|
|
553
|
+
var e = j(Re.current.type);
|
|
554
554
|
if (e)
|
|
555
555
|
return `
|
|
556
556
|
|
|
@@ -559,7 +559,7 @@ Check the render method of \`` + e + "`.";
|
|
|
559
559
|
return "";
|
|
560
560
|
}
|
|
561
561
|
}
|
|
562
|
-
function
|
|
562
|
+
function Cr(e) {
|
|
563
563
|
{
|
|
564
564
|
if (e !== void 0) {
|
|
565
565
|
var r = e.fileName.replace(/^.*[\\\/]/, ""), n = e.lineNumber;
|
|
@@ -571,7 +571,7 @@ Check your code at ` + r + ":" + n + ".";
|
|
|
571
571
|
}
|
|
572
572
|
}
|
|
573
573
|
var Ge = {};
|
|
574
|
-
function
|
|
574
|
+
function xr(e) {
|
|
575
575
|
{
|
|
576
576
|
var r = ze();
|
|
577
577
|
if (!r) {
|
|
@@ -588,34 +588,34 @@ Check the top-level render call using <` + n + ">.");
|
|
|
588
588
|
if (!e._store || e._store.validated || e.key != null)
|
|
589
589
|
return;
|
|
590
590
|
e._store.validated = !0;
|
|
591
|
-
var n =
|
|
591
|
+
var n = xr(r);
|
|
592
592
|
if (Ge[n])
|
|
593
593
|
return;
|
|
594
594
|
Ge[n] = !0;
|
|
595
595
|
var i = "";
|
|
596
|
-
e && e._owner && e._owner !== Re.current && (i = " It was passed a child from " +
|
|
596
|
+
e && e._owner && e._owner !== Re.current && (i = " It was passed a child from " + j(e._owner.type) + "."), J(e), h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', n, i), J(null);
|
|
597
597
|
}
|
|
598
598
|
}
|
|
599
599
|
function Ze(e, r) {
|
|
600
600
|
{
|
|
601
601
|
if (typeof e != "object")
|
|
602
602
|
return;
|
|
603
|
-
if (
|
|
603
|
+
if (_e(e))
|
|
604
604
|
for (var n = 0; n < e.length; n++) {
|
|
605
605
|
var i = e[n];
|
|
606
|
-
|
|
606
|
+
Ce(i) && Xe(i, r);
|
|
607
607
|
}
|
|
608
|
-
else if (
|
|
608
|
+
else if (Ce(e))
|
|
609
609
|
e._store && (e._store.validated = !0);
|
|
610
610
|
else if (e) {
|
|
611
611
|
var f = F(e);
|
|
612
612
|
if (typeof f == "function" && f !== e.entries)
|
|
613
613
|
for (var v = f.call(e), s; !(s = v.next()).done; )
|
|
614
|
-
|
|
614
|
+
Ce(s.value) && Xe(s.value, r);
|
|
615
615
|
}
|
|
616
616
|
}
|
|
617
617
|
}
|
|
618
|
-
function
|
|
618
|
+
function Sr(e) {
|
|
619
619
|
{
|
|
620
620
|
var r = e.type;
|
|
621
621
|
if (r == null || typeof r == "string")
|
|
@@ -623,159 +623,159 @@ Check the top-level render call using <` + n + ">.");
|
|
|
623
623
|
var n;
|
|
624
624
|
if (typeof r == "function")
|
|
625
625
|
n = r.propTypes;
|
|
626
|
-
else if (typeof r == "object" && (r.$$typeof ===
|
|
626
|
+
else if (typeof r == "object" && (r.$$typeof === l || // Note: Memo only checks outer props here.
|
|
627
627
|
// Inner props are checked in the reconciler.
|
|
628
|
-
r.$$typeof ===
|
|
628
|
+
r.$$typeof === C))
|
|
629
629
|
n = r.propTypes;
|
|
630
630
|
else
|
|
631
631
|
return;
|
|
632
632
|
if (n) {
|
|
633
|
-
var i =
|
|
634
|
-
|
|
635
|
-
} else if (r.PropTypes !== void 0 && !
|
|
636
|
-
|
|
637
|
-
var f =
|
|
638
|
-
|
|
633
|
+
var i = j(r);
|
|
634
|
+
vr(n, e.props, "prop", i, e);
|
|
635
|
+
} else if (r.PropTypes !== void 0 && !Pe) {
|
|
636
|
+
Pe = !0;
|
|
637
|
+
var f = j(r);
|
|
638
|
+
h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", f || "Unknown");
|
|
639
639
|
}
|
|
640
|
-
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved &&
|
|
640
|
+
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
641
641
|
}
|
|
642
642
|
}
|
|
643
|
-
function
|
|
643
|
+
function Tr(e) {
|
|
644
644
|
{
|
|
645
645
|
for (var r = Object.keys(e.props), n = 0; n < r.length; n++) {
|
|
646
646
|
var i = r[n];
|
|
647
647
|
if (i !== "children" && i !== "key") {
|
|
648
|
-
|
|
648
|
+
J(e), h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", i), J(null);
|
|
649
649
|
break;
|
|
650
650
|
}
|
|
651
651
|
}
|
|
652
|
-
e.ref !== null && (
|
|
652
|
+
e.ref !== null && (J(e), h("Invalid attribute `ref` supplied to `React.Fragment`."), J(null));
|
|
653
653
|
}
|
|
654
654
|
}
|
|
655
655
|
var Qe = {};
|
|
656
656
|
function Ke(e, r, n, i, f, v) {
|
|
657
657
|
{
|
|
658
|
-
var s =
|
|
658
|
+
var s = ge(e);
|
|
659
659
|
if (!s) {
|
|
660
660
|
var c = "";
|
|
661
661
|
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (c += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
662
|
-
var
|
|
663
|
-
|
|
662
|
+
var P = Cr(f);
|
|
663
|
+
P ? c += P : c += ze();
|
|
664
664
|
var b;
|
|
665
|
-
e === null ? b = "null" :
|
|
665
|
+
e === null ? b = "null" : _e(e) ? b = "array" : e !== void 0 && e.$$typeof === a ? (b = "<" + (j(e.type) || "Unknown") + " />", c = " Did you accidentally export a JSX literal instead of a component?") : b = typeof e, h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", b, c);
|
|
666
666
|
}
|
|
667
|
-
var y =
|
|
667
|
+
var y = Pr(e, r, n, f, v);
|
|
668
668
|
if (y == null)
|
|
669
669
|
return y;
|
|
670
670
|
if (s) {
|
|
671
|
-
var
|
|
672
|
-
if (
|
|
671
|
+
var A = r.children;
|
|
672
|
+
if (A !== void 0)
|
|
673
673
|
if (i)
|
|
674
|
-
if (
|
|
675
|
-
for (var
|
|
676
|
-
Ze(
|
|
677
|
-
Object.freeze && Object.freeze(
|
|
674
|
+
if (_e(A)) {
|
|
675
|
+
for (var q = 0; q < A.length; q++)
|
|
676
|
+
Ze(A[q], e);
|
|
677
|
+
Object.freeze && Object.freeze(A);
|
|
678
678
|
} else
|
|
679
|
-
|
|
679
|
+
h("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
680
680
|
else
|
|
681
|
-
Ze(
|
|
681
|
+
Ze(A, e);
|
|
682
682
|
}
|
|
683
|
-
if (
|
|
684
|
-
var Y =
|
|
685
|
-
return
|
|
686
|
-
}),
|
|
687
|
-
if (!Qe[Y +
|
|
688
|
-
var
|
|
689
|
-
|
|
683
|
+
if (G.call(r, "key")) {
|
|
684
|
+
var Y = j(e), T = Object.keys(r).filter(function(Nr) {
|
|
685
|
+
return Nr !== "key";
|
|
686
|
+
}), xe = T.length > 0 ? "{key: someKey, " + T.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
687
|
+
if (!Qe[Y + xe]) {
|
|
688
|
+
var Fr = T.length > 0 ? "{" + T.join(": ..., ") + ": ...}" : "{}";
|
|
689
|
+
h(`A props object containing a "key" prop is being spread into JSX:
|
|
690
690
|
let props = %s;
|
|
691
691
|
<%s {...props} />
|
|
692
692
|
React keys must be passed directly to JSX without using spread:
|
|
693
693
|
let props = %s;
|
|
694
|
-
<%s key={someKey} {...props} />`,
|
|
694
|
+
<%s key={someKey} {...props} />`, xe, Y, Fr, Y), Qe[Y + xe] = !0;
|
|
695
695
|
}
|
|
696
696
|
}
|
|
697
|
-
return e ===
|
|
697
|
+
return e === m ? Tr(y) : Sr(y), y;
|
|
698
698
|
}
|
|
699
699
|
}
|
|
700
|
-
function
|
|
700
|
+
function Or(e, r, n) {
|
|
701
701
|
return Ke(e, r, n, !0);
|
|
702
702
|
}
|
|
703
|
-
function
|
|
703
|
+
function jr(e, r, n) {
|
|
704
704
|
return Ke(e, r, n, !1);
|
|
705
705
|
}
|
|
706
|
-
var
|
|
707
|
-
|
|
708
|
-
}()),
|
|
706
|
+
var Ar = jr, Dr = Or;
|
|
707
|
+
Q.Fragment = m, Q.jsx = Ar, Q.jsxs = Dr;
|
|
708
|
+
}()), Q;
|
|
709
709
|
}
|
|
710
|
-
process.env.NODE_ENV === "production" ?
|
|
711
|
-
var
|
|
712
|
-
class
|
|
713
|
-
constructor(
|
|
714
|
-
super(
|
|
710
|
+
process.env.NODE_ENV === "production" ? Te.exports = Jr() : Te.exports = qr();
|
|
711
|
+
var k = Te.exports, zr = Object.defineProperty, Gr = (t, a, o) => a in t ? zr(t, a, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[a] = o, Oe = (t, a, o) => (Gr(t, typeof a != "symbol" ? a + "" : a, o), o);
|
|
712
|
+
class cr extends je.Component {
|
|
713
|
+
constructor(a) {
|
|
714
|
+
super(a), Oe(this, "_el"), Oe(this, "renderPortal", () => Ir.createPortal(
|
|
715
715
|
this.props.children,
|
|
716
716
|
this._el
|
|
717
717
|
));
|
|
718
|
-
const
|
|
719
|
-
|
|
718
|
+
const o = document.createElement("div");
|
|
719
|
+
o.id = a.id, a.className && (o.className = a.className), this._el = o;
|
|
720
720
|
}
|
|
721
721
|
get typeProps() {
|
|
722
722
|
return this.props;
|
|
723
723
|
}
|
|
724
724
|
componentDidMount() {
|
|
725
|
-
const
|
|
726
|
-
|
|
725
|
+
const a = this.typeProps.containerSelector();
|
|
726
|
+
a == null || a.appendChild(this._el);
|
|
727
727
|
}
|
|
728
728
|
componentWillUnmount() {
|
|
729
|
-
const
|
|
730
|
-
|
|
729
|
+
const a = this.typeProps.containerSelector();
|
|
730
|
+
a == null || a.removeChild(this._el);
|
|
731
731
|
}
|
|
732
732
|
render() {
|
|
733
733
|
return this.renderPortal();
|
|
734
734
|
}
|
|
735
735
|
}
|
|
736
|
-
|
|
736
|
+
Oe(cr, "defaultProps", {
|
|
737
737
|
containerSelector: () => document.body
|
|
738
738
|
});
|
|
739
|
-
function
|
|
740
|
-
var
|
|
741
|
-
return
|
|
739
|
+
function ve(t) {
|
|
740
|
+
var a = new Error(t);
|
|
741
|
+
return a.source = "ulid", a;
|
|
742
742
|
}
|
|
743
|
-
var
|
|
744
|
-
function
|
|
745
|
-
var
|
|
746
|
-
return
|
|
743
|
+
var De = "0123456789ABCDEFGHJKMNPQRSTVWXYZ", re = De.length, nr = Math.pow(2, 48) - 1, Xr = 10, Zr = 16;
|
|
744
|
+
function Qr(t) {
|
|
745
|
+
var a = Math.floor(t() * re);
|
|
746
|
+
return a === re && (a = re - 1), De.charAt(a);
|
|
747
747
|
}
|
|
748
|
-
function
|
|
748
|
+
function Kr(t, a) {
|
|
749
749
|
if (isNaN(t))
|
|
750
750
|
throw new Error(t + " must be a number");
|
|
751
|
-
if (t >
|
|
752
|
-
throw
|
|
751
|
+
if (t > nr)
|
|
752
|
+
throw ve("cannot encode time greater than " + nr);
|
|
753
753
|
if (t < 0)
|
|
754
|
-
throw
|
|
754
|
+
throw ve("time must be positive");
|
|
755
755
|
if (Number.isInteger(t) === !1)
|
|
756
|
-
throw
|
|
757
|
-
for (var
|
|
758
|
-
|
|
759
|
-
return
|
|
756
|
+
throw ve("time must be an integer");
|
|
757
|
+
for (var o = void 0, m = ""; a > 0; a--)
|
|
758
|
+
o = t % re, m = De.charAt(o) + m, t = (t - o) / re;
|
|
759
|
+
return m;
|
|
760
760
|
}
|
|
761
|
-
function
|
|
762
|
-
for (var
|
|
763
|
-
|
|
764
|
-
return
|
|
761
|
+
function et(t, a) {
|
|
762
|
+
for (var o = ""; t > 0; t--)
|
|
763
|
+
o = Qr(a) + o;
|
|
764
|
+
return o;
|
|
765
765
|
}
|
|
766
|
-
function
|
|
767
|
-
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1,
|
|
768
|
-
|
|
769
|
-
var
|
|
770
|
-
if (
|
|
766
|
+
function rt() {
|
|
767
|
+
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, a = arguments[1];
|
|
768
|
+
a || (a = typeof window < "u" ? window : null);
|
|
769
|
+
var o = a && (a.crypto || a.msCrypto);
|
|
770
|
+
if (o)
|
|
771
771
|
return function() {
|
|
772
|
-
var
|
|
773
|
-
return
|
|
772
|
+
var E = new Uint8Array(1);
|
|
773
|
+
return o.getRandomValues(E), E[0] / 255;
|
|
774
774
|
};
|
|
775
775
|
try {
|
|
776
|
-
var
|
|
776
|
+
var m = require("crypto");
|
|
777
777
|
return function() {
|
|
778
|
-
return
|
|
778
|
+
return m.randomBytes(1).readUInt8() / 255;
|
|
779
779
|
};
|
|
780
780
|
} catch {
|
|
781
781
|
}
|
|
@@ -788,231 +788,250 @@ function et() {
|
|
|
788
788
|
return Math.random();
|
|
789
789
|
};
|
|
790
790
|
}
|
|
791
|
-
throw
|
|
791
|
+
throw ve("secure crypto unusable, insecure Math.random not allowed");
|
|
792
792
|
}
|
|
793
|
-
function
|
|
794
|
-
return t || (t =
|
|
795
|
-
return isNaN(
|
|
793
|
+
function tt(t) {
|
|
794
|
+
return t || (t = rt()), function(o) {
|
|
795
|
+
return isNaN(o) && (o = Date.now()), Kr(o, Xr) + et(Zr, t);
|
|
796
796
|
};
|
|
797
797
|
}
|
|
798
|
-
var
|
|
799
|
-
const
|
|
798
|
+
var nt = tt(), U = /* @__PURE__ */ ((t) => (t.Escape = "Escape", t.Enter = "Enter", t.Space = "Space", t.Tab = "Tab", t.ShiftAndTab = "Shift+Tab", t.ArrowUp = "ArrowUp", t.ArrowDown = "ArrowDown", t.ArrowLeft = "ArrowLeft", t.ArrowRight = "ArrowRight", t))(U || {});
|
|
799
|
+
const ar = ({
|
|
800
800
|
onMousedown: t
|
|
801
|
-
}) => (
|
|
801
|
+
}) => (z(() => (document.addEventListener("mousedown", t), () => {
|
|
802
802
|
document.removeEventListener("mousedown", t);
|
|
803
|
-
}), []), null),
|
|
803
|
+
}), []), null), at = ({
|
|
804
804
|
onPickerHide: t
|
|
805
|
-
}) => (
|
|
805
|
+
}) => (z(() => () => {
|
|
806
806
|
t();
|
|
807
|
-
}, []), null), ot = "acrool-react-picker__main-el",
|
|
807
|
+
}, []), null), ot = "acrool-react-picker__main-el", it = "acrool-react-picker__picker-el", or = {
|
|
808
808
|
"main-el": "acrool-react-picker__main-el",
|
|
809
809
|
mainEl: ot,
|
|
810
810
|
"picker-el": "acrool-react-picker__picker-el",
|
|
811
|
-
pickerEl:
|
|
812
|
-
},
|
|
813
|
-
|
|
814
|
-
},
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
for (; o; ) {
|
|
823
|
-
const { overflowY: a, position: h } = window.getComputedStyle(o);
|
|
824
|
-
if ((a === "auto" || a === "scroll") && o.scrollHeight > o.clientHeight)
|
|
825
|
-
return fe.set(t, o), o;
|
|
826
|
-
o = o.parentElement;
|
|
811
|
+
pickerEl: it
|
|
812
|
+
}, sr = (t, a) => (o) => {
|
|
813
|
+
a.current = o, t && (typeof t == "function" ? t(o) : t && (t.current = o));
|
|
814
|
+
}, ct = {
|
|
815
|
+
variants: {
|
|
816
|
+
initial: { opacity: 0, transition: { type: "spring" } },
|
|
817
|
+
animate: { opacity: 1, transition: { type: "just" } },
|
|
818
|
+
exit: { opacity: 0 }
|
|
819
|
+
},
|
|
820
|
+
transition: {
|
|
821
|
+
duration: 0.3
|
|
827
822
|
}
|
|
828
|
-
|
|
829
|
-
}
|
|
830
|
-
const ut = (t, o, a, h) => {
|
|
831
|
-
var V;
|
|
832
|
-
const _ = (V = t.current) == null ? void 0 : V.firstChild, l = o.current;
|
|
833
|
-
if (!_ || !l)
|
|
834
|
-
return;
|
|
835
|
-
const R = l.getBoundingClientRect(), u = _.getBoundingClientRect(), d = window.innerHeight, A = window.innerWidth, g = window.pageYOffset || document.documentElement.scrollTop, P = window.pageXOffset || document.documentElement.scrollLeft, T = 8, C = u.top - T, $ = d - u.bottom - T;
|
|
836
|
-
let D = (h == null ? void 0 : h.vertical) ?? ($ >= C ? I.bottom : I.top), F = D === I.bottom ? $ : C;
|
|
837
|
-
const w = R.width, m = u.left + w < A, H = u.right - w > 0;
|
|
838
|
-
let M = (h == null ? void 0 : h.horizontal) ?? K.left;
|
|
839
|
-
!m && H ? M = K.right : !m && !H && (M = K.left), a(D), l.style.top = D === I.bottom ? `${u.bottom + g}px` : `${u.top + g - F}px`, l.style.left = M === K.left ? `${u.left + P}px` : `${u.right + P - w}px`, l.style.minWidth = `${u.width}px`, l.style.height = `${F}px`, l.style.transformOrigin = D === I.bottom ? "top" : "bottom", l.style.flexDirection = D === I.bottom ? "column" : "column-reverse";
|
|
840
|
-
}, lt = {
|
|
823
|
+
}, st = {
|
|
841
824
|
variants: {
|
|
842
825
|
initial: { position: "absolute", zIndex: 999, opacity: 0, transition: { type: "spring" } },
|
|
843
|
-
|
|
826
|
+
animate: { opacity: 1, transition: { type: "just" } },
|
|
844
827
|
exit: { opacity: 0, scale: 0.95 }
|
|
845
828
|
},
|
|
846
829
|
transition: {
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
830
|
+
type: "spring",
|
|
831
|
+
duration: 0.2
|
|
832
|
+
}
|
|
833
|
+
}, ut = "acrool-react-picker__motion-animation-wrapper", lt = "acrool-react-picker__motion-mask-wrapper", ir = {
|
|
834
|
+
"motion-animation-wrapper": "acrool-react-picker__motion-animation-wrapper",
|
|
835
|
+
motionAnimationWrapper: ut,
|
|
836
|
+
"motion-mask-wrapper": "acrool-react-picker__motion-mask-wrapper",
|
|
837
|
+
motionMaskWrapper: lt
|
|
838
|
+
}, pe = /* @__PURE__ */ new WeakMap();
|
|
839
|
+
function ft(t) {
|
|
840
|
+
if (pe.has(t))
|
|
841
|
+
return pe.get(t);
|
|
842
|
+
let a = t.parentElement;
|
|
843
|
+
for (; a; ) {
|
|
844
|
+
const { overflowY: o, position: m } = window.getComputedStyle(a);
|
|
845
|
+
if ((o === "auto" || o === "scroll") && a.scrollHeight > a.clientHeight)
|
|
846
|
+
return pe.set(t, a), a;
|
|
847
|
+
a = a.parentElement;
|
|
854
848
|
}
|
|
855
|
-
|
|
849
|
+
return pe.set(t, window), window;
|
|
850
|
+
}
|
|
851
|
+
const dt = (t, a, o, m) => {
|
|
852
|
+
var B;
|
|
853
|
+
const E = (B = t.current) == null ? void 0 : B.firstChild, d = a.current;
|
|
854
|
+
if (!E || !d)
|
|
855
|
+
return;
|
|
856
|
+
const R = d.getBoundingClientRect(), u = E.getBoundingClientRect(), l = window.innerHeight, _ = window.innerWidth, g = window.pageYOffset || document.documentElement.scrollTop, C = window.pageXOffset || document.documentElement.scrollLeft, O = 8, x = u.top - O, M = l - u.bottom - O;
|
|
857
|
+
let D = (m == null ? void 0 : m.vertical) ?? (M >= x ? I.bottom : I.top), F = D === I.bottom ? M : x;
|
|
858
|
+
const w = R.width, h = u.left + w < _, H = u.right - w > 0;
|
|
859
|
+
let W = (m == null ? void 0 : m.horizontal) ?? ee.left;
|
|
860
|
+
!h && H ? W = ee.right : !h && !H && (W = ee.left), o(D), d.style.top = D === I.bottom ? `${u.bottom + g}px` : `${u.top + g - F}px`, d.style.left = W === ee.left ? `${u.left + C}px` : `${u.right + C - w}px`, d.style.minWidth = `${u.width}px`, d.style.height = `${F}px`, d.style.transformOrigin = D === I.bottom ? "top" : "bottom", d.style.flexDirection = D === I.bottom ? "column" : "column-reverse";
|
|
861
|
+
}, pt = ({
|
|
856
862
|
children: t,
|
|
857
|
-
isDebug:
|
|
858
|
-
anchorRef:
|
|
859
|
-
onKeyDown:
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
R
|
|
866
|
-
|
|
863
|
+
isDebug: a = !1,
|
|
864
|
+
anchorRef: o,
|
|
865
|
+
onKeyDown: m,
|
|
866
|
+
isVisibleMask: E
|
|
867
|
+
}, d) => {
|
|
868
|
+
const R = K(null), u = Br(), l = N(() => {
|
|
869
|
+
dt(
|
|
870
|
+
o,
|
|
871
|
+
R,
|
|
872
|
+
u.setVertical,
|
|
873
|
+
u.importantPosition
|
|
867
874
|
);
|
|
868
|
-
}, [
|
|
869
|
-
return
|
|
870
|
-
if (
|
|
871
|
-
const
|
|
872
|
-
return
|
|
873
|
-
|
|
875
|
+
}, [u.setVertical, u.importantPosition]);
|
|
876
|
+
return z(() => {
|
|
877
|
+
if (o.current && R.current) {
|
|
878
|
+
const _ = ft(o.current);
|
|
879
|
+
return _ && (_.addEventListener("scroll", l), window.addEventListener("resize", l)), window.requestAnimationFrame(() => {
|
|
880
|
+
R.current && (R.current.style.display = "flex", l());
|
|
874
881
|
}), () => {
|
|
875
|
-
|
|
882
|
+
_ && (_.removeEventListener("scroll", l), window.removeEventListener("resize", l));
|
|
876
883
|
};
|
|
877
884
|
}
|
|
878
|
-
}, [
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
885
|
+
}, [u.isVisible]), /* @__PURE__ */ k.jsxs(k.Fragment, { children: [
|
|
886
|
+
E && /* @__PURE__ */ k.jsx(
|
|
887
|
+
er.div,
|
|
888
|
+
{
|
|
889
|
+
className: ir.motionMaskWrapper,
|
|
890
|
+
initial: "initial",
|
|
891
|
+
animate: "animate",
|
|
892
|
+
exit: "exit",
|
|
893
|
+
...ct
|
|
894
|
+
}
|
|
895
|
+
),
|
|
896
|
+
/* @__PURE__ */ k.jsx(
|
|
897
|
+
er.div,
|
|
898
|
+
{
|
|
899
|
+
ref: sr(d, R),
|
|
900
|
+
style: { display: "none" },
|
|
901
|
+
className: ir.motionAnimationWrapper,
|
|
902
|
+
initial: "initial",
|
|
903
|
+
animate: "animate",
|
|
904
|
+
exit: "exit",
|
|
905
|
+
tabIndex: 0,
|
|
906
|
+
...st,
|
|
907
|
+
onKeyDown: m,
|
|
908
|
+
"data-debug": a ? "" : void 0,
|
|
909
|
+
children: t
|
|
910
|
+
}
|
|
911
|
+
)
|
|
912
|
+
] });
|
|
913
|
+
}, vt = Se(pt);
|
|
914
|
+
function yt(t, a, o) {
|
|
915
|
+
const m = Se(t);
|
|
916
|
+
return Se((d, R) => {
|
|
917
|
+
const [u, l] = de(!1), [_, g] = de(!1), [C, O] = de(I.bottom), [x, M] = de(), D = K(null), F = K(null), w = K(null), h = K(x), H = (o == null ? void 0 : o.isEnableClickOutSiteHidden) !== !1, W = (o == null ? void 0 : o.isEnableHideSave) !== !1, B = o == null ? void 0 : o.isVisibleMask;
|
|
918
|
+
z(() => {
|
|
919
|
+
M(d.value);
|
|
920
|
+
}, [JSON.stringify(d.value)]), z(() => {
|
|
921
|
+
h.current = x;
|
|
922
|
+
}, [x]), z(() => {
|
|
923
|
+
u && M(d.value);
|
|
924
|
+
}, [u, d.value]);
|
|
925
|
+
const oe = N((p) => {
|
|
908
926
|
switch (p.key) {
|
|
909
927
|
case U.Escape:
|
|
910
|
-
|
|
928
|
+
me(u)(p);
|
|
911
929
|
break;
|
|
912
930
|
case U.Tab:
|
|
913
931
|
case U.ShiftAndTab:
|
|
914
|
-
|
|
932
|
+
he(p);
|
|
915
933
|
break;
|
|
916
934
|
case U.ArrowUp:
|
|
917
935
|
case U.ArrowDown:
|
|
918
936
|
case U.Space:
|
|
919
|
-
|
|
937
|
+
ie(p);
|
|
920
938
|
break;
|
|
921
939
|
}
|
|
922
|
-
}, [u]),
|
|
923
|
-
var
|
|
924
|
-
p && (
|
|
925
|
-
}, []), ve = N((p) => {
|
|
926
|
-
var E;
|
|
927
|
-
(E = F.current) == null || E.focus(), d(!1), g(!1);
|
|
940
|
+
}, [u]), me = N((p) => (S) => {
|
|
941
|
+
var L;
|
|
942
|
+
p && (S.stopPropagation(), S.preventDefault(), (L = F.current) == null || L.focus(), l(!1));
|
|
928
943
|
}, []), he = N((p) => {
|
|
929
|
-
|
|
930
|
-
|
|
944
|
+
var S;
|
|
945
|
+
(S = F.current) == null || S.focus(), l(!1), g(!1);
|
|
946
|
+
}, []), ie = N((p) => {
|
|
947
|
+
p.preventDefault(), l(!0);
|
|
948
|
+
}, []), ge = N(() => {
|
|
931
949
|
requestAnimationFrame(() => {
|
|
932
950
|
var p;
|
|
933
|
-
(p = F.current) == null || p.focus(),
|
|
951
|
+
(p = F.current) == null || p.focus(), l(!1);
|
|
934
952
|
});
|
|
935
|
-
}, []),
|
|
936
|
-
|
|
937
|
-
var
|
|
938
|
-
(
|
|
953
|
+
}, []), be = N(() => {
|
|
954
|
+
l((p) => (p && requestAnimationFrame(() => {
|
|
955
|
+
var S;
|
|
956
|
+
(S = F.current) == null || S.focus();
|
|
939
957
|
}), !p));
|
|
940
|
-
}, []),
|
|
958
|
+
}, []), ce = N((p) => {
|
|
941
959
|
!D.current && w.current && !w.current.contains(p.target) && g(!1);
|
|
942
|
-
}, []),
|
|
943
|
-
var
|
|
944
|
-
const
|
|
945
|
-
|
|
946
|
-
}, []),
|
|
947
|
-
if (typeof (
|
|
948
|
-
|
|
960
|
+
}, []), j = N((p) => {
|
|
961
|
+
var L;
|
|
962
|
+
const S = (L = D.current) == null ? void 0 : L.firstChild;
|
|
963
|
+
S && !S.contains(p.target) && w.current && !w.current.contains(p.target) && (l(!1), g(!1));
|
|
964
|
+
}, []), $ = N(() => {
|
|
965
|
+
if (typeof (d == null ? void 0 : d.onChange) > "u") {
|
|
966
|
+
V.warning("@acrool/react-picker", "createPicker component props onChange is undefined, is no call");
|
|
949
967
|
return;
|
|
950
968
|
}
|
|
951
|
-
typeof
|
|
952
|
-
}, [
|
|
953
|
-
return /* @__PURE__ */
|
|
954
|
-
|
|
969
|
+
typeof h.current < "u" && W && JSON.stringify(x) !== JSON.stringify(h.current) && d.onChange(h.current);
|
|
970
|
+
}, [x, d.onChange, W]);
|
|
971
|
+
return /* @__PURE__ */ k.jsx(
|
|
972
|
+
Ae.Provider,
|
|
955
973
|
{
|
|
956
974
|
value: {
|
|
957
|
-
hide:
|
|
958
|
-
show: () =>
|
|
959
|
-
toggle:
|
|
975
|
+
hide: ge,
|
|
976
|
+
show: () => l(!0),
|
|
977
|
+
toggle: be,
|
|
960
978
|
isVisible: u,
|
|
961
979
|
inputFocus: () => g(!0),
|
|
962
980
|
inputBlur: () => g(!1),
|
|
963
|
-
isInputFocus:
|
|
964
|
-
value:
|
|
965
|
-
onChange:
|
|
966
|
-
importantPosition:
|
|
967
|
-
vertical:
|
|
968
|
-
setVertical:
|
|
981
|
+
isInputFocus: _,
|
|
982
|
+
value: x,
|
|
983
|
+
onChange: M,
|
|
984
|
+
importantPosition: o == null ? void 0 : o.importantPosition,
|
|
985
|
+
vertical: C,
|
|
986
|
+
setVertical: O
|
|
969
987
|
},
|
|
970
|
-
children: /* @__PURE__ */
|
|
971
|
-
/* @__PURE__ */
|
|
988
|
+
children: /* @__PURE__ */ k.jsxs(k.Fragment, { children: [
|
|
989
|
+
/* @__PURE__ */ k.jsx(
|
|
972
990
|
"div",
|
|
973
991
|
{
|
|
974
992
|
ref: w,
|
|
975
993
|
className: or.mainEl,
|
|
976
|
-
onKeyDown:
|
|
977
|
-
children: /* @__PURE__ */
|
|
978
|
-
|
|
994
|
+
onKeyDown: oe,
|
|
995
|
+
children: /* @__PURE__ */ k.jsx(
|
|
996
|
+
m,
|
|
979
997
|
{
|
|
980
|
-
...
|
|
981
|
-
ref:
|
|
998
|
+
...d,
|
|
999
|
+
ref: sr(R, F)
|
|
982
1000
|
}
|
|
983
1001
|
)
|
|
984
1002
|
}
|
|
985
1003
|
),
|
|
986
|
-
/* @__PURE__ */
|
|
987
|
-
|
|
1004
|
+
/* @__PURE__ */ k.jsx(Wr, { children: u && /* @__PURE__ */ k.jsx(
|
|
1005
|
+
cr,
|
|
988
1006
|
{
|
|
989
|
-
id: `acrool-react-picker-${
|
|
1007
|
+
id: `acrool-react-picker-${nt().toLowerCase()}`,
|
|
990
1008
|
className: or.pickerEl,
|
|
991
|
-
children: /* @__PURE__ */
|
|
992
|
-
|
|
1009
|
+
children: /* @__PURE__ */ k.jsx(
|
|
1010
|
+
vt,
|
|
993
1011
|
{
|
|
994
1012
|
ref: D,
|
|
995
1013
|
anchorRef: w,
|
|
996
|
-
isDebug:
|
|
997
|
-
onKeyDown:
|
|
998
|
-
|
|
1014
|
+
isDebug: o == null ? void 0 : o.isDebug,
|
|
1015
|
+
onKeyDown: oe,
|
|
1016
|
+
isVisibleMask: B,
|
|
1017
|
+
children: /* @__PURE__ */ k.jsx(a, { ...d })
|
|
999
1018
|
}
|
|
1000
1019
|
)
|
|
1001
1020
|
}
|
|
1002
1021
|
) }),
|
|
1003
|
-
u && /* @__PURE__ */
|
|
1004
|
-
H && u && /* @__PURE__ */
|
|
1005
|
-
|
|
1022
|
+
u && /* @__PURE__ */ k.jsx(at, { onPickerHide: $ }),
|
|
1023
|
+
H && u && /* @__PURE__ */ k.jsx(ar, { onMousedown: j }),
|
|
1024
|
+
_ && /* @__PURE__ */ k.jsx(ar, { onMousedown: ce })
|
|
1006
1025
|
] })
|
|
1007
1026
|
}
|
|
1008
1027
|
);
|
|
1009
1028
|
});
|
|
1010
1029
|
}
|
|
1011
1030
|
export {
|
|
1012
|
-
|
|
1031
|
+
ee as EHorizontal,
|
|
1013
1032
|
I as EVertical,
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1033
|
+
bt as PickerProviderConsumer,
|
|
1034
|
+
Ae as PickerProviderContext,
|
|
1035
|
+
yt as createPicker,
|
|
1036
|
+
Br as usePicker
|
|
1018
1037
|
};
|