@jt-home/mfe-components 1.0.50 → 1.0.52
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/JtAttachmentPreview/index.cjs +1 -1
- package/dist/JtAttachmentPreview/index.mjs +1 -1
- package/dist/index-BDvJpmrM.cjs +1 -0
- package/dist/{index-CTj7lrC9.js → index-CJ-FBMPc.js} +823 -437
- package/dist/index.cjs +48 -2
- package/dist/index.mjs +23517 -2677
- package/dist/style.css +1 -1
- package/package.json +99 -100
- package/readme.md +694 -694
- package/dist/index-CgZdzYF1.cjs +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { ElIcon as
|
|
3
|
-
const
|
|
1
|
+
import { ref as B, isRef as ue, watch as $, defineComponent as s, openBlock as d, createElementBlock as p, createElementVNode as l, onBeforeUnmount as Y, h as r, computed as E, onMounted as ee, nextTick as _e, render as D } from "vue";
|
|
2
|
+
import { ElIcon as O } from "element-plus";
|
|
3
|
+
const ge = {
|
|
4
4
|
common: {
|
|
5
5
|
"PDF_js无法读取该文件,已切换为浏览器内置预览": "PDF.js 无法读取该文件,已切换为浏览器内置预览",
|
|
6
6
|
PDF加载中___: "PDF 加载中...",
|
|
@@ -56,7 +56,7 @@ const be = {
|
|
|
56
56
|
附件预览: "附件预览",
|
|
57
57
|
附件预览未初始化: "附件预览未初始化"
|
|
58
58
|
}
|
|
59
|
-
},
|
|
59
|
+
}, be = {
|
|
60
60
|
common: {
|
|
61
61
|
"PDF_js无法读取该文件,已切换为浏览器内置预览": "PDF.js cannot read the file. It has been switched to browser built-in preview",
|
|
62
62
|
PDF加载中___: "PDF loading...",
|
|
@@ -112,7 +112,7 @@ const be = {
|
|
|
112
112
|
附件预览: "Attachment Preview",
|
|
113
113
|
附件预览未初始化: "Attachment preview not initialized"
|
|
114
114
|
}
|
|
115
|
-
},
|
|
115
|
+
}, ye = {
|
|
116
116
|
common: {
|
|
117
117
|
"PDF_js无法读取该文件,已切换为浏览器内置预览": "PDF.js ไม่สามารถอ่านไฟล์ได้ เปลี่ยนเป็นตัวอย่างในตัวเบราว์เซอร์",
|
|
118
118
|
PDF加载中___: "กําลังโหลดไฟล์ PDF ...",
|
|
@@ -168,7 +168,7 @@ const be = {
|
|
|
168
168
|
附件预览: "เอกสารแนบตัวอย่าง",
|
|
169
169
|
附件预览未初始化: "การแสดงตัวอย่างของสิ่งที่แนบมาไม่ได้เริ่มต้น"
|
|
170
170
|
}
|
|
171
|
-
},
|
|
171
|
+
}, xe = {
|
|
172
172
|
common: {
|
|
173
173
|
"PDF_js无法读取该文件,已切换为浏览器内置预览": "PDF.js không thể đọc tập tin, đã chuyển sang trình duyệt built-in xem trước",
|
|
174
174
|
PDF加载中___: "Đang tải PDF...",
|
|
@@ -224,7 +224,7 @@ const be = {
|
|
|
224
224
|
附件预览: "Xem trước tệp đính kèm",
|
|
225
225
|
附件预览未初始化: "Bản xem trước đính kèm không được khởi tạo"
|
|
226
226
|
}
|
|
227
|
-
},
|
|
227
|
+
}, ke = {
|
|
228
228
|
common: {
|
|
229
229
|
"PDF_js无法读取该文件,已切换为浏览器内置预览": "PDF.js no puede leer este archivo, cambió a la vista previa integrada del navegador",
|
|
230
230
|
PDF加载中___: "Carga de PDF...",
|
|
@@ -280,7 +280,7 @@ const be = {
|
|
|
280
280
|
附件预览: "Anexo Preview",
|
|
281
281
|
附件预览未初始化: "Anexo Preview no inicializado"
|
|
282
282
|
}
|
|
283
|
-
},
|
|
283
|
+
}, Le = {
|
|
284
284
|
common: {
|
|
285
285
|
"PDF_js无法读取该文件,已切换为浏览器内置预览": "PDF.js tidak dapat membaca file ini, telah beralih ke pratinjau built-in browser",
|
|
286
286
|
PDF加载中___: "PDF sedang memuat...",
|
|
@@ -392,7 +392,7 @@ const be = {
|
|
|
392
392
|
附件预览: "Anhang Vorschau",
|
|
393
393
|
附件预览未初始化: "Anlage Vorschau nicht initialisiert"
|
|
394
394
|
}
|
|
395
|
-
},
|
|
395
|
+
}, Pe = {
|
|
396
396
|
common: {
|
|
397
397
|
"PDF_js无法读取该文件,已切换为浏览器内置预览": "O PDF.js não pode ler o arquivo, mudou para a visualização integrada do navegador",
|
|
398
398
|
PDF加载中___: "PDF Carregando...",
|
|
@@ -448,16 +448,16 @@ const be = {
|
|
|
448
448
|
附件预览: "Anexo Preview",
|
|
449
449
|
附件预览未初始化: "Anexo Preview não inicializado"
|
|
450
450
|
}
|
|
451
|
-
},
|
|
452
|
-
"zh-cn":
|
|
453
|
-
en:
|
|
454
|
-
th:
|
|
455
|
-
vi:
|
|
456
|
-
es:
|
|
457
|
-
id:
|
|
451
|
+
}, De = {}, Ce = {
|
|
452
|
+
"zh-cn": ge,
|
|
453
|
+
en: be,
|
|
454
|
+
th: ye,
|
|
455
|
+
vi: xe,
|
|
456
|
+
es: ke,
|
|
457
|
+
id: Le,
|
|
458
458
|
de: Ae,
|
|
459
|
-
pt:
|
|
460
|
-
km:
|
|
459
|
+
pt: Pe,
|
|
460
|
+
km: De
|
|
461
461
|
}, U = [
|
|
462
462
|
{ key: "zh", label: "简体中文", displayLabel: "简体中文", elementPlusLocale: "zh-cn" },
|
|
463
463
|
{ key: "en", label: "英语", displayLabel: "English", elementPlusLocale: "en" },
|
|
@@ -472,25 +472,39 @@ const be = {
|
|
|
472
472
|
Object.freeze(
|
|
473
473
|
Object.fromEntries(U.map((e) => [e.key, e.elementPlusLocale]))
|
|
474
474
|
);
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
475
|
+
const je = Object.freeze({
|
|
476
|
+
zh: "ZHS",
|
|
477
|
+
en: "ENG",
|
|
478
|
+
id: "IDN",
|
|
479
|
+
pt: "POR",
|
|
480
|
+
th: "THA",
|
|
481
|
+
vi: "VIE",
|
|
482
|
+
es: "ESP",
|
|
483
|
+
de: "GER",
|
|
484
|
+
km: "CAM"
|
|
485
|
+
});
|
|
486
|
+
Object.freeze(
|
|
487
|
+
Object.fromEntries(Object.entries(je).map(([e, t]) => [t, e]))
|
|
488
|
+
);
|
|
489
|
+
function Be(e, t = {}) {
|
|
490
|
+
const a = t.fallback ?? "zh", o = Ee(t.languageList), n = e.toLowerCase();
|
|
491
|
+
return o.find((i) => i.key === n) ?? o.find((i) => i.key === a) ?? U[0];
|
|
478
492
|
}
|
|
479
|
-
function
|
|
480
|
-
return
|
|
493
|
+
function Me(e, t = {}) {
|
|
494
|
+
return Be(e, t).elementPlusLocale;
|
|
481
495
|
}
|
|
482
|
-
function
|
|
496
|
+
function Ee(e) {
|
|
483
497
|
return e != null && e.length ? e.map((t) => {
|
|
484
|
-
const a = t.key ?? t.value,
|
|
498
|
+
const a = t.key ?? t.value, o = U.find((n) => n.key === a) ?? U[0];
|
|
485
499
|
return {
|
|
486
|
-
...
|
|
500
|
+
...o,
|
|
487
501
|
...t,
|
|
488
|
-
key:
|
|
489
|
-
elementPlusLocale: t.elementPlusLocale ??
|
|
502
|
+
key: o.key,
|
|
503
|
+
elementPlusLocale: t.elementPlusLocale ?? o.elementPlusLocale
|
|
490
504
|
};
|
|
491
505
|
}) : U;
|
|
492
506
|
}
|
|
493
|
-
const
|
|
507
|
+
const ze = {
|
|
494
508
|
"zh-hans": "zh",
|
|
495
509
|
"zh-cn": "zh",
|
|
496
510
|
cn: "zh",
|
|
@@ -504,122 +518,471 @@ const Te = {
|
|
|
504
518
|
"pt-br": "pt",
|
|
505
519
|
"km-kh": "km"
|
|
506
520
|
};
|
|
507
|
-
function
|
|
521
|
+
function H(e) {
|
|
508
522
|
const t = String(e || "zh-cn").trim().toLowerCase().replace(/_/g, "-");
|
|
509
|
-
return
|
|
523
|
+
return Me(ze[t] || t) || "zh-cn";
|
|
510
524
|
}
|
|
511
|
-
const
|
|
525
|
+
const T = B("zh-cn");
|
|
512
526
|
let Q;
|
|
513
527
|
function te() {
|
|
514
528
|
Q?.(), Q = void 0;
|
|
515
529
|
}
|
|
516
530
|
function le(e) {
|
|
517
|
-
return e ? typeof e == "function" ?
|
|
531
|
+
return e ? typeof e == "function" ? H(e()) : ue(e) ? H(e.value) : H(e) : T.value;
|
|
518
532
|
}
|
|
519
|
-
function
|
|
533
|
+
function Re(e, t) {
|
|
520
534
|
if (e)
|
|
521
|
-
return t.split(".").reduce((a,
|
|
535
|
+
return t.split(".").reduce((a, o) => {
|
|
522
536
|
if (!(!a || typeof a != "object"))
|
|
523
|
-
return a[
|
|
537
|
+
return a[o];
|
|
524
538
|
}, e);
|
|
525
539
|
}
|
|
526
540
|
function se(e, t) {
|
|
527
|
-
const a = Ce
|
|
541
|
+
const a = Re(Ce[e], t);
|
|
528
542
|
return typeof a == "string" ? a : void 0;
|
|
529
543
|
}
|
|
530
544
|
function Se(e, t) {
|
|
531
|
-
return t ? e.replace(/\{(\w+)\}/g, (a,
|
|
532
|
-
const n = t[
|
|
545
|
+
return t ? e.replace(/\{(\w+)\}/g, (a, o) => {
|
|
546
|
+
const n = t[o];
|
|
533
547
|
return n == null ? a : String(n);
|
|
534
548
|
}) : e;
|
|
535
549
|
}
|
|
536
|
-
function
|
|
537
|
-
te(),
|
|
550
|
+
function Ft(e) {
|
|
551
|
+
te(), T.value = H(e);
|
|
538
552
|
}
|
|
539
|
-
function
|
|
540
|
-
return
|
|
553
|
+
function Vt() {
|
|
554
|
+
return T.value;
|
|
541
555
|
}
|
|
542
|
-
function
|
|
543
|
-
te(),
|
|
556
|
+
function qt() {
|
|
557
|
+
te(), T.value = "zh-cn";
|
|
544
558
|
}
|
|
545
|
-
function
|
|
559
|
+
function It(e, t = {}) {
|
|
546
560
|
if (te(), t.locale) {
|
|
547
561
|
if (typeof t.locale == "function" || ue(t.locale)) {
|
|
548
562
|
Q = $(
|
|
549
563
|
() => le(t.locale),
|
|
550
564
|
(a) => {
|
|
551
|
-
|
|
565
|
+
T.value = a;
|
|
552
566
|
},
|
|
553
567
|
{ immediate: !0, flush: "sync" }
|
|
554
568
|
);
|
|
555
569
|
return;
|
|
556
570
|
}
|
|
557
|
-
|
|
571
|
+
T.value = le(t.locale);
|
|
558
572
|
}
|
|
559
573
|
}
|
|
560
|
-
function
|
|
561
|
-
const
|
|
574
|
+
function m(e, t = e, a) {
|
|
575
|
+
const o = t || e, n = T.value, i = se(n, e) || se("zh-cn", e) || o || e;
|
|
562
576
|
return Se(i, a);
|
|
563
577
|
}
|
|
564
578
|
/*! Element Plus Icons Vue v2.3.2 */
|
|
565
|
-
var
|
|
579
|
+
var Te = /* @__PURE__ */ s({
|
|
580
|
+
name: "ArrowDown",
|
|
581
|
+
__name: "arrow-down",
|
|
582
|
+
setup(e) {
|
|
583
|
+
return (t, a) => (d(), p("svg", {
|
|
584
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
585
|
+
viewBox: "0 0 1024 1024"
|
|
586
|
+
}, [
|
|
587
|
+
l("path", {
|
|
588
|
+
fill: "currentColor",
|
|
589
|
+
d: "M831.872 340.864 512 652.672 192.128 340.864a30.59 30.59 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.59 30.59 0 0 0-42.752 0z"
|
|
590
|
+
})
|
|
591
|
+
]));
|
|
592
|
+
}
|
|
593
|
+
}), Ut = Te, Fe = /* @__PURE__ */ s({
|
|
594
|
+
name: "ArrowLeft",
|
|
595
|
+
__name: "arrow-left",
|
|
596
|
+
setup(e) {
|
|
597
|
+
return (t, a) => (d(), p("svg", {
|
|
598
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
599
|
+
viewBox: "0 0 1024 1024"
|
|
600
|
+
}, [
|
|
601
|
+
l("path", {
|
|
602
|
+
fill: "currentColor",
|
|
603
|
+
d: "M609.408 149.376 277.76 489.6a32 32 0 0 0 0 44.672l331.648 340.352a29.12 29.12 0 0 0 41.728 0 30.59 30.59 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.59 30.59 0 0 0 0-42.688 29.12 29.12 0 0 0-41.728 0"
|
|
604
|
+
})
|
|
605
|
+
]));
|
|
606
|
+
}
|
|
607
|
+
}), Jt = Fe, Ve = /* @__PURE__ */ s({
|
|
608
|
+
name: "ArrowRight",
|
|
609
|
+
__name: "arrow-right",
|
|
610
|
+
setup(e) {
|
|
611
|
+
return (t, a) => (d(), p("svg", {
|
|
612
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
613
|
+
viewBox: "0 0 1024 1024"
|
|
614
|
+
}, [
|
|
615
|
+
l("path", {
|
|
616
|
+
fill: "currentColor",
|
|
617
|
+
d: "M340.864 149.312a30.59 30.59 0 0 0 0 42.752L652.736 512 340.864 831.872a30.59 30.59 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"
|
|
618
|
+
})
|
|
619
|
+
]));
|
|
620
|
+
}
|
|
621
|
+
}), Ot = Ve, qe = /* @__PURE__ */ s({
|
|
622
|
+
name: "ArrowUp",
|
|
623
|
+
__name: "arrow-up",
|
|
624
|
+
setup(e) {
|
|
625
|
+
return (t, a) => (d(), p("svg", {
|
|
626
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
627
|
+
viewBox: "0 0 1024 1024"
|
|
628
|
+
}, [
|
|
629
|
+
l("path", {
|
|
630
|
+
fill: "currentColor",
|
|
631
|
+
d: "m488.832 344.32-339.84 356.672a32 32 0 0 0 0 44.16l.384.384a29.44 29.44 0 0 0 42.688 0l320-335.872 319.872 335.872a29.44 29.44 0 0 0 42.688 0l.384-.384a32 32 0 0 0 0-44.16L535.168 344.32a32 32 0 0 0-46.336 0"
|
|
632
|
+
})
|
|
633
|
+
]));
|
|
634
|
+
}
|
|
635
|
+
}), Ht = qe;
|
|
636
|
+
var Ie = /* @__PURE__ */ s({
|
|
637
|
+
name: "Calendar",
|
|
638
|
+
__name: "calendar",
|
|
639
|
+
setup(e) {
|
|
640
|
+
return (t, a) => (d(), p("svg", {
|
|
641
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
642
|
+
viewBox: "0 0 1024 1024"
|
|
643
|
+
}, [
|
|
644
|
+
l("path", {
|
|
645
|
+
fill: "currentColor",
|
|
646
|
+
d: "M128 384v512h768V192H768v32a32 32 0 1 1-64 0v-32H320v32a32 32 0 0 1-64 0v-32H128v128h768v64zm192-256h384V96a32 32 0 1 1 64 0v32h160a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h160V96a32 32 0 0 1 64 0zm-32 384h64a32 32 0 0 1 0 64h-64a32 32 0 0 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m192-192h64a32 32 0 0 1 0 64h-64a32 32 0 0 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m192-192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64"
|
|
647
|
+
})
|
|
648
|
+
]));
|
|
649
|
+
}
|
|
650
|
+
}), Nt = Ie;
|
|
651
|
+
var Ue = /* @__PURE__ */ s({
|
|
652
|
+
name: "Check",
|
|
653
|
+
__name: "check",
|
|
654
|
+
setup(e) {
|
|
655
|
+
return (t, a) => (d(), p("svg", {
|
|
656
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
657
|
+
viewBox: "0 0 1024 1024"
|
|
658
|
+
}, [
|
|
659
|
+
l("path", {
|
|
660
|
+
fill: "currentColor",
|
|
661
|
+
d: "M406.656 706.944 195.84 496.256a32 32 0 1 0-45.248 45.248l256 256 512-512a32 32 0 0 0-45.248-45.248L406.592 706.944z"
|
|
662
|
+
})
|
|
663
|
+
]));
|
|
664
|
+
}
|
|
665
|
+
}), Yt = Ue;
|
|
666
|
+
var Je = /* @__PURE__ */ s({
|
|
667
|
+
name: "CircleCheck",
|
|
668
|
+
__name: "circle-check",
|
|
669
|
+
setup(e) {
|
|
670
|
+
return (t, a) => (d(), p("svg", {
|
|
671
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
672
|
+
viewBox: "0 0 1024 1024"
|
|
673
|
+
}, [
|
|
674
|
+
l("path", {
|
|
675
|
+
fill: "currentColor",
|
|
676
|
+
d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"
|
|
677
|
+
}),
|
|
678
|
+
l("path", {
|
|
679
|
+
fill: "currentColor",
|
|
680
|
+
d: "M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752z"
|
|
681
|
+
})
|
|
682
|
+
]));
|
|
683
|
+
}
|
|
684
|
+
}), Gt = Je, Oe = /* @__PURE__ */ s({
|
|
685
|
+
name: "CircleCloseFilled",
|
|
686
|
+
__name: "circle-close-filled",
|
|
687
|
+
setup(e) {
|
|
688
|
+
return (t, a) => (d(), p("svg", {
|
|
689
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
690
|
+
viewBox: "0 0 1024 1024"
|
|
691
|
+
}, [
|
|
692
|
+
l("path", {
|
|
693
|
+
fill: "currentColor",
|
|
694
|
+
d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336z"
|
|
695
|
+
})
|
|
696
|
+
]));
|
|
697
|
+
}
|
|
698
|
+
}), Kt = Oe, He = /* @__PURE__ */ s({
|
|
699
|
+
name: "CircleClose",
|
|
700
|
+
__name: "circle-close",
|
|
701
|
+
setup(e) {
|
|
702
|
+
return (t, a) => (d(), p("svg", {
|
|
703
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
704
|
+
viewBox: "0 0 1024 1024"
|
|
705
|
+
}, [
|
|
706
|
+
l("path", {
|
|
707
|
+
fill: "currentColor",
|
|
708
|
+
d: "m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z"
|
|
709
|
+
}),
|
|
710
|
+
l("path", {
|
|
711
|
+
fill: "currentColor",
|
|
712
|
+
d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"
|
|
713
|
+
})
|
|
714
|
+
]));
|
|
715
|
+
}
|
|
716
|
+
}), Wt = He, Ne = /* @__PURE__ */ s({
|
|
717
|
+
name: "Clock",
|
|
718
|
+
__name: "clock",
|
|
719
|
+
setup(e) {
|
|
720
|
+
return (t, a) => (d(), p("svg", {
|
|
721
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
722
|
+
viewBox: "0 0 1024 1024"
|
|
723
|
+
}, [
|
|
724
|
+
l("path", {
|
|
725
|
+
fill: "currentColor",
|
|
726
|
+
d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"
|
|
727
|
+
}),
|
|
728
|
+
l("path", {
|
|
729
|
+
fill: "currentColor",
|
|
730
|
+
d: "M480 256a32 32 0 0 1 32 32v256a32 32 0 0 1-64 0V288a32 32 0 0 1 32-32"
|
|
731
|
+
}),
|
|
732
|
+
l("path", {
|
|
733
|
+
fill: "currentColor",
|
|
734
|
+
d: "M480 512h256q32 0 32 32t-32 32H480q-32 0-32-32t32-32"
|
|
735
|
+
})
|
|
736
|
+
]));
|
|
737
|
+
}
|
|
738
|
+
}), Qt = Ne, Ye = /* @__PURE__ */ s({
|
|
739
|
+
name: "Close",
|
|
740
|
+
__name: "close",
|
|
741
|
+
setup(e) {
|
|
742
|
+
return (t, a) => (d(), p("svg", {
|
|
743
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
744
|
+
viewBox: "0 0 1024 1024"
|
|
745
|
+
}, [
|
|
746
|
+
l("path", {
|
|
747
|
+
fill: "currentColor",
|
|
748
|
+
d: "M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"
|
|
749
|
+
})
|
|
750
|
+
]));
|
|
751
|
+
}
|
|
752
|
+
}), Xt = Ye, Ge = /* @__PURE__ */ s({
|
|
753
|
+
name: "DArrowLeft",
|
|
754
|
+
__name: "d-arrow-left",
|
|
755
|
+
setup(e) {
|
|
756
|
+
return (t, a) => (d(), p("svg", {
|
|
757
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
758
|
+
viewBox: "0 0 1024 1024"
|
|
759
|
+
}, [
|
|
760
|
+
l("path", {
|
|
761
|
+
fill: "currentColor",
|
|
762
|
+
d: "M529.408 149.376a29.12 29.12 0 0 1 41.728 0 30.59 30.59 0 0 1 0 42.688L259.264 511.936l311.872 319.936a30.59 30.59 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L197.76 534.272a32 32 0 0 1 0-44.672zm256 0a29.12 29.12 0 0 1 41.728 0 30.59 30.59 0 0 1 0 42.688L515.264 511.936l311.872 319.936a30.59 30.59 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L453.76 534.272a32 32 0 0 1 0-44.672z"
|
|
763
|
+
})
|
|
764
|
+
]));
|
|
765
|
+
}
|
|
766
|
+
}), Zt = Ge, Ke = /* @__PURE__ */ s({
|
|
767
|
+
name: "DArrowRight",
|
|
768
|
+
__name: "d-arrow-right",
|
|
769
|
+
setup(e) {
|
|
770
|
+
return (t, a) => (d(), p("svg", {
|
|
771
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
772
|
+
viewBox: "0 0 1024 1024"
|
|
773
|
+
}, [
|
|
774
|
+
l("path", {
|
|
775
|
+
fill: "currentColor",
|
|
776
|
+
d: "M452.864 149.312a29.12 29.12 0 0 1 41.728.064L826.24 489.664a32 32 0 0 1 0 44.672L494.592 874.624a29.12 29.12 0 0 1-41.728 0 30.59 30.59 0 0 1 0-42.752L764.736 512 452.864 192a30.59 30.59 0 0 1 0-42.688m-256 0a29.12 29.12 0 0 1 41.728.064L570.24 489.664a32 32 0 0 1 0 44.672L238.592 874.624a29.12 29.12 0 0 1-41.728 0 30.59 30.59 0 0 1 0-42.752L508.736 512 196.864 192a30.59 30.59 0 0 1 0-42.688"
|
|
777
|
+
})
|
|
778
|
+
]));
|
|
779
|
+
}
|
|
780
|
+
}), $t = Ke;
|
|
781
|
+
var We = /* @__PURE__ */ s({
|
|
566
782
|
name: "Download",
|
|
567
783
|
__name: "download",
|
|
568
784
|
setup(e) {
|
|
569
|
-
return (t, a) => (
|
|
785
|
+
return (t, a) => (d(), p("svg", {
|
|
570
786
|
xmlns: "http://www.w3.org/2000/svg",
|
|
571
787
|
viewBox: "0 0 1024 1024"
|
|
572
788
|
}, [
|
|
573
|
-
|
|
789
|
+
l("path", {
|
|
574
790
|
fill: "currentColor",
|
|
575
791
|
d: "M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m384-253.696 236.288-236.352 45.248 45.248L508.8 704 192 387.2l45.248-45.248L480 584.704V128h64z"
|
|
576
792
|
})
|
|
577
793
|
]));
|
|
578
794
|
}
|
|
579
|
-
}),
|
|
795
|
+
}), Qe = We;
|
|
796
|
+
var Xe = /* @__PURE__ */ s({
|
|
797
|
+
name: "Hide",
|
|
798
|
+
__name: "hide",
|
|
799
|
+
setup(e) {
|
|
800
|
+
return (t, a) => (d(), p("svg", {
|
|
801
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
802
|
+
viewBox: "0 0 1024 1024"
|
|
803
|
+
}, [
|
|
804
|
+
l("path", {
|
|
805
|
+
fill: "currentColor",
|
|
806
|
+
d: "M876.8 156.8c0-9.6-3.2-16-9.6-22.4s-12.8-9.6-22.4-9.6-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176S0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4s3.2 16 9.6 22.4 12.8 9.6 22.4 9.6 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4m-646.4 528Q115.2 579.2 76.8 512q43.2-72 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4m140.8-96Q352 555.2 352 512c0-44.8 16-83.2 48-112s67.2-48 112-48c28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6q-43.2 72-153.6 172.8c-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176S1024 528 1024 512s-48.001-73.6-134.401-176"
|
|
807
|
+
}),
|
|
808
|
+
l("path", {
|
|
809
|
+
fill: "currentColor",
|
|
810
|
+
d: "M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112s-67.2 48-112 48"
|
|
811
|
+
})
|
|
812
|
+
]));
|
|
813
|
+
}
|
|
814
|
+
}), ea = Xe, Ze = /* @__PURE__ */ s({
|
|
815
|
+
name: "InfoFilled",
|
|
816
|
+
__name: "info-filled",
|
|
817
|
+
setup(e) {
|
|
818
|
+
return (t, a) => (d(), p("svg", {
|
|
819
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
820
|
+
viewBox: "0 0 1024 1024"
|
|
821
|
+
}, [
|
|
822
|
+
l("path", {
|
|
823
|
+
fill: "currentColor",
|
|
824
|
+
d: "M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64m67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344M590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.99 12.99 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"
|
|
825
|
+
})
|
|
826
|
+
]));
|
|
827
|
+
}
|
|
828
|
+
}), ta = Ze, $e = /* @__PURE__ */ s({
|
|
829
|
+
name: "Loading",
|
|
830
|
+
__name: "loading",
|
|
831
|
+
setup(e) {
|
|
832
|
+
return (t, a) => (d(), p("svg", {
|
|
833
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
834
|
+
viewBox: "0 0 1024 1024"
|
|
835
|
+
}, [
|
|
836
|
+
l("path", {
|
|
837
|
+
fill: "currentColor",
|
|
838
|
+
d: "M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248m452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248M828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0"
|
|
839
|
+
})
|
|
840
|
+
]));
|
|
841
|
+
}
|
|
842
|
+
}), aa = $e, et = /* @__PURE__ */ s({
|
|
843
|
+
name: "Minus",
|
|
844
|
+
__name: "minus",
|
|
845
|
+
setup(e) {
|
|
846
|
+
return (t, a) => (d(), p("svg", {
|
|
847
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
848
|
+
viewBox: "0 0 1024 1024"
|
|
849
|
+
}, [
|
|
850
|
+
l("path", {
|
|
851
|
+
fill: "currentColor",
|
|
852
|
+
d: "M128 544h768a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64"
|
|
853
|
+
})
|
|
854
|
+
]));
|
|
855
|
+
}
|
|
856
|
+
}), na = et, tt = /* @__PURE__ */ s({
|
|
857
|
+
name: "MoreFilled",
|
|
858
|
+
__name: "more-filled",
|
|
859
|
+
setup(e) {
|
|
860
|
+
return (t, a) => (d(), p("svg", {
|
|
861
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
862
|
+
viewBox: "0 0 1024 1024"
|
|
863
|
+
}, [
|
|
864
|
+
l("path", {
|
|
865
|
+
fill: "currentColor",
|
|
866
|
+
d: "M176 416a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224"
|
|
867
|
+
})
|
|
868
|
+
]));
|
|
869
|
+
}
|
|
870
|
+
}), ra = tt;
|
|
871
|
+
var at = /* @__PURE__ */ s({
|
|
872
|
+
name: "Plus",
|
|
873
|
+
__name: "plus",
|
|
874
|
+
setup(e) {
|
|
875
|
+
return (t, a) => (d(), p("svg", {
|
|
876
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
877
|
+
viewBox: "0 0 1024 1024"
|
|
878
|
+
}, [
|
|
879
|
+
l("path", {
|
|
880
|
+
fill: "currentColor",
|
|
881
|
+
d: "M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64z"
|
|
882
|
+
})
|
|
883
|
+
]));
|
|
884
|
+
}
|
|
885
|
+
}), oa = at, nt = /* @__PURE__ */ s({
|
|
886
|
+
name: "QuestionFilled",
|
|
887
|
+
__name: "question-filled",
|
|
888
|
+
setup(e) {
|
|
889
|
+
return (t, a) => (d(), p("svg", {
|
|
890
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
891
|
+
viewBox: "0 0 1024 1024"
|
|
892
|
+
}, [
|
|
893
|
+
l("path", {
|
|
894
|
+
fill: "currentColor",
|
|
895
|
+
d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m23.744 191.488c-52.096 0-92.928 14.784-123.2 44.352-30.976 29.568-45.76 70.4-45.76 122.496h80.256c0-29.568 5.632-52.8 17.6-68.992 13.376-19.712 35.2-28.864 66.176-28.864 23.936 0 42.944 6.336 56.32 19.712 12.672 13.376 19.712 31.68 19.712 54.912 0 17.6-6.336 34.496-19.008 49.984l-8.448 9.856c-45.76 40.832-73.216 70.4-82.368 89.408-9.856 19.008-14.08 42.24-14.08 68.992v9.856h80.96v-9.856c0-16.896 3.52-31.68 10.56-45.76 6.336-12.672 15.488-24.64 28.16-35.2 33.792-29.568 54.208-48.576 60.544-55.616 16.896-22.528 26.048-51.392 26.048-86.592q0-64.416-42.24-101.376c-28.16-25.344-65.472-37.312-111.232-37.312m-12.672 406.208a54.27 54.27 0 0 0-38.72 14.784 49.4 49.4 0 0 0-15.488 38.016c0 15.488 4.928 28.16 15.488 38.016A54.85 54.85 0 0 0 523.072 768c15.488 0 28.16-4.928 38.72-14.784a51.52 51.52 0 0 0 16.192-38.72 51.97 51.97 0 0 0-15.488-38.016 55.94 55.94 0 0 0-39.424-14.784"
|
|
896
|
+
})
|
|
897
|
+
]));
|
|
898
|
+
}
|
|
899
|
+
}), ia = nt, rt = /* @__PURE__ */ s({
|
|
580
900
|
name: "RefreshLeft",
|
|
581
901
|
__name: "refresh-left",
|
|
582
902
|
setup(e) {
|
|
583
|
-
return (t, a) => (
|
|
903
|
+
return (t, a) => (d(), p("svg", {
|
|
584
904
|
xmlns: "http://www.w3.org/2000/svg",
|
|
585
905
|
viewBox: "0 0 1024 1024"
|
|
586
906
|
}, [
|
|
587
|
-
|
|
907
|
+
l("path", {
|
|
588
908
|
fill: "currentColor",
|
|
589
909
|
d: "M289.088 296.704h92.992a32 32 0 0 1 0 64H232.96a32 32 0 0 1-32-32V179.712a32 32 0 0 1 64 0v50.56a384 384 0 0 1 643.84 282.88 384 384 0 0 1-383.936 384 384 384 0 0 1-384-384h64a320 320 0 1 0 640 0 320 320 0 0 0-555.712-216.448z"
|
|
590
910
|
})
|
|
591
911
|
]));
|
|
592
912
|
}
|
|
593
|
-
}),
|
|
913
|
+
}), ot = rt;
|
|
914
|
+
var it = /* @__PURE__ */ s({
|
|
915
|
+
name: "SuccessFilled",
|
|
916
|
+
__name: "success-filled",
|
|
917
|
+
setup(e) {
|
|
918
|
+
return (t, a) => (d(), p("svg", {
|
|
919
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
920
|
+
viewBox: "0 0 1024 1024"
|
|
921
|
+
}, [
|
|
922
|
+
l("path", {
|
|
923
|
+
fill: "currentColor",
|
|
924
|
+
d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.27 38.27 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"
|
|
925
|
+
})
|
|
926
|
+
]));
|
|
927
|
+
}
|
|
928
|
+
}), la = it, lt = /* @__PURE__ */ s({
|
|
929
|
+
name: "View",
|
|
930
|
+
__name: "view",
|
|
931
|
+
setup(e) {
|
|
932
|
+
return (t, a) => (d(), p("svg", {
|
|
933
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
934
|
+
viewBox: "0 0 1024 1024"
|
|
935
|
+
}, [
|
|
936
|
+
l("path", {
|
|
937
|
+
fill: "currentColor",
|
|
938
|
+
d: "M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288m0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.19 160.19 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"
|
|
939
|
+
})
|
|
940
|
+
]));
|
|
941
|
+
}
|
|
942
|
+
}), sa = lt, st = /* @__PURE__ */ s({
|
|
943
|
+
name: "WarningFilled",
|
|
944
|
+
__name: "warning-filled",
|
|
945
|
+
setup(e) {
|
|
946
|
+
return (t, a) => (d(), p("svg", {
|
|
947
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
948
|
+
viewBox: "0 0 1024 1024"
|
|
949
|
+
}, [
|
|
950
|
+
l("path", {
|
|
951
|
+
fill: "currentColor",
|
|
952
|
+
d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 192a58.43 58.43 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.43 58.43 0 0 0 512 256m0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4"
|
|
953
|
+
})
|
|
954
|
+
]));
|
|
955
|
+
}
|
|
956
|
+
}), ca = st, ct = /* @__PURE__ */ s({
|
|
594
957
|
name: "ZoomIn",
|
|
595
958
|
__name: "zoom-in",
|
|
596
959
|
setup(e) {
|
|
597
|
-
return (t, a) => (
|
|
960
|
+
return (t, a) => (d(), p("svg", {
|
|
598
961
|
xmlns: "http://www.w3.org/2000/svg",
|
|
599
962
|
viewBox: "0 0 1024 1024"
|
|
600
963
|
}, [
|
|
601
|
-
|
|
964
|
+
l("path", {
|
|
602
965
|
fill: "currentColor",
|
|
603
966
|
d: "m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704m-32-384v-96a32 32 0 0 1 64 0v96h96a32 32 0 0 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64z"
|
|
604
967
|
})
|
|
605
968
|
]));
|
|
606
969
|
}
|
|
607
|
-
}),
|
|
970
|
+
}), ut = ct, mt = /* @__PURE__ */ s({
|
|
608
971
|
name: "ZoomOut",
|
|
609
972
|
__name: "zoom-out",
|
|
610
973
|
setup(e) {
|
|
611
|
-
return (t, a) => (
|
|
974
|
+
return (t, a) => (d(), p("svg", {
|
|
612
975
|
xmlns: "http://www.w3.org/2000/svg",
|
|
613
976
|
viewBox: "0 0 1024 1024"
|
|
614
977
|
}, [
|
|
615
|
-
|
|
978
|
+
l("path", {
|
|
616
979
|
fill: "currentColor",
|
|
617
980
|
d: "m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704M352 448h256a32 32 0 0 1 0 64H352a32 32 0 0 1 0-64"
|
|
618
981
|
})
|
|
619
982
|
]));
|
|
620
983
|
}
|
|
621
|
-
}),
|
|
622
|
-
const
|
|
984
|
+
}), dt = mt;
|
|
985
|
+
const pt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANgAAADYCAMAAAC+/t3fAAAAaVBMVEUAAABWapNVapKeqsLJztx3hKnGzN2yu8////9XapWcqMGps8lXapVYa5RWaZWps8lfcJjS1+KjrsVXapWapr////9sfaKrtMrV2uWBj7B4iKqWob1wgaXr7fOBj6/Ax9dhc5yhq8OKl7Wba+6tAAAAE3RSTlMAgGDuDyVLoYDe2XuXRb68cy6e4BCQEAAAAyZJREFUeNrt29tyokAUheGOQjIoeMhuCQ4e0Pd/yCE1STU4mGq7bXqzZ/23ufoqYblTqkIIIYQQQggNlM42Lzctf5nMD22bKQYVOQ30sTPt6dEO74mKXLoiCgDTi1RFbUMUBhZXluQUDKbnWxWtjMLB2pYqUjmFg8WUzSg0TL+rCKVZeJheRJj9DYWHRRnHbBSYnr+qcSsoKCyeLKcfK/emc2UqH4LFGMcVWVftTC4w/TbmhGQjwvR6RBmNAbMYx4nD7k/I1GF3ZZOH3RtHAbDhcZQAG5SJgOn1Vt0mAzYwIUJgvjJ/2OVo2pcmcoQZWehxpBGue5sJEQTryyTBeuMoCtadEFmwjkwYzIyjNJief02IONj3OAqE/ZVJhJnZj3RS1c4nld04ijiC/5EJhbUyobBWJhT2OY5CYa1MKKyVCYXpdSIUphdbobB2HIXCWplQmJGFhZUn07kyNaFgbUsx1/1tb1Jh+i1hDmu0Y+uEN4xqV9ki5Q27atfmKWtYqd1lW84wqj1kr5xhB+3RkjGMrl4yxrCm9pG984V5ytZJINjpY7hmLNki5XjdP0fGFkZ0qL1kfGEt7erzgsYY1lYefrtWsIZ5NAMMMBNg9gEGmD3sejbVnRpyjAvs5rr3DzDAAOsEmH2AAQZYJ8Ds4wJrSlN1NE3+CDYJu+5NgNkHGGCAdQLMPsAAA0zuEQyYbYABBlgnwOwDDDDAOvVhl5NJ1Fu1O6lHMGA/xQl2rPodpcBq6gfYYIABBpgJsAdiBDvX/cTAxF4egNkEWGDY5Q5s8v9onoZdR3KNC4yOg7AzOccFNvi36POJIy4wqgZgF/KIC6yporuCwNrq/nNW7ckzLjCi/bO//MEF9mCAAQYYYDwCDDAmAQYYkwADjEmAAcYkwABjEmCAMQkwwJgEGGBMAgwwJgEGGJMAA4xJgAHGJMD+B1hGE6hwgK1oAqUOsJz4lymHCuJfrpTM9SicYC/EvUw5lRD3Psde4lP29YSJG8bse+ulvZZ5uFTCV5YZl6hpXKXKs5TlL22jnlCaM7uHV7NEPam02LwwaVYkCiGEEEIIITTUH1Fqd5V0WMtQAAAAAElFTkSuQmCC", vt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANgAAADYCAMAAAC+/t3fAAAAdVBMVEUAAAD/XgD/XQD/z7f/omz/r4H/h0v/0Lf/omz/XwP/XgD/XgD/XQD/tIv/pnH/zK7/XgD/XAD/rH7/XQD/XgD/nmb/////fjL/ciD/dib/6+D/9e//ml//aBD/18D/r4D/w6D/hkD/uJD/pHD/kE//4c//zbBB3kudAAAAFHRSTlMAgGAP7q8hPNo33pe+mH9Z73BZULJO58YAAAW3SURBVHja7NZJDsJADERREzoTYZa94P4XJQhaZOgoWViYLvnf4C1cMnme53me53mel6gqbjvVCvqD2u7K2j3KPRnXHpn1e0hTkWk3jinDbGX7jmPqMAk1mXXgmD6s70xGdRzTh1nKCh6nD5OSDKoOPEkfJs2m2c9iEEewreOYx3IMYBbj2HIqfZiEO62UyyQOYBbjeOSV9GByWpmQbE5sCpPyhzJOpA9bH8fMYcvjmDtMwoWSZQ9bGkcAWHocEWDJcYSASTOfEAxYYhxBYHMZCmw2+zCw6TgCwcbjiAQbyaBgw9nHgg0mBAz2laHBJHzGEQ4WJwQQ9pYhwqSsiSBh0tSgMAk1KEzCBRTWy0Bhr28fFNbPPijsyY297DYIA1EYlnpJ20WyqA7G8QVi4uT9H7Go0oDDkrHEkf+Vt58ijyfMskZhs6xR2PygNQqbH7RGYbOsUdj8oDUK67pLq7Du3CpsHvvksNjtlnHDEPbKvk/csNzt7eNEDbPdftkXMwxBIfvlgcUcQu5R1HeKLiSwNJj/3N1iKatkDLB4M0suQYpBIzsTwB6mLFSSfb4fDZvMS95Wkn2fjoVZs2nAwTLU6Wa2Jaxdg0p2JMybbSPKrlnzoB0HS8LxTk4PbLLXfm8/h8HuwknrFImo1tthsHHVZDlaKGKByezwxXzMUMQGc8UcCVDEApsKmGsJNhawoSVYkDvWGiwVM35oaXhEgfUrLEERC2yZGHfAL0ZNLDCZ90/EpjaPZafyMckJqlhgdlkWZfIPUMUCgxOPfCKYoIsFNplNd+higaUtLEEXCwx+A4M2Ftj46npAGwvMvsImaGOBYTBlGepYYNmUWahjgcHXvmIssLH2FWOBRV/5FWOBFT+ZR5VYYNFIT1SJBYabwBzqxAKbaq/ALDBnJB9RIxJY3+ZKBUxN/m35o9buclyFYSgAb8ICK78OhO5/ibfS3JkAdksn5OHMeS5Sv0Jty+QZN3q8B4EV9UrzZlBg0lBjFosoMHeCuUj3AgILjTSmMqLAHk00pk2DwHjS8Uz9QYGF5hnzN0OB7cYpdfKoKyCw1sRCGVJAUGCyW+MsI/o0CKyVDiGiNKA0gsDkMG+w38sCdQQF5o7Vok63ZRiwcEbkKxlHehcUmFPLDrFkXEOW5L4/vaWlMtnBgBVdA+N2kOW6yuYnIymQDgosGSt7dtOHcZXOAYHta30L+09luteBwMR+xzJ/KNO9DgTG+wVwh0xt61BgojZTTdb1MILA+NViikO68tiXgsDE6sMcxNsEv4Ra+Jm5rOKsQwYgMJ7OzTmWxb2r7jK3izdc2OmGxTX56871WMsciTg8YGGHG/ZUKcS2BI7y9/5j7SsnrXJLjW0otqIbBQisvG5NEiLRxYSl6w4KzE1m3FLonPCG5ugnCLBoN6qUmXQ0Ta/5MWAx+wuVjv1L+K/xHgNmspxSqbAuMcL0DAaMxRopCn2UWPJj+3/NJutXiYGAWaxUI/0qkbndKQhYXJTK50j9wYDF7Me+LQKBVWc2of5gwNis1kzdAYGt3nIJdQcDFpM9DTF1BgQ2u1fja2dAYMHbLqHOgMDCsW352w8iCKweWDHffhBBYOyba2Nabz+IKDB3eFk+36+IILDQXPlQRnpdKLC0d+W9sjMoMN8kJY04woEC+6kbJY05dIMC86OPSaHA0ugREQWWR7tQYP/atZcUBmEoCsNHA4FEBxHvyKJQ7P7X2EGdlHbiNYNjON8OfvIkZP2Zi9tqV7CE2V77TyxL2PdkXJ52GUuYvZbKL1IsYcfr9GPbq2WxhJ2gMIUpTGEcFKYwEgpTGAmFKYyEwhRGQmEKI+EJy3YDCeeNdgOesMH4ZTgk4zfAoxi9GR6dsctwCfRD1sNnNm7HCmtuY8wRH42dZSXCL/CW5QQcmtoax4iLIuOglQkVpIHrPlzGPqCSNE8diT4FiIiIiIjIP2/v9e/hKQXqEwAAAABJRU5ErkJggg==", ht = /* @__PURE__ */ new Set([
|
|
623
986
|
"jpg",
|
|
624
987
|
"jpeg",
|
|
625
988
|
"png",
|
|
@@ -629,7 +992,7 @@ const Oe = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANgAAADYCAMAAAC+/t3fAA
|
|
|
629
992
|
"svg",
|
|
630
993
|
"avif",
|
|
631
994
|
"ico"
|
|
632
|
-
]),
|
|
995
|
+
]), ft = /* @__PURE__ */ new Set(["mp4", "webm", "ogg", "ogv", "mov", "m4v"]), wt = /* @__PURE__ */ new Set([
|
|
633
996
|
"mp3",
|
|
634
997
|
"wav",
|
|
635
998
|
"ogg",
|
|
@@ -637,7 +1000,7 @@ const Oe = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANgAAADYCAMAAAC+/t3fAA
|
|
|
637
1000
|
"m4a",
|
|
638
1001
|
"aac",
|
|
639
1002
|
"flac"
|
|
640
|
-
]),
|
|
1003
|
+
]), _t = /* @__PURE__ */ new Set([
|
|
641
1004
|
"html",
|
|
642
1005
|
"htm",
|
|
643
1006
|
"txt",
|
|
@@ -646,7 +1009,7 @@ const Oe = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANgAAADYCAMAAAC+/t3fAA
|
|
|
646
1009
|
"csv",
|
|
647
1010
|
"md",
|
|
648
1011
|
"log"
|
|
649
|
-
]),
|
|
1012
|
+
]), gt = /* @__PURE__ */ new Set([
|
|
650
1013
|
"doc",
|
|
651
1014
|
"docx",
|
|
652
1015
|
"xls",
|
|
@@ -664,31 +1027,31 @@ const Oe = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANgAAADYCAMAAAC+/t3fAA
|
|
|
664
1027
|
previewDownloadMode: "openByParams-uses-registered-downloadRequest",
|
|
665
1028
|
downloadResponseMode: "supports-blob-and-axios-response-data-blob"
|
|
666
1029
|
};
|
|
667
|
-
function
|
|
1030
|
+
function _(e, t) {
|
|
668
1031
|
console.info(`[JtAttachmentPreview DEBUG ${X.marker}] ${e}`, {
|
|
669
1032
|
...X,
|
|
670
1033
|
...t
|
|
671
1034
|
});
|
|
672
1035
|
}
|
|
673
|
-
typeof window < "u" && (window.__JT_ATTACHMENT_PREVIEW_DEBUG__ = X,
|
|
674
|
-
let
|
|
675
|
-
async function
|
|
1036
|
+
typeof window < "u" && (window.__JT_ATTACHMENT_PREVIEW_DEBUG__ = X, _("module-loaded"));
|
|
1037
|
+
let C = null, K = null, j = null;
|
|
1038
|
+
async function bt() {
|
|
676
1039
|
return K || (K = Promise.all([
|
|
677
1040
|
import("./pdf-BmBuG7of.js"),
|
|
678
1041
|
import("./pdf.worker.min-4PI-nNLo.js")
|
|
679
1042
|
]).then(([e, t]) => (e.GlobalWorkerOptions.workerSrc = t.default, e))), K;
|
|
680
1043
|
}
|
|
681
|
-
function
|
|
1044
|
+
function yt(e) {
|
|
682
1045
|
return typeof e == "string" ? { url: e } : e;
|
|
683
1046
|
}
|
|
684
|
-
function
|
|
1047
|
+
function me(e) {
|
|
685
1048
|
const [t] = e.split(/[?#]/);
|
|
686
1049
|
return t ?? "";
|
|
687
1050
|
}
|
|
688
1051
|
function ae(e, t) {
|
|
689
1052
|
if (t?.trim()) return t.trim();
|
|
690
|
-
const a =
|
|
691
|
-
if (!a) return
|
|
1053
|
+
const a = me(e).split("/").filter(Boolean).pop();
|
|
1054
|
+
if (!a) return m("common.附件预览");
|
|
692
1055
|
try {
|
|
693
1056
|
return decodeURIComponent(a);
|
|
694
1057
|
} catch {
|
|
@@ -696,32 +1059,32 @@ function ae(e, t) {
|
|
|
696
1059
|
}
|
|
697
1060
|
}
|
|
698
1061
|
function Z(e) {
|
|
699
|
-
return
|
|
1062
|
+
return me(e).match(/\.([a-z0-9]+)$/i)?.[1]?.toLowerCase() ?? "";
|
|
700
1063
|
}
|
|
701
|
-
function
|
|
1064
|
+
function xt(e) {
|
|
702
1065
|
return e?.trim().replace(/^\./, "").toLowerCase() ?? "";
|
|
703
1066
|
}
|
|
704
|
-
function
|
|
705
|
-
const t =
|
|
706
|
-
return
|
|
1067
|
+
function kt(e) {
|
|
1068
|
+
const t = xt(e);
|
|
1069
|
+
return ht.has(t) ? "image" : t === "pdf" ? "pdf" : ft.has(t) ? "video" : wt.has(t) ? "audio" : _t.has(t) ? "iframe" : gt.has(t) ? "unsupported" : "unknown";
|
|
707
1070
|
}
|
|
708
1071
|
function ne(e) {
|
|
709
1072
|
const t = e.toLowerCase().split(";")[0]?.trim() ?? "";
|
|
710
1073
|
return t.startsWith("image/") ? "image" : t === "application/pdf" ? "pdf" : t.startsWith("video/") ? "video" : t.startsWith("audio/") ? "audio" : t.startsWith("text/") ? "iframe" : "unknown";
|
|
711
1074
|
}
|
|
712
|
-
function
|
|
1075
|
+
function de(e) {
|
|
713
1076
|
if (!e.url.trim()) return "empty";
|
|
714
1077
|
if (e.mode && e.mode !== "auto") return e.mode;
|
|
715
1078
|
if (e.mimeType) {
|
|
716
1079
|
const a = ne(e.mimeType);
|
|
717
1080
|
if (a !== "unknown") return a;
|
|
718
1081
|
}
|
|
719
|
-
const t =
|
|
1082
|
+
const t = kt(
|
|
720
1083
|
e.extension || Z(e.name || "") || Z(e.url)
|
|
721
1084
|
);
|
|
722
1085
|
return t !== "unknown" ? t : "unknown";
|
|
723
1086
|
}
|
|
724
|
-
async function
|
|
1087
|
+
async function Lt(e) {
|
|
725
1088
|
try {
|
|
726
1089
|
const a = (await fetch(e, { method: "HEAD" })).headers.get("content-type") ?? "";
|
|
727
1090
|
return ne(a);
|
|
@@ -729,54 +1092,54 @@ async function et(e) {
|
|
|
729
1092
|
return "unknown";
|
|
730
1093
|
}
|
|
731
1094
|
}
|
|
732
|
-
async function
|
|
1095
|
+
async function pe(e, t) {
|
|
733
1096
|
const a = await fetch(e, t);
|
|
734
1097
|
if (!a.ok) throw new Error(`fetch failed: ${a.status}`);
|
|
735
1098
|
return a.blob();
|
|
736
1099
|
}
|
|
737
|
-
async function
|
|
738
|
-
|
|
1100
|
+
async function At(e) {
|
|
1101
|
+
_("fetch-pdf-bytes-start", {
|
|
739
1102
|
url: e
|
|
740
1103
|
});
|
|
741
1104
|
const t = await fetch(e);
|
|
742
1105
|
if (!t.ok) throw new Error(`fetch failed: ${t.status}`);
|
|
743
1106
|
const a = new Uint8Array(await t.arrayBuffer());
|
|
744
|
-
return
|
|
1107
|
+
return _("fetch-pdf-bytes-done", {
|
|
745
1108
|
url: e,
|
|
746
1109
|
byteLength: a.byteLength,
|
|
747
1110
|
contentType: t.headers.get("content-type") ?? ""
|
|
748
1111
|
}), a;
|
|
749
1112
|
}
|
|
750
|
-
function
|
|
1113
|
+
function Pt(e, t) {
|
|
751
1114
|
const a = Z(t);
|
|
752
1115
|
return a === "doc" || a === "docx" ? "W" : a === "xls" || a === "xlsx" ? "X" : a === "ppt" || a === "pptx" ? "P" : a === "zip" || a === "rar" || a === "7z" ? "ZIP" : e === "pdf" ? "PDF" : "FILE";
|
|
753
1116
|
}
|
|
754
|
-
function
|
|
755
|
-
return
|
|
1117
|
+
function ve(e, t, a, o = !1) {
|
|
1118
|
+
return r(
|
|
756
1119
|
"button",
|
|
757
1120
|
{
|
|
758
1121
|
class: a,
|
|
759
1122
|
type: "button",
|
|
760
1123
|
onClick: () => {
|
|
761
|
-
|
|
1124
|
+
_("download-button-click", {
|
|
762
1125
|
url: e.url,
|
|
763
1126
|
downloadName: t,
|
|
764
|
-
fallbackToRawUrl:
|
|
765
|
-
}),
|
|
766
|
-
fallbackToRawUrl:
|
|
1127
|
+
fallbackToRawUrl: o
|
|
1128
|
+
}), fe(e, t, {
|
|
1129
|
+
fallbackToRawUrl: o
|
|
767
1130
|
});
|
|
768
1131
|
}
|
|
769
1132
|
},
|
|
770
1133
|
[
|
|
771
|
-
|
|
772
|
-
|
|
1134
|
+
r(
|
|
1135
|
+
O,
|
|
773
1136
|
{ class: "jt-attachment-preview-service__download-icon" },
|
|
774
|
-
() =>
|
|
1137
|
+
() => r(Qe)
|
|
775
1138
|
),
|
|
776
|
-
|
|
1139
|
+
r(
|
|
777
1140
|
"span",
|
|
778
1141
|
{ class: "jt-attachment-preview-service__download-text" },
|
|
779
|
-
|
|
1142
|
+
m("common.下载")
|
|
780
1143
|
)
|
|
781
1144
|
]
|
|
782
1145
|
);
|
|
@@ -784,22 +1147,22 @@ function pe(e, t, a, r = !1) {
|
|
|
784
1147
|
function W(e) {
|
|
785
1148
|
return e === "image" || e === "pdf";
|
|
786
1149
|
}
|
|
787
|
-
function
|
|
788
|
-
return
|
|
1150
|
+
function he(e) {
|
|
1151
|
+
return r(
|
|
789
1152
|
"div",
|
|
790
1153
|
{ class: "jt-attachment-preview-service__preview-fallback" },
|
|
791
1154
|
[
|
|
792
|
-
|
|
1155
|
+
r("img", {
|
|
793
1156
|
class: "jt-attachment-preview-service__preview-fallback-icon",
|
|
794
1157
|
src: e.icon,
|
|
795
1158
|
alt: ""
|
|
796
1159
|
}),
|
|
797
|
-
|
|
1160
|
+
r(
|
|
798
1161
|
"div",
|
|
799
1162
|
{ class: "jt-attachment-preview-service__unsupported-text" },
|
|
800
|
-
|
|
1163
|
+
m("common.暂不支持预览此类型的文件")
|
|
801
1164
|
),
|
|
802
|
-
|
|
1165
|
+
r(
|
|
803
1166
|
"div",
|
|
804
1167
|
{
|
|
805
1168
|
class: "jt-attachment-preview-service__file-name",
|
|
@@ -810,53 +1173,53 @@ function ve(e) {
|
|
|
810
1173
|
]
|
|
811
1174
|
);
|
|
812
1175
|
}
|
|
813
|
-
function
|
|
1176
|
+
function re(e, t) {
|
|
814
1177
|
const a = document.createElement("a");
|
|
815
1178
|
a.href = e, a.download = t, a.style.display = "none", document.body.appendChild(a), a.click(), a.remove();
|
|
816
1179
|
}
|
|
817
|
-
function
|
|
1180
|
+
function oe(e, t) {
|
|
818
1181
|
const a = URL.createObjectURL(e);
|
|
819
|
-
|
|
1182
|
+
re(a, t), window.setTimeout(() => URL.revokeObjectURL(a), 1e3);
|
|
820
1183
|
}
|
|
821
|
-
function
|
|
1184
|
+
function N(e) {
|
|
822
1185
|
return e instanceof Blob || Object.prototype.toString.call(e) === "[object Blob]";
|
|
823
1186
|
}
|
|
824
|
-
function
|
|
825
|
-
if (
|
|
1187
|
+
function Dt(e, t) {
|
|
1188
|
+
if (N(e))
|
|
826
1189
|
return e;
|
|
827
1190
|
if (e && typeof e == "object") {
|
|
828
1191
|
const a = e;
|
|
829
|
-
if (
|
|
830
|
-
const
|
|
1192
|
+
if (N(a.data)) {
|
|
1193
|
+
const o = a.data;
|
|
831
1194
|
return {
|
|
832
1195
|
blob: a.data,
|
|
833
|
-
name: a.fileName || a.name ||
|
|
1196
|
+
name: a.fileName || a.name || o.name || t
|
|
834
1197
|
};
|
|
835
1198
|
}
|
|
836
1199
|
}
|
|
837
1200
|
return null;
|
|
838
1201
|
}
|
|
839
|
-
async function
|
|
840
|
-
|
|
1202
|
+
async function Ct(e, t, a = {}) {
|
|
1203
|
+
_("download-start", {
|
|
841
1204
|
url: e,
|
|
842
1205
|
downloadName: t,
|
|
843
1206
|
fallbackToRawUrl: !!a.fallbackToRawUrl,
|
|
844
1207
|
hasRequestInit: !!a.requestInit
|
|
845
1208
|
});
|
|
846
1209
|
try {
|
|
847
|
-
const
|
|
848
|
-
|
|
1210
|
+
const o = await pe(e, a.requestInit);
|
|
1211
|
+
_("download-blob-ready", {
|
|
849
1212
|
url: e,
|
|
850
1213
|
downloadName: t,
|
|
851
|
-
blobType:
|
|
852
|
-
blobSize:
|
|
853
|
-
}),
|
|
1214
|
+
blobType: o.type,
|
|
1215
|
+
blobSize: o.size
|
|
1216
|
+
}), oe(o, t);
|
|
854
1217
|
} catch {
|
|
855
|
-
|
|
1218
|
+
_("download-blob-failed", {
|
|
856
1219
|
url: e,
|
|
857
1220
|
downloadName: t,
|
|
858
1221
|
fallbackToRawUrl: !!a.fallbackToRawUrl
|
|
859
|
-
}), a.fallbackToRawUrl &&
|
|
1222
|
+
}), a.fallbackToRawUrl && re(e, t);
|
|
860
1223
|
}
|
|
861
1224
|
}
|
|
862
1225
|
function ce(e, t) {
|
|
@@ -868,8 +1231,8 @@ function ce(e, t) {
|
|
|
868
1231
|
fallbackToRawUrl: e.fallbackToRawUrl
|
|
869
1232
|
} : null;
|
|
870
1233
|
}
|
|
871
|
-
async function
|
|
872
|
-
const
|
|
1234
|
+
async function fe(e, t, a = {}) {
|
|
1235
|
+
const o = {
|
|
873
1236
|
url: e.url,
|
|
874
1237
|
name: t,
|
|
875
1238
|
params: e.requestParams,
|
|
@@ -877,64 +1240,64 @@ async function he(e, t, a = {}) {
|
|
|
877
1240
|
};
|
|
878
1241
|
try {
|
|
879
1242
|
let n = null;
|
|
880
|
-
if (
|
|
1243
|
+
if (_("download-resolve-start", {
|
|
881
1244
|
url: e.url,
|
|
882
1245
|
downloadName: t,
|
|
883
1246
|
hasCustomDownload: !!e.download,
|
|
884
|
-
hasRegisteredDownload: !!
|
|
1247
|
+
hasRegisteredDownload: !!j?.downloadRequest,
|
|
885
1248
|
useRegisteredDownload: !!e.useRegisteredDownload,
|
|
886
1249
|
hasRequestParams: Object.prototype.hasOwnProperty.call(
|
|
887
1250
|
e,
|
|
888
1251
|
"requestParams"
|
|
889
1252
|
)
|
|
890
1253
|
}), e.download) {
|
|
891
|
-
|
|
1254
|
+
_("download-custom-handler-start", {
|
|
892
1255
|
url: e.url,
|
|
893
1256
|
downloadName: t
|
|
894
1257
|
});
|
|
895
|
-
const
|
|
896
|
-
if (n = ce(
|
|
897
|
-
|
|
1258
|
+
const c = await e.download(o);
|
|
1259
|
+
if (n = ce(c, t), !n) {
|
|
1260
|
+
_("download-custom-handler-done", {
|
|
898
1261
|
url: e.url,
|
|
899
1262
|
downloadName: t
|
|
900
1263
|
});
|
|
901
1264
|
return;
|
|
902
1265
|
}
|
|
903
|
-
} else if (e.useRegisteredDownload &&
|
|
904
|
-
|
|
1266
|
+
} else if (e.useRegisteredDownload && j?.downloadRequest) {
|
|
1267
|
+
_("download-setup-request-start", {
|
|
905
1268
|
url: e.url,
|
|
906
1269
|
downloadName: t,
|
|
907
1270
|
params: e.requestParams
|
|
908
1271
|
});
|
|
909
|
-
const
|
|
1272
|
+
const c = await j.downloadRequest(
|
|
910
1273
|
e.requestParams
|
|
911
1274
|
);
|
|
912
|
-
|
|
913
|
-
isBlob:
|
|
914
|
-
isDataBlob: !!
|
|
915
|
-
responseType: Object.prototype.toString.call(
|
|
1275
|
+
_("download-request-response", {
|
|
1276
|
+
isBlob: N(c),
|
|
1277
|
+
isDataBlob: !!c && typeof c == "object" && N(c.data),
|
|
1278
|
+
responseType: Object.prototype.toString.call(c)
|
|
916
1279
|
});
|
|
917
|
-
const
|
|
918
|
-
|
|
1280
|
+
const b = Dt(c, t), w = b || (j.mapDownloadResponse ? j.mapDownloadResponse(
|
|
1281
|
+
c,
|
|
919
1282
|
e.requestParams
|
|
920
|
-
) :
|
|
921
|
-
n = ce(
|
|
1283
|
+
) : c);
|
|
1284
|
+
n = ce(w, t);
|
|
922
1285
|
}
|
|
923
1286
|
if (n?.blob) {
|
|
924
|
-
|
|
1287
|
+
_("download-result-blob", {
|
|
925
1288
|
downloadName: n.name,
|
|
926
1289
|
blobType: n.blob.type,
|
|
927
1290
|
blobSize: n.blob.size
|
|
928
|
-
}),
|
|
1291
|
+
}), oe(n.blob, n.name);
|
|
929
1292
|
return;
|
|
930
1293
|
}
|
|
931
|
-
const i = n?.url || e.downloadUrl || e.url,
|
|
932
|
-
await
|
|
1294
|
+
const i = n?.url || e.downloadUrl || e.url, v = n?.name || t;
|
|
1295
|
+
await Ct(i, v, {
|
|
933
1296
|
requestInit: n?.requestInit || e.downloadRequestInit,
|
|
934
1297
|
fallbackToRawUrl: n?.fallbackToRawUrl ?? e.downloadFallbackToRawUrl ?? a.fallbackToRawUrl
|
|
935
1298
|
});
|
|
936
1299
|
} catch (n) {
|
|
937
|
-
|
|
1300
|
+
_("download-handler-failed", {
|
|
938
1301
|
url: e.url,
|
|
939
1302
|
downloadName: t,
|
|
940
1303
|
errorName: n instanceof Error ? n.name : "",
|
|
@@ -945,10 +1308,10 @@ async function he(e, t, a = {}) {
|
|
|
945
1308
|
n.response?.data
|
|
946
1309
|
) : void 0,
|
|
947
1310
|
errorResponseDataType: n && typeof n == "object" ? n.response?.data?.type : void 0
|
|
948
|
-
}), a.fallbackToRawUrl &&
|
|
1311
|
+
}), a.fallbackToRawUrl && re(e.downloadUrl || e.url, t);
|
|
949
1312
|
}
|
|
950
1313
|
}
|
|
951
|
-
const
|
|
1314
|
+
const jt = s({
|
|
952
1315
|
name: "JtAttachmentPreviewPdfCanvas",
|
|
953
1316
|
props: {
|
|
954
1317
|
url: {
|
|
@@ -973,99 +1336,99 @@ const rt = x({
|
|
|
973
1336
|
previewError: (e) => e instanceof Event
|
|
974
1337
|
},
|
|
975
1338
|
setup(e, { emit: t }) {
|
|
976
|
-
const a =
|
|
977
|
-
let
|
|
978
|
-
async function
|
|
979
|
-
if (!
|
|
980
|
-
const
|
|
981
|
-
return !Array.isArray(
|
|
1339
|
+
const a = B("loading"), o = B([]), n = B([]), i = /* @__PURE__ */ new Map(), v = B("");
|
|
1340
|
+
let c = null, b = [], w = 0;
|
|
1341
|
+
async function g(u, h) {
|
|
1342
|
+
if (!h) return null;
|
|
1343
|
+
const x = typeof h == "string" ? await u.getDestination(h) : h;
|
|
1344
|
+
return !Array.isArray(x) || !x[0] ? null : await u.getPageIndex(x[0]) + 1;
|
|
982
1345
|
}
|
|
983
|
-
async function
|
|
984
|
-
if (!
|
|
985
|
-
const
|
|
986
|
-
for (const
|
|
987
|
-
const
|
|
988
|
-
|
|
989
|
-
title:
|
|
990
|
-
pageNumber:
|
|
991
|
-
level:
|
|
1346
|
+
async function A(u, h, x = 0) {
|
|
1347
|
+
if (!h?.length) return [];
|
|
1348
|
+
const k = [];
|
|
1349
|
+
for (const M of h) {
|
|
1350
|
+
const F = await g(u, M.dest);
|
|
1351
|
+
k.push({
|
|
1352
|
+
title: M.title || m("common.未命名标题"),
|
|
1353
|
+
pageNumber: F,
|
|
1354
|
+
level: x
|
|
992
1355
|
});
|
|
993
|
-
const
|
|
994
|
-
|
|
1356
|
+
const R = await A(u, M.items, x + 1);
|
|
1357
|
+
k.push(...R);
|
|
995
1358
|
}
|
|
996
|
-
return
|
|
1359
|
+
return k;
|
|
997
1360
|
}
|
|
998
|
-
function
|
|
999
|
-
|
|
1000
|
-
for (const
|
|
1001
|
-
|
|
1002
|
-
|
|
1361
|
+
function y() {
|
|
1362
|
+
w += 1;
|
|
1363
|
+
for (const u of b)
|
|
1364
|
+
u.cancel();
|
|
1365
|
+
b = [], c?.destroy(), c = null, i.clear();
|
|
1003
1366
|
}
|
|
1004
|
-
async function
|
|
1005
|
-
|
|
1006
|
-
const
|
|
1007
|
-
a.value = "loading",
|
|
1367
|
+
async function z() {
|
|
1368
|
+
y();
|
|
1369
|
+
const u = w;
|
|
1370
|
+
a.value = "loading", v.value = "", o.value = [], n.value = [];
|
|
1008
1371
|
try {
|
|
1009
|
-
const
|
|
1010
|
-
if (
|
|
1011
|
-
const
|
|
1012
|
-
if (
|
|
1013
|
-
|
|
1014
|
-
byteLength:
|
|
1015
|
-
}),
|
|
1016
|
-
const
|
|
1017
|
-
if (
|
|
1018
|
-
|
|
1019
|
-
{ length:
|
|
1020
|
-
(
|
|
1021
|
-
), n.value = await
|
|
1022
|
-
|
|
1023
|
-
await
|
|
1024
|
-
), await
|
|
1025
|
-
const
|
|
1026
|
-
(
|
|
1372
|
+
const h = await bt();
|
|
1373
|
+
if (u !== w) return;
|
|
1374
|
+
const x = await At(e.url);
|
|
1375
|
+
if (u !== w) return;
|
|
1376
|
+
_("render-pdf-get-document-data", {
|
|
1377
|
+
byteLength: x.byteLength
|
|
1378
|
+
}), c = h.getDocument({ data: x });
|
|
1379
|
+
const k = await c.promise;
|
|
1380
|
+
if (u !== w) return;
|
|
1381
|
+
o.value = Array.from(
|
|
1382
|
+
{ length: k.numPages },
|
|
1383
|
+
(R, S) => S + 1
|
|
1384
|
+
), n.value = await A(
|
|
1385
|
+
k,
|
|
1386
|
+
await k.getOutline()
|
|
1387
|
+
), await _e();
|
|
1388
|
+
const M = i.values().next().value, F = Math.max(
|
|
1389
|
+
(M?.parentElement?.clientWidth ?? 800) - 32,
|
|
1027
1390
|
320
|
|
1028
1391
|
);
|
|
1029
|
-
for (const
|
|
1030
|
-
if (
|
|
1031
|
-
const
|
|
1032
|
-
if (!
|
|
1033
|
-
const
|
|
1034
|
-
|
|
1035
|
-
const ie =
|
|
1036
|
-
canvas:
|
|
1037
|
-
canvasContext:
|
|
1038
|
-
viewport:
|
|
1392
|
+
for (const R of o.value) {
|
|
1393
|
+
if (u !== w) return;
|
|
1394
|
+
const S = await k.getPage(R), L = i.get(R), V = L?.getContext("2d");
|
|
1395
|
+
if (!L || !V) continue;
|
|
1396
|
+
const G = S.getViewport({ scale: 1 }), f = Math.min(F / G.width, 2), q = S.getViewport({ scale: f }), J = window.devicePixelRatio || 1;
|
|
1397
|
+
L.width = Math.floor(q.width * J), L.height = Math.floor(q.height * J), L.style.width = `${Math.floor(q.width)}px`, L.style.height = `${Math.floor(q.height)}px`, V.setTransform(J, 0, 0, J, 0, 0);
|
|
1398
|
+
const ie = S.render({
|
|
1399
|
+
canvas: L,
|
|
1400
|
+
canvasContext: V,
|
|
1401
|
+
viewport: q
|
|
1039
1402
|
});
|
|
1040
|
-
|
|
1403
|
+
b.push(ie), await ie.promise;
|
|
1041
1404
|
}
|
|
1042
|
-
if (
|
|
1405
|
+
if (u !== w) return;
|
|
1043
1406
|
a.value = "ready", t("previewLoad", new Event("load"));
|
|
1044
|
-
} catch (
|
|
1045
|
-
if (
|
|
1046
|
-
a.value = "error",
|
|
1407
|
+
} catch (h) {
|
|
1408
|
+
if (u !== w) return;
|
|
1409
|
+
a.value = "error", v.value = h instanceof Error ? h.message : m("common.PDF加载失败"), t("previewError", new Event("error"));
|
|
1047
1410
|
}
|
|
1048
1411
|
}
|
|
1049
|
-
$(() => e.url,
|
|
1050
|
-
function P(
|
|
1051
|
-
if (!
|
|
1052
|
-
i.get(
|
|
1412
|
+
$(() => e.url, z, { immediate: !0 }), Y(y);
|
|
1413
|
+
function P(u) {
|
|
1414
|
+
if (!u) return;
|
|
1415
|
+
i.get(u)?.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
1053
1416
|
}
|
|
1054
|
-
return () =>
|
|
1055
|
-
a.value === "loading" ?
|
|
1417
|
+
return () => r("div", { class: "jt-attachment-preview-service__pdf-viewer" }, [
|
|
1418
|
+
a.value === "loading" ? r(
|
|
1056
1419
|
"div",
|
|
1057
1420
|
{ class: "jt-attachment-preview-service__pdf-state" },
|
|
1058
|
-
|
|
1421
|
+
m("common.PDF加载中___")
|
|
1059
1422
|
) : null,
|
|
1060
|
-
a.value === "error" ?
|
|
1061
|
-
|
|
1062
|
-
icon:
|
|
1423
|
+
a.value === "error" ? r("div", { class: "jt-attachment-preview-service__pdf-state" }, [
|
|
1424
|
+
he({
|
|
1425
|
+
icon: vt,
|
|
1063
1426
|
name: e.name
|
|
1064
1427
|
})
|
|
1065
1428
|
]) : null,
|
|
1066
1429
|
null,
|
|
1067
1430
|
null,
|
|
1068
|
-
|
|
1431
|
+
r(
|
|
1069
1432
|
"div",
|
|
1070
1433
|
{
|
|
1071
1434
|
class: [
|
|
@@ -1074,48 +1437,48 @@ const rt = x({
|
|
|
1074
1437
|
]
|
|
1075
1438
|
},
|
|
1076
1439
|
[
|
|
1077
|
-
n.value.length ?
|
|
1440
|
+
n.value.length ? r(
|
|
1078
1441
|
"aside",
|
|
1079
1442
|
{ class: "jt-attachment-preview-service__pdf-outline" },
|
|
1080
1443
|
[
|
|
1081
|
-
|
|
1444
|
+
r(
|
|
1082
1445
|
"div",
|
|
1083
1446
|
{
|
|
1084
1447
|
class: "jt-attachment-preview-service__pdf-outline-title"
|
|
1085
1448
|
},
|
|
1086
|
-
|
|
1449
|
+
m("common.目录")
|
|
1087
1450
|
),
|
|
1088
|
-
|
|
1451
|
+
r(
|
|
1089
1452
|
"div",
|
|
1090
1453
|
{
|
|
1091
1454
|
class: "jt-attachment-preview-service__pdf-outline-list"
|
|
1092
1455
|
},
|
|
1093
1456
|
n.value.map(
|
|
1094
|
-
(
|
|
1457
|
+
(u, h) => r(
|
|
1095
1458
|
"button",
|
|
1096
1459
|
{
|
|
1097
|
-
key: `${
|
|
1460
|
+
key: `${u.title}-${h}`,
|
|
1098
1461
|
class: "jt-attachment-preview-service__pdf-outline-item",
|
|
1099
|
-
style: { paddingLeft: `${12 +
|
|
1462
|
+
style: { paddingLeft: `${12 + u.level * 14}px` },
|
|
1100
1463
|
type: "button",
|
|
1101
|
-
disabled: !
|
|
1102
|
-
title:
|
|
1103
|
-
onClick: () => P(
|
|
1464
|
+
disabled: !u.pageNumber,
|
|
1465
|
+
title: u.title,
|
|
1466
|
+
onClick: () => P(u.pageNumber)
|
|
1104
1467
|
},
|
|
1105
|
-
|
|
1468
|
+
u.title
|
|
1106
1469
|
)
|
|
1107
1470
|
)
|
|
1108
1471
|
)
|
|
1109
1472
|
]
|
|
1110
1473
|
) : null,
|
|
1111
|
-
|
|
1474
|
+
r(
|
|
1112
1475
|
"div",
|
|
1113
1476
|
{ class: "jt-attachment-preview-service__pdf-pages" },
|
|
1114
|
-
|
|
1115
|
-
(
|
|
1116
|
-
key:
|
|
1117
|
-
ref: (
|
|
1118
|
-
|
|
1477
|
+
o.value.map(
|
|
1478
|
+
(u) => r("canvas", {
|
|
1479
|
+
key: u,
|
|
1480
|
+
ref: (h) => {
|
|
1481
|
+
h instanceof HTMLCanvasElement && i.set(u, h);
|
|
1119
1482
|
},
|
|
1120
1483
|
class: "jt-attachment-preview-service__pdf-page"
|
|
1121
1484
|
})
|
|
@@ -1125,7 +1488,7 @@ const rt = x({
|
|
|
1125
1488
|
)
|
|
1126
1489
|
]);
|
|
1127
1490
|
}
|
|
1128
|
-
}),
|
|
1491
|
+
}), Bt = s({
|
|
1129
1492
|
name: "JtAttachmentPreviewImageTransform",
|
|
1130
1493
|
props: {
|
|
1131
1494
|
url: {
|
|
@@ -1154,68 +1517,68 @@ const rt = x({
|
|
|
1154
1517
|
previewError: (e) => e instanceof Event
|
|
1155
1518
|
},
|
|
1156
1519
|
setup(e, { emit: t }) {
|
|
1157
|
-
const a =
|
|
1158
|
-
let
|
|
1159
|
-
const
|
|
1520
|
+
const a = B(null), o = B("ready"), n = B(1), i = B(!1);
|
|
1521
|
+
let v = 0, c = 0, b = 0, w = 0, g = 0, A = 0, y = 0;
|
|
1522
|
+
const z = E(
|
|
1160
1523
|
() => ({
|
|
1161
1524
|
"--jt-attachment-preview-service-image-fit": e.fit,
|
|
1162
|
-
transform: `translate(${
|
|
1525
|
+
transform: `translate(${v}px, ${c}px) scale(${n.value})`
|
|
1163
1526
|
})
|
|
1164
1527
|
);
|
|
1165
1528
|
function P() {
|
|
1166
|
-
a.value && (a.value.style.transform = `translate(${
|
|
1529
|
+
a.value && (a.value.style.transform = `translate(${v}px, ${c}px) scale(${n.value})`);
|
|
1167
1530
|
}
|
|
1168
|
-
function
|
|
1169
|
-
|
|
1170
|
-
|
|
1531
|
+
function u() {
|
|
1532
|
+
y || (y = window.requestAnimationFrame(() => {
|
|
1533
|
+
y = 0, P();
|
|
1171
1534
|
}));
|
|
1172
1535
|
}
|
|
1173
|
-
function
|
|
1174
|
-
n.value = Math.min(Math.max(Number(
|
|
1536
|
+
function h(f) {
|
|
1537
|
+
n.value = Math.min(Math.max(Number(f.toFixed(2)), 0.2), 5), n.value <= 1 && (v = 0, c = 0), P();
|
|
1175
1538
|
}
|
|
1176
|
-
function
|
|
1177
|
-
|
|
1539
|
+
function x() {
|
|
1540
|
+
h(n.value + 0.2);
|
|
1178
1541
|
}
|
|
1179
|
-
function
|
|
1180
|
-
const
|
|
1181
|
-
n.value =
|
|
1542
|
+
function k() {
|
|
1543
|
+
const f = Math.max(Number((n.value - 0.2).toFixed(2)), 0.2);
|
|
1544
|
+
n.value = f, f <= 1 && (v = 0, c = 0), P();
|
|
1182
1545
|
}
|
|
1183
|
-
function
|
|
1184
|
-
|
|
1546
|
+
function M() {
|
|
1547
|
+
v = 0, c = 0, h(1);
|
|
1185
1548
|
}
|
|
1186
|
-
function
|
|
1187
|
-
|
|
1549
|
+
function F(f) {
|
|
1550
|
+
o.value = "ready", t("previewLoad", f);
|
|
1188
1551
|
}
|
|
1189
|
-
function
|
|
1190
|
-
|
|
1552
|
+
function R(f) {
|
|
1553
|
+
o.value = "error", t("previewError", f);
|
|
1191
1554
|
}
|
|
1192
|
-
function
|
|
1193
|
-
n.value <= 1 || (
|
|
1555
|
+
function S(f) {
|
|
1556
|
+
n.value <= 1 || (f.preventDefault(), i.value = !0, b = f.clientX, w = f.clientY, g = v, A = c, window.addEventListener("pointermove", L), window.addEventListener("pointerup", V, { once: !0 }));
|
|
1194
1557
|
}
|
|
1195
|
-
function
|
|
1196
|
-
i.value && (
|
|
1558
|
+
function L(f) {
|
|
1559
|
+
i.value && (v = g + f.clientX - b, c = A + f.clientY - w, u());
|
|
1197
1560
|
}
|
|
1198
|
-
function
|
|
1199
|
-
i.value = !1, window.removeEventListener("pointermove",
|
|
1561
|
+
function V() {
|
|
1562
|
+
i.value = !1, window.removeEventListener("pointermove", L);
|
|
1200
1563
|
}
|
|
1201
|
-
function
|
|
1202
|
-
|
|
1564
|
+
function G(f) {
|
|
1565
|
+
f.preventDefault(), h(n.value + (f.deltaY < 0 ? 0.1 : -0.1));
|
|
1203
1566
|
}
|
|
1204
1567
|
return ee(P), $(
|
|
1205
1568
|
() => e.url,
|
|
1206
1569
|
() => {
|
|
1207
|
-
|
|
1570
|
+
o.value = "ready", M();
|
|
1208
1571
|
}
|
|
1209
|
-
),
|
|
1210
|
-
window.removeEventListener("pointermove",
|
|
1211
|
-
}), () =>
|
|
1572
|
+
), Y(() => {
|
|
1573
|
+
window.removeEventListener("pointermove", L), y && window.cancelAnimationFrame(y);
|
|
1574
|
+
}), () => r(
|
|
1212
1575
|
"div",
|
|
1213
1576
|
{ class: "jt-attachment-preview-service__image-viewer" },
|
|
1214
|
-
|
|
1215
|
-
icon:
|
|
1577
|
+
o.value === "error" ? he({
|
|
1578
|
+
icon: pt,
|
|
1216
1579
|
name: e.name
|
|
1217
1580
|
}) : [
|
|
1218
|
-
|
|
1581
|
+
r("img", {
|
|
1219
1582
|
ref: a,
|
|
1220
1583
|
class: [
|
|
1221
1584
|
"jt-attachment-preview-service__media",
|
|
@@ -1225,59 +1588,59 @@ const rt = x({
|
|
|
1225
1588
|
],
|
|
1226
1589
|
src: e.url,
|
|
1227
1590
|
alt: e.name,
|
|
1228
|
-
style:
|
|
1229
|
-
onLoad:
|
|
1230
|
-
onError:
|
|
1231
|
-
onPointerdown:
|
|
1232
|
-
onWheel:
|
|
1233
|
-
onDragstart: (
|
|
1591
|
+
style: z.value,
|
|
1592
|
+
onLoad: F,
|
|
1593
|
+
onError: R,
|
|
1594
|
+
onPointerdown: S,
|
|
1595
|
+
onWheel: G,
|
|
1596
|
+
onDragstart: (f) => f.preventDefault(),
|
|
1234
1597
|
draggable: !1
|
|
1235
1598
|
}),
|
|
1236
|
-
|
|
1599
|
+
r(
|
|
1237
1600
|
"div",
|
|
1238
1601
|
{ class: "jt-attachment-preview-service__image-toolbar" },
|
|
1239
1602
|
[
|
|
1240
|
-
|
|
1603
|
+
r(
|
|
1241
1604
|
"button",
|
|
1242
1605
|
{
|
|
1243
1606
|
class: "jt-attachment-preview-service__image-tool",
|
|
1244
1607
|
type: "button",
|
|
1245
|
-
title:
|
|
1246
|
-
onClick:
|
|
1608
|
+
title: m("common.缩小"),
|
|
1609
|
+
onClick: k
|
|
1247
1610
|
},
|
|
1248
|
-
[
|
|
1611
|
+
[r(O, () => r(dt))]
|
|
1249
1612
|
),
|
|
1250
|
-
|
|
1613
|
+
r(
|
|
1251
1614
|
"span",
|
|
1252
1615
|
{ class: "jt-attachment-preview-service__image-scale" },
|
|
1253
1616
|
`${Math.round(n.value * 100)}%`
|
|
1254
1617
|
),
|
|
1255
|
-
|
|
1618
|
+
r(
|
|
1256
1619
|
"button",
|
|
1257
1620
|
{
|
|
1258
1621
|
class: "jt-attachment-preview-service__image-tool",
|
|
1259
1622
|
type: "button",
|
|
1260
|
-
title:
|
|
1261
|
-
onClick:
|
|
1623
|
+
title: m("common.放大"),
|
|
1624
|
+
onClick: x
|
|
1262
1625
|
},
|
|
1263
|
-
[
|
|
1626
|
+
[r(O, () => r(ut))]
|
|
1264
1627
|
),
|
|
1265
|
-
|
|
1628
|
+
r(
|
|
1266
1629
|
"button",
|
|
1267
1630
|
{
|
|
1268
1631
|
class: "jt-attachment-preview-service__image-tool",
|
|
1269
1632
|
type: "button",
|
|
1270
|
-
title:
|
|
1271
|
-
onClick:
|
|
1633
|
+
title: m("common.复位"),
|
|
1634
|
+
onClick: M
|
|
1272
1635
|
},
|
|
1273
|
-
[
|
|
1636
|
+
[r(O, () => r(ot))]
|
|
1274
1637
|
)
|
|
1275
1638
|
]
|
|
1276
1639
|
)
|
|
1277
1640
|
]
|
|
1278
1641
|
);
|
|
1279
1642
|
}
|
|
1280
|
-
}),
|
|
1643
|
+
}), Mt = s({
|
|
1281
1644
|
name: "JtAttachmentPreviewService",
|
|
1282
1645
|
props: {
|
|
1283
1646
|
options: {
|
|
@@ -1294,45 +1657,45 @@ const rt = x({
|
|
|
1294
1657
|
() => ae(e.options.url, e.options.name)
|
|
1295
1658
|
), a = E(
|
|
1296
1659
|
() => e.options.downloadName || t.value
|
|
1297
|
-
),
|
|
1298
|
-
() =>
|
|
1660
|
+
), o = E(() => de(e.options)), n = E(
|
|
1661
|
+
() => Pt(o.value, e.options.url)
|
|
1299
1662
|
), i = E(
|
|
1300
1663
|
() => ({
|
|
1301
1664
|
zIndex: e.options.zIndex ?? 3e3,
|
|
1302
1665
|
"--jt-attachment-preview-service-image-fit": e.options.fit ?? "contain"
|
|
1303
1666
|
})
|
|
1304
1667
|
);
|
|
1305
|
-
function
|
|
1668
|
+
function v() {
|
|
1306
1669
|
e.options.onClose?.(), e.onDestroy();
|
|
1307
1670
|
}
|
|
1308
|
-
function
|
|
1309
|
-
|
|
1671
|
+
function c(g) {
|
|
1672
|
+
g.key === "Escape" && e.options.closeOnPressEscape !== !1 && v();
|
|
1310
1673
|
}
|
|
1311
|
-
function
|
|
1312
|
-
e.options.onLoad?.(
|
|
1674
|
+
function b(g) {
|
|
1675
|
+
e.options.onLoad?.(g);
|
|
1313
1676
|
}
|
|
1314
|
-
function
|
|
1315
|
-
e.options.onError?.(
|
|
1677
|
+
function w(g) {
|
|
1678
|
+
e.options.onError?.(g);
|
|
1316
1679
|
}
|
|
1317
1680
|
return ee(() => {
|
|
1318
|
-
document.addEventListener("keydown",
|
|
1319
|
-
}),
|
|
1320
|
-
document.removeEventListener("keydown",
|
|
1681
|
+
document.addEventListener("keydown", c), document.body.classList.add("jt-attachment-preview-service-lock");
|
|
1682
|
+
}), Y(() => {
|
|
1683
|
+
document.removeEventListener("keydown", c), document.body.classList.remove("jt-attachment-preview-service-lock");
|
|
1321
1684
|
}), () => {
|
|
1322
|
-
const
|
|
1323
|
-
|
|
1685
|
+
const g = e.options.downloadable === !1 ? [] : [
|
|
1686
|
+
ve(
|
|
1324
1687
|
e.options,
|
|
1325
1688
|
a.value,
|
|
1326
1689
|
"jt-attachment-preview-service__top-download"
|
|
1327
1690
|
)
|
|
1328
1691
|
];
|
|
1329
|
-
return
|
|
1692
|
+
return r(
|
|
1330
1693
|
"div",
|
|
1331
1694
|
{ class: "jt-attachment-preview-service", style: i.value },
|
|
1332
1695
|
[
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1696
|
+
r("div", { class: "jt-attachment-preview-service__modal" }, [
|
|
1697
|
+
r("div", { class: "jt-attachment-preview-service__header" }, [
|
|
1698
|
+
r(
|
|
1336
1699
|
"div",
|
|
1337
1700
|
{
|
|
1338
1701
|
class: "jt-attachment-preview-service__filename",
|
|
@@ -1340,27 +1703,27 @@ const rt = x({
|
|
|
1340
1703
|
},
|
|
1341
1704
|
t.value
|
|
1342
1705
|
),
|
|
1343
|
-
|
|
1706
|
+
r(
|
|
1344
1707
|
"div",
|
|
1345
1708
|
{ class: "jt-attachment-preview-service__header-actions" },
|
|
1346
1709
|
[
|
|
1347
|
-
...
|
|
1348
|
-
|
|
1710
|
+
...g,
|
|
1711
|
+
r(
|
|
1349
1712
|
"button",
|
|
1350
1713
|
{
|
|
1351
1714
|
class: "jt-attachment-preview-service__close",
|
|
1352
1715
|
type: "button",
|
|
1353
|
-
"aria-label":
|
|
1354
|
-
onClick:
|
|
1716
|
+
"aria-label": m("common.关闭"),
|
|
1717
|
+
onClick: v
|
|
1355
1718
|
},
|
|
1356
1719
|
"×"
|
|
1357
1720
|
)
|
|
1358
1721
|
]
|
|
1359
1722
|
)
|
|
1360
1723
|
]),
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
type:
|
|
1724
|
+
r("div", { class: "jt-attachment-preview-service__body" }, [
|
|
1725
|
+
Et({
|
|
1726
|
+
type: o.value,
|
|
1364
1727
|
url: e.options.url,
|
|
1365
1728
|
name: t.value,
|
|
1366
1729
|
downloadName: a.value,
|
|
@@ -1368,8 +1731,8 @@ const rt = x({
|
|
|
1368
1731
|
sandbox: e.options.sandbox,
|
|
1369
1732
|
iconText: n.value,
|
|
1370
1733
|
downloadable: e.options.downloadable !== !1,
|
|
1371
|
-
onLoad:
|
|
1372
|
-
onError:
|
|
1734
|
+
onLoad: b,
|
|
1735
|
+
onError: w
|
|
1373
1736
|
})
|
|
1374
1737
|
])
|
|
1375
1738
|
])
|
|
@@ -1377,7 +1740,7 @@ const rt = x({
|
|
|
1377
1740
|
);
|
|
1378
1741
|
};
|
|
1379
1742
|
}
|
|
1380
|
-
}),
|
|
1743
|
+
}), I = s({
|
|
1381
1744
|
name: "JtAttachmentPreviewDetectingService",
|
|
1382
1745
|
props: {
|
|
1383
1746
|
options: {
|
|
@@ -1390,11 +1753,11 @@ const rt = x({
|
|
|
1390
1753
|
},
|
|
1391
1754
|
title: {
|
|
1392
1755
|
type: String,
|
|
1393
|
-
default:
|
|
1756
|
+
default: m("common.正在识别文件类型")
|
|
1394
1757
|
},
|
|
1395
1758
|
desc: {
|
|
1396
1759
|
type: String,
|
|
1397
|
-
default:
|
|
1760
|
+
default: m("common.请稍候,识别完成后将自动预览或下载")
|
|
1398
1761
|
},
|
|
1399
1762
|
spinning: {
|
|
1400
1763
|
type: Boolean,
|
|
@@ -1407,23 +1770,23 @@ const rt = x({
|
|
|
1407
1770
|
), a = E(() => ({
|
|
1408
1771
|
zIndex: e.options.zIndex ?? 3e3
|
|
1409
1772
|
}));
|
|
1410
|
-
function
|
|
1773
|
+
function o() {
|
|
1411
1774
|
e.options.onClose?.(), e.onDestroy();
|
|
1412
1775
|
}
|
|
1413
1776
|
function n(i) {
|
|
1414
|
-
i.key === "Escape" && e.options.closeOnPressEscape !== !1 &&
|
|
1777
|
+
i.key === "Escape" && e.options.closeOnPressEscape !== !1 && o();
|
|
1415
1778
|
}
|
|
1416
1779
|
return ee(() => {
|
|
1417
1780
|
document.addEventListener("keydown", n), document.body.classList.add("jt-attachment-preview-service-lock");
|
|
1418
|
-
}),
|
|
1781
|
+
}), Y(() => {
|
|
1419
1782
|
document.removeEventListener("keydown", n), document.body.classList.remove("jt-attachment-preview-service-lock");
|
|
1420
|
-
}), () =>
|
|
1783
|
+
}), () => r(
|
|
1421
1784
|
"div",
|
|
1422
1785
|
{ class: "jt-attachment-preview-service", style: a.value },
|
|
1423
1786
|
[
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1787
|
+
r("div", { class: "jt-attachment-preview-service__modal" }, [
|
|
1788
|
+
r("div", { class: "jt-attachment-preview-service__header" }, [
|
|
1789
|
+
r(
|
|
1427
1790
|
"div",
|
|
1428
1791
|
{
|
|
1429
1792
|
class: "jt-attachment-preview-service__filename",
|
|
@@ -1431,34 +1794,34 @@ const rt = x({
|
|
|
1431
1794
|
},
|
|
1432
1795
|
t.value
|
|
1433
1796
|
),
|
|
1434
|
-
|
|
1797
|
+
r(
|
|
1435
1798
|
"div",
|
|
1436
1799
|
{ class: "jt-attachment-preview-service__header-actions" },
|
|
1437
1800
|
[
|
|
1438
|
-
|
|
1801
|
+
r(
|
|
1439
1802
|
"button",
|
|
1440
1803
|
{
|
|
1441
1804
|
class: "jt-attachment-preview-service__close",
|
|
1442
1805
|
type: "button",
|
|
1443
|
-
"aria-label":
|
|
1444
|
-
onClick:
|
|
1806
|
+
"aria-label": m("common.关闭"),
|
|
1807
|
+
onClick: o
|
|
1445
1808
|
},
|
|
1446
1809
|
"×"
|
|
1447
1810
|
)
|
|
1448
1811
|
]
|
|
1449
1812
|
)
|
|
1450
1813
|
]),
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
e.spinning ?
|
|
1814
|
+
r("div", { class: "jt-attachment-preview-service__body" }, [
|
|
1815
|
+
r("div", { class: "jt-attachment-preview-service__detecting" }, [
|
|
1816
|
+
e.spinning ? r("span", {
|
|
1454
1817
|
class: "jt-attachment-preview-service__detecting-spinner"
|
|
1455
1818
|
}) : null,
|
|
1456
|
-
|
|
1819
|
+
r(
|
|
1457
1820
|
"span",
|
|
1458
1821
|
{ class: "jt-attachment-preview-service__detecting-title" },
|
|
1459
1822
|
e.title
|
|
1460
1823
|
),
|
|
1461
|
-
|
|
1824
|
+
r(
|
|
1462
1825
|
"span",
|
|
1463
1826
|
{ class: "jt-attachment-preview-service__detecting-desc" },
|
|
1464
1827
|
e.desc
|
|
@@ -1470,57 +1833,57 @@ const rt = x({
|
|
|
1470
1833
|
);
|
|
1471
1834
|
}
|
|
1472
1835
|
});
|
|
1473
|
-
function
|
|
1474
|
-
return e.type === "empty" ?
|
|
1836
|
+
function Et(e) {
|
|
1837
|
+
return e.type === "empty" ? r(
|
|
1475
1838
|
"div",
|
|
1476
1839
|
{ class: "jt-attachment-preview-service__empty" },
|
|
1477
|
-
|
|
1478
|
-
) : e.type === "image" ?
|
|
1840
|
+
m("common.暂无附件")
|
|
1841
|
+
) : e.type === "image" ? r(Bt, {
|
|
1479
1842
|
url: e.url,
|
|
1480
1843
|
name: e.name,
|
|
1481
1844
|
downloadName: e.downloadName,
|
|
1482
1845
|
downloadable: e.downloadable,
|
|
1483
1846
|
onPreviewLoad: e.onLoad,
|
|
1484
1847
|
onPreviewError: e.onError
|
|
1485
|
-
}) : e.type === "video" ?
|
|
1848
|
+
}) : e.type === "video" ? r("video", {
|
|
1486
1849
|
class: "jt-attachment-preview-service__media",
|
|
1487
1850
|
src: e.url,
|
|
1488
1851
|
controls: !0,
|
|
1489
1852
|
onLoadeddata: e.onLoad,
|
|
1490
1853
|
onError: e.onError
|
|
1491
|
-
}) : e.type === "audio" ?
|
|
1854
|
+
}) : e.type === "audio" ? r("audio", {
|
|
1492
1855
|
class: "jt-attachment-preview-service__audio",
|
|
1493
1856
|
src: e.url,
|
|
1494
1857
|
controls: !0,
|
|
1495
1858
|
onLoadeddata: e.onLoad,
|
|
1496
1859
|
onError: e.onError
|
|
1497
|
-
}) : e.type === "pdf" ?
|
|
1860
|
+
}) : e.type === "pdf" ? r(jt, {
|
|
1498
1861
|
url: e.url,
|
|
1499
1862
|
name: e.name,
|
|
1500
1863
|
downloadName: e.downloadName,
|
|
1501
1864
|
downloadable: e.downloadable,
|
|
1502
1865
|
onPreviewLoad: e.onLoad,
|
|
1503
1866
|
onPreviewError: e.onError
|
|
1504
|
-
}) : e.type === "iframe" ?
|
|
1867
|
+
}) : e.type === "iframe" ? r("iframe", {
|
|
1505
1868
|
class: "jt-attachment-preview-service__iframe",
|
|
1506
1869
|
src: e.url,
|
|
1507
1870
|
title: e.name,
|
|
1508
1871
|
sandbox: e.sandbox || void 0,
|
|
1509
1872
|
onLoad: e.onLoad
|
|
1510
|
-
}) :
|
|
1511
|
-
|
|
1512
|
-
|
|
1873
|
+
}) : r("div", { class: "jt-attachment-preview-service__unsupported" }, [
|
|
1874
|
+
r("div", { class: "jt-attachment-preview-service__file-card" }, [
|
|
1875
|
+
r(
|
|
1513
1876
|
"div",
|
|
1514
1877
|
{ class: "jt-attachment-preview-service__file-icon" },
|
|
1515
1878
|
e.iconText
|
|
1516
1879
|
),
|
|
1517
|
-
|
|
1880
|
+
r(
|
|
1518
1881
|
"div",
|
|
1519
1882
|
{ class: "jt-attachment-preview-service__unsupported-text" },
|
|
1520
|
-
|
|
1883
|
+
m("common.暂不支持预览此类型的文件")
|
|
1521
1884
|
)
|
|
1522
1885
|
]),
|
|
1523
|
-
|
|
1886
|
+
r(
|
|
1524
1887
|
"div",
|
|
1525
1888
|
{
|
|
1526
1889
|
class: "jt-attachment-preview-service__file-name",
|
|
@@ -1528,159 +1891,182 @@ function st(e) {
|
|
|
1528
1891
|
},
|
|
1529
1892
|
e.name
|
|
1530
1893
|
),
|
|
1531
|
-
e.downloadable ?
|
|
1894
|
+
e.downloadable ? ve(
|
|
1532
1895
|
e.sourceOptions,
|
|
1533
1896
|
e.downloadName,
|
|
1534
1897
|
"jt-attachment-preview-service__primary-download"
|
|
1535
1898
|
) : null
|
|
1536
1899
|
]);
|
|
1537
1900
|
}
|
|
1538
|
-
function
|
|
1901
|
+
function we(e) {
|
|
1539
1902
|
if (typeof document > "u")
|
|
1540
1903
|
return { close: () => {
|
|
1541
1904
|
} };
|
|
1542
|
-
|
|
1905
|
+
_("open-called", {
|
|
1543
1906
|
rawOptions: typeof e == "string" ? e : { ...e }
|
|
1544
|
-
}),
|
|
1545
|
-
const t =
|
|
1907
|
+
}), C?.close();
|
|
1908
|
+
const t = yt(
|
|
1546
1909
|
e
|
|
1547
1910
|
), a = t.downloadName || ae(t.url, t.name);
|
|
1548
|
-
let
|
|
1549
|
-
const
|
|
1550
|
-
|
|
1911
|
+
let o = !1, n = null, i = null;
|
|
1912
|
+
const v = () => {
|
|
1913
|
+
o = !0, n && (D(null, n), n.remove(), n = null), i && (URL.revokeObjectURL(i), i = null), C?.close === v && (C = null);
|
|
1551
1914
|
};
|
|
1552
|
-
function
|
|
1553
|
-
|
|
1554
|
-
|
|
1915
|
+
function c() {
|
|
1916
|
+
o || (n || (n = document.createElement("div"), document.body.appendChild(n)), D(
|
|
1917
|
+
r(Mt, {
|
|
1555
1918
|
options: t,
|
|
1556
|
-
onDestroy:
|
|
1919
|
+
onDestroy: v
|
|
1557
1920
|
}),
|
|
1558
1921
|
n
|
|
1559
1922
|
));
|
|
1560
1923
|
}
|
|
1561
|
-
function
|
|
1562
|
-
|
|
1563
|
-
|
|
1924
|
+
function b() {
|
|
1925
|
+
o || (n || (n = document.createElement("div"), document.body.appendChild(n)), D(
|
|
1926
|
+
r(I, {
|
|
1564
1927
|
options: t,
|
|
1565
|
-
onDestroy:
|
|
1928
|
+
onDestroy: v
|
|
1566
1929
|
}),
|
|
1567
1930
|
n
|
|
1568
1931
|
));
|
|
1569
1932
|
}
|
|
1570
|
-
function
|
|
1571
|
-
n && (
|
|
1933
|
+
function w() {
|
|
1934
|
+
n && (D(null, n), n.remove(), n = null);
|
|
1572
1935
|
}
|
|
1573
|
-
function
|
|
1574
|
-
|
|
1936
|
+
function g() {
|
|
1937
|
+
o || fe(t, a, {
|
|
1575
1938
|
fallbackToRawUrl: !0
|
|
1576
1939
|
});
|
|
1577
1940
|
}
|
|
1578
|
-
const
|
|
1579
|
-
return
|
|
1580
|
-
resolvedType:
|
|
1941
|
+
const A = de(t);
|
|
1942
|
+
return _("type-resolved", {
|
|
1943
|
+
resolvedType: A,
|
|
1581
1944
|
url: t.url,
|
|
1582
1945
|
name: t.name,
|
|
1583
1946
|
mode: t.mode,
|
|
1584
1947
|
mimeType: t.mimeType,
|
|
1585
1948
|
extension: t.extension
|
|
1586
|
-
}), W(
|
|
1587
|
-
if (!
|
|
1588
|
-
if (W(
|
|
1589
|
-
t.mode =
|
|
1949
|
+
}), W(A) ? c() : A === "unknown" ? (b(), Lt(t.url).then(async (y) => {
|
|
1950
|
+
if (!o) {
|
|
1951
|
+
if (W(y)) {
|
|
1952
|
+
t.mode = y, c();
|
|
1590
1953
|
return;
|
|
1591
1954
|
}
|
|
1592
1955
|
try {
|
|
1593
|
-
const
|
|
1956
|
+
const z = await pe(t.url), P = ne(z.type);
|
|
1594
1957
|
if (W(P)) {
|
|
1595
|
-
i = URL.createObjectURL(
|
|
1958
|
+
i = URL.createObjectURL(z), t.url = i, t.mode = P, c();
|
|
1596
1959
|
return;
|
|
1597
1960
|
}
|
|
1598
|
-
|
|
1961
|
+
w(), oe(z, a);
|
|
1599
1962
|
} catch {
|
|
1600
|
-
|
|
1963
|
+
w(), g();
|
|
1601
1964
|
}
|
|
1602
1965
|
}
|
|
1603
|
-
})) :
|
|
1966
|
+
})) : g(), C = { close: v }, C;
|
|
1604
1967
|
}
|
|
1605
|
-
function
|
|
1606
|
-
|
|
1968
|
+
function zt(e) {
|
|
1969
|
+
j = e;
|
|
1607
1970
|
}
|
|
1608
|
-
function
|
|
1971
|
+
function Rt(e) {
|
|
1609
1972
|
if (typeof document > "u")
|
|
1610
1973
|
return { close: () => {
|
|
1611
1974
|
} };
|
|
1612
|
-
|
|
1975
|
+
C?.close();
|
|
1613
1976
|
let t = !1, a = document.createElement("div");
|
|
1614
1977
|
document.body.appendChild(a);
|
|
1615
|
-
const
|
|
1616
|
-
t = !0, a && (
|
|
1617
|
-
}, n = { close:
|
|
1618
|
-
return
|
|
1619
|
-
|
|
1620
|
-
options: { url: "", name:
|
|
1621
|
-
title:
|
|
1622
|
-
desc:
|
|
1978
|
+
const o = () => {
|
|
1979
|
+
t = !0, a && (D(null, a), a.remove(), a = null), C?.close === o && (C = null);
|
|
1980
|
+
}, n = { close: o };
|
|
1981
|
+
return C = n, j ? (D(
|
|
1982
|
+
r(I, {
|
|
1983
|
+
options: { url: "", name: m("common.附件预览") },
|
|
1984
|
+
title: m("common.正在获取文件信息"),
|
|
1985
|
+
desc: m("common.请稍候,获取完成后将自动预览或下载"),
|
|
1623
1986
|
spinning: !0,
|
|
1624
|
-
onDestroy:
|
|
1987
|
+
onDestroy: o
|
|
1625
1988
|
}),
|
|
1626
1989
|
a
|
|
1627
|
-
),
|
|
1990
|
+
), j.request(e).then((i) => {
|
|
1628
1991
|
if (t) return;
|
|
1629
|
-
const
|
|
1630
|
-
if (!
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
options: { url: "", name:
|
|
1634
|
-
title:
|
|
1635
|
-
desc:
|
|
1992
|
+
const v = j?.mapResponse(i, e);
|
|
1993
|
+
if (!v?.url) {
|
|
1994
|
+
D(
|
|
1995
|
+
r(I, {
|
|
1996
|
+
options: { url: "", name: m("common.附件预览") },
|
|
1997
|
+
title: m("common.文件信息缺少URL"),
|
|
1998
|
+
desc: m("common.请检查mapResponse是否返回了url字段"),
|
|
1636
1999
|
spinning: !1,
|
|
1637
|
-
onDestroy:
|
|
2000
|
+
onDestroy: o
|
|
1638
2001
|
}),
|
|
1639
2002
|
a
|
|
1640
2003
|
);
|
|
1641
2004
|
return;
|
|
1642
2005
|
}
|
|
1643
|
-
|
|
1644
|
-
...
|
|
2006
|
+
we({
|
|
2007
|
+
...v,
|
|
1645
2008
|
requestParams: e,
|
|
1646
2009
|
useRegisteredDownload: !0
|
|
1647
2010
|
});
|
|
1648
2011
|
}).catch((i) => {
|
|
1649
2012
|
if (t) return;
|
|
1650
|
-
const
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
options: { url: "", name:
|
|
1654
|
-
title:
|
|
1655
|
-
desc:
|
|
2013
|
+
const v = i instanceof Error ? i.message : m("common.接口请求失败");
|
|
2014
|
+
D(
|
|
2015
|
+
r(I, {
|
|
2016
|
+
options: { url: "", name: m("common.附件预览") },
|
|
2017
|
+
title: m("common.文件信息获取失败"),
|
|
2018
|
+
desc: v,
|
|
1656
2019
|
spinning: !1,
|
|
1657
|
-
onDestroy:
|
|
2020
|
+
onDestroy: o
|
|
1658
2021
|
}),
|
|
1659
2022
|
a
|
|
1660
2023
|
);
|
|
1661
|
-
}), n) : (
|
|
1662
|
-
|
|
1663
|
-
options: { url: "", name:
|
|
1664
|
-
title:
|
|
1665
|
-
desc:
|
|
2024
|
+
}), n) : (D(
|
|
2025
|
+
r(I, {
|
|
2026
|
+
options: { url: "", name: m("common.附件预览") },
|
|
2027
|
+
title: m("common.附件预览未初始化"),
|
|
2028
|
+
desc: m("common.请先调用setupJtAttachmentPreview注册请求配置"),
|
|
1666
2029
|
spinning: !1,
|
|
1667
|
-
onDestroy:
|
|
2030
|
+
onDestroy: o
|
|
1668
2031
|
}),
|
|
1669
2032
|
a
|
|
1670
2033
|
), n);
|
|
1671
2034
|
}
|
|
1672
|
-
const
|
|
1673
|
-
openByParams:
|
|
1674
|
-
setup:
|
|
2035
|
+
const ua = Object.assign(we, {
|
|
2036
|
+
openByParams: Rt,
|
|
2037
|
+
setup: zt
|
|
1675
2038
|
});
|
|
1676
2039
|
export {
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
2040
|
+
zt as A,
|
|
2041
|
+
la as B,
|
|
2042
|
+
m as C,
|
|
2043
|
+
sa as D,
|
|
2044
|
+
ca as E,
|
|
2045
|
+
ua as J,
|
|
2046
|
+
Rt as a,
|
|
2047
|
+
Ut as b,
|
|
2048
|
+
Jt as c,
|
|
2049
|
+
Ot as d,
|
|
2050
|
+
Ht as e,
|
|
2051
|
+
Nt as f,
|
|
2052
|
+
Yt as g,
|
|
2053
|
+
Gt as h,
|
|
2054
|
+
Wt as i,
|
|
2055
|
+
Kt as j,
|
|
2056
|
+
Qt as k,
|
|
2057
|
+
Xt as l,
|
|
2058
|
+
Zt as m,
|
|
2059
|
+
$t as n,
|
|
2060
|
+
Vt as o,
|
|
2061
|
+
ea as p,
|
|
2062
|
+
ta as q,
|
|
2063
|
+
It as r,
|
|
2064
|
+
aa as s,
|
|
2065
|
+
na as t,
|
|
2066
|
+
ra as u,
|
|
2067
|
+
H as v,
|
|
2068
|
+
oa as w,
|
|
2069
|
+
ia as x,
|
|
2070
|
+
qt as y,
|
|
2071
|
+
Ft as z
|
|
1686
2072
|
};
|