dropdowns-js 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dropdowns-js.es.js +831 -820
- package/package.json +4 -5
- package/dist/dropdowns-js.cjs.js +0 -15
package/dist/dropdowns-js.es.js
CHANGED
|
@@ -8,18 +8,18 @@ function Ne() {
|
|
|
8
8
|
if (be) return ne;
|
|
9
9
|
be = 1;
|
|
10
10
|
var a = /* @__PURE__ */ Symbol.for("react.transitional.element"), n = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
11
|
-
function i(s,
|
|
12
|
-
var
|
|
13
|
-
if (d !== void 0 && (
|
|
11
|
+
function i(s, g, d) {
|
|
12
|
+
var R = null;
|
|
13
|
+
if (d !== void 0 && (R = "" + d), g.key !== void 0 && (R = "" + g.key), "key" in g) {
|
|
14
14
|
d = {};
|
|
15
|
-
for (var
|
|
16
|
-
|
|
17
|
-
} else d =
|
|
18
|
-
return
|
|
15
|
+
for (var x in g)
|
|
16
|
+
x !== "key" && (d[x] = g[x]);
|
|
17
|
+
} else d = g;
|
|
18
|
+
return g = d.ref, {
|
|
19
19
|
$$typeof: a,
|
|
20
20
|
type: s,
|
|
21
|
-
key:
|
|
22
|
-
ref:
|
|
21
|
+
key: R,
|
|
22
|
+
ref: g !== void 0 ? g : null,
|
|
23
23
|
props: d
|
|
24
24
|
};
|
|
25
25
|
}
|
|
@@ -35,17 +35,17 @@ function Ue() {
|
|
|
35
35
|
return e.$$typeof === p ? null : e.displayName || e.name || null;
|
|
36
36
|
if (typeof e == "string") return e;
|
|
37
37
|
switch (e) {
|
|
38
|
-
case
|
|
38
|
+
case L:
|
|
39
39
|
return "Fragment";
|
|
40
|
-
case
|
|
40
|
+
case H:
|
|
41
41
|
return "Profiler";
|
|
42
|
-
case
|
|
42
|
+
case V:
|
|
43
43
|
return "StrictMode";
|
|
44
|
-
case
|
|
44
|
+
case I:
|
|
45
45
|
return "Suspense";
|
|
46
|
-
case
|
|
46
|
+
case J:
|
|
47
47
|
return "SuspenseList";
|
|
48
|
-
case
|
|
48
|
+
case o:
|
|
49
49
|
return "Activity";
|
|
50
50
|
}
|
|
51
51
|
if (typeof e == "object")
|
|
@@ -54,16 +54,16 @@ function Ue() {
|
|
|
54
54
|
), e.$$typeof) {
|
|
55
55
|
case O:
|
|
56
56
|
return "Portal";
|
|
57
|
-
case
|
|
57
|
+
case F:
|
|
58
58
|
return e.displayName || "Context";
|
|
59
|
-
case
|
|
59
|
+
case W:
|
|
60
60
|
return (e._context.displayName || "Context") + ".Consumer";
|
|
61
61
|
case u:
|
|
62
62
|
var c = e.render;
|
|
63
63
|
return e = e.displayName, e || (e = c.displayName || c.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
64
|
-
case
|
|
64
|
+
case j:
|
|
65
65
|
return c = e.displayName || null, c !== null ? c : a(e.type) || "Memo";
|
|
66
|
-
case
|
|
66
|
+
case r:
|
|
67
67
|
c = e._payload, e = e._init;
|
|
68
68
|
try {
|
|
69
69
|
return a(e(c));
|
|
@@ -84,8 +84,8 @@ function Ue() {
|
|
|
84
84
|
}
|
|
85
85
|
if (c) {
|
|
86
86
|
c = console;
|
|
87
|
-
var
|
|
88
|
-
return
|
|
87
|
+
var y = c.error, v = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
88
|
+
return y.call(
|
|
89
89
|
c,
|
|
90
90
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
91
91
|
v
|
|
@@ -93,8 +93,8 @@ function Ue() {
|
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
function s(e) {
|
|
96
|
-
if (e ===
|
|
97
|
-
if (typeof e == "object" && e !== null && e.$$typeof ===
|
|
96
|
+
if (e === L) return "<>";
|
|
97
|
+
if (typeof e == "object" && e !== null && e.$$typeof === r)
|
|
98
98
|
return "<...>";
|
|
99
99
|
try {
|
|
100
100
|
var c = a(e);
|
|
@@ -103,49 +103,49 @@ function Ue() {
|
|
|
103
103
|
return "<...>";
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
|
-
function
|
|
107
|
-
var e =
|
|
106
|
+
function g() {
|
|
107
|
+
var e = l.A;
|
|
108
108
|
return e === null ? null : e.getOwner();
|
|
109
109
|
}
|
|
110
110
|
function d() {
|
|
111
111
|
return Error("react-stack-top-frame");
|
|
112
112
|
}
|
|
113
|
-
function
|
|
114
|
-
if (
|
|
113
|
+
function R(e) {
|
|
114
|
+
if (m.call(e, "key")) {
|
|
115
115
|
var c = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
116
116
|
if (c && c.isReactWarning) return !1;
|
|
117
117
|
}
|
|
118
118
|
return e.key !== void 0;
|
|
119
119
|
}
|
|
120
|
-
function
|
|
121
|
-
function
|
|
120
|
+
function x(e, c) {
|
|
121
|
+
function y() {
|
|
122
122
|
K || (K = !0, console.error(
|
|
123
123
|
"%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://react.dev/link/special-props)",
|
|
124
124
|
c
|
|
125
125
|
));
|
|
126
126
|
}
|
|
127
|
-
|
|
128
|
-
get:
|
|
127
|
+
y.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
128
|
+
get: y,
|
|
129
129
|
configurable: !0
|
|
130
130
|
});
|
|
131
131
|
}
|
|
132
|
-
function
|
|
132
|
+
function $() {
|
|
133
133
|
var e = a(this.type);
|
|
134
|
-
return
|
|
134
|
+
return T[e] || (T[e] = !0, console.error(
|
|
135
135
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
136
136
|
)), e = this.props.ref, e !== void 0 ? e : null;
|
|
137
137
|
}
|
|
138
|
-
function
|
|
139
|
-
var
|
|
138
|
+
function f(e, c, y, v, q, D) {
|
|
139
|
+
var E = y.ref;
|
|
140
140
|
return e = {
|
|
141
141
|
$$typeof: Y,
|
|
142
142
|
type: e,
|
|
143
143
|
key: c,
|
|
144
|
-
props:
|
|
144
|
+
props: y,
|
|
145
145
|
_owner: v
|
|
146
|
-
}, (
|
|
146
|
+
}, (E !== void 0 ? E : null) !== null ? Object.defineProperty(e, "ref", {
|
|
147
147
|
enumerable: !1,
|
|
148
|
-
get:
|
|
148
|
+
get: $
|
|
149
149
|
}) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
150
150
|
configurable: !1,
|
|
151
151
|
enumerable: !1,
|
|
@@ -160,33 +160,33 @@ function Ue() {
|
|
|
160
160
|
configurable: !1,
|
|
161
161
|
enumerable: !1,
|
|
162
162
|
writable: !0,
|
|
163
|
-
value:
|
|
163
|
+
value: q
|
|
164
164
|
}), Object.defineProperty(e, "_debugTask", {
|
|
165
165
|
configurable: !1,
|
|
166
166
|
enumerable: !1,
|
|
167
167
|
writable: !0,
|
|
168
|
-
value:
|
|
168
|
+
value: D
|
|
169
169
|
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
170
170
|
}
|
|
171
|
-
function
|
|
172
|
-
var
|
|
173
|
-
if (
|
|
171
|
+
function b(e, c, y, v, q, D) {
|
|
172
|
+
var E = c.children;
|
|
173
|
+
if (E !== void 0)
|
|
174
174
|
if (v)
|
|
175
|
-
if (
|
|
176
|
-
for (v = 0; v <
|
|
177
|
-
E
|
|
178
|
-
Object.freeze && Object.freeze(
|
|
175
|
+
if (P(E)) {
|
|
176
|
+
for (v = 0; v < E.length; v++)
|
|
177
|
+
S(E[v]);
|
|
178
|
+
Object.freeze && Object.freeze(E);
|
|
179
179
|
} else
|
|
180
180
|
console.error(
|
|
181
181
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
182
182
|
);
|
|
183
|
-
else E
|
|
184
|
-
if (
|
|
185
|
-
|
|
186
|
-
var
|
|
183
|
+
else S(E);
|
|
184
|
+
if (m.call(c, "key")) {
|
|
185
|
+
E = a(e);
|
|
186
|
+
var A = Object.keys(c).filter(function(z) {
|
|
187
187
|
return z !== "key";
|
|
188
188
|
});
|
|
189
|
-
v = 0 <
|
|
189
|
+
v = 0 < A.length ? "{key: someKey, " + A.join(": ..., ") + ": ...}" : "{key: someKey}", t[E + v] || (A = 0 < A.length ? "{" + A.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
190
190
|
`A props object containing a "key" prop is being spread into JSX:
|
|
191
191
|
let props = %s;
|
|
192
192
|
<%s {...props} />
|
|
@@ -194,65 +194,65 @@ React keys must be passed directly to JSX without using spread:
|
|
|
194
194
|
let props = %s;
|
|
195
195
|
<%s key={someKey} {...props} />`,
|
|
196
196
|
v,
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
), t[
|
|
197
|
+
E,
|
|
198
|
+
A,
|
|
199
|
+
E
|
|
200
|
+
), t[E + v] = !0);
|
|
201
201
|
}
|
|
202
|
-
if (
|
|
203
|
-
|
|
202
|
+
if (E = null, y !== void 0 && (i(y), E = "" + y), R(c) && (i(c.key), E = "" + c.key), "key" in c) {
|
|
203
|
+
y = {};
|
|
204
204
|
for (var U in c)
|
|
205
|
-
U !== "key" && (
|
|
206
|
-
} else
|
|
207
|
-
return
|
|
208
|
-
|
|
205
|
+
U !== "key" && (y[U] = c[U]);
|
|
206
|
+
} else y = c;
|
|
207
|
+
return E && x(
|
|
208
|
+
y,
|
|
209
209
|
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
210
|
-
),
|
|
210
|
+
), f(
|
|
211
211
|
e,
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
212
|
+
E,
|
|
213
|
+
y,
|
|
214
|
+
g(),
|
|
215
|
+
q,
|
|
216
|
+
D
|
|
217
217
|
);
|
|
218
218
|
}
|
|
219
|
-
function
|
|
220
|
-
M(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof ===
|
|
219
|
+
function S(e) {
|
|
220
|
+
M(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === r && (e._payload.status === "fulfilled" ? M(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
|
|
221
221
|
}
|
|
222
222
|
function M(e) {
|
|
223
223
|
return typeof e == "object" && e !== null && e.$$typeof === Y;
|
|
224
224
|
}
|
|
225
|
-
var
|
|
225
|
+
var k = qe, Y = /* @__PURE__ */ Symbol.for("react.transitional.element"), O = /* @__PURE__ */ Symbol.for("react.portal"), L = /* @__PURE__ */ Symbol.for("react.fragment"), V = /* @__PURE__ */ Symbol.for("react.strict_mode"), H = /* @__PURE__ */ Symbol.for("react.profiler"), W = /* @__PURE__ */ Symbol.for("react.consumer"), F = /* @__PURE__ */ Symbol.for("react.context"), u = /* @__PURE__ */ Symbol.for("react.forward_ref"), I = /* @__PURE__ */ Symbol.for("react.suspense"), J = /* @__PURE__ */ Symbol.for("react.suspense_list"), j = /* @__PURE__ */ Symbol.for("react.memo"), r = /* @__PURE__ */ Symbol.for("react.lazy"), o = /* @__PURE__ */ Symbol.for("react.activity"), p = /* @__PURE__ */ Symbol.for("react.client.reference"), l = k.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, m = Object.prototype.hasOwnProperty, P = Array.isArray, N = console.createTask ? console.createTask : function() {
|
|
226
226
|
return null;
|
|
227
227
|
};
|
|
228
|
-
|
|
228
|
+
k = {
|
|
229
229
|
react_stack_bottom_frame: function(e) {
|
|
230
230
|
return e();
|
|
231
231
|
}
|
|
232
232
|
};
|
|
233
|
-
var K,
|
|
234
|
-
|
|
233
|
+
var K, T = {}, Z = k.react_stack_bottom_frame.bind(
|
|
234
|
+
k,
|
|
235
235
|
d
|
|
236
|
-
)(),
|
|
237
|
-
oe.Fragment =
|
|
238
|
-
var v = 1e4 >
|
|
239
|
-
return
|
|
236
|
+
)(), w = N(s(d)), t = {};
|
|
237
|
+
oe.Fragment = L, oe.jsx = function(e, c, y) {
|
|
238
|
+
var v = 1e4 > l.recentlyCreatedOwnerStacks++;
|
|
239
|
+
return b(
|
|
240
240
|
e,
|
|
241
241
|
c,
|
|
242
|
-
|
|
242
|
+
y,
|
|
243
243
|
!1,
|
|
244
|
-
v ? Error("react-stack-top-frame") :
|
|
245
|
-
v ?
|
|
244
|
+
v ? Error("react-stack-top-frame") : Z,
|
|
245
|
+
v ? N(s(e)) : w
|
|
246
246
|
);
|
|
247
|
-
}, oe.jsxs = function(e, c,
|
|
248
|
-
var v = 1e4 >
|
|
249
|
-
return
|
|
247
|
+
}, oe.jsxs = function(e, c, y) {
|
|
248
|
+
var v = 1e4 > l.recentlyCreatedOwnerStacks++;
|
|
249
|
+
return b(
|
|
250
250
|
e,
|
|
251
251
|
c,
|
|
252
|
-
|
|
252
|
+
y,
|
|
253
253
|
!0,
|
|
254
|
-
v ? Error("react-stack-top-frame") :
|
|
255
|
-
v ?
|
|
254
|
+
v ? Error("react-stack-top-frame") : Z,
|
|
255
|
+
v ? N(s(e)) : w
|
|
256
256
|
);
|
|
257
257
|
};
|
|
258
258
|
})()), oe;
|
|
@@ -261,104 +261,104 @@ var Ee;
|
|
|
261
261
|
function Ve() {
|
|
262
262
|
return Ee || (Ee = 1, process.env.NODE_ENV === "production" ? ie.exports = Ne() : ie.exports = Ue()), ie.exports;
|
|
263
263
|
}
|
|
264
|
-
var _ = Ve(), ae = { exports: {} }, ue = { exports: {} },
|
|
264
|
+
var _ = Ve(), ae = { exports: {} }, ue = { exports: {} }, B = {};
|
|
265
265
|
var Se;
|
|
266
266
|
function We() {
|
|
267
|
-
if (Se) return
|
|
267
|
+
if (Se) return B;
|
|
268
268
|
Se = 1;
|
|
269
|
-
var a = typeof Symbol == "function" && Symbol.for, n = a ? /* @__PURE__ */ Symbol.for("react.element") : 60103, i = a ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, s = a ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107,
|
|
270
|
-
function
|
|
269
|
+
var a = typeof Symbol == "function" && Symbol.for, n = a ? /* @__PURE__ */ Symbol.for("react.element") : 60103, i = a ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, s = a ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, g = a ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, d = a ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, R = a ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, x = a ? /* @__PURE__ */ Symbol.for("react.context") : 60110, $ = a ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, f = a ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, b = a ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, S = a ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, M = a ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, k = a ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, Y = a ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, O = a ? /* @__PURE__ */ Symbol.for("react.block") : 60121, L = a ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, V = a ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, H = a ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
270
|
+
function W(u) {
|
|
271
271
|
if (typeof u == "object" && u !== null) {
|
|
272
|
-
var
|
|
273
|
-
switch (
|
|
272
|
+
var I = u.$$typeof;
|
|
273
|
+
switch (I) {
|
|
274
274
|
case n:
|
|
275
275
|
switch (u = u.type, u) {
|
|
276
|
-
case
|
|
277
|
-
case
|
|
276
|
+
case $:
|
|
277
|
+
case f:
|
|
278
278
|
case s:
|
|
279
279
|
case d:
|
|
280
|
-
case
|
|
281
|
-
case
|
|
280
|
+
case g:
|
|
281
|
+
case S:
|
|
282
282
|
return u;
|
|
283
283
|
default:
|
|
284
284
|
switch (u = u && u.$$typeof, u) {
|
|
285
|
-
case
|
|
286
|
-
case
|
|
285
|
+
case x:
|
|
286
|
+
case b:
|
|
287
287
|
case Y:
|
|
288
|
-
case
|
|
289
|
-
case
|
|
288
|
+
case k:
|
|
289
|
+
case R:
|
|
290
290
|
return u;
|
|
291
291
|
default:
|
|
292
|
-
return
|
|
292
|
+
return I;
|
|
293
293
|
}
|
|
294
294
|
}
|
|
295
295
|
case i:
|
|
296
|
-
return
|
|
296
|
+
return I;
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
|
-
function
|
|
301
|
-
return
|
|
300
|
+
function F(u) {
|
|
301
|
+
return W(u) === f;
|
|
302
302
|
}
|
|
303
|
-
return
|
|
304
|
-
return
|
|
305
|
-
},
|
|
306
|
-
return
|
|
307
|
-
},
|
|
308
|
-
return
|
|
309
|
-
},
|
|
303
|
+
return B.AsyncMode = $, B.ConcurrentMode = f, B.ContextConsumer = x, B.ContextProvider = R, B.Element = n, B.ForwardRef = b, B.Fragment = s, B.Lazy = Y, B.Memo = k, B.Portal = i, B.Profiler = d, B.StrictMode = g, B.Suspense = S, B.isAsyncMode = function(u) {
|
|
304
|
+
return F(u) || W(u) === $;
|
|
305
|
+
}, B.isConcurrentMode = F, B.isContextConsumer = function(u) {
|
|
306
|
+
return W(u) === x;
|
|
307
|
+
}, B.isContextProvider = function(u) {
|
|
308
|
+
return W(u) === R;
|
|
309
|
+
}, B.isElement = function(u) {
|
|
310
310
|
return typeof u == "object" && u !== null && u.$$typeof === n;
|
|
311
|
-
},
|
|
312
|
-
return
|
|
313
|
-
},
|
|
314
|
-
return
|
|
315
|
-
},
|
|
316
|
-
return
|
|
317
|
-
},
|
|
318
|
-
return
|
|
319
|
-
},
|
|
320
|
-
return
|
|
321
|
-
},
|
|
322
|
-
return
|
|
323
|
-
},
|
|
324
|
-
return
|
|
325
|
-
},
|
|
326
|
-
return
|
|
327
|
-
},
|
|
328
|
-
return typeof u == "string" || typeof u == "function" || u === s || u ===
|
|
329
|
-
},
|
|
311
|
+
}, B.isForwardRef = function(u) {
|
|
312
|
+
return W(u) === b;
|
|
313
|
+
}, B.isFragment = function(u) {
|
|
314
|
+
return W(u) === s;
|
|
315
|
+
}, B.isLazy = function(u) {
|
|
316
|
+
return W(u) === Y;
|
|
317
|
+
}, B.isMemo = function(u) {
|
|
318
|
+
return W(u) === k;
|
|
319
|
+
}, B.isPortal = function(u) {
|
|
320
|
+
return W(u) === i;
|
|
321
|
+
}, B.isProfiler = function(u) {
|
|
322
|
+
return W(u) === d;
|
|
323
|
+
}, B.isStrictMode = function(u) {
|
|
324
|
+
return W(u) === g;
|
|
325
|
+
}, B.isSuspense = function(u) {
|
|
326
|
+
return W(u) === S;
|
|
327
|
+
}, B.isValidElementType = function(u) {
|
|
328
|
+
return typeof u == "string" || typeof u == "function" || u === s || u === f || u === d || u === g || u === S || u === M || typeof u == "object" && u !== null && (u.$$typeof === Y || u.$$typeof === k || u.$$typeof === R || u.$$typeof === x || u.$$typeof === b || u.$$typeof === L || u.$$typeof === V || u.$$typeof === H || u.$$typeof === O);
|
|
329
|
+
}, B.typeOf = W, B;
|
|
330
330
|
}
|
|
331
|
-
var
|
|
331
|
+
var G = {};
|
|
332
332
|
var xe;
|
|
333
333
|
function Je() {
|
|
334
334
|
return xe || (xe = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
335
|
-
var a = typeof Symbol == "function" && Symbol.for, n = a ? /* @__PURE__ */ Symbol.for("react.element") : 60103, i = a ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, s = a ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107,
|
|
336
|
-
function
|
|
335
|
+
var a = typeof Symbol == "function" && Symbol.for, n = a ? /* @__PURE__ */ Symbol.for("react.element") : 60103, i = a ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, s = a ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, g = a ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, d = a ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, R = a ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, x = a ? /* @__PURE__ */ Symbol.for("react.context") : 60110, $ = a ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, f = a ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, b = a ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, S = a ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, M = a ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, k = a ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, Y = a ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, O = a ? /* @__PURE__ */ Symbol.for("react.block") : 60121, L = a ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, V = a ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, H = a ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
336
|
+
function W(h) {
|
|
337
337
|
return typeof h == "string" || typeof h == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
338
|
-
h === s || h ===
|
|
338
|
+
h === s || h === f || h === d || h === g || h === S || h === M || typeof h == "object" && h !== null && (h.$$typeof === Y || h.$$typeof === k || h.$$typeof === R || h.$$typeof === x || h.$$typeof === b || h.$$typeof === L || h.$$typeof === V || h.$$typeof === H || h.$$typeof === O);
|
|
339
339
|
}
|
|
340
|
-
function
|
|
340
|
+
function F(h) {
|
|
341
341
|
if (typeof h == "object" && h !== null) {
|
|
342
342
|
var te = h.$$typeof;
|
|
343
343
|
switch (te) {
|
|
344
344
|
case n:
|
|
345
345
|
var se = h.type;
|
|
346
346
|
switch (se) {
|
|
347
|
-
case
|
|
348
|
-
case
|
|
347
|
+
case $:
|
|
348
|
+
case f:
|
|
349
349
|
case s:
|
|
350
350
|
case d:
|
|
351
|
-
case
|
|
352
|
-
case
|
|
351
|
+
case g:
|
|
352
|
+
case S:
|
|
353
353
|
return se;
|
|
354
354
|
default:
|
|
355
355
|
var me = se && se.$$typeof;
|
|
356
356
|
switch (me) {
|
|
357
|
-
case
|
|
358
|
-
case
|
|
357
|
+
case x:
|
|
358
|
+
case b:
|
|
359
359
|
case Y:
|
|
360
|
-
case
|
|
361
|
-
case
|
|
360
|
+
case k:
|
|
361
|
+
case R:
|
|
362
362
|
return me;
|
|
363
363
|
default:
|
|
364
364
|
return te;
|
|
@@ -369,48 +369,48 @@ function Je() {
|
|
|
369
369
|
}
|
|
370
370
|
}
|
|
371
371
|
}
|
|
372
|
-
var u =
|
|
373
|
-
function
|
|
374
|
-
return
|
|
372
|
+
var u = $, I = f, J = x, j = R, r = n, o = b, p = s, l = Y, m = k, P = i, N = d, K = g, T = S, Z = !1;
|
|
373
|
+
function w(h) {
|
|
374
|
+
return Z || (Z = !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.")), t(h) || F(h) === $;
|
|
375
375
|
}
|
|
376
376
|
function t(h) {
|
|
377
|
-
return
|
|
377
|
+
return F(h) === f;
|
|
378
378
|
}
|
|
379
379
|
function e(h) {
|
|
380
|
-
return
|
|
380
|
+
return F(h) === x;
|
|
381
381
|
}
|
|
382
382
|
function c(h) {
|
|
383
|
-
return
|
|
383
|
+
return F(h) === R;
|
|
384
384
|
}
|
|
385
|
-
function
|
|
385
|
+
function y(h) {
|
|
386
386
|
return typeof h == "object" && h !== null && h.$$typeof === n;
|
|
387
387
|
}
|
|
388
388
|
function v(h) {
|
|
389
|
-
return
|
|
389
|
+
return F(h) === b;
|
|
390
390
|
}
|
|
391
|
-
function
|
|
392
|
-
return
|
|
391
|
+
function q(h) {
|
|
392
|
+
return F(h) === s;
|
|
393
393
|
}
|
|
394
|
-
function
|
|
395
|
-
return
|
|
394
|
+
function D(h) {
|
|
395
|
+
return F(h) === Y;
|
|
396
396
|
}
|
|
397
|
-
function
|
|
398
|
-
return
|
|
397
|
+
function E(h) {
|
|
398
|
+
return F(h) === k;
|
|
399
399
|
}
|
|
400
|
-
function
|
|
401
|
-
return
|
|
400
|
+
function A(h) {
|
|
401
|
+
return F(h) === i;
|
|
402
402
|
}
|
|
403
403
|
function U(h) {
|
|
404
|
-
return
|
|
404
|
+
return F(h) === d;
|
|
405
405
|
}
|
|
406
406
|
function z(h) {
|
|
407
|
-
return
|
|
407
|
+
return F(h) === g;
|
|
408
408
|
}
|
|
409
409
|
function ee(h) {
|
|
410
|
-
return
|
|
410
|
+
return F(h) === S;
|
|
411
411
|
}
|
|
412
|
-
|
|
413
|
-
})()),
|
|
412
|
+
G.AsyncMode = u, G.ConcurrentMode = I, G.ContextConsumer = J, G.ContextProvider = j, G.Element = r, G.ForwardRef = o, G.Fragment = p, G.Lazy = l, G.Memo = m, G.Portal = P, G.Profiler = N, G.StrictMode = K, G.Suspense = T, G.isAsyncMode = w, G.isConcurrentMode = t, G.isContextConsumer = e, G.isContextProvider = c, G.isElement = y, G.isForwardRef = v, G.isFragment = q, G.isLazy = D, G.isMemo = E, G.isPortal = A, G.isProfiler = U, G.isStrictMode = z, G.isSuspense = ee, G.isValidElementType = W, G.typeOf = F;
|
|
413
|
+
})()), G;
|
|
414
414
|
}
|
|
415
415
|
var Te;
|
|
416
416
|
function Ie() {
|
|
@@ -426,40 +426,40 @@ function Ze() {
|
|
|
426
426
|
throw new TypeError("Object.assign cannot be called with null or undefined");
|
|
427
427
|
return Object(d);
|
|
428
428
|
}
|
|
429
|
-
function
|
|
429
|
+
function g() {
|
|
430
430
|
try {
|
|
431
431
|
if (!Object.assign)
|
|
432
432
|
return !1;
|
|
433
433
|
var d = new String("abc");
|
|
434
434
|
if (d[5] = "de", Object.getOwnPropertyNames(d)[0] === "5")
|
|
435
435
|
return !1;
|
|
436
|
-
for (var
|
|
437
|
-
|
|
438
|
-
var
|
|
439
|
-
return
|
|
436
|
+
for (var R = {}, x = 0; x < 10; x++)
|
|
437
|
+
R["_" + String.fromCharCode(x)] = x;
|
|
438
|
+
var $ = Object.getOwnPropertyNames(R).map(function(b) {
|
|
439
|
+
return R[b];
|
|
440
440
|
});
|
|
441
|
-
if (
|
|
441
|
+
if ($.join("") !== "0123456789")
|
|
442
442
|
return !1;
|
|
443
|
-
var
|
|
444
|
-
return "abcdefghijklmnopqrst".split("").forEach(function(
|
|
445
|
-
|
|
446
|
-
}), Object.keys(Object.assign({},
|
|
443
|
+
var f = {};
|
|
444
|
+
return "abcdefghijklmnopqrst".split("").forEach(function(b) {
|
|
445
|
+
f[b] = b;
|
|
446
|
+
}), Object.keys(Object.assign({}, f)).join("") === "abcdefghijklmnopqrst";
|
|
447
447
|
} catch {
|
|
448
448
|
return !1;
|
|
449
449
|
}
|
|
450
450
|
}
|
|
451
|
-
return fe =
|
|
452
|
-
for (var
|
|
453
|
-
|
|
454
|
-
for (var
|
|
455
|
-
n.call(
|
|
451
|
+
return fe = g() ? Object.assign : function(d, R) {
|
|
452
|
+
for (var x, $ = s(d), f, b = 1; b < arguments.length; b++) {
|
|
453
|
+
x = Object(arguments[b]);
|
|
454
|
+
for (var S in x)
|
|
455
|
+
n.call(x, S) && ($[S] = x[S]);
|
|
456
456
|
if (a) {
|
|
457
|
-
|
|
458
|
-
for (var M = 0; M <
|
|
459
|
-
i.call(
|
|
457
|
+
f = a(x);
|
|
458
|
+
for (var M = 0; M < f.length; M++)
|
|
459
|
+
i.call(x, f[M]) && ($[f[M]] = x[f[M]]);
|
|
460
460
|
}
|
|
461
461
|
}
|
|
462
|
-
return
|
|
462
|
+
return $;
|
|
463
463
|
}, fe;
|
|
464
464
|
}
|
|
465
465
|
var de, Ce;
|
|
@@ -470,7 +470,7 @@ function ve() {
|
|
|
470
470
|
return de = a, de;
|
|
471
471
|
}
|
|
472
472
|
var pe, Re;
|
|
473
|
-
function
|
|
473
|
+
function De() {
|
|
474
474
|
return Re || (Re = 1, pe = Function.call.bind(Object.prototype.hasOwnProperty)), pe;
|
|
475
475
|
}
|
|
476
476
|
var he, _e;
|
|
@@ -480,92 +480,92 @@ function Be() {
|
|
|
480
480
|
var a = function() {
|
|
481
481
|
};
|
|
482
482
|
if (process.env.NODE_ENV !== "production") {
|
|
483
|
-
var n = /* @__PURE__ */ ve(), i = {}, s = /* @__PURE__ */
|
|
483
|
+
var n = /* @__PURE__ */ ve(), i = {}, s = /* @__PURE__ */ De();
|
|
484
484
|
a = function(d) {
|
|
485
|
-
var
|
|
486
|
-
typeof console < "u" && console.error(
|
|
485
|
+
var R = "Warning: " + d;
|
|
486
|
+
typeof console < "u" && console.error(R);
|
|
487
487
|
try {
|
|
488
|
-
throw new Error(
|
|
488
|
+
throw new Error(R);
|
|
489
489
|
} catch {
|
|
490
490
|
}
|
|
491
491
|
};
|
|
492
492
|
}
|
|
493
|
-
function
|
|
493
|
+
function g(d, R, x, $, f) {
|
|
494
494
|
if (process.env.NODE_ENV !== "production") {
|
|
495
|
-
for (var
|
|
496
|
-
if (s(d,
|
|
497
|
-
var
|
|
495
|
+
for (var b in d)
|
|
496
|
+
if (s(d, b)) {
|
|
497
|
+
var S;
|
|
498
498
|
try {
|
|
499
|
-
if (typeof d[
|
|
499
|
+
if (typeof d[b] != "function") {
|
|
500
500
|
var M = Error(
|
|
501
|
-
(
|
|
501
|
+
($ || "React class") + ": " + x + " type `" + b + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof d[b] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
502
502
|
);
|
|
503
503
|
throw M.name = "Invariant Violation", M;
|
|
504
504
|
}
|
|
505
|
-
|
|
505
|
+
S = d[b](R, b, $, x, null, n);
|
|
506
506
|
} catch (Y) {
|
|
507
|
-
|
|
507
|
+
S = Y;
|
|
508
508
|
}
|
|
509
|
-
if (
|
|
510
|
-
(
|
|
511
|
-
),
|
|
512
|
-
i[
|
|
513
|
-
var
|
|
509
|
+
if (S && !(S instanceof Error) && a(
|
|
510
|
+
($ || "React class") + ": type specification of " + x + " `" + b + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof 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)."
|
|
511
|
+
), S instanceof Error && !(S.message in i)) {
|
|
512
|
+
i[S.message] = !0;
|
|
513
|
+
var k = f ? f() : "";
|
|
514
514
|
a(
|
|
515
|
-
"Failed " +
|
|
515
|
+
"Failed " + x + " type: " + S.message + (k ?? "")
|
|
516
516
|
);
|
|
517
517
|
}
|
|
518
518
|
}
|
|
519
519
|
}
|
|
520
520
|
}
|
|
521
|
-
return
|
|
521
|
+
return g.resetWarningCache = function() {
|
|
522
522
|
process.env.NODE_ENV !== "production" && (i = {});
|
|
523
|
-
}, he =
|
|
523
|
+
}, he = g, he;
|
|
524
524
|
}
|
|
525
|
-
var
|
|
525
|
+
var ge, Oe;
|
|
526
526
|
function Ge() {
|
|
527
|
-
if (Oe) return
|
|
527
|
+
if (Oe) return ge;
|
|
528
528
|
Oe = 1;
|
|
529
|
-
var a = Ie(), n = Ze(), i = /* @__PURE__ */ ve(), s = /* @__PURE__ */
|
|
529
|
+
var a = Ie(), n = Ze(), i = /* @__PURE__ */ ve(), s = /* @__PURE__ */ De(), g = /* @__PURE__ */ Be(), d = function() {
|
|
530
530
|
};
|
|
531
|
-
process.env.NODE_ENV !== "production" && (d = function(
|
|
532
|
-
var
|
|
533
|
-
typeof console < "u" && console.error(
|
|
531
|
+
process.env.NODE_ENV !== "production" && (d = function(x) {
|
|
532
|
+
var $ = "Warning: " + x;
|
|
533
|
+
typeof console < "u" && console.error($);
|
|
534
534
|
try {
|
|
535
|
-
throw new Error(
|
|
535
|
+
throw new Error($);
|
|
536
536
|
} catch {
|
|
537
537
|
}
|
|
538
538
|
});
|
|
539
|
-
function
|
|
539
|
+
function R() {
|
|
540
540
|
return null;
|
|
541
541
|
}
|
|
542
|
-
return
|
|
543
|
-
var
|
|
544
|
-
function
|
|
545
|
-
var e = t && (
|
|
542
|
+
return ge = function(x, $) {
|
|
543
|
+
var f = typeof Symbol == "function" && Symbol.iterator, b = "@@iterator";
|
|
544
|
+
function S(t) {
|
|
545
|
+
var e = t && (f && t[f] || t[b]);
|
|
546
546
|
if (typeof e == "function")
|
|
547
547
|
return e;
|
|
548
548
|
}
|
|
549
|
-
var M = "<<anonymous>>",
|
|
550
|
-
array:
|
|
551
|
-
bigint:
|
|
552
|
-
bool:
|
|
553
|
-
func:
|
|
554
|
-
number:
|
|
555
|
-
object:
|
|
556
|
-
string:
|
|
557
|
-
symbol:
|
|
558
|
-
any:
|
|
559
|
-
arrayOf:
|
|
560
|
-
element:
|
|
549
|
+
var M = "<<anonymous>>", k = {
|
|
550
|
+
array: V("array"),
|
|
551
|
+
bigint: V("bigint"),
|
|
552
|
+
bool: V("boolean"),
|
|
553
|
+
func: V("function"),
|
|
554
|
+
number: V("number"),
|
|
555
|
+
object: V("object"),
|
|
556
|
+
string: V("string"),
|
|
557
|
+
symbol: V("symbol"),
|
|
558
|
+
any: H(),
|
|
559
|
+
arrayOf: W,
|
|
560
|
+
element: F(),
|
|
561
561
|
elementType: u(),
|
|
562
|
-
instanceOf:
|
|
563
|
-
node:
|
|
564
|
-
objectOf:
|
|
565
|
-
oneOf:
|
|
566
|
-
oneOfType:
|
|
567
|
-
shape:
|
|
568
|
-
exact:
|
|
562
|
+
instanceOf: I,
|
|
563
|
+
node: o(),
|
|
564
|
+
objectOf: j,
|
|
565
|
+
oneOf: J,
|
|
566
|
+
oneOfType: r,
|
|
567
|
+
shape: l,
|
|
568
|
+
exact: m
|
|
569
569
|
};
|
|
570
570
|
function Y(t, e) {
|
|
571
571
|
return t === e ? t !== 0 || 1 / t === 1 / e : t !== t && e !== e;
|
|
@@ -574,204 +574,204 @@ function Ge() {
|
|
|
574
574
|
this.message = t, this.data = e && typeof e == "object" ? e : {}, this.stack = "";
|
|
575
575
|
}
|
|
576
576
|
O.prototype = Error.prototype;
|
|
577
|
-
function
|
|
577
|
+
function L(t) {
|
|
578
578
|
if (process.env.NODE_ENV !== "production")
|
|
579
579
|
var e = {}, c = 0;
|
|
580
|
-
function
|
|
581
|
-
if (
|
|
582
|
-
if (
|
|
580
|
+
function y(q, D, E, A, U, z, ee) {
|
|
581
|
+
if (A = A || M, z = z || E, ee !== i) {
|
|
582
|
+
if ($) {
|
|
583
583
|
var h = new Error(
|
|
584
584
|
"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"
|
|
585
585
|
);
|
|
586
586
|
throw h.name = "Invariant Violation", h;
|
|
587
587
|
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
588
|
-
var te =
|
|
588
|
+
var te = A + ":" + E;
|
|
589
589
|
!e[te] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
590
590
|
c < 3 && (d(
|
|
591
|
-
"You are manually calling a React.PropTypes validation function for the `" + z + "` prop on `" +
|
|
591
|
+
"You are manually calling a React.PropTypes validation function for the `" + z + "` prop on `" + A + "`. 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."
|
|
592
592
|
), e[te] = !0, c++);
|
|
593
593
|
}
|
|
594
594
|
}
|
|
595
|
-
return
|
|
595
|
+
return D[E] == null ? q ? D[E] === null ? new O("The " + U + " `" + z + "` is marked as required " + ("in `" + A + "`, but its value is `null`.")) : new O("The " + U + " `" + z + "` is marked as required in " + ("`" + A + "`, but its value is `undefined`.")) : null : t(D, E, A, U, z);
|
|
596
596
|
}
|
|
597
|
-
var v =
|
|
598
|
-
return v.isRequired =
|
|
597
|
+
var v = y.bind(null, !1);
|
|
598
|
+
return v.isRequired = y.bind(null, !0), v;
|
|
599
599
|
}
|
|
600
|
-
function
|
|
601
|
-
function e(c,
|
|
602
|
-
var
|
|
600
|
+
function V(t) {
|
|
601
|
+
function e(c, y, v, q, D, E) {
|
|
602
|
+
var A = c[y], U = K(A);
|
|
603
603
|
if (U !== t) {
|
|
604
|
-
var z =
|
|
604
|
+
var z = T(A);
|
|
605
605
|
return new O(
|
|
606
|
-
"Invalid " +
|
|
606
|
+
"Invalid " + q + " `" + D + "` of type " + ("`" + z + "` supplied to `" + v + "`, expected ") + ("`" + t + "`."),
|
|
607
607
|
{ expectedType: t }
|
|
608
608
|
);
|
|
609
609
|
}
|
|
610
610
|
return null;
|
|
611
611
|
}
|
|
612
|
-
return
|
|
612
|
+
return L(e);
|
|
613
613
|
}
|
|
614
|
-
function
|
|
615
|
-
return
|
|
614
|
+
function H() {
|
|
615
|
+
return L(R);
|
|
616
616
|
}
|
|
617
|
-
function
|
|
618
|
-
function e(c,
|
|
617
|
+
function W(t) {
|
|
618
|
+
function e(c, y, v, q, D) {
|
|
619
619
|
if (typeof t != "function")
|
|
620
|
-
return new O("Property `" +
|
|
621
|
-
var
|
|
622
|
-
if (!Array.isArray(
|
|
623
|
-
var
|
|
624
|
-
return new O("Invalid " +
|
|
620
|
+
return new O("Property `" + D + "` of component `" + v + "` has invalid PropType notation inside arrayOf.");
|
|
621
|
+
var E = c[y];
|
|
622
|
+
if (!Array.isArray(E)) {
|
|
623
|
+
var A = K(E);
|
|
624
|
+
return new O("Invalid " + q + " `" + D + "` of type " + ("`" + A + "` supplied to `" + v + "`, expected an array."));
|
|
625
625
|
}
|
|
626
|
-
for (var U = 0; U <
|
|
627
|
-
var z = t(
|
|
626
|
+
for (var U = 0; U < E.length; U++) {
|
|
627
|
+
var z = t(E, U, v, q, D + "[" + U + "]", i);
|
|
628
628
|
if (z instanceof Error)
|
|
629
629
|
return z;
|
|
630
630
|
}
|
|
631
631
|
return null;
|
|
632
632
|
}
|
|
633
|
-
return
|
|
634
|
-
}
|
|
635
|
-
function
|
|
636
|
-
function t(e, c,
|
|
637
|
-
var
|
|
638
|
-
if (!
|
|
639
|
-
var
|
|
640
|
-
return new O("Invalid " + v + " `" +
|
|
633
|
+
return L(e);
|
|
634
|
+
}
|
|
635
|
+
function F() {
|
|
636
|
+
function t(e, c, y, v, q) {
|
|
637
|
+
var D = e[c];
|
|
638
|
+
if (!x(D)) {
|
|
639
|
+
var E = K(D);
|
|
640
|
+
return new O("Invalid " + v + " `" + q + "` of type " + ("`" + E + "` supplied to `" + y + "`, expected a single ReactElement."));
|
|
641
641
|
}
|
|
642
642
|
return null;
|
|
643
643
|
}
|
|
644
|
-
return
|
|
644
|
+
return L(t);
|
|
645
645
|
}
|
|
646
646
|
function u() {
|
|
647
|
-
function t(e, c,
|
|
648
|
-
var
|
|
649
|
-
if (!a.isValidElementType(
|
|
650
|
-
var
|
|
651
|
-
return new O("Invalid " + v + " `" +
|
|
647
|
+
function t(e, c, y, v, q) {
|
|
648
|
+
var D = e[c];
|
|
649
|
+
if (!a.isValidElementType(D)) {
|
|
650
|
+
var E = K(D);
|
|
651
|
+
return new O("Invalid " + v + " `" + q + "` of type " + ("`" + E + "` supplied to `" + y + "`, expected a single ReactElement type."));
|
|
652
652
|
}
|
|
653
653
|
return null;
|
|
654
654
|
}
|
|
655
|
-
return
|
|
655
|
+
return L(t);
|
|
656
656
|
}
|
|
657
|
-
function
|
|
658
|
-
function e(c,
|
|
659
|
-
if (!(c[
|
|
660
|
-
var
|
|
661
|
-
return new O("Invalid " +
|
|
657
|
+
function I(t) {
|
|
658
|
+
function e(c, y, v, q, D) {
|
|
659
|
+
if (!(c[y] instanceof t)) {
|
|
660
|
+
var E = t.name || M, A = w(c[y]);
|
|
661
|
+
return new O("Invalid " + q + " `" + D + "` of type " + ("`" + A + "` supplied to `" + v + "`, expected ") + ("instance of `" + E + "`."));
|
|
662
662
|
}
|
|
663
663
|
return null;
|
|
664
664
|
}
|
|
665
|
-
return
|
|
665
|
+
return L(e);
|
|
666
666
|
}
|
|
667
|
-
function
|
|
667
|
+
function J(t) {
|
|
668
668
|
if (!Array.isArray(t))
|
|
669
669
|
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? d(
|
|
670
670
|
"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])."
|
|
671
|
-
) : d("Invalid argument supplied to oneOf, expected an array.")),
|
|
672
|
-
function e(c,
|
|
673
|
-
for (var
|
|
674
|
-
if (Y(
|
|
671
|
+
) : d("Invalid argument supplied to oneOf, expected an array.")), R;
|
|
672
|
+
function e(c, y, v, q, D) {
|
|
673
|
+
for (var E = c[y], A = 0; A < t.length; A++)
|
|
674
|
+
if (Y(E, t[A]))
|
|
675
675
|
return null;
|
|
676
676
|
var U = JSON.stringify(t, function(ee, h) {
|
|
677
|
-
var te =
|
|
677
|
+
var te = T(h);
|
|
678
678
|
return te === "symbol" ? String(h) : h;
|
|
679
679
|
});
|
|
680
|
-
return new O("Invalid " +
|
|
680
|
+
return new O("Invalid " + q + " `" + D + "` of value `" + String(E) + "` " + ("supplied to `" + v + "`, expected one of " + U + "."));
|
|
681
681
|
}
|
|
682
|
-
return
|
|
682
|
+
return L(e);
|
|
683
683
|
}
|
|
684
|
-
function
|
|
685
|
-
function e(c,
|
|
684
|
+
function j(t) {
|
|
685
|
+
function e(c, y, v, q, D) {
|
|
686
686
|
if (typeof t != "function")
|
|
687
|
-
return new O("Property `" +
|
|
688
|
-
var
|
|
689
|
-
if (
|
|
690
|
-
return new O("Invalid " +
|
|
691
|
-
for (var U in
|
|
692
|
-
if (s(
|
|
693
|
-
var z = t(
|
|
687
|
+
return new O("Property `" + D + "` of component `" + v + "` has invalid PropType notation inside objectOf.");
|
|
688
|
+
var E = c[y], A = K(E);
|
|
689
|
+
if (A !== "object")
|
|
690
|
+
return new O("Invalid " + q + " `" + D + "` of type " + ("`" + A + "` supplied to `" + v + "`, expected an object."));
|
|
691
|
+
for (var U in E)
|
|
692
|
+
if (s(E, U)) {
|
|
693
|
+
var z = t(E, U, v, q, D + "." + U, i);
|
|
694
694
|
if (z instanceof Error)
|
|
695
695
|
return z;
|
|
696
696
|
}
|
|
697
697
|
return null;
|
|
698
698
|
}
|
|
699
|
-
return
|
|
699
|
+
return L(e);
|
|
700
700
|
}
|
|
701
|
-
function
|
|
701
|
+
function r(t) {
|
|
702
702
|
if (!Array.isArray(t))
|
|
703
|
-
return process.env.NODE_ENV !== "production" && d("Invalid argument supplied to oneOfType, expected an instance of array."),
|
|
703
|
+
return process.env.NODE_ENV !== "production" && d("Invalid argument supplied to oneOfType, expected an instance of array."), R;
|
|
704
704
|
for (var e = 0; e < t.length; e++) {
|
|
705
705
|
var c = t[e];
|
|
706
706
|
if (typeof c != "function")
|
|
707
707
|
return d(
|
|
708
|
-
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " +
|
|
709
|
-
),
|
|
708
|
+
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + Z(c) + " at index " + e + "."
|
|
709
|
+
), R;
|
|
710
710
|
}
|
|
711
|
-
function
|
|
711
|
+
function y(v, q, D, E, A) {
|
|
712
712
|
for (var U = [], z = 0; z < t.length; z++) {
|
|
713
|
-
var ee = t[z], h = ee(v,
|
|
713
|
+
var ee = t[z], h = ee(v, q, D, E, A, i);
|
|
714
714
|
if (h == null)
|
|
715
715
|
return null;
|
|
716
716
|
h.data && s(h.data, "expectedType") && U.push(h.data.expectedType);
|
|
717
717
|
}
|
|
718
718
|
var te = U.length > 0 ? ", expected one of type [" + U.join(", ") + "]" : "";
|
|
719
|
-
return new O("Invalid " +
|
|
719
|
+
return new O("Invalid " + E + " `" + A + "` supplied to " + ("`" + D + "`" + te + "."));
|
|
720
720
|
}
|
|
721
|
-
return
|
|
721
|
+
return L(y);
|
|
722
722
|
}
|
|
723
|
-
function
|
|
724
|
-
function t(e, c,
|
|
725
|
-
return
|
|
723
|
+
function o() {
|
|
724
|
+
function t(e, c, y, v, q) {
|
|
725
|
+
return P(e[c]) ? null : new O("Invalid " + v + " `" + q + "` supplied to " + ("`" + y + "`, expected a ReactNode."));
|
|
726
726
|
}
|
|
727
|
-
return
|
|
727
|
+
return L(t);
|
|
728
728
|
}
|
|
729
|
-
function p(t, e, c,
|
|
729
|
+
function p(t, e, c, y, v) {
|
|
730
730
|
return new O(
|
|
731
|
-
(t || "React class") + ": " + e + " type `" + c + "." +
|
|
731
|
+
(t || "React class") + ": " + e + " type `" + c + "." + y + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + v + "`."
|
|
732
732
|
);
|
|
733
733
|
}
|
|
734
|
-
function
|
|
735
|
-
function e(c,
|
|
736
|
-
var
|
|
737
|
-
if (
|
|
738
|
-
return new O("Invalid " +
|
|
734
|
+
function l(t) {
|
|
735
|
+
function e(c, y, v, q, D) {
|
|
736
|
+
var E = c[y], A = K(E);
|
|
737
|
+
if (A !== "object")
|
|
738
|
+
return new O("Invalid " + q + " `" + D + "` of type `" + A + "` " + ("supplied to `" + v + "`, expected `object`."));
|
|
739
739
|
for (var U in t) {
|
|
740
740
|
var z = t[U];
|
|
741
741
|
if (typeof z != "function")
|
|
742
|
-
return p(v,
|
|
743
|
-
var ee = z(
|
|
742
|
+
return p(v, q, D, U, T(z));
|
|
743
|
+
var ee = z(E, U, v, q, D + "." + U, i);
|
|
744
744
|
if (ee)
|
|
745
745
|
return ee;
|
|
746
746
|
}
|
|
747
747
|
return null;
|
|
748
748
|
}
|
|
749
|
-
return
|
|
750
|
-
}
|
|
751
|
-
function
|
|
752
|
-
function e(c,
|
|
753
|
-
var
|
|
754
|
-
if (
|
|
755
|
-
return new O("Invalid " +
|
|
756
|
-
var U = n({}, c[
|
|
749
|
+
return L(e);
|
|
750
|
+
}
|
|
751
|
+
function m(t) {
|
|
752
|
+
function e(c, y, v, q, D) {
|
|
753
|
+
var E = c[y], A = K(E);
|
|
754
|
+
if (A !== "object")
|
|
755
|
+
return new O("Invalid " + q + " `" + D + "` of type `" + A + "` " + ("supplied to `" + v + "`, expected `object`."));
|
|
756
|
+
var U = n({}, c[y], t);
|
|
757
757
|
for (var z in U) {
|
|
758
758
|
var ee = t[z];
|
|
759
759
|
if (s(t, z) && typeof ee != "function")
|
|
760
|
-
return p(v,
|
|
760
|
+
return p(v, q, D, z, T(ee));
|
|
761
761
|
if (!ee)
|
|
762
762
|
return new O(
|
|
763
|
-
"Invalid " +
|
|
763
|
+
"Invalid " + q + " `" + D + "` key `" + z + "` supplied to `" + v + "`.\nBad object: " + JSON.stringify(c[y], null, " ") + `
|
|
764
764
|
Valid keys: ` + JSON.stringify(Object.keys(t), null, " ")
|
|
765
765
|
);
|
|
766
|
-
var h = ee(
|
|
766
|
+
var h = ee(E, z, v, q, D + "." + z, i);
|
|
767
767
|
if (h)
|
|
768
768
|
return h;
|
|
769
769
|
}
|
|
770
770
|
return null;
|
|
771
771
|
}
|
|
772
|
-
return
|
|
772
|
+
return L(e);
|
|
773
773
|
}
|
|
774
|
-
function
|
|
774
|
+
function P(t) {
|
|
775
775
|
switch (typeof t) {
|
|
776
776
|
case "number":
|
|
777
777
|
case "string":
|
|
@@ -781,20 +781,20 @@ Valid keys: ` + JSON.stringify(Object.keys(t), null, " ")
|
|
|
781
781
|
return !t;
|
|
782
782
|
case "object":
|
|
783
783
|
if (Array.isArray(t))
|
|
784
|
-
return t.every(
|
|
785
|
-
if (t === null ||
|
|
784
|
+
return t.every(P);
|
|
785
|
+
if (t === null || x(t))
|
|
786
786
|
return !0;
|
|
787
|
-
var e =
|
|
787
|
+
var e = S(t);
|
|
788
788
|
if (e) {
|
|
789
|
-
var c = e.call(t),
|
|
789
|
+
var c = e.call(t), y;
|
|
790
790
|
if (e !== t.entries) {
|
|
791
|
-
for (; !(
|
|
792
|
-
if (!
|
|
791
|
+
for (; !(y = c.next()).done; )
|
|
792
|
+
if (!P(y.value))
|
|
793
793
|
return !1;
|
|
794
794
|
} else
|
|
795
|
-
for (; !(
|
|
796
|
-
var v =
|
|
797
|
-
if (v && !
|
|
795
|
+
for (; !(y = c.next()).done; ) {
|
|
796
|
+
var v = y.value;
|
|
797
|
+
if (v && !P(v[1]))
|
|
798
798
|
return !1;
|
|
799
799
|
}
|
|
800
800
|
} else
|
|
@@ -804,14 +804,14 @@ Valid keys: ` + JSON.stringify(Object.keys(t), null, " ")
|
|
|
804
804
|
return !1;
|
|
805
805
|
}
|
|
806
806
|
}
|
|
807
|
-
function
|
|
807
|
+
function N(t, e) {
|
|
808
808
|
return t === "symbol" ? !0 : e ? e["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && e instanceof Symbol : !1;
|
|
809
809
|
}
|
|
810
810
|
function K(t) {
|
|
811
811
|
var e = typeof t;
|
|
812
|
-
return Array.isArray(t) ? "array" : t instanceof RegExp ? "object" :
|
|
812
|
+
return Array.isArray(t) ? "array" : t instanceof RegExp ? "object" : N(e, t) ? "symbol" : e;
|
|
813
813
|
}
|
|
814
|
-
function
|
|
814
|
+
function T(t) {
|
|
815
815
|
if (typeof t > "u" || t === null)
|
|
816
816
|
return "" + t;
|
|
817
817
|
var e = K(t);
|
|
@@ -823,8 +823,8 @@ Valid keys: ` + JSON.stringify(Object.keys(t), null, " ")
|
|
|
823
823
|
}
|
|
824
824
|
return e;
|
|
825
825
|
}
|
|
826
|
-
function
|
|
827
|
-
var e =
|
|
826
|
+
function Z(t) {
|
|
827
|
+
var e = T(t);
|
|
828
828
|
switch (e) {
|
|
829
829
|
case "array":
|
|
830
830
|
case "object":
|
|
@@ -837,24 +837,24 @@ Valid keys: ` + JSON.stringify(Object.keys(t), null, " ")
|
|
|
837
837
|
return e;
|
|
838
838
|
}
|
|
839
839
|
}
|
|
840
|
-
function
|
|
840
|
+
function w(t) {
|
|
841
841
|
return !t.constructor || !t.constructor.name ? M : t.constructor.name;
|
|
842
842
|
}
|
|
843
|
-
return
|
|
844
|
-
},
|
|
843
|
+
return k.checkPropTypes = g, k.resetWarningCache = g.resetWarningCache, k.PropTypes = k, k;
|
|
844
|
+
}, ge;
|
|
845
845
|
}
|
|
846
|
-
var
|
|
846
|
+
var ye, Pe;
|
|
847
847
|
function Ke() {
|
|
848
|
-
if (Pe) return
|
|
848
|
+
if (Pe) return ye;
|
|
849
849
|
Pe = 1;
|
|
850
850
|
var a = /* @__PURE__ */ ve();
|
|
851
851
|
function n() {
|
|
852
852
|
}
|
|
853
853
|
function i() {
|
|
854
854
|
}
|
|
855
|
-
return i.resetWarningCache = n,
|
|
856
|
-
function s(
|
|
857
|
-
if (
|
|
855
|
+
return i.resetWarningCache = n, ye = function() {
|
|
856
|
+
function s(R, x, $, f, b, S) {
|
|
857
|
+
if (S !== a) {
|
|
858
858
|
var M = new Error(
|
|
859
859
|
"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"
|
|
860
860
|
);
|
|
@@ -862,7 +862,7 @@ function Ke() {
|
|
|
862
862
|
}
|
|
863
863
|
}
|
|
864
864
|
s.isRequired = s;
|
|
865
|
-
function
|
|
865
|
+
function g() {
|
|
866
866
|
return s;
|
|
867
867
|
}
|
|
868
868
|
var d = {
|
|
@@ -875,21 +875,21 @@ function Ke() {
|
|
|
875
875
|
string: s,
|
|
876
876
|
symbol: s,
|
|
877
877
|
any: s,
|
|
878
|
-
arrayOf:
|
|
878
|
+
arrayOf: g,
|
|
879
879
|
element: s,
|
|
880
880
|
elementType: s,
|
|
881
|
-
instanceOf:
|
|
881
|
+
instanceOf: g,
|
|
882
882
|
node: s,
|
|
883
|
-
objectOf:
|
|
884
|
-
oneOf:
|
|
885
|
-
oneOfType:
|
|
886
|
-
shape:
|
|
887
|
-
exact:
|
|
883
|
+
objectOf: g,
|
|
884
|
+
oneOf: g,
|
|
885
|
+
oneOfType: g,
|
|
886
|
+
shape: g,
|
|
887
|
+
exact: g,
|
|
888
888
|
checkPropTypes: i,
|
|
889
889
|
resetWarningCache: n
|
|
890
890
|
};
|
|
891
891
|
return d.PropTypes = d, d;
|
|
892
|
-
},
|
|
892
|
+
}, ye;
|
|
893
893
|
}
|
|
894
894
|
var $e;
|
|
895
895
|
function Xe() {
|
|
@@ -902,300 +902,311 @@ function Xe() {
|
|
|
902
902
|
return ae.exports;
|
|
903
903
|
}
|
|
904
904
|
var He = /* @__PURE__ */ Xe();
|
|
905
|
-
const
|
|
906
|
-
var
|
|
905
|
+
const C = /* @__PURE__ */ ze(He);
|
|
906
|
+
var X = {}, ke;
|
|
907
907
|
function Qe() {
|
|
908
|
-
if (ke) return
|
|
908
|
+
if (ke) return X;
|
|
909
909
|
ke = 1;
|
|
910
910
|
function a(r) {
|
|
911
911
|
return r ? /^[a-zA-Z][a-zA-Z0-9_-]{2,50}$/.test(r) : !1;
|
|
912
912
|
}
|
|
913
|
-
|
|
913
|
+
X.isValidUserName = a;
|
|
914
914
|
function n(r) {
|
|
915
915
|
return r ? /^[A-Za-z' -]{2,50}$/.test(r) : !1;
|
|
916
916
|
}
|
|
917
|
-
|
|
917
|
+
X.isValidName = n;
|
|
918
918
|
function i(r) {
|
|
919
919
|
return r ? /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(r) : !1;
|
|
920
920
|
}
|
|
921
|
-
|
|
921
|
+
X.isValidEmail = i;
|
|
922
922
|
function s(r) {
|
|
923
923
|
return r ? /^[0-9]{10,15}$/g.test(r) : !1;
|
|
924
924
|
}
|
|
925
|
-
|
|
926
|
-
function
|
|
925
|
+
X.isValidPhoneNum = s;
|
|
926
|
+
function g(r) {
|
|
927
927
|
return r ? /^[a-zA-Z0-9.\-\(\) ]{2,}$/.test(r) : !1;
|
|
928
928
|
}
|
|
929
|
-
|
|
929
|
+
X.isValidOrganisationName = g;
|
|
930
930
|
function d(r) {
|
|
931
931
|
return !(!r || r.length < 6 || /[A-Z]/.test(r) === !1 || /[a-z]/.test(r) === !1 || /[0-9]/.test(r) === !1 || /[\s]/.test(r) || /[\][!"#$%&'()*+,./:;<=>?@^\\_`{|}~-]/.test(r) === !1);
|
|
932
932
|
}
|
|
933
|
-
|
|
934
|
-
function
|
|
935
|
-
let o = r.getFullYear(),
|
|
936
|
-
|
|
937
|
-
let
|
|
938
|
-
return
|
|
933
|
+
X.isValidPassword = d;
|
|
934
|
+
function R(r) {
|
|
935
|
+
let o = r.getFullYear(), p = r.getMonth() + 1;
|
|
936
|
+
p = $(p, 2);
|
|
937
|
+
let l = r.getDate();
|
|
938
|
+
return l = $(l, 2), `${o}-${p}-${l}`;
|
|
939
939
|
}
|
|
940
|
-
|
|
941
|
-
function
|
|
942
|
-
let o =
|
|
943
|
-
return `${
|
|
944
|
-
}
|
|
945
|
-
|
|
946
|
-
function
|
|
947
|
-
let
|
|
948
|
-
const
|
|
949
|
-
for (let
|
|
950
|
-
|
|
951
|
-
return
|
|
952
|
-
}
|
|
953
|
-
|
|
954
|
-
function
|
|
940
|
+
X.timeStampYyyyMmDd = R;
|
|
941
|
+
function x(r) {
|
|
942
|
+
let o = $(r.getHours(), 2), p = $(r.getMinutes(), 2), l = $(r.getSeconds(), 2), m = $(r.getMilliseconds(), 3);
|
|
943
|
+
return `${R(r)}T${o}:${p}:${l}.${m}`;
|
|
944
|
+
}
|
|
945
|
+
X.timeStampString = x;
|
|
946
|
+
function $(r, o) {
|
|
947
|
+
let p = r + "";
|
|
948
|
+
const l = o - p.length;
|
|
949
|
+
for (let m = 1; m <= l; m++)
|
|
950
|
+
p = "0" + p;
|
|
951
|
+
return p;
|
|
952
|
+
}
|
|
953
|
+
X.addLeadingZeros = $;
|
|
954
|
+
function f(r) {
|
|
955
955
|
return new Intl.NumberFormat("en-US", { style: "currency", currency: "ZAR" }).format(r).replace(/ZAR/gi, "R");
|
|
956
956
|
}
|
|
957
|
-
|
|
958
|
-
function
|
|
957
|
+
X.toZarCurrencyFormat = f;
|
|
958
|
+
function b(r) {
|
|
959
959
|
return JSON.parse(JSON.stringify(r));
|
|
960
960
|
}
|
|
961
|
-
|
|
962
|
-
function
|
|
961
|
+
X.deepClone = b;
|
|
962
|
+
function S(r) {
|
|
963
963
|
const o = [];
|
|
964
964
|
if (Object.prototype.toString.call(r) !== "[object Object]")
|
|
965
965
|
return o;
|
|
966
|
-
for (const
|
|
967
|
-
const
|
|
968
|
-
|
|
969
|
-
o.push(
|
|
970
|
-
}) : o.push(
|
|
966
|
+
for (const p in r) {
|
|
967
|
+
const l = S(r[p]);
|
|
968
|
+
l.length > 0 ? l.forEach((m) => {
|
|
969
|
+
o.push(p + "." + m);
|
|
970
|
+
}) : o.push(p);
|
|
971
971
|
}
|
|
972
972
|
return o.sort(), o;
|
|
973
973
|
}
|
|
974
|
-
|
|
974
|
+
X.getPaths = S;
|
|
975
975
|
function M(r) {
|
|
976
|
-
const o =
|
|
977
|
-
for (let
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
for (let
|
|
981
|
-
const
|
|
982
|
-
Object.prototype.toString.call(o[
|
|
983
|
-
}
|
|
984
|
-
return
|
|
985
|
-
}
|
|
986
|
-
|
|
987
|
-
function
|
|
988
|
-
if (
|
|
989
|
-
throw console.log(
|
|
990
|
-
let
|
|
991
|
-
return
|
|
976
|
+
const o = b(r), p = [], l = {};
|
|
977
|
+
for (let m in o)
|
|
978
|
+
p.push(m);
|
|
979
|
+
p.sort();
|
|
980
|
+
for (let m in p) {
|
|
981
|
+
const P = p[m];
|
|
982
|
+
Object.prototype.toString.call(o[P]) === "[object Object]" ? l[P] = M(o[P]) : l[P] = o[P];
|
|
983
|
+
}
|
|
984
|
+
return l;
|
|
985
|
+
}
|
|
986
|
+
X.getSortedObject = M;
|
|
987
|
+
function k(r, o) {
|
|
988
|
+
if (S(r).includes(o) === !1)
|
|
989
|
+
throw console.log(V(r, o), o, r, S(r)), new Error(`Path ${o} does not exist on the object.`);
|
|
990
|
+
let p = o.split("."), m = b(r)[p[0]];
|
|
991
|
+
return p.length > 1 ? (p.splice(0, 1), k(m, p.join("."))) : m;
|
|
992
|
+
}
|
|
993
|
+
X.get = k;
|
|
994
|
+
function Y(r, o, p) {
|
|
995
|
+
let l = o.split(".");
|
|
996
|
+
if (l.length > 1) {
|
|
997
|
+
r[l[0]] || (r[l[0]] = {});
|
|
998
|
+
const m = r[l[0]];
|
|
999
|
+
l.splice(0, 1), Y(m, l.join("."), p);
|
|
1000
|
+
} else
|
|
1001
|
+
r[l[0]] = p;
|
|
992
1002
|
}
|
|
993
|
-
|
|
994
|
-
function
|
|
1003
|
+
X.set = Y;
|
|
1004
|
+
function O(r, o) {
|
|
995
1005
|
let p = o.split(".");
|
|
996
1006
|
if (p.length > 1) {
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
p.splice(0, 1), Y(b, p.join("."), f);
|
|
1007
|
+
const l = r[p[0]];
|
|
1008
|
+
p.splice(0, 1), O(l, p.join("."));
|
|
1000
1009
|
} else
|
|
1001
|
-
r[p[0]]
|
|
1010
|
+
delete r[p[0]];
|
|
1002
1011
|
}
|
|
1003
|
-
|
|
1004
|
-
function
|
|
1012
|
+
X.unset = O;
|
|
1013
|
+
function L(r, ...o) {
|
|
1005
1014
|
if (!o || !o.length)
|
|
1006
1015
|
throw new Error("fields must be specified");
|
|
1007
|
-
const
|
|
1008
|
-
let
|
|
1009
|
-
for (const
|
|
1010
|
-
const
|
|
1011
|
-
if (o.includes(
|
|
1012
|
-
|
|
1016
|
+
const p = S(r);
|
|
1017
|
+
let l = 0;
|
|
1018
|
+
for (const m in p) {
|
|
1019
|
+
const P = p[m];
|
|
1020
|
+
if (o.includes(P))
|
|
1021
|
+
l++;
|
|
1013
1022
|
else
|
|
1014
1023
|
return !1;
|
|
1015
1024
|
}
|
|
1016
|
-
return
|
|
1025
|
+
return l > 0;
|
|
1017
1026
|
}
|
|
1018
|
-
|
|
1019
|
-
function
|
|
1027
|
+
X.hasOnly = L;
|
|
1028
|
+
function V(r, ...o) {
|
|
1020
1029
|
if (!o || !o.length)
|
|
1021
1030
|
throw new Error("fields must be specified");
|
|
1022
|
-
const
|
|
1023
|
-
let
|
|
1024
|
-
for (const
|
|
1025
|
-
const
|
|
1026
|
-
if (
|
|
1027
|
-
|
|
1031
|
+
const p = S(r);
|
|
1032
|
+
let l = 0;
|
|
1033
|
+
for (const m in o) {
|
|
1034
|
+
const P = o[m];
|
|
1035
|
+
if (p.includes(P))
|
|
1036
|
+
l++;
|
|
1028
1037
|
else
|
|
1029
1038
|
return !1;
|
|
1030
1039
|
}
|
|
1031
|
-
return
|
|
1040
|
+
return l === o.length;
|
|
1032
1041
|
}
|
|
1033
|
-
|
|
1034
|
-
function
|
|
1035
|
-
return
|
|
1042
|
+
X.hasAll = V;
|
|
1043
|
+
function H(r, ...o) {
|
|
1044
|
+
return L(r, ...o) && V(r, ...o);
|
|
1036
1045
|
}
|
|
1037
|
-
|
|
1038
|
-
function
|
|
1039
|
-
const
|
|
1040
|
-
if (!["asc", "desc"].includes(
|
|
1041
|
-
throw new Error(`arraySortDir must be one of ${
|
|
1046
|
+
X.hasOnlyAll = H;
|
|
1047
|
+
function W(r, o, p = 0, l = "asc") {
|
|
1048
|
+
const m = ["asc", "desc"];
|
|
1049
|
+
if (!["asc", "desc"].includes(l))
|
|
1050
|
+
throw new Error(`arraySortDir must be one of ${m}`);
|
|
1042
1051
|
if (r.length === 0)
|
|
1043
1052
|
return -1;
|
|
1044
|
-
let
|
|
1045
|
-
for (;
|
|
1046
|
-
if (
|
|
1047
|
-
return
|
|
1048
|
-
if (
|
|
1049
|
-
return
|
|
1050
|
-
const
|
|
1051
|
-
if (
|
|
1052
|
-
|
|
1053
|
-
else if (
|
|
1054
|
-
|
|
1053
|
+
let P = p, N = r.length - 1;
|
|
1054
|
+
for (; P < N; ) {
|
|
1055
|
+
if (F(r[P], o) === 0)
|
|
1056
|
+
return P;
|
|
1057
|
+
if (F(r[N], o) === 0)
|
|
1058
|
+
return N;
|
|
1059
|
+
const K = Math.trunc((P + N) / 2), T = F(r[K], o, l);
|
|
1060
|
+
if (T < 0)
|
|
1061
|
+
P = K + 1;
|
|
1062
|
+
else if (T > 0)
|
|
1063
|
+
N = K - 1;
|
|
1055
1064
|
else
|
|
1056
|
-
return
|
|
1065
|
+
return K;
|
|
1057
1066
|
}
|
|
1058
|
-
return
|
|
1067
|
+
return P;
|
|
1059
1068
|
}
|
|
1060
|
-
|
|
1061
|
-
function
|
|
1062
|
-
if (!["asc", "desc"].includes(
|
|
1063
|
-
throw new Error(`sortDir must be one of ${
|
|
1064
|
-
const
|
|
1065
|
-
return r > o ?
|
|
1069
|
+
X.binarySearch = W;
|
|
1070
|
+
function F(r, o, p = "asc") {
|
|
1071
|
+
if (!["asc", "desc"].includes(p))
|
|
1072
|
+
throw new Error(`sortDir must be one of ${p}`);
|
|
1073
|
+
const l = p === "desc" ? -1 : 1;
|
|
1074
|
+
return r > o ? l : r < o ? -l : 0;
|
|
1066
1075
|
}
|
|
1067
|
-
|
|
1068
|
-
function
|
|
1076
|
+
X.compare = F;
|
|
1077
|
+
function u(r, o, p = 0, ...l) {
|
|
1069
1078
|
if (r.length === 0)
|
|
1070
1079
|
return -1;
|
|
1071
|
-
let
|
|
1072
|
-
for (;
|
|
1073
|
-
if (
|
|
1074
|
-
return
|
|
1075
|
-
if (
|
|
1076
|
-
return
|
|
1077
|
-
let
|
|
1078
|
-
if (
|
|
1079
|
-
|
|
1080
|
-
else if (
|
|
1081
|
-
|
|
1080
|
+
let m = p, P = r.length - 1;
|
|
1081
|
+
for (; m < P; ) {
|
|
1082
|
+
if (j(r[m], o, ...l) === 0)
|
|
1083
|
+
return m;
|
|
1084
|
+
if (j(r[P], o, ...l) === 0)
|
|
1085
|
+
return P;
|
|
1086
|
+
let N = Math.trunc((m + P) / 2);
|
|
1087
|
+
if (j(r[N], o, ...l) < 0)
|
|
1088
|
+
m = N + 1;
|
|
1089
|
+
else if (j(r[N], o, ...l) > 0)
|
|
1090
|
+
P = N - 1;
|
|
1082
1091
|
else
|
|
1083
|
-
return
|
|
1092
|
+
return N;
|
|
1084
1093
|
}
|
|
1085
|
-
return
|
|
1094
|
+
return m;
|
|
1086
1095
|
}
|
|
1087
|
-
|
|
1088
|
-
function
|
|
1089
|
-
let
|
|
1090
|
-
if (
|
|
1096
|
+
X.binarySearchObj = u;
|
|
1097
|
+
function I(r, o, p, ...l) {
|
|
1098
|
+
let m = p, P = r.length - 1;
|
|
1099
|
+
if (m >= r.length)
|
|
1100
|
+
throw new Error("startFrom is outside the bounds of the array.");
|
|
1101
|
+
if (j(o, r[m], ...l) > 0)
|
|
1091
1102
|
throw new Error("targetObj is to the right ('greater than') objArray[startFrom].");
|
|
1092
|
-
for (;
|
|
1093
|
-
let
|
|
1094
|
-
|
|
1103
|
+
for (; m < P; ) {
|
|
1104
|
+
let N = Math.trunc((m + P) / 2);
|
|
1105
|
+
j(o, r[N], ...l) === 0 ? m = N + 1 : j(o, r[N], ...l) < 0 && (P = N);
|
|
1095
1106
|
}
|
|
1096
|
-
return
|
|
1107
|
+
return j(o, r[m], ...l) === 0 ? -1 : m;
|
|
1097
1108
|
}
|
|
1098
|
-
|
|
1099
|
-
function
|
|
1109
|
+
X.getNextDifferent = I;
|
|
1110
|
+
function J(r, o, ...p) {
|
|
1100
1111
|
if (r.length <= 1)
|
|
1101
1112
|
return [...r];
|
|
1102
1113
|
if (typeof o != "boolean")
|
|
1103
1114
|
throw new Error("firstOfDuplicates must be boolean true or false.");
|
|
1104
|
-
const
|
|
1105
|
-
let
|
|
1106
|
-
for (;
|
|
1107
|
-
let
|
|
1108
|
-
o ||
|
|
1115
|
+
const l = [];
|
|
1116
|
+
let m = 0;
|
|
1117
|
+
for (; m < r.length - 1 && (o && l.push(r[m]), m = I(r, r[m], m + 1, ...p), !(m < 0)); ) {
|
|
1118
|
+
let P = m - 1;
|
|
1119
|
+
o || l.push(r[P]);
|
|
1109
1120
|
}
|
|
1110
|
-
return
|
|
1121
|
+
return l.length === 0 ? o ? l.push(r[0]) : l.push(r[r.length - 1]) : j(l[l.length - 1], r[r.length - 1], ...p) !== 0 && l.push(r[r.length - 1]), l;
|
|
1111
1122
|
}
|
|
1112
|
-
|
|
1113
|
-
function
|
|
1114
|
-
if (
|
|
1123
|
+
X.getObjArrayWithNoDuplicates = J;
|
|
1124
|
+
function j(r, o, ...p) {
|
|
1125
|
+
if (p.length === 0)
|
|
1115
1126
|
throw new Error("comparisonFields not supplied!");
|
|
1116
|
-
const
|
|
1117
|
-
for (const
|
|
1118
|
-
const
|
|
1119
|
-
let
|
|
1120
|
-
if (
|
|
1121
|
-
throw new Error("Sort direction must be one of " +
|
|
1122
|
-
const
|
|
1123
|
-
if (
|
|
1124
|
-
return
|
|
1125
|
-
if (
|
|
1126
|
-
return -
|
|
1127
|
+
const l = ["", "asc", "desc"];
|
|
1128
|
+
for (const m in p) {
|
|
1129
|
+
const P = p[m].split(" "), N = P[0];
|
|
1130
|
+
let K = "";
|
|
1131
|
+
if (P.length === 2 && (K = P[1]), !l.includes(K))
|
|
1132
|
+
throw new Error("Sort direction must be one of " + l.toString());
|
|
1133
|
+
const T = k(r, N), Z = k(o, N), w = K === "desc" ? -1 : 1;
|
|
1134
|
+
if (T > Z)
|
|
1135
|
+
return w;
|
|
1136
|
+
if (T < Z)
|
|
1137
|
+
return -w;
|
|
1127
1138
|
}
|
|
1128
1139
|
return 0;
|
|
1129
1140
|
}
|
|
1130
|
-
return
|
|
1141
|
+
return X.objCompare = j, X;
|
|
1131
1142
|
}
|
|
1132
1143
|
var re = Qe();
|
|
1133
|
-
const
|
|
1144
|
+
const Ae = Le();
|
|
1134
1145
|
function er({ children: a }) {
|
|
1135
1146
|
const n = Ye({});
|
|
1136
|
-
function i(
|
|
1137
|
-
if (s(
|
|
1138
|
-
throw new Error(`The collection ${
|
|
1147
|
+
function i(f, b, S = null, M = !0, ...k) {
|
|
1148
|
+
if (s(f))
|
|
1149
|
+
throw new Error(`The collection ${f} already exists.`);
|
|
1139
1150
|
if (M)
|
|
1140
|
-
n.current[
|
|
1151
|
+
n.current[f] = new rr(f, b, S, ...k);
|
|
1141
1152
|
else {
|
|
1142
|
-
const Y =
|
|
1143
|
-
n.current[
|
|
1153
|
+
const Y = b.map((O) => re.getSortedObject(O));
|
|
1154
|
+
n.current[f] = new Me(f, Y, S, ...k);
|
|
1144
1155
|
}
|
|
1145
1156
|
}
|
|
1146
|
-
function s(
|
|
1147
|
-
return n.current[
|
|
1157
|
+
function s(f) {
|
|
1158
|
+
return n.current[f] !== void 0;
|
|
1148
1159
|
}
|
|
1149
|
-
function
|
|
1150
|
-
if (!s(
|
|
1151
|
-
throw new Error(`Collection ${
|
|
1152
|
-
n.current[
|
|
1160
|
+
function g(f, b) {
|
|
1161
|
+
if (!s(f))
|
|
1162
|
+
throw new Error(`Collection ${f} not found.`);
|
|
1163
|
+
n.current[f].updateData(b);
|
|
1153
1164
|
}
|
|
1154
|
-
function d(
|
|
1155
|
-
if (!s(
|
|
1156
|
-
throw new Error(`Collection ${
|
|
1157
|
-
return n.current[
|
|
1165
|
+
function d(f) {
|
|
1166
|
+
if (!s(f))
|
|
1167
|
+
throw new Error(`Collection ${f} not found.`);
|
|
1168
|
+
return n.current[f].getData();
|
|
1158
1169
|
}
|
|
1159
|
-
function
|
|
1160
|
-
if (!s(
|
|
1161
|
-
throw new Error(`Collection ${
|
|
1162
|
-
n.current[
|
|
1170
|
+
function R(f, b) {
|
|
1171
|
+
if (!s(f))
|
|
1172
|
+
throw new Error(`Collection ${f} not found.`);
|
|
1173
|
+
n.current[f].setSelectedItems(b);
|
|
1163
1174
|
}
|
|
1164
|
-
function
|
|
1165
|
-
if (!s(
|
|
1166
|
-
throw new Error(`Collection ${
|
|
1167
|
-
return n.current[
|
|
1175
|
+
function x(f) {
|
|
1176
|
+
if (!s(f))
|
|
1177
|
+
throw new Error(`Collection ${f} not found.`);
|
|
1178
|
+
return n.current[f].getSelectedItems();
|
|
1168
1179
|
}
|
|
1169
|
-
function
|
|
1170
|
-
if (!s(
|
|
1171
|
-
throw new Error(`Collection ${
|
|
1172
|
-
return n.current[
|
|
1180
|
+
function $(f) {
|
|
1181
|
+
if (!s(f))
|
|
1182
|
+
throw new Error(`Collection ${f} not found.`);
|
|
1183
|
+
return n.current[f].getMaxNumSelections();
|
|
1173
1184
|
}
|
|
1174
1185
|
return /* @__PURE__ */ _.jsx(
|
|
1175
|
-
|
|
1186
|
+
Ae.Provider,
|
|
1176
1187
|
{
|
|
1177
1188
|
value: {
|
|
1178
1189
|
addCollection: i,
|
|
1179
1190
|
collectionExists: s,
|
|
1180
1191
|
getCollectionData: d,
|
|
1181
|
-
updateCollection:
|
|
1182
|
-
setSelected:
|
|
1183
|
-
getSelected:
|
|
1184
|
-
getMaxNumSelections:
|
|
1192
|
+
updateCollection: g,
|
|
1193
|
+
setSelected: R,
|
|
1194
|
+
getSelected: x,
|
|
1195
|
+
getMaxNumSelections: $
|
|
1185
1196
|
},
|
|
1186
1197
|
children: a
|
|
1187
1198
|
}
|
|
1188
1199
|
);
|
|
1189
1200
|
}
|
|
1190
1201
|
er.propTypes = {
|
|
1191
|
-
children:
|
|
1202
|
+
children: C.element.isRequired
|
|
1192
1203
|
};
|
|
1193
1204
|
function le() {
|
|
1194
|
-
return Fe(
|
|
1205
|
+
return Fe(Ae);
|
|
1195
1206
|
}
|
|
1196
1207
|
class Me {
|
|
1197
|
-
constructor(n, i, s = null, ...
|
|
1198
|
-
this.sortFields =
|
|
1208
|
+
constructor(n, i, s = null, ...g) {
|
|
1209
|
+
this.sortFields = g, this.collectionName = n, this.selectedItems = [], this.maxNumSelections = s, this.data = [...i], i.length > 0 && re.getPaths(i[0]) > 0 && (this.data = i.map((d) => re.getSortedObject(d))), this.sortData();
|
|
1199
1210
|
}
|
|
1200
1211
|
// constructor(pCollectionName, pData) {
|
|
1201
1212
|
sortData() {
|
|
@@ -1222,14 +1233,14 @@ class Me {
|
|
|
1222
1233
|
updateData(n) {
|
|
1223
1234
|
this.data = n.map((s) => re.getSortedObject(s)), this.sortData();
|
|
1224
1235
|
let i = null;
|
|
1225
|
-
this.selectedItems = this.selectedItems.filter((s) => this.data.findIndex((
|
|
1236
|
+
this.selectedItems = this.selectedItems.filter((s) => this.data.findIndex((g) => (i === null && (i = re.getPaths(g)), re.objCompare(g, s, ...i) === 0)) >= 0), this.selectedItems = this.selectedItems.toSorted(this.comparisonFunction);
|
|
1226
1237
|
}
|
|
1227
1238
|
// updateData(pData) {
|
|
1228
1239
|
setSelectedItems(n) {
|
|
1229
1240
|
if (this.maxNumSelections !== null && n.length > this.maxNumSelections)
|
|
1230
1241
|
return;
|
|
1231
1242
|
let i = null;
|
|
1232
|
-
n = n.filter((s) => this.data.findIndex((
|
|
1243
|
+
n = n.filter((s) => this.data.findIndex((g) => (i === null && (i = re.getPaths(g)), re.objCompare(g, s, ...i) === 0)) >= 0), this.selectedItems = n.toSorted(this.comparisonFunction), this.selectedItems = this.selectedItems.map((s) => re.getSortedObject(s));
|
|
1233
1244
|
}
|
|
1234
1245
|
// setSelectedItems(pSelectedItems) {
|
|
1235
1246
|
getData() {
|
|
@@ -1246,8 +1257,8 @@ class Me {
|
|
|
1246
1257
|
}
|
|
1247
1258
|
}
|
|
1248
1259
|
class rr extends Me {
|
|
1249
|
-
constructor(n, i, s = null, ...
|
|
1250
|
-
super(n, i, s, ...
|
|
1260
|
+
constructor(n, i, s = null, ...g) {
|
|
1261
|
+
super(n, i, s, ...g);
|
|
1251
1262
|
}
|
|
1252
1263
|
comparisonFunction(n, i) {
|
|
1253
1264
|
return re.compare(n, i, this.sortFields[0]);
|
|
@@ -1276,52 +1287,52 @@ function tr({
|
|
|
1276
1287
|
// function to pass on the value of the selected item to the parent component
|
|
1277
1288
|
dropdownStyle: s,
|
|
1278
1289
|
// Styling object with fields {color, backgroundColor, borderColor (optional), fontSize}.
|
|
1279
|
-
isDisabled:
|
|
1290
|
+
isDisabled: g = !1
|
|
1280
1291
|
}) {
|
|
1281
|
-
const { getCollectionData: d, setSelected:
|
|
1282
|
-
const
|
|
1292
|
+
const { getCollectionData: d, setSelected: R, getSelected: x, collectionExists: $ } = le(), [f] = Q(() => {
|
|
1293
|
+
const I = {
|
|
1283
1294
|
backgroundColor: s?.backgroundColor,
|
|
1284
1295
|
color: s?.color
|
|
1285
1296
|
};
|
|
1286
|
-
return s?.fontSize && (
|
|
1287
|
-
}),
|
|
1288
|
-
async function
|
|
1289
|
-
Y(
|
|
1290
|
-
let
|
|
1291
|
-
|
|
1292
|
-
const
|
|
1293
|
-
return
|
|
1294
|
-
}),
|
|
1295
|
-
}
|
|
1296
|
-
async function
|
|
1297
|
-
Y(
|
|
1297
|
+
return s?.fontSize && (I.fontSize = s?.fontSize), I;
|
|
1298
|
+
}), b = s?.borderColor, [S, M] = Q(!1), [k, Y] = Q(""), [O, L] = Q([]);
|
|
1299
|
+
async function V(I) {
|
|
1300
|
+
Y(I.target.value);
|
|
1301
|
+
let J = [];
|
|
1302
|
+
J = d(n), J = J.filter((j) => {
|
|
1303
|
+
const r = j.toUpperCase(), o = I.target.value.toUpperCase();
|
|
1304
|
+
return r.includes(o);
|
|
1305
|
+
}), L(J), J.length === 0 ? F() : u();
|
|
1306
|
+
}
|
|
1307
|
+
async function H(I) {
|
|
1308
|
+
Y(I), R(n, [I]), i !== null && i(), F();
|
|
1298
1309
|
}
|
|
1299
|
-
function
|
|
1300
|
-
|
|
1310
|
+
function W() {
|
|
1311
|
+
S ? F() : u();
|
|
1301
1312
|
}
|
|
1302
|
-
function
|
|
1313
|
+
function F() {
|
|
1303
1314
|
M(!1);
|
|
1304
1315
|
}
|
|
1305
1316
|
function u() {
|
|
1306
1317
|
O.length > 0 && M(!0);
|
|
1307
1318
|
}
|
|
1308
1319
|
return ce(() => {
|
|
1309
|
-
if (
|
|
1320
|
+
if ($(n))
|
|
1310
1321
|
try {
|
|
1311
|
-
let
|
|
1312
|
-
|
|
1313
|
-
const
|
|
1314
|
-
|
|
1322
|
+
let I;
|
|
1323
|
+
I = d(n), L(I);
|
|
1324
|
+
const J = x(n);
|
|
1325
|
+
J.length > 0 ? Y(J[0]) : Y("");
|
|
1315
1326
|
} catch {
|
|
1316
1327
|
}
|
|
1317
|
-
}, [
|
|
1328
|
+
}, [$(n)]), /* @__PURE__ */ _.jsxs(
|
|
1318
1329
|
"div",
|
|
1319
1330
|
{
|
|
1320
1331
|
className: `dropdown-js dropdown-js-rounded
|
|
1321
|
-
${
|
|
1322
|
-
style: { ...
|
|
1332
|
+
${b && `dropdown-js-border ${b}`}`,
|
|
1333
|
+
style: { ...g ? { pointerEvents: "none" } : {} },
|
|
1323
1334
|
children: [
|
|
1324
|
-
/* @__PURE__ */ _.jsxs("div", { className: "dropdown-js-input-wrapper dropdown-js-rounded", style:
|
|
1335
|
+
/* @__PURE__ */ _.jsxs("div", { className: "dropdown-js-input-wrapper dropdown-js-rounded", style: f, children: [
|
|
1325
1336
|
/* @__PURE__ */ _.jsx(
|
|
1326
1337
|
"input",
|
|
1327
1338
|
{
|
|
@@ -1330,39 +1341,39 @@ function tr({
|
|
|
1330
1341
|
type: "text",
|
|
1331
1342
|
id: "searchDropDown",
|
|
1332
1343
|
name: "searchDropDown",
|
|
1333
|
-
style:
|
|
1344
|
+
style: f,
|
|
1334
1345
|
"aria-label": `Type to Search for ${a}`,
|
|
1335
1346
|
"aria-required": !0,
|
|
1336
|
-
onChange: (
|
|
1337
|
-
disabled:
|
|
1347
|
+
onChange: (I) => V(I),
|
|
1348
|
+
disabled: g,
|
|
1338
1349
|
placeholder: "Type to search",
|
|
1339
|
-
value:
|
|
1350
|
+
value: k
|
|
1340
1351
|
}
|
|
1341
1352
|
),
|
|
1342
|
-
/* @__PURE__ */ _.jsx("div", { className: "dropdown-js-arrow-container dropdown-js-padding dropdown-js-rounded", onClick: (
|
|
1353
|
+
/* @__PURE__ */ _.jsx("div", { className: "dropdown-js-arrow-container dropdown-js-padding dropdown-js-rounded", onClick: (I) => W(), children: /* @__PURE__ */ _.jsx("span", { className: "dropdown-js-arrow dropdown-js-padding", children: S ? "-" : "+" }) })
|
|
1343
1354
|
] }),
|
|
1344
1355
|
/* @__PURE__ */ _.jsx(
|
|
1345
1356
|
"div",
|
|
1346
1357
|
{
|
|
1347
|
-
className: `dropdown-js-padding dropdown-js-menu ${!
|
|
1358
|
+
className: `dropdown-js-padding dropdown-js-menu ${!S && "dropdown-js-hide"}`,
|
|
1348
1359
|
id: "dropDown",
|
|
1349
1360
|
name: "dropDown",
|
|
1350
|
-
disabled:
|
|
1361
|
+
disabled: g,
|
|
1351
1362
|
"aria-label": a,
|
|
1352
|
-
style: { ...
|
|
1353
|
-
children: O.map((
|
|
1363
|
+
style: { ...f, marginTop: "3.5px" },
|
|
1364
|
+
children: O.map((I, J) => /* @__PURE__ */ _.jsxs(
|
|
1354
1365
|
"div",
|
|
1355
1366
|
{
|
|
1356
|
-
name:
|
|
1357
|
-
"aria-label":
|
|
1367
|
+
name: I,
|
|
1368
|
+
"aria-label": I,
|
|
1358
1369
|
style: { cursor: "pointer" },
|
|
1359
|
-
onClick: (
|
|
1370
|
+
onClick: (j) => H(I),
|
|
1360
1371
|
children: [
|
|
1361
|
-
|
|
1362
|
-
|
|
1372
|
+
I,
|
|
1373
|
+
J < O.length - 1 && /* @__PURE__ */ _.jsx("hr", { style: { borderColor: f.color } })
|
|
1363
1374
|
]
|
|
1364
1375
|
},
|
|
1365
|
-
`${
|
|
1376
|
+
`${J}#${I}`
|
|
1366
1377
|
))
|
|
1367
1378
|
}
|
|
1368
1379
|
)
|
|
@@ -1371,15 +1382,15 @@ function tr({
|
|
|
1371
1382
|
);
|
|
1372
1383
|
}
|
|
1373
1384
|
tr.propTypes = {
|
|
1374
|
-
label:
|
|
1375
|
-
collectionName:
|
|
1376
|
-
isDisabled:
|
|
1377
|
-
onItemSelected:
|
|
1378
|
-
dropdownStyle:
|
|
1379
|
-
color:
|
|
1380
|
-
backgroundColor:
|
|
1381
|
-
fontSize:
|
|
1382
|
-
borderColor:
|
|
1385
|
+
label: C.string.isRequired,
|
|
1386
|
+
collectionName: C.string.isRequired,
|
|
1387
|
+
isDisabled: C.bool,
|
|
1388
|
+
onItemSelected: C.func,
|
|
1389
|
+
dropdownStyle: C.shape({
|
|
1390
|
+
color: C.string.isRequired,
|
|
1391
|
+
backgroundColor: C.string.isRequired,
|
|
1392
|
+
fontSize: C.string,
|
|
1393
|
+
borderColor: C.string
|
|
1383
1394
|
})
|
|
1384
1395
|
};
|
|
1385
1396
|
function nr({
|
|
@@ -1391,107 +1402,107 @@ function nr({
|
|
|
1391
1402
|
// the name of the field that will be used for displaying the list items to the user.
|
|
1392
1403
|
valueName: s,
|
|
1393
1404
|
// the name of the field that will be used as the underlying value of each list item. Typically a unique code/id
|
|
1394
|
-
onItemSelected:
|
|
1405
|
+
onItemSelected: g = null,
|
|
1395
1406
|
// Function to be called to alert the parent component on selection of an item.
|
|
1396
1407
|
dropdownStyle: d,
|
|
1397
|
-
isDisabled:
|
|
1408
|
+
isDisabled: R = !1
|
|
1398
1409
|
}) {
|
|
1399
1410
|
const {
|
|
1400
|
-
getCollectionData:
|
|
1401
|
-
setSelected:
|
|
1402
|
-
getSelected:
|
|
1403
|
-
collectionExists:
|
|
1404
|
-
} = le(), [
|
|
1405
|
-
const
|
|
1411
|
+
getCollectionData: x,
|
|
1412
|
+
setSelected: $,
|
|
1413
|
+
getSelected: f,
|
|
1414
|
+
collectionExists: b
|
|
1415
|
+
} = le(), [S] = Q(() => {
|
|
1416
|
+
const j = {
|
|
1406
1417
|
backgroundColor: d?.backgroundColor,
|
|
1407
1418
|
color: d?.color
|
|
1408
1419
|
};
|
|
1409
|
-
return d?.fontSize && (
|
|
1410
|
-
}), M = d?.borderColor, [
|
|
1411
|
-
async function
|
|
1412
|
-
|
|
1413
|
-
let
|
|
1414
|
-
|
|
1415
|
-
const p =
|
|
1416
|
-
return p.includes(
|
|
1417
|
-
}),
|
|
1418
|
-
}
|
|
1419
|
-
function
|
|
1420
|
-
|
|
1420
|
+
return d?.fontSize && (j.fontSize = d?.fontSize), j;
|
|
1421
|
+
}), M = d?.borderColor, [k, Y] = Q(null), [O, L] = Q([]), [V, H] = Q("");
|
|
1422
|
+
async function W(j) {
|
|
1423
|
+
H(j.target.value);
|
|
1424
|
+
let r = x(n);
|
|
1425
|
+
r = r.filter((o) => {
|
|
1426
|
+
const p = o[i].toUpperCase(), l = j.target.value.toUpperCase();
|
|
1427
|
+
return p.includes(l);
|
|
1428
|
+
}), L(r), J();
|
|
1429
|
+
}
|
|
1430
|
+
function F(j) {
|
|
1431
|
+
H(j[i]), $(n, [j]), g !== null && g(), I();
|
|
1421
1432
|
}
|
|
1422
1433
|
function u() {
|
|
1423
|
-
|
|
1434
|
+
k ? I() : J();
|
|
1424
1435
|
}
|
|
1425
|
-
function
|
|
1436
|
+
function I() {
|
|
1426
1437
|
Y(!1);
|
|
1427
1438
|
}
|
|
1428
|
-
function
|
|
1439
|
+
function J() {
|
|
1429
1440
|
O.length > 0 && Y(!0);
|
|
1430
1441
|
}
|
|
1431
1442
|
return ce(() => {
|
|
1432
|
-
if (!
|
|
1443
|
+
if (!b(n))
|
|
1433
1444
|
return;
|
|
1434
1445
|
if (!i)
|
|
1435
1446
|
throw new Error("displayName must be provided");
|
|
1436
1447
|
if (!s)
|
|
1437
1448
|
throw new Error("valueName must be provided");
|
|
1438
|
-
let
|
|
1439
|
-
|
|
1440
|
-
if (!
|
|
1441
|
-
throw new Error(`Error in collection ${n}, index ${
|
|
1449
|
+
let j = [...x(n)];
|
|
1450
|
+
j.forEach((r, o) => {
|
|
1451
|
+
if (!r[i])
|
|
1452
|
+
throw new Error(`Error in collection ${n}, index ${o}:
|
|
1442
1453
|
field ${i} found`);
|
|
1443
|
-
if (!
|
|
1444
|
-
throw new Error(`Error in collection ${n}, index ${
|
|
1454
|
+
if (!r[s])
|
|
1455
|
+
throw new Error(`Error in collection ${n}, index ${o}:
|
|
1445
1456
|
field ${s} not found`);
|
|
1446
|
-
}),
|
|
1447
|
-
}, [
|
|
1457
|
+
}), L(j), j = f(n), j.length > 0 ? H(j[0][i]) : H("");
|
|
1458
|
+
}, [b(n)]), /* @__PURE__ */ _.jsxs(
|
|
1448
1459
|
"div",
|
|
1449
1460
|
{
|
|
1450
1461
|
className: `dropdown-js dropdown-js-rounded
|
|
1451
1462
|
${M && `dropdown-js-border ${M}`}`,
|
|
1452
|
-
style: { ...
|
|
1463
|
+
style: { ...R ? { pointerEvents: "none" } : {} },
|
|
1453
1464
|
children: [
|
|
1454
|
-
/* @__PURE__ */ _.jsxs("div", { className: "dropdown-js-input-wrapper dropdown-js-rounded", style:
|
|
1465
|
+
/* @__PURE__ */ _.jsxs("div", { className: "dropdown-js-input-wrapper dropdown-js-rounded", style: S, children: [
|
|
1455
1466
|
/* @__PURE__ */ _.jsx(
|
|
1456
1467
|
"input",
|
|
1457
1468
|
{
|
|
1458
1469
|
className: "dropdown-js-input dropdown-js-rounded",
|
|
1459
|
-
style:
|
|
1470
|
+
style: S,
|
|
1460
1471
|
type: "text",
|
|
1461
1472
|
id: "searchDropDown",
|
|
1462
1473
|
name: "searchDropDown",
|
|
1463
1474
|
autoComplete: "off",
|
|
1464
1475
|
"aria-label": `Type to Search for ${a}`,
|
|
1465
1476
|
"aria-required": !0,
|
|
1466
|
-
onChange: (
|
|
1467
|
-
disabled:
|
|
1477
|
+
onChange: (j) => W(j),
|
|
1478
|
+
disabled: R,
|
|
1468
1479
|
placeholder: "Type to search",
|
|
1469
|
-
value:
|
|
1480
|
+
value: V
|
|
1470
1481
|
}
|
|
1471
1482
|
),
|
|
1472
|
-
/* @__PURE__ */ _.jsx("div", { className: "dropdown-js-arrow-container dropdown-js-padding dropdown-js-rounded", onClick: (
|
|
1483
|
+
/* @__PURE__ */ _.jsx("div", { className: "dropdown-js-arrow-container dropdown-js-padding dropdown-js-rounded", onClick: (j) => u(), children: /* @__PURE__ */ _.jsx("span", { className: "dropdown-js-arrow dropdown-js-padding", children: k ? "-" : "+" }) })
|
|
1473
1484
|
] }),
|
|
1474
1485
|
/* @__PURE__ */ _.jsx(
|
|
1475
1486
|
"div",
|
|
1476
1487
|
{
|
|
1477
|
-
className: `dropdown-js-padding dropdown-js-menu ${
|
|
1488
|
+
className: `dropdown-js-padding dropdown-js-menu ${!k && "dropdown-js-hide"}`,
|
|
1478
1489
|
id: "dropDown",
|
|
1479
1490
|
name: "dropDown",
|
|
1480
1491
|
"aria-label": a,
|
|
1481
|
-
style: { ...
|
|
1482
|
-
children: O.map((
|
|
1492
|
+
style: { ...S, marginTop: "3.5px" },
|
|
1493
|
+
children: O.map((j, r) => /* @__PURE__ */ _.jsxs(
|
|
1483
1494
|
"div",
|
|
1484
1495
|
{
|
|
1485
|
-
name:
|
|
1486
|
-
"aria-label":
|
|
1496
|
+
name: j[i],
|
|
1497
|
+
"aria-label": j[i],
|
|
1487
1498
|
style: { cursor: "pointer" },
|
|
1488
|
-
onClick: (
|
|
1499
|
+
onClick: (o) => F(j),
|
|
1489
1500
|
children: [
|
|
1490
|
-
|
|
1491
|
-
|
|
1501
|
+
j[i],
|
|
1502
|
+
r < O.length - 1 && /* @__PURE__ */ _.jsx("hr", { style: { borderColor: S.color } })
|
|
1492
1503
|
]
|
|
1493
1504
|
},
|
|
1494
|
-
|
|
1505
|
+
j[s]
|
|
1495
1506
|
))
|
|
1496
1507
|
}
|
|
1497
1508
|
)
|
|
@@ -1500,15 +1511,15 @@ function nr({
|
|
|
1500
1511
|
);
|
|
1501
1512
|
}
|
|
1502
1513
|
nr.propTypes = {
|
|
1503
|
-
collectionName:
|
|
1504
|
-
label:
|
|
1505
|
-
isDisabled:
|
|
1506
|
-
onItemSelected:
|
|
1507
|
-
dropdownStyle:
|
|
1508
|
-
color:
|
|
1509
|
-
backgroundColor:
|
|
1510
|
-
fontSize:
|
|
1511
|
-
borderColor:
|
|
1514
|
+
collectionName: C.string.isRequired,
|
|
1515
|
+
label: C.string.isRequired,
|
|
1516
|
+
isDisabled: C.bool,
|
|
1517
|
+
onItemSelected: C.func,
|
|
1518
|
+
dropdownStyle: C.shape({
|
|
1519
|
+
color: C.string.isRequired,
|
|
1520
|
+
backgroundColor: C.string.isRequired,
|
|
1521
|
+
fontSize: C.string,
|
|
1522
|
+
borderColor: C.string
|
|
1512
1523
|
})
|
|
1513
1524
|
};
|
|
1514
1525
|
function or({
|
|
@@ -1519,71 +1530,71 @@ function or({
|
|
|
1519
1530
|
// the name of the field that will be used for displaying the list items to the user.
|
|
1520
1531
|
valueName: s,
|
|
1521
1532
|
// the name of the field that will be used as the underlying unique value of each list item.
|
|
1522
|
-
isDisabled:
|
|
1533
|
+
isDisabled: g = !1,
|
|
1523
1534
|
onItemsSelected: d = null,
|
|
1524
|
-
dropdownStyle:
|
|
1525
|
-
buttonStyle:
|
|
1535
|
+
dropdownStyle: R,
|
|
1536
|
+
buttonStyle: x
|
|
1526
1537
|
}) {
|
|
1527
|
-
const { collectionExists:
|
|
1528
|
-
const
|
|
1529
|
-
backgroundColor:
|
|
1530
|
-
color:
|
|
1538
|
+
const { collectionExists: $, getCollectionData: f, setSelected: b, getSelected: S, getMaxNumSelections: M } = le(), [k, Y] = Q(!1), [O, L] = Q([]), [V, H] = Q([]), [W, F] = Q(""), [u, I] = Q(Math.random()), [J, j] = Q(Math.random), r = 1e-12, [o] = Q(() => {
|
|
1539
|
+
const w = {
|
|
1540
|
+
backgroundColor: R?.backgroundColor,
|
|
1541
|
+
color: R?.color
|
|
1531
1542
|
};
|
|
1532
|
-
return
|
|
1533
|
-
}), p =
|
|
1543
|
+
return R?.fontSize && (w.fontSize = R?.fontSize), w;
|
|
1544
|
+
}), p = R?.borderColor;
|
|
1534
1545
|
ce(() => {
|
|
1535
|
-
if (
|
|
1546
|
+
if (!$(n))
|
|
1536
1547
|
return;
|
|
1537
1548
|
if (!i)
|
|
1538
1549
|
throw new Error("displayName must be provided");
|
|
1539
1550
|
if (!s)
|
|
1540
1551
|
throw new Error("valueName must be provided");
|
|
1541
|
-
const
|
|
1542
|
-
|
|
1552
|
+
const w = [...f(n)];
|
|
1553
|
+
w.forEach((e, c) => {
|
|
1543
1554
|
if (!e[i])
|
|
1544
1555
|
throw new Error(`Error in collection ${n}, index ${c}:
|
|
1545
1556
|
field ${i} found`);
|
|
1546
1557
|
if (!e[s])
|
|
1547
1558
|
throw new Error(`Error in collection ${n}, index ${c}:
|
|
1548
1559
|
field ${s} not found`);
|
|
1549
|
-
}),
|
|
1550
|
-
const t = [...
|
|
1551
|
-
|
|
1552
|
-
}, [
|
|
1553
|
-
function
|
|
1554
|
-
|
|
1555
|
-
const t = [...
|
|
1556
|
-
const c = e[i].toUpperCase(),
|
|
1557
|
-
return c.includes(
|
|
1560
|
+
}), L(w);
|
|
1561
|
+
const t = [...S(n)];
|
|
1562
|
+
H(t);
|
|
1563
|
+
}, [$(n)]);
|
|
1564
|
+
function l(w) {
|
|
1565
|
+
F(w.target.value);
|
|
1566
|
+
const t = [...f(n).filter((e) => {
|
|
1567
|
+
const c = e[i].toUpperCase(), y = w.target.value.toUpperCase();
|
|
1568
|
+
return c.includes(y);
|
|
1558
1569
|
})];
|
|
1559
|
-
|
|
1570
|
+
L(t), t.length > 0 ? Z() : T(), I(u + r);
|
|
1560
1571
|
}
|
|
1561
|
-
function
|
|
1562
|
-
let t = [...
|
|
1563
|
-
if (
|
|
1564
|
-
t = t.filter((e) => JSON.stringify(e) !== JSON.stringify(
|
|
1572
|
+
function m(w) {
|
|
1573
|
+
let t = [...V];
|
|
1574
|
+
if (P(w))
|
|
1575
|
+
t = t.filter((e) => JSON.stringify(e) !== JSON.stringify(w));
|
|
1565
1576
|
else {
|
|
1566
1577
|
const e = M(n);
|
|
1567
|
-
if (e !== null &&
|
|
1578
|
+
if (e !== null && V.length >= e)
|
|
1568
1579
|
return;
|
|
1569
|
-
t.push(
|
|
1580
|
+
t.push(w);
|
|
1570
1581
|
}
|
|
1571
|
-
|
|
1582
|
+
b(n, t), H(t), j(J + r);
|
|
1572
1583
|
}
|
|
1573
|
-
function
|
|
1574
|
-
return
|
|
1584
|
+
function P(w) {
|
|
1585
|
+
return V.findIndex((t) => JSON.stringify(t) === JSON.stringify(w)) >= 0;
|
|
1575
1586
|
}
|
|
1576
|
-
function
|
|
1577
|
-
const t =
|
|
1578
|
-
|
|
1587
|
+
function N(w) {
|
|
1588
|
+
const t = V.filter((e) => JSON.stringify(e) !== JSON.stringify(w));
|
|
1589
|
+
H(t), b(n, t), j(J + r), d !== null && d();
|
|
1579
1590
|
}
|
|
1580
1591
|
function K() {
|
|
1581
|
-
|
|
1592
|
+
k ? T() : Z();
|
|
1582
1593
|
}
|
|
1583
|
-
function
|
|
1594
|
+
function T() {
|
|
1584
1595
|
Y(!1), d !== null && d();
|
|
1585
1596
|
}
|
|
1586
|
-
function
|
|
1597
|
+
function Z() {
|
|
1587
1598
|
O.length > 0 && Y(!0);
|
|
1588
1599
|
}
|
|
1589
1600
|
return /* @__PURE__ */ _.jsxs(
|
|
@@ -1591,72 +1602,72 @@ function or({
|
|
|
1591
1602
|
{
|
|
1592
1603
|
className: `dropdown-js dropdown-js-rounded
|
|
1593
1604
|
${p && `dropdown-js-border ${p}`}`,
|
|
1594
|
-
style: { ...
|
|
1605
|
+
style: { ...g ? { pointerEvents: "none" } : {} },
|
|
1595
1606
|
children: [
|
|
1596
|
-
/* @__PURE__ */ _.jsxs("div", { className: "dropdown-js-input-wrapper dropdown-js-rounded", style:
|
|
1607
|
+
/* @__PURE__ */ _.jsxs("div", { className: "dropdown-js-input-wrapper dropdown-js-rounded", style: o, children: [
|
|
1597
1608
|
/* @__PURE__ */ _.jsx("div", { children: /* @__PURE__ */ _.jsx(
|
|
1598
1609
|
"input",
|
|
1599
1610
|
{
|
|
1600
1611
|
className: "dropdown-js-input dropdown-js-rounded",
|
|
1601
|
-
style:
|
|
1612
|
+
style: o,
|
|
1602
1613
|
type: "text",
|
|
1603
1614
|
id: "searchDropDown",
|
|
1604
1615
|
name: "searchDropDown",
|
|
1605
1616
|
autoComplete: "off",
|
|
1606
1617
|
"aria-label": `Type to Search for ${a}`,
|
|
1607
1618
|
"aria-required": !0,
|
|
1608
|
-
onChange: (
|
|
1619
|
+
onChange: (w) => l(w),
|
|
1609
1620
|
placeholder: "Type to search",
|
|
1610
|
-
value:
|
|
1621
|
+
value: W
|
|
1611
1622
|
}
|
|
1612
1623
|
) }),
|
|
1613
|
-
/* @__PURE__ */ _.jsx("div", { className: "dropdown-js-arrow-container dropdown-js-padding dropdown-js-rounded", onClick: (
|
|
1624
|
+
/* @__PURE__ */ _.jsx("div", { className: "dropdown-js-arrow-container dropdown-js-padding dropdown-js-rounded", onClick: (w) => K(), children: /* @__PURE__ */ _.jsx("span", { className: "dropdown-js-arrow dropdown-js-padding", children: k ? "-" : "+" }) })
|
|
1614
1625
|
] }),
|
|
1615
|
-
/* @__PURE__ */ _.jsx("div", { className: "dropdown-js-padding dropdown-js-selected-wrapper dropdown-js-selected-container", children: /* @__PURE__ */ _.jsx("div", { className: "dropdown-js-selected-items", children:
|
|
1626
|
+
/* @__PURE__ */ _.jsx("div", { className: "dropdown-js-padding dropdown-js-selected-wrapper dropdown-js-selected-container", children: /* @__PURE__ */ _.jsx("div", { className: "dropdown-js-selected-items", children: V.map((w) => /* @__PURE__ */ _.jsxs(
|
|
1616
1627
|
"span",
|
|
1617
1628
|
{
|
|
1618
1629
|
className: "dropdown-js-padding dropdown-js-rounded",
|
|
1619
|
-
style: { ...
|
|
1630
|
+
style: { ...o, margin: "3.5px", marginRight: "0px" },
|
|
1620
1631
|
children: [
|
|
1621
|
-
|
|
1632
|
+
w[i],
|
|
1622
1633
|
" ",
|
|
1623
|
-
/* @__PURE__ */ _.jsx("span", { className: "dropdown-js-padding", style: { cursor: "pointer" }, onClick: (t) =>
|
|
1634
|
+
/* @__PURE__ */ _.jsx("span", { className: "dropdown-js-padding", style: { cursor: "pointer" }, onClick: (t) => N(w), children: "×" })
|
|
1624
1635
|
]
|
|
1625
1636
|
},
|
|
1626
|
-
`${
|
|
1627
|
-
)) },
|
|
1637
|
+
`${w[s]}${w[i]}`
|
|
1638
|
+
)) }, J) }),
|
|
1628
1639
|
/* @__PURE__ */ _.jsxs(
|
|
1629
1640
|
"div",
|
|
1630
1641
|
{
|
|
1631
|
-
className: `dropdown-js-padding dropdown-js-menu dropdown-js-rounded ${
|
|
1632
|
-
style:
|
|
1642
|
+
className: `dropdown-js-padding dropdown-js-menu dropdown-js-rounded ${!k && "dropdown-js-hide"}`,
|
|
1643
|
+
style: o,
|
|
1633
1644
|
id: "dropDown",
|
|
1634
1645
|
name: "dropDown",
|
|
1635
1646
|
"aria-label": a,
|
|
1636
1647
|
children: [
|
|
1637
|
-
O.map((
|
|
1648
|
+
O.map((w) => /* @__PURE__ */ _.jsxs("div", { "aria-label": w[i], children: [
|
|
1638
1649
|
/* @__PURE__ */ _.jsx(
|
|
1639
1650
|
"input",
|
|
1640
1651
|
{
|
|
1641
1652
|
type: "checkbox",
|
|
1642
|
-
name: `${
|
|
1653
|
+
name: `${w[i]}Checkbox`,
|
|
1643
1654
|
style: { cursor: "pointer" },
|
|
1644
|
-
checked:
|
|
1645
|
-
onChange: (t) =>
|
|
1646
|
-
value:
|
|
1655
|
+
checked: P(w),
|
|
1656
|
+
onChange: (t) => m(w),
|
|
1657
|
+
value: w[s]
|
|
1647
1658
|
}
|
|
1648
1659
|
),
|
|
1649
|
-
/* @__PURE__ */ _.jsx("label", { style: { marginLeft: "5px" }, htmlFor: `${
|
|
1650
|
-
/* @__PURE__ */ _.jsx("hr", { style: { borderColor:
|
|
1651
|
-
] }, `${
|
|
1660
|
+
/* @__PURE__ */ _.jsx("label", { style: { marginLeft: "5px" }, htmlFor: `${w[i]}`, children: w[i] }),
|
|
1661
|
+
/* @__PURE__ */ _.jsx("hr", { style: { borderColor: o.color } })
|
|
1662
|
+
] }, `${w[s]}${w[i]}`)),
|
|
1652
1663
|
/* @__PURE__ */ _.jsx(
|
|
1653
1664
|
"button",
|
|
1654
1665
|
{
|
|
1655
1666
|
className: "dropdown-js-padding dropdown-js-round",
|
|
1656
|
-
style:
|
|
1667
|
+
style: x,
|
|
1657
1668
|
title: "Done",
|
|
1658
1669
|
disabled: O.length === 0,
|
|
1659
|
-
onClick: (
|
|
1670
|
+
onClick: (w) => T(),
|
|
1660
1671
|
type: "button",
|
|
1661
1672
|
children: "Done"
|
|
1662
1673
|
}
|
|
@@ -1670,26 +1681,26 @@ function or({
|
|
|
1670
1681
|
);
|
|
1671
1682
|
}
|
|
1672
1683
|
or.propTypes = {
|
|
1673
|
-
label:
|
|
1674
|
-
collectionName:
|
|
1675
|
-
displayName:
|
|
1676
|
-
valueName:
|
|
1677
|
-
isDisabled:
|
|
1678
|
-
selectedItem:
|
|
1679
|
-
onItemsSelected:
|
|
1680
|
-
dropdownStyle:
|
|
1681
|
-
color:
|
|
1684
|
+
label: C.string.isRequired,
|
|
1685
|
+
collectionName: C.string.isRequired,
|
|
1686
|
+
displayName: C.string.isRequired,
|
|
1687
|
+
valueName: C.string.isRequired,
|
|
1688
|
+
isDisabled: C.bool,
|
|
1689
|
+
selectedItem: C.array,
|
|
1690
|
+
onItemsSelected: C.func,
|
|
1691
|
+
dropdownStyle: C.shape({
|
|
1692
|
+
color: C.string.isRequired,
|
|
1682
1693
|
// text color
|
|
1683
|
-
backgroundColor:
|
|
1684
|
-
fontSize:
|
|
1685
|
-
borderColor:
|
|
1694
|
+
backgroundColor: C.string.isRequired,
|
|
1695
|
+
fontSize: C.string,
|
|
1696
|
+
borderColor: C.string
|
|
1686
1697
|
}),
|
|
1687
|
-
buttonStyle:
|
|
1688
|
-
color:
|
|
1698
|
+
buttonStyle: C.shape({
|
|
1699
|
+
color: C.string.isRequired,
|
|
1689
1700
|
// text color
|
|
1690
|
-
backgroundColor:
|
|
1691
|
-
fontSize:
|
|
1692
|
-
borderColor:
|
|
1701
|
+
backgroundColor: C.string.isRequired,
|
|
1702
|
+
fontSize: C.string,
|
|
1703
|
+
borderColor: C.string
|
|
1693
1704
|
})
|
|
1694
1705
|
};
|
|
1695
1706
|
function sr({
|
|
@@ -1698,163 +1709,163 @@ function sr({
|
|
|
1698
1709
|
collectionName: n,
|
|
1699
1710
|
isDisabled: i = !1,
|
|
1700
1711
|
onItemsSelected: s = null,
|
|
1701
|
-
dropdownStyle:
|
|
1712
|
+
dropdownStyle: g,
|
|
1702
1713
|
// Styling object with fields {color, backgroundColor, borderColor (optional), fontSize}.
|
|
1703
1714
|
buttonStyle: d
|
|
1704
1715
|
// Styling for the DONE button
|
|
1705
1716
|
}) {
|
|
1706
|
-
const { getCollectionData:
|
|
1707
|
-
const
|
|
1708
|
-
backgroundColor:
|
|
1709
|
-
color:
|
|
1717
|
+
const { getCollectionData: R, setSelected: x, getSelected: $, getMaxNumSelections: f, collectionExists: b } = le(), [S, M] = Q(!1), [k, Y] = Q([]), [O, L] = Q([]), [V, H] = Q(""), [W, F] = Q(Math.random()), [u, I] = Q(Math.random()), J = 1e-3, [j] = Q(() => {
|
|
1718
|
+
const T = {
|
|
1719
|
+
backgroundColor: g?.backgroundColor,
|
|
1720
|
+
color: g?.color
|
|
1710
1721
|
};
|
|
1711
|
-
return
|
|
1712
|
-
}),
|
|
1722
|
+
return g?.fontSize && (T.fontSize = g?.fontSize), T;
|
|
1723
|
+
}), r = g?.borderColor;
|
|
1713
1724
|
ce(() => {
|
|
1714
|
-
if (!
|
|
1725
|
+
if (!b(n))
|
|
1715
1726
|
return;
|
|
1716
|
-
Y(
|
|
1717
|
-
const
|
|
1718
|
-
|
|
1719
|
-
}, [
|
|
1720
|
-
function
|
|
1721
|
-
|
|
1722
|
-
let
|
|
1723
|
-
const t =
|
|
1727
|
+
Y(R(n));
|
|
1728
|
+
const T = $(n);
|
|
1729
|
+
L(T);
|
|
1730
|
+
}, [b(n)]);
|
|
1731
|
+
function o(T) {
|
|
1732
|
+
H(T.target.value);
|
|
1733
|
+
let Z = R(n).filter((w) => {
|
|
1734
|
+
const t = w.toUpperCase(), e = T.target.value.toUpperCase();
|
|
1724
1735
|
return t.includes(e);
|
|
1725
1736
|
});
|
|
1726
|
-
Y(
|
|
1737
|
+
Y(Z), Z.length > 0 ? K() : N(), F(W + J);
|
|
1727
1738
|
}
|
|
1728
|
-
function p(
|
|
1729
|
-
let
|
|
1730
|
-
if (
|
|
1731
|
-
|
|
1739
|
+
function p(T) {
|
|
1740
|
+
let Z = [...O];
|
|
1741
|
+
if (l(T))
|
|
1742
|
+
Z = Z.filter((w) => w !== T);
|
|
1732
1743
|
else {
|
|
1733
|
-
const
|
|
1734
|
-
if (
|
|
1744
|
+
const w = f(n);
|
|
1745
|
+
if (w !== null && O.length >= w)
|
|
1735
1746
|
return;
|
|
1736
|
-
|
|
1747
|
+
Z.push(T);
|
|
1737
1748
|
}
|
|
1738
|
-
|
|
1749
|
+
x(n, Z), L(Z), I(u + J);
|
|
1739
1750
|
}
|
|
1740
|
-
function
|
|
1741
|
-
return O.findIndex((
|
|
1751
|
+
function l(T) {
|
|
1752
|
+
return O.findIndex((Z) => Z === T) >= 0;
|
|
1742
1753
|
}
|
|
1743
|
-
function
|
|
1744
|
-
const
|
|
1745
|
-
|
|
1754
|
+
function m(T) {
|
|
1755
|
+
const Z = O.filter((w) => w !== T);
|
|
1756
|
+
L(Z), I(u + J), x(n, Z), s !== null && s();
|
|
1746
1757
|
}
|
|
1747
|
-
function
|
|
1748
|
-
|
|
1758
|
+
function P() {
|
|
1759
|
+
S ? N() : K();
|
|
1749
1760
|
}
|
|
1750
|
-
function
|
|
1761
|
+
function N() {
|
|
1751
1762
|
M(!1), s !== null && s();
|
|
1752
1763
|
}
|
|
1753
1764
|
function K() {
|
|
1754
|
-
|
|
1765
|
+
k.length > 0 && M(!0);
|
|
1755
1766
|
}
|
|
1756
1767
|
return /* @__PURE__ */ _.jsxs(
|
|
1757
1768
|
"div",
|
|
1758
1769
|
{
|
|
1759
1770
|
className: `dropdown-js dropdown-js-rounded
|
|
1760
|
-
${
|
|
1771
|
+
${r && `dropdown-js-border ${r}`}`,
|
|
1761
1772
|
style: { ...i ? { pointerEvents: "none" } : {} },
|
|
1762
1773
|
children: [
|
|
1763
|
-
/* @__PURE__ */ _.jsxs("div", { className: "dropdown-js-input-wrapper dropdown-js-rounded", style:
|
|
1774
|
+
/* @__PURE__ */ _.jsxs("div", { className: "dropdown-js-input-wrapper dropdown-js-rounded", style: j, children: [
|
|
1764
1775
|
/* @__PURE__ */ _.jsx("div", { children: /* @__PURE__ */ _.jsx(
|
|
1765
1776
|
"input",
|
|
1766
1777
|
{
|
|
1767
1778
|
className: "dropdown-js-input dropdown-js-rounded",
|
|
1768
|
-
style:
|
|
1779
|
+
style: j,
|
|
1769
1780
|
type: "text",
|
|
1770
1781
|
id: "searchDropDown",
|
|
1771
1782
|
name: "searchDropDown",
|
|
1772
1783
|
autoComplete: "off",
|
|
1773
1784
|
"aria-label": `Type to search for ${a}`,
|
|
1774
1785
|
"aria-required": !0,
|
|
1775
|
-
onChange: (
|
|
1786
|
+
onChange: (T) => o(T),
|
|
1776
1787
|
placeholder: "Type to search",
|
|
1777
|
-
value:
|
|
1788
|
+
value: V
|
|
1778
1789
|
}
|
|
1779
1790
|
) }),
|
|
1780
|
-
/* @__PURE__ */ _.jsx("div", { className: "dropdown-js-arrow-container dropdown-js-padding dropdown-js-rounded", onClick: (
|
|
1791
|
+
/* @__PURE__ */ _.jsx("div", { className: "dropdown-js-arrow-container dropdown-js-padding dropdown-js-rounded", onClick: (T) => P(), children: /* @__PURE__ */ _.jsx("span", { className: "dropdown-js-arrow dropdown-js-padding", children: S ? "-" : "+" }) })
|
|
1781
1792
|
] }),
|
|
1782
|
-
/* @__PURE__ */ _.jsx("div", { className: "dropdown-js-padding dropdown-js-selected-wrapper dropdown-js-selected-container", children: /* @__PURE__ */ _.jsx("div", { className: "dropdown-js-selected-items", children: O.map((
|
|
1793
|
+
/* @__PURE__ */ _.jsx("div", { className: "dropdown-js-padding dropdown-js-selected-wrapper dropdown-js-selected-container", children: /* @__PURE__ */ _.jsx("div", { className: "dropdown-js-selected-items", children: O.map((T, Z) => /* @__PURE__ */ _.jsxs(
|
|
1783
1794
|
"span",
|
|
1784
1795
|
{
|
|
1785
1796
|
className: "dropdown-js-padding dropdown-js-rounded",
|
|
1786
|
-
style: { ...
|
|
1797
|
+
style: { ...j, margin: "3.5px", marginRight: "0px" },
|
|
1787
1798
|
children: [
|
|
1788
|
-
|
|
1799
|
+
T,
|
|
1789
1800
|
" ",
|
|
1790
|
-
/* @__PURE__ */ _.jsx("span", { style: { cursor: "pointer" }, onClick: (
|
|
1801
|
+
/* @__PURE__ */ _.jsx("span", { style: { cursor: "pointer" }, onClick: (w) => m(T), children: "×" })
|
|
1791
1802
|
]
|
|
1792
1803
|
},
|
|
1793
|
-
`${
|
|
1804
|
+
`${T}`
|
|
1794
1805
|
)) }, u) }),
|
|
1795
1806
|
/* @__PURE__ */ _.jsxs(
|
|
1796
1807
|
"div",
|
|
1797
1808
|
{
|
|
1798
|
-
className: `dropdown-js-padding dropdown-js-menu dropdown-js-rounded ${!
|
|
1799
|
-
style:
|
|
1809
|
+
className: `dropdown-js-padding dropdown-js-menu dropdown-js-rounded ${!S && "dropdown-js-hide"}`,
|
|
1810
|
+
style: j,
|
|
1800
1811
|
id: "dropDown",
|
|
1801
1812
|
name: "dropDown",
|
|
1802
1813
|
"aria-label": a,
|
|
1803
1814
|
children: [
|
|
1804
|
-
|
|
1815
|
+
k.map((T, Z) => /* @__PURE__ */ _.jsxs("div", { "aria-label": T, children: [
|
|
1805
1816
|
/* @__PURE__ */ _.jsx(
|
|
1806
1817
|
"input",
|
|
1807
1818
|
{
|
|
1808
1819
|
type: "checkbox",
|
|
1809
|
-
name: `${
|
|
1820
|
+
name: `${T}Checkbox`,
|
|
1810
1821
|
style: { cursor: "pointer" },
|
|
1811
|
-
checked:
|
|
1812
|
-
onChange: (
|
|
1813
|
-
value:
|
|
1822
|
+
checked: l(T),
|
|
1823
|
+
onChange: (w) => p(T),
|
|
1824
|
+
value: T
|
|
1814
1825
|
}
|
|
1815
1826
|
),
|
|
1816
|
-
/* @__PURE__ */ _.jsx("label", { style: { marginLeft: "5px" }, htmlFor: `${
|
|
1817
|
-
/* @__PURE__ */ _.jsx("hr", { style: { borderColor:
|
|
1818
|
-
] }, `${
|
|
1827
|
+
/* @__PURE__ */ _.jsx("label", { style: { marginLeft: "5px" }, htmlFor: `${T}`, children: T }),
|
|
1828
|
+
/* @__PURE__ */ _.jsx("hr", { style: { borderColor: j.color } })
|
|
1829
|
+
] }, `${Z}#${T}`)),
|
|
1819
1830
|
/* @__PURE__ */ _.jsx(
|
|
1820
1831
|
"button",
|
|
1821
1832
|
{
|
|
1822
1833
|
className: "dropdown-js-padding dropdown-js-round",
|
|
1823
1834
|
style: d,
|
|
1824
1835
|
title: "Done",
|
|
1825
|
-
disabled:
|
|
1826
|
-
onClick: (
|
|
1836
|
+
disabled: k.length === 0,
|
|
1837
|
+
onClick: (T) => N(),
|
|
1827
1838
|
type: "button",
|
|
1828
1839
|
children: "Done"
|
|
1829
1840
|
}
|
|
1830
1841
|
)
|
|
1831
1842
|
]
|
|
1832
1843
|
},
|
|
1833
|
-
|
|
1844
|
+
W
|
|
1834
1845
|
)
|
|
1835
1846
|
]
|
|
1836
1847
|
}
|
|
1837
1848
|
);
|
|
1838
1849
|
}
|
|
1839
1850
|
sr.propTypes = {
|
|
1840
|
-
label:
|
|
1841
|
-
collectionName:
|
|
1842
|
-
isDisabled:
|
|
1843
|
-
selectedItem:
|
|
1844
|
-
onItemsSelected:
|
|
1845
|
-
dropdownStyle:
|
|
1846
|
-
color:
|
|
1851
|
+
label: C.string.isRequired,
|
|
1852
|
+
collectionName: C.string.isRequired,
|
|
1853
|
+
isDisabled: C.bool,
|
|
1854
|
+
selectedItem: C.array,
|
|
1855
|
+
onItemsSelected: C.func,
|
|
1856
|
+
dropdownStyle: C.shape({
|
|
1857
|
+
color: C.string.isRequired,
|
|
1847
1858
|
// text color
|
|
1848
|
-
backgroundColor:
|
|
1849
|
-
fontSize:
|
|
1850
|
-
borderColor:
|
|
1859
|
+
backgroundColor: C.string.isRequired,
|
|
1860
|
+
fontSize: C.string,
|
|
1861
|
+
borderColor: C.string
|
|
1851
1862
|
}),
|
|
1852
|
-
buttonStyle:
|
|
1853
|
-
color:
|
|
1863
|
+
buttonStyle: C.shape({
|
|
1864
|
+
color: C.string.isRequired,
|
|
1854
1865
|
// text color
|
|
1855
|
-
backgroundColor:
|
|
1856
|
-
fontSize:
|
|
1857
|
-
borderColor:
|
|
1866
|
+
backgroundColor: C.string.isRequired,
|
|
1867
|
+
fontSize: C.string,
|
|
1868
|
+
borderColor: C.string
|
|
1858
1869
|
})
|
|
1859
1870
|
};
|
|
1860
1871
|
export {
|