@leancodepl/image-uploader 9.7.2 → 9.7.3

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.
Files changed (43) hide show
  1. package/CHANGELOG.md +133 -0
  2. package/LICENSE +201 -0
  3. package/dist/index.d.ts +6 -0
  4. package/dist/index.d.ts.map +1 -0
  5. package/dist/index.js +3903 -0
  6. package/dist/index.umd.cjs +86 -0
  7. package/{src → dist}/lib/UploadImages/Cropper.d.ts +3 -2
  8. package/dist/lib/UploadImages/Cropper.d.ts.map +1 -0
  9. package/{src → dist}/lib/UploadImages/CropperEditor.d.ts +2 -1
  10. package/dist/lib/UploadImages/CropperEditor.d.ts.map +1 -0
  11. package/{src → dist}/lib/UploadImages/File.d.ts +3 -2
  12. package/dist/lib/UploadImages/File.d.ts.map +1 -0
  13. package/{src → dist}/lib/UploadImages/Files.d.ts +3 -2
  14. package/dist/lib/UploadImages/Files.d.ts.map +1 -0
  15. package/{src → dist}/lib/UploadImages/Provider.d.ts +3 -2
  16. package/dist/lib/UploadImages/Provider.d.ts.map +1 -0
  17. package/{src → dist}/lib/UploadImages/Root.d.ts +3 -2
  18. package/dist/lib/UploadImages/Root.d.ts.map +1 -0
  19. package/{src → dist}/lib/UploadImages/Zone.d.ts +3 -2
  20. package/dist/lib/UploadImages/Zone.d.ts.map +1 -0
  21. package/dist/lib/UploadImages/index.d.ts +21 -0
  22. package/dist/lib/UploadImages/index.d.ts.map +1 -0
  23. package/{src → dist}/lib/_hooks/useCropper.d.ts +9 -8
  24. package/dist/lib/_hooks/useCropper.d.ts.map +1 -0
  25. package/{src → dist}/lib/_hooks/useUploadImages.d.ts +19 -18
  26. package/dist/lib/_hooks/useUploadImages.d.ts.map +1 -0
  27. package/{src → dist}/lib/_utils/errors.d.ts +2 -1
  28. package/dist/lib/_utils/errors.d.ts.map +1 -0
  29. package/{src → dist}/lib/_utils/getImagePreviewData.d.ts +1 -0
  30. package/dist/lib/_utils/getImagePreviewData.d.ts.map +1 -0
  31. package/{src → dist}/lib/_utils/isExactFile.d.ts +1 -0
  32. package/dist/lib/_utils/isExactFile.d.ts.map +1 -0
  33. package/{src → dist}/lib/_utils/tryUploadWithUploadParams.d.ts +2 -1
  34. package/dist/lib/_utils/tryUploadWithUploadParams.d.ts.map +1 -0
  35. package/{src → dist}/lib/config.d.ts +2 -1
  36. package/dist/lib/config.d.ts.map +1 -0
  37. package/{src → dist}/lib/types.d.ts +2 -1
  38. package/dist/lib/types.d.ts.map +1 -0
  39. package/package.json +20 -6
  40. package/index.d.ts +0 -1
  41. package/index.esm.js +0 -651
  42. package/src/index.d.ts +0 -5
  43. package/src/lib/UploadImages/index.d.ts +0 -20
