@realsee/dnalogel 2.2.5 → 2.2.7
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/ModelEntryDoorGuidePlugin/Plugin.d.ts +1 -0
- package/dist/index.cjs.js +17 -17
- package/dist/index.js +849 -887
- package/dist/index.umd.js +17 -17
- package/dist/shared-utils/three/{transfromToMeshBasicMaterial.d.ts → transformToMeshBasicMaterial.d.ts} +0 -0
- package/docs/assets/main.js +1 -1
- package/docs/classes/CruisePluginController.html +24 -24
- package/docs/classes/Magnifier.html +16 -16
- package/docs/classes/ModelRoomLabelController.html +11 -11
- package/docs/classes/Object3DHelperController.html +24 -24
- package/docs/classes/PaintBrush.html +15 -15
- package/docs/classes/PanoTagPluginController.html +39 -39
- package/docs/classes/Util.BetterTween.html +8 -8
- package/docs/classes/Util.FivePointSelector.html +12 -12
- package/docs/classes/Util.Interval.html +12 -12
- package/docs/classes/Util.Magnifier.html +17 -17
- package/docs/classes/Util.PointDomHelper.html +11 -11
- package/docs/classes/Util.PointHelper.html +11 -11
- package/docs/classes/Util.Rectangle.html +13 -13
- package/docs/enums/CameraMovementEffect.html +7 -7
- package/docs/enums/ContentType.html +12 -12
- package/docs/enums/DIRECTION.html +9 -9
- package/docs/enums/DISPLAY_STRATEGY_TYPE.html +9 -9
- package/docs/enums/DimensionType.html +7 -7
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +8 -8
- package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +9 -9
- package/docs/enums/LinkType.html +7 -7
- package/docs/enums/PaintBrushTypeEnum.html +8 -8
- package/docs/enums/PointType.html +7 -7
- package/docs/enums/Rotation.html +8 -8
- package/docs/functions/CSS3DRenderPlugin.html +4 -4
- package/docs/functions/CameraMovementPlugin.html +4 -4
- package/docs/functions/CruisePlugin.html +4 -4
- package/docs/functions/GuideLinePlugin.html +5 -5
- package/docs/functions/ItemLabelPlugin.html +4 -4
- package/docs/functions/MapviewFloorplanPlugin.html +4 -4
- package/docs/functions/ModelChassisCompassPlugin.html +4 -4
- package/docs/functions/ModelEntryDoorGuidePlugin.html +4 -4
- package/docs/functions/ModelFloorplanPlugin.html +4 -4
- package/docs/functions/ModelItemLabelPlugin.html +4 -4
- package/docs/functions/ModelRoomLabelPlugin.html +4 -4
- package/docs/functions/ModelTVVideoPlugin.html +4 -4
- package/docs/functions/ModelViewPlugin.html +4 -4
- package/docs/functions/Object3DHelperPlugin.html +4 -4
- package/docs/functions/PanoCompassPlugin.html +4 -4
- package/docs/functions/PanoCursorRaycasterPlugin.html +4 -4
- package/docs/functions/PanoDoorLabelPlugin.html +4 -4
- package/docs/functions/PanoFloorplanRadarPlugin.html +4 -4
- package/docs/functions/PanoMeasurePlugin.html +4 -4
- package/docs/functions/PanoRulerPlugin.html +4 -4
- package/docs/functions/PanoRulerProPlugin.html +4 -4
- package/docs/functions/PanoSpatialTagPlugin.html +4 -4
- package/docs/functions/PanoTagPlugin.html +4 -4
- package/docs/functions/TopviewFloorplanPlugin.html +4 -4
- package/docs/functions/Util.getCoordsFromClient.html +5 -5
- package/docs/functions/Util.getCoordsFromElement.html +5 -5
- package/docs/functions/Util.getFrameTime.html +5 -5
- package/docs/functions/Util.getIntersectFromRelativePosition.html +5 -5
- package/docs/functions/Util.getRaycasterFromFivePointer.html +5 -5
- package/docs/functions/Util.isNil.html +5 -5
- package/docs/functions/Util.nextFrame.html +5 -5
- package/docs/functions/Util.notNil.html +5 -5
- package/docs/functions/Util.requestAnimationFrameInterval.html +5 -5
- package/docs/functions/Util.tweenProgress.html +5 -5
- package/docs/functions/pluginFlag.html +5 -5
- package/docs/index.html +4 -4
- package/docs/interfaces/CSS3DRenderPluginEventMap.html +11 -11
- package/docs/interfaces/CSS3DRenderPluginState.html +8 -8
- package/docs/interfaces/CameraMovementPluginExportType.html +7 -7
- package/docs/interfaces/ContentTypeMap.html +12 -12
- package/docs/interfaces/FloorplanBounding.html +8 -8
- package/docs/interfaces/FloorplanData.html +10 -10
- package/docs/interfaces/FloorplanEntrance.html +11 -11
- package/docs/interfaces/FloorplanExtraObject.html +10 -10
- package/docs/interfaces/FloorplanExtraObject3D.html +8 -8
- package/docs/interfaces/FloorplanFloorData.html +9 -9
- package/docs/interfaces/FloorplanImagePosition.html +7 -7
- package/docs/interfaces/FloorplanObserver.html +9 -9
- package/docs/interfaces/FloorplanOutlineItem.html +9 -9
- package/docs/interfaces/FloorplanPosition.html +7 -7
- package/docs/interfaces/FloorplanRoomItem.html +13 -13
- package/docs/interfaces/FloorplanRoomLabelItem.html +7 -7
- package/docs/interfaces/FloorplanServerBounding.html +8 -8
- package/docs/interfaces/FloorplanServerComputedData.html +10 -10
- package/docs/interfaces/FloorplanServerData.html +7 -7
- package/docs/interfaces/FloorplanServerDoorItem.html +10 -10
- package/docs/interfaces/FloorplanServerDoorPosition.html +8 -8
- package/docs/interfaces/FloorplanServerEntrance.html +11 -11
- package/docs/interfaces/FloorplanServerFloorData.html +9 -9
- package/docs/interfaces/FloorplanServerImagePosition.html +7 -7
- package/docs/interfaces/FloorplanServerObserver.html +9 -9
- package/docs/interfaces/FloorplanServerOutlineItem.html +9 -9
- package/docs/interfaces/FloorplanServerPosition.html +7 -7
- package/docs/interfaces/FloorplanServerRoomItem.html +14 -14
- package/docs/interfaces/FloorplanServerRoomLabelItem.html +7 -7
- package/docs/interfaces/ItemLabelPluginData.html +6 -6
- package/docs/interfaces/ItemLabelPluginExportReturnsType.html +11 -11
- package/docs/interfaces/ItemLabelPluginParametersType.html +9 -9
- package/docs/interfaces/LineJson.html +7 -7
- package/docs/interfaces/ModelChassisCompassPluginData.html +7 -7
- package/docs/interfaces/ModelChassisCompassPluginExportType.html +8 -8
- package/docs/interfaces/ModelChassisCompassPluginParameterType.html +7 -7
- package/docs/interfaces/ModelEntryDoorGuidePluginData.html +8 -8
- package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +8 -8
- package/docs/interfaces/ModelItemLabelPluginData.html +6 -6
- package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +11 -11
- package/docs/interfaces/ModelItemLabelPluginParametersType.html +7 -7
- package/docs/interfaces/ModelRoomLabelPluginData.html +6 -6
- package/docs/interfaces/ModelTVVideoPluginData.html +9 -9
- package/docs/interfaces/ModelTVVideoPluginExportType.html +8 -8
- package/docs/interfaces/ModelTVVideoPluginParameterType.html +6 -6
- package/docs/interfaces/ModelViewPluginExportType.html +8 -8
- package/docs/interfaces/Object3DHelperState.html +8 -8
- package/docs/interfaces/OpenParameter.html +7 -7
- package/docs/interfaces/PaintBrushAction.html +12 -12
- package/docs/interfaces/PaintBrushConfigs.html +12 -12
- package/docs/interfaces/PaintBrushState.html +10 -10
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +10 -10
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +5 -5
- package/docs/interfaces/PanoMeasureParameterType.html +11 -11
- package/docs/interfaces/PanoRulerPluginExportType.html +10 -10
- package/docs/interfaces/PanoRulerPluginOptions.html +7 -7
- package/docs/interfaces/PanoRulerPluginParameterType.html +8 -8
- package/docs/interfaces/PanoRulerProPluginExportType.html +9 -9
- package/docs/interfaces/PanoRulerProPluginOptions.html +7 -7
- package/docs/interfaces/PanoRulerProPluginParameterType.html +7 -7
- package/docs/interfaces/PanoRulerProPluginState.html +8 -8
- package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +5 -5
- package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +5 -5
- package/docs/interfaces/PanoSpatialTagPluginData.html +11 -11
- package/docs/interfaces/PanoSpatialTagPluginDataElement.html +10 -10
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +13 -13
- package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +10 -10
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +13 -13
- package/docs/interfaces/PanoSpatialTagPluginPointElement.html +11 -11
- package/docs/interfaces/PanoSpatialTagPluginTagElement.html +10 -10
- package/docs/interfaces/Point.html +8 -8
- package/docs/interfaces/PointJson.html +8 -8
- package/docs/interfaces/Room.html +9 -9
- package/docs/interfaces/RoomInfo.html +7 -7
- package/docs/interfaces/RoomLabel.html +14 -14
- package/docs/interfaces/RoomRules.html +5 -5
- package/docs/interfaces/Rooms.html +5 -5
- package/docs/interfaces/Scissor.html +9 -9
- package/docs/interfaces/TagConfig.html +10 -10
- package/docs/interfaces/Tags.html +9 -9
- package/docs/interfaces/Util.MagnifierParameter.html +11 -11
- package/docs/interfaces/Util.MouseGroupParameter.html +8 -8
- package/docs/modules/Util.html +5 -5
- package/docs/modules.html +4 -4
- package/docs/types/ArrayPosition.html +5 -5
- package/docs/types/CSS3DRenderExportType.html +5 -5
- package/docs/types/CSS3DRenderPluginExportType.html +5 -5
- package/docs/types/CSS3DRenderPluginParameterType.html +5 -5
- package/docs/types/Color.html +5 -5
- package/docs/types/ContentTypeConfigKey.html +5 -5
- package/docs/types/ContentTypeConfigKeyArray.html +5 -5
- package/docs/types/Create3DDomContainerReturnType.html +5 -5
- package/docs/types/Create3DElementReturnType.html +5 -5
- package/docs/types/CruisePluginExportType.html +5 -5
- package/docs/types/Direction-1.html +5 -5
- package/docs/types/Direction4.html +5 -5
- package/docs/types/FloorplanRuleLabels.html +5 -5
- package/docs/types/FloorplanServerRuleLabels.html +5 -5
- package/docs/types/GuideLinePluginExportType.html +5 -5
- package/docs/types/HelperEventMap.html +5 -5
- package/docs/types/MapviewFloorplanPluginParameterType.html +5 -5
- package/docs/types/MapviewFloorplanPluginReturnType.html +5 -5
- package/docs/types/MediaData.html +5 -5
- package/docs/types/ModelEntryDoorGuidePluginParameterType.html +6 -6
- package/docs/types/ModelFloorplanPluginParameterType.html +5 -5
- package/docs/types/ModelFloorplanPluginReturnType.html +5 -5
- package/docs/types/ModelRoomLabelPluginParameters.html +5 -5
- package/docs/types/ModelRoomLabelPluginReturnType.html +5 -5
- package/docs/types/MoveArgs.html +5 -5
- package/docs/types/MoveOpts.html +5 -5
- package/docs/types/Object3DHelperEventMap.html +5 -5
- package/docs/types/ObjectFit.html +5 -5
- package/docs/types/PaintBrushEventMap.html +5 -5
- package/docs/types/PanoCompassPluginData.html +5 -5
- package/docs/types/PanoCompassPluginExportType.html +5 -5
- package/docs/types/PanoCompassPluginParameterType.html +5 -5
- package/docs/types/PanoFloorplanRadarPluginParameterType.html +5 -5
- package/docs/types/PanoFloorplanRadarPluginReturnType.html +5 -5
- package/docs/types/PanoMeasurePluginEvent.html +5 -5
- package/docs/types/PanoMeasureReturnType.html +5 -5
- package/docs/types/PanoSpatialTagPluginId.html +5 -5
- package/docs/types/PanoTagPluginExportInterface.html +5 -5
- package/docs/types/PanoTagPluginParamsInterface.html +5 -5
- package/docs/types/PlaneTag.html +5 -5
- package/docs/types/PointTag.html +5 -5
- package/docs/types/Position.html +5 -5
- package/docs/types/RotateArgs.html +5 -5
- package/docs/types/RotateOpts.html +5 -5
- package/docs/types/RuleLabelsKey.html +5 -5
- package/docs/types/RuleLabelsValue.html +5 -5
- package/docs/types/Tag.html +5 -5
- package/docs/types/Tag2D.html +5 -5
- package/docs/types/Tag3D.html +5 -5
- package/docs/types/TagId.html +5 -5
- package/docs/types/TopviewFloorplanPluginParameterType.html +5 -5
- package/docs/types/TopviewFloorplanPluginReturnType.html +5 -5
- package/docs/variables/FLOOR_TYPE_MAP.html +5 -5
- package/docs/variables/PLUGIN.html +5 -5
- package/docs/variables/ROOM_FETILE_TYPE_MAP.html +5 -5
- package/docs/variables/ROOM_TYPE_MAP.html +5 -5
- package/docs/variables/VERSION.html +5 -5
- package/docs/variables/itemLabelPluginServerParams.html +5 -5
- package/docs/variables/modelItemLabelPluginServerParams.html +5 -5
- package/docs/variables/modelRoomLabelPluginServerParams.html +5 -5
- package/libs/CSS3DRenderPlugin/CSS3DRender.js +39 -33
- package/libs/CSS3DRenderPlugin/Controller.js +30 -22
- package/libs/CSS3DRenderPlugin/index.js +12 -3
- package/libs/CSS3DRenderPlugin/utils/CSS3DObjectPlus.js +2 -1
- package/libs/CameraMovementPlugin/CameraMovementPlugin.js +28 -25
- package/libs/CameraMovementPlugin/index.js +13 -0
- package/libs/CruisePlugin/Controller.js +52 -41
- package/libs/CruisePlugin/index.js +26 -3
- package/libs/CruisePlugin/typing.js +1 -0
- package/libs/GuideLinePlugin/Controller.js +14 -9
- package/libs/GuideLinePlugin/index.js +14 -3
- package/libs/GuideLinePlugin/typing.js +1 -0
- package/libs/ItemLabelPlugin/ItemLabelComponent.js +2 -2
- package/libs/ItemLabelPlugin/ItemLabelItem.js +11 -11
- package/libs/ItemLabelPlugin/Plugin.js +33 -23
- package/libs/ItemLabelPlugin/events.type.js +1 -0
- package/libs/ItemLabelPlugin/index.js +16 -2
- package/libs/ModelChassisCompassPlugin/Plugin.js +3 -2
- package/libs/ModelChassisCompassPlugin/index.js +8 -0
- package/libs/ModelEntryDoorGuidePlugin/Plugin.d.ts +1 -0
- package/libs/ModelEntryDoorGuidePlugin/Plugin.js +52 -44
- package/libs/ModelEntryDoorGuidePlugin/index.js +9 -0
- package/libs/ModelItemLabelPlugin/ItemLabelComponent.js +2 -2
- package/libs/ModelItemLabelPlugin/ItemLabelItem.js +12 -12
- package/libs/ModelItemLabelPlugin/ModelItemLabelPlugin.js +28 -22
- package/libs/ModelItemLabelPlugin/index.js +12 -2
- package/libs/ModelRoomLabelPlugin/Controller.js +6 -2
- package/libs/ModelRoomLabelPlugin/RoomLabelItem.js +13 -13
- package/libs/ModelRoomLabelPlugin/index.js +10 -3
- package/libs/ModelRoomLabelPlugin/typings.js +1 -0
- package/libs/ModelTVVideoPlugin/Plugin.js +35 -25
- package/libs/ModelTVVideoPlugin/index.js +17 -0
- package/libs/ModelViewPlugin/Plugin.js +2 -1
- package/libs/ModelViewPlugin/index.js +6 -0
- package/libs/Object3DHelperPlugin/Controller.js +48 -27
- package/libs/Object3DHelperPlugin/FiveControllerWrapper.js +13 -9
- package/libs/Object3DHelperPlugin/index.js +40 -3
- package/libs/Object3DHelperPlugin/typings.js +1 -0
- package/libs/PanoCompassPlugin/Controller.js +25 -13
- package/libs/PanoCompassPlugin/index.js +23 -3
- package/libs/PanoCompassPlugin/typings.js +1 -0
- package/libs/PanoCursorRaycasterPlugin/index.js +4 -2
- package/libs/PanoDoorLabelPlugin/BaseController.js +27 -26
- package/libs/PanoDoorLabelPlugin/Controller.js +7 -2
- package/libs/PanoDoorLabelPlugin/index.js +12 -2
- package/libs/PanoDoorLabelPlugin/typings.js +1 -0
- package/libs/PanoMeasurePlugin/index.js +56 -5
- package/libs/PanoRulerPlugin/Plugin.js +22 -17
- package/libs/PanoRulerPlugin/index.js +9 -0
- package/libs/PanoRulerPlugin/style.js +1 -1
- package/libs/PanoRulerPlugin/typings.js +1 -0
- package/libs/PanoRulerProPlugin/Controller.js +38 -27
- package/libs/PanoRulerProPlugin/RulerItem.js +59 -69
- package/libs/PanoRulerProPlugin/index.js +16 -3
- package/libs/PanoRulerProPlugin/typings.js +1 -0
- package/libs/PanoSpatialTagPlugin/Components/origins.js +41 -42
- package/libs/PanoSpatialTagPlugin/Components/tag.js +2 -3
- package/libs/PanoSpatialTagPlugin/Plugin.js +74 -62
- package/libs/PanoSpatialTagPlugin/index.js +20 -0
- package/libs/PanoSpatialTagPlugin/store.js +1 -0
- package/libs/PanoTagPlugin/Components/Common/Arrow.js +11 -11
- package/libs/PanoTagPlugin/Components/Common/Audio.js +43 -43
- package/libs/PanoTagPlugin/Components/Common/Line/Polyline.js +7 -7
- package/libs/PanoTagPlugin/Components/Common/Line/Straight.js +28 -29
- package/libs/PanoTagPlugin/Components/Common/Media.js +92 -100
- package/libs/PanoTagPlugin/Components/Common/MediaItem.js +1 -1
- package/libs/PanoTagPlugin/Components/Common/MultiLineText.js +59 -68
- package/libs/PanoTagPlugin/Components/Common/Point/CustomPoint.js +13 -15
- package/libs/PanoTagPlugin/Components/Common/Point/DefaultPoint.js +26 -28
- package/libs/PanoTagPlugin/Components/Common/Point/PointSwitch.js +28 -31
- package/libs/PanoTagPlugin/Components/Common/Shadow.js +12 -13
- package/libs/PanoTagPlugin/Components/Common/Text.js +9 -9
- package/libs/PanoTagPlugin/Components/Tag/AudioTag.js +24 -32
- package/libs/PanoTagPlugin/Components/Tag/CustomTag.js +22 -22
- package/libs/PanoTagPlugin/Components/Tag/ImageTextTag.js +97 -118
- package/libs/PanoTagPlugin/Components/Tag/LinkTag.js +6 -8
- package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +51 -83
- package/libs/PanoTagPlugin/Components/Tag/MediaPlane.js +54 -72
- package/libs/PanoTagPlugin/Components/Tag/TextTag.js +48 -59
- package/libs/PanoTagPlugin/Components/Tag/index.js +75 -104
- package/libs/PanoTagPlugin/Components/TagContainer.js +65 -108
- package/libs/PanoTagPlugin/Components/TagWrapper.js +78 -116
- package/libs/PanoTagPlugin/controller/index.js +2 -2
- package/libs/PanoTagPlugin/index.js +82 -3
- package/libs/PanoTagPlugin/tag.config.js +2 -1
- package/libs/floorplan/Components/BaseImage.js +7 -7
- package/libs/floorplan/Components/Camera.js +24 -24
- package/libs/floorplan/Components/Compass.js +3 -3
- package/libs/floorplan/Components/CurrentFloor.js +47 -56
- package/libs/floorplan/Components/Main.js +80 -99
- package/libs/floorplan/Components/Normalmage.js +5 -5
- package/libs/floorplan/Components/RoomHighlight/Room.js +11 -11
- package/libs/floorplan/Components/RoomHighlight/RoomHighlight.js +13 -14
- package/libs/floorplan/Components/RoomLabels/RoomLabel.js +32 -32
- package/libs/floorplan/Components/RoomLabels/RoomLabels.js +47 -47
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial.js +23 -23
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_0.js +14 -14
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.js +13 -13
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.js +13 -13
- package/libs/floorplan/Components/RuleLabels/RuleItem.js +54 -54
- package/libs/floorplan/Components/RuleLabels/RuleLabels.js +15 -15
- package/libs/floorplan/Components/SvgImage.js +12 -12
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +111 -81
- package/libs/floorplan/MapviewFloorplanPlugin/index.js +47 -3
- package/libs/floorplan/MapviewFloorplanPlugin/typing.js +1 -0
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +166 -135
- package/libs/floorplan/ModelFloorplanPlugin/index.js +47 -3
- package/libs/floorplan/ModelFloorplanPlugin/typing.js +1 -0
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.js +3 -3
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.js +8 -12
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.js +38 -38
- package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.js +71 -80
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +51 -36
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +24 -3
- package/libs/floorplan/PanoFloorplanRadarPlugin/typing.js +1 -0
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +155 -126
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +44 -3
- package/libs/floorplan/TopviewFloorplanPlugin/style.d.ts +1 -0
- package/libs/floorplan/TopviewFloorplanPlugin/style.js +11 -0
- package/libs/floorplan/TopviewFloorplanPlugin/typing.js +1 -0
- package/libs/floorplan/typings/index.js +1 -0
- package/libs/index.js +34 -34
- package/libs/shared-utils/three/{transfromToMeshBasicMaterial.d.ts → transformToMeshBasicMaterial.d.ts} +0 -0
- package/libs/shared-utils/three/{transfromToMeshBasicMaterial.js → transformToMeshBasicMaterial.js} +0 -0
- package/libs/vendor/svelte/internal/index.js +151 -152
- package/package.json +17 -18
- package/libs/PanoTagPlugin/Components/Common/TextItem.js +0 -106
package/dist/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(J,Ce){typeof exports=="object"&&typeof module!="undefined"?Ce(exports,require("@tweenjs/tween.js"),require("@realsee/five"),require("three"),require("three/examples/jsm/renderers/CSS3DRenderer"),require("@realsee/five/line"),require("three/examples/jsm/loaders/FBXLoader"),require("hammerjs"),require("classnames"),require("polyline-normals"),require("object-assign-deep"),require("animejs"),require("swiper"),require("swiper/css"),require("swiper/css/autoplay")):typeof define=="function"&&define.amd?define(["exports","@tweenjs/tween.js","@realsee/five","three","three/examples/jsm/renderers/CSS3DRenderer","@realsee/five/line","three/examples/jsm/loaders/FBXLoader","hammerjs","classnames","polyline-normals","object-assign-deep","animejs","swiper","swiper/css","swiper/css/autoplay"],Ce):(J=typeof globalThis!="undefined"?globalThis:J||self,Ce(J.dnalogel={},J.TWEEN,J.FiveSDK,J.THREE,J.CSS3DRenderer,J.Line,J.FBXLoader,J.Hammer,J.classNames,J.getNormals,J.objectAssignDeep,J.anime,J.Swiper))})(this,function(J,Ce,me,H,Ct,vn,bn,tn,ot,nn,$a,el,po){"use strict";var h0=Object.defineProperty,m0=Object.defineProperties;var p0=Object.getOwnPropertyDescriptors;var Ka=Object.getOwnPropertySymbols;var g0=Object.prototype.hasOwnProperty,A0=Object.prototype.propertyIsEnumerable;var mo=(J,Ce,me)=>Ce in J?h0(J,Ce,{enumerable:!0,configurable:!0,writable:!0,value:me}):J[Ce]=me,
|
|
1
|
+
(function(J,Ce){typeof exports=="object"&&typeof module!="undefined"?Ce(exports,require("@tweenjs/tween.js"),require("@realsee/five"),require("three"),require("three/examples/jsm/renderers/CSS3DRenderer"),require("@realsee/five/line"),require("three/examples/jsm/loaders/FBXLoader"),require("hammerjs"),require("classnames"),require("polyline-normals"),require("object-assign-deep"),require("animejs"),require("swiper"),require("swiper/css"),require("swiper/css/autoplay")):typeof define=="function"&&define.amd?define(["exports","@tweenjs/tween.js","@realsee/five","three","three/examples/jsm/renderers/CSS3DRenderer","@realsee/five/line","three/examples/jsm/loaders/FBXLoader","hammerjs","classnames","polyline-normals","object-assign-deep","animejs","swiper","swiper/css","swiper/css/autoplay"],Ce):(J=typeof globalThis!="undefined"?globalThis:J||self,Ce(J.dnalogel={},J.TWEEN,J.FiveSDK,J.THREE,J.CSS3DRenderer,J.Line,J.FBXLoader,J.Hammer,J.classNames,J.getNormals,J.objectAssignDeep,J.anime,J.Swiper))})(this,function(J,Ce,me,H,Ct,vn,bn,tn,ot,nn,$a,el,po){"use strict";var h0=Object.defineProperty,m0=Object.defineProperties;var p0=Object.getOwnPropertyDescriptors;var Ka=Object.getOwnPropertySymbols;var g0=Object.prototype.hasOwnProperty,A0=Object.prototype.propertyIsEnumerable;var mo=(J,Ce,me)=>Ce in J?h0(J,Ce,{enumerable:!0,configurable:!0,writable:!0,value:me}):J[Ce]=me,W=(J,Ce)=>{for(var me in Ce||(Ce={}))g0.call(Ce,me)&&mo(J,me,Ce[me]);if(Ka)for(var me of Ka(Ce))A0.call(Ce,me)&&mo(J,me,Ce[me]);return J},pe=(J,Ce)=>m0(J,p0(Ce));var p=(J,Ce,me)=>(mo(J,typeof Ce!="symbol"?Ce+"":Ce,me),me);var Z=(J,Ce,me)=>new Promise((H,Ct)=>{var vn=ot=>{try{tn(me.next(ot))}catch(nn){Ct(nn)}},bn=ot=>{try{tn(me.throw(ot))}catch(nn){Ct(nn)}},tn=ot=>ot.done?H(ot.value):Promise.resolve(ot.value).then(vn,bn);tn((me=me.apply(J,Ce)).next())});const Pt=i=>i&&typeof i=="object"&&"default"in i?i:{default:i};function go(i){if(i&&i.__esModule)return i;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const e in i)if(e!=="default"){const n=Object.getOwnPropertyDescriptor(i,e);Object.defineProperty(t,e,n.get?n:{enumerable:!0,get:()=>i[e]})}}return t.default=i,Object.freeze(t)}const on=Pt(Ce),yn=go(Ce),I=go(H),sn=Pt(tn),_e=Pt(ot),tl=Pt(nn),It=Pt($a),Ao=Pt(el),pi=Pt(po);function vo(){}const bo=()=>Promise.resolve(),yo={__queue:Promise.resolve()};function nl(i=bo){yo.__queue=yo.__queue.then(i).catch(bo)}function wn(i,t,e){const n=i.x,o=i.y,s=Math.floor(n/t*1e4)/1e4,r=Math.floor(o/e*1e4)/1e4;return{x:s,y:r}}function gi(i,t,e){const{x:n,y:o}=i,s=n*t,r=o*e;return{x:s,y:r}}function Cn(i){if(i.length<2)return{};const t=i.slice(-2),e=t[0],n={x:(t[0].x+t[1].x)/2,y:(t[0].y+t[1].y)/2};return{control:e,end:n}}function il(i,t,e=vo){new Promise(n=>{setTimeout(()=>{e(),n(!0)},t*i)})}const ol=window,wo=window.requestAnimationFrame||ol.webkitRequestAnimationFrame||(i=>setTimeout(i,16));function Pn(i,t=0){t<=0?wo(i):wo(()=>Pn(i,t-1))}function sl(i,t,e,n=Ce.Easing.Linear.None){const o=new Ce.Tween(i).to(t,e).easing(n).start();function s(r){!o.update(r)||requestAnimationFrame(s)}return requestAnimationFrame(s),o}var st=(i=>(i.Drawline="Drawline",i.Undo="Undo",i.Exit="Exit",i))(st||{});const rn=Symbol("$$PAINT_BRUSH_EVENT$$");function In(i){return i[rn]||(i[rn]={}),i[rn]}function rl(i){i[rn]||delete i[rn]}class al{hasListener(t){const e=In(this);return e&&e[t]&&e[t].length>0}on(t,e,n){const o=In(this);return o[t]||(o[t]=[]),o[t].push([e,n||!1]),()=>this.off(t,e)}once(t,e){return this.on(t,e,!0)}off(t,e){if(t===void 0){rl(this);return}const n=In(this);if(n[t]||(n[t]=[]),e===void 0){n[t].length=0;return}let o=0;for(;o<n[t].length&&n[t][o][0]!==e;o++);o<n[t].length&&n[t].splice(o,1)}emit(t,...e){let n=!1;const s=In(this)[t]||[];for(let r of s.slice()){const[a,l=!1]=r,c=a(...e);l&&this.off(t,a),c===!1&&(n=!0)}return n}}function ut(){return((1+Math.random())*65536|0).toString(16).substring(1)}function Fe(){return(ut()+ut()+"-"+ut()+"-4"+ut().substr(0,3)+"-"+ut()+"-"+ut()+ut()+ut()).toLowerCase()}const ll=`
|
|
2
2
|
<style type="text/css">
|
|
3
3
|
|
|
4
4
|
#_gl_paintBrush {
|
|
@@ -98,12 +98,12 @@ transition: all 500ms;
|
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
</style>
|
|
101
|
-
`;class cl extends al{constructor(e){super();p(this,"configs");p(this,"clientWidth");p(this,"clientHeight");p(this,"ready",!1);p(this,"uuid",Fe());p(this,"tween");p(this,"tweening",!1);p(this,"container");p(this,"canvas");p(this,"data",{});p(this,"tempLine",{});this.configs=e,this.clientWidth=document.body.clientWidth,this.clientHeight=document.body.clientHeight,this.container=this.ifInsertToDOM(),this.canvas={},this.initCtrl()}get color(){return this.configs.currentColor}get state(){return this.data}get dpr(){return this.configs.DPR||1}ifInsertToDOM(){if(this.container)return this.container;if(this.configs.container)this.configs.container.id="_gl_paintBrush",this.container=this.configs.container;else if(document.getElementById("_gl_paintBrush"))this.container=document.getElementById("_gl_paintBrush");else{const e=document.createElement("div");e.id="_gl_paintBrush",document.body.appendChild(e),this.container=e}return this.container.innerHTML=ll,this.container}initCanvas(e){const n=document.createElement("canvas");n.className=e,n.width=this.clientWidth,n.height=this.clientHeight;const o=n.getContext("2d");if(!!o)return o.lineWidth=5*this.dpr,o.lineCap="round",o.lineJoin="round",this.container.appendChild(n),n}initCtrl(){const e=document.createElement("div");e.className="_paintBrush-ctrl";const n=document.createElement("div");n.className="_paintBrush-ctrlinner";const o=document.createElement("a");o.className="_paintBrush-ctrlitem _paintBrush-ctrlitem--undo",o.addEventListener("click",a=>{var u;if(a.stopPropagation(),this.configs.onClickUndo&&this.configs.onClickUndo(),!this.canvas[this.uuid]||!this.data[this.uuid]||this.data[this.uuid].length===0)return;const l=this.data[this.uuid].pop();l&&this.emitStateChange({type:st.Undo,color:this.color,ready:this.ready,state:l,uuid:this.uuid});const c=(u=this.canvas[this.uuid])==null?void 0:u.getContext("2d");if(!this.canvas[this.uuid])return;const{width:d,height:f}=this.canvas[this.uuid];c&&c.clearRect(0,0,d,f),this.data[this.uuid].forEach(h=>this.handleDrawLine(this.uuid,h,{withUndo:!0}))});const s=document.createElement("a");return s.className="_paintBrush-ctrlitem _paintBrush-ctrlitem--close",s.addEventListener("click",a=>{a.stopPropagation(),this.closeBrush(),this.configs.onClickClose&&this.configs.onClickClose()}),[o,s].forEach(a=>{const l=document.createElement("i");l.className="brush-icon";const c=document.createElement("span");c.className="brush-txt",c.innerText=a.className.endsWith("undo")?this.configs.onUndoText:this.configs.onExitText,a.appendChild(l),a.appendChild(c)}),n.appendChild(o),n.appendChild(s),e.appendChild(n),this.container.appendChild(e),e}openBrush(){if(this.ready)return;this.canvas[this.uuid]||(this.canvas[this.uuid]=this.initCanvas("_paintBrush-canvas")),this.container.className="brushing";const e=this.canvas[this.uuid];e.getContext("2d").clearRect(0,0,e.width,e.height),this.openBrushHandle(),this.ready=!0,this.emit("readyChange",!0)}closeBrush(){!this.ready||(this.container.className="",this.data={},this.tempLine={},Object.keys(this.canvas).forEach(e=>{this.canvas[e].ontouchstart=()=>!1,this.canvas[e].ontouchmove=()=>!1,this.canvas[e].ontouchend=()=>!1,this.canvas[e].ontouchcancel=()=>!1;const n=this.canvas[e].getContext("2d");n&&n.clearRect(0,0,this.canvas[e].width,this.canvas[e].height)}),this.ready=!1,this.emit("readyChange",!1),this.emitStateChange({type:st.Exit,color:this.color,ready:!1,uuid:this.uuid}))}updateCurrentColor(e){const n=this.canvas[this.uuid];if(!n)return;const o=n.getContext("2d");!o||(this.configs.currentColor=e,o.strokeStyle=e)}openBrushHandle(){const e=this.canvas[this.uuid];if(!e)return;const n=e.getContext("2d");if(!n)return;const o=this.color||"#6D92FF";n.strokeStyle=o;let s=null,r=[],a,l=[],c=0;const d=(f,u,h)=>{const m=this.color||"#ff0000";n.strokeStyle=m,n.beginPath(),n.moveTo(f.x,f.y),n.quadraticCurveTo(u.x,u.y,h.x,h.y),n.stroke()};e.onmousedown=f=>{f.preventDefault(),c=Date.now();const u=f.clientX,h=f.clientY;r=[],r.push({x:u,y:h}),s={x:u,y:h},a=wn({x:u,y:h},this.clientWidth,this.clientHeight),l=[]},e.onmousemove=f=>{if(f.preventDefault(),!s)return;const u=Number(f.clientX),h=Number(f.clientY);if(Math.abs(u-s.x)<5&&Math.abs(h-s.y)<5||(r.push({x:u,y:h}),l.push(wn({x:u,y:h},this.clientWidth,this.clientHeight)),r.length<3))return;const{control:m,end:g}=Cn(r);!m||!g||(d(s,m,g),s=g)},e.onmouseup=f=>{if(f.preventDefault(),s=null,r.length<3)return;this.data[this.uuid]||(this.data[this.uuid]=[]);const u=Date.now()-c,h={move:Object.assign({},a),uuid:this.uuid,line:[...l],color:this.color,duration:u<1280?u:u<2e3?1280:0};this.data[this.uuid].push(h),Pn(()=>{this.emitStateChange({type:st.Drawline,color:this.color,ready:this.ready,state:h,uuid:this.uuid})})},e.ontouchstart=f=>{f.preventDefault(),c=Date.now();const u=f.touches[0].clientX,h=f.touches[0].clientY;r=[],r.push({x:u,y:h}),s={x:u,y:h},console.log("ontouchstart",u,h,s),a=wn({x:u,y:h},this.clientWidth,this.clientHeight),l=[]},e.ontouchmove=f=>{if(f.preventDefault(),!s)return;const u=Number(f.touches[0].clientX),h=Number(f.touches[0].clientY);if(Math.abs(u-s.x)<5&&Math.abs(h-s.y)<5||(r.push({x:u,y:h}),l.push(wn({x:u,y:h},this.clientWidth,this.clientHeight)),r.length<3))return;const{control:m,end:g}=Cn(r);!m||!g||(d(s,m,g),s=g)},e.ontouchend=e.ontouchcancel=f=>{if(f.preventDefault(),s=null,r.length<3)return;this.data[this.uuid]||(this.data[this.uuid]=[]);const u=Date.now()-c,h={move:Object.assign({},a),line:[...l],uuid:this.uuid,color:this.color,duration:u<1280?u:u<2e3?1280:0};this.data[this.uuid].push(h),Pn(()=>{this.emitStateChange({type:st.Drawline,color:this.color,ready:this.ready,state:h,uuid:this.uuid})})}}emitStateChange(e,n=!0){if(e.type!==st.Drawline){this.emit("stateChange",e,n);return}const o=Date.now(),s=e.state;if(!s||!s.line)return;const r=Math.ceil(s.line.length/100);for(let a=0;a<r;a++){const l={uuid:this.uuid,color:this.color,ready:this.ready,type:e.type,state:{uuid:this.uuid,move:s.move,duration:s.duration,color:this.color,line:s.line.slice(a*100,(a+1)*100)},timestamp:o,end:a===r-1};il(a,20,()=>{this.emit("stateChange",l,n)})}}action(e){const{ready:n,type:o,uuid:s}=e;if(!n&&this.ready){this.closeBrush();return}if(n&&!this.ready){this.openBrush();return}if(!!this.ready)switch(o){case st.Drawline:const{state:r,timestamp:a,end:l}=e;if(!a||!r)return;this.tempLine[a]=[].concat(this.tempLine[a]||[],r.line),l&&(Object.assign(r,{line:this.tempLine[a]}),this.handleDrawLine(s,r,{},()=>delete this.tempLine[a]));break;case st.Undo:this.handleUndo(s);break}}handleDrawLine(e,n,{withUndo:o=!1},s=vo){!n||Object.prototype.toString.call(n)!="[object Object]"||Object.keys(n).length===0||(console.log("handleDrawLine",n,n.line),nl(()=>new Promise(r=>{if(o||(this.canvas[e]||(this.canvas[e]=this.initCanvas("_paintBrush-canvas--sync")),this.data[e]||(this.data[e]=[]),this.data[e].push(n)),!this.canvas[e])return;const a=this.canvas[e].getContext("2d");if(!a)return;const{line:l=[],color:c="black",duration:d=0,uuid:f}=n,u=pi(n.move||{},this.clientWidth,this.clientHeight);let h=[u];if(a.strokeStyle=c,a.beginPath(),a.moveTo(u.x,u.y),d&&!o){let m=[];const g=this;g.tween=sl({step:0},{step:l.length-1},d).onUpdate(({step:v})=>{var C;if(g.tweening=!0,!g.ready)return a.clearRect(0,0,g.canvas[f].width,g.canvas[f].height),(C=g.tween)==null?void 0:C.stop();const A=Math.floor(v);if(!m.find(w=>w===A)){if(m.push(A),console.log("__debug__",l,l[A],A),h.push(pi(l[A],g.clientWidth,g.clientHeight)),h.length<3)return;const{control:w,end:E}=Cn(h);if(!w||!E)return;a.quadraticCurveTo(w.x,w.y,E.x,E.y),a.stroke()}}).onComplete(v=>{g.tween=void 0,g.tweening=!1,m=[],h=[],s&&s(),r()})}else{for(let m=0;m<l.length;m++){if(h.push(pi(l[m],this.clientWidth,this.clientHeight)),h.length<3)continue;const{control:g,end:v}=Cn(h);!g||!v||a.quadraticCurveTo(g.x,g.y,v.x,v.y)}a.stroke(),h=[],s&&s(),r()}})))}handleUndo(e){if(console.log("handleUndo",e,this.canvas[e]),!this.canvas[e]||!this.data[e]||this.data[e].length===0)return;this.data[e].pop();const n=()=>{var s;const o=(s=this.canvas[e])==null?void 0:s.getContext("2d");o&&o.clearRect(0,0,this.canvas[e].width,this.canvas[e].height),this.data[e].forEach(r=>this.handleDrawLine(e,r,{withUndo:!0}))};if(this.tween&&this.tweening){this.tween.stop(),Pn(n,60);return}n()}destroyBrush(){this.closeBrush(),this.ready=!1,this.emit("readyChange",!0)}}class dl{constructor(t={}){p(this,"controller");const e=Object.assign({currentColor:"#f44336",onUndoText:"\u56DE\u9000",onExitText:"\u5173\u95ED"},t);this.controller=new cl(e)}on(t,e){this.controller.on(t,e)}off(t,e){this.controller.off(t,e)}once(t,e){this.controller.once(t,e)}show(){this.controller.openBrush()}action(t){this.controller.action(t)}get state(){return this.controller.state}get configs(){return this.controller.configs}dispose(){return this.controller.destroyBrush()}setCurrentColor(t){this.controller.updateCurrentColor(t)}}const ul=(i,t)=>{let e=!0,n=null;const s=N(N({},{lookAtCurrentCamera:!1,lockedPanoIndex:null,lockedLatitude:null,lockedLongitude:null}),t==null?void 0:t.config),r=new I.Scene,a=new me.Camera(60);let l=new I.Object3D,c,d;{const y=new I.DirectionalLight(16777215,.5);y.position.copy(new I.Vector3(1,1,1)),r.add(y)}{const y=new I.DirectionalLight(16777215,.3);r.add(y)}{const y=new I.AmbientLight(16777215,.3);r.add(y)}r.add(l);const f=()=>{if(!!i.renderer)return n||(n=new I.WebGLRenderer({antialias:!1,alpha:!0}),n.setPixelRatio(i.renderer.getPixelRatio()),n.outputEncoding=I.sRGBEncoding,n.setClearColor(1579548,0),n.autoClear=!0),n},u=()=>{l.traverse(y=>{y instanceof I.Mesh&&[].concat(y.material).forEach(x=>x.dispose())}),r.remove(l),l=new I.Object3D,r.add(l),C()},h=()=>{c=v(i.model,a.fov,a.aspect),d=i.model.bounding.getCenter(new I.Vector3);function y(x){const O=x.clone();return O.uniforms.modelAlpha.value=1,O.uniforms.map.value&&(O.uniforms.map.value.needsUpdate=!0),O}function L(x){if(x instanceof I.Mesh){const O=x.geometry,T=Array.isArray(x.material)?x.material.map(y):y(x.material);return new I.Mesh(O,T)}else if(x instanceof I.Group){const O=new I.Group;return x.children.forEach(T=>O.add(L(T))),O}else{const O=new I.Object3D;return x.children.forEach(T=>O.add(L(T))),O}}r.remove(l),l=L(i.model),r.add(l),C()},m=(y,L={})=>{const x=f();if(!x)return;y.appendChild(x.domElement),g(L);const O=window.getComputedStyle(y).position;O!=="relative"&&O!=="absolute"&&O!=="fixed"&&O!=="sticky"&&(y.style.position="relative")},g=(y={})=>{if(!n)return;const x=n.domElement.parentNode;if(x!=null&&x.nodeName){const{width:O=x.offsetWidth,height:T=x.offsetHeight}=y;n.setSize(O,T),a.aspect=O/T,a.updateProjectionMatrix()}C()};function v(y,L,x){const O=y.bounding,T=Math.pow(Math.pow(O.max.x-O.min.x+1,2)+Math.pow(O.max.y-O.min.y+1,2)+Math.pow(O.max.z-O.min.z+1,2),1/2);let G=T/2/Math.tan(Math.PI*L/360);return x<1&&(G=G/x),isNaN(G)?T:G}function A(y){return i.work.observers[y].standingPosition.clone()}const C=()=>{if(!c||!d)return;const y=i.getPose();y.fov=a.fov,y.offset=d,y.distance=c,typeof s.lockedLatitude=="number"&&(y.latitude=s.lockedLatitude),typeof s.lockedLongitude=="number"&&(y.longitude=s.lockedLongitude),typeof s.lockedPanoIndex=="number"&&(y.offset=A(s.lockedPanoIndex)),s.lookAtCurrentCamera&&(y.offset=i.camera.position.clone().setY(i.camera.position.y+1)),a.setFromPose(y),e=!0},w=()=>{e!==!0||!n||!n.domElement.parentNode||n.domElement.parentNode.offsetWidth===0||(n.render(r,a),e=!1)},E=()=>{n&&n.dispose(),n=null},D=y=>{Object.assign(s,y),C()};return Object.assign(window,{camera:a}),i.on("modelLoaded",h),i.on("modelWillLoad",u),i.on("cameraDirectionUpdate",C),i.on("dispose",E),i.on("renderFrame",w),i.on("cameraPositionUpdate",C),{appendTo:m,refresh:g,changeConfigs:D}};function fl(i){return typeof Symbol=="undefined"?`$Symbol<${i}>$`:Symbol(i)}const an=fl("$$EVENT$$");function En(i){return i[an]||(i[an]={}),i[an]}function hl(i){i[an]||delete i[an]}class ln{hasListener(t){const e=En(this);return Boolean((e==null?void 0:e[t])&&e[t].length>0)}on(t,e,n){const o=En(this);return o[t]||(o[t]=[]),o[t].push([e,n||!1]),()=>this.off(t,e)}once(t,e){return this.on(t,e,!0)}off(t,e){if(t===void 0){hl(this);return}const n=En(this);if(n[t]||(n[t]=[]),e===void 0){n[t].length=0;return}let o=0;for(;o<n[t].length&&n[t][o][0]!==e;o++);o<n[t].length&&n[t].splice(o,1)}emit(t,...e){let n=!1;const s=En(this)[t]||[];for(let r of s.slice()){const[a,l=!1]=r,c=a(...e);l&&this.off(t,a),c===!1&&(n=!0)}return n}}function Co(...i){const t=new H.Vector3;return i.forEach(e=>{t.add(e)}),t.divideScalar(i.length),t}function xn(i,t){const e=Math.round(i);return e%2===0?e:e+Number(t!=null&&t.smaller?-1:1)}const ml=({x:i,y:t,z:e})=>new H.Vector3(i,t,e),rt=([i,t,e])=>new H.Vector3(i,t,e),cn=i=>i instanceof H.Vector3?i:Array.isArray(i)?rt(i):ml(i),Po="1.0.2",pl=`CSS3DObjectPlus@${Po}`,gl=.00216,Al=.003;class Io extends Ct.CSS3DObject{constructor(e,n,o=Al,s=1,r="front"){const a=Math.max(gl,o),l=n[0].distanceTo(n[1]),c=n[1].distanceTo(n[2]),d=xn(l/o*s),f=xn(c/o*s),u=Co(...n);let h;if(a===o)e.style.width=`${d}px`,e.style.height=`${f}px`,h=e;else{const E=document.createElement("div");E.style.width=`${d}px`,E.style.height=`${f}px`,E.style.pointerEvents="none";const D=o/a;e.style.position="absolute",e.style.left="0",e.style.top="0",e.style.width=`${D*d}px`,e.style.height=`${D*f}px`,E.appendChild(e),h=E}super(h);p(this,"version",Po);p(this,"width");p(this,"height");p(this,"domWidthPx");p(this,"domHeightPx");p(this,"cornerPoints");p(this,"ratio");p(this,"container");p(this,"centerPosition");p(this,"mode","front");p(this,"hooks",new ln);p(this,"isCSS3DObjectPlus",!0);if(this.scale.set(a,a,a),this.cornerPoints=n,this.ratio=o,this.container=e,this.mode=r,a===o)this.width=l,this.height=c,this.domWidthPx=d,this.domHeightPx=f,this.centerPosition=u;else{const E=o/a;this.width=E*l,this.height=E*c,this.domWidthPx=E*d,this.domHeightPx=E*f,this.centerPosition=new H.Vector3().subVectors(u,n[0]).multiplyScalar(E).add(n[0])}e.classList.add(`${pl}__container`);const m=new H.Vector3().subVectors(n[1],n[0]),g=new H.Vector3().subVectors(n[3],n[0]),v=new H.Vector3().crossVectors(m,g).normalize();this.lookAt(v);const A=this.up.clone().applyQuaternion(this.quaternion),C=g.clone(),w=new H.Vector3().crossVectors(A,C).normalize();this.rotateOnWorldAxis(w,A.angleTo(C)),this.position.copy(u)}changeMode(e,n){if(e===this.mode)return;const o=this.mode;this.mode=e,this.hooks.emit("changeMode",e,o,n)}applyScaleMatrix4(e){this.scale.applyMatrix4(e),this.hooks.emit("applyScaleMatrix4",e)}applyMatrix4(e){super.applyMatrix4(e),this.hooks.emit("applyMatrix4",e)}applyQuaternion(e){return super.applyQuaternion(e),this.hooks.emit("applyQuaternion",e),this}}const vl="v2.0.1",Eo="CSS3DRenderer",Et=`${Eo}@${vl}`,xo=i=>`${Et}--${i}`,ue={};class ko{constructor(){p(this,"hooks",new ln);p(this,"state",{enabled:!0,visible:!0,disposed:!1});p(this,"store",{rendered:!1,disposers:[],frontModeCSS3DObjects:{},behindModeCSS3DObjects:{}});p(this,"create3DElement",(t,e,n)=>{if(this.state.disposed)return this.disposedErrorLog();const o=(()=>{const P={ratio:.00216,devicePixelRatio:1,mode:"front",autoRender:!0,container:document.createElement("div"),pointerEvents:"none"};return Object.assign(P,n)})(),s=e.map(cn);if((s==null?void 0:s.length)<4)return console.error(`${Et}: requires 4 point but params may have fewer`);const{ratio:r,devicePixelRatio:a,mode:l,autoRender:c,container:d,pointerEvents:f}=o,u=[],{css3DObject:h,opacityMesh:m}=this.createObject(s,{ratio:r,dpr:a,container:d,mode:l,pointerEvents:f});d.id=`container--${h.uuid}`;const g=l==="front"&&!ue.frontModeStore,v=l==="behind"&&!ue.behindModeStore;l==="front"&&this.initGlobalModeStore("front"),l==="behind"&&this.initGlobalModeStore("behind",o.scene),h.hooks.on("changeMode",(P,S,j)=>{var ce,de,ge;if(P===S)return;P==="front"&&this.initGlobalModeStore("front"),P==="behind"&&this.initGlobalModeStore("behind",j);const W=S==="front"?ue.frontModeStore:ue.behindModeStore,Y=P==="front"?ue.frontModeStore:ue.behindModeStore,te=S==="behind"?this.store.behindModeCSS3DObjects:this.store.frontModeCSS3DObjects,X=P==="behind"?this.store.behindModeCSS3DObjects:this.store.frontModeCSS3DObjects;if(!te||!X)return console.error(`${Et}: changeMode error: prevObjects or nextObjects is undefined`);const V=te[h.uuid];if(!V)return console.error(`${Et}: changeMode error: prevObject is undefined`);if(P==="behind"){const Pe=(ce=V.opacityMesh)!=null?ce:this.createOpacityMesh(V.css3DObject);W==null||W.css3DScene.remove(V.css3DObject),X[h.uuid]={css3DObject:h,opacityMesh:Pe,visible:!0,enabled:!0,mode:P,scene:j},Y==null||Y.css3DScene.add(h),j==null||j.add(Pe)}P==="front"&&(W==null||W.css3DScene.remove(V.css3DObject),(ge=(de=te[h.uuid])==null?void 0:de.scene)==null||ge.remove(V.opacityMesh),X[h.uuid]={css3DObject:h,visible:!0,enabled:!0,mode:P},Y==null||Y.css3DScene.add(h)),P==="behind"&&this.appendToElement(ue.behindModeContainer,"behind"),P==="front"&&this.appendToElement(ue.frontModeContainer,"front"),this.render(t),console.log("change success")});const A=l==="front"?ue.frontModeStore:ue.behindModeStore,{css3DScene:C,css3DRenderer:w}=A,E=(()=>{const P=()=>{var j,W;const S=h.mode;if(S==="front")this.store.frontModeCSS3DObjects[h.uuid]={visible:!0,enabled:!0,css3DObject:h,mode:"front"};else{if(!o.scene)return;this.store.behindModeCSS3DObjects[h.uuid]={visible:!0,enabled:!0,css3DObject:h,opacityMesh:m,mode:"behind",scene:o.scene}}C.getObjectById(h.id)||C.add(h),S==="behind"&&m&&((j=o.scene)!=null&&j.getObjectById(m.id)||(W=o.scene)==null||W.add(m),u.push(()=>{var Y;return m&&((Y=o.scene)==null?void 0:Y.remove(m))}))};return g||v?(w.domElement.style.position="absolute",w.domElement.style.top="0",w.domElement.style.userSelect="none",w.domElement.style.pointerEvents="none",w.domElement.classList.add(xo(l)),()=>{P(),this.render(t)}):(this.store.rendered=!0,()=>P())})(),D=l==="front"?ue.frontModeContainer:ue.behindModeContainer;if(D){this.appendToElement(D,l);const P=l==="front"?ue.frontModeStore:ue.behindModeStore;P&&(P.appendedToPage=!0)}const y=P=>this.setVisibleById(h.uuid,P),L=P=>this.setEnabledById(h.uuid,P),x=()=>y(!0),O=()=>y(!1),T=()=>L(!0),G=()=>L(!1),U=()=>(delete this.store.frontModeCSS3DObjects[h.uuid],delete this.store.behindModeCSS3DObjects[h.uuid],u.forEach(P=>P==null?void 0:P()),C.remove(h),C.children.length===0&&(typeof A.requestAnimationFrameId=="number"&&cancelAnimationFrame(A.requestAnimationFrameId),w.domElement.remove(),l==="front"&&(ue.frontModeStore=void 0),l==="behind"&&(ue.behindModeStore=void 0),ue.frontModeResizeObserver=void 0,ue.behindModeResizeObserver=void 0),!0);return this.store.disposers.push(U),c&&E(),{id:h.uuid,container:d,dispose:U,css3DObject:h,render:c?void 0:E,show:x,hide:O,setVisible:y,disable:G,enable:T,setEnabled:L,appendToElement:P=>this.appendToElement(P,l)}});p(this,"setVisibleById",(t,e)=>{var o;const n=(o=this.store.frontModeCSS3DObjects[t])!=null?o:this.store.behindModeCSS3DObjects[t];if(!n)return console.error("id not found",t);n.visible=e,this.state.visible&&(n.css3DObject.visible=e,n.mode==="behind"&&(n.opacityMesh.visible=e))});p(this,"setEnabledById",(t,e)=>{var s,r,a;const n=(s=this.store.frontModeCSS3DObjects[t])!=null?s:this.store.behindModeCSS3DObjects[t];if(!n)return;const o=n.mode==="front"?(r=ue.frontModeStore)==null?void 0:r.css3DScene:(a=ue.behindModeStore)==null?void 0:a.css3DScene;!o||(e?(o.add(n.css3DObject),n.mode==="behind"&&n.scene.add(n.opacityMesh)):(o.remove(n.css3DObject),n.mode==="behind"&&n.scene.remove(n.opacityMesh)),n.enabled=e)});p(this,"createObject",(t,e)=>{const{ratio:n,dpr:o,container:s,mode:r,pointerEvents:a}=e,l=new Io(s,t,n,o,r);s.style.pointerEvents=a,s.classList.add(`${Eo}__container`);const c=r==="behind"?this.createOpacityMesh(l):void 0;return{css3DObject:l,opacityMesh:c}});p(this,"createOpacityMesh",t=>{const{domWidthPx:e,domHeightPx:n}=t,o=new I.MeshBasicMaterial({opacity:0,color:0,transparent:!1,side:I.DoubleSide}),s=new I.PlaneGeometry(e,n),r=new I.Mesh(s,o);return r.name=xo("mesh"),r.position.copy(t.position),r.rotation.copy(t.rotation),r.scale.copy(t.scale),t.hooks.on("applyMatrix4",a=>r.applyMatrix4(a)),t.hooks.on("applyQuaternion",a=>r.applyQuaternion(a)),t.hooks.on("applyScaleMatrix4",a=>r.scale.applyMatrix4(a)),r});p(this,"createResizeObserver",(t,e,n=!0)=>{if(!t)return console.error("createResizeObserver: element is undefined"),{observe:()=>{},unobserve:()=>{}};const o=()=>{const r=xn(t.clientWidth,{smaller:!0}),a=xn(t.clientHeight,{smaller:!0});e(r,a)};if(typeof ResizeObserver=="undefined"||!ResizeObserver)return console.warn("createResizeObserver: ResizeObserver is undefined"),{observe:()=>o(),unobserve:()=>{}};const s=new ResizeObserver(o);return n&&o(),{observe:()=>s.observe(t),unobserve:()=>s.unobserve(t)}});p(this,"disposedErrorLog",()=>{console.error(`${Et} is disposed`)})}getCurrentState(){return this.state}setState(t,e={userAction:!0}){if(this.state.disposed)return this.disposedErrorLog();const n=N({},this.state);this.state=Object.assign(this.state,t),n.visible!==this.state.visible&&(t.visible?this.handleShow():this.handleHide()),n.enabled!==this.state.enabled&&(t.enabled?this.handleEnable():this.handleDisable()),this.hooks.emit("stateChange",{state:this.state,prevState:n,userAction:e.userAction})}dispose(){this.store.disposers.forEach(t=>t==null?void 0:t()),this.store.disposers=[],this.hooks.emit("dispose"),this.state.disposed=!0}show(){return Z(this,arguments,function*({userAction:t}={userAction:!0}){if(this.state.disposed)return this.disposedErrorLog();this.setState({visible:!0},{userAction:t}),this.hooks.emit("show",{userAction:t})})}hide(){return Z(this,arguments,function*({userAction:t}={userAction:!0}){if(this.state.disposed)return this.disposedErrorLog();this.setState({visible:!1},{userAction:t}),this.hooks.emit("hide",{userAction:t})})}enable({userAction:t}={userAction:!0}){if(this.state.disposed)return this.disposedErrorLog();this.setState({enabled:!0},{userAction:t}),this.hooks.emit("enable",{userAction:t})}disable({userAction:t}={userAction:!0}){if(this.state.disposed)return this.disposedErrorLog();this.setState({enabled:!1},{userAction:t}),this.hooks.emit("disable",{userAction:t})}setContainer(t,e){e==="front"?ue.frontModeContainer=t:ue.behindModeContainer=t}appendToElement(t,e){const n=e==="front"?ue.frontModeStore:ue.behindModeStore;if(!n){if(e==="front"&&!ue.frontModeContainer){if(!t)throw new Error(`${Et} Cannot append to container: front mode but container is ${t}`);ue.frontModeContainer=t}if(e==="behind"&&!ue.behindModeContainer){if(!t)throw new Error(`${Et} Cannot append to container: behind mode but container is ${t}`);ue.behindModeContainer=t}return}if(n.appendedToPage)return;const o=e==="behind"?ue.behindModeContainer:ue.frontModeContainer;if(!o)return console.error("wrapper is undefined");if(o.appendChild(n.css3DRenderer.domElement),e==="behind"&&!ue.behindModeResizeObserver){const s=(l,c)=>{var d;(d=ue.behindModeStore)==null||d.css3DRenderer.setSize(l,c)},{observe:r,unobserve:a}=this.createResizeObserver(o,s,!0);ue.behindModeResizeObserver={observe:r,unobserve:a},r(),this.store.disposers.push(a)}if(e==="front"&&!ue.frontModeResizeObserver){const s=(l,c)=>{var d;(d=ue.frontModeStore)==null||d.css3DRenderer.setSize(l,c)},{observe:r,unobserve:a}=this.createResizeObserver(o,s,!0);ue.frontModeResizeObserver={observe:r,unobserve:a},r(),this.store.disposers.push(a)}n.appendedToPage=!0}render(t){const e=ue.behindModeStore,n=ue.frontModeStore;if(e&&Object.keys(this.store.behindModeCSS3DObjects).length>0&&!e.requestAnimationFrameId){const o=()=>{const s=requestAnimationFrame(o);e.requestAnimationFrameId=s,e.css3DRenderer.render(e.css3DScene,t)};o()}if(n&&Object.keys(this.store.frontModeCSS3DObjects).length>0&&!n.requestAnimationFrameId){const o=()=>{const s=requestAnimationFrame(o);n.requestAnimationFrameId=s,n.css3DRenderer.render(n.css3DScene,t)};o()}Object.keys(this.store.frontModeCSS3DObjects).length===0&&(n==null?void 0:n.requestAnimationFrameId)!==void 0&&(cancelAnimationFrame(n.requestAnimationFrameId),n.requestAnimationFrameId=void 0),Object.keys(this.store.behindModeCSS3DObjects).length===0&&(e==null?void 0:e.requestAnimationFrameId)!==void 0&&(cancelAnimationFrame(e.requestAnimationFrameId),e.requestAnimationFrameId=void 0)}initGlobalModeStore(t,e){const n=t==="front"&&!ue.frontModeStore;t==="behind"&&!ue.behindModeStore&&(ue.behindModeStore={scene:e,css3DScene:new I.Scene,css3DRenderer:new Ct.CSS3DRenderer}),n&&(ue.frontModeStore={css3DScene:new I.Scene,css3DRenderer:new Ct.CSS3DRenderer})}handleShow(){return Z(this,null,function*(){Object.values(this.store.frontModeCSS3DObjects).forEach(t=>{t.css3DObject.visible=t.visible}),Object.values(this.store.behindModeCSS3DObjects).forEach(t=>{t.css3DObject.visible=t.visible,t.opacityMesh.visible=t.visible})})}handleHide(){return Z(this,null,function*(){Object.values(this.store.frontModeCSS3DObjects).forEach(t=>{t.css3DObject.visible=!1}),Object.values(this.store.behindModeCSS3DObjects).forEach(t=>{t.css3DObject.visible=!1,t.opacityMesh.visible=!1})})}handleEnable(){Object.values(this.store.frontModeCSS3DObjects).forEach(t=>{var e;!t.enabled||(e=ue.frontModeStore)==null||e.css3DScene.add(t.css3DObject)}),Object.values(this.store.behindModeCSS3DObjects).forEach(t=>{var e,n;!t.enabled||((e=ue.behindModeStore)==null||e.css3DScene.add(t.css3DObject),(n=ue.behindModeStore)==null||n.scene.add(t.opacityMesh))})}handleDisable(){Object.values(this.store.frontModeCSS3DObjects).forEach(t=>{var e;(e=ue.frontModeStore)==null||e.css3DScene.remove(t.css3DObject)}),Object.values(this.store.behindModeCSS3DObjects).forEach(t=>{var e,n;(e=ue.behindModeStore)==null||e.css3DScene.remove(t.css3DObject),(n=ue.behindModeStore)==null||n.scene.remove(t.opacityMesh)})}}const Do="CSS3DRenderPlugin@v2.0.1";class bl extends ko{constructor(e){super();p(this,"five");p(this,"behindFiveContainer");p(this,"staticPrefix","//vrlab-static.ljcdn.com");p(this,"create3DDomContainer",(e,n)=>{if(this.state.disposed)return;const o=(()=>{var m;(n==null?void 0:n.dpr)!==void 0&&console.warn(`${Do}: please use "config.devicePixelRatio" replace "config.dpr"`);const h={ratio:.00216,devicePixelRatio:(m=n==null?void 0:n.dpr)!=null?m:1,mode:"front",autoRender:!0};return Object.assign(h,n,(n==null?void 0:n.mode)==="behind"?{scene:this.five.scene}:void 0)})(),s=this.five.getElement();if(!s){console.error(`${Do}: five.getElement() is ${s}`);return}const{autoRender:r,mode:a}=o,l=a==="front"?s.parentElement:o.behindFiveContainer;this.setContainer(l||document.body,"front");const c=this.getBehindFiveElement();c&&this.setContainer(c,"behind"),this.appendToElement(l||document.body,a);const d=this.create3DElement(this.five.camera,e,pe(N({},o),{autoRender:!1}));if(!d)return;const f=d.render,u=()=>{var h;a==="front"&&f(),a==="behind"&&((h=this.five.model)!=null&&h.loaded?f():this.five.once("modelLoaded",()=>f()))};return r&&u(),pe(N({},d),{render:r?void 0:u})});this.five=e}disposeAll(){return this.dispose()}setState(...e){const n=super.setState(...e);return this.five.needsRender=!0,n}getBehindFiveElement(){var a;const{behindFiveContainer:e}=this;if(e)return e;const n=document.createElement("div");n.style.position="absolute",n.style.pointerEvents="none",n.style.top="0",n.style.left="0",n.style.width="100%",n.style.height="100%",this.behindFiveContainer=n;const o=this.five.getElement();if(!o)return;const s=(a=o==null?void 0:o.style.position)!=null?a:getComputedStyle(o);(!s||s==="static")&&console.warn("if you want to use css3DRenderPlugin behind mode, five element position is static, please set position to relative or absolute");const r=o==null?void 0:o.parentElement;if(r)return r.insertBefore(n,o),n}}const Wt=i=>new bl(i);function gi(i,t,e=new H.Vector3(1,1,1),n=!1){const o=new vn.Line(i,t);return o.setMaterial({dashed:n,color:e,linewidth:1}),o.remove(o.points),o}const yl=i=>{const t={intersection:null,disposers:[]},e=d=>{t.intersection=d},n=()=>{t.intersection=null};i.on("modelLoaded",()=>{i.on("intersectionOnModelUpdate",e),i.on("intersectionHidden",n)}),i.on("dispose",()=>{i.off("intersectionOnModelUpdate",e),i.off("intersectionHidden",n)});const o=(d,f=2,u=.1)=>{const h=f/2,g=c(d,u),v=new H.Group;v.add(gi(new H.Vector3(g.x+h,g.y,g.z),new H.Vector3(g.x-h,g.y,g.z),new H.Vector3(1,0,0)),gi(new H.Vector3(g.x,g.y+h,g.z),new H.Vector3(g.x,g.y-h,g.z),new H.Vector3(0,1,0)),gi(new H.Vector3(g.x,g.y,g.z+h),new H.Vector3(g.x,g.y,g.z-h),new H.Vector3(0,0,1))),i.scene.add(v),i.needsRender=!0;const A=()=>{i.scene.remove(v)};return t.disposers.push(A),{clear:A,pointAxesHelperMesh:v}},s=(d,f=0)=>{var A,C;const u=(A=i==null?void 0:i.camera)==null?void 0:A.position;if(!u)return!1;const h=d.distanceTo(u),m=d.sub(u).normalize(),g=new H.Raycaster(u,m),v=(C=i.model.intersectRaycaster(g))==null?void 0:C[0];return!(v&&v.distance+f<h)},r=()=>t.intersection,a=()=>{var d,f;(f=(d=t.disposers)==null?void 0:d.forEach)==null||f.call(d,u=>u==null?void 0:u()),i.off("intersectionOnModelUpdate",e),i.off("intersectionHidden",n)},l=a,c=(d,f)=>{const u=d.clone();return i.camera.position.clone().sub(u).setLength(f).add(u)};return{intersection:r,pointAxesHelper:o,movePointTowardsCamera:c,destroy:a,dispose:l,canSeePoint:s}};function ne(){}const Xt=i=>i;function Ie(i,t){for(const e in t)i[e]=t[e];return i}function Lo(i){return i()}function So(){return Object.create(null)}function at(i){i.forEach(Lo)}function Ai(i){return typeof i=="function"}function ie(i,t){return i!=i?t==t:i!==t||i&&typeof i=="object"||typeof i=="function"}let kn;function qe(i,t){return kn||(kn=document.createElement("a")),kn.href=t,i===kn.href}function wl(i){return Object.keys(i).length===0}function xt(i,t,e,n){if(i){const o=zo(i,t,e,n);return i[0](o)}}function zo(i,t,e,n){return i[1]&&n?Ie(e.ctx.slice(),i[1](n(t))):e.ctx}function kt(i,t,e,n){if(i[2]&&n){const o=i[2](n(e));if(t.dirty===void 0)return o;if(typeof o=="object"){const s=[],r=Math.max(t.dirty.length,o.length);for(let a=0;a<r;a+=1)s[a]=t.dirty[a]|o[a];return s}return t.dirty|o}return t.dirty}function Dt(i,t,e,n,o,s){if(o){const r=zo(t,e,n,s);i.p(r,o)}}function Lt(i){if(i.ctx.length>32){const t=[],e=i.ctx.length/32;for(let n=0;n<e;n++)t[n]=-1;return t}return-1}function Mo(i){const t={};for(const e in i)e[0]!=="$"&&(t[e]=i[e]);return t}function Dn(i,t){const e={};t=new Set(t);for(const n in i)!t.has(n)&&n[0]!=="$"&&(e[n]=i[n]);return e}function Oe(i){return i==null?"":i}const jo=typeof window!="undefined";let Bo=jo?()=>window.performance.now():()=>Date.now(),vi=jo?i=>requestAnimationFrame(i):ne;const Yt=new Set;function To(i){Yt.forEach(t=>{t.c(i)||(Yt.delete(t),t.f())}),Yt.size!==0&&vi(To)}function Qo(i){let t;return Yt.size===0&&vi(To),{promise:new Promise(e=>{Yt.add(t={c:i,f:e})}),abort(){Yt.delete(t)}}}function R(i,t){i.appendChild(t)}function le(i,t,e){const n=bi(i);if(!n.getElementById(t)){const o=Q("style");o.id=t,o.textContent=e,Oo(n,o)}}function bi(i){if(!i)return document;const t=i.getRootNode?i.getRootNode():i.ownerDocument;return t&&t.host?t:i.ownerDocument}function Cl(i){const t=Q("style");return Oo(bi(i),t),t.sheet}function Oo(i,t){R(i.head||i,t)}function B(i,t,e){i.insertBefore(t,e||null)}function z(i){i.parentNode.removeChild(i)}function Ke(i,t){for(let e=0;e<i.length;e+=1)i[e]&&i[e].d(t)}function Q(i){return document.createElement(i)}function be(i){return document.createElementNS("http://www.w3.org/2000/svg",i)}function Le(i){return document.createTextNode(i)}function _(){return Le(" ")}function Ae(){return Le("")}function xe(i,t,e,n){return i.addEventListener(t,e,n),()=>i.removeEventListener(t,e,n)}function yi(i){return function(t){return t.stopPropagation(),i.call(this,t)}}function b(i,t,e){e==null?i.removeAttribute(t):i.getAttribute(t)!==e&&i.setAttribute(t,e)}function Ln(i,t){const e=Object.getOwnPropertyDescriptors(i.__proto__);for(const n in t)t[n]==null?i.removeAttribute(n):n==="style"?i.style.cssText=t[n]:n==="__value"?i.value=i[n]=t[n]:e[n]&&e[n].set?i[n]=t[n]:b(i,n,t[n])}function Pl(i){return Array.from(i.childNodes)}function je(i,t){t=""+t,i.wholeText!==t&&(i.data=t)}function F(i,t,e,n){e===null?i.style.removeProperty(t):i.style.setProperty(t,e,n?"important":"")}let Sn;function Il(){if(Sn===void 0){Sn=!1;try{typeof window!="undefined"&&window.parent&&window.parent.document}catch(i){Sn=!0}}return Sn}function ft(i,t){getComputedStyle(i).position==="static"&&(i.style.position="relative");const n=Q("iframe");n.setAttribute("style","display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;"),n.setAttribute("aria-hidden","true"),n.tabIndex=-1;const o=Il();let s;return o?(n.src="data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\/script>",s=xe(window,"message",r=>{r.source===n.contentWindow&&t()})):(n.src="about:blank",n.onload=()=>{s=xe(n.contentWindow,"resize",t)}),R(i,n),()=>{(o||s&&n.contentWindow)&&s(),z(n)}}function q(i,t,e){i.classList[e?"add":"remove"](t)}function Ro(i,t,{bubbles:e=!1,cancelable:n=!1}={}){const o=document.createEvent("CustomEvent");return o.initCustomEvent(i,e,n,t),o}class zn{constructor(t=!1){this.is_svg=!1,this.is_svg=t,this.e=this.n=null}c(t){this.h(t)}m(t,e,n=null){this.e||(this.is_svg?this.e=be(e.nodeName):this.e=Q(e.nodeName),this.t=e,this.c(t)),this.i(n)}h(t){this.e.innerHTML=t,this.n=Array.from(this.e.childNodes)}i(t){for(let e=0;e<this.n.length;e+=1)B(this.t,this.n[e],t)}p(t){this.d(),this.h(t),this.i(this.a)}d(){this.n.forEach(z)}}const Mn=new Map;let jn=0;function El(i){let t=5381,e=i.length;for(;e--;)t=(t<<5)-t^i.charCodeAt(e);return t>>>0}function xl(i,t){const e={stylesheet:Cl(t),rules:{}};return Mn.set(i,e),e}function Fo(i,t,e,n,o,s,r,a=0){const l=16.666/n;let c=`{
|
|
101
|
+
`;class cl extends al{constructor(e){super();p(this,"configs");p(this,"clientWidth");p(this,"clientHeight");p(this,"ready",!1);p(this,"uuid",Fe());p(this,"tween");p(this,"tweening",!1);p(this,"container");p(this,"canvas");p(this,"data",{});p(this,"tempLine",{});this.configs=e,this.clientWidth=document.body.clientWidth,this.clientHeight=document.body.clientHeight,this.container=this.ifInsertToDOM(),this.canvas={},this.initCtrl()}get color(){return this.configs.currentColor}get state(){return this.data}get dpr(){return this.configs.DPR||1}ifInsertToDOM(){if(this.container)return this.container;if(this.configs.container)this.configs.container.id="_gl_paintBrush",this.container=this.configs.container;else if(document.getElementById("_gl_paintBrush"))this.container=document.getElementById("_gl_paintBrush");else{const e=document.createElement("div");e.id="_gl_paintBrush",document.body.appendChild(e),this.container=e}return this.container.innerHTML=ll,this.container}initCanvas(e){const n=document.createElement("canvas");n.className=e,n.width=this.clientWidth,n.height=this.clientHeight;const o=n.getContext("2d");if(!!o)return o.lineWidth=5*this.dpr,o.lineCap="round",o.lineJoin="round",this.container.appendChild(n),n}initCtrl(){const e=document.createElement("div");e.className="_paintBrush-ctrl";const n=document.createElement("div");n.className="_paintBrush-ctrlinner";const o=document.createElement("a");o.className="_paintBrush-ctrlitem _paintBrush-ctrlitem--undo",o.addEventListener("click",a=>{var u;if(a.stopPropagation(),this.configs.onClickUndo&&this.configs.onClickUndo(),!this.canvas[this.uuid]||!this.data[this.uuid]||this.data[this.uuid].length===0)return;const l=this.data[this.uuid].pop();l&&this.emitStateChange({type:st.Undo,color:this.color,ready:this.ready,state:l,uuid:this.uuid});const c=(u=this.canvas[this.uuid])==null?void 0:u.getContext("2d");if(!this.canvas[this.uuid])return;const{width:d,height:f}=this.canvas[this.uuid];c&&c.clearRect(0,0,d,f),this.data[this.uuid].forEach(h=>this.handleDrawLine(this.uuid,h,{withUndo:!0}))});const s=document.createElement("a");return s.className="_paintBrush-ctrlitem _paintBrush-ctrlitem--close",s.addEventListener("click",a=>{a.stopPropagation(),this.closeBrush(),this.configs.onClickClose&&this.configs.onClickClose()}),[o,s].forEach(a=>{const l=document.createElement("i");l.className="brush-icon";const c=document.createElement("span");c.className="brush-txt",c.innerText=a.className.endsWith("undo")?this.configs.onUndoText:this.configs.onExitText,a.appendChild(l),a.appendChild(c)}),n.appendChild(o),n.appendChild(s),e.appendChild(n),this.container.appendChild(e),e}openBrush(){if(this.ready)return;this.canvas[this.uuid]||(this.canvas[this.uuid]=this.initCanvas("_paintBrush-canvas")),this.container.className="brushing";const e=this.canvas[this.uuid];e.getContext("2d").clearRect(0,0,e.width,e.height),this.openBrushHandle(),this.ready=!0,this.emit("readyChange",!0)}closeBrush(){!this.ready||(this.container.className="",this.data={},this.tempLine={},Object.keys(this.canvas).forEach(e=>{this.canvas[e].ontouchstart=()=>!1,this.canvas[e].ontouchmove=()=>!1,this.canvas[e].ontouchend=()=>!1,this.canvas[e].ontouchcancel=()=>!1;const n=this.canvas[e].getContext("2d");n&&n.clearRect(0,0,this.canvas[e].width,this.canvas[e].height)}),this.ready=!1,this.emit("readyChange",!1),this.emitStateChange({type:st.Exit,color:this.color,ready:!1,uuid:this.uuid}))}updateCurrentColor(e){const n=this.canvas[this.uuid];if(!n)return;const o=n.getContext("2d");!o||(this.configs.currentColor=e,o.strokeStyle=e)}openBrushHandle(){const e=this.canvas[this.uuid];if(!e)return;const n=e.getContext("2d");if(!n)return;const o=this.color||"#6D92FF";n.strokeStyle=o;let s=null,r=[],a,l=[],c=0;const d=(f,u,h)=>{const m=this.color||"#ff0000";n.strokeStyle=m,n.beginPath(),n.moveTo(f.x,f.y),n.quadraticCurveTo(u.x,u.y,h.x,h.y),n.stroke()};e.onmousedown=f=>{f.preventDefault(),c=Date.now();const u=f.clientX,h=f.clientY;r=[],r.push({x:u,y:h}),s={x:u,y:h},a=wn({x:u,y:h},this.clientWidth,this.clientHeight),l=[]},e.onmousemove=f=>{if(f.preventDefault(),!s)return;const u=Number(f.clientX),h=Number(f.clientY);if(Math.abs(u-s.x)<5&&Math.abs(h-s.y)<5||(r.push({x:u,y:h}),l.push(wn({x:u,y:h},this.clientWidth,this.clientHeight)),r.length<3))return;const{control:m,end:g}=Cn(r);!m||!g||(d(s,m,g),s=g)},e.onmouseup=f=>{if(f.preventDefault(),s=null,r.length<3)return;this.data[this.uuid]||(this.data[this.uuid]=[]);const u=Date.now()-c,h={move:Object.assign({},a),uuid:this.uuid,line:[...l],color:this.color,duration:u<1280?u:u<2e3?1280:0};this.data[this.uuid].push(h),Pn(()=>{this.emitStateChange({type:st.Drawline,color:this.color,ready:this.ready,state:h,uuid:this.uuid})})},e.ontouchstart=f=>{f.preventDefault(),c=Date.now();const u=f.touches[0].clientX,h=f.touches[0].clientY;r=[],r.push({x:u,y:h}),s={x:u,y:h},console.log("ontouchstart",u,h,s),a=wn({x:u,y:h},this.clientWidth,this.clientHeight),l=[]},e.ontouchmove=f=>{if(f.preventDefault(),!s)return;const u=Number(f.touches[0].clientX),h=Number(f.touches[0].clientY);if(Math.abs(u-s.x)<5&&Math.abs(h-s.y)<5||(r.push({x:u,y:h}),l.push(wn({x:u,y:h},this.clientWidth,this.clientHeight)),r.length<3))return;const{control:m,end:g}=Cn(r);!m||!g||(d(s,m,g),s=g)},e.ontouchend=e.ontouchcancel=f=>{if(f.preventDefault(),s=null,r.length<3)return;this.data[this.uuid]||(this.data[this.uuid]=[]);const u=Date.now()-c,h={move:Object.assign({},a),line:[...l],uuid:this.uuid,color:this.color,duration:u<1280?u:u<2e3?1280:0};this.data[this.uuid].push(h),Pn(()=>{this.emitStateChange({type:st.Drawline,color:this.color,ready:this.ready,state:h,uuid:this.uuid})})}}emitStateChange(e,n=!0){if(e.type!==st.Drawline){this.emit("stateChange",e,n);return}const o=Date.now(),s=e.state;if(!s||!s.line)return;const r=Math.ceil(s.line.length/100);for(let a=0;a<r;a++){const l={uuid:this.uuid,color:this.color,ready:this.ready,type:e.type,state:{uuid:this.uuid,move:s.move,duration:s.duration,color:this.color,line:s.line.slice(a*100,(a+1)*100)},timestamp:o,end:a===r-1};il(a,20,()=>{this.emit("stateChange",l,n)})}}action(e){const{ready:n,type:o,uuid:s}=e;if(!n&&this.ready){this.closeBrush();return}if(n&&!this.ready){this.openBrush();return}if(!!this.ready)switch(o){case st.Drawline:const{state:r,timestamp:a,end:l}=e;if(!a||!r)return;this.tempLine[a]=[].concat(this.tempLine[a]||[],r.line),l&&(Object.assign(r,{line:this.tempLine[a]}),this.handleDrawLine(s,r,{},()=>delete this.tempLine[a]));break;case st.Undo:this.handleUndo(s);break}}handleDrawLine(e,n,{withUndo:o=!1},s=vo){!n||Object.prototype.toString.call(n)!="[object Object]"||Object.keys(n).length===0||(console.log("handleDrawLine",n,n.line),nl(()=>new Promise(r=>{if(o||(this.canvas[e]||(this.canvas[e]=this.initCanvas("_paintBrush-canvas--sync")),this.data[e]||(this.data[e]=[]),this.data[e].push(n)),!this.canvas[e])return;const a=this.canvas[e].getContext("2d");if(!a)return;const{line:l=[],color:c="black",duration:d=0,uuid:f}=n,u=gi(n.move||{},this.clientWidth,this.clientHeight);let h=[u];if(a.strokeStyle=c,a.beginPath(),a.moveTo(u.x,u.y),d&&!o){let m=[];const g=this;g.tween=sl({step:0},{step:l.length-1},d).onUpdate(({step:v})=>{var C;if(g.tweening=!0,!g.ready)return a.clearRect(0,0,g.canvas[f].width,g.canvas[f].height),(C=g.tween)==null?void 0:C.stop();const A=Math.floor(v);if(!m.find(w=>w===A)){if(m.push(A),console.log("__debug__",l,l[A],A),h.push(gi(l[A],g.clientWidth,g.clientHeight)),h.length<3)return;const{control:w,end:E}=Cn(h);if(!w||!E)return;a.quadraticCurveTo(w.x,w.y,E.x,E.y),a.stroke()}}).onComplete(v=>{g.tween=void 0,g.tweening=!1,m=[],h=[],s&&s(),r()})}else{for(let m=0;m<l.length;m++){if(h.push(gi(l[m],this.clientWidth,this.clientHeight)),h.length<3)continue;const{control:g,end:v}=Cn(h);!g||!v||a.quadraticCurveTo(g.x,g.y,v.x,v.y)}a.stroke(),h=[],s&&s(),r()}})))}handleUndo(e){if(console.log("handleUndo",e,this.canvas[e]),!this.canvas[e]||!this.data[e]||this.data[e].length===0)return;this.data[e].pop();const n=()=>{var s;const o=(s=this.canvas[e])==null?void 0:s.getContext("2d");o&&o.clearRect(0,0,this.canvas[e].width,this.canvas[e].height),this.data[e].forEach(r=>this.handleDrawLine(e,r,{withUndo:!0}))};if(this.tween&&this.tweening){this.tween.stop(),Pn(n,60);return}n()}destroyBrush(){this.closeBrush(),this.ready=!1,this.emit("readyChange",!0)}}class dl{constructor(t={}){p(this,"controller");const e=Object.assign({currentColor:"#f44336",onUndoText:"\u56DE\u9000",onExitText:"\u5173\u95ED"},t);this.controller=new cl(e)}on(t,e){this.controller.on(t,e)}off(t,e){this.controller.off(t,e)}once(t,e){this.controller.once(t,e)}show(){this.controller.openBrush()}action(t){this.controller.action(t)}get state(){return this.controller.state}get configs(){return this.controller.configs}dispose(){return this.controller.destroyBrush()}setCurrentColor(t){this.controller.updateCurrentColor(t)}}const ul=(i,t)=>{let e=!0,n=null;const s=W(W({},{lookAtCurrentCamera:!1,lockedPanoIndex:null,lockedLatitude:null,lockedLongitude:null}),t==null?void 0:t.config),r=new I.Scene,a=new me.Camera(60);let l=new I.Object3D,c,d;{const y=new I.DirectionalLight(16777215,.5);y.position.copy(new I.Vector3(1,1,1)),r.add(y)}{const y=new I.DirectionalLight(16777215,.3);r.add(y)}{const y=new I.AmbientLight(16777215,.3);r.add(y)}r.add(l);const f=()=>{if(!!i.renderer)return n||(n=new I.WebGLRenderer({antialias:!1,alpha:!0}),n.setPixelRatio(i.renderer.getPixelRatio()),n.outputEncoding=I.sRGBEncoding,n.setClearColor(1579548,0),n.autoClear=!0),n},u=()=>{l.traverse(y=>{y instanceof I.Mesh&&[].concat(y.material).forEach(x=>x.dispose())}),r.remove(l),l=new I.Object3D,r.add(l),C()},h=()=>{c=v(i.model,a.fov,a.aspect),d=i.model.bounding.getCenter(new I.Vector3);function y(x){const R=x.clone();return R.uniforms.modelAlpha.value=1,R.uniforms.map.value&&(R.uniforms.map.value.needsUpdate=!0),R}function L(x){if(x instanceof I.Mesh){const R=x.geometry,T=Array.isArray(x.material)?x.material.map(y):y(x.material);return new I.Mesh(R,T)}else if(x instanceof I.Group){const R=new I.Group;return x.children.forEach(T=>R.add(L(T))),R}else{const R=new I.Object3D;return x.children.forEach(T=>R.add(L(T))),R}}r.remove(l),l=L(i.model),r.add(l),C()},m=(y,L={})=>{const x=f();if(!x)return;y.appendChild(x.domElement),g(L);const R=window.getComputedStyle(y).position;R!=="relative"&&R!=="absolute"&&R!=="fixed"&&R!=="sticky"&&(y.style.position="relative")},g=(y={})=>{if(!n)return;const x=n.domElement.parentNode;if(x!=null&&x.nodeName){const{width:R=x.offsetWidth,height:T=x.offsetHeight}=y;n.setSize(R,T),a.aspect=R/T,a.updateProjectionMatrix()}C()};function v(y,L,x){const R=y.bounding,T=Math.pow(Math.pow(R.max.x-R.min.x+1,2)+Math.pow(R.max.y-R.min.y+1,2)+Math.pow(R.max.z-R.min.z+1,2),1/2);let G=T/2/Math.tan(Math.PI*L/360);return x<1&&(G=G/x),isNaN(G)?T:G}function A(y){return i.work.observers[y].standingPosition.clone()}const C=()=>{if(!c||!d)return;const y=i.getPose();y.fov=a.fov,y.offset=d,y.distance=c,typeof s.lockedLatitude=="number"&&(y.latitude=s.lockedLatitude),typeof s.lockedLongitude=="number"&&(y.longitude=s.lockedLongitude),typeof s.lockedPanoIndex=="number"&&(y.offset=A(s.lockedPanoIndex)),s.lookAtCurrentCamera&&(y.offset=i.camera.position.clone().setY(i.camera.position.y+1)),a.setFromPose(y),e=!0},w=()=>{e!==!0||!n||!n.domElement.parentNode||n.domElement.parentNode.offsetWidth===0||(n.render(r,a),e=!1)},E=()=>{n&&n.dispose(),n=null},D=y=>{Object.assign(s,y),C()};return Object.assign(window,{camera:a}),i.on("modelLoaded",h),i.on("modelWillLoad",u),i.on("cameraDirectionUpdate",C),i.on("dispose",E),i.on("renderFrame",w),i.on("cameraPositionUpdate",C),{appendTo:m,refresh:g,changeConfigs:D}};function fl(i){return typeof Symbol=="undefined"?`$Symbol<${i}>$`:Symbol(i)}const an=fl("$$EVENT$$");function En(i){return i[an]||(i[an]={}),i[an]}function hl(i){i[an]||delete i[an]}class ln{hasListener(t){const e=En(this);return Boolean((e==null?void 0:e[t])&&e[t].length>0)}on(t,e,n){const o=En(this);return o[t]||(o[t]=[]),o[t].push([e,n||!1]),()=>this.off(t,e)}once(t,e){return this.on(t,e,!0)}off(t,e){if(t===void 0){hl(this);return}const n=En(this);if(n[t]||(n[t]=[]),e===void 0){n[t].length=0;return}let o=0;for(;o<n[t].length&&n[t][o][0]!==e;o++);o<n[t].length&&n[t].splice(o,1)}emit(t,...e){let n=!1;const s=En(this)[t]||[];for(let r of s.slice()){const[a,l=!1]=r,c=a(...e);l&&this.off(t,a),c===!1&&(n=!0)}return n}}function Co(...i){const t=new H.Vector3;return i.forEach(e=>{t.add(e)}),t.divideScalar(i.length),t}function xn(i,t){const e=Math.round(i);return e%2===0?e:e+Number(t!=null&&t.smaller?-1:1)}const ml=({x:i,y:t,z:e})=>new H.Vector3(i,t,e),rt=([i,t,e])=>new H.Vector3(i,t,e),cn=i=>i instanceof H.Vector3?i:Array.isArray(i)?rt(i):ml(i),Po="1.0.2",pl=`CSS3DObjectPlus@${Po}`,gl=.00216,Al=.003;class Io extends Ct.CSS3DObject{constructor(e,n,o=Al,s=1,r="front"){const a=Math.max(gl,o),l=n[0].distanceTo(n[1]),c=n[1].distanceTo(n[2]),d=xn(l/o*s),f=xn(c/o*s),u=Co(...n);let h;if(a===o)e.style.width=`${d}px`,e.style.height=`${f}px`,h=e;else{const E=document.createElement("div");E.style.width=`${d}px`,E.style.height=`${f}px`,E.style.pointerEvents="none";const D=o/a;e.style.position="absolute",e.style.left="0",e.style.top="0",e.style.width=`${D*d}px`,e.style.height=`${D*f}px`,E.appendChild(e),h=E}super(h);p(this,"version",Po);p(this,"width");p(this,"height");p(this,"domWidthPx");p(this,"domHeightPx");p(this,"cornerPoints");p(this,"ratio");p(this,"container");p(this,"centerPosition");p(this,"mode","front");p(this,"hooks",new ln);p(this,"isCSS3DObjectPlus",!0);if(this.scale.set(a,a,a),this.cornerPoints=n,this.ratio=o,this.container=e,this.mode=r,a===o)this.width=l,this.height=c,this.domWidthPx=d,this.domHeightPx=f,this.centerPosition=u;else{const E=o/a;this.width=E*l,this.height=E*c,this.domWidthPx=E*d,this.domHeightPx=E*f,this.centerPosition=new H.Vector3().subVectors(u,n[0]).multiplyScalar(E).add(n[0])}e.classList.add(`${pl}__container`);const m=new H.Vector3().subVectors(n[1],n[0]),g=new H.Vector3().subVectors(n[3],n[0]),v=new H.Vector3().crossVectors(m,g).normalize();this.lookAt(v);const A=this.up.clone().applyQuaternion(this.quaternion),C=g.clone(),w=new H.Vector3().crossVectors(A,C).normalize();this.rotateOnWorldAxis(w,A.angleTo(C)),this.position.copy(u)}changeMode(e,n){if(e===this.mode)return;const o=this.mode;this.mode=e,this.hooks.emit("changeMode",e,o,n)}applyScaleMatrix4(e){this.scale.applyMatrix4(e),this.hooks.emit("applyScaleMatrix4",e)}applyMatrix4(e){super.applyMatrix4(e),this.hooks.emit("applyMatrix4",e)}applyQuaternion(e){return super.applyQuaternion(e),this.hooks.emit("applyQuaternion",e),this}}const vl="v2.0.1",Eo="CSS3DRenderer",Et=`${Eo}@${vl}`,xo=i=>`${Et}--${i}`,ue={};class ko{constructor(){p(this,"hooks",new ln);p(this,"state",{enabled:!0,visible:!0,disposed:!1});p(this,"store",{rendered:!1,disposers:[],frontModeCSS3DObjects:{},behindModeCSS3DObjects:{}});p(this,"create3DElement",(t,e,n)=>{if(this.state.disposed)return this.disposedErrorLog();const o=(()=>{const P={ratio:.00216,devicePixelRatio:1,mode:"front",autoRender:!0,container:document.createElement("div"),pointerEvents:"none"};return Object.assign(P,n)})(),s=e.map(cn);if((s==null?void 0:s.length)<4)return console.error(`${Et}: requires 4 point but params may have fewer`);const{ratio:r,devicePixelRatio:a,mode:l,autoRender:c,container:d,pointerEvents:f}=o,u=[],{css3DObject:h,opacityMesh:m}=this.createObject(s,{ratio:r,dpr:a,container:d,mode:l,pointerEvents:f});d.id=`container--${h.uuid}`;const g=l==="front"&&!ue.frontModeStore,v=l==="behind"&&!ue.behindModeStore;l==="front"&&this.initGlobalModeStore("front"),l==="behind"&&this.initGlobalModeStore("behind",o.scene),h.hooks.on("changeMode",(P,S,j)=>{var ce,de,ge;if(P===S)return;P==="front"&&this.initGlobalModeStore("front"),P==="behind"&&this.initGlobalModeStore("behind",j);const N=S==="front"?ue.frontModeStore:ue.behindModeStore,Y=P==="front"?ue.frontModeStore:ue.behindModeStore,te=S==="behind"?this.store.behindModeCSS3DObjects:this.store.frontModeCSS3DObjects,X=P==="behind"?this.store.behindModeCSS3DObjects:this.store.frontModeCSS3DObjects;if(!te||!X)return console.error(`${Et}: changeMode error: prevObjects or nextObjects is undefined`);const V=te[h.uuid];if(!V)return console.error(`${Et}: changeMode error: prevObject is undefined`);if(P==="behind"){const Pe=(ce=V.opacityMesh)!=null?ce:this.createOpacityMesh(V.css3DObject);N==null||N.css3DScene.remove(V.css3DObject),X[h.uuid]={css3DObject:h,opacityMesh:Pe,visible:!0,enabled:!0,mode:P,scene:j},Y==null||Y.css3DScene.add(h),j==null||j.add(Pe)}P==="front"&&(N==null||N.css3DScene.remove(V.css3DObject),(ge=(de=te[h.uuid])==null?void 0:de.scene)==null||ge.remove(V.opacityMesh),X[h.uuid]={css3DObject:h,visible:!0,enabled:!0,mode:P},Y==null||Y.css3DScene.add(h)),P==="behind"&&this.appendToElement(ue.behindModeContainer,"behind"),P==="front"&&this.appendToElement(ue.frontModeContainer,"front"),this.render(t),console.log("change success")});const A=l==="front"?ue.frontModeStore:ue.behindModeStore,{css3DScene:C,css3DRenderer:w}=A,E=(()=>{const P=()=>{var j,N;const S=h.mode;if(S==="front")this.store.frontModeCSS3DObjects[h.uuid]={visible:!0,enabled:!0,css3DObject:h,mode:"front"};else{if(!o.scene)return;this.store.behindModeCSS3DObjects[h.uuid]={visible:!0,enabled:!0,css3DObject:h,opacityMesh:m,mode:"behind",scene:o.scene}}C.getObjectById(h.id)||C.add(h),S==="behind"&&m&&((j=o.scene)!=null&&j.getObjectById(m.id)||(N=o.scene)==null||N.add(m),u.push(()=>{var Y;return m&&((Y=o.scene)==null?void 0:Y.remove(m))}))};return g||v?(w.domElement.style.position="absolute",w.domElement.style.top="0",w.domElement.style.userSelect="none",w.domElement.style.pointerEvents="none",w.domElement.classList.add(xo(l)),()=>{P(),this.render(t)}):(this.store.rendered=!0,()=>P())})(),D=l==="front"?ue.frontModeContainer:ue.behindModeContainer;if(D){this.appendToElement(D,l);const P=l==="front"?ue.frontModeStore:ue.behindModeStore;P&&(P.appendedToPage=!0)}const y=P=>this.setVisibleById(h.uuid,P),L=P=>this.setEnabledById(h.uuid,P),x=()=>y(!0),R=()=>y(!1),T=()=>L(!0),G=()=>L(!1),U=()=>(delete this.store.frontModeCSS3DObjects[h.uuid],delete this.store.behindModeCSS3DObjects[h.uuid],u.forEach(P=>P==null?void 0:P()),C.remove(h),C.children.length===0&&(typeof A.requestAnimationFrameId=="number"&&cancelAnimationFrame(A.requestAnimationFrameId),w.domElement.remove(),l==="front"&&(ue.frontModeStore=void 0),l==="behind"&&(ue.behindModeStore=void 0),ue.frontModeResizeObserver=void 0,ue.behindModeResizeObserver=void 0),!0);return this.store.disposers.push(U),c&&E(),{id:h.uuid,container:d,dispose:U,css3DObject:h,render:c?void 0:E,show:x,hide:R,setVisible:y,disable:G,enable:T,setEnabled:L,appendToElement:P=>this.appendToElement(P,l)}});p(this,"setVisibleById",(t,e)=>{var o;const n=(o=this.store.frontModeCSS3DObjects[t])!=null?o:this.store.behindModeCSS3DObjects[t];if(!n)return console.error("id not found",t);n.visible=e,this.state.visible&&(n.css3DObject.visible=e,n.mode==="behind"&&(n.opacityMesh.visible=e))});p(this,"setEnabledById",(t,e)=>{var s,r,a;const n=(s=this.store.frontModeCSS3DObjects[t])!=null?s:this.store.behindModeCSS3DObjects[t];if(!n)return;const o=n.mode==="front"?(r=ue.frontModeStore)==null?void 0:r.css3DScene:(a=ue.behindModeStore)==null?void 0:a.css3DScene;!o||(e?(o.add(n.css3DObject),n.mode==="behind"&&n.scene.add(n.opacityMesh)):(o.remove(n.css3DObject),n.mode==="behind"&&n.scene.remove(n.opacityMesh)),n.enabled=e)});p(this,"createObject",(t,e)=>{const{ratio:n,dpr:o,container:s,mode:r,pointerEvents:a}=e,l=new Io(s,t,n,o,r);s.style.pointerEvents=a,s.classList.add(`${Eo}__container`);const c=r==="behind"?this.createOpacityMesh(l):void 0;return{css3DObject:l,opacityMesh:c}});p(this,"createOpacityMesh",t=>{const{domWidthPx:e,domHeightPx:n}=t,o=new I.MeshBasicMaterial({opacity:0,color:0,transparent:!1,side:I.DoubleSide}),s=new I.PlaneGeometry(e,n),r=new I.Mesh(s,o);return r.name=xo("mesh"),r.position.copy(t.position),r.rotation.copy(t.rotation),r.scale.copy(t.scale),t.hooks.on("applyMatrix4",a=>r.applyMatrix4(a)),t.hooks.on("applyQuaternion",a=>r.applyQuaternion(a)),t.hooks.on("applyScaleMatrix4",a=>r.scale.applyMatrix4(a)),r});p(this,"createResizeObserver",(t,e,n=!0)=>{if(!t)return console.error("createResizeObserver: element is undefined"),{observe:()=>{},unobserve:()=>{}};const o=()=>{const r=xn(t.clientWidth,{smaller:!0}),a=xn(t.clientHeight,{smaller:!0});e(r,a)};if(typeof ResizeObserver=="undefined"||!ResizeObserver)return console.warn("createResizeObserver: ResizeObserver is undefined"),{observe:()=>o(),unobserve:()=>{}};const s=new ResizeObserver(o);return n&&o(),{observe:()=>s.observe(t),unobserve:()=>s.unobserve(t)}});p(this,"disposedErrorLog",()=>{console.error(`${Et} is disposed`)})}getCurrentState(){return this.state}setState(t,e={userAction:!0}){if(this.state.disposed)return this.disposedErrorLog();const n=W({},this.state);this.state=Object.assign(this.state,t),n.visible!==this.state.visible&&(t.visible?this.handleShow():this.handleHide()),n.enabled!==this.state.enabled&&(t.enabled?this.handleEnable():this.handleDisable()),this.hooks.emit("stateChange",{state:this.state,prevState:n,userAction:e.userAction})}dispose(){this.store.disposers.forEach(t=>t==null?void 0:t()),this.store.disposers=[],this.hooks.emit("dispose"),this.state.disposed=!0}show(){return Z(this,arguments,function*({userAction:t}={userAction:!0}){if(this.state.disposed)return this.disposedErrorLog();this.setState({visible:!0},{userAction:t}),this.hooks.emit("show",{userAction:t})})}hide(){return Z(this,arguments,function*({userAction:t}={userAction:!0}){if(this.state.disposed)return this.disposedErrorLog();this.setState({visible:!1},{userAction:t}),this.hooks.emit("hide",{userAction:t})})}enable({userAction:t}={userAction:!0}){if(this.state.disposed)return this.disposedErrorLog();this.setState({enabled:!0},{userAction:t}),this.hooks.emit("enable",{userAction:t})}disable({userAction:t}={userAction:!0}){if(this.state.disposed)return this.disposedErrorLog();this.setState({enabled:!1},{userAction:t}),this.hooks.emit("disable",{userAction:t})}setContainer(t,e){e==="front"?ue.frontModeContainer=t:ue.behindModeContainer=t}appendToElement(t,e){const n=e==="front"?ue.frontModeStore:ue.behindModeStore;if(!n){if(e==="front"&&!ue.frontModeContainer){if(!t)throw new Error(`${Et} Cannot append to container: front mode but container is ${t}`);ue.frontModeContainer=t}if(e==="behind"&&!ue.behindModeContainer){if(!t)throw new Error(`${Et} Cannot append to container: behind mode but container is ${t}`);ue.behindModeContainer=t}return}if(n.appendedToPage)return;const o=e==="behind"?ue.behindModeContainer:ue.frontModeContainer;if(!o)return console.error("wrapper is undefined");if(o.appendChild(n.css3DRenderer.domElement),e==="behind"&&!ue.behindModeResizeObserver){const s=(l,c)=>{var d;(d=ue.behindModeStore)==null||d.css3DRenderer.setSize(l,c)},{observe:r,unobserve:a}=this.createResizeObserver(o,s,!0);ue.behindModeResizeObserver={observe:r,unobserve:a},r(),this.store.disposers.push(a)}if(e==="front"&&!ue.frontModeResizeObserver){const s=(l,c)=>{var d;(d=ue.frontModeStore)==null||d.css3DRenderer.setSize(l,c)},{observe:r,unobserve:a}=this.createResizeObserver(o,s,!0);ue.frontModeResizeObserver={observe:r,unobserve:a},r(),this.store.disposers.push(a)}n.appendedToPage=!0}render(t){const e=ue.behindModeStore,n=ue.frontModeStore;if(e&&Object.keys(this.store.behindModeCSS3DObjects).length>0&&!e.requestAnimationFrameId){const o=()=>{const s=requestAnimationFrame(o);e.requestAnimationFrameId=s,e.css3DRenderer.render(e.css3DScene,t)};o()}if(n&&Object.keys(this.store.frontModeCSS3DObjects).length>0&&!n.requestAnimationFrameId){const o=()=>{const s=requestAnimationFrame(o);n.requestAnimationFrameId=s,n.css3DRenderer.render(n.css3DScene,t)};o()}Object.keys(this.store.frontModeCSS3DObjects).length===0&&(n==null?void 0:n.requestAnimationFrameId)!==void 0&&(cancelAnimationFrame(n.requestAnimationFrameId),n.requestAnimationFrameId=void 0),Object.keys(this.store.behindModeCSS3DObjects).length===0&&(e==null?void 0:e.requestAnimationFrameId)!==void 0&&(cancelAnimationFrame(e.requestAnimationFrameId),e.requestAnimationFrameId=void 0)}initGlobalModeStore(t,e){const n=t==="front"&&!ue.frontModeStore;t==="behind"&&!ue.behindModeStore&&(ue.behindModeStore={scene:e,css3DScene:new I.Scene,css3DRenderer:new Ct.CSS3DRenderer}),n&&(ue.frontModeStore={css3DScene:new I.Scene,css3DRenderer:new Ct.CSS3DRenderer})}handleShow(){return Z(this,null,function*(){Object.values(this.store.frontModeCSS3DObjects).forEach(t=>{t.css3DObject.visible=t.visible}),Object.values(this.store.behindModeCSS3DObjects).forEach(t=>{t.css3DObject.visible=t.visible,t.opacityMesh.visible=t.visible})})}handleHide(){return Z(this,null,function*(){Object.values(this.store.frontModeCSS3DObjects).forEach(t=>{t.css3DObject.visible=!1}),Object.values(this.store.behindModeCSS3DObjects).forEach(t=>{t.css3DObject.visible=!1,t.opacityMesh.visible=!1})})}handleEnable(){Object.values(this.store.frontModeCSS3DObjects).forEach(t=>{var e;!t.enabled||(e=ue.frontModeStore)==null||e.css3DScene.add(t.css3DObject)}),Object.values(this.store.behindModeCSS3DObjects).forEach(t=>{var e,n;!t.enabled||((e=ue.behindModeStore)==null||e.css3DScene.add(t.css3DObject),(n=ue.behindModeStore)==null||n.scene.add(t.opacityMesh))})}handleDisable(){Object.values(this.store.frontModeCSS3DObjects).forEach(t=>{var e;(e=ue.frontModeStore)==null||e.css3DScene.remove(t.css3DObject)}),Object.values(this.store.behindModeCSS3DObjects).forEach(t=>{var e,n;(e=ue.behindModeStore)==null||e.css3DScene.remove(t.css3DObject),(n=ue.behindModeStore)==null||n.scene.remove(t.opacityMesh)})}}const Do="CSS3DRenderPlugin@v2.0.1";class bl extends ko{constructor(e){super();p(this,"five");p(this,"behindFiveContainer");p(this,"staticPrefix","//vrlab-static.ljcdn.com");p(this,"create3DDomContainer",(e,n)=>{if(this.state.disposed)return;const o=(()=>{var m;(n==null?void 0:n.dpr)!==void 0&&console.warn(`${Do}: please use "config.devicePixelRatio" replace "config.dpr"`);const h={ratio:.00216,devicePixelRatio:(m=n==null?void 0:n.dpr)!=null?m:1,mode:"front",autoRender:!0};return Object.assign(h,n,(n==null?void 0:n.mode)==="behind"?{scene:this.five.scene}:void 0)})(),s=this.five.getElement();if(!s){console.error(`${Do}: five.getElement() is ${s}`);return}const{autoRender:r,mode:a}=o,l=a==="front"?s.parentElement:o.behindFiveContainer;this.setContainer(l||document.body,"front");const c=this.getBehindFiveElement();c&&this.setContainer(c,"behind"),this.appendToElement(l||document.body,a);const d=this.create3DElement(this.five.camera,e,pe(W({},o),{autoRender:!1}));if(!d)return;const f=d.render,u=()=>{var h;a==="front"&&f(),a==="behind"&&((h=this.five.model)!=null&&h.loaded?f():this.five.once("modelLoaded",()=>f()))};return r&&u(),pe(W({},d),{render:r?void 0:u})});this.five=e}disposeAll(){return this.dispose()}setState(...e){const n=super.setState(...e);return this.five.needsRender=!0,n}getBehindFiveElement(){var a;const{behindFiveContainer:e}=this;if(e)return e;const n=document.createElement("div");n.style.position="absolute",n.style.pointerEvents="none",n.style.top="0",n.style.left="0",n.style.width="100%",n.style.height="100%",this.behindFiveContainer=n;const o=this.five.getElement();if(!o)return;const s=(a=o==null?void 0:o.style.position)!=null?a:getComputedStyle(o);(!s||s==="static")&&console.warn("if you want to use css3DRenderPlugin behind mode, five element position is static, please set position to relative or absolute");const r=o==null?void 0:o.parentElement;if(r)return r.insertBefore(n,o),n}}const Wt=i=>new bl(i);function Ai(i,t,e=new H.Vector3(1,1,1),n=!1){const o=new vn.Line(i,t);return o.setMaterial({dashed:n,color:e,linewidth:1}),o.remove(o.points),o}const yl=i=>{const t={intersection:null,disposers:[]},e=d=>{t.intersection=d},n=()=>{t.intersection=null};i.on("modelLoaded",()=>{i.on("intersectionOnModelUpdate",e),i.on("intersectionHidden",n)}),i.on("dispose",()=>{i.off("intersectionOnModelUpdate",e),i.off("intersectionHidden",n)});const o=(d,f=2,u=.1)=>{const h=f/2,g=c(d,u),v=new H.Group;v.add(Ai(new H.Vector3(g.x+h,g.y,g.z),new H.Vector3(g.x-h,g.y,g.z),new H.Vector3(1,0,0)),Ai(new H.Vector3(g.x,g.y+h,g.z),new H.Vector3(g.x,g.y-h,g.z),new H.Vector3(0,1,0)),Ai(new H.Vector3(g.x,g.y,g.z+h),new H.Vector3(g.x,g.y,g.z-h),new H.Vector3(0,0,1))),i.scene.add(v),i.needsRender=!0;const A=()=>{i.scene.remove(v)};return t.disposers.push(A),{clear:A,pointAxesHelperMesh:v}},s=(d,f=0)=>{var A,C;const u=(A=i==null?void 0:i.camera)==null?void 0:A.position;if(!u)return!1;const h=d.distanceTo(u),m=d.sub(u).normalize(),g=new H.Raycaster(u,m),v=(C=i.model.intersectRaycaster(g))==null?void 0:C[0];return!(v&&v.distance+f<h)},r=()=>t.intersection,a=()=>{var d,f;(f=(d=t.disposers)==null?void 0:d.forEach)==null||f.call(d,u=>u==null?void 0:u()),i.off("intersectionOnModelUpdate",e),i.off("intersectionHidden",n)},l=a,c=(d,f)=>{const u=d.clone();return i.camera.position.clone().sub(u).setLength(f).add(u)};return{intersection:r,pointAxesHelper:o,movePointTowardsCamera:c,destroy:a,dispose:l,canSeePoint:s}};function ne(){}const Xt=i=>i;function Ie(i,t){for(const e in t)i[e]=t[e];return i}function Lo(i){return i()}function So(){return Object.create(null)}function at(i){i.forEach(Lo)}function kn(i){return typeof i=="function"}function ie(i,t){return i!=i?t==t:i!==t||i&&typeof i=="object"||typeof i=="function"}let Dn;function qe(i,t){return Dn||(Dn=document.createElement("a")),Dn.href=t,i===Dn.href}function wl(i){return Object.keys(i).length===0}function xt(i,t,e,n){if(i){const o=zo(i,t,e,n);return i[0](o)}}function zo(i,t,e,n){return i[1]&&n?Ie(e.ctx.slice(),i[1](n(t))):e.ctx}function kt(i,t,e,n){if(i[2]&&n){const o=i[2](n(e));if(t.dirty===void 0)return o;if(typeof o=="object"){const s=[],r=Math.max(t.dirty.length,o.length);for(let a=0;a<r;a+=1)s[a]=t.dirty[a]|o[a];return s}return t.dirty|o}return t.dirty}function Dt(i,t,e,n,o,s){if(o){const r=zo(t,e,n,s);i.p(r,o)}}function Lt(i){if(i.ctx.length>32){const t=[],e=i.ctx.length/32;for(let n=0;n<e;n++)t[n]=-1;return t}return-1}function Mo(i){const t={};for(const e in i)e[0]!=="$"&&(t[e]=i[e]);return t}function Ln(i,t){const e={};t=new Set(t);for(const n in i)!t.has(n)&&n[0]!=="$"&&(e[n]=i[n]);return e}function Oe(i){return i==null?"":i}const jo=typeof window!="undefined";let Bo=jo?()=>window.performance.now():()=>Date.now(),vi=jo?i=>requestAnimationFrame(i):ne;const Yt=new Set;function To(i){Yt.forEach(t=>{t.c(i)||(Yt.delete(t),t.f())}),Yt.size!==0&&vi(To)}function Qo(i){let t;return Yt.size===0&&vi(To),{promise:new Promise(e=>{Yt.add(t={c:i,f:e})}),abort(){Yt.delete(t)}}}function O(i,t){i.appendChild(t)}function le(i,t,e){const n=bi(i);if(!n.getElementById(t)){const o=Q("style");o.id=t,o.textContent=e,Oo(n,o)}}function bi(i){if(!i)return document;const t=i.getRootNode?i.getRootNode():i.ownerDocument;return t&&t.host?t:i.ownerDocument}function Cl(i){const t=Q("style");return Oo(bi(i),t),t.sheet}function Oo(i,t){return O(i.head||i,t),t.sheet}function B(i,t,e){i.insertBefore(t,e||null)}function z(i){i.parentNode&&i.parentNode.removeChild(i)}function Ke(i,t){for(let e=0;e<i.length;e+=1)i[e]&&i[e].d(t)}function Q(i){return document.createElement(i)}function be(i){return document.createElementNS("http://www.w3.org/2000/svg",i)}function Le(i){return document.createTextNode(i)}function _(){return Le(" ")}function Ae(){return Le("")}function xe(i,t,e,n){return i.addEventListener(t,e,n),()=>i.removeEventListener(t,e,n)}function yi(i){return function(t){return t.stopPropagation(),i.call(this,t)}}function b(i,t,e){e==null?i.removeAttribute(t):i.getAttribute(t)!==e&&i.setAttribute(t,e)}function Sn(i,t){const e=Object.getOwnPropertyDescriptors(i.__proto__);for(const n in t)t[n]==null?i.removeAttribute(n):n==="style"?i.style.cssText=t[n]:n==="__value"?i.value=i[n]=t[n]:e[n]&&e[n].set?i[n]=t[n]:b(i,n,t[n])}function Pl(i){return Array.from(i.childNodes)}function je(i,t){t=""+t,i.wholeText!==t&&(i.data=t)}function F(i,t,e,n){e===null?i.style.removeProperty(t):i.style.setProperty(t,e,n?"important":"")}let zn;function Il(){if(zn===void 0){zn=!1;try{typeof window!="undefined"&&window.parent&&window.parent.document}catch(i){zn=!0}}return zn}function ft(i,t){getComputedStyle(i).position==="static"&&(i.style.position="relative");const n=Q("iframe");n.setAttribute("style","display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;"),n.setAttribute("aria-hidden","true"),n.tabIndex=-1;const o=Il();let s;return o?(n.src="data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\/script>",s=xe(window,"message",r=>{r.source===n.contentWindow&&t()})):(n.src="about:blank",n.onload=()=>{s=xe(n.contentWindow,"resize",t)}),O(i,n),()=>{(o||s&&n.contentWindow)&&s(),z(n)}}function q(i,t,e){i.classList[e?"add":"remove"](t)}function Ro(i,t,{bubbles:e=!1,cancelable:n=!1}={}){const o=document.createEvent("CustomEvent");return o.initCustomEvent(i,e,n,t),o}class Mn{constructor(t=!1){this.is_svg=!1,this.is_svg=t,this.e=this.n=null}c(t){this.h(t)}m(t,e,n=null){this.e||(this.is_svg?this.e=be(e.nodeName):this.e=Q(e.nodeName),this.t=e,this.c(t)),this.i(n)}h(t){this.e.innerHTML=t,this.n=Array.from(this.e.childNodes)}i(t){for(let e=0;e<this.n.length;e+=1)B(this.t,this.n[e],t)}p(t){this.d(),this.h(t),this.i(this.a)}d(){this.n.forEach(z)}}const jn=new Map;let Bn=0;function El(i){let t=5381,e=i.length;for(;e--;)t=(t<<5)-t^i.charCodeAt(e);return t>>>0}function xl(i,t){const e={stylesheet:Cl(t),rules:{}};return jn.set(i,e),e}function Fo(i,t,e,n,o,s,r,a=0){const l=16.666/n;let c=`{
|
|
102
102
|
`;for(let v=0;v<=1;v+=l){const A=t+(e-t)*s(v);c+=v*100+`%{${r(A,1-A)}}
|
|
103
103
|
`}const d=c+`100% {${r(e,1-e)}}
|
|
104
|
-
}`,f=`__svelte_${El(d)}_${a}`,u=bi(i),{stylesheet:h,rules:m}=Mn.get(u)||xl(u,i);m[f]||(m[f]=!0,h.insertRule(`@keyframes ${f} ${d}`,h.cssRules.length));const g=i.style.animation||"";return i.style.animation=`${g?`${g}, `:""}${f} ${n}ms linear ${o}ms 1 both`,jn+=1,f}function wi(i,t){const e=(i.style.animation||"").split(", "),n=e.filter(t?s=>s.indexOf(t)<0:s=>s.indexOf("__svelte")===-1),o=e.length-n.length;o&&(i.style.animation=n.join(", "),jn-=o,jn||kl())}function kl(){vi(()=>{jn||(Mn.forEach(i=>{const{stylesheet:t}=i;let e=t.cssRules.length;for(;e--;)t.deleteRule(e);i.rules={}}),Mn.clear())})}let dn;function un(i){dn=i}function St(){if(!dn)throw new Error("Function called outside component initialization");return dn}function Ci(i){St().$$.before_update.push(i)}function Ue(i){St().$$.on_mount.push(i)}function Pi(i){St().$$.after_update.push(i)}function ht(i){St().$$.on_destroy.push(i)}function Dl(){const i=St();return(t,e,{cancelable:n=!1}={})=>{const o=i.$$.callbacks[t];if(o){const s=Ro(t,e,{cancelable:n});return o.slice().forEach(r=>{r.call(i,s)}),!s.defaultPrevented}return!0}}function Ii(i,t){return St().$$.context.set(i,t),t}function fn(i){return St().$$.context.get(i)}function Ll(i,t){const e=i.$$.callbacks[t.type];e&&e.slice().forEach(n=>n.call(this,t))}const hn=[],Be=[],Bn=[],Ho=[],Go=Promise.resolve();let Ei=!1;function No(){Ei||(Ei=!0,Go.then(Wo))}function Sl(){return No(),Go}function De(i){Bn.push(i)}const xi=new Set;let Tn=0;function Wo(){const i=dn;do{for(;Tn<hn.length;){const t=hn[Tn];Tn++,un(t),zl(t.$$)}for(un(null),hn.length=0,Tn=0;Be.length;)Be.pop()();for(let t=0;t<Bn.length;t+=1){const e=Bn[t];xi.has(e)||(xi.add(e),e())}Bn.length=0}while(hn.length);for(;Ho.length;)Ho.pop()();Ei=!1,xi.clear(),un(i)}function zl(i){if(i.fragment!==null){i.update(),at(i.before_update);const t=i.dirty;i.dirty=[-1],i.fragment&&i.fragment.p(i.ctx,t),i.after_update.forEach(De)}}let mn;function Xo(){return mn||(mn=Promise.resolve(),mn.then(()=>{mn=null})),mn}function Qn(i,t,e){i.dispatchEvent(Ro(`${t?"intro":"outro"}${e}`))}const On=new Set;let mt;function fe(){mt={r:0,c:[],p:mt}}function he(){mt.r||at(mt.c),mt=mt.p}function k(i,t){i&&i.i&&(On.delete(i),i.i(t))}function M(i,t,e,n){if(i&&i.o){if(On.has(i))return;On.add(i),mt.c.push(()=>{On.delete(i),n&&(e&&i.d(1),n())}),i.o(t)}else n&&n()}const Yo={duration:0};function zt(i,t,e){let n=t(i,e),o=!1,s,r,a=0;function l(){s&&wi(i,s)}function c(){const{delay:f=0,duration:u=300,easing:h=Xt,tick:m=ne,css:g}=n||Yo;g&&(s=Fo(i,0,1,u,f,h,g,a++)),m(0,1);const v=Bo()+f,A=v+u;r&&r.abort(),o=!0,De(()=>Qn(i,!0,"start")),r=Qo(C=>{if(o){if(C>=A)return m(1,0),Qn(i,!0,"end"),l(),o=!1;if(C>=v){const w=h((C-v)/u);m(w,1-w)}}return o})}let d=!1;return{start(){d||(d=!0,wi(i),Ai(n)?(n=n(),Xo().then(c)):c())},invalidate(){d=!1},end(){o&&(l(),o=!1)}}}function Ut(i,t,e){let n=t(i,e),o=!0,s;const r=mt;r.r+=1;function a(){const{delay:l=0,duration:c=300,easing:d=Xt,tick:f=ne,css:u}=n||Yo;u&&(s=Fo(i,1,0,c,l,d,u));const h=Bo()+l,m=h+c;De(()=>Qn(i,!1,"start")),Qo(g=>{if(o){if(g>=m)return f(0,1),Qn(i,!1,"end"),--r.r||at(r.c),!1;if(g>=h){const v=d((g-h)/c);f(1-v,v)}}return o})}return Ai(n)?Xo().then(()=>{n=n(),a()}):a(),{end(l){l&&n.tick&&n.tick(1,0),o&&(s&&wi(i,s),o=!1)}}}const Ml=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global;function Uo(i,t){i.d(1),t.delete(i.key)}function lt(i,t){M(i,1,1,()=>{t.delete(i.key)})}function Ve(i,t,e,n,o,s,r,a,l,c,d,f){let u=i.length,h=s.length,m=u;const g={};for(;m--;)g[i[m].key]=m;const v=[],A=new Map,C=new Map;for(m=h;m--;){const y=f(o,s,m),L=e(y);let x=r.get(L);x?n&&x.p(y,t):(x=c(L,y),x.c()),A.set(L,v[m]=x),L in g&&C.set(L,Math.abs(m-g[L]))}const w=new Set,E=new Set;function D(y){k(y,1),y.m(a,d),r.set(y.key,y),d=y.first,h--}for(;u&&h;){const y=v[h-1],L=i[u-1],x=y.key,O=L.key;y===L?(d=y.first,u--,h--):A.has(O)?!r.has(x)||w.has(x)?D(y):E.has(O)?u--:C.get(x)>C.get(O)?(E.add(x),D(y)):(w.add(O),u--):(l(L,r),u--)}for(;u--;){const y=i[u];A.has(y.key)||l(y,r)}for(;h;)D(v[h-1]);return v}function Te(i,t){const e={},n={},o={$$scope:1};let s=i.length;for(;s--;){const r=i[s],a=t[s];if(a){for(const l in r)l in a||(n[l]=1);for(const l in a)o[l]||(e[l]=a[l],o[l]=1);i[s]=a}else for(const l in r)o[l]=1}for(const r in n)r in e||(e[r]=void 0);return e}function ee(i){i&&i.c()}function K(i,t,e,n){const{fragment:o,on_mount:s,on_destroy:r,after_update:a}=i.$$;o&&o.m(t,e),n||De(()=>{const l=s.map(Lo).filter(Ai);r?r.push(...l):at(l),i.$$.on_mount=[]}),a.forEach(De)}function $(i,t){const e=i.$$;e.fragment!==null&&(at(e.on_destroy),e.fragment&&e.fragment.d(t),e.on_destroy=e.fragment=null,e.ctx=[])}function jl(i,t){i.$$.dirty[0]===-1&&(hn.push(i),No(),i.$$.dirty.fill(0)),i.$$.dirty[t/31|0]|=1<<t%31}function oe(i,t,e,n,o,s,r,a=[-1]){const l=dn;un(i);const c=i.$$={fragment:null,ctx:null,props:s,update:ne,not_equal:o,bound:So(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(l?l.$$.context:[])),callbacks:So(),dirty:a,skip_bound:!1,root:t.target||l.$$.root};r&&r(c.root);let d=!1;if(c.ctx=e?e(i,t.props||{},(f,u,...h)=>{const m=h.length?h[0]:u;return c.ctx&&o(c.ctx[f],c.ctx[f]=m)&&(!c.skip_bound&&c.bound[f]&&c.bound[f](m),d&&jl(i,f)),u}):[],c.update(),d=!0,at(c.before_update),c.fragment=n?n(c.ctx):!1,t.target){if(t.hydrate){const f=Pl(t.target);c.fragment&&c.fragment.l(f),f.forEach(z)}else c.fragment&&c.fragment.c();t.intro&&k(i.$$.fragment),K(i,t.target,t.anchor,t.customElement),Wo()}un(l)}class se{$destroy(){$(this,1),this.$destroy=ne}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const o=n.indexOf(e);o!==-1&&n.splice(o,1)}}$set(t){this.$$set&&!wl(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Bl="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAAA8CAYAAACZ1L+0AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAYKADAAQAAAABAAAAPAAAAABU0H2EAAARRElEQVR4Ad2czY9cRZbFq1yFoQGDNCzwuAENohl54dkgdrNh34tZ8GciFi31nwEsmAEhhAWD1GMJCZgx5sMfUHN+J+NE3XfrZWWVcVVLHVLmuXG/74148V5m2bm/N8bR0dH+Bx988Po333zzbz///PONg4ODa+I9I9y/cuXKgV77h4eH+1KH3hP/yv7+vuBAsG+5UCIpCkMzDQ962Eu80Q1P/KmHT82v8IocZFL4pslDvL3fNARHoPI2wtbrV1jBIf9N8SEZ0UUP2wFHv2ocSc/2ou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H//66+/fl2/5ndLC/BHMV/Q6ypN06Bm3lgFaKMcEbj+bDHN88/curvewF4hjhNWasrwhy/0waIPjylyYjp49Ag++NhFhi7F+jeEFcc/H6w5TYbnxo2OoufXmNPcX+XWv4QLMo+taJkfeY4gvtRs/n8vzY/cssxB5CyKxi96/aB+/Y9+KfE/X3vttS8lI7e9/wfu514OAjYP0QAAAABJRU5ErkJggg==";function Tl(i){le(i,"svelte-1d7uzh5",".room-label-item.svelte-1d7uzh5{position:absolute;font-size:0.5rem;z-index:0;transform:none;cursor:pointer;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.room-label-item__text.svelte-1d7uzh5{position:absolute;left:0;top:-4rem;transform:translate(-50%, 0);display:flex;justify-content:center;align-items:center;height:1.25rem;min-width:2rem;padding:0 0.375rem;pointer-events:all;background-size:100% 100%;background-repeat:no-repeat;white-space:nowrap}.room-label-item__bar.svelte-1d7uzh5{position:absolute;top:-2.75rem;height:3rem;width:0.0625rem;background-image:linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0))}.wide.svelte-1d7uzh5{font-size:0.625rem}")}function Ql(i){let t,e,n=i[0].name+"",o,s,r,a,l;return{c(){t=Q("div"),e=Q("span"),o=Le(n),s=_(),r=Q("div"),b(e,"class","room-label-item__text svelte-1d7uzh5"),F(e,"background-image","url("+Bl+")"),q(e,"wide",i[0].name.length>3),b(r,"class","room-label-item__bar svelte-1d7uzh5"),b(t,"class","room-label-item svelte-1d7uzh5"),F(t,"z-index",i[0].zIndex,!1),F(t,"transform",i[0].transform,!1),F(t,"opacity",i[0].visible?1:0,!1)},m(c,d){B(c,t,d),R(t,e),R(e,o),R(t,s),R(t,r),a||(l=xe(e,"click",i[1]),a=!0)},p(c,[d]){d&1&&n!==(n=c[0].name+"")&&je(o,n),d&1&&q(e,"wide",c[0].name.length>3),d&1&&F(t,"z-index",c[0].zIndex,!1),d&1&&F(t,"transform",c[0].transform,!1),d&1&&F(t,"opacity",c[0].visible?1:0,!1)},i:ne,o:ne,d(c){c&&z(t),a=!1,l()}}}function Ol(i,t,e){let{five:n}=t,{roomLabel:o}=t;function s(){n.setState({panoIndex:o.panoIndex,mode:"Panorama",longitude:o.longitude})}return i.$$set=r=>{"five"in r&&e(2,n=r.five),"roomLabel"in r&&e(0,o=r.roomLabel)},[o,s,n]}class Rl extends se{constructor(t){super(),oe(this,t,Ol,Ql,ie,{five:2,roomLabel:0},Tl)}}const{Map:Fl}=Ml;function Hl(i){le(i,"svelte-9eg4zi",".room-labels-container.svelte-9eg4zi{width:100%;height:100%;position:relative;color:#fff}")}function Vo(i,t,e){const n=i.slice();return n[12]=t[e],n}function Jo(i,t){let e,n,o;return n=new Rl({props:{roomLabel:t[12],five:t[1]}}),{key:i,first:null,c(){e=Ae(),ee(n.$$.fragment),this.first=e},m(s,r){B(s,e,r),K(n,s,r),o=!0},p(s,r){t=s;const a={};r&1&&(a.roomLabel=t[12]),r&2&&(a.five=t[1]),n.$set(a)},i(s){o||(k(n.$$.fragment,s),o=!0)},o(s){M(n.$$.fragment,s),o=!1},d(s){s&&z(e),$(n,s)}}}function Gl(i){let t,e=[],n=new Fl,o,s,r=i[0];const a=l=>l[12].id;for(let l=0;l<r.length;l+=1){let c=Vo(i,r,l),d=a(c);n.set(d,e[l]=Jo(d,c))}return{c(){t=Q("div");for(let l=0;l<e.length;l+=1)e[l].c();b(t,"class","room-labels-container svelte-9eg4zi"),De(()=>i[6].call(t))},m(l,c){B(l,t,c);for(let d=0;d<e.length;d+=1)e[d].m(t,null);o=ft(t,i[6].bind(t)),s=!0},p(l,[c]){c&3&&(r=l[0],fe(),e=Ve(e,c,a,1,l,r,n,t,lt,Jo,null,Vo),he())},i(l){if(!s){for(let c=0;c<r.length;c+=1)k(e[c]);s=!0}},o(l){for(let c=0;c<e.length;c+=1)M(e[c]);s=!1},d(l){l&&z(t);for(let c=0;c<e.length;c+=1)e[c].d();o()}}}function Nl(i,t,e){var g;let n,{five:o}=t,{roomLabels:s}=t,r,a,l=(g=o.model.shownFloor)!=null?g:null;function c(v){if(!(l===null||v.floorIndex===l))return!1;const C=new H.Raycaster,w=o.camera.position.clone(),E=new H.Vector3(v.position.x,v.position.y,v.position.z),D=E.distanceTo(w);C.set(w.clone(),E.clone().sub(w).normalize());const[y]=o.model.intersectRaycaster(C);return!(y&&y.distance+1<D)}function d(v,A){const w=new H.Vector3(v.position.x,v.position.y,v.position.z).clone().project(o.camera),E=Math.ceil((w.x+1)/2*A.x),D=Math.ceil((-w.y+1)/2*A.y);return`translate(${E}px, ${D}px)`}function f(v){const{rendererSize:A,shownFloor:C}=v,w=new Map;function E(y){const L=w.get(y.id);if(L)return L;const{x,y:O,z:T}=y.position,G=new H.Vector3(x,O,T).clone().distanceTo(o.camera.position);return w.set(y.id,G),G}return s.map(y=>{const L=c(y),x=L?d(y,A):y.transform,O=E(y),G=s.filter(U=>U.visible&&E(U)<O).length*10;return pe(N({},y),{visible:L,transform:x,zIndex:G})})}function u(){e(0,s=f({rendererSize:n,shownFloor:l}))}function h(v){e(4,l=v)}o.on("cameraUpdate",u),o.on("modelShownFloorChange",h),ht(()=>{o.off("cameraUpdate",u),o.off("modelShownFloorChange",h)});function m(){r=this.clientWidth,a=this.clientHeight,e(2,r),e(3,a)}return i.$$set=v=>{"five"in v&&e(1,o=v.five),"roomLabels"in v&&e(0,s=v.roomLabels)},i.$$.update=()=>{i.$$.dirty&12&&e(5,n={x:r,y:a}),i.$$.dirty&48&&e(0,s=f({rendererSize:n,shownFloor:l}))},[s,o,r,a,l,n,m]}class Wl extends se{constructor(t){super(),oe(this,t,Nl,Gl,ie,{five:1,roomLabels:0},Hl)}}function Xl(i){return i.model_room_labels.map(({id:t,pano_index:e,floor_index:n,name:o,position:s,longitude:r})=>({id:t,name:o,position:s,longitude:r,panoIndex:e,floorIndex:n,zIndex:0,visible:!1,transform:""}))}class Yl{constructor(t){p(this,"five");p(this,"enabled",!0);p(this,"fiveModeEnabled");p(this,"app");p(this,"wrapper");p(this,"roomLabels",[]);p(this,"container",document.createElement("div"));p(this,"onFiveModeChange",t=>{if(t!=="Floorplan"){this.fiveModeEnabled=!1,this.render();return}this.five.once("initAnimationEnded",()=>{this.fiveModeEnabled=this.five.currentMode==="Floorplan",this.render()})});this.five=t,this.fiveModeEnabled=this.five.currentMode==="Floorplan",this.container.classList.add("model-room-label-plugin-container"),this.container.style.width="100%",this.container.style.height="100%",this.container.style.position="absolute",this.container.style.pointerEvents="none",this.container.style.left="0",this.container.style.top="0",this.container.style.zIndex="5",this.five.once("dispose",()=>this.dispose()),this.five.on("modeChange",this.onFiveModeChange),this.render()}dispose(){this.five.off("modeChange",this.onFiveModeChange),this.container.remove()}load(t){this.roomLabels=Xl(t),this.render()}appendTo(t){return this.wrapper=t,t.appendChild(this.container),this.render(),this}disable(){return this.enabled=!1,this.render(),this}enable(){return this.enabled=!0,this.render(),this}render(){var t;if(!!this.wrapper){if(!this.enabled||!this.fiveModeEnabled){(t=this.app)==null||t.$destroy(),this.app=void 0;return}this.app?this.app.$set({five:this.five,roomLabels:this.roomLabels}):this.app=new Wl({target:this.container,props:{five:this.five,roomLabels:this.roomLabels}})}}}const Ul=i=>new Yl(i),Vl={name:"ModelRoomLabelPlugin",version:0};var pt=(i=>(i[i.FLOOR=1]="FLOOR",i[i.CEILING=2]="CEILING",i[i.BOUNDING_CENTER=3]="BOUNDING_CENTER",i))(pt||{});function Rn(i){return Z(this,null,function*(){try{return[null,yield i]}catch(t){return t instanceof Error?[t,null]:[new Error(""),null]}})}function Fn(i){return Object.prototype.toString.call(i)==="[object Object]"}function Hn(i,t){return i===t?!0:typeof i!=typeof t?!1:!!(Number.isNaN(i)&&Number.isNaN(t))}function Jl(i,t){const e=Object.getOwnPropertyNames(i),n=Object.getOwnPropertyNames(t);if(e.length!==n.length)return!1;for(let o=0,s=e.length;o<s;o++){const r=e[o];if(!Hn(i[r],t[r]))return!1}return!0}function Zl(i,t){if(i.length!==t.length)return!1;for(let e=0,n=i.length;e<n;e++)if(!Hn(i[e],t[e]))return!1;return!0}function _l(i,t){return Hn(i,t)?!0:Fn(i)&&Fn(t)?Jl(i,t):Array.isArray(i)&&Array.isArray(t)?Zl(i,t):!1}function ki(i,t){return Hn(i,t)?!0:Fn(i)&&Fn(t)?Kl(i,t):Array.isArray(i)&&Array.isArray(t)?ql(i,t):!1}function ql(i,t){if(i.length!==t.length)return!1;for(let e=0,n=i.length;e<n;e++)if(!ki(i[e],t[e]))return!1;return!0}function Kl(i,t){const e=Object.getOwnPropertyNames(i),n=Object.getOwnPropertyNames(t);if(e.length!==n.length)return!1;for(let o=0,s=e.length;o<s;o++){const r=e[o];if(!ki(i[r],t[r]))return!1}return!0}function $e(i,t,e={deep:!1}){return e.deep?ki(i,t):_l(i,t)}function Vt(i){return i<.5?4*i*i*i:.5*Math.pow(2*i-2,3)+1}function Zo(i){const t=i-1;return t*t*t+1}function Mt(i,{delay:t=0,duration:e=400,easing:n=Xt}={}){const o=+getComputedStyle(i).opacity;return{delay:t,duration:e,easing:n,css:s=>`opacity: ${s*o}`}}function _o(i,{delay:t=0,duration:e=400,easing:n=Zo,x:o=0,y:s=0,opacity:r=0}={}){const a=getComputedStyle(i),l=+a.opacity,c=a.transform==="none"?"":a.transform,d=l*(1-r);return{delay:t,duration:e,easing:n,css:(f,u)=>`
|
|
104
|
+
}`,f=`__svelte_${El(d)}_${a}`,u=bi(i),{stylesheet:h,rules:m}=jn.get(u)||xl(u,i);m[f]||(m[f]=!0,h.insertRule(`@keyframes ${f} ${d}`,h.cssRules.length));const g=i.style.animation||"";return i.style.animation=`${g?`${g}, `:""}${f} ${n}ms linear ${o}ms 1 both`,Bn+=1,f}function wi(i,t){const e=(i.style.animation||"").split(", "),n=e.filter(t?s=>s.indexOf(t)<0:s=>s.indexOf("__svelte")===-1),o=e.length-n.length;o&&(i.style.animation=n.join(", "),Bn-=o,Bn||kl())}function kl(){vi(()=>{Bn||(jn.forEach(i=>{const{ownerNode:t}=i.stylesheet;t&&z(t)}),jn.clear())})}let dn;function un(i){dn=i}function St(){if(!dn)throw new Error("Function called outside component initialization");return dn}function Ci(i){St().$$.before_update.push(i)}function Ue(i){St().$$.on_mount.push(i)}function Pi(i){St().$$.after_update.push(i)}function ht(i){St().$$.on_destroy.push(i)}function Dl(){const i=St();return(t,e,{cancelable:n=!1}={})=>{const o=i.$$.callbacks[t];if(o){const s=Ro(t,e,{cancelable:n});return o.slice().forEach(r=>{r.call(i,s)}),!s.defaultPrevented}return!0}}function Ii(i,t){return St().$$.context.set(i,t),t}function fn(i){return St().$$.context.get(i)}function Ll(i,t){const e=i.$$.callbacks[t.type];e&&e.slice().forEach(n=>n.call(this,t))}const hn=[],Be=[],Tn=[],Ho=[],Go=Promise.resolve();let Ei=!1;function No(){Ei||(Ei=!0,Go.then(Wo))}function Sl(){return No(),Go}function De(i){Tn.push(i)}const xi=new Set;let Qn=0;function Wo(){const i=dn;do{for(;Qn<hn.length;){const t=hn[Qn];Qn++,un(t),zl(t.$$)}for(un(null),hn.length=0,Qn=0;Be.length;)Be.pop()();for(let t=0;t<Tn.length;t+=1){const e=Tn[t];xi.has(e)||(xi.add(e),e())}Tn.length=0}while(hn.length);for(;Ho.length;)Ho.pop()();Ei=!1,xi.clear(),un(i)}function zl(i){if(i.fragment!==null){i.update(),at(i.before_update);const t=i.dirty;i.dirty=[-1],i.fragment&&i.fragment.p(i.ctx,t),i.after_update.forEach(De)}}let mn;function Xo(){return mn||(mn=Promise.resolve(),mn.then(()=>{mn=null})),mn}function On(i,t,e){i.dispatchEvent(Ro(`${t?"intro":"outro"}${e}`))}const Rn=new Set;let mt;function fe(){mt={r:0,c:[],p:mt}}function he(){mt.r||at(mt.c),mt=mt.p}function k(i,t){i&&i.i&&(Rn.delete(i),i.i(t))}function M(i,t,e,n){if(i&&i.o){if(Rn.has(i))return;Rn.add(i),mt.c.push(()=>{Rn.delete(i),n&&(e&&i.d(1),n())}),i.o(t)}else n&&n()}const Yo={duration:0};function zt(i,t,e){let n=t(i,e),o=!1,s,r,a=0;function l(){s&&wi(i,s)}function c(){const{delay:f=0,duration:u=300,easing:h=Xt,tick:m=ne,css:g}=n||Yo;g&&(s=Fo(i,0,1,u,f,h,g,a++)),m(0,1);const v=Bo()+f,A=v+u;r&&r.abort(),o=!0,De(()=>On(i,!0,"start")),r=Qo(C=>{if(o){if(C>=A)return m(1,0),On(i,!0,"end"),l(),o=!1;if(C>=v){const w=h((C-v)/u);m(w,1-w)}}return o})}let d=!1;return{start(){d||(d=!0,wi(i),kn(n)?(n=n(),Xo().then(c)):c())},invalidate(){d=!1},end(){o&&(l(),o=!1)}}}function Ut(i,t,e){let n=t(i,e),o=!0,s;const r=mt;r.r+=1;function a(){const{delay:l=0,duration:c=300,easing:d=Xt,tick:f=ne,css:u}=n||Yo;u&&(s=Fo(i,1,0,c,l,d,u));const h=Bo()+l,m=h+c;De(()=>On(i,!1,"start")),Qo(g=>{if(o){if(g>=m)return f(0,1),On(i,!1,"end"),--r.r||at(r.c),!1;if(g>=h){const v=d((g-h)/c);f(1-v,v)}}return o})}return kn(n)?Xo().then(()=>{n=n(),a()}):a(),{end(l){l&&n.tick&&n.tick(1,0),o&&(s&&wi(i,s),o=!1)}}}const Ml=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global;function Uo(i,t){i.d(1),t.delete(i.key)}function lt(i,t){M(i,1,1,()=>{t.delete(i.key)})}function Ve(i,t,e,n,o,s,r,a,l,c,d,f){let u=i.length,h=s.length,m=u;const g={};for(;m--;)g[i[m].key]=m;const v=[],A=new Map,C=new Map;for(m=h;m--;){const y=f(o,s,m),L=e(y);let x=r.get(L);x?n&&x.p(y,t):(x=c(L,y),x.c()),A.set(L,v[m]=x),L in g&&C.set(L,Math.abs(m-g[L]))}const w=new Set,E=new Set;function D(y){k(y,1),y.m(a,d),r.set(y.key,y),d=y.first,h--}for(;u&&h;){const y=v[h-1],L=i[u-1],x=y.key,R=L.key;y===L?(d=y.first,u--,h--):A.has(R)?!r.has(x)||w.has(x)?D(y):E.has(R)?u--:C.get(x)>C.get(R)?(E.add(x),D(y)):(w.add(R),u--):(l(L,r),u--)}for(;u--;){const y=i[u];A.has(y.key)||l(y,r)}for(;h;)D(v[h-1]);return v}function Te(i,t){const e={},n={},o={$$scope:1};let s=i.length;for(;s--;){const r=i[s],a=t[s];if(a){for(const l in r)l in a||(n[l]=1);for(const l in a)o[l]||(e[l]=a[l],o[l]=1);i[s]=a}else for(const l in r)o[l]=1}for(const r in n)r in e||(e[r]=void 0);return e}function ee(i){i&&i.c()}function K(i,t,e,n){const{fragment:o,after_update:s}=i.$$;o&&o.m(t,e),n||De(()=>{const r=i.$$.on_mount.map(Lo).filter(kn);i.$$.on_destroy?i.$$.on_destroy.push(...r):at(r),i.$$.on_mount=[]}),s.forEach(De)}function $(i,t){const e=i.$$;e.fragment!==null&&(at(e.on_destroy),e.fragment&&e.fragment.d(t),e.on_destroy=e.fragment=null,e.ctx=[])}function jl(i,t){i.$$.dirty[0]===-1&&(hn.push(i),No(),i.$$.dirty.fill(0)),i.$$.dirty[t/31|0]|=1<<t%31}function oe(i,t,e,n,o,s,r,a=[-1]){const l=dn;un(i);const c=i.$$={fragment:null,ctx:[],props:s,update:ne,not_equal:o,bound:So(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(l?l.$$.context:[])),callbacks:So(),dirty:a,skip_bound:!1,root:t.target||l.$$.root};r&&r(c.root);let d=!1;if(c.ctx=e?e(i,t.props||{},(f,u,...h)=>{const m=h.length?h[0]:u;return c.ctx&&o(c.ctx[f],c.ctx[f]=m)&&(!c.skip_bound&&c.bound[f]&&c.bound[f](m),d&&jl(i,f)),u}):[],c.update(),d=!0,at(c.before_update),c.fragment=n?n(c.ctx):!1,t.target){if(t.hydrate){const f=Pl(t.target);c.fragment&&c.fragment.l(f),f.forEach(z)}else c.fragment&&c.fragment.c();t.intro&&k(i.$$.fragment),K(i,t.target,t.anchor,t.customElement),Wo()}un(l)}class se{$destroy(){$(this,1),this.$destroy=ne}$on(t,e){if(!kn(e))return ne;const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const o=n.indexOf(e);o!==-1&&n.splice(o,1)}}$set(t){this.$$set&&!wl(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Bl="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAAA8CAYAAACZ1L+0AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAYKADAAQAAAABAAAAPAAAAABU0H2EAAARRElEQVR4Ad2czY9cRZbFq1yFoQGDNCzwuAENohl54dkgdrNh34tZ8GciFi31nwEsmAEhhAWD1GMJCZgx5sMfUHN+J+NE3XfrZWWVcVVLHVLmuXG/74148V5m2bm/N8bR0dH+Bx988Po333zzbz///PONg4ODa+I9I9y/cuXKgV77h4eH+1KH3hP/yv7+vuBAsG+5UCIpCkMzDQ962Eu80Q1P/KmHT82v8IocZFL4pslDvL3fNARHoPI2wtbrV1jBIf9N8SEZ0UUP2wFHv2ocSc/2ouEz8PVooJXQ0/j10aNHoH2Idj4PHz4k1n29/k+5/u3ll1/+r7fffvtLzfGzd8ibjK6+9957f5ajf1XzH9y7d+8Xjf9FRs1SdvNBBg2SDQ1xh9ALH4yN0M2BNZrKwtFc9Fmkquuma5HJBzvLiIONBnx40B7QIzTdxCcNwj3dYlEoUmabAU+UFZDpxah22Ng2NjQXH0LrwccGwyEzXfWhWQwSYQHYuFevXj14/vnn37h79+7Nr7766gup/FX5PnAj33///f/46aef3vj444/vfPbZZz9IYGMcnDbkhEYQL001Hfsu775i+7j6LID6cDQWYo8mabGMxOr+e/ye3y7989p3/9jfvHnz2q1bt25oMb549913/3Lwzjvv/Mu3337775988smdzz///AcVQ+IecsAOp8OOHRpkiJniWQnrBJmwc7EF8atxBA2ihx/obf7Qqa+un+aDI0f7k08nU+PLj3PBR+qp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r4dcAT9p5bxl4zhIgNqgnlRkILKuf1654tIUCk2oLJYbQpr0ZqRrGt30C1tk4FnyQYccray31B3s9UQviG104IUGmZ8mH5v+3qF2w51nn332TzHCsI7KJzEVm6akEVuPhLWGhUeM0CAjvkHmxCM+uCYPD2R0f2Ilt7lB4tMGZ3i7qPqfe+65P6j3X1y5du3aZ3rSefrGjRsvkNxpI80AeTGC0NgGoakvuFYrtvDjD11okBF6m3yjdfze9eM7sbPQIC8sg8detlPdP7XCy8ASOh6IC534Qf126Au6Aq7S+0P9jOJ/f/jhh7dfeeWVN1C4c+cOv5zoxsQgKD7O/OgIT3OLgrrkLAMR9EuQYsXLlWO5ePNMJ25s7Fhv8EIraduDDOJI7kfh6FT98M6Ka/GrLbE0/131X79+/YVXX331+tNPP32b3nt1tGhXP/rooz/ruf9N/YzWQ/2e2c8Cfg7Wz8RC9WkeE8pj/rQltMRH/jXdsdreAEp04mg8u22zYhvZ9IPueLE4puMLfnjRKzKCbD4ZHv9oK/mwaPOlm/ukkbFwjKLj428j8t8DEEvN9xJoJuhsDI9lxOeHXr3zE8cGm7fpQMfNgR54ntXmYXzx1ltvbX64VUl4SH//66+/fl2/5ndLC/BHMV/Q6ypN06Bm3lgFaKMcEbj+bDHN88/curvewF4hjhNWasrwhy/0waIPjylyYjp49Ag++NhFhi7F+jeEFcc/H6w5TYbnxo2OoufXmNPcX+XWv4QLMo+taJkfeY4gvtRs/n8vzY/cssxB5CyKxi96/aB+/Y9+KfE/X3vttS8lI7e9/wfu514OAjYP0QAAAABJRU5ErkJggg==";function Tl(i){le(i,"svelte-1d7uzh5",".room-label-item.svelte-1d7uzh5{position:absolute;font-size:0.5rem;z-index:0;transform:none;cursor:pointer;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.room-label-item__text.svelte-1d7uzh5{position:absolute;left:0;top:-4rem;transform:translate(-50%, 0);display:flex;justify-content:center;align-items:center;height:1.25rem;min-width:2rem;padding:0 0.375rem;pointer-events:all;background-size:100% 100%;background-repeat:no-repeat;white-space:nowrap}.room-label-item__bar.svelte-1d7uzh5{position:absolute;top:-2.75rem;height:3rem;width:0.0625rem;background-image:linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0))}.wide.svelte-1d7uzh5{font-size:0.625rem}")}function Ql(i){let t,e,n=i[0].name+"",o,s,r,a,l;return{c(){t=Q("div"),e=Q("span"),o=Le(n),s=_(),r=Q("div"),b(e,"class","room-label-item__text svelte-1d7uzh5"),F(e,"background-image","url("+Bl+")"),q(e,"wide",i[0].name.length>3),b(r,"class","room-label-item__bar svelte-1d7uzh5"),b(t,"class","room-label-item svelte-1d7uzh5"),F(t,"z-index",i[0].zIndex),F(t,"transform",i[0].transform),F(t,"opacity",i[0].visible?1:0)},m(c,d){B(c,t,d),O(t,e),O(e,o),O(t,s),O(t,r),a||(l=xe(e,"click",i[1]),a=!0)},p(c,[d]){d&1&&n!==(n=c[0].name+"")&&je(o,n),d&1&&q(e,"wide",c[0].name.length>3),d&1&&F(t,"z-index",c[0].zIndex),d&1&&F(t,"transform",c[0].transform),d&1&&F(t,"opacity",c[0].visible?1:0)},i:ne,o:ne,d(c){c&&z(t),a=!1,l()}}}function Ol(i,t,e){let{five:n}=t,{roomLabel:o}=t;function s(){n.setState({panoIndex:o.panoIndex,mode:"Panorama",longitude:o.longitude})}return i.$$set=r=>{"five"in r&&e(2,n=r.five),"roomLabel"in r&&e(0,o=r.roomLabel)},[o,s,n]}class Rl extends se{constructor(t){super(),oe(this,t,Ol,Ql,ie,{five:2,roomLabel:0},Tl)}}const{Map:Fl}=Ml;function Hl(i){le(i,"svelte-9eg4zi",".room-labels-container.svelte-9eg4zi{width:100%;height:100%;position:relative;color:#fff}")}function Vo(i,t,e){const n=i.slice();return n[12]=t[e],n}function Jo(i,t){let e,n,o;return n=new Rl({props:{roomLabel:t[12],five:t[1]}}),{key:i,first:null,c(){e=Ae(),ee(n.$$.fragment),this.first=e},m(s,r){B(s,e,r),K(n,s,r),o=!0},p(s,r){t=s;const a={};r&1&&(a.roomLabel=t[12]),r&2&&(a.five=t[1]),n.$set(a)},i(s){o||(k(n.$$.fragment,s),o=!0)},o(s){M(n.$$.fragment,s),o=!1},d(s){s&&z(e),$(n,s)}}}function Gl(i){let t,e=[],n=new Fl,o,s,r=i[0];const a=l=>l[12].id;for(let l=0;l<r.length;l+=1){let c=Vo(i,r,l),d=a(c);n.set(d,e[l]=Jo(d,c))}return{c(){t=Q("div");for(let l=0;l<e.length;l+=1)e[l].c();b(t,"class","room-labels-container svelte-9eg4zi"),De(()=>i[6].call(t))},m(l,c){B(l,t,c);for(let d=0;d<e.length;d+=1)e[d].m(t,null);o=ft(t,i[6].bind(t)),s=!0},p(l,[c]){c&3&&(r=l[0],fe(),e=Ve(e,c,a,1,l,r,n,t,lt,Jo,null,Vo),he())},i(l){if(!s){for(let c=0;c<r.length;c+=1)k(e[c]);s=!0}},o(l){for(let c=0;c<e.length;c+=1)M(e[c]);s=!1},d(l){l&&z(t);for(let c=0;c<e.length;c+=1)e[c].d();o()}}}function Nl(i,t,e){var g;let n,{five:o}=t,{roomLabels:s}=t,r,a,l=(g=o.model.shownFloor)!=null?g:null;function c(v){if(!(l===null||v.floorIndex===l))return!1;const C=new H.Raycaster,w=o.camera.position.clone(),E=new H.Vector3(v.position.x,v.position.y,v.position.z),D=E.distanceTo(w);C.set(w.clone(),E.clone().sub(w).normalize());const[y]=o.model.intersectRaycaster(C);return!(y&&y.distance+1<D)}function d(v,A){const w=new H.Vector3(v.position.x,v.position.y,v.position.z).clone().project(o.camera),E=Math.ceil((w.x+1)/2*A.x),D=Math.ceil((-w.y+1)/2*A.y);return`translate(${E}px, ${D}px)`}function f(v){const{rendererSize:A,shownFloor:C}=v,w=new Map;function E(y){const L=w.get(y.id);if(L)return L;const{x,y:R,z:T}=y.position,G=new H.Vector3(x,R,T).clone().distanceTo(o.camera.position);return w.set(y.id,G),G}return s.map(y=>{const L=c(y),x=L?d(y,A):y.transform,R=E(y),G=s.filter(U=>U.visible&&E(U)<R).length*10;return pe(W({},y),{visible:L,transform:x,zIndex:G})})}function u(){e(0,s=f({rendererSize:n,shownFloor:l}))}function h(v){e(4,l=v)}o.on("cameraUpdate",u),o.on("modelShownFloorChange",h),ht(()=>{o.off("cameraUpdate",u),o.off("modelShownFloorChange",h)});function m(){r=this.clientWidth,a=this.clientHeight,e(2,r),e(3,a)}return i.$$set=v=>{"five"in v&&e(1,o=v.five),"roomLabels"in v&&e(0,s=v.roomLabels)},i.$$.update=()=>{i.$$.dirty&12&&e(5,n={x:r,y:a}),i.$$.dirty&48&&e(0,s=f({rendererSize:n,shownFloor:l}))},[s,o,r,a,l,n,m]}class Wl extends se{constructor(t){super(),oe(this,t,Nl,Gl,ie,{five:1,roomLabels:0},Hl)}}function Xl(i){return i.model_room_labels.map(({id:t,pano_index:e,floor_index:n,name:o,position:s,longitude:r})=>({id:t,name:o,position:s,longitude:r,panoIndex:e,floorIndex:n,zIndex:0,visible:!1,transform:""}))}class Yl{constructor(t){p(this,"five");p(this,"enabled",!0);p(this,"fiveModeEnabled");p(this,"app");p(this,"wrapper");p(this,"roomLabels",[]);p(this,"container",document.createElement("div"));p(this,"onFiveModeChange",t=>{if(t!=="Floorplan"){this.fiveModeEnabled=!1,this.render();return}this.five.once("initAnimationEnded",()=>{this.fiveModeEnabled=this.five.currentMode==="Floorplan",this.render()})});this.five=t,this.fiveModeEnabled=this.five.currentMode==="Floorplan",this.container.classList.add("model-room-label-plugin-container"),this.container.style.width="100%",this.container.style.height="100%",this.container.style.position="absolute",this.container.style.pointerEvents="none",this.container.style.left="0",this.container.style.top="0",this.container.style.zIndex="5",this.five.once("dispose",()=>this.dispose()),this.five.on("modeChange",this.onFiveModeChange),this.render()}dispose(){this.five.off("modeChange",this.onFiveModeChange),this.container.remove()}load(t){this.roomLabels=Xl(t),this.render()}appendTo(t){return this.wrapper=t,t.appendChild(this.container),this.render(),this}disable(){return this.enabled=!1,this.render(),this}enable(){return this.enabled=!0,this.render(),this}render(){var t;if(!!this.wrapper){if(!this.enabled||!this.fiveModeEnabled){(t=this.app)==null||t.$destroy(),this.app=void 0;return}this.app?this.app.$set({five:this.five,roomLabels:this.roomLabels}):this.app=new Wl({target:this.container,props:{five:this.five,roomLabels:this.roomLabels}})}}}const Ul=i=>new Yl(i),Vl={name:"ModelRoomLabelPlugin",version:0};var pt=(i=>(i[i.FLOOR=1]="FLOOR",i[i.CEILING=2]="CEILING",i[i.BOUNDING_CENTER=3]="BOUNDING_CENTER",i))(pt||{});function Fn(i){return Z(this,null,function*(){try{return[null,yield i]}catch(t){return t instanceof Error?[t,null]:[new Error(""),null]}})}function Hn(i){return Object.prototype.toString.call(i)==="[object Object]"}function Gn(i,t){return i===t?!0:typeof i!=typeof t?!1:!!(Number.isNaN(i)&&Number.isNaN(t))}function Jl(i,t){const e=Object.getOwnPropertyNames(i),n=Object.getOwnPropertyNames(t);if(e.length!==n.length)return!1;for(let o=0,s=e.length;o<s;o++){const r=e[o];if(!Gn(i[r],t[r]))return!1}return!0}function Zl(i,t){if(i.length!==t.length)return!1;for(let e=0,n=i.length;e<n;e++)if(!Gn(i[e],t[e]))return!1;return!0}function _l(i,t){return Gn(i,t)?!0:Hn(i)&&Hn(t)?Jl(i,t):Array.isArray(i)&&Array.isArray(t)?Zl(i,t):!1}function ki(i,t){return Gn(i,t)?!0:Hn(i)&&Hn(t)?Kl(i,t):Array.isArray(i)&&Array.isArray(t)?ql(i,t):!1}function ql(i,t){if(i.length!==t.length)return!1;for(let e=0,n=i.length;e<n;e++)if(!ki(i[e],t[e]))return!1;return!0}function Kl(i,t){const e=Object.getOwnPropertyNames(i),n=Object.getOwnPropertyNames(t);if(e.length!==n.length)return!1;for(let o=0,s=e.length;o<s;o++){const r=e[o];if(!ki(i[r],t[r]))return!1}return!0}function $e(i,t,e={deep:!1}){return e.deep?ki(i,t):_l(i,t)}function Vt(i){return i<.5?4*i*i*i:.5*Math.pow(2*i-2,3)+1}function Zo(i){const t=i-1;return t*t*t+1}function Mt(i,{delay:t=0,duration:e=400,easing:n=Xt}={}){const o=+getComputedStyle(i).opacity;return{delay:t,duration:e,easing:n,css:s=>`opacity: ${s*o}`}}function _o(i,{delay:t=0,duration:e=400,easing:n=Zo,x:o=0,y:s=0,opacity:r=0}={}){const a=getComputedStyle(i),l=+a.opacity,c=a.transform==="none"?"":a.transform,d=l*(1-r);return{delay:t,duration:e,easing:n,css:(f,u)=>`
|
|
105
105
|
transform: ${c} translate(${(1-f)*o}px, ${(1-f)*s}px);
|
|
106
|
-
opacity: ${l-d*u}`}}function Gn(i,{delay:t=0,speed:e,duration:n,easing:o=Vt}={}){let s=i.getTotalLength();const r=getComputedStyle(i);return r.strokeLinecap!=="butt"&&(s+=parseInt(r.strokeWidth)),n===void 0?e===void 0?n=800:n=s/e:typeof n=="function"&&(n=n(s)),{delay:t,duration:n,easing:o,css:(a,l)=>`stroke-dasharray: ${a*s} ${l*s}`}}const gt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADMAAAAzCAMAAAANf8AYAAAC2VBMVEUAAACCnP+Dn/+Enf+HqP+Gp/+Fof+Gpf+IrP+Lsf+Dof+Cmv+Lsv+Mtf+Eo/+Bmf+JrP+Hqf+Env+Krv+Fo/+Pu/+Ms/+Qvv+Hqf+RwP+KsP+Fpf+Mtv+Gov+Bnf+Qv/+Nt/+Krv+Ho/+Rwf+Ouv+Emv+Amv+SxP+Sw/+NuP+Mtf/G0f6huP+Ot/+JrP+Jqv+Dnv+crf6Uqv////+QvP+PvP+Ms//J0/3p9/+Ux/+Ouf+Krf+Iqf+Fpv+/zf6WsP+MpP+RqP+Uyf+Jy//V3P6Yuf+Qqf+Rqv/5/f+Sxf+Jy/////+Lx/+Ouf+Nw/+Owv+PwP+Jr/+Jq/+VvP+Vuv/c4v+Fnf+btP+InP+Blf/3+P6Txf+Jzf+Jyf+NxP+Qwf/t8/6Svv+Tvf/O1f7Czv3T2f6cu/+qvP7a4fvo7v77/v/o9//p9//0+v////+Vy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RpuAKJxiI1tHhcQJAYOHDhgwOZZs4ZSTHR5lQQYPDW1DS4aELQxdyEIAANGjtk8c6aaqTslk8gVwIAN0w3rAEL2bMtHm12AIOHqenXaNDWztEwo9hKJGHjR6OO0yDSI1IGdoQ0iY0a6Tt+06fKUDRQzqKw8Qlxr1AXrwNqwDvGBA+BrGUDc3d3Xr5+SQZj0E2ERqXIjPAJYNUbD18FoWEeDbHLPzLyQ4ePjQ5i3x1RCubfmpqkjMMNo6KOJ5uqe+f58C9GoaD29XyVSYS1h4DftKeWDDN4AbACZMZAsExEKghWUNKXWhlPfA2P1qjmUT556a9jmQotWi/VOFael1lR7ep4JfRZy8nhpwtG4wMMB/gdi9/nNH+vhezsmJ+fG5quX12fomHl6J+KFy88uA2RJyJPE4wkL4wIPBfgXxO5HxGN7zNw5W2bNnLZhio+OmaR3LD6tplrLfKeYAwX7/O6Dje/2dpniwuKiwoMHH+bn7723Z8/uHTu2fpg9+3p29sYrWVnr1l1cO2HCUFCGT+tshUcWLPj6IDf37ued27Z9unXz2owZU6dOnnxp4sQ1q1ePH79KN6vbQWc1SrfrTit6lO5NO6/F8yZNmofBfgNTwRQLsPLsHQAAAABJRU5ErkJggg==";function $l(i){return i*180/Math.PI}function ec(i){le(i,"svelte-17cl35n",".floorplan__camera-position.svelte-17cl35n{position:absolute;width:0;height:0}.floorplan__camera-rotate.svelte-17cl35n{position:absolute;background-repeat:no-repeat;background-size:100%}")}function tc(i){let t,e;return{c(){t=Q("div"),e=Q("div"),b(e,"class","floorplan__camera-rotate svelte-17cl35n"),F(e,"background-image",`url(${i[0]||gt})`),F(e,"width",i[4],!1),F(e,"height",i[4],!1),F(e,"left","-"+i[4],!1),F(e,"top","-"+i[4],!1),F(e,"transform",`rotate(${i[3]}deg)`,!1),F(e,"transform-origin",`${i[4]} ${i[4]}`,!1),b(t,"class","floorplan__camera-position svelte-17cl35n"),F(t,"left",i[1],!1),F(t,"top",i[2],!1)},m(n,o){B(n,t,o),R(t,e)},p(n,[o]){o&1&&F(e,"background-image",`url(${n[0]||gt})`)},i:ne,o:ne,d(n){n&&z(t)}}}function nc(i,t,e){let{panoIndex:n}=t,{floorplanData:o}=t,{lastPanoramaLongitude:s}=t,{cameraImageUrl:r}=t;const{observers:a}=o,l=a[n],c=l.positionInImage.x,d=l.positionInImage.y,f=c*100+"%",u=d*100+"%",h=-$l(s)+45,m=document.body.clientWidth,g=document.body.clientHeight,A=`${(m<500||g<500?17:37)/16}rem`;return i.$$set=C=>{"panoIndex"in C&&e(5,n=C.panoIndex),"floorplanData"in C&&e(6,o=C.floorplanData),"lastPanoramaLongitude"in C&&e(7,s=C.lastPanoramaLongitude),"cameraImageUrl"in C&&e(0,r=C.cameraImageUrl)},[r,f,u,h,A,n,o,s]}class ic extends se{constructor(t){super(),oe(this,t,nc,tc,ie,{panoIndex:5,floorplanData:6,lastPanoramaLongitude:7,cameraImageUrl:0},ec)}}const oc="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAArUAAAB7CAMAAABdA4ieAAAC91BMVEUAAACOpP/H0P+yxP/a4/+asv/W3/+/z/+cs//S3f+mu//Q2//5+v/H1P/d5f/l6//y9f++zf/i6f+ww/+ovP/7/P/u8v/N2f+Mp//q7/+4yf+uwf+Wr/+7y/+1xv+Ho//x9P+9zP+2x/+swP+gt/+Oqf/Y4v/r8P/l7P/b4//F0/+juf+Zsv+XsP+Trf/p7v97mv9wj/+kuv+ftf/x9P92lf/3+f/I1f+5yv+Eof98m//8/f/4+f90lf+9zf/j6f/T3f/L1/+Bnv/6+/+SrP/m7P/f5v/O2v/L2P/E0v/Az//+///s8P/e5v+rv/+pvv+Anv+qvv+Pqv+Kpv+CoP93l/9xlP/z9v/p7v90lf9uj//P2//v8//o7f/k6v/K1v+6yv9rjv98nv/E0v/9/v/09//h6P/X4f9pjP/9/f/N2f/K1v/C0f+Ho/99nP/1+P9sj//6+//u8/+iuP/u8//g6P/U3v+3x/+0xv+etf+Vrv9pjf/B0P9ukf+ht/+Vr/94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bU7ma/EXJZBW5JrZl2V9bRnNWyWe4xt8TWTPd3FdEYSEFslnsoURlAi01FqN56f2br2xeOe9ytgbyf4nErGg/hl6RN4Jc5Lt++2rVjHMdCIIqiqtoRQW2mMogIyZFjlsB2B9wjjaY1PXa3wcbSPaEDR1fP9fVt8aPai2+f2+TlWu2l0yweZHlEO5S9cyu1lDKj5T/fWCH4jLaUnXMbvFyrzby8xRrayqUM2+ZWqvuM1nmpgHWkl8F9z9yG7LNa5yEMa0n8yHb93Er1oXjnoMVyFn3KQVcP7VRpFn+sDiznaiuHNufsHnkIwy7aPA/r5jbFGW3m7S12ku55WPN7Li1PPIRhN6sjtBjTmm+KmYcwPEOKs9tHF1JDHCoHLZ5DQ8yPBic9DoHjAKvsb85qjbFxHOCprMZaf5qdhlorxwGeTsPIttvPlno0y3GAZfbHp6n3ynGAV0m99u/2J6H3znGAvW4n+J25tdY7xwFey1pvQe6/DlrjOMDLqfXW7N5pbs0YWhxgtpj0rl1uiaHFISzccSWohUCzOIemm0VKChwHOMutKCVwHOA4av/JVi0xtDiRpCRfRcvQ4lBfxSnG0OJc/+xTjKHFyVRMP38iDC0O92lZVRhanO+vcVWGFu9BRWkW7+Z3rapEizdy7ZVm8V5Gtr8AtSnix59eOmYAAAAASUVORK5CYII=";function sc(i){le(i,"svelte-rpkaro",".floorplan-plugin__compass.svelte-rpkaro{position:absolute;left:50%;top:-2.875rem;width:14.4375rem;height:2.5625rem;will-change:opacity;transform-origin:center 11.5rem}.floorplan-plugin__compass-image.svelte-rpkaro{width:100%;height:100%;position:absolute;left:0;top:0;opacity:0.1;background-repeat:no-repeat;background-size:100% 100%}.floorplan-plugin__compass-text.svelte-rpkaro{position:absolute;left:50%;top:0.9375rem;transform:translateX(-50%);opacity:0.2;font-weight:bold;font-size:0.625rem;color:#fff}")}function rc(i){let t,e,n,o,s;return{c(){t=Q("div"),e=Q("div"),n=_(),o=Q("span"),s=Le(i[0]),b(e,"class","floorplan-plugin__compass-image svelte-rpkaro"),F(e,"background-image",`url(${oc})`),b(o,"class","floorplan-plugin__compass-text svelte-rpkaro"),b(t,"class","floorplan-plugin__compass svelte-rpkaro"),F(t,"transform",i[2],!1)},m(r,a){B(r,t,a),R(t,e),R(t,n),R(t,o),R(o,s)},p(r,a){a&1&&je(s,r[0])},d(r){r&&z(t)}}}function ac(i){let t,e=i[1]&&rc(i);return{c(){e&&e.c(),t=Ae()},m(n,o){e&&e.m(n,o),B(n,t,o)},p(n,[o]){n[1]&&e.p(n,o)},i:ne,o:ne,d(n){e&&e.d(n),n&&z(t)}}}function lc(i){return i/Math.PI*180}function cc(i,t,e){var c;let{floorplanData:n}=t,{northDesc:o}=t;const s=(c=n.entrance)==null?void 0:c.northRad,r=typeof s=="number",l=`translateX(-50%) translateZ(10px) rotate(${-(s?lc(s):0)+90}deg)`;return i.$$set=d=>{"floorplanData"in d&&e(3,n=d.floorplanData),"northDesc"in d&&e(0,o=d.northDesc)},[o,r,l,n]}class dc extends se{constructor(t){super(),oe(this,t,cc,ac,ie,{floorplanData:3,northDesc:0},sc)}}const Jt=[];function Di(i,t=ne){let e;const n=new Set;function o(a){if(ie(i,a)&&(i=a,e)){const l=!Jt.length;for(const c of n)c[1](),Jt.push(c,i);if(l){for(let c=0;c<Jt.length;c+=2)Jt[c][0](Jt[c+1]);Jt.length=0}}}function s(a){o(a(i))}function r(a,l=ne){const c=[a,l];return n.add(c),n.size===1&&(e=t(o)||ne),a(i),()=>{n.delete(c),n.size===0&&(e(),e=null)}}return{set:o,update:s,subscribe:r}}function uc(i){le(i,"svelte-1gfoniz","img.svelte-1gfoniz{width:100%;height:100%}")}function fc(i){let t,e;return{c(){t=Q("img"),qe(t.src,e=i[0])||b(t,"src",e),b(t,"alt","floorplan iamge"),b(t,"class","svelte-1gfoniz")},m(n,o){B(n,t,o)},p(n,[o]){o&1&&!qe(t.src,e=n[0])&&b(t,"src",e)},i:ne,o:ne,d(n){n&&z(t)}}}function hc(i,t,e){let{url:n}=t;return i.$$set=o=>{"url"in o&&e(0,n=o.url)},[n]}class mc extends se{constructor(t){super(),oe(this,t,hc,fc,ie,{url:0},uc)}}function pc(i){le(i,"svelte-ub47ya",".floorplan-plugin__base-image.svelte-ub47ya{width:100%;height:100%}")}function gc(i){let t,e,n,o;return{c(){t=Q("div"),e=new zn(!1),n=_(),o=new zn(!1),e.a=n,o.a=null,b(t,"class","floorplan-plugin__base-image svelte-ub47ya")},m(s,r){B(s,t,r),e.m(i[1],t),R(t,n),o.m(i[0],t)},p(s,[r]){r&1&&o.p(s[0])},i:ne,o:ne,d(s){s&&z(t)}}}function Ac(i,t,e){let{content:n}=t;const o=`
|
|
106
|
+
opacity: ${l-d*u}`}}function Nn(i,{delay:t=0,speed:e,duration:n,easing:o=Vt}={}){let s=i.getTotalLength();const r=getComputedStyle(i);return r.strokeLinecap!=="butt"&&(s+=parseInt(r.strokeWidth)),n===void 0?e===void 0?n=800:n=s/e:typeof n=="function"&&(n=n(s)),{delay:t,duration:n,easing:o,css:(a,l)=>`stroke-dasharray: ${a*s} ${l*s}`}}const gt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADMAAAAzCAMAAAANf8AYAAAC2VBMVEUAAACCnP+Dn/+Enf+HqP+Gp/+Fof+Gpf+IrP+Lsf+Dof+Cmv+Lsv+Mtf+Eo/+Bmf+JrP+Hqf+Env+Krv+Fo/+Pu/+Ms/+Qvv+Hqf+RwP+KsP+Fpf+Mtv+Gov+Bnf+Qv/+Nt/+Krv+Ho/+Rwf+Ouv+Emv+Amv+SxP+Sw/+NuP+Mtf/G0f6huP+Ot/+JrP+Jqv+Dnv+crf6Uqv////+QvP+PvP+Ms//J0/3p9/+Ux/+Ouf+Krf+Iqf+Fpv+/zf6WsP+MpP+RqP+Uyf+Jy//V3P6Yuf+Qqf+Rqv/5/f+Sxf+Jy/////+Lx/+Ouf+Nw/+Owv+PwP+Jr/+Jq/+VvP+Vuv/c4v+Fnf+btP+InP+Blf/3+P6Txf+Jzf+Jyf+NxP+Qw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4VYSPQF5cyZM6GFYl6eTlN6ixi6aE6PqDLQZRi4EKI/KOfGFjUzqCKsXu6l2RpuAKJxiI1tHhcQJAYOHDhgwOZZs4ZSTHR5lQQYPDW1DS4aELQxdyEIAANGjtk8c6aaqTslk8gVwIAN0w3rAEL2bMtHm12AIOHqenXaNDWztEwo9hKJGHjR6OO0yDSI1IGdoQ0iY0a6Tt+06fKUDRQzqKw8Qlxr1AXrwNqwDvGBA+BrGUDc3d3Xr5+SQZj0E2ERqXIjPAJYNUbD18FoWEeDbHLPzLyQ4ePjQ5i3x1RCubfmpqkjMMNo6KOJ5uqe+f58C9GoaD29XyVSYS1h4DftKeWDDN4AbACZMZAsExEKghWUNKXWhlPfA2P1qjmUT556a9jmQotWi/VOFael1lR7ep4JfRZy8nhpwtG4wMMB/gdi9/nNH+vhezsmJ+fG5quX12fomHl6J+KFy88uA2RJyJPE4wkL4wIPBfgXxO5HxGN7zNw5W2bNnLZhio+OmaR3LD6tplrLfKeYAwX7/O6Dje/2dpniwuKiwoMHH+bn7723Z8/uHTu2fpg9+3p29sYrWVnr1l1cO2HCUFCGT+tshUcWLPj6IDf37ued27Z9unXz2owZU6dOnnxp4sQ1q1ePH79KN6vbQWc1SrfrTit6lO5NO6/F8yZNmofBfgNTwRQLsPLsHQAAAABJRU5ErkJggg==";function $l(i){return i*180/Math.PI}function ec(i){le(i,"svelte-17cl35n",".floorplan__camera-position.svelte-17cl35n{position:absolute;width:0;height:0}.floorplan__camera-rotate.svelte-17cl35n{position:absolute;background-repeat:no-repeat;background-size:100%}")}function tc(i){let t,e;return{c(){t=Q("div"),e=Q("div"),b(e,"class","floorplan__camera-rotate svelte-17cl35n"),F(e,"background-image",`url(${i[0]||gt})`),F(e,"width",i[4]),F(e,"height",i[4]),F(e,"left","-"+i[4]),F(e,"top","-"+i[4]),F(e,"transform",`rotate(${i[3]}deg)`),F(e,"transform-origin",`${i[4]} ${i[4]}`),b(t,"class","floorplan__camera-position svelte-17cl35n"),F(t,"left",i[1]),F(t,"top",i[2])},m(n,o){B(n,t,o),O(t,e)},p(n,[o]){o&1&&F(e,"background-image",`url(${n[0]||gt})`)},i:ne,o:ne,d(n){n&&z(t)}}}function nc(i,t,e){let{panoIndex:n}=t,{floorplanData:o}=t,{lastPanoramaLongitude:s}=t,{cameraImageUrl:r}=t;const{observers:a}=o,l=a[n],c=l.positionInImage.x,d=l.positionInImage.y,f=c*100+"%",u=d*100+"%",h=-$l(s)+45,m=document.body.clientWidth,g=document.body.clientHeight,A=`${(m<500||g<500?17:37)/16}rem`;return i.$$set=C=>{"panoIndex"in C&&e(5,n=C.panoIndex),"floorplanData"in C&&e(6,o=C.floorplanData),"lastPanoramaLongitude"in C&&e(7,s=C.lastPanoramaLongitude),"cameraImageUrl"in C&&e(0,r=C.cameraImageUrl)},[r,f,u,h,A,n,o,s]}class ic extends se{constructor(t){super(),oe(this,t,nc,tc,ie,{panoIndex:5,floorplanData:6,lastPanoramaLongitude:7,cameraImageUrl:0},ec)}}const oc="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAArUAAAB7CAMAAABdA4ieAAAC91BMVEUAAACOpP/H0P+yxP/a4/+asv/W3/+/z/+cs//S3f+mu//Q2//5+v/H1P/d5f/l6//y9f++zf/i6f+ww/+ovP/7/P/u8v/N2f+Mp//q7/+4yf+uwf+Wr/+7y/+1xv+Ho//x9P+9zP+2x/+swP+gt/+Oqf/Y4v/r8P/l7P/b4//F0/+juf+Zsv+XsP+Trf/p7v97mv9wj/+kuv+ftf/x9P92lf/3+f/I1f+5yv+Eof98m//8/f/4+f90lf+9zf/j6f/T3f/L1/+Bnv/6+/+SrP/m7P/f5v/O2v/L2P/E0v/Az//+///s8P/e5v+rv/+pvv+Anv+qvv+Pqv+Kpv+CoP93l/9xlP/z9v/p7v90lf9uj//P2//v8//o7f/k6v/K1v+6yv9rjv98nv/E0v/9/v/09//h6P/X4f9pjP/9/f/N2f/K1v/C0f+Ho/99nP/1+P9sj//6+//u8/+iuP/u8//g6P/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+Xuu5cpUqvU+wwzYbVVkIXYLHd/olekVpmpZ8KiMYbU7ma/EXJZBW5JrZl2V9bRnNWyWe4xt8TWTPd3FdEYSEFslnsoURlAi01FqN56f2br2xeOe9ytgbyf4nErGg/hl6RN4Jc5Lt++2rVjHMdCIIqiqtoRQW2mMogIyZFjlsB2B9wjjaY1PXa3wcbSPaEDR1fP9fVt8aPai2+f2+TlWu2l0yweZHlEO5S9cyu1lDKj5T/fWCH4jLaUnXMbvFyrzby8xRrayqUM2+ZWqvuM1nmpgHWkl8F9z9yG7LNa5yEMa0n8yHb93Er1oXjnoMVyFn3KQVcP7VRpFn+sDiznaiuHNufsHnkIwy7aPA/r5jbFGW3m7S12ku55WPN7Li1PPIRhN6sjtBjTmm+KmYcwPEOKs9tHF1JDHCoHLZ5DQ8yPBic9DoHjAKvsb85qjbFxHOCprMZaf5qdhlorxwGeTsPIttvPlno0y3GAZfbHp6n3ynGAV0m99u/2J6H3znGAvW4n+J25tdY7xwFey1pvQe6/DlrjOMDLqfXW7N5pbs0YWhxgtpj0rl1uiaHFISzccSWohUCzOIemm0VKChwHOMutKCVwHOA4av/JVi0xtDiRpCRfRcvQ4lBfxSnG0OJc/+xTjKHFyVRMP38iDC0O92lZVRhanO+vcVWGFu9BRWkW7+Z3rapEizdy7ZVm8V5Gtr8AtSnix59eOmYAAAAASUVORK5CYII=";function sc(i){le(i,"svelte-rpkaro",".floorplan-plugin__compass.svelte-rpkaro{position:absolute;left:50%;top:-2.875rem;width:14.4375rem;height:2.5625rem;will-change:opacity;transform-origin:center 11.5rem}.floorplan-plugin__compass-image.svelte-rpkaro{width:100%;height:100%;position:absolute;left:0;top:0;opacity:0.1;background-repeat:no-repeat;background-size:100% 100%}.floorplan-plugin__compass-text.svelte-rpkaro{position:absolute;left:50%;top:0.9375rem;transform:translateX(-50%);opacity:0.2;font-weight:bold;font-size:0.625rem;color:#fff}")}function rc(i){let t,e,n,o,s;return{c(){t=Q("div"),e=Q("div"),n=_(),o=Q("span"),s=Le(i[0]),b(e,"class","floorplan-plugin__compass-image svelte-rpkaro"),F(e,"background-image",`url(${oc})`),b(o,"class","floorplan-plugin__compass-text svelte-rpkaro"),b(t,"class","floorplan-plugin__compass svelte-rpkaro"),F(t,"transform",i[2])},m(r,a){B(r,t,a),O(t,e),O(t,n),O(t,o),O(o,s)},p(r,a){a&1&&je(s,r[0])},d(r){r&&z(t)}}}function ac(i){let t,e=i[1]&&rc(i);return{c(){e&&e.c(),t=Ae()},m(n,o){e&&e.m(n,o),B(n,t,o)},p(n,[o]){n[1]&&e.p(n,o)},i:ne,o:ne,d(n){e&&e.d(n),n&&z(t)}}}function lc(i){return i/Math.PI*180}function cc(i,t,e){var c;let{floorplanData:n}=t,{northDesc:o}=t;const s=(c=n.entrance)==null?void 0:c.northRad,r=typeof s=="number",l=`translateX(-50%) translateZ(10px) rotate(${-(s?lc(s):0)+90}deg)`;return i.$$set=d=>{"floorplanData"in d&&e(3,n=d.floorplanData),"northDesc"in d&&e(0,o=d.northDesc)},[o,r,l,n]}class dc extends se{constructor(t){super(),oe(this,t,cc,ac,ie,{floorplanData:3,northDesc:0},sc)}}const Jt=[];function Di(i,t=ne){let e;const n=new Set;function o(a){if(ie(i,a)&&(i=a,e)){const l=!Jt.length;for(const c of n)c[1](),Jt.push(c,i);if(l){for(let c=0;c<Jt.length;c+=2)Jt[c][0](Jt[c+1]);Jt.length=0}}}function s(a){o(a(i))}function r(a,l=ne){const c=[a,l];return n.add(c),n.size===1&&(e=t(o)||ne),a(i),()=>{n.delete(c),n.size===0&&(e(),e=null)}}return{set:o,update:s,subscribe:r}}function uc(i){le(i,"svelte-1gfoniz","img.svelte-1gfoniz{width:100%;height:100%}")}function fc(i){let t,e;return{c(){t=Q("img"),qe(t.src,e=i[0])||b(t,"src",e),b(t,"alt","floorplan iamge"),b(t,"class","svelte-1gfoniz")},m(n,o){B(n,t,o)},p(n,[o]){o&1&&!qe(t.src,e=n[0])&&b(t,"src",e)},i:ne,o:ne,d(n){n&&z(t)}}}function hc(i,t,e){let{url:n}=t;return i.$$set=o=>{"url"in o&&e(0,n=o.url)},[n]}class mc extends se{constructor(t){super(),oe(this,t,hc,fc,ie,{url:0},uc)}}function pc(i){le(i,"svelte-ub47ya",".floorplan-plugin__base-image.svelte-ub47ya{width:100%;height:100%}")}function gc(i){let t,e,n,o;return{c(){t=Q("div"),e=new Mn(!1),n=_(),o=new Mn(!1),e.a=n,o.a=null,b(t,"class","floorplan-plugin__base-image svelte-ub47ya")},m(s,r){B(s,t,r),e.m(i[1],t),O(t,n),o.m(i[0],t)},p(s,[r]){r&1&&o.p(s[0])},i:ne,o:ne,d(s){s&&z(t)}}}function Ac(i,t,e){let{content:n}=t;const o=`
|
|
107
107
|
<style>
|
|
108
108
|
svg [type='lineGroup'] path {
|
|
109
109
|
fill: #ffffff;
|
|
@@ -112,7 +112,7 @@ transition: all 500ms;
|
|
|
112
112
|
svg [type='lineItemGroup'] g g g g {
|
|
113
113
|
stroke: #ffffff;
|
|
114
114
|
}</style>
|
|
115
|
-
`;return i.$$set=s=>{"content"in s&&e(0,n=s.content)},[n,o]}class vc extends se{constructor(t){super(),oe(this,t,Ac,gc,ie,{content:0},pc)}}function bc(i){le(i,"svelte-ozpg4a",".floorplan-plugin__base-image.svelte-ozpg4a{position:absolute;z-index:10;width:100%;height:100%;pointer-events:none}")}function yc(i){let t,e;return t=new mc({props:{url:i[1].url}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.url=n[1].url),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function wc(i){let t,e;return t=new vc({props:{content:i[0]}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.content=n[0]),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function Cc(i){let t,e,n,o;const s=[wc,yc],r=[];function a(l,c){return l[0]?0:l[1]?1:-1}return~(e=a(i))&&(n=r[e]=s[e](i)),{c(){t=Q("div"),n&&n.c(),b(t,"class","floorplan-plugin__base-image svelte-ozpg4a")},m(l,c){B(l,t,c),~e&&r[e].m(t,null),o=!0},p(l,[c]){let d=e;e=a(l),e===d?~e&&r[e].p(l,c):(n&&(fe(),M(r[d],1,1,()=>{r[d]=null}),he()),~e?(n=r[e],n?n.p(l,c):(n=r[e]=s[e](l),n.c()),k(n,1),n.m(t,null)):n=null)},i(l){o||(k(n),o=!0)},o(l){M(n),o=!1},d(l){l&&z(t),~e&&r[e].d()}}}function Pc(i,t,e){let n,o,{floorIndex:s}=t,{floorplanData:r}=t;return i.$$set=a=>{"floorIndex"in a&&e(2,s=a.floorIndex),"floorplanData"in a&&e(3,r=a.floorplanData)},i.$$.update=()=>{var a,l;i.$$.dirty&12&&e(1,n=r.outlines[s]),i.$$.dirty&12&&e(0,o=(l=(a=r.outlines)==null?void 0:a[s])==null?void 0:l.svgContent)},[o,n,s,r]}class qo extends se{constructor(t){super(),oe(this,t,Pc,Cc,ie,{floorIndex:2,floorplanData:3},bc)}}function Ic(i){le(i,"svelte-12pzct5",".floorplan-plugin__room-label-item.svelte-12pzct5{position:absolute;display:flex;flex-flow:column;align-items:center;line-height:1;color:#fff;transform:translate(-50%, -50%);white-space:nowrap;will-change:opacity;transition:opacity 300ms}.floorplan-plugin__room-size.svelte-12pzct5{opacity:0.45}")}function Ec(i){let t,e=i[4].outerHTML+"",n;return{c(){t=new zn(!1),n=Ae(),t.a=n},m(o,s){t.m(e,o,s),B(o,n,s)},p(o,s){s&16&&e!==(e=o[4].outerHTML+"")&&t.p(e)},d(o){o&&z(n),o&&t.d()}}}function xc(i){let t,e=i[0].name+"",n,o,s,r;return{c(){t=Q("span"),n=Le(e),o=_(),s=Q("span"),r=Le(i[5]),b(t,"class","floorplan-plugin__room-name"),b(s,"class","floorplan-plugin__room-size svelte-12pzct5")},m(a,l){B(a,t,l),R(t,n),B(a,o,l),B(a,s,l),R(s,r)},p(a,l){l&1&&e!==(e=a[0].name+"")&&je(n,e),l&32&&je(r,a[5])},d(a){a&&z(t),a&&z(o),a&&z(s)}}}function kc(i){let t;function e(s,r){if(s[1]===void 0)return xc;if(s[4])return Ec}let n=e(i),o=n&&n(i);return{c(){t=Q("div"),o&&o.c(),b(t,"class","floorplan-plugin__room-label-item svelte-12pzct5"),F(t,"left",i[6],!1),F(t,"top",i[7],!1),F(t,"font-size",i[8],!1),F(t,"opacity",i[3]?"1":"0",!1)},m(s,r){B(s,t,r),o&&o.m(t,null),i[16](t)},p(s,[r]){n===(n=e(s))&&o?o.p(s,r):(o&&o.d(1),o=n&&n(s),o&&(o.c(),o.m(t,null))),r&8&&F(t,"opacity",s[3]?"1":"0",!1)},i:ne,o:ne,d(s){s&&z(t),o&&o.d(),i[16](null)}}}function Dc(i,t){const e=i[0],n=i[1];let o=!1;for(let s=0,r=t.length-1;s<t.length;r=s++){const a=t[s][0],l=t[s][1],c=t[r][0],d=t[r][1];l>n!=d>n&&e<(c-a)*(n-l)/(d-l)+a&&(o=!o)}return o}function Lc(i,t,e){let n,o,s,r,{pxmm:a}=t,{room:l}=t,{hoveredRoom:c}=t,{getRoomAreaText:d}=t,{getLabelElement:f}=t,{adaptiveRoomLabelVisibleEnable:u}=t;function h(x,O){if(O.width===0||O.height===0)return()=>!1;const T=x.path.map(({x:te,y:X})=>[te,X]),G=x.roomLabel.position,{x:U,y:P}=G,{width:S,height:j}=O,W=S/2,Y=j/2;return function(X){const V=U*X,ce=P*X,de=T.map(([Pe,ze])=>[Pe*X,ze*X]);return[[V+W,ce-Y],[V-W,ce-Y],[V-W,ce+Y],[V+W,ce+Y]].every(Pe=>Dc(Pe,de))}}const m=document.body.clientWidth,g=document.body.clientHeight,v=l.roomLabel,A=v.positionInImage.x*100+"%",C=v.positionInImage.y*100+"%",w=(m<500||g<500?10:14)/16+"rem";let E=!1,D,y;c.subscribe(function(O){e(13,E=!!O&&O.id===l.id)}),Ue(()=>{const x=D==null?void 0:D.getClientRects()[0];e(14,y={width:x.width,height:x.height})});function L(x){Be[x?"unshift":"push"](()=>{D=x,e(2,D)})}return i.$$set=x=>{"pxmm"in x&&e(9,a=x.pxmm),"room"in x&&e(0,l=x.room),"hoveredRoom"in x&&e(10,c=x.hoveredRoom),"getRoomAreaText"in x&&e(11,d=x.getRoomAreaText),"getLabelElement"in x&&e(1,f=x.getLabelElement),"adaptiveRoomLabelVisibleEnable"in x&&e(12,u=x.adaptiveRoomLabelVisibleEnable)},i.$$.update=()=>{i.$$.dirty&2049&&e(5,n=l.size?d(l.size):""),i.$$.dirty&16385&&e(15,o=y?h(l,y):void 0),i.$$.dirty&3&&e(4,s=f==null?void 0:f(l)),i.$$.dirty&45568&&e(3,r=u?E?!0:!!(o!=null&&o(a)):!0)},[l,f,D,r,s,n,A,C,w,a,c,d,u,E,y,o,L]}class Sc extends se{constructor(t){super(),oe(this,t,Lc,kc,ie,{pxmm:9,room:0,hoveredRoom:10,getRoomAreaText:11,getLabelElement:1,adaptiveRoomLabelVisibleEnable:12},Ic)}}function zc(i){le(i,"svelte-13xux0b",".floorplan-plugin__room-labels.svelte-13xux0b{width:100%;height:100%;position:absolute;left:0;top:0;z-index:20;pointer-events:none}")}function Ko(i,t,e){const n=i.slice();return n[10]=t[e],n}function $o(i){let t,e=[],n=new Map,o,s,r=i[6];const a=l=>l[10].id;for(let l=0;l<r.length;l+=1){let c=Ko(i,r,l),d=a(c);n.set(d,e[l]=es(d,c))}return{c(){t=Q("div");for(let l=0;l<e.length;l+=1)e[l].c();b(t,"class","floorplan-plugin__room-labels svelte-13xux0b"),De(()=>i[9].call(t))},m(l,c){B(l,t,c);for(let d=0;d<e.length;d+=1)e[d].m(t,null);o=ft(t,i[9].bind(t)),s=!0},p(l,c){c&111&&(r=l[6],fe(),e=Ve(e,c,a,1,l,r,n,t,lt,es,null,Ko),he())},i(l){if(!s){for(let c=0;c<r.length;c+=1)k(e[c]);s=!0}},o(l){for(let c=0;c<e.length;c+=1)M(e[c]);s=!1},d(l){l&&z(t);for(let c=0;c<e.length;c+=1)e[c].d();o()}}}function es(i,t){let e,n,o;const s=[{pxmm:t[5],room:t[10],getLabelElement:t[2],getRoomAreaText:t[1],hoveredRoom:t[0],adaptiveRoomLabelVisibleEnable:t[3]}];let r={};for(let a=0;a<s.length;a+=1)r=Ie(r,s[a]);return n=new Sc({props:r}),{key:i,first:null,c(){e=Ae(),ee(n.$$.fragment),this.first=e},m(a,l){B(a,e,l),K(n,a,l),o=!0},p(a,l){t=a;const c=l&111?Te(s,[{pxmm:t[5],room:t[10],getLabelElement:t[2],getRoomAreaText:t[1],hoveredRoom:t[0],adaptiveRoomLabelVisibleEnable:t[3]}]):{};n.$set(c)},i(a){o||(k(n.$$.fragment,a),o=!0)},o(a){M(n.$$.fragment,a),o=!1},d(a){a&&z(e),$(n,a)}}}function Mc(i){let t,e,n=i[6]&&$o(i);return{c(){n&&n.c(),t=Ae()},m(o,s){n&&n.m(o,s),B(o,t,s),e=!0},p(o,[s]){o[6]?n?(n.p(o,s),s&64&&k(n,1)):(n=$o(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(fe(),M(n,1,1,()=>{n=null}),he())},i(o){e||(k(n),e=!0)},o(o){M(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function jc(i,t,e){let n,{floorIndex:o}=t,{floorplanData:s}=t,{hoveredRoom:r}=t,{getRoomAreaText:a}=t,{getLabelElement:l}=t,{adaptiveRoomLabelVisibleEnable:c}=t,d=0,f=0;function u(){d=this.clientWidth,e(4,d)}return i.$$set=h=>{"floorIndex"in h&&e(7,o=h.floorIndex),"floorplanData"in h&&e(8,s=h.floorplanData),"hoveredRoom"in h&&e(0,r=h.hoveredRoom),"getRoomAreaText"in h&&e(1,a=h.getRoomAreaText),"getLabelElement"in h&&e(2,l=h.getLabelElement),"adaptiveRoomLabelVisibleEnable"in h&&e(3,c=h.adaptiveRoomLabelVisibleEnable)},i.$$.update=()=>{if(i.$$.dirty&384&&e(6,n=s.floorDatas[o].rooms),i.$$.dirty&272){const{max:h,min:m}=s.bounding,g=h.x-m.x;e(5,f=d/g)}},[r,a,l,c,d,f,n,o,s,u]}class Bc extends se{constructor(t){super(),oe(this,t,jc,Mc,ie,{floorIndex:7,floorplanData:8,hoveredRoom:0,getRoomAreaText:1,getLabelElement:2,adaptiveRoomLabelVisibleEnable:3},zc)}}function Tc(i){le(i,"svelte-djlmk4",".floorplan-plugin__rule-labels.svelte-djlmk4.svelte-djlmk4{position:absolute;display:flex}.floorplan-plugin__rule-labels--top.svelte-djlmk4.svelte-djlmk4{left:0;top:-1.25rem}.floorplan-plugin__rule-labels--bottom.svelte-djlmk4.svelte-djlmk4{left:0;bottom:-1.25rem}.floorplan-plugin__rule-labels--left.svelte-djlmk4.svelte-djlmk4{top:0;left:-1.25rem}.floorplan-plugin__rule-labels--right.svelte-djlmk4.svelte-djlmk4{top:0;right:-1.25rem}.floorplan-plugin__rule-line.svelte-djlmk4.svelte-djlmk4{background:#fff;opacity:0.05;width:100%;height:100%}.floorplan-plugin__rule-scale-wrapper.svelte-djlmk4.svelte-djlmk4{position:absolute;width:0.3125rem;height:100%;left:50%;top:0;transform:translateX(-50%)}.floorplan-plugin__rule-labels.is-row.svelte-djlmk4 .floorplan-plugin__rule-scale-wrapper.svelte-djlmk4{width:100%;height:0.3125rem;top:50%;left:0;transform:translateY(-50%)}.floorplan-plugin__rule-scale.svelte-djlmk4.svelte-djlmk4{position:absolute;background:#fff;opacity:0.05;width:100%;height:0.0625rem}.floorplan-plugin__rule-labels.is-row.svelte-djlmk4 .floorplan-plugin__rule-scale.svelte-djlmk4{width:0.0625rem;height:100%}.floorplan-plugin__rule-text-wrapper.svelte-djlmk4.svelte-djlmk4{position:absolute}.floorplan-plugin__rule-labels--top.svelte-djlmk4 .floorplan-plugin__rule-text-wrapper.svelte-djlmk4{width:100%;height:0;top:0.625rem}.floorplan-plugin__rule-labels--bottom.svelte-djlmk4 .floorplan-plugin__rule-text-wrapper.svelte-djlmk4{width:100%;height:0;bottom:0.625rem}.floorplan-plugin__rule-labels--left.svelte-djlmk4 .floorplan-plugin__rule-text-wrapper.svelte-djlmk4{width:0;height:100%;left:0.625rem}.floorplan-plugin__rule-labels--right.svelte-djlmk4 .floorplan-plugin__rule-text-wrapper.svelte-djlmk4{width:0;height:100%;right:0.625rem}.floorplan-plugin__rule-text-item.svelte-djlmk4.svelte-djlmk4{width:0;height:0;position:absolute;transform:rotate(90deg)}.floorplan-plugin__rule-labels.is-row.svelte-djlmk4 .floorplan-plugin__rule-text-item.svelte-djlmk4{transform:rotate(0)}.floorplan-plugin__rule-text.svelte-djlmk4.svelte-djlmk4{width:-moz-max-content;width:max-content;transform:translate(-50%, -50%);font-size:0.625rem;color:#fff;opacity:0.2}")}function ts(i,t,e){const n=i.slice();return n[11]=t[e],n[13]=e,n}function ns(i,t,e){const n=i.slice();return n[14]=t[e],n}function is(i){let t;return{c(){t=Q("div"),b(t,"class","floorplan-plugin__rule-scale svelte-djlmk4"),F(t,"left",i[14].left*100+"%",!1),F(t,"bottom",i[14].bottom*100+"%",!1)},m(e,n){B(e,t,n)},p:ne,d(e){e&&z(t)}}}function os(i,t){let e,n,o=t[1](t[11].distance)+"",s,r;return{key:i,first:null,c(){e=Q("div"),n=Q("div"),s=Le(o),r=_(),b(n,"class","floorplan-plugin__rule-text svelte-djlmk4"),q(n,"is-row",t[2]),b(e,"class","floorplan-plugin__rule-text-item svelte-djlmk4"),F(e,"left",t[11].left*100+"%",!1),F(e,"bottom",t[11].bottom*100+"%",!1),this.first=e},m(a,l){B(a,e,l),R(e,n),R(n,s),R(e,r)},p(a,l){t=a,l&2&&o!==(o=t[1](t[11].distance)+"")&&je(s,o)},d(a){a&&z(e)}}}function Qc(i){let t,e,n,o,s,r,a=[],l=new Map,c,d=i[3],f=[];for(let m=0;m<d.length;m+=1)f[m]=is(ns(i,d,m));let u=i[4];const h=m=>m[13];for(let m=0;m<u.length;m+=1){let g=ts(i,u,m),v=h(g);l.set(v,a[m]=os(v,g))}return{c(){t=Q("div"),e=Q("div"),n=_(),o=Q("div");for(let m=0;m<f.length;m+=1)f[m].c();s=_(),r=Q("div");for(let m=0;m<a.length;m+=1)a[m].c();b(e,"class","floorplan-plugin__rule-line svelte-djlmk4"),b(o,"class","floorplan-plugin__rule-scale-wrapper svelte-djlmk4"),q(o,"is-row",i[2]),b(r,"class","floorplan-plugin__rule-text-wrapper svelte-djlmk4"),b(t,"class",c="floorplan-plugin__rule-labels floorplan-plugin__rule-labels--"+i[0]+" svelte-djlmk4"),q(t,"is-row",i[2]),F(t,"width",i[2]?"100%":1/16+"rem",!1),F(t,"height",i[2]?1/16+"rem":"100%",!1)},m(m,g){B(m,t,g),R(t,e),R(t,n),R(t,o);for(let v=0;v<f.length;v+=1)f[v].m(o,null);R(t,s),R(t,r);for(let v=0;v<a.length;v+=1)a[v].m(r,null)},p(m,[g]){if(g&8){d=m[3];let v;for(v=0;v<d.length;v+=1){const A=ns(m,d,v);f[v]?f[v].p(A,g):(f[v]=is(A),f[v].c(),f[v].m(o,null))}for(;v<f.length;v+=1)f[v].d(1);f.length=d.length}g&22&&(u=m[4],a=Ve(a,g,h,1,m,u,l,r,Uo,os,null,ts)),g&1&&c!==(c="floorplan-plugin__rule-labels floorplan-plugin__rule-labels--"+m[0]+" svelte-djlmk4")&&b(t,"class",c),g&5&&q(t,"is-row",m[2])},i:ne,o:ne,d(m){m&&z(t),Ke(f,m);for(let g=0;g<a.length;g+=1)a[g].d()}}}const Zt=1e3,_t=180;function Oc(i,t,e){let{type:n}=t,{data:o}=t,{bounding:s}=t,{getRuleDistanceText:r}=t;const a=n==="top"||n==="bottom",l=s.max.x-s.min.x-(Zt-_t)*2,c=s.max.y-s.min.y-(Zt-_t)*2,d=o.map(([m,g])=>a?[m.x,g.x]:[m.y,g.y]).flat().sort().filter((m,g,v)=>g===0?!0:m!==v[g-1]),f=d.map(m=>{const g=a?(m-s.min.x-Zt+_t)/l:0,v=a?0:(m-s.min.y-Zt+_t)/c;return{left:g,bottom:v}});f.unshift({left:0,bottom:0}),f.push(a?{left:1,bottom:0}:{left:0,bottom:1});const u=d[d.length-1]-d[0],h=d.map((m,g,v)=>{const A=g===0?0:m-v[g-1],C=g===0?0:(m+v[g-1])/2,w=a?(C-s.min.x-Zt+_t)/l:0,E=a?0:(C-s.min.y-Zt+_t)/c;return{left:w,bottom:E,distance:A}}).filter(({distance:m})=>m/u>.1);return i.$$set=m=>{"type"in m&&e(0,n=m.type),"data"in m&&e(5,o=m.data),"bounding"in m&&e(6,s=m.bounding),"getRuleDistanceText"in m&&e(1,r=m.getRuleDistanceText)},[n,r,a,f,h,o,s]}class Rc extends se{constructor(t){super(),oe(this,t,Oc,Qc,ie,{type:0,data:5,bounding:6,getRuleDistanceText:1},Tc)}}function Fc(i){le(i,"svelte-1mzj9p3",".floorplan-plugin__rule-labels-wrapper.svelte-1mzj9p3{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);pointer-events:none}")}function ss(i,t,e){const n=i.slice();return n[13]=t[e][0],n[14]=t[e][1],n}function rs(i,t){let e,n,o;const s=[{type:t[13],data:t[14],bounding:t[1],getRuleDistanceText:t[0]}];let r={};for(let a=0;a<s.length;a+=1)r=Ie(r,s[a]);return n=new Rc({props:r}),{key:i,first:null,c(){e=Ae(),ee(n.$$.fragment),this.first=e},m(a,l){B(a,e,l),K(n,a,l),o=!0},p(a,l){t=a;const c=l&19?Te(s,[{type:t[13],data:t[14],bounding:t[1],getRuleDistanceText:t[0]}]):{};n.$set(c)},i(a){o||(k(n.$$.fragment,a),o=!0)},o(a){M(n.$$.fragment,a),o=!1},d(a){a&&z(e),$(n,a)}}}function Hc(i){let t,e=[],n=new Map,o,s=i[4];const r=a=>a[13];for(let a=0;a<s.length;a+=1){let l=ss(i,s,a),c=r(l);n.set(c,e[a]=rs(c,l))}return{c(){t=Q("div");for(let a=0;a<e.length;a+=1)e[a].c();b(t,"class","floorplan-plugin__rule-labels-wrapper svelte-1mzj9p3"),F(t,"width",i[3],!1),F(t,"height",i[2],!1)},m(a,l){B(a,t,l);for(let c=0;c<e.length;c+=1)e[c].m(t,null);o=!0},p(a,[l]){l&19&&(s=a[4],fe(),e=Ve(e,l,r,1,a,s,n,t,lt,rs,null,ss),he()),l&8&&F(t,"width",a[3],!1),l&4&&F(t,"height",a[2],!1)},i(a){if(!o){for(let l=0;l<s.length;l+=1)k(e[l]);o=!0}},o(a){for(let l=0;l<e.length;l+=1)M(e[l]);o=!1},d(a){a&&z(t);for(let l=0;l<e.length;l+=1)e[l].d()}}}const as=1e3,ls=180;function Gc(i,t,e){let n,o,s,r,a,l,c,d,f,u,{floorIndex:h}=t,{floorplanData:m}=t,{getRuleDistanceText:g}=t;return i.$$set=v=>{"floorIndex"in v&&e(5,h=v.floorIndex),"floorplanData"in v&&e(6,m=v.floorplanData),"getRuleDistanceText"in v&&e(0,g=v.getRuleDistanceText)},i.$$.update=()=>{i.$$.dirty&64&&e(1,n=m.bounding),i.$$.dirty&96&&e(11,o=m.floorDatas[h].rules),i.$$.dirty&2048&&e(12,s=Object.keys(o)),i.$$.dirty&6144&&e(4,r=s.map(v=>[v,o[v]])),i.$$.dirty&2&&e(9,a=n.max.x-n.min.x),i.$$.dirty&2&&e(7,l=n.max.y-n.min.y),i.$$.dirty&2&&e(10,c=n.max.x-n.min.x-(as-ls)*2),i.$$.dirty&2&&e(8,d=n.max.y-n.min.y-(as-ls)*2),i.$$.dirty&1536&&e(3,f=c/a*100+"%"),i.$$.dirty&384&&e(2,u=d/l*100+"%")},[g,n,u,f,r,h,m,l,d,a,c,o,s]}class Nc extends se{constructor(t){super(),oe(this,t,Gc,Hc,ie,{floorIndex:5,floorplanData:6,getRuleDistanceText:0},Fc)}}function Nn(i,t={}){let e="";const{needZ:n,needA:o}=t;return(n?i.slice().concat(i[0]):i.slice()).forEach((r,a)=>{const{x:l,y:c}=t.format?t.format(r):r,d=l+","+c;return a===0?(e+="M"+d,e):o!=null&&o[a]?(e+="A"+o[a]+","+d,e):(e+="L"+d,e)}),e+(n?"Z":"")}function cs({x:i,y:t},e){const{max:n,min:o}=e;return{x:i-o.x,y:n.y-t}}function Wc(i,t){const e=i.x*1e3+t.bounding.origin.x,n=-i.z*1e3+t.bounding.origin.y;return{x:e,y:n}}function Xc(i,t){const e=t.bounding,n=e.max.x-e.min.x,o=e.max.y-e.min.y;return{x:(i.x-e.min.x)/n,y:(e.max.y-i.y)/o}}function Yc(i,t){return Math.max(...t.work.observers.map(n=>i.z>=n.standingPosition.z?n.floorIndex:0))}function Uc(i){let t;return{c(){t=be("path"),b(t,"d",i[0]),b(t,"fill","#2F313A")},m(e,n){B(e,t,n)},p(e,[n]){n&1&&b(t,"d",e[0])},i:ne,o:ne,d(e){e&&z(t)}}}function Vc(i,t,e){let n,{path:o}=t;return i.$$set=s=>{"path"in s&&e(1,o=s.path)},i.$$.update=()=>{i.$$.dirty&2&&e(0,n=Nn(o,{needZ:!0}))},[n,o]}class Jc extends se{constructor(t){super(),oe(this,t,Vc,Uc,ie,{path:1})}}function Zc(i){let t,e,n,o,s,r;return{c(){t=be("defs"),e=be("pattern"),n=be("rect"),o=be("path"),s=_(),r=be("path"),b(n,"x","0"),b(n,"y","0"),b(n,"width",i[1]),b(n,"height",i[1]),b(n,"fill","#323747"),b(o,"d",i[2]),b(o,"stroke","#ffffff"),b(o,"stroke-opacity","0.06"),b(o,"stroke-width","0.5"),b(o,"fill","none"),b(e,"id","fpm-room-pattern-0"),b(e,"x","0"),b(e,"y","0"),b(e,"width",i[1]),b(e,"height",i[1]),b(e,"patternUnits","userSpaceOnUse"),b(e,"patternTransform","scale(50 50)"),b(r,"d",i[0]),b(r,"fill","url(#fpm-room-pattern-0)")},m(a,l){B(a,t,l),R(t,e),R(e,n),R(e,o),B(a,s,l),B(a,r,l)},p(a,[l]){l&1&&b(r,"d",a[0])},i:ne,o:ne,d(a){a&&z(t),a&&z(s),a&&z(r)}}}const Li=6;function _c(i,t,e){let n,{path:o}=t;const s=Li*2,r=`M0 ${Li} h ${s} M${Li} 0 v ${s}`;return i.$$set=a=>{"path"in a&&e(3,o=a.path)},i.$$.update=()=>{i.$$.dirty&8&&e(0,n=Nn(o,{needZ:!0}))},[n,s,r,o]}class qc extends se{constructor(t){super(),oe(this,t,_c,Zc,ie,{path:3})}}function Kc(i){let t,e,n,o,s,r,a,l,c,d,f;return{c(){t=be("defs"),e=be("pattern"),n=be("rect"),o=be("pattern"),s=be("rect"),r=_(),a=be("path"),l=_(),c=be("path"),d=_(),f=be("path"),b(n,"x","0"),b(n,"y","0"),b(n,"width","6"),b(n,"height","50"),b(n,"fill","none"),b(n,"stroke","#4B4B57"),b(n,"stroke-width","0.5"),b(e,"id","room-material-pattern-1"),b(e,"x","0"),b(e,"y","0"),b(e,"width","12"),b(e,"height","50"),b(e,"patternUnits","userSpaceOnUse"),b(e,"patternTransform","scale(50 50)"),b(s,"x","0"),b(s,"y","0"),b(s,"width","6"),b(s,"height","50"),b(s,"fill","none"),b(s,"stroke","#4B4B57"),b(s,"stroke-width","0.5"),b(o,"id","room-material-pattern-2"),b(o,"x","6"),b(o,"y","25"),b(o,"width","12"),b(o,"height","50"),b(o,"patternUnits","userSpaceOnUse"),b(o,"patternTransform","scale(50 50)"),b(a,"d",i[0]),b(a,"fill","#43434D"),b(c,"d",i[0]),b(c,"fill","url(#room-material-pattern-1)"),b(f,"d",i[0]),b(f,"fill","url(#room-material-pattern-2)")},m(u,h){B(u,t,h),R(t,e),R(e,n),R(t,o),R(o,s),B(u,r,h),B(u,a,h),B(u,l,h),B(u,c,h),B(u,d,h),B(u,f,h)},p(u,[h]){h&1&&b(a,"d",u[0]),h&1&&b(c,"d",u[0]),h&1&&b(f,"d",u[0])},i:ne,o:ne,d(u){u&&z(t),u&&z(r),u&&z(a),u&&z(l),u&&z(c),u&&z(d),u&&z(f)}}}function $c(i,t,e){let n,{path:o}=t;return i.$$set=s=>{"path"in s&&e(1,o=s.path)},i.$$.update=()=>{i.$$.dirty&2&&e(0,n=Nn(o,{needZ:!0}))},[n,o]}class ed extends se{constructor(t){super(),oe(this,t,$c,Kc,ie,{path:1})}}function td(i){le(i,"svelte-1dykexu",".floorplan-plugin__room-material.svelte-1dykexu{position:absolute;left:0;top:0;width:100%;height:100%}svg.svelte-1dykexu{position:absolute;left:0;top:0;width:100%;height:100%;overflow:visible}")}function ds(i,t,e){const n=i.slice();return n[5]=t[e],n}function nd(i){let t,e;return t=new qc({props:{path:i[5].path}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.path=n[5].path),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function id(i){let t,e;return t=new ed({props:{path:i[5].path}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.path=n[5].path),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function od(i){let t,e;return t=new Jc({props:{path:i[5].path}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.path=n[5].path),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function us(i){let t,e,n,o;const s=[od,id,nd],r=[];function a(l,c){return l[5].floorType===1?0:l[5].floorType===0?1:2}return e=a(i),n=r[e]=s[e](i),{c(){t=be("svg"),n.c(),b(t,"width","100%"),b(t,"height","100%"),b(t,"viewBox",`0 0 ${i[1]} ${i[2]}`),b(t,"class","svelte-1dykexu")},m(l,c){B(l,t,c),r[e].m(t,null),o=!0},p(l,c){let d=e;e=a(l),e===d?r[e].p(l,c):(fe(),M(r[d],1,1,()=>{r[d]=null}),he(),n=r[e],n?n.p(l,c):(n=r[e]=s[e](l),n.c()),k(n,1),n.m(t,null))},i(l){o||(k(n),o=!0)},o(l){M(n),o=!1},d(l){l&&z(t),r[e].d()}}}function sd(i){let t,e,n=i[0],o=[];for(let r=0;r<n.length;r+=1)o[r]=us(ds(i,n,r));const s=r=>M(o[r],1,1,()=>{o[r]=null});return{c(){t=Q("div");for(let r=0;r<o.length;r+=1)o[r].c();b(t,"class","floorplan-plugin__room-material svelte-1dykexu")},m(r,a){B(r,t,a);for(let l=0;l<o.length;l+=1)o[l].m(t,null);e=!0},p(r,[a]){if(a&7){n=r[0];let l;for(l=0;l<n.length;l+=1){const c=ds(r,n,l);o[l]?(o[l].p(c,a),k(o[l],1)):(o[l]=us(c),o[l].c(),k(o[l],1),o[l].m(t,null))}for(fe(),l=n.length;l<o.length;l+=1)s(l);he()}},i(r){if(!e){for(let a=0;a<n.length;a+=1)k(o[a]);e=!0}},o(r){o=o.filter(Boolean);for(let a=0;a<o.length;a+=1)M(o[a]);e=!1},d(r){r&&z(t),Ke(o,r)}}}function rd(i,t,e){let n,{floorIndex:o}=t,{floorplanData:s}=t;const r=s.bounding.max.x-s.bounding.min.x,a=s.bounding.max.y-s.bounding.min.y;return i.$$set=l=>{"floorIndex"in l&&e(3,o=l.floorIndex),"floorplanData"in l&&e(4,s=l.floorplanData)},i.$$.update=()=>{i.$$.dirty&24&&e(0,n=s.floorDatas[o].rooms.map(l=>pe(N({},l),{path:l.path.map(c=>cs(c,s.bounding))})))},[n,r,a,o,s]}class ad extends se{constructor(t){super(),oe(this,t,rd,sd,ie,{floorIndex:3,floorplanData:4},td)}}function ld(i){le(i,"svelte-19uvvss","path.svelte-19uvvss{opacity:0}path.svelte-19uvvss:hover{opacity:0.1}")}function cd(i){let t,e,n;return{c(){t=be("path"),b(t,"d",i[2]),b(t,"fill","#fff"),b(t,"class","svelte-19uvvss")},m(o,s){B(o,t,s),e||(n=[xe(t,"mouseenter",i[0]),xe(t,"mouseleave",i[1])],e=!0)},p:ne,i:ne,o:ne,d(o){o&&z(t),e=!1,at(n)}}}function dd(i,t,e){let{room:n}=t,{floorplanData:o}=t,{hoveredRoom:s}=t;function r(){s.set(n)}function a(){s.set(void 0)}const{bounding:l}=o,c=Nn(n.path,{needZ:!0,format:d=>cs(d,l)});return i.$$set=d=>{"room"in d&&e(3,n=d.room),"floorplanData"in d&&e(4,o=d.floorplanData),"hoveredRoom"in d&&e(5,s=d.hoveredRoom)},[r,a,c,n,o,s]}class ud extends se{constructor(t){super(),oe(this,t,dd,cd,ie,{room:3,floorplanData:4,hoveredRoom:5},ld)}}function fd(i){le(i,"svelte-1kqo6e4",".floorplan-plugin__room-highlight.svelte-1kqo6e4{position:absolute;width:100%;height:100%}svg.svelte-1kqo6e4{width:100%;height:100%;overflow:visible}")}function fs(i,t,e){const n=i.slice();return n[5]=t[e],n}function hs(i,t){let e,n,o;const s=[{room:t[5],floorplanData:t[1],hoveredRoom:t[2]}];let r={};for(let a=0;a<s.length;a+=1)r=Ie(r,s[a]);return n=new ud({props:r}),{key:i,first:null,c(){e=Ae(),ee(n.$$.fragment),this.first=e},m(a,l){B(a,e,l),K(n,a,l),o=!0},p(a,l){t=a;const c=l&7?Te(s,[{room:t[5],floorplanData:t[1],hoveredRoom:t[2]}]):{};n.$set(c)},i(a){o||(k(n.$$.fragment,a),o=!0)},o(a){M(n.$$.fragment,a),o=!1},d(a){a&&z(e),$(n,a)}}}function hd(i){let t,e,n=[],o=new Map,s,r=i[1].floorDatas[i[0]].rooms;const a=l=>l[5].id;for(let l=0;l<r.length;l+=1){let c=fs(i,r,l),d=a(c);o.set(d,n[l]=hs(d,c))}return{c(){t=Q("div"),e=be("svg");for(let l=0;l<n.length;l+=1)n[l].c();b(e,"width","100%"),b(e,"height","100%"),b(e,"viewBox",`0 0 ${i[3]} ${i[4]}`),b(e,"class","svelte-1kqo6e4"),b(t,"class","floorplan-plugin__room-highlight svelte-1kqo6e4")},m(l,c){B(l,t,c),R(t,e);for(let d=0;d<n.length;d+=1)n[d].m(e,null);s=!0},p(l,[c]){c&7&&(r=l[1].floorDatas[l[0]].rooms,fe(),n=Ve(n,c,a,1,l,r,o,e,lt,hs,null,fs),he())},i(l){if(!s){for(let c=0;c<r.length;c+=1)k(n[c]);s=!0}},o(l){for(let c=0;c<n.length;c+=1)M(n[c]);s=!1},d(l){l&&z(t);for(let c=0;c<n.length;c+=1)n[c].d()}}}function md(i,t,e){let{floorIndex:n}=t,{floorplanData:o}=t,{hoveredRoom:s}=t;const r=o.bounding.max.x-o.bounding.min.x,a=o.bounding.max.y-o.bounding.min.y;return i.$$set=l=>{"floorIndex"in l&&e(0,n=l.floorIndex),"floorplanData"in l&&e(1,o=l.floorplanData),"hoveredRoom"in l&&e(2,s=l.hoveredRoom)},[n,o,s,r,a]}class ms extends se{constructor(t){super(),oe(this,t,md,hd,ie,{floorIndex:0,floorplanData:1,hoveredRoom:2},fd)}}function pd(i){le(i,"svelte-bl8zrz",".floorplan-plugin__floor.svelte-bl8zrz{position:absolute;left:0;top:0;width:100%;height:100%;opacity:0;pointer-events:none}.floorplan-plugin__floor--is-current.svelte-bl8zrz{opacity:1;pointer-events:auto}")}function ps(i){let t,e;const n=[{floorIndex:i[1],floorplanData:i[5],hoveredRoom:i[10]}];let o={};for(let s=0;s<n.length;s+=1)o=Ie(o,n[s]);return t=new ms({props:o}),{c(){ee(t.$$.fragment)},m(s,r){K(t,s,r),e=!0},p(s,r){const a=r&1058?Te(n,[{floorIndex:s[1],floorplanData:s[5],hoveredRoom:s[10]}]):{};t.$set(a)},i(s){e||(k(t.$$.fragment,s),e=!0)},o(s){M(t.$$.fragment,s),e=!1},d(s){$(t,s)}}}function gs(i){let t,e;const n=[{floorplanData:i[5],floorIndex:i[1],getRoomAreaText:i[6],getLabelElement:i[7],hoveredRoom:i[10],adaptiveRoomLabelVisibleEnable:i[9]}];let o={};for(let s=0;s<n.length;s+=1)o=Ie(o,n[s]);return t=new Bc({props:o}),{c(){ee(t.$$.fragment)},m(s,r){K(t,s,r),e=!0},p(s,r){const a=r&1762?Te(n,[{floorplanData:s[5],floorIndex:s[1],getRoomAreaText:s[6],getLabelElement:s[7],hoveredRoom:s[10],adaptiveRoomLabelVisibleEnable:s[9]}]):{};t.$set(a)},i(s){e||(k(t.$$.fragment,s),e=!0)},o(s){M(t.$$.fragment,s),e=!1},d(s){$(t,s)}}}function As(i){let t,e;const n=[{floorplanData:i[5],floorIndex:i[1],getRuleDistanceText:i[8]}];let o={};for(let s=0;s<n.length;s+=1)o=Ie(o,n[s]);return t=new Nc({props:o}),{c(){ee(t.$$.fragment)},m(s,r){K(t,s,r),e=!0},p(s,r){const a=r&290?Te(n,[{floorplanData:s[5],floorIndex:s[1],getRuleDistanceText:s[8]}]):{};t.$set(a)},i(s){e||(k(t.$$.fragment,s),e=!0)},o(s){M(t.$$.fragment,s),e=!1},d(s){$(t,s)}}}function gd(i){let t,e,n,o,s,r,a,l,c;const d=[{floorIndex:i[1],floorplanData:i[5]}];let f={};for(let A=0;A<d.length;A+=1)f=Ie(f,d[A]);e=new ad({props:f});let u=i[2]&&ps(i);const h=[{floorplanData:i[5],floorIndex:i[1]}];let m={};for(let A=0;A<h.length;A+=1)m=Ie(m,h[A]);s=new qo({props:m});let g=i[3]&&gs(i),v=i[4]&&As(i);return{c(){t=Q("div"),ee(e.$$.fragment),n=_(),u&&u.c(),o=_(),ee(s.$$.fragment),r=_(),g&&g.c(),a=_(),v&&v.c(),b(t,"class",l=Oe(`floorplan-plugin__floor${i[0]?" floorplan-plugin__floor--is-current":""}`)+" svelte-bl8zrz")},m(A,C){B(A,t,C),K(e,t,null),R(t,n),u&&u.m(t,null),R(t,o),K(s,t,null),R(t,r),g&&g.m(t,null),R(t,a),v&&v.m(t,null),c=!0},p(A,[C]){const w=C&34?Te(d,[{floorIndex:A[1],floorplanData:A[5]}]):{};e.$set(w),A[2]?u?(u.p(A,C),C&4&&k(u,1)):(u=ps(A),u.c(),k(u,1),u.m(t,o)):u&&(fe(),M(u,1,1,()=>{u=null}),he());const E=C&34?Te(h,[{floorplanData:A[5],floorIndex:A[1]}]):{};s.$set(E),A[3]?g?(g.p(A,C),C&8&&k(g,1)):(g=gs(A),g.c(),k(g,1),g.m(t,a)):g&&(fe(),M(g,1,1,()=>{g=null}),he()),A[4]?v?(v.p(A,C),C&16&&k(v,1)):(v=As(A),v.c(),k(v,1),v.m(t,null)):v&&(fe(),M(v,1,1,()=>{v=null}),he()),(!c||C&1&&l!==(l=Oe(`floorplan-plugin__floor${A[0]?" floorplan-plugin__floor--is-current":""}`)+" svelte-bl8zrz"))&&b(t,"class",l)},i(A){c||(k(e.$$.fragment,A),k(u),k(s.$$.fragment,A),k(g),k(v),c=!0)},o(A){M(e.$$.fragment,A),M(u),M(s.$$.fragment,A),M(g),M(v),c=!1},d(A){A&&z(t),$(e),u&&u.d(),$(s),g&&g.d(),v&&v.d()}}}function Ad(i,t,e){let{isCurrent:n}=t,{floorIndex:o}=t,{hoverEnable:s}=t,{roomLabelsEnable:r}=t,{ruleLabelsEnable:a}=t,{floorplanData:l}=t,{getRoomAreaText:c}=t,{getLabelElement:d}=t,{getRuleDistanceText:f}=t,{adaptiveRoomLabelVisibleEnable:u}=t;const h=Di(void 0);return i.$$set=m=>{"isCurrent"in m&&e(0,n=m.isCurrent),"floorIndex"in m&&e(1,o=m.floorIndex),"hoverEnable"in m&&e(2,s=m.hoverEnable),"roomLabelsEnable"in m&&e(3,r=m.roomLabelsEnable),"ruleLabelsEnable"in m&&e(4,a=m.ruleLabelsEnable),"floorplanData"in m&&e(5,l=m.floorplanData),"getRoomAreaText"in m&&e(6,c=m.getRoomAreaText),"getLabelElement"in m&&e(7,d=m.getLabelElement),"getRuleDistanceText"in m&&e(8,f=m.getRuleDistanceText),"adaptiveRoomLabelVisibleEnable"in m&&e(9,u=m.adaptiveRoomLabelVisibleEnable)},[n,o,s,r,a,l,c,d,f,u,h]}class vd extends se{constructor(t){super(),oe(this,t,Ad,gd,ie,{isCurrent:0,floorIndex:1,hoverEnable:2,roomLabelsEnable:3,ruleLabelsEnable:4,floorplanData:5,getRoomAreaText:6,getLabelElement:7,getRuleDistanceText:8,adaptiveRoomLabelVisibleEnable:9},pd)}}function bd(i){le(i,"svelte-86bqav",".floorplan-main.svelte-86bqav{width:100%;height:100%;pointer-events:none}")}function vs(i,t,e){const n=i.slice();return n[16]=t[e],n}function bs(i){let t,e,n,o,s,r,a=i[9].floorDatas,l=[];for(let h=0;h<a.length;h+=1)l[h]=ys(vs(i,a,h));const c=h=>M(l[h],1,1,()=>{l[h]=null}),d=[{panoIndex:i[3],floorplanData:i[9],lastPanoramaLongitude:i[10],cameraImageUrl:i[11]}];let f={};for(let h=0;h<d.length;h+=1)f=Ie(f,d[h]);n=new ic({props:f});let u=i[6]&&ws(i);return{c(){t=Q("div");for(let h=0;h<l.length;h+=1)l[h].c();e=_(),ee(n.$$.fragment),o=_(),u&&u.c(),b(t,"class","floorplan-main svelte-86bqav")},m(h,m){B(h,t,m);for(let g=0;g<l.length;g+=1)l[g].m(t,null);R(t,e),K(n,t,null),R(t,o),u&&u.m(t,null),r=!0},p(h,m){if(i=h,m&62384){a=i[9].floorDatas;let v;for(v=0;v<a.length;v+=1){const A=vs(i,a,v);l[v]?(l[v].p(A,m),k(l[v],1)):(l[v]=ys(A),l[v].c(),k(l[v],1),l[v].m(t,e))}for(fe(),v=a.length;v<l.length;v+=1)c(v);he()}const g=m&3592?Te(d,[{panoIndex:i[3],floorplanData:i[9],lastPanoramaLongitude:i[10],cameraImageUrl:i[11]}]):{};n.$set(g),i[6]?u?(u.p(i,m),m&64&&k(u,1)):(u=ws(i),u.c(),k(u,1),u.m(t,null)):u&&(fe(),M(u,1,1,()=>{u=null}),he())},i(h){if(!r){for(let m=0;m<a.length;m+=1)k(l[m]);k(n.$$.fragment,h),k(u),s||De(()=>{s=zt(t,Mt,{duration:i[0],easing:Xt}),s.start()}),r=!0}},o(h){l=l.filter(Boolean);for(let m=0;m<l.length;m+=1)M(l[m]);M(n.$$.fragment,h),M(u),r=!1},d(h){h&&z(t),Ke(l,h),$(n),u&&u.d()}}}function ys(i){let t,e;const n=[{hoverEnable:i[5],floorplanData:i[9],getRoomAreaText:i[12],getLabelElement:i[13],getRuleDistanceText:i[14],roomLabelsEnable:i[7],ruleLabelsEnable:i[8],adaptiveRoomLabelVisibleEnable:i[15]},{floorIndex:i[16].floorIndex},{isCurrent:i[16].floorIndex===i[4]}];let o={};for(let s=0;s<n.length;s+=1)o=Ie(o,n[s]);return t=new vd({props:o}),{c(){ee(t.$$.fragment)},m(s,r){K(t,s,r),e=!0},p(s,r){const a=r&62384?Te(n,[r&62368&&{hoverEnable:s[5],floorplanData:s[9],getRoomAreaText:s[12],getLabelElement:s[13],getRuleDistanceText:s[14],roomLabelsEnable:s[7],ruleLabelsEnable:s[8],adaptiveRoomLabelVisibleEnable:s[15]},r&512&&{floorIndex:s[16].floorIndex},r&528&&{isCurrent:s[16].floorIndex===s[4]}]):{};t.$set(a)},i(s){e||(k(t.$$.fragment,s),e=!0)},o(s){M(t.$$.fragment,s),e=!1},d(s){$(t,s)}}}function ws(i){let t,e;return t=new dc({props:{floorplanData:i[9],northDesc:i[2]}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&512&&(s.floorplanData=n[9]),o&4&&(s.northDesc=n[2]),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function yd(i){let t,e,n=i[1]&&bs(i);return{c(){n&&n.c(),t=Ae()},m(o,s){n&&n.m(o,s),B(o,t,s),e=!0},p(o,[s]){o[1]?n?(n.p(o,s),s&2&&k(n,1)):(n=bs(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(fe(),M(n,1,1,()=>{n=null}),he())},i(o){e||(k(n),e=!0)},o(o){M(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function wd(i,t,e){let{duration:n=0}=t,{visible:o}=t,{northDesc:s}=t,{panoIndex:r}=t,{floorIndex:a}=t,{hoverEnable:l}=t,{compassEnable:c}=t,{roomLabelsEnable:d}=t,{ruleLabelsEnable:f}=t,{floorplanData:u}=t,{lastPanoramaLongitude:h}=t,{cameraImageUrl:m}=t,{getRoomAreaText:g}=t,{getLabelElement:v}=t,{getRuleDistanceText:A}=t,{adaptiveRoomLabelVisibleEnable:C}=t;return i.$$set=w=>{"duration"in w&&e(0,n=w.duration),"visible"in w&&e(1,o=w.visible),"northDesc"in w&&e(2,s=w.northDesc),"panoIndex"in w&&e(3,r=w.panoIndex),"floorIndex"in w&&e(4,a=w.floorIndex),"hoverEnable"in w&&e(5,l=w.hoverEnable),"compassEnable"in w&&e(6,c=w.compassEnable),"roomLabelsEnable"in w&&e(7,d=w.roomLabelsEnable),"ruleLabelsEnable"in w&&e(8,f=w.ruleLabelsEnable),"floorplanData"in w&&e(9,u=w.floorplanData),"lastPanoramaLongitude"in w&&e(10,h=w.lastPanoramaLongitude),"cameraImageUrl"in w&&e(11,m=w.cameraImageUrl),"getRoomAreaText"in w&&e(12,g=w.getRoomAreaText),"getLabelElement"in w&&e(13,v=w.getLabelElement),"getRuleDistanceText"in w&&e(14,A=w.getRuleDistanceText),"adaptiveRoomLabelVisibleEnable"in w&&e(15,C=w.adaptiveRoomLabelVisibleEnable)},[n,o,s,r,a,l,c,d,f,u,h,m,g,v,A,C]}class Si extends se{constructor(t){super(),oe(this,t,wd,yd,ie,{duration:0,visible:1,northDesc:2,panoIndex:3,floorIndex:4,hoverEnable:5,compassEnable:6,roomLabelsEnable:7,ruleLabelsEnable:8,floorplanData:9,lastPanoramaLongitude:10,cameraImageUrl:11,getRoomAreaText:12,getLabelElement:13,getRuleDistanceText:14,adaptiveRoomLabelVisibleEnable:15},bd)}}const Cd="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC0AAAAwCAYAAACFUvPfAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAALaADAAQAAA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wX3x6volVSx+LPAxF+VLXhZ8VQ+iP2Rta/iWe5v42Fngj0BbdnRTXh12ZIcKhTaGbcYjybRwXBU1lu9KlndXp04NM52poKWO0RZsviNaP9a6grkO972+st05pXhE5c1hTEluJy7XUejGUQNLMbAmTdWY1rKBLW3aTJqBZ7nZkb36DhYCreeYHbMUXHvaYi5XDK70EcgulmRjm77wNtenzuXCbmnTRaAx493rbGf3Jr/njMzj920CnKdUaFCjlDioy7NYNvOdGrQJNgI32/L2tkXfFPlxgToqjWVhD6KdLnQRdARf/HHQz2r2X2Gqy8pAZaAyUBmoDFQGKgP/q4F/AJYg9/s0ZoABAAAAAElFTkSuQmCC";function Pd(i){return Z(this,null,function*(){const t=new Headers({"Content-Type":"text/plain"}),e=function(o){return Z(this,null,function*(){const s={index:o.index,url:o.url,svgUrl:o.svg_url};if(o.svg_url){const r=yield fetch(o.svg_url,{headers:t}).then(a=>a.text());s.svgContent=r}return s})};return yield Promise.all(i.map(e))})}function Id(i){return{id:i.id,size:i.size,name:i.name,path:i.path,roomType:i.room_type,floorType:i.floor_type,roomLabel:{position:i.room_label.position,positionInImage:i.room_label.position_in_image},observerIndexs:i.observer_indexs}}function Ed(i){return{floorName:i.floor_name,floorIndex:i.floor_index,rooms:i.rooms.map(Id),rules:i.rules}}function xd(i){return{index:i.index,floorIndex:i.floor_index,position:i.position,positionInImage:i.position_in_image}}function kd(i){return{rad:i.rad,position:i.position,positionInImage:i.position_in_image,northRad:i.north_rad,roomId:i.room_id,floorIndex:i.floor_index}}function At(i){return Z(this,null,function*(){const t=yield Pd(i.outlines),e=i.computed_data.bounding,n=i.computed_data.floor_datas.map(Ed),o=i.computed_data.entrance?kd(i.computed_data.entrance):null;return{outlines:t,entrance:o,bounding:e,floorDatas:n,observers:i.computed_data.observers.map(xd)}})}function Dd(i,t,e){return i.map(o=>{const s=o.position,r=o.icon?o.icon:{url:Cd,width:45,height:48},a=Yc(s,t),l=Wc(s,e),c=Xc(l,e);return{floorIndex:a,icon:r,id:o.id,position:l,positionInImage:c}})}function Ld(i,t){return t(i),i}function Wn(i,t){return Ld({},e=>{for(const n in i)t.indexOf(n)===-1&&(e[n]=i[n])})}function Cs(i,t){const e=Math.max(...i.work.observers.map(n=>n.floorIndex));return t>e?i.model.bounding.max.y:Math.max(...i.work.observers.filter(n=>n.floorIndex===t).map(n=>n.standingPosition.y))}function zi(i,t,e=pt.BOUNDING_CENTER){const n=Cs(i,t),o=Cs(i,t+1);return e===pt.BOUNDING_CENTER?(i.model.bounding.max.y+i.model.bounding.min.y)/2:e===pt.CEILING?o:n}function Mi(i,t,e,n){const o=zi(i,e,n==null?void 0:n.attachedTo),s=new I.Vector3(0,o,0),r=new I.Vector3(1,o,0),a=s.clone().project(i.camera),l=r.clone().project(i.camera);return Math.abs((l.x-a.x)/1e3)*(t.getBoundingClientRect().width/2)}class Xn{constructor(t,e){p(this,"five");p(this,"hooks",new ln);p(this,"staticPrefix","//vrlab-static.ljcdn.com");this.five=t,e!=null&&e.staticPrefix&&(this.staticPrefix=e.staticPrefix)}getCurrentState(){return this.state}}class jt extends Xn{}var Ne=(i=>(i.UnknownError="UnknownError",i.DataNotLoaded="DataNotLoaded",i.BreakOffByHide="BreakOffByHide",i.BreakOffByDisable="BreakOffByDisable",i.ModelNotLoaded="ModelNotLoaded",i.ChangeModeError="ChangeModeError",i.UpdateCameraError="UpdateCameraError",i))(Ne||{});const Ps=500,Sd=80;function ji(i,t,e=4){return Math.floor(i*Math.pow(10,e))===Math.floor(t*Math.pow(10,e))}function Is(i,t){return Z(this,null,function*(){yield new Promise((e,n)=>{i.changeMode(...t).catch(o=>n(o)),i.once("initAnimationEnded",()=>{const o=i.getCurrentState(),s=t[0];o.mode!==s&&n(new Error("mode \u4E0E\u9884\u671F\u4E0D\u7B26")),(()=>{const l=t[1];return l?Object.keys(l).every(c=>{const d=o[c];if(d===void 0)return!0;const f=l[c];return typeof d=="number"&&typeof f=="number"?ji(d,f,2):d===f}):!0})()||n(new Error("five pose \u4E0E\u9884\u671F\u4E0D\u7B26")),e()})})})}function Bi(i,t){if(i.currentMode!==t.mode)return!1;const{latitude:e,longitude:n,fov:o}=t,{latitude:s,longitude:r}=i.getCurrentState(),a=i.camera.fov;return!(!ji(e,s,2)||!ji(n,r,2)||o!==a)}function Es(i,t,e=!0){return Z(this,null,function*(){if(Bi(i,t)===!0)return;const o=i.getCurrentState();if(o.mode!==t.mode){const[d]=yield Rn(Is(i,[t.mode,t,void 0,e]));if(d)throw new Error(Ne.ChangeModeError);return}const{latitude:s,longitude:r,fov:a}=o,l=Math.min(1e3,Math.max(200,Math.abs(s-Math.PI/2)*1e3,(r>Math.PI?2*Math.PI-r:r)*500,Math.abs(a-t.fov)*10)),[c]=yield Rn(i.updateCamera(t,l,e));if(c)throw new Error(Ne.UpdateCameraError)})}function qt(i,t,e=300){const n=i.getElement();!n||(n.style.opacity=t+"",n.style.transition=e===0?"none":`opacity ${e}ms linear`,e!==0&&Promise.race([new Promise(o=>n.addEventListener("transitionend",o,{once:!0})),new Promise(o=>setTimeout(o,e))]).then(()=>{n.style.transition="none"}))}function zd(i){const{latitude:t,longitude:e}=i,n=Math.abs(t-Math.PI/2)>5*Math.PI/180,o=e>5*(Math.PI/180)&&e<355*(Math.PI/180);return n||o}function Md(i){const{latitude:t,longitude:e}=i,n=Math.abs(t-Math.PI/2)<10*Math.PI/180,o=e<30*(Math.PI/180)||e>330*(Math.PI/180);return n&&o}class jd extends jt{constructor(e,n){var a;super(e);p(this,"name","modelFloorplanPlugin");p(this,"state");p(this,"data");p(this,"showState");p(this,"showPromise");p(this,"app");p(this,"panoIndex",0);p(this,"floorIndex",0);p(this,"selector");p(this,"showRejection");p(this,"wrapper");p(this,"container",document.createElement("div"));p(this,"lastPanoramaLongitude",0);p(this,"size",{width:0,height:0});p(this,"hasAddedEventListener",!1);p(this,"isHiddenByHideFunc",!1);p(this,"dispose",()=>{var e,n;this.removeEventListener(),(e=this.app)==null||e.$destroy(),this.app=void 0,(n=this.container)==null||n.remove(),this.data=void 0,this.wrapper=void 0,this.selector=void 0,this.hooks.emit("dispose")});p(this,"show",(...n)=>Z(this,[...n],function*(e={}){if(!this.state.enabled||!this.showPromise&&this.state.visible)return;const o=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!0},o),this._show(e)}));p(this,"hide",(...n)=>Z(this,[...n],function*(e={}){!this.state.enabled||(this.isHiddenByHideFunc=!0,this.state.visible!==!1&&(this.updateState({visible:!1},e.userAction||!0),this._hide(e)))}));p(this,"updateSize",()=>{if(!this.data||!Bi(this.five,this.showState)||!this.container||!this.wrapper)return;const{min:e,max:n}=this.data.bounding,o=n.x-e.x,s=n.y-e.y,r=this.state.config.attachedTo?{attachedTo:this.state.config.attachedTo}:void 0,a=Mi(this.five,this.wrapper,this.floorIndex,r),l=Math.ceil(o*a),c=Math.ceil(s*a);this.size.width===l&&this.size.height===c||(this.container.style.width=l+"px",this.container.style.height=c+"px",this.size={width:l,height:c})});p(this,"_disable",e=>{var o,s,r;const{userAction:n}=e;this.hooks.emit("disable",{userAction:n}),(o=this.showRejection)==null||o.call(this,Ne.BreakOffByDisable),this.showPromise=void 0,(s=this.app)==null||s.$destroy(),this.app=void 0,(r=this.container)==null||r.remove(),this.removeEventListener()});p(this,"_enable",e=>{const{userAction:n}=e;this.addEventListener(),this.wrapper&&(this.wrapper.append(this.container),this.hooks.emit("enable",{userAction:n}),this.state.visible&&this._show({userAction:n}))});p(this,"_show",e=>Z(this,null,function*(){var r;if(!this.state.enabled)return;if(!((r=this.five.model)!=null&&r.loaded))throw new Error(Ne.ModelNotLoaded);if(!this.data)throw new Error(Ne.DataNotLoaded);this.isHiddenByHideFunc=!1;const n={floorIndex:this.floorIndex,modelOpacity:this.state.config.modelOpacity,immediately:!1,isAutoShow:!1,userAction:!0},o=N(N({},n),e),s=()=>Z(this,null,function*(){this.hooks.emit("show",{userAction:o.userAction,auto:o.isAutoShow});let a=!1,l;this.showRejection=u=>{a=!0,l=u};const[c]=yield Rn(Es(this.five,this.showState,o.userAction));if(c)throw c;if(a)throw l?new Error(l):new Error(Ne.UnknownError);this.updateSize(),this.floorIndex=o.floorIndex,this.five.model.show(this.floorIndex);const d=o.modelOpacity,f=o.immediately?0:Ps;qt(this.five,d,f),this.render(f)});return this.showPromise=s().then(()=>{this.hooks.emit("showAnimationEnded",{auto:o.isAutoShow,userAction:o.userAction})}).catch(a=>{if(this.updateState({visible:!1},o.userAction),!o.isAutoShow&&a instanceof Error)throw a}).finally(()=>{this.showPromise=void 0,this.showRejection=void 0}),this.showPromise}));p(this,"_hide",e=>{var s;(s=this.showRejection)==null||s.call(this,Ne.BreakOffByHide),this.showPromise=void 0;const o=N(N({},{userAction:!0,isAutoHide:!1}),e);qt(this.five,1,0),this.hooks.emit("hide",{auto:o.isAutoHide,userAction:o.userAction}),this.render()});p(this,"handleClick",()=>{if(!this.state.visible)return;if(this.hooks.emit("click"))return!1});p(this,"onFiveModelLoaded",()=>{if(this.state.enabled===!1||this.wrapper||!this.selector)return;const e=this.selector instanceof Element?this.selector:document.querySelector(this.selector);if(!e)throw new Error("\u4E0D\u6B63\u786E\u7684\u7236\u5BB9\u5668\u9009\u62E9\u5668");this.wrapper=e,e.append(this.container)});p(this,"onFiveModeChange",e=>{e!==this.showState.mode&&(this.updateState({visible:!1},!1),this._hide({userAction:!1}))});p(this,"onFiveInteriaPan",(e,n)=>{if(!n||this.state.config.autoShowEnable===!1||this.isHiddenByHideFunc)return;const o=this.five.getCurrentState();o.mode==="Floorplan"&&(this.state.visible||Md(o)&&(this.updateState({visible:!0},!0),this._show({isAutoShow:!0})))});p(this,"onFivePanoArrived",e=>{var n;!((n=this.five)!=null&&n.work)||(this.panoIndex=e,this.floorIndex=this.five.work.observers[e].floorIndex)});p(this,"onFiveCameraUpdate",(e,n)=>{if(!this.state.visible||this.showPromise)return;const o=this.five.getCurrentState();zd(o)&&(this.updateState({visible:!1},n),this._hide({userAction:n,isAutoHide:!0}))});p(this,"onFiveWantsGesture",(e,n)=>{if(!!this.state.visible&&(n.length>1||e==="mouseWheel"))return!1});p(this,"onFiveWantsPanGesture",(e,n)=>{if(this.five.getCurrentState().mode==="Floorplan"&&this.state.config.autoShowEnable!==!1&&n&&this.state.visible)return this.five.updateCamera(this.showState,0),!1});p(this,"onFiveWantsTapGesture",()=>this.handleClick());p(this,"onFiveWantsChangeMode",(e,n)=>{n==="Panorama"&&e==="Floorplan"&&(this.lastPanoramaLongitude=this.five.getCurrentState().longitude)});p(this,"onModelShownFloorChange",e=>{if(this.floorIndex!==e){if(e===null){const n=this.five.getCurrentState().panoIndex;this.floorIndex=this.five.work.observers[n].floorIndex;return}this.floorIndex=e,this.updateSize(),this.render()}});n!=null&&n.selector&&(this.selector=n.selector,console.warn("\u4E0D\u63A8\u8350\u7EE7\u7EED\u4F7F\u7528 params.selector \u914D\u7F6E\u7236\u5BB9\u5668\uFF0C\u8BF7\u4F7F\u7528 appendTo \u65B9\u6CD5")),this.showState={mode:"Floorplan",longitude:0,latitude:Math.PI/2,fov:Sd/((a=n==null?void 0:n.scale)!=null?a:1)};const o={northDesc:"\u5317",modelOpacity:1,hoverEnable:!0,compassEnable:!0,autoShowEnable:!0,ruleLabelsEnable:!0,roomLabelsEnable:!0,adaptiveRoomLabelVisibleEnable:!0,cameraImageUrl:gt,attachedTo:pt.BOUNDING_CENTER,getLabelElement:void 0,getRoomAreaText:l=>(l/1e6).toFixed(1)+"\u33A1",getRuleDistanceText:l=>l.toString()},s=n?Wn(n,["selector","scale"]):{},r=N(N({},o),s);this.state={enabled:!0,visible:!1,config:r},this.initContainer(),e.model.loaded?this.onFiveModelLoaded():e.once("modelLoaded",this.onFiveModelLoaded),e.once("dispose",this.dispose),this.addEventListener()}load(e,n,o=!0){return Z(this,null,function*(){function s(d){return Object.prototype.hasOwnProperty.apply(d,["version"])}const r=e;r&&!r.version&&console.warn("\u4F20\u5165 serverData.data \u7684\u65B9\u5F0F\u540E\u7EED\u53EF\u80FD\u4E0D\u518D\u652F\u6301\uFF0C\u8BF7\u628A serverData \u6574\u4F53\u4F20\u5165 load \u51FD\u6570");const a=JSON.parse(JSON.stringify(e)),l=s(a)?a.data:a,c=this.data;this.data=yield At(l),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,c),n&&this.updateState(n,o),this.render()})}appendTo(e){if(this.wrapper=e,!!this.state.enabled)return e.appendChild(this.container),this.render(),this}enable(e={}){if(this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!0},e.userAction||n),this._enable({userAction:n})}disable(e={}){if(!this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!1},e.userAction||n),this._disable({userAction:n})}setState(e,n={}){const o=this.state,s=n.userAction!==void 0?n.userAction:!0;if(this.updateState(e,s),e.enabled!==void 0&&o.enabled!==e.enabled&&(e.enabled?this._enable({userAction:s}):this._disable({userAction:s})),e.visible!==void 0&&o.visible!==e.visible){const r={userAction:s};e.visible?this._show(r):this._hide(r)}this.render()}changeConfigs(e,n=!0){this.updateState({config:e},n),this.render()}formatData(e){return Z(this,null,function*(){return yield At(e.data)})}updateState(e,n){const o=this.state,s=e.config?N(N({},o.config),e.config):o.config;this.state=pe(N(N({},this.state),e),{config:s}),!$e(this.state,o,{deep:!0})&&this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:n})}initContainer(){this.container.classList.add("floorplan-plugin"),Object.assign(this.container.style,{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",zIndex:10,pointerEvents:"none"}),this.five.addExtraElement(this.container)}addEventListener(){if(!this.state.enabled||this.hasAddedEventListener)return;const e=this.five;e.on("modeChange",this.onFiveModeChange),e.on("interiaPan",this.onFiveInteriaPan),e.on("panoArrived",this.onFivePanoArrived),e.on("cameraUpdate",this.onFiveCameraUpdate),e.on("wantsGesture",this.onFiveWantsGesture),e.on("wantsPanGesture",this.onFiveWantsPanGesture),e.on("wantsTapGesture",this.onFiveWantsTapGesture),e.on("wantsChangeMode",this.onFiveWantsChangeMode),e.on("modelShownFloorChange",this.onModelShownFloorChange)}removeEventListener(){const e=this.five;this.hasAddedEventListener=!1,e.off("modelLoaded",this.onFiveModelLoaded),e.off("modeChange",this.onFiveModeChange),e.off("interiaPan",this.onFiveInteriaPan),e.off("panoArrived",this.onFivePanoArrived),e.off("cameraUpdate",this.onFiveCameraUpdate),e.off("wantsGesture",this.onFiveWantsGesture),e.off("wantsPanGesture",this.onFiveWantsPanGesture),e.off("wantsTapGesture",this.onFiveWantsTapGesture),e.off("wantsChangeMode",this.onFiveWantsChangeMode),e.off("modelShownFloorChange",this.onModelShownFloorChange)}render(e){if(!this.state.enabled||!this.container||!this.data||this.size.width===0)return;const n=pe(N({},this.state.config),{visible:this.state.visible,duration:e!=null?e:0,panoIndex:this.panoIndex,floorIndex:this.floorIndex,floorplanData:this.data,lastPanoramaLongitude:this.lastPanoramaLongitude});if(this.app)return this.app.$set(n);this.app=new Si({target:this.container,intro:!0,props:n})}}const Bd=(i,t)=>new jd(i,t);function Td(i){const{latitude:t,longitude:e}=i,n=Math.abs(t-Math.PI/2)>5*Math.PI/180,o=e>5*(Math.PI/180)&&e<355*(Math.PI/180);return n||o}function Qd(i){const{latitude:t,longitude:e}=i,n=Math.abs(t-Math.PI/2)<10*Math.PI/180,o=e<30*(Math.PI/180)||e>330*(Math.PI/180);return n&&o}class Od extends jt{constructor(e,n){super(e);p(this,"name","modelFloorplanPlugin");p(this,"state");p(this,"data");p(this,"showState");p(this,"showPromise");p(this,"app");p(this,"panoIndex",0);p(this,"floorIndex",0);p(this,"selector");p(this,"showRejection");p(this,"wrapper");p(this,"container",document.createElement("div"));p(this,"lastPanoramaLongitude",0);p(this,"size",{width:0,height:0});p(this,"hasAddedEventListener",!1);p(this,"isHiddenByHideFunc",!1);p(this,"dispose",()=>{var e,n;this.removeEventListener(),(e=this.app)==null||e.$destroy(),this.app=void 0,(n=this.container)==null||n.remove(),this.data=void 0,this.wrapper=void 0,this.selector=void 0,this.hooks.emit("dispose")});p(this,"show",(...n)=>Z(this,[...n],function*(e={}){if(!this.state.enabled||!this.showPromise&&this.state.visible)return;const o=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!0},o),this._show(e)}));p(this,"hide",(...n)=>Z(this,[...n],function*(e={}){!this.state.enabled||(this.isHiddenByHideFunc=!0,this.state.visible!==!1&&(this.updateState({visible:!1},e.userAction||!0),this._hide(e)))}));p(this,"updateSize",()=>{if(!this.data||!Bi(this.five,this.showState)||!this.container||!this.wrapper)return;const{min:e,max:n}=this.data.bounding,o=n.x-e.x,s=n.y-e.y,r=this.state.config.attachedTo?{attachedTo:this.state.config.attachedTo}:void 0,a=Mi(this.five,this.wrapper,this.floorIndex,r),l=Math.ceil(o*a),c=Math.ceil(s*a);this.size.width===l&&this.size.height===c||(this.container.style.width=l+"px",this.container.style.height=c+"px",this.size={width:l,height:c})});p(this,"_disable",e=>{var o,s,r;const{userAction:n}=e;this.hooks.emit("disable",{userAction:n}),(o=this.showRejection)==null||o.call(this,Ne.BreakOffByDisable),this.showPromise=void 0,(s=this.app)==null||s.$destroy(),this.app=void 0,(r=this.container)==null||r.remove(),this.removeEventListener()});p(this,"_enable",e=>{const{userAction:n}=e;this.addEventListener(),this.wrapper&&(this.wrapper.append(this.container),this.hooks.emit("enable",{userAction:n}),this.state.visible&&this._show({userAction:n}))});p(this,"_show",e=>Z(this,null,function*(){var r;if(!this.state.enabled)return;if(!((r=this.five.model)!=null&&r.loaded))throw new Error(Ne.ModelNotLoaded);if(!this.data)throw new Error(Ne.DataNotLoaded);this.isHiddenByHideFunc=!1;const n={floorIndex:this.floorIndex,modelOpacity:this.state.config.modelOpacity,immediately:!1,isAutoShow:!1,userAction:!0},o=N(N({},n),e),s=()=>Z(this,null,function*(){this.hooks.emit("show",{userAction:o.userAction,auto:o.isAutoShow});let a=!1,l;this.showRejection=u=>{a=!0,l=u};const[c]=yield Rn(Es(this.five,this.showState,o.userAction));if(c)throw c;if(a)throw l?new Error(l):new Error(Ne.UnknownError);this.updateSize(),this.updatePosition(),this.floorIndex=o.floorIndex,this.five.model.show(this.floorIndex);const d=o.modelOpacity,f=o.immediately?0:Ps;qt(this.five,d,f),this.render(f)});return this.showPromise=s().then(()=>{this.hooks.emit("showAnimationEnded",{auto:o.isAutoShow,userAction:o.userAction})}).catch(a=>{if(this.updateState({visible:!1},o.userAction),!o.isAutoShow&&a instanceof Error)throw a}).finally(()=>{this.showPromise=void 0,this.showRejection=void 0}),this.showPromise}));p(this,"_hide",e=>{var s;(s=this.showRejection)==null||s.call(this,Ne.BreakOffByHide),this.showPromise=void 0;const o=N(N({},{userAction:!0,isAutoHide:!1}),e);qt(this.five,1,0),this.hooks.emit("hide",{auto:o.isAutoHide,userAction:o.userAction}),this.render()});p(this,"handleClick",()=>{if(!this.state.visible)return;if(this.hooks.emit("click"))return!1});p(this,"onFiveModelLoaded",()=>{if(this.state.enabled===!1||this.wrapper||!this.selector)return;const e=this.selector instanceof Element?this.selector:document.querySelector(this.selector);if(!e)throw new Error("\u4E0D\u6B63\u786E\u7684\u7236\u5BB9\u5668\u9009\u62E9\u5668");this.wrapper=e,e.append(this.container)});p(this,"onFiveModeChange",e=>{e!==this.showState.mode&&(this.updateState({visible:!1},!1),this._hide({userAction:!1}))});p(this,"onFivePanoArrived",e=>{var n;!((n=this.five)!=null&&n.work)||(this.panoIndex=e,this.floorIndex=this.five.work.observers[e].floorIndex)});p(this,"onFiveCameraUpdate",(e,n)=>{if(!this.state.visible||this.showPromise)return;const o=this.five.getCurrentState();this.updatePosition(),this.updateSize(),Td(o)&&(this.updateState({visible:!1},n),this._hide({userAction:n}))});p(this,"onFiveWantsPanGesture",(e,n)=>{if(this.five.getCurrentState().mode===this.showState.mode&&this.state.config.autoShowEnable!==!1){if(n&&this.state.visible)return this.five.updateCamera(this.showState,0),!1;if(n&&!this.state.visible){if(this.isHiddenByHideFunc)return;const o=this.five.getCurrentState();return o.mode!==this.showState.mode||this.state.visible?void 0:(Qd(o)&&(this.updateState({visible:!0},!0),this._show({isAutoShow:!0})),!1)}}});p(this,"onFiveWantsTapGesture",()=>this.handleClick());p(this,"onFiveWantsChangeMode",(e,n)=>{n==="Panorama"&&e===this.showState.mode&&(this.lastPanoramaLongitude=this.five.getCurrentState().longitude)});p(this,"onModelShownFloorChange",e=>{if(this.floorIndex!==e){if(e===null){const n=this.five.getCurrentState().panoIndex;this.floorIndex=this.five.work.observers[n].floorIndex;return}this.floorIndex=e,this.updateSize(),this.render()}});n!=null&&n.selector&&(this.selector=n.selector,console.warn("\u4E0D\u63A8\u8350\u7EE7\u7EED\u4F7F\u7528 params.selector \u914D\u7F6E\u7236\u5BB9\u5668\uFF0C\u8BF7\u4F7F\u7528 appendTo \u65B9\u6CD5")),this.showState={mode:"Mapview",longitude:0,latitude:Math.PI/2,fov:90};const o={northDesc:"\u5317",modelOpacity:1,hoverEnable:!0,compassEnable:!0,autoShowEnable:!0,ruleLabelsEnable:!0,roomLabelsEnable:!0,cameraImageUrl:gt,attachedTo:pt.BOUNDING_CENTER,getLabelElement:void 0,adaptiveRoomLabelVisibleEnable:!0,getRoomAreaText:a=>(a/1e6).toFixed(1)+"\u33A1",getRuleDistanceText:a=>a.toString()},s=n?Wn(n,["selector","scale"]):{},r=N(N({},o),s);this.state={enabled:!0,visible:!1,config:r},this.initContainer(),e.model.loaded?this.onFiveModelLoaded():e.once("modelLoaded",this.onFiveModelLoaded),e.once("dispose",this.dispose),this.addEventListener()}load(e,n,o=!0){return Z(this,null,function*(){function s(d){return Object.prototype.hasOwnProperty.apply(d,["version"])}const r=e;r&&!r.version&&console.warn("\u4F20\u5165 serverData.data \u7684\u65B9\u5F0F\u540E\u7EED\u53EF\u80FD\u4E0D\u518D\u652F\u6301\uFF0C\u8BF7\u628A serverData \u6574\u4F53\u4F20\u5165 load \u51FD\u6570");const a=JSON.parse(JSON.stringify(e)),l=s(a)?a.data:a,c=this.data;this.data=yield At(l),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,c),n&&this.updateState(n,o),this.render()})}appendTo(e){if(this.wrapper=e,!!this.state.enabled)return e.appendChild(this.container),this.render(),this}enable(e={}){if(this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!0},e.userAction||n),this._enable({userAction:n})}disable(e={}){if(!this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!1},e.userAction||n),this._disable({userAction:n})}setState(e,n={}){const o=this.state,s=n.userAction!==void 0?n.userAction:!0;if(this.updateState(e,s),e.enabled!==void 0&&o.enabled!==e.enabled&&(e.enabled?this._enable({userAction:s}):this._disable({userAction:s})),e.visible!==void 0&&o.visible!==e.visible){const r={userAction:s};e.visible?this._show(r):this._hide(r)}}changeConfigs(e,n=!0){this.updateState({config:e},n),this.render()}updatePosition(){var a;const e=zi(this.five,this.floorIndex,this.state.config.attachedTo),n=(a=this.five.model)==null?void 0:a.bounding.getCenter(new I.Vector3).setY(e);if(!n)return;const o=n.clone().project(this.five.camera),s=(o.x+1)/2,r=-(o.y-1)/2;this.container.style.left=s*100+"%",this.container.style.top=r*100+"%"}formatData(e){return Z(this,null,function*(){return yield At(e.data)})}updateState(e,n){const o=this.state,s=e.config?N(N({},o.config),e.config):o.config;this.state=pe(N(N({},this.state),e),{config:s}),!$e(this.state,o,{deep:!0})&&this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:n})}initContainer(){this.container.classList.add("floorplan-plugin"),Object.assign(this.container.style,{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",zIndex:10,pointerEvents:"none"}),this.five.addExtraElement(this.container)}addEventListener(){if(!this.state.enabled||this.hasAddedEventListener)return;const e=this.five;e.on("modeChange",this.onFiveModeChange),e.on("panoArrived",this.onFivePanoArrived),e.on("cameraUpdate",this.onFiveCameraUpdate),e.on("wantsPanGesture",this.onFiveWantsPanGesture),e.on("wantsTapGesture",this.onFiveWantsTapGesture),e.on("wantsChangeMode",this.onFiveWantsChangeMode),e.on("modelShownFloorChange",this.onModelShownFloorChange)}removeEventListener(){const e=this.five;this.hasAddedEventListener=!1,e.off("modelLoaded",this.onFiveModelLoaded),e.off("modeChange",this.onFiveModeChange),e.off("panoArrived",this.onFivePanoArrived),e.off("cameraUpdate",this.onFiveCameraUpdate),e.off("wantsPanGesture",this.onFiveWantsPanGesture),e.off("wantsTapGesture",this.onFiveWantsTapGesture),e.off("wantsChangeMode",this.onFiveWantsChangeMode),e.off("modelShownFloorChange",this.onModelShownFloorChange)}render(e){if(!this.state.enabled||!this.container||!this.data||this.size.width===0)return;const n=pe(N({},this.state.config),{visible:this.state.visible,duration:e!=null?e:0,panoIndex:this.panoIndex,floorIndex:this.floorIndex,floorplanData:this.data,lastPanoramaLongitude:this.lastPanoramaLongitude});if(this.app)return this.app.$set(n);this.app=new Si({target:this.container,intro:!0,props:n})}}const Rd=(i,t)=>new Od(i,t);class Fd extends jt{constructor(e,n){super(e);p(this,"name","topviewFloorplanPlugin");p(this,"state");p(this,"data");p(this,"app");p(this,"selector");p(this,"panoIndex",0);p(this,"floorIndex",0);p(this,"wrapper");p(this,"container",document.createElement("div"));p(this,"lastPanoramaLongitude",0);p(this,"size",{width:0,height:0});p(this,"hasAddedEventListener",!1);p(this,"isHiddenByHideFunc",!1);p(this,"updateSize",()=>{if(!this.data||!this.container||!this.wrapper||this.five.getCurrentState().mode!=="Topview")return;const{min:e,max:n}=this.data.bounding,o=n.x-e.x,s=n.y-e.y,r=this.state.config.attachedTo?{attachedTo:this.state.config.attachedTo}:void 0,a=Mi(this.five,this.wrapper,this.floorIndex,r),l=Math.ceil(o*a),c=Math.ceil(s*a);this.size.width===l&&this.size.height===c||(this.container.style.width=l+"px",this.container.style.height=c+"px",this.size={width:l,height:c})});p(this,"dispose",()=>{var e,n;this.removeEventListener(),(e=this.app)==null||e.$destroy(),this.app=void 0,(n=this.container)==null||n.remove(),this.data=void 0,this.wrapper=void 0,this.selector=void 0,this.hooks.emit("dispose")});p(this,"_disable",e=>{var o,s;const{userAction:n}=e;(o=this.app)==null||o.$destroy(),this.app=void 0,(s=this.container)==null||s.remove(),this.removeEventListener(),this.hooks.emit("disable",{userAction:n})});p(this,"onFiveModelLoaded",()=>{if(this.state.enabled===!1||this.wrapper||!this.selector)return;const e=this.selector instanceof Element?this.selector:document.querySelector(this.selector);if(!e)throw new Error("\u4E0D\u6B63\u786E\u7684\u7236\u5BB9\u5668\u9009\u62E9\u5668");this.wrapper=e,e.append(this.container)});p(this,"onFiveModeChange",(...[e,,,,n])=>{e!=="Topview"&&this.state.visible&&(this.updateState({visible:!1},n),this._hide({userAction:n}))});p(this,"onFivePanoArrived",e=>{var n;!((n=this.five)!=null&&n.work)||(this.panoIndex=e,this.floorIndex=this.five.work.observers[e].floorIndex)});p(this,"onFiveCameraUpdate",(e,n)=>{!this.state.visible||(this.updatePosition(),this.updateSize())});p(this,"onFiveWantsGesture",e=>{if(!(e!=="pan"&&e!=="pinch"&&e!=="mouseWheel")&&this.state.visible&&!this.state.config.gestureEnable)return!1});p(this,"onFiveWantsMoveToPano",()=>{if(this.state.visible&&this.state.config.preventRoomClick)return!1});p(this,"onFiveInitAnimationEnded",(...[,,e])=>{const{mode:n}=this.five.getCurrentState();n==="Topview"&&!this.isHiddenByHideFunc&&!this.state.visible&&this.state.config.autoShowEnable&&(this.updateState({visible:!0},e),this._show({userAction:e}))});p(this,"onModelShownFloorChange",e=>{if(this.floorIndex!==e){if(e===null){const n=this.five.getCurrentState().panoIndex;this.floorIndex=this.five.work.observers[n].floorIndex;return}this.floorIndex=e,this.updateSize(),this.render()}});n!=null&&n.selector&&(this.selector=n.selector,console.warn("\u4E0D\u63A8\u8350\u7EE7\u7EED\u4F7F\u7528 params.selector \u914D\u7F6E\u7236\u5BB9\u5668\uFF0C\u8BF7\u4F7F\u7528 appendTo \u65B9\u6CD5"));const o={northDesc:"\u5317",modelOpacity:1,hoverEnable:!0,compassEnable:!0,gestureEnable:!1,autoShowEnable:!0,ruleLabelsEnable:!0,roomLabelsEnable:!0,cameraImageUrl:gt,attachedTo:pt.BOUNDING_CENTER,getLabelElement:void 0,adaptiveRoomLabelVisibleEnable:!0,getRoomAreaText:a=>(a/1e6).toFixed(1)+"\u33A1",getRuleDistanceText:a=>a.toString()},s=n?Wn(n,["selector","scale"]):{},r=N(N({},o),s);this.state={enabled:!0,visible:!1,config:r},this.initContainer(),e.model.loaded?this.onFiveModelLoaded():e.once("modelLoaded",this.onFiveModelLoaded),e.once("dispose",this.dispose),this.addEventListener()}load(e,n,o=!0){return Z(this,null,function*(){function s(d){return Object.prototype.hasOwnProperty.apply(d,["version"])}const r=e;r&&!r.version&&console.warn("\u4F20\u5165 serverData.data \u7684\u65B9\u5F0F\u540E\u7EED\u53EF\u80FD\u4E0D\u518D\u652F\u6301\uFF0C\u8BF7\u628A serverData \u6574\u4F53\u4F20\u5165 load \u51FD\u6570");const a=JSON.parse(JSON.stringify(e)),l=s(a)?a.data:a,c=this.data;this.data=yield At(l),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,c),n&&this.updateState(n,o),this.render()})}updatePosition(){var a;const e=zi(this.five,this.floorIndex,this.state.config.attachedTo),n=(a=this.five.model)==null?void 0:a.bounding.getCenter(new I.Vector3).setY(e);if(!n)return;const o=n.clone().project(this.five.camera),s=(o.x+1)/2,r=-(o.y-1)/2;this.container.style.left=s*100+"%",this.container.style.top=r*100+"%"}appendTo(e){if(this.wrapper=e,!!this.state.enabled)return e.appendChild(this.container),this.render(),this}show(){return Z(this,arguments,function*(e={}){if(this.state.visible)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!0},n),this._show({userAction:n})})}hide(){return Z(this,arguments,function*(e={}){if(this.isHiddenByHideFunc=!0,!this.state.visible)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!1},n),this._hide({userAction:n})})}enable(e={}){if(this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!0},e.userAction||n),this._enable({userAction:n})}disable(e={}){if(!this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!1},e.userAction||n),this._disable({userAction:n})}setState(e,n={}){const o=this.state,s=n.userAction!==void 0?n.userAction:!0;if(this.updateState(e,s),e.enabled!==void 0&&o.enabled!==e.enabled){const r={userAction:s};e.enabled?this._enable(r):this._disable(r)}if(e.visible!==void 0&&o.visible!==e.visible){const r={userAction:s};e.visible?this._show(r):this._hide(r)}}changeConfigs(e,n=!0){this.updateState({config:e},n),this.render()}formatData(e){return Z(this,null,function*(){return yield At(e.data)})}_show(e){return Z(this,null,function*(){if(!this.state.enabled)return;this.isHiddenByHideFunc=!1;const{userAction:n}=e;this.hooks.emit("show",{userAction:n,auto:!1}),this.five.getCurrentState().mode!=="Topview"&&(yield Is(this.five,["Topview",void 0,void 0,n])),this.five.model.show(this.floorIndex),this.updatePosition(),this.updateSize();const o=500,s=this.state.config.modelOpacity;qt(this.five,s,o),this.hooks.emit("showAnimationEnded",{userAction:n,auto:!1}),this.render()})}_hide(e){return Z(this,null,function*(){if(!this.state.enabled)return;const{userAction:n}=e;this.hooks.emit("hide",{userAction:n,auto:!1});const o=1,s=0;qt(this.five,o,s),this.render()})}_enable(e){const{userAction:n}=e;this.addEventListener(),this.wrapper&&this.wrapper.append(this.container),this.hooks.emit("enable",{userAction:n}),this.state.visible&&this._show({userAction:n})}updateState(e,n){const o=this.state,s=e.config?N(N({},o.config),e.config):o.config;this.state=pe(N(N({},this.state),e),{config:s}),!$e(this.state,o,{deep:!0})&&this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:n})}addEventListener(){if(!this.state.enabled||this.hasAddedEventListener)return;const e=this.five;e.on("modeChange",this.onFiveModeChange),e.on("panoArrived",this.onFivePanoArrived),e.on("cameraUpdate",this.onFiveCameraUpdate),e.on("wantsGesture",this.onFiveWantsGesture),e.on("wantsMoveToPano",this.onFiveWantsMoveToPano),e.on("initAnimationEnded",this.onFiveInitAnimationEnded),e.on("modelShownFloorChange",this.onModelShownFloorChange)}removeEventListener(){const e=this.five;this.hasAddedEventListener=!1,e.off("modeChange",this.onFiveModeChange),e.off("panoArrived",this.onFivePanoArrived),e.off("cameraUpdate",this.onFiveCameraUpdate),e.off("wantsGesture",this.onFiveWantsGesture),e.off("wantsMoveToPano",this.onFiveWantsMoveToPano),e.off("initAnimationEnded",this.onFiveInitAnimationEnded),e.off("modelShownFloorChange",this.onModelShownFloorChange)}initContainer(){this.container.classList.add("floorplan-plugin"),Object.assign(this.container.style,{position:"absolute",left:"50%",top:"50%",transform:"translate3d(-50%, -50%, 10px)",zIndex:10,pointerEvents:"none","will-change":"width, height"}),this.five.addExtraElement(this.container)}render(e){if(!this.state.enabled||!this.container||!this.data||this.size.width===0)return;const n=pe(N({},this.state.config),{visible:this.state.visible,duration:e!=null?e:0,panoIndex:this.panoIndex,floorIndex:this.floorIndex,floorplanData:this.data,lastPanoramaLongitude:this.lastPanoramaLongitude});if(this.app)return this.app.$set(n);this.app=new Si({target:this.container,intro:!0,props:n})}}const Hd=(i,t)=>new Fd(i,t);function Ti(i,t=200){let e;return function(...n){e||(i(...n),e=setTimeout(function(){e=null},t))}}function Gd(i){le(i,"svelte-1nqrlxd",".plugin-radar__camera-wrapper.svelte-1nqrlxd{width:100%;height:100%;position:absolute;pointer-events:none}.plugin-radar__camera-position.svelte-1nqrlxd{position:absolute;left:0;top:0;width:0;height:0;transform:none;pointer-events:none;transition:transform 1s linear}.plugin-radar__camera-rotate.svelte-1nqrlxd{position:absolute;left:-0.9375rem;top:-0.9375rem;width:1.0625rem;height:1.0625rem;transform-origin:0.9375rem 0.9375rem;transform:rotate(45deg);background-repeat:no-repeat;background-size:100%}")}function Nd(i){let t,e,n;return{c(){t=Q("div"),e=Q("div"),n=Q("div"),b(n,"class","plugin-radar__camera-rotate svelte-1nqrlxd"),F(n,"background-image","url("+(i[0]||gt)+")"),F(n,"transform",i[1],!1),b(e,"class","plugin-radar__camera-position svelte-1nqrlxd"),F(e,"transform",i[2],!1),b(t,"class","plugin-radar__camera-wrapper svelte-1nqrlxd")},m(o,s){B(o,t,s),R(t,e),R(e,n)},p(o,[s]){s&1&&F(n,"background-image","url("+(o[0]||gt)+")"),s&2&&F(n,"transform",o[1],!1),s&4&&F(e,"transform",o[2],!1)},i:ne,o:ne,d(o){o&&z(t)}}}function Wd(i){return`rotate(${Math.floor(i/Math.PI*180)*-1+45}deg)`}function Xd(i,t,e){let n,o,{five:s}=t,{pxmm:r}=t,{floorplanData:a}=t,{cameraImageUrl:l}=t,c=s.getCurrentState().panoIndex,d=s.getCurrentState().longitude;function f(m,g){const v=m.bounding,A=m.observers[g];if(!A)return"";const C=(v.max.x-v.min.x)*r,w=(v.max.y-v.min.y)*r,E=Math.floor(A.positionInImage.x*C),D=Math.floor(A.positionInImage.y*w);return`translate(${E}px, ${D}px)`}function u(m){e(6,c=m)}const h=Ti(m=>{e(7,d=m.longitude)},1e3/60);return Ue(()=>(s.on("panoWillArrive",u),s.on("cameraDirectionUpdate",h),function(){s.off("panoWillArrive",u),s.off("cameraDirectionUpdate",h)})),i.$$set=m=>{"five"in m&&e(3,s=m.five),"pxmm"in m&&e(4,r=m.pxmm),"floorplanData"in m&&e(5,a=m.floorplanData),"cameraImageUrl"in m&&e(0,l=m.cameraImageUrl)},i.$$.update=()=>{i.$$.dirty&96&&e(2,n=f(a,c)),i.$$.dirty&128&&e(1,o=Wd(d))},[l,o,n,s,r,a,c,d]}class Yd extends se{constructor(t){super(),oe(this,t,Xd,Nd,ie,{five:3,pxmm:4,floorplanData:5,cameraImageUrl:0},Gd)}}function Ud(i){le(i,"svelte-1i87fz7",".plugin-pano-floorplan__extra-objects.svelte-1i87fz7{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.plugin-pano-floorplan__extra-object-item--position.svelte-1i87fz7{position:absolute;width:0;height:0}.plugin-pano-floorplan__extra-object-item.svelte-1i87fz7{transform:translate(-50%, -50%)}")}function xs(i,t,e){const n=i.slice();return n[1]=t[e],n}function ks(i,t){let e,n,o=`${t[1].icon.width/16}rem`,s=`${t[1].icon.height/16}rem`,r,a=`${t[1].positionInImage.y*100}%`,l=`${t[1].positionInImage.x*100}%`;return{key:i,first:null,c(){e=Q("div"),n=Q("div"),r=_(),b(n,"class","plugin-pano-floorplan__extra-object-item svelte-1i87fz7"),F(n,"background-image",`url(${t[1].icon.url})`),F(n,"width",o,!1),F(n,"height",s,!1),b(e,"class","plugin-pano-floorplan__extra-object-item--position svelte-1i87fz7"),F(e,"top",a,!1),F(e,"left",l,!1),this.first=e},m(c,d){B(c,e,d),R(e,n),R(e,r)},p(c,d){t=c,d&1&&F(n,"background-image",`url(${t[1].icon.url})`),d&1&&o!==(o=`${t[1].icon.width/16}rem`)&&F(n,"width",o,!1),d&1&&s!==(s=`${t[1].icon.height/16}rem`)&&F(n,"height",s,!1),d&1&&a!==(a=`${t[1].positionInImage.y*100}%`)&&F(e,"top",a,!1),d&1&&l!==(l=`${t[1].positionInImage.x*100}%`)&&F(e,"left",l,!1)},d(c){c&&z(e)}}}function Vd(i){let t,e=[],n=new Map,o=i[0];const s=r=>r[1].id;for(let r=0;r<o.length;r+=1){let a=xs(i,o,r),l=s(a);n.set(l,e[r]=ks(l,a))}return{c(){t=Q("div");for(let r=0;r<e.length;r+=1)e[r].c();b(t,"class","plugin-pano-floorplan__extra-objects svelte-1i87fz7")},m(r,a){B(r,t,a);for(let l=0;l<e.length;l+=1)e[l].m(t,null)},p(r,[a]){a&1&&(o=r[0],e=Ve(e,a,s,1,r,o,n,t,Uo,ks,null,xs))},i:ne,o:ne,d(r){r&&z(t);for(let a=0;a<e.length;a+=1)e[a].d()}}}function Jd(i,t,e){let{extraObjects:n=[]}=t;return i.$$set=o=>{"extraObjects"in o&&e(0,n=o.extraObjects)},[n]}class Zd extends se{constructor(t){super(),oe(this,t,Jd,Vd,ie,{extraObjects:0},Ud)}}function Ds(i){let t,e;const n=[{five:i[0],pxmm:i[1],floorIndex:i[2],floorplanData:i[4],onRoomHeightClick:i[6]}];let o={};for(let s=0;s<n.length;s+=1)o=Ie(o,n[s]);return t=new ms({props:o}),{c(){ee(t.$$.fragment)},m(s,r){K(t,s,r),e=!0},p(s,r){const a=r&87?Te(n,[{five:s[0],pxmm:s[1],floorIndex:s[2],floorplanData:s[4],onRoomHeightClick:s[6]}]):{};t.$set(a)},i(s){e||(k(t.$$.fragment,s),e=!0)},o(s){M(t.$$.fragment,s),e=!1},d(s){$(t,s)}}}function _d(i){let t,e,n,o,s,r;const a=[{floorIndex:i[2],floorplanData:i[4]}];let l={};for(let d=0;d<a.length;d+=1)l=Ie(l,a[d]);t=new qo({props:l}),n=new Zd({props:{extraObjects:i[5]}});let c=i[3]&&Ds(i);return{c(){ee(t.$$.fragment),e=_(),ee(n.$$.fragment),o=_(),c&&c.c(),s=Ae()},m(d,f){K(t,d,f),B(d,e,f),K(n,d,f),B(d,o,f),c&&c.m(d,f),B(d,s,f),r=!0},p(d,[f]){const u=f&20?Te(a,[{floorIndex:d[2],floorplanData:d[4]}]):{};t.$set(u);const h={};f&32&&(h.extraObjects=d[5]),n.$set(h),d[3]?c?(c.p(d,f),f&8&&k(c,1)):(c=Ds(d),c.c(),k(c,1),c.m(s.parentNode,s)):c&&(fe(),M(c,1,1,()=>{c=null}),he())},i(d){r||(k(t.$$.fragment,d),k(n.$$.fragment,d),k(c),r=!0)},o(d){M(t.$$.fragment,d),M(n.$$.fragment,d),M(c),r=!1},d(d){$(t,d),d&&z(e),$(n,d),d&&z(o),c&&c.d(d),d&&z(s)}}}function qd(i,t,e){let n,{five:o}=t,{pxmm:s}=t,{floorIndex:r}=t,{hoverEnable:a}=t,{floorplanData:l}=t,{extraObjects:c=[]}=t;const d=void 0;return i.$$set=f=>{"five"in f&&e(0,o=f.five),"pxmm"in f&&e(1,s=f.pxmm),"floorIndex"in f&&e(2,r=f.floorIndex),"hoverEnable"in f&&e(3,a=f.hoverEnable),"floorplanData"in f&&e(4,l=f.floorplanData),"extraObjects"in f&&e(7,c=f.extraObjects)},i.$$.update=()=>{i.$$.dirty&132&&e(5,n=c==null?void 0:c.filter(f=>f.floorIndex===r))},[o,s,r,a,l,n,d,c]}class Kd extends se{constructor(t){super(),oe(this,t,qd,_d,ie,{five:0,pxmm:1,floorIndex:2,hoverEnable:3,floorplanData:4,extraObjects:7})}}function $d(i){le(i,"svelte-1mvqyqq",".plugin-floorplan-radar.svelte-1mvqyqq{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.plugin-floorplan-radar-container.svelte-1mvqyqq{position:relative}")}function Ls(i){let t,e,n,o=i[6]!==0&&Ss(i);return{c(){t=Q("div"),o&&o.c(),b(t,"class","plugin-floorplan-radar svelte-1mvqyqq"),De(()=>i[12].call(t))},m(s,r){B(s,t,r),o&&o.m(t,null),e=ft(t,i[12].bind(t)),n=!0},p(s,r){s[6]!==0?o?(o.p(s,r),r&64&&k(o,1)):(o=Ss(s),o.c(),k(o,1),o.m(t,null)):o&&(fe(),M(o,1,1,()=>{o=null}),he())},i(s){n||(k(o),n=!0)},o(s){M(o),n=!1},d(s){s&&z(t),o&&o.d(),e()}}}function Ss(i){let t,e,n,o,s=`${i[8]}px`,r=`${i[11]}px`,a;const l=[{five:i[0],pxmm:i[9],floorIndex:i[10],floorplanData:i[3],hoverEnable:i[2],extraObjects:i[5]}];let c={};for(let u=0;u<l.length;u+=1)c=Ie(c,l[u]);e=new Kd({props:c});const d=[{pxmm:i[9],five:i[0],floorplanData:i[3],cameraImageUrl:i[4]}];let f={};for(let u=0;u<d.length;u+=1)f=Ie(f,d[u]);return o=new Yd({props:f}),{c(){t=Q("div"),ee(e.$$.fragment),n=_(),ee(o.$$.fragment),b(t,"class","plugin-floorplan-radar-container svelte-1mvqyqq"),F(t,"width",s,!1),F(t,"height",r,!1)},m(u,h){B(u,t,h),K(e,t,null),R(t,n),K(o,t,null),a=!0},p(u,h){const m=h&1581?Te(l,[{five:u[0],pxmm:u[9],floorIndex:u[10],floorplanData:u[3],hoverEnable:u[2],extraObjects:u[5]}]):{};e.$set(m);const g=h&537?Te(d,[{pxmm:u[9],five:u[0],floorplanData:u[3],cameraImageUrl:u[4]}]):{};o.$set(g),h&256&&s!==(s=`${u[8]}px`)&&F(t,"width",s,!1),h&2048&&r!==(r=`${u[11]}px`)&&F(t,"height",r,!1)},i(u){a||(k(e.$$.fragment,u),k(o.$$.fragment,u),a=!0)},o(u){M(e.$$.fragment,u),M(o.$$.fragment,u),a=!1},d(u){u&&z(t),$(e),$(o)}}}function eu(i){let t,e,n=i[1]&&Ls(i);return{c(){n&&n.c(),t=Ae()},m(o,s){n&&n.m(o,s),B(o,t,s),e=!0},p(o,[s]){o[1]?n?(n.p(o,s),s&2&&k(n,1)):(n=Ls(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(fe(),M(n,1,1,()=>{n=null}),he())},i(o){e||(k(n),e=!0)},o(o){M(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function tu(i,t,e){var A,C;let{five:n}=t,{visible:o}=t,{hoverEnable:s}=t,{floorplanData:r}=t,{cameraImageUrl:a}=t,{extraObjects:l=[]}=t,c=0,d=(C=(A=n.work.observers[n.getCurrentState().panoIndex])==null?void 0:A.floorIndex)!=null?C:0,f=0,u=0,h=0,m=0;function g(w){e(10,d=n.work.observers[w].floorIndex)}Ue(()=>(n.on("panoArrived",g),()=>{n.off("panoArrived",g)}));function v(){f=this.clientWidth,u=this.clientHeight,e(6,f),e(7,u)}return i.$$set=w=>{"five"in w&&e(0,n=w.five),"visible"in w&&e(1,o=w.visible),"hoverEnable"in w&&e(2,s=w.hoverEnable),"floorplanData"in w&&e(3,r=w.floorplanData),"cameraImageUrl"in w&&e(4,a=w.cameraImageUrl),"extraObjects"in w&&e(5,l=w.extraObjects)},i.$$.update=()=>{if(i.$$.dirty&456){const w=Math.min(f,u),{max:E,min:D}=r.bounding,y=E.x-D.x,L=E.y-D.y,x=function(){return y>L?[w,w/y*L]:[w/L*y,w]}();e(8,h=x[0]),e(11,m=x[1]),e(9,c=h/y)}},[n,o,s,r,a,l,f,u,h,c,d,m,v]}class nu extends se{constructor(t){super(),oe(this,t,tu,eu,ie,{five:0,visible:1,hoverEnable:2,floorplanData:3,cameraImageUrl:4,extraObjects:5},$d)}}class iu extends jt{constructor(e,n){super(e);p(this,"name","panoFloorplanRadarPlugin");p(this,"state");p(this,"data");p(this,"app");p(this,"wrapperSelector","");p(this,"wrapper",null);p(this,"disposed",!1);p(this,"extraObjects",[]);p(this,"dispose",()=>{var e;this.disposed=!0,(e=this.app)==null||e.$destroy(),this.wrapper=null,this.wrapperSelector="",this.hooks.emit("dispose")});p(this,"_disable",e=>{var o;const{userAction:n}=e;(o=this.app)==null||o.$destroy(),this.app=void 0,this.hooks.emit("disable",{userAction:n})});this.five=e;const o={hoverEnable:!1,cameraImageUrl:gt},s=n!=null&&n.configs?n.configs:{},r=N(N({},o),s);this.state={enabled:!0,visible:!0,config:r},n!=null&&n.wrapper&&console.warn("\u4E0D\u63A8\u8350\u7EE7\u7EED\u4F7F\u7528 params.selector \u914D\u7F6E\u7236\u5BB9\u5668\uFF0C\u8BF7\u4F7F\u7528 appendTo \u65B9\u6CD5"),typeof(n==null?void 0:n.wrapper)=="string"?this.wrapperSelector=n.wrapper:(n==null?void 0:n.wrapper)instanceof Element&&(this.wrapper=n.wrapper),e.once("dispose",this.dispose)}load(e,n,o=!0){return Z(this,null,function*(){function s(c){return Object.prototype.hasOwnProperty.apply(c,["version"])}const r=JSON.parse(JSON.stringify(e)),a=s(r)?r.data:r,l=this.data;this.data=yield At(a),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,l),n&&this.updateState(n,o),this.render()})}show(){return Z(this,arguments,function*(e={}){if(this.state.visible)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!0},n),this._show({userAction:n})})}hide(){return Z(this,arguments,function*(e={}){if(!this.state.visible)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!1},n),this._hide({userAction:n})})}enable(e={}){if(this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!0},e.userAction||n),this._enable({userAction:n})}disable(e={}){if(!this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!1},e.userAction||n),this._disable({userAction:n})}setState(e,n={}){const o=this.state,s=n.userAction!==void 0?n.userAction:!0;if(this.updateState(e,s),e.enabled!==void 0&&o.enabled!==e.enabled){const r={userAction:s};e.enabled?this._enable(r):this._disable(r)}if(e.visible!==void 0&&o.visible!==e.visible){const r={userAction:s};e.visible?this._show(r):this._hide(r)}}appendTo(e){this.wrapper=e,this.render()}changeConfigs(e,n=!0){this.setState({config:e},{userAction:n}),this.render()}setExtraObjectsWith3DPositions(e){!this.data||(this.extraObjects=Dd(e,this.five,this.data),this.render())}formatData(e){return Z(this,null,function*(){return yield At(e.data)})}_enable(e){const{userAction:n}=e;this.hooks.emit("enable",{userAction:n}),this.state.visible&&this._show({userAction:n})}_show(e){if(this.disposed||!this.state.enabled)return;const{userAction:n}=e;this.hooks.emit("show",{userAction:n}),this.render()}_hide(e){if(this.disposed||!this.state.enabled)return;const{userAction:n}=e;this.hooks.emit("hide",{userAction:n}),this.render()}updateState(e,n){const o=this.state;this.state=N(N({},this.state),e),!$e(this.state,o,{deep:!0})&&this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:n})}render(){if(this.disposed||!this.state.enabled)return;if(!this.wrapper&&this.wrapperSelector){const n=document.querySelector(this.wrapperSelector);this.wrapper=n}if(!this.data||!this.wrapper)return;const e=pe(N({},this.state.config),{five:this.five,floorplanData:this.data,visible:this.state.visible,extraObjects:this.extraObjects});this.app?this.app.$set(e):this.app=new nu({target:this.wrapper,props:e})}}const ou=(i,t)=>new iu(i,t),su=[{type:0,floorType:1,roomType:"100900000012",name:"\u5176\u4ED6"},{type:1,floorType:1,roomType:"100900000002",name:"\u5BA2\u5385"},{type:2,floorType:1,roomType:"100900000002",name:"\u9910\u5385"},{type:3,floorType:0,roomType:"100900000001",name:"\u5367\u5BA4"},{type:4,floorType:0,roomType:"100900000001",name:"\u4E66\u623F"},{type:5,floorType:3,roomType:"100900000004",name:"\u536B\u751F\u95F4"},{type:6,floorType:3,roomType:"100900000004",name:"\u6DCB\u6D74\u95F4"},{type:7,floorType:3,roomType:"100900000004",name:"\u6D17\u624B\u95F4"},{type:8,floorType:3,roomType:"100900000003",name:"\u53A8\u623F"},{type:9,floorType:1,roomType:"100900000003",name:"\u5F00\u653E\u53A8\u623F",onlySubArea:!0},{type:10,floorType:0,roomType:"100900000001",name:"\u591A\u529F\u80FD\u95F4"},{type:11,floorType:0,roomType:"100900000009",name:"\u4FDD\u59C6\u95F4"},{type:12,floorType:4,roomType:"100900000005",name:"\u9633\u53F0"},{type:13,floorType:4,roomType:"100900000006",name:"\u9732\u53F0"},{type:14,floorType:0,roomType:"100900000008",name:"\u50A8\u7269\u95F4"},{type:15,floorType:0,roomType:"100900000013",name:"\u8863\u5E3D\u95F4"},{type:16,floorType:0,roomType:"100900000011",name:"\u9601\u697C"},{type:17,floorType:2,roomType:"100900000007",name:"\u82B1\u56ED"},{type:18,floorType:5,roomType:"100900000010",name:"\u8F66\u5E93"},{type:19,floorType:1,roomType:"100900000012",name:"\u7535\u68AF"},{type:20,floorType:1,roomType:"100900000012",name:"\u5730\u4E0B\u5BA4"},{type:21,floorType:1,roomType:"100900000012",name:"\u5929\u4E95"},{type:22,floorType:1,roomType:"100900000012",name:"\u9633\u5149\u623F"},{type:23,floorType:1,roomType:"100900000012",name:"\u8FC7\u9053"},{type:24,floorType:1,roomType:"100900000012",name:"\u697C\u68AF\u95F4"},{type:25,floorType:1,roomType:"100900000012",name:"\u95E8\u5385"},{type:26,floorType:2,roomType:"100900000012",name:"\u5165\u6237\u82B1\u56ED"},{type:27,floorType:1,roomType:"100900000012",name:"\u7384\u5173"},{type:28,floorType:1,roomType:"100900000012",name:"\u6311\u7A7A"},{type:29,floorType:4,roomType:"100900000012",name:"\u667E\u6652\u533A"},{type:30,floorType:4,roomType:"100900000012",name:"\u6D17\u8863\u623F"},{type:31,floorType:0,roomType:"100900000012",name:"\u5A31\u4E50\u533A"},{type:32,floorType:0,roomType:"100900000012",name:"\u5065\u8EAB\u533A"},{type:33,floorType:0,roomType:"100900000012",name:"\u63A5\u5F85\u533A"},{type:34,floorType:0,roomType:"100900000012",name:"\u5F71\u97F3\u533A"},{type:35,floorType:1,roomType:"100900000012",name:"\u9910\u996E\u533A"},{type:36,floorType:1,roomType:"100900000012",name:"\u5176\u4ED6",onlySubArea:!0},{type:37,floorType:1,roomType:"100900000002",name:"\u8D77\u5C45\u5BA4"},{type:38,floorType:0,roomType:"100900000001",name:"\u4E3B\u5367"},{type:39,floorType:0,roomType:"100900000001",name:"\u6B21\u5367"},{type:40,floorType:0,roomType:"100900000001",name:"\u4F18\u5316\u95F4"},{type:41,floorType:0,roomType:"100900000001",name:"\u529E\u516C\u5BA4"},{type:42,floorType:0,roomType:"100900000001",name:"\u4F1A\u8BAE\u5BA4"},{type:43,floorType:0,roomType:"100900000001",name:"\u6D3D\u8C08\u95F4"},{type:44,floorType:1,roomType:"100900000002",name:"\u5171\u4EAB\u5927\u5385"},{type:45,floorType:1,roomType:"100900000012",name:"\u6C34\u5427"},{type:46,floorType:0,roomType:"100900000015",name:"\u51FA\u5165\u53E3"},{type:47,floorType:0,roomType:"100900000015",name:"\u5927\u5385"},{type:48,floorType:0,roomType:"100900000015",name:"\u5305\u53A2"},{type:49,floorType:0,roomType:"100900000015",name:"\u5176\u4ED6"},{type:50,floorType:0,roomType:"100900000016",name:"\u51FA\u5165\u53E3"},{type:51,floorType:0,roomType:"100900000016",name:"\u529E\u516C\u533A"},{type:52,floorType:0,roomType:"100900000016",name:"\u8001\u677F\u95F4"},{type:53,floorType:0,roomType:"100900000016",name:"\u4F1A\u8BAE\u5BA4"},{type:54,floorType:0,roomType:"100900000016",name:"\u4F11\u606F\u533A/\u6C34\u5427"},{type:55,floorType:0,roomType:"100900000016",name:"\u5176\u4ED6"},{type:56,floorType:2,roomType:"100900000012",name:"\u7A7A\u4E2D\u82B1\u56ED"},{type:57,floorType:0,roomType:"100900000001",name:"\u6D0B\u5BA4"},{type:58,floorType:0,roomType:"100900000001",name:"\u548C\u5BA4"}],ru=[{type:0,description:"\u6728\u8D28\u5730\u677F"},{type:1,description:"\u74F7\u7816\u5730\u9762"},{type:2,description:"\u6237\u5916\u5730\u9762"},{type:3,description:"\u536B\u751F\u95F4\u5730\u9762"},{type:4,description:"\u9633\u53F0\u5730\u9762"},{type:5,description:"\u8F66\u5E93\u5730\u9762"}],au=[{roomType:"100900000001",description:"\u5BA4"},{roomType:"100900000002",description:"\u5385"},{roomType:"100900000003",description:"\u53A8"},{roomType:"100900000004",description:"\u536B"},{roomType:"100900000005",description:"\u9633\u53F0"},{roomType:"100900000006",description:"\u9732\u53F0"},{roomType:"100900000007",description:"\u82B1\u56ED"},{roomType:"100900000008",description:"\u50A8"},{roomType:"100900000009",description:"\u4FDD\u59C6\u95F4"},{roomType:"100900000010",description:"\u8F66\u5E93"},{roomType:"100900000011",description:"\u9601\u697C"},{roomType:"100900000012",description:"\u5176\u4ED6"},{roomType:"100900000013",description:"\u8863"},{roomType:"100900000015",description:"\u5546\u94FA"},{roomType:"100900000016",description:"\u5199\u5B57\u697C"}],Qi=(i,t,e)=>{const n=new I.Matrix4,o=new I.Euler(i,t,e,"YXZ");return n.makeRotationFromEuler(o),n},lu=(i,{scale:t,rotation:e,position:n})=>{if(t&&i.scale.set(t,t,t),e){const[o,s,r]=e;o&&i.applyMatrix4(Qi(o,0,0)),s&&i.applyMatrix4(Qi(0,s,0)),r&&i.applyMatrix4(Qi(0,0,r))}return n&&i.position.set(n.x,n.y,n.z),i};function zs(i,t){i.traverse(e=>{var n;if(e.type==="Mesh"){const o=e,s=N({map:o.material.map||{}},t);o.material=new H.MeshBasicMaterial(s),o.renderOrder=1,((n=e.parent)==null?void 0:n.type)==="Mesh"&&(e.renderOrder=e.parent.renderOrder+1)}})}const cu=(i,t)=>{var d;const e=t.fbx_url||"//vrlab-static.ljcdn.com/release/web/v3/dipan3/dipan.FBX",n=(d=t.north_rad)!=null?d:void 0,o={},s=f=>Z(this,null,function*(){var U;const u=(f==null?void 0:f.fbx_url)||e,h=(U=f==null?void 0:f.north_rad)!=null?U:n;if(typeof h!="number")throw new Error('"northRad"\u914D\u7F6E\u53C2\u6570\u7F3A\u5931\uFF1A\u672A\u914D\u7F6E\u6307\u5357\u9488\u6307\u5411\uFF01');const m=i.model.bounding,g=m.max.x-m.min.x,v=m.max.z-m.min.z,A=Math.max(g,v),w=yield new bn.FBXLoader().loadAsync(u);zs(w,{transparent:!0,side:I.DoubleSide,blending:I.AdditiveBlending});const E=[0,h-Math.PI/2,0],{model:{bounding:{max:{x:D,z:y},min:{x:L,y:x,z:O}}}}=i;o.yBase=x;const T={x:(D+L)/2,y:x-1.6,z:(y+O)/2},G=.0045*A;return lu(w,{position:T,rotation:E,scale:G}),o.object=w,!0}),r=({latitude:f})=>{if(!o.object)return;const u=a(f);u&&(o.object.position.y=u)},a=f=>{if(o.yBase===void 0)return;const u=.6;if(f>=Math.PI/4)return o.yBase-(u+1.6);const h=f*(4/Math.PI);return o.yBase-(u*h+1.6)};return{load:s,disable:()=>{!o.object||(i.scene.remove(o.object),i.needsRender=!0,i.off("cameraDirectionUpdate",r))},enable:()=>{if(!o.object)return;const f=a(i.getPose().latitude);f&&(o.object.position.y=f),i.scene.add(o.object),i.needsRender=!0,i.on("cameraDirectionUpdate",r)}}};function du(i,t){var c,d,f,u,h;const e=(c=t==null?void 0:t.size)!=null?c:512,n=(d=t==null?void 0:t.fontSize)!=null?d:e*(35/256)*1.2,o=(f=t==null?void 0:t.backgroundColor)!=null?f:"rgba(0,0,0,0)",s=(u=t==null?void 0:t.fontColor)!=null?u:"#fff",r=(h=t==null?void 0:t.textAlign)!=null?h:"center",a=document.createElement("canvas");a.setAttribute("width",e+""),a.setAttribute("height",e+"");const l=a.getContext("2d");return l.fillStyle=o,l.fillRect(0,0,e,e),l.font=`${n}px "\u5FAE\u8F6F\u96C5\u9ED1"`,l.textAlign=r,l.fillStyle=s,l.fillText(i,e/2,e*.7),new H.CanvasTexture(a)}const uu=({x:i,y:t,z:e})=>new H.Vector3(i,t,e),fu=(i,t)=>{var g,v,A;const e={},n=(g=t.animationEnabled)!=null?g:!0,o=(v=t.position)!=null?v:void 0,s=(A=t.rad)!=null?A:void 0,r=t.fbx_url||"//vrlab-image4.ljcdn.com/release/web/entryDoorMini/Anim_Door1.fbx",a=[],l=C=>Z(this,null,function*(){var O,T,G,U,P,S,j;const w=(O=C==null?void 0:C.position)!=null?O:o;if(!w)return Promise.reject("ModelEntryDoorGuidePlugin.load(): position is undefined");const E=uu(w),D=(T=C==null?void 0:C.rad)!=null?T:s,y=(G=C==null?void 0:C.fbx_url)!=null?G:r;if(e.rad=D,D===void 0)return Promise.reject(`ModelEntryDoorGuidePlugin.load(): rad is ${D}`);const L=yield new bn.FBXLoader().loadAsync(y);L.position.copy(E),L.rotation.z=D,L.scale.set(.8,.8,.8),zs(L,{transparent:!0,side:I.DoubleSide});const x=(j=(S=(P=(U=L.children)==null?void 0:U[0])==null?void 0:P.children)==null?void 0:S[3])==null?void 0:j.clone();return x?(x.material=new H.MeshBasicMaterial({transparent:!0,map:du("\u5165\u6237\u95E8")}),x.renderOrder=3,L.children[0].add(x),e.object=L,!0):Promise.reject(`ModelEntryDoorGuidePlugin.load(): textMesh is ${x}`)}),c=()=>{if(e.animation)return;if(!e.object)return console.error("ModelEntryDoorGuidePlugin.initAnimation(): state.object is ",e.object);const C=1,w=new H.AnimationMixer(e.object);a.push(w);const E=w.clipAction(e.object.animations[0]);E.timeScale=C;let D;const y=()=>{let T=0,G=0;const U=1e3/30,P=S=>{T=requestAnimationFrame(P);const j=S-G;j<U||(G=S,a.forEach(W=>W.update(j/1e3)),i.needsRender=!0)};return T=requestAnimationFrame(P),()=>{cancelAnimationFrame(T)}},O={play:()=>{D||(E.play(),D=y(),requestAnimationFrame(()=>{e.object&&e.object.rotation.z!==e.rad&&(e.object.rotation.z=e.rad)}))},stop:()=>{E.stop(),D==null||D(),D=void 0}};e.animation=O},d=C=>{var E;if(!e.object)return console.error("ModelEntryDoorGuidePlugin.enable(): object is ",e.object);((E=C==null?void 0:C.animationEnable)!=null?E:n)&&(e.animation||c(),e.animation.play()),i.scene.add(e.object),i.needsRender=!0},f=()=>{!e.object||(e.animation&&e.animation.stop(),i.scene.remove(e.object),i.needsRender=!0)},u=C=>C==="Floorplan"?d():f();return{load:l,enable:C=>(e.enabled||(e.enabled=!0,u(i.currentMode),i.on("modeChange",u),d(C)),!0),disable:()=>(e.enabled&&(e.enabled=!1,f(),i.off("modeChange",u)),!0)}};class Oi extends on.default.Tween{constructor(){super(...arguments);p(this,"disposeMethods",[]);p(this,"animationFrameDisposer");p(this,"onDispose",e=>(this.disposeMethods.push(e),this));p(this,"play",()=>(this.start(0),this.animationFrameDisposer=Un(e=>this.update(e)),this));p(this,"dispose",()=>{var e;this.stop(),(e=this.animationFrameDisposer)==null||e.call(this),this.disposeMethods.forEach(n=>n()),this.disposeMethods=[],on.default.remove(this)})}}function Ms(i,t=on.default.Easing.Linear.None){const e=new Oi({progress:0}).to({progress:1});return i!==void 0&&e.duration(i),t!==void 0&&e.easing(t),e}const pn=window.requestAnimationFrame||(i=>setTimeout(i,16)),hu=window.cancelAnimationFrame||clearTimeout;function Yn(i,t=0){t<=0?pn(i):pn(()=>Yn(i,t-1))}function Un(i,t=60){let e=-1,n=0,o=-1;const s=1e3/t;function r(a){o===-1&&(o=a),e=pn(r),!(a-n<s)&&(n=a,i&&i(a-o))}return e=pn(r),function(){hu(e)}}function mu(){const i=Date.now();return new Promise(t=>{pn(()=>{t(Date.now()-i)})})}const pu=yn.Easing;function gu(i,t,e,n=pu.Linear.None){const o=new yn.Tween(i).to(t,e).easing(n);Yn(()=>o.start(0));const s=Un(a=>{o.update(a)===!1&&s()}),r=[];return o.onDestroy=a=>(r.push(a),o),o.destroy=function(){this.stop(),Object.assign(o,{_onStartCallback:null,_onUpdateCallback:null,_onCompleteCallback:null,_onStopCallbackL:null});let a;for(;a=r.shift();)a();s()},o}function Au(i,t){return gu({progress:0},{progress:1},i,t)}var js=(i=>(i.Move="Move",i.Rotate="Rotate",i))(js||{}),et=(i=>(i.Clockwise="Clockwise",i.Anticlockwise="Anticlockwise",i.Loop="Loop",i))(et||{});const Vn=Math.PI*2;function Bs(i){return(i%Vn+Vn)%Vn}function Ts(i){return i%Vn}function Ri(i,t,e){return i+(t-i)*e}const Fi=(i,t,e)=>{const n=Math.PI,o=n*2;return i=Bs(i),t=Bs(t),e===et.Anticlockwise&&i<t&&(i+=o),e===et.Clockwise&&t<i&&(t+=o),e===et.Loop&&t-i>n?Fi(i,t,et.Anticlockwise):e===et.Loop&&i-t>n?Fi(i,t,et.Clockwise):{from:i,to:t}},vu=i=>{const t={},e=(l,c,...d)=>Z(this,[l,c,...d],function*(s,r,a={preload:!0}){return t.interruptCallback&&t.interruptCallback(!1),a.asyncStartCallback&&(yield a.asyncStartCallback()),s.mode&&s.mode!==i.currentMode&&(yield i.changeMode(s.mode)),a.preload&&s.panoIndex!==void 0&&s.panoIndex!==i.panoIndex&&(yield i.preloadPano(s.panoIndex)),a.asyncEndCallback&&(yield a.asyncEndCallback()),s.panoIndex===void 0&&s.fov===void 0&&s.latitude===void 0&&s.longitude===void 0?!0:yield new Promise((f,u)=>{const h=s.panoIndex!==void 0?s.panoIndex:i.panoIndex;h!==void 0?i.moveToPano(h,Object.assign({duration:r,moveEndCallback:()=>f(!0),moveCancelCallback:()=>u(!1)},s)):u(!1)})}),n=s=>{const r=i.state,a=Ts(r.latitude),l=Ts(s.latitude),{from:c,to:d}=Fi(r.longitude,s.longitude,s.rotation||et.Loop),f=r.fov,u=s.fov;return{from:{latitude:a,longitude:c,fov:f},to:{latitude:l,longitude:d,fov:u}}};return{move:e,rotate:(l,c,...d)=>Z(this,[l,c,...d],function*(s,r,a={}){t.interruptCallback&&t.interruptCallback(!1),a.asyncStartCallback&&(yield a.asyncStartCallback()),i.currentMode!==me.Five.Mode.Panorama&&(yield i.changeMode(me.Five.Mode.Panorama)),s.panoIndex!==void 0&&s.panoIndex!==i.panoIndex&&(a.preload&&(yield i.preloadPano(s.panoIndex)),yield new Promise((h,m)=>{if(!s.panoIndex){h(!0);return}i.moveToPano(s.panoIndex,{moveEndCallback:()=>h(!0),moveCancelCallback:()=>m(!1)})})),a.asyncEndCallback&&(yield a.asyncEndCallback());const{from:f,to:u}=n(s);return yield new Promise(h=>{const m=({progress:w})=>{const E={};E.longitude=Ri(f.longitude,u.longitude,w),E.latitude=Ri(f.latitude,u.latitude,w),E.fov=Ri(f.fov,u.fov,w),i.setState(E,!0)},g=()=>{h(!0)},v=()=>{h(!1)},A=s.rotateSpeed?Math.ceil(Math.abs(u.longitude-f.longitude)/s.rotateSpeed*1e3):r,C=Au(A,yn.Easing.Linear.None).onUpdate(m).onComplete(g).onDestroy(v);s.rotation===et.Loop&&C.repeat(1/0).yoyo(!0),t.interruptCallback=(w=!0)=>{C.destroy(),t.interruptCallback=void 0,t.timeoutId&&(clearTimeout(t.timeoutId),t.timeoutId=void 0),h(w)},t.timeoutId=setTimeout(()=>{t.interruptCallback&&t.interruptCallback(!0)},r)})})}};function Qs(i,t){return i.x===t.x&&i.y===t.y}function Os(i,t){return Math.abs(i)===1/0&&Math.abs(t)===1/0?!0:Math.abs(i-t)<.001}function Jn(i,t){return(t.y-i.y)/(t.x-i.x)}function Rs(i,t,e){const n=Jn(i[1],i[0]),o=Jn(t[1],t[0]);if(isNaN(n)||isNaN(o)||Os(n,o))return!1;if(Zn(i[0],t))return i[0];if(Zn(i[1],t))return i[1];if(Zn(t[0],i))return t[0];if(Zn(t[1],i))return t[1];if(e&&!bu(i,t))return!1;const s=i[0],r=t[0];if(Math.abs(n)===1/0)return{x:s.x,y:t[1].y-(t[1].x-s.x)*o};if(Math.abs(o)===1/0)return{x:r.x,y:i[1].y-(i[1].x-r.x)*n};const a=(r.y-s.y+n*s.x-o*r.x)/(n-o),l=n*a-n*s.x+s.y;return{x:a,y:l}}function Zn(i,t){return Qs(i,t[0])||Qs(i,t[1])?!0:(t[0].x-i.x)*(i.x-t[1].x)>=0&&(t[0].y-i.y)*(i.y-t[1].y)>=0&&Os(Jn(t[0],i),Jn(i,t[1]))}function _n(i,t,e){return(i.x-e.x)*(t.y-e.y)-(t.x-e.x)*(i.y-e.y)}function bu(i,t){return Math.max(i[0].x,i[1].x)>=Math.min(t[0].x,t[1].x)&&Math.max(t[0].x,t[1].x)>=Math.min(i[0].x,i[1].x)&&Math.max(i[0].y,i[1].y)>=Math.min(t[0].y,t[1].y)&&_n(t[0],i[1],i[0])*_n(i[1],t[1],i[0])>0&&_n(i[0],t[1],t[0])*_n(t[1],i[1],t[0])>0?1:0}function Fs(i,t=0){t<=0?requestAnimationFrame(i):requestAnimationFrame(()=>Fs(i,t-1))}const yu=`<style type="text/css">
|
|
115
|
+
`;return i.$$set=s=>{"content"in s&&e(0,n=s.content)},[n,o]}class vc extends se{constructor(t){super(),oe(this,t,Ac,gc,ie,{content:0},pc)}}function bc(i){le(i,"svelte-ozpg4a",".floorplan-plugin__base-image.svelte-ozpg4a{position:absolute;z-index:10;width:100%;height:100%;pointer-events:none}")}function yc(i){let t,e;return t=new mc({props:{url:i[1].url}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.url=n[1].url),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function wc(i){let t,e;return t=new vc({props:{content:i[0]}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.content=n[0]),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function Cc(i){let t,e,n,o;const s=[wc,yc],r=[];function a(l,c){return l[0]?0:l[1]?1:-1}return~(e=a(i))&&(n=r[e]=s[e](i)),{c(){t=Q("div"),n&&n.c(),b(t,"class","floorplan-plugin__base-image svelte-ozpg4a")},m(l,c){B(l,t,c),~e&&r[e].m(t,null),o=!0},p(l,[c]){let d=e;e=a(l),e===d?~e&&r[e].p(l,c):(n&&(fe(),M(r[d],1,1,()=>{r[d]=null}),he()),~e?(n=r[e],n?n.p(l,c):(n=r[e]=s[e](l),n.c()),k(n,1),n.m(t,null)):n=null)},i(l){o||(k(n),o=!0)},o(l){M(n),o=!1},d(l){l&&z(t),~e&&r[e].d()}}}function Pc(i,t,e){let n,o,{floorIndex:s}=t,{floorplanData:r}=t;return i.$$set=a=>{"floorIndex"in a&&e(2,s=a.floorIndex),"floorplanData"in a&&e(3,r=a.floorplanData)},i.$$.update=()=>{var a,l;i.$$.dirty&12&&e(1,n=r.outlines[s]),i.$$.dirty&12&&e(0,o=(l=(a=r.outlines)==null?void 0:a[s])==null?void 0:l.svgContent)},[o,n,s,r]}class qo extends se{constructor(t){super(),oe(this,t,Pc,Cc,ie,{floorIndex:2,floorplanData:3},bc)}}function Ic(i){le(i,"svelte-12pzct5",".floorplan-plugin__room-label-item.svelte-12pzct5{position:absolute;display:flex;flex-flow:column;align-items:center;line-height:1;color:#fff;transform:translate(-50%, -50%);white-space:nowrap;will-change:opacity;transition:opacity 300ms}.floorplan-plugin__room-size.svelte-12pzct5{opacity:0.45}")}function Ec(i){let t,e=i[4].outerHTML+"",n;return{c(){t=new Mn(!1),n=Ae(),t.a=n},m(o,s){t.m(e,o,s),B(o,n,s)},p(o,s){s&16&&e!==(e=o[4].outerHTML+"")&&t.p(e)},d(o){o&&z(n),o&&t.d()}}}function xc(i){let t,e=i[0].name+"",n,o,s,r;return{c(){t=Q("span"),n=Le(e),o=_(),s=Q("span"),r=Le(i[5]),b(t,"class","floorplan-plugin__room-name"),b(s,"class","floorplan-plugin__room-size svelte-12pzct5")},m(a,l){B(a,t,l),O(t,n),B(a,o,l),B(a,s,l),O(s,r)},p(a,l){l&1&&e!==(e=a[0].name+"")&&je(n,e),l&32&&je(r,a[5])},d(a){a&&z(t),a&&z(o),a&&z(s)}}}function kc(i){let t;function e(s,r){if(s[1]===void 0)return xc;if(s[4])return Ec}let n=e(i),o=n&&n(i);return{c(){t=Q("div"),o&&o.c(),b(t,"class","floorplan-plugin__room-label-item svelte-12pzct5"),F(t,"left",i[6]),F(t,"top",i[7]),F(t,"font-size",i[8]),F(t,"opacity",i[3]?"1":"0")},m(s,r){B(s,t,r),o&&o.m(t,null),i[16](t)},p(s,[r]){n===(n=e(s))&&o?o.p(s,r):(o&&o.d(1),o=n&&n(s),o&&(o.c(),o.m(t,null))),r&8&&F(t,"opacity",s[3]?"1":"0")},i:ne,o:ne,d(s){s&&z(t),o&&o.d(),i[16](null)}}}function Dc(i,t){const e=i[0],n=i[1];let o=!1;for(let s=0,r=t.length-1;s<t.length;r=s++){const a=t[s][0],l=t[s][1],c=t[r][0],d=t[r][1];l>n!=d>n&&e<(c-a)*(n-l)/(d-l)+a&&(o=!o)}return o}function Lc(i,t,e){let n,o,s,r,{pxmm:a}=t,{room:l}=t,{hoveredRoom:c}=t,{getRoomAreaText:d}=t,{getLabelElement:f}=t,{adaptiveRoomLabelVisibleEnable:u}=t;function h(x,R){if(R.width===0||R.height===0)return()=>!1;const T=x.path.map(({x:te,y:X})=>[te,X]),G=x.roomLabel.position,{x:U,y:P}=G,{width:S,height:j}=R,N=S/2,Y=j/2;return function(X){const V=U*X,ce=P*X,de=T.map(([Pe,ze])=>[Pe*X,ze*X]);return[[V+N,ce-Y],[V-N,ce-Y],[V-N,ce+Y],[V+N,ce+Y]].every(Pe=>Dc(Pe,de))}}const m=document.body.clientWidth,g=document.body.clientHeight,v=l.roomLabel,A=v.positionInImage.x*100+"%",C=v.positionInImage.y*100+"%",w=(m<500||g<500?10:14)/16+"rem";let E=!1,D,y;c.subscribe(function(R){e(13,E=!!R&&R.id===l.id)}),Ue(()=>{const x=D==null?void 0:D.getClientRects()[0];e(14,y={width:x.width,height:x.height})});function L(x){Be[x?"unshift":"push"](()=>{D=x,e(2,D)})}return i.$$set=x=>{"pxmm"in x&&e(9,a=x.pxmm),"room"in x&&e(0,l=x.room),"hoveredRoom"in x&&e(10,c=x.hoveredRoom),"getRoomAreaText"in x&&e(11,d=x.getRoomAreaText),"getLabelElement"in x&&e(1,f=x.getLabelElement),"adaptiveRoomLabelVisibleEnable"in x&&e(12,u=x.adaptiveRoomLabelVisibleEnable)},i.$$.update=()=>{i.$$.dirty&2049&&e(5,n=l.size?d(l.size):""),i.$$.dirty&16385&&e(15,o=y?h(l,y):void 0),i.$$.dirty&3&&e(4,s=f==null?void 0:f(l)),i.$$.dirty&45568&&e(3,r=u?E?!0:!!(o!=null&&o(a)):!0)},[l,f,D,r,s,n,A,C,w,a,c,d,u,E,y,o,L]}class Sc extends se{constructor(t){super(),oe(this,t,Lc,kc,ie,{pxmm:9,room:0,hoveredRoom:10,getRoomAreaText:11,getLabelElement:1,adaptiveRoomLabelVisibleEnable:12},Ic)}}function zc(i){le(i,"svelte-13xux0b",".floorplan-plugin__room-labels.svelte-13xux0b{width:100%;height:100%;position:absolute;left:0;top:0;z-index:20;pointer-events:none}")}function Ko(i,t,e){const n=i.slice();return n[10]=t[e],n}function $o(i){let t,e=[],n=new Map,o,s,r=i[6];const a=l=>l[10].id;for(let l=0;l<r.length;l+=1){let c=Ko(i,r,l),d=a(c);n.set(d,e[l]=es(d,c))}return{c(){t=Q("div");for(let l=0;l<e.length;l+=1)e[l].c();b(t,"class","floorplan-plugin__room-labels svelte-13xux0b"),De(()=>i[9].call(t))},m(l,c){B(l,t,c);for(let d=0;d<e.length;d+=1)e[d].m(t,null);o=ft(t,i[9].bind(t)),s=!0},p(l,c){c&111&&(r=l[6],fe(),e=Ve(e,c,a,1,l,r,n,t,lt,es,null,Ko),he())},i(l){if(!s){for(let c=0;c<r.length;c+=1)k(e[c]);s=!0}},o(l){for(let c=0;c<e.length;c+=1)M(e[c]);s=!1},d(l){l&&z(t);for(let c=0;c<e.length;c+=1)e[c].d();o()}}}function es(i,t){let e,n,o;const s=[{pxmm:t[5],room:t[10],getLabelElement:t[2],getRoomAreaText:t[1],hoveredRoom:t[0],adaptiveRoomLabelVisibleEnable:t[3]}];let r={};for(let a=0;a<s.length;a+=1)r=Ie(r,s[a]);return n=new Sc({props:r}),{key:i,first:null,c(){e=Ae(),ee(n.$$.fragment),this.first=e},m(a,l){B(a,e,l),K(n,a,l),o=!0},p(a,l){t=a;const c=l&111?Te(s,[{pxmm:t[5],room:t[10],getLabelElement:t[2],getRoomAreaText:t[1],hoveredRoom:t[0],adaptiveRoomLabelVisibleEnable:t[3]}]):{};n.$set(c)},i(a){o||(k(n.$$.fragment,a),o=!0)},o(a){M(n.$$.fragment,a),o=!1},d(a){a&&z(e),$(n,a)}}}function Mc(i){let t,e,n=i[6]&&$o(i);return{c(){n&&n.c(),t=Ae()},m(o,s){n&&n.m(o,s),B(o,t,s),e=!0},p(o,[s]){o[6]?n?(n.p(o,s),s&64&&k(n,1)):(n=$o(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(fe(),M(n,1,1,()=>{n=null}),he())},i(o){e||(k(n),e=!0)},o(o){M(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function jc(i,t,e){let n,{floorIndex:o}=t,{floorplanData:s}=t,{hoveredRoom:r}=t,{getRoomAreaText:a}=t,{getLabelElement:l}=t,{adaptiveRoomLabelVisibleEnable:c}=t,d=0,f=0;function u(){d=this.clientWidth,e(4,d)}return i.$$set=h=>{"floorIndex"in h&&e(7,o=h.floorIndex),"floorplanData"in h&&e(8,s=h.floorplanData),"hoveredRoom"in h&&e(0,r=h.hoveredRoom),"getRoomAreaText"in h&&e(1,a=h.getRoomAreaText),"getLabelElement"in h&&e(2,l=h.getLabelElement),"adaptiveRoomLabelVisibleEnable"in h&&e(3,c=h.adaptiveRoomLabelVisibleEnable)},i.$$.update=()=>{if(i.$$.dirty&384&&e(6,n=s.floorDatas[o].rooms),i.$$.dirty&272){const{max:h,min:m}=s.bounding,g=h.x-m.x;e(5,f=d/g)}},[r,a,l,c,d,f,n,o,s,u]}class Bc extends se{constructor(t){super(),oe(this,t,jc,Mc,ie,{floorIndex:7,floorplanData:8,hoveredRoom:0,getRoomAreaText:1,getLabelElement:2,adaptiveRoomLabelVisibleEnable:3},zc)}}function Tc(i){le(i,"svelte-djlmk4",".floorplan-plugin__rule-labels.svelte-djlmk4.svelte-djlmk4{position:absolute;display:flex}.floorplan-plugin__rule-labels--top.svelte-djlmk4.svelte-djlmk4{left:0;top:-1.25rem}.floorplan-plugin__rule-labels--bottom.svelte-djlmk4.svelte-djlmk4{left:0;bottom:-1.25rem}.floorplan-plugin__rule-labels--left.svelte-djlmk4.svelte-djlmk4{top:0;left:-1.25rem}.floorplan-plugin__rule-labels--right.svelte-djlmk4.svelte-djlmk4{top:0;right:-1.25rem}.floorplan-plugin__rule-line.svelte-djlmk4.svelte-djlmk4{background:#fff;opacity:0.05;width:100%;height:100%}.floorplan-plugin__rule-scale-wrapper.svelte-djlmk4.svelte-djlmk4{position:absolute;width:0.3125rem;height:100%;left:50%;top:0;transform:translateX(-50%)}.floorplan-plugin__rule-labels.is-row.svelte-djlmk4 .floorplan-plugin__rule-scale-wrapper.svelte-djlmk4{width:100%;height:0.3125rem;top:50%;left:0;transform:translateY(-50%)}.floorplan-plugin__rule-scale.svelte-djlmk4.svelte-djlmk4{position:absolute;background:#fff;opacity:0.05;width:100%;height:0.0625rem}.floorplan-plugin__rule-labels.is-row.svelte-djlmk4 .floorplan-plugin__rule-scale.svelte-djlmk4{width:0.0625rem;height:100%}.floorplan-plugin__rule-text-wrapper.svelte-djlmk4.svelte-djlmk4{position:absolute}.floorplan-plugin__rule-labels--top.svelte-djlmk4 .floorplan-plugin__rule-text-wrapper.svelte-djlmk4{width:100%;height:0;top:0.625rem}.floorplan-plugin__rule-labels--bottom.svelte-djlmk4 .floorplan-plugin__rule-text-wrapper.svelte-djlmk4{width:100%;height:0;bottom:0.625rem}.floorplan-plugin__rule-labels--left.svelte-djlmk4 .floorplan-plugin__rule-text-wrapper.svelte-djlmk4{width:0;height:100%;left:0.625rem}.floorplan-plugin__rule-labels--right.svelte-djlmk4 .floorplan-plugin__rule-text-wrapper.svelte-djlmk4{width:0;height:100%;right:0.625rem}.floorplan-plugin__rule-text-item.svelte-djlmk4.svelte-djlmk4{width:0;height:0;position:absolute;transform:rotate(90deg)}.floorplan-plugin__rule-labels.is-row.svelte-djlmk4 .floorplan-plugin__rule-text-item.svelte-djlmk4{transform:rotate(0)}.floorplan-plugin__rule-text.svelte-djlmk4.svelte-djlmk4{width:-moz-max-content;width:max-content;transform:translate(-50%, -50%);font-size:0.625rem;color:#fff;opacity:0.2}")}function ts(i,t,e){const n=i.slice();return n[11]=t[e],n[13]=e,n}function ns(i,t,e){const n=i.slice();return n[14]=t[e],n}function is(i){let t;return{c(){t=Q("div"),b(t,"class","floorplan-plugin__rule-scale svelte-djlmk4"),F(t,"left",i[14].left*100+"%"),F(t,"bottom",i[14].bottom*100+"%")},m(e,n){B(e,t,n)},p:ne,d(e){e&&z(t)}}}function os(i,t){let e,n,o=t[1](t[11].distance)+"",s,r;return{key:i,first:null,c(){e=Q("div"),n=Q("div"),s=Le(o),r=_(),b(n,"class","floorplan-plugin__rule-text svelte-djlmk4"),q(n,"is-row",t[2]),b(e,"class","floorplan-plugin__rule-text-item svelte-djlmk4"),F(e,"left",t[11].left*100+"%"),F(e,"bottom",t[11].bottom*100+"%"),this.first=e},m(a,l){B(a,e,l),O(e,n),O(n,s),O(e,r)},p(a,l){t=a,l&2&&o!==(o=t[1](t[11].distance)+"")&&je(s,o)},d(a){a&&z(e)}}}function Qc(i){let t,e,n,o,s,r,a=[],l=new Map,c,d=i[3],f=[];for(let m=0;m<d.length;m+=1)f[m]=is(ns(i,d,m));let u=i[4];const h=m=>m[13];for(let m=0;m<u.length;m+=1){let g=ts(i,u,m),v=h(g);l.set(v,a[m]=os(v,g))}return{c(){t=Q("div"),e=Q("div"),n=_(),o=Q("div");for(let m=0;m<f.length;m+=1)f[m].c();s=_(),r=Q("div");for(let m=0;m<a.length;m+=1)a[m].c();b(e,"class","floorplan-plugin__rule-line svelte-djlmk4"),b(o,"class","floorplan-plugin__rule-scale-wrapper svelte-djlmk4"),q(o,"is-row",i[2]),b(r,"class","floorplan-plugin__rule-text-wrapper svelte-djlmk4"),b(t,"class",c="floorplan-plugin__rule-labels floorplan-plugin__rule-labels--"+i[0]+" svelte-djlmk4"),q(t,"is-row",i[2]),F(t,"width",i[2]?"100%":1/16+"rem"),F(t,"height",i[2]?1/16+"rem":"100%")},m(m,g){B(m,t,g),O(t,e),O(t,n),O(t,o);for(let v=0;v<f.length;v+=1)f[v].m(o,null);O(t,s),O(t,r);for(let v=0;v<a.length;v+=1)a[v].m(r,null)},p(m,[g]){if(g&8){d=m[3];let v;for(v=0;v<d.length;v+=1){const A=ns(m,d,v);f[v]?f[v].p(A,g):(f[v]=is(A),f[v].c(),f[v].m(o,null))}for(;v<f.length;v+=1)f[v].d(1);f.length=d.length}g&22&&(u=m[4],a=Ve(a,g,h,1,m,u,l,r,Uo,os,null,ts)),g&1&&c!==(c="floorplan-plugin__rule-labels floorplan-plugin__rule-labels--"+m[0]+" svelte-djlmk4")&&b(t,"class",c),g&5&&q(t,"is-row",m[2])},i:ne,o:ne,d(m){m&&z(t),Ke(f,m);for(let g=0;g<a.length;g+=1)a[g].d()}}}const Zt=1e3,_t=180;function Oc(i,t,e){let{type:n}=t,{data:o}=t,{bounding:s}=t,{getRuleDistanceText:r}=t;const a=n==="top"||n==="bottom",l=s.max.x-s.min.x-(Zt-_t)*2,c=s.max.y-s.min.y-(Zt-_t)*2,d=o.map(([m,g])=>a?[m.x,g.x]:[m.y,g.y]).flat().sort().filter((m,g,v)=>g===0?!0:m!==v[g-1]),f=d.map(m=>{const g=a?(m-s.min.x-Zt+_t)/l:0,v=a?0:(m-s.min.y-Zt+_t)/c;return{left:g,bottom:v}});f.unshift({left:0,bottom:0}),f.push(a?{left:1,bottom:0}:{left:0,bottom:1});const u=d[d.length-1]-d[0],h=d.map((m,g,v)=>{const A=g===0?0:m-v[g-1],C=g===0?0:(m+v[g-1])/2,w=a?(C-s.min.x-Zt+_t)/l:0,E=a?0:(C-s.min.y-Zt+_t)/c;return{left:w,bottom:E,distance:A}}).filter(({distance:m})=>m/u>.1);return i.$$set=m=>{"type"in m&&e(0,n=m.type),"data"in m&&e(5,o=m.data),"bounding"in m&&e(6,s=m.bounding),"getRuleDistanceText"in m&&e(1,r=m.getRuleDistanceText)},[n,r,a,f,h,o,s]}class Rc extends se{constructor(t){super(),oe(this,t,Oc,Qc,ie,{type:0,data:5,bounding:6,getRuleDistanceText:1},Tc)}}function Fc(i){le(i,"svelte-1mzj9p3",".floorplan-plugin__rule-labels-wrapper.svelte-1mzj9p3{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);pointer-events:none}")}function ss(i,t,e){const n=i.slice();return n[13]=t[e][0],n[14]=t[e][1],n}function rs(i,t){let e,n,o;const s=[{type:t[13],data:t[14],bounding:t[1],getRuleDistanceText:t[0]}];let r={};for(let a=0;a<s.length;a+=1)r=Ie(r,s[a]);return n=new Rc({props:r}),{key:i,first:null,c(){e=Ae(),ee(n.$$.fragment),this.first=e},m(a,l){B(a,e,l),K(n,a,l),o=!0},p(a,l){t=a;const c=l&19?Te(s,[{type:t[13],data:t[14],bounding:t[1],getRuleDistanceText:t[0]}]):{};n.$set(c)},i(a){o||(k(n.$$.fragment,a),o=!0)},o(a){M(n.$$.fragment,a),o=!1},d(a){a&&z(e),$(n,a)}}}function Hc(i){let t,e=[],n=new Map,o,s=i[4];const r=a=>a[13];for(let a=0;a<s.length;a+=1){let l=ss(i,s,a),c=r(l);n.set(c,e[a]=rs(c,l))}return{c(){t=Q("div");for(let a=0;a<e.length;a+=1)e[a].c();b(t,"class","floorplan-plugin__rule-labels-wrapper svelte-1mzj9p3"),F(t,"width",i[3]),F(t,"height",i[2])},m(a,l){B(a,t,l);for(let c=0;c<e.length;c+=1)e[c].m(t,null);o=!0},p(a,[l]){l&19&&(s=a[4],fe(),e=Ve(e,l,r,1,a,s,n,t,lt,rs,null,ss),he()),l&8&&F(t,"width",a[3]),l&4&&F(t,"height",a[2])},i(a){if(!o){for(let l=0;l<s.length;l+=1)k(e[l]);o=!0}},o(a){for(let l=0;l<e.length;l+=1)M(e[l]);o=!1},d(a){a&&z(t);for(let l=0;l<e.length;l+=1)e[l].d()}}}const as=1e3,ls=180;function Gc(i,t,e){let n,o,s,r,a,l,c,d,f,u,{floorIndex:h}=t,{floorplanData:m}=t,{getRuleDistanceText:g}=t;return i.$$set=v=>{"floorIndex"in v&&e(5,h=v.floorIndex),"floorplanData"in v&&e(6,m=v.floorplanData),"getRuleDistanceText"in v&&e(0,g=v.getRuleDistanceText)},i.$$.update=()=>{i.$$.dirty&64&&e(1,n=m.bounding),i.$$.dirty&96&&e(11,o=m.floorDatas[h].rules),i.$$.dirty&2048&&e(12,s=Object.keys(o)),i.$$.dirty&6144&&e(4,r=s.map(v=>[v,o[v]])),i.$$.dirty&2&&e(9,a=n.max.x-n.min.x),i.$$.dirty&2&&e(7,l=n.max.y-n.min.y),i.$$.dirty&2&&e(10,c=n.max.x-n.min.x-(as-ls)*2),i.$$.dirty&2&&e(8,d=n.max.y-n.min.y-(as-ls)*2),i.$$.dirty&1536&&e(3,f=c/a*100+"%"),i.$$.dirty&384&&e(2,u=d/l*100+"%")},[g,n,u,f,r,h,m,l,d,a,c,o,s]}class Nc extends se{constructor(t){super(),oe(this,t,Gc,Hc,ie,{floorIndex:5,floorplanData:6,getRuleDistanceText:0},Fc)}}function Wn(i,t={}){let e="";const{needZ:n,needA:o}=t;return(n?i.slice().concat(i[0]):i.slice()).forEach((r,a)=>{const{x:l,y:c}=t.format?t.format(r):r,d=l+","+c;return a===0?(e+="M"+d,e):o!=null&&o[a]?(e+="A"+o[a]+","+d,e):(e+="L"+d,e)}),e+(n?"Z":"")}function cs({x:i,y:t},e){const{max:n,min:o}=e;return{x:i-o.x,y:n.y-t}}function Wc(i,t){const e=i.x*1e3+t.bounding.origin.x,n=-i.z*1e3+t.bounding.origin.y;return{x:e,y:n}}function Xc(i,t){const e=t.bounding,n=e.max.x-e.min.x,o=e.max.y-e.min.y;return{x:(i.x-e.min.x)/n,y:(e.max.y-i.y)/o}}function Yc(i,t){return Math.max(...t.work.observers.map(n=>i.z>=n.standingPosition.z?n.floorIndex:0))}function Uc(i){let t;return{c(){t=be("path"),b(t,"d",i[0]),b(t,"fill","#2F313A")},m(e,n){B(e,t,n)},p(e,[n]){n&1&&b(t,"d",e[0])},i:ne,o:ne,d(e){e&&z(t)}}}function Vc(i,t,e){let n,{path:o}=t;return i.$$set=s=>{"path"in s&&e(1,o=s.path)},i.$$.update=()=>{i.$$.dirty&2&&e(0,n=Wn(o,{needZ:!0}))},[n,o]}class Jc extends se{constructor(t){super(),oe(this,t,Vc,Uc,ie,{path:1})}}function Zc(i){let t,e,n,o,s,r;return{c(){t=be("defs"),e=be("pattern"),n=be("rect"),o=be("path"),s=_(),r=be("path"),b(n,"x","0"),b(n,"y","0"),b(n,"width",i[1]),b(n,"height",i[1]),b(n,"fill","#323747"),b(o,"d",i[2]),b(o,"stroke","#ffffff"),b(o,"stroke-opacity","0.06"),b(o,"stroke-width","0.5"),b(o,"fill","none"),b(e,"id","fpm-room-pattern-0"),b(e,"x","0"),b(e,"y","0"),b(e,"width",i[1]),b(e,"height",i[1]),b(e,"patternUnits","userSpaceOnUse"),b(e,"patternTransform","scale(50 50)"),b(r,"d",i[0]),b(r,"fill","url(#fpm-room-pattern-0)")},m(a,l){B(a,t,l),O(t,e),O(e,n),O(e,o),B(a,s,l),B(a,r,l)},p(a,[l]){l&1&&b(r,"d",a[0])},i:ne,o:ne,d(a){a&&z(t),a&&z(s),a&&z(r)}}}const Li=6;function _c(i,t,e){let n,{path:o}=t;const s=Li*2,r=`M0 ${Li} h ${s} M${Li} 0 v ${s}`;return i.$$set=a=>{"path"in a&&e(3,o=a.path)},i.$$.update=()=>{i.$$.dirty&8&&e(0,n=Wn(o,{needZ:!0}))},[n,s,r,o]}class qc extends se{constructor(t){super(),oe(this,t,_c,Zc,ie,{path:3})}}function Kc(i){let t,e,n,o,s,r,a,l,c,d,f;return{c(){t=be("defs"),e=be("pattern"),n=be("rect"),o=be("pattern"),s=be("rect"),r=_(),a=be("path"),l=_(),c=be("path"),d=_(),f=be("path"),b(n,"x","0"),b(n,"y","0"),b(n,"width","6"),b(n,"height","50"),b(n,"fill","none"),b(n,"stroke","#4B4B57"),b(n,"stroke-width","0.5"),b(e,"id","room-material-pattern-1"),b(e,"x","0"),b(e,"y","0"),b(e,"width","12"),b(e,"height","50"),b(e,"patternUnits","userSpaceOnUse"),b(e,"patternTransform","scale(50 50)"),b(s,"x","0"),b(s,"y","0"),b(s,"width","6"),b(s,"height","50"),b(s,"fill","none"),b(s,"stroke","#4B4B57"),b(s,"stroke-width","0.5"),b(o,"id","room-material-pattern-2"),b(o,"x","6"),b(o,"y","25"),b(o,"width","12"),b(o,"height","50"),b(o,"patternUnits","userSpaceOnUse"),b(o,"patternTransform","scale(50 50)"),b(a,"d",i[0]),b(a,"fill","#43434D"),b(c,"d",i[0]),b(c,"fill","url(#room-material-pattern-1)"),b(f,"d",i[0]),b(f,"fill","url(#room-material-pattern-2)")},m(u,h){B(u,t,h),O(t,e),O(e,n),O(t,o),O(o,s),B(u,r,h),B(u,a,h),B(u,l,h),B(u,c,h),B(u,d,h),B(u,f,h)},p(u,[h]){h&1&&b(a,"d",u[0]),h&1&&b(c,"d",u[0]),h&1&&b(f,"d",u[0])},i:ne,o:ne,d(u){u&&z(t),u&&z(r),u&&z(a),u&&z(l),u&&z(c),u&&z(d),u&&z(f)}}}function $c(i,t,e){let n,{path:o}=t;return i.$$set=s=>{"path"in s&&e(1,o=s.path)},i.$$.update=()=>{i.$$.dirty&2&&e(0,n=Wn(o,{needZ:!0}))},[n,o]}class ed extends se{constructor(t){super(),oe(this,t,$c,Kc,ie,{path:1})}}function td(i){le(i,"svelte-1dykexu",".floorplan-plugin__room-material.svelte-1dykexu{position:absolute;left:0;top:0;width:100%;height:100%}svg.svelte-1dykexu{position:absolute;left:0;top:0;width:100%;height:100%;overflow:visible}")}function ds(i,t,e){const n=i.slice();return n[5]=t[e],n}function nd(i){let t,e;return t=new qc({props:{path:i[5].path}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.path=n[5].path),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function id(i){let t,e;return t=new ed({props:{path:i[5].path}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.path=n[5].path),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function od(i){let t,e;return t=new Jc({props:{path:i[5].path}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.path=n[5].path),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function us(i){let t,e,n,o;const s=[od,id,nd],r=[];function a(l,c){return l[5].floorType===1?0:l[5].floorType===0?1:2}return e=a(i),n=r[e]=s[e](i),{c(){t=be("svg"),n.c(),b(t,"width","100%"),b(t,"height","100%"),b(t,"viewBox",`0 0 ${i[1]} ${i[2]}`),b(t,"class","svelte-1dykexu")},m(l,c){B(l,t,c),r[e].m(t,null),o=!0},p(l,c){let d=e;e=a(l),e===d?r[e].p(l,c):(fe(),M(r[d],1,1,()=>{r[d]=null}),he(),n=r[e],n?n.p(l,c):(n=r[e]=s[e](l),n.c()),k(n,1),n.m(t,null))},i(l){o||(k(n),o=!0)},o(l){M(n),o=!1},d(l){l&&z(t),r[e].d()}}}function sd(i){let t,e,n=i[0],o=[];for(let r=0;r<n.length;r+=1)o[r]=us(ds(i,n,r));const s=r=>M(o[r],1,1,()=>{o[r]=null});return{c(){t=Q("div");for(let r=0;r<o.length;r+=1)o[r].c();b(t,"class","floorplan-plugin__room-material svelte-1dykexu")},m(r,a){B(r,t,a);for(let l=0;l<o.length;l+=1)o[l].m(t,null);e=!0},p(r,[a]){if(a&7){n=r[0];let l;for(l=0;l<n.length;l+=1){const c=ds(r,n,l);o[l]?(o[l].p(c,a),k(o[l],1)):(o[l]=us(c),o[l].c(),k(o[l],1),o[l].m(t,null))}for(fe(),l=n.length;l<o.length;l+=1)s(l);he()}},i(r){if(!e){for(let a=0;a<n.length;a+=1)k(o[a]);e=!0}},o(r){o=o.filter(Boolean);for(let a=0;a<o.length;a+=1)M(o[a]);e=!1},d(r){r&&z(t),Ke(o,r)}}}function rd(i,t,e){let n,{floorIndex:o}=t,{floorplanData:s}=t;const r=s.bounding.max.x-s.bounding.min.x,a=s.bounding.max.y-s.bounding.min.y;return i.$$set=l=>{"floorIndex"in l&&e(3,o=l.floorIndex),"floorplanData"in l&&e(4,s=l.floorplanData)},i.$$.update=()=>{i.$$.dirty&24&&e(0,n=s.floorDatas[o].rooms.map(l=>pe(W({},l),{path:l.path.map(c=>cs(c,s.bounding))})))},[n,r,a,o,s]}class ad extends se{constructor(t){super(),oe(this,t,rd,sd,ie,{floorIndex:3,floorplanData:4},td)}}function ld(i){le(i,"svelte-19uvvss","path.svelte-19uvvss{opacity:0}path.svelte-19uvvss:hover{opacity:0.1}")}function cd(i){let t,e,n;return{c(){t=be("path"),b(t,"d",i[2]),b(t,"fill","#fff"),b(t,"class","svelte-19uvvss")},m(o,s){B(o,t,s),e||(n=[xe(t,"mouseenter",i[0]),xe(t,"mouseleave",i[1])],e=!0)},p:ne,i:ne,o:ne,d(o){o&&z(t),e=!1,at(n)}}}function dd(i,t,e){let{room:n}=t,{floorplanData:o}=t,{hoveredRoom:s}=t;function r(){s.set(n)}function a(){s.set(void 0)}const{bounding:l}=o,c=Wn(n.path,{needZ:!0,format:d=>cs(d,l)});return i.$$set=d=>{"room"in d&&e(3,n=d.room),"floorplanData"in d&&e(4,o=d.floorplanData),"hoveredRoom"in d&&e(5,s=d.hoveredRoom)},[r,a,c,n,o,s]}class ud extends se{constructor(t){super(),oe(this,t,dd,cd,ie,{room:3,floorplanData:4,hoveredRoom:5},ld)}}function fd(i){le(i,"svelte-1kqo6e4",".floorplan-plugin__room-highlight.svelte-1kqo6e4{position:absolute;width:100%;height:100%}svg.svelte-1kqo6e4{width:100%;height:100%;overflow:visible}")}function fs(i,t,e){const n=i.slice();return n[5]=t[e],n}function hs(i,t){let e,n,o;const s=[{room:t[5],floorplanData:t[1],hoveredRoom:t[2]}];let r={};for(let a=0;a<s.length;a+=1)r=Ie(r,s[a]);return n=new ud({props:r}),{key:i,first:null,c(){e=Ae(),ee(n.$$.fragment),this.first=e},m(a,l){B(a,e,l),K(n,a,l),o=!0},p(a,l){t=a;const c=l&7?Te(s,[{room:t[5],floorplanData:t[1],hoveredRoom:t[2]}]):{};n.$set(c)},i(a){o||(k(n.$$.fragment,a),o=!0)},o(a){M(n.$$.fragment,a),o=!1},d(a){a&&z(e),$(n,a)}}}function hd(i){let t,e,n=[],o=new Map,s,r=i[1].floorDatas[i[0]].rooms;const a=l=>l[5].id;for(let l=0;l<r.length;l+=1){let c=fs(i,r,l),d=a(c);o.set(d,n[l]=hs(d,c))}return{c(){t=Q("div"),e=be("svg");for(let l=0;l<n.length;l+=1)n[l].c();b(e,"width","100%"),b(e,"height","100%"),b(e,"viewBox",`0 0 ${i[3]} ${i[4]}`),b(e,"class","svelte-1kqo6e4"),b(t,"class","floorplan-plugin__room-highlight svelte-1kqo6e4")},m(l,c){B(l,t,c),O(t,e);for(let d=0;d<n.length;d+=1)n[d].m(e,null);s=!0},p(l,[c]){c&7&&(r=l[1].floorDatas[l[0]].rooms,fe(),n=Ve(n,c,a,1,l,r,o,e,lt,hs,null,fs),he())},i(l){if(!s){for(let c=0;c<r.length;c+=1)k(n[c]);s=!0}},o(l){for(let c=0;c<n.length;c+=1)M(n[c]);s=!1},d(l){l&&z(t);for(let c=0;c<n.length;c+=1)n[c].d()}}}function md(i,t,e){let{floorIndex:n}=t,{floorplanData:o}=t,{hoveredRoom:s}=t;const r=o.bounding.max.x-o.bounding.min.x,a=o.bounding.max.y-o.bounding.min.y;return i.$$set=l=>{"floorIndex"in l&&e(0,n=l.floorIndex),"floorplanData"in l&&e(1,o=l.floorplanData),"hoveredRoom"in l&&e(2,s=l.hoveredRoom)},[n,o,s,r,a]}class ms extends se{constructor(t){super(),oe(this,t,md,hd,ie,{floorIndex:0,floorplanData:1,hoveredRoom:2},fd)}}function pd(i){le(i,"svelte-bl8zrz",".floorplan-plugin__floor.svelte-bl8zrz{position:absolute;left:0;top:0;width:100%;height:100%;opacity:0;pointer-events:none}.floorplan-plugin__floor--is-current.svelte-bl8zrz{opacity:1;pointer-events:auto}")}function ps(i){let t,e;const n=[{floorIndex:i[1],floorplanData:i[5],hoveredRoom:i[10]}];let o={};for(let s=0;s<n.length;s+=1)o=Ie(o,n[s]);return t=new ms({props:o}),{c(){ee(t.$$.fragment)},m(s,r){K(t,s,r),e=!0},p(s,r){const a=r&1058?Te(n,[{floorIndex:s[1],floorplanData:s[5],hoveredRoom:s[10]}]):{};t.$set(a)},i(s){e||(k(t.$$.fragment,s),e=!0)},o(s){M(t.$$.fragment,s),e=!1},d(s){$(t,s)}}}function gs(i){let t,e;const n=[{floorplanData:i[5],floorIndex:i[1],getRoomAreaText:i[6],getLabelElement:i[7],hoveredRoom:i[10],adaptiveRoomLabelVisibleEnable:i[9]}];let o={};for(let s=0;s<n.length;s+=1)o=Ie(o,n[s]);return t=new Bc({props:o}),{c(){ee(t.$$.fragment)},m(s,r){K(t,s,r),e=!0},p(s,r){const a=r&1762?Te(n,[{floorplanData:s[5],floorIndex:s[1],getRoomAreaText:s[6],getLabelElement:s[7],hoveredRoom:s[10],adaptiveRoomLabelVisibleEnable:s[9]}]):{};t.$set(a)},i(s){e||(k(t.$$.fragment,s),e=!0)},o(s){M(t.$$.fragment,s),e=!1},d(s){$(t,s)}}}function As(i){let t,e;const n=[{floorplanData:i[5],floorIndex:i[1],getRuleDistanceText:i[8]}];let o={};for(let s=0;s<n.length;s+=1)o=Ie(o,n[s]);return t=new Nc({props:o}),{c(){ee(t.$$.fragment)},m(s,r){K(t,s,r),e=!0},p(s,r){const a=r&290?Te(n,[{floorplanData:s[5],floorIndex:s[1],getRuleDistanceText:s[8]}]):{};t.$set(a)},i(s){e||(k(t.$$.fragment,s),e=!0)},o(s){M(t.$$.fragment,s),e=!1},d(s){$(t,s)}}}function gd(i){let t,e,n,o,s,r,a,l,c;const d=[{floorIndex:i[1],floorplanData:i[5]}];let f={};for(let A=0;A<d.length;A+=1)f=Ie(f,d[A]);e=new ad({props:f});let u=i[2]&&ps(i);const h=[{floorplanData:i[5],floorIndex:i[1]}];let m={};for(let A=0;A<h.length;A+=1)m=Ie(m,h[A]);s=new qo({props:m});let g=i[3]&&gs(i),v=i[4]&&As(i);return{c(){t=Q("div"),ee(e.$$.fragment),n=_(),u&&u.c(),o=_(),ee(s.$$.fragment),r=_(),g&&g.c(),a=_(),v&&v.c(),b(t,"class",l=Oe(`floorplan-plugin__floor${i[0]?" floorplan-plugin__floor--is-current":""}`)+" svelte-bl8zrz")},m(A,C){B(A,t,C),K(e,t,null),O(t,n),u&&u.m(t,null),O(t,o),K(s,t,null),O(t,r),g&&g.m(t,null),O(t,a),v&&v.m(t,null),c=!0},p(A,[C]){const w=C&34?Te(d,[{floorIndex:A[1],floorplanData:A[5]}]):{};e.$set(w),A[2]?u?(u.p(A,C),C&4&&k(u,1)):(u=ps(A),u.c(),k(u,1),u.m(t,o)):u&&(fe(),M(u,1,1,()=>{u=null}),he());const E=C&34?Te(h,[{floorplanData:A[5],floorIndex:A[1]}]):{};s.$set(E),A[3]?g?(g.p(A,C),C&8&&k(g,1)):(g=gs(A),g.c(),k(g,1),g.m(t,a)):g&&(fe(),M(g,1,1,()=>{g=null}),he()),A[4]?v?(v.p(A,C),C&16&&k(v,1)):(v=As(A),v.c(),k(v,1),v.m(t,null)):v&&(fe(),M(v,1,1,()=>{v=null}),he()),(!c||C&1&&l!==(l=Oe(`floorplan-plugin__floor${A[0]?" floorplan-plugin__floor--is-current":""}`)+" svelte-bl8zrz"))&&b(t,"class",l)},i(A){c||(k(e.$$.fragment,A),k(u),k(s.$$.fragment,A),k(g),k(v),c=!0)},o(A){M(e.$$.fragment,A),M(u),M(s.$$.fragment,A),M(g),M(v),c=!1},d(A){A&&z(t),$(e),u&&u.d(),$(s),g&&g.d(),v&&v.d()}}}function Ad(i,t,e){let{isCurrent:n}=t,{floorIndex:o}=t,{hoverEnable:s}=t,{roomLabelsEnable:r}=t,{ruleLabelsEnable:a}=t,{floorplanData:l}=t,{getRoomAreaText:c}=t,{getLabelElement:d}=t,{getRuleDistanceText:f}=t,{adaptiveRoomLabelVisibleEnable:u}=t;const h=Di(void 0);return i.$$set=m=>{"isCurrent"in m&&e(0,n=m.isCurrent),"floorIndex"in m&&e(1,o=m.floorIndex),"hoverEnable"in m&&e(2,s=m.hoverEnable),"roomLabelsEnable"in m&&e(3,r=m.roomLabelsEnable),"ruleLabelsEnable"in m&&e(4,a=m.ruleLabelsEnable),"floorplanData"in m&&e(5,l=m.floorplanData),"getRoomAreaText"in m&&e(6,c=m.getRoomAreaText),"getLabelElement"in m&&e(7,d=m.getLabelElement),"getRuleDistanceText"in m&&e(8,f=m.getRuleDistanceText),"adaptiveRoomLabelVisibleEnable"in m&&e(9,u=m.adaptiveRoomLabelVisibleEnable)},[n,o,s,r,a,l,c,d,f,u,h]}class vd extends se{constructor(t){super(),oe(this,t,Ad,gd,ie,{isCurrent:0,floorIndex:1,hoverEnable:2,roomLabelsEnable:3,ruleLabelsEnable:4,floorplanData:5,getRoomAreaText:6,getLabelElement:7,getRuleDistanceText:8,adaptiveRoomLabelVisibleEnable:9},pd)}}function bd(i){le(i,"svelte-86bqav",".floorplan-main.svelte-86bqav{width:100%;height:100%;pointer-events:none}")}function vs(i,t,e){const n=i.slice();return n[16]=t[e],n}function bs(i){let t,e,n,o,s,r,a=i[9].floorDatas,l=[];for(let h=0;h<a.length;h+=1)l[h]=ys(vs(i,a,h));const c=h=>M(l[h],1,1,()=>{l[h]=null}),d=[{panoIndex:i[3],floorplanData:i[9],lastPanoramaLongitude:i[10],cameraImageUrl:i[11]}];let f={};for(let h=0;h<d.length;h+=1)f=Ie(f,d[h]);n=new ic({props:f});let u=i[6]&&ws(i);return{c(){t=Q("div");for(let h=0;h<l.length;h+=1)l[h].c();e=_(),ee(n.$$.fragment),o=_(),u&&u.c(),b(t,"class","floorplan-main svelte-86bqav")},m(h,m){B(h,t,m);for(let g=0;g<l.length;g+=1)l[g].m(t,null);O(t,e),K(n,t,null),O(t,o),u&&u.m(t,null),r=!0},p(h,m){if(i=h,m&62384){a=i[9].floorDatas;let v;for(v=0;v<a.length;v+=1){const A=vs(i,a,v);l[v]?(l[v].p(A,m),k(l[v],1)):(l[v]=ys(A),l[v].c(),k(l[v],1),l[v].m(t,e))}for(fe(),v=a.length;v<l.length;v+=1)c(v);he()}const g=m&3592?Te(d,[{panoIndex:i[3],floorplanData:i[9],lastPanoramaLongitude:i[10],cameraImageUrl:i[11]}]):{};n.$set(g),i[6]?u?(u.p(i,m),m&64&&k(u,1)):(u=ws(i),u.c(),k(u,1),u.m(t,null)):u&&(fe(),M(u,1,1,()=>{u=null}),he())},i(h){if(!r){for(let m=0;m<a.length;m+=1)k(l[m]);k(n.$$.fragment,h),k(u),s||De(()=>{s=zt(t,Mt,{duration:i[0],easing:Xt}),s.start()}),r=!0}},o(h){l=l.filter(Boolean);for(let m=0;m<l.length;m+=1)M(l[m]);M(n.$$.fragment,h),M(u),r=!1},d(h){h&&z(t),Ke(l,h),$(n),u&&u.d()}}}function ys(i){let t,e;const n=[{hoverEnable:i[5],floorplanData:i[9],getRoomAreaText:i[12],getLabelElement:i[13],getRuleDistanceText:i[14],roomLabelsEnable:i[7],ruleLabelsEnable:i[8],adaptiveRoomLabelVisibleEnable:i[15]},{floorIndex:i[16].floorIndex},{isCurrent:i[16].floorIndex===i[4]}];let o={};for(let s=0;s<n.length;s+=1)o=Ie(o,n[s]);return t=new vd({props:o}),{c(){ee(t.$$.fragment)},m(s,r){K(t,s,r),e=!0},p(s,r){const a=r&62384?Te(n,[r&62368&&{hoverEnable:s[5],floorplanData:s[9],getRoomAreaText:s[12],getLabelElement:s[13],getRuleDistanceText:s[14],roomLabelsEnable:s[7],ruleLabelsEnable:s[8],adaptiveRoomLabelVisibleEnable:s[15]},r&512&&{floorIndex:s[16].floorIndex},r&528&&{isCurrent:s[16].floorIndex===s[4]}]):{};t.$set(a)},i(s){e||(k(t.$$.fragment,s),e=!0)},o(s){M(t.$$.fragment,s),e=!1},d(s){$(t,s)}}}function ws(i){let t,e;return t=new dc({props:{floorplanData:i[9],northDesc:i[2]}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&512&&(s.floorplanData=n[9]),o&4&&(s.northDesc=n[2]),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function yd(i){let t,e,n=i[1]&&bs(i);return{c(){n&&n.c(),t=Ae()},m(o,s){n&&n.m(o,s),B(o,t,s),e=!0},p(o,[s]){o[1]?n?(n.p(o,s),s&2&&k(n,1)):(n=bs(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(fe(),M(n,1,1,()=>{n=null}),he())},i(o){e||(k(n),e=!0)},o(o){M(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function wd(i,t,e){let{duration:n=0}=t,{visible:o}=t,{northDesc:s}=t,{panoIndex:r}=t,{floorIndex:a}=t,{hoverEnable:l}=t,{compassEnable:c}=t,{roomLabelsEnable:d}=t,{ruleLabelsEnable:f}=t,{floorplanData:u}=t,{lastPanoramaLongitude:h}=t,{cameraImageUrl:m}=t,{getRoomAreaText:g}=t,{getLabelElement:v}=t,{getRuleDistanceText:A}=t,{adaptiveRoomLabelVisibleEnable:C}=t;return i.$$set=w=>{"duration"in w&&e(0,n=w.duration),"visible"in w&&e(1,o=w.visible),"northDesc"in w&&e(2,s=w.northDesc),"panoIndex"in w&&e(3,r=w.panoIndex),"floorIndex"in w&&e(4,a=w.floorIndex),"hoverEnable"in w&&e(5,l=w.hoverEnable),"compassEnable"in w&&e(6,c=w.compassEnable),"roomLabelsEnable"in w&&e(7,d=w.roomLabelsEnable),"ruleLabelsEnable"in w&&e(8,f=w.ruleLabelsEnable),"floorplanData"in w&&e(9,u=w.floorplanData),"lastPanoramaLongitude"in w&&e(10,h=w.lastPanoramaLongitude),"cameraImageUrl"in w&&e(11,m=w.cameraImageUrl),"getRoomAreaText"in w&&e(12,g=w.getRoomAreaText),"getLabelElement"in w&&e(13,v=w.getLabelElement),"getRuleDistanceText"in w&&e(14,A=w.getRuleDistanceText),"adaptiveRoomLabelVisibleEnable"in w&&e(15,C=w.adaptiveRoomLabelVisibleEnable)},[n,o,s,r,a,l,c,d,f,u,h,m,g,v,A,C]}class Si extends se{constructor(t){super(),oe(this,t,wd,yd,ie,{duration:0,visible:1,northDesc:2,panoIndex:3,floorIndex:4,hoverEnable:5,compassEnable:6,roomLabelsEnable:7,ruleLabelsEnable:8,floorplanData:9,lastPanoramaLongitude:10,cameraImageUrl:11,getRoomAreaText:12,getLabelElement:13,getRuleDistanceText:14,adaptiveRoomLabelVisibleEnable:15},bd)}}const Cd="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC0AAAAwCAYAAACFUvPfAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAALaADAAQAAAABAAAAMAAAAADe2FZjAAAEF0lEQVRoBe2WzWskRRiHf13V092TxI2oEzYeVDwITtyDuCiihwiCePGgxIM3vYgHL4J4UIhBRA8i/gPqyUvWg7AiIuIeloDiYUHJLOK6BPwIk9n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UejGUQNLMbAmTdWY1rKBLW3aTJqBZ7nZkb36DhYCreeYHbMUXHvaYi5XDK70EcgulmRjm77wNtenzuXCbmnTRaAx493rbGf3Jr/njMzj920CnKdUaFCjlDioy7NYNvOdGrQJNgI32/L2tkXfFPlxgToqjWVhD6KdLnQRdARf/HHQz2r2X2Gqy8pAZaAyUBmoDFQGKgP/q4F/AJYg9/s0ZoABAAAAAElFTkSuQmCC";function Pd(i){return Z(this,null,function*(){const t=new Headers({"Content-Type":"text/plain"}),e=function(o){return Z(this,null,function*(){const s={index:o.index,url:o.url,svgUrl:o.svg_url};if(o.svg_url){const r=yield fetch(o.svg_url,{headers:t}).then(a=>a.text());s.svgContent=r}return s})};return yield Promise.all(i.map(e))})}function Id(i){return{id:i.id,size:i.size,name:i.name,path:i.path,roomType:i.room_type,floorType:i.floor_type,roomLabel:{position:i.room_label.position,positionInImage:i.room_label.position_in_image},observerIndexs:i.observer_indexs}}function Ed(i){return{floorName:i.floor_name,floorIndex:i.floor_index,rooms:i.rooms.map(Id),rules:i.rules}}function xd(i){return{index:i.index,floorIndex:i.floor_index,position:i.position,positionInImage:i.position_in_image}}function kd(i){return{rad:i.rad,position:i.position,positionInImage:i.position_in_image,northRad:i.north_rad,roomId:i.room_id,floorIndex:i.floor_index}}function At(i){return Z(this,null,function*(){const t=yield Pd(i.outlines),e=i.computed_data.bounding,n=i.computed_data.floor_datas.map(Ed),o=i.computed_data.entrance?kd(i.computed_data.entrance):null;return{outlines:t,entrance:o,bounding:e,floorDatas:n,observers:i.computed_data.observers.map(xd)}})}function Dd(i,t,e){return i.map(o=>{const s=o.position,r=o.icon?o.icon:{url:Cd,width:45,height:48},a=Yc(s,t),l=Wc(s,e),c=Xc(l,e);return{floorIndex:a,icon:r,id:o.id,position:l,positionInImage:c}})}function Ld(i,t){return t(i),i}function Xn(i,t){return Ld({},e=>{for(const n in i)t.indexOf(n)===-1&&(e[n]=i[n])})}function Cs(i,t){const e=Math.max(...i.work.observers.map(n=>n.floorIndex));return t>e?i.model.bounding.max.y:Math.max(...i.work.observers.filter(n=>n.floorIndex===t).map(n=>n.standingPosition.y))}function zi(i,t,e=pt.BOUNDING_CENTER){const n=Cs(i,t),o=Cs(i,t+1);return e===pt.BOUNDING_CENTER?(i.model.bounding.max.y+i.model.bounding.min.y)/2:e===pt.CEILING?o:n}function Mi(i,t,e,n){const o=zi(i,e,n==null?void 0:n.attachedTo),s=new I.Vector3(0,o,0),r=new I.Vector3(1,o,0),a=s.clone().project(i.camera),l=r.clone().project(i.camera);return Math.abs((l.x-a.x)/1e3)*(t.getBoundingClientRect().width/2)}class Yn{constructor(t,e){p(this,"five");p(this,"hooks",new ln);p(this,"staticPrefix","//vrlab-static.ljcdn.com");this.five=t,e!=null&&e.staticPrefix&&(this.staticPrefix=e.staticPrefix)}getCurrentState(){return this.state}}class jt extends Yn{}var Ne=(i=>(i.UnknownError="UnknownError",i.DataNotLoaded="DataNotLoaded",i.BreakOffByHide="BreakOffByHide",i.BreakOffByDisable="BreakOffByDisable",i.ModelNotLoaded="ModelNotLoaded",i.ChangeModeError="ChangeModeError",i.UpdateCameraError="UpdateCameraError",i))(Ne||{});const Ps=500,Sd=80;function ji(i,t,e=4){return Math.floor(i*Math.pow(10,e))===Math.floor(t*Math.pow(10,e))}function Is(i,t){return Z(this,null,function*(){yield new Promise((e,n)=>{i.changeMode(...t).catch(o=>n(o)),i.once("initAnimationEnded",()=>{const o=i.getCurrentState(),s=t[0];o.mode!==s&&n(new Error("mode \u4E0E\u9884\u671F\u4E0D\u7B26")),(()=>{const l=t[1];return l?Object.keys(l).every(c=>{const d=o[c];if(d===void 0)return!0;const f=l[c];return typeof d=="number"&&typeof f=="number"?ji(d,f,2):d===f}):!0})()||n(new Error("five pose \u4E0E\u9884\u671F\u4E0D\u7B26")),e()})})})}function Bi(i,t){if(i.currentMode!==t.mode)return!1;const{latitude:e,longitude:n,fov:o}=t,{latitude:s,longitude:r}=i.getCurrentState(),a=i.camera.fov;return!(!ji(e,s,2)||!ji(n,r,2)||o!==a)}function Es(i,t,e=!0){return Z(this,null,function*(){if(Bi(i,t)===!0)return;const o=i.getCurrentState();if(o.mode!==t.mode){const[d]=yield Fn(Is(i,[t.mode,t,void 0,e]));if(d)throw new Error(Ne.ChangeModeError);return}const{latitude:s,longitude:r,fov:a}=o,l=Math.min(1e3,Math.max(200,Math.abs(s-Math.PI/2)*1e3,(r>Math.PI?2*Math.PI-r:r)*500,Math.abs(a-t.fov)*10)),[c]=yield Fn(i.updateCamera(t,l,e));if(c)throw new Error(Ne.UpdateCameraError)})}function qt(i,t,e=300){const n=i.getElement();!n||(n.style.opacity=t+"",n.style.transition=e===0?"none":`opacity ${e}ms linear`,e!==0&&Promise.race([new Promise(o=>n.addEventListener("transitionend",o,{once:!0})),new Promise(o=>setTimeout(o,e))]).then(()=>{n.style.transition="none"}))}function zd(i){const{latitude:t,longitude:e}=i,n=Math.abs(t-Math.PI/2)>5*Math.PI/180,o=e>5*(Math.PI/180)&&e<355*(Math.PI/180);return n||o}function Md(i){const{latitude:t,longitude:e}=i,n=Math.abs(t-Math.PI/2)<10*Math.PI/180,o=e<30*(Math.PI/180)||e>330*(Math.PI/180);return n&&o}class jd extends jt{constructor(e,n){var a;super(e);p(this,"name","modelFloorplanPlugin");p(this,"state");p(this,"data");p(this,"showState");p(this,"showPromise");p(this,"app");p(this,"panoIndex",0);p(this,"floorIndex",0);p(this,"selector");p(this,"showRejection");p(this,"wrapper");p(this,"container",document.createElement("div"));p(this,"lastPanoramaLongitude",0);p(this,"size",{width:0,height:0});p(this,"hasAddedEventListener",!1);p(this,"isHiddenByHideFunc",!1);p(this,"dispose",()=>{var e,n;this.removeEventListener(),(e=this.app)==null||e.$destroy(),this.app=void 0,(n=this.container)==null||n.remove(),this.data=void 0,this.wrapper=void 0,this.selector=void 0,this.hooks.emit("dispose")});p(this,"show",(...n)=>Z(this,[...n],function*(e={}){if(!this.state.enabled||!this.showPromise&&this.state.visible)return;const o=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!0},o),this._show(e)}));p(this,"hide",(...n)=>Z(this,[...n],function*(e={}){!this.state.enabled||(this.isHiddenByHideFunc=!0,this.state.visible!==!1&&(this.updateState({visible:!1},e.userAction||!0),this._hide(e)))}));p(this,"updateSize",()=>{if(!this.data||!Bi(this.five,this.showState)||!this.container||!this.wrapper)return;const{min:e,max:n}=this.data.bounding,o=n.x-e.x,s=n.y-e.y,r=this.state.config.attachedTo?{attachedTo:this.state.config.attachedTo}:void 0,a=Mi(this.five,this.wrapper,this.floorIndex,r),l=Math.ceil(o*a),c=Math.ceil(s*a);this.size.width===l&&this.size.height===c||(this.container.style.width=l+"px",this.container.style.height=c+"px",this.size={width:l,height:c})});p(this,"_disable",e=>{var o,s,r;const{userAction:n}=e;this.hooks.emit("disable",{userAction:n}),(o=this.showRejection)==null||o.call(this,Ne.BreakOffByDisable),this.showPromise=void 0,(s=this.app)==null||s.$destroy(),this.app=void 0,(r=this.container)==null||r.remove(),this.removeEventListener()});p(this,"_enable",e=>{const{userAction:n}=e;this.addEventListener(),this.wrapper&&(this.wrapper.append(this.container),this.hooks.emit("enable",{userAction:n}),this.state.visible&&this._show({userAction:n}))});p(this,"_show",e=>Z(this,null,function*(){var r;if(!this.state.enabled)return;if(!((r=this.five.model)!=null&&r.loaded))throw new Error(Ne.ModelNotLoaded);if(!this.data)throw new Error(Ne.DataNotLoaded);this.isHiddenByHideFunc=!1;const n={floorIndex:this.floorIndex,modelOpacity:this.state.config.modelOpacity,immediately:!1,isAutoShow:!1,userAction:!0},o=W(W({},n),e),s=()=>Z(this,null,function*(){this.hooks.emit("show",{userAction:o.userAction,auto:o.isAutoShow});let a=!1,l;this.showRejection=u=>{a=!0,l=u};const[c]=yield Fn(Es(this.five,this.showState,o.userAction));if(c)throw c;if(a)throw l?new Error(l):new Error(Ne.UnknownError);this.updateSize(),this.floorIndex=o.floorIndex,this.five.model.show(this.floorIndex);const d=o.modelOpacity,f=o.immediately?0:Ps;qt(this.five,d,f),this.render(f)});return this.showPromise=s().then(()=>{this.hooks.emit("showAnimationEnded",{auto:o.isAutoShow,userAction:o.userAction})}).catch(a=>{if(this.updateState({visible:!1},o.userAction),!o.isAutoShow&&a instanceof Error)throw a}).finally(()=>{this.showPromise=void 0,this.showRejection=void 0}),this.showPromise}));p(this,"_hide",e=>{var s;(s=this.showRejection)==null||s.call(this,Ne.BreakOffByHide),this.showPromise=void 0;const o=W(W({},{userAction:!0,isAutoHide:!1}),e);qt(this.five,1,0),this.hooks.emit("hide",{auto:o.isAutoHide,userAction:o.userAction}),this.render()});p(this,"handleClick",()=>{if(!this.state.visible)return;if(this.hooks.emit("click"))return!1});p(this,"onFiveModelLoaded",()=>{if(this.state.enabled===!1||this.wrapper||!this.selector)return;const e=this.selector instanceof Element?this.selector:document.querySelector(this.selector);if(!e)throw new Error("\u4E0D\u6B63\u786E\u7684\u7236\u5BB9\u5668\u9009\u62E9\u5668");this.wrapper=e,e.append(this.container)});p(this,"onFiveModeChange",e=>{e!==this.showState.mode&&(this.updateState({visible:!1},!1),this._hide({userAction:!1}))});p(this,"onFiveInteriaPan",(e,n)=>{if(!n||this.state.config.autoShowEnable===!1||this.isHiddenByHideFunc)return;const o=this.five.getCurrentState();o.mode==="Floorplan"&&(this.state.visible||Md(o)&&(this.updateState({visible:!0},!0),this._show({isAutoShow:!0})))});p(this,"onFivePanoArrived",e=>{var n;!((n=this.five)!=null&&n.work)||(this.panoIndex=e,this.floorIndex=this.five.work.observers[e].floorIndex)});p(this,"onFiveCameraUpdate",(e,n)=>{if(!this.state.visible||this.showPromise)return;const o=this.five.getCurrentState();zd(o)&&(this.updateState({visible:!1},n),this._hide({userAction:n,isAutoHide:!0}))});p(this,"onFiveWantsGesture",(e,n)=>{if(!!this.state.visible&&(n.length>1||e==="mouseWheel"))return!1});p(this,"onFiveWantsPanGesture",(e,n)=>{if(this.five.getCurrentState().mode==="Floorplan"&&this.state.config.autoShowEnable!==!1&&n&&this.state.visible)return this.five.updateCamera(this.showState,0),!1});p(this,"onFiveWantsTapGesture",()=>this.handleClick());p(this,"onFiveWantsChangeMode",(e,n)=>{n==="Panorama"&&e==="Floorplan"&&(this.lastPanoramaLongitude=this.five.getCurrentState().longitude)});p(this,"onModelShownFloorChange",e=>{if(this.floorIndex!==e){if(e===null){const n=this.five.getCurrentState().panoIndex;this.floorIndex=this.five.work.observers[n].floorIndex;return}this.floorIndex=e,this.updateSize(),this.render()}});n!=null&&n.selector&&(this.selector=n.selector,console.warn("\u4E0D\u63A8\u8350\u7EE7\u7EED\u4F7F\u7528 params.selector \u914D\u7F6E\u7236\u5BB9\u5668\uFF0C\u8BF7\u4F7F\u7528 appendTo \u65B9\u6CD5")),this.showState={mode:"Floorplan",longitude:0,latitude:Math.PI/2,fov:Sd/((a=n==null?void 0:n.scale)!=null?a:1)};const o={northDesc:"\u5317",modelOpacity:1,hoverEnable:!0,compassEnable:!0,autoShowEnable:!0,ruleLabelsEnable:!0,roomLabelsEnable:!0,adaptiveRoomLabelVisibleEnable:!0,cameraImageUrl:gt,attachedTo:pt.BOUNDING_CENTER,getLabelElement:void 0,getRoomAreaText:l=>(l/1e6).toFixed(1)+"\u33A1",getRuleDistanceText:l=>l.toString()},s=n?Xn(n,["selector","scale"]):{},r=W(W({},o),s);this.state={enabled:!0,visible:!1,config:r},this.initContainer(),e.model.loaded?this.onFiveModelLoaded():e.once("modelLoaded",this.onFiveModelLoaded),e.once("dispose",this.dispose),this.addEventListener()}load(e,n,o=!0){return Z(this,null,function*(){function s(d){return Object.prototype.hasOwnProperty.apply(d,["version"])}const r=e;r&&!r.version&&console.warn("\u4F20\u5165 serverData.data \u7684\u65B9\u5F0F\u540E\u7EED\u53EF\u80FD\u4E0D\u518D\u652F\u6301\uFF0C\u8BF7\u628A serverData \u6574\u4F53\u4F20\u5165 load \u51FD\u6570");const a=JSON.parse(JSON.stringify(e)),l=s(a)?a.data:a,c=this.data;this.data=yield At(l),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,c),n&&this.updateState(n,o),this.render()})}appendTo(e){if(this.wrapper=e,!!this.state.enabled)return e.appendChild(this.container),this.render(),this}enable(e={}){if(this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!0},e.userAction||n),this._enable({userAction:n})}disable(e={}){if(!this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!1},e.userAction||n),this._disable({userAction:n})}setState(e,n={}){const o=this.state,s=n.userAction!==void 0?n.userAction:!0;if(this.updateState(e,s),e.enabled!==void 0&&o.enabled!==e.enabled&&(e.enabled?this._enable({userAction:s}):this._disable({userAction:s})),e.visible!==void 0&&o.visible!==e.visible){const r={userAction:s};e.visible?this._show(r):this._hide(r)}this.render()}changeConfigs(e,n=!0){this.updateState({config:e},n),this.render()}formatData(e){return Z(this,null,function*(){return yield At(e.data)})}updateState(e,n){const o=this.state,s=e.config?W(W({},o.config),e.config):o.config;this.state=pe(W(W({},this.state),e),{config:s}),!$e(this.state,o,{deep:!0})&&this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:n})}initContainer(){this.container.classList.add("floorplan-plugin"),Object.assign(this.container.style,{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",zIndex:10,pointerEvents:"none"}),this.five.addExtraElement(this.container)}addEventListener(){if(!this.state.enabled||this.hasAddedEventListener)return;const e=this.five;e.on("modeChange",this.onFiveModeChange),e.on("interiaPan",this.onFiveInteriaPan),e.on("panoArrived",this.onFivePanoArrived),e.on("cameraUpdate",this.onFiveCameraUpdate),e.on("wantsGesture",this.onFiveWantsGesture),e.on("wantsPanGesture",this.onFiveWantsPanGesture),e.on("wantsTapGesture",this.onFiveWantsTapGesture),e.on("wantsChangeMode",this.onFiveWantsChangeMode),e.on("modelShownFloorChange",this.onModelShownFloorChange)}removeEventListener(){const e=this.five;this.hasAddedEventListener=!1,e.off("modelLoaded",this.onFiveModelLoaded),e.off("modeChange",this.onFiveModeChange),e.off("interiaPan",this.onFiveInteriaPan),e.off("panoArrived",this.onFivePanoArrived),e.off("cameraUpdate",this.onFiveCameraUpdate),e.off("wantsGesture",this.onFiveWantsGesture),e.off("wantsPanGesture",this.onFiveWantsPanGesture),e.off("wantsTapGesture",this.onFiveWantsTapGesture),e.off("wantsChangeMode",this.onFiveWantsChangeMode),e.off("modelShownFloorChange",this.onModelShownFloorChange)}render(e){if(!this.state.enabled||!this.container||!this.data||this.size.width===0)return;const n=pe(W({},this.state.config),{visible:this.state.visible,duration:e!=null?e:0,panoIndex:this.panoIndex,floorIndex:this.floorIndex,floorplanData:this.data,lastPanoramaLongitude:this.lastPanoramaLongitude});if(this.app)return this.app.$set(n);this.app=new Si({target:this.container,intro:!0,props:n})}}const Bd=(i,t)=>new jd(i,t);function Td(i){const{latitude:t,longitude:e}=i,n=Math.abs(t-Math.PI/2)>5*Math.PI/180,o=e>5*(Math.PI/180)&&e<355*(Math.PI/180);return n||o}function Qd(i){const{latitude:t,longitude:e}=i,n=Math.abs(t-Math.PI/2)<10*Math.PI/180,o=e<30*(Math.PI/180)||e>330*(Math.PI/180);return n&&o}class Od extends jt{constructor(e,n){super(e);p(this,"name","modelFloorplanPlugin");p(this,"state");p(this,"data");p(this,"showState");p(this,"showPromise");p(this,"app");p(this,"panoIndex",0);p(this,"floorIndex",0);p(this,"selector");p(this,"showRejection");p(this,"wrapper");p(this,"container",document.createElement("div"));p(this,"lastPanoramaLongitude",0);p(this,"size",{width:0,height:0});p(this,"hasAddedEventListener",!1);p(this,"isHiddenByHideFunc",!1);p(this,"dispose",()=>{var e,n;this.removeEventListener(),(e=this.app)==null||e.$destroy(),this.app=void 0,(n=this.container)==null||n.remove(),this.data=void 0,this.wrapper=void 0,this.selector=void 0,this.hooks.emit("dispose")});p(this,"show",(...n)=>Z(this,[...n],function*(e={}){if(!this.state.enabled||!this.showPromise&&this.state.visible)return;const o=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!0},o),this._show(e)}));p(this,"hide",(...n)=>Z(this,[...n],function*(e={}){!this.state.enabled||(this.isHiddenByHideFunc=!0,this.state.visible!==!1&&(this.updateState({visible:!1},e.userAction||!0),this._hide(e)))}));p(this,"updateSize",()=>{if(!this.data||!Bi(this.five,this.showState)||!this.container||!this.wrapper)return;const{min:e,max:n}=this.data.bounding,o=n.x-e.x,s=n.y-e.y,r=this.state.config.attachedTo?{attachedTo:this.state.config.attachedTo}:void 0,a=Mi(this.five,this.wrapper,this.floorIndex,r),l=Math.ceil(o*a),c=Math.ceil(s*a);this.size.width===l&&this.size.height===c||(this.container.style.width=l+"px",this.container.style.height=c+"px",this.size={width:l,height:c})});p(this,"_disable",e=>{var o,s,r;const{userAction:n}=e;this.hooks.emit("disable",{userAction:n}),(o=this.showRejection)==null||o.call(this,Ne.BreakOffByDisable),this.showPromise=void 0,(s=this.app)==null||s.$destroy(),this.app=void 0,(r=this.container)==null||r.remove(),this.removeEventListener()});p(this,"_enable",e=>{const{userAction:n}=e;this.addEventListener(),this.wrapper&&(this.wrapper.append(this.container),this.hooks.emit("enable",{userAction:n}),this.state.visible&&this._show({userAction:n}))});p(this,"_show",e=>Z(this,null,function*(){var r;if(!this.state.enabled)return;if(!((r=this.five.model)!=null&&r.loaded))throw new Error(Ne.ModelNotLoaded);if(!this.data)throw new Error(Ne.DataNotLoaded);this.isHiddenByHideFunc=!1;const n={floorIndex:this.floorIndex,modelOpacity:this.state.config.modelOpacity,immediately:!1,isAutoShow:!1,userAction:!0},o=W(W({},n),e),s=()=>Z(this,null,function*(){this.hooks.emit("show",{userAction:o.userAction,auto:o.isAutoShow});let a=!1,l;this.showRejection=u=>{a=!0,l=u};const[c]=yield Fn(Es(this.five,this.showState,o.userAction));if(c)throw c;if(a)throw l?new Error(l):new Error(Ne.UnknownError);this.updateSize(),this.updatePosition(),this.floorIndex=o.floorIndex,this.five.model.show(this.floorIndex);const d=o.modelOpacity,f=o.immediately?0:Ps;qt(this.five,d,f),this.render(f)});return this.showPromise=s().then(()=>{this.hooks.emit("showAnimationEnded",{auto:o.isAutoShow,userAction:o.userAction})}).catch(a=>{if(this.updateState({visible:!1},o.userAction),!o.isAutoShow&&a instanceof Error)throw a}).finally(()=>{this.showPromise=void 0,this.showRejection=void 0}),this.showPromise}));p(this,"_hide",e=>{var s;(s=this.showRejection)==null||s.call(this,Ne.BreakOffByHide),this.showPromise=void 0;const o=W(W({},{userAction:!0,isAutoHide:!1}),e);qt(this.five,1,0),this.hooks.emit("hide",{auto:o.isAutoHide,userAction:o.userAction}),this.render()});p(this,"handleClick",()=>{if(!this.state.visible)return;if(this.hooks.emit("click"))return!1});p(this,"onFiveModelLoaded",()=>{if(this.state.enabled===!1||this.wrapper||!this.selector)return;const e=this.selector instanceof Element?this.selector:document.querySelector(this.selector);if(!e)throw new Error("\u4E0D\u6B63\u786E\u7684\u7236\u5BB9\u5668\u9009\u62E9\u5668");this.wrapper=e,e.append(this.container)});p(this,"onFiveModeChange",e=>{e!==this.showState.mode&&(this.updateState({visible:!1},!1),this._hide({userAction:!1}))});p(this,"onFivePanoArrived",e=>{var n;!((n=this.five)!=null&&n.work)||(this.panoIndex=e,this.floorIndex=this.five.work.observers[e].floorIndex)});p(this,"onFiveCameraUpdate",(e,n)=>{if(!this.state.visible||this.showPromise)return;const o=this.five.getCurrentState();this.updatePosition(),this.updateSize(),Td(o)&&(this.updateState({visible:!1},n),this._hide({userAction:n}))});p(this,"onFiveWantsPanGesture",(e,n)=>{if(this.five.getCurrentState().mode===this.showState.mode&&this.state.config.autoShowEnable!==!1){if(n&&this.state.visible)return this.five.updateCamera(this.showState,0),!1;if(n&&!this.state.visible){if(this.isHiddenByHideFunc)return;const o=this.five.getCurrentState();return o.mode!==this.showState.mode||this.state.visible?void 0:(Qd(o)&&(this.updateState({visible:!0},!0),this._show({isAutoShow:!0})),!1)}}});p(this,"onFiveWantsTapGesture",()=>this.handleClick());p(this,"onFiveWantsChangeMode",(e,n)=>{n==="Panorama"&&e===this.showState.mode&&(this.lastPanoramaLongitude=this.five.getCurrentState().longitude)});p(this,"onModelShownFloorChange",e=>{if(this.floorIndex!==e){if(e===null){const n=this.five.getCurrentState().panoIndex;this.floorIndex=this.five.work.observers[n].floorIndex;return}this.floorIndex=e,this.updateSize(),this.render()}});n!=null&&n.selector&&(this.selector=n.selector,console.warn("\u4E0D\u63A8\u8350\u7EE7\u7EED\u4F7F\u7528 params.selector \u914D\u7F6E\u7236\u5BB9\u5668\uFF0C\u8BF7\u4F7F\u7528 appendTo \u65B9\u6CD5")),this.showState={mode:"Mapview",longitude:0,latitude:Math.PI/2,fov:90};const o={northDesc:"\u5317",modelOpacity:1,hoverEnable:!0,compassEnable:!0,autoShowEnable:!0,ruleLabelsEnable:!0,roomLabelsEnable:!0,cameraImageUrl:gt,attachedTo:pt.BOUNDING_CENTER,getLabelElement:void 0,adaptiveRoomLabelVisibleEnable:!0,getRoomAreaText:a=>(a/1e6).toFixed(1)+"\u33A1",getRuleDistanceText:a=>a.toString()},s=n?Xn(n,["selector","scale"]):{},r=W(W({},o),s);this.state={enabled:!0,visible:!1,config:r},this.initContainer(),e.model.loaded?this.onFiveModelLoaded():e.once("modelLoaded",this.onFiveModelLoaded),e.once("dispose",this.dispose),this.addEventListener()}load(e,n,o=!0){return Z(this,null,function*(){function s(d){return Object.prototype.hasOwnProperty.apply(d,["version"])}const r=e;r&&!r.version&&console.warn("\u4F20\u5165 serverData.data \u7684\u65B9\u5F0F\u540E\u7EED\u53EF\u80FD\u4E0D\u518D\u652F\u6301\uFF0C\u8BF7\u628A serverData \u6574\u4F53\u4F20\u5165 load \u51FD\u6570");const a=JSON.parse(JSON.stringify(e)),l=s(a)?a.data:a,c=this.data;this.data=yield At(l),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,c),n&&this.updateState(n,o),this.render()})}appendTo(e){if(this.wrapper=e,!!this.state.enabled)return e.appendChild(this.container),this.render(),this}enable(e={}){if(this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!0},e.userAction||n),this._enable({userAction:n})}disable(e={}){if(!this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!1},e.userAction||n),this._disable({userAction:n})}setState(e,n={}){const o=this.state,s=n.userAction!==void 0?n.userAction:!0;if(this.updateState(e,s),e.enabled!==void 0&&o.enabled!==e.enabled&&(e.enabled?this._enable({userAction:s}):this._disable({userAction:s})),e.visible!==void 0&&o.visible!==e.visible){const r={userAction:s};e.visible?this._show(r):this._hide(r)}}changeConfigs(e,n=!0){this.updateState({config:e},n),this.render()}updatePosition(){var a;const e=zi(this.five,this.floorIndex,this.state.config.attachedTo),n=(a=this.five.model)==null?void 0:a.bounding.getCenter(new I.Vector3).setY(e);if(!n)return;const o=n.clone().project(this.five.camera),s=(o.x+1)/2,r=-(o.y-1)/2;this.container.style.left=s*100+"%",this.container.style.top=r*100+"%"}formatData(e){return Z(this,null,function*(){return yield At(e.data)})}updateState(e,n){const o=this.state,s=e.config?W(W({},o.config),e.config):o.config;this.state=pe(W(W({},this.state),e),{config:s}),!$e(this.state,o,{deep:!0})&&this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:n})}initContainer(){this.container.classList.add("floorplan-plugin"),Object.assign(this.container.style,{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",zIndex:10,pointerEvents:"none"}),this.five.addExtraElement(this.container)}addEventListener(){if(!this.state.enabled||this.hasAddedEventListener)return;const e=this.five;e.on("modeChange",this.onFiveModeChange),e.on("panoArrived",this.onFivePanoArrived),e.on("cameraUpdate",this.onFiveCameraUpdate),e.on("wantsPanGesture",this.onFiveWantsPanGesture),e.on("wantsTapGesture",this.onFiveWantsTapGesture),e.on("wantsChangeMode",this.onFiveWantsChangeMode),e.on("modelShownFloorChange",this.onModelShownFloorChange)}removeEventListener(){const e=this.five;this.hasAddedEventListener=!1,e.off("modelLoaded",this.onFiveModelLoaded),e.off("modeChange",this.onFiveModeChange),e.off("panoArrived",this.onFivePanoArrived),e.off("cameraUpdate",this.onFiveCameraUpdate),e.off("wantsPanGesture",this.onFiveWantsPanGesture),e.off("wantsTapGesture",this.onFiveWantsTapGesture),e.off("wantsChangeMode",this.onFiveWantsChangeMode),e.off("modelShownFloorChange",this.onModelShownFloorChange)}render(e){if(!this.state.enabled||!this.container||!this.data||this.size.width===0)return;const n=pe(W({},this.state.config),{visible:this.state.visible,duration:e!=null?e:0,panoIndex:this.panoIndex,floorIndex:this.floorIndex,floorplanData:this.data,lastPanoramaLongitude:this.lastPanoramaLongitude});if(this.app)return this.app.$set(n);this.app=new Si({target:this.container,intro:!0,props:n})}}const Rd=(i,t)=>new Od(i,t);class Fd extends jt{constructor(e,n){super(e);p(this,"name","topviewFloorplanPlugin");p(this,"state");p(this,"data");p(this,"app");p(this,"selector");p(this,"panoIndex",0);p(this,"floorIndex",0);p(this,"wrapper");p(this,"container",document.createElement("div"));p(this,"lastPanoramaLongitude",0);p(this,"size",{width:0,height:0});p(this,"hasAddedEventListener",!1);p(this,"isHiddenByHideFunc",!1);p(this,"updateSize",()=>{if(!this.data||!this.container||!this.wrapper||this.five.getCurrentState().mode!=="Topview")return;const{min:e,max:n}=this.data.bounding,o=n.x-e.x,s=n.y-e.y,r=this.state.config.attachedTo?{attachedTo:this.state.config.attachedTo}:void 0,a=Mi(this.five,this.wrapper,this.floorIndex,r),l=Math.ceil(o*a),c=Math.ceil(s*a);this.size.width===l&&this.size.height===c||(this.container.style.width=l+"px",this.container.style.height=c+"px",this.size={width:l,height:c})});p(this,"dispose",()=>{var e,n;this.removeEventListener(),(e=this.app)==null||e.$destroy(),this.app=void 0,(n=this.container)==null||n.remove(),this.data=void 0,this.wrapper=void 0,this.selector=void 0,this.hooks.emit("dispose")});p(this,"_disable",e=>{var o,s;const{userAction:n}=e;(o=this.app)==null||o.$destroy(),this.app=void 0,(s=this.container)==null||s.remove(),this.removeEventListener(),this.hooks.emit("disable",{userAction:n})});p(this,"onFiveModelLoaded",()=>{if(this.state.enabled===!1||this.wrapper||!this.selector)return;const e=this.selector instanceof Element?this.selector:document.querySelector(this.selector);if(!e)throw new Error("\u4E0D\u6B63\u786E\u7684\u7236\u5BB9\u5668\u9009\u62E9\u5668");this.wrapper=e,e.append(this.container)});p(this,"onFiveModeChange",(...[e,,,,n])=>{e!=="Topview"&&this.state.visible&&(this.updateState({visible:!1},n),this._hide({userAction:n}))});p(this,"onFivePanoArrived",e=>{var n;!((n=this.five)!=null&&n.work)||(this.panoIndex=e,this.floorIndex=this.five.work.observers[e].floorIndex)});p(this,"onFiveCameraUpdate",(e,n)=>{!this.state.visible||(this.updatePosition(),this.updateSize())});p(this,"onFiveWantsGesture",e=>{if(!(e!=="pan"&&e!=="pinch"&&e!=="mouseWheel")&&this.state.visible&&!this.state.config.gestureEnable)return!1});p(this,"onFiveWantsMoveToPano",()=>{if(this.state.visible&&this.state.config.preventRoomClick)return!1});p(this,"onFiveInitAnimationEnded",(...[,,e])=>{const{mode:n}=this.five.getCurrentState();n==="Topview"&&!this.isHiddenByHideFunc&&!this.state.visible&&this.state.config.autoShowEnable&&(this.updateState({visible:!0},e),this._show({userAction:e}))});p(this,"onModelShownFloorChange",e=>{if(this.floorIndex!==e){if(e===null){const n=this.five.getCurrentState().panoIndex;this.floorIndex=this.five.work.observers[n].floorIndex;return}this.floorIndex=e,this.updateSize(),this.render()}});n!=null&&n.selector&&(this.selector=n.selector,console.warn("\u4E0D\u63A8\u8350\u7EE7\u7EED\u4F7F\u7528 params.selector \u914D\u7F6E\u7236\u5BB9\u5668\uFF0C\u8BF7\u4F7F\u7528 appendTo \u65B9\u6CD5"));const o={northDesc:"\u5317",modelOpacity:1,hoverEnable:!0,compassEnable:!0,gestureEnable:!1,autoShowEnable:!0,ruleLabelsEnable:!0,roomLabelsEnable:!0,cameraImageUrl:gt,attachedTo:pt.BOUNDING_CENTER,getLabelElement:void 0,adaptiveRoomLabelVisibleEnable:!0,getRoomAreaText:a=>(a/1e6).toFixed(1)+"\u33A1",getRuleDistanceText:a=>a.toString()},s=n?Xn(n,["selector","scale"]):{},r=W(W({},o),s);this.state={enabled:!0,visible:!1,config:r},this.initContainer(),e.model.loaded?this.onFiveModelLoaded():e.once("modelLoaded",this.onFiveModelLoaded),e.once("dispose",this.dispose),this.addEventListener()}load(e,n,o=!0){return Z(this,null,function*(){function s(d){return Object.prototype.hasOwnProperty.apply(d,["version"])}const r=e;r&&!r.version&&console.warn("\u4F20\u5165 serverData.data \u7684\u65B9\u5F0F\u540E\u7EED\u53EF\u80FD\u4E0D\u518D\u652F\u6301\uFF0C\u8BF7\u628A serverData \u6574\u4F53\u4F20\u5165 load \u51FD\u6570");const a=JSON.parse(JSON.stringify(e)),l=s(a)?a.data:a,c=this.data;this.data=yield At(l),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,c),n&&this.updateState(n,o),this.render()})}updatePosition(){var a;const e=zi(this.five,this.floorIndex,this.state.config.attachedTo),n=(a=this.five.model)==null?void 0:a.bounding.getCenter(new I.Vector3).setY(e);if(!n)return;const o=n.clone().project(this.five.camera),s=(o.x+1)/2,r=-(o.y-1)/2;this.container.style.left=s*100+"%",this.container.style.top=r*100+"%"}appendTo(e){if(this.wrapper=e,!!this.state.enabled)return e.appendChild(this.container),this.render(),this}show(){return Z(this,arguments,function*(e={}){if(this.state.visible)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!0},n),this._show({userAction:n})})}hide(){return Z(this,arguments,function*(e={}){if(this.isHiddenByHideFunc=!0,!this.state.visible)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!1},n),this._hide({userAction:n})})}enable(e={}){if(this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!0},e.userAction||n),this._enable({userAction:n})}disable(e={}){if(!this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!1},e.userAction||n),this._disable({userAction:n})}setState(e,n={}){const o=this.state,s=n.userAction!==void 0?n.userAction:!0;if(this.updateState(e,s),e.enabled!==void 0&&o.enabled!==e.enabled){const r={userAction:s};e.enabled?this._enable(r):this._disable(r)}if(e.visible!==void 0&&o.visible!==e.visible){const r={userAction:s};e.visible?this._show(r):this._hide(r)}}changeConfigs(e,n=!0){this.updateState({config:e},n),this.render()}formatData(e){return Z(this,null,function*(){return yield At(e.data)})}_show(e){return Z(this,null,function*(){if(!this.state.enabled)return;this.isHiddenByHideFunc=!1;const{userAction:n}=e;this.hooks.emit("show",{userAction:n,auto:!1}),this.five.getCurrentState().mode!=="Topview"&&(yield Is(this.five,["Topview",void 0,void 0,n])),this.five.model.show(this.floorIndex),this.updatePosition(),this.updateSize();const o=500,s=this.state.config.modelOpacity;qt(this.five,s,o),this.hooks.emit("showAnimationEnded",{userAction:n,auto:!1}),this.render()})}_hide(e){return Z(this,null,function*(){if(!this.state.enabled)return;const{userAction:n}=e;this.hooks.emit("hide",{userAction:n,auto:!1});const o=1,s=0;qt(this.five,o,s),this.render()})}_enable(e){const{userAction:n}=e;this.addEventListener(),this.wrapper&&this.wrapper.append(this.container),this.hooks.emit("enable",{userAction:n}),this.state.visible&&this._show({userAction:n})}updateState(e,n){const o=this.state,s=e.config?W(W({},o.config),e.config):o.config;this.state=pe(W(W({},this.state),e),{config:s}),!$e(this.state,o,{deep:!0})&&this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:n})}addEventListener(){if(!this.state.enabled||this.hasAddedEventListener)return;const e=this.five;e.on("modeChange",this.onFiveModeChange),e.on("panoArrived",this.onFivePanoArrived),e.on("cameraUpdate",this.onFiveCameraUpdate),e.on("wantsGesture",this.onFiveWantsGesture),e.on("wantsMoveToPano",this.onFiveWantsMoveToPano),e.on("initAnimationEnded",this.onFiveInitAnimationEnded),e.on("modelShownFloorChange",this.onModelShownFloorChange)}removeEventListener(){const e=this.five;this.hasAddedEventListener=!1,e.off("modeChange",this.onFiveModeChange),e.off("panoArrived",this.onFivePanoArrived),e.off("cameraUpdate",this.onFiveCameraUpdate),e.off("wantsGesture",this.onFiveWantsGesture),e.off("wantsMoveToPano",this.onFiveWantsMoveToPano),e.off("initAnimationEnded",this.onFiveInitAnimationEnded),e.off("modelShownFloorChange",this.onModelShownFloorChange)}initContainer(){this.container.classList.add("floorplan-plugin"),Object.assign(this.container.style,{position:"absolute",left:"50%",top:"50%",transform:"translate3d(-50%, -50%, 10px)",zIndex:10,pointerEvents:"none","will-change":"width, height"}),this.five.addExtraElement(this.container)}render(e){if(!this.state.enabled||!this.container||!this.data||this.size.width===0)return;const n=pe(W({},this.state.config),{visible:this.state.visible,duration:e!=null?e:0,panoIndex:this.panoIndex,floorIndex:this.floorIndex,floorplanData:this.data,lastPanoramaLongitude:this.lastPanoramaLongitude});if(this.app)return this.app.$set(n);this.app=new Si({target:this.container,intro:!0,props:n})}}const Hd=(i,t)=>new Fd(i,t);function Ti(i,t=200){let e;return function(...n){e||(i(...n),e=setTimeout(function(){e=null},t))}}function Gd(i){le(i,"svelte-1nqrlxd",".plugin-radar__camera-wrapper.svelte-1nqrlxd{width:100%;height:100%;position:absolute;pointer-events:none}.plugin-radar__camera-position.svelte-1nqrlxd{position:absolute;left:0;top:0;width:0;height:0;transform:none;pointer-events:none;transition:transform 1s linear}.plugin-radar__camera-rotate.svelte-1nqrlxd{position:absolute;left:-0.9375rem;top:-0.9375rem;width:1.0625rem;height:1.0625rem;transform-origin:0.9375rem 0.9375rem;transform:rotate(45deg);background-repeat:no-repeat;background-size:100%}")}function Nd(i){let t,e,n;return{c(){t=Q("div"),e=Q("div"),n=Q("div"),b(n,"class","plugin-radar__camera-rotate svelte-1nqrlxd"),F(n,"background-image","url("+(i[0]||gt)+")"),F(n,"transform",i[1]),b(e,"class","plugin-radar__camera-position svelte-1nqrlxd"),F(e,"transform",i[2]),b(t,"class","plugin-radar__camera-wrapper svelte-1nqrlxd")},m(o,s){B(o,t,s),O(t,e),O(e,n)},p(o,[s]){s&1&&F(n,"background-image","url("+(o[0]||gt)+")"),s&2&&F(n,"transform",o[1]),s&4&&F(e,"transform",o[2])},i:ne,o:ne,d(o){o&&z(t)}}}function Wd(i){return`rotate(${Math.floor(i/Math.PI*180)*-1+45}deg)`}function Xd(i,t,e){let n,o,{five:s}=t,{pxmm:r}=t,{floorplanData:a}=t,{cameraImageUrl:l}=t,c=s.getCurrentState().panoIndex,d=s.getCurrentState().longitude;function f(m,g){const v=m.bounding,A=m.observers[g];if(!A)return"";const C=(v.max.x-v.min.x)*r,w=(v.max.y-v.min.y)*r,E=Math.floor(A.positionInImage.x*C),D=Math.floor(A.positionInImage.y*w);return`translate(${E}px, ${D}px)`}function u(m){e(6,c=m)}const h=Ti(m=>{e(7,d=m.longitude)},1e3/60);return Ue(()=>(s.on("panoWillArrive",u),s.on("cameraDirectionUpdate",h),function(){s.off("panoWillArrive",u),s.off("cameraDirectionUpdate",h)})),i.$$set=m=>{"five"in m&&e(3,s=m.five),"pxmm"in m&&e(4,r=m.pxmm),"floorplanData"in m&&e(5,a=m.floorplanData),"cameraImageUrl"in m&&e(0,l=m.cameraImageUrl)},i.$$.update=()=>{i.$$.dirty&96&&e(2,n=f(a,c)),i.$$.dirty&128&&e(1,o=Wd(d))},[l,o,n,s,r,a,c,d]}class Yd extends se{constructor(t){super(),oe(this,t,Xd,Nd,ie,{five:3,pxmm:4,floorplanData:5,cameraImageUrl:0},Gd)}}function Ud(i){le(i,"svelte-1i87fz7",".plugin-pano-floorplan__extra-objects.svelte-1i87fz7{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.plugin-pano-floorplan__extra-object-item--position.svelte-1i87fz7{position:absolute;width:0;height:0}.plugin-pano-floorplan__extra-object-item.svelte-1i87fz7{transform:translate(-50%, -50%)}")}function xs(i,t,e){const n=i.slice();return n[1]=t[e],n}function ks(i,t){let e,n,o=`${t[1].icon.width/16}rem`,s=`${t[1].icon.height/16}rem`,r,a=`${t[1].positionInImage.y*100}%`,l=`${t[1].positionInImage.x*100}%`;return{key:i,first:null,c(){e=Q("div"),n=Q("div"),r=_(),b(n,"class","plugin-pano-floorplan__extra-object-item svelte-1i87fz7"),F(n,"background-image",`url(${t[1].icon.url})`),F(n,"width",o),F(n,"height",s),b(e,"class","plugin-pano-floorplan__extra-object-item--position svelte-1i87fz7"),F(e,"top",a),F(e,"left",l),this.first=e},m(c,d){B(c,e,d),O(e,n),O(e,r)},p(c,d){t=c,d&1&&F(n,"background-image",`url(${t[1].icon.url})`),d&1&&o!==(o=`${t[1].icon.width/16}rem`)&&F(n,"width",o),d&1&&s!==(s=`${t[1].icon.height/16}rem`)&&F(n,"height",s),d&1&&a!==(a=`${t[1].positionInImage.y*100}%`)&&F(e,"top",a),d&1&&l!==(l=`${t[1].positionInImage.x*100}%`)&&F(e,"left",l)},d(c){c&&z(e)}}}function Vd(i){let t,e=[],n=new Map,o=i[0];const s=r=>r[1].id;for(let r=0;r<o.length;r+=1){let a=xs(i,o,r),l=s(a);n.set(l,e[r]=ks(l,a))}return{c(){t=Q("div");for(let r=0;r<e.length;r+=1)e[r].c();b(t,"class","plugin-pano-floorplan__extra-objects svelte-1i87fz7")},m(r,a){B(r,t,a);for(let l=0;l<e.length;l+=1)e[l].m(t,null)},p(r,[a]){a&1&&(o=r[0],e=Ve(e,a,s,1,r,o,n,t,Uo,ks,null,xs))},i:ne,o:ne,d(r){r&&z(t);for(let a=0;a<e.length;a+=1)e[a].d()}}}function Jd(i,t,e){let{extraObjects:n=[]}=t;return i.$$set=o=>{"extraObjects"in o&&e(0,n=o.extraObjects)},[n]}class Zd extends se{constructor(t){super(),oe(this,t,Jd,Vd,ie,{extraObjects:0},Ud)}}function Ds(i){let t,e;const n=[{five:i[0],pxmm:i[1],floorIndex:i[2],floorplanData:i[4],onRoomHeightClick:i[6]}];let o={};for(let s=0;s<n.length;s+=1)o=Ie(o,n[s]);return t=new ms({props:o}),{c(){ee(t.$$.fragment)},m(s,r){K(t,s,r),e=!0},p(s,r){const a=r&87?Te(n,[{five:s[0],pxmm:s[1],floorIndex:s[2],floorplanData:s[4],onRoomHeightClick:s[6]}]):{};t.$set(a)},i(s){e||(k(t.$$.fragment,s),e=!0)},o(s){M(t.$$.fragment,s),e=!1},d(s){$(t,s)}}}function _d(i){let t,e,n,o,s,r;const a=[{floorIndex:i[2],floorplanData:i[4]}];let l={};for(let d=0;d<a.length;d+=1)l=Ie(l,a[d]);t=new qo({props:l}),n=new Zd({props:{extraObjects:i[5]}});let c=i[3]&&Ds(i);return{c(){ee(t.$$.fragment),e=_(),ee(n.$$.fragment),o=_(),c&&c.c(),s=Ae()},m(d,f){K(t,d,f),B(d,e,f),K(n,d,f),B(d,o,f),c&&c.m(d,f),B(d,s,f),r=!0},p(d,[f]){const u=f&20?Te(a,[{floorIndex:d[2],floorplanData:d[4]}]):{};t.$set(u);const h={};f&32&&(h.extraObjects=d[5]),n.$set(h),d[3]?c?(c.p(d,f),f&8&&k(c,1)):(c=Ds(d),c.c(),k(c,1),c.m(s.parentNode,s)):c&&(fe(),M(c,1,1,()=>{c=null}),he())},i(d){r||(k(t.$$.fragment,d),k(n.$$.fragment,d),k(c),r=!0)},o(d){M(t.$$.fragment,d),M(n.$$.fragment,d),M(c),r=!1},d(d){$(t,d),d&&z(e),$(n,d),d&&z(o),c&&c.d(d),d&&z(s)}}}function qd(i,t,e){let n,{five:o}=t,{pxmm:s}=t,{floorIndex:r}=t,{hoverEnable:a}=t,{floorplanData:l}=t,{extraObjects:c=[]}=t;const d=void 0;return i.$$set=f=>{"five"in f&&e(0,o=f.five),"pxmm"in f&&e(1,s=f.pxmm),"floorIndex"in f&&e(2,r=f.floorIndex),"hoverEnable"in f&&e(3,a=f.hoverEnable),"floorplanData"in f&&e(4,l=f.floorplanData),"extraObjects"in f&&e(7,c=f.extraObjects)},i.$$.update=()=>{i.$$.dirty&132&&e(5,n=c==null?void 0:c.filter(f=>f.floorIndex===r))},[o,s,r,a,l,n,d,c]}class Kd extends se{constructor(t){super(),oe(this,t,qd,_d,ie,{five:0,pxmm:1,floorIndex:2,hoverEnable:3,floorplanData:4,extraObjects:7})}}function $d(i){le(i,"svelte-1mvqyqq",".plugin-floorplan-radar.svelte-1mvqyqq{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.plugin-floorplan-radar-container.svelte-1mvqyqq{position:relative}")}function Ls(i){let t,e,n,o=i[6]!==0&&Ss(i);return{c(){t=Q("div"),o&&o.c(),b(t,"class","plugin-floorplan-radar svelte-1mvqyqq"),De(()=>i[12].call(t))},m(s,r){B(s,t,r),o&&o.m(t,null),e=ft(t,i[12].bind(t)),n=!0},p(s,r){s[6]!==0?o?(o.p(s,r),r&64&&k(o,1)):(o=Ss(s),o.c(),k(o,1),o.m(t,null)):o&&(fe(),M(o,1,1,()=>{o=null}),he())},i(s){n||(k(o),n=!0)},o(s){M(o),n=!1},d(s){s&&z(t),o&&o.d(),e()}}}function Ss(i){let t,e,n,o,s=`${i[8]}px`,r=`${i[11]}px`,a;const l=[{five:i[0],pxmm:i[9],floorIndex:i[10],floorplanData:i[3],hoverEnable:i[2],extraObjects:i[5]}];let c={};for(let u=0;u<l.length;u+=1)c=Ie(c,l[u]);e=new Kd({props:c});const d=[{pxmm:i[9],five:i[0],floorplanData:i[3],cameraImageUrl:i[4]}];let f={};for(let u=0;u<d.length;u+=1)f=Ie(f,d[u]);return o=new Yd({props:f}),{c(){t=Q("div"),ee(e.$$.fragment),n=_(),ee(o.$$.fragment),b(t,"class","plugin-floorplan-radar-container svelte-1mvqyqq"),F(t,"width",s),F(t,"height",r)},m(u,h){B(u,t,h),K(e,t,null),O(t,n),K(o,t,null),a=!0},p(u,h){const m=h&1581?Te(l,[{five:u[0],pxmm:u[9],floorIndex:u[10],floorplanData:u[3],hoverEnable:u[2],extraObjects:u[5]}]):{};e.$set(m);const g=h&537?Te(d,[{pxmm:u[9],five:u[0],floorplanData:u[3],cameraImageUrl:u[4]}]):{};o.$set(g),h&256&&s!==(s=`${u[8]}px`)&&F(t,"width",s),h&2048&&r!==(r=`${u[11]}px`)&&F(t,"height",r)},i(u){a||(k(e.$$.fragment,u),k(o.$$.fragment,u),a=!0)},o(u){M(e.$$.fragment,u),M(o.$$.fragment,u),a=!1},d(u){u&&z(t),$(e),$(o)}}}function eu(i){let t,e,n=i[1]&&Ls(i);return{c(){n&&n.c(),t=Ae()},m(o,s){n&&n.m(o,s),B(o,t,s),e=!0},p(o,[s]){o[1]?n?(n.p(o,s),s&2&&k(n,1)):(n=Ls(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(fe(),M(n,1,1,()=>{n=null}),he())},i(o){e||(k(n),e=!0)},o(o){M(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function tu(i,t,e){var A,C;let{five:n}=t,{visible:o}=t,{hoverEnable:s}=t,{floorplanData:r}=t,{cameraImageUrl:a}=t,{extraObjects:l=[]}=t,c=0,d=(C=(A=n.work.observers[n.getCurrentState().panoIndex])==null?void 0:A.floorIndex)!=null?C:0,f=0,u=0,h=0,m=0;function g(w){e(10,d=n.work.observers[w].floorIndex)}Ue(()=>(n.on("panoArrived",g),()=>{n.off("panoArrived",g)}));function v(){f=this.clientWidth,u=this.clientHeight,e(6,f),e(7,u)}return i.$$set=w=>{"five"in w&&e(0,n=w.five),"visible"in w&&e(1,o=w.visible),"hoverEnable"in w&&e(2,s=w.hoverEnable),"floorplanData"in w&&e(3,r=w.floorplanData),"cameraImageUrl"in w&&e(4,a=w.cameraImageUrl),"extraObjects"in w&&e(5,l=w.extraObjects)},i.$$.update=()=>{if(i.$$.dirty&456){const w=Math.min(f,u),{max:E,min:D}=r.bounding,y=E.x-D.x,L=E.y-D.y,x=function(){return y>L?[w,w/y*L]:[w/L*y,w]}();e(8,h=x[0]),e(11,m=x[1]),e(9,c=h/y)}},[n,o,s,r,a,l,f,u,h,c,d,m,v]}class nu extends se{constructor(t){super(),oe(this,t,tu,eu,ie,{five:0,visible:1,hoverEnable:2,floorplanData:3,cameraImageUrl:4,extraObjects:5},$d)}}class iu extends jt{constructor(e,n){super(e);p(this,"name","panoFloorplanRadarPlugin");p(this,"state");p(this,"data");p(this,"app");p(this,"wrapperSelector","");p(this,"wrapper",null);p(this,"disposed",!1);p(this,"extraObjects",[]);p(this,"dispose",()=>{var e;this.disposed=!0,(e=this.app)==null||e.$destroy(),this.wrapper=null,this.wrapperSelector="",this.hooks.emit("dispose")});p(this,"_disable",e=>{var o;const{userAction:n}=e;(o=this.app)==null||o.$destroy(),this.app=void 0,this.hooks.emit("disable",{userAction:n})});this.five=e;const o={hoverEnable:!1,cameraImageUrl:gt},s=n!=null&&n.configs?n.configs:{},r=W(W({},o),s);this.state={enabled:!0,visible:!0,config:r},n!=null&&n.wrapper&&console.warn("\u4E0D\u63A8\u8350\u7EE7\u7EED\u4F7F\u7528 params.selector \u914D\u7F6E\u7236\u5BB9\u5668\uFF0C\u8BF7\u4F7F\u7528 appendTo \u65B9\u6CD5"),typeof(n==null?void 0:n.wrapper)=="string"?this.wrapperSelector=n.wrapper:(n==null?void 0:n.wrapper)instanceof Element&&(this.wrapper=n.wrapper),e.once("dispose",this.dispose)}load(e,n,o=!0){return Z(this,null,function*(){function s(c){return Object.prototype.hasOwnProperty.apply(c,["version"])}const r=JSON.parse(JSON.stringify(e)),a=s(r)?r.data:r,l=this.data;this.data=yield At(a),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,l),n&&this.updateState(n,o),this.render()})}show(){return Z(this,arguments,function*(e={}){if(this.state.visible)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!0},n),this._show({userAction:n})})}hide(){return Z(this,arguments,function*(e={}){if(!this.state.visible)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!1},n),this._hide({userAction:n})})}enable(e={}){if(this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!0},e.userAction||n),this._enable({userAction:n})}disable(e={}){if(!this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!1},e.userAction||n),this._disable({userAction:n})}setState(e,n={}){const o=this.state,s=n.userAction!==void 0?n.userAction:!0;if(this.updateState(e,s),e.enabled!==void 0&&o.enabled!==e.enabled){const r={userAction:s};e.enabled?this._enable(r):this._disable(r)}if(e.visible!==void 0&&o.visible!==e.visible){const r={userAction:s};e.visible?this._show(r):this._hide(r)}}appendTo(e){this.wrapper=e,this.render()}changeConfigs(e,n=!0){this.setState({config:e},{userAction:n}),this.render()}setExtraObjectsWith3DPositions(e){!this.data||(this.extraObjects=Dd(e,this.five,this.data),this.render())}formatData(e){return Z(this,null,function*(){return yield At(e.data)})}_enable(e){const{userAction:n}=e;this.hooks.emit("enable",{userAction:n}),this.state.visible&&this._show({userAction:n})}_show(e){if(this.disposed||!this.state.enabled)return;const{userAction:n}=e;this.hooks.emit("show",{userAction:n}),this.render()}_hide(e){if(this.disposed||!this.state.enabled)return;const{userAction:n}=e;this.hooks.emit("hide",{userAction:n}),this.render()}updateState(e,n){const o=this.state;this.state=W(W({},this.state),e),!$e(this.state,o,{deep:!0})&&this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:n})}render(){if(this.disposed||!this.state.enabled)return;if(!this.wrapper&&this.wrapperSelector){const n=document.querySelector(this.wrapperSelector);this.wrapper=n}if(!this.data||!this.wrapper)return;const e=pe(W({},this.state.config),{five:this.five,floorplanData:this.data,visible:this.state.visible,extraObjects:this.extraObjects});this.app?this.app.$set(e):this.app=new nu({target:this.wrapper,props:e})}}const ou=(i,t)=>new iu(i,t),su=[{type:0,floorType:1,roomType:"100900000012",name:"\u5176\u4ED6"},{type:1,floorType:1,roomType:"100900000002",name:"\u5BA2\u5385"},{type:2,floorType:1,roomType:"100900000002",name:"\u9910\u5385"},{type:3,floorType:0,roomType:"100900000001",name:"\u5367\u5BA4"},{type:4,floorType:0,roomType:"100900000001",name:"\u4E66\u623F"},{type:5,floorType:3,roomType:"100900000004",name:"\u536B\u751F\u95F4"},{type:6,floorType:3,roomType:"100900000004",name:"\u6DCB\u6D74\u95F4"},{type:7,floorType:3,roomType:"100900000004",name:"\u6D17\u624B\u95F4"},{type:8,floorType:3,roomType:"100900000003",name:"\u53A8\u623F"},{type:9,floorType:1,roomType:"100900000003",name:"\u5F00\u653E\u53A8\u623F",onlySubArea:!0},{type:10,floorType:0,roomType:"100900000001",name:"\u591A\u529F\u80FD\u95F4"},{type:11,floorType:0,roomType:"100900000009",name:"\u4FDD\u59C6\u95F4"},{type:12,floorType:4,roomType:"100900000005",name:"\u9633\u53F0"},{type:13,floorType:4,roomType:"100900000006",name:"\u9732\u53F0"},{type:14,floorType:0,roomType:"100900000008",name:"\u50A8\u7269\u95F4"},{type:15,floorType:0,roomType:"100900000013",name:"\u8863\u5E3D\u95F4"},{type:16,floorType:0,roomType:"100900000011",name:"\u9601\u697C"},{type:17,floorType:2,roomType:"100900000007",name:"\u82B1\u56ED"},{type:18,floorType:5,roomType:"100900000010",name:"\u8F66\u5E93"},{type:19,floorType:1,roomType:"100900000012",name:"\u7535\u68AF"},{type:20,floorType:1,roomType:"100900000012",name:"\u5730\u4E0B\u5BA4"},{type:21,floorType:1,roomType:"100900000012",name:"\u5929\u4E95"},{type:22,floorType:1,roomType:"100900000012",name:"\u9633\u5149\u623F"},{type:23,floorType:1,roomType:"100900000012",name:"\u8FC7\u9053"},{type:24,floorType:1,roomType:"100900000012",name:"\u697C\u68AF\u95F4"},{type:25,floorType:1,roomType:"100900000012",name:"\u95E8\u5385"},{type:26,floorType:2,roomType:"100900000012",name:"\u5165\u6237\u82B1\u56ED"},{type:27,floorType:1,roomType:"100900000012",name:"\u7384\u5173"},{type:28,floorType:1,roomType:"100900000012",name:"\u6311\u7A7A"},{type:29,floorType:4,roomType:"100900000012",name:"\u667E\u6652\u533A"},{type:30,floorType:4,roomType:"100900000012",name:"\u6D17\u8863\u623F"},{type:31,floorType:0,roomType:"100900000012",name:"\u5A31\u4E50\u533A"},{type:32,floorType:0,roomType:"100900000012",name:"\u5065\u8EAB\u533A"},{type:33,floorType:0,roomType:"100900000012",name:"\u63A5\u5F85\u533A"},{type:34,floorType:0,roomType:"100900000012",name:"\u5F71\u97F3\u533A"},{type:35,floorType:1,roomType:"100900000012",name:"\u9910\u996E\u533A"},{type:36,floorType:1,roomType:"100900000012",name:"\u5176\u4ED6",onlySubArea:!0},{type:37,floorType:1,roomType:"100900000002",name:"\u8D77\u5C45\u5BA4"},{type:38,floorType:0,roomType:"100900000001",name:"\u4E3B\u5367"},{type:39,floorType:0,roomType:"100900000001",name:"\u6B21\u5367"},{type:40,floorType:0,roomType:"100900000001",name:"\u4F18\u5316\u95F4"},{type:41,floorType:0,roomType:"100900000001",name:"\u529E\u516C\u5BA4"},{type:42,floorType:0,roomType:"100900000001",name:"\u4F1A\u8BAE\u5BA4"},{type:43,floorType:0,roomType:"100900000001",name:"\u6D3D\u8C08\u95F4"},{type:44,floorType:1,roomType:"100900000002",name:"\u5171\u4EAB\u5927\u5385"},{type:45,floorType:1,roomType:"100900000012",name:"\u6C34\u5427"},{type:46,floorType:0,roomType:"100900000015",name:"\u51FA\u5165\u53E3"},{type:47,floorType:0,roomType:"100900000015",name:"\u5927\u5385"},{type:48,floorType:0,roomType:"100900000015",name:"\u5305\u53A2"},{type:49,floorType:0,roomType:"100900000015",name:"\u5176\u4ED6"},{type:50,floorType:0,roomType:"100900000016",name:"\u51FA\u5165\u53E3"},{type:51,floorType:0,roomType:"100900000016",name:"\u529E\u516C\u533A"},{type:52,floorType:0,roomType:"100900000016",name:"\u8001\u677F\u95F4"},{type:53,floorType:0,roomType:"100900000016",name:"\u4F1A\u8BAE\u5BA4"},{type:54,floorType:0,roomType:"100900000016",name:"\u4F11\u606F\u533A/\u6C34\u5427"},{type:55,floorType:0,roomType:"100900000016",name:"\u5176\u4ED6"},{type:56,floorType:2,roomType:"100900000012",name:"\u7A7A\u4E2D\u82B1\u56ED"},{type:57,floorType:0,roomType:"100900000001",name:"\u6D0B\u5BA4"},{type:58,floorType:0,roomType:"100900000001",name:"\u548C\u5BA4"}],ru=[{type:0,description:"\u6728\u8D28\u5730\u677F"},{type:1,description:"\u74F7\u7816\u5730\u9762"},{type:2,description:"\u6237\u5916\u5730\u9762"},{type:3,description:"\u536B\u751F\u95F4\u5730\u9762"},{type:4,description:"\u9633\u53F0\u5730\u9762"},{type:5,description:"\u8F66\u5E93\u5730\u9762"}],au=[{roomType:"100900000001",description:"\u5BA4"},{roomType:"100900000002",description:"\u5385"},{roomType:"100900000003",description:"\u53A8"},{roomType:"100900000004",description:"\u536B"},{roomType:"100900000005",description:"\u9633\u53F0"},{roomType:"100900000006",description:"\u9732\u53F0"},{roomType:"100900000007",description:"\u82B1\u56ED"},{roomType:"100900000008",description:"\u50A8"},{roomType:"100900000009",description:"\u4FDD\u59C6\u95F4"},{roomType:"100900000010",description:"\u8F66\u5E93"},{roomType:"100900000011",description:"\u9601\u697C"},{roomType:"100900000012",description:"\u5176\u4ED6"},{roomType:"100900000013",description:"\u8863"},{roomType:"100900000015",description:"\u5546\u94FA"},{roomType:"100900000016",description:"\u5199\u5B57\u697C"}],Qi=(i,t,e)=>{const n=new I.Matrix4,o=new I.Euler(i,t,e,"YXZ");return n.makeRotationFromEuler(o),n},lu=(i,{scale:t,rotation:e,position:n})=>{if(t&&i.scale.set(t,t,t),e){const[o,s,r]=e;o&&i.applyMatrix4(Qi(o,0,0)),s&&i.applyMatrix4(Qi(0,s,0)),r&&i.applyMatrix4(Qi(0,0,r))}return n&&i.position.set(n.x,n.y,n.z),i};function zs(i,t){i.traverse(e=>{var n;if(e.type==="Mesh"){const o=e,s=W({map:o.material.map||{}},t);o.material=new H.MeshBasicMaterial(s),o.renderOrder=1,((n=e.parent)==null?void 0:n.type)==="Mesh"&&(e.renderOrder=e.parent.renderOrder+1)}})}const cu=(i,t)=>{var d;const e=t.fbx_url||"//vrlab-static.ljcdn.com/release/web/v3/dipan3/dipan.FBX",n=(d=t.north_rad)!=null?d:void 0,o={},s=f=>Z(this,null,function*(){var U;const u=(f==null?void 0:f.fbx_url)||e,h=(U=f==null?void 0:f.north_rad)!=null?U:n;if(typeof h!="number")throw new Error('"northRad"\u914D\u7F6E\u53C2\u6570\u7F3A\u5931\uFF1A\u672A\u914D\u7F6E\u6307\u5357\u9488\u6307\u5411\uFF01');const m=i.model.bounding,g=m.max.x-m.min.x,v=m.max.z-m.min.z,A=Math.max(g,v),w=yield new bn.FBXLoader().loadAsync(u);zs(w,{transparent:!0,side:I.DoubleSide,blending:I.AdditiveBlending});const E=[0,h-Math.PI/2,0],{model:{bounding:{max:{x:D,z:y},min:{x:L,y:x,z:R}}}}=i;o.yBase=x;const T={x:(D+L)/2,y:x-1.6,z:(y+R)/2},G=.0045*A;return lu(w,{position:T,rotation:E,scale:G}),o.object=w,!0}),r=({latitude:f})=>{if(!o.object)return;const u=a(f);u&&(o.object.position.y=u)},a=f=>{if(o.yBase===void 0)return;const u=.6;if(f>=Math.PI/4)return o.yBase-(u+1.6);const h=f*(4/Math.PI);return o.yBase-(u*h+1.6)};return{load:s,disable:()=>{!o.object||(i.scene.remove(o.object),i.needsRender=!0,i.off("cameraDirectionUpdate",r))},enable:()=>{if(!o.object)return;const f=a(i.getPose().latitude);f&&(o.object.position.y=f),i.scene.add(o.object),i.needsRender=!0,i.on("cameraDirectionUpdate",r)}}};function du(i,t){var c,d,f,u,h;const e=(c=t==null?void 0:t.size)!=null?c:512,n=(d=t==null?void 0:t.fontSize)!=null?d:e*(35/256)*1.2,o=(f=t==null?void 0:t.backgroundColor)!=null?f:"rgba(0,0,0,0)",s=(u=t==null?void 0:t.fontColor)!=null?u:"#fff",r=(h=t==null?void 0:t.textAlign)!=null?h:"center",a=document.createElement("canvas");a.setAttribute("width",e+""),a.setAttribute("height",e+"");const l=a.getContext("2d");return l.fillStyle=o,l.fillRect(0,0,e,e),l.font=`${n}px "\u5FAE\u8F6F\u96C5\u9ED1"`,l.textAlign=r,l.fillStyle=s,l.fillText(i,e/2,e*.7),new H.CanvasTexture(a)}const uu=({x:i,y:t,z:e})=>new H.Vector3(i,t,e),fu=(i,t)=>{var g,v,A;const e={},n=(g=t.animationEnabled)!=null?g:!0,o=(v=t.position)!=null?v:void 0,s=(A=t.rad)!=null?A:void 0,r=t.fbx_url||"//vrlab-image4.ljcdn.com/release/web/entryDoorMini/Anim_Door1.fbx",a=[],l=C=>Z(this,null,function*(){var T,G,U,P,S,j,N,Y;const w=(T=C==null?void 0:C.position)!=null?T:o;if(!w)return Promise.reject(new Error("ModelEntryDoorGuidePlugin.load(): position is undefined"));const E=uu(w),D=(G=C==null?void 0:C.rad)!=null?G:s,y=(U=C==null?void 0:C.fbx_url)!=null?U:r;if(e.rad=D,D===void 0)return Promise.reject(new Error(`ModelEntryDoorGuidePlugin.load(): rad is ${D}`));const L=yield new bn.FBXLoader().loadAsync(y);L.position.copy(E),L.rotation.z=D,L.scale.set(.8,.8,.8),zs(L,{transparent:!0,side:I.DoubleSide});const x=(N=(j=(S=(P=L.children)==null?void 0:P[0])==null?void 0:S.children)==null?void 0:j[3])==null?void 0:N.clone();if(!x)return Promise.reject(new Error(`ModelEntryDoorGuidePlugin.load(): textMesh is ${x}`));const R=(Y=t.name)!=null?Y:"\u5165\u6237\u95E8";return x.material=new H.MeshBasicMaterial({transparent:!0,map:du(R)}),x.renderOrder=3,L.children[0].add(x),e.object=L,!0}),c=()=>{if(e.animation)return;if(!e.object)return console.error("ModelEntryDoorGuidePlugin.initAnimation(): state.object is ",e.object);const C=1,w=new H.AnimationMixer(e.object);a.push(w);const E=w.clipAction(e.object.animations[0]);E.timeScale=C;let D;const y=()=>{let T=0,G=0;const U=1e3/30,P=S=>{T=requestAnimationFrame(P);const j=S-G;j<U||(G=S,a.forEach(N=>N.update(j/1e3)),i.needsRender=!0)};return T=requestAnimationFrame(P),()=>{cancelAnimationFrame(T)}},R={play:()=>{D||(E.play(),D=y(),requestAnimationFrame(()=>{e.object&&e.object.rotation.z!==e.rad&&(e.object.rotation.z=e.rad)}))},stop:()=>{E.stop(),D==null||D(),D=void 0}};e.animation=R},d=C=>{var E;if(!e.object)return console.error("ModelEntryDoorGuidePlugin.enable(): object is ",e.object);((E=C==null?void 0:C.animationEnable)!=null?E:n)&&(e.animation||c(),e.animation.play()),i.scene.add(e.object),i.needsRender=!0},f=()=>{!e.object||(e.animation&&e.animation.stop(),i.scene.remove(e.object),i.needsRender=!0)},u=C=>C==="Floorplan"?d():f();return{load:l,enable:C=>(e.enabled||(e.enabled=!0,u(i.currentMode),i.on("modeChange",u),d(C)),!0),disable:()=>(e.enabled&&(e.enabled=!1,f(),i.off("modeChange",u)),!0)}};class Oi extends on.default.Tween{constructor(){super(...arguments);p(this,"disposeMethods",[]);p(this,"animationFrameDisposer");p(this,"onDispose",e=>(this.disposeMethods.push(e),this));p(this,"play",()=>(this.start(0),this.animationFrameDisposer=Vn(e=>this.update(e)),this));p(this,"dispose",()=>{var e;this.stop(),(e=this.animationFrameDisposer)==null||e.call(this),this.disposeMethods.forEach(n=>n()),this.disposeMethods=[],on.default.remove(this)})}}function Ms(i,t=on.default.Easing.Linear.None){const e=new Oi({progress:0}).to({progress:1});return i!==void 0&&e.duration(i),t!==void 0&&e.easing(t),e}const pn=window.requestAnimationFrame||(i=>setTimeout(i,16)),hu=window.cancelAnimationFrame||clearTimeout;function Un(i,t=0){t<=0?pn(i):pn(()=>Un(i,t-1))}function Vn(i,t=60){let e=-1,n=0,o=-1;const s=1e3/t;function r(a){o===-1&&(o=a),e=pn(r),!(a-n<s)&&(n=a,i&&i(a-o))}return e=pn(r),function(){hu(e)}}function mu(){const i=Date.now();return new Promise(t=>{pn(()=>{t(Date.now()-i)})})}const pu=yn.Easing;function gu(i,t,e,n=pu.Linear.None){const o=new yn.Tween(i).to(t,e).easing(n);Un(()=>o.start(0));const s=Vn(a=>{o.update(a)===!1&&s()}),r=[];return o.onDestroy=a=>(r.push(a),o),o.destroy=function(){this.stop(),Object.assign(o,{_onStartCallback:null,_onUpdateCallback:null,_onCompleteCallback:null,_onStopCallbackL:null});let a;for(;a=r.shift();)a();s()},o}function Au(i,t){return gu({progress:0},{progress:1},i,t)}var js=(i=>(i.Move="Move",i.Rotate="Rotate",i))(js||{}),et=(i=>(i.Clockwise="Clockwise",i.Anticlockwise="Anticlockwise",i.Loop="Loop",i))(et||{});const Jn=Math.PI*2;function Bs(i){return(i%Jn+Jn)%Jn}function Ts(i){return i%Jn}function Ri(i,t,e){return i+(t-i)*e}const Fi=(i,t,e)=>{const n=Math.PI,o=n*2;return i=Bs(i),t=Bs(t),e===et.Anticlockwise&&i<t&&(i+=o),e===et.Clockwise&&t<i&&(t+=o),e===et.Loop&&t-i>n?Fi(i,t,et.Anticlockwise):e===et.Loop&&i-t>n?Fi(i,t,et.Clockwise):{from:i,to:t}},vu=i=>{const t={},e=(l,c,...d)=>Z(this,[l,c,...d],function*(s,r,a={preload:!0}){return t.interruptCallback&&t.interruptCallback(!1),a.asyncStartCallback&&(yield a.asyncStartCallback()),s.mode&&s.mode!==i.currentMode&&(yield i.changeMode(s.mode)),a.preload&&s.panoIndex!==void 0&&s.panoIndex!==i.panoIndex&&(yield i.preloadPano(s.panoIndex)),a.asyncEndCallback&&(yield a.asyncEndCallback()),s.panoIndex===void 0&&s.fov===void 0&&s.latitude===void 0&&s.longitude===void 0?!0:yield new Promise((f,u)=>{const h=s.panoIndex!==void 0?s.panoIndex:i.panoIndex;h!==void 0?i.moveToPano(h,Object.assign({duration:r,moveEndCallback:()=>f(!0),moveCancelCallback:()=>u(!1)},s)):u(!1)})}),n=s=>{const r=i.state,a=Ts(r.latitude),l=Ts(s.latitude),{from:c,to:d}=Fi(r.longitude,s.longitude,s.rotation||et.Loop),f=r.fov,u=s.fov;return{from:{latitude:a,longitude:c,fov:f},to:{latitude:l,longitude:d,fov:u}}};return{move:e,rotate:(l,c,...d)=>Z(this,[l,c,...d],function*(s,r,a={}){t.interruptCallback&&t.interruptCallback(!1),a.asyncStartCallback&&(yield a.asyncStartCallback()),i.currentMode!==me.Five.Mode.Panorama&&(yield i.changeMode(me.Five.Mode.Panorama)),s.panoIndex!==void 0&&s.panoIndex!==i.panoIndex&&(a.preload&&(yield i.preloadPano(s.panoIndex)),yield new Promise((h,m)=>{if(!s.panoIndex){h(!0);return}i.moveToPano(s.panoIndex,{moveEndCallback:()=>h(!0),moveCancelCallback:()=>m(!1)})})),a.asyncEndCallback&&(yield a.asyncEndCallback());const{from:f,to:u}=n(s);return yield new Promise(h=>{const m=({progress:w})=>{const E={};E.longitude=Ri(f.longitude,u.longitude,w),E.latitude=Ri(f.latitude,u.latitude,w),E.fov=Ri(f.fov,u.fov,w),i.setState(E,!0)},g=()=>{h(!0)},v=()=>{h(!1)},A=s.rotateSpeed?Math.ceil(Math.abs(u.longitude-f.longitude)/s.rotateSpeed*1e3):r,C=Au(A,yn.Easing.Linear.None).onUpdate(m).onComplete(g).onDestroy(v);s.rotation===et.Loop&&C.repeat(1/0).yoyo(!0),t.interruptCallback=(w=!0)=>{C.destroy(),t.interruptCallback=void 0,t.timeoutId&&(clearTimeout(t.timeoutId),t.timeoutId=void 0),h(w)},t.timeoutId=setTimeout(()=>{t.interruptCallback&&t.interruptCallback(!0)},r)})})}};function Qs(i,t){return i.x===t.x&&i.y===t.y}function Os(i,t){return Math.abs(i)===1/0&&Math.abs(t)===1/0?!0:Math.abs(i-t)<.001}function Zn(i,t){return(t.y-i.y)/(t.x-i.x)}function Rs(i,t,e){const n=Zn(i[1],i[0]),o=Zn(t[1],t[0]);if(isNaN(n)||isNaN(o)||Os(n,o))return!1;if(_n(i[0],t))return i[0];if(_n(i[1],t))return i[1];if(_n(t[0],i))return t[0];if(_n(t[1],i))return t[1];if(e&&!bu(i,t))return!1;const s=i[0],r=t[0];if(Math.abs(n)===1/0)return{x:s.x,y:t[1].y-(t[1].x-s.x)*o};if(Math.abs(o)===1/0)return{x:r.x,y:i[1].y-(i[1].x-r.x)*n};const a=(r.y-s.y+n*s.x-o*r.x)/(n-o),l=n*a-n*s.x+s.y;return{x:a,y:l}}function _n(i,t){return Qs(i,t[0])||Qs(i,t[1])?!0:(t[0].x-i.x)*(i.x-t[1].x)>=0&&(t[0].y-i.y)*(i.y-t[1].y)>=0&&Os(Zn(t[0],i),Zn(i,t[1]))}function qn(i,t,e){return(i.x-e.x)*(t.y-e.y)-(t.x-e.x)*(i.y-e.y)}function bu(i,t){return Math.max(i[0].x,i[1].x)>=Math.min(t[0].x,t[1].x)&&Math.max(t[0].x,t[1].x)>=Math.min(i[0].x,i[1].x)&&Math.max(i[0].y,i[1].y)>=Math.min(t[0].y,t[1].y)&&qn(t[0],i[1],i[0])*qn(i[1],t[1],i[0])>0&&qn(i[0],t[1],t[0])*qn(t[1],i[1],t[0])>0?1:0}function Fs(i,t=0){t<=0?requestAnimationFrame(i):requestAnimationFrame(()=>Fs(i,t-1))}const yu=`<style type="text/css">
|
|
116
116
|
.PanoRulerPlugin-rule-line {
|
|
117
117
|
position: absolute;
|
|
118
118
|
transform-origin: left center;
|
|
@@ -205,7 +205,7 @@ transition: all 500ms;
|
|
|
205
205
|
<div class="PanoRulerPlugin-rule-label-name">${e.options.distanceText(v)}</div>
|
|
206
206
|
</div>
|
|
207
207
|
</div>
|
|
208
|
-
`,C=document.createElement("div");return C.setAttribute("class","PanoRulerPlugin-rule"),C.setAttribute("data-name",g),C.setAttribute("style","display: none"),C.innerHTML=A,C},o=document.createElement("div");o.setAttribute("style","position: absolute;pointer-events: none;width: 100%;height: 100%;left: 0;top: 0;overflow: hidden;");const s=document.createElement("div");s.innerHTML=yu,o.appendChild(s);const r={},a=(g,v)=>{if(e.loaded)throw new Error("\u6807\u5C3A\u88AB\u91CD\u590D\u521D\u59CB\u5316\uFF01");const A=Cu(g,i),C=i.work;if(!C)return!1;for(const w in v){const E=v[w],{standingPosition:D}=C.observers[0],y=E.map(({x:L,z:x,observers:O})=>{const T=O.length>0?g.rooms[g.observers[O[0]]].name:"",G=A[T]?A[T].floor:null;let U=1/0,P={index:0,x:D.x,y:D.y,z:D.z};O.forEach(X=>{if(!C.observers[X])return;const{standingPosition:V}=C.observers[X],ce={index:X,x:V.x,y:V.y,z:V.z},de=wu({x:L,z:x},ce);G?de<U&&Math.abs(ce.y-G)<.3&&(U=de,P=ce):de<U&&(U=de,P=ce)});const S=new H.Vector3(L,P.y,x);Object.assign(S,{observers:O});const j=A[T]?A[T].roof:null,W=j?new H.Vector3(L,j,x):null;return W&&Object.assign(W,{observers:O}),{origin:S,vertical:W}});r[w]={origins:y.map(L=>L.origin),rules:[]};for(const{origin:L,vertical:x}of y){if(!x)continue;const O=n(w,L.distanceTo(x));o.append(O),r[w].rules.push({vertical:!0,rule:[L,x],$element:O})}for(let L=0;L<y.length;L++){let x=L+1;x>=y.length&&(x=0);const{origin:O}=y[L],{origin:T}=y[x],G=n(w,O.distanceTo(T));o.append(G),r[w].rules.push({vertical:!1,rule:[O,T],$element:G})}}return e.loaded=!0,!0},l=(g,v,A)=>Z(this,null,function*(){const C=g||t.roomInfo,w=v||t.roomRules;if(!C||!w)throw new Error("\u6807\u5C3A\u6570\u636E\u4F9D\u8D56\u4E0D\u9F50\u5168\uFF01");return e.loaded=!1,e.options=N(N({},e.options),A||{}),i.model.loaded?a(C,w):yield new Promise(E=>i.once("modelLoaded",()=>E(a(C,w))))});t.roomInfo&&t.roomRules&&l(t.roomInfo,t.roomRules);const c=(g,v,A,C)=>{const w=[[{x:0,y:0},{x:A,y:0}],[{x:0,y:0},{x:0,y:C}],[{x:A,y:0},{x:A,y:C}],[{x:0,y:C},{x:A,y:C}]],E=[];for(let D=0;D<w.length;D++){const y=Rs([g,v],[w[D][0],w[D][1]],!0);y&&E.push(y)}return E.length===0?!1:E},d=()=>{var O;const g=(O=i.getElement())==null?void 0:O.parentElement;if(!g||!e.loaded||Object.keys(r).length<=0)return;const{panoIndex:v,camera:A,currentMode:C}=i;if(v===void 0)return;let w;for(const T in r)T.split(",").indexOf(v.toString())>=0&&(w=T);if(!w){for(const T in r)for(const{$element:G}of r[T].rules)G.style.display="none";return}const E=A.position,D=A.getWorldDirection(new H.Vector3),y=g.clientWidth,L=g.clientHeight;if(C!==me.Five.Mode.Panorama){for(const T in r)for(const{$element:G}of r[T].rules)G.style.display="none";return}for(const T in r)for(const{$element:G}of r[T].rules)G.style.display=T===w?"block":"none";const[x]=r[w].origins.slice().filter(T=>T.observers.indexOf(v)>=0).sort((T,G)=>{const U=T.clone().setY(0).sub(E).normalize().angleTo(D.clone().setY(0)),P=G.clone().setY(0).sub(E).normalize().angleTo(D.clone().setY(0));return U-P});for(const{rule:T,vertical:G,$element:U}of r[w].rules){const[P,S]=T,j=U.querySelector(".PanoRulerPlugin-rule-line");if(!j)return;if(!x){U.style.display="none";continue}if(P!==x&&S!==x){U.style.display="none";continue}if(P.distanceTo(S)<.3){U.style.display="none";continue}if(P.observers.indexOf(v)===-1||S.observers.indexOf(v)===-1){U.style.display="none";continue}if(P.clone().sub(E).normalize().angleTo(D)>Math.PI/2){U.style.display="none";continue}if(S.clone().sub(E).normalize().angleTo(D)>Math.PI/2){U.style.display="none";continue}const te=P.distanceTo(S);if(S.clone().sub(S.clone().sub(P).divide(new H.Vector3(2,2,2))).distanceTo(E)/te>8){U.style.display="none";continue}const ce=P.clone().project(A),de=(ce.x+1)/2*y,ge=(-ce.y+1)/2*L,Pe=S.clone().project(A),ze=(Pe.x+1)/2*y,He=(-Pe.y+1)/2*L,re=Math.sqrt(Math.pow(ze-de,2)+Math.pow(He-ge,2));let we=re,Ee=50;const ae=c({x:~~de,y:~~ge},{x:~~ze,y:~~He},y,L);if(ae&&ae.length===1&&(x===P?(we=Math.sqrt(Math.pow(ae[0].x-de,2)+Math.pow(ae[0].y-ge,2)),Ee=we/re*50):x===S&&(we=Math.sqrt(Math.pow(ae[0].x-ze,2)+Math.pow(ae[0].y-He,2)),Ee=100-we/re*50)),ae&&ae.length===2){const wt={x:(ae[0].x+ae[1].x)/2,y:(ae[0].y+ae[1].y)/2};Ee=Math.sqrt(Math.pow(wt.x-de,2)+Math.pow(wt.y-ge,2))/re*100}const Ht=(Math.PI/2-Math.atan2(ze-de,ge-He))/Math.PI*180,ye=j.querySelector(".PanoRulerPlugin-rule-label"),yt=ye.children[0].clientWidth;yt>=re||yt/2>=Ee/100*re||yt/2>=(1-Ee/100)*re?j.style.display="none":(j.style.display="block",j.style.width=re+"px",j.style.left=de+"px",j.style.top=ge+"px",j.style.transform=`rotate(${-Ht}deg)`,ye.style.left=`${Ee}%`)}},f=()=>Fs(d),u=()=>{var g,v;return e.loaded?(e.enable||(o.setAttribute("class","PanoRulerPlugin"+(e.options.className?" "+e.options.className:"")),(v=(g=i.getElement())==null?void 0:g.parentElement)==null||v.append(o),d(),i.on("modeChange",d),i.on("cameraUpdate",f),e.enable=!0),!0):!1},h=()=>(e.enable&&(i.off("modeChange",d),i.off("cameraUpdate",f),o&&o.remove(),e.enable=!1),!0);function m(g){if(g.distanceText&&g.distanceText!==e.options.distanceText){const v=g.distanceText;e.options.distanceText=v,Object.values(r).forEach(A=>{A.rules.forEach(C=>{const[w,E]=C.rule,D=w.distanceTo(E),y=C.$element.querySelector(".PanoRulerPlugin-rule-label-name");!y||(y.innerText=v(D))})})}}return{enable:u,disable:h,load:l,state:e,changeConfigs:m}};function Iu(i){le(i,"svelte-1h27ktp",".PanoRulerPlugin-rule-line.svelte-1h27ktp.svelte-1h27ktp{position:absolute;transform-origin:left 0.0625rem;width:0;height:0.125rem;pointer-events:none}.PanoRulerPlugin-rule-line.svelte-1h27ktp.svelte-1h27ktp::after{content:'';position:absolute;left:-0.125rem;top:-0.1rem;width:0.25rem;height:0.25rem;border-radius:50%;background:#fff;z-index:1;animation:svelte-1h27ktp-viewport-rule-point 0.1s 1s;animation-fill-mode:both}.PanoRulerPlugin-rule-line.svelte-1h27ktp.svelte-1h27ktp::before{content:'';position:absolute;right:-0.125rem;top:-0.1rem;width:0.25rem;height:0.25rem;border-radius:50%;background:#fff;z-index:1;animation:svelte-1h27ktp-viewport-rule-point 0.1s 1.5s;animation-fill-mode:both}.PanoRulerPlugin-rule-line.svelte-1h27ktp em.svelte-1h27ktp{display:block;height:0.0625rem;animation:svelte-1h27ktp-viewport-rule-line 0.5s ease 1s;animation-fill-mode:both;box-shadow:0 0 0.25rem rgb(0 0 0 / 40%);position:relative}.rule-mixed-line.svelte-1h27ktp.svelte-1h27ktp{display:flex;height:0.0625rem;animation:svelte-1h27ktp-viewport-rule-line 0.5s ease 1s;animation-fill-mode:both;align-items:center}.em-solid.svelte-1h27ktp.svelte-1h27ktp{height:100%;background:#ffffff}.em-dotted.svelte-1h27ktp.svelte-1h27ktp{height:0.125rem;background:var(--background-image);background-position:center;background-repeat:repeat}.PanoRulerPlugin-rule-label.svelte-1h27ktp.svelte-1h27ktp{position:absolute;width:0;height:0;top:0.0625rem;pointer-events:none}.PanoRulerPlugin-rule-label-name.svelte-1h27ktp.svelte-1h27ktp{position:absolute;padding:0.1875rem 0.375rem;background:rgba(195, 195, 195, 0.3);backdrop-filter:blur(0.25rem);-webkit-backdrop-filter:blur(0.25rem);border-radius:6.25rem;border:0.0625rem solid rgba(255, 255, 255, 0.6);white-space:nowrap;overflow:hidden;color:#ffffff;font-weight:500;font-size:0.75rem;line-height:1;animation:svelte-1h27ktp-viewport-rule-label 0.25s ease 1s;animation-fill-mode:both;box-shadow:inset 0 0 0.625rem 0 rgba(255, 255, 255, 0.3)}@keyframes svelte-1h27ktp-viewport-rule-line{0%{width:0%}100%{width:100%}}@keyframes svelte-1h27ktp-viewport-rule-label{0%{opacity:0;transform:scaleX(0)}100%{opacity:1;transform:translate(-50%, -50%) scaleX(1)}}@keyframes svelte-1h27ktp-viewport-rule-point{0%{transform:scaleX(0)}100%{transform:scaleX(1)}}")}function Hs(i,t,e){const n=i.slice();return n[6]=t[e],n}function Eu(i){let t,e=i[0].children,n=[];for(let o=0;o<e.length;o+=1)n[o]=Gs(Hs(i,e,o));return{c(){t=Q("div");for(let o=0;o<n.length;o+=1)n[o].c();b(t,"class","rule-mixed-line svelte-1h27ktp")},m(o,s){B(o,t,s);for(let r=0;r<n.length;r+=1)n[r].m(t,null)},p(o,s){if(s&9){e=o[0].children;let r;for(r=0;r<e.length;r+=1){const a=Hs(o,e,r);n[r]?n[r].p(a,s):(n[r]=Gs(a),n[r].c(),n[r].m(t,null))}for(;r<n.length;r+=1)n[r].d(1);n.length=e.length}},d(o){o&&z(t),Ke(n,o)}}}function xu(i){let t,e;return{c(){t=Q("em"),b(t,"class",e=Oe(i[0].state?"em-solid":"em-dotted")+" svelte-1h27ktp"),b(t,"style",i[3])},m(n,o){B(n,t,o)},p(n,o){o&1&&e!==(e=Oe(n[0].state?"em-solid":"em-dotted")+" svelte-1h27ktp")&&b(t,"class",e),o&8&&b(t,"style",n[3])},d(n){n&&z(t)}}}function Gs(i){let t,e,n=`${i[6].width}px`;return{c(){t=Q("div"),b(t,"class",e=Oe(i[6].state?"em-solid":"em-dotted")+" svelte-1h27ktp"),b(t,"style",i[3]),F(t,"width",n,!1)},m(o,s){B(o,t,s)},p(o,s){s&1&&e!==(e=Oe(o[6].state?"em-solid":"em-dotted")+" svelte-1h27ktp")&&b(t,"class",e),s&8&&b(t,"style",o[3]),s&1&&n!==(n=`${o[6].width}px`)&&F(t,"width",n,!1)},d(o){o&&z(t)}}}function ku(i){let t,e,n,o,s=i[0].labelElement+"",r,a,l=`${i[0].labelOffset}%`,c=`${i[0].width}px`,d=`${i[0].left}px`,f=`${i[0].top}px`,u=`rotate(${i[0].rotateDeg}deg)`;function h(v,A){return v[0].children.length===0?xu:Eu}let m=h(i),g=m(i);return{c(){t=Q("div"),g.c(),e=_(),n=Q("div"),o=Q("div"),r=Le(s),b(o,"class","PanoRulerPlugin-rule-label-name svelte-1h27ktp"),De(()=>i[4].call(o)),b(n,"class","PanoRulerPlugin-rule-label svelte-1h27ktp"),F(n,"left",l,!1),b(t,"class","PanoRulerPlugin-rule-line svelte-1h27ktp"),F(t,"width",c,!1),F(t,"left",d,!1),F(t,"top",f,!1),F(t,"transform",u,!1),F(t,"display",i[0].visible&&i[2]?"block":"none",!1)},m(v,A){B(v,t,A),g.m(t,null),R(t,e),R(t,n),R(n,o),R(o,r),a=ft(o,i[4].bind(o))},p(v,[A]){m===(m=h(v))&&g?g.p(v,A):(g.d(1),g=m(v),g&&(g.c(),g.m(t,e))),A&1&&s!==(s=v[0].labelElement+"")&&je(r,s),A&1&&l!==(l=`${v[0].labelOffset}%`)&&F(n,"left",l,!1),A&1&&c!==(c=`${v[0].width}px`)&&F(t,"width",c,!1),A&1&&d!==(d=`${v[0].left}px`)&&F(t,"left",d,!1),A&1&&f!==(f=`${v[0].top}px`)&&F(t,"top",f,!1),A&1&&u!==(u=`rotate(${v[0].rotateDeg}deg)`)&&F(t,"transform",u,!1),A&5&&F(t,"display",v[0].visible&&v[2]?"block":"none",!1)},i:ne,o:ne,d(v){v&&z(t),g.d(),a()}}}function Du(i,t,e){let n,{rulerItemProp:o}=t,s=!0,r,a="data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQiIHdpZHRoPSIxMiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PGRlZnM+PGZpbHRlciBpZD0icHJlZml4X19hIiBoZWlnaHQ9IjQwMCUiIHdpZHRoPSIxMzcuNCUiIHg9Ii0xOC43JSIgeT0iLTE1MCUiPjxmZU1vcnBob2xvZ3kgaW49IlNvdXJjZUFscGhhIiBvcGVyYXRvcj0iZGlsYXRlIiByYWRpdXM9Ii41IiByZXN1bHQ9InNoYWRvd1NwcmVhZE91dGVyMSIvPjxmZU9mZnNldCBpbj0ic2hhZG93U3ByZWFkT3V0ZXIxIiByZXN1bHQ9InNoYWRvd09mZnNldE91dGVyMSIvPjxmZU1vcnBob2xvZ3kgaW49IlNvdXJjZUFscGhhIiByYWRpdXM9IjEiIHJlc3VsdD0ic2hhZG93SW5uZXIiLz48ZmVPZmZzZXQgaW49InNoYWRvd0lubmVyIiByZXN1bHQ9InNoYWRvd0lubmVyIi8+PGZlQ29tcG9zaXRlIGluPSJzaGFkb3dPZmZzZXRPdXRlcjEiIGluMj0ic2hhZG93SW5uZXIiIG9wZXJhdG9yPSJvdXQiIHJlc3VsdD0ic2hhZG93T2Zmc2V0T3V0ZXIxIi8+PGZlR2F1c3NpYW5CbHVyIGluPSJzaGFkb3dPZmZzZXRPdXRlcjEiIHJlc3VsdD0ic2hhZG93Qmx1ck91dGVyMSIgc3RkRGV2aWF0aW9uPSIuNSIvPjxmZUNvbG9yTWF0cml4IGluPSJzaGFkb3dCbHVyT3V0ZXIxIiB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAuMiAwIi8+PC9maWx0ZXI+PHBhdGggaWQ9InByZWZpeF9fYiIgZD0iTS44ODkgMkgxMS41OCIvPjwvZGVmcz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZS1kYXNoYXJyYXk9IjUgNiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48dXNlIGZpbGw9IiMwMDAiIGZpbHRlcj0idXJsKCNwcmVmaXhfX2EpIiB4bGluazpocmVmPSIjcHJlZml4X19iIi8+PHVzZSBzdHJva2U9IiNmZmYiIHN0cm9rZS1vcGFjaXR5PSIuNCIgeGxpbms6aHJlZj0iI3ByZWZpeF9fYiIvPjwvZz48L3N2Zz4=";function l(){r=this.offsetWidth,e(1,r)}return i.$$set=c=>{"rulerItemProp"in c&&e(0,o=c.rulerItemProp)},i.$$.update=()=>{i.$$.dirty&3&&(r>=o.width||r/2>=o.labelOffset/100*o.width||r/2>=(1-o.labelOffset/100)*o.width?e(2,s=!1):e(2,s=!0))},e(3,n=`--background-image: url(${a})`),[o,r,s,n,l]}class Lu extends se{constructor(t){super(),oe(this,t,Du,ku,ie,{rulerItemProp:0},Iu)}}function Ns(i,t,e){const n=i.slice();return n[12]=t[e],n}function Ws(i){let t,e;return t=new Lu({props:{rulerItemProp:i[12]}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.rulerItemProp=n[12]),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function Su(i){let t,e,n=i[0],o=[];for(let r=0;r<n.length;r+=1)o[r]=Ws(Ns(i,n,r));const s=r=>M(o[r],1,1,()=>{o[r]=null});return{c(){t=Q("div");for(let r=0;r<o.length;r+=1)o[r].c()},m(r,a){B(r,t,a);for(let l=0;l<o.length;l+=1)o[l].m(t,null);e=!0},p(r,[a]){if(a&1){n=r[0];let l;for(l=0;l<n.length;l+=1){const c=Ns(r,n,l);o[l]?(o[l].p(c,a),k(o[l],1)):(o[l]=Ws(c),o[l].c(),k(o[l],1),o[l].m(t,null))}for(fe(),l=n.length;l<o.length;l+=1)s(l);he()}},i(r){if(!e){for(let a=0;a<n.length;a+=1)k(o[a]);e=!0}},o(r){o=o.filter(Boolean);for(let a=0;a<o.length;a+=1)M(o[a]);e=!1},d(r){r&&z(t),Ke(o,r)}}}function zu(i,t,e){var g,v,A,C;let{five:n}=t,{rulerDatas:o}=t,{options:s}=t,r=[];const a=((v=(g=n.getElement())==null?void 0:g.parentElement)==null?void 0:v.clientWidth)||0,l=((C=(A=n.getElement())==null?void 0:A.parentElement)==null?void 0:C.clientHeight)||0,c=(w,E)=>{const D=[[{x:0,y:0},{x:a,y:0}],[{x:0,y:0},{x:0,y:l}],[{x:a,y:0},{x:a,y:l}],[{x:0,y:l},{x:a,y:l}]],y=[];for(let L=0;L<D.length;L++){const x=Rs([w,E],[D[L][0],D[L][1]],!0);x&&y.push(x)}return y.length===0?!1:y},d=(w,E)=>{const D=w.clone().project(n.camera),y=(D.x+1)/2*a,L=(-D.y+1)/2*l,x=E.clone().project(n.camera),O=(x.x+1)/2*a,T=(-x.y+1)/2*l,G=Math.sqrt(Math.pow(O-y,2)+Math.pow(T-L,2));return{startLeft:y,startTop:L,endLeft:O,endTop:T,distance:G}},f=(w,E,D)=>{const y=n.camera.position,L=n.camera.getWorldDirection(new H.Vector3),x=w.clone().sub(y).normalize().angleTo(L),O=E.clone().sub(y).normalize().angleTo(L),T=w.distanceTo(E),U=E.clone().sub(E.clone().sub(w).divide(new H.Vector3(2,2,2))).distanceTo(y),{startLeft:P,startTop:S,endLeft:j,endTop:W,distance:Y}=d(w,E),X=-((Math.PI/2-Math.atan2(j-P,S-W))/Math.PI)*180;let V=!0;D||(V=!1),!$e(w,D)&&!$e(E,D)&&(V=!1),T<.3&&(V=!1),x>Math.PI/2&&(V=!1),O>Math.PI/2&&(V=!1),U/T>8&&(V=!1);let ce=50,de=Y;const ge=c({x:~~P,y:~~S},{x:~~j,y:~~W});if(ge&&ge.length===1&&($e(w,D)?(de=Math.sqrt(Math.pow(ge[0].x-P,2)+Math.pow(ge[0].y-S,2)),ce=de/Y*50):$e(E,D)&&(de=Math.sqrt(Math.pow(ge[0].x-j,2)+Math.pow(ge[0].y-W,2)),ce=100-de/Y*50)),ge&&ge.length===2){const Pe={x:(ge[0].x+ge[1].x)/2,y:(ge[0].y+ge[1].y)/2};ce=Math.sqrt(Math.pow(Pe.x-P,2)+Math.pow(Pe.y-S,2))/Y*100}return{startLeft:P,startTop:S,distance:Y,deg:X,visible:V,labelOffset:ce,ruleLength:T}},u=()=>{const w=n.panoIndex,E=o.find(G=>G.panoIndex===w);if(!E)return e(0,r=[]);if(n.currentMode!==me.Five.Mode.Panorama)return e(0,r=[]);const D=n.camera.position,y=n.camera.getWorldDirection(new H.Vector3),L=E.lines.map(G=>new H.Vector3(G.start[0],-G.start[1],-G.start[2])),x=E.lines.map(G=>new H.Vector3(G.end[0],-G.end[1],-G.end[2])),[O]=L.concat(x).sort((G,U)=>{const P=G.clone().setY(0).sub(D).normalize().angleTo(y.clone().setY(0)),S=U.clone().setY(0).sub(D).normalize().angleTo(y.clone().setY(0));return P-S}),T=E.lines.map(G=>{var de,ge;const U=G.start,P=G.end,{startLeft:S,startTop:j,distance:W,deg:Y,visible:te,labelOffset:X,ruleLength:V}=f(new H.Vector3(U[0],-U[1],-U[2]),new H.Vector3(P[0],-P[1],-P[2]),O),ce=[];return G.children&&((de=G.children)==null?void 0:de.length)>0&&((ge=G.children)==null||ge.forEach(Pe=>{const ze=Pe.start,He=Pe.end,{distance:re}=d(new H.Vector3(ze[0],-ze[1],-ze[2]),new H.Vector3(He[0],-He[1],-He[2]));ce.push({width:re,state:Pe.state})})),{width:W,left:S,top:j,rotateDeg:Y,state:G.state,children:ce,labelOffset:X,visible:te,labelElement:s.distanceText(V)}});e(0,r=T)},h=()=>Yn(u),m=Ti(u,80);return Ue(()=>{u(),n.on("panoArrived",u),n.on("modeChange",u),n.on("cameraDirectionUpdate",h),n.on("movingToPano",h),n.on("mouseWheel",()=>m()),n.on("pinchGesture",()=>m())}),ht(()=>{n.off("panoArrived",u),n.off("modeChange",u),n.off("cameraDirectionUpdate",h),n.off("movingToPano",h),n.off("mouseWheel",()=>m()),n.off("pinchGesture",()=>m())}),i.$$set=w=>{"five"in w&&e(1,n=w.five),"rulerDatas"in w&&e(2,o=w.rulerDatas),"options"in w&&e(3,s=w.options)},[r,n,o,s]}class Mu extends se{constructor(t){super(),oe(this,t,zu,Su,ie,{five:1,rulerDatas:2,options:3})}}class ju{constructor(t,e){p(this,"five");p(this,"container",document.createElement("div"));p(this,"panoRulerProData");p(this,"rulerItems");p(this,"state",{enabled:!1,loaded:!1,options:{className:"",distanceText:t=>`${t.toFixed(1)}m`}});var n,o;this.five=t,this.container.classList.add("panoRulerProPlugin-container"),this.container.setAttribute("style","position: absolute;pointer-events: none;width: 100%;height: 100%;left: 0;top: 0;overflow: hidden;"),e&&(e.data&&this.load(e.data),this.state.options=N(N({},this.state.options),e.options||{}),(n=e.options)!=null&&n.className&&this.container.classList.add((o=e.options)==null?void 0:o.className)),this.five.once("modelLoaded",()=>Z(this,null,function*(){var s,r;(r=(s=this.five.getElement())==null?void 0:s.parentNode)==null||r.append(this.container)})),this.five.once("dispose",()=>this.dispose())}load(t){return Z(this,null,function*(){if(!this.five.work)return;const e=t.data;if(!e)throw new Error("\u6807\u5C3A\u6570\u636E\u4F9D\u8D56\u4E0D\u9F50\u5168\uFF01");this.panoRulerProData=e,this.state.loaded=!0})}enable(){return this.state.loaded?(this.state.enabled||(this.state.enabled=!0,this.render()),!0):!1}disable(){return this.state.enabled&&(this.state.enabled=!1,this.render()),!0}render(){return Z(this,null,function*(){var t;if(this.state.enabled){if(!this.panoRulerProData||!this.container)return;this.rulerItems=new Mu({target:this.container,props:{five:this.five,rulerDatas:this.panoRulerProData,options:this.state.options}})}else(t=this.rulerItems)==null||t.$destroy(),this.rulerItems=void 0})}dispose(){this.container&&(this.rulerItems.$destroy(),this.rulerItems=void 0),this.container.remove()}}const Bu=(i,t)=>new ju(i,t),Tu="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZIAAABCCAYAAAB9y1BhAAAAAXNSR0IArs4c6QAADh5JREFUeAHtnVuPLDcVhedwC/dACKAICDxEIBQpygNI/Ab+MX8B8YCQEAjxgBAQLsm5Jjkn58r6Sl4jT52qnu4zXd121dqSx67q7ip7eXsv721XzcVFJAgEgSAQBIJAEAgCQeC4CLx48eKbSu+RH/fKuVoQWB8Cn1tfk9KiIHAUBH6tq/xKiTwSBILADgRCJDvAyUebRuAbpfXxSDatBmn8Pgh8YZ8v5TtBYIMIvFCbSZEgEASuQSBEcg1A+XizCDzfbMvT8CBwIAIhkgMBy9c3g0CIZDNdnYbeFIEQyU0RzO/XikCIZK09m3YdHYEQydEhzQVXgkCIZCUdmWYsj0CIZHmMc4c+EchCe5/9llqfAYEQyRlAzy27QCAeSRfdlEq2gECIpIVeSB1aRAAiudVixVKnINAaAiGS1nok9WkFAUJb8Upa6Y3Uo2kEQiRNd08qd0YEQiJnBD+37guBEElf/ZXang6BEMnpsM6dOkcgRNJ5B66x+nrjLmsTX1J6bSJHZ7+o9HklynWaOse1eKcc+XVlvxYFEnlfaThWfb7mcsn5nPRM6WmVU55KfO+J0mdKj8f5rVu3skNMoET6RSBE0m/fdVNzGWII4StKXy65y18t58aEAVGcUjDkGHsLhIOYfC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FPbdu194LKt+kEdtT/SIQLS4Tddbenohy4nDwKnQGAPG4rdZALehA09KpGo8bhou9iUbbs0/jMNTscBdRgJAm0hIF1+wzWSrt52OXkQOCUC0kNsNNuHsatz24iHqI709GxLAjcmktJQEwj5WPA+aCiuWB4YHKOT4yYRkF7zUNkg0lueSI4EgbMiIJ1kZyshL9LUOjNEwkT9sXT2pBP1VyaSQiCse9Coqa27LApBIPE+BEKkLwSk32zRHESDkp0zkSDQBALF9uKdYHunnkthwo7tfXQqQjmYSNQImBACIU2xIuGreB8CIdIvAtJzNogMosHI4mYkCDSHgPTUXspU2ItoEIvzEArlxWRvIlGFWTSnsnWF+b1dKAhk8QrrHpEgsDgC0ndi0oNoEBIuiASBZhGQvnqCz/KCJ/jYZtto7DPRoUU2N11LJIXxqNyUC0VFqeCTpRlP94gEgZMhIL0nbDCIdJswQSQINI9AIRRsNRP+KfvOkgNrKEddr5660YUqw3k8EAhkbvsuCztPVSF7JDqMBIF1IKAxcOl5S8eZLEWCQDcIFBtO2Kv2UOr645lAKkex4VeIpLo5jHbls1KD4eYaWIu4R+UeyYLA2RHQWGAADiJ9P9u2StcheRB4VQSkyzgD2PQppwBH4MaEMpBFRSDcqCYQx9ggDphr0QUb3SMSBJpAQGPiciei9P6oYYAmGphKbA4B6TRrJ+j1HKHYzh8cZbpVBowXZ8bgQhzPNJAOvvD4QjkOAj0hUAbdUOVMoHrqudT1OgSk2zgLkAl2n/LYvh9s900kutYV4UIvQiBXMMlBEAgCQWA1CBRCgUjmHAkI5vk+PACR1BcZmGmfH64GzTQkCASBILBhBAqhgEC9rDFGJI7FGJEcB4EgEASCQBAIAkEgCASBIBAEgkAQCAJBIAgEgSAQBIJAEAgCm0fg/x4jQQWGalpFAAAAAElFTkSuQmCC";function Qu(){const i=document.createElement("div"),t=document.createElement("i"),e=document.createElement("span");return i.appendChild(t),i.appendChild(e),i.style.position="relative",i.style.width="100%",i.style.display="flex",i.style.flexDirection="column",i.style.alignItems="center",i.style.marginTop=`${150/16}rem`,i.style.opacity="0",i.style.transition="opacity 1000ms linear",t.style.display="block",t.style.width=`${134/16}rem`,t.style.height=`${22/16}rem`,t.style.backgroundSize="100%",t.style.backgroundRepeat="no-repeat",t.style.backgroundImage=`url(${Tu})`,e.style.marginTop=`${10/16}rem`,e.style.fontSize=`${16/16}rem`,e.style.color="#fff",e.style.opacity="0.7",e.style.textShadow="0 2px 16px rgb(22 34 83 / 24%)",e.style.fontWeight="bold",{appendTo(n){n.appendChild(i)},dispose(){i.remove()},setRoom(n){e.innerHTML=n.name+" "+Math.floor(n.size/1e6)+"\u33A1"},show(){i.style.opacity="1"},hide(){i.style.opacity="0"}}}const Ou=new I.TextureLoader;function Xs(i){return Z(this,null,function*(){return new Promise((t,e)=>{Ou.load(i,t,void 0,e)}).then(t=>(t.encoding=I.sRGBEncoding,t))})}const qn={userAction:!0};class Ru extends jt{constructor(e,n){super(e);p(this,"state",{visible:!0,enabled:!0,config:{compassImageUrl:"//vrlab-image4.ljcdn.com/release/web/v3/north-point-circle.96498e69.png",entryDoorImageUrl:"//vrlab-image4.ljcdn.com/release/web/enterDoor.831b8208.png"}});p(this,"data");p(this,"group",new I.Group);p(this,"roomInfoInstance");p(this,"roomInfoWrapperInstance");p(this,"compassMeshTween");p(this,"compassMesh");p(this,"entryDoorMesh");p(this,"dispose",()=>{var e,n,o,s;this.five.scene.remove(this.group),this.group.remove(...this.group.children),(n=(e=this.compassMesh)==null?void 0:e.material.map)==null||n.dispose(),(s=(o=this.entryDoorMesh)==null?void 0:o.material.map)==null||s.dispose(),this.five.off("dispose",this.dispose),this.five.off("panoArrived",this.onFivePanoArrived),this.five.off("panoWillArrive",this.onFivePanoWillArrive),this.five.off("cameraDirectionUpdate",this.onFiveCameraDirectionUpdate)});p(this,"_addEventListener",()=>{this.five.on("panoArrived",this.onFivePanoArrived),this.five.on("panoWillArrive",this.onFivePanoWillArrive),this.five.on("modeChange",this.onFiveModeChange),this.five.on("cameraDirectionUpdate",this.onFiveCameraDirectionUpdate)});p(this,"_removeEventListener",()=>{this.five.off("panoArrived",this.onFivePanoArrived),this.five.off("panoWillArrive",this.onFivePanoWillArrive),this.five.off("modeChange",this.onFiveModeChange),this.five.off("cameraDirectionUpdate",this.onFiveCameraDirectionUpdate)});p(this,"_enable",()=>{this.five.scene.add(this.group),this.init(),this.onFivePanoArrived(this.five.panoIndex||0),this._addEventListener()});p(this,"_disable",()=>{this._clearCompassIfNeed(),this._clearEntryDoorIfNeed(),this.five.scene.remove(this.group),this._removeEventListener()});p(this,"_toggleVisible",()=>{this.group.visible=this.state.visible,this.five.needsRender=!0});p(this,"_clearCompassIfNeed",()=>{var e;this.compassMesh&&(this.group.remove(this.compassMesh),(e=this.compassMesh.material.map)==null||e.dispose(),this.compassMesh=null)});p(this,"_clearEntryDoorIfNeed",()=>{var e;this.entryDoorMesh&&(this.group.remove(this.entryDoorMesh),(e=this.entryDoorMesh.material.map)==null||e.dispose(),this.entryDoorMesh=null),this.roomInfoInstance&&(this.roomInfoInstance.dispose(),this.roomInfoInstance=null),this.roomInfoWrapperInstance&&(this.roomInfoWrapperInstance.dispose(),this.roomInfoWrapperInstance=null)});p(this,"onFivePanoWillArrive",e=>{var n,o;e!==this.five.panoIndex&&((n=this.compassMeshTween)==null||n.dispose(),(o=this.compassMesh)==null||o.material.setValues({opacity:0}))});p(this,"onFivePanoArrived",e=>{var o,s,r,a,l,c,d;const n=(r=(s=(o=this.five.work)==null?void 0:o.observers)==null?void 0:s[e])==null?void 0:r.standingPosition;if(this.compassMesh&&(this.compassMesh.position.copy(n.clone().setY(n.y+.01)),this.compassMesh.material.opacity===0&&((a=this.compassMeshTween)==null||a.dispose(),this.compassMeshTween=Ms(1e3).onUpdate(({progress:f})=>{var u;(u=this.compassMesh)==null||u.material.setValues({opacity:f}),this.five.needsRender=!0}).play())),this.entryDoorMesh){const u=new I.Vector3(this.data.entrance.position.x,this.data.entrance.position.y,this.data.entrance.position.z).clone().setY(n.y).sub(n).normalize(),h=n.clone().add(u.clone().multiplyScalar(.7)).setY(n.y+.01);this.entryDoorMesh.rotation.z=new I.Vector3(0,0,-1).angleTo(u),this.entryDoorMesh.position.copy(h),((l=this.data)==null?void 0:l.room_observers[e].room.type)===1?(c=this.entryDoorMesh)==null||c.material.setValues({opacity:1}):(d=this.entryDoorMesh)==null||d.material.setValues({opacity:0})}this.roomInfoInstance&&this.roomInfoWrapperInstance&&(this.roomInfoWrapperInstance.css3DObject.position.copy(n.clone().setY(n.y+.01)),this.roomInfoInstance.setRoom(this.data.room_observers[e].room)),this.five.needsRender=!0});p(this,"onFiveCameraDirectionUpdate",({longitude:e,latitude:n})=>{var o,s;!this.roomInfoWrapperInstance||(this.roomInfoWrapperInstance.css3DObject.rotation.z=e,n>.66&&this.five.getCurrentState().mode==="Panorama"?(o=this.roomInfoInstance)==null||o.show():(s=this.roomInfoInstance)==null||s.hide())});p(this,"onFiveModeChange",(e,n,o,s,r)=>{e!==n&&this.setState({visible:e===me.Five.Mode.Panorama},{userAction:r})});this.five.scene.add(this.group),this.five.once("dispose",this.dispose),this.setState({visible:!0,enabled:!0,config:N(N({},this.state.config),n||{})})}enable(e=qn){this.setState({enabled:!0},e)}disable(e=qn){this.setState({enabled:!1},e)}show(e=qn){if(!!this.state.enabled)return this.setState({visible:!0},e),Promise.resolve()}hide(e=qn){if(!!this.state.enabled)return this.setState({visible:!1},e),Promise.resolve()}setState(e,n={userAction:!0}){var s,r;const o=JSON.parse(JSON.stringify(this.state));this.state={visible:(s=e.visible)!=null?s:o.visible,enabled:(r=e.enabled)!=null?r:o.enabled,config:N(N({},o.config),e.config||{})},this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:n.userAction}),e.enabled===!0&&(this._enable(),this.hooks.emit("enable",n)),e.enabled===!1&&(this._disable(),this.hooks.emit("disable",n)),e.visible===!1&&(this._toggleVisible(),this.hooks.emit("hide",n)),e.visible===!0&&(this._toggleVisible(),this.hooks.emit("show",n)),e.config&&this.init()}load(e,n,o=!0){return Z(this,null,function*(){const s=yield this.formatData(e);JSON.stringify(this.data)!==JSON.stringify(s)&&(this.hooks.emit("dataChange",s,this.data),this.data=N({},s),this.init(),n&&this.setState(n,{userAction:o}),this.hooks.emit("dataLoaded",this.data))})}formatData(e){return e.version&&e.data?Promise.resolve(e.data):Promise.resolve(e)}init(){return Z(this,null,function*(){var o,s,r,a;const e=(s=(o=this.data)==null?void 0:o.north_rad)!=null?s:null;this._clearCompassIfNeed(),e!==null&&(this.compassMesh=yield this.loadCompassMesh(),this.compassMesh.rotateX(-Math.PI/2),this.compassMesh.rotateZ(e-Math.PI/2),this.group.add(this.compassMesh));const n=(a=(r=this.data)==null?void 0:r.entrance)!=null?a:null;this._clearEntryDoorIfNeed(),n!==null&&(this.entryDoorMesh=yield this.loadEntryDoorMesh(),this.roomInfoWrapperInstance=this.loadRoomInfo(),this.roomInfoInstance=Qu(),this.entryDoorMesh.rotateX(-Math.PI/2),this.roomInfoWrapperInstance&&this.roomInfoInstance.appendTo(this.roomInfoWrapperInstance.container),this.group.add(this.entryDoorMesh)),this.onFivePanoArrived(this.five.panoIndex||0),this.five.needsRender=!0})}loadCompassMesh(){return Z(this,null,function*(){const e=this.state.config.compassImageUrl,n=yield Xs(e),o=new I.CircleGeometry(.7,32),s=new I.MeshBasicMaterial({map:n,transparent:!0,opacity:0,depthTest:!1}),r=new I.Mesh(o,s);return r.name="pano-compass-mesh",r})}loadEntryDoorMesh(){return Z(this,null,function*(){const e=this.state.config.entryDoorImageUrl,n=yield Xs(e),o=new I.PlaneGeometry(.2,.16),s=new I.MeshBasicMaterial({map:n,transparent:!0,opacity:.8,depthTest:!1}),r=new I.Mesh(o,s);return r.name="pano-compass-entry-door",r})}loadRoomInfo(){const e=[new I.Vector3(-.7,0,-.7),new I.Vector3(.7,0,-.7),new I.Vector3(.7,0,.7),new I.Vector3(-.7,0,.7)];return Wt(this.five).create3DDomContainer(e)}}const Fu=(i,t)=>new Ru(i,t);function Kn(i,t,e){const n=i[t];i[t]=i[e],i[e]=n}function Hu(i,t,e){const n=e/2;for(let o=1;o<=n;o++){const s=e-(o-1);for(let r=1;r<=t;r++){const a=(o-1)*t+r-1,l=(s-1)*t+r-1;Kn(i,a*4+0,l*4+0),Kn(i,a*4+1,l*4+1),Kn(i,a*4+2,l*4+2),Kn(i,a*4+3,l*4+3)}}}class Ys{constructor(t,e){p(this,"width");p(this,"height");p(this,"visible",!1);p(this,"hooks",new me.Subscribe);p(this,"contentDom",document.createElement("canvas"));p(this,"five");p(this,"scale");p(this,"wrapper");p(this,"config");p(this,"offset",{x:0,y:0});p(this,"canvas",this.contentDom);p(this,"context");p(this,"renderCenter",new I.Vector3);p(this,"lastPanEvent");p(this,"hammer");p(this,"onPan",t=>{var c,d,f,u;if(!this.wrapper)return;const e=(d=(c=this.lastPanEvent)==null?void 0:c.deltaX)!=null?d:0,n=(u=(f=this.lastPanEvent)==null?void 0:f.deltaY)!=null?u:0,o=t.deltaX-e,s=t.deltaY-n;if(this.lastPanEvent=t,this.hooks.emit("wantsPanGesture",{srcEvent:t,deltaX:o,deltaY:s}))return;const a=this.offset.x+o,l=this.offset.y+s;this.contentDom.style.boxShadow="0 2px 30px 0 rgba(0,0,0,0.20)",this.canvas.style.transform=`translate3d(${a}px, ${l}px, 100px)`,this.offset={x:a,y:l}});p(this,"onPanEnd",t=>{this.lastPanEvent=void 0,this.contentDom.style.boxShadow="none"});var o,s,r;if(!t.renderer)throw new Error("Five Render \u672A\u521D\u59CB\u5316");this.five=t,this.scale=(o=e==null?void 0:e.scale)!=null?o:2,this.width=(s=e==null?void 0:e.width)!=null?s:190,this.height=(r=e==null?void 0:e.height)!=null?r:190,this.config={dragEnabled:(e==null?void 0:e.dragEnabled)||!1,autoFixPCPosition:(e==null?void 0:e.autoFixPCPosition)||!1,initialPosition:(e==null?void 0:e.initialPosition)||{left:"0",top:"0"}};const n=this.canvas.getContext("2d");if(!n)throw new Error("CANNOT CREATE CONTEXT2D");this.context=n,this.config.dragEnabled&&(this.hammer=new sn.default(this.canvas),this.hammer.on("pan",this.onPan),this.hammer.on("panend",this.onPanEnd))}dispose(){var t;this.clear(),this.remove(),(t=this.hammer)==null||t.destroy()}remove(){this.canvas.remove(),this.visible=!1}clear(){this.context.clearRect(0,0,this.canvas.width,this.canvas.height)}appendTo(t){this.wrapper=t,this.initStyle(),t.append(this.canvas),this.visible=!0}renderWithPoint(t){!this.wrapper||(this.renderCenter=t,this.render(),this.config.autoFixPCPosition&&this.autoFixPCPosition())}autoFixPCPosition(){if(!this.wrapper)return;const{width:t,height:e}=this,n=this.renderCenter.clone().project(this.five.camera),o=(n.x+1)/2*this.wrapper.clientWidth,s=-(n.x-1)/2*this.wrapper.clientWidth,r=-(n.y-1)/2*this.wrapper.clientHeight;o<183?(this.canvas.style.top=-e/2+"px",this.canvas.style.left=90+"px"):r<183?(this.canvas.style.top=90+"px",this.canvas.style.left=-t/2+"px"):s<183?(this.canvas.style.top=-e/2+"px",this.canvas.style.left=-t-90+"px"):(this.canvas.style.left=-t/2+"px",this.canvas.style.top=-e-90+"px"),this.canvas.style.transform=`translate3d(${o}px, ${r}px, 10px)`,this.offset={x:o,y:r}}render(){if(!this.five.renderer||!this.wrapper)return;const{scale:t,context:e,width:n,height:o}=this,s=this.renderCenter.clone().project(this.five.camera),r=this.five.renderer.getSize(new I.Vector2),a=1,l=n/t,c=o/t,d=a*t,f=(s.x+1)/2*r.x,u=(s.y+1)/2*r.y,h=this.five.getPixels(f-l/2,u-l/2,l,c,d),m=Math.floor(n*a),g=Math.floor(o*a);Hu(h,m,g);const v=new ImageData(m,g);v.data.set(h),e.putImageData(v,0,0)}initStyle(){const t=this.canvas;t.classList.add("five-plugin__magnifier"),t.style.position="absolute",t.style.pointerEvents="all",t.style.borderRadius="50%",t.style.zIndex="99";const e=1;t.setAttribute("width",(this.width*e).toString()),t.setAttribute("height",(this.height*e).toString()),t.style.border="2px solid rgba(255,255,255,0.20)",t.style.width=this.width+"px",t.style.height=this.height+"px",t.style.top=this.config.initialPosition.top,t.style.left=this.config.initialPosition.left,t.style.transform="translate(0,0,100px)",this.config.dragEnabled&&(this.canvas.style.cursor="pointer")}}class Gu{constructor(t){p(this,"edges",[]);p(this,"five");p(this,"onModelLoaded",()=>{!this.five.model||(this.edges=this.five.model.getEdges())});this.five=t,this.five.model.loaded?this.onModelLoaded():this.five.on("modelLoaded",this.onModelLoaded)}dispose(){}getAdsorbentPoint(t){if(this.edges.length===0)return null;let e=1/0,n;return this.edges.forEach(o=>{const s=o.closestPointToPoint(t.point,!0,new H.Vector3),r=s.distanceTo(t.point);r<e&&(n=s,e=r)}),e>.1?null:n||null}}class Hi{constructor(){p(this,"id",Fe());p(this,"points",[]);p(this,"lines",[])}push(t){const e=this.getNext(t);if(!e)throw new Error("\u5F53\u524D\u7EBF\u6BB5\u4E8E\u4E0A\u4E00\u6761\u7EBF\u6BB5\u65E0\u6CD5\u6784\u6210\u6298\u7EBF");return this.lines.push(e.line),this.points.push(...e.points),this.lines.length}pop(){const t=this.lines.pop();return this.lines.length===0?this.points.slice(0,this.points.length):this.points.pop(),t}getNext(t){const e=this.points.slice(-1)[0];if(!e)return{line:t,points:t.points};if(!t.points.includes(e))return null;const n=t.points.find(o=>o!==e);return n?{line:t,points:[n]}:null}toJson(){return{id:this.id,lines:this.lines.map(t=>t.id),points:this.points.map(t=>t.id)}}toCompletelyJson(){return{id:this.id,points:this.points.map(t=>t.toJson()),lines:this.lines.map(t=>t.toCompletelyJson())}}}const Nu=1,Wu=3,Xu=new H.Color(16777215),Yu=new H.Color(6522623),Uu=new H.Color(16777215),Vu=new H.Color(6522623),Ju=6,Zu=8,_u="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgBAMAAACBVGfHAAAAIVBMVEUAAAD////////////////////////////////////////PIev5AAAACnRSTlMAG/Py2baba05un7UgfgAAAHJJREFUKM9joBpgLHVSCRdA4metAoJlCJHmVWBgAeNzroKCCVCBLpjACqgJVjCBxRBT2FbBQQJYQAohsBAsUIUQWA4WiEIILAULeCEEloAFtBACizAEMLRgGIphLabDMJ2O6TlM72MGECIIMQIZIxqoBQCPvpJ/e9FaAAAAAABJRU5ErkJggg==",Us=new H.TextureLoader().load(_u),Vs={pointTexture:Us,pointSize:Ju,lineWidth:Nu,lineColor:Xu,pointColor:Uu,lineRenderOrder:20,pointsRenderOrder:20};pe(N({},Vs),{dashed:!0});const qu={pointTexture:Us,pointSize:Zu,lineWidth:Wu,lineColor:Yu,pointColor:Vu,lineRenderOrder:10,pointsRenderOrder:10};function Ku(i,t,e){var d,f,u,h,m;const n=(d=e==null?void 0:e.lineWidth)!=null?d:2,o=(f=e==null?void 0:e.lineColor)!=null?f:new H.Color(16777215),s=(u=e==null?void 0:e.pointSize)!=null?u:5,r=(h=e==null?void 0:e.lineRenderOrder)!=null?h:10,a=(m=e==null?void 0:e.lineRenderOrder)!=null?m:20,l=new vn.Line(i,t);l.setMaterial({linewidth:n,color:o}),l.line.material.depthTest=!1,l.line.material.transparent=!0,l.line.renderOrder=r,l.points.renderOrder=a;const c=l.points.material;return c.depthTest=!1,c.size=s,e!=null&&e.pointColor&&c.color.set(e.pointColor).convertSRGBToLinear(),e!=null&&e.pointTexture&&(c.map=e.pointTexture),l}function Js(i,t){const[e,n]=i.points,o=t==="light"?qu:Vs,s=Ku(e.position,n.position,o);return s.name="normalLine_"+i.id,s}function tt(i){const{x:t,y:e,z:n}=i;return!(Math.abs(t)>1||Math.abs(e)>1||Math.abs(n)>1)}function $u(){const i=document.createElement("div");return i.setAttribute("style","backdrop-filter: blur(4px);-webkit-backdrop-filter: blur(4px);"),i.style.padding="3px 6px",i.style.lineHeight="1",i.style.textAlign="center",i.style.transform="translate(-50%, -50%)",i.style.borderRadius="100px",i.style.fontSize="14px",i.style.color="#fff",i.style.background="rgba(195,195,195,0.70)",i.style.border="0.5px solid rgba(255,255,255,0.6)",i.style.pointerEvents="all",i.style.cursor="pointer",i}function ef(i){const t=document.createElement("div");return t.id="distance_"+i.id,t.classList.add("five-plugin-measure__distance"),t.style.opacity="0",t.style.position="absolute",t.style.left="0",t.style.top="0",t.style.transform="translate3d(0, 0, 0)",t.style.transformOrigin="left top",t}function tf(i){function t(){var m;(m=i.clickCallback)==null||m.call(i,h)}function e(){if(f)return f.highlight();c.style.border="0.5px solid #95AEFF",c.style.background="linear-gradient(90deg, #95AEFF 0%, #6386FF 100%)"}function n(){if(f)return f.unHighlight();c.style.border="0.5px solid rgba(255,255,255,0.6)",c.style.background="rgba(195,195,195,0.70)"}function o(m){const g=m.getElement();if(!g)return;const v=g.clientWidth,A=g.clientHeight;if(a.points.length<2)return;const[C,w]=a.points,E=C.position.clone().project(m.camera),D=w.position.clone().project(m.camera),y=E.clone().lerp(D,.5),L=new H.Vector2(E.x*v,E.y*A),x=new H.Vector2(D.x*v,D.y*A);if((()=>!(Math.abs(E.z)>1||Math.abs(D.z)>1||!tt(E)&&!tt(D)||!tt(y)||L.distanceTo(x)<20))()===!1){d.style.opacity="0",d.style.pointerEvents="none";return}const T=(y.x+1)/2*v,G=-(y.y-1)/2*A,P=-(Math.atan((L.y-x.y)/(L.x-x.x))*180)/Math.PI;d.style.transform=`translate(${T}px, ${G}px) rotate(${P}deg)`,d.style.opacity="1",d.style.pointerEvents="all",f&&f.update({line:a.toCompletelyJson(),polyline:a.getPolyline().toCompletelyJson()});const S=C.position.clone().distanceTo(w.position),j=i.line.model.params.getDistanceText(S);c.innerText!==j&&(c.innerText=j)}function s(m){m.appendChild(d),d.addEventListener("click",t)}function r(){c.removeEventListener("click",t),d.remove()}const{line:a}=i,l=a.id,c=$u(),d=ef(a),f=i.userDistanceItem,u=new H.Vector3(0,0,0),h={lineID:l,ndcPosition:u,update:o,appendTo:s,remove:r,highlight:e,unHighlight:n};return f!=null&&f.element?d.appendChild(f.element):d.appendChild(c),h}class Kt{constructor(t,e,n){p(this,"id");p(this,"selected",!1);p(this,"type","line");p(this,"model");p(this,"mesh");p(this,"points");p(this,"lightMesh");p(this,"hook");p(this,"distanceItem");p(this,"polyline");if(this.id=Fe(),this.model=n,t.id===e.id)throw new Error("\u65E0\u6548\u7684\u7EBF\u6BB5, \u4E00\u4E2A\u70B9\u65E0\u6CD5\u6784\u6210\u7EBF\u6BB5");this.hook=new me.Subscribe,this.points=[t,e],this.mesh=Js(this,"normal"),this.lightMesh=Js(this,"light"),this.distanceItem=tf({line:this,clickCallback:()=>this.hook.emit("selected",this),userDistanceItem:this.model.params.userDistanceItemCreator?this.model.params.userDistanceItemCreator():void 0}),t.lines.push(this),e.lines.push(this)}clear(){this.selected=!1,this.polyline=void 0}getPolyline(){if(this.polyline)return this.polyline;const t=this.model.polylines.find(n=>n.lines.includes(this));if(this.polyline=t,t)return t;const e=new Hi;return e.push(this),e}findAnotherPoint(t){return this.points.find(({id:e})=>e!==t.id)}toJson(){return{id:this.id,points:this.points.map(({id:t})=>t)}}toCompletelyJson(){return{id:this.id,points:this.points.map(t=>t.toJson())}}clone(){return new Kt(this.points[0].clone(),this.points[1].clone(),this.model)}}function gn(i,t){for(let e=0,n=t.length;e<n;e++)if(i===t[e])return t.splice(e,1)[0]}class nt{constructor(t){p(this,"id");p(this,"lines");p(this,"position");p(this,"type","point");this.id=Fe(),this.lines=[],this.position=new H.Vector3,t instanceof H.Vector3?this.position.copy(t):this.position.fromArray(t)}toJson(){return{id:this.id,lines:this.lines.map(({id:t})=>t),position:this.position.toArray()}}addLine(t){this.lines.push(t)}removeLine(t){gn(t,this.lines)}clone(){return new nt(this.position)}}class Gi{constructor(t){p(this,"lines",[]);p(this,"points",[]);p(this,"params");p(this,"polylines",[]);p(this,"hook",new me.Subscribe);this.params=t}addLine(t){const[e,n]=t.points;if(!e||!n)return this;this.includes(e)||this.points.push(e),this.includes(n)||this.points.push(n),this.lines.push(t);const o=this.polylines.find(s=>!!s.getNext(t));if(o)o.push(t);else{const s=new Hi;s.push(t),this.polylines.push(s)}this.hook.emit("lineAdded",t)}removeLineByID(t){const e=this.getLineByID(t);e&&this.removeLine(e)}removeLine(t){const e=this.polylines.find(s=>s.lines.includes(t));if(e){if(e.lines.slice(-1)[0]!==t)throw new Error("\u4E0D\u80FD\u4ECE\u4E2D\u95F4\u5220\u9664\u7EBF\u6BB5");e.pop(),e.lines.length===0&&gn(e,this.polylines)}const[n,o]=t.points;return n.lines.length===0&&gn(n,this.points),o.lines.length===0&&gn(o,this.points),gn(t,this.lines),t.clear(),this.hook.emit("lineRemoved",t),this}mergeModel(t){t.lines.forEach(e=>this.addLine(e))}includes(t){if(t.type==="point")return this.points.find(({id:e})=>e===t.id)!==void 0;if(t.type==="line")return this.lines.find(({id:e})=>e===t.id)!==void 0}getPointByID(t){return this.points.find(({id:e})=>e===t)}getLineByID(t){return this.lines.find(({id:e})=>e===t)}getClosestPoint(){}parse(t){const e=t.points.map(({id:s,position:r})=>{const a=new nt(r);return a.id=s,a}),n=t.lines.map(s=>{const[r,a]=s.points,l=this.getPointByID.call({points:e},r),c=this.getPointByID.call({points:e},a);if(!l||!c)throw new Error("\u7EBF\u4E0A\u7684\u70B9\u4E0D\u5B58\u5728");const d=new Kt(l,c,this);return d.id=s.id,d}),o=t.polylines.map(s=>{const r=new Hi;return s.lines.forEach(a=>{const l=n.find(({id:c})=>c===a);l&&r.push(l)}),r});return this.points.splice(0,this.points.length,...e),this.lines.splice(0,this.lines.length,...n),this.polylines.splice(0,this.polylines.length,...o),this}toJson(){return{points:this.points.map(t=>t.toJson()),lines:this.lines.map(t=>t.toJson()),polylines:this.polylines.map(t=>t.toJson()).filter(t=>t.lines.length>0)}}}const $n=i=>i.preventDefault();class ei{constructor(t){p(this,"model");p(this,"five");p(this,"group");p(this,"config");p(this,"dashed");p(this,"disposed",!1);p(this,"isMobile");p(this,"mouseGroup");p(this,"container");p(this,"fiveHelper");p(this,"hook");p(this,"magnifier");p(this,"userDistanceItemCreator");p(this,"updateDistanceUI",()=>{this.dashed.distanceItem.update(this.five),this.model.lines.forEach(t=>t.distanceItem.update(this.five))});var n,o;this.five=t.five,this.hook=t.hook,this.model=t.model,this.config=t.config,this.magnifier=t.magnifier,this.container=t.container,this.fiveHelper=t.fiveHelper,this.isMobile=(o=(n=t.openParams)==null?void 0:n.isMobile)!=null?o:!1,this.userDistanceItemCreator=t.userDistanceItemCreator,this.group=t.group,this.mouseGroup=t.mouseGroup,this.dashed=new Kt(new nt([0,0,0]),new nt([0,0,0]),this.model),this.dashed.mesh.setMaterial({dashed:!0,dashScale:100}),this.dashed.mesh.name="dashLine";const e=this.five.getElement();e&&(e.addEventListener("touchstart",$n),e.addEventListener("contextmenu",$n))}removeLine(t){this.group.remove(t.mesh,t.lightMesh),t.distanceItem.remove(),this.five.needsRender=!0}updateMouseGroup(t,e){if(!t)return this.mouseGroup;const n=this.fiveHelper.getAdsorbentPoint(t),o=n||t.point;if(this.mouseGroup.position.copy(o),e)this.mouseGroup.quaternion.copy(e.quaternion);else if(t.face){const r=t.face.normal.clone().multiplyScalar(.05),l=t.point.clone().add(r).clone().add(r);this.mouseGroup.lookAt(l)}return this.mouseGroup}dispose(){this.disposed=!0,this.magnifier.remove(),this.model.lines.forEach(e=>this.removeLine(e));const t=this.five.getElement();t&&(t.removeEventListener("touchstart",$n),t.removeEventListener("contextmenu",$n))}}function Ni(i){const{x:t,y:e}=i.center,{clientWidth:n,clientHeight:o}=i.target,s=i.target.getBoundingClientRect(),r=new H.Vector2(t,e).sub(new H.Vector2(s.left,s.top)),a=new H.Vector2(r.x/n*2-1,-(r.y/o)*2+1);return{point:r,ndcPoint:a}}function Wi(i,t){const e=Ni(t).ndcPoint,n=new H.Raycaster;return n.setFromCamera(e,i.camera),i.model.intersectRaycaster(n)}class ti extends ei{constructor(e){var o;super(e);p(this,"type","edit");p(this,"pressPoint");p(this,"hasAppendDashed",!1);p(this,"hasAppendMouseGroup",!1);p(this,"fiveElement");p(this,"lastPoint",null);p(this,"hammer");p(this,"onIntersectionUpdate",Ti((e,n)=>{var s;this.hasAppendMouseGroup===!1&&(this.group.add(this.mouseGroup),this.magnifier.appendTo(this.container),this.hasAppendMouseGroup=!0);const o=this.updateMouseGroup(e,n).position;(s=this.pressPoint)==null||s.position.copy(o),this.updateDashed(),requestAnimationFrame(()=>this.magnifier.renderWithPoint(this.mouseGroup.position)),this.five.needsRender=!0},20));p(this,"revoke",()=>{if(this.model.lines.length===0&&this.lastPoint){this.lastPoint=null,this.hasAppendDashed=!1,this.dashed.distanceItem.remove(),this.group.remove(this.dashed.mesh),this.hook.emit("anchorChange",null),this.five.needsRender=!0;return}if(this.model.lines.length===0&&!this.lastPoint||!this.lastPoint)return;const e=this.model.lines[this.model.lines.length-1],n=e.findAnotherPoint(this.lastPoint);!n||(this.lastPoint=n,this.hook.emit("anchorChange",n.position),this.group.remove(e.mesh),this.model.removeLine(e),this.hasAppendMouseGroup=!1,this.mouseGroup.position.copy(this.lastPoint.position),this.group.remove(this.mouseGroup),e.distanceItem.remove(),this.updateDashed(),this.magnifier.remove(),this.five.needsRender=!0)});p(this,"onMouseLeave",()=>{this.magnifier.remove(),this.group.remove(this.mouseGroup),this.hasAppendMouseGroup=!1,this.lastPoint&&(this.mouseGroup.position.copy(this.lastPoint.position),this.updateDashed())});p(this,"onLineChanged",()=>{this.hook.emit("editedLineChange",this.model.lines.map(e=>e.toCompletelyJson()))});p(this,"onPress",e=>{const[n]=Wi(this.five,e);if(!n||!n.face)return;const o=new nt(n.point);this.pressPoint=o,this.onIntersectionUpdate(n)});p(this,"onPan",e=>{if(!this.pressPoint)return;const[n]=Wi(this.five,e);!n||!n.face||this.onIntersectionUpdate(n)});p(this,"onPanEnd",e=>{!this.pressPoint||this.onTap(e)});p(this,"onTap",e=>{this.hasAppendDashed||(this.dashed.distanceItem.appendTo(this.container),this.group.add(this.dashed.mesh)),this.hasAppendDashed=!0;const[n]=Wi(this.five,e);this.updateMouseGroup(n);const o=new nt(this.mouseGroup.position),s=this.lastPoint;if(o&&(this.lastPoint=o),o&&s){const r=new Kt(s,o,this.model);r.distanceItem.appendTo(this.container),this.model.addLine(r),this.group.add(r.mesh),r.distanceItem.update(this.five)}this.pressPoint=void 0,this.hasAppendMouseGroup=!1,this.magnifier.remove(),this.group.remove(this.mouseGroup),this.updateDashed(),this.five.needsRender=!0,this.hook.emit("anchorChange",o.position)});p(this,"onWantsTapGesture",()=>!1);p(this,"onWantsToMoveToPano",()=>!1);p(this,"onWantsPanGesture",()=>this.pressPoint?!1:void 0);p(this,"onCameraUpdate",()=>{this.updateDistanceUI(),this.dashed.distanceItem.update(this.five)});p(this,"updateDashed",()=>{!this.lastPoint||(this.dashed.points[0].position.copy(this.lastPoint.position),this.dashed.points[1].position.copy(this.mouseGroup.position),this.dashed.mesh.setPoints(this.lastPoint.position,this.mouseGroup.position),this.dashed.distanceItem.update(this.five))});this.model=new Gi(this.config),this.five.on("cameraUpdate",this.onCameraUpdate),this.five.on("wantsPanGesture",this.onWantsPanGesture),this.five.on("wantsTapGesture",this.onWantsTapGesture),this.five.on("wantsToMoveToPano",this.onWantsToMoveToPano),this.five.on("intersectionOnModelUpdate",this.onIntersectionUpdate),this.model.hook.on("lineAdded",this.onLineChanged),this.model.hook.on("lineRemoved",this.onLineChanged);const n=this.five.getElement();if(n){this.fiveElement=n;const s=new sn.default(n);this.hammer=s,s.on("tap",this.onTap),s.on("pan",this.onPan),s.on("press",this.onPress),s.on("panend",this.onPanEnd)}(o=this.fiveElement)==null||o.addEventListener("mouseleave",this.onMouseLeave),this.hook.emit("anchorChange",null),this.five.refresh()}dispose(){var e,n;super.dispose(),this.group.remove(this.mouseGroup,this.dashed.mesh),this.five.off("cameraUpdate",this.onCameraUpdate),this.five.off("wantsPanGesture",this.onWantsPanGesture),this.five.off("wantsTapGesture",this.onWantsTapGesture),this.five.off("wantsToMoveToPano",this.onWantsToMoveToPano),this.five.off("intersectionOnModelUpdate",this.onIntersectionUpdate),this.model.hook.off("lineAdded",this.onLineChanged),this.model.hook.off("lineRemoved",this.onLineChanged),(e=this.hammer)==null||e.destroy(),(n=this.fiveElement)==null||n.removeEventListener("mouseleave",this.onMouseLeave),this.magnifier.dispose(),this.dashed.distanceItem.remove(),this.five.needsRender=!0}getEditingLines(){return this.model.lines}}function Xi(i,t){const e=i.x-t[0].x,n=i.y-t[0].y,o=t[1].x-t[0].x,s=t[1].y-t[0].y,r=e*o+n*s,a=o*o+s*s,l=r/a;let c,d;return l<0||nf(t[0],t[1])?(c=t[0].x,d=t[0].y):l>1?(c=t[1].x,d=t[1].y):(c=t[0].x+l*o,d=t[0].y+l*s),new H.Vector2(c,d)}function nf(i,t){return i.x===t.x&&i.y===t.y}function ni(i){const t=(s,r,a)=>{const l=s.lines.find(d=>d.points.findIndex(({id:u})=>u===s.id)!==r);if(!l)return a;const c=l.points[r];return c?t(c,r,a.concat(l)):a},e=t(i.points[0],1,[]),n=t(i.points[0],0,[]);return e.concat(n)}class of extends ei{constructor(e){super(e);p(this,"type","view");p(this,"highlightedLines",[]);p(this,"hammer");p(this,"wantsTapGesture",e=>{if(this.model.lines.length===0)return;const[n]=this.five.model.intersectRaycaster(e);if(!n)return;const o=this.five.camera,s=n.point.clone().project(o),r=this.container.clientWidth,a=this.container.clientHeight,l=new H.Vector2(s.x*r,s.y*a),c=this.model.lines.map(h=>{const[m,g]=h.points,v=m.position.clone().project(o),A=g.position.clone().project(o);if(!tt(v)&&!tt(A))return null;const C=new H.Vector2(v.x*r,v.y*a),w=new H.Vector2(A.x*r,A.y*a);return{id:h.id,points:[C,w]}}).filter(h=>!!h);if(c.length===0)return;const f=c.map(h=>{const m=Xi(l,h.points);return{id:h.id,distance:m.distanceTo(l)}}).sort((h,m)=>h.distance-m.distance)[0],u=f.distance>20?void 0:this.model.lines.find(({id:h})=>h===f.id);if(this.highlightedLines.length>0&&!u)return this.clearHighlightLines(),!1;if(u)return this.chooseLine(u),!1});p(this,"chooseLine",e=>{const n=ni(e);this.highlightLines(n),this.five.needsRender=!0,this.hook.emit("selectedChange",n.map(o=>o.toCompletelyJson()))});p(this,"lineRemoved",e=>{this.removeLine(e),this.hook.emit("selectedChange",this.model.lines.filter(n=>n.selected).map(n=>n.toCompletelyJson()))});p(this,"onCameraUpdate",()=>{this.updateDistanceUI()});this.model.lines.forEach(o=>{o.distanceItem.appendTo(this.container),o.distanceItem.update(this.five),o.hook.on("selected",this.chooseLine),this.group.add(o.mesh)});const n=this.five.getElement();if(n){const o=new sn.default(n);this.hammer=o}this.model.hook.on("lineRemoved",this.lineRemoved),this.five.on("cameraUpdate",this.onCameraUpdate),this.five.on("wantsTapGesture",this.wantsTapGesture),this.five.needsRender=!0}dispose(){var e;super.dispose(),this.model.hook.off("lineRemoved",this.lineRemoved),this.five.off("cameraUpdate",this.onCameraUpdate),this.five.off("wantsTapGesture",this.wantsTapGesture),this.five.needsRender=!0,this.hook.emit("selectedChange",[]),(e=this.hammer)==null||e.destroy()}highlightLine(e){e.selected||(e.selected=!0,this.group.add(e.lightMesh),e.distanceItem.highlight(),this.five.needsRender=!0)}clearHighlightLines(){this.group.children.length!==0&&(this.model.lines.forEach(e=>{e.selected=!1,e.distanceItem.unHighlight(),this.group.remove(e.lightMesh)}),this.highlightedLines=[],this.five.needsRender=!0)}highlightLines(e){this.clearHighlightLines(),this.highlightedLines=e,e.forEach(n=>this.highlightLine(n))}}const sf=`
|
|
208
|
+
`,C=document.createElement("div");return C.setAttribute("class","PanoRulerPlugin-rule"),C.setAttribute("data-name",g),C.setAttribute("style","display: none"),C.innerHTML=A,C},o=document.createElement("div");o.setAttribute("style","position: absolute;pointer-events: none;width: 100%;height: 100%;left: 0;top: 0;overflow: hidden;");const s=document.createElement("div");s.innerHTML=yu,o.appendChild(s);const r={},a=(g,v)=>{if(e.loaded)throw new Error("\u6807\u5C3A\u88AB\u91CD\u590D\u521D\u59CB\u5316\uFF01");const A=Cu(g,i),C=i.work;if(!C)return!1;for(const w in v){const E=v[w],{standingPosition:D}=C.observers[0],y=E.map(({x:L,z:x,observers:R})=>{const T=R.length>0?g.rooms[g.observers[R[0]]].name:"",G=A[T]?A[T].floor:null;let U=1/0,P={index:0,x:D.x,y:D.y,z:D.z};R.forEach(X=>{if(!C.observers[X])return;const{standingPosition:V}=C.observers[X],ce={index:X,x:V.x,y:V.y,z:V.z},de=wu({x:L,z:x},ce);G?de<U&&Math.abs(ce.y-G)<.3&&(U=de,P=ce):de<U&&(U=de,P=ce)});const S=new H.Vector3(L,P.y,x);Object.assign(S,{observers:R});const j=A[T]?A[T].roof:null,N=j?new H.Vector3(L,j,x):null;return N&&Object.assign(N,{observers:R}),{origin:S,vertical:N}});r[w]={origins:y.map(L=>L.origin),rules:[]};for(const{origin:L,vertical:x}of y){if(!x)continue;const R=n(w,L.distanceTo(x));o.append(R),r[w].rules.push({vertical:!0,rule:[L,x],$element:R})}for(let L=0;L<y.length;L++){let x=L+1;x>=y.length&&(x=0);const{origin:R}=y[L],{origin:T}=y[x],G=n(w,R.distanceTo(T));o.append(G),r[w].rules.push({vertical:!1,rule:[R,T],$element:G})}}return e.loaded=!0,!0},l=(g,v,A)=>Z(this,null,function*(){const C=g||t.roomInfo,w=v||t.roomRules;if(!C||!w)throw new Error("\u6807\u5C3A\u6570\u636E\u4F9D\u8D56\u4E0D\u9F50\u5168\uFF01");return e.loaded=!1,e.options=W(W({},e.options),A||{}),i.model.loaded?a(C,w):yield new Promise(E=>i.once("modelLoaded",()=>E(a(C,w))))});t.roomInfo&&t.roomRules&&l(t.roomInfo,t.roomRules);const c=(g,v,A,C)=>{const w=[[{x:0,y:0},{x:A,y:0}],[{x:0,y:0},{x:0,y:C}],[{x:A,y:0},{x:A,y:C}],[{x:0,y:C},{x:A,y:C}]],E=[];for(let D=0;D<w.length;D++){const y=Rs([g,v],[w[D][0],w[D][1]],!0);y&&E.push(y)}return E.length===0?!1:E},d=()=>{var R;const g=(R=i.getElement())==null?void 0:R.parentElement;if(!g||!e.loaded||Object.keys(r).length<=0)return;const{panoIndex:v,camera:A,currentMode:C}=i;if(v===void 0)return;let w;for(const T in r)T.split(",").indexOf(v.toString())>=0&&(w=T);if(!w){for(const T in r)for(const{$element:G}of r[T].rules)G.style.display="none";return}const E=A.position,D=A.getWorldDirection(new H.Vector3),y=g.clientWidth,L=g.clientHeight;if(C!==me.Five.Mode.Panorama){for(const T in r)for(const{$element:G}of r[T].rules)G.style.display="none";return}for(const T in r)for(const{$element:G}of r[T].rules)G.style.display=T===w?"block":"none";const[x]=r[w].origins.slice().filter(T=>T.observers.indexOf(v)>=0).sort((T,G)=>{const U=T.clone().setY(0).sub(E).normalize().angleTo(D.clone().setY(0)),P=G.clone().setY(0).sub(E).normalize().angleTo(D.clone().setY(0));return U-P});for(const{rule:T,vertical:G,$element:U}of r[w].rules){const[P,S]=T,j=U.querySelector(".PanoRulerPlugin-rule-line");if(!j)return;if(!x){U.style.display="none";continue}if(P!==x&&S!==x){U.style.display="none";continue}if(P.distanceTo(S)<.3){U.style.display="none";continue}if(P.observers.indexOf(v)===-1||S.observers.indexOf(v)===-1){U.style.display="none";continue}if(P.clone().sub(E).normalize().angleTo(D)>Math.PI/2){U.style.display="none";continue}if(S.clone().sub(E).normalize().angleTo(D)>Math.PI/2){U.style.display="none";continue}const te=P.distanceTo(S);if(S.clone().sub(S.clone().sub(P).divide(new H.Vector3(2,2,2))).distanceTo(E)/te>8){U.style.display="none";continue}const ce=P.clone().project(A),de=(ce.x+1)/2*y,ge=(-ce.y+1)/2*L,Pe=S.clone().project(A),ze=(Pe.x+1)/2*y,He=(-Pe.y+1)/2*L,re=Math.sqrt(Math.pow(ze-de,2)+Math.pow(He-ge,2));let we=re,Ee=50;const ae=c({x:~~de,y:~~ge},{x:~~ze,y:~~He},y,L);if(ae&&ae.length===1&&(x===P?(we=Math.sqrt(Math.pow(ae[0].x-de,2)+Math.pow(ae[0].y-ge,2)),Ee=we/re*50):x===S&&(we=Math.sqrt(Math.pow(ae[0].x-ze,2)+Math.pow(ae[0].y-He,2)),Ee=100-we/re*50)),ae&&ae.length===2){const wt={x:(ae[0].x+ae[1].x)/2,y:(ae[0].y+ae[1].y)/2};Ee=Math.sqrt(Math.pow(wt.x-de,2)+Math.pow(wt.y-ge,2))/re*100}const Ht=(Math.PI/2-Math.atan2(ze-de,ge-He))/Math.PI*180,ye=j.querySelector(".PanoRulerPlugin-rule-label"),yt=ye.children[0].clientWidth;yt>=re||yt/2>=Ee/100*re||yt/2>=(1-Ee/100)*re?j.style.display="none":(j.style.display="block",j.style.width=re+"px",j.style.left=de+"px",j.style.top=ge+"px",j.style.transform=`rotate(${-Ht}deg)`,ye.style.left=`${Ee}%`)}},f=()=>Fs(d),u=()=>{var g,v;return e.loaded?(e.enable||(o.setAttribute("class","PanoRulerPlugin"+(e.options.className?" "+e.options.className:"")),(v=(g=i.getElement())==null?void 0:g.parentElement)==null||v.append(o),d(),i.on("modeChange",d),i.on("cameraUpdate",f),e.enable=!0),!0):!1},h=()=>(e.enable&&(i.off("modeChange",d),i.off("cameraUpdate",f),o&&o.remove(),e.enable=!1),!0);function m(g){if(g.distanceText&&g.distanceText!==e.options.distanceText){const v=g.distanceText;e.options.distanceText=v,Object.values(r).forEach(A=>{A.rules.forEach(C=>{const[w,E]=C.rule,D=w.distanceTo(E),y=C.$element.querySelector(".PanoRulerPlugin-rule-label-name");!y||(y.innerText=v(D))})})}}return{enable:u,disable:h,load:l,state:e,changeConfigs:m}};function Iu(i){le(i,"svelte-1h27ktp",".PanoRulerPlugin-rule-line.svelte-1h27ktp.svelte-1h27ktp{position:absolute;transform-origin:left 0.0625rem;width:0;height:0.125rem;pointer-events:none}.PanoRulerPlugin-rule-line.svelte-1h27ktp.svelte-1h27ktp::after{content:'';position:absolute;left:-0.125rem;top:-0.1rem;width:0.25rem;height:0.25rem;border-radius:50%;background:#fff;z-index:1;animation:svelte-1h27ktp-viewport-rule-point 0.1s 1s;animation-fill-mode:both}.PanoRulerPlugin-rule-line.svelte-1h27ktp.svelte-1h27ktp::before{content:'';position:absolute;right:-0.125rem;top:-0.1rem;width:0.25rem;height:0.25rem;border-radius:50%;background:#fff;z-index:1;animation:svelte-1h27ktp-viewport-rule-point 0.1s 1.5s;animation-fill-mode:both}.PanoRulerPlugin-rule-line.svelte-1h27ktp em.svelte-1h27ktp{display:block;height:0.0625rem;animation:svelte-1h27ktp-viewport-rule-line 0.5s ease 1s;animation-fill-mode:both;box-shadow:0 0 0.25rem rgb(0 0 0 / 40%);position:relative}.rule-mixed-line.svelte-1h27ktp.svelte-1h27ktp{display:flex;height:0.0625rem;animation:svelte-1h27ktp-viewport-rule-line 0.5s ease 1s;animation-fill-mode:both;align-items:center}.em-solid.svelte-1h27ktp.svelte-1h27ktp{height:100%;background:#ffffff}.em-dotted.svelte-1h27ktp.svelte-1h27ktp{height:0.125rem;background:var(--background-image);background-position:center;background-repeat:repeat}.PanoRulerPlugin-rule-label.svelte-1h27ktp.svelte-1h27ktp{position:absolute;width:0;height:0;top:0.0625rem;pointer-events:none}.PanoRulerPlugin-rule-label-name.svelte-1h27ktp.svelte-1h27ktp{position:absolute;padding:0.1875rem 0.375rem;background:rgba(195, 195, 195, 0.3);backdrop-filter:blur(0.25rem);-webkit-backdrop-filter:blur(0.25rem);border-radius:6.25rem;border:0.0625rem solid rgba(255, 255, 255, 0.6);white-space:nowrap;overflow:hidden;color:#ffffff;font-weight:500;font-size:0.75rem;line-height:1;animation:svelte-1h27ktp-viewport-rule-label 0.25s ease 1s;animation-fill-mode:both;box-shadow:inset 0 0 0.625rem 0 rgba(255, 255, 255, 0.3)}@keyframes svelte-1h27ktp-viewport-rule-line{0%{width:0%}100%{width:100%}}@keyframes svelte-1h27ktp-viewport-rule-label{0%{opacity:0;transform:scaleX(0)}100%{opacity:1;transform:translate(-50%, -50%) scaleX(1)}}@keyframes svelte-1h27ktp-viewport-rule-point{0%{transform:scaleX(0)}100%{transform:scaleX(1)}}")}function Hs(i,t,e){const n=i.slice();return n[6]=t[e],n}function Eu(i){let t,e=i[0].children,n=[];for(let o=0;o<e.length;o+=1)n[o]=Gs(Hs(i,e,o));return{c(){t=Q("div");for(let o=0;o<n.length;o+=1)n[o].c();b(t,"class","rule-mixed-line svelte-1h27ktp")},m(o,s){B(o,t,s);for(let r=0;r<n.length;r+=1)n[r].m(t,null)},p(o,s){if(s&9){e=o[0].children;let r;for(r=0;r<e.length;r+=1){const a=Hs(o,e,r);n[r]?n[r].p(a,s):(n[r]=Gs(a),n[r].c(),n[r].m(t,null))}for(;r<n.length;r+=1)n[r].d(1);n.length=e.length}},d(o){o&&z(t),Ke(n,o)}}}function xu(i){let t,e;return{c(){t=Q("em"),b(t,"class",e=Oe(i[0].state?"em-solid":"em-dotted")+" svelte-1h27ktp"),b(t,"style",i[3])},m(n,o){B(n,t,o)},p(n,o){o&1&&e!==(e=Oe(n[0].state?"em-solid":"em-dotted")+" svelte-1h27ktp")&&b(t,"class",e),o&8&&b(t,"style",n[3])},d(n){n&&z(t)}}}function Gs(i){let t,e,n=`${i[6].width}px`;return{c(){t=Q("div"),b(t,"class",e=Oe(i[6].state?"em-solid":"em-dotted")+" svelte-1h27ktp"),b(t,"style",i[3]),F(t,"width",n)},m(o,s){B(o,t,s)},p(o,s){s&1&&e!==(e=Oe(o[6].state?"em-solid":"em-dotted")+" svelte-1h27ktp")&&b(t,"class",e),s&8&&b(t,"style",o[3]),s&1&&n!==(n=`${o[6].width}px`)&&F(t,"width",n)},d(o){o&&z(t)}}}function ku(i){let t,e,n,o,s=i[0].labelElement+"",r,a,l=`${i[0].labelOffset}%`,c=`${i[0].width}px`,d=`${i[0].left}px`,f=`${i[0].top}px`,u=`rotate(${i[0].rotateDeg}deg)`;function h(v,A){return v[0].children.length===0?xu:Eu}let m=h(i),g=m(i);return{c(){t=Q("div"),g.c(),e=_(),n=Q("div"),o=Q("div"),r=Le(s),b(o,"class","PanoRulerPlugin-rule-label-name svelte-1h27ktp"),De(()=>i[4].call(o)),b(n,"class","PanoRulerPlugin-rule-label svelte-1h27ktp"),F(n,"left",l),b(t,"class","PanoRulerPlugin-rule-line svelte-1h27ktp"),F(t,"width",c),F(t,"left",d),F(t,"top",f),F(t,"transform",u),F(t,"display",i[0].visible&&i[2]?"block":"none")},m(v,A){B(v,t,A),g.m(t,null),O(t,e),O(t,n),O(n,o),O(o,r),a=ft(o,i[4].bind(o))},p(v,[A]){m===(m=h(v))&&g?g.p(v,A):(g.d(1),g=m(v),g&&(g.c(),g.m(t,e))),A&1&&s!==(s=v[0].labelElement+"")&&je(r,s),A&1&&l!==(l=`${v[0].labelOffset}%`)&&F(n,"left",l),A&1&&c!==(c=`${v[0].width}px`)&&F(t,"width",c),A&1&&d!==(d=`${v[0].left}px`)&&F(t,"left",d),A&1&&f!==(f=`${v[0].top}px`)&&F(t,"top",f),A&1&&u!==(u=`rotate(${v[0].rotateDeg}deg)`)&&F(t,"transform",u),A&5&&F(t,"display",v[0].visible&&v[2]?"block":"none")},i:ne,o:ne,d(v){v&&z(t),g.d(),a()}}}function Du(i,t,e){let n,{rulerItemProp:o}=t,s=!0,r,a="data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQiIHdpZHRoPSIxMiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PGRlZnM+PGZpbHRlciBpZD0icHJlZml4X19hIiBoZWlnaHQ9IjQwMCUiIHdpZHRoPSIxMzcuNCUiIHg9Ii0xOC43JSIgeT0iLTE1MCUiPjxmZU1vcnBob2xvZ3kgaW49IlNvdXJjZUFscGhhIiBvcGVyYXRvcj0iZGlsYXRlIiByYWRpdXM9Ii41IiByZXN1bHQ9InNoYWRvd1NwcmVhZE91dGVyMSIvPjxmZU9mZnNldCBpbj0ic2hhZG93U3ByZWFkT3V0ZXIxIiByZXN1bHQ9InNoYWRvd09mZnNldE91dGVyMSIvPjxmZU1vcnBob2xvZ3kgaW49IlNvdXJjZUFscGhhIiByYWRpdXM9IjEiIHJlc3VsdD0ic2hhZG93SW5uZXIiLz48ZmVPZmZzZXQgaW49InNoYWRvd0lubmVyIiByZXN1bHQ9InNoYWRvd0lubmVyIi8+PGZlQ29tcG9zaXRlIGluPSJzaGFkb3dPZmZzZXRPdXRlcjEiIGluMj0ic2hhZG93SW5uZXIiIG9wZXJhdG9yPSJvdXQiIHJlc3VsdD0ic2hhZG93T2Zmc2V0T3V0ZXIxIi8+PGZlR2F1c3NpYW5CbHVyIGluPSJzaGFkb3dPZmZzZXRPdXRlcjEiIHJlc3VsdD0ic2hhZG93Qmx1ck91dGVyMSIgc3RkRGV2aWF0aW9uPSIuNSIvPjxmZUNvbG9yTWF0cml4IGluPSJzaGFkb3dCbHVyT3V0ZXIxIiB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAuMiAwIi8+PC9maWx0ZXI+PHBhdGggaWQ9InByZWZpeF9fYiIgZD0iTS44ODkgMkgxMS41OCIvPjwvZGVmcz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZS1kYXNoYXJyYXk9IjUgNiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48dXNlIGZpbGw9IiMwMDAiIGZpbHRlcj0idXJsKCNwcmVmaXhfX2EpIiB4bGluazpocmVmPSIjcHJlZml4X19iIi8+PHVzZSBzdHJva2U9IiNmZmYiIHN0cm9rZS1vcGFjaXR5PSIuNCIgeGxpbms6aHJlZj0iI3ByZWZpeF9fYiIvPjwvZz48L3N2Zz4=";function l(){r=this.offsetWidth,e(1,r)}return i.$$set=c=>{"rulerItemProp"in c&&e(0,o=c.rulerItemProp)},i.$$.update=()=>{i.$$.dirty&3&&(r>=o.width||r/2>=o.labelOffset/100*o.width||r/2>=(1-o.labelOffset/100)*o.width?e(2,s=!1):e(2,s=!0))},e(3,n=`--background-image: url(${a})`),[o,r,s,n,l]}class Lu extends se{constructor(t){super(),oe(this,t,Du,ku,ie,{rulerItemProp:0},Iu)}}function Ns(i,t,e){const n=i.slice();return n[12]=t[e],n}function Ws(i){let t,e;return t=new Lu({props:{rulerItemProp:i[12]}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.rulerItemProp=n[12]),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function Su(i){let t,e,n=i[0],o=[];for(let r=0;r<n.length;r+=1)o[r]=Ws(Ns(i,n,r));const s=r=>M(o[r],1,1,()=>{o[r]=null});return{c(){t=Q("div");for(let r=0;r<o.length;r+=1)o[r].c()},m(r,a){B(r,t,a);for(let l=0;l<o.length;l+=1)o[l].m(t,null);e=!0},p(r,[a]){if(a&1){n=r[0];let l;for(l=0;l<n.length;l+=1){const c=Ns(r,n,l);o[l]?(o[l].p(c,a),k(o[l],1)):(o[l]=Ws(c),o[l].c(),k(o[l],1),o[l].m(t,null))}for(fe(),l=n.length;l<o.length;l+=1)s(l);he()}},i(r){if(!e){for(let a=0;a<n.length;a+=1)k(o[a]);e=!0}},o(r){o=o.filter(Boolean);for(let a=0;a<o.length;a+=1)M(o[a]);e=!1},d(r){r&&z(t),Ke(o,r)}}}function zu(i,t,e){var g,v,A,C;let{five:n}=t,{rulerDatas:o}=t,{options:s}=t,r=[];const a=((v=(g=n.getElement())==null?void 0:g.parentElement)==null?void 0:v.clientWidth)||0,l=((C=(A=n.getElement())==null?void 0:A.parentElement)==null?void 0:C.clientHeight)||0,c=(w,E)=>{const D=[[{x:0,y:0},{x:a,y:0}],[{x:0,y:0},{x:0,y:l}],[{x:a,y:0},{x:a,y:l}],[{x:0,y:l},{x:a,y:l}]],y=[];for(let L=0;L<D.length;L++){const x=Rs([w,E],[D[L][0],D[L][1]],!0);x&&y.push(x)}return y.length===0?!1:y},d=(w,E)=>{const D=w.clone().project(n.camera),y=(D.x+1)/2*a,L=(-D.y+1)/2*l,x=E.clone().project(n.camera),R=(x.x+1)/2*a,T=(-x.y+1)/2*l,G=Math.sqrt(Math.pow(R-y,2)+Math.pow(T-L,2));return{startLeft:y,startTop:L,endLeft:R,endTop:T,distance:G}},f=(w,E,D)=>{const y=n.camera.position,L=n.camera.getWorldDirection(new H.Vector3),x=w.clone().sub(y).normalize().angleTo(L),R=E.clone().sub(y).normalize().angleTo(L),T=w.distanceTo(E),U=E.clone().sub(E.clone().sub(w).divide(new H.Vector3(2,2,2))).distanceTo(y),{startLeft:P,startTop:S,endLeft:j,endTop:N,distance:Y}=d(w,E),X=-((Math.PI/2-Math.atan2(j-P,S-N))/Math.PI)*180;let V=!0;D||(V=!1),!$e(w,D)&&!$e(E,D)&&(V=!1),T<.3&&(V=!1),x>Math.PI/2&&(V=!1),R>Math.PI/2&&(V=!1),U/T>8&&(V=!1);let ce=50,de=Y;const ge=c({x:~~P,y:~~S},{x:~~j,y:~~N});if(ge&&ge.length===1&&($e(w,D)?(de=Math.sqrt(Math.pow(ge[0].x-P,2)+Math.pow(ge[0].y-S,2)),ce=de/Y*50):$e(E,D)&&(de=Math.sqrt(Math.pow(ge[0].x-j,2)+Math.pow(ge[0].y-N,2)),ce=100-de/Y*50)),ge&&ge.length===2){const Pe={x:(ge[0].x+ge[1].x)/2,y:(ge[0].y+ge[1].y)/2};ce=Math.sqrt(Math.pow(Pe.x-P,2)+Math.pow(Pe.y-S,2))/Y*100}return{startLeft:P,startTop:S,distance:Y,deg:X,visible:V,labelOffset:ce,ruleLength:T}},u=()=>{const w=n.panoIndex,E=o.find(G=>G.panoIndex===w);if(!E)return e(0,r=[]);if(n.currentMode!==me.Five.Mode.Panorama)return e(0,r=[]);const D=n.camera.position,y=n.camera.getWorldDirection(new H.Vector3),L=E.lines.map(G=>new H.Vector3(G.start[0],-G.start[1],-G.start[2])),x=E.lines.map(G=>new H.Vector3(G.end[0],-G.end[1],-G.end[2])),[R]=L.concat(x).sort((G,U)=>{const P=G.clone().setY(0).sub(D).normalize().angleTo(y.clone().setY(0)),S=U.clone().setY(0).sub(D).normalize().angleTo(y.clone().setY(0));return P-S}),T=E.lines.map(G=>{var de,ge;const U=G.start,P=G.end,{startLeft:S,startTop:j,distance:N,deg:Y,visible:te,labelOffset:X,ruleLength:V}=f(new H.Vector3(U[0],-U[1],-U[2]),new H.Vector3(P[0],-P[1],-P[2]),R),ce=[];return G.children&&((de=G.children)==null?void 0:de.length)>0&&((ge=G.children)==null||ge.forEach(Pe=>{const ze=Pe.start,He=Pe.end,{distance:re}=d(new H.Vector3(ze[0],-ze[1],-ze[2]),new H.Vector3(He[0],-He[1],-He[2]));ce.push({width:re,state:Pe.state})})),{width:N,left:S,top:j,rotateDeg:Y,state:G.state,children:ce,labelOffset:X,visible:te,labelElement:s.distanceText(V)}});e(0,r=T)},h=()=>Un(u),m=Ti(u,80);return Ue(()=>{u(),n.on("panoArrived",u),n.on("modeChange",u),n.on("cameraDirectionUpdate",h),n.on("movingToPano",h),n.on("mouseWheel",()=>m()),n.on("pinchGesture",()=>m())}),ht(()=>{n.off("panoArrived",u),n.off("modeChange",u),n.off("cameraDirectionUpdate",h),n.off("movingToPano",h),n.off("mouseWheel",()=>m()),n.off("pinchGesture",()=>m())}),i.$$set=w=>{"five"in w&&e(1,n=w.five),"rulerDatas"in w&&e(2,o=w.rulerDatas),"options"in w&&e(3,s=w.options)},[r,n,o,s]}class Mu extends se{constructor(t){super(),oe(this,t,zu,Su,ie,{five:1,rulerDatas:2,options:3})}}class ju{constructor(t,e){p(this,"five");p(this,"container",document.createElement("div"));p(this,"panoRulerProData");p(this,"rulerItems");p(this,"state",{enabled:!1,loaded:!1,options:{className:"",distanceText:t=>`${t.toFixed(1)}m`}});var n,o;this.five=t,this.container.classList.add("panoRulerProPlugin-container"),this.container.setAttribute("style","position: absolute;pointer-events: none;width: 100%;height: 100%;left: 0;top: 0;overflow: hidden;"),e&&(e.data&&this.load(e.data),this.state.options=W(W({},this.state.options),e.options||{}),(n=e.options)!=null&&n.className&&this.container.classList.add((o=e.options)==null?void 0:o.className)),this.five.once("modelLoaded",()=>Z(this,null,function*(){var s,r;(r=(s=this.five.getElement())==null?void 0:s.parentNode)==null||r.append(this.container)})),this.five.once("dispose",()=>this.dispose())}load(t){return Z(this,null,function*(){if(!this.five.work)return;const e=t.data;if(!e)throw new Error("\u6807\u5C3A\u6570\u636E\u4F9D\u8D56\u4E0D\u9F50\u5168\uFF01");this.panoRulerProData=e,this.state.loaded=!0})}enable(){return this.state.loaded?(this.state.enabled||(this.state.enabled=!0,this.render()),!0):!1}disable(){return this.state.enabled&&(this.state.enabled=!1,this.render()),!0}render(){return Z(this,null,function*(){var t;if(this.state.enabled){if(!this.panoRulerProData||!this.container)return;this.rulerItems=new Mu({target:this.container,props:{five:this.five,rulerDatas:this.panoRulerProData,options:this.state.options}})}else(t=this.rulerItems)==null||t.$destroy(),this.rulerItems=void 0})}dispose(){this.container&&(this.rulerItems.$destroy(),this.rulerItems=void 0),this.container.remove()}}const Bu=(i,t)=>new ju(i,t),Tu="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZIAAABCCAYAAAB9y1BhAAAAAXNSR0IArs4c6QAADh5JREFUeAHtnVuPLDcVhedwC/dACKAICDxEIBQpygNI/Ab+MX8B8YCQEAjxgBAQLsm5Jjkn58r6Sl4jT52qnu4zXd121dqSx67q7ip7eXsv721XzcVFJAgEgSAQBIJAEAgCQeC4CLx48eKbSu+RH/fKuVoQWB8Cn1tfk9KiIHAUBH6tq/xKiTwSBILADgRCJDvAyUebRuAbpfXxSDatBmn8Pgh8YZ8v5TtBYIMIvFCbSZEgEASuQSBEcg1A+XizCDzfbMvT8CBwIAIhkgMBy9c3g0CIZDNdnYbeFIEQyU0RzO/XikCIZK09m3YdHYEQydEhzQVXgkCIZCUdmWYsj0CIZHmMc4c+EchCe5/9llqfAYEQyRlAzy27QCAeSRfdlEq2gECIpIVeSB1aRAAiudVixVKnINAaAiGS1nok9WkFAUJb8Upa6Y3Uo2kEQiRNd08qd0YEQiJnBD+37guBEElf/ZXang6BEMnpsM6dOkcgRNJ5B66x+nrjLmsTX1J6bSJHZ7+o9HklynWaOse1eKcc+XVlvxYFEnlfaThWfb7mcs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QDi+ngdAGTWVfGKsHOB+GBCV1dgycE5EZDufs/31+D9r8vJg8BSCFT2kojN3K4vvBQm3E3Zy0WIRICwVRcwSFPbdu194LKt+kEdtT/SIQLS4Tddbenohy4nDwKnQGAPG4rdZALehA09KpGo8bhou9iUbbs0/jMNTscBdRgJAm0hIF1+wzWSrt52OXkQOCUC0kNsNNuHsatz24iHqI709GxLAjcmktJQEwj5WPA+aCiuWB4YHKOT4yYRkF7zUNkg0lueSI4EgbMiIJ1kZyshL9LUOjNEwkT9sXT2pBP1VyaSQiCse9Coqa27LApBIPE+BEKkLwSk32zRHESDkp0zkSDQBALF9uKdYHunnkthwo7tfXQqQjmYSNQImBACIU2xIuGreB8CIdIvAtJzNogMosHI4mYkCDSHgPTUXspU2ItoEIvzEArlxWRvIlGFWTSnsnWF+b1dKAhk8QrrHpEgsDgC0ndi0oNoEBIuiASBZhGQvnqCz/KCJ/jYZtto7DPRoUU2N11LJIXxqNyUC0VFqeCTpRlP94gEgZMhIL0nbDCIdJswQSQINI9AIRRsNRP+KfvOkgNrKEddr5660YUqw3k8EAhkbvsuCztPVSF7JDqMBIF1IKAxcOl5S8eZLEWCQDcIFBtO2Kv2UOr645lAKkex4VeIpLo5jHbls1KD4eYaWIu4R+UeyYLA2RHQWGAADiJ9P9u2StcheRB4VQSkyzgD2PQppwBH4MaEMpBFRSDcqCYQx9ggDphr0QUb3SMSBJpAQGPiciei9P6oYYAmGphKbA4B6TRrJ+j1HKHYzh8cZbpVBowXZ8bgQhzPNJAOvvD4QjkOAj0hUAbdUOVMoHrqudT1OgSk2zgLkAl2n/LYvh9s900kutYV4UIvQiBXMMlBEAgCQWA1CBRCgUjmHAkI5vk+PACR1BcZmGmfH64GzTQkCASBILBhBAqhgEC9rDFGJI7FGJEcB4EgEASCQBAIAkEgCASBIBAEgkAQCAJBIAgEgSAQBIJAEAgCm0fg/x4jQQWGalpFAAAAAElFTkSuQmCC";function Qu(){const i=document.createElement("div"),t=document.createElement("i"),e=document.createElement("span");return i.appendChild(t),i.appendChild(e),i.style.position="relative",i.style.width="100%",i.style.display="flex",i.style.flexDirection="column",i.style.alignItems="center",i.style.marginTop=`${150/16}rem`,i.style.opacity="0",i.style.transition="opacity 1000ms linear",t.style.display="block",t.style.width=`${134/16}rem`,t.style.height=`${22/16}rem`,t.style.backgroundSize="100%",t.style.backgroundRepeat="no-repeat",t.style.backgroundImage=`url(${Tu})`,e.style.marginTop=`${10/16}rem`,e.style.fontSize=`${16/16}rem`,e.style.color="#fff",e.style.opacity="0.7",e.style.textShadow="0 2px 16px rgb(22 34 83 / 24%)",e.style.fontWeight="bold",{appendTo(n){n.appendChild(i)},dispose(){i.remove()},setRoom(n){e.innerHTML=n.name+" "+Math.floor(n.size/1e6)+"\u33A1"},show(){i.style.opacity="1"},hide(){i.style.opacity="0"}}}const Ou=new I.TextureLoader;function Xs(i){return Z(this,null,function*(){return new Promise((t,e)=>{Ou.load(i,t,void 0,e)}).then(t=>(t.encoding=I.sRGBEncoding,t))})}const Kn={userAction:!0};class Ru extends jt{constructor(e,n){super(e);p(this,"state",{visible:!0,enabled:!0,config:{compassImageUrl:"//vrlab-image4.ljcdn.com/release/web/v3/north-point-circle.96498e69.png",entryDoorImageUrl:"//vrlab-image4.ljcdn.com/release/web/enterDoor.831b8208.png"}});p(this,"data");p(this,"group",new I.Group);p(this,"roomInfoInstance");p(this,"roomInfoWrapperInstance");p(this,"compassMeshTween");p(this,"compassMesh");p(this,"entryDoorMesh");p(this,"dispose",()=>{var e,n,o,s;this.five.scene.remove(this.group),this.group.remove(...this.group.children),(n=(e=this.compassMesh)==null?void 0:e.material.map)==null||n.dispose(),(s=(o=this.entryDoorMesh)==null?void 0:o.material.map)==null||s.dispose(),this.five.off("dispose",this.dispose),this.five.off("panoArrived",this.onFivePanoArrived),this.five.off("panoWillArrive",this.onFivePanoWillArrive),this.five.off("cameraDirectionUpdate",this.onFiveCameraDirectionUpdate)});p(this,"_addEventListener",()=>{this.five.on("panoArrived",this.onFivePanoArrived),this.five.on("panoWillArrive",this.onFivePanoWillArrive),this.five.on("modeChange",this.onFiveModeChange),this.five.on("cameraDirectionUpdate",this.onFiveCameraDirectionUpdate)});p(this,"_removeEventListener",()=>{this.five.off("panoArrived",this.onFivePanoArrived),this.five.off("panoWillArrive",this.onFivePanoWillArrive),this.five.off("modeChange",this.onFiveModeChange),this.five.off("cameraDirectionUpdate",this.onFiveCameraDirectionUpdate)});p(this,"_enable",()=>{this.five.scene.add(this.group),this.init(),this.onFivePanoArrived(this.five.panoIndex||0),this._addEventListener()});p(this,"_disable",()=>{this._clearCompassIfNeed(),this._clearEntryDoorIfNeed(),this.five.scene.remove(this.group),this._removeEventListener()});p(this,"_toggleVisible",()=>{this.group.visible=this.state.visible,this.five.needsRender=!0});p(this,"_clearCompassIfNeed",()=>{var e;this.compassMesh&&(this.group.remove(this.compassMesh),(e=this.compassMesh.material.map)==null||e.dispose(),this.compassMesh=null)});p(this,"_clearEntryDoorIfNeed",()=>{var e;this.entryDoorMesh&&(this.group.remove(this.entryDoorMesh),(e=this.entryDoorMesh.material.map)==null||e.dispose(),this.entryDoorMesh=null),this.roomInfoInstance&&(this.roomInfoInstance.dispose(),this.roomInfoInstance=null),this.roomInfoWrapperInstance&&(this.roomInfoWrapperInstance.dispose(),this.roomInfoWrapperInstance=null)});p(this,"onFivePanoWillArrive",e=>{var n,o;e!==this.five.panoIndex&&((n=this.compassMeshTween)==null||n.dispose(),(o=this.compassMesh)==null||o.material.setValues({opacity:0}))});p(this,"onFivePanoArrived",e=>{var o,s,r,a,l,c,d;const n=(r=(s=(o=this.five.work)==null?void 0:o.observers)==null?void 0:s[e])==null?void 0:r.standingPosition;if(this.compassMesh&&(this.compassMesh.position.copy(n.clone().setY(n.y+.01)),this.compassMesh.material.opacity===0&&((a=this.compassMeshTween)==null||a.dispose(),this.compassMeshTween=Ms(1e3).onUpdate(({progress:f})=>{var u;(u=this.compassMesh)==null||u.material.setValues({opacity:f}),this.five.needsRender=!0}).play())),this.entryDoorMesh){const u=new I.Vector3(this.data.entrance.position.x,this.data.entrance.position.y,this.data.entrance.position.z).clone().setY(n.y).sub(n).normalize(),h=n.clone().add(u.clone().multiplyScalar(.7)).setY(n.y+.01);this.entryDoorMesh.rotation.z=new I.Vector3(0,0,-1).angleTo(u),this.entryDoorMesh.position.copy(h),((l=this.data)==null?void 0:l.room_observers[e].room.type)===1?(c=this.entryDoorMesh)==null||c.material.setValues({opacity:1}):(d=this.entryDoorMesh)==null||d.material.setValues({opacity:0})}this.roomInfoInstance&&this.roomInfoWrapperInstance&&(this.roomInfoWrapperInstance.css3DObject.position.copy(n.clone().setY(n.y+.01)),this.roomInfoInstance.setRoom(this.data.room_observers[e].room)),this.five.needsRender=!0});p(this,"onFiveCameraDirectionUpdate",({longitude:e,latitude:n})=>{var o,s;!this.roomInfoWrapperInstance||(this.roomInfoWrapperInstance.css3DObject.rotation.z=e,n>.66&&this.five.getCurrentState().mode==="Panorama"?(o=this.roomInfoInstance)==null||o.show():(s=this.roomInfoInstance)==null||s.hide())});p(this,"onFiveModeChange",(e,n,o,s,r)=>{e!==n&&this.setState({visible:e===me.Five.Mode.Panorama},{userAction:r})});this.five.scene.add(this.group),this.five.once("dispose",this.dispose),this.setState({visible:!0,enabled:!0,config:W(W({},this.state.config),n||{})})}enable(e=Kn){this.setState({enabled:!0},e)}disable(e=Kn){this.setState({enabled:!1},e)}show(e=Kn){if(!!this.state.enabled)return this.setState({visible:!0},e),Promise.resolve()}hide(e=Kn){if(!!this.state.enabled)return this.setState({visible:!1},e),Promise.resolve()}setState(e,n={userAction:!0}){var s,r;const o=JSON.parse(JSON.stringify(this.state));this.state={visible:(s=e.visible)!=null?s:o.visible,enabled:(r=e.enabled)!=null?r:o.enabled,config:W(W({},o.config),e.config||{})},this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:n.userAction}),e.enabled===!0&&(this._enable(),this.hooks.emit("enable",n)),e.enabled===!1&&(this._disable(),this.hooks.emit("disable",n)),e.visible===!1&&(this._toggleVisible(),this.hooks.emit("hide",n)),e.visible===!0&&(this._toggleVisible(),this.hooks.emit("show",n)),e.config&&this.init()}load(e,n,o=!0){return Z(this,null,function*(){const s=yield this.formatData(e);JSON.stringify(this.data)!==JSON.stringify(s)&&(this.hooks.emit("dataChange",s,this.data),this.data=W({},s),this.init(),n&&this.setState(n,{userAction:o}),this.hooks.emit("dataLoaded",this.data))})}formatData(e){return e.version&&e.data?Promise.resolve(e.data):Promise.resolve(e)}init(){return Z(this,null,function*(){var o,s,r,a;const e=(s=(o=this.data)==null?void 0:o.north_rad)!=null?s:null;this._clearCompassIfNeed(),e!==null&&(this.compassMesh=yield this.loadCompassMesh(),this.compassMesh.rotateX(-Math.PI/2),this.compassMesh.rotateZ(e-Math.PI/2),this.group.add(this.compassMesh));const n=(a=(r=this.data)==null?void 0:r.entrance)!=null?a:null;this._clearEntryDoorIfNeed(),n!==null&&(this.entryDoorMesh=yield this.loadEntryDoorMesh(),this.roomInfoWrapperInstance=this.loadRoomInfo(),this.roomInfoInstance=Qu(),this.entryDoorMesh.rotateX(-Math.PI/2),this.roomInfoWrapperInstance&&this.roomInfoInstance.appendTo(this.roomInfoWrapperInstance.container),this.group.add(this.entryDoorMesh)),this.onFivePanoArrived(this.five.panoIndex||0),this.five.needsRender=!0})}loadCompassMesh(){return Z(this,null,function*(){const e=this.state.config.compassImageUrl,n=yield Xs(e),o=new I.CircleGeometry(.7,32),s=new I.MeshBasicMaterial({map:n,transparent:!0,opacity:0,depthTest:!1}),r=new I.Mesh(o,s);return r.name="pano-compass-mesh",r})}loadEntryDoorMesh(){return Z(this,null,function*(){const e=this.state.config.entryDoorImageUrl,n=yield Xs(e),o=new I.PlaneGeometry(.2,.16),s=new I.MeshBasicMaterial({map:n,transparent:!0,opacity:.8,depthTest:!1}),r=new I.Mesh(o,s);return r.name="pano-compass-entry-door",r})}loadRoomInfo(){const e=[new I.Vector3(-.7,0,-.7),new I.Vector3(.7,0,-.7),new I.Vector3(.7,0,.7),new I.Vector3(-.7,0,.7)];return Wt(this.five).create3DDomContainer(e)}}const Fu=(i,t)=>new Ru(i,t);function $n(i,t,e){const n=i[t];i[t]=i[e],i[e]=n}function Hu(i,t,e){const n=e/2;for(let o=1;o<=n;o++){const s=e-(o-1);for(let r=1;r<=t;r++){const a=(o-1)*t+r-1,l=(s-1)*t+r-1;$n(i,a*4+0,l*4+0),$n(i,a*4+1,l*4+1),$n(i,a*4+2,l*4+2),$n(i,a*4+3,l*4+3)}}}class Ys{constructor(t,e){p(this,"width");p(this,"height");p(this,"visible",!1);p(this,"hooks",new me.Subscribe);p(this,"contentDom",document.createElement("canvas"));p(this,"five");p(this,"scale");p(this,"wrapper");p(this,"config");p(this,"offset",{x:0,y:0});p(this,"canvas",this.contentDom);p(this,"context");p(this,"renderCenter",new I.Vector3);p(this,"lastPanEvent");p(this,"hammer");p(this,"onPan",t=>{var c,d,f,u;if(!this.wrapper)return;const e=(d=(c=this.lastPanEvent)==null?void 0:c.deltaX)!=null?d:0,n=(u=(f=this.lastPanEvent)==null?void 0:f.deltaY)!=null?u:0,o=t.deltaX-e,s=t.deltaY-n;if(this.lastPanEvent=t,this.hooks.emit("wantsPanGesture",{srcEvent:t,deltaX:o,deltaY:s}))return;const a=this.offset.x+o,l=this.offset.y+s;this.contentDom.style.boxShadow="0 2px 30px 0 rgba(0,0,0,0.20)",this.canvas.style.transform=`translate3d(${a}px, ${l}px, 100px)`,this.offset={x:a,y:l}});p(this,"onPanEnd",t=>{this.lastPanEvent=void 0,this.contentDom.style.boxShadow="none"});var o,s,r;if(!t.renderer)throw new Error("Five Render \u672A\u521D\u59CB\u5316");this.five=t,this.scale=(o=e==null?void 0:e.scale)!=null?o:2,this.width=(s=e==null?void 0:e.width)!=null?s:190,this.height=(r=e==null?void 0:e.height)!=null?r:190,this.config={dragEnabled:(e==null?void 0:e.dragEnabled)||!1,autoFixPCPosition:(e==null?void 0:e.autoFixPCPosition)||!1,initialPosition:(e==null?void 0:e.initialPosition)||{left:"0",top:"0"}};const n=this.canvas.getContext("2d");if(!n)throw new Error("CANNOT CREATE CONTEXT2D");this.context=n,this.config.dragEnabled&&(this.hammer=new sn.default(this.canvas),this.hammer.on("pan",this.onPan),this.hammer.on("panend",this.onPanEnd))}dispose(){var t;this.clear(),this.remove(),(t=this.hammer)==null||t.destroy()}remove(){this.canvas.remove(),this.visible=!1}clear(){this.context.clearRect(0,0,this.canvas.width,this.canvas.height)}appendTo(t){this.wrapper=t,this.initStyle(),t.append(this.canvas),this.visible=!0}renderWithPoint(t){!this.wrapper||(this.renderCenter=t,this.render(),this.config.autoFixPCPosition&&this.autoFixPCPosition())}autoFixPCPosition(){if(!this.wrapper)return;const{width:t,height:e}=this,n=this.renderCenter.clone().project(this.five.camera),o=(n.x+1)/2*this.wrapper.clientWidth,s=-(n.x-1)/2*this.wrapper.clientWidth,r=-(n.y-1)/2*this.wrapper.clientHeight;o<183?(this.canvas.style.top=-e/2+"px",this.canvas.style.left=90+"px"):r<183?(this.canvas.style.top=90+"px",this.canvas.style.left=-t/2+"px"):s<183?(this.canvas.style.top=-e/2+"px",this.canvas.style.left=-t-90+"px"):(this.canvas.style.left=-t/2+"px",this.canvas.style.top=-e-90+"px"),this.canvas.style.transform=`translate3d(${o}px, ${r}px, 10px)`,this.offset={x:o,y:r}}render(){if(!this.five.renderer||!this.wrapper)return;const{scale:t,context:e,width:n,height:o}=this,s=this.renderCenter.clone().project(this.five.camera),r=this.five.renderer.getSize(new I.Vector2),a=1,l=n/t,c=o/t,d=a*t,f=(s.x+1)/2*r.x,u=(s.y+1)/2*r.y,h=this.five.getPixels(f-l/2,u-l/2,l,c,d),m=Math.floor(n*a),g=Math.floor(o*a);Hu(h,m,g);const v=new ImageData(m,g);v.data.set(h),e.putImageData(v,0,0)}initStyle(){const t=this.canvas;t.classList.add("five-plugin__magnifier"),t.style.position="absolute",t.style.pointerEvents="all",t.style.borderRadius="50%",t.style.zIndex="99";const e=1;t.setAttribute("width",(this.width*e).toString()),t.setAttribute("height",(this.height*e).toString()),t.style.border="2px solid rgba(255,255,255,0.20)",t.style.width=this.width+"px",t.style.height=this.height+"px",t.style.top=this.config.initialPosition.top,t.style.left=this.config.initialPosition.left,t.style.transform="translate(0,0,100px)",this.config.dragEnabled&&(this.canvas.style.cursor="pointer")}}class Gu{constructor(t){p(this,"edges",[]);p(this,"five");p(this,"onModelLoaded",()=>{!this.five.model||(this.edges=this.five.model.getEdges())});this.five=t,this.five.model.loaded?this.onModelLoaded():this.five.on("modelLoaded",this.onModelLoaded)}dispose(){}getAdsorbentPoint(t){if(this.edges.length===0)return null;let e=1/0,n;return this.edges.forEach(o=>{const s=o.closestPointToPoint(t.point,!0,new H.Vector3),r=s.distanceTo(t.point);r<e&&(n=s,e=r)}),e>.1?null:n||null}}class Hi{constructor(){p(this,"id",Fe());p(this,"points",[]);p(this,"lines",[])}push(t){const e=this.getNext(t);if(!e)throw new Error("\u5F53\u524D\u7EBF\u6BB5\u4E8E\u4E0A\u4E00\u6761\u7EBF\u6BB5\u65E0\u6CD5\u6784\u6210\u6298\u7EBF");return this.lines.push(e.line),this.points.push(...e.points),this.lines.length}pop(){const t=this.lines.pop();return this.lines.length===0?this.points.slice(0,this.points.length):this.points.pop(),t}getNext(t){const e=this.points.slice(-1)[0];if(!e)return{line:t,points:t.points};if(!t.points.includes(e))return null;const n=t.points.find(o=>o!==e);return n?{line:t,points:[n]}:null}toJson(){return{id:this.id,lines:this.lines.map(t=>t.id),points:this.points.map(t=>t.id)}}toCompletelyJson(){return{id:this.id,points:this.points.map(t=>t.toJson()),lines:this.lines.map(t=>t.toCompletelyJson())}}}const Nu=1,Wu=3,Xu=new H.Color(16777215),Yu=new H.Color(6522623),Uu=new H.Color(16777215),Vu=new H.Color(6522623),Ju=6,Zu=8,_u="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgBAMAAACBVGfHAAAAIVBMVEUAAAD////////////////////////////////////////PIev5AAAACnRSTlMAG/Py2baba05un7UgfgAAAHJJREFUKM9joBpgLHVSCRdA4metAoJlCJHmVWBgAeNzroKCCVCBLpjACqgJVjCBxRBT2FbBQQJYQAohsBAsUIUQWA4WiEIILAULeCEEloAFtBACizAEMLRgGIphLabDMJ2O6TlM72MGECIIMQIZIxqoBQCPvpJ/e9FaAAAAAABJRU5ErkJggg==",Us=new H.TextureLoader().load(_u),Vs={pointTexture:Us,pointSize:Ju,lineWidth:Nu,lineColor:Xu,pointColor:Uu,lineRenderOrder:20,pointsRenderOrder:20};pe(W({},Vs),{dashed:!0});const qu={pointTexture:Us,pointSize:Zu,lineWidth:Wu,lineColor:Yu,pointColor:Vu,lineRenderOrder:10,pointsRenderOrder:10};function Ku(i,t,e){var d,f,u,h,m;const n=(d=e==null?void 0:e.lineWidth)!=null?d:2,o=(f=e==null?void 0:e.lineColor)!=null?f:new H.Color(16777215),s=(u=e==null?void 0:e.pointSize)!=null?u:5,r=(h=e==null?void 0:e.lineRenderOrder)!=null?h:10,a=(m=e==null?void 0:e.lineRenderOrder)!=null?m:20,l=new vn.Line(i,t);l.setMaterial({linewidth:n,color:o}),l.line.material.depthTest=!1,l.line.material.transparent=!0,l.line.renderOrder=r,l.points.renderOrder=a;const c=l.points.material;return c.depthTest=!1,c.size=s,e!=null&&e.pointColor&&c.color.set(e.pointColor).convertSRGBToLinear(),e!=null&&e.pointTexture&&(c.map=e.pointTexture),l}function Js(i,t){const[e,n]=i.points,o=t==="light"?qu:Vs,s=Ku(e.position,n.position,o);return s.name="normalLine_"+i.id,s}function tt(i){const{x:t,y:e,z:n}=i;return!(Math.abs(t)>1||Math.abs(e)>1||Math.abs(n)>1)}function $u(){const i=document.createElement("div");return i.setAttribute("style","backdrop-filter: blur(4px);-webkit-backdrop-filter: blur(4px);"),i.style.padding="3px 6px",i.style.lineHeight="1",i.style.textAlign="center",i.style.transform="translate(-50%, -50%)",i.style.borderRadius="100px",i.style.fontSize="14px",i.style.color="#fff",i.style.background="rgba(195,195,195,0.70)",i.style.border="0.5px solid rgba(255,255,255,0.6)",i.style.pointerEvents="all",i.style.cursor="pointer",i}function ef(i){const t=document.createElement("div");return t.id="distance_"+i.id,t.classList.add("five-plugin-measure__distance"),t.style.opacity="0",t.style.position="absolute",t.style.left="0",t.style.top="0",t.style.transform="translate3d(0, 0, 0)",t.style.transformOrigin="left top",t}function tf(i){function t(){var m;(m=i.clickCallback)==null||m.call(i,h)}function e(){if(f)return f.highlight();c.style.border="0.5px solid #95AEFF",c.style.background="linear-gradient(90deg, #95AEFF 0%, #6386FF 100%)"}function n(){if(f)return f.unHighlight();c.style.border="0.5px solid rgba(255,255,255,0.6)",c.style.background="rgba(195,195,195,0.70)"}function o(m){const g=m.getElement();if(!g)return;const v=g.clientWidth,A=g.clientHeight;if(a.points.length<2)return;const[C,w]=a.points,E=C.position.clone().project(m.camera),D=w.position.clone().project(m.camera),y=E.clone().lerp(D,.5),L=new H.Vector2(E.x*v,E.y*A),x=new H.Vector2(D.x*v,D.y*A);if((()=>!(Math.abs(E.z)>1||Math.abs(D.z)>1||!tt(E)&&!tt(D)||!tt(y)||L.distanceTo(x)<20))()===!1){d.style.opacity="0",d.style.pointerEvents="none";return}const T=(y.x+1)/2*v,G=-(y.y-1)/2*A,P=-(Math.atan((L.y-x.y)/(L.x-x.x))*180)/Math.PI;d.style.transform=`translate(${T}px, ${G}px) rotate(${P}deg)`,d.style.opacity="1",d.style.pointerEvents="all",f&&f.update({line:a.toCompletelyJson(),polyline:a.getPolyline().toCompletelyJson()});const S=C.position.clone().distanceTo(w.position),j=i.line.model.params.getDistanceText(S);c.innerText!==j&&(c.innerText=j)}function s(m){m.appendChild(d),d.addEventListener("click",t)}function r(){c.removeEventListener("click",t),d.remove()}const{line:a}=i,l=a.id,c=$u(),d=ef(a),f=i.userDistanceItem,u=new H.Vector3(0,0,0),h={lineID:l,ndcPosition:u,update:o,appendTo:s,remove:r,highlight:e,unHighlight:n};return f!=null&&f.element?d.appendChild(f.element):d.appendChild(c),h}class Kt{constructor(t,e,n){p(this,"id");p(this,"selected",!1);p(this,"type","line");p(this,"model");p(this,"mesh");p(this,"points");p(this,"lightMesh");p(this,"hook");p(this,"distanceItem");p(this,"polyline");if(this.id=Fe(),this.model=n,t.id===e.id)throw new Error("\u65E0\u6548\u7684\u7EBF\u6BB5, \u4E00\u4E2A\u70B9\u65E0\u6CD5\u6784\u6210\u7EBF\u6BB5");this.hook=new me.Subscribe,this.points=[t,e],this.mesh=Js(this,"normal"),this.lightMesh=Js(this,"light"),this.distanceItem=tf({line:this,clickCallback:()=>this.hook.emit("selected",this),userDistanceItem:this.model.params.userDistanceItemCreator?this.model.params.userDistanceItemCreator():void 0}),t.lines.push(this),e.lines.push(this)}clear(){this.selected=!1,this.polyline=void 0}getPolyline(){if(this.polyline)return this.polyline;const t=this.model.polylines.find(n=>n.lines.includes(this));if(this.polyline=t,t)return t;const e=new Hi;return e.push(this),e}findAnotherPoint(t){return this.points.find(({id:e})=>e!==t.id)}toJson(){return{id:this.id,points:this.points.map(({id:t})=>t)}}toCompletelyJson(){return{id:this.id,points:this.points.map(t=>t.toJson())}}clone(){return new Kt(this.points[0].clone(),this.points[1].clone(),this.model)}}function gn(i,t){for(let e=0,n=t.length;e<n;e++)if(i===t[e])return t.splice(e,1)[0]}class nt{constructor(t){p(this,"id");p(this,"lines");p(this,"position");p(this,"type","point");this.id=Fe(),this.lines=[],this.position=new H.Vector3,t instanceof H.Vector3?this.position.copy(t):this.position.fromArray(t)}toJson(){return{id:this.id,lines:this.lines.map(({id:t})=>t),position:this.position.toArray()}}addLine(t){this.lines.push(t)}removeLine(t){gn(t,this.lines)}clone(){return new nt(this.position)}}class Gi{constructor(t){p(this,"lines",[]);p(this,"points",[]);p(this,"params");p(this,"polylines",[]);p(this,"hook",new me.Subscribe);this.params=t}addLine(t){const[e,n]=t.points;if(!e||!n)return this;this.includes(e)||this.points.push(e),this.includes(n)||this.points.push(n),this.lines.push(t);const o=this.polylines.find(s=>!!s.getNext(t));if(o)o.push(t);else{const s=new Hi;s.push(t),this.polylines.push(s)}this.hook.emit("lineAdded",t)}removeLineByID(t){const e=this.getLineByID(t);e&&this.removeLine(e)}removeLine(t){const e=this.polylines.find(s=>s.lines.includes(t));if(e){if(e.lines.slice(-1)[0]!==t)throw new Error("\u4E0D\u80FD\u4ECE\u4E2D\u95F4\u5220\u9664\u7EBF\u6BB5");e.pop(),e.lines.length===0&&gn(e,this.polylines)}const[n,o]=t.points;return n.lines.length===0&&gn(n,this.points),o.lines.length===0&&gn(o,this.points),gn(t,this.lines),t.clear(),this.hook.emit("lineRemoved",t),this}mergeModel(t){t.lines.forEach(e=>this.addLine(e))}includes(t){if(t.type==="point")return this.points.find(({id:e})=>e===t.id)!==void 0;if(t.type==="line")return this.lines.find(({id:e})=>e===t.id)!==void 0}getPointByID(t){return this.points.find(({id:e})=>e===t)}getLineByID(t){return this.lines.find(({id:e})=>e===t)}getClosestPoint(){}parse(t){const e=t.points.map(({id:s,position:r})=>{const a=new nt(r);return a.id=s,a}),n=t.lines.map(s=>{const[r,a]=s.points,l=this.getPointByID.call({points:e},r),c=this.getPointByID.call({points:e},a);if(!l||!c)throw new Error("\u7EBF\u4E0A\u7684\u70B9\u4E0D\u5B58\u5728");const d=new Kt(l,c,this);return d.id=s.id,d}),o=t.polylines.map(s=>{const r=new Hi;return s.lines.forEach(a=>{const l=n.find(({id:c})=>c===a);l&&r.push(l)}),r});return this.points.splice(0,this.points.length,...e),this.lines.splice(0,this.lines.length,...n),this.polylines.splice(0,this.polylines.length,...o),this}toJson(){return{points:this.points.map(t=>t.toJson()),lines:this.lines.map(t=>t.toJson()),polylines:this.polylines.map(t=>t.toJson()).filter(t=>t.lines.length>0)}}}const ei=i=>i.preventDefault();class ti{constructor(t){p(this,"model");p(this,"five");p(this,"group");p(this,"config");p(this,"dashed");p(this,"disposed",!1);p(this,"isMobile");p(this,"mouseGroup");p(this,"container");p(this,"fiveHelper");p(this,"hook");p(this,"magnifier");p(this,"userDistanceItemCreator");p(this,"updateDistanceUI",()=>{this.dashed.distanceItem.update(this.five),this.model.lines.forEach(t=>t.distanceItem.update(this.five))});var n,o;this.five=t.five,this.hook=t.hook,this.model=t.model,this.config=t.config,this.magnifier=t.magnifier,this.container=t.container,this.fiveHelper=t.fiveHelper,this.isMobile=(o=(n=t.openParams)==null?void 0:n.isMobile)!=null?o:!1,this.userDistanceItemCreator=t.userDistanceItemCreator,this.group=t.group,this.mouseGroup=t.mouseGroup,this.dashed=new Kt(new nt([0,0,0]),new nt([0,0,0]),this.model),this.dashed.mesh.setMaterial({dashed:!0,dashScale:100}),this.dashed.mesh.name="dashLine";const e=this.five.getElement();e&&(e.addEventListener("touchstart",ei),e.addEventListener("contextmenu",ei))}removeLine(t){this.group.remove(t.mesh,t.lightMesh),t.distanceItem.remove(),this.five.needsRender=!0}updateMouseGroup(t,e){if(!t)return this.mouseGroup;const n=this.fiveHelper.getAdsorbentPoint(t),o=n||t.point;if(this.mouseGroup.position.copy(o),e)this.mouseGroup.quaternion.copy(e.quaternion);else if(t.face){const r=t.face.normal.clone().multiplyScalar(.05),l=t.point.clone().add(r).clone().add(r);this.mouseGroup.lookAt(l)}return this.mouseGroup}dispose(){this.disposed=!0,this.magnifier.remove(),this.model.lines.forEach(e=>this.removeLine(e));const t=this.five.getElement();t&&(t.removeEventListener("touchstart",ei),t.removeEventListener("contextmenu",ei))}}function Ni(i){const{x:t,y:e}=i.center,{clientWidth:n,clientHeight:o}=i.target,s=i.target.getBoundingClientRect(),r=new H.Vector2(t,e).sub(new H.Vector2(s.left,s.top)),a=new H.Vector2(r.x/n*2-1,-(r.y/o)*2+1);return{point:r,ndcPoint:a}}function Wi(i,t){const e=Ni(t).ndcPoint,n=new H.Raycaster;return n.setFromCamera(e,i.camera),i.model.intersectRaycaster(n)}class ni extends ti{constructor(e){var o;super(e);p(this,"type","edit");p(this,"pressPoint");p(this,"hasAppendDashed",!1);p(this,"hasAppendMouseGroup",!1);p(this,"fiveElement");p(this,"lastPoint",null);p(this,"hammer");p(this,"onIntersectionUpdate",Ti((e,n)=>{var s;this.hasAppendMouseGroup===!1&&(this.group.add(this.mouseGroup),this.magnifier.appendTo(this.container),this.hasAppendMouseGroup=!0);const o=this.updateMouseGroup(e,n).position;(s=this.pressPoint)==null||s.position.copy(o),this.updateDashed(),requestAnimationFrame(()=>this.magnifier.renderWithPoint(this.mouseGroup.position)),this.five.needsRender=!0},20));p(this,"revoke",()=>{if(this.model.lines.length===0&&this.lastPoint){this.lastPoint=null,this.hasAppendDashed=!1,this.dashed.distanceItem.remove(),this.group.remove(this.dashed.mesh),this.hook.emit("anchorChange",null),this.five.needsRender=!0;return}if(this.model.lines.length===0&&!this.lastPoint||!this.lastPoint)return;const e=this.model.lines[this.model.lines.length-1],n=e.findAnotherPoint(this.lastPoint);!n||(this.lastPoint=n,this.hook.emit("anchorChange",n.position),this.group.remove(e.mesh),this.model.removeLine(e),this.hasAppendMouseGroup=!1,this.mouseGroup.position.copy(this.lastPoint.position),this.group.remove(this.mouseGroup),e.distanceItem.remove(),this.updateDashed(),this.magnifier.remove(),this.five.needsRender=!0)});p(this,"onMouseLeave",()=>{this.magnifier.remove(),this.group.remove(this.mouseGroup),this.hasAppendMouseGroup=!1,this.lastPoint&&(this.mouseGroup.position.copy(this.lastPoint.position),this.updateDashed())});p(this,"onLineChanged",()=>{this.hook.emit("editedLineChange",this.model.lines.map(e=>e.toCompletelyJson()))});p(this,"onPress",e=>{const[n]=Wi(this.five,e);if(!n||!n.face)return;const o=new nt(n.point);this.pressPoint=o,this.onIntersectionUpdate(n)});p(this,"onPan",e=>{if(!this.pressPoint)return;const[n]=Wi(this.five,e);!n||!n.face||this.onIntersectionUpdate(n)});p(this,"onPanEnd",e=>{!this.pressPoint||this.onTap(e)});p(this,"onTap",e=>{this.hasAppendDashed||(this.dashed.distanceItem.appendTo(this.container),this.group.add(this.dashed.mesh)),this.hasAppendDashed=!0;const[n]=Wi(this.five,e);this.updateMouseGroup(n);const o=new nt(this.mouseGroup.position),s=this.lastPoint;if(o&&(this.lastPoint=o),o&&s){const r=new Kt(s,o,this.model);r.distanceItem.appendTo(this.container),this.model.addLine(r),this.group.add(r.mesh),r.distanceItem.update(this.five)}this.pressPoint=void 0,this.hasAppendMouseGroup=!1,this.magnifier.remove(),this.group.remove(this.mouseGroup),this.updateDashed(),this.five.needsRender=!0,this.hook.emit("anchorChange",o.position)});p(this,"onWantsTapGesture",()=>!1);p(this,"onWantsToMoveToPano",()=>!1);p(this,"onWantsPanGesture",()=>this.pressPoint?!1:void 0);p(this,"onCameraUpdate",()=>{this.updateDistanceUI(),this.dashed.distanceItem.update(this.five)});p(this,"updateDashed",()=>{!this.lastPoint||(this.dashed.points[0].position.copy(this.lastPoint.position),this.dashed.points[1].position.copy(this.mouseGroup.position),this.dashed.mesh.setPoints(this.lastPoint.position,this.mouseGroup.position),this.dashed.distanceItem.update(this.five))});this.model=new Gi(this.config),this.five.on("cameraUpdate",this.onCameraUpdate),this.five.on("wantsPanGesture",this.onWantsPanGesture),this.five.on("wantsTapGesture",this.onWantsTapGesture),this.five.on("wantsToMoveToPano",this.onWantsToMoveToPano),this.five.on("intersectionOnModelUpdate",this.onIntersectionUpdate),this.model.hook.on("lineAdded",this.onLineChanged),this.model.hook.on("lineRemoved",this.onLineChanged);const n=this.five.getElement();if(n){this.fiveElement=n;const s=new sn.default(n);this.hammer=s,s.on("tap",this.onTap),s.on("pan",this.onPan),s.on("press",this.onPress),s.on("panend",this.onPanEnd)}(o=this.fiveElement)==null||o.addEventListener("mouseleave",this.onMouseLeave),this.hook.emit("anchorChange",null),this.five.refresh()}dispose(){var e,n;super.dispose(),this.group.remove(this.mouseGroup,this.dashed.mesh),this.five.off("cameraUpdate",this.onCameraUpdate),this.five.off("wantsPanGesture",this.onWantsPanGesture),this.five.off("wantsTapGesture",this.onWantsTapGesture),this.five.off("wantsToMoveToPano",this.onWantsToMoveToPano),this.five.off("intersectionOnModelUpdate",this.onIntersectionUpdate),this.model.hook.off("lineAdded",this.onLineChanged),this.model.hook.off("lineRemoved",this.onLineChanged),(e=this.hammer)==null||e.destroy(),(n=this.fiveElement)==null||n.removeEventListener("mouseleave",this.onMouseLeave),this.magnifier.dispose(),this.dashed.distanceItem.remove(),this.five.needsRender=!0}getEditingLines(){return this.model.lines}}function Xi(i,t){const e=i.x-t[0].x,n=i.y-t[0].y,o=t[1].x-t[0].x,s=t[1].y-t[0].y,r=e*o+n*s,a=o*o+s*s,l=r/a;let c,d;return l<0||nf(t[0],t[1])?(c=t[0].x,d=t[0].y):l>1?(c=t[1].x,d=t[1].y):(c=t[0].x+l*o,d=t[0].y+l*s),new H.Vector2(c,d)}function nf(i,t){return i.x===t.x&&i.y===t.y}function ii(i){const t=(s,r,a)=>{const l=s.lines.find(d=>d.points.findIndex(({id:u})=>u===s.id)!==r);if(!l)return a;const c=l.points[r];return c?t(c,r,a.concat(l)):a},e=t(i.points[0],1,[]),n=t(i.points[0],0,[]);return e.concat(n)}class of extends ti{constructor(e){super(e);p(this,"type","view");p(this,"highlightedLines",[]);p(this,"hammer");p(this,"wantsTapGesture",e=>{if(this.model.lines.length===0)return;const[n]=this.five.model.intersectRaycaster(e);if(!n)return;const o=this.five.camera,s=n.point.clone().project(o),r=this.container.clientWidth,a=this.container.clientHeight,l=new H.Vector2(s.x*r,s.y*a),c=this.model.lines.map(h=>{const[m,g]=h.points,v=m.position.clone().project(o),A=g.position.clone().project(o);if(!tt(v)&&!tt(A))return null;const C=new H.Vector2(v.x*r,v.y*a),w=new H.Vector2(A.x*r,A.y*a);return{id:h.id,points:[C,w]}}).filter(h=>!!h);if(c.length===0)return;const f=c.map(h=>{const m=Xi(l,h.points);return{id:h.id,distance:m.distanceTo(l)}}).sort((h,m)=>h.distance-m.distance)[0],u=f.distance>20?void 0:this.model.lines.find(({id:h})=>h===f.id);if(this.highlightedLines.length>0&&!u)return this.clearHighlightLines(),!1;if(u)return this.chooseLine(u),!1});p(this,"chooseLine",e=>{const n=ii(e);this.highlightLines(n),this.five.needsRender=!0,this.hook.emit("selectedChange",n.map(o=>o.toCompletelyJson()))});p(this,"lineRemoved",e=>{this.removeLine(e),this.hook.emit("selectedChange",this.model.lines.filter(n=>n.selected).map(n=>n.toCompletelyJson()))});p(this,"onCameraUpdate",()=>{this.updateDistanceUI()});this.model.lines.forEach(o=>{o.distanceItem.appendTo(this.container),o.distanceItem.update(this.five),o.hook.on("selected",this.chooseLine),this.group.add(o.mesh)});const n=this.five.getElement();if(n){const o=new sn.default(n);this.hammer=o}this.model.hook.on("lineRemoved",this.lineRemoved),this.five.on("cameraUpdate",this.onCameraUpdate),this.five.on("wantsTapGesture",this.wantsTapGesture),this.five.needsRender=!0}dispose(){var e;super.dispose(),this.model.hook.off("lineRemoved",this.lineRemoved),this.five.off("cameraUpdate",this.onCameraUpdate),this.five.off("wantsTapGesture",this.wantsTapGesture),this.five.needsRender=!0,this.hook.emit("selectedChange",[]),(e=this.hammer)==null||e.destroy()}highlightLine(e){e.selected||(e.selected=!0,this.group.add(e.lightMesh),e.distanceItem.highlight(),this.five.needsRender=!0)}clearHighlightLines(){this.group.children.length!==0&&(this.model.lines.forEach(e=>{e.selected=!1,e.distanceItem.unHighlight(),this.group.remove(e.lightMesh)}),this.highlightedLines=[],this.five.needsRender=!0)}highlightLines(e){this.clearHighlightLines(),this.highlightedLines=e,e.forEach(n=>this.highlightLine(n))}}const sf=`
|
|
209
209
|
<svg class="fpm__delete-icon" width="16px" height="17px" viewBox="0 0 16 17" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
210
210
|
<defs>
|
|
211
211
|
<linearGradient x1="22.185491%" y1="100%" x2="66.8316686%" y2="6.67239121%" id="linearGradient-1">
|
|
@@ -218,7 +218,7 @@ transition: all 500ms;
|
|
|
218
218
|
`,Zs="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTciIGhlaWdodD0iMjUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW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1zY9YieaKm36xS817VizJm96rSoEPa6Y0+MNUcKNp0D9l//jem4fFf6ontdHFH9Yz+3v6I3xW3qjfkDfGv2173719f+sQc/zLAb/D0EI6cG68deIAAAAAElFTkSuQmCC";class _s{constructor(t,e){p(this,"visible",!1);p(this,"five");p(this,"lines",[]);p(this,"points",[]);p(this,"onClick");p(this,"cancelDelete");p(this,"content",document.createElement("div"));p(this,"container",document.createElement("div"));p(this,"masking",document.createElement("div"));p(this,"onMouseEnter",()=>{this.content.style.backgroundImage=`url(${rf})`});p(this,"onMouseLeave",()=>{this.content.style.backgroundImage=`url(${Zs})`});this.five=t,this.onClick=(e==null?void 0:e.onClick)||(()=>{}),this.cancelDelete=(e==null?void 0:e.cancelDelete)||(()=>{}),this.container.classList.add("fpm__delete"),this.container.style.opacity="0",this.container.style.position="absolute",this.container.style.left="0",this.container.style.top="10px",this.container.style.transform="translate3d(0, 0, 10px)",this.container.style.pointerEvents="none",this.container.style.transition="top 200ms ease, opacity 200ms ease",this.container.style.zIndex="99",this.content.classList.add("fpm__delete-content"),this.content.style.width="62px",this.content.style.height="26px",this.content.style.display="flex",this.content.style.alignItems="center",this.content.style.justifyContent="center",this.content.style.transform="translate(-50%, -50%)",this.content.style.color="#fff",this.content.style.fontSize="12px",this.content.style.lineHeight="17px",this.content.style.borderRadius="11px",this.content.style.backgroundSize="100% 100%",this.content.style.cursor="pointer",this.content.style.userSelect="none",this.content.style.backgroundImage=`url(${Zs})`,this.content.innerHTML=`
|
|
219
219
|
${sf}
|
|
220
220
|
<span>\u5220\u9664</span>
|
|
221
|
-
`,this.container.append(this.content);const n=this.content.querySelector(".fpm__delete-icon");n&&(n.style.width="16px",n.style.height="17px",n.style.marginRight="1px"),this.content.addEventListener("click",this.onClick),this.content.addEventListener("mouseenter",this.onMouseEnter),this.content.addEventListener("mouseleave",this.onMouseLeave),this.masking.setAttribute("style","position: absolute;top: 0;left: 0;bottom: 0;right: 0;pointer-events: none;"),this.masking.addEventListener("click",this.cancelDelete),this.masking.addEventListener("touchstart",this.cancelDelete)}dispose(){this.content.removeEventListener("click",this.onClick),this.content.removeEventListener("mouseenter",this.onMouseEnter),this.content.removeEventListener("mouseleave",this.onMouseLeave),this.container.remove(),this.masking.removeEventListener("click",this.cancelDelete),this.masking.removeEventListener("touchstart",this.cancelDelete),this.masking.remove()}appendTo(t){return t.append(this.container),t.append(this.masking),this}setLines(t){return this.lines=t,this.points=Array.from(new Set(this.lines.map(e=>[e.points[0],e.points[1]]).flat(1))),this}updatePosition(){if(this.lines.length===0)return this;const t=this.points.map(u=>u.position),e=t.map(u=>u.clone().project(this.five.camera));if(e.some(u=>Math.abs(u.z)>1))return this.hide();const n=e.map(u=>u.x),o=e.map(u=>u.y),s=(Math.min(...n)+Math.max(...n))/2,r=Math.max(...o),a=this.container.parentElement;if(!a)return this;const l=(s+1)/2*a.clientWidth,c=-(r-1)/2*a.clientHeight;let d=l,f=c-34;if(this.lines.length===1&&t.length===2){const u=(o[1]-o[0])/(n[1]-n[0]),m=-((o[1]+o[0])/2-1)/2*a.clientHeight;Math.abs(u)>.4&&(d=l+57,f=m)}return this.container.style.transform=`translate3d(${d}px, ${f}px, 10px)`,this.show()}hide(){return this.visible=!1,this.masking.style.pointerEvents="none",this.container.style.opacity="0",this.container.style.top="10px",this.container.style.pointerEvents="none",this}show(){return this.visible=!0,this.masking.style.pointerEvents="auto",this.container.style.opacity="1",this.container.style.top="0",this.container.style.pointerEvents="auto",this}}function af(i,t){const e=(i.x+1)/2*t.width,n=-(i.y-1)/2*t.height;return new H.Vector2(e,n)}function lf(i,t,e,n){const o=i.getElement();if(!o||t.length===0)return null;const s={width:o.clientWidth,height:o.clientHeight},r=t.map(a=>{const l=a.position.clone().project(i.camera);return tt(l)?{distance:af(l,s).distanceTo(e),point:a}:{distance:1/0,point:a}}).sort((a,l)=>a.distance-l.distance);return typeof n=="number"&&r[0].distance>n?null:r[0]}class Yi extends ei{constructor(e){super(e);p(this,"type","watch");p(this,"deleteDom");p(this,"highlightedLines",[]);p(this,"fiveElement");p(this,"editPointState");p(this,"hammer");p(this,"onPanStart",e=>{var a;if(this.model.points.length===0||!this.fiveElement)return;const n=Ni(e).point,o=(a=lf(this.five,this.model.points,n,20))==null?void 0:a.point;if(!o){this.editPointState=void 0;return}const s={point:o,associatedLines:ni(o.lines[0])};this.hook.emit("wantsDragLine",{point:o.id,lines:s.associatedLines.map(({id:l})=>l)})||(this.editPointState=s,this.magnifier.appendTo(this.container),this.group.add(this.mouseGroup))});p(this,"onPanEnd",()=>{!this.editPointState||(this.editPointState.point.lines.forEach(e=>e.mesh.setMaterial({dashed:!1})),this.highlightLines(this.editPointState.associatedLines),this.editPointState=void 0,this.magnifier.remove(),this.group.remove(this.mouseGroup))});p(this,"onPan",e=>{if(!this.editPointState||!this.fiveElement)return;const n=Ni(e).ndcPoint,o=new H.Raycaster;o.setFromCamera(n,this.five.camera);const[s]=this.five.model.intersectRaycaster(o);!s||this.onIntersectionUpdate(s)});p(this,"onIntersectionUpdate",(e,n)=>{if(!!this.editPointState){if(this.clearHighlightLines(),this.editPointState.point.position.copy(e.point),this.editPointState.point.lines.forEach(o=>{o.mesh.setPoints(o.points[0].position.clone(),o.points[1].position.clone()),o.lightMesh.setPoints(o.points[0].position.clone(),o.points[1].position.clone()),o.mesh.setMaterial({dashed:!0})}),this.updateDistanceUI(),this.magnifier.renderWithPoint(e.point),this.mouseGroup.position.copy(e.point),n)this.mouseGroup.quaternion.copy(n.quaternion);else if(e.face){const s=e.face.normal.clone().multiplyScalar(.05),a=e.point.clone().add(s).clone().add(s);this.mouseGroup.lookAt(a)}this.five.needsRender=!0,this.hook.emit("selectedChange",this.editPointState.associatedLines.map(o=>o.toCompletelyJson()))}});p(this,"wantsPanGesture",()=>{if(this.editPointState)return!1});p(this,"wantsTapGesture",e=>{const[n]=this.five.model.intersectRaycaster(e);if(!n)return;const o=this.five.camera,s=n.point.clone().project(o),r=this.container.clientWidth,a=this.container.clientHeight,l=new H.Vector2(s.x*r,s.y*a),c=this.model.lines.map(h=>{const[m,g]=h.points,v=m.position.clone().project(o),A=g.position.clone().project(o);if(!tt(v)&&!tt(A))return null;const C=new H.Vector2(v.x*r,v.y*a),w=new H.Vector2(A.x*r,A.y*a);return{id:h.id,points:[C,w]}}).filter(h=>!!h);if(c.length===0)return;const f=c.map(h=>{const m=Xi(l,h.points);return{id:h.id,distance:m.distanceTo(l)}}).sort((h,m)=>h.distance-m.distance)[0];if(f.distance>20)return;const u=this.model.lines.find(({id:h})=>h===f.id);if(!!u)return this.chooseLine(u),!1});p(this,"chooseLine",e=>{const n=ni(e);this.highlightLines(n),this.five.needsRender=!0,this.hook.emit("selectedChange",n.map(o=>o.toCompletelyJson()))});p(this,"lineRemoved",e=>{this.removeLine(e),this.hook.emit("selectedChange",this.model.lines.filter(n=>n.selected).map(n=>n.toCompletelyJson()))});p(this,"onCameraUpdate",()=>{this.updateDistanceUI(),this.highlightedLines.length>0&&this.deleteDom.updatePosition()});p(this,"deleteDomClickCallback",()=>{this.highlightedLines[0].getPolyline().lines.slice().reverse().forEach(n=>this.model.removeLine(n)),this.highlightedLines=[],this.deleteDom.setLines([]).hide()});p(this,"cancelDeleteClickCallback",()=>{this.clearHighlightLines()});this.deleteDom=new _s(this.five,{onClick:this.deleteDomClickCallback,cancelDelete:this.cancelDeleteClickCallback}).appendTo(this.container),this.model.lines.forEach(o=>{o.distanceItem.appendTo(this.container),o.distanceItem.update(this.five),o.hook.on("selected",this.chooseLine),this.group.add(o.mesh)});const n=this.five.getElement();if(n){this.fiveElement=n;const o=new sn.default(n);this.hammer=o,o.on("pan",this.onPan),o.on("panstart",this.onPanStart),o.on("panend",this.onPanEnd)}this.model.hook.on("lineRemoved",this.lineRemoved),this.five.on("cameraUpdate",this.onCameraUpdate),this.five.on("wantsTapGesture",this.wantsTapGesture),this.five.on("wantsPanGesture",this.wantsPanGesture),this.five.needsRender=!0}dispose(){var e;super.dispose(),this.deleteDom.dispose(),this.model.hook.off("lineRemoved",this.lineRemoved),this.model.lines.forEach(n=>n.hook.off("selected",this.chooseLine)),this.five.off("cameraUpdate",this.onCameraUpdate),this.five.off("wantsPanGesture",this.wantsPanGesture),this.five.off("wantsTapGesture",this.wantsTapGesture),this.five.needsRender=!0,this.hook.emit("selectedChange",[]),(e=this.hammer)==null||e.destroy()}highlightLine(e){e.selected||(e.selected=!0,this.group.add(e.lightMesh),e.distanceItem.highlight(),this.five.needsRender=!0)}clearHighlightLines(){this.group.children.length!==0&&(this.deleteDom.setLines([]).hide(),this.model.lines.forEach(e=>{e.selected=!1,e.distanceItem.unHighlight(),this.group.remove(e.lightMesh)}),this.highlightedLines=[],this.five.needsRender=!0)}highlightLines(e){this.clearHighlightLines(),this.highlightedLines=e,this.deleteDom.setLines(e).updatePosition().show(),e.forEach(n=>this.highlightLine(n))}}class qs extends ei{constructor(e){super(e);p(this,"state","watching");p(this,"model",new Gi(this.config));p(this,"hasAppendDashed",!1);p(this,"fiveElement");p(this,"mobileStartPoint",null);p(this,"mobileNowPoint",null);p(this,"highlightedLines",[]);p(this,"deleteDom");p(this,"onLineChanged",()=>{this.hook.emit("editedLineChange",this.model.lines.map(e=>e.toCompletelyJson()))});p(this,"onWantsTapGesture",e=>{if(this.state==="editing")return!1;const[n]=this.five.model.intersectRaycaster(e);if(!n)return;const o=this.five.camera,s=n.point.clone().project(o),r=this.container.clientWidth,a=this.container.clientHeight,l=new H.Vector2(s.x*r,s.y*a),c=this.model.lines.map(h=>{const[m,g]=h.points,v=m.position.clone().project(o),A=g.position.clone().project(o);if(!tt(v)&&!tt(A))return null;const C=new H.Vector2(v.x*r,v.y*a),w=new H.Vector2(A.x*r,A.y*a);return{id:h.id,points:[C,w]}}).filter(h=>!!h);if(c.length===0)return;const f=c.map(h=>{const m=Xi(l,h.points);return{id:h.id,distance:m.distanceTo(l)}}).sort((h,m)=>h.distance-m.distance)[0];if(f.distance>20)return;const u=this.model.lines.find(({id:h})=>h===f.id);if(!!u)return this.chooseLine(u),!1});p(this,"onWantsToMoveToPano",()=>this.state==="watching");p(this,"onCameraUpdate",()=>{this.updateDistanceUI(),this.dashed.distanceItem.update(this.five)});p(this,"updateMobileDashed",()=>{!this.mobileStartPoint||!this.mobileNowPoint||(this.dashed.points[0].position.copy(this.mobileStartPoint.position),this.dashed.points[1].position.copy(this.mobileNowPoint.position),this.dashed.mesh.setPoints(this.mobileStartPoint.position,this.mobileNowPoint.position),this.dashed.distanceItem.update(this.five))});p(this,"updateMagnifier",e=>{this.magnifier.visible===!1&&this.magnifier.appendTo(this.container),requestAnimationFrame(()=>this.magnifier.renderWithPoint(e.position)),this.five.needsRender=!0});p(this,"onGetStartPoint",e=>{this.mobileStartPoint=e});p(this,"onGetEndPoint",e=>{const n=this.mobileNowPoint;if(this.removeLine(this.dashed),this.hasAppendDashed=!1,this.mobileStartPoint&&n){const o=new Kt(this.mobileStartPoint,n,this.model);o.distanceItem.appendTo(this.container),o.distanceItem.update(this.five),o.hook.on("selected",this.chooseLine),this.group.add(o.mesh),this.model.addLine(o)}this.mobileStartPoint=null,this.mobileNowPoint=null,this.five.needsRender=!0});p(this,"onNowPointChange",e=>{if(this.state==="watching"){this.mobileNowPoint=e,this.updateMagnifier(e);return}this.hasAppendDashed||(this.dashed.distanceItem.appendTo(this.container),this.group.add(this.dashed.mesh),this.hasAppendDashed=!0),this.five.needsRender=!0,this.mobileNowPoint=e,this.updateMobileDashed(),this.updateMagnifier(e),this.five.needsRender=!0});p(this,"onWillChangeState",(e,n)=>{this.state=n,this.state==="watching"?this.five.helperVisible=!0:this.five.helperVisible=!1});p(this,"chooseLine",e=>{const n=ni(e);this.highlightLines(n),this.five.needsRender=!0,this.hook.emit("selectedChange",n.map(o=>o.toCompletelyJson()))});p(this,"deleteDomClickCallback",()=>{this.highlightedLines.forEach(e=>{this.removeLine(e),this.model.removeLine(e)}),this.highlightedLines=[],this.deleteDom.setLines([]).hide()});p(this,"cancelDeleteClickCallback",()=>{this.clearHighlightLines()});this.deleteDom=new _s(this.five,{onClick:this.deleteDomClickCallback,cancelDelete:this.cancelDeleteClickCallback}).appendTo(this.container),this.five.on("cameraUpdate",this.onCameraUpdate),this.five.on("wantsTapGesture",this.onWantsTapGesture),this.five.on("wantsToMoveToPano",this.onWantsToMoveToPano),this.model.hook.on("lineAdded",this.onLineChanged),this.model.hook.on("lineRemoved",this.onLineChanged),this.hook.on("getStartPoint",this.onGetStartPoint),this.hook.on("getEndPoint",this.onGetEndPoint),this.hook.on("nowPointChange",this.onNowPointChange),this.hook.on("willChangeState",this.onWillChangeState),this.five.refresh()}dispose(){super.dispose(),this.group.remove(this.mouseGroup,this.dashed.mesh),this.five.off("cameraUpdate",this.onCameraUpdate),this.five.off("wantsTapGesture",this.onWantsTapGesture),this.five.off("wantsToMoveToPano",this.onWantsToMoveToPano),this.model.hook.off("lineAdded",this.onLineChanged),this.model.hook.off("lineRemoved",this.onLineChanged),this.hook.off("getStartPoint",this.onGetStartPoint),this.hook.off("getEndPoint",this.onGetEndPoint),this.hook.off("nowPointChange",this.onNowPointChange),this.hook.off("willChangeState",this.onWillChangeState),this.hook.emit("selectedChange",[]),this.dashed.distanceItem.remove(),this.five.needsRender=!0}highlightLine(e){e.selected||(e.selected=!0,this.group.add(e.lightMesh),e.distanceItem.highlight(),this.five.needsRender=!0)}clearHighlightLines(){this.group.children.length!==0&&(this.deleteDom.setLines([]).hide(),this.model.lines.forEach(e=>{e.selected=!1,e.distanceItem.unHighlight(),this.group.remove(e.lightMesh)}),this.highlightedLines=[],this.five.needsRender=!0)}getEditingLines(){return this.model.lines}highlightLines(e){this.clearHighlightLines(),this.highlightedLines=e,this.deleteDom.setLines(e).updatePosition().show(),e.forEach(n=>this.highlightLine(n))}}const cf="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAbYAAAGwCAYAAADFUEBtAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAABtqADAAQAAAABAAABsAA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CX4oKclFCS85c5MXt11SjgfQDeOwBLuQ0diE0bgJbUCWq8Vsljfhdoww3oxVidWYjD54GnehVDEFG8RDX3f+7UnchifRD1Oxxnjn/waMxJ14B8hytZ6zWb2LPkXvptdTK3LIpJN0hI7SMToqOU7VId+vFqY9Tk0VbmzgXx2l39FPaBv9kawugS6F2awa0wfoPfRWabs2AebJ0hliTufKGnJJSNzc0gcU82/eUh62iVNCRqP6ZUISCzjKAfq7tNev6Kd0mKzsBZJrlgQ+hXvQG1OwGi8hc4moxDrMRF/cjo8iDrLYc7brjRjegq/jHvTEJKzAtgtqrx1YhvHojrvxDbwNBepxLfaczaqA2lBrSUtqLmlKTahYe/1FVAaRS0KGymk6kTvzO0KH/9NuHZsAEAJAEFy+/0pfY2O7EMGZq2Hhmo3+Vq9yI83sCzjhythAbIDYQGyA2EBsIDZAbCA2QGwgNhAbIDYQGyA2EBuIDRAbiA0QG4gNxAaIDcQGiA3EBmIDxAZiA8QGYgOxAWIDsQEb7ePiGN5/UYAAAAAASUVORK5CYII=",uf=`
|
|
221
|
+
`,this.container.append(this.content);const n=this.content.querySelector(".fpm__delete-icon");n&&(n.style.width="16px",n.style.height="17px",n.style.marginRight="1px"),this.content.addEventListener("click",this.onClick),this.content.addEventListener("mouseenter",this.onMouseEnter),this.content.addEventListener("mouseleave",this.onMouseLeave),this.masking.setAttribute("style","position: absolute;top: 0;left: 0;bottom: 0;right: 0;pointer-events: none;"),this.masking.addEventListener("click",this.cancelDelete),this.masking.addEventListener("touchstart",this.cancelDelete)}dispose(){this.content.removeEventListener("click",this.onClick),this.content.removeEventListener("mouseenter",this.onMouseEnter),this.content.removeEventListener("mouseleave",this.onMouseLeave),this.container.remove(),this.masking.removeEventListener("click",this.cancelDelete),this.masking.removeEventListener("touchstart",this.cancelDelete),this.masking.remove()}appendTo(t){return t.append(this.container),t.append(this.masking),this}setLines(t){return this.lines=t,this.points=Array.from(new Set(this.lines.map(e=>[e.points[0],e.points[1]]).flat(1))),this}updatePosition(){if(this.lines.length===0)return this;const t=this.points.map(u=>u.position),e=t.map(u=>u.clone().project(this.five.camera));if(e.some(u=>Math.abs(u.z)>1))return this.hide();const n=e.map(u=>u.x),o=e.map(u=>u.y),s=(Math.min(...n)+Math.max(...n))/2,r=Math.max(...o),a=this.container.parentElement;if(!a)return this;const l=(s+1)/2*a.clientWidth,c=-(r-1)/2*a.clientHeight;let d=l,f=c-34;if(this.lines.length===1&&t.length===2){const u=(o[1]-o[0])/(n[1]-n[0]),m=-((o[1]+o[0])/2-1)/2*a.clientHeight;Math.abs(u)>.4&&(d=l+57,f=m)}return this.container.style.transform=`translate3d(${d}px, ${f}px, 10px)`,this.show()}hide(){return this.visible=!1,this.masking.style.pointerEvents="none",this.container.style.opacity="0",this.container.style.top="10px",this.container.style.pointerEvents="none",this}show(){return this.visible=!0,this.masking.style.pointerEvents="auto",this.container.style.opacity="1",this.container.style.top="0",this.container.style.pointerEvents="auto",this}}function af(i,t){const e=(i.x+1)/2*t.width,n=-(i.y-1)/2*t.height;return new H.Vector2(e,n)}function lf(i,t,e,n){const o=i.getElement();if(!o||t.length===0)return null;const s={width:o.clientWidth,height:o.clientHeight},r=t.map(a=>{const l=a.position.clone().project(i.camera);return tt(l)?{distance:af(l,s).distanceTo(e),point:a}:{distance:1/0,point:a}}).sort((a,l)=>a.distance-l.distance);return typeof n=="number"&&r[0].distance>n?null:r[0]}class Yi extends ti{constructor(e){super(e);p(this,"type","watch");p(this,"deleteDom");p(this,"highlightedLines",[]);p(this,"fiveElement");p(this,"editPointState");p(this,"hammer");p(this,"onPanStart",e=>{var a;if(this.model.points.length===0||!this.fiveElement)return;const n=Ni(e).point,o=(a=lf(this.five,this.model.points,n,20))==null?void 0:a.point;if(!o){this.editPointState=void 0;return}const s={point:o,associatedLines:ii(o.lines[0])};this.hook.emit("wantsDragLine",{point:o.id,lines:s.associatedLines.map(({id:l})=>l)})||(this.editPointState=s,this.magnifier.appendTo(this.container),this.group.add(this.mouseGroup))});p(this,"onPanEnd",()=>{!this.editPointState||(this.editPointState.point.lines.forEach(e=>e.mesh.setMaterial({dashed:!1})),this.highlightLines(this.editPointState.associatedLines),this.editPointState=void 0,this.magnifier.remove(),this.group.remove(this.mouseGroup))});p(this,"onPan",e=>{if(!this.editPointState||!this.fiveElement)return;const n=Ni(e).ndcPoint,o=new H.Raycaster;o.setFromCamera(n,this.five.camera);const[s]=this.five.model.intersectRaycaster(o);!s||this.onIntersectionUpdate(s)});p(this,"onIntersectionUpdate",(e,n)=>{if(!!this.editPointState){if(this.clearHighlightLines(),this.editPointState.point.position.copy(e.point),this.editPointState.point.lines.forEach(o=>{o.mesh.setPoints(o.points[0].position.clone(),o.points[1].position.clone()),o.lightMesh.setPoints(o.points[0].position.clone(),o.points[1].position.clone()),o.mesh.setMaterial({dashed:!0})}),this.updateDistanceUI(),this.magnifier.renderWithPoint(e.point),this.mouseGroup.position.copy(e.point),n)this.mouseGroup.quaternion.copy(n.quaternion);else if(e.face){const s=e.face.normal.clone().multiplyScalar(.05),a=e.point.clone().add(s).clone().add(s);this.mouseGroup.lookAt(a)}this.five.needsRender=!0,this.hook.emit("selectedChange",this.editPointState.associatedLines.map(o=>o.toCompletelyJson()))}});p(this,"wantsPanGesture",()=>{if(this.editPointState)return!1});p(this,"wantsTapGesture",e=>{const[n]=this.five.model.intersectRaycaster(e);if(!n)return;const o=this.five.camera,s=n.point.clone().project(o),r=this.container.clientWidth,a=this.container.clientHeight,l=new H.Vector2(s.x*r,s.y*a),c=this.model.lines.map(h=>{const[m,g]=h.points,v=m.position.clone().project(o),A=g.position.clone().project(o);if(!tt(v)&&!tt(A))return null;const C=new H.Vector2(v.x*r,v.y*a),w=new H.Vector2(A.x*r,A.y*a);return{id:h.id,points:[C,w]}}).filter(h=>!!h);if(c.length===0)return;const f=c.map(h=>{const m=Xi(l,h.points);return{id:h.id,distance:m.distanceTo(l)}}).sort((h,m)=>h.distance-m.distance)[0];if(f.distance>20)return;const u=this.model.lines.find(({id:h})=>h===f.id);if(!!u)return this.chooseLine(u),!1});p(this,"chooseLine",e=>{const n=ii(e);this.highlightLines(n),this.five.needsRender=!0,this.hook.emit("selectedChange",n.map(o=>o.toCompletelyJson()))});p(this,"lineRemoved",e=>{this.removeLine(e),this.hook.emit("selectedChange",this.model.lines.filter(n=>n.selected).map(n=>n.toCompletelyJson()))});p(this,"onCameraUpdate",()=>{this.updateDistanceUI(),this.highlightedLines.length>0&&this.deleteDom.updatePosition()});p(this,"deleteDomClickCallback",()=>{this.highlightedLines[0].getPolyline().lines.slice().reverse().forEach(n=>this.model.removeLine(n)),this.highlightedLines=[],this.deleteDom.setLines([]).hide()});p(this,"cancelDeleteClickCallback",()=>{this.clearHighlightLines()});this.deleteDom=new _s(this.five,{onClick:this.deleteDomClickCallback,cancelDelete:this.cancelDeleteClickCallback}).appendTo(this.container),this.model.lines.forEach(o=>{o.distanceItem.appendTo(this.container),o.distanceItem.update(this.five),o.hook.on("selected",this.chooseLine),this.group.add(o.mesh)});const n=this.five.getElement();if(n){this.fiveElement=n;const o=new sn.default(n);this.hammer=o,o.on("pan",this.onPan),o.on("panstart",this.onPanStart),o.on("panend",this.onPanEnd)}this.model.hook.on("lineRemoved",this.lineRemoved),this.five.on("cameraUpdate",this.onCameraUpdate),this.five.on("wantsTapGesture",this.wantsTapGesture),this.five.on("wantsPanGesture",this.wantsPanGesture),this.five.needsRender=!0}dispose(){var e;super.dispose(),this.deleteDom.dispose(),this.model.hook.off("lineRemoved",this.lineRemoved),this.model.lines.forEach(n=>n.hook.off("selected",this.chooseLine)),this.five.off("cameraUpdate",this.onCameraUpdate),this.five.off("wantsPanGesture",this.wantsPanGesture),this.five.off("wantsTapGesture",this.wantsTapGesture),this.five.needsRender=!0,this.hook.emit("selectedChange",[]),(e=this.hammer)==null||e.destroy()}highlightLine(e){e.selected||(e.selected=!0,this.group.add(e.lightMesh),e.distanceItem.highlight(),this.five.needsRender=!0)}clearHighlightLines(){this.group.children.length!==0&&(this.deleteDom.setLines([]).hide(),this.model.lines.forEach(e=>{e.selected=!1,e.distanceItem.unHighlight(),this.group.remove(e.lightMesh)}),this.highlightedLines=[],this.five.needsRender=!0)}highlightLines(e){this.clearHighlightLines(),this.highlightedLines=e,this.deleteDom.setLines(e).updatePosition().show(),e.forEach(n=>this.highlightLine(n))}}class qs extends ti{constructor(e){super(e);p(this,"state","watching");p(this,"model",new Gi(this.config));p(this,"hasAppendDashed",!1);p(this,"fiveElement");p(this,"mobileStartPoint",null);p(this,"mobileNowPoint",null);p(this,"highlightedLines",[]);p(this,"deleteDom");p(this,"onLineChanged",()=>{this.hook.emit("editedLineChange",this.model.lines.map(e=>e.toCompletelyJson()))});p(this,"onWantsTapGesture",e=>{if(this.state==="editing")return!1;const[n]=this.five.model.intersectRaycaster(e);if(!n)return;const o=this.five.camera,s=n.point.clone().project(o),r=this.container.clientWidth,a=this.container.clientHeight,l=new H.Vector2(s.x*r,s.y*a),c=this.model.lines.map(h=>{const[m,g]=h.points,v=m.position.clone().project(o),A=g.position.clone().project(o);if(!tt(v)&&!tt(A))return null;const C=new H.Vector2(v.x*r,v.y*a),w=new H.Vector2(A.x*r,A.y*a);return{id:h.id,points:[C,w]}}).filter(h=>!!h);if(c.length===0)return;const f=c.map(h=>{const m=Xi(l,h.points);return{id:h.id,distance:m.distanceTo(l)}}).sort((h,m)=>h.distance-m.distance)[0];if(f.distance>20)return;const u=this.model.lines.find(({id:h})=>h===f.id);if(!!u)return this.chooseLine(u),!1});p(this,"onWantsToMoveToPano",()=>this.state==="watching");p(this,"onCameraUpdate",()=>{this.updateDistanceUI(),this.dashed.distanceItem.update(this.five)});p(this,"updateMobileDashed",()=>{!this.mobileStartPoint||!this.mobileNowPoint||(this.dashed.points[0].position.copy(this.mobileStartPoint.position),this.dashed.points[1].position.copy(this.mobileNowPoint.position),this.dashed.mesh.setPoints(this.mobileStartPoint.position,this.mobileNowPoint.position),this.dashed.distanceItem.update(this.five))});p(this,"updateMagnifier",e=>{this.magnifier.visible===!1&&this.magnifier.appendTo(this.container),requestAnimationFrame(()=>this.magnifier.renderWithPoint(e.position)),this.five.needsRender=!0});p(this,"onGetStartPoint",e=>{this.mobileStartPoint=e});p(this,"onGetEndPoint",e=>{const n=this.mobileNowPoint;if(this.removeLine(this.dashed),this.hasAppendDashed=!1,this.mobileStartPoint&&n){const o=new Kt(this.mobileStartPoint,n,this.model);o.distanceItem.appendTo(this.container),o.distanceItem.update(this.five),o.hook.on("selected",this.chooseLine),this.group.add(o.mesh),this.model.addLine(o)}this.mobileStartPoint=null,this.mobileNowPoint=null,this.five.needsRender=!0});p(this,"onNowPointChange",e=>{if(this.state==="watching"){this.mobileNowPoint=e,this.updateMagnifier(e);return}this.hasAppendDashed||(this.dashed.distanceItem.appendTo(this.container),this.group.add(this.dashed.mesh),this.hasAppendDashed=!0),this.five.needsRender=!0,this.mobileNowPoint=e,this.updateMobileDashed(),this.updateMagnifier(e),this.five.needsRender=!0});p(this,"onWillChangeState",(e,n)=>{this.state=n,this.state==="watching"?this.five.helperVisible=!0:this.five.helperVisible=!1});p(this,"chooseLine",e=>{const n=ii(e);this.highlightLines(n),this.five.needsRender=!0,this.hook.emit("selectedChange",n.map(o=>o.toCompletelyJson()))});p(this,"deleteDomClickCallback",()=>{this.highlightedLines.forEach(e=>{this.removeLine(e),this.model.removeLine(e)}),this.highlightedLines=[],this.deleteDom.setLines([]).hide()});p(this,"cancelDeleteClickCallback",()=>{this.clearHighlightLines()});this.deleteDom=new _s(this.five,{onClick:this.deleteDomClickCallback,cancelDelete:this.cancelDeleteClickCallback}).appendTo(this.container),this.five.on("cameraUpdate",this.onCameraUpdate),this.five.on("wantsTapGesture",this.onWantsTapGesture),this.five.on("wantsToMoveToPano",this.onWantsToMoveToPano),this.model.hook.on("lineAdded",this.onLineChanged),this.model.hook.on("lineRemoved",this.onLineChanged),this.hook.on("getStartPoint",this.onGetStartPoint),this.hook.on("getEndPoint",this.onGetEndPoint),this.hook.on("nowPointChange",this.onNowPointChange),this.hook.on("willChangeState",this.onWillChangeState),this.five.refresh()}dispose(){super.dispose(),this.group.remove(this.mouseGroup,this.dashed.mesh),this.five.off("cameraUpdate",this.onCameraUpdate),this.five.off("wantsTapGesture",this.onWantsTapGesture),this.five.off("wantsToMoveToPano",this.onWantsToMoveToPano),this.model.hook.off("lineAdded",this.onLineChanged),this.model.hook.off("lineRemoved",this.onLineChanged),this.hook.off("getStartPoint",this.onGetStartPoint),this.hook.off("getEndPoint",this.onGetEndPoint),this.hook.off("nowPointChange",this.onNowPointChange),this.hook.off("willChangeState",this.onWillChangeState),this.hook.emit("selectedChange",[]),this.dashed.distanceItem.remove(),this.five.needsRender=!0}highlightLine(e){e.selected||(e.selected=!0,this.group.add(e.lightMesh),e.distanceItem.highlight(),this.five.needsRender=!0)}clearHighlightLines(){this.group.children.length!==0&&(this.deleteDom.setLines([]).hide(),this.model.lines.forEach(e=>{e.selected=!1,e.distanceItem.unHighlight(),this.group.remove(e.lightMesh)}),this.highlightedLines=[],this.five.needsRender=!0)}getEditingLines(){return this.model.lines}highlightLines(e){this.clearHighlightLines(),this.highlightedLines=e,this.deleteDom.setLines(e).updatePosition().show(),e.forEach(n=>this.highlightLine(n))}}const cf="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAbYAAAGwCAYAAADFUEBtAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAABtqADAAQAAAABAAABsAAAAABTZ8U6AAAtiklEQVR4Ae2dAXJbSbJdp+d7AfYSHOGVeAPek5fkNXgLjviLmRkZl+CRbtc8UBKRRalZpyIesiorMx/eIcjb+QCh//Y3hwQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQk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hc4moxDrMRF/cjo8iDrLYc7brjRjegq/jHvTEJKzAtgtqrx1YhvHojrvxDbwNBepxLfaczaqA2lBrSUtqLmlKTahYe/1FVAaRS0KGymk6kTvzO0KH/9NuHZsAEAJAEFy+/0pfY2O7EMGZq2Hhmo3+Vq9yI83sCzjhythAbIDYQGyA2EBsIDZAbCA2QGwgNhAbIDYQGyA2EBuIDRAbiA0QG4gNxAaIDcQGiA3EBmIDxAZiA8QGYgOxAWIDsQEb7ePiGN5/UYAAAAAASUVORK5CYII=",uf=`
|
|
222
222
|
varying vec2 vUv;
|
|
223
223
|
void main() {
|
|
224
224
|
vUv = uv;
|
|
@@ -494,7 +494,7 @@ void main() {
|
|
|
494
494
|
<div class='range-piece__content'></div>
|
|
495
495
|
<div class="range-piece__aim"></div>
|
|
496
496
|
</div>
|
|
497
|
-
`;function kf(){}const{Vector2:Df}=I;function Lf(i,t){const{offsetWidth:e,offsetHeight:n}=t,{top:o,left:s}=t.getBoundingClientRect();return Object.assign(new Df,{x:(i.x-s)/e*2-1,y:-(i.y-o)/n*2+1})}class Sf{constructor(t){p(this,"container",document.createElement("div"));p(this,"five");p(this,"group");p(this,"mouseGroup");p(this,"hasAppendMouseGroup",!1);p(this,"fiveHelper");p(this,"hook");p(this,"content");p(this,"intersectMesh");p(this,"centerMouseXY");p(this,"raycaster",new H.Raycaster);p(this,"pieceStyl",{matrix3d:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],scale:1,opacity:.4});p(this,"onCameraDirectionUpdate",()=>{const t=this.getIntersection();if(t){this.pieceChange(t),this.updateMouseGroup(t);const e=new nt(this.mouseGroup.position);this.hook.emit("nowPointChange",e)}});p(this,"onWillChangeState",(t,e)=>{var o;this.dotAnimation();const n=(o=this.getIntersection())==null?void 0:o.point;!n||(e==="editing"?this.hook.emit("getStartPoint",new nt(n)):this.hook.emit("getEndPoint",new nt(n)))});p(this,"computedCenterMouseXY",()=>{const t=this.container.querySelector(".range-piece__aim");if(!t)return null;const{left:e,top:n,width:o,height:s}=t.getBoundingClientRect(),r=Math.round(e+o/2),a=Math.round(n+s/2),c=Lf({x:r,y:a},this.five.getElement());this.centerMouseXY=c});p(this,"getIntersection",()=>{if(!this.centerMouseXY)return null;this.raycaster.setFromCamera(this.centerMouseXY,this.five.camera);const t=this.five.model.intersectRaycaster(this.raycaster)[0];return t||null});this.five=t.five,this.hook=t.hook,this.group=t.group,this.mouseGroup=Ks(N({isMobile:!0},t.openParams.crossHairParameter)),this.fiveHelper=t.fiveHelper,this.container.innerHTML=xf,this.container.classList.add("range-piece-controller"),this.content=this.container.querySelector(".range-piece__content"),this.content&&(this.content.style.transform=`matrix3d(${this.pieceStyl.matrix3d.toString()}) scale(${this.pieceStyl.scale})`,this.content.style.opacity=`${this.pieceStyl.opacity}`),t.container.append(this.container),this.intersectMesh=new H.Mesh(new H.RingGeometry(.04,.08,32),new H.MeshBasicMaterial({color:1245179,opacity:0,side:H.DoubleSide,transparent:!0})),this.container.addEventListener("animationend",this.computedCenterMouseXY),this.five.on("cameraUpdate",this.onCameraDirectionUpdate),this.hook.on("willChangeState",this.onWillChangeState)}dispose(){this.container.removeEventListener("animationend",this.computedCenterMouseXY),this.five.off("cameraUpdate",this.onCameraDirectionUpdate),this.hook.off("willChangeState",this.onWillChangeState),this.container.remove(),this.group.remove(this.mouseGroup),this.mouseGroup.remove(),this.hasAppendMouseGroup=!1,this.five.scene.remove(this.intersectMesh)}pieceChange(t){const e=t.face,n=t.point;if(e&&n){const s=e.normal.clone().clone().multiplyScalar(.05),r=n.clone().add(s);this.intersectMesh.position.copy(r);const a=r.clone().add(s);this.intersectMesh.lookAt(a),this.five.scene.add(this.intersectMesh);const l=this.intersectMesh.modelViewMatrix.clone().toArray();this.changePieceStyl("matrix3d",l);const c=this.calculateSize(n);this.changePieceStyl("scale",c)}}calculateSize(t){if(!t)return;const e=this.five.camera.position;let n=t.distanceTo(e);const o=4,s=1;return n>o&&(n=o),n<s&&(n=s),-.51/(o-s)*n+1}dotAnimation(){const t=on.default.Easing.Quadratic.InOut,e={opacity:.4,scale:this.pieceStyl.scale},n={opacity:[1,.4],scale:[this.pieceStyl.scale*.8,this.pieceStyl.scale]};let o=kf;const s=new on.default.Tween(e).to(n,500).easing(t).start(0).onUpdate(({opacity:r,scale:a})=>{this.changePieceStyl("scale",a),this.changePieceStyl("opacity",r)}).onComplete(()=>{o()});o=Un(r=>{s.update(r)})}changePieceStyl(t,e){!this.content||(this.pieceStyl[t]=e,this.content.style.transform=`matrix3d(${this.pieceStyl.matrix3d.toString()}) scale(${this.pieceStyl.scale})`,this.content.style.opacity=`${this.pieceStyl.opacity}`)}updateMouseGroup(t,e){if(!this.hasAppendMouseGroup){this.group.add(this.mouseGroup),this.hasAppendMouseGroup=!0;const n=this.container.querySelector(".range-piece__aim");n&&(n.style.opacity="0")}if(!t)return this.mouseGroup;if(this.mouseGroup.position.copy(t.point),e)this.mouseGroup.quaternion.copy(e.quaternion);else if(t.face){const o=t.face.normal.clone().multiplyScalar(.05),r=t.point.clone().add(o).clone().add(o);this.mouseGroup.lookAt(r)}return this.mouseGroup}}class zf{constructor(t,e){p(this,"hasOpen",!1);p(this,"hook",new me.Subscribe);p(this,"magnifier");p(this,"five");p(this,"model");p(this,"group");p(this,"config");p(this,"fiveHelper");p(this,"useUIController");p(this,"params");p(this,"useGuideController");p(this,"rangePieceController");p(this,"container",document.createElement("div"));p(this,"shortcutKeyController");p(this,"controller",null);p(this,"controllerParams");p(this,"getCurrentMode",()=>this.controller instanceof ti?"Edit":this.controller instanceof Yi?"Watch":this.controller instanceof qs?"Mixed":null);p(this,"changeMode",t=>{var n;if(!this.hasOpen||this.getCurrentMode()===t)return;if(this.getCurrentMode()==="Mixed"||t==="Mixed")return new Error("\u4E0D\u652F\u6301\u5207\u6362\u7684Mode");(n=this.controller)==null||n.dispose();const e={View:of,Watch:Yi,Edit:ti};if(!e[t])throw new Error("\u4E0D\u5B58\u5728\u7684 Mode");this.controller=new e[t](this.controllerParams),this.hook.emit("modeChange",t)});var s,r;this.five=t,this.params=e;const n={userDistanceItemCreator:void 0,getDistanceText(a){return a.toFixed(2)+"m"}};this.config=N(N({},n),Wn(e,["openParams","magnifierParams"])),this.model=new Gi(this.config),this.fiveHelper=new Gu(t),this.magnifier=new Ys(t,(s=e.magnifierParams)!=null?s:{width:190,height:190,scale:2}),this.group=new H.Group,this.group.name="plugin-measure-group",this.container.classList.add("five-plugin-measure-container"),this.container.style.position="absolute",this.container.style.left="0",this.container.style.top="0",this.container.style.pointerEvents="none",this.container.style.width="100%",this.container.style.height="100%",this.container.style.opacity="0",this.container.style.background="rgba(0, 0, 0, 0.15)";const o=(r=this.params.openParams)!=null?r:{};this.controllerParams={five:this.five,hook:this.hook,group:this.group,model:this.model,config:this.config,magnifier:this.magnifier,container:this.container,fiveHelper:this.fiveHelper,openParams:o,mouseGroup:Ks(N({},o.crossHairParameter)),userDistanceItemCreator:this.params.userDistanceItemCreator},this.params.useUIController!==!1&&(this.useUIController=new ir(this,this.controllerParams)),this.params.useGuideController!==!1&&(this.useGuideController=new If(this,this.controllerParams))}appendTo(t){t.append(this.container)}dispose(){var t,e;this.disable(),(t=this.useUIController)==null||t.dispose(),(e=this.magnifier)==null||e.dispose(),this.five.needsRender=!0}load(t){this.model.parse(t),this.save()}enable(){var t,e,n;this.hasOpen||(this.hasOpen=!0,this.five.scene.add(this.group),this.container.style.opacity="1",(t=this.params.openParams)!=null&&t.isMobile?(this.controller=new qs(this.controllerParams),this.rangePieceController=new Sf(this.controllerParams)):(this.five.helperVisible=!1,this.controller=new Yi(this.controllerParams)),(e=this.useUIController)==null||e.show(),(n=this.useGuideController)==null||n.show(),this.shortcutKeyController=new Ef(this,this.five),this.hook.emit("enable",!0))}disable(){var t,e,n,o,s;this.hasOpen=!1,this.container.style.opacity="0",(t=this.controller)==null||t.dispose(),(e=this.rangePieceController)==null||e.dispose(),(n=this.useUIController)==null||n.hide(),(o=this.useGuideController)==null||o.hide(),(s=this.shortcutKeyController)==null||s.dispose(),this.controller=null,this.five.helperVisible=!0,this.five.scene.remove(this.group),this.five.needsRender=!0,this.hook.emit("disable",!0)}revoke(){this.controller instanceof ti&&this.controller.revoke()}removeLineByID(t){this.model.removeLineByID(t)}highlightLine(t){if(this.getCurrentMode()!=="Watch")return!1;const e=this.model.getLineByID(t);return e?(this.controller.highlightLine(e),!0):!1}clearHighlightLines(){return this.getCurrentMode()!=="Watch"?!1:(this.controller.clearHighlightLines(),!0)}save(){return this.controller instanceof ti?(this.model.mergeModel(this.controller.model),this):this}toJson(){return this.model.toJson()}changeIsMobile(t){var e,n;((e=this.controllerParams.openParams)==null?void 0:e.isMobile)===void 0&&(this.controllerParams.openParams.isMobile=t),this.controllerParams.openParams.isMobile!==t&&(this.controllerParams.openParams.isMobile=t,this.params.useUIController!==!1&&((n=this.useUIController)==null||n.dispose()),this.useUIController=new ir(this,this.controllerParams))}changeConfigs(t){var e;if(t.getDistanceText&&t.getDistanceText!==this.config.getDistanceText){const n=t.getDistanceText;this.config.getDistanceText=n,(e=this.controller)==null||e.updateDistanceUI()}}}const Mf=function(t,e){return new zf(t,e)},sr=Di(null);function jf(i){le(i,"svelte-19zi46m",".PanoSpatialTagPlugin__tag-origin.svelte-19zi46m{position:absolute;width:0.5rem;height:0.5rem;border-radius:50%;background:#fff;box-shadow:0 0 .6rem #fff;transform:translate(-50%, -50%) scale(1);transform-origin:center center;animation:svelte-19zi46m-PanoSpatialTagPlugin__tag-origin 1.2s forwards;pointer-events:auto}.PanoSpatialTagPlugin__tag-origin.svelte-19zi46m:after{content:'';position:absolute;top:50%;height:50%;width:2rem;height:2rem;transform:translate(-50%, -50%)}.PanoSpatialTagPlugin__tag-origin-destroy.svelte-19zi46m{transform:translate(-50%, -50%) scale(0.6);animation:svelte-19zi46m-PanoSpatialTagPlugin__tag-origin-destroy 1.2s forwards .7s}@keyframes svelte-19zi46m-PanoSpatialTagPlugin__tag-origin{0%{transform:translate(-50%, -50%) scale(1);opacity:0}100%{transform:translate(-50%, -50%) scale(0.6);opacity:1 }}@keyframes svelte-19zi46m-PanoSpatialTagPlugin__tag-origin-destroy{0%{transform:translate(-50%, -50%) scale(0.6);opacity:1}10%{transform:translate(-50%, -50%) scale(1);opacity:0.9}100%{transform:translate(-50%, -50%) scale(1);opacity:0}}")}function rr(i,t,e){const n=i.slice();return n[3]=t[e],n}function ar(i){let t,e=`${i[3].top}%`,n=`${i[3].left}%`,o,s;function r(){return i[2](i[3])}return{c(){t=Q("i"),b(t,"class","svelte-19zi46m"),q(t,"PanoSpatialTagPlugin__tag-origin",!0),q(t,"PanoSpatialTagPlugin__tag-origin-destroy",i[3].destroying),F(t,"top",e,!1),F(t,"left",n,!1),F(t,"visibility",i[3].front?"visible":"hidden",!1)},m(a,l){B(a,t,l),o||(s=xe(t,"click",r),o=!0)},p(a,l){i=a,l&1&&q(t,"PanoSpatialTagPlugin__tag-origin-destroy",i[3].destroying),l&1&&e!==(e=`${i[3].top}%`)&&F(t,"top",e,!1),l&1&&n!==(n=`${i[3].left}%`)&&F(t,"left",n,!1),l&1&&F(t,"visibility",i[3].front?"visible":"hidden",!1)},d(a){a&&z(t),o=!1,s()}}}function Bf(i){let t,e=i[0],n=[];for(let o=0;o<e.length;o+=1)n[o]=ar(rr(i,e,o));return{c(){for(let o=0;o<n.length;o+=1)n[o].c();t=Ae()},m(o,s){for(let r=0;r<n.length;r+=1)n[r].m(o,s);B(o,t,s)},p(o,[s]){if(s&3){e=o[0];let r;for(r=0;r<e.length;r+=1){const a=rr(o,e,r);n[r]?n[r].p(a,s):(n[r]=ar(a),n[r].c(),n[r].m(t.parentNode,t))}for(;r<n.length;r+=1)n[r].d(1);n.length=e.length}},i:ne,o:ne,d(o){Ke(n,o),o&&z(t)}}}function Tf(i,t,e){let{origins:n}=t;const o=r=>{sr.update(()=>`${r}-PanoSpatialTagPlugin-${Date.now()}`)},s=r=>o(r.id);return i.$$set=r=>{"origins"in r&&e(0,n=r.origins)},[n,o,s]}class Qf extends se{constructor(t){super(),oe(this,t,Tf,Bf,ie,{origins:0},jf)}}function Of(i){le(i,"svelte-1i5h9zh",".PanoSpatialTagPlugin__tag-x.svelte-1i5h9zh.svelte-1i5h9zh{position:absolute;top:0;left:0;display:block;white-space:nowrap;box-sizing:border-box;width:25rem;height:14rem;color:#FFF;transform:translate(0, -100%);transition:height .5s linear}.PanoSpatialTagPlugin__tag-shadow.svelte-1i5h9zh.svelte-1i5h9zh{content:'';position:absolute;width:30rem;height:30rem;top:-15rem;left:-15rem;z-index:-1;opacity:0;transition:opacity .8s .6s;background:url('https://vrlab-image4.ljcdn.com/release/web/PanoSpatialTagPlugin__blur.png');background-size:30rem 30rem}.PanoSpatialTagPlugin__tag-line.svelte-1i5h9zh.svelte-1i5h9zh{position:absolute;left:-1rem;width:2rem;height:100%;overflow:hidden}.PanoSpatialTagPlugin__tag-flagpole.svelte-1i5h9zh.svelte-1i5h9zh{position:absolute;top:0;left:1rem;height:calc(100% - 1.5rem);width:.15rem;background:linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(255, 255, 255, .1));box-shadow:0 .1rem .5rem rgba(0, 0, 0, .2);opacity:0;transform:translate(-50%, 60%) scaleY(0);transition:transform .4s cubic-bezier(.44,.44,.74,.98) , opacity .4s cubic-bezier(.44,.44,.74,.98), width .5s linear, height .5s linear ;transform-origin:center bottom}.PanoSpatialTagPlugin__tag-line1.svelte-1i5h9zh.svelte-1i5h9zh{position:absolute;top:0;left:0.3rem;height:1.8rem;width:.1rem;background:#fff;opacity:0;transform:translate(-50%, 200%) scaleY(0);transform-origin:center top}.PanoSpatialTagPlugin__tag-line2.svelte-1i5h9zh.svelte-1i5h9zh{position:absolute;top:0;left:0.5rem;height:1.8rem;width:.1rem;background:#fff;opacity:0;transform:translate(-50%, 200%) scaleY(0);transform-origin:center top}.PanoSpatialTagPlugin__tag-show.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-line1.svelte-1i5h9zh{animation:svelte-1i5h9zh-PanoSpatialTagPlugin__tag-line1 linear .5s forwards .45s}.PanoSpatialTagPlugin__tag-show.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-line2.svelte-1i5h9zh{animation:svelte-1i5h9zh-PanoSpatialTagPlugin__tag-line2 linear .5s forwards .65s}.PanoSpatialTagPlugin__tag-x.PanoSpatialTagPlugin__tag-upside-down.svelte-1i5h9zh.svelte-1i5h9zh{transform:translate(0, 0)}.PanoSpatialTagPlugin__tag-upside-down.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-line.svelte-1i5h9zh{transform:scaleY(-1)}.PanoSpatialTagPlugin__tag-animate.svelte-1i5h9zh.svelte-1i5h9zh{position:relative;height:100%;overflow:hidden;transform-origin:left top;transition:transform .5s linear}.PanoSpatialTagPlugin__tag-upside-down.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-animate.svelte-1i5h9zh{transform-origin:left bottom}.PanoSpatialTagPlugin__tag-content.svelte-1i5h9zh.svelte-1i5h9zh{position:absolute;display:inline-block;transform:translate(-100%, 0);transition:transform .9s cubic-bezier(0,.65,.16,1.08) .6s;padding-left:.5rem;font-size:1rem}.PanoSpatialTagPlugin__tag-upside-down.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-content.svelte-1i5h9zh{bottom:0}.PanoSpatialTagPlugin__tag-show.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-flagpole.svelte-1i5h9zh{opacity:1;transform:translate(-50%, 0) scaleY(1)}.PanoSpatialTagPlugin__tag-upside-down.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-shadow.svelte-1i5h9zh{top:unset;bottom:-15rem}.PanoSpatialTagPlugin__tag-show.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-shadow.svelte-1i5h9zh{opacity:.32}.PanoSpatialTagPlugin__tag-show.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-content.svelte-1i5h9zh{transform:translate(0, 0)}.PanoSpatialTagPlugin__tag-hide.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-flagpole.svelte-1i5h9zh{opacity:0;transform:translate(-50%, 60%) scaleY(0);transition:transform .5s .55s, opacity .4s .55s}.PanoSpatialTagPlugin__tag-hide.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-shadow.svelte-1i5h9zh{opacity:0;transition:opacity .8s}.PanoSpatialTagPlugin__tag-hide.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-content.svelte-1i5h9zh{transform:translate(-100%, 0);transition:transform .6s cubic-bezier(.53,.06,.88,.59)}.PanoSpatialTagPlugin__tag-hide.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-content .svelte-1i5h9zh{pointer-events:none}.PanoSpatialTagPlugin__tag-hide.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-line1.svelte-1i5h9zh{opacity:0.5;transform:translate(-50%, 10%) scaleY(0);animation:svelte-1i5h9zh-PanoSpatialTagPlugin__tag-line1-hide linear .28s forwards .3s}.PanoSpatialTagPlugin__tag-hide.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-line2.svelte-1i5h9zh{opacity:0.5;transform:translate(-50%, 0) scaleY(0);animation:svelte-1i5h9zh-PanoSpatialTagPlugin__tag-line2-hide linear .28s forwards .45s}@keyframes svelte-1i5h9zh-PanoSpatialTagPlugin__tag-line1{0%{opacity:0;transform:translate(-50%, 250%) scaleY(1)}50%{opacity:0.5;transform:translate(-50%, 135%) scaleY(1)}100%{opacity:0.5;transform:translate(-50%, 20%) scaleY(0)}}@keyframes svelte-1i5h9zh-PanoSpatialTagPlugin__tag-line2{0%{opacity:0;transform:translate(-50%, 250%) scaleY(1)}50%{opacity:0.5;transform:translate(-50%, 125%) scaleY(1)}100%{opacity:0.5;transform:translate(-50%, 0) scaleY(0)}}@keyframes svelte-1i5h9zh-PanoSpatialTagPlugin__tag-line1-hide{0%{opacity:0.5;transform:translate(-50%, 10%) scaleY(0)}50%{opacity:0.2;transform:translate(-50%, 105%) scaleY(1)}100%{opacity:0;transform:translate(-50%, 200%) scaleY(0)}}@keyframes svelte-1i5h9zh-PanoSpatialTagPlugin__tag-line2-hide{0%{opacity:0.5;transform:translate(-50%, 0) scaleY(0)}50%{opacity:0.2;transform:translate(-50%, 100%) scaleY(1)}100%{opacity:0;transform:translate(-50%, 200%) scaleY(0)}}")}function Rf(i){let t,e,n,o,s,r,a,l,c,d,f,u,h,m,g;return{c(){t=Q("div"),e=Q("div"),n=_(),o=Q("div"),s=Q("i"),r=_(),a=Q("i"),l=_(),c=Q("i"),d=_(),f=Q("div"),u=Q("div"),b(e,"class","PanoSpatialTagPlugin__tag-shadow svelte-1i5h9zh"),F(e,"transform","translate("+i[7]/2*i[3]*3+"px, "+i[8]/2*(i[1]?-1:1)*i[3]*3+"px) scale("+1/i[3]+")"),b(s,"class","PanoSpatialTagPlugin__tag-flagpole svelte-1i5h9zh"),F(s,"width",i[4]+"rem"),b(a,"class","PanoSpatialTagPlugin__tag-line1 svelte-1i5h9zh"),b(c,"class","PanoSpatialTagPlugin__tag-line2 svelte-1i5h9zh"),b(o,"class","PanoSpatialTagPlugin__tag-line svelte-1i5h9zh"),b(u,"class","PanoSpatialTagPlugin__tag-content svelte-1i5h9zh"),b(f,"class","PanoSpatialTagPlugin__tag-animate svelte-1i5h9zh"),F(f,"transform","scale("+i[3]*3+")"),b(t,"id",h="PanoSpatialTagPlugin__"+i[0]),F(t,"height",20*i[5]+"rem"),b(t,"class","svelte-1i5h9zh"),q(t,"PanoSpatialTagPlugin__tag-x",!0),q(t,"PanoSpatialTagPlugin__tag-upside-down",i[1]),q(t,"PanoSpatialTagPlugin__tag-show",i[10]),q(t,"PanoSpatialTagPlugin__tag-hide",i[10]===!1||i[6])},m(v,A){B(v,t,A),R(t,e),R(t,n),R(t,o),R(o,s),R(o,r),R(o,a),R(o,l),R(o,c),R(t,d),R(t,f),R(f,u),u.innerHTML=i[2],i[16](u),m||(g=xe(u,"click",i[11]),m=!0)},p(v,[A]){A&394&&F(e,"transform","translate("+v[7]/2*v[3]*3+"px, "+v[8]/2*(v[1]?-1:1)*v[3]*3+"px) scale("+1/v[3]+")"),A&16&&F(s,"width",v[4]+"rem"),A&4&&(u.innerHTML=v[2]),A&8&&F(f,"transform","scale("+v[3]*3+")"),A&1&&h!==(h="PanoSpatialTagPlugin__"+v[0])&&b(t,"id",h),A&32&&F(t,"height",20*v[5]+"rem"),A&2&&q(t,"PanoSpatialTagPlugin__tag-upside-down",v[1]),A&1024&&q(t,"PanoSpatialTagPlugin__tag-show",v[10]),A&1088&&q(t,"PanoSpatialTagPlugin__tag-hide",v[10]===!1||v[6])},i:ne,o:ne,d(v){v&&z(t),i[16](null),m=!1,g()}}}function Ff(i,t,e){let{id:n}=t,{upsideDown:o}=t,{content:s}=t,{contentZoom:r}=t,{lineWidthZoom:a}=t,{lineHeightZoom:l}=t,{destroying:c=!1}=t,{folded:d}=t,{dispose:f}=t,{events:u}=t,{hooks:h}=t,m=0,g=0,v,A,C=setTimeout(()=>{d||e(10,A=!0),C=void 0},100);const w=y=>{const L=Object.keys(u);let x=y.target;for(;x;){const O=x.getAttribute("class");if(!O){x=x.parentNode;continue}if(O.includes("PanoSpatialTagPlugin__tag-content")){x=null;break}L.forEach(T=>{O.includes(T)&&u[T](n)}),x=x.parentNode}};Ue(()=>{h.emit("initTag",{id:n})});const E=sr.subscribe(y=>{if(y===null)return;const[L,x]=y.split("-PanoSpatialTagPlugin-");n===L&&(h.emit("clickOrigin",{id:n,show:A}),C||(e(10,A=d),e(12,d=!d),C=setTimeout(()=>{C=void 0},1500)))});Pi(()=>{e(7,m=v.offsetWidth),e(8,g=v.offsetHeight),!C&&e(10,A=!d)}),ht(()=>{h.emit("destroyTag",{id:n}),E(),f()});function D(y){Be[y?"unshift":"push"](()=>{v=y,e(9,v)})}return i.$$set=y=>{"id"in y&&e(0,n=y.id),"upsideDown"in y&&e(1,o=y.upsideDown),"content"in y&&e(2,s=y.content),"contentZoom"in y&&e(3,r=y.contentZoom),"lineWidthZoom"in y&&e(4,a=y.lineWidthZoom),"lineHeightZoom"in y&&e(5,l=y.lineHeightZoom),"destroying"in y&&e(6,c=y.destroying),"folded"in y&&e(12,d=y.folded),"dispose"in y&&e(13,f=y.dispose),"events"in y&&e(14,u=y.events),"hooks"in y&&e(15,h=y.hooks)},[n,o,s,r,a,l,c,m,g,v,A,w,d,f,u,h,D]}class Hf extends se{constructor(t){super(),oe(this,t,Ff,Rf,ie,{id:0,upsideDown:1,content:2,contentZoom:3,lineWidthZoom:4,lineHeightZoom:5,destroying:6,folded:12,dispose:13,events:14,hooks:15},Of)}}const Gf={position:"absolute",top:"0px",left:"0px",width:"100%",height:"100%",pointerEvents:"none"},lr="<",cr=">",dr="%",ur="locals",Nf="(<%%|%%>|<%=|<%-|<%_|<%#|<%|%>|-%>|_%>)",Wf={"&":"&","<":"<",">":">",'"':""","'":"'"},Re={EVAL:"eval",ESCAPED:"escaped",RAW:"raw",COMMENT:"comment",LITERAL:"literal"};function fr(i){return i.replace(/;(\s*$)/,"$1")}function Xf(i,t){return new Yf(i).compileFunction()(t)}class Yf{constructor(t){p(this,"templateText");p(this,"mode",null);p(this,"truncate",!1);p(this,"currentLine",1);p(this,"source","");p(this,"regex",new RegExp(Nf));this.templateText=t}compileFunction(){let t;const e=` var __output = "";
|
|
497
|
+
`;function kf(){}const{Vector2:Df}=I;function Lf(i,t){const{offsetWidth:e,offsetHeight:n}=t,{top:o,left:s}=t.getBoundingClientRect();return Object.assign(new Df,{x:(i.x-s)/e*2-1,y:-(i.y-o)/n*2+1})}class Sf{constructor(t){p(this,"container",document.createElement("div"));p(this,"five");p(this,"group");p(this,"mouseGroup");p(this,"hasAppendMouseGroup",!1);p(this,"fiveHelper");p(this,"hook");p(this,"content");p(this,"intersectMesh");p(this,"centerMouseXY");p(this,"raycaster",new H.Raycaster);p(this,"pieceStyl",{matrix3d:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],scale:1,opacity:.4});p(this,"onCameraDirectionUpdate",()=>{const t=this.getIntersection();if(t){this.pieceChange(t),this.updateMouseGroup(t);const e=new nt(this.mouseGroup.position);this.hook.emit("nowPointChange",e)}});p(this,"onWillChangeState",(t,e)=>{var o;this.dotAnimation();const n=(o=this.getIntersection())==null?void 0:o.point;!n||(e==="editing"?this.hook.emit("getStartPoint",new nt(n)):this.hook.emit("getEndPoint",new nt(n)))});p(this,"computedCenterMouseXY",()=>{const t=this.container.querySelector(".range-piece__aim");if(!t)return null;const{left:e,top:n,width:o,height:s}=t.getBoundingClientRect(),r=Math.round(e+o/2),a=Math.round(n+s/2),c=Lf({x:r,y:a},this.five.getElement());this.centerMouseXY=c});p(this,"getIntersection",()=>{if(!this.centerMouseXY)return null;this.raycaster.setFromCamera(this.centerMouseXY,this.five.camera);const t=this.five.model.intersectRaycaster(this.raycaster)[0];return t||null});this.five=t.five,this.hook=t.hook,this.group=t.group,this.mouseGroup=Ks(W({isMobile:!0},t.openParams.crossHairParameter)),this.fiveHelper=t.fiveHelper,this.container.innerHTML=xf,this.container.classList.add("range-piece-controller"),this.content=this.container.querySelector(".range-piece__content"),this.content&&(this.content.style.transform=`matrix3d(${this.pieceStyl.matrix3d.toString()}) scale(${this.pieceStyl.scale})`,this.content.style.opacity=`${this.pieceStyl.opacity}`),t.container.append(this.container),this.intersectMesh=new H.Mesh(new H.RingGeometry(.04,.08,32),new H.MeshBasicMaterial({color:1245179,opacity:0,side:H.DoubleSide,transparent:!0})),this.container.addEventListener("animationend",this.computedCenterMouseXY),this.five.on("cameraUpdate",this.onCameraDirectionUpdate),this.hook.on("willChangeState",this.onWillChangeState)}dispose(){this.container.removeEventListener("animationend",this.computedCenterMouseXY),this.five.off("cameraUpdate",this.onCameraDirectionUpdate),this.hook.off("willChangeState",this.onWillChangeState),this.container.remove(),this.group.remove(this.mouseGroup),this.mouseGroup.remove(),this.hasAppendMouseGroup=!1,this.five.scene.remove(this.intersectMesh)}pieceChange(t){const e=t.face,n=t.point;if(e&&n){const s=e.normal.clone().clone().multiplyScalar(.05),r=n.clone().add(s);this.intersectMesh.position.copy(r);const a=r.clone().add(s);this.intersectMesh.lookAt(a),this.five.scene.add(this.intersectMesh);const l=this.intersectMesh.modelViewMatrix.clone().toArray();this.changePieceStyl("matrix3d",l);const c=this.calculateSize(n);this.changePieceStyl("scale",c)}}calculateSize(t){if(!t)return;const e=this.five.camera.position;let n=t.distanceTo(e);const o=4,s=1;return n>o&&(n=o),n<s&&(n=s),-.51/(o-s)*n+1}dotAnimation(){const t=on.default.Easing.Quadratic.InOut,e={opacity:.4,scale:this.pieceStyl.scale},n={opacity:[1,.4],scale:[this.pieceStyl.scale*.8,this.pieceStyl.scale]};let o=kf;const s=new on.default.Tween(e).to(n,500).easing(t).start(0).onUpdate(({opacity:r,scale:a})=>{this.changePieceStyl("scale",a),this.changePieceStyl("opacity",r)}).onComplete(()=>{o()});o=Vn(r=>{s.update(r)})}changePieceStyl(t,e){!this.content||(this.pieceStyl[t]=e,this.content.style.transform=`matrix3d(${this.pieceStyl.matrix3d.toString()}) scale(${this.pieceStyl.scale})`,this.content.style.opacity=`${this.pieceStyl.opacity}`)}updateMouseGroup(t,e){if(!this.hasAppendMouseGroup){this.group.add(this.mouseGroup),this.hasAppendMouseGroup=!0;const n=this.container.querySelector(".range-piece__aim");n&&(n.style.opacity="0")}if(!t)return this.mouseGroup;if(this.mouseGroup.position.copy(t.point),e)this.mouseGroup.quaternion.copy(e.quaternion);else if(t.face){const o=t.face.normal.clone().multiplyScalar(.05),r=t.point.clone().add(o).clone().add(o);this.mouseGroup.lookAt(r)}return this.mouseGroup}}class zf{constructor(t,e){p(this,"hasOpen",!1);p(this,"hook",new me.Subscribe);p(this,"magnifier");p(this,"five");p(this,"model");p(this,"group");p(this,"config");p(this,"fiveHelper");p(this,"useUIController");p(this,"params");p(this,"useGuideController");p(this,"rangePieceController");p(this,"container",document.createElement("div"));p(this,"shortcutKeyController");p(this,"controller",null);p(this,"controllerParams");p(this,"getCurrentMode",()=>this.controller instanceof ni?"Edit":this.controller instanceof Yi?"Watch":this.controller instanceof qs?"Mixed":null);p(this,"changeMode",t=>{var n;if(!this.hasOpen||this.getCurrentMode()===t)return;if(this.getCurrentMode()==="Mixed"||t==="Mixed")return new Error("\u4E0D\u652F\u6301\u5207\u6362\u7684Mode");(n=this.controller)==null||n.dispose();const e={View:of,Watch:Yi,Edit:ni};if(!e[t])throw new Error("\u4E0D\u5B58\u5728\u7684 Mode");this.controller=new e[t](this.controllerParams),this.hook.emit("modeChange",t)});var s,r;this.five=t,this.params=e;const n={userDistanceItemCreator:void 0,getDistanceText(a){return a.toFixed(2)+"m"}};this.config=W(W({},n),Xn(e,["openParams","magnifierParams"])),this.model=new Gi(this.config),this.fiveHelper=new Gu(t),this.magnifier=new Ys(t,(s=e.magnifierParams)!=null?s:{width:190,height:190,scale:2}),this.group=new H.Group,this.group.name="plugin-measure-group",this.container.classList.add("five-plugin-measure-container"),this.container.style.position="absolute",this.container.style.left="0",this.container.style.top="0",this.container.style.pointerEvents="none",this.container.style.width="100%",this.container.style.height="100%",this.container.style.opacity="0",this.container.style.background="rgba(0, 0, 0, 0.15)";const o=(r=this.params.openParams)!=null?r:{};this.controllerParams={five:this.five,hook:this.hook,group:this.group,model:this.model,config:this.config,magnifier:this.magnifier,container:this.container,fiveHelper:this.fiveHelper,openParams:o,mouseGroup:Ks(W({},o.crossHairParameter)),userDistanceItemCreator:this.params.userDistanceItemCreator},this.params.useUIController!==!1&&(this.useUIController=new ir(this,this.controllerParams)),this.params.useGuideController!==!1&&(this.useGuideController=new If(this,this.controllerParams))}appendTo(t){t.append(this.container)}dispose(){var t,e;this.disable(),(t=this.useUIController)==null||t.dispose(),(e=this.magnifier)==null||e.dispose(),this.five.needsRender=!0}load(t){this.model.parse(t),this.save()}enable(){var t,e,n;this.hasOpen||(this.hasOpen=!0,this.five.scene.add(this.group),this.container.style.opacity="1",(t=this.params.openParams)!=null&&t.isMobile?(this.controller=new qs(this.controllerParams),this.rangePieceController=new Sf(this.controllerParams)):(this.five.helperVisible=!1,this.controller=new Yi(this.controllerParams)),(e=this.useUIController)==null||e.show(),(n=this.useGuideController)==null||n.show(),this.shortcutKeyController=new Ef(this,this.five),this.hook.emit("enable",!0))}disable(){var t,e,n,o,s;this.hasOpen=!1,this.container.style.opacity="0",(t=this.controller)==null||t.dispose(),(e=this.rangePieceController)==null||e.dispose(),(n=this.useUIController)==null||n.hide(),(o=this.useGuideController)==null||o.hide(),(s=this.shortcutKeyController)==null||s.dispose(),this.controller=null,this.five.helperVisible=!0,this.five.scene.remove(this.group),this.five.needsRender=!0,this.hook.emit("disable",!0)}revoke(){this.controller instanceof ni&&this.controller.revoke()}removeLineByID(t){this.model.removeLineByID(t)}highlightLine(t){if(this.getCurrentMode()!=="Watch")return!1;const e=this.model.getLineByID(t);return e?(this.controller.highlightLine(e),!0):!1}clearHighlightLines(){return this.getCurrentMode()!=="Watch"?!1:(this.controller.clearHighlightLines(),!0)}save(){return this.controller instanceof ni?(this.model.mergeModel(this.controller.model),this):this}toJson(){return this.model.toJson()}changeIsMobile(t){var e,n;((e=this.controllerParams.openParams)==null?void 0:e.isMobile)===void 0&&(this.controllerParams.openParams.isMobile=t),this.controllerParams.openParams.isMobile!==t&&(this.controllerParams.openParams.isMobile=t,this.params.useUIController!==!1&&((n=this.useUIController)==null||n.dispose()),this.useUIController=new ir(this,this.controllerParams))}changeConfigs(t){var e;if(t.getDistanceText&&t.getDistanceText!==this.config.getDistanceText){const n=t.getDistanceText;this.config.getDistanceText=n,(e=this.controller)==null||e.updateDistanceUI()}}}const Mf=function(t,e){return new zf(t,e)},sr=Di(null);function jf(i){le(i,"svelte-19zi46m",".PanoSpatialTagPlugin__tag-origin.svelte-19zi46m{position:absolute;width:0.5rem;height:0.5rem;border-radius:50%;background:#fff;box-shadow:0 0 .6rem #fff;transform:translate(-50%, -50%) scale(1);transform-origin:center center;animation:svelte-19zi46m-PanoSpatialTagPlugin__tag-origin 1.2s forwards;pointer-events:auto}.PanoSpatialTagPlugin__tag-origin.svelte-19zi46m:after{content:'';position:absolute;top:50%;height:50%;width:2rem;height:2rem;transform:translate(-50%, -50%)}.PanoSpatialTagPlugin__tag-origin-destroy.svelte-19zi46m{transform:translate(-50%, -50%) scale(0.6);animation:svelte-19zi46m-PanoSpatialTagPlugin__tag-origin-destroy 1.2s forwards .7s}@keyframes svelte-19zi46m-PanoSpatialTagPlugin__tag-origin{0%{transform:translate(-50%, -50%) scale(1);opacity:0}100%{transform:translate(-50%, -50%) scale(0.6);opacity:1 }}@keyframes svelte-19zi46m-PanoSpatialTagPlugin__tag-origin-destroy{0%{transform:translate(-50%, -50%) scale(0.6);opacity:1}10%{transform:translate(-50%, -50%) scale(1);opacity:0.9}100%{transform:translate(-50%, -50%) scale(1);opacity:0}}")}function rr(i,t,e){const n=i.slice();return n[3]=t[e],n}function ar(i){let t,e=`${i[3].top}%`,n=`${i[3].left}%`,o,s;function r(){return i[2](i[3])}return{c(){t=Q("i"),b(t,"class","svelte-19zi46m"),q(t,"PanoSpatialTagPlugin__tag-origin",!0),q(t,"PanoSpatialTagPlugin__tag-origin-destroy",i[3].destroying),F(t,"top",e),F(t,"left",n),F(t,"visibility",i[3].front?"visible":"hidden")},m(a,l){B(a,t,l),o||(s=xe(t,"click",r),o=!0)},p(a,l){i=a,l&1&&q(t,"PanoSpatialTagPlugin__tag-origin-destroy",i[3].destroying),l&1&&e!==(e=`${i[3].top}%`)&&F(t,"top",e),l&1&&n!==(n=`${i[3].left}%`)&&F(t,"left",n),l&1&&F(t,"visibility",i[3].front?"visible":"hidden")},d(a){a&&z(t),o=!1,s()}}}function Bf(i){let t,e=i[0],n=[];for(let o=0;o<e.length;o+=1)n[o]=ar(rr(i,e,o));return{c(){for(let o=0;o<n.length;o+=1)n[o].c();t=Ae()},m(o,s){for(let r=0;r<n.length;r+=1)n[r].m(o,s);B(o,t,s)},p(o,[s]){if(s&3){e=o[0];let r;for(r=0;r<e.length;r+=1){const a=rr(o,e,r);n[r]?n[r].p(a,s):(n[r]=ar(a),n[r].c(),n[r].m(t.parentNode,t))}for(;r<n.length;r+=1)n[r].d(1);n.length=e.length}},i:ne,o:ne,d(o){Ke(n,o),o&&z(t)}}}function Tf(i,t,e){let{origins:n}=t;const o=r=>{sr.update(()=>`${r}-PanoSpatialTagPlugin-${Date.now()}`)},s=r=>o(r.id);return i.$$set=r=>{"origins"in r&&e(0,n=r.origins)},[n,o,s]}class Qf extends se{constructor(t){super(),oe(this,t,Tf,Bf,ie,{origins:0},jf)}}function Of(i){le(i,"svelte-1i5h9zh",".PanoSpatialTagPlugin__tag-x.svelte-1i5h9zh.svelte-1i5h9zh{position:absolute;top:0;left:0;display:block;white-space:nowrap;box-sizing:border-box;width:25rem;height:14rem;color:#FFF;transform:translate(0, -100%);transition:height .5s linear}.PanoSpatialTagPlugin__tag-shadow.svelte-1i5h9zh.svelte-1i5h9zh{content:'';position:absolute;width:30rem;height:30rem;top:-15rem;left:-15rem;z-index:-1;opacity:0;transition:opacity .8s .6s;background:url('https://vrlab-image4.ljcdn.com/release/web/PanoSpatialTagPlugin__blur.png');background-size:30rem 30rem}.PanoSpatialTagPlugin__tag-line.svelte-1i5h9zh.svelte-1i5h9zh{position:absolute;left:-1rem;width:2rem;height:100%;overflow:hidden}.PanoSpatialTagPlugin__tag-flagpole.svelte-1i5h9zh.svelte-1i5h9zh{position:absolute;top:0;left:1rem;height:calc(100% - 1.5rem);width:.15rem;background:linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(255, 255, 255, .1));box-shadow:0 .1rem .5rem rgba(0, 0, 0, .2);opacity:0;transform:translate(-50%, 60%) scaleY(0);transition:transform .4s cubic-bezier(.44,.44,.74,.98) , opacity .4s cubic-bezier(.44,.44,.74,.98), width .5s linear, height .5s linear ;transform-origin:center bottom}.PanoSpatialTagPlugin__tag-line1.svelte-1i5h9zh.svelte-1i5h9zh{position:absolute;top:0;left:0.3rem;height:1.8rem;width:.1rem;background:#fff;opacity:0;transform:translate(-50%, 200%) scaleY(0);transform-origin:center top}.PanoSpatialTagPlugin__tag-line2.svelte-1i5h9zh.svelte-1i5h9zh{position:absolute;top:0;left:0.5rem;height:1.8rem;width:.1rem;background:#fff;opacity:0;transform:translate(-50%, 200%) scaleY(0);transform-origin:center top}.PanoSpatialTagPlugin__tag-show.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-line1.svelte-1i5h9zh{animation:svelte-1i5h9zh-PanoSpatialTagPlugin__tag-line1 linear .5s forwards .45s}.PanoSpatialTagPlugin__tag-show.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-line2.svelte-1i5h9zh{animation:svelte-1i5h9zh-PanoSpatialTagPlugin__tag-line2 linear .5s forwards .65s}.PanoSpatialTagPlugin__tag-x.PanoSpatialTagPlugin__tag-upside-down.svelte-1i5h9zh.svelte-1i5h9zh{transform:translate(0, 0)}.PanoSpatialTagPlugin__tag-upside-down.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-line.svelte-1i5h9zh{transform:scaleY(-1)}.PanoSpatialTagPlugin__tag-animate.svelte-1i5h9zh.svelte-1i5h9zh{position:relative;height:100%;overflow:hidden;transform-origin:left top;transition:transform .5s linear}.PanoSpatialTagPlugin__tag-upside-down.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-animate.svelte-1i5h9zh{transform-origin:left bottom}.PanoSpatialTagPlugin__tag-content.svelte-1i5h9zh.svelte-1i5h9zh{position:absolute;display:inline-block;transform:translate(-100%, 0);transition:transform .9s cubic-bezier(0,.65,.16,1.08) .6s;padding-left:.5rem;font-size:1rem}.PanoSpatialTagPlugin__tag-upside-down.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-content.svelte-1i5h9zh{bottom:0}.PanoSpatialTagPlugin__tag-show.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-flagpole.svelte-1i5h9zh{opacity:1;transform:translate(-50%, 0) scaleY(1)}.PanoSpatialTagPlugin__tag-upside-down.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-shadow.svelte-1i5h9zh{top:unset;bottom:-15rem}.PanoSpatialTagPlugin__tag-show.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-shadow.svelte-1i5h9zh{opacity:.32}.PanoSpatialTagPlugin__tag-show.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-content.svelte-1i5h9zh{transform:translate(0, 0)}.PanoSpatialTagPlugin__tag-hide.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-flagpole.svelte-1i5h9zh{opacity:0;transform:translate(-50%, 60%) scaleY(0);transition:transform .5s .55s, opacity .4s .55s}.PanoSpatialTagPlugin__tag-hide.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-shadow.svelte-1i5h9zh{opacity:0;transition:opacity .8s}.PanoSpatialTagPlugin__tag-hide.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-content.svelte-1i5h9zh{transform:translate(-100%, 0);transition:transform .6s cubic-bezier(.53,.06,.88,.59)}.PanoSpatialTagPlugin__tag-hide.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-content .svelte-1i5h9zh{pointer-events:none}.PanoSpatialTagPlugin__tag-hide.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-line1.svelte-1i5h9zh{opacity:0.5;transform:translate(-50%, 10%) scaleY(0);animation:svelte-1i5h9zh-PanoSpatialTagPlugin__tag-line1-hide linear .28s forwards .3s}.PanoSpatialTagPlugin__tag-hide.svelte-1i5h9zh .PanoSpatialTagPlugin__tag-line2.svelte-1i5h9zh{opacity:0.5;transform:translate(-50%, 0) scaleY(0);animation:svelte-1i5h9zh-PanoSpatialTagPlugin__tag-line2-hide linear .28s forwards .45s}@keyframes svelte-1i5h9zh-PanoSpatialTagPlugin__tag-line1{0%{opacity:0;transform:translate(-50%, 250%) scaleY(1)}50%{opacity:0.5;transform:translate(-50%, 135%) scaleY(1)}100%{opacity:0.5;transform:translate(-50%, 20%) scaleY(0)}}@keyframes svelte-1i5h9zh-PanoSpatialTagPlugin__tag-line2{0%{opacity:0;transform:translate(-50%, 250%) scaleY(1)}50%{opacity:0.5;transform:translate(-50%, 125%) scaleY(1)}100%{opacity:0.5;transform:translate(-50%, 0) scaleY(0)}}@keyframes svelte-1i5h9zh-PanoSpatialTagPlugin__tag-line1-hide{0%{opacity:0.5;transform:translate(-50%, 10%) scaleY(0)}50%{opacity:0.2;transform:translate(-50%, 105%) scaleY(1)}100%{opacity:0;transform:translate(-50%, 200%) scaleY(0)}}@keyframes svelte-1i5h9zh-PanoSpatialTagPlugin__tag-line2-hide{0%{opacity:0.5;transform:translate(-50%, 0) scaleY(0)}50%{opacity:0.2;transform:translate(-50%, 100%) scaleY(1)}100%{opacity:0;transform:translate(-50%, 200%) scaleY(0)}}")}function Rf(i){let t,e,n,o,s,r,a,l,c,d,f,u,h,m,g;return{c(){t=Q("div"),e=Q("div"),n=_(),o=Q("div"),s=Q("i"),r=_(),a=Q("i"),l=_(),c=Q("i"),d=_(),f=Q("div"),u=Q("div"),b(e,"class","PanoSpatialTagPlugin__tag-shadow svelte-1i5h9zh"),F(e,"transform","translate("+i[7]/2*i[3]*3+"px, "+i[8]/2*(i[1]?-1:1)*i[3]*3+"px) scale("+1/i[3]+")"),b(s,"class","PanoSpatialTagPlugin__tag-flagpole svelte-1i5h9zh"),F(s,"width",i[4]+"rem"),b(a,"class","PanoSpatialTagPlugin__tag-line1 svelte-1i5h9zh"),b(c,"class","PanoSpatialTagPlugin__tag-line2 svelte-1i5h9zh"),b(o,"class","PanoSpatialTagPlugin__tag-line svelte-1i5h9zh"),b(u,"class","PanoSpatialTagPlugin__tag-content svelte-1i5h9zh"),b(f,"class","PanoSpatialTagPlugin__tag-animate svelte-1i5h9zh"),F(f,"transform","scale("+i[3]*3+")"),b(t,"id",h="PanoSpatialTagPlugin__"+i[0]),F(t,"height",20*i[5]+"rem"),b(t,"class","svelte-1i5h9zh"),q(t,"PanoSpatialTagPlugin__tag-x",!0),q(t,"PanoSpatialTagPlugin__tag-upside-down",i[1]),q(t,"PanoSpatialTagPlugin__tag-show",i[10]),q(t,"PanoSpatialTagPlugin__tag-hide",i[10]===!1||i[6])},m(v,A){B(v,t,A),O(t,e),O(t,n),O(t,o),O(o,s),O(o,r),O(o,a),O(o,l),O(o,c),O(t,d),O(t,f),O(f,u),u.innerHTML=i[2],i[16](u),m||(g=xe(u,"click",i[11]),m=!0)},p(v,[A]){A&394&&F(e,"transform","translate("+v[7]/2*v[3]*3+"px, "+v[8]/2*(v[1]?-1:1)*v[3]*3+"px) scale("+1/v[3]+")"),A&16&&F(s,"width",v[4]+"rem"),A&4&&(u.innerHTML=v[2]),A&8&&F(f,"transform","scale("+v[3]*3+")"),A&1&&h!==(h="PanoSpatialTagPlugin__"+v[0])&&b(t,"id",h),A&32&&F(t,"height",20*v[5]+"rem"),A&2&&q(t,"PanoSpatialTagPlugin__tag-upside-down",v[1]),A&1024&&q(t,"PanoSpatialTagPlugin__tag-show",v[10]),A&1088&&q(t,"PanoSpatialTagPlugin__tag-hide",v[10]===!1||v[6])},i:ne,o:ne,d(v){v&&z(t),i[16](null),m=!1,g()}}}function Ff(i,t,e){let{id:n}=t,{upsideDown:o}=t,{content:s}=t,{contentZoom:r}=t,{lineWidthZoom:a}=t,{lineHeightZoom:l}=t,{destroying:c=!1}=t,{folded:d}=t,{dispose:f}=t,{events:u}=t,{hooks:h}=t,m=0,g=0,v,A,C=setTimeout(()=>{d||e(10,A=!0),C=void 0},100);const w=y=>{const L=Object.keys(u);let x=y.target;for(;x;){const R=x.getAttribute("class");if(!R){x=x.parentNode;continue}if(R.includes("PanoSpatialTagPlugin__tag-content")){x=null;break}L.forEach(T=>{R.includes(T)&&u[T](n)}),x=x.parentNode}};Ue(()=>{h.emit("initTag",{id:n})});const E=sr.subscribe(y=>{if(y===null)return;const[L,x]=y.split("-PanoSpatialTagPlugin-");n===L&&(h.emit("clickOrigin",{id:n,show:A}),C||(e(10,A=d),e(12,d=!d),C=setTimeout(()=>{C=void 0},1500)))});Pi(()=>{e(7,m=v.offsetWidth),e(8,g=v.offsetHeight),!C&&e(10,A=!d)}),ht(()=>{h.emit("destroyTag",{id:n}),E(),f()});function D(y){Be[y?"unshift":"push"](()=>{v=y,e(9,v)})}return i.$$set=y=>{"id"in y&&e(0,n=y.id),"upsideDown"in y&&e(1,o=y.upsideDown),"content"in y&&e(2,s=y.content),"contentZoom"in y&&e(3,r=y.contentZoom),"lineWidthZoom"in y&&e(4,a=y.lineWidthZoom),"lineHeightZoom"in y&&e(5,l=y.lineHeightZoom),"destroying"in y&&e(6,c=y.destroying),"folded"in y&&e(12,d=y.folded),"dispose"in y&&e(13,f=y.dispose),"events"in y&&e(14,u=y.events),"hooks"in y&&e(15,h=y.hooks)},[n,o,s,r,a,l,c,m,g,v,A,w,d,f,u,h,D]}class Hf extends se{constructor(t){super(),oe(this,t,Ff,Rf,ie,{id:0,upsideDown:1,content:2,contentZoom:3,lineWidthZoom:4,lineHeightZoom:5,destroying:6,folded:12,dispose:13,events:14,hooks:15},Of)}}const Gf={position:"absolute",top:"0px",left:"0px",width:"100%",height:"100%",pointerEvents:"none"},lr="<",cr=">",dr="%",ur="locals",Nf="(<%%|%%>|<%=|<%-|<%_|<%#|<%|%>|-%>|_%>)",Wf={"&":"&","<":"<",">":">",'"':""","'":"'"},Re={EVAL:"eval",ESCAPED:"escaped",RAW:"raw",COMMENT:"comment",LITERAL:"literal"};function fr(i){return i.replace(/;(\s*$)/,"$1")}function Xf(i,t){return new Yf(i).compileFunction()(t)}class Yf{constructor(t){p(this,"templateText");p(this,"mode",null);p(this,"truncate",!1);p(this,"currentLine",1);p(this,"source","");p(this,"regex",new RegExp(Nf));this.templateText=t}compileFunction(){let t;const e=` var __output = "";
|
|
498
498
|
function __append(s) { if (s !== undefined && s !== null) __output += s }
|
|
499
499
|
with (`+ur+` || {}) {
|
|
500
500
|
`,n=` }
|
|
@@ -509,41 +509,41 @@ void main() {
|
|
|
509
509
|
`)}switch(this.mode){case Re.EVAL:this.source+=" ; "+t+`
|
|
510
510
|
`;break;case Re.ESCAPED:this.source+=" ; __append(escapeFn("+fr(t)+`))
|
|
511
511
|
`;break;case Re.RAW:this.source+=" ; __append("+fr(t)+`)
|
|
512
|
-
`;break;case Re.COMMENT:break;case Re.LITERAL:this._addOutput(t);break}}else this._addOutput(t)}}}const Ui=.001,hr=.01,Uf="https://vrlab-image4.ljcdn.com/release/web/PanoSpatialTagPlugin__blur.png",Vf=(i,t)=>{var X,V,ce,de,ge,Pe,ze,He;let e=t==null?void 0:t.container,n=1.4;const o=(X=t==null?void 0:t.wait)!=null?X:200,s=(V=t==null?void 0:t.maxNumberOnScreen)!=null?V:3,r=(ce=t==null?void 0:t.minRad)!=null?ce:Math.PI/4,a=(de=t==null?void 0:t.nearTolerance)!=null?de:100,l=(ge=t==null?void 0:t.upsideHeight)!=null?ge:1.6,c=(Pe=t==null?void 0:t.minDistance)!=null?Pe:1.2,d=(ze=t==null?void 0:t.maxDistance)!=null?ze:3.5,f=Wt(i),u=document.createElement("div");u.classList.add("PanoSpatialTagPlugin"),Object.assign(u.style,Gf);const h=new me.Subscribe;let m=new Image;m.src=Uf;const g={points:[],origins:[],tags:[],template:"",events:{},render:Xf,folded:!1,enabled:!0,forbidden:!0},v=new Qf({target:u,props:{origins:g.origins}}),A=(re,we)=>{D(),we&&y()},C=()=>{g.forbidden&&(g.forbidden=!1,y())},w=(re,we)=>{if(g.tags.length===0)return;const Ee=we.longitude-i.state.longitude,ae=i.camera.clone();ae.position.copy(we.offset),ae.rotateOnWorldAxis(new I.Vector3(0,1,0),Ee),ae.updateProjectionMatrix(),ae.updateMatrixWorld(!0);const dt=new I.Frustum,Ht=new I.Matrix4;Ht.multiplyMatrices(ae.projectionMatrix,ae.matrixWorldInverse),dt.setFromProjectionMatrix(Ht),g.tags.forEach(ye=>{const yt=ae.position.clone().setY(n).distanceTo(ye.position);if(yt<c||yt>d||!dt.containsPoint(ye.position))return ye.destroying=!0;const wt=ye.position.clone().sub(ae.position).setY(0);if(wt.angleTo(ye.normal)>Math.PI/2-r&&wt.angleTo(ye.normal)<Math.PI/2+r)return ye.destroying=!0}),g.tags.forEach(ye=>{ye.destroying?ye.app.$set({contentZoom:.1+ae.position.distanceTo(ye.position)/d,lineWidthZoom:.38*(.01+ae.position.distanceTo(ye.position)/d),destroying:ye.destroying}):ye.app.$set({lineWidthZoom:.38*(.01+ae.position.distanceTo(ye.position)/d),lineHeightZoom:.4+(ae.position.distanceTo(ye.position)-c)/d*.6,contentZoom:.1+ae.position.distanceTo(ye.position)/d})}),setTimeout(()=>{g.tags.forEach(ye=>{ye.destroying&&(ye.app.$destroy(),ye=null)}),g.tags=g.tags.filter(ye=>!ye.destroying),D()},1900)},E=re=>{re!==me.Five.Mode.Panorama&&!g.forbidden&&(v.$set({origins:[]}),g.tags.forEach(we=>{we.app.$destroy(),we=null}),g.origins=[],g.tags=[],g.forbidden=!0)},D=()=>{if(g.forbidden||!g.enabled)return;const re=i.camera,we=re.getWorldDirection(new I.Vector3);g.origins=g.tags.map(Ee=>{const ae=Ee.position.clone().project(re),dt=Ee.position.clone().sub(re.position).setY(0).angleTo(we.setY(0))<Math.PI/2;return{id:Ee.id,front:dt,left:(ae.x+1)/2*100,top:(-ae.y+1)/2*100,destroying:Ee.destroying}}),v.$set({origins:g.origins})},y=()=>{g.forbidden||!g.enabled||(g.timeoutId&&clearTimeout(g.timeoutId),g.timeoutId=setTimeout(()=>{g.timeoutId=void 0;const re=L();re.length&&(g.tags=g.tags.concat(re),D())},o))},L=()=>{const{clientWidth:re,clientHeight:we}=i.getElement(),Ee=[],ae=i.camera,dt=new I.Frustum,Ht=new I.Matrix4,ye=ae.getWorldDirection(new I.Vector3);Ht.multiplyMatrices(ae.projectionMatrix,ae.matrixWorldInverse),dt.setFromProjectionMatrix(Ht);const yt=g.tags.filter(Me=>dt.containsPoint(Me.position)&&!Me.destroying).length,wt=g.points.reduce((Me,Ge)=>{if(g.tags.find(Qe=>Ge.id===Qe.id&&!Qe.destroying))return Me;const it=ae.position.clone().setY(n).distanceTo(Ge.position);if(it<c||it>d||!dt.containsPoint(Ge.position))return Me;const An=Ge.position.clone().sub(ae.position).setY(0);if(An.angleTo(Ge.normal)>Math.PI/2-r&&An.angleTo(Ge.normal)<Math.PI/2+r)return Me;const en=Ge.position.clone().project(ae);if(!g.tags.every(Qe=>{if(Qe.position.clone().sub(ae.position).setY(0).angleTo(ye.setY(0))>Math.PI/2)return!0;const Nt=Qe.position.clone().project(ae);return Math.sqrt(Math.pow((en.x-Nt.x)/2*re,2)+Math.pow((en.y-Nt.y)/2*we,2))>a}))return Me;const Gt={id:Ge.id,position:Ge.position,normal:Ge.normal,replacement:Ge.replacement,weight:Ge.weight,distance:it};let ke;for(let Qe=0,Nt=Me.length;Qe<Nt;Qe++){const
|
|
512
|
+
`;break;case Re.COMMENT:break;case Re.LITERAL:this._addOutput(t);break}}else this._addOutput(t)}}}const Ui=.001,hr=.01,Uf="https://vrlab-image4.ljcdn.com/release/web/PanoSpatialTagPlugin__blur.png",Vf=(i,t)=>{var X,V,ce,de,ge,Pe,ze,He;let e=t==null?void 0:t.container,n=1.4;const o=(X=t==null?void 0:t.wait)!=null?X:200,s=(V=t==null?void 0:t.maxNumberOnScreen)!=null?V:3,r=(ce=t==null?void 0:t.minRad)!=null?ce:Math.PI/4,a=(de=t==null?void 0:t.nearTolerance)!=null?de:100,l=(ge=t==null?void 0:t.upsideHeight)!=null?ge:1.6,c=(Pe=t==null?void 0:t.minDistance)!=null?Pe:1.2,d=(ze=t==null?void 0:t.maxDistance)!=null?ze:3.5,f=Wt(i),u=document.createElement("div");u.classList.add("PanoSpatialTagPlugin"),Object.assign(u.style,Gf);const h=new me.Subscribe;let m=new Image;m.src=Uf;const g={points:[],origins:[],tags:[],template:"",events:{},render:Xf,folded:!1,enabled:!0,forbidden:!0},v=new Qf({target:u,props:{origins:g.origins}}),A=(re,we)=>{D(),we&&y()},C=()=>{g.forbidden&&(g.forbidden=!1,y())},w=(re,we)=>{if(g.tags.length===0)return;const Ee=we.longitude-i.state.longitude,ae=i.camera.clone();ae.position.copy(we.offset),ae.rotateOnWorldAxis(new I.Vector3(0,1,0),Ee),ae.updateProjectionMatrix(),ae.updateMatrixWorld(!0);const dt=new I.Frustum,Ht=new I.Matrix4;Ht.multiplyMatrices(ae.projectionMatrix,ae.matrixWorldInverse),dt.setFromProjectionMatrix(Ht),g.tags.forEach(ye=>{const yt=ae.position.clone().setY(n).distanceTo(ye.position);if(yt<c||yt>d||!dt.containsPoint(ye.position))return ye.destroying=!0;const wt=ye.position.clone().sub(ae.position).setY(0);if(wt.angleTo(ye.normal)>Math.PI/2-r&&wt.angleTo(ye.normal)<Math.PI/2+r)return ye.destroying=!0}),g.tags.forEach(ye=>{ye.destroying?ye.app.$set({contentZoom:.1+ae.position.distanceTo(ye.position)/d,lineWidthZoom:.38*(.01+ae.position.distanceTo(ye.position)/d),destroying:ye.destroying}):ye.app.$set({lineWidthZoom:.38*(.01+ae.position.distanceTo(ye.position)/d),lineHeightZoom:.4+(ae.position.distanceTo(ye.position)-c)/d*.6,contentZoom:.1+ae.position.distanceTo(ye.position)/d})}),setTimeout(()=>{g.tags.forEach(ye=>{ye.destroying&&(ye.app.$destroy(),ye=null)}),g.tags=g.tags.filter(ye=>!ye.destroying),D()},1900)},E=re=>{re!==me.Five.Mode.Panorama&&!g.forbidden&&(v.$set({origins:[]}),g.tags.forEach(we=>{we.app.$destroy(),we=null}),g.origins=[],g.tags=[],g.forbidden=!0)},D=()=>{if(g.forbidden||!g.enabled)return;const re=i.camera,we=re.getWorldDirection(new I.Vector3);g.origins=g.tags.map(Ee=>{const ae=Ee.position.clone().project(re),dt=Ee.position.clone().sub(re.position).setY(0).angleTo(we.setY(0))<Math.PI/2;return{id:Ee.id,front:dt,left:(ae.x+1)/2*100,top:(-ae.y+1)/2*100,destroying:Ee.destroying}}),v.$set({origins:g.origins})},y=()=>{g.forbidden||!g.enabled||(g.timeoutId&&clearTimeout(g.timeoutId),g.timeoutId=setTimeout(()=>{g.timeoutId=void 0;const re=L();re.length&&(g.tags=g.tags.concat(re),D())},o))},L=()=>{const{clientWidth:re,clientHeight:we}=i.getElement(),Ee=[],ae=i.camera,dt=new I.Frustum,Ht=new I.Matrix4,ye=ae.getWorldDirection(new I.Vector3);Ht.multiplyMatrices(ae.projectionMatrix,ae.matrixWorldInverse),dt.setFromProjectionMatrix(Ht);const yt=g.tags.filter(Me=>dt.containsPoint(Me.position)&&!Me.destroying).length,wt=g.points.reduce((Me,Ge)=>{if(g.tags.find(Qe=>Ge.id===Qe.id&&!Qe.destroying))return Me;const it=ae.position.clone().setY(n).distanceTo(Ge.position);if(it<c||it>d||!dt.containsPoint(Ge.position))return Me;const An=Ge.position.clone().sub(ae.position).setY(0);if(An.angleTo(Ge.normal)>Math.PI/2-r&&An.angleTo(Ge.normal)<Math.PI/2+r)return Me;const en=Ge.position.clone().project(ae);if(!g.tags.every(Qe=>{if(Qe.position.clone().sub(ae.position).setY(0).angleTo(ye.setY(0))>Math.PI/2)return!0;const Nt=Qe.position.clone().project(ae);return Math.sqrt(Math.pow((en.x-Nt.x)/2*re,2)+Math.pow((en.y-Nt.y)/2*we,2))>a}))return Me;const Gt={id:Ge.id,position:Ge.position,normal:Ge.normal,replacement:Ge.replacement,weight:Ge.weight,distance:it};let ke;for(let Qe=0,Nt=Me.length;Qe<Nt;Qe++){const mi=Me[Qe];if(Gt.weight>mi.weight){ke=Qe;break}if(Gt.distance<mi.distance){ke=Qe;break}}return ke!==void 0?Me.splice(ke,0,Gt):Me.push(Gt),Me},[]);for(let Me=0,Ge=wt.length;Me<Ge&&!(yt+Ee.length>=s);Me++){const it=wt[Me];if(Ee.find(ke=>it.id===ke.id))continue;const An=it.position.clone().project(ae);if(!g.tags.concat(Ee).every(ke=>{if(ke.position.clone().sub(ae.position).setY(0).angleTo(ye.setY(0))>Math.PI/2)return!0;const Qe=ke.position.clone().project(ae);return Math.sqrt(Math.pow((An.x-Qe.x)/2*re,2)+Math.pow((An.y-Qe.y)/2*we,2))>a}))continue;const en=new I.Raycaster(ae.position.clone().setY(n),it.position.clone().sub(ae.position.clone().setY(n)).normalize(),0,it.distance+hr),[Gt]=g.intersectObjects?en.intersectObjects(g.intersectObjects,!0):i.model.bvhs.loaded?i.model.intersectRaycaster(en):en.intersectObjects(i.model.children,!0);if(!!Gt&&it.distance-Gt.distance<hr){const{position:ke,normal:Qe,id:Nt,replacement:mi}=it,a0=new I.Plane().setFromNormalAndCoplanarPoint(Qe,ke),qa=ke.clone().sub(ae.position).cross(new I.Vector3(0,1,0)).setLength(Ui),l0=[ke.clone(),ke.clone().add(qa),ke.clone().add(new I.Vector3(0,Ui,0)).add(qa),ke.clone().add(new I.Vector3(0,Ui,0))].map(f0=>a0.projectPoint(f0,new I.Vector3)),{container:c0,dispose:d0}=f.create3DDomContainer(l0)||{},u0=new Hf({target:c0,props:{id:Nt,content:g.render(g.template,mi),lineWidthZoom:.38*(.01+ae.position.distanceTo(ke)/d),lineHeightZoom:.4+(ae.position.distanceTo(ke)-c)/d*.6,contentZoom:.1+ae.position.distanceTo(ke)/d,upsideDown:ke.y>l,folded:g.folded,events:g.events,hooks:h,dispose:d0}});Ee.push({position:ke,normal:Qe,id:Nt,app:u0})}}return Ee},x=re=>{g.points=re.points.map(we=>{var Ee,ae;return{id:we.id,position:new I.Vector3().fromArray(we.position),normal:new I.Vector3().fromArray(we.normal),replacement:(Ee=we.replacement)!=null?Ee:{},weight:(ae=we.weight)!=null?ae:-1}}),re.render&&(g.render=re.render),re.template&&(g.template=re.template),re.events&&(g.events=re.events),re.enabled===!1&&(g.enabled=re.enabled),re.folded===!0&&(g.folded=re.folded)},R=re=>{g.intersectObjects=re,y()},T=()=>{g.enabled=!0,y()},G=()=>{g.enabled=!1,v.$set({origins:[]}),g.tags.forEach(re=>{re.app.$destroy(),re=null}),g.origins=[],g.tags=[]},U=()=>{g.folded=!1,g.tags.forEach(re=>{re.app.$set({folded:g.folded})})},P=()=>{g.folded=!0,g.tags.forEach(re=>{re.app.$set({folded:g.folded})})},S=re=>{g.tags.forEach(we=>{we.id===re&&we.app.$set({folded:!1})})},j=re=>{g.tags.forEach(we=>{we.id===re&&we.app.$set({folded:!0})})},N=()=>{i.once("renderFrame",D)},Y=()=>{e||(e=i.getElement().parentElement),e&&e.appendChild(u),g.forbidden=!1,n=i.model.bounding.getCenter(new I.Vector3).y,y(),i.on("panoWillArrive",w),i.on("panoArrived",C),i.on("modeChange",E),i.on("cameraUpdate",A)},te=()=>{m=null,f.disposeAll(),v.$destroy(),g.tags.forEach(re=>{re.app.$destroy(),re=null}),g.origins=[],g.tags=[],i.off("modelLoaded",Y),i.off("renderFrame",D),i.off("panoWillArrive",w),i.off("panoArrived",C),i.off("modeChange",E),i.off("cameraUpdate",A),i.off("dispose",te),window.removeEventListener("resize",N,!1)};return window.addEventListener("resize",N,!1),(He=i==null?void 0:i.model)!=null&&He.loaded?Y():i.once("modelLoaded",Y),i.on("dispose",te),{load:x,setIntersectObjects:R,unfoldAll:U,foldAll:P,unfold:S,fold:j,enable:T,disable:G,hooks:h,dispose:te}};var Bt=(i=>(i.SMALL="small",i.MIDLLE="middle",i.LARGE="large",i.EXTRA_LARGE="x-large",i))(Bt||{});function Jf(i){le(i,"svelte-1ir3cyd",`.item-label-item.svelte-1ir3cyd{position:absolute;z-index:0;transform:none;cursor:pointer;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:0}.item-label-item.visible.svelte-1ir3cyd{opacity:1;animation:svelte-1ir3cyd-fadeIn .3s ease-in}.item-label-item__text-wrap.svelte-1ir3cyd::before{content:'';position:absolute;width:100%;height:100%;background-color:rgba(0, 0, 0, .3);filter:blur(1rem);z-index:-1}.item-label-item__text-wrap.svelte-1ir3cyd{padding:0.375rem 0.375rem 0;position:absolute;height:1.25rem;pointer-events:all;background-size:100% 100%;background-repeat:no-repeat;white-space:nowrap;line-height:0.625rem;font-size:0.6875rem;font-weight:bold;color:#FFEAC0;transform:translate(-50%, 0);display:flex;justify-content:center;align-items:center}.item-label-item__text.svelte-1ir3cyd{padding-bottom:0.25rem;border-top:0 solid;border-left:0 solid;border-right:0 solid;border-bottom:0.0625rem solid;-o-border-image:linear-gradient(to right, rgba(234, 208, 154, 0), rgba(234, 208, 154, 100), rgba(234, 208, 154, 0)) 4.5 1 4.5;border-image:linear-gradient(to right, rgba(234, 208, 154, 0), rgba(234, 208, 154, 100), rgba(234, 208, 154, 0)) 4.5 1 4.5}.item-label-item__bar.svelte-1ir3cyd{position:absolute;bottom:0;width:0.0625rem;background-image:linear-gradient(to bottom, rgba(234, 208, 154, 0), rgba(234, 208, 154, 1))}@keyframes svelte-1ir3cyd-fadeIn{from{opacity:0
|
|
513
513
|
}to{opacity:1
|
|
514
|
-
}}`)}function Zf(i){let t,e,n,o=(i[0].name.length>6?`${i[0].name.slice(0,6)}...`:i[0].name)+"",s,r,a,l,c,d;return{c(){t=Q("div"),e=Q("div"),n=Q("span"),s=Le(o),r=_(),a=Q("div"),b(n,"class","item-label-item__text svelte-1ir3cyd"),b(e,"class","item-label-item__text-wrap svelte-1ir3cyd"),F(e,"top",`-${i[0].strokeLength+26}px`),b(a,"class","item-label-item__bar svelte-1ir3cyd"),F(a,"height",`${i[0].strokeLength}px`),b(t,"class",l=Oe(_e.default("item-label-item",{visible:i[0].visible}))+" svelte-1ir3cyd"),F(t,"z-index",i[0].zIndex
|
|
514
|
+
}}`)}function Zf(i){let t,e,n,o=(i[0].name.length>6?`${i[0].name.slice(0,6)}...`:i[0].name)+"",s,r,a,l,c,d;return{c(){t=Q("div"),e=Q("div"),n=Q("span"),s=Le(o),r=_(),a=Q("div"),b(n,"class","item-label-item__text svelte-1ir3cyd"),b(e,"class","item-label-item__text-wrap svelte-1ir3cyd"),F(e,"top",`-${i[0].strokeLength+26}px`),b(a,"class","item-label-item__bar svelte-1ir3cyd"),F(a,"height",`${i[0].strokeLength}px`),b(t,"class",l=Oe(_e.default("item-label-item",{visible:i[0].visible}))+" svelte-1ir3cyd"),F(t,"z-index",i[0].zIndex),F(t,"transform",i[0].transform)},m(f,u){B(f,t,u),O(t,e),O(e,n),O(n,s),O(t,r),O(t,a),c||(d=xe(n,"click",i[1]),c=!0)},p(f,[u]){u&1&&o!==(o=(f[0].name.length>6?`${f[0].name.slice(0,6)}...`:f[0].name)+"")&&je(s,o),u&1&&F(e,"top",`-${f[0].strokeLength+26}px`),u&1&&F(a,"height",`${f[0].strokeLength}px`),u&1&&l!==(l=Oe(_e.default("item-label-item",{visible:f[0].visible}))+" svelte-1ir3cyd")&&b(t,"class",l),u&1&&F(t,"z-index",f[0].zIndex),u&1&&F(t,"transform",f[0].transform)},i:ne,o:ne,d(f){f&&z(t),c=!1,d()}}}function _f(i,t,e){let{itemLabel:n}=t,{hooks:o}=t;function s(){console.log("__onclick___: ",n),o.emit("onLabelClick",n)}return i.$$set=r=>{"itemLabel"in r&&e(0,n=r.itemLabel),"hooks"in r&&e(2,o=r.hooks)},[n,s,o]}class qf extends se{constructor(t){super(),oe(this,t,_f,Zf,ie,{itemLabel:0,hooks:2},Jf)}}function mr(i,t=200){let e;return function(...n){clearTimeout(e),e=setTimeout(()=>{i(...n)},t)}}function Kf(i){le(i,"svelte-gk8s47",".item-labels-container.svelte-gk8s47{width:100%;height:100%;position:relative}")}function pr(i,t,e){const n=i.slice();return n[26]=t[e],n}function gr(i,t){let e,n,o;return n=new qf({props:{itemLabel:t[26],hooks:t[0]}}),{key:i,first:null,c(){e=Ae(),ee(n.$$.fragment),this.first=e},m(s,r){B(s,e,r),K(n,s,r),o=!0},p(s,r){t=s;const a={};r&2&&(a.itemLabel=t[26]),r&1&&(a.hooks=t[0]),n.$set(a)},i(s){o||(k(n.$$.fragment,s),o=!0)},o(s){M(n.$$.fragment,s),o=!1},d(s){s&&z(e),$(n,s)}}}function $f(i){let t,e=[],n=new Map,o,s,r=i[1];const a=l=>l[26].id;for(let l=0;l<r.length;l+=1){let c=pr(i,r,l),d=a(c);n.set(d,e[l]=gr(d,c))}return{c(){t=Q("div");for(let l=0;l<e.length;l+=1)e[l].c();b(t,"class","item-labels-container svelte-gk8s47"),De(()=>i[9].call(t)),F(t,"opacity",i[4]?1:0)},m(l,c){B(l,t,c);for(let d=0;d<e.length;d+=1)e[d].m(t,null);o=ft(t,i[9].bind(t)),s=!0},p(l,[c]){c&3&&(r=l[1],fe(),e=Ve(e,c,a,1,l,r,n,t,lt,gr,null,pr),he()),c&16&&F(t,"opacity",l[4]?1:0)},i(l){if(!s){for(let c=0;c<r.length;c+=1)k(e[c]);s=!0}},o(l){for(let c=0;c<e.length;c+=1)M(e[c]);s=!1},d(l){l&&z(t);for(let c=0;c<e.length;c+=1)e[c].d();o()}}}let Ar=26,eh=11;function th(i,t,e){const{Raycaster:n,Vector3:o}=I;let{five:s}=t,{modelOcclusionEnable:r}=t,{itemLabels:a}=t,{hooks:l}=t,{displayStrategyType:c}=t,d=null,f=null,u,h,m=[],g=!0;const v=(P,S)=>{const j=new n,N=P.camera.position.clone(),Y=new o().fromArray(S.modelPosition),te=Y.distanceTo(N);j.set(N.clone(),Y.clone().sub(N).normalize());const[X]=P.model.intersectRaycaster(j);return!(X&&X.distance+1<te)},A=(P,S)=>{const j=new o(S.modelPosition[0],S.modelPosition[1],S.modelPosition[2]),N=P.project2d(j),Y=N==null?void 0:N.x,te=N==null?void 0:N.y;return[Y,te]},C=P=>`translate(${P[0]}px, ${P[1]}px)`,w=(P,S)=>m.length===0?!1:!!m.find(N=>P[0]>=N[0]-S&&P[0]<=N[0]+S||P[1]>=N[1]-Ar&&P[1]<=N[1]+Ar);function E(P,S){switch(S){case Bt.SMALL:return Math.ceil(-27.78*P+85);case Bt.MIDLLE:return Math.ceil(-38.9*P+130);case Bt.LARGE:return Math.ceil(-44.44*P+140);case Bt.EXTRA_LARGE:return Math.ceil(-92.59*P+300)}}const D=(P,S)=>{const j=S.map(Y=>{const te=A(P,Y),X=Y.name.length*eh,V=E(Y.modelPosition[1],c),de=(r?v(P,Y):!0)&&!w([te[0],te[1]+V],X);if(!de)return pe(W({},Y),{visible:de});m.push(te);const ge=C(te);return pe(W({},Y),{visible:de,transform:ge,strokeLength:V})}),N=j.filter(({visible:Y})=>Y).map(Y=>({itemLabelItem:Y,distance:new o(Y.modelPosition[0],Y.modelPosition[1],Y.modelPosition[2]).clone().distanceTo(P.camera.position)})).sort((Y,te)=>Y.distance-te.distance);return j.map(Y=>{const te=N.findIndex(X=>X.itemLabelItem.id===Y.id);return te!==void 0?pe(W({},Y),{zIndex:te*10}):Y})},y=()=>{m=[],e(1,f=D(s,f))};Ci(()=>{T()});const L=()=>{e(4,g=!1),x()};Ue(()=>{e(1,f=a),d=a,y(),R(),s.on("cameraUpdate",L)});const x=mr(()=>{e(4,g=!0),y()},300),R=()=>{window.addEventListener("resize",G,!1)},T=()=>{d!==a&&(e(1,f=a),d=a,y())},G=()=>{s.once("renderFrame",y)};ht(()=>{s.off("cameraUpdate",L),window.removeEventListener("resize",G,!1)});function U(){u=this.clientWidth,h=this.clientHeight,e(2,u),e(3,h)}return i.$$set=P=>{"five"in P&&e(5,s=P.five),"modelOcclusionEnable"in P&&e(6,r=P.modelOcclusionEnable),"itemLabels"in P&&e(7,a=P.itemLabels),"hooks"in P&&e(0,l=P.hooks),"displayStrategyType"in P&&e(8,c=P.displayStrategyType)},[l,f,u,h,g,s,r,a,c,U]}class nh extends se{constructor(t){super(),oe(this,t,th,$f,ie,{five:5,modelOcclusionEnable:6,itemLabels:7,hooks:0,displayStrategyType:8},Kf)}}function ih(i){return i.model_item_labels.map(t=>W({modelPosition:[t.position[0],t.position[1]+t.size[1],t.position[2]]},t))}const oh=(i,t)=>{var u,h;const e={container:document.createElement("div"),data:null,enabled:!0,fiveModeEnabled:void 0,itemLabels:[],wrapper:null,app:void 0,hooks:new me.Subscribe,modelOcclusionEnable:(u=t==null?void 0:t.modelOcclusionEnable)!=null?u:!0,displayStrategyType:(h=t==null?void 0:t.displayStrategyType)!=null?h:Bt.SMALL};e.container.setAttribute("class","model-item-label-plugin-container"),e.container.style.cssText=`
|
|
515
515
|
position: absolute;
|
|
516
516
|
left: 0;
|
|
517
517
|
top: 0;
|
|
518
518
|
width: 100%;
|
|
519
519
|
height: 100%;
|
|
520
520
|
z-index: 5;
|
|
521
|
-
`,e.container.style.pointerEvents="none";const n=m=>(e.wrapper=m,m.appendChild(e.container),l(),!0),o=m=>{e.itemLabels=ih(m),l()},s=()=>(e.enabled||(e.enabled=!0,l()),!0),r=()=>(e.enabled&&(e.enabled=!1,l()),!0),a=()=>{d(),e.container.remove()},l=()=>{var m;if(!!e.wrapper){if(!e.enabled||!e.fiveModeEnabled){(m=e.app)==null||m.$destroy(),e.app=void 0;return}e.app?e.app.$set({five:i,itemLabels:e.itemLabels}):e.app=new nh({target:e.container,props:{five:i,modelOcclusionEnable:e.modelOcclusionEnable,itemLabels:e.itemLabels,wrapper:e.wrapper,hooks:e.hooks,displayStrategyType:e.displayStrategyType}})}},c=()=>{i.on("modeChange",f),i.once("dispose",a)},d=()=>{i.off("modeChange",f)},f=m=>{if(!!e.enabled){if(m!==me.Five.Mode.Floorplan){e.fiveModeEnabled=!1,l();return}i.once("initAnimationEnded",()=>{e.fiveModeEnabled=i.currentMode===me.Five.Mode.Floorplan,l()})}};return c(),{appendTo:n,load:o,enable:s,disable:r,dispose:a,hooks:e.hooks}},sh={name:"ModelItemLabelPlugin",version:0};var $t=(i=>(i.TOP_LEFT="topLeft",i.TOP_RIGHT="topRight",i.BOTTOM_LEFT="bottomLeft",i.BOTTOM_RIGHT="bottomRight",i))($t||{});function rh(i){if(i.length===0)return[];if(Array.isArray(i[0]))return i;let t=[];return i.forEach(e=>{const n=[e[$t.TOP_LEFT],e[$t.BOTTOM_LEFT],e[$t.BOTTOM_RIGHT],e[$t.TOP_RIGHT]];t.push(n)}),t}const ah=(i,{videoElement:t})=>{const e={videoMeshes:[],videoTextureEnabled:!1,videoSource:"",rectPoints:[],enabled:!1,videoElement:t},n=Wt(i),o=new Map,s=A=>{e.videoTexture&&(e.videoTexture.image.muted=A)},r=()=>e.videoTexture?e.videoTexture.image.muted:!0,a=()=>{if(e.enabled||!e.videoTexture)return;e.enabled=!0,e.videoMeshes=c(),e.videoMeshes.forEach(C=>i.scene.add(C));const A=()=>{if(!e.videoTexture)return;const C=()=>{var w;!e.videoTexture||((w=e.videoTexture)==null||w.image.removeEventListener("timeupdate",C),e.videoTextureEnabled=!0,e.videoMeshes.forEach(E=>{E.material.map!==e.videoTexture&&(E.material.map=e.videoTexture)}),i.needsRender=!0)};e.videoTexture.image.addEventListener("timeupdate",C),e.videoTexture&&e.videoMeshes.length&&(e.videoTexture.image.play(),e.videoTexture.image.onplay=()=>{n.hide()},e.videoTexture.image.onpause=()=>{n.show()},e.videoTexture.image.onclick=()=>{e.videoTexture.image.muted=!1,e.videoTexture.image.play()})};if(i.model.loaded)A();else return i.once("modelLoaded",()=>A())},l=()=>{!e.enabled||(e.enabled=!1,e.videoMeshes.forEach(A=>{A.geometry.dispose(),A.material.dispose(),i.scene.remove(A),e.videoTexture&&e.videoTexture.image.pause()}),e.videoMeshes=[],i.needsRender=!0)},c=()=>e.rectPoints.map((A,C)=>{const w=new I.BufferGeometry,E=128,D=[];D.push(...A[0].toArray());for(let P=1;P<E;P++)D.push(A[0].x+(A[1].x-A[0].x)*P/E,A[0].y+(A[1].y-A[0].y)*P/E,A[0].z+(A[1].z-A[0].z)*P/E);D.push(...A[1].toArray()),D.push(...A[2].toArray());for(let P=1;P<E;P++)D.push(A[2].x+(A[3].x-A[2].x)*P/E,A[2].y+(A[3].y-A[2].y)*P/E,A[2].z+(A[3].z-A[2].z)*P/E);D.push(...A[3].toArray());const y=[];y.push(0,1);for(let P=1;P<E;P++)y.push(0,1-P/E);y.push(0,0),y.push(1,0);for(let P=1;P<E;P++)y.push(1,P/E);y.push(1,1);const L=[];for(let P=0;P<E;P++)L.push(P,P+1,E*2-P,P,E*2-P,E*2+1-P);w.setAttribute("position",new I.BufferAttribute(new Float32Array(D),3)),w.setAttribute("uv",new I.BufferAttribute(new Float32Array(y),2)),w.setIndex(new I.BufferAttribute(new Uint32Array(L),1));const x=new I.AxesHelper(10);i.scene.add(x);const
|
|
521
|
+
`,e.container.style.pointerEvents="none";const n=m=>(e.wrapper=m,m.appendChild(e.container),l(),!0),o=m=>{e.itemLabels=ih(m),l()},s=()=>(e.enabled||(e.enabled=!0,l()),!0),r=()=>(e.enabled&&(e.enabled=!1,l()),!0),a=()=>{d(),e.container.remove()},l=()=>{var m;if(!!e.wrapper){if(!e.enabled||!e.fiveModeEnabled){(m=e.app)==null||m.$destroy(),e.app=void 0;return}e.app?e.app.$set({five:i,itemLabels:e.itemLabels}):e.app=new nh({target:e.container,props:{five:i,modelOcclusionEnable:e.modelOcclusionEnable,itemLabels:e.itemLabels,wrapper:e.wrapper,hooks:e.hooks,displayStrategyType:e.displayStrategyType}})}},c=()=>{i.on("modeChange",f),i.once("dispose",a)},d=()=>{i.off("modeChange",f)},f=m=>{if(!!e.enabled){if(m!==me.Five.Mode.Floorplan){e.fiveModeEnabled=!1,l();return}i.once("initAnimationEnded",()=>{e.fiveModeEnabled=i.currentMode===me.Five.Mode.Floorplan,l()})}};return c(),{appendTo:n,load:o,enable:s,disable:r,dispose:a,hooks:e.hooks}},sh={name:"ModelItemLabelPlugin",version:0};var $t=(i=>(i.TOP_LEFT="topLeft",i.TOP_RIGHT="topRight",i.BOTTOM_LEFT="bottomLeft",i.BOTTOM_RIGHT="bottomRight",i))($t||{});function rh(i){if(i.length===0)return[];if(Array.isArray(i[0]))return i;let t=[];return i.forEach(e=>{const n=[e[$t.TOP_LEFT],e[$t.BOTTOM_LEFT],e[$t.BOTTOM_RIGHT],e[$t.TOP_RIGHT]];t.push(n)}),t}const ah=(i,{videoElement:t})=>{const e={videoMeshes:[],videoTextureEnabled:!1,videoSource:"",rectPoints:[],enabled:!1,videoElement:t},n=Wt(i),o=new Map,s=A=>{e.videoTexture&&(e.videoTexture.image.muted=A)},r=()=>e.videoTexture?e.videoTexture.image.muted:!0,a=()=>{if(e.enabled||!e.videoTexture)return;e.enabled=!0,e.videoMeshes=c(),e.videoMeshes.forEach(C=>i.scene.add(C));const A=()=>{if(!e.videoTexture)return;const C=()=>{var w;!e.videoTexture||((w=e.videoTexture)==null||w.image.removeEventListener("timeupdate",C),e.videoTextureEnabled=!0,e.videoMeshes.forEach(E=>{E.material.map!==e.videoTexture&&(E.material.map=e.videoTexture)}),i.needsRender=!0)};e.videoTexture.image.addEventListener("timeupdate",C),e.videoTexture&&e.videoMeshes.length&&(e.videoTexture.image.play(),e.videoTexture.image.onplay=()=>{n.hide()},e.videoTexture.image.onpause=()=>{n.show()},e.videoTexture.image.onclick=()=>{e.videoTexture.image.muted=!1,e.videoTexture.image.play()})};if(i.model.loaded)A();else return i.once("modelLoaded",()=>A())},l=()=>{!e.enabled||(e.enabled=!1,e.videoMeshes.forEach(A=>{A.geometry.dispose(),A.material.dispose(),i.scene.remove(A),e.videoTexture&&e.videoTexture.image.pause()}),e.videoMeshes=[],i.needsRender=!0)},c=()=>e.rectPoints.map((A,C)=>{const w=new I.BufferGeometry,E=128,D=[];D.push(...A[0].toArray());for(let P=1;P<E;P++)D.push(A[0].x+(A[1].x-A[0].x)*P/E,A[0].y+(A[1].y-A[0].y)*P/E,A[0].z+(A[1].z-A[0].z)*P/E);D.push(...A[1].toArray()),D.push(...A[2].toArray());for(let P=1;P<E;P++)D.push(A[2].x+(A[3].x-A[2].x)*P/E,A[2].y+(A[3].y-A[2].y)*P/E,A[2].z+(A[3].z-A[2].z)*P/E);D.push(...A[3].toArray());const y=[];y.push(0,1);for(let P=1;P<E;P++)y.push(0,1-P/E);y.push(0,0),y.push(1,0);for(let P=1;P<E;P++)y.push(1,P/E);y.push(1,1);const L=[];for(let P=0;P<E;P++)L.push(P,P+1,E*2-P,P,E*2-P,E*2+1-P);w.setAttribute("position",new I.BufferAttribute(new Float32Array(D),3)),w.setAttribute("uv",new I.BufferAttribute(new Float32Array(y),2)),w.setIndex(new I.BufferAttribute(new Uint32Array(L),1));const x=new I.AxesHelper(10);i.scene.add(x);const R=new I.MeshBasicMaterial({map:e.videoTextureEnabled?e.videoTexture:e.imageTexture,side:I.DoubleSide}),T=new I.Mesh(w,R);T.renderOrder=1,T.name=`ModelTVVideoPlugin-${C}-${performance.now()}`;const G=[A[1],A[2],A[3],A[0]],U=n.create3DDomContainer(G);if(U!=null&&U.container){const P=document.createElement("div");P.classList.add("play-icon"),P.style.width="100%",P.style.height="100%",P.style.display="flex",P.style.justifyContent="center",P.style.alignItems="center",P.style.pointerEvents="none",U.container.appendChild(P);const S=document.createElement("img");S.src="//vrlab-static.ljcdn.com/release/web/play.2ada5b6f.png",S.style.width="200px",S.style.pointerEvents="auto",S.onclick=()=>{e.videoTexture.image.muted=!1,e.videoTexture.image.play()},P.appendChild(S),o.set(T,U)}return T}),d=A=>{const C=new I.TextureLoader().load(A);return C.minFilter=I.LinearFilter,C.magFilter=I.LinearFilter,C.format=I.RGBFormat,C},f=(A,C)=>new Promise((w,E)=>{const D=new XMLHttpRequest;D.onreadystatechange=()=>{if(D.readyState==4)if(D.status==200){const y=window.URL||window.webkitURL;C=C||document.createElement("video"),C.crossOrigin="anonymous",C.muted=!0,C.loop=!0,C.playsInline=!0,C.src=y.createObjectURL(D.response);const L=new I.VideoTexture(C);L.minFilter=I.LinearFilter,L.magFilter=I.LinearFilter,L.format=I.RGBFormat,w(Object.assign(L,{videoSource:A}))}else E(new Error("Video download Error: "+D.status))},D.onerror=y=>E(y),D.open("GET",A),D.responseType="blob",D.send()}),u=(A,C)=>Z(this,null,function*(){const{video_src:w,video_poster_src:E,points:D}=A;e.videoSource=w,e.rectPoints=rh(D).map(y=>y.map(({x:L,y:x,z:R})=>new I.Vector3(L,x,R))),e.imageTexture=d(E),C&&(e.videoElement=C),e.videoTexture=yield f(e.videoSource,e.videoElement),e.enabled=!!A.enable,e.enabled&&a()}),h=A=>{if(!e.enabled)return;const C=e.videoMeshes;if(!(!C||A.intersectObjects(C).length===0))return e.videoTexture&&(e.videoTexture.image.paused||e.videoTexture.image.pause()),!1},m=A=>{A==="Floorplan"?n.hide():n.show()},g=()=>{if(!e.enabled)return;const A=i.camera.position;if(o.forEach((C,w)=>{const E=C.css3DObject.position.clone(),D=E.clone().sub(A).normalize(),y=new I.Raycaster(A,D),L=i.model.intersectRaycaster(y)[0],x=E.distanceTo(A),R=.01;L&&L.distance+R<x?C.hide():C.show()}),!r()){const C=e.rectPoints.find(w=>{const E=w[0].clone().add(w[1]).add(w[2]).add(w[3]).divideScalar(4);return w.map(D=>D.clone().add(E).divideScalar(2)).filter(D=>{const y=D.distanceTo(A),L=new I.Raycaster(A,D.clone().sub(A).normalize()),x=i.model.intersectRaycaster(L)[0],R=.01;return!(x&&x.distance+R<y)}).length>=2});(!C||C.length===0)&&s(!0)}},v=()=>{l(),e.videoTexture=void 0,i.off("modeChange",m),i.off("wantsTapGesture",h),i.off("panoArrived",g),i.off("renderFrame",()=>{e.videoMeshes.forEach(A=>{A&&(A.needsRender=!0)})})};return i.on("modeChange",m),i.on("wantsTapGesture",h),i.on("panoArrived",g),i.on("renderFrame",()=>{e.videoMeshes.forEach(A=>{A&&(A.needsRender=!0)})}),{enable:a,disable:l,load:u,dispose:v,state:e,css3DRenderPlugin:n}};function lh(i){le(i,"svelte-gduhqw",`.item-label-item.svelte-gduhqw.svelte-gduhqw{position:absolute;z-index:0;transform:none;cursor:pointer;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;animation:svelte-gduhqw-fadeIn .3s ease-in}.item-label-item.fold.svelte-gduhqw>.item-label-item__text-wrap.svelte-gduhqw{visibility:hidden}.item-label-item.fold.svelte-gduhqw>.item-label-item__bar.anchor.svelte-gduhqw{visibility:hidden}.item-label-item.fold.svelte-gduhqw>.item-label-item__bar.anchor.svelte-gduhqw:after{visibility:visible}.item-label-item__text-wrap.svelte-gduhqw.svelte-gduhqw{height:-moz-fit-content;height:fit-content;padding:0.75rem 1.25rem 0.75rem 0.75rem;position:absolute;width:-moz-max-content;width:max-content;max-width:29.5625rem;min-height:5.75rem;background-image:linear-gradient(269deg, rgba(0, 0, 0, 0.50) 0%, rgba(0, 0, 0, 0.60) 49%, rgba(31, 38, 46, 0.70) 100%);border:0.09375rem solid rgba(255, 255, 255, .65);border-radius:0.1875rem;color:white;transform:translate(-50%, 0);display:flex;justify-content:flex-start;align-items:center;box-sizing:border-box;overflow:hidden;pointer-events:all}.item-label-item__custom.svelte-gduhqw.svelte-gduhqw{padding:0;max-width:unset;min-height:unset;background-image:unset;border:0;border-radius:0}.icon-wrap.svelte-gduhqw.svelte-gduhqw{width:4.25rem;height:100%;display:flex;justify-content:center;align-content:center}.icon.svelte-gduhqw.svelte-gduhqw{width:4.25rem;height:4.25rem;background-repeat:no-repeat;background-size:contain;background-position:center}.item-label-text.svelte-gduhqw.svelte-gduhqw{margin-left:0.75rem;padding-left:0.75rem;min-height:4.25rem;height:auto;display:flex;flex-flow:column;justify-content:space-around;align-content:flex-start;border-left:solid rgba(255, 255, 255, .2) 0.0625rem;border-top:solid rgba(255, 255, 255, .2) 0;border-right:solid rgba(255, 255, 255, .2) 0;border-bottom:solid rgba(255, 255, 255, .2) 0;pointer-events:auto}.item-model.svelte-gduhqw.svelte-gduhqw{white-space:nowrap;font-size:1.375rem;font-weight:bold;line-height:1.875rem}.item-name.svelte-gduhqw.svelte-gduhqw{height:auto;word-wrap:break-word;word-break:break-all;font-size:1.25rem;line-height:1.75rem}.item-label-item__bar.svelte-gduhqw.svelte-gduhqw{position:absolute;bottom:0;width:0.1875rem;background-image:linear-gradient(to bottom, white, rgba(255, 255, 255, 0));box-shadow:0 0.125rem 0.5rem 0 rgba(0, 0, 0, 0.20);pointer-events:none}.item-label-item__bar.anchor.svelte-gduhqw.svelte-gduhqw:after{content:'';position:absolute;bottom:0;width:1.5rem;height:1.5rem;background-image:url("//vrlab-public.ljcdn.com/common/file/web/67e7a198-28c9-47dc-879b-507bd3ae600c.png ");background-position:center;background-size:contain;transform:translate(-0.65625rem, 50%)}@keyframes svelte-gduhqw-fadeIn{from{opacity:0
|
|
522
522
|
}to{opacity:1
|
|
523
|
-
}}`)}function ch(i){let t,e,n,o=(i[0].code||i[0].id)+"",s,r,a,l=i[0].name+"",c,d=i[0].icon&&vr(i);return{c(){d&&d.c(),t=_(),e=Q("div"),n=Q("span"),s=Le(o),r=_(),a=Q("span"),c=Le(l),b(n,"class","item-model svelte-gduhqw"),b(a,"class","item-name svelte-gduhqw"),b(e,"class","item-label-text svelte-gduhqw")},m(f,u){d&&d.m(f,u),B(f,t,u),B(f,e,u),
|
|
523
|
+
}}`)}function ch(i){let t,e,n,o=(i[0].code||i[0].id)+"",s,r,a,l=i[0].name+"",c,d=i[0].icon&&vr(i);return{c(){d&&d.c(),t=_(),e=Q("div"),n=Q("span"),s=Le(o),r=_(),a=Q("span"),c=Le(l),b(n,"class","item-model svelte-gduhqw"),b(a,"class","item-name svelte-gduhqw"),b(e,"class","item-label-text svelte-gduhqw")},m(f,u){d&&d.m(f,u),B(f,t,u),B(f,e,u),O(e,n),O(n,s),O(e,r),O(e,a),O(a,c)},p(f,u){f[0].icon?d?d.p(f,u):(d=vr(f),d.c(),d.m(t.parentNode,t)):d&&(d.d(1),d=null),u&1&&o!==(o=(f[0].code||f[0].id)+"")&&je(s,o),u&1&&l!==(l=f[0].name+"")&&je(c,l)},d(f){d&&d.d(f),f&&z(t),f&&z(e)}}}function dh(i){let t;return{c(){t=Q("div")},m(e,n){B(e,t,n),i[6](t)},p:ne,d(e){e&&z(t),i[6](null)}}}function vr(i){let t,e,n,o,s;return{c(){t=Q("div"),e=Q("div"),b(e,"class","icon svelte-gduhqw"),b(e,"style",n=`background-image: url(${i[0].icon})`),b(t,"class","icon-wrap svelte-gduhqw")},m(r,a){B(r,t,a),O(t,e),o||(s=xe(t,"click",i[7]),o=!0)},p(r,a){a&1&&n!==(n=`background-image: url(${r[0].icon})`)&&b(e,"style",n)},d(r){r&&z(t),o=!1,s()}}}function uh(i){let t,e,n,o,s,r,a,l,c,d;function f(m,g){return g&1&&(n=null),n==null&&(n=!!Boolean(typeof m[0].render=="function")),n?dh:ch}let u=f(i,-1),h=u(i);return{c(){t=Q("div"),e=Q("div"),h.c(),s=_(),r=Q("div"),b(e,"class",o=Oe(_e.default("item-label-item__text-wrap",{"item-label-item__custom":Boolean(typeof i[0].render=="function")}))+" svelte-gduhqw"),F(e,"bottom",`${i[0].strokeLength}px`),b(r,"class",a=Oe(_e.default("item-label-item__bar",{anchor:i[1]}))+" svelte-gduhqw"),F(r,"height",`${i[0].strokeLength}px`),b(t,"class",l=Oe(_e.default("item-label-item",{fold:i[0].isFold}))+" svelte-gduhqw"),F(t,"z-index",i[0].zIndex),F(t,"transform",i[0].transform)},m(m,g){B(m,t,g),O(t,e),h.m(e,null),O(t,s),O(t,r),c||(d=xe(e,"click",i[4]),c=!0)},p(m,[g]){u===(u=f(m,g))&&h?h.p(m,g):(h.d(1),h=u(m),h&&(h.c(),h.m(e,null))),g&1&&o!==(o=Oe(_e.default("item-label-item__text-wrap",{"item-label-item__custom":Boolean(typeof m[0].render=="function")}))+" svelte-gduhqw")&&b(e,"class",o),g&1&&F(e,"bottom",`${m[0].strokeLength}px`),g&2&&a!==(a=Oe(_e.default("item-label-item__bar",{anchor:m[1]}))+" svelte-gduhqw")&&b(r,"class",a),g&1&&F(r,"height",`${m[0].strokeLength}px`),g&1&&l!==(l=Oe(_e.default("item-label-item",{fold:m[0].isFold}))+" svelte-gduhqw")&&b(t,"class",l),g&1&&F(t,"z-index",m[0].zIndex),g&1&&F(t,"transform",m[0].transform)},i:ne,o:ne,d(m){m&&z(t),h.d(),c=!1,d()}}}function fh(i,t,e){let{itemLabel:n}=t,{hooks:o}=t,{anchorEnabled:s}=t,{onIconClick:r}=t;function a(){o.emit("onLabelClick",n)}let l;function c(f){Be[f?"unshift":"push"](()=>{l=f,e(3,l)})}const d=f=>r(n);return i.$$set=f=>{"itemLabel"in f&&e(0,n=f.itemLabel),"hooks"in f&&e(5,o=f.hooks),"anchorEnabled"in f&&e(1,s=f.anchorEnabled),"onIconClick"in f&&e(2,r=f.onIconClick)},i.$$.update=()=>{if(i.$$.dirty&9&&typeof n.render=="function"&&l&&l.children.length===0){const f=n.render(n);f&&l.appendChild(f)}},[n,s,r,l,a,o,c,d]}class hh extends se{constructor(t){super(),oe(this,t,fh,uh,ie,{itemLabel:0,hooks:5,anchorEnabled:1,onIconClick:2},lh)}}const{Raycaster:mh,Vector3:P0}=I,br=(i,t,e,n)=>{const o=t.clone().sub(e).normalize(),s=new mh;s.set(e,o);const[r]=i.model.intersectRaycaster(s);return r&&r.distance+.01<n};var Tt=(i=>(i.SMALL="small",i.MIDLLE="middle",i.LARGE="large",i.EXTRA_LARGE="x-large",i))(Tt||{});const ph=(i,t)=>{switch(t){case Tt.SMALL:return Math.ceil(-27.78*i+85);case Tt.MIDLLE:return Math.ceil(-38.9*i+130);case Tt.LARGE:return Math.ceil(-44.44*i+140);case Tt.EXTRA_LARGE:return Math.ceil(-92.59*i+300)}},gh=i=>`translate(${i[0]}px, ${i[1]}px)`;function yr(i){return i.map(t=>W({observerIndex:void 0,visible:!1,isFold:!1},t))}function Ah(i){le(i,"svelte-gk8s47",".item-labels-container.svelte-gk8s47{width:100%;height:100%;position:relative}")}function wr(i,t,e){const n=i.slice();return n[30]=t[e],n}function Cr(i){let t,e;return t=new hh({props:{itemLabel:i[30],hooks:i[0],anchorEnabled:i[2],onIconClick:i[6]}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o[0]&2&&(s.itemLabel=n[30]),o[0]&1&&(s.hooks=n[0]),o[0]&4&&(s.anchorEnabled=n[2]),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function Pr(i,t){let e,n,o,s=t[30].visible&&Cr(t);return{key:i,first:null,c(){e=Ae(),s&&s.c(),n=Ae(),this.first=e},m(r,a){B(r,e,a),s&&s.m(r,a),B(r,n,a),o=!0},p(r,a){t=r,t[30].visible?s?(s.p(t,a),a[0]&2&&k(s,1)):(s=Cr(t),s.c(),k(s,1),s.m(n.parentNode,n)):s&&(fe(),M(s,1,1,()=>{s=null}),he())},i(r){o||(k(s),o=!0)},o(r){M(s),o=!1},d(r){r&&z(e),s&&s.d(r),r&&z(n)}}}function vh(i){let t,e=[],n=new Map,o,s,r=i[1];const a=l=>l[30].id;for(let l=0;l<r.length;l+=1){let c=wr(i,r,l),d=a(c);n.set(d,e[l]=Pr(d,c))}return{c(){t=Q("div");for(let l=0;l<e.length;l+=1)e[l].c();b(t,"class","item-labels-container svelte-gk8s47"),De(()=>i[12].call(t)),F(t,"opacity",i[5]?1:0)},m(l,c){B(l,t,c);for(let d=0;d<e.length;d+=1)e[d].m(t,null);o=ft(t,i[12].bind(t)),s=!0},p(l,c){c[0]&71&&(r=l[1],fe(),e=Ve(e,c,a,1,l,r,n,t,lt,Pr,null,wr),he()),c[0]&32&&F(t,"opacity",l[5]?1:0)},i(l){if(!s){for(let c=0;c<r.length;c+=1)k(e[c]);s=!0}},o(l){for(let c=0;c<e.length;c+=1)M(e[c]);s=!1},d(l){l&&z(t);for(let c=0;c<e.length;c+=1)e[c].d();o()}}}let bh=11;function yh(i,t,e){const{Raycaster:n,Vector3:o}=I;let{five:s}=t,{modelOcclusionEnable:r}=t,{itemLabels:a}=t,{hooks:l}=t,{displayStrategyType:c}=t,{maxVisibleDistance:d}=t,f=null,u=null,h=(s==null?void 0:s.currentMode)===me.Five.Mode.Panorama,m,g,v=[],A=!0;const C=(j,N)=>{const Y=j.camera.position.clone(),te=new o(N.modelPosition[0],N.modelPosition[1],N.modelPosition[2]),X=te.distanceTo(Y);return d!==void 0&&j.state.mode===me.Five.Mode.Panorama&&X>d?!1:br(j,te.clone().sub(Y).normalize(),Y,X)},w=j=>{const{camera:N,model:Y}=s,{x:te,y:X,z:V}=j.clone().project(N),ce=(te+1)/2,de=(2-(X+1))/2,ze=Math.abs(V)<1&&[ce,de].every(He=>He<1&&He>=0);return Boolean(ze)},E=(j,N)=>{const Y=new o(N.modelPosition[0],N.modelPosition[1],N.modelPosition[2]),te=j.project2d(Y),X=te==null?void 0:te.x,V=te==null?void 0:te.y;return[X,V]},D=(j,N)=>{const Y=N.map(X=>{if(j.state.panoIndex!==X.panoIndex)return pe(W({},X),{visible:!1});const V=E(j,X);X.name.length*bh;const ce=ph(X.modelPosition[1],c),de=j.currentMode===me.Five.Mode.Panorama?w(new o(X.position[0],X.position[1],X.position[2])):!0,ge=r?C(j,X):!1,Pe=de&&!ge;if(!Pe)return pe(W({},X),{visible:Pe});v.push(V);const ze=gh(V);return pe(W({},X),{visible:Pe,transform:ze,strokeLength:ce})}),te=Y.filter(({visible:X})=>X).map(X=>({itemLabelItem:X,distance:new o(X.modelPosition[0],X.modelPosition[1],X.modelPosition[2]).clone().distanceTo(j.camera.position)})).sort((X,V)=>X.distance-V.distance);return Y.map(X=>{const V=te.findIndex(ce=>ce.itemLabelItem.id===X.id);return V!==void 0?pe(W({},X),{zIndex:V*10}):X})},y=()=>{v=[],e(1,u=D(s,u))},L=()=>{e(5,A=!1),x()},x=mr(()=>{e(5,A=!0),y()},300),R=()=>{s.once("renderFrame",y)},T=()=>{window.addEventListener("resize",R,!1)},G=()=>{f!==a&&(e(1,u=yr(a)),f=a,y())},U=(j,N)=>{let Y=[];for(let X=0;X<N.length;X++){const{position:V,panoIndex:ce}=N[X],de=j.distanceTo(V);(d===void 0||de<=d||s.state.mode!==me.Five.Mode.Panorama)&&Y.push({panoIndex:ce,obVector:V,distance:de})}Y=Y.sort((X,V)=>X.distance-V.distance);let te;for(let X=0;X<Y.length;X++){const{obVector:V,distance:ce,panoIndex:de}=Y[X];if(!br(s,j,V,ce)){te=de;break}}return typeof te=="number"?N[te]:void 0},P=j=>{if(s.state.mode===me.Five.Mode.Panorama)return;const N=s.work.observers,Y=new o().fromArray(j.position),te=U(Y,N);if(te&&(j.observerIndex=te.panoIndex),typeof j.observerIndex=="number"){const X=N[j.observerIndex],V=Y.clone().sub(X.position).normalize(),ce={longitude:Math.PI+Math.atan2(V.x,V.z),latitude:Math.acos(V.y/V.length())-Math.PI/2};s.setState(pe(W({},ce),{mode:me.Five.Mode.Panorama,panoIndex:j.observerIndex})),s.once("initAnimationEnded",()=>{e(1,u=u.map(de=>pe(W({},de),{isFold:de.id!==j.id}))),s.once("cameraUpdate",()=>{e(1,u=u.map(de=>pe(W({},de),{isFold:!1})))})})}};Ci(()=>{G()}),Ue(()=>{e(1,u=yr(a)),f=a,y(),T(),s.on("cameraUpdate",L)}),ht(()=>{s.off("cameraUpdate",L),window.removeEventListener("resize",R,!1)});function S(){m=this.clientWidth,g=this.clientHeight,e(3,m),e(4,g)}return i.$$set=j=>{"five"in j&&e(7,s=j.five),"modelOcclusionEnable"in j&&e(8,r=j.modelOcclusionEnable),"itemLabels"in j&&e(9,a=j.itemLabels),"hooks"in j&&e(0,l=j.hooks),"displayStrategyType"in j&&e(10,c=j.displayStrategyType),"maxVisibleDistance"in j&&e(11,d=j.maxVisibleDistance)},[l,u,h,m,g,A,P,s,r,a,c,d,S]}class wh extends se{constructor(t){super(),oe(this,t,yh,vh,ie,{five:7,modelOcclusionEnable:8,itemLabels:9,hooks:0,displayStrategyType:10,maxVisibleDistance:11},Ah,[-1,-1])}}function Ch(i){return i.item_labels.map(t=>pe(W({},t),{modelPosition:[t.position[0],t.position[1],t.position[2]],observerIndex:void 0}))}const Ph=void 0,Ih=(i,t)=>{var u,h,m,g;const e={container:document.createElement("div"),data:null,enabled:!0,fiveModeEnabled:!0,itemLabels:[],wrapper:null,app:void 0,hooks:new me.Subscribe,modelOcclusionEnable:(u=t==null?void 0:t.modelOcclusionEnable)!=null?u:!0,onlyVisibleInPanorama:(h=t==null?void 0:t.onlyVisibleInPanorama)!=null?h:!0,displayStrategyType:(m=t==null?void 0:t.displayStrategyType)!=null?m:Tt.SMALL,maxVisibleDistance:(g=t==null?void 0:t.maxVisibleDistance)!=null?g:Ph};e.container.setAttribute("class","item-label-plugin-container"),e.container.style.cssText=`
|
|
524
524
|
position: absolute;
|
|
525
525
|
left: 0;
|
|
526
526
|
top: 0;
|
|
527
527
|
width: 100%;
|
|
528
528
|
height: 100%;
|
|
529
529
|
z-index: 5;
|
|
530
|
-
`,e.container.style.pointerEvents="none";const n=v=>(e.wrapper=v,v.appendChild(e.container),l(),!0),o=v=>{e.itemLabels=Ch(v),l()},s=()=>(e.enabled||(e.enabled=!0,l()),!0),r=()=>(e.enabled&&(e.enabled=!1,l()),!0),a=()=>{d(),e.container.remove()},l=()=>{var v;if(!!e.wrapper){if(!e.enabled||!e.fiveModeEnabled){(v=e.app)==null||v.$destroy(),e.app=void 0;return}e.app?e.app.$set({five:i,itemLabels:e.itemLabels}):e.app=new wh({target:e.container,props:{five:i,modelOcclusionEnable:e.modelOcclusionEnable,onlyVisibleInPanorama:e.onlyVisibleInPanorama,itemLabels:e.itemLabels,wrapper:e.wrapper,hooks:e.hooks,displayStrategyType:e.displayStrategyType,maxVisibleDistance:e.maxVisibleDistance}})}},c=()=>{i.on("modeChange",f),i.once("dispose",a)},d=()=>{i.off("modeChange",f)},f=v=>{if(v!==me.Five.Mode.Panorama){e.fiveModeEnabled=!1,r();return}i.once("initAnimationEnded",()=>{e.fiveModeEnabled=!0,s()})};return c(),{appendTo:n,load:o,enable:s,disable:r,dispose:a,hooks:e.hooks}},Eh={name:"ItemLabelPlugin",version:0};class xh extends Xn{constructor(e){super(e);p(this,"state");p(this,"container");p(this,"enabled");this.five=e,this.five.once("dispose",this.dispose),this.enabled=!0,this.state=this.initState()}enable(e){this.enabled=!0,this.updateState(pe(N({},e),{userAction:!0}))}disable(e){this.enabled=!1,this.updateState(pe(N({},e),{userAction:!0}))}show(e){if(!!this.state.enabled)return this.setState(pe(N({},this.state),{visible:!0}),e),Promise.resolve()}hide(e){if(!!this.state.enabled)return this.setState(pe(N({},this.state),{visible:!1}),e),Promise.resolve()}dispose(){this.container.remove()}setState(e,n){if(!this.enabled)return;const o=N({},this.state);this.state=N(N(N({},this.state),e),n),this.stateChangedCallback(o,n)}get visible(){return this.five.state.mode===me.Five.Mode.Panorama}appendTo(e){!this.enabled||(this.container=e,this.render())}updateState(e){this.setState(pe(N({},this.state),{enabled:this.enabled,visible:this.visible}),e)}}function kh(i){le(i,"svelte-wpy7pz",'.plugin-DoorLabelPlugin-item.svelte-wpy7pz.svelte-wpy7pz{position:absolute;left:0;top:0;width:0;height:0;pointer-events:none;transition:opacity 0.3s ease}.plugin-DoorLabelPlugin-cnt.svelte-wpy7pz.svelte-wpy7pz{position:absolute;top:50%;left:50%;border-radius:0.125rem;background:rgba(0, 0, 0, 0.35);line-height:0.75rem;padding:0.375rem;white-space:nowrap;font-size:0.75rem;font-style:normal;color:white;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:transform ease 1s, background ease 0.3s, color ease 0.3s}.plugin-DoorLabelPlugin-cnt.svelte-wpy7pz.svelte-wpy7pz::after{content:"";display:block;position:absolute;top:-0.0625rem;left:-0.0625rem;bottom:-0.0625rem;right:-0.0625rem;border-radius:0.125rem;border:0.0625rem solid rgba(0, 0, 0, 0);-o-border-image:url("//vrlab-image4.ljcdn.com/release/web/highlightCarouseal-border-image.14b51834.png") 4;border-image:url("//vrlab-image4.ljcdn.com/release/web/highlightCarouseal-border-image.14b51834.png") 4;transition:opacity ease 0.3s}.plugin-DoorLabelPlugin-cnt.svelte-wpy7pz.svelte-wpy7pz:active,.plugin-DoorLabelPlugin-cnt.svelte-wpy7pz.svelte-wpy7pz:focus{background:rgba(0, 0, 0, 0.5);color:rgba(255, 255, 255, 0.5)}.plugin-DoorLabelPlugin-icon.svelte-wpy7pz.svelte-wpy7pz{background:url("//vrlab-image4.ljcdn.com/release/web/DoorLabel-icon.de1304ae.svg") no-repeat;background-size:100%;display:inline-block;width:0.625rem;height:0.625rem;margin-left:0.25rem;transform-origin:center}.plugin-DoorLabelPlugin-cnt[data-camera-toward=forward].left.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=forward].right.svelte-wpy7pz .plugin-DoorLabelPlugin-txt.svelte-wpy7pz{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=forward].right.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(-90deg);margin-left:0;margin-right:0.25rem;order:0}.plugin-DoorLabelPlugin-cnt[data-camera-toward=right].forward.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=right].back.svelte-wpy7pz .plugin-DoorLabelPlugin-txt.svelte-wpy7pz{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=right].back.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(-90deg);margin-left:0;margin-right:0.25rem;order:0}.plugin-DoorLabelPlugin-cnt[data-camera-toward=left].back.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=left].forward.svelte-wpy7pz .plugin-DoorLabelPlugin-txt.svelte-wpy7pz{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=left].forward.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(-90deg);margin-left:0;margin-right:0.25rem;order:0}.plugin-DoorLabelPlugin-cnt[data-camera-toward=back].right.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=back].left.svelte-wpy7pz .plugin-DoorLabelPlugin-txt.svelte-wpy7pz{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=back].left.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(-90deg);margin-left:0;margin-right:0.25rem;order:0}.plugin-DoorLabelPlugin-cnt--customBrand.svelte-wpy7pz.svelte-wpy7pz{color:#f9eac1}.plugin-DoorLabelPlugin-cnt--customBrand.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{background:url("//vrlab-image4.ljcdn.com/release/web/arrow.6e8ec00e.svg") no-repeat}.plugin-DoorLabelPlugin-cnt--customBrand.svelte-wpy7pz.svelte-wpy7pz:active,.plugin-DoorLabelPlugin-cnt--customBrand.svelte-wpy7pz.svelte-wpy7pz:focus{background:rgba(0, 0, 0, 0.5);color:rgba(249, 234, 193, 0.5)}')}function Dh(i){let t,e,n,o,s,r,a,l;return{c(){t=Q("div"),e=Q("div"),n=Q("span"),n.textContent=`${i[8]}`,o=_(),s=Q("i"),b(n,"class","plugin-DoorLabelPlugin-txt svelte-wpy7pz"),b(s,"class","plugin-DoorLabelPlugin-icon svelte-wpy7pz"),b(e,"class",r=Oe(_e.default("plugin-DoorLabelPlugin-cnt",i[0].toward))+" svelte-wpy7pz"),b(e,"style",`transform: ${i[6]||"initial"};pointer-events: ${i[5]?"auto":"none"};opacity: ${i[5]?1:0}`),b(e,"data-camera-toward",i[7]),b(t,"style",`left: ${i[3]||0}%;top: ${i[4]||0}%;opacity: ${i[5]?1:0}`),b(t,"class","plugin-DoorLabelPlugin-item svelte-wpy7pz")},m(c,d){B(c,t,d),R(t,e),R(e,n),R(e,o),R(e,s),i[10](t),a||(l=xe(e,"click",i[9]),a=!0)},p(c,[d]){d&1&&r!==(r=Oe(_e.default("plugin-DoorLabelPlugin-cnt",c[0].toward))+" svelte-wpy7pz")&&b(e,"class",r)},i:ne,o:ne,d(c){c&&z(t),i[10](null),a=!1,l()}}}function Lh(i,t,e){let{props:n}=t,{onClick:o}=t,s,{left:r,top:a,inSight:l,transform:c,panoIndex:d,cameraToward:f,name:u}=n,h=0;const m=()=>{if(!r||!a||!l||!s)return;const A=s.current.clientWidth/window.innerWidth*100,C=s.current.clientHeight/window.innerHeight*100;if(r<=A/2||r>=100-A/2||a<=C/2||a>=100-C/2)return;d!==h&&(console.log("panoDoorLabelPlugin",d,"\u89E6\u53D1\u57CB\u70B9"),h=d)},g=A=>{o&&o()};function v(A){Be[A?"unshift":"push"](()=>{s=A,e(2,s)})}return i.$$set=A=>{"props"in A&&e(0,n=A.props),"onClick"in A&&e(1,o=A.onClick)},m(),[n,o,s,r,a,l,c,f,u,g,v]}class Sh extends se{constructor(t){super(),oe(this,t,Lh,Dh,ie,{props:0,onClick:1},kh)}}function zh(i,t){const e=Math.abs(i.top+i.height/2-t.top-t.height/2),n=Math.abs(i.left+i.width/2-t.left-t.width/2),o=(i.height+t.height)/2,s=(i.width+t.width)/2;return!(e>o&&n>s)}function Mh(i){const{camera:t}=i,e=t.getWorldDirection(new H.Vector3);let n=Math.atan(e.z/e.x)*180/Math.PI,o="";return e.x<0&&(n+=180),n<0&&(n+=360),n>315||n<=45?o="right":n>45&&n<=135?o="back":n>135&&n<=225?o="left":n>225&&n<=315&&(o="forward"),o}function jh(i,t){return Math.sqrt(Math.pow(i.z-t.z,2)+Math.pow(i.x-t.x,2))}function Bh(i){const t=Math.PI/4;return i>-t&&i<=t?"left":i>t*3||i<=-t*3?"right":i>-t*3&&i<=-t?"forward":i>t&&i<=t*3?"back":""}const Th={userAction:!0};class Qh extends xh{constructor(e){super(e);p(this,"MinVisibledistance",1.8);p(this,"MaxVisibledistance",5);p(this,"OffsetHeight",-1.3);p(this,"rooms");p(this,"floorplanServerData");p(this,"doorLabelItems");p(this,"visibleLabelMap",new Map);p(this,"labelItems",[]);p(this,"doorLabels");p(this,"roomObservers");p(this,"loadData",(e,n)=>{n&&(this.MaxVisibledistance=n.MaxVisibledistance,this.MinVisibledistance=n.MinVisibledistance,this.OffsetHeight=n.OffsetHeight),this.doorLabelItems&&this.doorLabelItems.length>0&&this.doorLabelItems.forEach(o=>{o.$destroy()}),this.labelItems=[],this.doorLabels=[],this.doorLabelItems=[],this.floorplanServerData=e,typeof this.five.ready=="function"?this.five.ready().then(()=>this.initData()):this.five.once("panoArrived",()=>{this.initData()})});p(this,"initRoomObservers",()=>{var s,r;const e=this.floorplanServerData.computed_data.floor_datas||[],o=(((r=(s=this.five)==null?void 0:s.work)==null?void 0:r.observers)||[]).map(a=>{const l=a.panoIndex,c=a.floorIndex,d=e==null?void 0:e.find(f=>f.floor_index===c);if(d){const f=d.rooms.find(u=>u.observer_indexs.includes(l));if(f)return{panoIndex:l,floorIndex:c,name:f.name}}}).filter(Boolean);this.roomObservers=o});p(this,"hideAllLabels",()=>{this.labelItems.forEach(e=>{e.visible=!1,e.inSight=!1}),this.render()});p(this,"fixDoorVisibleAndPosition",()=>{this.initRoomObservers();const{panoIndex:e}=this.five;if(!this.visible||this.five.model.empty||e===null||!this.roomObservers.find(a=>a.panoIndex===e))return;const n=this.roomObservers.find(a=>a.panoIndex===e),s=this.five.work.observers.find(a=>a.panoIndex===e).position.clone(),r=(()=>{if(this.visibleLabelMap.has(e))return this.visibleLabelMap.get(e);{const a=[];return this.doorLabels.forEach((l,c)=>{if(l.roomName===n.name)return;const d=l.position.clone(),f=d.distanceTo(s);if(f<this.MinVisibledistance||f>this.MaxVisibledistance)return;const u=new H.Raycaster,h=d.clone().sub(s).normalize();u.set(s,h);const[m]=this.five.model.intersectRaycaster(u);m&&m.distance+.1<f||a.push(c)}),this.visibleLabelMap.set(e,a),a}})();this.labelItems.forEach((a,l)=>{a.visible=r.includes(l)}),this.fixDoorPosition()});p(this,"fixDoorPosition",()=>{var d,f,u,h,m,g,v,A,C,w,E,D;const{panoIndex:e,camera:n}=this.five;if(e===null)return;if(this.five.currentMode!=="Panorama")return this.hideAllLabels();const o=this.five.getElement(),s=o.clientWidth,r=o.clientHeight,a=n.getWorldDirection(new H.Vector3),l=[],c=[...this.labelItems];if(c.forEach((y,L)=>{if(y.visible){const x=n.position.distanceTo(y.position),O=y.position.clone().add(new H.Vector3(0,this.OffsetHeight,0)),G=O.clone().sub(n.position).normalize().angleTo(a),U=O.clone().project(n),P=(U.x+1)/2.2*100,S=(-U.y+1)/2.2*100,j=P>=0&&P<=100&&S>=0&&S<=100&&x>this.MinVisibledistance&&x<=this.MaxVisibledistance;y.left=P,y.top=S,y.inSight=j&&G<Math.PI/2,y.cameraToward=Mh(this.five),j?l.push({disFromCameraToLabel:x,left:P,top:S,index:L}):y.transform="translate(-50%, -50%)"}else y.inSight=!1}),l.length>1){let y=0;l.sort((L,x)=>x.disFromCameraToLabel-L.disFromCameraToLabel);for(let L=1;L<l.length;L++){const{index:x,left:O,top:T}=l[L-1],{index:G,left:U,top:P}=l[L],S=this.container.children[x],j=this.container.children[G];if(!S||!j)return;const W={left:s*O/100,top:r*T/100,width:(u=(f=(d=S.children)==null?void 0:d[0])==null?void 0:f.clientWidth)!=null?u:0,height:(g=(m=(h=S.children)==null?void 0:h[0])==null?void 0:m.clientHeight)!=null?g:0},Y={left:s*U/100,top:r*P/100,width:(C=(A=(v=j.children)==null?void 0:v[0])==null?void 0:A.clientWidth)!=null?C:0,height:(D=(E=(w=j.children)==null?void 0:w[0])==null?void 0:E.clientHeight)!=null?D:0};zh(W,Y)&&(y++,c[x].transform=`translate(-50%, ${(y-1)*100-50}%)`,c[G].transform=`translate(-50%, ${y*100-50}%)`)}}this.labelItems=c,this.render()});p(this,"onClick",(e,n)=>{if(!this.roomObservers)return;const{work:o}=this.five;let s,r,a=1/0;for(const l of o.observers)if(this.roomObservers.find(d=>d.panoIndex===l.panoIndex&&d.name===e)){const d=l.standingPosition,f=n.distanceTo(d);f<a&&(s=l.panoIndex,r=d.clone().sub(n).normalize(),a=f)}if(r!==null&&s!==null){const l={};if(a>0){const d=new H.Vector3(0,0,-1),f=r.clone(),u=new H.Quaternion;u.setFromUnitVectors(d,f);const h=new H.Euler;h.setFromQuaternion(u,"YXZ"),l.longitude=h.y}this.five.emit("wantsToMoveToPano",s,{},!0)||this.five.moveToPano(s,{longitude:l.longitude})}});p(this,"initData",()=>{var s;this.doorLabels=[];const e=this.five.panoIndex,n=this.floorplanServerData.computed_data.observers[e].floor_index,o=n!==void 0&&((s=this.floorplanServerData.computed_data.floor_datas[n])==null?void 0:s.rooms);this.rooms=o,this.rooms&&this.rooms.length>0&&this.rooms.forEach(r=>{var c;const a=(c=this.floorplanServerData.computed_data.doors)==null?void 0:c.filter(d=>!!(d&&d.name===r.name)),l=this.five.work.observers.filter((d,f)=>!!r.observer_indexs.find(u=>u===f));a&&a.forEach(d=>{const f=d.position;let u=1/0,h;l.forEach(g=>{const v=g.standingPosition,A={x:v.x,y:v.y,z:v.z},C=jh(f,A);C<u&&(u=C,h=A)}),h&&(f.y=h.y+.01);const m=new H.Vector3(f.x,f.y,f.z);m.add(new H.Vector3(-.2,1.8,0).applyEuler(new H.Euler(0,d.rad,0))),this.doorLabels.push({roomName:r.name,name:d.name,position:m,toward:Bh(d.rad)})})}),this.labelItems=this.doorLabels.map(r=>pe(N({},r),{left:0,top:0,visible:!1,inSight:!1,transform:"",cameraToward:""})),this.five.on("wantsToMoveToPano",this.hideAllLabels),this.five.on("modelLoaded",this.fixDoorVisibleAndPosition),this.five.on("panoArrived",this.fixDoorVisibleAndPosition),this.five.on("initAnimationEnded",this.fixDoorPosition),this.five.on("cameraUpdate",this.fixDoorPosition),this.five.on("mouseWheel",this.fixDoorPosition),this.five.on("pinchGesture",this.fixDoorPosition),this.fixDoorVisibleAndPosition()})}stateChangedCallback(e,n){if(this.hooks.hasListener("stateChange")){const o={state:this.state,prevState:e,userAction:n?n.userAction:Th.userAction};this.hooks.emit("stateChange",o)}}render(){if(!this.enabled){this.doorLabelItems&&this.doorLabelItems.length>0&&this.doorLabelItems.forEach(e=>{e==null||e.$destroy()}),this.doorLabels=void 0;return}this.doorLabelItems&&this.doorLabelItems.forEach(e=>{e.$destroy()}),this.doorLabelItems=[],this.labelItems.forEach(e=>{this.doorLabelItems.push(new Sh({target:this.container,props:{props:e,onClick:()=>{this.onClick(e.name,e.position)}}}))})}initState(){return{enabled:!0,visible:!0}}dispose(){this.five&&(this.five.off("wantsToMoveToPano",this.hideAllLabels),this.five.off("modelLoaded",this.fixDoorVisibleAndPosition),this.five.off("panoArrived",this.fixDoorVisibleAndPosition),this.five.off("initAnimationEnded",this.fixDoorPosition),this.five.off("cameraUpdate",this.fixDoorPosition),this.five.off("mouseWheel",this.fixDoorPosition),this.five.off("pinchGesture",this.fixDoorPosition),super.dispose())}}const Oh=i=>new Qh(i),Rh=2,Fh=3,Hh=3,Gh=2;function Nh(i,t){var r,a,l;if(i.length<2)return console.warn("positionList length must be greater than 1"),[];const e=(r=t==null?void 0:t.unitWidth)!=null?r:.5,n=(a=t==null?void 0:t.unitHeight)!=null?a:.5,o=(l=t==null?void 0:t.skipPanoIndexMesh)!=null?l:!1,s=new I.CatmullRomCurve3(i,!1,"catmullrom",1);if(o){const c=Math.ceil(s.getLength()/n*1.5),d=s.getPoints(c),f=[];let u=0;const h=i;return h.forEach((m,g)=>{let v=0,A=99999999;d.forEach((y,L)=>{const x=y.distanceTo(m);x<A&&(v=L,A=x)});const C=d[v+1],w=C==null?void 0:C.distanceTo(m),E=d[v-1],D=E==null?void 0:E.distanceTo(m);if(v>u&&v-u>1){let y=v;E!==void 0&&D>.8&&(y=v+1),E!==void 0&&D>.2&&D<.3?y=v:A>.2&&A<.3&&(y=v+1);let L=u;if(C!==void 0&&w>.2&&w<.3?L=u+1:A>.2&&A<.3&&(L=u),d[L]&&d[L+1]){const T=h[g-1];if(T)if(T.equals(d[L]))L+=1;else{const G=new H.Vector3().subVectors(d[L+1],d[L]),U=new H.Vector3().subVectors(T,d[L]);G.angleTo(U)<Math.PI/2&&(L+=1)}}if(y<L||y-L<=1)return;const x=d.slice(L,y),O=Ir(x,e,n);f.push(O),u=v}}),f}else{const c=Math.ceil(s.getLength()),d=s.getPoints(c);return[Ir(d,e,n)]}}function Ir(i,t,e){const n=t/2,o=e/t,s=i.length,r=tl.default(i.map(A=>[A.x,A.z])),l=(i.length-1)*Rh*Fh,c=2*s,d=c*Hh,f=c*Gh,u=new Uint32Array(l),h=new Float32Array(d),m=new Float32Array(f);i.forEach((A,C)=>{});let g=0;for(let A=0;A<i.length;A++){const[C,w]=r[A][0],E=i[A],{x:D,y,z:L}=E,x=new H.Vector3(D+C*n,y+.05,L+w*n);h[A*6+0]=x.x,h[A*6+1]=x.y,h[A*6+2]=x.z;const O=new H.Vector3(D-C*n,y+.05,L-w*n);h[A*6+3]=O.x,h[A*6+4]=O.y,h[A*6+5]=O.z,g+=A>0?i[A-1].clone().sub(i[A]).length():0;const T=g/t/o;m[A*4+0]=0,m[A*4+1]=T,m[A*4+2]=1,m[A*4+3]=T,A!==i.length-1&&(u[A*6+0]=A*2+0,u[A*6+1]=A*2+2,u[A*6+2]=A*2+1,u[A*6+3]=A*2+2,u[A*6+4]=A*2+3,u[A*6+5]=A*2+1)}const v=new I.BufferGeometry;return v.setAttribute("position",new I.BufferAttribute(h,3)),v.setAttribute("uv",new I.BufferAttribute(m,2)),v.setIndex(new I.BufferAttribute(u,1)),v}function Wh(i){const t=new I.TextureLoader().load(i.textureUrl);return t.wrapS=t.wrapT=I.RepeatWrapping,t.encoding=I.sRGBEncoding,new I.MeshBasicMaterial({color:16777215,map:t,transparent:!0,opacity:.8})}function Xh(i){return!Qt(i)}function Qt(i){return i!=null}const Er="v1.0.1",xr="GuideLinePlugin",Vi=`${xr}@${Er}`,kr=i=>`${Vi}--${i}`;class Dr extends jt{constructor(e,n){super(e,n);p(this,"state",{visible:!1,enabled:!0,disposed:!1});p(this,"data");p(this,"linesGroup");p(this,"disposedErrorLog",()=>{console.error(`${Vi} is disposed`)});p(this,"actionWhenEnabled",e=>{if(this.state.enabled)return e()});Object.assign(window,{[`__${xr}_DEBUG__`]:this})}load(e,n,o=!0){return Z(this,null,function*(){const s=this.data?JSON.parse(JSON.stringify(this.data)):void 0,r=yield this.formatData(e);this.hooks.emit("dataChange",r,s),this.data=r,this.linesGroup&&this.five.scene.remove(this.linesGroup);const a=this.getLinesGroup(r.routes);!a||(this.linesGroup=a,yield this.waitFiveModelLoaded(),this.five.scene.add(a),this.handleVisible(this.state.visible),this.handleEnable(this.state.enabled),n&&this.setState(n),this.five.needsRender=!0,this.hooks.emit("dataLoaded",r),console.log(`${Vi} loaded`,r))})}formatData(e){return Z(this,null,function*(){return typeof e=="object"&&e!==null&&e.version&&e.data?e.data:e})}show(e){return Z(this,null,function*(){this.setState({visible:!0},e)})}hide(e){return Z(this,null,function*(){this.setState({visible:!1},e)})}enable(e){this.setState({enabled:!0},e)}disable(e){this.setState({enabled:!1},e)}dispose(){this.setState({disposed:!0})}setState(e,n){var s;if(this.state.disposed)return this.disposedErrorLog();const o=N({},this.state);this.state=N(N({},this.state),e),e.disposed!==void 0&&e.disposed!==o.disposed&&e.disposed&&this.handleDispose(),e.visible!==void 0&&e.visible!==o.visible&&this.handleVisible(e.visible,n==null?void 0:n.userAction),e.enabled!==void 0&&e.enabled!==o.enabled&&this.handleEnable(e.enabled,n==null?void 0:n.userAction),$e(o,this.state,{deep:!0})||(this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:(s=n==null?void 0:n.userAction)!=null?s:!0}),this.five.needsRender=!0)}handleEnable(e,n=!0){this.linesGroup&&(e?(this.five.scene.add(this.linesGroup),this.actionWhenEnabled(()=>this.hooks.emit("enable",{userAction:n}))):(this.five.scene.remove(this.linesGroup),this.hooks.emit("disable",{userAction:n})))}handleVisible(e,n=!0){this.linesGroup&&(e?(this.linesGroup.visible=!0,this.actionWhenEnabled(()=>this.hooks.emit("show",{userAction:n}))):(this.linesGroup.visible=!1,this.actionWhenEnabled(()=>this.hooks.emit("hide",{userAction:n}))))}handleDispose(){this.linesGroup&&this.five.scene.add(this.linesGroup)}getLinesGroup(e){const n=e.map(this.getLine.bind(this)).filter(Qt),o=new I.Group;if(o.name=kr("route-group"),n.length!==0)return o.add(...n),o}getLine(e){var a,l,c,d;const n=new I.Group,o=e.panoIndexList.map(f=>{var u;return(u=this.five.work.observers[f])==null?void 0:u.standingPosition}).filter(Qt),s=Nh(o,{skipPanoIndexMesh:(a=e.skipPanoIndexMesh)!=null?a:!0,unitWidth:(l=e.unitWidth)!=null?l:.6,unitHeight:(c=e.unitHeight)!=null?c:.4});if(!s)return;const r=Wh({textureUrl:(d=e.arrowTextureUrl)!=null?d:this.staticPrefix+"/release/web/arrow6.b6ce0c62.png"});return s.forEach(f=>{const u=new I.Mesh(f,r);u.name=kr("route-line-mesh"),n.add(u)}),n}waitFiveModelLoaded(){return Z(this,null,function*(){return new Promise(e=>{if(this.five.model.loaded){e();return}this.five.once("modelLoaded",()=>{e()})})})}}p(Dr,"lasestVersion",Er);const Lr=(i,t)=>new Dr(i,t);function Sr(i){const t=Math.abs(Math.cos(i.latitude));return new I.Vector3(-Math.sin(i.longitude)*t,-Math.sin(i.latitude),-Math.cos(i.longitude)*t)}function Yh(i,t){const e=Sr(i),n=Sr(t);return e.angleTo(n)}const Uh=i=>Z(this,null,function*(){try{i().then(()=>{},()=>{}).catch(()=>{})}catch(t){}}),ii=Math.PI*2;function Vh(i){return i>=0&&i<ii?i:(i%ii+ii)%ii}function Jh(i){return{longitude:Vh(-Math.atan2(i.x,-i.z)),latitude:-Math.asin(i.y/1)}}function Zh(i,t,e,n){const o=-i/e,s=i;return o*n+s}function _h(i){return new Promise(t=>{setTimeout(()=>{t()},i)})}const zr="v1.0.6",Mr="CruisePlugin",oi=`${Mr}@${zr}`,jr=()=>{console.error(`${oi} is disposed`)},qh=()=>{console.warn(`${oi} is disabled`)},Kh=()=>{console.error(`${oi} is disabled`)},Ji=new Map;class Zi extends jt{constructor(e,n){super(e,n);p(this,"state",{visible:!0,enabled:!0,disposed:!1,playing:!1,speed:1,config:{speedConfig:{rotateSpeed:.001,rotateSpeedUnit:"rad/ms",moveSpeed:.002,moveSpeedUnit:"m/ms"}}});p(this,"data");p(this,"config");p(this,"privateState",{playing:!1,currentPlayQueue:[],currentPlayKeyframe:null,broke:!1,disposers:[],modeChanging:!1});p(this,"GuideLine");this.config=n,Object.assign(window,{[`__${Mr}_DEBUG__`]:this});const o=this.setFiveLinearUpdateCamera.bind(this),s=this.setFiveOriginUpdateCamera.bind(this);this.hooks.on("play",o),this.hooks.on("broke",s),this.hooks.on("end",s),this.hooks.on("pause",s),this.privateState.disposers.push(()=>{this.hooks.off("play",o),this.hooks.off("broke",s),this.hooks.off("end",s),this.hooks.off("pause",s)})}load(e,n,o){return Z(this,null,function*(){var d,f,u,h,m;if(this.state.disposed)return jr();this.privateState.fiveOriginGetProgress||(f=(d=this.five.controller)==null?void 0:d.cameraMotion)!=null&&f.getProgress||(yield this.waitFiveLoaded(),this.privateState.fiveOriginGetProgress=(h=(u=this.five.controller)==null?void 0:u.cameraMotion)==null?void 0:h.getProgress),this.clear();const s=this.data?JSON.parse(JSON.stringify(this.data)):void 0,r=yield this.formatData(e);this.data=r,this.hooks.emit("dataChange",r,s);let a=[],l;const c=this.data.keyframes.filter(g=>g.data.panoIndex!==void 0);c.filter((g,v)=>{var A;return g.data.panoIndex!==((A=c[v-1])==null?void 0:A.data.panoIndex)}).map(g=>g.data.panoIndex).forEach(g=>{var A,C;const v=(A=this.five.work.observers[g])==null?void 0:A.floorIndex;if(v!==void 0)if(l===v){const w=a.length-1;a[w]=[...(C=a[w])!=null?C:[],g]}else{l=v;const w=a.length;a[w]=[g]}}),this.GuideLine||(this.GuideLine=Lr(this.five,this.config)),(m=this.GuideLine)==null||m.load({routes:a.map(g=>({panoIndexList:g}))}),this.setState({playing:!1}),this.handleVisible(this.state.visible),this.handleEnable(this.state.enabled),this.changePlayState(this.state.playing),this.changeSpeed(this.state.speed),n&&this.setState(n,{userAction:o}),console.log(`${oi} loaded`,r),this.hooks.emit("dataLoaded",r)})}play(e){this.setState({playing:!0},e)}playFrom(e){const{index:n,id:o,userAction:s}=e;this.state.playing&&this.setState({playing:!1},{userAction:s}),this.setState({playing:!0},{userAction:s,playFromIndex:n,playFromId:o})}playFromStart(e){return this.playFrom(pe(N({},e),{index:0}))}pause(e){this.setState({playing:!1},e)}show(e){return Z(this,null,function*(){this.setState({visible:!0},e)})}hide(e){return Z(this,null,function*(){this.setState({visible:!1},e)})}enable(e){this.setState({enabled:!0},e)}disable(e){this.setState({enabled:!1},e)}dispose(){this.setState({disposed:!0})}setState(e,n){var s;if(this.state.disposed)return jr();if(!this.state.enabled&&e.enabled!==!0&&e.disposed!==!0)return Kh();const o=N({},this.state);this.state=N(N({},this.state),e),e.disposed!==void 0&&e.disposed!==o.disposed&&e.disposed&&this.handleDispose(),e.visible!==void 0&&e.visible!==o.visible&&this.handleVisible(e.visible,n==null?void 0:n.userAction),e.enabled!==void 0&&e.enabled!==o.enabled&&this.handleEnable(e.enabled,n==null?void 0:n.userAction),e.playing!==void 0&&e.playing!==o.playing&&this.changePlayState(e.playing,n),e.speed!==void 0&&e.speed!==o.speed&&this.changeSpeed(e.speed,n==null?void 0:n.userAction),$e(o,this.state,{deep:!0})||this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:(s=n==null?void 0:n.userAction)!=null?s:!0})}formatData(e){return Z(this,null,function*(){this.five.work||(yield this.waitFiveLoaded());const n=this.five.work.observers,o=(()=>{const s=e;return typeof s=="object"&&s!==null&&s.version&&s.data?s.data:s})();if(o.keyframes)return{keyframesId:Fe(),keyframes:o.keyframes.map((s,r)=>{var c;const a=o.keyframes[r+1],l=(()=>!a||a.start===void 0||s.end===void 0?0:a.start-s.end)();return N({id:(c=s.uuid)!=null?c:Fe(),moveIndex:r,stay:l,index:r},s)})};if(o.panoIndexList){let s=[];const{moveEffect:r,moveToFirstPanoEffect:a}=o;return this.privateState.moveToFirstPanoEffect=a,o.panoIndexList.forEach((l,c)=>{const d=(()=>{var g,v,A,C;const f=o.panoIndexList.slice(c).find(w=>w!==l);if(f===void 0)return;const u=(g=n[l])==null?void 0:g.position,h=(v=n[f])==null?void 0:v.position;if(!h||!u||((A=n[l])==null?void 0:A.floorIndex)!==((C=n[f])==null?void 0:C.floorIndex))return;const m=new I.Vector3().subVectors(h,u);return Jh(m)})();o.moveType===void 0||o.moveType==="justMove"?s.push({moveIndex:c,stay:o.stay,data:N({effect:"Move",panoIndex:l,moveEffect:r},d!=null?d:{})}):o.moveType==="moveAndRotate"&&(s.push({moveIndex:c,stay:o.stay,data:{effect:"Move",panoIndex:l,moveEffect:r}}),d&&s.push({moveIndex:c,stay:o.stay,data:N({effect:"Rotate",panoIndex:l},d)}))}),{keyframesId:Fe(),keyframes:s.map((l,c)=>N({id:Fe(),index:c},l))}}else throw new Error("format error: data no keyframes or no panoIndexList")})}handleEnable(e,n=!0){var o,s;e?((o=this.GuideLine)==null||o.enable(),this.hooks.emit("enable",{userAction:n})):((s=this.GuideLine)==null||s.disable(),this.changePlayState(!1,{userAction:n}),this.hooks.emit("disable",{userAction:n})),this.state.enabled=e}handleVisible(e,n=!0){var o,s;e?((o=this.GuideLine)==null||o.show(),this.actionIfStateIsEnabled(()=>this.hooks.emit("show",{userAction:n}))):((s=this.GuideLine)==null||s.hide(),this.actionIfStateIsEnabled(()=>this.hooks.emit("hide",{userAction:n}))),this.state.visible=e}changePlayState(e,n){this.actionIfStateIsEnabled(()=>{var o;return this.hooks.emit("playStateChange",e?"playing":"pause",{userAction:(o=n==null?void 0:n.userAction)!=null?o:!0})}),e?this.handlePlay(n):this.handlePause(n),this.state.playing=e}handlePlay(e){return Z(this,null,function*(){var h;const{data:n,state:o,privateState:s,hooks:r}=this;if(s.playing||!(n!=null&&n.keyframes)||(n==null?void 0:n.keyframes.length)===0)return;const a=Fe();s.playId=a,s.playing=!0,s.broke=!1;const l=n.keyframes,c=this.getPauseData();(e==null?void 0:e.notEmitEvent)!==!0&&r.emit("play",{userAction:(h=e==null?void 0:e.userAction)!=null?h:!0});let d=!1;const u=yield(()=>Z(this,null,function*(){var m,g;if((e==null?void 0:e.playFromIndex)!==void 0)return e.playFromIndex;if((e==null?void 0:e.playFromId)!==void 0)return(m=this.data)==null?void 0:m.keyframes.findIndex(v=>v.id===e.playFromId);if(c!=null&&c.keyframeId){const v=(g=this.data)==null?void 0:g.keyframes.find(A=>A.id===c.keyframeId);if(c!=null&&c.fiveState&&(yield this.move(c.fiveState,{moveEffect:s.moveToFirstPanoEffect})),v){if(v.data.effect==="Move")return v.index;if(v.data.effect==="Rotate"){const A=c.duration!==void 0?c.duration*(1-c.playedProgress):void 0;return yield this.playKeyframe(v,{duration:A}),d=!0,v.index+1}}}}))();this.clearPauseData();for(const m of l){if(s.broke||!o.playing||!s.playing||a!==s.playId)return;if(!(u!==void 0&&m.index<u))try{r.emit("playIndexChange",m.index,m),yield this.playKeyframe(m,{moveEffect:d===!1?s.moveToFirstPanoEffect:void 0,duration:800}),m.stay&&(yield _h(m.stay)),d===!1&&(d=!0)}catch(g){return Promise.resolve("broke")}}o.playing&&a===s.playId&&(this.setState({playing:!1},{userAction:!1}),r.emit("end"),this.clearPauseData())})}handlePause(e){var r;const{state:n,privateState:o,hooks:s}=this;n.playing=!1,o.playing!==!1&&(o.playing=!1,this.setPauseData(),o.broke||this.forceInteruptUpdateCamera(),(e==null?void 0:e.notEmitEvent)!==!0&&s.emit("pause",{userAction:(r=e==null?void 0:e.userAction)!=null?r:!0}))}playKeyframe(e,n){return Z(this,null,function*(){var s;const{privateState:o}=this;return((s=this.privateState.currentPlayKeyframe)==null?void 0:s.keyframe.id)!==e.id&&(this.privateState.currentPlayKeyframe={keyframe:e}),o.currentPlayQueue.push(this.getPlayPromise(e,n)),this.actionPromiseQueue()})}addInterruptListener(e){const n=()=>{this.privateState.modeChanging||e()},o=e;return this.five.once("gesture",o),this.five.once("wantsChangeMode",n),()=>{this.five.off("gesture",o),this.five.once("wantsChangeMode",n)}}getPlayPromise(e,n){return Z(this,null,function*(){var s;const o=e.data;if((s=n==null?void 0:n.duration)!=null||e.start!==void 0&&e.end!==void 0&&e.end-e.start,!!o)return new Promise((r,a)=>{let l=!1;this.addInterruptListener(()=>{if(!l)return this.hooks.emit("broke"),this.privateState.broke=!0,this.setState({playing:!1}),l=!0,a(new Error("play is interupted"))});try{if(l)return;const c=()=>{r(),l=!0};switch(o.effect){case"Move":this.move(o,n).then(c);break;case"Rotate":this.rotate(o,n).then(c);break;default:this.rotate(o,n).then(c)}}catch(c){}})})}actionPromiseQueue(){return Z(this,null,function*(){const{privateState:e}=this;return new Promise((n,o)=>{if(e.currentPlayQueue.length===0){n();return}const s=e.currentPlayQueue.shift();if(!s){n();return}s.then(n,o)}).then(()=>e.currentPlayQueue.length===0?Promise.resolve():this.actionPromiseQueue())})}move(e,n){return Z(this,null,function*(){if(e.mode&&e.mode!==this.five.currentMode)yield this.changeMode(e);else if(e.panoIndex!==this.five.panoIndex)yield this.changePano(e,n);else return Promise.resolve()})}rotate(e,n){return Z(this,null,function*(){if(e.mode&&e.mode!==this.five.currentMode)yield this.changeMode({mode:e.mode,panoIndex:e.panoIndex});else if(e.panoIndex&&e.panoIndex!==this.five.panoIndex)return yield this.changePano(e,n);yield this.updateCamera(e,n==null?void 0:n.duration)})}updateCamera(e,n=800){return Z(this,null,function*(){const{five:o,privateState:s,state:r}=this;let a=n;const l=(()=>{var u,h;const d=(u=r.config)==null?void 0:u.speedConfig,f=(h=e.rotateSpeed)!=null?h:d==null?void 0:d.rotateSpeed;if((d==null?void 0:d.rotateSpeedUnit)===void 0)return f;if(f!==void 0)return d.rotateSpeedUnit==="rad/ms"?f:f/1e3})();if(l){const d=this.five.getCurrentState();a=Yh(d,e)/l}s.currentPlayKeyframe&&(s.currentPlayKeyframe.originDuration=a);const c=this.getSpeededDuration(a);return new Promise(d=>{Uh(()=>o.updateCamera(e,c)),setTimeout(()=>d(),c)})})}changePano(e,n){return Z(this,null,function*(){var f;const{five:o,privateState:s,state:r}=this;if(typeof e.panoIndex!="number"||e.panoIndex===o.panoIndex)return;o.getCurrentState().mode;const a=o.getCurrentState().mode!=="Panorama";a&&(this.privateState.modeChanging=!0);let l=(f=n==null?void 0:n.duration)!=null?f:800;const c=(()=>{var m,g;const u=(m=r.config)==null?void 0:m.speedConfig,h=(g=e.moveSpeed)!=null?g:u==null?void 0:u.moveSpeed;if((u==null?void 0:u.moveSpeedUnit)===void 0)return h;if(h!==void 0)return u.moveSpeedUnit==="m/ms"?h:h/1e3})();if(c&&typeof o.panoIndex=="number"&&typeof e.panoIndex=="number"){const u=o.work.observers[o.panoIndex].position,h=o.work.observers[e.panoIndex].position;l=u.distanceTo(h)/c}s.currentPlayKeyframe&&(s.currentPlayKeyframe.originDuration=l);const d=this.getSpeededDuration(l);yield new Promise(u=>{var h,m,g;o.moveToPano(e.panoIndex,{latitude:e.latitude,longitude:e.longitude,fov:e.fov,duration:d,effect:(g=(m=n==null?void 0:n.moveEffect)!=null?m:(h=this.state.config)==null?void 0:h.moveEffect)!=null?g:e.moveEffect,moveCancelCallback:()=>u(),moveEndCallback:()=>u()}),a&&o.once("panoArrived",()=>u())}),a&&(this.privateState.modeChanging=!1)})}changeSpeed(e,n=!0){const{state:o,privateState:s,hooks:r}=this,{currentPlayKeyframe:a}=s;if(r.emit("speedChange",e,{userAction:n}),o.playing&&a)try{const l=a.originDuration!==void 0?a.originDuration*(1-this.getProgress()):void 0,c=this.playKeyframe(a.keyframe,{duration:l});s.currentPlayQueue.push(c)}catch(l){}}getSpeededDuration(e){return e/this.state.speed}getProgress(){return this.five.controller.cameraMotion.progress}changeMode(e,n){return Z(this,null,function*(){e.mode&&e.mode!==this.five.currentMode&&(this.privateState.modeChanging=!0,console.log("this.privateState.modeChanging",this.privateState.modeChanging),yield this.five.changeMode(e.mode,e,n),this.privateState.modeChanging=!1)})}forceInteruptUpdateCamera(){this.five.updateCamera({},0)}getPauseData(){var e,n;if((e=this.data)!=null&&e.keyframesId)return Ji.get((n=this.data)==null?void 0:n.keyframesId)}setPauseData(){var e,n,o,s;if((e=this.data)!=null&&e.keyframesId)return Ji.set((n=this.data)==null?void 0:n.keyframesId,{keyframeId:(o=this.privateState.currentPlayKeyframe)==null?void 0:o.keyframe.id,fiveState:this.five.getCurrentState(),duration:(s=this.privateState.currentPlayKeyframe)==null?void 0:s.originDuration,playedProgress:this.getProgress()})}clearPauseData(){var e,n;if((e=this.data)!=null&&e.keyframesId)return Ji.delete((n=this.data)==null?void 0:n.keyframesId)}clear(){this.clearPauseData(),this.privateState.currentPlayKeyframe=null}handleDispose(){var e,n;this.setState({playing:!1}),this.clearPauseData(),this.clear(),(e=this.GuideLine)==null||e.dispose(),this.GuideLine=void 0,(n=this.privateState.disposers)==null||n.forEach(o=>o==null?void 0:o())}actionIfStateIsEnabled(e,n){if(this.state.enabled)return e();n!=null&&n.warnLog&&qh()}waitFiveLoaded(){return Z(this,null,function*(){return new Promise(e=>{if(this.five.work){e();return}this.five.once("loaded",()=>{e()})})})}setFiveLinearUpdateCamera(){!this.privateState.fiveOriginGetProgress||(this.five.controller.cameraMotion.getProgress=e=>{const n=this.five.controller.cameraMotion,o=e-n.startTime;return o<0?0:o>=n.duration?1:1-Zh(1,n.startVelocity,n.duration,o)})}setFiveOriginUpdateCamera(){!this.privateState.fiveOriginGetProgress||(this.five.controller.cameraMotion.getProgress=this.privateState.fiveOriginGetProgress)}}p(Zi,"PluginVersion",zr);const $h=i=>new Zi(i);function em(i,t){t.forEach(e=>{const n=new I.SphereGeometry(.02,16,16),o=[],s=[new I.MeshBasicMaterial({color:16776960}),new I.MeshBasicMaterial({color:16711935}),new I.MeshBasicMaterial({color:16711680}),new I.MeshBasicMaterial({color:65535})];if(e.position.length===4)e.position.forEach((r,a)=>{const l=s[a],c=new I.Mesh(n,l);c.position.copy(rt(r)),o.push(c)});else{const r=s[0],a=new I.Mesh(n,r);a.position.copy(rt(e.position)),o.push(a)}o.forEach(r=>{r.material.depthTest=!1,i.scene.add(r)})})}const Se=i=>i;function Br(i){if(i.length<3)return;const t=i.map(cn),e=t[1].clone().sub(t[0]),n=t[2].clone().sub(t[1]);return e.cross(n)}function si(i){if(Array.isArray(i)&&i.length===4){const t=i.map(cn);return Co(t[0],t[2])}else return cn(i)}function ri(i,t){if(i===void 0)return;const{min:e,max:n}=t!=null?t:{};if(!(e===void 0&&n===void 0))return!(typeof n=="number"&&n<i||typeof e=="number"&&e>i)}function tm(i,t){i.model.loaded?t():i.once("modelLoaded",()=>t())}function nm(i,t,e){const o=new I.Plane().setFromNormalAndCoplanarPoint(e,t),s=t.clone().sub(i).cross(new I.Vector3(0,1,0)).setLength(.01),r=new I.Vector3(0,.01,0);return[t.clone().sub(s).sub(r),t.clone().add(s).sub(r),t.clone().add(s).add(r),t.clone().sub(s).add(r)].map(l=>o.projectPoint(l,new I.Vector3))}const Tr=(i,t=1e3/60)=>{let e=null;const n=i;return(...s)=>{e&&clearTimeout(e),e=setTimeout(()=>{n==null||n(...s),e&&clearTimeout(e),e=null},t)}};function im(i,t=200){let e;return function(...n){e||(i.apply(this,n),e=setTimeout(function(){e=null},t))}}function om(i,t){const[e,n]=t;if(e>=n||n<=1||e<=1)return-1;const o={},s=r=>(o[r]||(o[r]=i(r)),o[r]);for(let r=e;r<n;r++){const a=s(r),l=s(r-1);if(a<l)return r}return-1}function Qr(i,t){if(!t||typeof ResizeObserver=="undefined"||!ResizeObserver)return{observe:()=>window.addEventListener("resize",i),unobserve:()=>window.removeEventListener("resize",i)};{const e=new ResizeObserver(i);return{observe:()=>e.observe(t),unobserve:()=>e.unobserve(t)}}}var Je=(i=>(i.Two="2D",i.Three="3D",i))(Je||{}),We=(i=>(i.PointTag="PointTag",i.PlaneTag="PlaneTag",i))(We||{}),Xe=(i=>(i.Audio="Audio",i.Text="Text",i.ImageText="ImageText",i.Link="Link",i.Marketing="Marketing",i.MediaPlane="MediaPlane",i.Custom="Custom",i))(Xe||{}),ai=(i=>(i.VrLink="vr",i.NormalLink="normal",i))(ai||{});function sm(i){le(i,"svelte-1omzoh4",".straight-line.svelte-1omzoh4{display:block;width:100%;height:100%;overflow:visible}")}function Or(i){let t,e,n,o;return{c(){t=be("path"),b(t,"fill","none"),b(t,"stroke","url(#"+i[4]+")"),b(t,"stroke-width","1"),b(t,"d","M0 0.5 L 148 0.5")},m(s,r){B(s,t,r),o=!0},p(s,r){i=s},i(s){o||(s&&De(()=>{n&&n.end(1),e=zt(t,Gn,{duration:i[1],delay:i[0]}),e.start()}),o=!0)},o(s){e&&e.invalidate(),s&&(n=Ut(t,Gn,{duration:i[1],delay:i[2]})),o=!1},d(s){s&&z(t),s&&n&&n.end()}}}function rm(i){let t,e,n,o,s,r=i[3]&&Or(i);return{c(){t=be("svg"),e=be("defs"),n=be("linearGradient"),o=be("stop"),s=be("stop"),r&&r.c(),b(o,"offset","25%"),b(o,"stop-color","white"),b(o,"stop-opacity","1"),b(s,"offset","100%"),b(s,"stop-color","white"),b(s,"stop-opacity","0.5"),b(n,"id",i[4]),b(n,"gradientUnits","userSpaceOnUse"),b(t,"class","straight-line svelte-1omzoh4"),b(t,"viewBox","0 0 148 1"),b(t,"preserveAspectRatio","none")},m(a,l){B(a,t,l),R(t,e),R(e,n),R(n,o),R(n,s),r&&r.m(t,null)},p(a,[l]){a[3]?r?(r.p(a,l),l&8&&k(r,1)):(r=Or(a),r.c(),k(r,1),r.m(t,null)):r&&(fe(),M(r,1,1,()=>{r=null}),he())},i(a){k(r)},o(a){M(r)},d(a){a&&z(t),r&&r.d()}}}function am(i,t,e){let{inDelay:n=0}=t,{duration:o=0}=t,{outDelay:s=0}=t,{unfolded:r}=t;const a=Fe();return i.$$set=l=>{"inDelay"in l&&e(0,n=l.inDelay),"duration"in l&&e(1,o=l.duration),"outDelay"in l&&e(2,s=l.outDelay),"unfolded"in l&&e(3,r=l.unfolded)},[n,o,s,r,a]}class Rr extends se{constructor(t){super(),oe(this,t,am,rm,ie,{inDelay:0,duration:1,outDelay:2,unfolded:3},sm)}}function lm(i){le(i,"svelte-faoauy",".shadow.svelte-faoauy{position:absolute}")}function Fr(i){let t,e,n,o,s;return{c(){t=Q("div"),b(t,"class","shadow svelte-faoauy"),b(t,"style",e=`
|
|
530
|
+
`,e.container.style.pointerEvents="none";const n=v=>(e.wrapper=v,v.appendChild(e.container),l(),!0),o=v=>{e.itemLabels=Ch(v),l()},s=()=>(e.enabled||(e.enabled=!0,l()),!0),r=()=>(e.enabled&&(e.enabled=!1,l()),!0),a=()=>{d(),e.container.remove()},l=()=>{var v;if(!!e.wrapper){if(!e.enabled||!e.fiveModeEnabled){(v=e.app)==null||v.$destroy(),e.app=void 0;return}e.app?e.app.$set({five:i,itemLabels:e.itemLabels}):e.app=new wh({target:e.container,props:{five:i,modelOcclusionEnable:e.modelOcclusionEnable,onlyVisibleInPanorama:e.onlyVisibleInPanorama,itemLabels:e.itemLabels,wrapper:e.wrapper,hooks:e.hooks,displayStrategyType:e.displayStrategyType,maxVisibleDistance:e.maxVisibleDistance}})}},c=()=>{i.on("modeChange",f),i.once("dispose",a)},d=()=>{i.off("modeChange",f)},f=v=>{if(v!==me.Five.Mode.Panorama){e.fiveModeEnabled=!1,r();return}i.once("initAnimationEnded",()=>{e.fiveModeEnabled=!0,s()})};return c(),{appendTo:n,load:o,enable:s,disable:r,dispose:a,hooks:e.hooks}},Eh={name:"ItemLabelPlugin",version:0};class xh extends Yn{constructor(e){super(e);p(this,"state");p(this,"container");p(this,"enabled");this.five=e,this.five.once("dispose",this.dispose),this.enabled=!0,this.state=this.initState()}enable(e){this.enabled=!0,this.updateState(pe(W({},e),{userAction:!0}))}disable(e){this.enabled=!1,this.updateState(pe(W({},e),{userAction:!0}))}show(e){if(!!this.state.enabled)return this.setState(pe(W({},this.state),{visible:!0}),e),Promise.resolve()}hide(e){if(!!this.state.enabled)return this.setState(pe(W({},this.state),{visible:!1}),e),Promise.resolve()}dispose(){this.container.remove()}setState(e,n){if(!this.enabled)return;const o=W({},this.state);this.state=W(W(W({},this.state),e),n),this.stateChangedCallback(o,n)}get visible(){return this.five.state.mode===me.Five.Mode.Panorama}appendTo(e){!this.enabled||(this.container=e,this.render())}updateState(e){this.setState(pe(W({},this.state),{enabled:this.enabled,visible:this.visible}),e)}}function kh(i){le(i,"svelte-wpy7pz",'.plugin-DoorLabelPlugin-item.svelte-wpy7pz.svelte-wpy7pz{position:absolute;left:0;top:0;width:0;height:0;pointer-events:none;transition:opacity 0.3s ease}.plugin-DoorLabelPlugin-cnt.svelte-wpy7pz.svelte-wpy7pz{position:absolute;top:50%;left:50%;border-radius:0.125rem;background:rgba(0, 0, 0, 0.35);line-height:0.75rem;padding:0.375rem;white-space:nowrap;font-size:0.75rem;font-style:normal;color:white;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:transform ease 1s, background ease 0.3s, color ease 0.3s}.plugin-DoorLabelPlugin-cnt.svelte-wpy7pz.svelte-wpy7pz::after{content:"";display:block;position:absolute;top:-0.0625rem;left:-0.0625rem;bottom:-0.0625rem;right:-0.0625rem;border-radius:0.125rem;border:0.0625rem solid rgba(0, 0, 0, 0);-o-border-image:url("//vrlab-image4.ljcdn.com/release/web/highlightCarouseal-border-image.14b51834.png") 4;border-image:url("//vrlab-image4.ljcdn.com/release/web/highlightCarouseal-border-image.14b51834.png") 4;transition:opacity ease 0.3s}.plugin-DoorLabelPlugin-cnt.svelte-wpy7pz.svelte-wpy7pz:active,.plugin-DoorLabelPlugin-cnt.svelte-wpy7pz.svelte-wpy7pz:focus{background:rgba(0, 0, 0, 0.5);color:rgba(255, 255, 255, 0.5)}.plugin-DoorLabelPlugin-icon.svelte-wpy7pz.svelte-wpy7pz{background:url("//vrlab-image4.ljcdn.com/release/web/DoorLabel-icon.de1304ae.svg") no-repeat;background-size:100%;display:inline-block;width:0.625rem;height:0.625rem;margin-left:0.25rem;transform-origin:center}.plugin-DoorLabelPlugin-cnt[data-camera-toward=forward].left.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=forward].right.svelte-wpy7pz .plugin-DoorLabelPlugin-txt.svelte-wpy7pz{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=forward].right.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(-90deg);margin-left:0;margin-right:0.25rem;order:0}.plugin-DoorLabelPlugin-cnt[data-camera-toward=right].forward.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=right].back.svelte-wpy7pz .plugin-DoorLabelPlugin-txt.svelte-wpy7pz{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=right].back.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(-90deg);margin-left:0;margin-right:0.25rem;order:0}.plugin-DoorLabelPlugin-cnt[data-camera-toward=left].back.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=left].forward.svelte-wpy7pz .plugin-DoorLabelPlugin-txt.svelte-wpy7pz{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=left].forward.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(-90deg);margin-left:0;margin-right:0.25rem;order:0}.plugin-DoorLabelPlugin-cnt[data-camera-toward=back].right.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=back].left.svelte-wpy7pz .plugin-DoorLabelPlugin-txt.svelte-wpy7pz{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=back].left.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(-90deg);margin-left:0;margin-right:0.25rem;order:0}.plugin-DoorLabelPlugin-cnt--customBrand.svelte-wpy7pz.svelte-wpy7pz{color:#f9eac1}.plugin-DoorLabelPlugin-cnt--customBrand.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{background:url("//vrlab-image4.ljcdn.com/release/web/arrow.6e8ec00e.svg") no-repeat}.plugin-DoorLabelPlugin-cnt--customBrand.svelte-wpy7pz.svelte-wpy7pz:active,.plugin-DoorLabelPlugin-cnt--customBrand.svelte-wpy7pz.svelte-wpy7pz:focus{background:rgba(0, 0, 0, 0.5);color:rgba(249, 234, 193, 0.5)}')}function Dh(i){let t,e,n,o,s,r,a,l;return{c(){t=Q("div"),e=Q("div"),n=Q("span"),n.textContent=`${i[8]}`,o=_(),s=Q("i"),b(n,"class","plugin-DoorLabelPlugin-txt svelte-wpy7pz"),b(s,"class","plugin-DoorLabelPlugin-icon svelte-wpy7pz"),b(e,"class",r=Oe(_e.default("plugin-DoorLabelPlugin-cnt",i[0].toward))+" svelte-wpy7pz"),b(e,"style",`transform: ${i[6]||"initial"};pointer-events: ${i[5]?"auto":"none"};opacity: ${i[5]?1:0}`),b(e,"data-camera-toward",i[7]),b(t,"style",`left: ${i[3]||0}%;top: ${i[4]||0}%;opacity: ${i[5]?1:0}`),b(t,"class","plugin-DoorLabelPlugin-item svelte-wpy7pz")},m(c,d){B(c,t,d),O(t,e),O(e,n),O(e,o),O(e,s),i[10](t),a||(l=xe(e,"click",i[9]),a=!0)},p(c,[d]){d&1&&r!==(r=Oe(_e.default("plugin-DoorLabelPlugin-cnt",c[0].toward))+" svelte-wpy7pz")&&b(e,"class",r)},i:ne,o:ne,d(c){c&&z(t),i[10](null),a=!1,l()}}}function Lh(i,t,e){let{props:n}=t,{onClick:o}=t,s,{left:r,top:a,inSight:l,transform:c,panoIndex:d,cameraToward:f,name:u}=n,h=0;const m=()=>{if(!r||!a||!l||!s)return;const A=s.current.clientWidth/window.innerWidth*100,C=s.current.clientHeight/window.innerHeight*100;if(r<=A/2||r>=100-A/2||a<=C/2||a>=100-C/2)return;d!==h&&(console.log("panoDoorLabelPlugin",d,"\u89E6\u53D1\u57CB\u70B9"),h=d)},g=A=>{o&&o()};function v(A){Be[A?"unshift":"push"](()=>{s=A,e(2,s)})}return i.$$set=A=>{"props"in A&&e(0,n=A.props),"onClick"in A&&e(1,o=A.onClick)},m(),[n,o,s,r,a,l,c,f,u,g,v]}class Sh extends se{constructor(t){super(),oe(this,t,Lh,Dh,ie,{props:0,onClick:1},kh)}}function zh(i,t){const e=Math.abs(i.top+i.height/2-t.top-t.height/2),n=Math.abs(i.left+i.width/2-t.left-t.width/2),o=(i.height+t.height)/2,s=(i.width+t.width)/2;return!(e>o&&n>s)}function Mh(i){const{camera:t}=i,e=t.getWorldDirection(new H.Vector3);let n=Math.atan(e.z/e.x)*180/Math.PI,o="";return e.x<0&&(n+=180),n<0&&(n+=360),n>315||n<=45?o="right":n>45&&n<=135?o="back":n>135&&n<=225?o="left":n>225&&n<=315&&(o="forward"),o}function jh(i,t){return Math.sqrt(Math.pow(i.z-t.z,2)+Math.pow(i.x-t.x,2))}function Bh(i){const t=Math.PI/4;return i>-t&&i<=t?"left":i>t*3||i<=-t*3?"right":i>-t*3&&i<=-t?"forward":i>t&&i<=t*3?"back":""}const Th={userAction:!0};class Qh extends xh{constructor(e){super(e);p(this,"MinVisibledistance",1.8);p(this,"MaxVisibledistance",5);p(this,"OffsetHeight",-1.3);p(this,"rooms");p(this,"floorplanServerData");p(this,"doorLabelItems");p(this,"visibleLabelMap",new Map);p(this,"labelItems",[]);p(this,"doorLabels");p(this,"roomObservers");p(this,"loadData",(e,n)=>{n&&(this.MaxVisibledistance=n.MaxVisibledistance,this.MinVisibledistance=n.MinVisibledistance,this.OffsetHeight=n.OffsetHeight),this.doorLabelItems&&this.doorLabelItems.length>0&&this.doorLabelItems.forEach(o=>{o.$destroy()}),this.labelItems=[],this.doorLabels=[],this.doorLabelItems=[],this.floorplanServerData=e,typeof this.five.ready=="function"?this.five.ready().then(()=>this.initData()):this.five.once("panoArrived",()=>{this.initData()})});p(this,"initRoomObservers",()=>{var s,r;const e=this.floorplanServerData.computed_data.floor_datas||[],o=(((r=(s=this.five)==null?void 0:s.work)==null?void 0:r.observers)||[]).map(a=>{const l=a.panoIndex,c=a.floorIndex,d=e==null?void 0:e.find(f=>f.floor_index===c);if(d){const f=d.rooms.find(u=>u.observer_indexs.includes(l));if(f)return{panoIndex:l,floorIndex:c,name:f.name}}}).filter(Boolean);this.roomObservers=o});p(this,"hideAllLabels",()=>{this.labelItems.forEach(e=>{e.visible=!1,e.inSight=!1}),this.render()});p(this,"fixDoorVisibleAndPosition",()=>{this.initRoomObservers();const{panoIndex:e}=this.five;if(!this.visible||this.five.model.empty||e===null||!this.roomObservers.find(a=>a.panoIndex===e))return;const n=this.roomObservers.find(a=>a.panoIndex===e),s=this.five.work.observers.find(a=>a.panoIndex===e).position.clone(),r=(()=>{if(this.visibleLabelMap.has(e))return this.visibleLabelMap.get(e);{const a=[];return this.doorLabels.forEach((l,c)=>{if(l.roomName===n.name)return;const d=l.position.clone(),f=d.distanceTo(s);if(f<this.MinVisibledistance||f>this.MaxVisibledistance)return;const u=new H.Raycaster,h=d.clone().sub(s).normalize();u.set(s,h);const[m]=this.five.model.intersectRaycaster(u);m&&m.distance+.1<f||a.push(c)}),this.visibleLabelMap.set(e,a),a}})();this.labelItems.forEach((a,l)=>{a.visible=r.includes(l)}),this.fixDoorPosition()});p(this,"fixDoorPosition",()=>{var d,f,u,h,m,g,v,A,C,w,E,D;const{panoIndex:e,camera:n}=this.five;if(e===null)return;if(this.five.currentMode!=="Panorama")return this.hideAllLabels();const o=this.five.getElement(),s=o.clientWidth,r=o.clientHeight,a=n.getWorldDirection(new H.Vector3),l=[],c=[...this.labelItems];if(c.forEach((y,L)=>{if(y.visible){const x=n.position.distanceTo(y.position),R=y.position.clone().add(new H.Vector3(0,this.OffsetHeight,0)),G=R.clone().sub(n.position).normalize().angleTo(a),U=R.clone().project(n),P=(U.x+1)/2.2*100,S=(-U.y+1)/2.2*100,j=P>=0&&P<=100&&S>=0&&S<=100&&x>this.MinVisibledistance&&x<=this.MaxVisibledistance;y.left=P,y.top=S,y.inSight=j&&G<Math.PI/2,y.cameraToward=Mh(this.five),j?l.push({disFromCameraToLabel:x,left:P,top:S,index:L}):y.transform="translate(-50%, -50%)"}else y.inSight=!1}),l.length>1){let y=0;l.sort((L,x)=>x.disFromCameraToLabel-L.disFromCameraToLabel);for(let L=1;L<l.length;L++){const{index:x,left:R,top:T}=l[L-1],{index:G,left:U,top:P}=l[L],S=this.container.children[x],j=this.container.children[G];if(!S||!j)return;const N={left:s*R/100,top:r*T/100,width:(u=(f=(d=S.children)==null?void 0:d[0])==null?void 0:f.clientWidth)!=null?u:0,height:(g=(m=(h=S.children)==null?void 0:h[0])==null?void 0:m.clientHeight)!=null?g:0},Y={left:s*U/100,top:r*P/100,width:(C=(A=(v=j.children)==null?void 0:v[0])==null?void 0:A.clientWidth)!=null?C:0,height:(D=(E=(w=j.children)==null?void 0:w[0])==null?void 0:E.clientHeight)!=null?D:0};zh(N,Y)&&(y++,c[x].transform=`translate(-50%, ${(y-1)*100-50}%)`,c[G].transform=`translate(-50%, ${y*100-50}%)`)}}this.labelItems=c,this.render()});p(this,"onClick",(e,n)=>{if(!this.roomObservers)return;const{work:o}=this.five;let s,r,a=1/0;for(const l of o.observers)if(this.roomObservers.find(d=>d.panoIndex===l.panoIndex&&d.name===e)){const d=l.standingPosition,f=n.distanceTo(d);f<a&&(s=l.panoIndex,r=d.clone().sub(n).normalize(),a=f)}if(r!==null&&s!==null){const l={};if(a>0){const d=new H.Vector3(0,0,-1),f=r.clone(),u=new H.Quaternion;u.setFromUnitVectors(d,f);const h=new H.Euler;h.setFromQuaternion(u,"YXZ"),l.longitude=h.y}this.five.emit("wantsToMoveToPano",s,{},!0)||this.five.moveToPano(s,{longitude:l.longitude})}});p(this,"initData",()=>{var s;this.doorLabels=[];const e=this.five.panoIndex,n=this.floorplanServerData.computed_data.observers[e].floor_index,o=n!==void 0&&((s=this.floorplanServerData.computed_data.floor_datas[n])==null?void 0:s.rooms);this.rooms=o,this.rooms&&this.rooms.length>0&&this.rooms.forEach(r=>{var c;const a=(c=this.floorplanServerData.computed_data.doors)==null?void 0:c.filter(d=>!!(d&&d.name===r.name)),l=this.five.work.observers.filter((d,f)=>!!r.observer_indexs.find(u=>u===f));a&&a.forEach(d=>{const f=d.position;let u=1/0,h;l.forEach(g=>{const v=g.standingPosition,A={x:v.x,y:v.y,z:v.z},C=jh(f,A);C<u&&(u=C,h=A)}),h&&(f.y=h.y+.01);const m=new H.Vector3(f.x,f.y,f.z);m.add(new H.Vector3(-.2,1.8,0).applyEuler(new H.Euler(0,d.rad,0))),this.doorLabels.push({roomName:r.name,name:d.name,position:m,toward:Bh(d.rad)})})}),this.labelItems=this.doorLabels.map(r=>pe(W({},r),{left:0,top:0,visible:!1,inSight:!1,transform:"",cameraToward:""})),this.five.on("wantsToMoveToPano",this.hideAllLabels),this.five.on("modelLoaded",this.fixDoorVisibleAndPosition),this.five.on("panoArrived",this.fixDoorVisibleAndPosition),this.five.on("initAnimationEnded",this.fixDoorPosition),this.five.on("cameraUpdate",this.fixDoorPosition),this.five.on("mouseWheel",this.fixDoorPosition),this.five.on("pinchGesture",this.fixDoorPosition),this.fixDoorVisibleAndPosition()})}stateChangedCallback(e,n){if(this.hooks.hasListener("stateChange")){const o={state:this.state,prevState:e,userAction:n?n.userAction:Th.userAction};this.hooks.emit("stateChange",o)}}render(){if(!this.enabled){this.doorLabelItems&&this.doorLabelItems.length>0&&this.doorLabelItems.forEach(e=>{e==null||e.$destroy()}),this.doorLabels=void 0;return}this.doorLabelItems&&this.doorLabelItems.forEach(e=>{e.$destroy()}),this.doorLabelItems=[],this.labelItems.forEach(e=>{this.doorLabelItems.push(new Sh({target:this.container,props:{props:e,onClick:()=>{this.onClick(e.name,e.position)}}}))})}initState(){return{enabled:!0,visible:!0}}dispose(){this.five&&(this.five.off("wantsToMoveToPano",this.hideAllLabels),this.five.off("modelLoaded",this.fixDoorVisibleAndPosition),this.five.off("panoArrived",this.fixDoorVisibleAndPosition),this.five.off("initAnimationEnded",this.fixDoorPosition),this.five.off("cameraUpdate",this.fixDoorPosition),this.five.off("mouseWheel",this.fixDoorPosition),this.five.off("pinchGesture",this.fixDoorPosition),super.dispose())}}const Oh=i=>new Qh(i),Rh=2,Fh=3,Hh=3,Gh=2;function Nh(i,t){var r,a,l;if(i.length<2)return console.warn("positionList length must be greater than 1"),[];const e=(r=t==null?void 0:t.unitWidth)!=null?r:.5,n=(a=t==null?void 0:t.unitHeight)!=null?a:.5,o=(l=t==null?void 0:t.skipPanoIndexMesh)!=null?l:!1,s=new I.CatmullRomCurve3(i,!1,"catmullrom",1);if(o){const c=Math.ceil(s.getLength()/n*1.5),d=s.getPoints(c),f=[];let u=0;const h=i;return h.forEach((m,g)=>{let v=0,A=99999999;d.forEach((y,L)=>{const x=y.distanceTo(m);x<A&&(v=L,A=x)});const C=d[v+1],w=C==null?void 0:C.distanceTo(m),E=d[v-1],D=E==null?void 0:E.distanceTo(m);if(v>u&&v-u>1){let y=v;E!==void 0&&D>.8&&(y=v+1),E!==void 0&&D>.2&&D<.3?y=v:A>.2&&A<.3&&(y=v+1);let L=u;if(C!==void 0&&w>.2&&w<.3?L=u+1:A>.2&&A<.3&&(L=u),d[L]&&d[L+1]){const T=h[g-1];if(T)if(T.equals(d[L]))L+=1;else{const G=new H.Vector3().subVectors(d[L+1],d[L]),U=new H.Vector3().subVectors(T,d[L]);G.angleTo(U)<Math.PI/2&&(L+=1)}}if(y<L||y-L<=1)return;const x=d.slice(L,y),R=Ir(x,e,n);f.push(R),u=v}}),f}else{const c=Math.ceil(s.getLength()),d=s.getPoints(c);return[Ir(d,e,n)]}}function Ir(i,t,e){const n=t/2,o=e/t,s=i.length,r=tl.default(i.map(A=>[A.x,A.z])),l=(i.length-1)*Rh*Fh,c=2*s,d=c*Hh,f=c*Gh,u=new Uint32Array(l),h=new Float32Array(d),m=new Float32Array(f);i.forEach((A,C)=>{});let g=0;for(let A=0;A<i.length;A++){const[C,w]=r[A][0],E=i[A],{x:D,y,z:L}=E,x=new H.Vector3(D+C*n,y+.05,L+w*n);h[A*6+0]=x.x,h[A*6+1]=x.y,h[A*6+2]=x.z;const R=new H.Vector3(D-C*n,y+.05,L-w*n);h[A*6+3]=R.x,h[A*6+4]=R.y,h[A*6+5]=R.z,g+=A>0?i[A-1].clone().sub(i[A]).length():0;const T=g/t/o;m[A*4+0]=0,m[A*4+1]=T,m[A*4+2]=1,m[A*4+3]=T,A!==i.length-1&&(u[A*6+0]=A*2+0,u[A*6+1]=A*2+2,u[A*6+2]=A*2+1,u[A*6+3]=A*2+2,u[A*6+4]=A*2+3,u[A*6+5]=A*2+1)}const v=new I.BufferGeometry;return v.setAttribute("position",new I.BufferAttribute(h,3)),v.setAttribute("uv",new I.BufferAttribute(m,2)),v.setIndex(new I.BufferAttribute(u,1)),v}function Wh(i){const t=new I.TextureLoader().load(i.textureUrl);return t.wrapS=t.wrapT=I.RepeatWrapping,t.encoding=I.sRGBEncoding,new I.MeshBasicMaterial({color:16777215,map:t,transparent:!0,opacity:.8})}function Xh(i){return!Qt(i)}function Qt(i){return i!=null}const Er="v1.0.1",xr="GuideLinePlugin",Vi=`${xr}@${Er}`,kr=i=>`${Vi}--${i}`;class Dr extends jt{constructor(e,n){super(e,n);p(this,"state",{visible:!1,enabled:!0,disposed:!1});p(this,"data");p(this,"linesGroup");p(this,"disposedErrorLog",()=>{console.error(`${Vi} is disposed`)});p(this,"actionWhenEnabled",e=>{if(this.state.enabled)return e()});Object.assign(window,{[`__${xr}_DEBUG__`]:this})}load(e,n,o=!0){return Z(this,null,function*(){const s=this.data?JSON.parse(JSON.stringify(this.data)):void 0,r=yield this.formatData(e);this.hooks.emit("dataChange",r,s),this.data=r,this.linesGroup&&this.five.scene.remove(this.linesGroup);const a=this.getLinesGroup(r.routes);!a||(this.linesGroup=a,yield this.waitFiveModelLoaded(),this.five.scene.add(a),this.handleVisible(this.state.visible),this.handleEnable(this.state.enabled),n&&this.setState(n),this.five.needsRender=!0,this.hooks.emit("dataLoaded",r),console.log(`${Vi} loaded`,r))})}formatData(e){return Z(this,null,function*(){return typeof e=="object"&&e!==null&&e.version&&e.data?e.data:e})}show(e){return Z(this,null,function*(){this.setState({visible:!0},e)})}hide(e){return Z(this,null,function*(){this.setState({visible:!1},e)})}enable(e){this.setState({enabled:!0},e)}disable(e){this.setState({enabled:!1},e)}dispose(){this.setState({disposed:!0})}setState(e,n){var s;if(this.state.disposed)return this.disposedErrorLog();const o=W({},this.state);this.state=W(W({},this.state),e),e.disposed!==void 0&&e.disposed!==o.disposed&&e.disposed&&this.handleDispose(),e.visible!==void 0&&e.visible!==o.visible&&this.handleVisible(e.visible,n==null?void 0:n.userAction),e.enabled!==void 0&&e.enabled!==o.enabled&&this.handleEnable(e.enabled,n==null?void 0:n.userAction),$e(o,this.state,{deep:!0})||(this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:(s=n==null?void 0:n.userAction)!=null?s:!0}),this.five.needsRender=!0)}handleEnable(e,n=!0){this.linesGroup&&(e?(this.five.scene.add(this.linesGroup),this.actionWhenEnabled(()=>this.hooks.emit("enable",{userAction:n}))):(this.five.scene.remove(this.linesGroup),this.hooks.emit("disable",{userAction:n})))}handleVisible(e,n=!0){this.linesGroup&&(e?(this.linesGroup.visible=!0,this.actionWhenEnabled(()=>this.hooks.emit("show",{userAction:n}))):(this.linesGroup.visible=!1,this.actionWhenEnabled(()=>this.hooks.emit("hide",{userAction:n}))))}handleDispose(){this.linesGroup&&this.five.scene.add(this.linesGroup)}getLinesGroup(e){const n=e.map(this.getLine.bind(this)).filter(Qt),o=new I.Group;if(o.name=kr("route-group"),n.length!==0)return o.add(...n),o}getLine(e){var a,l,c,d;const n=new I.Group,o=e.panoIndexList.map(f=>{var u;return(u=this.five.work.observers[f])==null?void 0:u.standingPosition}).filter(Qt),s=Nh(o,{skipPanoIndexMesh:(a=e.skipPanoIndexMesh)!=null?a:!0,unitWidth:(l=e.unitWidth)!=null?l:.6,unitHeight:(c=e.unitHeight)!=null?c:.4});if(!s)return;const r=Wh({textureUrl:(d=e.arrowTextureUrl)!=null?d:this.staticPrefix+"/release/web/arrow6.b6ce0c62.png"});return s.forEach(f=>{const u=new I.Mesh(f,r);u.name=kr("route-line-mesh"),n.add(u)}),n}waitFiveModelLoaded(){return Z(this,null,function*(){return new Promise(e=>{if(this.five.model.loaded){e();return}this.five.once("modelLoaded",()=>{e()})})})}}p(Dr,"lasestVersion",Er);const Lr=(i,t)=>new Dr(i,t);function Sr(i){const t=Math.abs(Math.cos(i.latitude));return new I.Vector3(-Math.sin(i.longitude)*t,-Math.sin(i.latitude),-Math.cos(i.longitude)*t)}function Yh(i,t){const e=Sr(i),n=Sr(t);return e.angleTo(n)}const Uh=i=>Z(this,null,function*(){try{i().then(()=>{},()=>{}).catch(()=>{})}catch(t){}}),oi=Math.PI*2;function Vh(i){return i>=0&&i<oi?i:(i%oi+oi)%oi}function Jh(i){return{longitude:Vh(-Math.atan2(i.x,-i.z)),latitude:-Math.asin(i.y/1)}}function Zh(i,t,e,n){const o=-i/e,s=i;return o*n+s}function _h(i){return new Promise(t=>{setTimeout(()=>{t()},i)})}const zr="v1.0.6",Mr="CruisePlugin",si=`${Mr}@${zr}`,jr=()=>{console.error(`${si} is disposed`)},qh=()=>{console.warn(`${si} is disabled`)},Kh=()=>{console.error(`${si} is disabled`)},Ji=new Map;class Zi extends jt{constructor(e,n){super(e,n);p(this,"state",{visible:!0,enabled:!0,disposed:!1,playing:!1,speed:1,config:{speedConfig:{rotateSpeed:.001,rotateSpeedUnit:"rad/ms",moveSpeed:.002,moveSpeedUnit:"m/ms"}}});p(this,"data");p(this,"config");p(this,"privateState",{playing:!1,currentPlayQueue:[],currentPlayKeyframe:null,broke:!1,disposers:[],modeChanging:!1});p(this,"GuideLine");this.config=n,Object.assign(window,{[`__${Mr}_DEBUG__`]:this});const o=this.setFiveLinearUpdateCamera.bind(this),s=this.setFiveOriginUpdateCamera.bind(this);this.hooks.on("play",o),this.hooks.on("broke",s),this.hooks.on("end",s),this.hooks.on("pause",s),this.privateState.disposers.push(()=>{this.hooks.off("play",o),this.hooks.off("broke",s),this.hooks.off("end",s),this.hooks.off("pause",s)})}load(e,n,o){return Z(this,null,function*(){var d,f,u,h,m;if(this.state.disposed)return jr();this.privateState.fiveOriginGetProgress||(f=(d=this.five.controller)==null?void 0:d.cameraMotion)!=null&&f.getProgress||(yield this.waitFiveLoaded(),this.privateState.fiveOriginGetProgress=(h=(u=this.five.controller)==null?void 0:u.cameraMotion)==null?void 0:h.getProgress),this.clear();const s=this.data?JSON.parse(JSON.stringify(this.data)):void 0,r=yield this.formatData(e);this.data=r,this.hooks.emit("dataChange",r,s);let a=[],l;const c=this.data.keyframes.filter(g=>g.data.panoIndex!==void 0);c.filter((g,v)=>{var A;return g.data.panoIndex!==((A=c[v-1])==null?void 0:A.data.panoIndex)}).map(g=>g.data.panoIndex).forEach(g=>{var A,C;const v=(A=this.five.work.observers[g])==null?void 0:A.floorIndex;if(v!==void 0)if(l===v){const w=a.length-1;a[w]=[...(C=a[w])!=null?C:[],g]}else{l=v;const w=a.length;a[w]=[g]}}),this.GuideLine||(this.GuideLine=Lr(this.five,this.config)),(m=this.GuideLine)==null||m.load({routes:a.map(g=>({panoIndexList:g}))}),this.setState({playing:!1}),this.handleVisible(this.state.visible),this.handleEnable(this.state.enabled),this.changePlayState(this.state.playing),this.changeSpeed(this.state.speed),n&&this.setState(n,{userAction:o}),console.log(`${si} loaded`,r),this.hooks.emit("dataLoaded",r)})}play(e){this.setState({playing:!0},e)}playFrom(e){const{index:n,id:o,userAction:s}=e;this.state.playing&&this.setState({playing:!1},{userAction:s}),this.setState({playing:!0},{userAction:s,playFromIndex:n,playFromId:o})}playFromStart(e){return this.playFrom(pe(W({},e),{index:0}))}pause(e){this.setState({playing:!1},e)}show(e){return Z(this,null,function*(){this.setState({visible:!0},e)})}hide(e){return Z(this,null,function*(){this.setState({visible:!1},e)})}enable(e){this.setState({enabled:!0},e)}disable(e){this.setState({enabled:!1},e)}dispose(){this.setState({disposed:!0})}setState(e,n){var s;if(this.state.disposed)return jr();if(!this.state.enabled&&e.enabled!==!0&&e.disposed!==!0)return Kh();const o=W({},this.state);this.state=W(W({},this.state),e),e.disposed!==void 0&&e.disposed!==o.disposed&&e.disposed&&this.handleDispose(),e.visible!==void 0&&e.visible!==o.visible&&this.handleVisible(e.visible,n==null?void 0:n.userAction),e.enabled!==void 0&&e.enabled!==o.enabled&&this.handleEnable(e.enabled,n==null?void 0:n.userAction),e.playing!==void 0&&e.playing!==o.playing&&this.changePlayState(e.playing,n),e.speed!==void 0&&e.speed!==o.speed&&this.changeSpeed(e.speed,n==null?void 0:n.userAction),$e(o,this.state,{deep:!0})||this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:(s=n==null?void 0:n.userAction)!=null?s:!0})}formatData(e){return Z(this,null,function*(){this.five.work||(yield this.waitFiveLoaded());const n=this.five.work.observers,o=(()=>{const s=e;return typeof s=="object"&&s!==null&&s.version&&s.data?s.data:s})();if(o.keyframes)return{keyframesId:Fe(),keyframes:o.keyframes.map((s,r)=>{var c;const a=o.keyframes[r+1],l=(()=>!a||a.start===void 0||s.end===void 0?0:a.start-s.end)();return W({id:(c=s.uuid)!=null?c:Fe(),moveIndex:r,stay:l,index:r},s)})};if(o.panoIndexList){let s=[];const{moveEffect:r,moveToFirstPanoEffect:a}=o;return this.privateState.moveToFirstPanoEffect=a,o.panoIndexList.forEach((l,c)=>{const d=(()=>{var g,v,A,C;const f=o.panoIndexList.slice(c).find(w=>w!==l);if(f===void 0)return;const u=(g=n[l])==null?void 0:g.position,h=(v=n[f])==null?void 0:v.position;if(!h||!u||((A=n[l])==null?void 0:A.floorIndex)!==((C=n[f])==null?void 0:C.floorIndex))return;const m=new I.Vector3().subVectors(h,u);return Jh(m)})();o.moveType===void 0||o.moveType==="justMove"?s.push({moveIndex:c,stay:o.stay,data:W({effect:"Move",panoIndex:l,moveEffect:r},d!=null?d:{})}):o.moveType==="moveAndRotate"&&(s.push({moveIndex:c,stay:o.stay,data:{effect:"Move",panoIndex:l,moveEffect:r}}),d&&s.push({moveIndex:c,stay:o.stay,data:W({effect:"Rotate",panoIndex:l},d)}))}),{keyframesId:Fe(),keyframes:s.map((l,c)=>W({id:Fe(),index:c},l))}}else throw new Error("format error: data no keyframes or no panoIndexList")})}handleEnable(e,n=!0){var o,s;e?((o=this.GuideLine)==null||o.enable(),this.hooks.emit("enable",{userAction:n})):((s=this.GuideLine)==null||s.disable(),this.changePlayState(!1,{userAction:n}),this.hooks.emit("disable",{userAction:n})),this.state.enabled=e}handleVisible(e,n=!0){var o,s;e?((o=this.GuideLine)==null||o.show(),this.actionIfStateIsEnabled(()=>this.hooks.emit("show",{userAction:n}))):((s=this.GuideLine)==null||s.hide(),this.actionIfStateIsEnabled(()=>this.hooks.emit("hide",{userAction:n}))),this.state.visible=e}changePlayState(e,n){this.actionIfStateIsEnabled(()=>{var o;return this.hooks.emit("playStateChange",e?"playing":"pause",{userAction:(o=n==null?void 0:n.userAction)!=null?o:!0})}),e?this.handlePlay(n):this.handlePause(n),this.state.playing=e}handlePlay(e){return Z(this,null,function*(){var h;const{data:n,state:o,privateState:s,hooks:r}=this;if(s.playing||!(n!=null&&n.keyframes)||(n==null?void 0:n.keyframes.length)===0)return;const a=Fe();s.playId=a,s.playing=!0,s.broke=!1;const l=n.keyframes,c=this.getPauseData();(e==null?void 0:e.notEmitEvent)!==!0&&r.emit("play",{userAction:(h=e==null?void 0:e.userAction)!=null?h:!0});let d=!1;const u=yield(()=>Z(this,null,function*(){var m,g;if((e==null?void 0:e.playFromIndex)!==void 0)return e.playFromIndex;if((e==null?void 0:e.playFromId)!==void 0)return(m=this.data)==null?void 0:m.keyframes.findIndex(v=>v.id===e.playFromId);if(c!=null&&c.keyframeId){const v=(g=this.data)==null?void 0:g.keyframes.find(A=>A.id===c.keyframeId);if(c!=null&&c.fiveState&&(yield this.move(c.fiveState,{moveEffect:s.moveToFirstPanoEffect})),v){if(v.data.effect==="Move")return v.index;if(v.data.effect==="Rotate"){const A=c.duration!==void 0?c.duration*(1-c.playedProgress):void 0;return yield this.playKeyframe(v,{duration:A}),d=!0,v.index+1}}}}))();this.clearPauseData();for(const m of l){if(s.broke||!o.playing||!s.playing||a!==s.playId)return;if(!(u!==void 0&&m.index<u))try{r.emit("playIndexChange",m.index,m),yield this.playKeyframe(m,{moveEffect:d===!1?s.moveToFirstPanoEffect:void 0,duration:800}),m.stay&&(yield _h(m.stay)),d===!1&&(d=!0)}catch(g){return Promise.resolve("broke")}}o.playing&&a===s.playId&&(this.setState({playing:!1},{userAction:!1}),r.emit("end"),this.clearPauseData())})}handlePause(e){var r;const{state:n,privateState:o,hooks:s}=this;n.playing=!1,o.playing!==!1&&(o.playing=!1,this.setPauseData(),o.broke||this.forceInteruptUpdateCamera(),(e==null?void 0:e.notEmitEvent)!==!0&&s.emit("pause",{userAction:(r=e==null?void 0:e.userAction)!=null?r:!0}))}playKeyframe(e,n){return Z(this,null,function*(){var s;const{privateState:o}=this;return((s=this.privateState.currentPlayKeyframe)==null?void 0:s.keyframe.id)!==e.id&&(this.privateState.currentPlayKeyframe={keyframe:e}),o.currentPlayQueue.push(this.getPlayPromise(e,n)),this.actionPromiseQueue()})}addInterruptListener(e){const n=()=>{this.privateState.modeChanging||e()},o=e;return this.five.once("gesture",o),this.five.once("wantsChangeMode",n),()=>{this.five.off("gesture",o),this.five.once("wantsChangeMode",n)}}getPlayPromise(e,n){return Z(this,null,function*(){var s;const o=e.data;if((s=n==null?void 0:n.duration)!=null||e.start!==void 0&&e.end!==void 0&&e.end-e.start,!!o)return new Promise((r,a)=>{let l=!1;this.addInterruptListener(()=>{if(!l)return this.hooks.emit("broke"),this.privateState.broke=!0,this.setState({playing:!1}),l=!0,a(new Error("play is interupted"))});try{if(l)return;const c=()=>{r(),l=!0};switch(o.effect){case"Move":this.move(o,n).then(c);break;case"Rotate":this.rotate(o,n).then(c);break;default:this.rotate(o,n).then(c)}}catch(c){}})})}actionPromiseQueue(){return Z(this,null,function*(){const{privateState:e}=this;return new Promise((n,o)=>{if(e.currentPlayQueue.length===0){n();return}const s=e.currentPlayQueue.shift();if(!s){n();return}s.then(n,o)}).then(()=>e.currentPlayQueue.length===0?Promise.resolve():this.actionPromiseQueue())})}move(e,n){return Z(this,null,function*(){if(e.mode&&e.mode!==this.five.currentMode)yield this.changeMode(e);else if(e.panoIndex!==this.five.panoIndex)yield this.changePano(e,n);else return Promise.resolve()})}rotate(e,n){return Z(this,null,function*(){if(e.mode&&e.mode!==this.five.currentMode)yield this.changeMode({mode:e.mode,panoIndex:e.panoIndex});else if(e.panoIndex&&e.panoIndex!==this.five.panoIndex)return yield this.changePano(e,n);yield this.updateCamera(e,n==null?void 0:n.duration)})}updateCamera(e,n=800){return Z(this,null,function*(){const{five:o,privateState:s,state:r}=this;let a=n;const l=(()=>{var u,h;const d=(u=r.config)==null?void 0:u.speedConfig,f=(h=e.rotateSpeed)!=null?h:d==null?void 0:d.rotateSpeed;if((d==null?void 0:d.rotateSpeedUnit)===void 0)return f;if(f!==void 0)return d.rotateSpeedUnit==="rad/ms"?f:f/1e3})();if(l){const d=this.five.getCurrentState();a=Yh(d,e)/l}s.currentPlayKeyframe&&(s.currentPlayKeyframe.originDuration=a);const c=this.getSpeededDuration(a);return new Promise(d=>{Uh(()=>o.updateCamera(e,c)),setTimeout(()=>d(),c)})})}changePano(e,n){return Z(this,null,function*(){var f;const{five:o,privateState:s,state:r}=this;if(typeof e.panoIndex!="number"||e.panoIndex===o.panoIndex)return;o.getCurrentState().mode;const a=o.getCurrentState().mode!=="Panorama";a&&(this.privateState.modeChanging=!0);let l=(f=n==null?void 0:n.duration)!=null?f:800;const c=(()=>{var m,g;const u=(m=r.config)==null?void 0:m.speedConfig,h=(g=e.moveSpeed)!=null?g:u==null?void 0:u.moveSpeed;if((u==null?void 0:u.moveSpeedUnit)===void 0)return h;if(h!==void 0)return u.moveSpeedUnit==="m/ms"?h:h/1e3})();if(c&&typeof o.panoIndex=="number"&&typeof e.panoIndex=="number"){const u=o.work.observers[o.panoIndex].position,h=o.work.observers[e.panoIndex].position;l=u.distanceTo(h)/c}s.currentPlayKeyframe&&(s.currentPlayKeyframe.originDuration=l);const d=this.getSpeededDuration(l);yield new Promise(u=>{var h,m,g;o.moveToPano(e.panoIndex,{latitude:e.latitude,longitude:e.longitude,fov:e.fov,duration:d,effect:(g=(m=n==null?void 0:n.moveEffect)!=null?m:(h=this.state.config)==null?void 0:h.moveEffect)!=null?g:e.moveEffect,moveCancelCallback:()=>u(),moveEndCallback:()=>u()}),a&&o.once("panoArrived",()=>u())}),a&&(this.privateState.modeChanging=!1)})}changeSpeed(e,n=!0){const{state:o,privateState:s,hooks:r}=this,{currentPlayKeyframe:a}=s;if(r.emit("speedChange",e,{userAction:n}),o.playing&&a)try{const l=a.originDuration!==void 0?a.originDuration*(1-this.getProgress()):void 0,c=this.playKeyframe(a.keyframe,{duration:l});s.currentPlayQueue.push(c)}catch(l){}}getSpeededDuration(e){return e/this.state.speed}getProgress(){return this.five.controller.cameraMotion.progress}changeMode(e,n){return Z(this,null,function*(){e.mode&&e.mode!==this.five.currentMode&&(this.privateState.modeChanging=!0,console.log("this.privateState.modeChanging",this.privateState.modeChanging),yield this.five.changeMode(e.mode,e,n),this.privateState.modeChanging=!1)})}forceInteruptUpdateCamera(){this.five.updateCamera({},0)}getPauseData(){var e,n;if((e=this.data)!=null&&e.keyframesId)return Ji.get((n=this.data)==null?void 0:n.keyframesId)}setPauseData(){var e,n,o,s;if((e=this.data)!=null&&e.keyframesId)return Ji.set((n=this.data)==null?void 0:n.keyframesId,{keyframeId:(o=this.privateState.currentPlayKeyframe)==null?void 0:o.keyframe.id,fiveState:this.five.getCurrentState(),duration:(s=this.privateState.currentPlayKeyframe)==null?void 0:s.originDuration,playedProgress:this.getProgress()})}clearPauseData(){var e,n;if((e=this.data)!=null&&e.keyframesId)return Ji.delete((n=this.data)==null?void 0:n.keyframesId)}clear(){this.clearPauseData(),this.privateState.currentPlayKeyframe=null}handleDispose(){var e,n;this.setState({playing:!1}),this.clearPauseData(),this.clear(),(e=this.GuideLine)==null||e.dispose(),this.GuideLine=void 0,(n=this.privateState.disposers)==null||n.forEach(o=>o==null?void 0:o())}actionIfStateIsEnabled(e,n){if(this.state.enabled)return e();n!=null&&n.warnLog&&qh()}waitFiveLoaded(){return Z(this,null,function*(){return new Promise(e=>{if(this.five.work){e();return}this.five.once("loaded",()=>{e()})})})}setFiveLinearUpdateCamera(){!this.privateState.fiveOriginGetProgress||(this.five.controller.cameraMotion.getProgress=e=>{const n=this.five.controller.cameraMotion,o=e-n.startTime;return o<0?0:o>=n.duration?1:1-Zh(1,n.startVelocity,n.duration,o)})}setFiveOriginUpdateCamera(){!this.privateState.fiveOriginGetProgress||(this.five.controller.cameraMotion.getProgress=this.privateState.fiveOriginGetProgress)}}p(Zi,"PluginVersion",zr);const $h=i=>new Zi(i);function em(i,t){t.forEach(e=>{const n=new I.SphereGeometry(.02,16,16),o=[],s=[new I.MeshBasicMaterial({color:16776960}),new I.MeshBasicMaterial({color:16711935}),new I.MeshBasicMaterial({color:16711680}),new I.MeshBasicMaterial({color:65535})];if(e.position.length===4)e.position.forEach((r,a)=>{const l=s[a],c=new I.Mesh(n,l);c.position.copy(rt(r)),o.push(c)});else{const r=s[0],a=new I.Mesh(n,r);a.position.copy(rt(e.position)),o.push(a)}o.forEach(r=>{r.material.depthTest=!1,i.scene.add(r)})})}const Se=i=>i;function Br(i){if(i.length<3)return;const t=i.map(cn),e=t[1].clone().sub(t[0]),n=t[2].clone().sub(t[1]);return e.cross(n)}function ri(i){if(Array.isArray(i)&&i.length===4){const t=i.map(cn);return Co(t[0],t[2])}else return cn(i)}function ai(i,t){if(i===void 0)return;const{min:e,max:n}=t!=null?t:{};if(!(e===void 0&&n===void 0))return!(typeof n=="number"&&n<i||typeof e=="number"&&e>i)}function tm(i,t){i.model.loaded?t():i.once("modelLoaded",()=>t())}function nm(i,t,e){const o=new I.Plane().setFromNormalAndCoplanarPoint(e,t),s=t.clone().sub(i).cross(new I.Vector3(0,1,0)).setLength(.01),r=new I.Vector3(0,.01,0);return[t.clone().sub(s).sub(r),t.clone().add(s).sub(r),t.clone().add(s).add(r),t.clone().sub(s).add(r)].map(l=>o.projectPoint(l,new I.Vector3))}const Tr=(i,t=1e3/60)=>{let e=null;const n=i;return(...s)=>{e&&clearTimeout(e),e=setTimeout(()=>{n==null||n(...s),e&&clearTimeout(e),e=null},t)}};function im(i,t=200){let e;return function(...n){e||(i.apply(this,n),e=setTimeout(function(){e=null},t))}}function om(i,t){const[e,n]=t;if(e>=n||n<=1||e<=1)return-1;const o={},s=r=>(o[r]||(o[r]=i(r)),o[r]);for(let r=e;r<n;r++){const a=s(r),l=s(r-1);if(a<l)return r}return-1}function Qr(i,t){if(!t||typeof ResizeObserver=="undefined"||!ResizeObserver)return{observe:()=>window.addEventListener("resize",i),unobserve:()=>window.removeEventListener("resize",i)};{const e=new ResizeObserver(i);return{observe:()=>e.observe(t),unobserve:()=>e.unobserve(t)}}}var Je=(i=>(i.Two="2D",i.Three="3D",i))(Je||{}),We=(i=>(i.PointTag="PointTag",i.PlaneTag="PlaneTag",i))(We||{}),Xe=(i=>(i.Audio="Audio",i.Text="Text",i.ImageText="ImageText",i.Link="Link",i.Marketing="Marketing",i.MediaPlane="MediaPlane",i.Custom="Custom",i))(Xe||{}),li=(i=>(i.VrLink="vr",i.NormalLink="normal",i))(li||{});function sm(i){le(i,"svelte-1omzoh4",".straight-line.svelte-1omzoh4{display:block;width:100%;height:100%;overflow:visible}")}function Or(i){let t,e,n,o;return{c(){t=be("path"),b(t,"fill","none"),b(t,"stroke","url(#"+i[4]+")"),b(t,"stroke-width","1"),b(t,"d","M0 0.5 L 148 0.5")},m(s,r){B(s,t,r),o=!0},p(s,r){i=s},i(s){o||(s&&De(()=>{n&&n.end(1),e=zt(t,Nn,{duration:i[1],delay:i[0]}),e.start()}),o=!0)},o(s){e&&e.invalidate(),s&&(n=Ut(t,Nn,{duration:i[1],delay:i[2]})),o=!1},d(s){s&&z(t),s&&n&&n.end()}}}function rm(i){let t,e,n,o,s,r=i[3]&&Or(i);return{c(){t=be("svg"),e=be("defs"),n=be("linearGradient"),o=be("stop"),s=be("stop"),r&&r.c(),b(o,"offset","25%"),b(o,"stop-color","white"),b(o,"stop-opacity","1"),b(s,"offset","100%"),b(s,"stop-color","white"),b(s,"stop-opacity","0.5"),b(n,"id",i[4]),b(n,"gradientUnits","userSpaceOnUse"),b(t,"class","straight-line svelte-1omzoh4"),b(t,"viewBox","0 0 148 1"),b(t,"preserveAspectRatio","none")},m(a,l){B(a,t,l),O(t,e),O(e,n),O(n,o),O(n,s),r&&r.m(t,null)},p(a,[l]){a[3]?r?(r.p(a,l),l&8&&k(r,1)):(r=Or(a),r.c(),k(r,1),r.m(t,null)):r&&(fe(),M(r,1,1,()=>{r=null}),he())},i(a){k(r)},o(a){M(r)},d(a){a&&z(t),r&&r.d()}}}function am(i,t,e){let{inDelay:n=0}=t,{duration:o=0}=t,{outDelay:s=0}=t,{unfolded:r}=t;const a=Fe();return i.$$set=l=>{"inDelay"in l&&e(0,n=l.inDelay),"duration"in l&&e(1,o=l.duration),"outDelay"in l&&e(2,s=l.outDelay),"unfolded"in l&&e(3,r=l.unfolded)},[n,o,s,r,a]}class Rr extends se{constructor(t){super(),oe(this,t,am,rm,ie,{inDelay:0,duration:1,outDelay:2,unfolded:3},sm)}}function lm(i){le(i,"svelte-faoauy",".shadow.svelte-faoauy{position:absolute}")}function Fr(i){let t,e,n,o,s;return{c(){t=Q("div"),b(t,"class","shadow svelte-faoauy"),b(t,"style",e=`
|
|
531
531
|
left:${Ye(i[5])};
|
|
532
532
|
bottom:${Ye(i[6])};
|
|
533
533
|
box-shadow: 0 0 ${Ye(i[10])} ${Ye(i[11])} rgba(0, 0, 0, ${i[12]});
|
|
534
534
|
${i[8]?"transform: translateX(-50%); left: 50%":""}
|
|
535
535
|
${i[9]?"transform: translateX(-50%); top: 50%":""}
|
|
536
536
|
${i[7]?"transform: translate(-50%, -50%); left: 50%; top: 50%;":""}
|
|
537
|
-
`),F(t,"width",Ye(i[3])
|
|
537
|
+
`),F(t,"width",Ye(i[3])),F(t,"height",Ye(i[4])),F(t,"z-index",i[13])},m(r,a){B(r,t,a),s=!0},p(r,a){i=r,(!s||a&8160&&e!==(e=`
|
|
538
538
|
left:${Ye(i[5])};
|
|
539
539
|
bottom:${Ye(i[6])};
|
|
540
540
|
box-shadow: 0 0 ${Ye(i[10])} ${Ye(i[11])} rgba(0, 0, 0, ${i[12]});
|
|
541
541
|
${i[8]?"transform: translateX(-50%); left: 50%":""}
|
|
542
542
|
${i[9]?"transform: translateX(-50%); top: 50%":""}
|
|
543
543
|
${i[7]?"transform: translate(-50%, -50%); left: 50%; top: 50%;":""}
|
|
544
|
-
`))&&b(t,"style",e),a&8&&F(t,"width",Ye(i[3]),!1),a&16&&F(t,"height",Ye(i[4]),!1),a&8192&&F(t,"z-index",i[13],!1)},i(r){s||(r&&De(()=>{o&&o.end(1),n=zt(t,Mt,{duration:i[0]}),n.start()}),s=!0)},o(r){n&&n.invalidate(),r&&(o=Ut(t,Mt,{duration:i[1]})),s=!1},d(r){r&&z(t),r&&o&&o.end()}}}function cm(i){let t,e=i[2]&&Fr(i);return{c(){e&&e.c(),t=Ae()},m(n,o){e&&e.m(n,o),B(n,t,o)},p(n,[o]){n[2]?e?(e.p(n,o),o&4&&k(e,1)):(e=Fr(n),e.c(),k(e,1),e.m(t.parentNode,t)):e&&(fe(),M(e,1,1,()=>{e=null}),he())},i(n){k(e)},o(n){M(e)},d(n){e&&e.d(n),n&&z(t)}}}function Ye(i){return typeof i=="number"?i/16+"rem":i}function dm(i,t,e){let{inDelay:n=1e3}=t,{outDelay:o=1e3}=t,{visible:s=!0}=t,{width:r=0}=t,{height:a=0}=t,{left:l=0}=t,{bottom:c=0}=t,{center:d=!1}=t,{horizontalCenter:f=!1}=t,{verticalCenter:u=!1}=t,{blurRadius:h}=t,{spreadRadius:m}=t,{opacity:g=.15}=t,{zIndex:v=void 0}=t;return i.$$set=A=>{"inDelay"in A&&e(0,n=A.inDelay),"outDelay"in A&&e(1,o=A.outDelay),"visible"in A&&e(2,s=A.visible),"width"in A&&e(3,r=A.width),"height"in A&&e(4,a=A.height),"left"in A&&e(5,l=A.left),"bottom"in A&&e(6,c=A.bottom),"center"in A&&e(7,d=A.center),"horizontalCenter"in A&&e(8,f=A.horizontalCenter),"verticalCenter"in A&&e(9,u=A.verticalCenter),"blurRadius"in A&&e(10,h=A.blurRadius),"spreadRadius"in A&&e(11,m=A.spreadRadius),"opacity"in A&&e(12,g=A.opacity),"zIndex"in A&&e(13,v=A.zIndex)},[n,o,s,r,a,l,c,d,f,u,h,m,g,v]}class Ze extends se{constructor(t){super(),oe(this,t,dm,cm,ie,{inDelay:0,outDelay:1,visible:2,width:3,height:4,left:5,bottom:6,center:7,horizontalCenter:8,verticalCenter:9,blurRadius:10,spreadRadius:11,opacity:12,zIndex:13},lm)}}function um(){return Math.random().toString(36).slice(-6)}const Hr=um();function fm(i){le(i,"svelte-1b2n9wi",".text-char.svelte-1b2n9wi{display:inline-block;text-shadow:0.125rem 0rem 0.5rem rgba(0, 0, 0, 0.15)}")}function Gr(i,t,e){const n=i.slice();return n[10]=t[e],n[11]=t,n[12]=e,n}function Nr(i){let t,e=i[10]+"",n,o=i[12];const s=()=>i[6](t,o),r=()=>i[6](null,o);return{c(){t=Q("span"),n=Le(e),b(t,"class","text-char svelte-1b2n9wi")},m(a,l){B(a,t,l),R(t,n),s()},p(a,l){i=a,l&2&&e!==(e=i[10]+"")&&je(n,e),o!==i[12]&&(r(),o=i[12],s())},d(a){a&&z(t),r()}}}function hm(i){let t,e=i[1],n=[];for(let o=0;o<e.length;o+=1)n[o]=Nr(Gr(i,e,o));return{c(){for(let o=0;o<n.length;o+=1)n[o].c();t=Ae()},m(o,s){for(let r=0;r<n.length;r+=1)n[r].m(o,s);B(o,t,s)},p(o,[s]){if(s&3){e=o[1];let r;for(r=0;r<e.length;r+=1){const a=Gr(o,e,r);n[r]?n[r].p(a,s):(n[r]=Nr(a),n[r].c(),n[r].m(t.parentNode,t))}for(;r<n.length;r+=1)n[r].d(1);n.length=e.length}},i:ne,o:ne,d(o){Ke(n,o),o&&z(t)}}}function mm(i,t,e){let n,{inDelay:o=0}=t,{outDelay:s=0}=t,{content:r}=t,{unfolded:a}=t,l,c=[],d;function f(h){clearTimeout(l),l=setTimeout(function(){!d||(h&&d.reversed||!h&&!d.reversed)&&(d.reverse(),d.play())},h?o:s)}Ue(function(){const h=(()=>{const m=om(g=>c[g].getBoundingClientRect().x,[Math.min(c.length-1,10),Math.min(c.length-1,30)]);if(m>0)return m})();d=Ao.default({targets:c.filter(Qt).slice(0,h),autoplay:!1,duration:400,scale:[.7,1],rotate:[20,0],opacity:[0,1],translateX:[4,0],translateY:[10,0],delay:Ao.default.stagger(50),easing:"easeInOutCubic"}),a&&d.seek(d.duration)});function u(h,m){Be[h?"unshift":"push"](()=>{c[m]=h,e(0,c)})}return i.$$set=h=>{"inDelay"in h&&e(2,o=h.inDelay),"outDelay"in h&&e(3,s=h.outDelay),"content"in h&&e(4,r=h.content),"unfolded"in h&&e(5,a=h.unfolded)},i.$$.update=()=>{i.$$.dirty&16&&e(1,n=(()=>{const h=[],m=new RegExp(new RegExp("\\p{Regional_Indicator}\\p{Regional_Indicator}|\\p{Emoji}(\\p{Emoji_Modifier}+|\\uFE0F\\u20E3?)?(\\u200D\\p{Emoji}(\\p{Emoji_Modifier}+|\\uFE0F\\u20E3?)?)+|\\p{Emoji_Presentation}(\\p{Emoji_Modifier}+|\\uFE0F\\u20E3?)?|\\p{Emoji}(\\p{Emoji_Modifier}+|\\uFE0F\\u20E3?)","gu")),g=`__EMOJI_SPLIT_${Hr}__`,v=`__EMOJI_${Hr}__`;return r.slice().replace(m,A=>`${g}${v}${A}${g}`).split(g).forEach(A=>A.startsWith(v)?h.push(A.slice(v.length)):h.push(...A.split(""))),h.filter(Boolean)})()),i.$$.dirty&32&&f(a)},[c,n,o,s,r,a,u]}class Wr extends se{constructor(t){super(),oe(this,t,mm,hm,ie,{inDelay:2,outDelay:3,content:4,unfolded:5},fm)}}const pm="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAKqADAAQAAAABAAAAKgAAAADUGqULAAAB0ElEQVRYCe2WSUoEQRBFLVHEiVZU1I03cKW38SSewRt4A5fiTty5cQIFR9pZQWkcU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XfSM9jeSW8rq6u8vr163+TV8JfyQx3e9LZuHHjoQsXLvSMdKckYt9KL53tu/sBHXeeeJMk0rdJ5P2kQXkvqXXOnDnlEr8pTyUPrVmz5qvOzs7/lQTCkU4y1LtGkjIfmIlMnJ+K/MojfzIrl8B3kpU1osxJSYtTAL8wKf4EYJQFk+JeQMlvE3UcLRmTkkUANm1ZOZmE24dqGU5gOfCyZkyGWQT+IykW8zmSz0IpiLNN8t5iTmdTkgGTrInI7JcfULaH10Qnh/4IMVjAxNk6jxwajuUb8lqOZRT3S/lx06RY1g8C4akfiEJAOZdFKzsq/nNjIssdufjbhQAEAUodOGDWp4m8S0oHEhb+YexGkD4EBUpdVMrfl/E/RhNJnsjF/ls0r980YRQDlAqBylIqylcCzf4lHecB5veigSfmYoBycaxN2SHgT8e7pWKZwCzqzZpigUr9DlRuoIxXn8pIZJgHtkwpa8togHIiw587LeNx9mc2ZwIK5DOlXJaMFqhWwoMp/Ax+1W+ToOXTHGKNrDMLLo38LmKsQKmbdSrWil+N82UJaS40YTuJv/RdtAdpzet+aJDzvMpQV71oo2gYX5RXG2HnYZXtouzNRzXE3R0KE6jWjZU2iaZ9u8pqpU3UfvwrYSgSBVDtGDurBlHn/zj0QMIh7qlDNOfmcBj9ihKo9o+l1euiWGxSE5eun3na6jxQk3joEgdQ7TR+FWutE43lhQpph3sQvISAVRa9ppRzipY4gZqdw8/WigIWDWt1gD8EIsqSLlT/KPUVlKSAujs2XTLYeRHiIlA2DVi1qkRtK8PSULaEDF+Ue7ashwkTlf8DQc/cITdx9+UAAAAASUVORK5CYII=";function gm(i){le(i,"svelte-1ogmlqq",".arrow.svelte-1ogmlqq{width:100%;height:100%;background-size:100%;transition:transform 400ms ease-in-out;cursor:pointer;pointer-events:auto}.arrow-wrapper.svelte-1ogmlqq{position:relative;width:100%;height:100%}.arrow.left.svelte-1ogmlqq{transform:rotate(0deg)}.arrow.right.svelte-1ogmlqq{transform:rotate(-180deg)}.arrow.top.svelte-1ogmlqq{transform:rotate(90deg)}.arrow.bottom.svelte-1ogmlqq{transform:rotate(-90deg)}")}function Ur(i){let t,e,n,o,s,r,a,l,c,d;return e=new Ze({props:{center:!0,blurRadius:9,spreadRadius:3}}),{c(){t=Q("div"),ee(e.$$.fragment),n=_(),o=Q("div"),b(o,"class",s="arrow "+i[0]+" svelte-1ogmlqq"),F(o,"background-image","url("+pm+")"),b(t,"class","arrow-wrapper svelte-1ogmlqq")},m(f,u){B(f,t,u),K(e,t,null),R(t,n),R(t,o),l=!0,c||(d=xe(o,"click",i[5]),c=!0)},p(f,u){i=f,(!l||u&1&&s!==(s="arrow "+i[0]+" svelte-1ogmlqq"))&&b(o,"class",s)},i(f){l||(k(e.$$.fragment,f),f&&De(()=>{a&&a.end(1),r=zt(o,Mt,{duration:i[2],delay:i[3],easing:Vt}),r.start()}),l=!0)},o(f){M(e.$$.fragment,f),r&&r.invalidate(),f&&(a=Ut(o,Mt,{duration:i[2],delay:i[4],easing:Vt})),l=!1},d(f){f&&z(t),$(e),f&&a&&a.end(),c=!1,d()}}}function Am(i){let t,e,n=i[1]&&Ur(i);return{c(){n&&n.c(),t=Ae()},m(o,s){n&&n.m(o,s),B(o,t,s),e=!0},p(o,[s]){o[1]?n?(n.p(o,s),s&2&&k(n,1)):(n=Ur(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(fe(),M(n,1,1,()=>{n=null}),he())},i(o){e||(k(n),e=!0)},o(o){M(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function vm(i,t,e){let{direction:n="right"}=t,{visible:o=!0}=t,{duration:s=0}=t,{inDelay:r=0}=t,{outDelay:a=0}=t;function l(c){Ll.call(this,i,c)}return i.$$set=c=>{"direction"in c&&e(0,n=c.direction),"visible"in c&&e(1,o=c.visible),"duration"in c&&e(2,s=c.duration),"inDelay"in c&&e(3,r=c.inDelay),"outDelay"in c&&e(4,a=c.outDelay)},[n,o,s,r,a,l]}class bm extends se{constructor(t){super(),oe(this,t,vm,Am,ie,{direction:0,visible:1,duration:2,inDelay:3,outDelay:4},gm)}}function ym(i,t,e=20,n=5){return new Promise((o,s)=>{let r=0;const a=setInterval(()=>{const l=i();t(l)?(clearInterval(a),o(l)):r>=n&&(clearInterval(a),s(l)),r++},e)})}function wm(i){le(i,"svelte-1fuzm7v",".text.svelte-1fuzm7v{pointer-events:auto;box-sizing:border-box;display:inline-block;max-width:7.5rem;transition:transform 400ms ease-in-out;font-size:0.75rem;line-height:1.125rem;white-space:initial;cursor:pointer}.arrow.svelte-1fuzm7v{pointer-events:auto;display:inline-block;vertical-align:top;width:0.875rem;height:0.875rem;margin-left:0.125rem;margin-top:0.125rem}")}function Vr(i,t,e){const n=i.slice();return n[11]=t[e].id,n[12]=t[e].content,n}function Jr(i,t){let e,n,o;return n=new Wr({props:{unfolded:t[0],content:t[12],inDelay:500,outDelay:t[5]}}),{key:i,first:null,c(){e=Q("div"),ee(n.$$.fragment),b(e,"class","text svelte-1fuzm7v"),F(e,"transform",t[7],!1),this.first=e},m(s,r){B(s,e,r),K(n,e,null),t[10](e),o=!0},p(s,r){t=s;const a={};r&1&&(a.unfolded=t[0]),r&2&&(a.content=t[12]),r&32&&(a.outDelay=t[5]),n.$set(a),r&128&&F(e,"transform",t[7],!1)},i(s){o||(k(n.$$.fragment,s),o=!0)},o(s){M(n.$$.fragment,s),o=!1},d(s){s&&z(e),$(n),t[10](null)}}}function Zr(i){let t,e,n;return e=new bm({props:{direction:i[6],visible:i[0],inDelay:600,duration:1e3}}),{c(){t=Q("div"),ee(e.$$.fragment),b(t,"class","arrow svelte-1fuzm7v")},m(o,s){B(o,t,s),K(e,t,null),n=!0},p(o,s){const r={};s&64&&(r.direction=o[6]),s&1&&(r.visible=o[0]),e.$set(r)},i(o){n||(k(e.$$.fragment,o),n=!0)},o(o){M(e.$$.fragment,o),n=!1},d(o){o&&z(t),$(e)}}}function Cm(i){let t=[],e=new Map,n,o,s,r=i[1];const a=c=>c[11];for(let c=0;c<r.length;c+=1){let d=Vr(i,r,c),f=a(d);e.set(f,t[c]=Jr(f,d))}let l=i[3]<i[4]&&Zr(i);return{c(){for(let c=0;c<t.length;c+=1)t[c].c();n=_(),l&&l.c(),o=Ae()},m(c,d){for(let f=0;f<t.length;f+=1)t[f].m(c,d);B(c,n,d),l&&l.m(c,d),B(c,o,d),s=!0},p(c,[d]){d&167&&(r=c[1],fe(),t=Ve(t,d,a,1,c,r,e,n.parentNode,lt,Jr,n,Vr),he()),c[3]<c[4]?l?(l.p(c,d),d&24&&k(l,1)):(l=Zr(c),l.c(),k(l,1),l.m(o.parentNode,o)):l&&(fe(),M(l,1,1,()=>{l=null}),he())},i(c){if(!s){for(let d=0;d<r.length;d+=1)k(t[d]);k(l),s=!0}},o(c){for(let d=0;d<t.length;d+=1)M(t[d]);M(l),s=!1},d(c){for(let d=0;d<t.length;d+=1)t[d].d(c);c&&z(n),l&&l.d(c),c&&z(o)}}}function Pm(i,t,e){let n,o,s,{visible:r=!1}=t,{textUnfolded:a=!1}=t,{textItems:l}=t,c,d=0,f=0,u=0;function h(m){Be[m?"unshift":"push"](()=>{c=m,e(2,c)})}return i.$$set=m=>{"visible"in m&&e(0,r=m.visible),"textUnfolded"in m&&e(8,a=m.textUnfolded),"textItems"in m&&e(1,l=m.textItems)},i.$$.update=()=>{if(i.$$.dirty&5&&c&&r){const{lineHeight:m}=getComputedStyle(c);e(4,u=c.offsetHeight),ym(()=>c==null?void 0:c.offsetHeight,Boolean).then(()=>{e(4,u=c.offsetHeight)}),e(3,f=Number(m.replace("px","")))}i.$$.dirty&280&&e(9,d=a?f-u:0),i.$$.dirty&512&&e(7,n=`translateY(${d}px)`),i.$$.dirty&256&&e(6,o=a?"left":"right"),i.$$.dirty&256&&e(5,s=a?450:0)},[r,l,c,f,u,s,o,n,a,d,h]}class _r extends se{constructor(t){super(),oe(this,t,Pm,Cm,ie,{visible:0,textUnfolded:8,textItems:1},wm)}}function Im(i){le(i,"svelte-18yy5x8",".line.svelte-18yy5x8{position:absolute;top:0;left:0;width:10.125rem;height:0.0625rem;transform:translate3d(0, -50%, 0.625rem)}.content.svelte-18yy5x8{width:-moz-max-content;width:max-content;height:3.375rem;padding:2.25rem 0.25rem 0 1rem;position:absolute;left:0;bottom:0;overflow:hidden;box-sizing:border-box;font-size:0;pointer-events:none;white-space:nowrap;font-weight:600}")}function qr(i){var u,h;let t,e,n,o,s,r,a,l,c,d,f;return t=new Ze({props:{visible:i[2],left:i[3]/2+"px",bottom:12,width:2,blurRadius:120,spreadRadius:60}}),o=new Rr({props:{unfolded:i[2],duration:1e3,outDelay:i[5]+40*Math.min((h=(u=i[4][0])==null?void 0:u.content.length)!=null?h:10,15)}}),a=new _r({props:{visible:i[2],textUnfolded:i[1],textItems:i[4]}}),{c(){ee(t.$$.fragment),e=_(),n=Q("div"),ee(o.$$.fragment),s=_(),r=Q("div"),ee(a.$$.fragment),b(n,"class","line svelte-18yy5x8"),F(n,"width",i[3]+"px",!1),b(r,"class","content svelte-18yy5x8"),De(()=>i[8].call(r))},m(m,g){K(t,m,g),B(m,e,g),B(m,n,g),K(o,n,null),B(m,s,g),B(m,r,g),K(a,r,null),l=ft(r,i[8].bind(r)),c=!0,d||(f=xe(r,"click",i[6]),d=!0)},p(m,g){var w,E;const v={};g&4&&(v.visible=m[2]),g&8&&(v.left=m[3]/2+"px"),t.$set(v);const A={};g&4&&(A.unfolded=m[2]),g&48&&(A.outDelay=m[5]+40*Math.min((E=(w=m[4][0])==null?void 0:w.content.length)!=null?E:10,15)),o.$set(A),g&8&&F(n,"width",m[3]+"px",!1);const C={};g&4&&(C.visible=m[2]),g&2&&(C.textUnfolded=m[1]),g&16&&(C.textItems=m[4]),a.$set(C)},i(m){c||(k(t.$$.fragment,m),k(o.$$.fragment,m),k(a.$$.fragment,m),c=!0)},o(m){M(t.$$.fragment,m),M(o.$$.fragment,m),M(a.$$.fragment,m),c=!1},d(m){$(t,m),m&&z(e),m&&z(n),$(o),m&&z(s),m&&z(r),$(a),l(),d=!1,f()}}}function Em(i){let t,e,n=i[0].state&&qr(i);return{c(){n&&n.c(),t=Ae()},m(o,s){n&&n.m(o,s),B(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&k(n,1)):(n=qr(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(fe(),M(n,1,1,()=>{n=null}),he())},i(o){e||(k(n),e=!0)},o(o){M(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function xm(i,t,e){let n,o,s,{tag:r}=t,a,l=!1,c=[];function d(){e(1,l=!l)}function f(){a=this.clientWidth,e(3,a)}return i.$$set=u=>{"tag"in u&&e(0,r=u.tag)},i.$$.update=()=>{var u;i.$$.dirty&1&&e(2,n=!!((u=r.state)!=null&&u.unfolded)),i.$$.dirty&1&&e(7,o=r.data.text),i.$$.dirty&128&&e(4,c=[{id:Fe(),content:o}]),i.$$.dirty&4&&(n||setTimeout(()=>{e(1,l=!1)},20)),i.$$.dirty&2&&e(5,s=l?450:0)},[r,l,n,a,c,s,d,o,f]}class km extends se{constructor(t){super(),oe(this,t,xm,Em,ie,{tag:0},Im)}}function Dm(i){le(i,"svelte-e72ouh",".line.svelte-e72ouh{width:100%;height:100%;overflow:visible}")}function Kr(i){let t,e,n,o;return{c(){t=be("path"),b(t,"fill","none"),b(t,"stroke","url(#"+i[4]+")"),b(t,"stroke-width","1"),b(t,"d","M0 21 L14 0.5 L105 0.5")},m(s,r){B(s,t,r),o=!0},p(s,r){i=s},i(s){o||(s&&De(()=>{n&&n.end(1),e=zt(t,Gn,{duration:i[1],delay:i[0],easing:Zo}),e.start()}),o=!0)},o(s){e&&e.invalidate(),s&&(n=Ut(t,Gn,{duration:i[1],delay:i[2],easing:Vt})),o=!1},d(s){s&&z(t),s&&n&&n.end()}}}function Lm(i){let t,e,n,o,s,r=i[3]&&Kr(i);return{c(){t=be("svg"),e=be("defs"),n=be("linearGradient"),o=be("stop"),s=be("stop"),r&&r.c(),b(o,"offset","25%"),b(o,"stop-color","white"),b(o,"stop-opacity","1"),b(s,"offset","100%"),b(s,"stop-color","white"),b(s,"stop-opacity","0.5"),b(n,"id",i[4]),b(n,"gradientUnits","userSpaceOnUse"),b(t,"class","line svelte-e72ouh"),b(t,"viewBox","0 0 105 21")},m(a,l){B(a,t,l),R(t,e),R(e,n),R(n,o),R(n,s),r&&r.m(t,null)},p(a,[l]){a[3]?r?(r.p(a,l),l&8&&k(r,1)):(r=Kr(a),r.c(),k(r,1),r.m(t,null)):r&&(fe(),M(r,1,1,()=>{r=null}),he())},i(a){k(r)},o(a){M(r)},d(a){a&&z(t),r&&r.d()}}}function Sm(i,t,e){let{inDelay:n=0}=t,{duration:o=0}=t,{outDelay:s=0}=t,{unfolded:r}=t;const a=Fe();return i.$$set=l=>{"inDelay"in l&&e(0,n=l.inDelay),"duration"in l&&e(1,o=l.duration),"outDelay"in l&&e(2,s=l.outDelay),"unfolded"in l&&e(3,r=l.unfolded)},[n,o,s,r,a]}class zm extends se{constructor(t){super(),oe(this,t,Sm,Lm,ie,{inDelay:0,duration:1,outDelay:2,unfolded:3},Dm)}}function Ot(i){return typeof i=="object"&&i!==null&&i.constructor&&Object.prototype.toString.call(i).slice(8,-1)==="Object"}function vt(i,t){const e=["__proto__","constructor","prototype"];Object.keys(t).filter(n=>e.indexOf(n)<0).forEach(n=>{typeof i[n]=="undefined"?i[n]=t[n]:Ot(t[n])&&Ot(i[n])&&Object.keys(t[n]).length>0?t[n].__swiper__?i[n]=t[n]:vt(i[n],t[n]):i[n]=t[n]})}function _i(i={}){return i.navigation&&typeof i.navigation.nextEl=="undefined"&&typeof i.navigation.prevEl=="undefined"}function qi(i={}){return i.pagination&&typeof i.pagination.el=="undefined"}function Ki(i={}){return i.scrollbar&&typeof i.scrollbar.el=="undefined"}function li(i=""){const t=i.split(" ").map(n=>n.trim()).filter(n=>!!n),e=[];return t.forEach(n=>{e.indexOf(n)<0&&e.push(n)}),e.join(" ")}const $r=["modules","init","_direction","touchEventsTarget","initialSlide","_speed","cssMode","updateOnWindowResize","resizeObserver","nested","focusableElements","_enabled","_width","_height","preventInteractionOnTransition","userAgent","url","_edgeSwipeDetection","_edgeSwipeThreshold","_freeMode","_autoHeight","setWrapperSize","virtualTranslate","_effect","breakpoints","_spaceBetween","_slidesPerView","maxBackfaceHiddenSlides","_grid","_slidesPerGroup","_slidesPerGroupSkip","_slidesPerGroupAuto","_centeredSlides","_centeredSlidesBounds","_slidesOffsetBefore","_slidesOffsetAfter","normalizeSlideIndex","_centerInsufficientSlides","_watchOverflow","roundLengths","touchRatio","touchAngle","simulateTouch","_shortSwipes","_longSwipes","longSwipesRatio","longSwipesMs","_followFinger","allowTouchMove","_threshold","touchMoveStopPropagation","touchStartPreventDefault","touchStartForcePreventDefault","touchReleaseOnEdges","uniqueNavElements","_resistance","_resistanceRatio","_watchSlidesProgress","_grabCursor","preventClicks","preventClicksPropagation","_slideToClickedSlide","_preloadImages","updateOnImagesReady","_loop","_loopAdditionalSlides","_loopedSlides","_loopedSlidesLimit","_loopFillGroupWithBlank","loopPreventsSlide","_rewind","_allowSlidePrev","_allowSlideNext","_swipeHandler","_noSwiping","noSwipingClass","noSwipingSelector","passiveListeners","containerModifierClass","slideClass","slideBlankClass","slideActiveClass","slideDuplicateActiveClass","slideVisibleClass","slideDuplicateClass","slideNextClass","slideDuplicateNextClass","slidePrevClass","slideDuplicatePrevClass","wrapperClass","runCallbacksOnInit","observer","observeParents","observeSlideChildren","a11y","_autoplay","_controller","coverflowEffect","cubeEffect","fadeEffect","flipEffect","creativeEffect","cardsEffect","hashNavigation","history","keyboard","lazy","mousewheel","_navigation","_pagination","parallax","_scrollbar","_thumbs","virtual","zoom"];function Mm(i={},t=!0){const e={on:{}},n={},o={};vt(e,mi.default.defaults),vt(e,mi.default.extendedDefaults),e._emitClasses=!0,e.init=!1;const s={},r=$r.map(l=>l.replace(/_/,"")),a=Object.assign({},i);return Object.keys(a).forEach(l=>{typeof i[l]!="undefined"&&(r.indexOf(l)>=0?Ot(i[l])?(e[l]={},o[l]={},vt(e[l],i[l]),vt(o[l],i[l])):(e[l]=i[l],o[l]=i[l]):l.search(/on[A-Z]/)===0&&typeof i[l]=="function"?t?n[`${l[2].toLowerCase()}${l.substr(3)}`]=i[l]:e.on[`${l[2].toLowerCase()}${l.substr(3)}`]=i[l]:s[l]=i[l])}),["navigation","pagination","scrollbar"].forEach(l=>{e[l]===!0&&(e[l]={}),e[l]===!1&&delete e[l]}),{params:e,passedParams:o,rest:s,events:n}}function jm({el:i,nextEl:t,prevEl:e,paginationEl:n,scrollbarEl:o,swiper:s},r){_i(r)&&t&&e&&(s.params.navigation.nextEl=t,s.originalParams.navigation.nextEl=t,s.params.navigation.prevEl=e,s.originalParams.navigation.prevEl=e),qi(r)&&n&&(s.params.pagination.el=n,s.originalParams.pagination.el=n),Ki(r)&&o&&(s.params.scrollbar.el=o,s.originalParams.scrollbar.el=o),s.init(i)}function Bm(i,t,e,n,o){const s=[];if(!t)return s;const r=l=>{s.indexOf(l)<0&&s.push(l)};if(e&&n){const l=n.map(o),c=e.map(o);l.join("")!==c.join("")&&r("children"),n.length!==e.length&&r("children")}return $r.filter(l=>l[0]==="_").map(l=>l.replace(/_/,"")).forEach(l=>{if(l in i&&l in t)if(Ot(i[l])&&Ot(t[l])){const c=Object.keys(i[l]),d=Object.keys(t[l]);c.length!==d.length?r(l):(c.forEach(f=>{i[l][f]!==t[l][f]&&r(l)}),d.forEach(f=>{i[l][f]!==t[l][f]&&r(l)}))}else i[l]!==t[l]&&r(l)}),s}function Tm({swiper:i,slides:t,passedParams:e,changedParams:n,nextEl:o,prevEl:s,scrollbarEl:r,paginationEl:a}){const l=n.filter(D=>D!=="children"&&D!=="direction"),{params:c,pagination:d,navigation:f,scrollbar:u,virtual:h,thumbs:m}=i;let g,v,A,C,w;n.includes("thumbs")&&e.thumbs&&e.thumbs.swiper&&c.thumbs&&!c.thumbs.swiper&&(g=!0),n.includes("controller")&&e.controller&&e.controller.control&&c.controller&&!c.controller.control&&(v=!0),n.includes("pagination")&&e.pagination&&(e.pagination.el||a)&&(c.pagination||c.pagination===!1)&&d&&!d.el&&(A=!0),n.includes("scrollbar")&&e.scrollbar&&(e.scrollbar.el||r)&&(c.scrollbar||c.scrollbar===!1)&&u&&!u.el&&(C=!0),n.includes("navigation")&&e.navigation&&(e.navigation.prevEl||s)&&(e.navigation.nextEl||o)&&(c.navigation||c.navigation===!1)&&f&&!f.prevEl&&!f.nextEl&&(w=!0);const E=D=>{!i[D]||(i[D].destroy(),D==="navigation"?(c[D].prevEl=void 0,c[D].nextEl=void 0,i[D].prevEl=void 0,i[D].nextEl=void 0):(c[D].el=void 0,i[D].el=void 0))};l.forEach(D=>{if(Ot(c[D])&&Ot(e[D]))vt(c[D],e[D]);else{const y=e[D];(y===!0||y===!1)&&(D==="navigation"||D==="pagination"||D==="scrollbar")?y===!1&&E(D):c[D]=e[D]}}),l.includes("controller")&&!v&&i.controller&&i.controller.control&&c.controller&&c.controller.control&&(i.controller.control=c.controller.control),n.includes("children")&&t&&h&&c.virtual.enabled?(h.slides=t,h.update(!0)):n.includes("children")&&i.lazy&&i.params.lazy.enabled&&i.lazy.load(),g&&m.init()&&m.update(!0),v&&(i.controller.control=c.controller.control),A&&(a&&(c.pagination.el=a),d.init(),d.render(),d.update()),C&&(r&&(c.scrollbar.el=r),u.init(),u.updateSize(),u.setTranslate()),w&&(o&&(c.navigation.nextEl=o),s&&(c.navigation.prevEl=s),f.init(),f.update()),n.includes("allowSlideNext")&&(i.allowSlideNext=e.allowSlideNext),n.includes("allowSlidePrev")&&(i.allowSlidePrev=e.allowSlidePrev),n.includes("direction")&&i.changeDirection(e.direction,!1),i.update()}const Qm=i=>({virtualData:i&512}),ea=i=>({virtualData:i[9]}),Om=i=>({virtualData:i&512}),ta=i=>({virtualData:i[9]}),Rm=i=>({virtualData:i&512}),na=i=>({virtualData:i[9]}),Fm=i=>({virtualData:i&512}),ia=i=>({virtualData:i[9]}),Hm=i=>({virtualData:i&512}),oa=i=>({virtualData:i[9]});function sa(i){let t,e,n;return{c(){t=Q("div"),e=_(),n=Q("div"),b(t,"class","swiper-button-prev"),b(n,"class","swiper-button-next")},m(o,s){B(o,t,s),i[13](t),B(o,e,s),B(o,n,s),i[14](n)},p:ne,d(o){o&&z(t),i[13](null),o&&z(e),o&&z(n),i[14](null)}}}function ra(i){let t;return{c(){t=Q("div"),b(t,"class","swiper-scrollbar")},m(e,n){B(e,t,n),i[15](t)},p:ne,d(e){e&&z(t),i[15](null)}}}function aa(i){let t;return{c(){t=Q("div"),b(t,"class","swiper-pagination")},m(e,n){B(e,t,n),i[16](t)},p:ne,d(e){e&&z(t),i[16](null)}}}function Gm(i){let t,e,n,o,s,r,a=_i(i[2]),l,c=Ki(i[2]),d,f=qi(i[2]),u,h,m;const g=i[12]["container-start"],v=xt(g,i,i[11],oa),A=i[12]["wrapper-start"],C=xt(A,i,i[11],ia),w=i[12].default,E=xt(w,i,i[11],na),D=i[12]["wrapper-end"],y=xt(D,i,i[11],ta);let L=a&&sa(i),x=c&&ra(i),O=f&&aa(i);const T=i[12]["container-end"],G=xt(T,i,i[11],ea);let U=[{class:h=li(`${i[1]}${i[0]?` ${i[0]}`:""}`)},i[3]],P={};for(let S=0;S<U.length;S+=1)P=Ie(P,U[S]);return{c(){t=Q("div"),v&&v.c(),e=_(),n=Q("div"),C&&C.c(),o=_(),E&&E.c(),s=_(),y&&y.c(),r=_(),L&&L.c(),l=_(),x&&x.c(),d=_(),O&&O.c(),u=_(),G&&G.c(),b(n,"class","swiper-wrapper"),Ln(t,P)},m(S,j){B(S,t,j),v&&v.m(t,null),R(t,e),R(t,n),C&&C.m(n,null),R(n,o),E&&E.m(n,null),R(n,s),y&&y.m(n,null),R(t,r),L&&L.m(t,null),R(t,l),x&&x.m(t,null),R(t,d),O&&O.m(t,null),R(t,u),G&&G.m(t,null),i[17](t),m=!0},p(S,[j]){v&&v.p&&(!m||j&2560)&&Dt(v,g,S,S[11],m?kt(g,S[11],j,Hm):Lt(S[11]),oa),C&&C.p&&(!m||j&2560)&&Dt(C,A,S,S[11],m?kt(A,S[11],j,Fm):Lt(S[11]),ia),E&&E.p&&(!m||j&2560)&&Dt(E,w,S,S[11],m?kt(w,S[11],j,Rm):Lt(S[11]),na),y&&y.p&&(!m||j&2560)&&Dt(y,D,S,S[11],m?kt(D,S[11],j,Om):Lt(S[11]),ta),j&4&&(a=_i(S[2])),a?L?L.p(S,j):(L=sa(S),L.c(),L.m(t,l)):L&&(L.d(1),L=null),j&4&&(c=Ki(S[2])),c?x?x.p(S,j):(x=ra(S),x.c(),x.m(t,d)):x&&(x.d(1),x=null),j&4&&(f=qi(S[2])),f?O?O.p(S,j):(O=aa(S),O.c(),O.m(t,u)):O&&(O.d(1),O=null),G&&G.p&&(!m||j&2560)&&Dt(G,T,S,S[11],m?kt(T,S[11],j,Qm):Lt(S[11]),ea),Ln(t,P=Te(U,[(!m||j&3&&h!==(h=li(`${S[1]}${S[0]?` ${S[0]}`:""}`)))&&{class:h},j&8&&S[3]]))},i(S){m||(k(v,S),k(C,S),k(E,S),k(y,S),k(G,S),m=!0)},o(S){M(v,S),M(C,S),M(E,S),M(y,S),M(G,S),m=!1},d(S){S&&z(t),v&&v.d(S),C&&C.d(S),E&&E.d(S),y&&y.d(S),L&&L.d(),x&&x.d(),O&&O.d(),G&&G.d(S),i[17](null)}}}function Nm(i,t,e){const n=["class","swiper"];let o=Dn(t,n),{$$slots:s={},$$scope:r}=t;const a=Dl();let{class:l=void 0}=t,c="swiper",d=!1,f=null,u=null,h,m,g,v,A=null,C=null,w=null,E=null,D=null,y={slides:[]};function L(){return f}const x=W=>{e(9,y=W),Sl().then(()=>{f.$wrapperEl.children(".swiper-slide").each(Y=>{Y.onSwiper&&Y.onSwiper(f)}),f.updateSlides(),f.updateProgress(),f.updateSlidesClasses(),f.lazy&&f.params.lazy.enabled&&f.lazy.load()})},O=()=>{h=Mm(o),e(2,m=h.params),g=h.passedParams,e(3,v=h.rest)};O(),u=g;const T=()=>{d=!0};if(m.onAny=(W,...Y)=>{a(W,Y)},Object.assign(m.on,{_beforeBreakpoint:T,_containerClasses(W,Y){e(1,c=Y)}}),f=new mi.default(m),Ii("swiper",f),f.virtual&&f.params.virtual.enabled){const W={cache:!1,renderExternal:Y=>{x(Y),m.virtual&&m.virtual.renderExternal&&m.virtual.renderExternal(Y)},renderExternalUpdate:!1};vt(f.params.virtual,W),vt(f.originalParams.virtual,W)}Ue(()=>{!A||(jm({el:A,nextEl:w,prevEl:C,paginationEl:D,scrollbarEl:E,swiper:f},m),a("swiper",[f]),!m.virtual&&f.slides.each(W=>{W.onSwiper&&W.onSwiper(f)}))}),Pi(()=>{if(!f)return;O();const W=Bm(g,u);(W.length||d)&&f&&!f.destroyed&&Tm({swiper:f,passedParams:g,changedParams:W,nextEl:w,prevEl:C,scrollbarEl:E,paginationEl:D}),d=!1,u=g}),ht(()=>{typeof window!="undefined"&&f&&!f.destroyed&&f.destroy(!0,!1)});function G(W){Be[W?"unshift":"push"](()=>{C=W,e(5,C)})}function U(W){Be[W?"unshift":"push"](()=>{w=W,e(6,w)})}function P(W){Be[W?"unshift":"push"](()=>{E=W,e(7,E)})}function S(W){Be[W?"unshift":"push"](()=>{D=W,e(8,D)})}function j(W){Be[W?"unshift":"push"](()=>{A=W,e(4,A)})}return i.$$set=W=>{t=Ie(Ie({},t),Mo(W)),e(27,o=Dn(t,n)),"class"in W&&e(0,l=W.class),"$$scope"in W&&e(11,r=W.$$scope)},[l,c,m,v,A,C,w,E,D,y,L,r,s,G,U,P,S,j]}class Wm extends se{constructor(t){super(),oe(this,t,Nm,Gm,ie,{class:0,swiper:10})}get swiper(){return this.$$.ctx[10]}}const Xm=i=>({data:i&32}),la=i=>({data:i[5]}),Ym=i=>({data:i&32}),ca=i=>({data:i[5]});function Um(i){let t;const e=i[8].default,n=xt(e,i,i[7],la);return{c(){n&&n.c()},m(o,s){n&&n.m(o,s),t=!0},p(o,s){n&&n.p&&(!t||s&160)&&Dt(n,e,o,o[7],t?kt(e,o[7],s,Xm):Lt(o[7]),la)},i(o){t||(k(n,o),t=!0)},o(o){M(n,o),t=!1},d(o){n&&n.d(o)}}}function Vm(i){let t,e,n;const o=i[8].default,s=xt(o,i,i[7],ca);return{c(){t=Q("div"),s&&s.c(),b(t,"class","swiper-zoom-container"),b(t,"data-swiper-zoom",e=typeof i[0]=="number"?i[0]:void 0)},m(r,a){B(r,t,a),s&&s.m(t,null),n=!0},p(r,a){s&&s.p&&(!n||a&160)&&Dt(s,o,r,r[7],n?kt(o,r[7],a,Ym):Lt(r[7]),ca),(!n||a&1&&e!==(e=typeof r[0]=="number"?r[0]:void 0))&&b(t,"data-swiper-zoom",e)},i(r){n||(k(s,r),n=!0)},o(r){M(s,r),n=!1},d(r){r&&z(t),s&&s.d(r)}}}function Jm(i){let t,e,n,o,s;const r=[Vm,Um],a=[];function l(f,u){return f[0]?0:1}e=l(i),n=a[e]=r[e](i);let c=[{class:o=li(`${i[3]}${i[2]?` ${i[2]}`:""}`)},{"data-swiper-slide-index":i[1]},i[6]],d={};for(let f=0;f<c.length;f+=1)d=Ie(d,c[f]);return{c(){t=Q("div"),n.c(),Ln(t,d)},m(f,u){B(f,t,u),a[e].m(t,null),i[9](t),s=!0},p(f,[u]){let h=e;e=l(f),e===h?a[e].p(f,u):(fe(),M(a[h],1,1,()=>{a[h]=null}),he(),n=a[e],n?n.p(f,u):(n=a[e]=r[e](f),n.c()),k(n,1),n.m(t,null)),Ln(t,d=Te(c,[(!s||u&12&&o!==(o=li(`${f[3]}${f[2]?` ${f[2]}`:""}`)))&&{class:o},(!s||u&2)&&{"data-swiper-slide-index":f[1]},u&64&&f[6]]))},i(f){s||(k(n),s=!0)},o(f){M(n),s=!1},d(f){f&&z(t),a[e].d(),i[9](null)}}}function Zm(i,t,e){let n;const o=["zoom","virtualIndex","class"];let s=Dn(t,o),{$$slots:r={},$$scope:a}=t,{zoom:l=void 0}=t,{virtualIndex:c=void 0}=t,{class:d=void 0}=t,f=null,u="swiper-slide",h=fn("swiper"),m=!1;const g=(w,E,D)=>{E===f&&e(3,u=D)},v=()=>{!h||m||(h.on("_slideClass",g),m=!0)},A=()=>{!h||(h.off("_slideClass",g),m=!1)};Ue(()=>{typeof c!="undefined"&&(e(4,f.onSwiper=w=>{h=w,v()},f),v())}),Pi(()=>{if(!(!f||!h)){if(h.destroyed){u!=="swiper-slide"&&e(3,u="swiper-slide");return}v()}}),Ci(()=>{v()}),ht(()=>{!h||A()});function C(w){Be[w?"unshift":"push"](()=>{f=w,e(4,f)})}return i.$$set=w=>{t=Ie(Ie({},t),Mo(w)),e(6,s=Dn(t,o)),"zoom"in w&&e(0,l=w.zoom),"virtualIndex"in w&&e(1,c=w.virtualIndex),"class"in w&&e(2,d=w.class),"$$scope"in w&&e(7,a=w.$$scope)},i.$$.update=()=>{i.$$.dirty&8&&e(5,n={isActive:u.indexOf("swiper-slide-active")>=0||u.indexOf("swiper-slide-duplicate-active")>=0,isVisible:u.indexOf("swiper-slide-visible")>=0,isDuplicate:u.indexOf("swiper-slide-duplicate")>=0,isPrev:u.indexOf("swiper-slide-prev")>=0||u.indexOf("swiper-slide-duplicate-prev")>=0,isNext:u.indexOf("swiper-slide-next")>=0||u.indexOf("swiper-slide-duplicate-next")>=0})},[l,c,d,u,f,n,s,a,r,C]}class _m extends se{constructor(t){super(),oe(this,t,Zm,Jm,ie,{zoom:0,virtualIndex:1,class:2})}}function qm(i){le(i,"svelte-cwtvzu",".media-item.svelte-cwtvzu.svelte-cwtvzu{height:100%}.media-content.svelte-cwtvzu.svelte-cwtvzu{width:100%;height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;-o-object-fit:inherit;object-fit:inherit}.video-icon.svelte-cwtvzu.svelte-cwtvzu{width:12.5rem;height:6.25rem;max-width:60%;max-height:60%;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%)}.video-play-button-container.svelte-cwtvzu.svelte-cwtvzu{display:none;pointer-events:auto;position:absolute;width:100%;height:100%;top:0;left:0}.video-play-button-container.showPlayButton.svelte-cwtvzu.svelte-cwtvzu{display:block}.video-icon.large.svelte-cwtvzu.svelte-cwtvzu{width:12.5rem;height:6.25rem}.video-icon.small.svelte-cwtvzu.svelte-cwtvzu{width:1.75rem;height:1.75rem}.video-icon.svelte-cwtvzu .video-icon-img.svelte-cwtvzu{width:100%;height:100%;background-position:center center;background-size:contain;background-repeat:no-repeat}.video-icon.svelte-cwtvzu .video-icon-img.canPlay.svelte-cwtvzu{cursor:pointer}")}function da(i){let t;function e(s,r){if(s[0].type==="Image")return $m;if(s[0].type==="Video")return Km}let n=e(i),o=n&&n(i);return{c(){t=Q("div"),o&&o.c(),b(t,"class","media-item svelte-cwtvzu")},m(s,r){B(s,t,r),o&&o.m(t,null)},p(s,r){n===(n=e(s))&&o?o.p(s,r):(o&&o.d(1),o=n&&n(s),o&&(o.c(),o.m(t,null)))},d(s){s&&z(t),o&&o.d()}}}function Km(i){let t,e,n,o,s,r,a,l,c,d,f;return{c(){var u;t=Q("video"),r=_(),a=Q("div"),l=Q("div"),c=Q("div"),b(t,"class","media-content svelte-cwtvzu"),b(t,"style",e=`object-fit: ${i[3]};`),qe(t.src,n=i[0].url+"#t=0.1")||b(t,"src",n),b(t,"poster",o=(u=i[0].videoCoverUrl)!=null?u:void 0),b(t,"preload",s=i[0].videoCoverUrl?void 0:"auto"),t.playsInline=!0,b(t,"paused",""),t.loop=!1,b(t,"crossorigin",""),t.controls=!1,q(t,"showPlayButton",i[5]),b(c,"class","video-icon-img svelte-cwtvzu"),F(c,"background-image","url("+(i[1]==="large"?Xr:Yr)+")"),q(c,"canPlay",i[2]),b(l,"class","video-icon svelte-cwtvzu"),q(l,"large",i[1]==="large"),q(l,"small",i[1]==="small"),b(a,"class","video-play-button-container svelte-cwtvzu"),q(a,"showPlayButton",i[5])},m(u,h){B(u,t,h),i[7](t),B(u,r,h),B(u,a,h),R(a,l),R(l,c),d||(f=[xe(t,"click",i[6]),xe(c,"click",i[8])],d=!0)},p(u,h){var m;h&8&&e!==(e=`object-fit: ${u[3]};`)&&b(t,"style",e),h&1&&!qe(t.src,n=u[0].url+"#t=0.1")&&b(t,"src",n),h&1&&o!==(o=(m=u[0].videoCoverUrl)!=null?m:void 0)&&b(t,"poster",o),h&1&&s!==(s=u[0].videoCoverUrl?void 0:"auto")&&b(t,"preload",s),h&32&&q(t,"showPlayButton",u[5]),h&2&&F(c,"background-image","url("+(u[1]==="large"?Xr:Yr)+")"),h&4&&q(c,"canPlay",u[2]),h&2&&q(l,"large",u[1]==="large"),h&2&&q(l,"small",u[1]==="small"),h&32&&q(a,"showPlayButton",u[5])},d(u){u&&z(t),i[7](null),u&&z(r),u&&z(a),d=!1,at(f)}}}function $m(i){let t,e,n,o;return{c(){t=Q("img"),b(t,"class","media-content svelte-cwtvzu"),b(t,"style",e=`object-fit: ${i[3]};`),qe(t.src,n=i[0].url)||b(t,"src",n),b(t,"alt",o=i[0].name)},m(s,r){B(s,t,r)},p(s,r){r&8&&e!==(e=`object-fit: ${s[3]};`)&&b(t,"style",e),r&1&&!qe(t.src,n=s[0].url)&&b(t,"src",n),r&1&&o!==(o=s[0].name)&&b(t,"alt",o)},d(s){s&&z(t)}}}function ep(i){let t,e=i[0]&&da(i);return{c(){e&&e.c(),t=Ae()},m(n,o){e&&e.m(n,o),B(n,t,o)},p(n,[o]){n[0]?e?e.p(n,o):(e=da(n),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},i:ne,o:ne,d(n){e&&e.d(n),n&&z(t)}}}function tp(i,t,e){let{media:n}=t,{playButtonIfNeed:o="small"}=t,{canPlay:s=!0}=t,{objectFit:r="cover"}=t,a,l=!1;const c=()=>a==null?void 0:a.pause();function d(u){Be[u?"unshift":"push"](()=>{a=u,e(4,a)})}const f=()=>{!s||a&&a.play()};return i.$$set=u=>{"media"in u&&e(0,n=u.media),"playButtonIfNeed"in u&&e(1,o=u.playButtonIfNeed),"canPlay"in u&&e(2,s=u.canPlay),"objectFit"in u&&e(3,r=u.objectFit)},i.$$.update=()=>{i.$$.dirty&16&&a&&(e(5,l=a.paused),a.addEventListener("play",()=>{e(5,l=!1)}),a.addEventListener("pause",()=>{e(5,l=!0)}))},[n,o,s,r,a,l,c,d,f]}class ua extends se{constructor(t){super(),oe(this,t,tp,ep,ie,{media:0,playButtonIfNeed:1,canPlay:2,objectFit:3},qm)}}function np(i){le(i,"svelte-ai0lv9",".media.svelte-ai0lv9{width:100%;height:100%;position:relative;overflow:hidden;border-radius:0.125rem}")}function fa(i,t,e){const n=i.slice();return n[23]=t[e],n}function ha(i){let t,e,n,o,s,r;const a=[op,ip],l=[];function c(d,f){return d[13]?0:1}return e=c(i),n=l[e]=a[e](i),{c(){t=Q("div"),n.c(),b(t,"class","media svelte-ai0lv9"),q(t,"unfolded",i[4])},m(d,f){B(d,t,f),l[e].m(t,null),r=!0},p(d,f){i=d;let u=e;e=c(i),e===u?l[e].p(i,f):(fe(),M(l[u],1,1,()=>{l[u]=null}),he(),n=l[e],n?n.p(i,f):(n=l[e]=a[e](i),n.c()),k(n,1),n.m(t,null)),f&16&&q(t,"unfolded",i[4])},i(d){r||(k(n),d&&De(()=>{s&&s.end(1),o=zt(t,_o,i[5]?{y:4,duration:i[3],delay:i[1],easing:Xt}:void 0),o.start()}),r=!0)},o(d){M(n),o&&o.invalidate(),d&&(s=Ut(t,_o,i[5]?{y:4,duration:i[3],delay:i[2],easing:Xt}:void 0)),r=!1},d(d){d&&z(t),l[e].d(),d&&s&&s.end()}}}function ip(i){let t,e;return t=new ua({props:{media:i[0][0],objectFit:i[8],playButtonIfNeed:i[6],canPlay:i[7]}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.media=n[0][0]),o&256&&(s.objectFit=n[8]),o&64&&(s.playButtonIfNeed=n[6]),o&128&&(s.canPlay=n[7]),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function op(i){let t,e;return t=new Wm({props:{style:"height: 100%",modules:[po.Autoplay],spaceBetween:30,autoplay:i[14]?Se({delay:4e3,stopOnLastSlide:!1,disableOnInteraction:!1}):!1,loop:!0,$$slots:{default:[rp]},$$scope:{ctx:i}}}),t.$on("init",i[19]),t.$on("slideChange",i[20]),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&16384&&(s.autoplay=n[14]?Se({delay:4e3,stopOnLastSlide:!1,disableOnInteraction:!1}):!1),o&67111360&&(s.$$scope={dirty:o,ctx:n}),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function sp(i){let t,e,n;return t=new ua({props:{media:i[23],objectFit:i[8],playButtonIfNeed:i[6],canPlay:i[7]}}),{c(){ee(t.$$.fragment),e=_()},m(o,s){K(t,o,s),B(o,e,s),n=!0},p(o,s){const r={};s&2048&&(r.media=o[23]),s&256&&(r.objectFit=o[8]),s&64&&(r.playButtonIfNeed=o[6]),s&128&&(r.canPlay=o[7]),t.$set(r)},i(o){n||(k(t.$$.fragment,o),n=!0)},o(o){M(t.$$.fragment,o),n=!1},d(o){$(t,o),o&&z(e)}}}function ma(i){let t,e;return t=new _m({props:{$$slots:{default:[sp]},$$scope:{ctx:i}}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&67111360&&(s.$$scope={dirty:o,ctx:n}),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function rp(i){let t,e,n=i[11],o=[];for(let r=0;r<n.length;r+=1)o[r]=ma(fa(i,n,r));const s=r=>M(o[r],1,1,()=>{o[r]=null});return{c(){for(let r=0;r<o.length;r+=1)o[r].c();t=Ae()},m(r,a){for(let l=0;l<o.length;l+=1)o[l].m(r,a);B(r,t,a),e=!0},p(r,a){if(a&2496){n=r[11];let l;for(l=0;l<n.length;l+=1){const c=fa(r,n,l);o[l]?(o[l].p(c,a),k(o[l],1)):(o[l]=ma(c),o[l].c(),k(o[l],1),o[l].m(t.parentNode,t))}for(fe(),l=n.length;l<o.length;l+=1)s(l);he()}},i(r){if(!e){for(let a=0;a<n.length;a+=1)k(o[a]);e=!0}},o(r){o=o.filter(Boolean);for(let a=0;a<o.length;a+=1)M(o[a]);e=!1},d(r){Ke(o,r),r&&z(t)}}}function ap(i){let t,e,n=i[4]&&ha(i);return{c(){n&&n.c(),t=Ae()},m(o,s){n&&n.m(o,s),B(o,t,s),e=!0},p(o,[s]){o[4]?n?(n.p(o,s),s&16&&k(n,1)):(n=ha(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(fe(),M(n,1,1,()=>{n=null}),he())},i(o){e||(k(n),e=!0)},o(o){M(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function lp(i,t,e){let n,o,s,{tag:r}=t,{mediaData:a}=t,{inDelay:l=0}=t,{outDelay:c=0}=t,{duration:d=0}=t,{unfolded:f=!0}=t,{animation:u=!0}=t,{playButtonIfNeed:h="small"}=t,{canPlay:m=!0}=t,{objectFit:g="cover"}=t,{enableCarousel:v=!0}=t,{autoplayConfig:A={autoplay:!0,autoplayVideo:!1}}=t;const C=fn("mediaStore"),w=fn("hooks");let E;function D(T){!n||!E||(C.set({currentMediaUrl:this.src}),w.emit("playStateChange",{event:T,state:"playing",tag:r,mediaInstance:this}),E.autoplay.stop())}function y(T){!n||!E||(w.emit("playStateChange",{event:T,state:"paused",tag:r,mediaInstance:this}),E.autoplay.running||E.autoplay.start())}let L=null;const x=T=>{e(10,E=T.detail[0])},O=T=>Z(this,null,function*(){var W,Y,te;if(!s||!A.autoplayVideo)return;const G=T.detail[0];if(!G)return;const U=G.realIndex;if(U===L)return;e(12,L=U);const P=o[U];if(!P||P.type!=="Video")return;G.autoplay.stop(),G.slides.map(X=>X.querySelector("video")).filter(Qt).forEach(X=>X.pause());const j=(W=G.slides[G.activeIndex])==null?void 0:W.querySelector("video");if(j&&(j.removeEventListener("play",D),j.removeEventListener("pause",y),j.addEventListener("play",D),j.addEventListener("pause",y)),j){j.addEventListener("click",()=>j.pause());const X=(te=(Y=j.parentElement)==null?void 0:Y.getElementsByClassName("video-play-button-container"))==null?void 0:te[0];j.addEventListener("play",()=>X==null?void 0:X.classList.remove("showPlayButton")),j.addEventListener("pause",()=>X==null?void 0:X.classList.add("showPlayButton")),X&&(j.paused?X.classList.add("showPlayButton"):X.classList.remove("showPlayButton"),X.addEventListener("click",()=>j.play()))}});return i.$$set=T=>{"tag"in T&&e(17,r=T.tag),"mediaData"in T&&e(0,a=T.mediaData),"inDelay"in T&&e(1,l=T.inDelay),"outDelay"in T&&e(2,c=T.outDelay),"duration"in T&&e(3,d=T.duration),"unfolded"in T&&e(4,f=T.unfolded),"animation"in T&&e(5,u=T.animation),"playButtonIfNeed"in T&&e(6,h=T.playButtonIfNeed),"canPlay"in T&&e(7,m=T.canPlay),"objectFit"in T&&e(8,g=T.objectFit),"enableCarousel"in T&&e(18,v=T.enableCarousel),"autoplayConfig"in T&&e(9,A=T.autoplayConfig)},i.$$.update=()=>{i.$$.dirty&262145&&e(13,n=v&&(a==null?void 0:a.length)>1),i.$$.dirty&1&&e(11,o=a),i.$$.dirty&2560&&e(14,s=o.length>1&&A.autoplay),i.$$.dirty&1024&&E&&E.slides.forEach(T=>{const G=T.querySelector("video");G&&C.subscribe(({currentMediaUrl:U})=>{U!==G.src&&G.pause()})})},[a,l,c,d,f,u,h,m,g,A,E,o,L,n,s,D,y,r,v,x,O]}class pa extends se{constructor(t){super(),oe(this,t,lp,ap,ie,{tag:17,mediaData:0,inDelay:1,outDelay:2,duration:3,unfolded:4,animation:5,playButtonIfNeed:6,canPlay:7,objectFit:8,enableCarousel:18,autoplayConfig:9},np)}}function cp(i){le(i,"svelte-1f7m1lj",".line.svelte-1f7m1lj{position:absolute;width:6.5625rem;height:1.3125rem;transform:translateY(-100%)}.text.svelte-1f7m1lj{position:absolute;width:6.25rem;left:1rem;bottom:0.0625rem;font-weight:600}.media-wrapper.svelte-1f7m1lj{position:absolute;left:0.875rem;top:-5.3125rem;width:5.625rem;height:3.75rem;font-weight:600}")}function ga(i,t,e){const n=i.slice();return n[5]=t[e].id,n[1]=t[e].content,n}function Aa(i){let t,e,n,o,s,r=[],a=new Map,l,c,d;t=new Ze({props:{visible:i[4],left:61,bottom:57,width:2,blurRadius:150,spreadRadius:75}}),o=new zm({props:{unfolded:i[4],duration:1e3,outDelay:400}});let f=i[2];const u=m=>m[5];for(let m=0;m<f.length;m+=1){let g=ga(i,f,m),v=u(g);a.set(v,r[m]=va(v,g))}let h=i[3]&&ba(i);return{c(){ee(t.$$.fragment),e=_(),n=Q("div"),ee(o.$$.fragment),s=_();for(let m=0;m<r.length;m+=1)r[m].c();l=_(),h&&h.c(),c=Ae(),b(n,"class","line svelte-1f7m1lj")},m(m,g){K(t,m,g),B(m,e,g),B(m,n,g),K(o,n,null),B(m,s,g);for(let v=0;v<r.length;v+=1)r[v].m(m,g);B(m,l,g),h&&h.m(m,g),B(m,c,g),d=!0},p(m,g){const v={};g&16&&(v.visible=m[4]),t.$set(v);const A={};g&16&&(A.unfolded=m[4]),o.$set(A),g&20&&(f=m[2],fe(),r=Ve(r,g,u,1,m,f,a,l.parentNode,lt,va,l,ga),he()),m[3]?h?(h.p(m,g),g&8&&k(h,1)):(h=ba(m),h.c(),k(h,1),h.m(c.parentNode,c)):h&&(fe(),M(h,1,1,()=>{h=null}),he())},i(m){if(!d){k(t.$$.fragment,m),k(o.$$.fragment,m);for(let g=0;g<f.length;g+=1)k(r[g]);k(h),d=!0}},o(m){M(t.$$.fragment,m),M(o.$$.fragment,m);for(let g=0;g<r.length;g+=1)M(r[g]);M(h),d=!1},d(m){$(t,m),m&&z(e),m&&z(n),$(o),m&&z(s);for(let g=0;g<r.length;g+=1)r[g].d(m);m&&z(l),h&&h.d(m),m&&z(c)}}}function va(i,t){let e,n,o;return n=new Wr({props:{unfolded:t[4],content:t[1],inDelay:500}}),{key:i,first:null,c(){e=Q("div"),ee(n.$$.fragment),b(e,"class","text svelte-1f7m1lj"),this.first=e},m(s,r){B(s,e,r),K(n,e,null),o=!0},p(s,r){t=s;const a={};r&16&&(a.unfolded=t[4]),r&4&&(a.content=t[1]),n.$set(a)},i(s){o||(k(n.$$.fragment,s),o=!0)},o(s){M(n.$$.fragment,s),o=!1},d(s){s&&z(e),$(n)}}}function ba(i){let t,e,n;return e=new pa({props:{autoplayConfig:{autoplay:!1},unfolded:i[4],mediaData:i[3],tag:i[0],enableCarousel:!1,canPlay:!1,playButtonIfNeed:"small",inDelay:500,duration:500}}),{c(){t=Q("div"),ee(e.$$.fragment),b(t,"class","media-wrapper svelte-1f7m1lj")},m(o,s){B(o,t,s),K(e,t,null),n=!0},p(o,s){const r={};s&16&&(r.unfolded=o[4]),s&8&&(r.mediaData=o[3]),s&1&&(r.tag=o[0]),e.$set(r)},i(o){n||(k(e.$$.fragment,o),n=!0)},o(o){M(e.$$.fragment,o),n=!1},d(o){o&&z(t),$(e)}}}function dp(i){let t,e,n=i[0].state&&Aa(i);return{c(){n&&n.c(),t=Ae()},m(o,s){n&&n.m(o,s),B(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&k(n,1)):(n=Aa(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(fe(),M(n,1,1,()=>{n=null}),he())},i(o){e||(k(n),e=!0)},o(o){M(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function up(i,t,e){let n,o,s,{tag:r}=t,a;return i.$$set=l=>{"tag"in l&&e(0,r=l.tag)},i.$$.update=()=>{var l,c,d;i.$$.dirty&1&&e(4,n=r.state?r.state.unfolded:!1),i.$$.dirty&1&&e(1,o=((c=(l=r.data.text)==null?void 0:l.length)!=null?c:0)>7?((d=r.data.text)==null?void 0:d.substring(0,6))+"...":r.data.text),i.$$.dirty&1&&e(3,s=r.data.mediaData),i.$$.dirty&2&&e(2,a=o?[{id:Fe(),content:o}]:[])},[r,o,a,s,n]}class fp extends se{constructor(t){super(),oe(this,t,up,dp,ie,{tag:0},cp)}}function hp(i){le(i,"svelte-8mby9k",".svelte-8mby9k.svelte-8mby9k{box-sizing:border-box}.marketing.svelte-8mby9k.svelte-8mby9k{transform:translateY(-100%)}.content.svelte-8mby9k .headerImage.svelte-8mby9k{position:absolute;width:100%;top:0.25rem;transform:translateY(-100%);border-top-left-radius:0.25rem;border-top-right-radius:0.25rem}.line.svelte-8mby9k.svelte-8mby9k{position:absolute;height:2.0625rem;width:0.0625rem;left:50%;transform:translateX(-50%);background-color:white;bottom:0;transform-origin:bottom;transition:all 500ms}.content.svelte-8mby9k.svelte-8mby9k{background-color:white;position:relative;display:flex;flex-direction:column;min-width:11.125rem;width:-moz-max-content;width:max-content;height:-moz-max-content;height:max-content;border-radius:0.25rem;top:-1.875rem;left:-1rem;padding:0.5rem 0rem 0.5625rem;transition:all 500ms}.title.svelte-8mby9k.svelte-8mby9k{position:absolute;background-color:white;border-radius:0.25rem;width:100%;top:0.5rem;padding-left:0.75rem;padding-right:0.75rem}.title.svelte-8mby9k .text.svelte-8mby9k{display:block;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:0.75rem;font-weight:bold;line-height:1.125rem;color:#000}.footer.svelte-8mby9k.svelte-8mby9k{position:relative;padding-left:0.75rem;padding-right:0.75rem;width:100%;height:1.375rem;display:flex;align-items:center}.footer.svelte-8mby9k .goto-button.svelte-8mby9k{flex-shrink:0;white-space:nowrap;background-image:linear-gradient(to right, rgba(87, 144, 253, 1) 0, rgba(42, 114, 254, 1) 100%);color:#fff;font-size:0.625rem;border-radius:0.875rem;font-weight:bold;padding-left:0.5rem;padding-right:0.5rem;height:1.25rem;margin-left:auto;display:flex;align-items:center}.footer.svelte-8mby9k .goto-icon.svelte-8mby9k::after{content:'';display:inline-block;width:0.75rem;height:0.75rem;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAMAAADW3miqAAAAeFBMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////GqOSsAAAAJ3RSTlMAFNO2pYt4bErz8uP6ysawgVtBPDcR5C4s2L6ZmJBzZGJXUyEeDws/0G2zAAAAkklEQVQ4y+3TRw6DMBAF0OAeJ3QCpCe0uf8NwRILLBYfiS1/aT3JoymnI+sERZ5VCH0iVto3QDfBLmeSSMUTogRV9bBEpJAKaYpGijn13aTSLeraeG9D0NZFZv4/rRL5FDHnITlllqjv6tykWsmX4JHr05y7j6oFKq2P8He48B0tAM0EY0EDxquClw6vLz6EI35GmwwSZpe+WOgAAAAASUVORK5CYII=);background-size:100% auto;background-repeat:no-repeat}.price.svelte-8mby9k.svelte-8mby9k{flex-shrink:0;margin-right:0.75rem;white-space:nowrap;color:#ff6600;display:flex;align-items:baseline}.price.svelte-8mby9k .value.svelte-8mby9k{position:relative;top:0.0625rem;font-size:1.125rem;line-height:1.375rem;font-family:TG-TYPE, PingFangSC, Segoe UI, Rototo, sans-serif;letter-spacing:0rem}.price.svelte-8mby9k .unit.svelte-8mby9k{padding-left:0.125rem;font-size:0.625rem}.tag.svelte-8mby9k.svelte-8mby9k{position:relative;background-color:white;display:flex;width:-moz-max-content;width:max-content;padding-left:0.75rem;padding-right:0.75rem;min-height:1.75rem}.tag.svelte-8mby9k .base-tag.svelte-8mby9k{height:1rem;margin-top:1.375rem;margin-bottom:0.5rem;margin-right:0.25rem;font-size:0.625rem;line-height:0.875rem;padding:0.0625rem 0.25rem;border-radius:0.125rem;overflow:hidden}.tag.svelte-8mby9k .primary-tag.svelte-8mby9k{background:#e5eefe;color:#0055ff}.tag.svelte-8mby9k .secondary-tag.svelte-8mby9k{background:rgba(255, 102, 0, 0.08);color:rgba(255, 102, 0, 1)}.unfolded.svelte-8mby9k .line.svelte-8mby9k{transform:translateX(-50%) scale(1, 1)}.folded.svelte-8mby9k .line.svelte-8mby9k{transform:translateX(-50%) scale(1, 0);transition-timing-function:ease-in}.unfolded.svelte-8mby9k .content.svelte-8mby9k{opacity:1}.folded.svelte-8mby9k .content.svelte-8mby9k{opacity:0;transform:translateY(0.425rem);transition-timing-function:ease-in}")}function ya(i,t,e){const n=i.slice();return n[0]=t[e],n}function wa(i,t,e){const n=i.slice();return n[0]=t[e],n}function Ca(i){let t,e=i[0]+"",n;return{c(){t=Q("div"),n=Le(e),b(t,"class","base-tag primary-tag svelte-8mby9k")},m(o,s){B(o,t,s),R(t,n)},p(o,s){s&4&&e!==(e=o[0]+"")&&je(n,e)},d(o){o&&z(t)}}}function Pa(i){let t,e=i[0]&&Ca(i);return{c(){e&&e.c(),t=Ae()},m(n,o){e&&e.m(n,o),B(n,t,o)},p(n,o){n[0]?e?e.p(n,o):(e=Ca(n),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},d(n){e&&e.d(n),n&&z(t)}}}function Ia(i){let t,e=i[0]+"",n;return{c(){t=Q("div"),n=Le(e),b(t,"class","base-tag secondary-tag svelte-8mby9k")},m(o,s){B(o,t,s),R(t,n)},p(o,s){s&4&&e!==(e=o[0]+"")&&je(n,e)},d(o){o&&z(t)}}}function Ea(i){let t,e=i[0]&&Ia(i);return{c(){e&&e.c(),t=Ae()},m(n,o){e&&e.m(n,o),B(n,t,o)},p(n,o){n[0]?e?e.p(n,o):(e=Ia(n),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},d(n){e&&e.d(n),n&&z(t)}}}function xa(i){let t,e,n=i[2].price.value+"",o,s,r=i[2].price.unit&&ka(i);return{c(){t=Q("div"),e=Q("span"),o=Le(n),s=_(),r&&r.c(),b(e,"class","value svelte-8mby9k"),b(t,"class","price svelte-8mby9k")},m(a,l){B(a,t,l),R(t,e),R(e,o),R(t,s),r&&r.m(t,null)},p(a,l){l&4&&n!==(n=a[2].price.value+"")&&je(o,n),a[2].price.unit?r?r.p(a,l):(r=ka(a),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(a){a&&z(t),r&&r.d()}}}function ka(i){let t,e=i[2].price.unit+"",n;return{c(){t=Q("span"),n=Le(e),b(t,"class","unit svelte-8mby9k")},m(o,s){B(o,t,s),R(t,n)},p(o,s){s&4&&e!==(e=o[2].price.unit+"")&&je(n,e)},d(o){o&&z(t)}}}function Da(i){let t,e=i[2].highlightText+"",n;return{c(){t=Q("div"),n=Le(e),b(t,"class","goto-button goto-icon svelte-8mby9k")},m(o,s){B(o,t,s),R(t,n)},p(o,s){s&4&&e!==(e=o[2].highlightText+"")&&je(n,e)},d(o){o&&z(t)}}}function mp(i){var G,U;let t,e,n,o,s,r,a,l,c,d,f,u,h,m,g=i[2].title+"",v,A,C,w,E;e=new Ze({props:{visible:i[1],outDelay:500,left:61,bottom:87,blurRadius:150,spreadRadius:75}});let D=i[2].brandTags||[],y=[];for(let P=0;P<D.length;P+=1)y[P]=Pa(wa(i,D,P));let L=i[2].tags||[],x=[];for(let P=0;P<L.length;P+=1)x[P]=Ea(ya(i,L,P));let O=((G=i[2].price)==null?void 0:G.value)!==void 0&&((U=i[2].price)==null?void 0:U.value)!==null&&xa(i),T=i[2].highlightText&&Da(i);return{c(){var P,S;t=Q("div"),ee(e.$$.fragment),n=_(),o=Q("div"),s=_(),r=Q("div"),a=Q("img"),c=_(),d=Q("div");for(let j=0;j<y.length;j+=1)y[j].c();f=_();for(let j=0;j<x.length;j+=1)x[j].c();u=_(),h=Q("div"),m=Q("div"),v=Le(g),A=_(),C=Q("div"),O&&O.c(),w=_(),T&&T.c(),b(o,"class","line svelte-8mby9k"),F(o,"transition-delay",i[1]?ci+"ms":di+Sa-La-40+"ms",!1),b(a,"class","headerImage svelte-8mby9k"),qe(a.src,l=i[2].headerPictureUrl)||b(a,"src",l),b(a,"alt",""),b(d,"class","tag svelte-8mby9k"),b(m,"class","text svelte-8mby9k"),b(h,"class","title svelte-8mby9k"),b(C,"class","footer svelte-8mby9k"),F(C,"height",((P=i[2].price)==null?void 0:P.value)!==void 0&&((S=i[2].price)==null?void 0:S.value)!==null&&i[2].highlightText?void 0:"1rem",!1),b(r,"class","content svelte-8mby9k"),F(r,"transition-delay",i[1]?ci+di+"ms":"0ms",!1),b(t,"class","marketing svelte-8mby9k"),q(t,"unfolded",i[1]),q(t,"folded",i[3])},m(P,S){B(P,t,S),K(e,t,null),R(t,n),R(t,o),R(t,s),R(t,r),R(r,a),R(r,c),R(r,d);for(let j=0;j<y.length;j+=1)y[j].m(d,null);R(d,f);for(let j=0;j<x.length;j+=1)x[j].m(d,null);R(r,u),R(r,h),R(h,m),R(m,v),R(r,A),R(r,C),O&&O.m(C,null),R(C,w),T&&T.m(C,null),E=!0},p(P,[S]){var W,Y,te,X;const j={};if(S&2&&(j.visible=P[1]),e.$set(j),S&2&&F(o,"transition-delay",P[1]?ci+"ms":di+Sa-La-40+"ms",!1),(!E||S&4&&!qe(a.src,l=P[2].headerPictureUrl))&&b(a,"src",l),S&4){D=P[2].brandTags||[];let V;for(V=0;V<D.length;V+=1){const ce=wa(P,D,V);y[V]?y[V].p(ce,S):(y[V]=Pa(ce),y[V].c(),y[V].m(d,f))}for(;V<y.length;V+=1)y[V].d(1);y.length=D.length}if(S&4){L=P[2].tags||[];let V;for(V=0;V<L.length;V+=1){const ce=ya(P,L,V);x[V]?x[V].p(ce,S):(x[V]=Ea(ce),x[V].c(),x[V].m(d,null))}for(;V<x.length;V+=1)x[V].d(1);x.length=L.length}(!E||S&4)&&g!==(g=P[2].title+"")&&je(v,g),((W=P[2].price)==null?void 0:W.value)!==void 0&&((Y=P[2].price)==null?void 0:Y.value)!==null?O?O.p(P,S):(O=xa(P),O.c(),O.m(C,w)):O&&(O.d(1),O=null),P[2].highlightText?T?T.p(P,S):(T=Da(P),T.c(),T.m(C,null)):T&&(T.d(1),T=null),S&4&&F(C,"height",((te=P[2].price)==null?void 0:te.value)!==void 0&&((X=P[2].price)==null?void 0:X.value)!==null&&P[2].highlightText?void 0:"1rem",!1),S&2&&F(r,"transition-delay",P[1]?ci+di+"ms":"0ms",!1),S&2&&q(t,"unfolded",P[1]),S&8&&q(t,"folded",P[3])},i(P){E||(k(e.$$.fragment,P),E=!0)},o(P){M(e.$$.fragment,P),E=!1},d(P){P&&z(t),$(e),Ke(y,P),Ke(x,P),O&&O.d(),T&&T.d()}}}const ci=400,La=500,di=180,Sa=500;function pp(i,t,e){let n,o,s,{tag:r}=t;return i.$$set=a=>{"tag"in a&&e(0,r=a.tag)},i.$$.update=()=>{var a,l;i.$$.dirty&1&&e(1,n=(l=(a=r.state)==null?void 0:a.unfolded)!=null?l:!1),i.$$.dirty&2&&e(3,o=!n),i.$$.dirty&1&&e(2,s=r.data)},[r,n,s,o]}class gp extends se{constructor(t){super(),oe(this,t,pp,mp,ie,{tag:0},hp)}}function Ap(i){le(i,"svelte-1ku3wt4",`.audio.svelte-1ku3wt4.svelte-1ku3wt4{position:relative;width:100%;height:100%;cursor:pointer}@keyframes svelte-1ku3wt4-playing{25%{background-image:url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='9' cy='9' r='8' transform='translate(-1 -1)' fill='%23FFF' fill-rule='nonzero'/%3E%3C/svg%3E")}50%{background-image:url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0zM5.533 6.685L4.169 8.049l1.414 1.413a2.078 2.078 0 0 0-.05-2.777z' fill='%23FFF' fill-rule='nonzero'/%3E%3C/svg%3E")}75%{background-image:url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0zm-.656 4.874l-.906.905A3.35 3.35 0 0 1 7.369 8.1c0 .875-.333 1.67-.88 2.268l.906.906A4.628 4.628 0 0 0 8.65 8.101a4.627 4.627 0 0 0-1.306-3.227zm-1.811 1.81L4.169 8.05l1.414 1.413a2.078 2.078 0 0 0-.05-2.777z' fill='%23FFF' fill-rule='nonzero'/%3E%3C/svg%3E")}}.paused.svelte-1ku3wt4 .audio-icon.svelte-1ku3wt4{animation:none}.audio-icon.svelte-1ku3wt4.svelte-1ku3wt4{width:100%;height:100%;border-radius:50%;background-size:100%;animation:svelte-1ku3wt4-playing 2s steps(1) infinite;background-image:url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0zm1.428 2.79l-.953.952a6.222 6.222 0 0 1 1.775 4.36c0 1.571-.58 3.006-1.538 4.103l-.184.202.793.794a7.344 7.344 0 0 0 2.21-5.26A7.341 7.341 0 0 0 9.428 2.79zM7.344 4.873l-.906.905A3.35 3.35 0 0 1 7.369 8.1c0 .802-.28 1.537-.748 2.115l-.132.153.906.906A4.628 4.628 0 0 0 8.65 8.101a4.627 4.627 0 0 0-1.306-3.227zm-1.811 1.81L4.169 8.05l1.414 1.413a2.078 2.078 0 0 0-.05-2.777z' fill='%23FFF' fill-rule='nonzero'/%3E%3C/svg%3E")}`)}function za(i){let t,e,n,o,s,r,a,l=!0,c,d,f,u,h;return e=new Ze({props:{center:!0,blurRadius:15,spreadRadius:6}}),{c(){t=Q("div"),ee(e.$$.fragment),n=_(),o=Q("div"),s=_(),r=Q("audio"),b(o,"class","audio-icon svelte-1ku3wt4"),r.controls=!1,b(r,"playsinline",""),qe(r.src,a=i[3])||b(r,"src",a),b(t,"class","audio svelte-1ku3wt4"),q(t,"paused",i[6])},m(m,g){B(m,t,g),K(e,t,null),R(t,n),R(t,o),R(t,s),R(t,r),i[9](r),f=!0,u||(h=[xe(r,"play",i[10]),xe(r,"pause",i[10]),xe(t,"click",yi(i[7]))],u=!0)},p(m,g){i=m,(!f||g&8&&!qe(r.src,a=i[3]))&&b(r,"src",a),g&64&&l!==(l=i[6])&&r[l?"pause":"play"](),g&64&&q(t,"paused",i[6])},i(m){f||(k(e.$$.fragment,m),m&&De(()=>{d&&d.end(1),c=zt(t,Mt,{duration:i[2],delay:i[0],easing:Vt}),c.start()}),f=!0)},o(m){M(e.$$.fragment,m),c&&c.invalidate(),m&&(d=Ut(t,Mt,{duration:i[2],delay:i[1],easing:Vt})),f=!1},d(m){m&&z(t),$(e),i[9](null),m&&d&&d.end(),u=!1,at(h)}}}function vp(i){let t,e,n=i[4]&&za(i);return{c(){n&&n.c(),t=Ae()},m(o,s){n&&n.m(o,s),B(o,t,s),e=!0},p(o,[s]){o[4]?n?(n.p(o,s),s&16&&k(n,1)):(n=za(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(fe(),M(n,1,1,()=>{n=null}),he())},i(o){e||(k(n),e=!0)},o(o){M(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function bp(i,t,e){let{inDelay:n=0}=t,{outDelay:o=0}=t,{duration:s=0}=t,{url:r}=t,{unfolded:a}=t,{hooksInfo:l={}}=t;const c=fn("hooks"),d=fn("mediaStore");let f,u=!0;d.subscribe(({currentMediaUrl:v})=>{v!==r&&(f==null||f.pause())});function h(v){d.set({currentMediaUrl:r}),f&&(c.emit("click",N({event:v,target:"AudioTagPlayIcon",audioInstance:f},l)),f.paused?f.play():f.pause(),e(5,f.onplay=A=>c.emit("playStateChange",N({event:A,state:"playing",mediaInstance:f},l)),f),e(5,f.onpause=A=>c.emit("playStateChange",N({event:A,state:"paused",mediaInstance:f},l)),f))}function m(v){Be[v?"unshift":"push"](()=>{f=v,e(5,f)})}function g(){u=this.paused,e(6,u)}return i.$$set=v=>{"inDelay"in v&&e(0,n=v.inDelay),"outDelay"in v&&e(1,o=v.outDelay),"duration"in v&&e(2,s=v.duration),"url"in v&&e(3,r=v.url),"unfolded"in v&&e(4,a=v.unfolded),"hooksInfo"in v&&e(8,l=v.hooksInfo)},i.$$.update=()=>{i.$$.dirty&48&&(a||f==null||f.pause())},[n,o,s,r,a,f,u,h,l,m,g]}class yp extends se{constructor(t){super(),oe(this,t,bp,vp,ie,{inDelay:0,outDelay:1,duration:2,url:3,unfolded:4,hooksInfo:8},Ap)}}function wp(i){le(i,"svelte-4r8s18",".audio-tag.svelte-4r8s18.svelte-4r8s18{position:absolute;left:0;top:0;width:0;height:0;overflow:visible}.line.svelte-4r8s18.svelte-4r8s18{display:flex;position:absolute;top:0;left:0;width:10.125rem;height:0.0625rem;transform:translate3d(0, -50%, 0.625rem)}.content.svelte-4r8s18.svelte-4r8s18{width:-moz-max-content;width:max-content;height:3.375rem;padding:2.25rem 0.25rem 0 1rem;position:absolute;left:0;bottom:0.125rem;overflow:hidden;box-sizing:border-box;font-size:0;white-space:nowrap;font-weight:600}.wrapper.svelte-4r8s18.svelte-4r8s18{position:relative;width:100%;height:100%}.audio-icon.svelte-4r8s18.svelte-4r8s18{vertical-align:top;display:inline-block;width:1rem;height:1rem;margin-right:0.25rem;margin-top:0.0625rem}.unfolded.svelte-4r8s18 .audio-icon.svelte-4r8s18{pointer-events:auto}")}function Ma(i){var C,w,E,D;let t,e,n,o,s,r,a,l,c,d,f,u,h,m,g,v,A;return e=new Ze({props:{visible:i[5],left:i[2]/2+"px",bottom:12,width:2,blurRadius:120,spreadRadius:60}}),s=new Rr({props:{unfolded:i[5],duration:1e3,outDelay:i[4]+20*Math.min((w=(C=i[3][0])==null?void 0:C.content.length)!=null?w:10,15)}}),d=new yp({props:{unfolded:i[5],url:i[0].data.audioUrl,duration:1e3,outDelay:20*Math.min((D=(E=i[3][0])==null?void 0:E.content.length)!=null?D:10,15),hooksInfo:{tag:i[0]}}}),h=new _r({props:{visible:i[5],textUnfolded:i[1],textItems:i[3]}}),{c(){t=Q("div"),ee(e.$$.fragment),n=_(),o=Q("div"),ee(s.$$.fragment),r=_(),a=Q("div"),l=Q("div"),c=Q("div"),ee(d.$$.fragment),f=_(),u=Q("div"),ee(h.$$.fragment),b(o,"class","line svelte-4r8s18"),F(o,"width",i[2]+"px",!1),b(c,"class","audio-icon svelte-4r8s18"),F(u,"display","inline-block",!1),b(l,"class","wrapper svelte-4r8s18"),b(a,"class","content svelte-4r8s18"),De(()=>i[8].call(a)),b(t,"class","audio-tag svelte-4r8s18"),q(t,"unfolded",i[5])},m(y,L){B(y,t,L),K(e,t,null),R(t,n),R(t,o),K(s,o,null),R(t,r),R(t,a),R(a,l),R(l,c),K(d,c,null),R(l,f),R(l,u),K(h,u,null),m=ft(a,i[8].bind(a)),g=!0,v||(A=xe(u,"click",i[6]),v=!0)},p(y,L){var U,P,S,j;const x={};L&32&&(x.visible=y[5]),L&4&&(x.left=y[2]/2+"px"),e.$set(x);const O={};L&32&&(O.unfolded=y[5]),L&24&&(O.outDelay=y[4]+20*Math.min((P=(U=y[3][0])==null?void 0:U.content.length)!=null?P:10,15)),s.$set(O),L&4&&F(o,"width",y[2]+"px",!1);const T={};L&32&&(T.unfolded=y[5]),L&1&&(T.url=y[0].data.audioUrl),L&8&&(T.outDelay=20*Math.min((j=(S=y[3][0])==null?void 0:S.content.length)!=null?j:10,15)),L&1&&(T.hooksInfo={tag:y[0]}),d.$set(T);const G={};L&32&&(G.visible=y[5]),L&2&&(G.textUnfolded=y[1]),L&8&&(G.textItems=y[3]),h.$set(G),L&32&&q(t,"unfolded",y[5])},i(y){g||(k(e.$$.fragment,y),k(s.$$.fragment,y),k(d.$$.fragment,y),k(h.$$.fragment,y),g=!0)},o(y){M(e.$$.fragment,y),M(s.$$.fragment,y),M(d.$$.fragment,y),M(h.$$.fragment,y),g=!1},d(y){y&&z(t),$(e),$(s),$(d),$(h),m(),v=!1,A()}}}function Cp(i){let t,e,n=i[0].state&&Ma(i);return{c(){n&&n.c(),t=Ae()},m(o,s){n&&n.m(o,s),B(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&k(n,1)):(n=Ma(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(fe(),M(n,1,1,()=>{n=null}),he())},i(o){e||(k(n),e=!0)},o(o){M(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function Pp(i,t,e){let n,o,s,{tag:r}=t,a=!1,l,c=[];function d(){e(1,a=!a)}function f(){l=this.clientWidth,e(2,l)}return i.$$set=u=>{"tag"in u&&e(0,r=u.tag)},i.$$.update=()=>{var u;i.$$.dirty&1&&e(5,n=!!((u=r.state)!=null&&u.unfolded)),i.$$.dirty&1&&e(7,o=r.data.text),i.$$.dirty&128&&e(3,c=[{id:Fe(),content:o}]),i.$$.dirty&2&&e(4,s=a?450:0)},[r,a,l,c,s,n,d,o,f]}class Ip extends se{constructor(t){super(),oe(this,t,Pp,Cp,ie,{tag:0},wp)}}function Ep(i){le(i,"svelte-10cw0el",".media-wrapper.svelte-10cw0el{position:absolute;width:100%;height:100%}")}function ja(i){let t,e,n;return e=new pa({props:{unfolded:i[5],mediaData:i[4],objectFit:i[2],enableCarousel:i[1],autoplayConfig:i[3],tag:i[0],canPlay:!0,playButtonIfNeed:"large",inDelay:500,duration:500}}),{c(){t=Q("div"),ee(e.$$.fragment),b(t,"class","media-wrapper svelte-10cw0el")},m(o,s){B(o,t,s),K(e,t,null),n=!0},p(o,s){const r={};s&32&&(r.unfolded=o[5]),s&16&&(r.mediaData=o[4]),s&4&&(r.objectFit=o[2]),s&2&&(r.enableCarousel=o[1]),s&8&&(r.autoplayConfig=o[3]),s&1&&(r.tag=o[0]),e.$set(r)},i(o){n||(k(e.$$.fragment,o),n=!0)},o(o){M(e.$$.fragment,o),n=!1},d(o){o&&z(t),$(e)}}}function xp(i){let t,e,n=i[0].state&&i[4]&&ja(i);return{c(){n&&n.c(),t=Ae()},m(o,s){n&&n.m(o,s),B(o,t,s),e=!0},p(o,[s]){o[0].state&&o[4]?n?(n.p(o,s),s&17&&k(n,1)):(n=ja(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(fe(),M(n,1,1,()=>{n=null}),he())},i(o){e||(k(n),e=!0)},o(o){M(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function kp(i,t,e){let n,o,s,r,a,{tag:l}=t;return i.$$set=c=>{"tag"in c&&e(0,l=c.tag)},i.$$.update=()=>{var c,d;i.$$.dirty&1&&e(5,n=l.state?l.state.unfolded:!1),i.$$.dirty&1&&e(4,o=l.data.mediaData),i.$$.dirty&1&&e(1,s=l.data.enableCarousel),i.$$.dirty&3&&e(3,r=(c=l.data.autoplayConfig)!=null?c:{autoplay:s!=null?s:!0,autoplayVideo:!0}),i.$$.dirty&1&&e(2,a=(d=l.data.objectFit)!=null?d:(()=>l.data.adaptationMode==="stretch"?"cover":l.data.adaptationMode==="proportional"?"contain":void 0)())},[l,s,a,r,o,n]}class Dp extends se{constructor(t){super(),oe(this,t,kp,xp,ie,{tag:0},Ep)}}function Lp(i){le(i,"svelte-7x7u86",".wrapper.svelte-7x7u86{font-weight:600;cursor:pointer;width:-moz-max-content;width:max-content;height:-moz-max-content;height:max-content;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%);display:flex;align-items:center;justify-content:center;flex-direction:column;pointer-events:auto}.text-wrapper.svelte-7x7u86{position:relative;display:flex;align-items:center;justify-content:center}.icon.svelte-7x7u86{position:relative;margin-bottom:0.6875rem}.arrow0.svelte-7x7u86,.arrow1.svelte-7x7u86,.arrow2.svelte-7x7u86{position:absolute;width:1.625rem;height:0.75rem;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE4AAAAkCAYAAAAnxQwhAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAATqADAAQAAAABAAAAJAAAAABrx2urAAAGm0lEQVRoBd2ZXbCVUxjH26QSfSCS0JwoFNEZ0cc45iSmUUaqC+KCwUUXxYUZw4yrLhozLlDDRWa6oW5yOFTT0IcyKn1JnIjDKelLPipJcXT8fttaZ95qd+yzv+uZ+e211rvfd61n/ddaz1rv3qkOFWgtLS3n4Vb34NqhVCr1d6W5mao0hxBNwfrCOcG346S7Ee9gKFdEUjHCIZi+XA69E8p4rQVM98EeBLRcdqsI4RCtI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MpuDsHgVxecXvHQQH8krw7JiLuUnohz5pX8NM/PB9N6OdVjicNaa8AHFJROeqMtZ0+ovGk2/AI0o3iGKRTcey9aSO8locbXN3wyc75k4+BoaBYSNZ3yHKHj2ug6uhPdbEzQ6qK0ARXQ0z8MmYe4plFA4Hx3Hn0xB3Hiv0V9qTYxCXMpoie2LX+vyXnPDpiH4Ay3HMe9tt+NiTh0bDPRBXRLIed07tZvDebEzhN4CzV3O5voyPi9KlxMcJwuGMQj0FE8M9Ku9I1MIJ94bvk4mNGORdcr41GLd8xjpM94HxZAmO7CAtmOF3Pyoz5srJ8bCZaw68M95NJU4GshlNf1dAf4i+15F/Bb9b416rGDRuPHsRHCHN2PEz3GahDXMq/wR9wfgTGyObFnE56ULwDxW/K5rRB/tTDa4YY2Imf3Zx/TIwFLVl6/iyF8SNxxX0LH1Ix720cDRoTJgNcbT2hwdUPZPZeCNYsc9EQazPEV4NTm9/zjlKWnKjT11otBYUcRS4AuKgmjrYToxrwUHPZN9z0Ql0afhyL+k0+rQtRQOu/3qIAhjIB0IPSJrrvwEcARvTko44896DhXFUvKESjD66msbD/eBMSw60eQVygAfDyXH8INe2gZPLiaF4ExTucTLPg2aMGg7uVpqzZwu4tm8Ad7UoFtn0q4ti1SHWt16odKO/A/DxAZgAcYVFt+3nV2AcHAIdQTsOa6Ea7P9MhZtB5jHQmsDltwMM8qrszFPpaEfILIYF4H+ZVnrGGf12coyEyXAvdIU4KUydaa4+r/cDl3UVaHMVzun7erp4+g/FWQWK5a6oeGeNoYHijAVFrIG44shmtKkK52x6FSZluMW4pVjvIJbHibPe0MPl61JWxEEZOvw216a3LkEeGMGFO0D1d8KqMyVu4WtRDE2Mh85Az6Wuso/RZA1ph38BBMvNbHuq7kAAAAAASUVORK5CYII=);background-repeat:no-repeat;background-size:contain;animation-fill-mode:backwards;animation-iteration-count:infinite;animation-timing-function:ease-in-out;animation-duration:1.2s}.arrow1.svelte-7x7u86{position:relative}.arrow0.svelte-7x7u86{top:-0.75rem;animation-name:svelte-7x7u86-up0}.arrow1.svelte-7x7u86{animation-name:svelte-7x7u86-up1}.arrow2.svelte-7x7u86{top:0.75rem;animation-name:svelte-7x7u86-up2}.text.svelte-7x7u86{position:absolute;top:0;font-size:0.875rem;color:#ffffff;letter-spacing:0;text-align:center;max-width:8.75rem;width:-moz-max-content;width:max-content;word-break:break-all;line-height:1.125rem;text-shadow:0.125rem 0rem 0.5rem rgba(0, 0, 0, 0.15)}@keyframes svelte-7x7u86-up0{0%{opacity:0.8;transform:translate3d(0, 0, 0) scale(0.84)}33.33%,100%{opacity:0;transform:translate3d(0, -0.75rem, 0) scale(0.84)}}@keyframes svelte-7x7u86-up1{0%{opacity:1;transform:translate3d(0, 0, 0) scale(1)}33.33%,100%{opacity:0.8;transform:translate3d(0, -0.75rem, 0) scale(0.84)}}@keyframes svelte-7x7u86-up2{0%{opacity:0}33.33%,100%{opacity:1;transform:translate3d(0, -0.75rem, 0)}}.link.svelte-7x7u86{position:relative;width:1.75rem;height:0.75rem;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFQAAAAkCAMAAAAgl+0yAAAAnFBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+TINBkAAAAM3RSTlMAjLy6ILM2Fi+Zng3BrPvao4VC9ceneQfKkmNdV1AbEeLOsHA77ujUtn5JLnRraSUUjVLj/+RVAAABhElEQVRIx63V2W6CQBiGYUBUQGDYdwTZQZZa7v/eimik/ket/7yZ4yeTTCYf8+dOX8etxGVoxAvCVbguR3g0uRTMA0w4odGi+CbzFnGKosCqrmHc5rdEwzCwqtGFJlC7DqtOcTxANY67BHnVKOpVoEZRjFPdLgxbqIZhhFTjINChGgThF06NhpGd35OGMcCppyDPfajm+YhUR8cRoeo4+RGlJnnbalBt2x6nHh1dt4Gq6bqDU886y2ZQZVn9jFJ51vcbqPo+Up18UeSgKoo3nHqVJEkGqi1JPk49aLZmQdW2xXf1zP+vUFHsC1QVReK33xdk+w9SaqAq+732UvvdZ2UEqrud8lR5Wc4a7pO8GaoL9VBjy7rMlMosq1lV43LhZlrtF+yuJlbtEXpqXXP3NYwI8VJqakOIziw5aepV1FQuTdfhvlWVZdJCrao6MPe0spRpqV5ZFivqNqYpq3RQ2TST5/h4quoRCmwqq6rymol6plV53IZSomTKE/MroWfxDevL/wAEdPq1eGDh4AAAAABJRU5ErkJggg==);background-repeat:no-repeat;background-size:contain;animation-iteration-count:infinite;animation-timing-function:linear;animation-duration:1.2s;animation-name:svelte-7x7u86-left-right}@keyframes svelte-7x7u86-left-right{0%,100%{opacity:0.8;transform:translateX(-0.3125rem)}50%{opacity:1;transform:translateX(0)}}")}function Sp(i){let t,e,n,o;return t=new Ze({props:{visible:!0,outDelay:0,inDelay:0,width:1.4,left:13,bottom:"auto",blurRadius:50,spreadRadius:18}}),{c(){ee(t.$$.fragment),e=_(),n=Q("div"),b(n,"class","link svelte-7x7u86")},m(s,r){K(t,s,r),B(s,e,r),B(s,n,r),o=!0},i(s){o||(k(t.$$.fragment,s),o=!0)},o(s){M(t.$$.fragment,s),o=!1},d(s){$(t,s),s&&z(e),s&&z(n)}}}function zp(i){let t,e,n,o,s,r,a,l;return t=new Ze({props:{visible:!0,outDelay:0,inDelay:0,height:1.2,left:13,bottom:12,blurRadius:50,spreadRadius:18}}),{c(){ee(t.$$.fragment),e=_(),n=Q("div"),o=_(),s=Q("div"),r=_(),a=Q("div"),b(n,"class","arrow0 svelte-7x7u86"),b(s,"class","arrow1 svelte-7x7u86"),b(a,"class","arrow2 svelte-7x7u86")},m(c,d){K(t,c,d),B(c,e,d),B(c,n,d),B(c,o,d),B(c,s,d),B(c,r,d),B(c,a,d),l=!0},i(c){l||(k(t.$$.fragment,c),l=!0)},o(c){M(t.$$.fragment,c),l=!1},d(c){$(t,c),c&&z(e),c&&z(n),c&&z(o),c&&z(s),c&&z(r),c&&z(a)}}}function Mp(i){let t,e,n,o,s,r,a,l,c,d=i[0].text+"",f,u;const h=[zp,Sp],m=[];function g(v,A){return v[0].linkType===ai.VrLink?0:v[0].linkType===ai.NormalLink?1:-1}return~(n=g(i))&&(o=m[n]=h[n](i)),a=new Ze({props:{visible:!0,outDelay:0,inDelay:0,left:"auto",bottom:"auto",width:"80%",blurRadius:40,spreadRadius:16,opacity:.08}}),{c(){t=Q("div"),e=Q("div"),o&&o.c(),s=_(),r=Q("div"),ee(a.$$.fragment),l=_(),c=Q("div"),f=Le(d),b(e,"class","icon svelte-7x7u86"),b(c,"class","text svelte-7x7u86"),b(r,"class","text-wrapper svelte-7x7u86"),b(t,"class","wrapper svelte-7x7u86")},m(v,A){B(v,t,A),R(t,e),~n&&m[n].m(e,null),R(t,s),R(t,r),K(a,r,null),R(r,l),R(r,c),R(c,f),u=!0},p(v,[A]){let C=n;n=g(v),n!==C&&(o&&(fe(),M(m[C],1,1,()=>{m[C]=null}),he()),~n?(o=m[n],o||(o=m[n]=h[n](v),o.c()),k(o,1),o.m(e,null)):o=null),(!u||A&1)&&d!==(d=v[0].text+"")&&je(f,d)},i(v){u||(k(o),k(a.$$.fragment,v),u=!0)},o(v){M(o),M(a.$$.fragment,v),u=!1},d(v){v&&z(t),~n&&m[n].d(),$(a)}}}function jp(i,t,e){let n,{tag:o}=t;return i.$$set=s=>{"tag"in s&&e(1,o=s.tag)},i.$$.update=()=>{i.$$.dirty&2&&e(0,n=o.data)},[n,o]}class Bp extends se{constructor(t){super(),oe(this,t,jp,Mp,ie,{tag:1},Lp)}}function Tp(i){le(i,"svelte-kzl2aj",".customElement__container.svelte-kzl2aj{position:relative}")}function Ba(i){let t,e=i[0].element+"",n;return{c(){t=new zn(!1),n=Ae(),t.a=n},m(o,s){t.m(e,o,s),B(o,n,s)},p(o,s){s&1&&e!==(e=o[0].element+"")&&t.p(e)},d(o){o&&z(n),o&&t.d()}}}function Qp(i){let t,e=typeof i[0].element=="string"&&Ba(i);return{c(){t=Q("div"),e&&e.c(),b(t,"class","customElement__container svelte-kzl2aj")},m(n,o){B(n,t,o),e&&e.m(t,null),i[2](t)},p(n,[o]){typeof n[0].element=="string"?e?e.p(n,o):(e=Ba(n),e.c(),e.m(t,null)):e&&(e.d(1),e=null)},i:ne,o:ne,d(n){n&&z(t),e&&e.d(),i[2](null)}}}function Op(i,t,e){let{tag:n}=t,o,s;Ue(()=>{if(o){if(n.element instanceof Element){const a=n.element;o.appendChild(a),s=()=>o==null?void 0:o.removeChild(a)}else if(typeof n.element=="function"){const a=n.element;s=a(o)}}}),ht(()=>{s==null||s()});function r(a){Be[a?"unshift":"push"](()=>{o=a,e(1,o)})}return i.$$set=a=>{"tag"in a&&e(0,n=a.tag)},[n,o,r]}class Rp extends se{constructor(t){super(),oe(this,t,Op,Qp,ie,{tag:0},Tp)}}function Fp(i){le(i,"svelte-95x526",`@font-face{font-family:'TG-TYPE';font-style:normal;font-weight:400;src:local('TG-TYPE-Bold'),
|
|
544
|
+
`))&&b(t,"style",e),a&8&&F(t,"width",Ye(i[3])),a&16&&F(t,"height",Ye(i[4])),a&8192&&F(t,"z-index",i[13])},i(r){s||(r&&De(()=>{o&&o.end(1),n=zt(t,Mt,{duration:i[0]}),n.start()}),s=!0)},o(r){n&&n.invalidate(),r&&(o=Ut(t,Mt,{duration:i[1]})),s=!1},d(r){r&&z(t),r&&o&&o.end()}}}function cm(i){let t,e=i[2]&&Fr(i);return{c(){e&&e.c(),t=Ae()},m(n,o){e&&e.m(n,o),B(n,t,o)},p(n,[o]){n[2]?e?(e.p(n,o),o&4&&k(e,1)):(e=Fr(n),e.c(),k(e,1),e.m(t.parentNode,t)):e&&(fe(),M(e,1,1,()=>{e=null}),he())},i(n){k(e)},o(n){M(e)},d(n){e&&e.d(n),n&&z(t)}}}function Ye(i){return typeof i=="number"?i/16+"rem":i}function dm(i,t,e){let{inDelay:n=1e3}=t,{outDelay:o=1e3}=t,{visible:s=!0}=t,{width:r=0}=t,{height:a=0}=t,{left:l=0}=t,{bottom:c=0}=t,{center:d=!1}=t,{horizontalCenter:f=!1}=t,{verticalCenter:u=!1}=t,{blurRadius:h}=t,{spreadRadius:m}=t,{opacity:g=.15}=t,{zIndex:v=void 0}=t;return i.$$set=A=>{"inDelay"in A&&e(0,n=A.inDelay),"outDelay"in A&&e(1,o=A.outDelay),"visible"in A&&e(2,s=A.visible),"width"in A&&e(3,r=A.width),"height"in A&&e(4,a=A.height),"left"in A&&e(5,l=A.left),"bottom"in A&&e(6,c=A.bottom),"center"in A&&e(7,d=A.center),"horizontalCenter"in A&&e(8,f=A.horizontalCenter),"verticalCenter"in A&&e(9,u=A.verticalCenter),"blurRadius"in A&&e(10,h=A.blurRadius),"spreadRadius"in A&&e(11,m=A.spreadRadius),"opacity"in A&&e(12,g=A.opacity),"zIndex"in A&&e(13,v=A.zIndex)},[n,o,s,r,a,l,c,d,f,u,h,m,g,v]}class Ze extends se{constructor(t){super(),oe(this,t,dm,cm,ie,{inDelay:0,outDelay:1,visible:2,width:3,height:4,left:5,bottom:6,center:7,horizontalCenter:8,verticalCenter:9,blurRadius:10,spreadRadius:11,opacity:12,zIndex:13},lm)}}function um(){return Math.random().toString(36).slice(-6)}const Hr=um();function fm(i){le(i,"svelte-1b2n9wi",".text-char.svelte-1b2n9wi{display:inline-block;text-shadow:0.125rem 0rem 0.5rem rgba(0, 0, 0, 0.15)}")}function Gr(i,t,e){const n=i.slice();return n[10]=t[e],n[11]=t,n[12]=e,n}function Nr(i){let t,e=i[10]+"",n,o=i[12];const s=()=>i[6](t,o),r=()=>i[6](null,o);return{c(){t=Q("span"),n=Le(e),b(t,"class","text-char svelte-1b2n9wi")},m(a,l){B(a,t,l),O(t,n),s()},p(a,l){i=a,l&2&&e!==(e=i[10]+"")&&je(n,e),o!==i[12]&&(r(),o=i[12],s())},d(a){a&&z(t),r()}}}function hm(i){let t,e=i[1],n=[];for(let o=0;o<e.length;o+=1)n[o]=Nr(Gr(i,e,o));return{c(){for(let o=0;o<n.length;o+=1)n[o].c();t=Ae()},m(o,s){for(let r=0;r<n.length;r+=1)n[r].m(o,s);B(o,t,s)},p(o,[s]){if(s&3){e=o[1];let r;for(r=0;r<e.length;r+=1){const a=Gr(o,e,r);n[r]?n[r].p(a,s):(n[r]=Nr(a),n[r].c(),n[r].m(t.parentNode,t))}for(;r<n.length;r+=1)n[r].d(1);n.length=e.length}},i:ne,o:ne,d(o){Ke(n,o),o&&z(t)}}}function mm(i,t,e){let n,{inDelay:o=0}=t,{outDelay:s=0}=t,{content:r}=t,{unfolded:a}=t,l,c=[],d;function f(h){clearTimeout(l),l=setTimeout(function(){!d||(h&&d.reversed||!h&&!d.reversed)&&(d.reverse(),d.play())},h?o:s)}Ue(function(){const h=(()=>{const m=om(g=>c[g].getBoundingClientRect().x,[Math.min(c.length-1,10),Math.min(c.length-1,30)]);if(m>0)return m})();d=Ao.default({targets:c.filter(Qt).slice(0,h),autoplay:!1,duration:400,scale:[.7,1],rotate:[20,0],opacity:[0,1],translateX:[4,0],translateY:[10,0],delay:Ao.default.stagger(50),easing:"easeInOutCubic"}),a&&d.seek(d.duration)});function u(h,m){Be[h?"unshift":"push"](()=>{c[m]=h,e(0,c)})}return i.$$set=h=>{"inDelay"in h&&e(2,o=h.inDelay),"outDelay"in h&&e(3,s=h.outDelay),"content"in h&&e(4,r=h.content),"unfolded"in h&&e(5,a=h.unfolded)},i.$$.update=()=>{i.$$.dirty&16&&e(1,n=(()=>{const h=[],m=new RegExp(new RegExp("\\p{Regional_Indicator}\\p{Regional_Indicator}|\\p{Emoji}(\\p{Emoji_Modifier}+|\\uFE0F\\u20E3?)?(\\u200D\\p{Emoji}(\\p{Emoji_Modifier}+|\\uFE0F\\u20E3?)?)+|\\p{Emoji_Presentation}(\\p{Emoji_Modifier}+|\\uFE0F\\u20E3?)?|\\p{Emoji}(\\p{Emoji_Modifier}+|\\uFE0F\\u20E3?)","gu")),g=`__EMOJI_SPLIT_${Hr}__`,v=`__EMOJI_${Hr}__`;return r.slice().replace(m,A=>`${g}${v}${A}${g}`).split(g).forEach(A=>A.startsWith(v)?h.push(A.slice(v.length)):h.push(...A.split(""))),h.filter(Boolean)})()),i.$$.dirty&32&&f(a)},[c,n,o,s,r,a,u]}class Wr extends se{constructor(t){super(),oe(this,t,mm,hm,ie,{inDelay:2,outDelay:3,content:4,unfolded:5},fm)}}const pm="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAKqADAAQAAAABAAAAKgAAAADUGqULAAAB0ElEQVRYCe2WSUoEQRBFLVHEiVZU1I03cKW38SSewRt4A5fiTty5cQIFR9pZQWkcUNSe2/Z9yISiSGxRkUAy4BGZSVX168gistraYsQKxArECsQKxApYqkDyU5lmsznMM+ZgAGpQhaUkSRbINgLJCXiCBtSgAkVYtGGIBTKj8AgKSVahDNvQa0IUkUG4Bx91BpLdBTOS/cgUIB3a+gMwI9mFzE3a0I3z5B4r292JzGVA8tSSZILMcUDyzIykthOZvYDk+V9Ktmz4yGzhOhV4/+5YU4N/hzqo0StX3Fg5TcnNlYvgs8bPsM4hkScHoyO46haRnGEYktQVI+4ypUYKyXtxyUu27JCceAMJvjo0HoM5CEZ7cPX7i013q3IWVV5r2aw/2TK+svWbPGU68KQCa6pYeus1V0X99quSfvtVSc39lmfz2mdbz32tg1dAJ0421AVs9E7/FxBSezrMmjI/gm5/nYmMkBq+TqBs7LNgTlZH6EnWlPmORdk+pHQipUNfTxtg7p3NIXWRMvXfoqusmXsNhpC6crIS1Zf9C6yAOdlxpK5BW18CiT7A/G93gE+P0FY/RoO+RWqS62YhB2r4YhlixArECsQKxArECvzjCnwAOr0wF44ggHAAAAAASUVORK5CYII=",Xr="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAWgAAACoCAMAAAD6pITnAAABQVBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACvr68AAAAAAAA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l1euiWGxSE5eun3na6jxQk3joEgdQ7TR+FWutE43lhQpph3sQvISAVRa9ppRzipY4gZqdw8/WigIWDWt1gD8EIsqSLlT/KPUVlKSAujs2XTLYeRHiIlA2DVi1qkRtK8PSULaEDF+Ue7ashwkTlf8DQc/cITdx9+UAAAAASUVORK5CYII=";function gm(i){le(i,"svelte-1ogmlqq",".arrow.svelte-1ogmlqq{width:100%;height:100%;background-size:100%;transition:transform 400ms ease-in-out;cursor:pointer;pointer-events:auto}.arrow-wrapper.svelte-1ogmlqq{position:relative;width:100%;height:100%}.arrow.left.svelte-1ogmlqq{transform:rotate(0deg)}.arrow.right.svelte-1ogmlqq{transform:rotate(-180deg)}.arrow.top.svelte-1ogmlqq{transform:rotate(90deg)}.arrow.bottom.svelte-1ogmlqq{transform:rotate(-90deg)}")}function Ur(i){let t,e,n,o,s,r,a,l,c,d;return e=new Ze({props:{center:!0,blurRadius:9,spreadRadius:3}}),{c(){t=Q("div"),ee(e.$$.fragment),n=_(),o=Q("div"),b(o,"class",s="arrow "+i[0]+" svelte-1ogmlqq"),F(o,"background-image","url("+pm+")"),b(t,"class","arrow-wrapper svelte-1ogmlqq")},m(f,u){B(f,t,u),K(e,t,null),O(t,n),O(t,o),l=!0,c||(d=xe(o,"click",i[5]),c=!0)},p(f,u){i=f,(!l||u&1&&s!==(s="arrow "+i[0]+" svelte-1ogmlqq"))&&b(o,"class",s)},i(f){l||(k(e.$$.fragment,f),f&&De(()=>{a&&a.end(1),r=zt(o,Mt,{duration:i[2],delay:i[3],easing:Vt}),r.start()}),l=!0)},o(f){M(e.$$.fragment,f),r&&r.invalidate(),f&&(a=Ut(o,Mt,{duration:i[2],delay:i[4],easing:Vt})),l=!1},d(f){f&&z(t),$(e),f&&a&&a.end(),c=!1,d()}}}function Am(i){let t,e,n=i[1]&&Ur(i);return{c(){n&&n.c(),t=Ae()},m(o,s){n&&n.m(o,s),B(o,t,s),e=!0},p(o,[s]){o[1]?n?(n.p(o,s),s&2&&k(n,1)):(n=Ur(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(fe(),M(n,1,1,()=>{n=null}),he())},i(o){e||(k(n),e=!0)},o(o){M(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function vm(i,t,e){let{direction:n="right"}=t,{visible:o=!0}=t,{duration:s=0}=t,{inDelay:r=0}=t,{outDelay:a=0}=t;function l(c){Ll.call(this,i,c)}return i.$$set=c=>{"direction"in c&&e(0,n=c.direction),"visible"in c&&e(1,o=c.visible),"duration"in c&&e(2,s=c.duration),"inDelay"in c&&e(3,r=c.inDelay),"outDelay"in c&&e(4,a=c.outDelay)},[n,o,s,r,a,l]}class bm extends se{constructor(t){super(),oe(this,t,vm,Am,ie,{direction:0,visible:1,duration:2,inDelay:3,outDelay:4},gm)}}function ym(i,t,e=20,n=5){return new Promise((o,s)=>{let r=0;const a=setInterval(()=>{const l=i();t(l)?(clearInterval(a),o(l)):r>=n&&(clearInterval(a),s(l)),r++},e)})}function wm(i){le(i,"svelte-1fuzm7v",".text.svelte-1fuzm7v{pointer-events:auto;box-sizing:border-box;display:inline-block;max-width:7.5rem;transition:transform 400ms ease-in-out;font-size:0.75rem;line-height:1.125rem;white-space:initial;cursor:pointer}.arrow.svelte-1fuzm7v{pointer-events:auto;display:inline-block;vertical-align:top;width:0.875rem;height:0.875rem;margin-left:0.125rem;margin-top:0.125rem}")}function Vr(i,t,e){const n=i.slice();return n[11]=t[e].id,n[12]=t[e].content,n}function Jr(i,t){let e,n,o;return n=new Wr({props:{unfolded:t[0],content:t[12],inDelay:500,outDelay:t[5]}}),{key:i,first:null,c(){e=Q("div"),ee(n.$$.fragment),b(e,"class","text svelte-1fuzm7v"),F(e,"transform",t[7]),this.first=e},m(s,r){B(s,e,r),K(n,e,null),t[10](e),o=!0},p(s,r){t=s;const a={};r&1&&(a.unfolded=t[0]),r&2&&(a.content=t[12]),r&32&&(a.outDelay=t[5]),n.$set(a),r&128&&F(e,"transform",t[7])},i(s){o||(k(n.$$.fragment,s),o=!0)},o(s){M(n.$$.fragment,s),o=!1},d(s){s&&z(e),$(n),t[10](null)}}}function Zr(i){let t,e,n;return e=new bm({props:{direction:i[6],visible:i[0],inDelay:600,duration:1e3}}),{c(){t=Q("div"),ee(e.$$.fragment),b(t,"class","arrow svelte-1fuzm7v")},m(o,s){B(o,t,s),K(e,t,null),n=!0},p(o,s){const r={};s&64&&(r.direction=o[6]),s&1&&(r.visible=o[0]),e.$set(r)},i(o){n||(k(e.$$.fragment,o),n=!0)},o(o){M(e.$$.fragment,o),n=!1},d(o){o&&z(t),$(e)}}}function Cm(i){let t=[],e=new Map,n,o,s,r=i[1];const a=c=>c[11];for(let c=0;c<r.length;c+=1){let d=Vr(i,r,c),f=a(d);e.set(f,t[c]=Jr(f,d))}let l=i[3]<i[4]&&Zr(i);return{c(){for(let c=0;c<t.length;c+=1)t[c].c();n=_(),l&&l.c(),o=Ae()},m(c,d){for(let f=0;f<t.length;f+=1)t[f].m(c,d);B(c,n,d),l&&l.m(c,d),B(c,o,d),s=!0},p(c,[d]){d&167&&(r=c[1],fe(),t=Ve(t,d,a,1,c,r,e,n.parentNode,lt,Jr,n,Vr),he()),c[3]<c[4]?l?(l.p(c,d),d&24&&k(l,1)):(l=Zr(c),l.c(),k(l,1),l.m(o.parentNode,o)):l&&(fe(),M(l,1,1,()=>{l=null}),he())},i(c){if(!s){for(let d=0;d<r.length;d+=1)k(t[d]);k(l),s=!0}},o(c){for(let d=0;d<t.length;d+=1)M(t[d]);M(l),s=!1},d(c){for(let d=0;d<t.length;d+=1)t[d].d(c);c&&z(n),l&&l.d(c),c&&z(o)}}}function Pm(i,t,e){let n,o,s,{visible:r=!1}=t,{textUnfolded:a=!1}=t,{textItems:l}=t,c,d=0,f=0,u=0;function h(m){Be[m?"unshift":"push"](()=>{c=m,e(2,c)})}return i.$$set=m=>{"visible"in m&&e(0,r=m.visible),"textUnfolded"in m&&e(8,a=m.textUnfolded),"textItems"in m&&e(1,l=m.textItems)},i.$$.update=()=>{if(i.$$.dirty&5&&c&&r){const{lineHeight:m}=getComputedStyle(c);e(4,u=c.offsetHeight),ym(()=>c==null?void 0:c.offsetHeight,Boolean).then(()=>{e(4,u=c.offsetHeight)}),e(3,f=Number(m.replace("px","")))}i.$$.dirty&280&&e(9,d=a?f-u:0),i.$$.dirty&512&&e(7,n=`translateY(${d}px)`),i.$$.dirty&256&&e(6,o=a?"left":"right"),i.$$.dirty&256&&e(5,s=a?450:0)},[r,l,c,f,u,s,o,n,a,d,h]}class _r extends se{constructor(t){super(),oe(this,t,Pm,Cm,ie,{visible:0,textUnfolded:8,textItems:1},wm)}}function Im(i){le(i,"svelte-18yy5x8",".line.svelte-18yy5x8{position:absolute;top:0;left:0;width:10.125rem;height:0.0625rem;transform:translate3d(0, -50%, 0.625rem)}.content.svelte-18yy5x8{width:-moz-max-content;width:max-content;height:3.375rem;padding:2.25rem 0.25rem 0 1rem;position:absolute;left:0;bottom:0;overflow:hidden;box-sizing:border-box;font-size:0;pointer-events:none;white-space:nowrap;font-weight:600}")}function qr(i){var u,h;let t,e,n,o,s,r,a,l,c,d,f;return t=new Ze({props:{visible:i[2],left:i[3]/2+"px",bottom:12,width:2,blurRadius:120,spreadRadius:60}}),o=new Rr({props:{unfolded:i[2],duration:1e3,outDelay:i[5]+40*Math.min((h=(u=i[4][0])==null?void 0:u.content.length)!=null?h:10,15)}}),a=new _r({props:{visible:i[2],textUnfolded:i[1],textItems:i[4]}}),{c(){ee(t.$$.fragment),e=_(),n=Q("div"),ee(o.$$.fragment),s=_(),r=Q("div"),ee(a.$$.fragment),b(n,"class","line svelte-18yy5x8"),F(n,"width",i[3]+"px"),b(r,"class","content svelte-18yy5x8"),De(()=>i[8].call(r))},m(m,g){K(t,m,g),B(m,e,g),B(m,n,g),K(o,n,null),B(m,s,g),B(m,r,g),K(a,r,null),l=ft(r,i[8].bind(r)),c=!0,d||(f=xe(r,"click",i[6]),d=!0)},p(m,g){var w,E;const v={};g&4&&(v.visible=m[2]),g&8&&(v.left=m[3]/2+"px"),t.$set(v);const A={};g&4&&(A.unfolded=m[2]),g&48&&(A.outDelay=m[5]+40*Math.min((E=(w=m[4][0])==null?void 0:w.content.length)!=null?E:10,15)),o.$set(A),g&8&&F(n,"width",m[3]+"px");const C={};g&4&&(C.visible=m[2]),g&2&&(C.textUnfolded=m[1]),g&16&&(C.textItems=m[4]),a.$set(C)},i(m){c||(k(t.$$.fragment,m),k(o.$$.fragment,m),k(a.$$.fragment,m),c=!0)},o(m){M(t.$$.fragment,m),M(o.$$.fragment,m),M(a.$$.fragment,m),c=!1},d(m){$(t,m),m&&z(e),m&&z(n),$(o),m&&z(s),m&&z(r),$(a),l(),d=!1,f()}}}function Em(i){let t,e,n=i[0].state&&qr(i);return{c(){n&&n.c(),t=Ae()},m(o,s){n&&n.m(o,s),B(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&k(n,1)):(n=qr(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(fe(),M(n,1,1,()=>{n=null}),he())},i(o){e||(k(n),e=!0)},o(o){M(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function xm(i,t,e){let n,o,s,{tag:r}=t,a,l=!1,c=[];function d(){e(1,l=!l)}function f(){a=this.clientWidth,e(3,a)}return i.$$set=u=>{"tag"in u&&e(0,r=u.tag)},i.$$.update=()=>{var u;i.$$.dirty&1&&e(2,n=!!((u=r.state)!=null&&u.unfolded)),i.$$.dirty&1&&e(7,o=r.data.text),i.$$.dirty&128&&e(4,c=[{id:Fe(),content:o}]),i.$$.dirty&4&&(n||setTimeout(()=>{e(1,l=!1)},20)),i.$$.dirty&2&&e(5,s=l?450:0)},[r,l,n,a,c,s,d,o,f]}class km extends se{constructor(t){super(),oe(this,t,xm,Em,ie,{tag:0},Im)}}function Dm(i){le(i,"svelte-e72ouh",".line.svelte-e72ouh{width:100%;height:100%;overflow:visible}")}function Kr(i){let t,e,n,o;return{c(){t=be("path"),b(t,"fill","none"),b(t,"stroke","url(#"+i[4]+")"),b(t,"stroke-width","1"),b(t,"d","M0 21 L14 0.5 L105 0.5")},m(s,r){B(s,t,r),o=!0},p(s,r){i=s},i(s){o||(s&&De(()=>{n&&n.end(1),e=zt(t,Nn,{duration:i[1],delay:i[0],easing:Zo}),e.start()}),o=!0)},o(s){e&&e.invalidate(),s&&(n=Ut(t,Nn,{duration:i[1],delay:i[2],easing:Vt})),o=!1},d(s){s&&z(t),s&&n&&n.end()}}}function Lm(i){let t,e,n,o,s,r=i[3]&&Kr(i);return{c(){t=be("svg"),e=be("defs"),n=be("linearGradient"),o=be("stop"),s=be("stop"),r&&r.c(),b(o,"offset","25%"),b(o,"stop-color","white"),b(o,"stop-opacity","1"),b(s,"offset","100%"),b(s,"stop-color","white"),b(s,"stop-opacity","0.5"),b(n,"id",i[4]),b(n,"gradientUnits","userSpaceOnUse"),b(t,"class","line svelte-e72ouh"),b(t,"viewBox","0 0 105 21")},m(a,l){B(a,t,l),O(t,e),O(e,n),O(n,o),O(n,s),r&&r.m(t,null)},p(a,[l]){a[3]?r?(r.p(a,l),l&8&&k(r,1)):(r=Kr(a),r.c(),k(r,1),r.m(t,null)):r&&(fe(),M(r,1,1,()=>{r=null}),he())},i(a){k(r)},o(a){M(r)},d(a){a&&z(t),r&&r.d()}}}function Sm(i,t,e){let{inDelay:n=0}=t,{duration:o=0}=t,{outDelay:s=0}=t,{unfolded:r}=t;const a=Fe();return i.$$set=l=>{"inDelay"in l&&e(0,n=l.inDelay),"duration"in l&&e(1,o=l.duration),"outDelay"in l&&e(2,s=l.outDelay),"unfolded"in l&&e(3,r=l.unfolded)},[n,o,s,r,a]}class zm extends se{constructor(t){super(),oe(this,t,Sm,Lm,ie,{inDelay:0,duration:1,outDelay:2,unfolded:3},Dm)}}function Ot(i){return typeof i=="object"&&i!==null&&i.constructor&&Object.prototype.toString.call(i).slice(8,-1)==="Object"}function vt(i,t){const e=["__proto__","constructor","prototype"];Object.keys(t).filter(n=>e.indexOf(n)<0).forEach(n=>{typeof i[n]=="undefined"?i[n]=t[n]:Ot(t[n])&&Ot(i[n])&&Object.keys(t[n]).length>0?t[n].__swiper__?i[n]=t[n]:vt(i[n],t[n]):i[n]=t[n]})}function _i(i={}){return i.navigation&&typeof i.navigation.nextEl=="undefined"&&typeof i.navigation.prevEl=="undefined"}function qi(i={}){return i.pagination&&typeof i.pagination.el=="undefined"}function Ki(i={}){return i.scrollbar&&typeof i.scrollbar.el=="undefined"}function ci(i=""){const t=i.split(" ").map(n=>n.trim()).filter(n=>!!n),e=[];return t.forEach(n=>{e.indexOf(n)<0&&e.push(n)}),e.join(" ")}const $r=["modules","init","_direction","touchEventsTarget","initialSlide","_speed","cssMode","updateOnWindowResize","resizeObserver","nested","focusableElements","_enabled","_width","_height","preventInteractionOnTransition","userAgent","url","_edgeSwipeDetection","_edgeSwipeThreshold","_freeMode","_autoHeight","setWrapperSize","virtualTranslate","_effect","breakpoints","_spaceBetween","_slidesPerView","maxBackfaceHiddenSlides","_grid","_slidesPerGroup","_slidesPerGroupSkip","_slidesPerGroupAuto","_centeredSlides","_centeredSlidesBounds","_slidesOffsetBefore","_slidesOffsetAfter","normalizeSlideIndex","_centerInsufficientSlides","_watchOverflow","roundLengths","touchRatio","touchAngle","simulateTouch","_shortSwipes","_longSwipes","longSwipesRatio","longSwipesMs","_followFinger","allowTouchMove","_threshold","touchMoveStopPropagation","touchStartPreventDefault","touchStartForcePreventDefault","touchReleaseOnEdges","uniqueNavElements","_resistance","_resistanceRatio","_watchSlidesProgress","_grabCursor","preventClicks","preventClicksPropagation","_slideToClickedSlide","_preloadImages","updateOnImagesReady","_loop","_loopAdditionalSlides","_loopedSlides","_loopedSlidesLimit","_loopFillGroupWithBlank","loopPreventsSlide","_rewind","_allowSlidePrev","_allowSlideNext","_swipeHandler","_noSwiping","noSwipingClass","noSwipingSelector","passiveListeners","containerModifierClass","slideClass","slideBlankClass","slideActiveClass","slideDuplicateActiveClass","slideVisibleClass","slideDuplicateClass","slideNextClass","slideDuplicateNextClass","slidePrevClass","slideDuplicatePrevClass","wrapperClass","runCallbacksOnInit","observer","observeParents","observeSlideChildren","a11y","_autoplay","_controller","coverflowEffect","cubeEffect","fadeEffect","flipEffect","creativeEffect","cardsEffect","hashNavigation","history","keyboard","lazy","mousewheel","_navigation","_pagination","parallax","_scrollbar","_thumbs","virtual","zoom"];function Mm(i={},t=!0){const e={on:{}},n={},o={};vt(e,pi.default.defaults),vt(e,pi.default.extendedDefaults),e._emitClasses=!0,e.init=!1;const s={},r=$r.map(l=>l.replace(/_/,"")),a=Object.assign({},i);return Object.keys(a).forEach(l=>{typeof i[l]!="undefined"&&(r.indexOf(l)>=0?Ot(i[l])?(e[l]={},o[l]={},vt(e[l],i[l]),vt(o[l],i[l])):(e[l]=i[l],o[l]=i[l]):l.search(/on[A-Z]/)===0&&typeof i[l]=="function"?t?n[`${l[2].toLowerCase()}${l.substr(3)}`]=i[l]:e.on[`${l[2].toLowerCase()}${l.substr(3)}`]=i[l]:s[l]=i[l])}),["navigation","pagination","scrollbar"].forEach(l=>{e[l]===!0&&(e[l]={}),e[l]===!1&&delete e[l]}),{params:e,passedParams:o,rest:s,events:n}}function jm({el:i,nextEl:t,prevEl:e,paginationEl:n,scrollbarEl:o,swiper:s},r){_i(r)&&t&&e&&(s.params.navigation.nextEl=t,s.originalParams.navigation.nextEl=t,s.params.navigation.prevEl=e,s.originalParams.navigation.prevEl=e),qi(r)&&n&&(s.params.pagination.el=n,s.originalParams.pagination.el=n),Ki(r)&&o&&(s.params.scrollbar.el=o,s.originalParams.scrollbar.el=o),s.init(i)}function Bm(i,t,e,n,o){const s=[];if(!t)return s;const r=l=>{s.indexOf(l)<0&&s.push(l)};if(e&&n){const l=n.map(o),c=e.map(o);l.join("")!==c.join("")&&r("children"),n.length!==e.length&&r("children")}return $r.filter(l=>l[0]==="_").map(l=>l.replace(/_/,"")).forEach(l=>{if(l in i&&l in t)if(Ot(i[l])&&Ot(t[l])){const c=Object.keys(i[l]),d=Object.keys(t[l]);c.length!==d.length?r(l):(c.forEach(f=>{i[l][f]!==t[l][f]&&r(l)}),d.forEach(f=>{i[l][f]!==t[l][f]&&r(l)}))}else i[l]!==t[l]&&r(l)}),s}function Tm({swiper:i,slides:t,passedParams:e,changedParams:n,nextEl:o,prevEl:s,scrollbarEl:r,paginationEl:a}){const l=n.filter(D=>D!=="children"&&D!=="direction"),{params:c,pagination:d,navigation:f,scrollbar:u,virtual:h,thumbs:m}=i;let g,v,A,C,w;n.includes("thumbs")&&e.thumbs&&e.thumbs.swiper&&c.thumbs&&!c.thumbs.swiper&&(g=!0),n.includes("controller")&&e.controller&&e.controller.control&&c.controller&&!c.controller.control&&(v=!0),n.includes("pagination")&&e.pagination&&(e.pagination.el||a)&&(c.pagination||c.pagination===!1)&&d&&!d.el&&(A=!0),n.includes("scrollbar")&&e.scrollbar&&(e.scrollbar.el||r)&&(c.scrollbar||c.scrollbar===!1)&&u&&!u.el&&(C=!0),n.includes("navigation")&&e.navigation&&(e.navigation.prevEl||s)&&(e.navigation.nextEl||o)&&(c.navigation||c.navigation===!1)&&f&&!f.prevEl&&!f.nextEl&&(w=!0);const E=D=>{!i[D]||(i[D].destroy(),D==="navigation"?(c[D].prevEl=void 0,c[D].nextEl=void 0,i[D].prevEl=void 0,i[D].nextEl=void 0):(c[D].el=void 0,i[D].el=void 0))};l.forEach(D=>{if(Ot(c[D])&&Ot(e[D]))vt(c[D],e[D]);else{const y=e[D];(y===!0||y===!1)&&(D==="navigation"||D==="pagination"||D==="scrollbar")?y===!1&&E(D):c[D]=e[D]}}),l.includes("controller")&&!v&&i.controller&&i.controller.control&&c.controller&&c.controller.control&&(i.controller.control=c.controller.control),n.includes("children")&&t&&h&&c.virtual.enabled?(h.slides=t,h.update(!0)):n.includes("children")&&i.lazy&&i.params.lazy.enabled&&i.lazy.load(),g&&m.init()&&m.update(!0),v&&(i.controller.control=c.controller.control),A&&(a&&(c.pagination.el=a),d.init(),d.render(),d.update()),C&&(r&&(c.scrollbar.el=r),u.init(),u.updateSize(),u.setTranslate()),w&&(o&&(c.navigation.nextEl=o),s&&(c.navigation.prevEl=s),f.init(),f.update()),n.includes("allowSlideNext")&&(i.allowSlideNext=e.allowSlideNext),n.includes("allowSlidePrev")&&(i.allowSlidePrev=e.allowSlidePrev),n.includes("direction")&&i.changeDirection(e.direction,!1),i.update()}const Qm=i=>({virtualData:i&512}),ea=i=>({virtualData:i[9]}),Om=i=>({virtualData:i&512}),ta=i=>({virtualData:i[9]}),Rm=i=>({virtualData:i&512}),na=i=>({virtualData:i[9]}),Fm=i=>({virtualData:i&512}),ia=i=>({virtualData:i[9]}),Hm=i=>({virtualData:i&512}),oa=i=>({virtualData:i[9]});function sa(i){let t,e,n;return{c(){t=Q("div"),e=_(),n=Q("div"),b(t,"class","swiper-button-prev"),b(n,"class","swiper-button-next")},m(o,s){B(o,t,s),i[13](t),B(o,e,s),B(o,n,s),i[14](n)},p:ne,d(o){o&&z(t),i[13](null),o&&z(e),o&&z(n),i[14](null)}}}function ra(i){let t;return{c(){t=Q("div"),b(t,"class","swiper-scrollbar")},m(e,n){B(e,t,n),i[15](t)},p:ne,d(e){e&&z(t),i[15](null)}}}function aa(i){let t;return{c(){t=Q("div"),b(t,"class","swiper-pagination")},m(e,n){B(e,t,n),i[16](t)},p:ne,d(e){e&&z(t),i[16](null)}}}function Gm(i){let t,e,n,o,s,r,a=_i(i[2]),l,c=Ki(i[2]),d,f=qi(i[2]),u,h,m;const g=i[12]["container-start"],v=xt(g,i,i[11],oa),A=i[12]["wrapper-start"],C=xt(A,i,i[11],ia),w=i[12].default,E=xt(w,i,i[11],na),D=i[12]["wrapper-end"],y=xt(D,i,i[11],ta);let L=a&&sa(i),x=c&&ra(i),R=f&&aa(i);const T=i[12]["container-end"],G=xt(T,i,i[11],ea);let U=[{class:h=ci(`${i[1]}${i[0]?` ${i[0]}`:""}`)},i[3]],P={};for(let S=0;S<U.length;S+=1)P=Ie(P,U[S]);return{c(){t=Q("div"),v&&v.c(),e=_(),n=Q("div"),C&&C.c(),o=_(),E&&E.c(),s=_(),y&&y.c(),r=_(),L&&L.c(),l=_(),x&&x.c(),d=_(),R&&R.c(),u=_(),G&&G.c(),b(n,"class","swiper-wrapper"),Sn(t,P)},m(S,j){B(S,t,j),v&&v.m(t,null),O(t,e),O(t,n),C&&C.m(n,null),O(n,o),E&&E.m(n,null),O(n,s),y&&y.m(n,null),O(t,r),L&&L.m(t,null),O(t,l),x&&x.m(t,null),O(t,d),R&&R.m(t,null),O(t,u),G&&G.m(t,null),i[17](t),m=!0},p(S,[j]){v&&v.p&&(!m||j&2560)&&Dt(v,g,S,S[11],m?kt(g,S[11],j,Hm):Lt(S[11]),oa),C&&C.p&&(!m||j&2560)&&Dt(C,A,S,S[11],m?kt(A,S[11],j,Fm):Lt(S[11]),ia),E&&E.p&&(!m||j&2560)&&Dt(E,w,S,S[11],m?kt(w,S[11],j,Rm):Lt(S[11]),na),y&&y.p&&(!m||j&2560)&&Dt(y,D,S,S[11],m?kt(D,S[11],j,Om):Lt(S[11]),ta),j&4&&(a=_i(S[2])),a?L?L.p(S,j):(L=sa(S),L.c(),L.m(t,l)):L&&(L.d(1),L=null),j&4&&(c=Ki(S[2])),c?x?x.p(S,j):(x=ra(S),x.c(),x.m(t,d)):x&&(x.d(1),x=null),j&4&&(f=qi(S[2])),f?R?R.p(S,j):(R=aa(S),R.c(),R.m(t,u)):R&&(R.d(1),R=null),G&&G.p&&(!m||j&2560)&&Dt(G,T,S,S[11],m?kt(T,S[11],j,Qm):Lt(S[11]),ea),Sn(t,P=Te(U,[(!m||j&3&&h!==(h=ci(`${S[1]}${S[0]?` ${S[0]}`:""}`)))&&{class:h},j&8&&S[3]]))},i(S){m||(k(v,S),k(C,S),k(E,S),k(y,S),k(G,S),m=!0)},o(S){M(v,S),M(C,S),M(E,S),M(y,S),M(G,S),m=!1},d(S){S&&z(t),v&&v.d(S),C&&C.d(S),E&&E.d(S),y&&y.d(S),L&&L.d(),x&&x.d(),R&&R.d(),G&&G.d(S),i[17](null)}}}function Nm(i,t,e){const n=["class","swiper"];let o=Ln(t,n),{$$slots:s={},$$scope:r}=t;const a=Dl();let{class:l=void 0}=t,c="swiper",d=!1,f=null,u=null,h,m,g,v,A=null,C=null,w=null,E=null,D=null,y={slides:[]};function L(){return f}const x=N=>{e(9,y=N),Sl().then(()=>{f.$wrapperEl.children(".swiper-slide").each(Y=>{Y.onSwiper&&Y.onSwiper(f)}),f.updateSlides(),f.updateProgress(),f.updateSlidesClasses(),f.lazy&&f.params.lazy.enabled&&f.lazy.load()})},R=()=>{h=Mm(o),e(2,m=h.params),g=h.passedParams,e(3,v=h.rest)};R(),u=g;const T=()=>{d=!0};if(m.onAny=(N,...Y)=>{a(N,Y)},Object.assign(m.on,{_beforeBreakpoint:T,_containerClasses(N,Y){e(1,c=Y)}}),f=new pi.default(m),Ii("swiper",f),f.virtual&&f.params.virtual.enabled){const N={cache:!1,renderExternal:Y=>{x(Y),m.virtual&&m.virtual.renderExternal&&m.virtual.renderExternal(Y)},renderExternalUpdate:!1};vt(f.params.virtual,N),vt(f.originalParams.virtual,N)}Ue(()=>{!A||(jm({el:A,nextEl:w,prevEl:C,paginationEl:D,scrollbarEl:E,swiper:f},m),a("swiper",[f]),!m.virtual&&f.slides.each(N=>{N.onSwiper&&N.onSwiper(f)}))}),Pi(()=>{if(!f)return;R();const N=Bm(g,u);(N.length||d)&&f&&!f.destroyed&&Tm({swiper:f,passedParams:g,changedParams:N,nextEl:w,prevEl:C,scrollbarEl:E,paginationEl:D}),d=!1,u=g}),ht(()=>{typeof window!="undefined"&&f&&!f.destroyed&&f.destroy(!0,!1)});function G(N){Be[N?"unshift":"push"](()=>{C=N,e(5,C)})}function U(N){Be[N?"unshift":"push"](()=>{w=N,e(6,w)})}function P(N){Be[N?"unshift":"push"](()=>{E=N,e(7,E)})}function S(N){Be[N?"unshift":"push"](()=>{D=N,e(8,D)})}function j(N){Be[N?"unshift":"push"](()=>{A=N,e(4,A)})}return i.$$set=N=>{t=Ie(Ie({},t),Mo(N)),e(27,o=Ln(t,n)),"class"in N&&e(0,l=N.class),"$$scope"in N&&e(11,r=N.$$scope)},[l,c,m,v,A,C,w,E,D,y,L,r,s,G,U,P,S,j]}class Wm extends se{constructor(t){super(),oe(this,t,Nm,Gm,ie,{class:0,swiper:10})}get swiper(){return this.$$.ctx[10]}}const Xm=i=>({data:i&32}),la=i=>({data:i[5]}),Ym=i=>({data:i&32}),ca=i=>({data:i[5]});function Um(i){let t;const e=i[8].default,n=xt(e,i,i[7],la);return{c(){n&&n.c()},m(o,s){n&&n.m(o,s),t=!0},p(o,s){n&&n.p&&(!t||s&160)&&Dt(n,e,o,o[7],t?kt(e,o[7],s,Xm):Lt(o[7]),la)},i(o){t||(k(n,o),t=!0)},o(o){M(n,o),t=!1},d(o){n&&n.d(o)}}}function Vm(i){let t,e,n;const o=i[8].default,s=xt(o,i,i[7],ca);return{c(){t=Q("div"),s&&s.c(),b(t,"class","swiper-zoom-container"),b(t,"data-swiper-zoom",e=typeof i[0]=="number"?i[0]:void 0)},m(r,a){B(r,t,a),s&&s.m(t,null),n=!0},p(r,a){s&&s.p&&(!n||a&160)&&Dt(s,o,r,r[7],n?kt(o,r[7],a,Ym):Lt(r[7]),ca),(!n||a&1&&e!==(e=typeof r[0]=="number"?r[0]:void 0))&&b(t,"data-swiper-zoom",e)},i(r){n||(k(s,r),n=!0)},o(r){M(s,r),n=!1},d(r){r&&z(t),s&&s.d(r)}}}function Jm(i){let t,e,n,o,s;const r=[Vm,Um],a=[];function l(f,u){return f[0]?0:1}e=l(i),n=a[e]=r[e](i);let c=[{class:o=ci(`${i[3]}${i[2]?` ${i[2]}`:""}`)},{"data-swiper-slide-index":i[1]},i[6]],d={};for(let f=0;f<c.length;f+=1)d=Ie(d,c[f]);return{c(){t=Q("div"),n.c(),Sn(t,d)},m(f,u){B(f,t,u),a[e].m(t,null),i[9](t),s=!0},p(f,[u]){let h=e;e=l(f),e===h?a[e].p(f,u):(fe(),M(a[h],1,1,()=>{a[h]=null}),he(),n=a[e],n?n.p(f,u):(n=a[e]=r[e](f),n.c()),k(n,1),n.m(t,null)),Sn(t,d=Te(c,[(!s||u&12&&o!==(o=ci(`${f[3]}${f[2]?` ${f[2]}`:""}`)))&&{class:o},(!s||u&2)&&{"data-swiper-slide-index":f[1]},u&64&&f[6]]))},i(f){s||(k(n),s=!0)},o(f){M(n),s=!1},d(f){f&&z(t),a[e].d(),i[9](null)}}}function Zm(i,t,e){let n;const o=["zoom","virtualIndex","class"];let s=Ln(t,o),{$$slots:r={},$$scope:a}=t,{zoom:l=void 0}=t,{virtualIndex:c=void 0}=t,{class:d=void 0}=t,f=null,u="swiper-slide",h=fn("swiper"),m=!1;const g=(w,E,D)=>{E===f&&e(3,u=D)},v=()=>{!h||m||(h.on("_slideClass",g),m=!0)},A=()=>{!h||(h.off("_slideClass",g),m=!1)};Ue(()=>{typeof c!="undefined"&&(e(4,f.onSwiper=w=>{h=w,v()},f),v())}),Pi(()=>{if(!(!f||!h)){if(h.destroyed){u!=="swiper-slide"&&e(3,u="swiper-slide");return}v()}}),Ci(()=>{v()}),ht(()=>{!h||A()});function C(w){Be[w?"unshift":"push"](()=>{f=w,e(4,f)})}return i.$$set=w=>{t=Ie(Ie({},t),Mo(w)),e(6,s=Ln(t,o)),"zoom"in w&&e(0,l=w.zoom),"virtualIndex"in w&&e(1,c=w.virtualIndex),"class"in w&&e(2,d=w.class),"$$scope"in w&&e(7,a=w.$$scope)},i.$$.update=()=>{i.$$.dirty&8&&e(5,n={isActive:u.indexOf("swiper-slide-active")>=0||u.indexOf("swiper-slide-duplicate-active")>=0,isVisible:u.indexOf("swiper-slide-visible")>=0,isDuplicate:u.indexOf("swiper-slide-duplicate")>=0,isPrev:u.indexOf("swiper-slide-prev")>=0||u.indexOf("swiper-slide-duplicate-prev")>=0,isNext:u.indexOf("swiper-slide-next")>=0||u.indexOf("swiper-slide-duplicate-next")>=0})},[l,c,d,u,f,n,s,a,r,C]}class _m extends se{constructor(t){super(),oe(this,t,Zm,Jm,ie,{zoom:0,virtualIndex:1,class:2})}}function qm(i){le(i,"svelte-cwtvzu",".media-item.svelte-cwtvzu.svelte-cwtvzu{height:100%}.media-content.svelte-cwtvzu.svelte-cwtvzu{width:100%;height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;-o-object-fit:inherit;object-fit:inherit}.video-icon.svelte-cwtvzu.svelte-cwtvzu{width:12.5rem;height:6.25rem;max-width:60%;max-height:60%;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%)}.video-play-button-container.svelte-cwtvzu.svelte-cwtvzu{display:none;pointer-events:auto;position:absolute;width:100%;height:100%;top:0;left:0}.video-play-button-container.showPlayButton.svelte-cwtvzu.svelte-cwtvzu{display:block}.video-icon.large.svelte-cwtvzu.svelte-cwtvzu{width:12.5rem;height:6.25rem}.video-icon.small.svelte-cwtvzu.svelte-cwtvzu{width:1.75rem;height:1.75rem}.video-icon.svelte-cwtvzu .video-icon-img.svelte-cwtvzu{width:100%;height:100%;background-position:center center;background-size:contain;background-repeat:no-repeat}.video-icon.svelte-cwtvzu .video-icon-img.canPlay.svelte-cwtvzu{cursor:pointer}")}function da(i){let t;function e(s,r){if(s[0].type==="Image")return $m;if(s[0].type==="Video")return Km}let n=e(i),o=n&&n(i);return{c(){t=Q("div"),o&&o.c(),b(t,"class","media-item svelte-cwtvzu")},m(s,r){B(s,t,r),o&&o.m(t,null)},p(s,r){n===(n=e(s))&&o?o.p(s,r):(o&&o.d(1),o=n&&n(s),o&&(o.c(),o.m(t,null)))},d(s){s&&z(t),o&&o.d()}}}function Km(i){let t,e,n,o,s,r,a,l,c,d,f;return{c(){var u;t=Q("video"),r=_(),a=Q("div"),l=Q("div"),c=Q("div"),b(t,"class","media-content svelte-cwtvzu"),b(t,"style",e=`object-fit: ${i[3]};`),qe(t.src,n=i[0].url+"#t=0.1")||b(t,"src",n),b(t,"poster",o=(u=i[0].videoCoverUrl)!=null?u:void 0),b(t,"preload",s=i[0].videoCoverUrl?void 0:"auto"),t.playsInline=!0,b(t,"paused",""),t.loop=!1,b(t,"crossorigin",""),t.controls=!1,q(t,"showPlayButton",i[5]),b(c,"class","video-icon-img svelte-cwtvzu"),F(c,"background-image","url("+(i[1]==="large"?Xr:Yr)+")"),q(c,"canPlay",i[2]),b(l,"class","video-icon svelte-cwtvzu"),q(l,"large",i[1]==="large"),q(l,"small",i[1]==="small"),b(a,"class","video-play-button-container svelte-cwtvzu"),q(a,"showPlayButton",i[5])},m(u,h){B(u,t,h),i[7](t),B(u,r,h),B(u,a,h),O(a,l),O(l,c),d||(f=[xe(t,"click",i[6]),xe(c,"click",i[8])],d=!0)},p(u,h){var m;h&8&&e!==(e=`object-fit: ${u[3]};`)&&b(t,"style",e),h&1&&!qe(t.src,n=u[0].url+"#t=0.1")&&b(t,"src",n),h&1&&o!==(o=(m=u[0].videoCoverUrl)!=null?m:void 0)&&b(t,"poster",o),h&1&&s!==(s=u[0].videoCoverUrl?void 0:"auto")&&b(t,"preload",s),h&32&&q(t,"showPlayButton",u[5]),h&2&&F(c,"background-image","url("+(u[1]==="large"?Xr:Yr)+")"),h&4&&q(c,"canPlay",u[2]),h&2&&q(l,"large",u[1]==="large"),h&2&&q(l,"small",u[1]==="small"),h&32&&q(a,"showPlayButton",u[5])},d(u){u&&z(t),i[7](null),u&&z(r),u&&z(a),d=!1,at(f)}}}function $m(i){let t,e,n,o;return{c(){t=Q("img"),b(t,"class","media-content svelte-cwtvzu"),b(t,"style",e=`object-fit: ${i[3]};`),qe(t.src,n=i[0].url)||b(t,"src",n),b(t,"alt",o=i[0].name)},m(s,r){B(s,t,r)},p(s,r){r&8&&e!==(e=`object-fit: ${s[3]};`)&&b(t,"style",e),r&1&&!qe(t.src,n=s[0].url)&&b(t,"src",n),r&1&&o!==(o=s[0].name)&&b(t,"alt",o)},d(s){s&&z(t)}}}function ep(i){let t,e=i[0]&&da(i);return{c(){e&&e.c(),t=Ae()},m(n,o){e&&e.m(n,o),B(n,t,o)},p(n,[o]){n[0]?e?e.p(n,o):(e=da(n),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},i:ne,o:ne,d(n){e&&e.d(n),n&&z(t)}}}function tp(i,t,e){let{media:n}=t,{playButtonIfNeed:o="small"}=t,{canPlay:s=!0}=t,{objectFit:r="cover"}=t,a,l=!1;const c=()=>a==null?void 0:a.pause();function d(u){Be[u?"unshift":"push"](()=>{a=u,e(4,a)})}const f=()=>{!s||a&&a.play()};return i.$$set=u=>{"media"in u&&e(0,n=u.media),"playButtonIfNeed"in u&&e(1,o=u.playButtonIfNeed),"canPlay"in u&&e(2,s=u.canPlay),"objectFit"in u&&e(3,r=u.objectFit)},i.$$.update=()=>{i.$$.dirty&16&&a&&(e(5,l=a.paused),a.addEventListener("play",()=>{e(5,l=!1)}),a.addEventListener("pause",()=>{e(5,l=!0)}))},[n,o,s,r,a,l,c,d,f]}class ua extends se{constructor(t){super(),oe(this,t,tp,ep,ie,{media:0,playButtonIfNeed:1,canPlay:2,objectFit:3},qm)}}function np(i){le(i,"svelte-ai0lv9",".media.svelte-ai0lv9{width:100%;height:100%;position:relative;overflow:hidden;border-radius:0.125rem}")}function fa(i,t,e){const n=i.slice();return n[23]=t[e],n}function ha(i){let t,e,n,o,s,r;const a=[op,ip],l=[];function c(d,f){return d[13]?0:1}return e=c(i),n=l[e]=a[e](i),{c(){t=Q("div"),n.c(),b(t,"class","media svelte-ai0lv9"),q(t,"unfolded",i[4])},m(d,f){B(d,t,f),l[e].m(t,null),r=!0},p(d,f){i=d;let u=e;e=c(i),e===u?l[e].p(i,f):(fe(),M(l[u],1,1,()=>{l[u]=null}),he(),n=l[e],n?n.p(i,f):(n=l[e]=a[e](i),n.c()),k(n,1),n.m(t,null)),(!r||f&16)&&q(t,"unfolded",i[4])},i(d){r||(k(n),d&&De(()=>{s&&s.end(1),o=zt(t,_o,i[5]?{y:4,duration:i[3],delay:i[1],easing:Xt}:void 0),o.start()}),r=!0)},o(d){M(n),o&&o.invalidate(),d&&(s=Ut(t,_o,i[5]?{y:4,duration:i[3],delay:i[2],easing:Xt}:void 0)),r=!1},d(d){d&&z(t),l[e].d(),d&&s&&s.end()}}}function ip(i){let t,e;return t=new ua({props:{media:i[0][0],objectFit:i[8],playButtonIfNeed:i[6],canPlay:i[7]}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.media=n[0][0]),o&256&&(s.objectFit=n[8]),o&64&&(s.playButtonIfNeed=n[6]),o&128&&(s.canPlay=n[7]),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function op(i){let t,e;return t=new Wm({props:{style:"height: 100%",modules:[po.Autoplay],spaceBetween:30,autoplay:i[14]?Se({delay:4e3,stopOnLastSlide:!1,disableOnInteraction:!1}):!1,loop:!0,$$slots:{default:[rp]},$$scope:{ctx:i}}}),t.$on("init",i[19]),t.$on("slideChange",i[20]),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&16384&&(s.autoplay=n[14]?Se({delay:4e3,stopOnLastSlide:!1,disableOnInteraction:!1}):!1),o&67111360&&(s.$$scope={dirty:o,ctx:n}),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function sp(i){let t,e,n;return t=new ua({props:{media:i[23],objectFit:i[8],playButtonIfNeed:i[6],canPlay:i[7]}}),{c(){ee(t.$$.fragment),e=_()},m(o,s){K(t,o,s),B(o,e,s),n=!0},p(o,s){const r={};s&2048&&(r.media=o[23]),s&256&&(r.objectFit=o[8]),s&64&&(r.playButtonIfNeed=o[6]),s&128&&(r.canPlay=o[7]),t.$set(r)},i(o){n||(k(t.$$.fragment,o),n=!0)},o(o){M(t.$$.fragment,o),n=!1},d(o){$(t,o),o&&z(e)}}}function ma(i){let t,e;return t=new _m({props:{$$slots:{default:[sp]},$$scope:{ctx:i}}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&67111360&&(s.$$scope={dirty:o,ctx:n}),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function rp(i){let t,e,n=i[11],o=[];for(let r=0;r<n.length;r+=1)o[r]=ma(fa(i,n,r));const s=r=>M(o[r],1,1,()=>{o[r]=null});return{c(){for(let r=0;r<o.length;r+=1)o[r].c();t=Ae()},m(r,a){for(let l=0;l<o.length;l+=1)o[l].m(r,a);B(r,t,a),e=!0},p(r,a){if(a&2496){n=r[11];let l;for(l=0;l<n.length;l+=1){const c=fa(r,n,l);o[l]?(o[l].p(c,a),k(o[l],1)):(o[l]=ma(c),o[l].c(),k(o[l],1),o[l].m(t.parentNode,t))}for(fe(),l=n.length;l<o.length;l+=1)s(l);he()}},i(r){if(!e){for(let a=0;a<n.length;a+=1)k(o[a]);e=!0}},o(r){o=o.filter(Boolean);for(let a=0;a<o.length;a+=1)M(o[a]);e=!1},d(r){Ke(o,r),r&&z(t)}}}function ap(i){let t,e,n=i[4]&&ha(i);return{c(){n&&n.c(),t=Ae()},m(o,s){n&&n.m(o,s),B(o,t,s),e=!0},p(o,[s]){o[4]?n?(n.p(o,s),s&16&&k(n,1)):(n=ha(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(fe(),M(n,1,1,()=>{n=null}),he())},i(o){e||(k(n),e=!0)},o(o){M(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function lp(i,t,e){let n,o,s,{tag:r}=t,{mediaData:a}=t,{inDelay:l=0}=t,{outDelay:c=0}=t,{duration:d=0}=t,{unfolded:f=!0}=t,{animation:u=!0}=t,{playButtonIfNeed:h="small"}=t,{canPlay:m=!0}=t,{objectFit:g="cover"}=t,{enableCarousel:v=!0}=t,{autoplayConfig:A={autoplay:!0,autoplayVideo:!1}}=t;const C=fn("mediaStore"),w=fn("hooks");let E;function D(T){!n||!E||(C.set({currentMediaUrl:this.src}),w.emit("playStateChange",{event:T,state:"playing",tag:r,mediaInstance:this}),E.autoplay.stop())}function y(T){!n||!E||(w.emit("playStateChange",{event:T,state:"paused",tag:r,mediaInstance:this}),E.autoplay.running||E.autoplay.start())}let L=null;const x=T=>{e(10,E=T.detail[0])},R=T=>Z(this,null,function*(){var N,Y,te;if(!s||!A.autoplayVideo)return;const G=T.detail[0];if(!G)return;const U=G.realIndex;if(U===L)return;e(12,L=U);const P=o[U];if(!P||P.type!=="Video")return;G.autoplay.stop(),G.slides.map(X=>X.querySelector("video")).filter(Qt).forEach(X=>X.pause());const j=(N=G.slides[G.activeIndex])==null?void 0:N.querySelector("video");if(j&&(j.removeEventListener("play",D),j.removeEventListener("pause",y),j.addEventListener("play",D),j.addEventListener("pause",y)),j){j.addEventListener("click",()=>j.pause());const X=(te=(Y=j.parentElement)==null?void 0:Y.getElementsByClassName("video-play-button-container"))==null?void 0:te[0];j.addEventListener("play",()=>X==null?void 0:X.classList.remove("showPlayButton")),j.addEventListener("pause",()=>X==null?void 0:X.classList.add("showPlayButton")),X&&(j.paused?X.classList.add("showPlayButton"):X.classList.remove("showPlayButton"),X.addEventListener("click",()=>j.play()))}});return i.$$set=T=>{"tag"in T&&e(17,r=T.tag),"mediaData"in T&&e(0,a=T.mediaData),"inDelay"in T&&e(1,l=T.inDelay),"outDelay"in T&&e(2,c=T.outDelay),"duration"in T&&e(3,d=T.duration),"unfolded"in T&&e(4,f=T.unfolded),"animation"in T&&e(5,u=T.animation),"playButtonIfNeed"in T&&e(6,h=T.playButtonIfNeed),"canPlay"in T&&e(7,m=T.canPlay),"objectFit"in T&&e(8,g=T.objectFit),"enableCarousel"in T&&e(18,v=T.enableCarousel),"autoplayConfig"in T&&e(9,A=T.autoplayConfig)},i.$$.update=()=>{i.$$.dirty&262145&&e(13,n=v&&(a==null?void 0:a.length)>1),i.$$.dirty&1&&e(11,o=a),i.$$.dirty&2560&&e(14,s=o.length>1&&A.autoplay),i.$$.dirty&1024&&E&&E.slides.forEach(T=>{const G=T.querySelector("video");G&&C.subscribe(({currentMediaUrl:U})=>{U!==G.src&&G.pause()})})},[a,l,c,d,f,u,h,m,g,A,E,o,L,n,s,D,y,r,v,x,R]}class pa extends se{constructor(t){super(),oe(this,t,lp,ap,ie,{tag:17,mediaData:0,inDelay:1,outDelay:2,duration:3,unfolded:4,animation:5,playButtonIfNeed:6,canPlay:7,objectFit:8,enableCarousel:18,autoplayConfig:9},np)}}function cp(i){le(i,"svelte-1f7m1lj",".line.svelte-1f7m1lj{position:absolute;width:6.5625rem;height:1.3125rem;transform:translateY(-100%)}.text.svelte-1f7m1lj{position:absolute;width:6.25rem;left:1rem;bottom:0.0625rem;font-weight:600}.media-wrapper.svelte-1f7m1lj{position:absolute;left:0.875rem;top:-5.3125rem;width:5.625rem;height:3.75rem;font-weight:600}")}function ga(i,t,e){const n=i.slice();return n[5]=t[e].id,n[1]=t[e].content,n}function Aa(i){let t,e,n,o,s,r=[],a=new Map,l,c,d;t=new Ze({props:{visible:i[4],left:61,bottom:57,width:2,blurRadius:150,spreadRadius:75}}),o=new zm({props:{unfolded:i[4],duration:1e3,outDelay:400}});let f=i[2];const u=m=>m[5];for(let m=0;m<f.length;m+=1){let g=ga(i,f,m),v=u(g);a.set(v,r[m]=va(v,g))}let h=i[3]&&ba(i);return{c(){ee(t.$$.fragment),e=_(),n=Q("div"),ee(o.$$.fragment),s=_();for(let m=0;m<r.length;m+=1)r[m].c();l=_(),h&&h.c(),c=Ae(),b(n,"class","line svelte-1f7m1lj")},m(m,g){K(t,m,g),B(m,e,g),B(m,n,g),K(o,n,null),B(m,s,g);for(let v=0;v<r.length;v+=1)r[v].m(m,g);B(m,l,g),h&&h.m(m,g),B(m,c,g),d=!0},p(m,g){const v={};g&16&&(v.visible=m[4]),t.$set(v);const A={};g&16&&(A.unfolded=m[4]),o.$set(A),g&20&&(f=m[2],fe(),r=Ve(r,g,u,1,m,f,a,l.parentNode,lt,va,l,ga),he()),m[3]?h?(h.p(m,g),g&8&&k(h,1)):(h=ba(m),h.c(),k(h,1),h.m(c.parentNode,c)):h&&(fe(),M(h,1,1,()=>{h=null}),he())},i(m){if(!d){k(t.$$.fragment,m),k(o.$$.fragment,m);for(let g=0;g<f.length;g+=1)k(r[g]);k(h),d=!0}},o(m){M(t.$$.fragment,m),M(o.$$.fragment,m);for(let g=0;g<r.length;g+=1)M(r[g]);M(h),d=!1},d(m){$(t,m),m&&z(e),m&&z(n),$(o),m&&z(s);for(let g=0;g<r.length;g+=1)r[g].d(m);m&&z(l),h&&h.d(m),m&&z(c)}}}function va(i,t){let e,n,o;return n=new Wr({props:{unfolded:t[4],content:t[1],inDelay:500}}),{key:i,first:null,c(){e=Q("div"),ee(n.$$.fragment),b(e,"class","text svelte-1f7m1lj"),this.first=e},m(s,r){B(s,e,r),K(n,e,null),o=!0},p(s,r){t=s;const a={};r&16&&(a.unfolded=t[4]),r&4&&(a.content=t[1]),n.$set(a)},i(s){o||(k(n.$$.fragment,s),o=!0)},o(s){M(n.$$.fragment,s),o=!1},d(s){s&&z(e),$(n)}}}function ba(i){let t,e,n;return e=new pa({props:{autoplayConfig:{autoplay:!1},unfolded:i[4],mediaData:i[3],tag:i[0],enableCarousel:!1,canPlay:!1,playButtonIfNeed:"small",inDelay:500,duration:500}}),{c(){t=Q("div"),ee(e.$$.fragment),b(t,"class","media-wrapper svelte-1f7m1lj")},m(o,s){B(o,t,s),K(e,t,null),n=!0},p(o,s){const r={};s&16&&(r.unfolded=o[4]),s&8&&(r.mediaData=o[3]),s&1&&(r.tag=o[0]),e.$set(r)},i(o){n||(k(e.$$.fragment,o),n=!0)},o(o){M(e.$$.fragment,o),n=!1},d(o){o&&z(t),$(e)}}}function dp(i){let t,e,n=i[0].state&&Aa(i);return{c(){n&&n.c(),t=Ae()},m(o,s){n&&n.m(o,s),B(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&k(n,1)):(n=Aa(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(fe(),M(n,1,1,()=>{n=null}),he())},i(o){e||(k(n),e=!0)},o(o){M(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function up(i,t,e){let n,o,s,{tag:r}=t,a;return i.$$set=l=>{"tag"in l&&e(0,r=l.tag)},i.$$.update=()=>{var l,c,d;i.$$.dirty&1&&e(4,n=r.state?r.state.unfolded:!1),i.$$.dirty&1&&e(1,o=((c=(l=r.data.text)==null?void 0:l.length)!=null?c:0)>7?((d=r.data.text)==null?void 0:d.substring(0,6))+"...":r.data.text),i.$$.dirty&1&&e(3,s=r.data.mediaData),i.$$.dirty&2&&e(2,a=o?[{id:Fe(),content:o}]:[])},[r,o,a,s,n]}class fp extends se{constructor(t){super(),oe(this,t,up,dp,ie,{tag:0},cp)}}function hp(i){le(i,"svelte-8mby9k",".svelte-8mby9k.svelte-8mby9k{box-sizing:border-box}.marketing.svelte-8mby9k.svelte-8mby9k{transform:translateY(-100%)}.content.svelte-8mby9k .headerImage.svelte-8mby9k{position:absolute;width:100%;top:0.25rem;transform:translateY(-100%);border-top-left-radius:0.25rem;border-top-right-radius:0.25rem}.line.svelte-8mby9k.svelte-8mby9k{position:absolute;height:2.0625rem;width:0.0625rem;left:50%;transform:translateX(-50%);background-color:white;bottom:0;transform-origin:bottom;transition:all 500ms}.content.svelte-8mby9k.svelte-8mby9k{background-color:white;position:relative;display:flex;flex-direction:column;min-width:11.125rem;width:-moz-max-content;width:max-content;height:-moz-max-content;height:max-content;border-radius:0.25rem;top:-1.875rem;left:-1rem;padding:0.5rem 0rem 0.5625rem;transition:all 500ms}.title.svelte-8mby9k.svelte-8mby9k{position:absolute;background-color:white;border-radius:0.25rem;width:100%;top:0.5rem;padding-left:0.75rem;padding-right:0.75rem}.title.svelte-8mby9k .text.svelte-8mby9k{display:block;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:0.75rem;font-weight:bold;line-height:1.125rem;color:#000}.footer.svelte-8mby9k.svelte-8mby9k{position:relative;padding-left:0.75rem;padding-right:0.75rem;width:100%;height:1.375rem;display:flex;align-items:center}.footer.svelte-8mby9k .goto-button.svelte-8mby9k{flex-shrink:0;white-space:nowrap;background-image:linear-gradient(to right, rgba(87, 144, 253, 1) 0, rgba(42, 114, 254, 1) 100%);color:#fff;font-size:0.625rem;border-radius:0.875rem;font-weight:bold;padding-left:0.5rem;padding-right:0.5rem;height:1.25rem;margin-left:auto;display:flex;align-items:center}.footer.svelte-8mby9k .goto-icon.svelte-8mby9k::after{content:'';display:inline-block;width:0.75rem;height:0.75rem;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAMAAADW3miqAAAAeFBMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////GqOSsAAAAJ3RSTlMAFNO2pYt4bErz8uP6ysawgVtBPDcR5C4s2L6ZmJBzZGJXUyEeDws/0G2zAAAAkklEQVQ4y+3TRw6DMBAF0OAeJ3QCpCe0uf8NwRILLBYfiS1/aT3JoymnI+sERZ5VCH0iVto3QDfBLmeSSMUTogRV9bBEpJAKaYpGijn13aTSLeraeG9D0NZFZv4/rRL5FDHnITlllqjv6tykWsmX4JHr05y7j6oFKq2P8He48B0tAM0EY0EDxquClw6vLz6EI35GmwwSZpe+WOgAAAAASUVORK5CYII=);background-size:100% auto;background-repeat:no-repeat}.price.svelte-8mby9k.svelte-8mby9k{flex-shrink:0;margin-right:0.75rem;white-space:nowrap;color:#ff6600;display:flex;align-items:baseline}.price.svelte-8mby9k .value.svelte-8mby9k{position:relative;top:0.0625rem;font-size:1.125rem;line-height:1.375rem;font-family:TG-TYPE, PingFangSC, Segoe UI, Rototo, sans-serif;letter-spacing:0rem}.price.svelte-8mby9k .unit.svelte-8mby9k{padding-left:0.125rem;font-size:0.625rem}.tag.svelte-8mby9k.svelte-8mby9k{position:relative;background-color:white;display:flex;width:-moz-max-content;width:max-content;padding-left:0.75rem;padding-right:0.75rem;min-height:1.75rem}.tag.svelte-8mby9k .base-tag.svelte-8mby9k{height:1rem;margin-top:1.375rem;margin-bottom:0.5rem;margin-right:0.25rem;font-size:0.625rem;line-height:0.875rem;padding:0.0625rem 0.25rem;border-radius:0.125rem;overflow:hidden}.tag.svelte-8mby9k .primary-tag.svelte-8mby9k{background:#e5eefe;color:#0055ff}.tag.svelte-8mby9k .secondary-tag.svelte-8mby9k{background:rgba(255, 102, 0, 0.08);color:rgba(255, 102, 0, 1)}.unfolded.svelte-8mby9k .line.svelte-8mby9k{transform:translateX(-50%) scale(1, 1)}.folded.svelte-8mby9k .line.svelte-8mby9k{transform:translateX(-50%) scale(1, 0);transition-timing-function:ease-in}.unfolded.svelte-8mby9k .content.svelte-8mby9k{opacity:1}.folded.svelte-8mby9k .content.svelte-8mby9k{opacity:0;transform:translateY(0.425rem);transition-timing-function:ease-in}")}function ya(i,t,e){const n=i.slice();return n[0]=t[e],n}function wa(i,t,e){const n=i.slice();return n[0]=t[e],n}function Ca(i){let t,e=i[0]+"",n;return{c(){t=Q("div"),n=Le(e),b(t,"class","base-tag primary-tag svelte-8mby9k")},m(o,s){B(o,t,s),O(t,n)},p(o,s){s&4&&e!==(e=o[0]+"")&&je(n,e)},d(o){o&&z(t)}}}function Pa(i){let t,e=i[0]&&Ca(i);return{c(){e&&e.c(),t=Ae()},m(n,o){e&&e.m(n,o),B(n,t,o)},p(n,o){n[0]?e?e.p(n,o):(e=Ca(n),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},d(n){e&&e.d(n),n&&z(t)}}}function Ia(i){let t,e=i[0]+"",n;return{c(){t=Q("div"),n=Le(e),b(t,"class","base-tag secondary-tag svelte-8mby9k")},m(o,s){B(o,t,s),O(t,n)},p(o,s){s&4&&e!==(e=o[0]+"")&&je(n,e)},d(o){o&&z(t)}}}function Ea(i){let t,e=i[0]&&Ia(i);return{c(){e&&e.c(),t=Ae()},m(n,o){e&&e.m(n,o),B(n,t,o)},p(n,o){n[0]?e?e.p(n,o):(e=Ia(n),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},d(n){e&&e.d(n),n&&z(t)}}}function xa(i){let t,e,n=i[2].price.value+"",o,s,r=i[2].price.unit&&ka(i);return{c(){t=Q("div"),e=Q("span"),o=Le(n),s=_(),r&&r.c(),b(e,"class","value svelte-8mby9k"),b(t,"class","price svelte-8mby9k")},m(a,l){B(a,t,l),O(t,e),O(e,o),O(t,s),r&&r.m(t,null)},p(a,l){l&4&&n!==(n=a[2].price.value+"")&&je(o,n),a[2].price.unit?r?r.p(a,l):(r=ka(a),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(a){a&&z(t),r&&r.d()}}}function ka(i){let t,e=i[2].price.unit+"",n;return{c(){t=Q("span"),n=Le(e),b(t,"class","unit svelte-8mby9k")},m(o,s){B(o,t,s),O(t,n)},p(o,s){s&4&&e!==(e=o[2].price.unit+"")&&je(n,e)},d(o){o&&z(t)}}}function Da(i){let t,e=i[2].highlightText+"",n;return{c(){t=Q("div"),n=Le(e),b(t,"class","goto-button goto-icon svelte-8mby9k")},m(o,s){B(o,t,s),O(t,n)},p(o,s){s&4&&e!==(e=o[2].highlightText+"")&&je(n,e)},d(o){o&&z(t)}}}function mp(i){var G,U;let t,e,n,o,s,r,a,l,c,d,f,u,h,m,g=i[2].title+"",v,A,C,w,E;e=new Ze({props:{visible:i[1],outDelay:500,left:61,bottom:87,blurRadius:150,spreadRadius:75}});let D=i[2].brandTags||[],y=[];for(let P=0;P<D.length;P+=1)y[P]=Pa(wa(i,D,P));let L=i[2].tags||[],x=[];for(let P=0;P<L.length;P+=1)x[P]=Ea(ya(i,L,P));let R=((G=i[2].price)==null?void 0:G.value)!==void 0&&((U=i[2].price)==null?void 0:U.value)!==null&&xa(i),T=i[2].highlightText&&Da(i);return{c(){var P,S;t=Q("div"),ee(e.$$.fragment),n=_(),o=Q("div"),s=_(),r=Q("div"),a=Q("img"),c=_(),d=Q("div");for(let j=0;j<y.length;j+=1)y[j].c();f=_();for(let j=0;j<x.length;j+=1)x[j].c();u=_(),h=Q("div"),m=Q("div"),v=Le(g),A=_(),C=Q("div"),R&&R.c(),w=_(),T&&T.c(),b(o,"class","line svelte-8mby9k"),F(o,"transition-delay",i[1]?di+"ms":ui+Sa-La-40+"ms"),b(a,"class","headerImage svelte-8mby9k"),qe(a.src,l=i[2].headerPictureUrl)||b(a,"src",l),b(a,"alt",""),b(d,"class","tag svelte-8mby9k"),b(m,"class","text svelte-8mby9k"),b(h,"class","title svelte-8mby9k"),b(C,"class","footer svelte-8mby9k"),F(C,"height",((P=i[2].price)==null?void 0:P.value)!==void 0&&((S=i[2].price)==null?void 0:S.value)!==null&&i[2].highlightText?void 0:"1rem"),b(r,"class","content svelte-8mby9k"),F(r,"transition-delay",i[1]?di+ui+"ms":"0ms"),b(t,"class","marketing svelte-8mby9k"),q(t,"unfolded",i[1]),q(t,"folded",i[3])},m(P,S){B(P,t,S),K(e,t,null),O(t,n),O(t,o),O(t,s),O(t,r),O(r,a),O(r,c),O(r,d);for(let j=0;j<y.length;j+=1)y[j].m(d,null);O(d,f);for(let j=0;j<x.length;j+=1)x[j].m(d,null);O(r,u),O(r,h),O(h,m),O(m,v),O(r,A),O(r,C),R&&R.m(C,null),O(C,w),T&&T.m(C,null),E=!0},p(P,[S]){var N,Y,te,X;const j={};if(S&2&&(j.visible=P[1]),e.$set(j),S&2&&F(o,"transition-delay",P[1]?di+"ms":ui+Sa-La-40+"ms"),(!E||S&4&&!qe(a.src,l=P[2].headerPictureUrl))&&b(a,"src",l),S&4){D=P[2].brandTags||[];let V;for(V=0;V<D.length;V+=1){const ce=wa(P,D,V);y[V]?y[V].p(ce,S):(y[V]=Pa(ce),y[V].c(),y[V].m(d,f))}for(;V<y.length;V+=1)y[V].d(1);y.length=D.length}if(S&4){L=P[2].tags||[];let V;for(V=0;V<L.length;V+=1){const ce=ya(P,L,V);x[V]?x[V].p(ce,S):(x[V]=Ea(ce),x[V].c(),x[V].m(d,null))}for(;V<x.length;V+=1)x[V].d(1);x.length=L.length}(!E||S&4)&&g!==(g=P[2].title+"")&&je(v,g),((N=P[2].price)==null?void 0:N.value)!==void 0&&((Y=P[2].price)==null?void 0:Y.value)!==null?R?R.p(P,S):(R=xa(P),R.c(),R.m(C,w)):R&&(R.d(1),R=null),P[2].highlightText?T?T.p(P,S):(T=Da(P),T.c(),T.m(C,null)):T&&(T.d(1),T=null),S&4&&F(C,"height",((te=P[2].price)==null?void 0:te.value)!==void 0&&((X=P[2].price)==null?void 0:X.value)!==null&&P[2].highlightText?void 0:"1rem"),S&2&&F(r,"transition-delay",P[1]?di+ui+"ms":"0ms"),(!E||S&2)&&q(t,"unfolded",P[1]),(!E||S&8)&&q(t,"folded",P[3])},i(P){E||(k(e.$$.fragment,P),E=!0)},o(P){M(e.$$.fragment,P),E=!1},d(P){P&&z(t),$(e),Ke(y,P),Ke(x,P),R&&R.d(),T&&T.d()}}}const di=400,La=500,ui=180,Sa=500;function pp(i,t,e){let n,o,s,{tag:r}=t;return i.$$set=a=>{"tag"in a&&e(0,r=a.tag)},i.$$.update=()=>{var a,l;i.$$.dirty&1&&e(1,n=(l=(a=r.state)==null?void 0:a.unfolded)!=null?l:!1),i.$$.dirty&2&&e(3,o=!n),i.$$.dirty&1&&e(2,s=r.data)},[r,n,s,o]}class gp extends se{constructor(t){super(),oe(this,t,pp,mp,ie,{tag:0},hp)}}function Ap(i){le(i,"svelte-1ku3wt4",`.audio.svelte-1ku3wt4.svelte-1ku3wt4{position:relative;width:100%;height:100%;cursor:pointer}@keyframes svelte-1ku3wt4-playing{25%{background-image:url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='9' cy='9' r='8' transform='translate(-1 -1)' fill='%23FFF' fill-rule='nonzero'/%3E%3C/svg%3E")}50%{background-image:url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0zM5.533 6.685L4.169 8.049l1.414 1.413a2.078 2.078 0 0 0-.05-2.777z' fill='%23FFF' fill-rule='nonzero'/%3E%3C/svg%3E")}75%{background-image:url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0zm-.656 4.874l-.906.905A3.35 3.35 0 0 1 7.369 8.1c0 .875-.333 1.67-.88 2.268l.906.906A4.628 4.628 0 0 0 8.65 8.101a4.627 4.627 0 0 0-1.306-3.227zm-1.811 1.81L4.169 8.05l1.414 1.413a2.078 2.078 0 0 0-.05-2.777z' fill='%23FFF' fill-rule='nonzero'/%3E%3C/svg%3E")}}.paused.svelte-1ku3wt4 .audio-icon.svelte-1ku3wt4{animation:none}.audio-icon.svelte-1ku3wt4.svelte-1ku3wt4{width:100%;height:100%;border-radius:50%;background-size:100%;animation:svelte-1ku3wt4-playing 2s steps(1) infinite;background-image:url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0zm1.428 2.79l-.953.952a6.222 6.222 0 0 1 1.775 4.36c0 1.571-.58 3.006-1.538 4.103l-.184.202.793.794a7.344 7.344 0 0 0 2.21-5.26A7.341 7.341 0 0 0 9.428 2.79zM7.344 4.873l-.906.905A3.35 3.35 0 0 1 7.369 8.1c0 .802-.28 1.537-.748 2.115l-.132.153.906.906A4.628 4.628 0 0 0 8.65 8.101a4.627 4.627 0 0 0-1.306-3.227zm-1.811 1.81L4.169 8.05l1.414 1.413a2.078 2.078 0 0 0-.05-2.777z' fill='%23FFF' fill-rule='nonzero'/%3E%3C/svg%3E")}`)}function za(i){let t,e,n,o,s,r,a,l=!0,c,d,f,u,h;return e=new Ze({props:{center:!0,blurRadius:15,spreadRadius:6}}),{c(){t=Q("div"),ee(e.$$.fragment),n=_(),o=Q("div"),s=_(),r=Q("audio"),b(o,"class","audio-icon svelte-1ku3wt4"),r.controls=!1,b(r,"playsinline",""),qe(r.src,a=i[3])||b(r,"src",a),b(t,"class","audio svelte-1ku3wt4"),q(t,"paused",i[6])},m(m,g){B(m,t,g),K(e,t,null),O(t,n),O(t,o),O(t,s),O(t,r),i[9](r),f=!0,u||(h=[xe(r,"play",i[10]),xe(r,"pause",i[10]),xe(t,"click",yi(i[7]))],u=!0)},p(m,g){i=m,(!f||g&8&&!qe(r.src,a=i[3]))&&b(r,"src",a),g&64&&l!==(l=i[6])&&r[l?"pause":"play"](),(!f||g&64)&&q(t,"paused",i[6])},i(m){f||(k(e.$$.fragment,m),m&&De(()=>{d&&d.end(1),c=zt(t,Mt,{duration:i[2],delay:i[0],easing:Vt}),c.start()}),f=!0)},o(m){M(e.$$.fragment,m),c&&c.invalidate(),m&&(d=Ut(t,Mt,{duration:i[2],delay:i[1],easing:Vt})),f=!1},d(m){m&&z(t),$(e),i[9](null),m&&d&&d.end(),u=!1,at(h)}}}function vp(i){let t,e,n=i[4]&&za(i);return{c(){n&&n.c(),t=Ae()},m(o,s){n&&n.m(o,s),B(o,t,s),e=!0},p(o,[s]){o[4]?n?(n.p(o,s),s&16&&k(n,1)):(n=za(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(fe(),M(n,1,1,()=>{n=null}),he())},i(o){e||(k(n),e=!0)},o(o){M(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function bp(i,t,e){let{inDelay:n=0}=t,{outDelay:o=0}=t,{duration:s=0}=t,{url:r}=t,{unfolded:a}=t,{hooksInfo:l={}}=t;const c=fn("hooks"),d=fn("mediaStore");let f,u=!0;d.subscribe(({currentMediaUrl:v})=>{v!==r&&(f==null||f.pause())});function h(v){d.set({currentMediaUrl:r}),f&&(c.emit("click",W({event:v,target:"AudioTagPlayIcon",audioInstance:f},l)),f.paused?f.play():f.pause(),e(5,f.onplay=A=>c.emit("playStateChange",W({event:A,state:"playing",mediaInstance:f},l)),f),e(5,f.onpause=A=>c.emit("playStateChange",W({event:A,state:"paused",mediaInstance:f},l)),f))}function m(v){Be[v?"unshift":"push"](()=>{f=v,e(5,f)})}function g(){u=this.paused,e(6,u)}return i.$$set=v=>{"inDelay"in v&&e(0,n=v.inDelay),"outDelay"in v&&e(1,o=v.outDelay),"duration"in v&&e(2,s=v.duration),"url"in v&&e(3,r=v.url),"unfolded"in v&&e(4,a=v.unfolded),"hooksInfo"in v&&e(8,l=v.hooksInfo)},i.$$.update=()=>{i.$$.dirty&48&&(a||f==null||f.pause())},[n,o,s,r,a,f,u,h,l,m,g]}class yp extends se{constructor(t){super(),oe(this,t,bp,vp,ie,{inDelay:0,outDelay:1,duration:2,url:3,unfolded:4,hooksInfo:8},Ap)}}function wp(i){le(i,"svelte-4r8s18",".audio-tag.svelte-4r8s18.svelte-4r8s18{position:absolute;left:0;top:0;width:0;height:0;overflow:visible}.line.svelte-4r8s18.svelte-4r8s18{display:flex;position:absolute;top:0;left:0;width:10.125rem;height:0.0625rem;transform:translate3d(0, -50%, 0.625rem)}.content.svelte-4r8s18.svelte-4r8s18{width:-moz-max-content;width:max-content;height:3.375rem;padding:2.25rem 0.25rem 0 1rem;position:absolute;left:0;bottom:0.125rem;overflow:hidden;box-sizing:border-box;font-size:0;white-space:nowrap;font-weight:600}.wrapper.svelte-4r8s18.svelte-4r8s18{position:relative;width:100%;height:100%}.audio-icon.svelte-4r8s18.svelte-4r8s18{vertical-align:top;display:inline-block;width:1rem;height:1rem;margin-right:0.25rem;margin-top:0.0625rem}.unfolded.svelte-4r8s18 .audio-icon.svelte-4r8s18{pointer-events:auto}")}function Ma(i){var C,w,E,D;let t,e,n,o,s,r,a,l,c,d,f,u,h,m,g,v,A;return e=new Ze({props:{visible:i[5],left:i[2]/2+"px",bottom:12,width:2,blurRadius:120,spreadRadius:60}}),s=new Rr({props:{unfolded:i[5],duration:1e3,outDelay:i[4]+20*Math.min((w=(C=i[3][0])==null?void 0:C.content.length)!=null?w:10,15)}}),d=new yp({props:{unfolded:i[5],url:i[0].data.audioUrl,duration:1e3,outDelay:20*Math.min((D=(E=i[3][0])==null?void 0:E.content.length)!=null?D:10,15),hooksInfo:{tag:i[0]}}}),h=new _r({props:{visible:i[5],textUnfolded:i[1],textItems:i[3]}}),{c(){t=Q("div"),ee(e.$$.fragment),n=_(),o=Q("div"),ee(s.$$.fragment),r=_(),a=Q("div"),l=Q("div"),c=Q("div"),ee(d.$$.fragment),f=_(),u=Q("div"),ee(h.$$.fragment),b(o,"class","line svelte-4r8s18"),F(o,"width",i[2]+"px"),b(c,"class","audio-icon svelte-4r8s18"),F(u,"display","inline-block"),b(l,"class","wrapper svelte-4r8s18"),b(a,"class","content svelte-4r8s18"),De(()=>i[8].call(a)),b(t,"class","audio-tag svelte-4r8s18"),q(t,"unfolded",i[5])},m(y,L){B(y,t,L),K(e,t,null),O(t,n),O(t,o),K(s,o,null),O(t,r),O(t,a),O(a,l),O(l,c),K(d,c,null),O(l,f),O(l,u),K(h,u,null),m=ft(a,i[8].bind(a)),g=!0,v||(A=xe(u,"click",i[6]),v=!0)},p(y,L){var U,P,S,j;const x={};L&32&&(x.visible=y[5]),L&4&&(x.left=y[2]/2+"px"),e.$set(x);const R={};L&32&&(R.unfolded=y[5]),L&24&&(R.outDelay=y[4]+20*Math.min((P=(U=y[3][0])==null?void 0:U.content.length)!=null?P:10,15)),s.$set(R),L&4&&F(o,"width",y[2]+"px");const T={};L&32&&(T.unfolded=y[5]),L&1&&(T.url=y[0].data.audioUrl),L&8&&(T.outDelay=20*Math.min((j=(S=y[3][0])==null?void 0:S.content.length)!=null?j:10,15)),L&1&&(T.hooksInfo={tag:y[0]}),d.$set(T);const G={};L&32&&(G.visible=y[5]),L&2&&(G.textUnfolded=y[1]),L&8&&(G.textItems=y[3]),h.$set(G),(!g||L&32)&&q(t,"unfolded",y[5])},i(y){g||(k(e.$$.fragment,y),k(s.$$.fragment,y),k(d.$$.fragment,y),k(h.$$.fragment,y),g=!0)},o(y){M(e.$$.fragment,y),M(s.$$.fragment,y),M(d.$$.fragment,y),M(h.$$.fragment,y),g=!1},d(y){y&&z(t),$(e),$(s),$(d),$(h),m(),v=!1,A()}}}function Cp(i){let t,e,n=i[0].state&&Ma(i);return{c(){n&&n.c(),t=Ae()},m(o,s){n&&n.m(o,s),B(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&k(n,1)):(n=Ma(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(fe(),M(n,1,1,()=>{n=null}),he())},i(o){e||(k(n),e=!0)},o(o){M(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function Pp(i,t,e){let n,o,s,{tag:r}=t,a=!1,l,c=[];function d(){e(1,a=!a)}function f(){l=this.clientWidth,e(2,l)}return i.$$set=u=>{"tag"in u&&e(0,r=u.tag)},i.$$.update=()=>{var u;i.$$.dirty&1&&e(5,n=!!((u=r.state)!=null&&u.unfolded)),i.$$.dirty&1&&e(7,o=r.data.text),i.$$.dirty&128&&e(3,c=[{id:Fe(),content:o}]),i.$$.dirty&2&&e(4,s=a?450:0)},[r,a,l,c,s,n,d,o,f]}class Ip extends se{constructor(t){super(),oe(this,t,Pp,Cp,ie,{tag:0},wp)}}function Ep(i){le(i,"svelte-10cw0el",".media-wrapper.svelte-10cw0el{position:absolute;width:100%;height:100%}")}function ja(i){let t,e,n;return e=new pa({props:{unfolded:i[5],mediaData:i[4],objectFit:i[2],enableCarousel:i[1],autoplayConfig:i[3],tag:i[0],canPlay:!0,playButtonIfNeed:"large",inDelay:500,duration:500}}),{c(){t=Q("div"),ee(e.$$.fragment),b(t,"class","media-wrapper svelte-10cw0el")},m(o,s){B(o,t,s),K(e,t,null),n=!0},p(o,s){const r={};s&32&&(r.unfolded=o[5]),s&16&&(r.mediaData=o[4]),s&4&&(r.objectFit=o[2]),s&2&&(r.enableCarousel=o[1]),s&8&&(r.autoplayConfig=o[3]),s&1&&(r.tag=o[0]),e.$set(r)},i(o){n||(k(e.$$.fragment,o),n=!0)},o(o){M(e.$$.fragment,o),n=!1},d(o){o&&z(t),$(e)}}}function xp(i){let t,e,n=i[0].state&&i[4]&&ja(i);return{c(){n&&n.c(),t=Ae()},m(o,s){n&&n.m(o,s),B(o,t,s),e=!0},p(o,[s]){o[0].state&&o[4]?n?(n.p(o,s),s&17&&k(n,1)):(n=ja(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(fe(),M(n,1,1,()=>{n=null}),he())},i(o){e||(k(n),e=!0)},o(o){M(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function kp(i,t,e){let n,o,s,r,a,{tag:l}=t;return i.$$set=c=>{"tag"in c&&e(0,l=c.tag)},i.$$.update=()=>{var c,d;i.$$.dirty&1&&e(5,n=l.state?l.state.unfolded:!1),i.$$.dirty&1&&e(4,o=l.data.mediaData),i.$$.dirty&1&&e(1,s=l.data.enableCarousel),i.$$.dirty&3&&e(3,r=(c=l.data.autoplayConfig)!=null?c:{autoplay:s!=null?s:!0,autoplayVideo:!0}),i.$$.dirty&1&&e(2,a=(d=l.data.objectFit)!=null?d:(()=>l.data.adaptationMode==="stretch"?"cover":l.data.adaptationMode==="proportional"?"contain":void 0)())},[l,s,a,r,o,n]}class Dp extends se{constructor(t){super(),oe(this,t,kp,xp,ie,{tag:0},Ep)}}function Lp(i){le(i,"svelte-7x7u86",".wrapper.svelte-7x7u86{font-weight:600;cursor:pointer;width:-moz-max-content;width:max-content;height:-moz-max-content;height:max-content;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%);display:flex;align-items:center;justify-content:center;flex-direction:column;pointer-events:auto}.text-wrapper.svelte-7x7u86{position:relative;display:flex;align-items:center;justify-content:center}.icon.svelte-7x7u86{position:relative;margin-bottom:0.6875rem}.arrow0.svelte-7x7u86,.arrow1.svelte-7x7u86,.arrow2.svelte-7x7u86{position:absolute;width:1.625rem;height:0.75rem;background-image:url(data:image/png;base64,iVBORw0KGgoAA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/A/DxAZgAcYVFt+3nV2AcHAIdQTsOa6Ea7P9MhZtB5jHQmsDltwMM8qrszFPpaEfILIYF4H+ZVnrGGf12coyEyXAvdIU4KUydaa4+r/cDl3UVaHMVzun7erp4+g/FWQWK5a6oeGeNoYHijAVFrIG44shmtKkK52x6FSZluMW4pVjvIJbHibPe0MPl61JWxEEZOvw216a3LkEeGMGFO0D1d8KqMyVu4WtRDE2Mh85Az6Wuso/RZA1ph38BBMvNbHuq7kAAAAAASUVORK5CYII=);background-repeat:no-repeat;background-size:contain;animation-fill-mode:backwards;animation-iteration-count:infinite;animation-timing-function:ease-in-out;animation-duration:1.2s}.arrow1.svelte-7x7u86{position:relative}.arrow0.svelte-7x7u86{top:-0.75rem;animation-name:svelte-7x7u86-up0}.arrow1.svelte-7x7u86{animation-name:svelte-7x7u86-up1}.arrow2.svelte-7x7u86{top:0.75rem;animation-name:svelte-7x7u86-up2}.text.svelte-7x7u86{position:absolute;top:0;font-size:0.875rem;color:#ffffff;letter-spacing:0;text-align:center;max-width:8.75rem;width:-moz-max-content;width:max-content;word-break:break-all;line-height:1.125rem;text-shadow:0.125rem 0rem 0.5rem rgba(0, 0, 0, 0.15)}@keyframes svelte-7x7u86-up0{0%{opacity:0.8;transform:translate3d(0, 0, 0) scale(0.84)}33.33%,100%{opacity:0;transform:translate3d(0, -0.75rem, 0) scale(0.84)}}@keyframes svelte-7x7u86-up1{0%{opacity:1;transform:translate3d(0, 0, 0) scale(1)}33.33%,100%{opacity:0.8;transform:translate3d(0, -0.75rem, 0) scale(0.84)}}@keyframes svelte-7x7u86-up2{0%{opacity:0}33.33%,100%{opacity:1;transform:translate3d(0, -0.75rem, 0)}}.link.svelte-7x7u86{position:relative;width:1.75rem;height:0.75rem;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFQAAAAkCAMAAAAgl+0yAAAAnFBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+TINBkAAAAM3RSTlMAjLy6ILM2Fi+Zng3BrPvao4VC9ceneQfKkmNdV1AbEeLOsHA77ujUtn5JLnRraSUUjVLj/+RVAAABhElEQVRIx63V2W6CQBiGYUBUQGDYdwTZQZZa7v/eimik/ket/7yZ4yeTTCYf8+dOX8etxGVoxAvCVbguR3g0uRTMA0w4odGi+CbzFnGKosCqrmHc5rdEwzCwqtGFJlC7DqtOcTxANY67BHnVKOpVoEZRjFPdLgxbqIZhhFTjINChGgThF06NhpGd35OGMcCppyDPfajm+YhUR8cRoeo4+RGlJnnbalBt2x6nHh1dt4Gq6bqDU886y2ZQZVn9jFJ51vcbqPo+Up18UeSgKoo3nHqVJEkGqi1JPk49aLZmQdW2xXf1zP+vUFHsC1QVReK33xdk+w9SaqAq+732UvvdZ2UEqrud8lR5Wc4a7pO8GaoL9VBjy7rMlMosq1lV43LhZlrtF+yuJlbtEXpqXXP3NYwI8VJqakOIziw5aepV1FQuTdfhvlWVZdJCrao6MPe0spRpqV5ZFivqNqYpq3RQ2TST5/h4quoRCmwqq6rymol6plV53IZSomTKE/MroWfxDevL/wAEdPq1eGDh4AAAAABJRU5ErkJggg==);background-repeat:no-repeat;background-size:contain;animation-iteration-count:infinite;animation-timing-function:linear;animation-duration:1.2s;animation-name:svelte-7x7u86-left-right}@keyframes svelte-7x7u86-left-right{0%,100%{opacity:0.8;transform:translateX(-0.3125rem)}50%{opacity:1;transform:translateX(0)}}")}function Sp(i){let t,e,n,o;return t=new Ze({props:{visible:!0,outDelay:0,inDelay:0,width:1.4,left:13,bottom:"auto",blurRadius:50,spreadRadius:18}}),{c(){ee(t.$$.fragment),e=_(),n=Q("div"),b(n,"class","link svelte-7x7u86")},m(s,r){K(t,s,r),B(s,e,r),B(s,n,r),o=!0},i(s){o||(k(t.$$.fragment,s),o=!0)},o(s){M(t.$$.fragment,s),o=!1},d(s){$(t,s),s&&z(e),s&&z(n)}}}function zp(i){let t,e,n,o,s,r,a,l;return t=new Ze({props:{visible:!0,outDelay:0,inDelay:0,height:1.2,left:13,bottom:12,blurRadius:50,spreadRadius:18}}),{c(){ee(t.$$.fragment),e=_(),n=Q("div"),o=_(),s=Q("div"),r=_(),a=Q("div"),b(n,"class","arrow0 svelte-7x7u86"),b(s,"class","arrow1 svelte-7x7u86"),b(a,"class","arrow2 svelte-7x7u86")},m(c,d){K(t,c,d),B(c,e,d),B(c,n,d),B(c,o,d),B(c,s,d),B(c,r,d),B(c,a,d),l=!0},i(c){l||(k(t.$$.fragment,c),l=!0)},o(c){M(t.$$.fragment,c),l=!1},d(c){$(t,c),c&&z(e),c&&z(n),c&&z(o),c&&z(s),c&&z(r),c&&z(a)}}}function Mp(i){let t,e,n,o,s,r,a,l,c,d=i[0].text+"",f,u;const h=[zp,Sp],m=[];function g(v,A){return v[0].linkType===li.VrLink?0:v[0].linkType===li.NormalLink?1:-1}return~(n=g(i))&&(o=m[n]=h[n](i)),a=new Ze({props:{visible:!0,outDelay:0,inDelay:0,left:"auto",bottom:"auto",width:"80%",blurRadius:40,spreadRadius:16,opacity:.08}}),{c(){t=Q("div"),e=Q("div"),o&&o.c(),s=_(),r=Q("div"),ee(a.$$.fragment),l=_(),c=Q("div"),f=Le(d),b(e,"class","icon svelte-7x7u86"),b(c,"class","text svelte-7x7u86"),b(r,"class","text-wrapper svelte-7x7u86"),b(t,"class","wrapper svelte-7x7u86")},m(v,A){B(v,t,A),O(t,e),~n&&m[n].m(e,null),O(t,s),O(t,r),K(a,r,null),O(r,l),O(r,c),O(c,f),u=!0},p(v,[A]){let C=n;n=g(v),n!==C&&(o&&(fe(),M(m[C],1,1,()=>{m[C]=null}),he()),~n?(o=m[n],o||(o=m[n]=h[n](v),o.c()),k(o,1),o.m(e,null)):o=null),(!u||A&1)&&d!==(d=v[0].text+"")&&je(f,d)},i(v){u||(k(o),k(a.$$.fragment,v),u=!0)},o(v){M(o),M(a.$$.fragment,v),u=!1},d(v){v&&z(t),~n&&m[n].d(),$(a)}}}function jp(i,t,e){let n,{tag:o}=t;return i.$$set=s=>{"tag"in s&&e(1,o=s.tag)},i.$$.update=()=>{i.$$.dirty&2&&e(0,n=o.data)},[n,o]}class Bp extends se{constructor(t){super(),oe(this,t,jp,Mp,ie,{tag:1},Lp)}}function Tp(i){le(i,"svelte-kzl2aj",".customElement__container.svelte-kzl2aj{position:relative}")}function Ba(i){let t,e=i[0].element+"",n;return{c(){t=new Mn(!1),n=Ae(),t.a=n},m(o,s){t.m(e,o,s),B(o,n,s)},p(o,s){s&1&&e!==(e=o[0].element+"")&&t.p(e)},d(o){o&&z(n),o&&t.d()}}}function Qp(i){let t,e=typeof i[0].element=="string"&&Ba(i);return{c(){t=Q("div"),e&&e.c(),b(t,"class","customElement__container svelte-kzl2aj")},m(n,o){B(n,t,o),e&&e.m(t,null),i[2](t)},p(n,[o]){typeof n[0].element=="string"?e?e.p(n,o):(e=Ba(n),e.c(),e.m(t,null)):e&&(e.d(1),e=null)},i:ne,o:ne,d(n){n&&z(t),e&&e.d(),i[2](null)}}}function Op(i,t,e){let{tag:n}=t,o,s;Ue(()=>{if(o){if(n.element instanceof Element){const a=n.element;o.appendChild(a),s=()=>o==null?void 0:o.removeChild(a)}else if(typeof n.element=="function"){const a=n.element;s=a(o)}}}),ht(()=>{s==null||s()});function r(a){Be[a?"unshift":"push"](()=>{o=a,e(1,o)})}return i.$$set=a=>{"tag"in a&&e(0,n=a.tag)},[n,o,r]}class Rp extends se{constructor(t){super(),oe(this,t,Op,Qp,ie,{tag:0},Tp)}}function Fp(i){le(i,"svelte-95x526",`@font-face{font-family:'TG-TYPE';font-style:normal;font-weight:400;src:local('TG-TYPE-Bold'),
|
|
545
545
|
url(data:application/font-woff2;charset=utf-8;base64,T1RUTwAKAIAAAwAgQ0ZGINFD4CEAAAaQAAAHC0dTVUIAAQAAAAANnAAAAApPUy8yaB5pEwAAAjQAAABgY21hcEItjGUAAAT0AAABfGhlYWQS1WWOAAAAtAAAADZoaGVhBfMBxwAAAhAAAAAkaG10eJ9gBO8AAADsAAABJ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O4GDvtdi/cSJQr3JBZkcqOzsKSksrCkcWdlcnFmHw6up6eurm+naGhvb2hop2+uHwv3EiUK9yP4ChUiCgt3SgWxBrnmBZGVj5eZGgsB2/cSAwtobm5paqBzqoYLAAABAAAAAAAAAAAAAA==)
|
|
546
|
-
format('woff2')}.content__container.svelte-95x526{position:relative;left:50%;top:50%;transform:translate(-50%, -50%);font-family:PingFangSC, Segoe UI, Rototo, sans-serif}.content__container.unClickable.svelte-95x526{pointer-events:none !important}.content__container.unClickable.svelte-95x526 *{pointer-events:none !important}*{-webkit-tap-highlight-color:transparent}.content__wrapper.svelte-95x526{pointer-events:none;width:100%;height:100%}.withAnimation.svelte-95x526{transition:opacity 0.3s linear}.content__container.hide.svelte-95x526{opacity:0;pointer-events:none}.content__container.hide.svelte-95x526 *{pointer-events:none !important}.content__container.disable.svelte-95x526{display:none}.content__container.hide.svelte-95x526 *{pointer-events:none}.content.svelte-95x526{position:relative;width:100%;height:100%;font-size:0.75rem;line-height:1.125rem;color:#fff}.content.svelte-95x526:not(.unfolded){pointer-events:none}.content.svelte-95x526:not(.unfolded) *{pointer-events:none !important}.content.unfolded.svelte-95x526{pointer-events:auto}`)}function Hp(i){let t,e;return t=new Dp({props:{tag:Se(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Se(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function Gp(i){let t,e;return t=new Bp({props:{tag:Se(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Se(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function Np(i){let t,e;return t=new gp({props:{tag:Se(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Se(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function Wp(i){let t,e;return t=new Ip({props:{tag:Se(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Se(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function Xp(i){let t,e;return t=new fp({props:{tag:Se(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Se(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function Yp(i){let t,e;return t=new km({props:{tag:Se(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Se(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function Up(i){let t,e;return t=new Rp({props:{tag:Se(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Se(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function Vp(i){let t,e,n,o,s,r,a,l,c;const d=[Up,Yp,Xp,Wp,Np,Gp,Hp],f=[];function u(h,m){return h[1].element?0:h[1].contentType===Xe.Text?1:h[1].contentType===Xe.ImageText?2:h[1].contentType===Xe.Audio?3:h[1].contentType===Xe.Marketing?4:h[1].contentType===Xe.Link?5:h[1].contentType===Xe.MediaPlane?6:-1}return~(o=u(i))&&(s=f[o]=d[o](i)),{c(){var h,m,g;t=Q("div"),e=Q("div"),n=Q("div"),s&&s.c(),b(n,"class","content svelte-95x526"),q(n,"unfolded",(h=i[1].state)==null?void 0:h.unfolded),b(e,"class","content__wrapper svelte-95x526"),b(t,"class","content__container svelte-95x526"),b(t,"data-id",r=i[1].id),q(t,"disable",i[1].enabled===!1||((m=i[1].temporaryState)==null?void 0:m.visible)===!1),q(t,"hide",!i[3].visible||!i[3].enabled||!i[4].visible||!((g=i[1].state)!=null&&g.visible)),q(t,"withAnimation",i[0]),q(t,"unClickable",i[1].clickable===!1),F(t,"width",i[1].pointType==="PointTag"?0:"100%",!1),F(t,"height",i[1].pointType==="PointTag"?0:"100%",!1)},m(h,m){B(h,t,m),R(t,e),R(e,n),~o&&f[o].m(n,null),a=!0,l||(c=xe(t,"click",yi(i[11])),l=!0)},p(h,[m]){var v,A,C;let g=o;o=u(h),o===g?~o&&f[o].p(h,m):(s&&(fe(),M(f[g],1,1,()=>{f[g]=null}),he()),~o?(s=f[o],s?s.p(h,m):(s=f[o]=d[o](h),s.c()),k(s,1),s.m(n,null)):s=null),m&2&&q(n,"unfolded",(v=h[1].state)==null?void 0:v.unfolded),(!a||m&2&&r!==(r=h[1].id))&&b(t,"data-id",r),m&2&&q(t,"disable",h[1].enabled===!1||((A=h[1].temporaryState)==null?void 0:A.visible)===!1),m&26&&q(t,"hide",!h[3].visible||!h[3].enabled||!h[4].visible||!((C=h[1].state)!=null&&C.visible)),m&1&&q(t,"withAnimation",h[0]),m&2&&q(t,"unClickable",h[1].clickable===!1),m&2&&F(t,"width",h[1].pointType==="PointTag"?0:"100%",!1),m&2&&F(t,"height",h[1].pointType==="PointTag"?0:"100%",!1)},i(h){a||(k(s),a=!0)},o(h){M(s),a=!1},d(h){h&&z(t),~o&&f[o].d(),l=!1,c()}}}function Jp(i,t,e){let n,o,s,r,{withAnimation:a=!1}=t,{tag:l}=t,{hooks:c}=t,{state:d}=t,{mediaStore:f}=t,{temporaryState:u}=t;Ii("hooks",c),Ii("mediaStore",f);let h,m;function g(A){A?c.emit("exposure",{id:r,type:"start"}):c.emit("exposure",{id:r,type:"end"})}const v=A=>c.emit("click",{event:A,target:"TagContent",tag:l});return i.$$set=A=>{"withAnimation"in A&&e(0,a=A.withAnimation),"tag"in A&&e(1,l=A.tag),"hooks"in A&&e(2,c=A.hooks),"state"in A&&e(3,d=A.state),"mediaStore"in A&&e(5,f=A.mediaStore),"temporaryState"in A&&e(4,u=A.temporaryState)},i.$$.update=()=>{var A,C;i.$$.dirty&2&&e(9,n=(A=l.state)==null?void 0:A.unfolded),i.$$.dirty&2&&e(8,o=(C=l.state)==null?void 0:C.visible),i.$$.dirty&280&&e(10,s=d.visible&&u.visible&&o),i.$$.dirty&2&&(r=l.id),i.$$.dirty&1024&&g(s),i.$$.dirty&962&&l.hooks&&(n!==void 0&&n!==m&&(e(7,m=n),n?l.hooks.emit("unfolded"):l.hooks.emit("folded")),o!==void 0&&o!==h&&(e(6,h=o),o?l.hooks.emit("show"):l.hooks.emit("hide")))},[a,l,c,d,u,f,h,m,o,n,s,v]}class Ta extends se{constructor(t){super(),oe(this,t,Jp,Vp,ie,{withAnimation:0,tag:1,hooks:2,state:3,mediaStore:5,temporaryState:4},Fp)}}function Zp(i){le(i,"svelte-fuismw",".point.svelte-fuismw.svelte-fuismw{pointer-events:none;width:1.5rem;height:1.5rem}.small-point.svelte-fuismw.svelte-fuismw,.big-point.svelte-fuismw.svelte-fuismw{position:absolute;width:100%;height:100%;display:flex;align-items:center;justify-content:center;border-radius:50%;transition:all 500ms}.big-point.svelte-fuismw.svelte-fuismw{background-color:rgba(0, 0, 0, 0.1)}.folded.point.svelte-fuismw.svelte-fuismw{animation:svelte-fuismw-breathing 2s linear infinite}.big-point.svelte-fuismw.svelte-fuismw::before,.big-point.svelte-fuismw.svelte-fuismw::after{content:'';display:block;position:absolute;background-size:contain;background-repeat:no-repeat;pointer-events:none}.big-point.svelte-fuismw.svelte-fuismw::before{width:100%;height:100%;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAMAAABiM0N1AAAAqFBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8j1z1tAAAAOHRSTlMABgoNFBsYIhEmHyksMoJ6RZ5aXzpnU03AtqaZjLuGN+zcifnW0cjEqnA+lOZzbWLhkH6i8rGuagnOwPMAAAQOSURBVFjDrZiHctpAEIYXYzvGOvXeUe+IYuD93ywrJAIhFJX8M8zoBHzz757utHvwTETJHJPfGQZfWJXILWCMPuqNbuu6vj+khrHjed40TWvFfQ2jvCl8nGha6lQCl7s07UqcUlfOZrOxVtKsN2a+0uJYK+ScEIqiFifhBSGSsnJ8f8u99cLMVnEUHTKXIOMX6vuk5gpphFYyhmHzHpzcDqNUJGgEER+oz5OaK8ShNcIdt+zx1ys7lhdqiDlRkPF+JaSdWIhasaz6lLPQ1qFDIwYpDeTr62veCS8bGLIQRSsVK78/5nDeOlYIYhovHeOtU0dDXw2KSGiKesQRyjJ10Q66QcyZMTvpTEMUumpMieyWvs9ZLZcmodAOYlorsysBflpjiEJTFBEY5+7sicul34T1iak5U25momN9Ya4wPCT57r8cteW0dk4YuKMTqjXVkgjciFr+8B3ngnmM6kii5X/efB0F+jUHnuiatLJY+Et84EnUNacfiaKZjQhX4oJAwPlqOB3mJaoh4dxxG5Nc3Q8DkywunP6kBalN53J7G3g0JqiNC3qpjQ7TRPvmn2U3L3/kU4JaTn/SKU0qb76dDf0kGNjHJbD+wX1gcMxO6fZVrzXUcQaROkvt3+pljIYugQ0LDi1ZBgeN9JK9MjTCkmgwgPou19I5QzBI5yy5RvqOw6xMMbKzoeGWmnQfBBwa6woj6wyNsYSx7R0chWuOwsjOqR6aboyNyvcpgOsl3ZzNhoNm3bztdAK1x5NuzmCwunkjjq4AEzKXFI1NUmVnwIfydJBoW7CPVAR1uR6XbVwlmgF2xF1yPTbbubYHLZamgyTNhiSmp4PoJIEk+R+gOAFb+x+hxRoctHw6iItsMLT/Mf3RHixbnP5AyhEPmZ1NB+E6A0V3pi9aPqyB6Pz0bSTxXID0kE/d2DgvxBFzEKdutdXawJGSMlM3/3Sd4fA93bnTXkfSuvwGFGOI016QbKm3VdbOn/bKjpd1e6Pg1SlFhPzjdXWNwjNTyprkhz33i4Wpji600FA5h05q4Ywv/bxge7mNRe7YYtQMwqt/kMLixpXHQhBwcCXBYukxBbvkBTv4S5V/HNNC6EF089tPxxGHNzV8sKTgRhSzVYa2Wf5yeadHphlWGdb4IUeEO5K2SHrUiqJuW9GiLFdwVzRbCXTf5tg11mvhYdufZbLUr11XEi/k4KHexUxWSY8DBCby7AU8E3eUhfzVkYZgR6H/agF8C3KNqCeHLIIRR7oEr0XXsixy9P1jH/doJLF2nPXbIlw5y1aC6t4eROW1pduaLs/7b6NEqFiWrWpBzaXuaOy4Nfe6bRfqGwzSXBJZhnF8y9oUhcnzOyM9pI7wCWP0LSkyy1iFWWwsFp8LeKLfd4doRyTLRacAAAAASUVORK5CYII=)}.folded.svelte-fuismw .big-point.svelte-fuismw::before{animation:svelte-fuismw-rotate 2s linear infinite}.big-point.svelte-fuismw.svelte-fuismw::after{position:absolute;width:1rem;height:1rem;background-image:var(--iconUrl)}.small-point.svelte-fuismw.svelte-fuismw::before{content:'';display:block;position:absolute;pointer-events:none;width:0.25rem;height:0.25rem;border-radius:100%;background-color:white}.folded.svelte-fuismw .big-point.svelte-fuismw{opacity:1;scale:1}.unfolded.svelte-fuismw .big-point.svelte-fuismw{opacity:0;scale:0}.folded.svelte-fuismw .small-point.svelte-fuismw{opacity:0;scale:6}.unfolded.svelte-fuismw .small-point.svelte-fuismw{opacity:1;scale:1}@keyframes svelte-fuismw-rotate{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}@keyframes svelte-fuismw-breathing{0%{transform:scale(1)}25%{transform:scale(0.9)}50%{transform:scale(1)}}")}function _p(i){let t,e,n,o,s,r,a;return e=new Ze({props:{center:!0,blurRadius:12,spreadRadius:5}}),{c(){t=Q("div"),ee(e.$$.fragment),n=_(),o=Q("div"),s=_(),r=Q("div"),b(o,"class","small-point svelte-fuismw"),F(o,"transition-delay",i[3]?i[2]+"ms":"0ms",!1),b(r,"class","big-point svelte-fuismw"),F(r,"--iconUrl","url("+i[1]+")"),F(r,"transition-delay",i[3]?i[2]+"ms":"0ms",!1),b(t,"class","point svelte-fuismw"),q(t,"folded",i[3]),q(t,"unfolded",i[0])},m(l,c){B(l,t,c),K(e,t,null),R(t,n),R(t,o),R(t,s),R(t,r),a=!0},p(l,[c]){c&12&&F(o,"transition-delay",l[3]?l[2]+"ms":"0ms",!1),(!a||c&2)&&F(r,"--iconUrl","url("+l[1]+")"),c&12&&F(r,"transition-delay",l[3]?l[2]+"ms":"0ms",!1),c&8&&q(t,"folded",l[3]),c&1&&q(t,"unfolded",l[0])},i(l){a||(k(e.$$.fragment,l),a=!0)},o(l){M(e.$$.fragment,l),a=!1},d(l){l&&z(t),$(e)}}}function qp(i,t,e){let n,{unfolded:o}=t,{iconUrl:s}=t,{foldDelay:r=800}=t;return i.$$set=a=>{"unfolded"in a&&e(0,o=a.unfolded),"iconUrl"in a&&e(1,s=a.iconUrl),"foldDelay"in a&&e(2,r=a.foldDelay)},i.$$.update=()=>{i.$$.dirty&1&&e(3,n=!o)},[o,s,r,n]}class Kp extends se{constructor(t){super(),oe(this,t,qp,_p,ie,{unfolded:0,iconUrl:1,foldDelay:2},Zp)}}function $p(i){le(i,"svelte-jzvcn0",".point.svelte-jzvcn0.svelte-jzvcn0{pointer-events:none;width:1rem;height:1rem}.small-point.svelte-jzvcn0.svelte-jzvcn0,.big-point.svelte-jzvcn0.svelte-jzvcn0{position:absolute;width:100%;height:100%;display:flex;align-items:center;justify-content:center;border-radius:50%;transition:all 500ms}.big-point.svelte-jzvcn0.svelte-jzvcn0::before,.big-point.svelte-jzvcn0.svelte-jzvcn0::after{content:'';display:block;position:absolute;background-size:contain;background-repeat:no-repeat;pointer-events:none}.big-point.svelte-jzvcn0.svelte-jzvcn0::before{width:100%;height:100%;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAMAAABiM0N1AAAAqFBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8j1z1tAAAAOHRSTlMABgoNFBsYIhEmHyksMoJ6RZ5aXzpnU03AtqaZjLuGN+zcifnW0cjEqnA+lOZzbWLhkH6i8rGuagnOwPMAAAQOSURBVFjDrZiHctpAEIYXYzvGOvXeUe+IYuD93ywrJAIhFJX8M8zoBHzz757utHvwTETJHJPfGQZfWJXILWCMPuqNbuu6vj+khrHjed40TWvFfQ2jvCl8nGha6lQCl7s07UqcUlfOZrOxVtKsN2a+0uJYK+ScEIqiFifhBSGSsnJ8f8u99cLMVnEUHTKXIOMX6vuk5gpphFYyhmHzHpzcDqNUJGgEER+oz5OaK8ShNcIdt+zx1ys7lhdqiDlRkPF+JaSdWIhasaz6lLPQ1qFDIwYpDeTr62veCS8bGLIQRSsVK78/5nDeOlYIYhovHeOtU0dDXw2KSGiKesQRyjJ10Q66QcyZMTvpTEMUumpMieyWvs9ZLZcmodAOYlorsysBflpjiEJTFBEY5+7sicul34T1iak5U25momN9Ya4wPCT57r8cteW0dk4YuKMTqjXVkgjciFr+8B3ngnmM6kii5X/efB0F+jUHnuiatLJY+Et84EnUNacfiaKZjQhX4oJAwPlqOB3mJaoh4dxxG5Nc3Q8DkywunP6kBalN53J7G3g0JqiNC3qpjQ7TRPvmn2U3L3/kU4JaTn/SKU0qb76dDf0kGNjHJbD+wX1gcMxO6fZVrzXUcQaROkvt3+pljIYugQ0LDi1ZBgeN9JK9MjTCkmgwgPou19I5QzBI5yy5RvqOw6xMMbKzoeGWmnQfBBwa6woj6wyNsYSx7R0chWuOwsjOqR6aboyNyvcpgOsl3ZzNhoNm3bztdAK1x5NuzmCwunkjjq4AEzKXFI1NUmVnwIfydJBoW7CPVAR1uR6XbVwlmgF2xF1yPTbbubYHLZamgyTNhiSmp4PoJIEk+R+gOAFb+x+hxRoctHw6iItsMLT/Mf3RHixbnP5AyhEPmZ1NB+E6A0V3pi9aPqyB6Pz0bSTxXID0kE/d2DgvxBFzEKdutdXawJGSMlM3/3Sd4fA93bnTXkfSuvwGFGOI016QbKm3VdbOn/bKjpd1e6Pg1SlFhPzjdXWNwjNTyprkhz33i4Wpji600FA5h05q4Ywv/bxge7mNRe7YYtQMwqt/kMLixpXHQhBwcCXBYukxBbvkBTv4S5V/HNNC6EF089tPxxGHNzV8sKTgRhSzVYa2Wf5yeadHphlWGdb4IUeEO5K2SHrUiqJuW9GiLFdwVzRbCXTf5tg11mvhYdufZbLUr11XEi/k4KHexUxWSY8DBCby7AU8E3eUhfzVkYZgR6H/agF8C3KNqCeHLIIRR7oEr0XXsixy9P1jH/doJLF2nPXbIlw5y1aC6t4eROW1pduaLs/7b6NEqFiWrWpBzaXuaOy4Nfe6bRfqGwzSXBJZhnF8y9oUhcnzOyM9pI7wCWP0LSkyy1iFWWwsFp8LeKLfd4doRyTLRacAAAAASUVORK5CYII=);background-size:contain;background-repeat:no-repeat}.small-point.svelte-jzvcn0.svelte-jzvcn0::before{content:'';display:block;position:absolute;pointer-events:none;width:0.375rem;height:0.375rem;border-radius:100%;background-color:white}.unfolded.svelte-jzvcn0 .big-point.svelte-jzvcn0{opacity:0;transform:scale(0)}.folded.svelte-jzvcn0 .big-point.svelte-jzvcn0{opacity:1;transform:scale(1)}.unfolded.svelte-jzvcn0 .small-point.svelte-jzvcn0{transform:scale(0.6)}.folded.svelte-jzvcn0 .small-point.svelte-jzvcn0{transform:scale(1)}")}function eg(i){let t,e,n,o,s,r,a;return e=new Ze({props:{center:!0,blurRadius:12,spreadRadius:5}}),{c(){t=Q("div"),ee(e.$$.fragment),n=_(),o=Q("div"),s=_(),r=Q("div"),b(o,"class","small-point svelte-jzvcn0"),F(o,"transition-delay",i[2]?i[1]+"ms":"0ms",!1),b(r,"class","big-point svelte-jzvcn0"),F(r,"transition-delay",i[2]?i[1]+"ms":"0ms",!1),b(t,"class","point svelte-jzvcn0"),q(t,"unfolded",i[0]),q(t,"folded",i[2])},m(l,c){B(l,t,c),K(e,t,null),R(t,n),R(t,o),R(t,s),R(t,r),a=!0},p(l,[c]){c&6&&F(o,"transition-delay",l[2]?l[1]+"ms":"0ms",!1),c&6&&F(r,"transition-delay",l[2]?l[1]+"ms":"0ms",!1),c&1&&q(t,"unfolded",l[0]),c&4&&q(t,"folded",l[2])},i(l){a||(k(e.$$.fragment,l),a=!0)},o(l){M(e.$$.fragment,l),a=!1},d(l){l&&z(t),$(e)}}}function tg(i,t,e){let n,{unfolded:o}=t,{foldDelay:s=800}=t;return i.$$set=r=>{"unfolded"in r&&e(0,o=r.unfolded),"foldDelay"in r&&e(1,s=r.foldDelay)},i.$$.update=()=>{i.$$.dirty&1&&e(2,n=!o)},[o,s,n]}class ng extends se{constructor(t){super(),oe(this,t,tg,eg,ie,{unfolded:0,foldDelay:1},$p)}}function ig(i){le(i,"svelte-8en2lj",".point-click-helper.svelte-8en2lj{position:absolute;width:2.5rem;height:2.5rem;left:50%;top:50%;transform:translate(-50%, -50%)}")}function Qa(i){let t,e,n=i[0].contentType!==Xe.Link&&Oa(i);return{c(){n&&n.c(),t=Ae()},m(o,s){n&&n.m(o,s),B(o,t,s),e=!0},p(o,s){o[0].contentType!==Xe.Link?n?(n.p(o,s),s&1&&k(n,1)):(n=Oa(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(fe(),M(n,1,1,()=>{n=null}),he())},i(o){e||(k(n),e=!0)},o(o){M(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function Oa(i){let t,e,n,o,s,r;const a=[sg,og],l=[];function c(d,f){var u,h,m,g;return((h=(u=d[0].style)==null?void 0:u.point)==null?void 0:h.style)==="CustomIcon"&&((g=(m=d[0].style)==null?void 0:m.point)==null?void 0:g.iconUrl)?0:1}return n=c(i),o=l[n]=a[n](i),{c(){t=Q("div"),e=_(),o.c(),s=Ae(),b(t,"class","point-click-helper svelte-8en2lj")},m(d,f){B(d,t,f),B(d,e,f),l[n].m(d,f),B(d,s,f),r=!0},p(d,f){let u=n;n=c(d),n===u?l[n].p(d,f):(fe(),M(l[u],1,1,()=>{l[u]=null}),he(),o=l[n],o?o.p(d,f):(o=l[n]=a[n](d),o.c()),k(o,1),o.m(s.parentNode,s))},i(d){r||(k(o),r=!0)},o(d){M(o),r=!1},d(d){d&&z(t),d&&z(e),l[n].d(d),d&&z(s)}}}function og(i){let t,e;return t=new ng({props:{unfolded:i[0].state.unfolded,foldDelay:i[1]}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.unfolded=n[0].state.unfolded),o&2&&(s.foldDelay=n[1]),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function sg(i){let t,e;return t=new Kp({props:{iconUrl:i[0].style.point.iconUrl,unfolded:i[0].state.unfolded,foldDelay:i[1]}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.iconUrl=n[0].style.point.iconUrl),o&1&&(s.unfolded=n[0].state.unfolded),o&2&&(s.foldDelay=n[1]),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function rg(i){var o,s,r;let t,e,n=((o=i[0].pointTagStyle)==null?void 0:o.leftPercent)&&((s=i[0].pointTagStyle)==null?void 0:s.topPercent)&&i[0].enabled!==!1&&i[0].state&&((r=i[0].temporaryState)==null?void 0:r.visible)!==!1&&Qa(i);return{c(){n&&n.c(),t=Ae()},m(a,l){n&&n.m(a,l),B(a,t,l),e=!0},p(a,[l]){var c,d,f;((c=a[0].pointTagStyle)==null?void 0:c.leftPercent)&&((d=a[0].pointTagStyle)==null?void 0:d.topPercent)&&a[0].enabled!==!1&&a[0].state&&((f=a[0].temporaryState)==null?void 0:f.visible)!==!1?n?(n.p(a,l),l&1&&k(n,1)):(n=Qa(a),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(fe(),M(n,1,1,()=>{n=null}),he())},i(a){e||(k(n),e=!0)},o(a){M(n),e=!1},d(a){n&&n.d(a),a&&z(t)}}}function ag(i,t,e){let n,{tag:o}=t;return i.$$set=s=>{"tag"in s&&e(0,o=s.tag)},i.$$.update=()=>{var s,r;i.$$.dirty&1&&e(1,n=(r=(s=o.style)==null?void 0:s.foldedPointDelay)!=null?r:o.contentType===Xe.Marketing?600:void 0)},[o,n]}class lg extends se{constructor(t){super(),oe(this,t,ag,rg,ie,{tag:0},ig)}}function cg(i){le(i,"svelte-1vzhbu2",".wrapper.svelte-1vzhbu2{position:absolute;width:0rem;height:0rem;overflow:visible;pointer-events:auto}.point.svelte-1vzhbu2{-webkit-tap-highlight-color:transparent;position:absolute;transform:translate(-50%, -50%);left:50%;top:50%}")}function Ra(i){let t,e;return t=new Ta({props:{mediaStore:i[4],withAnimation:i[0],tag:Se(i[1]),hooks:i[2],state:i[3],temporaryState:i[5]}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&16&&(s.mediaStore=n[4]),o&1&&(s.withAnimation=n[0]),o&2&&(s.tag=Se(n[1])),o&4&&(s.hooks=n[2]),o&8&&(s.state=n[3]),o&32&&(s.temporaryState=n[5]),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function Fa(i){let t,e,n,o,s;return e=new lg({props:{tag:i[1]}}),{c(){t=Q("div"),ee(e.$$.fragment),b(t,"class","point svelte-1vzhbu2")},m(r,a){B(r,t,a),K(e,t,null),n=!0,o||(s=xe(t,"click",yi(i[11])),o=!0)},p(r,a){const l={};a&2&&(l.tag=r[1]),e.$set(l)},i(r){n||(k(e.$$.fragment,r),n=!0)},o(r){M(e.$$.fragment,r),n=!1},d(r){r&&z(t),$(e),o=!1,s()}}}function dg(i){var a,l;let t,e,n,o,s=i[1].dimensionType===Je.Two&&Ra(i),r=i[1].pointType===We.PointTag&&((l=(a=i[1].style)==null?void 0:a.point)==null?void 0:l.style)!=="noPoint"&&Fa(i);return{c(){t=Q("div"),s&&s.c(),e=_(),r&&r.c(),b(t,"class","wrapper svelte-1vzhbu2"),b(t,"data-id",n=i[1].id),q(t,"hide",i[10]),q(t,"unfolded",i[6]),F(t,"left",i[9],!1),F(t,"top",i[8],!1),F(t,"z-index",i[7],!1)},m(c,d){B(c,t,d),s&&s.m(t,null),R(t,e),r&&r.m(t,null),o=!0},p(c,[d]){var f,u;c[1].dimensionType===Je.Two?s?(s.p(c,d),d&2&&k(s,1)):(s=Ra(c),s.c(),k(s,1),s.m(t,e)):s&&(fe(),M(s,1,1,()=>{s=null}),he()),c[1].pointType===We.PointTag&&((u=(f=c[1].style)==null?void 0:f.point)==null?void 0:u.style)!=="noPoint"?r?(r.p(c,d),d&2&&k(r,1)):(r=Fa(c),r.c(),k(r,1),r.m(t,null)):r&&(fe(),M(r,1,1,()=>{r=null}),he()),(!o||d&2&&n!==(n=c[1].id))&&b(t,"data-id",n),d&1024&&q(t,"hide",c[10]),d&64&&q(t,"unfolded",c[6]),d&512&&F(t,"left",c[9],!1),d&256&&F(t,"top",c[8],!1),d&128&&F(t,"z-index",c[7],!1)},i(c){o||(k(s),k(r),o=!0)},o(c){M(s),M(r),o=!1},d(c){c&&z(t),s&&s.d(),r&&r.d()}}}function ug(i,t,e){let n,o,s,r,a,l,{withAnimation:c=!1}=t,{tag:d}=t,{hooks:f}=t,{state:u}=t,{mediaStore:h}=t,{temporaryState:m}=t,g,v=!1;function A(w){g!==void 0&&clearTimeout(g),v=!0,g=setTimeout(()=>{v=!1},800)}const C=w=>{v||f.emit("click",{event:w,target:"TagPoint",tag:d})};return i.$$set=w=>{"withAnimation"in w&&e(0,c=w.withAnimation),"tag"in w&&e(1,d=w.tag),"hooks"in w&&e(2,f=w.hooks),"state"in w&&e(3,u=w.state),"mediaStore"in w&&e(4,h=w.mediaStore),"temporaryState"in w&&e(5,m=w.temporaryState)},i.$$.update=()=>{var w,E,D,y;i.$$.dirty&2&&e(12,n=(w=d.state)==null?void 0:w.visible),i.$$.dirty&4096&&e(10,o=!n),i.$$.dirty&2&&e(6,s=(E=d.state)==null?void 0:E.unfolded),i.$$.dirty&2&&e(9,r=((D=d.pointTagStyle)==null?void 0:D.leftPercent)+"%"),i.$$.dirty&2&&e(8,a=((y=d.pointTagStyle)==null?void 0:y.topPercent)+"%"),i.$$.dirty&2&&e(7,l=d.contentType===Xe.Link?1:0),i.$$.dirty&64&&A()},[c,d,f,u,h,m,s,l,a,r,o,C,n]}class fg extends se{constructor(t){super(),oe(this,t,ug,dg,ie,{withAnimation:0,tag:1,hooks:2,state:3,mediaStore:4,temporaryState:5},cg)}}function hg(i){le(i,"svelte-1eci49s",".tag--container.svelte-1eci49s{box-sizing:border-box;position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;opacity:1;-webkit-user-select:none;-moz-user-select:none;user-select:none}.tag.hide.svelte-1eci49s{display:none}.withAnimation.svelte-1eci49s{transition:opacity 0.3s linear}.tag--container.hide.svelte-1eci49s{opacity:0;pointer-events:none}.tag--container.hide.svelte-1eci49s *{pointer-events:none}")}function Ha(i,t,e){const n=i.slice();return n[6]=t[e],n}function Ga(i){let t,e=[],n=new Map,o,s=i[1];const r=a=>a[6].id;for(let a=0;a<s.length;a+=1){let l=Ha(i,s,a),c=r(l);n.set(c,e[a]=Na(c,l))}return{c(){t=Q("div");for(let a=0;a<e.length;a+=1)e[a].c();b(t,"class","tag--container svelte-1eci49s"),q(t,"hide",!i[3].visible||!i[5].visible),q(t,"withAnimation",i[0])},m(a,l){B(a,t,l);for(let c=0;c<e.length;c+=1)e[c].m(t,null);o=!0},p(a,l){l&63&&(s=a[1],fe(),e=Ve(e,l,r,1,a,s,n,t,lt,Na,null,Ha),he()),l&40&&q(t,"hide",!a[3].visible||!a[5].visible),l&1&&q(t,"withAnimation",a[0])},i(a){if(!o){for(let l=0;l<s.length;l+=1)k(e[l]);o=!0}},o(a){for(let l=0;l<e.length;l+=1)M(e[l]);o=!1},d(a){a&&z(t);for(let l=0;l<e.length;l+=1)e[l].d()}}}function Na(i,t){let e,n,o,s;const r=[{tag:t[6],hooks:t[2],state:t[3],mediaStore:t[4],temporaryState:t[5],withAnimation:t[0]}];let a={};for(let l=0;l<r.length;l+=1)a=Ie(a,r[l]);return n=new fg({props:a}),{key:i,first:null,c(){var l,c,d;e=Q("div"),ee(n.$$.fragment),o=_(),b(e,"class","tag svelte-1eci49s"),q(e,"hide",!((l=t[6].pointTagStyle)!=null&&l.leftPercent)||!((c=t[6].pointTagStyle)!=null&&c.topPercent)||t[6].enabled===!1||!t[6].state||((d=t[6].temporaryState)==null?void 0:d.visible)===!1),this.first=e},m(l,c){B(l,e,c),K(n,e,null),R(e,o),s=!0},p(l,c){var f,u,h;t=l;const d=c&63?Te(r,[{tag:t[6],hooks:t[2],state:t[3],mediaStore:t[4],temporaryState:t[5],withAnimation:t[0]}]):{};n.$set(d),c&2&&q(e,"hide",!((f=t[6].pointTagStyle)!=null&&f.leftPercent)||!((u=t[6].pointTagStyle)!=null&&u.topPercent)||t[6].enabled===!1||!t[6].state||((h=t[6].temporaryState)==null?void 0:h.visible)===!1)},i(l){s||(k(n.$$.fragment,l),s=!0)},o(l){M(n.$$.fragment,l),s=!1},d(l){l&&z(e),$(n)}}}function mg(i){let t,e,n=i[3].enabled&&Ga(i);return{c(){n&&n.c(),t=Ae()},m(o,s){n&&n.m(o,s),B(o,t,s),e=!0},p(o,[s]){o[3].enabled?n?(n.p(o,s),s&8&&k(n,1)):(n=Ga(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(fe(),M(n,1,1,()=>{n=null}),he())},i(o){e||(k(n),e=!0)},o(o){M(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function pg(i,t,e){let{withAnimation:n=!1}=t,{tags:o=[]}=t,{hooks:s}=t,{state:r}=t,{mediaStore:a}=t,{temporaryState:l}=t;return i.$$set=c=>{"withAnimation"in c&&e(0,n=c.withAnimation),"tags"in c&&e(1,o=c.tags),"hooks"in c&&e(2,s=c.hooks),"state"in c&&e(3,r=c.state),"mediaStore"in c&&e(4,a=c.mediaStore),"temporaryState"in c&&e(5,l=c.temporaryState)},[n,o,s,r,a,l]}class gg extends se{constructor(t){super(),oe(this,t,pg,mg,ie,{withAnimation:0,tags:1,hooks:2,state:3,mediaStore:4,temporaryState:5},hg)}}const Ag={globalConfig:{initialState:{},visibleConfig:{visibleDistance:{max:5},angleRange:{min:-45,max:45}},unfoldedConfig:{autoUnfold:{strategy:"MinimumDistance"}},tag3DConfig:{ratio:.0035}},contentTypeConfig:{"Any-Link-Any":{unfoldedConfig:{keep:"unfolded"},initialState:{unfolded:!0}},"Any-Marketing-Any":{unfoldedConfig:void 0},"3D-MediaPlane-PlaneTag":{unfoldedConfig:{keep:"unfolded"},visibleConfig:{alwaysShowWhenMovePano:!0,angleRange:void 0,visibleDistance:void 0}}}};class vg extends Xn{constructor(e){super(e);p(this,"tagCacheByPanoIndex",{})}getCaches({panoIndex:e,id:n,key:o}){var c,d,f,u;const{five:s}=this,r=(c=s.panoIndex)!=null?c:e;if(r===void 0)throw new Error(`TagCacheController getCache(): fivePanoIndex is ${r}`);const a=`${(f=(d=s.work)==null?void 0:d.workCode)!=null?f:s.model.uuid}-${r}`;let l=this.tagCacheByPanoIndex[a];if(l||(l=new Map,this.tagCacheByPanoIndex[a]=l),n===void 0)return l;if(o===void 0){const h=l.get(n);return h||(l.set(n,{}),l.get(n))}return(u=l.get(n))==null?void 0:u[o]}clearCache(){this.tagCacheByPanoIndex={}}}class bg extends vg{constructor(e){super(e);p(this,"tags",[]);p(this,"config",Ag);p(this,"raycaster",new I.Raycaster)}getTagById(e){const n=this.tags.find(o=>o.id===e);if(!n){console.error(`getTagById(): tag is ${n}, id is ${e}`);return}return n}changeConfig(e,n=!0){n?this.config=It.default({},this.config,e):this.config=e,this.clearCache()}changeGlobalConfig(e,n=!0){n?this.config.globalConfig=It.default({},this.config.globalConfig,e):this.config.globalConfig=e,this.clearCache()}changeContentTypeConfig(e,n,o=!0){this.config.contentTypeConfig||(this.config.contentTypeConfig={}),o?this.config.contentTypeConfig[e]=It.default({},this.config.contentTypeConfig[e],n):this.config.contentTypeConfig[e]=n,this.clearCache()}getVisibleByPanoIndex(e,n){var r;const o=this.getCaches({panoIndex:n,id:e.id}),s=(r=this.five.panoIndex)!=null?r:n;if(o.visible!==void 0)return o.visible;{const a=(()=>{var d,f,u,h,m;const l=(d=this.getTagConfig(e).visibleConfig)!=null?d:{},c=this.getDistance(e);if(typeof l=="function")return l(this.five,{tag:e,distance:c});if(l.keep==="hidden")return!1;if(l.keep==="visible")return!0;if(l.visiblePanoIndex!==void 0&&(s===void 0||!l.visiblePanoIndex.includes(s))||l.visibleDistance!==void 0&&l.visibleDistance!=="unLimited"&&ri(c,l.visibleDistance)===!1)return!1;if(((f=l.intersectRaycaster)==null?void 0:f.enabled)!==!1){if(s===void 0)return!1;const g=(u=this.five.work.observers[s])==null?void 0:u.position;if(g===void 0)throw new Error(`getVisible(): observerPosition is ${g}`);const v=si(e.position).sub(g).normalize();this.raycaster.set(g,v);const[A]=this.five.model.intersectRaycaster(this.raycaster),C=(m=(h=l.intersectRaycaster)==null?void 0:h.distanceAccuracy)!=null?m:.01;if(A&&A.distance+C<c)return!1}return!(l.angleRange&&e.dimensionType===Je.Three&&ri(this.getAngle(e),l.angleRange)===!1)})();return o.visible=a,o.visible}}getUnfoldedByPanoIndex(e,n){if(!this.getVisibleByPanoIndex(e))return;const s=this.getCaches({panoIndex:n,id:e.id});if(s.unfolded!==void 0)return s.unfolded;{const r=this.getTagConfig(e).unfoldedConfig;if(!r)return;const a=(()=>{const c=this.getDistance(e);if(typeof r=="function")return r(this.five,{tag:e,distance:c});if(r.keep==="folded")return!1;if(r.keep==="unfolded")return!0;if(r.disableUnfold===!0)return!1;if(r.disableFold===!0)return!0;if(r.unfoldDistance&&ri(c,r.unfoldDistance)===!1)return!1})();s.unfolded=a;const l=this.getUnfoldedByCamera(e);return l!==void 0?l:s.unfolded}}getUnfoldedByCamera(e){return this.getVisibleByPanoIndex(e)?(()=>{var a;const s=this.getDistance(e),r=this.getTagConfig(e).unfoldedConfig;if(!!r){if(typeof r=="function")return r(this.five,{tag:e,distance:s});if(r.keep==="folded")return!1;if(r.keep==="unfolded")return!0;if(r.disableUnfold===!0)return!1;if(r.disableFold===!0)return!0;if(r.autoUnfold===void 0)return;if(r.autoUnfold.strategy==="ScreenPostion"){const l=this.getTagProject(e);if(l&&ri(l.x,r.autoUnfold.autoUnfoldProjectX)===!1)return!1}if(r.autoUnfold.strategy==="MinimumDistance"){const d=this.filterPointTag().filter(u=>this.getVisibleByPanoIndex(u)).filter(u=>{const h=this.getTagProject(u);if(!h)return!1;const{x:m,y:g,z:v}=h;return!(Math.abs(v)>1||Math.abs(m)>1||Math.abs(g)>1)}).filter(u=>{var m;const h=this.getTagConfig(u).unfoldedConfig;return typeof h=="object"&&((m=h.autoUnfold)==null?void 0:m.strategy)==="MinimumDistance"}).map(u=>({id:u.id,distance:this.getDistance(u)})).filter(u=>u.distance!==void 0).sort((u,h)=>u.distance-h.distance).findIndex(u=>u.id===e.id);if(d===-1||d<=((a=r.autoUnfold.maxNumber)!=null?a:1)-1===!1)return!1}return!0}})():void 0}getDistance(e,n){var r,a,l;const o=(r=this.five.panoIndex)!=null?r:n;if(o===void 0)throw new Error(`getDistance(): fivePanoIndex is ${o}`);const s=this.getCaches({panoIndex:n,id:e.id});if(s.distance!==void 0)return s.distance;{const c=(l=(a=this.five.work)==null?void 0:a.observers[o])==null?void 0:l.position;if(c===void 0)throw new Error(`getDistance(): observerPosition is ${c}`);const d=(()=>e.pointType===We.PointTag?rt(e==null?void 0:e.position):si(e.position))(),f=c.distanceTo(d);return s.distance=f,f}}getAngle(e,n){var r,a,l;const o=(r=this.five.panoIndex)!=null?r:n;if(o===void 0)throw new Error(`getDistance(): fivePanoIndex is ${o}`);const s=this.getCaches({panoIndex:n,id:e.id});if(s.angle!==void 0)return s.angle;{const c=(l=(a=this.five.work)==null?void 0:a.observers[o])==null?void 0:l.position;if(c===void 0)throw new Error(`getAngleRange(): observerPosition is ${c}`);const d=(()=>e.pointType===We.PointTag?cn(e.normal):Br(e.position))();if(!d)return;const f=new I.Vector3().copy(c).sub(si(e.position)),u=d.angleTo(f)*180/Math.PI;return s.angle=u,s.angle}}getTagConfig(e){var s;if(!e)return(s=this.config.globalConfig)!=null?s:{};const n={};return this.config.contentTypeConfig&&Object.keys(this.config.contentTypeConfig).forEach(r=>{const a=r;if(n[a])return;const l=a.split("-"),[c="Any",d="Any",f="Any"]=l||[];(e.dimensionType===c||c==="Any")&&(e.contentType===d||d==="Any")&&(e.pointType===f||f==="Any")&&(n[a]=this.config.contentTypeConfig[a])}),It.default({},this.config.globalConfig,...Object.values(n),e.config)}canBe(e,n){const o=this.getTagConfig(n);if(!o||typeof o!="object")return!0;if(e==="show"||e==="hide"){if(!o.visibleConfig||typeof o.visibleConfig!="object")return!0;if(e==="show"&&o.visibleConfig.keep==="hidden"||e==="hide"&&(o.visibleConfig.keep==="visible"||o.visibleConfig.alwaysShowWhenMovePano))return!1}if(e==="fold"||e==="unfold"){if(!o.unfoldedConfig||typeof o.unfoldedConfig!="object")return!0;if(e==="fold"&&(o.unfoldedConfig.disableFold||o.unfoldedConfig.keep==="unfolded")||e==="unfold"&&(o.unfoldedConfig.disableUnfold||o.unfoldedConfig.keep==="folded"))return!1}return!0}setPointTagPosition(){const e=this.filterPointTag();e.length!==0&&e.forEach(n=>{var s;if(!((s=n.state)!=null&&s.visible)){n.pointTagStyle=void 0;return}const o=this.getTagProject(n);if(!o){n.pointTagStyle=void 0;return}n.pointTagStyle={leftPercent:(o.x+1)/2*100,topPercent:(-o.y+1)/2*100}})}setVisibleByPanoIndex(){this.tags.forEach(e=>{const n=this.getVisibleByPanoIndex(e);e.state&&(e.state.visible=n)})}setUnfoldedByPanoIndex(){this.tags.forEach(e=>{const n=this.getUnfoldedByPanoIndex(e);if(!!e.state&&(n!==void 0&&(e.state.unfolded=n),n&&!e.state.visible)){const o=this.getTagConfig(e);typeof o.unfoldedConfig=="object"&&o.unfoldedConfig.autoUnfoldWhenHide!==!1&&(e.state.unfolded=!1)}})}getTagProject(e){if(!this.getVisibleByPanoIndex(e))return;const o=si(e.position),{x:s,y:r,z:a}=o.project(this.five.camera);if(!(a>1))return{x:s,y:r,z:a}}filterPointTag(){return this.tags.filter(e=>e.pointType===We.PointTag)}filterTag2D(){return this.tags.filter(e=>e.dimensionType===Je.Two)}filter3DPointTag(){return this.tags.filter(e=>e.dimensionType===Je.Three&&e.pointType===We.PointTag)}filter3DTag(){return this.tags.filter(e=>e.dimensionType===Je.Three)}filterPlaneTag(){return this.tags.filter(e=>e.dimensionType===Je.Three&&e.pointType===We.PlaneTag)}}const Wa="1.2.6",$i=`DnalogelPlugin-PanoTagPlugin@${Wa}`,yg=!1,wg=i=>`${$i}--${i}`;class Xa extends bg{constructor(e,n){super(e);p(this,"version",Wa);p(this,"state",{enabled:!0,visible:!0});p(this,"params");p(this,"debug");p(this,"css3DRenderPlugin");p(this,"TagContainerSvelte");p(this,"temporaryState",{visible:!0});p(this,"mediaStore",Di({currentMediaUrl:""}));p(this,"store",{disposers:[],disposed:!1,resizeObserverDisposerAdding:!1,css3DRenderDisposer:new Map});p(this,"staticUrl");p(this,"disposedErrorLog",()=>{console.error(`${$i} is disposed`)});this.params=N({debug:!1,mergePluginDefaultConfigToLoadDataConfig:!1,config:this.config,staticConfig:{host:"vrlab-static.ljcdn.com"}},n),this.debug=this.params.debug,this.config=this.params.config,this.staticUrl=(()=>{var s;const o=this.params.staticConfig;if(typeof o=="string")return o;{const r=o.protocol?o.protocol+":":"",a=(s=o.host)!=null?s:"vrlab-static.ljcdn.com",l=o.port?":"+o.port:"";return`${r}//${a}${l}`}})(),Object.assign(window,{__PANOTAGPLUGIN_DEBUG__:this})}load(e,n){var o,s;this.clearTags(),console.log($i,"load:",{data:e}),this.params.mergePluginDefaultConfigToLoadDataConfig?this.config=It.default({},this.config,{globalConfig:(o=e.globalConfig)!=null?o:{},contentTypeConfig:(s=e.contentTypeConfig)!=null?s:{}}):(e.globalConfig&&(this.config.globalConfig=e.globalConfig),e.contentTypeConfig&&(this.config.contentTypeConfig=e.contentTypeConfig)),this.addTag(e.tagList,n),this.debug&&em(this.five,this.tags)}addTag(e,n){const s=(Array.isArray(e)?e:[e]).map(r=>{const a=this.getTagConfig(r);return pe(N({},r),{state:N({visible:void 0,unfolded:yg},a.initialState),hooks:new me.Subscribe,clickable:a.clickable})}).filter(r=>r.position);this.tags.push(...s),tm(this.five,()=>{var r,a,l;this.store.eventListenerDisposer&&((a=(r=this.store).eventListenerDisposer)==null||a.call(r)),this.state.enabled&&(this.store.eventListenerDisposer=this.addEventListener()),this.addResizeListener(),this.checkPanelTag(),this.setVisibleAndUnfolded({withAnimation:(l=n==null?void 0:n.withAnimation)!=null?l:!0}).then(()=>this.updateRenderAllTags()),this.updateRenderAllTags()})}clearTags(){this.tags=[],this.clearCache(),this.disposeAllCSS3DContainer(),this.updateRenderAllTags()}show(e){return Z(this,null,function*(){const{userAction:n=!0,withAnimation:o=!1}=e!=null?e:{};if(this.store.disposed)return this.disposedErrorLog();this.setState({visible:!0},{userAction:n,visibleWithAnimation:o}),this.hooks.emit("show",{userAction:n,withAnimation:o})})}hide(e){return Z(this,null,function*(){const{userAction:n=!0,withAnimation:o=!1}=e!=null?e:{};if(this.store.disposed)return this.disposedErrorLog();this.setState({visible:!1},{userAction:n,visibleWithAnimation:o}),this.hooks.emit("hide",{userAction:n,withAnimation:o})})}enable(e){const{userAction:n=!0}=e!=null?e:{};if(this.store.disposed)return this.disposedErrorLog();this.setState({enabled:!0},{userAction:n}),this.hooks.emit("enable",{userAction:n})}disable(e){const{userAction:n=!0}=e!=null?e:{};if(this.store.disposed)return this.disposedErrorLog();this.setState({enabled:!1},{userAction:n}),this.hooks.emit("disable",{userAction:n})}dispose(){var e,n,o,s,r,a;this.disposeAllCSS3DContainer(),(e=this.TagContainerSvelte)==null||e.$destroy(),this.filter3DTag().forEach(l=>{var c;return(c=l.tag3DContentSvelte)==null?void 0:c.svelteApp.$destroy()}),this.tags=[],(n=this.store.disposers)==null||n.forEach(l=>l==null?void 0:l()),this.store.disposers=[],this.store.disposed=!0,(s=(o=this.store).eventListenerDisposer)==null||s.call(o),this.store.eventListenerDisposer=void 0,(a=(r=this.store).resizeObserverDisposer)==null||a.call(r),this.store.resizeObserverDisposer=void 0,this.store.resizeObserverDisposerAdding=!1,this.clearCache(),this.hooks.emit("dispose")}setState(e,n){if(this.store.disposed)return this.disposedErrorLog();const{userAction:o=!0,visibleWithAnimation:s=!1}=n,r=N({},this.state);this.state=Object.assign(this.state,e),this.store.visibleWithAnimation=s,r.visible!==this.state.visible&&(e.visible?this.handleShow():this.handleHide()),r.enabled!==this.state.enabled&&(e.enabled?this.handleEnable():this.handleDisable()),this.hooks.emit("stateChange",{state:this.state,prevState:r,userAction:o})}changeTagNormalById(e,n){const o=this.getTagById(e);!o||!o.tag3DContentSvelte||(o.tag3DContentSvelte.currentNormal=rt(n),this.updateRenderPlaneTag())}changeDataById(e,n,o=!0){const s=this.getTagById(e);!s||(o?s.data=It.default({},s.data,n):Object.assign(s.data,n),this.checkPanelTag(),this.updateRenderAllTags())}changeTagById(e,n,o=!0){const s=this.getTagById(e);!n||(o?It.default(s,n):Object.assign(s,n),(s==null?void 0:s.tag3DContentSvelte)&&(n==null?void 0:n.normal)&&(s.tag3DContentSvelte.currentNormal=rt(n.normal)),this.updateRenderAllTags(),this.checkPanelTag())}destroyTagById(e){(Array.isArray(e)?e:[e]).forEach(o=>{const s=this.tags.findIndex(r=>r.id===o);s!==-1&&this.tags.splice(s,1)}),this.updateRenderAllTags()}pauseCurrentMedia(){this.mediaStore.set({currentMediaUrl:""})}setVisibleAndUnfolded(){return Z(this,arguments,function*({withAnimation:e}={withAnimation:!1}){return this.setVisibleByPanoIndex(),e?new Promise((n,o)=>{setTimeout(()=>{this.setUnfoldedByPanoIndex(),n()},10)}):(this.setUnfoldedByPanoIndex(),Promise.resolve())})}handleShow(){this.state.visible=!0,this.updateTagContainerVisible()}handleHide(){this.state.visible=!1,this.updateTagContainerVisible()}handleEnable(){this.state.enabled=!0,this.store.eventListenerDisposer=this.addEventListener(),this.updateRenderAllTags()}handleDisable(){var e,n,o;this.state.enabled=!1,(n=(e=this.store).eventListenerDisposer)==null||n.call(e),(o=this.TagContainerSvelte)==null||o.$set({tags:[]}),this.filter3DTag().forEach(s=>{var r;(r=s.tag3DContentSvelte)==null||r.svelteApp.$destroy(),s.tag3DContentSvelte=void 0})}addEventListener(){const{five:e,hooks:n}=this,o=this.handleFiveWantsMoveToPano.bind(this),s=this.handleFiveModeChange.bind(this),r=this.handleFiveCameraUpdate.bind(this),a=this.handleFiveCameraUpdateDebounce(),l=this.handleFivePanoArrived.bind(this),c=this.clickhandler.bind(this);return e.on("wantsMoveToPano",o),e.on("modeChange",s),e.on("cameraUpdate",r),e.on("cameraUpdate",a),e.on("panoArrived",l),n.on("click",c),()=>{e.off("wantsMoveToPano",o),e.off("modeChange",s),e.off("cameraUpdate",r),e.off("cameraUpdate",a),e.off("panoArrived",l),n.off("click",c),this.store.eventListenerDisposer=void 0}}addResizeListener(){if(!this.store.resizeObserverDisposer&&!this.store.resizeObserverDisposerAdding){const e=this.addResizeObserver();this.store.resizeObserverDisposerAdding=!0,setTimeout(()=>{this.store.resizeObserverDisposer=e,this.store.resizeObserverDisposerAdding=!1},200)}}addResizeObserver(){if(!this.store.disposed)return;const e=this.five.getElement(),n=()=>{!this.state.enabled||(this.show(),this.updateRenderAllTags())},o=()=>{!this.state.enabled||this.hide()},{observe:s,unobserve:r}=Qr(im(()=>{!this.store.resizeObserverDisposer||o()},500),e),{observe:a,unobserve:l}=Qr(Tr(()=>n(),400),e);return s(),a(),()=>{r(),l()}}handleFiveModeChange(e){e==="Panorama"?this.five.once("panoArrived",()=>this.temporaryShow()):this.temporaryHide()}handleFiveWantsMoveToPano(){this.tags.forEach(e=>{const n=this.getTagConfig(e);typeof n.visibleConfig=="object"&&n.visibleConfig.keep?e.temporaryState=pe(N({},e.temporaryState),{visible:n.visibleConfig.keep==="visible"}):typeof n.visibleConfig=="object"&&n.visibleConfig.alwaysShowWhenMovePano?e.temporaryState=pe(N({},e.temporaryState),{visible:!0}):e.temporaryState=pe(N({},e.temporaryState),{visible:!1})}),this.updateRenderAllTags()}temporaryShow(){this.temporaryState.visible=!0}temporaryHide(){this.temporaryState.visible=!1}clickhandler(e){if(e.target!=="TagPoint")return;if(!e.tag.state)return console.warn("Clickhandler: params.tag.state is undefined");const n=this.canBe("fold",e.tag),o=this.canBe("unfold",e.tag);n&&o&&(e.tag.state.unfolded=!e.tag.state.unfolded,e.tag.state.unfolded&&this.tags.forEach(s=>{s.id!==e.tag.id&&s.state&&this.canBe("fold",s)&&(s.state.unfolded=!1)}),this.updateRenderAllTags())}updateRenderAllTags(){this.updateRenderPointTag(),this.updateRenderPlaneTag()}updateTagContainerVisible(){var e;(e=this.TagContainerSvelte)==null||e.$set({state:this.state,temporaryState:this.temporaryState,withAnimation:this.store.visibleWithAnimation}),this.filter3DTag().forEach(n=>{var o;(o=n.tag3DContentSvelte)==null||o.svelteApp.$set({state:this.state,temporaryState:this.temporaryState,withAnimation:this.store.visibleWithAnimation})})}handleFiveCameraUpdateDebounce(){return Tr(()=>{this.setUnfoldedByCamera(),this.updateRenderAllTags()},100)}handleFiveCameraUpdate(){this.updateRenderPointTag()}handleFivePanoArrived(){return Z(this,null,function*(){yield this.setVisibleAndUnfolded(),this.tags.forEach(e=>{e.temporaryState=pe(N({},e.temporaryState),{visible:!0})}),this.updateRenderAllTags()})}setUnfoldedByCamera(){let e=!1;this.tags.forEach(n=>{const o=this.getUnfoldedByCamera(n);!n.state||o!==void 0&&(o===!0&&(e=!0),n.state.unfolded=o)}),e&&this.tags.forEach(n=>{const o=this.getTagConfig(n).unfoldedConfig;typeof o=="object"&&(o.autoUnfold||o.disableFold||o.keep)||n.state&&(n.state.unfolded=!1)})}updateRenderPointTag(){var n;const e=this.filterPointTag();if(this.setPointTagPosition(),this.TagContainerSvelte)this.TagContainerSvelte.$set({tags:e,state:this.state,temporaryState:this.temporaryState});else{const o=(n=this.five.getElement())==null?void 0:n.parentElement;if(!o)return console.error("updateRenderPlaneTag: tag2DContainer not found");this.TagContainerSvelte=new gg({target:o,props:{hooks:this.hooks,tags:e,state:this.state,temporaryState:this.temporaryState,mediaStore:this.mediaStore}})}}updateRenderPlaneTag(){[...this.filterPlaneTag(),...this.filter3DPointTag()].forEach(n=>{var o;if(n.tag3DContentSvelte){const{svelteApp:s,domContainer:r,initialNormal:a,currentNormal:l}=n.tag3DContentSvelte;if(s.$set({tag:n,hooks:this.hooks,state:this.state,temporaryState:this.temporaryState}),!a.equals(l)){const c=new H.Quaternion().setFromUnitVectors(a,l);r.css3DObject.setRotationFromQuaternion(c)}}else{if(((o=n.state)==null?void 0:o.visible)===!1)return;if(this.css3DRenderPlugin||(this.css3DRenderPlugin=Wt(this.five)),n.pointType===We.PointTag&&!n.normal)return console.error("updateRenderPlaneTag: \u4E09\u7EF4\u70B9\u6807\u7B7E\u7F3A\u5C11\u6CD5\u5411\u91CF\uFF01");const s=n.pointType===We.PlaneTag?n.position:nm(this.five.camera.position,rt(n.position),rt(n.normal)),r=n.pointType===We.PlaneTag?Br(n.position):rt(n.normal),a=this.getTagConfig(n).tag3DConfig,l=this.css3DRenderPlugin.create3DDomContainer(s,a);if(!l)return;this.store.css3DRenderDisposer.set(n.id,l.dispose),n.tag3DContentSvelte={svelteApp:new Ta({target:l.container,props:{tag:n,hooks:this.hooks,state:this.state,mediaStore:this.mediaStore,temporaryState:this.temporaryState}}),domContainer:l,initialNormal:r,currentNormal:r}}}),this.checkPanelTag()}disposeAllCSS3DContainer(){for(const[e,n]of this.store.css3DRenderDisposer)n==null||n();this.store.css3DRenderDisposer=new Map}checkPanelTag(){this.tags.forEach(e=>{var n;e.dimensionType===Je.Two&&e.pointType===We.PointTag&&((n=e.tag3DContentSvelte)==null||n.domContainer.dispose(),e.tag3DContentSvelte=void 0)});for(const[e,n]of this.store.css3DRenderDisposer){const o=this.getTagById(e);(!o||o.dimensionType!==Je.Three)&&(n==null||n(),this.store.css3DRenderDisposer.delete(e))}}}const Cg=(i,t)=>new Xa(i,t);class eo extends H.Object3D{constructor(e,n){var o;super();p(this,"originObject3D");p(this,"onRender");this.originObject3D=e,this.onRender=(o=n==null?void 0:n.onRender)!=null?o:()=>{}}get helperObject(){return this}render(){this.onRender()}show(){this.visible=!0,this.render()}hide(){this.visible=!1,this.render()}updatePosition(){this.position.copy(this.originObject3D.position)}updateQuaternion(){this.quaternion.copy(this.originObject3D.quaternion)}applyHelperScaleMatrix4(e,n){this.scale.applyMatrix4(e)}applyHelperQuaternion(e,n){this.applyQuaternion(e)}}class Pg extends eo{}class Ig extends eo{}class Eg extends eo{}class xg extends Eg{}class kg extends I.Group{constructor(e){super();p(this,"direction");this.direction=e||"x"}}class Ya extends I.Mesh{constructor(e,n,o){super(e,n);p(this,"direction");this.direction=o||"x"}}function Dg(i,t){const{offsetWidth:e,offsetHeight:n}=t,{top:o,left:s}=t.getBoundingClientRect();return Object.assign(new I.Vector2,{x:(i.x-s)/e*2-1,y:-(i.y-o)/n*2+1})}function to(i,t,e){if(!t||!e||!i)return;const n=Dg(t,e);if(Math.abs(n.x)===1||Math.abs(n.y)===1)return;const o=new I.Raycaster;return o.setFromCamera(n,i),o}function Lg(i,t){return!(Math.abs(i.x-t.x)>1e-5||Math.abs(i.y-t.y)>1e-5||Math.abs(i.z-t.z)>1e-5)}class no extends kg{constructor(e){var d;super(e.direction);p(this,"line");p(this,"arrow");p(this,"lineHeight",.4);p(this,"arrowHeight",.1);this.name="ArrowGroup";const n=new I.Color((d=e.color)!=null?d:16214315),o=new I.MeshBasicMaterial({color:n,depthTest:!1,opacity:1,transparent:!0,side:I.DoubleSide}),s=new I.ConeGeometry(.04,.1,32),r=new Ya(s,o.clone(),e.direction);r.name=`arrow-${e.direction}`,this.arrow=r;const a=.004,l=new I.CylinderGeometry(a,a,.4,32),c=new Ya(l,o.clone(),e.direction);c.name=`line-${e.direction}`,this.line=c,this.formatArrow(),this.formatLine(),this.add(this.arrow,this.line)}formatArrow(){this.arrow.geometry.translate(0,this.lineHeight+this.arrowHeight/2,0),this.direction==="x"?(this.arrow.geometry.rotateX(Math.PI/2),this.arrow.geometry.rotateY(Math.PI/2)):this.direction==="z"&&this.arrow.geometry.rotateX(Math.PI/2)}formatLine(){this.line.geometry.translate(0,this.lineHeight/2,0),this.direction==="x"?(this.line.geometry.rotateX(Math.PI/2),this.line.geometry.rotateY(Math.PI/2)):this.direction==="z"&&this.line.geometry.rotateX(Math.PI/2)}}const io={X:15618642,Y:4765519,Z:4227839};class ct{static get X(){return new I.Color(io.X).convertSRGBToLinear().clone()}static get Y(){return new I.Color(io.Y).convertSRGBToLinear().clone()}static get Z(){return new I.Color(io.Z).convertSRGBToLinear().clone()}}class Sg extends Pg{constructor(e){super(e);p(this,"xArrow",new no({direction:"x",color:ct.X}));p(this,"yArrow",new no({direction:"y",color:ct.Y}));p(this,"zArrow",new no({direction:"z",color:ct.Z}));this.add(this.xArrow),this.add(this.yArrow),this.add(this.zArrow)}show(){super.show(),this.xArrow.visible=!0,this.yArrow.visible=!0,this.zArrow.visible=!0}showDraggingHelper(e){this.xArrow.visible=e.includes("x"),this.yArrow.visible=e.includes("y"),this.zArrow.visible=e.includes("z")}dispose(){this.remove(this.xArrow,this.yArrow,this.zArrow)}}function Rt(i,t){return zg(document.createElement(t!=null?t:"div"),i)}function zg(i,t){if(!t)return i;for(const e in t)e&&t[e]&&(i.style[e]=t[e]);return i}function Mg(i){const t=Rt(N({position:"absolute",display:"block",borderRadius:"4px",paddingTop:"1px",paddingBottom:"1px",paddingLeft:"4px",paddingRight:"4px",pointerEvents:"none",userSelect:"none",zIndex:"9999",backgroundColor:"rgba(0,0,0,0.7)",fontSize:"12px",color:"#fff",letterSpacing:"0",lineHeight:"18px"},i)),e=()=>{t.style.display!=="block"&&(!t.style.top||!t.style.left||(t.style.display="block"))};return{element:t,show:e,hide:()=>{t.style.display="none",t.style.top="",t.style.left=""},setLeftTop:(s,r)=>{t.style.left=s,t.style.top=r,e()}}}class jg extends Ig{constructor(e,n){var o;super(e);p(this,"yzCircle",new oo({direction:"x",color:ct.X}));p(this,"xzCircle",new oo({direction:"y",color:ct.Y}));p(this,"xyCircle",new oo({direction:"z",color:ct.Z}));p(this,"xRingHelper",new so({direction:"x"}));p(this,"yRingHelper",new so({direction:"y"}));p(this,"zRingHelper",new so({direction:"z"}));p(this,"xAngleHelper",new ro({direction:"x",color:ct.X}));p(this,"yAngleHelper",new ro({direction:"y",color:ct.Y}));p(this,"zAngleHelper",new ro({direction:"z",color:ct.Z}));p(this,"angleTips");p(this,"container");n&&(this.container=n==null?void 0:n.container,this.angleTips=Mg({display:"none"}),(o=this.container)==null||o.appendChild(this.angleTips.element)),this.show()}updateAngleHelperQuaternion(){this.xAngleHelper.quaternion.copy(this.yzCircle.quaternion),this.yAngleHelper.quaternion.copy(this.xzCircle.quaternion),this.zAngleHelper.quaternion.copy(this.xyCircle.quaternion),this.xRingHelper.quaternion.copy(this.yzCircle.quaternion),this.yRingHelper.quaternion.copy(this.xzCircle.quaternion),this.zRingHelper.quaternion.copy(this.xyCircle.quaternion)}applyHelperQuaternion(e,n){this.yzCircle.applyQuaternion(e),this.xzCircle.applyQuaternion(e),this.xyCircle.applyQuaternion(e),this.xAngleHelper.baseAxes.applyQuaternion(e),this.yAngleHelper.baseAxes.applyQuaternion(e),this.zAngleHelper.baseAxes.applyQuaternion(e)}hide(){this.remove(this.yzCircle,this.xzCircle,this.xyCircle,this.xRingHelper,this.yRingHelper,this.zRingHelper,this.xAngleHelper,this.yAngleHelper,this.zAngleHelper)}show(){var e;this.add(this.xyCircle,this.xzCircle,this.yzCircle),this.remove(this.xRingHelper,this.yRingHelper,this.zRingHelper,this.xAngleHelper,this.yAngleHelper,this.zAngleHelper),(e=this.angleTips)==null||e.hide()}showDraggingHelper(e){var n;this.hide(),this.add(...this.filterRingHelper(e)),this.add(...this.filterAngleHelper(e)),(n=this.angleTips)==null||n.show()}dispose(){var e,n;this.remove(this.yzCircle,this.xzCircle,this.xyCircle,this.xRingHelper,this.yRingHelper,this.zRingHelper,this.xAngleHelper,this.yAngleHelper,this.zAngleHelper),(e=this.angleTips)!=null&&e.element&&((n=this.container)==null||n.removeChild(this.angleTips.element))}filterRingHelper(e){return[this.xRingHelper,this.yRingHelper,this.zRingHelper].filter(n=>e.includes(n.direction))}filterAngleHelper(e){return[this.xAngleHelper,this.yAngleHelper,this.zAngleHelper].filter(n=>e.includes(n.direction))}}class oo extends I.Mesh{constructor(e){var n;super();p(this,"direction");p(this,"gapAngle",.02);p(this,"geometry",new I.RingGeometry(.25,.3,20,8,this.gapAngle,Math.PI/2-this.gapAngle*2));this.material=new I.MeshBasicMaterial({opacity:.6,color:(n=e.color)!=null?n:16777215,transparent:!0,side:I.DoubleSide,depthTest:!1}),this.direction=e.direction,this.geometry.name=`RotateHelperCircleGeometry-${this.direction}`,this.direction==="y"?this.rotateX(Math.PI/2):this.direction==="x"&&this.rotateY(-Math.PI/2)}}class so extends I.Group{constructor(e){super();p(this,"direction");this.direction=e.direction;const n=.015,o=new Array(8).fill(null).map((s,r)=>{const a=new I.RingGeometry(.25,.3,20,8,Math.PI/4*r+n,Math.PI/4-n*2),l=new I.MeshBasicMaterial({opacity:1,color:16777215,depthTest:!1,transparent:!0,side:I.DoubleSide}),c=new I.Mesh(a,l);return c.name=`AxesDashedRing-${this.direction}-${r}`,c});this.add(...o),this.direction==="y"?this.rotateX(Math.PI/2):this.direction==="x"&&this.rotateY(-Math.PI/2)}}class ro extends I.Mesh{constructor(e){var o;super();p(this,"direction");p(this,"baseAxes");switch(e.direction){case"x":this.baseAxes=new I.Vector3(0,0,1);break;case"y":this.baseAxes=new I.Vector3(1,0,0);break;case"z":this.baseAxes=new I.Vector3(1,0,0);break}const n=.3+5e-4;this.geometry=new I.CircleGeometry(n,48,0,1e-4),this.material=new I.MeshBasicMaterial({opacity:.4,color:(o=e.color)!=null?o:16777215,depthTest:!1,transparent:!0,side:I.DoubleSide}),this.direction=e.direction,this.direction==="y"?this.rotateX(Math.PI/2):this.direction==="x"&&this.rotateY(-Math.PI/2)}}function Bg(){const i=Rt({width:"100%",height:"100%",left:"0",top:"0",position:"absolute",pointerEvents:"none"}),t=Rt({boxSizing:"border-box",width:"100%",height:"100%",left:"0",top:"0",position:"relative",display:"flex",alignItems:"center",justifyContent:"center"}),e=Rt({boxSizing:"border-box",width:"100%",height:"100%",left:"0",top:"0",position:"absolute",border:"1px solid rgba(255,255,255,0.4)"});i.appendChild(t),t.appendChild(e);const n="-4px",o={direction:"nesw",element:bt({cursor:"nesw-resize",left:n,bottom:n})},s={direction:"ns",element:bt({cursor:"ns-resize",bottom:n})},r={direction:"nwse",element:bt({cursor:"nwse-resize",right:n,bottom:n})},a={direction:"ew",element:bt({cursor:"ew-resize",right:n})},l={direction:"nesw",element:bt({cursor:"nesw-resize",right:n,top:n})},c={direction:"ns",element:bt({cursor:"ns-resize",top:n})},d={direction:"nwse",element:bt({cursor:"nwse-resize",left:n,top:n})},f={direction:"ew",element:bt({cursor:"ew-resize",left:n})};return new Array(s,a,c,f,o,r,l,d).forEach(h=>t.appendChild(h.element)),{container:i,squares:[o,s,r,a,l,c,d,f]}}function bt(i){const t=Rt(N({background:"#FFFFFF",width:"9px",height:"9px",position:"absolute",pointerEvents:"none"},i)),e=Rt({width:"15px",height:"15px",position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none"}),n=Rt({width:"15px",height:"15px",cursor:i==null?void 0:i.cursor,pointerEvents:"auto",background:"transparent"});return n.draggable=!0,e.appendChild(n),t.appendChild(e),t}class Tg extends xg{constructor(e,n,o,s){super(e);p(this,"points",[]);p(this,"cornerPositions",[]);p(this,"css3DInstance");p(this,"plane");p(this,"css3DRenderer",new ko);p(this,"camera");p(this,"scene");p(this,"container");p(this,"enabled",!1);this.camera=o,this.scene=s,this.container=n,this.initRectangleScaleHelper()}get helperObject(){var e;if(!((e=this.css3DInstance)!=null&&e.css3DObject))throw new Error("css3DInstance is not initialized");return this.css3DInstance.css3DObject}updatePosition(){var e;this.helperObject.position.copy(this.originObject3D.position),(e=this.plane)==null||e.position.copy(this.originObject3D.position)}updateQuaternion(){var e;(e=this.plane)==null||e.quaternion.copy(this.originObject3D.quaternion)}applyMatrix4(e){var n;super.applyMatrix4(e),this.helperObject.applyMatrix4(e),(n=this.plane)==null||n.applyMatrix4(e),this.cornerPositions.forEach(o=>o.applyMatrix4(e))}showDraggingHelper(){}applyHelperScaleMatrix4(e,n){var o;(o=this.plane)==null||o.scale.applyMatrix4(e),this.helperObject.applyScaleMatrix4(e)}updatePoints(){const e=this.calculatePointPosition(this.cornerPositions);this.points.forEach((n,o)=>{n.position.copy(e[o])})}applyHelperQuaternion(e,n){var s;const o=(s=this.css3DInstance)==null?void 0:s.css3DObject;if(o){const r=new I.Vector3().subVectors(o.position,n).applyQuaternion(e).add(n);o.position.copy(r),o.applyQuaternion(e)}if(this.plane){const r=new I.Vector3().subVectors(this.plane.position,n).applyQuaternion(e).add(n);this.plane.position.copy(r),this.plane.applyQuaternion(e)}this.cornerPositions.forEach(r=>{const a=new I.Vector3().subVectors(r,n).applyQuaternion(e).add(n);r.copy(a)})}enable(){var e;this.enabled||(this.enabled=!0,(e=this.css3DInstance)==null||e.enable(),this.plane&&this.scene.add(this.plane))}disable(){var e;!this.enabled||(this.enabled=!1,(e=this.css3DInstance)==null||e.disable(),this.plane&&this.scene.remove(this.plane))}show(){var e;(e=this.css3DInstance)==null||e.show(),this.plane&&(this.plane.visible=!0)}hide(){var e;(e=this.css3DInstance)==null||e.hide(),this.plane&&(this.plane.visible=!1)}dispose(){this.disable(),this.css3DRenderer.dispose()}initRectangleScaleHelper(){var d;const e=this.getCornerPositions();if(!e)return;this.cornerPositions=e;const n=this.css3DRenderer.create3DElement(this.camera,e,{ratio:.003});if(!n)return;this.css3DInstance=n,n.appendToElement(this.container);const o=n.css3DObject.container,{container:s,squares:r}=Bg();this.points=r.map((f,u)=>({direction:f.direction,point:f.element,position:this.calculatePointPosition(e)[u]})),o.insertBefore(s,(d=o.children[0])!=null?d:null);const a=new I.PlaneGeometry(n.css3DObject.width,n.css3DObject.height),l=new I.MeshBasicMaterial({color:0,opacity:.15,transparent:!0,side:I.DoubleSide}),c=new I.Mesh(a,l);this.scene.add(c),this.updatePosition()}getCornerPositions(){const{originObject3D:e}=this;if(e instanceof Ct.CSS3DObject){if(e.isCSS3DObjectPlus)return e.cornerPoints;console.error("\u6682\u65F6\u53EA\u652F\u6301 CSS3DRenderPlugin \u751F\u6210\u7684\u7269\u4F53")}else console.error("\u5F53\u524D\u7269\u4F53\u6682\u65F6\u4E0D\u652F\u6301 ScaleHelper")}calculatePointPosition(e){return[e[0].clone(),e[0].clone().add(e[1]).divideScalar(2),e[1].clone(),e[1].clone().add(e[2]).divideScalar(2),e[2].clone(),e[2].clone().add(e[3]).divideScalar(2),e[3].clone(),e[3].clone().add(e[0]).divideScalar(2)]}}new I.Vector3;function ve(i,t){this._camera=i||null,this._domElement=t||document,this._raycaster=new I.Raycaster,this._selected=null,this._boundObjs={};var e=this;this._$onClick=function(){e._onClick.apply(e,arguments)},this._$onDblClick=function(){e._onDblClick.apply(e,arguments)},this._$onMouseMove=function(){e._onMouseMove.apply(e,arguments)},this._$onMouseDown=function(){e._onMouseDown.apply(e,arguments)},this._$onMouseUp=function(){e._onMouseUp.apply(e,arguments)},this._$onTouchMove=function(){e._onTouchMove.apply(e,arguments)},this._$onTouchStart=function(){e._onTouchStart.apply(e,arguments)},this._$onTouchEnd=function(){e._onTouchEnd.apply(e,arguments)},this._$onContextmenu=function(){e._onContextmenu.apply(e,arguments)},this._domElement.addEventListener("click",this._$onClick,!1),this._domElement.addEventListener("dblclick",this._$onDblClick,!1),this._domElement.addEventListener("mousemove",this._$onMouseMove,!1),this._domElement.addEventListener("mousedown",this._$onMouseDown,!1),this._domElement.addEventListener("mouseup",this._$onMouseUp,!1),this._domElement.addEventListener("touchmove",this._$onTouchMove,!1),this._domElement.addEventListener("touchstart",this._$onTouchStart,!1),this._domElement.addEventListener("touchend",this._$onTouchEnd,!1),this._domElement.addEventListener("contextmenu",this._$onContextmenu,!1)}ve.prototype.destroy=function(){this._domElement.removeEventListener("click",this._$onClick,!1),this._domElement.removeEventListener("dblclick",this._$onDblClick,!1),this._domElement.removeEventListener("mousemove",this._$onMouseMove,!1),this._domElement.removeEventListener("mousedown",this._$onMouseDown,!1),this._domElement.removeEventListener("mouseup",this._$onMouseUp,!1),this._domElement.removeEventListener("touchmove",this._$onTouchMove,!1),this._domElement.removeEventListener("touchstart",this._$onTouchStart,!1),this._domElement.removeEventListener("touchend",this._$onTouchEnd,!1),this._domElement.removeEventListener("contextmenu",this._$onContextmenu,!1)},ve.eventNames=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","contextmenu","touchstart","touchend"],ve.prototype._getRelativeMouseXY=function(i){var t=i.target||i.srcElement;t.nodeType===3&&(t=t.parentNode);var e={x:0,y:0},n=t,o=getComputedStyle(n,null);e.y+=parseInt(o.getPropertyValue("padding-top"),10),e.x+=parseInt(o.getPropertyValue("padding-left"),10);do e.x+=n.offsetLeft,e.y+=n.offsetTop,o=getComputedStyle(n,null),e.x+=parseInt(o.getPropertyValue("border-left-width"),10),e.y+=parseInt(o.getPropertyValue("border-top-width"),10);while(n=n.offsetParent);var s={width:t===window?window.innerWidth:t.offsetWidth,height:t===window?window.innerHeight:t.offsetHeight};return{x:Number((i.pageX-e.x)/s.width)*2-1,y:-((i.pageY-e.y)/s.height)*2+1}},ve.prototype._objectCtxInit=function(i){i._3xDomEvent={}},ve.prototype._objectCtxDeinit=function(i){delete i._3xDomEvent},ve.prototype._objectCtxIsInit=function(i){return!!i._3xDomEvent},ve.prototype._objectCtxGet=function(i){return i._3xDomEvent},ve.prototype.camera=function(i){return i&&(this._camera=i),this._camera},ve.prototype.bind=function(i,t,e,n){console.assert(ve.eventNames.indexOf(t)!==-1,"not available events:"+t),this._objectCtxIsInit(i)||this._objectCtxInit(i);var o=this._objectCtxGet(i);o[t+"Handlers"]||(o[t+"Handlers"]=[]),o[t+"Handlers"].push({callback:e,useCapture:n}),this._boundObjs[t]===void 0&&(this._boundObjs[t]=[]),this._boundObjs[t].push(i)},ve.prototype.addEventListener=ve.prototype.bind,ve.prototype.unbind=function(i,t,e,n){console.assert(ve.eventNames.indexOf(t)!==-1,"not available events:"+t),this._objectCtxIsInit(i)||this._objectCtxInit(i);var o=this._objectCtxGet(i);o[t+"Handlers"]||(o[t+"Handlers"]=[]);for(var s=o[t+"Handlers"],r=0;r<s.length;r++){var a=s[r];if(e==a.callback&&n==a.useCapture){s.splice(r,1);break}}var l=this._boundObjs[t].indexOf(i);console.assert(l!==-1),this._boundObjs[t].splice(l,1)},ve.prototype.removeEventListener=ve.prototype.unbind,ve.prototype._bound=function(i,t){var e=this._objectCtxGet(t);return e?!!e[i+"Handlers"]:!1},ve.prototype._onMove=function(i,t,e,n){var o=this._boundObjs[i];if(!(o===void 0||o.length===0)){var s=new I.Vector2;s.set(t,e),this._raycaster.setFromCamera(s,this._camera);var r=this._raycaster.intersectObjects(o),a=this._selected;if(r.length>0){var l,c,d,f=r[0],u=f.object;this._selected=u,d=this._bound("mousemove",u),a!=u&&(l=this._bound("mouseover",u),c=a&&this._bound("mouseout",a))}else c=a&&this._bound("mouseout",a),this._selected=null;d&&this._notify("mousemove",u,n,f),l&&this._notify("mouseover",u,n,f),c&&this._notify("mouseout",a,n,f)}},ve.prototype._onEvent=function(i,t,e,n){var o=this._boundObjs[i];if(!(o===void 0||o.length===0)){var s=new I.Vector2;s.set(t,e),this._raycaster.setFromCamera(s,this._camera);var r=this._raycaster.intersectObjects(o,!0);if(r.length!==0){for(var a=r[0],l=a.object,c=this._objectCtxGet(l),d=l.parent;typeof c=="undefined"&&d;)c=this._objectCtxGet(d),d=d.parent;!c||this._notify(i,l,n,a)}}},ve.prototype._notify=function(i,t,e,n){var o=this._objectCtxGet(t),s=o?o[i+"Handlers"]:null;if(console.assert(arguments.length===4),!o||!s||s.length===0){t.parent&&this._notify(i,t.parent,e,n);return}for(var s=o[i+"Handlers"],r=0;r<s.length;r++){var a=s[r],l=!0;a.callback({type:i,target:t,origDomEvent:e,intersect:n,stopPropagation:function(){l=!1}}),!!l&&a.useCapture===!1&&t.parent&&this._notify(i,t.parent,e,n)}},ve.prototype._onMouseDown=function(i){return this._onMouseEvent("mousedown",i)},ve.prototype._onMouseUp=function(i){return this._onMouseEvent("mouseup",i)},ve.prototype._onMouseEvent=function(i,t){var e=this._getRelativeMouseXY(t);this._onEvent(i,e.x,e.y,t)},ve.prototype._onMouseMove=function(i){var t=this._getRelativeMouseXY(i);this._onMove("mousemove",t.x,t.y,i),this._onMove("mouseover",t.x,t.y,i),this._onMove("mouseout",t.x,t.y,i)},ve.prototype._onClick=function(i){this._onMouseEvent("click",i)},ve.prototype._onDblClick=function(i){this._onMouseEvent("dblclick",i)},ve.prototype._onContextmenu=function(i){this._onMouseEvent("contextmenu",i)},ve.prototype._onTouchStart=function(i){return this._onTouchEvent("touchstart",i)},ve.prototype._onTouchEnd=function(i){return this._onTouchEvent("touchend",i)},ve.prototype._onTouchMove=function(i){if(i.touches.length==1){i.preventDefault();var t=Number(i.touches[0].pageX/window.innerWidth)*2-1,e=-(i.touches[0].pageY/window.innerHeight)*2+1;this._onMove("mousemove",t,e,i),this._onMove("mouseover",t,e,i),this._onMove("mouseout",t,e,i)}},ve.prototype._onTouchEvent=function(i,t){if(t.touches.length==1){t.preventDefault();var e=Number(t.touches[0].pageX/window.innerWidth)*2-1,n=-(t.touches[0].pageY/window.innerHeight)*2+1;this._onEvent(i,e,n,t)}};let Ft=null;class ao{constructor(t,e,n,o,s,r,a){p(this,"hooks",new ln);p(this,"helperObject3D");p(this,"originObject3D");p(this,"camera");p(this,"model");p(this,"scene");p(this,"container");p(this,"domEvents");p(this,"isDragging",!1);p(this,"onRender");p(this,"enabled",!1);p(this,"onWantsTapGesture",t=>{if(this.getIntersectObject(t))return!1});this.camera=t,this.model=e,this.originObject3D=n,this.helperObject3D=o,this.container=s,this.scene=r,this.domEvents=new ve(t,s),this.onRender=a!=null?a:()=>{},this.initialHelperPosition(),this.initialHelperQuaternion(),this.enable()}initialHelperPosition(){this.helperObject3D.updatePosition()}initialHelperQuaternion(){this.helperObject3D.updateQuaternion()}enable(){this.enabled||(this.enabled=!0,this.scene.add(this.helperObject3D),this.render())}disable(){!this.enabled||(this.enabled=!1,this.scene.remove(this.helperObject3D),this.render())}show(){this.helperObject3D.show(),this.render()}hide(){this.helperObject3D.hide(),this.render()}dispose(){this.helperObject3D.dispose(),this.scene.remove(this.helperObject3D),this.render()}setOpacity(t){this.setOriginOpacityProperty();const e=this.originObject3D;if(e instanceof I.Mesh&&(e.material.opacity=t),e.isCSS3DObjectPlus){const n=e;n.container.style.opacity=t.toString()}this.render()}restoreOpacity(){if(Ft===null)return;const t=this.originObject3D;if(t instanceof I.Mesh&&(t.material.opacity=Ft.opacity),t.isCSS3DObjectPlus){const e=t;e.container.style.opacity=Ft.opacity.toString()}this.render()}setOriginOpacityProperty(){var t,e;if(Ft===null){const n=this.originObject3D;n instanceof I.Mesh&&(Ft={opacity:n.material.opacity}),n instanceof Io&&(Ft={opacity:(t=n.container.style.opacity)!=null?t:1}),n.isCSS3DObjectPlus&&(Ft={opacity:Number((e=n.container.style.opacity)!=null?e:1)})}}updateHelperPosition(){this.helperObject3D.updatePosition()}updateHelperQuaternion(){this.helperObject3D.updateQuaternion()}applyHelperMatrix4(t){this.helperObject3D.applyMatrix4(t)}applyHelperQuaternion(t,e){this.helperObject3D.applyHelperQuaternion(t,e)}applyHelperScaleMatrix4(t,e){this.helperObject3D.applyHelperScaleMatrix4(t,e)}onWantsGesture(t,e,n){if(this.isDragging)return!1}render(){this.onRender()}hoverListener(t,e=16777215,n=1){const o=(Array.isArray(t)?t:[t]).filter(Qt),s=[];for(const r of o)if(r instanceof I.Mesh||r instanceof I.Group){const a=r instanceof I.Group?r.children.filter(u=>u instanceof I.Mesh):[r];a.forEach(u=>{u.__originalColor__=u.material.color.clone(),u.__originalOpacity__=u.material.opacity});const l=()=>{a.forEach(u=>{u.material.color.set(e),u.material.opacity=n}),this.render()},c=()=>{a.forEach(u=>{u.material.color.copy(u.__originalColor__),u.material.opacity=u.__originalOpacity__}),this.render()},d=()=>{this.isDragging||l()},f=()=>{this.isDragging||c()};for(const u of a)this.domEvents.addEventListener(u,"mouseover",d),this.domEvents.addEventListener(u,"mouseout",f),this.hooks.on("moveStart",l),this.hooks.on("moveEnd",c),this.hooks.on("rotateEnd",c),s.push(()=>{this.domEvents.removeEventListener(u,"mouseover",d),this.domEvents.removeEventListener(u,"mouseout",f),this.hooks.off("moveStart",l),this.hooks.off("moveEnd",c),this.hooks.off("rotateEnd",c)})}return()=>s.forEach(r=>r==null?void 0:r())}getIntersectObject(t){const e=this.camera.position,n=this.helperObject3D;if(!n)return;let o;const s=t.intersectObject(n,!0)[0];if(!!s&&(o=s,o.object=n,!!o)){if(this.model.intersectRaycaster){const r=this.model.intersectRaycaster(t)[0];if(r&&r.point.distanceTo(e)<o.point.distanceTo(e))return}return o.object}}}class Qg extends ao{constructor(...e){super(...e);p(this,"startInfo");const n=this.helperObject3D;this.hoverListener([n.xArrow,n.yArrow,n.zArrow]);const o=this.dragStart.bind(this),s=this.dragging.bind(this),r=this.dragEnd.bind(this);this.domEvents.addEventListener(this.helperObject3D,"mousedown",o),document.addEventListener("mousemove",s),document.addEventListener("mouseup",r)}dragStart(e){if(this.isDragging)return;const n=e==null?void 0:e.intersect;if(!n)return this.dragEnd();const o=(n==null?void 0:n.object).direction;if(!o)return this.dragEnd();const s=new I.Vector3(1,0,0).applyQuaternion(this.helperObject3D.quaternion),r=new I.Vector3(0,1,0).applyQuaternion(this.helperObject3D.quaternion),a=new I.Vector3(0,0,1).applyQuaternion(this.helperObject3D.quaternion),l=(()=>{switch(o){case"x":return s;case"y":return r;case"z":return a}})(),c=(()=>{switch(o){case"x":case"y":return a;case"z":return s}})(),d=n.point.clone(),f=new I.Plane;f.setFromNormalAndCoplanarPoint(c,d),this.startInfo={startVectorProject:d.clone().projectOnVector(l),directionVector:l,plane:f},this.helperObject3D.showDraggingHelper([o]),this.hooks.emit("moveStart"),this.isDragging=!0,console.log("%c MoveController dragStart","color: #e5af2e")}dragging(e){if(!this.isDragging||!this.startInfo)return;const n=to(this.camera,e,this.container);return n?(console.log("%c RotateController dragging","color: #49de1b"),this.move(n),!1):this.dragEnd()}move(e){if(!this.startInfo)return this.dragEnd();const{plane:n,directionVector:o,startVectorProject:s}=this.startInfo,r=this.originObject3D,a=e.ray.intersectPlane(n,new I.Vector3);if(!a)return;const l=a.clone().projectOnVector(o),c=l.clone().sub(s),d=new I.Matrix4;d.setPosition(c),r.applyMatrix4(d),this.helperObject3D.applyMatrix4(d),s.copy(l),this.hooks.emit("positionUpdate",{matrix4:d})}dragEnd(){!this.isDragging||(console.log("%c MoveController dragEnd","color: #e94e4e"),this.startInfo=void 0,this.isDragging=!1,this.helperObject3D.show(),this.hooks.emit("moveEnd"))}}class lo{constructor(t,e,n,o){p(this,"helperController");p(this,"five");p(this,"onFiveWantsTapGesture",t=>{if(!this.helperController)return;const e=this.helperController.onWantsTapGesture(t);return this.five.needsRender=!0,e});p(this,"onFiveWantsGesture",(...t)=>{if(!this.helperController)return;const e=this.helperController.onWantsGesture(...t);return this.five.needsRender=!0,e});const{camera:s,model:r,scene:a}=t,l=t.getElement();if(this.five=t,!s||!r||!l||!a)return;const c=()=>{t.needsRender=!0};this.helperController=new e(s,r,n,o,l,a,c),t.on("wantsTapGesture",this.onFiveWantsTapGesture),t.on("wantsGesture",this.onFiveWantsGesture)}}const co="Object3DHelper@v1.0.1",Og=()=>{console.error(`${co} is disposed`)},Rg=()=>{console.warn(`${co} is disabled`)},Fg=()=>{console.error(`${co} is disabled`)};class Hg{constructor(t,e){p(this,"controllers",{});p(this,"state",{visible:!0,enabled:!0,disposed:!1});p(this,"hooks",new ln);p(this,"helpers");p(this,"eventListener",{});p(this,"handlePositionUpdate",(t,...e)=>{var s,r,a,l;const[n]=e,o=n==null?void 0:n.matrix4;o&&(t!==this.controllers.moveController&&((s=this.controllers.moveController)==null||s.applyHelperMatrix4(o)),t!==this.controllers.rotateController&&((r=this.controllers.rotateController)==null||r.applyHelperMatrix4(o)),t!==this.controllers.scaleController&&((a=this.controllers.scaleController)==null||a.applyHelperMatrix4(o)),(l=this.helpers.outlineHelper)==null||l.applyMatrix4(o))});p(this,"handleScaleUpdate",(t,...e)=>{var s,r;const[n]=e,o=n==null?void 0:n.matrix4;o&&((s=this.controllers.scaleController)==null||s.applyHelperScaleMatrix4(o,n),(r=this.helpers.outlineHelper)==null||r.scale.applyMatrix4(o))});p(this,"handleRotateUpdate",(t,...e)=>{var o,s,r,a;const[n]=e;if(n){const{quaternion:l,origin:c}=n;l&&(t!==this.controllers.moveController&&((o=this.controllers.moveController)==null||o.applyHelperQuaternion(l,c)),t!==this.controllers.rotateController&&((s=this.controllers.rotateController)==null||s.applyHelperQuaternion(l,c)),t!==this.controllers.scaleController&&((r=this.controllers.scaleController)==null||r.applyHelperQuaternion(l,c)),(a=this.helpers.outlineHelper)==null||a.applyQuaternion(l))}});t&&this.addControllers(t),this.helpers=e!=null?e:{},this.setState(this.state)}show(t){return Z(this,null,function*(){this.setState({visible:!0},t)})}hide(t){return Z(this,null,function*(){this.setState({visible:!1},t)})}enable(t){this.setState({enabled:!0},t)}disable(t){this.setState({enabled:!1},t)}dispose(){this.setState({disposed:!0})}setState(t,e){if(this.state.disposed)return Og();if(!this.state.enabled&&t.enabled!==!0&&t.disposed!==!0)return Fg();const n=N({},this.state);this.state=N(N({},this.state),t),t.disposed!==void 0&&t.disposed!==n.disposed&&t.disposed&&this.handleDispose(),t.visible!==void 0&&this.handleVisible(t.visible),t.enabled!==void 0&&this.handleEnable(t.enabled),this.hooks.emit("stateChange",{state:this.state,prevState:n})}addControllers(t){this.controllers=N(N({},this.controllers),t),this.addEventListener(),this.setState(this.state)}addHelpers(t){this.helpers=N(N({},this.helpers),t)}getCurrentState(){return this.state}addEventListener(){for(const t in this.controllers){if(!t)continue;const e=t;this.eventListener[e]||(this.eventListener[e]=(()=>{const n=this.controllers[e];if(!n)return;const o=()=>this.handleStart(n),s=()=>this.handleEnd(n),r=(...c)=>this.handlePositionUpdate(n,...c),a=(...c)=>this.handleRotateUpdate(n,...c),l=(...c)=>this.handleScaleUpdate(n,...c);return n.hooks.on("moveStart",o),n.hooks.on("rotateStart",o),n.hooks.on("scaleStart",o),n.hooks.on("positionUpdate",r),n.hooks.on("rotateUpdate",a),n.hooks.on("scaleUpdate",l),n.hooks.on("moveEnd",s),n.hooks.on("rotateEnd",s),n.hooks.on("scaleEnd",s),()=>{n.hooks.off("moveStart",o),n.hooks.off("rotateStart",o),n.hooks.off("scaleStart",o),n.hooks.off("positionUpdate",r),n.hooks.off("rotateUpdate",a),n.hooks.off("scaleUpdate",l),n.hooks.off("moveEnd",s),n.hooks.off("rotateEnd",s),n.hooks.off("scaleEnd",s)}})())}}handleEnd(t){t&&this.setOtherHelpersVisible(!0,t)}handleStart(t){t&&this.setOtherHelpersVisible(!1,t)}setOtherHelpersVisible(t,e){var n,o,s,r;t?((s=this.controllers.moveController)==null||s.helperObject3D.show(),(r=this.controllers.rotateController)==null||r.helperObject3D.show()):(e!==this.controllers.moveController&&((n=this.controllers.moveController)==null||n.helperObject3D.hide()),e!==this.controllers.rotateController&&((o=this.controllers.rotateController)==null||o.helperObject3D.hide()))}handleEnable(t,e=!0){t?(this.everyControllerDo(n=>{n.enable()}),this.hooks.emit("enable",{userAction:e})):(this.everyControllerDo(n=>{n.disable(),n.restoreOpacity()}),this.hooks.emit("disable",{userAction:e})),this.state.enabled=t}handleVisible(t,e=!0){t?(this.everyControllerDo(n=>{n.show()}),this.actionIfStateIsEnabled(()=>this.hooks.emit("show",{userAction:e}))):(this.everyControllerDo(n=>{n.hide(),n.restoreOpacity()}),this.actionIfStateIsEnabled(()=>this.hooks.emit("hide",{userAction:e}))),this.state.visible=t}everyControllerDo(t){Object.values(this.controllers).forEach(e=>{e&&t(e)})}handleDispose(){var t,e;Object.values(this.controllers).forEach(n=>{n==null||n.dispose(),n==null||n.restoreOpacity()});for(const n in this.controllers){if(!n)continue;const o=n;(e=(t=this.eventListener)[o])==null||e.call(t)}}actionIfStateIsEnabled(t,e){if(this.state.enabled)return t();e!=null&&e.warnLog&&Rg()}}class Gg extends ao{constructor(...e){super(...e);p(this,"startInfo");p(this,"lastRotation");p(this,"rotations",[]);p(this,"helperObject3DQuaternion",this.originObject3D.quaternion.clone());const n=this.helperObject3D;this.hoverListener([n.xyCircle,n.xzCircle,n.yzCircle]);const o=this.dragStart.bind(this),s=this.dragging.bind(this),r=this.dragEnd.bind(this);this.domEvents.addEventListener(this.helperObject3D,"mousedown",o),document.addEventListener("mousemove",s),document.addEventListener("mouseup",r)}initialHelperQuaternion(){this.helperObject3D.updateAngleHelperQuaternion(),this.helperObject3D.applyHelperQuaternion(this.originObject3D.quaternion)}dragStart(e){if(this.isDragging)return;const n=e==null?void 0:e.intersect;if(!n)return this.dragEnd();const o=(n==null?void 0:n.object).direction;if(!o)return this.dragEnd();this.helperObject3D.updateAngleHelperQuaternion();const s=n.point,r=this.originObject3D.position.clone(),a=this.getAngleHelper(o);this.setTipsAngle(0);const l=s.clone();l.y+=.2,this.setTipsPosition(l);const c=new I.Vector3(1,0,0).applyQuaternion(this.helperObject3DQuaternion),d=new I.Vector3(0,1,0).applyQuaternion(this.helperObject3DQuaternion),f=new I.Vector3(0,0,1).applyQuaternion(this.helperObject3DQuaternion),u=(()=>{switch(o){case"x":return c;case"y":return d;case"z":return f}})(),h=new I.Plane().setFromNormalAndCoplanarPoint(u,s),m=new I.Vector3;h.projectPoint(s.clone(),m);const g=m.clone().sub(r),v=g.clone(),A=g.angleTo(a.baseAxes);this.setAngleHelperStart(o,A),this.setAngleHelperLength(o,0),this.rotations.push({vector:g.clone(),direction:!0}),this.startInfo={direction:o,startVector:g,staticStartVector:v,plane:h,angleHelper:a},this.helperObject3D.showDraggingHelper([o]),this.hooks.emit("rotateStart"),this.isDragging=!0,console.log(`%c RotateController dragStart ${o}`,"color: #e5af2e")}dragging(e){var o;if(!this.isDragging)return;const n=to(this.camera,e,this.container);return n?(console.log(`%c RotateController dragging ${(o=this.startInfo)==null?void 0:o.direction}`,"color: #49de1b"),this.rotate(n),!1):this.dragEnd()}rotate(e){if(!this.startInfo)return this.dragEnd();const{startVector:n,plane:o,angleHelper:s,staticStartVector:r,direction:a}=this.startInfo,l=this.originObject3D,c=e.ray.intersectPlane(o,new I.Vector3);if(!c)return;const d=l.position.clone(),f=new I.Vector3;o.projectPoint(c.clone(),f);const u=f.clone().sub(d);if(n.angleTo(u)===0||(this.lastRotation===void 0&&(this.lastRotation={angle:0}),this.rotations.length===0))return;const h=(()=>{if(this.rotations.length===1)return u.angleTo(s.baseAxes)>r.angleTo(s.baseAxes);{const g=this.rotations[this.rotations.length-1],v=this.rotations[this.rotations.length-2],A=u.angleTo(v.vector),C=u.angleTo(g.vector),w=g.vector.angleTo(v.vector);if(w===0||C===0||A===0)return;if(A>C&&A>w)return g.direction;if(A<w&&C<w||A<C&&C>w)return!g.direction}})();if(h===void 0)return console.warn("rotationDirection is undefined");this.rotations.push({vector:u,direction:h}),this.rotations=this.rotations.slice(-2),this.lastRotation.angle=this.lastRotation.angle+u.angleTo(n)*(h?1:-1),this.setAngleHelperLength(a,this.lastRotation.angle),this.setTipsAngle(this.lastRotation.angle/Math.PI*180);const m=new I.Quaternion().setFromUnitVectors(n.clone().normalize(),u.clone().normalize());l.applyQuaternion(m),this.helperObject3D.applyHelperQuaternion(m),this.helperObject3DQuaternion.premultiply(m),this.hooks.emit("rotateUpdate",{quaternion:m,origin:d}),this.startInfo.startVector=u}dragEnd(){!this.isDragging||(console.log("%c RotateController dragEnd","color: #e94e4e"),this.startInfo=void 0,this.isDragging=!1,this.lastRotation=void 0,this.rotations=[],this.helperObject3D.show(),this.hooks.emit("rotateEnd"))}getAngleHelper(e){switch(e){case"x":return this.helperObject3D.xAngleHelper;case"y":return this.helperObject3D.yAngleHelper;case"z":return this.helperObject3D.zAngleHelper}}setAngleHelperStart(e,n){const o=this.getAngleHelper(e);if(o instanceof I.Mesh&&o.geometry instanceof I.CircleGeometry){const{radius:s,segments:r,thetaLength:a}=o.geometry.parameters;o.geometry=new I.CircleGeometry(s,r,n,a)}else console.warn("only support THREE.CircleGeometry")}setAngleHelperLength(e,n){const s=n>=0?Math.max(n,.001):Math.min(n,-.001),r=this.getAngleHelper(e);if(r instanceof I.Mesh&&r.geometry instanceof I.CircleGeometry){const{radius:a,thetaStart:l}=r.geometry.parameters,c=Math.ceil(Math.abs(s)*(40/(2*Math.PI)));r.geometry=new I.CircleGeometry(a,c,l,s)}else console.warn("only support THREE.CircleGeometry")}setTipsAngle(e){var o;const n=(o=this.helperObject3D.angleTips)==null?void 0:o.element;!n||(n.innerText=`${e.toFixed(0)}\xB0`)}setTipsPosition(e){const n=this.helperObject3D.angleTips;if(!n)return;const o=e.project(this.camera),{x:s,y:r,z:a}=o;if(a>1)return;const l=(s+1)/2*100+"%",c=(-r+1)/2*100+"%";n.setLeftTop(l,c)}}class Ng extends ao{constructor(...e){super(...e);p(this,"startInfo")}enable(){this.helperObject3D.enable(),super.enable()}disable(){this.helperObject3D.disable(),super.disable()}show(){this.helperObject3D.show(),super.show()}hide(){this.helperObject3D.hide(),super.hide()}getDragPlane(){const e=new I.Plane,n=this.helperObject3D.cornerPositions;if(n.length!==0)return n.length<3?e.setFromNormalAndCoplanarPoint(this.originObject3D.getWorldDirection(new H.Vector3),n[0]):e.setFromCoplanarPoints(n[0],n[1],n[2]),e}dragStart(e,n){var s,r;(r=(s=this.helperObject3D).updatePoints)==null||r.call(s);const o=this.getDragPlane();if(!o)return this.dragEnd();this.startInfo={startPoint:{position:n.position.clone(),direction:n.direction},plane:o},this.hooks.emit("scaleStart"),this.render(),this.isDragging=!0,console.log("%c RectangleScaleController dragStart","color: #e5af2e")}dragging(e){if(!this.isDragging)return;const n=to(this.camera,e,this.container);if(!n)return this.dragEnd();this.scale(n),console.log("%c RectangleScaleController dragging","color: #49de1b")}scale(e){var O,T;if(!this.startInfo)return;const n=this.originObject3D,{startPoint:o,plane:s}=this.startInfo,r=this.helperObject3D.cornerPositions;if(r.length<4)return this.dragEnd();const a=e.ray.intersectPlane(s,new H.Vector3);if(!a||Lg(a,this.camera.position))return;const l=new H.Vector3().addVectors(r[0],r[2]).divideScalar(2),{position:c,direction:d}=o,f=new H.Vector3().subVectors(r[1],r[0]),u=new H.Vector3().subVectors(r[3],r[0]),h=G=>{const U=new H.Vector3(0,0,0);if(!this.startInfo)return U;const P=(G==="ew"?f:u).clone(),S=c.clone().projectOnVector(P),j=a.clone().projectOnVector(P),W=l.clone().projectOnVector(P);if(j.equals(S))return U;if(G==="ns"&&typeof this.startInfo.dragPointInCenterBottom!="boolean"){const X=new H.Vector3().subVectors(j,W),V=X.x<0&&P.x>=0,ce=X.y<0&&P.y>=0,de=X.z<0&&P.z>=0;this.startInfo.dragPointInCenterBottom=V||ce||de}if(G==="ew"&&typeof this.startInfo.dragPointInCenterLeft!="boolean"){const X=new H.Vector3().subVectors(j,W),V=X.x<0&&P.x>=0,ce=X.y<0&&P.y>=0,de=X.z<0&&P.z>=0;this.startInfo.dragPointInCenterLeft=V||ce||de}const Y=new H.Vector3().subVectors(j,S),te=Y.length();return te>.3?(console.warn("offset.length() > 0.3, skipped",te),U):Y},m=h("ew"),g=h("ns"),v=()=>{const G=m;this.helperObject3D.cornerPositions.forEach((U,P)=>{var S;(S=this.startInfo)!=null&&S.dragPointInCenterLeft?(P===0||P===3)&&U.add(G):(P===1||P===2)&&U.add(G)})},A=()=>{const G=g;this.helperObject3D.cornerPositions.forEach((U,P)=>{var S;(S=this.startInfo)!=null&&S.dragPointInCenterBottom?(P===0||P===1)&&U.add(G):(P===2||P===3)&&U.add(G)})};switch(d){case"ew":v();break;case"ns":A();break;case"nesw":case"nwse":v(),A()}const C=new H.Vector3().subVectors(r[1],r[0]).length()/f.length(),w=new H.Vector3().subVectors(r[3],r[0]).length()/u.length(),E=new H.Vector3(C,w,1),D=new I.Matrix4().scale(E);n.isCSS3DObjectPlus?n.applyScaleMatrix4(D):n.scale.applyMatrix4(D),o.position.copy(a);const y=new H.Vector3().addVectors(r[0],r[2]).divideScalar(2),L=new H.Vector3().subVectors(y,l),x=new I.Matrix4().setPosition(L);n.applyMatrix4(x),(O=this.helperObject3D.css3DInstance)==null||O.css3DObject.applyMatrix4(x),(T=this.helperObject3D.plane)==null||T.applyMatrix4(x),this.hooks.emit("scaleUpdate",{matrix4:D,helperOrigin:l}),this.hooks.emit("positionUpdate",{matrix4:x}),this.render()}dragEnd(){!this.isDragging||(this.startInfo=void 0,this.isDragging=!1,this.hooks.emit("scaleEnd"),this.render(),console.log("%c RectangleScaleController dragEnd","color: #e94e4e"))}}class Wg extends Ng{constructor(...t){super(...t),this.addHTMLEventListener()}addHTMLEventListener(){this.helperObject3D.points.forEach(t=>{if(!t)return;const e=t.point,n=r=>this.dragStart(r,t),o=this.dragging.bind(this),s=this.dragEnd.bind(this);e.addEventListener("dragstart",n),e.addEventListener("drag",o),e.addEventListener("dragend",s)})}}const uo="v1.0.0",fo="Object3DHelperPlugin",ui=`${fo}@${uo}`,Xg=()=>{console.error(`${ui} is disposed`)},Yg=()=>{console.warn(`${ui} is disabled`)},Ug=()=>{console.error(`${ui} is disabled`)};class Ua extends Xn{constructor(e){super(e);p(this,"version",uo);p(this,"name",fo);p(this,"state",{visible:!0,enabled:!0,disposed:!1});p(this,"objectHelperMap",new Map);this.five=e,console.warn("Object3DHelper: \u4F7F\u7528\u6B64\u63D2\u4EF6\u9700\u8981\u5728\u521D\u59CB\u5316five\u65F6\uFF0C\u8BBE\u7F6Efive\u53C2\u6570: { backgroundAlpha: 0, backgroundColor: 0x000000 }"),Object.assign(window,{[`__${fo.toUpperCase()}_DEBUG__`]:this})}show(e){return Z(this,null,function*(){this.setState({visible:!0},e)})}hide(e){return Z(this,null,function*(){this.setState({visible:!1},e)})}enable(e){this.setState({enabled:!0},e)}disable(e){this.setState({enabled:!1},e)}dispose(){this.setState({disposed:!0})}setState(e,n){if(this.state.disposed)return Xg();if(!this.state.enabled&&e.enabled!==!0&&e.disposed!==!0)return Ug();const o=N({},this.state);this.state=N(N({},this.state),e),e.disposed!==void 0&&e.disposed!==o.disposed&&e.disposed&&this.handleDispose(),e.visible!==void 0&&e.visible!==o.visible&&this.handleVisible(e.visible),e.enabled!==void 0&&e.enabled!==o.enabled&&this.handleEnable(e.enabled),this.hooks.emit("stateChange",{state:this.state,prevState:o})}getObject3DHelper(e){return this.objectHelperMap.get(e)}addObject3DHelper(e,n={}){var d;if(!e)return console.error("Object3D is undefined");if(this.objectHelperMap.has(e)){console.warn(`Object3DHelperPlugin: object3D ${e.name} is already has helper`);return}const o=new Hg;this.objectHelperMap.set(e,o);const s=(d=this.five.getElement())==null?void 0:d.parentElement,r=this.five.camera,{moveHelper:a=!0,rotateHelper:l=!0,scaleHelper:c=!0}=n;if(a){const f=new Sg(e),u=new lo(this.five,Qg,e,f);o.addControllers({moveController:u.helperController})}if(l){let f;s&&r&&(f={container:s});const u=new jg(e,f),h=new lo(this.five,Gg,e,u);o.addControllers({rotateController:h.helperController})}if(c&&s){const f=new Tg(e,s,r,this.five.scene),u=new lo(this.five,Wg,e,f);o.addControllers({scaleController:u.helperController})}e.isCSS3DObjectPlus&&e.changeMode("behind",this.five.scene)}removeObject3DHelper(e){const n=this.objectHelperMap.get(e);!n||(e.isCSS3DObjectPlus&&e.changeMode("front"),this.objectHelperMap.delete(e),n.dispose())}handleEnable(e,n=!0){e?(this.everyHelperDo(o=>o.enable()),this.hooks.emit("enable",{userAction:n})):(this.everyHelperDo(o=>o.disable()),this.hooks.emit("disable",{userAction:n})),this.state.enabled=e}handleVisible(e,n=!0){e?(this.everyHelperDo(o=>o.show()),this.actionIfStateIsEnabled(()=>this.hooks.emit("show",{userAction:n}))):(this.everyHelperDo(o=>o.hide()),this.actionIfStateIsEnabled(()=>this.hooks.emit("hide",{userAction:n}))),this.state.visible=e}handleDispose(){this.everyHelperDo(e=>e.dispose())}everyHelperDo(e){this.objectHelperMap.forEach(n=>{n&&e(n)})}actionIfStateIsEnabled(e,n){if(this.state.enabled)return e();n!=null&&n.warnLog&&Yg()}}const Vg=i=>new Ua(i);class ho{constructor(t=0,e=0){p(this,"min");p(this,"max");p(this,"isInterval",!0);this.min=t,this.max=e}fromArray(t){return this.min=t[0],this.max=t[1],this}isOverlap(t){return Math.min(this.max,t.max)<Math.max(this.min,t.min)}contains(t){return this.min<t.min&&this.max>t.max}}class Jg{constructor(t,e){p(this,"min");p(this,"max");p(this,"xInterval");p(this,"yInterval");p(this,"isRectangle",!0);this.min=t,this.max=e,this.xInterval=new ho(this.min.x,this.max.x),this.yInterval=new ho(this.min.y,this.max.y)}isOverlapWithRectangle(t){return!this.xInterval.isOverlap(t.xInterval)&&!this.yInterval.isOverlap(t.yInterval)}containsRect(t){return this.xInterval.contains(t.xInterval)&&this.yInterval.contains(t.yInterval)}}function fi(i,t,e){const n=i[t],o=i[e];!n||!o||(i[t]=o,i[e]=n)}function Zg(i,t,e){const n=e/2;for(let o=1;o<=n;o++){const s=e-(o-1);for(let r=1;r<=t;r++){const a=(o-1)*t+r-1,l=(s-1)*t+r-1;fi(i,a*4+0,l*4+0),fi(i,a*4+1,l*4+1),fi(i,a*4+2,l*4+2),fi(i,a*4+3,l*4+3)}}}class Va{constructor(t,e){p(this,"width");p(this,"height");p(this,"containerDom");p(this,"hooks",new me.Subscribe);p(this,"canvas",document.createElement("canvas"));p(this,"five");p(this,"scale");p(this,"config");p(this,"offset",{x:0,y:0});p(this,"context");p(this,"renderCenter",new I.Vector3);p(this,"hammer");p(this,"state",{enabled:!1});p(this,"onPan",t=>{if(!this.containerDom||this.hooks.emit("wantsPanGesture",t))return;const n=this.offset.x+t.deltaX,o=this.offset.y+t.deltaY;this.canvas.style.boxShadow="0 2px 30px 0 rgba(0,0,0,0.20)",this.canvas.style.transform=`translate3d(${n}px, ${o}px, 100px)`});p(this,"onPanEnd",t=>{this.offset={x:this.offset.x+t.deltaX,y:this.offset.y+t.deltaY},this.canvas.style.boxShadow="none"});var o,s,r;if(!t.renderer)throw new Error("Five Render \u672A\u521D\u59CB\u5316");this.five=t,this.scale=(o=e==null?void 0:e.scale)!=null?o:2,this.width=(s=e==null?void 0:e.width)!=null?s:190,this.height=(r=e==null?void 0:e.height)!=null?r:190,this.config={dragEnabled:(e==null?void 0:e.dragEnabled)||!1,autoFixPCPosition:(e==null?void 0:e.autoFixPCPosition)||!1,initialPosition:(e==null?void 0:e.initialPosition)||{left:"0",top:"0"}};const n=this.canvas.getContext("2d");if(!n)throw new Error("CANNOT CREATE CONTEXT2D");this.context=n,this.config.dragEnabled&&(this.hammer=new sn.default(this.canvas),this.hammer.on("pan",this.onPan),this.hammer.on("panend",this.onPanEnd)),this.initStyle()}dispose(){var t;this.clear(),this.disable(),(t=this.hammer)==null||t.destroy()}enable(){var t;if(!this.state.enabled)return this.state.enabled=!0,(t=this.containerDom)==null||t.append(this.canvas),this}disable(){if(!!this.state.enabled)return this.state.enabled=!1,this.canvas.remove(),this}appendTo(t){var e;return this.containerDom&&((e=this.containerDom)==null||e.removeChild(this.canvas)),this.containerDom=t,this.state.enabled&&t.append(this.canvas),this}clear(){return this.context.clearRect(0,0,this.canvas.width,this.canvas.height),this}renderWithPoint(t){!this.containerDom||!this.state.enabled||(this.renderCenter=t,this.render(),this.config.autoFixPCPosition&&this.autoFixPCPosition())}autoFixPCPosition(){if(!this.containerDom)return;const{width:t,height:e}=this,n=this.renderCenter.clone().project(this.five.camera),o=(n.x+1)/2*this.containerDom.clientWidth,s=-(n.x-1)/2*this.containerDom.clientWidth,r=-(n.y-1)/2*this.containerDom.clientHeight;o<183?(this.canvas.style.top=-e/2+"px",this.canvas.style.left=90+"px"):r<183?(this.canvas.style.top=90+"px",this.canvas.style.left=-t/2+"px"):s<183?(this.canvas.style.top=-e/2+"px",this.canvas.style.left=-t-90+"px"):(this.canvas.style.left=-t/2+"px",this.canvas.style.top=-e-90+"px"),this.canvas.style.transform=`translate3d(${o}px, ${r}px, 10px)`,this.offset={x:o,y:r}}render(){if(!this.five.renderer||!this.containerDom)return;const{scale:t,context:e,width:n,height:o}=this,s=this.renderCenter.clone().project(this.five.camera),r=this.five.renderer.getSize(new I.Vector2),a=1,l=n/t,c=o/t,d=a*t,f=(s.x+1)/2*r.x,u=(s.y+1)/2*r.y,h=this.five.getPixels(f-l/2,u-l/2,l,c,d),m=Math.floor(n*a),g=Math.floor(o*a);Zg(h,m,g);const v=new ImageData(m,g);v.data.set(h),e.putImageData(v,0,0)}initStyle(){const t=this.canvas;t.classList.add("five-plugin__magnifier"),t.style.position="absolute",t.style.pointerEvents="all",t.style.borderRadius="50%",t.style.zIndex="99";const e=1;t.setAttribute("width",(this.width*e).toString()),t.setAttribute("height",(this.height*e).toString()),t.style.border="2px solid rgba(255,255,255,0.20)",t.style.width=this.width+"px",t.style.height=this.height+"px",t.style.top=this.config.initialPosition.top,t.style.left=this.config.initialPosition.left,t.style.transform="translate(0,0,100px)",this.config.dragEnabled&&(this.canvas.style.cursor="pointer")}}function _g(i,t){const{offsetWidth:e,offsetHeight:n}=t,{top:o,left:s}=t.getBoundingClientRect();return new I.Vector2().set((i.x-s)/e*2-1,-(i.y-o)/n*2+1)}function Ja(i,t){const{offsetWidth:e,offsetHeight:n}=t;return new I.Vector2().set(i.x/e*2-1,-i.y/n*2+1)}function qg(i,t){const e=i.getElement();if(!e)return;const n=Ja(t,e),o=new I.Raycaster;return o.setFromCamera(n,i.camera),o}function Kg(i,t){const{x:e,y:n}=t,o=e*2-1,s=n*2-1,r=new I.Vector2().fromArray([o,s]),a=new I.Raycaster;return a.setFromCamera(r,i.camera),i.model.intersectRaycaster(a)[0]}const $g="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAbYAAAGwCAYAAADFUEBtAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAABtqADAAQAAAABAAABsAAAAABTZ8U6AAAtiklEQVR4Ae2dAXJbSbJdp+d7AfYSHOGVeAPek5fkNXgLjviLmRkZl+CRbtc8UBKRRalZpyIesiorMx/eIcjb+QCh//Y3hwQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkMEbgj7FKFpLA4QS+fPnyx23czJc//V498h2Oy8uXwDYCf/oF3HYWC0vgAAI3QfuP22V+uR35vYplrOs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UhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQn8NQn8fyHnyuSABiy2AAAAAElFTkSuQmCC",e0=`
|
|
546
|
+
format('woff2')}.content__container.svelte-95x526{position:relative;left:50%;top:50%;transform:translate(-50%, -50%);font-family:PingFangSC, Segoe UI, Rototo, sans-serif}.content__container.unClickable.svelte-95x526{pointer-events:none !important}.content__container.unClickable.svelte-95x526 *{pointer-events:none !important}*{-webkit-tap-highlight-color:transparent}.content__wrapper.svelte-95x526{pointer-events:none;width:100%;height:100%}.withAnimation.svelte-95x526{transition:opacity 0.3s linear}.content__container.hide.svelte-95x526{opacity:0;pointer-events:none}.content__container.hide.svelte-95x526 *{pointer-events:none !important}.content__container.disable.svelte-95x526{display:none}.content__container.hide.svelte-95x526 *{pointer-events:none}.content.svelte-95x526{position:relative;width:100%;height:100%;font-size:0.75rem;line-height:1.125rem;color:#fff}.content.svelte-95x526:not(.unfolded){pointer-events:none}.content.svelte-95x526:not(.unfolded) *{pointer-events:none !important}.content.unfolded.svelte-95x526{pointer-events:auto}`)}function Hp(i){let t,e;return t=new Dp({props:{tag:Se(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Se(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function Gp(i){let t,e;return t=new Bp({props:{tag:Se(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Se(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function Np(i){let t,e;return t=new gp({props:{tag:Se(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Se(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function Wp(i){let t,e;return t=new Ip({props:{tag:Se(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Se(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function Xp(i){let t,e;return t=new fp({props:{tag:Se(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Se(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function Yp(i){let t,e;return t=new km({props:{tag:Se(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Se(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function Up(i){let t,e;return t=new Rp({props:{tag:Se(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Se(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function Vp(i){let t,e,n,o,s,r,a,l,c;const d=[Up,Yp,Xp,Wp,Np,Gp,Hp],f=[];function u(h,m){return h[1].element?0:h[1].contentType===Xe.Text?1:h[1].contentType===Xe.ImageText?2:h[1].contentType===Xe.Audio?3:h[1].contentType===Xe.Marketing?4:h[1].contentType===Xe.Link?5:h[1].contentType===Xe.MediaPlane?6:-1}return~(o=u(i))&&(s=f[o]=d[o](i)),{c(){var h,m,g;t=Q("div"),e=Q("div"),n=Q("div"),s&&s.c(),b(n,"class","content svelte-95x526"),q(n,"unfolded",(h=i[1].state)==null?void 0:h.unfolded),b(e,"class","content__wrapper svelte-95x526"),b(t,"class","content__container svelte-95x526"),b(t,"data-id",r=i[1].id),q(t,"disable",i[1].enabled===!1||((m=i[1].temporaryState)==null?void 0:m.visible)===!1),q(t,"hide",!i[3].visible||!i[3].enabled||!i[4].visible||!((g=i[1].state)!=null&&g.visible)),q(t,"withAnimation",i[0]),q(t,"unClickable",i[1].clickable===!1),F(t,"width",i[1].pointType==="PointTag"?0:"100%"),F(t,"height",i[1].pointType==="PointTag"?0:"100%")},m(h,m){B(h,t,m),O(t,e),O(e,n),~o&&f[o].m(n,null),a=!0,l||(c=xe(t,"click",yi(i[11])),l=!0)},p(h,[m]){var v,A,C;let g=o;o=u(h),o===g?~o&&f[o].p(h,m):(s&&(fe(),M(f[g],1,1,()=>{f[g]=null}),he()),~o?(s=f[o],s?s.p(h,m):(s=f[o]=d[o](h),s.c()),k(s,1),s.m(n,null)):s=null),(!a||m&2)&&q(n,"unfolded",(v=h[1].state)==null?void 0:v.unfolded),(!a||m&2&&r!==(r=h[1].id))&&b(t,"data-id",r),(!a||m&2)&&q(t,"disable",h[1].enabled===!1||((A=h[1].temporaryState)==null?void 0:A.visible)===!1),(!a||m&26)&&q(t,"hide",!h[3].visible||!h[3].enabled||!h[4].visible||!((C=h[1].state)!=null&&C.visible)),(!a||m&1)&&q(t,"withAnimation",h[0]),(!a||m&2)&&q(t,"unClickable",h[1].clickable===!1),m&2&&F(t,"width",h[1].pointType==="PointTag"?0:"100%"),m&2&&F(t,"height",h[1].pointType==="PointTag"?0:"100%")},i(h){a||(k(s),a=!0)},o(h){M(s),a=!1},d(h){h&&z(t),~o&&f[o].d(),l=!1,c()}}}function Jp(i,t,e){let n,o,s,r,{withAnimation:a=!1}=t,{tag:l}=t,{hooks:c}=t,{state:d}=t,{mediaStore:f}=t,{temporaryState:u}=t;Ii("hooks",c),Ii("mediaStore",f);let h,m;function g(A){A?c.emit("exposure",{id:r,type:"start"}):c.emit("exposure",{id:r,type:"end"})}const v=A=>c.emit("click",{event:A,target:"TagContent",tag:l});return i.$$set=A=>{"withAnimation"in A&&e(0,a=A.withAnimation),"tag"in A&&e(1,l=A.tag),"hooks"in A&&e(2,c=A.hooks),"state"in A&&e(3,d=A.state),"mediaStore"in A&&e(5,f=A.mediaStore),"temporaryState"in A&&e(4,u=A.temporaryState)},i.$$.update=()=>{var A,C;i.$$.dirty&2&&e(9,n=(A=l.state)==null?void 0:A.unfolded),i.$$.dirty&2&&e(8,o=(C=l.state)==null?void 0:C.visible),i.$$.dirty&280&&e(10,s=d.visible&&u.visible&&o),i.$$.dirty&2&&(r=l.id),i.$$.dirty&1024&&g(s),i.$$.dirty&962&&l.hooks&&(n!==void 0&&n!==m&&(e(7,m=n),n?l.hooks.emit("unfolded"):l.hooks.emit("folded")),o!==void 0&&o!==h&&(e(6,h=o),o?l.hooks.emit("show"):l.hooks.emit("hide")))},[a,l,c,d,u,f,h,m,o,n,s,v]}class Ta extends se{constructor(t){super(),oe(this,t,Jp,Vp,ie,{withAnimation:0,tag:1,hooks:2,state:3,mediaStore:5,temporaryState:4},Fp)}}function Zp(i){le(i,"svelte-fuismw",".point.svelte-fuismw.svelte-fuismw{pointer-events:none;width:1.5rem;height:1.5rem}.small-point.svelte-fuismw.svelte-fuismw,.big-point.svelte-fuismw.svelte-fuismw{position:absolute;width:100%;height:100%;display:flex;align-items:center;justify-content:center;border-radius:50%;transition:all 500ms}.big-point.svelte-fuismw.svelte-fuismw{background-color:rgba(0, 0, 0, 0.1)}.folded.point.svelte-fuismw.svelte-fuismw{animation:svelte-fuismw-breathing 2s linear infinite}.big-point.svelte-fuismw.svelte-fuismw::before,.big-point.svelte-fuismw.svelte-fuismw::after{content:'';display:block;position:absolute;background-size:contain;background-repeat:no-repeat;pointer-events:none}.big-point.svelte-fuismw.svelte-fuismw::before{width:100%;height:100%;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAMAAABiM0N1AAAAqFBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8j1z1tAAAAOHRSTlMABgoNFBsYIhEmHyksMoJ6RZ5aXzpnU03AtqaZjLuGN+zcifnW0cjEqnA+lOZzbWLhkH6i8rGuagnOwPMAAAQOSURBVFjDrZiHctpAEIYXYzvGOvXeUe+IYuD93ywrJAIhFJX8M8zoBHzz757utHvwTETJHJPfGQZfWJXILWCMPuqNbuu6vj+khrHjed40TWvFfQ2jvCl8nGha6lQCl7s07UqcUlfOZrOxVtKsN2a+0uJYK+ScEIqiFifhBSGSsnJ8f8u99cLMVnEUHTKXIOMX6vuk5gpphFYyhmHzHpzcDqNUJGgEER+oz5OaK8ShNcIdt+zx1ys7lhdqiDlRkPF+JaSdWIhasaz6lLPQ1qFDIwYpDeTr62veCS8bGLIQRSsVK78/5nDeOlYIYhovHeOtU0dDXw2KSGiKesQRyjJ10Q66QcyZMTvpTEMUumpMieyWvs9ZLZcmodAOYlorsysBflpjiEJTFBEY5+7sicul34T1iak5U25momN9Ya4wPCT57r8cteW0dk4YuKMTqjXVkgjciFr+8B3ngnmM6kii5X/efB0F+jUHnuiatLJY+Et84EnUNacfiaKZjQhX4oJAwPlqOB3mJaoh4dxxG5Nc3Q8DkywunP6kBalN53J7G3g0JqiNC3qpjQ7TRPvmn2U3L3/kU4JaTn/SKU0qb76dDf0kGNjHJbD+wX1gcMxO6fZVrzXUcQaROkvt3+pljIYugQ0LDi1ZBgeN9JK9MjTCkmgwgPou19I5QzBI5yy5RvqOw6xMMbKzoeGWmnQfBBwa6woj6wyNsYSx7R0chWuOwsjOqR6aboyNyvcpgOsl3ZzNhoNm3bztdAK1x5NuzmCwunkjjq4AEzKXFI1NUmVnwIfydJBoW7CPVAR1uR6XbVwlmgF2xF1yPTbbubYHLZamgyTNhiSmp4PoJIEk+R+gOAFb+x+hxRoctHw6iItsMLT/Mf3RHixbnP5AyhEPmZ1NB+E6A0V3pi9aPqyB6Pz0bSTxXID0kE/d2DgvxBFzEKdutdXawJGSMlM3/3Sd4fA93bnTXkfSuvwGFGOI016QbKm3VdbOn/bKjpd1e6Pg1SlFhPzjdXWNwjNTyprkhz33i4Wpji600FA5h05q4Ywv/bxge7mNRe7YYtQMwqt/kMLixpXHQhBwcCXBYukxBbvkBTv4S5V/HNNC6EF089tPxxGHNzV8sKTgRhSzVYa2Wf5yeadHphlWGdb4IUeEO5K2SHrUiqJuW9GiLFdwVzRbCXTf5tg11mvhYdufZbLUr11XEi/k4KHexUxWSY8DBCby7AU8E3eUhfzVkYZgR6H/agF8C3KNqCeHLIIRR7oEr0XXsixy9P1jH/doJLF2nPXbIlw5y1aC6t4eROW1pduaLs/7b6NEqFiWrWpBzaXuaOy4Nfe6bRfqGwzSXBJZhnF8y9oUhcnzOyM9pI7wCWP0LSkyy1iFWWwsFp8LeKLfd4doRyTLRacAAAAASUVORK5CYII=)}.folded.svelte-fuismw .big-point.svelte-fuismw::before{animation:svelte-fuismw-rotate 2s linear infinite}.big-point.svelte-fuismw.svelte-fuismw::after{position:absolute;width:1rem;height:1rem;background-image:var(--iconUrl)}.small-point.svelte-fuismw.svelte-fuismw::before{content:'';display:block;position:absolute;pointer-events:none;width:0.25rem;height:0.25rem;border-radius:100%;background-color:white}.folded.svelte-fuismw .big-point.svelte-fuismw{opacity:1;scale:1}.unfolded.svelte-fuismw .big-point.svelte-fuismw{opacity:0;scale:0}.folded.svelte-fuismw .small-point.svelte-fuismw{opacity:0;scale:6}.unfolded.svelte-fuismw .small-point.svelte-fuismw{opacity:1;scale:1}@keyframes svelte-fuismw-rotate{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}@keyframes svelte-fuismw-breathing{0%{transform:scale(1)}25%{transform:scale(0.9)}50%{transform:scale(1)}}")}function _p(i){let t,e,n,o,s,r,a;return e=new Ze({props:{center:!0,blurRadius:12,spreadRadius:5}}),{c(){t=Q("div"),ee(e.$$.fragment),n=_(),o=Q("div"),s=_(),r=Q("div"),b(o,"class","small-point svelte-fuismw"),F(o,"transition-delay",i[3]?i[2]+"ms":"0ms"),b(r,"class","big-point svelte-fuismw"),F(r,"--iconUrl","url("+i[1]+")"),F(r,"transition-delay",i[3]?i[2]+"ms":"0ms"),b(t,"class","point svelte-fuismw"),q(t,"folded",i[3]),q(t,"unfolded",i[0])},m(l,c){B(l,t,c),K(e,t,null),O(t,n),O(t,o),O(t,s),O(t,r),a=!0},p(l,[c]){c&12&&F(o,"transition-delay",l[3]?l[2]+"ms":"0ms"),(!a||c&2)&&F(r,"--iconUrl","url("+l[1]+")"),c&12&&F(r,"transition-delay",l[3]?l[2]+"ms":"0ms"),(!a||c&8)&&q(t,"folded",l[3]),(!a||c&1)&&q(t,"unfolded",l[0])},i(l){a||(k(e.$$.fragment,l),a=!0)},o(l){M(e.$$.fragment,l),a=!1},d(l){l&&z(t),$(e)}}}function qp(i,t,e){let n,{unfolded:o}=t,{iconUrl:s}=t,{foldDelay:r=800}=t;return i.$$set=a=>{"unfolded"in a&&e(0,o=a.unfolded),"iconUrl"in a&&e(1,s=a.iconUrl),"foldDelay"in a&&e(2,r=a.foldDelay)},i.$$.update=()=>{i.$$.dirty&1&&e(3,n=!o)},[o,s,r,n]}class Kp extends se{constructor(t){super(),oe(this,t,qp,_p,ie,{unfolded:0,iconUrl:1,foldDelay:2},Zp)}}function $p(i){le(i,"svelte-jzvcn0",".point.svelte-jzvcn0.svelte-jzvcn0{pointer-events:none;width:1rem;height:1rem}.small-point.svelte-jzvcn0.svelte-jzvcn0,.big-point.svelte-jzvcn0.svelte-jzvcn0{position:absolute;width:100%;height:100%;display:flex;align-items:center;justify-content:center;border-radius:50%;transition:all 500ms}.big-point.svelte-jzvcn0.svelte-jzvcn0::before,.big-point.svelte-jzvcn0.svelte-jzvcn0::after{content:'';display:block;position:absolute;background-size:contain;background-repeat:no-repeat;pointer-events:none}.big-point.svelte-jzvcn0.svelte-jzvcn0::before{width:100%;height:100%;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAMAAABiM0N1AAAAqFBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8j1z1tAAAAOHRSTlMABgoNFBsYIhEmHyksMoJ6RZ5aXzpnU03AtqaZjLuGN+zcifnW0cjEqnA+lOZzbWLhkH6i8rGuagnOwPMAAAQOSURBVFjDrZiHctpAEIYXYzvGOvXeUe+IYuD93ywrJAIhFJX8M8zoBHzz757utHvwTETJHJPfGQZfWJXILWCMPuqNbuu6vj+khrHjed40TWvFfQ2jvCl8nGha6lQCl7s07UqcUlfOZrOxVtKsN2a+0uJYK+ScEIqiFifhBSGSsnJ8f8u99cLMVnEUHTKXIOMX6vuk5gpphFYyhmHzHpzcDqNUJGgEER+oz5OaK8ShNcIdt+zx1ys7lhdqiDlRkPF+JaSdWIhasaz6lLPQ1qFDIwYpDeTr62veCS8bGLIQRSsVK78/5nDeOlYIYhovHeOtU0dDXw2KSGiKesQRyjJ10Q66QcyZMTvpTEMUumpMieyWvs9ZLZcmodAOYlorsysBflpjiEJTFBEY5+7sicul34T1iak5U25momN9Ya4wPCT57r8cteW0dk4YuKMTqjXVkgjciFr+8B3ngnmM6kii5X/efB0F+jUHnuiatLJY+Et84EnUNacfiaKZjQhX4oJAwPlqOB3mJaoh4dxxG5Nc3Q8DkywunP6kBalN53J7G3g0JqiNC3qpjQ7TRPvmn2U3L3/kU4JaTn/SKU0qb76dDf0kGNjHJbD+wX1gcMxO6fZVrzXUcQaROkvt3+pljIYugQ0LDi1ZBgeN9JK9MjTCkmgwgPou19I5QzBI5yy5RvqOw6xMMbKzoeGWmnQfBBwa6woj6wyNsYSx7R0chWuOwsjOqR6aboyNyvcpgOsl3ZzNhoNm3bztdAK1x5NuzmCwunkjjq4AEzKXFI1NUmVnwIfydJBoW7CPVAR1uR6XbVwlmgF2xF1yPTbbubYHLZamgyTNhiSmp4PoJIEk+R+gOAFb+x+hxRoctHw6iItsMLT/Mf3RHixbnP5AyhEPmZ1NB+E6A0V3pi9aPqyB6Pz0bSTxXID0kE/d2DgvxBFzEKdutdXawJGSMlM3/3Sd4fA93bnTXkfSuvwGFGOI016QbKm3VdbOn/bKjpd1e6Pg1SlFhPzjdXWNwjNTyprkhz33i4Wpji600FA5h05q4Ywv/bxge7mNRe7YYtQMwqt/kMLixpXHQhBwcCXBYukxBbvkBTv4S5V/HNNC6EF089tPxxGHNzV8sKTgRhSzVYa2Wf5yeadHphlWGdb4IUeEO5K2SHrUiqJuW9GiLFdwVzRbCXTf5tg11mvhYdufZbLUr11XEi/k4KHexUxWSY8DBCby7AU8E3eUhfzVkYZgR6H/agF8C3KNqCeHLIIRR7oEr0XXsixy9P1jH/doJLF2nPXbIlw5y1aC6t4eROW1pduaLs/7b6NEqFiWrWpBzaXuaOy4Nfe6bRfqGwzSXBJZhnF8y9oUhcnzOyM9pI7wCWP0LSkyy1iFWWwsFp8LeKLfd4doRyTLRacAAAAASUVORK5CYII=);background-size:contain;background-repeat:no-repeat}.small-point.svelte-jzvcn0.svelte-jzvcn0::before{content:'';display:block;position:absolute;pointer-events:none;width:0.375rem;height:0.375rem;border-radius:100%;background-color:white}.unfolded.svelte-jzvcn0 .big-point.svelte-jzvcn0{opacity:0;transform:scale(0)}.folded.svelte-jzvcn0 .big-point.svelte-jzvcn0{opacity:1;transform:scale(1)}.unfolded.svelte-jzvcn0 .small-point.svelte-jzvcn0{transform:scale(0.6)}.folded.svelte-jzvcn0 .small-point.svelte-jzvcn0{transform:scale(1)}")}function eg(i){let t,e,n,o,s,r,a;return e=new Ze({props:{center:!0,blurRadius:12,spreadRadius:5}}),{c(){t=Q("div"),ee(e.$$.fragment),n=_(),o=Q("div"),s=_(),r=Q("div"),b(o,"class","small-point svelte-jzvcn0"),F(o,"transition-delay",i[2]?i[1]+"ms":"0ms"),b(r,"class","big-point svelte-jzvcn0"),F(r,"transition-delay",i[2]?i[1]+"ms":"0ms"),b(t,"class","point svelte-jzvcn0"),q(t,"unfolded",i[0]),q(t,"folded",i[2])},m(l,c){B(l,t,c),K(e,t,null),O(t,n),O(t,o),O(t,s),O(t,r),a=!0},p(l,[c]){c&6&&F(o,"transition-delay",l[2]?l[1]+"ms":"0ms"),c&6&&F(r,"transition-delay",l[2]?l[1]+"ms":"0ms"),(!a||c&1)&&q(t,"unfolded",l[0]),(!a||c&4)&&q(t,"folded",l[2])},i(l){a||(k(e.$$.fragment,l),a=!0)},o(l){M(e.$$.fragment,l),a=!1},d(l){l&&z(t),$(e)}}}function tg(i,t,e){let n,{unfolded:o}=t,{foldDelay:s=800}=t;return i.$$set=r=>{"unfolded"in r&&e(0,o=r.unfolded),"foldDelay"in r&&e(1,s=r.foldDelay)},i.$$.update=()=>{i.$$.dirty&1&&e(2,n=!o)},[o,s,n]}class ng extends se{constructor(t){super(),oe(this,t,tg,eg,ie,{unfolded:0,foldDelay:1},$p)}}function ig(i){le(i,"svelte-8en2lj",".point-click-helper.svelte-8en2lj{position:absolute;width:2.5rem;height:2.5rem;left:50%;top:50%;transform:translate(-50%, -50%)}")}function Qa(i){let t,e,n=i[0].contentType!==Xe.Link&&Oa(i);return{c(){n&&n.c(),t=Ae()},m(o,s){n&&n.m(o,s),B(o,t,s),e=!0},p(o,s){o[0].contentType!==Xe.Link?n?(n.p(o,s),s&1&&k(n,1)):(n=Oa(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(fe(),M(n,1,1,()=>{n=null}),he())},i(o){e||(k(n),e=!0)},o(o){M(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function Oa(i){let t,e,n,o,s,r;const a=[sg,og],l=[];function c(d,f){var u,h,m,g;return((h=(u=d[0].style)==null?void 0:u.point)==null?void 0:h.style)==="CustomIcon"&&((g=(m=d[0].style)==null?void 0:m.point)==null?void 0:g.iconUrl)?0:1}return n=c(i),o=l[n]=a[n](i),{c(){t=Q("div"),e=_(),o.c(),s=Ae(),b(t,"class","point-click-helper svelte-8en2lj")},m(d,f){B(d,t,f),B(d,e,f),l[n].m(d,f),B(d,s,f),r=!0},p(d,f){let u=n;n=c(d),n===u?l[n].p(d,f):(fe(),M(l[u],1,1,()=>{l[u]=null}),he(),o=l[n],o?o.p(d,f):(o=l[n]=a[n](d),o.c()),k(o,1),o.m(s.parentNode,s))},i(d){r||(k(o),r=!0)},o(d){M(o),r=!1},d(d){d&&z(t),d&&z(e),l[n].d(d),d&&z(s)}}}function og(i){let t,e;return t=new ng({props:{unfolded:i[0].state.unfolded,foldDelay:i[1]}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.unfolded=n[0].state.unfolded),o&2&&(s.foldDelay=n[1]),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function sg(i){let t,e;return t=new Kp({props:{iconUrl:i[0].style.point.iconUrl,unfolded:i[0].state.unfolded,foldDelay:i[1]}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.iconUrl=n[0].style.point.iconUrl),o&1&&(s.unfolded=n[0].state.unfolded),o&2&&(s.foldDelay=n[1]),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function rg(i){var o,s,r;let t,e,n=((o=i[0].pointTagStyle)==null?void 0:o.leftPercent)&&((s=i[0].pointTagStyle)==null?void 0:s.topPercent)&&i[0].enabled!==!1&&i[0].state&&((r=i[0].temporaryState)==null?void 0:r.visible)!==!1&&Qa(i);return{c(){n&&n.c(),t=Ae()},m(a,l){n&&n.m(a,l),B(a,t,l),e=!0},p(a,[l]){var c,d,f;((c=a[0].pointTagStyle)==null?void 0:c.leftPercent)&&((d=a[0].pointTagStyle)==null?void 0:d.topPercent)&&a[0].enabled!==!1&&a[0].state&&((f=a[0].temporaryState)==null?void 0:f.visible)!==!1?n?(n.p(a,l),l&1&&k(n,1)):(n=Qa(a),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(fe(),M(n,1,1,()=>{n=null}),he())},i(a){e||(k(n),e=!0)},o(a){M(n),e=!1},d(a){n&&n.d(a),a&&z(t)}}}function ag(i,t,e){let n,{tag:o}=t;return i.$$set=s=>{"tag"in s&&e(0,o=s.tag)},i.$$.update=()=>{var s,r;i.$$.dirty&1&&e(1,n=(r=(s=o.style)==null?void 0:s.foldedPointDelay)!=null?r:o.contentType===Xe.Marketing?600:void 0)},[o,n]}class lg extends se{constructor(t){super(),oe(this,t,ag,rg,ie,{tag:0},ig)}}function cg(i){le(i,"svelte-1vzhbu2",".wrapper.svelte-1vzhbu2{position:absolute;width:0rem;height:0rem;overflow:visible;pointer-events:auto}.point.svelte-1vzhbu2{-webkit-tap-highlight-color:transparent;position:absolute;transform:translate(-50%, -50%);left:50%;top:50%}")}function Ra(i){let t,e;return t=new Ta({props:{mediaStore:i[4],withAnimation:i[0],tag:Se(i[1]),hooks:i[2],state:i[3],temporaryState:i[5]}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&16&&(s.mediaStore=n[4]),o&1&&(s.withAnimation=n[0]),o&2&&(s.tag=Se(n[1])),o&4&&(s.hooks=n[2]),o&8&&(s.state=n[3]),o&32&&(s.temporaryState=n[5]),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){M(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function Fa(i){let t,e,n,o,s;return e=new lg({props:{tag:i[1]}}),{c(){t=Q("div"),ee(e.$$.fragment),b(t,"class","point svelte-1vzhbu2")},m(r,a){B(r,t,a),K(e,t,null),n=!0,o||(s=xe(t,"click",yi(i[11])),o=!0)},p(r,a){const l={};a&2&&(l.tag=r[1]),e.$set(l)},i(r){n||(k(e.$$.fragment,r),n=!0)},o(r){M(e.$$.fragment,r),n=!1},d(r){r&&z(t),$(e),o=!1,s()}}}function dg(i){var a,l;let t,e,n,o,s=i[1].dimensionType===Je.Two&&Ra(i),r=i[1].pointType===We.PointTag&&((l=(a=i[1].style)==null?void 0:a.point)==null?void 0:l.style)!=="noPoint"&&Fa(i);return{c(){t=Q("div"),s&&s.c(),e=_(),r&&r.c(),b(t,"class","wrapper svelte-1vzhbu2"),b(t,"data-id",n=i[1].id),q(t,"hide",i[10]),q(t,"unfolded",i[6]),F(t,"left",i[9]),F(t,"top",i[8]),F(t,"z-index",i[7])},m(c,d){B(c,t,d),s&&s.m(t,null),O(t,e),r&&r.m(t,null),o=!0},p(c,[d]){var f,u;c[1].dimensionType===Je.Two?s?(s.p(c,d),d&2&&k(s,1)):(s=Ra(c),s.c(),k(s,1),s.m(t,e)):s&&(fe(),M(s,1,1,()=>{s=null}),he()),c[1].pointType===We.PointTag&&((u=(f=c[1].style)==null?void 0:f.point)==null?void 0:u.style)!=="noPoint"?r?(r.p(c,d),d&2&&k(r,1)):(r=Fa(c),r.c(),k(r,1),r.m(t,null)):r&&(fe(),M(r,1,1,()=>{r=null}),he()),(!o||d&2&&n!==(n=c[1].id))&&b(t,"data-id",n),(!o||d&1024)&&q(t,"hide",c[10]),(!o||d&64)&&q(t,"unfolded",c[6]),d&512&&F(t,"left",c[9]),d&256&&F(t,"top",c[8]),d&128&&F(t,"z-index",c[7])},i(c){o||(k(s),k(r),o=!0)},o(c){M(s),M(r),o=!1},d(c){c&&z(t),s&&s.d(),r&&r.d()}}}function ug(i,t,e){let n,o,s,r,a,l,{withAnimation:c=!1}=t,{tag:d}=t,{hooks:f}=t,{state:u}=t,{mediaStore:h}=t,{temporaryState:m}=t,g,v=!1;function A(w){g!==void 0&&clearTimeout(g),v=!0,g=setTimeout(()=>{v=!1},800)}const C=w=>{v||f.emit("click",{event:w,target:"TagPoint",tag:d})};return i.$$set=w=>{"withAnimation"in w&&e(0,c=w.withAnimation),"tag"in w&&e(1,d=w.tag),"hooks"in w&&e(2,f=w.hooks),"state"in w&&e(3,u=w.state),"mediaStore"in w&&e(4,h=w.mediaStore),"temporaryState"in w&&e(5,m=w.temporaryState)},i.$$.update=()=>{var w,E,D,y;i.$$.dirty&2&&e(12,n=(w=d.state)==null?void 0:w.visible),i.$$.dirty&4096&&e(10,o=!n),i.$$.dirty&2&&e(6,s=(E=d.state)==null?void 0:E.unfolded),i.$$.dirty&2&&e(9,r=((D=d.pointTagStyle)==null?void 0:D.leftPercent)+"%"),i.$$.dirty&2&&e(8,a=((y=d.pointTagStyle)==null?void 0:y.topPercent)+"%"),i.$$.dirty&2&&e(7,l=d.contentType===Xe.Link?1:0),i.$$.dirty&64&&A()},[c,d,f,u,h,m,s,l,a,r,o,C,n]}class fg extends se{constructor(t){super(),oe(this,t,ug,dg,ie,{withAnimation:0,tag:1,hooks:2,state:3,mediaStore:4,temporaryState:5},cg)}}function hg(i){le(i,"svelte-1eci49s",".tag--container.svelte-1eci49s{box-sizing:border-box;position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;opacity:1;-webkit-user-select:none;-moz-user-select:none;user-select:none}.tag.hide.svelte-1eci49s{display:none}.withAnimation.svelte-1eci49s{transition:opacity 0.3s linear}.tag--container.hide.svelte-1eci49s{opacity:0;pointer-events:none}.tag--container.hide.svelte-1eci49s *{pointer-events:none}")}function Ha(i,t,e){const n=i.slice();return n[6]=t[e],n}function Ga(i){let t,e=[],n=new Map,o,s=i[1];const r=a=>a[6].id;for(let a=0;a<s.length;a+=1){let l=Ha(i,s,a),c=r(l);n.set(c,e[a]=Na(c,l))}return{c(){t=Q("div");for(let a=0;a<e.length;a+=1)e[a].c();b(t,"class","tag--container svelte-1eci49s"),q(t,"hide",!i[3].visible||!i[5].visible),q(t,"withAnimation",i[0])},m(a,l){B(a,t,l);for(let c=0;c<e.length;c+=1)e[c].m(t,null);o=!0},p(a,l){l&63&&(s=a[1],fe(),e=Ve(e,l,r,1,a,s,n,t,lt,Na,null,Ha),he()),(!o||l&40)&&q(t,"hide",!a[3].visible||!a[5].visible),(!o||l&1)&&q(t,"withAnimation",a[0])},i(a){if(!o){for(let l=0;l<s.length;l+=1)k(e[l]);o=!0}},o(a){for(let l=0;l<e.length;l+=1)M(e[l]);o=!1},d(a){a&&z(t);for(let l=0;l<e.length;l+=1)e[l].d()}}}function Na(i,t){let e,n,o,s;const r=[{tag:t[6],hooks:t[2],state:t[3],mediaStore:t[4],temporaryState:t[5],withAnimation:t[0]}];let a={};for(let l=0;l<r.length;l+=1)a=Ie(a,r[l]);return n=new fg({props:a}),{key:i,first:null,c(){var l,c,d;e=Q("div"),ee(n.$$.fragment),o=_(),b(e,"class","tag svelte-1eci49s"),q(e,"hide",!((l=t[6].pointTagStyle)!=null&&l.leftPercent)||!((c=t[6].pointTagStyle)!=null&&c.topPercent)||t[6].enabled===!1||!t[6].state||((d=t[6].temporaryState)==null?void 0:d.visible)===!1),this.first=e},m(l,c){B(l,e,c),K(n,e,null),O(e,o),s=!0},p(l,c){var f,u,h;t=l;const d=c&63?Te(r,[{tag:t[6],hooks:t[2],state:t[3],mediaStore:t[4],temporaryState:t[5],withAnimation:t[0]}]):{};n.$set(d),(!s||c&2)&&q(e,"hide",!((f=t[6].pointTagStyle)!=null&&f.leftPercent)||!((u=t[6].pointTagStyle)!=null&&u.topPercent)||t[6].enabled===!1||!t[6].state||((h=t[6].temporaryState)==null?void 0:h.visible)===!1)},i(l){s||(k(n.$$.fragment,l),s=!0)},o(l){M(n.$$.fragment,l),s=!1},d(l){l&&z(e),$(n)}}}function mg(i){let t,e,n=i[3].enabled&&Ga(i);return{c(){n&&n.c(),t=Ae()},m(o,s){n&&n.m(o,s),B(o,t,s),e=!0},p(o,[s]){o[3].enabled?n?(n.p(o,s),s&8&&k(n,1)):(n=Ga(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(fe(),M(n,1,1,()=>{n=null}),he())},i(o){e||(k(n),e=!0)},o(o){M(n),e=!1},d(o){n&&n.d(o),o&&z(t)}}}function pg(i,t,e){let{withAnimation:n=!1}=t,{tags:o=[]}=t,{hooks:s}=t,{state:r}=t,{mediaStore:a}=t,{temporaryState:l}=t;return i.$$set=c=>{"withAnimation"in c&&e(0,n=c.withAnimation),"tags"in c&&e(1,o=c.tags),"hooks"in c&&e(2,s=c.hooks),"state"in c&&e(3,r=c.state),"mediaStore"in c&&e(4,a=c.mediaStore),"temporaryState"in c&&e(5,l=c.temporaryState)},[n,o,s,r,a,l]}class gg extends se{constructor(t){super(),oe(this,t,pg,mg,ie,{withAnimation:0,tags:1,hooks:2,state:3,mediaStore:4,temporaryState:5},hg)}}const Ag={globalConfig:{initialState:{},visibleConfig:{visibleDistance:{max:5},angleRange:{min:-45,max:45}},unfoldedConfig:{autoUnfold:{strategy:"MinimumDistance"}},tag3DConfig:{ratio:.0035}},contentTypeConfig:{"Any-Link-Any":{unfoldedConfig:{keep:"unfolded"},initialState:{unfolded:!0}},"Any-Marketing-Any":{unfoldedConfig:void 0},"3D-MediaPlane-PlaneTag":{unfoldedConfig:{keep:"unfolded"},visibleConfig:{alwaysShowWhenMovePano:!0,angleRange:void 0,visibleDistance:void 0}}}};class vg extends Yn{constructor(e){super(e);p(this,"tagCacheByPanoIndex",{})}getCaches({panoIndex:e,id:n,key:o}){var c,d,f,u;const{five:s}=this,r=(c=s.panoIndex)!=null?c:e;if(r===void 0)throw new Error(`TagCacheController getCache(): fivePanoIndex is ${r}`);const a=`${(f=(d=s.work)==null?void 0:d.workCode)!=null?f:s.model.uuid}-${r}`;let l=this.tagCacheByPanoIndex[a];if(l||(l=new Map,this.tagCacheByPanoIndex[a]=l),n===void 0)return l;if(o===void 0){const h=l.get(n);return h||(l.set(n,{}),l.get(n))}return(u=l.get(n))==null?void 0:u[o]}clearCache(){this.tagCacheByPanoIndex={}}}class bg extends vg{constructor(e){super(e);p(this,"tags",[]);p(this,"config",Ag);p(this,"raycaster",new I.Raycaster)}getTagById(e){const n=this.tags.find(o=>o.id===e);if(!n){console.error(`getTagById(): tag is ${n}, id is ${e}`);return}return n}changeConfig(e,n=!0){n?this.config=It.default({},this.config,e):this.config=e,this.clearCache()}changeGlobalConfig(e,n=!0){n?this.config.globalConfig=It.default({},this.config.globalConfig,e):this.config.globalConfig=e,this.clearCache()}changeContentTypeConfig(e,n,o=!0){this.config.contentTypeConfig||(this.config.contentTypeConfig={}),o?this.config.contentTypeConfig[e]=It.default({},this.config.contentTypeConfig[e],n):this.config.contentTypeConfig[e]=n,this.clearCache()}getVisibleByPanoIndex(e,n){var r;const o=this.getCaches({panoIndex:n,id:e.id}),s=(r=this.five.panoIndex)!=null?r:n;if(o.visible!==void 0)return o.visible;{const a=(()=>{var d,f,u,h,m;const l=(d=this.getTagConfig(e).visibleConfig)!=null?d:{},c=this.getDistance(e);if(typeof l=="function")return l(this.five,{tag:e,distance:c});if(l.keep==="hidden")return!1;if(l.keep==="visible")return!0;if(l.visiblePanoIndex!==void 0&&(s===void 0||!l.visiblePanoIndex.includes(s))||l.visibleDistance!==void 0&&l.visibleDistance!=="unLimited"&&ai(c,l.visibleDistance)===!1)return!1;if(((f=l.intersectRaycaster)==null?void 0:f.enabled)!==!1){if(s===void 0)return!1;const g=(u=this.five.work.observers[s])==null?void 0:u.position;if(g===void 0)throw new Error(`getVisible(): observerPosition is ${g}`);const v=ri(e.position).sub(g).normalize();this.raycaster.set(g,v);const[A]=this.five.model.intersectRaycaster(this.raycaster),C=(m=(h=l.intersectRaycaster)==null?void 0:h.distanceAccuracy)!=null?m:.01;if(A&&A.distance+C<c)return!1}return!(l.angleRange&&e.dimensionType===Je.Three&&ai(this.getAngle(e),l.angleRange)===!1)})();return o.visible=a,o.visible}}getUnfoldedByPanoIndex(e,n){if(!this.getVisibleByPanoIndex(e))return;const s=this.getCaches({panoIndex:n,id:e.id});if(s.unfolded!==void 0)return s.unfolded;{const r=this.getTagConfig(e).unfoldedConfig;if(!r)return;const a=(()=>{const c=this.getDistance(e);if(typeof r=="function")return r(this.five,{tag:e,distance:c});if(r.keep==="folded")return!1;if(r.keep==="unfolded")return!0;if(r.disableUnfold===!0)return!1;if(r.disableFold===!0)return!0;if(r.unfoldDistance&&ai(c,r.unfoldDistance)===!1)return!1})();s.unfolded=a;const l=this.getUnfoldedByCamera(e);return l!==void 0?l:s.unfolded}}getUnfoldedByCamera(e){return this.getVisibleByPanoIndex(e)?(()=>{var a;const s=this.getDistance(e),r=this.getTagConfig(e).unfoldedConfig;if(!!r){if(typeof r=="function")return r(this.five,{tag:e,distance:s});if(r.keep==="folded")return!1;if(r.keep==="unfolded")return!0;if(r.disableUnfold===!0)return!1;if(r.disableFold===!0)return!0;if(r.autoUnfold===void 0)return;if(r.autoUnfold.strategy==="ScreenPostion"){const l=this.getTagProject(e);if(l&&ai(l.x,r.autoUnfold.autoUnfoldProjectX)===!1)return!1}if(r.autoUnfold.strategy==="MinimumDistance"){const d=this.filterPointTag().filter(u=>this.getVisibleByPanoIndex(u)).filter(u=>{const h=this.getTagProject(u);if(!h)return!1;const{x:m,y:g,z:v}=h;return!(Math.abs(v)>1||Math.abs(m)>1||Math.abs(g)>1)}).filter(u=>{var m;const h=this.getTagConfig(u).unfoldedConfig;return typeof h=="object"&&((m=h.autoUnfold)==null?void 0:m.strategy)==="MinimumDistance"}).map(u=>({id:u.id,distance:this.getDistance(u)})).filter(u=>u.distance!==void 0).sort((u,h)=>u.distance-h.distance).findIndex(u=>u.id===e.id);if(d===-1||d<=((a=r.autoUnfold.maxNumber)!=null?a:1)-1===!1)return!1}return!0}})():void 0}getDistance(e,n){var r,a,l;const o=(r=this.five.panoIndex)!=null?r:n;if(o===void 0)throw new Error(`getDistance(): fivePanoIndex is ${o}`);const s=this.getCaches({panoIndex:n,id:e.id});if(s.distance!==void 0)return s.distance;{const c=(l=(a=this.five.work)==null?void 0:a.observers[o])==null?void 0:l.position;if(c===void 0)throw new Error(`getDistance(): observerPosition is ${c}`);const d=(()=>e.pointType===We.PointTag?rt(e==null?void 0:e.position):ri(e.position))(),f=c.distanceTo(d);return s.distance=f,f}}getAngle(e,n){var r,a,l;const o=(r=this.five.panoIndex)!=null?r:n;if(o===void 0)throw new Error(`getDistance(): fivePanoIndex is ${o}`);const s=this.getCaches({panoIndex:n,id:e.id});if(s.angle!==void 0)return s.angle;{const c=(l=(a=this.five.work)==null?void 0:a.observers[o])==null?void 0:l.position;if(c===void 0)throw new Error(`getAngleRange(): observerPosition is ${c}`);const d=(()=>e.pointType===We.PointTag?cn(e.normal):Br(e.position))();if(!d)return;const f=new I.Vector3().copy(c).sub(ri(e.position)),u=d.angleTo(f)*180/Math.PI;return s.angle=u,s.angle}}getTagConfig(e){var s;if(!e)return(s=this.config.globalConfig)!=null?s:{};const n={};return this.config.contentTypeConfig&&Object.keys(this.config.contentTypeConfig).forEach(r=>{const a=r;if(n[a])return;const l=a.split("-"),[c="Any",d="Any",f="Any"]=l||[];(e.dimensionType===c||c==="Any")&&(e.contentType===d||d==="Any")&&(e.pointType===f||f==="Any")&&(n[a]=this.config.contentTypeConfig[a])}),It.default({},this.config.globalConfig,...Object.values(n),e.config)}canBe(e,n){const o=this.getTagConfig(n);if(!o||typeof o!="object")return!0;if(e==="show"||e==="hide"){if(!o.visibleConfig||typeof o.visibleConfig!="object")return!0;if(e==="show"&&o.visibleConfig.keep==="hidden"||e==="hide"&&(o.visibleConfig.keep==="visible"||o.visibleConfig.alwaysShowWhenMovePano))return!1}if(e==="fold"||e==="unfold"){if(!o.unfoldedConfig||typeof o.unfoldedConfig!="object")return!0;if(e==="fold"&&(o.unfoldedConfig.disableFold||o.unfoldedConfig.keep==="unfolded")||e==="unfold"&&(o.unfoldedConfig.disableUnfold||o.unfoldedConfig.keep==="folded"))return!1}return!0}setPointTagPosition(){const e=this.filterPointTag();e.length!==0&&e.forEach(n=>{var s;if(!((s=n.state)!=null&&s.visible)){n.pointTagStyle=void 0;return}const o=this.getTagProject(n);if(!o){n.pointTagStyle=void 0;return}n.pointTagStyle={leftPercent:(o.x+1)/2*100,topPercent:(-o.y+1)/2*100}})}setVisibleByPanoIndex(){this.tags.forEach(e=>{const n=this.getVisibleByPanoIndex(e);e.state&&(e.state.visible=n)})}setUnfoldedByPanoIndex(){this.tags.forEach(e=>{const n=this.getUnfoldedByPanoIndex(e);if(!!e.state&&(n!==void 0&&(e.state.unfolded=n),n&&!e.state.visible)){const o=this.getTagConfig(e);typeof o.unfoldedConfig=="object"&&o.unfoldedConfig.autoUnfoldWhenHide!==!1&&(e.state.unfolded=!1)}})}getTagProject(e){if(!this.getVisibleByPanoIndex(e))return;const o=ri(e.position),{x:s,y:r,z:a}=o.project(this.five.camera);if(!(a>1))return{x:s,y:r,z:a}}filterPointTag(){return this.tags.filter(e=>e.pointType===We.PointTag)}filterTag2D(){return this.tags.filter(e=>e.dimensionType===Je.Two)}filter3DPointTag(){return this.tags.filter(e=>e.dimensionType===Je.Three&&e.pointType===We.PointTag)}filter3DTag(){return this.tags.filter(e=>e.dimensionType===Je.Three)}filterPlaneTag(){return this.tags.filter(e=>e.dimensionType===Je.Three&&e.pointType===We.PlaneTag)}}const Wa="1.2.6",$i=`DnalogelPlugin-PanoTagPlugin@${Wa}`,yg=!1,wg=i=>`${$i}--${i}`;class Xa extends bg{constructor(e,n){super(e);p(this,"version",Wa);p(this,"state",{enabled:!0,visible:!0});p(this,"params");p(this,"debug");p(this,"css3DRenderPlugin");p(this,"TagContainerSvelte");p(this,"temporaryState",{visible:!0});p(this,"mediaStore",Di({currentMediaUrl:""}));p(this,"store",{disposers:[],disposed:!1,resizeObserverDisposerAdding:!1,css3DRenderDisposer:new Map});p(this,"staticUrl");p(this,"disposedErrorLog",()=>{console.error(`${$i} is disposed`)});this.params=W({debug:!1,mergePluginDefaultConfigToLoadDataConfig:!1,config:this.config,staticConfig:{host:"vrlab-static.ljcdn.com"}},n),this.debug=this.params.debug,this.config=this.params.config,this.staticUrl=(()=>{var s;const o=this.params.staticConfig;if(typeof o=="string")return o;{const r=o.protocol?o.protocol+":":"",a=(s=o.host)!=null?s:"vrlab-static.ljcdn.com",l=o.port?":"+o.port:"";return`${r}//${a}${l}`}})(),Object.assign(window,{__PANOTAGPLUGIN_DEBUG__:this})}load(e,n){var o,s;this.clearTags(),console.log($i,"load:",{data:e}),this.params.mergePluginDefaultConfigToLoadDataConfig?this.config=It.default({},this.config,{globalConfig:(o=e.globalConfig)!=null?o:{},contentTypeConfig:(s=e.contentTypeConfig)!=null?s:{}}):(e.globalConfig&&(this.config.globalConfig=e.globalConfig),e.contentTypeConfig&&(this.config.contentTypeConfig=e.contentTypeConfig)),this.addTag(e.tagList,n),this.debug&&em(this.five,this.tags)}addTag(e,n){const s=(Array.isArray(e)?e:[e]).map(r=>{const a=this.getTagConfig(r);return pe(W({},r),{state:W({visible:void 0,unfolded:yg},a.initialState),hooks:new me.Subscribe,clickable:a.clickable})}).filter(r=>r.position);this.tags.push(...s),tm(this.five,()=>{var r,a,l;this.store.eventListenerDisposer&&((a=(r=this.store).eventListenerDisposer)==null||a.call(r)),this.state.enabled&&(this.store.eventListenerDisposer=this.addEventListener()),this.addResizeListener(),this.checkPanelTag(),this.setVisibleAndUnfolded({withAnimation:(l=n==null?void 0:n.withAnimation)!=null?l:!0}).then(()=>this.updateRenderAllTags()),this.updateRenderAllTags()})}clearTags(){this.tags=[],this.clearCache(),this.disposeAllCSS3DContainer(),this.updateRenderAllTags()}show(e){return Z(this,null,function*(){const{userAction:n=!0,withAnimation:o=!1}=e!=null?e:{};if(this.store.disposed)return this.disposedErrorLog();this.setState({visible:!0},{userAction:n,visibleWithAnimation:o}),this.hooks.emit("show",{userAction:n,withAnimation:o})})}hide(e){return Z(this,null,function*(){const{userAction:n=!0,withAnimation:o=!1}=e!=null?e:{};if(this.store.disposed)return this.disposedErrorLog();this.setState({visible:!1},{userAction:n,visibleWithAnimation:o}),this.hooks.emit("hide",{userAction:n,withAnimation:o})})}enable(e){const{userAction:n=!0}=e!=null?e:{};if(this.store.disposed)return this.disposedErrorLog();this.setState({enabled:!0},{userAction:n}),this.hooks.emit("enable",{userAction:n})}disable(e){const{userAction:n=!0}=e!=null?e:{};if(this.store.disposed)return this.disposedErrorLog();this.setState({enabled:!1},{userAction:n}),this.hooks.emit("disable",{userAction:n})}dispose(){var e,n,o,s,r,a;this.disposeAllCSS3DContainer(),(e=this.TagContainerSvelte)==null||e.$destroy(),this.filter3DTag().forEach(l=>{var c;return(c=l.tag3DContentSvelte)==null?void 0:c.svelteApp.$destroy()}),this.tags=[],(n=this.store.disposers)==null||n.forEach(l=>l==null?void 0:l()),this.store.disposers=[],this.store.disposed=!0,(s=(o=this.store).eventListenerDisposer)==null||s.call(o),this.store.eventListenerDisposer=void 0,(a=(r=this.store).resizeObserverDisposer)==null||a.call(r),this.store.resizeObserverDisposer=void 0,this.store.resizeObserverDisposerAdding=!1,this.clearCache(),this.hooks.emit("dispose")}setState(e,n){if(this.store.disposed)return this.disposedErrorLog();const{userAction:o=!0,visibleWithAnimation:s=!1}=n,r=W({},this.state);this.state=Object.assign(this.state,e),this.store.visibleWithAnimation=s,r.visible!==this.state.visible&&(e.visible?this.handleShow():this.handleHide()),r.enabled!==this.state.enabled&&(e.enabled?this.handleEnable():this.handleDisable()),this.hooks.emit("stateChange",{state:this.state,prevState:r,userAction:o})}changeTagNormalById(e,n){const o=this.getTagById(e);!o||!o.tag3DContentSvelte||(o.tag3DContentSvelte.currentNormal=rt(n),this.updateRenderPlaneTag())}changeDataById(e,n,o=!0){const s=this.getTagById(e);!s||(o?s.data=It.default({},s.data,n):Object.assign(s.data,n),this.checkPanelTag(),this.updateRenderAllTags())}changeTagById(e,n,o=!0){const s=this.getTagById(e);!n||(o?It.default(s,n):Object.assign(s,n),(s==null?void 0:s.tag3DContentSvelte)&&(n==null?void 0:n.normal)&&(s.tag3DContentSvelte.currentNormal=rt(n.normal)),this.updateRenderAllTags(),this.checkPanelTag())}destroyTagById(e){(Array.isArray(e)?e:[e]).forEach(o=>{const s=this.tags.findIndex(r=>r.id===o);s!==-1&&this.tags.splice(s,1)}),this.updateRenderAllTags()}pauseCurrentMedia(){this.mediaStore.set({currentMediaUrl:""})}setVisibleAndUnfolded(){return Z(this,arguments,function*({withAnimation:e}={withAnimation:!1}){return this.setVisibleByPanoIndex(),e?new Promise((n,o)=>{setTimeout(()=>{this.setUnfoldedByPanoIndex(),n()},10)}):(this.setUnfoldedByPanoIndex(),Promise.resolve())})}handleShow(){this.state.visible=!0,this.updateTagContainerVisible()}handleHide(){this.state.visible=!1,this.updateTagContainerVisible()}handleEnable(){this.state.enabled=!0,this.store.eventListenerDisposer=this.addEventListener(),this.updateRenderAllTags()}handleDisable(){var e,n,o;this.state.enabled=!1,(n=(e=this.store).eventListenerDisposer)==null||n.call(e),(o=this.TagContainerSvelte)==null||o.$set({tags:[]}),this.filter3DTag().forEach(s=>{var r;(r=s.tag3DContentSvelte)==null||r.svelteApp.$destroy(),s.tag3DContentSvelte=void 0})}addEventListener(){const{five:e,hooks:n}=this,o=this.handleFiveWantsMoveToPano.bind(this),s=this.handleFiveModeChange.bind(this),r=this.handleFiveCameraUpdate.bind(this),a=this.handleFiveCameraUpdateDebounce(),l=this.handleFivePanoArrived.bind(this),c=this.clickhandler.bind(this);return e.on("wantsMoveToPano",o),e.on("modeChange",s),e.on("cameraUpdate",r),e.on("cameraUpdate",a),e.on("panoArrived",l),n.on("click",c),()=>{e.off("wantsMoveToPano",o),e.off("modeChange",s),e.off("cameraUpdate",r),e.off("cameraUpdate",a),e.off("panoArrived",l),n.off("click",c),this.store.eventListenerDisposer=void 0}}addResizeListener(){if(!this.store.resizeObserverDisposer&&!this.store.resizeObserverDisposerAdding){const e=this.addResizeObserver();this.store.resizeObserverDisposerAdding=!0,setTimeout(()=>{this.store.resizeObserverDisposer=e,this.store.resizeObserverDisposerAdding=!1},200)}}addResizeObserver(){if(!this.store.disposed)return;const e=this.five.getElement(),n=()=>{!this.state.enabled||(this.show(),this.updateRenderAllTags())},o=()=>{!this.state.enabled||this.hide()},{observe:s,unobserve:r}=Qr(im(()=>{!this.store.resizeObserverDisposer||o()},500),e),{observe:a,unobserve:l}=Qr(Tr(()=>n(),400),e);return s(),a(),()=>{r(),l()}}handleFiveModeChange(e){e==="Panorama"?this.five.once("panoArrived",()=>this.temporaryShow()):this.temporaryHide()}handleFiveWantsMoveToPano(){this.tags.forEach(e=>{const n=this.getTagConfig(e);typeof n.visibleConfig=="object"&&n.visibleConfig.keep?e.temporaryState=pe(W({},e.temporaryState),{visible:n.visibleConfig.keep==="visible"}):typeof n.visibleConfig=="object"&&n.visibleConfig.alwaysShowWhenMovePano?e.temporaryState=pe(W({},e.temporaryState),{visible:!0}):e.temporaryState=pe(W({},e.temporaryState),{visible:!1})}),this.updateRenderAllTags()}temporaryShow(){this.temporaryState.visible=!0}temporaryHide(){this.temporaryState.visible=!1}clickhandler(e){if(e.target!=="TagPoint")return;if(!e.tag.state)return console.warn("Clickhandler: params.tag.state is undefined");const n=this.canBe("fold",e.tag),o=this.canBe("unfold",e.tag);n&&o&&(e.tag.state.unfolded=!e.tag.state.unfolded,e.tag.state.unfolded&&this.tags.forEach(s=>{s.id!==e.tag.id&&s.state&&this.canBe("fold",s)&&(s.state.unfolded=!1)}),this.updateRenderAllTags())}updateRenderAllTags(){this.updateRenderPointTag(),this.updateRenderPlaneTag()}updateTagContainerVisible(){var e;(e=this.TagContainerSvelte)==null||e.$set({state:this.state,temporaryState:this.temporaryState,withAnimation:this.store.visibleWithAnimation}),this.filter3DTag().forEach(n=>{var o;(o=n.tag3DContentSvelte)==null||o.svelteApp.$set({state:this.state,temporaryState:this.temporaryState,withAnimation:this.store.visibleWithAnimation})})}handleFiveCameraUpdateDebounce(){return Tr(()=>{this.setUnfoldedByCamera(),this.updateRenderAllTags()},100)}handleFiveCameraUpdate(){this.updateRenderPointTag()}handleFivePanoArrived(){return Z(this,null,function*(){yield this.setVisibleAndUnfolded(),this.tags.forEach(e=>{e.temporaryState=pe(W({},e.temporaryState),{visible:!0})}),this.updateRenderAllTags()})}setUnfoldedByCamera(){let e=!1;this.tags.forEach(n=>{const o=this.getUnfoldedByCamera(n);!n.state||o!==void 0&&(o===!0&&(e=!0),n.state.unfolded=o)}),e&&this.tags.forEach(n=>{const o=this.getTagConfig(n).unfoldedConfig;typeof o=="object"&&(o.autoUnfold||o.disableFold||o.keep)||n.state&&(n.state.unfolded=!1)})}updateRenderPointTag(){var n;const e=this.filterPointTag();if(this.setPointTagPosition(),this.TagContainerSvelte)this.TagContainerSvelte.$set({tags:e,state:this.state,temporaryState:this.temporaryState});else{const o=(n=this.five.getElement())==null?void 0:n.parentElement;if(!o)return console.error("updateRenderPlaneTag: tag2DContainer not found");this.TagContainerSvelte=new gg({target:o,props:{hooks:this.hooks,tags:e,state:this.state,temporaryState:this.temporaryState,mediaStore:this.mediaStore}})}}updateRenderPlaneTag(){[...this.filterPlaneTag(),...this.filter3DPointTag()].forEach(n=>{var o;if(n.tag3DContentSvelte){const{svelteApp:s,domContainer:r,initialNormal:a,currentNormal:l}=n.tag3DContentSvelte;if(s.$set({tag:n,hooks:this.hooks,state:this.state,temporaryState:this.temporaryState}),!a.equals(l)){const c=new H.Quaternion().setFromUnitVectors(a,l);r.css3DObject.setRotationFromQuaternion(c)}}else{if(((o=n.state)==null?void 0:o.visible)===!1)return;if(this.css3DRenderPlugin||(this.css3DRenderPlugin=Wt(this.five)),n.pointType===We.PointTag&&!n.normal)return console.error("updateRenderPlaneTag: \u4E09\u7EF4\u70B9\u6807\u7B7E\u7F3A\u5C11\u6CD5\u5411\u91CF\uFF01");const s=n.pointType===We.PlaneTag?n.position:nm(this.five.camera.position,rt(n.position),rt(n.normal)),r=n.pointType===We.PlaneTag?Br(n.position):rt(n.normal),a=this.getTagConfig(n).tag3DConfig,l=this.css3DRenderPlugin.create3DDomContainer(s,a);if(!l)return;this.store.css3DRenderDisposer.set(n.id,l.dispose),n.tag3DContentSvelte={svelteApp:new Ta({target:l.container,props:{tag:n,hooks:this.hooks,state:this.state,mediaStore:this.mediaStore,temporaryState:this.temporaryState}}),domContainer:l,initialNormal:r,currentNormal:r}}}),this.checkPanelTag()}disposeAllCSS3DContainer(){for(const[e,n]of this.store.css3DRenderDisposer)n==null||n();this.store.css3DRenderDisposer=new Map}checkPanelTag(){this.tags.forEach(e=>{var n;e.dimensionType===Je.Two&&e.pointType===We.PointTag&&((n=e.tag3DContentSvelte)==null||n.domContainer.dispose(),e.tag3DContentSvelte=void 0)});for(const[e,n]of this.store.css3DRenderDisposer){const o=this.getTagById(e);(!o||o.dimensionType!==Je.Three)&&(n==null||n(),this.store.css3DRenderDisposer.delete(e))}}}const Cg=(i,t)=>new Xa(i,t);class eo extends H.Object3D{constructor(e,n){var o;super();p(this,"originObject3D");p(this,"onRender");this.originObject3D=e,this.onRender=(o=n==null?void 0:n.onRender)!=null?o:()=>{}}get helperObject(){return this}render(){this.onRender()}show(){this.visible=!0,this.render()}hide(){this.visible=!1,this.render()}updatePosition(){this.position.copy(this.originObject3D.position)}updateQuaternion(){this.quaternion.copy(this.originObject3D.quaternion)}applyHelperScaleMatrix4(e,n){this.scale.applyMatrix4(e)}applyHelperQuaternion(e,n){this.applyQuaternion(e)}}class Pg extends eo{}class Ig extends eo{}class Eg extends eo{}class xg extends Eg{}class kg extends I.Group{constructor(e){super();p(this,"direction");this.direction=e||"x"}}class Ya extends I.Mesh{constructor(e,n,o){super(e,n);p(this,"direction");this.direction=o||"x"}}function Dg(i,t){const{offsetWidth:e,offsetHeight:n}=t,{top:o,left:s}=t.getBoundingClientRect();return Object.assign(new I.Vector2,{x:(i.x-s)/e*2-1,y:-(i.y-o)/n*2+1})}function to(i,t,e){if(!t||!e||!i)return;const n=Dg(t,e);if(Math.abs(n.x)===1||Math.abs(n.y)===1)return;const o=new I.Raycaster;return o.setFromCamera(n,i),o}function Lg(i,t){return!(Math.abs(i.x-t.x)>1e-5||Math.abs(i.y-t.y)>1e-5||Math.abs(i.z-t.z)>1e-5)}class no extends kg{constructor(e){var d;super(e.direction);p(this,"line");p(this,"arrow");p(this,"lineHeight",.4);p(this,"arrowHeight",.1);this.name="ArrowGroup";const n=new I.Color((d=e.color)!=null?d:16214315),o=new I.MeshBasicMaterial({color:n,depthTest:!1,opacity:1,transparent:!0,side:I.DoubleSide}),s=new I.ConeGeometry(.04,.1,32),r=new Ya(s,o.clone(),e.direction);r.name=`arrow-${e.direction}`,this.arrow=r;const a=.004,l=new I.CylinderGeometry(a,a,.4,32),c=new Ya(l,o.clone(),e.direction);c.name=`line-${e.direction}`,this.line=c,this.formatArrow(),this.formatLine(),this.add(this.arrow,this.line)}formatArrow(){this.arrow.geometry.translate(0,this.lineHeight+this.arrowHeight/2,0),this.direction==="x"?(this.arrow.geometry.rotateX(Math.PI/2),this.arrow.geometry.rotateY(Math.PI/2)):this.direction==="z"&&this.arrow.geometry.rotateX(Math.PI/2)}formatLine(){this.line.geometry.translate(0,this.lineHeight/2,0),this.direction==="x"?(this.line.geometry.rotateX(Math.PI/2),this.line.geometry.rotateY(Math.PI/2)):this.direction==="z"&&this.line.geometry.rotateX(Math.PI/2)}}const io={X:15618642,Y:4765519,Z:4227839};class ct{static get X(){return new I.Color(io.X).convertSRGBToLinear().clone()}static get Y(){return new I.Color(io.Y).convertSRGBToLinear().clone()}static get Z(){return new I.Color(io.Z).convertSRGBToLinear().clone()}}class Sg extends Pg{constructor(e){super(e);p(this,"xArrow",new no({direction:"x",color:ct.X}));p(this,"yArrow",new no({direction:"y",color:ct.Y}));p(this,"zArrow",new no({direction:"z",color:ct.Z}));this.add(this.xArrow),this.add(this.yArrow),this.add(this.zArrow)}show(){super.show(),this.xArrow.visible=!0,this.yArrow.visible=!0,this.zArrow.visible=!0}showDraggingHelper(e){this.xArrow.visible=e.includes("x"),this.yArrow.visible=e.includes("y"),this.zArrow.visible=e.includes("z")}dispose(){this.remove(this.xArrow,this.yArrow,this.zArrow)}}function Rt(i,t){return zg(document.createElement(t!=null?t:"div"),i)}function zg(i,t){if(!t)return i;for(const e in t)e&&t[e]&&(i.style[e]=t[e]);return i}function Mg(i){const t=Rt(W({position:"absolute",display:"block",borderRadius:"4px",paddingTop:"1px",paddingBottom:"1px",paddingLeft:"4px",paddingRight:"4px",pointerEvents:"none",userSelect:"none",zIndex:"9999",backgroundColor:"rgba(0,0,0,0.7)",fontSize:"12px",color:"#fff",letterSpacing:"0",lineHeight:"18px"},i)),e=()=>{t.style.display!=="block"&&(!t.style.top||!t.style.left||(t.style.display="block"))};return{element:t,show:e,hide:()=>{t.style.display="none",t.style.top="",t.style.left=""},setLeftTop:(s,r)=>{t.style.left=s,t.style.top=r,e()}}}class jg extends Ig{constructor(e,n){var o;super(e);p(this,"yzCircle",new oo({direction:"x",color:ct.X}));p(this,"xzCircle",new oo({direction:"y",color:ct.Y}));p(this,"xyCircle",new oo({direction:"z",color:ct.Z}));p(this,"xRingHelper",new so({direction:"x"}));p(this,"yRingHelper",new so({direction:"y"}));p(this,"zRingHelper",new so({direction:"z"}));p(this,"xAngleHelper",new ro({direction:"x",color:ct.X}));p(this,"yAngleHelper",new ro({direction:"y",color:ct.Y}));p(this,"zAngleHelper",new ro({direction:"z",color:ct.Z}));p(this,"angleTips");p(this,"container");n&&(this.container=n==null?void 0:n.container,this.angleTips=Mg({display:"none"}),(o=this.container)==null||o.appendChild(this.angleTips.element)),this.show()}updateAngleHelperQuaternion(){this.xAngleHelper.quaternion.copy(this.yzCircle.quaternion),this.yAngleHelper.quaternion.copy(this.xzCircle.quaternion),this.zAngleHelper.quaternion.copy(this.xyCircle.quaternion),this.xRingHelper.quaternion.copy(this.yzCircle.quaternion),this.yRingHelper.quaternion.copy(this.xzCircle.quaternion),this.zRingHelper.quaternion.copy(this.xyCircle.quaternion)}applyHelperQuaternion(e,n){this.yzCircle.applyQuaternion(e),this.xzCircle.applyQuaternion(e),this.xyCircle.applyQuaternion(e),this.xAngleHelper.baseAxes.applyQuaternion(e),this.yAngleHelper.baseAxes.applyQuaternion(e),this.zAngleHelper.baseAxes.applyQuaternion(e)}hide(){this.remove(this.yzCircle,this.xzCircle,this.xyCircle,this.xRingHelper,this.yRingHelper,this.zRingHelper,this.xAngleHelper,this.yAngleHelper,this.zAngleHelper)}show(){var e;this.add(this.xyCircle,this.xzCircle,this.yzCircle),this.remove(this.xRingHelper,this.yRingHelper,this.zRingHelper,this.xAngleHelper,this.yAngleHelper,this.zAngleHelper),(e=this.angleTips)==null||e.hide()}showDraggingHelper(e){var n;this.hide(),this.add(...this.filterRingHelper(e)),this.add(...this.filterAngleHelper(e)),(n=this.angleTips)==null||n.show()}dispose(){var e,n;this.remove(this.yzCircle,this.xzCircle,this.xyCircle,this.xRingHelper,this.yRingHelper,this.zRingHelper,this.xAngleHelper,this.yAngleHelper,this.zAngleHelper),(e=this.angleTips)!=null&&e.element&&((n=this.container)==null||n.removeChild(this.angleTips.element))}filterRingHelper(e){return[this.xRingHelper,this.yRingHelper,this.zRingHelper].filter(n=>e.includes(n.direction))}filterAngleHelper(e){return[this.xAngleHelper,this.yAngleHelper,this.zAngleHelper].filter(n=>e.includes(n.direction))}}class oo extends I.Mesh{constructor(e){var n;super();p(this,"direction");p(this,"gapAngle",.02);p(this,"geometry",new I.RingGeometry(.25,.3,20,8,this.gapAngle,Math.PI/2-this.gapAngle*2));this.material=new I.MeshBasicMaterial({opacity:.6,color:(n=e.color)!=null?n:16777215,transparent:!0,side:I.DoubleSide,depthTest:!1}),this.direction=e.direction,this.geometry.name=`RotateHelperCircleGeometry-${this.direction}`,this.direction==="y"?this.rotateX(Math.PI/2):this.direction==="x"&&this.rotateY(-Math.PI/2)}}class so extends I.Group{constructor(e){super();p(this,"direction");this.direction=e.direction;const n=.015,o=new Array(8).fill(null).map((s,r)=>{const a=new I.RingGeometry(.25,.3,20,8,Math.PI/4*r+n,Math.PI/4-n*2),l=new I.MeshBasicMaterial({opacity:1,color:16777215,depthTest:!1,transparent:!0,side:I.DoubleSide}),c=new I.Mesh(a,l);return c.name=`AxesDashedRing-${this.direction}-${r}`,c});this.add(...o),this.direction==="y"?this.rotateX(Math.PI/2):this.direction==="x"&&this.rotateY(-Math.PI/2)}}class ro extends I.Mesh{constructor(e){var o;super();p(this,"direction");p(this,"baseAxes");switch(e.direction){case"x":this.baseAxes=new I.Vector3(0,0,1);break;case"y":this.baseAxes=new I.Vector3(1,0,0);break;case"z":this.baseAxes=new I.Vector3(1,0,0);break}const n=.3+5e-4;this.geometry=new I.CircleGeometry(n,48,0,1e-4),this.material=new I.MeshBasicMaterial({opacity:.4,color:(o=e.color)!=null?o:16777215,depthTest:!1,transparent:!0,side:I.DoubleSide}),this.direction=e.direction,this.direction==="y"?this.rotateX(Math.PI/2):this.direction==="x"&&this.rotateY(-Math.PI/2)}}function Bg(){const i=Rt({width:"100%",height:"100%",left:"0",top:"0",position:"absolute",pointerEvents:"none"}),t=Rt({boxSizing:"border-box",width:"100%",height:"100%",left:"0",top:"0",position:"relative",display:"flex",alignItems:"center",justifyContent:"center"}),e=Rt({boxSizing:"border-box",width:"100%",height:"100%",left:"0",top:"0",position:"absolute",border:"1px solid rgba(255,255,255,0.4)"});i.appendChild(t),t.appendChild(e);const n="-4px",o={direction:"nesw",element:bt({cursor:"nesw-resize",left:n,bottom:n})},s={direction:"ns",element:bt({cursor:"ns-resize",bottom:n})},r={direction:"nwse",element:bt({cursor:"nwse-resize",right:n,bottom:n})},a={direction:"ew",element:bt({cursor:"ew-resize",right:n})},l={direction:"nesw",element:bt({cursor:"nesw-resize",right:n,top:n})},c={direction:"ns",element:bt({cursor:"ns-resize",top:n})},d={direction:"nwse",element:bt({cursor:"nwse-resize",left:n,top:n})},f={direction:"ew",element:bt({cursor:"ew-resize",left:n})};return new Array(s,a,c,f,o,r,l,d).forEach(h=>t.appendChild(h.element)),{container:i,squares:[o,s,r,a,l,c,d,f]}}function bt(i){const t=Rt(W({background:"#FFFFFF",width:"9px",height:"9px",position:"absolute",pointerEvents:"none"},i)),e=Rt({width:"15px",height:"15px",position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none"}),n=Rt({width:"15px",height:"15px",cursor:i==null?void 0:i.cursor,pointerEvents:"auto",background:"transparent"});return n.draggable=!0,e.appendChild(n),t.appendChild(e),t}class Tg extends xg{constructor(e,n,o,s){super(e);p(this,"points",[]);p(this,"cornerPositions",[]);p(this,"css3DInstance");p(this,"plane");p(this,"css3DRenderer",new ko);p(this,"camera");p(this,"scene");p(this,"container");p(this,"enabled",!1);this.camera=o,this.scene=s,this.container=n,this.initRectangleScaleHelper()}get helperObject(){var e;if(!((e=this.css3DInstance)!=null&&e.css3DObject))throw new Error("css3DInstance is not initialized");return this.css3DInstance.css3DObject}updatePosition(){var e;this.helperObject.position.copy(this.originObject3D.position),(e=this.plane)==null||e.position.copy(this.originObject3D.position)}updateQuaternion(){var e;(e=this.plane)==null||e.quaternion.copy(this.originObject3D.quaternion)}applyMatrix4(e){var n;super.applyMatrix4(e),this.helperObject.applyMatrix4(e),(n=this.plane)==null||n.applyMatrix4(e),this.cornerPositions.forEach(o=>o.applyMatrix4(e))}showDraggingHelper(){}applyHelperScaleMatrix4(e,n){var o;(o=this.plane)==null||o.scale.applyMatrix4(e),this.helperObject.applyScaleMatrix4(e)}updatePoints(){const e=this.calculatePointPosition(this.cornerPositions);this.points.forEach((n,o)=>{n.position.copy(e[o])})}applyHelperQuaternion(e,n){var s;const o=(s=this.css3DInstance)==null?void 0:s.css3DObject;if(o){const r=new I.Vector3().subVectors(o.position,n).applyQuaternion(e).add(n);o.position.copy(r),o.applyQuaternion(e)}if(this.plane){const r=new I.Vector3().subVectors(this.plane.position,n).applyQuaternion(e).add(n);this.plane.position.copy(r),this.plane.applyQuaternion(e)}this.cornerPositions.forEach(r=>{const a=new I.Vector3().subVectors(r,n).applyQuaternion(e).add(n);r.copy(a)})}enable(){var e;this.enabled||(this.enabled=!0,(e=this.css3DInstance)==null||e.enable(),this.plane&&this.scene.add(this.plane))}disable(){var e;!this.enabled||(this.enabled=!1,(e=this.css3DInstance)==null||e.disable(),this.plane&&this.scene.remove(this.plane))}show(){var e;(e=this.css3DInstance)==null||e.show(),this.plane&&(this.plane.visible=!0)}hide(){var e;(e=this.css3DInstance)==null||e.hide(),this.plane&&(this.plane.visible=!1)}dispose(){this.disable(),this.css3DRenderer.dispose()}initRectangleScaleHelper(){var d;const e=this.getCornerPositions();if(!e)return;this.cornerPositions=e;const n=this.css3DRenderer.create3DElement(this.camera,e,{ratio:.003});if(!n)return;this.css3DInstance=n,n.appendToElement(this.container);const o=n.css3DObject.container,{container:s,squares:r}=Bg();this.points=r.map((f,u)=>({direction:f.direction,point:f.element,position:this.calculatePointPosition(e)[u]})),o.insertBefore(s,(d=o.children[0])!=null?d:null);const a=new I.PlaneGeometry(n.css3DObject.width,n.css3DObject.height),l=new I.MeshBasicMaterial({color:0,opacity:.15,transparent:!0,side:I.DoubleSide}),c=new I.Mesh(a,l);this.scene.add(c),this.updatePosition()}getCornerPositions(){const{originObject3D:e}=this;if(e instanceof Ct.CSS3DObject){if(e.isCSS3DObjectPlus)return e.cornerPoints;console.error("\u6682\u65F6\u53EA\u652F\u6301 CSS3DRenderPlugin \u751F\u6210\u7684\u7269\u4F53")}else console.error("\u5F53\u524D\u7269\u4F53\u6682\u65F6\u4E0D\u652F\u6301 ScaleHelper")}calculatePointPosition(e){return[e[0].clone(),e[0].clone().add(e[1]).divideScalar(2),e[1].clone(),e[1].clone().add(e[2]).divideScalar(2),e[2].clone(),e[2].clone().add(e[3]).divideScalar(2),e[3].clone(),e[3].clone().add(e[0]).divideScalar(2)]}}new I.Vector3;function ve(i,t){this._camera=i||null,this._domElement=t||document,this._raycaster=new I.Raycaster,this._selected=null,this._boundObjs={};var e=this;this._$onClick=function(){e._onClick.apply(e,arguments)},this._$onDblClick=function(){e._onDblClick.apply(e,arguments)},this._$onMouseMove=function(){e._onMouseMove.apply(e,arguments)},this._$onMouseDown=function(){e._onMouseDown.apply(e,arguments)},this._$onMouseUp=function(){e._onMouseUp.apply(e,arguments)},this._$onTouchMove=function(){e._onTouchMove.apply(e,arguments)},this._$onTouchStart=function(){e._onTouchStart.apply(e,arguments)},this._$onTouchEnd=function(){e._onTouchEnd.apply(e,arguments)},this._$onContextmenu=function(){e._onContextmenu.apply(e,arguments)},this._domElement.addEventListener("click",this._$onClick,!1),this._domElement.addEventListener("dblclick",this._$onDblClick,!1),this._domElement.addEventListener("mousemove",this._$onMouseMove,!1),this._domElement.addEventListener("mousedown",this._$onMouseDown,!1),this._domElement.addEventListener("mouseup",this._$onMouseUp,!1),this._domElement.addEventListener("touchmove",this._$onTouchMove,!1),this._domElement.addEventListener("touchstart",this._$onTouchStart,!1),this._domElement.addEventListener("touchend",this._$onTouchEnd,!1),this._domElement.addEventListener("contextmenu",this._$onContextmenu,!1)}ve.prototype.destroy=function(){this._domElement.removeEventListener("click",this._$onClick,!1),this._domElement.removeEventListener("dblclick",this._$onDblClick,!1),this._domElement.removeEventListener("mousemove",this._$onMouseMove,!1),this._domElement.removeEventListener("mousedown",this._$onMouseDown,!1),this._domElement.removeEventListener("mouseup",this._$onMouseUp,!1),this._domElement.removeEventListener("touchmove",this._$onTouchMove,!1),this._domElement.removeEventListener("touchstart",this._$onTouchStart,!1),this._domElement.removeEventListener("touchend",this._$onTouchEnd,!1),this._domElement.removeEventListener("contextmenu",this._$onContextmenu,!1)},ve.eventNames=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","contextmenu","touchstart","touchend"],ve.prototype._getRelativeMouseXY=function(i){var t=i.target||i.srcElement;t.nodeType===3&&(t=t.parentNode);var e={x:0,y:0},n=t,o=getComputedStyle(n,null);e.y+=parseInt(o.getPropertyValue("padding-top"),10),e.x+=parseInt(o.getPropertyValue("padding-left"),10);do e.x+=n.offsetLeft,e.y+=n.offsetTop,o=getComputedStyle(n,null),e.x+=parseInt(o.getPropertyValue("border-left-width"),10),e.y+=parseInt(o.getPropertyValue("border-top-width"),10);while(n=n.offsetParent);var s={width:t===window?window.innerWidth:t.offsetWidth,height:t===window?window.innerHeight:t.offsetHeight};return{x:Number((i.pageX-e.x)/s.width)*2-1,y:-((i.pageY-e.y)/s.height)*2+1}},ve.prototype._objectCtxInit=function(i){i._3xDomEvent={}},ve.prototype._objectCtxDeinit=function(i){delete i._3xDomEvent},ve.prototype._objectCtxIsInit=function(i){return!!i._3xDomEvent},ve.prototype._objectCtxGet=function(i){return i._3xDomEvent},ve.prototype.camera=function(i){return i&&(this._camera=i),this._camera},ve.prototype.bind=function(i,t,e,n){console.assert(ve.eventNames.indexOf(t)!==-1,"not available events:"+t),this._objectCtxIsInit(i)||this._objectCtxInit(i);var o=this._objectCtxGet(i);o[t+"Handlers"]||(o[t+"Handlers"]=[]),o[t+"Handlers"].push({callback:e,useCapture:n}),this._boundObjs[t]===void 0&&(this._boundObjs[t]=[]),this._boundObjs[t].push(i)},ve.prototype.addEventListener=ve.prototype.bind,ve.prototype.unbind=function(i,t,e,n){console.assert(ve.eventNames.indexOf(t)!==-1,"not available events:"+t),this._objectCtxIsInit(i)||this._objectCtxInit(i);var o=this._objectCtxGet(i);o[t+"Handlers"]||(o[t+"Handlers"]=[]);for(var s=o[t+"Handlers"],r=0;r<s.length;r++){var a=s[r];if(e==a.callback&&n==a.useCapture){s.splice(r,1);break}}var l=this._boundObjs[t].indexOf(i);console.assert(l!==-1),this._boundObjs[t].splice(l,1)},ve.prototype.removeEventListener=ve.prototype.unbind,ve.prototype._bound=function(i,t){var e=this._objectCtxGet(t);return e?!!e[i+"Handlers"]:!1},ve.prototype._onMove=function(i,t,e,n){var o=this._boundObjs[i];if(!(o===void 0||o.length===0)){var s=new I.Vector2;s.set(t,e),this._raycaster.setFromCamera(s,this._camera);var r=this._raycaster.intersectObjects(o),a=this._selected;if(r.length>0){var l,c,d,f=r[0],u=f.object;this._selected=u,d=this._bound("mousemove",u),a!=u&&(l=this._bound("mouseover",u),c=a&&this._bound("mouseout",a))}else c=a&&this._bound("mouseout",a),this._selected=null;d&&this._notify("mousemove",u,n,f),l&&this._notify("mouseover",u,n,f),c&&this._notify("mouseout",a,n,f)}},ve.prototype._onEvent=function(i,t,e,n){var o=this._boundObjs[i];if(!(o===void 0||o.length===0)){var s=new I.Vector2;s.set(t,e),this._raycaster.setFromCamera(s,this._camera);var r=this._raycaster.intersectObjects(o,!0);if(r.length!==0){for(var a=r[0],l=a.object,c=this._objectCtxGet(l),d=l.parent;typeof c=="undefined"&&d;)c=this._objectCtxGet(d),d=d.parent;!c||this._notify(i,l,n,a)}}},ve.prototype._notify=function(i,t,e,n){var o=this._objectCtxGet(t),s=o?o[i+"Handlers"]:null;if(console.assert(arguments.length===4),!o||!s||s.length===0){t.parent&&this._notify(i,t.parent,e,n);return}for(var s=o[i+"Handlers"],r=0;r<s.length;r++){var a=s[r],l=!0;a.callback({type:i,target:t,origDomEvent:e,intersect:n,stopPropagation:function(){l=!1}}),!!l&&a.useCapture===!1&&t.parent&&this._notify(i,t.parent,e,n)}},ve.prototype._onMouseDown=function(i){return this._onMouseEvent("mousedown",i)},ve.prototype._onMouseUp=function(i){return this._onMouseEvent("mouseup",i)},ve.prototype._onMouseEvent=function(i,t){var e=this._getRelativeMouseXY(t);this._onEvent(i,e.x,e.y,t)},ve.prototype._onMouseMove=function(i){var t=this._getRelativeMouseXY(i);this._onMove("mousemove",t.x,t.y,i),this._onMove("mouseover",t.x,t.y,i),this._onMove("mouseout",t.x,t.y,i)},ve.prototype._onClick=function(i){this._onMouseEvent("click",i)},ve.prototype._onDblClick=function(i){this._onMouseEvent("dblclick",i)},ve.prototype._onContextmenu=function(i){this._onMouseEvent("contextmenu",i)},ve.prototype._onTouchStart=function(i){return this._onTouchEvent("touchstart",i)},ve.prototype._onTouchEnd=function(i){return this._onTouchEvent("touchend",i)},ve.prototype._onTouchMove=function(i){if(i.touches.length==1){i.preventDefault();var t=Number(i.touches[0].pageX/window.innerWidth)*2-1,e=-(i.touches[0].pageY/window.innerHeight)*2+1;this._onMove("mousemove",t,e,i),this._onMove("mouseover",t,e,i),this._onMove("mouseout",t,e,i)}},ve.prototype._onTouchEvent=function(i,t){if(t.touches.length==1){t.preventDefault();var e=Number(t.touches[0].pageX/window.innerWidth)*2-1,n=-(t.touches[0].pageY/window.innerHeight)*2+1;this._onEvent(i,e,n,t)}};let Ft=null;class ao{constructor(t,e,n,o,s,r,a){p(this,"hooks",new ln);p(this,"helperObject3D");p(this,"originObject3D");p(this,"camera");p(this,"model");p(this,"scene");p(this,"container");p(this,"domEvents");p(this,"isDragging",!1);p(this,"onRender");p(this,"enabled",!1);p(this,"onWantsTapGesture",t=>{if(this.getIntersectObject(t))return!1});this.camera=t,this.model=e,this.originObject3D=n,this.helperObject3D=o,this.container=s,this.scene=r,this.domEvents=new ve(t,s),this.onRender=a!=null?a:()=>{},this.initialHelperPosition(),this.initialHelperQuaternion(),this.enable()}initialHelperPosition(){this.helperObject3D.updatePosition()}initialHelperQuaternion(){this.helperObject3D.updateQuaternion()}enable(){this.enabled||(this.enabled=!0,this.scene.add(this.helperObject3D),this.render())}disable(){!this.enabled||(this.enabled=!1,this.scene.remove(this.helperObject3D),this.render())}show(){this.helperObject3D.show(),this.render()}hide(){this.helperObject3D.hide(),this.render()}dispose(){this.helperObject3D.dispose(),this.scene.remove(this.helperObject3D),this.render()}setOpacity(t){this.setOriginOpacityProperty();const e=this.originObject3D;if(e instanceof I.Mesh&&(e.material.opacity=t),e.isCSS3DObjectPlus){const n=e;n.container.style.opacity=t.toString()}this.render()}restoreOpacity(){if(Ft===null)return;const t=this.originObject3D;if(t instanceof I.Mesh&&(t.material.opacity=Ft.opacity),t.isCSS3DObjectPlus){const e=t;e.container.style.opacity=Ft.opacity.toString()}this.render()}setOriginOpacityProperty(){var t,e;if(Ft===null){const n=this.originObject3D;n instanceof I.Mesh&&(Ft={opacity:n.material.opacity}),n instanceof Io&&(Ft={opacity:(t=n.container.style.opacity)!=null?t:1}),n.isCSS3DObjectPlus&&(Ft={opacity:Number((e=n.container.style.opacity)!=null?e:1)})}}updateHelperPosition(){this.helperObject3D.updatePosition()}updateHelperQuaternion(){this.helperObject3D.updateQuaternion()}applyHelperMatrix4(t){this.helperObject3D.applyMatrix4(t)}applyHelperQuaternion(t,e){this.helperObject3D.applyHelperQuaternion(t,e)}applyHelperScaleMatrix4(t,e){this.helperObject3D.applyHelperScaleMatrix4(t,e)}onWantsGesture(t,e,n){if(this.isDragging)return!1}render(){this.onRender()}hoverListener(t,e=16777215,n=1){const o=(Array.isArray(t)?t:[t]).filter(Qt),s=[];for(const r of o)if(r instanceof I.Mesh||r instanceof I.Group){const a=r instanceof I.Group?r.children.filter(u=>u instanceof I.Mesh):[r];a.forEach(u=>{u.__originalColor__=u.material.color.clone(),u.__originalOpacity__=u.material.opacity});const l=()=>{a.forEach(u=>{u.material.color.set(e),u.material.opacity=n}),this.render()},c=()=>{a.forEach(u=>{u.material.color.copy(u.__originalColor__),u.material.opacity=u.__originalOpacity__}),this.render()},d=()=>{this.isDragging||l()},f=()=>{this.isDragging||c()};for(const u of a)this.domEvents.addEventListener(u,"mouseover",d),this.domEvents.addEventListener(u,"mouseout",f),this.hooks.on("moveStart",l),this.hooks.on("moveEnd",c),this.hooks.on("rotateEnd",c),s.push(()=>{this.domEvents.removeEventListener(u,"mouseover",d),this.domEvents.removeEventListener(u,"mouseout",f),this.hooks.off("moveStart",l),this.hooks.off("moveEnd",c),this.hooks.off("rotateEnd",c)})}return()=>s.forEach(r=>r==null?void 0:r())}getIntersectObject(t){const e=this.camera.position,n=this.helperObject3D;if(!n)return;let o;const s=t.intersectObject(n,!0)[0];if(!!s&&(o=s,o.object=n,!!o)){if(this.model.intersectRaycaster){const r=this.model.intersectRaycaster(t)[0];if(r&&r.point.distanceTo(e)<o.point.distanceTo(e))return}return o.object}}}class Qg extends ao{constructor(...e){super(...e);p(this,"startInfo");const n=this.helperObject3D;this.hoverListener([n.xArrow,n.yArrow,n.zArrow]);const o=this.dragStart.bind(this),s=this.dragging.bind(this),r=this.dragEnd.bind(this);this.domEvents.addEventListener(this.helperObject3D,"mousedown",o),document.addEventListener("mousemove",s),document.addEventListener("mouseup",r)}dragStart(e){if(this.isDragging)return;const n=e==null?void 0:e.intersect;if(!n)return this.dragEnd();const o=(n==null?void 0:n.object).direction;if(!o)return this.dragEnd();const s=new I.Vector3(1,0,0).applyQuaternion(this.helperObject3D.quaternion),r=new I.Vector3(0,1,0).applyQuaternion(this.helperObject3D.quaternion),a=new I.Vector3(0,0,1).applyQuaternion(this.helperObject3D.quaternion),l=(()=>{switch(o){case"x":return s;case"y":return r;case"z":return a}})(),c=(()=>{switch(o){case"x":case"y":return a;case"z":return s}})(),d=n.point.clone(),f=new I.Plane;f.setFromNormalAndCoplanarPoint(c,d),this.startInfo={startVectorProject:d.clone().projectOnVector(l),directionVector:l,plane:f},this.helperObject3D.showDraggingHelper([o]),this.hooks.emit("moveStart"),this.isDragging=!0,console.log("%c MoveController dragStart","color: #e5af2e")}dragging(e){if(!this.isDragging||!this.startInfo)return;const n=to(this.camera,e,this.container);return n?(console.log("%c RotateController dragging","color: #49de1b"),this.move(n),!1):this.dragEnd()}move(e){if(!this.startInfo)return this.dragEnd();const{plane:n,directionVector:o,startVectorProject:s}=this.startInfo,r=this.originObject3D,a=e.ray.intersectPlane(n,new I.Vector3);if(!a)return;const l=a.clone().projectOnVector(o),c=l.clone().sub(s),d=new I.Matrix4;d.setPosition(c),r.applyMatrix4(d),this.helperObject3D.applyMatrix4(d),s.copy(l),this.hooks.emit("positionUpdate",{matrix4:d})}dragEnd(){!this.isDragging||(console.log("%c MoveController dragEnd","color: #e94e4e"),this.startInfo=void 0,this.isDragging=!1,this.helperObject3D.show(),this.hooks.emit("moveEnd"))}}class lo{constructor(t,e,n,o){p(this,"helperController");p(this,"five");p(this,"onFiveWantsTapGesture",t=>{if(!this.helperController)return;const e=this.helperController.onWantsTapGesture(t);return this.five.needsRender=!0,e});p(this,"onFiveWantsGesture",(...t)=>{if(!this.helperController)return;const e=this.helperController.onWantsGesture(...t);return this.five.needsRender=!0,e});const{camera:s,model:r,scene:a}=t,l=t.getElement();if(this.five=t,!s||!r||!l||!a)return;const c=()=>{t.needsRender=!0};this.helperController=new e(s,r,n,o,l,a,c),t.on("wantsTapGesture",this.onFiveWantsTapGesture),t.on("wantsGesture",this.onFiveWantsGesture)}}const co="Object3DHelper@v1.0.1",Og=()=>{console.error(`${co} is disposed`)},Rg=()=>{console.warn(`${co} is disabled`)},Fg=()=>{console.error(`${co} is disabled`)};class Hg{constructor(t,e){p(this,"controllers",{});p(this,"state",{visible:!0,enabled:!0,disposed:!1});p(this,"hooks",new ln);p(this,"helpers");p(this,"eventListener",{});p(this,"handlePositionUpdate",(t,...e)=>{var s,r,a,l;const[n]=e,o=n==null?void 0:n.matrix4;o&&(t!==this.controllers.moveController&&((s=this.controllers.moveController)==null||s.applyHelperMatrix4(o)),t!==this.controllers.rotateController&&((r=this.controllers.rotateController)==null||r.applyHelperMatrix4(o)),t!==this.controllers.scaleController&&((a=this.controllers.scaleController)==null||a.applyHelperMatrix4(o)),(l=this.helpers.outlineHelper)==null||l.applyMatrix4(o))});p(this,"handleScaleUpdate",(t,...e)=>{var s,r;const[n]=e,o=n==null?void 0:n.matrix4;o&&((s=this.controllers.scaleController)==null||s.applyHelperScaleMatrix4(o,n),(r=this.helpers.outlineHelper)==null||r.scale.applyMatrix4(o))});p(this,"handleRotateUpdate",(t,...e)=>{var o,s,r,a;const[n]=e;if(n){const{quaternion:l,origin:c}=n;l&&(t!==this.controllers.moveController&&((o=this.controllers.moveController)==null||o.applyHelperQuaternion(l,c)),t!==this.controllers.rotateController&&((s=this.controllers.rotateController)==null||s.applyHelperQuaternion(l,c)),t!==this.controllers.scaleController&&((r=this.controllers.scaleController)==null||r.applyHelperQuaternion(l,c)),(a=this.helpers.outlineHelper)==null||a.applyQuaternion(l))}});t&&this.addControllers(t),this.helpers=e!=null?e:{},this.setState(this.state)}show(t){return Z(this,null,function*(){this.setState({visible:!0},t)})}hide(t){return Z(this,null,function*(){this.setState({visible:!1},t)})}enable(t){this.setState({enabled:!0},t)}disable(t){this.setState({enabled:!1},t)}dispose(){this.setState({disposed:!0})}setState(t,e){if(this.state.disposed)return Og();if(!this.state.enabled&&t.enabled!==!0&&t.disposed!==!0)return Fg();const n=W({},this.state);this.state=W(W({},this.state),t),t.disposed!==void 0&&t.disposed!==n.disposed&&t.disposed&&this.handleDispose(),t.visible!==void 0&&this.handleVisible(t.visible),t.enabled!==void 0&&this.handleEnable(t.enabled),this.hooks.emit("stateChange",{state:this.state,prevState:n})}addControllers(t){this.controllers=W(W({},this.controllers),t),this.addEventListener(),this.setState(this.state)}addHelpers(t){this.helpers=W(W({},this.helpers),t)}getCurrentState(){return this.state}addEventListener(){for(const t in this.controllers){if(!t)continue;const e=t;this.eventListener[e]||(this.eventListener[e]=(()=>{const n=this.controllers[e];if(!n)return;const o=()=>this.handleStart(n),s=()=>this.handleEnd(n),r=(...c)=>this.handlePositionUpdate(n,...c),a=(...c)=>this.handleRotateUpdate(n,...c),l=(...c)=>this.handleScaleUpdate(n,...c);return n.hooks.on("moveStart",o),n.hooks.on("rotateStart",o),n.hooks.on("scaleStart",o),n.hooks.on("positionUpdate",r),n.hooks.on("rotateUpdate",a),n.hooks.on("scaleUpdate",l),n.hooks.on("moveEnd",s),n.hooks.on("rotateEnd",s),n.hooks.on("scaleEnd",s),()=>{n.hooks.off("moveStart",o),n.hooks.off("rotateStart",o),n.hooks.off("scaleStart",o),n.hooks.off("positionUpdate",r),n.hooks.off("rotateUpdate",a),n.hooks.off("scaleUpdate",l),n.hooks.off("moveEnd",s),n.hooks.off("rotateEnd",s),n.hooks.off("scaleEnd",s)}})())}}handleEnd(t){t&&this.setOtherHelpersVisible(!0,t)}handleStart(t){t&&this.setOtherHelpersVisible(!1,t)}setOtherHelpersVisible(t,e){var n,o,s,r;t?((s=this.controllers.moveController)==null||s.helperObject3D.show(),(r=this.controllers.rotateController)==null||r.helperObject3D.show()):(e!==this.controllers.moveController&&((n=this.controllers.moveController)==null||n.helperObject3D.hide()),e!==this.controllers.rotateController&&((o=this.controllers.rotateController)==null||o.helperObject3D.hide()))}handleEnable(t,e=!0){t?(this.everyControllerDo(n=>{n.enable()}),this.hooks.emit("enable",{userAction:e})):(this.everyControllerDo(n=>{n.disable(),n.restoreOpacity()}),this.hooks.emit("disable",{userAction:e})),this.state.enabled=t}handleVisible(t,e=!0){t?(this.everyControllerDo(n=>{n.show()}),this.actionIfStateIsEnabled(()=>this.hooks.emit("show",{userAction:e}))):(this.everyControllerDo(n=>{n.hide(),n.restoreOpacity()}),this.actionIfStateIsEnabled(()=>this.hooks.emit("hide",{userAction:e}))),this.state.visible=t}everyControllerDo(t){Object.values(this.controllers).forEach(e=>{e&&t(e)})}handleDispose(){var t,e;Object.values(this.controllers).forEach(n=>{n==null||n.dispose(),n==null||n.restoreOpacity()});for(const n in this.controllers){if(!n)continue;const o=n;(e=(t=this.eventListener)[o])==null||e.call(t)}}actionIfStateIsEnabled(t,e){if(this.state.enabled)return t();e!=null&&e.warnLog&&Rg()}}class Gg extends ao{constructor(...e){super(...e);p(this,"startInfo");p(this,"lastRotation");p(this,"rotations",[]);p(this,"helperObject3DQuaternion",this.originObject3D.quaternion.clone());const n=this.helperObject3D;this.hoverListener([n.xyCircle,n.xzCircle,n.yzCircle]);const o=this.dragStart.bind(this),s=this.dragging.bind(this),r=this.dragEnd.bind(this);this.domEvents.addEventListener(this.helperObject3D,"mousedown",o),document.addEventListener("mousemove",s),document.addEventListener("mouseup",r)}initialHelperQuaternion(){this.helperObject3D.updateAngleHelperQuaternion(),this.helperObject3D.applyHelperQuaternion(this.originObject3D.quaternion)}dragStart(e){if(this.isDragging)return;const n=e==null?void 0:e.intersect;if(!n)return this.dragEnd();const o=(n==null?void 0:n.object).direction;if(!o)return this.dragEnd();this.helperObject3D.updateAngleHelperQuaternion();const s=n.point,r=this.originObject3D.position.clone(),a=this.getAngleHelper(o);this.setTipsAngle(0);const l=s.clone();l.y+=.2,this.setTipsPosition(l);const c=new I.Vector3(1,0,0).applyQuaternion(this.helperObject3DQuaternion),d=new I.Vector3(0,1,0).applyQuaternion(this.helperObject3DQuaternion),f=new I.Vector3(0,0,1).applyQuaternion(this.helperObject3DQuaternion),u=(()=>{switch(o){case"x":return c;case"y":return d;case"z":return f}})(),h=new I.Plane().setFromNormalAndCoplanarPoint(u,s),m=new I.Vector3;h.projectPoint(s.clone(),m);const g=m.clone().sub(r),v=g.clone(),A=g.angleTo(a.baseAxes);this.setAngleHelperStart(o,A),this.setAngleHelperLength(o,0),this.rotations.push({vector:g.clone(),direction:!0}),this.startInfo={direction:o,startVector:g,staticStartVector:v,plane:h,angleHelper:a},this.helperObject3D.showDraggingHelper([o]),this.hooks.emit("rotateStart"),this.isDragging=!0,console.log(`%c RotateController dragStart ${o}`,"color: #e5af2e")}dragging(e){var o;if(!this.isDragging)return;const n=to(this.camera,e,this.container);return n?(console.log(`%c RotateController dragging ${(o=this.startInfo)==null?void 0:o.direction}`,"color: #49de1b"),this.rotate(n),!1):this.dragEnd()}rotate(e){if(!this.startInfo)return this.dragEnd();const{startVector:n,plane:o,angleHelper:s,staticStartVector:r,direction:a}=this.startInfo,l=this.originObject3D,c=e.ray.intersectPlane(o,new I.Vector3);if(!c)return;const d=l.position.clone(),f=new I.Vector3;o.projectPoint(c.clone(),f);const u=f.clone().sub(d);if(n.angleTo(u)===0||(this.lastRotation===void 0&&(this.lastRotation={angle:0}),this.rotations.length===0))return;const h=(()=>{if(this.rotations.length===1)return u.angleTo(s.baseAxes)>r.angleTo(s.baseAxes);{const g=this.rotations[this.rotations.length-1],v=this.rotations[this.rotations.length-2],A=u.angleTo(v.vector),C=u.angleTo(g.vector),w=g.vector.angleTo(v.vector);if(w===0||C===0||A===0)return;if(A>C&&A>w)return g.direction;if(A<w&&C<w||A<C&&C>w)return!g.direction}})();if(h===void 0)return console.warn("rotationDirection is undefined");this.rotations.push({vector:u,direction:h}),this.rotations=this.rotations.slice(-2),this.lastRotation.angle=this.lastRotation.angle+u.angleTo(n)*(h?1:-1),this.setAngleHelperLength(a,this.lastRotation.angle),this.setTipsAngle(this.lastRotation.angle/Math.PI*180);const m=new I.Quaternion().setFromUnitVectors(n.clone().normalize(),u.clone().normalize());l.applyQuaternion(m),this.helperObject3D.applyHelperQuaternion(m),this.helperObject3DQuaternion.premultiply(m),this.hooks.emit("rotateUpdate",{quaternion:m,origin:d}),this.startInfo.startVector=u}dragEnd(){!this.isDragging||(console.log("%c RotateController dragEnd","color: #e94e4e"),this.startInfo=void 0,this.isDragging=!1,this.lastRotation=void 0,this.rotations=[],this.helperObject3D.show(),this.hooks.emit("rotateEnd"))}getAngleHelper(e){switch(e){case"x":return this.helperObject3D.xAngleHelper;case"y":return this.helperObject3D.yAngleHelper;case"z":return this.helperObject3D.zAngleHelper}}setAngleHelperStart(e,n){const o=this.getAngleHelper(e);if(o instanceof I.Mesh&&o.geometry instanceof I.CircleGeometry){const{radius:s,segments:r,thetaLength:a}=o.geometry.parameters;o.geometry=new I.CircleGeometry(s,r,n,a)}else console.warn("only support THREE.CircleGeometry")}setAngleHelperLength(e,n){const s=n>=0?Math.max(n,.001):Math.min(n,-.001),r=this.getAngleHelper(e);if(r instanceof I.Mesh&&r.geometry instanceof I.CircleGeometry){const{radius:a,thetaStart:l}=r.geometry.parameters,c=Math.ceil(Math.abs(s)*(40/(2*Math.PI)));r.geometry=new I.CircleGeometry(a,c,l,s)}else console.warn("only support THREE.CircleGeometry")}setTipsAngle(e){var o;const n=(o=this.helperObject3D.angleTips)==null?void 0:o.element;!n||(n.innerText=`${e.toFixed(0)}\xB0`)}setTipsPosition(e){const n=this.helperObject3D.angleTips;if(!n)return;const o=e.project(this.camera),{x:s,y:r,z:a}=o;if(a>1)return;const l=(s+1)/2*100+"%",c=(-r+1)/2*100+"%";n.setLeftTop(l,c)}}class Ng extends ao{constructor(...e){super(...e);p(this,"startInfo")}enable(){this.helperObject3D.enable(),super.enable()}disable(){this.helperObject3D.disable(),super.disable()}show(){this.helperObject3D.show(),super.show()}hide(){this.helperObject3D.hide(),super.hide()}getDragPlane(){const e=new I.Plane,n=this.helperObject3D.cornerPositions;if(n.length!==0)return n.length<3?e.setFromNormalAndCoplanarPoint(this.originObject3D.getWorldDirection(new H.Vector3),n[0]):e.setFromCoplanarPoints(n[0],n[1],n[2]),e}dragStart(e,n){var s,r;(r=(s=this.helperObject3D).updatePoints)==null||r.call(s);const o=this.getDragPlane();if(!o)return this.dragEnd();this.startInfo={startPoint:{position:n.position.clone(),direction:n.direction},plane:o},this.hooks.emit("scaleStart"),this.render(),this.isDragging=!0,console.log("%c RectangleScaleController dragStart","color: #e5af2e")}dragging(e){if(!this.isDragging)return;const n=to(this.camera,e,this.container);if(!n)return this.dragEnd();this.scale(n),console.log("%c RectangleScaleController dragging","color: #49de1b")}scale(e){var R,T;if(!this.startInfo)return;const n=this.originObject3D,{startPoint:o,plane:s}=this.startInfo,r=this.helperObject3D.cornerPositions;if(r.length<4)return this.dragEnd();const a=e.ray.intersectPlane(s,new H.Vector3);if(!a||Lg(a,this.camera.position))return;const l=new H.Vector3().addVectors(r[0],r[2]).divideScalar(2),{position:c,direction:d}=o,f=new H.Vector3().subVectors(r[1],r[0]),u=new H.Vector3().subVectors(r[3],r[0]),h=G=>{const U=new H.Vector3(0,0,0);if(!this.startInfo)return U;const P=(G==="ew"?f:u).clone(),S=c.clone().projectOnVector(P),j=a.clone().projectOnVector(P),N=l.clone().projectOnVector(P);if(j.equals(S))return U;if(G==="ns"&&typeof this.startInfo.dragPointInCenterBottom!="boolean"){const X=new H.Vector3().subVectors(j,N),V=X.x<0&&P.x>=0,ce=X.y<0&&P.y>=0,de=X.z<0&&P.z>=0;this.startInfo.dragPointInCenterBottom=V||ce||de}if(G==="ew"&&typeof this.startInfo.dragPointInCenterLeft!="boolean"){const X=new H.Vector3().subVectors(j,N),V=X.x<0&&P.x>=0,ce=X.y<0&&P.y>=0,de=X.z<0&&P.z>=0;this.startInfo.dragPointInCenterLeft=V||ce||de}const Y=new H.Vector3().subVectors(j,S),te=Y.length();return te>.3?(console.warn("offset.length() > 0.3, skipped",te),U):Y},m=h("ew"),g=h("ns"),v=()=>{const G=m;this.helperObject3D.cornerPositions.forEach((U,P)=>{var S;(S=this.startInfo)!=null&&S.dragPointInCenterLeft?(P===0||P===3)&&U.add(G):(P===1||P===2)&&U.add(G)})},A=()=>{const G=g;this.helperObject3D.cornerPositions.forEach((U,P)=>{var S;(S=this.startInfo)!=null&&S.dragPointInCenterBottom?(P===0||P===1)&&U.add(G):(P===2||P===3)&&U.add(G)})};switch(d){case"ew":v();break;case"ns":A();break;case"nesw":case"nwse":v(),A()}const C=new H.Vector3().subVectors(r[1],r[0]).length()/f.length(),w=new H.Vector3().subVectors(r[3],r[0]).length()/u.length(),E=new H.Vector3(C,w,1),D=new I.Matrix4().scale(E);n.isCSS3DObjectPlus?n.applyScaleMatrix4(D):n.scale.applyMatrix4(D),o.position.copy(a);const y=new H.Vector3().addVectors(r[0],r[2]).divideScalar(2),L=new H.Vector3().subVectors(y,l),x=new I.Matrix4().setPosition(L);n.applyMatrix4(x),(R=this.helperObject3D.css3DInstance)==null||R.css3DObject.applyMatrix4(x),(T=this.helperObject3D.plane)==null||T.applyMatrix4(x),this.hooks.emit("scaleUpdate",{matrix4:D,helperOrigin:l}),this.hooks.emit("positionUpdate",{matrix4:x}),this.render()}dragEnd(){!this.isDragging||(this.startInfo=void 0,this.isDragging=!1,this.hooks.emit("scaleEnd"),this.render(),console.log("%c RectangleScaleController dragEnd","color: #e94e4e"))}}class Wg extends Ng{constructor(...t){super(...t),this.addHTMLEventListener()}addHTMLEventListener(){this.helperObject3D.points.forEach(t=>{if(!t)return;const e=t.point,n=r=>this.dragStart(r,t),o=this.dragging.bind(this),s=this.dragEnd.bind(this);e.addEventListener("dragstart",n),e.addEventListener("drag",o),e.addEventListener("dragend",s)})}}const uo="v1.0.0",fo="Object3DHelperPlugin",fi=`${fo}@${uo}`,Xg=()=>{console.error(`${fi} is disposed`)},Yg=()=>{console.warn(`${fi} is disabled`)},Ug=()=>{console.error(`${fi} is disabled`)};class Ua extends Yn{constructor(e){super(e);p(this,"version",uo);p(this,"name",fo);p(this,"state",{visible:!0,enabled:!0,disposed:!1});p(this,"objectHelperMap",new Map);this.five=e,console.warn("Object3DHelper: \u4F7F\u7528\u6B64\u63D2\u4EF6\u9700\u8981\u5728\u521D\u59CB\u5316five\u65F6\uFF0C\u8BBE\u7F6Efive\u53C2\u6570: { backgroundAlpha: 0, backgroundColor: 0x000000 }"),Object.assign(window,{[`__${fo.toUpperCase()}_DEBUG__`]:this})}show(e){return Z(this,null,function*(){this.setState({visible:!0},e)})}hide(e){return Z(this,null,function*(){this.setState({visible:!1},e)})}enable(e){this.setState({enabled:!0},e)}disable(e){this.setState({enabled:!1},e)}dispose(){this.setState({disposed:!0})}setState(e,n){if(this.state.disposed)return Xg();if(!this.state.enabled&&e.enabled!==!0&&e.disposed!==!0)return Ug();const o=W({},this.state);this.state=W(W({},this.state),e),e.disposed!==void 0&&e.disposed!==o.disposed&&e.disposed&&this.handleDispose(),e.visible!==void 0&&e.visible!==o.visible&&this.handleVisible(e.visible),e.enabled!==void 0&&e.enabled!==o.enabled&&this.handleEnable(e.enabled),this.hooks.emit("stateChange",{state:this.state,prevState:o})}getObject3DHelper(e){return this.objectHelperMap.get(e)}addObject3DHelper(e,n={}){var d;if(!e)return console.error("Object3D is undefined");if(this.objectHelperMap.has(e)){console.warn(`Object3DHelperPlugin: object3D ${e.name} is already has helper`);return}const o=new Hg;this.objectHelperMap.set(e,o);const s=(d=this.five.getElement())==null?void 0:d.parentElement,r=this.five.camera,{moveHelper:a=!0,rotateHelper:l=!0,scaleHelper:c=!0}=n;if(a){const f=new Sg(e),u=new lo(this.five,Qg,e,f);o.addControllers({moveController:u.helperController})}if(l){let f;s&&r&&(f={container:s});const u=new jg(e,f),h=new lo(this.five,Gg,e,u);o.addControllers({rotateController:h.helperController})}if(c&&s){const f=new Tg(e,s,r,this.five.scene),u=new lo(this.five,Wg,e,f);o.addControllers({scaleController:u.helperController})}e.isCSS3DObjectPlus&&e.changeMode("behind",this.five.scene)}removeObject3DHelper(e){const n=this.objectHelperMap.get(e);!n||(e.isCSS3DObjectPlus&&e.changeMode("front"),this.objectHelperMap.delete(e),n.dispose())}handleEnable(e,n=!0){e?(this.everyHelperDo(o=>o.enable()),this.hooks.emit("enable",{userAction:n})):(this.everyHelperDo(o=>o.disable()),this.hooks.emit("disable",{userAction:n})),this.state.enabled=e}handleVisible(e,n=!0){e?(this.everyHelperDo(o=>o.show()),this.actionIfStateIsEnabled(()=>this.hooks.emit("show",{userAction:n}))):(this.everyHelperDo(o=>o.hide()),this.actionIfStateIsEnabled(()=>this.hooks.emit("hide",{userAction:n}))),this.state.visible=e}handleDispose(){this.everyHelperDo(e=>e.dispose())}everyHelperDo(e){this.objectHelperMap.forEach(n=>{n&&e(n)})}actionIfStateIsEnabled(e,n){if(this.state.enabled)return e();n!=null&&n.warnLog&&Yg()}}const Vg=i=>new Ua(i);class ho{constructor(t=0,e=0){p(this,"min");p(this,"max");p(this,"isInterval",!0);this.min=t,this.max=e}fromArray(t){return this.min=t[0],this.max=t[1],this}isOverlap(t){return Math.min(this.max,t.max)<Math.max(this.min,t.min)}contains(t){return this.min<t.min&&this.max>t.max}}class Jg{constructor(t,e){p(this,"min");p(this,"max");p(this,"xInterval");p(this,"yInterval");p(this,"isRectangle",!0);this.min=t,this.max=e,this.xInterval=new ho(this.min.x,this.max.x),this.yInterval=new ho(this.min.y,this.max.y)}isOverlapWithRectangle(t){return!this.xInterval.isOverlap(t.xInterval)&&!this.yInterval.isOverlap(t.yInterval)}containsRect(t){return this.xInterval.contains(t.xInterval)&&this.yInterval.contains(t.yInterval)}}function hi(i,t,e){const n=i[t],o=i[e];!n||!o||(i[t]=o,i[e]=n)}function Zg(i,t,e){const n=e/2;for(let o=1;o<=n;o++){const s=e-(o-1);for(let r=1;r<=t;r++){const a=(o-1)*t+r-1,l=(s-1)*t+r-1;hi(i,a*4+0,l*4+0),hi(i,a*4+1,l*4+1),hi(i,a*4+2,l*4+2),hi(i,a*4+3,l*4+3)}}}class Va{constructor(t,e){p(this,"width");p(this,"height");p(this,"containerDom");p(this,"hooks",new me.Subscribe);p(this,"canvas",document.createElement("canvas"));p(this,"five");p(this,"scale");p(this,"config");p(this,"offset",{x:0,y:0});p(this,"context");p(this,"renderCenter",new I.Vector3);p(this,"hammer");p(this,"state",{enabled:!1});p(this,"onPan",t=>{if(!this.containerDom||this.hooks.emit("wantsPanGesture",t))return;const n=this.offset.x+t.deltaX,o=this.offset.y+t.deltaY;this.canvas.style.boxShadow="0 2px 30px 0 rgba(0,0,0,0.20)",this.canvas.style.transform=`translate3d(${n}px, ${o}px, 100px)`});p(this,"onPanEnd",t=>{this.offset={x:this.offset.x+t.deltaX,y:this.offset.y+t.deltaY},this.canvas.style.boxShadow="none"});var o,s,r;if(!t.renderer)throw new Error("Five Render \u672A\u521D\u59CB\u5316");this.five=t,this.scale=(o=e==null?void 0:e.scale)!=null?o:2,this.width=(s=e==null?void 0:e.width)!=null?s:190,this.height=(r=e==null?void 0:e.height)!=null?r:190,this.config={dragEnabled:(e==null?void 0:e.dragEnabled)||!1,autoFixPCPosition:(e==null?void 0:e.autoFixPCPosition)||!1,initialPosition:(e==null?void 0:e.initialPosition)||{left:"0",top:"0"}};const n=this.canvas.getContext("2d");if(!n)throw new Error("CANNOT CREATE CONTEXT2D");this.context=n,this.config.dragEnabled&&(this.hammer=new sn.default(this.canvas),this.hammer.on("pan",this.onPan),this.hammer.on("panend",this.onPanEnd)),this.initStyle()}dispose(){var t;this.clear(),this.disable(),(t=this.hammer)==null||t.destroy()}enable(){var t;if(!this.state.enabled)return this.state.enabled=!0,(t=this.containerDom)==null||t.append(this.canvas),this}disable(){if(!!this.state.enabled)return this.state.enabled=!1,this.canvas.remove(),this}appendTo(t){var e;return this.containerDom&&((e=this.containerDom)==null||e.removeChild(this.canvas)),this.containerDom=t,this.state.enabled&&t.append(this.canvas),this}clear(){return this.context.clearRect(0,0,this.canvas.width,this.canvas.height),this}renderWithPoint(t){!this.containerDom||!this.state.enabled||(this.renderCenter=t,this.render(),this.config.autoFixPCPosition&&this.autoFixPCPosition())}autoFixPCPosition(){if(!this.containerDom)return;const{width:t,height:e}=this,n=this.renderCenter.clone().project(this.five.camera),o=(n.x+1)/2*this.containerDom.clientWidth,s=-(n.x-1)/2*this.containerDom.clientWidth,r=-(n.y-1)/2*this.containerDom.clientHeight;o<183?(this.canvas.style.top=-e/2+"px",this.canvas.style.left=90+"px"):r<183?(this.canvas.style.top=90+"px",this.canvas.style.left=-t/2+"px"):s<183?(this.canvas.style.top=-e/2+"px",this.canvas.style.left=-t-90+"px"):(this.canvas.style.left=-t/2+"px",this.canvas.style.top=-e-90+"px"),this.canvas.style.transform=`translate3d(${o}px, ${r}px, 10px)`,this.offset={x:o,y:r}}render(){if(!this.five.renderer||!this.containerDom)return;const{scale:t,context:e,width:n,height:o}=this,s=this.renderCenter.clone().project(this.five.camera),r=this.five.renderer.getSize(new I.Vector2),a=1,l=n/t,c=o/t,d=a*t,f=(s.x+1)/2*r.x,u=(s.y+1)/2*r.y,h=this.five.getPixels(f-l/2,u-l/2,l,c,d),m=Math.floor(n*a),g=Math.floor(o*a);Zg(h,m,g);const v=new ImageData(m,g);v.data.set(h),e.putImageData(v,0,0)}initStyle(){const t=this.canvas;t.classList.add("five-plugin__magnifier"),t.style.position="absolute",t.style.pointerEvents="all",t.style.borderRadius="50%",t.style.zIndex="99";const e=1;t.setAttribute("width",(this.width*e).toString()),t.setAttribute("height",(this.height*e).toString()),t.style.border="2px solid rgba(255,255,255,0.20)",t.style.width=this.width+"px",t.style.height=this.height+"px",t.style.top=this.config.initialPosition.top,t.style.left=this.config.initialPosition.left,t.style.transform="translate(0,0,100px)",this.config.dragEnabled&&(this.canvas.style.cursor="pointer")}}function _g(i,t){const{offsetWidth:e,offsetHeight:n}=t,{top:o,left:s}=t.getBoundingClientRect();return new I.Vector2().set((i.x-s)/e*2-1,-(i.y-o)/n*2+1)}function Ja(i,t){const{offsetWidth:e,offsetHeight:n}=t;return new I.Vector2().set(i.x/e*2-1,-i.y/n*2+1)}function qg(i,t){const e=i.getElement();if(!e)return;const n=Ja(t,e),o=new I.Raycaster;return o.setFromCamera(n,i.camera),o}function Kg(i,t){const{x:e,y:n}=t,o=e*2-1,s=n*2-1,r=new I.Vector2().fromArray([o,s]),a=new I.Raycaster;return a.setFromCamera(r,i.camera),i.model.intersectRaycaster(a)[0]}const $g="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAbYAAAGwCAYAAADFUEBtAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAABtqADAAQAAAABAAABsAAAAABTZ8U6AAAtiklEQVR4Ae2dAXJbSbJdp+d7AfYSHOGVeAPek5fkNXgLjviLmRkZl+CRbtc8UBKRRalZpyIesiorMx/eIcjb+QCh//Y3hwQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABC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lgCCBtCxjrdWt+GZH4sKC9cAjsJKGw76Vr7NAIRMkQrc8bVvH3EaSUggQECCtsAREtI4JVAC1u/p7YCemtvjXUtAQn8JAGF7SeBGS6BNwjkW0f+/rof8boaVx3dVZw+CUjgnQQUtneCM00CFwS6Y7vY/uqyY/uKwokE5gkobPNMrXguAd43i23x6u5t3TuXllcugU0EFLZNYC17JIGIVosbEPD1evWxp5WABJ4koLA9CdB0CRQBhI1u7apTq3CnEpDADgIK2w6q1jyVQH8wJKLGunnYqTUN5xLYQEBh2wDVkscSaNF6mf/xxx9fbuNm7vZYMl64BCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQn8NQn8fyHnyuSABiy2AAAAAElFTkSuQmCC",e0=`
|
|
547
547
|
varying vec2 vUv;
|
|
548
548
|
void main() {
|
|
549
549
|
vUv = uv;
|
|
@@ -558,4 +558,4 @@ void main() {
|
|
|
558
558
|
float match = 1.0 - uv.x;
|
|
559
559
|
gl_FragColor = vec4(1.0,1.0,1.0,match);
|
|
560
560
|
}
|
|
561
|
-
`;function n0(){const i=new I.PlaneGeometry(.4,.4),t=$g,e=new I.TextureLoader().load(t);e.encoding=I.sRGBEncoding;const n=new I.MeshBasicMaterial({map:e,transparent:!0,depthTest:!1});return new I.Mesh(i,n)}function i0(){const i=new I.CurvePath;i.add(new I.LineCurve3(new I.Vector3(0,0,0),new I.Vector3(0,0,.1)));const t=new I.TubeGeometry(i,8,.003),e=new I.ShaderMaterial({vertexShader:e0,fragmentShader:t0,depthTest:!1,transparent:!0});return new I.Mesh(t,e)}function o0(){const i=new I.SphereGeometry(.01,20,20),t=new I.MeshBasicMaterial({color:10349931,depthTest:!1,transparent:!0,side:I.DoubleSide}),e=new I.Mesh(i,t);return e.position.set(0,0,.1),e}class Za extends I.Object3D{constructor(){super();p(this,"planeMesh");p(this,"lineMesh");p(this,"ballMesh");this.planeMesh=n0(),this.lineMesh=i0(),this.ballMesh=o0(),this.add(this.planeMesh,this.lineMesh,this.ballMesh)}updateWithIntersect(e){if(!e.face)return;const n=new I.Vector3().addVectors(e.point,e.face.normal);this.position.copy(e.point),this.lookAt(n)}dispose(){var e;(e=this.planeMesh.material.map)==null||e.dispose()}}class _a{constructor(t){p(this,"five");p(this,"contentElement",document.createElement("div"));p(this,"animeIns");p(this,"container");p(this,"css3DObject");p(this,"disposeCss3DObject");p(this,"state",{enabled:!1});this.five=t;const n=.4/2,s=Wt(t).create3DDomContainer([[-n,n,0],[-n,-n,0],[n,-n,0],[n,n,0]].map(r=>new I.Vector3().fromArray(r)));if(s){const{container:r,dispose:a,css3DObject:l}=s;this.container=r,this.css3DObject=l,this.disposeCss3DObject=a}this.contentElement.style.width="100%",this.contentElement.style.height="100%",this.contentElement.style.backgroundImage=`url(${or})`,this.contentElement.style.backgroundSize="100%",this.contentElement.style.backgroundRepeat="no-repeat"}enable(){var t;this.state.enabled||(this.state.enabled=!0,(t=this.container)==null||t.appendChild(this.contentElement))}disable(){!this.state.enabled||(this.state.enabled=!1,this.contentElement.remove())}updateWithIntersect(t){if(!t.face||!this.css3DObject)return;const e=new I.Vector3().addVectors(t.point,t.face.normal);this.css3DObject.position.copy(t.point),this.css3DObject.lookAt(e),this.five.needsRender=!0}doAnimation(){var t;(t=this.animeIns)==null||t.dispose(),new Oi({progress:0}).to({progress:[1,0]}).duration(500).easing(yn.Easing.Quadratic.InOut).onUpdate(({progress:e})=>{}).play()}dispose(){var t;(t=this.disposeCss3DObject)==null||t.call(this)}}class s0{constructor(t,e){p(this,"five");p(this,"hooks",new me.Subscribe);p(this,"magnifier",null);p(this,"pointHelper",null);p(this,"pointDomHelper",null);p(this,"contentDom",document.createElement("div"));p(this,"state",{enabled:!1});p(this,"group",new I.Group);this.five=t,this.magnifier=(e==null?void 0:e.magnifier)===void 0?new Va(t,{dragEnabled:!0}):null,this.pointHelper=(e==null?void 0:e.pointHelper)===void 0?new Za:null,this.pointDomHelper=(e==null?void 0:e.pointDomHelper)===void 0?new _a(t):null,this.group.name="five-point-selector",this.five.scene.add(this.group),this.contentDom.classList.add("five-point-selector-content"),this.contentDom.style.position="absolute",this.contentDom.style.top="0",this.contentDom.style.left="0",this.contentDom.style.width="100%",this.contentDom.style.height="100%",this.contentDom.style.pointerEvents="none"}enable(){var t,e;this.state.enabled||(this.state.enabled=!0,this.pointHelper&&this.group.add(this.pointHelper),(t=this.magnifier)==null||t.enable(),(e=this.pointDomHelper)==null||e.enable(),this.five.needsRender=!0,this.hooks.emit("enabled"))}disable(){var t,e;!this.state.enabled||(this.state.enabled=!1,this.pointHelper&&this.group.remove(this.pointHelper),(t=this.magnifier)==null||t.disable(),(e=this.pointDomHelper)==null||e.disable(),this.hooks.emit("disabled"))}dispose(){this.hooks.off(),this.disable(),this.magnifier=null,this.pointHelper=null,this.pointDomHelper=null}updateWithIntersect(t){var s;this.hooks.emit("pointChanged",{panoIndex:this.five.getCurrentState().panoIndex,position:t.point.toArray(),normal:(s=t.face)==null?void 0:s.normal.toArray()});const e=this.magnifier;e&&e.renderWithPoint(t.point);const n=this.pointHelper;n&&n.updateWithIntersect(t);const o=this.pointDomHelper;o&&o.updateWithIntersect(t),this.five.needsRender=!0}}const r0=Object.freeze(Object.defineProperty({__proto__:null,Interval:ho,Rectangle:Jg,Magnifier:Va,getCoordsFromClient:_g,getCoordsFromElement:Ja,getRaycasterFromFivePointer:qg,getIntersectFromRelativePosition:Kg,PointHelper:Za,PointDomHelper:_a,FivePointSelector:s0,isNil:Xh,notNil:Qt,BetterTween:Oi,tweenProgress:Ms,nextFrame:
|
|
561
|
+
`;function n0(){const i=new I.PlaneGeometry(.4,.4),t=$g,e=new I.TextureLoader().load(t);e.encoding=I.sRGBEncoding;const n=new I.MeshBasicMaterial({map:e,transparent:!0,depthTest:!1});return new I.Mesh(i,n)}function i0(){const i=new I.CurvePath;i.add(new I.LineCurve3(new I.Vector3(0,0,0),new I.Vector3(0,0,.1)));const t=new I.TubeGeometry(i,8,.003),e=new I.ShaderMaterial({vertexShader:e0,fragmentShader:t0,depthTest:!1,transparent:!0});return new I.Mesh(t,e)}function o0(){const i=new I.SphereGeometry(.01,20,20),t=new I.MeshBasicMaterial({color:10349931,depthTest:!1,transparent:!0,side:I.DoubleSide}),e=new I.Mesh(i,t);return e.position.set(0,0,.1),e}class Za extends I.Object3D{constructor(){super();p(this,"planeMesh");p(this,"lineMesh");p(this,"ballMesh");this.planeMesh=n0(),this.lineMesh=i0(),this.ballMesh=o0(),this.add(this.planeMesh,this.lineMesh,this.ballMesh)}updateWithIntersect(e){if(!e.face)return;const n=new I.Vector3().addVectors(e.point,e.face.normal);this.position.copy(e.point),this.lookAt(n)}dispose(){var e;(e=this.planeMesh.material.map)==null||e.dispose()}}class _a{constructor(t){p(this,"five");p(this,"contentElement",document.createElement("div"));p(this,"animeIns");p(this,"container");p(this,"css3DObject");p(this,"disposeCss3DObject");p(this,"state",{enabled:!1});this.five=t;const n=.4/2,s=Wt(t).create3DDomContainer([[-n,n,0],[-n,-n,0],[n,-n,0],[n,n,0]].map(r=>new I.Vector3().fromArray(r)));if(s){const{container:r,dispose:a,css3DObject:l}=s;this.container=r,this.css3DObject=l,this.disposeCss3DObject=a}this.contentElement.style.width="100%",this.contentElement.style.height="100%",this.contentElement.style.backgroundImage=`url(${or})`,this.contentElement.style.backgroundSize="100%",this.contentElement.style.backgroundRepeat="no-repeat"}enable(){var t;this.state.enabled||(this.state.enabled=!0,(t=this.container)==null||t.appendChild(this.contentElement))}disable(){!this.state.enabled||(this.state.enabled=!1,this.contentElement.remove())}updateWithIntersect(t){if(!t.face||!this.css3DObject)return;const e=new I.Vector3().addVectors(t.point,t.face.normal);this.css3DObject.position.copy(t.point),this.css3DObject.lookAt(e),this.five.needsRender=!0}doAnimation(){var t;(t=this.animeIns)==null||t.dispose(),new Oi({progress:0}).to({progress:[1,0]}).duration(500).easing(yn.Easing.Quadratic.InOut).onUpdate(({progress:e})=>{}).play()}dispose(){var t;(t=this.disposeCss3DObject)==null||t.call(this)}}class s0{constructor(t,e){p(this,"five");p(this,"hooks",new me.Subscribe);p(this,"magnifier",null);p(this,"pointHelper",null);p(this,"pointDomHelper",null);p(this,"contentDom",document.createElement("div"));p(this,"state",{enabled:!1});p(this,"group",new I.Group);this.five=t,this.magnifier=(e==null?void 0:e.magnifier)===void 0?new Va(t,{dragEnabled:!0}):null,this.pointHelper=(e==null?void 0:e.pointHelper)===void 0?new Za:null,this.pointDomHelper=(e==null?void 0:e.pointDomHelper)===void 0?new _a(t):null,this.group.name="five-point-selector",this.five.scene.add(this.group),this.contentDom.classList.add("five-point-selector-content"),this.contentDom.style.position="absolute",this.contentDom.style.top="0",this.contentDom.style.left="0",this.contentDom.style.width="100%",this.contentDom.style.height="100%",this.contentDom.style.pointerEvents="none"}enable(){var t,e;this.state.enabled||(this.state.enabled=!0,this.pointHelper&&this.group.add(this.pointHelper),(t=this.magnifier)==null||t.enable(),(e=this.pointDomHelper)==null||e.enable(),this.five.needsRender=!0,this.hooks.emit("enabled"))}disable(){var t,e;!this.state.enabled||(this.state.enabled=!1,this.pointHelper&&this.group.remove(this.pointHelper),(t=this.magnifier)==null||t.disable(),(e=this.pointDomHelper)==null||e.disable(),this.hooks.emit("disabled"))}dispose(){this.hooks.off(),this.disable(),this.magnifier=null,this.pointHelper=null,this.pointDomHelper=null}updateWithIntersect(t){var s;this.hooks.emit("pointChanged",{panoIndex:this.five.getCurrentState().panoIndex,position:t.point.toArray(),normal:(s=t.face)==null?void 0:s.normal.toArray()});const e=this.magnifier;e&&e.renderWithPoint(t.point);const n=this.pointHelper;n&&n.updateWithIntersect(t);const o=this.pointDomHelper;o&&o.updateWithIntersect(t),this.five.needsRender=!0}}const r0=Object.freeze(Object.defineProperty({__proto__:null,Interval:ho,Rectangle:Jg,Magnifier:Va,getCoordsFromClient:_g,getCoordsFromElement:Ja,getRaycasterFromFivePointer:qg,getIntersectFromRelativePosition:Kg,PointHelper:Za,PointDomHelper:_a,FivePointSelector:s0,isNil:Xh,notNil:Qt,BetterTween:Oi,tweenProgress:Ms,nextFrame:Un,requestAnimationFrameInterval:Vn,getFrameTime:mu},Symbol.toStringTag,{value:"Module"}));J.CSS3DRenderPlugin=Wt,J.CameraMovementEffect=js,J.CameraMovementPlugin=vu,J.ContentType=Xe,J.CruisePlugin=$h,J.CruisePluginController=Zi,J.DIRECTION=$t,J.DISPLAY_STRATEGY_TYPE=Bt,J.DimensionType=Je,J.FLOOR_PLAN_ATTACHED_TO=pt,J.FLOOR_TYPE_MAP=ru,J.GuideLinePlugin=Lr,J.ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE=Tt,J.ItemLabelPlugin=Ih,J.LinkType=li,J.Magnifier=Ys,J.MapviewFloorplanPlugin=Rd,J.ModelChassisCompassPlugin=cu,J.ModelEntryDoorGuidePlugin=fu,J.ModelFloorplanPlugin=Bd,J.ModelItemLabelPlugin=oh,J.ModelRoomLabelPlugin=Ul,J.ModelTVVideoPlugin=ah,J.ModelViewPlugin=ul,J.Object3DHelperController=Ua,J.Object3DHelperPlugin=Vg,J.PLUGIN=fi,J.PaintBrush=dl,J.PaintBrushTypeEnum=st,J.PanoCompassPlugin=Fu,J.PanoCursorRaycasterPlugin=yl,J.PanoDoorLabelPlugin=Oh,J.PanoFloorplanRadarPlugin=ou,J.PanoMeasurePlugin=Mf,J.PanoRulerPlugin=Pu,J.PanoRulerProPlugin=Bu,J.PanoSpatialTagPlugin=Vf,J.PanoTagPlugin=Cg,J.PanoTagPluginController=Xa,J.PointType=We,J.ROOM_FETILE_TYPE_MAP=su,J.ROOM_TYPE_MAP=au,J.Rotation=et,J.TopviewFloorplanPlugin=Hd,J.Util=r0,J.VERSION=uo,J.itemLabelPluginServerParams=Eh,J.modelItemLabelPluginServerParams=sh,J.modelRoomLabelPluginServerParams=Vl,J.pluginFlag=wg,Object.defineProperties(J,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|