@hybridcore/ui 1.5.24 → 1.5.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/uploader/index.js +1469 -0
- package/dist/components/uploader/styled.js +69 -0
- package/dist/main.d.ts +14 -0
- package/dist/main.js +32 -30
- package/package.json +2 -1
|
@@ -0,0 +1,1469 @@
|
|
|
1
|
+
import { jsxs as L, jsx as d, Fragment as ne } from "react/jsx-runtime";
|
|
2
|
+
import Ce, { useRef as ct, useDebugValue as kt, createElement as Cn, useContext as En, useState as le, useCallback as Se, useEffect as et } from "react";
|
|
3
|
+
import { ImageThumbContainer as An, DropAreaContainer as Ct } from "./styled.js";
|
|
4
|
+
import { SearchOutlined as Pn, DeleteForeverOutlined as On, CloudUploadOutlined as Nn, Close as In, AudioFileOutlined as Rn, VideoFileOutlined as Dn, DescriptionOutlined as Tn } from "@mui/icons-material";
|
|
5
|
+
import { Grid as Et, IconButton as tt, Chip as _n, Typography as De, Dialog as $n } from "@mui/material";
|
|
6
|
+
import nt from "lodash";
|
|
7
|
+
import { confirm as zn, alert as At } from "../confirm/index.js";
|
|
8
|
+
import { Loading as jn } from "../loading/index.js";
|
|
9
|
+
var $ = function() {
|
|
10
|
+
return $ = Object.assign || function(t) {
|
|
11
|
+
for (var n, r = 1, o = arguments.length; r < o; r++) {
|
|
12
|
+
n = arguments[r];
|
|
13
|
+
for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]);
|
|
14
|
+
}
|
|
15
|
+
return t;
|
|
16
|
+
}, $.apply(this, arguments);
|
|
17
|
+
};
|
|
18
|
+
function pe(e, t, n) {
|
|
19
|
+
if (n || arguments.length === 2) for (var r = 0, o = t.length, i; r < o; r++)
|
|
20
|
+
(i || !(r in t)) && (i || (i = Array.prototype.slice.call(t, 0, r)), i[r] = t[r]);
|
|
21
|
+
return e.concat(i || Array.prototype.slice.call(t));
|
|
22
|
+
}
|
|
23
|
+
function Ln(e) {
|
|
24
|
+
var t = /* @__PURE__ */ Object.create(null);
|
|
25
|
+
return function(n) {
|
|
26
|
+
return t[n] === void 0 && (t[n] = e(n)), t[n];
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
var Mn = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/, Fn = /* @__PURE__ */ Ln(
|
|
30
|
+
function(e) {
|
|
31
|
+
return Mn.test(e) || e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && e.charCodeAt(2) < 91;
|
|
32
|
+
}
|
|
33
|
+
/* Z+1 */
|
|
34
|
+
), N = "-ms-", ke = "-moz-", k = "-webkit-", Kt = "comm", Ue = "rule", yt = "decl", Vn = "@import", Jt = "@keyframes", Hn = "@layer", Qt = Math.abs, vt = String.fromCharCode, lt = Object.assign;
|
|
35
|
+
function Bn(e, t) {
|
|
36
|
+
return R(e, 0) ^ 45 ? (((t << 2 ^ R(e, 0)) << 2 ^ R(e, 1)) << 2 ^ R(e, 2)) << 2 ^ R(e, 3) : 0;
|
|
37
|
+
}
|
|
38
|
+
function en(e) {
|
|
39
|
+
return e.trim();
|
|
40
|
+
}
|
|
41
|
+
function Y(e, t) {
|
|
42
|
+
return (e = t.exec(e)) ? e[0] : e;
|
|
43
|
+
}
|
|
44
|
+
function u(e, t, n) {
|
|
45
|
+
return e.replace(t, n);
|
|
46
|
+
}
|
|
47
|
+
function je(e, t, n) {
|
|
48
|
+
return e.indexOf(t, n);
|
|
49
|
+
}
|
|
50
|
+
function R(e, t) {
|
|
51
|
+
return e.charCodeAt(t) | 0;
|
|
52
|
+
}
|
|
53
|
+
function ue(e, t, n) {
|
|
54
|
+
return e.slice(t, n);
|
|
55
|
+
}
|
|
56
|
+
function B(e) {
|
|
57
|
+
return e.length;
|
|
58
|
+
}
|
|
59
|
+
function tn(e) {
|
|
60
|
+
return e.length;
|
|
61
|
+
}
|
|
62
|
+
function xe(e, t) {
|
|
63
|
+
return t.push(e), e;
|
|
64
|
+
}
|
|
65
|
+
function Gn(e, t) {
|
|
66
|
+
return e.map(t).join("");
|
|
67
|
+
}
|
|
68
|
+
function Pt(e, t) {
|
|
69
|
+
return e.filter(function(n) {
|
|
70
|
+
return !Y(n, t);
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
var We = 1, de = 1, nn = 0, M = 0, I = 0, ge = "";
|
|
74
|
+
function Ye(e, t, n, r, o, i, a, c) {
|
|
75
|
+
return { value: e, root: t, parent: n, type: r, props: o, children: i, line: We, column: de, length: a, return: "", siblings: c };
|
|
76
|
+
}
|
|
77
|
+
function J(e, t) {
|
|
78
|
+
return lt(Ye("", null, null, "", null, null, 0, e.siblings), e, { length: -e.length }, t);
|
|
79
|
+
}
|
|
80
|
+
function ce(e) {
|
|
81
|
+
for (; e.root; )
|
|
82
|
+
e = J(e.root, { children: [e] });
|
|
83
|
+
xe(e, e.siblings);
|
|
84
|
+
}
|
|
85
|
+
function Un() {
|
|
86
|
+
return I;
|
|
87
|
+
}
|
|
88
|
+
function Wn() {
|
|
89
|
+
return I = M > 0 ? R(ge, --M) : 0, de--, I === 10 && (de = 1, We--), I;
|
|
90
|
+
}
|
|
91
|
+
function H() {
|
|
92
|
+
return I = M < nn ? R(ge, M++) : 0, de++, I === 10 && (de = 1, We++), I;
|
|
93
|
+
}
|
|
94
|
+
function oe() {
|
|
95
|
+
return R(ge, M);
|
|
96
|
+
}
|
|
97
|
+
function Le() {
|
|
98
|
+
return M;
|
|
99
|
+
}
|
|
100
|
+
function qe(e, t) {
|
|
101
|
+
return ue(ge, e, t);
|
|
102
|
+
}
|
|
103
|
+
function pt(e) {
|
|
104
|
+
switch (e) {
|
|
105
|
+
case 0:
|
|
106
|
+
case 9:
|
|
107
|
+
case 10:
|
|
108
|
+
case 13:
|
|
109
|
+
case 32:
|
|
110
|
+
return 5;
|
|
111
|
+
case 33:
|
|
112
|
+
case 43:
|
|
113
|
+
case 44:
|
|
114
|
+
case 47:
|
|
115
|
+
case 62:
|
|
116
|
+
case 64:
|
|
117
|
+
case 126:
|
|
118
|
+
case 59:
|
|
119
|
+
case 123:
|
|
120
|
+
case 125:
|
|
121
|
+
return 4;
|
|
122
|
+
case 58:
|
|
123
|
+
return 3;
|
|
124
|
+
case 34:
|
|
125
|
+
case 39:
|
|
126
|
+
case 40:
|
|
127
|
+
case 91:
|
|
128
|
+
return 2;
|
|
129
|
+
case 41:
|
|
130
|
+
case 93:
|
|
131
|
+
return 1;
|
|
132
|
+
}
|
|
133
|
+
return 0;
|
|
134
|
+
}
|
|
135
|
+
function Yn(e) {
|
|
136
|
+
return We = de = 1, nn = B(ge = e), M = 0, [];
|
|
137
|
+
}
|
|
138
|
+
function qn(e) {
|
|
139
|
+
return ge = "", e;
|
|
140
|
+
}
|
|
141
|
+
function rt(e) {
|
|
142
|
+
return en(qe(M - 1, ut(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
|
|
143
|
+
}
|
|
144
|
+
function Xn(e) {
|
|
145
|
+
for (; (I = oe()) && I < 33; )
|
|
146
|
+
H();
|
|
147
|
+
return pt(e) > 2 || pt(I) > 3 ? "" : " ";
|
|
148
|
+
}
|
|
149
|
+
function Zn(e, t) {
|
|
150
|
+
for (; --t && H() && !(I < 48 || I > 102 || I > 57 && I < 65 || I > 70 && I < 97); )
|
|
151
|
+
;
|
|
152
|
+
return qe(e, Le() + (t < 6 && oe() == 32 && H() == 32));
|
|
153
|
+
}
|
|
154
|
+
function ut(e) {
|
|
155
|
+
for (; H(); )
|
|
156
|
+
switch (I) {
|
|
157
|
+
case e:
|
|
158
|
+
return M;
|
|
159
|
+
case 34:
|
|
160
|
+
case 39:
|
|
161
|
+
e !== 34 && e !== 39 && ut(I);
|
|
162
|
+
break;
|
|
163
|
+
case 40:
|
|
164
|
+
e === 41 && ut(e);
|
|
165
|
+
break;
|
|
166
|
+
case 92:
|
|
167
|
+
H();
|
|
168
|
+
break;
|
|
169
|
+
}
|
|
170
|
+
return M;
|
|
171
|
+
}
|
|
172
|
+
function Kn(e, t) {
|
|
173
|
+
for (; H() && e + I !== 57; )
|
|
174
|
+
if (e + I === 84 && oe() === 47)
|
|
175
|
+
break;
|
|
176
|
+
return "/*" + qe(t, M - 1) + "*" + vt(e === 47 ? e : H());
|
|
177
|
+
}
|
|
178
|
+
function Jn(e) {
|
|
179
|
+
for (; !pt(oe()); )
|
|
180
|
+
H();
|
|
181
|
+
return qe(e, M);
|
|
182
|
+
}
|
|
183
|
+
function Qn(e) {
|
|
184
|
+
return qn(Me("", null, null, null, [""], e = Yn(e), 0, [0], e));
|
|
185
|
+
}
|
|
186
|
+
function Me(e, t, n, r, o, i, a, c, s) {
|
|
187
|
+
for (var m = 0, g = 0, f = a, y = 0, v = 0, w = 0, A = 1, D = 1, E = 1, C = 0, S = "", p = o, b = i, h = r, l = S; D; )
|
|
188
|
+
switch (w = C, C = H()) {
|
|
189
|
+
case 40:
|
|
190
|
+
if (w != 108 && R(l, f - 1) == 58) {
|
|
191
|
+
je(l += u(rt(C), "&", "&\f"), "&\f", Qt(m ? c[m - 1] : 0)) != -1 && (E = -1);
|
|
192
|
+
break;
|
|
193
|
+
}
|
|
194
|
+
case 34:
|
|
195
|
+
case 39:
|
|
196
|
+
case 91:
|
|
197
|
+
l += rt(C);
|
|
198
|
+
break;
|
|
199
|
+
case 9:
|
|
200
|
+
case 10:
|
|
201
|
+
case 13:
|
|
202
|
+
case 32:
|
|
203
|
+
l += Xn(w);
|
|
204
|
+
break;
|
|
205
|
+
case 92:
|
|
206
|
+
l += Zn(Le() - 1, 7);
|
|
207
|
+
continue;
|
|
208
|
+
case 47:
|
|
209
|
+
switch (oe()) {
|
|
210
|
+
case 42:
|
|
211
|
+
case 47:
|
|
212
|
+
xe(er(Kn(H(), Le()), t, n, s), s);
|
|
213
|
+
break;
|
|
214
|
+
default:
|
|
215
|
+
l += "/";
|
|
216
|
+
}
|
|
217
|
+
break;
|
|
218
|
+
case 123 * A:
|
|
219
|
+
c[m++] = B(l) * E;
|
|
220
|
+
case 125 * A:
|
|
221
|
+
case 59:
|
|
222
|
+
case 0:
|
|
223
|
+
switch (C) {
|
|
224
|
+
case 0:
|
|
225
|
+
case 125:
|
|
226
|
+
D = 0;
|
|
227
|
+
case 59 + g:
|
|
228
|
+
E == -1 && (l = u(l, /\f/g, "")), v > 0 && B(l) - f && xe(v > 32 ? Nt(l + ";", r, n, f - 1, s) : Nt(u(l, " ", "") + ";", r, n, f - 2, s), s);
|
|
229
|
+
break;
|
|
230
|
+
case 59:
|
|
231
|
+
l += ";";
|
|
232
|
+
default:
|
|
233
|
+
if (xe(h = Ot(l, t, n, m, g, o, c, S, p = [], b = [], f, i), i), C === 123)
|
|
234
|
+
if (g === 0)
|
|
235
|
+
Me(l, t, h, h, p, i, f, c, b);
|
|
236
|
+
else
|
|
237
|
+
switch (y === 99 && R(l, 3) === 110 ? 100 : y) {
|
|
238
|
+
case 100:
|
|
239
|
+
case 108:
|
|
240
|
+
case 109:
|
|
241
|
+
case 115:
|
|
242
|
+
Me(e, h, h, r && xe(Ot(e, h, h, 0, 0, o, c, S, o, p = [], f, b), b), o, b, f, c, r ? p : b);
|
|
243
|
+
break;
|
|
244
|
+
default:
|
|
245
|
+
Me(l, h, h, h, [""], b, 0, c, b);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
m = g = v = 0, A = E = 1, S = l = "", f = a;
|
|
249
|
+
break;
|
|
250
|
+
case 58:
|
|
251
|
+
f = 1 + B(l), v = w;
|
|
252
|
+
default:
|
|
253
|
+
if (A < 1) {
|
|
254
|
+
if (C == 123)
|
|
255
|
+
--A;
|
|
256
|
+
else if (C == 125 && A++ == 0 && Wn() == 125)
|
|
257
|
+
continue;
|
|
258
|
+
}
|
|
259
|
+
switch (l += vt(C), C * A) {
|
|
260
|
+
case 38:
|
|
261
|
+
E = g > 0 ? 1 : (l += "\f", -1);
|
|
262
|
+
break;
|
|
263
|
+
case 44:
|
|
264
|
+
c[m++] = (B(l) - 1) * E, E = 1;
|
|
265
|
+
break;
|
|
266
|
+
case 64:
|
|
267
|
+
oe() === 45 && (l += rt(H())), y = oe(), g = f = B(S = l += Jn(Le())), C++;
|
|
268
|
+
break;
|
|
269
|
+
case 45:
|
|
270
|
+
w === 45 && B(l) == 2 && (A = 0);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
return i;
|
|
274
|
+
}
|
|
275
|
+
function Ot(e, t, n, r, o, i, a, c, s, m, g, f) {
|
|
276
|
+
for (var y = o - 1, v = o === 0 ? i : [""], w = tn(v), A = 0, D = 0, E = 0; A < r; ++A)
|
|
277
|
+
for (var C = 0, S = ue(e, y + 1, y = Qt(D = a[A])), p = e; C < w; ++C)
|
|
278
|
+
(p = en(D > 0 ? v[C] + " " + S : u(S, /&\f/g, v[C]))) && (s[E++] = p);
|
|
279
|
+
return Ye(e, t, n, o === 0 ? Ue : c, s, m, g, f);
|
|
280
|
+
}
|
|
281
|
+
function er(e, t, n, r) {
|
|
282
|
+
return Ye(e, t, n, Kt, vt(Un()), ue(e, 2, -2), 0, r);
|
|
283
|
+
}
|
|
284
|
+
function Nt(e, t, n, r, o) {
|
|
285
|
+
return Ye(e, t, n, yt, ue(e, 0, r), ue(e, r + 1, -1), r, o);
|
|
286
|
+
}
|
|
287
|
+
function rn(e, t, n) {
|
|
288
|
+
switch (Bn(e, t)) {
|
|
289
|
+
case 5103:
|
|
290
|
+
return k + "print-" + e + e;
|
|
291
|
+
case 5737:
|
|
292
|
+
case 4201:
|
|
293
|
+
case 3177:
|
|
294
|
+
case 3433:
|
|
295
|
+
case 1641:
|
|
296
|
+
case 4457:
|
|
297
|
+
case 2921:
|
|
298
|
+
case 5572:
|
|
299
|
+
case 6356:
|
|
300
|
+
case 5844:
|
|
301
|
+
case 3191:
|
|
302
|
+
case 6645:
|
|
303
|
+
case 3005:
|
|
304
|
+
case 6391:
|
|
305
|
+
case 5879:
|
|
306
|
+
case 5623:
|
|
307
|
+
case 6135:
|
|
308
|
+
case 4599:
|
|
309
|
+
case 4855:
|
|
310
|
+
case 4215:
|
|
311
|
+
case 6389:
|
|
312
|
+
case 5109:
|
|
313
|
+
case 5365:
|
|
314
|
+
case 5621:
|
|
315
|
+
case 3829:
|
|
316
|
+
return k + e + e;
|
|
317
|
+
case 4789:
|
|
318
|
+
return ke + e + e;
|
|
319
|
+
case 5349:
|
|
320
|
+
case 4246:
|
|
321
|
+
case 4810:
|
|
322
|
+
case 6968:
|
|
323
|
+
case 2756:
|
|
324
|
+
return k + e + ke + e + N + e + e;
|
|
325
|
+
case 5936:
|
|
326
|
+
switch (R(e, t + 11)) {
|
|
327
|
+
case 114:
|
|
328
|
+
return k + e + N + u(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
|
|
329
|
+
case 108:
|
|
330
|
+
return k + e + N + u(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
|
|
331
|
+
case 45:
|
|
332
|
+
return k + e + N + u(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
|
|
333
|
+
}
|
|
334
|
+
case 6828:
|
|
335
|
+
case 4268:
|
|
336
|
+
case 2903:
|
|
337
|
+
return k + e + N + e + e;
|
|
338
|
+
case 6165:
|
|
339
|
+
return k + e + N + "flex-" + e + e;
|
|
340
|
+
case 5187:
|
|
341
|
+
return k + e + u(e, /(\w+).+(:[^]+)/, k + "box-$1$2" + N + "flex-$1$2") + e;
|
|
342
|
+
case 5443:
|
|
343
|
+
return k + e + N + "flex-item-" + u(e, /flex-|-self/g, "") + (Y(e, /flex-|baseline/) ? "" : N + "grid-row-" + u(e, /flex-|-self/g, "")) + e;
|
|
344
|
+
case 4675:
|
|
345
|
+
return k + e + N + "flex-line-pack" + u(e, /align-content|flex-|-self/g, "") + e;
|
|
346
|
+
case 5548:
|
|
347
|
+
return k + e + N + u(e, "shrink", "negative") + e;
|
|
348
|
+
case 5292:
|
|
349
|
+
return k + e + N + u(e, "basis", "preferred-size") + e;
|
|
350
|
+
case 6060:
|
|
351
|
+
return k + "box-" + u(e, "-grow", "") + k + e + N + u(e, "grow", "positive") + e;
|
|
352
|
+
case 4554:
|
|
353
|
+
return k + u(e, /([^-])(transform)/g, "$1" + k + "$2") + e;
|
|
354
|
+
case 6187:
|
|
355
|
+
return u(u(u(e, /(zoom-|grab)/, k + "$1"), /(image-set)/, k + "$1"), e, "") + e;
|
|
356
|
+
case 5495:
|
|
357
|
+
case 3959:
|
|
358
|
+
return u(e, /(image-set\([^]*)/, k + "$1$`$1");
|
|
359
|
+
case 4968:
|
|
360
|
+
return u(u(e, /(.+:)(flex-)?(.*)/, k + "box-pack:$3" + N + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + k + e + e;
|
|
361
|
+
case 4200:
|
|
362
|
+
if (!Y(e, /flex-|baseline/)) return N + "grid-column-align" + ue(e, t) + e;
|
|
363
|
+
break;
|
|
364
|
+
case 2592:
|
|
365
|
+
case 3360:
|
|
366
|
+
return N + u(e, "template-", "") + e;
|
|
367
|
+
case 4384:
|
|
368
|
+
case 3616:
|
|
369
|
+
return n && n.some(function(r, o) {
|
|
370
|
+
return t = o, Y(r.props, /grid-\w+-end/);
|
|
371
|
+
}) ? ~je(e + (n = n[t].value), "span", 0) ? e : N + u(e, "-start", "") + e + N + "grid-row-span:" + (~je(n, "span", 0) ? Y(n, /\d+/) : +Y(n, /\d+/) - +Y(e, /\d+/)) + ";" : N + u(e, "-start", "") + e;
|
|
372
|
+
case 4896:
|
|
373
|
+
case 4128:
|
|
374
|
+
return n && n.some(function(r) {
|
|
375
|
+
return Y(r.props, /grid-\w+-start/);
|
|
376
|
+
}) ? e : N + u(u(e, "-end", "-span"), "span ", "") + e;
|
|
377
|
+
case 4095:
|
|
378
|
+
case 3583:
|
|
379
|
+
case 4068:
|
|
380
|
+
case 2532:
|
|
381
|
+
return u(e, /(.+)-inline(.+)/, k + "$1$2") + e;
|
|
382
|
+
case 8116:
|
|
383
|
+
case 7059:
|
|
384
|
+
case 5753:
|
|
385
|
+
case 5535:
|
|
386
|
+
case 5445:
|
|
387
|
+
case 5701:
|
|
388
|
+
case 4933:
|
|
389
|
+
case 4677:
|
|
390
|
+
case 5533:
|
|
391
|
+
case 5789:
|
|
392
|
+
case 5021:
|
|
393
|
+
case 4765:
|
|
394
|
+
if (B(e) - 1 - t > 6)
|
|
395
|
+
switch (R(e, t + 1)) {
|
|
396
|
+
case 109:
|
|
397
|
+
if (R(e, t + 4) !== 45)
|
|
398
|
+
break;
|
|
399
|
+
case 102:
|
|
400
|
+
return u(e, /(.+:)(.+)-([^]+)/, "$1" + k + "$2-$3$1" + ke + (R(e, t + 3) == 108 ? "$3" : "$2-$3")) + e;
|
|
401
|
+
case 115:
|
|
402
|
+
return ~je(e, "stretch", 0) ? rn(u(e, "stretch", "fill-available"), t, n) + e : e;
|
|
403
|
+
}
|
|
404
|
+
break;
|
|
405
|
+
case 5152:
|
|
406
|
+
case 5920:
|
|
407
|
+
return u(e, /(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/, function(r, o, i, a, c, s, m) {
|
|
408
|
+
return N + o + ":" + i + m + (a ? N + o + "-span:" + (c ? s : +s - +i) + m : "") + e;
|
|
409
|
+
});
|
|
410
|
+
case 4949:
|
|
411
|
+
if (R(e, t + 6) === 121)
|
|
412
|
+
return u(e, ":", ":" + k) + e;
|
|
413
|
+
break;
|
|
414
|
+
case 6444:
|
|
415
|
+
switch (R(e, R(e, 14) === 45 ? 18 : 11)) {
|
|
416
|
+
case 120:
|
|
417
|
+
return u(e, /(.+:)([^;\s!]+)(;|(\s+)?!.+)?/, "$1" + k + (R(e, 14) === 45 ? "inline-" : "") + "box$3$1" + k + "$2$3$1" + N + "$2box$3") + e;
|
|
418
|
+
case 100:
|
|
419
|
+
return u(e, ":", ":" + N) + e;
|
|
420
|
+
}
|
|
421
|
+
break;
|
|
422
|
+
case 5719:
|
|
423
|
+
case 2647:
|
|
424
|
+
case 2135:
|
|
425
|
+
case 3927:
|
|
426
|
+
case 2391:
|
|
427
|
+
return u(e, "scroll-", "scroll-snap-") + e;
|
|
428
|
+
}
|
|
429
|
+
return e;
|
|
430
|
+
}
|
|
431
|
+
function He(e, t) {
|
|
432
|
+
for (var n = "", r = 0; r < e.length; r++)
|
|
433
|
+
n += t(e[r], r, e, t) || "";
|
|
434
|
+
return n;
|
|
435
|
+
}
|
|
436
|
+
function tr(e, t, n, r) {
|
|
437
|
+
switch (e.type) {
|
|
438
|
+
case Hn:
|
|
439
|
+
if (e.children.length) break;
|
|
440
|
+
case Vn:
|
|
441
|
+
case yt:
|
|
442
|
+
return e.return = e.return || e.value;
|
|
443
|
+
case Kt:
|
|
444
|
+
return "";
|
|
445
|
+
case Jt:
|
|
446
|
+
return e.return = e.value + "{" + He(e.children, r) + "}";
|
|
447
|
+
case Ue:
|
|
448
|
+
if (!B(e.value = e.props.join(","))) return "";
|
|
449
|
+
}
|
|
450
|
+
return B(n = He(e.children, r)) ? e.return = e.value + "{" + n + "}" : "";
|
|
451
|
+
}
|
|
452
|
+
function nr(e) {
|
|
453
|
+
var t = tn(e);
|
|
454
|
+
return function(n, r, o, i) {
|
|
455
|
+
for (var a = "", c = 0; c < t; c++)
|
|
456
|
+
a += e[c](n, r, o, i) || "";
|
|
457
|
+
return a;
|
|
458
|
+
};
|
|
459
|
+
}
|
|
460
|
+
function rr(e) {
|
|
461
|
+
return function(t) {
|
|
462
|
+
t.root || (t = t.return) && e(t);
|
|
463
|
+
};
|
|
464
|
+
}
|
|
465
|
+
function or(e, t, n, r) {
|
|
466
|
+
if (e.length > -1 && !e.return)
|
|
467
|
+
switch (e.type) {
|
|
468
|
+
case yt:
|
|
469
|
+
e.return = rn(e.value, e.length, n);
|
|
470
|
+
return;
|
|
471
|
+
case Jt:
|
|
472
|
+
return He([J(e, { value: u(e.value, "@", "@" + k) })], r);
|
|
473
|
+
case Ue:
|
|
474
|
+
if (e.length)
|
|
475
|
+
return Gn(n = e.props, function(o) {
|
|
476
|
+
switch (Y(o, r = /(::plac\w+|:read-\w+)/)) {
|
|
477
|
+
case ":read-only":
|
|
478
|
+
case ":read-write":
|
|
479
|
+
ce(J(e, { props: [u(o, /:(read-\w+)/, ":" + ke + "$1")] })), ce(J(e, { props: [o] })), lt(e, { props: Pt(n, r) });
|
|
480
|
+
break;
|
|
481
|
+
case "::placeholder":
|
|
482
|
+
ce(J(e, { props: [u(o, /:(plac\w+)/, ":" + k + "input-$1")] })), ce(J(e, { props: [u(o, /:(plac\w+)/, ":" + ke + "$1")] })), ce(J(e, { props: [u(o, /:(plac\w+)/, N + "input-$1")] })), ce(J(e, { props: [o] })), lt(e, { props: Pt(n, r) });
|
|
483
|
+
break;
|
|
484
|
+
}
|
|
485
|
+
return "";
|
|
486
|
+
});
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
var ir = {
|
|
490
|
+
animationIterationCount: 1,
|
|
491
|
+
aspectRatio: 1,
|
|
492
|
+
borderImageOutset: 1,
|
|
493
|
+
borderImageSlice: 1,
|
|
494
|
+
borderImageWidth: 1,
|
|
495
|
+
boxFlex: 1,
|
|
496
|
+
boxFlexGroup: 1,
|
|
497
|
+
boxOrdinalGroup: 1,
|
|
498
|
+
columnCount: 1,
|
|
499
|
+
columns: 1,
|
|
500
|
+
flex: 1,
|
|
501
|
+
flexGrow: 1,
|
|
502
|
+
flexPositive: 1,
|
|
503
|
+
flexShrink: 1,
|
|
504
|
+
flexNegative: 1,
|
|
505
|
+
flexOrder: 1,
|
|
506
|
+
gridRow: 1,
|
|
507
|
+
gridRowEnd: 1,
|
|
508
|
+
gridRowSpan: 1,
|
|
509
|
+
gridRowStart: 1,
|
|
510
|
+
gridColumn: 1,
|
|
511
|
+
gridColumnEnd: 1,
|
|
512
|
+
gridColumnSpan: 1,
|
|
513
|
+
gridColumnStart: 1,
|
|
514
|
+
msGridRow: 1,
|
|
515
|
+
msGridRowSpan: 1,
|
|
516
|
+
msGridColumn: 1,
|
|
517
|
+
msGridColumnSpan: 1,
|
|
518
|
+
fontWeight: 1,
|
|
519
|
+
lineHeight: 1,
|
|
520
|
+
opacity: 1,
|
|
521
|
+
order: 1,
|
|
522
|
+
orphans: 1,
|
|
523
|
+
tabSize: 1,
|
|
524
|
+
widows: 1,
|
|
525
|
+
zIndex: 1,
|
|
526
|
+
zoom: 1,
|
|
527
|
+
WebkitLineClamp: 1,
|
|
528
|
+
// SVG-related properties
|
|
529
|
+
fillOpacity: 1,
|
|
530
|
+
floodOpacity: 1,
|
|
531
|
+
stopOpacity: 1,
|
|
532
|
+
strokeDasharray: 1,
|
|
533
|
+
strokeDashoffset: 1,
|
|
534
|
+
strokeMiterlimit: 1,
|
|
535
|
+
strokeOpacity: 1,
|
|
536
|
+
strokeWidth: 1
|
|
537
|
+
}, se = typeof process < "u" && process.env !== void 0 && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR) || "data-styled", on = "active", an = "data-styled-version", Xe = "6.1.15", bt = `/*!sc*/
|
|
538
|
+
`, Be = typeof window < "u" && "HTMLElement" in window, ar = !!(typeof SC_DISABLE_SPEEDY == "boolean" ? SC_DISABLE_SPEEDY : typeof process < "u" && process.env !== void 0 && process.env.REACT_APP_SC_DISABLE_SPEEDY !== void 0 && process.env.REACT_APP_SC_DISABLE_SPEEDY !== "" ? process.env.REACT_APP_SC_DISABLE_SPEEDY !== "false" && process.env.REACT_APP_SC_DISABLE_SPEEDY : typeof process < "u" && process.env !== void 0 && process.env.SC_DISABLE_SPEEDY !== void 0 && process.env.SC_DISABLE_SPEEDY !== "" ? process.env.SC_DISABLE_SPEEDY !== "false" && process.env.SC_DISABLE_SPEEDY : process.env.NODE_ENV !== "production"), It = /invalid hook call/i, Te = /* @__PURE__ */ new Set(), sr = function(e, t) {
|
|
539
|
+
if (process.env.NODE_ENV !== "production") {
|
|
540
|
+
var n = t ? ' with the id of "'.concat(t, '"') : "", r = "The component ".concat(e).concat(n, ` has been created dynamically.
|
|
541
|
+
`) + `You may see this warning because you've called styled inside another component.
|
|
542
|
+
To resolve this only create new StyledComponents outside of any render method and function component.`, o = console.error;
|
|
543
|
+
try {
|
|
544
|
+
var i = !0;
|
|
545
|
+
console.error = function(a) {
|
|
546
|
+
for (var c = [], s = 1; s < arguments.length; s++) c[s - 1] = arguments[s];
|
|
547
|
+
It.test(a) ? (i = !1, Te.delete(r)) : o.apply(void 0, pe([a], c, !1));
|
|
548
|
+
}, ct(), i && !Te.has(r) && (console.warn(r), Te.add(r));
|
|
549
|
+
} catch (a) {
|
|
550
|
+
It.test(a.message) && Te.delete(r);
|
|
551
|
+
} finally {
|
|
552
|
+
console.error = o;
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
}, Ze = Object.freeze([]), fe = Object.freeze({});
|
|
556
|
+
function cr(e, t, n) {
|
|
557
|
+
return n === void 0 && (n = fe), e.theme !== n.theme && e.theme || t || n.theme;
|
|
558
|
+
}
|
|
559
|
+
var dt = /* @__PURE__ */ new Set(["a", "abbr", "address", "area", "article", "aside", "audio", "b", "base", "bdi", "bdo", "big", "blockquote", "body", "br", "button", "canvas", "caption", "cite", "code", "col", "colgroup", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "div", "dl", "dt", "em", "embed", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "header", "hgroup", "hr", "html", "i", "iframe", "img", "input", "ins", "kbd", "keygen", "label", "legend", "li", "link", "main", "map", "mark", "menu", "menuitem", "meta", "meter", "nav", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "script", "section", "select", "small", "source", "span", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "u", "ul", "use", "var", "video", "wbr", "circle", "clipPath", "defs", "ellipse", "foreignObject", "g", "image", "line", "linearGradient", "marker", "mask", "path", "pattern", "polygon", "polyline", "radialGradient", "rect", "stop", "svg", "text", "tspan"]), lr = /[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g, pr = /(^-|-$)/g;
|
|
560
|
+
function Rt(e) {
|
|
561
|
+
return e.replace(lr, "-").replace(pr, "");
|
|
562
|
+
}
|
|
563
|
+
var ur = /(a)(d)/gi, _e = 52, Dt = function(e) {
|
|
564
|
+
return String.fromCharCode(e + (e > 25 ? 39 : 97));
|
|
565
|
+
};
|
|
566
|
+
function ft(e) {
|
|
567
|
+
var t, n = "";
|
|
568
|
+
for (t = Math.abs(e); t > _e; t = t / _e | 0) n = Dt(t % _e) + n;
|
|
569
|
+
return (Dt(t % _e) + n).replace(ur, "$1-$2");
|
|
570
|
+
}
|
|
571
|
+
var ot, sn = 5381, te = function(e, t) {
|
|
572
|
+
for (var n = t.length; n; ) e = 33 * e ^ t.charCodeAt(--n);
|
|
573
|
+
return e;
|
|
574
|
+
}, cn = function(e) {
|
|
575
|
+
return te(sn, e);
|
|
576
|
+
};
|
|
577
|
+
function dr(e) {
|
|
578
|
+
return ft(cn(e) >>> 0);
|
|
579
|
+
}
|
|
580
|
+
function ln(e) {
|
|
581
|
+
return process.env.NODE_ENV !== "production" && typeof e == "string" && e || e.displayName || e.name || "Component";
|
|
582
|
+
}
|
|
583
|
+
function it(e) {
|
|
584
|
+
return typeof e == "string" && (process.env.NODE_ENV === "production" || e.charAt(0) === e.charAt(0).toLowerCase());
|
|
585
|
+
}
|
|
586
|
+
var pn = typeof Symbol == "function" && Symbol.for, un = pn ? Symbol.for("react.memo") : 60115, fr = pn ? Symbol.for("react.forward_ref") : 60112, hr = { childContextTypes: !0, contextType: !0, contextTypes: !0, defaultProps: !0, displayName: !0, getDefaultProps: !0, getDerivedStateFromError: !0, getDerivedStateFromProps: !0, mixins: !0, propTypes: !0, type: !0 }, mr = { name: !0, length: !0, prototype: !0, caller: !0, callee: !0, arguments: !0, arity: !0 }, dn = { $$typeof: !0, compare: !0, defaultProps: !0, displayName: !0, propTypes: !0, type: !0 }, gr = ((ot = {})[fr] = { $$typeof: !0, render: !0, defaultProps: !0, displayName: !0, propTypes: !0 }, ot[un] = dn, ot);
|
|
587
|
+
function Tt(e) {
|
|
588
|
+
return ("type" in (t = e) && t.type.$$typeof) === un ? dn : "$$typeof" in e ? gr[e.$$typeof] : hr;
|
|
589
|
+
var t;
|
|
590
|
+
}
|
|
591
|
+
var yr = Object.defineProperty, vr = Object.getOwnPropertyNames, _t = Object.getOwnPropertySymbols, br = Object.getOwnPropertyDescriptor, wr = Object.getPrototypeOf, $t = Object.prototype;
|
|
592
|
+
function fn(e, t, n) {
|
|
593
|
+
if (typeof t != "string") {
|
|
594
|
+
if ($t) {
|
|
595
|
+
var r = wr(t);
|
|
596
|
+
r && r !== $t && fn(e, r, n);
|
|
597
|
+
}
|
|
598
|
+
var o = vr(t);
|
|
599
|
+
_t && (o = o.concat(_t(t)));
|
|
600
|
+
for (var i = Tt(e), a = Tt(t), c = 0; c < o.length; ++c) {
|
|
601
|
+
var s = o[c];
|
|
602
|
+
if (!(s in mr || n && n[s] || a && s in a || i && s in i)) {
|
|
603
|
+
var m = br(t, s);
|
|
604
|
+
try {
|
|
605
|
+
yr(e, s, m);
|
|
606
|
+
} catch {
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
return e;
|
|
612
|
+
}
|
|
613
|
+
function he(e) {
|
|
614
|
+
return typeof e == "function";
|
|
615
|
+
}
|
|
616
|
+
function wt(e) {
|
|
617
|
+
return typeof e == "object" && "styledComponentId" in e;
|
|
618
|
+
}
|
|
619
|
+
function re(e, t) {
|
|
620
|
+
return e && t ? "".concat(e, " ").concat(t) : e || t || "";
|
|
621
|
+
}
|
|
622
|
+
function zt(e, t) {
|
|
623
|
+
if (e.length === 0) return "";
|
|
624
|
+
for (var n = e[0], r = 1; r < e.length; r++) n += e[r];
|
|
625
|
+
return n;
|
|
626
|
+
}
|
|
627
|
+
function me(e) {
|
|
628
|
+
return e !== null && typeof e == "object" && e.constructor.name === Object.name && !("props" in e && e.$$typeof);
|
|
629
|
+
}
|
|
630
|
+
function ht(e, t, n) {
|
|
631
|
+
if (n === void 0 && (n = !1), !n && !me(e) && !Array.isArray(e)) return t;
|
|
632
|
+
if (Array.isArray(t)) for (var r = 0; r < t.length; r++) e[r] = ht(e[r], t[r]);
|
|
633
|
+
else if (me(t)) for (var r in t) e[r] = ht(e[r], t[r]);
|
|
634
|
+
return e;
|
|
635
|
+
}
|
|
636
|
+
function St(e, t) {
|
|
637
|
+
Object.defineProperty(e, "toString", { value: t });
|
|
638
|
+
}
|
|
639
|
+
var Sr = process.env.NODE_ENV !== "production" ? { 1: `Cannot create styled-component for component: %s.
|
|
640
|
+
|
|
641
|
+
`, 2: `Can't collect styles once you've consumed a \`ServerStyleSheet\`'s styles! \`ServerStyleSheet\` is a one off instance for each server-side render cycle.
|
|
642
|
+
|
|
643
|
+
- Are you trying to reuse it across renders?
|
|
644
|
+
- Are you accidentally calling collectStyles twice?
|
|
645
|
+
|
|
646
|
+
`, 3: `Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.
|
|
647
|
+
|
|
648
|
+
`, 4: `The \`StyleSheetManager\` expects a valid target or sheet prop!
|
|
649
|
+
|
|
650
|
+
- Does this error occur on the client and is your target falsy?
|
|
651
|
+
- Does this error occur on the server and is the sheet falsy?
|
|
652
|
+
|
|
653
|
+
`, 5: `The clone method cannot be used on the client!
|
|
654
|
+
|
|
655
|
+
- Are you running in a client-like environment on the server?
|
|
656
|
+
- Are you trying to run SSR on the client?
|
|
657
|
+
|
|
658
|
+
`, 6: `Trying to insert a new style tag, but the given Node is unmounted!
|
|
659
|
+
|
|
660
|
+
- Are you using a custom target that isn't mounted?
|
|
661
|
+
- Does your document not have a valid head element?
|
|
662
|
+
- Have you accidentally removed a style tag manually?
|
|
663
|
+
|
|
664
|
+
`, 7: 'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n', 8: `ThemeProvider: Please make your "theme" prop an object.
|
|
665
|
+
|
|
666
|
+
`, 9: "Missing document `<head>`\n\n", 10: `Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021
|
|
667
|
+
|
|
668
|
+
`, 11: `_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.
|
|
669
|
+
|
|
670
|
+
`, 12: "It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\n\n", 13: `%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.
|
|
671
|
+
|
|
672
|
+
`, 14: `ThemeProvider: "theme" prop is required.
|
|
673
|
+
|
|
674
|
+
`, 15: "A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n", 16: `Reached the limit of how many styled components may be created at group %s.
|
|
675
|
+
You may only create up to 1,073,741,824 components. If you're creating components dynamically,
|
|
676
|
+
as for instance in your render method then you may be running into this limitation.
|
|
677
|
+
|
|
678
|
+
`, 17: `CSSStyleSheet could not be found on HTMLStyleElement.
|
|
679
|
+
Has styled-components' style tag been unmounted or altered by another script?
|
|
680
|
+
`, 18: "ThemeProvider: Please make sure your useTheme hook is within a `<ThemeProvider>`" } : {};
|
|
681
|
+
function xr() {
|
|
682
|
+
for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
|
|
683
|
+
for (var n = e[0], r = [], o = 1, i = e.length; o < i; o += 1) r.push(e[o]);
|
|
684
|
+
return r.forEach(function(a) {
|
|
685
|
+
n = n.replace(/%[a-z]/, a);
|
|
686
|
+
}), n;
|
|
687
|
+
}
|
|
688
|
+
function ye(e) {
|
|
689
|
+
for (var t = [], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
|
|
690
|
+
return process.env.NODE_ENV === "production" ? new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e, " for more information.").concat(t.length > 0 ? " Args: ".concat(t.join(", ")) : "")) : new Error(xr.apply(void 0, pe([Sr[e]], t, !1)).trim());
|
|
691
|
+
}
|
|
692
|
+
var kr = function() {
|
|
693
|
+
function e(t) {
|
|
694
|
+
this.groupSizes = new Uint32Array(512), this.length = 512, this.tag = t;
|
|
695
|
+
}
|
|
696
|
+
return e.prototype.indexOfGroup = function(t) {
|
|
697
|
+
for (var n = 0, r = 0; r < t; r++) n += this.groupSizes[r];
|
|
698
|
+
return n;
|
|
699
|
+
}, e.prototype.insertRules = function(t, n) {
|
|
700
|
+
if (t >= this.groupSizes.length) {
|
|
701
|
+
for (var r = this.groupSizes, o = r.length, i = o; t >= i; ) if ((i <<= 1) < 0) throw ye(16, "".concat(t));
|
|
702
|
+
this.groupSizes = new Uint32Array(i), this.groupSizes.set(r), this.length = i;
|
|
703
|
+
for (var a = o; a < i; a++) this.groupSizes[a] = 0;
|
|
704
|
+
}
|
|
705
|
+
for (var c = this.indexOfGroup(t + 1), s = (a = 0, n.length); a < s; a++) this.tag.insertRule(c, n[a]) && (this.groupSizes[t]++, c++);
|
|
706
|
+
}, e.prototype.clearGroup = function(t) {
|
|
707
|
+
if (t < this.length) {
|
|
708
|
+
var n = this.groupSizes[t], r = this.indexOfGroup(t), o = r + n;
|
|
709
|
+
this.groupSizes[t] = 0;
|
|
710
|
+
for (var i = r; i < o; i++) this.tag.deleteRule(r);
|
|
711
|
+
}
|
|
712
|
+
}, e.prototype.getGroup = function(t) {
|
|
713
|
+
var n = "";
|
|
714
|
+
if (t >= this.length || this.groupSizes[t] === 0) return n;
|
|
715
|
+
for (var r = this.groupSizes[t], o = this.indexOfGroup(t), i = o + r, a = o; a < i; a++) n += "".concat(this.tag.getRule(a)).concat(bt);
|
|
716
|
+
return n;
|
|
717
|
+
}, e;
|
|
718
|
+
}(), Cr = 1 << 30, Fe = /* @__PURE__ */ new Map(), Ge = /* @__PURE__ */ new Map(), Ve = 1, $e = function(e) {
|
|
719
|
+
if (Fe.has(e)) return Fe.get(e);
|
|
720
|
+
for (; Ge.has(Ve); ) Ve++;
|
|
721
|
+
var t = Ve++;
|
|
722
|
+
if (process.env.NODE_ENV !== "production" && ((0 | t) < 0 || t > Cr)) throw ye(16, "".concat(t));
|
|
723
|
+
return Fe.set(e, t), Ge.set(t, e), t;
|
|
724
|
+
}, Er = function(e, t) {
|
|
725
|
+
Ve = t + 1, Fe.set(e, t), Ge.set(t, e);
|
|
726
|
+
}, Ar = "style[".concat(se, "][").concat(an, '="').concat(Xe, '"]'), Pr = new RegExp("^".concat(se, '\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')), Or = function(e, t, n) {
|
|
727
|
+
for (var r, o = n.split(","), i = 0, a = o.length; i < a; i++) (r = o[i]) && e.registerName(t, r);
|
|
728
|
+
}, Nr = function(e, t) {
|
|
729
|
+
for (var n, r = ((n = t.textContent) !== null && n !== void 0 ? n : "").split(bt), o = [], i = 0, a = r.length; i < a; i++) {
|
|
730
|
+
var c = r[i].trim();
|
|
731
|
+
if (c) {
|
|
732
|
+
var s = c.match(Pr);
|
|
733
|
+
if (s) {
|
|
734
|
+
var m = 0 | parseInt(s[1], 10), g = s[2];
|
|
735
|
+
m !== 0 && (Er(g, m), Or(e, g, s[3]), e.getTag().insertRules(m, o)), o.length = 0;
|
|
736
|
+
} else o.push(c);
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
}, jt = function(e) {
|
|
740
|
+
for (var t = document.querySelectorAll(Ar), n = 0, r = t.length; n < r; n++) {
|
|
741
|
+
var o = t[n];
|
|
742
|
+
o && o.getAttribute(se) !== on && (Nr(e, o), o.parentNode && o.parentNode.removeChild(o));
|
|
743
|
+
}
|
|
744
|
+
};
|
|
745
|
+
function Ir() {
|
|
746
|
+
return typeof __webpack_nonce__ < "u" ? __webpack_nonce__ : null;
|
|
747
|
+
}
|
|
748
|
+
var hn = function(e) {
|
|
749
|
+
var t = document.head, n = e || t, r = document.createElement("style"), o = function(c) {
|
|
750
|
+
var s = Array.from(c.querySelectorAll("style[".concat(se, "]")));
|
|
751
|
+
return s[s.length - 1];
|
|
752
|
+
}(n), i = o !== void 0 ? o.nextSibling : null;
|
|
753
|
+
r.setAttribute(se, on), r.setAttribute(an, Xe);
|
|
754
|
+
var a = Ir();
|
|
755
|
+
return a && r.setAttribute("nonce", a), n.insertBefore(r, i), r;
|
|
756
|
+
}, Rr = function() {
|
|
757
|
+
function e(t) {
|
|
758
|
+
this.element = hn(t), this.element.appendChild(document.createTextNode("")), this.sheet = function(n) {
|
|
759
|
+
if (n.sheet) return n.sheet;
|
|
760
|
+
for (var r = document.styleSheets, o = 0, i = r.length; o < i; o++) {
|
|
761
|
+
var a = r[o];
|
|
762
|
+
if (a.ownerNode === n) return a;
|
|
763
|
+
}
|
|
764
|
+
throw ye(17);
|
|
765
|
+
}(this.element), this.length = 0;
|
|
766
|
+
}
|
|
767
|
+
return e.prototype.insertRule = function(t, n) {
|
|
768
|
+
try {
|
|
769
|
+
return this.sheet.insertRule(n, t), this.length++, !0;
|
|
770
|
+
} catch {
|
|
771
|
+
return !1;
|
|
772
|
+
}
|
|
773
|
+
}, e.prototype.deleteRule = function(t) {
|
|
774
|
+
this.sheet.deleteRule(t), this.length--;
|
|
775
|
+
}, e.prototype.getRule = function(t) {
|
|
776
|
+
var n = this.sheet.cssRules[t];
|
|
777
|
+
return n && n.cssText ? n.cssText : "";
|
|
778
|
+
}, e;
|
|
779
|
+
}(), Dr = function() {
|
|
780
|
+
function e(t) {
|
|
781
|
+
this.element = hn(t), this.nodes = this.element.childNodes, this.length = 0;
|
|
782
|
+
}
|
|
783
|
+
return e.prototype.insertRule = function(t, n) {
|
|
784
|
+
if (t <= this.length && t >= 0) {
|
|
785
|
+
var r = document.createTextNode(n);
|
|
786
|
+
return this.element.insertBefore(r, this.nodes[t] || null), this.length++, !0;
|
|
787
|
+
}
|
|
788
|
+
return !1;
|
|
789
|
+
}, e.prototype.deleteRule = function(t) {
|
|
790
|
+
this.element.removeChild(this.nodes[t]), this.length--;
|
|
791
|
+
}, e.prototype.getRule = function(t) {
|
|
792
|
+
return t < this.length ? this.nodes[t].textContent : "";
|
|
793
|
+
}, e;
|
|
794
|
+
}(), Tr = function() {
|
|
795
|
+
function e(t) {
|
|
796
|
+
this.rules = [], this.length = 0;
|
|
797
|
+
}
|
|
798
|
+
return e.prototype.insertRule = function(t, n) {
|
|
799
|
+
return t <= this.length && (this.rules.splice(t, 0, n), this.length++, !0);
|
|
800
|
+
}, e.prototype.deleteRule = function(t) {
|
|
801
|
+
this.rules.splice(t, 1), this.length--;
|
|
802
|
+
}, e.prototype.getRule = function(t) {
|
|
803
|
+
return t < this.length ? this.rules[t] : "";
|
|
804
|
+
}, e;
|
|
805
|
+
}(), Lt = Be, _r = { isServer: !Be, useCSSOMInjection: !ar }, mn = function() {
|
|
806
|
+
function e(t, n, r) {
|
|
807
|
+
t === void 0 && (t = fe), n === void 0 && (n = {});
|
|
808
|
+
var o = this;
|
|
809
|
+
this.options = $($({}, _r), t), this.gs = n, this.names = new Map(r), this.server = !!t.isServer, !this.server && Be && Lt && (Lt = !1, jt(this)), St(this, function() {
|
|
810
|
+
return function(i) {
|
|
811
|
+
for (var a = i.getTag(), c = a.length, s = "", m = function(f) {
|
|
812
|
+
var y = function(E) {
|
|
813
|
+
return Ge.get(E);
|
|
814
|
+
}(f);
|
|
815
|
+
if (y === void 0) return "continue";
|
|
816
|
+
var v = i.names.get(y), w = a.getGroup(f);
|
|
817
|
+
if (v === void 0 || !v.size || w.length === 0) return "continue";
|
|
818
|
+
var A = "".concat(se, ".g").concat(f, '[id="').concat(y, '"]'), D = "";
|
|
819
|
+
v !== void 0 && v.forEach(function(E) {
|
|
820
|
+
E.length > 0 && (D += "".concat(E, ","));
|
|
821
|
+
}), s += "".concat(w).concat(A, '{content:"').concat(D, '"}').concat(bt);
|
|
822
|
+
}, g = 0; g < c; g++) m(g);
|
|
823
|
+
return s;
|
|
824
|
+
}(o);
|
|
825
|
+
});
|
|
826
|
+
}
|
|
827
|
+
return e.registerId = function(t) {
|
|
828
|
+
return $e(t);
|
|
829
|
+
}, e.prototype.rehydrate = function() {
|
|
830
|
+
!this.server && Be && jt(this);
|
|
831
|
+
}, e.prototype.reconstructWithOptions = function(t, n) {
|
|
832
|
+
return n === void 0 && (n = !0), new e($($({}, this.options), t), this.gs, n && this.names || void 0);
|
|
833
|
+
}, e.prototype.allocateGSInstance = function(t) {
|
|
834
|
+
return this.gs[t] = (this.gs[t] || 0) + 1;
|
|
835
|
+
}, e.prototype.getTag = function() {
|
|
836
|
+
return this.tag || (this.tag = (t = function(n) {
|
|
837
|
+
var r = n.useCSSOMInjection, o = n.target;
|
|
838
|
+
return n.isServer ? new Tr(o) : r ? new Rr(o) : new Dr(o);
|
|
839
|
+
}(this.options), new kr(t)));
|
|
840
|
+
var t;
|
|
841
|
+
}, e.prototype.hasNameForId = function(t, n) {
|
|
842
|
+
return this.names.has(t) && this.names.get(t).has(n);
|
|
843
|
+
}, e.prototype.registerName = function(t, n) {
|
|
844
|
+
if ($e(t), this.names.has(t)) this.names.get(t).add(n);
|
|
845
|
+
else {
|
|
846
|
+
var r = /* @__PURE__ */ new Set();
|
|
847
|
+
r.add(n), this.names.set(t, r);
|
|
848
|
+
}
|
|
849
|
+
}, e.prototype.insertRules = function(t, n, r) {
|
|
850
|
+
this.registerName(t, n), this.getTag().insertRules($e(t), r);
|
|
851
|
+
}, e.prototype.clearNames = function(t) {
|
|
852
|
+
this.names.has(t) && this.names.get(t).clear();
|
|
853
|
+
}, e.prototype.clearRules = function(t) {
|
|
854
|
+
this.getTag().clearGroup($e(t)), this.clearNames(t);
|
|
855
|
+
}, e.prototype.clearTag = function() {
|
|
856
|
+
this.tag = void 0;
|
|
857
|
+
}, e;
|
|
858
|
+
}(), $r = /&/g, zr = /^\s*\/\/.*$/gm;
|
|
859
|
+
function gn(e, t) {
|
|
860
|
+
return e.map(function(n) {
|
|
861
|
+
return n.type === "rule" && (n.value = "".concat(t, " ").concat(n.value), n.value = n.value.replaceAll(",", ",".concat(t, " ")), n.props = n.props.map(function(r) {
|
|
862
|
+
return "".concat(t, " ").concat(r);
|
|
863
|
+
})), Array.isArray(n.children) && n.type !== "@keyframes" && (n.children = gn(n.children, t)), n;
|
|
864
|
+
});
|
|
865
|
+
}
|
|
866
|
+
function jr(e) {
|
|
867
|
+
var t, n, r, o = fe, i = o.options, a = i === void 0 ? fe : i, c = o.plugins, s = c === void 0 ? Ze : c, m = function(y, v, w) {
|
|
868
|
+
return w.startsWith(n) && w.endsWith(n) && w.replaceAll(n, "").length > 0 ? ".".concat(t) : y;
|
|
869
|
+
}, g = s.slice();
|
|
870
|
+
g.push(function(y) {
|
|
871
|
+
y.type === Ue && y.value.includes("&") && (y.props[0] = y.props[0].replace($r, n).replace(r, m));
|
|
872
|
+
}), a.prefix && g.push(or), g.push(tr);
|
|
873
|
+
var f = function(y, v, w, A) {
|
|
874
|
+
v === void 0 && (v = ""), w === void 0 && (w = ""), A === void 0 && (A = "&"), t = A, n = v, r = new RegExp("\\".concat(n, "\\b"), "g");
|
|
875
|
+
var D = y.replace(zr, ""), E = Qn(w || v ? "".concat(w, " ").concat(v, " { ").concat(D, " }") : D);
|
|
876
|
+
a.namespace && (E = gn(E, a.namespace));
|
|
877
|
+
var C = [];
|
|
878
|
+
return He(E, nr(g.concat(rr(function(S) {
|
|
879
|
+
return C.push(S);
|
|
880
|
+
})))), C;
|
|
881
|
+
};
|
|
882
|
+
return f.hash = s.length ? s.reduce(function(y, v) {
|
|
883
|
+
return v.name || ye(15), te(y, v.name);
|
|
884
|
+
}, sn).toString() : "", f;
|
|
885
|
+
}
|
|
886
|
+
var Lr = new mn(), mt = jr(), yn = Ce.createContext({ shouldForwardProp: void 0, styleSheet: Lr, stylis: mt });
|
|
887
|
+
yn.Consumer;
|
|
888
|
+
Ce.createContext(void 0);
|
|
889
|
+
function Mt() {
|
|
890
|
+
return En(yn);
|
|
891
|
+
}
|
|
892
|
+
var Ft = function() {
|
|
893
|
+
function e(t, n) {
|
|
894
|
+
var r = this;
|
|
895
|
+
this.inject = function(o, i) {
|
|
896
|
+
i === void 0 && (i = mt);
|
|
897
|
+
var a = r.name + i.hash;
|
|
898
|
+
o.hasNameForId(r.id, a) || o.insertRules(r.id, a, i(r.rules, a, "@keyframes"));
|
|
899
|
+
}, this.name = t, this.id = "sc-keyframes-".concat(t), this.rules = n, St(this, function() {
|
|
900
|
+
throw ye(12, String(r.name));
|
|
901
|
+
});
|
|
902
|
+
}
|
|
903
|
+
return e.prototype.getName = function(t) {
|
|
904
|
+
return t === void 0 && (t = mt), this.name + t.hash;
|
|
905
|
+
}, e;
|
|
906
|
+
}(), Mr = function(e) {
|
|
907
|
+
return e >= "A" && e <= "Z";
|
|
908
|
+
};
|
|
909
|
+
function Vt(e) {
|
|
910
|
+
for (var t = "", n = 0; n < e.length; n++) {
|
|
911
|
+
var r = e[n];
|
|
912
|
+
if (n === 1 && r === "-" && e[0] === "-") return e;
|
|
913
|
+
Mr(r) ? t += "-" + r.toLowerCase() : t += r;
|
|
914
|
+
}
|
|
915
|
+
return t.startsWith("ms-") ? "-" + t : t;
|
|
916
|
+
}
|
|
917
|
+
var vn = function(e) {
|
|
918
|
+
return e == null || e === !1 || e === "";
|
|
919
|
+
}, bn = function(e) {
|
|
920
|
+
var t, n, r = [];
|
|
921
|
+
for (var o in e) {
|
|
922
|
+
var i = e[o];
|
|
923
|
+
e.hasOwnProperty(o) && !vn(i) && (Array.isArray(i) && i.isCss || he(i) ? r.push("".concat(Vt(o), ":"), i, ";") : me(i) ? r.push.apply(r, pe(pe(["".concat(o, " {")], bn(i), !1), ["}"], !1)) : r.push("".concat(Vt(o), ": ").concat((t = o, (n = i) == null || typeof n == "boolean" || n === "" ? "" : typeof n != "number" || n === 0 || t in ir || t.startsWith("--") ? String(n).trim() : "".concat(n, "px")), ";")));
|
|
924
|
+
}
|
|
925
|
+
return r;
|
|
926
|
+
};
|
|
927
|
+
function ie(e, t, n, r) {
|
|
928
|
+
if (vn(e)) return [];
|
|
929
|
+
if (wt(e)) return [".".concat(e.styledComponentId)];
|
|
930
|
+
if (he(e)) {
|
|
931
|
+
if (!he(i = e) || i.prototype && i.prototype.isReactComponent || !t) return [e];
|
|
932
|
+
var o = e(t);
|
|
933
|
+
return process.env.NODE_ENV === "production" || typeof o != "object" || Array.isArray(o) || o instanceof Ft || me(o) || o === null || console.error("".concat(ln(e), " is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.")), ie(o, t, n, r);
|
|
934
|
+
}
|
|
935
|
+
var i;
|
|
936
|
+
return e instanceof Ft ? n ? (e.inject(n, r), [e.getName(r)]) : [e] : me(e) ? bn(e) : Array.isArray(e) ? Array.prototype.concat.apply(Ze, e.map(function(a) {
|
|
937
|
+
return ie(a, t, n, r);
|
|
938
|
+
})) : [e.toString()];
|
|
939
|
+
}
|
|
940
|
+
function Fr(e) {
|
|
941
|
+
for (var t = 0; t < e.length; t += 1) {
|
|
942
|
+
var n = e[t];
|
|
943
|
+
if (he(n) && !wt(n)) return !1;
|
|
944
|
+
}
|
|
945
|
+
return !0;
|
|
946
|
+
}
|
|
947
|
+
var Vr = cn(Xe), Hr = function() {
|
|
948
|
+
function e(t, n, r) {
|
|
949
|
+
this.rules = t, this.staticRulesId = "", this.isStatic = process.env.NODE_ENV === "production" && (r === void 0 || r.isStatic) && Fr(t), this.componentId = n, this.baseHash = te(Vr, n), this.baseStyle = r, mn.registerId(n);
|
|
950
|
+
}
|
|
951
|
+
return e.prototype.generateAndInjectStyles = function(t, n, r) {
|
|
952
|
+
var o = this.baseStyle ? this.baseStyle.generateAndInjectStyles(t, n, r) : "";
|
|
953
|
+
if (this.isStatic && !r.hash) if (this.staticRulesId && n.hasNameForId(this.componentId, this.staticRulesId)) o = re(o, this.staticRulesId);
|
|
954
|
+
else {
|
|
955
|
+
var i = zt(ie(this.rules, t, n, r)), a = ft(te(this.baseHash, i) >>> 0);
|
|
956
|
+
if (!n.hasNameForId(this.componentId, a)) {
|
|
957
|
+
var c = r(i, ".".concat(a), void 0, this.componentId);
|
|
958
|
+
n.insertRules(this.componentId, a, c);
|
|
959
|
+
}
|
|
960
|
+
o = re(o, a), this.staticRulesId = a;
|
|
961
|
+
}
|
|
962
|
+
else {
|
|
963
|
+
for (var s = te(this.baseHash, r.hash), m = "", g = 0; g < this.rules.length; g++) {
|
|
964
|
+
var f = this.rules[g];
|
|
965
|
+
if (typeof f == "string") m += f, process.env.NODE_ENV !== "production" && (s = te(s, f));
|
|
966
|
+
else if (f) {
|
|
967
|
+
var y = zt(ie(f, t, n, r));
|
|
968
|
+
s = te(s, y + g), m += y;
|
|
969
|
+
}
|
|
970
|
+
}
|
|
971
|
+
if (m) {
|
|
972
|
+
var v = ft(s >>> 0);
|
|
973
|
+
n.hasNameForId(this.componentId, v) || n.insertRules(this.componentId, v, r(m, ".".concat(v), void 0, this.componentId)), o = re(o, v);
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
return o;
|
|
977
|
+
}, e;
|
|
978
|
+
}(), wn = Ce.createContext(void 0);
|
|
979
|
+
wn.Consumer;
|
|
980
|
+
var at = {}, Ht = /* @__PURE__ */ new Set();
|
|
981
|
+
function Br(e, t, n) {
|
|
982
|
+
var r = wt(e), o = e, i = !it(e), a = t.attrs, c = a === void 0 ? Ze : a, s = t.componentId, m = s === void 0 ? function(p, b) {
|
|
983
|
+
var h = typeof p != "string" ? "sc" : Rt(p);
|
|
984
|
+
at[h] = (at[h] || 0) + 1;
|
|
985
|
+
var l = "".concat(h, "-").concat(dr(Xe + h + at[h]));
|
|
986
|
+
return b ? "".concat(b, "-").concat(l) : l;
|
|
987
|
+
}(t.displayName, t.parentComponentId) : s, g = t.displayName, f = g === void 0 ? function(p) {
|
|
988
|
+
return it(p) ? "styled.".concat(p) : "Styled(".concat(ln(p), ")");
|
|
989
|
+
}(e) : g, y = t.displayName && t.componentId ? "".concat(Rt(t.displayName), "-").concat(t.componentId) : t.componentId || m, v = r && o.attrs ? o.attrs.concat(c).filter(Boolean) : c, w = t.shouldForwardProp;
|
|
990
|
+
if (r && o.shouldForwardProp) {
|
|
991
|
+
var A = o.shouldForwardProp;
|
|
992
|
+
if (t.shouldForwardProp) {
|
|
993
|
+
var D = t.shouldForwardProp;
|
|
994
|
+
w = function(p, b) {
|
|
995
|
+
return A(p, b) && D(p, b);
|
|
996
|
+
};
|
|
997
|
+
} else w = A;
|
|
998
|
+
}
|
|
999
|
+
var E = new Hr(n, y, r ? o.componentStyle : void 0);
|
|
1000
|
+
function C(p, b) {
|
|
1001
|
+
return function(h, l, T) {
|
|
1002
|
+
var G = h.attrs, Ke = h.componentStyle, ve = h.defaultProps, Pe = h.foldedComponentIds, Oe = h.styledComponentId, be = h.target, Ne = Ce.useContext(wn), Ie = Mt(), q = h.shouldForwardProp || Ie.shouldForwardProp;
|
|
1003
|
+
process.env.NODE_ENV !== "production" && kt(Oe);
|
|
1004
|
+
var we = cr(l, Ne, ve) || fe, z = function(W, X, Q) {
|
|
1005
|
+
for (var Z, V = $($({}, X), { className: void 0, theme: Q }), ee = 0; ee < W.length; ee += 1) {
|
|
1006
|
+
var K = he(Z = W[ee]) ? Z(V) : Z;
|
|
1007
|
+
for (var j in K) V[j] = j === "className" ? re(V[j], K[j]) : j === "style" ? $($({}, V[j]), K[j]) : K[j];
|
|
1008
|
+
}
|
|
1009
|
+
return X.className && (V.className = re(V.className, X.className)), V;
|
|
1010
|
+
}(G, l, we), U = z.as || be, x = {};
|
|
1011
|
+
for (var P in z) z[P] === void 0 || P[0] === "$" || P === "as" || P === "theme" && z.theme === we || (P === "forwardedAs" ? x.as = z.forwardedAs : q && !q(P, U) || (x[P] = z[P], q || process.env.NODE_ENV !== "development" || Fn(P) || Ht.has(P) || !dt.has(U) || (Ht.add(P), console.warn('styled-components: it looks like an unknown prop "'.concat(P, '" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via `<StyleSheetManager shouldForwardProp={...}>` (connect an API like `@emotion/is-prop-valid`) or consider using transient props (`$` prefix for automatic filtering.)')))));
|
|
1012
|
+
var _ = function(W, X) {
|
|
1013
|
+
var Q = Mt(), Z = W.generateAndInjectStyles(X, Q.styleSheet, Q.stylis);
|
|
1014
|
+
return process.env.NODE_ENV !== "production" && kt(Z), Z;
|
|
1015
|
+
}(Ke, z);
|
|
1016
|
+
process.env.NODE_ENV !== "production" && h.warnTooManyClasses && h.warnTooManyClasses(_);
|
|
1017
|
+
var F = re(Pe, Oe);
|
|
1018
|
+
return _ && (F += " " + _), z.className && (F += " " + z.className), x[it(U) && !dt.has(U) ? "class" : "className"] = F, T && (x.ref = T), Cn(U, x);
|
|
1019
|
+
}(S, p, b);
|
|
1020
|
+
}
|
|
1021
|
+
C.displayName = f;
|
|
1022
|
+
var S = Ce.forwardRef(C);
|
|
1023
|
+
return S.attrs = v, S.componentStyle = E, S.displayName = f, S.shouldForwardProp = w, S.foldedComponentIds = r ? re(o.foldedComponentIds, o.styledComponentId) : "", S.styledComponentId = y, S.target = r ? o.target : e, Object.defineProperty(S, "defaultProps", { get: function() {
|
|
1024
|
+
return this._foldedDefaultProps;
|
|
1025
|
+
}, set: function(p) {
|
|
1026
|
+
this._foldedDefaultProps = r ? function(b) {
|
|
1027
|
+
for (var h = [], l = 1; l < arguments.length; l++) h[l - 1] = arguments[l];
|
|
1028
|
+
for (var T = 0, G = h; T < G.length; T++) ht(b, G[T], !0);
|
|
1029
|
+
return b;
|
|
1030
|
+
}({}, o.defaultProps, p) : p;
|
|
1031
|
+
} }), process.env.NODE_ENV !== "production" && (sr(f, y), S.warnTooManyClasses = /* @__PURE__ */ function(p, b) {
|
|
1032
|
+
var h = {}, l = !1;
|
|
1033
|
+
return function(T) {
|
|
1034
|
+
if (!l && (h[T] = !0, Object.keys(h).length >= 200)) {
|
|
1035
|
+
var G = b ? ' with the id of "'.concat(b, '"') : "";
|
|
1036
|
+
console.warn("Over ".concat(200, " classes were generated for component ").concat(p).concat(G, `.
|
|
1037
|
+
`) + `Consider using the attrs method, together with a style object for frequently changed styles.
|
|
1038
|
+
Example:
|
|
1039
|
+
const Component = styled.div.attrs(props => ({
|
|
1040
|
+
style: {
|
|
1041
|
+
background: props.background,
|
|
1042
|
+
},
|
|
1043
|
+
}))\`width: 100%;\`
|
|
1044
|
+
|
|
1045
|
+
<Component />`), l = !0, h = {};
|
|
1046
|
+
}
|
|
1047
|
+
};
|
|
1048
|
+
}(f, y)), St(S, function() {
|
|
1049
|
+
return ".".concat(S.styledComponentId);
|
|
1050
|
+
}), i && fn(S, e, { attrs: !0, componentStyle: !0, displayName: !0, foldedComponentIds: !0, shouldForwardProp: !0, styledComponentId: !0, target: !0 }), S;
|
|
1051
|
+
}
|
|
1052
|
+
function Bt(e, t) {
|
|
1053
|
+
for (var n = [e[0]], r = 0, o = t.length; r < o; r += 1) n.push(t[r], e[r + 1]);
|
|
1054
|
+
return n;
|
|
1055
|
+
}
|
|
1056
|
+
var Gt = function(e) {
|
|
1057
|
+
return Object.assign(e, { isCss: !0 });
|
|
1058
|
+
};
|
|
1059
|
+
function Sn(e) {
|
|
1060
|
+
for (var t = [], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
|
|
1061
|
+
if (he(e) || me(e)) return Gt(ie(Bt(Ze, pe([e], t, !0))));
|
|
1062
|
+
var r = e;
|
|
1063
|
+
return t.length === 0 && r.length === 1 && typeof r[0] == "string" ? ie(r) : Gt(ie(Bt(r, t)));
|
|
1064
|
+
}
|
|
1065
|
+
function gt(e, t, n) {
|
|
1066
|
+
if (n === void 0 && (n = fe), !t) throw ye(1, t);
|
|
1067
|
+
var r = function(o) {
|
|
1068
|
+
for (var i = [], a = 1; a < arguments.length; a++) i[a - 1] = arguments[a];
|
|
1069
|
+
return e(t, n, Sn.apply(void 0, pe([o], i, !1)));
|
|
1070
|
+
};
|
|
1071
|
+
return r.attrs = function(o) {
|
|
1072
|
+
return gt(e, t, $($({}, n), { attrs: Array.prototype.concat(n.attrs, o).filter(Boolean) }));
|
|
1073
|
+
}, r.withConfig = function(o) {
|
|
1074
|
+
return gt(e, t, $($({}, n), o));
|
|
1075
|
+
}, r;
|
|
1076
|
+
}
|
|
1077
|
+
var xn = function(e) {
|
|
1078
|
+
return gt(Br, e);
|
|
1079
|
+
}, Ee = xn;
|
|
1080
|
+
dt.forEach(function(e) {
|
|
1081
|
+
Ee[e] = xn(e);
|
|
1082
|
+
});
|
|
1083
|
+
process.env.NODE_ENV !== "production" && typeof navigator < "u" && navigator.product === "ReactNative" && console.warn(`It looks like you've imported 'styled-components' on React Native.
|
|
1084
|
+
Perhaps you're looking to import 'styled-components/native'?
|
|
1085
|
+
Read more about this at https://www.styled-components.com/docs/basics#react-native`);
|
|
1086
|
+
var ze = "__sc-".concat(se, "__");
|
|
1087
|
+
process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && typeof window < "u" && (window[ze] || (window[ze] = 0), window[ze] === 1 && console.warn(`It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.
|
|
1088
|
+
|
|
1089
|
+
See https://s-c.sh/2BAXzed for more info.`), window[ze] += 1);
|
|
1090
|
+
/*! *****************************************************************************
|
|
1091
|
+
Copyright (c) Microsoft Corporation.
|
|
1092
|
+
|
|
1093
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
1094
|
+
purpose with or without fee is hereby granted.
|
|
1095
|
+
|
|
1096
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
1097
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
1098
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
1099
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
1100
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
1101
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
1102
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
1103
|
+
***************************************************************************** */
|
|
1104
|
+
var ae = function() {
|
|
1105
|
+
return ae = Object.assign || function(e) {
|
|
1106
|
+
for (var t, n = 1, r = arguments.length; n < r; n++) for (var o in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, o) && (e[o] = t[o]);
|
|
1107
|
+
return e;
|
|
1108
|
+
}, ae.apply(this, arguments);
|
|
1109
|
+
};
|
|
1110
|
+
function Ae(e, t) {
|
|
1111
|
+
return Object.defineProperty ? Object.defineProperty(e, "raw", { value: t }) : e.raw = t, e;
|
|
1112
|
+
}
|
|
1113
|
+
var Ut, Wt, Yt, qt, Xt, Gr = Sn(Ut || (Ut = Ae([`
|
|
1114
|
+
display: flex;
|
|
1115
|
+
align-items: center;
|
|
1116
|
+
min-width: 322px;
|
|
1117
|
+
max-width: 508px;
|
|
1118
|
+
height: 48px;
|
|
1119
|
+
border: dashed 2px `, `;
|
|
1120
|
+
padding: 8px 16px 8px 8px;
|
|
1121
|
+
border-radius: 5px;
|
|
1122
|
+
cursor: pointer;
|
|
1123
|
+
flex-grow: 0;
|
|
1124
|
+
|
|
1125
|
+
&.is-disabled {
|
|
1126
|
+
border: dashed 2px `, `;
|
|
1127
|
+
cursor: no-drop;
|
|
1128
|
+
svg {
|
|
1129
|
+
fill: `, `;
|
|
1130
|
+
color: `, `;
|
|
1131
|
+
path {
|
|
1132
|
+
fill: `, `;
|
|
1133
|
+
color: `, `;
|
|
1134
|
+
}
|
|
1135
|
+
}
|
|
1136
|
+
}
|
|
1137
|
+
`], [`
|
|
1138
|
+
display: flex;
|
|
1139
|
+
align-items: center;
|
|
1140
|
+
min-width: 322px;
|
|
1141
|
+
max-width: 508px;
|
|
1142
|
+
height: 48px;
|
|
1143
|
+
border: dashed 2px `, `;
|
|
1144
|
+
padding: 8px 16px 8px 8px;
|
|
1145
|
+
border-radius: 5px;
|
|
1146
|
+
cursor: pointer;
|
|
1147
|
+
flex-grow: 0;
|
|
1148
|
+
|
|
1149
|
+
&.is-disabled {
|
|
1150
|
+
border: dashed 2px `, `;
|
|
1151
|
+
cursor: no-drop;
|
|
1152
|
+
svg {
|
|
1153
|
+
fill: `, `;
|
|
1154
|
+
color: `, `;
|
|
1155
|
+
path {
|
|
1156
|
+
fill: `, `;
|
|
1157
|
+
color: `, `;
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1160
|
+
}
|
|
1161
|
+
`])), "#0658c2", "#666", "#666", "#666", "#666", "#666"), Ur = Ee.label(Wt || (Wt = Ae([`
|
|
1162
|
+
position: relative;
|
|
1163
|
+
`, `;
|
|
1164
|
+
&:focus-within {
|
|
1165
|
+
outline: 2px solid black;
|
|
1166
|
+
}
|
|
1167
|
+
& > input {
|
|
1168
|
+
display: block;
|
|
1169
|
+
opacity: 0;
|
|
1170
|
+
position: absolute;
|
|
1171
|
+
pointer-events: none;
|
|
1172
|
+
}
|
|
1173
|
+
`], [`
|
|
1174
|
+
position: relative;
|
|
1175
|
+
`, `;
|
|
1176
|
+
&:focus-within {
|
|
1177
|
+
outline: 2px solid black;
|
|
1178
|
+
}
|
|
1179
|
+
& > input {
|
|
1180
|
+
display: block;
|
|
1181
|
+
opacity: 0;
|
|
1182
|
+
position: absolute;
|
|
1183
|
+
pointer-events: none;
|
|
1184
|
+
}
|
|
1185
|
+
`])), function(e) {
|
|
1186
|
+
return e.overRide ? "" : Gr;
|
|
1187
|
+
}), Wr = Ee.div(Yt || (Yt = Ae([`
|
|
1188
|
+
border: dashed 2px `, `;
|
|
1189
|
+
border-radius: 5px;
|
|
1190
|
+
background-color: `, `;
|
|
1191
|
+
opacity: 0.9;
|
|
1192
|
+
position: absolute;
|
|
1193
|
+
top: 0;
|
|
1194
|
+
right: 0;
|
|
1195
|
+
left: 0;
|
|
1196
|
+
bottom: 0;
|
|
1197
|
+
z-index: 999;
|
|
1198
|
+
& > span {
|
|
1199
|
+
position: absolute;
|
|
1200
|
+
top: 50%;
|
|
1201
|
+
left: 50%;
|
|
1202
|
+
transform: translateX(-50%) translateY(-50%);
|
|
1203
|
+
}
|
|
1204
|
+
`], [`
|
|
1205
|
+
border: dashed 2px `, `;
|
|
1206
|
+
border-radius: 5px;
|
|
1207
|
+
background-color: `, `;
|
|
1208
|
+
opacity: 0.9;
|
|
1209
|
+
position: absolute;
|
|
1210
|
+
top: 0;
|
|
1211
|
+
right: 0;
|
|
1212
|
+
left: 0;
|
|
1213
|
+
bottom: 0;
|
|
1214
|
+
z-index: 999;
|
|
1215
|
+
& > span {
|
|
1216
|
+
position: absolute;
|
|
1217
|
+
top: 50%;
|
|
1218
|
+
left: 50%;
|
|
1219
|
+
transform: translateX(-50%) translateY(-50%);
|
|
1220
|
+
}
|
|
1221
|
+
`])), "#666", "#999"), Yr = Ee.div(qt || (qt = Ae([`
|
|
1222
|
+
display: flex;
|
|
1223
|
+
justify-content: space-between;
|
|
1224
|
+
flex-grow: 1;
|
|
1225
|
+
& > span {
|
|
1226
|
+
font-size: 12px;
|
|
1227
|
+
color: `, `;
|
|
1228
|
+
}
|
|
1229
|
+
.file-types {
|
|
1230
|
+
overflow: hidden;
|
|
1231
|
+
white-space: nowrap;
|
|
1232
|
+
text-overflow: ellipsis;
|
|
1233
|
+
max-width: 100px;
|
|
1234
|
+
}
|
|
1235
|
+
`], [`
|
|
1236
|
+
display: flex;
|
|
1237
|
+
justify-content: space-between;
|
|
1238
|
+
flex-grow: 1;
|
|
1239
|
+
& > span {
|
|
1240
|
+
font-size: 12px;
|
|
1241
|
+
color: `, `;
|
|
1242
|
+
}
|
|
1243
|
+
.file-types {
|
|
1244
|
+
overflow: hidden;
|
|
1245
|
+
white-space: nowrap;
|
|
1246
|
+
text-overflow: ellipsis;
|
|
1247
|
+
max-width: 100px;
|
|
1248
|
+
}
|
|
1249
|
+
`])), function(e) {
|
|
1250
|
+
return e.error ? "red" : "#666";
|
|
1251
|
+
}), qr = Ee.span(Xt || (Xt = Ae([`
|
|
1252
|
+
font-size: 14px;
|
|
1253
|
+
color: `, `;
|
|
1254
|
+
span {
|
|
1255
|
+
text-decoration: underline;
|
|
1256
|
+
}
|
|
1257
|
+
`], [`
|
|
1258
|
+
font-size: 14px;
|
|
1259
|
+
color: `, `;
|
|
1260
|
+
span {
|
|
1261
|
+
text-decoration: underline;
|
|
1262
|
+
}
|
|
1263
|
+
`])), "#666"), Zt = function(e) {
|
|
1264
|
+
return e / 1024 / 1024;
|
|
1265
|
+
}, Xr = function(e) {
|
|
1266
|
+
return e === void 0 ? "" : e.map(function(t) {
|
|
1267
|
+
return ".".concat(t.toLowerCase());
|
|
1268
|
+
}).join(",");
|
|
1269
|
+
};
|
|
1270
|
+
function Zr(e) {
|
|
1271
|
+
var t = e.types, n = e.minSize, r = e.maxSize;
|
|
1272
|
+
if (t) {
|
|
1273
|
+
var o = t.toString(), i = "";
|
|
1274
|
+
return r && (i += "size >= ".concat(r, ", ")), n && (i += "size <= ".concat(n, ", ")), d("span", ae({ title: "".concat(i, "types: ").concat(o), className: "file-types" }, { children: o }), void 0);
|
|
1275
|
+
}
|
|
1276
|
+
return null;
|
|
1277
|
+
}
|
|
1278
|
+
function Kr() {
|
|
1279
|
+
return L("svg", ae({ width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [d("path", { d: "M5.33317 6.66667H22.6665V16H25.3332V6.66667C25.3332 5.196 24.1372 4 22.6665 4H5.33317C3.8625 4 2.6665 5.196 2.6665 6.66667V22.6667C2.6665 24.1373 3.8625 25.3333 5.33317 25.3333H15.9998V22.6667H5.33317V6.66667Z", fill: "#0658C2" }, void 0), d("path", { d: "M10.6665 14.6667L6.6665 20H21.3332L15.9998 12L11.9998 17.3333L10.6665 14.6667Z", fill: "#0658C2" }, void 0), d("path", { d: "M25.3332 18.6667H22.6665V22.6667H18.6665V25.3333H22.6665V29.3333H25.3332V25.3333H29.3332V22.6667H25.3332V18.6667Z", fill: "#0658C2" }, void 0)] }), void 0);
|
|
1280
|
+
}
|
|
1281
|
+
var st = 0, Jr = function(e, t, n, r, o, i) {
|
|
1282
|
+
return n ? d("span", { children: "File type/size error, Hovered on types!" }, void 0) : d(qr, { children: r ? d("span", { children: "Upload disabled" }, void 0) : d(ne, e || t ? { children: i ? d(ne, { children: d("span", { children: i }, void 0) }, void 0) : L(ne, { children: [d("span", { children: "Uploaded Successfully!" }, void 0), " Upload another?"] }, void 0) } : { children: L(ne, o ? { children: [d("span", { children: o.split(" ")[0] }, void 0), " ", o.substr(o.indexOf(" ") + 1)] } : { children: [d("span", { children: "Upload" }, void 0), " or drop a file right here"] }, void 0) }, void 0) }, void 0);
|
|
1283
|
+
}, Qr = function(e) {
|
|
1284
|
+
var t = e.name, n = e.hoverTitle, r = e.types, o = e.handleChange, i = e.classes, a = e.children, c = e.maxSize, s = e.minSize, m = e.fileOrFiles, g = e.onSizeError, f = e.onTypeError, y = e.onSelect, v = e.onDrop, w = e.disabled, A = e.label, D = e.uploadedLabel, E = e.multiple, C = e.required, S = e.onDraggingStateChange, p = e.dropMessageStyle, b = e.ariaLabel, h = e.ariaDescribedby, l = ct(null), T = ct(null), G = le(!1), Ke = G[0], ve = G[1], Pe = le(null), Oe = Pe[0], be = Pe[1], Ne = le(!1), Ie = Ne[0], q = Ne[1], we = function(x) {
|
|
1285
|
+
return r && !function(P, _) {
|
|
1286
|
+
var F = P.name.split(".").pop();
|
|
1287
|
+
return _.map(function(W) {
|
|
1288
|
+
return W.toLowerCase();
|
|
1289
|
+
}).includes(F.toLowerCase());
|
|
1290
|
+
}(x, r) ? (q(!0), f && f("File type is not supported"), !1) : c && Zt(x.size) > c ? (q(!0), g && g("File size is too big"), !1) : !(s && Zt(x.size) < s) || (q(!0), g && g("File size is too small"), !1);
|
|
1291
|
+
}, z = function(x) {
|
|
1292
|
+
var P = !1;
|
|
1293
|
+
if (x) {
|
|
1294
|
+
if (x instanceof File) P = !we(x);
|
|
1295
|
+
else for (var _ = 0; _ < x.length; _++) {
|
|
1296
|
+
var F = x[_];
|
|
1297
|
+
P = !we(F) || P;
|
|
1298
|
+
}
|
|
1299
|
+
return !P && (o && o(x), be(x), ve(!0), q(!1), !0);
|
|
1300
|
+
}
|
|
1301
|
+
return !1;
|
|
1302
|
+
}, U = function(x) {
|
|
1303
|
+
var P = x.labelRef, _ = x.inputRef, F = x.multiple, W = x.handleChanges, X = x.onDrop, Q = le(!1), Z = Q[0], V = Q[1], ee = Se(function() {
|
|
1304
|
+
_.current.click();
|
|
1305
|
+
}, [_]), K = Se(function(O) {
|
|
1306
|
+
O.preventDefault(), O.stopPropagation(), st++, O.dataTransfer.items && O.dataTransfer.items.length !== 0 && V(!0);
|
|
1307
|
+
}, []), j = Se(function(O) {
|
|
1308
|
+
O.preventDefault(), O.stopPropagation(), --st > 0 || V(!1);
|
|
1309
|
+
}, []), Je = Se(function(O) {
|
|
1310
|
+
O.preventDefault(), O.stopPropagation();
|
|
1311
|
+
}, []), Qe = Se(function(O) {
|
|
1312
|
+
O.preventDefault(), O.stopPropagation(), V(!1), st = 0;
|
|
1313
|
+
var Re = O.dataTransfer.files;
|
|
1314
|
+
if (Re && Re.length > 0) {
|
|
1315
|
+
var xt = F ? Re : Re[0], kn = W(xt);
|
|
1316
|
+
X && kn && X(xt);
|
|
1317
|
+
}
|
|
1318
|
+
}, [W]);
|
|
1319
|
+
return et(function() {
|
|
1320
|
+
var O = P.current;
|
|
1321
|
+
return O.addEventListener("click", ee), O.addEventListener("dragenter", K), O.addEventListener("dragleave", j), O.addEventListener("dragover", Je), O.addEventListener("drop", Qe), function() {
|
|
1322
|
+
O.removeEventListener("click", ee), O.removeEventListener("dragenter", K), O.removeEventListener("dragleave", j), O.removeEventListener("dragover", Je), O.removeEventListener("drop", Qe);
|
|
1323
|
+
};
|
|
1324
|
+
}, [ee, K, j, Je, Qe, P]), Z;
|
|
1325
|
+
}({ labelRef: l, inputRef: T, multiple: E, handleChanges: z, onDrop: v });
|
|
1326
|
+
return et(function() {
|
|
1327
|
+
S == null || S(U);
|
|
1328
|
+
}, [U]), et(function() {
|
|
1329
|
+
m ? (ve(!0), be(m)) : (T.current && (T.current.value = ""), ve(!1), be(null));
|
|
1330
|
+
}, [m]), L(Ur, ae({ overRide: a, className: "".concat(i || "", " ").concat(w ? "is-disabled" : ""), ref: l, htmlFor: t, onClick: function(x) {
|
|
1331
|
+
x.preventDefault(), x.stopPropagation();
|
|
1332
|
+
}, "aria-describedby": h, role: "button", "aria-label": b }, { children: [d("input", { onClick: function(x) {
|
|
1333
|
+
x.stopPropagation(), T && T.current && (T.current.value = "", T.current.click());
|
|
1334
|
+
}, onChange: function(x) {
|
|
1335
|
+
var P = x.target.files, _ = E ? P : P[0], F = z(_);
|
|
1336
|
+
y && F && y(_);
|
|
1337
|
+
}, accept: Xr(r), ref: T, type: "file", id: t, name: t, disabled: w, multiple: E, required: C }, void 0), U && d(Wr, ae({ style: p }, { children: d("span", { children: n || "Drop Here" }, void 0) }), void 0), !a && L(ne, { children: [d(Kr, {}, void 0), L(Yr, ae({ error: Ie }, { children: [Jr(Oe, Ke, Ie, w, A, D), d(Zr, { types: r, minSize: s, maxSize: c }, void 0)] }), void 0)] }, void 0), a] }), void 0);
|
|
1338
|
+
};
|
|
1339
|
+
const eo = ({ type: e }) => e === "AUDIO" ? /* @__PURE__ */ d(Rn, { sx: { ml: 1 }, fontSize: "small" }) : e === "VIDEO" ? /* @__PURE__ */ d(Dn, { sx: { ml: 1 }, fontSize: "small" }) : /* @__PURE__ */ d(Tn, { sx: { ml: 1 }, fontSize: "small" }), lo = ({
|
|
1340
|
+
type: e = "IMAGE",
|
|
1341
|
+
allowedExtensions: t = ["JPG", "PNG", "GIF"],
|
|
1342
|
+
urls: n = [],
|
|
1343
|
+
inputName: r = "file",
|
|
1344
|
+
multiple: o = !1,
|
|
1345
|
+
maxSize: i = 5,
|
|
1346
|
+
minSize: a,
|
|
1347
|
+
uploadAction: c,
|
|
1348
|
+
onChange: s
|
|
1349
|
+
}) => {
|
|
1350
|
+
const [m, g] = le(!1), [f, y] = le(null), v = async (p) => {
|
|
1351
|
+
let b = new FormData();
|
|
1352
|
+
b.append(r, p), g(!0);
|
|
1353
|
+
const h = await c(b);
|
|
1354
|
+
g(!1), h && s && s([...n, h].filter((l) => l));
|
|
1355
|
+
}, w = (p) => async () => {
|
|
1356
|
+
await zn(
|
|
1357
|
+
"Are you sure?",
|
|
1358
|
+
`${nt.startCase(nt.lowerCase(e))} will be removed!`
|
|
1359
|
+
) && s && s(n.filter((b) => b !== p));
|
|
1360
|
+
}, A = () => {
|
|
1361
|
+
At("Error!", "Type error");
|
|
1362
|
+
}, D = () => {
|
|
1363
|
+
At("Error!", `File size is out of allowed limits!
|
|
1364
|
+
Max: ${i}mb`);
|
|
1365
|
+
}, E = (p) => () => {
|
|
1366
|
+
y(p);
|
|
1367
|
+
}, C = () => {
|
|
1368
|
+
y(null);
|
|
1369
|
+
}, S = (p) => () => {
|
|
1370
|
+
window.open(p, "_blank");
|
|
1371
|
+
};
|
|
1372
|
+
return /* @__PURE__ */ L(ne, { children: [
|
|
1373
|
+
n.length > 0 && /* @__PURE__ */ d(ne, { children: e === "IMAGE" ? /* @__PURE__ */ d(Et, { container: !0, spacing: 1, mb: 1, children: n.map((p, b) => /* @__PURE__ */ d(Et, { item: !0, xs: 2, children: /* @__PURE__ */ L(
|
|
1374
|
+
An,
|
|
1375
|
+
{
|
|
1376
|
+
sx: {
|
|
1377
|
+
background: `url(${p}) no-repeat center`,
|
|
1378
|
+
backgroundSize: "cover"
|
|
1379
|
+
},
|
|
1380
|
+
children: [
|
|
1381
|
+
/* @__PURE__ */ d(
|
|
1382
|
+
tt,
|
|
1383
|
+
{
|
|
1384
|
+
size: "small",
|
|
1385
|
+
color: "primary",
|
|
1386
|
+
onClick: E(p),
|
|
1387
|
+
children: /* @__PURE__ */ d(Pn, { fontSize: "small" })
|
|
1388
|
+
}
|
|
1389
|
+
),
|
|
1390
|
+
/* @__PURE__ */ d(
|
|
1391
|
+
tt,
|
|
1392
|
+
{
|
|
1393
|
+
size: "small",
|
|
1394
|
+
color: "error",
|
|
1395
|
+
onClick: w(p),
|
|
1396
|
+
children: /* @__PURE__ */ d(On, { fontSize: "small" })
|
|
1397
|
+
}
|
|
1398
|
+
)
|
|
1399
|
+
]
|
|
1400
|
+
}
|
|
1401
|
+
) }, b)) }) : n.map((p, b) => /* @__PURE__ */ d(
|
|
1402
|
+
_n,
|
|
1403
|
+
{
|
|
1404
|
+
label: p.split("/").pop(),
|
|
1405
|
+
icon: /* @__PURE__ */ d(eo, { type: e }),
|
|
1406
|
+
onClick: S(p),
|
|
1407
|
+
onDelete: w(p),
|
|
1408
|
+
sx: { marginRight: 1, marginBottom: 1 }
|
|
1409
|
+
},
|
|
1410
|
+
b
|
|
1411
|
+
)) }),
|
|
1412
|
+
/* @__PURE__ */ d(
|
|
1413
|
+
Qr,
|
|
1414
|
+
{
|
|
1415
|
+
types: t,
|
|
1416
|
+
multiple: o,
|
|
1417
|
+
maxSize: i,
|
|
1418
|
+
minSize: a,
|
|
1419
|
+
disabled: m,
|
|
1420
|
+
onTypeError: A,
|
|
1421
|
+
onSizeError: D,
|
|
1422
|
+
handleChange: v,
|
|
1423
|
+
children: m ? /* @__PURE__ */ L(Ct, { children: [
|
|
1424
|
+
/* @__PURE__ */ d(jn, { show: m, my: 1.15 }),
|
|
1425
|
+
/* @__PURE__ */ d(De, { variant: "subtitle1", fontWeight: 500, children: "Uploading..." }),
|
|
1426
|
+
/* @__PURE__ */ d(De, { variant: "caption", children: "please wait" })
|
|
1427
|
+
] }) : /* @__PURE__ */ L(Ct, { "aria-disabled": m, children: [
|
|
1428
|
+
/* @__PURE__ */ d(Nn, { color: "primary" }),
|
|
1429
|
+
/* @__PURE__ */ L(De, { variant: "subtitle1", fontWeight: 500, children: [
|
|
1430
|
+
"Drop your ",
|
|
1431
|
+
nt.lowerCase(e),
|
|
1432
|
+
"s here, or Browse"
|
|
1433
|
+
] }),
|
|
1434
|
+
/* @__PURE__ */ d(De, { variant: "caption", children: t.join(", ") })
|
|
1435
|
+
] })
|
|
1436
|
+
}
|
|
1437
|
+
),
|
|
1438
|
+
/* @__PURE__ */ L(
|
|
1439
|
+
$n,
|
|
1440
|
+
{
|
|
1441
|
+
open: f !== null,
|
|
1442
|
+
onClose: C,
|
|
1443
|
+
fullWidth: !0,
|
|
1444
|
+
maxWidth: "md",
|
|
1445
|
+
children: [
|
|
1446
|
+
/* @__PURE__ */ d(
|
|
1447
|
+
tt,
|
|
1448
|
+
{
|
|
1449
|
+
color: "inherit",
|
|
1450
|
+
size: "small",
|
|
1451
|
+
onClick: C,
|
|
1452
|
+
sx: {
|
|
1453
|
+
position: "absolute",
|
|
1454
|
+
right: 8,
|
|
1455
|
+
top: 8,
|
|
1456
|
+
backgroundColor: "#fff !important"
|
|
1457
|
+
},
|
|
1458
|
+
children: /* @__PURE__ */ d(In, { fontSize: "small" })
|
|
1459
|
+
}
|
|
1460
|
+
),
|
|
1461
|
+
f !== null ? /* @__PURE__ */ d("img", { src: f, style: { width: "100%" } }) : null
|
|
1462
|
+
]
|
|
1463
|
+
}
|
|
1464
|
+
)
|
|
1465
|
+
] });
|
|
1466
|
+
};
|
|
1467
|
+
export {
|
|
1468
|
+
lo as Uploader
|
|
1469
|
+
};
|