package/dist/index.js ADDED
@@ -0,0 +1,3903 @@
1
+ import * as se from "react";
2
+ import Ei, { useMemo as ge, useRef as Pe, useReducer as ki, useEffect as Ie, useCallback as N, forwardRef as Ci, useImperativeHandle as _i, Fragment as Ri, useContext as Di, createContext as Si, useState as le } from "react";
3
+ import { jsx as ue, jsxs as ji } from "react/jsx-runtime";
4
+ function vt(t) {
5
+ return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
6
+ }
7
+ var Te = { exports: {} }, Ae = { exports: {} }, I = {};
8
+ var yt;
9
+ function Pi() {
10
+ if (yt) return I;
11
+ yt = 1;
12
+ var t = typeof Symbol == "function" && Symbol.for, i = t ? /* @__PURE__ */ Symbol.for("react.element") : 60103, e = t ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, n = t ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, a = t ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, o = t ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, r = t ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, p = t ? /* @__PURE__ */ Symbol.for("react.context") : 60110, c = t ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, s = t ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, l = t ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, v = t ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, h = t ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, b = t ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, w = t ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, y = t ? /* @__PURE__ */ Symbol.for("react.block") : 60121, g = t ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, z = t ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, R = t ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
13
+ function C(u) {
14
+ if (typeof u == "object" && u !== null) {
15
+ var U = u.$$typeof;
16
+ switch (U) {
17
+ case i:
18
+ switch (u = u.type, u) {
19
+ case c:
20
+ case s:
21
+ case n:
22
+ case o:
23
+ case a:
24
+ case v:
25
+ return u;
26
+ default:
27
+ switch (u = u && u.$$typeof, u) {
28
+ case p:
29
+ case l:
30
+ case w:
31
+ case b:
32
+ case r:
33
+ return u;
34
+ default:
35
+ return U;
36
+ }
37
+ }
38
+ case e:
39
+ return U;
40
+ }
41
+ }
42
+ }
43
+ function O(u) {
44
+ return C(u) === s;
45
+ }
46
+ return I.AsyncMode = c, I.ConcurrentMode = s, I.ContextConsumer = p, I.ContextProvider = r, I.Element = i, I.ForwardRef = l, I.Fragment = n, I.Lazy = w, I.Memo = b, I.Portal = e, I.Profiler = o, I.StrictMode = a, I.Suspense = v, I.isAsyncMode = function(u) {
47
+ return O(u) || C(u) === c;
48
+ }, I.isConcurrentMode = O, I.isContextConsumer = function(u) {
49
+ return C(u) === p;
50
+ }, I.isContextProvider = function(u) {
51
+ return C(u) === r;
52
+ }, I.isElement = function(u) {
53
+ return typeof u == "object" && u !== null && u.$$typeof === i;
54
+ }, I.isForwardRef = function(u) {
55
+ return C(u) === l;
56
+ }, I.isFragment = function(u) {
57
+ return C(u) === n;
58
+ }, I.isLazy = function(u) {
59
+ return C(u) === w;
60
+ }, I.isMemo = function(u) {
61
+ return C(u) === b;
62
+ }, I.isPortal = function(u) {
63
+ return C(u) === e;
64
+ }, I.isProfiler = function(u) {
65
+ return C(u) === o;
66
+ }, I.isStrictMode = function(u) {
67
+ return C(u) === a;
68
+ }, I.isSuspense = function(u) {
69
+ return C(u) === v;
70
+ }, I.isValidElementType = function(u) {
71
+ return typeof u == "string" || typeof u == "function" || u === n || u === s || u === o || u === a || u === v || u === h || typeof u == "object" && u !== null && (u.$$typeof === w || u.$$typeof === b || u.$$typeof === r || u.$$typeof === p || u.$$typeof === l || u.$$typeof === g || u.$$typeof === z || u.$$typeof === R || u.$$typeof === y);
72
+ }, I.typeOf = C, I;
73
+ }
74
+ var M = {};
75
+ var bt;
76
+ function Ti() {
77
+ return bt || (bt = 1, process.env.NODE_ENV !== "production" && (function() {
78
+ var t = typeof Symbol == "function" && Symbol.for, i = t ? /* @__PURE__ */ Symbol.for("react.element") : 60103, e = t ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, n = t ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, a = t ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, o = t ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, r = t ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, p = t ? /* @__PURE__ */ Symbol.for("react.context") : 60110, c = t ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, s = t ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, l = t ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, v = t ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, h = t ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, b = t ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, w = t ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, y = t ? /* @__PURE__ */ Symbol.for("react.block") : 60121, g = t ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, z = t ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, R = t ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
79
+ function C(m) {
80
+ return typeof m == "string" || typeof m == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
81
+ m === n || m === s || m === o || m === a || m === v || m === h || typeof m == "object" && m !== null && (m.$$typeof === w || m.$$typeof === b || m.$$typeof === r || m.$$typeof === p || m.$$typeof === l || m.$$typeof === g || m.$$typeof === z || m.$$typeof === R || m.$$typeof === y);
82
+ }
83
+ function O(m) {
84
+ if (typeof m == "object" && m !== null) {
85
+ var te = m.$$typeof;
86
+ switch (te) {
87
+ case i:
88
+ var me = m.type;
89
+ switch (me) {
90
+ case c:
91
+ case s:
92
+ case n:
93
+ case o:
94
+ case a:
95
+ case v:
96
+ return me;
97
+ default:
98
+ var we = me && me.$$typeof;
99
+ switch (we) {
100
+ case p:
101
+ case l:
102
+ case w:
103
+ case b:
104
+ case r:
105
+ return we;
106
+ default:
107
+ return te;
108
+ }
109
+ }
110
+ case e:
111
+ return te;
112
+ }
113
+ }
114
+ }
115
+ var u = c, U = s, G = p, ne = r, Q = i, L = l, Y = n, ae = w, oe = b, W = e, B = o, ee = a, re = v, pe = !1;
116
+ function X(m) {
117
+ return pe || (pe = !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.")), d(m) || O(m) === c;
118
+ }
119
+ function d(m) {
120
+ return O(m) === s;
121
+ }
122
+ function x(m) {
123
+ return O(m) === p;
124
+ }
125
+ function D(m) {
126
+ return O(m) === r;
127
+ }
128
+ function S(m) {
129
+ return typeof m == "object" && m !== null && m.$$typeof === i;
130
+ }
131
+ function k(m) {
132
+ return O(m) === l;
133
+ }
134
+ function T(m) {
135
+ return O(m) === n;
136
+ }
137
+ function _(m) {
138
+ return O(m) === w;
139
+ }
140
+ function j(m) {
141
+ return O(m) === b;
142
+ }
143
+ function A(m) {
144
+ return O(m) === e;
145
+ }
146
+ function F(m) {
147
+ return O(m) === o;
148
+ }
149
+ function P(m) {
150
+ return O(m) === a;
151
+ }
152
+ function Z(m) {
153
+ return O(m) === v;
154
+ }
155
+ M.AsyncMode = u, M.ConcurrentMode = U, M.ContextConsumer = G, M.ContextProvider = ne, M.Element = Q, M.ForwardRef = L, M.Fragment = Y, M.Lazy = ae, M.Memo = oe, M.Portal = W, M.Profiler = B, M.StrictMode = ee, M.Suspense = re, M.isAsyncMode = X, M.isConcurrentMode = d, M.isContextConsumer = x, M.isContextProvider = D, M.isElement = S, M.isForwardRef = k, M.isFragment = T, M.isLazy = _, M.isMemo = j, M.isPortal = A, M.isProfiler = F, M.isStrictMode = P, M.isSuspense = Z, M.isValidElementType = C, M.typeOf = O;
156
+ })()), M;
157
+ }
158
+ var wt;
159
+ function Xt() {
160
+ return wt || (wt = 1, process.env.NODE_ENV === "production" ? Ae.exports = Pi() : Ae.exports = Ti()), Ae.exports;
161
+ }
162
+ var Ve, Et;
163
+ function Ai() {
164
+ if (Et) return Ve;
165
+ Et = 1;
166
+ var t = Object.getOwnPropertySymbols, i = Object.prototype.hasOwnProperty, e = Object.prototype.propertyIsEnumerable;
167
+ function n(o) {
168
+ if (o == null)
169
+ throw new TypeError("Object.assign cannot be called with null or undefined");
170
+ return Object(o);
171
+ }
172
+ function a() {
173
+ try {
174
+ if (!Object.assign)
175
+ return !1;
176
+ var o = new String("abc");
177
+ if (o[5] = "de", Object.getOwnPropertyNames(o)[0] === "5")
178
+ return !1;
179
+ for (var r = {}, p = 0; p < 10; p++)
180
+ r["_" + String.fromCharCode(p)] = p;
181
+ var c = Object.getOwnPropertyNames(r).map(function(l) {
182
+ return r[l];
183
+ });
184
+ if (c.join("") !== "0123456789")
185
+ return !1;
186
+ var s = {};
187
+ return "abcdefghijklmnopqrst".split("").forEach(function(l) {
188
+ s[l] = l;
189
+ }), Object.keys(Object.assign({}, s)).join("") === "abcdefghijklmnopqrst";
190
+ } catch {
191
+ return !1;
192
+ }
193
+ }
194
+ return Ve = a() ? Object.assign : function(o, r) {
195
+ for (var p, c = n(o), s, l = 1; l < arguments.length; l++) {
196
+ p = Object(arguments[l]);
197
+ for (var v in p)
198
+ i.call(p, v) && (c[v] = p[v]);
199
+ if (t) {
200
+ s = t(p);
201
+ for (var h = 0; h < s.length; h++)
202
+ e.call(p, s[h]) && (c[s[h]] = p[s[h]]);
203
+ }
204
+ }
205
+ return c;
206
+ }, Ve;
207
+ }
208
+ var Ge, kt;
209
+ function xt() {
210
+ if (kt) return Ge;
211
+ kt = 1;
212
+ var t = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
213
+ return Ge = t, Ge;
214
+ }
215
+ var Xe, Ct;
216
+ function Jt() {
217
+ return Ct || (Ct = 1, Xe = Function.call.bind(Object.prototype.hasOwnProperty)), Xe;
218
+ }
219
+ var Je, _t;
220
+ function zi() {
221
+ if (_t) return Je;
222
+ _t = 1;
223
+ var t = function() {
224
+ };
225
+ if (process.env.NODE_ENV !== "production") {
226
+ var i = /* @__PURE__ */ xt(), e = {}, n = /* @__PURE__ */ Jt();
227
+ t = function(o) {
228
+ var r = "Warning: " + o;
229
+ typeof console < "u" && console.error(r);
230
+ try {
231
+ throw new Error(r);
232
+ } catch {
233
+ }
234
+ };
235
+ }
236
+ function a(o, r, p, c, s) {
237
+ if (process.env.NODE_ENV !== "production") {
238
+ for (var l in o)
239
+ if (n(o, l)) {
240
+ var v;
241
+ try {
242
+ if (typeof o[l] != "function") {
243
+ var h = Error(
244
+ (c || "React class") + ": " + p + " type `" + l + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof o[l] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
245
+ );
246
+ throw h.name = "Invariant Violation", h;
247
+ }
248
+ v = o[l](r, l, c, p, null, i);
249
+ } catch (w) {
250
+ v = w;
251
+ }
252
+ if (v && !(v instanceof Error) && t(
253
+ (c || "React class") + ": type specification of " + p + " `" + l + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof v + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
254
+ ), v instanceof Error && !(v.message in e)) {
255
+ e[v.message] = !0;
256
+ var b = s ? s() : "";
257
+ t(
258
+ "Failed " + p + " type: " + v.message + (b ?? "")
259
+ );
260
+ }
261
+ }
262
+ }
263
+ }
264
+ return a.resetWarningCache = function() {
265
+ process.env.NODE_ENV !== "production" && (e = {});
266
+ }, Je = a, Je;
267
+ }
268
+ var Qe, Rt;
269
+ function Oi() {
270
+ if (Rt) return Qe;
271
+ Rt = 1;
272
+ var t = Xt(), i = Ai(), e = /* @__PURE__ */ xt(), n = /* @__PURE__ */ Jt(), a = /* @__PURE__ */ zi(), o = function() {
273
+ };
274
+ process.env.NODE_ENV !== "production" && (o = function(p) {
275
+ var c = "Warning: " + p;
276
+ typeof console < "u" && console.error(c);
277
+ try {
278
+ throw new Error(c);
279
+ } catch {
280
+ }
281
+ });
282
+ function r() {
283
+ return null;
284
+ }
285
+ return Qe = function(p, c) {
286
+ var s = typeof Symbol == "function" && Symbol.iterator, l = "@@iterator";
287
+ function v(d) {
288
+ var x = d && (s && d[s] || d[l]);
289
+ if (typeof x == "function")
290
+ return x;
291
+ }
292
+ var h = "<<anonymous>>", b = {
293
+ array: z("array"),
294
+ bigint: z("bigint"),
295
+ bool: z("boolean"),
296
+ func: z("function"),
297
+ number: z("number"),
298
+ object: z("object"),
299
+ string: z("string"),
300
+ symbol: z("symbol"),
301
+ any: R(),
302
+ arrayOf: C,
303
+ element: O(),
304
+ elementType: u(),
305
+ instanceOf: U,
306
+ node: L(),
307
+ objectOf: ne,
308
+ oneOf: G,
309
+ oneOfType: Q,
310
+ shape: ae,
311
+ exact: oe
312
+ };
313
+ function w(d, x) {
314
+ return d === x ? d !== 0 || 1 / d === 1 / x : d !== d && x !== x;
315
+ }
316
+ function y(d, x) {
317
+ this.message = d, this.data = x && typeof x == "object" ? x : {}, this.stack = "";
318
+ }
319
+ y.prototype = Error.prototype;
320
+ function g(d) {
321
+ if (process.env.NODE_ENV !== "production")
322
+ var x = {}, D = 0;
323
+ function S(T, _, j, A, F, P, Z) {
324
+ if (A = A || h, P = P || j, Z !== e) {
325
+ if (c) {
326
+ var m = new Error(
327
+ "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"
328
+ );
329
+ throw m.name = "Invariant Violation", m;
330
+ } else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
331
+ var te = A + ":" + j;
332
+ !x[te] && // Avoid spamming the console because they are often not actionable except for lib authors
333
+ D < 3 && (o(
334
+ "You are manually calling a React.PropTypes validation function for the `" + P + "` prop on `" + A + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
335
+ ), x[te] = !0, D++);
336
+ }
337
+ }
338
+ return _[j] == null ? T ? _[j] === null ? new y("The " + F + " `" + P + "` is marked as required " + ("in `" + A + "`, but its value is `null`.")) : new y("The " + F + " `" + P + "` is marked as required in " + ("`" + A + "`, but its value is `undefined`.")) : null : d(_, j, A, F, P);
339
+ }
340
+ var k = S.bind(null, !1);
341
+ return k.isRequired = S.bind(null, !0), k;
342
+ }
343
+ function z(d) {
344
+ function x(D, S, k, T, _, j) {
345
+ var A = D[S], F = ee(A);
346
+ if (F !== d) {
347
+ var P = re(A);
348
+ return new y(
349
+ "Invalid " + T + " `" + _ + "` of type " + ("`" + P + "` supplied to `" + k + "`, expected ") + ("`" + d + "`."),
350
+ { expectedType: d }
351
+ );
352
+ }
353
+ return null;
354
+ }
355
+ return g(x);
356
+ }
357
+ function R() {
358
+ return g(r);
359
+ }
360
+ function C(d) {
361
+ function x(D, S, k, T, _) {
362
+ if (typeof d != "function")
363
+ return new y("Property `" + _ + "` of component `" + k + "` has invalid PropType notation inside arrayOf.");
364
+ var j = D[S];
365
+ if (!Array.isArray(j)) {
366
+ var A = ee(j);
367
+ return new y("Invalid " + T + " `" + _ + "` of type " + ("`" + A + "` supplied to `" + k + "`, expected an array."));
368
+ }
369
+ for (var F = 0; F < j.length; F++) {
370
+ var P = d(j, F, k, T, _ + "[" + F + "]", e);
371
+ if (P instanceof Error)
372
+ return P;
373
+ }
374
+ return null;
375
+ }
376
+ return g(x);
377
+ }
378
+ function O() {
379
+ function d(x, D, S, k, T) {
380
+ var _ = x[D];
381
+ if (!p(_)) {
382
+ var j = ee(_);
383
+ return new y("Invalid " + k + " `" + T + "` of type " + ("`" + j + "` supplied to `" + S + "`, expected a single ReactElement."));
384
+ }
385
+ return null;
386
+ }
387
+ return g(d);
388
+ }
389
+ function u() {
390
+ function d(x, D, S, k, T) {
391
+ var _ = x[D];
392
+ if (!t.isValidElementType(_)) {
393
+ var j = ee(_);
394
+ return new y("Invalid " + k + " `" + T + "` of type " + ("`" + j + "` supplied to `" + S + "`, expected a single ReactElement type."));
395
+ }
396
+ return null;
397
+ }
398
+ return g(d);
399
+ }
400
+ function U(d) {
401
+ function x(D, S, k, T, _) {
402
+ if (!(D[S] instanceof d)) {
403
+ var j = d.name || h, A = X(D[S]);
404
+ return new y("Invalid " + T + " `" + _ + "` of type " + ("`" + A + "` supplied to `" + k + "`, expected ") + ("instance of `" + j + "`."));
405
+ }
406
+ return null;
407
+ }
408
+ return g(x);
409
+ }
410
+ function G(d) {
411
+ if (!Array.isArray(d))
412
+ return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? o(
413
+ "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])."
414
+ ) : o("Invalid argument supplied to oneOf, expected an array.")), r;
415
+ function x(D, S, k, T, _) {
416
+ for (var j = D[S], A = 0; A < d.length; A++)
417
+ if (w(j, d[A]))
418
+ return null;
419
+ var F = JSON.stringify(d, function(Z, m) {
420
+ var te = re(m);
421
+ return te === "symbol" ? String(m) : m;
422
+ });
423
+ return new y("Invalid " + T + " `" + _ + "` of value `" + String(j) + "` " + ("supplied to `" + k + "`, expected one of " + F + "."));
424
+ }
425
+ return g(x);
426
+ }
427
+ function ne(d) {
428
+ function x(D, S, k, T, _) {
429
+ if (typeof d != "function")
430
+ return new y("Property `" + _ + "` of component `" + k + "` has invalid PropType notation inside objectOf.");
431
+ var j = D[S], A = ee(j);
432
+ if (A !== "object")
433
+ return new y("Invalid " + T + " `" + _ + "` of type " + ("`" + A + "` supplied to `" + k + "`, expected an object."));
434
+ for (var F in j)
435
+ if (n(j, F)) {
436
+ var P = d(j, F, k, T, _ + "." + F, e);
437
+ if (P instanceof Error)
438
+ return P;
439
+ }
440
+ return null;
441
+ }
442
+ return g(x);
443
+ }
444
+ function Q(d) {
445
+ if (!Array.isArray(d))
446
+ return process.env.NODE_ENV !== "production" && o("Invalid argument supplied to oneOfType, expected an instance of array."), r;
447
+ for (var x = 0; x < d.length; x++) {
448
+ var D = d[x];
449
+ if (typeof D != "function")
450
+ return o(
451
+ "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + pe(D) + " at index " + x + "."
452
+ ), r;
453
+ }
454
+ function S(k, T, _, j, A) {
455
+ for (var F = [], P = 0; P < d.length; P++) {
456
+ var Z = d[P], m = Z(k, T, _, j, A, e);
457
+ if (m == null)
458
+ return null;
459
+ m.data && n(m.data, "expectedType") && F.push(m.data.expectedType);
460
+ }
461
+ var te = F.length > 0 ? ", expected one of type [" + F.join(", ") + "]" : "";
462
+ return new y("Invalid " + j + " `" + A + "` supplied to " + ("`" + _ + "`" + te + "."));
463
+ }
464
+ return g(S);
465
+ }
466
+ function L() {
467
+ function d(x, D, S, k, T) {
468
+ return W(x[D]) ? null : new y("Invalid " + k + " `" + T + "` supplied to " + ("`" + S + "`, expected a ReactNode."));
469
+ }
470
+ return g(d);
471
+ }
472
+ function Y(d, x, D, S, k) {
473
+ return new y(
474
+ (d || "React class") + ": " + x + " type `" + D + "." + S + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + k + "`."
475
+ );
476
+ }
477
+ function ae(d) {
478
+ function x(D, S, k, T, _) {
479
+ var j = D[S], A = ee(j);
480
+ if (A !== "object")
481
+ return new y("Invalid " + T + " `" + _ + "` of type `" + A + "` " + ("supplied to `" + k + "`, expected `object`."));
482
+ for (var F in d) {
483
+ var P = d[F];
484
+ if (typeof P != "function")
485
+ return Y(k, T, _, F, re(P));
486
+ var Z = P(j, F, k, T, _ + "." + F, e);
487
+ if (Z)
488
+ return Z;
489
+ }
490
+ return null;
491
+ }
492
+ return g(x);
493
+ }
494
+ function oe(d) {
495
+ function x(D, S, k, T, _) {
496
+ var j = D[S], A = ee(j);
497
+ if (A !== "object")
498
+ return new y("Invalid " + T + " `" + _ + "` of type `" + A + "` " + ("supplied to `" + k + "`, expected `object`."));
499
+ var F = i({}, D[S], d);
500
+ for (var P in F) {
501
+ var Z = d[P];
502
+ if (n(d, P) && typeof Z != "function")
503
+ return Y(k, T, _, P, re(Z));
504
+ if (!Z)
505
+ return new y(
506
+ "Invalid " + T + " `" + _ + "` key `" + P + "` supplied to `" + k + "`.\nBad object: " + JSON.stringify(D[S], null, " ") + `
507
+ Valid keys: ` + JSON.stringify(Object.keys(d), null, " ")
508
+ );
509
+ var m = Z(j, P, k, T, _ + "." + P, e);
510
+ if (m)
511
+ return m;
512
+ }
513
+ return null;
514
+ }
515
+ return g(x);
516
+ }
517
+ function W(d) {
518
+ switch (typeof d) {
519
+ case "number":
520
+ case "string":
521
+ case "undefined":
522
+ return !0;
523
+ case "boolean":
524
+ return !d;
525
+ case "object":
526
+ if (Array.isArray(d))
527
+ return d.every(W);
528
+ if (d === null || p(d))
529
+ return !0;
530
+ var x = v(d);
531
+ if (x) {
532
+ var D = x.call(d), S;
533
+ if (x !== d.entries) {
534
+ for (; !(S = D.next()).done; )
535
+ if (!W(S.value))
536
+ return !1;
537
+ } else
538
+ for (; !(S = D.next()).done; ) {
539
+ var k = S.value;
540
+ if (k && !W(k[1]))
541
+ return !1;
542
+ }
543
+ } else
544
+ return !1;
545
+ return !0;
546
+ default:
547
+ return !1;
548
+ }
549
+ }
550
+ function B(d, x) {
551
+ return d === "symbol" ? !0 : x ? x["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && x instanceof Symbol : !1;
552
+ }
553
+ function ee(d) {
554
+ var x = typeof d;
555
+ return Array.isArray(d) ? "array" : d instanceof RegExp ? "object" : B(x, d) ? "symbol" : x;
556
+ }
557
+ function re(d) {
558
+ if (typeof d > "u" || d === null)
559
+ return "" + d;
560
+ var x = ee(d);
561
+ if (x === "object") {
562
+ if (d instanceof Date)
563
+ return "date";
564
+ if (d instanceof RegExp)
565
+ return "regexp";
566
+ }
567
+ return x;
568
+ }
569
+ function pe(d) {
570
+ var x = re(d);
571
+ switch (x) {
572
+ case "array":
573
+ case "object":
574
+ return "an " + x;
575
+ case "boolean":
576
+ case "date":
577
+ case "regexp":
578
+ return "a " + x;
579
+ default:
580
+ return x;
581
+ }
582
+ }
583
+ function X(d) {
584
+ return !d.constructor || !d.constructor.name ? h : d.constructor.name;
585
+ }
586
+ return b.checkPropTypes = a, b.resetWarningCache = a.resetWarningCache, b.PropTypes = b, b;
587
+ }, Qe;
588
+ }
589
+ var et, Dt;
590
+ function Fi() {
591
+ if (Dt) return et;
592
+ Dt = 1;
593
+ var t = /* @__PURE__ */ xt();
594
+ function i() {
595
+ }
596
+ function e() {
597
+ }
598
+ return e.resetWarningCache = i, et = function() {
599
+ function n(r, p, c, s, l, v) {
600
+ if (v !== t) {
601
+ var h = new Error(
602
+ "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"
603
+ );
604
+ throw h.name = "Invariant Violation", h;
605
+ }
606
+ }
607
+ n.isRequired = n;
608
+ function a() {
609
+ return n;
610
+ }
611
+ var o = {
612
+ array: n,
613
+ bigint: n,
614
+ bool: n,
615
+ func: n,
616
+ number: n,
617
+ object: n,
618
+ string: n,
619
+ symbol: n,
620
+ any: n,
621
+ arrayOf: a,
622
+ element: n,
623
+ elementType: n,
624
+ instanceOf: a,
625
+ node: n,
626
+ objectOf: a,
627
+ oneOf: a,
628
+ oneOfType: a,
629
+ shape: a,
630
+ exact: a,
631
+ checkPropTypes: e,
632
+ resetWarningCache: i
633
+ };
634
+ return o.PropTypes = o, o;
635
+ }, et;
636
+ }
637
+ var St;
638
+ function Ii() {
639
+ if (St) return Te.exports;
640
+ if (St = 1, process.env.NODE_ENV !== "production") {
641
+ var t = Xt(), i = !0;
642
+ Te.exports = /* @__PURE__ */ Oi()(t.isElement, i);
643
+ } else
644
+ Te.exports = /* @__PURE__ */ Fi()();
645
+ return Te.exports;
646
+ }
647
+ var Mi = /* @__PURE__ */ Ii();
648
+ const q = /* @__PURE__ */ vt(Mi);
649
+ var st = function(t, i) {
650
+ return st = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, n) {
651
+ e.__proto__ = n;
652
+ } || function(e, n) {
653
+ for (var a in n) Object.prototype.hasOwnProperty.call(n, a) && (e[a] = n[a]);
654
+ }, st(t, i);
655
+ };
656
+ function qi(t, i) {
657
+ if (typeof i != "function" && i !== null)
658
+ throw new TypeError("Class extends value " + String(i) + " is not a constructor or null");
659
+ st(t, i);
660
+ function e() {
661
+ this.constructor = t;
662
+ }
663
+ t.prototype = i === null ? Object.create(i) : (e.prototype = i.prototype, new e());
664
+ }
665
+ var V = function() {
666
+ return V = Object.assign || function(i) {
667
+ for (var e, n = 1, a = arguments.length; n < a; n++) {
668
+ e = arguments[n];
669
+ for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (i[o] = e[o]);
670
+ }
671
+ return i;
672
+ }, V.apply(this, arguments);
673
+ };
674
+ function ve(t, i, e, n) {
675
+ function a(o) {
676
+ return o instanceof e ? o : new e(function(r) {
677
+ r(o);
678
+ });
679
+ }
680
+ return new (e || (e = Promise))(function(o, r) {
681
+ function p(l) {
682
+ try {
683
+ s(n.next(l));
684
+ } catch (v) {
685
+ r(v);
686
+ }
687
+ }
688
+ function c(l) {
689
+ try {
690
+ s(n.throw(l));
691
+ } catch (v) {
692
+ r(v);
693
+ }
694
+ }
695
+ function s(l) {
696
+ l.done ? o(l.value) : a(l.value).then(p, c);
697
+ }
698
+ s((n = n.apply(t, i || [])).next());
699
+ });
700
+ }
701
+ const Li = /* @__PURE__ */ new Map([
702
+ // https://github.com/guzzle/psr7/blob/2d9260799e713f1c475d3c5fdc3d6561ff7441b2/src/MimeType.php
703
+ ["1km", "application/vnd.1000minds.decision-model+xml"],
704
+ ["3dml", "text/vnd.in3d.3dml"],
705
+ ["3ds", "image/x-3ds"],
706
+ ["3g2", "video/3gpp2"],
707
+ ["3gp", "video/3gp"],
708
+ ["3gpp", "video/3gpp"],
709
+ ["3mf", "model/3mf"],
710
+ ["7z", "application/x-7z-compressed"],
711
+ ["7zip", "application/x-7z-compressed"],
712
+ ["123", "application/vnd.lotus-1-2-3"],
713
+ ["aab", "application/x-authorware-bin"],
714
+ ["aac", "audio/x-acc"],
715
+ ["aam", "application/x-authorware-map"],
716
+ ["aas", "application/x-authorware-seg"],
717
+ ["abw", "application/x-abiword"],
718
+ ["ac", "application/vnd.nokia.n-gage.ac+xml"],
719
+ ["ac3", "audio/ac3"],
720
+ ["acc", "application/vnd.americandynamics.acc"],
721
+ ["ace", "application/x-ace-compressed"],
722
+ ["acu", "application/vnd.acucobol"],
723
+ ["acutc", "application/vnd.acucorp"],
724
+ ["adp", "audio/adpcm"],
725
+ ["aep", "application/vnd.audiograph"],
726
+ ["afm", "application/x-font-type1"],
727
+ ["afp", "application/vnd.ibm.modcap"],
728
+ ["ahead", "application/vnd.ahead.space"],
729
+ ["ai", "application/pdf"],
730
+ ["aif", "audio/x-aiff"],
731
+ ["aifc", "audio/x-aiff"],
732
+ ["aiff", "audio/x-aiff"],
733
+ ["air", "application/vnd.adobe.air-application-installer-package+zip"],
734
+ ["ait", "application/vnd.dvb.ait"],
735
+ ["ami", "application/vnd.amiga.ami"],
736
+ ["amr", "audio/amr"],
737
+ ["apk", "application/vnd.android.package-archive"],
738
+ ["apng", "image/apng"],
739
+ ["appcache", "text/cache-manifest"],
740
+ ["application", "application/x-ms-application"],
741
+ ["apr", "application/vnd.lotus-approach"],
742
+ ["arc", "application/x-freearc"],
743
+ ["arj", "application/x-arj"],
744
+ ["asc", "application/pgp-signature"],
745
+ ["asf", "video/x-ms-asf"],
746
+ ["asm", "text/x-asm"],
747
+ ["aso", "application/vnd.accpac.simply.aso"],
748
+ ["asx", "video/x-ms-asf"],
749
+ ["atc", "application/vnd.acucorp"],
750
+ ["atom", "application/atom+xml"],
751
+ ["atomcat", "application/atomcat+xml"],
752
+ ["atomdeleted", "application/atomdeleted+xml"],
753
+ ["atomsvc", "application/atomsvc+xml"],
754
+ ["atx", "application/vnd.antix.game-component"],
755
+ ["au", "audio/x-au"],
756
+ ["avi", "video/x-msvideo"],
757
+ ["avif", "image/avif"],
758
+ ["aw", "application/applixware"],
759
+ ["azf", "application/vnd.airzip.filesecure.azf"],
760
+ ["azs", "application/vnd.airzip.filesecure.azs"],
761
+ ["azv", "image/vnd.airzip.accelerator.azv"],
762
+ ["azw", "application/vnd.amazon.ebook"],
763
+ ["b16", "image/vnd.pco.b16"],
764
+ ["bat", "application/x-msdownload"],
765
+ ["bcpio", "application/x-bcpio"],
766
+ ["bdf", "application/x-font-bdf"],
767
+ ["bdm", "application/vnd.syncml.dm+wbxml"],
768
+ ["bdoc", "application/x-bdoc"],
769
+ ["bed", "application/vnd.realvnc.bed"],
770
+ ["bh2", "application/vnd.fujitsu.oasysprs"],
771
+ ["bin", "application/octet-stream"],
772
+ ["blb", "application/x-blorb"],
773
+ ["blorb", "application/x-blorb"],
774
+ ["bmi", "application/vnd.bmi"],
775
+ ["bmml", "application/vnd.balsamiq.bmml+xml"],
776
+ ["bmp", "image/bmp"],
777
+ ["book", "application/vnd.framemaker"],
778
+ ["box", "application/vnd.previewsystems.box"],
779
+ ["boz", "application/x-bzip2"],
780
+ ["bpk", "application/octet-stream"],
781
+ ["bpmn", "application/octet-stream"],
782
+ ["bsp", "model/vnd.valve.source.compiled-map"],
783
+ ["btif", "image/prs.btif"],
784
+ ["buffer", "application/octet-stream"],
785
+ ["bz", "application/x-bzip"],
786
+ ["bz2", "application/x-bzip2"],
787
+ ["c", "text/x-c"],
788
+ ["c4d", "application/vnd.clonk.c4group"],
789
+ ["c4f", "application/vnd.clonk.c4group"],
790
+ ["c4g", "application/vnd.clonk.c4group"],
791
+ ["c4p", "application/vnd.clonk.c4group"],
792
+ ["c4u", "application/vnd.clonk.c4group"],
793
+ ["c11amc", "application/vnd.cluetrust.cartomobile-config"],
794
+ ["c11amz", "application/vnd.cluetrust.cartomobile-config-pkg"],
795
+ ["cab", "application/vnd.ms-cab-compressed"],
796
+ ["caf", "audio/x-caf"],
797
+ ["cap", "application/vnd.tcpdump.pcap"],
798
+ ["car", "application/vnd.curl.car"],
799
+ ["cat", "application/vnd.ms-pki.seccat"],
800
+ ["cb7", "application/x-cbr"],
801
+ ["cba", "application/x-cbr"],
802
+ ["cbr", "application/x-cbr"],
803
+ ["cbt", "application/x-cbr"],
804
+ ["cbz", "application/x-cbr"],
805
+ ["cc", "text/x-c"],
806
+ ["cco", "application/x-cocoa"],
807
+ ["cct", "application/x-director"],
808
+ ["ccxml", "application/ccxml+xml"],
809
+ ["cdbcmsg", "application/vnd.contact.cmsg"],
810
+ ["cda", "application/x-cdf"],
811
+ ["cdf", "application/x-netcdf"],
812
+ ["cdfx", "application/cdfx+xml"],
813
+ ["cdkey", "application/vnd.mediastation.cdkey"],
814
+ ["cdmia", "application/cdmi-capability"],
815
+ ["cdmic", "application/cdmi-container"],
816
+ ["cdmid", "application/cdmi-domain"],
817
+ ["cdmio", "application/cdmi-object"],
818
+ ["cdmiq", "application/cdmi-queue"],
819
+ ["cdr", "application/cdr"],
820
+ ["cdx", "chemical/x-cdx"],
821
+ ["cdxml", "application/vnd.chemdraw+xml"],
822
+ ["cdy", "application/vnd.cinderella"],
823
+ ["cer", "application/pkix-cert"],
824
+ ["cfs", "application/x-cfs-compressed"],
825
+ ["cgm", "image/cgm"],
826
+ ["chat", "application/x-chat"],
827
+ ["chm", "application/vnd.ms-htmlhelp"],
828
+ ["chrt", "application/vnd.kde.kchart"],
829
+ ["cif", "chemical/x-cif"],
830
+ ["cii", "application/vnd.anser-web-certificate-issue-initiation"],
831
+ ["cil", "application/vnd.ms-artgalry"],
832
+ ["cjs", "application/node"],
833
+ ["cla", "application/vnd.claymore"],
834
+ ["class", "application/octet-stream"],
835
+ ["clkk", "application/vnd.crick.clicker.keyboard"],
836
+ ["clkp", "application/vnd.crick.clicker.palette"],
837
+ ["clkt", "application/vnd.crick.clicker.template"],
838
+ ["clkw", "application/vnd.crick.clicker.wordbank"],
839
+ ["clkx", "application/vnd.crick.clicker"],
840
+ ["clp", "application/x-msclip"],
841
+ ["cmc", "application/vnd.cosmocaller"],
842
+ ["cmdf", "chemical/x-cmdf"],
843
+ ["cml", "chemical/x-cml"],
844
+ ["cmp", "application/vnd.yellowriver-custom-menu"],
845
+ ["cmx", "image/x-cmx"],
846
+ ["cod", "application/vnd.rim.cod"],
847
+ ["coffee", "text/coffeescript"],
848
+ ["com", "application/x-msdownload"],
849
+ ["conf", "text/plain"],
850
+ ["cpio", "application/x-cpio"],
851
+ ["cpp", "text/x-c"],
852
+ ["cpt", "application/mac-compactpro"],
853
+ ["crd", "application/x-mscardfile"],
854
+ ["crl", "application/pkix-crl"],
855
+ ["crt", "application/x-x509-ca-cert"],
856
+ ["crx", "application/x-chrome-extension"],
857
+ ["cryptonote", "application/vnd.rig.cryptonote"],
858
+ ["csh", "application/x-csh"],
859
+ ["csl", "application/vnd.citationstyles.style+xml"],
860
+ ["csml", "chemical/x-csml"],
861
+ ["csp", "application/vnd.commonspace"],
862
+ ["csr", "application/octet-stream"],
863
+ ["css", "text/css"],
864
+ ["cst", "application/x-director"],
865
+ ["csv", "text/csv"],
866
+ ["cu", "application/cu-seeme"],
867
+ ["curl", "text/vnd.curl"],
868
+ ["cww", "application/prs.cww"],
869
+ ["cxt", "application/x-director"],
870
+ ["cxx", "text/x-c"],
871
+ ["dae", "model/vnd.collada+xml"],
872
+ ["daf", "application/vnd.mobius.daf"],
873
+ ["dart", "application/vnd.dart"],
874
+ ["dataless", "application/vnd.fdsn.seed"],
875
+ ["davmount", "application/davmount+xml"],
876
+ ["dbf", "application/vnd.dbf"],
877
+ ["dbk", "application/docbook+xml"],
878
+ ["dcr", "application/x-director"],
879
+ ["dcurl", "text/vnd.curl.dcurl"],
880
+ ["dd2", "application/vnd.oma.dd2+xml"],
881
+ ["ddd", "application/vnd.fujixerox.ddd"],
882
+ ["ddf", "application/vnd.syncml.dmddf+xml"],
883
+ ["dds", "image/vnd.ms-dds"],
884
+ ["deb", "application/x-debian-package"],
885
+ ["def", "text/plain"],
886
+ ["deploy", "application/octet-stream"],
887
+ ["der", "application/x-x509-ca-cert"],
888
+ ["dfac", "application/vnd.dreamfactory"],
889
+ ["dgc", "application/x-dgc-compressed"],
890
+ ["dic", "text/x-c"],
891
+ ["dir", "application/x-director"],
892
+ ["dis", "application/vnd.mobius.dis"],
893
+ ["disposition-notification", "message/disposition-notification"],
894
+ ["dist", "application/octet-stream"],
895
+ ["distz", "application/octet-stream"],
896
+ ["djv", "image/vnd.djvu"],
897
+ ["djvu", "image/vnd.djvu"],
898
+ ["dll", "application/octet-stream"],
899
+ ["dmg", "application/x-apple-diskimage"],
900
+ ["dmn", "application/octet-stream"],
901
+ ["dmp", "application/vnd.tcpdump.pcap"],
902
+ ["dms", "application/octet-stream"],
903
+ ["dna", "application/vnd.dna"],
904
+ ["doc", "application/msword"],
905
+ ["docm", "application/vnd.ms-word.template.macroEnabled.12"],
906
+ ["docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document"],
907
+ ["dot", "application/msword"],
908
+ ["dotm", "application/vnd.ms-word.template.macroEnabled.12"],
909
+ ["dotx", "application/vnd.openxmlformats-officedocument.wordprocessingml.template"],
910
+ ["dp", "application/vnd.osgi.dp"],
911
+ ["dpg", "application/vnd.dpgraph"],
912
+ ["dra", "audio/vnd.dra"],
913
+ ["drle", "image/dicom-rle"],
914
+ ["dsc", "text/prs.lines.tag"],
915
+ ["dssc", "application/dssc+der"],
916
+ ["dtb", "application/x-dtbook+xml"],
917
+ ["dtd", "application/xml-dtd"],
918
+ ["dts", "audio/vnd.dts"],
919
+ ["dtshd", "audio/vnd.dts.hd"],
920
+ ["dump", "application/octet-stream"],
921
+ ["dvb", "video/vnd.dvb.file"],
922
+ ["dvi", "application/x-dvi"],
923
+ ["dwd", "application/atsc-dwd+xml"],
924
+ ["dwf", "model/vnd.dwf"],
925
+ ["dwg", "image/vnd.dwg"],
926
+ ["dxf", "image/vnd.dxf"],
927
+ ["dxp", "application/vnd.spotfire.dxp"],
928
+ ["dxr", "application/x-director"],
929
+ ["ear", "application/java-archive"],
930
+ ["ecelp4800", "audio/vnd.nuera.ecelp4800"],
931
+ ["ecelp7470", "audio/vnd.nuera.ecelp7470"],
932
+ ["ecelp9600", "audio/vnd.nuera.ecelp9600"],
933
+ ["ecma", "application/ecmascript"],
934
+ ["edm", "application/vnd.novadigm.edm"],
935
+ ["edx", "application/vnd.novadigm.edx"],
936
+ ["efif", "application/vnd.picsel"],
937
+ ["ei6", "application/vnd.pg.osasli"],
938
+ ["elc", "application/octet-stream"],
939
+ ["emf", "image/emf"],
940
+ ["eml", "message/rfc822"],
941
+ ["emma", "application/emma+xml"],
942
+ ["emotionml", "application/emotionml+xml"],
943
+ ["emz", "application/x-msmetafile"],
944
+ ["eol", "audio/vnd.digital-winds"],
945
+ ["eot", "application/vnd.ms-fontobject"],
946
+ ["eps", "application/postscript"],
947
+ ["epub", "application/epub+zip"],
948
+ ["es", "application/ecmascript"],
949
+ ["es3", "application/vnd.eszigno3+xml"],
950
+ ["esa", "application/vnd.osgi.subsystem"],
951
+ ["esf", "application/vnd.epson.esf"],
952
+ ["et3", "application/vnd.eszigno3+xml"],
953
+ ["etx", "text/x-setext"],
954
+ ["eva", "application/x-eva"],
955
+ ["evy", "application/x-envoy"],
956
+ ["exe", "application/octet-stream"],
957
+ ["exi", "application/exi"],
958
+ ["exp", "application/express"],
959
+ ["exr", "image/aces"],
960
+ ["ext", "application/vnd.novadigm.ext"],
961
+ ["ez", "application/andrew-inset"],
962
+ ["ez2", "application/vnd.ezpix-album"],
963
+ ["ez3", "application/vnd.ezpix-package"],
964
+ ["f", "text/x-fortran"],
965
+ ["f4v", "video/mp4"],
966
+ ["f77", "text/x-fortran"],
967
+ ["f90", "text/x-fortran"],
968
+ ["fbs", "image/vnd.fastbidsheet"],
969
+ ["fcdt", "application/vnd.adobe.formscentral.fcdt"],
970
+ ["fcs", "application/vnd.isac.fcs"],
971
+ ["fdf", "application/vnd.fdf"],
972
+ ["fdt", "application/fdt+xml"],
973
+ ["fe_launch", "application/vnd.denovo.fcselayout-link"],
974
+ ["fg5", "application/vnd.fujitsu.oasysgp"],
975
+ ["fgd", "application/x-director"],
976
+ ["fh", "image/x-freehand"],
977
+ ["fh4", "image/x-freehand"],
978
+ ["fh5", "image/x-freehand"],
979
+ ["fh7", "image/x-freehand"],
980
+ ["fhc", "image/x-freehand"],
981
+ ["fig", "application/x-xfig"],
982
+ ["fits", "image/fits"],
983
+ ["flac", "audio/x-flac"],
984
+ ["fli", "video/x-fli"],
985
+ ["flo", "application/vnd.micrografx.flo"],
986
+ ["flv", "video/x-flv"],
987
+ ["flw", "application/vnd.kde.kivio"],
988
+ ["flx", "text/vnd.fmi.flexstor"],
989
+ ["fly", "text/vnd.fly"],
990
+ ["fm", "application/vnd.framemaker"],
991
+ ["fnc", "application/vnd.frogans.fnc"],
992
+ ["fo", "application/vnd.software602.filler.form+xml"],
993
+ ["for", "text/x-fortran"],
994
+ ["fpx", "image/vnd.fpx"],
995
+ ["frame", "application/vnd.framemaker"],
996
+ ["fsc", "application/vnd.fsc.weblaunch"],
997
+ ["fst", "image/vnd.fst"],
998
+ ["ftc", "application/vnd.fluxtime.clip"],
999
+ ["fti", "application/vnd.anser-web-funds-transfer-initiation"],
1000
+ ["fvt", "video/vnd.fvt"],
1001
+ ["fxp", "application/vnd.adobe.fxp"],
1002
+ ["fxpl", "application/vnd.adobe.fxp"],
1003
+ ["fzs", "application/vnd.fuzzysheet"],
1004
+ ["g2w", "application/vnd.geoplan"],
1005
+ ["g3", "image/g3fax"],
1006
+ ["g3w", "application/vnd.geospace"],
1007
+ ["gac", "application/vnd.groove-account"],
1008
+ ["gam", "application/x-tads"],
1009
+ ["gbr", "application/rpki-ghostbusters"],
1010
+ ["gca", "application/x-gca-compressed"],
1011
+ ["gdl", "model/vnd.gdl"],
1012
+ ["gdoc", "application/vnd.google-apps.document"],
1013
+ ["geo", "application/vnd.dynageo"],
1014
+ ["geojson", "application/geo+json"],
1015
+ ["gex", "application/vnd.geometry-explorer"],
1016
+ ["ggb", "application/vnd.geogebra.file"],
1017
+ ["ggt", "application/vnd.geogebra.tool"],
1018
+ ["ghf", "application/vnd.groove-help"],
1019
+ ["gif", "image/gif"],
1020
+ ["gim", "application/vnd.groove-identity-message"],
1021
+ ["glb", "model/gltf-binary"],
1022
+ ["gltf", "model/gltf+json"],
1023
+ ["gml", "application/gml+xml"],
1024
+ ["gmx", "application/vnd.gmx"],
1025
+ ["gnumeric", "application/x-gnumeric"],
1026
+ ["gpg", "application/gpg-keys"],
1027
+ ["gph", "application/vnd.flographit"],
1028
+ ["gpx", "application/gpx+xml"],
1029
+ ["gqf", "application/vnd.grafeq"],
1030
+ ["gqs", "application/vnd.grafeq"],
1031
+ ["gram", "application/srgs"],
1032
+ ["gramps", "application/x-gramps-xml"],
1033
+ ["gre", "application/vnd.geometry-explorer"],
1034
+ ["grv", "application/vnd.groove-injector"],
1035
+ ["grxml", "application/srgs+xml"],
1036
+ ["gsf", "application/x-font-ghostscript"],
1037
+ ["gsheet", "application/vnd.google-apps.spreadsheet"],
1038
+ ["gslides", "application/vnd.google-apps.presentation"],
1039
+ ["gtar", "application/x-gtar"],
1040
+ ["gtm", "application/vnd.groove-tool-message"],
1041
+ ["gtw", "model/vnd.gtw"],
1042
+ ["gv", "text/vnd.graphviz"],
1043
+ ["gxf", "application/gxf"],
1044
+ ["gxt", "application/vnd.geonext"],
1045
+ ["gz", "application/gzip"],
1046
+ ["gzip", "application/gzip"],
1047
+ ["h", "text/x-c"],
1048
+ ["h261", "video/h261"],
1049
+ ["h263", "video/h263"],
1050
+ ["h264", "video/h264"],
1051
+ ["hal", "application/vnd.hal+xml"],
1052
+ ["hbci", "application/vnd.hbci"],
1053
+ ["hbs", "text/x-handlebars-template"],
1054
+ ["hdd", "application/x-virtualbox-hdd"],
1055
+ ["hdf", "application/x-hdf"],
1056
+ ["heic", "image/heic"],
1057
+ ["heics", "image/heic-sequence"],
1058
+ ["heif", "image/heif"],
1059
+ ["heifs", "image/heif-sequence"],
1060
+ ["hej2", "image/hej2k"],
1061
+ ["held", "application/atsc-held+xml"],
1062
+ ["hh", "text/x-c"],
1063
+ ["hjson", "application/hjson"],
1064
+ ["hlp", "application/winhlp"],
1065
+ ["hpgl", "application/vnd.hp-hpgl"],
1066
+ ["hpid", "application/vnd.hp-hpid"],
1067
+ ["hps", "application/vnd.hp-hps"],
1068
+ ["hqx", "application/mac-binhex40"],
1069
+ ["hsj2", "image/hsj2"],
1070
+ ["htc", "text/x-component"],
1071
+ ["htke", "application/vnd.kenameaapp"],
1072
+ ["htm", "text/html"],
1073
+ ["html", "text/html"],
1074
+ ["hvd", "application/vnd.yamaha.hv-dic"],
1075
+ ["hvp", "application/vnd.yamaha.hv-voice"],
1076
+ ["hvs", "application/vnd.yamaha.hv-script"],
1077
+ ["i2g", "application/vnd.intergeo"],
1078
+ ["icc", "application/vnd.iccprofile"],
1079
+ ["ice", "x-conference/x-cooltalk"],
1080
+ ["icm", "application/vnd.iccprofile"],
1081
+ ["ico", "image/x-icon"],
1082
+ ["ics", "text/calendar"],
1083
+ ["ief", "image/ief"],
1084
+ ["ifb", "text/calendar"],
1085
+ ["ifm", "application/vnd.shana.informed.formdata"],
1086
+ ["iges", "model/iges"],
1087
+ ["igl", "application/vnd.igloader"],
1088
+ ["igm", "application/vnd.insors.igm"],
1089
+ ["igs", "model/iges"],
1090
+ ["igx", "application/vnd.micrografx.igx"],
1091
+ ["iif", "application/vnd.shana.informed.interchange"],
1092
+ ["img", "application/octet-stream"],
1093
+ ["imp", "application/vnd.accpac.simply.imp"],
1094
+ ["ims", "application/vnd.ms-ims"],
1095
+ ["in", "text/plain"],
1096
+ ["ini", "text/plain"],
1097
+ ["ink", "application/inkml+xml"],
1098
+ ["inkml", "application/inkml+xml"],
1099
+ ["install", "application/x-install-instructions"],
1100
+ ["iota", "application/vnd.astraea-software.iota"],
1101
+ ["ipfix", "application/ipfix"],
1102
+ ["ipk", "application/vnd.shana.informed.package"],
1103
+ ["irm", "application/vnd.ibm.rights-management"],
1104
+ ["irp", "application/vnd.irepository.package+xml"],
1105
+ ["iso", "application/x-iso9660-image"],
1106
+ ["itp", "application/vnd.shana.informed.formtemplate"],
1107
+ ["its", "application/its+xml"],
1108
+ ["ivp", "application/vnd.immervision-ivp"],
1109
+ ["ivu", "application/vnd.immervision-ivu"],
1110
+ ["jad", "text/vnd.sun.j2me.app-descriptor"],
1111
+ ["jade", "text/jade"],
1112
+ ["jam", "application/vnd.jam"],
1113
+ ["jar", "application/java-archive"],
1114
+ ["jardiff", "application/x-java-archive-diff"],
1115
+ ["java", "text/x-java-source"],
1116
+ ["jhc", "image/jphc"],
1117
+ ["jisp", "application/vnd.jisp"],
1118
+ ["jls", "image/jls"],
1119
+ ["jlt", "application/vnd.hp-jlyt"],
1120
+ ["jng", "image/x-jng"],
1121
+ ["jnlp", "application/x-java-jnlp-file"],
1122
+ ["joda", "application/vnd.joost.joda-archive"],
1123
+ ["jp2", "image/jp2"],
1124
+ ["jpe", "image/jpeg"],
1125
+ ["jpeg", "image/jpeg"],
1126
+ ["jpf", "image/jpx"],
1127
+ ["jpg", "image/jpeg"],
1128
+ ["jpg2", "image/jp2"],
1129
+ ["jpgm", "video/jpm"],
1130
+ ["jpgv", "video/jpeg"],
1131
+ ["jph", "image/jph"],
1132
+ ["jpm", "video/jpm"],
1133
+ ["jpx", "image/jpx"],
1134
+ ["js", "application/javascript"],
1135
+ ["json", "application/json"],
1136
+ ["json5", "application/json5"],
1137
+ ["jsonld", "application/ld+json"],
1138
+ // https://jsonlines.org/
1139
+ ["jsonl", "application/jsonl"],
1140
+ ["jsonml", "application/jsonml+json"],
1141
+ ["jsx", "text/jsx"],
1142
+ ["jxr", "image/jxr"],
1143
+ ["jxra", "image/jxra"],
1144
+ ["jxrs", "image/jxrs"],
1145
+ ["jxs", "image/jxs"],
1146
+ ["jxsc", "image/jxsc"],
1147
+ ["jxsi", "image/jxsi"],
1148
+ ["jxss", "image/jxss"],
1149
+ ["kar", "audio/midi"],
1150
+ ["karbon", "application/vnd.kde.karbon"],
1151
+ ["kdb", "application/octet-stream"],
1152
+ ["kdbx", "application/x-keepass2"],
1153
+ ["key", "application/x-iwork-keynote-sffkey"],
1154
+ ["kfo", "application/vnd.kde.kformula"],
1155
+ ["kia", "application/vnd.kidspiration"],
1156
+ ["kml", "application/vnd.google-earth.kml+xml"],
1157
+ ["kmz", "application/vnd.google-earth.kmz"],
1158
+ ["kne", "application/vnd.kinar"],
1159
+ ["knp", "application/vnd.kinar"],
1160
+ ["kon", "application/vnd.kde.kontour"],
1161
+ ["kpr", "application/vnd.kde.kpresenter"],
1162
+ ["kpt", "application/vnd.kde.kpresenter"],
1163
+ ["kpxx", "application/vnd.ds-keypoint"],
1164
+ ["ksp", "application/vnd.kde.kspread"],
1165
+ ["ktr", "application/vnd.kahootz"],
1166
+ ["ktx", "image/ktx"],
1167
+ ["ktx2", "image/ktx2"],
1168
+ ["ktz", "application/vnd.kahootz"],
1169
+ ["kwd", "application/vnd.kde.kword"],
1170
+ ["kwt", "application/vnd.kde.kword"],
1171
+ ["lasxml", "application/vnd.las.las+xml"],
1172
+ ["latex", "application/x-latex"],
1173
+ ["lbd", "application/vnd.llamagraphics.life-balance.desktop"],
1174
+ ["lbe", "application/vnd.llamagraphics.life-balance.exchange+xml"],
1175
+ ["les", "application/vnd.hhe.lesson-player"],
1176
+ ["less", "text/less"],
1177
+ ["lgr", "application/lgr+xml"],
1178
+ ["lha", "application/octet-stream"],
1179
+ ["link66", "application/vnd.route66.link66+xml"],
1180
+ ["list", "text/plain"],
1181
+ ["list3820", "application/vnd.ibm.modcap"],
1182
+ ["listafp", "application/vnd.ibm.modcap"],
1183
+ ["litcoffee", "text/coffeescript"],
1184
+ ["lnk", "application/x-ms-shortcut"],
1185
+ ["log", "text/plain"],
1186
+ ["lostxml", "application/lost+xml"],
1187
+ ["lrf", "application/octet-stream"],
1188
+ ["lrm", "application/vnd.ms-lrm"],
1189
+ ["ltf", "application/vnd.frogans.ltf"],
1190
+ ["lua", "text/x-lua"],
1191
+ ["luac", "application/x-lua-bytecode"],
1192
+ ["lvp", "audio/vnd.lucent.voice"],
1193
+ ["lwp", "application/vnd.lotus-wordpro"],
1194
+ ["lzh", "application/octet-stream"],
1195
+ ["m1v", "video/mpeg"],
1196
+ ["m2a", "audio/mpeg"],
1197
+ ["m2v", "video/mpeg"],
1198
+ ["m3a", "audio/mpeg"],
1199
+ ["m3u", "text/plain"],
1200
+ ["m3u8", "application/vnd.apple.mpegurl"],
1201
+ ["m4a", "audio/x-m4a"],
1202
+ ["m4p", "application/mp4"],
1203
+ ["m4s", "video/iso.segment"],
1204
+ ["m4u", "application/vnd.mpegurl"],
1205
+ ["m4v", "video/x-m4v"],
1206
+ ["m13", "application/x-msmediaview"],
1207
+ ["m14", "application/x-msmediaview"],
1208
+ ["m21", "application/mp21"],
1209
+ ["ma", "application/mathematica"],
1210
+ ["mads", "application/mads+xml"],
1211
+ ["maei", "application/mmt-aei+xml"],
1212
+ ["mag", "application/vnd.ecowin.chart"],
1213
+ ["maker", "application/vnd.framemaker"],
1214
+ ["man", "text/troff"],
1215
+ ["manifest", "text/cache-manifest"],
1216
+ ["map", "application/json"],
1217
+ ["mar", "application/octet-stream"],
1218
+ ["markdown", "text/markdown"],
1219
+ ["mathml", "application/mathml+xml"],
1220
+ ["mb", "application/mathematica"],
1221
+ ["mbk", "application/vnd.mobius.mbk"],
1222
+ ["mbox", "application/mbox"],
1223
+ ["mc1", "application/vnd.medcalcdata"],
1224
+ ["mcd", "application/vnd.mcd"],
1225
+ ["mcurl", "text/vnd.curl.mcurl"],
1226
+ ["md", "text/markdown"],
1227
+ ["mdb", "application/x-msaccess"],
1228
+ ["mdi", "image/vnd.ms-modi"],
1229
+ ["mdx", "text/mdx"],
1230
+ ["me", "text/troff"],
1231
+ ["mesh", "model/mesh"],
1232
+ ["meta4", "application/metalink4+xml"],
1233
+ ["metalink", "application/metalink+xml"],
1234
+ ["mets", "application/mets+xml"],
1235
+ ["mfm", "application/vnd.mfmp"],
1236
+ ["mft", "application/rpki-manifest"],
1237
+ ["mgp", "application/vnd.osgeo.mapguide.package"],
1238
+ ["mgz", "application/vnd.proteus.magazine"],
1239
+ ["mid", "audio/midi"],
1240
+ ["midi", "audio/midi"],
1241
+ ["mie", "application/x-mie"],
1242
+ ["mif", "application/vnd.mif"],
1243
+ ["mime", "message/rfc822"],
1244
+ ["mj2", "video/mj2"],
1245
+ ["mjp2", "video/mj2"],
1246
+ ["mjs", "application/javascript"],
1247
+ ["mk3d", "video/x-matroska"],
1248
+ ["mka", "audio/x-matroska"],
1249
+ ["mkd", "text/x-markdown"],
1250
+ ["mks", "video/x-matroska"],
1251
+ ["mkv", "video/x-matroska"],
1252
+ ["mlp", "application/vnd.dolby.mlp"],
1253
+ ["mmd", "application/vnd.chipnuts.karaoke-mmd"],
1254
+ ["mmf", "application/vnd.smaf"],
1255
+ ["mml", "text/mathml"],
1256
+ ["mmr", "image/vnd.fujixerox.edmics-mmr"],
1257
+ ["mng", "video/x-mng"],
1258
+ ["mny", "application/x-msmoney"],
1259
+ ["mobi", "application/x-mobipocket-ebook"],
1260
+ ["mods", "application/mods+xml"],
1261
+ ["mov", "video/quicktime"],
1262
+ ["movie", "video/x-sgi-movie"],
1263
+ ["mp2", "audio/mpeg"],
1264
+ ["mp2a", "audio/mpeg"],
1265
+ ["mp3", "audio/mpeg"],
1266
+ ["mp4", "video/mp4"],
1267
+ ["mp4a", "audio/mp4"],
1268
+ ["mp4s", "application/mp4"],
1269
+ ["mp4v", "video/mp4"],
1270
+ ["mp21", "application/mp21"],
1271
+ ["mpc", "application/vnd.mophun.certificate"],
1272
+ ["mpd", "application/dash+xml"],
1273
+ ["mpe", "video/mpeg"],
1274
+ ["mpeg", "video/mpeg"],
1275
+ ["mpg", "video/mpeg"],
1276
+ ["mpg4", "video/mp4"],
1277
+ ["mpga", "audio/mpeg"],
1278
+ ["mpkg", "application/vnd.apple.installer+xml"],
1279
+ ["mpm", "application/vnd.blueice.multipass"],
1280
+ ["mpn", "application/vnd.mophun.application"],
1281
+ ["mpp", "application/vnd.ms-project"],
1282
+ ["mpt", "application/vnd.ms-project"],
1283
+ ["mpy", "application/vnd.ibm.minipay"],
1284
+ ["mqy", "application/vnd.mobius.mqy"],
1285
+ ["mrc", "application/marc"],
1286
+ ["mrcx", "application/marcxml+xml"],
1287
+ ["ms", "text/troff"],
1288
+ ["mscml", "application/mediaservercontrol+xml"],
1289
+ ["mseed", "application/vnd.fdsn.mseed"],
1290
+ ["mseq", "application/vnd.mseq"],
1291
+ ["msf", "application/vnd.epson.msf"],
1292
+ ["msg", "application/vnd.ms-outlook"],
1293
+ ["msh", "model/mesh"],
1294
+ ["msi", "application/x-msdownload"],
1295
+ ["msl", "application/vnd.mobius.msl"],
1296
+ ["msm", "application/octet-stream"],
1297
+ ["msp", "application/octet-stream"],
1298
+ ["msty", "application/vnd.muvee.style"],
1299
+ ["mtl", "model/mtl"],
1300
+ ["mts", "model/vnd.mts"],
1301
+ ["mus", "application/vnd.musician"],
1302
+ ["musd", "application/mmt-usd+xml"],
1303
+ ["musicxml", "application/vnd.recordare.musicxml+xml"],
1304
+ ["mvb", "application/x-msmediaview"],
1305
+ ["mvt", "application/vnd.mapbox-vector-tile"],
1306
+ ["mwf", "application/vnd.mfer"],
1307
+ ["mxf", "application/mxf"],
1308
+ ["mxl", "application/vnd.recordare.musicxml"],
1309
+ ["mxmf", "audio/mobile-xmf"],
1310
+ ["mxml", "application/xv+xml"],
1311
+ ["mxs", "application/vnd.triscape.mxs"],
1312
+ ["mxu", "video/vnd.mpegurl"],
1313
+ ["n-gage", "application/vnd.nokia.n-gage.symbian.install"],
1314
+ ["n3", "text/n3"],
1315
+ ["nb", "application/mathematica"],
1316
+ ["nbp", "application/vnd.wolfram.player"],
1317
+ ["nc", "application/x-netcdf"],
1318
+ ["ncx", "application/x-dtbncx+xml"],
1319
+ ["nfo", "text/x-nfo"],
1320
+ ["ngdat", "application/vnd.nokia.n-gage.data"],
1321
+ ["nitf", "application/vnd.nitf"],
1322
+ ["nlu", "application/vnd.neurolanguage.nlu"],
1323
+ ["nml", "application/vnd.enliven"],
1324
+ ["nnd", "application/vnd.noblenet-directory"],
1325
+ ["nns", "application/vnd.noblenet-sealer"],
1326
+ ["nnw", "application/vnd.noblenet-web"],
1327
+ ["npx", "image/vnd.net-fpx"],
1328
+ ["nq", "application/n-quads"],
1329
+ ["nsc", "application/x-conference"],
1330
+ ["nsf", "application/vnd.lotus-notes"],
1331
+ ["nt", "application/n-triples"],
1332
+ ["ntf", "application/vnd.nitf"],
1333
+ ["numbers", "application/x-iwork-numbers-sffnumbers"],
1334
+ ["nzb", "application/x-nzb"],
1335
+ ["oa2", "application/vnd.fujitsu.oasys2"],
1336
+ ["oa3", "application/vnd.fujitsu.oasys3"],
1337
+ ["oas", "application/vnd.fujitsu.oasys"],
1338
+ ["obd", "application/x-msbinder"],
1339
+ ["obgx", "application/vnd.openblox.game+xml"],
1340
+ ["obj", "model/obj"],
1341
+ ["oda", "application/oda"],
1342
+ ["odb", "application/vnd.oasis.opendocument.database"],
1343
+ ["odc", "application/vnd.oasis.opendocument.chart"],
1344
+ ["odf", "application/vnd.oasis.opendocument.formula"],
1345
+ ["odft", "application/vnd.oasis.opendocument.formula-template"],
1346
+ ["odg", "application/vnd.oasis.opendocument.graphics"],
1347
+ ["odi", "application/vnd.oasis.opendocument.image"],
1348
+ ["odm", "application/vnd.oasis.opendocument.text-master"],
1349
+ ["odp", "application/vnd.oasis.opendocument.presentation"],
1350
+ ["ods", "application/vnd.oasis.opendocument.spreadsheet"],
1351
+ ["odt", "application/vnd.oasis.opendocument.text"],
1352
+ ["oga", "audio/ogg"],
1353
+ ["ogex", "model/vnd.opengex"],
1354
+ ["ogg", "audio/ogg"],
1355
+ ["ogv", "video/ogg"],
1356
+ ["ogx", "application/ogg"],
1357
+ ["omdoc", "application/omdoc+xml"],
1358
+ ["onepkg", "application/onenote"],
1359
+ ["onetmp", "application/onenote"],
1360
+ ["onetoc", "application/onenote"],
1361
+ ["onetoc2", "application/onenote"],
1362
+ ["opf", "application/oebps-package+xml"],
1363
+ ["opml", "text/x-opml"],
1364
+ ["oprc", "application/vnd.palm"],
1365
+ ["opus", "audio/ogg"],
1366
+ ["org", "text/x-org"],
1367
+ ["osf", "application/vnd.yamaha.openscoreformat"],
1368
+ ["osfpvg", "application/vnd.yamaha.openscoreformat.osfpvg+xml"],
1369
+ ["osm", "application/vnd.openstreetmap.data+xml"],
1370
+ ["otc", "application/vnd.oasis.opendocument.chart-template"],
1371
+ ["otf", "font/otf"],
1372
+ ["otg", "application/vnd.oasis.opendocument.graphics-template"],
1373
+ ["oth", "application/vnd.oasis.opendocument.text-web"],
1374
+ ["oti", "application/vnd.oasis.opendocument.image-template"],
1375
+ ["otp", "application/vnd.oasis.opendocument.presentation-template"],
1376
+ ["ots", "application/vnd.oasis.opendocument.spreadsheet-template"],
1377
+ ["ott", "application/vnd.oasis.opendocument.text-template"],
1378
+ ["ova", "application/x-virtualbox-ova"],
1379
+ ["ovf", "application/x-virtualbox-ovf"],
1380
+ ["owl", "application/rdf+xml"],
1381
+ ["oxps", "application/oxps"],
1382
+ ["oxt", "application/vnd.openofficeorg.extension"],
1383
+ ["p", "text/x-pascal"],
1384
+ ["p7a", "application/x-pkcs7-signature"],
1385
+ ["p7b", "application/x-pkcs7-certificates"],
1386
+ ["p7c", "application/pkcs7-mime"],
1387
+ ["p7m", "application/pkcs7-mime"],
1388
+ ["p7r", "application/x-pkcs7-certreqresp"],
1389
+ ["p7s", "application/pkcs7-signature"],
1390
+ ["p8", "application/pkcs8"],
1391
+ ["p10", "application/x-pkcs10"],
1392
+ ["p12", "application/x-pkcs12"],
1393
+ ["pac", "application/x-ns-proxy-autoconfig"],
1394
+ ["pages", "application/x-iwork-pages-sffpages"],
1395
+ ["pas", "text/x-pascal"],
1396
+ ["paw", "application/vnd.pawaafile"],
1397
+ ["pbd", "application/vnd.powerbuilder6"],
1398
+ ["pbm", "image/x-portable-bitmap"],
1399
+ ["pcap", "application/vnd.tcpdump.pcap"],
1400
+ ["pcf", "application/x-font-pcf"],
1401
+ ["pcl", "application/vnd.hp-pcl"],
1402
+ ["pclxl", "application/vnd.hp-pclxl"],
1403
+ ["pct", "image/x-pict"],
1404
+ ["pcurl", "application/vnd.curl.pcurl"],
1405
+ ["pcx", "image/x-pcx"],
1406
+ ["pdb", "application/x-pilot"],
1407
+ ["pde", "text/x-processing"],
1408
+ ["pdf", "application/pdf"],
1409
+ ["pem", "application/x-x509-user-cert"],
1410
+ ["pfa", "application/x-font-type1"],
1411
+ ["pfb", "application/x-font-type1"],
1412
+ ["pfm", "application/x-font-type1"],
1413
+ ["pfr", "application/font-tdpfr"],
1414
+ ["pfx", "application/x-pkcs12"],
1415
+ ["pgm", "image/x-portable-graymap"],
1416
+ ["pgn", "application/x-chess-pgn"],
1417
+ ["pgp", "application/pgp"],
1418
+ ["php", "application/x-httpd-php"],
1419
+ ["php3", "application/x-httpd-php"],
1420
+ ["php4", "application/x-httpd-php"],
1421
+ ["phps", "application/x-httpd-php-source"],
1422
+ ["phtml", "application/x-httpd-php"],
1423
+ ["pic", "image/x-pict"],
1424
+ ["pkg", "application/octet-stream"],
1425
+ ["pki", "application/pkixcmp"],
1426
+ ["pkipath", "application/pkix-pkipath"],
1427
+ ["pkpass", "application/vnd.apple.pkpass"],
1428
+ ["pl", "application/x-perl"],
1429
+ ["plb", "application/vnd.3gpp.pic-bw-large"],
1430
+ ["plc", "application/vnd.mobius.plc"],
1431
+ ["plf", "application/vnd.pocketlearn"],
1432
+ ["pls", "application/pls+xml"],
1433
+ ["pm", "application/x-perl"],
1434
+ ["pml", "application/vnd.ctc-posml"],
1435
+ ["png", "image/png"],
1436
+ ["pnm", "image/x-portable-anymap"],
1437
+ ["portpkg", "application/vnd.macports.portpkg"],
1438
+ ["pot", "application/vnd.ms-powerpoint"],
1439
+ ["potm", "application/vnd.ms-powerpoint.presentation.macroEnabled.12"],
1440
+ ["potx", "application/vnd.openxmlformats-officedocument.presentationml.template"],
1441
+ ["ppa", "application/vnd.ms-powerpoint"],
1442
+ ["ppam", "application/vnd.ms-powerpoint.addin.macroEnabled.12"],
1443
+ ["ppd", "application/vnd.cups-ppd"],
1444
+ ["ppm", "image/x-portable-pixmap"],
1445
+ ["pps", "application/vnd.ms-powerpoint"],
1446
+ ["ppsm", "application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],
1447
+ ["ppsx", "application/vnd.openxmlformats-officedocument.presentationml.slideshow"],
1448
+ ["ppt", "application/powerpoint"],
1449
+ ["pptm", "application/vnd.ms-powerpoint.presentation.macroEnabled.12"],
1450
+ ["pptx", "application/vnd.openxmlformats-officedocument.presentationml.presentation"],
1451
+ ["pqa", "application/vnd.palm"],
1452
+ ["prc", "application/x-pilot"],
1453
+ ["pre", "application/vnd.lotus-freelance"],
1454
+ ["prf", "application/pics-rules"],
1455
+ ["provx", "application/provenance+xml"],
1456
+ ["ps", "application/postscript"],
1457
+ ["psb", "application/vnd.3gpp.pic-bw-small"],
1458
+ ["psd", "application/x-photoshop"],
1459
+ ["psf", "application/x-font-linux-psf"],
1460
+ ["pskcxml", "application/pskc+xml"],
1461
+ ["pti", "image/prs.pti"],
1462
+ ["ptid", "application/vnd.pvi.ptid1"],
1463
+ ["pub", "application/x-mspublisher"],
1464
+ ["pvb", "application/vnd.3gpp.pic-bw-var"],
1465
+ ["pwn", "application/vnd.3m.post-it-notes"],
1466
+ ["pya", "audio/vnd.ms-playready.media.pya"],
1467
+ ["pyv", "video/vnd.ms-playready.media.pyv"],
1468
+ ["qam", "application/vnd.epson.quickanime"],
1469
+ ["qbo", "application/vnd.intu.qbo"],
1470
+ ["qfx", "application/vnd.intu.qfx"],
1471
+ ["qps", "application/vnd.publishare-delta-tree"],
1472
+ ["qt", "video/quicktime"],
1473
+ ["qwd", "application/vnd.quark.quarkxpress"],
1474
+ ["qwt", "application/vnd.quark.quarkxpress"],
1475
+ ["qxb", "application/vnd.quark.quarkxpress"],
1476
+ ["qxd", "application/vnd.quark.quarkxpress"],
1477
+ ["qxl", "application/vnd.quark.quarkxpress"],
1478
+ ["qxt", "application/vnd.quark.quarkxpress"],
1479
+ ["ra", "audio/x-realaudio"],
1480
+ ["ram", "audio/x-pn-realaudio"],
1481
+ ["raml", "application/raml+yaml"],
1482
+ ["rapd", "application/route-apd+xml"],
1483
+ ["rar", "application/x-rar"],
1484
+ ["ras", "image/x-cmu-raster"],
1485
+ ["rcprofile", "application/vnd.ipunplugged.rcprofile"],
1486
+ ["rdf", "application/rdf+xml"],
1487
+ ["rdz", "application/vnd.data-vision.rdz"],
1488
+ ["relo", "application/p2p-overlay+xml"],
1489
+ ["rep", "application/vnd.businessobjects"],
1490
+ ["res", "application/x-dtbresource+xml"],
1491
+ ["rgb", "image/x-rgb"],
1492
+ ["rif", "application/reginfo+xml"],
1493
+ ["rip", "audio/vnd.rip"],
1494
+ ["ris", "application/x-research-info-systems"],
1495
+ ["rl", "application/resource-lists+xml"],
1496
+ ["rlc", "image/vnd.fujixerox.edmics-rlc"],
1497
+ ["rld", "application/resource-lists-diff+xml"],
1498
+ ["rm", "audio/x-pn-realaudio"],
1499
+ ["rmi", "audio/midi"],
1500
+ ["rmp", "audio/x-pn-realaudio-plugin"],
1501
+ ["rms", "application/vnd.jcp.javame.midlet-rms"],
1502
+ ["rmvb", "application/vnd.rn-realmedia-vbr"],
1503
+ ["rnc", "application/relax-ng-compact-syntax"],
1504
+ ["rng", "application/xml"],
1505
+ ["roa", "application/rpki-roa"],
1506
+ ["roff", "text/troff"],
1507
+ ["rp9", "application/vnd.cloanto.rp9"],
1508
+ ["rpm", "audio/x-pn-realaudio-plugin"],
1509
+ ["rpss", "application/vnd.nokia.radio-presets"],
1510
+ ["rpst", "application/vnd.nokia.radio-preset"],
1511
+ ["rq", "application/sparql-query"],
1512
+ ["rs", "application/rls-services+xml"],
1513
+ ["rsa", "application/x-pkcs7"],
1514
+ ["rsat", "application/atsc-rsat+xml"],
1515
+ ["rsd", "application/rsd+xml"],
1516
+ ["rsheet", "application/urc-ressheet+xml"],
1517
+ ["rss", "application/rss+xml"],
1518
+ ["rtf", "text/rtf"],
1519
+ ["rtx", "text/richtext"],
1520
+ ["run", "application/x-makeself"],
1521
+ ["rusd", "application/route-usd+xml"],
1522
+ ["rv", "video/vnd.rn-realvideo"],
1523
+ ["s", "text/x-asm"],
1524
+ ["s3m", "audio/s3m"],
1525
+ ["saf", "application/vnd.yamaha.smaf-audio"],
1526
+ ["sass", "text/x-sass"],
1527
+ ["sbml", "application/sbml+xml"],
1528
+ ["sc", "application/vnd.ibm.secure-container"],
1529
+ ["scd", "application/x-msschedule"],
1530
+ ["scm", "application/vnd.lotus-screencam"],
1531
+ ["scq", "application/scvp-cv-request"],
1532
+ ["scs", "application/scvp-cv-response"],
1533
+ ["scss", "text/x-scss"],
1534
+ ["scurl", "text/vnd.curl.scurl"],
1535
+ ["sda", "application/vnd.stardivision.draw"],
1536
+ ["sdc", "application/vnd.stardivision.calc"],
1537
+ ["sdd", "application/vnd.stardivision.impress"],
1538
+ ["sdkd", "application/vnd.solent.sdkm+xml"],
1539
+ ["sdkm", "application/vnd.solent.sdkm+xml"],
1540
+ ["sdp", "application/sdp"],
1541
+ ["sdw", "application/vnd.stardivision.writer"],
1542
+ ["sea", "application/octet-stream"],
1543
+ ["see", "application/vnd.seemail"],
1544
+ ["seed", "application/vnd.fdsn.seed"],
1545
+ ["sema", "application/vnd.sema"],
1546
+ ["semd", "application/vnd.semd"],
1547
+ ["semf", "application/vnd.semf"],
1548
+ ["senmlx", "application/senml+xml"],
1549
+ ["sensmlx", "application/sensml+xml"],
1550
+ ["ser", "application/java-serialized-object"],
1551
+ ["setpay", "application/set-payment-initiation"],
1552
+ ["setreg", "application/set-registration-initiation"],
1553
+ ["sfd-hdstx", "application/vnd.hydrostatix.sof-data"],
1554
+ ["sfs", "application/vnd.spotfire.sfs"],
1555
+ ["sfv", "text/x-sfv"],
1556
+ ["sgi", "image/sgi"],
1557
+ ["sgl", "application/vnd.stardivision.writer-global"],
1558
+ ["sgm", "text/sgml"],
1559
+ ["sgml", "text/sgml"],
1560
+ ["sh", "application/x-sh"],
1561
+ ["shar", "application/x-shar"],
1562
+ ["shex", "text/shex"],
1563
+ ["shf", "application/shf+xml"],
1564
+ ["shtml", "text/html"],
1565
+ ["sid", "image/x-mrsid-image"],
1566
+ ["sieve", "application/sieve"],
1567
+ ["sig", "application/pgp-signature"],
1568
+ ["sil", "audio/silk"],
1569
+ ["silo", "model/mesh"],
1570
+ ["sis", "application/vnd.symbian.install"],
1571
+ ["sisx", "application/vnd.symbian.install"],
1572
+ ["sit", "application/x-stuffit"],
1573
+ ["sitx", "application/x-stuffitx"],
1574
+ ["siv", "application/sieve"],
1575
+ ["skd", "application/vnd.koan"],
1576
+ ["skm", "application/vnd.koan"],
1577
+ ["skp", "application/vnd.koan"],
1578
+ ["skt", "application/vnd.koan"],
1579
+ ["sldm", "application/vnd.ms-powerpoint.slide.macroenabled.12"],
1580
+ ["sldx", "application/vnd.openxmlformats-officedocument.presentationml.slide"],
1581
+ ["slim", "text/slim"],
1582
+ ["slm", "text/slim"],
1583
+ ["sls", "application/route-s-tsid+xml"],
1584
+ ["slt", "application/vnd.epson.salt"],
1585
+ ["sm", "application/vnd.stepmania.stepchart"],
1586
+ ["smf", "application/vnd.stardivision.math"],
1587
+ ["smi", "application/smil"],
1588
+ ["smil", "application/smil"],
1589
+ ["smv", "video/x-smv"],
1590
+ ["smzip", "application/vnd.stepmania.package"],
1591
+ ["snd", "audio/basic"],
1592
+ ["snf", "application/x-font-snf"],
1593
+ ["so", "application/octet-stream"],
1594
+ ["spc", "application/x-pkcs7-certificates"],
1595
+ ["spdx", "text/spdx"],
1596
+ ["spf", "application/vnd.yamaha.smaf-phrase"],
1597
+ ["spl", "application/x-futuresplash"],
1598
+ ["spot", "text/vnd.in3d.spot"],
1599
+ ["spp", "application/scvp-vp-response"],
1600
+ ["spq", "application/scvp-vp-request"],
1601
+ ["spx", "audio/ogg"],
1602
+ ["sql", "application/x-sql"],
1603
+ ["src", "application/x-wais-source"],
1604
+ ["srt", "application/x-subrip"],
1605
+ ["sru", "application/sru+xml"],
1606
+ ["srx", "application/sparql-results+xml"],
1607
+ ["ssdl", "application/ssdl+xml"],
1608
+ ["sse", "application/vnd.kodak-descriptor"],
1609
+ ["ssf", "application/vnd.epson.ssf"],
1610
+ ["ssml", "application/ssml+xml"],
1611
+ ["sst", "application/octet-stream"],
1612
+ ["st", "application/vnd.sailingtracker.track"],
1613
+ ["stc", "application/vnd.sun.xml.calc.template"],
1614
+ ["std", "application/vnd.sun.xml.draw.template"],
1615
+ ["stf", "application/vnd.wt.stf"],
1616
+ ["sti", "application/vnd.sun.xml.impress.template"],
1617
+ ["stk", "application/hyperstudio"],
1618
+ ["stl", "model/stl"],
1619
+ ["stpx", "model/step+xml"],
1620
+ ["stpxz", "model/step-xml+zip"],
1621
+ ["stpz", "model/step+zip"],
1622
+ ["str", "application/vnd.pg.format"],
1623
+ ["stw", "application/vnd.sun.xml.writer.template"],
1624
+ ["styl", "text/stylus"],
1625
+ ["stylus", "text/stylus"],
1626
+ ["sub", "text/vnd.dvb.subtitle"],
1627
+ ["sus", "application/vnd.sus-calendar"],
1628
+ ["susp", "application/vnd.sus-calendar"],
1629
+ ["sv4cpio", "application/x-sv4cpio"],
1630
+ ["sv4crc", "application/x-sv4crc"],
1631
+ ["svc", "application/vnd.dvb.service"],
1632
+ ["svd", "application/vnd.svd"],
1633
+ ["svg", "image/svg+xml"],
1634
+ ["svgz", "image/svg+xml"],
1635
+ ["swa", "application/x-director"],
1636
+ ["swf", "application/x-shockwave-flash"],
1637
+ ["swi", "application/vnd.aristanetworks.swi"],
1638
+ ["swidtag", "application/swid+xml"],
1639
+ ["sxc", "application/vnd.sun.xml.calc"],
1640
+ ["sxd", "application/vnd.sun.xml.draw"],
1641
+ ["sxg", "application/vnd.sun.xml.writer.global"],
1642
+ ["sxi", "application/vnd.sun.xml.impress"],
1643
+ ["sxm", "application/vnd.sun.xml.math"],
1644
+ ["sxw", "application/vnd.sun.xml.writer"],
1645
+ ["t", "text/troff"],
1646
+ ["t3", "application/x-t3vm-image"],
1647
+ ["t38", "image/t38"],
1648
+ ["taglet", "application/vnd.mynfc"],
1649
+ ["tao", "application/vnd.tao.intent-module-archive"],
1650
+ ["tap", "image/vnd.tencent.tap"],
1651
+ ["tar", "application/x-tar"],
1652
+ ["tcap", "application/vnd.3gpp2.tcap"],
1653
+ ["tcl", "application/x-tcl"],
1654
+ ["td", "application/urc-targetdesc+xml"],
1655
+ ["teacher", "application/vnd.smart.teacher"],
1656
+ ["tei", "application/tei+xml"],
1657
+ ["teicorpus", "application/tei+xml"],
1658
+ ["tex", "application/x-tex"],
1659
+ ["texi", "application/x-texinfo"],
1660
+ ["texinfo", "application/x-texinfo"],
1661
+ ["text", "text/plain"],
1662
+ ["tfi", "application/thraud+xml"],
1663
+ ["tfm", "application/x-tex-tfm"],
1664
+ ["tfx", "image/tiff-fx"],
1665
+ ["tga", "image/x-tga"],
1666
+ ["tgz", "application/x-tar"],
1667
+ ["thmx", "application/vnd.ms-officetheme"],
1668
+ ["tif", "image/tiff"],
1669
+ ["tiff", "image/tiff"],
1670
+ ["tk", "application/x-tcl"],
1671
+ ["tmo", "application/vnd.tmobile-livetv"],
1672
+ ["toml", "application/toml"],
1673
+ ["torrent", "application/x-bittorrent"],
1674
+ ["tpl", "application/vnd.groove-tool-template"],
1675
+ ["tpt", "application/vnd.trid.tpt"],
1676
+ ["tr", "text/troff"],
1677
+ ["tra", "application/vnd.trueapp"],
1678
+ ["trig", "application/trig"],
1679
+ ["trm", "application/x-msterminal"],
1680
+ ["ts", "video/mp2t"],
1681
+ ["tsd", "application/timestamped-data"],
1682
+ ["tsv", "text/tab-separated-values"],
1683
+ ["ttc", "font/collection"],
1684
+ ["ttf", "font/ttf"],
1685
+ ["ttl", "text/turtle"],
1686
+ ["ttml", "application/ttml+xml"],
1687
+ ["twd", "application/vnd.simtech-mindmapper"],
1688
+ ["twds", "application/vnd.simtech-mindmapper"],
1689
+ ["txd", "application/vnd.genomatix.tuxedo"],
1690
+ ["txf", "application/vnd.mobius.txf"],
1691
+ ["txt", "text/plain"],
1692
+ ["u8dsn", "message/global-delivery-status"],
1693
+ ["u8hdr", "message/global-headers"],
1694
+ ["u8mdn", "message/global-disposition-notification"],
1695
+ ["u8msg", "message/global"],
1696
+ ["u32", "application/x-authorware-bin"],
1697
+ ["ubj", "application/ubjson"],
1698
+ ["udeb", "application/x-debian-package"],
1699
+ ["ufd", "application/vnd.ufdl"],
1700
+ ["ufdl", "application/vnd.ufdl"],
1701
+ ["ulx", "application/x-glulx"],
1702
+ ["umj", "application/vnd.umajin"],
1703
+ ["unityweb", "application/vnd.unity"],
1704
+ ["uoml", "application/vnd.uoml+xml"],
1705
+ ["uri", "text/uri-list"],
1706
+ ["uris", "text/uri-list"],
1707
+ ["urls", "text/uri-list"],
1708
+ ["usdz", "model/vnd.usdz+zip"],
1709
+ ["ustar", "application/x-ustar"],
1710
+ ["utz", "application/vnd.uiq.theme"],
1711
+ ["uu", "text/x-uuencode"],
1712
+ ["uva", "audio/vnd.dece.audio"],
1713
+ ["uvd", "application/vnd.dece.data"],
1714
+ ["uvf", "application/vnd.dece.data"],
1715
+ ["uvg", "image/vnd.dece.graphic"],
1716
+ ["uvh", "video/vnd.dece.hd"],
1717
+ ["uvi", "image/vnd.dece.graphic"],
1718
+ ["uvm", "video/vnd.dece.mobile"],
1719
+ ["uvp", "video/vnd.dece.pd"],
1720
+ ["uvs", "video/vnd.dece.sd"],
1721
+ ["uvt", "application/vnd.dece.ttml+xml"],
1722
+ ["uvu", "video/vnd.uvvu.mp4"],
1723
+ ["uvv", "video/vnd.dece.video"],
1724
+ ["uvva", "audio/vnd.dece.audio"],
1725
+ ["uvvd", "application/vnd.dece.data"],
1726
+ ["uvvf", "application/vnd.dece.data"],
1727
+ ["uvvg", "image/vnd.dece.graphic"],
1728
+ ["uvvh", "video/vnd.dece.hd"],
1729
+ ["uvvi", "image/vnd.dece.graphic"],
1730
+ ["uvvm", "video/vnd.dece.mobile"],
1731
+ ["uvvp", "video/vnd.dece.pd"],
1732
+ ["uvvs", "video/vnd.dece.sd"],
1733
+ ["uvvt", "application/vnd.dece.ttml+xml"],
1734
+ ["uvvu", "video/vnd.uvvu.mp4"],
1735
+ ["uvvv", "video/vnd.dece.video"],
1736
+ ["uvvx", "application/vnd.dece.unspecified"],
1737
+ ["uvvz", "application/vnd.dece.zip"],
1738
+ ["uvx", "application/vnd.dece.unspecified"],
1739
+ ["uvz", "application/vnd.dece.zip"],
1740
+ ["vbox", "application/x-virtualbox-vbox"],
1741
+ ["vbox-extpack", "application/x-virtualbox-vbox-extpack"],
1742
+ ["vcard", "text/vcard"],
1743
+ ["vcd", "application/x-cdlink"],
1744
+ ["vcf", "text/x-vcard"],
1745
+ ["vcg", "application/vnd.groove-vcard"],
1746
+ ["vcs", "text/x-vcalendar"],
1747
+ ["vcx", "application/vnd.vcx"],
1748
+ ["vdi", "application/x-virtualbox-vdi"],
1749
+ ["vds", "model/vnd.sap.vds"],
1750
+ ["vhd", "application/x-virtualbox-vhd"],
1751
+ ["vis", "application/vnd.visionary"],
1752
+ ["viv", "video/vnd.vivo"],
1753
+ ["vlc", "application/videolan"],
1754
+ ["vmdk", "application/x-virtualbox-vmdk"],
1755
+ ["vob", "video/x-ms-vob"],
1756
+ ["vor", "application/vnd.stardivision.writer"],
1757
+ ["vox", "application/x-authorware-bin"],
1758
+ ["vrml", "model/vrml"],
1759
+ ["vsd", "application/vnd.visio"],
1760
+ ["vsf", "application/vnd.vsf"],
1761
+ ["vss", "application/vnd.visio"],
1762
+ ["vst", "application/vnd.visio"],
1763
+ ["vsw", "application/vnd.visio"],
1764
+ ["vtf", "image/vnd.valve.source.texture"],
1765
+ ["vtt", "text/vtt"],
1766
+ ["vtu", "model/vnd.vtu"],
1767
+ ["vxml", "application/voicexml+xml"],
1768
+ ["w3d", "application/x-director"],
1769
+ ["wad", "application/x-doom"],
1770
+ ["wadl", "application/vnd.sun.wadl+xml"],
1771
+ ["war", "application/java-archive"],
1772
+ ["wasm", "application/wasm"],
1773
+ ["wav", "audio/x-wav"],
1774
+ ["wax", "audio/x-ms-wax"],
1775
+ ["wbmp", "image/vnd.wap.wbmp"],
1776
+ ["wbs", "application/vnd.criticaltools.wbs+xml"],
1777
+ ["wbxml", "application/wbxml"],
1778
+ ["wcm", "application/vnd.ms-works"],
1779
+ ["wdb", "application/vnd.ms-works"],
1780
+ ["wdp", "image/vnd.ms-photo"],
1781
+ ["weba", "audio/webm"],
1782
+ ["webapp", "application/x-web-app-manifest+json"],
1783
+ ["webm", "video/webm"],
1784
+ ["webmanifest", "application/manifest+json"],
1785
+ ["webp", "image/webp"],
1786
+ ["wg", "application/vnd.pmi.widget"],
1787
+ ["wgt", "application/widget"],
1788
+ ["wks", "application/vnd.ms-works"],
1789
+ ["wm", "video/x-ms-wm"],
1790
+ ["wma", "audio/x-ms-wma"],
1791
+ ["wmd", "application/x-ms-wmd"],
1792
+ ["wmf", "image/wmf"],
1793
+ ["wml", "text/vnd.wap.wml"],
1794
+ ["wmlc", "application/wmlc"],
1795
+ ["wmls", "text/vnd.wap.wmlscript"],
1796
+ ["wmlsc", "application/vnd.wap.wmlscriptc"],
1797
+ ["wmv", "video/x-ms-wmv"],
1798
+ ["wmx", "video/x-ms-wmx"],
1799
+ ["wmz", "application/x-msmetafile"],
1800
+ ["woff", "font/woff"],
1801
+ ["woff2", "font/woff2"],
1802
+ ["word", "application/msword"],
1803
+ ["wpd", "application/vnd.wordperfect"],
1804
+ ["wpl", "application/vnd.ms-wpl"],
1805
+ ["wps", "application/vnd.ms-works"],
1806
+ ["wqd", "application/vnd.wqd"],
1807
+ ["wri", "application/x-mswrite"],
1808
+ ["wrl", "model/vrml"],
1809
+ ["wsc", "message/vnd.wfa.wsc"],
1810
+ ["wsdl", "application/wsdl+xml"],
1811
+ ["wspolicy", "application/wspolicy+xml"],
1812
+ ["wtb", "application/vnd.webturbo"],
1813
+ ["wvx", "video/x-ms-wvx"],
1814
+ ["x3d", "model/x3d+xml"],
1815
+ ["x3db", "model/x3d+fastinfoset"],
1816
+ ["x3dbz", "model/x3d+binary"],
1817
+ ["x3dv", "model/x3d-vrml"],
1818
+ ["x3dvz", "model/x3d+vrml"],
1819
+ ["x3dz", "model/x3d+xml"],
1820
+ ["x32", "application/x-authorware-bin"],
1821
+ ["x_b", "model/vnd.parasolid.transmit.binary"],
1822
+ ["x_t", "model/vnd.parasolid.transmit.text"],
1823
+ ["xaml", "application/xaml+xml"],
1824
+ ["xap", "application/x-silverlight-app"],
1825
+ ["xar", "application/vnd.xara"],
1826
+ ["xav", "application/xcap-att+xml"],
1827
+ ["xbap", "application/x-ms-xbap"],
1828
+ ["xbd", "application/vnd.fujixerox.docuworks.binder"],
1829
+ ["xbm", "image/x-xbitmap"],
1830
+ ["xca", "application/xcap-caps+xml"],
1831
+ ["xcs", "application/calendar+xml"],
1832
+ ["xdf", "application/xcap-diff+xml"],
1833
+ ["xdm", "application/vnd.syncml.dm+xml"],
1834
+ ["xdp", "application/vnd.adobe.xdp+xml"],
1835
+ ["xdssc", "application/dssc+xml"],
1836
+ ["xdw", "application/vnd.fujixerox.docuworks"],
1837
+ ["xel", "application/xcap-el+xml"],
1838
+ ["xenc", "application/xenc+xml"],
1839
+ ["xer", "application/patch-ops-error+xml"],
1840
+ ["xfdf", "application/vnd.adobe.xfdf"],
1841
+ ["xfdl", "application/vnd.xfdl"],
1842
+ ["xht", "application/xhtml+xml"],
1843
+ ["xhtml", "application/xhtml+xml"],
1844
+ ["xhvml", "application/xv+xml"],
1845
+ ["xif", "image/vnd.xiff"],
1846
+ ["xl", "application/excel"],
1847
+ ["xla", "application/vnd.ms-excel"],
1848
+ ["xlam", "application/vnd.ms-excel.addin.macroEnabled.12"],
1849
+ ["xlc", "application/vnd.ms-excel"],
1850
+ ["xlf", "application/xliff+xml"],
1851
+ ["xlm", "application/vnd.ms-excel"],
1852
+ ["xls", "application/vnd.ms-excel"],
1853
+ ["xlsb", "application/vnd.ms-excel.sheet.binary.macroEnabled.12"],
1854
+ ["xlsm", "application/vnd.ms-excel.sheet.macroEnabled.12"],
1855
+ ["xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],
1856
+ ["xlt", "application/vnd.ms-excel"],
1857
+ ["xltm", "application/vnd.ms-excel.template.macroEnabled.12"],
1858
+ ["xltx", "application/vnd.openxmlformats-officedocument.spreadsheetml.template"],
1859
+ ["xlw", "application/vnd.ms-excel"],
1860
+ ["xm", "audio/xm"],
1861
+ ["xml", "application/xml"],
1862
+ ["xns", "application/xcap-ns+xml"],
1863
+ ["xo", "application/vnd.olpc-sugar"],
1864
+ ["xop", "application/xop+xml"],
1865
+ ["xpi", "application/x-xpinstall"],
1866
+ ["xpl", "application/xproc+xml"],
1867
+ ["xpm", "image/x-xpixmap"],
1868
+ ["xpr", "application/vnd.is-xpr"],
1869
+ ["xps", "application/vnd.ms-xpsdocument"],
1870
+ ["xpw", "application/vnd.intercon.formnet"],
1871
+ ["xpx", "application/vnd.intercon.formnet"],
1872
+ ["xsd", "application/xml"],
1873
+ ["xsl", "application/xml"],
1874
+ ["xslt", "application/xslt+xml"],
1875
+ ["xsm", "application/vnd.syncml+xml"],
1876
+ ["xspf", "application/xspf+xml"],
1877
+ ["xul", "application/vnd.mozilla.xul+xml"],
1878
+ ["xvm", "application/xv+xml"],
1879
+ ["xvml", "application/xv+xml"],
1880
+ ["xwd", "image/x-xwindowdump"],
1881
+ ["xyz", "chemical/x-xyz"],
1882
+ ["xz", "application/x-xz"],
1883
+ ["yaml", "text/yaml"],
1884
+ ["yang", "application/yang"],
1885
+ ["yin", "application/yin+xml"],
1886
+ ["yml", "text/yaml"],
1887
+ ["ymp", "text/x-suse-ymp"],
1888
+ ["z", "application/x-compress"],
1889
+ ["z1", "application/x-zmachine"],
1890
+ ["z2", "application/x-zmachine"],
1891
+ ["z3", "application/x-zmachine"],
1892
+ ["z4", "application/x-zmachine"],
1893
+ ["z5", "application/x-zmachine"],
1894
+ ["z6", "application/x-zmachine"],
1895
+ ["z7", "application/x-zmachine"],
1896
+ ["z8", "application/x-zmachine"],
1897
+ ["zaz", "application/vnd.zzazz.deck+xml"],
1898
+ ["zip", "application/zip"],
1899
+ ["zir", "application/vnd.zul"],
1900
+ ["zirz", "application/vnd.zul"],
1901
+ ["zmm", "application/vnd.handheld-entertainment+xml"],
1902
+ ["zsh", "text/x-scriptzsh"]
1903
+ ]);
1904
+ function ye(t, i, e) {
1905
+ const n = Wi(t), { webkitRelativePath: a } = t, o = typeof i == "string" ? i : typeof a == "string" && a.length > 0 ? a : `./${t.name}`;
1906
+ return typeof n.path != "string" && jt(n, "path", o), jt(n, "relativePath", o), n;
1907
+ }
1908
+ function Wi(t) {
1909
+ const { name: i } = t;
1910
+ if (i && i.lastIndexOf(".") !== -1 && !t.type) {
1911
+ const n = i.split(".").pop().toLowerCase(), a = Li.get(n);
1912
+ a && Object.defineProperty(t, "type", {
1913
+ value: a,
1914
+ writable: !1,
1915
+ configurable: !1,
1916
+ enumerable: !0
1917
+ });
1918
+ }
1919
+ return t;
1920
+ }
1921
+ function jt(t, i, e) {
1922
+ Object.defineProperty(t, i, {
1923
+ value: e,
1924
+ writable: !1,
1925
+ configurable: !1,
1926
+ enumerable: !0
1927
+ });
1928
+ }
1929
+ const Ui = [
1930
+ // Thumbnail cache files for macOS and Windows
1931
+ ".DS_Store",
1932
+ // macOs
1933
+ "Thumbs.db"
1934
+ // Windows
1935
+ ];
1936
+ function $i(t) {
1937
+ return ve(this, void 0, void 0, function* () {
1938
+ return Me(t) && Ni(t.dataTransfer) ? Bi(t.dataTransfer, t.type) : Hi(t) ? Yi(t) : Array.isArray(t) && t.every((i) => "getFile" in i && typeof i.getFile == "function") ? Zi(t) : [];
1939
+ });
1940
+ }
1941
+ function Ni(t) {
1942
+ return Me(t);
1943
+ }
1944
+ function Hi(t) {
1945
+ return Me(t) && Me(t.target);
1946
+ }
1947
+ function Me(t) {
1948
+ return typeof t == "object" && t !== null;
1949
+ }
1950
+ function Yi(t) {
1951
+ return lt(t.target.files).map((i) => ye(i));
1952
+ }
1953
+ function Zi(t) {
1954
+ return ve(this, void 0, void 0, function* () {
1955
+ return (yield Promise.all(t.map((e) => e.getFile()))).map((e) => ye(e));
1956
+ });
1957
+ }
1958
+ function Bi(t, i) {
1959
+ return ve(this, void 0, void 0, function* () {
1960
+ if (t.items) {
1961
+ const e = lt(t.items).filter((a) => a.kind === "file");
1962
+ if (i !== "drop")
1963
+ return e;
1964
+ const n = yield Promise.all(e.map(Ki));
1965
+ return Pt(Qt(n));
1966
+ }
1967
+ return Pt(lt(t.files).map((e) => ye(e)));
1968
+ });
1969
+ }
1970
+ function Pt(t) {
1971
+ return t.filter((i) => Ui.indexOf(i.name) === -1);
1972
+ }
1973
+ function lt(t) {
1974
+ if (t === null)
1975
+ return [];
1976
+ const i = [];
1977
+ for (let e = 0; e < t.length; e++) {
1978
+ const n = t[e];
1979
+ i.push(n);
1980
+ }
1981
+ return i;
1982
+ }
1983
+ function Ki(t) {
1984
+ if (typeof t.webkitGetAsEntry != "function")
1985
+ return Tt(t);
1986
+ const i = t.webkitGetAsEntry();
1987
+ return i && i.isDirectory ? ei(i) : Tt(t, i);
1988
+ }
1989
+ function Qt(t) {
1990
+ return t.reduce((i, e) => [
1991
+ ...i,
1992
+ ...Array.isArray(e) ? Qt(e) : [e]
1993
+ ], []);
1994
+ }
1995
+ function Tt(t, i) {
1996
+ return ve(this, void 0, void 0, function* () {
1997
+ var e;
1998
+ if (globalThis.isSecureContext && typeof t.getAsFileSystemHandle == "function") {
1999
+ const o = yield t.getAsFileSystemHandle();
2000
+ if (o === null)
2001
+ throw new Error(`${t} is not a File`);
2002
+ if (o !== void 0) {
2003
+ const r = yield o.getFile();
2004
+ return r.handle = o, ye(r);
2005
+ }
2006
+ }
2007
+ const n = t.getAsFile();
2008
+ if (!n)
2009
+ throw new Error(`${t} is not a File`);
2010
+ return ye(n, (e = i?.fullPath) !== null && e !== void 0 ? e : void 0);
2011
+ });
2012
+ }
2013
+ function Vi(t) {
2014
+ return ve(this, void 0, void 0, function* () {
2015
+ return t.isDirectory ? ei(t) : Gi(t);
2016
+ });
2017
+ }
2018
+ function ei(t) {
2019
+ const i = t.createReader();
2020
+ return new Promise((e, n) => {
2021
+ const a = [];
2022
+ function o() {
2023
+ i.readEntries((r) => ve(this, void 0, void 0, function* () {
2024
+ if (r.length) {
2025
+ const p = Promise.all(r.map(Vi));
2026
+ a.push(p), o();
2027
+ } else
2028
+ try {
2029
+ const p = yield Promise.all(a);
2030
+ e(p);
2031
+ } catch (p) {
2032
+ n(p);
2033
+ }
2034
+ }), (r) => {
2035
+ n(r);
2036
+ });
2037
+ }
2038
+ o();
2039
+ });
2040
+ }
2041
+ function Gi(t) {
2042
+ return ve(this, void 0, void 0, function* () {
2043
+ return new Promise((i, e) => {
2044
+ t.file((n) => {
2045
+ const a = ye(n, t.fullPath);
2046
+ i(a);
2047
+ }, (n) => {
2048
+ e(n);
2049
+ });
2050
+ });
2051
+ });
2052
+ }
2053
+ var ze = {}, At;
2054
+ function Xi() {
2055
+ return At || (At = 1, ze.__esModule = !0, ze.default = function(t, i) {
2056
+ if (t && i) {
2057
+ var e = Array.isArray(i) ? i : i.split(",");
2058
+ if (e.length === 0)
2059
+ return !0;
2060
+ var n = t.name || "", a = (t.type || "").toLowerCase(), o = a.replace(/\/.*$/, "");
2061
+ return e.some(function(r) {
2062
+ var p = r.trim().toLowerCase();
2063
+ return p.charAt(0) === "." ? n.toLowerCase().endsWith(p) : p.endsWith("/*") ? o === p.replace(/\/.*$/, "") : a === p;
2064
+ });
2065
+ }
2066
+ return !0;
2067
+ }), ze;
2068
+ }
2069
+ var Ji = Xi();
2070
+ const tt = /* @__PURE__ */ vt(Ji);
2071
+ function zt(t) {
2072
+ return tn(t) || en(t) || ii(t) || Qi();
2073
+ }
2074
+ function Qi() {
2075
+ throw new TypeError(`Invalid attempt to spread non-iterable instance.
2076
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
2077
+ }
2078
+ function en(t) {
2079
+ if (typeof Symbol < "u" && t[Symbol.iterator] != null || t["@@iterator"] != null) return Array.from(t);
2080
+ }
2081
+ function tn(t) {
2082
+ if (Array.isArray(t)) return dt(t);
2083
+ }
2084
+ function Ot(t, i) {
2085
+ var e = Object.keys(t);
2086
+ if (Object.getOwnPropertySymbols) {
2087
+ var n = Object.getOwnPropertySymbols(t);
2088
+ i && (n = n.filter(function(a) {
2089
+ return Object.getOwnPropertyDescriptor(t, a).enumerable;
2090
+ })), e.push.apply(e, n);
2091
+ }
2092
+ return e;
2093
+ }
2094
+ function Ft(t) {
2095
+ for (var i = 1; i < arguments.length; i++) {
2096
+ var e = arguments[i] != null ? arguments[i] : {};
2097
+ i % 2 ? Ot(Object(e), !0).forEach(function(n) {
2098
+ ti(t, n, e[n]);
2099
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(e)) : Ot(Object(e)).forEach(function(n) {
2100
+ Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(e, n));
2101
+ });
2102
+ }
2103
+ return t;
2104
+ }
2105
+ function ti(t, i, e) {
2106
+ return i in t ? Object.defineProperty(t, i, { value: e, enumerable: !0, configurable: !0, writable: !0 }) : t[i] = e, t;
2107
+ }
2108
+ function _e(t, i) {
2109
+ return on(t) || an(t, i) || ii(t, i) || nn();
2110
+ }
2111
+ function nn() {
2112
+ throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2113
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
2114
+ }
2115
+ function ii(t, i) {
2116
+ if (t) {
2117
+ if (typeof t == "string") return dt(t, i);
2118
+ var e = Object.prototype.toString.call(t).slice(8, -1);
2119
+ if (e === "Object" && t.constructor && (e = t.constructor.name), e === "Map" || e === "Set") return Array.from(t);
2120
+ if (e === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)) return dt(t, i);
2121
+ }
2122
+ }
2123
+ function dt(t, i) {
2124
+ (i == null || i > t.length) && (i = t.length);
2125
+ for (var e = 0, n = new Array(i); e < i; e++)
2126
+ n[e] = t[e];
2127
+ return n;
2128
+ }
2129
+ function an(t, i) {
2130
+ var e = t == null ? null : typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
2131
+ if (e != null) {
2132
+ var n = [], a = !0, o = !1, r, p;
2133
+ try {
2134
+ for (e = e.call(t); !(a = (r = e.next()).done) && (n.push(r.value), !(i && n.length === i)); a = !0)
2135
+ ;
2136
+ } catch (c) {
2137
+ o = !0, p = c;
2138
+ } finally {
2139
+ try {
2140
+ !a && e.return != null && e.return();
2141
+ } finally {
2142
+ if (o) throw p;
2143
+ }
2144
+ }
2145
+ return n;
2146
+ }
2147
+ }
2148
+ function on(t) {
2149
+ if (Array.isArray(t)) return t;
2150
+ }
2151
+ var rn = typeof tt == "function" ? tt : tt.default, ni = "file-invalid-type", ai = "file-too-large", oi = "file-too-small", ri = "too-many-files", de = {
2152
+ FileInvalidType: ni,
2153
+ FileTooLarge: ai,
2154
+ FileTooSmall: oi,
2155
+ TooManyFiles: ri
2156
+ }, pn = function() {
2157
+ var i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "", e = i.split(","), n = e.length > 1 ? "one of ".concat(e.join(", ")) : e[0];
2158
+ return {
2159
+ code: ni,
2160
+ message: "File type must be ".concat(n)
2161
+ };
2162
+ }, It = function(i) {
2163
+ return {
2164
+ code: ai,
2165
+ message: "File is larger than ".concat(i, " ").concat(i === 1 ? "byte" : "bytes")
2166
+ };
2167
+ }, Mt = function(i) {
2168
+ return {
2169
+ code: oi,
2170
+ message: "File is smaller than ".concat(i, " ").concat(i === 1 ? "byte" : "bytes")
2171
+ };
2172
+ }, cn = {
2173
+ code: ri,
2174
+ message: "Too many files"
2175
+ };
2176
+ function pi(t, i) {
2177
+ var e = t.type === "application/x-moz-file" || rn(t, i);
2178
+ return [e, e ? null : pn(i)];
2179
+ }
2180
+ function ci(t, i, e) {
2181
+ if (fe(t.size))
2182
+ if (fe(i) && fe(e)) {
2183
+ if (t.size > e) return [!1, It(e)];
2184
+ if (t.size < i) return [!1, Mt(i)];
2185
+ } else {
2186
+ if (fe(i) && t.size < i) return [!1, Mt(i)];
2187
+ if (fe(e) && t.size > e) return [!1, It(e)];
2188
+ }
2189
+ return [!0, null];
2190
+ }
2191
+ function fe(t) {
2192
+ return t != null;
2193
+ }
2194
+ function sn(t) {
2195
+ var i = t.files, e = t.accept, n = t.minSize, a = t.maxSize, o = t.multiple, r = t.maxFiles, p = t.validator;
2196
+ return !o && i.length > 1 || o && r >= 1 && i.length > r ? !1 : i.every(function(c) {
2197
+ var s = pi(c, e), l = _e(s, 1), v = l[0], h = ci(c, n, a), b = _e(h, 1), w = b[0], y = p ? p(c) : null;
2198
+ return v && w && !y;
2199
+ });
2200
+ }
2201
+ function qe(t) {
2202
+ return typeof t.isPropagationStopped == "function" ? t.isPropagationStopped() : typeof t.cancelBubble < "u" ? t.cancelBubble : !1;
2203
+ }
2204
+ function Oe(t) {
2205
+ return t.dataTransfer ? Array.prototype.some.call(t.dataTransfer.types, function(i) {
2206
+ return i === "Files" || i === "application/x-moz-file";
2207
+ }) : !!t.target && !!t.target.files;
2208
+ }
2209
+ function qt(t) {
2210
+ t.preventDefault();
2211
+ }
2212
+ function ln(t) {
2213
+ return t.indexOf("MSIE") !== -1 || t.indexOf("Trident/") !== -1;
2214
+ }
2215
+ function dn(t) {
2216
+ return t.indexOf("Edge/") !== -1;
2217
+ }
2218
+ function un() {
2219
+ var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : window.navigator.userAgent;
2220
+ return ln(t) || dn(t);
2221
+ }
2222
+ function ce() {
2223
+ for (var t = arguments.length, i = new Array(t), e = 0; e < t; e++)
2224
+ i[e] = arguments[e];
2225
+ return function(n) {
2226
+ for (var a = arguments.length, o = new Array(a > 1 ? a - 1 : 0), r = 1; r < a; r++)
2227
+ o[r - 1] = arguments[r];
2228
+ return i.some(function(p) {
2229
+ return !qe(n) && p && p.apply(void 0, [n].concat(o)), qe(n);
2230
+ });
2231
+ };
2232
+ }
2233
+ function mn() {
2234
+ return "showOpenFilePicker" in window;
2235
+ }
2236
+ function fn(t) {
2237
+ if (fe(t)) {
2238
+ var i = Object.entries(t).filter(function(e) {
2239
+ var n = _e(e, 2), a = n[0], o = n[1], r = !0;
2240
+ return si(a) || (console.warn('Skipped "'.concat(a, '" 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.')), r = !1), (!Array.isArray(o) || !o.every(li)) && (console.warn('Skipped "'.concat(a, '" because an invalid file extension was provided.')), r = !1), r;
2241
+ }).reduce(function(e, n) {
2242
+ var a = _e(n, 2), o = a[0], r = a[1];
2243
+ return Ft(Ft({}, e), {}, ti({}, o, r));
2244
+ }, {});
2245
+ return [{
2246
+ // description is required due to https://crbug.com/1264708
2247
+ description: "Files",
2248
+ accept: i
2249
+ }];
2250
+ }
2251
+ return t;
2252
+ }
2253
+ function vn(t) {
2254
+ if (fe(t))
2255
+ return Object.entries(t).reduce(function(i, e) {
2256
+ var n = _e(e, 2), a = n[0], o = n[1];
2257
+ return [].concat(zt(i), [a], zt(o));
2258
+ }, []).filter(function(i) {
2259
+ return si(i) || li(i);
2260
+ }).join(",");
2261
+ }
2262
+ function xn(t) {
2263
+ return t instanceof DOMException && (t.name === "AbortError" || t.code === t.ABORT_ERR);
2264
+ }
2265
+ function hn(t) {
2266
+ return t instanceof DOMException && (t.name === "SecurityError" || t.code === t.SECURITY_ERR);
2267
+ }
2268
+ function si(t) {
2269
+ return t === "audio/*" || t === "video/*" || t === "image/*" || t === "text/*" || t === "application/*" || /\w+\/[-+.\w]+/g.test(t);
2270
+ }
2271
+ function li(t) {
2272
+ return /^.*\.[\w]+$/.test(t);
2273
+ }
2274
+ var gn = ["children"], yn = ["open"], bn = ["refKey", "role", "onKeyDown", "onFocus", "onBlur", "onClick", "onDragEnter", "onDragOver", "onDragLeave", "onDrop"], wn = ["refKey", "onChange", "onClick"];
2275
+ function En(t) {
2276
+ return _n(t) || Cn(t) || di(t) || kn();
2277
+ }
2278
+ function kn() {
2279
+ throw new TypeError(`Invalid attempt to spread non-iterable instance.
2280
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
2281
+ }
2282
+ function Cn(t) {
2283
+ if (typeof Symbol < "u" && t[Symbol.iterator] != null || t["@@iterator"] != null) return Array.from(t);
2284
+ }
2285
+ function _n(t) {
2286
+ if (Array.isArray(t)) return ut(t);
2287
+ }
2288
+ function it(t, i) {
2289
+ return Sn(t) || Dn(t, i) || di(t, i) || Rn();
2290
+ }
2291
+ function Rn() {
2292
+ throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2293
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
2294
+ }
2295
+ function di(t, i) {
2296
+ if (t) {
2297
+ if (typeof t == "string") return ut(t, i);
2298
+ var e = Object.prototype.toString.call(t).slice(8, -1);
2299
+ if (e === "Object" && t.constructor && (e = t.constructor.name), e === "Map" || e === "Set") return Array.from(t);
2300
+ if (e === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)) return ut(t, i);
2301
+ }
2302
+ }
2303
+ function ut(t, i) {
2304
+ (i == null || i > t.length) && (i = t.length);
2305
+ for (var e = 0, n = new Array(i); e < i; e++)
2306
+ n[e] = t[e];
2307
+ return n;
2308
+ }
2309
+ function Dn(t, i) {
2310
+ var e = t == null ? null : typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
2311
+ if (e != null) {
2312
+ var n = [], a = !0, o = !1, r, p;
2313
+ try {
2314
+ for (e = e.call(t); !(a = (r = e.next()).done) && (n.push(r.value), !(i && n.length === i)); a = !0)
2315
+ ;
2316
+ } catch (c) {
2317
+ o = !0, p = c;
2318
+ } finally {
2319
+ try {
2320
+ !a && e.return != null && e.return();
2321
+ } finally {
2322
+ if (o) throw p;
2323
+ }
2324
+ }
2325
+ return n;
2326
+ }
2327
+ }
2328
+ function Sn(t) {
2329
+ if (Array.isArray(t)) return t;
2330
+ }
2331
+ function Lt(t, i) {
2332
+ var e = Object.keys(t);
2333
+ if (Object.getOwnPropertySymbols) {
2334
+ var n = Object.getOwnPropertySymbols(t);
2335
+ i && (n = n.filter(function(a) {
2336
+ return Object.getOwnPropertyDescriptor(t, a).enumerable;
2337
+ })), e.push.apply(e, n);
2338
+ }
2339
+ return e;
2340
+ }
2341
+ function $(t) {
2342
+ for (var i = 1; i < arguments.length; i++) {
2343
+ var e = arguments[i] != null ? arguments[i] : {};
2344
+ i % 2 ? Lt(Object(e), !0).forEach(function(n) {
2345
+ mt(t, n, e[n]);
2346
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(e)) : Lt(Object(e)).forEach(function(n) {
2347
+ Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(e, n));
2348
+ });
2349
+ }
2350
+ return t;
2351
+ }
2352
+ function mt(t, i, e) {
2353
+ return i in t ? Object.defineProperty(t, i, { value: e, enumerable: !0, configurable: !0, writable: !0 }) : t[i] = e, t;
2354
+ }
2355
+ function Le(t, i) {
2356
+ if (t == null) return {};
2357
+ var e = jn(t, i), n, a;
2358
+ if (Object.getOwnPropertySymbols) {
2359
+ var o = Object.getOwnPropertySymbols(t);
2360
+ for (a = 0; a < o.length; a++)
2361
+ n = o[a], !(i.indexOf(n) >= 0) && Object.prototype.propertyIsEnumerable.call(t, n) && (e[n] = t[n]);
2362
+ }
2363
+ return e;
2364
+ }
2365
+ function jn(t, i) {
2366
+ if (t == null) return {};
2367
+ var e = {}, n = Object.keys(t), a, o;
2368
+ for (o = 0; o < n.length; o++)
2369
+ a = n[o], !(i.indexOf(a) >= 0) && (e[a] = t[a]);
2370
+ return e;
2371
+ }
2372
+ var ht = /* @__PURE__ */ Ci(function(t, i) {
2373
+ var e = t.children, n = Le(t, gn), a = mi(n), o = a.open, r = Le(a, yn);
2374
+ return _i(i, function() {
2375
+ return {
2376
+ open: o
2377
+ };
2378
+ }, [o]), /* @__PURE__ */ Ei.createElement(Ri, null, e($($({}, r), {}, {
2379
+ open: o
2380
+ })));
2381
+ });
2382
+ ht.displayName = "Dropzone";
2383
+ var ui = {
2384
+ disabled: !1,
2385
+ getFilesFromEvent: $i,
2386
+ maxSize: 1 / 0,
2387
+ minSize: 0,
2388
+ multiple: !0,
2389
+ maxFiles: 0,
2390
+ preventDropOnDocument: !0,
2391
+ noClick: !1,
2392
+ noKeyboard: !1,
2393
+ noDrag: !1,
2394
+ noDragEventsBubbling: !1,
2395
+ validator: null,
2396
+ useFsAccessApi: !1,
2397
+ autoFocus: !1
2398
+ };
2399
+ ht.defaultProps = ui;
2400
+ ht.propTypes = {
2401
+ /**
2402
+ * Render function that exposes the dropzone state and prop getter fns
2403
+ *
2404
+ * @param {object} params
2405
+ * @param {Function} params.getRootProps Returns the props you should apply to the root drop container you render
2406
+ * @param {Function} params.getInputProps Returns the props you should apply to hidden file input you render
2407
+ * @param {Function} params.open Open the native file selection dialog
2408
+ * @param {boolean} params.isFocused Dropzone area is in focus
2409
+ * @param {boolean} params.isFileDialogActive File dialog is opened
2410
+ * @param {boolean} params.isDragActive Active drag is in progress
2411
+ * @param {boolean} params.isDragAccept Dragged files are accepted
2412
+ * @param {boolean} params.isDragReject Some dragged files are rejected
2413
+ * @param {File[]} params.acceptedFiles Accepted files
2414
+ * @param {FileRejection[]} params.fileRejections Rejected files and why they were rejected
2415
+ */
2416
+ children: q.func,
2417
+ /**
2418
+ * Set accepted file types.
2419
+ * Checkout https://developer.mozilla.org/en-US/docs/Web/API/window/showOpenFilePicker types option for more information.
2420
+ * Keep in mind that mime type determination is not reliable across platforms. CSV files,
2421
+ * for example, are reported as text/plain under macOS but as application/vnd.ms-excel under
2422
+ * Windows. In some cases there might not be a mime type set at all (https://github.com/react-dropzone/react-dropzone/issues/276).
2423
+ */
2424
+ accept: q.objectOf(q.arrayOf(q.string)),
2425
+ /**
2426
+ * Allow drag 'n' drop (or selection from the file dialog) of multiple files
2427
+ */
2428
+ multiple: q.bool,
2429
+ /**
2430
+ * If false, allow dropped items to take over the current browser window
2431
+ */
2432
+ preventDropOnDocument: q.bool,
2433
+ /**
2434
+ * If true, disables click to open the native file selection dialog
2435
+ */
2436
+ noClick: q.bool,
2437
+ /**
2438
+ * If true, disables SPACE/ENTER to open the native file selection dialog.
2439
+ * Note that it also stops tracking the focus state.
2440
+ */
2441
+ noKeyboard: q.bool,
2442
+ /**
2443
+ * If true, disables drag 'n' drop
2444
+ */
2445
+ noDrag: q.bool,
2446
+ /**
2447
+ * If true, stops drag event propagation to parents
2448
+ */
2449
+ noDragEventsBubbling: q.bool,
2450
+ /**
2451
+ * Minimum file size (in bytes)
2452
+ */
2453
+ minSize: q.number,
2454
+ /**
2455
+ * Maximum file size (in bytes)
2456
+ */
2457
+ maxSize: q.number,
2458
+ /**
2459
+ * Maximum accepted number of files
2460
+ * The default value is 0 which means there is no limitation to how many files are accepted.
2461
+ */
2462
+ maxFiles: q.number,
2463
+ /**
2464
+ * Enable/disable the dropzone
2465
+ */
2466
+ disabled: q.bool,
2467
+ /**
2468
+ * Use this to provide a custom file aggregator
2469
+ *
2470
+ * @param {(DragEvent|Event|Array<FileSystemFileHandle>)} event A drag event or input change event (if files were selected via the file dialog)
2471
+ */
2472
+ getFilesFromEvent: q.func,
2473
+ /**
2474
+ * Cb for when closing the file dialog with no selection
2475
+ */
2476
+ onFileDialogCancel: q.func,
2477
+ /**
2478
+ * Cb for when opening the file dialog
2479
+ */
2480
+ onFileDialogOpen: q.func,
2481
+ /**
2482
+ * Set to true to use the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API
2483
+ * to open the file picker instead of using an `<input type="file">` click event.
2484
+ */
2485
+ useFsAccessApi: q.bool,
2486
+ /**
2487
+ * Set to true to focus the root element on render
2488
+ */
2489
+ autoFocus: q.bool,
2490
+ /**
2491
+ * Cb for when the `dragenter` event occurs.
2492
+ *
2493
+ * @param {DragEvent} event
2494
+ */
2495
+ onDragEnter: q.func,
2496
+ /**
2497
+ * Cb for when the `dragleave` event occurs
2498
+ *
2499
+ * @param {DragEvent} event
2500
+ */
2501
+ onDragLeave: q.func,
2502
+ /**
2503
+ * Cb for when the `dragover` event occurs
2504
+ *
2505
+ * @param {DragEvent} event
2506
+ */
2507
+ onDragOver: q.func,
2508
+ /**
2509
+ * Cb for when the `drop` event occurs.
2510
+ * Note that this callback is invoked after the `getFilesFromEvent` callback is done.
2511
+ *
2512
+ * Files are accepted or rejected based on the `accept`, `multiple`, `minSize` and `maxSize` props.
2513
+ * `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.
2514
+ * If `multiple` is set to false and additional files are dropped,
2515
+ * all files besides the first will be rejected.
2516
+ * Any file which does not have a size in the [`minSize`, `maxSize`] range, will be rejected as well.
2517
+ *
2518
+ * Note that the `onDrop` callback will always be invoked regardless if the dropped files were accepted or rejected.
2519
+ * If you'd like to react to a specific scenario, use the `onDropAccepted`/`onDropRejected` props.
2520
+ *
2521
+ * `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.
2522
+ * For example, with [SuperAgent](https://github.com/visionmedia/superagent) as a http/ajax library:
2523
+ *
2524
+ * ```js
2525
+ * function onDrop(acceptedFiles) {
2526
+ * const req = request.post('/upload')
2527
+ * acceptedFiles.forEach(file => {
2528
+ * req.attach(file.name, file)
2529
+ * })
2530
+ * req.end(callback)
2531
+ * }
2532
+ * ```
2533
+ *
2534
+ * @param {File[]} acceptedFiles
2535
+ * @param {FileRejection[]} fileRejections
2536
+ * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)
2537
+ */
2538
+ onDrop: q.func,
2539
+ /**
2540
+ * Cb for when the `drop` event occurs.
2541
+ * Note that if no files are accepted, this callback is not invoked.
2542
+ *
2543
+ * @param {File[]} files
2544
+ * @param {(DragEvent|Event)} event
2545
+ */
2546
+ onDropAccepted: q.func,
2547
+ /**
2548
+ * Cb for when the `drop` event occurs.
2549
+ * Note that if no files are rejected, this callback is not invoked.
2550
+ *
2551
+ * @param {FileRejection[]} fileRejections
2552
+ * @param {(DragEvent|Event)} event
2553
+ */
2554
+ onDropRejected: q.func,
2555
+ /**
2556
+ * Cb for when there's some error from any of the promises.
2557
+ *
2558
+ * @param {Error} error
2559
+ */
2560
+ onError: q.func,
2561
+ /**
2562
+ * Custom validation function. It must return null if there's no errors.
2563
+ * @param {File} file
2564
+ * @returns {FileError|FileError[]|null}
2565
+ */
2566
+ validator: q.func
2567
+ };
2568
+ var ft = {
2569
+ isFocused: !1,
2570
+ isFileDialogActive: !1,
2571
+ isDragActive: !1,
2572
+ isDragAccept: !1,
2573
+ isDragReject: !1,
2574
+ acceptedFiles: [],
2575
+ fileRejections: []
2576
+ };
2577
+ function mi() {
2578
+ var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, i = $($({}, ui), t), e = i.accept, n = i.disabled, a = i.getFilesFromEvent, o = i.maxSize, r = i.minSize, p = i.multiple, c = i.maxFiles, s = i.onDragEnter, l = i.onDragLeave, v = i.onDragOver, h = i.onDrop, b = i.onDropAccepted, w = i.onDropRejected, y = i.onFileDialogCancel, g = i.onFileDialogOpen, z = i.useFsAccessApi, R = i.autoFocus, C = i.preventDropOnDocument, O = i.noClick, u = i.noKeyboard, U = i.noDrag, G = i.noDragEventsBubbling, ne = i.onError, Q = i.validator, L = ge(function() {
2579
+ return vn(e);
2580
+ }, [e]), Y = ge(function() {
2581
+ return fn(e);
2582
+ }, [e]), ae = ge(function() {
2583
+ return typeof g == "function" ? g : Wt;
2584
+ }, [g]), oe = ge(function() {
2585
+ return typeof y == "function" ? y : Wt;
2586
+ }, [y]), W = Pe(null), B = Pe(null), ee = ki(Pn, ft), re = it(ee, 2), pe = re[0], X = re[1], d = pe.isFocused, x = pe.isFileDialogActive, D = Pe(typeof window < "u" && window.isSecureContext && z && mn()), S = function() {
2587
+ !D.current && x && setTimeout(function() {
2588
+ if (B.current) {
2589
+ var E = B.current.files;
2590
+ E.length || (X({
2591
+ type: "closeDialog"
2592
+ }), oe());
2593
+ }
2594
+ }, 300);
2595
+ };
2596
+ Ie(function() {
2597
+ return window.addEventListener("focus", S, !1), function() {
2598
+ window.removeEventListener("focus", S, !1);
2599
+ };
2600
+ }, [B, x, oe, D]);
2601
+ var k = Pe([]), T = function(E) {
2602
+ W.current && W.current.contains(E.target) || (E.preventDefault(), k.current = []);
2603
+ };
2604
+ Ie(function() {
2605
+ return C && (document.addEventListener("dragover", qt, !1), document.addEventListener("drop", T, !1)), function() {
2606
+ C && (document.removeEventListener("dragover", qt), document.removeEventListener("drop", T));
2607
+ };
2608
+ }, [W, C]), Ie(function() {
2609
+ return !n && R && W.current && W.current.focus(), function() {
2610
+ };
2611
+ }, [W, R, n]);
2612
+ var _ = N(function(f) {
2613
+ ne ? ne(f) : console.error(f);
2614
+ }, [ne]), j = N(function(f) {
2615
+ f.preventDefault(), f.persist(), Se(f), k.current = [].concat(En(k.current), [f.target]), Oe(f) && Promise.resolve(a(f)).then(function(E) {
2616
+ if (!(qe(f) && !G)) {
2617
+ var H = E.length, K = H > 0 && sn({
2618
+ files: E,
2619
+ accept: L,
2620
+ minSize: r,
2621
+ maxSize: o,
2622
+ multiple: p,
2623
+ maxFiles: c,
2624
+ validator: Q
2625
+ }), ie = H > 0 && !K;
2626
+ X({
2627
+ isDragAccept: K,
2628
+ isDragReject: ie,
2629
+ isDragActive: !0,
2630
+ type: "setDraggedFiles"
2631
+ }), s && s(f);
2632
+ }
2633
+ }).catch(function(E) {
2634
+ return _(E);
2635
+ });
2636
+ }, [a, s, _, G, L, r, o, p, c, Q]), A = N(function(f) {
2637
+ f.preventDefault(), f.persist(), Se(f);
2638
+ var E = Oe(f);
2639
+ if (E && f.dataTransfer)
2640
+ try {
2641
+ f.dataTransfer.dropEffect = "copy";
2642
+ } catch {
2643
+ }
2644
+ return E && v && v(f), !1;
2645
+ }, [v, G]), F = N(function(f) {
2646
+ f.preventDefault(), f.persist(), Se(f);
2647
+ var E = k.current.filter(function(K) {
2648
+ return W.current && W.current.contains(K);
2649
+ }), H = E.indexOf(f.target);
2650
+ H !== -1 && E.splice(H, 1), k.current = E, !(E.length > 0) && (X({
2651
+ type: "setDraggedFiles",
2652
+ isDragActive: !1,
2653
+ isDragAccept: !1,
2654
+ isDragReject: !1
2655
+ }), Oe(f) && l && l(f));
2656
+ }, [W, l, G]), P = N(function(f, E) {
2657
+ var H = [], K = [];
2658
+ f.forEach(function(ie) {
2659
+ var Ee = pi(ie, L), he = it(Ee, 2), $e = he[0], Ne = he[1], He = ci(ie, r, o), je = it(He, 2), Ye = je[0], Ze = je[1], Be = Q ? Q(ie) : null;
2660
+ if ($e && Ye && !Be)
2661
+ H.push(ie);
2662
+ else {
2663
+ var Ke = [Ne, Ze];
2664
+ Be && (Ke = Ke.concat(Be)), K.push({
2665
+ file: ie,
2666
+ errors: Ke.filter(function(wi) {
2667
+ return wi;
2668
+ })
2669
+ });
2670
+ }
2671
+ }), (!p && H.length > 1 || p && c >= 1 && H.length > c) && (H.forEach(function(ie) {
2672
+ K.push({
2673
+ file: ie,
2674
+ errors: [cn]
2675
+ });
2676
+ }), H.splice(0)), X({
2677
+ acceptedFiles: H,
2678
+ fileRejections: K,
2679
+ isDragReject: K.length > 0,
2680
+ type: "setFiles"
2681
+ }), h && h(H, K, E), K.length > 0 && w && w(K, E), H.length > 0 && b && b(H, E);
2682
+ }, [X, p, L, r, o, c, h, b, w, Q]), Z = N(function(f) {
2683
+ f.preventDefault(), f.persist(), Se(f), k.current = [], Oe(f) && Promise.resolve(a(f)).then(function(E) {
2684
+ qe(f) && !G || P(E, f);
2685
+ }).catch(function(E) {
2686
+ return _(E);
2687
+ }), X({
2688
+ type: "reset"
2689
+ });
2690
+ }, [a, P, _, G]), m = N(function() {
2691
+ if (D.current) {
2692
+ X({
2693
+ type: "openDialog"
2694
+ }), ae();
2695
+ var f = {
2696
+ multiple: p,
2697
+ types: Y
2698
+ };
2699
+ window.showOpenFilePicker(f).then(function(E) {
2700
+ return a(E);
2701
+ }).then(function(E) {
2702
+ P(E, null), X({
2703
+ type: "closeDialog"
2704
+ });
2705
+ }).catch(function(E) {
2706
+ xn(E) ? (oe(E), X({
2707
+ type: "closeDialog"
2708
+ })) : hn(E) ? (D.current = !1, B.current ? (B.current.value = null, B.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."))) : _(E);
2709
+ });
2710
+ return;
2711
+ }
2712
+ B.current && (X({
2713
+ type: "openDialog"
2714
+ }), ae(), B.current.value = null, B.current.click());
2715
+ }, [X, ae, oe, z, P, _, Y, p]), te = N(function(f) {
2716
+ !W.current || !W.current.isEqualNode(f.target) || (f.key === " " || f.key === "Enter" || f.keyCode === 32 || f.keyCode === 13) && (f.preventDefault(), m());
2717
+ }, [W, m]), me = N(function() {
2718
+ X({
2719
+ type: "focus"
2720
+ });
2721
+ }, []), we = N(function() {
2722
+ X({
2723
+ type: "blur"
2724
+ });
2725
+ }, []), gt = N(function() {
2726
+ O || (un() ? setTimeout(m, 0) : m());
2727
+ }, [O, m]), xe = function(E) {
2728
+ return n ? null : E;
2729
+ }, Ue = function(E) {
2730
+ return u ? null : xe(E);
2731
+ }, De = function(E) {
2732
+ return U ? null : xe(E);
2733
+ }, Se = function(E) {
2734
+ G && E.stopPropagation();
2735
+ }, gi = ge(function() {
2736
+ return function() {
2737
+ var f = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, E = f.refKey, H = E === void 0 ? "ref" : E, K = f.role, ie = f.onKeyDown, Ee = f.onFocus, he = f.onBlur, $e = f.onClick, Ne = f.onDragEnter, He = f.onDragOver, je = f.onDragLeave, Ye = f.onDrop, Ze = Le(f, bn);
2738
+ return $($(mt({
2739
+ onKeyDown: Ue(ce(ie, te)),
2740
+ onFocus: Ue(ce(Ee, me)),
2741
+ onBlur: Ue(ce(he, we)),
2742
+ onClick: xe(ce($e, gt)),
2743
+ onDragEnter: De(ce(Ne, j)),
2744
+ onDragOver: De(ce(He, A)),
2745
+ onDragLeave: De(ce(je, F)),
2746
+ onDrop: De(ce(Ye, Z)),
2747
+ role: typeof K == "string" && K !== "" ? K : "presentation"
2748
+ }, H, W), !n && !u ? {
2749
+ tabIndex: 0
2750
+ } : {}), Ze);
2751
+ };
2752
+ }, [W, te, me, we, gt, j, A, F, Z, u, U, n]), yi = N(function(f) {
2753
+ f.stopPropagation();
2754
+ }, []), bi = ge(function() {
2755
+ return function() {
2756
+ var f = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, E = f.refKey, H = E === void 0 ? "ref" : E, K = f.onChange, ie = f.onClick, Ee = Le(f, wn), he = mt({
2757
+ accept: L,
2758
+ multiple: p,
2759
+ type: "file",
2760
+ style: {
2761
+ border: 0,
2762
+ clip: "rect(0, 0, 0, 0)",
2763
+ clipPath: "inset(50%)",
2764
+ height: "1px",
2765
+ margin: "0 -1px -1px 0",
2766
+ overflow: "hidden",
2767
+ padding: 0,
2768
+ position: "absolute",
2769
+ width: "1px",
2770
+ whiteSpace: "nowrap"
2771
+ },
2772
+ onChange: xe(ce(K, Z)),
2773
+ onClick: xe(ce(ie, yi)),
2774
+ tabIndex: -1
2775
+ }, H, B);
2776
+ return $($({}, he), Ee);
2777
+ };
2778
+ }, [B, e, p, Z, n]);
2779
+ return $($({}, pe), {}, {
2780
+ isFocused: d && !n,
2781
+ getRootProps: gi,
2782
+ getInputProps: bi,
2783
+ rootRef: W,
2784
+ inputRef: B,
2785
+ open: xe(m)
2786
+ });
2787
+ }
2788
+ function Pn(t, i) {
2789
+ switch (i.type) {
2790
+ case "focus":
2791
+ return $($({}, t), {}, {
2792
+ isFocused: !0
2793
+ });
2794
+ case "blur":
2795
+ return $($({}, t), {}, {
2796
+ isFocused: !1
2797
+ });
2798
+ case "openDialog":
2799
+ return $($({}, ft), {}, {
2800
+ isFileDialogActive: !0
2801
+ });
2802
+ case "closeDialog":
2803
+ return $($({}, t), {}, {
2804
+ isFileDialogActive: !1
2805
+ });
2806
+ case "setDraggedFiles":
2807
+ return $($({}, t), {}, {
2808
+ isDragActive: i.isDragActive,
2809
+ isDragAccept: i.isDragAccept,
2810
+ isDragReject: i.isDragReject
2811
+ });
2812
+ case "setFiles":
2813
+ return $($({}, t), {}, {
2814
+ acceptedFiles: i.acceptedFiles,
2815
+ fileRejections: i.fileRejections,
2816
+ isDragReject: i.isDragReject
2817
+ });
2818
+ case "reset":
2819
+ return $({}, ft);
2820
+ default:
2821
+ return t;
2822
+ }
2823
+ }
2824
+ function Wt() {
2825
+ }
2826
+ var Ce = ((t) => (t[t.FileTooLarge = de.FileTooLarge] = "FileTooLarge", t[t.FileTooSmall = de.FileTooSmall] = "FileTooSmall", t[t.FileInvalidType = de.FileInvalidType] = "FileInvalidType", t[t.TooManyFiles = de.TooManyFiles] = "TooManyFiles", t.Unknown = "unknown", t))(Ce || {});
2827
+ function Tn(t) {
2828
+ return t.flatMap((i) => i.errors.map((e) => e.code));
2829
+ }
2830
+ function An(t) {
2831
+ return t.includes(de.FileTooLarge) ? Ce.FileTooLarge : t.includes(de.FileTooSmall) ? Ce.FileTooSmall : t.includes(de.FileInvalidType) ? Ce.FileInvalidType : t.includes(de.TooManyFiles) ? Ce.TooManyFiles : "unknown";
2832
+ }
2833
+ function zn(t) {
2834
+ return An(Tn(t));
2835
+ }
2836
+ async function wa(t, i) {
2837
+ if ("url" in t)
2838
+ return t;
2839
+ if (!t.originalFile)
2840
+ throw new Error("Image is not defined");
2841
+ try {
2842
+ const e = await i(t);
2843
+ if (!e)
2844
+ throw new Error("Upload params are not defined");
2845
+ const { uri: n, method: a, requiredHeaders: o } = e;
2846
+ if (!(await fetch(n, { method: a, headers: o, body: t.originalFile })).ok)
2847
+ throw new Error("Failed to upload image");
2848
+ return { ...t, url: n };
2849
+ } catch {
2850
+ throw new Error("Failed to upload image");
2851
+ }
2852
+ }
2853
+ const On = {
2854
+ "image/*": []
2855
+ }, fi = { x: 0, y: 0 }, vi = 1, xi = 0, hi = Si(void 0);
2856
+ function Fn({ children: t, uploader: i }) {
2857
+ return /* @__PURE__ */ ue(hi.Provider, { value: i, children: t });
2858
+ }
2859
+ function Re() {
2860
+ const t = Di(hi);
2861
+ if (!t)
2862
+ throw new Error("All UploadImages components must be wrapped in an UploadImages.Root component");
2863
+ return t;
2864
+ }
2865
+ function In({ children: t }) {
2866
+ const { cropper: i } = Re();
2867
+ if (!i)
2868
+ throw new Error("Cropper config is not defined");
2869
+ const {
2870
+ file: e,
2871
+ editorImage: n,
2872
+ acceptImage: a,
2873
+ closeImage: o,
2874
+ config: r,
2875
+ cropArea: p,
2876
+ zoom: c,
2877
+ rotation: s,
2878
+ setCropArea: l,
2879
+ setCrop: v,
2880
+ setZoom: h,
2881
+ setRotation: b
2882
+ } = i, w = N(() => {
2883
+ o(), v(fi), h(vi), b(xi), l(void 0);
2884
+ }, [o, v, l, b, h]), y = N(() => {
2885
+ if (!n) return;
2886
+ const g = document.createElement("canvas"), z = document.createElement("canvas"), R = g.getContext("2d"), C = z.getContext("2d"), O = new Image();
2887
+ O.onload = function() {
2888
+ const { naturalWidth: u, naturalHeight: U } = O, G = s * (Math.PI / 180), ne = Math.abs(Math.sin(G)), Q = Math.abs(Math.cos(G)), L = u * Q + U * ne, Y = U * Q + u * ne;
2889
+ g.width = L, g.height = Y, R.fillStyle = "#fff", R.fillRect(0, 0, L, Y);
2890
+ const ae = L / 2, oe = Y / 2;
2891
+ R.translate(ae, oe), R.rotate(G), R.translate(-ae, -oe);
2892
+ const W = (L - u) / 2, B = (Y - U) / 2;
2893
+ R.drawImage(O, 0, 0, u, U, W, B, u, U), z.width = Math.min(
2894
+ (p?.width ?? 100) / 100 * L,
2895
+ r.maxWidth ?? Number.POSITIVE_INFINITY
2896
+ ), z.height = Math.min(
2897
+ (p?.height ?? 100) / 100 * Y,
2898
+ r.maxHeight ?? Number.POSITIVE_INFINITY
2899
+ ), C.drawImage(
2900
+ g,
2901
+ (p?.x ?? 0) / 100 * L,
2902
+ (p?.y ?? 0) / 100 * Y,
2903
+ (p?.width ?? 100) / 100 * L,
2904
+ (p?.height ?? 100) / 100 * Y,
2905
+ 0,
2906
+ 0,
2907
+ z.width,
2908
+ z.height
2909
+ ), z.toBlob((ee) => {
2910
+ if (!e)
2911
+ return;
2912
+ const pe = {
2913
+ originalFile: new File([ee], e.originalFile.name ?? "image.png", {
2914
+ type: e.originalFile.type ?? "image/png"
2915
+ }),
2916
+ id: e.id
2917
+ };
2918
+ a(pe);
2919
+ }), w();
2920
+ }, O.src = n;
2921
+ }, [w, r, p, e, n, s, a]);
2922
+ return typeof t == "function" ? t({ zoom: c, rotation: s, setZoom: h, setRotation: b, accept: y, close: w }) : t;
2923
+ }
2924
+ var nt, Ut;
2925
+ function Mn() {
2926
+ if (Ut) return nt;
2927
+ Ut = 1;
2928
+ var t = !1, i, e, n, a, o, r, p, c, s, l, v, h, b, w, y;
2929
+ function g() {
2930
+ if (!t) {
2931
+ t = !0;
2932
+ var R = navigator.userAgent, C = /(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(R), O = /(Mac OS X)|(Windows)|(Linux)/.exec(R);
2933
+ if (h = /\b(iPhone|iP[ao]d)/.exec(R), b = /\b(iP[ao]d)/.exec(R), l = /Android/i.exec(R), w = /FBAN\/\w+;/i.exec(R), y = /Mobile/i.exec(R), v = !!/Win64/.exec(R), C) {
2934
+ i = C[1] ? parseFloat(C[1]) : C[5] ? parseFloat(C[5]) : NaN, i && document && document.documentMode && (i = document.documentMode);
2935
+ var u = /(?:Trident\/(\d+.\d+))/.exec(R);
2936
+ r = u ? parseFloat(u[1]) + 4 : i, e = C[2] ? parseFloat(C[2]) : NaN, n = C[3] ? parseFloat(C[3]) : NaN, a = C[4] ? parseFloat(C[4]) : NaN, a ? (C = /(?:Chrome\/(\d+\.\d+))/.exec(R), o = C && C[1] ? parseFloat(C[1]) : NaN) : o = NaN;
2937
+ } else
2938
+ i = e = n = o = a = NaN;
2939
+ if (O) {
2940
+ if (O[1]) {
2941
+ var U = /(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(R);
2942
+ p = U ? parseFloat(U[1].replace("_", ".")) : !0;
2943
+ } else
2944
+ p = !1;
2945
+ c = !!O[2], s = !!O[3];
2946
+ } else
2947
+ p = c = s = !1;
2948
+ }
2949
+ }
2950
+ var z = {
2951
+ /**
2952
+ * Check if the UA is Internet Explorer.
2953
+ *
2954
+ *
2955
+ * @return float|NaN Version number (if match) or NaN.
2956
+ */
2957
+ ie: function() {
2958
+ return g() || i;
2959
+ },
2960
+ /**
2961
+ * Check if we're in Internet Explorer compatibility mode.
2962
+ *
2963
+ * @return bool true if in compatibility mode, false if
2964
+ * not compatibility mode or not ie
2965
+ */
2966
+ ieCompatibilityMode: function() {
2967
+ return g() || r > i;
2968
+ },
2969
+ /**
2970
+ * Whether the browser is 64-bit IE. Really, this is kind of weak sauce; we
2971
+ * only need this because Skype can't handle 64-bit IE yet. We need to remove
2972
+ * this when we don't need it -- tracked by #601957.
2973
+ */
2974
+ ie64: function() {
2975
+ return z.ie() && v;
2976
+ },
2977
+ /**
2978
+ * Check if the UA is Firefox.
2979
+ *
2980
+ *
2981
+ * @return float|NaN Version number (if match) or NaN.
2982
+ */
2983
+ firefox: function() {
2984
+ return g() || e;
2985
+ },
2986
+ /**
2987
+ * Check if the UA is Opera.
2988
+ *
2989
+ *
2990
+ * @return float|NaN Version number (if match) or NaN.
2991
+ */
2992
+ opera: function() {
2993
+ return g() || n;
2994
+ },
2995
+ /**
2996
+ * Check if the UA is WebKit.
2997
+ *
2998
+ *
2999
+ * @return float|NaN Version number (if match) or NaN.
3000
+ */
3001
+ webkit: function() {
3002
+ return g() || a;
3003
+ },
3004
+ /**
3005
+ * For Push
3006
+ * WILL BE REMOVED VERY SOON. Use UserAgent_DEPRECATED.webkit
3007
+ */
3008
+ safari: function() {
3009
+ return z.webkit();
3010
+ },
3011
+ /**
3012
+ * Check if the UA is a Chrome browser.
3013
+ *
3014
+ *
3015
+ * @return float|NaN Version number (if match) or NaN.
3016
+ */
3017
+ chrome: function() {
3018
+ return g() || o;
3019
+ },
3020
+ /**
3021
+ * Check if the user is running Windows.
3022
+ *
3023
+ * @return bool `true' if the user's OS is Windows.
3024
+ */
3025
+ windows: function() {
3026
+ return g() || c;
3027
+ },
3028
+ /**
3029
+ * Check if the user is running Mac OS X.
3030
+ *
3031
+ * @return float|bool Returns a float if a version number is detected,
3032
+ * otherwise true/false.
3033
+ */
3034
+ osx: function() {
3035
+ return g() || p;
3036
+ },
3037
+ /**
3038
+ * Check if the user is running Linux.
3039
+ *
3040
+ * @return bool `true' if the user's OS is some flavor of Linux.
3041
+ */
3042
+ linux: function() {
3043
+ return g() || s;
3044
+ },
3045
+ /**
3046
+ * Check if the user is running on an iPhone or iPod platform.
3047
+ *
3048
+ * @return bool `true' if the user is running some flavor of the
3049
+ * iPhone OS.
3050
+ */
3051
+ iphone: function() {
3052
+ return g() || h;
3053
+ },
3054
+ mobile: function() {
3055
+ return g() || h || b || l || y;
3056
+ },
3057
+ nativeApp: function() {
3058
+ return g() || w;
3059
+ },
3060
+ android: function() {
3061
+ return g() || l;
3062
+ },
3063
+ ipad: function() {
3064
+ return g() || b;
3065
+ }
3066
+ };
3067
+ return nt = z, nt;
3068
+ }
3069
+ var at, $t;
3070
+ function qn() {
3071
+ if ($t) return at;
3072
+ $t = 1;
3073
+ var t = !!(typeof window < "u" && window.document && window.document.createElement), i = {
3074
+ canUseDOM: t,
3075
+ canUseWorkers: typeof Worker < "u",
3076
+ canUseEventListeners: t && !!(window.addEventListener || window.attachEvent),
3077
+ canUseViewport: t && !!window.screen,
3078
+ isInWorker: !t
3079
+ // For now, this is true - might change in the future.
3080
+ };
3081
+ return at = i, at;
3082
+ }
3083
+ var ot, Nt;
3084
+ function Ln() {
3085
+ if (Nt) return ot;
3086
+ Nt = 1;
3087
+ var t = qn(), i;
3088
+ t.canUseDOM && (i = document.implementation && document.implementation.hasFeature && // always returns true in newer browsers as per the standard.
3089
+ // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature
3090
+ document.implementation.hasFeature("", "") !== !0);
3091
+ function e(n, a) {
3092
+ if (!t.canUseDOM || a && !("addEventListener" in document))
3093
+ return !1;
3094
+ var o = "on" + n, r = o in document;
3095
+ if (!r) {
3096
+ var p = document.createElement("div");
3097
+ p.setAttribute(o, "return;"), r = typeof p[o] == "function";
3098
+ }
3099
+ return !r && i && n === "wheel" && (r = document.implementation.hasFeature("Events.wheel", "3.0")), r;
3100
+ }
3101
+ return ot = e, ot;
3102
+ }
3103
+ var rt, Ht;
3104
+ function Wn() {
3105
+ if (Ht) return rt;
3106
+ Ht = 1;
3107
+ var t = Mn(), i = Ln(), e = 10, n = 40, a = 800;
3108
+ function o(r) {
3109
+ var p = 0, c = 0, s = 0, l = 0;
3110
+ return "detail" in r && (c = r.detail), "wheelDelta" in r && (c = -r.wheelDelta / 120), "wheelDeltaY" in r && (c = -r.wheelDeltaY / 120), "wheelDeltaX" in r && (p = -r.wheelDeltaX / 120), "axis" in r && r.axis === r.HORIZONTAL_AXIS && (p = c, c = 0), s = p * e, l = c * e, "deltaY" in r && (l = r.deltaY), "deltaX" in r && (s = r.deltaX), (s || l) && r.deltaMode && (r.deltaMode == 1 ? (s *= n, l *= n) : (s *= a, l *= a)), s && !p && (p = s < 1 ? -1 : 1), l && !c && (c = l < 1 ? -1 : 1), {
3111
+ spinX: p,
3112
+ spinY: c,
3113
+ pixelX: s,
3114
+ pixelY: l
3115
+ };
3116
+ }
3117
+ return o.getEventType = function() {
3118
+ return t.firefox() ? "DOMMouseScroll" : i("wheel") ? "wheel" : "mousewheel";
3119
+ }, rt = o, rt;
3120
+ }
3121
+ var pt, Yt;
3122
+ function Un() {
3123
+ return Yt || (Yt = 1, pt = Wn()), pt;
3124
+ }
3125
+ var $n = Un();
3126
+ const Nn = /* @__PURE__ */ vt($n);
3127
+ function Hn(t, i, e, n, a, o) {
3128
+ o === void 0 && (o = 0);
3129
+ var r = be(t, i, o), p = r.width, c = r.height, s = Math.min(p, e), l = Math.min(c, n);
3130
+ return s > l * a ? {
3131
+ width: l * a,
3132
+ height: l
3133
+ } : {
3134
+ width: s,
3135
+ height: s / a
3136
+ };
3137
+ }
3138
+ function Yn(t) {
3139
+ return t.width > t.height ? t.width / t.naturalWidth : t.height / t.naturalHeight;
3140
+ }
3141
+ function ke(t, i, e, n, a) {
3142
+ a === void 0 && (a = 0);
3143
+ var o = be(i.width, i.height, a), r = o.width, p = o.height;
3144
+ return {
3145
+ x: Zt(t.x, r, e.width, n),
3146
+ y: Zt(t.y, p, e.height, n)
3147
+ };
3148
+ }
3149
+ function Zt(t, i, e, n) {
3150
+ var a = i * n / 2 - e / 2;
3151
+ return We(t, -a, a);
3152
+ }
3153
+ function Bt(t, i) {
3154
+ return Math.sqrt(Math.pow(t.y - i.y, 2) + Math.pow(t.x - i.x, 2));
3155
+ }
3156
+ function Kt(t, i) {
3157
+ return Math.atan2(i.y - t.y, i.x - t.x) * 180 / Math.PI;
3158
+ }
3159
+ function Zn(t, i, e, n, a, o, r) {
3160
+ o === void 0 && (o = 0), r === void 0 && (r = !0);
3161
+ var p = r ? Bn : Kn, c = be(i.width, i.height, o), s = be(i.naturalWidth, i.naturalHeight, o), l = {
3162
+ x: p(100, ((c.width - e.width / a) / 2 - t.x / a) / c.width * 100),
3163
+ y: p(100, ((c.height - e.height / a) / 2 - t.y / a) / c.height * 100),
3164
+ width: p(100, e.width / c.width * 100 / a),
3165
+ height: p(100, e.height / c.height * 100 / a)
3166
+ }, v = Math.round(p(s.width, l.width * s.width / 100)), h = Math.round(p(s.height, l.height * s.height / 100)), b = s.width >= s.height * n, w = b ? {
3167
+ width: Math.round(h * n),
3168
+ height: h
3169
+ } : {
3170
+ width: v,
3171
+ height: Math.round(v / n)
3172
+ }, y = V(V({}, w), {
3173
+ x: Math.round(p(s.width - w.width, l.x * s.width / 100)),
3174
+ y: Math.round(p(s.height - w.height, l.y * s.height / 100))
3175
+ });
3176
+ return {
3177
+ croppedAreaPercentages: l,
3178
+ croppedAreaPixels: y
3179
+ };
3180
+ }
3181
+ function Bn(t, i) {
3182
+ return Math.min(t, Math.max(0, i));
3183
+ }
3184
+ function Kn(t, i) {
3185
+ return i;
3186
+ }
3187
+ function Vn(t, i, e, n, a, o) {
3188
+ var r = be(i.width, i.height, e), p = We(n.width / r.width * (100 / t.width), a, o), c = {
3189
+ x: p * r.width / 2 - n.width / 2 - r.width * p * (t.x / 100),
3190
+ y: p * r.height / 2 - n.height / 2 - r.height * p * (t.y / 100)
3191
+ };
3192
+ return {
3193
+ crop: c,
3194
+ zoom: p
3195
+ };
3196
+ }
3197
+ function Gn(t, i, e) {
3198
+ var n = Yn(i);
3199
+ return e.height > e.width ? e.height / (t.height * n) : e.width / (t.width * n);
3200
+ }
3201
+ function Xn(t, i, e, n, a, o) {
3202
+ e === void 0 && (e = 0);
3203
+ var r = be(i.naturalWidth, i.naturalHeight, e), p = We(Gn(t, i, n), a, o), c = n.height > n.width ? n.height / t.height : n.width / t.width, s = {
3204
+ x: ((r.width - t.width) / 2 - t.x) * c,
3205
+ y: ((r.height - t.height) / 2 - t.y) * c
3206
+ };
3207
+ return {
3208
+ crop: s,
3209
+ zoom: p
3210
+ };
3211
+ }
3212
+ function Vt(t, i) {
3213
+ return {
3214
+ x: (i.x + t.x) / 2,
3215
+ y: (i.y + t.y) / 2
3216
+ };
3217
+ }
3218
+ function Jn(t) {
3219
+ return t * Math.PI / 180;
3220
+ }
3221
+ function be(t, i, e) {
3222
+ var n = Jn(e);
3223
+ return {
3224
+ width: Math.abs(Math.cos(n) * t) + Math.abs(Math.sin(n) * i),
3225
+ height: Math.abs(Math.sin(n) * t) + Math.abs(Math.cos(n) * i)
3226
+ };
3227
+ }
3228
+ function We(t, i, e) {
3229
+ return Math.min(Math.max(t, i), e);
3230
+ }
3231
+ function Fe() {
3232
+ for (var t = [], i = 0; i < arguments.length; i++)
3233
+ t[i] = arguments[i];
3234
+ return t.filter(function(e) {
3235
+ return typeof e == "string" && e.length > 0;
3236
+ }).join(" ").trim();
3237
+ }
3238
+ var Qn = `.reactEasyCrop_Container {
3239
+ position: absolute;
3240
+ top: 0;
3241
+ left: 0;
3242
+ right: 0;
3243
+ bottom: 0;
3244
+ overflow: hidden;
3245
+ user-select: none;
3246
+ touch-action: none;
3247
+ cursor: move;
3248
+ display: flex;
3249
+ justify-content: center;
3250
+ align-items: center;
3251
+ }
3252
+
3253
+ .reactEasyCrop_Image,
3254
+ .reactEasyCrop_Video {
3255
+ will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */
3256
+ }
3257
+
3258
+ .reactEasyCrop_Contain {
3259
+ max-width: 100%;
3260
+ max-height: 100%;
3261
+ margin: auto;
3262
+ position: absolute;
3263
+ top: 0;
3264
+ bottom: 0;
3265
+ left: 0;
3266
+ right: 0;
3267
+ }
3268
+ .reactEasyCrop_Cover_Horizontal {
3269
+ width: 100%;
3270
+ height: auto;
3271
+ }
3272
+ .reactEasyCrop_Cover_Vertical {
3273
+ width: auto;
3274
+ height: 100%;
3275
+ }
3276
+
3277
+ .reactEasyCrop_CropArea {
3278
+ position: absolute;
3279
+ left: 50%;
3280
+ top: 50%;
3281
+ transform: translate(-50%, -50%);
3282
+ border: 1px solid rgba(255, 255, 255, 0.5);
3283
+ box-sizing: border-box;
3284
+ box-shadow: 0 0 0 9999em;
3285
+ color: rgba(0, 0, 0, 0.5);
3286
+ overflow: hidden;
3287
+ }
3288
+
3289
+ .reactEasyCrop_CropAreaRound {
3290
+ border-radius: 50%;
3291
+ }
3292
+
3293
+ .reactEasyCrop_CropAreaGrid::before {
3294
+ content: ' ';
3295
+ box-sizing: border-box;
3296
+ position: absolute;
3297
+ border: 1px solid rgba(255, 255, 255, 0.5);
3298
+ top: 0;
3299
+ bottom: 0;
3300
+ left: 33.33%;
3301
+ right: 33.33%;
3302
+ border-top: 0;
3303
+ border-bottom: 0;
3304
+ }
3305
+
3306
+ .reactEasyCrop_CropAreaGrid::after {
3307
+ content: ' ';
3308
+ box-sizing: border-box;
3309
+ position: absolute;
3310
+ border: 1px solid rgba(255, 255, 255, 0.5);
3311
+ top: 33.33%;
3312
+ bottom: 33.33%;
3313
+ left: 0;
3314
+ right: 0;
3315
+ border-left: 0;
3316
+ border-right: 0;
3317
+ }
3318
+ `, ea = 1, ta = 3, ia = 1, na = (
3319
+ /** @class */
3320
+ (function(t) {
3321
+ qi(i, t);
3322
+ function i() {
3323
+ var e = t !== null && t.apply(this, arguments) || this;
3324
+ return e.cropperRef = se.createRef(), e.imageRef = se.createRef(), e.videoRef = se.createRef(), e.containerPosition = {
3325
+ x: 0,
3326
+ y: 0
3327
+ }, e.containerRef = null, e.styleRef = null, e.containerRect = null, e.mediaSize = {
3328
+ width: 0,
3329
+ height: 0,
3330
+ naturalWidth: 0,
3331
+ naturalHeight: 0
3332
+ }, e.dragStartPosition = {
3333
+ x: 0,
3334
+ y: 0
3335
+ }, e.dragStartCrop = {
3336
+ x: 0,
3337
+ y: 0
3338
+ }, e.gestureZoomStart = 0, e.gestureRotationStart = 0, e.isTouching = !1, e.lastPinchDistance = 0, e.lastPinchRotation = 0, e.rafDragTimeout = null, e.rafPinchTimeout = null, e.wheelTimer = null, e.currentDoc = typeof document < "u" ? document : null, e.currentWindow = typeof window < "u" ? window : null, e.resizeObserver = null, e.state = {
3339
+ cropSize: null,
3340
+ hasWheelJustStarted: !1,
3341
+ mediaObjectFit: void 0
3342
+ }, e.initResizeObserver = function() {
3343
+ if (!(typeof window.ResizeObserver > "u" || !e.containerRef)) {
3344
+ var n = !0;
3345
+ e.resizeObserver = new window.ResizeObserver(function(a) {
3346
+ if (n) {
3347
+ n = !1;
3348
+ return;
3349
+ }
3350
+ e.computeSizes();
3351
+ }), e.resizeObserver.observe(e.containerRef);
3352
+ }
3353
+ }, e.preventZoomSafari = function(n) {
3354
+ return n.preventDefault();
3355
+ }, e.cleanEvents = function() {
3356
+ e.currentDoc && (e.currentDoc.removeEventListener("mousemove", e.onMouseMove), e.currentDoc.removeEventListener("mouseup", e.onDragStopped), e.currentDoc.removeEventListener("touchmove", e.onTouchMove), e.currentDoc.removeEventListener("touchend", e.onDragStopped), e.currentDoc.removeEventListener("gesturechange", e.onGestureChange), e.currentDoc.removeEventListener("gestureend", e.onGestureEnd), e.currentDoc.removeEventListener("scroll", e.onScroll));
3357
+ }, e.clearScrollEvent = function() {
3358
+ e.containerRef && e.containerRef.removeEventListener("wheel", e.onWheel), e.wheelTimer && clearTimeout(e.wheelTimer);
3359
+ }, e.onMediaLoad = function() {
3360
+ var n = e.computeSizes();
3361
+ n && (e.emitCropData(), e.setInitialCrop(n)), e.props.onMediaLoaded && e.props.onMediaLoaded(e.mediaSize);
3362
+ }, e.setInitialCrop = function(n) {
3363
+ if (e.props.initialCroppedAreaPercentages) {
3364
+ var a = Vn(e.props.initialCroppedAreaPercentages, e.mediaSize, e.props.rotation, n, e.props.minZoom, e.props.maxZoom), o = a.crop, r = a.zoom;
3365
+ e.props.onCropChange(o), e.props.onZoomChange && e.props.onZoomChange(r);
3366
+ } else if (e.props.initialCroppedAreaPixels) {
3367
+ var p = Xn(e.props.initialCroppedAreaPixels, e.mediaSize, e.props.rotation, n, e.props.minZoom, e.props.maxZoom), o = p.crop, r = p.zoom;
3368
+ e.props.onCropChange(o), e.props.onZoomChange && e.props.onZoomChange(r);
3369
+ }
3370
+ }, e.computeSizes = function() {
3371
+ var n, a, o, r, p, c, s = e.imageRef.current || e.videoRef.current;
3372
+ if (s && e.containerRef) {
3373
+ e.containerRect = e.containerRef.getBoundingClientRect(), e.saveContainerPosition();
3374
+ var l = e.containerRect.width / e.containerRect.height, v = ((n = e.imageRef.current) === null || n === void 0 ? void 0 : n.naturalWidth) || ((a = e.videoRef.current) === null || a === void 0 ? void 0 : a.videoWidth) || 0, h = ((o = e.imageRef.current) === null || o === void 0 ? void 0 : o.naturalHeight) || ((r = e.videoRef.current) === null || r === void 0 ? void 0 : r.videoHeight) || 0, b = s.offsetWidth < v || s.offsetHeight < h, w = v / h, y = void 0;
3375
+ if (b)
3376
+ switch (e.state.mediaObjectFit) {
3377
+ default:
3378
+ case "contain":
3379
+ y = l > w ? {
3380
+ width: e.containerRect.height * w,
3381
+ height: e.containerRect.height
3382
+ } : {
3383
+ width: e.containerRect.width,
3384
+ height: e.containerRect.width / w
3385
+ };
3386
+ break;
3387
+ case "horizontal-cover":
3388
+ y = {
3389
+ width: e.containerRect.width,
3390
+ height: e.containerRect.width / w
3391
+ };
3392
+ break;
3393
+ case "vertical-cover":
3394
+ y = {
3395
+ width: e.containerRect.height * w,
3396
+ height: e.containerRect.height
3397
+ };
3398
+ break;
3399
+ }
3400
+ else
3401
+ y = {
3402
+ width: s.offsetWidth,
3403
+ height: s.offsetHeight
3404
+ };
3405
+ e.mediaSize = V(V({}, y), {
3406
+ naturalWidth: v,
3407
+ naturalHeight: h
3408
+ }), e.props.setMediaSize && e.props.setMediaSize(e.mediaSize);
3409
+ var g = e.props.cropSize ? e.props.cropSize : Hn(e.mediaSize.width, e.mediaSize.height, e.containerRect.width, e.containerRect.height, e.props.aspect, e.props.rotation);
3410
+ return (((p = e.state.cropSize) === null || p === void 0 ? void 0 : p.height) !== g.height || ((c = e.state.cropSize) === null || c === void 0 ? void 0 : c.width) !== g.width) && e.props.onCropSizeChange && e.props.onCropSizeChange(g), e.setState({
3411
+ cropSize: g
3412
+ }, e.recomputeCropPosition), e.props.setCropSize && e.props.setCropSize(g), g;
3413
+ }
3414
+ }, e.saveContainerPosition = function() {
3415
+ if (e.containerRef) {
3416
+ var n = e.containerRef.getBoundingClientRect();
3417
+ e.containerPosition = {
3418
+ x: n.left,
3419
+ y: n.top
3420
+ };
3421
+ }
3422
+ }, e.onMouseDown = function(n) {
3423
+ e.currentDoc && (n.preventDefault(), e.currentDoc.addEventListener("mousemove", e.onMouseMove), e.currentDoc.addEventListener("mouseup", e.onDragStopped), e.saveContainerPosition(), e.onDragStart(i.getMousePoint(n)));
3424
+ }, e.onMouseMove = function(n) {
3425
+ return e.onDrag(i.getMousePoint(n));
3426
+ }, e.onScroll = function(n) {
3427
+ e.currentDoc && (n.preventDefault(), e.saveContainerPosition());
3428
+ }, e.onTouchStart = function(n) {
3429
+ e.currentDoc && (e.isTouching = !0, !(e.props.onTouchRequest && !e.props.onTouchRequest(n)) && (e.currentDoc.addEventListener("touchmove", e.onTouchMove, {
3430
+ passive: !1
3431
+ }), e.currentDoc.addEventListener("touchend", e.onDragStopped), e.saveContainerPosition(), n.touches.length === 2 ? e.onPinchStart(n) : n.touches.length === 1 && e.onDragStart(i.getTouchPoint(n.touches[0]))));
3432
+ }, e.onTouchMove = function(n) {
3433
+ n.preventDefault(), n.touches.length === 2 ? e.onPinchMove(n) : n.touches.length === 1 && e.onDrag(i.getTouchPoint(n.touches[0]));
3434
+ }, e.onGestureStart = function(n) {
3435
+ e.currentDoc && (n.preventDefault(), e.currentDoc.addEventListener("gesturechange", e.onGestureChange), e.currentDoc.addEventListener("gestureend", e.onGestureEnd), e.gestureZoomStart = e.props.zoom, e.gestureRotationStart = e.props.rotation);
3436
+ }, e.onGestureChange = function(n) {
3437
+ if (n.preventDefault(), !e.isTouching) {
3438
+ var a = i.getMousePoint(n), o = e.gestureZoomStart - 1 + n.scale;
3439
+ if (e.setNewZoom(o, a, {
3440
+ shouldUpdatePosition: !0
3441
+ }), e.props.onRotationChange) {
3442
+ var r = e.gestureRotationStart + n.rotation;
3443
+ e.props.onRotationChange(r);
3444
+ }
3445
+ }
3446
+ }, e.onGestureEnd = function(n) {
3447
+ e.cleanEvents();
3448
+ }, e.onDragStart = function(n) {
3449
+ var a, o, r = n.x, p = n.y;
3450
+ e.dragStartPosition = {
3451
+ x: r,
3452
+ y: p
3453
+ }, e.dragStartCrop = V({}, e.props.crop), (o = (a = e.props).onInteractionStart) === null || o === void 0 || o.call(a);
3454
+ }, e.onDrag = function(n) {
3455
+ var a = n.x, o = n.y;
3456
+ e.currentWindow && (e.rafDragTimeout && e.currentWindow.cancelAnimationFrame(e.rafDragTimeout), e.rafDragTimeout = e.currentWindow.requestAnimationFrame(function() {
3457
+ if (e.state.cropSize && !(a === void 0 || o === void 0)) {
3458
+ var r = a - e.dragStartPosition.x, p = o - e.dragStartPosition.y, c = {
3459
+ x: e.dragStartCrop.x + r,
3460
+ y: e.dragStartCrop.y + p
3461
+ }, s = e.props.restrictPosition ? ke(c, e.mediaSize, e.state.cropSize, e.props.zoom, e.props.rotation) : c;
3462
+ e.props.onCropChange(s);
3463
+ }
3464
+ }));
3465
+ }, e.onDragStopped = function() {
3466
+ var n, a;
3467
+ e.isTouching = !1, e.cleanEvents(), e.emitCropData(), (a = (n = e.props).onInteractionEnd) === null || a === void 0 || a.call(n);
3468
+ }, e.onWheel = function(n) {
3469
+ if (e.currentWindow && !(e.props.onWheelRequest && !e.props.onWheelRequest(n))) {
3470
+ n.preventDefault();
3471
+ var a = i.getMousePoint(n), o = Nn(n).pixelY, r = e.props.zoom - o * e.props.zoomSpeed / 200;
3472
+ e.setNewZoom(r, a, {
3473
+ shouldUpdatePosition: !0
3474
+ }), e.state.hasWheelJustStarted || e.setState({
3475
+ hasWheelJustStarted: !0
3476
+ }, function() {
3477
+ var p, c;
3478
+ return (c = (p = e.props).onInteractionStart) === null || c === void 0 ? void 0 : c.call(p);
3479
+ }), e.wheelTimer && clearTimeout(e.wheelTimer), e.wheelTimer = e.currentWindow.setTimeout(function() {
3480
+ return e.setState({
3481
+ hasWheelJustStarted: !1
3482
+ }, function() {
3483
+ var p, c;
3484
+ return (c = (p = e.props).onInteractionEnd) === null || c === void 0 ? void 0 : c.call(p);
3485
+ });
3486
+ }, 250);
3487
+ }
3488
+ }, e.getPointOnContainer = function(n, a) {
3489
+ var o = n.x, r = n.y;
3490
+ if (!e.containerRect)
3491
+ throw new Error("The Cropper is not mounted");
3492
+ return {
3493
+ x: e.containerRect.width / 2 - (o - a.x),
3494
+ y: e.containerRect.height / 2 - (r - a.y)
3495
+ };
3496
+ }, e.getPointOnMedia = function(n) {
3497
+ var a = n.x, o = n.y, r = e.props, p = r.crop, c = r.zoom;
3498
+ return {
3499
+ x: (a + p.x) / c,
3500
+ y: (o + p.y) / c
3501
+ };
3502
+ }, e.setNewZoom = function(n, a, o) {
3503
+ var r = o === void 0 ? {} : o, p = r.shouldUpdatePosition, c = p === void 0 ? !0 : p;
3504
+ if (!(!e.state.cropSize || !e.props.onZoomChange)) {
3505
+ var s = We(n, e.props.minZoom, e.props.maxZoom);
3506
+ if (c) {
3507
+ var l = e.getPointOnContainer(a, e.containerPosition), v = e.getPointOnMedia(l), h = {
3508
+ x: v.x * s - l.x,
3509
+ y: v.y * s - l.y
3510
+ }, b = e.props.restrictPosition ? ke(h, e.mediaSize, e.state.cropSize, s, e.props.rotation) : h;
3511
+ e.props.onCropChange(b);
3512
+ }
3513
+ e.props.onZoomChange(s);
3514
+ }
3515
+ }, e.getCropData = function() {
3516
+ if (!e.state.cropSize)
3517
+ return null;
3518
+ var n = e.props.restrictPosition ? ke(e.props.crop, e.mediaSize, e.state.cropSize, e.props.zoom, e.props.rotation) : e.props.crop;
3519
+ return Zn(n, e.mediaSize, e.state.cropSize, e.getAspect(), e.props.zoom, e.props.rotation, e.props.restrictPosition);
3520
+ }, e.emitCropData = function() {
3521
+ var n = e.getCropData();
3522
+ if (n) {
3523
+ var a = n.croppedAreaPercentages, o = n.croppedAreaPixels;
3524
+ e.props.onCropComplete && e.props.onCropComplete(a, o), e.props.onCropAreaChange && e.props.onCropAreaChange(a, o);
3525
+ }
3526
+ }, e.emitCropAreaChange = function() {
3527
+ var n = e.getCropData();
3528
+ if (n) {
3529
+ var a = n.croppedAreaPercentages, o = n.croppedAreaPixels;
3530
+ e.props.onCropAreaChange && e.props.onCropAreaChange(a, o);
3531
+ }
3532
+ }, e.recomputeCropPosition = function() {
3533
+ if (e.state.cropSize) {
3534
+ var n = e.props.restrictPosition ? ke(e.props.crop, e.mediaSize, e.state.cropSize, e.props.zoom, e.props.rotation) : e.props.crop;
3535
+ e.props.onCropChange(n), e.emitCropData();
3536
+ }
3537
+ }, e.onKeyDown = function(n) {
3538
+ var a, o, r = e.props, p = r.crop, c = r.onCropChange, s = r.keyboardStep, l = r.zoom, v = r.rotation, h = s;
3539
+ if (e.state.cropSize) {
3540
+ n.shiftKey && (h *= 0.2);
3541
+ var b = V({}, p);
3542
+ switch (n.key) {
3543
+ case "ArrowUp":
3544
+ b.y -= h, n.preventDefault();
3545
+ break;
3546
+ case "ArrowDown":
3547
+ b.y += h, n.preventDefault();
3548
+ break;
3549
+ case "ArrowLeft":
3550
+ b.x -= h, n.preventDefault();
3551
+ break;
3552
+ case "ArrowRight":
3553
+ b.x += h, n.preventDefault();
3554
+ break;
3555
+ default:
3556
+ return;
3557
+ }
3558
+ e.props.restrictPosition && (b = ke(b, e.mediaSize, e.state.cropSize, l, v)), n.repeat || (o = (a = e.props).onInteractionStart) === null || o === void 0 || o.call(a), c(b);
3559
+ }
3560
+ }, e.onKeyUp = function(n) {
3561
+ var a, o;
3562
+ switch (n.key) {
3563
+ case "ArrowUp":
3564
+ case "ArrowDown":
3565
+ case "ArrowLeft":
3566
+ case "ArrowRight":
3567
+ n.preventDefault();
3568
+ break;
3569
+ default:
3570
+ return;
3571
+ }
3572
+ e.emitCropData(), (o = (a = e.props).onInteractionEnd) === null || o === void 0 || o.call(a);
3573
+ }, e;
3574
+ }
3575
+ return i.prototype.componentDidMount = function() {
3576
+ !this.currentDoc || !this.currentWindow || (this.containerRef && (this.containerRef.ownerDocument && (this.currentDoc = this.containerRef.ownerDocument), this.currentDoc.defaultView && (this.currentWindow = this.currentDoc.defaultView), this.initResizeObserver(), typeof window.ResizeObserver > "u" && this.currentWindow.addEventListener("resize", this.computeSizes), this.props.zoomWithScroll && this.containerRef.addEventListener("wheel", this.onWheel, {
3577
+ passive: !1
3578
+ }), this.containerRef.addEventListener("gesturestart", this.onGestureStart)), this.currentDoc.addEventListener("scroll", this.onScroll), this.props.disableAutomaticStylesInjection || (this.styleRef = this.currentDoc.createElement("style"), this.styleRef.setAttribute("type", "text/css"), this.props.nonce && this.styleRef.setAttribute("nonce", this.props.nonce), this.styleRef.innerHTML = Qn, this.currentDoc.head.appendChild(this.styleRef)), this.imageRef.current && this.imageRef.current.complete && this.onMediaLoad(), this.props.setImageRef && this.props.setImageRef(this.imageRef), this.props.setVideoRef && this.props.setVideoRef(this.videoRef), this.props.setCropperRef && this.props.setCropperRef(this.cropperRef));
3579
+ }, i.prototype.componentWillUnmount = function() {
3580
+ var e, n;
3581
+ !this.currentDoc || !this.currentWindow || (typeof window.ResizeObserver > "u" && this.currentWindow.removeEventListener("resize", this.computeSizes), (e = this.resizeObserver) === null || e === void 0 || e.disconnect(), this.containerRef && this.containerRef.removeEventListener("gesturestart", this.preventZoomSafari), this.styleRef && ((n = this.styleRef.parentNode) === null || n === void 0 || n.removeChild(this.styleRef)), this.cleanEvents(), this.props.zoomWithScroll && this.clearScrollEvent());
3582
+ }, i.prototype.componentDidUpdate = function(e) {
3583
+ var n, a, o, r, p, c, s, l, v;
3584
+ e.rotation !== this.props.rotation ? (this.computeSizes(), this.recomputeCropPosition()) : e.aspect !== this.props.aspect ? this.computeSizes() : e.objectFit !== this.props.objectFit ? this.computeSizes() : e.zoom !== this.props.zoom ? this.recomputeCropPosition() : ((n = e.cropSize) === null || n === void 0 ? void 0 : n.height) !== ((a = this.props.cropSize) === null || a === void 0 ? void 0 : a.height) || ((o = e.cropSize) === null || o === void 0 ? void 0 : o.width) !== ((r = this.props.cropSize) === null || r === void 0 ? void 0 : r.width) ? this.computeSizes() : (((p = e.crop) === null || p === void 0 ? void 0 : p.x) !== ((c = this.props.crop) === null || c === void 0 ? void 0 : c.x) || ((s = e.crop) === null || s === void 0 ? void 0 : s.y) !== ((l = this.props.crop) === null || l === void 0 ? void 0 : l.y)) && this.emitCropAreaChange(), e.zoomWithScroll !== this.props.zoomWithScroll && this.containerRef && (this.props.zoomWithScroll ? this.containerRef.addEventListener("wheel", this.onWheel, {
3585
+ passive: !1
3586
+ }) : this.clearScrollEvent()), e.video !== this.props.video && ((v = this.videoRef.current) === null || v === void 0 || v.load());
3587
+ var h = this.getObjectFit();
3588
+ h !== this.state.mediaObjectFit && this.setState({
3589
+ mediaObjectFit: h
3590
+ }, this.computeSizes);
3591
+ }, i.prototype.getAspect = function() {
3592
+ var e = this.props, n = e.cropSize, a = e.aspect;
3593
+ return n ? n.width / n.height : a;
3594
+ }, i.prototype.getObjectFit = function() {
3595
+ var e, n, a, o;
3596
+ if (this.props.objectFit === "cover") {
3597
+ var r = this.imageRef.current || this.videoRef.current;
3598
+ if (r && this.containerRef) {
3599
+ this.containerRect = this.containerRef.getBoundingClientRect();
3600
+ var p = this.containerRect.width / this.containerRect.height, c = ((e = this.imageRef.current) === null || e === void 0 ? void 0 : e.naturalWidth) || ((n = this.videoRef.current) === null || n === void 0 ? void 0 : n.videoWidth) || 0, s = ((a = this.imageRef.current) === null || a === void 0 ? void 0 : a.naturalHeight) || ((o = this.videoRef.current) === null || o === void 0 ? void 0 : o.videoHeight) || 0, l = c / s;
3601
+ return l < p ? "horizontal-cover" : "vertical-cover";
3602
+ }
3603
+ return "horizontal-cover";
3604
+ }
3605
+ return this.props.objectFit;
3606
+ }, i.prototype.onPinchStart = function(e) {
3607
+ var n = i.getTouchPoint(e.touches[0]), a = i.getTouchPoint(e.touches[1]);
3608
+ this.lastPinchDistance = Bt(n, a), this.lastPinchRotation = Kt(n, a), this.onDragStart(Vt(n, a));
3609
+ }, i.prototype.onPinchMove = function(e) {
3610
+ var n = this;
3611
+ if (!(!this.currentDoc || !this.currentWindow)) {
3612
+ var a = i.getTouchPoint(e.touches[0]), o = i.getTouchPoint(e.touches[1]), r = Vt(a, o);
3613
+ this.onDrag(r), this.rafPinchTimeout && this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout), this.rafPinchTimeout = this.currentWindow.requestAnimationFrame(function() {
3614
+ var p = Bt(a, o), c = n.props.zoom * (p / n.lastPinchDistance);
3615
+ n.setNewZoom(c, r, {
3616
+ shouldUpdatePosition: !1
3617
+ }), n.lastPinchDistance = p;
3618
+ var s = Kt(a, o), l = n.props.rotation + (s - n.lastPinchRotation);
3619
+ n.props.onRotationChange && n.props.onRotationChange(l), n.lastPinchRotation = s;
3620
+ });
3621
+ }
3622
+ }, i.prototype.render = function() {
3623
+ var e = this, n, a = this.props, o = a.image, r = a.video, p = a.mediaProps, c = a.cropperProps, s = a.transform, l = a.crop, v = l.x, h = l.y, b = a.rotation, w = a.zoom, y = a.cropShape, g = a.showGrid, z = a.roundCropAreaPixels, R = a.style, C = R.containerStyle, O = R.cropAreaStyle, u = R.mediaStyle, U = a.classes, G = U.containerClassName, ne = U.cropAreaClassName, Q = U.mediaClassName, L = (n = this.state.mediaObjectFit) !== null && n !== void 0 ? n : this.getObjectFit();
3624
+ return se.createElement("div", {
3625
+ onMouseDown: this.onMouseDown,
3626
+ onTouchStart: this.onTouchStart,
3627
+ ref: function(ae) {
3628
+ return e.containerRef = ae;
3629
+ },
3630
+ "data-testid": "container",
3631
+ style: C,
3632
+ className: Fe("reactEasyCrop_Container", G)
3633
+ }, o ? se.createElement("img", V({
3634
+ alt: "",
3635
+ className: Fe("reactEasyCrop_Image", L === "contain" && "reactEasyCrop_Contain", L === "horizontal-cover" && "reactEasyCrop_Cover_Horizontal", L === "vertical-cover" && "reactEasyCrop_Cover_Vertical", Q)
3636
+ }, p, {
3637
+ src: o,
3638
+ ref: this.imageRef,
3639
+ style: V(V({}, u), {
3640
+ transform: s || "translate(".concat(v, "px, ").concat(h, "px) rotate(").concat(b, "deg) scale(").concat(w, ")")
3641
+ }),
3642
+ onLoad: this.onMediaLoad
3643
+ })) : r && se.createElement("video", V({
3644
+ autoPlay: !0,
3645
+ playsInline: !0,
3646
+ loop: !0,
3647
+ muted: !0,
3648
+ className: Fe("reactEasyCrop_Video", L === "contain" && "reactEasyCrop_Contain", L === "horizontal-cover" && "reactEasyCrop_Cover_Horizontal", L === "vertical-cover" && "reactEasyCrop_Cover_Vertical", Q)
3649
+ }, p, {
3650
+ ref: this.videoRef,
3651
+ onLoadedMetadata: this.onMediaLoad,
3652
+ style: V(V({}, u), {
3653
+ transform: s || "translate(".concat(v, "px, ").concat(h, "px) rotate(").concat(b, "deg) scale(").concat(w, ")")
3654
+ }),
3655
+ controls: !1
3656
+ }), (Array.isArray(r) ? r : [{
3657
+ src: r
3658
+ }]).map(function(Y) {
3659
+ return se.createElement("source", V({
3660
+ key: Y.src
3661
+ }, Y));
3662
+ })), this.state.cropSize && se.createElement("div", V({
3663
+ ref: this.cropperRef,
3664
+ style: V(V({}, O), {
3665
+ width: z ? Math.round(this.state.cropSize.width) : this.state.cropSize.width,
3666
+ height: z ? Math.round(this.state.cropSize.height) : this.state.cropSize.height
3667
+ }),
3668
+ tabIndex: 0,
3669
+ onKeyDown: this.onKeyDown,
3670
+ onKeyUp: this.onKeyUp,
3671
+ "data-testid": "cropper",
3672
+ className: Fe("reactEasyCrop_CropArea", y === "round" && "reactEasyCrop_CropAreaRound", g && "reactEasyCrop_CropAreaGrid", ne)
3673
+ }, c)));
3674
+ }, i.defaultProps = {
3675
+ zoom: 1,
3676
+ rotation: 0,
3677
+ aspect: 4 / 3,
3678
+ maxZoom: ta,
3679
+ minZoom: ea,
3680
+ cropShape: "rect",
3681
+ objectFit: "contain",
3682
+ showGrid: !0,
3683
+ style: {},
3684
+ classes: {},
3685
+ mediaProps: {},
3686
+ cropperProps: {},
3687
+ zoomSpeed: 1,
3688
+ restrictPosition: !0,
3689
+ zoomWithScroll: !0,
3690
+ keyboardStep: ia
3691
+ }, i.getMousePoint = function(e) {
3692
+ return {
3693
+ x: Number(e.clientX),
3694
+ y: Number(e.clientY)
3695
+ };
3696
+ }, i.getTouchPoint = function(e) {
3697
+ return {
3698
+ x: Number(e.clientX),
3699
+ y: Number(e.clientY)
3700
+ };
3701
+ }, i;
3702
+ })(se.Component)
3703
+ );
3704
+ function aa({ style: t, ...i }) {
3705
+ const { cropper: e } = Re();
3706
+ if (!e)
3707
+ throw new Error("Cropper config is not defined");
3708
+ const { editorImage: n, config: a, zoom: o, rotation: r, crop: p, setCropArea: c, setCrop: s, setZoom: l, setRotation: v } = e;
3709
+ return /* @__PURE__ */ ue(
3710
+ "div",
3711
+ {
3712
+ ...i,
3713
+ style: {
3714
+ position: "relative",
3715
+ width: "100%",
3716
+ height: "300px",
3717
+ ...t
3718
+ },
3719
+ children: /* @__PURE__ */ ue(
3720
+ na,
3721
+ {
3722
+ aspect: a.aspect,
3723
+ crop: p,
3724
+ image: n,
3725
+ rotation: r,
3726
+ zoom: o,
3727
+ onCropChange: s,
3728
+ onCropComplete: c,
3729
+ onRotationChange: v,
3730
+ onZoomChange: l
3731
+ }
3732
+ )
3733
+ }
3734
+ );
3735
+ }
3736
+ async function oa(t) {
3737
+ return t ? await ra(t) : "";
3738
+ }
3739
+ const ra = (t) => new Promise((i, e) => {
3740
+ const n = new FileReader();
3741
+ n.readAsDataURL(t), n.onload = () => i(String(n.result)), n.onerror = (a) => e(a);
3742
+ });
3743
+ function pa({ children: t, file: i, ...e }) {
3744
+ const { removeFile: n } = Re(), [a, o] = le();
3745
+ return Ie(() => {
3746
+ (async () => {
3747
+ const p = await oa(i.originalFile);
3748
+ o(p);
3749
+ })();
3750
+ }, [i.originalFile]), /* @__PURE__ */ ue("div", { ...e, children: typeof t == "function" ? t({ file: i, preview: a, remove: () => n(i.id) }) : t });
3751
+ }
3752
+ function ca({ children: t, ...i }) {
3753
+ const { value: e } = Re();
3754
+ return /* @__PURE__ */ ue("div", { ...i, children: typeof t == "function" ? t({ files: e }) : t });
3755
+ }
3756
+ function sa({ uploader: t, ...i }) {
3757
+ return /* @__PURE__ */ ue(Fn, { uploader: t, children: /* @__PURE__ */ ue("div", { ...i }) });
3758
+ }
3759
+ function la({ children: t, ...i }) {
3760
+ const {
3761
+ dropzone: { getRootProps: e, getInputProps: n, isDragActive: a, isFocused: o, isFileDialogActive: r }
3762
+ } = Re();
3763
+ return /* @__PURE__ */ ji("div", { ...e(), ...i, children: [
3764
+ /* @__PURE__ */ ue("input", { ...n() }),
3765
+ typeof t == "function" ? t({ isDragActive: a, isFocused: o, isFileDialogActive: r }) : t
3766
+ ] });
3767
+ }
3768
+ const Ea = {
3769
+ Root: sa,
3770
+ Zone: la,
3771
+ Files: ca,
3772
+ File: pa,
3773
+ Cropper: In,
3774
+ CropperEditor: aa
3775
+ }, J = [];
3776
+ for (let t = 0; t < 256; ++t)
3777
+ J.push((t + 256).toString(16).slice(1));
3778
+ function da(t, i = 0) {
3779
+ return (J[t[i + 0]] + J[t[i + 1]] + J[t[i + 2]] + J[t[i + 3]] + "-" + J[t[i + 4]] + J[t[i + 5]] + "-" + J[t[i + 6]] + J[t[i + 7]] + "-" + J[t[i + 8]] + J[t[i + 9]] + "-" + J[t[i + 10]] + J[t[i + 11]] + J[t[i + 12]] + J[t[i + 13]] + J[t[i + 14]] + J[t[i + 15]]).toLowerCase();
3780
+ }
3781
+ let ct;
3782
+ const ua = new Uint8Array(16);
3783
+ function ma() {
3784
+ if (!ct) {
3785
+ if (typeof crypto > "u" || !crypto.getRandomValues)
3786
+ throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
3787
+ ct = crypto.getRandomValues.bind(crypto);
3788
+ }
3789
+ return ct(ua);
3790
+ }
3791
+ const fa = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Gt = { randomUUID: fa };
3792
+ function va(t, i, e) {
3793
+ if (Gt.randomUUID && !t)
3794
+ return Gt.randomUUID();
3795
+ t = t || {};
3796
+ const n = t.random ?? t.rng?.() ?? ma();
3797
+ if (n.length < 16)
3798
+ throw new Error("Random bytes length must be >= 16");
3799
+ return n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, da(n);
3800
+ }
3801
+ function xa(t, i) {
3802
+ return t.name === i.name && t.size === i.size && t.lastModified === i.lastModified;
3803
+ }
3804
+ function ha(t, i, e) {
3805
+ const [n, a] = le(t);
3806
+ t !== n && (a(t), i(t));
3807
+ }
3808
+ process.env.NODE_ENV;
3809
+ function ga({ value: t, onChange: i }) {
3810
+ const [e, n] = le([]), [a, o] = le(), [r, p] = le(), [c, s] = le(fi), [l, v] = le(vi), [h, b] = le(xi), w = e.at(0), y = !!w;
3811
+ ha(w, (R) => {
3812
+ if (o(void 0), !R)
3813
+ return;
3814
+ const C = new FileReader();
3815
+ C.addEventListener("load", () => {
3816
+ typeof C.result == "string" && o(C.result);
3817
+ }), C.readAsDataURL(R.originalFile);
3818
+ });
3819
+ const g = N(() => {
3820
+ n(e.filter(({ id: R }) => R !== w?.id));
3821
+ }, [e, w?.id]), z = N((R) => i?.([...t ?? [], R]), [i, t]);
3822
+ return {
3823
+ fileQueue: e,
3824
+ file: w,
3825
+ editorImage: a,
3826
+ cropArea: r,
3827
+ crop: c,
3828
+ zoom: l,
3829
+ rotation: h,
3830
+ isOpen: y,
3831
+ setFileQueue: n,
3832
+ setEditorImage: o,
3833
+ setCropArea: p,
3834
+ setCrop: s,
3835
+ setZoom: v,
3836
+ setRotation: b,
3837
+ closeImage: g,
3838
+ acceptImage: z
3839
+ };
3840
+ }
3841
+ function ka({
3842
+ value: t,
3843
+ accept: i = On,
3844
+ cropper: e,
3845
+ onError: n,
3846
+ onChange: a
3847
+ }) {
3848
+ const { setFileQueue: o, ...r } = ga({ value: t, onChange: a }), p = N(
3849
+ (y) => {
3850
+ e ? o(y) : a?.([...t ?? [], ...y]);
3851
+ },
3852
+ [e, a, t, o]
3853
+ ), c = N(
3854
+ (y) => {
3855
+ const g = y.filter(
3856
+ (z) => !t?.some((R) => xa(R.originalFile, z.originalFile))
3857
+ );
3858
+ p(g);
3859
+ },
3860
+ [p, t]
3861
+ ), s = N(
3862
+ (y) => {
3863
+ a?.(t?.filter((g) => g.id !== y) ?? []);
3864
+ },
3865
+ [t, a]
3866
+ ), l = N(() => {
3867
+ a?.([]);
3868
+ }, [a]), v = N(
3869
+ (y) => {
3870
+ c(y.map((g) => ({ originalFile: g, id: va() })));
3871
+ },
3872
+ [c]
3873
+ ), h = N(
3874
+ (y) => {
3875
+ n?.(zn(y));
3876
+ },
3877
+ [n]
3878
+ ), b = mi({
3879
+ onDrop: v,
3880
+ onDropRejected: h,
3881
+ accept: i
3882
+ }), w = {
3883
+ value: t,
3884
+ dropzone: b,
3885
+ addFiles: c,
3886
+ removeFile: s,
3887
+ clearFiles: l,
3888
+ cropper: e && {
3889
+ config: e,
3890
+ ...r
3891
+ }
3892
+ };
3893
+ return {
3894
+ ...w,
3895
+ uploader: w
3896
+ };
3897
+ }
3898
+ export {
3899
+ Ce as ErrorCode,
3900
+ Ea as UploadImages,
3901
+ wa as tryUploadWithUploadParams,
3902
+ ka as useUploadImages
3903
+ };