next-flow-interface 0.16.8 → 0.16.9
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 +41 -38
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -191,6 +191,7 @@ interface DialogCreateOptions {
|
|
|
191
191
|
title?: string;
|
|
192
192
|
titleIcon?: FunctionComponent;
|
|
193
193
|
content?: string;
|
|
194
|
+
contentAlign?: DialogContentAlign;
|
|
194
195
|
contentView?: FunctionComponent;
|
|
195
196
|
icon?: FunctionComponent;
|
|
196
197
|
view?: FunctionComponent;
|
|
@@ -234,12 +235,18 @@ interface DialogController {
|
|
|
234
235
|
focusInput(): void;
|
|
235
236
|
}
|
|
236
237
|
|
|
238
|
+
declare enum DialogContentAlign {
|
|
239
|
+
LEFT = "LEFT",
|
|
240
|
+
CENTER = "CENTER",
|
|
241
|
+
RIGHT = "RIGHT"
|
|
242
|
+
}
|
|
237
243
|
declare class Dialog {
|
|
238
244
|
options: DialogCreateOptions;
|
|
239
245
|
id: string;
|
|
240
246
|
title: string;
|
|
241
247
|
titleIcon: FunctionComponent | undefined;
|
|
242
248
|
content: string;
|
|
249
|
+
contentAlign: DialogContentAlign;
|
|
243
250
|
contentView: FunctionComponent | undefined;
|
|
244
251
|
icon: FunctionComponent | undefined;
|
|
245
252
|
view: FunctionComponent | undefined;
|
|
@@ -275,7 +282,7 @@ declare class Dialog {
|
|
|
275
282
|
inputValue: string;
|
|
276
283
|
createTime: Date;
|
|
277
284
|
focusInput: () => void;
|
|
278
|
-
constructor(options: DialogCreateOptions, id: string, title?: string, titleIcon?: FunctionComponent | undefined, content?: string, contentView?: FunctionComponent | undefined, icon?: FunctionComponent | undefined, view?: FunctionComponent | 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, controller?: DialogController | null, inputValue?: string, createTime?: Date, focusInput?: () => void);
|
|
285
|
+
constructor(options: DialogCreateOptions, id: string, title?: string, titleIcon?: FunctionComponent | undefined, content?: string, contentAlign?: DialogContentAlign, contentView?: FunctionComponent | undefined, icon?: FunctionComponent | undefined, view?: FunctionComponent | 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, controller?: DialogController | null, inputValue?: string, createTime?: Date, focusInput?: () => void);
|
|
279
286
|
static fromOptions(id: string, options: DialogCreateOptions): Dialog;
|
|
280
287
|
setHide: (value: boolean) => void;
|
|
281
288
|
}
|
|
@@ -706,46 +713,11 @@ interface RvCameraLocation {
|
|
|
706
713
|
target: V3;
|
|
707
714
|
}
|
|
708
715
|
|
|
709
|
-
interface RvAwarenessUser {
|
|
710
|
-
name: string;
|
|
711
|
-
color: string;
|
|
712
|
-
avatar: string;
|
|
713
|
-
uuid: string;
|
|
714
|
-
}
|
|
715
|
-
interface RvAwarenessDevice {
|
|
716
|
-
platform: string;
|
|
717
|
-
}
|
|
718
|
-
interface RvAwarenessClick {
|
|
719
|
-
position: V3;
|
|
720
|
-
time: number;
|
|
721
|
-
}
|
|
722
|
-
interface RvAwarenessState {
|
|
723
|
-
timestamp: number;
|
|
724
|
-
sid: string;
|
|
725
|
-
mid: string;
|
|
726
|
-
selected: string[];
|
|
727
|
-
camera: RvCameraLocation;
|
|
728
|
-
clicks: RvAwarenessClick[];
|
|
729
|
-
window: {
|
|
730
|
-
innerWidth: number;
|
|
731
|
-
innerHeight: number;
|
|
732
|
-
};
|
|
733
|
-
cursor: V3;
|
|
734
|
-
openedDrawers: string[];
|
|
735
|
-
}
|
|
736
|
-
interface RvAwareness {
|
|
737
|
-
clientId: number;
|
|
738
|
-
user: RvAwarenessUser;
|
|
739
|
-
device: RvAwarenessDevice;
|
|
740
|
-
state: RvAwarenessState;
|
|
741
|
-
}
|
|
742
|
-
|
|
743
716
|
interface CameraLocationAnimationApi {
|
|
744
717
|
cameraAnimation: AnimationGroup | null;
|
|
745
718
|
play(data: RvCameraLocation, duration?: number, enableNear?: boolean): void;
|
|
746
719
|
playEasy(data: RvCameraLocation, duration?: number): void;
|
|
747
720
|
makeCameraAnimationsEase(data: RvCameraLocation, duration?: number): Animation[];
|
|
748
|
-
goToAwarenessState: (state: RvAwareness) => void;
|
|
749
721
|
}
|
|
750
722
|
|
|
751
723
|
interface FogAnimationApi {
|
|
@@ -1663,12 +1635,43 @@ interface ThemeServiceApi {
|
|
|
1663
1635
|
updateBackgroundByColor(color: string): void;
|
|
1664
1636
|
}
|
|
1665
1637
|
|
|
1638
|
+
interface RvAwarenessUser {
|
|
1639
|
+
name: string;
|
|
1640
|
+
color: string;
|
|
1641
|
+
avatar: string;
|
|
1642
|
+
uuid: string;
|
|
1643
|
+
}
|
|
1644
|
+
interface RvAwarenessDevice {
|
|
1645
|
+
platform: string;
|
|
1646
|
+
}
|
|
1647
|
+
interface RvAwarenessClick {
|
|
1648
|
+
position: V3;
|
|
1649
|
+
time: number;
|
|
1650
|
+
}
|
|
1651
|
+
interface RvAwarenessWindow {
|
|
1652
|
+
innerWidth: number;
|
|
1653
|
+
innerHeight: number;
|
|
1654
|
+
}
|
|
1655
|
+
interface RvAwareness {
|
|
1656
|
+
clientId: number;
|
|
1657
|
+
user: RvAwarenessUser;
|
|
1658
|
+
device: RvAwarenessDevice;
|
|
1659
|
+
sid: string;
|
|
1660
|
+
mid: string;
|
|
1661
|
+
selected: string[];
|
|
1662
|
+
camera: RvCameraLocation;
|
|
1663
|
+
clicks: RvAwarenessClick[];
|
|
1664
|
+
window: RvAwarenessWindow;
|
|
1665
|
+
cursor: V3;
|
|
1666
|
+
openedDrawers: string[];
|
|
1667
|
+
}
|
|
1668
|
+
|
|
1666
1669
|
type AwarenessChangeSubscriber = (allAwareness: Map<number, RvAwareness>) => void;
|
|
1667
1670
|
interface AwarenessServiceApi {
|
|
1668
1671
|
subscribeChange: (subscriber: AwarenessChangeSubscriber) => (() => void);
|
|
1669
1672
|
unsubscribeChange: (subscriber: AwarenessChangeSubscriber) => void;
|
|
1670
1673
|
states: Map<number, RvAwareness>;
|
|
1671
|
-
|
|
1674
|
+
getCurrentRvAwareness(): RvAwareness;
|
|
1672
1675
|
}
|
|
1673
1676
|
|
|
1674
1677
|
declare enum RvFileType {
|
|
@@ -3092,4 +3095,4 @@ declare const VectorUtils: {
|
|
|
3092
3095
|
toArrayWithRound4: typeof toArrayWithRound4;
|
|
3093
3096
|
};
|
|
3094
3097
|
|
|
3095
|
-
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 AwarenessServiceApi, type BasePlugin, type BasePluginConfig, type BuiltInPluginConfig, type C3, type C4, type CameraConfigurationAnimationApi, type CameraLocationAnimationApi, ContextMenu, type ContextMenuController, type ContextMenuCreateOptions, type ContextMenuProps, type ContextMenuServiceApi, CryptoUtils, DataUtils, Dialog, type DialogController, type DialogCreateOptions, type DialogPlugin, type DialogProps, type DialogServiceApi, type DivProps, type DivPropsSimple, type DrawerPlugin, type EasyPropertyAnimationApi, 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 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 Meeting, type MeetingServiceApi, MeetingStatus, MenuLine, type MenuLineCreateOptions, MenuLineType, Message, type MessageServiceApi, type MessageState, type MessageType, type ModulePreloaderApi, 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, NumberUtils, type OssUploadInstance, OssUploadInstanceStatus, type OssUploadServiceApi, OssUploadServiceEventType, type OssUploadServiceSubscriber, type Page, PageMode, PageType, PageUtils, type PluginConfig, type PluginConnectorApi, type PluginContainerServiceApi, PluginEventType, PluginFrom, 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 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
|
|
3098
|
+
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 AwarenessServiceApi, type BasePlugin, type BasePluginConfig, type BuiltInPluginConfig, type C3, type C4, type CameraConfigurationAnimationApi, type CameraLocationAnimationApi, ContextMenu, type ContextMenuController, type ContextMenuCreateOptions, type ContextMenuProps, type ContextMenuServiceApi, CryptoUtils, DataUtils, Dialog, DialogContentAlign, type DialogController, type DialogCreateOptions, type DialogPlugin, type DialogProps, type DialogServiceApi, type DivProps, type DivPropsSimple, type DrawerPlugin, type EasyPropertyAnimationApi, 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 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 Meeting, type MeetingServiceApi, MeetingStatus, MenuLine, type MenuLineCreateOptions, MenuLineType, Message, type MessageServiceApi, type MessageState, type MessageType, type ModulePreloaderApi, 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, NumberUtils, type OssUploadInstance, OssUploadInstanceStatus, type OssUploadServiceApi, OssUploadServiceEventType, type OssUploadServiceSubscriber, type Page, PageMode, PageType, PageUtils, type PluginConfig, type PluginConnectorApi, type PluginContainerServiceApi, PluginEventType, PluginFrom, 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 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, 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, 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 UserAuth, type UserInfo, type UserServiceApi, type V2, type V3, type V4, VectorUtils, type ViewPlugin, sleep, throttle };
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var t=Object.defineProperty,n=(t=>(t.Default="Default",t))(n||{}),e=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},o=(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))(o||{}),i=(t=>(t.WAITING="WAITING",t.LOADING="LOADING",t.LOADED="LOADED",t.ERROR="ERROR",t.CANCELED="CANCELED",t))(i||{}),r=(t=>(t.WAITING="WAITING",t.LOADING="LOADING",t.LOADED="LOADED",t.ERROR="ERROR",t.CANCELED="CANCELED",t))(r||{}),a=(t=>(t.START="START",t.PROGRESS="PROGRESS",t.LOADED="LOADED",t.ERROR="ERROR",t.CANCELED="CANCELED",t))(a||{}),s=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)}},u=(t=>(t.BUTTON="BUTTON",t.DIVIDER="DIVIDER",t.CHECKBOX="CHECKBOX",t.SUB="SUB",t.VIEW="VIEW",t))(u||{}),c=class t{constructor(t,n,e="BUTTON",o="",i="",r=void 0,a=void 0,s="",u=!1,c="",l=()=>{},E=()=>{},f=()=>{},T="BUTTON"===e,R=!1,h=()=>{},A=void 0,O=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=l,this.onMouseOver=E,this.onMouseOut=f,this.closeAllOnClick=T,this.checkboxDefaultValue=R,this.onCheckboxChange=h,this.sub=A,this.createTime=O}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)}},l=(t=>(t.GREEN="GREEN",t.PURPLE="PURPLE",t.BLUE="BLUE",t.PINK="PINK",t))(l||{}),E=class t{constructor(t,n,e="",o=void 0,i="",r=void 0,a=void 0,s=void 0,u="BLUE",c=!1,l="",E={},f="",T="",R=!1,h="",A="",O=R,S=!1,D=()=>{},L=()=>!0,d=!0,I=()=>{},N=()=>{},p=()=>{},m=()=>{},P=()=>{},C=()=>{},g=()=>{},y=()=>{},U=()=>()=>{},w=!0,M=!0,B=!1,x=!0,G=!0,v=null,b=h,V=new Date,F=()=>{}){this.options=t,this.id=n,this.title=e,this.titleIcon=o,this.content=i,this.contentView=r,this.icon=a,this.view=s,this.theme=u,this.leftMode=c,this.className=l,this.style=E,this.confirmText=f,this.cancelText=T,this.enableInput=R,this.defaultValue=h,this.inputPlaceholder=A,this.autoFocus=O,this.allowEmpty=S,this.onChange=D,this.onCheck=L,this.enableCloseButton=d,this.onConfirm=I,this.onCancel=N,this.onClose=p,this.onConfirmButtonClick=m,this.onCancelButtonClick=P,this.onOutsideClick=C,this.onCloseButtonClick=g,this.onRender=y,this.onEffect=U,this.closeOnConfirm=w,this.closeOnCancel=M,this.closeOnOutsideClick=B,this.closeOnCloseButtonClick=x,this.alignButton=G,this.controller=v,this.inputValue=b,this.createTime=V,this.focusInput=F}static fromOptions(n,e){return new t(e,n,e.title,e.titleIcon,e.content,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=()=>{}},f=(t=>(t.WAITING="WAITING",t.LOADING="LOADING",t.LOADED="LOADED",t.ERROR="ERROR",t.CANCELED="CANCELED",t))(f||{}),T=(t=>(t.START="START",t.PROGRESS="PROGRESS",t.LOADED="LOADED",t.ERROR="ERROR",t.CANCELED="CANCELED",t))(T||{}),R={};((n,e)=>{for(var o in e)t(n,o,{get:e[o],enumerable:!0})})(R,{AAC:()=>v,ANIMATION:()=>y,ANY:()=>d,ATTACH_LIST:()=>Lt,AVI:()=>Q,AVIF:()=>$,BMP:()=>z,CAMERA:()=>m,FLAC:()=>V,FLV:()=>et,GIF:()=>k,GLB:()=>U,GLTF:()=>w,GP3:()=>it,HEIF:()=>j,ICO:()=>K,JPG:()=>H,JSON:()=>at,LIGHT:()=>p,MARKDOWN:()=>ut,MATERIAL:()=>C,MESH:()=>N,MKV:()=>rt,MOV:()=>tt,MP3:()=>x,MP4:()=>J,MPEG:()=>Z,OBJ:()=>B,OGG:()=>b,OGV:()=>ot,OPUS:()=>F,PNG:()=>W,STL:()=>M,SUPPORT_ALL_LIST:()=>At,SUPPORT_AUDIO_LIST:()=>Tt,SUPPORT_BABYLON_LIST:()=>ft,SUPPORT_FILE_LIST:()=>Ot,SUPPORT_IMAGE_LIST:()=>ct,SUPPORT_JSON_LIST:()=>ht,SUPPORT_MODEL_LIST:()=>lt,SUPPORT_RENDER_LIST:()=>St,SUPPORT_TEXTURE_LIST:()=>Dt,SUPPORT_TEXT_LIST:()=>Rt,SUPPORT_VIDEO_LIST:()=>Et,SVG:()=>_,TEXTURE:()=>P,TIFF:()=>Y,TXT:()=>st,UNKNOWN:()=>I,UV:()=>g,WAV:()=>G,WMV:()=>nt,WebM:()=>q,WebP:()=>X,getExtension:()=>Ct,getMime:()=>Pt,getMimeByBlob:()=>dt,getMimeByBuffer:()=>pt,getMimeByPath:()=>It,getMimeByStream:()=>mt,getMimeByUrl:()=>Nt,isAttach:()=>kt,isBabylon:()=>Gt,isMaterial:()=>Ht,isSupport:()=>gt,isSupportAudio:()=>vt,isSupportFile:()=>yt,isSupportImage:()=>Ut,isSupportJson:()=>xt,isSupportModel:()=>wt,isSupportRender:()=>bt,isSupportText:()=>Bt,isSupportTexture:()=>Vt,isSupportVideo:()=>Mt,isTexture:()=>Ft,isUV:()=>Wt});import{AbstractMesh as h,BaseTexture as A,Material as O}from"@babylonjs/core";import{fileTypeFromBlob as S,fileTypeFromBuffer as D,fileTypeFromStream as L}from"file-type";var d="*/*",I="unknown/unknown",N="babylonjs/mesh",p="babylonjs/light",m="babylonjs/camera",P="babylonjs/texture",C="babylonjs/material",g="babylonjs/uv",y="babylonjs/animation",U="model/gltf-binary",w="model/gltf+json",M="model/stl",B="model/obj",x="audio/mpeg",G="audio/wav",v="audio/aac",b="audio/ogg",V="audio/flac",F="audio/opus",H="image/jpeg",W="image/png",k="image/gif",z="image/bmp",X="image/webp",_="image/svg+xml",Y="image/tiff",K="image/x-icon",j="image/heif",$="image/avif",J="video/mp4",q="video/webm",Q="video/x-msvideo",Z="video/mpeg",tt="video/quicktime",nt="video/x-ms-wmv",et="video/x-flv",ot="video/ogg",it="video/3gpp",rt="video/x-matroska",at="application/json",st="text/plain",ut="text/markdown",ct=[H,W],lt=[U,w,M,B],Et=[J],ft=[N,p,m,P,C,g,y],Tt=[x,G],Rt=[st],ht=[at],At=[...ct,...lt,...Et,...ft,...Tt,...Rt,...ht],Ot=[...ct,...lt,...Et,...Tt,...Rt,...ht],St=[...ct,...lt,...Et,...Rt],Dt=[...ct,...Et,P],Lt=[P,C,g];async function dt(t){if(t&&t instanceof Blob){const n=await S(t);return!n&&t instanceof File&&t.name.endsWith(".stl")?M:n?.mime??I}return I}async function It(t){if(t){return(await import("mime")).default.getType(t)??I}return I}async function Nt(t){if(!t)return I;try{const n=await fetch(t);if(!n.body)return I;const e=await L(n.body);if(e?.mime)return e.mime;const o=new URL(t).pathname;if(o.includes("."))return await It(o)}catch(t){console.error("getMimeByUrl",t)}return I}async function pt(t){if(t){const n=await D(t);return n?.mime??I}return I}async function mt(t){const n=await L(t);return n?.mime??I}async function Pt(t){return t?"undefined"!=typeof ReadableStream&&t instanceof ReadableStream?mt(t):t instanceof Blob?dt(t):"string"==typeof t?t.startsWith("http://")||t.startsWith("https://")?Nt(t):It(t):t instanceof ArrayBuffer||t instanceof Uint8Array?pt(t):t instanceof A?P:t instanceof O?C:t instanceof h?N:I:I}async function Ct(t=I){if(Gt(t)||kt(t))return t;if(t===d||t===I)return"";return(await import("mime")).default.getExtension(t)??""}function gt(t=I){return t==d||t!=I&&At.includes(t)}function yt(t=I){return t==d||t!=I&&Ot.includes(t)}function Ut(t=I){return t==d||t!=I&&ct.includes(t)}function wt(t=I){return t==d||t!=I&<.includes(t)}function Mt(t=I){return t==d||t!=I&&Et.includes(t)}function Bt(t=I){return t==d||t!=I&&Rt.includes(t)}function xt(t=I){return t==d||t!=I&&ht.includes(t)}function Gt(t=I){return t==d||t!=I&&ft.includes(t)}function vt(t=I){return t==d||t!=I&&Tt.includes(t)}function bt(t=I){return t==d||t!=I&&St.includes(t)}function Vt(t=I){return t==d||t!=I&&Dt.includes(t)}function Ft(t=I){return t==d||t!=I&&t==P}function Ht(t=I){return t==d||t!=I&&t==C}function Wt(t=I){return t==d||t!=I&&t==g}function kt(t=I){return t==d||t!=I&&Lt.includes(t)}var zt=(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))(zt||{}),Xt=(t=>(t.WAITING="WAITING",t.LOADING="LOADING",t.PAUSED="PAUSED",t.LOADED="LOADED",t.FAILED="FAILED",t.CANCELED="CANCELED",t))(Xt||{}),_t=(t=>(t.BLOB="BLOB",t.OBJECT="OBJECT",t))(_t||{}),Yt=(t=>(t.WAITING="WAITING",t.UPLOADING="UPLOADING",t.PAUSED="PAUSED",t.COMPLETED="COMPLETED",t.FAILED="FAILED",t.CANCELED="CANCELED",t))(Yt||{}),Kt=(t=>(t.START="START",t.PROGRESS="PROGRESS",t.PAUSE="PAUSE",t.RESUME="RESUME",t.UPLOADED="UPLOADED",t.FAILED="FAILED",t.CANCELED="CANCELED",t))(Kt||{}),jt=(t=>(t.ZH="ZH",t.EN="EN",t))(jt||{}),$t=(t=>(t.NONE="NONE",t.WAITING="WAITING",t.PROGRESSING="PROGRESSING",t.ENDED="ENDED",t.REMOVED="REMOVED",t.BANNED="BANNED",t))($t||{}),Jt=(t=>(t.NONE="NONE",t.SELF="SELF",t.ALL="ALL",t))(Jt||{}),qt=class{constructor(t,n,e,o){this.text=t,this.type=n,this.duration=e,this.id=o}show=!0;height=20;opacity=0},Qt=(t=>(t.ADD="ADD",t.INSTALL="INSTALL",t.ENABLE="ENABLE",t.DISABLE="DISABLE",t.UNINSTALL="UNINSTALL",t))(Qt||{}),Zt=(t=>(t.BUILT_IN="BUILT_IN",t.EXTERNAL="EXTERNAL",t.UNKNOWN="UNKNOWN",t))(Zt||{}),tn=(t=>(t.DISPLAY="DISPLAY",t.FULL="FULL",t.HP_BOX="HP_BOX",t.VR="VR",t.MR="MR",t))(tn||{}),nn=(t=>(t.EDITOR="EDITOR",t.VIEWER="VIEWER",t.VISITOR="VISITOR",t))(nn||{}),en=(t=>(t.DEFAULT="DEFAULT",t.DESCRIPTION="DESCRIPTION",t))(en||{}),on=(t=>(t.XS="XS",t.SM="SM",t.MD="MD",t.LG="LG",t.XL="XL",t))(on||{}),rn=(t=>(t.DEFAULT="DEFAULT",t.BACKGROUND="BACKGROUND",t.LIGHT="LIGHT",t.DARK="DARK",t))(rn||{}),an=(t=>(t.GENERAL="GENERAL",t.RHINE="RHINE",t))(an||{}),sn=(t=>(t.UNDO="UNDO",t.REDO="REDO",t))(sn||{}),un=(t=>(t.ADD="ADD",t.REMOVE="REMOVE",t))(un||{}),cn=(t=>(t.OSS="OSS",t.URL="URL",t))(cn||{}),ln=(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||{}),En=(t=>(t.BASIC="BASIC",t.PROVIDE="PROVIDE",t.UPLOAD="UPLOAD",t))(En||{}),fn=(t=>(t.TEXTURE="TEXTURE",t.MATERIAL="MATERIAL",t.UV="UV",t))(fn||{}),Tn=(t=>(t.FILE="FILE",t.ATTACH="ATTACH",t))(Tn||{}),Rn=(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))(Rn||{}),hn=(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))(hn||{}),An=(t=>(t.ADD="ADD",t.REMOVE="REMOVE",t))(An||{}),On=(t=>(t.SYNC="SYNC",t.STEP="STEP",t.SELECT="SELECT",t.ADD="ADD",t.UPDATE="UPDATE",t.DELETE="DELETE",t))(On||{}),Sn=(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))(Sn||{}),Dn=(t=>(t.BUTTON="BUTTON",t.SWITCH="SWITCH",t.DRAWER="DRAWER",t.DIALOG="DIALOG",t.CONTENT="CONTENT",t.WINDOW="WINDOW",t.SERVICE="SERVICE",t))(Dn||{});var Ln={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 dn={recursPathValue:function(t,n){const e=[];return e.push({path:t,value:n}),e}};function In(t){const n=Math.floor(t).toString().length<=1?2:1;return t.toFixed(n)}async function Nn(t){if(t.size<=1048576){const n=await t.arrayBuffer();return Ln.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 Ln.computeSHA256(r)})),o=new TextEncoder,i=e.join(""),r=o.encode(i);return Ln.computeSHA256(r)}var pn={to3n:In,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=In(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:Nn,isSameFile:async function(t,n,e,o){if(n===t.name&&e===t.size){if(!o)return!0;if(o===await Nn(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 mn={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 Pn(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 Cn={getEventPosition:Pn,getDistanceBetweenEvents:function(t,n){const[e,o]=Pn(t),[i,r]=Pn(n);return mn.getDistance(e,o,i,r)},preventDefaultListener:function(t){t.preventDefault()},stopPropagationListener:function(t){t.stopPropagation()},preventDefaultStopPropagationListener:function(t){t.preventDefault(),t.stopPropagation()}};var gn={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 yn(t,n){const e=10**n;return Math.round(t*e)/e}var Un={roundToX:yn,r2:function(t){return yn(t,2)},r3:function(t){return yn(t,3)},isValidNumber:function(t){return"number"==typeof t&&!isNaN(t)&&isFinite(t)}};var wn={getPageTypeBySpaceText:function(t){return"space"===t?"EDITOR":"m"===t?"VISITOR":"VIEWER"},forceGetSearchParams:function(t,n=""){const e=new URLSearchParams(window.location.search).get(t);return e||(n&&console.error(n,e),window.location.href="/not-found","")}};function Mn(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 Bn(t){return t.join(".")}function xn(t){return"string"==typeof t?Mn(t):t}var Gn={makeRvPath:Mn,makeRvPathString:Bn,ensureRvPath:xn,ensureRvPathString:function(t){return"string"!=typeof t?Bn(t):t},getByRvPath:function(t,n){const e=xn(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=xn(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=xn(t),o=xn(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 vn(t){return new Promise(n=>{setTimeout(n,t)})}function bn(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 Vn={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 Fn(t){try{return await navigator.clipboard.writeText(t),!0}catch{return!1}}var Hn={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 Fn(window.location.href)},copyText:async function(t){try{return await navigator.clipboard.writeText(t),!0}catch{return!1}},trySetClipboard:Fn,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 Wn,Vector3 as kn}from"@babylonjs/core";function zn(t){return{x:180*t.x/Math.PI,y:180*t.y/Math.PI,z:180*t.z/Math.PI}}function Xn(t){return new Wn(t.x,t.y,t.z,t.w)}function _n(t){return"w"in t}var Yn={xyToArray:function(t,n=-1,e=[0,0]){return t?-1===n?[t.x,t.y]:[Un.roundToX(t.x,n),Un.roundToX(t.y,n)]:e},xyzToArray:function(t,n=-1,e=[0,0,0]){return t?-1===n?[t.x,t.y,t.z]:[Un.roundToX(t.x,n),Un.roundToX(t.y,n),Un.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]:[Un.roundToX(t.x,n),Un.roundToX(t.y,n),Un.roundToX(t.z,n),Un.roundToX(t.w,n)]:e},scaleV3:function(t,n){return{x:n.x*t,y:n.y*t,z:n.z*t}},radiansToDegrees:zn,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 Wn.RotationYawPitchRoll(t.y,t.x,t.z)},degreesToQuaternion:function(t){return Wn.RotationYawPitchRoll(t.y*Math.PI/180,t.x*Math.PI/180,t.z*Math.PI/180)},toVector3:function(t){return new kn(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:Un.roundToX(t.x,n),y:Un.roundToX(t.y,n),z:Un.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:Xn,toEulerRadians:function(t){return Xn(t).toEulerAngles()},toEulerDegrees:function(t){return zn(Xn(t).toEulerAngles())},toArray:function(t){return _n(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 _n(t)?[Un.roundToX(t.x,n),Un.roundToX(t.y,n),Un.roundToX(t.z,n),Un.roundToX(t.w,n)]:[Un.roundToX(t.x,n),Un.roundToX(t.y,n),Un.roundToX(t.z,n)]}};export{R as AcceptMime,s as ContextMenu,Ln as CryptoUtils,dn as DataUtils,E as Dialog,pn as FileUtils,a as FirstLoadModelServiceEventType,r as FirstLoadModelServiceStatus,T as FirstLoadServiceEventType,f as FirstLoadServiceStatus,en as FocusMode,sn as HistoryServiceEventType,Sn as IconPluginPosition,e as LabelInfo,n as LabelTheme,zt as LocalDataServiceEventType,Xt as LocalDataStatus,_t as LocalDataType,jt as Locale,mn as MathUtils,$t as MeetingStatus,c as MenuLine,u as MenuLineType,qt as Message,Cn as NativeEventUtils,gn as NetworkUtils,Un as NumberUtils,Yt as OssUploadInstanceStatus,Kt as OssUploadServiceEventType,tn as PageMode,nn as PageType,wn as PageUtils,Qt as PluginEventType,Zt as PluginFrom,Dn as PluginType,o as RsModelServiceEventType,i as RsModelStatus,fn as RvAttachType,ln as RvBasicType,un as RvFileServiceEventType,cn as RvFileType,Rn as RvMaterialType,En as RvModelOrigin,hn as RvPresetType,An as RvResourceServiceEventType,Tn as RvResourceType,Gn as RvUtils,on as ScreenSize,Jt as ShareMode,On as TChangeType,rn as ThemeBackground,l as ThemeColor,an as ThemeShape,Vn as TimeUtils,Hn as UrlUtils,Yn as VectorUtils,vn as sleep,bn as throttle};
|
|
1
|
+
var t=Object.defineProperty,n=(t=>(t.Default="Default",t))(n||{}),e=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},o=(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))(o||{}),i=(t=>(t.WAITING="WAITING",t.LOADING="LOADING",t.LOADED="LOADED",t.ERROR="ERROR",t.CANCELED="CANCELED",t))(i||{}),r=(t=>(t.WAITING="WAITING",t.LOADING="LOADING",t.LOADED="LOADED",t.ERROR="ERROR",t.CANCELED="CANCELED",t))(r||{}),a=(t=>(t.START="START",t.PROGRESS="PROGRESS",t.LOADED="LOADED",t.ERROR="ERROR",t.CANCELED="CANCELED",t))(a||{}),s=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)}},u=(t=>(t.BUTTON="BUTTON",t.DIVIDER="DIVIDER",t.CHECKBOX="CHECKBOX",t.SUB="SUB",t.VIEW="VIEW",t))(u||{}),c=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,h=()=>{},A=void 0,O=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=h,this.sub=A,this.createTime=O}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)}},E=(t=>(t.GREEN="GREEN",t.PURPLE="PURPLE",t.BLUE="BLUE",t.PINK="PINK",t))(E||{}),l=(t=>(t.LEFT="LEFT",t.CENTER="CENTER",t.RIGHT="RIGHT",t))(l||{}),T=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="",h=!1,A="",O="",S=h,D=!1,L=()=>{},d=()=>!0,I=!0,N=()=>{},p=()=>{},m=()=>{},C=()=>{},P=()=>{},g=()=>{},y=()=>{},U=()=>{},w=()=>()=>{},M=!0,B=!0,x=!1,G=!0,v=!0,b=null,V=A,F=new Date,H=()=>{}){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=h,this.defaultValue=A,this.inputPlaceholder=O,this.autoFocus=S,this.allowEmpty=D,this.onChange=L,this.onCheck=d,this.enableCloseButton=I,this.onConfirm=N,this.onCancel=p,this.onClose=m,this.onConfirmButtonClick=C,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=G,this.alignButton=v,this.controller=b,this.inputValue=V,this.createTime=F,this.focusInput=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=()=>{}},f=(t=>(t.WAITING="WAITING",t.LOADING="LOADING",t.LOADED="LOADED",t.ERROR="ERROR",t.CANCELED="CANCELED",t))(f||{}),R=(t=>(t.START="START",t.PROGRESS="PROGRESS",t.LOADED="LOADED",t.ERROR="ERROR",t.CANCELED="CANCELED",t))(R||{}),h={};((n,e)=>{for(var o in e)t(n,o,{get:e[o],enumerable:!0})})(h,{AAC:()=>b,ANIMATION:()=>U,ANY:()=>I,ATTACH_LIST:()=>dt,AVI:()=>Z,AVIF:()=>J,BMP:()=>X,CAMERA:()=>C,FLAC:()=>F,FLV:()=>ot,GIF:()=>z,GLB:()=>w,GLTF:()=>M,GP3:()=>rt,HEIF:()=>$,ICO:()=>j,JPG:()=>W,JSON:()=>st,LIGHT:()=>m,MARKDOWN:()=>ct,MATERIAL:()=>g,MESH:()=>p,MKV:()=>at,MOV:()=>nt,MP3:()=>G,MP4:()=>q,MPEG:()=>tt,OBJ:()=>x,OGG:()=>V,OGV:()=>it,OPUS:()=>H,PNG:()=>k,STL:()=>B,SUPPORT_ALL_LIST:()=>Ot,SUPPORT_AUDIO_LIST:()=>Rt,SUPPORT_BABYLON_LIST:()=>ft,SUPPORT_FILE_LIST:()=>St,SUPPORT_IMAGE_LIST:()=>Et,SUPPORT_JSON_LIST:()=>At,SUPPORT_MODEL_LIST:()=>lt,SUPPORT_RENDER_LIST:()=>Dt,SUPPORT_TEXTURE_LIST:()=>Lt,SUPPORT_TEXT_LIST:()=>ht,SUPPORT_VIDEO_LIST:()=>Tt,SVG:()=>Y,TEXTURE:()=>P,TIFF:()=>K,TXT:()=>ut,UNKNOWN:()=>N,UV:()=>y,WAV:()=>v,WMV:()=>et,WebM:()=>Q,WebP:()=>_,getExtension:()=>gt,getMime:()=>Pt,getMimeByBlob:()=>It,getMimeByBuffer:()=>mt,getMimeByPath:()=>Nt,getMimeByStream:()=>Ct,getMimeByUrl:()=>pt,isAttach:()=>zt,isBabylon:()=>vt,isMaterial:()=>Wt,isSupport:()=>yt,isSupportAudio:()=>bt,isSupportFile:()=>Ut,isSupportImage:()=>wt,isSupportJson:()=>Gt,isSupportModel:()=>Mt,isSupportRender:()=>Vt,isSupportText:()=>xt,isSupportTexture:()=>Ft,isSupportVideo:()=>Bt,isTexture:()=>Ht,isUV:()=>kt});import{AbstractMesh as A,BaseTexture as O,Material as S}from"@babylonjs/core";import{fileTypeFromBlob as D,fileTypeFromBuffer as L,fileTypeFromStream as d}from"file-type";var I="*/*",N="unknown/unknown",p="babylonjs/mesh",m="babylonjs/light",C="babylonjs/camera",P="babylonjs/texture",g="babylonjs/material",y="babylonjs/uv",U="babylonjs/animation",w="model/gltf-binary",M="model/gltf+json",B="model/stl",x="model/obj",G="audio/mpeg",v="audio/wav",b="audio/aac",V="audio/ogg",F="audio/flac",H="audio/opus",W="image/jpeg",k="image/png",z="image/gif",X="image/bmp",_="image/webp",Y="image/svg+xml",K="image/tiff",j="image/x-icon",$="image/heif",J="image/avif",q="video/mp4",Q="video/webm",Z="video/x-msvideo",tt="video/mpeg",nt="video/quicktime",et="video/x-ms-wmv",ot="video/x-flv",it="video/ogg",rt="video/3gpp",at="video/x-matroska",st="application/json",ut="text/plain",ct="text/markdown",Et=[W,k],lt=[w,M,B,x],Tt=[q],ft=[p,m,C,P,g,y,U],Rt=[G,v],ht=[ut],At=[st],Ot=[...Et,...lt,...Tt,...ft,...Rt,...ht,...At],St=[...Et,...lt,...Tt,...Rt,...ht,...At],Dt=[...Et,...lt,...Tt,...ht],Lt=[...Et,...Tt,P],dt=[P,g,y];async function It(t){if(t&&t instanceof Blob){const n=await D(t);return!n&&t instanceof File&&t.name.endsWith(".stl")?B:n?.mime??N}return N}async function Nt(t){if(t){return(await import("mime")).default.getType(t)??N}return N}async function pt(t){if(!t)return N;try{const n=await fetch(t);if(!n.body)return N;const e=await d(n.body);if(e?.mime)return e.mime;const o=new URL(t).pathname;if(o.includes("."))return await Nt(o)}catch(t){console.error("getMimeByUrl",t)}return N}async function mt(t){if(t){const n=await L(t);return n?.mime??N}return N}async function Ct(t){const n=await d(t);return n?.mime??N}async function Pt(t){return t?"undefined"!=typeof ReadableStream&&t instanceof ReadableStream?Ct(t):t instanceof Blob?It(t):"string"==typeof t?t.startsWith("http://")||t.startsWith("https://")?pt(t):Nt(t):t instanceof ArrayBuffer||t instanceof Uint8Array?mt(t):t instanceof O?P:t instanceof S?g:t instanceof A?p:N:N}async function gt(t=N){if(vt(t)||zt(t))return t;if(t===I||t===N)return"";return(await import("mime")).default.getExtension(t)??""}function yt(t=N){return t==I||t!=N&&Ot.includes(t)}function Ut(t=N){return t==I||t!=N&&St.includes(t)}function wt(t=N){return t==I||t!=N&&Et.includes(t)}function Mt(t=N){return t==I||t!=N&<.includes(t)}function Bt(t=N){return t==I||t!=N&&Tt.includes(t)}function xt(t=N){return t==I||t!=N&&ht.includes(t)}function Gt(t=N){return t==I||t!=N&&At.includes(t)}function vt(t=N){return t==I||t!=N&&ft.includes(t)}function bt(t=N){return t==I||t!=N&&Rt.includes(t)}function Vt(t=N){return t==I||t!=N&&Dt.includes(t)}function Ft(t=N){return t==I||t!=N&&Lt.includes(t)}function Ht(t=N){return t==I||t!=N&&t==P}function Wt(t=N){return t==I||t!=N&&t==g}function kt(t=N){return t==I||t!=N&&t==y}function zt(t=N){return t==I||t!=N&&dt.includes(t)}var Xt=(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))(Xt||{}),_t=(t=>(t.WAITING="WAITING",t.LOADING="LOADING",t.PAUSED="PAUSED",t.LOADED="LOADED",t.FAILED="FAILED",t.CANCELED="CANCELED",t))(_t||{}),Yt=(t=>(t.BLOB="BLOB",t.OBJECT="OBJECT",t))(Yt||{}),Kt=(t=>(t.WAITING="WAITING",t.UPLOADING="UPLOADING",t.PAUSED="PAUSED",t.COMPLETED="COMPLETED",t.FAILED="FAILED",t.CANCELED="CANCELED",t))(Kt||{}),jt=(t=>(t.START="START",t.PROGRESS="PROGRESS",t.PAUSE="PAUSE",t.RESUME="RESUME",t.UPLOADED="UPLOADED",t.FAILED="FAILED",t.CANCELED="CANCELED",t))(jt||{}),$t=(t=>(t.ZH="ZH",t.EN="EN",t))($t||{}),Jt=(t=>(t.NONE="NONE",t.WAITING="WAITING",t.PROGRESSING="PROGRESSING",t.ENDED="ENDED",t.REMOVED="REMOVED",t.BANNED="BANNED",t))(Jt||{}),qt=(t=>(t.NONE="NONE",t.SELF="SELF",t.ALL="ALL",t))(qt||{}),Qt=class{constructor(t,n,e,o){this.text=t,this.type=n,this.duration=e,this.id=o}show=!0;height=20;opacity=0},Zt=(t=>(t.ADD="ADD",t.INSTALL="INSTALL",t.ENABLE="ENABLE",t.DISABLE="DISABLE",t.UNINSTALL="UNINSTALL",t))(Zt||{}),tn=(t=>(t.BUILT_IN="BUILT_IN",t.EXTERNAL="EXTERNAL",t.UNKNOWN="UNKNOWN",t))(tn||{}),nn=(t=>(t.DISPLAY="DISPLAY",t.FULL="FULL",t.HP_BOX="HP_BOX",t.VR="VR",t.MR="MR",t))(nn||{}),en=(t=>(t.EDITOR="EDITOR",t.VIEWER="VIEWER",t.VISITOR="VISITOR",t))(en||{}),on=(t=>(t.DEFAULT="DEFAULT",t.DESCRIPTION="DESCRIPTION",t))(on||{}),rn=(t=>(t.XS="XS",t.SM="SM",t.MD="MD",t.LG="LG",t.XL="XL",t))(rn||{}),an=(t=>(t.DEFAULT="DEFAULT",t.BACKGROUND="BACKGROUND",t.LIGHT="LIGHT",t.DARK="DARK",t))(an||{}),sn=(t=>(t.GENERAL="GENERAL",t.RHINE="RHINE",t))(sn||{}),un=(t=>(t.UNDO="UNDO",t.REDO="REDO",t))(un||{}),cn=(t=>(t.ADD="ADD",t.REMOVE="REMOVE",t))(cn||{}),En=(t=>(t.OSS="OSS",t.URL="URL",t))(En||{}),ln=(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||{}),Tn=(t=>(t.BASIC="BASIC",t.PROVIDE="PROVIDE",t.UPLOAD="UPLOAD",t))(Tn||{}),fn=(t=>(t.TEXTURE="TEXTURE",t.MATERIAL="MATERIAL",t.UV="UV",t))(fn||{}),Rn=(t=>(t.FILE="FILE",t.ATTACH="ATTACH",t))(Rn||{}),hn=(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))(hn||{}),An=(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))(An||{}),On=(t=>(t.ADD="ADD",t.REMOVE="REMOVE",t))(On||{}),Sn=(t=>(t.SYNC="SYNC",t.STEP="STEP",t.SELECT="SELECT",t.ADD="ADD",t.UPDATE="UPDATE",t.DELETE="DELETE",t))(Sn||{}),Dn=(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))(Dn||{}),Ln=(t=>(t.BUTTON="BUTTON",t.SWITCH="SWITCH",t.DRAWER="DRAWER",t.DIALOG="DIALOG",t.CONTENT="CONTENT",t.WINDOW="WINDOW",t.SERVICE="SERVICE",t))(Ln||{});var dn={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 In={recursPathValue:function(t,n){const e=[];return e.push({path:t,value:n}),e}};function Nn(t){const n=Math.floor(t).toString().length<=1?2:1;return t.toFixed(n)}async function pn(t){if(t.size<=1048576){const n=await t.arrayBuffer();return dn.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 dn.computeSHA256(r)})),o=new TextEncoder,i=e.join(""),r=o.encode(i);return dn.computeSHA256(r)}var mn={to3n:Nn,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=Nn(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:pn,isSameFile:async function(t,n,e,o){if(n===t.name&&e===t.size){if(!o)return!0;if(o===await pn(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 Cn={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 Pn(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:Pn,getDistanceBetweenEvents:function(t,n){const[e,o]=Pn(t),[i,r]=Pn(n);return Cn.getDistance(e,o,i,r)},preventDefaultListener:function(t){t.preventDefault()},stopPropagationListener:function(t){t.stopPropagation()},preventDefaultStopPropagationListener:function(t){t.preventDefault(),t.stopPropagation()}};var yn={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 Un(t,n){const e=10**n;return Math.round(t*e)/e}var wn={roundToX:Un,r2:function(t){return Un(t,2)},r3:function(t){return Un(t,3)},isValidNumber:function(t){return"number"==typeof t&&!isNaN(t)&&isFinite(t)}};var Mn={getPageTypeBySpaceText:function(t){return"space"===t?"EDITOR":"m"===t?"VISITOR":"VIEWER"},forceGetSearchParams:function(t,n=""){const e=new URLSearchParams(window.location.search).get(t);return e||(n&&console.error(n,e),window.location.href="/not-found","")}};function Bn(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 xn(t){return t.join(".")}function Gn(t){return"string"==typeof t?Bn(t):t}var vn={makeRvPath:Bn,makeRvPathString:xn,ensureRvPath:Gn,ensureRvPathString:function(t){return"string"!=typeof t?xn(t):t},getByRvPath:function(t,n){const e=Gn(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=Gn(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=Gn(t),o=Gn(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 bn(t){return new Promise(n=>{setTimeout(n,t)})}function Vn(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 Fn={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 Hn(t){try{return await navigator.clipboard.writeText(t),!0}catch{return!1}}var Wn={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 Hn(window.location.href)},copyText:async function(t){try{return await navigator.clipboard.writeText(t),!0}catch{return!1}},trySetClipboard:Hn,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 kn,Vector3 as zn}from"@babylonjs/core";function Xn(t){return{x:180*t.x/Math.PI,y:180*t.y/Math.PI,z:180*t.z/Math.PI}}function _n(t){return new kn(t.x,t.y,t.z,t.w)}function Yn(t){return"w"in t}var Kn={xyToArray:function(t,n=-1,e=[0,0]){return t?-1===n?[t.x,t.y]:[wn.roundToX(t.x,n),wn.roundToX(t.y,n)]:e},xyzToArray:function(t,n=-1,e=[0,0,0]){return t?-1===n?[t.x,t.y,t.z]:[wn.roundToX(t.x,n),wn.roundToX(t.y,n),wn.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]:[wn.roundToX(t.x,n),wn.roundToX(t.y,n),wn.roundToX(t.z,n),wn.roundToX(t.w,n)]:e},scaleV3:function(t,n){return{x:n.x*t,y:n.y*t,z:n.z*t}},radiansToDegrees:Xn,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 kn.RotationYawPitchRoll(t.y,t.x,t.z)},degreesToQuaternion:function(t){return kn.RotationYawPitchRoll(t.y*Math.PI/180,t.x*Math.PI/180,t.z*Math.PI/180)},toVector3:function(t){return new zn(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:wn.roundToX(t.x,n),y:wn.roundToX(t.y,n),z:wn.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:_n,toEulerRadians:function(t){return _n(t).toEulerAngles()},toEulerDegrees:function(t){return Xn(_n(t).toEulerAngles())},toArray:function(t){return Yn(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 Yn(t)?[wn.roundToX(t.x,n),wn.roundToX(t.y,n),wn.roundToX(t.z,n),wn.roundToX(t.w,n)]:[wn.roundToX(t.x,n),wn.roundToX(t.y,n),wn.roundToX(t.z,n)]}};export{h as AcceptMime,s as ContextMenu,dn as CryptoUtils,In as DataUtils,T as Dialog,l as DialogContentAlign,mn as FileUtils,a as FirstLoadModelServiceEventType,r as FirstLoadModelServiceStatus,R as FirstLoadServiceEventType,f as FirstLoadServiceStatus,on as FocusMode,un as HistoryServiceEventType,Dn as IconPluginPosition,e as LabelInfo,n as LabelTheme,Xt as LocalDataServiceEventType,_t as LocalDataStatus,Yt as LocalDataType,$t as Locale,Cn as MathUtils,Jt as MeetingStatus,c as MenuLine,u as MenuLineType,Qt as Message,gn as NativeEventUtils,yn as NetworkUtils,wn as NumberUtils,Kt as OssUploadInstanceStatus,jt as OssUploadServiceEventType,nn as PageMode,en as PageType,Mn as PageUtils,Zt as PluginEventType,tn as PluginFrom,Ln as PluginType,o as RsModelServiceEventType,i as RsModelStatus,fn as RvAttachType,ln as RvBasicType,cn as RvFileServiceEventType,En as RvFileType,hn as RvMaterialType,Tn as RvModelOrigin,An as RvPresetType,On as RvResourceServiceEventType,Rn as RvResourceType,vn as RvUtils,rn as ScreenSize,qt as ShareMode,Sn as TChangeType,an as ThemeBackground,E as ThemeColor,sn as ThemeShape,Fn as TimeUtils,Wn as UrlUtils,Kn as VectorUtils,bn as sleep,Vn as throttle};
|
package/package.json
CHANGED