next-flow-interface 0.23.11 → 0.23.13

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/index.js CHANGED
@@ -1,25 +1,25 @@
1
- import { BaseTexture as vt, Material as tr, AbstractMesh as rr, Quaternion as M, Vector3 as nr } from "@babylonjs/core";
2
- import { fileTypeFromBlob as er, fileTypeFromStream as Y, fileTypeFromBuffer as or } from "file-type";
3
- var ur = /* @__PURE__ */ ((t) => (t.OPAQUE = "OPAQUE", t.ALPHA_TEST = "ALPHA_TEST", t.ALPHA_BLEND = "ALPHA_BLEND", t.ALPHA_TEST_AND_BLEND = "ALPHA_TEST_AND_BLEND", t))(ur || {}), sr = /* @__PURE__ */ ((t) => (t.NONE = "NONE", t.PBR = "PBR", t.STANDARD = "STANDARD", t.NODE = "NODE", t.OTHER = "OTHER", t.TERRAIN = "TERRAIN", t.FUR = "FUR", t.WATER = "WATER", t.LAVA = "LAVA", t.SKY = "SKY", t.BACKGROUND = "BACKGROUND", t.MULTI = "MULTI", t.SHADER = "SHADER", t))(sr || {});
4
- class ir extends Error {
5
- constructor(n) {
6
- super(n), this.name = "NotFoundError";
1
+ import { BaseTexture as Qt, Material as qt, AbstractMesh as Zt, Quaternion as k, Vector3 as pt } from "@babylonjs/core";
2
+ import { fileTypeFromBlob as vt, fileTypeFromStream as Y, fileTypeFromBuffer as tr } from "file-type";
3
+ var rr = /* @__PURE__ */ ((t) => (t.OPAQUE = "OPAQUE", t.ALPHA_TEST = "ALPHA_TEST", t.ALPHA_BLEND = "ALPHA_BLEND", t.ALPHA_TEST_AND_BLEND = "ALPHA_TEST_AND_BLEND", t))(rr || {}), nr = /* @__PURE__ */ ((t) => (t.NONE = "NONE", t.PBR = "PBR", t.STANDARD = "STANDARD", t.NODE = "NODE", t.OTHER = "OTHER", t.TERRAIN = "TERRAIN", t.FUR = "FUR", t.WATER = "WATER", t.LAVA = "LAVA", t.SKY = "SKY", t.BACKGROUND = "BACKGROUND", t.MULTI = "MULTI", t.SHADER = "SHADER", t))(nr || {});
4
+ class er extends Error {
5
+ constructor(r) {
6
+ super(r), this.name = "NotFoundError";
7
7
  }
8
8
  }
9
- class He extends ir {
10
- constructor(n) {
11
- super(n), this.name = "DomNotFoundError";
9
+ class de extends er {
10
+ constructor(r) {
11
+ super(r), this.name = "DomNotFoundError";
12
12
  }
13
13
  }
14
- class Ve extends Error {
15
- constructor(n) {
16
- super(`${n} is a static class and cannot be instantiated.`), this.name = "StaticClassInstantiationError";
14
+ class me extends Error {
15
+ constructor(r) {
16
+ super(`${r} is a static class and cannot be instantiated.`), this.name = "StaticClassInstantiationError";
17
17
  }
18
18
  }
19
- var cr = /* @__PURE__ */ ((t) => (t[t.TOP = 0] = "TOP", t[t.RIGHT = 1] = "RIGHT", t[t.BOTTOM = 2] = "BOTTOM", t[t.LEFT = 3] = "LEFT", t[t.TOP_LEFT = 4] = "TOP_LEFT", t[t.BOTTOM_LEFT = 5] = "BOTTOM_LEFT", t[t.TOP_RIGHT = 6] = "TOP_RIGHT", t[t.BOTTOM_RIGHT = 7] = "BOTTOM_RIGHT", t[t.UNKNOWN = 8] = "UNKNOWN", t))(cr || {}), fr = /* @__PURE__ */ ((t) => (t.BUTTON = "BUTTON", t.SWITCH = "SWITCH", t.DRAWER = "DRAWER", t.DIALOG = "DIALOG", t.CONTENT = "CONTENT", t.WINDOW = "WINDOW", t.SERVICE = "SERVICE", t))(fr || {}), j = /* @__PURE__ */ ((t) => (t.Default = "Default", t))(j || {});
20
- class _e {
21
- constructor(n, r = null, e = "", o = j.Default, s = 0, i = 0) {
22
- this.nid = n, this.node = r, this.text = e, this.theme = o, this.x = s, this.y = i;
19
+ var or = /* @__PURE__ */ ((t) => (t[t.TOP = 0] = "TOP", t[t.RIGHT = 1] = "RIGHT", t[t.BOTTOM = 2] = "BOTTOM", t[t.LEFT = 3] = "LEFT", t[t.TOP_LEFT = 4] = "TOP_LEFT", t[t.BOTTOM_LEFT = 5] = "BOTTOM_LEFT", t[t.TOP_RIGHT = 6] = "TOP_RIGHT", t[t.BOTTOM_RIGHT = 7] = "BOTTOM_RIGHT", t[t.UNKNOWN = 8] = "UNKNOWN", t))(or || {}), ur = /* @__PURE__ */ ((t) => (t.BUTTON = "BUTTON", t.SWITCH = "SWITCH", t.DRAWER = "DRAWER", t.DIALOG = "DIALOG", t.CONTENT = "CONTENT", t.WINDOW = "WINDOW", t.SERVICE = "SERVICE", t))(ur || {}), j = /* @__PURE__ */ ((t) => (t.Default = "Default", t))(j || {});
20
+ class we {
21
+ constructor(r, n = null, e = "", o = j.Default, s = 0, i = 0) {
22
+ this.nid = r, this.node = n, this.text = e, this.theme = o, this.x = s, this.y = i;
23
23
  }
24
24
  parentElement = null;
25
25
  pointElement = null;
@@ -32,150 +32,150 @@ class _e {
32
32
  lastClickTime = 0;
33
33
  lastSp = null;
34
34
  }
35
- var ar = /* @__PURE__ */ ((t) => (t.ADD = "ADD", t.REMOVE = "REMOVE", t.START = "START", t.PROGRESS = "PROGRESS", t.PAUSE = "PAUSE", t.RESUME = "RESUME", t.LOADED = "LOADED", t.ERROR = "ERROR", t.CANCELED = "CANCELED", t))(ar || {}), Er = /* @__PURE__ */ ((t) => (t.WAITING = "WAITING", t.LOADING = "LOADING", t.LOADED = "LOADED", t.ERROR = "ERROR", t.CANCELED = "CANCELED", t))(Er || {}), lr = /* @__PURE__ */ ((t) => (t.WAITING = "WAITING", t.LOADING = "LOADING", t.LOADED = "LOADED", t.ERROR = "ERROR", t.CANCELED = "CANCELED", t))(lr || {}), hr = /* @__PURE__ */ ((t) => (t.START = "START", t.PROGRESS = "PROGRESS", t.LOADED = "LOADED", t.ERROR = "ERROR", t.CANCELED = "CANCELED", t))(hr || {});
35
+ var sr = /* @__PURE__ */ ((t) => (t.ADD = "ADD", t.REMOVE = "REMOVE", t.START = "START", t.PROGRESS = "PROGRESS", t.PAUSE = "PAUSE", t.RESUME = "RESUME", t.LOADED = "LOADED", t.ERROR = "ERROR", t.CANCELED = "CANCELED", t))(sr || {}), ir = /* @__PURE__ */ ((t) => (t.WAITING = "WAITING", t.LOADING = "LOADING", t.LOADED = "LOADED", t.ERROR = "ERROR", t.CANCELED = "CANCELED", t))(ir || {}), cr = /* @__PURE__ */ ((t) => (t.WAITING = "WAITING", t.LOADING = "LOADING", t.LOADED = "LOADED", t.ERROR = "ERROR", t.CANCELED = "CANCELED", t))(cr || {}), ar = /* @__PURE__ */ ((t) => (t.START = "START", t.PROGRESS = "PROGRESS", t.LOADED = "LOADED", t.ERROR = "ERROR", t.CANCELED = "CANCELED", t))(ar || {});
36
36
  class K {
37
- constructor(n, r, e = [], o = !1, s = 0, i = 0, a = !1, l, E = null, h = /* @__PURE__ */ new Date()) {
38
- this.options = n, this.id = r, this.lines = e, this.showIcon = o, this.x = s, this.y = i, this.closeOnOutsideClick = a, this.theme = l, this.controller = E, this.createTime = h;
37
+ constructor(r, n, e = [], o = !1, s = 0, i = 0, f = !1, h, E = null, A = /* @__PURE__ */ new Date()) {
38
+ this.options = r, this.id = n, this.lines = e, this.showIcon = o, this.x = s, this.y = i, this.closeOnOutsideClick = f, this.theme = h, this.controller = E, this.createTime = A;
39
39
  }
40
- static fromOptions(n, r, e) {
41
- let { showIcon: o } = r;
42
- return o === void 0 && r.lines?.forEach((s) => {
40
+ static fromOptions(r, n, e) {
41
+ let { showIcon: o } = n;
42
+ return o === void 0 && n.lines?.forEach((s) => {
43
43
  s.icon && (o = !0);
44
44
  }), new K(
45
- r,
46
45
  n,
46
+ r,
47
47
  e,
48
48
  o,
49
- r.x,
50
- r.y,
51
- r.closeOnOutsideClick,
52
- r.theme
49
+ n.x,
50
+ n.y,
51
+ n.closeOnOutsideClick,
52
+ n.theme
53
53
  );
54
54
  }
55
55
  }
56
56
  var V = /* @__PURE__ */ ((t) => (t.BUTTON = "BUTTON", t.DIVIDER = "DIVIDER", t.CHECKBOX = "CHECKBOX", t.SUB = "SUB", t.VIEW = "VIEW", t))(V || {});
57
57
  class $ {
58
- constructor(n, r, e = V.BUTTON, o = "", s = "", i = void 0, a = void 0, l = "", E = !1, h = "", T = () => {
58
+ constructor(r, n, e = V.BUTTON, o = "", s = "", i = void 0, f = void 0, h = "", E = !1, A = "", T = () => {
59
59
  }, L = () => {
60
60
  }, S = () => {
61
- }, B = e === V.BUTTON, b = !1, U = () => {
62
- }, m = void 0, G = /* @__PURE__ */ new Date()) {
63
- this.options = n, this.id = r, this.type = e, this.text = o, this.tip = s, this.icon = i, this.view = a, this.color = l, this.disabled = E, this.shortcut = h, this.onClick = T, this.onMouseOver = L, this.onMouseOut = S, this.closeAllOnClick = B, this.checkboxDefaultValue = b, this.onCheckboxChange = U, this.sub = m, this.createTime = G;
61
+ }, B = e === V.BUTTON, b = !1, m = () => {
62
+ }, w = void 0, G = /* @__PURE__ */ new Date()) {
63
+ this.options = r, this.id = n, this.type = e, this.text = o, this.tip = s, this.icon = i, this.view = f, this.color = h, this.disabled = E, this.shortcut = A, this.onClick = T, this.onMouseOver = L, this.onMouseOut = S, this.closeAllOnClick = B, this.checkboxDefaultValue = b, this.onCheckboxChange = m, this.sub = w, this.createTime = G;
64
64
  }
65
- static fromOptions(n, r) {
65
+ static fromOptions(r, n) {
66
66
  return new $(
67
- r,
68
67
  n,
69
- r.type,
70
- r.text,
71
- r.tip,
72
- r.icon,
73
- r.view,
74
- r.color,
75
- r.disabled,
76
- r.shortcut,
77
- r.onClick,
78
- r.onMouseOver,
79
- r.onMouseOut,
80
- r.closeAllOnClick,
81
- r.checkboxDefaultValue,
82
- r.onCheckboxChange,
83
- r.sub
68
+ r,
69
+ n.type,
70
+ n.text,
71
+ n.tip,
72
+ n.icon,
73
+ n.view,
74
+ n.color,
75
+ n.disabled,
76
+ n.shortcut,
77
+ n.onClick,
78
+ n.onMouseOver,
79
+ n.onMouseOut,
80
+ n.closeAllOnClick,
81
+ n.checkboxDefaultValue,
82
+ n.onCheckboxChange,
83
+ n.sub
84
84
  );
85
85
  }
86
86
  }
87
- var J = /* @__PURE__ */ ((t) => (t.GREEN = "GREEN", t.PURPLE = "PURPLE", t.BLUE = "BLUE", t.PINK = "PINK", t))(J || {}), Ar = /* @__PURE__ */ ((t) => (t.LEFT = "LEFT", t.CENTER = "CENTER", t.RIGHT = "RIGHT", t))(Ar || {});
87
+ var J = /* @__PURE__ */ ((t) => (t.GREEN = "GREEN", t.PURPLE = "PURPLE", t.BLUE = "BLUE", t.PINK = "PINK", t))(J || {}), fr = /* @__PURE__ */ ((t) => (t.LEFT = "LEFT", t.CENTER = "CENTER", t.RIGHT = "RIGHT", t))(fr || {});
88
88
  class Q {
89
- constructor(n, r, e = "", o = void 0, s = "", i = "LEFT", a = void 0, l = void 0, E = void 0, h = J.BLUE, T = !1, L = "", S = {}, B = "", b = "", U = !1, m = "", G = "", xt = U, Bt = !1, bt = () => {
90
- }, Gt = () => !0, Ht = !0, Vt = () => {
91
- }, _t = () => {
89
+ constructor(r, n, e = "", o = void 0, s = "", i = "LEFT", f = void 0, h = void 0, E = void 0, A = J.BLUE, T = !1, L = "", S = {}, B = "", b = "", m = !1, w = "", G = "", mt = m, wt = !1, gt = () => {
90
+ }, Ut = () => !0, xt = !0, Bt = () => {
91
+ }, bt = () => {
92
+ }, Gt = () => {
93
+ }, Ht = () => {
94
+ }, Vt = () => {
92
95
  }, Mt = () => {
93
- }, Ft = () => {
94
- }, Wt = () => {
95
- }, yt = () => {
96
96
  }, kt = () => {
97
- }, zt = () => {
98
- }, Xt = () => () => {
99
- }, Yt = !0, jt = !0, Kt = !1, $t = !0, Jt = !1, Qt = m, qt = /* @__PURE__ */ new Date(), Zt = () => {
100
- }, pt = /* @__PURE__ */ new Map()) {
101
- this.options = n, this.id = r, this.title = e, this.titleIcon = o, this.content = s, this.contentAlign = i, this.contentView = a, this.icon = l, this.view = E, this.theme = h, this.leftMode = T, this.className = L, this.style = S, this.confirmText = B, this.cancelText = b, this.enableInput = U, this.defaultValue = m, this.inputPlaceholder = G, this.autoFocus = xt, this.allowEmpty = Bt, this.onChange = bt, this.onCheck = Gt, this.enableCloseButton = Ht, this.onConfirm = Vt, this.onCancel = _t, this.onClose = Mt, this.onConfirmButtonClick = Ft, this.onCancelButtonClick = Wt, this.onOutsideClick = yt, this.onCloseButtonClick = kt, this.onRender = zt, this.onEffect = Xt, this.closeOnConfirm = Yt, this.closeOnCancel = jt, this.closeOnOutsideClick = Kt, this.closeOnCloseButtonClick = $t, this.alignButton = Jt, this.inputValue = Qt, this.createTime = qt, this.focusInput = Zt, this.elements = pt;
97
+ }, yt = () => {
98
+ }, Ft = () => () => {
99
+ }, Wt = !0, _t = !0, zt = !1, Xt = !0, Yt = !1, jt = w, Kt = /* @__PURE__ */ new Date(), $t = () => {
100
+ }, Jt = /* @__PURE__ */ new Map()) {
101
+ this.options = r, this.id = n, this.title = e, this.titleIcon = o, this.content = s, this.contentAlign = i, this.contentView = f, this.icon = h, this.view = E, this.theme = A, this.leftMode = T, this.className = L, this.style = S, this.confirmText = B, this.cancelText = b, this.enableInput = m, this.defaultValue = w, this.inputPlaceholder = G, this.autoFocus = mt, this.allowEmpty = wt, this.onChange = gt, this.onCheck = Ut, this.enableCloseButton = xt, this.onConfirm = Bt, this.onCancel = bt, this.onClose = Gt, this.onConfirmButtonClick = Ht, this.onCancelButtonClick = Vt, this.onOutsideClick = Mt, this.onCloseButtonClick = kt, this.onRender = yt, this.onEffect = Ft, this.closeOnConfirm = Wt, this.closeOnCancel = _t, this.closeOnOutsideClick = zt, this.closeOnCloseButtonClick = Xt, this.alignButton = Yt, this.inputValue = jt, this.createTime = Kt, this.focusInput = $t, this.elements = Jt;
102
102
  }
103
- static fromOptions(n, r) {
103
+ static fromOptions(r, n) {
104
104
  return new Q(
105
- r,
106
105
  n,
107
- r.title,
108
- r.titleIcon,
109
- r.content,
110
- r.contentAlign,
111
- r.contentView,
112
- r.icon,
113
- r.view,
114
- r.theme,
115
- r.leftMode,
116
- r.className,
117
- r.style,
118
- r.confirmText,
119
- r.cancelText,
120
- r.enableInput,
121
- r.defaultValue,
122
- r.inputPlaceholder,
123
- r.autoFocus,
124
- r.allowEmpty,
125
- r.onChange,
126
- r.onCheck,
127
- r.enableCloseButton,
128
- r.onConfirm,
129
- r.onCancel,
130
- r.onClose,
131
- r.onConfirmButtonClick,
132
- r.onCancelButtonClick,
133
- r.onOutsideClick,
134
- r.onCloseButtonClick,
135
- r.onRender,
136
- r.onEffect,
137
- r.closeOnConfirm,
138
- r.closeOnCancel,
139
- r.closeOnOutsideClick,
140
- r.closeOnCloseButtonClick,
141
- r.alignButton
106
+ r,
107
+ n.title,
108
+ n.titleIcon,
109
+ n.content,
110
+ n.contentAlign,
111
+ n.contentView,
112
+ n.icon,
113
+ n.view,
114
+ n.theme,
115
+ n.leftMode,
116
+ n.className,
117
+ n.style,
118
+ n.confirmText,
119
+ n.cancelText,
120
+ n.enableInput,
121
+ n.defaultValue,
122
+ n.inputPlaceholder,
123
+ n.autoFocus,
124
+ n.allowEmpty,
125
+ n.onChange,
126
+ n.onCheck,
127
+ n.enableCloseButton,
128
+ n.onConfirm,
129
+ n.onCancel,
130
+ n.onClose,
131
+ n.onConfirmButtonClick,
132
+ n.onCancelButtonClick,
133
+ n.onOutsideClick,
134
+ n.onCloseButtonClick,
135
+ n.onRender,
136
+ n.onEffect,
137
+ n.closeOnConfirm,
138
+ n.closeOnCancel,
139
+ n.closeOnOutsideClick,
140
+ n.closeOnCloseButtonClick,
141
+ n.alignButton
142
142
  );
143
143
  }
144
144
  setHide = () => {
145
145
  };
146
146
  }
147
- var Or = /* @__PURE__ */ ((t) => (t.WAITING = "WAITING", t.LOADING = "LOADING", t.LOADED = "LOADED", t.ERROR = "ERROR", t.CANCELED = "CANCELED", t))(Or || {}), Dr = /* @__PURE__ */ ((t) => (t.START = "START", t.PROGRESS = "PROGRESS", t.LOADED = "LOADED", t.ERROR = "ERROR", t.CANCELED = "CANCELED", t))(Dr || {});
148
- const f = "*/*", u = "unknown/unknown", O = "babylonjs/scene", F = "babylonjs/mesh", q = "babylonjs/light", Z = "babylonjs/camera", D = "babylonjs/texture", C = "babylonjs/material", w = "babylonjs/uv", p = "babylonjs/animation", v = "model/gltf-binary", tt = "model/gltf+json", W = "model/stl", rt = "model/obj", nt = "audio/mpeg", et = "audio/wav", Rr = "audio/aac", Nr = "audio/ogg", Tr = "audio/flac", Lr = "audio/opus", ot = "image/jpeg", ut = "image/png", Sr = "image/gif", Ir = "image/bmp", Cr = "image/webp", dr = "image/svg+xml", Pr = "image/tiff", Ur = "image/x-icon", mr = "image/heif", wr = "image/avif", st = "video/mp4", gr = "video/webm", xr = "video/x-msvideo", Br = "video/mpeg", br = "video/quicktime", Gr = "video/x-ms-wmv", Hr = "video/x-flv", Vr = "video/ogg", _r = "video/3gpp", Mr = "video/x-matroska", it = "application/json", ct = "nextflow/sync", ft = "text/plain", Fr = "text/markdown", R = [ot, ut], d = [O, v, tt, W, rt], N = [st], y = [O, F, q, Z, D, C, w, p], g = [nt, et], P = [ft], x = [it], Wr = [ct], at = [
147
+ var Er = /* @__PURE__ */ ((t) => (t.WAITING = "WAITING", t.LOADING = "LOADING", t.LOADED = "LOADED", t.ERROR = "ERROR", t.CANCELED = "CANCELED", t))(Er || {}), lr = /* @__PURE__ */ ((t) => (t.START = "START", t.PROGRESS = "PROGRESS", t.LOADED = "LOADED", t.ERROR = "ERROR", t.CANCELED = "CANCELED", t))(lr || {});
148
+ const a = "*/*", u = "unknown/unknown", O = "babylonjs/scene", y = "babylonjs/mesh", q = "babylonjs/light", Z = "babylonjs/camera", D = "babylonjs/texture", C = "babylonjs/material", g = "babylonjs/uv", p = "babylonjs/animation", v = "model/gltf-binary", tt = "model/gltf+json", F = "model/stl", rt = "model/obj", nt = "audio/mpeg", et = "audio/wav", hr = "audio/aac", Ar = "audio/ogg", Or = "audio/flac", Dr = "audio/opus", ot = "image/jpeg", ut = "image/png", Rr = "image/gif", Nr = "image/bmp", Tr = "image/webp", Lr = "image/svg+xml", Sr = "image/tiff", Ir = "image/x-icon", Cr = "image/heif", Pr = "image/avif", st = "video/mp4", dr = "video/webm", mr = "video/x-msvideo", wr = "video/mpeg", gr = "video/quicktime", Ur = "video/x-ms-wmv", xr = "video/x-flv", Br = "video/ogg", br = "video/3gpp", Gr = "video/x-matroska", it = "application/json", ct = "nextflow/sync", at = "text/plain", Hr = "text/markdown", R = [ot, ut], P = [O, v, tt, F, rt], N = [st], W = [O, y, q, Z, D, C, g, p], U = [nt, et], d = [at], x = [it], Vr = [ct], ft = [
149
149
  ...R,
150
- ...d,
151
- ...N,
152
- ...y,
153
- ...g,
154
150
  ...P,
151
+ ...N,
152
+ ...W,
153
+ ...U,
154
+ ...d,
155
155
  ...x
156
156
  ], Et = [
157
157
  ...R,
158
- ...d,
159
- ...N,
160
- ...g,
161
158
  ...P,
159
+ ...N,
160
+ ...U,
161
+ ...d,
162
162
  ...x
163
163
  ], lt = [
164
164
  ...R,
165
- ...d,
165
+ ...P,
166
166
  ...N,
167
- ...P
168
- ], ht = [...R, ...N, D], At = [D, C, w];
167
+ ...d
168
+ ], ht = [...R, ...N, D], At = [D, C, g];
169
169
  async function Ot(t) {
170
170
  if (t && t instanceof Blob) {
171
171
  if (t instanceof File && t.name.endsWith(".babylon"))
172
172
  return O;
173
- const n = await er(t);
174
- return !n && t instanceof File && t.name.endsWith(".stl") ? W : n?.mime ?? u;
173
+ const r = await vt(t);
174
+ return !r && t instanceof File && t.name.endsWith(".stl") ? F : r?.mime ?? u;
175
175
  }
176
176
  return u;
177
177
  }
178
- async function k(t) {
178
+ async function _(t) {
179
179
  return t ? t.endsWith(".babylon") ? O : (await import("mime")).default.getType(t) ?? u : u;
180
180
  }
181
181
  async function Dt(t) {
@@ -184,152 +184,152 @@ async function Dt(t) {
184
184
  if (t.endsWith(".babylon"))
185
185
  return O;
186
186
  try {
187
- const n = await fetch(t);
188
- if (!n.body)
187
+ const r = await fetch(t);
188
+ if (!r.body)
189
189
  return u;
190
- const r = await Y(n.body);
191
- if (r?.mime) return r.mime;
190
+ const n = await Y(r.body);
191
+ if (n?.mime) return n.mime;
192
192
  const o = new URL(t).pathname;
193
193
  if (o.includes("."))
194
- return await k(o);
195
- } catch (n) {
196
- console.error("getMimeByUrl", n);
194
+ return await _(o);
195
+ } catch (r) {
196
+ console.error("getMimeByUrl", r);
197
197
  }
198
198
  return u;
199
199
  }
200
200
  async function Rt(t) {
201
- return t ? (await or(t))?.mime ?? u : u;
201
+ return t ? (await tr(t))?.mime ?? u : u;
202
202
  }
203
203
  async function Nt(t) {
204
204
  return (await Y(t))?.mime ?? u;
205
205
  }
206
- async function yr(t) {
206
+ async function Mr(t) {
207
207
  if (t) {
208
208
  if (typeof ReadableStream < "u" && t instanceof ReadableStream)
209
209
  return Nt(t);
210
210
  if (t instanceof Blob)
211
211
  return Ot(t);
212
212
  if (typeof t == "string")
213
- return t.startsWith("http://") || t.startsWith("https://") ? Dt(t) : k(t);
213
+ return t.startsWith("http://") || t.startsWith("https://") ? Dt(t) : _(t);
214
214
  if (t instanceof ArrayBuffer || t instanceof Uint8Array)
215
215
  return Rt(t);
216
- if (t instanceof vt)
216
+ if (t instanceof Qt)
217
217
  return D;
218
- if (t instanceof tr)
218
+ if (t instanceof qt)
219
219
  return C;
220
- if (t instanceof rr)
221
- return F;
220
+ if (t instanceof Zt)
221
+ return y;
222
222
  } else return u;
223
223
  return u;
224
224
  }
225
225
  async function kr(t = u) {
226
- return t === O ? "babylon" : Tt(t) || Lt(t) ? t : t === f || t === u ? "" : (await import("mime")).default.getExtension(t) ?? "";
226
+ return t === O ? "babylon" : Tt(t) || Lt(t) ? t : t === a || t === u ? "" : (await import("mime")).default.getExtension(t) ?? "";
227
+ }
228
+ function yr(t = u) {
229
+ return t == a ? !0 : t == u ? !1 : ft.includes(t);
230
+ }
231
+ function Fr(t = u) {
232
+ return t == a ? !0 : t == u ? !1 : Et.includes(t);
233
+ }
234
+ function Wr(t = u) {
235
+ return t == a ? !0 : t == u ? !1 : R.includes(t);
236
+ }
237
+ function _r(t = u) {
238
+ return t == a ? !0 : t == u ? !1 : P.includes(t);
227
239
  }
228
240
  function zr(t = u) {
229
- return t == f ? !0 : t == u ? !1 : at.includes(t);
241
+ return t == a ? !0 : t == u ? !1 : N.includes(t);
230
242
  }
231
243
  function Xr(t = u) {
232
- return t == f ? !0 : t == u ? !1 : Et.includes(t);
244
+ return t == a ? !0 : t == u ? !1 : d.includes(t);
233
245
  }
234
246
  function Yr(t = u) {
235
- return t == f ? !0 : t == u ? !1 : R.includes(t);
247
+ return t == a ? !0 : t == u ? !1 : x.includes(t);
248
+ }
249
+ function Tt(t = u) {
250
+ return t == a ? !0 : t == u ? !1 : W.includes(t);
236
251
  }
237
252
  function jr(t = u) {
238
- return t == f ? !0 : t == u ? !1 : d.includes(t);
253
+ return t == a ? !0 : t == u ? !1 : U.includes(t);
239
254
  }
240
255
  function Kr(t = u) {
241
- return t == f ? !0 : t == u ? !1 : N.includes(t);
256
+ return t == a ? !0 : t == u ? !1 : lt.includes(t);
242
257
  }
243
258
  function $r(t = u) {
244
- return t == f ? !0 : t == u ? !1 : P.includes(t);
259
+ return t == a ? !0 : t == u ? !1 : ht.includes(t);
245
260
  }
246
261
  function Jr(t = u) {
247
- return t == f ? !0 : t == u ? !1 : x.includes(t);
248
- }
249
- function Tt(t = u) {
250
- return t == f ? !0 : t == u ? !1 : y.includes(t);
262
+ return t == a ? !0 : t == u ? !1 : t == D;
251
263
  }
252
264
  function Qr(t = u) {
253
- return t == f ? !0 : t == u ? !1 : g.includes(t);
265
+ return t == a ? !0 : t == u ? !1 : t == C;
254
266
  }
255
267
  function qr(t = u) {
256
- return t == f ? !0 : t == u ? !1 : lt.includes(t);
257
- }
258
- function Zr(t = u) {
259
- return t == f ? !0 : t == u ? !1 : ht.includes(t);
260
- }
261
- function pr(t = u) {
262
- return t == f ? !0 : t == u ? !1 : t == D;
263
- }
264
- function vr(t = u) {
265
- return t == f ? !0 : t == u ? !1 : t == C;
266
- }
267
- function tn(t = u) {
268
- return t == f ? !0 : t == u ? !1 : t == w;
268
+ return t == a ? !0 : t == u ? !1 : t == g;
269
269
  }
270
270
  function Lt(t = u) {
271
- return t == f ? !0 : t == u ? !1 : At.includes(t);
271
+ return t == a ? !0 : t == u ? !1 : At.includes(t);
272
272
  }
273
- const Me = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, AAC: Rr, ANIMATION: p, ANY: f, ATTACH_LIST: At, AVI: xr, AVIF: wr, BMP: Ir, CAMERA: Z, FLAC: Tr, FLV: Hr, GIF: Sr, GLB: v, GLTF: tt, GP3: _r, HEIF: mr, ICO: Ur, JPG: ot, JSON: it, LIGHT: q, MARKDOWN: Fr, MATERIAL: C, MESH: F, MKV: Mr, MOV: br, MP3: nt, MP4: st, MPEG: Br, NF: ct, OBJ: rt, OGG: Nr, OGV: Vr, OPUS: Lr, PNG: ut, SCENE: O, STL: W, SUPPORT_ALL_LIST: at, SUPPORT_AUDIO_LIST: g, SUPPORT_BABYLON_LIST: y, SUPPORT_FILE_LIST: Et, SUPPORT_IMAGE_LIST: R, SUPPORT_JSON_LIST: x, SUPPORT_MODEL_LIST: d, SUPPORT_NEXTFLOW_LIST: Wr, SUPPORT_RENDER_LIST: lt, SUPPORT_TEXTURE_LIST: ht, SUPPORT_TEXT_LIST: P, SUPPORT_VIDEO_LIST: N, SVG: dr, TEXTURE: D, TIFF: Pr, TXT: ft, UNKNOWN: u, UV: w, WAV: et, WMV: Gr, WebM: gr, WebP: Cr, getExtension: kr, getMime: yr, getMimeByBlob: Ot, getMimeByBuffer: Rt, getMimeByPath: k, getMimeByStream: Nt, getMimeByUrl: Dt, isAttach: Lt, isBabylon: Tt, isMaterial: vr, isSupport: zr, isSupportAudio: Qr, isSupportFile: Xr, isSupportImage: Yr, isSupportJson: Jr, isSupportModel: jr, isSupportRender: qr, isSupportText: $r, isSupportTexture: Zr, isSupportVideo: Kr, isTexture: pr, isUV: tn }, Symbol.toStringTag, { value: "Module" }));
274
- var rn = /* @__PURE__ */ ((t) => (t.ADD = "ADD", t.REMOVE = "REMOVE", t.START = "START", t.PROGRESS = "PROGRESS", t.PAUSE = "PAUSE", t.RESUME = "RESUME", t.LOADED = "LOADED", t.ERROR = "ERROR", t.CANCELED = "CANCELED", t))(rn || {}), nn = /* @__PURE__ */ ((t) => (t.WAITING = "WAITING", t.LOADING = "LOADING", t.PAUSED = "PAUSED", t.LOADED = "LOADED", t.FAILED = "FAILED", t.CANCELED = "CANCELED", t))(nn || {}), en = /* @__PURE__ */ ((t) => (t.BLOB = "BLOB", t.OBJECT = "OBJECT", t))(en || {}), on = /* @__PURE__ */ ((t) => (t.WAITING = "WAITING", t.UPLOADING = "UPLOADING", t.PAUSED = "PAUSED", t.COMPLETED = "COMPLETED", t.FAILED = "FAILED", t.CANCELED = "CANCELED", t))(on || {}), un = /* @__PURE__ */ ((t) => (t.START = "START", t.PROGRESS = "PROGRESS", t.PAUSE = "PAUSE", t.RESUME = "RESUME", t.UPLOADED = "UPLOADED", t.FAILED = "FAILED", t.CANCELED = "CANCELED", t))(un || {}), sn = /* @__PURE__ */ ((t) => (t.ZH = "zh", t.EN = "en", t))(sn || {}), cn = /* @__PURE__ */ ((t) => (t.PENDING = "PENDING", t.PROGRESSING = "PROGRESSING", t.ENDED = "ENDED", t.CANCELED = "CANCELED", t.BANNED = "BANNED", t))(cn || {}), fn = /* @__PURE__ */ ((t) => (t.NONE = "NONE", t.SELF = "SELF", t.ALL = "ALL", t))(fn || {});
275
- class Fe {
276
- constructor(n, r, e, o) {
277
- this.text = n, this.type = r, this.duration = e, this.id = o;
273
+ const ge = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, AAC: hr, ANIMATION: p, ANY: a, ATTACH_LIST: At, AVI: mr, AVIF: Pr, BMP: Nr, CAMERA: Z, FLAC: Or, FLV: xr, GIF: Rr, GLB: v, GLTF: tt, GP3: br, HEIF: Cr, ICO: Ir, JPG: ot, JSON: it, LIGHT: q, MARKDOWN: Hr, MATERIAL: C, MESH: y, MKV: Gr, MOV: gr, MP3: nt, MP4: st, MPEG: wr, NF: ct, OBJ: rt, OGG: Ar, OGV: Br, OPUS: Dr, PNG: ut, SCENE: O, STL: F, SUPPORT_ALL_LIST: ft, SUPPORT_AUDIO_LIST: U, SUPPORT_BABYLON_LIST: W, SUPPORT_FILE_LIST: Et, SUPPORT_IMAGE_LIST: R, SUPPORT_JSON_LIST: x, SUPPORT_MODEL_LIST: P, SUPPORT_NEXTFLOW_LIST: Vr, SUPPORT_RENDER_LIST: lt, SUPPORT_TEXTURE_LIST: ht, SUPPORT_TEXT_LIST: d, SUPPORT_VIDEO_LIST: N, SVG: Lr, TEXTURE: D, TIFF: Sr, TXT: at, UNKNOWN: u, UV: g, WAV: et, WMV: Ur, WebM: dr, WebP: Tr, getExtension: kr, getMime: Mr, getMimeByBlob: Ot, getMimeByBuffer: Rt, getMimeByPath: _, getMimeByStream: Nt, getMimeByUrl: Dt, isAttach: Lt, isBabylon: Tt, isMaterial: Qr, isSupport: yr, isSupportAudio: jr, isSupportFile: Fr, isSupportImage: Wr, isSupportJson: Yr, isSupportModel: _r, isSupportRender: Kr, isSupportText: Xr, isSupportTexture: $r, isSupportVideo: zr, isTexture: Jr, isUV: qr }, Symbol.toStringTag, { value: "Module" }));
274
+ var Zr = /* @__PURE__ */ ((t) => (t.ADD = "ADD", t.REMOVE = "REMOVE", t.START = "START", t.PROGRESS = "PROGRESS", t.PAUSE = "PAUSE", t.RESUME = "RESUME", t.LOADED = "LOADED", t.ERROR = "ERROR", t.CANCELED = "CANCELED", t))(Zr || {}), pr = /* @__PURE__ */ ((t) => (t.WAITING = "WAITING", t.LOADING = "LOADING", t.PAUSED = "PAUSED", t.LOADED = "LOADED", t.FAILED = "FAILED", t.CANCELED = "CANCELED", t))(pr || {}), vr = /* @__PURE__ */ ((t) => (t.BLOB = "BLOB", t.OBJECT = "OBJECT", t))(vr || {}), tn = /* @__PURE__ */ ((t) => (t.WAITING = "WAITING", t.UPLOADING = "UPLOADING", t.PAUSED = "PAUSED", t.COMPLETED = "COMPLETED", t.FAILED = "FAILED", t.CANCELED = "CANCELED", t))(tn || {}), rn = /* @__PURE__ */ ((t) => (t.START = "START", t.PROGRESS = "PROGRESS", t.PAUSE = "PAUSE", t.RESUME = "RESUME", t.UPLOADED = "UPLOADED", t.FAILED = "FAILED", t.CANCELED = "CANCELED", t))(rn || {}), nn = /* @__PURE__ */ ((t) => (t.ZH = "zh", t.EN = "en", t))(nn || {}), en = /* @__PURE__ */ ((t) => (t.PENDING = "PENDING", t.PROGRESSING = "PROGRESSING", t.ENDED = "ENDED", t.CANCELED = "CANCELED", t.BANNED = "BANNED", t))(en || {}), on = /* @__PURE__ */ ((t) => (t.NONE = "NONE", t.SELF = "SELF", t.ALL = "ALL", t))(on || {});
275
+ class Ue {
276
+ constructor(r, n, e, o) {
277
+ this.text = r, this.type = n, this.duration = e, this.id = o;
278
278
  }
279
279
  show = !0;
280
280
  height = 20;
281
281
  opacity = 0;
282
282
  }
283
- var an = /* @__PURE__ */ ((t) => (t.ADD = "ADD", t.INSTALL = "INSTALL", t.ENABLE = "ENABLE", t.OPEN = "OPEN", t.CLOSE = "CLOSE", t.DISABLE = "DISABLE", t.UNINSTALL = "UNINSTALL", t.DEBUG = "DEBUG", t))(an || {}), En = /* @__PURE__ */ ((t) => (t.DISPLAY = "DISPLAY", t.FULL = "FULL", t.HP_BOX = "HP_BOX", t.VR = "VR", t.MR = "MR", t))(En || {}), I = /* @__PURE__ */ ((t) => (t.EDITOR = "EDITOR", t.VIEWER = "VIEWER", t.VISITOR = "VISITOR", t))(I || {}), ln = /* @__PURE__ */ ((t) => (t.DEFAULT = "DEFAULT", t.DESCRIPTION = "DESCRIPTION", t))(ln || {}), hn = /* @__PURE__ */ ((t) => (t.XS = "XS", t.SM = "SM", t.MD = "MD", t.LG = "LG", t.XL = "XL", t))(hn || {}), An = /* @__PURE__ */ ((t) => (t.DEFAULT = "DEFAULT", t.BACKGROUND = "BACKGROUND", t.LIGHT = "LIGHT", t.DARK = "DARK", t))(An || {}), On = /* @__PURE__ */ ((t) => (t.GENERAL = "GENERAL", t.RHINE = "RHINE", t))(On || {}), Dn = /* @__PURE__ */ ((t) => (t.Global = "GLOBAL", t.Step = "STEP", t.Node = "NODE", t))(Dn || {}), Rn = /* @__PURE__ */ ((t) => (t.UNDO = "UNDO", t.REDO = "REDO", t))(Rn || {}), Nn = /* @__PURE__ */ ((t) => (t.ADD = "ADD", t.REMOVE = "REMOVE", t))(Nn || {}), Tn = /* @__PURE__ */ ((t) => (t.OSS = "OSS", t.URL = "URL", t))(Tn || {}), Ln = /* @__PURE__ */ ((t) => (t.TEXT = "TEXT", t.CUBE = "CUBE", t.SPHERE = "SPHERE", t.CONE = "CONE", t.PRISM = "PRISM", t.POLYHEDRON = "POLYHEDRON", t.TORUS = "TORUS", t.CYLINDER = "CYLINDER", t.ICO_SPHERE = "ICO_SPHERE", t.CAPSULE = "CAPSULE", t.PLANE = "PLANE", t))(Ln || {}), Sn = /* @__PURE__ */ ((t) => (t.BASIC = "BASIC", t.PROVIDE = "PROVIDE", t.UPLOAD = "UPLOAD", t))(Sn || {}), In = /* @__PURE__ */ ((t) => (t.NONE = "NONE", t.INSTALL = "INSTALL", t.ENABLE = "ENABLE", t.OPEN = "OPEN", t))(In || {}), Cn = /* @__PURE__ */ ((t) => (t.LATEST_STABLE = "LATEST_STABLE", t.LATEST_NIGHTLY = "LATEST_NIGHTLY", t.LATEST_CANARY = "LATEST_CANARY", t))(Cn || {}), dn = /* @__PURE__ */ ((t) => (t.TEXTURE = "TEXTURE", t.MATERIAL = "MATERIAL", t.UV = "UV", t))(dn || {}), Pn = /* @__PURE__ */ ((t) => (t.FILE = "FILE", t.ATTACH = "ATTACH", t))(Pn || {}), Un = /* @__PURE__ */ ((t) => (t.NONE = "NONE", t.METAL = "METAL", t.PLASTIC = "PLASTIC", t.GLASS = "GLASS", t.WOOD = "WOOD", t.MIRROR = "MIRROR", t.CRYSTAL = "CRYSTAL", t.PAINT = "PAINT", t.CLOTH = "CLOTH", t))(Un || {}), mn = /* @__PURE__ */ ((t) => (t.ADD = "ADD", t.REMOVE = "REMOVE", t))(mn || {}), wn = /* @__PURE__ */ ((t) => (t.SYNC = "SYNC", t.STEP = "STEP", t.SELECT = "SELECT", t.ADD = "ADD", t.UPDATE = "UPDATE", t.DELETE = "DELETE", t))(wn || {});
284
- async function gn(t) {
285
- const n = await crypto.subtle.digest("SHA-256", t);
286
- return Array.from(new Uint8Array(n)).map((e) => e.toString(16).padStart(2, "0")).join("");
283
+ var un = /* @__PURE__ */ ((t) => (t.ADD = "ADD", t.INSTALL = "INSTALL", t.ENABLE = "ENABLE", t.OPEN = "OPEN", t.CLOSE = "CLOSE", t.DISABLE = "DISABLE", t.UNINSTALL = "UNINSTALL", t.DEBUG = "DEBUG", t))(un || {}), sn = /* @__PURE__ */ ((t) => (t.DISPLAY = "DISPLAY", t.FULL = "FULL", t.HP_BOX = "HP_BOX", t.VR = "VR", t.MR = "MR", t))(sn || {}), I = /* @__PURE__ */ ((t) => (t.EDITOR = "EDITOR", t.VIEWER = "VIEWER", t.VISITOR = "VISITOR", t))(I || {}), cn = /* @__PURE__ */ ((t) => (t.DEFAULT = "DEFAULT", t.DESCRIPTION = "DESCRIPTION", t))(cn || {}), an = /* @__PURE__ */ ((t) => (t.XS = "XS", t.SM = "SM", t.MD = "MD", t.LG = "LG", t.XL = "XL", t))(an || {}), fn = /* @__PURE__ */ ((t) => (t.DEFAULT = "DEFAULT", t.BACKGROUND = "BACKGROUND", t.LIGHT = "LIGHT", t.DARK = "DARK", t))(fn || {}), En = /* @__PURE__ */ ((t) => (t.GENERAL = "GENERAL", t.RHINE = "RHINE", t))(En || {}), ln = /* @__PURE__ */ ((t) => (t.Global = "GLOBAL", t.Step = "STEP", t.Node = "NODE", t))(ln || {}), hn = /* @__PURE__ */ ((t) => (t.UNDO = "UNDO", t.REDO = "REDO", t))(hn || {}), An = /* @__PURE__ */ ((t) => (t.ADD = "ADD", t.REMOVE = "REMOVE", t))(An || {}), On = /* @__PURE__ */ ((t) => (t.OSS = "OSS", t.URL = "URL", t))(On || {}), Dn = /* @__PURE__ */ ((t) => (t.TEXT = "TEXT", t.CUBE = "CUBE", t.SPHERE = "SPHERE", t.CONE = "CONE", t.PRISM = "PRISM", t.POLYHEDRON = "POLYHEDRON", t.TORUS = "TORUS", t.CYLINDER = "CYLINDER", t.ICO_SPHERE = "ICO_SPHERE", t.CAPSULE = "CAPSULE", t.PLANE = "PLANE", t))(Dn || {}), Rn = /* @__PURE__ */ ((t) => (t.BASIC = "BASIC", t.PROVIDE = "PROVIDE", t.UPLOAD = "UPLOAD", t))(Rn || {}), Nn = /* @__PURE__ */ ((t) => (t.NONE = "NONE", t.INSTALL = "INSTALL", t.ENABLE = "ENABLE", t.OPEN = "OPEN", t))(Nn || {}), Tn = /* @__PURE__ */ ((t) => (t.LATEST_STABLE = "LATEST_STABLE", t.LATEST_NIGHTLY = "LATEST_NIGHTLY", t.LATEST_CANARY = "LATEST_CANARY", t))(Tn || {}), Ln = /* @__PURE__ */ ((t) => (t.TEXTURE = "TEXTURE", t.MATERIAL = "MATERIAL", t.UV = "UV", t))(Ln || {}), Sn = /* @__PURE__ */ ((t) => (t.FILE = "FILE", t.ATTACH = "ATTACH", t))(Sn || {}), In = /* @__PURE__ */ ((t) => (t.NONE = "NONE", t.METAL = "METAL", t.PLASTIC = "PLASTIC", t.GLASS = "GLASS", t.WOOD = "WOOD", t.MIRROR = "MIRROR", t.CRYSTAL = "CRYSTAL", t.PAINT = "PAINT", t.CLOTH = "CLOTH", t))(In || {}), Cn = /* @__PURE__ */ ((t) => (t.ADD = "ADD", t.REMOVE = "REMOVE", t))(Cn || {}), Pn = /* @__PURE__ */ ((t) => (t.SYNC = "SYNC", t.STEP = "STEP", t.SELECT = "SELECT", t.ADD = "ADD", t.UPDATE = "UPDATE", t.DELETE = "DELETE", t))(Pn || {});
284
+ async function dn(t) {
285
+ const r = await crypto.subtle.digest("SHA-256", t);
286
+ return Array.from(new Uint8Array(r)).map((e) => e.toString(16).padStart(2, "0")).join("");
287
287
  }
288
288
  const H = {
289
- computeSHA256: gn
289
+ computeSHA256: dn
290
290
  };
291
- function xn(t, n) {
292
- const r = [];
293
- return r.push({ path: t, value: n }), r;
291
+ function mn(t, r) {
292
+ const n = [];
293
+ return n.push({ path: t, value: r }), n;
294
294
  }
295
- const We = {
296
- recursPathValue: xn
295
+ const xe = {
296
+ recursPathValue: mn
297
297
  };
298
298
  function St(t) {
299
- const n = Math.floor(t).toString().length, r = n <= 1 ? 2 : 1;
300
- return t.toFixed(r);
301
- }
302
- function Bn(t) {
303
- const n = ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
304
- let r = 0;
305
- for (; t >= 1024 && r < n.length - 1; )
306
- t /= 1024, r++;
299
+ const r = Math.floor(t).toString().length, n = r <= 1 ? 2 : 1;
300
+ return t.toFixed(n);
301
+ }
302
+ function wn(t) {
303
+ const r = ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
304
+ let n = 0;
305
+ for (; t >= 1024 && n < r.length - 1; )
306
+ t /= 1024, n++;
307
307
  let e = St(t);
308
- return e.endsWith(".0") && (e = e.slice(0, -2)), e.endsWith(".00") && (e = e.slice(0, -3)), `${e} ${n[r]}`;
308
+ return e.endsWith(".0") && (e = e.slice(0, -2)), e.endsWith(".00") && (e = e.slice(0, -3)), `${e} ${r[n]}`;
309
309
  }
310
- function bn(t) {
311
- const n = t.lastIndexOf(".");
312
- return n === -1 ? [t, ""] : [t.substring(0, n), t.substring(n + 1)];
310
+ function gn(t) {
311
+ const r = t.lastIndexOf(".");
312
+ return r === -1 ? [t, ""] : [t.substring(0, r), t.substring(r + 1)];
313
313
  }
314
- function Gn(t) {
314
+ function Un(t) {
315
315
  return t ? t instanceof File ? [t] : t instanceof FileList ? Array.from(t) : t : [];
316
316
  }
317
317
  async function It(t) {
318
- const n = [0.25, 0.5, 0.75], r = 64 * 1024, e = 1024 * 1024;
318
+ const r = [0.25, 0.5, 0.75], n = 64 * 1024, e = 1024 * 1024;
319
319
  if (t.size <= e) {
320
320
  const E = await t.arrayBuffer();
321
321
  return H.computeSHA256(E);
322
322
  }
323
- const o = n.map((E) => Math.floor(t.size * E)), s = await Promise.all(
323
+ const o = r.map((E) => Math.floor(t.size * E)), s = await Promise.all(
324
324
  o.map(async (E) => {
325
- const h = E, T = Math.min(h + r, t.size), L = t.slice(h, T), S = await L.arrayBuffer();
325
+ const A = E, T = Math.min(A + n, t.size), L = t.slice(A, T), S = await L.arrayBuffer();
326
326
  return H.computeSHA256(S);
327
327
  })
328
- ), i = new TextEncoder(), a = s.join(""), l = i.encode(a);
329
- return H.computeSHA256(l);
328
+ ), i = new TextEncoder(), f = s.join(""), h = i.encode(f);
329
+ return H.computeSHA256(h);
330
330
  }
331
- async function Hn(t, n, r, e) {
332
- if (n === t.name && r === t.size)
331
+ async function xn(t, r, n, e) {
332
+ if (r === t.name && n === t.size)
333
333
  if (e) {
334
334
  if (e === await It(t))
335
335
  return !0;
@@ -337,14 +337,14 @@ async function Hn(t, n, r, e) {
337
337
  return !0;
338
338
  return !1;
339
339
  }
340
- async function Vn(t) {
341
- const n = await fetch(t, { method: "HEAD" });
342
- if (!n.ok)
343
- throw new Error(`HEAD request failed with status: ${String(n.status)}`);
344
- const r = n.headers.get("Content-Length");
340
+ async function Bn(t) {
341
+ const r = await fetch(t, { method: "HEAD" });
342
+ if (!r.ok)
343
+ throw new Error(`HEAD request failed with status: ${String(r.status)}`);
344
+ const n = r.headers.get("Content-Length");
345
345
  let e;
346
- if (r) {
347
- if (e = parseInt(r, 10), isNaN(e))
346
+ if (n) {
347
+ if (e = parseInt(n, 10), isNaN(e))
348
348
  throw new Error("Invalid file size from header");
349
349
  } else {
350
350
  const i = await fetch(t);
@@ -354,475 +354,538 @@ async function Vn(t) {
354
354
  }
355
355
  return { name: new URL(t).pathname.split("/").pop() ?? "unknown", size: e };
356
356
  }
357
- const ye = {
357
+ const Be = {
358
358
  to3n: St,
359
- convertBytesToHigherUnit: Bn,
360
- splitName: bn,
361
- ensureFileArray: Gn,
359
+ convertBytesToHigherUnit: wn,
360
+ splitName: gn,
361
+ ensureFileArray: Un,
362
362
  chunkHash: It,
363
- isSameFile: Hn,
364
- getFileInfo: Vn
363
+ isSameFile: xn,
364
+ getFileInfo: Bn
365
365
  };
366
- function _n(t) {
366
+ function bn(t) {
367
367
  return t * (180 / Math.PI);
368
368
  }
369
- function Mn(t) {
369
+ function Gn(t) {
370
370
  return t * (Math.PI / 180);
371
371
  }
372
- function Fn(t, n, r = 1e-6) {
373
- return Math.abs(t - n) < r;
372
+ function Hn(t, r, n = 1e-6) {
373
+ return Math.abs(t - r) < n;
374
374
  }
375
- function Wn(t, n, r, e) {
376
- return Math.sqrt((r - t) ** 2 + (e - n) ** 2);
375
+ function Vn(t, r, n, e) {
376
+ return Math.sqrt((n - t) ** 2 + (e - r) ** 2);
377
377
  }
378
- function yn(t, n, r, e, o, s) {
379
- return Math.sqrt((e - t) ** 2 + (o - n) ** 2 + (s - r) ** 2);
378
+ function Mn(t, r, n, e, o, s) {
379
+ return Math.sqrt((e - t) ** 2 + (o - r) ** 2 + (s - n) ** 2);
380
380
  }
381
- function kn(t, n) {
382
- let r = 1 / 0, e = -1;
383
- for (let o = 0; o < n.length; o++) {
384
- const s = Math.abs(t - n[o]);
385
- s < r && (r = s, e = o);
381
+ function kn(t, r) {
382
+ let n = 1 / 0, e = -1;
383
+ for (let o = 0; o < r.length; o++) {
384
+ const s = Math.abs(t - r[o]);
385
+ s < n && (n = s, e = o);
386
386
  }
387
387
  return e;
388
388
  }
389
- const zn = {
390
- toDegrees: _n,
391
- toRadians: Mn,
392
- approximatelyEqual: Fn,
393
- getDistance: Wn,
394
- getDistance3d: yn,
389
+ const yn = {
390
+ toDegrees: bn,
391
+ toRadians: Gn,
392
+ approximatelyEqual: Hn,
393
+ getDistance: Vn,
394
+ getDistance3d: Mn,
395
395
  getNearestNumberIndex: kn
396
396
  };
397
- function _(t) {
397
+ function M(t) {
398
398
  if (t.type.includes("touch")) {
399
- const r = t;
400
- if (r.touches.length) {
401
- const i = r.touches[0], a = i.clientX, l = i.clientY;
402
- return [a, l];
399
+ const n = t;
400
+ if (n.touches.length) {
401
+ const i = n.touches[0], f = i.clientX, h = i.clientY;
402
+ return [f, h];
403
403
  }
404
- const e = r.changedTouches[0], o = e.clientX, s = e.clientY;
404
+ const e = n.changedTouches[0], o = e.clientX, s = e.clientY;
405
405
  return [o, s];
406
406
  }
407
- const n = t;
408
- return [n.clientX, n.clientY];
407
+ const r = t;
408
+ return [r.clientX, r.clientY];
409
409
  }
410
- function Xn(t, n) {
411
- const [r, e] = _(t), [o, s] = _(n);
412
- return zn.getDistance(r, e, o, s);
410
+ function Fn(t, r) {
411
+ const [n, e] = M(t), [o, s] = M(r);
412
+ return yn.getDistance(n, e, o, s);
413
413
  }
414
- function Yn(t) {
414
+ function Wn(t) {
415
415
  t.preventDefault();
416
416
  }
417
- function jn(t) {
417
+ function _n(t) {
418
418
  t.stopPropagation();
419
419
  }
420
- function Kn(t) {
420
+ function zn(t) {
421
421
  t.preventDefault(), t.stopPropagation();
422
422
  }
423
- const ke = {
424
- getEventPosition: _,
425
- getDistanceBetweenEvents: Xn,
426
- preventDefaultListener: Yn,
427
- stopPropagationListener: jn,
428
- preventDefaultStopPropagationListener: Kn
423
+ const be = {
424
+ getEventPosition: M,
425
+ getDistanceBetweenEvents: Fn,
426
+ preventDefaultListener: Wn,
427
+ stopPropagationListener: _n,
428
+ preventDefaultStopPropagationListener: zn
429
429
  };
430
- async function $n(t, n = 3) {
431
- let r;
432
- for (let e = 0; e < n; e++)
430
+ async function Xn(t, r = 3) {
431
+ let n;
432
+ for (let e = 0; e < r; e++)
433
433
  try {
434
434
  const o = await fetch(t);
435
435
  if (!o.ok)
436
436
  throw new Error(`HTTP Error: Status ${o.status.toString()}`);
437
437
  return await o.json();
438
438
  } catch (o) {
439
- r = o, console.log(`Attempt ${(e + 1).toString()} Failed: Retrying...
439
+ n = o, console.log(`Attempt ${(e + 1).toString()} Failed: Retrying...
440
440
  ${t}`);
441
441
  }
442
- throw r;
442
+ throw n;
443
443
  }
444
- async function Jn(t, n = 3) {
445
- let r;
446
- for (let e = 0; e < n; e++)
444
+ async function Yn(t, r = 3) {
445
+ let n;
446
+ for (let e = 0; e < r; e++)
447
447
  try {
448
448
  const o = await fetch(t);
449
449
  if (!o.ok)
450
450
  throw new Error(`HTTP Error: Status ${o.status.toString()}`);
451
451
  return await o.blob();
452
452
  } catch (o) {
453
- r = o, console.log(`Attempt ${(e + 1).toString()} Failed: Retrying...
453
+ n = o, console.log(`Attempt ${(e + 1).toString()} Failed: Retrying...
454
454
  ${t}`);
455
455
  }
456
- throw r;
456
+ throw n;
457
457
  }
458
- const ze = {
459
- fetchJsonWithRetry: $n,
460
- fetchBlobWithRetry: Jn
458
+ const Ge = {
459
+ fetchJsonWithRetry: Xn,
460
+ fetchBlobWithRetry: Yn
461
461
  };
462
- function z(t, n) {
463
- const r = 10 ** n;
464
- return Math.round(t * r) / r;
462
+ function z(t, r) {
463
+ const n = 10 ** r;
464
+ return Math.round(t * n) / n;
465
465
  }
466
- function Qn(t) {
466
+ function jn(t) {
467
467
  return z(t, 2);
468
468
  }
469
- function qn(t) {
469
+ function Kn(t) {
470
470
  return z(t, 3);
471
471
  }
472
- function Zn(t) {
472
+ function $n(t) {
473
473
  return typeof t == "number" && !isNaN(t) && isFinite(t);
474
474
  }
475
475
  const c = {
476
476
  roundToX: z,
477
- r2: Qn,
478
- r3: qn,
479
- isValidNumber: Zn
477
+ r2: jn,
478
+ r3: Kn,
479
+ isValidNumber: $n
480
480
  };
481
- function pn(t) {
481
+ function Jn(t) {
482
482
  return t === "space" ? I.EDITOR : t === "m" ? I.VISITOR : I.VIEWER;
483
483
  }
484
- function vn(t) {
484
+ function Qn(t) {
485
485
  return new URLSearchParams(window.location.search).get(t) ?? void 0;
486
486
  }
487
- const Xe = {
488
- getPageTypeBySpaceText: pn,
489
- getSearchParams: vn
487
+ const He = {
488
+ getPageTypeBySpaceText: Jn,
489
+ getSearchParams: Qn
490
490
  };
491
- function Ct(t) {
492
- const n = [];
493
- for (const r of t.split(".")) {
494
- const e = parseInt(r, 10);
495
- !isNaN(e) && r === e.toString() ? n.push(e) : n.push(r);
491
+ class l {
492
+ /**
493
+ * 将字符串路径转换为 RvPath 数组
494
+ * @param path - 以点分隔的路径字符串,如 "a.0.b"
495
+ * @returns RvPath 数组,数字字符串会被转换为数字类型
496
+ * @example
497
+ * RvUtils.makeRvPath("a.0.b") // ['a', 0, 'b']
498
+ */
499
+ static makeRvPath(r) {
500
+ const n = [];
501
+ for (const e of r.split(".")) {
502
+ const o = parseInt(e, 10);
503
+ !isNaN(o) && e === o.toString() ? n.push(o) : n.push(e);
504
+ }
505
+ return n;
496
506
  }
497
- return n;
498
- }
499
- function dt(t) {
500
- return t.join(".");
501
- }
502
- function A(t) {
503
- return typeof t == "string" ? Ct(t) : t;
504
- }
505
- function te(t) {
506
- return typeof t != "string" ? dt(t) : t;
507
- }
508
- function re(t, n) {
509
- const r = A(n);
510
- let e = t;
511
- for (const o of r) {
512
- if (e == null)
513
- return;
514
- e = e[o];
507
+ /**
508
+ * 将 RvPath 数组转换为字符串路径
509
+ * @param path - RvPath 数组
510
+ * @returns 以点分隔的路径字符串
511
+ * @example
512
+ * RvUtils.makeRvPathString(['a', 0, 'b']) // "a.0.b"
513
+ */
514
+ static makeRvPathString(r) {
515
+ return r.join(".");
515
516
  }
516
- return e;
517
- }
518
- function ne(t, n, r) {
519
- const e = A(n);
520
- let o = t;
521
- for (let s = 0; s < e.length - 1; s++)
522
- o = o[e[s]];
523
- o[e[e.length - 1]] = r;
524
- }
525
- function Pt(t, n) {
526
- const r = A(t), e = A(n), o = r.length > e.length ? e.length : r.length;
527
- for (let s = 0; s < o; s++)
528
- if (r[s] != e[s])
517
+ /**
518
+ * 确保路径为 RvPath 数组格式
519
+ * @param path - 字符串路径或 RvPath 数组
520
+ * @returns RvPath 数组
521
+ */
522
+ static ensureRvPath(r) {
523
+ return typeof r == "string" ? l.makeRvPath(r) : r;
524
+ }
525
+ /**
526
+ * 确保路径为字符串格式
527
+ * @param path - 字符串路径或 RvPath 数组
528
+ * @returns 字符串路径
529
+ */
530
+ static ensureRvPathString(r) {
531
+ return typeof r != "string" ? l.makeRvPathString(r) : r;
532
+ }
533
+ /**
534
+ * 根据路径从对象中获取值
535
+ * @typeParam T - 返回值的类型
536
+ * @param source - 源对象
537
+ * @param path - 访问路径
538
+ * @returns 路径对应的值,如果路径不存在则返回 undefined
539
+ * @example
540
+ * RvUtils.getByRvPath({ a: { b: 1 } }, "a.b") // 1
541
+ */
542
+ static getByRvPath(r, n) {
543
+ const e = l.ensureRvPath(n);
544
+ let o = r;
545
+ for (const s of e) {
546
+ if (o == null)
547
+ return;
548
+ o = o[s];
549
+ }
550
+ return o;
551
+ }
552
+ /**
553
+ * 根据路径设置对象中的值
554
+ * @param source - 源对象
555
+ * @param path - 设置路径
556
+ * @param value - 要设置的值
557
+ * @example
558
+ * const obj = { a: { b: 1 } }
559
+ * RvUtils.setByRvPath(obj, "a.b", 2) // obj.a.b === 2
560
+ */
561
+ static setByRvPath(r, n, e) {
562
+ const o = l.ensureRvPath(n);
563
+ let s = r;
564
+ for (let i = 0; i < o.length - 1; i++)
565
+ s = s[o[i]];
566
+ s[o[o.length - 1]] = e;
567
+ }
568
+ /**
569
+ * 检查两段路径是否完全重叠
570
+ * 长度可不同,从开头开始每一项比较,直到有一方结束,是否全部相同
571
+ * @param from - 第一个路径
572
+ * @param target - 第二个路径
573
+ * @returns 如果路径重叠则返回 true
574
+ * @example
575
+ * RvUtils.checkRvPathOverlay("a.b", "a.b.c") // true
576
+ * RvUtils.checkRvPathOverlay("a.b", "a.c") // false
577
+ */
578
+ static checkRvPathOverlay(r, n) {
579
+ const e = l.ensureRvPath(r), o = l.ensureRvPath(n), s = e.length > o.length ? o.length : e.length;
580
+ for (let i = 0; i < s; i++)
581
+ if (e[i] != o[i])
582
+ return !1;
583
+ return !0;
584
+ }
585
+ /**
586
+ * 检查路径是否与目标列表中的任意路径重叠
587
+ * @param from - 要检查的路径
588
+ * @param targetList - 目标路径列表
589
+ * @returns 如果与任意目标路径重叠则返回 true
590
+ */
591
+ static checkAnyRvPathOverlay(r, n) {
592
+ const e = l.ensureRvPath(r);
593
+ return n.some((o) => l.checkRvPathOverlay(e, o));
594
+ }
595
+ /**
596
+ * 检查两段路径是否完全相同
597
+ * @param from - 第一个路径
598
+ * @param target - 第二个路径
599
+ * @returns 如果路径完全相同则返回 true
600
+ * @example
601
+ * RvUtils.checkRvPathSame("a.b", "a.b") // true
602
+ * RvUtils.checkRvPathSame("a.b", "a.b.c") // false
603
+ */
604
+ static checkRvPathSame(r, n) {
605
+ const e = l.ensureRvPath(r), o = l.ensureRvPath(n);
606
+ if (e.length !== o.length)
529
607
  return !1;
530
- return !0;
531
- }
532
- function ee(t, n) {
533
- const r = A(t);
534
- return n.some((e) => Pt(r, e));
608
+ for (let s = 0; s < e.length; s++)
609
+ if (e[s] !== o[s])
610
+ return !1;
611
+ return !0;
612
+ }
613
+ /**
614
+ * 检查路径是否与目标列表中的任意路径完全相同
615
+ * @param from - 要检查的路径
616
+ * @param targetList - 目标路径列表
617
+ * @returns 如果与任意目标路径相同则返回 true
618
+ */
619
+ static checkAnyRvPathSame(r, n) {
620
+ const e = l.ensureRvPath(r);
621
+ return n.some((o) => l.checkRvPathSame(e, o));
622
+ }
535
623
  }
536
- function Ut(t, n) {
537
- const r = A(t), e = A(n);
538
- if (r.length !== e.length)
539
- return !1;
540
- for (let o = 0; o < r.length; o++)
541
- if (r[o] !== e[o])
542
- return !1;
543
- return !0;
544
- }
545
- function oe(t, n) {
546
- const r = A(t);
547
- return n.some((e) => Ut(r, e));
548
- }
549
- const Ye = {
550
- makeRvPath: Ct,
551
- makeRvPathString: dt,
552
- ensureRvPath: A,
553
- ensureRvPathString: te,
554
- getByRvPath: re,
555
- setByRvPath: ne,
556
- checkRvPathSame: Ut,
557
- checkAnyRvPathSame: oe,
558
- checkRvPathOverlay: Pt,
559
- checkAnyRvPathOverlay: ee
560
- };
561
- function je(t) {
562
- return new Promise((n) => {
563
- setTimeout(n, t);
624
+ function Ve(t) {
625
+ return new Promise((r) => {
626
+ setTimeout(r, t);
564
627
  });
565
628
  }
566
- function Ke(t, n) {
567
- if (n === 0)
629
+ function Me(t, r) {
630
+ if (r === 0)
568
631
  return t;
569
- let r, e = 0, o, s = null;
632
+ let n, e = 0, o, s = null;
570
633
  function i() {
571
- e = Date.now(), r && t.apply(o, r);
634
+ e = Date.now(), n && t.apply(o, n);
572
635
  }
573
- return function(...l) {
574
- const E = Date.now(), h = E - e;
575
- if (r = l, o = this, e === 0) {
636
+ return function(...h) {
637
+ const E = Date.now(), A = E - e;
638
+ if (n = h, o = this, e === 0) {
576
639
  setTimeout(i, 1);
577
640
  return;
578
641
  }
579
- s && (clearTimeout(s), s = null), h < n ? s = setTimeout(() => {
642
+ s && (clearTimeout(s), s = null), A < r ? s = setTimeout(() => {
580
643
  i(), s = null;
581
- }, n - h) : i();
644
+ }, r - A) : i();
582
645
  };
583
646
  }
584
- function ue(t) {
585
- const n = Math.floor(t / 3600), r = Math.floor(t % 3600 / 60), e = Math.floor(t % 60);
647
+ function qn(t) {
648
+ const r = Math.floor(t / 3600), n = Math.floor(t % 3600 / 60), e = Math.floor(t % 60);
586
649
  return [
587
- n > 0 ? String(n).padStart(2, "0") : null,
588
- String(r).padStart(2, "0"),
650
+ r > 0 ? String(r).padStart(2, "0") : null,
651
+ String(n).padStart(2, "0"),
589
652
  String(e).padStart(2, "0")
590
653
  ].filter(Boolean).join(":");
591
654
  }
592
- function se(t = /* @__PURE__ */ new Date()) {
593
- const n = t.getFullYear().toString(), r = (t.getMonth() + 1).toString().padStart(2, "0"), e = t.getDate().toString().padStart(2, "0"), o = t.getHours().toString().padStart(2, "0"), s = t.getMinutes().toString().padStart(2, "0"), i = t.getSeconds().toString().padStart(2, "0"), a = t.getMilliseconds().toString().padStart(3, "0");
594
- return n + r + e + o + s + i + a;
655
+ function Zn(t = /* @__PURE__ */ new Date()) {
656
+ const r = t.getFullYear().toString(), n = (t.getMonth() + 1).toString().padStart(2, "0"), e = t.getDate().toString().padStart(2, "0"), o = t.getHours().toString().padStart(2, "0"), s = t.getMinutes().toString().padStart(2, "0"), i = t.getSeconds().toString().padStart(2, "0"), f = t.getMilliseconds().toString().padStart(3, "0");
657
+ return r + n + e + o + s + i + f;
595
658
  }
596
- function ie(t, n) {
597
- const r = n - t, e = Math.floor(r / 1e3), o = Math.floor(e / 3600), s = Math.floor(e % 3600 / 60), i = e % 60;
659
+ function pn(t, r) {
660
+ const n = r - t, e = Math.floor(n / 1e3), o = Math.floor(e / 3600), s = Math.floor(e % 3600 / 60), i = e % 60;
598
661
  return `${o > 0 ? `${o.toString().padStart(2, "0")}:` : ""}${s.toString().padStart(2, "0")}:${i.toString().padStart(2, "0")}`;
599
662
  }
600
- const $e = {
601
- convertTimeText: ue,
602
- formatDateTo17Digits: se,
603
- formatDuration: ie
663
+ const ke = {
664
+ convertTimeText: qn,
665
+ formatDateTo17Digits: Zn,
666
+ formatDuration: pn
604
667
  };
605
- function ce(t) {
606
- const n = new RegExp(`(^|&)${t}=([^&]*)(&|$)`, "i"), r = window.location.search.substring(1).match(n);
607
- return r != null ? decodeURIComponent(r[2]) : "";
668
+ function vn(t) {
669
+ const r = new RegExp(`(^|&)${t}=([^&]*)(&|$)`, "i"), n = window.location.search.substring(1).match(r);
670
+ return n != null ? decodeURIComponent(n[2]) : "";
608
671
  }
609
- function fe(t) {
610
- const n = new RegExp(`(^|&)${t}=([^&]*)(&|$)`, "i"), r = window.location.hash.substring(1).match(n);
611
- return r != null ? decodeURIComponent(r[2]) : "";
672
+ function te(t) {
673
+ const r = new RegExp(`(^|&)${t}=([^&]*)(&|$)`, "i"), n = window.location.hash.substring(1).match(r);
674
+ return n != null ? decodeURIComponent(n[2]) : "";
612
675
  }
613
- function ae(t) {
676
+ function re(t) {
614
677
  return new RegExp(
615
678
  "^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?:\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$",
616
679
  "i"
617
680
  ).test(t);
618
681
  }
619
- async function Ee() {
682
+ async function ne() {
620
683
  const t = window.location.href;
621
- return mt(t);
684
+ return Ct(t);
622
685
  }
623
- async function le(t) {
686
+ async function ee(t) {
624
687
  try {
625
688
  return await navigator.clipboard.writeText(t), !0;
626
689
  } catch {
627
690
  return !1;
628
691
  }
629
692
  }
630
- async function mt(t) {
693
+ async function Ct(t) {
631
694
  try {
632
695
  return await navigator.clipboard.writeText(t), !0;
633
696
  } catch {
634
697
  return !1;
635
698
  }
636
699
  }
637
- function he(t, n = !0) {
700
+ function oe(t, r = !0) {
638
701
  try {
639
702
  const o = new URL(t).pathname.split("/").pop() ?? "";
640
- return !n && o.includes(".") ? o.substring(0, o.lastIndexOf(".")) : o;
703
+ return !r && o.includes(".") ? o.substring(0, o.lastIndexOf(".")) : o;
641
704
  } catch {
642
705
  return "";
643
706
  }
644
707
  }
645
- const Je = {
646
- getParam: ce,
647
- getHashParam: fe,
648
- check: ae,
649
- copyCurrentUrlToClipboard: Ee,
650
- copyText: le,
651
- trySetClipboard: mt,
652
- extractFilenameFromUrl: he
708
+ const ye = {
709
+ getParam: vn,
710
+ getHashParam: te,
711
+ check: re,
712
+ copyCurrentUrlToClipboard: ne,
713
+ copyText: ee,
714
+ trySetClipboard: Ct,
715
+ extractFilenameFromUrl: oe
653
716
  };
654
- function Ae(t, n = -1, r = [0, 0]) {
655
- return t ? n === -1 ? [t.x, t.y] : [c.roundToX(t.x, n), c.roundToX(t.y, n)] : r;
656
- }
657
- function Oe(t, n = -1, r = [0, 0, 0]) {
658
- return t ? n === -1 ? [t.x, t.y, t.z] : [
659
- c.roundToX(t.x, n),
660
- c.roundToX(t.y, n),
661
- c.roundToX(t.z, n)
662
- ] : r;
663
- }
664
- function De(t, n = -1, r = [0, 0, 0, 0]) {
665
- return t ? n === -1 ? [t.x, t.y, t.z, t.w] : [
666
- c.roundToX(t.x, n),
667
- c.roundToX(t.y, n),
668
- c.roundToX(t.z, n),
669
- c.roundToX(t.w, n)
670
- ] : r;
671
- }
672
- function Re(t, n) {
673
- return { x: n.x * t, y: n.y * t, z: n.z * t };
674
- }
675
- function wt(t) {
717
+ function ue(t, r = -1, n = [0, 0]) {
718
+ return t ? r === -1 ? [t.x, t.y] : [c.roundToX(t.x, r), c.roundToX(t.y, r)] : n;
719
+ }
720
+ function se(t, r = -1, n = [0, 0, 0]) {
721
+ return t ? r === -1 ? [t.x, t.y, t.z] : [
722
+ c.roundToX(t.x, r),
723
+ c.roundToX(t.y, r),
724
+ c.roundToX(t.z, r)
725
+ ] : n;
726
+ }
727
+ function ie(t, r = -1, n = [0, 0, 0, 0]) {
728
+ return t ? r === -1 ? [t.x, t.y, t.z, t.w] : [
729
+ c.roundToX(t.x, r),
730
+ c.roundToX(t.y, r),
731
+ c.roundToX(t.z, r),
732
+ c.roundToX(t.w, r)
733
+ ] : n;
734
+ }
735
+ function ce(t, r) {
736
+ return { x: r.x * t, y: r.y * t, z: r.z * t };
737
+ }
738
+ function Pt(t) {
676
739
  return { x: t.x * 180 / Math.PI, y: t.y * 180 / Math.PI, z: t.z * 180 / Math.PI };
677
740
  }
678
- function Ne(t) {
741
+ function ae(t) {
679
742
  return { x: t.x * Math.PI / 180, y: t.y * Math.PI / 180, z: t.z * Math.PI / 180 };
680
743
  }
681
- function Te(t) {
682
- return M.RotationYawPitchRoll(t.y, t.x, t.z);
744
+ function fe(t) {
745
+ return k.RotationYawPitchRoll(t.y, t.x, t.z);
683
746
  }
684
- function Le(t) {
685
- return M.RotationYawPitchRoll(
747
+ function Ee(t) {
748
+ return k.RotationYawPitchRoll(
686
749
  t.y * Math.PI / 180,
687
750
  t.x * Math.PI / 180,
688
751
  t.z * Math.PI / 180
689
752
  );
690
753
  }
691
- function Se(t) {
692
- return new nr(t.x, t.y, t.z);
754
+ function le(t) {
755
+ return new pt(t.x, t.y, t.z);
693
756
  }
694
- function Ie(t) {
757
+ function he(t) {
695
758
  return { x: t.x, y: t.y, z: t.z };
696
759
  }
697
- function Ce(t, n = 0) {
760
+ function Ae(t, r = 0) {
698
761
  return {
699
- x: c.roundToX(t.x, n),
700
- y: c.roundToX(t.y, n),
701
- z: c.roundToX(t.z, n)
762
+ x: c.roundToX(t.x, r),
763
+ y: c.roundToX(t.y, r),
764
+ z: c.roundToX(t.z, r)
702
765
  };
703
766
  }
704
- function de(t) {
767
+ function Oe(t) {
705
768
  return isFinite(t.x) && isFinite(t.y) && isFinite(t.z);
706
769
  }
707
- function Pe(t) {
770
+ function De(t) {
708
771
  return t.x !== 0 && t.y !== 0 && t.z !== 0;
709
772
  }
710
- function Ue(t, n) {
711
- return { x: n.x * t, y: n.y * t, z: n.z * t, w: n.w * t };
773
+ function Re(t, r) {
774
+ return { x: r.x * t, y: r.y * t, z: r.z * t, w: r.w * t };
712
775
  }
713
776
  function X(t) {
714
- return new M(t.x, t.y, t.z, t.w);
777
+ return new k(t.x, t.y, t.z, t.w);
715
778
  }
716
- function me(t) {
779
+ function Ne(t) {
717
780
  return X(t).toEulerAngles();
718
781
  }
719
- function we(t) {
720
- const n = X(t);
721
- return wt(n.toEulerAngles());
782
+ function Te(t) {
783
+ const r = X(t);
784
+ return Pt(r.toEulerAngles());
722
785
  }
723
- function gt(t) {
786
+ function dt(t) {
724
787
  return "w" in t;
725
788
  }
726
- function ge(t) {
727
- return gt(t) ? [t.x, t.y, t.z, t.w] : [t.x, t.y, t.z];
789
+ function Le(t) {
790
+ return dt(t) ? [t.x, t.y, t.z, t.w] : [t.x, t.y, t.z];
728
791
  }
729
- function xe(t) {
792
+ function Se(t) {
730
793
  return { x: t.x, y: t.y, z: t.z, w: t.w };
731
794
  }
732
- function Be(t, n = 0) {
733
- return gt(t) ? [
734
- c.roundToX(t.x, n),
735
- c.roundToX(t.y, n),
736
- c.roundToX(t.z, n),
737
- c.roundToX(t.w, n)
738
- ] : [c.roundToX(t.x, n), c.roundToX(t.y, n), c.roundToX(t.z, n)];
739
- }
740
- const Qe = {
741
- xyToArray: Ae,
742
- xyzToArray: Oe,
743
- xyzwToArray: De,
744
- scaleV3: Re,
745
- radiansToDegrees: wt,
746
- degreeToRadians: Ne,
747
- radiansToQuaternion: Te,
748
- degreesToQuaternion: Le,
749
- toVector3: Se,
750
- fromVector3: Ie,
751
- withRound: Ce,
752
- isFiniteVector: de,
753
- noZero: Pe,
754
- scaleV4: Ue,
795
+ function Ie(t, r = 0) {
796
+ return dt(t) ? [
797
+ c.roundToX(t.x, r),
798
+ c.roundToX(t.y, r),
799
+ c.roundToX(t.z, r),
800
+ c.roundToX(t.w, r)
801
+ ] : [c.roundToX(t.x, r), c.roundToX(t.y, r), c.roundToX(t.z, r)];
802
+ }
803
+ const Fe = {
804
+ xyToArray: ue,
805
+ xyzToArray: se,
806
+ xyzwToArray: ie,
807
+ scaleV3: ce,
808
+ radiansToDegrees: Pt,
809
+ degreeToRadians: ae,
810
+ radiansToQuaternion: fe,
811
+ degreesToQuaternion: Ee,
812
+ toVector3: le,
813
+ fromVector3: he,
814
+ withRound: Ae,
815
+ isFiniteVector: Oe,
816
+ noZero: De,
817
+ scaleV4: Re,
755
818
  toQuaternionVector: X,
756
- toEulerRadians: me,
757
- toEulerDegrees: we,
758
- toArray: ge,
759
- fromQuaternion: xe,
760
- toArrayWithRound4: Be
819
+ toEulerRadians: Ne,
820
+ toEulerDegrees: Te,
821
+ toArray: Le,
822
+ fromQuaternion: Se,
823
+ toArrayWithRound4: Ie
761
824
  };
762
825
  export {
763
- Me as AcceptMime,
764
- Dn as AttributeType,
826
+ ge as AcceptMime,
827
+ ln as AttributeType,
765
828
  K as ContextMenu,
766
829
  H as CryptoUtils,
767
- We as DataUtils,
830
+ xe as DataUtils,
768
831
  Q as Dialog,
769
- Ar as DialogContentAlign,
770
- He as DomNotFoundError,
771
- In as EnableLevel,
772
- ye as FileUtils,
773
- hr as FirstLoadModelServiceEventType,
774
- lr as FirstLoadModelServiceStatus,
775
- Dr as FirstLoadServiceEventType,
776
- Or as FirstLoadServiceStatus,
777
- ln as FocusMode,
778
- Rn as HistoryServiceEventType,
779
- cr as IconPluginPosition,
780
- _e as LabelInfo,
832
+ fr as DialogContentAlign,
833
+ de as DomNotFoundError,
834
+ Nn as EnableLevel,
835
+ Be as FileUtils,
836
+ ar as FirstLoadModelServiceEventType,
837
+ cr as FirstLoadModelServiceStatus,
838
+ lr as FirstLoadServiceEventType,
839
+ Er as FirstLoadServiceStatus,
840
+ cn as FocusMode,
841
+ hn as HistoryServiceEventType,
842
+ or as IconPluginPosition,
843
+ we as LabelInfo,
781
844
  j as LabelTheme,
782
- rn as LocalDataServiceEventType,
783
- nn as LocalDataStatus,
784
- en as LocalDataType,
785
- sn as Locale,
786
- zn as MathUtils,
787
- cn as MeetingStatus,
845
+ Zr as LocalDataServiceEventType,
846
+ pr as LocalDataStatus,
847
+ vr as LocalDataType,
848
+ nn as Locale,
849
+ yn as MathUtils,
850
+ en as MeetingStatus,
788
851
  $ as MenuLine,
789
852
  V as MenuLineType,
790
- Fe as Message,
791
- ke as NativeEventUtils,
792
- ze as NetworkUtils,
793
- ir as NotFoundError,
853
+ Ue as Message,
854
+ be as NativeEventUtils,
855
+ Ge as NetworkUtils,
856
+ er as NotFoundError,
794
857
  c as NumberUtils,
795
- on as OssUploadInstanceStatus,
796
- un as OssUploadServiceEventType,
797
- En as PageMode,
858
+ tn as OssUploadInstanceStatus,
859
+ rn as OssUploadServiceEventType,
860
+ sn as PageMode,
798
861
  I as PageType,
799
- Xe as PageUtils,
800
- an as PluginEventType,
801
- fr as PluginType,
802
- ar as RsModelServiceEventType,
803
- Er as RsModelStatus,
804
- dn as RvAttachType,
805
- Ln as RvBasicType,
806
- Nn as RvFileServiceEventType,
807
- Tn as RvFileType,
808
- sr as RvMaterialType,
809
- Sn as RvModelOrigin,
810
- Un as RvPresetType,
811
- mn as RvResourceServiceEventType,
812
- Pn as RvResourceType,
813
- Ye as RvUtils,
814
- hn as ScreenSize,
815
- fn as ShareMode,
816
- Ve as StaticClassInstantiationError,
817
- wn as TChangeType,
818
- An as ThemeBackground,
862
+ He as PageUtils,
863
+ un as PluginEventType,
864
+ ur as PluginType,
865
+ sr as RsModelServiceEventType,
866
+ ir as RsModelStatus,
867
+ Ln as RvAttachType,
868
+ Dn as RvBasicType,
869
+ An as RvFileServiceEventType,
870
+ On as RvFileType,
871
+ nr as RvMaterialType,
872
+ Rn as RvModelOrigin,
873
+ In as RvPresetType,
874
+ Cn as RvResourceServiceEventType,
875
+ Sn as RvResourceType,
876
+ l as RvUtils,
877
+ an as ScreenSize,
878
+ on as ShareMode,
879
+ me as StaticClassInstantiationError,
880
+ Pn as TChangeType,
881
+ fn as ThemeBackground,
819
882
  J as ThemeColor,
820
- On as ThemeShape,
821
- $e as TimeUtils,
822
- ur as TransparencyMode,
823
- Je as UrlUtils,
824
- Qe as VectorUtils,
825
- Cn as VersionPoint,
826
- je as sleep,
827
- Ke as throttle
883
+ En as ThemeShape,
884
+ ke as TimeUtils,
885
+ rr as TransparencyMode,
886
+ ye as UrlUtils,
887
+ Fe as VectorUtils,
888
+ Tn as VersionPoint,
889
+ Ve as sleep,
890
+ Me as throttle
828
891
  };