@canonical/maas-react-components 1.14.1 → 1.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@canonical/maas-react-components.es.js +2256 -302
- package/dist/@canonical/maas-react-components.umd.js +29 -6
- package/dist/src/lib/components/FadeInDown/FadeInDown.d.ts +9 -0
- package/dist/src/lib/components/FadeInDown/FadeInDown.stories.d.ts +7 -0
- package/dist/src/lib/components/FadeInDown/FadeInDown.test.d.ts +1 -0
- package/dist/src/lib/components/FadeInDown/index.d.ts +1 -0
- package/dist/src/lib/components/FileUpload/FileUpload.d.ts +6 -0
- package/dist/src/lib/components/FileUpload/FileUpload.stories.d.ts +9 -0
- package/dist/src/lib/components/FileUpload/FileUpload.test.d.ts +1 -0
- package/dist/src/lib/components/FileUpload/index.d.ts +1 -0
- package/dist/src/lib/components/MultiSelect/MultiSelect.d.ts +30 -0
- package/dist/src/lib/components/MultiSelect/MultiSelect.stories.d.ts +11 -0
- package/dist/src/lib/components/MultiSelect/MultiSelect.test.d.ts +1 -0
- package/dist/src/lib/components/MultiSelect/index.d.ts +1 -0
- package/dist/src/lib/components/index.d.ts +2 -0
- package/dist/style.css +1 -1
- package/package.json +2 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import * as
|
|
3
|
-
import { useRef as
|
|
4
|
-
import { useListener as
|
|
5
|
-
function
|
|
1
|
+
import { jsxs as ae, jsx as l, Fragment as Me } from "react/jsx-runtime";
|
|
2
|
+
import * as Q from "react";
|
|
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
|
+
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";
|
|
5
|
+
function zr(e) {
|
|
6
6
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
7
7
|
}
|
|
8
|
-
var
|
|
8
|
+
var Br = { exports: {} };
|
|
9
9
|
/*!
|
|
10
10
|
Copyright (c) 2018 Jed Watson.
|
|
11
11
|
Licensed under the MIT License (MIT), see
|
|
@@ -13,37 +13,37 @@ var M = { exports: {} };
|
|
|
13
13
|
*/
|
|
14
14
|
(function(e) {
|
|
15
15
|
(function() {
|
|
16
|
-
var
|
|
17
|
-
function
|
|
18
|
-
for (var
|
|
19
|
-
var
|
|
20
|
-
if (
|
|
21
|
-
var
|
|
22
|
-
if (
|
|
23
|
-
|
|
24
|
-
else if (Array.isArray(
|
|
25
|
-
if (
|
|
26
|
-
var
|
|
27
|
-
|
|
16
|
+
var r = {}.hasOwnProperty;
|
|
17
|
+
function n() {
|
|
18
|
+
for (var t = [], i = 0; i < arguments.length; i++) {
|
|
19
|
+
var o = arguments[i];
|
|
20
|
+
if (o) {
|
|
21
|
+
var s = typeof o;
|
|
22
|
+
if (s === "string" || s === "number")
|
|
23
|
+
t.push(o);
|
|
24
|
+
else if (Array.isArray(o)) {
|
|
25
|
+
if (o.length) {
|
|
26
|
+
var a = n.apply(null, o);
|
|
27
|
+
a && t.push(a);
|
|
28
28
|
}
|
|
29
|
-
} else if (
|
|
30
|
-
if (
|
|
31
|
-
|
|
29
|
+
} else if (s === "object") {
|
|
30
|
+
if (o.toString !== Object.prototype.toString && !o.toString.toString().includes("[native code]")) {
|
|
31
|
+
t.push(o.toString());
|
|
32
32
|
continue;
|
|
33
33
|
}
|
|
34
|
-
for (var
|
|
35
|
-
|
|
34
|
+
for (var m in o)
|
|
35
|
+
r.call(o, m) && o[m] && t.push(m);
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
return
|
|
39
|
+
return t.join(" ");
|
|
40
40
|
}
|
|
41
|
-
e.exports ? (
|
|
41
|
+
e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
|
|
42
42
|
})();
|
|
43
|
-
})(
|
|
44
|
-
var
|
|
45
|
-
const
|
|
46
|
-
const
|
|
43
|
+
})(Br);
|
|
44
|
+
var Sn = Br.exports;
|
|
45
|
+
const z = /* @__PURE__ */ zr(Sn);
|
|
46
|
+
const me = {
|
|
47
47
|
caution: "#F99B11",
|
|
48
48
|
light: "#F7F7F7",
|
|
49
49
|
linkFaded: "#D3E4ED",
|
|
@@ -52,455 +52,2409 @@ const v = {
|
|
|
52
52
|
positiveFaded: "#B7CCB9",
|
|
53
53
|
positiveMid: "#4DAB4D",
|
|
54
54
|
positive: "#0E8420"
|
|
55
|
-
},
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
],
|
|
61
|
-
var
|
|
62
|
-
const
|
|
63
|
-
return
|
|
64
|
-
},
|
|
55
|
+
}, ho = [
|
|
56
|
+
me.link,
|
|
57
|
+
me.positive,
|
|
58
|
+
me.negative,
|
|
59
|
+
me.caution
|
|
60
|
+
], Dn = me.linkFaded, Wr = me.caution, nr = me.light, mr = 2, vr = 1, yr = (e, r) => {
|
|
61
|
+
var i, o;
|
|
62
|
+
const n = ((o = (i = e == null ? void 0 : e.current) == null ? void 0 : i.getBoundingClientRect()) == null ? void 0 : o.width) || 0;
|
|
63
|
+
return n > r * mr ? n / r : mr;
|
|
64
|
+
}, he = {
|
|
65
65
|
bar: "meter-bar",
|
|
66
66
|
container: "meter-container",
|
|
67
67
|
filled: "meter-filled",
|
|
68
68
|
label: "meter-label",
|
|
69
69
|
meteroverflow: "meter-overflow",
|
|
70
70
|
segments: "meter-segments"
|
|
71
|
-
},
|
|
71
|
+
}, An = ({
|
|
72
72
|
className: e,
|
|
73
|
-
children:
|
|
74
|
-
data:
|
|
75
|
-
max:
|
|
76
|
-
variant:
|
|
77
|
-
size:
|
|
78
|
-
...
|
|
73
|
+
children: r,
|
|
74
|
+
data: n,
|
|
75
|
+
max: t,
|
|
76
|
+
variant: i = "regular",
|
|
77
|
+
size: o = "regular",
|
|
78
|
+
...s
|
|
79
79
|
}) => {
|
|
80
|
-
const
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}, [
|
|
84
|
-
const
|
|
85
|
-
|
|
86
|
-
}, [
|
|
87
|
-
return
|
|
80
|
+
const a = Ce(null), m = n == null ? void 0 : n.reduce((R, D) => R + D.value, 0), u = t || m, y = n.map((R) => R.value / u * 100), [g, E] = be(0);
|
|
81
|
+
xe(() => {
|
|
82
|
+
E(i === "segmented" ? yr(a, u) : 0);
|
|
83
|
+
}, [u, i]);
|
|
84
|
+
const P = X(() => {
|
|
85
|
+
E(yr(a, u));
|
|
86
|
+
}, [a, u, E]);
|
|
87
|
+
return hn(window, P, "resize", !0, i === "segmented"), /* @__PURE__ */ ae(
|
|
88
88
|
"div",
|
|
89
89
|
{
|
|
90
|
-
className:
|
|
91
|
-
"p-meter--small":
|
|
90
|
+
className: z("p-meter", e, {
|
|
91
|
+
"p-meter--small": o === "small"
|
|
92
92
|
}),
|
|
93
|
-
"aria-label":
|
|
94
|
-
"data-testid":
|
|
95
|
-
ref:
|
|
93
|
+
"aria-label": s == null ? void 0 : s["aria-label"],
|
|
94
|
+
"data-testid": he.container,
|
|
95
|
+
ref: a,
|
|
96
96
|
children: [
|
|
97
|
-
/* @__PURE__ */
|
|
98
|
-
|
|
97
|
+
/* @__PURE__ */ l(Pn, { children: /* @__PURE__ */ l(
|
|
98
|
+
Rn,
|
|
99
99
|
{
|
|
100
|
-
data:
|
|
101
|
-
datumWidths:
|
|
102
|
-
maximum:
|
|
103
|
-
overColor:
|
|
104
|
-
segmentWidth:
|
|
105
|
-
separatorColor:
|
|
100
|
+
data: n,
|
|
101
|
+
datumWidths: y,
|
|
102
|
+
maximum: u,
|
|
103
|
+
overColor: Wr,
|
|
104
|
+
segmentWidth: g,
|
|
105
|
+
separatorColor: nr
|
|
106
106
|
}
|
|
107
107
|
) }),
|
|
108
|
-
|
|
108
|
+
r
|
|
109
109
|
]
|
|
110
110
|
}
|
|
111
111
|
);
|
|
112
|
-
},
|
|
112
|
+
}, Pn = ({ children: e }) => /* @__PURE__ */ l(
|
|
113
113
|
"div",
|
|
114
114
|
{
|
|
115
115
|
className: "p-meter__bar",
|
|
116
|
-
"data-testid":
|
|
117
|
-
style: { backgroundColor:
|
|
116
|
+
"data-testid": he.bar,
|
|
117
|
+
style: { backgroundColor: Dn },
|
|
118
118
|
children: e
|
|
119
119
|
}
|
|
120
|
-
),
|
|
120
|
+
), Rn = ({
|
|
121
121
|
data: e,
|
|
122
|
-
datumWidths:
|
|
123
|
-
maximum:
|
|
124
|
-
segmentWidth:
|
|
122
|
+
datumWidths: r,
|
|
123
|
+
maximum: n,
|
|
124
|
+
segmentWidth: t
|
|
125
125
|
}) => {
|
|
126
|
-
const
|
|
127
|
-
backgroundColor:
|
|
128
|
-
left: `${
|
|
129
|
-
(
|
|
126
|
+
const i = () => (e == null ? void 0 : e.reduce((a, m) => a + m.value, 0)) > n, o = (a, m) => ({
|
|
127
|
+
backgroundColor: a.color,
|
|
128
|
+
left: `${r == null ? void 0 : r.reduce(
|
|
129
|
+
(u, y, g) => m > g ? u + y : u,
|
|
130
130
|
0
|
|
131
131
|
)}%`,
|
|
132
|
-
width: `${
|
|
133
|
-
}),
|
|
132
|
+
width: `${r[m]}%`
|
|
133
|
+
}), s = () => ({
|
|
134
134
|
background: `repeating-linear-gradient(
|
|
135
135
|
to right,
|
|
136
136
|
transparent 0,
|
|
137
|
-
transparent ${
|
|
138
|
-
${
|
|
139
|
-
${
|
|
137
|
+
transparent ${t - vr}px,
|
|
138
|
+
${nr} ${t - vr}px,
|
|
139
|
+
${nr} ${t}px
|
|
140
140
|
)`
|
|
141
141
|
});
|
|
142
|
-
return /* @__PURE__ */
|
|
143
|
-
|
|
142
|
+
return /* @__PURE__ */ ae(Me, { children: [
|
|
143
|
+
i() ? /* @__PURE__ */ l(
|
|
144
144
|
"div",
|
|
145
145
|
{
|
|
146
146
|
className: "p-meter__filled",
|
|
147
|
-
"data-testid":
|
|
148
|
-
style: { backgroundColor:
|
|
147
|
+
"data-testid": he.meteroverflow,
|
|
148
|
+
style: { backgroundColor: Wr, width: "100%" }
|
|
149
149
|
}
|
|
150
|
-
) : e == null ? void 0 : e.map((
|
|
150
|
+
) : e == null ? void 0 : e.map((a, m) => /* @__PURE__ */ l(
|
|
151
151
|
"div",
|
|
152
152
|
{
|
|
153
153
|
className: "p-meter__filled",
|
|
154
|
-
"data-testid":
|
|
155
|
-
style:
|
|
154
|
+
"data-testid": he.filled,
|
|
155
|
+
style: o(a, m)
|
|
156
156
|
},
|
|
157
|
-
`meter-${
|
|
157
|
+
`meter-${m}`
|
|
158
158
|
)),
|
|
159
|
-
|
|
159
|
+
t > 0 && /* @__PURE__ */ l(
|
|
160
160
|
"div",
|
|
161
161
|
{
|
|
162
162
|
className: "p-meter__separators",
|
|
163
|
-
"data-testid":
|
|
164
|
-
style:
|
|
163
|
+
"data-testid": he.segments,
|
|
164
|
+
style: s()
|
|
165
165
|
}
|
|
166
166
|
)
|
|
167
167
|
] });
|
|
168
|
-
},
|
|
168
|
+
}, Fn = ({
|
|
169
169
|
className: e,
|
|
170
|
-
children:
|
|
171
|
-
}) => /* @__PURE__ */
|
|
170
|
+
children: r
|
|
171
|
+
}) => /* @__PURE__ */ l(
|
|
172
172
|
"div",
|
|
173
173
|
{
|
|
174
|
-
className:
|
|
175
|
-
"data-testid":
|
|
176
|
-
children:
|
|
174
|
+
className: z("p-meter__label", e),
|
|
175
|
+
"data-testid": he.label,
|
|
176
|
+
children: r
|
|
177
177
|
}
|
|
178
178
|
);
|
|
179
|
-
|
|
180
|
-
const
|
|
179
|
+
An.Label = Fn;
|
|
180
|
+
const _o = ({ children: e, to: r, ...n }) => /* @__PURE__ */ l(_n, { ...n, href: r, rel: "noreferrer noopener", target: "_blank", children: e }), In = ({ children: e }) => /* @__PURE__ */ l(Me, { children: e }), jn = ({
|
|
181
181
|
isCollapsed: e,
|
|
182
|
-
setIsCollapsed:
|
|
183
|
-
className:
|
|
184
|
-
}) => /* @__PURE__ */
|
|
185
|
-
|
|
182
|
+
setIsCollapsed: r,
|
|
183
|
+
className: n
|
|
184
|
+
}) => /* @__PURE__ */ l(
|
|
185
|
+
En,
|
|
186
186
|
{
|
|
187
187
|
className: "p-side-navigation__tooltip-wrapper",
|
|
188
|
-
message: /* @__PURE__ */
|
|
188
|
+
message: /* @__PURE__ */ ae(Me, { children: [
|
|
189
189
|
e ? "expand" : "collapse",
|
|
190
190
|
"( ",
|
|
191
|
-
/* @__PURE__ */
|
|
191
|
+
/* @__PURE__ */ l("code", { children: "[" }),
|
|
192
192
|
" )"
|
|
193
193
|
] }),
|
|
194
194
|
position: "right",
|
|
195
195
|
tooltipClassName: "p-side-navigation__tooltip",
|
|
196
|
-
children: /* @__PURE__ */
|
|
197
|
-
|
|
196
|
+
children: /* @__PURE__ */ l(
|
|
197
|
+
_e,
|
|
198
198
|
{
|
|
199
199
|
appearance: "base",
|
|
200
200
|
"aria-label": `${e ? "expand" : "collapse"} main navigation`,
|
|
201
|
-
className:
|
|
201
|
+
className: z(
|
|
202
202
|
"is-dense has-icon is-dark u-no-margin l-navigation-collapse-toggle",
|
|
203
|
-
|
|
203
|
+
n
|
|
204
204
|
),
|
|
205
|
-
onClick: (
|
|
206
|
-
|
|
205
|
+
onClick: (t) => {
|
|
206
|
+
r(!e), t.stopPropagation(), t.currentTarget.blur();
|
|
207
207
|
},
|
|
208
|
-
children: /* @__PURE__ */
|
|
208
|
+
children: /* @__PURE__ */ l(je, { light: !0, name: "sidebar-toggle" })
|
|
209
209
|
}
|
|
210
210
|
)
|
|
211
211
|
}
|
|
212
|
-
),
|
|
212
|
+
), kn = ({ children: e }) => /* @__PURE__ */ l("div", { className: "p-panel__content", children: /* @__PURE__ */ l("nav", { className: "p-side-navigation--icons is-dark", children: e }) }), Nn = ({ children: e }) => /* @__PURE__ */ l("div", { className: "p-panel__controls u-no-margin--top", children: e }), $n = ({ children: e }) => /* @__PURE__ */ l("div", { className: "l-navigation__drawer", children: /* @__PURE__ */ l("div", { className: "p-panel is-dark", children: e }) }), Mn = ({ children: e }) => /* @__PURE__ */ l("div", { className: "p-panel__footer", children: e }), Ln = ({ children: e }) => /* @__PURE__ */ l("div", { className: "p-panel__header", children: e }), zn = ({ light: e = !0, name: r }) => /* @__PURE__ */ l(je, { className: "p-side-navigation__icon", light: e, name: r }), Bn = ({ children: e, className: r, hasActiveChild: n }) => /* @__PURE__ */ l("li", { className: z("p-side-navigation__item", r, { "has-active-child": n }), children: e }), Wn = ({ children: e, id: r, variant: n = "base" }) => /* @__PURE__ */ l("span", { className: z("p-side-navigation__label", { "p-side-navigation__label--group": n === "group" }), id: r, children: e }), Yn = ({
|
|
213
213
|
as: e,
|
|
214
|
-
...
|
|
215
|
-
}) => /* @__PURE__ */
|
|
214
|
+
...r
|
|
215
|
+
}) => /* @__PURE__ */ l(
|
|
216
216
|
e || "a",
|
|
217
217
|
{
|
|
218
|
-
className:
|
|
219
|
-
...
|
|
218
|
+
className: z("p-side-navigation__link", r.className),
|
|
219
|
+
...r
|
|
220
220
|
}
|
|
221
|
-
),
|
|
221
|
+
), qn = ({ children: e, className: r }) => /* @__PURE__ */ l("ul", { className: z("p-side-navigation__list", r), children: e }), Hn = ({
|
|
222
222
|
as: e,
|
|
223
|
-
children:
|
|
224
|
-
className:
|
|
225
|
-
...
|
|
226
|
-
}) => /* @__PURE__ */
|
|
223
|
+
children: r,
|
|
224
|
+
className: n,
|
|
225
|
+
...t
|
|
226
|
+
}) => /* @__PURE__ */ l(e || "a", { className: z("p-panel__logo", n), ...t, children: /* @__PURE__ */ l("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__ */ l(
|
|
227
227
|
"div",
|
|
228
228
|
{
|
|
229
|
-
className:
|
|
230
|
-
"p-panel__logo-name--small":
|
|
229
|
+
className: z("p-panel__logo-name is-fading-when-collapsed", {
|
|
230
|
+
"p-panel__logo-name--small": r === "small"
|
|
231
231
|
}),
|
|
232
232
|
children: e
|
|
233
233
|
}
|
|
234
|
-
),
|
|
234
|
+
), Gn = ({ children: e }) => /* @__PURE__ */ l("div", { className: "p-navigation__logo-tag", children: e }), Vn = ({ children: e }) => /* @__PURE__ */ l("span", { className: "p-panel__logo-text", children: e }), Jn = ({
|
|
235
235
|
children: e,
|
|
236
|
-
className:
|
|
237
|
-
onClick:
|
|
238
|
-
}) => /* @__PURE__ */
|
|
239
|
-
|
|
236
|
+
className: r,
|
|
237
|
+
onClick: n
|
|
238
|
+
}) => /* @__PURE__ */ l(
|
|
239
|
+
_e,
|
|
240
240
|
{
|
|
241
241
|
appearance: "base",
|
|
242
|
-
className:
|
|
242
|
+
className: z(
|
|
243
243
|
"p-side-navigation__button--menu has-icon is-dark",
|
|
244
|
-
|
|
244
|
+
r
|
|
245
245
|
),
|
|
246
|
-
onClick: (
|
|
247
|
-
|
|
246
|
+
onClick: (t) => {
|
|
247
|
+
n && n(t), t.stopPropagation(), t.currentTarget.blur();
|
|
248
248
|
},
|
|
249
249
|
children: e
|
|
250
250
|
}
|
|
251
|
-
),
|
|
252
|
-
const
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
const
|
|
273
|
-
const
|
|
274
|
-
return /* @__PURE__ */
|
|
251
|
+
), Xn = ({ children: e }) => /* @__PURE__ */ l("span", { className: "p-side-navigation__text", children: e });
|
|
252
|
+
const Y = ({ children: e, className: r, isCollapsed: n }) => /* @__PURE__ */ l("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__ */ l("header", { "aria-label": "navigation", className: "l-navigation-bar", children: /* @__PURE__ */ l("div", { className: z("p-panel is-dark", r), children: e }) });
|
|
253
|
+
Y.Header = Ln;
|
|
254
|
+
Y.Banner = In;
|
|
255
|
+
Y.Drawer = $n;
|
|
256
|
+
Y.Controls = Nn;
|
|
257
|
+
Y.CollapseToggle = jn;
|
|
258
|
+
Y.Content = kn;
|
|
259
|
+
Y.Footer = Mn;
|
|
260
|
+
Y.List = qn;
|
|
261
|
+
Y.Item = Bn;
|
|
262
|
+
Y.Link = Yn;
|
|
263
|
+
Y.Text = Xn;
|
|
264
|
+
Y.Icon = zn;
|
|
265
|
+
Y.Label = Wn;
|
|
266
|
+
Y.Logo = Hn;
|
|
267
|
+
Y.LogoTag = Gn;
|
|
268
|
+
Y.LogoIcon = Kn;
|
|
269
|
+
Y.LogoName = Un;
|
|
270
|
+
Y.LogoText = Vn;
|
|
271
|
+
Zn.MenuButton = Jn;
|
|
272
|
+
const lr = mn(null), Yr = ({ children: e }) => {
|
|
273
|
+
const r = rr();
|
|
274
|
+
return /* @__PURE__ */ l(lr.Provider, { value: r, children: /* @__PURE__ */ l(
|
|
275
275
|
"div",
|
|
276
276
|
{
|
|
277
277
|
role: "group",
|
|
278
|
-
"aria-labelledby": `${
|
|
279
|
-
"aria-describedby": `${
|
|
278
|
+
"aria-labelledby": `${r}_label`,
|
|
279
|
+
"aria-describedby": `${r}_description`,
|
|
280
280
|
className: "p-input-group",
|
|
281
281
|
children: e
|
|
282
282
|
}
|
|
283
283
|
) });
|
|
284
|
-
},
|
|
285
|
-
const
|
|
286
|
-
return /* @__PURE__ */
|
|
287
|
-
},
|
|
288
|
-
const
|
|
289
|
-
return /* @__PURE__ */
|
|
284
|
+
}, Qn = ({ children: e }) => {
|
|
285
|
+
const r = Mr(lr);
|
|
286
|
+
return /* @__PURE__ */ l("label", { id: `${r}_label`, children: e });
|
|
287
|
+
}, et = ({ children: e }) => {
|
|
288
|
+
const r = Mr(lr);
|
|
289
|
+
return /* @__PURE__ */ l("p", { className: "p-form-help-text", id: `${r}_description`, children: e });
|
|
290
290
|
};
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
const
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
function
|
|
298
|
-
const [
|
|
291
|
+
Yr.Label = Qn;
|
|
292
|
+
Yr.Description = et;
|
|
293
|
+
const ur = ({ children: e }) => /* @__PURE__ */ l("div", { className: "p-form-section", children: e }), rt = ({ children: e }) => /* @__PURE__ */ l("h5", { className: "p-form-section__title u-no-padding--top", children: e }), nt = ({ children: e }) => /* @__PURE__ */ l("p", { className: "p-form-help-text", children: e }), tt = ({ children: e }) => /* @__PURE__ */ l("div", { className: "p-form-section__content", children: e });
|
|
294
|
+
ur.Title = rt;
|
|
295
|
+
ur.Description = nt;
|
|
296
|
+
ur.Content = tt;
|
|
297
|
+
function ot(e) {
|
|
298
|
+
const [r, n] = Q.useState(null), t = Q.useRef(null), i = Q.useCallback(() => {
|
|
299
299
|
if (e.current) {
|
|
300
|
-
const
|
|
301
|
-
o
|
|
300
|
+
const o = e.current.getBoundingClientRect();
|
|
301
|
+
n(o);
|
|
302
302
|
}
|
|
303
303
|
}, [e]);
|
|
304
|
-
return
|
|
305
|
-
const
|
|
306
|
-
|
|
304
|
+
return Q.useEffect(() => {
|
|
305
|
+
const o = new ResizeObserver(() => {
|
|
306
|
+
t.current && cancelAnimationFrame(t.current), t.current = requestAnimationFrame(i);
|
|
307
307
|
});
|
|
308
|
-
return e.current &&
|
|
309
|
-
|
|
308
|
+
return e.current && o.observe(e.current), () => {
|
|
309
|
+
t.current && cancelAnimationFrame(t.current), o.disconnect();
|
|
310
310
|
};
|
|
311
|
-
}, [e,
|
|
311
|
+
}, [e, i]), r;
|
|
312
312
|
}
|
|
313
|
-
const
|
|
314
|
-
}]),
|
|
315
|
-
const
|
|
316
|
-
return /* @__PURE__ */
|
|
313
|
+
const qr = Q.createContext(null), Hr = Q.createContext([!1, () => {
|
|
314
|
+
}]), Kr = ({ children: e }) => {
|
|
315
|
+
const r = Q.useRef(null), n = ot(r), [t, i] = Q.useState(!1);
|
|
316
|
+
return /* @__PURE__ */ l(
|
|
317
317
|
"header",
|
|
318
318
|
{
|
|
319
|
-
className:
|
|
320
|
-
"main-toolbar--stacked":
|
|
319
|
+
className: z("main-toolbar", {
|
|
320
|
+
"main-toolbar--stacked": t
|
|
321
321
|
}),
|
|
322
|
-
ref:
|
|
323
|
-
children: /* @__PURE__ */
|
|
322
|
+
ref: r,
|
|
323
|
+
children: /* @__PURE__ */ l(qr.Provider, { value: n, children: /* @__PURE__ */ l(Hr.Provider, { value: [t, i], children: e }) })
|
|
324
324
|
}
|
|
325
325
|
);
|
|
326
|
-
},
|
|
326
|
+
}, it = ({
|
|
327
327
|
as: e,
|
|
328
|
-
children:
|
|
329
|
-
className:
|
|
330
|
-
...
|
|
331
|
-
}) => /* @__PURE__ */
|
|
328
|
+
children: r,
|
|
329
|
+
className: n,
|
|
330
|
+
...t
|
|
331
|
+
}) => /* @__PURE__ */ l(
|
|
332
332
|
e || "h1",
|
|
333
333
|
{
|
|
334
|
-
className:
|
|
334
|
+
className: z("main-toolbar__title p-heading--4", n),
|
|
335
335
|
"data-testid": "main-toolbar-heading",
|
|
336
|
-
...
|
|
337
|
-
children:
|
|
338
|
-
}
|
|
339
|
-
),
|
|
340
|
-
const
|
|
341
|
-
return
|
|
342
|
-
!
|
|
343
|
-
}, [
|
|
344
|
-
/* @__PURE__ */
|
|
336
|
+
...t,
|
|
337
|
+
children: r
|
|
338
|
+
}
|
|
339
|
+
), at = ({ children: e }) => {
|
|
340
|
+
const r = Q.useContext(qr), [n, t] = Q.useContext(Hr), i = Q.useRef(null);
|
|
341
|
+
return Q.useEffect(() => {
|
|
342
|
+
!i.current || !r || t(i.current.getBoundingClientRect().width > r.width);
|
|
343
|
+
}, [t, r, i]), /* @__PURE__ */ ae(Me, { children: [
|
|
344
|
+
/* @__PURE__ */ l(
|
|
345
345
|
"div",
|
|
346
346
|
{
|
|
347
347
|
"aria-hidden": "true",
|
|
348
348
|
className: "main-toolbar__controls main-toolbar__controls--observer",
|
|
349
|
-
ref:
|
|
349
|
+
ref: i,
|
|
350
350
|
style: { visibility: "hidden", position: "absolute" },
|
|
351
351
|
children: e
|
|
352
352
|
}
|
|
353
353
|
),
|
|
354
|
-
/* @__PURE__ */
|
|
354
|
+
/* @__PURE__ */ l(
|
|
355
355
|
"div",
|
|
356
356
|
{
|
|
357
|
-
className:
|
|
358
|
-
"main-toolbar__controls--stacked":
|
|
357
|
+
className: z("main-toolbar__controls", {
|
|
358
|
+
"main-toolbar__controls--stacked": n
|
|
359
359
|
}),
|
|
360
360
|
children: e
|
|
361
361
|
}
|
|
362
362
|
)
|
|
363
363
|
] });
|
|
364
364
|
};
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
const
|
|
365
|
+
Kr.Title = it;
|
|
366
|
+
Kr.Controls = at;
|
|
367
|
+
const Le = ({
|
|
368
368
|
children: e,
|
|
369
|
-
className:
|
|
370
|
-
as:
|
|
371
|
-
variant:
|
|
372
|
-
...
|
|
369
|
+
className: r,
|
|
370
|
+
as: n,
|
|
371
|
+
variant: t = "wide",
|
|
372
|
+
...i
|
|
373
373
|
}) => {
|
|
374
|
-
const
|
|
375
|
-
return /* @__PURE__ */
|
|
376
|
-
},
|
|
377
|
-
|
|
374
|
+
const o = n || "section", s = z("content-section", r);
|
|
375
|
+
return /* @__PURE__ */ l(o, { ...i, className: s, children: /* @__PURE__ */ l(wn, { children: /* @__PURE__ */ l(Tn, { size: t === "narrow" ? 6 : 12, children: e }) }) });
|
|
376
|
+
}, st = ({ children: e, className: r, as: n, ...t }) => /* @__PURE__ */ l(
|
|
377
|
+
n || "h1",
|
|
378
|
+
{
|
|
379
|
+
...t,
|
|
380
|
+
className: z("content-section__title p-heading--4", r),
|
|
381
|
+
children: e
|
|
382
|
+
}
|
|
383
|
+
), ct = ({ children: e, className: r }) => /* @__PURE__ */ l("header", { className: z("content-section__header", r), children: e }), lt = ({ children: e, className: r }) => /* @__PURE__ */ l("div", { className: z("content-section__body", r), children: e }), ut = ({ children: e, className: r }) => /* @__PURE__ */ l("footer", { className: z("content-section__footer", r), children: e });
|
|
384
|
+
Le.Title = st;
|
|
385
|
+
Le.Header = ct;
|
|
386
|
+
Le.Content = lt;
|
|
387
|
+
Le.Footer = ut;
|
|
388
|
+
const Ur = ({
|
|
389
|
+
children: e,
|
|
390
|
+
className: r,
|
|
391
|
+
isVisible: n
|
|
392
|
+
}) => /* @__PURE__ */ l(
|
|
393
|
+
"div",
|
|
378
394
|
{
|
|
379
|
-
|
|
380
|
-
|
|
395
|
+
className: z("fade-in--down", r),
|
|
396
|
+
"aria-hidden": n ? "false" : "true",
|
|
397
|
+
style: { visibility: n ? "visible" : "hidden" },
|
|
381
398
|
children: e
|
|
382
399
|
}
|
|
383
|
-
),
|
|
384
|
-
$.Title = Me;
|
|
385
|
-
$.Header = Re;
|
|
386
|
-
$.Content = Ee;
|
|
387
|
-
$.Footer = Ae;
|
|
388
|
-
const qe = ({
|
|
400
|
+
), Eo = ({
|
|
389
401
|
children: e,
|
|
390
|
-
...
|
|
391
|
-
}) => /* @__PURE__ */
|
|
392
|
-
const
|
|
402
|
+
...r
|
|
403
|
+
}) => /* @__PURE__ */ l(Ur, { isVisible: !r["aria-hidden"], children: /* @__PURE__ */ l("div", { className: "p-form__nested-group", ...r, children: e }) });
|
|
404
|
+
const ft = ({
|
|
393
405
|
currentPage: e,
|
|
394
|
-
error:
|
|
395
|
-
disabled:
|
|
396
|
-
onInputBlur:
|
|
397
|
-
onInputChange:
|
|
398
|
-
onNextClick:
|
|
399
|
-
onPreviousClick:
|
|
400
|
-
totalPages:
|
|
401
|
-
}) => /* @__PURE__ */
|
|
402
|
-
/* @__PURE__ */
|
|
403
|
-
|
|
406
|
+
error: r,
|
|
407
|
+
disabled: n,
|
|
408
|
+
onInputBlur: t,
|
|
409
|
+
onInputChange: i,
|
|
410
|
+
onNextClick: o,
|
|
411
|
+
onPreviousClick: s,
|
|
412
|
+
totalPages: a
|
|
413
|
+
}) => /* @__PURE__ */ l("nav", { "aria-label": "pagination", className: "p-pagination", children: /* @__PURE__ */ ae("span", { className: "p-pagination--items", children: [
|
|
414
|
+
/* @__PURE__ */ l(
|
|
415
|
+
_e,
|
|
404
416
|
{
|
|
405
417
|
"aria-label": "Previous page",
|
|
406
418
|
className: "p-pagination__link--previous",
|
|
407
|
-
disabled: e === 1 ||
|
|
408
|
-
onClick:
|
|
419
|
+
disabled: e === 1 || n,
|
|
420
|
+
onClick: s,
|
|
409
421
|
type: "button",
|
|
410
|
-
children: /* @__PURE__ */
|
|
422
|
+
children: /* @__PURE__ */ l(je, { name: "chevron-down" })
|
|
411
423
|
}
|
|
412
424
|
),
|
|
413
|
-
/* @__PURE__ */
|
|
425
|
+
/* @__PURE__ */ l("strong", { children: "Page " }),
|
|
414
426
|
" ",
|
|
415
|
-
/* @__PURE__ */
|
|
416
|
-
|
|
427
|
+
/* @__PURE__ */ l(
|
|
428
|
+
Lr,
|
|
417
429
|
{
|
|
418
430
|
"aria-label": "page number",
|
|
419
431
|
className: "p-pagination__input",
|
|
420
|
-
disabled:
|
|
421
|
-
error:
|
|
432
|
+
disabled: n,
|
|
433
|
+
error: r,
|
|
422
434
|
min: 1,
|
|
423
|
-
onBlur:
|
|
424
|
-
onChange:
|
|
435
|
+
onBlur: t,
|
|
436
|
+
onChange: i,
|
|
425
437
|
required: !0,
|
|
426
438
|
type: "number",
|
|
427
439
|
value: e
|
|
428
440
|
}
|
|
429
441
|
),
|
|
430
442
|
" ",
|
|
431
|
-
/* @__PURE__ */
|
|
443
|
+
/* @__PURE__ */ ae("strong", { className: "u-no-wrap", children: [
|
|
432
444
|
" of ",
|
|
433
|
-
|
|
445
|
+
a
|
|
434
446
|
] }),
|
|
435
|
-
/* @__PURE__ */
|
|
436
|
-
|
|
447
|
+
/* @__PURE__ */ l(
|
|
448
|
+
_e,
|
|
437
449
|
{
|
|
438
450
|
"aria-label": "Next page",
|
|
439
451
|
className: "p-pagination__link--next",
|
|
440
|
-
disabled: e ===
|
|
441
|
-
onClick:
|
|
452
|
+
disabled: e === a || n,
|
|
453
|
+
onClick: o,
|
|
442
454
|
type: "button",
|
|
443
|
-
children: /* @__PURE__ */
|
|
455
|
+
children: /* @__PURE__ */ l(je, { name: "chevron-up" })
|
|
444
456
|
}
|
|
445
457
|
)
|
|
446
|
-
] }) }),
|
|
458
|
+
] }) }), wo = ({
|
|
447
459
|
currentPage: e,
|
|
448
|
-
disabled:
|
|
449
|
-
paginate:
|
|
450
|
-
totalPages:
|
|
460
|
+
disabled: r,
|
|
461
|
+
paginate: n,
|
|
462
|
+
totalPages: t
|
|
451
463
|
}) => {
|
|
452
|
-
const [
|
|
453
|
-
return /* @__PURE__ */
|
|
454
|
-
|
|
464
|
+
const [i, o] = be(e), [s, a] = be("");
|
|
465
|
+
return /* @__PURE__ */ l(
|
|
466
|
+
ft,
|
|
455
467
|
{
|
|
456
|
-
currentPage:
|
|
457
|
-
error:
|
|
458
|
-
disabled:
|
|
468
|
+
currentPage: i,
|
|
469
|
+
error: s,
|
|
470
|
+
disabled: r,
|
|
459
471
|
onInputBlur: () => {
|
|
460
|
-
|
|
472
|
+
o(e), a("");
|
|
461
473
|
},
|
|
462
|
-
onInputChange: (
|
|
463
|
-
const { value:
|
|
464
|
-
|
|
474
|
+
onInputChange: (E) => {
|
|
475
|
+
const { value: P, valueAsNumber: R } = E.target;
|
|
476
|
+
P ? (o(R), R > t || R < 1 ? a(`${R} is not a valid page number.`) : (a(""), n(R))) : a("Enter a page number.");
|
|
465
477
|
},
|
|
466
478
|
onNextClick: () => {
|
|
467
|
-
|
|
479
|
+
o((E) => Number(E) + 1), n(Number(e) + 1);
|
|
468
480
|
},
|
|
469
481
|
onPreviousClick: () => {
|
|
470
|
-
|
|
482
|
+
o((E) => Number(E) - 1), n(Number(e) - 1);
|
|
471
483
|
},
|
|
472
|
-
totalPages:
|
|
484
|
+
totalPages: t
|
|
473
485
|
}
|
|
474
486
|
);
|
|
475
487
|
};
|
|
476
|
-
const
|
|
477
|
-
const
|
|
478
|
-
return /* @__PURE__ */
|
|
488
|
+
const To = ({ activeStep: e, items: r }) => /* @__PURE__ */ l("ol", { className: "stepper", children: r.map((n, t) => {
|
|
489
|
+
const i = t === e, o = t < e;
|
|
490
|
+
return /* @__PURE__ */ l("li", { "aria-label": n, className: "stepper__item", children: /* @__PURE__ */ l(
|
|
479
491
|
"p",
|
|
480
492
|
{
|
|
481
|
-
"aria-label":
|
|
482
|
-
className:
|
|
483
|
-
"stepper__title--is-active":
|
|
484
|
-
"stepper__title--is-complete":
|
|
493
|
+
"aria-label": o ? `${n} (completed)` : n,
|
|
494
|
+
className: z("stepper__title", {
|
|
495
|
+
"stepper__title--is-active": i,
|
|
496
|
+
"stepper__title--is-complete": o
|
|
485
497
|
}),
|
|
486
|
-
children:
|
|
498
|
+
children: n
|
|
487
499
|
}
|
|
488
|
-
) },
|
|
500
|
+
) }, t);
|
|
489
501
|
}) });
|
|
502
|
+
var tr = { exports: {} }, Fe = { exports: {} }, F = {};
|
|
503
|
+
/** @license React v16.13.1
|
|
504
|
+
* react-is.production.min.js
|
|
505
|
+
*
|
|
506
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
507
|
+
*
|
|
508
|
+
* This source code is licensed under the MIT license found in the
|
|
509
|
+
* LICENSE file in the root directory of this source tree.
|
|
510
|
+
*/
|
|
511
|
+
var gr;
|
|
512
|
+
function pt() {
|
|
513
|
+
if (gr)
|
|
514
|
+
return F;
|
|
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, m = e ? Symbol.for("react.async_mode") : 60111, u = 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
|
+
function N(f) {
|
|
518
|
+
if (typeof f == "object" && f !== null) {
|
|
519
|
+
var G = f.$$typeof;
|
|
520
|
+
switch (G) {
|
|
521
|
+
case r:
|
|
522
|
+
switch (f = f.type, f) {
|
|
523
|
+
case m:
|
|
524
|
+
case u:
|
|
525
|
+
case t:
|
|
526
|
+
case o:
|
|
527
|
+
case i:
|
|
528
|
+
case g:
|
|
529
|
+
return f;
|
|
530
|
+
default:
|
|
531
|
+
switch (f = f && f.$$typeof, f) {
|
|
532
|
+
case a:
|
|
533
|
+
case y:
|
|
534
|
+
case R:
|
|
535
|
+
case P:
|
|
536
|
+
case s:
|
|
537
|
+
return f;
|
|
538
|
+
default:
|
|
539
|
+
return G;
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
case n:
|
|
543
|
+
return G;
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
function $(f) {
|
|
548
|
+
return N(f) === u;
|
|
549
|
+
}
|
|
550
|
+
return F.AsyncMode = m, F.ConcurrentMode = u, 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) === m;
|
|
552
|
+
}, F.isConcurrentMode = $, F.isContextConsumer = function(f) {
|
|
553
|
+
return N(f) === a;
|
|
554
|
+
}, F.isContextProvider = function(f) {
|
|
555
|
+
return N(f) === s;
|
|
556
|
+
}, F.isElement = function(f) {
|
|
557
|
+
return typeof f == "object" && f !== null && f.$$typeof === r;
|
|
558
|
+
}, F.isForwardRef = function(f) {
|
|
559
|
+
return N(f) === y;
|
|
560
|
+
}, F.isFragment = function(f) {
|
|
561
|
+
return N(f) === t;
|
|
562
|
+
}, F.isLazy = function(f) {
|
|
563
|
+
return N(f) === R;
|
|
564
|
+
}, F.isMemo = function(f) {
|
|
565
|
+
return N(f) === P;
|
|
566
|
+
}, F.isPortal = function(f) {
|
|
567
|
+
return N(f) === n;
|
|
568
|
+
}, F.isProfiler = function(f) {
|
|
569
|
+
return N(f) === o;
|
|
570
|
+
}, F.isStrictMode = function(f) {
|
|
571
|
+
return N(f) === i;
|
|
572
|
+
}, F.isSuspense = function(f) {
|
|
573
|
+
return N(f) === g;
|
|
574
|
+
}, F.isValidElementType = function(f) {
|
|
575
|
+
return typeof f == "string" || typeof f == "function" || f === t || f === u || 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
|
+
}, F.typeOf = N, F;
|
|
577
|
+
}
|
|
578
|
+
var I = {};
|
|
579
|
+
/** @license React v16.13.1
|
|
580
|
+
* react-is.development.js
|
|
581
|
+
*
|
|
582
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
583
|
+
*
|
|
584
|
+
* This source code is licensed under the MIT license found in the
|
|
585
|
+
* LICENSE file in the root directory of this source tree.
|
|
586
|
+
*/
|
|
587
|
+
var br;
|
|
588
|
+
function dt() {
|
|
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, m = e ? Symbol.for("react.async_mode") : 60111, u = 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
|
+
function N(p) {
|
|
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 === u || 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
|
+
}
|
|
595
|
+
function $(p) {
|
|
596
|
+
if (typeof p == "object" && p !== null) {
|
|
597
|
+
var V = p.$$typeof;
|
|
598
|
+
switch (V) {
|
|
599
|
+
case r:
|
|
600
|
+
var pe = p.type;
|
|
601
|
+
switch (pe) {
|
|
602
|
+
case m:
|
|
603
|
+
case u:
|
|
604
|
+
case t:
|
|
605
|
+
case o:
|
|
606
|
+
case i:
|
|
607
|
+
case g:
|
|
608
|
+
return pe;
|
|
609
|
+
default:
|
|
610
|
+
var Te = pe && pe.$$typeof;
|
|
611
|
+
switch (Te) {
|
|
612
|
+
case a:
|
|
613
|
+
case y:
|
|
614
|
+
case R:
|
|
615
|
+
case P:
|
|
616
|
+
case s:
|
|
617
|
+
return Te;
|
|
618
|
+
default:
|
|
619
|
+
return V;
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
case n:
|
|
623
|
+
return V;
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
var f = m, G = u, 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
|
+
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) === m;
|
|
630
|
+
}
|
|
631
|
+
function c(p) {
|
|
632
|
+
return $(p) === u;
|
|
633
|
+
}
|
|
634
|
+
function v(p) {
|
|
635
|
+
return $(p) === a;
|
|
636
|
+
}
|
|
637
|
+
function w(p) {
|
|
638
|
+
return $(p) === s;
|
|
639
|
+
}
|
|
640
|
+
function T(p) {
|
|
641
|
+
return typeof p == "object" && p !== null && p.$$typeof === r;
|
|
642
|
+
}
|
|
643
|
+
function h(p) {
|
|
644
|
+
return $(p) === y;
|
|
645
|
+
}
|
|
646
|
+
function x(p) {
|
|
647
|
+
return $(p) === t;
|
|
648
|
+
}
|
|
649
|
+
function _(p) {
|
|
650
|
+
return $(p) === R;
|
|
651
|
+
}
|
|
652
|
+
function O(p) {
|
|
653
|
+
return $(p) === P;
|
|
654
|
+
}
|
|
655
|
+
function S(p) {
|
|
656
|
+
return $(p) === n;
|
|
657
|
+
}
|
|
658
|
+
function A(p) {
|
|
659
|
+
return $(p) === o;
|
|
660
|
+
}
|
|
661
|
+
function C(p) {
|
|
662
|
+
return $(p) === i;
|
|
663
|
+
}
|
|
664
|
+
function W(p) {
|
|
665
|
+
return $(p) === g;
|
|
666
|
+
}
|
|
667
|
+
I.AsyncMode = f, I.ConcurrentMode = G, I.ContextConsumer = ee, I.ContextProvider = le, I.Element = oe, I.ForwardRef = ie, I.Fragment = ue, I.Lazy = fe, I.Memo = se, I.Portal = L, I.Profiler = U, I.StrictMode = Z, I.Suspense = ne, I.isAsyncMode = H, I.isConcurrentMode = c, I.isContextConsumer = v, I.isContextProvider = w, I.isElement = T, I.isForwardRef = h, I.isFragment = x, I.isLazy = _, I.isMemo = O, I.isPortal = S, I.isProfiler = A, I.isStrictMode = C, I.isSuspense = W, I.isValidElementType = N, I.typeOf = $;
|
|
668
|
+
}()), I;
|
|
669
|
+
}
|
|
670
|
+
var hr;
|
|
671
|
+
function Gr() {
|
|
672
|
+
return hr || (hr = 1, process.env.NODE_ENV === "production" ? Fe.exports = pt() : Fe.exports = dt()), Fe.exports;
|
|
673
|
+
}
|
|
674
|
+
/*
|
|
675
|
+
object-assign
|
|
676
|
+
(c) Sindre Sorhus
|
|
677
|
+
@license MIT
|
|
678
|
+
*/
|
|
679
|
+
var Ge, _r;
|
|
680
|
+
function mt() {
|
|
681
|
+
if (_r)
|
|
682
|
+
return Ge;
|
|
683
|
+
_r = 1;
|
|
684
|
+
var e = Object.getOwnPropertySymbols, r = Object.prototype.hasOwnProperty, n = Object.prototype.propertyIsEnumerable;
|
|
685
|
+
function t(o) {
|
|
686
|
+
if (o == null)
|
|
687
|
+
throw new TypeError("Object.assign cannot be called with null or undefined");
|
|
688
|
+
return Object(o);
|
|
689
|
+
}
|
|
690
|
+
function i() {
|
|
691
|
+
try {
|
|
692
|
+
if (!Object.assign)
|
|
693
|
+
return !1;
|
|
694
|
+
var o = new String("abc");
|
|
695
|
+
if (o[5] = "de", Object.getOwnPropertyNames(o)[0] === "5")
|
|
696
|
+
return !1;
|
|
697
|
+
for (var s = {}, a = 0; a < 10; a++)
|
|
698
|
+
s["_" + String.fromCharCode(a)] = a;
|
|
699
|
+
var m = Object.getOwnPropertyNames(s).map(function(y) {
|
|
700
|
+
return s[y];
|
|
701
|
+
});
|
|
702
|
+
if (m.join("") !== "0123456789")
|
|
703
|
+
return !1;
|
|
704
|
+
var u = {};
|
|
705
|
+
return "abcdefghijklmnopqrst".split("").forEach(function(y) {
|
|
706
|
+
u[y] = y;
|
|
707
|
+
}), Object.keys(Object.assign({}, u)).join("") === "abcdefghijklmnopqrst";
|
|
708
|
+
} catch {
|
|
709
|
+
return !1;
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
return Ge = i() ? Object.assign : function(o, s) {
|
|
713
|
+
for (var a, m = t(o), u, y = 1; y < arguments.length; y++) {
|
|
714
|
+
a = Object(arguments[y]);
|
|
715
|
+
for (var g in a)
|
|
716
|
+
r.call(a, g) && (m[g] = a[g]);
|
|
717
|
+
if (e) {
|
|
718
|
+
u = e(a);
|
|
719
|
+
for (var E = 0; E < u.length; E++)
|
|
720
|
+
n.call(a, u[E]) && (m[u[E]] = a[u[E]]);
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
return m;
|
|
724
|
+
}, Ge;
|
|
725
|
+
}
|
|
726
|
+
var Ve, Er;
|
|
727
|
+
function fr() {
|
|
728
|
+
if (Er)
|
|
729
|
+
return Ve;
|
|
730
|
+
Er = 1;
|
|
731
|
+
var e = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
732
|
+
return Ve = e, Ve;
|
|
733
|
+
}
|
|
734
|
+
var Je, wr;
|
|
735
|
+
function Vr() {
|
|
736
|
+
return wr || (wr = 1, Je = Function.call.bind(Object.prototype.hasOwnProperty)), Je;
|
|
737
|
+
}
|
|
738
|
+
var Xe, Tr;
|
|
739
|
+
function vt() {
|
|
740
|
+
if (Tr)
|
|
741
|
+
return Xe;
|
|
742
|
+
Tr = 1;
|
|
743
|
+
var e = function() {
|
|
744
|
+
};
|
|
745
|
+
if (process.env.NODE_ENV !== "production") {
|
|
746
|
+
var r = fr(), n = {}, t = Vr();
|
|
747
|
+
e = function(o) {
|
|
748
|
+
var s = "Warning: " + o;
|
|
749
|
+
typeof console < "u" && console.error(s);
|
|
750
|
+
try {
|
|
751
|
+
throw new Error(s);
|
|
752
|
+
} catch {
|
|
753
|
+
}
|
|
754
|
+
};
|
|
755
|
+
}
|
|
756
|
+
function i(o, s, a, m, u) {
|
|
757
|
+
if (process.env.NODE_ENV !== "production") {
|
|
758
|
+
for (var y in o)
|
|
759
|
+
if (t(o, y)) {
|
|
760
|
+
var g;
|
|
761
|
+
try {
|
|
762
|
+
if (typeof o[y] != "function") {
|
|
763
|
+
var E = Error(
|
|
764
|
+
(m || "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
|
+
);
|
|
766
|
+
throw E.name = "Invariant Violation", E;
|
|
767
|
+
}
|
|
768
|
+
g = o[y](s, y, m, a, null, r);
|
|
769
|
+
} catch (R) {
|
|
770
|
+
g = R;
|
|
771
|
+
}
|
|
772
|
+
if (g && !(g instanceof Error) && e(
|
|
773
|
+
(m || "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
|
+
), g instanceof Error && !(g.message in n)) {
|
|
775
|
+
n[g.message] = !0;
|
|
776
|
+
var P = u ? u() : "";
|
|
777
|
+
e(
|
|
778
|
+
"Failed " + a + " type: " + g.message + (P ?? "")
|
|
779
|
+
);
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
return i.resetWarningCache = function() {
|
|
785
|
+
process.env.NODE_ENV !== "production" && (n = {});
|
|
786
|
+
}, Xe = i, Xe;
|
|
787
|
+
}
|
|
788
|
+
var Ze, Or;
|
|
789
|
+
function yt() {
|
|
790
|
+
if (Or)
|
|
791
|
+
return Ze;
|
|
792
|
+
Or = 1;
|
|
793
|
+
var e = Gr(), r = mt(), n = fr(), t = Vr(), i = vt(), o = function() {
|
|
794
|
+
};
|
|
795
|
+
process.env.NODE_ENV !== "production" && (o = function(a) {
|
|
796
|
+
var m = "Warning: " + a;
|
|
797
|
+
typeof console < "u" && console.error(m);
|
|
798
|
+
try {
|
|
799
|
+
throw new Error(m);
|
|
800
|
+
} catch {
|
|
801
|
+
}
|
|
802
|
+
});
|
|
803
|
+
function s() {
|
|
804
|
+
return null;
|
|
805
|
+
}
|
|
806
|
+
return Ze = function(a, m) {
|
|
807
|
+
var u = typeof Symbol == "function" && Symbol.iterator, y = "@@iterator";
|
|
808
|
+
function g(c) {
|
|
809
|
+
var v = c && (u && c[u] || c[y]);
|
|
810
|
+
if (typeof v == "function")
|
|
811
|
+
return v;
|
|
812
|
+
}
|
|
813
|
+
var E = "<<anonymous>>", P = {
|
|
814
|
+
array: q("array"),
|
|
815
|
+
bigint: q("bigint"),
|
|
816
|
+
bool: q("boolean"),
|
|
817
|
+
func: q("function"),
|
|
818
|
+
number: q("number"),
|
|
819
|
+
object: q("object"),
|
|
820
|
+
string: q("string"),
|
|
821
|
+
symbol: q("symbol"),
|
|
822
|
+
any: re(),
|
|
823
|
+
arrayOf: N,
|
|
824
|
+
element: $(),
|
|
825
|
+
elementType: f(),
|
|
826
|
+
instanceOf: G,
|
|
827
|
+
node: ie(),
|
|
828
|
+
objectOf: le,
|
|
829
|
+
oneOf: ee,
|
|
830
|
+
oneOfType: oe,
|
|
831
|
+
shape: fe,
|
|
832
|
+
exact: se
|
|
833
|
+
};
|
|
834
|
+
function R(c, v) {
|
|
835
|
+
return c === v ? c !== 0 || 1 / c === 1 / v : c !== c && v !== v;
|
|
836
|
+
}
|
|
837
|
+
function D(c, v) {
|
|
838
|
+
this.message = c, this.data = v && typeof v == "object" ? v : {}, this.stack = "";
|
|
839
|
+
}
|
|
840
|
+
D.prototype = Error.prototype;
|
|
841
|
+
function k(c) {
|
|
842
|
+
if (process.env.NODE_ENV !== "production")
|
|
843
|
+
var v = {}, w = 0;
|
|
844
|
+
function T(x, _, O, S, A, C, W) {
|
|
845
|
+
if (S = S || E, C = C || O, W !== n) {
|
|
846
|
+
if (m) {
|
|
847
|
+
var p = new Error(
|
|
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
|
+
);
|
|
850
|
+
throw p.name = "Invariant Violation", p;
|
|
851
|
+
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
852
|
+
var V = S + ":" + O;
|
|
853
|
+
!v[V] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
854
|
+
w < 3 && (o(
|
|
855
|
+
"You are manually calling a React.PropTypes validation function for the `" + C + "` prop on `" + S + "`. 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."
|
|
856
|
+
), v[V] = !0, w++);
|
|
857
|
+
}
|
|
858
|
+
}
|
|
859
|
+
return _[O] == null ? x ? _[O] === null ? new D("The " + A + " `" + C + "` is marked as required " + ("in `" + S + "`, but its value is `null`.")) : new D("The " + A + " `" + C + "` is marked as required in " + ("`" + S + "`, but its value is `undefined`.")) : null : c(_, O, S, A, C);
|
|
860
|
+
}
|
|
861
|
+
var h = T.bind(null, !1);
|
|
862
|
+
return h.isRequired = T.bind(null, !0), h;
|
|
863
|
+
}
|
|
864
|
+
function q(c) {
|
|
865
|
+
function v(w, T, h, x, _, O) {
|
|
866
|
+
var S = w[T], A = Z(S);
|
|
867
|
+
if (A !== c) {
|
|
868
|
+
var C = ne(S);
|
|
869
|
+
return new D(
|
|
870
|
+
"Invalid " + x + " `" + _ + "` of type " + ("`" + C + "` supplied to `" + h + "`, expected ") + ("`" + c + "`."),
|
|
871
|
+
{ expectedType: c }
|
|
872
|
+
);
|
|
873
|
+
}
|
|
874
|
+
return null;
|
|
875
|
+
}
|
|
876
|
+
return k(v);
|
|
877
|
+
}
|
|
878
|
+
function re() {
|
|
879
|
+
return k(s);
|
|
880
|
+
}
|
|
881
|
+
function N(c) {
|
|
882
|
+
function v(w, T, h, x, _) {
|
|
883
|
+
if (typeof c != "function")
|
|
884
|
+
return new D("Property `" + _ + "` of component `" + h + "` has invalid PropType notation inside arrayOf.");
|
|
885
|
+
var O = w[T];
|
|
886
|
+
if (!Array.isArray(O)) {
|
|
887
|
+
var S = Z(O);
|
|
888
|
+
return new D("Invalid " + x + " `" + _ + "` of type " + ("`" + S + "` supplied to `" + h + "`, expected an array."));
|
|
889
|
+
}
|
|
890
|
+
for (var A = 0; A < O.length; A++) {
|
|
891
|
+
var C = c(O, A, h, x, _ + "[" + A + "]", n);
|
|
892
|
+
if (C instanceof Error)
|
|
893
|
+
return C;
|
|
894
|
+
}
|
|
895
|
+
return null;
|
|
896
|
+
}
|
|
897
|
+
return k(v);
|
|
898
|
+
}
|
|
899
|
+
function $() {
|
|
900
|
+
function c(v, w, T, h, x) {
|
|
901
|
+
var _ = v[w];
|
|
902
|
+
if (!a(_)) {
|
|
903
|
+
var O = Z(_);
|
|
904
|
+
return new D("Invalid " + h + " `" + x + "` of type " + ("`" + O + "` supplied to `" + T + "`, expected a single ReactElement."));
|
|
905
|
+
}
|
|
906
|
+
return null;
|
|
907
|
+
}
|
|
908
|
+
return k(c);
|
|
909
|
+
}
|
|
910
|
+
function f() {
|
|
911
|
+
function c(v, w, T, h, x) {
|
|
912
|
+
var _ = v[w];
|
|
913
|
+
if (!e.isValidElementType(_)) {
|
|
914
|
+
var O = Z(_);
|
|
915
|
+
return new D("Invalid " + h + " `" + x + "` of type " + ("`" + O + "` supplied to `" + T + "`, expected a single ReactElement type."));
|
|
916
|
+
}
|
|
917
|
+
return null;
|
|
918
|
+
}
|
|
919
|
+
return k(c);
|
|
920
|
+
}
|
|
921
|
+
function G(c) {
|
|
922
|
+
function v(w, T, h, x, _) {
|
|
923
|
+
if (!(w[T] instanceof c)) {
|
|
924
|
+
var O = c.name || E, S = H(w[T]);
|
|
925
|
+
return new D("Invalid " + x + " `" + _ + "` of type " + ("`" + S + "` supplied to `" + h + "`, expected ") + ("instance of `" + O + "`."));
|
|
926
|
+
}
|
|
927
|
+
return null;
|
|
928
|
+
}
|
|
929
|
+
return k(v);
|
|
930
|
+
}
|
|
931
|
+
function ee(c) {
|
|
932
|
+
if (!Array.isArray(c))
|
|
933
|
+
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? o(
|
|
934
|
+
"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])."
|
|
935
|
+
) : o("Invalid argument supplied to oneOf, expected an array.")), s;
|
|
936
|
+
function v(w, T, h, x, _) {
|
|
937
|
+
for (var O = w[T], S = 0; S < c.length; S++)
|
|
938
|
+
if (R(O, c[S]))
|
|
939
|
+
return null;
|
|
940
|
+
var A = JSON.stringify(c, function(W, p) {
|
|
941
|
+
var V = ne(p);
|
|
942
|
+
return V === "symbol" ? String(p) : p;
|
|
943
|
+
});
|
|
944
|
+
return new D("Invalid " + x + " `" + _ + "` of value `" + String(O) + "` " + ("supplied to `" + h + "`, expected one of " + A + "."));
|
|
945
|
+
}
|
|
946
|
+
return k(v);
|
|
947
|
+
}
|
|
948
|
+
function le(c) {
|
|
949
|
+
function v(w, T, h, x, _) {
|
|
950
|
+
if (typeof c != "function")
|
|
951
|
+
return new D("Property `" + _ + "` of component `" + h + "` has invalid PropType notation inside objectOf.");
|
|
952
|
+
var O = w[T], S = Z(O);
|
|
953
|
+
if (S !== "object")
|
|
954
|
+
return new D("Invalid " + x + " `" + _ + "` of type " + ("`" + S + "` supplied to `" + h + "`, expected an object."));
|
|
955
|
+
for (var A in O)
|
|
956
|
+
if (t(O, A)) {
|
|
957
|
+
var C = c(O, A, h, x, _ + "." + A, n);
|
|
958
|
+
if (C instanceof Error)
|
|
959
|
+
return C;
|
|
960
|
+
}
|
|
961
|
+
return null;
|
|
962
|
+
}
|
|
963
|
+
return k(v);
|
|
964
|
+
}
|
|
965
|
+
function oe(c) {
|
|
966
|
+
if (!Array.isArray(c))
|
|
967
|
+
return process.env.NODE_ENV !== "production" && o("Invalid argument supplied to oneOfType, expected an instance of array."), s;
|
|
968
|
+
for (var v = 0; v < c.length; v++) {
|
|
969
|
+
var w = c[v];
|
|
970
|
+
if (typeof w != "function")
|
|
971
|
+
return o(
|
|
972
|
+
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + ce(w) + " at index " + v + "."
|
|
973
|
+
), s;
|
|
974
|
+
}
|
|
975
|
+
function T(h, x, _, O, S) {
|
|
976
|
+
for (var A = [], C = 0; C < c.length; C++) {
|
|
977
|
+
var W = c[C], p = W(h, x, _, O, S, n);
|
|
978
|
+
if (p == null)
|
|
979
|
+
return null;
|
|
980
|
+
p.data && t(p.data, "expectedType") && A.push(p.data.expectedType);
|
|
981
|
+
}
|
|
982
|
+
var V = A.length > 0 ? ", expected one of type [" + A.join(", ") + "]" : "";
|
|
983
|
+
return new D("Invalid " + O + " `" + S + "` supplied to " + ("`" + _ + "`" + V + "."));
|
|
984
|
+
}
|
|
985
|
+
return k(T);
|
|
986
|
+
}
|
|
987
|
+
function ie() {
|
|
988
|
+
function c(v, w, T, h, x) {
|
|
989
|
+
return L(v[w]) ? null : new D("Invalid " + h + " `" + x + "` supplied to " + ("`" + T + "`, expected a ReactNode."));
|
|
990
|
+
}
|
|
991
|
+
return k(c);
|
|
992
|
+
}
|
|
993
|
+
function ue(c, v, w, T, h) {
|
|
994
|
+
return new D(
|
|
995
|
+
(c || "React class") + ": " + v + " type `" + w + "." + T + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + h + "`."
|
|
996
|
+
);
|
|
997
|
+
}
|
|
998
|
+
function fe(c) {
|
|
999
|
+
function v(w, T, h, x, _) {
|
|
1000
|
+
var O = w[T], S = Z(O);
|
|
1001
|
+
if (S !== "object")
|
|
1002
|
+
return new D("Invalid " + x + " `" + _ + "` of type `" + S + "` " + ("supplied to `" + h + "`, expected `object`."));
|
|
1003
|
+
for (var A in c) {
|
|
1004
|
+
var C = c[A];
|
|
1005
|
+
if (typeof C != "function")
|
|
1006
|
+
return ue(h, x, _, A, ne(C));
|
|
1007
|
+
var W = C(O, A, h, x, _ + "." + A, n);
|
|
1008
|
+
if (W)
|
|
1009
|
+
return W;
|
|
1010
|
+
}
|
|
1011
|
+
return null;
|
|
1012
|
+
}
|
|
1013
|
+
return k(v);
|
|
1014
|
+
}
|
|
1015
|
+
function se(c) {
|
|
1016
|
+
function v(w, T, h, x, _) {
|
|
1017
|
+
var O = w[T], S = Z(O);
|
|
1018
|
+
if (S !== "object")
|
|
1019
|
+
return new D("Invalid " + x + " `" + _ + "` of type `" + S + "` " + ("supplied to `" + h + "`, expected `object`."));
|
|
1020
|
+
var A = r({}, w[T], c);
|
|
1021
|
+
for (var C in A) {
|
|
1022
|
+
var W = c[C];
|
|
1023
|
+
if (t(c, C) && typeof W != "function")
|
|
1024
|
+
return ue(h, x, _, C, ne(W));
|
|
1025
|
+
if (!W)
|
|
1026
|
+
return new D(
|
|
1027
|
+
"Invalid " + x + " `" + _ + "` key `" + C + "` supplied to `" + h + "`.\nBad object: " + JSON.stringify(w[T], null, " ") + `
|
|
1028
|
+
Valid keys: ` + JSON.stringify(Object.keys(c), null, " ")
|
|
1029
|
+
);
|
|
1030
|
+
var p = W(O, C, h, x, _ + "." + C, n);
|
|
1031
|
+
if (p)
|
|
1032
|
+
return p;
|
|
1033
|
+
}
|
|
1034
|
+
return null;
|
|
1035
|
+
}
|
|
1036
|
+
return k(v);
|
|
1037
|
+
}
|
|
1038
|
+
function L(c) {
|
|
1039
|
+
switch (typeof c) {
|
|
1040
|
+
case "number":
|
|
1041
|
+
case "string":
|
|
1042
|
+
case "undefined":
|
|
1043
|
+
return !0;
|
|
1044
|
+
case "boolean":
|
|
1045
|
+
return !c;
|
|
1046
|
+
case "object":
|
|
1047
|
+
if (Array.isArray(c))
|
|
1048
|
+
return c.every(L);
|
|
1049
|
+
if (c === null || a(c))
|
|
1050
|
+
return !0;
|
|
1051
|
+
var v = g(c);
|
|
1052
|
+
if (v) {
|
|
1053
|
+
var w = v.call(c), T;
|
|
1054
|
+
if (v !== c.entries) {
|
|
1055
|
+
for (; !(T = w.next()).done; )
|
|
1056
|
+
if (!L(T.value))
|
|
1057
|
+
return !1;
|
|
1058
|
+
} else
|
|
1059
|
+
for (; !(T = w.next()).done; ) {
|
|
1060
|
+
var h = T.value;
|
|
1061
|
+
if (h && !L(h[1]))
|
|
1062
|
+
return !1;
|
|
1063
|
+
}
|
|
1064
|
+
} else
|
|
1065
|
+
return !1;
|
|
1066
|
+
return !0;
|
|
1067
|
+
default:
|
|
1068
|
+
return !1;
|
|
1069
|
+
}
|
|
1070
|
+
}
|
|
1071
|
+
function U(c, v) {
|
|
1072
|
+
return c === "symbol" ? !0 : v ? v["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && v instanceof Symbol : !1;
|
|
1073
|
+
}
|
|
1074
|
+
function Z(c) {
|
|
1075
|
+
var v = typeof c;
|
|
1076
|
+
return Array.isArray(c) ? "array" : c instanceof RegExp ? "object" : U(v, c) ? "symbol" : v;
|
|
1077
|
+
}
|
|
1078
|
+
function ne(c) {
|
|
1079
|
+
if (typeof c > "u" || c === null)
|
|
1080
|
+
return "" + c;
|
|
1081
|
+
var v = Z(c);
|
|
1082
|
+
if (v === "object") {
|
|
1083
|
+
if (c instanceof Date)
|
|
1084
|
+
return "date";
|
|
1085
|
+
if (c instanceof RegExp)
|
|
1086
|
+
return "regexp";
|
|
1087
|
+
}
|
|
1088
|
+
return v;
|
|
1089
|
+
}
|
|
1090
|
+
function ce(c) {
|
|
1091
|
+
var v = ne(c);
|
|
1092
|
+
switch (v) {
|
|
1093
|
+
case "array":
|
|
1094
|
+
case "object":
|
|
1095
|
+
return "an " + v;
|
|
1096
|
+
case "boolean":
|
|
1097
|
+
case "date":
|
|
1098
|
+
case "regexp":
|
|
1099
|
+
return "a " + v;
|
|
1100
|
+
default:
|
|
1101
|
+
return v;
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
1104
|
+
function H(c) {
|
|
1105
|
+
return !c.constructor || !c.constructor.name ? E : c.constructor.name;
|
|
1106
|
+
}
|
|
1107
|
+
return P.checkPropTypes = i, P.resetWarningCache = i.resetWarningCache, P.PropTypes = P, P;
|
|
1108
|
+
}, Ze;
|
|
1109
|
+
}
|
|
1110
|
+
var Qe, Cr;
|
|
1111
|
+
function gt() {
|
|
1112
|
+
if (Cr)
|
|
1113
|
+
return Qe;
|
|
1114
|
+
Cr = 1;
|
|
1115
|
+
var e = fr();
|
|
1116
|
+
function r() {
|
|
1117
|
+
}
|
|
1118
|
+
function n() {
|
|
1119
|
+
}
|
|
1120
|
+
return n.resetWarningCache = r, Qe = function() {
|
|
1121
|
+
function t(s, a, m, u, y, g) {
|
|
1122
|
+
if (g !== e) {
|
|
1123
|
+
var E = new Error(
|
|
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"
|
|
1125
|
+
);
|
|
1126
|
+
throw E.name = "Invariant Violation", E;
|
|
1127
|
+
}
|
|
1128
|
+
}
|
|
1129
|
+
t.isRequired = t;
|
|
1130
|
+
function i() {
|
|
1131
|
+
return t;
|
|
1132
|
+
}
|
|
1133
|
+
var o = {
|
|
1134
|
+
array: t,
|
|
1135
|
+
bigint: t,
|
|
1136
|
+
bool: t,
|
|
1137
|
+
func: t,
|
|
1138
|
+
number: t,
|
|
1139
|
+
object: t,
|
|
1140
|
+
string: t,
|
|
1141
|
+
symbol: t,
|
|
1142
|
+
any: t,
|
|
1143
|
+
arrayOf: i,
|
|
1144
|
+
element: t,
|
|
1145
|
+
elementType: t,
|
|
1146
|
+
instanceOf: i,
|
|
1147
|
+
node: t,
|
|
1148
|
+
objectOf: i,
|
|
1149
|
+
oneOf: i,
|
|
1150
|
+
oneOfType: i,
|
|
1151
|
+
shape: i,
|
|
1152
|
+
exact: i,
|
|
1153
|
+
checkPropTypes: n,
|
|
1154
|
+
resetWarningCache: r
|
|
1155
|
+
};
|
|
1156
|
+
return o.PropTypes = o, o;
|
|
1157
|
+
}, Qe;
|
|
1158
|
+
}
|
|
1159
|
+
if (process.env.NODE_ENV !== "production") {
|
|
1160
|
+
var bt = Gr(), ht = !0;
|
|
1161
|
+
tr.exports = yt()(bt.isElement, ht);
|
|
1162
|
+
} else
|
|
1163
|
+
tr.exports = gt()();
|
|
1164
|
+
var _t = tr.exports;
|
|
1165
|
+
const j = /* @__PURE__ */ zr(_t);
|
|
1166
|
+
function Ee(e, r, n, t) {
|
|
1167
|
+
function i(o) {
|
|
1168
|
+
return o instanceof n ? o : new n(function(s) {
|
|
1169
|
+
s(o);
|
|
1170
|
+
});
|
|
1171
|
+
}
|
|
1172
|
+
return new (n || (n = Promise))(function(o, s) {
|
|
1173
|
+
function a(y) {
|
|
1174
|
+
try {
|
|
1175
|
+
u(t.next(y));
|
|
1176
|
+
} catch (g) {
|
|
1177
|
+
s(g);
|
|
1178
|
+
}
|
|
1179
|
+
}
|
|
1180
|
+
function m(y) {
|
|
1181
|
+
try {
|
|
1182
|
+
u(t.throw(y));
|
|
1183
|
+
} catch (g) {
|
|
1184
|
+
s(g);
|
|
1185
|
+
}
|
|
1186
|
+
}
|
|
1187
|
+
function u(y) {
|
|
1188
|
+
y.done ? o(y.value) : i(y.value).then(a, m);
|
|
1189
|
+
}
|
|
1190
|
+
u((t = t.apply(e, r || [])).next());
|
|
1191
|
+
});
|
|
1192
|
+
}
|
|
1193
|
+
function we(e, r) {
|
|
1194
|
+
var n = { label: 0, sent: function() {
|
|
1195
|
+
if (o[0] & 1)
|
|
1196
|
+
throw o[1];
|
|
1197
|
+
return o[1];
|
|
1198
|
+
}, trys: [], ops: [] }, t, i, o, s;
|
|
1199
|
+
return s = { next: a(0), throw: a(1), return: a(2) }, typeof Symbol == "function" && (s[Symbol.iterator] = function() {
|
|
1200
|
+
return this;
|
|
1201
|
+
}), s;
|
|
1202
|
+
function a(u) {
|
|
1203
|
+
return function(y) {
|
|
1204
|
+
return m([u, y]);
|
|
1205
|
+
};
|
|
1206
|
+
}
|
|
1207
|
+
function m(u) {
|
|
1208
|
+
if (t)
|
|
1209
|
+
throw new TypeError("Generator is already executing.");
|
|
1210
|
+
for (; s && (s = 0, u[0] && (n = 0)), n; )
|
|
1211
|
+
try {
|
|
1212
|
+
if (t = 1, i && (o = u[0] & 2 ? i.return : u[0] ? i.throw || ((o = i.return) && o.call(i), 0) : i.next) && !(o = o.call(i, u[1])).done)
|
|
1213
|
+
return o;
|
|
1214
|
+
switch (i = 0, o && (u = [u[0] & 2, o.value]), u[0]) {
|
|
1215
|
+
case 0:
|
|
1216
|
+
case 1:
|
|
1217
|
+
o = u;
|
|
1218
|
+
break;
|
|
1219
|
+
case 4:
|
|
1220
|
+
return n.label++, { value: u[1], done: !1 };
|
|
1221
|
+
case 5:
|
|
1222
|
+
n.label++, i = u[1], u = [0];
|
|
1223
|
+
continue;
|
|
1224
|
+
case 7:
|
|
1225
|
+
u = n.ops.pop(), n.trys.pop();
|
|
1226
|
+
continue;
|
|
1227
|
+
default:
|
|
1228
|
+
if (o = n.trys, !(o = o.length > 0 && o[o.length - 1]) && (u[0] === 6 || u[0] === 2)) {
|
|
1229
|
+
n = 0;
|
|
1230
|
+
continue;
|
|
1231
|
+
}
|
|
1232
|
+
if (u[0] === 3 && (!o || u[1] > o[0] && u[1] < o[3])) {
|
|
1233
|
+
n.label = u[1];
|
|
1234
|
+
break;
|
|
1235
|
+
}
|
|
1236
|
+
if (u[0] === 6 && n.label < o[1]) {
|
|
1237
|
+
n.label = o[1], o = u;
|
|
1238
|
+
break;
|
|
1239
|
+
}
|
|
1240
|
+
if (o && n.label < o[2]) {
|
|
1241
|
+
n.label = o[2], n.ops.push(u);
|
|
1242
|
+
break;
|
|
1243
|
+
}
|
|
1244
|
+
o[2] && n.ops.pop(), n.trys.pop();
|
|
1245
|
+
continue;
|
|
1246
|
+
}
|
|
1247
|
+
u = r.call(e, n);
|
|
1248
|
+
} catch (y) {
|
|
1249
|
+
u = [6, y], i = 0;
|
|
1250
|
+
} finally {
|
|
1251
|
+
t = o = 0;
|
|
1252
|
+
}
|
|
1253
|
+
if (u[0] & 5)
|
|
1254
|
+
throw u[1];
|
|
1255
|
+
return { value: u[0] ? u[1] : void 0, done: !0 };
|
|
1256
|
+
}
|
|
1257
|
+
}
|
|
1258
|
+
function xr(e, r) {
|
|
1259
|
+
var n = typeof Symbol == "function" && e[Symbol.iterator];
|
|
1260
|
+
if (!n)
|
|
1261
|
+
return e;
|
|
1262
|
+
var t = n.call(e), i, o = [], s;
|
|
1263
|
+
try {
|
|
1264
|
+
for (; (r === void 0 || r-- > 0) && !(i = t.next()).done; )
|
|
1265
|
+
o.push(i.value);
|
|
1266
|
+
} catch (a) {
|
|
1267
|
+
s = { error: a };
|
|
1268
|
+
} finally {
|
|
1269
|
+
try {
|
|
1270
|
+
i && !i.done && (n = t.return) && n.call(t);
|
|
1271
|
+
} finally {
|
|
1272
|
+
if (s)
|
|
1273
|
+
throw s.error;
|
|
1274
|
+
}
|
|
1275
|
+
}
|
|
1276
|
+
return o;
|
|
1277
|
+
}
|
|
1278
|
+
function Sr(e, r, n) {
|
|
1279
|
+
if (n || arguments.length === 2)
|
|
1280
|
+
for (var t = 0, i = r.length, o; t < i; t++)
|
|
1281
|
+
(o || !(t in r)) && (o || (o = Array.prototype.slice.call(r, 0, t)), o[t] = r[t]);
|
|
1282
|
+
return e.concat(o || Array.prototype.slice.call(r));
|
|
1283
|
+
}
|
|
1284
|
+
var Et = /* @__PURE__ */ new Map([
|
|
1285
|
+
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types
|
|
1286
|
+
["aac", "audio/aac"],
|
|
1287
|
+
["abw", "application/x-abiword"],
|
|
1288
|
+
["arc", "application/x-freearc"],
|
|
1289
|
+
["avif", "image/avif"],
|
|
1290
|
+
["avi", "video/x-msvideo"],
|
|
1291
|
+
["azw", "application/vnd.amazon.ebook"],
|
|
1292
|
+
["bin", "application/octet-stream"],
|
|
1293
|
+
["bmp", "image/bmp"],
|
|
1294
|
+
["bz", "application/x-bzip"],
|
|
1295
|
+
["bz2", "application/x-bzip2"],
|
|
1296
|
+
["cda", "application/x-cdf"],
|
|
1297
|
+
["csh", "application/x-csh"],
|
|
1298
|
+
["css", "text/css"],
|
|
1299
|
+
["csv", "text/csv"],
|
|
1300
|
+
["doc", "application/msword"],
|
|
1301
|
+
["docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document"],
|
|
1302
|
+
["eot", "application/vnd.ms-fontobject"],
|
|
1303
|
+
["epub", "application/epub+zip"],
|
|
1304
|
+
["gz", "application/gzip"],
|
|
1305
|
+
["gif", "image/gif"],
|
|
1306
|
+
["heic", "image/heic"],
|
|
1307
|
+
["heif", "image/heif"],
|
|
1308
|
+
["htm", "text/html"],
|
|
1309
|
+
["html", "text/html"],
|
|
1310
|
+
["ico", "image/vnd.microsoft.icon"],
|
|
1311
|
+
["ics", "text/calendar"],
|
|
1312
|
+
["jar", "application/java-archive"],
|
|
1313
|
+
["jpeg", "image/jpeg"],
|
|
1314
|
+
["jpg", "image/jpeg"],
|
|
1315
|
+
["js", "text/javascript"],
|
|
1316
|
+
["json", "application/json"],
|
|
1317
|
+
["jsonld", "application/ld+json"],
|
|
1318
|
+
["mid", "audio/midi"],
|
|
1319
|
+
["midi", "audio/midi"],
|
|
1320
|
+
["mjs", "text/javascript"],
|
|
1321
|
+
["mp3", "audio/mpeg"],
|
|
1322
|
+
["mp4", "video/mp4"],
|
|
1323
|
+
["mpeg", "video/mpeg"],
|
|
1324
|
+
["mpkg", "application/vnd.apple.installer+xml"],
|
|
1325
|
+
["odp", "application/vnd.oasis.opendocument.presentation"],
|
|
1326
|
+
["ods", "application/vnd.oasis.opendocument.spreadsheet"],
|
|
1327
|
+
["odt", "application/vnd.oasis.opendocument.text"],
|
|
1328
|
+
["oga", "audio/ogg"],
|
|
1329
|
+
["ogv", "video/ogg"],
|
|
1330
|
+
["ogx", "application/ogg"],
|
|
1331
|
+
["opus", "audio/opus"],
|
|
1332
|
+
["otf", "font/otf"],
|
|
1333
|
+
["png", "image/png"],
|
|
1334
|
+
["pdf", "application/pdf"],
|
|
1335
|
+
["php", "application/x-httpd-php"],
|
|
1336
|
+
["ppt", "application/vnd.ms-powerpoint"],
|
|
1337
|
+
["pptx", "application/vnd.openxmlformats-officedocument.presentationml.presentation"],
|
|
1338
|
+
["rar", "application/vnd.rar"],
|
|
1339
|
+
["rtf", "application/rtf"],
|
|
1340
|
+
["sh", "application/x-sh"],
|
|
1341
|
+
["svg", "image/svg+xml"],
|
|
1342
|
+
["swf", "application/x-shockwave-flash"],
|
|
1343
|
+
["tar", "application/x-tar"],
|
|
1344
|
+
["tif", "image/tiff"],
|
|
1345
|
+
["tiff", "image/tiff"],
|
|
1346
|
+
["ts", "video/mp2t"],
|
|
1347
|
+
["ttf", "font/ttf"],
|
|
1348
|
+
["txt", "text/plain"],
|
|
1349
|
+
["vsd", "application/vnd.visio"],
|
|
1350
|
+
["wav", "audio/wav"],
|
|
1351
|
+
["weba", "audio/webm"],
|
|
1352
|
+
["webm", "video/webm"],
|
|
1353
|
+
["webp", "image/webp"],
|
|
1354
|
+
["woff", "font/woff"],
|
|
1355
|
+
["woff2", "font/woff2"],
|
|
1356
|
+
["xhtml", "application/xhtml+xml"],
|
|
1357
|
+
["xls", "application/vnd.ms-excel"],
|
|
1358
|
+
["xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],
|
|
1359
|
+
["xml", "application/xml"],
|
|
1360
|
+
["xul", "application/vnd.mozilla.xul+xml"],
|
|
1361
|
+
["zip", "application/zip"],
|
|
1362
|
+
["7z", "application/x-7z-compressed"],
|
|
1363
|
+
// Others
|
|
1364
|
+
["mkv", "video/x-matroska"],
|
|
1365
|
+
["mov", "video/quicktime"],
|
|
1366
|
+
["msg", "application/vnd.ms-outlook"]
|
|
1367
|
+
]);
|
|
1368
|
+
function De(e, r) {
|
|
1369
|
+
var n = wt(e);
|
|
1370
|
+
if (typeof n.path != "string") {
|
|
1371
|
+
var t = e.webkitRelativePath;
|
|
1372
|
+
Object.defineProperty(n, "path", {
|
|
1373
|
+
value: typeof r == "string" ? r : typeof t == "string" && t.length > 0 ? t : e.name,
|
|
1374
|
+
writable: !1,
|
|
1375
|
+
configurable: !1,
|
|
1376
|
+
enumerable: !0
|
|
1377
|
+
});
|
|
1378
|
+
}
|
|
1379
|
+
return n;
|
|
1380
|
+
}
|
|
1381
|
+
function wt(e) {
|
|
1382
|
+
var r = e.name, n = r && r.lastIndexOf(".") !== -1;
|
|
1383
|
+
if (n && !e.type) {
|
|
1384
|
+
var t = r.split(".").pop().toLowerCase(), i = Et.get(t);
|
|
1385
|
+
i && Object.defineProperty(e, "type", {
|
|
1386
|
+
value: i,
|
|
1387
|
+
writable: !1,
|
|
1388
|
+
configurable: !1,
|
|
1389
|
+
enumerable: !0
|
|
1390
|
+
});
|
|
1391
|
+
}
|
|
1392
|
+
return e;
|
|
1393
|
+
}
|
|
1394
|
+
var Tt = [
|
|
1395
|
+
// Thumbnail cache files for macOS and Windows
|
|
1396
|
+
".DS_Store",
|
|
1397
|
+
"Thumbs.db"
|
|
1398
|
+
// Windows
|
|
1399
|
+
];
|
|
1400
|
+
function Ot(e) {
|
|
1401
|
+
return Ee(this, void 0, void 0, function() {
|
|
1402
|
+
return we(this, function(r) {
|
|
1403
|
+
return ke(e) && Ct(e.dataTransfer) ? [2, At(e.dataTransfer, e.type)] : xt(e) ? [2, St(e)] : Array.isArray(e) && e.every(function(n) {
|
|
1404
|
+
return "getFile" in n && typeof n.getFile == "function";
|
|
1405
|
+
}) ? [2, Dt(e)] : [2, []];
|
|
1406
|
+
});
|
|
1407
|
+
});
|
|
1408
|
+
}
|
|
1409
|
+
function Ct(e) {
|
|
1410
|
+
return ke(e);
|
|
1411
|
+
}
|
|
1412
|
+
function xt(e) {
|
|
1413
|
+
return ke(e) && ke(e.target);
|
|
1414
|
+
}
|
|
1415
|
+
function ke(e) {
|
|
1416
|
+
return typeof e == "object" && e !== null;
|
|
1417
|
+
}
|
|
1418
|
+
function St(e) {
|
|
1419
|
+
return or(e.target.files).map(function(r) {
|
|
1420
|
+
return De(r);
|
|
1421
|
+
});
|
|
1422
|
+
}
|
|
1423
|
+
function Dt(e) {
|
|
1424
|
+
return Ee(this, void 0, void 0, function() {
|
|
1425
|
+
var r;
|
|
1426
|
+
return we(this, function(n) {
|
|
1427
|
+
switch (n.label) {
|
|
1428
|
+
case 0:
|
|
1429
|
+
return [4, Promise.all(e.map(function(t) {
|
|
1430
|
+
return t.getFile();
|
|
1431
|
+
}))];
|
|
1432
|
+
case 1:
|
|
1433
|
+
return r = n.sent(), [2, r.map(function(t) {
|
|
1434
|
+
return De(t);
|
|
1435
|
+
})];
|
|
1436
|
+
}
|
|
1437
|
+
});
|
|
1438
|
+
});
|
|
1439
|
+
}
|
|
1440
|
+
function At(e, r) {
|
|
1441
|
+
return Ee(this, void 0, void 0, function() {
|
|
1442
|
+
var n, t;
|
|
1443
|
+
return we(this, function(i) {
|
|
1444
|
+
switch (i.label) {
|
|
1445
|
+
case 0:
|
|
1446
|
+
return e.items ? (n = or(e.items).filter(function(o) {
|
|
1447
|
+
return o.kind === "file";
|
|
1448
|
+
}), r !== "drop" ? [2, n] : [4, Promise.all(n.map(Pt))]) : [3, 2];
|
|
1449
|
+
case 1:
|
|
1450
|
+
return t = i.sent(), [2, Dr(Jr(t))];
|
|
1451
|
+
case 2:
|
|
1452
|
+
return [2, Dr(or(e.files).map(function(o) {
|
|
1453
|
+
return De(o);
|
|
1454
|
+
}))];
|
|
1455
|
+
}
|
|
1456
|
+
});
|
|
1457
|
+
});
|
|
1458
|
+
}
|
|
1459
|
+
function Dr(e) {
|
|
1460
|
+
return e.filter(function(r) {
|
|
1461
|
+
return Tt.indexOf(r.name) === -1;
|
|
1462
|
+
});
|
|
1463
|
+
}
|
|
1464
|
+
function or(e) {
|
|
1465
|
+
if (e === null)
|
|
1466
|
+
return [];
|
|
1467
|
+
for (var r = [], n = 0; n < e.length; n++) {
|
|
1468
|
+
var t = e[n];
|
|
1469
|
+
r.push(t);
|
|
1470
|
+
}
|
|
1471
|
+
return r;
|
|
1472
|
+
}
|
|
1473
|
+
function Pt(e) {
|
|
1474
|
+
if (typeof e.webkitGetAsEntry != "function")
|
|
1475
|
+
return Ar(e);
|
|
1476
|
+
var r = e.webkitGetAsEntry();
|
|
1477
|
+
return r && r.isDirectory ? Xr(r) : Ar(e);
|
|
1478
|
+
}
|
|
1479
|
+
function Jr(e) {
|
|
1480
|
+
return e.reduce(function(r, n) {
|
|
1481
|
+
return Sr(Sr([], xr(r), !1), xr(Array.isArray(n) ? Jr(n) : [n]), !1);
|
|
1482
|
+
}, []);
|
|
1483
|
+
}
|
|
1484
|
+
function Ar(e) {
|
|
1485
|
+
var r = e.getAsFile();
|
|
1486
|
+
if (!r)
|
|
1487
|
+
return Promise.reject("".concat(e, " is not a File"));
|
|
1488
|
+
var n = De(r);
|
|
1489
|
+
return Promise.resolve(n);
|
|
1490
|
+
}
|
|
1491
|
+
function Rt(e) {
|
|
1492
|
+
return Ee(this, void 0, void 0, function() {
|
|
1493
|
+
return we(this, function(r) {
|
|
1494
|
+
return [2, e.isDirectory ? Xr(e) : Ft(e)];
|
|
1495
|
+
});
|
|
1496
|
+
});
|
|
1497
|
+
}
|
|
1498
|
+
function Xr(e) {
|
|
1499
|
+
var r = e.createReader();
|
|
1500
|
+
return new Promise(function(n, t) {
|
|
1501
|
+
var i = [];
|
|
1502
|
+
function o() {
|
|
1503
|
+
var s = this;
|
|
1504
|
+
r.readEntries(function(a) {
|
|
1505
|
+
return Ee(s, void 0, void 0, function() {
|
|
1506
|
+
var m, u, y;
|
|
1507
|
+
return we(this, function(g) {
|
|
1508
|
+
switch (g.label) {
|
|
1509
|
+
case 0:
|
|
1510
|
+
if (a.length)
|
|
1511
|
+
return [3, 5];
|
|
1512
|
+
g.label = 1;
|
|
1513
|
+
case 1:
|
|
1514
|
+
return g.trys.push([1, 3, , 4]), [4, Promise.all(i)];
|
|
1515
|
+
case 2:
|
|
1516
|
+
return m = g.sent(), n(m), [3, 4];
|
|
1517
|
+
case 3:
|
|
1518
|
+
return u = g.sent(), t(u), [3, 4];
|
|
1519
|
+
case 4:
|
|
1520
|
+
return [3, 6];
|
|
1521
|
+
case 5:
|
|
1522
|
+
y = Promise.all(a.map(Rt)), i.push(y), o(), g.label = 6;
|
|
1523
|
+
case 6:
|
|
1524
|
+
return [
|
|
1525
|
+
2
|
|
1526
|
+
/*return*/
|
|
1527
|
+
];
|
|
1528
|
+
}
|
|
1529
|
+
});
|
|
1530
|
+
});
|
|
1531
|
+
}, function(a) {
|
|
1532
|
+
t(a);
|
|
1533
|
+
});
|
|
1534
|
+
}
|
|
1535
|
+
o();
|
|
1536
|
+
});
|
|
1537
|
+
}
|
|
1538
|
+
function Ft(e) {
|
|
1539
|
+
return Ee(this, void 0, void 0, function() {
|
|
1540
|
+
return we(this, function(r) {
|
|
1541
|
+
return [2, new Promise(function(n, t) {
|
|
1542
|
+
e.file(function(i) {
|
|
1543
|
+
var o = De(i, e.fullPath);
|
|
1544
|
+
n(o);
|
|
1545
|
+
}, function(i) {
|
|
1546
|
+
t(i);
|
|
1547
|
+
});
|
|
1548
|
+
})];
|
|
1549
|
+
});
|
|
1550
|
+
});
|
|
1551
|
+
}
|
|
1552
|
+
var It = function(e, r) {
|
|
1553
|
+
if (e && r) {
|
|
1554
|
+
var n = Array.isArray(r) ? r : r.split(","), t = e.name || "", i = (e.type || "").toLowerCase(), o = i.replace(/\/.*$/, "");
|
|
1555
|
+
return n.some(function(s) {
|
|
1556
|
+
var a = s.trim().toLowerCase();
|
|
1557
|
+
return a.charAt(0) === "." ? t.toLowerCase().endsWith(a) : a.endsWith("/*") ? o === a.replace(/\/.*$/, "") : i === a;
|
|
1558
|
+
});
|
|
1559
|
+
}
|
|
1560
|
+
return !0;
|
|
1561
|
+
};
|
|
1562
|
+
function Pr(e) {
|
|
1563
|
+
return Nt(e) || kt(e) || Qr(e) || jt();
|
|
1564
|
+
}
|
|
1565
|
+
function jt() {
|
|
1566
|
+
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1567
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1568
|
+
}
|
|
1569
|
+
function kt(e) {
|
|
1570
|
+
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null)
|
|
1571
|
+
return Array.from(e);
|
|
1572
|
+
}
|
|
1573
|
+
function Nt(e) {
|
|
1574
|
+
if (Array.isArray(e))
|
|
1575
|
+
return ir(e);
|
|
1576
|
+
}
|
|
1577
|
+
function Rr(e, r) {
|
|
1578
|
+
var n = Object.keys(e);
|
|
1579
|
+
if (Object.getOwnPropertySymbols) {
|
|
1580
|
+
var t = Object.getOwnPropertySymbols(e);
|
|
1581
|
+
r && (t = t.filter(function(i) {
|
|
1582
|
+
return Object.getOwnPropertyDescriptor(e, i).enumerable;
|
|
1583
|
+
})), n.push.apply(n, t);
|
|
1584
|
+
}
|
|
1585
|
+
return n;
|
|
1586
|
+
}
|
|
1587
|
+
function Fr(e) {
|
|
1588
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
1589
|
+
var n = arguments[r] != null ? arguments[r] : {};
|
|
1590
|
+
r % 2 ? Rr(Object(n), !0).forEach(function(t) {
|
|
1591
|
+
Zr(e, t, n[t]);
|
|
1592
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Rr(Object(n)).forEach(function(t) {
|
|
1593
|
+
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
1594
|
+
});
|
|
1595
|
+
}
|
|
1596
|
+
return e;
|
|
1597
|
+
}
|
|
1598
|
+
function Zr(e, r, n) {
|
|
1599
|
+
return r in e ? Object.defineProperty(e, r, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = n, e;
|
|
1600
|
+
}
|
|
1601
|
+
function Se(e, r) {
|
|
1602
|
+
return Lt(e) || Mt(e, r) || Qr(e, r) || $t();
|
|
1603
|
+
}
|
|
1604
|
+
function $t() {
|
|
1605
|
+
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1606
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1607
|
+
}
|
|
1608
|
+
function Qr(e, r) {
|
|
1609
|
+
if (e) {
|
|
1610
|
+
if (typeof e == "string")
|
|
1611
|
+
return ir(e, r);
|
|
1612
|
+
var n = Object.prototype.toString.call(e).slice(8, -1);
|
|
1613
|
+
if (n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set")
|
|
1614
|
+
return Array.from(e);
|
|
1615
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
1616
|
+
return ir(e, r);
|
|
1617
|
+
}
|
|
1618
|
+
}
|
|
1619
|
+
function ir(e, r) {
|
|
1620
|
+
(r == null || r > e.length) && (r = e.length);
|
|
1621
|
+
for (var n = 0, t = new Array(r); n < r; n++)
|
|
1622
|
+
t[n] = e[n];
|
|
1623
|
+
return t;
|
|
1624
|
+
}
|
|
1625
|
+
function Mt(e, r) {
|
|
1626
|
+
var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
1627
|
+
if (n != null) {
|
|
1628
|
+
var t = [], i = !0, o = !1, s, a;
|
|
1629
|
+
try {
|
|
1630
|
+
for (n = n.call(e); !(i = (s = n.next()).done) && (t.push(s.value), !(r && t.length === r)); i = !0)
|
|
1631
|
+
;
|
|
1632
|
+
} catch (m) {
|
|
1633
|
+
o = !0, a = m;
|
|
1634
|
+
} finally {
|
|
1635
|
+
try {
|
|
1636
|
+
!i && n.return != null && n.return();
|
|
1637
|
+
} finally {
|
|
1638
|
+
if (o)
|
|
1639
|
+
throw a;
|
|
1640
|
+
}
|
|
1641
|
+
}
|
|
1642
|
+
return t;
|
|
1643
|
+
}
|
|
1644
|
+
}
|
|
1645
|
+
function Lt(e) {
|
|
1646
|
+
if (Array.isArray(e))
|
|
1647
|
+
return e;
|
|
1648
|
+
}
|
|
1649
|
+
var zt = "file-invalid-type", Bt = "file-too-large", Wt = "file-too-small", Yt = "too-many-files", qt = function(r) {
|
|
1650
|
+
r = Array.isArray(r) && r.length === 1 ? r[0] : r;
|
|
1651
|
+
var n = Array.isArray(r) ? "one of ".concat(r.join(", ")) : r;
|
|
1652
|
+
return {
|
|
1653
|
+
code: zt,
|
|
1654
|
+
message: "File type must be ".concat(n)
|
|
1655
|
+
};
|
|
1656
|
+
}, Ir = function(r) {
|
|
1657
|
+
return {
|
|
1658
|
+
code: Bt,
|
|
1659
|
+
message: "File is larger than ".concat(r, " ").concat(r === 1 ? "byte" : "bytes")
|
|
1660
|
+
};
|
|
1661
|
+
}, jr = function(r) {
|
|
1662
|
+
return {
|
|
1663
|
+
code: Wt,
|
|
1664
|
+
message: "File is smaller than ".concat(r, " ").concat(r === 1 ? "byte" : "bytes")
|
|
1665
|
+
};
|
|
1666
|
+
}, Ht = {
|
|
1667
|
+
code: Yt,
|
|
1668
|
+
message: "Too many files"
|
|
1669
|
+
};
|
|
1670
|
+
function en(e, r) {
|
|
1671
|
+
var n = e.type === "application/x-moz-file" || It(e, r);
|
|
1672
|
+
return [n, n ? null : qt(r)];
|
|
1673
|
+
}
|
|
1674
|
+
function rn(e, r, n) {
|
|
1675
|
+
if (de(e.size))
|
|
1676
|
+
if (de(r) && de(n)) {
|
|
1677
|
+
if (e.size > n)
|
|
1678
|
+
return [!1, Ir(n)];
|
|
1679
|
+
if (e.size < r)
|
|
1680
|
+
return [!1, jr(r)];
|
|
1681
|
+
} else {
|
|
1682
|
+
if (de(r) && e.size < r)
|
|
1683
|
+
return [!1, jr(r)];
|
|
1684
|
+
if (de(n) && e.size > n)
|
|
1685
|
+
return [!1, Ir(n)];
|
|
1686
|
+
}
|
|
1687
|
+
return [!0, null];
|
|
1688
|
+
}
|
|
1689
|
+
function de(e) {
|
|
1690
|
+
return e != null;
|
|
1691
|
+
}
|
|
1692
|
+
function Kt(e) {
|
|
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(m) {
|
|
1695
|
+
var u = en(m, n), y = Se(u, 1), g = y[0], E = rn(m, t, i), P = Se(E, 1), R = P[0], D = a ? a(m) : null;
|
|
1696
|
+
return g && R && !D;
|
|
1697
|
+
});
|
|
1698
|
+
}
|
|
1699
|
+
function Ne(e) {
|
|
1700
|
+
return typeof e.isPropagationStopped == "function" ? e.isPropagationStopped() : typeof e.cancelBubble < "u" ? e.cancelBubble : !1;
|
|
1701
|
+
}
|
|
1702
|
+
function Ie(e) {
|
|
1703
|
+
return e.dataTransfer ? Array.prototype.some.call(e.dataTransfer.types, function(r) {
|
|
1704
|
+
return r === "Files" || r === "application/x-moz-file";
|
|
1705
|
+
}) : !!e.target && !!e.target.files;
|
|
1706
|
+
}
|
|
1707
|
+
function kr(e) {
|
|
1708
|
+
e.preventDefault();
|
|
1709
|
+
}
|
|
1710
|
+
function Ut(e) {
|
|
1711
|
+
return e.indexOf("MSIE") !== -1 || e.indexOf("Trident/") !== -1;
|
|
1712
|
+
}
|
|
1713
|
+
function Gt(e) {
|
|
1714
|
+
return e.indexOf("Edge/") !== -1;
|
|
1715
|
+
}
|
|
1716
|
+
function Vt() {
|
|
1717
|
+
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : window.navigator.userAgent;
|
|
1718
|
+
return Ut(e) || Gt(e);
|
|
1719
|
+
}
|
|
1720
|
+
function te() {
|
|
1721
|
+
for (var e = arguments.length, r = new Array(e), n = 0; n < e; n++)
|
|
1722
|
+
r[n] = arguments[n];
|
|
1723
|
+
return function(t) {
|
|
1724
|
+
for (var i = arguments.length, o = new Array(i > 1 ? i - 1 : 0), s = 1; s < i; s++)
|
|
1725
|
+
o[s - 1] = arguments[s];
|
|
1726
|
+
return r.some(function(a) {
|
|
1727
|
+
return !Ne(t) && a && a.apply(void 0, [t].concat(o)), Ne(t);
|
|
1728
|
+
});
|
|
1729
|
+
};
|
|
1730
|
+
}
|
|
1731
|
+
function Jt() {
|
|
1732
|
+
return "showOpenFilePicker" in window;
|
|
1733
|
+
}
|
|
1734
|
+
function Xt(e) {
|
|
1735
|
+
if (de(e)) {
|
|
1736
|
+
var r = Object.entries(e).filter(function(n) {
|
|
1737
|
+
var t = Se(n, 2), i = t[0], o = t[1], s = !0;
|
|
1738
|
+
return nn(i) || (console.warn('Skipped "'.concat(i, '" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')), s = !1), (!Array.isArray(o) || !o.every(tn)) && (console.warn('Skipped "'.concat(i, '" because an invalid file extension was provided.')), s = !1), s;
|
|
1739
|
+
}).reduce(function(n, t) {
|
|
1740
|
+
var i = Se(t, 2), o = i[0], s = i[1];
|
|
1741
|
+
return Fr(Fr({}, n), {}, Zr({}, o, s));
|
|
1742
|
+
}, {});
|
|
1743
|
+
return [{
|
|
1744
|
+
// description is required due to https://crbug.com/1264708
|
|
1745
|
+
description: "Files",
|
|
1746
|
+
accept: r
|
|
1747
|
+
}];
|
|
1748
|
+
}
|
|
1749
|
+
return e;
|
|
1750
|
+
}
|
|
1751
|
+
function Zt(e) {
|
|
1752
|
+
if (de(e))
|
|
1753
|
+
return Object.entries(e).reduce(function(r, n) {
|
|
1754
|
+
var t = Se(n, 2), i = t[0], o = t[1];
|
|
1755
|
+
return [].concat(Pr(r), [i], Pr(o));
|
|
1756
|
+
}, []).filter(function(r) {
|
|
1757
|
+
return nn(r) || tn(r);
|
|
1758
|
+
}).join(",");
|
|
1759
|
+
}
|
|
1760
|
+
function Qt(e) {
|
|
1761
|
+
return e instanceof DOMException && (e.name === "AbortError" || e.code === e.ABORT_ERR);
|
|
1762
|
+
}
|
|
1763
|
+
function eo(e) {
|
|
1764
|
+
return e instanceof DOMException && (e.name === "SecurityError" || e.code === e.SECURITY_ERR);
|
|
1765
|
+
}
|
|
1766
|
+
function nn(e) {
|
|
1767
|
+
return e === "audio/*" || e === "video/*" || e === "image/*" || e === "text/*" || /\w+\/[-+.\w]+/g.test(e);
|
|
1768
|
+
}
|
|
1769
|
+
function tn(e) {
|
|
1770
|
+
return /^.*\.[\w]+$/.test(e);
|
|
1771
|
+
}
|
|
1772
|
+
var ro = ["children"], no = ["open"], to = ["refKey", "role", "onKeyDown", "onFocus", "onBlur", "onClick", "onDragEnter", "onDragOver", "onDragLeave", "onDrop"], oo = ["refKey", "onChange", "onClick"];
|
|
1773
|
+
function io(e) {
|
|
1774
|
+
return co(e) || so(e) || on(e) || ao();
|
|
1775
|
+
}
|
|
1776
|
+
function ao() {
|
|
1777
|
+
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1778
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1779
|
+
}
|
|
1780
|
+
function so(e) {
|
|
1781
|
+
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null)
|
|
1782
|
+
return Array.from(e);
|
|
1783
|
+
}
|
|
1784
|
+
function co(e) {
|
|
1785
|
+
if (Array.isArray(e))
|
|
1786
|
+
return ar(e);
|
|
1787
|
+
}
|
|
1788
|
+
function er(e, r) {
|
|
1789
|
+
return fo(e) || uo(e, r) || on(e, r) || lo();
|
|
1790
|
+
}
|
|
1791
|
+
function lo() {
|
|
1792
|
+
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1793
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1794
|
+
}
|
|
1795
|
+
function on(e, r) {
|
|
1796
|
+
if (e) {
|
|
1797
|
+
if (typeof e == "string")
|
|
1798
|
+
return ar(e, r);
|
|
1799
|
+
var n = Object.prototype.toString.call(e).slice(8, -1);
|
|
1800
|
+
if (n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set")
|
|
1801
|
+
return Array.from(e);
|
|
1802
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
1803
|
+
return ar(e, r);
|
|
1804
|
+
}
|
|
1805
|
+
}
|
|
1806
|
+
function ar(e, r) {
|
|
1807
|
+
(r == null || r > e.length) && (r = e.length);
|
|
1808
|
+
for (var n = 0, t = new Array(r); n < r; n++)
|
|
1809
|
+
t[n] = e[n];
|
|
1810
|
+
return t;
|
|
1811
|
+
}
|
|
1812
|
+
function uo(e, r) {
|
|
1813
|
+
var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
1814
|
+
if (n != null) {
|
|
1815
|
+
var t = [], i = !0, o = !1, s, a;
|
|
1816
|
+
try {
|
|
1817
|
+
for (n = n.call(e); !(i = (s = n.next()).done) && (t.push(s.value), !(r && t.length === r)); i = !0)
|
|
1818
|
+
;
|
|
1819
|
+
} catch (m) {
|
|
1820
|
+
o = !0, a = m;
|
|
1821
|
+
} finally {
|
|
1822
|
+
try {
|
|
1823
|
+
!i && n.return != null && n.return();
|
|
1824
|
+
} finally {
|
|
1825
|
+
if (o)
|
|
1826
|
+
throw a;
|
|
1827
|
+
}
|
|
1828
|
+
}
|
|
1829
|
+
return t;
|
|
1830
|
+
}
|
|
1831
|
+
}
|
|
1832
|
+
function fo(e) {
|
|
1833
|
+
if (Array.isArray(e))
|
|
1834
|
+
return e;
|
|
1835
|
+
}
|
|
1836
|
+
function Nr(e, r) {
|
|
1837
|
+
var n = Object.keys(e);
|
|
1838
|
+
if (Object.getOwnPropertySymbols) {
|
|
1839
|
+
var t = Object.getOwnPropertySymbols(e);
|
|
1840
|
+
r && (t = t.filter(function(i) {
|
|
1841
|
+
return Object.getOwnPropertyDescriptor(e, i).enumerable;
|
|
1842
|
+
})), n.push.apply(n, t);
|
|
1843
|
+
}
|
|
1844
|
+
return n;
|
|
1845
|
+
}
|
|
1846
|
+
function M(e) {
|
|
1847
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
1848
|
+
var n = arguments[r] != null ? arguments[r] : {};
|
|
1849
|
+
r % 2 ? Nr(Object(n), !0).forEach(function(t) {
|
|
1850
|
+
sr(e, t, n[t]);
|
|
1851
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Nr(Object(n)).forEach(function(t) {
|
|
1852
|
+
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
1853
|
+
});
|
|
1854
|
+
}
|
|
1855
|
+
return e;
|
|
1856
|
+
}
|
|
1857
|
+
function sr(e, r, n) {
|
|
1858
|
+
return r in e ? Object.defineProperty(e, r, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = n, e;
|
|
1859
|
+
}
|
|
1860
|
+
function $e(e, r) {
|
|
1861
|
+
if (e == null)
|
|
1862
|
+
return {};
|
|
1863
|
+
var n = po(e, r), t, i;
|
|
1864
|
+
if (Object.getOwnPropertySymbols) {
|
|
1865
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
1866
|
+
for (i = 0; i < o.length; i++)
|
|
1867
|
+
t = o[i], !(r.indexOf(t) >= 0) && Object.prototype.propertyIsEnumerable.call(e, t) && (n[t] = e[t]);
|
|
1868
|
+
}
|
|
1869
|
+
return n;
|
|
1870
|
+
}
|
|
1871
|
+
function po(e, r) {
|
|
1872
|
+
if (e == null)
|
|
1873
|
+
return {};
|
|
1874
|
+
var n = {}, t = Object.keys(e), i, o;
|
|
1875
|
+
for (o = 0; o < t.length; o++)
|
|
1876
|
+
i = t[o], !(r.indexOf(i) >= 0) && (n[i] = e[i]);
|
|
1877
|
+
return n;
|
|
1878
|
+
}
|
|
1879
|
+
var pr = /* @__PURE__ */ yn(function(e, r) {
|
|
1880
|
+
var n = e.children, t = $e(e, ro), i = sn(t), o = i.open, s = $e(i, no);
|
|
1881
|
+
return gn(r, function() {
|
|
1882
|
+
return {
|
|
1883
|
+
open: o
|
|
1884
|
+
};
|
|
1885
|
+
}, [o]), /* @__PURE__ */ pn.createElement(bn, null, n(M(M({}, s), {}, {
|
|
1886
|
+
open: o
|
|
1887
|
+
})));
|
|
1888
|
+
});
|
|
1889
|
+
pr.displayName = "Dropzone";
|
|
1890
|
+
var an = {
|
|
1891
|
+
disabled: !1,
|
|
1892
|
+
getFilesFromEvent: Ot,
|
|
1893
|
+
maxSize: 1 / 0,
|
|
1894
|
+
minSize: 0,
|
|
1895
|
+
multiple: !0,
|
|
1896
|
+
maxFiles: 0,
|
|
1897
|
+
preventDropOnDocument: !0,
|
|
1898
|
+
noClick: !1,
|
|
1899
|
+
noKeyboard: !1,
|
|
1900
|
+
noDrag: !1,
|
|
1901
|
+
noDragEventsBubbling: !1,
|
|
1902
|
+
validator: null,
|
|
1903
|
+
useFsAccessApi: !0,
|
|
1904
|
+
autoFocus: !1
|
|
1905
|
+
};
|
|
1906
|
+
pr.defaultProps = an;
|
|
1907
|
+
pr.propTypes = {
|
|
1908
|
+
/**
|
|
1909
|
+
* Render function that exposes the dropzone state and prop getter fns
|
|
1910
|
+
*
|
|
1911
|
+
* @param {object} params
|
|
1912
|
+
* @param {Function} params.getRootProps Returns the props you should apply to the root drop container you render
|
|
1913
|
+
* @param {Function} params.getInputProps Returns the props you should apply to hidden file input you render
|
|
1914
|
+
* @param {Function} params.open Open the native file selection dialog
|
|
1915
|
+
* @param {boolean} params.isFocused Dropzone area is in focus
|
|
1916
|
+
* @param {boolean} params.isFileDialogActive File dialog is opened
|
|
1917
|
+
* @param {boolean} params.isDragActive Active drag is in progress
|
|
1918
|
+
* @param {boolean} params.isDragAccept Dragged files are accepted
|
|
1919
|
+
* @param {boolean} params.isDragReject Some dragged files are rejected
|
|
1920
|
+
* @param {File[]} params.acceptedFiles Accepted files
|
|
1921
|
+
* @param {FileRejection[]} params.fileRejections Rejected files and why they were rejected
|
|
1922
|
+
*/
|
|
1923
|
+
children: j.func,
|
|
1924
|
+
/**
|
|
1925
|
+
* Set accepted file types.
|
|
1926
|
+
* Checkout https://developer.mozilla.org/en-US/docs/Web/API/window/showOpenFilePicker types option for more information.
|
|
1927
|
+
* Keep in mind that mime type determination is not reliable across platforms. CSV files,
|
|
1928
|
+
* for example, are reported as text/plain under macOS but as application/vnd.ms-excel under
|
|
1929
|
+
* Windows. In some cases there might not be a mime type set at all (https://github.com/react-dropzone/react-dropzone/issues/276).
|
|
1930
|
+
*/
|
|
1931
|
+
accept: j.objectOf(j.arrayOf(j.string)),
|
|
1932
|
+
/**
|
|
1933
|
+
* Allow drag 'n' drop (or selection from the file dialog) of multiple files
|
|
1934
|
+
*/
|
|
1935
|
+
multiple: j.bool,
|
|
1936
|
+
/**
|
|
1937
|
+
* If false, allow dropped items to take over the current browser window
|
|
1938
|
+
*/
|
|
1939
|
+
preventDropOnDocument: j.bool,
|
|
1940
|
+
/**
|
|
1941
|
+
* If true, disables click to open the native file selection dialog
|
|
1942
|
+
*/
|
|
1943
|
+
noClick: j.bool,
|
|
1944
|
+
/**
|
|
1945
|
+
* If true, disables SPACE/ENTER to open the native file selection dialog.
|
|
1946
|
+
* Note that it also stops tracking the focus state.
|
|
1947
|
+
*/
|
|
1948
|
+
noKeyboard: j.bool,
|
|
1949
|
+
/**
|
|
1950
|
+
* If true, disables drag 'n' drop
|
|
1951
|
+
*/
|
|
1952
|
+
noDrag: j.bool,
|
|
1953
|
+
/**
|
|
1954
|
+
* If true, stops drag event propagation to parents
|
|
1955
|
+
*/
|
|
1956
|
+
noDragEventsBubbling: j.bool,
|
|
1957
|
+
/**
|
|
1958
|
+
* Minimum file size (in bytes)
|
|
1959
|
+
*/
|
|
1960
|
+
minSize: j.number,
|
|
1961
|
+
/**
|
|
1962
|
+
* Maximum file size (in bytes)
|
|
1963
|
+
*/
|
|
1964
|
+
maxSize: j.number,
|
|
1965
|
+
/**
|
|
1966
|
+
* Maximum accepted number of files
|
|
1967
|
+
* The default value is 0 which means there is no limitation to how many files are accepted.
|
|
1968
|
+
*/
|
|
1969
|
+
maxFiles: j.number,
|
|
1970
|
+
/**
|
|
1971
|
+
* Enable/disable the dropzone
|
|
1972
|
+
*/
|
|
1973
|
+
disabled: j.bool,
|
|
1974
|
+
/**
|
|
1975
|
+
* Use this to provide a custom file aggregator
|
|
1976
|
+
*
|
|
1977
|
+
* @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)
|
|
1978
|
+
*/
|
|
1979
|
+
getFilesFromEvent: j.func,
|
|
1980
|
+
/**
|
|
1981
|
+
* Cb for when closing the file dialog with no selection
|
|
1982
|
+
*/
|
|
1983
|
+
onFileDialogCancel: j.func,
|
|
1984
|
+
/**
|
|
1985
|
+
* Cb for when opening the file dialog
|
|
1986
|
+
*/
|
|
1987
|
+
onFileDialogOpen: j.func,
|
|
1988
|
+
/**
|
|
1989
|
+
* Set to true to use the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API
|
|
1990
|
+
* to open the file picker instead of using an `<input type="file">` click event.
|
|
1991
|
+
*/
|
|
1992
|
+
useFsAccessApi: j.bool,
|
|
1993
|
+
/**
|
|
1994
|
+
* Set to true to focus the root element on render
|
|
1995
|
+
*/
|
|
1996
|
+
autoFocus: j.bool,
|
|
1997
|
+
/**
|
|
1998
|
+
* Cb for when the `dragenter` event occurs.
|
|
1999
|
+
*
|
|
2000
|
+
* @param {DragEvent} event
|
|
2001
|
+
*/
|
|
2002
|
+
onDragEnter: j.func,
|
|
2003
|
+
/**
|
|
2004
|
+
* Cb for when the `dragleave` event occurs
|
|
2005
|
+
*
|
|
2006
|
+
* @param {DragEvent} event
|
|
2007
|
+
*/
|
|
2008
|
+
onDragLeave: j.func,
|
|
2009
|
+
/**
|
|
2010
|
+
* Cb for when the `dragover` event occurs
|
|
2011
|
+
*
|
|
2012
|
+
* @param {DragEvent} event
|
|
2013
|
+
*/
|
|
2014
|
+
onDragOver: j.func,
|
|
2015
|
+
/**
|
|
2016
|
+
* Cb for when the `drop` event occurs.
|
|
2017
|
+
* Note that this callback is invoked after the `getFilesFromEvent` callback is done.
|
|
2018
|
+
*
|
|
2019
|
+
* Files are accepted or rejected based on the `accept`, `multiple`, `minSize` and `maxSize` props.
|
|
2020
|
+
* `accept` must be a valid [MIME type](http://www.iana.org/assignments/media-types/media-types.xhtml) according to [input element specification](https://www.w3.org/wiki/HTML/Elements/input/file) or a valid file extension.
|
|
2021
|
+
* If `multiple` is set to false and additional files are dropped,
|
|
2022
|
+
* all files besides the first will be rejected.
|
|
2023
|
+
* Any file which does not have a size in the [`minSize`, `maxSize`] range, will be rejected as well.
|
|
2024
|
+
*
|
|
2025
|
+
* Note that the `onDrop` callback will always be invoked regardless if the dropped files were accepted or rejected.
|
|
2026
|
+
* If you'd like to react to a specific scenario, use the `onDropAccepted`/`onDropRejected` props.
|
|
2027
|
+
*
|
|
2028
|
+
* `onDrop` will provide you with an array of [File](https://developer.mozilla.org/en-US/docs/Web/API/File) objects which you can then process and send to a server.
|
|
2029
|
+
* For example, with [SuperAgent](https://github.com/visionmedia/superagent) as a http/ajax library:
|
|
2030
|
+
*
|
|
2031
|
+
* ```js
|
|
2032
|
+
* function onDrop(acceptedFiles) {
|
|
2033
|
+
* const req = request.post('/upload')
|
|
2034
|
+
* acceptedFiles.forEach(file => {
|
|
2035
|
+
* req.attach(file.name, file)
|
|
2036
|
+
* })
|
|
2037
|
+
* req.end(callback)
|
|
2038
|
+
* }
|
|
2039
|
+
* ```
|
|
2040
|
+
*
|
|
2041
|
+
* @param {File[]} acceptedFiles
|
|
2042
|
+
* @param {FileRejection[]} fileRejections
|
|
2043
|
+
* @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)
|
|
2044
|
+
*/
|
|
2045
|
+
onDrop: j.func,
|
|
2046
|
+
/**
|
|
2047
|
+
* Cb for when the `drop` event occurs.
|
|
2048
|
+
* Note that if no files are accepted, this callback is not invoked.
|
|
2049
|
+
*
|
|
2050
|
+
* @param {File[]} files
|
|
2051
|
+
* @param {(DragEvent|Event)} event
|
|
2052
|
+
*/
|
|
2053
|
+
onDropAccepted: j.func,
|
|
2054
|
+
/**
|
|
2055
|
+
* Cb for when the `drop` event occurs.
|
|
2056
|
+
* Note that if no files are rejected, this callback is not invoked.
|
|
2057
|
+
*
|
|
2058
|
+
* @param {FileRejection[]} fileRejections
|
|
2059
|
+
* @param {(DragEvent|Event)} event
|
|
2060
|
+
*/
|
|
2061
|
+
onDropRejected: j.func,
|
|
2062
|
+
/**
|
|
2063
|
+
* Cb for when there's some error from any of the promises.
|
|
2064
|
+
*
|
|
2065
|
+
* @param {Error} error
|
|
2066
|
+
*/
|
|
2067
|
+
onError: j.func,
|
|
2068
|
+
/**
|
|
2069
|
+
* Custom validation function. It must return null if there's no errors.
|
|
2070
|
+
* @param {File} file
|
|
2071
|
+
* @returns {FileError|FileError[]|null}
|
|
2072
|
+
*/
|
|
2073
|
+
validator: j.func
|
|
2074
|
+
};
|
|
2075
|
+
var cr = {
|
|
2076
|
+
isFocused: !1,
|
|
2077
|
+
isFileDialogActive: !1,
|
|
2078
|
+
isDragActive: !1,
|
|
2079
|
+
isDragAccept: !1,
|
|
2080
|
+
isDragReject: !1,
|
|
2081
|
+
acceptedFiles: [],
|
|
2082
|
+
fileRejections: []
|
|
2083
|
+
};
|
|
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, m = r.maxFiles, u = 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
|
+
return Zt(n);
|
|
2087
|
+
}, [n]), ue = ge(function() {
|
|
2088
|
+
return Xt(n);
|
|
2089
|
+
}, [n]), fe = ge(function() {
|
|
2090
|
+
return typeof k == "function" ? k : $r;
|
|
2091
|
+
}, [k]), se = ge(function() {
|
|
2092
|
+
return typeof D == "function" ? D : $r;
|
|
2093
|
+
}, [D]), L = Ce(null), U = Ce(null), Z = vn(mo, cr), ne = er(Z, 2), ce = ne[0], H = ne[1], c = ce.isFocused, v = ce.isFileDialogActive, w = Ce(typeof window < "u" && window.isSecureContext && q && Jt()), T = function() {
|
|
2094
|
+
!w.current && v && setTimeout(function() {
|
|
2095
|
+
if (U.current) {
|
|
2096
|
+
var b = U.current.files;
|
|
2097
|
+
b.length || (H({
|
|
2098
|
+
type: "closeDialog"
|
|
2099
|
+
}), se());
|
|
2100
|
+
}
|
|
2101
|
+
}, 300);
|
|
2102
|
+
};
|
|
2103
|
+
xe(function() {
|
|
2104
|
+
return window.addEventListener("focus", T, !1), function() {
|
|
2105
|
+
window.removeEventListener("focus", T, !1);
|
|
2106
|
+
};
|
|
2107
|
+
}, [U, v, se, w]);
|
|
2108
|
+
var h = Ce([]), x = function(b) {
|
|
2109
|
+
L.current && L.current.contains(b.target) || (b.preventDefault(), h.current = []);
|
|
2110
|
+
};
|
|
2111
|
+
xe(function() {
|
|
2112
|
+
return N && (document.addEventListener("dragover", kr, !1), document.addEventListener("drop", x, !1)), function() {
|
|
2113
|
+
N && (document.removeEventListener("dragover", kr), document.removeEventListener("drop", x));
|
|
2114
|
+
};
|
|
2115
|
+
}, [L, N]), xe(function() {
|
|
2116
|
+
return !t && re && L.current && L.current.focus(), function() {
|
|
2117
|
+
};
|
|
2118
|
+
}, [L, re, t]);
|
|
2119
|
+
var _ = X(function(d) {
|
|
2120
|
+
le ? le(d) : console.error(d);
|
|
2121
|
+
}, [le]), O = X(function(d) {
|
|
2122
|
+
d.preventDefault(), d.persist(), Pe(d), h.current = [].concat(io(h.current), [d.target]), Ie(d) && Promise.resolve(i(d)).then(function(b) {
|
|
2123
|
+
if (!(Ne(d) && !ee)) {
|
|
2124
|
+
var B = b.length, K = B > 0 && Kt({
|
|
2125
|
+
files: b,
|
|
2126
|
+
accept: ie,
|
|
2127
|
+
minSize: s,
|
|
2128
|
+
maxSize: o,
|
|
2129
|
+
multiple: a,
|
|
2130
|
+
maxFiles: m,
|
|
2131
|
+
validator: oe
|
|
2132
|
+
}), J = B > 0 && !K;
|
|
2133
|
+
H({
|
|
2134
|
+
isDragAccept: K,
|
|
2135
|
+
isDragReject: J,
|
|
2136
|
+
isDragActive: !0,
|
|
2137
|
+
type: "setDraggedFiles"
|
|
2138
|
+
}), u && u(d);
|
|
2139
|
+
}
|
|
2140
|
+
}).catch(function(b) {
|
|
2141
|
+
return _(b);
|
|
2142
|
+
});
|
|
2143
|
+
}, [i, u, _, ee, ie, s, o, a, m, oe]), S = X(function(d) {
|
|
2144
|
+
d.preventDefault(), d.persist(), Pe(d);
|
|
2145
|
+
var b = Ie(d);
|
|
2146
|
+
if (b && d.dataTransfer)
|
|
2147
|
+
try {
|
|
2148
|
+
d.dataTransfer.dropEffect = "copy";
|
|
2149
|
+
} catch {
|
|
2150
|
+
}
|
|
2151
|
+
return b && g && g(d), !1;
|
|
2152
|
+
}, [g, ee]), A = X(function(d) {
|
|
2153
|
+
d.preventDefault(), d.persist(), Pe(d);
|
|
2154
|
+
var b = h.current.filter(function(K) {
|
|
2155
|
+
return L.current && L.current.contains(K);
|
|
2156
|
+
}), B = b.indexOf(d.target);
|
|
2157
|
+
B !== -1 && b.splice(B, 1), h.current = b, !(b.length > 0) && (H({
|
|
2158
|
+
type: "setDraggedFiles",
|
|
2159
|
+
isDragActive: !1,
|
|
2160
|
+
isDragAccept: !1,
|
|
2161
|
+
isDragReject: !1
|
|
2162
|
+
}), Ie(d) && y && y(d));
|
|
2163
|
+
}, [L, y, ee]), C = X(function(d, b) {
|
|
2164
|
+
var B = [], K = [];
|
|
2165
|
+
d.forEach(function(J) {
|
|
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
|
+
if (Be && qe && !Ke)
|
|
2168
|
+
B.push(J);
|
|
2169
|
+
else {
|
|
2170
|
+
var Ue = [We, He];
|
|
2171
|
+
Ke && (Ue = Ue.concat(Ke)), K.push({
|
|
2172
|
+
file: J,
|
|
2173
|
+
errors: Ue.filter(function(fn) {
|
|
2174
|
+
return fn;
|
|
2175
|
+
})
|
|
2176
|
+
});
|
|
2177
|
+
}
|
|
2178
|
+
}), (!a && B.length > 1 || a && m >= 1 && B.length > m) && (B.forEach(function(J) {
|
|
2179
|
+
K.push({
|
|
2180
|
+
file: J,
|
|
2181
|
+
errors: [Ht]
|
|
2182
|
+
});
|
|
2183
|
+
}), B.splice(0)), H({
|
|
2184
|
+
acceptedFiles: B,
|
|
2185
|
+
fileRejections: K,
|
|
2186
|
+
type: "setFiles"
|
|
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, m, E, P, R, oe]), W = X(function(d) {
|
|
2189
|
+
d.preventDefault(), d.persist(), Pe(d), h.current = [], Ie(d) && Promise.resolve(i(d)).then(function(b) {
|
|
2190
|
+
Ne(d) && !ee || C(b, d);
|
|
2191
|
+
}).catch(function(b) {
|
|
2192
|
+
return _(b);
|
|
2193
|
+
}), H({
|
|
2194
|
+
type: "reset"
|
|
2195
|
+
});
|
|
2196
|
+
}, [i, C, _, ee]), p = X(function() {
|
|
2197
|
+
if (w.current) {
|
|
2198
|
+
H({
|
|
2199
|
+
type: "openDialog"
|
|
2200
|
+
}), fe();
|
|
2201
|
+
var d = {
|
|
2202
|
+
multiple: a,
|
|
2203
|
+
types: ue
|
|
2204
|
+
};
|
|
2205
|
+
window.showOpenFilePicker(d).then(function(b) {
|
|
2206
|
+
return i(b);
|
|
2207
|
+
}).then(function(b) {
|
|
2208
|
+
C(b, null), H({
|
|
2209
|
+
type: "closeDialog"
|
|
2210
|
+
});
|
|
2211
|
+
}).catch(function(b) {
|
|
2212
|
+
Qt(b) ? (se(b), H({
|
|
2213
|
+
type: "closeDialog"
|
|
2214
|
+
})) : eo(b) ? (w.current = !1, U.current ? (U.current.value = null, U.current.click()) : _(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))) : _(b);
|
|
2215
|
+
});
|
|
2216
|
+
return;
|
|
2217
|
+
}
|
|
2218
|
+
U.current && (H({
|
|
2219
|
+
type: "openDialog"
|
|
2220
|
+
}), fe(), U.current.value = null, U.current.click());
|
|
2221
|
+
}, [H, fe, se, q, C, _, ue, a]), V = X(function(d) {
|
|
2222
|
+
!L.current || !L.current.isEqualNode(d.target) || (d.key === " " || d.key === "Enter" || d.keyCode === 32 || d.keyCode === 13) && (d.preventDefault(), p());
|
|
2223
|
+
}, [L, p]), pe = X(function() {
|
|
2224
|
+
H({
|
|
2225
|
+
type: "focus"
|
|
2226
|
+
});
|
|
2227
|
+
}, []), Te = X(function() {
|
|
2228
|
+
H({
|
|
2229
|
+
type: "blur"
|
|
2230
|
+
});
|
|
2231
|
+
}, []), dr = X(function() {
|
|
2232
|
+
$ || (Vt() ? setTimeout(p, 0) : p());
|
|
2233
|
+
}, [$, p]), ve = function(b) {
|
|
2234
|
+
return t ? null : b;
|
|
2235
|
+
}, ze = function(b) {
|
|
2236
|
+
return f ? null : ve(b);
|
|
2237
|
+
}, Ae = function(b) {
|
|
2238
|
+
return G ? null : ve(b);
|
|
2239
|
+
}, Pe = function(b) {
|
|
2240
|
+
ee && b.stopPropagation();
|
|
2241
|
+
}, cn = ge(function() {
|
|
2242
|
+
return function() {
|
|
2243
|
+
var d = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, b = d.refKey, B = b === void 0 ? "ref" : b, K = d.role, J = d.onKeyDown, Oe = d.onFocus, ye = d.onBlur, Be = d.onClick, We = d.onDragEnter, Ye = d.onDragOver, Re = d.onDragLeave, qe = d.onDrop, He = $e(d, to);
|
|
2244
|
+
return M(M(sr({
|
|
2245
|
+
onKeyDown: ze(te(J, V)),
|
|
2246
|
+
onFocus: ze(te(Oe, pe)),
|
|
2247
|
+
onBlur: ze(te(ye, Te)),
|
|
2248
|
+
onClick: ve(te(Be, dr)),
|
|
2249
|
+
onDragEnter: Ae(te(We, O)),
|
|
2250
|
+
onDragOver: Ae(te(Ye, S)),
|
|
2251
|
+
onDragLeave: Ae(te(Re, A)),
|
|
2252
|
+
onDrop: Ae(te(qe, W)),
|
|
2253
|
+
role: typeof K == "string" && K !== "" ? K : "presentation"
|
|
2254
|
+
}, B, L), !t && !f ? {
|
|
2255
|
+
tabIndex: 0
|
|
2256
|
+
} : {}), He);
|
|
2257
|
+
};
|
|
2258
|
+
}, [L, V, pe, Te, dr, O, S, A, W, f, G, t]), ln = X(function(d) {
|
|
2259
|
+
d.stopPropagation();
|
|
2260
|
+
}, []), un = ge(function() {
|
|
2261
|
+
return function() {
|
|
2262
|
+
var d = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, b = d.refKey, B = b === void 0 ? "ref" : b, K = d.onChange, J = d.onClick, Oe = $e(d, oo), ye = sr({
|
|
2263
|
+
accept: ie,
|
|
2264
|
+
multiple: a,
|
|
2265
|
+
type: "file",
|
|
2266
|
+
style: {
|
|
2267
|
+
display: "none"
|
|
2268
|
+
},
|
|
2269
|
+
onChange: ve(te(K, W)),
|
|
2270
|
+
onClick: ve(te(J, ln)),
|
|
2271
|
+
tabIndex: -1
|
|
2272
|
+
}, B, U);
|
|
2273
|
+
return M(M({}, ye), Oe);
|
|
2274
|
+
};
|
|
2275
|
+
}, [U, n, a, W, t]);
|
|
2276
|
+
return M(M({}, ce), {}, {
|
|
2277
|
+
isFocused: c && !t,
|
|
2278
|
+
getRootProps: cn,
|
|
2279
|
+
getInputProps: un,
|
|
2280
|
+
rootRef: L,
|
|
2281
|
+
inputRef: U,
|
|
2282
|
+
open: ve(p)
|
|
2283
|
+
});
|
|
2284
|
+
}
|
|
2285
|
+
function mo(e, r) {
|
|
2286
|
+
switch (r.type) {
|
|
2287
|
+
case "focus":
|
|
2288
|
+
return M(M({}, e), {}, {
|
|
2289
|
+
isFocused: !0
|
|
2290
|
+
});
|
|
2291
|
+
case "blur":
|
|
2292
|
+
return M(M({}, e), {}, {
|
|
2293
|
+
isFocused: !1
|
|
2294
|
+
});
|
|
2295
|
+
case "openDialog":
|
|
2296
|
+
return M(M({}, cr), {}, {
|
|
2297
|
+
isFileDialogActive: !0
|
|
2298
|
+
});
|
|
2299
|
+
case "closeDialog":
|
|
2300
|
+
return M(M({}, e), {}, {
|
|
2301
|
+
isFileDialogActive: !1
|
|
2302
|
+
});
|
|
2303
|
+
case "setDraggedFiles":
|
|
2304
|
+
return M(M({}, e), {}, {
|
|
2305
|
+
isDragActive: r.isDragActive,
|
|
2306
|
+
isDragAccept: r.isDragAccept,
|
|
2307
|
+
isDragReject: r.isDragReject
|
|
2308
|
+
});
|
|
2309
|
+
case "setFiles":
|
|
2310
|
+
return M(M({}, e), {}, {
|
|
2311
|
+
acceptedFiles: r.acceptedFiles,
|
|
2312
|
+
fileRejections: r.fileRejections
|
|
2313
|
+
});
|
|
2314
|
+
case "reset":
|
|
2315
|
+
return M({}, cr);
|
|
2316
|
+
default:
|
|
2317
|
+
return e;
|
|
2318
|
+
}
|
|
2319
|
+
}
|
|
2320
|
+
function $r() {
|
|
2321
|
+
}
|
|
2322
|
+
const Oo = ({
|
|
2323
|
+
onFileUpload: e
|
|
2324
|
+
}) => {
|
|
2325
|
+
const { getRootProps: r } = sn({
|
|
2326
|
+
onDrop: e
|
|
2327
|
+
});
|
|
2328
|
+
return /* @__PURE__ */ l("div", { ...r(), className: "file-upload", "data-testid": "file-upload", children: /* @__PURE__ */ l("button", { className: "file-upload__button", children: "Drag and drop files here or click to upload" }) });
|
|
2329
|
+
};
|
|
2330
|
+
const vo = ({
|
|
2331
|
+
items: e,
|
|
2332
|
+
selectedItems: r,
|
|
2333
|
+
disabledItems: n,
|
|
2334
|
+
header: t,
|
|
2335
|
+
updateItems: i,
|
|
2336
|
+
isOpen: o,
|
|
2337
|
+
...s
|
|
2338
|
+
}) => /* @__PURE__ */ l(Ur, { isVisible: o, children: /* @__PURE__ */ ae("div", { className: "multi-select__dropdown", role: "listbox", ...s, children: [
|
|
2339
|
+
t && /* @__PURE__ */ l("h5", { className: "multi-select__dropdown-header", children: t }),
|
|
2340
|
+
/* @__PURE__ */ l("ul", { className: "multi-select__dropdown-list", children: e.map((a) => /* @__PURE__ */ l("li", { className: "multi-select__dropdown-item", children: /* @__PURE__ */ l(
|
|
2341
|
+
On,
|
|
2342
|
+
{
|
|
2343
|
+
disabled: n.includes(a),
|
|
2344
|
+
label: a,
|
|
2345
|
+
checked: r.includes(a),
|
|
2346
|
+
onChange: () => i(
|
|
2347
|
+
r.includes(a) ? r.filter((m) => m !== a) : [...r, a]
|
|
2348
|
+
)
|
|
2349
|
+
}
|
|
2350
|
+
) }, a)) }),
|
|
2351
|
+
/* @__PURE__ */ ae("div", { className: "multi-select__buttons", children: [
|
|
2352
|
+
/* @__PURE__ */ l(
|
|
2353
|
+
_e,
|
|
2354
|
+
{
|
|
2355
|
+
appearance: "link",
|
|
2356
|
+
onClick: () => {
|
|
2357
|
+
const a = e.filter(
|
|
2358
|
+
(m) => !n.includes(m)
|
|
2359
|
+
);
|
|
2360
|
+
i([...r, ...a]);
|
|
2361
|
+
},
|
|
2362
|
+
type: "button",
|
|
2363
|
+
children: "Select all"
|
|
2364
|
+
}
|
|
2365
|
+
),
|
|
2366
|
+
/* @__PURE__ */ l(
|
|
2367
|
+
_e,
|
|
2368
|
+
{
|
|
2369
|
+
appearance: "link",
|
|
2370
|
+
onClick: () => {
|
|
2371
|
+
const a = r.filter(
|
|
2372
|
+
(m) => n.includes(m)
|
|
2373
|
+
);
|
|
2374
|
+
i(a);
|
|
2375
|
+
},
|
|
2376
|
+
type: "button",
|
|
2377
|
+
children: "Clear"
|
|
2378
|
+
}
|
|
2379
|
+
)
|
|
2380
|
+
] })
|
|
2381
|
+
] }) }), Co = ({
|
|
2382
|
+
disabled: e,
|
|
2383
|
+
selectedItems: r = [],
|
|
2384
|
+
label: n,
|
|
2385
|
+
onItemsUpdate: t,
|
|
2386
|
+
placeholder: i = "Select items",
|
|
2387
|
+
required: o = !1,
|
|
2388
|
+
items: s = [],
|
|
2389
|
+
disabledItems: a = [],
|
|
2390
|
+
header: m
|
|
2391
|
+
}) => {
|
|
2392
|
+
const u = Cn(() => {
|
|
2393
|
+
g(!1);
|
|
2394
|
+
});
|
|
2395
|
+
xn(() => g(!1));
|
|
2396
|
+
const [y, g] = be(!1), [E, P] = be("");
|
|
2397
|
+
xe(() => {
|
|
2398
|
+
y || P("");
|
|
2399
|
+
}, [y]);
|
|
2400
|
+
const [R, D] = be(
|
|
2401
|
+
[]
|
|
2402
|
+
), k = r || R, q = (f) => {
|
|
2403
|
+
const G = Array.from(new Set(f));
|
|
2404
|
+
D(G), t && t(G);
|
|
2405
|
+
}, re = k.map((f) => /* @__PURE__ */ l("li", { className: "multi-select__selected-item", "aria-label": f, children: f }, f)), N = rr(), $ = rr();
|
|
2406
|
+
return /* @__PURE__ */ l("div", { ref: u, children: /* @__PURE__ */ ae("div", { className: "multi-select", children: [
|
|
2407
|
+
k.length > 0 && /* @__PURE__ */ l("ul", { className: "multi-select__selected-list", "aria-label": "selected", children: re }),
|
|
2408
|
+
/* @__PURE__ */ l(
|
|
2409
|
+
Lr,
|
|
2410
|
+
{
|
|
2411
|
+
"aria-controls": N,
|
|
2412
|
+
"aria-expanded": y,
|
|
2413
|
+
id: $,
|
|
2414
|
+
role: "combobox",
|
|
2415
|
+
label: n,
|
|
2416
|
+
disabled: e,
|
|
2417
|
+
autoComplete: "off",
|
|
2418
|
+
onChange: (f) => P(f.target.value),
|
|
2419
|
+
onFocus: () => g(!0),
|
|
2420
|
+
placeholder: i,
|
|
2421
|
+
required: o,
|
|
2422
|
+
type: "text",
|
|
2423
|
+
value: E,
|
|
2424
|
+
className: "multi-select__input"
|
|
2425
|
+
}
|
|
2426
|
+
),
|
|
2427
|
+
/* @__PURE__ */ l(
|
|
2428
|
+
vo,
|
|
2429
|
+
{
|
|
2430
|
+
id: N,
|
|
2431
|
+
isOpen: y,
|
|
2432
|
+
items: E.length > 0 ? s.filter((f) => f.includes(E)) : s,
|
|
2433
|
+
selectedItems: k,
|
|
2434
|
+
disabledItems: a,
|
|
2435
|
+
header: m,
|
|
2436
|
+
updateItems: q
|
|
2437
|
+
}
|
|
2438
|
+
)
|
|
2439
|
+
] }) });
|
|
2440
|
+
};
|
|
490
2441
|
export {
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
2442
|
+
Le as ContentSection,
|
|
2443
|
+
_o as ExternalLink,
|
|
2444
|
+
Oo as FileUpload,
|
|
2445
|
+
ur as FormSection,
|
|
2446
|
+
Yr as InputGroup,
|
|
2447
|
+
Kr as MainToolbar,
|
|
2448
|
+
An as Meter,
|
|
2449
|
+
Co as MultiSelect,
|
|
2450
|
+
vo as MultiSelectDropdown,
|
|
2451
|
+
Y as Navigation,
|
|
2452
|
+
Zn as NavigationBar,
|
|
2453
|
+
Eo as NestedFormGroup,
|
|
2454
|
+
ft as Pagination,
|
|
2455
|
+
wo as PaginationContainer,
|
|
2456
|
+
To as Stepper,
|
|
2457
|
+
ho as defaultFilledColors,
|
|
2458
|
+
me as meterColor,
|
|
2459
|
+
he as testIds
|
|
506
2460
|
};
|