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