@eternalheart/vue-file-preview 1.6.5 → 1.6.6
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/lib/chunks/{index-Do_q3F1Q.mjs → index-07rgqwSI.mjs} +1 -1
- package/lib/chunks/{index-5bftazEI.mjs → index-BF0-zECZ.mjs} +1 -1
- package/lib/chunks/{index-CH0gyinl.mjs → index-BHy2oKCa.mjs} +1 -1
- package/lib/chunks/{index-yvSDwlVY.mjs → index-BV8V9hEs.mjs} +2 -2
- package/lib/chunks/{index-C4x3R4P6.mjs → index-BnDCjh8a.mjs} +1 -1
- package/lib/chunks/{index-DR87l2gD.mjs → index-C-hfrxhW.mjs} +1 -1
- package/lib/chunks/{index-BujnNIdi.mjs → index-CUrAAk7J.mjs} +1 -1
- package/lib/chunks/index-CdsYIxSD.mjs +270 -0
- package/lib/chunks/{index-BFZyrk0b.mjs → index-ChMheVNW.mjs} +1 -1
- package/lib/chunks/{index-Bso3kiuo.mjs → index-CksNYAz_.mjs} +1 -1
- package/lib/chunks/{index-CDdmBvY6.mjs → index-CybXawTx.mjs} +1 -1
- package/lib/chunks/{index-DA_KAGO4.mjs → index-D656tL42.mjs} +2 -2
- package/lib/chunks/{index-COciDyvJ.mjs → index-DWWV1OKd.mjs} +2 -2
- package/lib/chunks/{index-Bjh8pgvO.mjs → index-DXqRgna1.mjs} +1 -1
- package/lib/chunks/{index-e0CU-cuJ.mjs → index-DcNc3goP.mjs} +1 -1
- package/lib/chunks/index-Dh91eAMV.mjs +329 -0
- package/lib/chunks/{index-Dq541Zfu.mjs → index-DxBxbEDT.mjs} +1 -1
- package/lib/chunks/{index-CVQmCNmf.mjs → index-hDUlDDey.mjs} +1 -1
- package/lib/chunks/{index-CaChuF62.mjs → index-lDd0gQfG.mjs} +18 -19
- package/lib/chunks/{index-DLHCSwf3.mjs → index-tOax5IQg.mjs} +1 -1
- package/lib/chunks/{index-DjgGNQ_1.mjs → index-u7QUztr_.mjs} +1 -1
- package/lib/chunks/{index-DwHqKJVc.mjs → index-xY2bzsk7.mjs} +5 -4
- package/lib/chunks/{useShikiHighlight-CMxdbY5k.mjs → useShikiHighlight-DwEsf_jW.mjs} +1 -1
- package/lib/index.cjs +50 -61
- package/lib/index.css +1 -1
- package/lib/index.mjs +1 -1
- package/package.json +1 -1
- package/lib/chunks/index-CmUWVGTa.mjs +0 -466
- package/lib/chunks/index-DezBKYfu.mjs +0 -264
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as er, ref as qe, watch as tr, computed as te, openBlock as J, createElementBlock as Q, createElementVNode as F, createBlock as rr, unref as se, toDisplayString as ne, createVNode as he, createCommentVNode as oe, normalizeStyle as ir, Fragment as nr, renderList as ar, createTextVNode as sr, normalizeClass as or } from "vue";
|
|
2
2
|
import { User as cr, Users as Ve, Calendar as mt, Clock as Et, Tag as gt, Mail as fr, Paperclip as ur, Hash as hr } from "lucide-vue-next";
|
|
3
|
-
import { u as lr, b as dr, _ as pr } from "./index-
|
|
3
|
+
import { u as lr, b as dr, _ as pr } from "./index-xY2bzsk7.mjs";
|
|
4
4
|
import { _ as yr } from "./RendererError.vue_vue_type_script_setup_true_lang-BNoENOWX.mjs";
|
|
5
5
|
var fe = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
6
6
|
function br(e) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as E, ref as p, onMounted as D, watch as M, onBeforeUnmount as z, openBlock as v, createElementBlock as h, createElementVNode as m, toDisplayString as B, unref as _, createCommentVNode as w, createBlock as S, normalizeStyle as C } from "vue";
|
|
2
2
|
import W from "exceljs";
|
|
3
3
|
import { S as H } from "./index-CyBXARuf.mjs";
|
|
4
|
-
import { u as R, b as G, C as L, s as F, y as N, g as O } from "./index-
|
|
4
|
+
import { u as R, b as G, C as L, s as F, y as N, g as O } from "./index-xY2bzsk7.mjs";
|
|
5
5
|
import { _ as V } from "./RendererError.vue_vue_type_script_setup_true_lang-BNoENOWX.mjs";
|
|
6
6
|
const $ = { class: "vfp-relative vfp-flex vfp-flex-col vfp-items-center vfp-w-full vfp-h-full" }, j = {
|
|
7
7
|
key: 0,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as ie, ref as c, watch as U, onMounted as se, onBeforeUnmount as ue, openBlock as p, createElementBlock as v, createBlock as fe, createCommentVNode as C, createElementVNode as h, normalizeStyle as T, toDisplayString as N, unref as J, createVNode as ce, Fragment as O, renderList as K } from "vue";
|
|
2
2
|
import pe from "@likecoin/epub-ts";
|
|
3
3
|
import { List as ve, ChevronLeft as he, ChevronRight as de, Minimize2 as be, Maximize2 as me, X as ge } from "lucide-vue-next";
|
|
4
|
-
import { u as xe, b as ye } from "./index-
|
|
4
|
+
import { u as xe, b as ye } from "./index-xY2bzsk7.mjs";
|
|
5
5
|
import { _ as we } from "./RendererError.vue_vue_type_script_setup_true_lang-BNoENOWX.mjs";
|
|
6
6
|
import { T as ke } from "./base.types-DaftHyg7.mjs";
|
|
7
7
|
const _e = { class: "vfp-relative vfp-w-full vfp-h-full vfp-flex vfp-justify-center vfp-bg-surface-1 vfp-overflow-hidden" }, Te = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as S, ref as f, computed as c, watch as _, openBlock as a, createElementBlock as s, createElementVNode as l, createBlock as B, unref as x, normalizeClass as k, toDisplayString as T, normalizeStyle as F, Fragment as E, renderList as L } from "vue";
|
|
2
2
|
import { WrapText as z, Code as G, Eye as M } from "lucide-vue-next";
|
|
3
|
-
import { u as W, b as $, k as j, e as D } from "./index-
|
|
4
|
-
import { u as P } from "./useShikiHighlight-
|
|
3
|
+
import { u as W, b as $, k as j, e as D } from "./index-xY2bzsk7.mjs";
|
|
4
|
+
import { u as P } from "./useShikiHighlight-DwEsf_jW.mjs";
|
|
5
5
|
import { _ as R } from "./RendererError.vue_vue_type_script_setup_true_lang-BNoENOWX.mjs";
|
|
6
6
|
import { T as V } from "./base.types-DaftHyg7.mjs";
|
|
7
7
|
const q = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as me, ref as p, watch as ue, onMounted as ce, onBeforeUnmount as ve, openBlock as S, createElementBlock as B, createBlock as Me, createCommentVNode as D, createElementVNode as h, normalizeStyle as W, toDisplayString as Ce, unref as K, createVNode as de, h as N } from "vue";
|
|
2
2
|
import { List as Se, ChevronLeft as Ne, ChevronRight as Re, Minimize2 as ze, Maximize2 as Ae, X as Le } from "lucide-vue-next";
|
|
3
3
|
import "foliate-js/view.js";
|
|
4
|
-
import { u as Fe, b as Pe, _ as $e } from "./index-
|
|
4
|
+
import { u as Fe, b as Pe, _ as $e } from "./index-xY2bzsk7.mjs";
|
|
5
5
|
import { _ as He } from "./RendererError.vue_vue_type_script_setup_true_lang-BNoENOWX.mjs";
|
|
6
6
|
import { T as Be } from "./base.types-DaftHyg7.mjs";
|
|
7
7
|
const De = { class: "vfp-relative vfp-w-full vfp-h-full vfp-flex vfp-justify-center vfp-bg-surface-1 vfp-overflow-hidden" }, We = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as W, ref as y, onMounted as F, watch as L, onBeforeUnmount as P, openBlock as g, createElementBlock as x, createElementVNode as _, toDisplayString as q, unref as B, createCommentVNode as T, createBlock as A, normalizeStyle as G } from "vue";
|
|
2
2
|
import { init as E } from "pptx-preview";
|
|
3
|
-
import { u as H, b as I, D as N } from "./index-
|
|
3
|
+
import { u as H, b as I, D as N } from "./index-xY2bzsk7.mjs";
|
|
4
4
|
import { _ as O } from "./RendererError.vue_vue_type_script_setup_true_lang-BNoENOWX.mjs";
|
|
5
5
|
const S = { class: "vfp-relative vfp-flex vfp-flex-col vfp-items-center vfp-w-full vfp-h-full" }, V = {
|
|
6
6
|
key: 0,
|
|
@@ -14,7 +14,7 @@ var $t = (u, e, t, s) => ({
|
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
16
|
import { defineComponent as jb, ref as Si, watch as aa, nextTick as wu, onMounted as Gb, onBeforeUnmount as _b, openBlock as zh, createElementBlock as Eu, normalizeStyle as Ep, createElementVNode as sn, toDisplayString as zb, unref as Im, createVNode as Vb, createCommentVNode as Su, createBlock as Wb } from "vue";
|
|
17
|
-
import { a as Xb, u as Yb, Y as Pm, A as Kb } from "./index-
|
|
17
|
+
import { a as Xb, u as Yb, Y as Pm, A as Kb } from "./index-xY2bzsk7.mjs";
|
|
18
18
|
import { _ as Jb } from "./RendererError.vue_vue_type_script_setup_true_lang-BNoENOWX.mjs";
|
|
19
19
|
import { X as Qb, Menu as Zb, ChevronLeft as qb, ChevronRight as tA, ZoomOut as eA, ZoomIn as sA, RefreshCw as iA } from "lucide-vue-next";
|
|
20
20
|
import { T as nA } from "./base.types-DaftHyg7.mjs";
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
import { defineComponent as ie, ref as S, onMounted as ne, onUnmounted as se, watch as ae, openBlock as H, createElementBlock as W, createElementVNode as B, toDisplayString as U, createCommentVNode as Z, unref as le } from "vue";
|
|
2
|
+
import * as o from "three";
|
|
3
|
+
import { OrbitControls as fe } from "three/examples/jsm/controls/OrbitControls";
|
|
4
|
+
import { DXFLoader as ce } from "three-dxf-loader";
|
|
5
|
+
import { STLLoader as ue } from "three/examples/jsm/loaders/STLLoader";
|
|
6
|
+
import { OBJLoader as de } from "three/examples/jsm/loaders/OBJLoader";
|
|
7
|
+
import { GLTFLoader as pe } from "three/examples/jsm/loaders/GLTFLoader";
|
|
8
|
+
import { u as me, b as ve } from "./index-xY2bzsk7.mjs";
|
|
9
|
+
import { T as ge } from "./base.types-DaftHyg7.mjs";
|
|
10
|
+
import { RotateCcw as we, Box as he, Grid3x3 as be, Axis3d as ye } from "lucide-vue-next";
|
|
11
|
+
function Me(c) {
|
|
12
|
+
return [
|
|
13
|
+
{
|
|
14
|
+
items: [
|
|
15
|
+
{
|
|
16
|
+
type: "button",
|
|
17
|
+
icon: we,
|
|
18
|
+
tooltip: c.t("toolbar.reset"),
|
|
19
|
+
action: () => {
|
|
20
|
+
var p;
|
|
21
|
+
return (p = c.cadRef) == null ? void 0 : p.resetView();
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
items: [
|
|
28
|
+
{
|
|
29
|
+
type: "button",
|
|
30
|
+
icon: he,
|
|
31
|
+
tooltip: c.wireframe ? c.t("cad.solid") : c.t("cad.wireframe"),
|
|
32
|
+
active: c.wireframe,
|
|
33
|
+
action: () => {
|
|
34
|
+
var p;
|
|
35
|
+
return (p = c.cadRef) == null ? void 0 : p.toggleWireframe();
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
type: "button",
|
|
40
|
+
icon: be,
|
|
41
|
+
tooltip: c.t("cad.grid"),
|
|
42
|
+
active: c.showGrid,
|
|
43
|
+
action: () => {
|
|
44
|
+
var p;
|
|
45
|
+
return (p = c.cadRef) == null ? void 0 : p.toggleGrid();
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
type: "button",
|
|
50
|
+
icon: ye,
|
|
51
|
+
tooltip: c.t("cad.axes"),
|
|
52
|
+
active: c.showAxes,
|
|
53
|
+
action: () => {
|
|
54
|
+
var p;
|
|
55
|
+
return (p = c.cadRef) == null ? void 0 : p.toggleAxes();
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
];
|
|
61
|
+
}
|
|
62
|
+
const xe = {
|
|
63
|
+
key: 0,
|
|
64
|
+
class: "vfp-absolute vfp-inset-0 vfp-flex vfp-items-center vfp-justify-center vfp-bg-surface-3 vfp-z-10"
|
|
65
|
+
}, Le = { class: "vfp-text-center" }, Ee = { class: "vfp-text-fg-primary" }, _e = {
|
|
66
|
+
key: 1,
|
|
67
|
+
class: "vfp-absolute vfp-inset-0 vfp-flex vfp-items-center vfp-justify-center vfp-bg-surface-3 vfp-z-10"
|
|
68
|
+
}, Ae = { class: "vfp-text-center" }, ze = { class: "vfp-mt-4 vfp-text-fg-secondary" }, Ve = /* @__PURE__ */ ie({
|
|
69
|
+
__name: "index",
|
|
70
|
+
props: {
|
|
71
|
+
url: {},
|
|
72
|
+
file: {},
|
|
73
|
+
fileName: {}
|
|
74
|
+
},
|
|
75
|
+
setup(c, { expose: p }) {
|
|
76
|
+
const x = c, { t: R } = me(), q = ve(), y = S(null), _ = S(!0), A = S(null), F = S(!1), G = S(!0), P = S(!0);
|
|
77
|
+
let r = null, a = null, s = null, l = null, M = null, u = null, d = null, V = null, z = null, v = !1;
|
|
78
|
+
const T = new ge(), J = (e, t, i) => {
|
|
79
|
+
var m, g, w;
|
|
80
|
+
return i != null && i.name ? ((m = i.name.split(".").pop()) == null ? void 0 : m.toLowerCase()) || "" : t ? ((g = t.split(".").pop()) == null ? void 0 : g.toLowerCase()) || "" : ((w = e.split(".").pop()) == null ? void 0 : w.toLowerCase().split("?")[0]) || "";
|
|
81
|
+
}, X = () => {
|
|
82
|
+
if (!l || !a || !M) return;
|
|
83
|
+
const e = new o.Box3().setFromObject(M), t = e.getCenter(new o.Vector3()), i = e.getSize(new o.Vector3()), m = Math.max(i.x, i.y, i.z), g = a.fov * (Math.PI / 180);
|
|
84
|
+
let w = Math.abs(m / 2 / Math.tan(g / 2));
|
|
85
|
+
w *= 1.5, a.position.set(t.x + w, t.y + w, t.z + w), a.lookAt(t), l.target.copy(t), l.update();
|
|
86
|
+
}, K = () => {
|
|
87
|
+
F.value = !F.value, M && M.traverse((e) => {
|
|
88
|
+
if (e instanceof o.Mesh) {
|
|
89
|
+
const t = e.material;
|
|
90
|
+
t && (Array.isArray(t) ? t.forEach((i) => {
|
|
91
|
+
i.wireframe = F.value;
|
|
92
|
+
}) : t.wireframe = F.value);
|
|
93
|
+
}
|
|
94
|
+
}), T.notify();
|
|
95
|
+
}, Q = () => {
|
|
96
|
+
G.value = !G.value, u && (u.visible = G.value), T.notify();
|
|
97
|
+
}, Y = () => {
|
|
98
|
+
P.value = !P.value, d && (d.visible = P.value), T.notify();
|
|
99
|
+
}, $ = (e) => {
|
|
100
|
+
if (!r) return;
|
|
101
|
+
const t = Number.isFinite(e) && e > 0 ? e : 1, i = t * 0.5, m = t * 2;
|
|
102
|
+
u && (u.geometry.dispose(), u.material.dispose(), r.remove(u)), d && (d.geometry.dispose(), d.material.dispose(), r.remove(d)), u = new o.GridHelper(m, 20, 4473924, 2236962), u.visible = G.value, r.add(u), d = new o.AxesHelper(i), d.visible = P.value, r.add(d);
|
|
103
|
+
};
|
|
104
|
+
p({
|
|
105
|
+
getToolbarGroups: () => Me({
|
|
106
|
+
cadRef: { resetView: X, toggleWireframe: K, toggleGrid: Q, toggleAxes: Y },
|
|
107
|
+
wireframe: F.value,
|
|
108
|
+
showGrid: G.value,
|
|
109
|
+
showAxes: P.value,
|
|
110
|
+
t: R.value
|
|
111
|
+
}),
|
|
112
|
+
onToolbarChange: (e) => T.subscribe(e)
|
|
113
|
+
});
|
|
114
|
+
const ee = (e) => {
|
|
115
|
+
e.traverse((t) => {
|
|
116
|
+
t.geometry && t.geometry.dispose(), t.material && (Array.isArray(t.material) ? t.material.forEach((i) => {
|
|
117
|
+
D(i);
|
|
118
|
+
}) : D(t.material));
|
|
119
|
+
});
|
|
120
|
+
}, D = (e) => {
|
|
121
|
+
e.map && e.map.dispose(), e.lightMap && e.lightMap.dispose(), e.bumpMap && e.bumpMap.dispose(), e.normalMap && e.normalMap.dispose(), e.specularMap && e.specularMap.dispose(), e.envMap && e.envMap.dispose(), e.dispose();
|
|
122
|
+
}, N = () => {
|
|
123
|
+
if (!y.value) return;
|
|
124
|
+
v = !1, z = new AbortController();
|
|
125
|
+
const e = y.value, t = e.clientWidth, i = e.clientHeight;
|
|
126
|
+
r = new o.Scene(), r.background = new o.Color(1710618), a = new o.PerspectiveCamera(45, t / i, 0.1, 1e4), a.position.set(100, 100, 100), s = new o.WebGLRenderer({ antialias: !0 }), s.setSize(t, i), s.setPixelRatio(window.devicePixelRatio), e.appendChild(s.domElement), l = new fe(a, s.domElement), l.enableDamping = !0, l.dampingFactor = 0.05;
|
|
127
|
+
const m = new o.AmbientLight(16777215, 0.6);
|
|
128
|
+
r.add(m);
|
|
129
|
+
const g = new o.DirectionalLight(16777215, 0.8);
|
|
130
|
+
g.position.set(1, 1, 1), r.add(g);
|
|
131
|
+
const w = new o.DirectionalLight(16777215, 0.4);
|
|
132
|
+
w.position.set(-1, -1, -1), r.add(w), te();
|
|
133
|
+
const n = () => {
|
|
134
|
+
v || (V = requestAnimationFrame(n), l == null || l.update(), r && a && s && s.render(r, a));
|
|
135
|
+
};
|
|
136
|
+
n(), window.addEventListener("resize", O);
|
|
137
|
+
}, te = () => {
|
|
138
|
+
if (!r || !a || !l || v) return;
|
|
139
|
+
const e = J(x.url, x.fileName, x.file);
|
|
140
|
+
let t;
|
|
141
|
+
const i = new o.LoadingManager();
|
|
142
|
+
if (e === "dxf")
|
|
143
|
+
t = new ce();
|
|
144
|
+
else if (e === "stl")
|
|
145
|
+
t = new ue(i);
|
|
146
|
+
else if (e === "obj")
|
|
147
|
+
t = new de(i);
|
|
148
|
+
else if (e === "gltf" || e === "glb")
|
|
149
|
+
t = new pe(i);
|
|
150
|
+
else {
|
|
151
|
+
A.value = R.value("cad.parse_failed"), _.value = !1;
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
const m = (n, h) => {
|
|
155
|
+
if (v) return;
|
|
156
|
+
if (!n) {
|
|
157
|
+
A.value = R.value("cad.parse_failed"), _.value = !1;
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
let b;
|
|
161
|
+
if (h === "stl") {
|
|
162
|
+
const k = n, re = new o.MeshPhongMaterial({
|
|
163
|
+
color: 8947848,
|
|
164
|
+
flatShading: !0,
|
|
165
|
+
side: o.DoubleSide
|
|
166
|
+
});
|
|
167
|
+
b = new o.Mesh(k, re);
|
|
168
|
+
} else h === "gltf" || h === "glb" ? b = n.scene : (b = n, b.traverse((k) => {
|
|
169
|
+
k instanceof o.Mesh && !k.material && (k.material = new o.MeshPhongMaterial({
|
|
170
|
+
color: 8947848,
|
|
171
|
+
side: o.DoubleSide
|
|
172
|
+
}));
|
|
173
|
+
}));
|
|
174
|
+
r.add(b), M = b;
|
|
175
|
+
const L = new o.Box3().setFromObject(b), f = L.getCenter(new o.Vector3()), E = L.getSize(new o.Vector3()), C = Math.max(E.x, E.y, E.z);
|
|
176
|
+
$(C);
|
|
177
|
+
const oe = a.fov * (Math.PI / 180);
|
|
178
|
+
let j = Math.abs(C / 2 / Math.tan(oe / 2));
|
|
179
|
+
j *= 1.5, a.position.set(f.x + j, f.y + j, f.z + j), a.lookAt(f), l.target.copy(f), l.update(), _.value = !1, T.notify();
|
|
180
|
+
}, g = (n) => {
|
|
181
|
+
v || n.name !== "AbortError" && (A.value = R.value("cad.load_failed"), _.value = !1);
|
|
182
|
+
};
|
|
183
|
+
(x.file ? x.file.arrayBuffer() : q.value(x.url, { signal: z == null ? void 0 : z.signal }).then((n) => {
|
|
184
|
+
if (!v) {
|
|
185
|
+
if (!n.ok) throw new Error("Failed to fetch file");
|
|
186
|
+
return n.arrayBuffer();
|
|
187
|
+
}
|
|
188
|
+
})).then((n) => {
|
|
189
|
+
if (!(v || !n)) {
|
|
190
|
+
if (e === "stl") {
|
|
191
|
+
const h = t.parse(n);
|
|
192
|
+
m(h, e);
|
|
193
|
+
} else if (e === "obj") {
|
|
194
|
+
const b = new TextDecoder("utf-8").decode(n), L = t.parse(b);
|
|
195
|
+
m(L, e);
|
|
196
|
+
} else if (e === "gltf" || e === "glb")
|
|
197
|
+
t.parse(
|
|
198
|
+
n,
|
|
199
|
+
"",
|
|
200
|
+
(h) => {
|
|
201
|
+
v || m(h, e);
|
|
202
|
+
},
|
|
203
|
+
(h) => g(h)
|
|
204
|
+
);
|
|
205
|
+
else if (e === "dxf") {
|
|
206
|
+
const b = new TextDecoder("utf-8").decode(n), L = o.BufferGeometry.prototype.setFromPoints;
|
|
207
|
+
o.BufferGeometry.prototype.setFromPoints = function(f) {
|
|
208
|
+
const E = (f || []).filter(
|
|
209
|
+
(C) => C && C.x !== void 0 && C.y !== void 0
|
|
210
|
+
);
|
|
211
|
+
return L.call(this, E);
|
|
212
|
+
};
|
|
213
|
+
try {
|
|
214
|
+
t.loadString(
|
|
215
|
+
b,
|
|
216
|
+
(f) => {
|
|
217
|
+
if (!v) {
|
|
218
|
+
const E = (f == null ? void 0 : f.entity) || f;
|
|
219
|
+
m(E, e);
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
(f) => {
|
|
223
|
+
g(f);
|
|
224
|
+
}
|
|
225
|
+
);
|
|
226
|
+
} catch (f) {
|
|
227
|
+
g(f);
|
|
228
|
+
} finally {
|
|
229
|
+
o.BufferGeometry.prototype.setFromPoints = L;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}).catch((n) => {
|
|
234
|
+
v || g(n);
|
|
235
|
+
});
|
|
236
|
+
}, O = () => {
|
|
237
|
+
if (!y.value || !a || !s || v) return;
|
|
238
|
+
const e = y.value.clientWidth, t = y.value.clientHeight;
|
|
239
|
+
a.aspect = e / t, a.updateProjectionMatrix(), s.setSize(e, t);
|
|
240
|
+
}, I = () => {
|
|
241
|
+
v = !0, z && z.abort(), V !== null && (cancelAnimationFrame(V), V = null), window.removeEventListener("resize", O), M && (ee(M), r == null || r.remove(M), M = null), u && (u.geometry.dispose(), u.material.dispose(), r == null || r.remove(u), u = null), d && (d.geometry.dispose(), d.material.dispose(), r == null || r.remove(d), d = null), l == null || l.dispose(), s == null || s.dispose(), y.value && (s != null && s.domElement) && y.value.contains(s.domElement) && y.value.removeChild(s.domElement), r = null, a = null, s = null, l = null;
|
|
242
|
+
};
|
|
243
|
+
return ne(() => {
|
|
244
|
+
N();
|
|
245
|
+
}), se(() => {
|
|
246
|
+
I();
|
|
247
|
+
}), ae(() => x.url, () => {
|
|
248
|
+
I(), _.value = !0, A.value = null, y.value && N();
|
|
249
|
+
}), (e, t) => (H(), W("div", {
|
|
250
|
+
ref_key: "containerRef",
|
|
251
|
+
ref: y,
|
|
252
|
+
class: "vfp-relative vfp-w-full vfp-h-full vfp-bg-media-bg"
|
|
253
|
+
}, [
|
|
254
|
+
A.value ? (H(), W("div", xe, [
|
|
255
|
+
B("div", Le, [
|
|
256
|
+
B("p", Ee, U(A.value), 1)
|
|
257
|
+
])
|
|
258
|
+
])) : Z("", !0),
|
|
259
|
+
_.value ? (H(), W("div", _e, [
|
|
260
|
+
B("div", Ae, [
|
|
261
|
+
t[0] || (t[0] = B("div", { class: "vfp-inline-block vfp-w-8 vfp-h-8 vfp-border-4 vfp-border-spinner-track vfp-border-t-spinner-head vfp-rounded-full vfp-animate-spin" }, null, -1)),
|
|
262
|
+
B("p", ze, U(le(R)("cad.loading")), 1)
|
|
263
|
+
])
|
|
264
|
+
])) : Z("", !0)
|
|
265
|
+
], 512));
|
|
266
|
+
}
|
|
267
|
+
});
|
|
268
|
+
export {
|
|
269
|
+
Ve as default
|
|
270
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as $, ref as y, watch as G, computed as h, openBlock as a, createElementBlock as r, createElementVNode as e, createBlock as S, unref as u, normalizeClass as x, Fragment as g, renderList as k, toDisplayString as o, createCommentVNode as T } from "vue";
|
|
2
|
-
import { u as V, b as j, M as z, $ as d, e as A, _ as D } from "./index-
|
|
2
|
+
import { u as V, b as j, M as z, $ as d, e as A, _ as D } from "./index-xY2bzsk7.mjs";
|
|
3
3
|
import { _ as I } from "./RendererError.vue_vue_type_script_setup_true_lang-BNoENOWX.mjs";
|
|
4
4
|
const O = {
|
|
5
5
|
key: 0,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as m, ref as a, watch as _, openBlock as s, createElementBlock as f, createElementVNode as p, createBlock as h } from "vue";
|
|
2
|
-
import { u as w, b as y, S as g } from "./index-
|
|
2
|
+
import { u as w, b as y, S as g } from "./index-xY2bzsk7.mjs";
|
|
3
3
|
import { _ as b } from "./RendererError.vue_vue_type_script_setup_true_lang-BNoENOWX.mjs";
|
|
4
4
|
const k = {
|
|
5
5
|
key: 0,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as d, ref as U, watch as h, openBlock as $, createElementBlock as q, createElementVNode as x, createBlock as K, createVNode as C, unref as ee, h as g, inject as ne, computed as H } from "vue";
|
|
2
|
-
import { u as le, b as te, e as ie, L as ue, G as fe, c as oe } from "./index-
|
|
2
|
+
import { u as le, b as te, e as ie, L as ue, G as fe, c as oe } from "./index-xY2bzsk7.mjs";
|
|
3
3
|
import { _ as se } from "./RendererError.vue_vue_type_script_setup_true_lang-BNoENOWX.mjs";
|
|
4
4
|
import { ChevronDown as ce, ChevronRight as pe } from "lucide-vue-next";
|
|
5
5
|
function ke(e, f = !1) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as L, ref as c, watch as M, computed as D, openBlock as n, createElementBlock as a, createElementVNode as r, createBlock as H, unref as h, toDisplayString as w, normalizeStyle as B, Fragment as y, renderList as F } from "vue";
|
|
2
|
-
import { u as G, b as N, e as P } from "./index-
|
|
3
|
-
import { u as X } from "./useShikiHighlight-
|
|
2
|
+
import { u as G, b as N, e as P } from "./index-xY2bzsk7.mjs";
|
|
3
|
+
import { u as X } from "./useShikiHighlight-DwEsf_jW.mjs";
|
|
4
4
|
import { _ as j } from "./RendererError.vue_vue_type_script_setup_true_lang-BNoENOWX.mjs";
|
|
5
5
|
const E = {
|
|
6
6
|
key: 0,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as K, ref as u, computed as z, onMounted as ne, onBeforeUnmount as q, watch as j, openBlock as a, createElementBlock as c, Fragment as I, createElementVNode as i, normalizeClass as D, toDisplayString as $, withDirectives as V, renderSlot as W, vShow as H, normalizeStyle as F, resolveComponent as le, createVNode as B, unref as C, createBlock as R, resolveDynamicComponent as O, renderList as G, createCommentVNode as A, defineAsyncComponent as oe, withCtx as P, Teleport as se } from "vue";
|
|
2
|
-
import { _ as X, V as ae, R as ie, u as re, b as fe, f as Z, h as ve, I as de, K as pe, w as ue } from "./index-
|
|
2
|
+
import { _ as X, V as ae, R as ie, u as re, b as fe, f as Z, h as ve, I as de, K as pe, w as ue } from "./index-xY2bzsk7.mjs";
|
|
3
3
|
import { FileImage as ce, FileText as me, FileCode as he, File as we, ChevronRight as be, FolderOpen as ge, Folder as ye } from "lucide-vue-next";
|
|
4
4
|
import { _ as xe } from "./RendererError.vue_vue_type_script_setup_true_lang-BNoENOWX.mjs";
|
|
5
5
|
import { T as ke } from "./base.types-DaftHyg7.mjs";
|
|
@@ -194,7 +194,7 @@ const Le = { class: "vfp-flex vfp-flex-shrink-0 vfp-border-b vfp-border-line-wea
|
|
|
194
194
|
},
|
|
195
195
|
setup(s, { expose: M }) {
|
|
196
196
|
const l = oe(
|
|
197
|
-
() => import("./index-
|
|
197
|
+
() => import("./index-xY2bzsk7.mjs").then((e) => e.x)
|
|
198
198
|
), v = s, g = new ke(), { t: h } = re(), T = fe(), b = u(null), d = u(null), y = u(!0), r = u(null), t = u(/* @__PURE__ */ new Set([""])), f = u(null), x = u(!1), p = u(null), n = u(null), w = u(null), S = () => {
|
|
199
199
|
var e;
|
|
200
200
|
(e = f.value) != null && e.blobUrl && URL.revokeObjectURL(f.value.blobUrl);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as L, ref as a, watch as _, nextTick as M, computed as y, openBlock as s, createElementBlock as c, createElementVNode as f, createBlock as $, normalizeStyle as p, Fragment as N, renderList as j } from "vue";
|
|
2
2
|
import I from "mammoth";
|
|
3
|
-
import { u as F, b as X, X as C, j as R, B as q } from "./index-
|
|
3
|
+
import { u as F, b as X, X as C, j as R, B as q } from "./index-xY2bzsk7.mjs";
|
|
4
4
|
import { _ as z } from "./RendererError.vue_vue_type_script_setup_true_lang-BNoENOWX.mjs";
|
|
5
5
|
const O = {
|
|
6
6
|
key: 0,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as Me, ref as i, watch as $, onBeforeUnmount as ee, onMounted as Re, computed as te, openBlock as x, createElementBlock as C, normalizeStyle as ae, createVNode as _e, unref as le, createElementVNode as X, createTextVNode as Le, toDisplayString as S, createCommentVNode as L, createBlock as oe, normalizeClass as ke } from "vue";
|
|
2
2
|
import { ZoomOut as Ee, ZoomIn as Ce, Scan as Te, Maximize2 as Ue, RotateCcw as Ye, RotateCw as ze, RefreshCw as Se, Loader2 as Xe } from "lucide-vue-next";
|
|
3
|
-
import { u as We, i as Be, Z as De, W as Oe, p as je, R as Ze } from "./index-
|
|
3
|
+
import { u as We, i as Be, Z as De, W as Oe, p as je, R as Ze } from "./index-xY2bzsk7.mjs";
|
|
4
4
|
import { _ as ne } from "./RendererError.vue_vue_type_script_setup_true_lang-BNoENOWX.mjs";
|
|
5
5
|
import { T as Pe } from "./base.types-DaftHyg7.mjs";
|
|
6
6
|
const $e = {
|