iking-web-ui-pro 1.2.3 → 1.2.5
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/IkApprovalProcess/ik.index.es.js +378 -374
- package/dist/IkApprovalProcess/iking-web-ui-pro.css +1 -1
- package/dist/IkApprovalProcessDetail/ik.index.es.js +126 -123
- package/dist/IkApprovalProcessDetail/iking-web-ui-pro.css +1 -1
- package/dist/IkBaseDialog/ik.index.es.js +4 -4
- package/dist/IkBaseDialog/iking-web-ui-pro.css +1 -1
- package/dist/IkBtnSetting/ik.index.es.js +3 -3
- package/dist/IkBtnSetting/iking-web-ui-pro.css +1 -1
- package/dist/IkCalendar/ik.index.es.js +1043 -1039
- package/dist/IkCalendar/iking-web-ui-pro.css +1 -1
- package/dist/IkCollapseCard/ik.index.es.js +2 -2
- package/dist/IkCollapseCard/iking-web-ui-pro.css +1 -1
- package/dist/IkDescription/ik.index.es.js +122 -119
- package/dist/IkDescription/iking-web-ui-pro.css +1 -1
- package/dist/IkDetailPreviewFiles/ik.index.es.js +121 -118
- package/dist/IkDetailPreviewFiles/iking-web-ui-pro.css +1 -1
- package/dist/IkDragList/ik.index.es.js +1 -1
- package/dist/IkDragList/iking-web-ui-pro.css +1 -1
- package/dist/IkEmpty/ik.index.es.js +6 -6
- package/dist/IkEmpty/iking-web-ui-pro.css +1 -1
- package/dist/IkExpandCollapse/ik.index.es.js +11 -11
- package/dist/IkExpandCollapse/iking-web-ui-pro.css +1 -1
- package/dist/IkHorizontalStepBar/ik.index.es.js +1 -1
- package/dist/IkHorizontalStepBar/iking-web-ui-pro.css +1 -1
- package/dist/IkIconPicker/ik.index.es.js +1 -1
- package/dist/IkIconPicker/iking-web-ui-pro.css +1 -1
- package/dist/IkImageUploadEditor/ik.index.es.js +127 -124
- package/dist/IkImageUploadEditor/iking-web-ui-pro.css +1 -1
- package/dist/IkMonacoEditor/ik.index.es.js +1 -1
- package/dist/IkMonacoEditor/iking-web-ui-pro.css +1 -1
- package/dist/IkPageFull/ik.index.es.js +441 -437
- package/dist/IkPageFull/iking-web-ui-pro.css +1 -1
- package/dist/IkPageTabs/ik.index.es.js +1 -1
- package/dist/IkPageTabs/iking-web-ui-pro.css +1 -1
- package/dist/IkPickerUser/ik.index.es.js +416 -412
- package/dist/IkPickerUser/iking-web-ui-pro.css +1 -1
- package/dist/IkPlayer/ik.index.es.js +103 -100
- package/dist/IkPreviewFile/ik.index.es.js +110 -107
- package/dist/IkPreviewFile/iking-web-ui-pro.css +1 -1
- package/dist/IkPreviewFileDialog/ik.index.es.js +90 -87
- package/dist/IkPreviewFileDialog/iking-web-ui-pro.css +1 -1
- package/dist/IkPrint/ik.index.es.js +1 -1
- package/dist/IkPrint/iking-web-ui-pro.css +1 -1
- package/dist/IkRadioGroup/ik.index.es.js +2 -2
- package/dist/IkRadioGroup/iking-web-ui-pro.css +1 -1
- package/dist/IkSearch/ik.index.es.js +397 -393
- package/dist/IkSearch/iking-web-ui-pro.css +1 -1
- package/dist/IkSearchHead/ik.index.es.js +1 -1
- package/dist/IkSearchHead/iking-web-ui-pro.css +1 -1
- package/dist/IkSelectTag/ik.index.es.js +22 -22
- package/dist/IkSelectTag/iking-web-ui-pro.css +1 -1
- package/dist/IkSideText/ik.index.es.js +42 -39
- package/dist/IkSideText/iking-web-ui-pro.css +1 -1
- package/dist/IkStatu/ik.index.es.js +4 -4
- package/dist/IkStatu/iking-web-ui-pro.css +1 -1
- package/dist/IkStatuOver/ik.index.es.js +2 -2
- package/dist/IkStatuOver/iking-web-ui-pro.css +1 -1
- package/dist/IkSvgIcon/ik.index.es.js +16 -16
- package/dist/IkSvgIcon/iking-web-ui-pro.css +1 -1
- package/dist/IkTinymce/ik.index.es.js +9005 -9004
- package/dist/IkTinymce/iking-web-ui-pro.css +1 -1
- package/dist/IkTree/ik.index.es.js +13 -13
- package/dist/IkTree/iking-web-ui-pro.css +1 -1
- package/dist/IkUploadFile/ik.index.es.js +1419 -1416
- package/dist/IkUploadFile/iking-web-ui-pro.css +1 -1
- package/dist/IkUploadImage/ik.index.es.js +423 -421
- package/dist/IkUploadImage/iking-web-ui-pro.css +1 -1
- package/dist/IkVerticalStepBar/ik.index.es.js +2 -2
- package/dist/IkVerticalStepBar/iking-web-ui-pro.css +1 -1
- package/dist/Provider/ik.index.es.js +14 -10
- package/dist/iking-web-ui-pro.css +2 -2
- package/dist/{index-DzZt3b9I.mjs → index-DTIv4saG.mjs} +16667 -16662
- package/dist/{index.es-BGemUek4.mjs → index.es-DJTszikI.mjs} +2 -2
- package/dist/index.es.js +1 -1
- package/dist/index.umd.js +169 -169
- package/dist/{jspdf.es.min-BVrfmj8U.mjs → jspdf.es.min-CB6UoKKF.mjs} +1 -1
- package/dist/src/components/IkTinymce/index.d.ts +2 -2
- package/dist/src/components/IkTinymce/src/index.vue.d.ts +2 -2
- package/dist/src/components/IkUploadFile/index.d.ts +3 -3
- package/dist/src/components/IkUploadFile/src/index.vue.d.ts +2 -2
- package/dist/src/components/IkUploadImage/index.d.ts +3 -3
- package/dist/src/components/IkUploadImage/src/index.vue.d.ts +2 -2
- package/dist/src/components/Provider/ProviderConfig.vue.d.ts +9 -0
- package/dist/src/components/Provider/index.d.ts +15 -0
- package/dist/src/utils/use-provider.d.ts +1 -0
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ var Hr = (s) => {
|
|
|
5
5
|
var ul = (s, e, t) => e in s ? hl(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
|
|
6
6
|
var f = (s, e, t) => ul(s, typeof e != "symbol" ? e + "" : e, t), es = (s, e, t) => e.has(s) || Hr("Cannot " + t);
|
|
7
7
|
var g = (s, e, t) => (es(s, e, "read from private field"), t ? t.call(s) : e.get(s)), E = (s, e, t) => e.has(s) ? Hr("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(s) : e.set(s, t), k = (s, e, t, i) => (es(s, e, "write to private field"), i ? i.call(s, t) : e.set(s, t), t), C = (s, e, t) => (es(s, e, "access private method"), t);
|
|
8
|
-
import { inject as
|
|
8
|
+
import { inject as st, computed as rt, onMounted as pl, onBeforeUnmount as fl, watch as Ra, defineComponent as Sr, ref as ct, h as Ma, mergeModels as qr, useModel as ml, createBlock as Vr, openBlock as Wr, unref as fi } from "vue";
|
|
9
9
|
const gl = (s, e) => (s.install = (t) => {
|
|
10
10
|
for (const i of [s, ...Object.values({})])
|
|
11
11
|
t.component(i.name, i);
|
|
@@ -65,14 +65,17 @@ const gl = (s, e) => (s.install = (t) => {
|
|
|
65
65
|
"flv",
|
|
66
66
|
"tls"
|
|
67
67
|
], yl = (s) => {
|
|
68
|
-
const e =
|
|
68
|
+
const e = st("loadUrl"), t = rt(() => s.loadUrl || s.fileUrl || (e == null ? void 0 : e.value)), i = st("uploadUrl"), r = rt(() => s.action || s.uploadUrl || (i == null ? void 0 : i.value)), n = st("token"), a = rt(() => s.token || (n == null ? void 0 : n.value)), o = st("header"), l = rt(() => s.header || (o == null ? void 0 : o.value) || {
|
|
69
|
+
Authorization: a.value
|
|
70
|
+
}), c = st("onlyofficeConfig"), u = rt(() => s.onlyofficeConfig || (c == null ? void 0 : c.value)), h = st("userInfo"), p = rt(() => s.userInfo || (h == null ? void 0 : h.value)), m = [...jr, ...jr.map((y) => y.toLocaleUpperCase())];
|
|
69
71
|
return {
|
|
70
72
|
cLoadUrl: t,
|
|
71
73
|
cUploadUrl: r,
|
|
72
74
|
cToken: a,
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
75
|
+
cHeader: l,
|
|
76
|
+
cOnlyofficeConfig: u,
|
|
77
|
+
cUserInfo: p,
|
|
78
|
+
cOnlyofficePreviewType: m
|
|
76
79
|
};
|
|
77
80
|
};
|
|
78
81
|
function vl(s, e) {
|
|
@@ -128,23 +131,23 @@ class Di extends Error {
|
|
|
128
131
|
this.cause = t, this.isNetworkError = !0, this.request = i;
|
|
129
132
|
}
|
|
130
133
|
}
|
|
131
|
-
var Ve,
|
|
134
|
+
var Ve, ft, Jt, mt;
|
|
132
135
|
class Fl {
|
|
133
136
|
constructor(e, t) {
|
|
134
137
|
E(this, Ve);
|
|
135
|
-
E(this,
|
|
138
|
+
E(this, ft, !1);
|
|
136
139
|
E(this, Jt);
|
|
137
|
-
E(this,
|
|
138
|
-
k(this,
|
|
140
|
+
E(this, mt);
|
|
141
|
+
k(this, mt, e), k(this, Jt, () => t(e));
|
|
139
142
|
}
|
|
140
143
|
progress() {
|
|
141
|
-
g(this,
|
|
144
|
+
g(this, ft) || g(this, mt) > 0 && (clearTimeout(g(this, Ve)), k(this, Ve, setTimeout(g(this, Jt), g(this, mt))));
|
|
142
145
|
}
|
|
143
146
|
done() {
|
|
144
|
-
g(this,
|
|
147
|
+
g(this, ft) || (clearTimeout(g(this, Ve)), k(this, Ve, void 0), k(this, ft, !0));
|
|
145
148
|
}
|
|
146
149
|
}
|
|
147
|
-
Ve = new WeakMap(),
|
|
150
|
+
Ve = new WeakMap(), ft = new WeakMap(), Jt = new WeakMap(), mt = new WeakMap();
|
|
148
151
|
const mi = () => {
|
|
149
152
|
};
|
|
150
153
|
function Tl(s, e = {}) {
|
|
@@ -405,7 +408,7 @@ const Il = {
|
|
|
405
408
|
"video/x-matroska": "mkv",
|
|
406
409
|
"video/x-msvideo": "avi"
|
|
407
410
|
};
|
|
408
|
-
function
|
|
411
|
+
function ht(s) {
|
|
409
412
|
return [s] = s.split(";", 1), Il[s] || null;
|
|
410
413
|
}
|
|
411
414
|
function Ul(s) {
|
|
@@ -463,28 +466,28 @@ function Zr(s) {
|
|
|
463
466
|
}
|
|
464
467
|
return this;
|
|
465
468
|
}
|
|
466
|
-
var Te, ge, Ce,
|
|
469
|
+
var Te, ge, Ce, gt, ye, yt, We, J, Hs, Ut, Ba, La, za, $i, vt;
|
|
467
470
|
class Vl {
|
|
468
471
|
constructor(e) {
|
|
469
472
|
E(this, J);
|
|
470
473
|
E(this, Te, 0);
|
|
471
474
|
E(this, ge, []);
|
|
472
475
|
E(this, Ce, !1);
|
|
473
|
-
E(this,
|
|
476
|
+
E(this, gt);
|
|
474
477
|
E(this, ye, 1);
|
|
475
|
-
E(this,
|
|
478
|
+
E(this, yt);
|
|
476
479
|
E(this, We);
|
|
477
480
|
f(this, "limit");
|
|
478
481
|
E(this, $i, () => this.resume());
|
|
479
|
-
E(this,
|
|
482
|
+
E(this, vt, () => {
|
|
480
483
|
if (g(this, Ce)) {
|
|
481
|
-
k(this, We, setTimeout(g(this,
|
|
484
|
+
k(this, We, setTimeout(g(this, vt), 0));
|
|
482
485
|
return;
|
|
483
486
|
}
|
|
484
|
-
k(this, ye, this.limit), this.limit = Math.ceil((g(this,
|
|
487
|
+
k(this, ye, this.limit), this.limit = Math.ceil((g(this, yt) + g(this, ye)) / 2);
|
|
485
488
|
for (let e = g(this, ye); e <= this.limit; e++)
|
|
486
489
|
C(this, J, Ut).call(this);
|
|
487
|
-
g(this,
|
|
490
|
+
g(this, yt) - g(this, ye) > 3 ? k(this, We, setTimeout(g(this, vt), 2e3)) : k(this, ye, Math.floor(g(this, ye) / 2));
|
|
488
491
|
});
|
|
489
492
|
typeof e != "number" || e === 0 ? this.limit = 1 / 0 : this.limit = e;
|
|
490
493
|
}
|
|
@@ -529,7 +532,7 @@ class Vl {
|
|
|
529
532
|
};
|
|
530
533
|
}
|
|
531
534
|
resume() {
|
|
532
|
-
k(this, Ce, !1), clearTimeout(g(this,
|
|
535
|
+
k(this, Ce, !1), clearTimeout(g(this, gt));
|
|
533
536
|
for (let e = 0; e < this.limit; e++)
|
|
534
537
|
C(this, J, Ut).call(this);
|
|
535
538
|
}
|
|
@@ -540,7 +543,7 @@ class Vl {
|
|
|
540
543
|
* If omitted, the queue won't resume automatically.
|
|
541
544
|
*/
|
|
542
545
|
pause(e = null) {
|
|
543
|
-
k(this, Ce, !0), clearTimeout(g(this,
|
|
546
|
+
k(this, Ce, !0), clearTimeout(g(this, gt)), e != null && k(this, gt, setTimeout(g(this, $i), e));
|
|
544
547
|
}
|
|
545
548
|
/**
|
|
546
549
|
* Pauses the queue for a duration, and lower the limit of concurrent requests
|
|
@@ -553,13 +556,13 @@ class Vl {
|
|
|
553
556
|
* @param {number} duration in milliseconds.
|
|
554
557
|
*/
|
|
555
558
|
rateLimit(e) {
|
|
556
|
-
clearTimeout(g(this, We)), this.pause(e), this.limit > 1 && Number.isFinite(this.limit) && (k(this,
|
|
559
|
+
clearTimeout(g(this, We)), this.pause(e), this.limit > 1 && Number.isFinite(this.limit) && (k(this, yt, this.limit - 1), this.limit = g(this, ye), k(this, We, setTimeout(g(this, vt), e)));
|
|
557
560
|
}
|
|
558
561
|
get isPaused() {
|
|
559
562
|
return g(this, Ce);
|
|
560
563
|
}
|
|
561
564
|
}
|
|
562
|
-
Te = new WeakMap(), ge = new WeakMap(), Ce = new WeakMap(),
|
|
565
|
+
Te = new WeakMap(), ge = new WeakMap(), Ce = new WeakMap(), gt = new WeakMap(), ye = new WeakMap(), yt = new WeakMap(), We = new WeakMap(), J = new WeakSet(), Hs = function(e) {
|
|
563
566
|
k(this, Te, g(this, Te) + 1);
|
|
564
567
|
let t = !1, i;
|
|
565
568
|
try {
|
|
@@ -600,7 +603,7 @@ Te = new WeakMap(), ge = new WeakMap(), Ce = new WeakMap(), ft = new WeakMap(),
|
|
|
600
603
|
}, za = function(e) {
|
|
601
604
|
const t = g(this, ge).indexOf(e);
|
|
602
605
|
t !== -1 && g(this, ge).splice(t, 1);
|
|
603
|
-
}, $i = new WeakMap(),
|
|
606
|
+
}, $i = new WeakMap(), vt = new WeakMap();
|
|
604
607
|
const is = Symbol("__queue");
|
|
605
608
|
function Wl(s, e, t) {
|
|
606
609
|
const i = [];
|
|
@@ -728,10 +731,10 @@ function ue(s) {
|
|
|
728
731
|
function Z(s, e) {
|
|
729
732
|
this.props = s, this.context = e;
|
|
730
733
|
}
|
|
731
|
-
function
|
|
732
|
-
if (e == null) return s.__ ?
|
|
734
|
+
function Et(s, e) {
|
|
735
|
+
if (e == null) return s.__ ? Et(s.__, s.__i + 1) : null;
|
|
733
736
|
for (var t; e < s.__k.length; e++) if ((t = s.__k[e]) != null && t.__e != null) return t.__e;
|
|
734
|
-
return typeof s.type == "function" ?
|
|
737
|
+
return typeof s.type == "function" ? Et(s) : null;
|
|
735
738
|
}
|
|
736
739
|
function Xa(s) {
|
|
737
740
|
var e, t;
|
|
@@ -747,7 +750,7 @@ function sn(s) {
|
|
|
747
750
|
(!s.__d && (s.__d = !0) && $e.push(s) && !Oi.__r++ || tn != B.debounceRendering) && ((tn = B.debounceRendering) || Va)(Oi);
|
|
748
751
|
}
|
|
749
752
|
function Oi() {
|
|
750
|
-
for (var s, e, t, i, r, n, a, o = 1; $e.length; ) $e.length > o && $e.sort(Wa), s = $e.shift(), o = $e.length, s.__d && (t = void 0, i = void 0, r = (i = (e = s).__v).__e, n = [], a = [], e.__P && ((t = we({}, i)).__v = i.__v + 1, B.vnode && B.vnode(t), Cr(e.__P, t, i, e.__n, e.__P.namespaceURI, 32 & i.__u ? [r] : null, n, r ??
|
|
753
|
+
for (var s, e, t, i, r, n, a, o = 1; $e.length; ) $e.length > o && $e.sort(Wa), s = $e.shift(), o = $e.length, s.__d && (t = void 0, i = void 0, r = (i = (e = s).__v).__e, n = [], a = [], e.__P && ((t = we({}, i)).__v = i.__v + 1, B.vnode && B.vnode(t), Cr(e.__P, t, i, e.__n, e.__P.namespaceURI, 32 & i.__u ? [r] : null, n, r ?? Et(i), !!(32 & i.__u), a), t.__v = i.__v, t.__.__k[t.__i] = t, Ja(n, t, a), i.__e = i.__ = null, t.__e != r && Xa(t)));
|
|
751
754
|
Oi.__r = 0;
|
|
752
755
|
}
|
|
753
756
|
function Ya(s, e, t, i, r, n, a, o, l, c, u) {
|
|
@@ -758,7 +761,7 @@ function Ya(s, e, t, i, r, n, a, o, l, c, u) {
|
|
|
758
761
|
function Kl(s, e, t, i, r) {
|
|
759
762
|
var n, a, o, l, c, u = t.length, h = u, p = 0;
|
|
760
763
|
for (s.__k = new Array(r), n = 0; n < r; n++) (a = e[n]) != null && typeof a != "boolean" && typeof a != "function" ? (l = n + p, (a = s.__k[n] = typeof a == "string" || typeof a == "number" || typeof a == "bigint" || a.constructor == String ? Ht(null, a, null, null, null) : di(a) ? Ht(ue, { children: a }, null, null, null) : a.constructor == null && a.__b > 0 ? Ht(a.type, a.props, a.key, a.ref ? a.ref : null, a.__v) : a).__ = s, a.__b = s.__b + 1, o = null, (c = a.__i = Jl(a, t, l, h)) != -1 && (h--, (o = t[c]) && (o.__u |= 2)), o == null || o.__v == null ? (c == -1 && (r > u ? p-- : r < u && p++), typeof a.type != "function" && (a.__u |= 4)) : c != l && (c == l - 1 ? p-- : c == l + 1 ? p++ : (c > l ? p-- : p++, a.__u |= 4))) : s.__k[n] = null;
|
|
761
|
-
if (h) for (n = 0; n < u; n++) (o = t[n]) != null && (2 & o.__u) == 0 && (o.__e == i && (i =
|
|
764
|
+
if (h) for (n = 0; n < u; n++) (o = t[n]) != null && (2 & o.__u) == 0 && (o.__e == i && (i = Et(o)), Za(o, o));
|
|
762
765
|
return i;
|
|
763
766
|
}
|
|
764
767
|
function Ka(s, e, t, i) {
|
|
@@ -767,7 +770,7 @@ function Ka(s, e, t, i) {
|
|
|
767
770
|
for (r = s.__k, n = 0; r && n < r.length; n++) r[n] && (r[n].__ = s, e = Ka(r[n], e, t, i));
|
|
768
771
|
return e;
|
|
769
772
|
}
|
|
770
|
-
s.__e != e && (i && (e && s.type && !e.parentNode && (e =
|
|
773
|
+
s.__e != e && (i && (e && s.type && !e.parentNode && (e = Et(s)), t.insertBefore(s.__e, e || null)), e = s.__e);
|
|
771
774
|
do
|
|
772
775
|
e = e && e.nextSibling;
|
|
773
776
|
while (e != null && e.nodeType == 8);
|
|
@@ -898,7 +901,7 @@ function Ql(s, e, t, i, r, n, a, o, l) {
|
|
|
898
901
|
}
|
|
899
902
|
for (c in F) m = F[c], c == "children" ? p = m : c == "dangerouslySetInnerHTML" ? u = m : c == "value" ? y = m : c == "checked" ? b = m : o && typeof m != "function" || S[c] === m || gi(s, c, m, S[c], r);
|
|
900
903
|
if (u) o || h && (u.__html == h.__html || u.__html == s.innerHTML) || (s.innerHTML = u.__html), e.__k = [];
|
|
901
|
-
else if (h && (s.innerHTML = ""), Ya(e.type == "template" ? s.content : s, di(p) ? p : [p], e, t, i, _ == "foreignObject" ? "http://www.w3.org/1999/xhtml" : r, n, a, n ? n[0] : t.__k &&
|
|
904
|
+
else if (h && (s.innerHTML = ""), Ya(e.type == "template" ? s.content : s, di(p) ? p : [p], e, t, i, _ == "foreignObject" ? "http://www.w3.org/1999/xhtml" : r, n, a, n ? n[0] : t.__k && Et(t, 0), o, l), n != null) for (c = n.length; c--; ) Fr(n[c]);
|
|
902
905
|
o || (c = "value", _ == "progress" && y == null ? s.removeAttribute("value") : y != null && (y !== s[c] || _ == "progress" && !y || _ == "option" && y != S[c]) && gi(s, c, y, S[c], r), c = "checked", b != null && b != s[c] && gi(s, c, b, S[c], r));
|
|
903
906
|
}
|
|
904
907
|
return s;
|
|
@@ -968,7 +971,7 @@ function Pr(s, e) {
|
|
|
968
971
|
var t = V.__H || (V.__H = { __: [], __h: [] });
|
|
969
972
|
return s >= t.__.length && t.__.push({}), t.__[s];
|
|
970
973
|
}
|
|
971
|
-
function
|
|
974
|
+
function Pt(s) {
|
|
972
975
|
return Gt = 1, td(so, s);
|
|
973
976
|
}
|
|
974
977
|
function td(s, e, t) {
|
|
@@ -1113,7 +1116,7 @@ const rd = {
|
|
|
1113
1116
|
overflow: "visible"
|
|
1114
1117
|
};
|
|
1115
1118
|
function ad({ data: s, rowHeight: e, renderRow: t, overscanCount: i = 10, padding: r = 4, ...n }) {
|
|
1116
|
-
const a = qt(null), [o, l] =
|
|
1119
|
+
const a = qt(null), [o, l] = Pt(0), [c, u] = Pt(0);
|
|
1117
1120
|
Ni(() => {
|
|
1118
1121
|
function _() {
|
|
1119
1122
|
a.current != null && c !== a.current.offsetHeight && u(a.current.offsetHeight);
|
|
@@ -1478,12 +1481,12 @@ let Ne = Hi;
|
|
|
1478
1481
|
const bd = "5.0.0", wd = {
|
|
1479
1482
|
version: bd
|
|
1480
1483
|
};
|
|
1481
|
-
var
|
|
1484
|
+
var bt, qi, ao;
|
|
1482
1485
|
class no {
|
|
1483
1486
|
constructor() {
|
|
1484
1487
|
E(this, qi);
|
|
1485
1488
|
f(this, "state", {});
|
|
1486
|
-
E(this,
|
|
1489
|
+
E(this, bt, /* @__PURE__ */ new Set());
|
|
1487
1490
|
}
|
|
1488
1491
|
getState() {
|
|
1489
1492
|
return this.state;
|
|
@@ -1493,13 +1496,13 @@ class no {
|
|
|
1493
1496
|
this.state = i, C(this, qi, ao).call(this, t, i, e);
|
|
1494
1497
|
}
|
|
1495
1498
|
subscribe(e) {
|
|
1496
|
-
return g(this,
|
|
1497
|
-
g(this,
|
|
1499
|
+
return g(this, bt).add(e), () => {
|
|
1500
|
+
g(this, bt).delete(e);
|
|
1498
1501
|
};
|
|
1499
1502
|
}
|
|
1500
1503
|
}
|
|
1501
|
-
|
|
1502
|
-
g(this,
|
|
1504
|
+
bt = new WeakMap(), qi = new WeakSet(), ao = function(...e) {
|
|
1505
|
+
g(this, bt).forEach((t) => {
|
|
1503
1506
|
t(...e);
|
|
1504
1507
|
});
|
|
1505
1508
|
}, f(no, "VERSION", wd.version);
|
|
@@ -1852,7 +1855,7 @@ const vi = {
|
|
|
1852
1855
|
error: null,
|
|
1853
1856
|
recoveredState: null
|
|
1854
1857
|
};
|
|
1855
|
-
var je, oe, le, ii, Ge,
|
|
1858
|
+
var je, oe, le, ii, Ge, wt, St, Xe, x, ze, Xs, ho, Ys, uo, Ks, Js, Qs, Zs, Vi, er, Ye, po, fo, Re, si, Bt, mo, Ai, Lt;
|
|
1856
1859
|
let qd = (je = class {
|
|
1857
1860
|
/**
|
|
1858
1861
|
* Instantiate Uppy
|
|
@@ -1863,8 +1866,8 @@ let qd = (je = class {
|
|
|
1863
1866
|
E(this, le);
|
|
1864
1867
|
E(this, ii);
|
|
1865
1868
|
E(this, Ge, Id());
|
|
1866
|
-
E(this,
|
|
1867
|
-
E(this,
|
|
1869
|
+
E(this, wt, /* @__PURE__ */ new Set());
|
|
1870
|
+
E(this, St, /* @__PURE__ */ new Set());
|
|
1868
1871
|
E(this, Xe, /* @__PURE__ */ new Set());
|
|
1869
1872
|
f(this, "defaultLocale");
|
|
1870
1873
|
f(this, "locale");
|
|
@@ -2065,10 +2068,10 @@ let qd = (je = class {
|
|
|
2065
2068
|
this.setState({ ...vi, files: {} });
|
|
2066
2069
|
}
|
|
2067
2070
|
addPreProcessor(e) {
|
|
2068
|
-
g(this,
|
|
2071
|
+
g(this, wt).add(e);
|
|
2069
2072
|
}
|
|
2070
2073
|
removePreProcessor(e) {
|
|
2071
|
-
return g(this,
|
|
2074
|
+
return g(this, wt).delete(e);
|
|
2072
2075
|
}
|
|
2073
2076
|
addPostProcessor(e) {
|
|
2074
2077
|
g(this, Xe).add(e);
|
|
@@ -2077,10 +2080,10 @@ let qd = (je = class {
|
|
|
2077
2080
|
return g(this, Xe).delete(e);
|
|
2078
2081
|
}
|
|
2079
2082
|
addUploader(e) {
|
|
2080
|
-
g(this,
|
|
2083
|
+
g(this, St).add(e);
|
|
2081
2084
|
}
|
|
2082
2085
|
removeUploader(e) {
|
|
2083
|
-
return g(this,
|
|
2086
|
+
return g(this, St).delete(e);
|
|
2084
2087
|
}
|
|
2085
2088
|
setMeta(e) {
|
|
2086
2089
|
const t = { ...this.getState().meta, ...e }, i = { ...this.getState().files };
|
|
@@ -2500,7 +2503,7 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
2500
2503
|
throw this.emit("error", n), this.log(n, "error"), n;
|
|
2501
2504
|
}));
|
|
2502
2505
|
}
|
|
2503
|
-
}, oe = new WeakMap(), le = new WeakMap(), ii = new WeakMap(), Ge = new WeakMap(),
|
|
2506
|
+
}, oe = new WeakMap(), le = new WeakMap(), ii = new WeakMap(), Ge = new WeakMap(), wt = new WeakMap(), St = new WeakMap(), Xe = new WeakMap(), x = new WeakSet(), ze = function(e) {
|
|
2504
2507
|
for (const a of e)
|
|
2505
2508
|
a.isRestriction ? this.emit("restriction-failed", a.file, a) : this.emit("error", a, a.file), this.log(a, "warning");
|
|
2506
2509
|
const t = e.filter((a) => a.isUserFacing), i = 4, r = t.slice(0, i), n = t.slice(i);
|
|
@@ -2812,8 +2815,8 @@ Ai = function(e) {
|
|
|
2812
2815
|
};
|
|
2813
2816
|
let i = t();
|
|
2814
2817
|
const r = [
|
|
2815
|
-
...g(this,
|
|
2816
|
-
...g(this,
|
|
2818
|
+
...g(this, wt),
|
|
2819
|
+
...g(this, St),
|
|
2817
2820
|
...g(this, Xe)
|
|
2818
2821
|
];
|
|
2819
2822
|
try {
|
|
@@ -2953,7 +2956,7 @@ function Zd() {
|
|
|
2953
2956
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2954
2957
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
2955
2958
|
}
|
|
2956
|
-
var Zi = typeof window < "u" && typeof window.document < "u", _e = Zi ? window : {}, Mr = Zi && _e.document.documentElement ? "ontouchstart" in _e.document.documentElement : !1, kr = Zi ? "PointerEvent" in _e : !1, H = "cropper", Ar = "all", bo = "crop", wo = "move", So = "zoom", Be = "e", Le = "w",
|
|
2959
|
+
var Zi = typeof window < "u" && typeof window.document < "u", _e = Zi ? window : {}, Mr = Zi && _e.document.documentElement ? "ontouchstart" in _e.document.documentElement : !1, kr = Zi ? "PointerEvent" in _e : !1, H = "cropper", Ar = "all", bo = "crop", wo = "move", So = "zoom", Be = "e", Le = "w", nt = "s", Pe = "n", Mt = "ne", kt = "nw", At = "se", Dt = "sw", sr = "".concat(H, "-crop"), In = "".concat(H, "-disabled"), te = "".concat(H, "-hidden"), Un = "".concat(H, "-hide"), ec = "".concat(H, "-invisible"), Ui = "".concat(H, "-modal"), rr = "".concat(H, "-move"), Xt = "".concat(H, "Action"), bi = "".concat(H, "Preview"), Dr = "crop", _o = "move", Fo = "none", nr = "crop", ar = "cropend", or = "cropmove", lr = "cropstart", Bn = "dblclick", tc = Mr ? "touchstart" : "mousedown", ic = Mr ? "touchmove" : "mousemove", sc = Mr ? "touchend touchcancel" : "mouseup", Ln = kr ? "pointerdown" : tc, zn = kr ? "pointermove" : ic, $n = kr ? "pointerup pointercancel" : sc, Hn = "ready", qn = "resize", Vn = "wheel", dr = "zoom", Wn = "image/jpeg", rc = /^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/, nc = /^data:/, ac = /^data:image\/jpeg;base64,/, oc = /^img|canvas$/i, To = 200, Co = 100, jn = {
|
|
2957
2960
|
// Define the view mode of the cropper
|
|
2958
2961
|
viewMode: 0,
|
|
2959
2962
|
// 0, 1, 2, 3
|
|
@@ -3038,7 +3041,7 @@ function tt(s) {
|
|
|
3038
3041
|
return tr(s) === "object" && s !== null;
|
|
3039
3042
|
}
|
|
3040
3043
|
var cc = Object.prototype.hasOwnProperty;
|
|
3041
|
-
function
|
|
3044
|
+
function ot(s) {
|
|
3042
3045
|
if (!tt(s))
|
|
3043
3046
|
return !1;
|
|
3044
3047
|
try {
|
|
@@ -3071,7 +3074,7 @@ var q = Object.assign || function(e) {
|
|
|
3071
3074
|
});
|
|
3072
3075
|
}), e;
|
|
3073
3076
|
}, uc = /\.\d*(?:0|9){12}\d*$/;
|
|
3074
|
-
function
|
|
3077
|
+
function ut(s) {
|
|
3075
3078
|
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1e11;
|
|
3076
3079
|
return uc.test(s) ? Math.round(s * e) / e : s;
|
|
3077
3080
|
}
|
|
@@ -3116,11 +3119,11 @@ function Se(s, e) {
|
|
|
3116
3119
|
s.className.indexOf(e) >= 0 && (s.className = s.className.replace(e, ""));
|
|
3117
3120
|
}
|
|
3118
3121
|
}
|
|
3119
|
-
function
|
|
3122
|
+
function lt(s, e, t) {
|
|
3120
3123
|
if (e) {
|
|
3121
3124
|
if (D(s.length)) {
|
|
3122
3125
|
j(s, function(i) {
|
|
3123
|
-
|
|
3126
|
+
lt(i, e, t);
|
|
3124
3127
|
});
|
|
3125
3128
|
return;
|
|
3126
3129
|
}
|
|
@@ -3199,7 +3202,7 @@ function re(s, e, t) {
|
|
|
3199
3202
|
s.addEventListener(n, r, i);
|
|
3200
3203
|
});
|
|
3201
3204
|
}
|
|
3202
|
-
function
|
|
3205
|
+
function pt(s, e, t) {
|
|
3203
3206
|
var i;
|
|
3204
3207
|
return ee(Event) && ee(CustomEvent) ? i = new CustomEvent(e, {
|
|
3205
3208
|
detail: t,
|
|
@@ -3298,17 +3301,17 @@ function Sc(s, e, t, i) {
|
|
|
3298
3301
|
aspectRatio: m,
|
|
3299
3302
|
width: I,
|
|
3300
3303
|
height: A
|
|
3301
|
-
}, "cover"), ie = Math.min(K.width, Math.max(se.width, y)), ne = Math.min(K.height, Math.max(se.height, b)),
|
|
3304
|
+
}, "cover"), ie = Math.min(K.width, Math.max(se.width, y)), ne = Math.min(K.height, Math.max(se.height, b)), xt = De({
|
|
3302
3305
|
aspectRatio: r,
|
|
3303
3306
|
width: w,
|
|
3304
3307
|
height: O
|
|
3305
|
-
}),
|
|
3308
|
+
}), Rt = De({
|
|
3306
3309
|
aspectRatio: r,
|
|
3307
3310
|
width: I,
|
|
3308
3311
|
height: A
|
|
3309
|
-
}, "cover"), ci = Math.min(
|
|
3310
|
-
return $.width =
|
|
3311
|
-
return Math.floor(
|
|
3312
|
+
}, "cover"), ci = Math.min(xt.width, Math.max(Rt.width, n)), hi = Math.min(xt.height, Math.max(Rt.height, a)), ui = [-ci / 2, -hi / 2, ci, hi];
|
|
3313
|
+
return $.width = ut(ie), $.height = ut(ne), L.fillStyle = F, L.fillRect(0, 0, ie, ne), L.save(), L.translate(ie / 2, ne / 2), L.rotate(l * Math.PI / 180), L.scale(u, p), L.imageSmoothingEnabled = T, L.imageSmoothingQuality = P, L.drawImage.apply(L, [s].concat(vo(ui.map(function($r) {
|
|
3314
|
+
return Math.floor(ut($r));
|
|
3312
3315
|
})))), L.restore(), $;
|
|
3313
3316
|
}
|
|
3314
3317
|
var Mo = String.fromCharCode;
|
|
@@ -3511,7 +3514,7 @@ var xc = {
|
|
|
3511
3514
|
}))), this.cropped && this.limited && this.limitCanvas(!0, !0), this.disabled || this.output();
|
|
3512
3515
|
},
|
|
3513
3516
|
output: function() {
|
|
3514
|
-
this.preview(),
|
|
3517
|
+
this.preview(), pt(this.element, nr, this.getData());
|
|
3515
3518
|
}
|
|
3516
3519
|
}, Rc = {
|
|
3517
3520
|
initPreview: function() {
|
|
@@ -3604,7 +3607,7 @@ var xc = {
|
|
|
3604
3607
|
var r = this.options, n = this.pointers, a;
|
|
3605
3608
|
e.changedTouches ? j(e.changedTouches, function(o) {
|
|
3606
3609
|
n[o.identifier] = wi(o);
|
|
3607
|
-
}) : n[e.pointerId || 0] = wi(e), Object.keys(n).length > 1 && r.zoomable && r.zoomOnTouch ? a = So : a = cr(e.target, Xt), rc.test(a) &&
|
|
3610
|
+
}) : n[e.pointerId || 0] = wi(e), Object.keys(n).length > 1 && r.zoomable && r.zoomOnTouch ? a = So : a = cr(e.target, Xt), rc.test(a) && pt(this.element, lr, {
|
|
3608
3611
|
originalEvent: e,
|
|
3609
3612
|
action: a
|
|
3610
3613
|
}) !== !1 && (e.preventDefault(), this.action = a, this.cropping = !1, a === bo && (this.cropping = !0, X(this.dragBox, Ui)));
|
|
@@ -3614,7 +3617,7 @@ var xc = {
|
|
|
3614
3617
|
var t = this.action;
|
|
3615
3618
|
if (!(this.disabled || !t)) {
|
|
3616
3619
|
var i = this.pointers;
|
|
3617
|
-
e.preventDefault(),
|
|
3620
|
+
e.preventDefault(), pt(this.element, or, {
|
|
3618
3621
|
originalEvent: e,
|
|
3619
3622
|
action: t
|
|
3620
3623
|
}) !== !1 && (e.changedTouches ? j(e.changedTouches, function(r) {
|
|
@@ -3627,7 +3630,7 @@ var xc = {
|
|
|
3627
3630
|
var t = this.action, i = this.pointers;
|
|
3628
3631
|
e.changedTouches ? j(e.changedTouches, function(r) {
|
|
3629
3632
|
delete i[r.identifier];
|
|
3630
|
-
}) : delete i[e.pointerId || 0], t && (e.preventDefault(), Object.keys(i).length || (this.action = ""), this.cropping && (this.cropping = !1,
|
|
3633
|
+
}) : delete i[e.pointerId || 0], t && (e.preventDefault(), Object.keys(i).length || (this.action = ""), this.cropping && (this.cropping = !1, lt(this.dragBox, Ui, this.cropped && this.options.modal)), pt(this.element, ar, {
|
|
3631
3634
|
originalEvent: e,
|
|
3632
3635
|
action: t
|
|
3633
3636
|
}));
|
|
@@ -3651,7 +3654,7 @@ var xc = {
|
|
|
3651
3654
|
case Pe:
|
|
3652
3655
|
u + v.y < S && (v.y = S - u);
|
|
3653
3656
|
break;
|
|
3654
|
-
case
|
|
3657
|
+
case nt:
|
|
3655
3658
|
y + v.y > _ && (v.y = _ - y);
|
|
3656
3659
|
break;
|
|
3657
3660
|
}
|
|
@@ -3674,7 +3677,7 @@ var xc = {
|
|
|
3674
3677
|
T = !1;
|
|
3675
3678
|
break;
|
|
3676
3679
|
}
|
|
3677
|
-
w(Pe), p -= v.y, u += v.y, p < 0 && (o =
|
|
3680
|
+
w(Pe), p -= v.y, u += v.y, p < 0 && (o = nt, p = -p, u -= p), l && (h = p * l, c += (n.width - h) / 2);
|
|
3678
3681
|
break;
|
|
3679
3682
|
case Le:
|
|
3680
3683
|
if (v.x <= 0 && (c <= b || l && (u <= S || y >= _))) {
|
|
@@ -3683,12 +3686,12 @@ var xc = {
|
|
|
3683
3686
|
}
|
|
3684
3687
|
w(Le), h -= v.x, c += v.x, h < 0 && (o = Be, h = -h, c -= h), l && (p = h / l, u += (n.height - p) / 2);
|
|
3685
3688
|
break;
|
|
3686
|
-
case
|
|
3689
|
+
case nt:
|
|
3687
3690
|
if (v.y >= 0 && (y >= _ || l && (c <= b || m >= F))) {
|
|
3688
3691
|
T = !1;
|
|
3689
3692
|
break;
|
|
3690
3693
|
}
|
|
3691
|
-
w(
|
|
3694
|
+
w(nt), p += v.y, p < 0 && (o = Pe, p = -p, u -= p), l && (h = p * l, c += (n.width - h) / 2);
|
|
3692
3695
|
break;
|
|
3693
3696
|
case Mt:
|
|
3694
3697
|
if (l) {
|
|
@@ -3720,7 +3723,7 @@ var xc = {
|
|
|
3720
3723
|
}
|
|
3721
3724
|
w(Le), h -= v.x, c += v.x, p = h / l;
|
|
3722
3725
|
} else
|
|
3723
|
-
w(
|
|
3726
|
+
w(nt), w(Le), v.x <= 0 ? c > b ? (h -= v.x, c += v.x) : v.y >= 0 && y >= _ && (T = !1) : (h -= v.x, c += v.x), v.y >= 0 ? y < _ && (p += v.y) : p += v.y;
|
|
3724
3727
|
h < 0 && p < 0 ? (o = Mt, p = -p, h = -h, u -= p, c -= h) : h < 0 ? (o = At, h = -h, c -= h) : p < 0 && (o = kt, p = -p, u -= p);
|
|
3725
3728
|
break;
|
|
3726
3729
|
case At:
|
|
@@ -3731,7 +3734,7 @@ var xc = {
|
|
|
3731
3734
|
}
|
|
3732
3735
|
w(Be), h += v.x, p = h / l;
|
|
3733
3736
|
} else
|
|
3734
|
-
w(
|
|
3737
|
+
w(nt), w(Be), v.x >= 0 ? m < F ? h += v.x : v.y >= 0 && y >= _ && (T = !1) : h += v.x, v.y >= 0 ? y < _ && (p += v.y) : p += v.y;
|
|
3735
3738
|
h < 0 && p < 0 ? (o = kt, p = -p, h = -h, u -= p, c -= h) : h < 0 ? (o = Dt, h = -h, c -= h) : p < 0 && (o = Mt, p = -p, u -= p);
|
|
3736
3739
|
break;
|
|
3737
3740
|
// Move canvas
|
|
@@ -3842,7 +3845,7 @@ var xc = {
|
|
|
3842
3845
|
var r = this.options, n = this.canvasData, a = n.width, o = n.height, l = n.naturalWidth, c = n.naturalHeight;
|
|
3843
3846
|
if (e = Number(e), e >= 0 && this.ready && !this.disabled && r.zoomable) {
|
|
3844
3847
|
var u = l * e, h = c * e;
|
|
3845
|
-
if (
|
|
3848
|
+
if (pt(this.element, dr, {
|
|
3846
3849
|
ratio: e,
|
|
3847
3850
|
oldRatio: a / l,
|
|
3848
3851
|
originalEvent: i
|
|
@@ -3854,7 +3857,7 @@ var xc = {
|
|
|
3854
3857
|
pageY: i.pageY
|
|
3855
3858
|
};
|
|
3856
3859
|
n.left -= (u - a) * ((y.pageX - m.left - n.left) / a), n.top -= (h - o) * ((y.pageY - m.top - n.top) / o);
|
|
3857
|
-
} else
|
|
3860
|
+
} else ot(t) && D(t.x) && D(t.y) ? (n.left -= (u - a) * ((t.x - n.left) / a), n.top -= (h - o) * ((t.y - n.top) / o)) : (n.left -= (u - a) / 2, n.top -= (h - o) / 2);
|
|
3858
3861
|
n.width = u, n.height = h, this.renderCanvas(!0);
|
|
3859
3862
|
}
|
|
3860
3863
|
return this;
|
|
@@ -3940,7 +3943,7 @@ var xc = {
|
|
|
3940
3943
|
*/
|
|
3941
3944
|
setData: function(e) {
|
|
3942
3945
|
var t = this.options, i = this.imageData, r = this.canvasData, n = {};
|
|
3943
|
-
if (this.ready && !this.disabled &&
|
|
3946
|
+
if (this.ready && !this.disabled && ot(e)) {
|
|
3944
3947
|
var a = !1;
|
|
3945
3948
|
t.rotatable && D(e.rotate) && e.rotate !== i.rotate && (i.rotate = e.rotate, a = !0), t.scalable && (D(e.scaleX) && e.scaleX !== i.scaleX && (i.scaleX = e.scaleX, a = !0), D(e.scaleY) && e.scaleY !== i.scaleY && (i.scaleY = e.scaleY, a = !0)), a && this.renderCanvas(!0, !0);
|
|
3946
3949
|
var o = i.width / i.naturalWidth;
|
|
@@ -3979,7 +3982,7 @@ var xc = {
|
|
|
3979
3982
|
*/
|
|
3980
3983
|
setCanvasData: function(e) {
|
|
3981
3984
|
var t = this.canvasData, i = t.aspectRatio;
|
|
3982
|
-
return this.ready && !this.disabled &&
|
|
3985
|
+
return this.ready && !this.disabled && ot(e) && (D(e.left) && (t.left = e.left), D(e.top) && (t.top = e.top), D(e.width) ? (t.width = e.width, t.height = e.width / i) : D(e.height) && (t.height = e.height, t.width = e.height * i), this.renderCanvas(!0)), this;
|
|
3983
3986
|
},
|
|
3984
3987
|
/**
|
|
3985
3988
|
* Get the crop box position and size data.
|
|
@@ -4001,7 +4004,7 @@ var xc = {
|
|
|
4001
4004
|
*/
|
|
4002
4005
|
setCropBoxData: function(e) {
|
|
4003
4006
|
var t = this.cropBoxData, i = this.options.aspectRatio, r, n;
|
|
4004
|
-
return this.ready && this.cropped && !this.disabled &&
|
|
4007
|
+
return this.ready && this.cropped && !this.disabled && ot(e) && (D(e.left) && (t.left = e.left), D(e.top) && (t.top = e.top), D(e.width) && e.width !== t.width && (r = !0, t.width = e.width), D(e.height) && e.height !== t.height && (n = !0, t.height = e.height), i && (r ? t.height = t.width / i : n && (t.width = t.height * i)), this.renderCropBox()), this;
|
|
4005
4008
|
},
|
|
4006
4009
|
/**
|
|
4007
4010
|
* Get a canvas drawn the cropped image.
|
|
@@ -4032,7 +4035,7 @@ var xc = {
|
|
|
4032
4035
|
}), y = m.width, b = m.height;
|
|
4033
4036
|
y = Math.min(h.width, Math.max(p.width, y)), b = Math.min(h.height, Math.max(p.height, b));
|
|
4034
4037
|
var S = document.createElement("canvas"), F = S.getContext("2d");
|
|
4035
|
-
S.width =
|
|
4038
|
+
S.width = ut(y), S.height = ut(b), F.fillStyle = e.fillColor || "transparent", F.fillRect(0, 0, y, b);
|
|
4036
4039
|
var _ = e.imageSmoothingEnabled, T = _ === void 0 ? !0 : _, R = e.imageSmoothingQuality;
|
|
4037
4040
|
F.imageSmoothingEnabled = T, R && (F.imageSmoothingQuality = R);
|
|
4038
4041
|
var P = i.width, v = i.height, w = n, M = a, O, N, I, z, A, $;
|
|
@@ -4043,7 +4046,7 @@ var xc = {
|
|
|
4043
4046
|
L.push(I * K, z * K, A * K, $ * K);
|
|
4044
4047
|
}
|
|
4045
4048
|
return F.drawImage.apply(F, [i].concat(vo(L.map(function(se) {
|
|
4046
|
-
return Math.floor(
|
|
4049
|
+
return Math.floor(ut(se));
|
|
4047
4050
|
})))), S;
|
|
4048
4051
|
},
|
|
4049
4052
|
/**
|
|
@@ -4064,7 +4067,7 @@ var xc = {
|
|
|
4064
4067
|
var t = this.options, i = this.dragBox, r = this.face;
|
|
4065
4068
|
if (this.ready && !this.disabled) {
|
|
4066
4069
|
var n = e === Dr, a = t.movable && e === _o;
|
|
4067
|
-
e = n || a ? e : Fo, t.dragMode = e, Yt(i, Xt, e),
|
|
4070
|
+
e = n || a ? e : Fo, t.dragMode = e, Yt(i, Xt, e), lt(i, sr, n), lt(i, rr, a), t.cropBoxMovable || (Yt(r, Xt, e), lt(r, sr, n), lt(r, rr, a));
|
|
4068
4071
|
}
|
|
4069
4072
|
return this;
|
|
4070
4073
|
}
|
|
@@ -4073,7 +4076,7 @@ var xc = {
|
|
|
4073
4076
|
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
4074
4077
|
if (Gd(this, s), !e || !oc.test(e.tagName))
|
|
4075
4078
|
throw new Error("The first argument is required and must be an <img> or <canvas> element.");
|
|
4076
|
-
this.element = e, this.options = q({}, jn,
|
|
4079
|
+
this.element = e, this.options = q({}, jn, ot(t) && t), this.cropped = !1, this.disabled = !1, this.pointers = {}, this.ready = !1, this.reloading = !1, this.replaced = !1, this.sized = !1, this.sizing = !1, this.init();
|
|
4077
4080
|
}
|
|
4078
4081
|
return Xd(s, [{
|
|
4079
4082
|
key: "init",
|
|
@@ -4168,7 +4171,7 @@ var xc = {
|
|
|
4168
4171
|
var o = a.querySelector(".".concat(H, "-container")), l = o.querySelector(".".concat(H, "-canvas")), c = o.querySelector(".".concat(H, "-drag-box")), u = o.querySelector(".".concat(H, "-crop-box")), h = u.querySelector(".".concat(H, "-face"));
|
|
4169
4172
|
this.container = n, this.cropper = o, this.canvas = l, this.dragBox = c, this.cropBox = u, this.viewBox = o.querySelector(".".concat(H, "-view-box")), this.face = h, l.appendChild(r), X(t, te), n.insertBefore(o, t.nextSibling), Se(r, Un), this.initPreview(), this.bind(), i.initialAspectRatio = Math.max(0, i.initialAspectRatio) || NaN, i.aspectRatio = Math.max(0, i.aspectRatio) || NaN, i.viewMode = Math.max(0, Math.min(3, Math.round(i.viewMode))) || 0, X(u, te), i.guides || X(u.getElementsByClassName("".concat(H, "-dashed")), te), i.center || X(u.getElementsByClassName("".concat(H, "-center")), te), i.background && X(o, "".concat(H, "-bg")), i.highlight || X(h, ec), i.cropBoxMovable && (X(h, rr), Yt(h, Xt, Ar)), i.cropBoxResizable || (X(u.getElementsByClassName("".concat(H, "-line")), te), X(u.getElementsByClassName("".concat(H, "-point")), te)), this.render(), this.ready = !0, this.setDragMode(i.dragMode), i.autoCrop && this.crop(), this.setData(i.data), ee(i.ready) && re(t, Hn, i.ready, {
|
|
4170
4173
|
once: !0
|
|
4171
|
-
}),
|
|
4174
|
+
}), pt(t, Hn);
|
|
4172
4175
|
}
|
|
4173
4176
|
}
|
|
4174
4177
|
}, {
|
|
@@ -4201,7 +4204,7 @@ var xc = {
|
|
|
4201
4204
|
}, {
|
|
4202
4205
|
key: "setDefaults",
|
|
4203
4206
|
value: function(t) {
|
|
4204
|
-
q(jn,
|
|
4207
|
+
q(jn, ot(t) && t);
|
|
4205
4208
|
}
|
|
4206
4209
|
}]);
|
|
4207
4210
|
})();
|
|
@@ -4781,7 +4784,7 @@ class No extends Ne {
|
|
|
4781
4784
|
this.selectVideoStreamSource().then((r) => {
|
|
4782
4785
|
if (r === !1)
|
|
4783
4786
|
throw new Error("No video stream available");
|
|
4784
|
-
i && MediaRecorder.isTypeSupported(i) &&
|
|
4787
|
+
i && MediaRecorder.isTypeSupported(i) && ht(i) && (t.mimeType = i);
|
|
4785
4788
|
const n = [r.getVideoTracks()[0]];
|
|
4786
4789
|
this.audioStream && n.push(this.audioStream.getAudioTracks()[0]), this.outputStream = new MediaStream(n), this.recorder = new MediaRecorder(this.outputStream, t), this.recorder.addEventListener("dataavailable", (a) => {
|
|
4787
4790
|
this.recordingChunks.push(a.data);
|
|
@@ -4859,7 +4862,7 @@ class No extends Ne {
|
|
|
4859
4862
|
}), this.captureActive = !1;
|
|
4860
4863
|
}
|
|
4861
4864
|
getVideo() {
|
|
4862
|
-
const t = this.recordingChunks[0].type, i =
|
|
4865
|
+
const t = this.recordingChunks[0].type, i = ht(t);
|
|
4863
4866
|
if (!i)
|
|
4864
4867
|
return Promise.reject(new Error(`Could not retrieve recording: Unsupported media type "${t}"`));
|
|
4865
4868
|
const r = `screencap-${Date.now()}.${i}`, n = new Blob(this.recordingChunks, { type: t }), a = {
|
|
@@ -4903,7 +4906,7 @@ class No extends Ne {
|
|
|
4903
4906
|
u(new Error("Failed to create screenshot blob"));
|
|
4904
4907
|
return;
|
|
4905
4908
|
}
|
|
4906
|
-
const p =
|
|
4909
|
+
const p = ht(o) || "png", m = {
|
|
4907
4910
|
source: this.id,
|
|
4908
4911
|
name: `Screenshot ${(/* @__PURE__ */ new Date()).toISOString()}.${p}`,
|
|
4909
4912
|
type: o,
|
|
@@ -5941,7 +5944,7 @@ class Hh {
|
|
|
5941
5944
|
return t.close && t.close(), o;
|
|
5942
5945
|
}
|
|
5943
5946
|
}
|
|
5944
|
-
class
|
|
5947
|
+
class dt {
|
|
5945
5948
|
static findPosition(e, t) {
|
|
5946
5949
|
let i = e.getUint16(t + 2) + 2, r = typeof this.headerLength == "function" ? this.headerLength(e, t, i) : this.headerLength, n = t + r, a = i - r;
|
|
5947
5950
|
return { offset: t, length: i, headerLength: r, start: n, size: a, end: n + a };
|
|
@@ -5980,7 +5983,7 @@ class ot {
|
|
|
5980
5983
|
e[t] ? Object.assign(e[t], i) : e[t] = i;
|
|
5981
5984
|
}
|
|
5982
5985
|
}
|
|
5983
|
-
U(
|
|
5986
|
+
U(dt, "headerLength", 4), U(dt, "type", void 0), U(dt, "multiSegment", !1), U(dt, "canHandle", (() => !1));
|
|
5984
5987
|
function qh(s) {
|
|
5985
5988
|
return s === 192 || s === 194 || s === 196 || s === 219 || s === 221 || s === 218 || s === 254;
|
|
5986
5989
|
}
|
|
@@ -6057,7 +6060,7 @@ class ha extends class {
|
|
|
6057
6060
|
for (; e < t; e++) if (c.getUint8(e) === 255) {
|
|
6058
6061
|
if (i = c.getUint8(e + 1), Vh(i)) {
|
|
6059
6062
|
if (r = c.getUint16(e + 2), n = Wh(c, e, r), n && h.has(n) && (a = ce.get(n), o = a.findPosition(c, e), l = m[n], o.type = n, this.appSegments.push(o), !u && (a.multiSegment && l.multiSegment ? (this.unfinishedMultiSegment = o.chunkNumber < o.chunkCount, this.unfinishedMultiSegment || p.delete(n)) : p.delete(n), p.size === 0))) break;
|
|
6060
|
-
m.recordUnknownSegments && (o =
|
|
6063
|
+
m.recordUnknownSegments && (o = dt.findPosition(c, e), o.marker = i, this.unknownSegments.push(o)), e += r + 1;
|
|
6061
6064
|
} else if (qh(i)) {
|
|
6062
6065
|
if (r = c.getUint16(e + 2), i === 218 && m.stopAfterSos !== !1) return;
|
|
6063
6066
|
m.recordJpegSegments && this.jpegSegments.push({ offset: e, length: r, marker: i }), e += r + 1;
|
|
@@ -6087,7 +6090,7 @@ class ha extends class {
|
|
|
6087
6090
|
}
|
|
6088
6091
|
U(ha, "type", "jpeg"), $o.set("jpeg", ha);
|
|
6089
6092
|
const jh = [void 0, 1, 1, 2, 4, 8, 1, 1, 2, 4, 8, 4, 8, 4];
|
|
6090
|
-
class Gh extends
|
|
6093
|
+
class Gh extends dt {
|
|
6091
6094
|
parseHeader() {
|
|
6092
6095
|
var e = this.chunk.getUint16();
|
|
6093
6096
|
e === 18761 ? this.le = !0 : e === 19789 && (this.le = !1), this.chunk.le = this.le, this.headerParsed = !0;
|
|
@@ -6833,7 +6836,7 @@ function wu(s) {
|
|
|
6833
6836
|
y.forEach((w) => {
|
|
6834
6837
|
S[w.id] = m.meta[w.id] ?? "";
|
|
6835
6838
|
});
|
|
6836
|
-
const [F, _] =
|
|
6839
|
+
const [F, _] = Pt(S), T = Ii((w) => {
|
|
6837
6840
|
w.preventDefault(), r(F, t);
|
|
6838
6841
|
}, [r, F, t]), R = (w, M) => {
|
|
6839
6842
|
_({
|
|
@@ -6842,7 +6845,7 @@ function wu(s) {
|
|
|
6842
6845
|
});
|
|
6843
6846
|
}, P = () => {
|
|
6844
6847
|
i(!1);
|
|
6845
|
-
}, [v] =
|
|
6848
|
+
}, [v] = Pt(() => {
|
|
6846
6849
|
const w = document.createElement("form");
|
|
6847
6850
|
return w.setAttribute("tabindex", "-1"), w.id = Qi(), w;
|
|
6848
6851
|
});
|
|
@@ -7303,17 +7306,17 @@ function Xu(s) {
|
|
|
7303
7306
|
let { allowNewUpload: o } = s;
|
|
7304
7307
|
return o && r && (o = s.totalFileCount < s.maxNumberOfFiles), d("div", { className: "uppy-DashboardContent-bar", children: [!t && !i ? d("button", { className: "uppy-DashboardContent-back", type: "button", onClick: () => a.cancelAll(), children: e("cancel") }) : d("div", {}), d("div", { className: "uppy-DashboardContent-title", children: d(Gu, { ...s }) }), o ? d("button", { className: "uppy-DashboardContent-addMore", type: "button", "aria-label": e("addMoreFiles"), title: e("addMoreFiles"), onClick: () => n(!0), children: [d("svg", { "aria-hidden": "true", focusable: "false", className: "uppy-c-icon", width: "15", height: "15", viewBox: "0 0 15 15", children: d("path", { d: "M8 6.5h6a.5.5 0 0 1 .5.5v.5a.5.5 0 0 1-.5.5H8v6a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V8h-6a.5.5 0 0 1-.5-.5V7a.5.5 0 0 1 .5-.5h6v-6A.5.5 0 0 1 7 0h.5a.5.5 0 0 1 .5.5v6z" }) }), d("span", { className: "uppy-DashboardContent-addMoreCaption", children: e("addMore") })] }) : d("div", {})] });
|
|
7305
7308
|
}
|
|
7306
|
-
const
|
|
7309
|
+
const at = "uppy-transition-slideDownUp", ya = 250;
|
|
7307
7310
|
function Ei({ children: s }) {
|
|
7308
|
-
const [e, t] =
|
|
7309
|
-
r(`${
|
|
7310
|
-
r(`${
|
|
7311
|
+
const [e, t] = Pt(null), [i, r] = Pt(""), n = qt(), a = qt(), o = qt(), l = Ii(() => {
|
|
7312
|
+
r(`${at}-enter`), cancelAnimationFrame(o.current), clearTimeout(a.current), a.current = void 0, o.current = requestAnimationFrame(() => {
|
|
7313
|
+
r(`${at}-enter ${at}-enter-active`), n.current = setTimeout(() => {
|
|
7311
7314
|
r("");
|
|
7312
7315
|
}, ya);
|
|
7313
7316
|
});
|
|
7314
7317
|
}, []), c = Ii(() => {
|
|
7315
|
-
r(`${
|
|
7316
|
-
r(`${
|
|
7318
|
+
r(`${at}-leave`), cancelAnimationFrame(o.current), clearTimeout(n.current), n.current = void 0, o.current = requestAnimationFrame(() => {
|
|
7319
|
+
r(`${at}-leave ${at}-leave-active`), a.current = setTimeout(() => {
|
|
7317
7320
|
t(null), r("");
|
|
7318
7321
|
}, ya);
|
|
7319
7322
|
});
|
|
@@ -7472,7 +7475,7 @@ function lp({ newFiles: s, allowNewUpload: e, isUploadInProgress: t, isAllPaused
|
|
|
7472
7475
|
return !1;
|
|
7473
7476
|
}
|
|
7474
7477
|
}
|
|
7475
|
-
const L = A(), K = L ?? 100, se = !n && s && (!t && !i || u) && e && !a, ie = !l && h !== op && h !== xi, ne = r && !o && h === Pi,
|
|
7478
|
+
const L = A(), K = L ?? 100, se = !n && s && (!t && !i || u) && e && !a, ie = !l && h !== op && h !== xi, ne = r && !o && h === Pi, xt = n && !v && !c, Rt = F && h === xi, ci = pe("uppy-StatusBar-progress", {
|
|
7476
7479
|
"is-indeterminate": $()
|
|
7477
7480
|
}), hi = pe("uppy-StatusBar", `is-${h}`, { "has-ghosts": S }), ui = (() => {
|
|
7478
7481
|
switch (h) {
|
|
@@ -7489,7 +7492,7 @@ function lp({ newFiles: s, allowNewUpload: e, isUploadInProgress: t, isAllPaused
|
|
|
7489
7492
|
return null;
|
|
7490
7493
|
}
|
|
7491
7494
|
})();
|
|
7492
|
-
return !(se ||
|
|
7495
|
+
return !(se || xt || ne || ie || Rt) && !ui || h === xi && b ? null : d("div", { className: hi, children: [d("div", { className: ci, style: { width: `${K}%` }, role: "progressbar", "aria-label": `${K}%`, "aria-valuetext": `${K}%`, "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": L }), ui, d("div", { className: "uppy-StatusBar-actions", children: [se ? d(Ku, { newFiles: s, isUploadStarted: _, recoveredState: u, i18n: T, isSomeGhost: S, startUpload: R, uploadState: h }) : null, xt ? d(Ju, { i18n: T, uppy: P }) : null, ne ? d(Zu, { isAllPaused: i, i18n: T, isAllComplete: v, resumableUploads: r, uppy: P }) : null, ie ? d(Qu, { i18n: T, uppy: P }) : null, Rt ? d(ep, { i18n: T, doneButtonHandler: F }) : null] })] });
|
|
7493
7496
|
}
|
|
7494
7497
|
const dp = 2e3, cp = 2e3;
|
|
7495
7498
|
function hp(s, e, t, i) {
|
|
@@ -7852,14 +7855,14 @@ const wp = {
|
|
|
7852
7855
|
width: 750,
|
|
7853
7856
|
height: 550
|
|
7854
7857
|
};
|
|
7855
|
-
var zs,
|
|
7858
|
+
var zs, _t, Qe, ai, Ft, Gi, Xi, Yi, Ze, Ki, Ji, Tt, Ue, br, wr;
|
|
7856
7859
|
let il = (zs = class extends Ne {
|
|
7857
7860
|
constructor(t, i) {
|
|
7858
7861
|
var n;
|
|
7859
7862
|
const r = (i == null ? void 0 : i.autoOpen) ?? null;
|
|
7860
7863
|
super(t, { ...wp, ...i, autoOpen: r });
|
|
7861
7864
|
E(this, Ue);
|
|
7862
|
-
E(this,
|
|
7865
|
+
E(this, _t);
|
|
7863
7866
|
f(this, "modalName", `uppy-Dashboard-${Qi()}`);
|
|
7864
7867
|
f(this, "superFocus", mp());
|
|
7865
7868
|
f(this, "ifFocusedOnUppyRecently", !1);
|
|
@@ -8062,10 +8065,10 @@ let il = (zs = class extends Ne {
|
|
|
8062
8065
|
"textarea:not([disabled])",
|
|
8063
8066
|
"button:not([disabled])",
|
|
8064
8067
|
'[role="button"]:not([disabled])'
|
|
8065
|
-
], r = g(this,
|
|
8068
|
+
], r = g(this, _t) ?? et(this.el.querySelectorAll(i)).filter((n) => !n.classList.contains("uppy-Dashboard-close"));
|
|
8066
8069
|
for (const n of r)
|
|
8067
8070
|
n.tagName === "A" ? n.setAttribute("aria-disabled", t) : n.disabled = t;
|
|
8068
|
-
t ? k(this,
|
|
8071
|
+
t ? k(this, _t, r) : k(this, _t, null), this.dashboardIsDisabled = t;
|
|
8069
8072
|
});
|
|
8070
8073
|
f(this, "updateBrowserHistory", () => {
|
|
8071
8074
|
var t;
|
|
@@ -8188,11 +8191,11 @@ let il = (zs = class extends Ne {
|
|
|
8188
8191
|
const t = Xr(this.opts.trigger);
|
|
8189
8192
|
t ? t.forEach((i) => i.addEventListener("click", this.openModal)) : this.uppy.log("Dashboard modal trigger not found. Make sure `trigger` is set in Dashboard options, unless you are planning to call `dashboard.openModal()` method yourself", "warning");
|
|
8190
8193
|
}
|
|
8191
|
-
this.startListeningToResize(), document.addEventListener("paste", this.handlePasteOnBody), this.uppy.on("plugin-added", g(this,
|
|
8194
|
+
this.startListeningToResize(), document.addEventListener("paste", this.handlePasteOnBody), this.uppy.on("plugin-added", g(this, Tt)), this.uppy.on("plugin-remove", this.removeTarget), this.uppy.on("file-added", this.hideAllPanels), this.uppy.on("dashboard:modal-closed", this.hideAllPanels), this.uppy.on("complete", this.handleComplete), this.uppy.on("files-added", g(this, Qe)), this.uppy.on("file-removed", g(this, Qe)), document.addEventListener("focus", this.recordIfFocusedOnUppyRecently, !0), document.addEventListener("click", this.recordIfFocusedOnUppyRecently, !0), this.opts.inline && this.el.addEventListener("keydown", this.handleKeyDownInInline), this.opts.autoOpen && this.uppy.on("files-added", g(this, ai));
|
|
8192
8195
|
});
|
|
8193
8196
|
f(this, "removeEvents", () => {
|
|
8194
8197
|
const t = Xr(this.opts.trigger);
|
|
8195
|
-
!this.opts.inline && t && t.forEach((i) => i.removeEventListener("click", this.openModal)), this.stopListeningToResize(), document.removeEventListener("paste", this.handlePasteOnBody), window.removeEventListener("popstate", this.handlePopState, !1), this.uppy.off("plugin-added", g(this,
|
|
8198
|
+
!this.opts.inline && t && t.forEach((i) => i.removeEventListener("click", this.openModal)), this.stopListeningToResize(), document.removeEventListener("paste", this.handlePasteOnBody), window.removeEventListener("popstate", this.handlePopState, !1), this.uppy.off("plugin-added", g(this, Tt)), this.uppy.off("plugin-remove", this.removeTarget), this.uppy.off("file-added", this.hideAllPanels), this.uppy.off("dashboard:modal-closed", this.hideAllPanels), this.uppy.off("complete", this.handleComplete), this.uppy.off("files-added", g(this, Qe)), this.uppy.off("file-removed", g(this, Qe)), document.removeEventListener("focus", this.recordIfFocusedOnUppyRecently), document.removeEventListener("click", this.recordIfFocusedOnUppyRecently), this.opts.inline && this.el.removeEventListener("keydown", this.handleKeyDownInInline), this.opts.autoOpen && this.uppy.off("files-added", g(this, ai));
|
|
8196
8199
|
});
|
|
8197
8200
|
f(this, "superFocusOnEachUpdate", () => {
|
|
8198
8201
|
const t = this.el.contains(document.activeElement), i = document.activeElement === document.body || document.activeElement === null, r = this.uppy.getState().info.length === 0, n = !this.opts.inline;
|
|
@@ -8221,7 +8224,7 @@ let il = (zs = class extends Ne {
|
|
|
8221
8224
|
f(this, "saveFileCard", (t, i) => {
|
|
8222
8225
|
this.uppy.setFileMeta(i, t), this.toggleFileCard(!1, i);
|
|
8223
8226
|
});
|
|
8224
|
-
E(this,
|
|
8227
|
+
E(this, Ft, (t) => {
|
|
8225
8228
|
const i = this.uppy.getPlugin(t.id);
|
|
8226
8229
|
return {
|
|
8227
8230
|
...t,
|
|
@@ -8233,9 +8236,9 @@ let il = (zs = class extends Ne {
|
|
|
8233
8236
|
const i = this.uppy.getPlugin(t.id);
|
|
8234
8237
|
return typeof i.isSupported != "function" ? !0 : i.isSupported();
|
|
8235
8238
|
});
|
|
8236
|
-
E(this, Xi, (t) => t.filter((i) => i.type === "acquirer" && g(this, Gi).call(this, i)).map(g(this,
|
|
8237
|
-
E(this, Yi, (t) => t.filter((i) => i.type === "progressindicator").map(g(this,
|
|
8238
|
-
E(this, Ze, (t) => t.filter((i) => i.type === "editor").map(g(this,
|
|
8239
|
+
E(this, Xi, (t) => t.filter((i) => i.type === "acquirer" && g(this, Gi).call(this, i)).map(g(this, Ft)));
|
|
8240
|
+
E(this, Yi, (t) => t.filter((i) => i.type === "progressindicator").map(g(this, Ft)));
|
|
8241
|
+
E(this, Ze, (t) => t.filter((i) => i.type === "editor").map(g(this, Ft)));
|
|
8239
8242
|
f(this, "render", (t) => {
|
|
8240
8243
|
const i = this.getPluginState(), { files: r, capabilities: n, allowNewUpload: a } = t, { newFiles: o, uploadStartedFiles: l, completeFiles: c, erroredFiles: u, inProgressFiles: h, inProgressNotPausedFiles: p, processingFiles: m, isUploadStarted: y, isAllComplete: b, isAllPaused: S } = this.uppy.getObjectOfFilesPerState(), F = g(this, Xi).call(this, i.targets), _ = g(this, Yi).call(this, i.targets), T = g(this, Ze).call(this, i.targets);
|
|
8241
8244
|
let R;
|
|
@@ -8342,9 +8345,9 @@ let il = (zs = class extends Ne {
|
|
|
8342
8345
|
});
|
|
8343
8346
|
});
|
|
8344
8347
|
E(this, Ji, () => {
|
|
8345
|
-
this.uppy.iteratePlugins(g(this,
|
|
8348
|
+
this.uppy.iteratePlugins(g(this, Tt));
|
|
8346
8349
|
});
|
|
8347
|
-
E(this,
|
|
8350
|
+
E(this, Tt, (t) => {
|
|
8348
8351
|
var r;
|
|
8349
8352
|
const i = ["acquirer", "editor"];
|
|
8350
8353
|
t && !((r = t.opts) != null && r.target) && i.includes(t.type) && (this.getPluginState().targets.some((a) => t.id === a.id) || t.mount(this, t));
|
|
@@ -8397,7 +8400,7 @@ let il = (zs = class extends Ne {
|
|
|
8397
8400
|
var i;
|
|
8398
8401
|
super.setOptions(t), (i = this.uppy.getPlugin(C(this, Ue, wr).call(this))) == null || i.setOptions(C(this, Ue, br).call(this));
|
|
8399
8402
|
}
|
|
8400
|
-
},
|
|
8403
|
+
}, _t = new WeakMap(), Qe = new WeakMap(), ai = new WeakMap(), Ft = new WeakMap(), Gi = new WeakMap(), Xi = new WeakMap(), Yi = new WeakMap(), Ze = new WeakMap(), Ki = new WeakMap(), Ji = new WeakMap(), Tt = new WeakMap(), Ue = new WeakSet(), br = function() {
|
|
8401
8404
|
const { thumbnailWidth: t, thumbnailHeight: i, thumbnailType: r, waitForThumbnailsBeforeUpload: n } = this.opts;
|
|
8402
8405
|
return {
|
|
8403
8406
|
thumbnailWidth: t,
|
|
@@ -8431,7 +8434,7 @@ const Sp = Sr({
|
|
|
8431
8434
|
}
|
|
8432
8435
|
},
|
|
8433
8436
|
setup(s) {
|
|
8434
|
-
const e =
|
|
8437
|
+
const e = ct(), t = ct(), i = ct(s.props);
|
|
8435
8438
|
return sl(() => {
|
|
8436
8439
|
const { uppy: n } = s, a = {
|
|
8437
8440
|
id: "Dashboard",
|
|
@@ -8460,7 +8463,7 @@ const Sp = Sr({
|
|
|
8460
8463
|
}
|
|
8461
8464
|
},
|
|
8462
8465
|
setup(s) {
|
|
8463
|
-
const e =
|
|
8466
|
+
const e = ct(), t = ct(), i = ct(s.props);
|
|
8464
8467
|
return sl(() => {
|
|
8465
8468
|
const { uppy: n } = s, a = {
|
|
8466
8469
|
id: "DashboardModal",
|
|
@@ -8695,7 +8698,7 @@ class nl extends Ne {
|
|
|
8695
8698
|
const { restrictions: i } = this.uppy.opts;
|
|
8696
8699
|
let r = [];
|
|
8697
8700
|
this.opts.preferredVideoMimeType ? r = [this.opts.preferredVideoMimeType] : i.allowedFileTypes && (r = i.allowedFileTypes.map(Pa).filter(Bp));
|
|
8698
|
-
const n = (o) => MediaRecorder.isTypeSupported(o) &&
|
|
8701
|
+
const n = (o) => MediaRecorder.isTypeSupported(o) && ht(o), a = r.filter(n);
|
|
8699
8702
|
a.length > 0 && (t.mimeType = a[0]);
|
|
8700
8703
|
}
|
|
8701
8704
|
return t;
|
|
@@ -8809,7 +8812,7 @@ class nl extends Ne {
|
|
|
8809
8812
|
const { restrictions: o } = this.uppy.opts;
|
|
8810
8813
|
let l = [];
|
|
8811
8814
|
this.opts.preferredImageMimeType ? l = [this.opts.preferredImageMimeType] : o.allowedFileTypes && (l = o.allowedFileTypes.map(Pa).filter(Lp));
|
|
8812
|
-
const c = l[0] || "image/jpeg", u =
|
|
8815
|
+
const c = l[0] || "image/jpeg", u = ht(c) || "jpg", h = `cam-${Date.now()}.${u}`;
|
|
8813
8816
|
return bl(n, c).then((p) => ({
|
|
8814
8817
|
source: this.id,
|
|
8815
8818
|
name: h,
|
|
@@ -8821,7 +8824,7 @@ class nl extends Ne {
|
|
|
8821
8824
|
const t = this.recordingChunks.find((o) => {
|
|
8822
8825
|
var l;
|
|
8823
8826
|
return ((l = o.type) == null ? void 0 : l.length) > 0;
|
|
8824
|
-
}).type, i =
|
|
8827
|
+
}).type, i = ht(t);
|
|
8825
8828
|
if (!i)
|
|
8826
8829
|
return Promise.reject(new Error(`Could not retrieve recording: Unsupported media type "${t}"`));
|
|
8827
8830
|
const r = `webcam-${Date.now()}.${i}`, n = new Blob(this.recordingChunks, { type: t }), a = {
|
|
@@ -8911,7 +8914,7 @@ const jp = {
|
|
|
8911
8914
|
withCredentials: !1,
|
|
8912
8915
|
responseType: ""
|
|
8913
8916
|
};
|
|
8914
|
-
var
|
|
8917
|
+
var Ct, Fe, ol, ll, dl, cl, oi;
|
|
8915
8918
|
class al extends ro {
|
|
8916
8919
|
constructor(t, i) {
|
|
8917
8920
|
super(t, {
|
|
@@ -8920,7 +8923,7 @@ class al extends ro {
|
|
|
8920
8923
|
...i
|
|
8921
8924
|
});
|
|
8922
8925
|
E(this, Fe);
|
|
8923
|
-
E(this,
|
|
8926
|
+
E(this, Ct);
|
|
8924
8927
|
f(this, "requests");
|
|
8925
8928
|
f(this, "uploaderEvents");
|
|
8926
8929
|
E(this, oi, async (t) => {
|
|
@@ -8945,7 +8948,7 @@ class al extends ro {
|
|
|
8945
8948
|
throw new Error("`opts.headers` can not be a function when the `bundle: true` option is set.");
|
|
8946
8949
|
if ((i == null ? void 0 : i.allowedMetaFields) === void 0 && "metaFields" in this.opts)
|
|
8947
8950
|
throw new Error("The `metaFields` option has been renamed to `allowedMetaFields`.");
|
|
8948
|
-
this.uploaderEvents = /* @__PURE__ */ Object.create(null), k(this,
|
|
8951
|
+
this.uploaderEvents = /* @__PURE__ */ Object.create(null), k(this, Ct, (r) => async (n, a) => {
|
|
8949
8952
|
var o, l;
|
|
8950
8953
|
try {
|
|
8951
8954
|
const c = await Tl(n, {
|
|
@@ -9052,9 +9055,9 @@ class al extends ro {
|
|
|
9052
9055
|
this.uppy.removeUploader(g(this, oi));
|
|
9053
9056
|
}
|
|
9054
9057
|
}
|
|
9055
|
-
|
|
9058
|
+
Ct = new WeakMap(), Fe = new WeakSet(), ol = async function(t) {
|
|
9056
9059
|
const i = new od(this.uppy), r = new AbortController(), n = this.requests.wrapPromiseFunction(async () => {
|
|
9057
|
-
const a = this.getOptions(t), o = g(this,
|
|
9060
|
+
const a = this.getOptions(t), o = g(this, Ct).call(this, [t]), l = a.formData ? this.createFormDataUpload(t, a) : t.data, c = typeof a.endpoint == "string" ? a.endpoint : await a.endpoint(t);
|
|
9058
9061
|
return o(c, {
|
|
9059
9062
|
...a,
|
|
9060
9063
|
body: l,
|
|
@@ -9074,7 +9077,7 @@ Ft = new WeakMap(), Fe = new WeakSet(), ol = async function(t) {
|
|
|
9074
9077
|
}
|
|
9075
9078
|
}, ll = async function(t) {
|
|
9076
9079
|
const i = new AbortController(), r = this.requests.wrapPromiseFunction(async () => {
|
|
9077
|
-
const a = this.uppy.getState().xhrUpload ?? {}, o = g(this,
|
|
9080
|
+
const a = this.uppy.getState().xhrUpload ?? {}, o = g(this, Ct).call(this, t), l = this.createBundledUpload(t, {
|
|
9078
9081
|
...this.opts,
|
|
9079
9082
|
...a
|
|
9080
9083
|
}), c = typeof this.opts.endpoint == "string" ? this.opts.endpoint : await this.opts.endpoint(t);
|
|
@@ -9308,7 +9311,7 @@ const Gp = /* @__PURE__ */ Sr({
|
|
|
9308
9311
|
for (const [i, r] of e)
|
|
9309
9312
|
t[i] = r;
|
|
9310
9313
|
return t;
|
|
9311
|
-
}, Yp = /* @__PURE__ */ Xp(Gp, [["__scopeId", "data-v-
|
|
9314
|
+
}, Yp = /* @__PURE__ */ Xp(Gp, [["__scopeId", "data-v-54865fb8"]]), tf = gl(Yp);
|
|
9312
9315
|
export {
|
|
9313
9316
|
tf as IkImageUploadEditor,
|
|
9314
9317
|
tf as default
|