@canonical/maas-react-components 1.16.0 → 1.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as ae, jsx as
|
|
1
|
+
import { jsxs as ae, jsx as u, Fragment as Me } from "react/jsx-runtime";
|
|
2
2
|
import * as Q from "react";
|
|
3
3
|
import pn, { useRef as Ce, useState as be, useEffect as xe, useCallback as X, cloneElement as dn, createContext as mn, useId as rr, useContext as Mr, useMemo as ge, useReducer as vn, forwardRef as yn, useImperativeHandle as gn, Fragment as bn } from "react";
|
|
4
4
|
import { useListener as hn, Link as _n, Tooltip as En, Button as _e, Icon as je, Row as wn, Col as Tn, Input as Lr, CheckboxInput as On, useClickOutside as Cn, useOnEscapePressed as xn } from "@canonical/react-components";
|
|
@@ -31,8 +31,8 @@ var Br = { exports: {} };
|
|
|
31
31
|
t.push(o.toString());
|
|
32
32
|
continue;
|
|
33
33
|
}
|
|
34
|
-
for (var
|
|
35
|
-
r.call(o,
|
|
34
|
+
for (var d in o)
|
|
35
|
+
r.call(o, d) && o[d] && t.push(d);
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
}
|
|
@@ -77,13 +77,13 @@ const me = {
|
|
|
77
77
|
size: o = "regular",
|
|
78
78
|
...s
|
|
79
79
|
}) => {
|
|
80
|
-
const a = Ce(null),
|
|
80
|
+
const a = Ce(null), d = n == null ? void 0 : n.reduce((R, D) => R + D.value, 0), l = t || d, y = n.map((R) => R.value / l * 100), [g, E] = be(0);
|
|
81
81
|
xe(() => {
|
|
82
|
-
E(i === "segmented" ? yr(a,
|
|
83
|
-
}, [
|
|
82
|
+
E(i === "segmented" ? yr(a, l) : 0);
|
|
83
|
+
}, [l, i]);
|
|
84
84
|
const P = X(() => {
|
|
85
|
-
E(yr(a,
|
|
86
|
-
}, [a,
|
|
85
|
+
E(yr(a, l));
|
|
86
|
+
}, [a, l, E]);
|
|
87
87
|
return hn(window, P, "resize", !0, i === "segmented"), /* @__PURE__ */ ae(
|
|
88
88
|
"div",
|
|
89
89
|
{
|
|
@@ -94,12 +94,12 @@ const me = {
|
|
|
94
94
|
"data-testid": he.container,
|
|
95
95
|
ref: a,
|
|
96
96
|
children: [
|
|
97
|
-
/* @__PURE__ */
|
|
97
|
+
/* @__PURE__ */ u(Pn, { children: /* @__PURE__ */ u(
|
|
98
98
|
Rn,
|
|
99
99
|
{
|
|
100
100
|
data: n,
|
|
101
101
|
datumWidths: y,
|
|
102
|
-
maximum:
|
|
102
|
+
maximum: l,
|
|
103
103
|
overColor: Wr,
|
|
104
104
|
segmentWidth: g,
|
|
105
105
|
separatorColor: nr
|
|
@@ -109,7 +109,7 @@ const me = {
|
|
|
109
109
|
]
|
|
110
110
|
}
|
|
111
111
|
);
|
|
112
|
-
}, Pn = ({ children: e }) => /* @__PURE__ */
|
|
112
|
+
}, Pn = ({ children: e }) => /* @__PURE__ */ u(
|
|
113
113
|
"div",
|
|
114
114
|
{
|
|
115
115
|
className: "p-meter__bar",
|
|
@@ -123,13 +123,13 @@ const me = {
|
|
|
123
123
|
maximum: n,
|
|
124
124
|
segmentWidth: t
|
|
125
125
|
}) => {
|
|
126
|
-
const i = () => (e == null ? void 0 : e.reduce((a,
|
|
126
|
+
const i = () => (e == null ? void 0 : e.reduce((a, d) => a + d.value, 0)) > n, o = (a, d) => ({
|
|
127
127
|
backgroundColor: a.color,
|
|
128
128
|
left: `${r == null ? void 0 : r.reduce(
|
|
129
|
-
(
|
|
129
|
+
(l, y, g) => d > g ? l + y : l,
|
|
130
130
|
0
|
|
131
131
|
)}%`,
|
|
132
|
-
width: `${r[
|
|
132
|
+
width: `${r[d]}%`
|
|
133
133
|
}), s = () => ({
|
|
134
134
|
background: `repeating-linear-gradient(
|
|
135
135
|
to right,
|
|
@@ -140,23 +140,23 @@ const me = {
|
|
|
140
140
|
)`
|
|
141
141
|
});
|
|
142
142
|
return /* @__PURE__ */ ae(Me, { children: [
|
|
143
|
-
i() ? /* @__PURE__ */
|
|
143
|
+
i() ? /* @__PURE__ */ u(
|
|
144
144
|
"div",
|
|
145
145
|
{
|
|
146
146
|
className: "p-meter__filled",
|
|
147
147
|
"data-testid": he.meteroverflow,
|
|
148
148
|
style: { backgroundColor: Wr, width: "100%" }
|
|
149
149
|
}
|
|
150
|
-
) : e == null ? void 0 : e.map((a,
|
|
150
|
+
) : e == null ? void 0 : e.map((a, d) => /* @__PURE__ */ u(
|
|
151
151
|
"div",
|
|
152
152
|
{
|
|
153
153
|
className: "p-meter__filled",
|
|
154
154
|
"data-testid": he.filled,
|
|
155
|
-
style: o(a,
|
|
155
|
+
style: o(a, d)
|
|
156
156
|
},
|
|
157
|
-
`meter-${
|
|
157
|
+
`meter-${d}`
|
|
158
158
|
)),
|
|
159
|
-
t > 0 && /* @__PURE__ */
|
|
159
|
+
t > 0 && /* @__PURE__ */ u(
|
|
160
160
|
"div",
|
|
161
161
|
{
|
|
162
162
|
className: "p-meter__separators",
|
|
@@ -168,7 +168,7 @@ const me = {
|
|
|
168
168
|
}, Fn = ({
|
|
169
169
|
className: e,
|
|
170
170
|
children: r
|
|
171
|
-
}) => /* @__PURE__ */
|
|
171
|
+
}) => /* @__PURE__ */ u(
|
|
172
172
|
"div",
|
|
173
173
|
{
|
|
174
174
|
className: z("p-meter__label", e),
|
|
@@ -177,23 +177,23 @@ const me = {
|
|
|
177
177
|
}
|
|
178
178
|
);
|
|
179
179
|
An.Label = Fn;
|
|
180
|
-
const _o = ({ children: e, to: r, ...n }) => /* @__PURE__ */
|
|
180
|
+
const _o = ({ children: e, to: r, ...n }) => /* @__PURE__ */ u(_n, { ...n, href: r, rel: "noreferrer noopener", target: "_blank", children: e }), In = ({ children: e }) => /* @__PURE__ */ u(Me, { children: e }), jn = ({
|
|
181
181
|
isCollapsed: e,
|
|
182
182
|
setIsCollapsed: r,
|
|
183
183
|
className: n
|
|
184
|
-
}) => /* @__PURE__ */
|
|
184
|
+
}) => /* @__PURE__ */ u(
|
|
185
185
|
En,
|
|
186
186
|
{
|
|
187
187
|
className: "p-side-navigation__tooltip-wrapper",
|
|
188
188
|
message: /* @__PURE__ */ ae(Me, { children: [
|
|
189
189
|
e ? "expand" : "collapse",
|
|
190
190
|
"( ",
|
|
191
|
-
/* @__PURE__ */
|
|
191
|
+
/* @__PURE__ */ u("code", { children: "[" }),
|
|
192
192
|
" )"
|
|
193
193
|
] }),
|
|
194
194
|
position: "right",
|
|
195
195
|
tooltipClassName: "p-side-navigation__tooltip",
|
|
196
|
-
children: /* @__PURE__ */
|
|
196
|
+
children: /* @__PURE__ */ u(
|
|
197
197
|
_e,
|
|
198
198
|
{
|
|
199
199
|
appearance: "base",
|
|
@@ -205,25 +205,25 @@ const _o = ({ children: e, to: r, ...n }) => /* @__PURE__ */ l(_n, { ...n, href:
|
|
|
205
205
|
onClick: (t) => {
|
|
206
206
|
r(!e), t.stopPropagation(), t.currentTarget.blur();
|
|
207
207
|
},
|
|
208
|
-
children: /* @__PURE__ */
|
|
208
|
+
children: /* @__PURE__ */ u(je, { light: !0, name: "sidebar-toggle" })
|
|
209
209
|
}
|
|
210
210
|
)
|
|
211
211
|
}
|
|
212
|
-
), kn = ({ children: e }) => /* @__PURE__ */
|
|
212
|
+
), kn = ({ children: e }) => /* @__PURE__ */ u("div", { className: "p-panel__content", children: /* @__PURE__ */ u("nav", { className: "p-side-navigation--icons is-dark", children: e }) }), Nn = ({ children: e }) => /* @__PURE__ */ u("div", { className: "p-panel__controls u-no-margin--top", children: e }), $n = ({ children: e }) => /* @__PURE__ */ u("div", { className: "l-navigation__drawer", children: /* @__PURE__ */ u("div", { className: "p-panel is-dark", children: e }) }), Mn = ({ children: e }) => /* @__PURE__ */ u("div", { className: "p-panel__footer", children: e }), Ln = ({ children: e }) => /* @__PURE__ */ u("div", { className: "p-panel__header", children: e }), zn = ({ light: e = !0, name: r }) => /* @__PURE__ */ u(je, { className: "p-side-navigation__icon", light: e, name: r }), Bn = ({ children: e, className: r, hasActiveChild: n }) => /* @__PURE__ */ u("li", { className: z("p-side-navigation__item", r, { "has-active-child": n }), children: e }), Wn = ({ children: e, id: r, variant: n = "base" }) => /* @__PURE__ */ u("span", { className: z("p-side-navigation__label", { "p-side-navigation__label--group": n === "group" }), id: r, children: e }), Yn = ({
|
|
213
213
|
as: e,
|
|
214
214
|
...r
|
|
215
|
-
}) => /* @__PURE__ */
|
|
215
|
+
}) => /* @__PURE__ */ u(
|
|
216
216
|
e || "a",
|
|
217
217
|
{
|
|
218
218
|
className: z("p-side-navigation__link", r.className),
|
|
219
219
|
...r
|
|
220
220
|
}
|
|
221
|
-
), qn = ({ children: e, className: r }) => /* @__PURE__ */
|
|
221
|
+
), qn = ({ children: e, className: r }) => /* @__PURE__ */ u("ul", { className: z("p-side-navigation__list", r), children: e }), Hn = ({
|
|
222
222
|
as: e,
|
|
223
223
|
children: r,
|
|
224
224
|
className: n,
|
|
225
225
|
...t
|
|
226
|
-
}) => /* @__PURE__ */
|
|
226
|
+
}) => /* @__PURE__ */ u(e || "a", { className: z("p-panel__logo", n), ...t, children: /* @__PURE__ */ u("div", { className: "p-navigation__tagged-logo", children: r }) }), Kn = ({ children: e }) => dn(e, { className: "p-panel__logo-icon p-navigation__logo-icon" }), Un = ({ children: e, variant: r = "base" }) => /* @__PURE__ */ u(
|
|
227
227
|
"div",
|
|
228
228
|
{
|
|
229
229
|
className: z("p-panel__logo-name is-fading-when-collapsed", {
|
|
@@ -231,11 +231,11 @@ const _o = ({ children: e, to: r, ...n }) => /* @__PURE__ */ l(_n, { ...n, href:
|
|
|
231
231
|
}),
|
|
232
232
|
children: e
|
|
233
233
|
}
|
|
234
|
-
), Gn = ({ children: e }) => /* @__PURE__ */
|
|
234
|
+
), Gn = ({ children: e }) => /* @__PURE__ */ u("div", { className: "p-navigation__logo-tag", children: e }), Vn = ({ children: e }) => /* @__PURE__ */ u("span", { className: "p-panel__logo-text", children: e }), Jn = ({
|
|
235
235
|
children: e,
|
|
236
236
|
className: r,
|
|
237
237
|
onClick: n
|
|
238
|
-
}) => /* @__PURE__ */
|
|
238
|
+
}) => /* @__PURE__ */ u(
|
|
239
239
|
_e,
|
|
240
240
|
{
|
|
241
241
|
appearance: "base",
|
|
@@ -248,8 +248,8 @@ const _o = ({ children: e, to: r, ...n }) => /* @__PURE__ */ l(_n, { ...n, href:
|
|
|
248
248
|
},
|
|
249
249
|
children: e
|
|
250
250
|
}
|
|
251
|
-
), Xn = ({ children: e }) => /* @__PURE__ */
|
|
252
|
-
const Y = ({ children: e, className: r, isCollapsed: n }) => /* @__PURE__ */
|
|
251
|
+
), Xn = ({ children: e }) => /* @__PURE__ */ u("span", { className: "p-side-navigation__text", children: e });
|
|
252
|
+
const Y = ({ children: e, className: r, isCollapsed: n }) => /* @__PURE__ */ u("header", { "aria-label": "main navigation", className: z("l-navigation is-maas", r, { "is-collapsed": n, "is-pinned": !n }), children: e }), Zn = ({ children: e, className: r }) => /* @__PURE__ */ u("header", { "aria-label": "navigation", className: "l-navigation-bar", children: /* @__PURE__ */ u("div", { className: z("p-panel is-dark", r), children: e }) });
|
|
253
253
|
Y.Header = Ln;
|
|
254
254
|
Y.Banner = In;
|
|
255
255
|
Y.Drawer = $n;
|
|
@@ -271,7 +271,7 @@ Y.LogoText = Vn;
|
|
|
271
271
|
Zn.MenuButton = Jn;
|
|
272
272
|
const lr = mn(null), Yr = ({ children: e }) => {
|
|
273
273
|
const r = rr();
|
|
274
|
-
return /* @__PURE__ */
|
|
274
|
+
return /* @__PURE__ */ u(lr.Provider, { value: r, children: /* @__PURE__ */ u(
|
|
275
275
|
"div",
|
|
276
276
|
{
|
|
277
277
|
role: "group",
|
|
@@ -283,14 +283,14 @@ const lr = mn(null), Yr = ({ children: e }) => {
|
|
|
283
283
|
) });
|
|
284
284
|
}, Qn = ({ children: e }) => {
|
|
285
285
|
const r = Mr(lr);
|
|
286
|
-
return /* @__PURE__ */
|
|
286
|
+
return /* @__PURE__ */ u("label", { id: `${r}_label`, children: e });
|
|
287
287
|
}, et = ({ children: e }) => {
|
|
288
288
|
const r = Mr(lr);
|
|
289
|
-
return /* @__PURE__ */
|
|
289
|
+
return /* @__PURE__ */ u("p", { className: "p-form-help-text", id: `${r}_description`, children: e });
|
|
290
290
|
};
|
|
291
291
|
Yr.Label = Qn;
|
|
292
292
|
Yr.Description = et;
|
|
293
|
-
const ur = ({ children: e }) => /* @__PURE__ */
|
|
293
|
+
const ur = ({ children: e }) => /* @__PURE__ */ u("div", { className: "p-form-section", children: e }), rt = ({ children: e }) => /* @__PURE__ */ u("h5", { className: "p-form-section__title u-no-padding--top", children: e }), nt = ({ children: e }) => /* @__PURE__ */ u("p", { className: "p-form-help-text", children: e }), tt = ({ children: e }) => /* @__PURE__ */ u("div", { className: "p-form-section__content", children: e });
|
|
294
294
|
ur.Title = rt;
|
|
295
295
|
ur.Description = nt;
|
|
296
296
|
ur.Content = tt;
|
|
@@ -313,14 +313,14 @@ function ot(e) {
|
|
|
313
313
|
const qr = Q.createContext(null), Hr = Q.createContext([!1, () => {
|
|
314
314
|
}]), Kr = ({ children: e }) => {
|
|
315
315
|
const r = Q.useRef(null), n = ot(r), [t, i] = Q.useState(!1);
|
|
316
|
-
return /* @__PURE__ */
|
|
316
|
+
return /* @__PURE__ */ u(
|
|
317
317
|
"header",
|
|
318
318
|
{
|
|
319
319
|
className: z("main-toolbar", {
|
|
320
320
|
"main-toolbar--stacked": t
|
|
321
321
|
}),
|
|
322
322
|
ref: r,
|
|
323
|
-
children: /* @__PURE__ */
|
|
323
|
+
children: /* @__PURE__ */ u(qr.Provider, { value: n, children: /* @__PURE__ */ u(Hr.Provider, { value: [t, i], children: e }) })
|
|
324
324
|
}
|
|
325
325
|
);
|
|
326
326
|
}, it = ({
|
|
@@ -328,7 +328,7 @@ const qr = Q.createContext(null), Hr = Q.createContext([!1, () => {
|
|
|
328
328
|
children: r,
|
|
329
329
|
className: n,
|
|
330
330
|
...t
|
|
331
|
-
}) => /* @__PURE__ */
|
|
331
|
+
}) => /* @__PURE__ */ u(
|
|
332
332
|
e || "h1",
|
|
333
333
|
{
|
|
334
334
|
className: z("main-toolbar__title p-heading--4", n),
|
|
@@ -341,7 +341,7 @@ const qr = Q.createContext(null), Hr = Q.createContext([!1, () => {
|
|
|
341
341
|
return Q.useEffect(() => {
|
|
342
342
|
!i.current || !r || t(i.current.getBoundingClientRect().width > r.width);
|
|
343
343
|
}, [t, r, i]), /* @__PURE__ */ ae(Me, { children: [
|
|
344
|
-
/* @__PURE__ */
|
|
344
|
+
/* @__PURE__ */ u(
|
|
345
345
|
"div",
|
|
346
346
|
{
|
|
347
347
|
"aria-hidden": "true",
|
|
@@ -351,7 +351,7 @@ const qr = Q.createContext(null), Hr = Q.createContext([!1, () => {
|
|
|
351
351
|
children: e
|
|
352
352
|
}
|
|
353
353
|
),
|
|
354
|
-
/* @__PURE__ */
|
|
354
|
+
/* @__PURE__ */ u(
|
|
355
355
|
"div",
|
|
356
356
|
{
|
|
357
357
|
className: z("main-toolbar__controls", {
|
|
@@ -372,15 +372,15 @@ const Le = ({
|
|
|
372
372
|
...i
|
|
373
373
|
}) => {
|
|
374
374
|
const o = n || "section", s = z("content-section", r);
|
|
375
|
-
return /* @__PURE__ */
|
|
376
|
-
}, st = ({ children: e, className: r, as: n, ...t }) => /* @__PURE__ */
|
|
375
|
+
return /* @__PURE__ */ u(o, { ...i, className: s, children: /* @__PURE__ */ u(wn, { children: /* @__PURE__ */ u(Tn, { size: t === "narrow" ? 6 : 12, children: e }) }) });
|
|
376
|
+
}, st = ({ children: e, className: r, as: n, ...t }) => /* @__PURE__ */ u(
|
|
377
377
|
n || "h1",
|
|
378
378
|
{
|
|
379
379
|
...t,
|
|
380
380
|
className: z("content-section__title p-heading--4", r),
|
|
381
381
|
children: e
|
|
382
382
|
}
|
|
383
|
-
), ct = ({ children: e, className: r }) => /* @__PURE__ */
|
|
383
|
+
), ct = ({ children: e, className: r }) => /* @__PURE__ */ u("header", { className: z("content-section__header", r), children: e }), lt = ({ children: e, className: r }) => /* @__PURE__ */ u("div", { className: z("content-section__body", r), children: e }), ut = ({ children: e, className: r }) => /* @__PURE__ */ u("footer", { className: z("content-section__footer", r), children: e });
|
|
384
384
|
Le.Title = st;
|
|
385
385
|
Le.Header = ct;
|
|
386
386
|
Le.Content = lt;
|
|
@@ -389,7 +389,7 @@ const Ur = ({
|
|
|
389
389
|
children: e,
|
|
390
390
|
className: r,
|
|
391
391
|
isVisible: n
|
|
392
|
-
}) => /* @__PURE__ */
|
|
392
|
+
}) => /* @__PURE__ */ u(
|
|
393
393
|
"div",
|
|
394
394
|
{
|
|
395
395
|
className: z("fade-in--down", r),
|
|
@@ -400,7 +400,7 @@ const Ur = ({
|
|
|
400
400
|
), Eo = ({
|
|
401
401
|
children: e,
|
|
402
402
|
...r
|
|
403
|
-
}) => /* @__PURE__ */
|
|
403
|
+
}) => /* @__PURE__ */ u(Ur, { isVisible: !r["aria-hidden"], children: /* @__PURE__ */ u("div", { className: "p-form__nested-group", ...r, children: e }) });
|
|
404
404
|
const ft = ({
|
|
405
405
|
currentPage: e,
|
|
406
406
|
error: r,
|
|
@@ -410,8 +410,8 @@ const ft = ({
|
|
|
410
410
|
onNextClick: o,
|
|
411
411
|
onPreviousClick: s,
|
|
412
412
|
totalPages: a
|
|
413
|
-
}) => /* @__PURE__ */
|
|
414
|
-
/* @__PURE__ */
|
|
413
|
+
}) => /* @__PURE__ */ u("nav", { "aria-label": "pagination", className: "p-pagination", children: /* @__PURE__ */ ae("span", { className: "p-pagination--items", children: [
|
|
414
|
+
/* @__PURE__ */ u(
|
|
415
415
|
_e,
|
|
416
416
|
{
|
|
417
417
|
"aria-label": "Previous page",
|
|
@@ -419,12 +419,12 @@ const ft = ({
|
|
|
419
419
|
disabled: e === 1 || n,
|
|
420
420
|
onClick: s,
|
|
421
421
|
type: "button",
|
|
422
|
-
children: /* @__PURE__ */
|
|
422
|
+
children: /* @__PURE__ */ u(je, { name: "chevron-down" })
|
|
423
423
|
}
|
|
424
424
|
),
|
|
425
|
-
/* @__PURE__ */
|
|
425
|
+
/* @__PURE__ */ u("strong", { children: "Page " }),
|
|
426
426
|
" ",
|
|
427
|
-
/* @__PURE__ */
|
|
427
|
+
/* @__PURE__ */ u(
|
|
428
428
|
Lr,
|
|
429
429
|
{
|
|
430
430
|
"aria-label": "page number",
|
|
@@ -444,7 +444,7 @@ const ft = ({
|
|
|
444
444
|
" of ",
|
|
445
445
|
a
|
|
446
446
|
] }),
|
|
447
|
-
/* @__PURE__ */
|
|
447
|
+
/* @__PURE__ */ u(
|
|
448
448
|
_e,
|
|
449
449
|
{
|
|
450
450
|
"aria-label": "Next page",
|
|
@@ -452,7 +452,7 @@ const ft = ({
|
|
|
452
452
|
disabled: e === a || n,
|
|
453
453
|
onClick: o,
|
|
454
454
|
type: "button",
|
|
455
|
-
children: /* @__PURE__ */
|
|
455
|
+
children: /* @__PURE__ */ u(je, { name: "chevron-up" })
|
|
456
456
|
}
|
|
457
457
|
)
|
|
458
458
|
] }) }), wo = ({
|
|
@@ -462,7 +462,7 @@ const ft = ({
|
|
|
462
462
|
totalPages: t
|
|
463
463
|
}) => {
|
|
464
464
|
const [i, o] = be(e), [s, a] = be("");
|
|
465
|
-
return /* @__PURE__ */
|
|
465
|
+
return /* @__PURE__ */ u(
|
|
466
466
|
ft,
|
|
467
467
|
{
|
|
468
468
|
currentPage: i,
|
|
@@ -485,9 +485,9 @@ const ft = ({
|
|
|
485
485
|
}
|
|
486
486
|
);
|
|
487
487
|
};
|
|
488
|
-
const To = ({ activeStep: e, items: r }) => /* @__PURE__ */
|
|
488
|
+
const To = ({ activeStep: e, items: r }) => /* @__PURE__ */ u("ol", { className: "stepper", children: r.map((n, t) => {
|
|
489
489
|
const i = t === e, o = t < e;
|
|
490
|
-
return /* @__PURE__ */
|
|
490
|
+
return /* @__PURE__ */ u("li", { "aria-label": n, className: "stepper__item", children: /* @__PURE__ */ u(
|
|
491
491
|
"p",
|
|
492
492
|
{
|
|
493
493
|
"aria-label": o ? `${n} (completed)` : n,
|
|
@@ -513,15 +513,15 @@ function pt() {
|
|
|
513
513
|
if (gr)
|
|
514
514
|
return F;
|
|
515
515
|
gr = 1;
|
|
516
|
-
var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, t = e ? Symbol.for("react.fragment") : 60107, i = e ? Symbol.for("react.strict_mode") : 60108, o = e ? Symbol.for("react.profiler") : 60114, s = e ? Symbol.for("react.provider") : 60109, a = e ? Symbol.for("react.context") : 60110,
|
|
516
|
+
var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, t = e ? Symbol.for("react.fragment") : 60107, i = e ? Symbol.for("react.strict_mode") : 60108, o = e ? Symbol.for("react.profiler") : 60114, s = e ? Symbol.for("react.provider") : 60109, a = e ? Symbol.for("react.context") : 60110, d = e ? Symbol.for("react.async_mode") : 60111, l = e ? Symbol.for("react.concurrent_mode") : 60111, y = e ? Symbol.for("react.forward_ref") : 60112, g = e ? Symbol.for("react.suspense") : 60113, E = e ? Symbol.for("react.suspense_list") : 60120, P = e ? Symbol.for("react.memo") : 60115, R = e ? Symbol.for("react.lazy") : 60116, D = e ? Symbol.for("react.block") : 60121, k = e ? Symbol.for("react.fundamental") : 60117, q = e ? Symbol.for("react.responder") : 60118, re = e ? Symbol.for("react.scope") : 60119;
|
|
517
517
|
function N(f) {
|
|
518
518
|
if (typeof f == "object" && f !== null) {
|
|
519
519
|
var G = f.$$typeof;
|
|
520
520
|
switch (G) {
|
|
521
521
|
case r:
|
|
522
522
|
switch (f = f.type, f) {
|
|
523
|
-
case
|
|
524
|
-
case
|
|
523
|
+
case d:
|
|
524
|
+
case l:
|
|
525
525
|
case t:
|
|
526
526
|
case o:
|
|
527
527
|
case i:
|
|
@@ -545,10 +545,10 @@ function pt() {
|
|
|
545
545
|
}
|
|
546
546
|
}
|
|
547
547
|
function $(f) {
|
|
548
|
-
return N(f) ===
|
|
548
|
+
return N(f) === l;
|
|
549
549
|
}
|
|
550
|
-
return F.AsyncMode =
|
|
551
|
-
return $(f) || N(f) ===
|
|
550
|
+
return F.AsyncMode = d, F.ConcurrentMode = l, F.ContextConsumer = a, F.ContextProvider = s, F.Element = r, F.ForwardRef = y, F.Fragment = t, F.Lazy = R, F.Memo = P, F.Portal = n, F.Profiler = o, F.StrictMode = i, F.Suspense = g, F.isAsyncMode = function(f) {
|
|
551
|
+
return $(f) || N(f) === d;
|
|
552
552
|
}, F.isConcurrentMode = $, F.isContextConsumer = function(f) {
|
|
553
553
|
return N(f) === a;
|
|
554
554
|
}, F.isContextProvider = function(f) {
|
|
@@ -572,7 +572,7 @@ function pt() {
|
|
|
572
572
|
}, F.isSuspense = function(f) {
|
|
573
573
|
return N(f) === g;
|
|
574
574
|
}, F.isValidElementType = function(f) {
|
|
575
|
-
return typeof f == "string" || typeof f == "function" || f === t || f ===
|
|
575
|
+
return typeof f == "string" || typeof f == "function" || f === t || f === l || f === o || f === i || f === g || f === E || typeof f == "object" && f !== null && (f.$$typeof === R || f.$$typeof === P || f.$$typeof === s || f.$$typeof === a || f.$$typeof === y || f.$$typeof === k || f.$$typeof === q || f.$$typeof === re || f.$$typeof === D);
|
|
576
576
|
}, F.typeOf = N, F;
|
|
577
577
|
}
|
|
578
578
|
var I = {};
|
|
@@ -587,10 +587,10 @@ var I = {};
|
|
|
587
587
|
var br;
|
|
588
588
|
function dt() {
|
|
589
589
|
return br || (br = 1, process.env.NODE_ENV !== "production" && function() {
|
|
590
|
-
var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, t = e ? Symbol.for("react.fragment") : 60107, i = e ? Symbol.for("react.strict_mode") : 60108, o = e ? Symbol.for("react.profiler") : 60114, s = e ? Symbol.for("react.provider") : 60109, a = e ? Symbol.for("react.context") : 60110,
|
|
590
|
+
var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, t = e ? Symbol.for("react.fragment") : 60107, i = e ? Symbol.for("react.strict_mode") : 60108, o = e ? Symbol.for("react.profiler") : 60114, s = e ? Symbol.for("react.provider") : 60109, a = e ? Symbol.for("react.context") : 60110, d = e ? Symbol.for("react.async_mode") : 60111, l = e ? Symbol.for("react.concurrent_mode") : 60111, y = e ? Symbol.for("react.forward_ref") : 60112, g = e ? Symbol.for("react.suspense") : 60113, E = e ? Symbol.for("react.suspense_list") : 60120, P = e ? Symbol.for("react.memo") : 60115, R = e ? Symbol.for("react.lazy") : 60116, D = e ? Symbol.for("react.block") : 60121, k = e ? Symbol.for("react.fundamental") : 60117, q = e ? Symbol.for("react.responder") : 60118, re = e ? Symbol.for("react.scope") : 60119;
|
|
591
591
|
function N(p) {
|
|
592
592
|
return typeof p == "string" || typeof p == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
593
|
-
p === t || p ===
|
|
593
|
+
p === t || p === l || p === o || p === i || p === g || p === E || typeof p == "object" && p !== null && (p.$$typeof === R || p.$$typeof === P || p.$$typeof === s || p.$$typeof === a || p.$$typeof === y || p.$$typeof === k || p.$$typeof === q || p.$$typeof === re || p.$$typeof === D);
|
|
594
594
|
}
|
|
595
595
|
function $(p) {
|
|
596
596
|
if (typeof p == "object" && p !== null) {
|
|
@@ -599,8 +599,8 @@ function dt() {
|
|
|
599
599
|
case r:
|
|
600
600
|
var pe = p.type;
|
|
601
601
|
switch (pe) {
|
|
602
|
-
case
|
|
603
|
-
case
|
|
602
|
+
case d:
|
|
603
|
+
case l:
|
|
604
604
|
case t:
|
|
605
605
|
case o:
|
|
606
606
|
case i:
|
|
@@ -624,12 +624,12 @@ function dt() {
|
|
|
624
624
|
}
|
|
625
625
|
}
|
|
626
626
|
}
|
|
627
|
-
var f =
|
|
627
|
+
var f = d, G = l, ee = a, le = s, oe = r, ie = y, ue = t, fe = R, se = P, L = n, U = o, Z = i, ne = g, ce = !1;
|
|
628
628
|
function H(p) {
|
|
629
|
-
return ce || (ce = !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.")), c(p) || $(p) ===
|
|
629
|
+
return ce || (ce = !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.")), c(p) || $(p) === d;
|
|
630
630
|
}
|
|
631
631
|
function c(p) {
|
|
632
|
-
return $(p) ===
|
|
632
|
+
return $(p) === l;
|
|
633
633
|
}
|
|
634
634
|
function v(p) {
|
|
635
635
|
return $(p) === a;
|
|
@@ -696,31 +696,31 @@ function mt() {
|
|
|
696
696
|
return !1;
|
|
697
697
|
for (var s = {}, a = 0; a < 10; a++)
|
|
698
698
|
s["_" + String.fromCharCode(a)] = a;
|
|
699
|
-
var
|
|
699
|
+
var d = Object.getOwnPropertyNames(s).map(function(y) {
|
|
700
700
|
return s[y];
|
|
701
701
|
});
|
|
702
|
-
if (
|
|
702
|
+
if (d.join("") !== "0123456789")
|
|
703
703
|
return !1;
|
|
704
|
-
var
|
|
704
|
+
var l = {};
|
|
705
705
|
return "abcdefghijklmnopqrst".split("").forEach(function(y) {
|
|
706
|
-
|
|
707
|
-
}), Object.keys(Object.assign({},
|
|
706
|
+
l[y] = y;
|
|
707
|
+
}), Object.keys(Object.assign({}, l)).join("") === "abcdefghijklmnopqrst";
|
|
708
708
|
} catch {
|
|
709
709
|
return !1;
|
|
710
710
|
}
|
|
711
711
|
}
|
|
712
712
|
return Ge = i() ? Object.assign : function(o, s) {
|
|
713
|
-
for (var a,
|
|
713
|
+
for (var a, d = t(o), l, y = 1; y < arguments.length; y++) {
|
|
714
714
|
a = Object(arguments[y]);
|
|
715
715
|
for (var g in a)
|
|
716
|
-
r.call(a, g) && (
|
|
716
|
+
r.call(a, g) && (d[g] = a[g]);
|
|
717
717
|
if (e) {
|
|
718
|
-
|
|
719
|
-
for (var E = 0; E <
|
|
720
|
-
n.call(a,
|
|
718
|
+
l = e(a);
|
|
719
|
+
for (var E = 0; E < l.length; E++)
|
|
720
|
+
n.call(a, l[E]) && (d[l[E]] = a[l[E]]);
|
|
721
721
|
}
|
|
722
722
|
}
|
|
723
|
-
return
|
|
723
|
+
return d;
|
|
724
724
|
}, Ge;
|
|
725
725
|
}
|
|
726
726
|
var Ve, Er;
|
|
@@ -753,7 +753,7 @@ function vt() {
|
|
|
753
753
|
}
|
|
754
754
|
};
|
|
755
755
|
}
|
|
756
|
-
function i(o, s, a,
|
|
756
|
+
function i(o, s, a, d, l) {
|
|
757
757
|
if (process.env.NODE_ENV !== "production") {
|
|
758
758
|
for (var y in o)
|
|
759
759
|
if (t(o, y)) {
|
|
@@ -761,19 +761,19 @@ function vt() {
|
|
|
761
761
|
try {
|
|
762
762
|
if (typeof o[y] != "function") {
|
|
763
763
|
var E = Error(
|
|
764
|
-
(
|
|
764
|
+
(d || "React class") + ": " + a + " type `" + y + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof o[y] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
765
765
|
);
|
|
766
766
|
throw E.name = "Invariant Violation", E;
|
|
767
767
|
}
|
|
768
|
-
g = o[y](s, y,
|
|
768
|
+
g = o[y](s, y, d, a, null, r);
|
|
769
769
|
} catch (R) {
|
|
770
770
|
g = R;
|
|
771
771
|
}
|
|
772
772
|
if (g && !(g instanceof Error) && e(
|
|
773
|
-
(
|
|
773
|
+
(d || "React class") + ": type specification of " + a + " `" + y + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof g + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
774
774
|
), g instanceof Error && !(g.message in n)) {
|
|
775
775
|
n[g.message] = !0;
|
|
776
|
-
var P =
|
|
776
|
+
var P = l ? l() : "";
|
|
777
777
|
e(
|
|
778
778
|
"Failed " + a + " type: " + g.message + (P ?? "")
|
|
779
779
|
);
|
|
@@ -793,20 +793,20 @@ function yt() {
|
|
|
793
793
|
var e = Gr(), r = mt(), n = fr(), t = Vr(), i = vt(), o = function() {
|
|
794
794
|
};
|
|
795
795
|
process.env.NODE_ENV !== "production" && (o = function(a) {
|
|
796
|
-
var
|
|
797
|
-
typeof console < "u" && console.error(
|
|
796
|
+
var d = "Warning: " + a;
|
|
797
|
+
typeof console < "u" && console.error(d);
|
|
798
798
|
try {
|
|
799
|
-
throw new Error(
|
|
799
|
+
throw new Error(d);
|
|
800
800
|
} catch {
|
|
801
801
|
}
|
|
802
802
|
});
|
|
803
803
|
function s() {
|
|
804
804
|
return null;
|
|
805
805
|
}
|
|
806
|
-
return Ze = function(a,
|
|
807
|
-
var
|
|
806
|
+
return Ze = function(a, d) {
|
|
807
|
+
var l = typeof Symbol == "function" && Symbol.iterator, y = "@@iterator";
|
|
808
808
|
function g(c) {
|
|
809
|
-
var v = c && (
|
|
809
|
+
var v = c && (l && c[l] || c[y]);
|
|
810
810
|
if (typeof v == "function")
|
|
811
811
|
return v;
|
|
812
812
|
}
|
|
@@ -843,7 +843,7 @@ function yt() {
|
|
|
843
843
|
var v = {}, w = 0;
|
|
844
844
|
function T(x, _, O, S, A, C, W) {
|
|
845
845
|
if (S = S || E, C = C || O, W !== n) {
|
|
846
|
-
if (
|
|
846
|
+
if (d) {
|
|
847
847
|
var p = new Error(
|
|
848
848
|
"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"
|
|
849
849
|
);
|
|
@@ -1118,7 +1118,7 @@ function gt() {
|
|
|
1118
1118
|
function n() {
|
|
1119
1119
|
}
|
|
1120
1120
|
return n.resetWarningCache = r, Qe = function() {
|
|
1121
|
-
function t(s, a,
|
|
1121
|
+
function t(s, a, d, l, y, g) {
|
|
1122
1122
|
if (g !== e) {
|
|
1123
1123
|
var E = new Error(
|
|
1124
1124
|
"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"
|
|
@@ -1172,22 +1172,22 @@ function Ee(e, r, n, t) {
|
|
|
1172
1172
|
return new (n || (n = Promise))(function(o, s) {
|
|
1173
1173
|
function a(y) {
|
|
1174
1174
|
try {
|
|
1175
|
-
|
|
1175
|
+
l(t.next(y));
|
|
1176
1176
|
} catch (g) {
|
|
1177
1177
|
s(g);
|
|
1178
1178
|
}
|
|
1179
1179
|
}
|
|
1180
|
-
function
|
|
1180
|
+
function d(y) {
|
|
1181
1181
|
try {
|
|
1182
|
-
|
|
1182
|
+
l(t.throw(y));
|
|
1183
1183
|
} catch (g) {
|
|
1184
1184
|
s(g);
|
|
1185
1185
|
}
|
|
1186
1186
|
}
|
|
1187
|
-
function
|
|
1188
|
-
y.done ? o(y.value) : i(y.value).then(a,
|
|
1187
|
+
function l(y) {
|
|
1188
|
+
y.done ? o(y.value) : i(y.value).then(a, d);
|
|
1189
1189
|
}
|
|
1190
|
-
|
|
1190
|
+
l((t = t.apply(e, r || [])).next());
|
|
1191
1191
|
});
|
|
1192
1192
|
}
|
|
1193
1193
|
function we(e, r) {
|
|
@@ -1199,60 +1199,60 @@ function we(e, r) {
|
|
|
1199
1199
|
return s = { next: a(0), throw: a(1), return: a(2) }, typeof Symbol == "function" && (s[Symbol.iterator] = function() {
|
|
1200
1200
|
return this;
|
|
1201
1201
|
}), s;
|
|
1202
|
-
function a(
|
|
1202
|
+
function a(l) {
|
|
1203
1203
|
return function(y) {
|
|
1204
|
-
return
|
|
1204
|
+
return d([l, y]);
|
|
1205
1205
|
};
|
|
1206
1206
|
}
|
|
1207
|
-
function
|
|
1207
|
+
function d(l) {
|
|
1208
1208
|
if (t)
|
|
1209
1209
|
throw new TypeError("Generator is already executing.");
|
|
1210
|
-
for (; s && (s = 0,
|
|
1210
|
+
for (; s && (s = 0, l[0] && (n = 0)), n; )
|
|
1211
1211
|
try {
|
|
1212
|
-
if (t = 1, i && (o =
|
|
1212
|
+
if (t = 1, i && (o = l[0] & 2 ? i.return : l[0] ? i.throw || ((o = i.return) && o.call(i), 0) : i.next) && !(o = o.call(i, l[1])).done)
|
|
1213
1213
|
return o;
|
|
1214
|
-
switch (i = 0, o && (
|
|
1214
|
+
switch (i = 0, o && (l = [l[0] & 2, o.value]), l[0]) {
|
|
1215
1215
|
case 0:
|
|
1216
1216
|
case 1:
|
|
1217
|
-
o =
|
|
1217
|
+
o = l;
|
|
1218
1218
|
break;
|
|
1219
1219
|
case 4:
|
|
1220
|
-
return n.label++, { value:
|
|
1220
|
+
return n.label++, { value: l[1], done: !1 };
|
|
1221
1221
|
case 5:
|
|
1222
|
-
n.label++, i =
|
|
1222
|
+
n.label++, i = l[1], l = [0];
|
|
1223
1223
|
continue;
|
|
1224
1224
|
case 7:
|
|
1225
|
-
|
|
1225
|
+
l = n.ops.pop(), n.trys.pop();
|
|
1226
1226
|
continue;
|
|
1227
1227
|
default:
|
|
1228
|
-
if (o = n.trys, !(o = o.length > 0 && o[o.length - 1]) && (
|
|
1228
|
+
if (o = n.trys, !(o = o.length > 0 && o[o.length - 1]) && (l[0] === 6 || l[0] === 2)) {
|
|
1229
1229
|
n = 0;
|
|
1230
1230
|
continue;
|
|
1231
1231
|
}
|
|
1232
|
-
if (
|
|
1233
|
-
n.label =
|
|
1232
|
+
if (l[0] === 3 && (!o || l[1] > o[0] && l[1] < o[3])) {
|
|
1233
|
+
n.label = l[1];
|
|
1234
1234
|
break;
|
|
1235
1235
|
}
|
|
1236
|
-
if (
|
|
1237
|
-
n.label = o[1], o =
|
|
1236
|
+
if (l[0] === 6 && n.label < o[1]) {
|
|
1237
|
+
n.label = o[1], o = l;
|
|
1238
1238
|
break;
|
|
1239
1239
|
}
|
|
1240
1240
|
if (o && n.label < o[2]) {
|
|
1241
|
-
n.label = o[2], n.ops.push(
|
|
1241
|
+
n.label = o[2], n.ops.push(l);
|
|
1242
1242
|
break;
|
|
1243
1243
|
}
|
|
1244
1244
|
o[2] && n.ops.pop(), n.trys.pop();
|
|
1245
1245
|
continue;
|
|
1246
1246
|
}
|
|
1247
|
-
|
|
1247
|
+
l = r.call(e, n);
|
|
1248
1248
|
} catch (y) {
|
|
1249
|
-
|
|
1249
|
+
l = [6, y], i = 0;
|
|
1250
1250
|
} finally {
|
|
1251
1251
|
t = o = 0;
|
|
1252
1252
|
}
|
|
1253
|
-
if (
|
|
1254
|
-
throw
|
|
1255
|
-
return { value:
|
|
1253
|
+
if (l[0] & 5)
|
|
1254
|
+
throw l[1];
|
|
1255
|
+
return { value: l[0] ? l[1] : void 0, done: !0 };
|
|
1256
1256
|
}
|
|
1257
1257
|
}
|
|
1258
1258
|
function xr(e, r) {
|
|
@@ -1503,7 +1503,7 @@ function Xr(e) {
|
|
|
1503
1503
|
var s = this;
|
|
1504
1504
|
r.readEntries(function(a) {
|
|
1505
1505
|
return Ee(s, void 0, void 0, function() {
|
|
1506
|
-
var
|
|
1506
|
+
var d, l, y;
|
|
1507
1507
|
return we(this, function(g) {
|
|
1508
1508
|
switch (g.label) {
|
|
1509
1509
|
case 0:
|
|
@@ -1513,9 +1513,9 @@ function Xr(e) {
|
|
|
1513
1513
|
case 1:
|
|
1514
1514
|
return g.trys.push([1, 3, , 4]), [4, Promise.all(i)];
|
|
1515
1515
|
case 2:
|
|
1516
|
-
return
|
|
1516
|
+
return d = g.sent(), n(d), [3, 4];
|
|
1517
1517
|
case 3:
|
|
1518
|
-
return
|
|
1518
|
+
return l = g.sent(), t(l), [3, 4];
|
|
1519
1519
|
case 4:
|
|
1520
1520
|
return [3, 6];
|
|
1521
1521
|
case 5:
|
|
@@ -1629,8 +1629,8 @@ function Mt(e, r) {
|
|
|
1629
1629
|
try {
|
|
1630
1630
|
for (n = n.call(e); !(i = (s = n.next()).done) && (t.push(s.value), !(r && t.length === r)); i = !0)
|
|
1631
1631
|
;
|
|
1632
|
-
} catch (
|
|
1633
|
-
o = !0, a =
|
|
1632
|
+
} catch (d) {
|
|
1633
|
+
o = !0, a = d;
|
|
1634
1634
|
} finally {
|
|
1635
1635
|
try {
|
|
1636
1636
|
!i && n.return != null && n.return();
|
|
@@ -1691,8 +1691,8 @@ function de(e) {
|
|
|
1691
1691
|
}
|
|
1692
1692
|
function Kt(e) {
|
|
1693
1693
|
var r = e.files, n = e.accept, t = e.minSize, i = e.maxSize, o = e.multiple, s = e.maxFiles, a = e.validator;
|
|
1694
|
-
return !o && r.length > 1 || o && s >= 1 && r.length > s ? !1 : r.every(function(
|
|
1695
|
-
var
|
|
1694
|
+
return !o && r.length > 1 || o && s >= 1 && r.length > s ? !1 : r.every(function(d) {
|
|
1695
|
+
var l = en(d, n), y = Se(l, 1), g = y[0], E = rn(d, t, i), P = Se(E, 1), R = P[0], D = a ? a(d) : null;
|
|
1696
1696
|
return g && R && !D;
|
|
1697
1697
|
});
|
|
1698
1698
|
}
|
|
@@ -1816,8 +1816,8 @@ function uo(e, r) {
|
|
|
1816
1816
|
try {
|
|
1817
1817
|
for (n = n.call(e); !(i = (s = n.next()).done) && (t.push(s.value), !(r && t.length === r)); i = !0)
|
|
1818
1818
|
;
|
|
1819
|
-
} catch (
|
|
1820
|
-
o = !0, a =
|
|
1819
|
+
} catch (d) {
|
|
1820
|
+
o = !0, a = d;
|
|
1821
1821
|
} finally {
|
|
1822
1822
|
try {
|
|
1823
1823
|
!i && n.return != null && n.return();
|
|
@@ -2082,7 +2082,7 @@ var cr = {
|
|
|
2082
2082
|
fileRejections: []
|
|
2083
2083
|
};
|
|
2084
2084
|
function sn() {
|
|
2085
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, r = M(M({}, an), e), n = r.accept, t = r.disabled, i = r.getFilesFromEvent, o = r.maxSize, s = r.minSize, a = r.multiple,
|
|
2085
|
+
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, r = M(M({}, an), e), n = r.accept, t = r.disabled, i = r.getFilesFromEvent, o = r.maxSize, s = r.minSize, a = r.multiple, d = r.maxFiles, l = r.onDragEnter, y = r.onDragLeave, g = r.onDragOver, E = r.onDrop, P = r.onDropAccepted, R = r.onDropRejected, D = r.onFileDialogCancel, k = r.onFileDialogOpen, q = r.useFsAccessApi, re = r.autoFocus, N = r.preventDropOnDocument, $ = r.noClick, f = r.noKeyboard, G = r.noDrag, ee = r.noDragEventsBubbling, le = r.onError, oe = r.validator, ie = ge(function() {
|
|
2086
2086
|
return Zt(n);
|
|
2087
2087
|
}, [n]), ue = ge(function() {
|
|
2088
2088
|
return Xt(n);
|
|
@@ -2116,18 +2116,18 @@ function sn() {
|
|
|
2116
2116
|
return !t && re && L.current && L.current.focus(), function() {
|
|
2117
2117
|
};
|
|
2118
2118
|
}, [L, re, t]);
|
|
2119
|
-
var _ = X(function(
|
|
2120
|
-
le ? le(
|
|
2121
|
-
}, [le]), O = X(function(
|
|
2122
|
-
|
|
2123
|
-
if (!(Ne(
|
|
2119
|
+
var _ = X(function(m) {
|
|
2120
|
+
le ? le(m) : console.error(m);
|
|
2121
|
+
}, [le]), O = X(function(m) {
|
|
2122
|
+
m.preventDefault(), m.persist(), Pe(m), h.current = [].concat(io(h.current), [m.target]), Ie(m) && Promise.resolve(i(m)).then(function(b) {
|
|
2123
|
+
if (!(Ne(m) && !ee)) {
|
|
2124
2124
|
var B = b.length, K = B > 0 && Kt({
|
|
2125
2125
|
files: b,
|
|
2126
2126
|
accept: ie,
|
|
2127
2127
|
minSize: s,
|
|
2128
2128
|
maxSize: o,
|
|
2129
2129
|
multiple: a,
|
|
2130
|
-
maxFiles:
|
|
2130
|
+
maxFiles: d,
|
|
2131
2131
|
validator: oe
|
|
2132
2132
|
}), J = B > 0 && !K;
|
|
2133
2133
|
H({
|
|
@@ -2135,34 +2135,34 @@ function sn() {
|
|
|
2135
2135
|
isDragReject: J,
|
|
2136
2136
|
isDragActive: !0,
|
|
2137
2137
|
type: "setDraggedFiles"
|
|
2138
|
-
}),
|
|
2138
|
+
}), l && l(m);
|
|
2139
2139
|
}
|
|
2140
2140
|
}).catch(function(b) {
|
|
2141
2141
|
return _(b);
|
|
2142
2142
|
});
|
|
2143
|
-
}, [i,
|
|
2144
|
-
|
|
2145
|
-
var b = Ie(
|
|
2146
|
-
if (b &&
|
|
2143
|
+
}, [i, l, _, ee, ie, s, o, a, d, oe]), S = X(function(m) {
|
|
2144
|
+
m.preventDefault(), m.persist(), Pe(m);
|
|
2145
|
+
var b = Ie(m);
|
|
2146
|
+
if (b && m.dataTransfer)
|
|
2147
2147
|
try {
|
|
2148
|
-
|
|
2148
|
+
m.dataTransfer.dropEffect = "copy";
|
|
2149
2149
|
} catch {
|
|
2150
2150
|
}
|
|
2151
|
-
return b && g && g(
|
|
2152
|
-
}, [g, ee]), A = X(function(
|
|
2153
|
-
|
|
2151
|
+
return b && g && g(m), !1;
|
|
2152
|
+
}, [g, ee]), A = X(function(m) {
|
|
2153
|
+
m.preventDefault(), m.persist(), Pe(m);
|
|
2154
2154
|
var b = h.current.filter(function(K) {
|
|
2155
2155
|
return L.current && L.current.contains(K);
|
|
2156
|
-
}), B = b.indexOf(
|
|
2156
|
+
}), B = b.indexOf(m.target);
|
|
2157
2157
|
B !== -1 && b.splice(B, 1), h.current = b, !(b.length > 0) && (H({
|
|
2158
2158
|
type: "setDraggedFiles",
|
|
2159
2159
|
isDragActive: !1,
|
|
2160
2160
|
isDragAccept: !1,
|
|
2161
2161
|
isDragReject: !1
|
|
2162
|
-
}), Ie(
|
|
2163
|
-
}, [L, y, ee]), C = X(function(
|
|
2162
|
+
}), Ie(m) && y && y(m));
|
|
2163
|
+
}, [L, y, ee]), C = X(function(m, b) {
|
|
2164
2164
|
var B = [], K = [];
|
|
2165
|
-
|
|
2165
|
+
m.forEach(function(J) {
|
|
2166
2166
|
var Oe = en(J, ie), ye = er(Oe, 2), Be = ye[0], We = ye[1], Ye = rn(J, s, o), Re = er(Ye, 2), qe = Re[0], He = Re[1], Ke = oe ? oe(J) : null;
|
|
2167
2167
|
if (Be && qe && !Ke)
|
|
2168
2168
|
B.push(J);
|
|
@@ -2175,7 +2175,7 @@ function sn() {
|
|
|
2175
2175
|
})
|
|
2176
2176
|
});
|
|
2177
2177
|
}
|
|
2178
|
-
}), (!a && B.length > 1 || a &&
|
|
2178
|
+
}), (!a && B.length > 1 || a && d >= 1 && B.length > d) && (B.forEach(function(J) {
|
|
2179
2179
|
K.push({
|
|
2180
2180
|
file: J,
|
|
2181
2181
|
errors: [Ht]
|
|
@@ -2185,9 +2185,9 @@ function sn() {
|
|
|
2185
2185
|
fileRejections: K,
|
|
2186
2186
|
type: "setFiles"
|
|
2187
2187
|
}), E && E(B, K, b), K.length > 0 && R && R(K, b), B.length > 0 && P && P(B, b);
|
|
2188
|
-
}, [H, a, ie, s, o,
|
|
2189
|
-
|
|
2190
|
-
Ne(
|
|
2188
|
+
}, [H, a, ie, s, o, d, E, P, R, oe]), W = X(function(m) {
|
|
2189
|
+
m.preventDefault(), m.persist(), Pe(m), h.current = [], Ie(m) && Promise.resolve(i(m)).then(function(b) {
|
|
2190
|
+
Ne(m) && !ee || C(b, m);
|
|
2191
2191
|
}).catch(function(b) {
|
|
2192
2192
|
return _(b);
|
|
2193
2193
|
}), H({
|
|
@@ -2198,11 +2198,11 @@ function sn() {
|
|
|
2198
2198
|
H({
|
|
2199
2199
|
type: "openDialog"
|
|
2200
2200
|
}), fe();
|
|
2201
|
-
var
|
|
2201
|
+
var m = {
|
|
2202
2202
|
multiple: a,
|
|
2203
2203
|
types: ue
|
|
2204
2204
|
};
|
|
2205
|
-
window.showOpenFilePicker(
|
|
2205
|
+
window.showOpenFilePicker(m).then(function(b) {
|
|
2206
2206
|
return i(b);
|
|
2207
2207
|
}).then(function(b) {
|
|
2208
2208
|
C(b, null), H({
|
|
@@ -2218,8 +2218,8 @@ function sn() {
|
|
|
2218
2218
|
U.current && (H({
|
|
2219
2219
|
type: "openDialog"
|
|
2220
2220
|
}), fe(), U.current.value = null, U.current.click());
|
|
2221
|
-
}, [H, fe, se, q, C, _, ue, a]), V = X(function(
|
|
2222
|
-
!L.current || !L.current.isEqualNode(
|
|
2221
|
+
}, [H, fe, se, q, C, _, ue, a]), V = X(function(m) {
|
|
2222
|
+
!L.current || !L.current.isEqualNode(m.target) || (m.key === " " || m.key === "Enter" || m.keyCode === 32 || m.keyCode === 13) && (m.preventDefault(), p());
|
|
2223
2223
|
}, [L, p]), pe = X(function() {
|
|
2224
2224
|
H({
|
|
2225
2225
|
type: "focus"
|
|
@@ -2240,7 +2240,7 @@ function sn() {
|
|
|
2240
2240
|
ee && b.stopPropagation();
|
|
2241
2241
|
}, cn = ge(function() {
|
|
2242
2242
|
return function() {
|
|
2243
|
-
var
|
|
2243
|
+
var m = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, b = m.refKey, B = b === void 0 ? "ref" : b, K = m.role, J = m.onKeyDown, Oe = m.onFocus, ye = m.onBlur, Be = m.onClick, We = m.onDragEnter, Ye = m.onDragOver, Re = m.onDragLeave, qe = m.onDrop, He = $e(m, to);
|
|
2244
2244
|
return M(M(sr({
|
|
2245
2245
|
onKeyDown: ze(te(J, V)),
|
|
2246
2246
|
onFocus: ze(te(Oe, pe)),
|
|
@@ -2255,11 +2255,11 @@ function sn() {
|
|
|
2255
2255
|
tabIndex: 0
|
|
2256
2256
|
} : {}), He);
|
|
2257
2257
|
};
|
|
2258
|
-
}, [L, V, pe, Te, dr, O, S, A, W, f, G, t]), ln = X(function(
|
|
2259
|
-
|
|
2258
|
+
}, [L, V, pe, Te, dr, O, S, A, W, f, G, t]), ln = X(function(m) {
|
|
2259
|
+
m.stopPropagation();
|
|
2260
2260
|
}, []), un = ge(function() {
|
|
2261
2261
|
return function() {
|
|
2262
|
-
var
|
|
2262
|
+
var m = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, b = m.refKey, B = b === void 0 ? "ref" : b, K = m.onChange, J = m.onClick, Oe = $e(m, oo), ye = sr({
|
|
2263
2263
|
accept: ie,
|
|
2264
2264
|
multiple: a,
|
|
2265
2265
|
type: "file",
|
|
@@ -2325,7 +2325,7 @@ const Oo = ({
|
|
|
2325
2325
|
const { getRootProps: r } = sn({
|
|
2326
2326
|
onDrop: e
|
|
2327
2327
|
});
|
|
2328
|
-
return /* @__PURE__ */
|
|
2328
|
+
return /* @__PURE__ */ u("div", { ...r(), className: "file-upload", "data-testid": "file-upload", children: /* @__PURE__ */ u("button", { className: "file-upload__button", children: "Drag and drop files here or click to upload" }) });
|
|
2329
2329
|
};
|
|
2330
2330
|
const vo = ({
|
|
2331
2331
|
items: e,
|
|
@@ -2335,27 +2335,27 @@ const vo = ({
|
|
|
2335
2335
|
updateItems: i,
|
|
2336
2336
|
isOpen: o,
|
|
2337
2337
|
...s
|
|
2338
|
-
}) => /* @__PURE__ */
|
|
2339
|
-
t && /* @__PURE__ */
|
|
2340
|
-
/* @__PURE__ */
|
|
2338
|
+
}) => /* @__PURE__ */ u(Ur, { isVisible: o, children: /* @__PURE__ */ ae("div", { className: "multi-select__dropdown", role: "listbox", ...s, children: [
|
|
2339
|
+
t && /* @__PURE__ */ u("h5", { className: "multi-select__dropdown-header", children: t }),
|
|
2340
|
+
/* @__PURE__ */ u("ul", { className: "multi-select__dropdown-list", children: e.map((a) => /* @__PURE__ */ u("li", { className: "multi-select__dropdown-item", children: /* @__PURE__ */ u(
|
|
2341
2341
|
On,
|
|
2342
2342
|
{
|
|
2343
|
-
disabled: n.
|
|
2344
|
-
label: a,
|
|
2345
|
-
checked: r.
|
|
2343
|
+
disabled: n.some((d) => d.value === a.value),
|
|
2344
|
+
label: a.label,
|
|
2345
|
+
checked: r.some((d) => d.value === a.value),
|
|
2346
2346
|
onChange: () => i(
|
|
2347
|
-
r.
|
|
2347
|
+
r.some((d) => d.value === a.value) ? r.filter((d) => d.value !== a.value) : [...r, a]
|
|
2348
2348
|
)
|
|
2349
2349
|
}
|
|
2350
|
-
) }, a)) }),
|
|
2350
|
+
) }, a.value)) }),
|
|
2351
2351
|
/* @__PURE__ */ ae("div", { className: "multi-select__buttons", children: [
|
|
2352
|
-
/* @__PURE__ */
|
|
2352
|
+
/* @__PURE__ */ u(
|
|
2353
2353
|
_e,
|
|
2354
2354
|
{
|
|
2355
2355
|
appearance: "link",
|
|
2356
2356
|
onClick: () => {
|
|
2357
2357
|
const a = e.filter(
|
|
2358
|
-
(
|
|
2358
|
+
(d) => !n.some((l) => l.value === d.value)
|
|
2359
2359
|
);
|
|
2360
2360
|
i([...r, ...a]);
|
|
2361
2361
|
},
|
|
@@ -2363,13 +2363,13 @@ const vo = ({
|
|
|
2363
2363
|
children: "Select all"
|
|
2364
2364
|
}
|
|
2365
2365
|
),
|
|
2366
|
-
/* @__PURE__ */
|
|
2366
|
+
/* @__PURE__ */ u(
|
|
2367
2367
|
_e,
|
|
2368
2368
|
{
|
|
2369
2369
|
appearance: "link",
|
|
2370
2370
|
onClick: () => {
|
|
2371
2371
|
const a = r.filter(
|
|
2372
|
-
(
|
|
2372
|
+
(d) => n.some((l) => l.value === d.value)
|
|
2373
2373
|
);
|
|
2374
2374
|
i(a);
|
|
2375
2375
|
},
|
|
@@ -2387,9 +2387,9 @@ const vo = ({
|
|
|
2387
2387
|
required: o = !1,
|
|
2388
2388
|
items: s = [],
|
|
2389
2389
|
disabledItems: a = [],
|
|
2390
|
-
header:
|
|
2390
|
+
header: d
|
|
2391
2391
|
}) => {
|
|
2392
|
-
const
|
|
2392
|
+
const l = Cn(() => {
|
|
2393
2393
|
g(!1);
|
|
2394
2394
|
});
|
|
2395
2395
|
xn(() => g(!1));
|
|
@@ -2402,10 +2402,10 @@ const vo = ({
|
|
|
2402
2402
|
), k = r || R, q = (f) => {
|
|
2403
2403
|
const G = Array.from(new Set(f));
|
|
2404
2404
|
D(G), t && t(G);
|
|
2405
|
-
}, re = k.map((f) => /* @__PURE__ */
|
|
2406
|
-
return /* @__PURE__ */
|
|
2407
|
-
k.length > 0 && /* @__PURE__ */
|
|
2408
|
-
/* @__PURE__ */
|
|
2405
|
+
}, re = k.filter((f) => s.some((G) => G.value === f.value)).map((f) => /* @__PURE__ */ u("li", { className: "multi-select__selected-item", "aria-label": f.label, children: f.label }, f.value)), N = rr(), $ = rr();
|
|
2406
|
+
return /* @__PURE__ */ u("div", { ref: l, children: /* @__PURE__ */ ae("div", { className: "multi-select", children: [
|
|
2407
|
+
k.length > 0 && /* @__PURE__ */ u("ul", { className: "multi-select__selected-list", "aria-label": "selected", children: re }),
|
|
2408
|
+
/* @__PURE__ */ u(
|
|
2409
2409
|
Lr,
|
|
2410
2410
|
{
|
|
2411
2411
|
"aria-controls": N,
|
|
@@ -2424,15 +2424,15 @@ const vo = ({
|
|
|
2424
2424
|
className: "multi-select__input"
|
|
2425
2425
|
}
|
|
2426
2426
|
),
|
|
2427
|
-
/* @__PURE__ */
|
|
2427
|
+
/* @__PURE__ */ u(
|
|
2428
2428
|
vo,
|
|
2429
2429
|
{
|
|
2430
2430
|
id: N,
|
|
2431
2431
|
isOpen: y,
|
|
2432
|
-
items: E.length > 0 ? s.filter((f) => f.includes(E)) : s,
|
|
2432
|
+
items: E.length > 0 ? s.filter((f) => f.label.includes(E)) : s,
|
|
2433
2433
|
selectedItems: k,
|
|
2434
2434
|
disabledItems: a,
|
|
2435
|
-
header:
|
|
2435
|
+
header: d,
|
|
2436
2436
|
updateItems: q
|
|
2437
2437
|
}
|
|
2438
2438
|
)
|