@eternalheart/vue-file-preview 1.6.13 → 1.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/README.md +4 -0
  2. package/README.zh-CN.md +4 -0
  3. package/lib/FilePreviewContent.vue.d.ts +25 -6
  4. package/lib/FilePreviewEmbed.vue.d.ts +19 -6
  5. package/lib/FilePreviewModal.vue.d.ts +19 -6
  6. package/lib/chunks/{EmptyState.vue_vue_type_script_setup_true_lang-C7qk6wj0.mjs → EmptyState.vue_vue_type_script_setup_true_lang-DSQp7H-K.mjs} +1 -1
  7. package/lib/chunks/{avifLoader-CAUzjn-d-C0KRpetN.mjs → avifLoader-CAUzjn-d-Cf00sjt2.mjs} +1 -1
  8. package/lib/chunks/{heicLoader-D_9PukkA-Czof_5FJ.mjs → heicLoader-D_9PukkA-cn1P7b2x.mjs} +1 -1
  9. package/lib/chunks/{index-BASg1cr4.mjs → index-0VXtKKev.mjs} +1018 -1018
  10. package/lib/chunks/index-0fXL30y0.mjs +333 -0
  11. package/lib/chunks/{index-C9mAajbD.mjs → index-B1AwVHWI.mjs} +191 -191
  12. package/lib/chunks/{index-BvBqDq3O.mjs → index-B77rFiau.mjs} +2023 -2023
  13. package/lib/chunks/index-BB10as16.mjs +108 -0
  14. package/lib/chunks/index-BBIn-k4u.mjs +359 -0
  15. package/lib/chunks/index-BSzaI9ea.mjs +122 -0
  16. package/lib/chunks/index-BZvy39tn.mjs +117 -0
  17. package/lib/chunks/index-BlJEM2Lb.mjs +383 -0
  18. package/lib/chunks/{index-CxKZKUJj.mjs → index-CZlnxQFA.mjs} +1385 -1385
  19. package/lib/chunks/index-ClhTPqDI.mjs +137 -0
  20. package/lib/chunks/{index-8Vpbg2kS.mjs → index-D690gnNu.mjs} +118 -117
  21. package/lib/chunks/index-D7WykPYL.mjs +51 -0
  22. package/lib/chunks/{index-DZZN3kYi.mjs → index-DBzyeU0G.mjs} +1609 -1375
  23. package/lib/chunks/{index-Dkro_8Fy.mjs → index-DKFX5ToE.mjs} +33 -33
  24. package/lib/chunks/index-DRmKaFXK.mjs +157 -0
  25. package/lib/chunks/index-DXf3wXT5.mjs +155 -0
  26. package/lib/chunks/{index-BuqPb5mP.mjs → index-Dp7QQjNH.mjs} +114 -114
  27. package/lib/chunks/index-FzI__DHC.mjs +104 -0
  28. package/lib/chunks/index-PWjCziZG.mjs +90 -0
  29. package/lib/chunks/index-bT6XWKO_.mjs +52 -0
  30. package/lib/chunks/{index-DN4Ui0Gh.mjs → index-tX9VR6Vo.mjs} +122 -122
  31. package/lib/chunks/{jp2Loader-Dig19xyo-CKUaGhPl.mjs → jp2Loader-Dig19xyo-D-OEDL3n.mjs} +1 -1
  32. package/lib/chunks/{psdLoader-C0tKUXXl-CYWoQis5.mjs → psdLoader-C0tKUXXl-CVN06LUc.mjs} +1 -1
  33. package/lib/chunks/{rawLoader-C-tPeFAB-C35zC8nZ.mjs → rawLoader-C-tPeFAB-DBqcJPFK.mjs} +5 -5
  34. package/lib/chunks/{tiffLoader-BlhByX8w-BOxg_Du5.mjs → tiffLoader-BlhByX8w-8-0icdyL.mjs} +1 -1
  35. package/lib/chunks/{useShikiHighlight-BPmcxA-h.mjs → useShikiHighlight-a_GUszuU.mjs} +1 -1
  36. package/lib/composables/useAudioPlayer.d.ts +1 -1
  37. package/lib/composables/usePreviewEvents.d.ts +27 -0
  38. package/lib/composables/useRequest.d.ts +16 -4
  39. package/lib/composables/useThemeMode.d.ts +1 -1
  40. package/lib/composables/useTranslator.d.ts +2 -2
  41. package/lib/core/events.d.ts +69 -0
  42. package/lib/core/i18n/index.d.ts +29 -0
  43. package/lib/core/i18n/messages/en-US.d.ts +5 -0
  44. package/lib/core/i18n/messages/index.d.ts +9 -0
  45. package/lib/core/i18n/messages/zh-CN.d.ts +5 -0
  46. package/lib/core/i18n/types.d.ts +23 -0
  47. package/lib/core/index.d.ts +34 -0
  48. package/lib/core/loaders/avifLoader.d.ts +22 -0
  49. package/lib/core/loaders/heicLoader.d.ts +21 -0
  50. package/lib/core/loaders/jp2Loader.d.ts +16 -0
  51. package/lib/core/loaders/jp2Worker.d.ts +1 -0
  52. package/lib/core/loaders/psdLoader.d.ts +14 -0
  53. package/lib/core/loaders/rawLoader.d.ts +14 -0
  54. package/lib/core/loaders/registry.d.ts +32 -0
  55. package/lib/core/loaders/tiffLoader.d.ts +28 -0
  56. package/lib/core/loaders/types.d.ts +56 -0
  57. package/lib/core/types.d.ts +89 -0
  58. package/lib/core/utils/csvParser.d.ts +31 -0
  59. package/lib/core/utils/emptyState.d.ts +28 -0
  60. package/lib/core/utils/excelDataConverter.d.ts +61 -0
  61. package/lib/core/utils/fileNormalizer.d.ts +21 -0
  62. package/lib/core/utils/fileType.d.ts +21 -0
  63. package/lib/core/utils/legacy-office/doc.d.ts +25 -0
  64. package/lib/core/utils/legacy-office/index.d.ts +8 -0
  65. package/lib/core/utils/legacy-office/ole.d.ts +8 -0
  66. package/lib/core/utils/legacy-office/ppt.d.ts +79 -0
  67. package/lib/core/utils/legacy-office/xls.d.ts +28 -0
  68. package/lib/core/utils/mimeTypes.d.ts +29 -0
  69. package/lib/core/utils/ooxml/docx.d.ts +17 -0
  70. package/lib/core/utils/ooxml/index.d.ts +4 -0
  71. package/lib/core/utils/ooxml/pptx.d.ts +7 -0
  72. package/lib/core/utils/ooxml/xml.d.ts +15 -0
  73. package/lib/core/utils/ooxml/zip.d.ts +3 -0
  74. package/lib/core/utils/pdfWorker.d.ts +61 -0
  75. package/lib/core/utils/previewMode.d.ts +7 -0
  76. package/lib/core/utils/request.d.ts +49 -0
  77. package/lib/core/utils/subtitleParser.d.ts +44 -0
  78. package/lib/core/utils/textDecoder.d.ts +30 -0
  79. package/lib/core/utils/uint8ArrayPolyfill.d.ts +18 -0
  80. package/lib/core/utils/zipReader.d.ts +51 -0
  81. package/lib/core/workers/imageDecoder.worker.d.ts +31 -0
  82. package/lib/core/workers/workerClient.d.ts +14 -0
  83. package/lib/i18n/localeKey.d.ts +1 -1
  84. package/lib/index.cjs +60 -60
  85. package/lib/index.css +1 -1
  86. package/lib/index.d.ts +11 -9
  87. package/lib/index.mjs +15 -12
  88. package/lib/renderers/Audio/index.vue.d.ts +1 -1
  89. package/lib/renderers/Cad/index.vue.d.ts +1 -1
  90. package/lib/renderers/Cad/toolbar.d.ts +2 -2
  91. package/lib/renderers/Csv/index.vue.d.ts +1 -1
  92. package/lib/renderers/Doc/index.vue.d.ts +1 -1
  93. package/lib/renderers/Docx/index.vue.d.ts +1 -1
  94. package/lib/renderers/Epub/index.vue.d.ts +1 -1
  95. package/lib/renderers/Font/index.vue.d.ts +1 -1
  96. package/lib/renderers/Image/index.vue.d.ts +2 -2
  97. package/lib/renderers/Json/index.vue.d.ts +2 -2
  98. package/lib/renderers/Markdown/index.vue.d.ts +1 -1
  99. package/lib/renderers/Mobi/index.vue.d.ts +1 -1
  100. package/lib/renderers/Msg/index.vue.d.ts +1 -1
  101. package/lib/renderers/Pdf/index.vue.d.ts +1 -1
  102. package/lib/renderers/Ppt/index.vue.d.ts +1 -1
  103. package/lib/renderers/Pptx/index.vue.d.ts +2 -2
  104. package/lib/renderers/Subtitle/index.vue.d.ts +1 -1
  105. package/lib/renderers/Text/index.vue.d.ts +2 -2
  106. package/lib/renderers/Unsupported/index.vue.d.ts +1 -1
  107. package/lib/renderers/Video/index.vue.d.ts +1 -1
  108. package/lib/renderers/Xlsx/index.vue.d.ts +2 -2
  109. package/lib/renderers/Xml/index.vue.d.ts +1 -1
  110. package/lib/renderers/Zip/TreeItem.vue.d.ts +1 -1
  111. package/lib/renderers/Zip/index.vue.d.ts +1 -1
  112. package/lib/renderers/base.types.d.ts +1 -1
  113. package/lib/renderers/registry.d.ts +1 -1
  114. package/lib/types.d.ts +3 -3
  115. package/package.json +2 -2
  116. package/lib/chunks/index--612Smof.mjs +0 -383
  117. package/lib/chunks/index-B21EAyWz.mjs +0 -137
  118. package/lib/chunks/index-BB0i4QqI.mjs +0 -117
  119. package/lib/chunks/index-BVdrGK3Q.mjs +0 -356
  120. package/lib/chunks/index-BlrFFeqc.mjs +0 -330
  121. package/lib/chunks/index-Bp9CuvMZ.mjs +0 -157
  122. package/lib/chunks/index-Bxpf9v5j.mjs +0 -104
  123. package/lib/chunks/index-CDg6vIbT.mjs +0 -51
  124. package/lib/chunks/index-CWE-hKSs.mjs +0 -90
  125. package/lib/chunks/index-CY3xzGgt.mjs +0 -108
  126. package/lib/chunks/index-D30L8tm9.mjs +0 -155
  127. package/lib/chunks/index-VdzIFJJW.mjs +0 -118
  128. package/lib/chunks/index-aoXgVLBb.mjs +0 -52
