@realsee/dnalogel 2.5.2 → 2.5.4-dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +7 -7
- package/dist/index.js +265 -265
- package/dist/index.umd.js +4 -4
- package/dist/shared-utils/audio.d.ts +0 -1
- package/docs/classes/CSS3DRender.html +31 -31
- package/docs/classes/CruisePluginController.html +24 -24
- package/docs/classes/Magnifier.html +20 -20
- package/docs/classes/ModelRoomLabelController.html +11 -11
- package/docs/classes/Object3DHelperController.html +24 -24
- package/docs/classes/PaintBrush.html +15 -15
- package/docs/classes/PanoMeasurePluginLine.html +23 -23
- package/docs/classes/PanoMeasurePluginModel.html +22 -22
- package/docs/classes/PanoMeasurePluginPoint.html +14 -14
- package/docs/classes/PanoMeasurePluginPolyline.html +26 -26
- package/docs/classes/PanoTagPluginController.html +41 -41
- 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 +16 -16
- 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/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/AddTagConfig.html +6 -6
- package/docs/interfaces/CSS3DRenderPluginEventMap.html +11 -11
- package/docs/interfaces/CSS3DRenderPluginState.html +8 -8
- package/docs/interfaces/CameraMovementPluginExportType.html +7 -7
- package/docs/interfaces/EventMap.html +15 -15
- 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/MinMax.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 +11 -11
- package/docs/interfaces/Object3DHelperState.html +8 -8
- 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 +12 -12
- package/docs/interfaces/PanoMeasurePluginLineJson.html +8 -8
- package/docs/interfaces/PanoMeasurePluginOpenParameter.html +7 -7
- package/docs/interfaces/PanoMeasurePluginPointJson.html +7 -7
- package/docs/interfaces/PanoMeasurePluginPolylineJson.html +8 -8
- 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/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/State.html +8 -8
- package/docs/interfaces/TagCache.html +10 -10
- package/docs/interfaces/TagConfig.html +10 -10
- package/docs/interfaces/TagIconUrl.html +9 -9
- package/docs/interfaces/Tags.html +9 -9
- package/docs/interfaces/TemporaryState.html +6 -6
- 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/AudioAppearance.html +5 -5
- package/docs/types/AudioTagTypeConfigKey.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/ContentTypeConfigKeySplit.html +5 -5
- package/docs/types/ContentTypeMap.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/LoadTagConfig.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/MediaStore.html +5 -5
- package/docs/types/ModelEntryDoorGuidePluginParameterType.html +5 -5
- 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/PanoIndex.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/PlaneTagElement.html +5 -5
- package/docs/types/Point2DElement.html +5 -5
- package/docs/types/Point2DTag.html +5 -5
- package/docs/types/Point3DElement.html +5 -5
- package/docs/types/Point3DTag.html +5 -5
- package/docs/types/PointTag.html +5 -5
- package/docs/types/PointTagElement.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/StickType.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/TagContentType.html +5 -5
- package/docs/types/TagDimensionType.html +5 -5
- package/docs/types/TagElement.html +5 -5
- package/docs/types/TagEvents.html +5 -5
- package/docs/types/TagHooks.html +5 -5
- package/docs/types/TagIconSize.html +5 -5
- package/docs/types/TagId.html +5 -5
- package/docs/types/TagPointType.html +5 -5
- package/docs/types/TopviewFloorplanPluginParameterType.html +5 -5
- package/docs/types/TopviewFloorplanPluginReturnType.html +5 -5
- package/docs/types/WorkCode.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/PanoTagPlugin/Components/TagContainer.js +17 -17
- package/libs/PanoTagPlugin/controller/index.js +1 -1
- package/libs/PanoTagPlugin/mocks/v1/mock-80P6A03eQRQKY3oqLj.d.ts +4 -0
- package/libs/PanoTagPlugin/mocks/v1/mock-80P6A03eQRQKY3oqLj.js +6 -0
- package/libs/PanoTagPlugin/mocks/v1/mock-80QG2vMPboNv5DWrom.d.ts +93 -0
- package/libs/PanoTagPlugin/mocks/v1/mock-80QG2vMPboNv5DWrom.js +5622 -0
- package/libs/PanoTagPlugin/mocks/v1/mock-test3-realsee-cn-4zr0A5.js +1325 -0
- package/libs/PanoTagPlugin/mocks/v1/mock1.d.ts +173 -0
- package/libs/PanoTagPlugin/mocks/v1/mock1.js +122 -0
- package/libs/PanoTagPlugin/mocks/v1/mock2.d.ts +233 -0
- package/libs/PanoTagPlugin/mocks/v1/mock2.js +296 -0
- package/libs/PanoTagPlugin/mocks/v1/mock3.d.ts +22 -0
- package/libs/PanoTagPlugin/mocks/v1/mock3.js +32 -0
- package/libs/PanoTagPlugin/mocks/v1/mock4.d.ts +56 -0
- package/libs/PanoTagPlugin/mocks/v1/mock4.js +60 -0
- package/libs/PanoTagPlugin/mocks/v1/mock5.d.ts +13 -0
- package/libs/PanoTagPlugin/mocks/v1/mock5.js +17 -0
- package/libs/PanoTagPlugin/mocks/v1/mock6.d.ts +16 -0
- package/libs/PanoTagPlugin/mocks/v1/mock6.js +27 -0
- package/libs/PanoTagPlugin/mocks/v1/mock7.d.ts +22 -0
- package/libs/PanoTagPlugin/mocks/v1/mock7.js +228 -0
- package/libs/shared-utils/audio.d.ts +0 -1
- package/libs/shared-utils/audio.js +52 -52
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -98,12 +98,12 @@ transition: all 500ms;
|
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
</style>
|
|
101
|
-
`;class Wl extends Gl{constructor(e){super();m(this,"configs");m(this,"clientWidth");m(this,"clientHeight");m(this,"ready",!1);m(this,"uuid",He());m(this,"tween");m(this,"tweening",!1);m(this,"container");m(this,"canvas");m(this,"data",{});m(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=Nl,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:et.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:et.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 p=this.color||"#ff0000";n.strokeStyle=p,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=vn({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(vn({x:u,y:h},this.clientWidth,this.clientHeight)),r.length<3))return;const{control:p,end:A}=bn(r);!p||!A||(d(s,p,A),s=A)},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),jn(()=>{this.emitStateChange({type:et.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=vn({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(vn({x:u,y:h},this.clientWidth,this.clientHeight)),r.length<3))return;const{control:p,end:A}=bn(r);!p||!A||(d(s,p,A),s=A)},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),jn(()=>{this.emitStateChange({type:et.Drawline,color:this.color,ready:this.ready,state:h,uuid:this.uuid})})}}emitStateChange(e,n=!0){if(e.type!==et.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};Rl(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 et.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 et.Undo:this.handleUndo(s);break}}handleDrawLine(e,n,{withUndo:o=!1},s=Kr){!n||Object.prototype.toString.call(n)!="[object Object]"||Object.keys(n).length===0||(console.log("handleDrawLine",n,n.line),Ql(()=>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=Ai(n.move||{},this.clientWidth,this.clientHeight);let h=[u];if(a.strokeStyle=c,a.beginPath(),a.moveTo(u.x,u.y),d&&!o){let p=[];const A=this;A.tween=Hl({step:0},{step:l.length-1},d).onUpdate(({step:g})=>{var w;if(A.tweening=!0,!A.ready)return a.clearRect(0,0,A.canvas[f].width,A.canvas[f].height),(w=A.tween)==null?void 0:w.stop();const v=Math.floor(g);if(!p.find(y=>y===v)){if(p.push(v),console.log("__debug__",l,l[v],v),h.push(Ai(l[v],A.clientWidth,A.clientHeight)),h.length<3)return;const{control:y,end:P}=bn(h);if(!y||!P)return;a.quadraticCurveTo(y.x,y.y,P.x,P.y),a.stroke()}}).onComplete(g=>{A.tween=void 0,A.tweening=!1,p=[],h=[],s&&s(),r()})}else{for(let p=0;p<l.length;p++){if(h.push(Ai(l[p],this.clientWidth,this.clientHeight)),h.length<3)continue;const{control:A,end:g}=bn(h);!A||!g||a.quadraticCurveTo(A.x,A.y,g.x,g.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(),jn(n,60);return}n()}destroyBrush(){this.closeBrush(),this.ready=!1,this.emit("readyChange",!0)}}class _l{constructor(t={}){m(this,"controller");const e=Object.assign({currentColor:"#f44336",onUndoText:"\u56DE\u9000",onExitText:"\u5173\u95ED"},t);this.controller=new Wl(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 Xl=(i,t)=>{var X,j;let e=(j=(X=t==null?void 0:t.initialState)==null?void 0:X.enabled)!=null?j:!0,n=!1,o=!0,s=null;const a=G(G({},{lookAtCurrentCamera:!1,lockedPanoIndex:null,lockedLatitude:null,lockedLongitude:null}),t==null?void 0:t.config),l=new x.Scene,c=new be.Camera(60);let d=new x.Object3D,f,u;{const E=new x.DirectionalLight(16777215,.5);E.position.copy(new x.Vector3(1,1,1)),l.add(E)}{const E=new x.DirectionalLight(16777215,.3);l.add(E)}{const E=new x.AmbientLight(16777215,.3);l.add(E)}l.add(d);const h=()=>{if(n)return;f=I(i.model,c.fov,c.aspect),u=i.model.bounding.getCenter(new x.Vector3),l.remove(d),d=R(i.model),l.add(d),n=!0,L();function E(O){const W=O.clone();return W.uniforms.modelAlpha.value=1,W.uniforms.map.value&&(W.uniforms.map.value.needsUpdate=!0),W}function R(O){if(O instanceof x.Mesh){const W=O.geometry,U=Array.isArray(O.material)?O.material.map(E):E(O.material);return new x.Mesh(W,U)}else if(O instanceof x.Group){const W=new x.Group;return O.children.forEach(U=>W.add(R(U))),W}else{const W=new x.Object3D;return O.children.forEach(U=>W.add(R(U))),W}}},p=()=>{if(!!i.renderer)return s||(s=new x.WebGLRenderer({antialias:!1,alpha:!0}),s.setPixelRatio(i.renderer.getPixelRatio()),s.outputEncoding=x.sRGBEncoding,s.setClearColor(1579548,0),s.autoClear=!0),s},A=()=>{d.traverse(E=>{E instanceof x.Mesh&&[].concat(E.material).forEach(O=>O.dispose())}),l.remove(d),d=new x.Object3D,l.add(d),n=!1,L()},g=()=>{!e||n||h()},v=()=>{e||(e=!0,l.add(d),!n&&i.model.loaded&&h(),L())},w=()=>{!e||(l.remove(d),o=!0,D(),e=!1)},y=(E,R={})=>{const O=p();if(!O)return;E.appendChild(O.domElement),P(R);const W=window.getComputedStyle(E).position;W!=="relative"&&W!=="absolute"&&W!=="fixed"&&W!=="sticky"&&(E.style.position="relative")},P=(E={})=>{if(!s)return;const O=s.domElement.parentNode;if(O!=null&&O.nodeName){const{width:W=O.offsetWidth,height:U=O.offsetHeight}=E;s.setSize(W,U),c.aspect=W/U,c.updateProjectionMatrix()}L()};function I(E,R,O){const W=E.bounding,U=Math.pow(Math.pow(W.max.x-W.min.x+1,2)+Math.pow(W.max.y-W.min.y+1,2)+Math.pow(W.max.z-W.min.z+1,2),1/2);let _=U/2/Math.tan(Math.PI*R/360);return O<1&&(_=_/O),isNaN(_)?U:_}function C(E){return i.work.observers[E].standingPosition.clone()}const L=()=>{if(!e||!f||!u)return;const E=i.getPose();E.fov=c.fov,E.offset=u,E.distance=f,typeof a.lockedLatitude=="number"&&(E.latitude=a.lockedLatitude),typeof a.lockedLongitude=="number"&&(E.longitude=a.lockedLongitude),typeof a.lockedPanoIndex=="number"&&(E.offset=C(a.lockedPanoIndex)),a.lookAtCurrentCamera&&(E.offset=i.camera.position.clone().setY(i.camera.position.y+1)),c.setFromPose(E),o=!0},D=()=>{!e||o!==!0||!s||!s.domElement.parentNode||s.domElement.parentNode.offsetWidth===0||(s.render(l,c),o=!1)},B=()=>{s&&s.dispose(),s=null},N=E=>{Object.assign(a,E),L()},F=()=>({enabled:e});return Object.assign(window,{camera:c}),i.on("modelLoaded",g),i.on("modelWillLoad",A),i.on("cameraDirectionUpdate",L),i.on("dispose",B),i.on("renderFrame",D),i.on("cameraPositionUpdate",L),{appendTo:y,refresh:P,changeConfigs:N,enable:v,disable:w,getCurrentState:F}};function vt(...i){const t=[];return i.forEach(e=>{e.isCSS3DObjectPlus?t.push(e):t.push(...vt(...e.children))}),t}function Gn(i,t){const e=Math.round(i);return e%2===0?e:e+Number(t!=null&&t.floor?-1:1)}function Yl(i,t,e=!0){if(!i)return console.error("createResizeObserver: element is undefined"),{observe:()=>{},unobserve:()=>{}};const n=()=>{const s=Gn(i.clientWidth,{floor:!0}),r=Gn(i.clientHeight,{floor:!0});t(s,r)};if(typeof ResizeObserver=="undefined"||!ResizeObserver)return console.warn("createResizeObserver: ResizeObserver is undefined"),{observe:()=>n(),unobserve:()=>{}};const o=new ResizeObserver(n);return e&&n(),{observe:()=>o.observe(i),unobserve:()=>o.unobserve(i)}}class ko extends Fn.CSS3DRenderer{constructor(){super();m(this,"wrapper");m(this,"requestAnimationFrameId");m(this,"resizeDisoper");this.domElement.style.position="absolute",this.domElement.style.top="0",this.domElement.style.left="0",this.domElement.style.userSelect="none",this.domElement.style.pointerEvents="none"}setWrapper(e){if(!e)throw new Error("CSS3DRenderer: wrapper is required");if(e.contains(this.domElement))return;const n=this.wrapper;return n&&n.contains(this.domElement)&&this.domElement.remove(),this.appendToElement(e),this.wrapper=e,this}appendToElement(e){e.appendChild(this.domElement);const n=(r,a)=>this.setSize(r,a),{observe:o,unobserve:s}=Yl(e,n,!0);o(),this.resizeDisoper=s,this.wrapper=e}renderEveryFrame(e,n){if(this.wrapper||console.warn("wrapper is not find, creating a html element and call setWrapper(wrapper)",this,e),this.requestAnimationFrameId)return console.warn("CSS3DRenderer: render is running");const o=()=>{this.requestAnimationFrameId=requestAnimationFrame(o),!!e.visible&&vt(e).length!==0&&this.render(e,n)};o()}stopRender(){this.requestAnimationFrameId&&cancelAnimationFrame(this.requestAnimationFrameId)}dispose(){var e;this.stopRender(),(e=this.resizeDisoper)==null||e.call(this),this.domElement.remove()}}function Ul(i){return typeof Symbol=="undefined"?`$Symbol<${i}>$`:Symbol(i)}const dn=Ul("$$EVENT$$");function wn(i){return i[dn]||(i[dn]={}),i[dn]}function Jl(i){i[dn]||delete i[dn]}class $t{hasListener(t){const e=wn(this);return Boolean((e==null?void 0:e[t])&&e[t].length>0)}on(t,e,n){const o=wn(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){Jl(this);return}const n=wn(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=wn(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 $r(...i){const t=new H.Vector3;return i.forEach(e=>{t.add(e)}),t.divideScalar(i.length),t}const Zl=({x:i,y:t,z:e})=>new H.Vector3(i,t,e),nt=i=>new H.Vector3().fromArray(i),hn=i=>i instanceof H.Vector3?i:Array.isArray(i)?nt(i):Zl(i);class ql extends x.Mesh{constructor(e,n){const o=new x.MeshBasicMaterial({opacity:0,color:0,transparent:!1,side:x.DoubleSide}),s=new x.PlaneGeometry(e,n);super(s,o);m(this,"name","opacity-mesh")}removeFromParent(){const e=this.parent;return e!==null&&e.remove(this),this}}const ea=1,Kl=`CSS3DObjectPlus@${ea}`,$l=.00216,ec=.003;class ta extends Fn.CSS3DObject{constructor(e){var I,C,L;const n=e.container,o=e.cornerPoints,s=(I=e.ratio)!=null?I:ec,r=(C=e.dpr)!=null?C:1,a=(L=e.pointerEvents)!=null?L:"auto",l=Math.max($l,s),c=o[0].distanceTo(o[1]),d=o[1].distanceTo(o[2]),f=Gn(c/s*r),u=Gn(d/s*r),h=$r(...o);let p;if(l===s)n.style.width=`${f}px`,n.style.height=`${u}px`,p=n;else{const D=document.createElement("div");D.style.width=`${f}px`,D.style.height=`${u}px`,D.style.pointerEvents="none";const B=s/l;n.style.position="absolute",n.style.left="0",n.style.top="0",n.style.width=`${B*f}px`,n.style.height=`${B*u}px`,D.appendChild(n),p=D}super(p);m(this,"version",ea);m(this,"isCSS3DObjectPlus",!0);m(this,"container");m(this,"width");m(this,"height");m(this,"domWidthPx");m(this,"domHeightPx");m(this,"cornerPoints");m(this,"centerPosition");m(this,"ratio");m(this,"mode","front");m(this,"hooks",new $t);m(this,"opacityMesh");m(this,"selfVisible",!0);m(this,"parentVisibleListenerDisposer");m(this,"createOpacityMesh",e=>{const{domWidthPx:n,domHeightPx:o}=e,s=new ql(n,o);return s.position.copy(e.position),s.rotation.copy(e.rotation),s.scale.copy(e.scale),s});m(this,"addParentVisibleListener",()=>{var e;if((e=this.parent)!=null&&e.isCSS3DGroup){const n=this.parent,o=s=>{this.setVisible(s&&this.selfVisible,{setSelfVisible:!1})};n.hooks.on("visibleChange",o),this.parentVisibleListenerDisposer=()=>n.hooks.off("visibleChange",o)}});m(this,"removeParentVisibleListener",()=>{var e;(e=this.parentVisibleListenerDisposer)==null||e.call(this)});if(n.style.pointerEvents=a,this.scale.set(l,l,l),this.cornerPoints=o,this.ratio=s,this.container=n,e.mode&&(this.mode=e.mode),l===s)this.width=c,this.height=d,this.domWidthPx=f,this.domHeightPx=u,this.centerPosition=h;else{const D=s/l;this.width=D*c,this.height=D*d,this.domWidthPx=D*f,this.domHeightPx=D*u,this.centerPosition=new H.Vector3().subVectors(h,o[0]).multiplyScalar(D).add(o[0])}n.classList.add(`${Kl}__container`);const A=new H.Vector3().subVectors(o[1],o[0]),g=new H.Vector3().subVectors(o[3],o[0]),v=new H.Vector3().crossVectors(A,g).normalize();this.lookAt(v);const w=this.up.clone().applyQuaternion(this.quaternion),y=g.clone(),P=new H.Vector3().crossVectors(w,y).normalize();this.rotateOnWorldAxis(P,w.angleTo(y)),this.position.copy(h),this.addEventListener("added",()=>{var D;this.mode==="front"&&((D=this.opacityMesh)==null||D.removeFromParent()),this.addParentVisibleListener()}),this.addEventListener("removed",()=>{var D;(D=this.opacityMesh)==null||D.removeFromParent(),this.removeParentVisibleListener()})}setVisible(e,n={setSelfVisible:!0}){n.setSelfVisible&&(this.selfVisible=e),this.visible=e,this.opacityMesh&&(this.opacityMesh.visible=e)}removeFromParent(){var n;const e=this.parent;return e!==null&&e.remove(this),(n=this.opacityMesh)==null||n.removeFromParent(),this}removeOpacityMesh(){var e;return(e=this.opacityMesh)==null||e.removeFromParent(),this.opacityMesh=void 0,this}dispose(){var e;this.container.remove(),this.removeFromParent(),(e=this.opacityMesh)==null||e.removeFromParent()}getOpacityMesh(){if(this.opacityMesh)return this.opacityMesh;{const e=this.createOpacityMesh(this);return this.opacityMesh=e,e}}applyMatrix4(e){var n;super.applyMatrix4(e),(n=this.opacityMesh)==null||n.applyMatrix4(e)}applyQuaternion(e){var n;return super.applyQuaternion(e),(n=this.opacityMesh)==null||n.applyQuaternion(e),this}applyScaleMatrix4(e){var n;this.scale.applyMatrix4(e),(n=this.opacityMesh)==null||n.scale.applyMatrix4(e)}}class tc extends x.Scene{constructor(){super()}add(...t){return super.add(...t),vt(...t).forEach(e=>{e.mode="front"}),this}}class nc extends x.Scene{constructor(e){super();m(this,"scene");if(!e)throw new Error("CSS3DBehindScene: scene is required");this.scene=e}add(...e){return super.add(...e),vt(...e).forEach(n=>{n.mode="behind",this.scene.add(n.getOpacityMesh())}),this}remove(...e){return vt(...e).forEach(n=>{var o;(o=n.opacityMesh)==null||o.removeFromParent()}),super.remove(...e),this}}class na extends x.Group{constructor(e){super();m(this,"isCSS3DGroup",!0);m(this,"mode");m(this,"CSS3DObjectLength",0);m(this,"hooks",new $t);this.mode=e}add(...e){return vt(...e).forEach(n=>{n.mode=this.mode}),super.add(...e),this.updateLength(),this}setVisible(e){this.visible=e,this.hooks.emit("visibleChange",e)}remove(...e){return super.remove(...e),this.updateLength(),this}updateLength(){this.CSS3DObjectLength=vt(this).length}}class ic extends na{constructor(){super("front")}}class oc extends na{constructor(e){super("behind");m(this,"scene");if(!e)throw new Error("CSS3DBehindScene: scene is required");this.scene=e}add(...e){return vt(...e).forEach(n=>{this.scene.add(n.getOpacityMesh())}),super.add(...e),this}}const sc=3,Vi="CSS3DRenderer",an=`${Vi}@${sc}`,Nt=()=>{console.error(`${an} is disposed`)},ke={css3DObjects:[],frontModeStore:{css3DRenderer:new ko},behindModeStore:{css3DRenderer:new ko}};function xo(i){return ke.css3DObjects.find(t=>t.id===i)}function rc(i){ke.frontModeStore.css3DRenderer.setWrapper(i)}function ac(i){ke.behindModeStore.css3DRenderer.setWrapper(i)}class Zt{constructor(t){m(this,"hooks",new $t);m(this,"state",{enabled:!0,visible:!0,disposed:!1});m(this,"_scene");m(this,"store",{frontModeGroup:new ic});m(this,"create3DElement",(t,e,n)=>{if(this.state.disposed)return Nt();const o=(()=>{const y={ratio:.00216,devicePixelRatio:1,mode:"front",autoRender:!0,container:document.createElement("div"),pointerEvents:"none"};return Object.assign(y,n)})(),s=e.map(hn);if((s==null?void 0:s.length)<4)return console.error(`${an}: requires 4 point but params may have fewer`);const{ratio:r,devicePixelRatio:a,mode:l,autoRender:c,container:d,pointerEvents:f}=o,u=this.createObject(s,{ratio:r,dpr:a,container:d,mode:l,pointerEvents:f});ke.css3DObjects.push(u),o.scene&&this.setScene(o.scene);const h=()=>{const y=u.mode==="front"?this.getFrontCSS3DObjectGroup():this.getBehindCSS3DObjectGroup();!y||y.add(u)},p=()=>{h(),this.render(t)},A=y=>this.setVisibleById(u.id,y),g=y=>this.setEnabledById(u.id,y),v=()=>(u.removeFromParent(),!0),w=l==="front"?ke.frontModeStore.css3DRenderer:ke.behindModeStore.css3DRenderer;return c&&p(),{id:u.uuid,container:d,css3DObject:u,render:c?void 0:p,show:()=>A(!0),hide:()=>A(!1),setVisible:A,enable:()=>g(!0),disable:()=>g(!1),setEnabled:g,dispose:v,appendToElement:y=>w.setWrapper(y)}});m(this,"setVisibleById",(t,e)=>{var n;(n=xo(t))==null||n.setVisible(e)});m(this,"setEnabledById",(t,e)=>{const n=xo(t);if(!n)return;const o=n.mode==="front"?this.getFrontCSS3DObjectGroup({addGroupIfNotExists:!1}):this.getBehindCSS3DObjectGroup({addGroupIfNotExists:!1});!o||(e?o.add(n):o.remove(n))});m(this,"createObject",(t,e)=>{const n=new ta(G({cornerPoints:t},e));return n.element.classList.add(`${Vi}__container`),n.element.id=`${Vi}__container--${n.uuid}`,n});t&&this.setScene(t)}get scene(){return this._scene||console.error("scene doesn't exist!, please call setScene(scene) first"),this._scene}static get frontModeCSS3DRenderer(){return ke.frontModeStore.css3DRenderer}static get behindModeCSS3DRenderer(){return ke.behindModeStore.css3DRenderer}get frontModeCSS3DRenderer(){return ke.frontModeStore.css3DRenderer}get behindModeCSS3DRenderer(){return ke.behindModeStore.css3DRenderer}setScene(t){this._scene=t}getCurrentState(){return this.state}setState(t,e={userAction:!0}){if(this.state.disposed)return Nt();const n=G({},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()),n.disposed!==this.state.disposed&&this.handleDispose(),this.hooks.emit("stateChange",{state:this.state,prevState:n,userAction:e.userAction})}dispose(){this.setState({disposed:!0}),this.hooks.emit("dispose")}show(){return Y(this,arguments,function*({userAction:t}={userAction:!0}){if(this.state.disposed)return Nt();this.setState({visible:!0},{userAction:t}),this.hooks.emit("show",{userAction:t})})}hide(){return Y(this,arguments,function*({userAction:t}={userAction:!0}){if(this.state.disposed)return Nt();this.setState({visible:!1},{userAction:t}),this.hooks.emit("hide",{userAction:t})})}enable({userAction:t}={userAction:!0}){if(this.state.disposed)return Nt();this.setState({enabled:!0},{userAction:t}),this.hooks.emit("enable",{userAction:t})}disable({userAction:t}={userAction:!0}){if(this.state.disposed)return Nt();this.setState({enabled:!1},{userAction:t}),this.hooks.emit("disable",{userAction:t})}getFrontCSS3DScene({createSceneIfNotExists:t=!1}={}){var n;const e=(n=ke.frontModeStore)==null?void 0:n.css3DScene;if(e)return e;if(t){const o=new tc;ke.frontModeStore.css3DScene=o}return ke.frontModeStore.css3DScene}getBehindCSS3DScene({createSceneIfNotExists:t=!1}={}){var n,o;const e=(n=ke.behindModeStore)==null?void 0:n.css3DScene;if(e)return e;if(t){const s=(o=ke.behindModeStore.scene)!=null?o:this.scene;if(!s){console.error(`${an}: scene is required when mode is behind`);return}const r=new nc(s);ke.behindModeStore.css3DScene=r,ke.behindModeStore.scene=s}return ke.behindModeStore.css3DScene}getFrontCSS3DObjectGroup({addGroupIfNotExists:t=!0}={}){const e=this.getFrontCSS3DScene({createSceneIfNotExists:t});return t&&e&&(e.getObjectById(this.store.frontModeGroup.id)||e.add(this.store.frontModeGroup)),this.store.frontModeGroup}getBehindCSS3DObjectGroup({addGroupIfNotExists:t=!0}={}){var n;const e=this.getBehindCSS3DScene({createSceneIfNotExists:t});if(t&&e&&this.scene){const o=(n=this.store.behindModeGroup)!=null?n:new oc(this.scene);this.store.behindModeGroup=o,e.getObjectById(o.id)||e.add(o)}return this.store.behindModeGroup}render(t){var e,n;if(this.getFrontCSS3DObjectGroup({addGroupIfNotExists:!1}).CSS3DObjectLength>0){const o=this.getFrontCSS3DScene({createSceneIfNotExists:!0});if(!o)return console.error(`${an}: css3DScene is required when mode is front`);ke.frontModeStore.css3DRenderer.renderEveryFrame(o,t)}if(((n=(e=this.getBehindCSS3DObjectGroup({addGroupIfNotExists:!1}))==null?void 0:e.CSS3DObjectLength)!=null?n:0)>0){const o=this.getBehindCSS3DScene({createSceneIfNotExists:!0});if(!o)return console.error(`${an}: css3DScene is required when mode is behind`);ke.behindModeStore.css3DRenderer.renderEveryFrame(o,t)}}handleShow(){return Y(this,null,function*(){var t;this.store.frontModeGroup.setVisible(!0),(t=this.store.behindModeGroup)==null||t.setVisible(!0)})}handleHide(){return Y(this,null,function*(){var t;this.store.frontModeGroup.setVisible(!1),(t=this.store.behindModeGroup)==null||t.setVisible(!1)})}handleEnable(){var t,e;(t=this.getFrontCSS3DScene())==null||t.add(this.store.frontModeGroup),this.store.behindModeGroup&&((e=this.getBehindCSS3DScene())==null||e.add(this.store.behindModeGroup))}handleDisable(){var t,e,n;this.store.frontModeGroup.children.forEach(o=>{o instanceof Fn.CSS3DObject&&o.element instanceof Element&&o.element.parentNode!==null&&o.element.parentNode.removeChild(o.element)}),(t=this.store.behindModeGroup)==null||t.children.forEach(o=>{o instanceof Fn.CSS3DObject&&o.element instanceof Element&&o.element.parentNode!==null&&o.element.parentNode.removeChild(o.element)}),(e=this.getFrontCSS3DScene())==null||e.remove(this.store.frontModeGroup),this.store.behindModeGroup&&((n=this.getBehindCSS3DScene())==null||n.remove(this.store.behindModeGroup))}handleDispose(){this.handleDisable()}}m(Zt,"setFrontModeContainer",rc),m(Zt,"setBehindModeContainer",ac);function ia(i){return Y(this,null,function*(){return new Promise(t=>{var e;if((e=i.model)!=null&&e.loaded){t();return}else i.once("modelLoaded",()=>t())})})}const bt=document.createElement("div");bt.style.position="absolute";bt.style.top="0";bt.style.left="0";bt.style.width="100%";bt.style.height="100%";bt.style.pointerEvents="none";function oa(i){var e,n;const t=(n=Do(i.getElement()))!=null?n:Do((e=i.getElement())==null?void 0:e.parentElement);if(t!=null&&t.parentElement)return t.parentElement.insertBefore(bt,t),bt;console.error("Can not find a valid element to insert behindFiveElement. How to fix it: https://github.com/realsee-developer/dnalogel/blob/main/plugins/src/PanoTagPlugin/README.md")}function Do(i){var o;if(!i)return;const t=(o=i.style.position)!=null?o:getComputedStyle(i).position;if(t!=="fixed"&&t!=="absolute"&&t!=="relative")return;const e=getComputedStyle(i).backgroundColor;if(!(e!=="transparent"&&e!=="rgba(0, 0, 0, 0)"))return i}const lc="v2.0.1",vi=`CSS3DRenderPlugin@${lc}`;class cc extends Zt{constructor(e){super();m(this,"five");m(this,"behindFiveContainer");m(this,"staticPrefix","//vrlab-static.ljcdn.com");m(this,"create3DDomContainer",(e,n)=>{if(this.state.disposed)return;const o=(()=>{var f;(n==null?void 0:n.dpr)!==void 0&&console.warn(`${vi}: please use "config.devicePixelRatio" replace "config.dpr"`);const d={ratio:.00216,devicePixelRatio:(f=n==null?void 0:n.dpr)!=null?f:1,mode:"front",autoRender:!0};return Object.assign(d,n,(n==null?void 0:n.mode)==="behind"?{scene:this.five.scene}:void 0)})(),s=this.five.getElement();if(!s){console.error(`${vi}: five.getElement() is ${s}`);return}const{autoRender:r}=o;o.mode==="behind"&&o.behindFiveContainer&&(this.behindFiveContainer=o.behindFiveContainer);const a=this.create3DElement(this.five.camera,e,he(G({},o),{autoRender:!1}));if(!a)return;const l=()=>{const d=a.css3DObject.mode==="front"?s.parentElement:this.getBehindFiveElement();if(!d)return console.error(`${vi}: wrapper is ${d}`);a.appendToElement(d),a.render()},c=()=>{a.css3DObject.mode==="front"&&l(),a.css3DObject.mode==="behind"&&ia(this.five).then(()=>{l()})};return r&&c(),he(G({},a),{render:r?void 0:c})});this.five=e}disposeAll(){return this.dispose()}setState(...e){const n=super.setState(...e);return this.five.needsRender=!0,n}getBehindFiveElement(){return this.behindFiveContainer?this.behindFiveContainer:(this.behindFiveContainer=oa(this.five),this.behindFiveContainer)}}const en=i=>new cc(i);function bi(i,t,e=new H.Vector3(1,1,1),n=!1){const o=new Ur.Line(i,t);return o.setMaterial({dashed:n,color:e,linewidth:1}),o.remove(o.points),o}const dc=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,A=c(d,u),g=new H.Group;g.add(bi(new H.Vector3(A.x+h,A.y,A.z),new H.Vector3(A.x-h,A.y,A.z),new H.Vector3(1,0,0)),bi(new H.Vector3(A.x,A.y+h,A.z),new H.Vector3(A.x,A.y-h,A.z),new H.Vector3(0,1,0)),bi(new H.Vector3(A.x,A.y,A.z+h),new H.Vector3(A.x,A.y,A.z-h),new H.Vector3(0,0,1))),i.scene.add(g),i.needsRender=!0;const v=()=>{i.scene.remove(g)};return t.disposers.push(v),{clear:v,pointAxesHelperMesh:g}},s=(d,f=0)=>{var v,w;const u=(v=i==null?void 0:i.camera)==null?void 0:v.position;if(!u)return!1;const h=d.distanceTo(u),p=d.sub(u).normalize(),A=new H.Raycaster(u,p),g=(w=i.model.intersectRaycaster(A))==null?void 0:w[0];return!(g&&g.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 Z(){}const yt=i=>i;function we(i,t){for(const e in t)i[e]=t[e];return i}function uc(i){return i&&typeof i=="object"&&typeof i.then=="function"}function sa(i){return i()}function Lo(){return Object.create(null)}function Qt(i){i.forEach(sa)}function ii(i){return typeof i=="function"}function ne(i,t){return i!=i?t==t:i!==t||i&&typeof i=="object"||typeof i=="function"}let Cn;function Ne(i,t){return Cn||(Cn=document.createElement("a")),Cn.href=t,i===Cn.href}function fc(i){return Object.keys(i).length===0}function it(i,t,e,n){if(i){const o=ra(i,t,e,n);return i[0](o)}}function ra(i,t,e,n){return i[1]&&n?we(e.ctx.slice(),i[1](n(t))):e.ctx}function ot(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 st(i,t,e,n,o,s){if(o){const r=ra(t,e,n,s);i.p(r,o)}}function rt(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 aa(i){const t={};for(const e in i)e[0]!=="$"&&(t[e]=i[e]);return t}function Nn(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 je(i){return i==null?"":i}const la=typeof window!="undefined";let ca=la?()=>window.performance.now():()=>Date.now(),Ji=la?i=>requestAnimationFrame(i):Z;const Ut=new Set;function da(i){Ut.forEach(t=>{t.c(i)||(Ut.delete(t),t.f())}),Ut.size!==0&&Ji(da)}function ua(i){let t;return Ut.size===0&&Ji(da),{promise:new Promise(e=>{Ut.add(t={c:i,f:e})}),abort(){Ut.delete(t)}}}function Q(i,t){i.appendChild(t)}function le(i,t,e){const n=Zi(i);if(!n.getElementById(t)){const o=V("style");o.id=t,o.textContent=e,fa(n,o)}}function Zi(i){if(!i)return document;const t=i.getRootNode?i.getRootNode():i.ownerDocument;return t&&t.host?t:i.ownerDocument}function hc(i){const t=V("style");return fa(Zi(i),t),t.sheet}function fa(i,t){return Q(i.head||i,t),t.sheet}function z(i,t,e){i.insertBefore(t,e||null)}function M(i){i.parentNode&&i.parentNode.removeChild(i)}function lt(i,t){for(let e=0;e<i.length;e+=1)i[e]&&i[e].d(t)}function V(i){return document.createElement(i)}function Ae(i){return document.createElementNS("http://www.w3.org/2000/svg",i)}function Ee(i){return document.createTextNode(i)}function ee(){return Ee(" ")}function fe(){return Ee("")}function Se(i,t,e,n){return i.addEventListener(t,e,n),()=>i.removeEventListener(t,e,n)}function ha(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 Wn(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 mc(i){return Array.from(i.childNodes)}function xe(i,t){t=""+t,i.wholeText!==t&&(i.data=t)}function T(i,t,e,n){e===null?i.style.removeProperty(t):i.style.setProperty(t,e,n?"important":"")}let En;function pc(){if(En===void 0){En=!1;try{typeof window!="undefined"&&window.parent&&window.parent.document}catch(i){En=!0}}return En}function Et(i,t){getComputedStyle(i).position==="static"&&(i.style.position="relative");const n=V("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=pc();let s;return o?(n.src="data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\/script>",s=Se(window,"message",r=>{r.source===n.contentWindow&&t()})):(n.src="about:blank",n.onload=()=>{s=Se(n.contentWindow,"resize",t)}),Q(i,n),()=>{(o||s&&n.contentWindow)&&s(),M(n)}}function te(i,t,e){i.classList[e?"add":"remove"](t)}function ma(i,t,{bubbles:e=!1,cancelable:n=!1}={}){const o=document.createEvent("CustomEvent");return o.initCustomEvent(i,e,n,t),o}class _n{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=Ae(e.nodeName):this.e=V(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)z(this.t,this.n[e],t)}p(t){this.d(),this.h(t),this.i(this.a)}d(){this.n.forEach(M)}}const Xn=new Map;let Yn=0;function gc(i){let t=5381,e=i.length;for(;e--;)t=(t<<5)-t^i.charCodeAt(e);return t>>>0}function Ac(i,t){const e={stylesheet:hc(t),rules:{}};return Xn.set(i,e),e}function pa(i,t,e,n,o,s,r,a=0){const l=16.666/n;let c=`{
|
|
101
|
+
`;class Wl extends Gl{constructor(e){super();m(this,"configs");m(this,"clientWidth");m(this,"clientHeight");m(this,"ready",!1);m(this,"uuid",He());m(this,"tween");m(this,"tweening",!1);m(this,"container");m(this,"canvas");m(this,"data",{});m(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=Nl,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:et.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:et.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 p=this.color||"#ff0000";n.strokeStyle=p,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=vn({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(vn({x:u,y:h},this.clientWidth,this.clientHeight)),r.length<3))return;const{control:p,end:A}=bn(r);!p||!A||(d(s,p,A),s=A)},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),jn(()=>{this.emitStateChange({type:et.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=vn({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(vn({x:u,y:h},this.clientWidth,this.clientHeight)),r.length<3))return;const{control:p,end:A}=bn(r);!p||!A||(d(s,p,A),s=A)},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),jn(()=>{this.emitStateChange({type:et.Drawline,color:this.color,ready:this.ready,state:h,uuid:this.uuid})})}}emitStateChange(e,n=!0){if(e.type!==et.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};Rl(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 et.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 et.Undo:this.handleUndo(s);break}}handleDrawLine(e,n,{withUndo:o=!1},s=Kr){!n||Object.prototype.toString.call(n)!="[object Object]"||Object.keys(n).length===0||(console.log("handleDrawLine",n,n.line),Ql(()=>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=Ai(n.move||{},this.clientWidth,this.clientHeight);let h=[u];if(a.strokeStyle=c,a.beginPath(),a.moveTo(u.x,u.y),d&&!o){let p=[];const A=this;A.tween=Hl({step:0},{step:l.length-1},d).onUpdate(({step:g})=>{var w;if(A.tweening=!0,!A.ready)return a.clearRect(0,0,A.canvas[f].width,A.canvas[f].height),(w=A.tween)==null?void 0:w.stop();const v=Math.floor(g);if(!p.find(y=>y===v)){if(p.push(v),console.log("__debug__",l,l[v],v),h.push(Ai(l[v],A.clientWidth,A.clientHeight)),h.length<3)return;const{control:y,end:P}=bn(h);if(!y||!P)return;a.quadraticCurveTo(y.x,y.y,P.x,P.y),a.stroke()}}).onComplete(g=>{A.tween=void 0,A.tweening=!1,p=[],h=[],s&&s(),r()})}else{for(let p=0;p<l.length;p++){if(h.push(Ai(l[p],this.clientWidth,this.clientHeight)),h.length<3)continue;const{control:A,end:g}=bn(h);!A||!g||a.quadraticCurveTo(A.x,A.y,g.x,g.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(),jn(n,60);return}n()}destroyBrush(){this.closeBrush(),this.ready=!1,this.emit("readyChange",!0)}}class _l{constructor(t={}){m(this,"controller");const e=Object.assign({currentColor:"#f44336",onUndoText:"\u56DE\u9000",onExitText:"\u5173\u95ED"},t);this.controller=new Wl(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 Xl=(i,t)=>{var X,j;let e=(j=(X=t==null?void 0:t.initialState)==null?void 0:X.enabled)!=null?j:!0,n=!1,o=!0,s=null;const a=G(G({},{lookAtCurrentCamera:!1,lockedPanoIndex:null,lockedLatitude:null,lockedLongitude:null}),t==null?void 0:t.config),l=new x.Scene,c=new be.Camera(60);let d=new x.Object3D,f,u;{const E=new x.DirectionalLight(16777215,.5);E.position.copy(new x.Vector3(1,1,1)),l.add(E)}{const E=new x.DirectionalLight(16777215,.3);l.add(E)}{const E=new x.AmbientLight(16777215,.3);l.add(E)}l.add(d);const h=()=>{if(n)return;f=I(i.model,c.fov,c.aspect),u=i.model.bounding.getCenter(new x.Vector3),l.remove(d),d=R(i.model),l.add(d),n=!0,L();function E(O){const W=O.clone();return W.uniforms.modelAlpha.value=1,W.uniforms.map.value&&(W.uniforms.map.value.needsUpdate=!0),W}function R(O){if(O instanceof x.Mesh){const W=O.geometry,U=Array.isArray(O.material)?O.material.map(E):E(O.material);return new x.Mesh(W,U)}else if(O instanceof x.Group){const W=new x.Group;return O.children.forEach(U=>W.add(R(U))),W}else{const W=new x.Object3D;return O.children.forEach(U=>W.add(R(U))),W}}},p=()=>{if(!!i.renderer)return s||(s=new x.WebGLRenderer({antialias:!1,alpha:!0}),s.setPixelRatio(i.renderer.getPixelRatio()),s.outputEncoding=x.sRGBEncoding,s.setClearColor(1579548,0),s.autoClear=!0),s},A=()=>{d.traverse(E=>{E instanceof x.Mesh&&[].concat(E.material).forEach(O=>O.dispose())}),l.remove(d),d=new x.Object3D,l.add(d),n=!1,L()},g=()=>{!e||n||h()},v=()=>{e||(e=!0,l.add(d),!n&&i.model.loaded&&h(),L())},w=()=>{!e||(l.remove(d),o=!0,D(),e=!1)},y=(E,R={})=>{const O=p();if(!O)return;E.appendChild(O.domElement),P(R);const W=window.getComputedStyle(E).position;W!=="relative"&&W!=="absolute"&&W!=="fixed"&&W!=="sticky"&&(E.style.position="relative")},P=(E={})=>{if(!s)return;const O=s.domElement.parentNode;if(O!=null&&O.nodeName){const{width:W=O.offsetWidth,height:U=O.offsetHeight}=E;s.setSize(W,U),c.aspect=W/U,c.updateProjectionMatrix()}L()};function I(E,R,O){const W=E.bounding,U=Math.pow(Math.pow(W.max.x-W.min.x+1,2)+Math.pow(W.max.y-W.min.y+1,2)+Math.pow(W.max.z-W.min.z+1,2),1/2);let _=U/2/Math.tan(Math.PI*R/360);return O<1&&(_=_/O),isNaN(_)?U:_}function C(E){return i.work.observers[E].standingPosition.clone()}const L=()=>{if(!e||!f||!u)return;const E=i.getPose();E.fov=c.fov,E.offset=u,E.distance=f,typeof a.lockedLatitude=="number"&&(E.latitude=a.lockedLatitude),typeof a.lockedLongitude=="number"&&(E.longitude=a.lockedLongitude),typeof a.lockedPanoIndex=="number"&&(E.offset=C(a.lockedPanoIndex)),a.lookAtCurrentCamera&&(E.offset=i.camera.position.clone().setY(i.camera.position.y+1)),c.setFromPose(E),o=!0},D=()=>{!e||o!==!0||!s||!s.domElement.parentNode||s.domElement.parentNode.offsetWidth===0||(s.render(l,c),o=!1)},B=()=>{s&&s.dispose(),s=null},N=E=>{Object.assign(a,E),L()},F=()=>({enabled:e});return Object.assign(window,{camera:c}),i.on("modelLoaded",g),i.on("modelWillLoad",A),i.on("cameraDirectionUpdate",L),i.on("dispose",B),i.on("renderFrame",D),i.on("cameraPositionUpdate",L),{appendTo:y,refresh:P,changeConfigs:N,enable:v,disable:w,getCurrentState:F}};function vt(...i){const t=[];return i.forEach(e=>{e.isCSS3DObjectPlus?t.push(e):t.push(...vt(...e.children))}),t}function Gn(i,t){const e=Math.round(i);return e%2===0?e:e+Number(t!=null&&t.floor?-1:1)}function Yl(i,t,e=!0){if(!i)return console.error("createResizeObserver: element is undefined"),{observe:()=>{},unobserve:()=>{}};const n=()=>{const s=Gn(i.clientWidth,{floor:!0}),r=Gn(i.clientHeight,{floor:!0});t(s,r)};if(typeof ResizeObserver=="undefined"||!ResizeObserver)return console.warn("createResizeObserver: ResizeObserver is undefined"),{observe:()=>n(),unobserve:()=>{}};const o=new ResizeObserver(n);return e&&n(),{observe:()=>o.observe(i),unobserve:()=>o.unobserve(i)}}class ko extends Fn.CSS3DRenderer{constructor(){super();m(this,"wrapper");m(this,"requestAnimationFrameId");m(this,"resizeDisoper");this.domElement.style.position="absolute",this.domElement.style.top="0",this.domElement.style.left="0",this.domElement.style.userSelect="none",this.domElement.style.pointerEvents="none"}setWrapper(e){if(!e)throw new Error("CSS3DRenderer: wrapper is required");if(e.contains(this.domElement))return;const n=this.wrapper;return n&&n.contains(this.domElement)&&this.domElement.remove(),this.appendToElement(e),this.wrapper=e,this}appendToElement(e){e.appendChild(this.domElement);const n=(r,a)=>this.setSize(r,a),{observe:o,unobserve:s}=Yl(e,n,!0);o(),this.resizeDisoper=s,this.wrapper=e}renderEveryFrame(e,n){if(this.wrapper||console.warn("wrapper is not find, creating a html element and call setWrapper(wrapper)",this,e),this.requestAnimationFrameId)return console.warn("CSS3DRenderer: render is running");const o=()=>{this.requestAnimationFrameId=requestAnimationFrame(o),!!e.visible&&vt(e).length!==0&&this.render(e,n)};o()}stopRender(){this.requestAnimationFrameId&&cancelAnimationFrame(this.requestAnimationFrameId)}dispose(){var e;this.stopRender(),(e=this.resizeDisoper)==null||e.call(this),this.domElement.remove()}}function Ul(i){return typeof Symbol=="undefined"?`$Symbol<${i}>$`:Symbol(i)}const dn=Ul("$$EVENT$$");function wn(i){return i[dn]||(i[dn]={}),i[dn]}function Jl(i){i[dn]||delete i[dn]}class $t{hasListener(t){const e=wn(this);return Boolean((e==null?void 0:e[t])&&e[t].length>0)}on(t,e,n){const o=wn(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){Jl(this);return}const n=wn(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=wn(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 $r(...i){const t=new H.Vector3;return i.forEach(e=>{t.add(e)}),t.divideScalar(i.length),t}const Zl=({x:i,y:t,z:e})=>new H.Vector3(i,t,e),nt=i=>new H.Vector3().fromArray(i),hn=i=>i instanceof H.Vector3?i:Array.isArray(i)?nt(i):Zl(i);class ql extends x.Mesh{constructor(e,n){const o=new x.MeshBasicMaterial({opacity:0,color:0,transparent:!1,side:x.DoubleSide}),s=new x.PlaneGeometry(e,n);super(s,o);m(this,"name","opacity-mesh")}removeFromParent(){const e=this.parent;return e!==null&&e.remove(this),this}}const ea=1,Kl=`CSS3DObjectPlus@${ea}`,$l=.00216,ec=.003;class ta extends Fn.CSS3DObject{constructor(e){var I,C,L;const n=e.container,o=e.cornerPoints,s=(I=e.ratio)!=null?I:ec,r=(C=e.dpr)!=null?C:1,a=(L=e.pointerEvents)!=null?L:"auto",l=Math.max($l,s),c=o[0].distanceTo(o[1]),d=o[1].distanceTo(o[2]),f=Gn(c/s*r),u=Gn(d/s*r),h=$r(...o);let p;if(l===s)n.style.width=`${f}px`,n.style.height=`${u}px`,p=n;else{const D=document.createElement("div");D.style.width=`${f}px`,D.style.height=`${u}px`,D.style.pointerEvents="none";const B=s/l;n.style.position="absolute",n.style.left="0",n.style.top="0",n.style.width=`${B*f}px`,n.style.height=`${B*u}px`,D.appendChild(n),p=D}super(p);m(this,"version",ea);m(this,"isCSS3DObjectPlus",!0);m(this,"container");m(this,"width");m(this,"height");m(this,"domWidthPx");m(this,"domHeightPx");m(this,"cornerPoints");m(this,"centerPosition");m(this,"ratio");m(this,"mode","front");m(this,"hooks",new $t);m(this,"opacityMesh");m(this,"selfVisible",!0);m(this,"parentVisibleListenerDisposer");m(this,"createOpacityMesh",e=>{const{domWidthPx:n,domHeightPx:o}=e,s=new ql(n,o);return s.position.copy(e.position),s.rotation.copy(e.rotation),s.scale.copy(e.scale),s});m(this,"addParentVisibleListener",()=>{var e;if((e=this.parent)!=null&&e.isCSS3DGroup){const n=this.parent,o=s=>{this.setVisible(s&&this.selfVisible,{setSelfVisible:!1})};n.hooks.on("visibleChange",o),this.parentVisibleListenerDisposer=()=>n.hooks.off("visibleChange",o)}});m(this,"removeParentVisibleListener",()=>{var e;(e=this.parentVisibleListenerDisposer)==null||e.call(this)});if(n.style.pointerEvents=a,this.scale.set(l,l,l),this.cornerPoints=o,this.ratio=s,this.container=n,e.mode&&(this.mode=e.mode),l===s)this.width=c,this.height=d,this.domWidthPx=f,this.domHeightPx=u,this.centerPosition=h;else{const D=s/l;this.width=D*c,this.height=D*d,this.domWidthPx=D*f,this.domHeightPx=D*u,this.centerPosition=new H.Vector3().subVectors(h,o[0]).multiplyScalar(D).add(o[0])}n.classList.add(`${Kl}__container`);const A=new H.Vector3().subVectors(o[1],o[0]),g=new H.Vector3().subVectors(o[3],o[0]),v=new H.Vector3().crossVectors(A,g).normalize();this.lookAt(v);const w=this.up.clone().applyQuaternion(this.quaternion),y=g.clone(),P=new H.Vector3().crossVectors(w,y).normalize();this.rotateOnWorldAxis(P,w.angleTo(y)),this.position.copy(h),this.addEventListener("added",()=>{var D;this.mode==="front"&&((D=this.opacityMesh)==null||D.removeFromParent()),this.addParentVisibleListener()}),this.addEventListener("removed",()=>{var D;(D=this.opacityMesh)==null||D.removeFromParent(),this.removeParentVisibleListener()})}setVisible(e,n={setSelfVisible:!0}){n.setSelfVisible&&(this.selfVisible=e),this.visible=e,this.opacityMesh&&(this.opacityMesh.visible=e)}removeFromParent(){var n;const e=this.parent;return e!==null&&e.remove(this),(n=this.opacityMesh)==null||n.removeFromParent(),this}removeOpacityMesh(){var e;return(e=this.opacityMesh)==null||e.removeFromParent(),this.opacityMesh=void 0,this}dispose(){var e;this.container.remove(),this.removeFromParent(),(e=this.opacityMesh)==null||e.removeFromParent()}getOpacityMesh(){if(this.opacityMesh)return this.opacityMesh;{const e=this.createOpacityMesh(this);return this.opacityMesh=e,e}}applyMatrix4(e){var n;super.applyMatrix4(e),(n=this.opacityMesh)==null||n.applyMatrix4(e)}applyQuaternion(e){var n;return super.applyQuaternion(e),(n=this.opacityMesh)==null||n.applyQuaternion(e),this}applyScaleMatrix4(e){var n;this.scale.applyMatrix4(e),(n=this.opacityMesh)==null||n.scale.applyMatrix4(e)}}class tc extends x.Scene{constructor(){super()}add(...t){return super.add(...t),vt(...t).forEach(e=>{e.mode="front"}),this}}class nc extends x.Scene{constructor(e){super();m(this,"scene");if(!e)throw new Error("CSS3DBehindScene: scene is required");this.scene=e}add(...e){return super.add(...e),vt(...e).forEach(n=>{n.mode="behind",this.scene.add(n.getOpacityMesh())}),this}remove(...e){return vt(...e).forEach(n=>{var o;(o=n.opacityMesh)==null||o.removeFromParent()}),super.remove(...e),this}}class na extends x.Group{constructor(e){super();m(this,"isCSS3DGroup",!0);m(this,"mode");m(this,"CSS3DObjectLength",0);m(this,"hooks",new $t);this.mode=e}add(...e){return vt(...e).forEach(n=>{n.mode=this.mode}),super.add(...e),this.updateLength(),this}setVisible(e){this.visible=e,this.hooks.emit("visibleChange",e)}remove(...e){return super.remove(...e),this.updateLength(),this}updateLength(){this.CSS3DObjectLength=vt(this).length}}class ic extends na{constructor(){super("front")}}class oc extends na{constructor(e){super("behind");m(this,"scene");if(!e)throw new Error("CSS3DBehindScene: scene is required");this.scene=e}add(...e){return vt(...e).forEach(n=>{this.scene.add(n.getOpacityMesh())}),super.add(...e),this}}const sc=3,Vi="CSS3DRenderer",an=`${Vi}@${sc}`,Nt=()=>{console.error(`${an} is disposed`)},ke={css3DObjects:[],frontModeStore:{css3DRenderer:new ko},behindModeStore:{css3DRenderer:new ko}};function xo(i){return ke.css3DObjects.find(t=>t.id===i)}function rc(i){ke.frontModeStore.css3DRenderer.setWrapper(i)}function ac(i){ke.behindModeStore.css3DRenderer.setWrapper(i)}class Jt{constructor(t){m(this,"hooks",new $t);m(this,"state",{enabled:!0,visible:!0,disposed:!1});m(this,"_scene");m(this,"store",{frontModeGroup:new ic});m(this,"create3DElement",(t,e,n)=>{if(this.state.disposed)return Nt();const o=(()=>{const y={ratio:.00216,devicePixelRatio:1,mode:"front",autoRender:!0,container:document.createElement("div"),pointerEvents:"none"};return Object.assign(y,n)})(),s=e.map(hn);if((s==null?void 0:s.length)<4)return console.error(`${an}: requires 4 point but params may have fewer`);const{ratio:r,devicePixelRatio:a,mode:l,autoRender:c,container:d,pointerEvents:f}=o,u=this.createObject(s,{ratio:r,dpr:a,container:d,mode:l,pointerEvents:f});ke.css3DObjects.push(u),o.scene&&this.setScene(o.scene);const h=()=>{const y=u.mode==="front"?this.getFrontCSS3DObjectGroup():this.getBehindCSS3DObjectGroup();!y||y.add(u)},p=()=>{h(),this.render(t)},A=y=>this.setVisibleById(u.id,y),g=y=>this.setEnabledById(u.id,y),v=()=>(u.removeFromParent(),!0),w=l==="front"?ke.frontModeStore.css3DRenderer:ke.behindModeStore.css3DRenderer;return c&&p(),{id:u.uuid,container:d,css3DObject:u,render:c?void 0:p,show:()=>A(!0),hide:()=>A(!1),setVisible:A,enable:()=>g(!0),disable:()=>g(!1),setEnabled:g,dispose:v,appendToElement:y=>w.setWrapper(y)}});m(this,"setVisibleById",(t,e)=>{var n;(n=xo(t))==null||n.setVisible(e)});m(this,"setEnabledById",(t,e)=>{const n=xo(t);if(!n)return;const o=n.mode==="front"?this.getFrontCSS3DObjectGroup({addGroupIfNotExists:!1}):this.getBehindCSS3DObjectGroup({addGroupIfNotExists:!1});!o||(e?o.add(n):o.remove(n))});m(this,"createObject",(t,e)=>{const n=new ta(G({cornerPoints:t},e));return n.element.classList.add(`${Vi}__container`),n.element.id=`${Vi}__container--${n.uuid}`,n});t&&this.setScene(t)}get scene(){return this._scene||console.error("scene doesn't exist!, please call setScene(scene) first"),this._scene}static get frontModeCSS3DRenderer(){return ke.frontModeStore.css3DRenderer}static get behindModeCSS3DRenderer(){return ke.behindModeStore.css3DRenderer}get frontModeCSS3DRenderer(){return ke.frontModeStore.css3DRenderer}get behindModeCSS3DRenderer(){return ke.behindModeStore.css3DRenderer}setScene(t){this._scene=t}getCurrentState(){return this.state}setState(t,e={userAction:!0}){if(this.state.disposed)return Nt();const n=G({},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()),n.disposed!==this.state.disposed&&this.handleDispose(),this.hooks.emit("stateChange",{state:this.state,prevState:n,userAction:e.userAction})}dispose(){this.setState({disposed:!0}),this.hooks.emit("dispose")}show(){return Y(this,arguments,function*({userAction:t}={userAction:!0}){if(this.state.disposed)return Nt();this.setState({visible:!0},{userAction:t}),this.hooks.emit("show",{userAction:t})})}hide(){return Y(this,arguments,function*({userAction:t}={userAction:!0}){if(this.state.disposed)return Nt();this.setState({visible:!1},{userAction:t}),this.hooks.emit("hide",{userAction:t})})}enable({userAction:t}={userAction:!0}){if(this.state.disposed)return Nt();this.setState({enabled:!0},{userAction:t}),this.hooks.emit("enable",{userAction:t})}disable({userAction:t}={userAction:!0}){if(this.state.disposed)return Nt();this.setState({enabled:!1},{userAction:t}),this.hooks.emit("disable",{userAction:t})}getFrontCSS3DScene({createSceneIfNotExists:t=!1}={}){var n;const e=(n=ke.frontModeStore)==null?void 0:n.css3DScene;if(e)return e;if(t){const o=new tc;ke.frontModeStore.css3DScene=o}return ke.frontModeStore.css3DScene}getBehindCSS3DScene({createSceneIfNotExists:t=!1}={}){var n,o;const e=(n=ke.behindModeStore)==null?void 0:n.css3DScene;if(e)return e;if(t){const s=(o=ke.behindModeStore.scene)!=null?o:this.scene;if(!s){console.error(`${an}: scene is required when mode is behind`);return}const r=new nc(s);ke.behindModeStore.css3DScene=r,ke.behindModeStore.scene=s}return ke.behindModeStore.css3DScene}getFrontCSS3DObjectGroup({addGroupIfNotExists:t=!0}={}){const e=this.getFrontCSS3DScene({createSceneIfNotExists:t});return t&&e&&(e.getObjectById(this.store.frontModeGroup.id)||e.add(this.store.frontModeGroup)),this.store.frontModeGroup}getBehindCSS3DObjectGroup({addGroupIfNotExists:t=!0}={}){var n;const e=this.getBehindCSS3DScene({createSceneIfNotExists:t});if(t&&e&&this.scene){const o=(n=this.store.behindModeGroup)!=null?n:new oc(this.scene);this.store.behindModeGroup=o,e.getObjectById(o.id)||e.add(o)}return this.store.behindModeGroup}render(t){var e,n;if(this.getFrontCSS3DObjectGroup({addGroupIfNotExists:!1}).CSS3DObjectLength>0){const o=this.getFrontCSS3DScene({createSceneIfNotExists:!0});if(!o)return console.error(`${an}: css3DScene is required when mode is front`);ke.frontModeStore.css3DRenderer.renderEveryFrame(o,t)}if(((n=(e=this.getBehindCSS3DObjectGroup({addGroupIfNotExists:!1}))==null?void 0:e.CSS3DObjectLength)!=null?n:0)>0){const o=this.getBehindCSS3DScene({createSceneIfNotExists:!0});if(!o)return console.error(`${an}: css3DScene is required when mode is behind`);ke.behindModeStore.css3DRenderer.renderEveryFrame(o,t)}}handleShow(){return Y(this,null,function*(){var t;this.store.frontModeGroup.setVisible(!0),(t=this.store.behindModeGroup)==null||t.setVisible(!0)})}handleHide(){return Y(this,null,function*(){var t;this.store.frontModeGroup.setVisible(!1),(t=this.store.behindModeGroup)==null||t.setVisible(!1)})}handleEnable(){var t,e;(t=this.getFrontCSS3DScene())==null||t.add(this.store.frontModeGroup),this.store.behindModeGroup&&((e=this.getBehindCSS3DScene())==null||e.add(this.store.behindModeGroup))}handleDisable(){var t,e,n;this.store.frontModeGroup.children.forEach(o=>{o instanceof Fn.CSS3DObject&&o.element instanceof Element&&o.element.parentNode!==null&&o.element.parentNode.removeChild(o.element)}),(t=this.store.behindModeGroup)==null||t.children.forEach(o=>{o instanceof Fn.CSS3DObject&&o.element instanceof Element&&o.element.parentNode!==null&&o.element.parentNode.removeChild(o.element)}),(e=this.getFrontCSS3DScene())==null||e.remove(this.store.frontModeGroup),this.store.behindModeGroup&&((n=this.getBehindCSS3DScene())==null||n.remove(this.store.behindModeGroup))}handleDispose(){this.handleDisable()}}m(Jt,"setFrontModeContainer",rc),m(Jt,"setBehindModeContainer",ac);function ia(i){return Y(this,null,function*(){return new Promise(t=>{var e;if((e=i.model)!=null&&e.loaded){t();return}else i.once("modelLoaded",()=>t())})})}const bt=document.createElement("div");bt.style.position="absolute";bt.style.top="0";bt.style.left="0";bt.style.width="100%";bt.style.height="100%";bt.style.pointerEvents="none";function oa(i){var e,n;const t=(n=Do(i.getElement()))!=null?n:Do((e=i.getElement())==null?void 0:e.parentElement);if(t!=null&&t.parentElement)return t.parentElement.insertBefore(bt,t),bt;console.error("Can not find a valid element to insert behindFiveElement. How to fix it: https://github.com/realsee-developer/dnalogel/blob/main/plugins/src/PanoTagPlugin/README.md")}function Do(i){var o;if(!i)return;const t=(o=i.style.position)!=null?o:getComputedStyle(i).position;if(t!=="fixed"&&t!=="absolute"&&t!=="relative")return;const e=getComputedStyle(i).backgroundColor;if(!(e!=="transparent"&&e!=="rgba(0, 0, 0, 0)"))return i}const lc="v2.0.1",vi=`CSS3DRenderPlugin@${lc}`;class cc extends Jt{constructor(e){super();m(this,"five");m(this,"behindFiveContainer");m(this,"staticPrefix","//vrlab-static.ljcdn.com");m(this,"create3DDomContainer",(e,n)=>{if(this.state.disposed)return;const o=(()=>{var f;(n==null?void 0:n.dpr)!==void 0&&console.warn(`${vi}: please use "config.devicePixelRatio" replace "config.dpr"`);const d={ratio:.00216,devicePixelRatio:(f=n==null?void 0:n.dpr)!=null?f:1,mode:"front",autoRender:!0};return Object.assign(d,n,(n==null?void 0:n.mode)==="behind"?{scene:this.five.scene}:void 0)})(),s=this.five.getElement();if(!s){console.error(`${vi}: five.getElement() is ${s}`);return}const{autoRender:r}=o;o.mode==="behind"&&o.behindFiveContainer&&(this.behindFiveContainer=o.behindFiveContainer);const a=this.create3DElement(this.five.camera,e,he(G({},o),{autoRender:!1}));if(!a)return;const l=()=>{const d=a.css3DObject.mode==="front"?s.parentElement:this.getBehindFiveElement();if(!d)return console.error(`${vi}: wrapper is ${d}`);a.appendToElement(d),a.render()},c=()=>{a.css3DObject.mode==="front"&&l(),a.css3DObject.mode==="behind"&&ia(this.five).then(()=>{l()})};return r&&c(),he(G({},a),{render:r?void 0:c})});this.five=e}disposeAll(){return this.dispose()}setState(...e){const n=super.setState(...e);return this.five.needsRender=!0,n}getBehindFiveElement(){return this.behindFiveContainer?this.behindFiveContainer:(this.behindFiveContainer=oa(this.five),this.behindFiveContainer)}}const en=i=>new cc(i);function bi(i,t,e=new H.Vector3(1,1,1),n=!1){const o=new Ur.Line(i,t);return o.setMaterial({dashed:n,color:e,linewidth:1}),o.remove(o.points),o}const dc=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,A=c(d,u),g=new H.Group;g.add(bi(new H.Vector3(A.x+h,A.y,A.z),new H.Vector3(A.x-h,A.y,A.z),new H.Vector3(1,0,0)),bi(new H.Vector3(A.x,A.y+h,A.z),new H.Vector3(A.x,A.y-h,A.z),new H.Vector3(0,1,0)),bi(new H.Vector3(A.x,A.y,A.z+h),new H.Vector3(A.x,A.y,A.z-h),new H.Vector3(0,0,1))),i.scene.add(g),i.needsRender=!0;const v=()=>{i.scene.remove(g)};return t.disposers.push(v),{clear:v,pointAxesHelperMesh:g}},s=(d,f=0)=>{var v,w;const u=(v=i==null?void 0:i.camera)==null?void 0:v.position;if(!u)return!1;const h=d.distanceTo(u),p=d.sub(u).normalize(),A=new H.Raycaster(u,p),g=(w=i.model.intersectRaycaster(A))==null?void 0:w[0];return!(g&&g.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 Z(){}const yt=i=>i;function we(i,t){for(const e in t)i[e]=t[e];return i}function uc(i){return i&&typeof i=="object"&&typeof i.then=="function"}function sa(i){return i()}function Lo(){return Object.create(null)}function Qt(i){i.forEach(sa)}function ii(i){return typeof i=="function"}function ne(i,t){return i!=i?t==t:i!==t||i&&typeof i=="object"||typeof i=="function"}let Cn;function Ne(i,t){return Cn||(Cn=document.createElement("a")),Cn.href=t,i===Cn.href}function fc(i){return Object.keys(i).length===0}function it(i,t,e,n){if(i){const o=ra(i,t,e,n);return i[0](o)}}function ra(i,t,e,n){return i[1]&&n?we(e.ctx.slice(),i[1](n(t))):e.ctx}function ot(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 st(i,t,e,n,o,s){if(o){const r=ra(t,e,n,s);i.p(r,o)}}function rt(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 aa(i){const t={};for(const e in i)e[0]!=="$"&&(t[e]=i[e]);return t}function Nn(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 je(i){return i==null?"":i}const la=typeof window!="undefined";let ca=la?()=>window.performance.now():()=>Date.now(),Ji=la?i=>requestAnimationFrame(i):Z;const Ut=new Set;function da(i){Ut.forEach(t=>{t.c(i)||(Ut.delete(t),t.f())}),Ut.size!==0&&Ji(da)}function ua(i){let t;return Ut.size===0&&Ji(da),{promise:new Promise(e=>{Ut.add(t={c:i,f:e})}),abort(){Ut.delete(t)}}}function Q(i,t){i.appendChild(t)}function le(i,t,e){const n=Zi(i);if(!n.getElementById(t)){const o=V("style");o.id=t,o.textContent=e,fa(n,o)}}function Zi(i){if(!i)return document;const t=i.getRootNode?i.getRootNode():i.ownerDocument;return t&&t.host?t:i.ownerDocument}function hc(i){const t=V("style");return fa(Zi(i),t),t.sheet}function fa(i,t){return Q(i.head||i,t),t.sheet}function z(i,t,e){i.insertBefore(t,e||null)}function M(i){i.parentNode&&i.parentNode.removeChild(i)}function lt(i,t){for(let e=0;e<i.length;e+=1)i[e]&&i[e].d(t)}function V(i){return document.createElement(i)}function Ae(i){return document.createElementNS("http://www.w3.org/2000/svg",i)}function Ee(i){return document.createTextNode(i)}function ee(){return Ee(" ")}function fe(){return Ee("")}function Se(i,t,e,n){return i.addEventListener(t,e,n),()=>i.removeEventListener(t,e,n)}function ha(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 Wn(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 mc(i){return Array.from(i.childNodes)}function xe(i,t){t=""+t,i.wholeText!==t&&(i.data=t)}function T(i,t,e,n){e===null?i.style.removeProperty(t):i.style.setProperty(t,e,n?"important":"")}let En;function pc(){if(En===void 0){En=!1;try{typeof window!="undefined"&&window.parent&&window.parent.document}catch(i){En=!0}}return En}function Et(i,t){getComputedStyle(i).position==="static"&&(i.style.position="relative");const n=V("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=pc();let s;return o?(n.src="data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\/script>",s=Se(window,"message",r=>{r.source===n.contentWindow&&t()})):(n.src="about:blank",n.onload=()=>{s=Se(n.contentWindow,"resize",t)}),Q(i,n),()=>{(o||s&&n.contentWindow)&&s(),M(n)}}function te(i,t,e){i.classList[e?"add":"remove"](t)}function ma(i,t,{bubbles:e=!1,cancelable:n=!1}={}){const o=document.createEvent("CustomEvent");return o.initCustomEvent(i,e,n,t),o}class _n{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=Ae(e.nodeName):this.e=V(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)z(this.t,this.n[e],t)}p(t){this.d(),this.h(t),this.i(this.a)}d(){this.n.forEach(M)}}const Xn=new Map;let Yn=0;function gc(i){let t=5381,e=i.length;for(;e--;)t=(t<<5)-t^i.charCodeAt(e);return t>>>0}function Ac(i,t){const e={stylesheet:hc(t),rules:{}};return Xn.set(i,e),e}function pa(i,t,e,n,o,s,r,a=0){const l=16.666/n;let c=`{
|
|
102
102
|
`;for(let g=0;g<=1;g+=l){const v=t+(e-t)*s(g);c+=g*100+`%{${r(v,1-v)}}
|
|
103
103
|
`}const d=c+`100% {${r(e,1-e)}}
|
|
104
|
-
}`,f=`__svelte_${gc(d)}_${a}`,u=Zi(i),{stylesheet:h,rules:p}=Xn.get(u)||Ac(u,i);p[f]||(p[f]=!0,h.insertRule(`@keyframes ${f} ${d}`,h.cssRules.length));const A=i.style.animation||"";return i.style.animation=`${A?`${A}, `:""}${f} ${n}ms linear ${o}ms 1 both`,Yn+=1,f}function ji(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(", "),Yn-=o,Yn||vc())}function vc(){Ji(()=>{Yn||(Xn.forEach(i=>{const{ownerNode:t}=i.stylesheet;t&&M(t)}),Xn.clear())})}let mn;function at(i){mn=i}function Pt(){if(!mn)throw new Error("Function called outside component initialization");return mn}function qi(i){Pt().$$.before_update.push(i)}function Ze(i){Pt().$$.on_mount.push(i)}function Ki(i){Pt().$$.after_update.push(i)}function It(i){Pt().$$.on_destroy.push(i)}function oi(){const i=Pt();return(t,e,{cancelable:n=!1}={})=>{const o=i.$$.callbacks[t];if(o){const s=ma(t,e,{cancelable:n});return o.slice().forEach(r=>{r.call(i,s)}),!s.defaultPrevented}return!0}}function Un(i,t){return Pt().$$.context.set(i,t),t}function ct(i){return Pt().$$.context.get(i)}function $i(i,t){const e=i.$$.callbacks[t.type];e&&e.slice().forEach(n=>n.call(this,t))}const ln=[],Le=[],Qn=[],So=[],ga=Promise.resolve();let Qi=!1;function Aa(){Qi||(Qi=!0,ga.then(eo))}function bc(){return Aa(),ga}function De(i){Qn.push(i)}const yi=new Set;let Pn=0;function eo(){const i=mn;do{for(;Pn<ln.length;){const t=ln[Pn];Pn++,at(t),yc(t.$$)}for(at(null),ln.length=0,Pn=0;Le.length;)Le.pop()();for(let t=0;t<Qn.length;t+=1){const e=Qn[t];yi.has(e)||(yi.add(e),e())}Qn.length=0}while(ln.length);for(;So.length;)So.pop()();Qi=!1,yi.clear(),at(i)}function yc(i){if(i.fragment!==null){i.update(),Qt(i.before_update);const t=i.dirty;i.dirty=[-1],i.fragment&&i.fragment.p(i.ctx,t),i.after_update.forEach(De)}}let on;function va(){return on||(on=Promise.resolve(),on.then(()=>{on=null})),on}function Jn(i,t,e){i.dispatchEvent(ma(`${t?"intro":"outro"}${e}`))}const Rn=new Set;let mt;function se(){mt={r:0,c:[],p:mt}}function re(){mt.r||Qt(mt.c),mt=mt.p}function k(i,t){i&&i.i&&(Rn.delete(i),i.i(t))}function S(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 ba={duration:0};function Rt(i,t,e){let n=t(i,e),o=!1,s,r,a=0;function l(){s&&ji(i,s)}function c(){const{delay:f=0,duration:u=300,easing:h=yt,tick:p=Z,css:A}=n||ba;A&&(s=pa(i,0,1,u,f,h,A,a++)),p(0,1);const g=ca()+f,v=g+u;r&&r.abort(),o=!0,De(()=>Jn(i,!0,"start")),r=ua(w=>{if(o){if(w>=v)return p(1,0),Jn(i,!0,"end"),l(),o=!1;if(w>=g){const y=h((w-g)/u);p(y,1-y)}}return o})}let d=!1;return{start(){d||(d=!0,ji(i),ii(n)?(n=n(),va().then(c)):c())},invalidate(){d=!1},end(){o&&(l(),o=!1)}}}function tn(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=yt,tick:f=Z,css:u}=n||ba;u&&(s=pa(i,1,0,c,l,d,u));const h=ca()+l,p=h+c;De(()=>Jn(i,!1,"start")),ua(A=>{if(o){if(A>=p)return f(0,1),Jn(i,!1,"end"),--r.r||Qt(r.c),!1;if(A>=h){const g=d((A-h)/c);f(1-g,g)}}return o})}return ii(n)?va().then(()=>{n=n(),a()}):a(),{end(l){l&&n.tick&&n.tick(1,0),o&&(s&&ji(i,s),o=!1)}}}function To(i,t){const e=t.token={};function n(o,s,r,a){if(t.token!==e)return;t.resolved=a;let l=t.ctx;r!==void 0&&(l=l.slice(),l[r]=a);const c=o&&(t.current=o)(l);let d=!1;t.block&&(t.blocks?t.blocks.forEach((f,u)=>{u!==s&&f&&(se(),S(f,1,1,()=>{t.blocks[u]===f&&(t.blocks[u]=null)}),re())}):t.block.d(1),c.c(),k(c,1),c.m(t.mount(),t.anchor),d=!0),t.block=c,t.blocks&&(t.blocks[s]=c),d&&eo()}if(uc(i)){const o=Pt();if(i.then(s=>{at(o),n(t.then,1,t.value,s),at(null)},s=>{if(at(o),n(t.catch,2,t.error,s),at(null),!t.hasCatch)throw s}),t.current!==t.pending)return n(t.pending,0),!0}else{if(t.current!==t.then)return n(t.then,1,t.value,i),!0;t.resolved=i}}function wc(i,t,e){const n=t.slice(),{resolved:o}=i;i.current===i.then&&(n[i.value]=o),i.current===i.catch&&(n[i.error]=o),i.block.p(n,e)}const Cc=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global;function to(i,t){i.d(1),t.delete(i.key)}function Ot(i,t){S(i,1,1,()=>{t.delete(i.key)})}function qe(i,t,e,n,o,s,r,a,l,c,d,f){let u=i.length,h=s.length,p=u;const A={};for(;p--;)A[i[p].key]=p;const g=[],v=new Map,w=new Map;for(p=h;p--;){const C=f(o,s,p),L=e(C);let D=r.get(L);D?n&&D.p(C,t):(D=c(L,C),D.c()),v.set(L,g[p]=D),L in A&&w.set(L,Math.abs(p-A[L]))}const y=new Set,P=new Set;function I(C){k(C,1),C.m(a,d),r.set(C.key,C),d=C.first,h--}for(;u&&h;){const C=g[h-1],L=i[u-1],D=C.key,B=L.key;C===L?(d=C.first,u--,h--):v.has(B)?!r.has(D)||y.has(D)?I(C):P.has(B)?u--:w.get(D)>w.get(B)?(P.add(D),I(C)):(y.add(B),u--):(l(L,r),u--)}for(;u--;){const C=i[u];v.has(C.key)||l(C,r)}for(;h;)I(g[h-1]);return g}function Be(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 ya(i){return typeof i=="object"&&i!==null?i:{}}function $(i){i&&i.c()}function q(i,t,e,n){const{fragment:o,after_update:s}=i.$$;o&&o.m(t,e),n||De(()=>{const r=i.$$.on_mount.map(sa).filter(ii);i.$$.on_destroy?i.$$.on_destroy.push(...r):Qt(r),i.$$.on_mount=[]}),s.forEach(De)}function K(i,t){const e=i.$$;e.fragment!==null&&(Qt(e.on_destroy),e.fragment&&e.fragment.d(t),e.on_destroy=e.fragment=null,e.ctx=[])}function Ec(i,t){i.$$.dirty[0]===-1&&(ln.push(i),Aa(),i.$$.dirty.fill(0)),i.$$.dirty[t/31|0]|=1<<t%31}function ie(i,t,e,n,o,s,r,a=[-1]){const l=mn;at(i);const c=i.$$={fragment:null,ctx:[],props:s,update:Z,not_equal:o,bound:Lo(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(l?l.$$.context:[])),callbacks:Lo(),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 p=h.length?h[0]:u;return c.ctx&&o(c.ctx[f],c.ctx[f]=p)&&(!c.skip_bound&&c.bound[f]&&c.bound[f](p),d&&Ec(i,f)),u}):[],c.update(),d=!0,Qt(c.before_update),c.fragment=n?n(c.ctx):!1,t.target){if(t.hydrate){const f=mc(t.target);c.fragment&&c.fragment.l(f),f.forEach(M)}else c.fragment&&c.fragment.c();t.intro&&k(i.$$.fragment),q(i,t.target,t.anchor,t.customElement),eo()}at(l)}class oe{$destroy(){K(this,1),this.$destroy=Z}$on(t,e){if(!ii(e))return Z;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&&!fc(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Pc="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAAA8CAYAAACZ1L+0AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAYKADAAQAAAABAAAAPAAAAABU0H2EAAARRElEQVR4Ad2czY9cRZbFq1yFoQGDNCzwuAENohl54dkgdrNh34tZ8GciFi31nwEsmAEhhAWD1GMJCZgx5sMfUHN+J+NE3XfrZWWVcVVLHVLmuXG/74148V5m2bm/N8bR0dH+Bx988Po333zzbz///PONg4ODa+I9I9y/cuXKgV77h4eH+1KH3hP/yv7+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ZHv9oK/mwaPOlm/ukkbFwjKLj428j8t8DEEvN9xJoJuhsDI9lxOeHXr3zE8cGm7fpQMfNgR54ntXmYXzx1ltvbX64VUl4SH//66+/fl2/5ndLC/BHMV/Q6ypN06Bm3lgFaKMcEbj+bDHN88/curvewF4hjhNWasrwhy/0waIPjylyYjp49Ag++NhFhi7F+jeEFcc/H6w5TYbnxo2OoufXmNPcX+XWv4QLMo+taJkfeY4gvtRs/n8vzY/cssxB5CyKxi96/aB+/Y9+KfE/X3vttS8lI7e9/wfu514OAjYP0QAAAABJRU5ErkJggg==";function Ic(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 kc(i){let t,e,n=i[0].name+"",o,s,r,a,l;return{c(){t=V("div"),e=V("span"),o=Ee(n),s=ee(),r=V("div"),b(e,"class","room-label-item__text svelte-1d7uzh5"),T(e,"background-image","url("+Pc+")"),te(e,"wide",i[0].name.length>3),b(r,"class","room-label-item__bar svelte-1d7uzh5"),b(t,"class","room-label-item svelte-1d7uzh5"),T(t,"z-index",i[0].zIndex),T(t,"transform",i[0].transform),T(t,"opacity",i[0].visible?1:0)},m(c,d){z(c,t,d),Q(t,e),Q(e,o),Q(t,s),Q(t,r),a||(l=Se(e,"click",i[1]),a=!0)},p(c,[d]){d&1&&n!==(n=c[0].name+"")&&xe(o,n),d&1&&te(e,"wide",c[0].name.length>3),d&1&&T(t,"z-index",c[0].zIndex),d&1&&T(t,"transform",c[0].transform),d&1&&T(t,"opacity",c[0].visible?1:0)},i:Z,o:Z,d(c){c&&M(t),a=!1,l()}}}function xc(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 Dc extends oe{constructor(t){super(),ie(this,t,xc,kc,ne,{five:2,roomLabel:0},Ic)}}const{Map:Lc}=Cc;function Sc(i){le(i,"svelte-9eg4zi",".room-labels-container.svelte-9eg4zi{width:100%;height:100%;position:relative;color:#fff}")}function Mo(i,t,e){const n=i.slice();return n[12]=t[e],n}function zo(i,t){let e,n,o;return n=new Dc({props:{roomLabel:t[12],five:t[1]}}),{key:i,first:null,c(){e=fe(),$(n.$$.fragment),this.first=e},m(s,r){z(s,e,r),q(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){S(n.$$.fragment,s),o=!1},d(s){s&&M(e),K(n,s)}}}function Tc(i){let t,e=[],n=new Lc,o,s,r=i[0];const a=l=>l[12].id;for(let l=0;l<r.length;l+=1){let c=Mo(i,r,l),d=a(c);n.set(d,e[l]=zo(d,c))}return{c(){t=V("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){z(l,t,c);for(let d=0;d<e.length;d+=1)e[d].m(t,null);o=Et(t,i[6].bind(t)),s=!0},p(l,[c]){c&3&&(r=l[0],se(),e=qe(e,c,a,1,l,r,n,t,Ot,zo,null,Mo),re())},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)S(e[c]);s=!1},d(l){l&&M(t);for(let c=0;c<e.length;c+=1)e[c].d();o()}}}function Mc(i,t,e){var A;let n,{five:o}=t,{roomLabels:s}=t,r,a,l=(A=o.model.shownFloor)!=null?A:null;function c(g){if(!(l===null||g.floorIndex===l))return!1;const w=new H.Raycaster,y=o.camera.position.clone(),P=new H.Vector3(g.position.x,g.position.y,g.position.z),I=P.distanceTo(y);w.set(y.clone(),P.clone().sub(y).normalize());const[C]=o.model.intersectRaycaster(w);return!(C&&C.distance+1<I)}function d(g,v){const y=new H.Vector3(g.position.x,g.position.y,g.position.z).clone().project(o.camera),P=Math.ceil((y.x+1)/2*v.x),I=Math.ceil((-y.y+1)/2*v.y);return`translate(${P}px, ${I}px)`}function f(g){const{rendererSize:v,shownFloor:w}=g,y=new Map;function P(C){const L=y.get(C.id);if(L)return L;const{x:D,y:B,z:N}=C.position,F=new H.Vector3(D,B,N).clone().distanceTo(o.camera.position);return y.set(C.id,F),F}return s.map(C=>{const L=c(C),D=L?d(C,v):C.transform,B=P(C),F=s.filter(X=>X.visible&&P(X)<B).length*10;return he(G({},C),{visible:L,transform:D,zIndex:F})})}function u(){e(0,s=f({rendererSize:n,shownFloor:l}))}function h(g){e(4,l=g)}o.on("cameraUpdate",u),o.on("modelShownFloorChange",h),It(()=>{o.off("cameraUpdate",u),o.off("modelShownFloorChange",h)});function p(){r=this.clientWidth,a=this.clientHeight,e(2,r),e(3,a)}return i.$$set=g=>{"five"in g&&e(1,o=g.five),"roomLabels"in g&&e(0,s=g.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,p]}class zc extends oe{constructor(t){super(),ie(this,t,Mc,Tc,ne,{five:1,roomLabels:0},Sc)}}function Bc(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 Vc{constructor(t){m(this,"five");m(this,"enabled",!0);m(this,"fiveModeEnabled");m(this,"app");m(this,"wrapper");m(this,"roomLabels",[]);m(this,"container",document.createElement("div"));m(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=Bc(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 zc({target:this.container,props:{five:this.five,roomLabels:this.roomLabels}})}}}const jc=i=>new Vc(i),Qc={name:"ModelRoomLabelPlugin",version:0};var gt=(i=>(i[i.FLOOR=1]="FLOOR",i[i.CEILING=2]="CEILING",i[i.BOUNDING_CENTER=3]="BOUNDING_CENTER",i))(gt||{});function Zn(i){return Y(this,null,function*(){try{return[null,yield i]}catch(t){return t instanceof Error?[t,null]:[new Error(""),null]}})}function qn(i){return Object.prototype.toString.call(i)==="[object Object]"}function si(i,t){return i===t?!0:typeof i!=typeof t?!1:!!(Number.isNaN(i)&&Number.isNaN(t))}function Rc(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(!si(i[r],t[r]))return!1}return!0}function Oc(i,t){if(i.length!==t.length)return!1;for(let e=0,n=i.length;e<n;e++)if(!si(i[e],t[e]))return!1;return!0}function Hc(i,t){return si(i,t)?!0:qn(i)&&qn(t)?Rc(i,t):Array.isArray(i)&&Array.isArray(t)?Oc(i,t):!1}function no(i,t){return si(i,t)?!0:qn(i)&&qn(t)?Gc(i,t):Array.isArray(i)&&Array.isArray(t)?Fc(i,t):!1}function Fc(i,t){if(i.length!==t.length)return!1;for(let e=0,n=i.length;e<n;e++)if(!no(i[e],t[e]))return!1;return!0}function Gc(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(!no(i[r],t[r]))return!1}return!0}function Je(i,t,e={deep:!1}){return e.deep?no(i,t):Hc(i,t)}function qt(i){return i<.5?4*i*i*i:.5*Math.pow(2*i-2,3)+1}function wa(i){const t=i-1;return t*t*t+1}function Bt(i,{delay:t=0,duration:e=400,easing:n=yt}={}){const o=+getComputedStyle(i).opacity;return{delay:t,duration:e,easing:n,css:s=>`opacity: ${s*o}`}}function Bo(i,{delay:t=0,duration:e=400,easing:n=wa,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_${gc(d)}_${a}`,u=Zi(i),{stylesheet:h,rules:p}=Xn.get(u)||Ac(u,i);p[f]||(p[f]=!0,h.insertRule(`@keyframes ${f} ${d}`,h.cssRules.length));const A=i.style.animation||"";return i.style.animation=`${A?`${A}, `:""}${f} ${n}ms linear ${o}ms 1 both`,Yn+=1,f}function ji(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(", "),Yn-=o,Yn||vc())}function vc(){Ji(()=>{Yn||(Xn.forEach(i=>{const{ownerNode:t}=i.stylesheet;t&&M(t)}),Xn.clear())})}let mn;function at(i){mn=i}function Pt(){if(!mn)throw new Error("Function called outside component initialization");return mn}function qi(i){Pt().$$.before_update.push(i)}function Ze(i){Pt().$$.on_mount.push(i)}function Ki(i){Pt().$$.after_update.push(i)}function It(i){Pt().$$.on_destroy.push(i)}function oi(){const i=Pt();return(t,e,{cancelable:n=!1}={})=>{const o=i.$$.callbacks[t];if(o){const s=ma(t,e,{cancelable:n});return o.slice().forEach(r=>{r.call(i,s)}),!s.defaultPrevented}return!0}}function Un(i,t){return Pt().$$.context.set(i,t),t}function ct(i){return Pt().$$.context.get(i)}function $i(i,t){const e=i.$$.callbacks[t.type];e&&e.slice().forEach(n=>n.call(this,t))}const ln=[],Le=[],Qn=[],So=[],ga=Promise.resolve();let Qi=!1;function Aa(){Qi||(Qi=!0,ga.then(eo))}function bc(){return Aa(),ga}function De(i){Qn.push(i)}const yi=new Set;let Pn=0;function eo(){const i=mn;do{for(;Pn<ln.length;){const t=ln[Pn];Pn++,at(t),yc(t.$$)}for(at(null),ln.length=0,Pn=0;Le.length;)Le.pop()();for(let t=0;t<Qn.length;t+=1){const e=Qn[t];yi.has(e)||(yi.add(e),e())}Qn.length=0}while(ln.length);for(;So.length;)So.pop()();Qi=!1,yi.clear(),at(i)}function yc(i){if(i.fragment!==null){i.update(),Qt(i.before_update);const t=i.dirty;i.dirty=[-1],i.fragment&&i.fragment.p(i.ctx,t),i.after_update.forEach(De)}}let on;function va(){return on||(on=Promise.resolve(),on.then(()=>{on=null})),on}function Jn(i,t,e){i.dispatchEvent(ma(`${t?"intro":"outro"}${e}`))}const Rn=new Set;let mt;function se(){mt={r:0,c:[],p:mt}}function re(){mt.r||Qt(mt.c),mt=mt.p}function k(i,t){i&&i.i&&(Rn.delete(i),i.i(t))}function S(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 ba={duration:0};function Rt(i,t,e){let n=t(i,e),o=!1,s,r,a=0;function l(){s&&ji(i,s)}function c(){const{delay:f=0,duration:u=300,easing:h=yt,tick:p=Z,css:A}=n||ba;A&&(s=pa(i,0,1,u,f,h,A,a++)),p(0,1);const g=ca()+f,v=g+u;r&&r.abort(),o=!0,De(()=>Jn(i,!0,"start")),r=ua(w=>{if(o){if(w>=v)return p(1,0),Jn(i,!0,"end"),l(),o=!1;if(w>=g){const y=h((w-g)/u);p(y,1-y)}}return o})}let d=!1;return{start(){d||(d=!0,ji(i),ii(n)?(n=n(),va().then(c)):c())},invalidate(){d=!1},end(){o&&(l(),o=!1)}}}function tn(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=yt,tick:f=Z,css:u}=n||ba;u&&(s=pa(i,1,0,c,l,d,u));const h=ca()+l,p=h+c;De(()=>Jn(i,!1,"start")),ua(A=>{if(o){if(A>=p)return f(0,1),Jn(i,!1,"end"),--r.r||Qt(r.c),!1;if(A>=h){const g=d((A-h)/c);f(1-g,g)}}return o})}return ii(n)?va().then(()=>{n=n(),a()}):a(),{end(l){l&&n.tick&&n.tick(1,0),o&&(s&&ji(i,s),o=!1)}}}function To(i,t){const e=t.token={};function n(o,s,r,a){if(t.token!==e)return;t.resolved=a;let l=t.ctx;r!==void 0&&(l=l.slice(),l[r]=a);const c=o&&(t.current=o)(l);let d=!1;t.block&&(t.blocks?t.blocks.forEach((f,u)=>{u!==s&&f&&(se(),S(f,1,1,()=>{t.blocks[u]===f&&(t.blocks[u]=null)}),re())}):t.block.d(1),c.c(),k(c,1),c.m(t.mount(),t.anchor),d=!0),t.block=c,t.blocks&&(t.blocks[s]=c),d&&eo()}if(uc(i)){const o=Pt();if(i.then(s=>{at(o),n(t.then,1,t.value,s),at(null)},s=>{if(at(o),n(t.catch,2,t.error,s),at(null),!t.hasCatch)throw s}),t.current!==t.pending)return n(t.pending,0),!0}else{if(t.current!==t.then)return n(t.then,1,t.value,i),!0;t.resolved=i}}function wc(i,t,e){const n=t.slice(),{resolved:o}=i;i.current===i.then&&(n[i.value]=o),i.current===i.catch&&(n[i.error]=o),i.block.p(n,e)}const Cc=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global;function to(i,t){i.d(1),t.delete(i.key)}function Ot(i,t){S(i,1,1,()=>{t.delete(i.key)})}function qe(i,t,e,n,o,s,r,a,l,c,d,f){let u=i.length,h=s.length,p=u;const A={};for(;p--;)A[i[p].key]=p;const g=[],v=new Map,w=new Map;for(p=h;p--;){const C=f(o,s,p),L=e(C);let D=r.get(L);D?n&&D.p(C,t):(D=c(L,C),D.c()),v.set(L,g[p]=D),L in A&&w.set(L,Math.abs(p-A[L]))}const y=new Set,P=new Set;function I(C){k(C,1),C.m(a,d),r.set(C.key,C),d=C.first,h--}for(;u&&h;){const C=g[h-1],L=i[u-1],D=C.key,B=L.key;C===L?(d=C.first,u--,h--):v.has(B)?!r.has(D)||y.has(D)?I(C):P.has(B)?u--:w.get(D)>w.get(B)?(P.add(D),I(C)):(y.add(B),u--):(l(L,r),u--)}for(;u--;){const C=i[u];v.has(C.key)||l(C,r)}for(;h;)I(g[h-1]);return g}function Be(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 ya(i){return typeof i=="object"&&i!==null?i:{}}function $(i){i&&i.c()}function q(i,t,e,n){const{fragment:o,after_update:s}=i.$$;o&&o.m(t,e),n||De(()=>{const r=i.$$.on_mount.map(sa).filter(ii);i.$$.on_destroy?i.$$.on_destroy.push(...r):Qt(r),i.$$.on_mount=[]}),s.forEach(De)}function K(i,t){const e=i.$$;e.fragment!==null&&(Qt(e.on_destroy),e.fragment&&e.fragment.d(t),e.on_destroy=e.fragment=null,e.ctx=[])}function Ec(i,t){i.$$.dirty[0]===-1&&(ln.push(i),Aa(),i.$$.dirty.fill(0)),i.$$.dirty[t/31|0]|=1<<t%31}function ie(i,t,e,n,o,s,r,a=[-1]){const l=mn;at(i);const c=i.$$={fragment:null,ctx:[],props:s,update:Z,not_equal:o,bound:Lo(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(l?l.$$.context:[])),callbacks:Lo(),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 p=h.length?h[0]:u;return c.ctx&&o(c.ctx[f],c.ctx[f]=p)&&(!c.skip_bound&&c.bound[f]&&c.bound[f](p),d&&Ec(i,f)),u}):[],c.update(),d=!0,Qt(c.before_update),c.fragment=n?n(c.ctx):!1,t.target){if(t.hydrate){const f=mc(t.target);c.fragment&&c.fragment.l(f),f.forEach(M)}else c.fragment&&c.fragment.c();t.intro&&k(i.$$.fragment),q(i,t.target,t.anchor,t.customElement),eo()}at(l)}class oe{$destroy(){K(this,1),this.$destroy=Z}$on(t,e){if(!ii(e))return Z;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&&!fc(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Pc="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAAA8CAYAAACZ1L+0AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAYKADAAQAAAABAAAAPAAAAABU0H2EAAARRElEQVR4Ad2czY9cRZbFq1yFoQGDNCzwuAENohl54dkgdrNh34tZ8GciFi31nwEsmAEhhAWD1GMJCZgx5sMfUHN+J+NE3XfrZWWVcVVLHVLmuXG/74148V5m2bm/N8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eE8pj/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 Ic(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 kc(i){let t,e,n=i[0].name+"",o,s,r,a,l;return{c(){t=V("div"),e=V("span"),o=Ee(n),s=ee(),r=V("div"),b(e,"class","room-label-item__text svelte-1d7uzh5"),T(e,"background-image","url("+Pc+")"),te(e,"wide",i[0].name.length>3),b(r,"class","room-label-item__bar svelte-1d7uzh5"),b(t,"class","room-label-item svelte-1d7uzh5"),T(t,"z-index",i[0].zIndex),T(t,"transform",i[0].transform),T(t,"opacity",i[0].visible?1:0)},m(c,d){z(c,t,d),Q(t,e),Q(e,o),Q(t,s),Q(t,r),a||(l=Se(e,"click",i[1]),a=!0)},p(c,[d]){d&1&&n!==(n=c[0].name+"")&&xe(o,n),d&1&&te(e,"wide",c[0].name.length>3),d&1&&T(t,"z-index",c[0].zIndex),d&1&&T(t,"transform",c[0].transform),d&1&&T(t,"opacity",c[0].visible?1:0)},i:Z,o:Z,d(c){c&&M(t),a=!1,l()}}}function xc(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 Dc extends oe{constructor(t){super(),ie(this,t,xc,kc,ne,{five:2,roomLabel:0},Ic)}}const{Map:Lc}=Cc;function Sc(i){le(i,"svelte-9eg4zi",".room-labels-container.svelte-9eg4zi{width:100%;height:100%;position:relative;color:#fff}")}function Mo(i,t,e){const n=i.slice();return n[12]=t[e],n}function zo(i,t){let e,n,o;return n=new Dc({props:{roomLabel:t[12],five:t[1]}}),{key:i,first:null,c(){e=fe(),$(n.$$.fragment),this.first=e},m(s,r){z(s,e,r),q(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){S(n.$$.fragment,s),o=!1},d(s){s&&M(e),K(n,s)}}}function Tc(i){let t,e=[],n=new Lc,o,s,r=i[0];const a=l=>l[12].id;for(let l=0;l<r.length;l+=1){let c=Mo(i,r,l),d=a(c);n.set(d,e[l]=zo(d,c))}return{c(){t=V("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){z(l,t,c);for(let d=0;d<e.length;d+=1)e[d].m(t,null);o=Et(t,i[6].bind(t)),s=!0},p(l,[c]){c&3&&(r=l[0],se(),e=qe(e,c,a,1,l,r,n,t,Ot,zo,null,Mo),re())},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)S(e[c]);s=!1},d(l){l&&M(t);for(let c=0;c<e.length;c+=1)e[c].d();o()}}}function Mc(i,t,e){var A;let n,{five:o}=t,{roomLabels:s}=t,r,a,l=(A=o.model.shownFloor)!=null?A:null;function c(g){if(!(l===null||g.floorIndex===l))return!1;const w=new H.Raycaster,y=o.camera.position.clone(),P=new H.Vector3(g.position.x,g.position.y,g.position.z),I=P.distanceTo(y);w.set(y.clone(),P.clone().sub(y).normalize());const[C]=o.model.intersectRaycaster(w);return!(C&&C.distance+1<I)}function d(g,v){const y=new H.Vector3(g.position.x,g.position.y,g.position.z).clone().project(o.camera),P=Math.ceil((y.x+1)/2*v.x),I=Math.ceil((-y.y+1)/2*v.y);return`translate(${P}px, ${I}px)`}function f(g){const{rendererSize:v,shownFloor:w}=g,y=new Map;function P(C){const L=y.get(C.id);if(L)return L;const{x:D,y:B,z:N}=C.position,F=new H.Vector3(D,B,N).clone().distanceTo(o.camera.position);return y.set(C.id,F),F}return s.map(C=>{const L=c(C),D=L?d(C,v):C.transform,B=P(C),F=s.filter(X=>X.visible&&P(X)<B).length*10;return he(G({},C),{visible:L,transform:D,zIndex:F})})}function u(){e(0,s=f({rendererSize:n,shownFloor:l}))}function h(g){e(4,l=g)}o.on("cameraUpdate",u),o.on("modelShownFloorChange",h),It(()=>{o.off("cameraUpdate",u),o.off("modelShownFloorChange",h)});function p(){r=this.clientWidth,a=this.clientHeight,e(2,r),e(3,a)}return i.$$set=g=>{"five"in g&&e(1,o=g.five),"roomLabels"in g&&e(0,s=g.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,p]}class zc extends oe{constructor(t){super(),ie(this,t,Mc,Tc,ne,{five:1,roomLabels:0},Sc)}}function Bc(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 Vc{constructor(t){m(this,"five");m(this,"enabled",!0);m(this,"fiveModeEnabled");m(this,"app");m(this,"wrapper");m(this,"roomLabels",[]);m(this,"container",document.createElement("div"));m(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=Bc(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 zc({target:this.container,props:{five:this.five,roomLabels:this.roomLabels}})}}}const jc=i=>new Vc(i),Qc={name:"ModelRoomLabelPlugin",version:0};var gt=(i=>(i[i.FLOOR=1]="FLOOR",i[i.CEILING=2]="CEILING",i[i.BOUNDING_CENTER=3]="BOUNDING_CENTER",i))(gt||{});function Zn(i){return Y(this,null,function*(){try{return[null,yield i]}catch(t){return t instanceof Error?[t,null]:[new Error(""),null]}})}function qn(i){return Object.prototype.toString.call(i)==="[object Object]"}function si(i,t){return i===t?!0:typeof i!=typeof t?!1:!!(Number.isNaN(i)&&Number.isNaN(t))}function Rc(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(!si(i[r],t[r]))return!1}return!0}function Oc(i,t){if(i.length!==t.length)return!1;for(let e=0,n=i.length;e<n;e++)if(!si(i[e],t[e]))return!1;return!0}function Hc(i,t){return si(i,t)?!0:qn(i)&&qn(t)?Rc(i,t):Array.isArray(i)&&Array.isArray(t)?Oc(i,t):!1}function no(i,t){return si(i,t)?!0:qn(i)&&qn(t)?Gc(i,t):Array.isArray(i)&&Array.isArray(t)?Fc(i,t):!1}function Fc(i,t){if(i.length!==t.length)return!1;for(let e=0,n=i.length;e<n;e++)if(!no(i[e],t[e]))return!1;return!0}function Gc(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(!no(i[r],t[r]))return!1}return!0}function Je(i,t,e={deep:!1}){return e.deep?no(i,t):Hc(i,t)}function Zt(i){return i<.5?4*i*i*i:.5*Math.pow(2*i-2,3)+1}function wa(i){const t=i-1;return t*t*t+1}function Bt(i,{delay:t=0,duration:e=400,easing:n=yt}={}){const o=+getComputedStyle(i).opacity;return{delay:t,duration:e,easing:n,css:s=>`opacity: ${s*o}`}}function Bo(i,{delay:t=0,duration:e=400,easing:n=wa,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 Kn(i,{delay:t=0,speed:e,duration:n,easing:o=qt}={}){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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z8/uHTu2fpg9+3p29sYrWVnr1l1cO2HCUFCGT+tshUcWLPj6IDf37ued27Z9unXz2owZU6dOnnxp4sQ1q1ePH79KN6vbQWc1SrfrTit6lO5NO6/F8yZNmofBfgNTwRQLsPLsHQAAAABJRU5ErkJggg==";function Nc(i){return i*180/Math.PI}function Wc(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 _c(i){let t,e;return{c(){t=V("div"),e=V("div"),b(e,"class","floorplan__camera-rotate svelte-17cl35n"),T(e,"background-image",`url(${i[0]||wt})`),T(e,"width",i[4]),T(e,"height",i[4]),T(e,"left","-"+i[4]),T(e,"top","-"+i[4]),T(e,"transform",`rotate(${i[3]}deg)`),T(e,"transform-origin",`${i[4]} ${i[4]}`),b(t,"class","floorplan__camera-position svelte-17cl35n"),T(t,"left",i[1]),T(t,"top",i[2])},m(n,o){z(n,t,o),Q(t,e)},p(n,[o]){o&1&&T(e,"background-image",`url(${n[0]||wt})`)},i:Z,o:Z,d(n){n&&M(t)}}}function Xc(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=-Nc(s)+45,p=document.body.clientWidth,A=document.body.clientHeight,v=`${(p<500||A<500?17:37)/16}rem`;return i.$$set=w=>{"panoIndex"in w&&e(5,n=w.panoIndex),"floorplanData"in w&&e(6,o=w.floorplanData),"lastPanoramaLongitude"in w&&e(7,s=w.lastPanoramaLongitude),"cameraImageUrl"in w&&e(0,r=w.cameraImageUrl)},[r,f,u,h,v,n,o,s]}class Yc extends oe{constructor(t){super(),ie(this,t,Xc,_c,ne,{panoIndex:5,floorplanData:6,lastPanoramaLongitude:7,cameraImageUrl:0},Wc)}}const Uc="data:image/png;base64,iVBOR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5pbs0YWhxgtpj0rl1uiaHFISzccSWohUCzOIemm0VKChwHOMutKCVwHOA4av/JVi0xtDiRpCRfRcvQ4lBfxSnG0OJc/+xTjKHFyVRMP38iDC0O92lZVRhanO+vcVWGFu9BRWkW7+Z3rapEizdy7ZVm8V5Gtr8AtSnix59eOmYAAAAASUVORK5CYII=";function Jc(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 Zc(i){let t,e,n,o,s;return{c(){t=V("div"),e=V("div"),n=ee(),o=V("span"),s=Ee(i[0]),b(e,"class","floorplan-plugin__compass-image svelte-rpkaro"),T(e,"background-image",`url(${Uc})`),b(o,"class","floorplan-plugin__compass-text svelte-rpkaro"),b(t,"class","floorplan-plugin__compass svelte-rpkaro"),T(t,"transform",i[2])},m(r,a){z(r,t,a),Q(t,e),Q(t,n),Q(t,o),Q(o,s)},p(r,a){a&1&&xe(s,r[0])},d(r){r&&M(t)}}}function qc(i){let t,e=i[1]&&Zc(i);return{c(){e&&e.c(),t=fe()},m(n,o){e&&e.m(n,o),z(n,t,o)},p(n,[o]){n[1]&&e.p(n,o)},i:Z,o:Z,d(n){e&&e.d(n),n&&M(t)}}}function Kc(i){return i/Math.PI*180}function $c(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?Kc(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 ed extends oe{constructor(t){super(),ie(this,t,$c,qc,ne,{floorplanData:3,northDesc:0},Jc)}}const Wt=[];function io(i,t=Z){let e;const n=new Set;function o(a){if(ne(i,a)&&(i=a,e)){const l=!Wt.length;for(const c of n)c[1](),Wt.push(c,i);if(l){for(let c=0;c<Wt.length;c+=2)Wt[c][0](Wt[c+1]);Wt.length=0}}}function s(a){o(a(i))}function r(a,l=Z){const c=[a,l];return n.add(c),n.size===1&&(e=t(o)||Z),a(i),()=>{n.delete(c),n.size===0&&(e(),e=null)}}return{set:o,update:s,subscribe:r}}function td(i){le(i,"svelte-1gfoniz","img.svelte-1gfoniz{width:100%;height:100%}")}function nd(i){let t,e;return{c(){t=V("img"),Ne(t.src,e=i[0])||b(t,"src",e),b(t,"alt","floorplan iamge"),b(t,"class","svelte-1gfoniz")},m(n,o){z(n,t,o)},p(n,[o]){o&1&&!Ne(t.src,e=n[0])&&b(t,"src",e)},i:Z,o:Z,d(n){n&&M(t)}}}function id(i,t,e){let{url:n}=t;return i.$$set=o=>{"url"in o&&e(0,n=o.url)},[n]}class od extends oe{constructor(t){super(),ie(this,t,id,nd,ne,{url:0},td)}}function sd(i){le(i,"svelte-ub47ya",".floorplan-plugin__base-image.svelte-ub47ya{width:100%;height:100%}")}function rd(i){let t,e,n,o;return{c(){t=V("div"),e=new _n(!1),n=ee(),o=new _n(!1),e.a=n,o.a=null,b(t,"class","floorplan-plugin__base-image svelte-ub47ya")},m(s,r){z(s,t,r),e.m(i[1],t),Q(t,n),o.m(i[0],t)},p(s,[r]){r&1&&o.p(s[0])},i:Z,o:Z,d(s){s&&M(t)}}}function ad(i,t,e){let{content:n}=t;const o=`
|
|
106
|
+
opacity: ${l-d*u}`}}function Kn(i,{delay:t=0,speed:e,duration:n,easing:o=Zt}={}){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"&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NnLZhio+OmaR3LD6tplrLfKeYAwX7/O6Dje/2dpniwuKiwoMHH+bn7723Z8/uHTu2fpg9+3p29sYrWVnr1l1cO2HCUFCGT+tshUcWLPj6IDf37ued27Z9unXz2owZU6dOnnxp4sQ1q1ePH79KN6vbQWc1SrfrTit6lO5NO6/F8yZNmofBfgNTwRQLsPLsHQAAAABJRU5ErkJggg==";function Nc(i){return i*180/Math.PI}function Wc(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 _c(i){let t,e;return{c(){t=V("div"),e=V("div"),b(e,"class","floorplan__camera-rotate svelte-17cl35n"),T(e,"background-image",`url(${i[0]||wt})`),T(e,"width",i[4]),T(e,"height",i[4]),T(e,"left","-"+i[4]),T(e,"top","-"+i[4]),T(e,"transform",`rotate(${i[3]}deg)`),T(e,"transform-origin",`${i[4]} ${i[4]}`),b(t,"class","floorplan__camera-position svelte-17cl35n"),T(t,"left",i[1]),T(t,"top",i[2])},m(n,o){z(n,t,o),Q(t,e)},p(n,[o]){o&1&&T(e,"background-image",`url(${n[0]||wt})`)},i:Z,o:Z,d(n){n&&M(t)}}}function Xc(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=-Nc(s)+45,p=document.body.clientWidth,A=document.body.clientHeight,v=`${(p<500||A<500?17:37)/16}rem`;return i.$$set=w=>{"panoIndex"in w&&e(5,n=w.panoIndex),"floorplanData"in w&&e(6,o=w.floorplanData),"lastPanoramaLongitude"in w&&e(7,s=w.lastPanoramaLongitude),"cameraImageUrl"in w&&e(0,r=w.cameraImageUrl)},[r,f,u,h,v,n,o,s]}class Yc extends oe{constructor(t){super(),ie(this,t,Xc,_c,ne,{panoIndex:5,floorplan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ynGAV0m99u/2J6H3znGAvW4n+J25tdY7xwFey1pvQe6/DlrjOMDLqfXW7N5pbs0YWhxgtpj0rl1uiaHFISzccSWohUCzOIemm0VKChwHOMutKCVwHOA4av/JVi0xtDiRpCRfRcvQ4lBfxSnG0OJc/+xTjKHFyVRMP38iDC0O92lZVRhanO+vcVWGFu9BRWkW7+Z3rapEizdy7ZVm8V5Gtr8AtSnix59eOmYAAAAASUVORK5CYII=";function Jc(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 Zc(i){let t,e,n,o,s;return{c(){t=V("div"),e=V("div"),n=ee(),o=V("span"),s=Ee(i[0]),b(e,"class","floorplan-plugin__compass-image svelte-rpkaro"),T(e,"background-image",`url(${Uc})`),b(o,"class","floorplan-plugin__compass-text svelte-rpkaro"),b(t,"class","floorplan-plugin__compass svelte-rpkaro"),T(t,"transform",i[2])},m(r,a){z(r,t,a),Q(t,e),Q(t,n),Q(t,o),Q(o,s)},p(r,a){a&1&&xe(s,r[0])},d(r){r&&M(t)}}}function qc(i){let t,e=i[1]&&Zc(i);return{c(){e&&e.c(),t=fe()},m(n,o){e&&e.m(n,o),z(n,t,o)},p(n,[o]){n[1]&&e.p(n,o)},i:Z,o:Z,d(n){e&&e.d(n),n&&M(t)}}}function Kc(i){return i/Math.PI*180}function $c(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?Kc(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 ed extends oe{constructor(t){super(),ie(this,t,$c,qc,ne,{floorplanData:3,northDesc:0},Jc)}}const Wt=[];function io(i,t=Z){let e;const n=new Set;function o(a){if(ne(i,a)&&(i=a,e)){const l=!Wt.length;for(const c of n)c[1](),Wt.push(c,i);if(l){for(let c=0;c<Wt.length;c+=2)Wt[c][0](Wt[c+1]);Wt.length=0}}}function s(a){o(a(i))}function r(a,l=Z){const c=[a,l];return n.add(c),n.size===1&&(e=t(o)||Z),a(i),()=>{n.delete(c),n.size===0&&(e(),e=null)}}return{set:o,update:s,subscribe:r}}function td(i){le(i,"svelte-1gfoniz","img.svelte-1gfoniz{width:100%;height:100%}")}function nd(i){let t,e;return{c(){t=V("img"),Ne(t.src,e=i[0])||b(t,"src",e),b(t,"alt","floorplan iamge"),b(t,"class","svelte-1gfoniz")},m(n,o){z(n,t,o)},p(n,[o]){o&1&&!Ne(t.src,e=n[0])&&b(t,"src",e)},i:Z,o:Z,d(n){n&&M(t)}}}function id(i,t,e){let{url:n}=t;return i.$$set=o=>{"url"in o&&e(0,n=o.url)},[n]}class od extends oe{constructor(t){super(),ie(this,t,id,nd,ne,{url:0},td)}}function sd(i){le(i,"svelte-ub47ya",".floorplan-plugin__base-image.svelte-ub47ya{width:100%;height:100%}")}function rd(i){let t,e,n,o;return{c(){t=V("div"),e=new _n(!1),n=ee(),o=new _n(!1),e.a=n,o.a=null,b(t,"class","floorplan-plugin__base-image svelte-ub47ya")},m(s,r){z(s,t,r),e.m(i[1],t),Q(t,n),o.m(i[0],t)},p(s,[r]){r&1&&o.p(s[0])},i:Z,o:Z,d(s){s&&M(t)}}}function ad(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 ld extends oe{constructor(t){super(),ie(this,t,ad,rd,ne,{content:0},sd)}}function cd(i){le(i,"svelte-ozpg4a",".floorplan-plugin__base-image.svelte-ozpg4a{position:absolute;z-index:10;width:100%;height:100%;pointer-events:none}")}function dd(i){let t,e;return t=new od({props:{url:i[1].url}}),{c(){$(t.$$.fragment)},m(n,o){q(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){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function ud(i){let t,e;return t=new ld({props:{content:i[0]}}),{c(){$(t.$$.fragment)},m(n,o){q(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){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function fd(i){let t,e,n,o;const s=[ud,dd],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=V("div"),n&&n.c(),b(t,"class","floorplan-plugin__base-image svelte-ozpg4a")},m(l,c){z(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&&(se(),S(r[d],1,1,()=>{r[d]=null}),re()),~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){S(n),o=!1},d(l){l&&M(t),~e&&r[e].d()}}}function hd(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 Ca extends oe{constructor(t){super(),ie(this,t,hd,fd,ne,{floorIndex:2,floorplanData:3},cd)}}function md(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 pd(i){let t,e=i[4].outerHTML+"",n;return{c(){t=new _n(!1),n=fe(),t.a=n},m(o,s){t.m(e,o,s),z(o,n,s)},p(o,s){s&16&&e!==(e=o[4].outerHTML+"")&&t.p(e)},d(o){o&&M(n),o&&t.d()}}}function gd(i){let t,e=i[0].name+"",n,o,s,r;return{c(){t=V("span"),n=Ee(e),o=ee(),s=V("span"),r=Ee(i[5]),b(t,"class","floorplan-plugin__room-name"),b(s,"class","floorplan-plugin__room-size svelte-12pzct5")},m(a,l){z(a,t,l),Q(t,n),z(a,o,l),z(a,s,l),Q(s,r)},p(a,l){l&1&&e!==(e=a[0].name+"")&&xe(n,e),l&32&&xe(r,a[5])},d(a){a&&M(t),a&&M(o),a&&M(s)}}}function Ad(i){let t;function e(s,r){if(s[1]===void 0)return gd;if(s[4])return pd}let n=e(i),o=n&&n(i);return{c(){t=V("div"),o&&o.c(),b(t,"class","floorplan-plugin__room-label-item svelte-12pzct5"),T(t,"left",i[6]),T(t,"top",i[7]),T(t,"font-size",i[8]),T(t,"opacity",i[3]?"1":"0")},m(s,r){z(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&&T(t,"opacity",s[3]?"1":"0")},i:Z,o:Z,d(s){s&&M(t),o&&o.d(),i[16](null)}}}function vd(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 bd(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(D,B){if(B.width===0||B.height===0)return()=>!1;const N=D.path.map(({x:U,y:_})=>[U,_]),F=D.roomLabel.position,{x:X,y:j}=F,{width:E,height:R}=B,O=E/2,W=R/2;return function(_){const J=X*_,de=j*_,ue=N.map(([Pe,Me])=>[Pe*_,Me*_]);return[[J+O,de-W],[J-O,de-W],[J-O,de+W],[J+O,de+W]].every(Pe=>vd(Pe,ue))}}const p=document.body.clientWidth,A=document.body.clientHeight,g=l.roomLabel,v=g.positionInImage.x*100+"%",w=g.positionInImage.y*100+"%",y=(p<500||A<500?10:14)/16+"rem";let P=!1,I,C;c.subscribe(function(B){e(13,P=!!B&&B.id===l.id)}),Ze(()=>{const D=I==null?void 0:I.getClientRects()[0];e(14,C={width:D.width,height:D.height})});function L(D){Le[D?"unshift":"push"](()=>{I=D,e(2,I)})}return i.$$set=D=>{"pxmm"in D&&e(9,a=D.pxmm),"room"in D&&e(0,l=D.room),"hoveredRoom"in D&&e(10,c=D.hoveredRoom),"getRoomAreaText"in D&&e(11,d=D.getRoomAreaText),"getLabelElement"in D&&e(1,f=D.getLabelElement),"adaptiveRoomLabelVisibleEnable"in D&&e(12,u=D.adaptiveRoomLabelVisibleEnable)},i.$$.update=()=>{i.$$.dirty&2049&&e(5,n=l.size?d(l.size):""),i.$$.dirty&16385&&e(15,o=C?h(l,C):void 0),i.$$.dirty&3&&e(4,s=f==null?void 0:f(l)),i.$$.dirty&45568&&e(3,r=u?P?!0:!!(o!=null&&o(a)):!0)},[l,f,I,r,s,n,v,w,y,a,c,d,u,P,C,o,L]}class yd extends oe{constructor(t){super(),ie(this,t,bd,Ad,ne,{pxmm:9,room:0,hoveredRoom:10,getRoomAreaText:11,getLabelElement:1,adaptiveRoomLabelVisibleEnable:12},md)}}function wd(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 Vo(i,t,e){const n=i.slice();return n[10]=t[e],n}function jo(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=Vo(i,r,l),d=a(c);n.set(d,e[l]=Qo(d,c))}return{c(){t=V("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){z(l,t,c);for(let d=0;d<e.length;d+=1)e[d].m(t,null);o=Et(t,i[9].bind(t)),s=!0},p(l,c){c&111&&(r=l[6],se(),e=qe(e,c,a,1,l,r,n,t,Ot,Qo,null,Vo),re())},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)S(e[c]);s=!1},d(l){l&&M(t);for(let c=0;c<e.length;c+=1)e[c].d();o()}}}function Qo(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=we(r,s[a]);return n=new yd({props:r}),{key:i,first:null,c(){e=fe(),$(n.$$.fragment),this.first=e},m(a,l){z(a,e,l),q(n,a,l),o=!0},p(a,l){t=a;const c=l&111?Be(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){S(n.$$.fragment,a),o=!1},d(a){a&&M(e),K(n,a)}}}function Cd(i){let t,e,n=i[6]&&jo(i);return{c(){n&&n.c(),t=fe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[6]?n?(n.p(o,s),s&64&&k(n,1)):(n=jo(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(se(),S(n,1,1,()=>{n=null}),re())},i(o){e||(k(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function Ed(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:p}=s.bounding,A=h.x-p.x;e(5,f=d/A)}},[r,a,l,c,d,f,n,o,s,u]}class Pd extends oe{constructor(t){super(),ie(this,t,Ed,Cd,ne,{floorIndex:7,floorplanData:8,hoveredRoom:0,getRoomAreaText:1,getLabelElement:2,adaptiveRoomLabelVisibleEnable:3},wd)}}function Id(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 Ro(i,t,e){const n=i.slice();return n[11]=t[e],n[13]=e,n}function Oo(i,t,e){const n=i.slice();return n[14]=t[e],n}function Ho(i){let t;return{c(){t=V("div"),b(t,"class","floorplan-plugin__rule-scale svelte-djlmk4"),T(t,"left",i[14].left*100+"%"),T(t,"bottom",i[14].bottom*100+"%")},m(e,n){z(e,t,n)},p:Z,d(e){e&&M(t)}}}function Fo(i,t){let e,n,o=t[1](t[11].distance)+"",s,r;return{key:i,first:null,c(){e=V("div"),n=V("div"),s=Ee(o),r=ee(),b(n,"class","floorplan-plugin__rule-text svelte-djlmk4"),te(n,"is-row",t[2]),b(e,"class","floorplan-plugin__rule-text-item svelte-djlmk4"),T(e,"left",t[11].left*100+"%"),T(e,"bottom",t[11].bottom*100+"%"),this.first=e},m(a,l){z(a,e,l),Q(e,n),Q(n,s),Q(e,r)},p(a,l){t=a,l&2&&o!==(o=t[1](t[11].distance)+"")&&xe(s,o)},d(a){a&&M(e)}}}function kd(i){let t,e,n,o,s,r,a=[],l=new Map,c,d=i[3],f=[];for(let p=0;p<d.length;p+=1)f[p]=Ho(Oo(i,d,p));let u=i[4];const h=p=>p[13];for(let p=0;p<u.length;p+=1){let A=Ro(i,u,p),g=h(A);l.set(g,a[p]=Fo(g,A))}return{c(){t=V("div"),e=V("div"),n=ee(),o=V("div");for(let p=0;p<f.length;p+=1)f[p].c();s=ee(),r=V("div");for(let p=0;p<a.length;p+=1)a[p].c();b(e,"class","floorplan-plugin__rule-line svelte-djlmk4"),b(o,"class","floorplan-plugin__rule-scale-wrapper svelte-djlmk4"),te(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"),te(t,"is-row",i[2]),T(t,"width",i[2]?"100%":1/16+"rem"),T(t,"height",i[2]?1/16+"rem":"100%")},m(p,A){z(p,t,A),Q(t,e),Q(t,n),Q(t,o);for(let g=0;g<f.length;g+=1)f[g].m(o,null);Q(t,s),Q(t,r);for(let g=0;g<a.length;g+=1)a[g].m(r,null)},p(p,[A]){if(A&8){d=p[3];let g;for(g=0;g<d.length;g+=1){const v=Oo(p,d,g);f[g]?f[g].p(v,A):(f[g]=Ho(v),f[g].c(),f[g].m(o,null))}for(;g<f.length;g+=1)f[g].d(1);f.length=d.length}A&22&&(u=p[4],a=qe(a,A,h,1,p,u,l,r,to,Fo,null,Ro)),A&1&&c!==(c="floorplan-plugin__rule-labels floorplan-plugin__rule-labels--"+p[0]+" svelte-djlmk4")&&b(t,"class",c),A&5&&te(t,"is-row",p[2])},i:Z,o:Z,d(p){p&&M(t),lt(f,p);for(let A=0;A<a.length;A+=1)a[A].d()}}}const _t=1e3,Xt=180;function xd(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-(_t-Xt)*2,c=s.max.y-s.min.y-(_t-Xt)*2,d=o.map(([p,A])=>a?[p.x,A.x]:[p.y,A.y]).flat().sort().filter((p,A,g)=>A===0?!0:p!==g[A-1]),f=d.map(p=>{const A=a?(p-s.min.x-_t+Xt)/l:0,g=a?0:(p-s.min.y-_t+Xt)/c;return{left:A,bottom:g}});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((p,A,g)=>{const v=A===0?0:p-g[A-1],w=A===0?0:(p+g[A-1])/2,y=a?(w-s.min.x-_t+Xt)/l:0,P=a?0:(w-s.min.y-_t+Xt)/c;return{left:y,bottom:P,distance:v}}).filter(({distance:p})=>p/u>.1);return i.$$set=p=>{"type"in p&&e(0,n=p.type),"data"in p&&e(5,o=p.data),"bounding"in p&&e(6,s=p.bounding),"getRuleDistanceText"in p&&e(1,r=p.getRuleDistanceText)},[n,r,a,f,h,o,s]}class Dd extends oe{constructor(t){super(),ie(this,t,xd,kd,ne,{type:0,data:5,bounding:6,getRuleDistanceText:1},Id)}}function Ld(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 Go(i,t,e){const n=i.slice();return n[13]=t[e][0],n[14]=t[e][1],n}function No(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=we(r,s[a]);return n=new Dd({props:r}),{key:i,first:null,c(){e=fe(),$(n.$$.fragment),this.first=e},m(a,l){z(a,e,l),q(n,a,l),o=!0},p(a,l){t=a;const c=l&19?Be(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){S(n.$$.fragment,a),o=!1},d(a){a&&M(e),K(n,a)}}}function Sd(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=Go(i,s,a),c=r(l);n.set(c,e[a]=No(c,l))}return{c(){t=V("div");for(let a=0;a<e.length;a+=1)e[a].c();b(t,"class","floorplan-plugin__rule-labels-wrapper svelte-1mzj9p3"),T(t,"width",i[3]),T(t,"height",i[2])},m(a,l){z(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],se(),e=qe(e,l,r,1,a,s,n,t,Ot,No,null,Go),re()),l&8&&T(t,"width",a[3]),l&4&&T(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)S(e[l]);o=!1},d(a){a&&M(t);for(let l=0;l<e.length;l+=1)e[l].d()}}}const Wo=1e3,_o=180;function Td(i,t,e){let n,o,s,r,a,l,c,d,f,u,{floorIndex:h}=t,{floorplanData:p}=t,{getRuleDistanceText:A}=t;return i.$$set=g=>{"floorIndex"in g&&e(5,h=g.floorIndex),"floorplanData"in g&&e(6,p=g.floorplanData),"getRuleDistanceText"in g&&e(0,A=g.getRuleDistanceText)},i.$$.update=()=>{i.$$.dirty&64&&e(1,n=p.bounding),i.$$.dirty&96&&e(11,o=p.floorDatas[h].rules),i.$$.dirty&2048&&e(12,s=Object.keys(o)),i.$$.dirty&6144&&e(4,r=s.map(g=>[g,o[g]])),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-(Wo-_o)*2),i.$$.dirty&2&&e(8,d=n.max.y-n.min.y-(Wo-_o)*2),i.$$.dirty&1536&&e(3,f=c/a*100+"%"),i.$$.dirty&384&&e(2,u=d/l*100+"%")},[A,n,u,f,r,h,p,l,d,a,c,o,s]}class Md extends oe{constructor(t){super(),ie(this,t,Td,Sd,ne,{floorIndex:5,floorplanData:6,getRuleDistanceText:0},Ld)}}function ri(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 Ea({x:i,y:t},e){const{max:n,min:o}=e;return{x:i-o.x,y:n.y-t}}function zd(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 Bd(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 Vd(i,t){return Math.max(...t.work.observers.map(n=>i.z>=n.standingPosition.z?n.floorIndex:0))}function jd(i){let t;return{c(){t=Ae("path"),b(t,"d",i[0]),b(t,"fill","#2F313A")},m(e,n){z(e,t,n)},p(e,[n]){n&1&&b(t,"d",e[0])},i:Z,o:Z,d(e){e&&M(t)}}}function Qd(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=ri(o,{needZ:!0}))},[n,o]}class Rd extends oe{constructor(t){super(),ie(this,t,Qd,jd,ne,{path:1})}}function Od(i){let t,e,n,o,s,r;return{c(){t=Ae("defs"),e=Ae("pattern"),n=Ae("rect"),o=Ae("path"),s=ee(),r=Ae("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){z(a,t,l),Q(t,e),Q(e,n),Q(e,o),z(a,s,l),z(a,r,l)},p(a,[l]){l&1&&b(r,"d",a[0])},i:Z,o:Z,d(a){a&&M(t),a&&M(s),a&&M(r)}}}const wi=6;function Hd(i,t,e){let n,{path:o}=t;const s=wi*2,r=`M0 ${wi} h ${s} M${wi} 0 v ${s}`;return i.$$set=a=>{"path"in a&&e(3,o=a.path)},i.$$.update=()=>{i.$$.dirty&8&&e(0,n=ri(o,{needZ:!0}))},[n,s,r,o]}class Fd extends oe{constructor(t){super(),ie(this,t,Hd,Od,ne,{path:3})}}function Gd(i){let t,e,n,o,s,r,a,l,c,d,f;return{c(){t=Ae("defs"),e=Ae("pattern"),n=Ae("rect"),o=Ae("pattern"),s=Ae("rect"),r=ee(),a=Ae("path"),l=ee(),c=Ae("path"),d=ee(),f=Ae("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){z(u,t,h),Q(t,e),Q(e,n),Q(t,o),Q(o,s),z(u,r,h),z(u,a,h),z(u,l,h),z(u,c,h),z(u,d,h),z(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:Z,o:Z,d(u){u&&M(t),u&&M(r),u&&M(a),u&&M(l),u&&M(c),u&&M(d),u&&M(f)}}}function Nd(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=ri(o,{needZ:!0}))},[n,o]}class Wd extends oe{constructor(t){super(),ie(this,t,Nd,Gd,ne,{path:1})}}function _d(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 Xo(i,t,e){const n=i.slice();return n[5]=t[e],n}function Xd(i){let t,e;return t=new Fd({props:{path:i[5].path}}),{c(){$(t.$$.fragment)},m(n,o){q(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){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function Yd(i){let t,e;return t=new Wd({props:{path:i[5].path}}),{c(){$(t.$$.fragment)},m(n,o){q(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){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function Ud(i){let t,e;return t=new Rd({props:{path:i[5].path}}),{c(){$(t.$$.fragment)},m(n,o){q(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){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function Yo(i){let t,e,n,o;const s=[Ud,Yd,Xd],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=Ae("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){z(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):(se(),S(r[d],1,1,()=>{r[d]=null}),re(),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){S(n),o=!1},d(l){l&&M(t),r[e].d()}}}function Jd(i){let t,e,n=i[0],o=[];for(let r=0;r<n.length;r+=1)o[r]=Yo(Xo(i,n,r));const s=r=>S(o[r],1,1,()=>{o[r]=null});return{c(){t=V("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){z(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=Xo(r,n,l);o[l]?(o[l].p(c,a),k(o[l],1)):(o[l]=Yo(c),o[l].c(),k(o[l],1),o[l].m(t,null))}for(se(),l=n.length;l<o.length;l+=1)s(l);re()}},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)S(o[a]);e=!1},d(r){r&&M(t),lt(o,r)}}}function Zd(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=>he(G({},l),{path:l.path.map(c=>Ea(c,s.bounding))})))},[n,r,a,o,s]}class qd extends oe{constructor(t){super(),ie(this,t,Zd,Jd,ne,{floorIndex:3,floorplanData:4},_d)}}function Kd(i){le(i,"svelte-19uvvss","path.svelte-19uvvss{opacity:0}path.svelte-19uvvss:hover{opacity:0.1}")}function $d(i){let t,e,n;return{c(){t=Ae("path"),b(t,"d",i[2]),b(t,"fill","#fff"),b(t,"class","svelte-19uvvss")},m(o,s){z(o,t,s),e||(n=[Se(t,"mouseenter",i[0]),Se(t,"mouseleave",i[1])],e=!0)},p:Z,i:Z,o:Z,d(o){o&&M(t),e=!1,Qt(n)}}}function eu(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=ri(n.path,{needZ:!0,format:d=>Ea(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 tu extends oe{constructor(t){super(),ie(this,t,eu,$d,ne,{room:3,floorplanData:4,hoveredRoom:5},Kd)}}function nu(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 Uo(i,t,e){const n=i.slice();return n[5]=t[e],n}function Jo(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=we(r,s[a]);return n=new tu({props:r}),{key:i,first:null,c(){e=fe(),$(n.$$.fragment),this.first=e},m(a,l){z(a,e,l),q(n,a,l),o=!0},p(a,l){t=a;const c=l&7?Be(s,[{room:t[5],floorplanData:t[1],hoveredRoom:t[2]}]):{};n.$set(c)},i(a){o||(k(n.$$.fragment,a),o=!0)},o(a){S(n.$$.fragment,a),o=!1},d(a){a&&M(e),K(n,a)}}}function iu(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=Uo(i,r,l),d=a(c);o.set(d,n[l]=Jo(d,c))}return{c(){t=V("div"),e=Ae("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){z(l,t,c),Q(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,se(),n=qe(n,c,a,1,l,r,o,e,Ot,Jo,null,Uo),re())},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)S(n[c]);s=!1},d(l){l&&M(t);for(let c=0;c<n.length;c+=1)n[c].d()}}}function ou(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 Pa extends oe{constructor(t){super(),ie(this,t,ou,iu,ne,{floorIndex:0,floorplanData:1,hoveredRoom:2},nu)}}function su(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 Zo(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=we(o,n[s]);return t=new Pa({props:o}),{c(){$(t.$$.fragment)},m(s,r){q(t,s,r),e=!0},p(s,r){const a=r&1058?Be(n,[{floorIndex:s[1],floorplanData:s[5],hoveredRoom:s[10]}]):{};t.$set(a)},i(s){e||(k(t.$$.fragment,s),e=!0)},o(s){S(t.$$.fragment,s),e=!1},d(s){K(t,s)}}}function qo(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=we(o,n[s]);return t=new Pd({props:o}),{c(){$(t.$$.fragment)},m(s,r){q(t,s,r),e=!0},p(s,r){const a=r&1762?Be(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){S(t.$$.fragment,s),e=!1},d(s){K(t,s)}}}function Ko(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=we(o,n[s]);return t=new Md({props:o}),{c(){$(t.$$.fragment)},m(s,r){q(t,s,r),e=!0},p(s,r){const a=r&290?Be(n,[{floorplanData:s[5],floorIndex:s[1],getRuleDistanceText:s[8]}]):{};t.$set(a)},i(s){e||(k(t.$$.fragment,s),e=!0)},o(s){S(t.$$.fragment,s),e=!1},d(s){K(t,s)}}}function ru(i){let t,e,n,o,s,r,a,l,c;const d=[{floorIndex:i[1],floorplanData:i[5]}];let f={};for(let v=0;v<d.length;v+=1)f=we(f,d[v]);e=new qd({props:f});let u=i[2]&&Zo(i);const h=[{floorplanData:i[5],floorIndex:i[1]}];let p={};for(let v=0;v<h.length;v+=1)p=we(p,h[v]);s=new Ca({props:p});let A=i[3]&&qo(i),g=i[4]&&Ko(i);return{c(){t=V("div"),$(e.$$.fragment),n=ee(),u&&u.c(),o=ee(),$(s.$$.fragment),r=ee(),A&&A.c(),a=ee(),g&&g.c(),b(t,"class",l=je(`floorplan-plugin__floor${i[0]?" floorplan-plugin__floor--is-current":""}`)+" svelte-bl8zrz")},m(v,w){z(v,t,w),q(e,t,null),Q(t,n),u&&u.m(t,null),Q(t,o),q(s,t,null),Q(t,r),A&&A.m(t,null),Q(t,a),g&&g.m(t,null),c=!0},p(v,[w]){const y=w&34?Be(d,[{floorIndex:v[1],floorplanData:v[5]}]):{};e.$set(y),v[2]?u?(u.p(v,w),w&4&&k(u,1)):(u=Zo(v),u.c(),k(u,1),u.m(t,o)):u&&(se(),S(u,1,1,()=>{u=null}),re());const P=w&34?Be(h,[{floorplanData:v[5],floorIndex:v[1]}]):{};s.$set(P),v[3]?A?(A.p(v,w),w&8&&k(A,1)):(A=qo(v),A.c(),k(A,1),A.m(t,a)):A&&(se(),S(A,1,1,()=>{A=null}),re()),v[4]?g?(g.p(v,w),w&16&&k(g,1)):(g=Ko(v),g.c(),k(g,1),g.m(t,null)):g&&(se(),S(g,1,1,()=>{g=null}),re()),(!c||w&1&&l!==(l=je(`floorplan-plugin__floor${v[0]?" floorplan-plugin__floor--is-current":""}`)+" svelte-bl8zrz"))&&b(t,"class",l)},i(v){c||(k(e.$$.fragment,v),k(u),k(s.$$.fragment,v),k(A),k(g),c=!0)},o(v){S(e.$$.fragment,v),S(u),S(s.$$.fragment,v),S(A),S(g),c=!1},d(v){v&&M(t),K(e),u&&u.d(),K(s),A&&A.d(),g&&g.d()}}}function au(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=io(void 0);return i.$$set=p=>{"isCurrent"in p&&e(0,n=p.isCurrent),"floorIndex"in p&&e(1,o=p.floorIndex),"hoverEnable"in p&&e(2,s=p.hoverEnable),"roomLabelsEnable"in p&&e(3,r=p.roomLabelsEnable),"ruleLabelsEnable"in p&&e(4,a=p.ruleLabelsEnable),"floorplanData"in p&&e(5,l=p.floorplanData),"getRoomAreaText"in p&&e(6,c=p.getRoomAreaText),"getLabelElement"in p&&e(7,d=p.getLabelElement),"getRuleDistanceText"in p&&e(8,f=p.getRuleDistanceText),"adaptiveRoomLabelVisibleEnable"in p&&e(9,u=p.adaptiveRoomLabelVisibleEnable)},[n,o,s,r,a,l,c,d,f,u,h]}class lu extends oe{constructor(t){super(),ie(this,t,au,ru,ne,{isCurrent:0,floorIndex:1,hoverEnable:2,roomLabelsEnable:3,ruleLabelsEnable:4,floorplanData:5,getRoomAreaText:6,getLabelElement:7,getRuleDistanceText:8,adaptiveRoomLabelVisibleEnable:9},su)}}function cu(i){le(i,"svelte-86bqav",".floorplan-main.svelte-86bqav{width:100%;height:100%;pointer-events:none}")}function $o(i,t,e){const n=i.slice();return n[16]=t[e],n}function es(i){let t,e,n,o,s,r,a=i[9].floorDatas,l=[];for(let h=0;h<a.length;h+=1)l[h]=ts($o(i,a,h));const c=h=>S(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=we(f,d[h]);n=new Yc({props:f});let u=i[6]&&ns(i);return{c(){t=V("div");for(let h=0;h<l.length;h+=1)l[h].c();e=ee(),$(n.$$.fragment),o=ee(),u&&u.c(),b(t,"class","floorplan-main svelte-86bqav")},m(h,p){z(h,t,p);for(let A=0;A<l.length;A+=1)l[A].m(t,null);Q(t,e),q(n,t,null),Q(t,o),u&&u.m(t,null),r=!0},p(h,p){if(i=h,p&62384){a=i[9].floorDatas;let g;for(g=0;g<a.length;g+=1){const v=$o(i,a,g);l[g]?(l[g].p(v,p),k(l[g],1)):(l[g]=ts(v),l[g].c(),k(l[g],1),l[g].m(t,e))}for(se(),g=a.length;g<l.length;g+=1)c(g);re()}const A=p&3592?Be(d,[{panoIndex:i[3],floorplanData:i[9],lastPanoramaLongitude:i[10],cameraImageUrl:i[11]}]):{};n.$set(A),i[6]?u?(u.p(i,p),p&64&&k(u,1)):(u=ns(i),u.c(),k(u,1),u.m(t,null)):u&&(se(),S(u,1,1,()=>{u=null}),re())},i(h){if(!r){for(let p=0;p<a.length;p+=1)k(l[p]);k(n.$$.fragment,h),k(u),s||De(()=>{s=Rt(t,Bt,{duration:i[0],easing:yt}),s.start()}),r=!0}},o(h){l=l.filter(Boolean);for(let p=0;p<l.length;p+=1)S(l[p]);S(n.$$.fragment,h),S(u),r=!1},d(h){h&&M(t),lt(l,h),K(n),u&&u.d()}}}function ts(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=we(o,n[s]);return t=new lu({props:o}),{c(){$(t.$$.fragment)},m(s,r){q(t,s,r),e=!0},p(s,r){const a=r&62384?Be(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){S(t.$$.fragment,s),e=!1},d(s){K(t,s)}}}function ns(i){let t,e;return t=new ed({props:{floorplanData:i[9],northDesc:i[2]}}),{c(){$(t.$$.fragment)},m(n,o){q(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){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function du(i){let t,e,n=i[1]&&es(i);return{c(){n&&n.c(),t=fe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[1]?n?(n.p(o,s),s&2&&k(n,1)):(n=es(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(se(),S(n,1,1,()=>{n=null}),re())},i(o){e||(k(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function uu(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:p}=t,{getRoomAreaText:A}=t,{getLabelElement:g}=t,{getRuleDistanceText:v}=t,{adaptiveRoomLabelVisibleEnable:w}=t;return i.$$set=y=>{"duration"in y&&e(0,n=y.duration),"visible"in y&&e(1,o=y.visible),"northDesc"in y&&e(2,s=y.northDesc),"panoIndex"in y&&e(3,r=y.panoIndex),"floorIndex"in y&&e(4,a=y.floorIndex),"hoverEnable"in y&&e(5,l=y.hoverEnable),"compassEnable"in y&&e(6,c=y.compassEnable),"roomLabelsEnable"in y&&e(7,d=y.roomLabelsEnable),"ruleLabelsEnable"in y&&e(8,f=y.ruleLabelsEnable),"floorplanData"in y&&e(9,u=y.floorplanData),"lastPanoramaLongitude"in y&&e(10,h=y.lastPanoramaLongitude),"cameraImageUrl"in y&&e(11,p=y.cameraImageUrl),"getRoomAreaText"in y&&e(12,A=y.getRoomAreaText),"getLabelElement"in y&&e(13,g=y.getLabelElement),"getRuleDistanceText"in y&&e(14,v=y.getRuleDistanceText),"adaptiveRoomLabelVisibleEnable"in y&&e(15,w=y.adaptiveRoomLabelVisibleEnable)},[n,o,s,r,a,l,c,d,f,u,h,p,A,g,v,w]}class oo extends oe{constructor(t){super(),ie(this,t,uu,du,ne,{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},cu)}}const fu="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC0AAAAwCAYAAACFUvPfAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAALaADAAQAAAABAAAAMAAAAADe2FZjAAAEF0lEQVRoBe2WzWskRRiHf13V092TxI2oEzYeVDwITtyDuCiihwiCePGgxIM3vYgHL4J4UIhBRA8i/gPqyUvWg7AiIuIeloDiYUHJLOK6BPwIk9nNODM9Xf1RVe1b3elJRjCZmQ6euqGmuqer33rq4e23GqiOykBloDJQGagMVAYqA5WBykBlYFYD1qwP/tdzaZqOx9zYOLxeX0+L5yzLGp0X/03a25MOnGRcBtx+6Rlo9SL08G4EooFnxa8Yiivox5/h5Ys/4cl7NVorNDRnngX+0MIkVMeMSf23zyKML8J7/Dy8hwF2Buh9CnS+AEQIdLspBuGb+M7/qLW4qJrNpsLapjYhpwVnx3BMfCtNNx3Etc9xywvnMf80wG8HmQainw0RxSGrnmeBp+8k5/j9S0HbvXb5io0Lz880/0wPHV1NlhLd316He+4xOCv5ragF7L9PrH1qBJyB0626x/lC+qrSvH5r/W+n1WpxUM5nMY4GPeH8lHJaPgfeAFQHCL+ntkXT+vnUc3W6pvTIwC0wy3rA4dwLmK2avZ7Eo9uKBuYJfgJscbs8dLCxDMt+EOEPBEZNEWyBYHqTz6bPXrzUnNrSShxHIsYiOL69zrCGLLcLqJP68tB+9w5wj+YhWDafQ2s61wNqxjZhmrQ2pvMFCEvXuCUZ7wqH794ZWs28LJqlTXSUyuksF2M/yOwqgkx2c1ADa4wLAQRk2sAGQQakhN6yFC2hltfz5kSY44NKQeeh+vtI/SSzWhg2CzCgmWISmKUGmaYFBDfCSymnfxJ6/+ospVcWOLLp5DGP/y0P/Rp66O99DQNq7Po3Ds0a0wY+My2QSv2N2mO/OyxR2o6UQk+Lv7yJ06JYSnnolZVU9cUn2O9SmaMWGFBqYXRwbqAJWIi94TX5biotpcGl1DXZ6LnqIbNDTnmUgi52Mv5l5ysMxIcZcGjy2DTK4ZHlcBC14zeSge4qphICjj3bS0A7o9nSp2TOkm7aZ8bGZy/jxhO87V91G0+dfY/Z7BWIIK9KYUi5qy/Hf8YfBG3sqJTHiQWhmTVkbip+wX3x6volVSx+LPAxF+VLXhZ8VQ+iP2Rta/iWe5v42Fngj0BbdnRTXh12ZIcKhTaGbcYjybRwXBU1lu9KlndXp04NM52poKWO0RZsviNaP9a6grkO972+st05pXhE5c1hTEluJy7XUejGUQNLMbAmTdWY1rKBLW3aTJqBZ7nZkb36DhYCreeYHbMUXHvaYi5XDK70EcgulmRjm77wNtenzuXCbmnTRaAx493rbGf3Jr/njMzj920CnKdUaFCjlDioy7NYNvOdGrQJNgI32/L2tkXfFPlxgToqjWVhD6KdLnQRdARf/HHQz2r2X2Gqy8pAZaAyUBmoDFQGKgP/q4F/AJYg9/s0ZoABAAAAAElFTkSuQmCC";function hu(i){return Y(this,null,function*(){const t=new Headers({"Content-Type":"text/plain"}),e=function(o){return Y(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 mu(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 pu(i){return{floorName:i.floor_name,floorIndex:i.floor_index,rooms:i.rooms.map(mu),rules:i.rules}}function gu(i){return{index:i.index,floorIndex:i.floor_index,position:i.position,positionInImage:i.position_in_image}}function Au(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 Ct(i){return Y(this,null,function*(){const t=yield hu(i.outlines),e=i.computed_data.bounding,n=i.computed_data.floor_datas.map(pu),o=i.computed_data.entrance?Au(i.computed_data.entrance):null;return{outlines:t,entrance:o,bounding:e,floorDatas:n,observers:i.computed_data.observers.map(gu)}})}function vu(i,t,e){return i.map(o=>{const s=o.position,r=o.icon?o.icon:{url:fu,width:45,height:48},a=Vd(s,t),l=zd(s,e),c=Bd(l,e);return{floorIndex:a,icon:r,id:o.id,position:l,positionInImage:c}})}function bu(i,t){return t(i),i}function ai(i,t){return bu({},e=>{for(const n in i)t.indexOf(n)===-1&&(e[n]=i[n])})}function is(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 so(i,t,e=gt.BOUNDING_CENTER){const n=is(i,t),o=is(i,t+1);return e===gt.BOUNDING_CENTER?(i.model.bounding.max.y+i.model.bounding.min.y)/2:e===gt.CEILING?o:n}function ro(i,t,e,n){const o=so(i,e,n==null?void 0:n.attachedTo),s=new x.Vector3(0,o,0),r=new x.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 li{constructor(t,e){m(this,"five");m(this,"hooks",new $t);m(this,"staticPrefix","//vrlab-static.ljcdn.com");this.five=t,e!=null&&e.staticPrefix&&(this.staticPrefix=e.staticPrefix)}getCurrentState(){return this.state}}class Ht extends li{}var Fe=(i=>(i.UnknownError="UnknownError",i.DataNotLoaded="DataNotLoaded",i.BreakOffByHide="BreakOffByHide",i.BreakOffByDisable="BreakOffByDisable",i.ModelNotLoaded="ModelNotLoaded",i.ChangeModeError="ChangeModeError",i.UpdateCameraError="UpdateCameraError",i))(Fe||{});const Ia=500,yu=80;function Ri(i,t,e=4){return Math.floor(i*Math.pow(10,e))===Math.floor(t*Math.pow(10,e))}function ka(i,t){return Y(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"?Ri(d,f,2):d===f}):!0})()||n(new Error("five pose \u4E0E\u9884\u671F\u4E0D\u7B26")),e()})})})}function ao(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!(!Ri(e,s,2)||!Ri(n,r,2)||o!==a)}function xa(i,t,e=!0){return Y(this,null,function*(){if(ao(i,t)===!0)return;const o=i.getCurrentState();if(o.mode!==t.mode){const[d]=yield Zn(ka(i,[t.mode,t,void 0,e]));if(d)throw new Error(Fe.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 Zn(i.updateCamera(t,l,e));if(c)throw new Error(Fe.UpdateCameraError)})}function Kt(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 wu(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 Cu(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 Eu extends Ht{constructor(e,n){var a;super(e);m(this,"name","modelFloorplanPlugin");m(this,"state");m(this,"data");m(this,"showState");m(this,"showPromise");m(this,"app");m(this,"panoIndex",0);m(this,"floorIndex",0);m(this,"selector");m(this,"showRejection");m(this,"wrapper");m(this,"container",document.createElement("div"));m(this,"lastPanoramaLongitude",0);m(this,"size",{width:0,height:0});m(this,"hasAddedEventListener",!1);m(this,"isHiddenByHideFunc",!1);m(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")});m(this,"show",(...n)=>Y(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)}));m(this,"hide",(...n)=>Y(this,[...n],function*(e={}){!this.state.enabled||(this.isHiddenByHideFunc=!0,this.state.visible!==!1&&(this.updateState({visible:!1},e.userAction||!0),this._hide(e)))}));m(this,"updateSize",()=>{if(!this.data||!ao(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=ro(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})});m(this,"_disable",e=>{var o,s,r;const{userAction:n}=e;this.hooks.emit("disable",{userAction:n}),(o=this.showRejection)==null||o.call(this,Fe.BreakOffByDisable),this.showPromise=void 0,(s=this.app)==null||s.$destroy(),this.app=void 0,(r=this.container)==null||r.remove(),this.removeEventListener()});m(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}))});m(this,"_show",e=>Y(this,null,function*(){var r;if(!this.state.enabled)return;if(!((r=this.five.model)!=null&&r.loaded))throw new Error(Fe.ModelNotLoaded);if(!this.data)throw new Error(Fe.DataNotLoaded);this.isHiddenByHideFunc=!1;const n={floorIndex:this.floorIndex,modelOpacity:this.state.config.modelOpacity,immediately:!1,isAutoShow:!1,userAction:!0},o=G(G({},n),e),s=()=>Y(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 Zn(xa(this.five,this.showState,o.userAction));if(c)throw c;if(a)throw l?new Error(l):new Error(Fe.UnknownError);this.updateSize(),this.floorIndex=o.floorIndex,this.five.model.show(this.floorIndex);const d=o.modelOpacity,f=o.immediately?0:Ia;Kt(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}));m(this,"_hide",e=>{var s;(s=this.showRejection)==null||s.call(this,Fe.BreakOffByHide),this.showPromise=void 0;const o=G(G({},{userAction:!0,isAutoHide:!1}),e);Kt(this.five,1,0),this.hooks.emit("hide",{auto:o.isAutoHide,userAction:o.userAction}),this.render()});m(this,"handleClick",()=>{if(!this.state.visible)return;if(this.hooks.emit("click"))return!1});m(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)});m(this,"onFiveModeChange",e=>{e!==this.showState.mode&&(this.updateState({visible:!1},!1),this._hide({userAction:!1}))});m(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||Cu(o)&&(this.updateState({visible:!0},!0),this._show({isAutoShow:!0})))});m(this,"onFivePanoArrived",e=>{var n;!((n=this.five)!=null&&n.work)||(this.panoIndex=e,this.floorIndex=this.five.work.observers[e].floorIndex)});m(this,"onFiveCameraUpdate",(e,n)=>{if(!this.state.visible||this.showPromise)return;const o=this.five.getCurrentState();wu(o)&&(this.updateState({visible:!1},n),this._hide({userAction:n,isAutoHide:!0}))});m(this,"onFiveWantsGesture",(e,n)=>{if(!!this.state.visible&&(n.length>1||e==="mouseWheel"))return!1});m(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});m(this,"onFiveWantsTapGesture",()=>this.handleClick());m(this,"onFiveWantsChangeMode",(e,n)=>{n==="Panorama"&&e==="Floorplan"&&(this.lastPanoramaLongitude=this.five.getCurrentState().longitude)});m(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:yu/((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:wt,attachedTo:gt.BOUNDING_CENTER,getLabelElement:void 0,getRoomAreaText:l=>(l/1e6).toFixed(1)+"\u33A1",getRuleDistanceText:l=>l.toString()},s=n?ai(n,["selector","scale"]):{},r=G(G({},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 Y(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 Ct(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 Y(this,null,function*(){return yield Ct(e.data)})}updateState(e,n){const o=this.state,s=e.config?G(G({},o.config),e.config):o.config;this.state=he(G(G({},this.state),e),{config:s}),!Je(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=he(G({},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 oo({target:this.container,intro:!0,props:n})}}const Pu=(i,t)=>new Eu(i,t);function Iu(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 ku(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 xu extends Ht{constructor(e,n){super(e);m(this,"name","modelFloorplanPlugin");m(this,"state");m(this,"data");m(this,"showState");m(this,"showPromise");m(this,"app");m(this,"panoIndex",0);m(this,"floorIndex",0);m(this,"selector");m(this,"showRejection");m(this,"wrapper");m(this,"container",document.createElement("div"));m(this,"lastPanoramaLongitude",0);m(this,"size",{width:0,height:0});m(this,"hasAddedEventListener",!1);m(this,"isHiddenByHideFunc",!1);m(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")});m(this,"show",(...n)=>Y(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)}));m(this,"hide",(...n)=>Y(this,[...n],function*(e={}){!this.state.enabled||(this.isHiddenByHideFunc=!0,this.state.visible!==!1&&(this.updateState({visible:!1},e.userAction||!0),this._hide(e)))}));m(this,"updateSize",()=>{if(!this.data||!ao(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=ro(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})});m(this,"_disable",e=>{var o,s,r;const{userAction:n}=e;this.hooks.emit("disable",{userAction:n}),(o=this.showRejection)==null||o.call(this,Fe.BreakOffByDisable),this.showPromise=void 0,(s=this.app)==null||s.$destroy(),this.app=void 0,(r=this.container)==null||r.remove(),this.removeEventListener()});m(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}))});m(this,"_show",e=>Y(this,null,function*(){var r;if(!this.state.enabled)return;if(!((r=this.five.model)!=null&&r.loaded))throw new Error(Fe.ModelNotLoaded);if(!this.data)throw new Error(Fe.DataNotLoaded);this.isHiddenByHideFunc=!1;const n={floorIndex:this.floorIndex,modelOpacity:this.state.config.modelOpacity,immediately:!1,isAutoShow:!1,userAction:!0},o=G(G({},n),e),s=()=>Y(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 Zn(xa(this.five,this.showState,o.userAction));if(c)throw c;if(a)throw l?new Error(l):new Error(Fe.UnknownError);this.updateSize(),this.updatePosition(),this.floorIndex=o.floorIndex,this.five.model.show(this.floorIndex);const d=o.modelOpacity,f=o.immediately?0:Ia;Kt(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}));m(this,"_hide",e=>{var s;(s=this.showRejection)==null||s.call(this,Fe.BreakOffByHide),this.showPromise=void 0;const o=G(G({},{userAction:!0,isAutoHide:!1}),e);Kt(this.five,1,0),this.hooks.emit("hide",{auto:o.isAutoHide,userAction:o.userAction}),this.render()});m(this,"handleClick",()=>{if(!this.state.visible)return;if(this.hooks.emit("click"))return!1});m(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)});m(this,"onFiveModeChange",e=>{e!==this.showState.mode&&(this.updateState({visible:!1},!1),this._hide({userAction:!1}))});m(this,"onFivePanoArrived",e=>{var n;!((n=this.five)!=null&&n.work)||(this.panoIndex=e,this.floorIndex=this.five.work.observers[e].floorIndex)});m(this,"onFiveCameraUpdate",(e,n)=>{if(!this.state.visible||this.showPromise)return;const o=this.five.getCurrentState();this.updatePosition(),this.updateSize(),Iu(o)&&(this.updateState({visible:!1},n),this._hide({userAction:n}))});m(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:(ku(o)&&(this.updateState({visible:!0},!0),this._show({isAutoShow:!0})),!1)}}});m(this,"onFiveWantsTapGesture",()=>this.handleClick());m(this,"onFiveWantsChangeMode",(e,n)=>{n==="Panorama"&&e===this.showState.mode&&(this.lastPanoramaLongitude=this.five.getCurrentState().longitude)});m(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:wt,attachedTo:gt.BOUNDING_CENTER,getLabelElement:void 0,adaptiveRoomLabelVisibleEnable:!0,getRoomAreaText:a=>(a/1e6).toFixed(1)+"\u33A1",getRuleDistanceText:a=>a.toString()},s=n?ai(n,["selector","scale"]):{},r=G(G({},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 Y(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 Ct(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=so(this.five,this.floorIndex,this.state.config.attachedTo),n=(a=this.five.model)==null?void 0:a.bounding.getCenter(new x.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 Y(this,null,function*(){return yield Ct(e.data)})}updateState(e,n){const o=this.state,s=e.config?G(G({},o.config),e.config):o.config;this.state=he(G(G({},this.state),e),{config:s}),!Je(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=he(G({},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 oo({target:this.container,intro:!0,props:n})}}const Du=(i,t)=>new xu(i,t);class Lu extends Ht{constructor(e,n){super(e);m(this,"name","topviewFloorplanPlugin");m(this,"state");m(this,"data");m(this,"app");m(this,"selector");m(this,"panoIndex",0);m(this,"floorIndex",0);m(this,"wrapper");m(this,"container",document.createElement("div"));m(this,"lastPanoramaLongitude",0);m(this,"size",{width:0,height:0});m(this,"hasAddedEventListener",!1);m(this,"isHiddenByHideFunc",!1);m(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=ro(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})});m(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")});m(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})});m(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)});m(this,"onFiveModeChange",(...[e,,,,n])=>{e!=="Topview"&&this.state.visible&&(this.updateState({visible:!1},n),this._hide({userAction:n}))});m(this,"onFivePanoArrived",e=>{var n;!((n=this.five)!=null&&n.work)||(this.panoIndex=e,this.floorIndex=this.five.work.observers[e].floorIndex)});m(this,"onFiveCameraUpdate",(e,n)=>{!this.state.visible||(this.updatePosition(),this.updateSize())});m(this,"onFiveWantsGesture",e=>{if(!(e!=="pan"&&e!=="pinch"&&e!=="mouseWheel")&&this.state.visible&&!this.state.config.gestureEnable)return!1});m(this,"onFiveWantsMoveToPano",()=>{if(this.state.visible&&this.state.config.preventRoomClick)return!1});m(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}))});m(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:wt,attachedTo:gt.BOUNDING_CENTER,getLabelElement:void 0,adaptiveRoomLabelVisibleEnable:!0,getRoomAreaText:a=>(a/1e6).toFixed(1)+"\u33A1",getRuleDistanceText:a=>a.toString()},s=n?ai(n,["selector","scale"]):{},r=G(G({},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 Y(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 Ct(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=so(this.five,this.floorIndex,this.state.config.attachedTo),n=(a=this.five.model)==null?void 0:a.bounding.getCenter(new x.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 Y(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 Y(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 Y(this,null,function*(){return yield Ct(e.data)})}_show(e){return Y(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 ka(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;Kt(this.five,s,o),this.hooks.emit("showAnimationEnded",{userAction:n,auto:!1}),this.render()})}_hide(e){return Y(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;Kt(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?G(G({},o.config),e.config):o.config;this.state=he(G(G({},this.state),e),{config:s}),!Je(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=he(G({},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 oo({target:this.container,intro:!0,props:n})}}const Su=(i,t)=>new Lu(i,t);function lo(i,t=200){let e;return function(...n){e||(i(...n),e=setTimeout(function(){e=null},t))}}function Tu(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 Mu(i){let t,e,n;return{c(){t=V("div"),e=V("div"),n=V("div"),b(n,"class","plugin-radar__camera-rotate svelte-1nqrlxd"),T(n,"background-image","url("+(i[0]||wt)+")"),T(n,"transform",i[1]),b(e,"class","plugin-radar__camera-position svelte-1nqrlxd"),T(e,"transform",i[2]),b(t,"class","plugin-radar__camera-wrapper svelte-1nqrlxd")},m(o,s){z(o,t,s),Q(t,e),Q(e,n)},p(o,[s]){s&1&&T(n,"background-image","url("+(o[0]||wt)+")"),s&2&&T(n,"transform",o[1]),s&4&&T(e,"transform",o[2])},i:Z,o:Z,d(o){o&&M(t)}}}function zu(i){return`rotate(${Math.floor(i/Math.PI*180)*-1+45}deg)`}function Bu(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(p,A){const g=p.bounding,v=p.observers[A];if(!v)return"";const w=(g.max.x-g.min.x)*r,y=(g.max.y-g.min.y)*r,P=Math.floor(v.positionInImage.x*w),I=Math.floor(v.positionInImage.y*y);return`translate(${P}px, ${I}px)`}function u(p){e(6,c=p)}const h=lo(p=>{e(7,d=p.longitude)},1e3/60);return Ze(()=>(s.on("panoWillArrive",u),s.on("cameraDirectionUpdate",h),function(){s.off("panoWillArrive",u),s.off("cameraDirectionUpdate",h)})),i.$$set=p=>{"five"in p&&e(3,s=p.five),"pxmm"in p&&e(4,r=p.pxmm),"floorplanData"in p&&e(5,a=p.floorplanData),"cameraImageUrl"in p&&e(0,l=p.cameraImageUrl)},i.$$.update=()=>{i.$$.dirty&96&&e(2,n=f(a,c)),i.$$.dirty&128&&e(1,o=zu(d))},[l,o,n,s,r,a,c,d]}class Vu extends oe{constructor(t){super(),ie(this,t,Bu,Mu,ne,{five:3,pxmm:4,floorplanData:5,cameraImageUrl:0},Tu)}}function ju(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 os(i,t,e){const n=i.slice();return n[1]=t[e],n}function ss(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=V("div"),n=V("div"),r=ee(),b(n,"class","plugin-pano-floorplan__extra-object-item svelte-1i87fz7"),T(n,"background-image",`url(${t[1].icon.url})`),T(n,"width",o),T(n,"height",s),b(e,"class","plugin-pano-floorplan__extra-object-item--position svelte-1i87fz7"),T(e,"top",a),T(e,"left",l),this.first=e},m(c,d){z(c,e,d),Q(e,n),Q(e,r)},p(c,d){t=c,d&1&&T(n,"background-image",`url(${t[1].icon.url})`),d&1&&o!==(o=`${t[1].icon.width/16}rem`)&&T(n,"width",o),d&1&&s!==(s=`${t[1].icon.height/16}rem`)&&T(n,"height",s),d&1&&a!==(a=`${t[1].positionInImage.y*100}%`)&&T(e,"top",a),d&1&&l!==(l=`${t[1].positionInImage.x*100}%`)&&T(e,"left",l)},d(c){c&&M(e)}}}function Qu(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=os(i,o,r),l=s(a);n.set(l,e[r]=ss(l,a))}return{c(){t=V("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){z(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=qe(e,a,s,1,r,o,n,t,to,ss,null,os))},i:Z,o:Z,d(r){r&&M(t);for(let a=0;a<e.length;a+=1)e[a].d()}}}function Ru(i,t,e){let{extraObjects:n=[]}=t;return i.$$set=o=>{"extraObjects"in o&&e(0,n=o.extraObjects)},[n]}class Ou extends oe{constructor(t){super(),ie(this,t,Ru,Qu,ne,{extraObjects:0},ju)}}function rs(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=we(o,n[s]);return t=new Pa({props:o}),{c(){$(t.$$.fragment)},m(s,r){q(t,s,r),e=!0},p(s,r){const a=r&87?Be(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){S(t.$$.fragment,s),e=!1},d(s){K(t,s)}}}function Hu(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=we(l,a[d]);t=new Ca({props:l}),n=new Ou({props:{extraObjects:i[5]}});let c=i[3]&&rs(i);return{c(){$(t.$$.fragment),e=ee(),$(n.$$.fragment),o=ee(),c&&c.c(),s=fe()},m(d,f){q(t,d,f),z(d,e,f),q(n,d,f),z(d,o,f),c&&c.m(d,f),z(d,s,f),r=!0},p(d,[f]){const u=f&20?Be(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=rs(d),c.c(),k(c,1),c.m(s.parentNode,s)):c&&(se(),S(c,1,1,()=>{c=null}),re())},i(d){r||(k(t.$$.fragment,d),k(n.$$.fragment,d),k(c),r=!0)},o(d){S(t.$$.fragment,d),S(n.$$.fragment,d),S(c),r=!1},d(d){K(t,d),d&&M(e),K(n,d),d&&M(o),c&&c.d(d),d&&M(s)}}}function Fu(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 Gu extends oe{constructor(t){super(),ie(this,t,Fu,Hu,ne,{five:0,pxmm:1,floorIndex:2,hoverEnable:3,floorplanData:4,extraObjects:7})}}function Nu(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 as(i){let t,e,n,o=i[6]!==0&&ls(i);return{c(){t=V("div"),o&&o.c(),b(t,"class","plugin-floorplan-radar svelte-1mvqyqq"),De(()=>i[12].call(t))},m(s,r){z(s,t,r),o&&o.m(t,null),e=Et(t,i[12].bind(t)),n=!0},p(s,r){s[6]!==0?o?(o.p(s,r),r&64&&k(o,1)):(o=ls(s),o.c(),k(o,1),o.m(t,null)):o&&(se(),S(o,1,1,()=>{o=null}),re())},i(s){n||(k(o),n=!0)},o(s){S(o),n=!1},d(s){s&&M(t),o&&o.d(),e()}}}function ls(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=we(c,l[u]);e=new Gu({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=we(f,d[u]);return o=new Vu({props:f}),{c(){t=V("div"),$(e.$$.fragment),n=ee(),$(o.$$.fragment),b(t,"class","plugin-floorplan-radar-container svelte-1mvqyqq"),T(t,"width",s),T(t,"height",r)},m(u,h){z(u,t,h),q(e,t,null),Q(t,n),q(o,t,null),a=!0},p(u,h){const p=h&1581?Be(l,[{five:u[0],pxmm:u[9],floorIndex:u[10],floorplanData:u[3],hoverEnable:u[2],extraObjects:u[5]}]):{};e.$set(p);const A=h&537?Be(d,[{pxmm:u[9],five:u[0],floorplanData:u[3],cameraImageUrl:u[4]}]):{};o.$set(A),h&256&&s!==(s=`${u[8]}px`)&&T(t,"width",s),h&2048&&r!==(r=`${u[11]}px`)&&T(t,"height",r)},i(u){a||(k(e.$$.fragment,u),k(o.$$.fragment,u),a=!0)},o(u){S(e.$$.fragment,u),S(o.$$.fragment,u),a=!1},d(u){u&&M(t),K(e),K(o)}}}function Wu(i){let t,e,n=i[1]&&as(i);return{c(){n&&n.c(),t=fe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[1]?n?(n.p(o,s),s&2&&k(n,1)):(n=as(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(se(),S(n,1,1,()=>{n=null}),re())},i(o){e||(k(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function _u(i,t,e){var v,w;let{five:n}=t,{visible:o}=t,{hoverEnable:s}=t,{floorplanData:r}=t,{cameraImageUrl:a}=t,{extraObjects:l=[]}=t,c=0,d=(w=(v=n.work.observers[n.getCurrentState().panoIndex])==null?void 0:v.floorIndex)!=null?w:0,f=0,u=0,h=0,p=0;function A(y){e(10,d=n.work.observers[y].floorIndex)}Ze(()=>(n.on("panoArrived",A),()=>{n.off("panoArrived",A)}));function g(){f=this.clientWidth,u=this.clientHeight,e(6,f),e(7,u)}return i.$$set=y=>{"five"in y&&e(0,n=y.five),"visible"in y&&e(1,o=y.visible),"hoverEnable"in y&&e(2,s=y.hoverEnable),"floorplanData"in y&&e(3,r=y.floorplanData),"cameraImageUrl"in y&&e(4,a=y.cameraImageUrl),"extraObjects"in y&&e(5,l=y.extraObjects)},i.$$.update=()=>{if(i.$$.dirty&456){const y=Math.min(f,u),{max:P,min:I}=r.bounding,C=P.x-I.x,L=P.y-I.y,D=function(){return C>L?[y,y/C*L]:[y/L*C,y]}();e(8,h=D[0]),e(11,p=D[1]),e(9,c=h/C)}},[n,o,s,r,a,l,f,u,h,c,d,p,g]}class Xu extends oe{constructor(t){super(),ie(this,t,_u,Wu,ne,{five:0,visible:1,hoverEnable:2,floorplanData:3,cameraImageUrl:4,extraObjects:5},Nu)}}class Yu extends Ht{constructor(e,n){super(e);m(this,"name","panoFloorplanRadarPlugin");m(this,"state");m(this,"data");m(this,"app");m(this,"wrapperSelector","");m(this,"wrapper",null);m(this,"disposed",!1);m(this,"extraObjects",[]);m(this,"dispose",()=>{var e;this.disposed=!0,(e=this.app)==null||e.$destroy(),this.wrapper=null,this.wrapperSelector="",this.hooks.emit("dispose")});m(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:wt},s=n!=null&&n.configs?n.configs:{},r=G(G({},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 Y(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 Ct(a),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,l),n&&this.updateState(n,o),this.render()})}show(){return Y(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 Y(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=vu(e,this.five,this.data),this.render())}formatData(e){return Y(this,null,function*(){return yield Ct(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=G(G({},this.state),e),!Je(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=he(G({},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 Xu({target:this.wrapper,props:e})}}const Uu=(i,t)=>new Yu(i,t),Ju=[{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"}],Zu=[{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"}],qu=[{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"}],Ci=(i,t,e)=>{const n=new x.Matrix4,o=new x.Euler(i,t,e,"YXZ");return n.makeRotationFromEuler(o),n},Ku=(i,{scale:t,rotation:e,position:n})=>{if(t&&i.scale.set(t,t,t),e){const[o,s,r]=e;o&&i.applyMatrix4(Ci(o,0,0)),s&&i.applyMatrix4(Ci(0,s,0)),r&&i.applyMatrix4(Ci(0,0,r))}return n&&i.position.set(n.x,n.y,n.z),i};function Da(i,t){i.traverse(e=>{var n;if(e.type==="Mesh"){const o=e,s=G({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 $u=(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=>Y(exports,null,function*(){var X;const u=(f==null?void 0:f.fbx_url)||e,h=(X=f==null?void 0:f.north_rad)!=null?X: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 p=i.model.bounding,A=p.max.x-p.min.x,g=p.max.z-p.min.z,v=Math.max(A,g),y=yield new Jr.FBXLoader().loadAsync(u);Da(y,{transparent:!0,side:x.DoubleSide,blending:x.AdditiveBlending});const P=[0,h-Math.PI/2,0],{model:{bounding:{max:{x:I,z:C},min:{x:L,y:D,z:B}}}}=i;o.yBase=D;const N={x:(I+L)/2,y:D-1.6,z:(C+B)/2},F=.0045*v;return Ku(y,{position:N,rotation:P,scale:F}),o.object=y,!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 ef(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 tf=({x:i,y:t,z:e})=>new H.Vector3(i,t,e),nf=(i,t)=>{var A,g,v;const e={},n=(A=t.animationEnabled)!=null?A:!0,o=(g=t.position)!=null?g:void 0,s=(v=t.rad)!=null?v:void 0,r=t.fbx_url||"//vrlab-image4.ljcdn.com/release/web/entryDoorMini/Anim_Door1.fbx",a=[],l=w=>Y(exports,null,function*(){var N,F,X,j,E,R,O,W;const y=(N=w==null?void 0:w.position)!=null?N:o;if(!y)return Promise.reject(new Error("ModelEntryDoorGuidePlugin.load(): position is undefined"));const P=tf(y),I=(F=w==null?void 0:w.rad)!=null?F:s,C=(X=w==null?void 0:w.fbx_url)!=null?X:r;if(e.rad=I,I===void 0)return Promise.reject(new Error(`ModelEntryDoorGuidePlugin.load(): rad is ${I}`));const L=yield new Jr.FBXLoader().loadAsync(C);L.position.copy(P),L.rotation.z=I,L.scale.set(.8,.8,.8),Da(L,{transparent:!0,side:x.DoubleSide});const D=(O=(R=(E=(j=L.children)==null?void 0:j[0])==null?void 0:E.children)==null?void 0:R[3])==null?void 0:O.clone();if(!D)return Promise.reject(new Error(`ModelEntryDoorGuidePlugin.load(): textMesh is ${D}`));const B=(W=t.name)!=null?W:"\u5165\u6237\u95E8";return D.material=new H.MeshBasicMaterial({transparent:!0,map:ef(B)}),D.renderOrder=3,L.children[0].add(D),e.object=L,!0}),c=()=>{if(e.animation)return;if(!e.object)return console.error("ModelEntryDoorGuidePlugin.initAnimation(): state.object is ",e.object);const w=1,y=new H.AnimationMixer(e.object);a.push(y);const P=y.clipAction(e.object.animations[0]);P.timeScale=w;let I;const C=()=>{let N=0,F=0;const X=1e3/30,j=E=>{N=requestAnimationFrame(j);const R=E-F;R<X||(F=E,a.forEach(O=>O.update(R/1e3)),i.needsRender=!0)};return N=requestAnimationFrame(j),()=>{cancelAnimationFrame(N)}},B={play:()=>{I||(P.play(),I=C(),requestAnimationFrame(()=>{e.object&&e.object.rotation.z!==e.rad&&(e.object.rotation.z=e.rad)}))},stop:()=>{P.stop(),I==null||I(),I=void 0}};e.animation=B},d=w=>{var P;if(!e.object)return console.error("ModelEntryDoorGuidePlugin.enable(): object is ",e.object);((P=w==null?void 0:w.animationEnable)!=null?P: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=w=>w==="Floorplan"?d():f();return{load:l,enable:w=>(e.enabled||(e.enabled=!0,u(i.currentMode),i.on("modeChange",u),d(w)),!0),disable:()=>(e.enabled&&(e.enabled=!1,f(),i.off("modeChange",u)),!0)}};class co extends fn.default.Tween{constructor(){super(...arguments);m(this,"disposeMethods",[]);m(this,"animationFrameDisposer");m(this,"onDispose",e=>(this.disposeMethods.push(e),this));m(this,"play",()=>(this.start(0),this.animationFrameDisposer=di(e=>this.update(e)),this));m(this,"dispose",()=>{var e;this.stop(),(e=this.animationFrameDisposer)==null||e.call(this),this.disposeMethods.forEach(n=>n()),this.disposeMethods=[],fn.default.remove(this)})}}function La(i,t=fn.default.Easing.Linear.None){const e=new co({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)),of=window.cancelAnimationFrame||clearTimeout;function ci(i,t=0){t<=0?pn(i):pn(()=>ci(i,t-1))}function di(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(){of(e)}}function sf(){const i=Date.now();return new Promise(t=>{pn(()=>{t(Date.now()-i)})})}const rf=ni.Easing;function af(i,t,e,n=rf.Linear.None){const o=new ni.Tween(i).to(t,e).easing(n);ci(()=>o.start(0));const s=di(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 lf(i,t){return af({progress:0},{progress:1},i,t)}var Sa=(i=>(i.Move="Move",i.Rotate="Rotate",i))(Sa||{}),Ue=(i=>(i.Clockwise="Clockwise",i.Anticlockwise="Anticlockwise",i.Loop="Loop",i))(Ue||{});const On=Math.PI*2;function cs(i){return(i%On+On)%On}function ds(i){return i%On}function Ei(i,t,e){return i+(t-i)*e}const Oi=(i,t,e)=>{const n=Math.PI,o=n*2;return i=cs(i),t=cs(t),e===Ue.Anticlockwise&&i<t&&(i+=o),e===Ue.Clockwise&&t<i&&(t+=o),e===Ue.Loop&&t-i>n?Oi(i,t,Ue.Anticlockwise):e===Ue.Loop&&i-t>n?Oi(i,t,Ue.Clockwise):{from:i,to:t}},cf=i=>{const t={},e=(l,c,...d)=>Y(exports,[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=ds(r.latitude),l=ds(s.latitude),{from:c,to:d}=Oi(r.longitude,s.longitude,s.rotation||Ue.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)=>Y(exports,[l,c,...d],function*(s,r,a={}){t.interruptCallback&&t.interruptCallback(!1),a.asyncStartCallback&&(yield a.asyncStartCallback()),i.currentMode!==be.Five.Mode.Panorama&&(yield i.changeMode(be.Five.Mode.Panorama)),s.panoIndex!==void 0&&s.panoIndex!==i.panoIndex&&(a.preload&&(yield i.preloadPano(s.panoIndex)),yield new Promise((h,p)=>{if(!s.panoIndex){h(!0);return}i.moveToPano(s.panoIndex,{moveEndCallback:()=>h(!0),moveCancelCallback:()=>p(!1)})})),a.asyncEndCallback&&(yield a.asyncEndCallback());const{from:f,to:u}=n(s);return yield new Promise(h=>{const p=({progress:y})=>{const P={};P.longitude=Ei(f.longitude,u.longitude,y),P.latitude=Ei(f.latitude,u.latitude,y),P.fov=Ei(f.fov,u.fov,y),i.setState(P,!0)},A=()=>{h(!0)},g=()=>{h(!1)},v=s.rotateSpeed?Math.ceil(Math.abs(u.longitude-f.longitude)/s.rotateSpeed*1e3):r,w=lf(v,ni.Easing.Linear.None).onUpdate(p).onComplete(A).onDestroy(g);s.rotation===Ue.Loop&&w.repeat(1/0).yoyo(!0),t.interruptCallback=(y=!0)=>{w.destroy(),t.interruptCallback=void 0,t.timeoutId&&(clearTimeout(t.timeoutId),t.timeoutId=void 0),h(y)},t.timeoutId=setTimeout(()=>{t.interruptCallback&&t.interruptCallback(!0)},r)})})}};function us(i,t){return i.x===t.x&&i.y===t.y}function Ta(i,t){return Math.abs(i)===1/0&&Math.abs(t)===1/0?!0:Math.abs(i-t)<.001}function $n(i,t){return(t.y-i.y)/(t.x-i.x)}function Ma(i,t,e){const n=$n(i[1],i[0]),o=$n(t[1],t[0]);if(isNaN(n)||isNaN(o)||Ta(n,o))return!1;if(In(i[0],t))return i[0];if(In(i[1],t))return i[1];if(In(t[0],i))return t[0];if(In(t[1],i))return t[1];if(e&&!df(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 In(i,t){return us(i,t[0])||us(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&&Ta($n(t[0],i),$n(i,t[1]))}function kn(i,t,e){return(i.x-e.x)*(t.y-e.y)-(t.x-e.x)*(i.y-e.y)}function df(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)&&kn(t[0],i[1],i[0])*kn(i[1],t[1],i[0])>0&&kn(i[0],t[1],t[0])*kn(t[1],i[1],t[0])>0?1:0}function za(i,t=0){t<=0?requestAnimationFrame(i):requestAnimationFrame(()=>za(i,t-1))}const uf=`<style type="text/css">
|
|
115
|
+
`;return i.$$set=s=>{"content"in s&&e(0,n=s.content)},[n,o]}class ld extends oe{constructor(t){super(),ie(this,t,ad,rd,ne,{content:0},sd)}}function cd(i){le(i,"svelte-ozpg4a",".floorplan-plugin__base-image.svelte-ozpg4a{position:absolute;z-index:10;width:100%;height:100%;pointer-events:none}")}function dd(i){let t,e;return t=new od({props:{url:i[1].url}}),{c(){$(t.$$.fragment)},m(n,o){q(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){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function ud(i){let t,e;return t=new ld({props:{content:i[0]}}),{c(){$(t.$$.fragment)},m(n,o){q(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){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function fd(i){let t,e,n,o;const s=[ud,dd],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=V("div"),n&&n.c(),b(t,"class","floorplan-plugin__base-image svelte-ozpg4a")},m(l,c){z(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&&(se(),S(r[d],1,1,()=>{r[d]=null}),re()),~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){S(n),o=!1},d(l){l&&M(t),~e&&r[e].d()}}}function hd(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 Ca extends oe{constructor(t){super(),ie(this,t,hd,fd,ne,{floorIndex:2,floorplanData:3},cd)}}function md(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 pd(i){let t,e=i[4].outerHTML+"",n;return{c(){t=new _n(!1),n=fe(),t.a=n},m(o,s){t.m(e,o,s),z(o,n,s)},p(o,s){s&16&&e!==(e=o[4].outerHTML+"")&&t.p(e)},d(o){o&&M(n),o&&t.d()}}}function gd(i){let t,e=i[0].name+"",n,o,s,r;return{c(){t=V("span"),n=Ee(e),o=ee(),s=V("span"),r=Ee(i[5]),b(t,"class","floorplan-plugin__room-name"),b(s,"class","floorplan-plugin__room-size svelte-12pzct5")},m(a,l){z(a,t,l),Q(t,n),z(a,o,l),z(a,s,l),Q(s,r)},p(a,l){l&1&&e!==(e=a[0].name+"")&&xe(n,e),l&32&&xe(r,a[5])},d(a){a&&M(t),a&&M(o),a&&M(s)}}}function Ad(i){let t;function e(s,r){if(s[1]===void 0)return gd;if(s[4])return pd}let n=e(i),o=n&&n(i);return{c(){t=V("div"),o&&o.c(),b(t,"class","floorplan-plugin__room-label-item svelte-12pzct5"),T(t,"left",i[6]),T(t,"top",i[7]),T(t,"font-size",i[8]),T(t,"opacity",i[3]?"1":"0")},m(s,r){z(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&&T(t,"opacity",s[3]?"1":"0")},i:Z,o:Z,d(s){s&&M(t),o&&o.d(),i[16](null)}}}function vd(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 bd(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(D,B){if(B.width===0||B.height===0)return()=>!1;const N=D.path.map(({x:U,y:_})=>[U,_]),F=D.roomLabel.position,{x:X,y:j}=F,{width:E,height:R}=B,O=E/2,W=R/2;return function(_){const J=X*_,de=j*_,ue=N.map(([Pe,Me])=>[Pe*_,Me*_]);return[[J+O,de-W],[J-O,de-W],[J-O,de+W],[J+O,de+W]].every(Pe=>vd(Pe,ue))}}const p=document.body.clientWidth,A=document.body.clientHeight,g=l.roomLabel,v=g.positionInImage.x*100+"%",w=g.positionInImage.y*100+"%",y=(p<500||A<500?10:14)/16+"rem";let P=!1,I,C;c.subscribe(function(B){e(13,P=!!B&&B.id===l.id)}),Ze(()=>{const D=I==null?void 0:I.getClientRects()[0];e(14,C={width:D.width,height:D.height})});function L(D){Le[D?"unshift":"push"](()=>{I=D,e(2,I)})}return i.$$set=D=>{"pxmm"in D&&e(9,a=D.pxmm),"room"in D&&e(0,l=D.room),"hoveredRoom"in D&&e(10,c=D.hoveredRoom),"getRoomAreaText"in D&&e(11,d=D.getRoomAreaText),"getLabelElement"in D&&e(1,f=D.getLabelElement),"adaptiveRoomLabelVisibleEnable"in D&&e(12,u=D.adaptiveRoomLabelVisibleEnable)},i.$$.update=()=>{i.$$.dirty&2049&&e(5,n=l.size?d(l.size):""),i.$$.dirty&16385&&e(15,o=C?h(l,C):void 0),i.$$.dirty&3&&e(4,s=f==null?void 0:f(l)),i.$$.dirty&45568&&e(3,r=u?P?!0:!!(o!=null&&o(a)):!0)},[l,f,I,r,s,n,v,w,y,a,c,d,u,P,C,o,L]}class yd extends oe{constructor(t){super(),ie(this,t,bd,Ad,ne,{pxmm:9,room:0,hoveredRoom:10,getRoomAreaText:11,getLabelElement:1,adaptiveRoomLabelVisibleEnable:12},md)}}function wd(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 Vo(i,t,e){const n=i.slice();return n[10]=t[e],n}function jo(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=Vo(i,r,l),d=a(c);n.set(d,e[l]=Qo(d,c))}return{c(){t=V("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){z(l,t,c);for(let d=0;d<e.length;d+=1)e[d].m(t,null);o=Et(t,i[9].bind(t)),s=!0},p(l,c){c&111&&(r=l[6],se(),e=qe(e,c,a,1,l,r,n,t,Ot,Qo,null,Vo),re())},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)S(e[c]);s=!1},d(l){l&&M(t);for(let c=0;c<e.length;c+=1)e[c].d();o()}}}function Qo(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=we(r,s[a]);return n=new yd({props:r}),{key:i,first:null,c(){e=fe(),$(n.$$.fragment),this.first=e},m(a,l){z(a,e,l),q(n,a,l),o=!0},p(a,l){t=a;const c=l&111?Be(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){S(n.$$.fragment,a),o=!1},d(a){a&&M(e),K(n,a)}}}function Cd(i){let t,e,n=i[6]&&jo(i);return{c(){n&&n.c(),t=fe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[6]?n?(n.p(o,s),s&64&&k(n,1)):(n=jo(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(se(),S(n,1,1,()=>{n=null}),re())},i(o){e||(k(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function Ed(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:p}=s.bounding,A=h.x-p.x;e(5,f=d/A)}},[r,a,l,c,d,f,n,o,s,u]}class Pd extends oe{constructor(t){super(),ie(this,t,Ed,Cd,ne,{floorIndex:7,floorplanData:8,hoveredRoom:0,getRoomAreaText:1,getLabelElement:2,adaptiveRoomLabelVisibleEnable:3},wd)}}function Id(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 Ro(i,t,e){const n=i.slice();return n[11]=t[e],n[13]=e,n}function Oo(i,t,e){const n=i.slice();return n[14]=t[e],n}function Ho(i){let t;return{c(){t=V("div"),b(t,"class","floorplan-plugin__rule-scale svelte-djlmk4"),T(t,"left",i[14].left*100+"%"),T(t,"bottom",i[14].bottom*100+"%")},m(e,n){z(e,t,n)},p:Z,d(e){e&&M(t)}}}function Fo(i,t){let e,n,o=t[1](t[11].distance)+"",s,r;return{key:i,first:null,c(){e=V("div"),n=V("div"),s=Ee(o),r=ee(),b(n,"class","floorplan-plugin__rule-text svelte-djlmk4"),te(n,"is-row",t[2]),b(e,"class","floorplan-plugin__rule-text-item svelte-djlmk4"),T(e,"left",t[11].left*100+"%"),T(e,"bottom",t[11].bottom*100+"%"),this.first=e},m(a,l){z(a,e,l),Q(e,n),Q(n,s),Q(e,r)},p(a,l){t=a,l&2&&o!==(o=t[1](t[11].distance)+"")&&xe(s,o)},d(a){a&&M(e)}}}function kd(i){let t,e,n,o,s,r,a=[],l=new Map,c,d=i[3],f=[];for(let p=0;p<d.length;p+=1)f[p]=Ho(Oo(i,d,p));let u=i[4];const h=p=>p[13];for(let p=0;p<u.length;p+=1){let A=Ro(i,u,p),g=h(A);l.set(g,a[p]=Fo(g,A))}return{c(){t=V("div"),e=V("div"),n=ee(),o=V("div");for(let p=0;p<f.length;p+=1)f[p].c();s=ee(),r=V("div");for(let p=0;p<a.length;p+=1)a[p].c();b(e,"class","floorplan-plugin__rule-line svelte-djlmk4"),b(o,"class","floorplan-plugin__rule-scale-wrapper svelte-djlmk4"),te(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"),te(t,"is-row",i[2]),T(t,"width",i[2]?"100%":1/16+"rem"),T(t,"height",i[2]?1/16+"rem":"100%")},m(p,A){z(p,t,A),Q(t,e),Q(t,n),Q(t,o);for(let g=0;g<f.length;g+=1)f[g].m(o,null);Q(t,s),Q(t,r);for(let g=0;g<a.length;g+=1)a[g].m(r,null)},p(p,[A]){if(A&8){d=p[3];let g;for(g=0;g<d.length;g+=1){const v=Oo(p,d,g);f[g]?f[g].p(v,A):(f[g]=Ho(v),f[g].c(),f[g].m(o,null))}for(;g<f.length;g+=1)f[g].d(1);f.length=d.length}A&22&&(u=p[4],a=qe(a,A,h,1,p,u,l,r,to,Fo,null,Ro)),A&1&&c!==(c="floorplan-plugin__rule-labels floorplan-plugin__rule-labels--"+p[0]+" svelte-djlmk4")&&b(t,"class",c),A&5&&te(t,"is-row",p[2])},i:Z,o:Z,d(p){p&&M(t),lt(f,p);for(let A=0;A<a.length;A+=1)a[A].d()}}}const _t=1e3,Xt=180;function xd(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-(_t-Xt)*2,c=s.max.y-s.min.y-(_t-Xt)*2,d=o.map(([p,A])=>a?[p.x,A.x]:[p.y,A.y]).flat().sort().filter((p,A,g)=>A===0?!0:p!==g[A-1]),f=d.map(p=>{const A=a?(p-s.min.x-_t+Xt)/l:0,g=a?0:(p-s.min.y-_t+Xt)/c;return{left:A,bottom:g}});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((p,A,g)=>{const v=A===0?0:p-g[A-1],w=A===0?0:(p+g[A-1])/2,y=a?(w-s.min.x-_t+Xt)/l:0,P=a?0:(w-s.min.y-_t+Xt)/c;return{left:y,bottom:P,distance:v}}).filter(({distance:p})=>p/u>.1);return i.$$set=p=>{"type"in p&&e(0,n=p.type),"data"in p&&e(5,o=p.data),"bounding"in p&&e(6,s=p.bounding),"getRuleDistanceText"in p&&e(1,r=p.getRuleDistanceText)},[n,r,a,f,h,o,s]}class Dd extends oe{constructor(t){super(),ie(this,t,xd,kd,ne,{type:0,data:5,bounding:6,getRuleDistanceText:1},Id)}}function Ld(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 Go(i,t,e){const n=i.slice();return n[13]=t[e][0],n[14]=t[e][1],n}function No(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=we(r,s[a]);return n=new Dd({props:r}),{key:i,first:null,c(){e=fe(),$(n.$$.fragment),this.first=e},m(a,l){z(a,e,l),q(n,a,l),o=!0},p(a,l){t=a;const c=l&19?Be(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){S(n.$$.fragment,a),o=!1},d(a){a&&M(e),K(n,a)}}}function Sd(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=Go(i,s,a),c=r(l);n.set(c,e[a]=No(c,l))}return{c(){t=V("div");for(let a=0;a<e.length;a+=1)e[a].c();b(t,"class","floorplan-plugin__rule-labels-wrapper svelte-1mzj9p3"),T(t,"width",i[3]),T(t,"height",i[2])},m(a,l){z(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],se(),e=qe(e,l,r,1,a,s,n,t,Ot,No,null,Go),re()),l&8&&T(t,"width",a[3]),l&4&&T(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)S(e[l]);o=!1},d(a){a&&M(t);for(let l=0;l<e.length;l+=1)e[l].d()}}}const Wo=1e3,_o=180;function Td(i,t,e){let n,o,s,r,a,l,c,d,f,u,{floorIndex:h}=t,{floorplanData:p}=t,{getRuleDistanceText:A}=t;return i.$$set=g=>{"floorIndex"in g&&e(5,h=g.floorIndex),"floorplanData"in g&&e(6,p=g.floorplanData),"getRuleDistanceText"in g&&e(0,A=g.getRuleDistanceText)},i.$$.update=()=>{i.$$.dirty&64&&e(1,n=p.bounding),i.$$.dirty&96&&e(11,o=p.floorDatas[h].rules),i.$$.dirty&2048&&e(12,s=Object.keys(o)),i.$$.dirty&6144&&e(4,r=s.map(g=>[g,o[g]])),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-(Wo-_o)*2),i.$$.dirty&2&&e(8,d=n.max.y-n.min.y-(Wo-_o)*2),i.$$.dirty&1536&&e(3,f=c/a*100+"%"),i.$$.dirty&384&&e(2,u=d/l*100+"%")},[A,n,u,f,r,h,p,l,d,a,c,o,s]}class Md extends oe{constructor(t){super(),ie(this,t,Td,Sd,ne,{floorIndex:5,floorplanData:6,getRuleDistanceText:0},Ld)}}function ri(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 Ea({x:i,y:t},e){const{max:n,min:o}=e;return{x:i-o.x,y:n.y-t}}function zd(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 Bd(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 Vd(i,t){return Math.max(...t.work.observers.map(n=>i.z>=n.standingPosition.z?n.floorIndex:0))}function jd(i){let t;return{c(){t=Ae("path"),b(t,"d",i[0]),b(t,"fill","#2F313A")},m(e,n){z(e,t,n)},p(e,[n]){n&1&&b(t,"d",e[0])},i:Z,o:Z,d(e){e&&M(t)}}}function Qd(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=ri(o,{needZ:!0}))},[n,o]}class Rd extends oe{constructor(t){super(),ie(this,t,Qd,jd,ne,{path:1})}}function Od(i){let t,e,n,o,s,r;return{c(){t=Ae("defs"),e=Ae("pattern"),n=Ae("rect"),o=Ae("path"),s=ee(),r=Ae("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){z(a,t,l),Q(t,e),Q(e,n),Q(e,o),z(a,s,l),z(a,r,l)},p(a,[l]){l&1&&b(r,"d",a[0])},i:Z,o:Z,d(a){a&&M(t),a&&M(s),a&&M(r)}}}const wi=6;function Hd(i,t,e){let n,{path:o}=t;const s=wi*2,r=`M0 ${wi} h ${s} M${wi} 0 v ${s}`;return i.$$set=a=>{"path"in a&&e(3,o=a.path)},i.$$.update=()=>{i.$$.dirty&8&&e(0,n=ri(o,{needZ:!0}))},[n,s,r,o]}class Fd extends oe{constructor(t){super(),ie(this,t,Hd,Od,ne,{path:3})}}function Gd(i){let t,e,n,o,s,r,a,l,c,d,f;return{c(){t=Ae("defs"),e=Ae("pattern"),n=Ae("rect"),o=Ae("pattern"),s=Ae("rect"),r=ee(),a=Ae("path"),l=ee(),c=Ae("path"),d=ee(),f=Ae("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){z(u,t,h),Q(t,e),Q(e,n),Q(t,o),Q(o,s),z(u,r,h),z(u,a,h),z(u,l,h),z(u,c,h),z(u,d,h),z(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:Z,o:Z,d(u){u&&M(t),u&&M(r),u&&M(a),u&&M(l),u&&M(c),u&&M(d),u&&M(f)}}}function Nd(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=ri(o,{needZ:!0}))},[n,o]}class Wd extends oe{constructor(t){super(),ie(this,t,Nd,Gd,ne,{path:1})}}function _d(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 Xo(i,t,e){const n=i.slice();return n[5]=t[e],n}function Xd(i){let t,e;return t=new Fd({props:{path:i[5].path}}),{c(){$(t.$$.fragment)},m(n,o){q(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){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function Yd(i){let t,e;return t=new Wd({props:{path:i[5].path}}),{c(){$(t.$$.fragment)},m(n,o){q(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){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function Ud(i){let t,e;return t=new Rd({props:{path:i[5].path}}),{c(){$(t.$$.fragment)},m(n,o){q(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){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function Yo(i){let t,e,n,o;const s=[Ud,Yd,Xd],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=Ae("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){z(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):(se(),S(r[d],1,1,()=>{r[d]=null}),re(),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){S(n),o=!1},d(l){l&&M(t),r[e].d()}}}function Jd(i){let t,e,n=i[0],o=[];for(let r=0;r<n.length;r+=1)o[r]=Yo(Xo(i,n,r));const s=r=>S(o[r],1,1,()=>{o[r]=null});return{c(){t=V("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){z(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=Xo(r,n,l);o[l]?(o[l].p(c,a),k(o[l],1)):(o[l]=Yo(c),o[l].c(),k(o[l],1),o[l].m(t,null))}for(se(),l=n.length;l<o.length;l+=1)s(l);re()}},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)S(o[a]);e=!1},d(r){r&&M(t),lt(o,r)}}}function Zd(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=>he(G({},l),{path:l.path.map(c=>Ea(c,s.bounding))})))},[n,r,a,o,s]}class qd extends oe{constructor(t){super(),ie(this,t,Zd,Jd,ne,{floorIndex:3,floorplanData:4},_d)}}function Kd(i){le(i,"svelte-19uvvss","path.svelte-19uvvss{opacity:0}path.svelte-19uvvss:hover{opacity:0.1}")}function $d(i){let t,e,n;return{c(){t=Ae("path"),b(t,"d",i[2]),b(t,"fill","#fff"),b(t,"class","svelte-19uvvss")},m(o,s){z(o,t,s),e||(n=[Se(t,"mouseenter",i[0]),Se(t,"mouseleave",i[1])],e=!0)},p:Z,i:Z,o:Z,d(o){o&&M(t),e=!1,Qt(n)}}}function eu(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=ri(n.path,{needZ:!0,format:d=>Ea(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 tu extends oe{constructor(t){super(),ie(this,t,eu,$d,ne,{room:3,floorplanData:4,hoveredRoom:5},Kd)}}function nu(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 Uo(i,t,e){const n=i.slice();return n[5]=t[e],n}function Jo(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=we(r,s[a]);return n=new tu({props:r}),{key:i,first:null,c(){e=fe(),$(n.$$.fragment),this.first=e},m(a,l){z(a,e,l),q(n,a,l),o=!0},p(a,l){t=a;const c=l&7?Be(s,[{room:t[5],floorplanData:t[1],hoveredRoom:t[2]}]):{};n.$set(c)},i(a){o||(k(n.$$.fragment,a),o=!0)},o(a){S(n.$$.fragment,a),o=!1},d(a){a&&M(e),K(n,a)}}}function iu(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=Uo(i,r,l),d=a(c);o.set(d,n[l]=Jo(d,c))}return{c(){t=V("div"),e=Ae("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){z(l,t,c),Q(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,se(),n=qe(n,c,a,1,l,r,o,e,Ot,Jo,null,Uo),re())},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)S(n[c]);s=!1},d(l){l&&M(t);for(let c=0;c<n.length;c+=1)n[c].d()}}}function ou(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 Pa extends oe{constructor(t){super(),ie(this,t,ou,iu,ne,{floorIndex:0,floorplanData:1,hoveredRoom:2},nu)}}function su(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 Zo(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=we(o,n[s]);return t=new Pa({props:o}),{c(){$(t.$$.fragment)},m(s,r){q(t,s,r),e=!0},p(s,r){const a=r&1058?Be(n,[{floorIndex:s[1],floorplanData:s[5],hoveredRoom:s[10]}]):{};t.$set(a)},i(s){e||(k(t.$$.fragment,s),e=!0)},o(s){S(t.$$.fragment,s),e=!1},d(s){K(t,s)}}}function qo(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=we(o,n[s]);return t=new Pd({props:o}),{c(){$(t.$$.fragment)},m(s,r){q(t,s,r),e=!0},p(s,r){const a=r&1762?Be(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){S(t.$$.fragment,s),e=!1},d(s){K(t,s)}}}function Ko(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=we(o,n[s]);return t=new Md({props:o}),{c(){$(t.$$.fragment)},m(s,r){q(t,s,r),e=!0},p(s,r){const a=r&290?Be(n,[{floorplanData:s[5],floorIndex:s[1],getRuleDistanceText:s[8]}]):{};t.$set(a)},i(s){e||(k(t.$$.fragment,s),e=!0)},o(s){S(t.$$.fragment,s),e=!1},d(s){K(t,s)}}}function ru(i){let t,e,n,o,s,r,a,l,c;const d=[{floorIndex:i[1],floorplanData:i[5]}];let f={};for(let v=0;v<d.length;v+=1)f=we(f,d[v]);e=new qd({props:f});let u=i[2]&&Zo(i);const h=[{floorplanData:i[5],floorIndex:i[1]}];let p={};for(let v=0;v<h.length;v+=1)p=we(p,h[v]);s=new Ca({props:p});let A=i[3]&&qo(i),g=i[4]&&Ko(i);return{c(){t=V("div"),$(e.$$.fragment),n=ee(),u&&u.c(),o=ee(),$(s.$$.fragment),r=ee(),A&&A.c(),a=ee(),g&&g.c(),b(t,"class",l=je(`floorplan-plugin__floor${i[0]?" floorplan-plugin__floor--is-current":""}`)+" svelte-bl8zrz")},m(v,w){z(v,t,w),q(e,t,null),Q(t,n),u&&u.m(t,null),Q(t,o),q(s,t,null),Q(t,r),A&&A.m(t,null),Q(t,a),g&&g.m(t,null),c=!0},p(v,[w]){const y=w&34?Be(d,[{floorIndex:v[1],floorplanData:v[5]}]):{};e.$set(y),v[2]?u?(u.p(v,w),w&4&&k(u,1)):(u=Zo(v),u.c(),k(u,1),u.m(t,o)):u&&(se(),S(u,1,1,()=>{u=null}),re());const P=w&34?Be(h,[{floorplanData:v[5],floorIndex:v[1]}]):{};s.$set(P),v[3]?A?(A.p(v,w),w&8&&k(A,1)):(A=qo(v),A.c(),k(A,1),A.m(t,a)):A&&(se(),S(A,1,1,()=>{A=null}),re()),v[4]?g?(g.p(v,w),w&16&&k(g,1)):(g=Ko(v),g.c(),k(g,1),g.m(t,null)):g&&(se(),S(g,1,1,()=>{g=null}),re()),(!c||w&1&&l!==(l=je(`floorplan-plugin__floor${v[0]?" floorplan-plugin__floor--is-current":""}`)+" svelte-bl8zrz"))&&b(t,"class",l)},i(v){c||(k(e.$$.fragment,v),k(u),k(s.$$.fragment,v),k(A),k(g),c=!0)},o(v){S(e.$$.fragment,v),S(u),S(s.$$.fragment,v),S(A),S(g),c=!1},d(v){v&&M(t),K(e),u&&u.d(),K(s),A&&A.d(),g&&g.d()}}}function au(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=io(void 0);return i.$$set=p=>{"isCurrent"in p&&e(0,n=p.isCurrent),"floorIndex"in p&&e(1,o=p.floorIndex),"hoverEnable"in p&&e(2,s=p.hoverEnable),"roomLabelsEnable"in p&&e(3,r=p.roomLabelsEnable),"ruleLabelsEnable"in p&&e(4,a=p.ruleLabelsEnable),"floorplanData"in p&&e(5,l=p.floorplanData),"getRoomAreaText"in p&&e(6,c=p.getRoomAreaText),"getLabelElement"in p&&e(7,d=p.getLabelElement),"getRuleDistanceText"in p&&e(8,f=p.getRuleDistanceText),"adaptiveRoomLabelVisibleEnable"in p&&e(9,u=p.adaptiveRoomLabelVisibleEnable)},[n,o,s,r,a,l,c,d,f,u,h]}class lu extends oe{constructor(t){super(),ie(this,t,au,ru,ne,{isCurrent:0,floorIndex:1,hoverEnable:2,roomLabelsEnable:3,ruleLabelsEnable:4,floorplanData:5,getRoomAreaText:6,getLabelElement:7,getRuleDistanceText:8,adaptiveRoomLabelVisibleEnable:9},su)}}function cu(i){le(i,"svelte-86bqav",".floorplan-main.svelte-86bqav{width:100%;height:100%;pointer-events:none}")}function $o(i,t,e){const n=i.slice();return n[16]=t[e],n}function es(i){let t,e,n,o,s,r,a=i[9].floorDatas,l=[];for(let h=0;h<a.length;h+=1)l[h]=ts($o(i,a,h));const c=h=>S(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=we(f,d[h]);n=new Yc({props:f});let u=i[6]&&ns(i);return{c(){t=V("div");for(let h=0;h<l.length;h+=1)l[h].c();e=ee(),$(n.$$.fragment),o=ee(),u&&u.c(),b(t,"class","floorplan-main svelte-86bqav")},m(h,p){z(h,t,p);for(let A=0;A<l.length;A+=1)l[A].m(t,null);Q(t,e),q(n,t,null),Q(t,o),u&&u.m(t,null),r=!0},p(h,p){if(i=h,p&62384){a=i[9].floorDatas;let g;for(g=0;g<a.length;g+=1){const v=$o(i,a,g);l[g]?(l[g].p(v,p),k(l[g],1)):(l[g]=ts(v),l[g].c(),k(l[g],1),l[g].m(t,e))}for(se(),g=a.length;g<l.length;g+=1)c(g);re()}const A=p&3592?Be(d,[{panoIndex:i[3],floorplanData:i[9],lastPanoramaLongitude:i[10],cameraImageUrl:i[11]}]):{};n.$set(A),i[6]?u?(u.p(i,p),p&64&&k(u,1)):(u=ns(i),u.c(),k(u,1),u.m(t,null)):u&&(se(),S(u,1,1,()=>{u=null}),re())},i(h){if(!r){for(let p=0;p<a.length;p+=1)k(l[p]);k(n.$$.fragment,h),k(u),s||De(()=>{s=Rt(t,Bt,{duration:i[0],easing:yt}),s.start()}),r=!0}},o(h){l=l.filter(Boolean);for(let p=0;p<l.length;p+=1)S(l[p]);S(n.$$.fragment,h),S(u),r=!1},d(h){h&&M(t),lt(l,h),K(n),u&&u.d()}}}function ts(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=we(o,n[s]);return t=new lu({props:o}),{c(){$(t.$$.fragment)},m(s,r){q(t,s,r),e=!0},p(s,r){const a=r&62384?Be(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){S(t.$$.fragment,s),e=!1},d(s){K(t,s)}}}function ns(i){let t,e;return t=new ed({props:{floorplanData:i[9],northDesc:i[2]}}),{c(){$(t.$$.fragment)},m(n,o){q(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){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function du(i){let t,e,n=i[1]&&es(i);return{c(){n&&n.c(),t=fe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[1]?n?(n.p(o,s),s&2&&k(n,1)):(n=es(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(se(),S(n,1,1,()=>{n=null}),re())},i(o){e||(k(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function uu(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:p}=t,{getRoomAreaText:A}=t,{getLabelElement:g}=t,{getRuleDistanceText:v}=t,{adaptiveRoomLabelVisibleEnable:w}=t;return i.$$set=y=>{"duration"in y&&e(0,n=y.duration),"visible"in y&&e(1,o=y.visible),"northDesc"in y&&e(2,s=y.northDesc),"panoIndex"in y&&e(3,r=y.panoIndex),"floorIndex"in y&&e(4,a=y.floorIndex),"hoverEnable"in y&&e(5,l=y.hoverEnable),"compassEnable"in y&&e(6,c=y.compassEnable),"roomLabelsEnable"in y&&e(7,d=y.roomLabelsEnable),"ruleLabelsEnable"in y&&e(8,f=y.ruleLabelsEnable),"floorplanData"in y&&e(9,u=y.floorplanData),"lastPanoramaLongitude"in y&&e(10,h=y.lastPanoramaLongitude),"cameraImageUrl"in y&&e(11,p=y.cameraImageUrl),"getRoomAreaText"in y&&e(12,A=y.getRoomAreaText),"getLabelElement"in y&&e(13,g=y.getLabelElement),"getRuleDistanceText"in y&&e(14,v=y.getRuleDistanceText),"adaptiveRoomLabelVisibleEnable"in y&&e(15,w=y.adaptiveRoomLabelVisibleEnable)},[n,o,s,r,a,l,c,d,f,u,h,p,A,g,v,w]}class oo extends oe{constructor(t){super(),ie(this,t,uu,du,ne,{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},cu)}}const fu="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC0AAAAwCAYAAACFUvPfAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAALaADAAQAAAABAAAAMAAAAADe2FZjAAAEF0lEQVRoBe2WzWskRRiHf13V092TxI2oEzYeVDwITtyDuCiihwiCePGgxIM3vYgHL4J4UIhBRA8i/gPqyUvWg7AiIuIeloDiYUHJLOK6BPwIk9nNODM9Xf1RVe1b3elJRjCZmQ6euqGmuqer33rq4e23GqiOykBloDJQGagMVAYqA5WBykBlYFYD1qwP/tdzaZqOx9zYOLxeX0+L5yzLGp0X/03a25MOnGRcBtx+6Rlo9SL08G4EooFnxa8Yiivox5/h5Ys/4cl7NVorNDRnngX+0MIkVMeMSf23zyKML8J7/Dy8hwF2Buh9CnS+AEQIdLspBuGb+M7/qLW4qJrNpsLapjYhpwVnx3BMfCtNNx3Etc9xywvnMf80wG8HmQainw0RxSGrnmeBp+8k5/j9S0HbvXb5io0Lz880/0wPHV1NlhLd316He+4xOCv5ragF7L9PrH1qBJyB0626x/lC+qrSvH5r/W+n1WpxUM5nMY4GPeH8lHJaPgfeAFQHCL+ntkXT+vnUc3W6pvTIwC0wy3rA4dwLmK2avZ7Eo9uKBuYJfgJscbs8dLCxDMt+EOEPBEZNEWyBYHqTz6bPXrzUnNrSShxHIsYiOL69zrCGLLcLqJP68tB+9w5wj+YhWDafQ2s61wNqxjZhmrQ2pvMFCEvXuCUZ7wqH794ZWs28LJqlTXSUyuksF2M/yOwqgkx2c1ADa4wLAQRk2sAGQQakhN6yFC2hltfz5kSY44NKQeeh+vtI/SSzWhg2CzCgmWISmKUGmaYFBDfCSymnfxJ6/+ospVcWOLLp5DGP/y0P/Rp66O99DQNq7Po3Ds0a0wY+My2QSv2N2mO/OyxR2o6UQk+Lv7yJ06JYSnnolZVU9cUn2O9SmaMWGFBqYXRwbqAJWIi94TX5biotpcGl1DXZ6LnqIbNDTnmUgi52Mv5l5ysMxIcZcGjy2DTK4ZHlcBC14zeSge4qphICjj3bS0A7o9nSp2TOkm7aZ8bGZy/jxhO87V91G0+dfY/Z7BWIIK9KYUi5qy/Hf8YfBG3sqJTHiQWhmTVkbip+wX3x6volVSx+LPAxF+VLXhZ8VQ+iP2Rta/iWe5v42Fngj0BbdnRTXh12ZIcKhTaGbcYjybRwXBU1lu9KlndXp04NM52poKWO0RZsviNaP9a6grkO972+st05pXhE5c1hTEluJy7XUejGUQNLMbAmTdWY1rKBLW3aTJqBZ7nZkb36DhYCreeYHbMUXHvaYi5XDK70EcgulmRjm77wNtenzuXCbmnTRaAx493rbGf3Jr/njMzj920CnKdUaFCjlDioy7NYNvOdGrQJNgI32/L2tkXfFPlxgToqjWVhD6KdLnQRdARf/HHQz2r2X2Gqy8pAZaAyUBmoDFQGKgP/q4F/AJYg9/s0ZoABAAAAAElFTkSuQmCC";function hu(i){return Y(this,null,function*(){const t=new Headers({"Content-Type":"text/plain"}),e=function(o){return Y(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 mu(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 pu(i){return{floorName:i.floor_name,floorIndex:i.floor_index,rooms:i.rooms.map(mu),rules:i.rules}}function gu(i){return{index:i.index,floorIndex:i.floor_index,position:i.position,positionInImage:i.position_in_image}}function Au(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 Ct(i){return Y(this,null,function*(){const t=yield hu(i.outlines),e=i.computed_data.bounding,n=i.computed_data.floor_datas.map(pu),o=i.computed_data.entrance?Au(i.computed_data.entrance):null;return{outlines:t,entrance:o,bounding:e,floorDatas:n,observers:i.computed_data.observers.map(gu)}})}function vu(i,t,e){return i.map(o=>{const s=o.position,r=o.icon?o.icon:{url:fu,width:45,height:48},a=Vd(s,t),l=zd(s,e),c=Bd(l,e);return{floorIndex:a,icon:r,id:o.id,position:l,positionInImage:c}})}function bu(i,t){return t(i),i}function ai(i,t){return bu({},e=>{for(const n in i)t.indexOf(n)===-1&&(e[n]=i[n])})}function is(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 so(i,t,e=gt.BOUNDING_CENTER){const n=is(i,t),o=is(i,t+1);return e===gt.BOUNDING_CENTER?(i.model.bounding.max.y+i.model.bounding.min.y)/2:e===gt.CEILING?o:n}function ro(i,t,e,n){const o=so(i,e,n==null?void 0:n.attachedTo),s=new x.Vector3(0,o,0),r=new x.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 li{constructor(t,e){m(this,"five");m(this,"hooks",new $t);m(this,"staticPrefix","//vrlab-static.ljcdn.com");this.five=t,e!=null&&e.staticPrefix&&(this.staticPrefix=e.staticPrefix)}getCurrentState(){return this.state}}class Ht extends li{}var Fe=(i=>(i.UnknownError="UnknownError",i.DataNotLoaded="DataNotLoaded",i.BreakOffByHide="BreakOffByHide",i.BreakOffByDisable="BreakOffByDisable",i.ModelNotLoaded="ModelNotLoaded",i.ChangeModeError="ChangeModeError",i.UpdateCameraError="UpdateCameraError",i))(Fe||{});const Ia=500,yu=80;function Ri(i,t,e=4){return Math.floor(i*Math.pow(10,e))===Math.floor(t*Math.pow(10,e))}function ka(i,t){return Y(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"?Ri(d,f,2):d===f}):!0})()||n(new Error("five pose \u4E0E\u9884\u671F\u4E0D\u7B26")),e()})})})}function ao(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!(!Ri(e,s,2)||!Ri(n,r,2)||o!==a)}function xa(i,t,e=!0){return Y(this,null,function*(){if(ao(i,t)===!0)return;const o=i.getCurrentState();if(o.mode!==t.mode){const[d]=yield Zn(ka(i,[t.mode,t,void 0,e]));if(d)throw new Error(Fe.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 Zn(i.updateCamera(t,l,e));if(c)throw new Error(Fe.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 wu(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 Cu(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 Eu extends Ht{constructor(e,n){var a;super(e);m(this,"name","modelFloorplanPlugin");m(this,"state");m(this,"data");m(this,"showState");m(this,"showPromise");m(this,"app");m(this,"panoIndex",0);m(this,"floorIndex",0);m(this,"selector");m(this,"showRejection");m(this,"wrapper");m(this,"container",document.createElement("div"));m(this,"lastPanoramaLongitude",0);m(this,"size",{width:0,height:0});m(this,"hasAddedEventListener",!1);m(this,"isHiddenByHideFunc",!1);m(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")});m(this,"show",(...n)=>Y(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)}));m(this,"hide",(...n)=>Y(this,[...n],function*(e={}){!this.state.enabled||(this.isHiddenByHideFunc=!0,this.state.visible!==!1&&(this.updateState({visible:!1},e.userAction||!0),this._hide(e)))}));m(this,"updateSize",()=>{if(!this.data||!ao(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=ro(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})});m(this,"_disable",e=>{var o,s,r;const{userAction:n}=e;this.hooks.emit("disable",{userAction:n}),(o=this.showRejection)==null||o.call(this,Fe.BreakOffByDisable),this.showPromise=void 0,(s=this.app)==null||s.$destroy(),this.app=void 0,(r=this.container)==null||r.remove(),this.removeEventListener()});m(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}))});m(this,"_show",e=>Y(this,null,function*(){var r;if(!this.state.enabled)return;if(!((r=this.five.model)!=null&&r.loaded))throw new Error(Fe.ModelNotLoaded);if(!this.data)throw new Error(Fe.DataNotLoaded);this.isHiddenByHideFunc=!1;const n={floorIndex:this.floorIndex,modelOpacity:this.state.config.modelOpacity,immediately:!1,isAutoShow:!1,userAction:!0},o=G(G({},n),e),s=()=>Y(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 Zn(xa(this.five,this.showState,o.userAction));if(c)throw c;if(a)throw l?new Error(l):new Error(Fe.UnknownError);this.updateSize(),this.floorIndex=o.floorIndex,this.five.model.show(this.floorIndex);const d=o.modelOpacity,f=o.immediately?0:Ia;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}));m(this,"_hide",e=>{var s;(s=this.showRejection)==null||s.call(this,Fe.BreakOffByHide),this.showPromise=void 0;const o=G(G({},{userAction:!0,isAutoHide:!1}),e);qt(this.five,1,0),this.hooks.emit("hide",{auto:o.isAutoHide,userAction:o.userAction}),this.render()});m(this,"handleClick",()=>{if(!this.state.visible)return;if(this.hooks.emit("click"))return!1});m(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)});m(this,"onFiveModeChange",e=>{e!==this.showState.mode&&(this.updateState({visible:!1},!1),this._hide({userAction:!1}))});m(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||Cu(o)&&(this.updateState({visible:!0},!0),this._show({isAutoShow:!0})))});m(this,"onFivePanoArrived",e=>{var n;!((n=this.five)!=null&&n.work)||(this.panoIndex=e,this.floorIndex=this.five.work.observers[e].floorIndex)});m(this,"onFiveCameraUpdate",(e,n)=>{if(!this.state.visible||this.showPromise)return;const o=this.five.getCurrentState();wu(o)&&(this.updateState({visible:!1},n),this._hide({userAction:n,isAutoHide:!0}))});m(this,"onFiveWantsGesture",(e,n)=>{if(!!this.state.visible&&(n.length>1||e==="mouseWheel"))return!1});m(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});m(this,"onFiveWantsTapGesture",()=>this.handleClick());m(this,"onFiveWantsChangeMode",(e,n)=>{n==="Panorama"&&e==="Floorplan"&&(this.lastPanoramaLongitude=this.five.getCurrentState().longitude)});m(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:yu/((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:wt,attachedTo:gt.BOUNDING_CENTER,getLabelElement:void 0,getRoomAreaText:l=>(l/1e6).toFixed(1)+"\u33A1",getRuleDistanceText:l=>l.toString()},s=n?ai(n,["selector","scale"]):{},r=G(G({},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 Y(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 Ct(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 Y(this,null,function*(){return yield Ct(e.data)})}updateState(e,n){const o=this.state,s=e.config?G(G({},o.config),e.config):o.config;this.state=he(G(G({},this.state),e),{config:s}),!Je(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=he(G({},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 oo({target:this.container,intro:!0,props:n})}}const Pu=(i,t)=>new Eu(i,t);function Iu(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 ku(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 xu extends Ht{constructor(e,n){super(e);m(this,"name","modelFloorplanPlugin");m(this,"state");m(this,"data");m(this,"showState");m(this,"showPromise");m(this,"app");m(this,"panoIndex",0);m(this,"floorIndex",0);m(this,"selector");m(this,"showRejection");m(this,"wrapper");m(this,"container",document.createElement("div"));m(this,"lastPanoramaLongitude",0);m(this,"size",{width:0,height:0});m(this,"hasAddedEventListener",!1);m(this,"isHiddenByHideFunc",!1);m(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")});m(this,"show",(...n)=>Y(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)}));m(this,"hide",(...n)=>Y(this,[...n],function*(e={}){!this.state.enabled||(this.isHiddenByHideFunc=!0,this.state.visible!==!1&&(this.updateState({visible:!1},e.userAction||!0),this._hide(e)))}));m(this,"updateSize",()=>{if(!this.data||!ao(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=ro(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})});m(this,"_disable",e=>{var o,s,r;const{userAction:n}=e;this.hooks.emit("disable",{userAction:n}),(o=this.showRejection)==null||o.call(this,Fe.BreakOffByDisable),this.showPromise=void 0,(s=this.app)==null||s.$destroy(),this.app=void 0,(r=this.container)==null||r.remove(),this.removeEventListener()});m(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}))});m(this,"_show",e=>Y(this,null,function*(){var r;if(!this.state.enabled)return;if(!((r=this.five.model)!=null&&r.loaded))throw new Error(Fe.ModelNotLoaded);if(!this.data)throw new Error(Fe.DataNotLoaded);this.isHiddenByHideFunc=!1;const n={floorIndex:this.floorIndex,modelOpacity:this.state.config.modelOpacity,immediately:!1,isAutoShow:!1,userAction:!0},o=G(G({},n),e),s=()=>Y(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 Zn(xa(this.five,this.showState,o.userAction));if(c)throw c;if(a)throw l?new Error(l):new Error(Fe.UnknownError);this.updateSize(),this.updatePosition(),this.floorIndex=o.floorIndex,this.five.model.show(this.floorIndex);const d=o.modelOpacity,f=o.immediately?0:Ia;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}));m(this,"_hide",e=>{var s;(s=this.showRejection)==null||s.call(this,Fe.BreakOffByHide),this.showPromise=void 0;const o=G(G({},{userAction:!0,isAutoHide:!1}),e);qt(this.five,1,0),this.hooks.emit("hide",{auto:o.isAutoHide,userAction:o.userAction}),this.render()});m(this,"handleClick",()=>{if(!this.state.visible)return;if(this.hooks.emit("click"))return!1});m(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)});m(this,"onFiveModeChange",e=>{e!==this.showState.mode&&(this.updateState({visible:!1},!1),this._hide({userAction:!1}))});m(this,"onFivePanoArrived",e=>{var n;!((n=this.five)!=null&&n.work)||(this.panoIndex=e,this.floorIndex=this.five.work.observers[e].floorIndex)});m(this,"onFiveCameraUpdate",(e,n)=>{if(!this.state.visible||this.showPromise)return;const o=this.five.getCurrentState();this.updatePosition(),this.updateSize(),Iu(o)&&(this.updateState({visible:!1},n),this._hide({userAction:n}))});m(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:(ku(o)&&(this.updateState({visible:!0},!0),this._show({isAutoShow:!0})),!1)}}});m(this,"onFiveWantsTapGesture",()=>this.handleClick());m(this,"onFiveWantsChangeMode",(e,n)=>{n==="Panorama"&&e===this.showState.mode&&(this.lastPanoramaLongitude=this.five.getCurrentState().longitude)});m(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:wt,attachedTo:gt.BOUNDING_CENTER,getLabelElement:void 0,adaptiveRoomLabelVisibleEnable:!0,getRoomAreaText:a=>(a/1e6).toFixed(1)+"\u33A1",getRuleDistanceText:a=>a.toString()},s=n?ai(n,["selector","scale"]):{},r=G(G({},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 Y(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 Ct(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=so(this.five,this.floorIndex,this.state.config.attachedTo),n=(a=this.five.model)==null?void 0:a.bounding.getCenter(new x.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 Y(this,null,function*(){return yield Ct(e.data)})}updateState(e,n){const o=this.state,s=e.config?G(G({},o.config),e.config):o.config;this.state=he(G(G({},this.state),e),{config:s}),!Je(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=he(G({},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 oo({target:this.container,intro:!0,props:n})}}const Du=(i,t)=>new xu(i,t);class Lu extends Ht{constructor(e,n){super(e);m(this,"name","topviewFloorplanPlugin");m(this,"state");m(this,"data");m(this,"app");m(this,"selector");m(this,"panoIndex",0);m(this,"floorIndex",0);m(this,"wrapper");m(this,"container",document.createElement("div"));m(this,"lastPanoramaLongitude",0);m(this,"size",{width:0,height:0});m(this,"hasAddedEventListener",!1);m(this,"isHiddenByHideFunc",!1);m(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=ro(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})});m(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")});m(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})});m(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)});m(this,"onFiveModeChange",(...[e,,,,n])=>{e!=="Topview"&&this.state.visible&&(this.updateState({visible:!1},n),this._hide({userAction:n}))});m(this,"onFivePanoArrived",e=>{var n;!((n=this.five)!=null&&n.work)||(this.panoIndex=e,this.floorIndex=this.five.work.observers[e].floorIndex)});m(this,"onFiveCameraUpdate",(e,n)=>{!this.state.visible||(this.updatePosition(),this.updateSize())});m(this,"onFiveWantsGesture",e=>{if(!(e!=="pan"&&e!=="pinch"&&e!=="mouseWheel")&&this.state.visible&&!this.state.config.gestureEnable)return!1});m(this,"onFiveWantsMoveToPano",()=>{if(this.state.visible&&this.state.config.preventRoomClick)return!1});m(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}))});m(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:wt,attachedTo:gt.BOUNDING_CENTER,getLabelElement:void 0,adaptiveRoomLabelVisibleEnable:!0,getRoomAreaText:a=>(a/1e6).toFixed(1)+"\u33A1",getRuleDistanceText:a=>a.toString()},s=n?ai(n,["selector","scale"]):{},r=G(G({},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 Y(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 Ct(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=so(this.five,this.floorIndex,this.state.config.attachedTo),n=(a=this.five.model)==null?void 0:a.bounding.getCenter(new x.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 Y(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 Y(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 Y(this,null,function*(){return yield Ct(e.data)})}_show(e){return Y(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 ka(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 Y(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?G(G({},o.config),e.config):o.config;this.state=he(G(G({},this.state),e),{config:s}),!Je(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=he(G({},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 oo({target:this.container,intro:!0,props:n})}}const Su=(i,t)=>new Lu(i,t);function lo(i,t=200){let e;return function(...n){e||(i(...n),e=setTimeout(function(){e=null},t))}}function Tu(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 Mu(i){let t,e,n;return{c(){t=V("div"),e=V("div"),n=V("div"),b(n,"class","plugin-radar__camera-rotate svelte-1nqrlxd"),T(n,"background-image","url("+(i[0]||wt)+")"),T(n,"transform",i[1]),b(e,"class","plugin-radar__camera-position svelte-1nqrlxd"),T(e,"transform",i[2]),b(t,"class","plugin-radar__camera-wrapper svelte-1nqrlxd")},m(o,s){z(o,t,s),Q(t,e),Q(e,n)},p(o,[s]){s&1&&T(n,"background-image","url("+(o[0]||wt)+")"),s&2&&T(n,"transform",o[1]),s&4&&T(e,"transform",o[2])},i:Z,o:Z,d(o){o&&M(t)}}}function zu(i){return`rotate(${Math.floor(i/Math.PI*180)*-1+45}deg)`}function Bu(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(p,A){const g=p.bounding,v=p.observers[A];if(!v)return"";const w=(g.max.x-g.min.x)*r,y=(g.max.y-g.min.y)*r,P=Math.floor(v.positionInImage.x*w),I=Math.floor(v.positionInImage.y*y);return`translate(${P}px, ${I}px)`}function u(p){e(6,c=p)}const h=lo(p=>{e(7,d=p.longitude)},1e3/60);return Ze(()=>(s.on("panoWillArrive",u),s.on("cameraDirectionUpdate",h),function(){s.off("panoWillArrive",u),s.off("cameraDirectionUpdate",h)})),i.$$set=p=>{"five"in p&&e(3,s=p.five),"pxmm"in p&&e(4,r=p.pxmm),"floorplanData"in p&&e(5,a=p.floorplanData),"cameraImageUrl"in p&&e(0,l=p.cameraImageUrl)},i.$$.update=()=>{i.$$.dirty&96&&e(2,n=f(a,c)),i.$$.dirty&128&&e(1,o=zu(d))},[l,o,n,s,r,a,c,d]}class Vu extends oe{constructor(t){super(),ie(this,t,Bu,Mu,ne,{five:3,pxmm:4,floorplanData:5,cameraImageUrl:0},Tu)}}function ju(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 os(i,t,e){const n=i.slice();return n[1]=t[e],n}function ss(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=V("div"),n=V("div"),r=ee(),b(n,"class","plugin-pano-floorplan__extra-object-item svelte-1i87fz7"),T(n,"background-image",`url(${t[1].icon.url})`),T(n,"width",o),T(n,"height",s),b(e,"class","plugin-pano-floorplan__extra-object-item--position svelte-1i87fz7"),T(e,"top",a),T(e,"left",l),this.first=e},m(c,d){z(c,e,d),Q(e,n),Q(e,r)},p(c,d){t=c,d&1&&T(n,"background-image",`url(${t[1].icon.url})`),d&1&&o!==(o=`${t[1].icon.width/16}rem`)&&T(n,"width",o),d&1&&s!==(s=`${t[1].icon.height/16}rem`)&&T(n,"height",s),d&1&&a!==(a=`${t[1].positionInImage.y*100}%`)&&T(e,"top",a),d&1&&l!==(l=`${t[1].positionInImage.x*100}%`)&&T(e,"left",l)},d(c){c&&M(e)}}}function Qu(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=os(i,o,r),l=s(a);n.set(l,e[r]=ss(l,a))}return{c(){t=V("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){z(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=qe(e,a,s,1,r,o,n,t,to,ss,null,os))},i:Z,o:Z,d(r){r&&M(t);for(let a=0;a<e.length;a+=1)e[a].d()}}}function Ru(i,t,e){let{extraObjects:n=[]}=t;return i.$$set=o=>{"extraObjects"in o&&e(0,n=o.extraObjects)},[n]}class Ou extends oe{constructor(t){super(),ie(this,t,Ru,Qu,ne,{extraObjects:0},ju)}}function rs(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=we(o,n[s]);return t=new Pa({props:o}),{c(){$(t.$$.fragment)},m(s,r){q(t,s,r),e=!0},p(s,r){const a=r&87?Be(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){S(t.$$.fragment,s),e=!1},d(s){K(t,s)}}}function Hu(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=we(l,a[d]);t=new Ca({props:l}),n=new Ou({props:{extraObjects:i[5]}});let c=i[3]&&rs(i);return{c(){$(t.$$.fragment),e=ee(),$(n.$$.fragment),o=ee(),c&&c.c(),s=fe()},m(d,f){q(t,d,f),z(d,e,f),q(n,d,f),z(d,o,f),c&&c.m(d,f),z(d,s,f),r=!0},p(d,[f]){const u=f&20?Be(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=rs(d),c.c(),k(c,1),c.m(s.parentNode,s)):c&&(se(),S(c,1,1,()=>{c=null}),re())},i(d){r||(k(t.$$.fragment,d),k(n.$$.fragment,d),k(c),r=!0)},o(d){S(t.$$.fragment,d),S(n.$$.fragment,d),S(c),r=!1},d(d){K(t,d),d&&M(e),K(n,d),d&&M(o),c&&c.d(d),d&&M(s)}}}function Fu(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 Gu extends oe{constructor(t){super(),ie(this,t,Fu,Hu,ne,{five:0,pxmm:1,floorIndex:2,hoverEnable:3,floorplanData:4,extraObjects:7})}}function Nu(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 as(i){let t,e,n,o=i[6]!==0&&ls(i);return{c(){t=V("div"),o&&o.c(),b(t,"class","plugin-floorplan-radar svelte-1mvqyqq"),De(()=>i[12].call(t))},m(s,r){z(s,t,r),o&&o.m(t,null),e=Et(t,i[12].bind(t)),n=!0},p(s,r){s[6]!==0?o?(o.p(s,r),r&64&&k(o,1)):(o=ls(s),o.c(),k(o,1),o.m(t,null)):o&&(se(),S(o,1,1,()=>{o=null}),re())},i(s){n||(k(o),n=!0)},o(s){S(o),n=!1},d(s){s&&M(t),o&&o.d(),e()}}}function ls(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=we(c,l[u]);e=new Gu({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=we(f,d[u]);return o=new Vu({props:f}),{c(){t=V("div"),$(e.$$.fragment),n=ee(),$(o.$$.fragment),b(t,"class","plugin-floorplan-radar-container svelte-1mvqyqq"),T(t,"width",s),T(t,"height",r)},m(u,h){z(u,t,h),q(e,t,null),Q(t,n),q(o,t,null),a=!0},p(u,h){const p=h&1581?Be(l,[{five:u[0],pxmm:u[9],floorIndex:u[10],floorplanData:u[3],hoverEnable:u[2],extraObjects:u[5]}]):{};e.$set(p);const A=h&537?Be(d,[{pxmm:u[9],five:u[0],floorplanData:u[3],cameraImageUrl:u[4]}]):{};o.$set(A),h&256&&s!==(s=`${u[8]}px`)&&T(t,"width",s),h&2048&&r!==(r=`${u[11]}px`)&&T(t,"height",r)},i(u){a||(k(e.$$.fragment,u),k(o.$$.fragment,u),a=!0)},o(u){S(e.$$.fragment,u),S(o.$$.fragment,u),a=!1},d(u){u&&M(t),K(e),K(o)}}}function Wu(i){let t,e,n=i[1]&&as(i);return{c(){n&&n.c(),t=fe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[1]?n?(n.p(o,s),s&2&&k(n,1)):(n=as(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(se(),S(n,1,1,()=>{n=null}),re())},i(o){e||(k(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function _u(i,t,e){var v,w;let{five:n}=t,{visible:o}=t,{hoverEnable:s}=t,{floorplanData:r}=t,{cameraImageUrl:a}=t,{extraObjects:l=[]}=t,c=0,d=(w=(v=n.work.observers[n.getCurrentState().panoIndex])==null?void 0:v.floorIndex)!=null?w:0,f=0,u=0,h=0,p=0;function A(y){e(10,d=n.work.observers[y].floorIndex)}Ze(()=>(n.on("panoArrived",A),()=>{n.off("panoArrived",A)}));function g(){f=this.clientWidth,u=this.clientHeight,e(6,f),e(7,u)}return i.$$set=y=>{"five"in y&&e(0,n=y.five),"visible"in y&&e(1,o=y.visible),"hoverEnable"in y&&e(2,s=y.hoverEnable),"floorplanData"in y&&e(3,r=y.floorplanData),"cameraImageUrl"in y&&e(4,a=y.cameraImageUrl),"extraObjects"in y&&e(5,l=y.extraObjects)},i.$$.update=()=>{if(i.$$.dirty&456){const y=Math.min(f,u),{max:P,min:I}=r.bounding,C=P.x-I.x,L=P.y-I.y,D=function(){return C>L?[y,y/C*L]:[y/L*C,y]}();e(8,h=D[0]),e(11,p=D[1]),e(9,c=h/C)}},[n,o,s,r,a,l,f,u,h,c,d,p,g]}class Xu extends oe{constructor(t){super(),ie(this,t,_u,Wu,ne,{five:0,visible:1,hoverEnable:2,floorplanData:3,cameraImageUrl:4,extraObjects:5},Nu)}}class Yu extends Ht{constructor(e,n){super(e);m(this,"name","panoFloorplanRadarPlugin");m(this,"state");m(this,"data");m(this,"app");m(this,"wrapperSelector","");m(this,"wrapper",null);m(this,"disposed",!1);m(this,"extraObjects",[]);m(this,"dispose",()=>{var e;this.disposed=!0,(e=this.app)==null||e.$destroy(),this.wrapper=null,this.wrapperSelector="",this.hooks.emit("dispose")});m(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:wt},s=n!=null&&n.configs?n.configs:{},r=G(G({},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 Y(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 Ct(a),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,l),n&&this.updateState(n,o),this.render()})}show(){return Y(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 Y(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=vu(e,this.five,this.data),this.render())}formatData(e){return Y(this,null,function*(){return yield Ct(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=G(G({},this.state),e),!Je(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=he(G({},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 Xu({target:this.wrapper,props:e})}}const Uu=(i,t)=>new Yu(i,t),Ju=[{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"}],Zu=[{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"}],qu=[{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"}],Ci=(i,t,e)=>{const n=new x.Matrix4,o=new x.Euler(i,t,e,"YXZ");return n.makeRotationFromEuler(o),n},Ku=(i,{scale:t,rotation:e,position:n})=>{if(t&&i.scale.set(t,t,t),e){const[o,s,r]=e;o&&i.applyMatrix4(Ci(o,0,0)),s&&i.applyMatrix4(Ci(0,s,0)),r&&i.applyMatrix4(Ci(0,0,r))}return n&&i.position.set(n.x,n.y,n.z),i};function Da(i,t){i.traverse(e=>{var n;if(e.type==="Mesh"){const o=e,s=G({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 $u=(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=>Y(exports,null,function*(){var X;const u=(f==null?void 0:f.fbx_url)||e,h=(X=f==null?void 0:f.north_rad)!=null?X: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 p=i.model.bounding,A=p.max.x-p.min.x,g=p.max.z-p.min.z,v=Math.max(A,g),y=yield new Jr.FBXLoader().loadAsync(u);Da(y,{transparent:!0,side:x.DoubleSide,blending:x.AdditiveBlending});const P=[0,h-Math.PI/2,0],{model:{bounding:{max:{x:I,z:C},min:{x:L,y:D,z:B}}}}=i;o.yBase=D;const N={x:(I+L)/2,y:D-1.6,z:(C+B)/2},F=.0045*v;return Ku(y,{position:N,rotation:P,scale:F}),o.object=y,!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 ef(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 tf=({x:i,y:t,z:e})=>new H.Vector3(i,t,e),nf=(i,t)=>{var A,g,v;const e={},n=(A=t.animationEnabled)!=null?A:!0,o=(g=t.position)!=null?g:void 0,s=(v=t.rad)!=null?v:void 0,r=t.fbx_url||"//vrlab-image4.ljcdn.com/release/web/entryDoorMini/Anim_Door1.fbx",a=[],l=w=>Y(exports,null,function*(){var N,F,X,j,E,R,O,W;const y=(N=w==null?void 0:w.position)!=null?N:o;if(!y)return Promise.reject(new Error("ModelEntryDoorGuidePlugin.load(): position is undefined"));const P=tf(y),I=(F=w==null?void 0:w.rad)!=null?F:s,C=(X=w==null?void 0:w.fbx_url)!=null?X:r;if(e.rad=I,I===void 0)return Promise.reject(new Error(`ModelEntryDoorGuidePlugin.load(): rad is ${I}`));const L=yield new Jr.FBXLoader().loadAsync(C);L.position.copy(P),L.rotation.z=I,L.scale.set(.8,.8,.8),Da(L,{transparent:!0,side:x.DoubleSide});const D=(O=(R=(E=(j=L.children)==null?void 0:j[0])==null?void 0:E.children)==null?void 0:R[3])==null?void 0:O.clone();if(!D)return Promise.reject(new Error(`ModelEntryDoorGuidePlugin.load(): textMesh is ${D}`));const B=(W=t.name)!=null?W:"\u5165\u6237\u95E8";return D.material=new H.MeshBasicMaterial({transparent:!0,map:ef(B)}),D.renderOrder=3,L.children[0].add(D),e.object=L,!0}),c=()=>{if(e.animation)return;if(!e.object)return console.error("ModelEntryDoorGuidePlugin.initAnimation(): state.object is ",e.object);const w=1,y=new H.AnimationMixer(e.object);a.push(y);const P=y.clipAction(e.object.animations[0]);P.timeScale=w;let I;const C=()=>{let N=0,F=0;const X=1e3/30,j=E=>{N=requestAnimationFrame(j);const R=E-F;R<X||(F=E,a.forEach(O=>O.update(R/1e3)),i.needsRender=!0)};return N=requestAnimationFrame(j),()=>{cancelAnimationFrame(N)}},B={play:()=>{I||(P.play(),I=C(),requestAnimationFrame(()=>{e.object&&e.object.rotation.z!==e.rad&&(e.object.rotation.z=e.rad)}))},stop:()=>{P.stop(),I==null||I(),I=void 0}};e.animation=B},d=w=>{var P;if(!e.object)return console.error("ModelEntryDoorGuidePlugin.enable(): object is ",e.object);((P=w==null?void 0:w.animationEnable)!=null?P: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=w=>w==="Floorplan"?d():f();return{load:l,enable:w=>(e.enabled||(e.enabled=!0,u(i.currentMode),i.on("modeChange",u),d(w)),!0),disable:()=>(e.enabled&&(e.enabled=!1,f(),i.off("modeChange",u)),!0)}};class co extends fn.default.Tween{constructor(){super(...arguments);m(this,"disposeMethods",[]);m(this,"animationFrameDisposer");m(this,"onDispose",e=>(this.disposeMethods.push(e),this));m(this,"play",()=>(this.start(0),this.animationFrameDisposer=di(e=>this.update(e)),this));m(this,"dispose",()=>{var e;this.stop(),(e=this.animationFrameDisposer)==null||e.call(this),this.disposeMethods.forEach(n=>n()),this.disposeMethods=[],fn.default.remove(this)})}}function La(i,t=fn.default.Easing.Linear.None){const e=new co({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)),of=window.cancelAnimationFrame||clearTimeout;function ci(i,t=0){t<=0?pn(i):pn(()=>ci(i,t-1))}function di(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(){of(e)}}function sf(){const i=Date.now();return new Promise(t=>{pn(()=>{t(Date.now()-i)})})}const rf=ni.Easing;function af(i,t,e,n=rf.Linear.None){const o=new ni.Tween(i).to(t,e).easing(n);ci(()=>o.start(0));const s=di(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 lf(i,t){return af({progress:0},{progress:1},i,t)}var Sa=(i=>(i.Move="Move",i.Rotate="Rotate",i))(Sa||{}),Ue=(i=>(i.Clockwise="Clockwise",i.Anticlockwise="Anticlockwise",i.Loop="Loop",i))(Ue||{});const On=Math.PI*2;function cs(i){return(i%On+On)%On}function ds(i){return i%On}function Ei(i,t,e){return i+(t-i)*e}const Oi=(i,t,e)=>{const n=Math.PI,o=n*2;return i=cs(i),t=cs(t),e===Ue.Anticlockwise&&i<t&&(i+=o),e===Ue.Clockwise&&t<i&&(t+=o),e===Ue.Loop&&t-i>n?Oi(i,t,Ue.Anticlockwise):e===Ue.Loop&&i-t>n?Oi(i,t,Ue.Clockwise):{from:i,to:t}},cf=i=>{const t={},e=(l,c,...d)=>Y(exports,[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=ds(r.latitude),l=ds(s.latitude),{from:c,to:d}=Oi(r.longitude,s.longitude,s.rotation||Ue.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)=>Y(exports,[l,c,...d],function*(s,r,a={}){t.interruptCallback&&t.interruptCallback(!1),a.asyncStartCallback&&(yield a.asyncStartCallback()),i.currentMode!==be.Five.Mode.Panorama&&(yield i.changeMode(be.Five.Mode.Panorama)),s.panoIndex!==void 0&&s.panoIndex!==i.panoIndex&&(a.preload&&(yield i.preloadPano(s.panoIndex)),yield new Promise((h,p)=>{if(!s.panoIndex){h(!0);return}i.moveToPano(s.panoIndex,{moveEndCallback:()=>h(!0),moveCancelCallback:()=>p(!1)})})),a.asyncEndCallback&&(yield a.asyncEndCallback());const{from:f,to:u}=n(s);return yield new Promise(h=>{const p=({progress:y})=>{const P={};P.longitude=Ei(f.longitude,u.longitude,y),P.latitude=Ei(f.latitude,u.latitude,y),P.fov=Ei(f.fov,u.fov,y),i.setState(P,!0)},A=()=>{h(!0)},g=()=>{h(!1)},v=s.rotateSpeed?Math.ceil(Math.abs(u.longitude-f.longitude)/s.rotateSpeed*1e3):r,w=lf(v,ni.Easing.Linear.None).onUpdate(p).onComplete(A).onDestroy(g);s.rotation===Ue.Loop&&w.repeat(1/0).yoyo(!0),t.interruptCallback=(y=!0)=>{w.destroy(),t.interruptCallback=void 0,t.timeoutId&&(clearTimeout(t.timeoutId),t.timeoutId=void 0),h(y)},t.timeoutId=setTimeout(()=>{t.interruptCallback&&t.interruptCallback(!0)},r)})})}};function us(i,t){return i.x===t.x&&i.y===t.y}function Ta(i,t){return Math.abs(i)===1/0&&Math.abs(t)===1/0?!0:Math.abs(i-t)<.001}function $n(i,t){return(t.y-i.y)/(t.x-i.x)}function Ma(i,t,e){const n=$n(i[1],i[0]),o=$n(t[1],t[0]);if(isNaN(n)||isNaN(o)||Ta(n,o))return!1;if(In(i[0],t))return i[0];if(In(i[1],t))return i[1];if(In(t[0],i))return t[0];if(In(t[1],i))return t[1];if(e&&!df(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 In(i,t){return us(i,t[0])||us(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&&Ta($n(t[0],i),$n(i,t[1]))}function kn(i,t,e){return(i.x-e.x)*(t.y-e.y)-(t.x-e.x)*(i.y-e.y)}function df(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)&&kn(t[0],i[1],i[0])*kn(i[1],t[1],i[0])>0&&kn(i[0],t[1],t[0])*kn(t[1],i[1],t[0])>0?1:0}function za(i,t=0){t<=0?requestAnimationFrame(i):requestAnimationFrame(()=>za(i,t-1))}const uf=`<style type="text/css">
|
|
116
116
|
.PanoRulerPlugin-rule-line {
|
|
117
117
|
position: absolute;
|
|
118
118
|
transform-origin: left center;
|
|
@@ -520,7 +520,7 @@ void main() {
|
|
|
520
520
|
z-index: 5;
|
|
521
521
|
`,e.container.style.pointerEvents="none";const n=p=>(e.wrapper=p,p.appendChild(e.container),l(),!0),o=p=>{e.itemLabels=qh(p),l()},s=()=>(e.enabled||(e.enabled=!0,l()),!0),r=()=>(e.enabled&&(e.enabled=!1,l()),!0),a=()=>{d(),e.container.remove()},l=()=>{var p;if(!!e.wrapper){if(!e.enabled||!e.fiveModeEnabled){(p=e.app)==null||p.$destroy(),e.app=void 0;return}e.app?e.app.$set({five:i,itemLabels:e.itemLabels}):e.app=new Zh({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=p=>{if(!!e.enabled){if(p!==be.Five.Mode.Floorplan){e.fiveModeEnabled=!1,l();return}i.once("initAnimationEnded",()=>{e.fiveModeEnabled=i.currentMode===be.Five.Mode.Floorplan,l()})}};return c(),{appendTo:n,load:o,enable:s,disable:r,dispose:a,hooks:e.hooks}},$h={name:"ModelItemLabelPlugin",version:0};var Yt=(i=>(i.TOP_LEFT="topLeft",i.TOP_RIGHT="topRight",i.BOTTOM_LEFT="bottomLeft",i.BOTTOM_RIGHT="bottomRight",i))(Yt||{});function em(i){if(i.length===0)return[];if(Array.isArray(i[0]))return i;let t=[];return i.forEach(e=>{const n=[e[Yt.TOP_LEFT],e[Yt.BOTTOM_LEFT],e[Yt.BOTTOM_RIGHT],e[Yt.TOP_RIGHT]];t.push(n)}),t}const tm=(i,{videoElement:t})=>{const e={videoMeshes:[],videoTextureEnabled:!1,videoSource:"",rectPoints:[],enabled:!1,videoElement:t},n=en(i),o=new Map,s=v=>{e.videoTexture&&(e.videoTexture.image.muted=v)},r=()=>e.videoTexture?e.videoTexture.image.muted:!0,a=()=>{if(e.enabled||!e.videoTexture)return;e.enabled=!0,e.videoMeshes=c(),e.videoMeshes.forEach(w=>i.scene.add(w));const v=()=>{if(!e.videoTexture)return;const w=()=>{var y;!e.videoTexture||((y=e.videoTexture)==null||y.image.removeEventListener("timeupdate",w),e.videoTextureEnabled=!0,e.videoMeshes.forEach(P=>{P.material.map!==e.videoTexture&&(P.material.map=e.videoTexture)}),i.needsRender=!0)};e.videoTexture.image.addEventListener("timeupdate",w),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)v();else return i.once("modelLoaded",()=>v())},l=()=>{!e.enabled||(e.enabled=!1,e.videoMeshes.forEach(v=>{v.geometry.dispose(),v.material.dispose(),i.scene.remove(v),e.videoTexture&&e.videoTexture.image.pause()}),e.videoMeshes=[],i.needsRender=!0)},c=()=>e.rectPoints.map((v,w)=>{const y=new x.BufferGeometry,P=128,I=[];I.push(...v[0].toArray());for(let j=1;j<P;j++)I.push(v[0].x+(v[1].x-v[0].x)*j/P,v[0].y+(v[1].y-v[0].y)*j/P,v[0].z+(v[1].z-v[0].z)*j/P);I.push(...v[1].toArray()),I.push(...v[2].toArray());for(let j=1;j<P;j++)I.push(v[2].x+(v[3].x-v[2].x)*j/P,v[2].y+(v[3].y-v[2].y)*j/P,v[2].z+(v[3].z-v[2].z)*j/P);I.push(...v[3].toArray());const C=[];C.push(0,1);for(let j=1;j<P;j++)C.push(0,1-j/P);C.push(0,0),C.push(1,0);for(let j=1;j<P;j++)C.push(1,j/P);C.push(1,1);const L=[];for(let j=0;j<P;j++)L.push(j,j+1,P*2-j,j,P*2-j,P*2+1-j);y.setAttribute("position",new x.BufferAttribute(new Float32Array(I),3)),y.setAttribute("uv",new x.BufferAttribute(new Float32Array(C),2)),y.setIndex(new x.BufferAttribute(new Uint32Array(L),1));const D=new x.AxesHelper(10);i.scene.add(D);const B=new x.MeshBasicMaterial({map:e.videoTextureEnabled?e.videoTexture:e.imageTexture,side:x.DoubleSide}),N=new x.Mesh(y,B);N.renderOrder=1,N.name=`ModelTVVideoPlugin-${w}-${performance.now()}`;const F=[v[1],v[2],v[3],v[0]],X=n.create3DDomContainer(F);if(X!=null&&X.container){const j=document.createElement("div");j.classList.add("play-icon"),j.style.width="100%",j.style.height="100%",j.style.display="flex",j.style.justifyContent="center",j.style.alignItems="center",j.style.pointerEvents="none",X.container.appendChild(j);const E=document.createElement("img");E.src="//vrlab-static.ljcdn.com/release/web/play.2ada5b6f.png",E.style.width="200px",E.style.pointerEvents="auto",E.onclick=()=>{e.videoTexture.image.muted=!1,e.videoTexture.image.play()},j.appendChild(E),o.set(N,X)}return N}),d=v=>{const w=new x.TextureLoader().load(v);return w.minFilter=x.LinearFilter,w.magFilter=x.LinearFilter,w.format=x.RGBFormat,w},f=(v,w)=>new Promise((y,P)=>{const I=new XMLHttpRequest;I.onreadystatechange=()=>{if(I.readyState==4)if(I.status==200){const C=window.URL||window.webkitURL;w=w||document.createElement("video"),w.crossOrigin="anonymous",w.muted=!0,w.loop=!0,w.playsInline=!0,w.src=C.createObjectURL(I.response);const L=new x.VideoTexture(w);L.minFilter=x.LinearFilter,L.magFilter=x.LinearFilter,L.format=x.RGBFormat,y(Object.assign(L,{videoSource:v}))}else P(new Error("Video download Error: "+I.status))},I.onerror=C=>P(C),I.open("GET",v),I.responseType="blob",I.send()}),u=(v,w)=>Y(exports,null,function*(){const{video_src:y,video_poster_src:P,points:I}=v;e.videoSource=y,e.rectPoints=em(I).map(C=>C.map(({x:L,y:D,z:B})=>new x.Vector3(L,D,B))),e.imageTexture=d(P),w&&(e.videoElement=w),e.videoTexture=yield f(e.videoSource,e.videoElement),e.enabled=!!v.enable,e.enabled&&a()}),h=v=>{if(!e.enabled)return;const w=e.videoMeshes;if(!(!w||v.intersectObjects(w).length===0))return e.videoTexture&&(e.videoTexture.image.paused||e.videoTexture.image.pause()),!1},p=v=>{v==="Floorplan"?n.hide():n.show()},A=()=>{if(!e.enabled)return;const v=i.camera.position;if(o.forEach((w,y)=>{const P=w.css3DObject.position.clone(),I=P.clone().sub(v).normalize(),C=new x.Raycaster(v,I),L=i.model.intersectRaycaster(C)[0],D=P.distanceTo(v),B=.01;L&&L.distance+B<D?w.hide():w.show()}),!r()){const w=e.rectPoints.find(y=>{const P=y[0].clone().add(y[1]).add(y[2]).add(y[3]).divideScalar(4);return y.map(I=>I.clone().add(P).divideScalar(2)).filter(I=>{const C=I.distanceTo(v),L=new x.Raycaster(v,I.clone().sub(v).normalize()),D=i.model.intersectRaycaster(L)[0],B=.01;return!(D&&D.distance+B<C)}).length>=2});(!w||w.length===0)&&s(!0)}},g=()=>{l(),e.videoTexture=void 0,i.off("modeChange",p),i.off("wantsTapGesture",h),i.off("panoArrived",A),i.off("renderFrame",()=>{e.videoMeshes.forEach(v=>{v&&(v.needsRender=!0)})})};return i.on("modeChange",p),i.on("wantsTapGesture",h),i.on("panoArrived",A),i.on("renderFrame",()=>{e.videoMeshes.forEach(v=>{v&&(v.needsRender=!0)})}),{enable:a,disable:l,load:u,dispose:g,state:e,css3DRenderPlugin:n}};function nm(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 im(i){let t,e,n,o=(i[0].code||i[0].id)+"",s,r,a,l=i[0].name+"",c,d=i[0].icon&&zs(i);return{c(){d&&d.c(),t=ee(),e=V("div"),n=V("span"),s=Ee(o),r=ee(),a=V("span"),c=Ee(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),z(f,t,u),z(f,e,u),Q(e,n),Q(n,s),Q(e,r),Q(e,a),Q(a,c)},p(f,u){f[0].icon?d?d.p(f,u):(d=zs(f),d.c(),d.m(t.parentNode,t)):d&&(d.d(1),d=null),u&1&&o!==(o=(f[0].code||f[0].id)+"")&&xe(s,o),u&1&&l!==(l=f[0].name+"")&&xe(c,l)},d(f){d&&d.d(f),f&&M(t),f&&M(e)}}}function om(i){let t;return{c(){t=V("div")},m(e,n){z(e,t,n),i[6](t)},p:Z,d(e){e&&M(t),i[6](null)}}}function zs(i){let t,e,n,o,s;return{c(){t=V("div"),e=V("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){z(r,t,a),Q(t,e),o||(s=Se(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&&M(t),o=!1,s()}}}function sm(i){let t,e,n,o,s,r,a,l,c,d;function f(p,A){return A&1&&(n=null),n==null&&(n=!!Boolean(typeof p[0].render=="function")),n?om:im}let u=f(i,-1),h=u(i);return{c(){t=V("div"),e=V("div"),h.c(),s=ee(),r=V("div"),b(e,"class",o=je(Ye.default("item-label-item__text-wrap",{"item-label-item__custom":Boolean(typeof i[0].render=="function")}))+" svelte-gduhqw"),T(e,"bottom",`${i[0].strokeLength}px`),b(r,"class",a=je(Ye.default("item-label-item__bar",{anchor:i[1]}))+" svelte-gduhqw"),T(r,"height",`${i[0].strokeLength}px`),b(t,"class",l=je(Ye.default("item-label-item",{fold:i[0].isFold}))+" svelte-gduhqw"),T(t,"z-index",i[0].zIndex),T(t,"transform",i[0].transform)},m(p,A){z(p,t,A),Q(t,e),h.m(e,null),Q(t,s),Q(t,r),c||(d=Se(e,"click",i[4]),c=!0)},p(p,[A]){u===(u=f(p,A))&&h?h.p(p,A):(h.d(1),h=u(p),h&&(h.c(),h.m(e,null))),A&1&&o!==(o=je(Ye.default("item-label-item__text-wrap",{"item-label-item__custom":Boolean(typeof p[0].render=="function")}))+" svelte-gduhqw")&&b(e,"class",o),A&1&&T(e,"bottom",`${p[0].strokeLength}px`),A&2&&a!==(a=je(Ye.default("item-label-item__bar",{anchor:p[1]}))+" svelte-gduhqw")&&b(r,"class",a),A&1&&T(r,"height",`${p[0].strokeLength}px`),A&1&&l!==(l=je(Ye.default("item-label-item",{fold:p[0].isFold}))+" svelte-gduhqw")&&b(t,"class",l),A&1&&T(t,"z-index",p[0].zIndex),A&1&&T(t,"transform",p[0].transform)},i:Z,o:Z,d(p){p&&M(t),h.d(),c=!1,d()}}}function rm(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){Le[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 am extends oe{constructor(t){super(),ie(this,t,rm,sm,ne,{itemLabel:0,hooks:5,anchorEnabled:1,onIconClick:2},nm)}}const{Raycaster:lm,Vector3:
|
|
523
|
+
}}`)}function im(i){let t,e,n,o=(i[0].code||i[0].id)+"",s,r,a,l=i[0].name+"",c,d=i[0].icon&&zs(i);return{c(){d&&d.c(),t=ee(),e=V("div"),n=V("span"),s=Ee(o),r=ee(),a=V("span"),c=Ee(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),z(f,t,u),z(f,e,u),Q(e,n),Q(n,s),Q(e,r),Q(e,a),Q(a,c)},p(f,u){f[0].icon?d?d.p(f,u):(d=zs(f),d.c(),d.m(t.parentNode,t)):d&&(d.d(1),d=null),u&1&&o!==(o=(f[0].code||f[0].id)+"")&&xe(s,o),u&1&&l!==(l=f[0].name+"")&&xe(c,l)},d(f){d&&d.d(f),f&&M(t),f&&M(e)}}}function om(i){let t;return{c(){t=V("div")},m(e,n){z(e,t,n),i[6](t)},p:Z,d(e){e&&M(t),i[6](null)}}}function zs(i){let t,e,n,o,s;return{c(){t=V("div"),e=V("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){z(r,t,a),Q(t,e),o||(s=Se(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&&M(t),o=!1,s()}}}function sm(i){let t,e,n,o,s,r,a,l,c,d;function f(p,A){return A&1&&(n=null),n==null&&(n=!!Boolean(typeof p[0].render=="function")),n?om:im}let u=f(i,-1),h=u(i);return{c(){t=V("div"),e=V("div"),h.c(),s=ee(),r=V("div"),b(e,"class",o=je(Ye.default("item-label-item__text-wrap",{"item-label-item__custom":Boolean(typeof i[0].render=="function")}))+" svelte-gduhqw"),T(e,"bottom",`${i[0].strokeLength}px`),b(r,"class",a=je(Ye.default("item-label-item__bar",{anchor:i[1]}))+" svelte-gduhqw"),T(r,"height",`${i[0].strokeLength}px`),b(t,"class",l=je(Ye.default("item-label-item",{fold:i[0].isFold}))+" svelte-gduhqw"),T(t,"z-index",i[0].zIndex),T(t,"transform",i[0].transform)},m(p,A){z(p,t,A),Q(t,e),h.m(e,null),Q(t,s),Q(t,r),c||(d=Se(e,"click",i[4]),c=!0)},p(p,[A]){u===(u=f(p,A))&&h?h.p(p,A):(h.d(1),h=u(p),h&&(h.c(),h.m(e,null))),A&1&&o!==(o=je(Ye.default("item-label-item__text-wrap",{"item-label-item__custom":Boolean(typeof p[0].render=="function")}))+" svelte-gduhqw")&&b(e,"class",o),A&1&&T(e,"bottom",`${p[0].strokeLength}px`),A&2&&a!==(a=je(Ye.default("item-label-item__bar",{anchor:p[1]}))+" svelte-gduhqw")&&b(r,"class",a),A&1&&T(r,"height",`${p[0].strokeLength}px`),A&1&&l!==(l=je(Ye.default("item-label-item",{fold:p[0].isFold}))+" svelte-gduhqw")&&b(t,"class",l),A&1&&T(t,"z-index",p[0].zIndex),A&1&&T(t,"transform",p[0].transform)},i:Z,o:Z,d(p){p&&M(t),h.d(),c=!1,d()}}}function rm(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){Le[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 am extends oe{constructor(t){super(),ie(this,t,rm,sm,ne,{itemLabel:0,hooks:5,anchorEnabled:1,onIconClick:2},nm)}}const{Raycaster:lm,Vector3:qA}=x,Bs=(i,t,e,n)=>{const o=t.clone().sub(e).normalize(),s=new lm;s.set(e,o);const[r]=i.model.intersectRaycaster(s);return r&&r.distance+.01<n};var Mt=(i=>(i.SMALL="small",i.MIDLLE="middle",i.LARGE="large",i.EXTRA_LARGE="x-large",i))(Mt||{});const cm=(i,t)=>{switch(t){case Mt.SMALL:return Math.ceil(-27.78*i+85);case Mt.MIDLLE:return Math.ceil(-38.9*i+130);case Mt.LARGE:return Math.ceil(-44.44*i+140);case Mt.EXTRA_LARGE:return Math.ceil(-92.59*i+300)}},dm=i=>`translate(${i[0]}px, ${i[1]}px)`;function Vs(i){return i.map(t=>G({observerIndex:void 0,visible:!1,isFold:!1},t))}function um(i){le(i,"svelte-gk8s47",".item-labels-container.svelte-gk8s47{width:100%;height:100%;position:relative}")}function js(i,t,e){const n=i.slice();return n[30]=t[e],n}function Qs(i){let t,e;return t=new am({props:{itemLabel:i[30],hooks:i[0],anchorEnabled:i[2],onIconClick:i[6]}}),{c(){$(t.$$.fragment)},m(n,o){q(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){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function Rs(i,t){let e,n,o,s=t[30].visible&&Qs(t);return{key:i,first:null,c(){e=fe(),s&&s.c(),n=fe(),this.first=e},m(r,a){z(r,e,a),s&&s.m(r,a),z(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=Qs(t),s.c(),k(s,1),s.m(n.parentNode,n)):s&&(se(),S(s,1,1,()=>{s=null}),re())},i(r){o||(k(s),o=!0)},o(r){S(s),o=!1},d(r){r&&M(e),s&&s.d(r),r&&M(n)}}}function fm(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=js(i,r,l),d=a(c);n.set(d,e[l]=Rs(d,c))}return{c(){t=V("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)),T(t,"opacity",i[5]?1:0)},m(l,c){z(l,t,c);for(let d=0;d<e.length;d+=1)e[d].m(t,null);o=Et(t,i[12].bind(t)),s=!0},p(l,c){c[0]&71&&(r=l[1],se(),e=qe(e,c,a,1,l,r,n,t,Ot,Rs,null,js),re()),c[0]&32&&T(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)S(e[c]);s=!1},d(l){l&&M(t);for(let c=0;c<e.length;c+=1)e[c].d();o()}}}let hm=11;function mm(i,t,e){const{Raycaster:n,Vector3:o}=x;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)===be.Five.Mode.Panorama,p,A,g=[],v=!0;const w=(R,O)=>{const W=R.camera.position.clone(),U=new o(O.modelPosition[0],O.modelPosition[1],O.modelPosition[2]),_=U.distanceTo(W);return d!==void 0&&R.state.mode===be.Five.Mode.Panorama&&_>d?!1:Bs(R,U.clone().sub(W).normalize(),W,_)},y=R=>{const{camera:O,model:W}=s,{x:U,y:_,z:J}=R.clone().project(O),de=(U+1)/2,ue=(2-(_+1))/2,Me=Math.abs(J)<1&&[de,ue].every(Re=>Re<1&&Re>=0);return Boolean(Me)},P=(R,O)=>{const W=new o(O.modelPosition[0],O.modelPosition[1],O.modelPosition[2]),U=R.project2d(W),_=U==null?void 0:U.x,J=U==null?void 0:U.y;return[_,J]},I=(R,O)=>{const W=O.map(_=>{if(R.state.panoIndex!==_.panoIndex)return he(G({},_),{visible:!1});const J=P(R,_);_.name.length*hm;const de=cm(_.modelPosition[1],c),ue=R.currentMode===be.Five.Mode.Panorama?y(new o(_.position[0],_.position[1],_.position[2])):!0,me=r?w(R,_):!1,Pe=ue&&!me;if(!Pe)return he(G({},_),{visible:Pe});g.push(J);const Me=dm(J);return he(G({},_),{visible:Pe,transform:Me,strokeLength:de})}),U=W.filter(({visible:_})=>_).map(_=>({itemLabelItem:_,distance:new o(_.modelPosition[0],_.modelPosition[1],_.modelPosition[2]).clone().distanceTo(R.camera.position)})).sort((_,J)=>_.distance-J.distance);return W.map(_=>{const J=U.findIndex(de=>de.itemLabelItem.id===_.id);return J!==void 0?he(G({},_),{zIndex:J*10}):_})},C=()=>{g=[],e(1,u=I(s,u))},L=()=>{e(5,v=!1),D()},D=Xa(()=>{e(5,v=!0),C()},300),B=()=>{s.once("renderFrame",C)},N=()=>{window.addEventListener("resize",B,!1)},F=()=>{f!==a&&(e(1,u=Vs(a)),f=a,C())},X=(R,O)=>{let W=[];for(let _=0;_<O.length;_++){const{position:J,panoIndex:de}=O[_],ue=R.distanceTo(J);(d===void 0||ue<=d||s.state.mode!==be.Five.Mode.Panorama)&&W.push({panoIndex:de,obVector:J,distance:ue})}W=W.sort((_,J)=>_.distance-J.distance);let U;for(let _=0;_<W.length;_++){const{obVector:J,distance:de,panoIndex:ue}=W[_];if(!Bs(s,R,J,de)){U=ue;break}}return typeof U=="number"?O[U]:void 0},j=R=>{if(s.state.mode===be.Five.Mode.Panorama)return;const O=s.work.observers,W=new o().fromArray(R.position),U=X(W,O);if(U&&(R.observerIndex=U.panoIndex),typeof R.observerIndex=="number"){const _=O[R.observerIndex],J=W.clone().sub(_.position).normalize(),de={longitude:Math.PI+Math.atan2(J.x,J.z),latitude:Math.acos(J.y/J.length())-Math.PI/2};s.setState(he(G({},de),{mode:be.Five.Mode.Panorama,panoIndex:R.observerIndex})),s.once("initAnimationEnded",()=>{e(1,u=u.map(ue=>he(G({},ue),{isFold:ue.id!==R.id}))),s.once("cameraUpdate",()=>{e(1,u=u.map(ue=>he(G({},ue),{isFold:!1})))})})}};qi(()=>{F()}),Ze(()=>{e(1,u=Vs(a)),f=a,C(),N(),s.on("cameraUpdate",L)}),It(()=>{s.off("cameraUpdate",L),window.removeEventListener("resize",B,!1)});function E(){p=this.clientWidth,A=this.clientHeight,e(3,p),e(4,A)}return i.$$set=R=>{"five"in R&&e(7,s=R.five),"modelOcclusionEnable"in R&&e(8,r=R.modelOcclusionEnable),"itemLabels"in R&&e(9,a=R.itemLabels),"hooks"in R&&e(0,l=R.hooks),"displayStrategyType"in R&&e(10,c=R.displayStrategyType),"maxVisibleDistance"in R&&e(11,d=R.maxVisibleDistance)},[l,u,h,p,A,v,j,s,r,a,c,d,E]}class pm extends oe{constructor(t){super(),ie(this,t,mm,fm,ne,{five:7,modelOcclusionEnable:8,itemLabels:9,hooks:0,displayStrategyType:10,maxVisibleDistance:11},um,[-1,-1])}}function gm(i){return i.item_labels.map(t=>he(G({},t),{modelPosition:[t.position[0],t.position[1],t.position[2]],observerIndex:void 0}))}const Am=void 0,vm=(i,t)=>{var u,h,p,A;const e={container:document.createElement("div"),data:null,enabled:!0,fiveModeEnabled:!0,itemLabels:[],wrapper:null,app:void 0,hooks:new be.Subscribe,modelOcclusionEnable:(u=t==null?void 0:t.modelOcclusionEnable)!=null?u:!0,onlyVisibleInPanorama:(h=t==null?void 0:t.onlyVisibleInPanorama)!=null?h:!0,displayStrategyType:(p=t==null?void 0:t.displayStrategyType)!=null?p:Mt.SMALL,maxVisibleDistance:(A=t==null?void 0:t.maxVisibleDistance)!=null?A:Am};e.container.setAttribute("class","item-label-plugin-container"),e.container.style.cssText=`
|
|
524
524
|
position: absolute;
|
|
525
525
|
left: 0;
|
|
526
526
|
top: 0;
|
|
@@ -541,7 +541,7 @@ void main() {
|
|
|
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&&T(t,"width",Ge(i[3])),a&16&&T(t,"height",Ge(i[4])),a&8192&&T(t,"z-index",i[13])},i(r){s||(r&&De(()=>{o&&o.end(1),n=Rt(t,Bt,{duration:i[0]}),n.start()}),s=!0)},o(r){n&&n.invalidate(),r&&(o=tn(t,Bt,{duration:i[1]})),s=!1},d(r){r&&M(t),r&&o&&o.end()}}}function Km(i){let t,e=i[2]&&_s(i);return{c(){e&&e.c(),t=fe()},m(n,o){e&&e.m(n,o),z(n,t,o)},p(n,[o]){n[2]?e?(e.p(n,o),o&4&&k(e,1)):(e=_s(n),e.c(),k(e,1),e.m(t.parentNode,t)):e&&(se(),S(e,1,1,()=>{e=null}),re())},i(n){k(e)},o(n){S(e)},d(n){e&&e.d(n),n&&M(t)}}}function Ge(i){return typeof i=="number"?i/16+"rem":i}function $m(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:p}=t,{opacity:A=.15}=t,{zIndex:g=-1}=t;return i.$$set=v=>{"inDelay"in v&&e(0,n=v.inDelay),"outDelay"in v&&e(1,o=v.outDelay),"visible"in v&&e(2,s=v.visible),"width"in v&&e(3,r=v.width),"height"in v&&e(4,a=v.height),"left"in v&&e(5,l=v.left),"bottom"in v&&e(6,c=v.bottom),"center"in v&&e(7,d=v.center),"horizontalCenter"in v&&e(8,f=v.horizontalCenter),"verticalCenter"in v&&e(9,u=v.verticalCenter),"blurRadius"in v&&e(10,h=v.blurRadius),"spreadRadius"in v&&e(11,p=v.spreadRadius),"opacity"in v&&e(12,A=v.opacity),"zIndex"in v&&e(13,g=v.zIndex)},[n,o,s,r,a,l,c,d,f,u,h,p,A,g]}class Ke extends oe{constructor(t){super(),ie(this,t,$m,Km,ne,{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},qm)}}function ep(i,t){t.forEach(e=>{const n=new x.SphereGeometry(.02,16,16),o=[],s=[new x.MeshBasicMaterial({color:16776960}),new x.MeshBasicMaterial({color:16711935}),new x.MeshBasicMaterial({color:16711680}),new x.MeshBasicMaterial({color:65535})];if(e.position.length===4)e.position.forEach((r,a)=>{const l=s[a],c=new x.Mesh(n,l);c.position.copy(nt(r)),o.push(c)});else{const r=s[0],a=new x.Mesh(n,r);a.position.copy(nt(e.position)),o.push(a)}o.forEach(r=>{r.material.depthTest=!1,i.scene.add(r)})})}const Te=i=>i;function $a(i){if(i.length<3)return;const t=i.map(hn),e=t[1].clone().sub(t[0]),n=t[2].clone().sub(t[1]);return e.cross(n)}function Mn(i){if(Array.isArray(i)&&i.length===4){const e=i.map(hn);return $r(e[0],e[2])}else return hn(i)}function rn(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 tp(i){return new Promise(t=>{i.model.loaded?t():i.once("modelLoaded",()=>t())})}function np(i,t,e){const o=new x.Plane().setFromNormalAndCoplanarPoint(e,t),s=t.clone().sub(i).cross(new x.Vector3(0,1,0)).setLength(.01),r=new x.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 x.Vector3))}const Xs=(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 ip(i,t=200){let e;return function(...n){e||(i.apply(this,n),e=setTimeout(function(){e=null},t))}}function op(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 Ys(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)}}}function sp(){return Math.random().toString(36).slice(-6)}const xi=sp();function rp(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 Us(i,t,e){const n=i.slice();return n[18]=t[e].id,n[0]=t[e].content,n[19]=t,n[20]=e,n}function ap(i){let t,e=i[0]+"",n,o=i[20];const s=()=>i[9](t,o),r=()=>i[9](null,o);return{c(){t=V("span"),n=Ee(e),b(t,"class","text-char svelte-1b2n9wi")},m(a,l){z(a,t,l),Q(t,n),s()},p(a,l){i=a,l&4&&e!==(e=i[0]+"")&&xe(n,e),o!==i[20]&&(r(),o=i[20],s())},d(a){a&&M(t),r()}}}function lp(i){let t,e=i[20];const n=()=>i[8](t,e),o=()=>i[8](null,e);return{c(){t=V("span"),t.textContent="\xA0",b(t,"class","text-char svelte-1b2n9wi")},m(s,r){z(s,t,r),n()},p(s,r){i=s,e!==i[20]&&(o(),e=i[20],n())},d(s){s&&M(t),o()}}}function Js(i,t){let e,n;function o(a,l){return a[0]===a[3]?lp:ap}let s=o(t),r=s(t);return{key:i,first:null,c(){e=fe(),r.c(),n=fe(),this.first=e},m(a,l){z(a,e,l),r.m(a,l),z(a,n,l)},p(a,l){t=a,s===(s=o(t))&&r?r.p(t,l):(r.d(1),r=s(t),r&&(r.c(),r.m(n.parentNode,n)))},d(a){a&&M(e),r.d(a),a&&M(n)}}}function cp(i){let t=[],e=new Map,n,o=i[2];const s=r=>r[18];for(let r=0;r<o.length;r+=1){let a=Us(i,o,r),l=s(a);e.set(l,t[r]=Js(l,a))}return{c(){for(let r=0;r<t.length;r+=1)t[r].c();n=fe()},m(r,a){for(let l=0;l<t.length;l+=1)t[l].m(r,a);z(r,n,a)},p(r,[a]){a&14&&(o=r[2],t=qe(t,a,s,1,r,o,e,n.parentNode,to,Js,n,Us))},i:Z,o:Z,d(r){for(let a=0;a<t.length;a+=1)t[a].d(r);r&&M(n)}}}function dp(i,t,e){let n,{inDelay:o=0}=t,{outDelay:s=0}=t,{content:r}=t,{unfolded:a}=t,{isFistUnfoldedUpdate:l=!0}=t;const c=`__EMOJI_SPLIT_${xi}__`,d=`__EMOJI_${xi}__`,f=`__SPACE_${xi}__`;let u,h,p=[];function A(I){const C=[],L=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"));return I.slice().replace(L,D=>`${c}${d}${D}${c}`).split(c).forEach(D=>D.startsWith(d)?C.push({id:He(),content:D.slice(d.length)}):C.push(...D.split("").map(B=>B===" "?f:B).map(B=>({id:He(),content:B})))),C}function g(){if(!h)return;const I=!a;h.reversed!==I&&h.reverse(),h.play()}function v(I){if(l){e(4,l=!1);return}clearTimeout(u),u=setTimeout(g,I?o:s)}function w(I){const C=function(){const L=op(D=>I[D].getBoundingClientRect().x,[Math.min(I.length-1,10),Math.min(I.length-1,30)]);if(L>0)return L}();h=Co.default({targets:I.slice(0,C).filter(We),autoplay:!1,duration:400,scale:[.7,1],rotate:[20,0],opacity:[0,1],translateX:[4,0],translateY:[10,0],delay:Co.default.stagger(50),easing:"easeInOutCubic"}),a&&h.seek(h.duration)}function y(I,C){Le[I?"unshift":"push"](()=>{p[C]=I,e(1,p)})}function P(I,C){Le[I?"unshift":"push"](()=>{p[C]=I,e(1,p)})}return i.$$set=I=>{"inDelay"in I&&e(5,o=I.inDelay),"outDelay"in I&&e(6,s=I.outDelay),"content"in I&&e(0,r=I.content),"unfolded"in I&&e(7,a=I.unfolded),"isFistUnfoldedUpdate"in I&&e(4,l=I.isFistUnfoldedUpdate)},i.$$.update=()=>{i.$$.dirty&1&&e(2,n=A(r)),i.$$.dirty&128&&v(a),i.$$.dirty&2&&w(p.filter(I=>!!I))},[r,p,n,f,l,o,s,a,y,P]}class el extends oe{constructor(t){super(),ie(this,t,dp,cp,ne,{inDelay:5,outDelay:6,content:0,unfolded:7,isFistUnfoldedUpdate:4},rp)}}const up="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAKqADAAQAAAABAAAAKgAAAADUGqULAAAB0ElEQVRYCe2WSUoEQRBFLVHEiVZU1I03cKW38SSewRt4A5fiTty5cQIFR9pZQWkcUNSe2/Z9yISiSGxRkUAy4BGZSVX168gistraYsQKxArECsQKxApYqkDyU5lmsznMM+ZgAGpQhaUkSRbINgLJCXiCBtSgAkVYtGGIBTKj8AgKSVahDNvQa0IUkUG4Bx91BpLdBTOS/cgUIB3a+gMwI9mFzE3a0I3z5B4r292JzGVA8tSSZILMcUDyzIykthOZvYDk+V9Ktmz4yGzhOhV4/+5YU4N/hzqo0StX3Fg5TcnNlYvgs8bPsM4hkScHoyO46haRnGEYktQVI+4ypUYKyXtxyUu27JCceAMJvjo0HoM5CEZ7cPX7i013q3IWVV5r2aw/2TK+svWbPGU68KQCa6pYeus1V0X99quSfvtVSc39lmfz2mdbz32tg1dAJ0421AVs9E7/FxBSezrMmjI/gm5/nYmMkBq+TqBs7LNgTlZH6EnWlPmORdk+pHQipUNfTxtg7p3NIXWRMvXfoqusmXsNhpC6crIS1Zf9C6yAOdlxpK5BW18CiT7A/G93gE+P0FY/RoO+RWqS62YhB2r4YhlixArECsQKxArECvzjCnwAOr0wF44ggHAAAAAASUVORK5CYII=",fp="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAWgAAACoCAMAAAD6pITnAAABQVBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACvr68AAAAAAAAAAAB5eXkAAAA8PDzr6+sLCwuenp4UFBT////8/PyLi4umpqZycnKxsbHMzMykpKTy8vKoqKhcXFwpKSmwsLD+/v7k5OSCgoLw8PDo6Oi0tLRkZGSrq6syMjL6+vrn5+eYmJj29vbd3d3Q0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8DQc/cITdx9+UAAAAASUVORK5CYII=",mp="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAMAAAANIilAAAABcVBMVEUAAAAAAAD////////+/v45OTn////////39/fp6enPz8/7+/vw8PD+/v7x8fHc3NzHx8f////////+/v77+/vr6+v////7+/v5+fn////z8/P////////q6uqgoKD+/v79/f3m5ub+/v7////////////////39/f39/f////z8/P////t7e3s7Oz29vb////5+fn////h4eH////g4ODV1dX////////BwcH///////////+Ojo5zc3MlJSX////////////////////////7+/v////////////v7+/u7u7n5+f////39/f////09PT6+vr09PT+/v76+vr////5+fnv7+/09PTk5OT////////////////Jycn///++vr7///////+0tLT///9TU1P///8SEhL////////+/v76+vr////8/Pz39/ft7e3t7e36+vr////////X19fV1dX///+xsbF9fX1iYmL///////+K8mOEAAAAenRSTlMaAIDy8CD41cWRX9uk7Kl1VVEw6dWT/M/NvKyVkY475eWIgx0Z39rHv7axnZyZmIuKhn56emZjX1FEPTU0Kx4PCAX69fTgxcKkopWL7crJuri2sa6rnIyHhX54bVtZVU9NSUcsJSIcFROno6Hcwp+ekHVxbWhnRC8nDLc9s8oAAAOGSURBVEjHpdd3X9pAGAfwkBBDAoQmBJmWvUWWiIDIHoJb66x7a4d78Op7pBQ1J5DY33987vnyXEIu3CGy/0hvnDthM+l0hj3JScSudDKOdhNPpl1i8Ut624Gi6+trI3zW1tcdqGM7/SIC5/ZRR2SNJEm7JkHt7FAJjR18WIs40P3cAFxIOaIRna6ZOHxGunk+TDR1ukjUkSr0w86bcKShiz1OI4JMP8YAD9+4emM2Gm407IfIhzm0NxrhKNsLH4SvQ+RktyvUfZIMXYcPPsSFCcvY6EYW6ZPsxuiYZaLwAW5bDY70Da5paxjvm8d+UcjAUL/GzPtCnDF/mwFWhJ75Zs68x05gxxFRGQfa+RYXokHVCC4O4yOqYLTwBjNB+ncWEZnsbzrIvOLz4CW9g4jODn0ZPO/iZN0UmhaPp0Omq+Q/nLu6NO0hErJnurjKdTBzEdAhkqILXDAdbFkJ7EnDe4EVy198srpiwhE4X1RKDFOqviBwcNPK6gmPmeWlGDz+VdHqRPEVHo0tLTM8RpcX4G+flLe6kU/Cs1pYRnm8uriQhfoC+0ZDvbMLi6ttfO5fDCDCKFrvooAKAov+c4BZvy8EzaolCHRdIZ+fBThl9G0Ih1RCrBJWbPiMKYAZ409oMSqFWAktzJ9GBuDvRoVGOIQJMSas0CiM39u45v0M9tbaeLc6F5M+7dhcbRfgg+pcU/oNa85VDwDOzBtmpP9UKsN8BuCzeb1P+kPi08+fASyr6fVPUh/PJ72+xj/bZk5PSV0YlJ4z83iC4EipS5LkiAkeHxGcQerLwMARRzyW+QklhUgKpST8nXfYg+fHkjS89MPz0MFnhKdCSWpc8RBnPAZB3RUvLt7i3oob7f5juDzuikY81tjcHlcHg9xabdyUWDvF2ay3slecr1ptimNx9lhhs1bzXQxy5NZa6VMx9pS2Wt1H77cVjFartYvBdlDICDc0cbVa3Twd2NcOyuLwVqo+K1ebjgdcr0k+O1uXwThfl8vlhqm+99kASup5GINsYhhmG8d7UXzcBgo2e21cd9WlUll5/7G958ql8uxu7y0zS5SGSkOGBA51TRiGQAi232Y9v4kVQZGavpt6c6l3tLpNsc38gGOC01IeLg4Xi8NaLz1KkqO0VzvcTrFscYo4oLjiRAsKEXeJPRqxW0bsFWLGLVbiocyZSm5vbW0nU9BsIfyp/AGqAvfOkBaFawAAAABJRU5ErkJggg==";function pp(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 Zs(i){let t,e,n,o,s,r,a,l,c,d;return e=new Ke({props:{center:!0,blurRadius:9,spreadRadius:3}}),{c(){t=V("div"),$(e.$$.fragment),n=ee(),o=V("div"),b(o,"class",s="arrow "+i[0]+" svelte-1ogmlqq"),T(o,"background-image","url("+up+")"),b(t,"class","arrow-wrapper svelte-1ogmlqq")},m(f,u){z(f,t,u),q(e,t,null),Q(t,n),Q(t,o),l=!0,c||(d=Se(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=Rt(o,Bt,{duration:i[2],delay:i[3],easing:qt}),r.start()}),l=!0)},o(f){S(e.$$.fragment,f),r&&r.invalidate(),f&&(a=tn(o,Bt,{duration:i[2],delay:i[4],easing:qt})),l=!1},d(f){f&&M(t),K(e),f&&a&&a.end(),c=!1,d()}}}function gp(i){let t,e,n=i[1]&&Zs(i);return{c(){n&&n.c(),t=fe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[1]?n?(n.p(o,s),s&2&&k(n,1)):(n=Zs(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(se(),S(n,1,1,()=>{n=null}),re())},i(o){e||(k(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function Ap(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){$i.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 vp extends oe{constructor(t){super(),ie(this,t,Ap,gp,ne,{direction:0,visible:1,duration:2,inDelay:3,outDelay:4},pp)}}function bp(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 yp(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 qs(i){let t,e,n;return e=new el({props:{unfolded:i[0],content:i[1],inDelay:500,outDelay:i[5]}}),{c(){t=V("div"),$(e.$$.fragment),b(t,"class","text svelte-1fuzm7v"),T(t,"transform",i[7])},m(o,s){z(o,t,s),q(e,t,null),i[10](t),n=!0},p(o,s){const r={};s&1&&(r.unfolded=o[0]),s&2&&(r.content=o[1]),s&32&&(r.outDelay=o[5]),e.$set(r),s&128&&T(t,"transform",o[7])},i(o){n||(k(e.$$.fragment,o),n=!0)},o(o){S(e.$$.fragment,o),n=!1},d(o){o&&M(t),K(e),i[10](null)}}}function Ks(i){let t,e,n;return e=new vp({props:{direction:i[6],visible:i[0],inDelay:600,duration:1e3}}),{c(){t=V("div"),$(e.$$.fragment),b(t,"class","arrow svelte-1fuzm7v")},m(o,s){z(o,t,s),q(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){S(e.$$.fragment,o),n=!1},d(o){o&&M(t),K(e)}}}function wp(i){let t,e,n,o=i[1]&&qs(i),s=i[3]<i[4]&&Ks(i);return{c(){o&&o.c(),t=ee(),s&&s.c(),e=fe()},m(r,a){o&&o.m(r,a),z(r,t,a),s&&s.m(r,a),z(r,e,a),n=!0},p(r,[a]){r[1]?o?(o.p(r,a),a&2&&k(o,1)):(o=qs(r),o.c(),k(o,1),o.m(t.parentNode,t)):o&&(se(),S(o,1,1,()=>{o=null}),re()),r[3]<r[4]?s?(s.p(r,a),a&24&&k(s,1)):(s=Ks(r),s.c(),k(s,1),s.m(e.parentNode,e)):s&&(se(),S(s,1,1,()=>{s=null}),re())},i(r){n||(k(o),k(s),n=!0)},o(r){S(o),S(s),n=!1},d(r){o&&o.d(r),r&&M(t),s&&s.d(r),r&&M(e)}}}function Cp(i,t,e){let n,o,s,{visible:r=!1}=t,{textUnfolded:a=!1}=t,{content:l}=t,c,d=0,f=0,u=0;function h(p){Le[p?"unshift":"push"](()=>{c=p,e(2,c)})}return i.$$set=p=>{"visible"in p&&e(0,r=p.visible),"textUnfolded"in p&&e(8,a=p.textUnfolded),"content"in p&&e(1,l=p.content)},i.$$.update=()=>{if(i.$$.dirty&7&&c&&r&&l){const{lineHeight:p}=getComputedStyle(c);e(4,u=c.offsetHeight),bp(()=>c==null?void 0:c.offsetHeight,Boolean).then(()=>{e(4,u=c.offsetHeight)}),e(3,f=Number(p.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 tl extends oe{constructor(t){super(),ie(this,t,Cp,wp,ne,{visible:0,textUnfolded:8,content:1},yp)}}function Ep(i){le(i,"svelte-nlvd3x",".content.svelte-nlvd3x{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 $s(i){var f,u;let t,e,n,o,s,r,a,l,c,d;return t=new Ke({props:{visible:i[2],left:i[3]/2+"px",bottom:12,width:2,blurRadius:120,spreadRadius:60}}),n=new fo({props:{unfolded:i[2],length:i[3],outDelay:i[4]+40*Math.min((u=(f=i[6][0])==null?void 0:f.content.length)!=null?u:10,15),useLinearColor:!0}}),r=new tl({props:{visible:i[2],textUnfolded:i[1],content:i[5]}}),{c(){$(t.$$.fragment),e=ee(),$(n.$$.fragment),o=ee(),s=V("div"),$(r.$$.fragment),b(s,"class","content svelte-nlvd3x"),De(()=>i[8].call(s))},m(h,p){q(t,h,p),z(h,e,p),q(n,h,p),z(h,o,p),z(h,s,p),q(r,s,null),a=Et(s,i[8].bind(s)),l=!0,c||(d=Se(s,"click",i[7]),c=!0)},p(h,p){var w,y;const A={};p&4&&(A.visible=h[2]),p&8&&(A.left=h[3]/2+"px"),t.$set(A);const g={};p&4&&(g.unfolded=h[2]),p&8&&(g.length=h[3]),p&16&&(g.outDelay=h[4]+40*Math.min((y=(w=h[6][0])==null?void 0:w.content.length)!=null?y:10,15)),n.$set(g);const v={};p&4&&(v.visible=h[2]),p&2&&(v.textUnfolded=h[1]),p&32&&(v.content=h[5]),r.$set(v)},i(h){l||(k(t.$$.fragment,h),k(n.$$.fragment,h),k(r.$$.fragment,h),l=!0)},o(h){S(t.$$.fragment,h),S(n.$$.fragment,h),S(r.$$.fragment,h),l=!1},d(h){K(t,h),h&&M(e),K(n,h),h&&M(o),h&&M(s),K(r),a(),c=!1,d()}}}function Pp(i){let t,e,n=i[0].state&&$s(i);return{c(){n&&n.c(),t=fe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&k(n,1)):(n=$s(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(se(),S(n,1,1,()=>{n=null}),re())},i(o){e||(k(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function Ip(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,h,p;i.$$.dirty&1&&e(2,n=!!((u=r.state)!=null&&u.unfolded)),i.$$.dirty&1&&e(5,o=(p=(h=r.data.title)!=null?h:r.data.text)!=null?p:""),i.$$.dirty&4&&(n||setTimeout(()=>{e(1,l=!1)},20)),i.$$.dirty&2&&e(4,s=l?450:0)},[r,l,n,a,s,o,c,d,f]}class kp extends oe{constructor(t){super(),ie(this,t,Ip,Pp,ne,{tag:0},Ep)}}function ye(i){return i/16+"rem"}function xp(i){le(i,"svelte-ilb1qs",".text.svelte-ilb1qs{display:-webkit-box;display:-ms-box;display:-moz-box;position:relative;width:-moz-max-content;width:max-content;max-width:100%;word-break:break-all;-webkit-box-orient:vertical;-ms-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}@keyframes svelte-ilb1qs-blink{0%{opacity:1}50%{opacity:0}100%{opacity:1}}.caret.svelte-ilb1qs{position:absolute;width:0.0625rem;height:100%;background-color:#fff;animation:svelte-ilb1qs-blink 1.2s infinite}.placeholder.svelte-ilb1qs{opacity:0.5}")}function Dp(i){let t;const e=i[6].default,n=it(e,i,i[5],null);return{c(){n&&n.c()},m(o,s){n&&n.m(o,s),t=!0},p(o,s){n&&n.p&&(!t||s&32)&&st(n,e,o,o[5],t?ot(e,o[5],s,null):rt(o[5]),null)},i(o){t||(k(n,o),t=!0)},o(o){S(n,o),t=!1},d(o){n&&n.d(o)}}}function Lp(i){var s,r;let t,e,n=((s=i[3])==null?void 0:s.inputting)&&er(),o=((r=i[3])==null?void 0:r.placeholder)&&tr(i);return{c(){n&&n.c(),t=ee(),o&&o.c(),e=fe()},m(a,l){n&&n.m(a,l),z(a,t,l),o&&o.m(a,l),z(a,e,l)},p(a,l){var c,d;(c=a[3])!=null&&c.inputting?n||(n=er(),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null),(d=a[3])!=null&&d.placeholder?o?o.p(a,l):(o=tr(a),o.c(),o.m(e.parentNode,e)):o&&(o.d(1),o=null)},i:Z,o:Z,d(a){n&&n.d(a),a&&M(t),o&&o.d(a),a&&M(e)}}}function Sp(i){let t;return{c(){t=Ee(i[2])},m(e,n){z(e,t,n)},p(e,n){n&4&&xe(t,e[2])},i:Z,o:Z,d(e){e&&M(t)}}}function er(i){let t;return{c(){t=V("div"),b(t,"class","caret svelte-ilb1qs")},m(e,n){z(e,t,n)},d(e){e&&M(t)}}}function tr(i){let t,e=i[3].placeholder+"",n;return{c(){t=V("span"),n=Ee(e),b(t,"class","placeholder svelte-ilb1qs")},m(o,s){z(o,t,s),Q(t,n)},p(o,s){s&8&&e!==(e=o[3].placeholder+"")&&xe(n,e)},d(o){o&&M(t)}}}function Tp(i){let t,e,n,o;const s=[Sp,Lp,Dp],r=[];function a(l,c){return l[2]?0:l[4]?1:2}return e=a(i),n=r[e]=s[e](i),{c(){t=V("div"),n.c(),b(t,"class","text svelte-ilb1qs"),T(t,"max-width",typeof i[1]=="number"?ye(i[1]):i[1]),T(t,"-webkit-line-clamp",i[0])},m(l,c){z(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):(se(),S(r[d],1,1,()=>{r[d]=null}),re(),n=r[e],n?n.p(l,c):(n=r[e]=s[e](l),n.c()),k(n,1),n.m(t,null)),c&2&&T(t,"max-width",typeof l[1]=="number"?ye(l[1]):l[1]),c&1&&T(t,"-webkit-line-clamp",l[0])},i(l){o||(k(n),o=!0)},o(l){S(n),o=!1},d(l){l&&M(t),r[e].d()}}}function Mp(i,t,e){let n,{$$slots:o={},$$scope:s}=t,{maxLine:r=1}=t,{maxWidth:a=null}=t,{text:l=null}=t,{edit:c=null}=t;return i.$$set=d=>{"maxLine"in d&&e(0,r=d.maxLine),"maxWidth"in d&&e(1,a=d.maxWidth),"text"in d&&e(2,l=d.text),"edit"in d&&e(3,c=d.edit),"$$scope"in d&&e(5,s=d.$$scope)},i.$$.update=()=>{i.$$.dirty&8&&e(4,n=(c==null?void 0:c.placeholder)||(c==null?void 0:c.inputting))},[r,a,l,c,n,s,o]}class ho extends oe{constructor(t){super(),ie(this,t,Mp,Tp,ne,{maxLine:0,maxWidth:1,text:2,edit:3},xp)}}function zp(i){le(i,"svelte-1oxrkr1",".plane__container.svelte-1oxrkr1.svelte-1oxrkr1{position:absolute;left:50%;transform:translate(-50%, -100%);width:-moz-max-content;width:max-content}.plane__wrapper.svelte-1oxrkr1.svelte-1oxrkr1{transition:transform 500ms linear, opacity 200ms linear;padding:0.625rem;background-color:rgba(0, 0, 0, 0.5);border:0.03125rem solid rgba(255, 255, 255, 0.3);border-radius:0.25rem}.unfolded.svelte-1oxrkr1 .plane__wrapper.svelte-1oxrkr1{transition-delay:200ms, 500ms;opacity:1}.folded.svelte-1oxrkr1 .plane__wrapper.svelte-1oxrkr1{opacity:0}.plane.svelte-1oxrkr1.svelte-1oxrkr1{max-width:11.75rem}.title.svelte-1oxrkr1.svelte-1oxrkr1{white-space:pre-wrap;font-weight:bold;font-size:0.75rem;line-height:1.125rem}.description.svelte-1oxrkr1.svelte-1oxrkr1{margin-top:0.25rem;white-space:pre-wrap;font-size:0.6875rem;line-height:1rem}")}function nr(i){var f,u;let t,e,n,o,s,r,a,l,c;t=new fo({props:{unfolded:i[1],direction:"vertical",length:15,duration:500,inDelay:200,useLinearColor:!0}}),a=new ho({props:{text:i[2],edit:(f=i[0].data.edit)==null?void 0:f.title}});let d=(i[0].data.description||((u=i[0].data.edit)==null?void 0:u.description))&&ir(i);return{c(){$(t.$$.fragment),e=ee(),n=V("div"),o=V("div"),s=V("div"),r=V("div"),$(a.$$.fragment),l=ee(),d&&d.c(),b(r,"class","title svelte-1oxrkr1"),b(s,"class","plane svelte-1oxrkr1"),b(o,"class","plane__wrapper svelte-1oxrkr1"),T(o,"transform",i[1]?"translateY(-15px)":"translateY(0)"),b(n,"class","plane__container svelte-1oxrkr1"),te(n,"unfolded",i[1]),te(n,"folded",i[3])},m(h,p){q(t,h,p),z(h,e,p),z(h,n,p),Q(n,o),Q(o,s),Q(s,r),q(a,r,null),Q(s,l),d&&d.m(s,null),c=!0},p(h,p){var v,w;const A={};p&2&&(A.unfolded=h[1]),t.$set(A);const g={};p&4&&(g.text=h[2]),p&1&&(g.edit=(v=h[0].data.edit)==null?void 0:v.title),a.$set(g),h[0].data.description||((w=h[0].data.edit)==null?void 0:w.description)?d?(d.p(h,p),p&1&&k(d,1)):(d=ir(h),d.c(),k(d,1),d.m(s,null)):d&&(se(),S(d,1,1,()=>{d=null}),re()),p&2&&T(o,"transform",h[1]?"translateY(-15px)":"translateY(0)"),(!c||p&2)&&te(n,"unfolded",h[1]),(!c||p&8)&&te(n,"folded",h[3])},i(h){c||(k(t.$$.fragment,h),k(a.$$.fragment,h),k(d),c=!0)},o(h){S(t.$$.fragment,h),S(a.$$.fragment,h),S(d),c=!1},d(h){K(t,h),h&&M(e),h&&M(n),K(a),d&&d.d()}}}function ir(i){var o;let t,e,n;return e=new ho({props:{text:i[0].data.description,edit:(o=i[0].data.edit)==null?void 0:o.description,maxLine:3}}),{c(){t=V("div"),$(e.$$.fragment),b(t,"class","description svelte-1oxrkr1")},m(s,r){z(s,t,r),q(e,t,null),n=!0},p(s,r){var l;const a={};r&1&&(a.text=s[0].data.description),r&1&&(a.edit=(l=s[0].data.edit)==null?void 0:l.description),e.$set(a)},i(s){n||(k(e.$$.fragment,s),n=!0)},o(s){S(e.$$.fragment,s),n=!1},d(s){s&&M(t),K(e)}}}function Bp(i){let t,e,n=i[0].state&&nr(i);return{c(){n&&n.c(),t=fe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&k(n,1)):(n=nr(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(se(),S(n,1,1,()=>{n=null}),re())},i(o){e||(k(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function Vp(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,c;i.$$.dirty&1&&e(1,n=!!((a=r.state)!=null&&a.unfolded)),i.$$.dirty&2&&e(3,o=!n),i.$$.dirty&1&&e(2,s=(c=(l=r.data.title)!=null?l:r.data.text)!=null?c:"")},[r,n,s,o]}class jp extends oe{constructor(t){super(),ie(this,t,Vp,Bp,ne,{tag:0},zp)}}function Qp(i){let t,e;return t=new jp({props:{tag:i[0]}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.tag=n[0]),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function Rp(i){let t,e;return t=new kp({props:{tag:i[0]}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.tag=n[0]),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function Op(i){let t,e,n,o;const s=[Rp,Qp],r=[];function a(l,c){return l[1]==="line"?0:l[1]==="plane"?1:-1}return~(t=a(i))&&(e=r[t]=s[t](i)),{c(){e&&e.c(),n=fe()},m(l,c){~t&&r[t].m(l,c),z(l,n,c),o=!0},p(l,[c]){let d=t;t=a(l),t===d?~t&&r[t].p(l,c):(e&&(se(),S(r[d],1,1,()=>{r[d]=null}),re()),~t?(e=r[t],e?e.p(l,c):(e=r[t]=s[t](l),e.c()),k(e,1),e.m(n.parentNode,n)):e=null)},i(l){o||(k(e),o=!0)},o(l){S(e),o=!1},d(l){~t&&r[t].d(l),l&&M(n)}}}function Hp(i,t,e){let n,{tag:o}=t;return i.$$set=s=>{"tag"in s&&e(0,o=s.tag)},i.$$.update=()=>{var s;i.$$.dirty&1&&e(1,n=(s=o.data.appearance)!=null?s:"line")},[o,n]}class Fp extends oe{constructor(t){super(),ie(this,t,Hp,Op,ne,{tag:0})}}function Gp(i){le(i,"svelte-blgtit",".line.svelte-blgtit{width:100%;height:100%;overflow:visible;pointer-events:none}")}function or(i){let t,e,n,o;return{c(){t=Ae("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){z(s,t,r),o=!0},p(s,r){i=s},i(s){o||(s&&De(()=>{n&&n.end(1),e=Rt(t,Kn,{duration:i[1],delay:i[0],easing:wa}),e.start()}),o=!0)},o(s){e&&e.invalidate(),s&&(n=tn(t,Kn,{duration:i[1],delay:i[2],easing:qt})),o=!1},d(s){s&&M(t),s&&n&&n.end()}}}function Np(i){let t,e,n,o,s,r=i[3]&&or(i);return{c(){t=Ae("svg"),e=Ae("defs"),n=Ae("linearGradient"),o=Ae("stop"),s=Ae("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-blgtit"),b(t,"viewBox","0 0 105 21")},m(a,l){z(a,t,l),Q(t,e),Q(e,n),Q(n,o),Q(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&&(se(),S(r,1,1,()=>{r=null}),re())},i(a){k(r)},o(a){S(r)},d(a){a&&M(t),r&&r.d()}}}function Wp(i,t,e){let{inDelay:n=0}=t,{duration:o=1e3}=t,{outDelay:s=0}=t,{unfolded:r}=t;const a=He();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 _p extends oe{constructor(t){super(),ie(this,t,Wp,Np,ne,{inDelay:0,duration:1,outDelay:2,unfolded:3},Gp)}}function Vt(i){return typeof i=="object"&&i!==null&&i.constructor&&Object.prototype.toString.call(i).slice(8,-1)==="Object"}function pt(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]:Vt(t[n])&&Vt(i[n])&&Object.keys(t[n]).length>0?t[n].__swiper__?i[n]=t[n]:pt(i[n],t[n]):i[n]=t[n]})}function Ni(i={}){return i.navigation&&typeof i.navigation.nextEl=="undefined"&&typeof i.navigation.prevEl=="undefined"}function Wi(i={}){return i.pagination&&typeof i.pagination.el=="undefined"}function _i(i={}){return i.scrollbar&&typeof i.scrollbar.el=="undefined"}function ei(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 nl=["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 Xp(i={},t=!0){const e={on:{}},n={},o={};pt(e,Bi.default.defaults),pt(e,Bi.default.extendedDefaults),e._emitClasses=!0,e.init=!1;const s={},r=nl.map(l=>l.replace(/_/,"")),a=Object.assign({},i);return Object.keys(a).forEach(l=>{typeof i[l]!="undefined"&&(r.indexOf(l)>=0?Vt(i[l])?(e[l]={},o[l]={},pt(e[l],i[l]),pt(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 Yp({el:i,nextEl:t,prevEl:e,paginationEl:n,scrollbarEl:o,swiper:s},r){Ni(r)&&t&&e&&(s.params.navigation.nextEl=t,s.originalParams.navigation.nextEl=t,s.params.navigation.prevEl=e,s.originalParams.navigation.prevEl=e),Wi(r)&&n&&(s.params.pagination.el=n,s.originalParams.pagination.el=n),_i(r)&&o&&(s.params.scrollbar.el=o,s.originalParams.scrollbar.el=o),s.init(i)}function Up(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 nl.filter(l=>l[0]==="_").map(l=>l.replace(/_/,"")).forEach(l=>{if(l in i&&l in t)if(Vt(i[l])&&Vt(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 Jp({swiper:i,slides:t,passedParams:e,changedParams:n,nextEl:o,prevEl:s,scrollbarEl:r,paginationEl:a}){const l=n.filter(I=>I!=="children"&&I!=="direction"),{params:c,pagination:d,navigation:f,scrollbar:u,virtual:h,thumbs:p}=i;let A,g,v,w,y;n.includes("thumbs")&&e.thumbs&&e.thumbs.swiper&&c.thumbs&&!c.thumbs.swiper&&(A=!0),n.includes("controller")&&e.controller&&e.controller.control&&c.controller&&!c.controller.control&&(g=!0),n.includes("pagination")&&e.pagination&&(e.pagination.el||a)&&(c.pagination||c.pagination===!1)&&d&&!d.el&&(v=!0),n.includes("scrollbar")&&e.scrollbar&&(e.scrollbar.el||r)&&(c.scrollbar||c.scrollbar===!1)&&u&&!u.el&&(w=!0),n.includes("navigation")&&e.navigation&&(e.navigation.prevEl||s)&&(e.navigation.nextEl||o)&&(c.navigation||c.navigation===!1)&&f&&!f.prevEl&&!f.nextEl&&(y=!0);const P=I=>{!i[I]||(i[I].destroy(),I==="navigation"?(c[I].prevEl=void 0,c[I].nextEl=void 0,i[I].prevEl=void 0,i[I].nextEl=void 0):(c[I].el=void 0,i[I].el=void 0))};l.forEach(I=>{if(Vt(c[I])&&Vt(e[I]))pt(c[I],e[I]);else{const C=e[I];(C===!0||C===!1)&&(I==="navigation"||I==="pagination"||I==="scrollbar")?C===!1&&P(I):c[I]=e[I]}}),l.includes("controller")&&!g&&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(),A&&p.init()&&p.update(!0),g&&(i.controller.control=c.controller.control),v&&(a&&(c.pagination.el=a),d.init(),d.render(),d.update()),w&&(r&&(c.scrollbar.el=r),u.init(),u.updateSize(),u.setTranslate()),y&&(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 Zp=i=>({virtualData:i&512}),sr=i=>({virtualData:i[9]}),qp=i=>({virtualData:i&512}),rr=i=>({virtualData:i[9]}),Kp=i=>({virtualData:i&512}),ar=i=>({virtualData:i[9]}),$p=i=>({virtualData:i&512}),lr=i=>({virtualData:i[9]}),eg=i=>({virtualData:i&512}),cr=i=>({virtualData:i[9]});function dr(i){let t,e,n;return{c(){t=V("div"),e=ee(),n=V("div"),b(t,"class","swiper-button-prev"),b(n,"class","swiper-button-next")},m(o,s){z(o,t,s),i[13](t),z(o,e,s),z(o,n,s),i[14](n)},p:Z,d(o){o&&M(t),i[13](null),o&&M(e),o&&M(n),i[14](null)}}}function ur(i){let t;return{c(){t=V("div"),b(t,"class","swiper-scrollbar")},m(e,n){z(e,t,n),i[15](t)},p:Z,d(e){e&&M(t),i[15](null)}}}function fr(i){let t;return{c(){t=V("div"),b(t,"class","swiper-pagination")},m(e,n){z(e,t,n),i[16](t)},p:Z,d(e){e&&M(t),i[16](null)}}}function tg(i){let t,e,n,o,s,r,a=Ni(i[2]),l,c=_i(i[2]),d,f=Wi(i[2]),u,h,p;const A=i[12]["container-start"],g=it(A,i,i[11],cr),v=i[12]["wrapper-start"],w=it(v,i,i[11],lr),y=i[12].default,P=it(y,i,i[11],ar),I=i[12]["wrapper-end"],C=it(I,i,i[11],rr);let L=a&&dr(i),D=c&&ur(i),B=f&&fr(i);const N=i[12]["container-end"],F=it(N,i,i[11],sr);let X=[{class:h=ei(`${i[1]}${i[0]?` ${i[0]}`:""}`)},i[3]],j={};for(let E=0;E<X.length;E+=1)j=we(j,X[E]);return{c(){t=V("div"),g&&g.c(),e=ee(),n=V("div"),w&&w.c(),o=ee(),P&&P.c(),s=ee(),C&&C.c(),r=ee(),L&&L.c(),l=ee(),D&&D.c(),d=ee(),B&&B.c(),u=ee(),F&&F.c(),b(n,"class","swiper-wrapper"),Wn(t,j)},m(E,R){z(E,t,R),g&&g.m(t,null),Q(t,e),Q(t,n),w&&w.m(n,null),Q(n,o),P&&P.m(n,null),Q(n,s),C&&C.m(n,null),Q(t,r),L&&L.m(t,null),Q(t,l),D&&D.m(t,null),Q(t,d),B&&B.m(t,null),Q(t,u),F&&F.m(t,null),i[17](t),p=!0},p(E,[R]){g&&g.p&&(!p||R&2560)&&st(g,A,E,E[11],p?ot(A,E[11],R,eg):rt(E[11]),cr),w&&w.p&&(!p||R&2560)&&st(w,v,E,E[11],p?ot(v,E[11],R,$p):rt(E[11]),lr),P&&P.p&&(!p||R&2560)&&st(P,y,E,E[11],p?ot(y,E[11],R,Kp):rt(E[11]),ar),C&&C.p&&(!p||R&2560)&&st(C,I,E,E[11],p?ot(I,E[11],R,qp):rt(E[11]),rr),R&4&&(a=Ni(E[2])),a?L?L.p(E,R):(L=dr(E),L.c(),L.m(t,l)):L&&(L.d(1),L=null),R&4&&(c=_i(E[2])),c?D?D.p(E,R):(D=ur(E),D.c(),D.m(t,d)):D&&(D.d(1),D=null),R&4&&(f=Wi(E[2])),f?B?B.p(E,R):(B=fr(E),B.c(),B.m(t,u)):B&&(B.d(1),B=null),F&&F.p&&(!p||R&2560)&&st(F,N,E,E[11],p?ot(N,E[11],R,Zp):rt(E[11]),sr),Wn(t,j=Be(X,[(!p||R&3&&h!==(h=ei(`${E[1]}${E[0]?` ${E[0]}`:""}`)))&&{class:h},R&8&&E[3]]))},i(E){p||(k(g,E),k(w,E),k(P,E),k(C,E),k(F,E),p=!0)},o(E){S(g,E),S(w,E),S(P,E),S(C,E),S(F,E),p=!1},d(E){E&&M(t),g&&g.d(E),w&&w.d(E),P&&P.d(E),C&&C.d(E),L&&L.d(),D&&D.d(),B&&B.d(),F&&F.d(E),i[17](null)}}}function ng(i,t,e){const n=["class","swiper"];let o=Nn(t,n),{$$slots:s={},$$scope:r}=t;const a=oi();let{class:l=void 0}=t,c="swiper",d=!1,f=null,u=null,h,p,A,g,v=null,w=null,y=null,P=null,I=null,C={slides:[]};function L(){return f}const D=O=>{e(9,C=O),bc().then(()=>{f.$wrapperEl.children(".swiper-slide").each(W=>{W.onSwiper&&W.onSwiper(f)}),f.updateSlides(),f.updateProgress(),f.updateSlidesClasses(),f.lazy&&f.params.lazy.enabled&&f.lazy.load()})},B=()=>{h=Xp(o),e(2,p=h.params),A=h.passedParams,e(3,g=h.rest)};B(),u=A;const N=()=>{d=!0};if(p.onAny=(O,...W)=>{a(O,W)},Object.assign(p.on,{_beforeBreakpoint:N,_containerClasses(O,W){e(1,c=W)}}),f=new Bi.default(p),Un("swiper",f),f.virtual&&f.params.virtual.enabled){const O={cache:!1,renderExternal:W=>{D(W),p.virtual&&p.virtual.renderExternal&&p.virtual.renderExternal(W)},renderExternalUpdate:!1};pt(f.params.virtual,O),pt(f.originalParams.virtual,O)}Ze(()=>{!v||(Yp({el:v,nextEl:y,prevEl:w,paginationEl:I,scrollbarEl:P,swiper:f},p),a("swiper",[f]),!p.virtual&&f.slides.each(O=>{O.onSwiper&&O.onSwiper(f)}))}),Ki(()=>{if(!f)return;B();const O=Up(A,u);(O.length||d)&&f&&!f.destroyed&&Jp({swiper:f,passedParams:A,changedParams:O,nextEl:y,prevEl:w,scrollbarEl:P,paginationEl:I}),d=!1,u=A}),It(()=>{typeof window!="undefined"&&f&&!f.destroyed&&f.destroy(!0,!1)});function F(O){Le[O?"unshift":"push"](()=>{w=O,e(5,w)})}function X(O){Le[O?"unshift":"push"](()=>{y=O,e(6,y)})}function j(O){Le[O?"unshift":"push"](()=>{P=O,e(7,P)})}function E(O){Le[O?"unshift":"push"](()=>{I=O,e(8,I)})}function R(O){Le[O?"unshift":"push"](()=>{v=O,e(4,v)})}return i.$$set=O=>{t=we(we({},t),aa(O)),e(27,o=Nn(t,n)),"class"in O&&e(0,l=O.class),"$$scope"in O&&e(11,r=O.$$scope)},[l,c,p,g,v,w,y,P,I,C,L,r,s,F,X,j,E,R]}class ig extends oe{constructor(t){super(),ie(this,t,ng,tg,ne,{class:0,swiper:10})}get swiper(){return this.$$.ctx[10]}}const og=i=>({data:i&32}),hr=i=>({data:i[5]}),sg=i=>({data:i&32}),mr=i=>({data:i[5]});function rg(i){let t;const e=i[8].default,n=it(e,i,i[7],hr);return{c(){n&&n.c()},m(o,s){n&&n.m(o,s),t=!0},p(o,s){n&&n.p&&(!t||s&160)&&st(n,e,o,o[7],t?ot(e,o[7],s,og):rt(o[7]),hr)},i(o){t||(k(n,o),t=!0)},o(o){S(n,o),t=!1},d(o){n&&n.d(o)}}}function ag(i){let t,e,n;const o=i[8].default,s=it(o,i,i[7],mr);return{c(){t=V("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){z(r,t,a),s&&s.m(t,null),n=!0},p(r,a){s&&s.p&&(!n||a&160)&&st(s,o,r,r[7],n?ot(o,r[7],a,sg):rt(r[7]),mr),(!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){S(s,r),n=!1},d(r){r&&M(t),s&&s.d(r)}}}function lg(i){let t,e,n,o,s;const r=[ag,rg],a=[];function l(f,u){return f[0]?0:1}e=l(i),n=a[e]=r[e](i);let c=[{class:o=ei(`${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=we(d,c[f]);return{c(){t=V("div"),n.c(),Wn(t,d)},m(f,u){z(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):(se(),S(a[h],1,1,()=>{a[h]=null}),re(),n=a[e],n?n.p(f,u):(n=a[e]=r[e](f),n.c()),k(n,1),n.m(t,null)),Wn(t,d=Be(c,[(!s||u&12&&o!==(o=ei(`${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){S(n),s=!1},d(f){f&&M(t),a[e].d(),i[9](null)}}}function cg(i,t,e){let n;const o=["zoom","virtualIndex","class"];let s=Nn(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=ct("swiper"),p=!1;const A=(y,P,I)=>{P===f&&e(3,u=I)},g=()=>{!h||p||(h.on("_slideClass",A),p=!0)},v=()=>{!h||(h.off("_slideClass",A),p=!1)};Ze(()=>{typeof c!="undefined"&&(e(4,f.onSwiper=y=>{h=y,g()},f),g())}),Ki(()=>{if(!(!f||!h)){if(h.destroyed){u!=="swiper-slide"&&e(3,u="swiper-slide");return}g()}}),qi(()=>{g()}),It(()=>{!h||v()});function w(y){Le[y?"unshift":"push"](()=>{f=y,e(4,f)})}return i.$$set=y=>{t=we(we({},t),aa(y)),e(6,s=Nn(t,o)),"zoom"in y&&e(0,l=y.zoom),"virtualIndex"in y&&e(1,c=y.virtualIndex),"class"in y&&e(2,d=y.class),"$$scope"in y&&e(7,a=y.$$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,w]}class dg extends oe{constructor(t){super(),ie(this,t,cg,lg,ne,{zoom:0,virtualIndex:1,class:2})}}function ug(i){le(i,"svelte-q6hk4f",".media-item.svelte-q6hk4f.svelte-q6hk4f{height:100%}.media-content.svelte-q6hk4f.svelte-q6hk4f{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-q6hk4f.svelte-q6hk4f{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-q6hk4f.svelte-q6hk4f{display:none;pointer-events:auto;position:absolute;width:100%;height:100%;top:0;left:0;transform:translate3d(0, 0, 0)}.video-play-button-container.showPlayButton.svelte-q6hk4f.svelte-q6hk4f{display:block}.video-icon.large.svelte-q6hk4f.svelte-q6hk4f{width:12.5rem;height:6.25rem}.video-icon.small.svelte-q6hk4f.svelte-q6hk4f{width:1.75rem;height:1.75rem}.video-icon.svelte-q6hk4f .video-icon-img.svelte-q6hk4f{width:100%;height:100%;background-position:center center;background-size:contain;background-repeat:no-repeat}.video-icon.svelte-q6hk4f .video-icon-img.canPlay.svelte-q6hk4f{cursor:pointer}")}function pr(i){let t;function e(s,r){if(s[1].type==="Image")return hg;if(s[1].type==="Video")return fg}let n=e(i),o=n&&n(i);return{c(){t=V("div"),o&&o.c(),b(t,"class","media-item svelte-q6hk4f")},m(s,r){z(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&&M(t),o&&o.d()}}}function fg(i){let t,e,n,o,s,r;function a(d,f){return d[6]&&d[1].videoCoverUrl?pg:mg}let l=a(i),c=l(i);return{c(){c.c(),t=ee(),e=V("div"),n=V("div"),o=V("div"),b(o,"class","video-icon-img svelte-q6hk4f"),T(o,"background-image","url("+i[14]()+")"),te(o,"canPlay",i[4]),b(n,"class","video-icon svelte-q6hk4f"),te(n,"large",i[3]==="large"),te(n,"small",i[3]==="small"),b(e,"class","video-play-button-container svelte-q6hk4f"),te(e,"showPlayButton",i[8])},m(d,f){c.m(d,f),z(d,t,f),z(d,e,f),Q(e,n),Q(n,o),s||(r=Se(o,"click",i[15]),s=!0)},p(d,f){l===(l=a(d))&&c?c.p(d,f):(c.d(1),c=l(d),c&&(c.c(),c.m(t.parentNode,t))),f&4&&T(o,"background-image","url("+d[14]()+")"),f&16&&te(o,"canPlay",d[4]),f&8&&te(n,"large",d[3]==="large"),f&8&&te(n,"small",d[3]==="small"),f&256&&te(e,"showPlayButton",d[8])},d(d){c.d(d),d&&M(t),d&&M(e),s=!1,r()}}}function hg(i){let t,e,n,o;return{c(){t=V("img"),b(t,"class","media-content svelte-q6hk4f"),b(t,"style",e=`object-fit: ${i[5]};`),Ne(t.src,n=i[1].url)||b(t,"src",n),b(t,"alt",o=i[1].name)},m(s,r){z(s,t,r)},p(s,r){r&32&&e!==(e=`object-fit: ${s[5]};`)&&b(t,"style",e),r&2&&!Ne(t.src,n=s[1].url)&&b(t,"src",n),r&2&&o!==(o=s[1].name)&&b(t,"alt",o)},d(s){s&&M(t)}}}function mg(i){let t,e,n,o,s,r,a;return{c(){t=V("video"),b(t,"class","media-content svelte-q6hk4f"),b(t,"style",e=`object-fit: ${i[5]};`),Ne(t.src,n=i[1].videoCoverUrl?i[1].url:i[1].url+"#t=0.1")||b(t,"src",n),b(t,"poster",o=i[1].videoCoverUrl),b(t,"preload",s=i[1].videoCoverUrl?"none":"auto"),t.playsInline=!0,b(t,"paused",""),t.muted=!0,t.loop=!1,b(t,"crossorigin",""),t.controls=!1,te(t,"showPlayButton",i[8]),T(t,"position","relative")},m(l,c){z(l,t,c),i[13](t),r||(a=Se(t,"click",i[12]),r=!0)},p(l,c){c&32&&e!==(e=`object-fit: ${l[5]};`)&&b(t,"style",e),c&2&&!Ne(t.src,n=l[1].videoCoverUrl?l[1].url:l[1].url+"#t=0.1")&&b(t,"src",n),c&2&&o!==(o=l[1].videoCoverUrl)&&b(t,"poster",o),c&2&&s!==(s=l[1].videoCoverUrl?"none":"auto")&&b(t,"preload",s),c&256&&te(t,"showPlayButton",l[8])},d(l){l&&M(t),i[13](null),r=!1,a()}}}function pg(i){let t,e,n,o;return{c(){t=V("img"),b(t,"class","media-content svelte-q6hk4f"),b(t,"style",e=`object-fit: ${i[5]};`),Ne(t.src,n=i[1].videoCoverUrl)||b(t,"src",n),b(t,"alt",o=i[1].name)},m(s,r){z(s,t,r)},p(s,r){r&32&&e!==(e=`object-fit: ${s[5]};`)&&b(t,"style",e),r&2&&!Ne(t.src,n=s[1].videoCoverUrl)&&b(t,"src",n),r&2&&o!==(o=s[1].name)&&b(t,"alt",o)},d(s){s&&M(t)}}}function gg(i){let t,e=i[1]&&pr(i);return{c(){e&&e.c(),t=fe()},m(n,o){e&&e.m(n,o),z(n,t,o)},p(n,[o]){n[1]?e?e.p(n,o):(e=pr(n),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},i:Z,o:Z,d(n){e&&e.d(n),n&&M(t)}}}function Ag(i,t,e){let{tag:n}=t,{media:o}=t,{playButtonIfNeed:s="withoutText"}=t,{playButtonSizeIfNeed:r="small"}=t,{canPlay:a=!0}=t,{objectFit:l="cover"}=t,{disableVideoIfHavePoster:c=!1}=t,d=(o==null?void 0:o.type)==="Video"&&Boolean(o==null?void 0:o.videoCoverUrl),f,u=!1;const h=ct("mediaStore"),p=ct("hooks"),A=()=>{d||(f==null||f.play(),f==null||f.pause(),e(11,d=!0))};p.on("loadVideoFirstFrame",A);const g=P=>{f&&(f.pause(),p.emit("playStateChange",{event:P,state:"paused",tag:n,mediaInstance:f}))};function v(P){Le[P?"unshift":"push"](()=>{f=P,e(7,f)})}const w=()=>s==="withText"?fp:s==="withoutText"?hp:s,y=P=>{!a||f&&(e(7,f.muted=!1,f),f.play(),h.set({currentMediaElement:f}),p.emit("playStateChange",{event:P,state:"playing",tag:n,mediaInstance:f}))};return i.$$set=P=>{"tag"in P&&e(0,n=P.tag),"media"in P&&e(1,o=P.media),"playButtonIfNeed"in P&&e(2,s=P.playButtonIfNeed),"playButtonSizeIfNeed"in P&&e(3,r=P.playButtonSizeIfNeed),"canPlay"in P&&e(4,a=P.canPlay),"objectFit"in P&&e(5,l=P.objectFit),"disableVideoIfHavePoster"in P&&e(6,c=P.disableVideoIfHavePoster)},i.$$.update=()=>{if(i.$$.dirty&128&&f&&(e(8,u=f.paused),f.addEventListener("play",()=>{e(8,u=!1)}),f.addEventListener("pause",()=>{e(8,u=!0)}),h.subscribe(({currentMediaElement:P})=>{P!==f&&(f==null||f.pause())})),i.$$.dirty&2178&&(o==null?void 0:o.type)==="Video"&&!d){const P=navigator.userAgent.toLowerCase().indexOf("micromessenger")!==-1,C=navigator.userAgent.toLowerCase().indexOf("iphone")!==-1&&P;f&&C&&f.paused&&(document.removeEventListener("WeixinJSBridgeReady",A),document.removeEventListener("touchstart",A),document.removeEventListener("click",A),document.addEventListener("WeixinJSBridgeReady",A),document.addEventListener("touchstart",A),document.addEventListener("click",A))}},[n,o,s,r,a,l,c,f,u,h,p,d,g,v,w,y]}class il extends oe{constructor(t){super(),ie(this,t,Ag,gg,ne,{tag:0,media:1,playButtonIfNeed:2,playButtonSizeIfNeed:3,canPlay:4,objectFit:5,disableVideoIfHavePoster:6},ug)}}function vg(i){le(i,"svelte-ai0lv9",".media.svelte-ai0lv9{width:100%;height:100%;position:relative;overflow:hidden;border-radius:0.125rem}")}function gr(i,t,e){const n=i.slice();return n[22]=t[e],n}function Ar(i){let t,e,n,o,s,r;const a=[yg,bg],l=[];function c(d,f){return d[12]?0:1}return e=c(i),n=l[e]=a[e](i),{c(){t=V("div"),n.c(),b(t,"class","media svelte-ai0lv9"),te(t,"unfolded",i[5])},m(d,f){z(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):(se(),S(l[u],1,1,()=>{l[u]=null}),re(),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&32)&&te(t,"unfolded",i[5])},i(d){r||(k(n),d&&De(()=>{s&&s.end(1),o=Rt(t,Bo,i[6]?{y:4,duration:i[4],delay:i[2],easing:yt}:void 0),o.start()}),r=!0)},o(d){S(n),o&&o.invalidate(),d&&(s=tn(t,Bo,i[6]?{y:4,duration:i[4],delay:i[3],easing:yt}:void 0)),r=!1},d(d){d&&M(t),l[e].d(),d&&s&&s.end()}}}function bg(i){let t,e;const n=[{media:i[1][0]},i[7],{tag:i[0]}];let o={};for(let s=0;s<n.length;s+=1)o=we(o,n[s]);return t=new il({props:o}),{c(){$(t.$$.fragment)},m(s,r){q(t,s,r),e=!0},p(s,r){const a=r&131?Be(n,[r&2&&{media:s[1][0]},r&128&&ya(s[7]),r&1&&{tag:s[0]}]):{};t.$set(a)},i(s){e||(k(t.$$.fragment,s),e=!0)},o(s){S(t.$$.fragment,s),e=!1},d(s){K(t,s)}}}function yg(i){let t,e;return t=new ig({props:{style:"height: 100%",modules:[Zr.Autoplay],spaceBetween:30,autoplay:i[13]?Te({delay:4e3,stopOnLastSlide:!1,disableOnInteraction:!1}):!1,loop:!0,$$slots:{default:[Cg]},$$scope:{ctx:i}}}),t.$on("init",i[20]),t.$on("slideChange",i[21]),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&8192&&(s.autoplay=n[13]?Te({delay:4e3,stopOnLastSlide:!1,disableOnInteraction:!1}):!1),o&33555585&&(s.$$scope={dirty:o,ctx:n}),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function wg(i){let t,e,n;const o=[i[7],{media:i[22]},{tag:i[0]}];let s={};for(let r=0;r<o.length;r+=1)s=we(s,o[r]);return t=new il({props:s}),{c(){$(t.$$.fragment),e=ee()},m(r,a){q(t,r,a),z(r,e,a),n=!0},p(r,a){const l=a&1153?Be(o,[a&128&&ya(r[7]),a&1024&&{media:r[22]},a&1&&{tag:r[0]}]):{};t.$set(l)},i(r){n||(k(t.$$.fragment,r),n=!0)},o(r){S(t.$$.fragment,r),n=!1},d(r){K(t,r),r&&M(e)}}}function vr(i){let t,e;return t=new i[14]({props:{$$slots:{default:[wg]},$$scope:{ctx:i}}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&33555585&&(s.$$scope={dirty:o,ctx:n}),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function Cg(i){let t,e,n=i[10],o=[];for(let r=0;r<n.length;r+=1)o[r]=vr(gr(i,n,r));const s=r=>S(o[r],1,1,()=>{o[r]=null});return{c(){for(let r=0;r<o.length;r+=1)o[r].c();t=fe()},m(r,a){for(let l=0;l<o.length;l+=1)o[l].m(r,a);z(r,t,a),e=!0},p(r,a){if(a&1153){n=r[10];let l;for(l=0;l<n.length;l+=1){const c=gr(r,n,l);o[l]?(o[l].p(c,a),k(o[l],1)):(o[l]=vr(c),o[l].c(),k(o[l],1),o[l].m(t.parentNode,t))}for(se(),l=n.length;l<o.length;l+=1)s(l);re()}},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)S(o[a]);e=!1},d(r){lt(o,r),r&&M(t)}}}function Eg(i){let t,e,n=i[5]&&Ar(i);return{c(){n&&n.c(),t=fe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[5]?n?(n.p(o,s),s&32&&k(n,1)):(n=Ar(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(se(),S(n,1,1,()=>{n=null}),re())},i(o){e||(k(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function Pg(i,t,e){let n,o,s;const r=Te(dg);let{tag:a}=t,{mediaData:l}=t,{inDelay:c=0}=t,{outDelay:d=0}=t,{duration:f=0}=t,{unfolded:u=!0}=t,{animation:h=!0}=t,{mediaItemConfig:p}=t,{enableCarousel:A=!0}=t,{autoplayConfig:g={autoplay:!0,autoplayVideo:!1}}=t;const v=ct("mediaStore"),w=ct("hooks");let y;function P(B){!n||!y||(v.set({currentMediaElement:this}),w.emit("playStateChange",{event:B,state:"playing",tag:a,mediaInstance:this}),y.autoplay.stop())}function I(B){!n||!y||(w.emit("playStateChange",{event:B,state:"paused",tag:a,mediaInstance:this}),y.autoplay.running||y.autoplay.start())}let C=null;const L=B=>{e(9,y=B.detail[0])},D=B=>Y(this,null,function*(){var R,O,W;if(!s||!g.autoplayVideo)return;const N=B.detail[0];if(!N)return;const F=N.realIndex;if(F===C)return;e(11,C=F);const X=o[F];if(!X||X.type!=="Video")return;N.autoplay.stop(),N.slides.map(U=>U.querySelector("video")).filter(We).forEach(U=>U.pause());const E=(R=N.slides[N.activeIndex])==null?void 0:R.querySelector("video");if(E&&(E.removeEventListener("play",P),E.removeEventListener("pause",I),E.addEventListener("play",P),E.addEventListener("pause",I)),E){E.addEventListener("click",()=>E.pause());const U=(W=(O=E.parentElement)==null?void 0:O.getElementsByClassName("video-play-button-container"))==null?void 0:W[0];E.addEventListener("play",()=>U==null?void 0:U.classList.remove("showPlayButton")),E.addEventListener("pause",()=>U==null?void 0:U.classList.add("showPlayButton")),U&&(E.paused?U.classList.add("showPlayButton"):U.classList.remove("showPlayButton"),U.addEventListener("click",_=>{E.muted=!1,E.play(),v.set({currentMediaElement:E}),w.emit("playStateChange",{event:_,state:"playing",tag:a,mediaInstance:E})}))}});return i.$$set=B=>{"tag"in B&&e(0,a=B.tag),"mediaData"in B&&e(1,l=B.mediaData),"inDelay"in B&&e(2,c=B.inDelay),"outDelay"in B&&e(3,d=B.outDelay),"duration"in B&&e(4,f=B.duration),"unfolded"in B&&e(5,u=B.unfolded),"animation"in B&&e(6,h=B.animation),"mediaItemConfig"in B&&e(7,p=B.mediaItemConfig),"enableCarousel"in B&&e(19,A=B.enableCarousel),"autoplayConfig"in B&&e(8,g=B.autoplayConfig)},i.$$.update=()=>{i.$$.dirty&524290&&e(12,n=A&&(l==null?void 0:l.length)>1),i.$$.dirty&2&&e(10,o=l),i.$$.dirty&1280&&e(13,s=o.length>1&&g.autoplay),i.$$.dirty&512&&y&&y.slides.forEach(B=>{const N=B.querySelector("video");N&&v.subscribe(({currentMediaElement:F})=>{F!==N&&N.pause()})})},[a,l,c,d,f,u,h,p,g,y,o,C,n,s,r,v,w,P,I,A,L,D]}class ol extends oe{constructor(t){super(),ie(this,t,Pg,Eg,ne,{tag:0,mediaData:1,inDelay:2,outDelay:3,duration:4,unfolded:5,animation:6,mediaItemConfig:7,enableCarousel:19,autoplayConfig:8},vg)}}function Ig(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 br(i){let t,e,n,o,s,r,a,l;t=new Ke({props:{visible:i[3],left:61,bottom:57,width:2,blurRadius:150,spreadRadius:75}}),o=new _p({props:{unfolded:i[3],outDelay:400}});let c=i[2]&&yr(i),d=i[1]&&wr(i);return{c(){$(t.$$.fragment),e=ee(),n=V("div"),$(o.$$.fragment),s=ee(),c&&c.c(),r=ee(),d&&d.c(),a=fe(),b(n,"class","line svelte-1f7m1lj")},m(f,u){q(t,f,u),z(f,e,u),z(f,n,u),q(o,n,null),z(f,s,u),c&&c.m(f,u),z(f,r,u),d&&d.m(f,u),z(f,a,u),l=!0},p(f,u){const h={};u&8&&(h.visible=f[3]),t.$set(h);const p={};u&8&&(p.unfolded=f[3]),o.$set(p),f[2]?c?(c.p(f,u),u&4&&k(c,1)):(c=yr(f),c.c(),k(c,1),c.m(r.parentNode,r)):c&&(se(),S(c,1,1,()=>{c=null}),re()),f[1]?d?(d.p(f,u),u&2&&k(d,1)):(d=wr(f),d.c(),k(d,1),d.m(a.parentNode,a)):d&&(se(),S(d,1,1,()=>{d=null}),re())},i(f){l||(k(t.$$.fragment,f),k(o.$$.fragment,f),k(c),k(d),l=!0)},o(f){S(t.$$.fragment,f),S(o.$$.fragment,f),S(c),S(d),l=!1},d(f){K(t,f),f&&M(e),f&&M(n),K(o),f&&M(s),c&&c.d(f),f&&M(r),d&&d.d(f),f&&M(a)}}}function yr(i){let t,e,n;return e=new el({props:{unfolded:i[3],content:i[2],inDelay:500}}),{c(){t=V("div"),$(e.$$.fragment),b(t,"class","text svelte-1f7m1lj")},m(o,s){z(o,t,s),q(e,t,null),n=!0},p(o,s){const r={};s&8&&(r.unfolded=o[3]),s&4&&(r.content=o[2]),e.$set(r)},i(o){n||(k(e.$$.fragment,o),n=!0)},o(o){S(e.$$.fragment,o),n=!1},d(o){o&&M(t),K(e)}}}function wr(i){let t,e,n;return e=new ol({props:{autoplayConfig:{autoplay:!1},unfolded:i[3],mediaData:i[1],tag:i[0],enableCarousel:!1,mediaItemConfig:{canPlay:!1,playButtonSizeIfNeed:"small",disableVideoIfHavePoster:!0},inDelay:500,duration:500}}),{c(){t=V("div"),$(e.$$.fragment),b(t,"class","media-wrapper svelte-1f7m1lj")},m(o,s){z(o,t,s),q(e,t,null),n=!0},p(o,s){const r={};s&8&&(r.unfolded=o[3]),s&2&&(r.mediaData=o[1]),s&1&&(r.tag=o[0]),e.$set(r)},i(o){n||(k(e.$$.fragment,o),n=!0)},o(o){S(e.$$.fragment,o),n=!1},d(o){o&&M(t),K(e)}}}function kg(i){let t,e,n=i[0].state&&br(i);return{c(){n&&n.c(),t=fe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&k(n,1)):(n=br(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(se(),S(n,1,1,()=>{n=null}),re())},i(o){e||(k(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function xg(i,t,e){let n,o,s,r,{tag:a}=t;return i.$$set=l=>{"tag"in l&&e(0,a=l.tag)},i.$$.update=()=>{var l,c,d;i.$$.dirty&1&&e(3,n=a.state?a.state.unfolded:!1),i.$$.dirty&1&&e(4,o=(c=(l=a.data.title)!=null?l:a.data.text)!=null?c:""),i.$$.dirty&16&&e(2,s=((d=o.length)!=null?d:0)>7?o.substring(0,6)+"...":o),i.$$.dirty&1&&e(1,r=a.data.mediaData)},[a,r,s,n,o]}class Dg extends oe{constructor(t){super(),ie(this,t,xg,kg,ne,{tag:0},Ig)}}class Xi{constructor(t=0,e=0){m(this,"min");m(this,"max");m(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 Lg{constructor(t,e){m(this,"min");m(this,"max");m(this,"xInterval");m(this,"yInterval");m(this,"isRectangle",!0);this.min=t,this.max=e,this.xInterval=new Xi(this.min.x,this.max.x),this.yInterval=new Xi(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 zn(i,t,e){const n=i[t],o=i[e];!n||!o||(i[t]=o,i[e]=n)}function Sg(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;zn(i,a*4+0,l*4+0),zn(i,a*4+1,l*4+1),zn(i,a*4+2,l*4+2),zn(i,a*4+3,l*4+3)}}}class sl{constructor(t,e){m(this,"width");m(this,"height");m(this,"containerDom");m(this,"hooks",new be.Subscribe);m(this,"canvas",document.createElement("canvas"));m(this,"five");m(this,"scale");m(this,"config");m(this,"offset",{x:0,y:0});m(this,"context");m(this,"renderCenter",new x.Vector3);m(this,"hammer");m(this,"state",{enabled:!1});m(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)`});m(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 gn.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 x.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),p=Math.floor(n*a),A=Math.floor(o*a);Sg(h,p,A);const g=new ImageData(p,A);g.data.set(h),e.putImageData(g,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 Tg(i,t){const{offsetWidth:e,offsetHeight:n}=t,{top:o,left:s}=t.getBoundingClientRect();return new x.Vector2().set((i.x-s)/e*2-1,-(i.y-o)/n*2+1)}function rl(i,t){const{offsetWidth:e,offsetHeight:n}=t;return new x.Vector2().set(i.x/e*2-1,-i.y/n*2+1)}function Mg(i,t){const e=i.getElement();if(!e)return;const n=rl(t,e),o=new x.Raycaster;return o.setFromCamera(n,i.camera),o}function zg(i,t){const{x:e,y:n}=t,o=e*2-1,s=n*2-1,r=new x.Vector2().fromArray([o,s]),a=new x.Raycaster;return a.setFromCamera(r,i.camera),i.model.intersectRaycaster(a)[0]}const Bg="data:image/png;base64,iVBORw0KGg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kIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQn8NQn8fyHnyuSABiy2AAAAAElFTkSuQmCC",Vg=`
|
|
544
|
+
`))&&b(t,"style",e),a&8&&T(t,"width",Ge(i[3])),a&16&&T(t,"height",Ge(i[4])),a&8192&&T(t,"z-index",i[13])},i(r){s||(r&&De(()=>{o&&o.end(1),n=Rt(t,Bt,{duration:i[0]}),n.start()}),s=!0)},o(r){n&&n.invalidate(),r&&(o=tn(t,Bt,{duration:i[1]})),s=!1},d(r){r&&M(t),r&&o&&o.end()}}}function Km(i){let t,e=i[2]&&_s(i);return{c(){e&&e.c(),t=fe()},m(n,o){e&&e.m(n,o),z(n,t,o)},p(n,[o]){n[2]?e?(e.p(n,o),o&4&&k(e,1)):(e=_s(n),e.c(),k(e,1),e.m(t.parentNode,t)):e&&(se(),S(e,1,1,()=>{e=null}),re())},i(n){k(e)},o(n){S(e)},d(n){e&&e.d(n),n&&M(t)}}}function Ge(i){return typeof i=="number"?i/16+"rem":i}function $m(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:p}=t,{opacity:A=.15}=t,{zIndex:g=-1}=t;return i.$$set=v=>{"inDelay"in v&&e(0,n=v.inDelay),"outDelay"in v&&e(1,o=v.outDelay),"visible"in v&&e(2,s=v.visible),"width"in v&&e(3,r=v.width),"height"in v&&e(4,a=v.height),"left"in v&&e(5,l=v.left),"bottom"in v&&e(6,c=v.bottom),"center"in v&&e(7,d=v.center),"horizontalCenter"in v&&e(8,f=v.horizontalCenter),"verticalCenter"in v&&e(9,u=v.verticalCenter),"blurRadius"in v&&e(10,h=v.blurRadius),"spreadRadius"in v&&e(11,p=v.spreadRadius),"opacity"in v&&e(12,A=v.opacity),"zIndex"in v&&e(13,g=v.zIndex)},[n,o,s,r,a,l,c,d,f,u,h,p,A,g]}class Ke extends oe{constructor(t){super(),ie(this,t,$m,Km,ne,{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},qm)}}function ep(i,t){t.forEach(e=>{const n=new x.SphereGeometry(.02,16,16),o=[],s=[new x.MeshBasicMaterial({color:16776960}),new x.MeshBasicMaterial({color:16711935}),new x.MeshBasicMaterial({color:16711680}),new x.MeshBasicMaterial({color:65535})];if(e.position.length===4)e.position.forEach((r,a)=>{const l=s[a],c=new x.Mesh(n,l);c.position.copy(nt(r)),o.push(c)});else{const r=s[0],a=new x.Mesh(n,r);a.position.copy(nt(e.position)),o.push(a)}o.forEach(r=>{r.material.depthTest=!1,i.scene.add(r)})})}const Te=i=>i;function $a(i){if(i.length<3)return;const t=i.map(hn),e=t[1].clone().sub(t[0]),n=t[2].clone().sub(t[1]);return e.cross(n)}function Mn(i){if(Array.isArray(i)&&i.length===4){const e=i.map(hn);return $r(e[0],e[2])}else return hn(i)}function rn(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 tp(i){return new Promise(t=>{i.model.loaded?t():i.once("modelLoaded",()=>t())})}function np(i,t,e){const o=new x.Plane().setFromNormalAndCoplanarPoint(e,t),s=t.clone().sub(i).cross(new x.Vector3(0,1,0)).setLength(.01),r=new x.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 x.Vector3))}const Xs=(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 ip(i,t=200){let e;return function(...n){e||(i.apply(this,n),e=setTimeout(function(){e=null},t))}}function op(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 Ys(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)}}}function sp(){return Math.random().toString(36).slice(-6)}const xi=sp();function rp(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 Us(i,t,e){const n=i.slice();return n[18]=t[e].id,n[0]=t[e].content,n[19]=t,n[20]=e,n}function ap(i){let t,e=i[0]+"",n,o=i[20];const s=()=>i[9](t,o),r=()=>i[9](null,o);return{c(){t=V("span"),n=Ee(e),b(t,"class","text-char svelte-1b2n9wi")},m(a,l){z(a,t,l),Q(t,n),s()},p(a,l){i=a,l&4&&e!==(e=i[0]+"")&&xe(n,e),o!==i[20]&&(r(),o=i[20],s())},d(a){a&&M(t),r()}}}function lp(i){let t,e=i[20];const n=()=>i[8](t,e),o=()=>i[8](null,e);return{c(){t=V("span"),t.textContent="\xA0",b(t,"class","text-char svelte-1b2n9wi")},m(s,r){z(s,t,r),n()},p(s,r){i=s,e!==i[20]&&(o(),e=i[20],n())},d(s){s&&M(t),o()}}}function Js(i,t){let e,n;function o(a,l){return a[0]===a[3]?lp:ap}let s=o(t),r=s(t);return{key:i,first:null,c(){e=fe(),r.c(),n=fe(),this.first=e},m(a,l){z(a,e,l),r.m(a,l),z(a,n,l)},p(a,l){t=a,s===(s=o(t))&&r?r.p(t,l):(r.d(1),r=s(t),r&&(r.c(),r.m(n.parentNode,n)))},d(a){a&&M(e),r.d(a),a&&M(n)}}}function cp(i){let t=[],e=new Map,n,o=i[2];const s=r=>r[18];for(let r=0;r<o.length;r+=1){let a=Us(i,o,r),l=s(a);e.set(l,t[r]=Js(l,a))}return{c(){for(let r=0;r<t.length;r+=1)t[r].c();n=fe()},m(r,a){for(let l=0;l<t.length;l+=1)t[l].m(r,a);z(r,n,a)},p(r,[a]){a&14&&(o=r[2],t=qe(t,a,s,1,r,o,e,n.parentNode,to,Js,n,Us))},i:Z,o:Z,d(r){for(let a=0;a<t.length;a+=1)t[a].d(r);r&&M(n)}}}function dp(i,t,e){let n,{inDelay:o=0}=t,{outDelay:s=0}=t,{content:r}=t,{unfolded:a}=t,{isFistUnfoldedUpdate:l=!0}=t;const c=`__EMOJI_SPLIT_${xi}__`,d=`__EMOJI_${xi}__`,f=`__SPACE_${xi}__`;let u,h,p=[];function A(I){const C=[],L=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"));return I.slice().replace(L,D=>`${c}${d}${D}${c}`).split(c).forEach(D=>D.startsWith(d)?C.push({id:He(),content:D.slice(d.length)}):C.push(...D.split("").map(B=>B===" "?f:B).map(B=>({id:He(),content:B})))),C}function g(){if(!h)return;const I=!a;h.reversed!==I&&h.reverse(),h.play()}function v(I){if(l){e(4,l=!1);return}clearTimeout(u),u=setTimeout(g,I?o:s)}function w(I){const C=function(){const L=op(D=>I[D].getBoundingClientRect().x,[Math.min(I.length-1,10),Math.min(I.length-1,30)]);if(L>0)return L}();h=Co.default({targets:I.slice(0,C).filter(We),autoplay:!1,duration:400,scale:[.7,1],rotate:[20,0],opacity:[0,1],translateX:[4,0],translateY:[10,0],delay:Co.default.stagger(50),easing:"easeInOutCubic"}),a&&h.seek(h.duration)}function y(I,C){Le[I?"unshift":"push"](()=>{p[C]=I,e(1,p)})}function P(I,C){Le[I?"unshift":"push"](()=>{p[C]=I,e(1,p)})}return i.$$set=I=>{"inDelay"in I&&e(5,o=I.inDelay),"outDelay"in I&&e(6,s=I.outDelay),"content"in I&&e(0,r=I.content),"unfolded"in I&&e(7,a=I.unfolded),"isFistUnfoldedUpdate"in I&&e(4,l=I.isFistUnfoldedUpdate)},i.$$.update=()=>{i.$$.dirty&1&&e(2,n=A(r)),i.$$.dirty&128&&v(a),i.$$.dirty&2&&w(p.filter(I=>!!I))},[r,p,n,f,l,o,s,a,y,P]}class el extends oe{constructor(t){super(),ie(this,t,dp,cp,ne,{inDelay:5,outDelay:6,content:0,unfolded:7,isFistUnfoldedUpdate:4},rp)}}const up="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAKqADAAQAAAABAAAAKgAAAADUGqULAAAB0ElEQVRYCe2WSUoEQRBFLVHEiVZU1I03cKW38SSewRt4A5fiTty5cQIFR9pZQWkcUNSe2/Z9yISi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u8vr163+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=",mp="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAMAAAANIilAAAABcVBMVEUAAAAAAAD////////+/v45OTn////////39/fp6enPz8/7+/vw8PD+/v7x8fHc3NzHx8f////////+/v77+/vr6+v////7+/v5+fn////z8/P////////q6uqgoKD+/v79/f3m5ub+/v7////////////////39/f39/f////z8/P////t7e3s7Oz29vb////5+fn////h4eH////g4ODV1dX////////BwcH///////////+Ojo5zc3MlJSX////////////////////////7+/v////////////v7+/u7u7n5+f////39/f////09PT6+vr09PT+/v76+vr////5+fnv7+/09PTk5OT////////////////Jycn///++vr7///////+0tLT///9TU1P///8SEhL////////+/v76+vr////8/Pz39/ft7e3t7e36+vr////////X19fV1dX///+xsbF9fX1iYmL///////+K8mOEAAAAenRSTlMaAIDy8CD41cWRX9uk7Kl1VVEw6dWT/M/NvKyVkY475eWIgx0Z39rHv7axnZyZmIuKhn56emZjX1FEPTU0Kx4PCAX69fTgxcKkopWL7crJuri2sa6rnIyHhX54bVtZVU9NSUcsJSIcFROno6Hcwp+ekHVxbWhnRC8nDLc9s8oAAAOGSURBVEjHpdd3X9pAGAfwkBBDAoQmBJmWvUWWiIDIHoJb66x7a4d78Op7pBQ1J5DY33987vnyXEIu3CGy/0hvnDthM+l0hj3JScSudDKOdhNPpl1i8Ut624Gi6+trI3zW1tcdqGM7/SIC5/ZRR2SNJEm7JkHt7FAJjR18WIs40P3cAFxIOaIRna6ZOHxGunk+TDR1ukjUkSr0w86bcKShiz1OI4JMP8YAD9+4emM2Gm407IfIhzm0NxrhKNsLH4SvQ+RktyvUfZIMXYcPPsSFCcvY6EYW6ZPsxuiYZaLwAW5bDY70Da5paxjvm8d+UcjAUL/GzPtCnDF/mwFWhJ75Zs68x05gxxFRGQfa+RYXokHVCC4O4yOqYLTwBjNB+ncWEZnsbzrIvOLz4CW9g4jODn0ZPO/iZN0UmhaPp0Omq+Q/nLu6NO0hErJnurjKdTBzEdAhkqILXDAdbFkJ7EnDe4EVy198srpiwhE4X1RKDFOqviBwcNPK6gmPmeWlGDz+VdHqRPEVHo0tLTM8RpcX4G+flLe6kU/Cs1pYRnm8uriQhfoC+0ZDvbMLi6ttfO5fDCDCKFrvooAKAov+c4BZvy8EzaolCHRdIZ+fBThl9G0Ih1RCrBJWbPiMKYAZ409oMSqFWAktzJ9GBuDvRoVGOIQJMSas0CiM39u45v0M9tbaeLc6F5M+7dhcbRfgg+pcU/oNa85VDwDOzBtmpP9UKsN8BuCzeb1P+kPi08+fASyr6fVPUh/PJ72+xj/bZk5PSV0YlJ4z83iC4EipS5LkiAkeHxGcQerLwMARRzyW+QklhUgKpST8nXfYg+fHkjS89MPz0MFnhKdCSWpc8RBnPAZB3RUvLt7i3oob7f5juDzuikY81tjcHlcHg9xabdyUWDvF2ay3slecr1ptimNx9lhhs1bzXQxy5NZa6VMx9pS2Wt1H77cVjFartYvBdlDICDc0cbVa3Twd2NcOyuLwVqo+K1ebjgdcr0k+O1uXwThfl8vlhqm+99kASup5GINsYhhmG8d7UXzcBgo2e21cd9WlUll5/7G958ql8uxu7y0zS5SGSkOGBA51TRiGQAi232Y9v4kVQZGavpt6c6l3tLpNsc38gGOC01IeLg4Xi8NaLz1KkqO0VzvcTrFscYo4oLjiRAsKEXeJPRqxW0bsFWLGLVbiocyZSm5vbW0nU9BsIfyp/AGqAvfOkBaFawAAAABJRU5ErkJggg==";function pp(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 Zs(i){let t,e,n,o,s,r,a,l,c,d;return e=new Ke({props:{center:!0,blurRadius:9,spreadRadius:3}}),{c(){t=V("div"),$(e.$$.fragment),n=ee(),o=V("div"),b(o,"class",s="arrow "+i[0]+" svelte-1ogmlqq"),T(o,"background-image","url("+up+")"),b(t,"class","arrow-wrapper svelte-1ogmlqq")},m(f,u){z(f,t,u),q(e,t,null),Q(t,n),Q(t,o),l=!0,c||(d=Se(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=Rt(o,Bt,{duration:i[2],delay:i[3],easing:Zt}),r.start()}),l=!0)},o(f){S(e.$$.fragment,f),r&&r.invalidate(),f&&(a=tn(o,Bt,{duration:i[2],delay:i[4],easing:Zt})),l=!1},d(f){f&&M(t),K(e),f&&a&&a.end(),c=!1,d()}}}function gp(i){let t,e,n=i[1]&&Zs(i);return{c(){n&&n.c(),t=fe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[1]?n?(n.p(o,s),s&2&&k(n,1)):(n=Zs(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(se(),S(n,1,1,()=>{n=null}),re())},i(o){e||(k(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function Ap(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){$i.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 vp extends oe{constructor(t){super(),ie(this,t,Ap,gp,ne,{direction:0,visible:1,duration:2,inDelay:3,outDelay:4},pp)}}function bp(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 yp(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 qs(i){let t,e,n;return e=new el({props:{unfolded:i[0],content:i[1],inDelay:500,outDelay:i[5]}}),{c(){t=V("div"),$(e.$$.fragment),b(t,"class","text svelte-1fuzm7v"),T(t,"transform",i[7])},m(o,s){z(o,t,s),q(e,t,null),i[10](t),n=!0},p(o,s){const r={};s&1&&(r.unfolded=o[0]),s&2&&(r.content=o[1]),s&32&&(r.outDelay=o[5]),e.$set(r),s&128&&T(t,"transform",o[7])},i(o){n||(k(e.$$.fragment,o),n=!0)},o(o){S(e.$$.fragment,o),n=!1},d(o){o&&M(t),K(e),i[10](null)}}}function Ks(i){let t,e,n;return e=new vp({props:{direction:i[6],visible:i[0],inDelay:600,duration:1e3}}),{c(){t=V("div"),$(e.$$.fragment),b(t,"class","arrow svelte-1fuzm7v")},m(o,s){z(o,t,s),q(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){S(e.$$.fragment,o),n=!1},d(o){o&&M(t),K(e)}}}function wp(i){let t,e,n,o=i[1]&&qs(i),s=i[3]<i[4]&&Ks(i);return{c(){o&&o.c(),t=ee(),s&&s.c(),e=fe()},m(r,a){o&&o.m(r,a),z(r,t,a),s&&s.m(r,a),z(r,e,a),n=!0},p(r,[a]){r[1]?o?(o.p(r,a),a&2&&k(o,1)):(o=qs(r),o.c(),k(o,1),o.m(t.parentNode,t)):o&&(se(),S(o,1,1,()=>{o=null}),re()),r[3]<r[4]?s?(s.p(r,a),a&24&&k(s,1)):(s=Ks(r),s.c(),k(s,1),s.m(e.parentNode,e)):s&&(se(),S(s,1,1,()=>{s=null}),re())},i(r){n||(k(o),k(s),n=!0)},o(r){S(o),S(s),n=!1},d(r){o&&o.d(r),r&&M(t),s&&s.d(r),r&&M(e)}}}function Cp(i,t,e){let n,o,s,{visible:r=!1}=t,{textUnfolded:a=!1}=t,{content:l}=t,c,d=0,f=0,u=0;function h(p){Le[p?"unshift":"push"](()=>{c=p,e(2,c)})}return i.$$set=p=>{"visible"in p&&e(0,r=p.visible),"textUnfolded"in p&&e(8,a=p.textUnfolded),"content"in p&&e(1,l=p.content)},i.$$.update=()=>{if(i.$$.dirty&7&&c&&r&&l){const{lineHeight:p}=getComputedStyle(c);e(4,u=c.offsetHeight),bp(()=>c==null?void 0:c.offsetHeight,Boolean).then(()=>{e(4,u=c.offsetHeight)}),e(3,f=Number(p.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 tl extends oe{constructor(t){super(),ie(this,t,Cp,wp,ne,{visible:0,textUnfolded:8,content:1},yp)}}function Ep(i){le(i,"svelte-nlvd3x",".content.svelte-nlvd3x{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 $s(i){var f,u;let t,e,n,o,s,r,a,l,c,d;return t=new Ke({props:{visible:i[2],left:i[3]/2+"px",bottom:12,width:2,blurRadius:120,spreadRadius:60}}),n=new fo({props:{unfolded:i[2],length:i[3],outDelay:i[4]+40*Math.min((u=(f=i[6][0])==null?void 0:f.content.length)!=null?u:10,15),useLinearColor:!0}}),r=new tl({props:{visible:i[2],textUnfolded:i[1],content:i[5]}}),{c(){$(t.$$.fragment),e=ee(),$(n.$$.fragment),o=ee(),s=V("div"),$(r.$$.fragment),b(s,"class","content svelte-nlvd3x"),De(()=>i[8].call(s))},m(h,p){q(t,h,p),z(h,e,p),q(n,h,p),z(h,o,p),z(h,s,p),q(r,s,null),a=Et(s,i[8].bind(s)),l=!0,c||(d=Se(s,"click",i[7]),c=!0)},p(h,p){var w,y;const A={};p&4&&(A.visible=h[2]),p&8&&(A.left=h[3]/2+"px"),t.$set(A);const g={};p&4&&(g.unfolded=h[2]),p&8&&(g.length=h[3]),p&16&&(g.outDelay=h[4]+40*Math.min((y=(w=h[6][0])==null?void 0:w.content.length)!=null?y:10,15)),n.$set(g);const v={};p&4&&(v.visible=h[2]),p&2&&(v.textUnfolded=h[1]),p&32&&(v.content=h[5]),r.$set(v)},i(h){l||(k(t.$$.fragment,h),k(n.$$.fragment,h),k(r.$$.fragment,h),l=!0)},o(h){S(t.$$.fragment,h),S(n.$$.fragment,h),S(r.$$.fragment,h),l=!1},d(h){K(t,h),h&&M(e),K(n,h),h&&M(o),h&&M(s),K(r),a(),c=!1,d()}}}function Pp(i){let t,e,n=i[0].state&&$s(i);return{c(){n&&n.c(),t=fe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&k(n,1)):(n=$s(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(se(),S(n,1,1,()=>{n=null}),re())},i(o){e||(k(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function Ip(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,h,p;i.$$.dirty&1&&e(2,n=!!((u=r.state)!=null&&u.unfolded)),i.$$.dirty&1&&e(5,o=(p=(h=r.data.title)!=null?h:r.data.text)!=null?p:""),i.$$.dirty&4&&(n||setTimeout(()=>{e(1,l=!1)},20)),i.$$.dirty&2&&e(4,s=l?450:0)},[r,l,n,a,s,o,c,d,f]}class kp extends oe{constructor(t){super(),ie(this,t,Ip,Pp,ne,{tag:0},Ep)}}function ye(i){return i/16+"rem"}function xp(i){le(i,"svelte-ilb1qs",".text.svelte-ilb1qs{display:-webkit-box;display:-ms-box;display:-moz-box;position:relative;width:-moz-max-content;width:max-content;max-width:100%;word-break:break-all;-webkit-box-orient:vertical;-ms-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}@keyframes svelte-ilb1qs-blink{0%{opacity:1}50%{opacity:0}100%{opacity:1}}.caret.svelte-ilb1qs{position:absolute;width:0.0625rem;height:100%;background-color:#fff;animation:svelte-ilb1qs-blink 1.2s infinite}.placeholder.svelte-ilb1qs{opacity:0.5}")}function Dp(i){let t;const e=i[6].default,n=it(e,i,i[5],null);return{c(){n&&n.c()},m(o,s){n&&n.m(o,s),t=!0},p(o,s){n&&n.p&&(!t||s&32)&&st(n,e,o,o[5],t?ot(e,o[5],s,null):rt(o[5]),null)},i(o){t||(k(n,o),t=!0)},o(o){S(n,o),t=!1},d(o){n&&n.d(o)}}}function Lp(i){var s,r;let t,e,n=((s=i[3])==null?void 0:s.inputting)&&er(),o=((r=i[3])==null?void 0:r.placeholder)&&tr(i);return{c(){n&&n.c(),t=ee(),o&&o.c(),e=fe()},m(a,l){n&&n.m(a,l),z(a,t,l),o&&o.m(a,l),z(a,e,l)},p(a,l){var c,d;(c=a[3])!=null&&c.inputting?n||(n=er(),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null),(d=a[3])!=null&&d.placeholder?o?o.p(a,l):(o=tr(a),o.c(),o.m(e.parentNode,e)):o&&(o.d(1),o=null)},i:Z,o:Z,d(a){n&&n.d(a),a&&M(t),o&&o.d(a),a&&M(e)}}}function Sp(i){let t;return{c(){t=Ee(i[2])},m(e,n){z(e,t,n)},p(e,n){n&4&&xe(t,e[2])},i:Z,o:Z,d(e){e&&M(t)}}}function er(i){let t;return{c(){t=V("div"),b(t,"class","caret svelte-ilb1qs")},m(e,n){z(e,t,n)},d(e){e&&M(t)}}}function tr(i){let t,e=i[3].placeholder+"",n;return{c(){t=V("span"),n=Ee(e),b(t,"class","placeholder svelte-ilb1qs")},m(o,s){z(o,t,s),Q(t,n)},p(o,s){s&8&&e!==(e=o[3].placeholder+"")&&xe(n,e)},d(o){o&&M(t)}}}function Tp(i){let t,e,n,o;const s=[Sp,Lp,Dp],r=[];function a(l,c){return l[2]?0:l[4]?1:2}return e=a(i),n=r[e]=s[e](i),{c(){t=V("div"),n.c(),b(t,"class","text svelte-ilb1qs"),T(t,"max-width",typeof i[1]=="number"?ye(i[1]):i[1]),T(t,"-webkit-line-clamp",i[0])},m(l,c){z(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):(se(),S(r[d],1,1,()=>{r[d]=null}),re(),n=r[e],n?n.p(l,c):(n=r[e]=s[e](l),n.c()),k(n,1),n.m(t,null)),c&2&&T(t,"max-width",typeof l[1]=="number"?ye(l[1]):l[1]),c&1&&T(t,"-webkit-line-clamp",l[0])},i(l){o||(k(n),o=!0)},o(l){S(n),o=!1},d(l){l&&M(t),r[e].d()}}}function Mp(i,t,e){let n,{$$slots:o={},$$scope:s}=t,{maxLine:r=1}=t,{maxWidth:a=null}=t,{text:l=null}=t,{edit:c=null}=t;return i.$$set=d=>{"maxLine"in d&&e(0,r=d.maxLine),"maxWidth"in d&&e(1,a=d.maxWidth),"text"in d&&e(2,l=d.text),"edit"in d&&e(3,c=d.edit),"$$scope"in d&&e(5,s=d.$$scope)},i.$$.update=()=>{i.$$.dirty&8&&e(4,n=(c==null?void 0:c.placeholder)||(c==null?void 0:c.inputting))},[r,a,l,c,n,s,o]}class ho extends oe{constructor(t){super(),ie(this,t,Mp,Tp,ne,{maxLine:0,maxWidth:1,text:2,edit:3},xp)}}function zp(i){le(i,"svelte-1oxrkr1",".plane__container.svelte-1oxrkr1.svelte-1oxrkr1{position:absolute;left:50%;transform:translate(-50%, -100%);width:-moz-max-content;width:max-content}.plane__wrapper.svelte-1oxrkr1.svelte-1oxrkr1{transition:transform 500ms linear, opacity 200ms linear;padding:0.625rem;background-color:rgba(0, 0, 0, 0.5);border:0.03125rem solid rgba(255, 255, 255, 0.3);border-radius:0.25rem}.unfolded.svelte-1oxrkr1 .plane__wrapper.svelte-1oxrkr1{transition-delay:200ms, 500ms;opacity:1}.folded.svelte-1oxrkr1 .plane__wrapper.svelte-1oxrkr1{opacity:0}.plane.svelte-1oxrkr1.svelte-1oxrkr1{max-width:11.75rem}.title.svelte-1oxrkr1.svelte-1oxrkr1{white-space:pre-wrap;font-weight:bold;font-size:0.75rem;line-height:1.125rem}.description.svelte-1oxrkr1.svelte-1oxrkr1{margin-top:0.25rem;white-space:pre-wrap;font-size:0.6875rem;line-height:1rem}")}function nr(i){var f,u;let t,e,n,o,s,r,a,l,c;t=new fo({props:{unfolded:i[1],direction:"vertical",length:15,duration:500,inDelay:200,useLinearColor:!0}}),a=new ho({props:{text:i[2],edit:(f=i[0].data.edit)==null?void 0:f.title}});let d=(i[0].data.description||((u=i[0].data.edit)==null?void 0:u.description))&&ir(i);return{c(){$(t.$$.fragment),e=ee(),n=V("div"),o=V("div"),s=V("div"),r=V("div"),$(a.$$.fragment),l=ee(),d&&d.c(),b(r,"class","title svelte-1oxrkr1"),b(s,"class","plane svelte-1oxrkr1"),b(o,"class","plane__wrapper svelte-1oxrkr1"),T(o,"transform",i[1]?"translateY(-15px)":"translateY(0)"),b(n,"class","plane__container svelte-1oxrkr1"),te(n,"unfolded",i[1]),te(n,"folded",i[3])},m(h,p){q(t,h,p),z(h,e,p),z(h,n,p),Q(n,o),Q(o,s),Q(s,r),q(a,r,null),Q(s,l),d&&d.m(s,null),c=!0},p(h,p){var v,w;const A={};p&2&&(A.unfolded=h[1]),t.$set(A);const g={};p&4&&(g.text=h[2]),p&1&&(g.edit=(v=h[0].data.edit)==null?void 0:v.title),a.$set(g),h[0].data.description||((w=h[0].data.edit)==null?void 0:w.description)?d?(d.p(h,p),p&1&&k(d,1)):(d=ir(h),d.c(),k(d,1),d.m(s,null)):d&&(se(),S(d,1,1,()=>{d=null}),re()),p&2&&T(o,"transform",h[1]?"translateY(-15px)":"translateY(0)"),(!c||p&2)&&te(n,"unfolded",h[1]),(!c||p&8)&&te(n,"folded",h[3])},i(h){c||(k(t.$$.fragment,h),k(a.$$.fragment,h),k(d),c=!0)},o(h){S(t.$$.fragment,h),S(a.$$.fragment,h),S(d),c=!1},d(h){K(t,h),h&&M(e),h&&M(n),K(a),d&&d.d()}}}function ir(i){var o;let t,e,n;return e=new ho({props:{text:i[0].data.description,edit:(o=i[0].data.edit)==null?void 0:o.description,maxLine:3}}),{c(){t=V("div"),$(e.$$.fragment),b(t,"class","description svelte-1oxrkr1")},m(s,r){z(s,t,r),q(e,t,null),n=!0},p(s,r){var l;const a={};r&1&&(a.text=s[0].data.description),r&1&&(a.edit=(l=s[0].data.edit)==null?void 0:l.description),e.$set(a)},i(s){n||(k(e.$$.fragment,s),n=!0)},o(s){S(e.$$.fragment,s),n=!1},d(s){s&&M(t),K(e)}}}function Bp(i){let t,e,n=i[0].state&&nr(i);return{c(){n&&n.c(),t=fe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&k(n,1)):(n=nr(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(se(),S(n,1,1,()=>{n=null}),re())},i(o){e||(k(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function Vp(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,c;i.$$.dirty&1&&e(1,n=!!((a=r.state)!=null&&a.unfolded)),i.$$.dirty&2&&e(3,o=!n),i.$$.dirty&1&&e(2,s=(c=(l=r.data.title)!=null?l:r.data.text)!=null?c:"")},[r,n,s,o]}class jp extends oe{constructor(t){super(),ie(this,t,Vp,Bp,ne,{tag:0},zp)}}function Qp(i){let t,e;return t=new jp({props:{tag:i[0]}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.tag=n[0]),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function Rp(i){let t,e;return t=new kp({props:{tag:i[0]}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.tag=n[0]),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function Op(i){let t,e,n,o;const s=[Rp,Qp],r=[];function a(l,c){return l[1]==="line"?0:l[1]==="plane"?1:-1}return~(t=a(i))&&(e=r[t]=s[t](i)),{c(){e&&e.c(),n=fe()},m(l,c){~t&&r[t].m(l,c),z(l,n,c),o=!0},p(l,[c]){let d=t;t=a(l),t===d?~t&&r[t].p(l,c):(e&&(se(),S(r[d],1,1,()=>{r[d]=null}),re()),~t?(e=r[t],e?e.p(l,c):(e=r[t]=s[t](l),e.c()),k(e,1),e.m(n.parentNode,n)):e=null)},i(l){o||(k(e),o=!0)},o(l){S(e),o=!1},d(l){~t&&r[t].d(l),l&&M(n)}}}function Hp(i,t,e){let n,{tag:o}=t;return i.$$set=s=>{"tag"in s&&e(0,o=s.tag)},i.$$.update=()=>{var s;i.$$.dirty&1&&e(1,n=(s=o.data.appearance)!=null?s:"line")},[o,n]}class Fp extends oe{constructor(t){super(),ie(this,t,Hp,Op,ne,{tag:0})}}function Gp(i){le(i,"svelte-blgtit",".line.svelte-blgtit{width:100%;height:100%;overflow:visible;pointer-events:none}")}function or(i){let t,e,n,o;return{c(){t=Ae("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){z(s,t,r),o=!0},p(s,r){i=s},i(s){o||(s&&De(()=>{n&&n.end(1),e=Rt(t,Kn,{duration:i[1],delay:i[0],easing:wa}),e.start()}),o=!0)},o(s){e&&e.invalidate(),s&&(n=tn(t,Kn,{duration:i[1],delay:i[2],easing:Zt})),o=!1},d(s){s&&M(t),s&&n&&n.end()}}}function Np(i){let t,e,n,o,s,r=i[3]&&or(i);return{c(){t=Ae("svg"),e=Ae("defs"),n=Ae("linearGradient"),o=Ae("stop"),s=Ae("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-blgtit"),b(t,"viewBox","0 0 105 21")},m(a,l){z(a,t,l),Q(t,e),Q(e,n),Q(n,o),Q(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&&(se(),S(r,1,1,()=>{r=null}),re())},i(a){k(r)},o(a){S(r)},d(a){a&&M(t),r&&r.d()}}}function Wp(i,t,e){let{inDelay:n=0}=t,{duration:o=1e3}=t,{outDelay:s=0}=t,{unfolded:r}=t;const a=He();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 _p extends oe{constructor(t){super(),ie(this,t,Wp,Np,ne,{inDelay:0,duration:1,outDelay:2,unfolded:3},Gp)}}function Vt(i){return typeof i=="object"&&i!==null&&i.constructor&&Object.prototype.toString.call(i).slice(8,-1)==="Object"}function pt(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]:Vt(t[n])&&Vt(i[n])&&Object.keys(t[n]).length>0?t[n].__swiper__?i[n]=t[n]:pt(i[n],t[n]):i[n]=t[n]})}function Ni(i={}){return i.navigation&&typeof i.navigation.nextEl=="undefined"&&typeof i.navigation.prevEl=="undefined"}function Wi(i={}){return i.pagination&&typeof i.pagination.el=="undefined"}function _i(i={}){return i.scrollbar&&typeof i.scrollbar.el=="undefined"}function ei(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 nl=["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 Xp(i={},t=!0){const e={on:{}},n={},o={};pt(e,Bi.default.defaults),pt(e,Bi.default.extendedDefaults),e._emitClasses=!0,e.init=!1;const s={},r=nl.map(l=>l.replace(/_/,"")),a=Object.assign({},i);return Object.keys(a).forEach(l=>{typeof i[l]!="undefined"&&(r.indexOf(l)>=0?Vt(i[l])?(e[l]={},o[l]={},pt(e[l],i[l]),pt(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 Yp({el:i,nextEl:t,prevEl:e,paginationEl:n,scrollbarEl:o,swiper:s},r){Ni(r)&&t&&e&&(s.params.navigation.nextEl=t,s.originalParams.navigation.nextEl=t,s.params.navigation.prevEl=e,s.originalParams.navigation.prevEl=e),Wi(r)&&n&&(s.params.pagination.el=n,s.originalParams.pagination.el=n),_i(r)&&o&&(s.params.scrollbar.el=o,s.originalParams.scrollbar.el=o),s.init(i)}function Up(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 nl.filter(l=>l[0]==="_").map(l=>l.replace(/_/,"")).forEach(l=>{if(l in i&&l in t)if(Vt(i[l])&&Vt(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 Jp({swiper:i,slides:t,passedParams:e,changedParams:n,nextEl:o,prevEl:s,scrollbarEl:r,paginationEl:a}){const l=n.filter(I=>I!=="children"&&I!=="direction"),{params:c,pagination:d,navigation:f,scrollbar:u,virtual:h,thumbs:p}=i;let A,g,v,w,y;n.includes("thumbs")&&e.thumbs&&e.thumbs.swiper&&c.thumbs&&!c.thumbs.swiper&&(A=!0),n.includes("controller")&&e.controller&&e.controller.control&&c.controller&&!c.controller.control&&(g=!0),n.includes("pagination")&&e.pagination&&(e.pagination.el||a)&&(c.pagination||c.pagination===!1)&&d&&!d.el&&(v=!0),n.includes("scrollbar")&&e.scrollbar&&(e.scrollbar.el||r)&&(c.scrollbar||c.scrollbar===!1)&&u&&!u.el&&(w=!0),n.includes("navigation")&&e.navigation&&(e.navigation.prevEl||s)&&(e.navigation.nextEl||o)&&(c.navigation||c.navigation===!1)&&f&&!f.prevEl&&!f.nextEl&&(y=!0);const P=I=>{!i[I]||(i[I].destroy(),I==="navigation"?(c[I].prevEl=void 0,c[I].nextEl=void 0,i[I].prevEl=void 0,i[I].nextEl=void 0):(c[I].el=void 0,i[I].el=void 0))};l.forEach(I=>{if(Vt(c[I])&&Vt(e[I]))pt(c[I],e[I]);else{const C=e[I];(C===!0||C===!1)&&(I==="navigation"||I==="pagination"||I==="scrollbar")?C===!1&&P(I):c[I]=e[I]}}),l.includes("controller")&&!g&&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(),A&&p.init()&&p.update(!0),g&&(i.controller.control=c.controller.control),v&&(a&&(c.pagination.el=a),d.init(),d.render(),d.update()),w&&(r&&(c.scrollbar.el=r),u.init(),u.updateSize(),u.setTranslate()),y&&(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 Zp=i=>({virtualData:i&512}),sr=i=>({virtualData:i[9]}),qp=i=>({virtualData:i&512}),rr=i=>({virtualData:i[9]}),Kp=i=>({virtualData:i&512}),ar=i=>({virtualData:i[9]}),$p=i=>({virtualData:i&512}),lr=i=>({virtualData:i[9]}),eg=i=>({virtualData:i&512}),cr=i=>({virtualData:i[9]});function dr(i){let t,e,n;return{c(){t=V("div"),e=ee(),n=V("div"),b(t,"class","swiper-button-prev"),b(n,"class","swiper-button-next")},m(o,s){z(o,t,s),i[13](t),z(o,e,s),z(o,n,s),i[14](n)},p:Z,d(o){o&&M(t),i[13](null),o&&M(e),o&&M(n),i[14](null)}}}function ur(i){let t;return{c(){t=V("div"),b(t,"class","swiper-scrollbar")},m(e,n){z(e,t,n),i[15](t)},p:Z,d(e){e&&M(t),i[15](null)}}}function fr(i){let t;return{c(){t=V("div"),b(t,"class","swiper-pagination")},m(e,n){z(e,t,n),i[16](t)},p:Z,d(e){e&&M(t),i[16](null)}}}function tg(i){let t,e,n,o,s,r,a=Ni(i[2]),l,c=_i(i[2]),d,f=Wi(i[2]),u,h,p;const A=i[12]["container-start"],g=it(A,i,i[11],cr),v=i[12]["wrapper-start"],w=it(v,i,i[11],lr),y=i[12].default,P=it(y,i,i[11],ar),I=i[12]["wrapper-end"],C=it(I,i,i[11],rr);let L=a&&dr(i),D=c&&ur(i),B=f&&fr(i);const N=i[12]["container-end"],F=it(N,i,i[11],sr);let X=[{class:h=ei(`${i[1]}${i[0]?` ${i[0]}`:""}`)},i[3]],j={};for(let E=0;E<X.length;E+=1)j=we(j,X[E]);return{c(){t=V("div"),g&&g.c(),e=ee(),n=V("div"),w&&w.c(),o=ee(),P&&P.c(),s=ee(),C&&C.c(),r=ee(),L&&L.c(),l=ee(),D&&D.c(),d=ee(),B&&B.c(),u=ee(),F&&F.c(),b(n,"class","swiper-wrapper"),Wn(t,j)},m(E,R){z(E,t,R),g&&g.m(t,null),Q(t,e),Q(t,n),w&&w.m(n,null),Q(n,o),P&&P.m(n,null),Q(n,s),C&&C.m(n,null),Q(t,r),L&&L.m(t,null),Q(t,l),D&&D.m(t,null),Q(t,d),B&&B.m(t,null),Q(t,u),F&&F.m(t,null),i[17](t),p=!0},p(E,[R]){g&&g.p&&(!p||R&2560)&&st(g,A,E,E[11],p?ot(A,E[11],R,eg):rt(E[11]),cr),w&&w.p&&(!p||R&2560)&&st(w,v,E,E[11],p?ot(v,E[11],R,$p):rt(E[11]),lr),P&&P.p&&(!p||R&2560)&&st(P,y,E,E[11],p?ot(y,E[11],R,Kp):rt(E[11]),ar),C&&C.p&&(!p||R&2560)&&st(C,I,E,E[11],p?ot(I,E[11],R,qp):rt(E[11]),rr),R&4&&(a=Ni(E[2])),a?L?L.p(E,R):(L=dr(E),L.c(),L.m(t,l)):L&&(L.d(1),L=null),R&4&&(c=_i(E[2])),c?D?D.p(E,R):(D=ur(E),D.c(),D.m(t,d)):D&&(D.d(1),D=null),R&4&&(f=Wi(E[2])),f?B?B.p(E,R):(B=fr(E),B.c(),B.m(t,u)):B&&(B.d(1),B=null),F&&F.p&&(!p||R&2560)&&st(F,N,E,E[11],p?ot(N,E[11],R,Zp):rt(E[11]),sr),Wn(t,j=Be(X,[(!p||R&3&&h!==(h=ei(`${E[1]}${E[0]?` ${E[0]}`:""}`)))&&{class:h},R&8&&E[3]]))},i(E){p||(k(g,E),k(w,E),k(P,E),k(C,E),k(F,E),p=!0)},o(E){S(g,E),S(w,E),S(P,E),S(C,E),S(F,E),p=!1},d(E){E&&M(t),g&&g.d(E),w&&w.d(E),P&&P.d(E),C&&C.d(E),L&&L.d(),D&&D.d(),B&&B.d(),F&&F.d(E),i[17](null)}}}function ng(i,t,e){const n=["class","swiper"];let o=Nn(t,n),{$$slots:s={},$$scope:r}=t;const a=oi();let{class:l=void 0}=t,c="swiper",d=!1,f=null,u=null,h,p,A,g,v=null,w=null,y=null,P=null,I=null,C={slides:[]};function L(){return f}const D=O=>{e(9,C=O),bc().then(()=>{f.$wrapperEl.children(".swiper-slide").each(W=>{W.onSwiper&&W.onSwiper(f)}),f.updateSlides(),f.updateProgress(),f.updateSlidesClasses(),f.lazy&&f.params.lazy.enabled&&f.lazy.load()})},B=()=>{h=Xp(o),e(2,p=h.params),A=h.passedParams,e(3,g=h.rest)};B(),u=A;const N=()=>{d=!0};if(p.onAny=(O,...W)=>{a(O,W)},Object.assign(p.on,{_beforeBreakpoint:N,_containerClasses(O,W){e(1,c=W)}}),f=new Bi.default(p),Un("swiper",f),f.virtual&&f.params.virtual.enabled){const O={cache:!1,renderExternal:W=>{D(W),p.virtual&&p.virtual.renderExternal&&p.virtual.renderExternal(W)},renderExternalUpdate:!1};pt(f.params.virtual,O),pt(f.originalParams.virtual,O)}Ze(()=>{!v||(Yp({el:v,nextEl:y,prevEl:w,paginationEl:I,scrollbarEl:P,swiper:f},p),a("swiper",[f]),!p.virtual&&f.slides.each(O=>{O.onSwiper&&O.onSwiper(f)}))}),Ki(()=>{if(!f)return;B();const O=Up(A,u);(O.length||d)&&f&&!f.destroyed&&Jp({swiper:f,passedParams:A,changedParams:O,nextEl:y,prevEl:w,scrollbarEl:P,paginationEl:I}),d=!1,u=A}),It(()=>{typeof window!="undefined"&&f&&!f.destroyed&&f.destroy(!0,!1)});function F(O){Le[O?"unshift":"push"](()=>{w=O,e(5,w)})}function X(O){Le[O?"unshift":"push"](()=>{y=O,e(6,y)})}function j(O){Le[O?"unshift":"push"](()=>{P=O,e(7,P)})}function E(O){Le[O?"unshift":"push"](()=>{I=O,e(8,I)})}function R(O){Le[O?"unshift":"push"](()=>{v=O,e(4,v)})}return i.$$set=O=>{t=we(we({},t),aa(O)),e(27,o=Nn(t,n)),"class"in O&&e(0,l=O.class),"$$scope"in O&&e(11,r=O.$$scope)},[l,c,p,g,v,w,y,P,I,C,L,r,s,F,X,j,E,R]}class ig extends oe{constructor(t){super(),ie(this,t,ng,tg,ne,{class:0,swiper:10})}get swiper(){return this.$$.ctx[10]}}const og=i=>({data:i&32}),hr=i=>({data:i[5]}),sg=i=>({data:i&32}),mr=i=>({data:i[5]});function rg(i){let t;const e=i[8].default,n=it(e,i,i[7],hr);return{c(){n&&n.c()},m(o,s){n&&n.m(o,s),t=!0},p(o,s){n&&n.p&&(!t||s&160)&&st(n,e,o,o[7],t?ot(e,o[7],s,og):rt(o[7]),hr)},i(o){t||(k(n,o),t=!0)},o(o){S(n,o),t=!1},d(o){n&&n.d(o)}}}function ag(i){let t,e,n;const o=i[8].default,s=it(o,i,i[7],mr);return{c(){t=V("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){z(r,t,a),s&&s.m(t,null),n=!0},p(r,a){s&&s.p&&(!n||a&160)&&st(s,o,r,r[7],n?ot(o,r[7],a,sg):rt(r[7]),mr),(!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){S(s,r),n=!1},d(r){r&&M(t),s&&s.d(r)}}}function lg(i){let t,e,n,o,s;const r=[ag,rg],a=[];function l(f,u){return f[0]?0:1}e=l(i),n=a[e]=r[e](i);let c=[{class:o=ei(`${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=we(d,c[f]);return{c(){t=V("div"),n.c(),Wn(t,d)},m(f,u){z(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):(se(),S(a[h],1,1,()=>{a[h]=null}),re(),n=a[e],n?n.p(f,u):(n=a[e]=r[e](f),n.c()),k(n,1),n.m(t,null)),Wn(t,d=Be(c,[(!s||u&12&&o!==(o=ei(`${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){S(n),s=!1},d(f){f&&M(t),a[e].d(),i[9](null)}}}function cg(i,t,e){let n;const o=["zoom","virtualIndex","class"];let s=Nn(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=ct("swiper"),p=!1;const A=(y,P,I)=>{P===f&&e(3,u=I)},g=()=>{!h||p||(h.on("_slideClass",A),p=!0)},v=()=>{!h||(h.off("_slideClass",A),p=!1)};Ze(()=>{typeof c!="undefined"&&(e(4,f.onSwiper=y=>{h=y,g()},f),g())}),Ki(()=>{if(!(!f||!h)){if(h.destroyed){u!=="swiper-slide"&&e(3,u="swiper-slide");return}g()}}),qi(()=>{g()}),It(()=>{!h||v()});function w(y){Le[y?"unshift":"push"](()=>{f=y,e(4,f)})}return i.$$set=y=>{t=we(we({},t),aa(y)),e(6,s=Nn(t,o)),"zoom"in y&&e(0,l=y.zoom),"virtualIndex"in y&&e(1,c=y.virtualIndex),"class"in y&&e(2,d=y.class),"$$scope"in y&&e(7,a=y.$$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,w]}class dg extends oe{constructor(t){super(),ie(this,t,cg,lg,ne,{zoom:0,virtualIndex:1,class:2})}}function ug(i){le(i,"svelte-q6hk4f",".media-item.svelte-q6hk4f.svelte-q6hk4f{height:100%}.media-content.svelte-q6hk4f.svelte-q6hk4f{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-q6hk4f.svelte-q6hk4f{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-q6hk4f.svelte-q6hk4f{display:none;pointer-events:auto;position:absolute;width:100%;height:100%;top:0;left:0;transform:translate3d(0, 0, 0)}.video-play-button-container.showPlayButton.svelte-q6hk4f.svelte-q6hk4f{display:block}.video-icon.large.svelte-q6hk4f.svelte-q6hk4f{width:12.5rem;height:6.25rem}.video-icon.small.svelte-q6hk4f.svelte-q6hk4f{width:1.75rem;height:1.75rem}.video-icon.svelte-q6hk4f .video-icon-img.svelte-q6hk4f{width:100%;height:100%;background-position:center center;background-size:contain;background-repeat:no-repeat}.video-icon.svelte-q6hk4f .video-icon-img.canPlay.svelte-q6hk4f{cursor:pointer}")}function pr(i){let t;function e(s,r){if(s[1].type==="Image")return hg;if(s[1].type==="Video")return fg}let n=e(i),o=n&&n(i);return{c(){t=V("div"),o&&o.c(),b(t,"class","media-item svelte-q6hk4f")},m(s,r){z(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&&M(t),o&&o.d()}}}function fg(i){let t,e,n,o,s,r;function a(d,f){return d[6]&&d[1].videoCoverUrl?pg:mg}let l=a(i),c=l(i);return{c(){c.c(),t=ee(),e=V("div"),n=V("div"),o=V("div"),b(o,"class","video-icon-img svelte-q6hk4f"),T(o,"background-image","url("+i[14]()+")"),te(o,"canPlay",i[4]),b(n,"class","video-icon svelte-q6hk4f"),te(n,"large",i[3]==="large"),te(n,"small",i[3]==="small"),b(e,"class","video-play-button-container svelte-q6hk4f"),te(e,"showPlayButton",i[8])},m(d,f){c.m(d,f),z(d,t,f),z(d,e,f),Q(e,n),Q(n,o),s||(r=Se(o,"click",i[15]),s=!0)},p(d,f){l===(l=a(d))&&c?c.p(d,f):(c.d(1),c=l(d),c&&(c.c(),c.m(t.parentNode,t))),f&4&&T(o,"background-image","url("+d[14]()+")"),f&16&&te(o,"canPlay",d[4]),f&8&&te(n,"large",d[3]==="large"),f&8&&te(n,"small",d[3]==="small"),f&256&&te(e,"showPlayButton",d[8])},d(d){c.d(d),d&&M(t),d&&M(e),s=!1,r()}}}function hg(i){let t,e,n,o;return{c(){t=V("img"),b(t,"class","media-content svelte-q6hk4f"),b(t,"style",e=`object-fit: ${i[5]};`),Ne(t.src,n=i[1].url)||b(t,"src",n),b(t,"alt",o=i[1].name)},m(s,r){z(s,t,r)},p(s,r){r&32&&e!==(e=`object-fit: ${s[5]};`)&&b(t,"style",e),r&2&&!Ne(t.src,n=s[1].url)&&b(t,"src",n),r&2&&o!==(o=s[1].name)&&b(t,"alt",o)},d(s){s&&M(t)}}}function mg(i){let t,e,n,o,s,r,a;return{c(){t=V("video"),b(t,"class","media-content svelte-q6hk4f"),b(t,"style",e=`object-fit: ${i[5]};`),Ne(t.src,n=i[1].videoCoverUrl?i[1].url:i[1].url+"#t=0.1")||b(t,"src",n),b(t,"poster",o=i[1].videoCoverUrl),b(t,"preload",s=i[1].videoCoverUrl?"none":"auto"),t.playsInline=!0,b(t,"paused",""),t.muted=!0,t.loop=!1,b(t,"crossorigin",""),t.controls=!1,te(t,"showPlayButton",i[8]),T(t,"position","relative")},m(l,c){z(l,t,c),i[13](t),r||(a=Se(t,"click",i[12]),r=!0)},p(l,c){c&32&&e!==(e=`object-fit: ${l[5]};`)&&b(t,"style",e),c&2&&!Ne(t.src,n=l[1].videoCoverUrl?l[1].url:l[1].url+"#t=0.1")&&b(t,"src",n),c&2&&o!==(o=l[1].videoCoverUrl)&&b(t,"poster",o),c&2&&s!==(s=l[1].videoCoverUrl?"none":"auto")&&b(t,"preload",s),c&256&&te(t,"showPlayButton",l[8])},d(l){l&&M(t),i[13](null),r=!1,a()}}}function pg(i){let t,e,n,o;return{c(){t=V("img"),b(t,"class","media-content svelte-q6hk4f"),b(t,"style",e=`object-fit: ${i[5]};`),Ne(t.src,n=i[1].videoCoverUrl)||b(t,"src",n),b(t,"alt",o=i[1].name)},m(s,r){z(s,t,r)},p(s,r){r&32&&e!==(e=`object-fit: ${s[5]};`)&&b(t,"style",e),r&2&&!Ne(t.src,n=s[1].videoCoverUrl)&&b(t,"src",n),r&2&&o!==(o=s[1].name)&&b(t,"alt",o)},d(s){s&&M(t)}}}function gg(i){let t,e=i[1]&&pr(i);return{c(){e&&e.c(),t=fe()},m(n,o){e&&e.m(n,o),z(n,t,o)},p(n,[o]){n[1]?e?e.p(n,o):(e=pr(n),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},i:Z,o:Z,d(n){e&&e.d(n),n&&M(t)}}}function Ag(i,t,e){let{tag:n}=t,{media:o}=t,{playButtonIfNeed:s="withoutText"}=t,{playButtonSizeIfNeed:r="small"}=t,{canPlay:a=!0}=t,{objectFit:l="cover"}=t,{disableVideoIfHavePoster:c=!1}=t,d=(o==null?void 0:o.type)==="Video"&&Boolean(o==null?void 0:o.videoCoverUrl),f,u=!1;const h=ct("mediaStore"),p=ct("hooks"),A=()=>{d||(f==null||f.play(),f==null||f.pause(),e(11,d=!0))};p.on("loadVideoFirstFrame",A);const g=P=>{f&&(f.pause(),p.emit("playStateChange",{event:P,state:"paused",tag:n,mediaInstance:f}))};function v(P){Le[P?"unshift":"push"](()=>{f=P,e(7,f)})}const w=()=>s==="withText"?fp:s==="withoutText"?hp:s,y=P=>{!a||f&&(e(7,f.muted=!1,f),f.play(),h.set({currentMediaElement:f}),p.emit("playStateChange",{event:P,state:"playing",tag:n,mediaInstance:f}))};return i.$$set=P=>{"tag"in P&&e(0,n=P.tag),"media"in P&&e(1,o=P.media),"playButtonIfNeed"in P&&e(2,s=P.playButtonIfNeed),"playButtonSizeIfNeed"in P&&e(3,r=P.playButtonSizeIfNeed),"canPlay"in P&&e(4,a=P.canPlay),"objectFit"in P&&e(5,l=P.objectFit),"disableVideoIfHavePoster"in P&&e(6,c=P.disableVideoIfHavePoster)},i.$$.update=()=>{if(i.$$.dirty&128&&f&&(e(8,u=f.paused),f.addEventListener("play",()=>{e(8,u=!1)}),f.addEventListener("pause",()=>{e(8,u=!0)}),h.subscribe(({currentMediaElement:P})=>{P!==f&&(f==null||f.pause())})),i.$$.dirty&2178&&(o==null?void 0:o.type)==="Video"&&!d){const P=navigator.userAgent.toLowerCase().indexOf("micromessenger")!==-1,C=navigator.userAgent.toLowerCase().indexOf("iphone")!==-1&&P;f&&C&&f.paused&&(document.removeEventListener("WeixinJSBridgeReady",A),document.removeEventListener("touchstart",A),document.removeEventListener("click",A),document.addEventListener("WeixinJSBridgeReady",A),document.addEventListener("touchstart",A),document.addEventListener("click",A))}},[n,o,s,r,a,l,c,f,u,h,p,d,g,v,w,y]}class il extends oe{constructor(t){super(),ie(this,t,Ag,gg,ne,{tag:0,media:1,playButtonIfNeed:2,playButtonSizeIfNeed:3,canPlay:4,objectFit:5,disableVideoIfHavePoster:6},ug)}}function vg(i){le(i,"svelte-ai0lv9",".media.svelte-ai0lv9{width:100%;height:100%;position:relative;overflow:hidden;border-radius:0.125rem}")}function gr(i,t,e){const n=i.slice();return n[22]=t[e],n}function Ar(i){let t,e,n,o,s,r;const a=[yg,bg],l=[];function c(d,f){return d[12]?0:1}return e=c(i),n=l[e]=a[e](i),{c(){t=V("div"),n.c(),b(t,"class","media svelte-ai0lv9"),te(t,"unfolded",i[5])},m(d,f){z(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):(se(),S(l[u],1,1,()=>{l[u]=null}),re(),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&32)&&te(t,"unfolded",i[5])},i(d){r||(k(n),d&&De(()=>{s&&s.end(1),o=Rt(t,Bo,i[6]?{y:4,duration:i[4],delay:i[2],easing:yt}:void 0),o.start()}),r=!0)},o(d){S(n),o&&o.invalidate(),d&&(s=tn(t,Bo,i[6]?{y:4,duration:i[4],delay:i[3],easing:yt}:void 0)),r=!1},d(d){d&&M(t),l[e].d(),d&&s&&s.end()}}}function bg(i){let t,e;const n=[{media:i[1][0]},i[7],{tag:i[0]}];let o={};for(let s=0;s<n.length;s+=1)o=we(o,n[s]);return t=new il({props:o}),{c(){$(t.$$.fragment)},m(s,r){q(t,s,r),e=!0},p(s,r){const a=r&131?Be(n,[r&2&&{media:s[1][0]},r&128&&ya(s[7]),r&1&&{tag:s[0]}]):{};t.$set(a)},i(s){e||(k(t.$$.fragment,s),e=!0)},o(s){S(t.$$.fragment,s),e=!1},d(s){K(t,s)}}}function yg(i){let t,e;return t=new ig({props:{style:"height: 100%",modules:[Zr.Autoplay],spaceBetween:30,autoplay:i[13]?Te({delay:4e3,stopOnLastSlide:!1,disableOnInteraction:!1}):!1,loop:!0,$$slots:{default:[Cg]},$$scope:{ctx:i}}}),t.$on("init",i[20]),t.$on("slideChange",i[21]),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&8192&&(s.autoplay=n[13]?Te({delay:4e3,stopOnLastSlide:!1,disableOnInteraction:!1}):!1),o&33555585&&(s.$$scope={dirty:o,ctx:n}),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function wg(i){let t,e,n;const o=[i[7],{media:i[22]},{tag:i[0]}];let s={};for(let r=0;r<o.length;r+=1)s=we(s,o[r]);return t=new il({props:s}),{c(){$(t.$$.fragment),e=ee()},m(r,a){q(t,r,a),z(r,e,a),n=!0},p(r,a){const l=a&1153?Be(o,[a&128&&ya(r[7]),a&1024&&{media:r[22]},a&1&&{tag:r[0]}]):{};t.$set(l)},i(r){n||(k(t.$$.fragment,r),n=!0)},o(r){S(t.$$.fragment,r),n=!1},d(r){K(t,r),r&&M(e)}}}function vr(i){let t,e;return t=new i[14]({props:{$$slots:{default:[wg]},$$scope:{ctx:i}}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&33555585&&(s.$$scope={dirty:o,ctx:n}),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function Cg(i){let t,e,n=i[10],o=[];for(let r=0;r<n.length;r+=1)o[r]=vr(gr(i,n,r));const s=r=>S(o[r],1,1,()=>{o[r]=null});return{c(){for(let r=0;r<o.length;r+=1)o[r].c();t=fe()},m(r,a){for(let l=0;l<o.length;l+=1)o[l].m(r,a);z(r,t,a),e=!0},p(r,a){if(a&1153){n=r[10];let l;for(l=0;l<n.length;l+=1){const c=gr(r,n,l);o[l]?(o[l].p(c,a),k(o[l],1)):(o[l]=vr(c),o[l].c(),k(o[l],1),o[l].m(t.parentNode,t))}for(se(),l=n.length;l<o.length;l+=1)s(l);re()}},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)S(o[a]);e=!1},d(r){lt(o,r),r&&M(t)}}}function Eg(i){let t,e,n=i[5]&&Ar(i);return{c(){n&&n.c(),t=fe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[5]?n?(n.p(o,s),s&32&&k(n,1)):(n=Ar(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(se(),S(n,1,1,()=>{n=null}),re())},i(o){e||(k(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function Pg(i,t,e){let n,o,s;const r=Te(dg);let{tag:a}=t,{mediaData:l}=t,{inDelay:c=0}=t,{outDelay:d=0}=t,{duration:f=0}=t,{unfolded:u=!0}=t,{animation:h=!0}=t,{mediaItemConfig:p}=t,{enableCarousel:A=!0}=t,{autoplayConfig:g={autoplay:!0,autoplayVideo:!1}}=t;const v=ct("mediaStore"),w=ct("hooks");let y;function P(B){!n||!y||(v.set({currentMediaElement:this}),w.emit("playStateChange",{event:B,state:"playing",tag:a,mediaInstance:this}),y.autoplay.stop())}function I(B){!n||!y||(w.emit("playStateChange",{event:B,state:"paused",tag:a,mediaInstance:this}),y.autoplay.running||y.autoplay.start())}let C=null;const L=B=>{e(9,y=B.detail[0])},D=B=>Y(this,null,function*(){var R,O,W;if(!s||!g.autoplayVideo)return;const N=B.detail[0];if(!N)return;const F=N.realIndex;if(F===C)return;e(11,C=F);const X=o[F];if(!X||X.type!=="Video")return;N.autoplay.stop(),N.slides.map(U=>U.querySelector("video")).filter(We).forEach(U=>U.pause());const E=(R=N.slides[N.activeIndex])==null?void 0:R.querySelector("video");if(E&&(E.removeEventListener("play",P),E.removeEventListener("pause",I),E.addEventListener("play",P),E.addEventListener("pause",I)),E){E.addEventListener("click",()=>E.pause());const U=(W=(O=E.parentElement)==null?void 0:O.getElementsByClassName("video-play-button-container"))==null?void 0:W[0];E.addEventListener("play",()=>U==null?void 0:U.classList.remove("showPlayButton")),E.addEventListener("pause",()=>U==null?void 0:U.classList.add("showPlayButton")),U&&(E.paused?U.classList.add("showPlayButton"):U.classList.remove("showPlayButton"),U.addEventListener("click",_=>{E.muted=!1,E.play(),v.set({currentMediaElement:E}),w.emit("playStateChange",{event:_,state:"playing",tag:a,mediaInstance:E})}))}});return i.$$set=B=>{"tag"in B&&e(0,a=B.tag),"mediaData"in B&&e(1,l=B.mediaData),"inDelay"in B&&e(2,c=B.inDelay),"outDelay"in B&&e(3,d=B.outDelay),"duration"in B&&e(4,f=B.duration),"unfolded"in B&&e(5,u=B.unfolded),"animation"in B&&e(6,h=B.animation),"mediaItemConfig"in B&&e(7,p=B.mediaItemConfig),"enableCarousel"in B&&e(19,A=B.enableCarousel),"autoplayConfig"in B&&e(8,g=B.autoplayConfig)},i.$$.update=()=>{i.$$.dirty&524290&&e(12,n=A&&(l==null?void 0:l.length)>1),i.$$.dirty&2&&e(10,o=l),i.$$.dirty&1280&&e(13,s=o.length>1&&g.autoplay),i.$$.dirty&512&&y&&y.slides.forEach(B=>{const N=B.querySelector("video");N&&v.subscribe(({currentMediaElement:F})=>{F!==N&&N.pause()})})},[a,l,c,d,f,u,h,p,g,y,o,C,n,s,r,v,w,P,I,A,L,D]}class ol extends oe{constructor(t){super(),ie(this,t,Pg,Eg,ne,{tag:0,mediaData:1,inDelay:2,outDelay:3,duration:4,unfolded:5,animation:6,mediaItemConfig:7,enableCarousel:19,autoplayConfig:8},vg)}}function Ig(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 br(i){let t,e,n,o,s,r,a,l;t=new Ke({props:{visible:i[3],left:61,bottom:57,width:2,blurRadius:150,spreadRadius:75}}),o=new _p({props:{unfolded:i[3],outDelay:400}});let c=i[2]&&yr(i),d=i[1]&&wr(i);return{c(){$(t.$$.fragment),e=ee(),n=V("div"),$(o.$$.fragment),s=ee(),c&&c.c(),r=ee(),d&&d.c(),a=fe(),b(n,"class","line svelte-1f7m1lj")},m(f,u){q(t,f,u),z(f,e,u),z(f,n,u),q(o,n,null),z(f,s,u),c&&c.m(f,u),z(f,r,u),d&&d.m(f,u),z(f,a,u),l=!0},p(f,u){const h={};u&8&&(h.visible=f[3]),t.$set(h);const p={};u&8&&(p.unfolded=f[3]),o.$set(p),f[2]?c?(c.p(f,u),u&4&&k(c,1)):(c=yr(f),c.c(),k(c,1),c.m(r.parentNode,r)):c&&(se(),S(c,1,1,()=>{c=null}),re()),f[1]?d?(d.p(f,u),u&2&&k(d,1)):(d=wr(f),d.c(),k(d,1),d.m(a.parentNode,a)):d&&(se(),S(d,1,1,()=>{d=null}),re())},i(f){l||(k(t.$$.fragment,f),k(o.$$.fragment,f),k(c),k(d),l=!0)},o(f){S(t.$$.fragment,f),S(o.$$.fragment,f),S(c),S(d),l=!1},d(f){K(t,f),f&&M(e),f&&M(n),K(o),f&&M(s),c&&c.d(f),f&&M(r),d&&d.d(f),f&&M(a)}}}function yr(i){let t,e,n;return e=new el({props:{unfolded:i[3],content:i[2],inDelay:500}}),{c(){t=V("div"),$(e.$$.fragment),b(t,"class","text svelte-1f7m1lj")},m(o,s){z(o,t,s),q(e,t,null),n=!0},p(o,s){const r={};s&8&&(r.unfolded=o[3]),s&4&&(r.content=o[2]),e.$set(r)},i(o){n||(k(e.$$.fragment,o),n=!0)},o(o){S(e.$$.fragment,o),n=!1},d(o){o&&M(t),K(e)}}}function wr(i){let t,e,n;return e=new ol({props:{autoplayConfig:{autoplay:!1},unfolded:i[3],mediaData:i[1],tag:i[0],enableCarousel:!1,mediaItemConfig:{canPlay:!1,playButtonSizeIfNeed:"small",disableVideoIfHavePoster:!0},inDelay:500,duration:500}}),{c(){t=V("div"),$(e.$$.fragment),b(t,"class","media-wrapper svelte-1f7m1lj")},m(o,s){z(o,t,s),q(e,t,null),n=!0},p(o,s){const r={};s&8&&(r.unfolded=o[3]),s&2&&(r.mediaData=o[1]),s&1&&(r.tag=o[0]),e.$set(r)},i(o){n||(k(e.$$.fragment,o),n=!0)},o(o){S(e.$$.fragment,o),n=!1},d(o){o&&M(t),K(e)}}}function kg(i){let t,e,n=i[0].state&&br(i);return{c(){n&&n.c(),t=fe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&k(n,1)):(n=br(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(se(),S(n,1,1,()=>{n=null}),re())},i(o){e||(k(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function xg(i,t,e){let n,o,s,r,{tag:a}=t;return i.$$set=l=>{"tag"in l&&e(0,a=l.tag)},i.$$.update=()=>{var l,c,d;i.$$.dirty&1&&e(3,n=a.state?a.state.unfolded:!1),i.$$.dirty&1&&e(4,o=(c=(l=a.data.title)!=null?l:a.data.text)!=null?c:""),i.$$.dirty&16&&e(2,s=((d=o.length)!=null?d:0)>7?o.substring(0,6)+"...":o),i.$$.dirty&1&&e(1,r=a.data.mediaData)},[a,r,s,n,o]}class Dg extends oe{constructor(t){super(),ie(this,t,xg,kg,ne,{tag:0},Ig)}}class Xi{constructor(t=0,e=0){m(this,"min");m(this,"max");m(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 Lg{constructor(t,e){m(this,"min");m(this,"max");m(this,"xInterval");m(this,"yInterval");m(this,"isRectangle",!0);this.min=t,this.max=e,this.xInterval=new Xi(this.min.x,this.max.x),this.yInterval=new Xi(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 zn(i,t,e){const n=i[t],o=i[e];!n||!o||(i[t]=o,i[e]=n)}function Sg(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;zn(i,a*4+0,l*4+0),zn(i,a*4+1,l*4+1),zn(i,a*4+2,l*4+2),zn(i,a*4+3,l*4+3)}}}class sl{constructor(t,e){m(this,"width");m(this,"height");m(this,"containerDom");m(this,"hooks",new be.Subscribe);m(this,"canvas",document.createElement("canvas"));m(this,"five");m(this,"scale");m(this,"config");m(this,"offset",{x:0,y:0});m(this,"context");m(this,"renderCenter",new x.Vector3);m(this,"hammer");m(this,"state",{enabled:!1});m(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)`});m(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 gn.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 x.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),p=Math.floor(n*a),A=Math.floor(o*a);Sg(h,p,A);const g=new ImageData(p,A);g.data.set(h),e.putImageData(g,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 Tg(i,t){const{offsetWidth:e,offsetHeight:n}=t,{top:o,left:s}=t.getBoundingClientRect();return new x.Vector2().set((i.x-s)/e*2-1,-(i.y-o)/n*2+1)}function rl(i,t){const{offsetWidth:e,offsetHeight:n}=t;return new x.Vector2().set(i.x/e*2-1,-i.y/n*2+1)}function Mg(i,t){const e=i.getElement();if(!e)return;const n=rl(t,e),o=new x.Raycaster;return o.setFromCamera(n,i.camera),o}function zg(i,t){const{x:e,y:n}=t,o=e*2-1,s=n*2-1,r=new x.Vector2().fromArray([o,s]),a=new x.Raycaster;return a.setFromCamera(r,i.camera),i.model.intersectRaycaster(a)[0]}const Bg="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAbYAAAGwCAYAAADFUEBtAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAABtqADAAQAAAABAAABsAAAAABTZ8U6AAAtiklEQVR4Ae2dAXJbSbJdp+d7AfYSHOGVeAPek5fkNXgLjviLmRkZl+CRbtc8UBKRRalZpyIesiorMx/eIcjb+QCh//Y3hwQkIAEJSE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ABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQn8NQn8fyHnyuSABiy2AAAAAElFTkSuQmCC",Vg=`
|
|
545
545
|
varying vec2 vUv;
|
|
546
546
|
void main() {
|
|
547
547
|
vUv = uv;
|
|
@@ -556,4 +556,4 @@ void main() {
|
|
|
556
556
|
float match = 1.0 - uv.x;
|
|
557
557
|
gl_FragColor = vec4(1.0,1.0,1.0,match);
|
|
558
558
|
}
|
|
559
|
-
`;function Qg(){const i=new x.PlaneGeometry(.4,.4),t=Bg,e=new x.TextureLoader().load(t);e.encoding=x.sRGBEncoding;const n=new x.MeshBasicMaterial({map:e,transparent:!0,depthTest:!1});return new x.Mesh(i,n)}function Rg(){const i=new x.CurvePath;i.add(new x.LineCurve3(new x.Vector3(0,0,0),new x.Vector3(0,0,.1)));const t=new x.TubeGeometry(i,8,.003),e=new x.ShaderMaterial({vertexShader:Vg,fragmentShader:jg,depthTest:!1,transparent:!0});return new x.Mesh(t,e)}function Og(){const i=new x.SphereGeometry(.01,20,20),t=new x.MeshBasicMaterial({color:10349931,depthTest:!1,transparent:!0,side:x.DoubleSide}),e=new x.Mesh(i,t);return e.position.set(0,0,.1),e}class al extends x.Object3D{constructor(){super();m(this,"planeMesh");m(this,"lineMesh");m(this,"ballMesh");this.planeMesh=Qg(),this.lineMesh=Rg(),this.ballMesh=Og(),this.add(this.planeMesh,this.lineMesh,this.ballMesh)}updateWithIntersect(e){if(!e.face)return;const n=new x.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 ll{constructor(t){m(this,"five");m(this,"contentElement",document.createElement("div"));m(this,"animeIns");m(this,"container");m(this,"css3DObject");m(this,"disposeCss3DObject");m(this,"state",{enabled:!1});this.five=t;const n=.4/2,s=en(t).create3DDomContainer([[-n,n,0],[-n,-n,0],[n,-n,0],[n,n,0]].map(r=>new x.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(${Oa})`,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 x.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 co({progress:0}).to({progress:[1,0]}).duration(500).easing(ni.Easing.Quadratic.InOut).onUpdate(({progress:e})=>{}).play()}dispose(){var t;(t=this.disposeCss3DObject)==null||t.call(this)}}class Hg{constructor(t,e){m(this,"five");m(this,"hooks",new be.Subscribe);m(this,"magnifier",null);m(this,"pointHelper",null);m(this,"pointDomHelper",null);m(this,"contentDom",document.createElement("div"));m(this,"state",{enabled:!1});m(this,"group",new x.Group);this.five=t,this.magnifier=(e==null?void 0:e.magnifier)===void 0?new sl(t,{dragEnabled:!0}):null,this.pointHelper=(e==null?void 0:e.pointHelper)===void 0?new al:null,this.pointDomHelper=(e==null?void 0:e.pointDomHelper)===void 0?new ll(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 Fg=Object.freeze(Object.defineProperty({__proto__:null,Interval:Xi,Rectangle:Lg,Magnifier:sl,getCoordsFromClient:Tg,getCoordsFromElement:rl,getRaycasterFromFivePointer:Mg,getIntersectFromRelativePosition:zg,PointHelper:al,PointDomHelper:ll,FivePointSelector:Hg,isNil:Rm,notNil:We,BetterTween:co,tweenProgress:La,nextFrame:ci,requestAnimationFrameInterval:di,getFrameTime:sf},Symbol.toStringTag,{value:"Module"}));function Gg(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 Cr(i,t,e){const n=i.slice();return n[0]=t[e],n}function Er(i,t,e){const n=i.slice();return n[0]=t[e],n}function Pr(i){let t,e=i[0]+"",n;return{c(){t=V("div"),n=Ee(e),b(t,"class","base-tag primary-tag svelte-8mby9k")},m(o,s){z(o,t,s),Q(t,n)},p(o,s){s&4&&e!==(e=o[0]+"")&&xe(n,e)},d(o){o&&M(t)}}}function Ir(i){let t,e=i[0]&&Pr(i);return{c(){e&&e.c(),t=fe()},m(n,o){e&&e.m(n,o),z(n,t,o)},p(n,o){n[0]?e?e.p(n,o):(e=Pr(n),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},d(n){e&&e.d(n),n&&M(t)}}}function kr(i){let t,e=i[0]+"",n;return{c(){t=V("div"),n=Ee(e),b(t,"class","base-tag secondary-tag svelte-8mby9k")},m(o,s){z(o,t,s),Q(t,n)},p(o,s){s&4&&e!==(e=o[0]+"")&&xe(n,e)},d(o){o&&M(t)}}}function xr(i){let t,e=i[0]&&kr(i);return{c(){e&&e.c(),t=fe()},m(n,o){e&&e.m(n,o),z(n,t,o)},p(n,o){n[0]?e?e.p(n,o):(e=kr(n),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},d(n){e&&e.d(n),n&&M(t)}}}function Dr(i){let t,e,n=i[2].price.value+"",o,s,r=i[2].price.unit&&Lr(i);return{c(){t=V("div"),e=V("span"),o=Ee(n),s=ee(),r&&r.c(),b(e,"class","value svelte-8mby9k"),b(t,"class","price svelte-8mby9k")},m(a,l){z(a,t,l),Q(t,e),Q(e,o),Q(t,s),r&&r.m(t,null)},p(a,l){l&4&&n!==(n=a[2].price.value+"")&&xe(o,n),a[2].price.unit?r?r.p(a,l):(r=Lr(a),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(a){a&&M(t),r&&r.d()}}}function Lr(i){let t,e=i[2].price.unit+"",n;return{c(){t=V("span"),n=Ee(e),b(t,"class","unit svelte-8mby9k")},m(o,s){z(o,t,s),Q(t,n)},p(o,s){s&4&&e!==(e=o[2].price.unit+"")&&xe(n,e)},d(o){o&&M(t)}}}function Sr(i){let t,e=i[2].highlightText+"",n;return{c(){t=V("div"),n=Ee(e),b(t,"class","goto-button goto-icon svelte-8mby9k")},m(o,s){z(o,t,s),Q(t,n)},p(o,s){s&4&&e!==(e=o[2].highlightText+"")&&xe(n,e)},d(o){o&&M(t)}}}function Ng(i){var X,j;let t,e,n,o,s,r,a,l,c,d,f,u,h,p,A=i[2].title+"",g,v,w,y=We((X=i[2].price)==null?void 0:X.value)&&((j=i[2].price)==null?void 0:j.value)!=="",P,I;e=new Ke({props:{visible:i[1],outDelay:500,left:61,bottom:87,blurRadius:150,spreadRadius:75}});let C=i[2].brandTags||[],L=[];for(let E=0;E<C.length;E+=1)L[E]=Ir(Er(i,C,E));let D=i[2].tags||[],B=[];for(let E=0;E<D.length;E+=1)B[E]=xr(Cr(i,D,E));let N=y&&Dr(i),F=i[2].highlightText&&Sr(i);return{c(){var E;t=V("div"),$(e.$$.fragment),n=ee(),o=V("div"),s=ee(),r=V("div"),a=V("img"),c=ee(),d=V("div");for(let R=0;R<L.length;R+=1)L[R].c();f=ee();for(let R=0;R<B.length;R+=1)B[R].c();u=ee(),h=V("div"),p=V("div"),g=Ee(A),v=ee(),w=V("div"),N&&N.c(),P=ee(),F&&F.c(),b(o,"class","line svelte-8mby9k"),T(o,"transition-delay",i[1]?Bn+"ms":Vn+Mr-Tr-40+"ms"),b(a,"class","headerImage svelte-8mby9k"),Ne(a.src,l=i[2].headerPictureUrl)||b(a,"src",l),b(a,"alt",""),b(d,"class","tag svelte-8mby9k"),b(p,"class","text svelte-8mby9k"),b(h,"class","title svelte-8mby9k"),b(w,"class","footer svelte-8mby9k"),T(w,"height",We((E=i[2].price)==null?void 0:E.value)&&i[2].highlightText?void 0:"1rem"),b(r,"class","content svelte-8mby9k"),T(r,"transition-delay",i[1]?Bn+Vn+"ms":"0ms"),b(t,"class","marketing svelte-8mby9k"),te(t,"unfolded",i[1]),te(t,"folded",i[3])},m(E,R){z(E,t,R),q(e,t,null),Q(t,n),Q(t,o),Q(t,s),Q(t,r),Q(r,a),Q(r,c),Q(r,d);for(let O=0;O<L.length;O+=1)L[O].m(d,null);Q(d,f);for(let O=0;O<B.length;O+=1)B[O].m(d,null);Q(r,u),Q(r,h),Q(h,p),Q(p,g),Q(r,v),Q(r,w),N&&N.m(w,null),Q(w,P),F&&F.m(w,null),I=!0},p(E,[R]){var W,U,_;const O={};if(R&2&&(O.visible=E[1]),e.$set(O),R&2&&T(o,"transition-delay",E[1]?Bn+"ms":Vn+Mr-Tr-40+"ms"),(!I||R&4&&!Ne(a.src,l=E[2].headerPictureUrl))&&b(a,"src",l),R&4){C=E[2].brandTags||[];let J;for(J=0;J<C.length;J+=1){const de=Er(E,C,J);L[J]?L[J].p(de,R):(L[J]=Ir(de),L[J].c(),L[J].m(d,f))}for(;J<L.length;J+=1)L[J].d(1);L.length=C.length}if(R&4){D=E[2].tags||[];let J;for(J=0;J<D.length;J+=1){const de=Cr(E,D,J);B[J]?B[J].p(de,R):(B[J]=xr(de),B[J].c(),B[J].m(d,null))}for(;J<B.length;J+=1)B[J].d(1);B.length=D.length}(!I||R&4)&&A!==(A=E[2].title+"")&&xe(g,A),R&4&&(y=We((W=E[2].price)==null?void 0:W.value)&&((U=E[2].price)==null?void 0:U.value)!==""),y?N?N.p(E,R):(N=Dr(E),N.c(),N.m(w,P)):N&&(N.d(1),N=null),E[2].highlightText?F?F.p(E,R):(F=Sr(E),F.c(),F.m(w,null)):F&&(F.d(1),F=null),R&4&&T(w,"height",We((_=E[2].price)==null?void 0:_.value)&&E[2].highlightText?void 0:"1rem"),R&2&&T(r,"transition-delay",E[1]?Bn+Vn+"ms":"0ms"),(!I||R&2)&&te(t,"unfolded",E[1]),(!I||R&8)&&te(t,"folded",E[3])},i(E){I||(k(e.$$.fragment,E),I=!0)},o(E){S(e.$$.fragment,E),I=!1},d(E){E&&M(t),K(e),lt(L,E),lt(B,E),N&&N.d(),F&&F.d()}}}const Bn=400,Tr=500,Vn=180,Mr=500;function Wg(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 _g extends oe{constructor(t){super(),ie(this,t,Wg,Ng,ne,{tag:0},Gg)}}const Jt="data:audio/mpeg;base64,//uQxAAAAAAAAAAAAAAAAAAAAAAASW5mbwAAAA8AAA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VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVU=",un={};var ti=(i=>(i.Default="default",i.GetAudioDuration="getAudioDuration",i.PlayAudio="playAudio",i))(ti||{});function cl(i,t){const e=(t==null?void 0:t.namespace)||"default",n=un[e]||(un[e]=[]);let o=n.find(s=>!s.realSrc||s.realSrc===Jt);return o||(console.warn("\u672A\u627E\u5230\u7F13\u5B58\u97F3\u9891\uFF0C\u5DF2\u65B0\u5EFA",un),o=new mo(Jt),n.push(o)),i&&(o.src=i),o}function Xg(i){return Y(this,null,function*(){const t=(()=>i instanceof mo?i:cl(i,{namespace:"getAudioDuration"}))(),e=yield new Promise(n=>{t.duration?t.isBlankAudio?n(0):n(t.duration):(t.addEventListener("loadedmetadata",()=>{t.isBlankAudio?n(0):n(t.duration)}),t.addEventListener("canplaythrough",()=>{t.isBlankAudio?n(0):n(t.duration)}))});return typeof i=="string"&&t.clear(),e})}function zr(i,t){const e=(t==null?void 0:t.namespace)||"default",n=un[e]||(un[e]=[]),o=i-n.length;if(!(o<=0))for(let s=0;s<o;s++)n.push(new mo(Jt))}class mo extends Audio{constructor(e){super(e);m(this,"preload","auto");m(this,"realSrc","");m(this,"inited",!1);m(this,"removeDocumentEventListener");this.realSrc=e!=null?e:"",super.addEventListener("ended",()=>{this.src=""});const n=this.initAudio.bind(this);document.addEventListener("click",n),this.removeDocumentEventListener=()=>{document.removeEventListener("click",n)}}get isBlankAudio(){return this.realSrc===Jt||!this.realSrc}get src(){return super.src}set src(e){super.src=e,this.realSrc=e}clear(){this.src=Jt,this.currentTime=0}initAudio(){this.inited||(this.src&&(this.inited=!0,this.removeDocumentEventListener()),this.src===Jt&&this.play())}}class Yg extends Audio{constructor(e){super();m(this,"sharedAudioSrc");m(this,"sharedAudioPaused",!0);m(this,"sharedAudioCurrentTime",0);m(this,"tryplaying",!1);m(this,"audioInstance");m(this,"eventListenerDisposer");this.sharedAudioSrc=e}get paused(){var e;return(e=this.sharedAudioPaused)!=null?e:!0}get currentTime(){return this.sharedAudioCurrentTime}play(){return Y(this,null,function*(){var e,n,o;this.tryplaying||(this.tryplaying=!0,(!this.audioInstance||((e=this.audioInstance)==null?void 0:e.realSrc)!==this.sharedAudioSrc)&&(this.audioInstance=cl(this.sharedAudioSrc,{namespace:ti.PlayAudio})),this.audioInstance.currentTime=(n=this.currentTime)!=null?n:0,(o=this.eventListenerDisposer)==null||o.call(this),this.eventListenerDisposer=this.addEventListeners(),this.audioInstance.play().then(()=>{this.sharedAudioPaused=!1}).catch(s=>{this.pause(),console.warn(s)}).finally(()=>{this.tryplaying=!1}))})}pause(){!this.audioInstance||this.paused||(this.sharedAudioPaused=!0,this.audioInstance.addEventListener("pause",()=>{var e;(e=this.eventListenerDisposer)==null||e.call(this)},{once:!0}),this.audioInstance.pause())}dispose(){this.clear(),this.audioInstance=void 0}clear(){var e;(e=this.audioInstance)==null||e.clear()}addEventListeners(){const e=this.audioInstance;if(!e)return;const n=u=>{var h;this.sharedAudioCurrentTime=e.currentTime,(h=this.ontimeupdate)==null||h.call(this,u)},o=u=>{var h;return(h=this.onplay)==null?void 0:h.call(this,u)},s=u=>{var h;(h=this.onpause)==null||h.call(this,u),this.clear()},r=u=>{var h;(h=this.onended)==null||h.call(this,u),this.sharedAudioCurrentTime=0},a=u=>{var h;return(h=this.onerror)==null?void 0:h.call(this,u)},l=u=>{var h;return(h=this.oncanplay)==null?void 0:h.call(this,u)},c=u=>{var h;return(h=this.oncanplaythrough)==null?void 0:h.call(this,u)},d=u=>{var h;return(h=this.onloadeddata)==null?void 0:h.call(this,u)},f=u=>{var h;return(h=this.onloadedmetadata)==null?void 0:h.call(this,u)};return e.addEventListener("timeupdate",n),e.addEventListener("play",o),e.addEventListener("pause",s),e.addEventListener("ended",r),e.addEventListener("error",a),e.addEventListener("canplay",l),e.addEventListener("canplaythrough",c),e.addEventListener("loadeddata",d),e.addEventListener("loadedmetadata",f),()=>{e.removeEventListener("timeupdate",n),e.removeEventListener("play",o),e.removeEventListener("pause",s),e.removeEventListener("ended",r),e.removeEventListener("error",a),e.removeEventListener("canplay",l),e.removeEventListener("canplaythrough",c),e.removeEventListener("loadeddata",d),e.removeEventListener("loadedmetadata",f)}}}function Ug(i){le(i,"svelte-13e7hxv",".audio.svelte-13e7hxv{pointer-events:auto;cursor:pointer;width:100%;height:100%}")}function Jg(i){let t,e,n,o;const s=i[8].default,r=it(s,i,i[7],null);return{c(){t=V("div"),r&&r.c(),b(t,"class","audio svelte-13e7hxv"),b(t,"style",i[0])},m(a,l){z(a,t,l),r&&r.m(t,null),e=!0,n||(o=Se(t,"click",ha(i[1])),n=!0)},p(a,[l]){r&&r.p&&(!e||l&128)&&st(r,s,a,a[7],e?ot(s,a[7],l,null):rt(a[7]),null),(!e||l&1)&&b(t,"style",a[0])},i(a){e||(k(r,a),e=!0)},o(a){S(r,a),e=!1},d(a){a&&M(t),r&&r.d(a),n=!1,o()}}}function Zg(i,t,e){let{$$slots:n={},$$scope:o}=t,{url:s}=t,{enable:r=!0}=t,{style:a=""}=t,{hooksInfo:l}=t;const c=oi(),d=ct("hooks"),f=ct("mediaStore");let u,h=!0;function p(){e(5,u.onplay=g=>{d.emit("playStateChange",G({event:g,state:"playing",mediaInstance:u},l)),c("play"),e(6,h=!1)},u),e(5,u.onpause=g=>{d.emit("playStateChange",G({event:g,state:"paused",mediaInstance:u},l)),c("pause"),e(6,h=!0)},u),e(5,u.onloadedmetadata=g=>{typeof u.duration=="number"&&!Number.isNaN(u.duration)&&c("duration",u.duration)},u),e(5,u.ontimeupdate=g=>{c("timeupdate",u.currentTime)},u)}f.subscribe(({currentMediaElement:g})=>{g!==u&&(h||u==null||u.pause())});function A(g){!u||(d.emit("click",G({event:g,target:"AudioTagPlayIcon",audioInstance:u},l)),f.set({currentMediaElement:u}),d.emit("playStateChange",G({event:g,state:u.paused?"playing":"paused",mediaInstance:u},l)),u.paused?u.play():u.pause())}return i.$$set=g=>{"url"in g&&e(2,s=g.url),"enable"in g&&e(3,r=g.enable),"style"in g&&e(0,a=g.style),"hooksInfo"in g&&e(4,l=g.hooksInfo),"$$scope"in g&&e(7,o=g.$$scope)},i.$$.update=()=>{i.$$.dirty&4&&(s||c("duration",0)),i.$$.dirty&36&&(u==null||u.dispose(),e(5,u=new Yg(s)),c("audioRef",u),setTimeout(()=>c("audioRef",u),200),Xg(s).then(g=>c("duration",g)),p()),i.$$.dirty&40&&(r||u==null||u.pause()),i.$$.dirty&72&&c(r&&!h?"play":"pause")},[a,A,s,r,l,u,h,o,n]}class dl extends oe{constructor(t){super(),ie(this,t,Zg,Jg,ne,{url:2,enable:3,style:0,hooksInfo:4},Ug)}}function qg(i){le(i,"svelte-srt2pi",".audio-icon__wrapper.svelte-srt2pi.svelte-srt2pi{display:inline-block}.audio-icon.svelte-srt2pi.svelte-srt2pi{display:flex;justify-content:center;align-items:center;position:relative;width:100%;height:100%;border-radius:50%;background-color:rgba(255, 255, 255, 0.8)}.audio-icon.svelte-srt2pi .sound-wave__container.svelte-srt2pi{position:absolute;pointer-events:none;width:60%;height:60%}.sound-wave.svelte-srt2pi.svelte-srt2pi{animation-duration:2s;animation-iteration-count:infinite;animation-play-state:paused;transition:opacity 0}.playing.svelte-srt2pi .sound-wave.svelte-srt2pi{animation-play-state:running}.playing.svelte-srt2pi .sound-wave-1.svelte-srt2pi{animation-name:svelte-srt2pi-sound_wave_1_animation}.playing.svelte-srt2pi .sound-wave-2.svelte-srt2pi{animation-name:svelte-srt2pi-sound_wave_2_animation}.playing.svelte-srt2pi .sound-wave-3.svelte-srt2pi{animation-name:svelte-srt2pi-sound_wave_3_animation}@keyframes svelte-srt2pi-sound_wave_1_animation{0%,10%{opacity:0}25%,100%{opacity:1}}@keyframes svelte-srt2pi-sound_wave_2_animation{0%,35%{opacity:0}50%,100%{opacity:1}}@keyframes svelte-srt2pi-sound_wave_3_animation{0%,60%{opacity:0}75%,100%{opacity:1}}")}function Br(i){let t,e;return t=new Ke({props:{center:!0,blurRadius:12,spreadRadius:5}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function Kg(i){let t,e,n,o,s,r=i[1]&&Br();return{c(){t=V("div"),r&&r.c(),e=ee(),n=V("div"),o=V("div"),o.innerHTML='<svg width="100%" height="100%" viewBox="0 0 128 128"><g transform="rotate(-45 12 64) translate(12 64)" fill="black" stroke="black" fill-opacity="0.6" stroke-opacity="0.6"><path stroke="none" class="sound-wave sound-wave-1 svelte-srt2pi" d="M0,23 A23,23 0 0,0 23,0 L0,0"></path><path fill="none" stroke-width="15" class="sound-wave sound-wave-2 svelte-srt2pi" d="M0,46 A46,46 0 0,0 46,0"></path><path fill="none" stroke-width="15" class="sound-wave sound-wave-3 svelte-srt2pi" d="M0,80 A80,80 0 0,0 80,0"></path></g></svg>',b(o,"class","sound-wave__container svelte-srt2pi"),b(n,"class","audio-icon svelte-srt2pi"),te(n,"playing",i[0]),b(t,"class","audio-icon__wrapper svelte-srt2pi"),b(t,"style",i[2]),T(t,"width",i[5]),T(t,"height",i[5])},m(a,l){z(a,t,l),r&&r.m(t,null),Q(t,e),Q(t,n),Q(n,o),i[7](o),i[8](t),s=!0},p(a,[l]){a[1]?r?l&2&&k(r,1):(r=Br(),r.c(),k(r,1),r.m(t,e)):r&&(se(),S(r,1,1,()=>{r=null}),re()),(!s||l&1)&&te(n,"playing",a[0]),(!s||l&4)&&b(t,"style",a[2]),l&32&&T(t,"width",a[5]),l&32&&T(t,"height",a[5])},i(a){s||(k(r),s=!0)},o(a){S(r),s=!1},d(a){a&&M(t),r&&r.d(),i[7](null),i[8](null)}}}function $g(i,t,e){let n,{playing:o}=t,{shadow:s=!1}=t,{style:r=null}=t,{width:a="100%"}=t,l,c;function d(u){Le[u?"unshift":"push"](()=>{c=u,e(4,c)})}function f(u){Le[u?"unshift":"push"](()=>{l=u,e(3,l)})}return i.$$set=u=>{"playing"in u&&e(0,o=u.playing),"shadow"in u&&e(1,s=u.shadow),"style"in u&&e(2,r=u.style),"width"in u&&e(6,a=u.width)},i.$$.update=()=>{i.$$.dirty&64&&e(5,n=typeof a=="number"?ye(a):a)},[o,s,r,l,c,n,a,d,f]}class ul extends oe{constructor(t){super(),ie(this,t,$g,Kg,ne,{playing:0,shadow:1,style:2,width:6},qg)}}function e0(i){le(i,"svelte-1s6gk4a",".audio-tag.svelte-1s6gk4a{position:absolute;left:0;top:0;width:0;height:0;overflow:visible}.audio-icon__wrapper.svelte-1s6gk4a{position:relative;vertical-align:top;width:100%;height:100%}.content.svelte-1s6gk4a{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-1s6gk4a{position:relative;width:100%;height:100%}.audio-icon.svelte-1s6gk4a{pointer-events:none;vertical-align:top;display:inline-block;width:1rem;height:1rem;margin-right:0.25rem;margin-top:0.0625rem}.audio.svelte-1s6gk4a{position:relative;width:100%;height:100%}")}function Vr(i){var v,w;let t,e,n,o,s,r,a,l,c,d,f,u,h,p,A;e=new Ke({props:{visible:i[6],left:i[3]/2+"px",bottom:12,width:2,blurRadius:120,spreadRadius:60}});let g=i[6]&&jr(i);return c=new tl({props:{visible:i[6],textUnfolded:i[1],content:i[5]}}),u=new fo({props:{unfolded:i[6],length:i[3],outDelay:i[4]+20*Math.min((w=(v=i[5])==null?void 0:v.length)!=null?w:10,15),useLinearColor:!0}}),{c(){t=V("div"),$(e.$$.fragment),n=ee(),o=V("div"),s=V("div"),r=V("div"),g&&g.c(),a=ee(),l=V("div"),$(c.$$.fragment),f=ee(),$(u.$$.fragment),b(r,"class","audio-icon svelte-1s6gk4a"),De(()=>i[11].call(l)),T(l,"display","inline-block"),b(s,"class","wrapper svelte-1s6gk4a"),b(o,"class","content svelte-1s6gk4a"),b(t,"class","audio-tag svelte-1s6gk4a"),te(t,"unfolded",i[6])},m(y,P){z(y,t,P),q(e,t,null),Q(t,n),Q(t,o),Q(o,s),Q(s,r),g&&g.m(r,null),Q(s,a),Q(s,l),q(c,l,null),d=Et(l,i[11].bind(l)),Q(t,f),q(u,t,null),h=!0,p||(A=Se(l,"click",i[7]),p=!0)},p(y,P){var D,B;const I={};P&64&&(I.visible=y[6]),P&8&&(I.left=y[3]/2+"px"),e.$set(I),y[6]?g?(g.p(y,P),P&64&&k(g,1)):(g=jr(y),g.c(),k(g,1),g.m(r,null)):g&&(se(),S(g,1,1,()=>{g=null}),re());const C={};P&64&&(C.visible=y[6]),P&2&&(C.textUnfolded=y[1]),P&32&&(C.content=y[5]),c.$set(C);const L={};P&64&&(L.unfolded=y[6]),P&8&&(L.length=y[3]),P&48&&(L.outDelay=y[4]+20*Math.min((B=(D=y[5])==null?void 0:D.length)!=null?B:10,15)),u.$set(L),(!h||P&64)&&te(t,"unfolded",y[6])},i(y){h||(k(e.$$.fragment,y),k(g),k(c.$$.fragment,y),k(u.$$.fragment,y),h=!0)},o(y){S(e.$$.fragment,y),S(g),S(c.$$.fragment,y),S(u.$$.fragment,y),h=!1},d(y){y&&M(t),K(e),g&&g.d(),K(c),d(),K(u),p=!1,A()}}}function jr(i){let t,e,n,o,s,r,a;return e=new Ke({props:{center:!0,blurRadius:15,spreadRadius:6}}),o=new dl({props:{enable:i[6],url:i[0].data.audioUrl,hooksInfo:{tag:i[0]},$$slots:{default:[t0]},$$scope:{ctx:i}}}),o.$on("play",i[8]),o.$on("pause",i[9]),o.$on("audioRef",i[10]),{c(){t=V("div"),$(e.$$.fragment),n=ee(),$(o.$$.fragment),b(t,"class","audio svelte-1s6gk4a")},m(l,c){z(l,t,c),q(e,t,null),Q(t,n),q(o,t,null),a=!0},p(l,c){i=l;const d={};c&64&&(d.enable=i[6]),c&1&&(d.url=i[0].data.audioUrl),c&1&&(d.hooksInfo={tag:i[0]}),c&4100&&(d.$$scope={dirty:c,ctx:i}),o.$set(d)},i(l){a||(k(e.$$.fragment,l),k(o.$$.fragment,l),l&&De(()=>{r&&r.end(1),s=Rt(t,Bt,{duration:1e3,delay:0,easing:qt}),s.start()}),a=!0)},o(l){var c,d;S(e.$$.fragment,l),S(o.$$.fragment,l),s&&s.invalidate(),l&&(r=tn(t,Bt,{duration:1e3,delay:20*Math.min((d=(c=i[5])==null?void 0:c.length)!=null?d:10,15),easing:qt})),a=!1},d(l){l&&M(t),K(e),K(o),l&&r&&r.end()}}}function t0(i){let t,e,n;return e=new ul({props:{playing:i[2]}}),{c(){t=V("div"),$(e.$$.fragment),b(t,"class","audio-icon__wrapper svelte-1s6gk4a")},m(o,s){z(o,t,s),q(e,t,null),n=!0},p(o,s){const r={};s&4&&(r.playing=o[2]),e.$set(r)},i(o){n||(k(e.$$.fragment,o),n=!0)},o(o){S(e.$$.fragment,o),n=!1},d(o){o&&M(t),K(e)}}}function n0(i){let t,e,n=i[0].state&&Vr(i);return{c(){n&&n.c(),t=fe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&k(n,1)):(n=Vr(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(se(),S(n,1,1,()=>{n=null}),re())},i(o){e||(k(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function i0(i,t,e){let n,o,s,{tag:r}=t,a=!1,l=!1,c;function d(){e(1,a=!a)}const f=()=>{e(2,l=!0)},u=()=>{e(2,l=!1)};function h(A){$i.call(this,i,A)}function p(){c=this.clientWidth,e(3,c)}return i.$$set=A=>{"tag"in A&&e(0,r=A.tag)},i.$$.update=()=>{var A,g,v;i.$$.dirty&1&&e(6,n=!!((A=r.state)!=null&&A.unfolded)),i.$$.dirty&1&&e(5,o=(v=(g=r.data.title)!=null?g:r.data.text)!=null?v:""),i.$$.dirty&2&&e(4,s=a?450:0)},[r,a,l,c,s,o,n,d,f,u,h,p]}class o0 extends oe{constructor(t){super(),ie(this,t,i0,n0,ne,{tag:0},e0)}}function s0(i){const t=document.createElement("div");t.style.color=i,document.body.appendChild(t);const e=window.getComputedStyle(t).color;document.body.removeChild(t);const n=(()=>e.search("rgba")===-1?e.replace("rgb","rgba").replace(")",", 1)"):e)(),o=n.replace("rgba","").replace("(","").replace(")","").split(",").map(s=>Number(s.trim()));return{rgba:n,r:o[0],g:o[1],b:o[2],a:o[3]}}function r0(i){le(i,"svelte-58hfjf",".audio-tag__wrapper.svelte-58hfjf{position:absolute;left:50%;top:50%;transform:translate(-50%, -50%)}.audio-tag.svelte-58hfjf{position:relative;width:-moz-max-content;width:max-content;height:-moz-max-content;height:max-content;padding:0.1875rem;padding-right:0.625rem;border-radius:624999.9375rem;border:0.03125rem solid rgba(255, 255, 255, 0.2)}.audio__inner.svelte-58hfjf{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.text.svelte-58hfjf{font-weight:bold;font-size:0.75rem;margin-left:0.25rem}.audio-icon__wrapper.svelte-58hfjf{position:relative;vertical-align:top;pointer-events:none;width:1.375rem;height:1.375rem}")}function Qr(i){let t,e,n,o;return n=new dl({props:{style:"width: max-content; height: max-content;",enable:i[0].state.visible,url:i[0].data.audioUrl,hooksInfo:{tag:i[0]},$$slots:{default:[l0]},$$scope:{ctx:i}}}),n.$on("play",i[7]),n.$on("pause",i[8]),n.$on("timeupdate",i[9]),n.$on("duration",i[10]),n.$on("audioRef",i[11]),{c(){t=V("div"),e=V("div"),$(n.$$.fragment),b(e,"class","audio-tag svelte-58hfjf"),T(e,"background-color",i[1]),T(e,"color",i[5]),b(t,"class","audio-tag__wrapper svelte-58hfjf")},m(s,r){z(s,t,r),Q(t,e),q(n,e,null),o=!0},p(s,r){const a={};r&1&&(a.enable=s[0].state.visible),r&1&&(a.url=s[0].data.audioUrl),r&1&&(a.hooksInfo={tag:s[0]}),r&8260&&(a.$$scope={dirty:r,ctx:s}),n.$set(a),r&2&&T(e,"background-color",s[1]),r&32&&T(e,"color",s[5])},i(s){o||(k(n.$$.fragment,s),o=!0)},o(s){S(n.$$.fragment,s),o=!1},d(s){s&&M(t),K(n)}}}function a0(i){let t;return{c(){t=Ee(i[6])},m(e,n){z(e,t,n)},p(e,n){n&64&&xe(t,e[6])},d(e){e&&M(t)}}}function l0(i){let t,e,n,o,s,r,a;return n=new ul({props:{playing:i[2]}}),r=new ho({props:{maxWidth:72,$$slots:{default:[a0]},$$scope:{ctx:i}}}),{c(){t=V("div"),e=V("div"),$(n.$$.fragment),o=ee(),s=V("div"),$(r.$$.fragment),b(e,"class","audio-icon__wrapper svelte-58hfjf"),b(s,"class","text svelte-58hfjf"),b(t,"class","audio__inner svelte-58hfjf")},m(l,c){z(l,t,c),Q(t,e),q(n,e,null),Q(t,o),Q(t,s),q(r,s,null),a=!0},p(l,c){const d={};c&4&&(d.playing=l[2]),n.$set(d);const f={};c&8256&&(f.$$scope={dirty:c,ctx:l}),r.$set(f)},i(l){a||(k(n.$$.fragment,l),k(r.$$.fragment,l),a=!0)},o(l){S(n.$$.fragment,l),S(r.$$.fragment,l),a=!1},d(l){l&&M(t),K(n),K(r)}}}function c0(i){let t,e,n=i[0].state&&Qr(i);return{c(){n&&n.c(),t=fe()},m(o,s){n&&n.m(o,s),z(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&&(se(),S(n,1,1,()=>{n=null}),re())},i(o){e||(k(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function d0(i,t,e){let n,o,s,{tag:r}=t;oi();let a=!1,l=0,c=0;const d=()=>{e(2,a=!0)},f=()=>{e(2,a=!1)},u=A=>{e(3,l=A.detail)},h=A=>{e(4,c=A.detail)};function p(A){$i.call(this,i,A)}return i.$$set=A=>{"tag"in A&&e(0,r=A.tag)},i.$$.update=()=>{var A,g;i.$$.dirty&1&&e(6,n=(g=(A=r.data.title)!=null?A:r.data.text)!=null?g:""),i.$$.dirty&1&&e(1,o=(()=>{var v;return r.data.backgroundColor==="dark"?"rgba(0, 0, 0, 0.3)":r.data.backgroundColor==="light"?"rgba(255, 255, 255, 0.3)":(v=r.data.backgroundColor)!=null?v:"rgba(0, 0, 0, 0.3)"})()),i.$$.dirty&2&&e(5,s=(()=>{const{r:v,g:w,b:y}=s0(o);return(v*299+w*587+y*114)/1e3>=128?"rgba(0, 0, 0, 0.6)":"white"})())},[r,o,a,l,c,s,n,d,f,u,h,p]}class u0 extends oe{constructor(t){super(),ie(this,t,d0,c0,ne,{tag:0},r0)}}function f0(i){let t,e;return t=new u0({props:{tag:i[0]}}),t.$on("audioRef",i[2]),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.tag=n[0]),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function h0(i){let t,e;return t=new o0({props:{tag:i[0]}}),t.$on("audioRef",i[2]),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.tag=n[0]),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function m0(i){let t,e,n,o;const s=[h0,f0],r=[];function a(l,c){return l[1]==="line"?0:l[1]==="plane"?1:-1}return~(t=a(i))&&(e=r[t]=s[t](i)),{c(){e&&e.c(),n=fe()},m(l,c){~t&&r[t].m(l,c),z(l,n,c),o=!0},p(l,[c]){let d=t;t=a(l),t===d?~t&&r[t].p(l,c):(e&&(se(),S(r[d],1,1,()=>{r[d]=null}),re()),~t?(e=r[t],e?e.p(l,c):(e=r[t]=s[t](l),e.c()),k(e,1),e.m(n.parentNode,n)):e=null)},i(l){o||(k(e),o=!0)},o(l){S(e),o=!1},d(l){~t&&r[t].d(l),l&&M(n)}}}function p0(i,t,e){let n,{tag:o}=t,s;function r(a){s=a.detail}return o.play=()=>s.play(),o.pause=()=>s.pause(),i.$$set=a=>{"tag"in a&&e(0,o=a.tag)},i.$$.update=()=>{var a;i.$$.dirty&1&&e(1,n=(a=o.data.appearance)!=null?a:"line")},[o,n,r]}class g0 extends oe{constructor(t){super(),ie(this,t,p0,m0,ne,{tag:0})}}function A0(i){le(i,"svelte-10cw0el",".media-wrapper.svelte-10cw0el{position:absolute;width:100%;height:100%}")}function Rr(i){var o;let t,e,n;return e=new ol({props:{mediaItemConfig:{canPlay:!0,playButtonSizeIfNeed:"large",playButtonIfNeed:(o=i[4])!=null?o:"withText",disableVideoIfHavePoster:!1,objectFit:i[2]},unfolded:i[6],mediaData:i[5],enableCarousel:i[1],autoplayConfig:i[3],tag:i[0],inDelay:500,duration:500}}),{c(){t=V("div"),$(e.$$.fragment),b(t,"class","media-wrapper svelte-10cw0el")},m(s,r){z(s,t,r),q(e,t,null),n=!0},p(s,r){var l;const a={};r&20&&(a.mediaItemConfig={canPlay:!0,playButtonSizeIfNeed:"large",playButtonIfNeed:(l=s[4])!=null?l:"withText",disableVideoIfHavePoster:!1,objectFit:s[2]}),r&64&&(a.unfolded=s[6]),r&32&&(a.mediaData=s[5]),r&2&&(a.enableCarousel=s[1]),r&8&&(a.autoplayConfig=s[3]),r&1&&(a.tag=s[0]),e.$set(a)},i(s){n||(k(e.$$.fragment,s),n=!0)},o(s){S(e.$$.fragment,s),n=!1},d(s){s&&M(t),K(e)}}}function v0(i){let t,e,n=i[0].state&&i[5]&&Rr(i);return{c(){n&&n.c(),t=fe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[0].state&&o[5]?n?(n.p(o,s),s&33&&k(n,1)):(n=Rr(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(se(),S(n,1,1,()=>{n=null}),re())},i(o){e||(k(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function b0(i,t,e){let n,o,s,r,a,l,{tag:c}=t;return i.$$set=d=>{"tag"in d&&e(0,c=d.tag)},i.$$.update=()=>{var d,f;i.$$.dirty&1&&e(6,n=c.state?c.state.unfolded:!1),i.$$.dirty&1&&e(5,o=c.data.mediaData),i.$$.dirty&1&&e(1,s=c.data.enableCarousel),i.$$.dirty&1&&e(4,r=c.data.playIcon),i.$$.dirty&3&&e(3,a=(d=c.data.autoplayConfig)!=null?d:{autoplay:s!=null?s:!0,autoplayVideo:!0}),i.$$.dirty&1&&e(2,l=(f=c.data.objectFit)!=null?f:(()=>c.data.adaptationMode==="stretch"?"cover":c.data.adaptationMode==="proportional"?"contain":void 0)())},[c,s,l,a,r,o,n]}class y0 extends oe{constructor(t){super(),ie(this,t,b0,v0,ne,{tag:0},A0)}}function w0(i){return Y(this,null,function*(){return new Promise((t,e)=>{if(!i){e(Error("url is empty"));return}const n=new Image;n.src=i,n.onload=()=>t({width:n.width,height:n.height}),n.onerror=e})})}function C0(i){return Y(this,null,function*(){const{steps:t,url:e,ratio:n=3,fps:o=24}=i;if(!t)throw new Error("KeyframeIcon requires steps");const{width:s,height:r}=yield w0(e),a=s/n,l=r/n,c=a/t,d=l,f=1/o*t+"s",u=a/t-a;return{url:e,keyframesWidth:a,keyframesHeight:l,wrapperWidth:c,wrapperHeight:d,steps:t,duration:f,offsetX:u,offsetY:0}})}function E0(i){le(i,"svelte-mhs8j5","@keyframes svelte-mhs8j5-sprites-animation{0%{background-position:0 0}100%{background-position:var(--keyframe_offset_x) 0}}.icon-image.svelte-mhs8j5{display:block;width:100%}.icon-keyframe-container.svelte-mhs8j5{overflow:hidden}.icon-keyframe-wrapper.svelte-mhs8j5{transform-origin:0 0}.icon-keyframe.svelte-mhs8j5{background-repeat:no-repeat;animation-direction:normal;animation-iteration-count:infinite;animation-name:svelte-mhs8j5-sprites-animation}")}function Or(i){i[6]=i[14].url,i[7]=i[14].keyframesWidth,i[8]=i[14].keyframesHeight,i[9]=i[14].wrapperWidth,i[10]=i[14].wrapperHeight,i[11]=i[14].steps,i[12]=i[14].duration,i[13]=i[14].offsetX}function Hr(i){let t,e,n,o=i[2]&&Fr();function s(l,c){return l[3]?I0:P0}let r=s(i),a=r(i);return{c(){t=V("div"),o&&o.c(),e=ee(),a.c(),b(t,"class","icon"),T(t,"width",typeof i[0]=="number"?ye(i[0]):i[0])},m(l,c){z(l,t,c),o&&o.m(t,null),Q(t,e),a.m(t,null),n=!0},p(l,c){l[2]?o?c&4&&k(o,1):(o=Fr(),o.c(),k(o,1),o.m(t,e)):o&&(se(),S(o,1,1,()=>{o=null}),re()),r===(r=s(l))&&a?a.p(l,c):(a.d(1),a=r(l),a&&(a.c(),a.m(t,null))),c&1&&T(t,"width",typeof l[0]=="number"?ye(l[0]):l[0])},i(l){n||(k(o),n=!0)},o(l){S(o),n=!1},d(l){l&&M(t),o&&o.d(),a.d()}}}function Fr(i){let t,e;return t=new Ke({props:{center:!0,blurRadius:24,spreadRadius:16}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function P0(i){let t,e;return{c(){t=V("img"),b(t,"class","icon-image svelte-mhs8j5"),Ne(t.src,e=i[1].url)||b(t,"src",e),b(t,"alt","icon")},m(n,o){z(n,t,o)},p(n,o){o&2&&!Ne(t.src,e=n[1].url)&&b(t,"src",e)},d(n){n&&M(t)}}}function I0(i){let t,e,n={ctx:i,current:null,token:null,hasCatch:!1,pending:D0,then:x0,catch:k0,value:14};return To(e=i[4](i[1]),n),{c(){t=fe(),n.block.c()},m(o,s){z(o,t,s),n.block.m(o,n.anchor=s),n.mount=()=>t.parentNode,n.anchor=t},p(o,s){i=o,n.ctx=i,s&2&&e!==(e=i[4](i[1]))&&To(e,n)||wc(n,i,s)},d(o){o&&M(t),n.block.d(o),n.token=null,n=null}}}function k0(i){return{c:Z,m:Z,p:Z,d:Z}}function x0(i){Or(i);let t,e,n,o=`url(${i[6]})`,s=`steps(${i[11]-1})`;return{c(){t=V("div"),e=V("div"),n=V("div"),b(n,"class","icon-keyframe svelte-mhs8j5"),T(n,"width",ye(i[7])),T(n,"height",ye(i[8])),T(n,"background-image",o),T(n,"animation-duration",i[12]),T(n,"animation-timing-function",s),T(n,"animation-delay",0),T(n,"background-size","100% 100%"),T(n,"--keyframe_offset_x",ye(i[13])),b(e,"class","icon-keyframe-wrapper svelte-mhs8j5"),T(e,"transform",typeof i[0]=="number"?`scale(${i[0]/i[9]})`:void 0),b(t,"class","icon-keyframe-container svelte-mhs8j5"),T(t,"width",typeof i[0]=="number"?ye(i[0]):ye(i[9])),T(t,"height",typeof i[0]=="number"?ye(i[10]*(i[0]/i[9])):ye(i[10]))},m(r,a){z(r,t,a),Q(t,e),Q(e,n)},p(r,a){Or(r),a&2&&T(n,"width",ye(r[7])),a&2&&T(n,"height",ye(r[8])),a&2&&o!==(o=`url(${r[6]})`)&&T(n,"background-image",o),a&2&&T(n,"animation-duration",r[12]),a&2&&s!==(s=`steps(${r[11]-1})`)&&T(n,"animation-timing-function",s),a&2&&T(n,"--keyframe_offset_x",ye(r[13])),a&3&&T(e,"transform",typeof r[0]=="number"?`scale(${r[0]/r[9]})`:void 0),a&3&&T(t,"width",typeof r[0]=="number"?ye(r[0]):ye(r[9])),a&3&&T(t,"height",typeof r[0]=="number"?ye(r[10]*(r[0]/r[9])):ye(r[10]))},d(r){r&&M(t)}}}function D0(i){return{c:Z,m:Z,p:Z,d:Z}}function L0(i){let t,e,n=i[1]&&Hr(i);return{c(){n&&n.c(),t=fe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[1]?n?(n.p(o,s),s&2&&k(n,1)):(n=Hr(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(se(),S(n,1,1,()=>{n=null}),re())},i(o){e||(k(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function S0(i,t,e){let n,{width:o=null}=t,{icon:s=null}=t,{shadow:r=!1}=t;const a=oi();function l(c){return Y(this,null,function*(){const d=yield C0(c);return a("iconLoaded"),d})}return i.$$set=c=>{"width"in c&&e(0,o=c.width),"icon"in c&&e(1,s=c.icon),"shadow"in c&&e(2,r=c.shadow)},i.$$.update=()=>{i.$$.dirty&2&&e(3,n=(s==null?void 0:s.steps)>=2),i.$$.dirty&8&&!n&&a("iconLoaded")},[o,s,r,n,l]}class fl extends oe{constructor(t){super(),ie(this,t,S0,L0,ne,{width:0,icon:1,shadow:2},E0)}}function T0(i){le(i,"svelte-1lmyni6",".wrapper.svelte-1lmyni6{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-1lmyni6{position:relative;display:flex;align-items:center;justify-content:center}.text.svelte-1lmyni6{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)}")}function Gr(i){let t,e,n,o,s,r;return e=new Ke({props:{outDelay:0,inDelay:0,center:!0,width:"80%",blurRadius:40,spreadRadius:16,opacity:.08}}),{c(){t=V("div"),$(e.$$.fragment),n=ee(),o=V("div"),s=Ee(i[1]),b(o,"class","text svelte-1lmyni6"),b(t,"class","text-wrapper svelte-1lmyni6")},m(a,l){z(a,t,l),q(e,t,null),Q(t,n),Q(t,o),Q(o,s),r=!0},p(a,l){(!r||l&2)&&xe(s,a[1])},i(a){r||(k(e.$$.fragment,a),r=!0)},o(a){S(e.$$.fragment,a),r=!1},d(a){a&&M(t),K(e)}}}function M0(i){let t,e,n,o;e=new fl({props:{icon:i[0],shadow:!0}}),e.$on("iconLoaded",i[9]);let s=i[1]&&i[2]&&Gr(i);return{c(){t=V("div"),$(e.$$.fragment),n=ee(),s&&s.c(),b(t,"class","wrapper svelte-1lmyni6")},m(r,a){z(r,t,a),q(e,t,null),Q(t,n),s&&s.m(t,null),o=!0},p(r,[a]){const l={};a&1&&(l.icon=r[0]),e.$set(l),r[1]&&r[2]?s?(s.p(r,a),a&6&&k(s,1)):(s=Gr(r),s.c(),k(s,1),s.m(t,null)):s&&(se(),S(s,1,1,()=>{s=null}),re())},i(r){o||(k(e.$$.fragment,r),k(s),o=!0)},o(r){S(e.$$.fragment,r),S(s),o=!1},d(r){r&&M(t),K(e),s&&s.d()}}}function z0(i,t,e){let n,o,s,r,a,l,c,d,{tag:f}=t;const u=()=>{e(2,n=!0)};return i.$$set=h=>{"tag"in h&&e(3,f=h.tag)},i.$$.update=()=>{var h,p;i.$$.dirty&8&&e(1,o=(h=f.data.title)!=null?h:f.data.text),i.$$.dirty&8&&e(8,s=(p=f.data.icon)!=null?p:f.style.point),i.$$.dirty&256&&e(7,r=s.url),i.$$.dirty&256&&e(6,a=s.steps),i.$$.dirty&256&&e(5,l=s.fps),i.$$.dirty&256&&e(4,c=s.ratio),i.$$.dirty&240&&e(0,d={url:r,steps:a,fps:l,ratio:c})},e(2,n=!1),[d,o,n,f,c,l,a,r,s,u]}class B0 extends oe{constructor(t){super(),ie(this,t,z0,M0,ne,{tag:3},T0)}}function V0(i){le(i,"svelte-kzl2aj",".customElement__container.svelte-kzl2aj{position:relative}")}function Nr(i){let t,e=i[0].element+"",n;return{c(){t=new _n(!1),n=fe(),t.a=n},m(o,s){t.m(e,o,s),z(o,n,s)},p(o,s){s&1&&e!==(e=o[0].element+"")&&t.p(e)},d(o){o&&M(n),o&&t.d()}}}function j0(i){let t,e=typeof i[0].element=="string"&&Nr(i);return{c(){t=V("div"),e&&e.c(),b(t,"class","customElement__container svelte-kzl2aj")},m(n,o){z(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=Nr(n),e.c(),e.m(t,null)):e&&(e.d(1),e=null)},i:Z,o:Z,d(n){n&&M(t),e&&e.d(),i[2](null)}}}function Q0(i,t,e){let{tag:n}=t,o,s;Ze(()=>{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)}}}),It(()=>{s==null||s()});function r(a){Le[a?"unshift":"push"](()=>{o=a,e(1,o)})}return i.$$set=a=>{"tag"in a&&e(0,n=a.tag)},[n,o,r]}class R0 extends oe{constructor(t){super(),ie(this,t,Q0,j0,ne,{tag:0},V0)}}function O0(i){le(i,"svelte-ofx2uu",'@font-face{font-family:"TG-TYPE";font-style:normal;font-weight:400;src:local("TG-TYPE-Bold"), url(data:application/font-woff2;charset=utf-8;base64,T1RUTwAKAIAAAwAgQ0ZGINFD4CEAAAaQAAAHC0dTVUIAAQAAAAANnAAAAApPUy8yaB5pEwAAAjQAAABgY21hcEItjGUAAAT0AAABfGhlYWQS1WWOAAAAtAAAADZoaGVhBfMBxwAAAhAAAAAkaG10eJ9gBO8AAADsAAABJG1heHAASVAAAAAArAAAAAZuYW1lqczkZQAAApQAAAJecG9zdP+4ADIAAAZwAAAAIAAAUAAASQAAAAEAAAABAADkeHeyXw889QADA+gAAAAA2NoRKwAAAADY2hErACn/OAHgAyAAAQADAAIAAAAAAAAB9ABdAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACCAA7AcwAdwIIADMCCAA0AhwAMwISADkCCAAuAfQANAH+ACsB/gApAggANAEeAFABHgBQAR4AUAIIADQCCAAuAR4AUAEeAFABfAAxAAEAAAPo/zgAAAIcACkAKQHgAAEAAAAAAAAAAAAAAAAAAABJAAM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VsIGveKwezmNFtUAbZGeBeGofSmNiRT8aZJVnnmseSrHPYtoboAb7EvukBfcHBvdL+CEFmaySqaQa+9gWxry+yJ6dhoGcHq12oWZmGk5YW1BMXLnKHg4gCiEK+11L91IlCvdiyhWtb6hpJgoeJAoOIQogCqz3pe/3b/UBufX3bfQD+G74dxWyga94rB7NZEW0PhtlaIF4ah9KY2FFPxo7tkTPZh6MjIqKjB+TiJCIjYoIjgaCoKGHoRuanY6QoB+IgfsB+6QF9wcG9y/4IgWYppGnqhr7a/sCFVBbvMjHu7zGyLxbTk5aWk4fDvtd+AojCoz7jBUmCh8kCq1vqGkeDvtdi/cS94wjCvwKBCIKDiD3ru8BvPeuA7z4EhUn967vBw4eoDf/DAmLDAv47BT4exWcEwAHAQFBXW97ipCarPcv8+7yAfdl8gP4aPf6FfIjB+r3gwUiBi77gwWHBjH3gwUkBuP7gwUnJPcxKPsxI/cx+y/y9y/3MPP7MO4GDvtdi/cSJQr3JBZkcqOzsKSksrCkcWdlcnFmHw6up6eurm+naGhvb2hop2+uHwv3EiUK9yP4ChUiCgt3SgWxBrnmBZGVj5eZGgsB2/cSAwtobm5paqBzqoYLAAABAAAAAAAAAAAAAA==) format("woff2")}*{-webkit-tap-highlight-color:transparent}.content__container.svelte-ofx2uu{position:relative;left:50%;top:50%;transform:translate(-50%, -50%);font-family:PingFangSC, Segoe UI, Rototo, sans-serif}.content__container.withAnimation.svelte-ofx2uu{transition:opacity 0.3s linear}.content__container.unClickable.svelte-ofx2uu{pointer-events:none !important}.content__container.unClickable.svelte-ofx2uu *{pointer-events:none !important}.content__wrapper.svelte-ofx2uu{pointer-events:none;width:100%;height:100%}.content__container.hide.svelte-ofx2uu{opacity:0;pointer-events:none}.content__container.hide.svelte-ofx2uu *{pointer-events:none !important}.content__container.disable.svelte-ofx2uu{display:none}.content.svelte-ofx2uu{position:relative;width:100%;height:100%;font-size:0.75rem;line-height:1.125rem;color:#fff}.content.svelte-ofx2uu:not(.unfolded){pointer-events:none}.content.svelte-ofx2uu:not(.unfolded) *{pointer-events:none !important}.content.unfolded.svelte-ofx2uu{pointer-events:auto}')}function H0(i){let t,e;return{c(){t=V("div"),b(t,"data-info","tag content is keep folded"),b(t,"data-id",e=i[1].id)},m(n,o){z(n,t,o)},p(n,o){o&2&&e!==(e=n[1].id)&&b(t,"data-id",e)},i:Z,o:Z,d(n){n&&M(t)}}}function F0(i){let t,e,n,o,s,r,a,l,c;const d=[U0,Y0,X0,_0,W0,N0,G0],f=[];function u(h,p){return h[1].element?0:h[1].contentType==="Text"?1:h[1].contentType==="ImageText"||h[1].contentType==="Image"||h[1].contentType==="Video"?2:h[1].contentType==="Audio"?3:h[1].contentType==="Marketing"?4:h[1].contentType==="Link"||h[1].contentType==="VRLink"||h[1].contentType==="PanoLink"?5:h[1].contentType==="MediaPlane"?6:-1}return~(o=u(i))&&(s=f[o]=d[o](i)),{c(){var h,p,A;t=V("div"),e=V("div"),n=V("div"),s&&s.c(),b(n,"class","content svelte-ofx2uu"),te(n,"unfolded",(h=i[1].state)==null?void 0:h.unfolded),b(e,"class","content__wrapper svelte-ofx2uu"),b(t,"class","content__container svelte-ofx2uu"),b(t,"data-id",r=i[1].id),te(t,"disable",i[1].enabled===!1),te(t,"hide",!i[3].visible||!i[3].enabled||!i[4].visible||!((p=i[1].state)!=null&&p.visible)||((A=i[1].temporaryState)==null?void 0:A.visible)===!1),te(t,"withAnimation",i[0]),te(t,"unClickable",i[1].clickable===!1),T(t,"width",i[1].stickType==="Plane"?"100%":0),T(t,"height",i[1].stickType==="Plane"?"100%":0)},m(h,p){z(h,t,p),Q(t,e),Q(e,n),~o&&f[o].m(n,null),a=!0,l||(c=Se(t,"click",ha(i[12])),l=!0)},p(h,p){var g,v,w;let A=o;o=u(h),o===A?~o&&f[o].p(h,p):(s&&(se(),S(f[A],1,1,()=>{f[A]=null}),re()),~o?(s=f[o],s?s.p(h,p):(s=f[o]=d[o](h),s.c()),k(s,1),s.m(n,null)):s=null),(!a||p&2)&&te(n,"unfolded",(g=h[1].state)==null?void 0:g.unfolded),(!a||p&2&&r!==(r=h[1].id))&&b(t,"data-id",r),(!a||p&2)&&te(t,"disable",h[1].enabled===!1),(!a||p&26)&&te(t,"hide",!h[3].visible||!h[3].enabled||!h[4].visible||!((v=h[1].state)!=null&&v.visible)||((w=h[1].temporaryState)==null?void 0:w.visible)===!1),(!a||p&1)&&te(t,"withAnimation",h[0]),(!a||p&2)&&te(t,"unClickable",h[1].clickable===!1),p&2&&T(t,"width",h[1].stickType==="Plane"?"100%":0),p&2&&T(t,"height",h[1].stickType==="Plane"?"100%":0)},i(h){a||(k(s),a=!0)},o(h){S(s),a=!1},d(h){h&&M(t),~o&&f[o].d(),l=!1,c()}}}function G0(i){let t,e;return t=new y0({props:{tag:Te(i[1])}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Te(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function N0(i){let t,e;return t=new B0({props:{tag:Te(i[1])}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Te(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function W0(i){let t,e;return t=new _g({props:{tag:Te(i[1])}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Te(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function _0(i){let t,e;return t=new g0({props:{tag:Te(i[1])}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Te(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function X0(i){let t,e;return t=new Dg({props:{tag:Te(i[1])}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Te(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function Y0(i){let t,e;return t=new Fp({props:{tag:Te(i[1])}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Te(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function U0(i){let t,e;return t=new R0({props:{tag:Te(i[1])}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Te(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function J0(i){let t,e,n,o;const s=[F0,H0],r=[];function a(l,c){return l[5]?0:1}return t=a(i),e=r[t]=s[t](i),{c(){e.c(),n=fe()},m(l,c){r[t].m(l,c),z(l,n,c),o=!0},p(l,[c]){let d=t;t=a(l),t===d?r[t].p(l,c):(se(),S(r[d],1,1,()=>{r[d]=null}),re(),e=r[t],e?e.p(l,c):(e=r[t]=s[t](l),e.c()),k(e,1),e.m(n.parentNode,n))},i(l){o||(k(e),o=!0)},o(l){S(e),o=!1},d(l){r[t].d(l),l&&M(n)}}}function Z0(i,t,e){let n,o,s,r,a,{withAnimation:l=!1}=t,{tag:c}=t,{hooks:d}=t,{state:f}=t,{mediaStore:u}=t,{temporaryState:h}=t;Un("hooks",d),Un("mediaStore",u);let p,A;function g(w){w?d.emit("exposure",{id:r,type:"start"}):d.emit("exposure",{id:r,type:"end"})}const v=w=>d.emit("click",{event:w,target:"TagContent",tag:c});return i.$$set=w=>{"withAnimation"in w&&e(0,l=w.withAnimation),"tag"in w&&e(1,c=w.tag),"hooks"in w&&e(2,d=w.hooks),"state"in w&&e(3,f=w.state),"mediaStore"in w&&e(6,u=w.mediaStore),"temporaryState"in w&&e(4,h=w.temporaryState)},i.$$.update=()=>{var w,y,P,I,C,L,D,B,N,F,X;i.$$.dirty&2&&e(10,n=(w=c.state)==null?void 0:w.unfolded),i.$$.dirty&2&&e(9,o=(y=c.state)==null?void 0:y.visible),i.$$.dirty&26&&e(11,s=f.visible&&h.visible&&((P=c.state)==null?void 0:P.visible)),i.$$.dirty&2&&(r=c.id),i.$$.dirty&2048&&g(s),i.$$.dirty&1922&&c.hooks&&(n!==void 0&&n!==A&&(e(8,A=n),n?(C=(I=c.hooks).emit)==null||C.call(I,"unfolded"):(D=c==null?void 0:(L=c.hooks).emit)==null||D.call(L,"folded")),o!==void 0&&o!==p&&(e(7,p=o),o?(N=(B=c.hooks).emit)==null||N.call(B,"show"):(X=(F=c.hooks).emit)==null||X.call(F,"hide"))),i.$$.dirty&2&&e(5,a=(()=>!(typeof c.mergedConfig.unfoldedConfig=="object"&&c.mergedConfig.unfoldedConfig.keep==="folded"))())},[l,c,d,f,h,a,u,p,A,o,n,s,v]}class hl extends oe{constructor(t){super(),ie(this,t,Z0,J0,ne,{withAnimation:0,tag:1,hooks:2,state:3,mediaStore:6,temporaryState:4},O0)}}function q0(i){le(i,"svelte-yex9rb",'@charset "UTF-8";.tag-point-click-helper.svelte-yex9rb.svelte-yex9rb{position:absolute;pointer-events:auto;cursor:pointer;width:2.5rem;height:2.5rem;left:50%;top:50%;transform:translate(-50%, -50%)}.tag-point-wrapper.svelte-yex9rb.svelte-yex9rb{pointer-events:none;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%);z-index:-1}.tag-folded-point.svelte-yex9rb.svelte-yex9rb,.tag-unfolded-point.svelte-yex9rb.svelte-yex9rb{transition:all 0.5s}.tag-point-wrapper.svelte-yex9rb .tag-unfolded-point.svelte-yex9rb{display:flex;justify-content:center;align-items:center;position:absolute;width:100%;height:100%;border-radius:50%}.tag-point-wrapper.svelte-yex9rb .tag-unfolded-point.svelte-yex9rb:after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.3125rem;height:0.3125rem;border-radius:50%;background-color:white}.tag-point-wrapper.svelte-yex9rb .tag-unfolded-point.svelte-yex9rb:before{content:"";position:absolute;width:0.875rem;height:0.875rem;border-radius:50%;background-color:rgba(0, 0, 0, 0.2)}.tag-point-wrapper.folded.svelte-yex9rb .tag-folded-point.svelte-yex9rb{opacity:1;scale:1}.tag-point-wrapper.folded.svelte-yex9rb .tag-unfolded-point.svelte-yex9rb{opacity:0;scale:1}.tag-point-wrapper.unfolded.svelte-yex9rb .tag-folded-point.svelte-yex9rb{opacity:0;scale:0.2}.tag-point-wrapper.unfolded.svelte-yex9rb .tag-unfolded-point.svelte-yex9rb{opacity:1;scale:1}')}function K0(i){let t,e,n,o,s,r,a,l,c,d,f,u;return o=new Ke({props:{center:!0,blurRadius:15,spreadRadius:5,opacity:.3}}),c=new fl({props:{icon:i[2],width:i[1]}}),{c(){t=V("div"),e=ee(),n=V("div"),$(o.$$.fragment),s=ee(),r=V("div"),a=ee(),l=V("div"),$(c.$$.fragment),b(t,"class","tag-point-click-helper svelte-yex9rb"),b(r,"class","tag-unfolded-point svelte-yex9rb"),T(r,"transition-delay",(i[3]?i[5]:0)+"ms"),b(l,"class","tag-folded-point svelte-yex9rb"),T(l,"transition-delay",(i[3]?i[5]:0)+"ms"),b(n,"class","tag-point-wrapper svelte-yex9rb"),te(n,"unfolded",i[0]),te(n,"folded",i[3]),T(n,"width",ye(i[1])),T(n,"height",ye(i[1]))},m(h,p){z(h,t,p),z(h,e,p),z(h,n,p),q(o,n,null),Q(n,s),Q(n,r),Q(n,a),Q(n,l),q(c,l,null),d=!0,f||(u=Se(t,"click",i[4]),f=!0)},p(h,[p]){p&8&&T(r,"transition-delay",(h[3]?h[5]:0)+"ms");const A={};p&4&&(A.icon=h[2]),p&2&&(A.width=h[1]),c.$set(A),p&8&&T(l,"transition-delay",(h[3]?h[5]:0)+"ms"),(!d||p&1)&&te(n,"unfolded",h[0]),(!d||p&8)&&te(n,"folded",h[3]),p&2&&T(n,"width",ye(h[1])),p&2&&T(n,"height",ye(h[1]))},i(h){d||(k(o.$$.fragment,h),k(c.$$.fragment,h),d=!0)},o(h){S(o.$$.fragment,h),S(c.$$.fragment,h),d=!1},d(h){h&&M(t),h&&M(e),h&&M(n),K(o),K(c),f=!1,u()}}}function $0(i,t,e){let n,o,s,r;const a=ct("hooks");let{tag:l}=t,c,d=!1;const f=()=>{c!==void 0&&clearTimeout(c),d=!0,c=setTimeout(()=>{d=!1},800)},u=p=>{d||a.emit("click",{event:p,target:"TagPoint",tag:l})},h=(()=>l.contentType==="Text"&&l.data.appearance==="plane"?500:800)();return i.$$set=p=>{"tag"in p&&e(6,l=p.tag)},i.$$.update=()=>{var p,A,g,v;i.$$.dirty&64&&e(0,n=(p=l.state)==null?void 0:p.unfolded),i.$$.dirty&1&&e(3,o=!n),i.$$.dirty&64&&e(2,s=(g=(A=l.style)==null?void 0:A.point)!=null&&g.url?(v=l.style)==null?void 0:v.point:{url:mp}),i.$$.dirty&64&&e(1,r=(()=>{var y,P,I;const w=(I=(P=(y=l.style)==null?void 0:y.point)==null?void 0:P.size)!=null?I:"S";return typeof w=="number"?w:w==="S"?18:w==="M"?20:w==="L"?24:w==="XL"?28:18})())},f(),[n,r,s,o,u,h,l]}class eA extends oe{constructor(t){super(),ie(this,t,$0,K0,ne,{tag:6},q0)}}function tA(i){le(i,"svelte-bdubcv",".tag.hide.svelte-bdubcv{opacity:0;pointer-events:none}.tag.disable.svelte-bdubcv{display:none}.tag.withAnimation.svelte-bdubcv{transition:opacity 0.3s linear}.wrapper.svelte-bdubcv{position:absolute;width:0rem;height:0rem;overflow:visible;pointer-events:auto}")}function nA(i){let t;return{c(){t=V("div"),b(t,"data-info","tag content is disable")},m(e,n){z(e,t,n)},p:Z,i:Z,o:Z,d(e){e&&M(t)}}}function iA(i){let t,e;return t=new hl({props:{mediaStore:i[2],withAnimation:i[0],tag:Te(i[1]),hooks:i[14],state:i[3],temporaryState:i[4]}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&4&&(s.mediaStore=n[2]),o&1&&(s.withAnimation=n[0]),o&2&&(s.tag=Te(n[1])),o&8&&(s.state=n[3]),o&16&&(s.temporaryState=n[4]),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function oA(i){let t;return{c(){t=V("div"),b(t,"data-info","tag point is disable")},m(e,n){z(e,t,n)},p:Z,i:Z,o:Z,d(e){e&&M(t)}}}function sA(i){let t,e;return t=new eA({props:{tag:i[1]}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=n[1]),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function rA(i){let t,e,n,o,s,r,a,l,c;const d=[iA,nA],f=[];function u(g,v){return g[12]?0:1}n=u(i),o=f[n]=d[n](i);const h=[sA,oA],p=[];function A(g,v){return g[13]?0:1}return r=A(i),a=p[r]=h[r](i),{c(){t=V("div"),e=V("div"),o.c(),s=ee(),a.c(),b(e,"class","wrapper svelte-bdubcv"),b(e,"data-tag-unfolded",i[8]),b(e,"data-tag-id",i[11]),b(e,"data-content-type",l=i[1].contentType),T(e,"left",i[7]),T(e,"top",i[6]),T(e,"z-index",i[5]),b(t,"class","tag svelte-bdubcv"),b(t,"data-tag-id",i[11]),te(t,"disable",i[10]),te(t,"hide",i[9]),te(t,"withAnimation",i[0])},m(g,v){z(g,t,v),Q(t,e),f[n].m(e,null),Q(e,s),p[r].m(e,null),c=!0},p(g,[v]){let w=n;n=u(g),n===w?f[n].p(g,v):(se(),S(f[w],1,1,()=>{f[w]=null}),re(),o=f[n],o?o.p(g,v):(o=f[n]=d[n](g),o.c()),k(o,1),o.m(e,s));let y=r;r=A(g),r===y?p[r].p(g,v):(se(),S(p[y],1,1,()=>{p[y]=null}),re(),a=p[r],a?a.p(g,v):(a=p[r]=h[r](g),a.c()),k(a,1),a.m(e,null)),(!c||v&256)&&b(e,"data-tag-unfolded",g[8]),(!c||v&2048)&&b(e,"data-tag-id",g[11]),(!c||v&2&&l!==(l=g[1].contentType))&&b(e,"data-content-type",l),v&128&&T(e,"left",g[7]),v&64&&T(e,"top",g[6]),v&32&&T(e,"z-index",g[5]),(!c||v&2048)&&b(t,"data-tag-id",g[11]),(!c||v&1024)&&te(t,"disable",g[10]),(!c||v&512)&&te(t,"hide",g[9]),(!c||v&1)&&te(t,"withAnimation",g[0])},i(g){c||(k(o),k(a),c=!0)},o(g){S(o),S(a),c=!1},d(g){g&&M(t),f[n].d(),p[r].d()}}}function aA(i,t,e){let n,o,s,r,a,l,c,d,f,{withAnimation:u=!1}=t,{tag:h}=t,{mediaStore:p}=t,{state:A}=t,{temporaryState:g}=t;const v=ct("hooks");return i.$$set=w=>{"withAnimation"in w&&e(0,u=w.withAnimation),"tag"in w&&e(1,h=w.tag),"mediaStore"in w&&e(2,p=w.mediaStore),"state"in w&&e(3,A=w.state),"temporaryState"in w&&e(4,g=w.temporaryState)},i.$$.update=()=>{var w,y,P,I,C,L,D,B;i.$$.dirty&2&&e(13,n=(()=>!(h.contentType==="Link"||h.contentType==="VRLink"||h.contentType==="PanoLink"||h.contentType==="Audio"&&h.data.appearance==="plane"))()),i.$$.dirty&2&&e(12,o=(()=>h.stickType==="2DPoint")()),i.$$.dirty&2&&e(11,s=h.id),i.$$.dirty&2&&e(10,r=!((w=h.pointTagStyle)!=null&&w.leftPercent)||!((y=h.pointTagStyle)!=null&&y.topPercent)||h.enabled===!1||!h.state),i.$$.dirty&2&&e(9,a=!((P=h.state)!=null&&P.visible)||((I=h.temporaryState)==null?void 0:I.visible)===!1),i.$$.dirty&2&&e(8,l=(C=h.state)==null?void 0:C.unfolded),i.$$.dirty&2&&e(7,c=((L=h.pointTagStyle)==null?void 0:L.leftPercent)+"%"),i.$$.dirty&2&&e(6,d=((D=h.pointTagStyle)==null?void 0:D.topPercent)+"%"),i.$$.dirty&2&&e(5,f=(B=h.state)!=null&&B.unfolded?1:0)},[u,h,p,A,g,f,d,c,l,a,r,s,o,n,v]}class lA extends oe{constructor(t){super(),ie(this,t,aA,rA,ne,{withAnimation:0,tag:1,mediaStore:2,state:3,temporaryState:4},tA)}}function cA(i){le(i,"svelte-qr9nko",".tag--container.svelte-qr9nko{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;transform:translate3d(0, 0, 0)}.withAnimation.svelte-qr9nko{transition:opacity 0.3s linear}.tag--container.hide.svelte-qr9nko{opacity:0;pointer-events:none}.tag--container.hide.svelte-qr9nko *{pointer-events:none}")}function Wr(i,t,e){const n=i.slice();return n[6]=t[e],n}function _r(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=Wr(i,s,a),c=r(l);n.set(c,e[a]=Xr(c,l))}return{c(){t=V("div");for(let a=0;a<e.length;a+=1)e[a].c();b(t,"class","tag--container svelte-qr9nko"),te(t,"hide",!i[3].visible||!i[4].visible),te(t,"withAnimation",i[0])},m(a,l){z(a,t,l);for(let c=0;c<e.length;c+=1)e[c].m(t,null);o=!0},p(a,l){l&31&&(s=a[1],se(),e=qe(e,l,r,1,a,s,n,t,Ot,Xr,null,Wr),re()),(!o||l&24)&&te(t,"hide",!a[3].visible||!a[4].visible),(!o||l&1)&&te(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)S(e[l]);o=!1},d(a){a&&M(t);for(let l=0;l<e.length;l+=1)e[l].d()}}}function Xr(i,t){let e,n,o;return n=new lA({props:{state:t[3],temporaryState:t[4],withAnimation:t[0],tag:t[6],mediaStore:t[2]}}),{key:i,first:null,c(){e=fe(),$(n.$$.fragment),this.first=e},m(s,r){z(s,e,r),q(n,s,r),o=!0},p(s,r){t=s;const a={};r&8&&(a.state=t[3]),r&16&&(a.temporaryState=t[4]),r&1&&(a.withAnimation=t[0]),r&2&&(a.tag=t[6]),r&4&&(a.mediaStore=t[2]),n.$set(a)},i(s){o||(k(n.$$.fragment,s),o=!0)},o(s){S(n.$$.fragment,s),o=!1},d(s){s&&M(e),K(n,s)}}}function dA(i){let t,e,n=i[3].enabled&&_r(i);return{c(){n&&n.c(),t=fe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[3].enabled?n?(n.p(o,s),s&8&&k(n,1)):(n=_r(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(se(),S(n,1,1,()=>{n=null}),re())},i(o){e||(k(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function uA(i,t,e){let{withAnimation:n=!1}=t,{tags:o=[]}=t,{hooks:s}=t,{mediaStore:r}=t,{state:a}=t,{temporaryState:l}=t;return Un("hooks",s),i.$$set=c=>{"withAnimation"in c&&e(0,n=c.withAnimation),"tags"in c&&e(1,o=c.tags),"hooks"in c&&e(5,s=c.hooks),"mediaStore"in c&&e(2,r=c.mediaStore),"state"in c&&e(3,a=c.state),"temporaryState"in c&&e(4,l=c.temporaryState)},[n,o,r,a,l,s]}class fA extends oe{constructor(t){super(),ie(this,t,uA,dA,ne,{withAnimation:0,tags:1,hooks:5,mediaStore:2,state:3,temporaryState:4},cA)}}const hA={globalConfig:{unfoldedConfig:{autoUnfold:{strategy:"MinimumDistance",distance:{max:5}}},tag3DConfig:{ratio:.0035}},contentTypeConfig:{"Any-Audio-plane":{unfoldedConfig:{keep:"unfolded"},initialState:{unfolded:!0}},Link:{unfoldedConfig:{keep:"unfolded"},initialState:{unfolded:!0}},VRLink:{unfoldedConfig:{keep:"unfolded"},initialState:{unfolded:!0}},PanoLink:{unfoldedConfig:{keep:"unfolded"},initialState:{unfolded:!0}},MediaPlane:{unfoldedConfig:{keep:"unfolded"},visibleConfig:{alwaysShowWhenMovePano:!0}}}};function mA(i){return i.stickType==="2DPoint"||i.stickType==="3DPoint"}function pA(i){return i.stickType==="3DPoint"||i.stickType==="Plane"}class gA extends li{constructor(e){super(e);m(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 AA extends gA{constructor(e){super(e);m(this,"tags",[]);m(this,"config",hA);m(this,"raycaster",new x.Raycaster)}get isPanorama(){return this.five.currentMode==="Panorama"}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}changeContentTypeConfig(e,n,o=!0){this.config.contentTypeConfig||(this.config.contentTypeConfig={}),o?this.config.contentTypeConfig[e]=St.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;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&&l.visiblePanoIndex!=="all"&&s!==void 0&&(Array.isArray(l.visiblePanoIndex)&&!l.visiblePanoIndex.includes(s)||l.visiblePanoIndex==="current"&&s!==((f=e.fiveState)==null?void 0:f.panoIndex))||l.visibleDistance!==void 0&&l.visibleDistance!=="unLimited"&&rn(c,l.visibleDistance)===!1)return!1;if(l.intersectRaycaster!==!1&&(typeof l.intersectRaycaster!="object"||l.intersectRaycaster.enabled!==!1)){if(s===void 0)return!1;const h=(u=this.five.work.observers[s])==null?void 0:u.position;if(h===void 0)throw new Error(`getVisible(): observerPosition is ${h}`);const p=Mn(e.position).sub(h).normalize();this.raycaster.set(h,p);const[A]=this.five.model.intersectRaycaster(this.raycaster),g=(()=>{var v;return typeof l.intersectRaycaster=="object"&&(v=l.intersectRaycaster.distanceAccuracy)!=null?v:.01})();if(A&&A.distance+g<c)return!1}return!(l.angleRange&&pA(e)&&rn(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.unfoldDistance&&rn(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.autoUnfold===void 0||r.autoUnfold===!1||r.autoUnfold.enable===!1)return;if(r.autoUnfold.strategy==="ScreenPostion"){const l=this.getTagProject(e);if(l&&rn(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:p,y:A,z:g}=h;return!(Math.abs(g)>1||Math.abs(p)>1||Math.abs(A)>1)}).map(u=>({tag:u,id:u.id,tagConfig:this.getTagConfig(u).unfoldedConfig})).filter(({tag:u,tagConfig:h})=>{var p,A;return!(typeof h!="object"||h.keep||h.autoUnfold===!1||((p=h.autoUnfold)==null?void 0:p.enable)===!1||((A=h.autoUnfold)==null?void 0:A.strategy)!=="MinimumDistance")}).map(u=>he(G({},u),{distance:this.getDistance(u.tag)})).filter(({distance:u,tagConfig:h})=>{var p,A;return!(u===void 0||typeof h!="object"||h.autoUnfold===!1||((p=h.autoUnfold)==null?void 0:p.enable)===!1||((A=h.autoUnfold)==null?void 0:A.strategy)!=="MinimumDistance"||h.autoUnfold.distance&&rn(u,h.autoUnfold.distance)===!1)}).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=(()=>mA(e)?nt(e==null?void 0:e.position):Mn(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.stickType==="3DPoint"?hn(e.normal):$a(e.position))();if(!d)return;const f=new x.Vector3().copy(c).sub(Mn(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={};this.config.contentTypeConfig&&Object.keys(this.config.contentTypeConfig).forEach(r=>{const a=r;if(n[a])return;const l=a.split("-");if(l.length===1){const[c]=l;e.contentType===c&&(n[a]=this.config.contentTypeConfig[a])}if(l.length===2){const[c="Any",d="Any"]=l;(e.stickType===c||c==="Any")&&(e.contentType===d||d==="Any")&&(n[a]=this.config.contentTypeConfig[a])}if(l.length===3){const[c="Any",d,f]=l;if(d==="Audio"&&e.contentType==="Audio"){const u=e;(u.stickType===c||c==="Any")&&u.data.appearance===f&&(n[a]=this.config.contentTypeConfig[a])}}});const o=St.default({},this.config.globalConfig,...Object.values(n),e.config);return typeof o.unfoldedConfig=="object"&&(o.unfoldedConfig.disableFold&&(o.unfoldedConfig={keep:"unfolded"}),o.unfoldedConfig.disableUnfold&&(o.unfoldedConfig={keep:"folded"}),o.unfoldedConfig.keep&&(o.unfoldedConfig={keep:o.unfoldedConfig.keep})),typeof o.visibleConfig=="object"&&o.visibleConfig.keep&&(o.visibleConfig={keep:o.visibleConfig.keep}),o}can(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.keep==="unfolded"||e==="unfold"&&o.unfoldedConfig.keep==="folded")return!1}return!0}sort(e){return e.sort((n,o)=>{const s=this.getDistance(n),r=this.getDistance(o);return s===void 0||r===void 0?0:r-s})}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=Mn(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.stickType==="2DPoint"||e.stickType==="3DPoint")}filter2DPointTag(){return this.tags.filter(e=>e.stickType==="2DPoint")}filter3DPointTag(){return this.tags.filter(e=>e.stickType==="3DPoint")}filter3DTag(){return this.tags.filter(e=>e.stickType==="3DPoint"||e.stickType==="Plane")}filterPlaneTag(){return this.tags.filter(e=>e.stickType==="Plane")}updateTagConfig(e){e!=null&&e.force&&this.clearCache(),this.tags.forEach(n=>{const o=this.getTagConfig(n);n.mergedConfig=o})}}function vA(i){var t,e,n,o;if(!i.stickType){const s=(()=>i.pointType==="PointTag"&&i.dimensionType==="3D"?"3DPoint":i.pointType==="PlaneTag"?"Plane":"2DPoint")();i.stickType=s}if(i.contentType==="VRLink"||i.contentType==="PanoLink"||i.contentType==="Link"){const s=i;!((e=(t=s.data)==null?void 0:t.icon)!=null&&e.url)&&!((o=(n=s.style)==null?void 0:n.point)!=null&&o.url)&&(s.data.icon={url:"//vrlab-static.ljcdn.com/release/web/test.09dee741.png",steps:28})}return i}const ml="2.0.6",Yi=`DnalogelPlugin-PanoTagPlugin@${ml}`,bA=!1,yA=i=>`${Yi}--${i}`;class pl extends AA{constructor(e,n){super(e);m(this,"version",ml);m(this,"state",{enabled:!0,visible:!0});m(this,"params");m(this,"debug");m(this,"css3DRenderPlugin");m(this,"TagContainerSvelte");m(this,"temporaryState",{visible:!0});m(this,"mediaStore",io({currentMediaElement:null}));m(this,"isIOSWX",navigator.userAgent.toLowerCase().indexOf("micromessenger")!==-1&&navigator.userAgent.toLowerCase().indexOf("iphone")!==-1);m(this,"store",{disposers:[],disposed:!1,resizeObserverDisposerAdding:!1,css3DRenderDisposer:new Map});m(this,"disposedErrorLog",()=>{console.error(`${Yi} is disposed`)});this.params=G({debug:!1,config:this.config},n),this.debug=this.params.debug,this.config=this.params.config,zr(1,{namespace:ti.GetAudioDuration}),zr(1,{namespace:ti.PlayAudio}),Object.assign(window,{[`__PANOTAGPLUGIN_DEBUG_${Date.now()}__`]:this}),Object.assign(window,{__PANOTAGPLUGIN_DEBUG__:this})}load(e,n){return Y(this,null,function*(){var o,s;if(this.clearTags(),console.log(Yi," load:",{data:e}),this.config=St.default({},this.config,{globalConfig:(o=e.globalConfig)!=null?o:{},contentTypeConfig:(s=e.contentTypeConfig)!=null?s:{}}),this.debug)try{ep(this.five,this.tags)}catch(r){console.error(r)}return this.addTag(e.tagList,n)})}addTag(e,n){return Y(this,null,function*(){const s=(Array.isArray(e)?e:[e]).map(r=>{const a=this.getTagConfig(r);return he(G({},r),{state:G({visible:void 0,unfolded:bA},a.initialState),hooks:new be.Subscribe,clickable:a.clickable,mergedConfig:a})}).filter(r=>r.position);return s.forEach(vA),this.tags.push(...s),tp(this.five).then(()=>{var r,a,l;return 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(),!0})})}changeConfig(e,n=!0){n?this.config=St.default({},this.config,e):this.config=e,this.updateTagConfig({force:!0}),this.updateRenderAllTags()}changeGlobalConfig(e,n=!0){n?this.config.globalConfig=St.default({},this.config.globalConfig,e):this.config.globalConfig=e,this.updateTagConfig({force:!0}),this.updateRenderAllTags()}clearTags(){this.tags=[],this.clearCache(),this.disposeAllCSS3DContainer(),this.updateRenderAllTags()}show(e){return Y(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 Y(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.pauseCurrentMedia(),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=G({},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})}changeUnfoldedById(e,n){var r;const o=this.getTagById(e);if(!o)return;o.state.unfolded=n;const s=this.filterPointTag();(r=this.TagContainerSvelte)==null||r.$set({tags:s})}changeTagNormalById(e,n){const o=this.getTagById(e);!o||!o.tag3DContentSvelte||(o.tag3DContentSvelte.currentNormal=nt(n),this.updateRenderPlaneTag())}changeDataById(e,n,o=!0){const s=this.getTagById(e);!s||(o?s.data=St.default({},s.data,n):s.data=G(G({},s.data),n),this.checkPanelTag(),this.updateRenderAllTags())}changeStickTypeById(e,n,o=!0){this.changeTagById(e,n,o)}changeTagById(e,n,o=!0){const s=this.getTagById(e);!n||(o?St.default(s,n):Object.assign(s,n),(s==null?void 0:s.tag3DContentSvelte)&&(n==null?void 0:n.normal)&&(s.tag3DContentSvelte.currentNormal=nt(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({currentMediaElement:null})}setVisibleAndUnfolded(){return Y(this,arguments,function*({withAnimation:e}={withAnimation:!1}){if(!!this.isPanorama)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.pauseCurrentMedia(),this.state.visible=!1,this.updateTagContainerVisible()}handleEnable(){this.state.enabled=!0,this.store.eventListenerDisposer=this.addEventListener(),this.updateRenderAllTags()}handleDisable(){var e,n,o;this.pauseCurrentMedia(),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.loadVideoFirstFrame.bind(this),d=this.clickhandler.bind(this);return this.five.currentMode&&(this.isPanorama?(this.handleFivePanoArrived(),this.temporaryShow({withAnimation:!0})):this.temporaryHide()),e.on("wantsMoveToPano",o),e.on("modeChange",s),e.on("cameraUpdate",r),e.on("cameraUpdate",a),e.on("panoArrived",l),e.on("panoArrived",c),n.on("click",d),()=>{e.off("wantsMoveToPano",o),e.off("modeChange",s),e.off("cameraUpdate",r),e.off("cameraUpdate",a),e.off("panoArrived",l),e.off("panoArrived",c),n.off("click",d),this.store.eventListenerDisposer=void 0}}loadVideoFirstFrame(){this.isIOSWX&&this.hooks.emit("loadVideoFirstFrame")}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}=Ys(ip(()=>{!this.store.resizeObserverDisposer||o()},500),e),{observe:a,unobserve:l}=Ys(Xs(()=>n(),400),e);return s(),a(),()=>{r(),l()}}handleFiveModeChange(e){e==="Panorama"?this.five.once("panoArrived",()=>this.temporaryShow({withAnimation:!0})):this.temporaryHide()}handleFiveWantsMoveToPano(){this.tags.forEach(e=>{const n=this.getTagConfig(e);typeof n.visibleConfig=="object"&&(n.visibleConfig.keep?e.temporaryState=he(G({},e.temporaryState),{visible:n.visibleConfig.keep==="visible"}):e.temporaryState=he(G({},e.temporaryState),{visible:Boolean(n.visibleConfig.alwaysShowWhenMovePano)}))}),this.updateTagContainerVisible()}temporaryShow({withAnimation:e}={withAnimation:!1}){this.store.visibleWithAnimation=e,this.temporaryState.visible=!0,this.updateTagContainerVisible()}temporaryHide({withAnimation:e}={withAnimation:!1}){this.store.visibleWithAnimation=e,this.temporaryState.visible=!1,this.updateTagContainerVisible()}clickhandler(e){if(e.target!=="TagPoint")return;if(!e.tag.state)return console.warn("Clickhandler: params.tag.state is undefined");const n=this.can("fold",e.tag),o=this.can("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.can("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 Xs(()=>{this.setUnfoldedByCamera(),this.updateRenderAllTags()},100)}handleFiveCameraUpdate(){this.updateRenderPointTag()}handleFivePanoArrived(){return Y(this,null,function*(){yield this.setVisibleAndUnfolded(),this.tags.forEach(e=>{e.temporaryState=he(G({},e.temporaryState),{visible:!0})}),this.store.visibleWithAnimation=!0,this.updateTagContainerVisible()})}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.keep)||n.state&&(n.state.unfolded=!1)})}updateRenderPointTag(){var n;const e=this.sort(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 fA({target:o,props:{hooks:this.hooks,tags:e,state:this.state,temporaryState:this.temporaryState,mediaStore:this.mediaStore}})}}updateRenderPlaneTag(){this.sort([...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=en(this.five)),n.stickType==="3DPoint"&&!n.normal)return console.error("updateRenderPlaneTag: \u4E09\u7EF4\u70B9\u6807\u7B7E\u7F3A\u5C11\u6CD5\u5411\u91CF\uFF01");const s=n.stickType==="Plane"?n.position:np(this.five.camera.position,nt(n.position),nt(n.normal)),r=n.stickType==="Plane"?$a(n.position):nt(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 hl({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.filter2DPointTag().forEach(e=>{var n;(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.stickType==="2DPoint")&&(n==null||n(),this.store.css3DRenderDisposer.delete(e))}}}var gl=(i=>(i.Audio="Audio",i.Text="Text",i.ImageText="ImageText",i.Image="Image",i.Video="Video",i.Link="Link",i.VRLink="VRLink",i.PanoLink="PanoLink",i.Marketing="Marketing",i.MediaPlane="MediaPlane",i.Custom="Custom",i))(gl||{}),Al=(i=>(i.Two="2D",i.Three="3D",i))(Al||{}),vl=(i=>(i.PointTag="PointTag",i.PlaneTag="PlaneTag",i))(vl||{});const wA=(i,t)=>new pl(i,t);class po extends H.Object3D{constructor(e,n){var o;super();m(this,"originObject3D");m(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 CA extends po{}class EA extends po{}class PA extends po{}class IA extends PA{}class kA extends x.Group{constructor(e){super();m(this,"direction");this.direction=e||"x"}}class Yr extends x.Mesh{constructor(e,n,o){super(e,n);m(this,"direction");this.direction=o||"x"}}function xA(i,t){const{offsetWidth:e,offsetHeight:n}=t,{top:o,left:s}=t.getBoundingClientRect();return Object.assign(new x.Vector2,{x:(i.x-s)/e*2-1,y:-(i.y-o)/n*2+1})}function go(i,t,e){if(!t||!e||!i)return;const n=xA(t,e);if(Math.abs(n.x)===1||Math.abs(n.y)===1)return;const o=new x.Raycaster;return o.setFromCamera(n,i),o}function DA(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 Di extends kA{constructor(e){var d;super(e.direction);m(this,"line");m(this,"arrow");m(this,"lineHeight",.4);m(this,"arrowHeight",.1);this.name="ArrowGroup";const n=new x.Color((d=e.color)!=null?d:16214315),o=new x.MeshBasicMaterial({color:n,depthTest:!1,opacity:1,transparent:!0,side:x.DoubleSide}),s=new x.ConeGeometry(.04,.1,32),r=new Yr(s,o.clone(),e.direction);r.name=`arrow-${e.direction}`,this.arrow=r;const a=.004,l=new x.CylinderGeometry(a,a,.4,32),c=new Yr(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 Li={X:15618642,Y:4765519,Z:4227839};class tt{static get X(){return new x.Color(Li.X).convertSRGBToLinear().clone()}static get Y(){return new x.Color(Li.Y).convertSRGBToLinear().clone()}static get Z(){return new x.Color(Li.Z).convertSRGBToLinear().clone()}}class LA extends CA{constructor(e){super(e);m(this,"xArrow",new Di({direction:"x",color:tt.X}));m(this,"yArrow",new Di({direction:"y",color:tt.Y}));m(this,"zArrow",new Di({direction:"z",color:tt.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 zt(i,t){return SA(document.createElement(t!=null?t:"div"),i)}function SA(i,t){if(!t)return i;for(const e in t)e&&t[e]&&(i.style[e]=t[e]);return i}function TA(i){const t=zt(G({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 MA extends EA{constructor(e,n){var o;super(e);m(this,"yzCircle",new Si({direction:"x",color:tt.X}));m(this,"xzCircle",new Si({direction:"y",color:tt.Y}));m(this,"xyCircle",new Si({direction:"z",color:tt.Z}));m(this,"xRingHelper",new Ti({direction:"x"}));m(this,"yRingHelper",new Ti({direction:"y"}));m(this,"zRingHelper",new Ti({direction:"z"}));m(this,"xAngleHelper",new Mi({direction:"x",color:tt.X}));m(this,"yAngleHelper",new Mi({direction:"y",color:tt.Y}));m(this,"zAngleHelper",new Mi({direction:"z",color:tt.Z}));m(this,"angleTips");m(this,"container");n&&(this.container=n==null?void 0:n.container,this.angleTips=TA({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 Si extends x.Mesh{constructor(e){var n;super();m(this,"direction");m(this,"gapAngle",.02);m(this,"geometry",new x.RingGeometry(.25,.3,20,8,this.gapAngle,Math.PI/2-this.gapAngle*2));this.material=new x.MeshBasicMaterial({opacity:.6,color:(n=e.color)!=null?n:16777215,transparent:!0,side:x.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 Ti extends x.Group{constructor(e){super();m(this,"direction");this.direction=e.direction;const n=.015,o=new Array(8).fill(null).map((s,r)=>{const a=new x.RingGeometry(.25,.3,20,8,Math.PI/4*r+n,Math.PI/4-n*2),l=new x.MeshBasicMaterial({opacity:1,color:16777215,depthTest:!1,transparent:!0,side:x.DoubleSide}),c=new x.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 Mi extends x.Mesh{constructor(e){var o;super();m(this,"direction");m(this,"baseAxes");switch(e.direction){case"x":this.baseAxes=new x.Vector3(0,0,1);break;case"y":this.baseAxes=new x.Vector3(1,0,0);break;case"z":this.baseAxes=new x.Vector3(1,0,0);break}const n=.3+5e-4;this.geometry=new x.CircleGeometry(n,48,0,1e-4),this.material=new x.MeshBasicMaterial({opacity:.4,color:(o=e.color)!=null?o:16777215,depthTest:!1,transparent:!0,side:x.DoubleSide}),this.direction=e.direction,this.direction==="y"?this.rotateX(Math.PI/2):this.direction==="x"&&this.rotateY(-Math.PI/2)}}function zA(){const i=zt({width:"100%",height:"100%",left:"0",top:"0",position:"absolute",pointerEvents:"none"}),t=zt({boxSizing:"border-box",width:"100%",height:"100%",left:"0",top:"0",position:"relative",display:"flex",alignItems:"center",justifyContent:"center"}),e=zt({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:ht({cursor:"nesw-resize",left:n,bottom:n})},s={direction:"ns",element:ht({cursor:"ns-resize",bottom:n})},r={direction:"nwse",element:ht({cursor:"nwse-resize",right:n,bottom:n})},a={direction:"ew",element:ht({cursor:"ew-resize",right:n})},l={direction:"nesw",element:ht({cursor:"nesw-resize",right:n,top:n})},c={direction:"ns",element:ht({cursor:"ns-resize",top:n})},d={direction:"nwse",element:ht({cursor:"nwse-resize",left:n,top:n})},f={direction:"ew",element:ht({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 ht(i){const t=zt(G({background:"#FFFFFF",width:"9px",height:"9px",position:"absolute",pointerEvents:"none"},i)),e=zt({width:"15px",height:"15px",position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none"}),n=zt({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 BA extends IA{constructor(e,n,o,s){super(e);m(this,"points",[]);m(this,"cornerPositions",[]);m(this,"css3DInstance");m(this,"plane");m(this,"css3DRenderer",new Zt);m(this,"camera");m(this,"scene");m(this,"container");m(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 x.Vector3().subVectors(o.position,n).applyQuaternion(e).add(n);o.position.copy(r),o.applyQuaternion(e)}if(this.plane){const r=new x.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 x.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 a;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}=zA();this.points=r.map((l,c)=>({direction:l.direction,point:l.element,position:this.calculatePointPosition(e)[c]})),o.insertBefore(s,(a=o.children[0])!=null?a:null),this.updatePosition()}getCornerPositions(){const{originObject3D:e}=this;if(e.isCSS3DObjectPlus)return e.cornerPoints;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 x.Vector3;function pe(i,t){this._camera=i||null,this._domElement=t||document,this._raycaster=new x.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)}pe.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)};pe.eventNames=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","contextmenu","touchstart","touchend"];pe.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}};pe.prototype._objectCtxInit=function(i){i._3xDomEvent={}};pe.prototype._objectCtxDeinit=function(i){delete i._3xDomEvent};pe.prototype._objectCtxIsInit=function(i){return!!i._3xDomEvent};pe.prototype._objectCtxGet=function(i){return i._3xDomEvent};pe.prototype.camera=function(i){return i&&(this._camera=i),this._camera};pe.prototype.bind=function(i,t,e,n){console.assert(pe.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)};pe.prototype.addEventListener=pe.prototype.bind;pe.prototype.unbind=function(i,t,e,n){console.assert(pe.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)};pe.prototype.removeEventListener=pe.prototype.unbind;pe.prototype._bound=function(i,t){var e=this._objectCtxGet(t);return e?!!e[i+"Handlers"]:!1};pe.prototype._onMove=function(i,t,e,n){var o=this._boundObjs[i];if(!(o===void 0||o.length===0)){var s=new x.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)}};pe.prototype._onEvent=function(i,t,e,n){var o=this._boundObjs[i];if(!(o===void 0||o.length===0)){var s=new x.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)}}};pe.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)}};pe.prototype._onMouseDown=function(i){return this._onMouseEvent("mousedown",i)};pe.prototype._onMouseUp=function(i){return this._onMouseEvent("mouseup",i)};pe.prototype._onMouseEvent=function(i,t){var e=this._getRelativeMouseXY(t);this._onEvent(i,e.x,e.y,t)};pe.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)};pe.prototype._onClick=function(i){this._onMouseEvent("click",i)};pe.prototype._onDblClick=function(i){this._onMouseEvent("dblclick",i)};pe.prototype._onContextmenu=function(i){this._onMouseEvent("contextmenu",i)};pe.prototype._onTouchStart=function(i){return this._onTouchEvent("touchstart",i)};pe.prototype._onTouchEnd=function(i){return this._onTouchEvent("touchend",i)};pe.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)}};pe.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 Lt=null;class Ao{constructor(t,e,n,o,s,r,a){m(this,"hooks",new $t);m(this,"helperObject3D");m(this,"originObject3D");m(this,"camera");m(this,"model");m(this,"scene");m(this,"container");m(this,"domEvents");m(this,"isDragging",!1);m(this,"onRender");m(this,"enabled",!1);m(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 pe(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 x.Mesh&&(e.material.opacity=t),e.isCSS3DObjectPlus){const n=e;n.container.style.opacity=t.toString()}this.render()}restoreOpacity(){if(Lt===null)return;const t=this.originObject3D;if(t instanceof x.Mesh&&(t.material.opacity=Lt.opacity),t.isCSS3DObjectPlus){const e=t;e.container.style.opacity=Lt.opacity.toString()}this.render()}setOriginOpacityProperty(){var t,e;if(Lt===null){const n=this.originObject3D;n instanceof x.Mesh&&(Lt={opacity:n.material.opacity}),n instanceof ta&&(Lt={opacity:(t=n.container.style.opacity)!=null?t:1}),n.isCSS3DObjectPlus&&(Lt={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(We),s=[];for(const r of o)if(r instanceof x.Mesh||r instanceof x.Group){const a=r instanceof x.Group?r.children.filter(u=>u instanceof x.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 VA extends Ao{constructor(...e){super(...e);m(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 x.Vector3(1,0,0).applyQuaternion(this.helperObject3D.quaternion),r=new x.Vector3(0,1,0).applyQuaternion(this.helperObject3D.quaternion),a=new x.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 x.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=go(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 x.Vector3);if(!a)return;const l=a.clone().projectOnVector(o),c=l.clone().sub(s),d=new x.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 zi{constructor(t,e,n,o){m(this,"helperController");m(this,"five");m(this,"onFiveWantsTapGesture",t=>{if(!this.helperController)return;const e=this.helperController.onWantsTapGesture(t);return this.five.needsRender=!0,e});m(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 jA="v1.0.1",QA="Object3DHelper",vo=`${QA}@${jA}`,RA=()=>{console.error(`${vo} is disposed`)},OA=()=>{console.warn(`${vo} is disabled`)},HA=()=>{console.error(`${vo} is disabled`)};class FA{constructor(t,e){m(this,"controllers",{});m(this,"state",{visible:!0,enabled:!0,disposed:!1});m(this,"hooks",new $t);m(this,"helpers");m(this,"eventListener",{});m(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))});m(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))});m(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 Y(this,null,function*(){this.setState({visible:!0},t)})}hide(t){return Y(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 RA();if(!this.state.enabled&&t.enabled!==!0&&t.disposed!==!0)return HA();const n=G({},this.state);this.state=G(G({},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=G(G({},this.controllers),t),this.addEventListener(),this.setState(this.state)}addHelpers(t){this.helpers=G(G({},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&&OA()}}class GA extends Ao{constructor(...e){super(...e);m(this,"startInfo");m(this,"lastRotation");m(this,"rotations",[]);m(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 x.Vector3(1,0,0).applyQuaternion(this.helperObject3DQuaternion),d=new x.Vector3(0,1,0).applyQuaternion(this.helperObject3DQuaternion),f=new x.Vector3(0,0,1).applyQuaternion(this.helperObject3DQuaternion),u=(()=>{switch(o){case"x":return c;case"y":return d;case"z":return f}})(),h=new x.Plane().setFromNormalAndCoplanarPoint(u,s),p=new x.Vector3;h.projectPoint(s.clone(),p);const A=p.clone().sub(r),g=A.clone(),v=A.angleTo(a.baseAxes);this.setAngleHelperStart(o,v),this.setAngleHelperLength(o,0),this.rotations.push({vector:A.clone(),direction:!0}),this.startInfo={direction:o,startVector:A,staticStartVector:g,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=go(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 x.Vector3);if(!c)return;const d=l.position.clone(),f=new x.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 A=this.rotations[this.rotations.length-1],g=this.rotations[this.rotations.length-2],v=u.angleTo(g.vector),w=u.angleTo(A.vector),y=A.vector.angleTo(g.vector);if(y===0||w===0||v===0)return;if(v>w&&v>y)return A.direction;if(v<y&&w<y||v<w&&w>y)return!A.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 p=new x.Quaternion().setFromUnitVectors(n.clone().normalize(),u.clone().normalize());l.applyQuaternion(p),this.helperObject3D.applyHelperQuaternion(p),this.helperObject3DQuaternion.premultiply(p),this.hooks.emit("rotateUpdate",{quaternion:p,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 x.Mesh&&o.geometry instanceof x.CircleGeometry){const{radius:s,segments:r,thetaLength:a}=o.geometry.parameters;o.geometry=new x.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 x.Mesh&&r.geometry instanceof x.CircleGeometry){const{radius:a,thetaStart:l}=r.geometry.parameters,c=Math.ceil(Math.abs(s)*(40/(2*Math.PI)));r.geometry=new x.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 NA extends Ao{constructor(...e){super(...e);m(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 x.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=go(this.camera,e,this.container);if(!n)return this.dragEnd();this.scale(n),console.log("%c RectangleScaleController dragging","color: #49de1b")}scale(e){var B,N;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||DA(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=F=>{const X=new H.Vector3(0,0,0);if(!this.startInfo)return X;const j=(F==="ew"?f:u).clone(),E=c.clone().projectOnVector(j),R=a.clone().projectOnVector(j),O=l.clone().projectOnVector(j);if(R.equals(E))return X;if(F==="ns"&&typeof this.startInfo.dragPointInCenterBottom!="boolean"){const _=new H.Vector3().subVectors(R,O),J=_.x<0&&j.x>=0,de=_.y<0&&j.y>=0,ue=_.z<0&&j.z>=0;this.startInfo.dragPointInCenterBottom=J||de||ue}if(F==="ew"&&typeof this.startInfo.dragPointInCenterLeft!="boolean"){const _=new H.Vector3().subVectors(R,O),J=_.x<0&&j.x>=0,de=_.y<0&&j.y>=0,ue=_.z<0&&j.z>=0;this.startInfo.dragPointInCenterLeft=J||de||ue}const W=new H.Vector3().subVectors(R,E),U=W.length();return U>.3?(console.warn("offset.length() > 0.3, skipped",U),X):W},p=h("ew"),A=h("ns"),g=()=>{const F=p;this.helperObject3D.cornerPositions.forEach((X,j)=>{var E;(E=this.startInfo)!=null&&E.dragPointInCenterLeft?(j===0||j===3)&&X.add(F):(j===1||j===2)&&X.add(F)})},v=()=>{const F=A;this.helperObject3D.cornerPositions.forEach((X,j)=>{var E;(E=this.startInfo)!=null&&E.dragPointInCenterBottom?(j===0||j===1)&&X.add(F):(j===2||j===3)&&X.add(F)})};switch(d){case"ew":g();break;case"ns":v();break;case"nesw":case"nwse":g(),v()}const w=new H.Vector3().subVectors(r[1],r[0]).length()/f.length(),y=new H.Vector3().subVectors(r[3],r[0]).length()/u.length(),P=new H.Vector3(w,y,1),I=new x.Matrix4().scale(P);n.isCSS3DObjectPlus?n.applyScaleMatrix4(I):n.scale.applyMatrix4(I),o.position.copy(a);const C=new H.Vector3().addVectors(r[0],r[2]).divideScalar(2),L=new H.Vector3().subVectors(C,l),D=new x.Matrix4().setPosition(L);n.applyMatrix4(D),(B=this.helperObject3D.css3DInstance)==null||B.css3DObject.applyMatrix4(D),(N=this.helperObject3D.plane)==null||N.applyMatrix4(D),this.hooks.emit("scaleUpdate",{matrix4:I,helperOrigin:l}),this.hooks.emit("positionUpdate",{matrix4:D}),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 WA extends NA{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 bo="v1.0.0",Ui="Object3DHelperPlugin",pi=`${Ui}@${bo}`,_A=()=>{console.error(`${pi} is disposed`)},XA=()=>{console.warn(`${pi} is disabled`)},YA=()=>{console.error(`${pi} is disabled`)};class bl extends li{constructor(e){super(e);m(this,"version",bo);m(this,"name",Ui);m(this,"state",{visible:!0,enabled:!0,disposed:!1});m(this,"objectHelperMap",new Map);m(this,"css3DObjectParentMap",new Map);m(this,"css3DRender");this.five=e,this.css3DRender=new Zt(this.five.scene),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,{[`__${Ui.toUpperCase()}_DEBUG__`]:this})}show(e){return Y(this,null,function*(){this.setState({visible:!0},e)})}hide(e){return Y(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 _A();if(!this.state.enabled&&e.enabled!==!0&&e.disposed!==!0)return YA();const o=G({},this.state);this.state=G(G({},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 FA;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 LA(e),u=new zi(this.five,VA,e,f);o.addControllers({moveController:u.helperController})}if(l){let f;s&&r&&(f={container:s});const u=new MA(e,f),h=new zi(this.five,GA,e,u);o.addControllers({rotateController:h.helperController})}if(c&&s){const f=new BA(e,s,r,this.five.scene),u=new zi(this.five,WA,e,f);o.addControllers({scaleController:u.helperController})}e.isCSS3DObjectPlus&&ia(this.five).then(()=>{var f,u;if(e.isCSS3DObjectPlus){const h=e,p=(f=this.css3DRender.behindModeCSS3DRenderer.wrapper)!=null?f:oa(this.five);p&&e&&(this.css3DObjectParentMap.set(h,h.parent),h.removeFromParent(),this.css3DRender.behindModeCSS3DRenderer.setWrapper(p),(u=this.css3DRender.getBehindCSS3DObjectGroup())==null||u.add(h),this.css3DRender.render(this.five.camera))}})}removeObject3DHelper(e){const n=this.objectHelperMap.get(e);if(!!n){if(e.isCSS3DObjectPlus){const o=e,s=this.css3DObjectParentMap.get(o);s==null||s.add(o),this.css3DRender.render(this.five.camera)}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&&XA()}}const UA=i=>new bl(i);exports.CSS3DRender=Zt;exports.CSS3DRenderPlugin=en;exports.CameraMovementEffect=Sa;exports.CameraMovementPlugin=cf;exports.ContentType=gl;exports.CruisePlugin=Ym;exports.CruisePluginController=uo;exports.DIRECTION=Yt;exports.DISPLAY_STRATEGY_TYPE=Tt;exports.DimensionType=Al;exports.FLOOR_PLAN_ATTACHED_TO=gt;exports.FLOOR_TYPE_MAP=Zu;exports.GuideLinePlugin=Za;exports.ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE=Mt;exports.ItemLabelPlugin=vm;exports.Magnifier=Ba;exports.MapviewFloorplanPlugin=Du;exports.ModelChassisCompassPlugin=$u;exports.ModelEntryDoorGuidePlugin=nf;exports.ModelFloorplanPlugin=Pu;exports.ModelItemLabelPlugin=Kh;exports.ModelRoomLabelPlugin=jc;exports.ModelTVVideoPlugin=tm;exports.ModelViewPlugin=Xl;exports.Object3DHelperController=bl;exports.Object3DHelperPlugin=UA;exports.PLUGIN=pi;exports.PaintBrush=_l;exports.PaintBrushTypeEnum=et;exports.PanoCompassPlugin=Sf;exports.PanoCursorRaycasterPlugin=dc;exports.PanoDoorLabelPlugin=Tm;exports.PanoFloorplanRadarPlugin=Uu;exports.PanoMeasurePlugin=kh;exports.PanoMeasurePluginLine=Ft;exports.PanoMeasurePluginModel=fi;exports.PanoMeasurePluginPoint=_e;exports.PanoMeasurePluginPolyline=ui;exports.PanoRulerPlugin=mf;exports.PanoRulerProPlugin=If;exports.PanoSpatialTagPlugin=Fh;exports.PanoTagPlugin=wA;exports.PanoTagPluginController=pl;exports.PointType=vl;exports.ROOM_FETILE_TYPE_MAP=Ju;exports.ROOM_TYPE_MAP=qu;exports.Rotation=Ue;exports.TopviewFloorplanPlugin=Su;exports.Util=Fg;exports.VERSION=bo;exports.itemLabelPluginServerParams=bm;exports.modelItemLabelPluginServerParams=$h;exports.modelRoomLabelPluginServerParams=Qc;exports.pluginFlag=yA;
|
|
559
|
+
`;function Qg(){const i=new x.PlaneGeometry(.4,.4),t=Bg,e=new x.TextureLoader().load(t);e.encoding=x.sRGBEncoding;const n=new x.MeshBasicMaterial({map:e,transparent:!0,depthTest:!1});return new x.Mesh(i,n)}function Rg(){const i=new x.CurvePath;i.add(new x.LineCurve3(new x.Vector3(0,0,0),new x.Vector3(0,0,.1)));const t=new x.TubeGeometry(i,8,.003),e=new x.ShaderMaterial({vertexShader:Vg,fragmentShader:jg,depthTest:!1,transparent:!0});return new x.Mesh(t,e)}function Og(){const i=new x.SphereGeometry(.01,20,20),t=new x.MeshBasicMaterial({color:10349931,depthTest:!1,transparent:!0,side:x.DoubleSide}),e=new x.Mesh(i,t);return e.position.set(0,0,.1),e}class al extends x.Object3D{constructor(){super();m(this,"planeMesh");m(this,"lineMesh");m(this,"ballMesh");this.planeMesh=Qg(),this.lineMesh=Rg(),this.ballMesh=Og(),this.add(this.planeMesh,this.lineMesh,this.ballMesh)}updateWithIntersect(e){if(!e.face)return;const n=new x.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 ll{constructor(t){m(this,"five");m(this,"contentElement",document.createElement("div"));m(this,"animeIns");m(this,"container");m(this,"css3DObject");m(this,"disposeCss3DObject");m(this,"state",{enabled:!1});this.five=t;const n=.4/2,s=en(t).create3DDomContainer([[-n,n,0],[-n,-n,0],[n,-n,0],[n,n,0]].map(r=>new x.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(${Oa})`,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 x.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 co({progress:0}).to({progress:[1,0]}).duration(500).easing(ni.Easing.Quadratic.InOut).onUpdate(({progress:e})=>{}).play()}dispose(){var t;(t=this.disposeCss3DObject)==null||t.call(this)}}class Hg{constructor(t,e){m(this,"five");m(this,"hooks",new be.Subscribe);m(this,"magnifier",null);m(this,"pointHelper",null);m(this,"pointDomHelper",null);m(this,"contentDom",document.createElement("div"));m(this,"state",{enabled:!1});m(this,"group",new x.Group);this.five=t,this.magnifier=(e==null?void 0:e.magnifier)===void 0?new sl(t,{dragEnabled:!0}):null,this.pointHelper=(e==null?void 0:e.pointHelper)===void 0?new al:null,this.pointDomHelper=(e==null?void 0:e.pointDomHelper)===void 0?new ll(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 Fg=Object.freeze(Object.defineProperty({__proto__:null,Interval:Xi,Rectangle:Lg,Magnifier:sl,getCoordsFromClient:Tg,getCoordsFromElement:rl,getRaycasterFromFivePointer:Mg,getIntersectFromRelativePosition:zg,PointHelper:al,PointDomHelper:ll,FivePointSelector:Hg,isNil:Rm,notNil:We,BetterTween:co,tweenProgress:La,nextFrame:ci,requestAnimationFrameInterval:di,getFrameTime:sf},Symbol.toStringTag,{value:"Module"}));function Gg(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 Cr(i,t,e){const n=i.slice();return n[0]=t[e],n}function Er(i,t,e){const n=i.slice();return n[0]=t[e],n}function Pr(i){let t,e=i[0]+"",n;return{c(){t=V("div"),n=Ee(e),b(t,"class","base-tag primary-tag svelte-8mby9k")},m(o,s){z(o,t,s),Q(t,n)},p(o,s){s&4&&e!==(e=o[0]+"")&&xe(n,e)},d(o){o&&M(t)}}}function Ir(i){let t,e=i[0]&&Pr(i);return{c(){e&&e.c(),t=fe()},m(n,o){e&&e.m(n,o),z(n,t,o)},p(n,o){n[0]?e?e.p(n,o):(e=Pr(n),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},d(n){e&&e.d(n),n&&M(t)}}}function kr(i){let t,e=i[0]+"",n;return{c(){t=V("div"),n=Ee(e),b(t,"class","base-tag secondary-tag svelte-8mby9k")},m(o,s){z(o,t,s),Q(t,n)},p(o,s){s&4&&e!==(e=o[0]+"")&&xe(n,e)},d(o){o&&M(t)}}}function xr(i){let t,e=i[0]&&kr(i);return{c(){e&&e.c(),t=fe()},m(n,o){e&&e.m(n,o),z(n,t,o)},p(n,o){n[0]?e?e.p(n,o):(e=kr(n),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},d(n){e&&e.d(n),n&&M(t)}}}function Dr(i){let t,e,n=i[2].price.value+"",o,s,r=i[2].price.unit&&Lr(i);return{c(){t=V("div"),e=V("span"),o=Ee(n),s=ee(),r&&r.c(),b(e,"class","value svelte-8mby9k"),b(t,"class","price svelte-8mby9k")},m(a,l){z(a,t,l),Q(t,e),Q(e,o),Q(t,s),r&&r.m(t,null)},p(a,l){l&4&&n!==(n=a[2].price.value+"")&&xe(o,n),a[2].price.unit?r?r.p(a,l):(r=Lr(a),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(a){a&&M(t),r&&r.d()}}}function Lr(i){let t,e=i[2].price.unit+"",n;return{c(){t=V("span"),n=Ee(e),b(t,"class","unit svelte-8mby9k")},m(o,s){z(o,t,s),Q(t,n)},p(o,s){s&4&&e!==(e=o[2].price.unit+"")&&xe(n,e)},d(o){o&&M(t)}}}function Sr(i){let t,e=i[2].highlightText+"",n;return{c(){t=V("div"),n=Ee(e),b(t,"class","goto-button goto-icon svelte-8mby9k")},m(o,s){z(o,t,s),Q(t,n)},p(o,s){s&4&&e!==(e=o[2].highlightText+"")&&xe(n,e)},d(o){o&&M(t)}}}function Ng(i){var X,j;let t,e,n,o,s,r,a,l,c,d,f,u,h,p,A=i[2].title+"",g,v,w,y=We((X=i[2].price)==null?void 0:X.value)&&((j=i[2].price)==null?void 0:j.value)!=="",P,I;e=new Ke({props:{visible:i[1],outDelay:500,left:61,bottom:87,blurRadius:150,spreadRadius:75}});let C=i[2].brandTags||[],L=[];for(let E=0;E<C.length;E+=1)L[E]=Ir(Er(i,C,E));let D=i[2].tags||[],B=[];for(let E=0;E<D.length;E+=1)B[E]=xr(Cr(i,D,E));let N=y&&Dr(i),F=i[2].highlightText&&Sr(i);return{c(){var E;t=V("div"),$(e.$$.fragment),n=ee(),o=V("div"),s=ee(),r=V("div"),a=V("img"),c=ee(),d=V("div");for(let R=0;R<L.length;R+=1)L[R].c();f=ee();for(let R=0;R<B.length;R+=1)B[R].c();u=ee(),h=V("div"),p=V("div"),g=Ee(A),v=ee(),w=V("div"),N&&N.c(),P=ee(),F&&F.c(),b(o,"class","line svelte-8mby9k"),T(o,"transition-delay",i[1]?Bn+"ms":Vn+Mr-Tr-40+"ms"),b(a,"class","headerImage svelte-8mby9k"),Ne(a.src,l=i[2].headerPictureUrl)||b(a,"src",l),b(a,"alt",""),b(d,"class","tag svelte-8mby9k"),b(p,"class","text svelte-8mby9k"),b(h,"class","title svelte-8mby9k"),b(w,"class","footer svelte-8mby9k"),T(w,"height",We((E=i[2].price)==null?void 0:E.value)&&i[2].highlightText?void 0:"1rem"),b(r,"class","content svelte-8mby9k"),T(r,"transition-delay",i[1]?Bn+Vn+"ms":"0ms"),b(t,"class","marketing svelte-8mby9k"),te(t,"unfolded",i[1]),te(t,"folded",i[3])},m(E,R){z(E,t,R),q(e,t,null),Q(t,n),Q(t,o),Q(t,s),Q(t,r),Q(r,a),Q(r,c),Q(r,d);for(let O=0;O<L.length;O+=1)L[O].m(d,null);Q(d,f);for(let O=0;O<B.length;O+=1)B[O].m(d,null);Q(r,u),Q(r,h),Q(h,p),Q(p,g),Q(r,v),Q(r,w),N&&N.m(w,null),Q(w,P),F&&F.m(w,null),I=!0},p(E,[R]){var W,U,_;const O={};if(R&2&&(O.visible=E[1]),e.$set(O),R&2&&T(o,"transition-delay",E[1]?Bn+"ms":Vn+Mr-Tr-40+"ms"),(!I||R&4&&!Ne(a.src,l=E[2].headerPictureUrl))&&b(a,"src",l),R&4){C=E[2].brandTags||[];let J;for(J=0;J<C.length;J+=1){const de=Er(E,C,J);L[J]?L[J].p(de,R):(L[J]=Ir(de),L[J].c(),L[J].m(d,f))}for(;J<L.length;J+=1)L[J].d(1);L.length=C.length}if(R&4){D=E[2].tags||[];let J;for(J=0;J<D.length;J+=1){const de=Cr(E,D,J);B[J]?B[J].p(de,R):(B[J]=xr(de),B[J].c(),B[J].m(d,null))}for(;J<B.length;J+=1)B[J].d(1);B.length=D.length}(!I||R&4)&&A!==(A=E[2].title+"")&&xe(g,A),R&4&&(y=We((W=E[2].price)==null?void 0:W.value)&&((U=E[2].price)==null?void 0:U.value)!==""),y?N?N.p(E,R):(N=Dr(E),N.c(),N.m(w,P)):N&&(N.d(1),N=null),E[2].highlightText?F?F.p(E,R):(F=Sr(E),F.c(),F.m(w,null)):F&&(F.d(1),F=null),R&4&&T(w,"height",We((_=E[2].price)==null?void 0:_.value)&&E[2].highlightText?void 0:"1rem"),R&2&&T(r,"transition-delay",E[1]?Bn+Vn+"ms":"0ms"),(!I||R&2)&&te(t,"unfolded",E[1]),(!I||R&8)&&te(t,"folded",E[3])},i(E){I||(k(e.$$.fragment,E),I=!0)},o(E){S(e.$$.fragment,E),I=!1},d(E){E&&M(t),K(e),lt(L,E),lt(B,E),N&&N.d(),F&&F.d()}}}const Bn=400,Tr=500,Vn=180,Mr=500;function Wg(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 _g extends oe{constructor(t){super(),ie(this,t,Wg,Ng,ne,{tag:0},Gg)}}const Kt="data:audio/mpeg;base64,//uQxAAAAAAAAAAAAAAAAAAAAAAASW5mbwAAAA8AAAADAAAGhgBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVWqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqr///////////////////////////////////////////8AAAA5TEFNRTMuOThyAc0AAAAAAAAAABSAJAiqQgAAgAAABobxtI73AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//uQxAACFEII9ACZ/sJZwWEoEb8w/////N//////JcxjHjf+7/v/H2PzCCFAiDtGeyBCIx7bJJ1mmEEMy6g8mm2c8nrGABB4h2Mkmn//4z/73u773R5qHHu/j/w7Kxkzh5lWRWdsifCkNAnY9Zc1HvDAhjhSHdFkHFzLmabt/AQxSg2wwzLhHIJOBnAWwVY4zrhIYhhc2kvhYDfQ4hDi2Gmh5KyFn8EcGIrHAngNgIwVIEMf5bzbAiTRoAD///8z/KVhkkWEle6IX+d/z4fvH3BShK1e5kmjkCMoxVmXhd4ROlTKo3iipasvTilY21q19ta30/v/0/idPX1v8PNxJL6ramnOVsdvMv2akO0iSYIzdJFirtzW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VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVU=",un={};var ti=(i=>(i.Default="default",i.GetAudioDuration="getAudioDuration",i.PlayAudio="playAudio",i))(ti||{});function cl(i,t){const e=(t==null?void 0:t.namespace)||"default",n=un[e]||(un[e]=[]);let o=n.find(s=>!s.realSrc||s.realSrc===Kt);return o||(console.warn("\u672A\u627E\u5230\u7F13\u5B58\u97F3\u9891\uFF0C\u5DF2\u65B0\u5EFA",un),o=new mo(Kt),n.push(o)),i&&(o.src=i),o}function Xg(i){return Y(this,null,function*(){const t=(()=>i instanceof mo?i:cl(i,{namespace:"getAudioDuration"}))(),e=yield new Promise(n=>{t.duration?t.isBlankAudio?n(0):n(t.duration):(t.addEventListener("loadedmetadata",()=>{t.isBlankAudio?n(0):n(t.duration)}),t.addEventListener("canplaythrough",()=>{t.isBlankAudio?n(0):n(t.duration)}))});return typeof i=="string"&&t.clear(),e})}function zr(i,t){const e=(t==null?void 0:t.namespace)||"default",n=un[e]||(un[e]=[]),o=i-n.length;if(!(o<=0))for(let s=0;s<o;s++)n.push(new mo(Kt))}class mo extends Audio{constructor(e){super(e);m(this,"preload","auto");m(this,"realSrc","");m(this,"inited",!1);m(this,"removeDocumentEventListener");this.realSrc=e!=null?e:"",super.addEventListener("ended",()=>{this.src=""});const n=()=>Yg(this);document.addEventListener("click",n),document.addEventListener("touchend",n),this.removeDocumentEventListener=()=>{document.removeEventListener("click",n),document.removeEventListener("touchend",n)}}get isBlankAudio(){return this.realSrc===Kt||!this.realSrc}get src(){return super.src}set src(e){super.src=e,this.realSrc=e}clear(){this.src=Kt,this.currentTime=0}}function Yg(i){!i||i.inited||(i.src&&(i.inited=!0,i.removeDocumentEventListener()),i.src===Kt&&i.play())}class Ug extends Audio{constructor(e){super();m(this,"sharedAudioSrc");m(this,"sharedAudioPaused",!0);m(this,"sharedAudioCurrentTime",0);m(this,"tryplaying",!1);m(this,"audioInstance");m(this,"eventListenerDisposer");this.sharedAudioSrc=e}get paused(){var e;return(e=this.sharedAudioPaused)!=null?e:!0}get currentTime(){return this.sharedAudioCurrentTime}play(){return Y(this,null,function*(){var e,n,o;this.tryplaying||(this.tryplaying=!0,(!this.audioInstance||((e=this.audioInstance)==null?void 0:e.realSrc)!==this.sharedAudioSrc)&&(this.audioInstance=cl(this.sharedAudioSrc,{namespace:ti.PlayAudio})),this.audioInstance.currentTime=(n=this.currentTime)!=null?n:0,(o=this.eventListenerDisposer)==null||o.call(this),this.eventListenerDisposer=this.addEventListeners(),this.audioInstance.play().then(()=>{this.sharedAudioPaused=!1}).catch(s=>{this.pause(),console.warn(s)}).finally(()=>{this.tryplaying=!1}))})}pause(){!this.audioInstance||this.paused||(this.sharedAudioPaused=!0,this.audioInstance.addEventListener("pause",()=>{var e;(e=this.eventListenerDisposer)==null||e.call(this)},{once:!0}),this.audioInstance.pause())}dispose(){this.clear(),this.audioInstance=void 0}clear(){var e;(e=this.audioInstance)==null||e.clear()}addEventListeners(){const e=this.audioInstance;if(!e)return;const n=u=>{var h;this.sharedAudioCurrentTime=e.currentTime,(h=this.ontimeupdate)==null||h.call(this,u)},o=u=>{var h;return(h=this.onplay)==null?void 0:h.call(this,u)},s=u=>{var h;(h=this.onpause)==null||h.call(this,u),this.clear()},r=u=>{var h;(h=this.onended)==null||h.call(this,u),this.sharedAudioCurrentTime=0},a=u=>{var h;return(h=this.onerror)==null?void 0:h.call(this,u)},l=u=>{var h;return(h=this.oncanplay)==null?void 0:h.call(this,u)},c=u=>{var h;return(h=this.oncanplaythrough)==null?void 0:h.call(this,u)},d=u=>{var h;return(h=this.onloadeddata)==null?void 0:h.call(this,u)},f=u=>{var h;return(h=this.onloadedmetadata)==null?void 0:h.call(this,u)};return e.addEventListener("timeupdate",n),e.addEventListener("play",o),e.addEventListener("pause",s),e.addEventListener("ended",r),e.addEventListener("error",a),e.addEventListener("canplay",l),e.addEventListener("canplaythrough",c),e.addEventListener("loadeddata",d),e.addEventListener("loadedmetadata",f),()=>{e.removeEventListener("timeupdate",n),e.removeEventListener("play",o),e.removeEventListener("pause",s),e.removeEventListener("ended",r),e.removeEventListener("error",a),e.removeEventListener("canplay",l),e.removeEventListener("canplaythrough",c),e.removeEventListener("loadeddata",d),e.removeEventListener("loadedmetadata",f)}}}function Jg(i){le(i,"svelte-13e7hxv",".audio.svelte-13e7hxv{pointer-events:auto;cursor:pointer;width:100%;height:100%}")}function Zg(i){let t,e,n,o;const s=i[8].default,r=it(s,i,i[7],null);return{c(){t=V("div"),r&&r.c(),b(t,"class","audio svelte-13e7hxv"),b(t,"style",i[0])},m(a,l){z(a,t,l),r&&r.m(t,null),e=!0,n||(o=Se(t,"click",ha(i[1])),n=!0)},p(a,[l]){r&&r.p&&(!e||l&128)&&st(r,s,a,a[7],e?ot(s,a[7],l,null):rt(a[7]),null),(!e||l&1)&&b(t,"style",a[0])},i(a){e||(k(r,a),e=!0)},o(a){S(r,a),e=!1},d(a){a&&M(t),r&&r.d(a),n=!1,o()}}}function qg(i,t,e){let{$$slots:n={},$$scope:o}=t,{url:s}=t,{enable:r=!0}=t,{style:a=""}=t,{hooksInfo:l}=t;const c=oi(),d=ct("hooks"),f=ct("mediaStore");let u,h=!0;function p(){e(5,u.onplay=g=>{d.emit("playStateChange",G({event:g,state:"playing",mediaInstance:u},l)),c("play"),e(6,h=!1)},u),e(5,u.onpause=g=>{d.emit("playStateChange",G({event:g,state:"paused",mediaInstance:u},l)),c("pause"),e(6,h=!0)},u),e(5,u.onloadedmetadata=g=>{typeof u.duration=="number"&&!Number.isNaN(u.duration)&&c("duration",u.duration)},u),e(5,u.ontimeupdate=g=>{c("timeupdate",u.currentTime)},u)}f.subscribe(({currentMediaElement:g})=>{g!==u&&(h||u==null||u.pause())});function A(g){!u||(d.emit("click",G({event:g,target:"AudioTagPlayIcon",audioInstance:u},l)),f.set({currentMediaElement:u}),d.emit("playStateChange",G({event:g,state:u.paused?"playing":"paused",mediaInstance:u},l)),u.paused?u.play():u.pause())}return i.$$set=g=>{"url"in g&&e(2,s=g.url),"enable"in g&&e(3,r=g.enable),"style"in g&&e(0,a=g.style),"hooksInfo"in g&&e(4,l=g.hooksInfo),"$$scope"in g&&e(7,o=g.$$scope)},i.$$.update=()=>{i.$$.dirty&4&&(s||c("duration",0)),i.$$.dirty&36&&(u==null||u.dispose(),e(5,u=new Ug(s)),c("audioRef",u),setTimeout(()=>c("audioRef",u),200),Xg(s).then(g=>c("duration",g)),p()),i.$$.dirty&40&&(r||u==null||u.pause()),i.$$.dirty&72&&c(r&&!h?"play":"pause")},[a,A,s,r,l,u,h,o,n]}class dl extends oe{constructor(t){super(),ie(this,t,qg,Zg,ne,{url:2,enable:3,style:0,hooksInfo:4},Jg)}}function Kg(i){le(i,"svelte-srt2pi",".audio-icon__wrapper.svelte-srt2pi.svelte-srt2pi{display:inline-block}.audio-icon.svelte-srt2pi.svelte-srt2pi{display:flex;justify-content:center;align-items:center;position:relative;width:100%;height:100%;border-radius:50%;background-color:rgba(255, 255, 255, 0.8)}.audio-icon.svelte-srt2pi .sound-wave__container.svelte-srt2pi{position:absolute;pointer-events:none;width:60%;height:60%}.sound-wave.svelte-srt2pi.svelte-srt2pi{animation-duration:2s;animation-iteration-count:infinite;animation-play-state:paused;transition:opacity 0}.playing.svelte-srt2pi .sound-wave.svelte-srt2pi{animation-play-state:running}.playing.svelte-srt2pi .sound-wave-1.svelte-srt2pi{animation-name:svelte-srt2pi-sound_wave_1_animation}.playing.svelte-srt2pi .sound-wave-2.svelte-srt2pi{animation-name:svelte-srt2pi-sound_wave_2_animation}.playing.svelte-srt2pi .sound-wave-3.svelte-srt2pi{animation-name:svelte-srt2pi-sound_wave_3_animation}@keyframes svelte-srt2pi-sound_wave_1_animation{0%,10%{opacity:0}25%,100%{opacity:1}}@keyframes svelte-srt2pi-sound_wave_2_animation{0%,35%{opacity:0}50%,100%{opacity:1}}@keyframes svelte-srt2pi-sound_wave_3_animation{0%,60%{opacity:0}75%,100%{opacity:1}}")}function Br(i){let t,e;return t=new Ke({props:{center:!0,blurRadius:12,spreadRadius:5}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function $g(i){let t,e,n,o,s,r=i[1]&&Br();return{c(){t=V("div"),r&&r.c(),e=ee(),n=V("div"),o=V("div"),o.innerHTML='<svg width="100%" height="100%" viewBox="0 0 128 128"><g transform="rotate(-45 12 64) translate(12 64)" fill="black" stroke="black" fill-opacity="0.6" stroke-opacity="0.6"><path stroke="none" class="sound-wave sound-wave-1 svelte-srt2pi" d="M0,23 A23,23 0 0,0 23,0 L0,0"></path><path fill="none" stroke-width="15" class="sound-wave sound-wave-2 svelte-srt2pi" d="M0,46 A46,46 0 0,0 46,0"></path><path fill="none" stroke-width="15" class="sound-wave sound-wave-3 svelte-srt2pi" d="M0,80 A80,80 0 0,0 80,0"></path></g></svg>',b(o,"class","sound-wave__container svelte-srt2pi"),b(n,"class","audio-icon svelte-srt2pi"),te(n,"playing",i[0]),b(t,"class","audio-icon__wrapper svelte-srt2pi"),b(t,"style",i[2]),T(t,"width",i[5]),T(t,"height",i[5])},m(a,l){z(a,t,l),r&&r.m(t,null),Q(t,e),Q(t,n),Q(n,o),i[7](o),i[8](t),s=!0},p(a,[l]){a[1]?r?l&2&&k(r,1):(r=Br(),r.c(),k(r,1),r.m(t,e)):r&&(se(),S(r,1,1,()=>{r=null}),re()),(!s||l&1)&&te(n,"playing",a[0]),(!s||l&4)&&b(t,"style",a[2]),l&32&&T(t,"width",a[5]),l&32&&T(t,"height",a[5])},i(a){s||(k(r),s=!0)},o(a){S(r),s=!1},d(a){a&&M(t),r&&r.d(),i[7](null),i[8](null)}}}function e0(i,t,e){let n,{playing:o}=t,{shadow:s=!1}=t,{style:r=null}=t,{width:a="100%"}=t,l,c;function d(u){Le[u?"unshift":"push"](()=>{c=u,e(4,c)})}function f(u){Le[u?"unshift":"push"](()=>{l=u,e(3,l)})}return i.$$set=u=>{"playing"in u&&e(0,o=u.playing),"shadow"in u&&e(1,s=u.shadow),"style"in u&&e(2,r=u.style),"width"in u&&e(6,a=u.width)},i.$$.update=()=>{i.$$.dirty&64&&e(5,n=typeof a=="number"?ye(a):a)},[o,s,r,l,c,n,a,d,f]}class ul extends oe{constructor(t){super(),ie(this,t,e0,$g,ne,{playing:0,shadow:1,style:2,width:6},Kg)}}function t0(i){le(i,"svelte-1s6gk4a",".audio-tag.svelte-1s6gk4a{position:absolute;left:0;top:0;width:0;height:0;overflow:visible}.audio-icon__wrapper.svelte-1s6gk4a{position:relative;vertical-align:top;width:100%;height:100%}.content.svelte-1s6gk4a{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-1s6gk4a{position:relative;width:100%;height:100%}.audio-icon.svelte-1s6gk4a{pointer-events:none;vertical-align:top;display:inline-block;width:1rem;height:1rem;margin-right:0.25rem;margin-top:0.0625rem}.audio.svelte-1s6gk4a{position:relative;width:100%;height:100%}")}function Vr(i){var v,w;let t,e,n,o,s,r,a,l,c,d,f,u,h,p,A;e=new Ke({props:{visible:i[6],left:i[3]/2+"px",bottom:12,width:2,blurRadius:120,spreadRadius:60}});let g=i[6]&&jr(i);return c=new tl({props:{visible:i[6],textUnfolded:i[1],content:i[5]}}),u=new fo({props:{unfolded:i[6],length:i[3],outDelay:i[4]+20*Math.min((w=(v=i[5])==null?void 0:v.length)!=null?w:10,15),useLinearColor:!0}}),{c(){t=V("div"),$(e.$$.fragment),n=ee(),o=V("div"),s=V("div"),r=V("div"),g&&g.c(),a=ee(),l=V("div"),$(c.$$.fragment),f=ee(),$(u.$$.fragment),b(r,"class","audio-icon svelte-1s6gk4a"),De(()=>i[11].call(l)),T(l,"display","inline-block"),b(s,"class","wrapper svelte-1s6gk4a"),b(o,"class","content svelte-1s6gk4a"),b(t,"class","audio-tag svelte-1s6gk4a"),te(t,"unfolded",i[6])},m(y,P){z(y,t,P),q(e,t,null),Q(t,n),Q(t,o),Q(o,s),Q(s,r),g&&g.m(r,null),Q(s,a),Q(s,l),q(c,l,null),d=Et(l,i[11].bind(l)),Q(t,f),q(u,t,null),h=!0,p||(A=Se(l,"click",i[7]),p=!0)},p(y,P){var D,B;const I={};P&64&&(I.visible=y[6]),P&8&&(I.left=y[3]/2+"px"),e.$set(I),y[6]?g?(g.p(y,P),P&64&&k(g,1)):(g=jr(y),g.c(),k(g,1),g.m(r,null)):g&&(se(),S(g,1,1,()=>{g=null}),re());const C={};P&64&&(C.visible=y[6]),P&2&&(C.textUnfolded=y[1]),P&32&&(C.content=y[5]),c.$set(C);const L={};P&64&&(L.unfolded=y[6]),P&8&&(L.length=y[3]),P&48&&(L.outDelay=y[4]+20*Math.min((B=(D=y[5])==null?void 0:D.length)!=null?B:10,15)),u.$set(L),(!h||P&64)&&te(t,"unfolded",y[6])},i(y){h||(k(e.$$.fragment,y),k(g),k(c.$$.fragment,y),k(u.$$.fragment,y),h=!0)},o(y){S(e.$$.fragment,y),S(g),S(c.$$.fragment,y),S(u.$$.fragment,y),h=!1},d(y){y&&M(t),K(e),g&&g.d(),K(c),d(),K(u),p=!1,A()}}}function jr(i){let t,e,n,o,s,r,a;return e=new Ke({props:{center:!0,blurRadius:15,spreadRadius:6}}),o=new dl({props:{enable:i[6],url:i[0].data.audioUrl,hooksInfo:{tag:i[0]},$$slots:{default:[n0]},$$scope:{ctx:i}}}),o.$on("play",i[8]),o.$on("pause",i[9]),o.$on("audioRef",i[10]),{c(){t=V("div"),$(e.$$.fragment),n=ee(),$(o.$$.fragment),b(t,"class","audio svelte-1s6gk4a")},m(l,c){z(l,t,c),q(e,t,null),Q(t,n),q(o,t,null),a=!0},p(l,c){i=l;const d={};c&64&&(d.enable=i[6]),c&1&&(d.url=i[0].data.audioUrl),c&1&&(d.hooksInfo={tag:i[0]}),c&4100&&(d.$$scope={dirty:c,ctx:i}),o.$set(d)},i(l){a||(k(e.$$.fragment,l),k(o.$$.fragment,l),l&&De(()=>{r&&r.end(1),s=Rt(t,Bt,{duration:1e3,delay:0,easing:Zt}),s.start()}),a=!0)},o(l){var c,d;S(e.$$.fragment,l),S(o.$$.fragment,l),s&&s.invalidate(),l&&(r=tn(t,Bt,{duration:1e3,delay:20*Math.min((d=(c=i[5])==null?void 0:c.length)!=null?d:10,15),easing:Zt})),a=!1},d(l){l&&M(t),K(e),K(o),l&&r&&r.end()}}}function n0(i){let t,e,n;return e=new ul({props:{playing:i[2]}}),{c(){t=V("div"),$(e.$$.fragment),b(t,"class","audio-icon__wrapper svelte-1s6gk4a")},m(o,s){z(o,t,s),q(e,t,null),n=!0},p(o,s){const r={};s&4&&(r.playing=o[2]),e.$set(r)},i(o){n||(k(e.$$.fragment,o),n=!0)},o(o){S(e.$$.fragment,o),n=!1},d(o){o&&M(t),K(e)}}}function i0(i){let t,e,n=i[0].state&&Vr(i);return{c(){n&&n.c(),t=fe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&k(n,1)):(n=Vr(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(se(),S(n,1,1,()=>{n=null}),re())},i(o){e||(k(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function o0(i,t,e){let n,o,s,{tag:r}=t,a=!1,l=!1,c;function d(){e(1,a=!a)}const f=()=>{e(2,l=!0)},u=()=>{e(2,l=!1)};function h(A){$i.call(this,i,A)}function p(){c=this.clientWidth,e(3,c)}return i.$$set=A=>{"tag"in A&&e(0,r=A.tag)},i.$$.update=()=>{var A,g,v;i.$$.dirty&1&&e(6,n=!!((A=r.state)!=null&&A.unfolded)),i.$$.dirty&1&&e(5,o=(v=(g=r.data.title)!=null?g:r.data.text)!=null?v:""),i.$$.dirty&2&&e(4,s=a?450:0)},[r,a,l,c,s,o,n,d,f,u,h,p]}class s0 extends oe{constructor(t){super(),ie(this,t,o0,i0,ne,{tag:0},t0)}}function r0(i){const t=document.createElement("div");t.style.color=i,document.body.appendChild(t);const e=window.getComputedStyle(t).color;document.body.removeChild(t);const n=(()=>e.search("rgba")===-1?e.replace("rgb","rgba").replace(")",", 1)"):e)(),o=n.replace("rgba","").replace("(","").replace(")","").split(",").map(s=>Number(s.trim()));return{rgba:n,r:o[0],g:o[1],b:o[2],a:o[3]}}function a0(i){le(i,"svelte-58hfjf",".audio-tag__wrapper.svelte-58hfjf{position:absolute;left:50%;top:50%;transform:translate(-50%, -50%)}.audio-tag.svelte-58hfjf{position:relative;width:-moz-max-content;width:max-content;height:-moz-max-content;height:max-content;padding:0.1875rem;padding-right:0.625rem;border-radius:624999.9375rem;border:0.03125rem solid rgba(255, 255, 255, 0.2)}.audio__inner.svelte-58hfjf{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.text.svelte-58hfjf{font-weight:bold;font-size:0.75rem;margin-left:0.25rem}.audio-icon__wrapper.svelte-58hfjf{position:relative;vertical-align:top;pointer-events:none;width:1.375rem;height:1.375rem}")}function Qr(i){let t,e,n,o;return n=new dl({props:{style:"width: max-content; height: max-content;",enable:i[0].state.visible,url:i[0].data.audioUrl,hooksInfo:{tag:i[0]},$$slots:{default:[c0]},$$scope:{ctx:i}}}),n.$on("play",i[7]),n.$on("pause",i[8]),n.$on("timeupdate",i[9]),n.$on("duration",i[10]),n.$on("audioRef",i[11]),{c(){t=V("div"),e=V("div"),$(n.$$.fragment),b(e,"class","audio-tag svelte-58hfjf"),T(e,"background-color",i[1]),T(e,"color",i[5]),b(t,"class","audio-tag__wrapper svelte-58hfjf")},m(s,r){z(s,t,r),Q(t,e),q(n,e,null),o=!0},p(s,r){const a={};r&1&&(a.enable=s[0].state.visible),r&1&&(a.url=s[0].data.audioUrl),r&1&&(a.hooksInfo={tag:s[0]}),r&8260&&(a.$$scope={dirty:r,ctx:s}),n.$set(a),r&2&&T(e,"background-color",s[1]),r&32&&T(e,"color",s[5])},i(s){o||(k(n.$$.fragment,s),o=!0)},o(s){S(n.$$.fragment,s),o=!1},d(s){s&&M(t),K(n)}}}function l0(i){let t;return{c(){t=Ee(i[6])},m(e,n){z(e,t,n)},p(e,n){n&64&&xe(t,e[6])},d(e){e&&M(t)}}}function c0(i){let t,e,n,o,s,r,a;return n=new ul({props:{playing:i[2]}}),r=new ho({props:{maxWidth:72,$$slots:{default:[l0]},$$scope:{ctx:i}}}),{c(){t=V("div"),e=V("div"),$(n.$$.fragment),o=ee(),s=V("div"),$(r.$$.fragment),b(e,"class","audio-icon__wrapper svelte-58hfjf"),b(s,"class","text svelte-58hfjf"),b(t,"class","audio__inner svelte-58hfjf")},m(l,c){z(l,t,c),Q(t,e),q(n,e,null),Q(t,o),Q(t,s),q(r,s,null),a=!0},p(l,c){const d={};c&4&&(d.playing=l[2]),n.$set(d);const f={};c&8256&&(f.$$scope={dirty:c,ctx:l}),r.$set(f)},i(l){a||(k(n.$$.fragment,l),k(r.$$.fragment,l),a=!0)},o(l){S(n.$$.fragment,l),S(r.$$.fragment,l),a=!1},d(l){l&&M(t),K(n),K(r)}}}function d0(i){let t,e,n=i[0].state&&Qr(i);return{c(){n&&n.c(),t=fe()},m(o,s){n&&n.m(o,s),z(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&&(se(),S(n,1,1,()=>{n=null}),re())},i(o){e||(k(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function u0(i,t,e){let n,o,s,{tag:r}=t;oi();let a=!1,l=0,c=0;const d=()=>{e(2,a=!0)},f=()=>{e(2,a=!1)},u=A=>{e(3,l=A.detail)},h=A=>{e(4,c=A.detail)};function p(A){$i.call(this,i,A)}return i.$$set=A=>{"tag"in A&&e(0,r=A.tag)},i.$$.update=()=>{var A,g;i.$$.dirty&1&&e(6,n=(g=(A=r.data.title)!=null?A:r.data.text)!=null?g:""),i.$$.dirty&1&&e(1,o=(()=>{var v;return r.data.backgroundColor==="dark"?"rgba(0, 0, 0, 0.3)":r.data.backgroundColor==="light"?"rgba(255, 255, 255, 0.3)":(v=r.data.backgroundColor)!=null?v:"rgba(0, 0, 0, 0.3)"})()),i.$$.dirty&2&&e(5,s=(()=>{const{r:v,g:w,b:y}=r0(o);return(v*299+w*587+y*114)/1e3>=128?"rgba(0, 0, 0, 0.6)":"white"})())},[r,o,a,l,c,s,n,d,f,u,h,p]}class f0 extends oe{constructor(t){super(),ie(this,t,u0,d0,ne,{tag:0},a0)}}function h0(i){let t,e;return t=new f0({props:{tag:i[0]}}),t.$on("audioRef",i[2]),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.tag=n[0]),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function m0(i){let t,e;return t=new s0({props:{tag:i[0]}}),t.$on("audioRef",i[2]),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.tag=n[0]),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function p0(i){let t,e,n,o;const s=[m0,h0],r=[];function a(l,c){return l[1]==="line"?0:l[1]==="plane"?1:-1}return~(t=a(i))&&(e=r[t]=s[t](i)),{c(){e&&e.c(),n=fe()},m(l,c){~t&&r[t].m(l,c),z(l,n,c),o=!0},p(l,[c]){let d=t;t=a(l),t===d?~t&&r[t].p(l,c):(e&&(se(),S(r[d],1,1,()=>{r[d]=null}),re()),~t?(e=r[t],e?e.p(l,c):(e=r[t]=s[t](l),e.c()),k(e,1),e.m(n.parentNode,n)):e=null)},i(l){o||(k(e),o=!0)},o(l){S(e),o=!1},d(l){~t&&r[t].d(l),l&&M(n)}}}function g0(i,t,e){let n,{tag:o}=t,s;function r(a){s=a.detail}return o.play=()=>s.play(),o.pause=()=>s.pause(),i.$$set=a=>{"tag"in a&&e(0,o=a.tag)},i.$$.update=()=>{var a;i.$$.dirty&1&&e(1,n=(a=o.data.appearance)!=null?a:"line")},[o,n,r]}class A0 extends oe{constructor(t){super(),ie(this,t,g0,p0,ne,{tag:0})}}function v0(i){le(i,"svelte-10cw0el",".media-wrapper.svelte-10cw0el{position:absolute;width:100%;height:100%}")}function Rr(i){var o;let t,e,n;return e=new ol({props:{mediaItemConfig:{canPlay:!0,playButtonSizeIfNeed:"large",playButtonIfNeed:(o=i[4])!=null?o:"withText",disableVideoIfHavePoster:!1,objectFit:i[2]},unfolded:i[6],mediaData:i[5],enableCarousel:i[1],autoplayConfig:i[3],tag:i[0],inDelay:500,duration:500}}),{c(){t=V("div"),$(e.$$.fragment),b(t,"class","media-wrapper svelte-10cw0el")},m(s,r){z(s,t,r),q(e,t,null),n=!0},p(s,r){var l;const a={};r&20&&(a.mediaItemConfig={canPlay:!0,playButtonSizeIfNeed:"large",playButtonIfNeed:(l=s[4])!=null?l:"withText",disableVideoIfHavePoster:!1,objectFit:s[2]}),r&64&&(a.unfolded=s[6]),r&32&&(a.mediaData=s[5]),r&2&&(a.enableCarousel=s[1]),r&8&&(a.autoplayConfig=s[3]),r&1&&(a.tag=s[0]),e.$set(a)},i(s){n||(k(e.$$.fragment,s),n=!0)},o(s){S(e.$$.fragment,s),n=!1},d(s){s&&M(t),K(e)}}}function b0(i){let t,e,n=i[0].state&&i[5]&&Rr(i);return{c(){n&&n.c(),t=fe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[0].state&&o[5]?n?(n.p(o,s),s&33&&k(n,1)):(n=Rr(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(se(),S(n,1,1,()=>{n=null}),re())},i(o){e||(k(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function y0(i,t,e){let n,o,s,r,a,l,{tag:c}=t;return i.$$set=d=>{"tag"in d&&e(0,c=d.tag)},i.$$.update=()=>{var d,f;i.$$.dirty&1&&e(6,n=c.state?c.state.unfolded:!1),i.$$.dirty&1&&e(5,o=c.data.mediaData),i.$$.dirty&1&&e(1,s=c.data.enableCarousel),i.$$.dirty&1&&e(4,r=c.data.playIcon),i.$$.dirty&3&&e(3,a=(d=c.data.autoplayConfig)!=null?d:{autoplay:s!=null?s:!0,autoplayVideo:!0}),i.$$.dirty&1&&e(2,l=(f=c.data.objectFit)!=null?f:(()=>c.data.adaptationMode==="stretch"?"cover":c.data.adaptationMode==="proportional"?"contain":void 0)())},[c,s,l,a,r,o,n]}class w0 extends oe{constructor(t){super(),ie(this,t,y0,b0,ne,{tag:0},v0)}}function C0(i){return Y(this,null,function*(){return new Promise((t,e)=>{if(!i){e(Error("url is empty"));return}const n=new Image;n.src=i,n.onload=()=>t({width:n.width,height:n.height}),n.onerror=e})})}function E0(i){return Y(this,null,function*(){const{steps:t,url:e,ratio:n=3,fps:o=24}=i;if(!t)throw new Error("KeyframeIcon requires steps");const{width:s,height:r}=yield C0(e),a=s/n,l=r/n,c=a/t,d=l,f=1/o*t+"s",u=a/t-a;return{url:e,keyframesWidth:a,keyframesHeight:l,wrapperWidth:c,wrapperHeight:d,steps:t,duration:f,offsetX:u,offsetY:0}})}function P0(i){le(i,"svelte-mhs8j5","@keyframes svelte-mhs8j5-sprites-animation{0%{background-position:0 0}100%{background-position:var(--keyframe_offset_x) 0}}.icon-image.svelte-mhs8j5{display:block;width:100%}.icon-keyframe-container.svelte-mhs8j5{overflow:hidden}.icon-keyframe-wrapper.svelte-mhs8j5{transform-origin:0 0}.icon-keyframe.svelte-mhs8j5{background-repeat:no-repeat;animation-direction:normal;animation-iteration-count:infinite;animation-name:svelte-mhs8j5-sprites-animation}")}function Or(i){i[6]=i[14].url,i[7]=i[14].keyframesWidth,i[8]=i[14].keyframesHeight,i[9]=i[14].wrapperWidth,i[10]=i[14].wrapperHeight,i[11]=i[14].steps,i[12]=i[14].duration,i[13]=i[14].offsetX}function Hr(i){let t,e,n,o=i[2]&&Fr();function s(l,c){return l[3]?k0:I0}let r=s(i),a=r(i);return{c(){t=V("div"),o&&o.c(),e=ee(),a.c(),b(t,"class","icon"),T(t,"width",typeof i[0]=="number"?ye(i[0]):i[0])},m(l,c){z(l,t,c),o&&o.m(t,null),Q(t,e),a.m(t,null),n=!0},p(l,c){l[2]?o?c&4&&k(o,1):(o=Fr(),o.c(),k(o,1),o.m(t,e)):o&&(se(),S(o,1,1,()=>{o=null}),re()),r===(r=s(l))&&a?a.p(l,c):(a.d(1),a=r(l),a&&(a.c(),a.m(t,null))),c&1&&T(t,"width",typeof l[0]=="number"?ye(l[0]):l[0])},i(l){n||(k(o),n=!0)},o(l){S(o),n=!1},d(l){l&&M(t),o&&o.d(),a.d()}}}function Fr(i){let t,e;return t=new Ke({props:{center:!0,blurRadius:24,spreadRadius:16}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function I0(i){let t,e;return{c(){t=V("img"),b(t,"class","icon-image svelte-mhs8j5"),Ne(t.src,e=i[1].url)||b(t,"src",e),b(t,"alt","icon")},m(n,o){z(n,t,o)},p(n,o){o&2&&!Ne(t.src,e=n[1].url)&&b(t,"src",e)},d(n){n&&M(t)}}}function k0(i){let t,e,n={ctx:i,current:null,token:null,hasCatch:!1,pending:L0,then:D0,catch:x0,value:14};return To(e=i[4](i[1]),n),{c(){t=fe(),n.block.c()},m(o,s){z(o,t,s),n.block.m(o,n.anchor=s),n.mount=()=>t.parentNode,n.anchor=t},p(o,s){i=o,n.ctx=i,s&2&&e!==(e=i[4](i[1]))&&To(e,n)||wc(n,i,s)},d(o){o&&M(t),n.block.d(o),n.token=null,n=null}}}function x0(i){return{c:Z,m:Z,p:Z,d:Z}}function D0(i){Or(i);let t,e,n,o=`url(${i[6]})`,s=`steps(${i[11]-1})`;return{c(){t=V("div"),e=V("div"),n=V("div"),b(n,"class","icon-keyframe svelte-mhs8j5"),T(n,"width",ye(i[7])),T(n,"height",ye(i[8])),T(n,"background-image",o),T(n,"animation-duration",i[12]),T(n,"animation-timing-function",s),T(n,"animation-delay",0),T(n,"background-size","100% 100%"),T(n,"--keyframe_offset_x",ye(i[13])),b(e,"class","icon-keyframe-wrapper svelte-mhs8j5"),T(e,"transform",typeof i[0]=="number"?`scale(${i[0]/i[9]})`:void 0),b(t,"class","icon-keyframe-container svelte-mhs8j5"),T(t,"width",typeof i[0]=="number"?ye(i[0]):ye(i[9])),T(t,"height",typeof i[0]=="number"?ye(i[10]*(i[0]/i[9])):ye(i[10]))},m(r,a){z(r,t,a),Q(t,e),Q(e,n)},p(r,a){Or(r),a&2&&T(n,"width",ye(r[7])),a&2&&T(n,"height",ye(r[8])),a&2&&o!==(o=`url(${r[6]})`)&&T(n,"background-image",o),a&2&&T(n,"animation-duration",r[12]),a&2&&s!==(s=`steps(${r[11]-1})`)&&T(n,"animation-timing-function",s),a&2&&T(n,"--keyframe_offset_x",ye(r[13])),a&3&&T(e,"transform",typeof r[0]=="number"?`scale(${r[0]/r[9]})`:void 0),a&3&&T(t,"width",typeof r[0]=="number"?ye(r[0]):ye(r[9])),a&3&&T(t,"height",typeof r[0]=="number"?ye(r[10]*(r[0]/r[9])):ye(r[10]))},d(r){r&&M(t)}}}function L0(i){return{c:Z,m:Z,p:Z,d:Z}}function S0(i){let t,e,n=i[1]&&Hr(i);return{c(){n&&n.c(),t=fe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[1]?n?(n.p(o,s),s&2&&k(n,1)):(n=Hr(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(se(),S(n,1,1,()=>{n=null}),re())},i(o){e||(k(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function T0(i,t,e){let n,{width:o=null}=t,{icon:s=null}=t,{shadow:r=!1}=t;const a=oi();function l(c){return Y(this,null,function*(){const d=yield E0(c);return a("iconLoaded"),d})}return i.$$set=c=>{"width"in c&&e(0,o=c.width),"icon"in c&&e(1,s=c.icon),"shadow"in c&&e(2,r=c.shadow)},i.$$.update=()=>{i.$$.dirty&2&&e(3,n=(s==null?void 0:s.steps)>=2),i.$$.dirty&8&&!n&&a("iconLoaded")},[o,s,r,n,l]}class fl extends oe{constructor(t){super(),ie(this,t,T0,S0,ne,{width:0,icon:1,shadow:2},P0)}}function M0(i){le(i,"svelte-1lmyni6",".wrapper.svelte-1lmyni6{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-1lmyni6{position:relative;display:flex;align-items:center;justify-content:center}.text.svelte-1lmyni6{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)}")}function Gr(i){let t,e,n,o,s,r;return e=new Ke({props:{outDelay:0,inDelay:0,center:!0,width:"80%",blurRadius:40,spreadRadius:16,opacity:.08}}),{c(){t=V("div"),$(e.$$.fragment),n=ee(),o=V("div"),s=Ee(i[1]),b(o,"class","text svelte-1lmyni6"),b(t,"class","text-wrapper svelte-1lmyni6")},m(a,l){z(a,t,l),q(e,t,null),Q(t,n),Q(t,o),Q(o,s),r=!0},p(a,l){(!r||l&2)&&xe(s,a[1])},i(a){r||(k(e.$$.fragment,a),r=!0)},o(a){S(e.$$.fragment,a),r=!1},d(a){a&&M(t),K(e)}}}function z0(i){let t,e,n,o;e=new fl({props:{icon:i[0],shadow:!0}}),e.$on("iconLoaded",i[9]);let s=i[1]&&i[2]&&Gr(i);return{c(){t=V("div"),$(e.$$.fragment),n=ee(),s&&s.c(),b(t,"class","wrapper svelte-1lmyni6")},m(r,a){z(r,t,a),q(e,t,null),Q(t,n),s&&s.m(t,null),o=!0},p(r,[a]){const l={};a&1&&(l.icon=r[0]),e.$set(l),r[1]&&r[2]?s?(s.p(r,a),a&6&&k(s,1)):(s=Gr(r),s.c(),k(s,1),s.m(t,null)):s&&(se(),S(s,1,1,()=>{s=null}),re())},i(r){o||(k(e.$$.fragment,r),k(s),o=!0)},o(r){S(e.$$.fragment,r),S(s),o=!1},d(r){r&&M(t),K(e),s&&s.d()}}}function B0(i,t,e){let n,o,s,r,a,l,c,d,{tag:f}=t;const u=()=>{e(2,n=!0)};return i.$$set=h=>{"tag"in h&&e(3,f=h.tag)},i.$$.update=()=>{var h,p;i.$$.dirty&8&&e(1,o=(h=f.data.title)!=null?h:f.data.text),i.$$.dirty&8&&e(8,s=(p=f.data.icon)!=null?p:f.style.point),i.$$.dirty&256&&e(7,r=s.url),i.$$.dirty&256&&e(6,a=s.steps),i.$$.dirty&256&&e(5,l=s.fps),i.$$.dirty&256&&e(4,c=s.ratio),i.$$.dirty&240&&e(0,d={url:r,steps:a,fps:l,ratio:c})},e(2,n=!1),[d,o,n,f,c,l,a,r,s,u]}class V0 extends oe{constructor(t){super(),ie(this,t,B0,z0,ne,{tag:3},M0)}}function j0(i){le(i,"svelte-kzl2aj",".customElement__container.svelte-kzl2aj{position:relative}")}function Nr(i){let t,e=i[0].element+"",n;return{c(){t=new _n(!1),n=fe(),t.a=n},m(o,s){t.m(e,o,s),z(o,n,s)},p(o,s){s&1&&e!==(e=o[0].element+"")&&t.p(e)},d(o){o&&M(n),o&&t.d()}}}function Q0(i){let t,e=typeof i[0].element=="string"&&Nr(i);return{c(){t=V("div"),e&&e.c(),b(t,"class","customElement__container svelte-kzl2aj")},m(n,o){z(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=Nr(n),e.c(),e.m(t,null)):e&&(e.d(1),e=null)},i:Z,o:Z,d(n){n&&M(t),e&&e.d(),i[2](null)}}}function R0(i,t,e){let{tag:n}=t,o,s;Ze(()=>{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)}}}),It(()=>{s==null||s()});function r(a){Le[a?"unshift":"push"](()=>{o=a,e(1,o)})}return i.$$set=a=>{"tag"in a&&e(0,n=a.tag)},[n,o,r]}class O0 extends oe{constructor(t){super(),ie(this,t,R0,Q0,ne,{tag:0},j0)}}function H0(i){le(i,"svelte-ofx2uu",'@font-face{font-family:"TG-TYPE";font-style:normal;font-weight:400;src:local("TG-TYPE-Bold"), url(data:application/font-woff2;charset=utf-8;base64,T1RUTwAKAIAAAwAgQ0ZGINFD4CEAAAaQAAAHC0dTVUIAAQAAAAANnAAAAApPUy8yaB5pEwAAAjQAAABgY21hcEItjGUAAAT0AAABfGhlYWQS1WWOAAAAtAAAADZoaGVhBfMBxwAAAhAAAAAkaG10eJ9gBO8AAADsAAABJG1heHAASVAAAAAArAAAAAZuYW1lqczkZQAAApQAAAJecG9zdP+4ADIAAAZwAAAAIAAAUAAASQAAAAEAAAABAADkeHeyXw889QADA+gAAAAA2NoRKwAAAADY2hErACn/OAHgAyAAAQADAAIAAAAAAAAB9ABdAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYA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93iKFfsIBvdo+OYF+6T2+B8oBg6iifL3bPX3QPEStvNB8vc/8jXxE/L4EvgHFRPss7Cnu78arYOreqgexWpNr0YbaWyDem4fUmlmTUcaXqBftGAeE/JWYmROSxpklWieax5Ksc9i2BuxrpWerB/LsbTP2BrHaMVath4T7PsN93QVu7FjXFtlZltcZbC7urGzuh8T8oX8ghVPW7zHx7q6yMa9W1BPWVpQHw6i96Tz92/0AbTz93DzA/hp+HkVsIGveKwezmNFtUAbZGeBeGofSmNiRT8aZJVnnmseSrHPYtoboAb7EvukBfcHBvdL+CEFmaySqaQa+9gWxry+yJ6dhoGcHq12oWZmGk5YW1BMXLnKHg4gCiEK+11L91IlCvdiyhWtb6hpJgoeJAoOIQogCqz3pe/3b/UBufX3bfQD+G74dxWyga94rB7NZEW0PhtlaIF4ah9KY2FFPxo7tkTPZh6MjIqKjB+TiJCIjYoIjgaCoKGHoRuanY6QoB+IgfsB+6QF9wcG9y/4IgWYppGnqhr7a/sCFVBbvMjHu7zGyLxbTk5aWk4fDvtd+AojCoz7jBUmCh8kCq1vqGkeDvtdi/cS94wjCvwKBCIKDiD3ru8BvPeuA7z4EhUn967vBw4eoDf/DAmLDAv47BT4exWcEwAHAQFBXW97ipCarPcv8+7yAfdl8gP4aPf6FfIjB+r3gwUiBi77gwWHBjH3gwUkBuP7gwUnJPcxKPsxI/cx+y/y9y/3MPP7MO4GDvtdi/cSJQr3JBZkcqOzsKSksrCkcWdlcnFmHw6up6eurm+naGhvb2hop2+uHwv3EiUK9yP4ChUiCgt3SgWxBrnmBZGVj5eZGgsB2/cSAwtobm5paqBzqoYLAAABAAAAAAAAAAAAAA==) format("woff2")}*{-webkit-tap-highlight-color:transparent}.content__container.svelte-ofx2uu{position:relative;left:50%;top:50%;transform:translate(-50%, -50%);font-family:PingFangSC, Segoe UI, Rototo, sans-serif}.content__container.withAnimation.svelte-ofx2uu{transition:opacity 0.3s linear}.content__container.unClickable.svelte-ofx2uu{pointer-events:none !important}.content__container.unClickable.svelte-ofx2uu *{pointer-events:none !important}.content__wrapper.svelte-ofx2uu{pointer-events:none;width:100%;height:100%}.content__container.hide.svelte-ofx2uu{opacity:0;pointer-events:none}.content__container.hide.svelte-ofx2uu *{pointer-events:none !important}.content__container.disable.svelte-ofx2uu{display:none}.content.svelte-ofx2uu{position:relative;width:100%;height:100%;font-size:0.75rem;line-height:1.125rem;color:#fff}.content.svelte-ofx2uu:not(.unfolded){pointer-events:none}.content.svelte-ofx2uu:not(.unfolded) *{pointer-events:none !important}.content.unfolded.svelte-ofx2uu{pointer-events:auto}')}function F0(i){let t,e;return{c(){t=V("div"),b(t,"data-info","tag content is keep folded"),b(t,"data-id",e=i[1].id)},m(n,o){z(n,t,o)},p(n,o){o&2&&e!==(e=n[1].id)&&b(t,"data-id",e)},i:Z,o:Z,d(n){n&&M(t)}}}function G0(i){let t,e,n,o,s,r,a,l,c;const d=[J0,U0,Y0,X0,_0,W0,N0],f=[];function u(h,p){return h[1].element?0:h[1].contentType==="Text"?1:h[1].contentType==="ImageText"||h[1].contentType==="Image"||h[1].contentType==="Video"?2:h[1].contentType==="Audio"?3:h[1].contentType==="Marketing"?4:h[1].contentType==="Link"||h[1].contentType==="VRLink"||h[1].contentType==="PanoLink"?5:h[1].contentType==="MediaPlane"?6:-1}return~(o=u(i))&&(s=f[o]=d[o](i)),{c(){var h,p,A;t=V("div"),e=V("div"),n=V("div"),s&&s.c(),b(n,"class","content svelte-ofx2uu"),te(n,"unfolded",(h=i[1].state)==null?void 0:h.unfolded),b(e,"class","content__wrapper svelte-ofx2uu"),b(t,"class","content__container svelte-ofx2uu"),b(t,"data-id",r=i[1].id),te(t,"disable",i[1].enabled===!1),te(t,"hide",!i[3].visible||!i[3].enabled||!i[4].visible||!((p=i[1].state)!=null&&p.visible)||((A=i[1].temporaryState)==null?void 0:A.visible)===!1),te(t,"withAnimation",i[0]),te(t,"unClickable",i[1].clickable===!1),T(t,"width",i[1].stickType==="Plane"?"100%":0),T(t,"height",i[1].stickType==="Plane"?"100%":0)},m(h,p){z(h,t,p),Q(t,e),Q(e,n),~o&&f[o].m(n,null),a=!0,l||(c=Se(t,"click",ha(i[12])),l=!0)},p(h,p){var g,v,w;let A=o;o=u(h),o===A?~o&&f[o].p(h,p):(s&&(se(),S(f[A],1,1,()=>{f[A]=null}),re()),~o?(s=f[o],s?s.p(h,p):(s=f[o]=d[o](h),s.c()),k(s,1),s.m(n,null)):s=null),(!a||p&2)&&te(n,"unfolded",(g=h[1].state)==null?void 0:g.unfolded),(!a||p&2&&r!==(r=h[1].id))&&b(t,"data-id",r),(!a||p&2)&&te(t,"disable",h[1].enabled===!1),(!a||p&26)&&te(t,"hide",!h[3].visible||!h[3].enabled||!h[4].visible||!((v=h[1].state)!=null&&v.visible)||((w=h[1].temporaryState)==null?void 0:w.visible)===!1),(!a||p&1)&&te(t,"withAnimation",h[0]),(!a||p&2)&&te(t,"unClickable",h[1].clickable===!1),p&2&&T(t,"width",h[1].stickType==="Plane"?"100%":0),p&2&&T(t,"height",h[1].stickType==="Plane"?"100%":0)},i(h){a||(k(s),a=!0)},o(h){S(s),a=!1},d(h){h&&M(t),~o&&f[o].d(),l=!1,c()}}}function N0(i){let t,e;return t=new w0({props:{tag:Te(i[1])}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Te(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function W0(i){let t,e;return t=new V0({props:{tag:Te(i[1])}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Te(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function _0(i){let t,e;return t=new _g({props:{tag:Te(i[1])}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Te(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function X0(i){let t,e;return t=new A0({props:{tag:Te(i[1])}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Te(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function Y0(i){let t,e;return t=new Dg({props:{tag:Te(i[1])}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Te(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function U0(i){let t,e;return t=new Fp({props:{tag:Te(i[1])}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Te(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function J0(i){let t,e;return t=new O0({props:{tag:Te(i[1])}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Te(n[1])),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function Z0(i){let t,e,n,o;const s=[G0,F0],r=[];function a(l,c){return l[5]?0:1}return t=a(i),e=r[t]=s[t](i),{c(){e.c(),n=fe()},m(l,c){r[t].m(l,c),z(l,n,c),o=!0},p(l,[c]){let d=t;t=a(l),t===d?r[t].p(l,c):(se(),S(r[d],1,1,()=>{r[d]=null}),re(),e=r[t],e?e.p(l,c):(e=r[t]=s[t](l),e.c()),k(e,1),e.m(n.parentNode,n))},i(l){o||(k(e),o=!0)},o(l){S(e),o=!1},d(l){r[t].d(l),l&&M(n)}}}function q0(i,t,e){let n,o,s,r,a,{withAnimation:l=!1}=t,{tag:c}=t,{hooks:d}=t,{state:f}=t,{mediaStore:u}=t,{temporaryState:h}=t;Un("hooks",d),Un("mediaStore",u);let p,A;function g(w){w?d.emit("exposure",{id:r,type:"start"}):d.emit("exposure",{id:r,type:"end"})}const v=w=>d.emit("click",{event:w,target:"TagContent",tag:c});return i.$$set=w=>{"withAnimation"in w&&e(0,l=w.withAnimation),"tag"in w&&e(1,c=w.tag),"hooks"in w&&e(2,d=w.hooks),"state"in w&&e(3,f=w.state),"mediaStore"in w&&e(6,u=w.mediaStore),"temporaryState"in w&&e(4,h=w.temporaryState)},i.$$.update=()=>{var w,y,P,I,C,L,D,B,N,F,X;i.$$.dirty&2&&e(10,n=(w=c.state)==null?void 0:w.unfolded),i.$$.dirty&2&&e(9,o=(y=c.state)==null?void 0:y.visible),i.$$.dirty&26&&e(11,s=f.visible&&h.visible&&((P=c.state)==null?void 0:P.visible)),i.$$.dirty&2&&(r=c.id),i.$$.dirty&2048&&g(s),i.$$.dirty&1922&&c.hooks&&(n!==void 0&&n!==A&&(e(8,A=n),n?(C=(I=c.hooks).emit)==null||C.call(I,"unfolded"):(D=c==null?void 0:(L=c.hooks).emit)==null||D.call(L,"folded")),o!==void 0&&o!==p&&(e(7,p=o),o?(N=(B=c.hooks).emit)==null||N.call(B,"show"):(X=(F=c.hooks).emit)==null||X.call(F,"hide"))),i.$$.dirty&2&&e(5,a=(()=>!(typeof c.mergedConfig.unfoldedConfig=="object"&&c.mergedConfig.unfoldedConfig.keep==="folded"))())},[l,c,d,f,h,a,u,p,A,o,n,s,v]}class hl extends oe{constructor(t){super(),ie(this,t,q0,Z0,ne,{withAnimation:0,tag:1,hooks:2,state:3,mediaStore:6,temporaryState:4},H0)}}function K0(i){le(i,"svelte-yex9rb",'@charset "UTF-8";.tag-point-click-helper.svelte-yex9rb.svelte-yex9rb{position:absolute;pointer-events:auto;cursor:pointer;width:2.5rem;height:2.5rem;left:50%;top:50%;transform:translate(-50%, -50%)}.tag-point-wrapper.svelte-yex9rb.svelte-yex9rb{pointer-events:none;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%);z-index:-1}.tag-folded-point.svelte-yex9rb.svelte-yex9rb,.tag-unfolded-point.svelte-yex9rb.svelte-yex9rb{transition:all 0.5s}.tag-point-wrapper.svelte-yex9rb .tag-unfolded-point.svelte-yex9rb{display:flex;justify-content:center;align-items:center;position:absolute;width:100%;height:100%;border-radius:50%}.tag-point-wrapper.svelte-yex9rb .tag-unfolded-point.svelte-yex9rb:after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.3125rem;height:0.3125rem;border-radius:50%;background-color:white}.tag-point-wrapper.svelte-yex9rb .tag-unfolded-point.svelte-yex9rb:before{content:"";position:absolute;width:0.875rem;height:0.875rem;border-radius:50%;background-color:rgba(0, 0, 0, 0.2)}.tag-point-wrapper.folded.svelte-yex9rb .tag-folded-point.svelte-yex9rb{opacity:1;scale:1}.tag-point-wrapper.folded.svelte-yex9rb .tag-unfolded-point.svelte-yex9rb{opacity:0;scale:1}.tag-point-wrapper.unfolded.svelte-yex9rb .tag-folded-point.svelte-yex9rb{opacity:0;scale:0.2}.tag-point-wrapper.unfolded.svelte-yex9rb .tag-unfolded-point.svelte-yex9rb{opacity:1;scale:1}')}function $0(i){let t,e,n,o,s,r,a,l,c,d,f,u;return o=new Ke({props:{center:!0,blurRadius:15,spreadRadius:5,opacity:.3}}),c=new fl({props:{icon:i[2],width:i[1]}}),{c(){t=V("div"),e=ee(),n=V("div"),$(o.$$.fragment),s=ee(),r=V("div"),a=ee(),l=V("div"),$(c.$$.fragment),b(t,"class","tag-point-click-helper svelte-yex9rb"),b(r,"class","tag-unfolded-point svelte-yex9rb"),T(r,"transition-delay",(i[3]?i[5]:0)+"ms"),b(l,"class","tag-folded-point svelte-yex9rb"),T(l,"transition-delay",(i[3]?i[5]:0)+"ms"),b(n,"class","tag-point-wrapper svelte-yex9rb"),te(n,"unfolded",i[0]),te(n,"folded",i[3]),T(n,"width",ye(i[1])),T(n,"height",ye(i[1]))},m(h,p){z(h,t,p),z(h,e,p),z(h,n,p),q(o,n,null),Q(n,s),Q(n,r),Q(n,a),Q(n,l),q(c,l,null),d=!0,f||(u=Se(t,"click",i[4]),f=!0)},p(h,[p]){p&8&&T(r,"transition-delay",(h[3]?h[5]:0)+"ms");const A={};p&4&&(A.icon=h[2]),p&2&&(A.width=h[1]),c.$set(A),p&8&&T(l,"transition-delay",(h[3]?h[5]:0)+"ms"),(!d||p&1)&&te(n,"unfolded",h[0]),(!d||p&8)&&te(n,"folded",h[3]),p&2&&T(n,"width",ye(h[1])),p&2&&T(n,"height",ye(h[1]))},i(h){d||(k(o.$$.fragment,h),k(c.$$.fragment,h),d=!0)},o(h){S(o.$$.fragment,h),S(c.$$.fragment,h),d=!1},d(h){h&&M(t),h&&M(e),h&&M(n),K(o),K(c),f=!1,u()}}}function eA(i,t,e){let n,o,s,r;const a=ct("hooks");let{tag:l}=t,c,d=!1;const f=()=>{c!==void 0&&clearTimeout(c),d=!0,c=setTimeout(()=>{d=!1},800)},u=p=>{d||a.emit("click",{event:p,target:"TagPoint",tag:l})},h=(()=>l.contentType==="Text"&&l.data.appearance==="plane"?500:800)();return i.$$set=p=>{"tag"in p&&e(6,l=p.tag)},i.$$.update=()=>{var p,A,g,v;i.$$.dirty&64&&e(0,n=(p=l.state)==null?void 0:p.unfolded),i.$$.dirty&1&&e(3,o=!n),i.$$.dirty&64&&e(2,s=(g=(A=l.style)==null?void 0:A.point)!=null&&g.url?(v=l.style)==null?void 0:v.point:{url:mp}),i.$$.dirty&64&&e(1,r=(()=>{var y,P,I;const w=(I=(P=(y=l.style)==null?void 0:y.point)==null?void 0:P.size)!=null?I:"S";return typeof w=="number"?w:w==="S"?18:w==="M"?20:w==="L"?24:w==="XL"?28:18})())},f(),[n,r,s,o,u,h,l]}class tA extends oe{constructor(t){super(),ie(this,t,eA,$0,ne,{tag:6},K0)}}function nA(i){le(i,"svelte-bdubcv",".tag.hide.svelte-bdubcv{opacity:0;pointer-events:none}.tag.disable.svelte-bdubcv{display:none}.tag.withAnimation.svelte-bdubcv{transition:opacity 0.3s linear}.wrapper.svelte-bdubcv{position:absolute;width:0rem;height:0rem;overflow:visible;pointer-events:auto}")}function iA(i){let t;return{c(){t=V("div"),b(t,"data-info","tag content is disable")},m(e,n){z(e,t,n)},p:Z,i:Z,o:Z,d(e){e&&M(t)}}}function oA(i){let t,e;return t=new hl({props:{mediaStore:i[2],withAnimation:i[0],tag:Te(i[1]),hooks:i[14],state:i[3],temporaryState:i[4]}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&4&&(s.mediaStore=n[2]),o&1&&(s.withAnimation=n[0]),o&2&&(s.tag=Te(n[1])),o&8&&(s.state=n[3]),o&16&&(s.temporaryState=n[4]),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function sA(i){let t;return{c(){t=V("div"),b(t,"data-info","tag point is disable")},m(e,n){z(e,t,n)},p:Z,i:Z,o:Z,d(e){e&&M(t)}}}function rA(i){let t,e;return t=new tA({props:{tag:i[1]}}),{c(){$(t.$$.fragment)},m(n,o){q(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=n[1]),t.$set(s)},i(n){e||(k(t.$$.fragment,n),e=!0)},o(n){S(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function aA(i){let t,e,n,o,s,r,a,l,c;const d=[oA,iA],f=[];function u(g,v){return g[12]?0:1}n=u(i),o=f[n]=d[n](i);const h=[rA,sA],p=[];function A(g,v){return g[13]?0:1}return r=A(i),a=p[r]=h[r](i),{c(){t=V("div"),e=V("div"),o.c(),s=ee(),a.c(),b(e,"class","wrapper svelte-bdubcv"),b(e,"data-tag-unfolded",i[8]),b(e,"data-tag-id",i[11]),b(e,"data-content-type",l=i[1].contentType),T(e,"left",i[7]),T(e,"top",i[6]),T(e,"z-index",i[5]),b(t,"class","tag svelte-bdubcv"),b(t,"data-tag-id",i[11]),te(t,"disable",i[10]),te(t,"hide",i[9]),te(t,"withAnimation",i[0])},m(g,v){z(g,t,v),Q(t,e),f[n].m(e,null),Q(e,s),p[r].m(e,null),c=!0},p(g,[v]){let w=n;n=u(g),n===w?f[n].p(g,v):(se(),S(f[w],1,1,()=>{f[w]=null}),re(),o=f[n],o?o.p(g,v):(o=f[n]=d[n](g),o.c()),k(o,1),o.m(e,s));let y=r;r=A(g),r===y?p[r].p(g,v):(se(),S(p[y],1,1,()=>{p[y]=null}),re(),a=p[r],a?a.p(g,v):(a=p[r]=h[r](g),a.c()),k(a,1),a.m(e,null)),(!c||v&256)&&b(e,"data-tag-unfolded",g[8]),(!c||v&2048)&&b(e,"data-tag-id",g[11]),(!c||v&2&&l!==(l=g[1].contentType))&&b(e,"data-content-type",l),v&128&&T(e,"left",g[7]),v&64&&T(e,"top",g[6]),v&32&&T(e,"z-index",g[5]),(!c||v&2048)&&b(t,"data-tag-id",g[11]),(!c||v&1024)&&te(t,"disable",g[10]),(!c||v&512)&&te(t,"hide",g[9]),(!c||v&1)&&te(t,"withAnimation",g[0])},i(g){c||(k(o),k(a),c=!0)},o(g){S(o),S(a),c=!1},d(g){g&&M(t),f[n].d(),p[r].d()}}}function lA(i,t,e){let n,o,s,r,a,l,c,d,f,{withAnimation:u=!1}=t,{tag:h}=t,{mediaStore:p}=t,{state:A}=t,{temporaryState:g}=t;const v=ct("hooks");return i.$$set=w=>{"withAnimation"in w&&e(0,u=w.withAnimation),"tag"in w&&e(1,h=w.tag),"mediaStore"in w&&e(2,p=w.mediaStore),"state"in w&&e(3,A=w.state),"temporaryState"in w&&e(4,g=w.temporaryState)},i.$$.update=()=>{var w,y,P,I,C,L,D,B;i.$$.dirty&2&&e(13,n=(()=>!(h.contentType==="Link"||h.contentType==="VRLink"||h.contentType==="PanoLink"||h.contentType==="Audio"&&h.data.appearance==="plane"))()),i.$$.dirty&2&&e(12,o=(()=>h.stickType==="2DPoint")()),i.$$.dirty&2&&e(11,s=h.id),i.$$.dirty&2&&e(10,r=!((w=h.pointTagStyle)!=null&&w.leftPercent)||!((y=h.pointTagStyle)!=null&&y.topPercent)||h.enabled===!1||!h.state),i.$$.dirty&2&&e(9,a=!((P=h.state)!=null&&P.visible)||((I=h.temporaryState)==null?void 0:I.visible)===!1),i.$$.dirty&2&&e(8,l=(C=h.state)==null?void 0:C.unfolded),i.$$.dirty&2&&e(7,c=((L=h.pointTagStyle)==null?void 0:L.leftPercent)+"%"),i.$$.dirty&2&&e(6,d=((D=h.pointTagStyle)==null?void 0:D.topPercent)+"%"),i.$$.dirty&2&&e(5,f=(B=h.state)!=null&&B.unfolded?1:0)},[u,h,p,A,g,f,d,c,l,a,r,s,o,n,v]}class cA extends oe{constructor(t){super(),ie(this,t,lA,aA,ne,{withAnimation:0,tag:1,mediaStore:2,state:3,temporaryState:4},nA)}}function dA(i){le(i,"svelte-uq11d5",".tag--container.svelte-uq11d5{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;transform:translate3d(0, 0, 0)}.withAnimation.svelte-uq11d5{transition:opacity 0.3s linear}.tag--container.hide.svelte-uq11d5{opacity:0;pointer-events:none}.tag--container.hide.svelte-uq11d5 *{pointer-events:none !important}")}function Wr(i,t,e){const n=i.slice();return n[6]=t[e],n}function _r(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=Wr(i,s,a),c=r(l);n.set(c,e[a]=Xr(c,l))}return{c(){t=V("div");for(let a=0;a<e.length;a+=1)e[a].c();b(t,"class","tag--container svelte-uq11d5"),te(t,"hide",!i[3].visible||!i[4].visible),te(t,"withAnimation",i[0])},m(a,l){z(a,t,l);for(let c=0;c<e.length;c+=1)e[c].m(t,null);o=!0},p(a,l){l&31&&(s=a[1],se(),e=qe(e,l,r,1,a,s,n,t,Ot,Xr,null,Wr),re()),(!o||l&24)&&te(t,"hide",!a[3].visible||!a[4].visible),(!o||l&1)&&te(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)S(e[l]);o=!1},d(a){a&&M(t);for(let l=0;l<e.length;l+=1)e[l].d()}}}function Xr(i,t){let e,n,o;return n=new cA({props:{state:t[3],temporaryState:t[4],withAnimation:t[0],tag:t[6],mediaStore:t[2]}}),{key:i,first:null,c(){e=fe(),$(n.$$.fragment),this.first=e},m(s,r){z(s,e,r),q(n,s,r),o=!0},p(s,r){t=s;const a={};r&8&&(a.state=t[3]),r&16&&(a.temporaryState=t[4]),r&1&&(a.withAnimation=t[0]),r&2&&(a.tag=t[6]),r&4&&(a.mediaStore=t[2]),n.$set(a)},i(s){o||(k(n.$$.fragment,s),o=!0)},o(s){S(n.$$.fragment,s),o=!1},d(s){s&&M(e),K(n,s)}}}function uA(i){let t,e,n=i[3].enabled&&_r(i);return{c(){n&&n.c(),t=fe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[3].enabled?n?(n.p(o,s),s&8&&k(n,1)):(n=_r(o),n.c(),k(n,1),n.m(t.parentNode,t)):n&&(se(),S(n,1,1,()=>{n=null}),re())},i(o){e||(k(n),e=!0)},o(o){S(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function fA(i,t,e){let{withAnimation:n=!1}=t,{tags:o=[]}=t,{hooks:s}=t,{mediaStore:r}=t,{state:a}=t,{temporaryState:l}=t;return Un("hooks",s),i.$$set=c=>{"withAnimation"in c&&e(0,n=c.withAnimation),"tags"in c&&e(1,o=c.tags),"hooks"in c&&e(5,s=c.hooks),"mediaStore"in c&&e(2,r=c.mediaStore),"state"in c&&e(3,a=c.state),"temporaryState"in c&&e(4,l=c.temporaryState)},[n,o,r,a,l,s]}class hA extends oe{constructor(t){super(),ie(this,t,fA,uA,ne,{withAnimation:0,tags:1,hooks:5,mediaStore:2,state:3,temporaryState:4},dA)}}const mA={globalConfig:{unfoldedConfig:{autoUnfold:{strategy:"MinimumDistance",distance:{max:5}}},tag3DConfig:{ratio:.0035}},contentTypeConfig:{"Any-Audio-plane":{unfoldedConfig:{keep:"unfolded"},initialState:{unfolded:!0}},Link:{unfoldedConfig:{keep:"unfolded"},initialState:{unfolded:!0}},VRLink:{unfoldedConfig:{keep:"unfolded"},initialState:{unfolded:!0}},PanoLink:{unfoldedConfig:{keep:"unfolded"},initialState:{unfolded:!0}},MediaPlane:{unfoldedConfig:{keep:"unfolded"},visibleConfig:{alwaysShowWhenMovePano:!0}}}};function pA(i){return i.stickType==="2DPoint"||i.stickType==="3DPoint"}function gA(i){return i.stickType==="3DPoint"||i.stickType==="Plane"}class AA extends li{constructor(e){super(e);m(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 vA extends AA{constructor(e){super(e);m(this,"tags",[]);m(this,"config",mA);m(this,"raycaster",new x.Raycaster)}get isPanorama(){return this.five.currentMode==="Panorama"}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}changeContentTypeConfig(e,n,o=!0){this.config.contentTypeConfig||(this.config.contentTypeConfig={}),o?this.config.contentTypeConfig[e]=St.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;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&&l.visiblePanoIndex!=="all"&&s!==void 0&&(Array.isArray(l.visiblePanoIndex)&&!l.visiblePanoIndex.includes(s)||l.visiblePanoIndex==="current"&&s!==((f=e.fiveState)==null?void 0:f.panoIndex))||l.visibleDistance!==void 0&&l.visibleDistance!=="unLimited"&&rn(c,l.visibleDistance)===!1)return!1;if(l.intersectRaycaster!==!1&&(typeof l.intersectRaycaster!="object"||l.intersectRaycaster.enabled!==!1)){if(s===void 0)return!1;const h=(u=this.five.work.observers[s])==null?void 0:u.position;if(h===void 0)throw new Error(`getVisible(): observerPosition is ${h}`);const p=Mn(e.position).sub(h).normalize();this.raycaster.set(h,p);const[A]=this.five.model.intersectRaycaster(this.raycaster),g=(()=>{var v;return typeof l.intersectRaycaster=="object"&&(v=l.intersectRaycaster.distanceAccuracy)!=null?v:.01})();if(A&&A.distance+g<c)return!1}return!(l.angleRange&&gA(e)&&rn(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.unfoldDistance&&rn(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.autoUnfold===void 0||r.autoUnfold===!1||r.autoUnfold.enable===!1)return;if(r.autoUnfold.strategy==="ScreenPostion"){const l=this.getTagProject(e);if(l&&rn(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:p,y:A,z:g}=h;return!(Math.abs(g)>1||Math.abs(p)>1||Math.abs(A)>1)}).map(u=>({tag:u,id:u.id,tagConfig:this.getTagConfig(u).unfoldedConfig})).filter(({tag:u,tagConfig:h})=>{var p,A;return!(typeof h!="object"||h.keep||h.autoUnfold===!1||((p=h.autoUnfold)==null?void 0:p.enable)===!1||((A=h.autoUnfold)==null?void 0:A.strategy)!=="MinimumDistance")}).map(u=>he(G({},u),{distance:this.getDistance(u.tag)})).filter(({distance:u,tagConfig:h})=>{var p,A;return!(u===void 0||typeof h!="object"||h.autoUnfold===!1||((p=h.autoUnfold)==null?void 0:p.enable)===!1||((A=h.autoUnfold)==null?void 0:A.strategy)!=="MinimumDistance"||h.autoUnfold.distance&&rn(u,h.autoUnfold.distance)===!1)}).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=(()=>pA(e)?nt(e==null?void 0:e.position):Mn(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.stickType==="3DPoint"?hn(e.normal):$a(e.position))();if(!d)return;const f=new x.Vector3().copy(c).sub(Mn(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={};this.config.contentTypeConfig&&Object.keys(this.config.contentTypeConfig).forEach(r=>{const a=r;if(n[a])return;const l=a.split("-");if(l.length===1){const[c]=l;e.contentType===c&&(n[a]=this.config.contentTypeConfig[a])}if(l.length===2){const[c="Any",d="Any"]=l;(e.stickType===c||c==="Any")&&(e.contentType===d||d==="Any")&&(n[a]=this.config.contentTypeConfig[a])}if(l.length===3){const[c="Any",d,f]=l;if(d==="Audio"&&e.contentType==="Audio"){const u=e;(u.stickType===c||c==="Any")&&u.data.appearance===f&&(n[a]=this.config.contentTypeConfig[a])}}});const o=St.default({},this.config.globalConfig,...Object.values(n),e.config);return typeof o.unfoldedConfig=="object"&&(o.unfoldedConfig.disableFold&&(o.unfoldedConfig={keep:"unfolded"}),o.unfoldedConfig.disableUnfold&&(o.unfoldedConfig={keep:"folded"}),o.unfoldedConfig.keep&&(o.unfoldedConfig={keep:o.unfoldedConfig.keep})),typeof o.visibleConfig=="object"&&o.visibleConfig.keep&&(o.visibleConfig={keep:o.visibleConfig.keep}),o}can(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.keep==="unfolded"||e==="unfold"&&o.unfoldedConfig.keep==="folded")return!1}return!0}sort(e){return e.sort((n,o)=>{const s=this.getDistance(n),r=this.getDistance(o);return s===void 0||r===void 0?0:r-s})}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=Mn(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.stickType==="2DPoint"||e.stickType==="3DPoint")}filter2DPointTag(){return this.tags.filter(e=>e.stickType==="2DPoint")}filter3DPointTag(){return this.tags.filter(e=>e.stickType==="3DPoint")}filter3DTag(){return this.tags.filter(e=>e.stickType==="3DPoint"||e.stickType==="Plane")}filterPlaneTag(){return this.tags.filter(e=>e.stickType==="Plane")}updateTagConfig(e){e!=null&&e.force&&this.clearCache(),this.tags.forEach(n=>{const o=this.getTagConfig(n);n.mergedConfig=o})}}function bA(i){var t,e,n,o;if(!i.stickType){const s=(()=>i.pointType==="PointTag"&&i.dimensionType==="3D"?"3DPoint":i.pointType==="PlaneTag"?"Plane":"2DPoint")();i.stickType=s}if(i.contentType==="VRLink"||i.contentType==="PanoLink"||i.contentType==="Link"){const s=i;!((e=(t=s.data)==null?void 0:t.icon)!=null&&e.url)&&!((o=(n=s.style)==null?void 0:n.point)!=null&&o.url)&&(s.data.icon={url:"//vrlab-static.ljcdn.com/release/web/test.09dee741.png",steps:28})}return i}const ml="2.0.7",Yi=`DnalogelPlugin-PanoTagPlugin@${ml}`,yA=!1,wA=i=>`${Yi}--${i}`;class pl extends vA{constructor(e,n){super(e);m(this,"version",ml);m(this,"state",{enabled:!0,visible:!0});m(this,"params");m(this,"debug");m(this,"css3DRenderPlugin");m(this,"TagContainerSvelte");m(this,"temporaryState",{visible:!0});m(this,"mediaStore",io({currentMediaElement:null}));m(this,"isIOSWX",navigator.userAgent.toLowerCase().indexOf("micromessenger")!==-1&&navigator.userAgent.toLowerCase().indexOf("iphone")!==-1);m(this,"store",{disposers:[],disposed:!1,resizeObserverDisposerAdding:!1,css3DRenderDisposer:new Map});m(this,"disposedErrorLog",()=>{console.error(`${Yi} is disposed`)});this.params=G({debug:!1,config:this.config},n),this.debug=this.params.debug,this.config=this.params.config,zr(1,{namespace:ti.GetAudioDuration}),zr(1,{namespace:ti.PlayAudio}),Object.assign(window,{[`__PANOTAGPLUGIN_DEBUG_${Date.now()}__`]:this}),Object.assign(window,{__PANOTAGPLUGIN_DEBUG__:this})}load(e,n){return Y(this,null,function*(){var o,s;if(this.clearTags(),console.log(Yi," load:",{data:e}),this.config=St.default({},this.config,{globalConfig:(o=e.globalConfig)!=null?o:{},contentTypeConfig:(s=e.contentTypeConfig)!=null?s:{}}),this.debug)try{ep(this.five,this.tags)}catch(r){console.error(r)}return this.addTag(e.tagList,n)})}addTag(e,n){return Y(this,null,function*(){const s=(Array.isArray(e)?e:[e]).map(r=>{const a=this.getTagConfig(r);return he(G({},r),{state:G({visible:void 0,unfolded:yA},a.initialState),hooks:new be.Subscribe,clickable:a.clickable,mergedConfig:a})}).filter(r=>r.position);return s.forEach(bA),this.tags.push(...s),tp(this.five).then(()=>{var r,a,l;return 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(),!0})})}changeConfig(e,n=!0){n?this.config=St.default({},this.config,e):this.config=e,this.updateTagConfig({force:!0}),this.updateRenderAllTags()}changeGlobalConfig(e,n=!0){n?this.config.globalConfig=St.default({},this.config.globalConfig,e):this.config.globalConfig=e,this.updateTagConfig({force:!0}),this.updateRenderAllTags()}clearTags(){this.tags=[],this.clearCache(),this.disposeAllCSS3DContainer(),this.updateRenderAllTags()}show(e){return Y(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 Y(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.pauseCurrentMedia(),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=G({},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})}changeUnfoldedById(e,n){var r;const o=this.getTagById(e);if(!o)return;o.state.unfolded=n;const s=this.filterPointTag();(r=this.TagContainerSvelte)==null||r.$set({tags:s})}changeTagNormalById(e,n){const o=this.getTagById(e);!o||!o.tag3DContentSvelte||(o.tag3DContentSvelte.currentNormal=nt(n),this.updateRenderPlaneTag())}changeDataById(e,n,o=!0){const s=this.getTagById(e);!s||(o?s.data=St.default({},s.data,n):s.data=G(G({},s.data),n),this.checkPanelTag(),this.updateRenderAllTags())}changeStickTypeById(e,n,o=!0){this.changeTagById(e,n,o)}changeTagById(e,n,o=!0){const s=this.getTagById(e);!n||(o?St.default(s,n):Object.assign(s,n),(s==null?void 0:s.tag3DContentSvelte)&&(n==null?void 0:n.normal)&&(s.tag3DContentSvelte.currentNormal=nt(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({currentMediaElement:null})}setVisibleAndUnfolded(){return Y(this,arguments,function*({withAnimation:e}={withAnimation:!1}){if(!!this.isPanorama)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.pauseCurrentMedia(),this.state.visible=!1,this.updateTagContainerVisible()}handleEnable(){this.state.enabled=!0,this.store.eventListenerDisposer=this.addEventListener(),this.updateRenderAllTags()}handleDisable(){var e,n,o;this.pauseCurrentMedia(),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.loadVideoFirstFrame.bind(this),d=this.clickhandler.bind(this);return this.five.currentMode&&(this.isPanorama?(this.handleFivePanoArrived(),this.temporaryShow({withAnimation:!0})):this.temporaryHide()),e.on("wantsMoveToPano",o),e.on("modeChange",s),e.on("cameraUpdate",r),e.on("cameraUpdate",a),e.on("panoArrived",l),e.on("panoArrived",c),n.on("click",d),()=>{e.off("wantsMoveToPano",o),e.off("modeChange",s),e.off("cameraUpdate",r),e.off("cameraUpdate",a),e.off("panoArrived",l),e.off("panoArrived",c),n.off("click",d),this.store.eventListenerDisposer=void 0}}loadVideoFirstFrame(){this.isIOSWX&&this.hooks.emit("loadVideoFirstFrame")}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}=Ys(ip(()=>{!this.store.resizeObserverDisposer||o()},500),e),{observe:a,unobserve:l}=Ys(Xs(()=>n(),400),e);return s(),a(),()=>{r(),l()}}handleFiveModeChange(e){e==="Panorama"?this.five.once("panoArrived",()=>this.temporaryShow({withAnimation:!0})):this.temporaryHide()}handleFiveWantsMoveToPano(){this.tags.forEach(e=>{const n=this.getTagConfig(e);typeof n.visibleConfig=="object"&&(n.visibleConfig.keep?e.temporaryState=he(G({},e.temporaryState),{visible:n.visibleConfig.keep==="visible"}):e.temporaryState=he(G({},e.temporaryState),{visible:Boolean(n.visibleConfig.alwaysShowWhenMovePano)}))}),this.updateTagContainerVisible()}temporaryShow({withAnimation:e}={withAnimation:!1}){this.store.visibleWithAnimation=e,this.temporaryState.visible=!0,this.updateTagContainerVisible()}temporaryHide({withAnimation:e}={withAnimation:!1}){this.store.visibleWithAnimation=e,this.temporaryState.visible=!1,this.updateTagContainerVisible()}clickhandler(e){if(e.target!=="TagPoint")return;if(!e.tag.state)return console.warn("Clickhandler: params.tag.state is undefined");const n=this.can("fold",e.tag),o=this.can("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.can("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 Xs(()=>{this.setUnfoldedByCamera(),this.updateRenderAllTags()},100)}handleFiveCameraUpdate(){this.updateRenderPointTag()}handleFivePanoArrived(){return Y(this,null,function*(){yield this.setVisibleAndUnfolded(),this.tags.forEach(e=>{e.temporaryState=he(G({},e.temporaryState),{visible:!0})}),this.store.visibleWithAnimation=!0,this.updateTagContainerVisible()})}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.keep)||n.state&&(n.state.unfolded=!1)})}updateRenderPointTag(){var n;const e=this.sort(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 hA({target:o,props:{hooks:this.hooks,tags:e,state:this.state,temporaryState:this.temporaryState,mediaStore:this.mediaStore}})}}updateRenderPlaneTag(){this.sort([...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=en(this.five)),n.stickType==="3DPoint"&&!n.normal)return console.error("updateRenderPlaneTag: \u4E09\u7EF4\u70B9\u6807\u7B7E\u7F3A\u5C11\u6CD5\u5411\u91CF\uFF01");const s=n.stickType==="Plane"?n.position:np(this.five.camera.position,nt(n.position),nt(n.normal)),r=n.stickType==="Plane"?$a(n.position):nt(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 hl({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.filter2DPointTag().forEach(e=>{var n;(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.stickType==="2DPoint")&&(n==null||n(),this.store.css3DRenderDisposer.delete(e))}}}var gl=(i=>(i.Audio="Audio",i.Text="Text",i.ImageText="ImageText",i.Image="Image",i.Video="Video",i.Link="Link",i.VRLink="VRLink",i.PanoLink="PanoLink",i.Marketing="Marketing",i.MediaPlane="MediaPlane",i.Custom="Custom",i))(gl||{}),Al=(i=>(i.Two="2D",i.Three="3D",i))(Al||{}),vl=(i=>(i.PointTag="PointTag",i.PlaneTag="PlaneTag",i))(vl||{});const CA=(i,t)=>new pl(i,t);class po extends H.Object3D{constructor(e,n){var o;super();m(this,"originObject3D");m(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 EA extends po{}class PA extends po{}class IA extends po{}class kA extends IA{}class xA extends x.Group{constructor(e){super();m(this,"direction");this.direction=e||"x"}}class Yr extends x.Mesh{constructor(e,n,o){super(e,n);m(this,"direction");this.direction=o||"x"}}function DA(i,t){const{offsetWidth:e,offsetHeight:n}=t,{top:o,left:s}=t.getBoundingClientRect();return Object.assign(new x.Vector2,{x:(i.x-s)/e*2-1,y:-(i.y-o)/n*2+1})}function go(i,t,e){if(!t||!e||!i)return;const n=DA(t,e);if(Math.abs(n.x)===1||Math.abs(n.y)===1)return;const o=new x.Raycaster;return o.setFromCamera(n,i),o}function LA(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 Di extends xA{constructor(e){var d;super(e.direction);m(this,"line");m(this,"arrow");m(this,"lineHeight",.4);m(this,"arrowHeight",.1);this.name="ArrowGroup";const n=new x.Color((d=e.color)!=null?d:16214315),o=new x.MeshBasicMaterial({color:n,depthTest:!1,opacity:1,transparent:!0,side:x.DoubleSide}),s=new x.ConeGeometry(.04,.1,32),r=new Yr(s,o.clone(),e.direction);r.name=`arrow-${e.direction}`,this.arrow=r;const a=.004,l=new x.CylinderGeometry(a,a,.4,32),c=new Yr(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 Li={X:15618642,Y:4765519,Z:4227839};class tt{static get X(){return new x.Color(Li.X).convertSRGBToLinear().clone()}static get Y(){return new x.Color(Li.Y).convertSRGBToLinear().clone()}static get Z(){return new x.Color(Li.Z).convertSRGBToLinear().clone()}}class SA extends EA{constructor(e){super(e);m(this,"xArrow",new Di({direction:"x",color:tt.X}));m(this,"yArrow",new Di({direction:"y",color:tt.Y}));m(this,"zArrow",new Di({direction:"z",color:tt.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 zt(i,t){return TA(document.createElement(t!=null?t:"div"),i)}function TA(i,t){if(!t)return i;for(const e in t)e&&t[e]&&(i.style[e]=t[e]);return i}function MA(i){const t=zt(G({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 zA extends PA{constructor(e,n){var o;super(e);m(this,"yzCircle",new Si({direction:"x",color:tt.X}));m(this,"xzCircle",new Si({direction:"y",color:tt.Y}));m(this,"xyCircle",new Si({direction:"z",color:tt.Z}));m(this,"xRingHelper",new Ti({direction:"x"}));m(this,"yRingHelper",new Ti({direction:"y"}));m(this,"zRingHelper",new Ti({direction:"z"}));m(this,"xAngleHelper",new Mi({direction:"x",color:tt.X}));m(this,"yAngleHelper",new Mi({direction:"y",color:tt.Y}));m(this,"zAngleHelper",new Mi({direction:"z",color:tt.Z}));m(this,"angleTips");m(this,"container");n&&(this.container=n==null?void 0:n.container,this.angleTips=MA({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 Si extends x.Mesh{constructor(e){var n;super();m(this,"direction");m(this,"gapAngle",.02);m(this,"geometry",new x.RingGeometry(.25,.3,20,8,this.gapAngle,Math.PI/2-this.gapAngle*2));this.material=new x.MeshBasicMaterial({opacity:.6,color:(n=e.color)!=null?n:16777215,transparent:!0,side:x.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 Ti extends x.Group{constructor(e){super();m(this,"direction");this.direction=e.direction;const n=.015,o=new Array(8).fill(null).map((s,r)=>{const a=new x.RingGeometry(.25,.3,20,8,Math.PI/4*r+n,Math.PI/4-n*2),l=new x.MeshBasicMaterial({opacity:1,color:16777215,depthTest:!1,transparent:!0,side:x.DoubleSide}),c=new x.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 Mi extends x.Mesh{constructor(e){var o;super();m(this,"direction");m(this,"baseAxes");switch(e.direction){case"x":this.baseAxes=new x.Vector3(0,0,1);break;case"y":this.baseAxes=new x.Vector3(1,0,0);break;case"z":this.baseAxes=new x.Vector3(1,0,0);break}const n=.3+5e-4;this.geometry=new x.CircleGeometry(n,48,0,1e-4),this.material=new x.MeshBasicMaterial({opacity:.4,color:(o=e.color)!=null?o:16777215,depthTest:!1,transparent:!0,side:x.DoubleSide}),this.direction=e.direction,this.direction==="y"?this.rotateX(Math.PI/2):this.direction==="x"&&this.rotateY(-Math.PI/2)}}function BA(){const i=zt({width:"100%",height:"100%",left:"0",top:"0",position:"absolute",pointerEvents:"none"}),t=zt({boxSizing:"border-box",width:"100%",height:"100%",left:"0",top:"0",position:"relative",display:"flex",alignItems:"center",justifyContent:"center"}),e=zt({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:ht({cursor:"nesw-resize",left:n,bottom:n})},s={direction:"ns",element:ht({cursor:"ns-resize",bottom:n})},r={direction:"nwse",element:ht({cursor:"nwse-resize",right:n,bottom:n})},a={direction:"ew",element:ht({cursor:"ew-resize",right:n})},l={direction:"nesw",element:ht({cursor:"nesw-resize",right:n,top:n})},c={direction:"ns",element:ht({cursor:"ns-resize",top:n})},d={direction:"nwse",element:ht({cursor:"nwse-resize",left:n,top:n})},f={direction:"ew",element:ht({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 ht(i){const t=zt(G({background:"#FFFFFF",width:"9px",height:"9px",position:"absolute",pointerEvents:"none"},i)),e=zt({width:"15px",height:"15px",position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none"}),n=zt({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 VA extends kA{constructor(e,n,o,s){super(e);m(this,"points",[]);m(this,"cornerPositions",[]);m(this,"css3DInstance");m(this,"plane");m(this,"css3DRenderer",new Jt);m(this,"camera");m(this,"scene");m(this,"container");m(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 x.Vector3().subVectors(o.position,n).applyQuaternion(e).add(n);o.position.copy(r),o.applyQuaternion(e)}if(this.plane){const r=new x.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 x.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 a;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}=BA();this.points=r.map((l,c)=>({direction:l.direction,point:l.element,position:this.calculatePointPosition(e)[c]})),o.insertBefore(s,(a=o.children[0])!=null?a:null),this.updatePosition()}getCornerPositions(){const{originObject3D:e}=this;if(e.isCSS3DObjectPlus)return e.cornerPoints;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 x.Vector3;function pe(i,t){this._camera=i||null,this._domElement=t||document,this._raycaster=new x.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)}pe.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)};pe.eventNames=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","contextmenu","touchstart","touchend"];pe.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}};pe.prototype._objectCtxInit=function(i){i._3xDomEvent={}};pe.prototype._objectCtxDeinit=function(i){delete i._3xDomEvent};pe.prototype._objectCtxIsInit=function(i){return!!i._3xDomEvent};pe.prototype._objectCtxGet=function(i){return i._3xDomEvent};pe.prototype.camera=function(i){return i&&(this._camera=i),this._camera};pe.prototype.bind=function(i,t,e,n){console.assert(pe.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)};pe.prototype.addEventListener=pe.prototype.bind;pe.prototype.unbind=function(i,t,e,n){console.assert(pe.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)};pe.prototype.removeEventListener=pe.prototype.unbind;pe.prototype._bound=function(i,t){var e=this._objectCtxGet(t);return e?!!e[i+"Handlers"]:!1};pe.prototype._onMove=function(i,t,e,n){var o=this._boundObjs[i];if(!(o===void 0||o.length===0)){var s=new x.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)}};pe.prototype._onEvent=function(i,t,e,n){var o=this._boundObjs[i];if(!(o===void 0||o.length===0)){var s=new x.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)}}};pe.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)}};pe.prototype._onMouseDown=function(i){return this._onMouseEvent("mousedown",i)};pe.prototype._onMouseUp=function(i){return this._onMouseEvent("mouseup",i)};pe.prototype._onMouseEvent=function(i,t){var e=this._getRelativeMouseXY(t);this._onEvent(i,e.x,e.y,t)};pe.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)};pe.prototype._onClick=function(i){this._onMouseEvent("click",i)};pe.prototype._onDblClick=function(i){this._onMouseEvent("dblclick",i)};pe.prototype._onContextmenu=function(i){this._onMouseEvent("contextmenu",i)};pe.prototype._onTouchStart=function(i){return this._onTouchEvent("touchstart",i)};pe.prototype._onTouchEnd=function(i){return this._onTouchEvent("touchend",i)};pe.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)}};pe.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 Lt=null;class Ao{constructor(t,e,n,o,s,r,a){m(this,"hooks",new $t);m(this,"helperObject3D");m(this,"originObject3D");m(this,"camera");m(this,"model");m(this,"scene");m(this,"container");m(this,"domEvents");m(this,"isDragging",!1);m(this,"onRender");m(this,"enabled",!1);m(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 pe(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 x.Mesh&&(e.material.opacity=t),e.isCSS3DObjectPlus){const n=e;n.container.style.opacity=t.toString()}this.render()}restoreOpacity(){if(Lt===null)return;const t=this.originObject3D;if(t instanceof x.Mesh&&(t.material.opacity=Lt.opacity),t.isCSS3DObjectPlus){const e=t;e.container.style.opacity=Lt.opacity.toString()}this.render()}setOriginOpacityProperty(){var t,e;if(Lt===null){const n=this.originObject3D;n instanceof x.Mesh&&(Lt={opacity:n.material.opacity}),n instanceof ta&&(Lt={opacity:(t=n.container.style.opacity)!=null?t:1}),n.isCSS3DObjectPlus&&(Lt={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(We),s=[];for(const r of o)if(r instanceof x.Mesh||r instanceof x.Group){const a=r instanceof x.Group?r.children.filter(u=>u instanceof x.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 jA extends Ao{constructor(...e){super(...e);m(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 x.Vector3(1,0,0).applyQuaternion(this.helperObject3D.quaternion),r=new x.Vector3(0,1,0).applyQuaternion(this.helperObject3D.quaternion),a=new x.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 x.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=go(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 x.Vector3);if(!a)return;const l=a.clone().projectOnVector(o),c=l.clone().sub(s),d=new x.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 zi{constructor(t,e,n,o){m(this,"helperController");m(this,"five");m(this,"onFiveWantsTapGesture",t=>{if(!this.helperController)return;const e=this.helperController.onWantsTapGesture(t);return this.five.needsRender=!0,e});m(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 QA="v1.0.1",RA="Object3DHelper",vo=`${RA}@${QA}`,OA=()=>{console.error(`${vo} is disposed`)},HA=()=>{console.warn(`${vo} is disabled`)},FA=()=>{console.error(`${vo} is disabled`)};class GA{constructor(t,e){m(this,"controllers",{});m(this,"state",{visible:!0,enabled:!0,disposed:!1});m(this,"hooks",new $t);m(this,"helpers");m(this,"eventListener",{});m(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))});m(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))});m(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 Y(this,null,function*(){this.setState({visible:!0},t)})}hide(t){return Y(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 OA();if(!this.state.enabled&&t.enabled!==!0&&t.disposed!==!0)return FA();const n=G({},this.state);this.state=G(G({},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=G(G({},this.controllers),t),this.addEventListener(),this.setState(this.state)}addHelpers(t){this.helpers=G(G({},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&&HA()}}class NA extends Ao{constructor(...e){super(...e);m(this,"startInfo");m(this,"lastRotation");m(this,"rotations",[]);m(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 x.Vector3(1,0,0).applyQuaternion(this.helperObject3DQuaternion),d=new x.Vector3(0,1,0).applyQuaternion(this.helperObject3DQuaternion),f=new x.Vector3(0,0,1).applyQuaternion(this.helperObject3DQuaternion),u=(()=>{switch(o){case"x":return c;case"y":return d;case"z":return f}})(),h=new x.Plane().setFromNormalAndCoplanarPoint(u,s),p=new x.Vector3;h.projectPoint(s.clone(),p);const A=p.clone().sub(r),g=A.clone(),v=A.angleTo(a.baseAxes);this.setAngleHelperStart(o,v),this.setAngleHelperLength(o,0),this.rotations.push({vector:A.clone(),direction:!0}),this.startInfo={direction:o,startVector:A,staticStartVector:g,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=go(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 x.Vector3);if(!c)return;const d=l.position.clone(),f=new x.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 A=this.rotations[this.rotations.length-1],g=this.rotations[this.rotations.length-2],v=u.angleTo(g.vector),w=u.angleTo(A.vector),y=A.vector.angleTo(g.vector);if(y===0||w===0||v===0)return;if(v>w&&v>y)return A.direction;if(v<y&&w<y||v<w&&w>y)return!A.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 p=new x.Quaternion().setFromUnitVectors(n.clone().normalize(),u.clone().normalize());l.applyQuaternion(p),this.helperObject3D.applyHelperQuaternion(p),this.helperObject3DQuaternion.premultiply(p),this.hooks.emit("rotateUpdate",{quaternion:p,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 x.Mesh&&o.geometry instanceof x.CircleGeometry){const{radius:s,segments:r,thetaLength:a}=o.geometry.parameters;o.geometry=new x.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 x.Mesh&&r.geometry instanceof x.CircleGeometry){const{radius:a,thetaStart:l}=r.geometry.parameters,c=Math.ceil(Math.abs(s)*(40/(2*Math.PI)));r.geometry=new x.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 WA extends Ao{constructor(...e){super(...e);m(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 x.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=go(this.camera,e,this.container);if(!n)return this.dragEnd();this.scale(n),console.log("%c RectangleScaleController dragging","color: #49de1b")}scale(e){var B,N;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||LA(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=F=>{const X=new H.Vector3(0,0,0);if(!this.startInfo)return X;const j=(F==="ew"?f:u).clone(),E=c.clone().projectOnVector(j),R=a.clone().projectOnVector(j),O=l.clone().projectOnVector(j);if(R.equals(E))return X;if(F==="ns"&&typeof this.startInfo.dragPointInCenterBottom!="boolean"){const _=new H.Vector3().subVectors(R,O),J=_.x<0&&j.x>=0,de=_.y<0&&j.y>=0,ue=_.z<0&&j.z>=0;this.startInfo.dragPointInCenterBottom=J||de||ue}if(F==="ew"&&typeof this.startInfo.dragPointInCenterLeft!="boolean"){const _=new H.Vector3().subVectors(R,O),J=_.x<0&&j.x>=0,de=_.y<0&&j.y>=0,ue=_.z<0&&j.z>=0;this.startInfo.dragPointInCenterLeft=J||de||ue}const W=new H.Vector3().subVectors(R,E),U=W.length();return U>.3?(console.warn("offset.length() > 0.3, skipped",U),X):W},p=h("ew"),A=h("ns"),g=()=>{const F=p;this.helperObject3D.cornerPositions.forEach((X,j)=>{var E;(E=this.startInfo)!=null&&E.dragPointInCenterLeft?(j===0||j===3)&&X.add(F):(j===1||j===2)&&X.add(F)})},v=()=>{const F=A;this.helperObject3D.cornerPositions.forEach((X,j)=>{var E;(E=this.startInfo)!=null&&E.dragPointInCenterBottom?(j===0||j===1)&&X.add(F):(j===2||j===3)&&X.add(F)})};switch(d){case"ew":g();break;case"ns":v();break;case"nesw":case"nwse":g(),v()}const w=new H.Vector3().subVectors(r[1],r[0]).length()/f.length(),y=new H.Vector3().subVectors(r[3],r[0]).length()/u.length(),P=new H.Vector3(w,y,1),I=new x.Matrix4().scale(P);n.isCSS3DObjectPlus?n.applyScaleMatrix4(I):n.scale.applyMatrix4(I),o.position.copy(a);const C=new H.Vector3().addVectors(r[0],r[2]).divideScalar(2),L=new H.Vector3().subVectors(C,l),D=new x.Matrix4().setPosition(L);n.applyMatrix4(D),(B=this.helperObject3D.css3DInstance)==null||B.css3DObject.applyMatrix4(D),(N=this.helperObject3D.plane)==null||N.applyMatrix4(D),this.hooks.emit("scaleUpdate",{matrix4:I,helperOrigin:l}),this.hooks.emit("positionUpdate",{matrix4:D}),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 _A extends WA{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 bo="v1.0.0",Ui="Object3DHelperPlugin",pi=`${Ui}@${bo}`,XA=()=>{console.error(`${pi} is disposed`)},YA=()=>{console.warn(`${pi} is disabled`)},UA=()=>{console.error(`${pi} is disabled`)};class bl extends li{constructor(e){super(e);m(this,"version",bo);m(this,"name",Ui);m(this,"state",{visible:!0,enabled:!0,disposed:!1});m(this,"objectHelperMap",new Map);m(this,"css3DObjectParentMap",new Map);m(this,"css3DRender");this.five=e,this.css3DRender=new Jt(this.five.scene),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,{[`__${Ui.toUpperCase()}_DEBUG__`]:this})}show(e){return Y(this,null,function*(){this.setState({visible:!0},e)})}hide(e){return Y(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 XA();if(!this.state.enabled&&e.enabled!==!0&&e.disposed!==!0)return UA();const o=G({},this.state);this.state=G(G({},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 GA;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 SA(e),u=new zi(this.five,jA,e,f);o.addControllers({moveController:u.helperController})}if(l){let f;s&&r&&(f={container:s});const u=new zA(e,f),h=new zi(this.five,NA,e,u);o.addControllers({rotateController:h.helperController})}if(c&&s){const f=new VA(e,s,r,this.five.scene),u=new zi(this.five,_A,e,f);o.addControllers({scaleController:u.helperController})}e.isCSS3DObjectPlus&&ia(this.five).then(()=>{var f,u;if(e.isCSS3DObjectPlus){const h=e,p=(f=this.css3DRender.behindModeCSS3DRenderer.wrapper)!=null?f:oa(this.five);p&&e&&(this.css3DObjectParentMap.set(h,h.parent),h.removeFromParent(),this.css3DRender.behindModeCSS3DRenderer.setWrapper(p),(u=this.css3DRender.getBehindCSS3DObjectGroup())==null||u.add(h),this.css3DRender.render(this.five.camera))}})}removeObject3DHelper(e){const n=this.objectHelperMap.get(e);if(!!n){if(e.isCSS3DObjectPlus){const o=e,s=this.css3DObjectParentMap.get(o);s==null||s.add(o),this.css3DRender.render(this.five.camera)}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&&YA()}}const JA=i=>new bl(i);exports.CSS3DRender=Jt;exports.CSS3DRenderPlugin=en;exports.CameraMovementEffect=Sa;exports.CameraMovementPlugin=cf;exports.ContentType=gl;exports.CruisePlugin=Ym;exports.CruisePluginController=uo;exports.DIRECTION=Yt;exports.DISPLAY_STRATEGY_TYPE=Tt;exports.DimensionType=Al;exports.FLOOR_PLAN_ATTACHED_TO=gt;exports.FLOOR_TYPE_MAP=Zu;exports.GuideLinePlugin=Za;exports.ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE=Mt;exports.ItemLabelPlugin=vm;exports.Magnifier=Ba;exports.MapviewFloorplanPlugin=Du;exports.ModelChassisCompassPlugin=$u;exports.ModelEntryDoorGuidePlugin=nf;exports.ModelFloorplanPlugin=Pu;exports.ModelItemLabelPlugin=Kh;exports.ModelRoomLabelPlugin=jc;exports.ModelTVVideoPlugin=tm;exports.ModelViewPlugin=Xl;exports.Object3DHelperController=bl;exports.Object3DHelperPlugin=JA;exports.PLUGIN=pi;exports.PaintBrush=_l;exports.PaintBrushTypeEnum=et;exports.PanoCompassPlugin=Sf;exports.PanoCursorRaycasterPlugin=dc;exports.PanoDoorLabelPlugin=Tm;exports.PanoFloorplanRadarPlugin=Uu;exports.PanoMeasurePlugin=kh;exports.PanoMeasurePluginLine=Ft;exports.PanoMeasurePluginModel=fi;exports.PanoMeasurePluginPoint=_e;exports.PanoMeasurePluginPolyline=ui;exports.PanoRulerPlugin=mf;exports.PanoRulerProPlugin=If;exports.PanoSpatialTagPlugin=Fh;exports.PanoTagPlugin=CA;exports.PanoTagPluginController=pl;exports.PointType=vl;exports.ROOM_FETILE_TYPE_MAP=Ju;exports.ROOM_TYPE_MAP=qu;exports.Rotation=Ue;exports.TopviewFloorplanPlugin=Su;exports.Util=Fg;exports.VERSION=bo;exports.itemLabelPluginServerParams=bm;exports.modelItemLabelPluginServerParams=$h;exports.modelRoomLabelPluginServerParams=Qc;exports.pluginFlag=wA;
|