next-flow-interface 0.18.20 → 0.18.22
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.d.ts +206 -208
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -104,188 +104,6 @@ interface AnchorProps extends DivProps {
|
|
|
104
104
|
middle?: boolean;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
interface ContextMenuController {
|
|
108
|
-
contextMenu: ContextMenu;
|
|
109
|
-
show(): void;
|
|
110
|
-
destroy(): void;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
declare enum MenuLineType {
|
|
114
|
-
BUTTON = "BUTTON",// 单个点击用按钮
|
|
115
|
-
DIVIDER = "DIVIDER",// 分割线
|
|
116
|
-
CHECKBOX = "CHECKBOX",// 单个可选中复选框
|
|
117
|
-
SUB = "SUB",// 二级菜单
|
|
118
|
-
VIEW = "VIEW"
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
interface MenuLineCreateOptions {
|
|
122
|
-
id?: string;
|
|
123
|
-
type?: MenuLineType;
|
|
124
|
-
text?: string;
|
|
125
|
-
tip?: string;
|
|
126
|
-
icon?: FunctionComponent;
|
|
127
|
-
view?: FunctionComponent;
|
|
128
|
-
color?: string;
|
|
129
|
-
disabled?: boolean;
|
|
130
|
-
shortcut?: string;
|
|
131
|
-
onClick?: (e: MouseEvent$1) => void;
|
|
132
|
-
onMouseOver?: (e: MouseEvent$1) => void;
|
|
133
|
-
onMouseOut?: (e: MouseEvent$1) => void;
|
|
134
|
-
closeAllOnClick?: boolean;
|
|
135
|
-
checkboxDefaultValue?: boolean;
|
|
136
|
-
onCheckboxChange?: (value: boolean) => void;
|
|
137
|
-
sub?: ContextMenuCreateOptions;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
interface ContextMenuCreateOptions {
|
|
141
|
-
id?: string;
|
|
142
|
-
lines?: MenuLineCreateOptions[];
|
|
143
|
-
showIcon?: boolean;
|
|
144
|
-
x?: number;
|
|
145
|
-
y?: number;
|
|
146
|
-
closeOnOutsideClick?: boolean;
|
|
147
|
-
theme?: ThemeColor;
|
|
148
|
-
onClose?: () => void;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
declare class MenuLine {
|
|
152
|
-
options: MenuLineCreateOptions;
|
|
153
|
-
id: string;
|
|
154
|
-
type: MenuLineType;
|
|
155
|
-
text: string;
|
|
156
|
-
tip: string;
|
|
157
|
-
icon: FunctionComponent | undefined;
|
|
158
|
-
view: FunctionComponent | undefined;
|
|
159
|
-
color: string;
|
|
160
|
-
disabled: boolean;
|
|
161
|
-
shortcut: string;
|
|
162
|
-
onClick: (e: MouseEvent$1) => void;
|
|
163
|
-
onMouseOver: (e: MouseEvent$1) => void;
|
|
164
|
-
onMouseOut: (e: MouseEvent$1) => void;
|
|
165
|
-
closeAllOnClick: boolean;
|
|
166
|
-
checkboxDefaultValue: boolean;
|
|
167
|
-
onCheckboxChange: (value: boolean) => void;
|
|
168
|
-
sub: ContextMenuCreateOptions | undefined;
|
|
169
|
-
createTime: Date;
|
|
170
|
-
constructor(options: MenuLineCreateOptions, id: string, type?: MenuLineType, text?: string, tip?: string, icon?: FunctionComponent | undefined, view?: FunctionComponent | undefined, color?: string, disabled?: boolean, shortcut?: string, onClick?: (e: MouseEvent$1) => void, onMouseOver?: (e: MouseEvent$1) => void, onMouseOut?: (e: MouseEvent$1) => void, closeAllOnClick?: boolean, checkboxDefaultValue?: boolean, onCheckboxChange?: (value: boolean) => void, sub?: ContextMenuCreateOptions | undefined, // 子菜单项
|
|
171
|
-
createTime?: Date);
|
|
172
|
-
static fromOptions(id: string, options: MenuLineCreateOptions): MenuLine;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
declare class ContextMenu {
|
|
176
|
-
options: ContextMenuCreateOptions;
|
|
177
|
-
id: string;
|
|
178
|
-
lines: MenuLine[];
|
|
179
|
-
showIcon: boolean;
|
|
180
|
-
x: number;
|
|
181
|
-
y: number;
|
|
182
|
-
closeOnOutsideClick: boolean;
|
|
183
|
-
theme?: ThemeColor | undefined;
|
|
184
|
-
controller: ContextMenuController | null;
|
|
185
|
-
createTime: Date;
|
|
186
|
-
constructor(options: ContextMenuCreateOptions, id: string, lines?: MenuLine[], showIcon?: boolean, x?: number, y?: number, closeOnOutsideClick?: boolean, theme?: ThemeColor | undefined, controller?: ContextMenuController | null, createTime?: Date);
|
|
187
|
-
static fromOptions(id: string, options: ContextMenuCreateOptions, menuLines?: MenuLine[]): ContextMenu;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
interface ContextMenuProps extends DivProps {
|
|
191
|
-
contextMenus: ContextMenu;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
interface DialogCreateOptions {
|
|
195
|
-
id?: string;
|
|
196
|
-
title?: string;
|
|
197
|
-
titleIcon?: FunctionComponent | string;
|
|
198
|
-
content?: string;
|
|
199
|
-
contentAlign?: DialogContentAlign;
|
|
200
|
-
contentView?: FunctionComponent | string;
|
|
201
|
-
icon?: FunctionComponent | string;
|
|
202
|
-
view?: FunctionComponent | string;
|
|
203
|
-
theme?: ThemeColor;
|
|
204
|
-
leftMode?: boolean;
|
|
205
|
-
className?: string;
|
|
206
|
-
style?: object;
|
|
207
|
-
confirmText?: string;
|
|
208
|
-
cancelText?: string;
|
|
209
|
-
enableCloseButton?: boolean;
|
|
210
|
-
enableInput?: boolean;
|
|
211
|
-
defaultValue?: string;
|
|
212
|
-
inputPlaceholder?: string;
|
|
213
|
-
autoFocus?: boolean;
|
|
214
|
-
allowEmpty?: boolean;
|
|
215
|
-
onChange?: (value: string) => void;
|
|
216
|
-
onCheck?: (value: string) => boolean;
|
|
217
|
-
onConfirm?: (value: string) => void;
|
|
218
|
-
onCancel?: () => void;
|
|
219
|
-
onClose?: () => void;
|
|
220
|
-
onConfirmButtonClick?: () => void;
|
|
221
|
-
onCancelButtonClick?: () => void;
|
|
222
|
-
onOutsideClick?: () => void;
|
|
223
|
-
onCloseButtonClick?: () => void;
|
|
224
|
-
onRender?: () => void;
|
|
225
|
-
onEffect?: () => () => void;
|
|
226
|
-
closeOnConfirm?: boolean;
|
|
227
|
-
closeOnCancel?: boolean;
|
|
228
|
-
closeOnOutsideClick?: boolean;
|
|
229
|
-
closeOnCloseButtonClick?: boolean;
|
|
230
|
-
alignButton?: boolean;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
declare enum DialogContentAlign {
|
|
234
|
-
LEFT = "LEFT",
|
|
235
|
-
CENTER = "CENTER",
|
|
236
|
-
RIGHT = "RIGHT"
|
|
237
|
-
}
|
|
238
|
-
declare class Dialog {
|
|
239
|
-
options: DialogCreateOptions;
|
|
240
|
-
id: string;
|
|
241
|
-
title: string;
|
|
242
|
-
titleIcon: FunctionComponent | string | undefined;
|
|
243
|
-
content: string;
|
|
244
|
-
contentAlign: DialogContentAlign;
|
|
245
|
-
contentView: FunctionComponent | string | undefined;
|
|
246
|
-
icon: FunctionComponent | string | undefined;
|
|
247
|
-
view: FunctionComponent | string | undefined;
|
|
248
|
-
theme: ThemeColor;
|
|
249
|
-
leftMode: boolean;
|
|
250
|
-
className: string;
|
|
251
|
-
style: object;
|
|
252
|
-
confirmText: string;
|
|
253
|
-
cancelText: string;
|
|
254
|
-
enableInput: boolean;
|
|
255
|
-
defaultValue: string;
|
|
256
|
-
inputPlaceholder: string;
|
|
257
|
-
autoFocus: boolean;
|
|
258
|
-
allowEmpty: boolean;
|
|
259
|
-
onChange: (value: string) => void;
|
|
260
|
-
onCheck: (value: string) => boolean;
|
|
261
|
-
enableCloseButton: boolean;
|
|
262
|
-
onConfirm: (value: string) => void;
|
|
263
|
-
onCancel: () => void;
|
|
264
|
-
onClose: () => void;
|
|
265
|
-
onConfirmButtonClick: () => void;
|
|
266
|
-
onCancelButtonClick: () => void;
|
|
267
|
-
onOutsideClick: () => void;
|
|
268
|
-
onCloseButtonClick: () => void;
|
|
269
|
-
onRender: () => void;
|
|
270
|
-
onEffect: () => () => void;
|
|
271
|
-
closeOnConfirm: boolean;
|
|
272
|
-
closeOnCancel: boolean;
|
|
273
|
-
closeOnOutsideClick: boolean;
|
|
274
|
-
closeOnCloseButtonClick: boolean;
|
|
275
|
-
alignButton: boolean;
|
|
276
|
-
inputValue: string;
|
|
277
|
-
createTime: Date;
|
|
278
|
-
focusInput: () => void;
|
|
279
|
-
elements: Map<string, HTMLElement>;
|
|
280
|
-
constructor(options: DialogCreateOptions, id: string, title?: string, titleIcon?: FunctionComponent | string | undefined, content?: string, contentAlign?: DialogContentAlign, contentView?: FunctionComponent | string | undefined, icon?: FunctionComponent | string | undefined, view?: FunctionComponent | string | undefined, theme?: ThemeColor, leftMode?: boolean, className?: string, style?: object, confirmText?: string, cancelText?: string, enableInput?: boolean, defaultValue?: string, inputPlaceholder?: string, autoFocus?: boolean, allowEmpty?: boolean, onChange?: (value: string) => void, onCheck?: (value: string) => boolean, enableCloseButton?: boolean, onConfirm?: (value: string) => void, onCancel?: () => void, onClose?: () => void, onConfirmButtonClick?: () => void, onCancelButtonClick?: () => void, onOutsideClick?: () => void, onCloseButtonClick?: () => void, onRender?: () => void, onEffect?: () => () => void, closeOnConfirm?: boolean, closeOnCancel?: boolean, closeOnOutsideClick?: boolean, closeOnCloseButtonClick?: boolean, alignButton?: boolean, inputValue?: string, createTime?: Date, focusInput?: () => void, elements?: Map<string, HTMLElement>);
|
|
281
|
-
static fromOptions(id: string, options: DialogCreateOptions): Dialog;
|
|
282
|
-
setHide: (value: boolean) => void;
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
interface DialogProps extends DivProps {
|
|
286
|
-
dialog: Dialog;
|
|
287
|
-
}
|
|
288
|
-
|
|
289
107
|
interface FileProgressBarProps extends DivProps {
|
|
290
108
|
size: string;
|
|
291
109
|
value: number;
|
|
@@ -1241,6 +1059,89 @@ interface RsServiceApi {
|
|
|
1241
1059
|
enterVR(onInitialize: () => void): Promise<void>;
|
|
1242
1060
|
}
|
|
1243
1061
|
|
|
1062
|
+
interface ContextMenuController {
|
|
1063
|
+
contextMenu: ContextMenu;
|
|
1064
|
+
show(): void;
|
|
1065
|
+
destroy(): void;
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
declare enum MenuLineType {
|
|
1069
|
+
BUTTON = "BUTTON",// 单个点击用按钮
|
|
1070
|
+
DIVIDER = "DIVIDER",// 分割线
|
|
1071
|
+
CHECKBOX = "CHECKBOX",// 单个可选中复选框
|
|
1072
|
+
SUB = "SUB",// 二级菜单
|
|
1073
|
+
VIEW = "VIEW"
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1076
|
+
interface MenuLineCreateOptions {
|
|
1077
|
+
id?: string;
|
|
1078
|
+
type?: MenuLineType;
|
|
1079
|
+
text?: string;
|
|
1080
|
+
tip?: string;
|
|
1081
|
+
icon?: FunctionComponent;
|
|
1082
|
+
view?: FunctionComponent;
|
|
1083
|
+
color?: string;
|
|
1084
|
+
disabled?: boolean;
|
|
1085
|
+
shortcut?: string;
|
|
1086
|
+
onClick?: (e: MouseEvent$1) => void;
|
|
1087
|
+
onMouseOver?: (e: MouseEvent$1) => void;
|
|
1088
|
+
onMouseOut?: (e: MouseEvent$1) => void;
|
|
1089
|
+
closeAllOnClick?: boolean;
|
|
1090
|
+
checkboxDefaultValue?: boolean;
|
|
1091
|
+
onCheckboxChange?: (value: boolean) => void;
|
|
1092
|
+
sub?: ContextMenuCreateOptions;
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1095
|
+
interface ContextMenuCreateOptions {
|
|
1096
|
+
id?: string;
|
|
1097
|
+
lines?: MenuLineCreateOptions[];
|
|
1098
|
+
showIcon?: boolean;
|
|
1099
|
+
x?: number;
|
|
1100
|
+
y?: number;
|
|
1101
|
+
closeOnOutsideClick?: boolean;
|
|
1102
|
+
theme?: ThemeColor;
|
|
1103
|
+
onClose?: () => void;
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
declare class MenuLine {
|
|
1107
|
+
options: MenuLineCreateOptions;
|
|
1108
|
+
id: string;
|
|
1109
|
+
type: MenuLineType;
|
|
1110
|
+
text: string;
|
|
1111
|
+
tip: string;
|
|
1112
|
+
icon: FunctionComponent | undefined;
|
|
1113
|
+
view: FunctionComponent | undefined;
|
|
1114
|
+
color: string;
|
|
1115
|
+
disabled: boolean;
|
|
1116
|
+
shortcut: string;
|
|
1117
|
+
onClick: (e: MouseEvent$1) => void;
|
|
1118
|
+
onMouseOver: (e: MouseEvent$1) => void;
|
|
1119
|
+
onMouseOut: (e: MouseEvent$1) => void;
|
|
1120
|
+
closeAllOnClick: boolean;
|
|
1121
|
+
checkboxDefaultValue: boolean;
|
|
1122
|
+
onCheckboxChange: (value: boolean) => void;
|
|
1123
|
+
sub: ContextMenuCreateOptions | undefined;
|
|
1124
|
+
createTime: Date;
|
|
1125
|
+
constructor(options: MenuLineCreateOptions, id: string, type?: MenuLineType, text?: string, tip?: string, icon?: FunctionComponent | undefined, view?: FunctionComponent | undefined, color?: string, disabled?: boolean, shortcut?: string, onClick?: (e: MouseEvent$1) => void, onMouseOver?: (e: MouseEvent$1) => void, onMouseOut?: (e: MouseEvent$1) => void, closeAllOnClick?: boolean, checkboxDefaultValue?: boolean, onCheckboxChange?: (value: boolean) => void, sub?: ContextMenuCreateOptions | undefined, // 子菜单项
|
|
1126
|
+
createTime?: Date);
|
|
1127
|
+
static fromOptions(id: string, options: MenuLineCreateOptions): MenuLine;
|
|
1128
|
+
}
|
|
1129
|
+
|
|
1130
|
+
declare class ContextMenu {
|
|
1131
|
+
options: ContextMenuCreateOptions;
|
|
1132
|
+
id: string;
|
|
1133
|
+
lines: MenuLine[];
|
|
1134
|
+
showIcon: boolean;
|
|
1135
|
+
x: number;
|
|
1136
|
+
y: number;
|
|
1137
|
+
closeOnOutsideClick: boolean;
|
|
1138
|
+
theme?: ThemeColor | undefined;
|
|
1139
|
+
controller: ContextMenuController | null;
|
|
1140
|
+
createTime: Date;
|
|
1141
|
+
constructor(options: ContextMenuCreateOptions, id: string, lines?: MenuLine[], showIcon?: boolean, x?: number, y?: number, closeOnOutsideClick?: boolean, theme?: ThemeColor | undefined, controller?: ContextMenuController | null, createTime?: Date);
|
|
1142
|
+
static fromOptions(id: string, options: ContextMenuCreateOptions, menuLines?: MenuLine[]): ContextMenu;
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1244
1145
|
interface ContextMenuServiceApi {
|
|
1245
1146
|
/**
|
|
1246
1147
|
* 当前所有右键菜单
|
|
@@ -1274,13 +1175,99 @@ interface ContextMenuServiceApi {
|
|
|
1274
1175
|
closeAll(): Promise<number>;
|
|
1275
1176
|
}
|
|
1276
1177
|
|
|
1277
|
-
interface
|
|
1278
|
-
|
|
1279
|
-
|
|
1178
|
+
interface DialogCreateOptions {
|
|
1179
|
+
id?: string;
|
|
1180
|
+
title?: string;
|
|
1181
|
+
titleIcon?: FunctionComponent | string;
|
|
1182
|
+
content?: string;
|
|
1183
|
+
contentAlign?: DialogContentAlign;
|
|
1184
|
+
contentView?: FunctionComponent | string;
|
|
1185
|
+
icon?: FunctionComponent | string;
|
|
1186
|
+
view?: FunctionComponent | string;
|
|
1187
|
+
theme?: ThemeColor;
|
|
1188
|
+
leftMode?: boolean;
|
|
1189
|
+
className?: string;
|
|
1190
|
+
style?: object;
|
|
1191
|
+
confirmText?: string;
|
|
1192
|
+
cancelText?: string;
|
|
1193
|
+
enableCloseButton?: boolean;
|
|
1194
|
+
enableInput?: boolean;
|
|
1195
|
+
defaultValue?: string;
|
|
1196
|
+
inputPlaceholder?: string;
|
|
1197
|
+
autoFocus?: boolean;
|
|
1198
|
+
allowEmpty?: boolean;
|
|
1199
|
+
onChange?: (value: string) => void;
|
|
1200
|
+
onCheck?: (value: string) => boolean;
|
|
1201
|
+
onConfirm?: (value: string) => void;
|
|
1202
|
+
onCancel?: () => void;
|
|
1203
|
+
onClose?: () => void;
|
|
1204
|
+
onConfirmButtonClick?: () => void;
|
|
1205
|
+
onCancelButtonClick?: () => void;
|
|
1206
|
+
onOutsideClick?: () => void;
|
|
1207
|
+
onCloseButtonClick?: () => void;
|
|
1208
|
+
onRender?: () => void;
|
|
1209
|
+
onEffect?: () => () => void;
|
|
1210
|
+
closeOnConfirm?: boolean;
|
|
1211
|
+
closeOnCancel?: boolean;
|
|
1212
|
+
closeOnOutsideClick?: boolean;
|
|
1213
|
+
closeOnCloseButtonClick?: boolean;
|
|
1214
|
+
alignButton?: boolean;
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1217
|
+
declare enum DialogContentAlign {
|
|
1218
|
+
LEFT = "LEFT",
|
|
1219
|
+
CENTER = "CENTER",
|
|
1220
|
+
RIGHT = "RIGHT"
|
|
1280
1221
|
}
|
|
1222
|
+
declare class Dialog {
|
|
1223
|
+
options: DialogCreateOptions;
|
|
1224
|
+
id: string;
|
|
1225
|
+
title: string;
|
|
1226
|
+
titleIcon: FunctionComponent | string | undefined;
|
|
1227
|
+
content: string;
|
|
1228
|
+
contentAlign: DialogContentAlign;
|
|
1229
|
+
contentView: FunctionComponent | string | undefined;
|
|
1230
|
+
icon: FunctionComponent | string | undefined;
|
|
1231
|
+
view: FunctionComponent | string | undefined;
|
|
1232
|
+
theme: ThemeColor;
|
|
1233
|
+
leftMode: boolean;
|
|
1234
|
+
className: string;
|
|
1235
|
+
style: object;
|
|
1236
|
+
confirmText: string;
|
|
1237
|
+
cancelText: string;
|
|
1238
|
+
enableInput: boolean;
|
|
1239
|
+
defaultValue: string;
|
|
1240
|
+
inputPlaceholder: string;
|
|
1241
|
+
autoFocus: boolean;
|
|
1242
|
+
allowEmpty: boolean;
|
|
1243
|
+
onChange: (value: string) => void;
|
|
1244
|
+
onCheck: (value: string) => boolean;
|
|
1245
|
+
enableCloseButton: boolean;
|
|
1246
|
+
onConfirm: (value: string) => void;
|
|
1247
|
+
onCancel: () => void;
|
|
1248
|
+
onClose: () => void;
|
|
1249
|
+
onConfirmButtonClick: () => void;
|
|
1250
|
+
onCancelButtonClick: () => void;
|
|
1251
|
+
onOutsideClick: () => void;
|
|
1252
|
+
onCloseButtonClick: () => void;
|
|
1253
|
+
onRender: () => void;
|
|
1254
|
+
onEffect: () => () => void;
|
|
1255
|
+
closeOnConfirm: boolean;
|
|
1256
|
+
closeOnCancel: boolean;
|
|
1257
|
+
closeOnOutsideClick: boolean;
|
|
1258
|
+
closeOnCloseButtonClick: boolean;
|
|
1259
|
+
alignButton: boolean;
|
|
1260
|
+
inputValue: string;
|
|
1261
|
+
createTime: Date;
|
|
1262
|
+
focusInput: () => void;
|
|
1263
|
+
elements: Map<string, HTMLElement>;
|
|
1264
|
+
constructor(options: DialogCreateOptions, id: string, title?: string, titleIcon?: FunctionComponent | string | undefined, content?: string, contentAlign?: DialogContentAlign, contentView?: FunctionComponent | string | undefined, icon?: FunctionComponent | string | undefined, view?: FunctionComponent | string | undefined, theme?: ThemeColor, leftMode?: boolean, className?: string, style?: object, confirmText?: string, cancelText?: string, enableInput?: boolean, defaultValue?: string, inputPlaceholder?: string, autoFocus?: boolean, allowEmpty?: boolean, onChange?: (value: string) => void, onCheck?: (value: string) => boolean, enableCloseButton?: boolean, onConfirm?: (value: string) => void, onCancel?: () => void, onClose?: () => void, onConfirmButtonClick?: () => void, onCancelButtonClick?: () => void, onOutsideClick?: () => void, onCloseButtonClick?: () => void, onRender?: () => void, onEffect?: () => () => void, closeOnConfirm?: boolean, closeOnCancel?: boolean, closeOnOutsideClick?: boolean, closeOnCloseButtonClick?: boolean, alignButton?: boolean, inputValue?: string, createTime?: Date, focusInput?: () => void, elements?: Map<string, HTMLElement>);
|
|
1265
|
+
static fromOptions(id: string, options: DialogCreateOptions): Dialog;
|
|
1266
|
+
setHide: (value: boolean) => void;
|
|
1267
|
+
}
|
|
1268
|
+
|
|
1281
1269
|
interface DialogServiceApi {
|
|
1282
1270
|
dialogs: Dialog[];
|
|
1283
|
-
renderer: DialogRenderer | null;
|
|
1284
1271
|
/**
|
|
1285
1272
|
* 创建对话框 最全面的对话框创建方法
|
|
1286
1273
|
*
|
|
@@ -1622,7 +1609,7 @@ interface PluginInformation {
|
|
|
1622
1609
|
}
|
|
1623
1610
|
interface PluginContainerServiceApi {
|
|
1624
1611
|
plugins: Map<string, PluginInformation>;
|
|
1625
|
-
addPlugin(plugin: BasePlugin): void
|
|
1612
|
+
addPlugin(plugin: BasePlugin): Promise<void>;
|
|
1626
1613
|
removePlugin(plugin: BasePlugin): void;
|
|
1627
1614
|
openPlugin(plugin: IconPlugin): Promise<boolean>;
|
|
1628
1615
|
closePlugin(plugin: IconPlugin): Promise<boolean>;
|
|
@@ -2102,10 +2089,21 @@ declare enum PluginEventType {
|
|
|
2102
2089
|
ADD = "ADD",
|
|
2103
2090
|
INSTALL = "INSTALL",
|
|
2104
2091
|
ENABLE = "ENABLE",
|
|
2092
|
+
OPEN = "OPEN",
|
|
2093
|
+
CLOSE = "CLOSE",
|
|
2105
2094
|
DISABLE = "DISABLE",
|
|
2106
|
-
UNINSTALL = "UNINSTALL"
|
|
2095
|
+
UNINSTALL = "UNINSTALL",
|
|
2096
|
+
DEBUG = "DEBUG"
|
|
2107
2097
|
}
|
|
2108
2098
|
|
|
2099
|
+
/**
|
|
2100
|
+
* 插件服务订阅者
|
|
2101
|
+
*
|
|
2102
|
+
* @param id 插件id
|
|
2103
|
+
* @param type 事件类型
|
|
2104
|
+
*/
|
|
2105
|
+
type PluginServiceSubscriber = (id: string, type: PluginEventType) => void;
|
|
2106
|
+
|
|
2109
2107
|
interface PluginState {
|
|
2110
2108
|
instance?: BasePlugin;
|
|
2111
2109
|
element?: HTMLScriptElement;
|
|
@@ -2114,14 +2112,6 @@ interface PluginState {
|
|
|
2114
2112
|
debug?: boolean;
|
|
2115
2113
|
}
|
|
2116
2114
|
|
|
2117
|
-
/**
|
|
2118
|
-
* 插件服务订阅者
|
|
2119
|
-
*
|
|
2120
|
-
* @param type 事件类型
|
|
2121
|
-
* @param plugin 插件状态
|
|
2122
|
-
*/
|
|
2123
|
-
type PluginServiceSubscriber = (type: PluginEventType, plugin?: PluginState) => void;
|
|
2124
|
-
|
|
2125
2115
|
interface PluginServiceApi {
|
|
2126
2116
|
/**
|
|
2127
2117
|
* 是否为精简输出模式 不会针对每一个插件输出详细信息 (默认为 true)
|
|
@@ -2163,10 +2153,6 @@ interface PluginServiceApi {
|
|
|
2163
2153
|
* @param config 插件配置
|
|
2164
2154
|
*/
|
|
2165
2155
|
add(config: PluginConfig): Promise<void>;
|
|
2166
|
-
/**
|
|
2167
|
-
* 添加所有官方插件
|
|
2168
|
-
*/
|
|
2169
|
-
addOfficialPlugins(): Promise<void>;
|
|
2170
2156
|
/**
|
|
2171
2157
|
* 添加外部插件
|
|
2172
2158
|
*
|
|
@@ -2197,6 +2183,18 @@ interface PluginServiceApi {
|
|
|
2197
2183
|
* @param id 插件 ID
|
|
2198
2184
|
*/
|
|
2199
2185
|
enable(id: string): Promise<void>;
|
|
2186
|
+
/**
|
|
2187
|
+
* 打开插件 (侧栏中的可开启项)
|
|
2188
|
+
*
|
|
2189
|
+
* @param id 插件 ID
|
|
2190
|
+
*/
|
|
2191
|
+
open(id: string): Promise<void>;
|
|
2192
|
+
/**
|
|
2193
|
+
* 关闭插件
|
|
2194
|
+
*
|
|
2195
|
+
* @param id 插件 ID
|
|
2196
|
+
*/
|
|
2197
|
+
close(id: string): Promise<void>;
|
|
2200
2198
|
/**
|
|
2201
2199
|
* 禁用插件
|
|
2202
2200
|
*
|
|
@@ -2209,6 +2207,8 @@ interface PluginServiceApi {
|
|
|
2209
2207
|
* @param id 插件 ID
|
|
2210
2208
|
*/
|
|
2211
2209
|
uninstall(id: string): Promise<void>;
|
|
2210
|
+
waitInstall(id: string): Promise<void>;
|
|
2211
|
+
waitEnable(id: string): Promise<void>;
|
|
2212
2212
|
}
|
|
2213
2213
|
|
|
2214
2214
|
interface SceneServiceApi {
|
|
@@ -2282,7 +2282,7 @@ interface Status {
|
|
|
2282
2282
|
SyncInitialized: boolean;
|
|
2283
2283
|
RsInitialized: boolean;
|
|
2284
2284
|
AllInitialized: boolean;
|
|
2285
|
-
|
|
2285
|
+
PluginEnabled: boolean;
|
|
2286
2286
|
PluginPreLoaded: boolean;
|
|
2287
2287
|
FileLoaded: boolean;
|
|
2288
2288
|
ModelLoaded: boolean;
|
|
@@ -2315,10 +2315,10 @@ interface StatusServiceApi {
|
|
|
2315
2315
|
unsubscribeAllInitialized(subscriber: StatusChangeSubscriber): void;
|
|
2316
2316
|
afterAllInitialized(subscriber: StatusChangeSubscriber): void;
|
|
2317
2317
|
waitAllInitialized(): Promise<boolean>;
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2318
|
+
subscribePluginEnabled(subscriber: StatusChangeSubscriber): () => void;
|
|
2319
|
+
unsubscribePluginEnabled(subscriber: StatusChangeSubscriber): void;
|
|
2320
|
+
afterPluginEnabled(subscriber: StatusChangeSubscriber): void;
|
|
2321
|
+
waitPluginEnabled(): Promise<boolean>;
|
|
2322
2322
|
subscribePluginPreLoaded(subscriber: StatusChangeSubscriber): () => void;
|
|
2323
2323
|
unsubscribePluginPreLoaded(subscriber: StatusChangeSubscriber): void;
|
|
2324
2324
|
afterPluginPreLoaded(subscriber: StatusChangeSubscriber): void;
|
|
@@ -2547,7 +2547,6 @@ interface RvMeeting {
|
|
|
2547
2547
|
}
|
|
2548
2548
|
|
|
2549
2549
|
interface RvPlugin {
|
|
2550
|
-
id: string;
|
|
2551
2550
|
version: string | VersionPoint;
|
|
2552
2551
|
enable: {
|
|
2553
2552
|
viewer: EnableLevel;
|
|
@@ -2717,7 +2716,6 @@ interface NfpApi {
|
|
|
2717
2716
|
ProgressBar: FunctionComponent<ProgressBarProps>;
|
|
2718
2717
|
UploadButtonAndList: FunctionComponent<UploadButtonAndListProps>;
|
|
2719
2718
|
ScrollBar: FunctionComponent<ScrollBarProps>;
|
|
2720
|
-
Dialog: FunctionComponent<DialogProps>;
|
|
2721
2719
|
MaterialSymbol: FunctionComponent<MaterialSymbolProps>;
|
|
2722
2720
|
ResourcePreview: FunctionComponent<ResourcePreviewProps>;
|
|
2723
2721
|
};
|
|
@@ -3162,4 +3160,4 @@ declare const VectorUtils: {
|
|
|
3162
3160
|
toArrayWithRound4: typeof toArrayWithRound4;
|
|
3163
3161
|
};
|
|
3164
3162
|
|
|
3165
|
-
export { acceptMime as AcceptMime, type AddLocalDataOptionInterface as AddLocalDataOption, type AnchorProps, type AntCheckboxProps, type AntColorProps, type AntEmptyProps, type AntNumberProps, type AntSelectProps, type AntSwitchProps, type AwarenessChangeSubscriber, type AwarenessChanges, type AwarenessServiceApi, type BasePlugin, type BasePluginConfig, type BuiltInPluginConfig, type C3, type C4, type CameraConfigurationAnimationApi, type CameraLocationAnimationApi, ContextMenu, type ContextMenuController, type ContextMenuCreateOptions, type
|
|
3163
|
+
export { acceptMime as AcceptMime, type AddLocalDataOptionInterface as AddLocalDataOption, type AnchorProps, type AntCheckboxProps, type AntColorProps, type AntEmptyProps, type AntNumberProps, type AntSelectProps, type AntSwitchProps, type AwarenessChangeSubscriber, type AwarenessChanges, type AwarenessServiceApi, type BasePlugin, type BasePluginConfig, type BuiltInPluginConfig, type C3, type C4, type CameraConfigurationAnimationApi, type CameraLocationAnimationApi, ContextMenu, type ContextMenuController, type ContextMenuCreateOptions, type ContextMenuServiceApi, CryptoUtils, DataUtils, Dialog, DialogContentAlign, type DialogCreateOptions, type DialogPlugin, type DialogServiceApi, type DivProps, type DivPropsSimple, DomNotFoundError, type DrawerPlugin, type EasyPropertyAnimationApi, EnableLevel, type ExternalPluginConfig, type FileData, type FileProgressBarProps, FileUtils, type FirstLoadModelServiceApi, FirstLoadModelServiceEventType, FirstLoadModelServiceStatus, type FirstLoadModelServiceSubscriber, type FirstLoadServiceApi, FirstLoadServiceEventType, FirstLoadServiceStatus, type FirstLoadServiceSubscriber, type FlexGrowProps, FocusMode, type FogAnimationApi, type GroundAnimationApi, type HighLightInfo, type HistoryServiceApi, HistoryServiceEventType, type HistoryServiceStateSubscriber, type HistoryServiceSubscriber, type IconPlugin, IconPluginPosition, type IconViewProps, type InternationalizationProviderProps, type InternationalizationServiceApi, LabelInfo, LabelTheme, type LastSubscriber, type LightAnimationApi, type LocalData, type LocalDataServiceApi, LocalDataServiceEventType, type LocalDataServiceSubscriber, LocalDataStatus, LocalDataType, Locale, type MainPortalProps, type MaterialSymbolFunction, type MaterialSymbolOptions, type MaterialSymbolProps, MathUtils, type MeetingServiceApi, type MeetingState, MeetingStatus, MenuLine, type MenuLineCreateOptions, MenuLineType, Message, type MessageServiceApi, type MessageState, type MessageType, type MixView, type NamespaceSubscriber, type NativeAnyEventSubscriber, type NativeDragEventSubscriber, type NativeEventServiceApi, NativeEventUtils, type NativeFocusEventSubscriber, type NativeKeyboardEventSubscriber, type NativeMouseEventSubscriber, type NativePointerEventSubscriber, type NativeUIEventSubscriber, type NativeWheelEventSubscriber, NetworkUtils, type NfpApi, type NodeMaterialChangeListener, type NodeMaterialInfo, type NodePair, NotFoundError, NumberUtils, type OssUploadInstance, OssUploadInstanceStatus, type OssUploadServiceApi, OssUploadServiceEventType, type OssUploadServiceSubscriber, type Page, PageMode, PageType, PageUtils, type PluginConfig, type PluginConnectorApi, type PluginContainerServiceApi, PluginEventType, PluginFrom, type PluginInformation, type PluginServiceApi, type PluginServiceSubscriber, type PluginState, PluginType, type PluginViewProps, type ProgressBarProps, type ResourcePreviewProps, type ResourceServiceApi, type RsAudioServiceApi, type RsClickApi, type RsEnvironmentApi, type RsEnvironmentServiceApi, type RsLabelServiceApi, type RsLoopAnimationManagerApi, type RsMaterialServiceApi, type RsModel, type RsModelServiceApi, RsModelServiceEventType, type RsModelServiceSubscriber, RsModelStatus, type RsNodeMaterialManagerApi, type RsNodeServiceApi, type RsSelectionApi, type RsSelectionMaterialInfo, type RsSelectionNodeInfo, type RsSelectionServiceApi, type RsSelectionState, type RsSeparateServiceApi, type RsServiceApi, type RsTextureServiceApi, type RsTransformGroundApi, type RsdButtonProps, type RsdCheckableButtonProps, type RsdCheckboxProps, type RsdColorProps, type RsdFileSelectProps, type RsdInputProps, type RsdMentionsProps, type RsdNoneProps, type RsdNumberListProps, type RsdNumberProps, type RsdSelectProps, type RsdSwitchProps, type RsdTitleProps, RvAttachType, type RvAttributes, type RvAttributesServiceApi, type RvAudio, type RvAwareness, type RvAwarenessClick, type RvAwarenessDevice, type RvAwarenessUser, type RvAwarenessWindow, type RvBase, type RvBasicConfig, RvBasicType, type RvCamera, type RvCameraLocation, type RvCode, type RvCodeAttributeApi, type RvConfiguration, type RvEnvironment, type RvFile, type RvFileServiceApi, RvFileServiceEventType, type RvFileServiceSubscriber, RvFileType, type RvGlobal, type RvGlobalServiceApi, type RvHistory, type RvLabel, type RvLabelAttributeApi, type RvLocation, type RvLocationAttributeApi, type RvLoop, type RvLoopAttributeApi, type RvMaterial, type RvMaterialAttributeApi, type RvMaterialGeneral, type RvMaterialNode, type RvMaterialNodeInput, type RvMaterialPBR, type RvMaterialTexture, RvMaterialType, type RvMeeting, type RvMeetingCurrent, type RvMeetingServiceApi, type RvMeetingStatistic, type RvModel, RvModelOrigin, type RvModelServiceApi, type RvNative, type RvNativeAttributeApi, type RvNode, type RvNodeMaterialAnalyzerApi, type RvPlugin, RvPresetType, type RvResource, type RvResourceServiceApi, RvResourceServiceEventType, type RvResourceServiceSubscriber, RvResourceType, type RvSceneNode, type RvSeparate, type RvStep, type RvStepServiceApi, RvUtils, type RvVersion, type SceneServiceApi, type Screen, ScreenSize, type ScrollBarProps, type SelectedSubscriber, type ShadowAnimationApi, ShareMode, type SkyboxAnimationApi, type SpaceServiceApi, type SpanProps, type SpanPropsSimple, StaticClassInstantiationError, type Status, type StatusChangeSubscriber, type StatusServiceApi, type StepChangeSubscriber, type StepOptions, type SupportAnimationTarget, type SyncServiceApi, type TAttributesServiceApi, type TAttributesSubscriber, TChangeType, type TStepServiceApi, type TSubscriber, type TextureInfo, ThemeBackground, ThemeColor, type ThemeProviderProps, type ThemeServiceApi, ThemeShape, type ThemeState, TimeUtils, type Translator, type UploadButtonAndListProps, UrlUtils, type UseBase, type UseStepOptions, type UseTAttributes, type UseTStep, type UseTranslations, type UserAuth, type UserInfo, type UserServiceApi, type V2, type V3, type V4, VectorUtils, VersionPoint, type ViewPlugin, sleep, throttle };
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var t=Object.defineProperty,n=class extends Error{constructor(t){super(t),this.name="NotFoundError"}},e=class extends n{constructor(t){super(t),this.name="DomNotFoundError"}},o=class extends Error{constructor(t){super(`${t} is a static class and cannot be instantiated.`),this.name="StaticClassInstantiationError"}},i=(t=>(t.Default="Default",t))(i||{}),r=class{constructor(t,n=null,e="",o="Default",i=0,r=0){this.nid=t,this.node=n,this.text=e,this.theme=o,this.x=i,this.y=r}parentElement=null;pointElement=null;lineElement=null;blockElement=null;textElement=null;validate=!1;always=!1;show=!1;lastClickTime=0;lastSp=null},a=(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))(a||{}),s=(t=>(t.WAITING="WAITING",t.LOADING="LOADING",t.LOADED="LOADED",t.ERROR="ERROR",t.CANCELED="CANCELED",t))(s||{}),u=(t=>(t.WAITING="WAITING",t.LOADING="LOADING",t.LOADED="LOADED",t.ERROR="ERROR",t.CANCELED="CANCELED",t))(u||{}),c=(t=>(t.START="START",t.PROGRESS="PROGRESS",t.LOADED="LOADED",t.ERROR="ERROR",t.CANCELED="CANCELED",t))(c||{}),E=class t{constructor(t,n,e=[],o=!1,i=0,r=0,a=!1,s,u=null,c=new Date){this.options=t,this.id=n,this.lines=e,this.showIcon=o,this.x=i,this.y=r,this.closeOnOutsideClick=a,this.theme=s,this.controller=u,this.createTime=c}static fromOptions(n,e,o){let{showIcon:i}=e;return void 0===i&&e.lines?.forEach(t=>{t.icon&&(i=!0)}),new t(e,n,o,i,e.x,e.y,e.closeOnOutsideClick,e.theme)}},l=(t=>(t.BUTTON="BUTTON",t.DIVIDER="DIVIDER",t.CHECKBOX="CHECKBOX",t.SUB="SUB",t.VIEW="VIEW",t))(l||{}),T=class t{constructor(t,n,e="BUTTON",o="",i="",r=void 0,a=void 0,s="",u=!1,c="",E=()=>{},l=()=>{},T=()=>{},f="BUTTON"===e,R=!1,A=()=>{},h=void 0,S=new Date){this.options=t,this.id=n,this.type=e,this.text=o,this.tip=i,this.icon=r,this.view=a,this.color=s,this.disabled=u,this.shortcut=c,this.onClick=E,this.onMouseOver=l,this.onMouseOut=T,this.closeAllOnClick=f,this.checkboxDefaultValue=R,this.onCheckboxChange=A,this.sub=h,this.createTime=S}static fromOptions(n,e){return new t(e,n,e.type,e.text,e.tip,e.icon,e.view,e.color,e.disabled,e.shortcut,e.onClick,e.onMouseOver,e.onMouseOut,e.closeAllOnClick,e.checkboxDefaultValue,e.onCheckboxChange,e.sub)}},f=(t=>(t.GREEN="GREEN",t.PURPLE="PURPLE",t.BLUE="BLUE",t.PINK="PINK",t))(f||{}),R=(t=>(t.LEFT="LEFT",t.CENTER="CENTER",t.RIGHT="RIGHT",t))(R||{}),A=class t{constructor(t,n,e="",o=void 0,i="",r="LEFT",a=void 0,s=void 0,u=void 0,c="BLUE",E=!1,l="",T={},f="",R="",A=!1,h="",S="",O=A,D=!1,L=()=>{},N=()=>!0,d=!0,I=()=>{},m=()=>{},C=()=>{},p=()=>{},P=()=>{},g=()=>{},y=()=>{},U=()=>{},w=()=>()=>{},M=!0,B=!0,x=!1,b=!0,G=!1,v=h,F=new Date,V=()=>{},H=new Map){this.options=t,this.id=n,this.title=e,this.titleIcon=o,this.content=i,this.contentAlign=r,this.contentView=a,this.icon=s,this.view=u,this.theme=c,this.leftMode=E,this.className=l,this.style=T,this.confirmText=f,this.cancelText=R,this.enableInput=A,this.defaultValue=h,this.inputPlaceholder=S,this.autoFocus=O,this.allowEmpty=D,this.onChange=L,this.onCheck=N,this.enableCloseButton=d,this.onConfirm=I,this.onCancel=m,this.onClose=C,this.onConfirmButtonClick=p,this.onCancelButtonClick=P,this.onOutsideClick=g,this.onCloseButtonClick=y,this.onRender=U,this.onEffect=w,this.closeOnConfirm=M,this.closeOnCancel=B,this.closeOnOutsideClick=x,this.closeOnCloseButtonClick=b,this.alignButton=G,this.inputValue=v,this.createTime=F,this.focusInput=V,this.elements=H}static fromOptions(n,e){return new t(e,n,e.title,e.titleIcon,e.content,e.contentAlign,e.contentView,e.icon,e.view,e.theme,e.leftMode,e.className,e.style,e.confirmText,e.cancelText,e.enableInput,e.defaultValue,e.inputPlaceholder,e.autoFocus,e.allowEmpty,e.onChange,e.onCheck,e.enableCloseButton,e.onConfirm,e.onCancel,e.onClose,e.onConfirmButtonClick,e.onCancelButtonClick,e.onOutsideClick,e.onCloseButtonClick,e.onRender,e.onEffect,e.closeOnConfirm,e.closeOnCancel,e.closeOnOutsideClick,e.closeOnCloseButtonClick,e.alignButton)}setHide=()=>{}},h=(t=>(t.WAITING="WAITING",t.LOADING="LOADING",t.LOADED="LOADED",t.ERROR="ERROR",t.CANCELED="CANCELED",t))(h||{}),S=(t=>(t.START="START",t.PROGRESS="PROGRESS",t.LOADED="LOADED",t.ERROR="ERROR",t.CANCELED="CANCELED",t))(S||{}),O={};((n,e)=>{for(var o in e)t(n,o,{get:e[o],enumerable:!0})})(O,{AAC:()=>W,ANIMATION:()=>x,ANY:()=>C,ATTACH_LIST:()=>Pt,AVI:()=>ot,AVIF:()=>tt,BMP:()=>K,CAMERA:()=>U,FLAC:()=>k,FLV:()=>st,GIF:()=>j,GLB:()=>b,GLTF:()=>G,GP3:()=>ct,HEIF:()=>Z,ICO:()=>Q,JPG:()=>X,JSON:()=>lt,LIGHT:()=>y,MARKDOWN:()=>Rt,MATERIAL:()=>M,MESH:()=>g,MKV:()=>Et,MOV:()=>rt,MP3:()=>V,MP4:()=>nt,MPEG:()=>it,NF:()=>Tt,OBJ:()=>F,OGG:()=>_,OGV:()=>ut,OPUS:()=>z,PNG:()=>Y,SCENE:()=>P,STL:()=>v,SUPPORT_ALL_LIST:()=>It,SUPPORT_AUDIO_LIST:()=>Dt,SUPPORT_BABYLON_LIST:()=>Ot,SUPPORT_FILE_LIST:()=>mt,SUPPORT_IMAGE_LIST:()=>At,SUPPORT_JSON_LIST:()=>Nt,SUPPORT_MODEL_LIST:()=>ht,SUPPORT_NEXTFLOW_LIST:()=>dt,SUPPORT_RENDER_LIST:()=>Ct,SUPPORT_TEXTURE_LIST:()=>pt,SUPPORT_TEXT_LIST:()=>Lt,SUPPORT_VIDEO_LIST:()=>St,SVG:()=>J,TEXTURE:()=>w,TIFF:()=>q,TXT:()=>ft,UNKNOWN:()=>p,UV:()=>B,WAV:()=>H,WMV:()=>at,WebM:()=>et,WebP:()=>$,getExtension:()=>xt,getMime:()=>Bt,getMimeByBlob:()=>gt,getMimeByBuffer:()=>wt,getMimeByPath:()=>yt,getMimeByStream:()=>Mt,getMimeByUrl:()=>Ut,isAttach:()=>$t,isBabylon:()=>_t,isMaterial:()=>jt,isSupport:()=>bt,isSupportAudio:()=>kt,isSupportFile:()=>Gt,isSupportImage:()=>vt,isSupportJson:()=>Wt,isSupportModel:()=>Ft,isSupportRender:()=>zt,isSupportText:()=>Ht,isSupportTexture:()=>Xt,isSupportVideo:()=>Vt,isTexture:()=>Yt,isUV:()=>Kt});import{AbstractMesh as D,BaseTexture as L,Material as N}from"@babylonjs/core";import{fileTypeFromBlob as d,fileTypeFromBuffer as I,fileTypeFromStream as m}from"file-type";var C="*/*",p="unknown/unknown",P="babylonjs/scene",g="babylonjs/mesh",y="babylonjs/light",U="babylonjs/camera",w="babylonjs/texture",M="babylonjs/material",B="babylonjs/uv",x="babylonjs/animation",b="model/gltf-binary",G="model/gltf+json",v="model/stl",F="model/obj",V="audio/mpeg",H="audio/wav",W="audio/aac",_="audio/ogg",k="audio/flac",z="audio/opus",X="image/jpeg",Y="image/png",j="image/gif",K="image/bmp",$="image/webp",J="image/svg+xml",q="image/tiff",Q="image/x-icon",Z="image/heif",tt="image/avif",nt="video/mp4",et="video/webm",ot="video/x-msvideo",it="video/mpeg",rt="video/quicktime",at="video/x-ms-wmv",st="video/x-flv",ut="video/ogg",ct="video/3gpp",Et="video/x-matroska",lt="application/json",Tt="nextflow/sync",ft="text/plain",Rt="text/markdown",At=[X,Y],ht=[P,b,G,v,F],St=[nt],Ot=[P,g,y,U,w,M,B,x],Dt=[V,H],Lt=[ft],Nt=[lt],dt=[Tt],It=[...At,...ht,...St,...Ot,...Dt,...Lt,...Nt],mt=[...At,...ht,...St,...Dt,...Lt,...Nt],Ct=[...At,...ht,...St,...Lt],pt=[...At,...St,w],Pt=[w,M,B];async function gt(t){if(t&&t instanceof Blob){if(t instanceof File&&t.name.endsWith(".babylon"))return P;const n=await d(t);return!n&&t instanceof File&&t.name.endsWith(".stl")?v:n?.mime??p}return p}async function yt(t){if(t){if(t.endsWith(".babylon"))return P;return(await import("mime")).default.getType(t)??p}return p}async function Ut(t){if(!t)return p;if(t.endsWith(".babylon"))return P;try{const n=await fetch(t);if(!n.body)return p;const e=await m(n.body);if(e?.mime)return e.mime;const o=new URL(t).pathname;if(o.includes("."))return await yt(o)}catch(t){console.error("getMimeByUrl",t)}return p}async function wt(t){if(t){const n=await I(t);return n?.mime??p}return p}async function Mt(t){const n=await m(t);return n?.mime??p}async function Bt(t){return t?"undefined"!=typeof ReadableStream&&t instanceof ReadableStream?Mt(t):t instanceof Blob?gt(t):"string"==typeof t?t.startsWith("http://")||t.startsWith("https://")?Ut(t):yt(t):t instanceof ArrayBuffer||t instanceof Uint8Array?wt(t):t instanceof L?w:t instanceof N?M:t instanceof D?g:p:p}async function xt(t=p){if(t===P)return"babylon";if(_t(t)||$t(t))return t;if(t===C||t===p)return"";return(await import("mime")).default.getExtension(t)??""}function bt(t=p){return t==C||t!=p&&It.includes(t)}function Gt(t=p){return t==C||t!=p&&mt.includes(t)}function vt(t=p){return t==C||t!=p&&At.includes(t)}function Ft(t=p){return t==C||t!=p&&ht.includes(t)}function Vt(t=p){return t==C||t!=p&&St.includes(t)}function Ht(t=p){return t==C||t!=p&&Lt.includes(t)}function Wt(t=p){return t==C||t!=p&&Nt.includes(t)}function _t(t=p){return t==C||t!=p&&Ot.includes(t)}function kt(t=p){return t==C||t!=p&&Dt.includes(t)}function zt(t=p){return t==C||t!=p&&Ct.includes(t)}function Xt(t=p){return t==C||t!=p&&pt.includes(t)}function Yt(t=p){return t==C||t!=p&&t==w}function jt(t=p){return t==C||t!=p&&t==M}function Kt(t=p){return t==C||t!=p&&t==B}function $t(t=p){return t==C||t!=p&&Pt.includes(t)}var Jt=(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))(Jt||{}),qt=(t=>(t.WAITING="WAITING",t.LOADING="LOADING",t.PAUSED="PAUSED",t.LOADED="LOADED",t.FAILED="FAILED",t.CANCELED="CANCELED",t))(qt||{}),Qt=(t=>(t.BLOB="BLOB",t.OBJECT="OBJECT",t))(Qt||{}),Zt=(t=>(t.WAITING="WAITING",t.UPLOADING="UPLOADING",t.PAUSED="PAUSED",t.COMPLETED="COMPLETED",t.FAILED="FAILED",t.CANCELED="CANCELED",t))(Zt||{}),tn=(t=>(t.START="START",t.PROGRESS="PROGRESS",t.PAUSE="PAUSE",t.RESUME="RESUME",t.UPLOADED="UPLOADED",t.FAILED="FAILED",t.CANCELED="CANCELED",t))(tn||{}),nn=(t=>(t.ZH="ZH",t.EN="EN",t))(nn||{}),en=(t=>(t.PENDING="PENDING",t.PROGRESSING="PROGRESSING",t.ENDED="ENDED",t.CANCELED="CANCELED",t.BANNED="BANNED",t))(en||{}),on=(t=>(t.NONE="NONE",t.SELF="SELF",t.ALL="ALL",t))(on||{}),rn=class{constructor(t,n,e,o){this.text=t,this.type=n,this.duration=e,this.id=o}show=!0;height=20;opacity=0},an=(t=>(t.ADD="ADD",t.INSTALL="INSTALL",t.ENABLE="ENABLE",t.DISABLE="DISABLE",t.UNINSTALL="UNINSTALL",t))(an||{}),sn=(t=>(t.BUILT_IN="BUILT_IN",t.EXTERNAL="EXTERNAL",t.UNKNOWN="UNKNOWN",t))(sn||{}),un=(t=>(t.DISPLAY="DISPLAY",t.FULL="FULL",t.HP_BOX="HP_BOX",t.VR="VR",t.MR="MR",t))(un||{}),cn=(t=>(t.EDITOR="EDITOR",t.VIEWER="VIEWER",t.VISITOR="VISITOR",t))(cn||{}),En=(t=>(t.DEFAULT="DEFAULT",t.DESCRIPTION="DESCRIPTION",t))(En||{}),ln=(t=>(t.XS="XS",t.SM="SM",t.MD="MD",t.LG="LG",t.XL="XL",t))(ln||{}),Tn=(t=>(t.DEFAULT="DEFAULT",t.BACKGROUND="BACKGROUND",t.LIGHT="LIGHT",t.DARK="DARK",t))(Tn||{}),fn=(t=>(t.GENERAL="GENERAL",t.RHINE="RHINE",t))(fn||{}),Rn=(t=>(t.UNDO="UNDO",t.REDO="REDO",t))(Rn||{}),An=(t=>(t.ADD="ADD",t.REMOVE="REMOVE",t))(An||{}),hn=(t=>(t.OSS="OSS",t.URL="URL",t))(hn||{}),Sn=(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))(Sn||{}),On=(t=>(t.BASIC="BASIC",t.PROVIDE="PROVIDE",t.UPLOAD="UPLOAD",t))(On||{}),Dn=(t=>(t.NONE="NONE",t.INSTALL="INSTALL",t.ENABLE="ENABLE",t.OPEN="OPEN",t))(Dn||{}),Ln=(t=>(t.LATEST_STABLE="LATEST_STABLE",t.LATEST_NIGHTLY="LATEST_NIGHTLY",t.LATEST_CANARY="LATEST_CANARY",t))(Ln||{}),Nn=(t=>(t.TEXTURE="TEXTURE",t.MATERIAL="MATERIAL",t.UV="UV",t))(Nn||{}),dn=(t=>(t.FILE="FILE",t.ATTACH="ATTACH",t))(dn||{}),In=(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))(In||{}),mn=(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))(mn||{}),Cn=(t=>(t.ADD="ADD",t.REMOVE="REMOVE",t))(Cn||{}),pn=(t=>(t.SYNC="SYNC",t.STEP="STEP",t.SELECT="SELECT",t.ADD="ADD",t.UPDATE="UPDATE",t.DELETE="DELETE",t))(pn||{}),Pn=(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))(Pn||{}),gn=(t=>(t.BUTTON="BUTTON",t.SWITCH="SWITCH",t.DRAWER="DRAWER",t.DIALOG="DIALOG",t.CONTENT="CONTENT",t.WINDOW="WINDOW",t.SERVICE="SERVICE",t))(gn||{});var yn={computeSHA256:async function(t){const n=await crypto.subtle.digest("SHA-256",t);return Array.from(new Uint8Array(n)).map(t=>t.toString(16).padStart(2,"0")).join("")}};var Un={recursPathValue:function(t,n){const e=[];return e.push({path:t,value:n}),e}};function wn(t){const n=Math.floor(t).toString().length<=1?2:1;return t.toFixed(n)}async function Mn(t){if(t.size<=1048576){const n=await t.arrayBuffer();return yn.computeSHA256(n)}const n=[.25,.5,.75].map(n=>Math.floor(t.size*n)),e=await Promise.all(n.map(async n=>{const e=n,o=Math.min(e+65536,t.size),i=t.slice(e,o),r=await i.arrayBuffer();return yn.computeSHA256(r)})),o=new TextEncoder,i=e.join(""),r=o.encode(i);return yn.computeSHA256(r)}var Bn={to3n:wn,convertBytesToHigherUnit:function(t){const n=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];let e=0;for(;t>=1024&&e<n.length-1;)t/=1024,e++;let o=wn(t);return o.endsWith(".0")&&(o=o.slice(0,-2)),o.endsWith(".00")&&(o=o.slice(0,-3)),`${o} ${n[e]}`},splitName:function(t){const n=t.lastIndexOf(".");return-1===n?[t,""]:[t.substring(0,n),t.substring(n+1)]},ensureFileArray:function(t){return t?t instanceof File?[t]:t instanceof FileList?Array.from(t):t:[]},chunkHash:Mn,isSameFile:async function(t,n,e,o){if(n===t.name&&e===t.size){if(!o)return!0;if(o===await Mn(t))return!0}return!1},getFileInfo:async function(t){const n=await fetch(t,{method:"HEAD"});if(!n.ok)throw new Error(`HEAD request failed with status: ${String(n.status)}`);const e=n.headers.get("Content-Length");let o;if(e){if(o=parseInt(e,10),isNaN(o))throw new Error("Invalid file size from header")}else{const n=await fetch(t);if(!n.ok)throw new Error(`GET request failed with status: ${String(n.status)}`);o=(await n.blob()).size}return{name:new URL(t).pathname.split("/").pop()??"unknown",size:o}}};var xn={toDegrees:function(t){return t*(180/Math.PI)},toRadians:function(t){return t*(Math.PI/180)},approximatelyEqual:function(t,n,e=1e-6){return Math.abs(t-n)<e},getDistance:function(t,n,e,o){return Math.sqrt((e-t)**2+(o-n)**2)},getDistance3d:function(t,n,e,o,i,r){return Math.sqrt((o-t)**2+(i-n)**2+(r-e)**2)},getNearestNumberIndex:function(t,n){let e=1/0,o=-1;for(let i=0;i<n.length;i++){const r=Math.abs(t-n[i]);r<e&&(e=r,o=i)}return o}};function bn(t){if(t.type.includes("touch")){const n=t;if(n.touches.length){const t=n.touches[0];return[t.clientX,t.clientY]}const e=n.changedTouches[0];return[e.clientX,e.clientY]}const n=t;return[n.clientX,n.clientY]}var Gn={getEventPosition:bn,getDistanceBetweenEvents:function(t,n){const[e,o]=bn(t),[i,r]=bn(n);return xn.getDistance(e,o,i,r)},preventDefaultListener:function(t){t.preventDefault()},stopPropagationListener:function(t){t.stopPropagation()},preventDefaultStopPropagationListener:function(t){t.preventDefault(),t.stopPropagation()}};var vn={fetchJsonWithRetry:async function(t,n=3){let e;for(let o=0;o<n;o++)try{const n=await fetch(t);if(!n.ok)throw new Error(`HTTP Error: Status ${n.status.toString()}`);return await n.json()}catch(n){e=n,console.log(`Attempt ${(o+1).toString()} Failed: Retrying...\n${t}`)}throw e},fetchBlobWithRetry:async function(t,n=3){let e;for(let o=0;o<n;o++)try{const n=await fetch(t);if(!n.ok)throw new Error(`HTTP Error: Status ${n.status.toString()}`);return await n.blob()}catch(n){e=n,console.log(`Attempt ${(o+1).toString()} Failed: Retrying...\n${t}`)}throw e}};function Fn(t,n){const e=10**n;return Math.round(t*e)/e}var Vn={roundToX:Fn,r2:function(t){return Fn(t,2)},r3:function(t){return Fn(t,3)},isValidNumber:function(t){return"number"==typeof t&&!isNaN(t)&&isFinite(t)}};var Hn={getPageTypeBySpaceText:function(t){return"space"===t?"EDITOR":"m"===t?"VISITOR":"VIEWER"},getSearchParams:function(t){return new URLSearchParams(window.location.search).get(t)??void 0}};function Wn(t){const n=[];for(const e of t.split(".")){const t=parseInt(e,10);isNaN(t)||e!==t.toString()?n.push(e):n.push(t)}return n}function _n(t){return t.join(".")}function kn(t){return"string"==typeof t?Wn(t):t}var zn={makeRvPath:Wn,makeRvPathString:_n,ensureRvPath:kn,ensureRvPathString:function(t){return"string"!=typeof t?_n(t):t},getByRvPath:function(t,n){const e=kn(n);let o=t;for(const t of e){if(null==o)return;o=o[t]}return o},setByRvPath:function(t,n,e){const o=kn(n);let i=t;for(let t=0;t<o.length-1;t++)i=i[o[t]];i[o[o.length-1]]=e},checkRvPathOverlay:function(t,n){const e=kn(t),o=kn(n),i=e.length>o.length?o.length:e.length;for(let t=0;t<i;t++)if(e[t]!=o[t])return!1;return!0}};function Xn(t){return new Promise(n=>{setTimeout(n,t)})}function Yn(t,n){if(0===n)return t;let e,o,i=0,r=null;function a(){i=Date.now(),e&&t.apply(o,e)}return function(...t){const s=Date.now()-i;e=t,o=this,0!==i?(r&&(clearTimeout(r),r=null),s<n?r=setTimeout(()=>{a(),r=null},n-s):a()):setTimeout(a,1)}}var jn={convertTimeText:function(t){const n=Math.floor(t/3600),e=Math.floor(t%3600/60),o=Math.floor(t%60);return[n>0?String(n).padStart(2,"0"):null,String(e).padStart(2,"0"),String(o).padStart(2,"0")].filter(Boolean).join(":")},formatDateTo17Digits:function(t=new Date){return t.getFullYear().toString()+(t.getMonth()+1).toString().padStart(2,"0")+t.getDate().toString().padStart(2,"0")+t.getHours().toString().padStart(2,"0")+t.getMinutes().toString().padStart(2,"0")+t.getSeconds().toString().padStart(2,"0")+t.getMilliseconds().toString().padStart(3,"0")},formatDuration:function(t,n){const e=n-t,o=Math.floor(e/1e3),i=Math.floor(o/3600),r=Math.floor(o%3600/60),a=o%60;return`${i>0?`${i.toString().padStart(2,"0")}:`:""}${r.toString().padStart(2,"0")}:${a.toString().padStart(2,"0")}`}};async function Kn(t){try{return await navigator.clipboard.writeText(t),!0}catch{return!1}}var $n={getParam:function(t){const n=new RegExp(`(^|&)${t}=([^&]*)(&|$)`,"i"),e=window.location.search.substring(1).match(n);return null!=e?decodeURIComponent(e[2]):""},getHashParam:function(t){const n=new RegExp(`(^|&)${t}=([^&]*)(&|$)`,"i"),e=window.location.hash.substring(1).match(n);return null!=e?decodeURIComponent(e[2]):""},check:function(t){return new RegExp("^(?!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]*)?$","i").test(t)},copyCurrentUrlToClipboard:async function(){return Kn(window.location.href)},copyText:async function(t){try{return await navigator.clipboard.writeText(t),!0}catch{return!1}},trySetClipboard:Kn,extractFilenameFromUrl:function(t,n=!0){try{const e=new URL(t),o=e.pathname.split("/").pop()??"";return!n&&o.includes(".")?o.substring(0,o.lastIndexOf(".")):o}catch{return""}}};import{Quaternion as Jn,Vector3 as qn}from"@babylonjs/core";function Qn(t){return{x:180*t.x/Math.PI,y:180*t.y/Math.PI,z:180*t.z/Math.PI}}function Zn(t){return new Jn(t.x,t.y,t.z,t.w)}function te(t){return"w"in t}var ne={xyToArray:function(t,n=-1,e=[0,0]){return t?-1===n?[t.x,t.y]:[Vn.roundToX(t.x,n),Vn.roundToX(t.y,n)]:e},xyzToArray:function(t,n=-1,e=[0,0,0]){return t?-1===n?[t.x,t.y,t.z]:[Vn.roundToX(t.x,n),Vn.roundToX(t.y,n),Vn.roundToX(t.z,n)]:e},xyzwToArray:function(t,n=-1,e=[0,0,0,0]){return t?-1===n?[t.x,t.y,t.z,t.w]:[Vn.roundToX(t.x,n),Vn.roundToX(t.y,n),Vn.roundToX(t.z,n),Vn.roundToX(t.w,n)]:e},scaleV3:function(t,n){return{x:n.x*t,y:n.y*t,z:n.z*t}},radiansToDegrees:Qn,degreeToRadians:function(t){return{x:t.x*Math.PI/180,y:t.y*Math.PI/180,z:t.z*Math.PI/180}},radiansToQuaternion:function(t){return Jn.RotationYawPitchRoll(t.y,t.x,t.z)},degreesToQuaternion:function(t){return Jn.RotationYawPitchRoll(t.y*Math.PI/180,t.x*Math.PI/180,t.z*Math.PI/180)},toVector3:function(t){return new qn(t.x,t.y,t.z)},fromVector3:function(t){return{x:t.x,y:t.y,z:t.z}},withRound:function(t,n=0){return{x:Vn.roundToX(t.x,n),y:Vn.roundToX(t.y,n),z:Vn.roundToX(t.z,n)}},isFiniteVector:function(t){return isFinite(t.x)&&isFinite(t.y)&&isFinite(t.z)},noZero:function(t){return 0!==t.x&&0!==t.y&&0!==t.z},scaleV4:function(t,n){return{x:n.x*t,y:n.y*t,z:n.z*t,w:n.w*t}},toQuaternionVector:Zn,toEulerRadians:function(t){return Zn(t).toEulerAngles()},toEulerDegrees:function(t){return Qn(Zn(t).toEulerAngles())},toArray:function(t){return te(t)?[t.x,t.y,t.z,t.w]:[t.x,t.y,t.z]},fromQuaternion:function(t){return{x:t.x,y:t.y,z:t.z,w:t.w}},toArrayWithRound4:function(t,n=0){return te(t)?[Vn.roundToX(t.x,n),Vn.roundToX(t.y,n),Vn.roundToX(t.z,n),Vn.roundToX(t.w,n)]:[Vn.roundToX(t.x,n),Vn.roundToX(t.y,n),Vn.roundToX(t.z,n)]}};export{O as AcceptMime,E as ContextMenu,yn as CryptoUtils,Un as DataUtils,A as Dialog,R as DialogContentAlign,e as DomNotFoundError,Dn as EnableLevel,Bn as FileUtils,c as FirstLoadModelServiceEventType,u as FirstLoadModelServiceStatus,S as FirstLoadServiceEventType,h as FirstLoadServiceStatus,En as FocusMode,Rn as HistoryServiceEventType,Pn as IconPluginPosition,r as LabelInfo,i as LabelTheme,Jt as LocalDataServiceEventType,qt as LocalDataStatus,Qt as LocalDataType,nn as Locale,xn as MathUtils,en as MeetingStatus,T as MenuLine,l as MenuLineType,rn as Message,Gn as NativeEventUtils,vn as NetworkUtils,n as NotFoundError,Vn as NumberUtils,Zt as OssUploadInstanceStatus,tn as OssUploadServiceEventType,un as PageMode,cn as PageType,Hn as PageUtils,an as PluginEventType,sn as PluginFrom,gn as PluginType,a as RsModelServiceEventType,s as RsModelStatus,Nn as RvAttachType,Sn as RvBasicType,An as RvFileServiceEventType,hn as RvFileType,In as RvMaterialType,On as RvModelOrigin,mn as RvPresetType,Cn as RvResourceServiceEventType,dn as RvResourceType,zn as RvUtils,ln as ScreenSize,on as ShareMode,o as StaticClassInstantiationError,pn as TChangeType,Tn as ThemeBackground,f as ThemeColor,fn as ThemeShape,jn as TimeUtils,$n as UrlUtils,ne as VectorUtils,Ln as VersionPoint,Xn as sleep,Yn as throttle};
|
|
1
|
+
var t=Object.defineProperty,n=class extends Error{constructor(t){super(t),this.name="NotFoundError"}},e=class extends n{constructor(t){super(t),this.name="DomNotFoundError"}},o=class extends Error{constructor(t){super(`${t} is a static class and cannot be instantiated.`),this.name="StaticClassInstantiationError"}},i=(t=>(t.Default="Default",t))(i||{}),r=class{constructor(t,n=null,e="",o="Default",i=0,r=0){this.nid=t,this.node=n,this.text=e,this.theme=o,this.x=i,this.y=r}parentElement=null;pointElement=null;lineElement=null;blockElement=null;textElement=null;validate=!1;always=!1;show=!1;lastClickTime=0;lastSp=null},a=(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))(a||{}),s=(t=>(t.WAITING="WAITING",t.LOADING="LOADING",t.LOADED="LOADED",t.ERROR="ERROR",t.CANCELED="CANCELED",t))(s||{}),u=(t=>(t.WAITING="WAITING",t.LOADING="LOADING",t.LOADED="LOADED",t.ERROR="ERROR",t.CANCELED="CANCELED",t))(u||{}),c=(t=>(t.START="START",t.PROGRESS="PROGRESS",t.LOADED="LOADED",t.ERROR="ERROR",t.CANCELED="CANCELED",t))(c||{}),E=class t{constructor(t,n,e=[],o=!1,i=0,r=0,a=!1,s,u=null,c=new Date){this.options=t,this.id=n,this.lines=e,this.showIcon=o,this.x=i,this.y=r,this.closeOnOutsideClick=a,this.theme=s,this.controller=u,this.createTime=c}static fromOptions(n,e,o){let{showIcon:i}=e;return void 0===i&&e.lines?.forEach(t=>{t.icon&&(i=!0)}),new t(e,n,o,i,e.x,e.y,e.closeOnOutsideClick,e.theme)}},l=(t=>(t.BUTTON="BUTTON",t.DIVIDER="DIVIDER",t.CHECKBOX="CHECKBOX",t.SUB="SUB",t.VIEW="VIEW",t))(l||{}),T=class t{constructor(t,n,e="BUTTON",o="",i="",r=void 0,a=void 0,s="",u=!1,c="",E=()=>{},l=()=>{},T=()=>{},f="BUTTON"===e,R=!1,A=()=>{},h=void 0,S=new Date){this.options=t,this.id=n,this.type=e,this.text=o,this.tip=i,this.icon=r,this.view=a,this.color=s,this.disabled=u,this.shortcut=c,this.onClick=E,this.onMouseOver=l,this.onMouseOut=T,this.closeAllOnClick=f,this.checkboxDefaultValue=R,this.onCheckboxChange=A,this.sub=h,this.createTime=S}static fromOptions(n,e){return new t(e,n,e.type,e.text,e.tip,e.icon,e.view,e.color,e.disabled,e.shortcut,e.onClick,e.onMouseOver,e.onMouseOut,e.closeAllOnClick,e.checkboxDefaultValue,e.onCheckboxChange,e.sub)}},f=(t=>(t.GREEN="GREEN",t.PURPLE="PURPLE",t.BLUE="BLUE",t.PINK="PINK",t))(f||{}),R=(t=>(t.LEFT="LEFT",t.CENTER="CENTER",t.RIGHT="RIGHT",t))(R||{}),A=class t{constructor(t,n,e="",o=void 0,i="",r="LEFT",a=void 0,s=void 0,u=void 0,c="BLUE",E=!1,l="",T={},f="",R="",A=!1,h="",S="",O=A,D=!1,L=()=>{},N=()=>!0,d=!0,I=()=>{},C=()=>{},m=()=>{},p=()=>{},P=()=>{},g=()=>{},y=()=>{},U=()=>{},w=()=>()=>{},M=!0,B=!0,x=!1,b=!0,G=!1,v=h,F=new Date,V=()=>{},H=new Map){this.options=t,this.id=n,this.title=e,this.titleIcon=o,this.content=i,this.contentAlign=r,this.contentView=a,this.icon=s,this.view=u,this.theme=c,this.leftMode=E,this.className=l,this.style=T,this.confirmText=f,this.cancelText=R,this.enableInput=A,this.defaultValue=h,this.inputPlaceholder=S,this.autoFocus=O,this.allowEmpty=D,this.onChange=L,this.onCheck=N,this.enableCloseButton=d,this.onConfirm=I,this.onCancel=C,this.onClose=m,this.onConfirmButtonClick=p,this.onCancelButtonClick=P,this.onOutsideClick=g,this.onCloseButtonClick=y,this.onRender=U,this.onEffect=w,this.closeOnConfirm=M,this.closeOnCancel=B,this.closeOnOutsideClick=x,this.closeOnCloseButtonClick=b,this.alignButton=G,this.inputValue=v,this.createTime=F,this.focusInput=V,this.elements=H}static fromOptions(n,e){return new t(e,n,e.title,e.titleIcon,e.content,e.contentAlign,e.contentView,e.icon,e.view,e.theme,e.leftMode,e.className,e.style,e.confirmText,e.cancelText,e.enableInput,e.defaultValue,e.inputPlaceholder,e.autoFocus,e.allowEmpty,e.onChange,e.onCheck,e.enableCloseButton,e.onConfirm,e.onCancel,e.onClose,e.onConfirmButtonClick,e.onCancelButtonClick,e.onOutsideClick,e.onCloseButtonClick,e.onRender,e.onEffect,e.closeOnConfirm,e.closeOnCancel,e.closeOnOutsideClick,e.closeOnCloseButtonClick,e.alignButton)}setHide=()=>{}},h=(t=>(t.WAITING="WAITING",t.LOADING="LOADING",t.LOADED="LOADED",t.ERROR="ERROR",t.CANCELED="CANCELED",t))(h||{}),S=(t=>(t.START="START",t.PROGRESS="PROGRESS",t.LOADED="LOADED",t.ERROR="ERROR",t.CANCELED="CANCELED",t))(S||{}),O={};((n,e)=>{for(var o in e)t(n,o,{get:e[o],enumerable:!0})})(O,{AAC:()=>W,ANIMATION:()=>x,ANY:()=>m,ATTACH_LIST:()=>Pt,AVI:()=>ot,AVIF:()=>tt,BMP:()=>K,CAMERA:()=>U,FLAC:()=>k,FLV:()=>st,GIF:()=>j,GLB:()=>b,GLTF:()=>G,GP3:()=>ct,HEIF:()=>Z,ICO:()=>Q,JPG:()=>X,JSON:()=>lt,LIGHT:()=>y,MARKDOWN:()=>Rt,MATERIAL:()=>M,MESH:()=>g,MKV:()=>Et,MOV:()=>rt,MP3:()=>V,MP4:()=>nt,MPEG:()=>it,NF:()=>Tt,OBJ:()=>F,OGG:()=>_,OGV:()=>ut,OPUS:()=>z,PNG:()=>Y,SCENE:()=>P,STL:()=>v,SUPPORT_ALL_LIST:()=>It,SUPPORT_AUDIO_LIST:()=>Dt,SUPPORT_BABYLON_LIST:()=>Ot,SUPPORT_FILE_LIST:()=>Ct,SUPPORT_IMAGE_LIST:()=>At,SUPPORT_JSON_LIST:()=>Nt,SUPPORT_MODEL_LIST:()=>ht,SUPPORT_NEXTFLOW_LIST:()=>dt,SUPPORT_RENDER_LIST:()=>mt,SUPPORT_TEXTURE_LIST:()=>pt,SUPPORT_TEXT_LIST:()=>Lt,SUPPORT_VIDEO_LIST:()=>St,SVG:()=>J,TEXTURE:()=>w,TIFF:()=>q,TXT:()=>ft,UNKNOWN:()=>p,UV:()=>B,WAV:()=>H,WMV:()=>at,WebM:()=>et,WebP:()=>$,getExtension:()=>xt,getMime:()=>Bt,getMimeByBlob:()=>gt,getMimeByBuffer:()=>wt,getMimeByPath:()=>yt,getMimeByStream:()=>Mt,getMimeByUrl:()=>Ut,isAttach:()=>$t,isBabylon:()=>_t,isMaterial:()=>jt,isSupport:()=>bt,isSupportAudio:()=>kt,isSupportFile:()=>Gt,isSupportImage:()=>vt,isSupportJson:()=>Wt,isSupportModel:()=>Ft,isSupportRender:()=>zt,isSupportText:()=>Ht,isSupportTexture:()=>Xt,isSupportVideo:()=>Vt,isTexture:()=>Yt,isUV:()=>Kt});import{AbstractMesh as D,BaseTexture as L,Material as N}from"@babylonjs/core";import{fileTypeFromBlob as d,fileTypeFromBuffer as I,fileTypeFromStream as C}from"file-type";var m="*/*",p="unknown/unknown",P="babylonjs/scene",g="babylonjs/mesh",y="babylonjs/light",U="babylonjs/camera",w="babylonjs/texture",M="babylonjs/material",B="babylonjs/uv",x="babylonjs/animation",b="model/gltf-binary",G="model/gltf+json",v="model/stl",F="model/obj",V="audio/mpeg",H="audio/wav",W="audio/aac",_="audio/ogg",k="audio/flac",z="audio/opus",X="image/jpeg",Y="image/png",j="image/gif",K="image/bmp",$="image/webp",J="image/svg+xml",q="image/tiff",Q="image/x-icon",Z="image/heif",tt="image/avif",nt="video/mp4",et="video/webm",ot="video/x-msvideo",it="video/mpeg",rt="video/quicktime",at="video/x-ms-wmv",st="video/x-flv",ut="video/ogg",ct="video/3gpp",Et="video/x-matroska",lt="application/json",Tt="nextflow/sync",ft="text/plain",Rt="text/markdown",At=[X,Y],ht=[P,b,G,v,F],St=[nt],Ot=[P,g,y,U,w,M,B,x],Dt=[V,H],Lt=[ft],Nt=[lt],dt=[Tt],It=[...At,...ht,...St,...Ot,...Dt,...Lt,...Nt],Ct=[...At,...ht,...St,...Dt,...Lt,...Nt],mt=[...At,...ht,...St,...Lt],pt=[...At,...St,w],Pt=[w,M,B];async function gt(t){if(t&&t instanceof Blob){if(t instanceof File&&t.name.endsWith(".babylon"))return P;const n=await d(t);return!n&&t instanceof File&&t.name.endsWith(".stl")?v:n?.mime??p}return p}async function yt(t){if(t){if(t.endsWith(".babylon"))return P;return(await import("mime")).default.getType(t)??p}return p}async function Ut(t){if(!t)return p;if(t.endsWith(".babylon"))return P;try{const n=await fetch(t);if(!n.body)return p;const e=await C(n.body);if(e?.mime)return e.mime;const o=new URL(t).pathname;if(o.includes("."))return await yt(o)}catch(t){console.error("getMimeByUrl",t)}return p}async function wt(t){if(t){const n=await I(t);return n?.mime??p}return p}async function Mt(t){const n=await C(t);return n?.mime??p}async function Bt(t){return t?"undefined"!=typeof ReadableStream&&t instanceof ReadableStream?Mt(t):t instanceof Blob?gt(t):"string"==typeof t?t.startsWith("http://")||t.startsWith("https://")?Ut(t):yt(t):t instanceof ArrayBuffer||t instanceof Uint8Array?wt(t):t instanceof L?w:t instanceof N?M:t instanceof D?g:p:p}async function xt(t=p){if(t===P)return"babylon";if(_t(t)||$t(t))return t;if(t===m||t===p)return"";return(await import("mime")).default.getExtension(t)??""}function bt(t=p){return t==m||t!=p&&It.includes(t)}function Gt(t=p){return t==m||t!=p&&Ct.includes(t)}function vt(t=p){return t==m||t!=p&&At.includes(t)}function Ft(t=p){return t==m||t!=p&&ht.includes(t)}function Vt(t=p){return t==m||t!=p&&St.includes(t)}function Ht(t=p){return t==m||t!=p&&Lt.includes(t)}function Wt(t=p){return t==m||t!=p&&Nt.includes(t)}function _t(t=p){return t==m||t!=p&&Ot.includes(t)}function kt(t=p){return t==m||t!=p&&Dt.includes(t)}function zt(t=p){return t==m||t!=p&&mt.includes(t)}function Xt(t=p){return t==m||t!=p&&pt.includes(t)}function Yt(t=p){return t==m||t!=p&&t==w}function jt(t=p){return t==m||t!=p&&t==M}function Kt(t=p){return t==m||t!=p&&t==B}function $t(t=p){return t==m||t!=p&&Pt.includes(t)}var Jt=(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))(Jt||{}),qt=(t=>(t.WAITING="WAITING",t.LOADING="LOADING",t.PAUSED="PAUSED",t.LOADED="LOADED",t.FAILED="FAILED",t.CANCELED="CANCELED",t))(qt||{}),Qt=(t=>(t.BLOB="BLOB",t.OBJECT="OBJECT",t))(Qt||{}),Zt=(t=>(t.WAITING="WAITING",t.UPLOADING="UPLOADING",t.PAUSED="PAUSED",t.COMPLETED="COMPLETED",t.FAILED="FAILED",t.CANCELED="CANCELED",t))(Zt||{}),tn=(t=>(t.START="START",t.PROGRESS="PROGRESS",t.PAUSE="PAUSE",t.RESUME="RESUME",t.UPLOADED="UPLOADED",t.FAILED="FAILED",t.CANCELED="CANCELED",t))(tn||{}),nn=(t=>(t.ZH="ZH",t.EN="EN",t))(nn||{}),en=(t=>(t.PENDING="PENDING",t.PROGRESSING="PROGRESSING",t.ENDED="ENDED",t.CANCELED="CANCELED",t.BANNED="BANNED",t))(en||{}),on=(t=>(t.NONE="NONE",t.SELF="SELF",t.ALL="ALL",t))(on||{}),rn=class{constructor(t,n,e,o){this.text=t,this.type=n,this.duration=e,this.id=o}show=!0;height=20;opacity=0},an=(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||{}),sn=(t=>(t.BUILT_IN="BUILT_IN",t.EXTERNAL="EXTERNAL",t.UNKNOWN="UNKNOWN",t))(sn||{}),un=(t=>(t.DISPLAY="DISPLAY",t.FULL="FULL",t.HP_BOX="HP_BOX",t.VR="VR",t.MR="MR",t))(un||{}),cn=(t=>(t.EDITOR="EDITOR",t.VIEWER="VIEWER",t.VISITOR="VISITOR",t))(cn||{}),En=(t=>(t.DEFAULT="DEFAULT",t.DESCRIPTION="DESCRIPTION",t))(En||{}),ln=(t=>(t.XS="XS",t.SM="SM",t.MD="MD",t.LG="LG",t.XL="XL",t))(ln||{}),Tn=(t=>(t.DEFAULT="DEFAULT",t.BACKGROUND="BACKGROUND",t.LIGHT="LIGHT",t.DARK="DARK",t))(Tn||{}),fn=(t=>(t.GENERAL="GENERAL",t.RHINE="RHINE",t))(fn||{}),Rn=(t=>(t.UNDO="UNDO",t.REDO="REDO",t))(Rn||{}),An=(t=>(t.ADD="ADD",t.REMOVE="REMOVE",t))(An||{}),hn=(t=>(t.OSS="OSS",t.URL="URL",t))(hn||{}),Sn=(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))(Sn||{}),On=(t=>(t.BASIC="BASIC",t.PROVIDE="PROVIDE",t.UPLOAD="UPLOAD",t))(On||{}),Dn=(t=>(t.NONE="NONE",t.INSTALL="INSTALL",t.ENABLE="ENABLE",t.OPEN="OPEN",t))(Dn||{}),Ln=(t=>(t.LATEST_STABLE="LATEST_STABLE",t.LATEST_NIGHTLY="LATEST_NIGHTLY",t.LATEST_CANARY="LATEST_CANARY",t))(Ln||{}),Nn=(t=>(t.TEXTURE="TEXTURE",t.MATERIAL="MATERIAL",t.UV="UV",t))(Nn||{}),dn=(t=>(t.FILE="FILE",t.ATTACH="ATTACH",t))(dn||{}),In=(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))(In||{}),Cn=(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))(Cn||{}),mn=(t=>(t.ADD="ADD",t.REMOVE="REMOVE",t))(mn||{}),pn=(t=>(t.SYNC="SYNC",t.STEP="STEP",t.SELECT="SELECT",t.ADD="ADD",t.UPDATE="UPDATE",t.DELETE="DELETE",t))(pn||{}),Pn=(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))(Pn||{}),gn=(t=>(t.BUTTON="BUTTON",t.SWITCH="SWITCH",t.DRAWER="DRAWER",t.DIALOG="DIALOG",t.CONTENT="CONTENT",t.WINDOW="WINDOW",t.SERVICE="SERVICE",t))(gn||{});var yn={computeSHA256:async function(t){const n=await crypto.subtle.digest("SHA-256",t);return Array.from(new Uint8Array(n)).map(t=>t.toString(16).padStart(2,"0")).join("")}};var Un={recursPathValue:function(t,n){const e=[];return e.push({path:t,value:n}),e}};function wn(t){const n=Math.floor(t).toString().length<=1?2:1;return t.toFixed(n)}async function Mn(t){if(t.size<=1048576){const n=await t.arrayBuffer();return yn.computeSHA256(n)}const n=[.25,.5,.75].map(n=>Math.floor(t.size*n)),e=await Promise.all(n.map(async n=>{const e=n,o=Math.min(e+65536,t.size),i=t.slice(e,o),r=await i.arrayBuffer();return yn.computeSHA256(r)})),o=new TextEncoder,i=e.join(""),r=o.encode(i);return yn.computeSHA256(r)}var Bn={to3n:wn,convertBytesToHigherUnit:function(t){const n=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];let e=0;for(;t>=1024&&e<n.length-1;)t/=1024,e++;let o=wn(t);return o.endsWith(".0")&&(o=o.slice(0,-2)),o.endsWith(".00")&&(o=o.slice(0,-3)),`${o} ${n[e]}`},splitName:function(t){const n=t.lastIndexOf(".");return-1===n?[t,""]:[t.substring(0,n),t.substring(n+1)]},ensureFileArray:function(t){return t?t instanceof File?[t]:t instanceof FileList?Array.from(t):t:[]},chunkHash:Mn,isSameFile:async function(t,n,e,o){if(n===t.name&&e===t.size){if(!o)return!0;if(o===await Mn(t))return!0}return!1},getFileInfo:async function(t){const n=await fetch(t,{method:"HEAD"});if(!n.ok)throw new Error(`HEAD request failed with status: ${String(n.status)}`);const e=n.headers.get("Content-Length");let o;if(e){if(o=parseInt(e,10),isNaN(o))throw new Error("Invalid file size from header")}else{const n=await fetch(t);if(!n.ok)throw new Error(`GET request failed with status: ${String(n.status)}`);o=(await n.blob()).size}return{name:new URL(t).pathname.split("/").pop()??"unknown",size:o}}};var xn={toDegrees:function(t){return t*(180/Math.PI)},toRadians:function(t){return t*(Math.PI/180)},approximatelyEqual:function(t,n,e=1e-6){return Math.abs(t-n)<e},getDistance:function(t,n,e,o){return Math.sqrt((e-t)**2+(o-n)**2)},getDistance3d:function(t,n,e,o,i,r){return Math.sqrt((o-t)**2+(i-n)**2+(r-e)**2)},getNearestNumberIndex:function(t,n){let e=1/0,o=-1;for(let i=0;i<n.length;i++){const r=Math.abs(t-n[i]);r<e&&(e=r,o=i)}return o}};function bn(t){if(t.type.includes("touch")){const n=t;if(n.touches.length){const t=n.touches[0];return[t.clientX,t.clientY]}const e=n.changedTouches[0];return[e.clientX,e.clientY]}const n=t;return[n.clientX,n.clientY]}var Gn={getEventPosition:bn,getDistanceBetweenEvents:function(t,n){const[e,o]=bn(t),[i,r]=bn(n);return xn.getDistance(e,o,i,r)},preventDefaultListener:function(t){t.preventDefault()},stopPropagationListener:function(t){t.stopPropagation()},preventDefaultStopPropagationListener:function(t){t.preventDefault(),t.stopPropagation()}};var vn={fetchJsonWithRetry:async function(t,n=3){let e;for(let o=0;o<n;o++)try{const n=await fetch(t);if(!n.ok)throw new Error(`HTTP Error: Status ${n.status.toString()}`);return await n.json()}catch(n){e=n,console.log(`Attempt ${(o+1).toString()} Failed: Retrying...\n${t}`)}throw e},fetchBlobWithRetry:async function(t,n=3){let e;for(let o=0;o<n;o++)try{const n=await fetch(t);if(!n.ok)throw new Error(`HTTP Error: Status ${n.status.toString()}`);return await n.blob()}catch(n){e=n,console.log(`Attempt ${(o+1).toString()} Failed: Retrying...\n${t}`)}throw e}};function Fn(t,n){const e=10**n;return Math.round(t*e)/e}var Vn={roundToX:Fn,r2:function(t){return Fn(t,2)},r3:function(t){return Fn(t,3)},isValidNumber:function(t){return"number"==typeof t&&!isNaN(t)&&isFinite(t)}};var Hn={getPageTypeBySpaceText:function(t){return"space"===t?"EDITOR":"m"===t?"VISITOR":"VIEWER"},getSearchParams:function(t){return new URLSearchParams(window.location.search).get(t)??void 0}};function Wn(t){const n=[];for(const e of t.split(".")){const t=parseInt(e,10);isNaN(t)||e!==t.toString()?n.push(e):n.push(t)}return n}function _n(t){return t.join(".")}function kn(t){return"string"==typeof t?Wn(t):t}var zn={makeRvPath:Wn,makeRvPathString:_n,ensureRvPath:kn,ensureRvPathString:function(t){return"string"!=typeof t?_n(t):t},getByRvPath:function(t,n){const e=kn(n);let o=t;for(const t of e){if(null==o)return;o=o[t]}return o},setByRvPath:function(t,n,e){const o=kn(n);let i=t;for(let t=0;t<o.length-1;t++)i=i[o[t]];i[o[o.length-1]]=e},checkRvPathOverlay:function(t,n){const e=kn(t),o=kn(n),i=e.length>o.length?o.length:e.length;for(let t=0;t<i;t++)if(e[t]!=o[t])return!1;return!0}};function Xn(t){return new Promise(n=>{setTimeout(n,t)})}function Yn(t,n){if(0===n)return t;let e,o,i=0,r=null;function a(){i=Date.now(),e&&t.apply(o,e)}return function(...t){const s=Date.now()-i;e=t,o=this,0!==i?(r&&(clearTimeout(r),r=null),s<n?r=setTimeout(()=>{a(),r=null},n-s):a()):setTimeout(a,1)}}var jn={convertTimeText:function(t){const n=Math.floor(t/3600),e=Math.floor(t%3600/60),o=Math.floor(t%60);return[n>0?String(n).padStart(2,"0"):null,String(e).padStart(2,"0"),String(o).padStart(2,"0")].filter(Boolean).join(":")},formatDateTo17Digits:function(t=new Date){return t.getFullYear().toString()+(t.getMonth()+1).toString().padStart(2,"0")+t.getDate().toString().padStart(2,"0")+t.getHours().toString().padStart(2,"0")+t.getMinutes().toString().padStart(2,"0")+t.getSeconds().toString().padStart(2,"0")+t.getMilliseconds().toString().padStart(3,"0")},formatDuration:function(t,n){const e=n-t,o=Math.floor(e/1e3),i=Math.floor(o/3600),r=Math.floor(o%3600/60),a=o%60;return`${i>0?`${i.toString().padStart(2,"0")}:`:""}${r.toString().padStart(2,"0")}:${a.toString().padStart(2,"0")}`}};async function Kn(t){try{return await navigator.clipboard.writeText(t),!0}catch{return!1}}var $n={getParam:function(t){const n=new RegExp(`(^|&)${t}=([^&]*)(&|$)`,"i"),e=window.location.search.substring(1).match(n);return null!=e?decodeURIComponent(e[2]):""},getHashParam:function(t){const n=new RegExp(`(^|&)${t}=([^&]*)(&|$)`,"i"),e=window.location.hash.substring(1).match(n);return null!=e?decodeURIComponent(e[2]):""},check:function(t){return new RegExp("^(?!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]*)?$","i").test(t)},copyCurrentUrlToClipboard:async function(){return Kn(window.location.href)},copyText:async function(t){try{return await navigator.clipboard.writeText(t),!0}catch{return!1}},trySetClipboard:Kn,extractFilenameFromUrl:function(t,n=!0){try{const e=new URL(t),o=e.pathname.split("/").pop()??"";return!n&&o.includes(".")?o.substring(0,o.lastIndexOf(".")):o}catch{return""}}};import{Quaternion as Jn,Vector3 as qn}from"@babylonjs/core";function Qn(t){return{x:180*t.x/Math.PI,y:180*t.y/Math.PI,z:180*t.z/Math.PI}}function Zn(t){return new Jn(t.x,t.y,t.z,t.w)}function te(t){return"w"in t}var ne={xyToArray:function(t,n=-1,e=[0,0]){return t?-1===n?[t.x,t.y]:[Vn.roundToX(t.x,n),Vn.roundToX(t.y,n)]:e},xyzToArray:function(t,n=-1,e=[0,0,0]){return t?-1===n?[t.x,t.y,t.z]:[Vn.roundToX(t.x,n),Vn.roundToX(t.y,n),Vn.roundToX(t.z,n)]:e},xyzwToArray:function(t,n=-1,e=[0,0,0,0]){return t?-1===n?[t.x,t.y,t.z,t.w]:[Vn.roundToX(t.x,n),Vn.roundToX(t.y,n),Vn.roundToX(t.z,n),Vn.roundToX(t.w,n)]:e},scaleV3:function(t,n){return{x:n.x*t,y:n.y*t,z:n.z*t}},radiansToDegrees:Qn,degreeToRadians:function(t){return{x:t.x*Math.PI/180,y:t.y*Math.PI/180,z:t.z*Math.PI/180}},radiansToQuaternion:function(t){return Jn.RotationYawPitchRoll(t.y,t.x,t.z)},degreesToQuaternion:function(t){return Jn.RotationYawPitchRoll(t.y*Math.PI/180,t.x*Math.PI/180,t.z*Math.PI/180)},toVector3:function(t){return new qn(t.x,t.y,t.z)},fromVector3:function(t){return{x:t.x,y:t.y,z:t.z}},withRound:function(t,n=0){return{x:Vn.roundToX(t.x,n),y:Vn.roundToX(t.y,n),z:Vn.roundToX(t.z,n)}},isFiniteVector:function(t){return isFinite(t.x)&&isFinite(t.y)&&isFinite(t.z)},noZero:function(t){return 0!==t.x&&0!==t.y&&0!==t.z},scaleV4:function(t,n){return{x:n.x*t,y:n.y*t,z:n.z*t,w:n.w*t}},toQuaternionVector:Zn,toEulerRadians:function(t){return Zn(t).toEulerAngles()},toEulerDegrees:function(t){return Qn(Zn(t).toEulerAngles())},toArray:function(t){return te(t)?[t.x,t.y,t.z,t.w]:[t.x,t.y,t.z]},fromQuaternion:function(t){return{x:t.x,y:t.y,z:t.z,w:t.w}},toArrayWithRound4:function(t,n=0){return te(t)?[Vn.roundToX(t.x,n),Vn.roundToX(t.y,n),Vn.roundToX(t.z,n),Vn.roundToX(t.w,n)]:[Vn.roundToX(t.x,n),Vn.roundToX(t.y,n),Vn.roundToX(t.z,n)]}};export{O as AcceptMime,E as ContextMenu,yn as CryptoUtils,Un as DataUtils,A as Dialog,R as DialogContentAlign,e as DomNotFoundError,Dn as EnableLevel,Bn as FileUtils,c as FirstLoadModelServiceEventType,u as FirstLoadModelServiceStatus,S as FirstLoadServiceEventType,h as FirstLoadServiceStatus,En as FocusMode,Rn as HistoryServiceEventType,Pn as IconPluginPosition,r as LabelInfo,i as LabelTheme,Jt as LocalDataServiceEventType,qt as LocalDataStatus,Qt as LocalDataType,nn as Locale,xn as MathUtils,en as MeetingStatus,T as MenuLine,l as MenuLineType,rn as Message,Gn as NativeEventUtils,vn as NetworkUtils,n as NotFoundError,Vn as NumberUtils,Zt as OssUploadInstanceStatus,tn as OssUploadServiceEventType,un as PageMode,cn as PageType,Hn as PageUtils,an as PluginEventType,sn as PluginFrom,gn as PluginType,a as RsModelServiceEventType,s as RsModelStatus,Nn as RvAttachType,Sn as RvBasicType,An as RvFileServiceEventType,hn as RvFileType,In as RvMaterialType,On as RvModelOrigin,Cn as RvPresetType,mn as RvResourceServiceEventType,dn as RvResourceType,zn as RvUtils,ln as ScreenSize,on as ShareMode,o as StaticClassInstantiationError,pn as TChangeType,Tn as ThemeBackground,f as ThemeColor,fn as ThemeShape,jn as TimeUtils,$n as UrlUtils,ne as VectorUtils,Ln as VersionPoint,Xn as sleep,Yn as throttle};
|
package/package.json
CHANGED