@@ -0,0 +1,333 @@
1
+ import { defineComponent as fe, ref as v, watch as Z, onMounted as pe, onBeforeUnmount as ve, openBlock as d, createElementBlock as g, createBlock as de, createCommentVNode as M, createElementVNode as f, toDisplayString as L, unref as q, normalizeStyle as z, createVNode as he, Fragment as G, renderList as ee } from "vue";
2
+ import me from "@likecoin/epub-ts";
3
+ import { List as ge, ChevronLeft as be, ChevronRight as we, Minimize2 as xe, Maximize2 as ye, X as ke } from "lucide-vue-next";
4
+ import { u as _e, a as Te, b as ze, N as Ce, J as Se } from "./index-DBzyeU0G.mjs";
5
+ import { _ as Me } from "./RendererError.vue_vue_type_script_setup_true_lang-FmkMQHB8.mjs";
6
+ import { T as We } from "./base.types-DaftHyg7.mjs";
7
+ const Ee = { class: "vfp-relative vfp-w-full vfp-h-full vfp-flex vfp-justify-center vfp-bg-surface-1 vfp-overflow-hidden" }, $e = {
8
+ key: 1,
9
+ class: "vfp-absolute vfp-inset-0 vfp-renderer-loading vfp-z-10"
10
+ }, He = { class: "vfp-renderer-loading-content" }, Re = { class: "vfp-renderer-loading-text" }, Le = {
11
+ class: "vfp-flex vfp-items-center vfp-justify-between vfp-flex-shrink-0",
12
+ style: { padding: "12px 16px", "border-bottom": "1px solid rgba(255,255,255,0.1)" }
13
+ }, Ae = { style: { color: "white", "font-weight": "500", "font-size": "14px" } }, Fe = {
14
+ class: "vfp-flex-1 vfp-overflow-y-auto",
15
+ style: { padding: "8px 4px" }
16
+ }, Pe = ["title", "onClick", "onMouseenter", "onMouseleave"], Be = ["title", "onClick", "onMouseenter", "onMouseleave"], De = 794, je = /* @__PURE__ */ fe({
17
+ __name: "index",
18
+ props: {
19
+ url: {}
20
+ },
21
+ setup(te, { expose: oe }) {
22
+ const A = te, I = new We(), { t: p } = _e(), ae = Te(), F = ze(), b = v(1), y = v(1), l = v(null), W = v(!0), k = v(null), w = v(!1), x = v([]), s = v(!1), P = v("");
23
+ Z([b, y, w, s, () => x.value.length], () => {
24
+ I.notify();
25
+ });
26
+ let u = null, e = null, _ = 0, T = null;
27
+ const V = () => {
28
+ var t;
29
+ try {
30
+ (t = e == null ? void 0 : e.destroy) == null || t.call(e);
31
+ } catch {
32
+ }
33
+ try {
34
+ u == null || u.destroy();
35
+ } catch {
36
+ }
37
+ e = null, u = null, _ = 0, T = null;
38
+ }, re = () => {
39
+ e == null || e.prev();
40
+ }, le = () => {
41
+ e == null || e.next();
42
+ }, ne = () => {
43
+ w.value = !w.value, setTimeout(() => {
44
+ l.value && e && (e.resize(l.value.offsetWidth, l.value.offsetHeight), T && e.display(T), D());
45
+ }, 350);
46
+ }, se = () => {
47
+ s.value = !s.value;
48
+ }, X = (t) => {
49
+ P.value = t, e == null || e.display(t), s.value = !1;
50
+ }, c = (t) => t === P.value;
51
+ oe({
52
+ getToolbarGroups: () => [
53
+ {
54
+ items: [
55
+ {
56
+ type: "button",
57
+ icon: ge,
58
+ tooltip: p.value("toolbar.toc"),
59
+ action: se,
60
+ disabled: x.value.length === 0,
61
+ active: s.value
62
+ }
63
+ ]
64
+ },
65
+ {
66
+ items: [
67
+ {
68
+ type: "button",
69
+ icon: be,
70
+ tooltip: p.value("toolbar.prev_page"),
71
+ action: re,
72
+ disabled: b.value <= 1
73
+ },
74
+ {
75
+ type: "text",
76
+ content: `${b.value} / ${y.value}`,
77
+ minWidth: "4rem"
78
+ },
79
+ {
80
+ type: "button",
81
+ icon: we,
82
+ tooltip: p.value("toolbar.next_page"),
83
+ action: le,
84
+ disabled: b.value >= y.value
85
+ }
86
+ ]
87
+ },
88
+ {
89
+ items: [
90
+ {
91
+ type: "button",
92
+ icon: w.value ? xe : ye,
93
+ tooltip: w.value ? p.value("toolbar.normal_width") : p.value("toolbar.full_width"),
94
+ action: ne,
95
+ active: w.value
96
+ }
97
+ ]
98
+ }
99
+ ],
100
+ onToolbarChange: (t) => I.subscribe(t)
101
+ });
102
+ const j = async () => {
103
+ if (F.begin(A.url), !!l.value) {
104
+ W.value = !0, k.value = null, x.value = [], s.value = !1, l.value.innerHTML = "", V();
105
+ try {
106
+ const t = await ae.value(A.url);
107
+ if (!t.ok)
108
+ throw new Ce(
109
+ new Se("request.failed", { status: t.status })
110
+ );
111
+ const n = await t.arrayBuffer(), o = me(n);
112
+ u = o;
113
+ const S = new Promise((h, a) => {
114
+ o.on("openFailed", (m) => {
115
+ a(m instanceof Error ? m : new Error("EPUB open failed"));
116
+ });
117
+ });
118
+ e = o.renderTo(l.value, {
119
+ manager: "continuous",
120
+ flow: "scrolled",
121
+ width: "100%",
122
+ height: "100%"
123
+ }), e.themes.register("default", {
124
+ body: {
125
+ background: "#ffffff !important",
126
+ color: "#1a1a1a !important",
127
+ "font-family": '"Noto Serif SC", "Source Han Serif SC", Georgia, "Times New Roman", serif !important',
128
+ "font-size": "16px !important",
129
+ "line-height": "2 !important",
130
+ padding: "40px 60px !important",
131
+ "max-width": "100% !important",
132
+ "box-sizing": "border-box !important",
133
+ "word-break": "break-word !important",
134
+ "overflow-wrap": "break-word !important"
135
+ },
136
+ p: { "text-indent": "2em !important", margin: "0.8em 0 !important" },
137
+ h1: { "text-align": "center !important", margin: "1.5em 0 1em !important" },
138
+ h2: { margin: "1.2em 0 0.8em !important" },
139
+ h3: { margin: "1em 0 0.6em !important" },
140
+ img: { "max-width": "100% !important", height: "auto !important" },
141
+ a: { color: "#2563eb !important", "text-decoration": "none !important" }
142
+ }), e.themes.select("default"), await Promise.race([u.ready, S]), u.locations.generate(1024).then(() => {
143
+ var m;
144
+ if (!u) return;
145
+ _ = u.locations.length();
146
+ const h = e == null ? void 0 : e.currentLocation(), a = ((m = h == null ? void 0 : h.start) == null ? void 0 : m.location) ?? 0;
147
+ b.value = a + 1, y.value = _;
148
+ }).catch(() => {
149
+ });
150
+ const r = await Promise.race([u.loaded.navigation, S]);
151
+ Array.isArray(r == null ? void 0 : r.toc) && (x.value = r.toc), await Promise.race([e.display(), S]), W.value = !1, F.ready(), b.value = 1, y.value = _ || 1, e.on("relocated", (h) => {
152
+ var J, K, Q;
153
+ const a = h;
154
+ if ((J = a == null ? void 0 : a.start) != null && J.cfi && (T = a.start.cfi), (K = a == null ? void 0 : a.start) != null && K.href) {
155
+ const N = a.start.href, O = [], Y = (ce) => {
156
+ for (const H of ce) {
157
+ const R = H.href.split("#")[0];
158
+ R && (N === R || N.endsWith("/" + R) || N.endsWith(R)) && O.push(H.href), H.subitems && Y(H.subitems);
159
+ }
160
+ };
161
+ Y(x.value), O.length === 1 && (P.value = O[0]);
162
+ }
163
+ const m = (Q = a == null ? void 0 : a.start) == null ? void 0 : Q.location;
164
+ typeof m == "number" && _ > 0 && (b.value = m + 1, y.value = _);
165
+ });
166
+ } catch (t) {
167
+ console.error(p.value("epub.load_failed") + ":", t), k.value = p.value("epub.load_failed"), W.value = !1, F.error(t);
168
+ }
169
+ }
170
+ };
171
+ let E = null, C = null, $ = { width: 0, height: 0 }, U = !0;
172
+ const ie = () => {
173
+ if (!(!l.value || !e)) {
174
+ if (e.resize(l.value.offsetWidth, l.value.offsetHeight), T)
175
+ try {
176
+ e.display(T);
177
+ } catch {
178
+ }
179
+ D();
180
+ }
181
+ }, ue = () => {
182
+ l.value && (E = new ResizeObserver(() => {
183
+ if (!l.value) return;
184
+ if (U) {
185
+ U = !1, $ = { width: l.value.offsetWidth, height: l.value.offsetHeight };
186
+ return;
187
+ }
188
+ const t = { width: l.value.offsetWidth, height: l.value.offsetHeight }, n = Math.abs($.width - t.width), o = Math.abs($.height - t.height);
189
+ n < 10 && o < 10 || ($ = t, C !== null && clearTimeout(C), C = window.setTimeout(ie, 350));
190
+ }), E.observe(l.value));
191
+ };
192
+ let i = null;
193
+ const B = () => {
194
+ var n;
195
+ if (!i) return;
196
+ const t = i;
197
+ if (t.scrollTop + t.clientHeight >= t.scrollHeight - 200)
198
+ try {
199
+ const o = e == null ? void 0 : e.manager;
200
+ (n = o == null ? void 0 : o.check) == null || n.call(o, 500, 500);
201
+ } catch {
202
+ }
203
+ }, D = () => {
204
+ i && (i.removeEventListener("scroll", B), i = null);
205
+ const t = () => {
206
+ var n;
207
+ i = ((n = l.value) == null ? void 0 : n.querySelector(".epub-container")) ?? null, i ? i.addEventListener("scroll", B, { passive: !0 }) : requestAnimationFrame(t);
208
+ };
209
+ requestAnimationFrame(t);
210
+ };
211
+ return pe(() => {
212
+ j(), ue(), D();
213
+ }), Z(() => A.url, (t) => {
214
+ t && j();
215
+ }), ve(() => {
216
+ E && E.disconnect(), C !== null && clearTimeout(C), i == null || i.removeEventListener("scroll", B), V();
217
+ }), (t, n) => (d(), g("div", Ee, [
218
+ k.value ? (d(), de(Me, {
219
+ key: 0,
220
+ message: k.value,
221
+ class: "vfp-absolute vfp-inset-0"
222
+ }, null, 8, ["message"])) : M("", !0),
223
+ W.value && !k.value ? (d(), g("div", $e, [
224
+ f("div", He, [
225
+ n[2] || (n[2] = f("div", { class: "vfp-renderer-spinner" }, null, -1)),
226
+ f("span", Re, L(q(p)("common.loading")), 1)
227
+ ])
228
+ ])) : M("", !0),
229
+ x.value.length > 0 ? (d(), g("div", {
230
+ key: 2,
231
+ class: "vfp-absolute vfp-inset-0 vfp-z-20 vfp-flex",
232
+ style: z({ opacity: s.value ? 1 : 0, pointerEvents: s.value ? "auto" : "none", transition: "opacity 0.3s" })
233
+ }, [
234
+ f("div", {
235
+ class: "vfp-w-72 vfp-h-full vfp-flex vfp-flex-col",
236
+ style: z({
237
+ maxWidth: "80%",
238
+ background: "rgba(0,0,0,0.9)",
239
+ backdropFilter: "blur(12px)",
240
+ borderRight: "1px solid rgba(255,255,255,0.1)",
241
+ boxShadow: "0 25px 50px -12px rgba(0,0,0,0.25)",
242
+ transform: s.value ? "translateX(0)" : "translateX(-100%)",
243
+ transition: "transform 0.3s ease"
244
+ })
245
+ }, [
246
+ f("div", Le, [
247
+ f("span", Ae, L(q(p)("toolbar.toc")), 1),
248
+ f("button", {
249
+ style: { color: "rgba(255,255,255,0.6)", background: "none", border: "none", cursor: "pointer", padding: "4px" },
250
+ onClick: n[0] || (n[0] = (o) => s.value = !1)
251
+ }, [
252
+ he(q(ke), { style: { width: "16px", height: "16px" } })
253
+ ])
254
+ ]),
255
+ f("div", Fe, [
256
+ (d(!0), g(G, null, ee(x.value, (o, S) => (d(), g(G, {
257
+ key: `${o.href}-${S}`
258
+ }, [
259
+ f("button", {
260
+ style: z({
261
+ width: "100%",
262
+ textAlign: "left",
263
+ padding: "8px 12px",
264
+ fontSize: "14px",
265
+ color: c(o.href) ? "white" : "rgba(255,255,255,0.7)",
266
+ fontWeight: c(o.href) ? "500" : "400",
267
+ background: c(o.href) ? "rgba(255,255,255,0.15)" : "none",
268
+ border: "none",
269
+ cursor: "pointer",
270
+ borderRadius: "4px",
271
+ overflow: "hidden",
272
+ textOverflow: "ellipsis",
273
+ whiteSpace: "nowrap",
274
+ display: "block",
275
+ transition: "all 0.15s"
276
+ }),
277
+ title: o.label,
278
+ onClick: (r) => X(o.href),
279
+ onMouseenter: (r) => !c(o.href) && (r.target.style.background = "rgba(255,255,255,0.1)"),
280
+ onMouseleave: (r) => !c(o.href) && (r.target.style.background = "none")
281
+ }, L(o.label.trim()), 45, Pe),
282
+ o.subitems && o.subitems.length > 0 ? (d(!0), g(G, { key: 0 }, ee(o.subitems, (r, h) => (d(), g("button", {
283
+ key: `${r.href}-${h}`,
284
+ style: z({
285
+ width: "100%",
286
+ textAlign: "left",
287
+ padding: "8px 12px 8px 28px",
288
+ fontSize: "13px",
289
+ color: c(r.href) ? "white" : "rgba(255,255,255,0.6)",
290
+ fontWeight: c(r.href) ? "500" : "400",
291
+ background: c(r.href) ? "rgba(255,255,255,0.15)" : "none",
292
+ border: "none",
293
+ cursor: "pointer",
294
+ borderRadius: "4px",
295
+ overflow: "hidden",
296
+ textOverflow: "ellipsis",
297
+ whiteSpace: "nowrap",
298
+ display: "block",
299
+ transition: "all 0.15s"
300
+ }),
301
+ title: r.label,
302
+ onClick: (a) => X(r.href),
303
+ onMouseenter: (a) => !c(r.href) && (a.target.style.background = "rgba(255,255,255,0.1)"),
304
+ onMouseleave: (a) => !c(r.href) && (a.target.style.background = "none")
305
+ }, L(r.label.trim()), 45, Be))), 128)) : M("", !0)
306
+ ], 64))), 128))
307
+ ])
308
+ ], 4),
309
+ f("div", {
310
+ class: "vfp-flex-1",
311
+ style: z({ background: s.value ? "rgba(0,0,0,0.3)" : "transparent", transition: "background 0.3s" }),
312
+ onClick: n[1] || (n[1] = (o) => s.value = !1)
313
+ }, null, 4)
314
+ ], 4)) : M("", !0),
315
+ k.value ? M("", !0) : (d(), g("div", {
316
+ key: 3,
317
+ ref_key: "viewerRef",
318
+ ref: l,
319
+ class: "vfp-h-full vfp-bg-surface-toolbar",
320
+ style: z({
321
+ width: w.value ? "100%" : `${De}px`,
322
+ maxWidth: "100%",
323
+ transition: "width 0.3s ease",
324
+ boxShadow: "0 1px 3px rgba(0,0,0,0.12)",
325
+ overflow: "hidden"
326
+ })
327
+ }, null, 4))
328
+ ]));
329
+ }
330
+ });
331
+ export {
332
+ je as default
333
+ };