@realsee/dnalogel 3.20.4 → 3.20.6

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.
Files changed (369) hide show
  1. package/dist/GuideLinePlugin/typing.d.ts +1 -1
  2. package/dist/PanoMeasurePlugin/Controller/index.d.ts +3 -3
  3. package/dist/PanoMeasurePlugin/Model/index.d.ts +3 -3
  4. package/dist/PanoMeasurePlugin/Model/line.d.ts +1 -0
  5. package/dist/PanoMeasurePlugin/Model/polyline.d.ts +1 -0
  6. package/dist/PanoMeasurePlugin/Modules/GuideController.d.ts +0 -4
  7. package/dist/PanoMeasurePlugin/typings/data.d.ts +1 -1
  8. package/dist/index.cjs.js +14 -14
  9. package/dist/index.js +107 -102
  10. package/dist/index.umd.js +14 -14
  11. package/docs/assets/search.js +1 -1
  12. package/docs/classes/AreaMakerPluginType.AreaMakerController.html +3 -3
  13. package/docs/classes/AreaMakerPluginType.AreaMakerItem.html +3 -3
  14. package/docs/classes/CSS3DRender.html +3 -3
  15. package/docs/classes/GuideLineItem.GuideLineItem.html +3 -3
  16. package/docs/classes/GuideLineModeItem.GuideLineModeItem.html +3 -3
  17. package/docs/classes/Magnifier.html +3 -3
  18. package/docs/classes/ModelRoomLabelController.html +3 -3
  19. package/docs/classes/MoveController.html +3 -3
  20. package/docs/classes/Object3DHelperController.html +3 -3
  21. package/docs/classes/PaintBrush.html +3 -3
  22. package/docs/classes/PanoMeasurePluginLine.html +20 -10
  23. package/docs/classes/PanoMeasurePluginModel.html +6 -6
  24. package/docs/classes/PanoMeasurePluginPoint.html +3 -3
  25. package/docs/classes/PanoMeasurePluginPolyline.html +22 -12
  26. package/docs/classes/PanoTagPluginController.html +3 -3
  27. package/docs/classes/Util.BetterTween.html +3 -3
  28. package/docs/classes/Util.Interval.html +3 -3
  29. package/docs/classes/Util.LineSegments.html +3 -3
  30. package/docs/classes/Util.Magnifier.html +3 -3
  31. package/docs/classes/Util.Object3D.html +3 -3
  32. package/docs/classes/Util.PointDomHelper.html +3 -3
  33. package/docs/classes/Util.PointHelper.html +3 -3
  34. package/docs/classes/Util.PointSelectorHelper.html +3 -3
  35. package/docs/classes/Util.Rectangle.html +3 -3
  36. package/docs/classes/WalkController.html +3 -3
  37. package/docs/enums/CameraMovementEffect.html +3 -3
  38. package/docs/enums/ContentType.html +3 -3
  39. package/docs/enums/DIRECTION.html +3 -3
  40. package/docs/enums/DISPLAY_STRATEGY_TYPE.html +3 -3
  41. package/docs/enums/DimensionType.html +3 -3
  42. package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +3 -3
  43. package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +3 -3
  44. package/docs/enums/PaintBrushTypeEnum.html +3 -3
  45. package/docs/enums/PointType.html +3 -3
  46. package/docs/enums/Rotation.html +3 -3
  47. package/docs/functions/AreaMakerPlugin.html +3 -3
  48. package/docs/functions/CSS3DRenderPlugin.html +3 -3
  49. package/docs/functions/CameraMovementPlugin.html +3 -3
  50. package/docs/functions/CruisePlugin.html +3 -3
  51. package/docs/functions/CurrentPanoImagePlugin.html +3 -3
  52. package/docs/functions/GuideLinePlugin.html +3 -3
  53. package/docs/functions/ItemLabelPlugin.html +3 -3
  54. package/docs/functions/MapviewFloorplanPlugin.html +3 -3
  55. package/docs/functions/ModelChassisCompassPlugin.html +3 -3
  56. package/docs/functions/ModelEntryDoorGuidePlugin.html +3 -3
  57. package/docs/functions/ModelFloorplanPlugin.html +3 -3
  58. package/docs/functions/ModelItemLabelPlugin.html +3 -3
  59. package/docs/functions/ModelRoomLabelPlugin.html +3 -3
  60. package/docs/functions/ModelTVVideoPlugin.html +3 -3
  61. package/docs/functions/ModelViewPlugin.html +3 -3
  62. package/docs/functions/MovePlugin.html +3 -3
  63. package/docs/functions/Object3DHelperPlugin.html +3 -3
  64. package/docs/functions/PanoCompassPlugin.html +3 -3
  65. package/docs/functions/PanoCursorRaycasterPlugin.html +3 -3
  66. package/docs/functions/PanoDoorLabelPlugin.html +3 -3
  67. package/docs/functions/PanoFloorplanRadarPlugin.html +3 -3
  68. package/docs/functions/PanoMeasurePlugin.html +3 -3
  69. package/docs/functions/PanoRulerPlugin.html +3 -3
  70. package/docs/functions/PanoRulerProPlugin.html +3 -3
  71. package/docs/functions/PanoSpatialTagPlugin.html +3 -3
  72. package/docs/functions/PanoTagPlugin.html +3 -3
  73. package/docs/functions/PanoVideoPlugin.html +3 -3
  74. package/docs/functions/PipelinePlugin.html +3 -3
  75. package/docs/functions/TopviewFloorplanPlugin.html +3 -3
  76. package/docs/functions/Util.absoluteUrl.html +3 -3
  77. package/docs/functions/Util.checkFiveModelLoaded.html +3 -3
  78. package/docs/functions/Util.equal.html +3 -3
  79. package/docs/functions/Util.getCoordsFromClient.html +3 -3
  80. package/docs/functions/Util.getCoordsFromElement.html +3 -3
  81. package/docs/functions/Util.getFrameTime.html +3 -3
  82. package/docs/functions/Util.getIntersectFromRelativePosition.html +3 -3
  83. package/docs/functions/Util.getRaycasterFromFivePointer.html +3 -3
  84. package/docs/functions/Util.isAbsoluteURL.html +3 -3
  85. package/docs/functions/Util.isModelLike.html +3 -3
  86. package/docs/functions/Util.isNil.html +3 -3
  87. package/docs/functions/Util.isPanoramaLike.html +3 -3
  88. package/docs/functions/Util.nextFrame.html +3 -3
  89. package/docs/functions/Util.notNil.html +3 -3
  90. package/docs/functions/Util.requestAnimationFrameInterval.html +3 -3
  91. package/docs/functions/Util.tweenProgress.html +3 -3
  92. package/docs/functions/Util.uuid.html +3 -3
  93. package/docs/functions/pluginFlag.html +3 -3
  94. package/docs/index.html +4 -4
  95. package/docs/interfaces/AddTagConfig.html +3 -3
  96. package/docs/interfaces/AreaMakerPluginType.AnimeOptions.html +3 -3
  97. package/docs/interfaces/AreaMakerPluginType.Config.html +3 -3
  98. package/docs/interfaces/AreaMakerPluginType.EventMap.html +3 -3
  99. package/docs/interfaces/AreaMakerPluginType.Params.html +3 -3
  100. package/docs/interfaces/AreaMakerPluginType.ServerAreaMakerItem.html +3 -3
  101. package/docs/interfaces/AreaMakerPluginType.ServerAreaMakerItemV1.html +3 -3
  102. package/docs/interfaces/AreaMakerPluginType.ServerDataV1.html +3 -3
  103. package/docs/interfaces/AreaMakerPluginType.ServerDataV2.html +3 -3
  104. package/docs/interfaces/AreaMakerPluginType.ShowHideOptions.html +3 -3
  105. package/docs/interfaces/AreaMakerPluginType.State.html +3 -3
  106. package/docs/interfaces/CSS3DRenderPluginEventMap.html +3 -3
  107. package/docs/interfaces/CSS3DRenderPluginState.html +3 -3
  108. package/docs/interfaces/CameraMovementPluginExportType.html +3 -3
  109. package/docs/interfaces/CruisePluginTypes.Config.html +3 -3
  110. package/docs/interfaces/CruisePluginTypes.CruiseKeyframe.html +3 -3
  111. package/docs/interfaces/CruisePluginTypes.EventMap.html +3 -3
  112. package/docs/interfaces/CruisePluginTypes.MoveAction.html +3 -3
  113. package/docs/interfaces/CruisePluginTypes.MoveWithKeyframesAction.html +3 -3
  114. package/docs/interfaces/CruisePluginTypes.MoveWithPanoIndexAction.html +3 -3
  115. package/docs/interfaces/CruisePluginTypes.PluginData.html +3 -3
  116. package/docs/interfaces/CruisePluginTypes.PluginServerData.html +3 -3
  117. package/docs/interfaces/CruisePluginTypes.PluginState.html +3 -3
  118. package/docs/interfaces/CurrentPanoImagePluginType.Config.html +3 -3
  119. package/docs/interfaces/CurrentPanoImagePluginType.EventMap.html +3 -3
  120. package/docs/interfaces/CurrentPanoImagePluginType.Params.html +3 -3
  121. package/docs/interfaces/CurrentPanoImagePluginType.ShowHideOptions.html +3 -3
  122. package/docs/interfaces/CurrentPanoImagePluginType.State.html +3 -3
  123. package/docs/interfaces/EventMap.html +3 -3
  124. package/docs/interfaces/FloorplanBounding.html +3 -3
  125. package/docs/interfaces/FloorplanData.html +3 -3
  126. package/docs/interfaces/FloorplanEntrance.html +3 -3
  127. package/docs/interfaces/FloorplanExtraObject.html +3 -3
  128. package/docs/interfaces/FloorplanExtraObject3D.html +3 -3
  129. package/docs/interfaces/FloorplanFloorData.html +3 -3
  130. package/docs/interfaces/FloorplanImagePosition.html +3 -3
  131. package/docs/interfaces/FloorplanObserver.html +3 -3
  132. package/docs/interfaces/FloorplanOutlineItem.html +3 -3
  133. package/docs/interfaces/FloorplanPosition.html +3 -3
  134. package/docs/interfaces/FloorplanRoomItem.html +3 -3
  135. package/docs/interfaces/FloorplanRoomLabelItem.html +3 -3
  136. package/docs/interfaces/FloorplanServerBounding.html +3 -3
  137. package/docs/interfaces/FloorplanServerComputedData.html +3 -3
  138. package/docs/interfaces/FloorplanServerData.html +3 -3
  139. package/docs/interfaces/FloorplanServerDoorItem.html +3 -3
  140. package/docs/interfaces/FloorplanServerDoorPosition.html +3 -3
  141. package/docs/interfaces/FloorplanServerEntrance.html +3 -3
  142. package/docs/interfaces/FloorplanServerFloorData.html +3 -3
  143. package/docs/interfaces/FloorplanServerImagePosition.html +3 -3
  144. package/docs/interfaces/FloorplanServerObserver.html +3 -3
  145. package/docs/interfaces/FloorplanServerOutlineItem.html +3 -3
  146. package/docs/interfaces/FloorplanServerPosition.html +3 -3
  147. package/docs/interfaces/FloorplanServerRoomItem.html +3 -3
  148. package/docs/interfaces/FloorplanServerRoomLabelItem.html +3 -3
  149. package/docs/interfaces/GuideLineModeItem.GuideLineTagContainer.html +3 -3
  150. package/docs/interfaces/GuideLinePluginType.CatmullRomCurve3.html +3 -3
  151. package/docs/interfaces/GuideLinePluginType.EventMap.html +3 -3
  152. package/docs/interfaces/GuideLinePluginType.GuideLineGeometryStyle.html +3 -3
  153. package/docs/interfaces/GuideLinePluginType.GuideLineItemContainer.html +3 -3
  154. package/docs/interfaces/GuideLinePluginType.GuideLineMaterialStyle.html +3 -3
  155. package/docs/interfaces/GuideLinePluginType.GuideLineMeshStyle.html +3 -3
  156. package/docs/interfaces/GuideLinePluginType.LineGeometriesConfig.html +3 -3
  157. package/docs/interfaces/GuideLinePluginType.ModelGuideLineStyle.html +3 -3
  158. package/docs/interfaces/GuideLinePluginType.ModelGuideLineTagData.html +3 -3
  159. package/docs/interfaces/GuideLinePluginType.PanoramaGuideLineStyle.html +3 -3
  160. package/docs/interfaces/GuideLinePluginType.PluginDataV2.html +3 -3
  161. package/docs/interfaces/GuideLinePluginType.PluginServerData.html +3 -3
  162. package/docs/interfaces/GuideLinePluginType.PluginState.html +3 -3
  163. package/docs/interfaces/GuideLinePluginType.Route.html +3 -3
  164. package/docs/interfaces/GuideLinePluginType.RouteConfig.html +3 -3
  165. package/docs/interfaces/HelperOffset.html +3 -3
  166. package/docs/interfaces/ImagePlaneGroup.html +3 -3
  167. package/docs/interfaces/ItemLabelPluginData.html +3 -3
  168. package/docs/interfaces/ItemLabelPluginExportReturnsType.html +3 -3
  169. package/docs/interfaces/ItemLabelPluginParametersType.html +3 -3
  170. package/docs/interfaces/MinMax.html +3 -3
  171. package/docs/interfaces/ModelChassisCompassPluginData.html +3 -3
  172. package/docs/interfaces/ModelChassisCompassPluginExportType.html +3 -3
  173. package/docs/interfaces/ModelChassisCompassPluginParameterType.html +3 -3
  174. package/docs/interfaces/ModelEntryDoorGuidePluginData.html +3 -3
  175. package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +3 -3
  176. package/docs/interfaces/ModelItemLabelPluginData.html +3 -3
  177. package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +3 -3
  178. package/docs/interfaces/ModelItemLabelPluginParametersType.html +3 -3
  179. package/docs/interfaces/ModelRoomLabelPluginData.html +3 -3
  180. package/docs/interfaces/ModelTVVideoPluginData.html +3 -3
  181. package/docs/interfaces/ModelTVVideoPluginExportType.html +3 -3
  182. package/docs/interfaces/ModelTVVideoPluginParameterType.html +3 -3
  183. package/docs/interfaces/ModelViewPluginExportType.html +3 -3
  184. package/docs/interfaces/Object3DHelperState.html +3 -3
  185. package/docs/interfaces/ObjectHelperControllers.html +3 -3
  186. package/docs/interfaces/PaintBrushAction.html +3 -3
  187. package/docs/interfaces/PaintBrushConfigs.html +3 -3
  188. package/docs/interfaces/PaintBrushState.html +3 -3
  189. package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +3 -3
  190. package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +3 -3
  191. package/docs/interfaces/PanoMeasureParameterType.html +3 -3
  192. package/docs/interfaces/PanoMeasurePluginLineJson.html +3 -3
  193. package/docs/interfaces/PanoMeasurePluginOpenParameter.html +3 -3
  194. package/docs/interfaces/PanoMeasurePluginPointJson.html +3 -3
  195. package/docs/interfaces/PanoMeasurePluginPolylineJson.html +3 -3
  196. package/docs/interfaces/PanoRulerPluginExportType.html +3 -3
  197. package/docs/interfaces/PanoRulerPluginOptions.html +3 -3
  198. package/docs/interfaces/PanoRulerPluginParameterType.html +3 -3
  199. package/docs/interfaces/PanoRulerProPluginExportType.html +3 -3
  200. package/docs/interfaces/PanoRulerProPluginOptions.html +3 -3
  201. package/docs/interfaces/PanoRulerProPluginParameterType.html +3 -3
  202. package/docs/interfaces/PanoRulerProPluginState.html +3 -3
  203. package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +3 -3
  204. package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +3 -3
  205. package/docs/interfaces/PanoSpatialTagPluginData.html +3 -3
  206. package/docs/interfaces/PanoSpatialTagPluginDataElement.html +3 -3
  207. package/docs/interfaces/PanoSpatialTagPluginExportType.html +3 -3
  208. package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +3 -3
  209. package/docs/interfaces/PanoSpatialTagPluginParameterType.html +3 -3
  210. package/docs/interfaces/PanoSpatialTagPluginPointElement.html +3 -3
  211. package/docs/interfaces/PanoSpatialTagPluginTagElement.html +3 -3
  212. package/docs/interfaces/PanoVideoPluginType.LoadParams.html +3 -3
  213. package/docs/interfaces/PanoVideoPluginType.PanoVideoItem.html +3 -3
  214. package/docs/interfaces/PanoVideoPluginType.PluginData.html +3 -3
  215. package/docs/interfaces/PanoVideoPluginType.PluginEventMap.html +3 -3
  216. package/docs/interfaces/PanoVideoPluginType.PluginState.html +3 -3
  217. package/docs/interfaces/PanoVideoPluginType.VideoItem.html +3 -3
  218. package/docs/interfaces/PanoVideoPluginType.VideoMeshParams.html +3 -3
  219. package/docs/interfaces/Point.html +3 -3
  220. package/docs/interfaces/Room.html +3 -3
  221. package/docs/interfaces/RoomInfo.html +3 -3
  222. package/docs/interfaces/RoomLabel.html +3 -3
  223. package/docs/interfaces/RoomRules.html +3 -3
  224. package/docs/interfaces/Rooms.html +3 -3
  225. package/docs/interfaces/Scissor.html +3 -3
  226. package/docs/interfaces/State.html +3 -3
  227. package/docs/interfaces/TagCacheInterface.html +3 -3
  228. package/docs/interfaces/TagConfig.html +3 -3
  229. package/docs/interfaces/TagGLTFObjectGroup.html +3 -3
  230. package/docs/interfaces/TagIconUrl.html +3 -3
  231. package/docs/interfaces/TagObjectGroup.html +3 -3
  232. package/docs/interfaces/TagStyle.html +3 -3
  233. package/docs/interfaces/Tags.html +3 -3
  234. package/docs/interfaces/TemporaryState.html +3 -3
  235. package/docs/interfaces/Util.MagnifierParameter.html +3 -3
  236. package/docs/interfaces/Util.MouseGroupParameter.html +3 -3
  237. package/docs/interfaces/Util.PointIntersection.html +3 -3
  238. package/docs/modules/AreaMakerPluginType.html +3 -3
  239. package/docs/modules/CruisePluginTypes.html +3 -3
  240. package/docs/modules/CurrentPanoImagePluginType.html +3 -3
  241. package/docs/modules/GuideLineItem.html +3 -3
  242. package/docs/modules/GuideLineModeItem.html +3 -3
  243. package/docs/modules/GuideLinePluginType.html +3 -3
  244. package/docs/modules/PanoVideoPluginType.html +3 -3
  245. package/docs/modules/Util.html +3 -3
  246. package/docs/modules.html +4 -4
  247. package/docs/types/AreaMakerPluginType.AreaMakerItemEventMap.html +3 -3
  248. package/docs/types/AreaMakerPluginType.ItemRenderer.html +3 -3
  249. package/docs/types/AreaMakerPluginType.PluginData.html +3 -3
  250. package/docs/types/AreaMakerPluginType.ServerData.html +3 -3
  251. package/docs/types/ArrayPosition.html +3 -3
  252. package/docs/types/AudioAppearance.html +3 -3
  253. package/docs/types/AudioTagTypeConfigKey.html +3 -3
  254. package/docs/types/CSS3DRenderExportType.html +3 -3
  255. package/docs/types/CSS3DRenderPluginExportType.html +3 -3
  256. package/docs/types/CSS3DRenderPluginParameterType.html +3 -3
  257. package/docs/types/ClassFunctionParameters.html +3 -3
  258. package/docs/types/Color.html +3 -3
  259. package/docs/types/ContentTypeConfigKey.html +3 -3
  260. package/docs/types/ContentTypeConfigKeySplit.html +3 -3
  261. package/docs/types/ContentTypeMap.html +3 -3
  262. package/docs/types/Create3DDomContainerReturnType.html +3 -3
  263. package/docs/types/Create3DElementReturnType.html +3 -3
  264. package/docs/types/CruisePluginExportType.html +3 -3
  265. package/docs/types/CruisePluginTypes.CruiseData.html +3 -3
  266. package/docs/types/CruisePluginTypes.MoveEffect.html +3 -3
  267. package/docs/types/CurrentPanoImagePluginExportType.html +3 -3
  268. package/docs/types/DeprecatedMediaPlaneProperty.html +3 -3
  269. package/docs/types/DeprecatedTagProperty.html +3 -3
  270. package/docs/types/Direction-1.html +3 -3
  271. package/docs/types/Direction4.html +3 -3
  272. package/docs/types/ElementRenderer.html +3 -3
  273. package/docs/types/FloorplanRuleLabels.html +3 -3
  274. package/docs/types/FloorplanServerRuleLabels.html +3 -3
  275. package/docs/types/GuideLinePluginExportType.html +3 -3
  276. package/docs/types/GuideLinePluginType.GuideLineItem.html +5 -5
  277. package/docs/types/GuideLinePluginType.GuideLineItemEventMap.html +3 -3
  278. package/docs/types/GuideLinePluginType.GuideLineModeItemMode.html +3 -3
  279. package/docs/types/GuideLinePluginType.GuideLineStyle.html +3 -3
  280. package/docs/types/GuideLinePluginType.ModelGuideLineTag.html +3 -3
  281. package/docs/types/GuideLinePluginType.PathItem.html +3 -3
  282. package/docs/types/GuideLinePluginType.PluginData.html +3 -3
  283. package/docs/types/HelperEventMap.html +3 -3
  284. package/docs/types/InternalHelperEventMap.html +3 -3
  285. package/docs/types/LoadTagConfig.html +3 -3
  286. package/docs/types/MapviewFloorplanPluginParameterType.html +3 -3
  287. package/docs/types/MapviewFloorplanPluginReturnType.html +3 -3
  288. package/docs/types/MediaData.html +3 -3
  289. package/docs/types/MediaStore.html +3 -3
  290. package/docs/types/ModelEntryDoorGuidePluginParameterType.html +3 -3
  291. package/docs/types/ModelFloorplanPluginParameterType.html +3 -3
  292. package/docs/types/ModelFloorplanPluginReturnType.html +3 -3
  293. package/docs/types/ModelId.html +3 -3
  294. package/docs/types/ModelRoomLabelPluginParameters.html +3 -3
  295. package/docs/types/ModelRoomLabelPluginReturnType.html +3 -3
  296. package/docs/types/MoveArgs.html +3 -3
  297. package/docs/types/MoveOpts.html +3 -3
  298. package/docs/types/Object3DHelperEventMap.html +3 -3
  299. package/docs/types/ObjectFit.html +3 -3
  300. package/docs/types/PaintBrushEventMap.html +3 -3
  301. package/docs/types/PanoCompassPluginData.html +3 -3
  302. package/docs/types/PanoCompassPluginExportType.html +3 -3
  303. package/docs/types/PanoCompassPluginParameterType.html +3 -3
  304. package/docs/types/PanoFloorplanRadarPluginParameterType.html +3 -3
  305. package/docs/types/PanoFloorplanRadarPluginReturnType.html +3 -3
  306. package/docs/types/PanoIndex.html +3 -3
  307. package/docs/types/PanoMeasurePluginEvent.html +3 -3
  308. package/docs/types/PanoMeasureReturnType.html +3 -3
  309. package/docs/types/PanoSpatialTagPluginId.html +3 -3
  310. package/docs/types/PanoTagPluginExportInterface.html +3 -3
  311. package/docs/types/PanoTagPluginParamsInterface.html +3 -3
  312. package/docs/types/PanoVideoPluginParameterType.html +3 -3
  313. package/docs/types/PanoVideoPluginReturnType.html +3 -3
  314. package/docs/types/PickTagContentTypeInContentTypeConfigKey.html +3 -3
  315. package/docs/types/PipelinePluginParameterType.html +3 -3
  316. package/docs/types/PipelinePluginReturnType.html +3 -3
  317. package/docs/types/PlaneTag.html +3 -3
  318. package/docs/types/Point2DTag.html +3 -3
  319. package/docs/types/Point3DTag.html +3 -3
  320. package/docs/types/PointTag.html +3 -3
  321. package/docs/types/PointTagInstance.html +3 -3
  322. package/docs/types/Position.html +3 -3
  323. package/docs/types/RotateArgs.html +3 -3
  324. package/docs/types/RotateOpts.html +3 -3
  325. package/docs/types/RuleLabelsKey.html +3 -3
  326. package/docs/types/RuleLabelsValue.html +3 -3
  327. package/docs/types/StickType.html +3 -3
  328. package/docs/types/Tag.html +3 -3
  329. package/docs/types/Tag2D.html +3 -3
  330. package/docs/types/Tag3D.html +3 -3
  331. package/docs/types/TagConfigByKey.html +3 -3
  332. package/docs/types/TagContentType.html +3 -3
  333. package/docs/types/TagContentTypeMapping.html +3 -3
  334. package/docs/types/TagDimensionType.html +3 -3
  335. package/docs/types/TagElement.html +3 -3
  336. package/docs/types/TagEvents.html +3 -3
  337. package/docs/types/TagGLTFObject.html +3 -3
  338. package/docs/types/TagHooks.html +3 -3
  339. package/docs/types/TagId.html +3 -3
  340. package/docs/types/TagInstance.html +3 -3
  341. package/docs/types/TagPointType.html +3 -3
  342. package/docs/types/TagRendererMap.html +3 -3
  343. package/docs/types/TopviewFloorplanPluginParameterType.html +3 -3
  344. package/docs/types/TopviewFloorplanPluginReturnType.html +3 -3
  345. package/docs/types/WorkCode.html +3 -3
  346. package/docs/variables/FLOOR_TYPE_MAP.html +3 -3
  347. package/docs/variables/PLUGIN.html +3 -3
  348. package/docs/variables/ROOM_FETILE_TYPE_MAP.html +3 -3
  349. package/docs/variables/ROOM_TYPE_MAP.html +3 -3
  350. package/docs/variables/defaultGlobalConfig.html +3 -3
  351. package/docs/variables/itemLabelPluginServerParams.html +3 -3
  352. package/docs/variables/modelItemLabelPluginServerParams.html +3 -3
  353. package/docs/variables/modelRoomLabelPluginServerParams.html +3 -3
  354. package/libs/GuideLinePlugin/Controller.js +24 -26
  355. package/libs/GuideLinePlugin/GuideLineModeItem/index.js +33 -33
  356. package/libs/GuideLinePlugin/typing.d.ts +1 -1
  357. package/libs/PanoMeasurePlugin/Controller/index.d.ts +3 -3
  358. package/libs/PanoMeasurePlugin/Controller/index.js +50 -50
  359. package/libs/PanoMeasurePlugin/Model/index.d.ts +3 -3
  360. package/libs/PanoMeasurePlugin/Model/line.d.ts +1 -0
  361. package/libs/PanoMeasurePlugin/Model/line.js +8 -5
  362. package/libs/PanoMeasurePlugin/Model/polyline.d.ts +1 -0
  363. package/libs/PanoMeasurePlugin/Model/polyline.js +3 -0
  364. package/libs/PanoMeasurePlugin/Modules/GuideController.d.ts +0 -4
  365. package/libs/PanoMeasurePlugin/typings/data.d.ts +1 -1
  366. package/libs/PanoRulerProPlugin/Controller.js +22 -21
  367. package/libs/base/BasePlugin.js +1 -1
  368. package/libs/shared-utils/logger.js +1 -1
  369. package/package.json +1 -1
package/dist/index.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(ie,Ae){typeof exports=="object"&&typeof module!="undefined"?Ae(exports,require("@realsee/five"),require("three"),require("three/examples/jsm/renderers/CSS3DRenderer"),require("hammerjs"),require("@realsee/five/line"),require("three/examples/jsm/loaders/FBXLoader"),require("earcut"),require("animejs"),require("@realsee/five/gltf-loader")):typeof define=="function"&&define.amd?define(["exports","@realsee/five","three","three/examples/jsm/renderers/CSS3DRenderer","hammerjs","@realsee/five/line","three/examples/jsm/loaders/FBXLoader","earcut","animejs","@realsee/five/gltf-loader"],Ae):(ie=typeof globalThis!="undefined"?globalThis:ie||self,Ae(ie.dnalogel={},ie.FiveSDK,ie.THREE,ie.CSS3DRenderer,ie.Hammer,ie.Line,ie.FBXLoader,ie.earcut,ie.anime,ie.GLTFLoader))})(this,function(ie,Ae,G,Ji,li,Is,Ps,Nn,xt,Fn){"use strict";var Yk=Object.defineProperty,Xk=Object.defineProperties;var Zk=Object.getOwnPropertyDescriptors;var Tf=Object.getOwnPropertySymbols;var Jk=Object.prototype.hasOwnProperty,qk=Object.prototype.propertyIsEnumerable;var al=(ie,Ae,G)=>Ae in ie?Yk(ie,Ae,{enumerable:!0,configurable:!0,writable:!0,value:G}):ie[Ae]=G,V=(ie,Ae)=>{for(var G in Ae||(Ae={}))Jk.call(Ae,G)&&al(ie,G,Ae[G]);if(Tf)for(var G of Tf(Ae))qk.call(Ae,G)&&al(ie,G,Ae[G]);return ie},ge=(ie,Ae)=>Xk(ie,Zk(Ae));var u=(ie,Ae,G)=>(al(ie,typeof Ae!="symbol"?Ae+"":Ae,G),G);var W=(ie,Ae,G)=>new Promise((Ji,li)=>{var Is=xt=>{try{Nn(G.next(xt))}catch(Fn){li(Fn)}},Ps=xt=>{try{Nn(G.throw(xt))}catch(Fn){li(Fn)}},Nn=xt=>xt.done?Ji(xt.value):Promise.resolve(xt.value).then(Is,Ps);Nn((G=G.apply(ie,Ae)).next())});function jf(n){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const e in n)if(e!=="default"){const i=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(t,e,i.get?i:{enumerable:!0,get:()=>n[e]})}}return t.default=n,Object.freeze(t)}const k=jf(G);function zf(){console.debug("%c %c@realsee/dnalogel %cv3.20.4",["background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAMCAMAAACHgmeRAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAABLFBMVEUAAAAapPoap/oaqvkbrfkbr/gZnfwZoPsaqfnD4v/E4/8Ylv0clPm93/+/4P/B4f8Yj/683/8Wif+33P8Uhv+x2f8ShP+s1v8Pgf+n0/8Nf/+h0f8Lff8Lff8Nf/9dl/+czv8KfP8KfP+Lxf+Uyv+Xy/+Hwv+Jw/+Mxf+Oxv+RyP8aovsapfoap/oZmfwZm/wZnvsYnPsYkf4YlP0NePsDYfgYcfi43f+63v8Xiv8Xjf4EWfwCV/sWZ/qz2v+02/8Vh/8WiP8EUf8CTf4WXv2u1/+v2P8Thf8Thv8ETf8CR/8VV/+o1f+q1f8Qgv8Rg/8DSv8BRf8UVP+j0v+k0v8OgP8Pgf8DR/8DQv9Nhf+dzv+fz/+Kv/+Vyv+Xy/+azf+Oxv+Qx/+SyP////8MUhLdAAAAK3RSTlMACEWQ2bd98uQECPXxqO7c+Pb49vj2+Pb49vj23Oul8fMHA+TwerXXjEIG2P+bHgAAAAFiS0dEY1y+LaoAAAB+SURBVAjXY2BgZGJmYWVgYGBgY9fW0eVg4ORi4NbTNzDk4eXjZxAwMjYxNTO3EGQQsrSytrG1sxdmEHFwdHJ2cXUTZRBz9/D08vbxFWeQ8PMPCAwKDpFkkAoNC4+IjIqWZpCRlZOPiY2LV2BQVGJQTkhMUlEFWaOmrqGpxQAAyg0S9Dq+VPYAAAAASUVORK5CYII=')","background-repeat: no-repeat","background-position: 0 center","padding-left: 8px"].join(";"),"","background-color: #12ce9b;color:black;padding:0 6px;border-radius: 3px")}function Of(){const n=typeof OffscreenCanvas!="undefined",t=n&&new OffscreenCanvas(1,1).getContext("webgl")!==null;n&&!t&&Object.assign(window,{OffscreenCanvas:function(e,i){const s=document.createElement("canvas");return s.width=e,s.height=i,s}})}function ll(){}const cl=()=>Promise.resolve(),dl={__queue:Promise.resolve()};function Bf(n=cl){dl.__queue=dl.__queue.then(n).catch(cl)}function ks(n,t,e){const i=n.x,s=n.y,o=Math.floor(i/t*1e4)/1e4,r=Math.floor(s/e*1e4)/1e4;return{x:o,y:r}}function Fo(n,t,e){const{x:i,y:s}=n,o=i*t,r=s*e;return{x:o,y:r}}function Ms(n){if(n.length<2)return{};const t=n.slice(-2),e=t[0],i={x:(t[0].x+t[1].x)/2,y:(t[0].y+t[1].y)/2};return{control:e,end:i}}function Vf(n,t,e=ll){new Promise(i=>{setTimeout(()=>{e(),i(!0)},t*n)})}const Rf=window,hl=window.requestAnimationFrame||Rf.webkitRequestAnimationFrame||(n=>setTimeout(n,16));function Es(n,t=0){t<=0?hl(n):hl(()=>Es(n,t-1))}var St=Object.freeze({Linear:Object.freeze({None:function(n){return n},In:function(n){return this.None(n)},Out:function(n){return this.None(n)},InOut:function(n){return this.None(n)}}),Quadratic:Object.freeze({In:function(n){return n*n},Out:function(n){return n*(2-n)},InOut:function(n){return(n*=2)<1?.5*n*n:-.5*(--n*(n-2)-1)}}),Cubic:Object.freeze({In:function(n){return n*n*n},Out:function(n){return--n*n*n+1},InOut:function(n){return(n*=2)<1?.5*n*n*n:.5*((n-=2)*n*n+2)}}),Quartic:Object.freeze({In:function(n){return n*n*n*n},Out:function(n){return 1- --n*n*n*n},InOut:function(n){return(n*=2)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2)}}),Quintic:Object.freeze({In:function(n){return n*n*n*n*n},Out:function(n){return--n*n*n*n*n+1},InOut:function(n){return(n*=2)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2)}}),Sinusoidal:Object.freeze({In:function(n){return 1-Math.sin((1-n)*Math.PI/2)},Out:function(n){return Math.sin(n*Math.PI/2)},InOut:function(n){return .5*(1-Math.sin(Math.PI*(.5-n)))}}),Exponential:Object.freeze({In:function(n){return n===0?0:Math.pow(1024,n-1)},Out:function(n){return n===1?1:1-Math.pow(2,-10*n)},InOut:function(n){return n===0?0:n===1?1:(n*=2)<1?.5*Math.pow(1024,n-1):.5*(-Math.pow(2,-10*(n-1))+2)}}),Circular:Object.freeze({In:function(n){return 1-Math.sqrt(1-n*n)},Out:function(n){return Math.sqrt(1- --n*n)},InOut:function(n){return(n*=2)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1)}}),Elastic:Object.freeze({In:function(n){return n===0?0:n===1?1:-Math.pow(2,10*(n-1))*Math.sin((n-1.1)*5*Math.PI)},Out:function(n){return n===0?0:n===1?1:Math.pow(2,-10*n)*Math.sin((n-.1)*5*Math.PI)+1},InOut:function(n){return n===0?0:n===1?1:(n*=2,n<1?-.5*Math.pow(2,10*(n-1))*Math.sin((n-1.1)*5*Math.PI):.5*Math.pow(2,-10*(n-1))*Math.sin((n-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(n){var t=1.70158;return n===1?1:n*n*((t+1)*n-t)},Out:function(n){var t=1.70158;return n===0?0:--n*n*((t+1)*n+t)+1},InOut:function(n){var t=2.5949095;return(n*=2)<1?.5*(n*n*((t+1)*n-t)):.5*((n-=2)*n*((t+1)*n+t)+2)}}),Bounce:Object.freeze({In:function(n){return 1-St.Bounce.Out(1-n)},Out:function(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375},InOut:function(n){return n<.5?St.Bounce.In(n*2)*.5:St.Bounce.Out(n*2-1)*.5+.5}}),generatePow:function(n){return n===void 0&&(n=4),n=n<Number.EPSILON?Number.EPSILON:n,n=n>1e4?1e4:n,{In:function(t){return Math.pow(t,n)},Out:function(t){return 1-Math.pow(1-t,n)},InOut:function(t){return t<.5?Math.pow(t*2,n)/2:(1-Math.pow(2-t*2,n))/2+.5}}}}),qi=function(){return performance.now()},ul=function(){function n(){this._tweens={},this._tweensAddedDuringUpdate={}}return n.prototype.getAll=function(){var t=this;return Object.keys(this._tweens).map(function(e){return t._tweens[e]})},n.prototype.removeAll=function(){this._tweens={}},n.prototype.add=function(t){this._tweens[t.getId()]=t,this._tweensAddedDuringUpdate[t.getId()]=t},n.prototype.remove=function(t){delete this._tweens[t.getId()],delete this._tweensAddedDuringUpdate[t.getId()]},n.prototype.update=function(t,e){t===void 0&&(t=qi()),e===void 0&&(e=!1);var i=Object.keys(this._tweens);if(i.length===0)return!1;for(;i.length>0;){this._tweensAddedDuringUpdate={};for(var s=0;s<i.length;s++){var o=this._tweens[i[s]],r=!e;o&&o.update(t,r)===!1&&!e&&delete this._tweens[i[s]]}i=Object.keys(this._tweensAddedDuringUpdate)}return!0},n}(),ki={Linear:function(n,t){var e=n.length-1,i=e*t,s=Math.floor(i),o=ki.Utils.Linear;return t<0?o(n[0],n[1],i):t>1?o(n[e],n[e-1],e-i):o(n[s],n[s+1>e?e:s+1],i-s)},Bezier:function(n,t){for(var e=0,i=n.length-1,s=Math.pow,o=ki.Utils.Bernstein,r=0;r<=i;r++)e+=s(1-t,i-r)*s(t,r)*n[r]*o(i,r);return e},CatmullRom:function(n,t){var e=n.length-1,i=e*t,s=Math.floor(i),o=ki.Utils.CatmullRom;return n[0]===n[e]?(t<0&&(s=Math.floor(i=e*(1+t))),o(n[(s-1+e)%e],n[s],n[(s+1)%e],n[(s+2)%e],i-s)):t<0?n[0]-(o(n[0],n[0],n[1],n[1],-i)-n[0]):t>1?n[e]-(o(n[e],n[e],n[e-1],n[e-1],i-e)-n[e]):o(n[s?s-1:0],n[s],n[e<s+1?e:s+1],n[e<s+2?e:s+2],i-s)},Utils:{Linear:function(n,t,e){return(t-n)*e+n},Bernstein:function(n,t){var e=ki.Utils.Factorial;return e(n)/e(t)/e(n-t)},Factorial:function(){var n=[1];return function(t){var e=1;if(n[t])return n[t];for(var i=t;i>1;i--)e*=i;return n[t]=e,e}}(),CatmullRom:function(n,t,e,i,s){var o=(e-n)*.5,r=(i-t)*.5,a=s*s,l=s*a;return(2*t-2*e+o+r)*l+(-3*t+3*e-2*o-r)*a+o*s+t}}},_o=function(){function n(){}return n.nextId=function(){return n._nextId++},n._nextId=0,n}(),Ho=new ul,Ds=function(){function n(t,e){e===void 0&&(e=Ho),this._object=t,this._group=e,this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=St.Linear.None,this._interpolationFunction=ki.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=_o.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1}return n.prototype.getId=function(){return this._id},n.prototype.isPlaying=function(){return this._isPlaying},n.prototype.isPaused=function(){return this._isPaused},n.prototype.getDuration=function(){return this._duration},n.prototype.to=function(t,e){if(e===void 0&&(e=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=t,this._propertiesAreSetUp=!1,this._duration=e<0?0:e,this},n.prototype.duration=function(t){return t===void 0&&(t=1e3),this._duration=t<0?0:t,this},n.prototype.dynamic=function(t){return t===void 0&&(t=!1),this._isDynamic=t,this},n.prototype.start=function(t,e){if(t===void 0&&(t=qi()),e===void 0&&(e=!1),this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var i in this._valuesStartRepeat)this._swapEndStartRepeatValues(i),this._valuesStart[i]=this._valuesStartRepeat[i]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=t,this._startTime+=this._delayTime,!this._propertiesAreSetUp||e){if(this._propertiesAreSetUp=!0,!this._isDynamic){var s={};for(var o in this._valuesEnd)s[o]=this._valuesEnd[o];this._valuesEnd=s}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,e)}return this},n.prototype.startFromCurrentValues=function(t){return this.start(t,!0)},n.prototype._setupProperties=function(t,e,i,s,o){for(var r in i){var a=t[r],l=Array.isArray(a),c=l?"array":typeof a,d=!l&&Array.isArray(i[r]);if(!(c==="undefined"||c==="function")){if(d){var h=i[r];if(h.length===0)continue;for(var f=[a],m=0,A=h.length;m<A;m+=1){var p=this._handleRelativeValue(a,h[m]);if(isNaN(p)){d=!1,console.warn("Found invalid interpolation list. Skipping.");break}f.push(p)}d&&(i[r]=f)}if((c==="object"||l)&&a&&!d){e[r]=l?[]:{};var g=a;for(var v in g)e[r][v]=g[v];s[r]=l?[]:{};var h=i[r];if(!this._isDynamic){var y={};for(var v in h)y[v]=h[v];i[r]=h=y}this._setupProperties(g,e[r],h,s[r],o)}else(typeof e[r]=="undefined"||o)&&(e[r]=a),l||(e[r]*=1),d?s[r]=i[r].slice().reverse():s[r]=e[r]||0}}},n.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},n.prototype.end=function(){return this._goToEnd=!0,this.update(1/0),this},n.prototype.pause=function(t){return t===void 0&&(t=qi()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=t,this._group&&this._group.remove(this),this)},n.prototype.resume=function(t){return t===void 0&&(t=qi()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=t-this._pauseStart,this._pauseStart=0,this._group&&this._group.add(this),this)},n.prototype.stopChainedTweens=function(){for(var t=0,e=this._chainedTweens.length;t<e;t++)this._chainedTweens[t].stop();return this},n.prototype.group=function(t){return t===void 0&&(t=Ho),this._group=t,this},n.prototype.delay=function(t){return t===void 0&&(t=0),this._delayTime=t,this},n.prototype.repeat=function(t){return t===void 0&&(t=0),this._initialRepeat=t,this._repeat=t,this},n.prototype.repeatDelay=function(t){return this._repeatDelayTime=t,this},n.prototype.yoyo=function(t){return t===void 0&&(t=!1),this._yoyo=t,this},n.prototype.easing=function(t){return t===void 0&&(t=St.Linear.None),this._easingFunction=t,this},n.prototype.interpolation=function(t){return t===void 0&&(t=ki.Linear),this._interpolationFunction=t,this},n.prototype.chain=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this._chainedTweens=t,this},n.prototype.onStart=function(t){return this._onStartCallback=t,this},n.prototype.onEveryStart=function(t){return this._onEveryStartCallback=t,this},n.prototype.onUpdate=function(t){return this._onUpdateCallback=t,this},n.prototype.onRepeat=function(t){return this._onRepeatCallback=t,this},n.prototype.onComplete=function(t){return this._onCompleteCallback=t,this},n.prototype.onStop=function(t){return this._onStopCallback=t,this},n.prototype.update=function(t,e){var i=this,s;if(t===void 0&&(t=qi()),e===void 0&&(e=!0),this._isPaused)return!0;var o,r=this._startTime+this._duration;if(!this._goToEnd&&!this._isPlaying){if(t>r)return!1;e&&this.start(t,!0)}if(this._goToEnd=!1,t<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var a=t-this._startTime,l=this._duration+((s=this._repeatDelayTime)!==null&&s!==void 0?s:this._delayTime),c=this._duration+this._repeat*l,d=function(){if(i._duration===0||a>c)return 1;var g=Math.trunc(a/l),v=a-g*l,y=Math.min(v/i._duration,1);return y===0&&a===i._duration?1:y},h=d(),f=this._easingFunction(h);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,f),this._onUpdateCallback&&this._onUpdateCallback(this._object,h),this._duration===0||a>=this._duration)if(this._repeat>0){var m=Math.min(Math.trunc((a-this._duration)/l)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=m);for(o in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[o]=="string"&&(this._valuesStartRepeat[o]=this._valuesStartRepeat[o]+parseFloat(this._valuesEnd[o])),this._yoyo&&this._swapEndStartRepeatValues(o),this._valuesStart[o]=this._valuesStartRepeat[o];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=l*m,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var A=0,p=this._chainedTweens.length;A<p;A++)this._chainedTweens[A].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},n.prototype._updateProperties=function(t,e,i,s){for(var o in i)if(e[o]!==void 0){var r=e[o]||0,a=i[o],l=Array.isArray(t[o]),c=Array.isArray(a),d=!l&&c;d?t[o]=this._interpolationFunction(a,s):typeof a=="object"&&a?this._updateProperties(t[o],r,a,s):(a=this._handleRelativeValue(r,a),typeof a=="number"&&(t[o]=r+(a-r)*s))}},n.prototype._handleRelativeValue=function(t,e){return typeof e!="string"?e:e.charAt(0)==="+"||e.charAt(0)==="-"?t+parseFloat(e):parseFloat(e)},n.prototype._swapEndStartRepeatValues=function(t){var e=this._valuesStartRepeat[t],i=this._valuesEnd[t];typeof i=="string"?this._valuesStartRepeat[t]=this._valuesStartRepeat[t]+parseFloat(i):this._valuesStartRepeat[t]=this._valuesEnd[t],this._valuesEnd[t]=e},n}(),Qf="23.1.1",Gf=_o.nextId,Nt=Ho,Nf=Nt.getAll.bind(Nt),Ff=Nt.removeAll.bind(Nt),_f=Nt.add.bind(Nt),fl=Nt.remove.bind(Nt),Hf=Nt.update.bind(Nt),ml={Easing:St,Group:ul,Interpolation:ki,now:qi,Sequence:_o,nextId:Gf,Tween:Ds,VERSION:Qf,getAll:Nf,removeAll:Ff,add:_f,remove:fl,update:Hf};function Wf(n,t,e,i=St.Linear.None){const s=new Ds(n).to(t,e).easing(i).start();function o(r){s.update(r)&&requestAnimationFrame(o)}return requestAnimationFrame(o),s}var Kt=(n=>(n.Drawline="Drawline",n.Undo="Undo",n.Exit="Exit",n))(Kt||{});const _n=Symbol("$$PAINT_BRUSH_EVENT$$");function xs(n){return n[_n]||(n[_n]={}),n[_n]}function Uf(n){n[_n]||delete n[_n]}let Yf=class{hasListener(t){const e=xs(this);return e&&e[t]&&e[t].length>0}on(t,e,i){const s=xs(this);return s[t]||(s[t]=[]),s[t].push([e,i||!1]),()=>this.off(t,e)}once(t,e){return this.on(t,e,!0)}off(t,e){if(t===void 0){Uf(this);return}const i=xs(this);if(i[t]||(i[t]=[]),e===void 0){i[t].length=0;return}let s=0;for(;s<i[t].length&&i[t][s][0]!==e;s++);s<i[t].length&&i[t].splice(s,1)}emit(t,...e){let i=!1;const o=xs(this)[t]||[];for(let r of o.slice()){const[a,l=!1]=r,c=a(...e);l&&this.off(t,a),c===!1&&(i=!0)}return i}};function ci(){return((1+Math.random())*65536|0).toString(16).substring(1)}function nt(){return(ci()+ci()+"-"+ci()+"-4"+ci().substr(0,3)+"-"+ci()+"-"+ci()+ci()+ci()).toLowerCase()}const Xf=`
1
+ (function(ie,Ae){typeof exports=="object"&&typeof module!="undefined"?Ae(exports,require("@realsee/five"),require("three"),require("three/examples/jsm/renderers/CSS3DRenderer"),require("hammerjs"),require("@realsee/five/line"),require("three/examples/jsm/loaders/FBXLoader"),require("earcut"),require("animejs"),require("@realsee/five/gltf-loader")):typeof define=="function"&&define.amd?define(["exports","@realsee/five","three","three/examples/jsm/renderers/CSS3DRenderer","hammerjs","@realsee/five/line","three/examples/jsm/loaders/FBXLoader","earcut","animejs","@realsee/five/gltf-loader"],Ae):(ie=typeof globalThis!="undefined"?globalThis:ie||self,Ae(ie.dnalogel={},ie.FiveSDK,ie.THREE,ie.CSS3DRenderer,ie.Hammer,ie.Line,ie.FBXLoader,ie.earcut,ie.anime,ie.GLTFLoader))})(this,function(ie,Ae,G,Ji,li,Is,Ps,Nn,xt,Fn){"use strict";var Yk=Object.defineProperty,Xk=Object.defineProperties;var Zk=Object.getOwnPropertyDescriptors;var Tf=Object.getOwnPropertySymbols;var Jk=Object.prototype.hasOwnProperty,qk=Object.prototype.propertyIsEnumerable;var al=(ie,Ae,G)=>Ae in ie?Yk(ie,Ae,{enumerable:!0,configurable:!0,writable:!0,value:G}):ie[Ae]=G,V=(ie,Ae)=>{for(var G in Ae||(Ae={}))Jk.call(Ae,G)&&al(ie,G,Ae[G]);if(Tf)for(var G of Tf(Ae))qk.call(Ae,G)&&al(ie,G,Ae[G]);return ie},ge=(ie,Ae)=>Xk(ie,Zk(Ae));var u=(ie,Ae,G)=>(al(ie,typeof Ae!="symbol"?Ae+"":Ae,G),G);var W=(ie,Ae,G)=>new Promise((Ji,li)=>{var Is=xt=>{try{Nn(G.next(xt))}catch(Fn){li(Fn)}},Ps=xt=>{try{Nn(G.throw(xt))}catch(Fn){li(Fn)}},Nn=xt=>xt.done?Ji(xt.value):Promise.resolve(xt.value).then(Is,Ps);Nn((G=G.apply(ie,Ae)).next())});function jf(n){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const e in n)if(e!=="default"){const i=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(t,e,i.get?i:{enumerable:!0,get:()=>n[e]})}}return t.default=n,Object.freeze(t)}const k=jf(G);function zf(){console.debug("%c %c@realsee/dnalogel %cv3.20.6",["background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAMCAMAAACHgmeRAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAABLFBMVEUAAAAapPoap/oaqvkbrfkbr/gZnfwZoPsaqfnD4v/E4/8Ylv0clPm93/+/4P/B4f8Yj/683/8Wif+33P8Uhv+x2f8ShP+s1v8Pgf+n0/8Nf/+h0f8Lff8Lff8Nf/9dl/+czv8KfP8KfP+Lxf+Uyv+Xy/+Hwv+Jw/+Mxf+Oxv+RyP8aovsapfoap/oZmfwZm/wZnvsYnPsYkf4YlP0NePsDYfgYcfi43f+63v8Xiv8Xjf4EWfwCV/sWZ/qz2v+02/8Vh/8WiP8EUf8CTf4WXv2u1/+v2P8Thf8Thv8ETf8CR/8VV/+o1f+q1f8Qgv8Rg/8DSv8BRf8UVP+j0v+k0v8OgP8Pgf8DR/8DQv9Nhf+dzv+fz/+Kv/+Vyv+Xy/+azf+Oxv+Qx/+SyP////8MUhLdAAAAK3RSTlMACEWQ2bd98uQECPXxqO7c+Pb49vj2+Pb49vj23Oul8fMHA+TwerXXjEIG2P+bHgAAAAFiS0dEY1y+LaoAAAB+SURBVAjXY2BgZGJmYWVgYGBgY9fW0eVg4ORi4NbTNzDk4eXjZxAwMjYxNTO3EGQQsrSytrG1sxdmEHFwdHJ2cXUTZRBz9/D08vbxFWeQ8PMPCAwKDpFkkAoNC4+IjIqWZpCRlZOPiY2LV2BQVGJQTkhMUlEFWaOmrqGpxQAAyg0S9Dq+VPYAAAAASUVORK5CYII=')","background-repeat: no-repeat","background-position: 0 center","padding-left: 8px"].join(";"),"","background-color: #12ce9b;color:black;padding:0 6px;border-radius: 3px")}function Of(){const n=typeof OffscreenCanvas!="undefined",t=n&&new OffscreenCanvas(1,1).getContext("webgl")!==null;n&&!t&&Object.assign(window,{OffscreenCanvas:function(e,i){const s=document.createElement("canvas");return s.width=e,s.height=i,s}})}function ll(){}const cl=()=>Promise.resolve(),dl={__queue:Promise.resolve()};function Bf(n=cl){dl.__queue=dl.__queue.then(n).catch(cl)}function ks(n,t,e){const i=n.x,s=n.y,o=Math.floor(i/t*1e4)/1e4,r=Math.floor(s/e*1e4)/1e4;return{x:o,y:r}}function Fo(n,t,e){const{x:i,y:s}=n,o=i*t,r=s*e;return{x:o,y:r}}function Ms(n){if(n.length<2)return{};const t=n.slice(-2),e=t[0],i={x:(t[0].x+t[1].x)/2,y:(t[0].y+t[1].y)/2};return{control:e,end:i}}function Vf(n,t,e=ll){new Promise(i=>{setTimeout(()=>{e(),i(!0)},t*n)})}const Rf=window,hl=window.requestAnimationFrame||Rf.webkitRequestAnimationFrame||(n=>setTimeout(n,16));function Es(n,t=0){t<=0?hl(n):hl(()=>Es(n,t-1))}var St=Object.freeze({Linear:Object.freeze({None:function(n){return n},In:function(n){return this.None(n)},Out:function(n){return this.None(n)},InOut:function(n){return this.None(n)}}),Quadratic:Object.freeze({In:function(n){return n*n},Out:function(n){return n*(2-n)},InOut:function(n){return(n*=2)<1?.5*n*n:-.5*(--n*(n-2)-1)}}),Cubic:Object.freeze({In:function(n){return n*n*n},Out:function(n){return--n*n*n+1},InOut:function(n){return(n*=2)<1?.5*n*n*n:.5*((n-=2)*n*n+2)}}),Quartic:Object.freeze({In:function(n){return n*n*n*n},Out:function(n){return 1- --n*n*n*n},InOut:function(n){return(n*=2)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2)}}),Quintic:Object.freeze({In:function(n){return n*n*n*n*n},Out:function(n){return--n*n*n*n*n+1},InOut:function(n){return(n*=2)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2)}}),Sinusoidal:Object.freeze({In:function(n){return 1-Math.sin((1-n)*Math.PI/2)},Out:function(n){return Math.sin(n*Math.PI/2)},InOut:function(n){return .5*(1-Math.sin(Math.PI*(.5-n)))}}),Exponential:Object.freeze({In:function(n){return n===0?0:Math.pow(1024,n-1)},Out:function(n){return n===1?1:1-Math.pow(2,-10*n)},InOut:function(n){return n===0?0:n===1?1:(n*=2)<1?.5*Math.pow(1024,n-1):.5*(-Math.pow(2,-10*(n-1))+2)}}),Circular:Object.freeze({In:function(n){return 1-Math.sqrt(1-n*n)},Out:function(n){return Math.sqrt(1- --n*n)},InOut:function(n){return(n*=2)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1)}}),Elastic:Object.freeze({In:function(n){return n===0?0:n===1?1:-Math.pow(2,10*(n-1))*Math.sin((n-1.1)*5*Math.PI)},Out:function(n){return n===0?0:n===1?1:Math.pow(2,-10*n)*Math.sin((n-.1)*5*Math.PI)+1},InOut:function(n){return n===0?0:n===1?1:(n*=2,n<1?-.5*Math.pow(2,10*(n-1))*Math.sin((n-1.1)*5*Math.PI):.5*Math.pow(2,-10*(n-1))*Math.sin((n-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(n){var t=1.70158;return n===1?1:n*n*((t+1)*n-t)},Out:function(n){var t=1.70158;return n===0?0:--n*n*((t+1)*n+t)+1},InOut:function(n){var t=2.5949095;return(n*=2)<1?.5*(n*n*((t+1)*n-t)):.5*((n-=2)*n*((t+1)*n+t)+2)}}),Bounce:Object.freeze({In:function(n){return 1-St.Bounce.Out(1-n)},Out:function(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375},InOut:function(n){return n<.5?St.Bounce.In(n*2)*.5:St.Bounce.Out(n*2-1)*.5+.5}}),generatePow:function(n){return n===void 0&&(n=4),n=n<Number.EPSILON?Number.EPSILON:n,n=n>1e4?1e4:n,{In:function(t){return Math.pow(t,n)},Out:function(t){return 1-Math.pow(1-t,n)},InOut:function(t){return t<.5?Math.pow(t*2,n)/2:(1-Math.pow(2-t*2,n))/2+.5}}}}),qi=function(){return performance.now()},ul=function(){function n(){this._tweens={},this._tweensAddedDuringUpdate={}}return n.prototype.getAll=function(){var t=this;return Object.keys(this._tweens).map(function(e){return t._tweens[e]})},n.prototype.removeAll=function(){this._tweens={}},n.prototype.add=function(t){this._tweens[t.getId()]=t,this._tweensAddedDuringUpdate[t.getId()]=t},n.prototype.remove=function(t){delete this._tweens[t.getId()],delete this._tweensAddedDuringUpdate[t.getId()]},n.prototype.update=function(t,e){t===void 0&&(t=qi()),e===void 0&&(e=!1);var i=Object.keys(this._tweens);if(i.length===0)return!1;for(;i.length>0;){this._tweensAddedDuringUpdate={};for(var s=0;s<i.length;s++){var o=this._tweens[i[s]],r=!e;o&&o.update(t,r)===!1&&!e&&delete this._tweens[i[s]]}i=Object.keys(this._tweensAddedDuringUpdate)}return!0},n}(),ki={Linear:function(n,t){var e=n.length-1,i=e*t,s=Math.floor(i),o=ki.Utils.Linear;return t<0?o(n[0],n[1],i):t>1?o(n[e],n[e-1],e-i):o(n[s],n[s+1>e?e:s+1],i-s)},Bezier:function(n,t){for(var e=0,i=n.length-1,s=Math.pow,o=ki.Utils.Bernstein,r=0;r<=i;r++)e+=s(1-t,i-r)*s(t,r)*n[r]*o(i,r);return e},CatmullRom:function(n,t){var e=n.length-1,i=e*t,s=Math.floor(i),o=ki.Utils.CatmullRom;return n[0]===n[e]?(t<0&&(s=Math.floor(i=e*(1+t))),o(n[(s-1+e)%e],n[s],n[(s+1)%e],n[(s+2)%e],i-s)):t<0?n[0]-(o(n[0],n[0],n[1],n[1],-i)-n[0]):t>1?n[e]-(o(n[e],n[e],n[e-1],n[e-1],i-e)-n[e]):o(n[s?s-1:0],n[s],n[e<s+1?e:s+1],n[e<s+2?e:s+2],i-s)},Utils:{Linear:function(n,t,e){return(t-n)*e+n},Bernstein:function(n,t){var e=ki.Utils.Factorial;return e(n)/e(t)/e(n-t)},Factorial:function(){var n=[1];return function(t){var e=1;if(n[t])return n[t];for(var i=t;i>1;i--)e*=i;return n[t]=e,e}}(),CatmullRom:function(n,t,e,i,s){var o=(e-n)*.5,r=(i-t)*.5,a=s*s,l=s*a;return(2*t-2*e+o+r)*l+(-3*t+3*e-2*o-r)*a+o*s+t}}},_o=function(){function n(){}return n.nextId=function(){return n._nextId++},n._nextId=0,n}(),Ho=new ul,Ds=function(){function n(t,e){e===void 0&&(e=Ho),this._object=t,this._group=e,this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=St.Linear.None,this._interpolationFunction=ki.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=_o.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1}return n.prototype.getId=function(){return this._id},n.prototype.isPlaying=function(){return this._isPlaying},n.prototype.isPaused=function(){return this._isPaused},n.prototype.getDuration=function(){return this._duration},n.prototype.to=function(t,e){if(e===void 0&&(e=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=t,this._propertiesAreSetUp=!1,this._duration=e<0?0:e,this},n.prototype.duration=function(t){return t===void 0&&(t=1e3),this._duration=t<0?0:t,this},n.prototype.dynamic=function(t){return t===void 0&&(t=!1),this._isDynamic=t,this},n.prototype.start=function(t,e){if(t===void 0&&(t=qi()),e===void 0&&(e=!1),this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var i in this._valuesStartRepeat)this._swapEndStartRepeatValues(i),this._valuesStart[i]=this._valuesStartRepeat[i]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=t,this._startTime+=this._delayTime,!this._propertiesAreSetUp||e){if(this._propertiesAreSetUp=!0,!this._isDynamic){var s={};for(var o in this._valuesEnd)s[o]=this._valuesEnd[o];this._valuesEnd=s}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,e)}return this},n.prototype.startFromCurrentValues=function(t){return this.start(t,!0)},n.prototype._setupProperties=function(t,e,i,s,o){for(var r in i){var a=t[r],l=Array.isArray(a),c=l?"array":typeof a,d=!l&&Array.isArray(i[r]);if(!(c==="undefined"||c==="function")){if(d){var h=i[r];if(h.length===0)continue;for(var f=[a],m=0,A=h.length;m<A;m+=1){var p=this._handleRelativeValue(a,h[m]);if(isNaN(p)){d=!1,console.warn("Found invalid interpolation list. Skipping.");break}f.push(p)}d&&(i[r]=f)}if((c==="object"||l)&&a&&!d){e[r]=l?[]:{};var g=a;for(var v in g)e[r][v]=g[v];s[r]=l?[]:{};var h=i[r];if(!this._isDynamic){var y={};for(var v in h)y[v]=h[v];i[r]=h=y}this._setupProperties(g,e[r],h,s[r],o)}else(typeof e[r]=="undefined"||o)&&(e[r]=a),l||(e[r]*=1),d?s[r]=i[r].slice().reverse():s[r]=e[r]||0}}},n.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},n.prototype.end=function(){return this._goToEnd=!0,this.update(1/0),this},n.prototype.pause=function(t){return t===void 0&&(t=qi()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=t,this._group&&this._group.remove(this),this)},n.prototype.resume=function(t){return t===void 0&&(t=qi()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=t-this._pauseStart,this._pauseStart=0,this._group&&this._group.add(this),this)},n.prototype.stopChainedTweens=function(){for(var t=0,e=this._chainedTweens.length;t<e;t++)this._chainedTweens[t].stop();return this},n.prototype.group=function(t){return t===void 0&&(t=Ho),this._group=t,this},n.prototype.delay=function(t){return t===void 0&&(t=0),this._delayTime=t,this},n.prototype.repeat=function(t){return t===void 0&&(t=0),this._initialRepeat=t,this._repeat=t,this},n.prototype.repeatDelay=function(t){return this._repeatDelayTime=t,this},n.prototype.yoyo=function(t){return t===void 0&&(t=!1),this._yoyo=t,this},n.prototype.easing=function(t){return t===void 0&&(t=St.Linear.None),this._easingFunction=t,this},n.prototype.interpolation=function(t){return t===void 0&&(t=ki.Linear),this._interpolationFunction=t,this},n.prototype.chain=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this._chainedTweens=t,this},n.prototype.onStart=function(t){return this._onStartCallback=t,this},n.prototype.onEveryStart=function(t){return this._onEveryStartCallback=t,this},n.prototype.onUpdate=function(t){return this._onUpdateCallback=t,this},n.prototype.onRepeat=function(t){return this._onRepeatCallback=t,this},n.prototype.onComplete=function(t){return this._onCompleteCallback=t,this},n.prototype.onStop=function(t){return this._onStopCallback=t,this},n.prototype.update=function(t,e){var i=this,s;if(t===void 0&&(t=qi()),e===void 0&&(e=!0),this._isPaused)return!0;var o,r=this._startTime+this._duration;if(!this._goToEnd&&!this._isPlaying){if(t>r)return!1;e&&this.start(t,!0)}if(this._goToEnd=!1,t<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var a=t-this._startTime,l=this._duration+((s=this._repeatDelayTime)!==null&&s!==void 0?s:this._delayTime),c=this._duration+this._repeat*l,d=function(){if(i._duration===0||a>c)return 1;var g=Math.trunc(a/l),v=a-g*l,y=Math.min(v/i._duration,1);return y===0&&a===i._duration?1:y},h=d(),f=this._easingFunction(h);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,f),this._onUpdateCallback&&this._onUpdateCallback(this._object,h),this._duration===0||a>=this._duration)if(this._repeat>0){var m=Math.min(Math.trunc((a-this._duration)/l)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=m);for(o in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[o]=="string"&&(this._valuesStartRepeat[o]=this._valuesStartRepeat[o]+parseFloat(this._valuesEnd[o])),this._yoyo&&this._swapEndStartRepeatValues(o),this._valuesStart[o]=this._valuesStartRepeat[o];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=l*m,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var A=0,p=this._chainedTweens.length;A<p;A++)this._chainedTweens[A].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},n.prototype._updateProperties=function(t,e,i,s){for(var o in i)if(e[o]!==void 0){var r=e[o]||0,a=i[o],l=Array.isArray(t[o]),c=Array.isArray(a),d=!l&&c;d?t[o]=this._interpolationFunction(a,s):typeof a=="object"&&a?this._updateProperties(t[o],r,a,s):(a=this._handleRelativeValue(r,a),typeof a=="number"&&(t[o]=r+(a-r)*s))}},n.prototype._handleRelativeValue=function(t,e){return typeof e!="string"?e:e.charAt(0)==="+"||e.charAt(0)==="-"?t+parseFloat(e):parseFloat(e)},n.prototype._swapEndStartRepeatValues=function(t){var e=this._valuesStartRepeat[t],i=this._valuesEnd[t];typeof i=="string"?this._valuesStartRepeat[t]=this._valuesStartRepeat[t]+parseFloat(i):this._valuesStartRepeat[t]=this._valuesEnd[t],this._valuesEnd[t]=e},n}(),Qf="23.1.1",Gf=_o.nextId,Nt=Ho,Nf=Nt.getAll.bind(Nt),Ff=Nt.removeAll.bind(Nt),_f=Nt.add.bind(Nt),fl=Nt.remove.bind(Nt),Hf=Nt.update.bind(Nt),ml={Easing:St,Group:ul,Interpolation:ki,now:qi,Sequence:_o,nextId:Gf,Tween:Ds,VERSION:Qf,getAll:Nf,removeAll:Ff,add:_f,remove:fl,update:Hf};function Wf(n,t,e,i=St.Linear.None){const s=new Ds(n).to(t,e).easing(i).start();function o(r){s.update(r)&&requestAnimationFrame(o)}return requestAnimationFrame(o),s}var Kt=(n=>(n.Drawline="Drawline",n.Undo="Undo",n.Exit="Exit",n))(Kt||{});const _n=Symbol("$$PAINT_BRUSH_EVENT$$");function xs(n){return n[_n]||(n[_n]={}),n[_n]}function Uf(n){n[_n]||delete n[_n]}let Yf=class{hasListener(t){const e=xs(this);return e&&e[t]&&e[t].length>0}on(t,e,i){const s=xs(this);return s[t]||(s[t]=[]),s[t].push([e,i||!1]),()=>this.off(t,e)}once(t,e){return this.on(t,e,!0)}off(t,e){if(t===void 0){Uf(this);return}const i=xs(this);if(i[t]||(i[t]=[]),e===void 0){i[t].length=0;return}let s=0;for(;s<i[t].length&&i[t][s][0]!==e;s++);s<i[t].length&&i[t].splice(s,1)}emit(t,...e){let i=!1;const o=xs(this)[t]||[];for(let r of o.slice()){const[a,l=!1]=r,c=a(...e);l&&this.off(t,a),c===!1&&(i=!0)}return i}};function ci(){return((1+Math.random())*65536|0).toString(16).substring(1)}function et(){return(ci()+ci()+"-"+ci()+"-4"+ci().substr(0,3)+"-"+ci()+"-"+ci()+ci()+ci()).toLowerCase()}const Xf=`
2
2
  <style type="text/css">
3
3
 
4
4
  #_gl_paintBrush {
@@ -98,7 +98,7 @@ transition: all 500ms;
98
98
  }
99
99
 
100
100
  </style>
101
- `;let Zf=class extends Yf{constructor(e){super();u(this,"configs");u(this,"clientWidth");u(this,"clientHeight");u(this,"ready",!1);u(this,"uuid",nt());u(this,"tween");u(this,"tweening",!1);u(this,"container");u(this,"canvas");u(this,"data",{});u(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=Xf,this.container}initCanvas(e){const i=document.createElement("canvas");i.className=e,i.width=this.clientWidth,i.height=this.clientHeight;const s=i.getContext("2d");if(s)return s.lineWidth=5*this.dpr,s.lineCap="round",s.lineJoin="round",this.container.appendChild(i),i}initCtrl(){const e=document.createElement("div");e.className="_paintBrush-ctrl";const i=document.createElement("div");i.className="_paintBrush-ctrlinner";const s=document.createElement("a");s.className="_paintBrush-ctrlitem _paintBrush-ctrlitem--undo",s.addEventListener("click",a=>{var f;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:Kt.Undo,color:this.color,ready:this.ready,state:l,uuid:this.uuid});const c=(f=this.canvas[this.uuid])==null?void 0:f.getContext("2d");if(!this.canvas[this.uuid])return;const{width:d,height:h}=this.canvas[this.uuid];c&&c.clearRect(0,0,d,h),this.data[this.uuid].forEach(m=>this.handleDrawLine(this.uuid,m,{withUndo:!0}))});const o=document.createElement("a");return o.className="_paintBrush-ctrlitem _paintBrush-ctrlitem--close",o.addEventListener("click",a=>{a.stopPropagation(),this.closeBrush(),this.configs.onClickClose&&this.configs.onClickClose()}),[s,o].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)}),i.appendChild(s),i.appendChild(o),e.appendChild(i),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 i=this.canvas[e].getContext("2d");i&&i.clearRect(0,0,this.canvas[e].width,this.canvas[e].height)}),this.ready=!1,this.emit("readyChange",!1),this.emitStateChange({type:Kt.Exit,color:this.color,ready:!1,uuid:this.uuid}))}updateCurrentColor(e){const i=this.canvas[this.uuid];if(!i)return;const s=i.getContext("2d");s&&(this.configs.currentColor=e,s.strokeStyle=e)}openBrushHandle(){const e=this.canvas[this.uuid];if(!e)return;const i=e.getContext("2d");if(!i)return;const s=this.color||"#6D92FF";i.strokeStyle=s;let o=null,r=[],a,l=[],c=0;const d=(h,f,m)=>{const A=this.color||"#ff0000";i.strokeStyle=A,i.beginPath(),i.moveTo(h.x,h.y),i.quadraticCurveTo(f.x,f.y,m.x,m.y),i.stroke()};e.onmousedown=h=>{h.preventDefault(),c=Date.now();const f=h.clientX,m=h.clientY;r=[],r.push({x:f,y:m}),o={x:f,y:m},a=ks({x:f,y:m},this.clientWidth,this.clientHeight),l=[]},e.onmousemove=h=>{if(h.preventDefault(),!o)return;const f=Number(h.clientX),m=Number(h.clientY);if(Math.abs(f-o.x)<5&&Math.abs(m-o.y)<5||(r.push({x:f,y:m}),l.push(ks({x:f,y:m},this.clientWidth,this.clientHeight)),r.length<3))return;const{control:A,end:p}=Ms(r);!A||!p||(d(o,A,p),o=p)},e.onmouseup=h=>{if(h.preventDefault(),o=null,r.length<3)return;this.data[this.uuid]||(this.data[this.uuid]=[]);const f=Date.now()-c,m={move:Object.assign({},a),uuid:this.uuid,line:[...l],color:this.color,duration:f<1280?f:f<2e3?1280:0};this.data[this.uuid].push(m),Es(()=>{this.emitStateChange({type:Kt.Drawline,color:this.color,ready:this.ready,state:m,uuid:this.uuid})})},e.ontouchstart=h=>{h.preventDefault(),c=Date.now();const f=h.touches[0].clientX,m=h.touches[0].clientY;r=[],r.push({x:f,y:m}),o={x:f,y:m},a=ks({x:f,y:m},this.clientWidth,this.clientHeight),l=[]},e.ontouchmove=h=>{if(h.preventDefault(),!o)return;const f=Number(h.touches[0].clientX),m=Number(h.touches[0].clientY);if(Math.abs(f-o.x)<5&&Math.abs(m-o.y)<5||(r.push({x:f,y:m}),l.push(ks({x:f,y:m},this.clientWidth,this.clientHeight)),r.length<3))return;const{control:A,end:p}=Ms(r);!A||!p||(d(o,A,p),o=p)},e.ontouchend=e.ontouchcancel=h=>{if(h.preventDefault(),o=null,r.length<3)return;this.data[this.uuid]||(this.data[this.uuid]=[]);const f=Date.now()-c,m={move:Object.assign({},a),line:[...l],uuid:this.uuid,color:this.color,duration:f<1280?f:f<2e3?1280:0};this.data[this.uuid].push(m),Es(()=>{this.emitStateChange({type:Kt.Drawline,color:this.color,ready:this.ready,state:m,uuid:this.uuid})})}}emitStateChange(e,i=!0){if(e.type!==Kt.Drawline){this.emit("stateChange",e,i);return}const s=Date.now(),o=e.state;if(!o||!o.line)return;const r=Math.ceil(o.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:o.move,duration:o.duration,color:this.color,line:o.line.slice(a*100,(a+1)*100)},timestamp:s,end:a===r-1};Vf(a,20,()=>{this.emit("stateChange",l,i)})}}action(e){const{ready:i,type:s,uuid:o}=e;if(!i&&this.ready){this.closeBrush();return}if(i&&!this.ready){this.openBrush();return}if(this.ready)switch(s){case Kt.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(o,r,{},()=>delete this.tempLine[a]));break;case Kt.Undo:this.handleUndo(o);break}}handleDrawLine(e,i,{withUndo:s=!1},o=ll){!i||Object.prototype.toString.call(i)!="[object Object]"||Object.keys(i).length===0||Bf(()=>new Promise(r=>{if(s||(this.canvas[e]||(this.canvas[e]=this.initCanvas("_paintBrush-canvas--sync")),this.data[e]||(this.data[e]=[]),this.data[e].push(i)),!this.canvas[e])return;const a=this.canvas[e].getContext("2d");if(!a)return;const{line:l=[],color:c="black",duration:d=0,uuid:h}=i,f=Fo(i.move||{},this.clientWidth,this.clientHeight);let m=[f];if(a.strokeStyle=c,a.beginPath(),a.moveTo(f.x,f.y),d&&!s){let A=[];const p=this;p.tween=Wf({step:0},{step:l.length-1},d).onUpdate(({step:g})=>{var y;if(p.tweening=!0,!p.ready)return a.clearRect(0,0,p.canvas[h].width,p.canvas[h].height),(y=p.tween)==null?void 0:y.stop();const v=Math.floor(g);if(!A.find(P=>P===v)){if(A.push(v),m.push(Fo(l[v],p.clientWidth,p.clientHeight)),m.length<3)return;const{control:P,end:I}=Ms(m);if(!P||!I)return;a.quadraticCurveTo(P.x,P.y,I.x,I.y),a.stroke()}}).onComplete(g=>{p.tween=void 0,p.tweening=!1,A=[],m=[],o&&o(),r()})}else{for(let A=0;A<l.length;A++){if(m.push(Fo(l[A],this.clientWidth,this.clientHeight)),m.length<3)continue;const{control:p,end:g}=Ms(m);!p||!g||a.quadraticCurveTo(p.x,p.y,g.x,g.y)}a.stroke(),m=[],o&&o(),r()}}))}handleUndo(e){if(!this.canvas[e]||!this.data[e]||this.data[e].length===0)return;this.data[e].pop();const i=()=>{var o;const s=(o=this.canvas[e])==null?void 0:o.getContext("2d");s&&s.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(),Es(i,60);return}i()}destroyBrush(){this.closeBrush(),this.ready=!1,this.emit("readyChange",!0)}};class Jf{constructor(t={}){u(this,"controller");const e=Object.assign({currentColor:"#f44336",onUndoText:"回退",onExitText:"关闭"},t);this.controller=new Zf(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 qf=(n,t)=>{var F,Q;let e=(Q=(F=t==null?void 0:t.initialState)==null?void 0:F.enabled)!=null?Q:!0,i=!1,s=!0,o=null;const a=V(V({},{lookAtCurrentCamera:!1,lockedPanoIndex:null,lockedLatitude:null,lockedLongitude:null}),t==null?void 0:t.config),l=new k.Scene,c=new Ae.Camera(60);let d=new k.Object3D,h,f;{const _=new k.DirectionalLight(16777215,.5);_.position.copy(new k.Vector3(1,1,1)),l.add(_)}{const _=new k.DirectionalLight(16777215,.3);l.add(_)}{const _=new k.AmbientLight(16777215,.3);l.add(_)}l.add(d);const m=()=>{if(i)return;h=E(n.model,c.fov,c.aspect),f=n.model.bounding.getCenter(new k.Vector3),l.remove(d),d=Y(n.model),l.add(d),i=!0,z();function _(Z){const q=Z.clone();return q.uniforms.modelAlpha.value=1,q.uniforms.map.value&&(q.uniforms.map.value.needsUpdate=!0),q}function Y(Z){if(Z instanceof k.Mesh){const q=Z.geometry,ee=Array.isArray(Z.material)?Z.material.map(_):_(Z.material);return new k.Mesh(q,ee)}else if(Z instanceof k.Group){const q=new k.Group;return Z.children.forEach(ee=>q.add(Y(ee))),q}else{const q=new k.Object3D;return Z.children.forEach(ee=>q.add(Y(ee))),q}}},A=()=>{if(n.renderer)return o||(o=new k.WebGLRenderer({antialias:!1,alpha:!0}),o.setPixelRatio(n.renderer.getPixelRatio()),o.outputEncoding=k.sRGBEncoding,o.setClearColor(1579548,0),o.autoClear=!0),o},p=()=>{d.traverse(_=>{_ instanceof k.Mesh&&[].concat(_.material).forEach(Z=>Z.dispose())}),l.remove(d),d=new k.Object3D,l.add(d),i=!1,z()},g=()=>{e&&(i||m())},v=()=>{e||(e=!0,l.add(d),!i&&n.model.loaded&&m(),z())},y=()=>{e&&(l.remove(d),s=!0,R(),e=!1)},P=(_,Y={})=>{const Z=A();if(!Z)return;_.appendChild(Z.domElement),I(Y);const q=window.getComputedStyle(_).position;q!=="relative"&&q!=="absolute"&&q!=="fixed"&&q!=="sticky"&&(_.style.position="relative")},I=(_={})=>{if(!o)return;const Z=o.domElement.parentNode;if(Z!=null&&Z.nodeName){const{width:q=Z.offsetWidth,height:ee=Z.offsetHeight}=_;o.setSize(q,ee),c.aspect=q/ee,c.updateProjectionMatrix()}z()};function E(_,Y,Z){const q=_.bounding,ee=Math.pow(Math.pow(q.max.x-q.min.x+1,2)+Math.pow(q.max.y-q.min.y+1,2)+Math.pow(q.max.z-q.min.z+1,2),1/2);let fe=ee/2/Math.tan(Math.PI*Y/360);return Z<1&&(fe=fe/Z),isNaN(fe)?ee:fe}function C(_){return n.work.observers[_].standingPosition.clone()}const z=()=>{if(!e||!h||!f)return;const _=n.getPose();_.fov=c.fov,_.offset=f,_.distance=h,typeof a.lockedLatitude=="number"&&(_.latitude=a.lockedLatitude),typeof a.lockedLongitude=="number"&&(_.longitude=a.lockedLongitude),typeof a.lockedPanoIndex=="number"&&(_.offset=C(a.lockedPanoIndex)),a.lookAtCurrentCamera&&(_.offset=n.camera.position.clone().setY(n.camera.position.y+1)),c.setFromPose(_),s=!0},R=()=>{!e||s!==!0||!o||!o.domElement.parentNode||o.domElement.parentNode.offsetWidth===0||(o.render(l,c),s=!1)},U=()=>{o&&o.dispose(),o=null},H=_=>{Object.assign(a,_),z()},N=()=>({enabled:e});return Object.assign(window,{camera:c}),n.on("modelLoaded",g),n.on("modelWillLoad",p),n.on("cameraDirectionUpdate",z),n.on("dispose",U),n.on("renderFrame",R),n.on("cameraPositionUpdate",z),{appendTo:P,refresh:I,changeConfigs:H,enable:v,disable:y,getCurrentState:N}},Kf=({x:n,y:t,z:e})=>new G.Vector3(n,t,e),$t=n=>new G.Vector3().fromArray(n),kt=n=>n instanceof G.Vector3?n:Array.isArray(n)?$t(n):Kf(n);function $f(n){if(n)return Array.isArray(n)?typeof n[0]=="number"?kt(n):n.map(kt):kt(n)}function gl(n){return arguments.length===0?[]:Array.isArray(n)?n:[n]}function Mi(n){const t=[];return gl(n).forEach(i=>{i.traverse(s=>{s.isCSS3DObjectPlus&&t.push(s)})}),t}function Ss(n,t){const e=Math.round(n);return e%2===0?e:e+(t!=null&&t.floor?-1:1)}function em(n,t,e=!0){if(!n)return console.error("createResizeObserver: element is undefined"),{observe:()=>{},unobserve:()=>{}};const i=()=>{const o=Ss(n.clientWidth,{floor:!0}),r=Ss(n.clientHeight,{floor:!0});t(o,r)};if(typeof ResizeObserver=="undefined"||!ResizeObserver)return console.warn("createResizeObserver: ResizeObserver is undefined"),{observe:()=>i(),unobserve:()=>{}};const s=new ResizeObserver(i);return e&&i(),{observe:()=>s.observe(n),unobserve:()=>s.unobserve(n)}}class pl extends Ji.CSS3DRenderer{constructor(){super();u(this,"wrapper");u(this,"requestAnimationFrameId");u(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 i=this.wrapper;return i&&i.contains(this.domElement)&&this.domElement.remove(),this.appendToElement(e),this.wrapper=e,this}appendToElement(e){e.appendChild(this.domElement);const i=(r,a)=>this.setSize(r,a),{observe:s,unobserve:o}=em(e,i,!0);s(),this.resizeDisoper=o,this.wrapper=e}renderEveryFrame(e,i){if(this.wrapper||console.warn("wrapper is not find, creating a html element and call setWrapper(wrapper)",this,e),this.requestAnimationFrameId)return;const s=()=>{this.requestAnimationFrameId=requestAnimationFrame(s),e.visible&&Mi(e).length!==0&&this.render(e,i)};s()}stopRender(){this.requestAnimationFrameId&&cancelAnimationFrame(this.requestAnimationFrameId)}dispose(){var e;this.stopRender(),(e=this.resizeDisoper)==null||e.call(this),this.domElement.remove()}}function tm(n){return typeof Symbol=="undefined"?`$Symbol<${n}>$`:Symbol(n)}const Hn=tm("$$EVENT$$");function Ls(n){return n[Hn]||(n[Hn]={}),n[Hn]}function im(n){n[Hn]||delete n[Hn]}class Ei{hasListener(t){const e=Ls(this);return!!(e!=null&&e[t]&&e[t].length>0)}on(t,e,i){const s=Ls(this);return s[t]||(s[t]=[]),s[t].push([e,i||!1]),()=>this.off(t,e)}once(t,e){return this.on(t,e,!0)}off(t,e){if(t===void 0){im(this);return}const i=Ls(this);if(i[t]||(i[t]=[]),e===void 0){i[t].length=0;return}let s=0;for(;s<i[t].length&&i[t][s][0]!==e;s++);s<i[t].length&&i[t].splice(s,1)}emit(t,...e){let i=!1;const o=Ls(this)[t]||[];for(let r of o.slice()){const[a,l=!1]=r,c=a(...e);l&&this.off(t,a),c===!1&&(i=!0)}return i}}class nm extends k.Mesh{constructor(e,i){const s=new k.MeshBasicMaterial({opacity:0,color:0,transparent:!1,side:k.DoubleSide}),o=new k.PlaneGeometry(e,i);super(o,s);u(this,"name","opacity-mesh")}removeFromParent(){const e=this.parent;return e!==null&&e.remove(this),this}}function di(...n){const t=new G.Vector3;return n.forEach(e=>t.add(e)),t.divideScalar(n.length),t}const Wo=n=>n?n.visible===!1?!1:Wo(n.parent):!0,Al=1,sm=`CSS3DObjectPlus@${Al}`,om=.00216,rm=.003;class am extends Ji.CSS3DObject{constructor(e){var E,C,z;const i=e.container,s=e.cornerPoints,o=(E=e.ratio)!=null?E:rm,r=(C=e.dpr)!=null?C:1,a=(z=e.pointerEvents)!=null?z:"auto",l=Math.max(om,o),c=s[0].distanceTo(s[1]),d=s[1].distanceTo(s[2]),h=Ss(c/o*r),f=Ss(d/o*r),m=di(...s);let A;if(l===o)i.style.width=`${h}px`,i.style.height=`${f}px`,A=i;else{const R=document.createElement("div");R.style.width=`${h}px`,R.style.height=`${f}px`,R.style.pointerEvents="none";const U=o/l;i.style.position="absolute",i.style.left="0",i.style.top="0",i.style.width=`${U*h}px`,i.style.height=`${U*f}px`,R.appendChild(i),A=R}super(A);u(this,"version",Al);u(this,"isCSS3DObjectPlus",!0);u(this,"container");u(this,"width");u(this,"height");u(this,"domWidthPx");u(this,"domHeightPx");u(this,"cornerPoints");u(this,"centerPosition");u(this,"ratio");u(this,"mode","front");u(this,"hooks",new Ei);u(this,"opacityMesh");u(this,"selfVisible",!0);u(this,"setVisible",e=>{this.selfVisible=e,this.visible=Wo(this.parent)&&this.selfVisible,this.opacityMesh&&(this.opacityMesh.visible=this.visible)});u(this,"updateVisible",()=>{this.setVisible(this.selfVisible)});u(this,"createOpacityMesh",e=>{const{domWidthPx:i,domHeightPx:s}=e,o=new nm(i,s);return o.position.copy(e.position),o.rotation.copy(e.rotation),o.scale.copy(e.scale),o});if(i.style.pointerEvents=a,Object.assign(i.style,e.style),this.scale.set(l,l,l),this.cornerPoints=s,this.ratio=o,this.container=i,e.mode&&(this.mode=e.mode),l===o)this.width=c,this.height=d,this.domWidthPx=h,this.domHeightPx=f,this.centerPosition=m;else{const R=o/l;this.width=R*c,this.height=R*d,this.domWidthPx=R*h,this.domHeightPx=R*f,this.centerPosition=new G.Vector3().subVectors(m,s[0]).multiplyScalar(R).add(s[0])}i.classList.add(`${sm}__container`);const p=new G.Vector3().subVectors(s[1],s[0]),g=new G.Vector3().subVectors(s[3],s[0]),v=new G.Vector3().crossVectors(p,g).normalize();this.lookAt(v);const y=this.up.clone().applyQuaternion(this.quaternion),P=g.clone(),I=new G.Vector3().crossVectors(y,P).normalize();this.rotateOnWorldAxis(I,y.angleTo(P)),this.position.copy(m),this.addEventListener("added",()=>{var R;this.mode==="front"&&((R=this.opacityMesh)==null||R.removeFromParent())}),this.addEventListener("removed",()=>{var R;(R=this.opacityMesh)==null||R.removeFromParent()})}removeFromParent(){var i;const e=this.parent;return e!==null&&e.remove(this),(i=this.opacityMesh)==null||i.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 i;super.applyMatrix4(e),(i=this.opacityMesh)==null||i.applyMatrix4(e)}applyQuaternion(e){var i;return super.applyQuaternion(e),(i=this.opacityMesh)==null||i.applyQuaternion(e),this}applyScaleMatrix4(e){var i;this.scale.applyMatrix4(e),(i=this.opacityMesh)==null||i.scale.applyMatrix4(e)}}class lm extends k.Scene{constructor(){super()}add(...t){return super.add(...t),Mi(t).forEach(e=>{e.mode="front"}),this}}class cm extends k.Scene{constructor(e){super();u(this,"scene");if(!e)throw new Error("CSS3DBehindScene: scene is required");this.scene=e}add(...e){return super.add(...e),Mi(e).forEach(i=>{i.mode="behind",this.scene.add(i.getOpacityMesh())}),this}remove(...e){return Mi(e).forEach(i=>{var s;(s=i.opacityMesh)==null||s.removeFromParent(),i.opacityMesh=null}),super.remove(...e),this}}class vl extends k.Group{constructor(e){super();u(this,"isCSS3DGroup",!0);u(this,"mode");u(this,"CSS3DObjectLength",0);this.mode=e}add(...e){return Mi(e).forEach(i=>{i.mode=this.mode}),super.add(...e),this.updateLength(),this}setVisible(e){this.visible=e,this.traverse(i=>{i.isCSS3DObjectPlus&&i.updateVisible()})}remove(...e){return super.remove(...e),this.updateLength(),this}updateLength(){this.CSS3DObjectLength=Mi(this).length}}class dm extends vl{constructor(){super("front")}}class hm extends vl{constructor(e){super("behind");u(this,"scene");if(!e)throw new Error("CSS3DBehindScene: scene is required");this.scene=e}add(...e){return Mi(e).forEach(i=>{this.scene.add(i.getOpacityMesh())}),super.add(...e),this}}const um=3,Uo="CSS3DRenderer",Wn=`${Uo}@${um}`,Ki=()=>{console.error(`${Wn} is disposed`)},Ye={css3DObjects:[],frontModeStore:{css3DRenderer:new pl},behindModeStore:{css3DRenderer:new pl}};function bl(n){return Ye.css3DObjects.find(t=>t.id===n)}function fm(n){Ye.frontModeStore.css3DRenderer.setWrapper(n)}function mm(n){Ye.behindModeStore.css3DRenderer.setWrapper(n)}class $i{constructor(t){u(this,"hooks",new Ei);u(this,"state",{enabled:!0,visible:!0,disposed:!1});u(this,"_scene");u(this,"store",{frontModeGroup:new dm});u(this,"create3DElement",(t,e,i)=>{if(this.state.disposed)return Ki();const s=(()=>{const E={ratio:.00216,devicePixelRatio:1,mode:"front",autoRender:!0,container:document.createElement("div"),pointerEvents:"none",wrapperStyle:{}};return Object.assign(E,i)})(),o=e.map(kt);if((o==null?void 0:o.length)<4)return console.error(`${Wn}: requires 4 point but params may have fewer`);const{ratio:r,devicePixelRatio:a,mode:l,autoRender:c,container:d,pointerEvents:h,wrapperStyle:f}=s;let m=!1;const A=this.createObject(o,{ratio:r,dpr:a,container:d,mode:l,pointerEvents:h,wrapperStyle:f});Ye.css3DObjects.push(A),s.scene&&this.setScene(s.scene);const p=()=>{if(m)return;const E=A.mode==="front"?this.getFrontCSS3DObjectGroup():this.getBehindCSS3DObjectGroup();E&&E.add(A)},g=()=>{m||(p(),this.render(t),this.hooks.emit("render"))},v=E=>this.setVisibleById(A.id,E),y=E=>this.setEnabledById(A.id,E),P=()=>(m=!0,A.removeFromParent(),!0),I=l==="front"?Ye.frontModeStore.css3DRenderer:Ye.behindModeStore.css3DRenderer;return c&&g(),{id:A.uuid,container:d,css3DObject:A,render:c?void 0:g,show:()=>v(!0),hide:()=>v(!1),setVisible:v,enable:()=>y(!0),disable:()=>y(!1),setEnabled:y,dispose:P,appendToElement:E=>I.setWrapper(E)}});u(this,"setVisibleById",(t,e)=>{var i;(i=bl(t))==null||i.setVisible(e)});u(this,"setEnabledById",(t,e)=>{const i=bl(t);if(!i)return;const s=i.mode==="front"?this.getFrontCSS3DObjectGroup({addGroupIfNotExists:!1}):this.getBehindCSS3DObjectGroup({addGroupIfNotExists:!1});s&&(e?s.add(i):s.remove(i))});u(this,"createObject",(t,e)=>{const i=new am(ge(V({cornerPoints:t},e),{style:e.wrapperStyle}));return i.element.classList.add(`${Uo}__container`),i.element.id=`${Uo}__container--${i.uuid}`,i});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 Ye.frontModeStore.css3DRenderer}static get behindModeCSS3DRenderer(){return Ye.behindModeStore.css3DRenderer}get frontModeCSS3DRenderer(){return Ye.frontModeStore.css3DRenderer}get behindModeCSS3DRenderer(){return Ye.behindModeStore.css3DRenderer}setScene(t){this._scene=t}getCurrentState(){return this.state}setState(t,e={userAction:!0}){if(this.state.disposed)return Ki();const i=V({},this.state);this.state=Object.assign(this.state,t),i.visible!==this.state.visible&&(t.visible?this.handleShow():this.handleHide()),i.enabled!==this.state.enabled&&(t.enabled?this.handleEnable():this.handleDisable()),i.disposed!==this.state.disposed&&this.handleDispose(),this.hooks.emit("stateChange",{state:this.state,prevState:i,userAction:e.userAction})}dispose(){this.setState({disposed:!0}),this.hooks.emit("dispose")}show(){return W(this,arguments,function*({userAction:t}={userAction:!0}){if(this.state.disposed)return Ki();this.setState({visible:!0},{userAction:t}),this.hooks.emit("show",{userAction:t})})}hide(){return W(this,arguments,function*({userAction:t}={userAction:!0}){if(this.state.disposed)return Ki();this.setState({visible:!1},{userAction:t}),this.hooks.emit("hide",{userAction:t})})}enable({userAction:t}={userAction:!0}){if(this.state.disposed)return Ki();this.setState({enabled:!0},{userAction:t}),this.hooks.emit("enable",{userAction:t})}disable({userAction:t}={userAction:!0}){if(this.state.disposed)return Ki();this.setState({enabled:!1},{userAction:t}),this.hooks.emit("disable",{userAction:t})}getFrontCSS3DScene({createSceneIfNotExists:t=!1}={}){var i;const e=(i=Ye.frontModeStore)==null?void 0:i.css3DScene;if(e)return e;if(t){const s=new lm;Ye.frontModeStore.css3DScene=s}return Ye.frontModeStore.css3DScene}getBehindCSS3DScene({createSceneIfNotExists:t=!1}={}){var i,s;const e=(i=Ye.behindModeStore)==null?void 0:i.css3DScene;if(e)return e;if(t){const o=(s=Ye.behindModeStore.scene)!=null?s:this.scene;if(!o){console.error(`${Wn}: scene is required when mode is behind`);return}const r=new cm(o);Ye.behindModeStore.css3DScene=r,Ye.behindModeStore.scene=o}return Ye.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 i;const e=this.getBehindCSS3DScene({createSceneIfNotExists:t});if(t&&e&&this.scene){const s=(i=this.store.behindModeGroup)!=null?i:new hm(this.scene);this.store.behindModeGroup=s,e.getObjectById(s.id)||e.add(s)}return this.store.behindModeGroup}render(t){var e,i;if(this.getFrontCSS3DObjectGroup({addGroupIfNotExists:!1}).CSS3DObjectLength>0){const s=this.getFrontCSS3DScene({createSceneIfNotExists:!0});if(!s)return console.error(`${Wn}: css3DScene is required when mode is front`);Ye.frontModeStore.css3DRenderer.renderEveryFrame(s,t)}if(((i=(e=this.getBehindCSS3DObjectGroup({addGroupIfNotExists:!1}))==null?void 0:e.CSS3DObjectLength)!=null?i:0)>0){const s=this.getBehindCSS3DScene({createSceneIfNotExists:!0});if(!s)return console.error(`${Wn}: css3DScene is required when mode is behind`);Ye.behindModeStore.css3DRenderer.renderEveryFrame(s,t)}}handleShow(){return W(this,null,function*(){var t;this.store.frontModeGroup.setVisible(!0),(t=this.store.behindModeGroup)==null||t.setVisible(!0)})}handleHide(){return W(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,i;this.store.frontModeGroup.children.forEach(s=>{s instanceof Ji.CSS3DObject&&s.element instanceof Element&&s.element.parentNode!==null&&s.element.remove()}),(t=this.store.behindModeGroup)==null||t.children.forEach(s=>{s instanceof Ji.CSS3DObject&&s.element instanceof Element&&s.element.parentNode!==null&&s.element.remove()}),(e=this.getFrontCSS3DScene())==null||e.remove(this.store.frontModeGroup),this.store.behindModeGroup&&((i=this.getBehindCSS3DScene())==null||i.remove(this.store.behindModeGroup))}handleDispose(){this.handleDisable()}}u($i,"setFrontModeContainer",fm),u($i,"setBehindModeContainer",mm);function yl(n){return W(this,null,function*(){return new Promise(t=>{var e;if((e=n.model)!=null&&e.loaded){t();return}else n.once("modelLoaded",()=>t())})})}const Lt=document.createElement("div");Lt.classList.add("behindFiveElement"),Lt.style.position="absolute",Lt.style.top="0",Lt.style.left="0",Lt.style.width="100%",Lt.style.height="100%",Lt.style.pointerEvents="none";function wl(n){var i,s,o,r,a;const t=(a=(s=Yo(n.getElement()))!=null?s:Yo((i=n.getElement())==null?void 0:i.parentElement))!=null?a:Yo((r=(o=n.getElement())==null?void 0:o.parentElement)==null?void 0:r.parentElement),e=t==null?void 0:t.parentElement;if(e)return e.contains(Lt)||t.parentElement.insertBefore(Lt,t),Lt;console.error("Can not find a valid element to insert behindFiveElement. How to fix it: https://github.com/realsee-developer/dnalogel/tree/main/plugins/src/CSS3DRenderPlugin/README.md")}function Yo(n){var a;if(!n)return;const t=(a=n.style.position)!=null?a:getComputedStyle(n).position;if(t!=="fixed"&&t!=="absolute"&&t!=="relative")return;const e=getComputedStyle(n),i=e.backgroundColor,s=e.backgroundImage;if(!(i!=="transparent"&&i!=="rgba(0, 0, 0, 0)"&&i!==""||s!=="none"&&s!==""))return n}class Xo{constructor(t=0,e=0){u(this,"min");u(this,"max");u(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 gm{constructor(t,e){u(this,"min");u(this,"max");u(this,"xInterval");u(this,"yInterval");u(this,"isRectangle",!0);this.min=t,this.max=e,this.xInterval=new Xo(this.min.x,this.max.x),this.yInterval=new Xo(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 Tt(n){return n.toLowerCase().includes("panorama")}function en(n){return!Tt(n)}function pm(n){return n.model?n.work?n.model.loaded?n.model.name!==n.work.model.file?{result:!1,msg:"five.model.name 与 five.work.model.file 不一致"}:{result:!0,msg:""}:{result:!1,msg:"five.model 未加载完成"}:{result:!1,msg:"five 数据未加载"}:{result:!1,msg:"five.model 不存在"}}function Ts(n,t,e){const i=n[t],s=n[e];i===void 0||s===void 0||(n[t]=s,n[e]=i)}function Am(n,t,e){const i=e/2;for(let s=1;s<=i;s++){const o=e-(s-1);for(let r=1;r<=t;r++){const a=(s-1)*t+r-1,l=(o-1)*t+r-1;Ts(n,a*4+0,l*4+0),Ts(n,a*4+1,l*4+1),Ts(n,a*4+2,l*4+2),Ts(n,a*4+3,l*4+3)}}}let Zo=class{constructor(t,e){u(this,"width");u(this,"height");u(this,"containerDom");u(this,"hooks",new Ae.Subscribe);u(this,"canvas",document.createElement("canvas"));u(this,"five");u(this,"scale");u(this,"config");u(this,"offset",{x:0,y:0});u(this,"context");u(this,"renderCenter",new k.Vector3);u(this,"hammer");u(this,"state",{enabled:!1});u(this,"onPan",t=>{if(!this.containerDom||this.hooks.emit("wantsPanGesture",t))return;const i=this.offset.x+t.deltaX,s=this.offset.y+t.deltaY;this.canvas.style.boxShadow="0 2px 30px 0 rgba(0,0,0,0.20)",this.canvas.style.transform=`translate3d(${i}px, ${s}px, 100px)`});u(this,"onPanEnd",t=>{this.offset={x:this.offset.x+t.deltaX,y:this.offset.y+t.deltaY},this.canvas.style.boxShadow="none"});var s,o,r;if(!t.renderer)throw new Error("Five Render 未初始化");this.five=t,this.scale=(s=e==null?void 0:e.scale)!=null?s:2,this.width=(o=e==null?void 0:e.width)!=null?o: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 i=this.canvas.getContext("2d");if(!i)throw new Error("CANNOT CREATE CONTEXT2D");this.context=i,this.config.dragEnabled&&(this.hammer=new li(this.canvas),this.hammer.on("pan",this.onPan),this.hammer.on("panend",this.onPanEnd)),this.initStyle()}getCurrentState(){return this.state}dispose(){var t;this.clear(),this.disable(),(t=this.hammer)==null||t.destroy()}show(){return this.canvas.style.visibility="visible",this}hide(){return this.canvas.style.visibility="hidden",this}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){return this.containerDom&&Array.from(this.containerDom.children).includes(this.canvas)&&this.containerDom.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,i=this.renderCenter.clone().project(this.five.camera),s=(i.x+1)/2*this.containerDom.clientWidth,o=-(i.x-1)/2*this.containerDom.clientWidth,r=-(i.y-1)/2*this.containerDom.clientHeight;s<183?(this.canvas.style.top=-e/2+"px",this.canvas.style.left="90px"):r<183?(this.canvas.style.top="90px",this.canvas.style.left=-t/2+"px"):o<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(${s}px, ${r}px, 10px)`,this.offset={x:s,y:r}}render(){if(!this.five.renderer||!this.containerDom)return;const{scale:t,context:e,width:i,height:s}=this,o=this.renderCenter.clone().project(this.five.camera),r=this.five.renderer.getSize(new k.Vector2),a=1,l=i/t,c=s/t,d=a*t,h=(o.x+1)/2*r.x,f=(o.y+1)/2*r.y,m=this.five.getPixels(h-l/2,f-l/2,l,c,d),A=Math.floor(i*a),p=Math.floor(s*a);Am(m,A,p);const g=new ImageData(A,p);g.data.set(m),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)",t.style.visibility="visible",this.config.dragEnabled&&(this.canvas.style.cursor="pointer")}};function vm(n,t){const{offsetWidth:e,offsetHeight:i}=t,{top:s,left:o}=t.getBoundingClientRect();return new k.Vector2().set((n.x-o)/e*2-1,-(n.y-s)/i*2+1)}function Cl(n,t){const{offsetWidth:e,offsetHeight:i}=t;return new k.Vector2().set(n.x/e*2-1,-n.y/i*2+1)}function bm(n,t){const e=n.getElement();if(!e)return;const i=Cl(t,e),s=new k.Raycaster;return s.setFromCamera(i,n.camera),s}function Il(n,t){const{x:e,y:i}=t,s=e*2-1,o=i*2-1,r=new k.Vector2().fromArray([s,o]),a=new k.Raycaster;return a.setFromCamera(r,n.camera),n.model.intersectRaycaster(a)[0]}const ym="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAbYAAAGwCAYAAADFUEBtAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMA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AEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQn8NQn8fyHnyuSABiy2AAAAAElFTkSuQmCC",wm=`
101
+ `;let Zf=class extends Yf{constructor(e){super();u(this,"configs");u(this,"clientWidth");u(this,"clientHeight");u(this,"ready",!1);u(this,"uuid",et());u(this,"tween");u(this,"tweening",!1);u(this,"container");u(this,"canvas");u(this,"data",{});u(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=Xf,this.container}initCanvas(e){const i=document.createElement("canvas");i.className=e,i.width=this.clientWidth,i.height=this.clientHeight;const s=i.getContext("2d");if(s)return s.lineWidth=5*this.dpr,s.lineCap="round",s.lineJoin="round",this.container.appendChild(i),i}initCtrl(){const e=document.createElement("div");e.className="_paintBrush-ctrl";const i=document.createElement("div");i.className="_paintBrush-ctrlinner";const s=document.createElement("a");s.className="_paintBrush-ctrlitem _paintBrush-ctrlitem--undo",s.addEventListener("click",a=>{var f;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:Kt.Undo,color:this.color,ready:this.ready,state:l,uuid:this.uuid});const c=(f=this.canvas[this.uuid])==null?void 0:f.getContext("2d");if(!this.canvas[this.uuid])return;const{width:d,height:h}=this.canvas[this.uuid];c&&c.clearRect(0,0,d,h),this.data[this.uuid].forEach(m=>this.handleDrawLine(this.uuid,m,{withUndo:!0}))});const o=document.createElement("a");return o.className="_paintBrush-ctrlitem _paintBrush-ctrlitem--close",o.addEventListener("click",a=>{a.stopPropagation(),this.closeBrush(),this.configs.onClickClose&&this.configs.onClickClose()}),[s,o].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)}),i.appendChild(s),i.appendChild(o),e.appendChild(i),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 i=this.canvas[e].getContext("2d");i&&i.clearRect(0,0,this.canvas[e].width,this.canvas[e].height)}),this.ready=!1,this.emit("readyChange",!1),this.emitStateChange({type:Kt.Exit,color:this.color,ready:!1,uuid:this.uuid}))}updateCurrentColor(e){const i=this.canvas[this.uuid];if(!i)return;const s=i.getContext("2d");s&&(this.configs.currentColor=e,s.strokeStyle=e)}openBrushHandle(){const e=this.canvas[this.uuid];if(!e)return;const i=e.getContext("2d");if(!i)return;const s=this.color||"#6D92FF";i.strokeStyle=s;let o=null,r=[],a,l=[],c=0;const d=(h,f,m)=>{const A=this.color||"#ff0000";i.strokeStyle=A,i.beginPath(),i.moveTo(h.x,h.y),i.quadraticCurveTo(f.x,f.y,m.x,m.y),i.stroke()};e.onmousedown=h=>{h.preventDefault(),c=Date.now();const f=h.clientX,m=h.clientY;r=[],r.push({x:f,y:m}),o={x:f,y:m},a=ks({x:f,y:m},this.clientWidth,this.clientHeight),l=[]},e.onmousemove=h=>{if(h.preventDefault(),!o)return;const f=Number(h.clientX),m=Number(h.clientY);if(Math.abs(f-o.x)<5&&Math.abs(m-o.y)<5||(r.push({x:f,y:m}),l.push(ks({x:f,y:m},this.clientWidth,this.clientHeight)),r.length<3))return;const{control:A,end:p}=Ms(r);!A||!p||(d(o,A,p),o=p)},e.onmouseup=h=>{if(h.preventDefault(),o=null,r.length<3)return;this.data[this.uuid]||(this.data[this.uuid]=[]);const f=Date.now()-c,m={move:Object.assign({},a),uuid:this.uuid,line:[...l],color:this.color,duration:f<1280?f:f<2e3?1280:0};this.data[this.uuid].push(m),Es(()=>{this.emitStateChange({type:Kt.Drawline,color:this.color,ready:this.ready,state:m,uuid:this.uuid})})},e.ontouchstart=h=>{h.preventDefault(),c=Date.now();const f=h.touches[0].clientX,m=h.touches[0].clientY;r=[],r.push({x:f,y:m}),o={x:f,y:m},a=ks({x:f,y:m},this.clientWidth,this.clientHeight),l=[]},e.ontouchmove=h=>{if(h.preventDefault(),!o)return;const f=Number(h.touches[0].clientX),m=Number(h.touches[0].clientY);if(Math.abs(f-o.x)<5&&Math.abs(m-o.y)<5||(r.push({x:f,y:m}),l.push(ks({x:f,y:m},this.clientWidth,this.clientHeight)),r.length<3))return;const{control:A,end:p}=Ms(r);!A||!p||(d(o,A,p),o=p)},e.ontouchend=e.ontouchcancel=h=>{if(h.preventDefault(),o=null,r.length<3)return;this.data[this.uuid]||(this.data[this.uuid]=[]);const f=Date.now()-c,m={move:Object.assign({},a),line:[...l],uuid:this.uuid,color:this.color,duration:f<1280?f:f<2e3?1280:0};this.data[this.uuid].push(m),Es(()=>{this.emitStateChange({type:Kt.Drawline,color:this.color,ready:this.ready,state:m,uuid:this.uuid})})}}emitStateChange(e,i=!0){if(e.type!==Kt.Drawline){this.emit("stateChange",e,i);return}const s=Date.now(),o=e.state;if(!o||!o.line)return;const r=Math.ceil(o.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:o.move,duration:o.duration,color:this.color,line:o.line.slice(a*100,(a+1)*100)},timestamp:s,end:a===r-1};Vf(a,20,()=>{this.emit("stateChange",l,i)})}}action(e){const{ready:i,type:s,uuid:o}=e;if(!i&&this.ready){this.closeBrush();return}if(i&&!this.ready){this.openBrush();return}if(this.ready)switch(s){case Kt.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(o,r,{},()=>delete this.tempLine[a]));break;case Kt.Undo:this.handleUndo(o);break}}handleDrawLine(e,i,{withUndo:s=!1},o=ll){!i||Object.prototype.toString.call(i)!="[object Object]"||Object.keys(i).length===0||Bf(()=>new Promise(r=>{if(s||(this.canvas[e]||(this.canvas[e]=this.initCanvas("_paintBrush-canvas--sync")),this.data[e]||(this.data[e]=[]),this.data[e].push(i)),!this.canvas[e])return;const a=this.canvas[e].getContext("2d");if(!a)return;const{line:l=[],color:c="black",duration:d=0,uuid:h}=i,f=Fo(i.move||{},this.clientWidth,this.clientHeight);let m=[f];if(a.strokeStyle=c,a.beginPath(),a.moveTo(f.x,f.y),d&&!s){let A=[];const p=this;p.tween=Wf({step:0},{step:l.length-1},d).onUpdate(({step:g})=>{var y;if(p.tweening=!0,!p.ready)return a.clearRect(0,0,p.canvas[h].width,p.canvas[h].height),(y=p.tween)==null?void 0:y.stop();const v=Math.floor(g);if(!A.find(P=>P===v)){if(A.push(v),m.push(Fo(l[v],p.clientWidth,p.clientHeight)),m.length<3)return;const{control:P,end:I}=Ms(m);if(!P||!I)return;a.quadraticCurveTo(P.x,P.y,I.x,I.y),a.stroke()}}).onComplete(g=>{p.tween=void 0,p.tweening=!1,A=[],m=[],o&&o(),r()})}else{for(let A=0;A<l.length;A++){if(m.push(Fo(l[A],this.clientWidth,this.clientHeight)),m.length<3)continue;const{control:p,end:g}=Ms(m);!p||!g||a.quadraticCurveTo(p.x,p.y,g.x,g.y)}a.stroke(),m=[],o&&o(),r()}}))}handleUndo(e){if(!this.canvas[e]||!this.data[e]||this.data[e].length===0)return;this.data[e].pop();const i=()=>{var o;const s=(o=this.canvas[e])==null?void 0:o.getContext("2d");s&&s.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(),Es(i,60);return}i()}destroyBrush(){this.closeBrush(),this.ready=!1,this.emit("readyChange",!0)}};class Jf{constructor(t={}){u(this,"controller");const e=Object.assign({currentColor:"#f44336",onUndoText:"回退",onExitText:"关闭"},t);this.controller=new Zf(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 qf=(n,t)=>{var F,Q;let e=(Q=(F=t==null?void 0:t.initialState)==null?void 0:F.enabled)!=null?Q:!0,i=!1,s=!0,o=null;const a=V(V({},{lookAtCurrentCamera:!1,lockedPanoIndex:null,lockedLatitude:null,lockedLongitude:null}),t==null?void 0:t.config),l=new k.Scene,c=new Ae.Camera(60);let d=new k.Object3D,h,f;{const _=new k.DirectionalLight(16777215,.5);_.position.copy(new k.Vector3(1,1,1)),l.add(_)}{const _=new k.DirectionalLight(16777215,.3);l.add(_)}{const _=new k.AmbientLight(16777215,.3);l.add(_)}l.add(d);const m=()=>{if(i)return;h=E(n.model,c.fov,c.aspect),f=n.model.bounding.getCenter(new k.Vector3),l.remove(d),d=Y(n.model),l.add(d),i=!0,z();function _(Z){const q=Z.clone();return q.uniforms.modelAlpha.value=1,q.uniforms.map.value&&(q.uniforms.map.value.needsUpdate=!0),q}function Y(Z){if(Z instanceof k.Mesh){const q=Z.geometry,ee=Array.isArray(Z.material)?Z.material.map(_):_(Z.material);return new k.Mesh(q,ee)}else if(Z instanceof k.Group){const q=new k.Group;return Z.children.forEach(ee=>q.add(Y(ee))),q}else{const q=new k.Object3D;return Z.children.forEach(ee=>q.add(Y(ee))),q}}},A=()=>{if(n.renderer)return o||(o=new k.WebGLRenderer({antialias:!1,alpha:!0}),o.setPixelRatio(n.renderer.getPixelRatio()),o.outputEncoding=k.sRGBEncoding,o.setClearColor(1579548,0),o.autoClear=!0),o},p=()=>{d.traverse(_=>{_ instanceof k.Mesh&&[].concat(_.material).forEach(Z=>Z.dispose())}),l.remove(d),d=new k.Object3D,l.add(d),i=!1,z()},g=()=>{e&&(i||m())},v=()=>{e||(e=!0,l.add(d),!i&&n.model.loaded&&m(),z())},y=()=>{e&&(l.remove(d),s=!0,R(),e=!1)},P=(_,Y={})=>{const Z=A();if(!Z)return;_.appendChild(Z.domElement),I(Y);const q=window.getComputedStyle(_).position;q!=="relative"&&q!=="absolute"&&q!=="fixed"&&q!=="sticky"&&(_.style.position="relative")},I=(_={})=>{if(!o)return;const Z=o.domElement.parentNode;if(Z!=null&&Z.nodeName){const{width:q=Z.offsetWidth,height:ee=Z.offsetHeight}=_;o.setSize(q,ee),c.aspect=q/ee,c.updateProjectionMatrix()}z()};function E(_,Y,Z){const q=_.bounding,ee=Math.pow(Math.pow(q.max.x-q.min.x+1,2)+Math.pow(q.max.y-q.min.y+1,2)+Math.pow(q.max.z-q.min.z+1,2),1/2);let fe=ee/2/Math.tan(Math.PI*Y/360);return Z<1&&(fe=fe/Z),isNaN(fe)?ee:fe}function C(_){return n.work.observers[_].standingPosition.clone()}const z=()=>{if(!e||!h||!f)return;const _=n.getPose();_.fov=c.fov,_.offset=f,_.distance=h,typeof a.lockedLatitude=="number"&&(_.latitude=a.lockedLatitude),typeof a.lockedLongitude=="number"&&(_.longitude=a.lockedLongitude),typeof a.lockedPanoIndex=="number"&&(_.offset=C(a.lockedPanoIndex)),a.lookAtCurrentCamera&&(_.offset=n.camera.position.clone().setY(n.camera.position.y+1)),c.setFromPose(_),s=!0},R=()=>{!e||s!==!0||!o||!o.domElement.parentNode||o.domElement.parentNode.offsetWidth===0||(o.render(l,c),s=!1)},U=()=>{o&&o.dispose(),o=null},H=_=>{Object.assign(a,_),z()},N=()=>({enabled:e});return Object.assign(window,{camera:c}),n.on("modelLoaded",g),n.on("modelWillLoad",p),n.on("cameraDirectionUpdate",z),n.on("dispose",U),n.on("renderFrame",R),n.on("cameraPositionUpdate",z),{appendTo:P,refresh:I,changeConfigs:H,enable:v,disable:y,getCurrentState:N}},Kf=({x:n,y:t,z:e})=>new G.Vector3(n,t,e),$t=n=>new G.Vector3().fromArray(n),kt=n=>n instanceof G.Vector3?n:Array.isArray(n)?$t(n):Kf(n);function $f(n){if(n)return Array.isArray(n)?typeof n[0]=="number"?kt(n):n.map(kt):kt(n)}function gl(n){return arguments.length===0?[]:Array.isArray(n)?n:[n]}function Mi(n){const t=[];return gl(n).forEach(i=>{i.traverse(s=>{s.isCSS3DObjectPlus&&t.push(s)})}),t}function Ss(n,t){const e=Math.round(n);return e%2===0?e:e+(t!=null&&t.floor?-1:1)}function em(n,t,e=!0){if(!n)return console.error("createResizeObserver: element is undefined"),{observe:()=>{},unobserve:()=>{}};const i=()=>{const o=Ss(n.clientWidth,{floor:!0}),r=Ss(n.clientHeight,{floor:!0});t(o,r)};if(typeof ResizeObserver=="undefined"||!ResizeObserver)return console.warn("createResizeObserver: ResizeObserver is undefined"),{observe:()=>i(),unobserve:()=>{}};const s=new ResizeObserver(i);return e&&i(),{observe:()=>s.observe(n),unobserve:()=>s.unobserve(n)}}class pl extends Ji.CSS3DRenderer{constructor(){super();u(this,"wrapper");u(this,"requestAnimationFrameId");u(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 i=this.wrapper;return i&&i.contains(this.domElement)&&this.domElement.remove(),this.appendToElement(e),this.wrapper=e,this}appendToElement(e){e.appendChild(this.domElement);const i=(r,a)=>this.setSize(r,a),{observe:s,unobserve:o}=em(e,i,!0);s(),this.resizeDisoper=o,this.wrapper=e}renderEveryFrame(e,i){if(this.wrapper||console.warn("wrapper is not find, creating a html element and call setWrapper(wrapper)",this,e),this.requestAnimationFrameId)return;const s=()=>{this.requestAnimationFrameId=requestAnimationFrame(s),e.visible&&Mi(e).length!==0&&this.render(e,i)};s()}stopRender(){this.requestAnimationFrameId&&cancelAnimationFrame(this.requestAnimationFrameId)}dispose(){var e;this.stopRender(),(e=this.resizeDisoper)==null||e.call(this),this.domElement.remove()}}function tm(n){return typeof Symbol=="undefined"?`$Symbol<${n}>$`:Symbol(n)}const Hn=tm("$$EVENT$$");function Ls(n){return n[Hn]||(n[Hn]={}),n[Hn]}function im(n){n[Hn]||delete n[Hn]}class Ei{hasListener(t){const e=Ls(this);return!!(e!=null&&e[t]&&e[t].length>0)}on(t,e,i){const s=Ls(this);return s[t]||(s[t]=[]),s[t].push([e,i||!1]),()=>this.off(t,e)}once(t,e){return this.on(t,e,!0)}off(t,e){if(t===void 0){im(this);return}const i=Ls(this);if(i[t]||(i[t]=[]),e===void 0){i[t].length=0;return}let s=0;for(;s<i[t].length&&i[t][s][0]!==e;s++);s<i[t].length&&i[t].splice(s,1)}emit(t,...e){let i=!1;const o=Ls(this)[t]||[];for(let r of o.slice()){const[a,l=!1]=r,c=a(...e);l&&this.off(t,a),c===!1&&(i=!0)}return i}}class nm extends k.Mesh{constructor(e,i){const s=new k.MeshBasicMaterial({opacity:0,color:0,transparent:!1,side:k.DoubleSide}),o=new k.PlaneGeometry(e,i);super(o,s);u(this,"name","opacity-mesh")}removeFromParent(){const e=this.parent;return e!==null&&e.remove(this),this}}function di(...n){const t=new G.Vector3;return n.forEach(e=>t.add(e)),t.divideScalar(n.length),t}const Wo=n=>n?n.visible===!1?!1:Wo(n.parent):!0,Al=1,sm=`CSS3DObjectPlus@${Al}`,om=.00216,rm=.003;class am extends Ji.CSS3DObject{constructor(e){var E,C,z;const i=e.container,s=e.cornerPoints,o=(E=e.ratio)!=null?E:rm,r=(C=e.dpr)!=null?C:1,a=(z=e.pointerEvents)!=null?z:"auto",l=Math.max(om,o),c=s[0].distanceTo(s[1]),d=s[1].distanceTo(s[2]),h=Ss(c/o*r),f=Ss(d/o*r),m=di(...s);let A;if(l===o)i.style.width=`${h}px`,i.style.height=`${f}px`,A=i;else{const R=document.createElement("div");R.style.width=`${h}px`,R.style.height=`${f}px`,R.style.pointerEvents="none";const U=o/l;i.style.position="absolute",i.style.left="0",i.style.top="0",i.style.width=`${U*h}px`,i.style.height=`${U*f}px`,R.appendChild(i),A=R}super(A);u(this,"version",Al);u(this,"isCSS3DObjectPlus",!0);u(this,"container");u(this,"width");u(this,"height");u(this,"domWidthPx");u(this,"domHeightPx");u(this,"cornerPoints");u(this,"centerPosition");u(this,"ratio");u(this,"mode","front");u(this,"hooks",new Ei);u(this,"opacityMesh");u(this,"selfVisible",!0);u(this,"setVisible",e=>{this.selfVisible=e,this.visible=Wo(this.parent)&&this.selfVisible,this.opacityMesh&&(this.opacityMesh.visible=this.visible)});u(this,"updateVisible",()=>{this.setVisible(this.selfVisible)});u(this,"createOpacityMesh",e=>{const{domWidthPx:i,domHeightPx:s}=e,o=new nm(i,s);return o.position.copy(e.position),o.rotation.copy(e.rotation),o.scale.copy(e.scale),o});if(i.style.pointerEvents=a,Object.assign(i.style,e.style),this.scale.set(l,l,l),this.cornerPoints=s,this.ratio=o,this.container=i,e.mode&&(this.mode=e.mode),l===o)this.width=c,this.height=d,this.domWidthPx=h,this.domHeightPx=f,this.centerPosition=m;else{const R=o/l;this.width=R*c,this.height=R*d,this.domWidthPx=R*h,this.domHeightPx=R*f,this.centerPosition=new G.Vector3().subVectors(m,s[0]).multiplyScalar(R).add(s[0])}i.classList.add(`${sm}__container`);const p=new G.Vector3().subVectors(s[1],s[0]),g=new G.Vector3().subVectors(s[3],s[0]),v=new G.Vector3().crossVectors(p,g).normalize();this.lookAt(v);const y=this.up.clone().applyQuaternion(this.quaternion),P=g.clone(),I=new G.Vector3().crossVectors(y,P).normalize();this.rotateOnWorldAxis(I,y.angleTo(P)),this.position.copy(m),this.addEventListener("added",()=>{var R;this.mode==="front"&&((R=this.opacityMesh)==null||R.removeFromParent())}),this.addEventListener("removed",()=>{var R;(R=this.opacityMesh)==null||R.removeFromParent()})}removeFromParent(){var i;const e=this.parent;return e!==null&&e.remove(this),(i=this.opacityMesh)==null||i.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 i;super.applyMatrix4(e),(i=this.opacityMesh)==null||i.applyMatrix4(e)}applyQuaternion(e){var i;return super.applyQuaternion(e),(i=this.opacityMesh)==null||i.applyQuaternion(e),this}applyScaleMatrix4(e){var i;this.scale.applyMatrix4(e),(i=this.opacityMesh)==null||i.scale.applyMatrix4(e)}}class lm extends k.Scene{constructor(){super()}add(...t){return super.add(...t),Mi(t).forEach(e=>{e.mode="front"}),this}}class cm extends k.Scene{constructor(e){super();u(this,"scene");if(!e)throw new Error("CSS3DBehindScene: scene is required");this.scene=e}add(...e){return super.add(...e),Mi(e).forEach(i=>{i.mode="behind",this.scene.add(i.getOpacityMesh())}),this}remove(...e){return Mi(e).forEach(i=>{var s;(s=i.opacityMesh)==null||s.removeFromParent(),i.opacityMesh=null}),super.remove(...e),this}}class vl extends k.Group{constructor(e){super();u(this,"isCSS3DGroup",!0);u(this,"mode");u(this,"CSS3DObjectLength",0);this.mode=e}add(...e){return Mi(e).forEach(i=>{i.mode=this.mode}),super.add(...e),this.updateLength(),this}setVisible(e){this.visible=e,this.traverse(i=>{i.isCSS3DObjectPlus&&i.updateVisible()})}remove(...e){return super.remove(...e),this.updateLength(),this}updateLength(){this.CSS3DObjectLength=Mi(this).length}}class dm extends vl{constructor(){super("front")}}class hm extends vl{constructor(e){super("behind");u(this,"scene");if(!e)throw new Error("CSS3DBehindScene: scene is required");this.scene=e}add(...e){return Mi(e).forEach(i=>{this.scene.add(i.getOpacityMesh())}),super.add(...e),this}}const um=3,Uo="CSS3DRenderer",Wn=`${Uo}@${um}`,Ki=()=>{console.error(`${Wn} is disposed`)},Ye={css3DObjects:[],frontModeStore:{css3DRenderer:new pl},behindModeStore:{css3DRenderer:new pl}};function bl(n){return Ye.css3DObjects.find(t=>t.id===n)}function fm(n){Ye.frontModeStore.css3DRenderer.setWrapper(n)}function mm(n){Ye.behindModeStore.css3DRenderer.setWrapper(n)}class $i{constructor(t){u(this,"hooks",new Ei);u(this,"state",{enabled:!0,visible:!0,disposed:!1});u(this,"_scene");u(this,"store",{frontModeGroup:new dm});u(this,"create3DElement",(t,e,i)=>{if(this.state.disposed)return Ki();const s=(()=>{const E={ratio:.00216,devicePixelRatio:1,mode:"front",autoRender:!0,container:document.createElement("div"),pointerEvents:"none",wrapperStyle:{}};return Object.assign(E,i)})(),o=e.map(kt);if((o==null?void 0:o.length)<4)return console.error(`${Wn}: requires 4 point but params may have fewer`);const{ratio:r,devicePixelRatio:a,mode:l,autoRender:c,container:d,pointerEvents:h,wrapperStyle:f}=s;let m=!1;const A=this.createObject(o,{ratio:r,dpr:a,container:d,mode:l,pointerEvents:h,wrapperStyle:f});Ye.css3DObjects.push(A),s.scene&&this.setScene(s.scene);const p=()=>{if(m)return;const E=A.mode==="front"?this.getFrontCSS3DObjectGroup():this.getBehindCSS3DObjectGroup();E&&E.add(A)},g=()=>{m||(p(),this.render(t),this.hooks.emit("render"))},v=E=>this.setVisibleById(A.id,E),y=E=>this.setEnabledById(A.id,E),P=()=>(m=!0,A.removeFromParent(),!0),I=l==="front"?Ye.frontModeStore.css3DRenderer:Ye.behindModeStore.css3DRenderer;return c&&g(),{id:A.uuid,container:d,css3DObject:A,render:c?void 0:g,show:()=>v(!0),hide:()=>v(!1),setVisible:v,enable:()=>y(!0),disable:()=>y(!1),setEnabled:y,dispose:P,appendToElement:E=>I.setWrapper(E)}});u(this,"setVisibleById",(t,e)=>{var i;(i=bl(t))==null||i.setVisible(e)});u(this,"setEnabledById",(t,e)=>{const i=bl(t);if(!i)return;const s=i.mode==="front"?this.getFrontCSS3DObjectGroup({addGroupIfNotExists:!1}):this.getBehindCSS3DObjectGroup({addGroupIfNotExists:!1});s&&(e?s.add(i):s.remove(i))});u(this,"createObject",(t,e)=>{const i=new am(ge(V({cornerPoints:t},e),{style:e.wrapperStyle}));return i.element.classList.add(`${Uo}__container`),i.element.id=`${Uo}__container--${i.uuid}`,i});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 Ye.frontModeStore.css3DRenderer}static get behindModeCSS3DRenderer(){return Ye.behindModeStore.css3DRenderer}get frontModeCSS3DRenderer(){return Ye.frontModeStore.css3DRenderer}get behindModeCSS3DRenderer(){return Ye.behindModeStore.css3DRenderer}setScene(t){this._scene=t}getCurrentState(){return this.state}setState(t,e={userAction:!0}){if(this.state.disposed)return Ki();const i=V({},this.state);this.state=Object.assign(this.state,t),i.visible!==this.state.visible&&(t.visible?this.handleShow():this.handleHide()),i.enabled!==this.state.enabled&&(t.enabled?this.handleEnable():this.handleDisable()),i.disposed!==this.state.disposed&&this.handleDispose(),this.hooks.emit("stateChange",{state:this.state,prevState:i,userAction:e.userAction})}dispose(){this.setState({disposed:!0}),this.hooks.emit("dispose")}show(){return W(this,arguments,function*({userAction:t}={userAction:!0}){if(this.state.disposed)return Ki();this.setState({visible:!0},{userAction:t}),this.hooks.emit("show",{userAction:t})})}hide(){return W(this,arguments,function*({userAction:t}={userAction:!0}){if(this.state.disposed)return Ki();this.setState({visible:!1},{userAction:t}),this.hooks.emit("hide",{userAction:t})})}enable({userAction:t}={userAction:!0}){if(this.state.disposed)return Ki();this.setState({enabled:!0},{userAction:t}),this.hooks.emit("enable",{userAction:t})}disable({userAction:t}={userAction:!0}){if(this.state.disposed)return Ki();this.setState({enabled:!1},{userAction:t}),this.hooks.emit("disable",{userAction:t})}getFrontCSS3DScene({createSceneIfNotExists:t=!1}={}){var i;const e=(i=Ye.frontModeStore)==null?void 0:i.css3DScene;if(e)return e;if(t){const s=new lm;Ye.frontModeStore.css3DScene=s}return Ye.frontModeStore.css3DScene}getBehindCSS3DScene({createSceneIfNotExists:t=!1}={}){var i,s;const e=(i=Ye.behindModeStore)==null?void 0:i.css3DScene;if(e)return e;if(t){const o=(s=Ye.behindModeStore.scene)!=null?s:this.scene;if(!o){console.error(`${Wn}: scene is required when mode is behind`);return}const r=new cm(o);Ye.behindModeStore.css3DScene=r,Ye.behindModeStore.scene=o}return Ye.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 i;const e=this.getBehindCSS3DScene({createSceneIfNotExists:t});if(t&&e&&this.scene){const s=(i=this.store.behindModeGroup)!=null?i:new hm(this.scene);this.store.behindModeGroup=s,e.getObjectById(s.id)||e.add(s)}return this.store.behindModeGroup}render(t){var e,i;if(this.getFrontCSS3DObjectGroup({addGroupIfNotExists:!1}).CSS3DObjectLength>0){const s=this.getFrontCSS3DScene({createSceneIfNotExists:!0});if(!s)return console.error(`${Wn}: css3DScene is required when mode is front`);Ye.frontModeStore.css3DRenderer.renderEveryFrame(s,t)}if(((i=(e=this.getBehindCSS3DObjectGroup({addGroupIfNotExists:!1}))==null?void 0:e.CSS3DObjectLength)!=null?i:0)>0){const s=this.getBehindCSS3DScene({createSceneIfNotExists:!0});if(!s)return console.error(`${Wn}: css3DScene is required when mode is behind`);Ye.behindModeStore.css3DRenderer.renderEveryFrame(s,t)}}handleShow(){return W(this,null,function*(){var t;this.store.frontModeGroup.setVisible(!0),(t=this.store.behindModeGroup)==null||t.setVisible(!0)})}handleHide(){return W(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,i;this.store.frontModeGroup.children.forEach(s=>{s instanceof Ji.CSS3DObject&&s.element instanceof Element&&s.element.parentNode!==null&&s.element.remove()}),(t=this.store.behindModeGroup)==null||t.children.forEach(s=>{s instanceof Ji.CSS3DObject&&s.element instanceof Element&&s.element.parentNode!==null&&s.element.remove()}),(e=this.getFrontCSS3DScene())==null||e.remove(this.store.frontModeGroup),this.store.behindModeGroup&&((i=this.getBehindCSS3DScene())==null||i.remove(this.store.behindModeGroup))}handleDispose(){this.handleDisable()}}u($i,"setFrontModeContainer",fm),u($i,"setBehindModeContainer",mm);function yl(n){return W(this,null,function*(){return new Promise(t=>{var e;if((e=n.model)!=null&&e.loaded){t();return}else n.once("modelLoaded",()=>t())})})}const Lt=document.createElement("div");Lt.classList.add("behindFiveElement"),Lt.style.position="absolute",Lt.style.top="0",Lt.style.left="0",Lt.style.width="100%",Lt.style.height="100%",Lt.style.pointerEvents="none";function wl(n){var i,s,o,r,a;const t=(a=(s=Yo(n.getElement()))!=null?s:Yo((i=n.getElement())==null?void 0:i.parentElement))!=null?a:Yo((r=(o=n.getElement())==null?void 0:o.parentElement)==null?void 0:r.parentElement),e=t==null?void 0:t.parentElement;if(e)return e.contains(Lt)||t.parentElement.insertBefore(Lt,t),Lt;console.error("Can not find a valid element to insert behindFiveElement. How to fix it: https://github.com/realsee-developer/dnalogel/tree/main/plugins/src/CSS3DRenderPlugin/README.md")}function Yo(n){var a;if(!n)return;const t=(a=n.style.position)!=null?a:getComputedStyle(n).position;if(t!=="fixed"&&t!=="absolute"&&t!=="relative")return;const e=getComputedStyle(n),i=e.backgroundColor,s=e.backgroundImage;if(!(i!=="transparent"&&i!=="rgba(0, 0, 0, 0)"&&i!==""||s!=="none"&&s!==""))return n}class Xo{constructor(t=0,e=0){u(this,"min");u(this,"max");u(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 gm{constructor(t,e){u(this,"min");u(this,"max");u(this,"xInterval");u(this,"yInterval");u(this,"isRectangle",!0);this.min=t,this.max=e,this.xInterval=new Xo(this.min.x,this.max.x),this.yInterval=new Xo(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 Tt(n){return n.toLowerCase().includes("panorama")}function en(n){return!Tt(n)}function pm(n){return n.model?n.work?n.model.loaded?n.model.name!==n.work.model.file?{result:!1,msg:"five.model.name 与 five.work.model.file 不一致"}:{result:!0,msg:""}:{result:!1,msg:"five.model 未加载完成"}:{result:!1,msg:"five 数据未加载"}:{result:!1,msg:"five.model 不存在"}}function Ts(n,t,e){const i=n[t],s=n[e];i===void 0||s===void 0||(n[t]=s,n[e]=i)}function Am(n,t,e){const i=e/2;for(let s=1;s<=i;s++){const o=e-(s-1);for(let r=1;r<=t;r++){const a=(s-1)*t+r-1,l=(o-1)*t+r-1;Ts(n,a*4+0,l*4+0),Ts(n,a*4+1,l*4+1),Ts(n,a*4+2,l*4+2),Ts(n,a*4+3,l*4+3)}}}let Zo=class{constructor(t,e){u(this,"width");u(this,"height");u(this,"containerDom");u(this,"hooks",new Ae.Subscribe);u(this,"canvas",document.createElement("canvas"));u(this,"five");u(this,"scale");u(this,"config");u(this,"offset",{x:0,y:0});u(this,"context");u(this,"renderCenter",new k.Vector3);u(this,"hammer");u(this,"state",{enabled:!1});u(this,"onPan",t=>{if(!this.containerDom||this.hooks.emit("wantsPanGesture",t))return;const i=this.offset.x+t.deltaX,s=this.offset.y+t.deltaY;this.canvas.style.boxShadow="0 2px 30px 0 rgba(0,0,0,0.20)",this.canvas.style.transform=`translate3d(${i}px, ${s}px, 100px)`});u(this,"onPanEnd",t=>{this.offset={x:this.offset.x+t.deltaX,y:this.offset.y+t.deltaY},this.canvas.style.boxShadow="none"});var s,o,r;if(!t.renderer)throw new Error("Five Render 未初始化");this.five=t,this.scale=(s=e==null?void 0:e.scale)!=null?s:2,this.width=(o=e==null?void 0:e.width)!=null?o: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 i=this.canvas.getContext("2d");if(!i)throw new Error("CANNOT CREATE CONTEXT2D");this.context=i,this.config.dragEnabled&&(this.hammer=new li(this.canvas),this.hammer.on("pan",this.onPan),this.hammer.on("panend",this.onPanEnd)),this.initStyle()}getCurrentState(){return this.state}dispose(){var t;this.clear(),this.disable(),(t=this.hammer)==null||t.destroy()}show(){return this.canvas.style.visibility="visible",this}hide(){return this.canvas.style.visibility="hidden",this}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){return this.containerDom&&Array.from(this.containerDom.children).includes(this.canvas)&&this.containerDom.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,i=this.renderCenter.clone().project(this.five.camera),s=(i.x+1)/2*this.containerDom.clientWidth,o=-(i.x-1)/2*this.containerDom.clientWidth,r=-(i.y-1)/2*this.containerDom.clientHeight;s<183?(this.canvas.style.top=-e/2+"px",this.canvas.style.left="90px"):r<183?(this.canvas.style.top="90px",this.canvas.style.left=-t/2+"px"):o<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(${s}px, ${r}px, 10px)`,this.offset={x:s,y:r}}render(){if(!this.five.renderer||!this.containerDom)return;const{scale:t,context:e,width:i,height:s}=this,o=this.renderCenter.clone().project(this.five.camera),r=this.five.renderer.getSize(new k.Vector2),a=1,l=i/t,c=s/t,d=a*t,h=(o.x+1)/2*r.x,f=(o.y+1)/2*r.y,m=this.five.getPixels(h-l/2,f-l/2,l,c,d),A=Math.floor(i*a),p=Math.floor(s*a);Am(m,A,p);const g=new ImageData(A,p);g.data.set(m),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)",t.style.visibility="visible",this.config.dragEnabled&&(this.canvas.style.cursor="pointer")}};function vm(n,t){const{offsetWidth:e,offsetHeight:i}=t,{top:s,left:o}=t.getBoundingClientRect();return new k.Vector2().set((n.x-o)/e*2-1,-(n.y-s)/i*2+1)}function Cl(n,t){const{offsetWidth:e,offsetHeight:i}=t;return new k.Vector2().set(n.x/e*2-1,-n.y/i*2+1)}function bm(n,t){const e=n.getElement();if(!e)return;const i=Cl(t,e),s=new k.Raycaster;return s.setFromCamera(i,n.camera),s}function Il(n,t){const{x:e,y:i}=t,s=e*2-1,o=i*2-1,r=new k.Vector2().fromArray([s,o]),a=new k.Raycaster;return a.setFromCamera(r,n.camera),n.model.intersectRaycaster(a)[0]}const ym="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAbYAAAGwCAYAAADFUEBtAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAABtqADAAQAAAABAAABsAAAAABTZ8U6AAAtiklEQVR4Ae2dAXJbSbJdp+d7AfYSHOGVeAPek5fkNXgLjviLmRkZl+CRbtc8UBKRRalZpyIesiorMx/eIcjb+QCh//Y3hwQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQ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jsJKGw76Vr7NAIRMkQrc8bVvH3EaSUggQECCtsAREtI4JVAC1u/p7YCemtvjXUtAQn8JAGF7SeBGS6BNwjkW0f+/rof8boaVx3dVZw+CUjgnQQUtneCM00CFwS6Y7vY/uqyY/uKwokE5gkobPNMrXguAd43i23x6u5t3TuXllcugU0EFLZNYC17JIGIVosbEPD1evWxp5WABJ4koLA9CdB0CRQBhI1u7apTq3CnEpDADgIK2w6q1jyVQH8wJKLGunnYqTUN5xLYQEBh2wDVkscSaNF6mf/xxx9fbuNm7vZYMl64BCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQn8NQn8fyHnyuSABiy2AAAAAElFTkSuQmCC",wm=`
102
102
  varying vec2 vUv;
103
103
  void main() {
104
104
  vUv = uv;
@@ -174,7 +174,7 @@ void main() {
174
174
  <div class='range-piece__content'></div>
175
175
  <div class="range-piece__aim"></div>
176
176
  </div>
177
- `;class Ml{constructor(t){u(this,"five");u(this,"contentElement",document.createElement("div"));u(this,"animeIns");u(this,"container");u(this,"css3DObject");u(this,"disposeCss3DObject");u(this,"state",{enabled:!1});this.five=t;const i=.4/2,o=Bs(t).create3DDomContainer([[-i,i,0],[-i,-i,0],[i,-i,0],[i,i,0]].map(r=>new k.Vector3().fromArray(r)));if(o){const{container:r,dispose:a,css3DObject:l}=o;this.container=r,this.css3DObject=l,this.disposeCss3DObject=a}this.contentElement.style.width="100%",this.contentElement.style.height="100%",this.contentElement.style.backgroundImage=`url(${kl})`,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 k.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 Di({progress:0}).to({progress:[1,0]}).duration(500).easing(St.Quadratic.InOut).onUpdate(({progress:e})=>{}).play()}dispose(){var t;(t=this.disposeCss3DObject)==null||t.call(this)}}class El{constructor(t,e){u(this,"five");u(this,"hooks",new Ae.Subscribe);u(this,"position");u(this,"magnifier",null);u(this,"pointHelper",null);u(this,"pointDomHelper",null);u(this,"state",{enabled:!1,visible:!0});u(this,"group",new k.Group);u(this,"show",()=>{this.state.visible||(this.state.visible=!0,this.pointHelper.visible=!0,this.pointDomHelper.enable(),this.magnifier.show(),this.five.needsRender=!0)});u(this,"hide",()=>{this.state.visible&&(this.state.visible=!1,this.pointHelper.visible=!1,this.pointDomHelper.disable(),this.magnifier.hide(),this.five.needsRender=!0)});u(this,"updateWithIntersect",(t,e={emitEvent:!0})=>{var s;this.abortUpdateMagnifier(),this.position=t,e.emitEvent&&this.hooks.emit("intersectionUpdate",t),this.pointHelper.updateWithIntersect(t),(s=this.pointDomHelper)==null||s.updateWithIntersect(t);const i=()=>this.magnifier.renderWithPoint(t.point);this.abortUpdateMagnifier=()=>this.five.off("renderFrame",i),this.five.once("renderFrame",i),this.five.needsRender=!0});u(this,"abortUpdateMagnifier",()=>{});var i,s;this.five=t,this.magnifier=(e==null?void 0:e.magnifier)!==void 0?e.magnifier:new Zo(t,(i=e==null?void 0:e.magnifierParams)!=null?i:{dragEnabled:!0}),this.pointHelper=(e==null?void 0:e.pointHelper)!==void 0?e.pointHelper:new Pl,this.pointDomHelper=(e==null?void 0:e.pointDomHelper)!==void 0?e.pointDomHelper:new Ml(t),this.group.name="five-point-selector",this.five.scene.add(this.group),this.magnifier.appendTo((s=e.container)!=null?s:document.body)}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}}class Dl extends k.Object3D{constructor(){super(...arguments);u(this,"children",[])}getRaycastIntersects(e){const i=[];return this.raycast(e,i),i}getRaycastIntersection(e){return this.getRaycastIntersects(e)[0]}}class xl extends G.LineSegments{constructor(t,e){super(t,e)}}function Sl(n){return!jt(n)}function jt(n){return n!=null}function Ll(n){return/^https?:\/\/|^\/\//.test(n)||/^data:/.test(n)}function Jo(n,t){return Ll(t)?t:`${n}${t}`}class Di extends Ds{constructor(){super(...arguments);u(this,"disposeMethods",[]);u(this,"animationFrameDisposer");u(this,"onDispose",e=>(this.disposeMethods.push(e),this));u(this,"play",()=>{var e;return this.start(0),(e=this.animationFrameDisposer)==null||e.call(this),this.animationFrameDisposer=nn(i=>this.update(i)),this});u(this,"stop",()=>{var e;return super.stop(),(e=this.animationFrameDisposer)==null||e.call(this),this});u(this,"dispose",()=>{var e;this.stop(),(e=this.animationFrameDisposer)==null||e.call(this),this.disposeMethods.forEach(i=>i()),this.disposeMethods=[],fl(this)})}}function tn(n,t=St.Linear.None){const e=new Di({progress:0}).to({progress:1});return n!==void 0&&e.duration(n),t!==void 0&&e.easing(t),e}const Un=window.requestAnimationFrame||(n=>setTimeout(n,16)),Em=window.cancelAnimationFrame||clearTimeout;function js(n,t=0){t<=0?Un(n):Un(()=>js(n,t-1))}function nn(n,t=60){let e=-1,i=0,s=-1;const o=1e3/t;function r(a){s===-1&&(s=a),e=Un(r),!(a-i<o)&&(i=a,n==null||n(a-s))}return e=Un(r),function(){Em(e)}}function Dm(){const n=Date.now();return new Promise(t=>{Un(()=>{t(Date.now()-n)})})}function zs(n){return Object.prototype.toString.call(n)==="[object Object]"}function Os(n,t){return n===t?!0:typeof n!=typeof t?!1:!!(Number.isNaN(n)&&Number.isNaN(t))}function xm(n,t){const e=Object.getOwnPropertyNames(n),i=Object.getOwnPropertyNames(t);if(e.length!==i.length)return!1;for(let s=0,o=e.length;s<o;s++){const r=e[s];if(!Os(n[r],t[r]))return!1}return!0}function Sm(n,t){if(n.length!==t.length)return!1;for(let e=0,i=n.length;e<i;e++)if(!Os(n[e],t[e]))return!1;return!0}function Lm(n,t){return Os(n,t)?!0:zs(n)&&zs(t)?xm(n,t):Array.isArray(n)&&Array.isArray(t)?Sm(n,t):!1}function qo(n,t){return Os(n,t)?!0:zs(n)&&zs(t)?jm(n,t):Array.isArray(n)&&Array.isArray(t)?Tm(n,t):!1}function Tm(n,t){if(n.length!==t.length)return!1;for(let e=0,i=n.length;e<i;e++)if(!qo(n[e],t[e]))return!1;return!0}function jm(n,t){const e=Object.getOwnPropertyNames(n),i=Object.getOwnPropertyNames(t);if(e.length!==i.length)return!1;for(let s=0,o=e.length;s<o;s++){const r=e[s];if(!qo(n[r],t[r]))return!1}return!0}function ct(n,t,e={deep:!1}){return e.deep?qo(n,t):Lm(n,t)}const zm=Object.freeze(Object.defineProperty({__proto__:null,BetterTween:Di,Interval:Xo,LineSegments:xl,Magnifier:Zo,Object3D:Dl,PointDomHelper:Ml,PointHelper:Pl,PointSelectorHelper:El,Rectangle:gm,absoluteUrl:Jo,checkFiveModelLoaded:pm,equal:ct,getCoordsFromClient:vm,getCoordsFromElement:Cl,getFrameTime:Dm,getIntersectFromRelativePosition:Il,getRaycasterFromFivePointer:bm,isAbsoluteURL:Ll,isModelLike:en,isNil:Sl,isPanoramaLike:Tt,nextFrame:js,notNil:jt,requestAnimationFrameInterval:nn,tweenProgress:tn,uuid:nt},Symbol.toStringTag,{value:"Module"})),Tl="v2.0.1",Ko=`CSS3DRenderPlugin@${Tl}`;let Om=class extends $i{constructor(e){super();u(this,"five");u(this,"behindFiveContainer");u(this,"VERSION",Tl);u(this,"staticPrefix","//vr-image-4.realsee-cdn.cn");u(this,"create3DDomContainer",(e,i)=>{if(this.state.disposed)return;const s=(()=>{var h;(i==null?void 0:i.dpr)!==void 0&&console.warn(`${Ko}: please use "config.devicePixelRatio" replace "config.dpr"`);const d={ratio:.00216,devicePixelRatio:(h=i==null?void 0:i.dpr)!=null?h:1,mode:"front",autoRender:!0,wrapperStyle:{}};return Object.assign(d,i,(i==null?void 0:i.mode)==="behind"?{scene:this.five.scene}:void 0)})(),o=this.five.getElement();if(!o){console.error(`${Ko}: five.getElement() is ${o}`);return}const{autoRender:r}=s;s.mode==="behind"&&s.behindFiveContainer&&(this.behindFiveContainer=s.behindFiveContainer);const a=this.create3DElement(this.five.camera,e,ge(V({},s),{autoRender:!1}));if(!a)return;const l=()=>{const d=a.css3DObject.mode==="front"?o.parentElement:this.getBehindFiveElement();if(!d)return console.error(`${Ko}: wrapper is ${d}`);a.appendToElement(d),a.render()},c=()=>{a.css3DObject.mode==="front"&&l(),a.css3DObject.mode==="behind"&&yl(this.five).then(()=>l())};return r&&c(),ge(V({},a),{render:r?void 0:c})});this.five=e}disposeAll(){return this.dispose()}setState(...e){const i=super.setState(...e);return this.five.needsRender=!0,i}getBehindFiveElement(){return this.behindFiveContainer?this.behindFiveContainer:(this.behindFiveContainer=wl(this.five),this.behindFiveContainer)}absoluteUrl(e){return Jo(this.staticPrefix,e)}};const $o=n=>new Om(n),Bs=$o;function er(n,t,e=new G.Vector3(1,1,1),i=!1){const s=new Is.Line(n,t);return s.setMaterial({dashed:i,color:e,linewidth:1}),s.remove(s.points),s}const Bm=n=>{const t={intersection:null,disposers:[]},e=d=>{t.intersection=d},i=()=>{t.intersection=null};n.on("modelLoaded",()=>{n.on("intersectionOnModelUpdate",e),n.on("intersectionHidden",i)}),n.on("dispose",()=>{n.off("intersectionOnModelUpdate",e),n.off("intersectionHidden",i)});const s=(d,h=2,f=.1)=>{const m=h/2,p=c(d,f),g=new G.Group;g.add(er(new G.Vector3(p.x+m,p.y,p.z),new G.Vector3(p.x-m,p.y,p.z),new G.Vector3(1,0,0)),er(new G.Vector3(p.x,p.y+m,p.z),new G.Vector3(p.x,p.y-m,p.z),new G.Vector3(0,1,0)),er(new G.Vector3(p.x,p.y,p.z+m),new G.Vector3(p.x,p.y,p.z-m),new G.Vector3(0,0,1))),n.scene.add(g),n.needsRender=!0;const v=()=>{n.scene.remove(g)};return t.disposers.push(v),{clear:v,pointAxesHelperMesh:g}},o=(d,h=0)=>{var v,y;const f=(v=n==null?void 0:n.camera)==null?void 0:v.position;if(!f)return!1;const m=d.distanceTo(f),A=d.sub(f).normalize(),p=new G.Raycaster(f,A),g=(y=n.model.intersectRaycaster(p))==null?void 0:y[0];return!(g&&g.distance+h<m)},r=()=>t.intersection,a=()=>{var d,h;(h=(d=t.disposers)==null?void 0:d.forEach)==null||h.call(d,f=>f==null?void 0:f()),n.off("intersectionOnModelUpdate",e),n.off("intersectionHidden",i)},l=a,c=(d,h)=>{const f=d.clone();return n.camera.position.clone().sub(f).setLength(h).add(f)};return{intersection:r,pointAxesHelper:s,movePointTowardsCamera:c,destroy:a,dispose:l,canSeePoint:o}};function J(){}const ei=n=>n;function st(n,t){for(const e in t)n[e]=t[e];return n}function Vm(n){return!!n&&(typeof n=="object"||typeof n=="function")&&typeof n.then=="function"}function jl(n){return n()}function zl(){return Object.create(null)}function Xe(n){n.forEach(jl)}function Ft(n){return typeof n=="function"}function ae(n,t){return n!=n?t==t:n!==t||n&&typeof n=="object"||typeof n=="function"}let Vs;function et(n,t){return Vs||(Vs=document.createElement("a")),Vs.href=t,n===Vs.href}function Rm(n){return Object.keys(n).length===0}function sn(n,t,e,i){if(n){const s=Ol(n,t,e,i);return n[0](s)}}function Ol(n,t,e,i){return n[1]&&i?st(e.ctx.slice(),n[1](i(t))):e.ctx}function on(n,t,e,i){if(n[2]&&i){const s=n[2](i(e));if(t.dirty===void 0)return s;if(typeof s=="object"){const o=[],r=Math.max(t.dirty.length,s.length);for(let a=0;a<r;a+=1)o[a]=t.dirty[a]|s[a];return o}return t.dirty|s}return t.dirty}function rn(n,t,e,i,s,o){if(s){const r=Ol(t,e,i,o);n.p(r,s)}}function an(n){if(n.ctx.length>32){const t=[],e=n.ctx.length/32;for(let i=0;i<e;i++)t[i]=-1;return t}return-1}function Ge(n){return n==null?"":n}function zt(n){return n&&Ft(n.destroy)?n.destroy:J}function Bl(n){const t=typeof n=="string"&&n.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return t?[parseFloat(t[1]),t[2]||"px"]:[n,"px"]}const Vl=typeof window!="undefined";let tr=Vl?()=>window.performance.now():()=>Date.now(),ir=Vl?n=>requestAnimationFrame(n):J;const ln=new Set;function Rl(n){ln.forEach(t=>{t.c(n)||(ln.delete(t),t.f())}),ln.size!==0&&ir(Rl)}function nr(n){let t;return ln.size===0&&ir(Rl),{promise:new Promise(e=>{ln.add(t={c:n,f:e})}),abort(){ln.delete(t)}}}function L(n,t){n.appendChild(t)}function me(n,t,e){const i=sr(n);if(!i.getElementById(t)){const s=x("style");s.id=t,s.textContent=e,Ql(i,s)}}function sr(n){if(!n)return document;const t=n.getRootNode?n.getRootNode():n.ownerDocument;return t&&t.host?t:n.ownerDocument}function Qm(n){const t=x("style");return Ql(sr(n),t),t.sheet}function Ql(n,t){return L(n.head||n,t),t.sheet}function O(n,t,e){n.insertBefore(t,e||null)}function j(n){n.parentNode&&n.parentNode.removeChild(n)}function Ot(n,t){for(let e=0;e<n.length;e+=1)n[e]&&n[e].d(t)}function x(n){return document.createElement(n)}function Oe(n){return document.createElementNS("http://www.w3.org/2000/svg",n)}function De(n){return document.createTextNode(n)}function K(){return De(" ")}function Ie(){return De("")}function be(n,t,e,i){return n.addEventListener(t,e,i),()=>n.removeEventListener(t,e,i)}function Gl(n){return function(t){return t.stopPropagation(),n.call(this,t)}}function w(n,t,e){e==null?n.removeAttribute(t):n.getAttribute(t)!==e&&n.setAttribute(t,e)}function Gm(n){return Array.from(n.childNodes)}function Se(n,t){t=""+t,n.data!==t&&(n.data=t)}function S(n,t,e,i){e===null?n.style.removeProperty(t):n.style.setProperty(t,e,i?"important":"")}let Rs;function Nm(){if(Rs===void 0){Rs=!1;try{typeof window!="undefined"&&window.parent&&window.parent.document}catch(n){Rs=!0}}return Rs}function or(n,t){getComputedStyle(n).position==="static"&&(n.style.position="relative");const i=x("iframe");i.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;"),i.setAttribute("aria-hidden","true"),i.tabIndex=-1;const s=Nm();let o;return s?(i.src="data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\/script>",o=be(window,"message",r=>{r.source===i.contentWindow&&t()})):(i.src="about:blank",i.onload=()=>{o=be(i.contentWindow,"resize",t),t()}),L(n,i),()=>{(s||o&&i.contentWindow)&&o(),j(i)}}function $(n,t,e){n.classList[e?"add":"remove"](t)}function Nl(n,t,{bubbles:e=!1,cancelable:i=!1}={}){const s=document.createEvent("CustomEvent");return s.initCustomEvent(n,e,i,t),s}class Qs{constructor(t=!1){this.is_svg=!1,this.is_svg=t,this.e=this.n=null}c(t){this.h(t)}m(t,e,i=null){this.e||(this.is_svg?this.e=Oe(e.nodeName):this.e=x(e.nodeType===11?"TEMPLATE":e.nodeName),this.t=e.tagName!=="TEMPLATE"?e:e.content,this.c(t)),this.i(i)}h(t){this.e.innerHTML=t,this.n=Array.from(this.e.nodeName==="TEMPLATE"?this.e.content.childNodes:this.e.childNodes)}i(t){for(let e=0;e<this.n.length;e+=1)O(this.t,this.n[e],t)}p(t){this.d(),this.h(t),this.i(this.a)}d(){this.n.forEach(j)}}const Gs=new Map;let Ns=0;function Fm(n){let t=5381,e=n.length;for(;e--;)t=(t<<5)-t^n.charCodeAt(e);return t>>>0}function _m(n,t){const e={stylesheet:Qm(t),rules:{}};return Gs.set(n,e),e}function Fs(n,t,e,i,s,o,r,a=0){const l=16.666/i;let c=`{
177
+ `;class Ml{constructor(t){u(this,"five");u(this,"contentElement",document.createElement("div"));u(this,"animeIns");u(this,"container");u(this,"css3DObject");u(this,"disposeCss3DObject");u(this,"state",{enabled:!1});this.five=t;const i=.4/2,o=Bs(t).create3DDomContainer([[-i,i,0],[-i,-i,0],[i,-i,0],[i,i,0]].map(r=>new k.Vector3().fromArray(r)));if(o){const{container:r,dispose:a,css3DObject:l}=o;this.container=r,this.css3DObject=l,this.disposeCss3DObject=a}this.contentElement.style.width="100%",this.contentElement.style.height="100%",this.contentElement.style.backgroundImage=`url(${kl})`,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 k.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 Di({progress:0}).to({progress:[1,0]}).duration(500).easing(St.Quadratic.InOut).onUpdate(({progress:e})=>{}).play()}dispose(){var t;(t=this.disposeCss3DObject)==null||t.call(this)}}class El{constructor(t,e){u(this,"five");u(this,"hooks",new Ae.Subscribe);u(this,"position");u(this,"magnifier",null);u(this,"pointHelper",null);u(this,"pointDomHelper",null);u(this,"state",{enabled:!1,visible:!0});u(this,"group",new k.Group);u(this,"show",()=>{this.state.visible||(this.state.visible=!0,this.pointHelper.visible=!0,this.pointDomHelper.enable(),this.magnifier.show(),this.five.needsRender=!0)});u(this,"hide",()=>{this.state.visible&&(this.state.visible=!1,this.pointHelper.visible=!1,this.pointDomHelper.disable(),this.magnifier.hide(),this.five.needsRender=!0)});u(this,"updateWithIntersect",(t,e={emitEvent:!0})=>{var s;this.abortUpdateMagnifier(),this.position=t,e.emitEvent&&this.hooks.emit("intersectionUpdate",t),this.pointHelper.updateWithIntersect(t),(s=this.pointDomHelper)==null||s.updateWithIntersect(t);const i=()=>this.magnifier.renderWithPoint(t.point);this.abortUpdateMagnifier=()=>this.five.off("renderFrame",i),this.five.once("renderFrame",i),this.five.needsRender=!0});u(this,"abortUpdateMagnifier",()=>{});var i,s;this.five=t,this.magnifier=(e==null?void 0:e.magnifier)!==void 0?e.magnifier:new Zo(t,(i=e==null?void 0:e.magnifierParams)!=null?i:{dragEnabled:!0}),this.pointHelper=(e==null?void 0:e.pointHelper)!==void 0?e.pointHelper:new Pl,this.pointDomHelper=(e==null?void 0:e.pointDomHelper)!==void 0?e.pointDomHelper:new Ml(t),this.group.name="five-point-selector",this.five.scene.add(this.group),this.magnifier.appendTo((s=e.container)!=null?s:document.body)}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}}class Dl extends k.Object3D{constructor(){super(...arguments);u(this,"children",[])}getRaycastIntersects(e){const i=[];return this.raycast(e,i),i}getRaycastIntersection(e){return this.getRaycastIntersects(e)[0]}}class xl extends G.LineSegments{constructor(t,e){super(t,e)}}function Sl(n){return!jt(n)}function jt(n){return n!=null}function Ll(n){return/^https?:\/\/|^\/\//.test(n)||/^data:/.test(n)}function Jo(n,t){return Ll(t)?t:`${n}${t}`}class Di extends Ds{constructor(){super(...arguments);u(this,"disposeMethods",[]);u(this,"animationFrameDisposer");u(this,"onDispose",e=>(this.disposeMethods.push(e),this));u(this,"play",()=>{var e;return this.start(0),(e=this.animationFrameDisposer)==null||e.call(this),this.animationFrameDisposer=nn(i=>this.update(i)),this});u(this,"stop",()=>{var e;return super.stop(),(e=this.animationFrameDisposer)==null||e.call(this),this});u(this,"dispose",()=>{var e;this.stop(),(e=this.animationFrameDisposer)==null||e.call(this),this.disposeMethods.forEach(i=>i()),this.disposeMethods=[],fl(this)})}}function tn(n,t=St.Linear.None){const e=new Di({progress:0}).to({progress:1});return n!==void 0&&e.duration(n),t!==void 0&&e.easing(t),e}const Un=window.requestAnimationFrame||(n=>setTimeout(n,16)),Em=window.cancelAnimationFrame||clearTimeout;function js(n,t=0){t<=0?Un(n):Un(()=>js(n,t-1))}function nn(n,t=60){let e=-1,i=0,s=-1;const o=1e3/t;function r(a){s===-1&&(s=a),e=Un(r),!(a-i<o)&&(i=a,n==null||n(a-s))}return e=Un(r),function(){Em(e)}}function Dm(){const n=Date.now();return new Promise(t=>{Un(()=>{t(Date.now()-n)})})}function zs(n){return Object.prototype.toString.call(n)==="[object Object]"}function Os(n,t){return n===t?!0:typeof n!=typeof t?!1:!!(Number.isNaN(n)&&Number.isNaN(t))}function xm(n,t){const e=Object.getOwnPropertyNames(n),i=Object.getOwnPropertyNames(t);if(e.length!==i.length)return!1;for(let s=0,o=e.length;s<o;s++){const r=e[s];if(!Os(n[r],t[r]))return!1}return!0}function Sm(n,t){if(n.length!==t.length)return!1;for(let e=0,i=n.length;e<i;e++)if(!Os(n[e],t[e]))return!1;return!0}function Lm(n,t){return Os(n,t)?!0:zs(n)&&zs(t)?xm(n,t):Array.isArray(n)&&Array.isArray(t)?Sm(n,t):!1}function qo(n,t){return Os(n,t)?!0:zs(n)&&zs(t)?jm(n,t):Array.isArray(n)&&Array.isArray(t)?Tm(n,t):!1}function Tm(n,t){if(n.length!==t.length)return!1;for(let e=0,i=n.length;e<i;e++)if(!qo(n[e],t[e]))return!1;return!0}function jm(n,t){const e=Object.getOwnPropertyNames(n),i=Object.getOwnPropertyNames(t);if(e.length!==i.length)return!1;for(let s=0,o=e.length;s<o;s++){const r=e[s];if(!qo(n[r],t[r]))return!1}return!0}function ct(n,t,e={deep:!1}){return e.deep?qo(n,t):Lm(n,t)}const zm=Object.freeze(Object.defineProperty({__proto__:null,BetterTween:Di,Interval:Xo,LineSegments:xl,Magnifier:Zo,Object3D:Dl,PointDomHelper:Ml,PointHelper:Pl,PointSelectorHelper:El,Rectangle:gm,absoluteUrl:Jo,checkFiveModelLoaded:pm,equal:ct,getCoordsFromClient:vm,getCoordsFromElement:Cl,getFrameTime:Dm,getIntersectFromRelativePosition:Il,getRaycasterFromFivePointer:bm,isAbsoluteURL:Ll,isModelLike:en,isNil:Sl,isPanoramaLike:Tt,nextFrame:js,notNil:jt,requestAnimationFrameInterval:nn,tweenProgress:tn,uuid:et},Symbol.toStringTag,{value:"Module"})),Tl="v2.0.1",Ko=`CSS3DRenderPlugin@${Tl}`;let Om=class extends $i{constructor(e){super();u(this,"five");u(this,"behindFiveContainer");u(this,"VERSION",Tl);u(this,"staticPrefix","//vr-image-4.realsee-cdn.cn");u(this,"create3DDomContainer",(e,i)=>{if(this.state.disposed)return;const s=(()=>{var h;(i==null?void 0:i.dpr)!==void 0&&console.warn(`${Ko}: please use "config.devicePixelRatio" replace "config.dpr"`);const d={ratio:.00216,devicePixelRatio:(h=i==null?void 0:i.dpr)!=null?h:1,mode:"front",autoRender:!0,wrapperStyle:{}};return Object.assign(d,i,(i==null?void 0:i.mode)==="behind"?{scene:this.five.scene}:void 0)})(),o=this.five.getElement();if(!o){console.error(`${Ko}: five.getElement() is ${o}`);return}const{autoRender:r}=s;s.mode==="behind"&&s.behindFiveContainer&&(this.behindFiveContainer=s.behindFiveContainer);const a=this.create3DElement(this.five.camera,e,ge(V({},s),{autoRender:!1}));if(!a)return;const l=()=>{const d=a.css3DObject.mode==="front"?o.parentElement:this.getBehindFiveElement();if(!d)return console.error(`${Ko}: wrapper is ${d}`);a.appendToElement(d),a.render()},c=()=>{a.css3DObject.mode==="front"&&l(),a.css3DObject.mode==="behind"&&yl(this.five).then(()=>l())};return r&&c(),ge(V({},a),{render:r?void 0:c})});this.five=e}disposeAll(){return this.dispose()}setState(...e){const i=super.setState(...e);return this.five.needsRender=!0,i}getBehindFiveElement(){return this.behindFiveContainer?this.behindFiveContainer:(this.behindFiveContainer=wl(this.five),this.behindFiveContainer)}absoluteUrl(e){return Jo(this.staticPrefix,e)}};const $o=n=>new Om(n),Bs=$o;function er(n,t,e=new G.Vector3(1,1,1),i=!1){const s=new Is.Line(n,t);return s.setMaterial({dashed:i,color:e,linewidth:1}),s.remove(s.points),s}const Bm=n=>{const t={intersection:null,disposers:[]},e=d=>{t.intersection=d},i=()=>{t.intersection=null};n.on("modelLoaded",()=>{n.on("intersectionOnModelUpdate",e),n.on("intersectionHidden",i)}),n.on("dispose",()=>{n.off("intersectionOnModelUpdate",e),n.off("intersectionHidden",i)});const s=(d,h=2,f=.1)=>{const m=h/2,p=c(d,f),g=new G.Group;g.add(er(new G.Vector3(p.x+m,p.y,p.z),new G.Vector3(p.x-m,p.y,p.z),new G.Vector3(1,0,0)),er(new G.Vector3(p.x,p.y+m,p.z),new G.Vector3(p.x,p.y-m,p.z),new G.Vector3(0,1,0)),er(new G.Vector3(p.x,p.y,p.z+m),new G.Vector3(p.x,p.y,p.z-m),new G.Vector3(0,0,1))),n.scene.add(g),n.needsRender=!0;const v=()=>{n.scene.remove(g)};return t.disposers.push(v),{clear:v,pointAxesHelperMesh:g}},o=(d,h=0)=>{var v,y;const f=(v=n==null?void 0:n.camera)==null?void 0:v.position;if(!f)return!1;const m=d.distanceTo(f),A=d.sub(f).normalize(),p=new G.Raycaster(f,A),g=(y=n.model.intersectRaycaster(p))==null?void 0:y[0];return!(g&&g.distance+h<m)},r=()=>t.intersection,a=()=>{var d,h;(h=(d=t.disposers)==null?void 0:d.forEach)==null||h.call(d,f=>f==null?void 0:f()),n.off("intersectionOnModelUpdate",e),n.off("intersectionHidden",i)},l=a,c=(d,h)=>{const f=d.clone();return n.camera.position.clone().sub(f).setLength(h).add(f)};return{intersection:r,pointAxesHelper:s,movePointTowardsCamera:c,destroy:a,dispose:l,canSeePoint:o}};function J(){}const ei=n=>n;function st(n,t){for(const e in t)n[e]=t[e];return n}function Vm(n){return!!n&&(typeof n=="object"||typeof n=="function")&&typeof n.then=="function"}function jl(n){return n()}function zl(){return Object.create(null)}function Xe(n){n.forEach(jl)}function Ft(n){return typeof n=="function"}function ae(n,t){return n!=n?t==t:n!==t||n&&typeof n=="object"||typeof n=="function"}let Vs;function tt(n,t){return Vs||(Vs=document.createElement("a")),Vs.href=t,n===Vs.href}function Rm(n){return Object.keys(n).length===0}function sn(n,t,e,i){if(n){const s=Ol(n,t,e,i);return n[0](s)}}function Ol(n,t,e,i){return n[1]&&i?st(e.ctx.slice(),n[1](i(t))):e.ctx}function on(n,t,e,i){if(n[2]&&i){const s=n[2](i(e));if(t.dirty===void 0)return s;if(typeof s=="object"){const o=[],r=Math.max(t.dirty.length,s.length);for(let a=0;a<r;a+=1)o[a]=t.dirty[a]|s[a];return o}return t.dirty|s}return t.dirty}function rn(n,t,e,i,s,o){if(s){const r=Ol(t,e,i,o);n.p(r,s)}}function an(n){if(n.ctx.length>32){const t=[],e=n.ctx.length/32;for(let i=0;i<e;i++)t[i]=-1;return t}return-1}function Ge(n){return n==null?"":n}function zt(n){return n&&Ft(n.destroy)?n.destroy:J}function Bl(n){const t=typeof n=="string"&&n.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return t?[parseFloat(t[1]),t[2]||"px"]:[n,"px"]}const Vl=typeof window!="undefined";let tr=Vl?()=>window.performance.now():()=>Date.now(),ir=Vl?n=>requestAnimationFrame(n):J;const ln=new Set;function Rl(n){ln.forEach(t=>{t.c(n)||(ln.delete(t),t.f())}),ln.size!==0&&ir(Rl)}function nr(n){let t;return ln.size===0&&ir(Rl),{promise:new Promise(e=>{ln.add(t={c:n,f:e})}),abort(){ln.delete(t)}}}function L(n,t){n.appendChild(t)}function me(n,t,e){const i=sr(n);if(!i.getElementById(t)){const s=x("style");s.id=t,s.textContent=e,Ql(i,s)}}function sr(n){if(!n)return document;const t=n.getRootNode?n.getRootNode():n.ownerDocument;return t&&t.host?t:n.ownerDocument}function Qm(n){const t=x("style");return Ql(sr(n),t),t.sheet}function Ql(n,t){return L(n.head||n,t),t.sheet}function O(n,t,e){n.insertBefore(t,e||null)}function j(n){n.parentNode&&n.parentNode.removeChild(n)}function Ot(n,t){for(let e=0;e<n.length;e+=1)n[e]&&n[e].d(t)}function x(n){return document.createElement(n)}function Oe(n){return document.createElementNS("http://www.w3.org/2000/svg",n)}function De(n){return document.createTextNode(n)}function K(){return De(" ")}function Ie(){return De("")}function be(n,t,e,i){return n.addEventListener(t,e,i),()=>n.removeEventListener(t,e,i)}function Gl(n){return function(t){return t.stopPropagation(),n.call(this,t)}}function w(n,t,e){e==null?n.removeAttribute(t):n.getAttribute(t)!==e&&n.setAttribute(t,e)}function Gm(n){return Array.from(n.childNodes)}function Se(n,t){t=""+t,n.data!==t&&(n.data=t)}function S(n,t,e,i){e===null?n.style.removeProperty(t):n.style.setProperty(t,e,i?"important":"")}let Rs;function Nm(){if(Rs===void 0){Rs=!1;try{typeof window!="undefined"&&window.parent&&window.parent.document}catch(n){Rs=!0}}return Rs}function or(n,t){getComputedStyle(n).position==="static"&&(n.style.position="relative");const i=x("iframe");i.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;"),i.setAttribute("aria-hidden","true"),i.tabIndex=-1;const s=Nm();let o;return s?(i.src="data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\/script>",o=be(window,"message",r=>{r.source===i.contentWindow&&t()})):(i.src="about:blank",i.onload=()=>{o=be(i.contentWindow,"resize",t),t()}),L(n,i),()=>{(s||o&&i.contentWindow)&&o(),j(i)}}function $(n,t,e){n.classList[e?"add":"remove"](t)}function Nl(n,t,{bubbles:e=!1,cancelable:i=!1}={}){const s=document.createEvent("CustomEvent");return s.initCustomEvent(n,e,i,t),s}class Qs{constructor(t=!1){this.is_svg=!1,this.is_svg=t,this.e=this.n=null}c(t){this.h(t)}m(t,e,i=null){this.e||(this.is_svg?this.e=Oe(e.nodeName):this.e=x(e.nodeType===11?"TEMPLATE":e.nodeName),this.t=e.tagName!=="TEMPLATE"?e:e.content,this.c(t)),this.i(i)}h(t){this.e.innerHTML=t,this.n=Array.from(this.e.nodeName==="TEMPLATE"?this.e.content.childNodes:this.e.childNodes)}i(t){for(let e=0;e<this.n.length;e+=1)O(this.t,this.n[e],t)}p(t){this.d(),this.h(t),this.i(this.a)}d(){this.n.forEach(j)}}const Gs=new Map;let Ns=0;function Fm(n){let t=5381,e=n.length;for(;e--;)t=(t<<5)-t^n.charCodeAt(e);return t>>>0}function _m(n,t){const e={stylesheet:Qm(t),rules:{}};return Gs.set(n,e),e}function Fs(n,t,e,i,s,o,r,a=0){const l=16.666/i;let c=`{
178
178
  `;for(let g=0;g<=1;g+=l){const v=t+(e-t)*o(g);c+=g*100+`%{${r(v,1-v)}}
179
179
  `}const d=c+`100% {${r(e,1-e)}}
180
180
  }`,h=`__svelte_${Fm(d)}_${a}`,f=sr(n),{stylesheet:m,rules:A}=Gs.get(f)||_m(f,n);A[h]||(A[h]=!0,m.insertRule(`@keyframes ${h} ${d}`,m.cssRules.length));const p=n.style.animation||"";return n.style.animation=`${p?`${p}, `:""}${h} ${i}ms linear ${s}ms 1 both`,Ns+=1,h}function _s(n,t){const e=(n.style.animation||"").split(", "),i=e.filter(t?o=>o.indexOf(t)<0:o=>o.indexOf("__svelte")===-1),s=e.length-i.length;s&&(n.style.animation=i.join(", "),Ns-=s,Ns||Hm())}function Hm(){ir(()=>{Ns||(Gs.forEach(n=>{const{ownerNode:t}=n.stylesheet;t&&j(t)}),Gs.clear())})}let Yn;function ti(n){Yn=n}function hi(){if(!Yn)throw new Error("Function called outside component initialization");return Yn}function Fl(n){hi().$$.before_update.push(n)}function gt(n){hi().$$.on_mount.push(n)}function _l(n){hi().$$.after_update.push(n)}function Mt(n){hi().$$.on_destroy.push(n)}function Hs(){const n=hi();return(t,e,{cancelable:i=!1}={})=>{const s=n.$$.callbacks[t];if(s){const o=Nl(t,e,{cancelable:i});return s.slice().forEach(r=>{r.call(n,o)}),!o.defaultPrevented}return!0}}function rr(n,t){return hi().$$.context.set(n,t),t}function ui(n){return hi().$$.context.get(n)}function cn(n,t){const e=n.$$.callbacks[t.type];e&&e.slice().forEach(i=>i.call(this,t))}const dn=[],Ne=[];let hn=[];const ar=[],Hl=Promise.resolve();let lr=!1;function Wl(){lr||(lr=!0,Hl.then(hr))}function Ul(){return Wl(),Hl}function We(n){hn.push(n)}function cr(n){ar.push(n)}const dr=new Set;let un=0;function hr(){if(un!==0)return;const n=Yn;do{try{for(;un<dn.length;){const t=dn[un];un++,ti(t),Wm(t.$$)}}catch(t){throw dn.length=0,un=0,t}for(ti(null),dn.length=0,un=0;Ne.length;)Ne.pop()();for(let t=0;t<hn.length;t+=1){const e=hn[t];dr.has(e)||(dr.add(e),e())}hn.length=0}while(dn.length);for(;ar.length;)ar.pop()();lr=!1,dr.clear(),ti(n)}function Wm(n){if(n.fragment!==null){n.update(),Xe(n.before_update);const t=n.dirty;n.dirty=[-1],n.fragment&&n.fragment.p(n.ctx,t),n.after_update.forEach(We)}}function Um(n){const t=[],e=[];hn.forEach(i=>n.indexOf(i)===-1?t.push(i):e.push(i)),e.forEach(i=>i()),hn=t}let Xn;function ur(){return Xn||(Xn=Promise.resolve(),Xn.then(()=>{Xn=null})),Xn}function xi(n,t,e){n.dispatchEvent(Nl(`${t?"intro":"outro"}${e}`))}const Ws=new Set;let _t;function he(){_t={r:0,c:[],p:_t}}function ue(){_t.r||Xe(_t.c),_t=_t.p}function D(n,t){n&&n.i&&(Ws.delete(n),n.i(t))}function T(n,t,e,i){if(n&&n.o){if(Ws.has(n))return;Ws.add(n),_t.c.push(()=>{Ws.delete(n),i&&(e&&n.d(1),i())}),n.o(t)}else i&&i()}const fr={duration:0};function Si(n,t,e){const i={direction:"in"};let s=t(n,e,i),o=!1,r,a,l=0;function c(){r&&_s(n,r)}function d(){const{delay:f=0,duration:m=300,easing:A=ei,tick:p=J,css:g}=s||fr;g&&(r=Fs(n,0,1,m,f,A,g,l++)),p(0,1);const v=tr()+f,y=v+m;a&&a.abort(),o=!0,We(()=>xi(n,!0,"start")),a=nr(P=>{if(o){if(P>=y)return p(1,0),xi(n,!0,"end"),c(),o=!1;if(P>=v){const I=A((P-v)/m);p(I,1-I)}}return o})}let h=!1;return{start(){h||(h=!0,_s(n),Ft(s)?(s=s(i),ur().then(d)):d())},invalidate(){h=!1},end(){o&&(c(),o=!1)}}}function fn(n,t,e){const i={direction:"out"};let s=t(n,e,i),o=!0,r;const a=_t;a.r+=1;function l(){const{delay:c=0,duration:d=300,easing:h=ei,tick:f=J,css:m}=s||fr;m&&(r=Fs(n,1,0,d,c,h,m));const A=tr()+c,p=A+d;We(()=>xi(n,!1,"start")),nr(g=>{if(o){if(g>=p)return f(0,1),xi(n,!1,"end"),--a.r||Xe(a.c),!1;if(g>=A){const v=h((g-A)/d);f(1-v,v)}}return o})}return Ft(s)?ur().then(()=>{s=s(i),l()}):l(),{end(c){c&&s.tick&&s.tick(1,0),o&&(r&&_s(n,r),o=!1)}}}function Ht(n,t,e,i){const s={direction:"both"};let o=t(n,e,s),r=i?0:1,a=null,l=null,c=null;function d(){c&&_s(n,c)}function h(m,A){const p=m.b-r;return A*=Math.abs(p),{a:r,b:m.b,d:p,duration:A,start:m.start,end:m.start+A,group:m.group}}function f(m){const{delay:A=0,duration:p=300,easing:g=ei,tick:v=J,css:y}=o||fr,P={start:tr()+A,b:m};m||(P.group=_t,_t.r+=1),a||l?l=P:(y&&(d(),c=Fs(n,r,m,p,A,g,y)),m&&v(0,1),a=h(P,p),We(()=>xi(n,m,"start")),nr(I=>{if(l&&I>l.start&&(a=h(l,p),l=null,xi(n,a.b,"start"),y&&(d(),c=Fs(n,r,a.b,a.duration,0,g,o.css))),a){if(I>=a.end)v(r=a.b,1-r),xi(n,a.b,"end"),l||(a.b?d():--a.group.r||Xe(a.group.c)),a=null;else if(I>=a.start){const E=I-a.start;r=a.a+a.d*g(E/a.duration),v(r,1-r)}}return!!(a||l)}))}return{run(m){Ft(o)?ur().then(()=>{o=o(s),f(m)}):f(m)},end(){d(),a=l=null}}}function Us(n,t){const e=t.token={};function i(s,o,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=s&&(t.current=s)(l);let d=!1;t.block&&(t.blocks?t.blocks.forEach((h,f)=>{f!==o&&h&&(he(),T(h,1,1,()=>{t.blocks[f]===h&&(t.blocks[f]=null)}),ue())}):t.block.d(1),c.c(),D(c,1),c.m(t.mount(),t.anchor),d=!0),t.block=c,t.blocks&&(t.blocks[o]=c),d&&hr()}if(Vm(n)){const s=hi();if(n.then(o=>{ti(s),i(t.then,1,t.value,o),ti(null)},o=>{if(ti(s),i(t.catch,2,t.error,o),ti(null),!t.hasCatch)throw o}),t.current!==t.pending)return i(t.pending,0),!0}else{if(t.current!==t.then)return i(t.then,1,t.value,n),!0;t.resolved=n}}function Yl(n,t,e){const i=t.slice(),{resolved:s}=n;n.current===n.then&&(i[n.value]=s),n.current===n.catch&&(i[n.error]=s),n.block.p(i,e)}const Ym=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global;function mr(n,t){n.d(1),t.delete(n.key)}function fi(n,t){T(n,1,1,()=>{t.delete(n.key)})}function Bt(n,t,e,i,s,o,r,a,l,c,d,h){let f=n.length,m=o.length,A=f;const p={};for(;A--;)p[n[A].key]=A;const g=[],v=new Map,y=new Map,P=[];for(A=m;A--;){const z=h(s,o,A),R=e(z);let U=r.get(R);U?i&&P.push(()=>U.p(z,t)):(U=c(R,z),U.c()),v.set(R,g[A]=U),R in p&&y.set(R,Math.abs(A-p[R]))}const I=new Set,E=new Set;function C(z){D(z,1),z.m(a,d),r.set(z.key,z),d=z.first,m--}for(;f&&m;){const z=g[m-1],R=n[f-1],U=z.key,H=R.key;z===R?(d=z.first,f--,m--):v.has(H)?!r.has(U)||I.has(U)?C(z):E.has(H)?f--:y.get(U)>y.get(H)?(E.add(U),C(z)):(I.add(H),f--):(l(R,r),f--)}for(;f--;){const z=n[f];v.has(z.key)||l(z,r)}for(;m;)C(g[m-1]);return Xe(P),g}function dt(n,t){const e={},i={},s={$$scope:1};let o=n.length;for(;o--;){const r=n[o],a=t[o];if(a){for(const l in r)l in a||(i[l]=1);for(const l in a)s[l]||(e[l]=a[l],s[l]=1);n[o]=a}else for(const l in r)s[l]=1}for(const r in i)r in e||(e[r]=void 0);return e}function Xl(n){return typeof n=="object"&&n!==null?n:{}}function gr(n,t,e){const i=n.$$.props[t];i!==void 0&&(n.$$.bound[i]=e,e(n.$$.ctx[i]))}function oe(n){n&&n.c()}function ne(n,t,e,i){const{fragment:s,after_update:o}=n.$$;s&&s.m(t,e),i||We(()=>{const r=n.$$.on_mount.map(jl).filter(Ft);n.$$.on_destroy?n.$$.on_destroy.push(...r):Xe(r),n.$$.on_mount=[]}),o.forEach(We)}function se(n,t){const e=n.$$;e.fragment!==null&&(Um(e.after_update),Xe(e.on_destroy),e.fragment&&e.fragment.d(t),e.on_destroy=e.fragment=null,e.ctx=[])}function Xm(n,t){n.$$.dirty[0]===-1&&(dn.push(n),Wl(),n.$$.dirty.fill(0)),n.$$.dirty[t/31|0]|=1<<t%31}function le(n,t,e,i,s,o,r,a=[-1]){const l=Yn;ti(n);const c=n.$$={fragment:null,ctx:[],props:o,update:J,not_equal:s,bound:zl(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(l?l.$$.context:[])),callbacks:zl(),dirty:a,skip_bound:!1,root:t.target||l.$$.root};r&&r(c.root);let d=!1;if(c.ctx=e?e(n,t.props||{},(h,f,...m)=>{const A=m.length?m[0]:f;return c.ctx&&s(c.ctx[h],c.ctx[h]=A)&&(!c.skip_bound&&c.bound[h]&&c.bound[h](A),d&&Xm(n,h)),f}):[],c.update(),d=!0,Xe(c.before_update),c.fragment=i?i(c.ctx):!1,t.target){if(t.hydrate){const h=Gm(t.target);c.fragment&&c.fragment.l(h),h.forEach(j)}else c.fragment&&c.fragment.c();t.intro&&D(n.$$.fragment),ne(n,t.target,t.anchor,t.customElement),hr()}ti(l)}class ce{$destroy(){se(this,1),this.$destroy=J}$on(t,e){if(!Ft(e))return J;const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(e),()=>{const s=i.indexOf(e);s!==-1&&i.splice(s,1)}}$set(t){this.$$set&&!Rm(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Zm="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAAA8CAYAAACZ1L+0AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAYKADAAQAAAABAAAAPAAAAABU0H2EAAARRElEQVR4Ad2czY9c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J25s7Fhv8EIraduDDOJI7kfh6FT98M6Ka/GrLbE0/131X79+/YVXX331+tNPP32b3nt1tGhXP/rooz/ruf9N/YzWQ/2e2c8Cfg7Wz8RC9WkeE8pj/rQltMRH/jXdsdreAEp04mg8u22zYhvZ9IPueLE4puMLfnjRKzKCbD4ZHv9oK/mwaPOlm/ukkbFwjKLj428j8t8DEEvN9xJoJuhsDI9lxOeHXr3zE8cGm7fpQMfNgR54ntXmYXzx1ltvbX64VUl4SH//66+/fl2/5ndLC/BHMV/Q6ypN06Bm3lgFaKMcEbj+bDHN88/curvewF4hjhNWasrwhy/0waIPjylyYjp49Ag++NhFhi7F+jeEFcc/H6w5TYbnxo2OoufXmNPcX+XWv4QLMo+taJkfeY4gvtRs/n8vzY/cssxB5CyKxi96/aB+/Y9+KfE/X3vttS8lI7e9/wfu514OAjYP0QAAAABJRU5ErkJggg==";function Jm(n){me(n,"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 qm(n){let t,e,i=n[0].name+"",s,o,r,a,l;return{c(){t=x("div"),e=x("span"),s=De(i),o=K(),r=x("div"),w(e,"class","room-label-item__text svelte-1d7uzh5"),S(e,"background-image","url("+Zm+")"),$(e,"wide",n[0].name.length>3),w(r,"class","room-label-item__bar svelte-1d7uzh5"),w(t,"class","room-label-item svelte-1d7uzh5"),S(t,"z-index",n[0].zIndex),S(t,"transform",n[0].transform),S(t,"opacity",n[0].visible?1:0)},m(c,d){O(c,t,d),L(t,e),L(e,s),L(t,o),L(t,r),a||(l=be(e,"click",n[1]),a=!0)},p(c,[d]){d&1&&i!==(i=c[0].name+"")&&Se(s,i),d&1&&$(e,"wide",c[0].name.length>3),d&1&&S(t,"z-index",c[0].zIndex),d&1&&S(t,"transform",c[0].transform),d&1&&S(t,"opacity",c[0].visible?1:0)},i:J,o:J,d(c){c&&j(t),a=!1,l()}}}function Km(n,t,e){let{five:i}=t,{roomLabel:s}=t;function o(){i.setState({panoIndex:s.panoIndex,mode:"Panorama",longitude:s.longitude})}return n.$$set=r=>{"five"in r&&e(2,i=r.five),"roomLabel"in r&&e(0,s=r.roomLabel)},[s,o,i]}class $m extends ce{constructor(t){super(),le(this,t,Km,qm,ae,{five:2,roomLabel:0},Jm)}}var Zl=function(){if(typeof Map!="undefined")return Map;function n(t,e){var i=-1;return t.some(function(s,o){return s[0]===e?(i=o,!0):!1}),i}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(e){var i=n(this.__entries__,e),s=this.__entries__[i];return s&&s[1]},t.prototype.set=function(e,i){var s=n(this.__entries__,e);~s?this.__entries__[s][1]=i:this.__entries__.push([e,i])},t.prototype.delete=function(e){var i=this.__entries__,s=n(i,e);~s&&i.splice(s,1)},t.prototype.has=function(e){return!!~n(this.__entries__,e)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,i){i===void 0&&(i=null);for(var s=0,o=this.__entries__;s<o.length;s++){var r=o[s];e.call(i,r[1],r[0])}},t}()}(),pr=typeof window!="undefined"&&typeof document!="undefined"&&window.document===document,Ys=function(){return typeof global!="undefined"&&global.Math===Math?global:typeof self!="undefined"&&self.Math===Math?self:typeof window!="undefined"&&window.Math===Math?window:Function("return this")()}(),eg=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(Ys):function(n){return setTimeout(function(){return n(Date.now())},1e3/60)}}(),tg=2;function ig(n,t){var e=!1,i=!1,s=0;function o(){e&&(e=!1,n()),i&&a()}function r(){eg(o)}function a(){var l=Date.now();if(e){if(l-s<tg)return;i=!0}else e=!0,i=!1,setTimeout(r,t);s=l}return a}var ng=20,sg=["top","right","bottom","left","width","height","size","weight"],og=typeof MutationObserver!="undefined",rg=function(){function n(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=ig(this.refresh.bind(this),ng)}return n.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},n.prototype.removeObserver=function(t){var e=this.observers_,i=e.indexOf(t);~i&&e.splice(i,1),!e.length&&this.connected_&&this.disconnect_()},n.prototype.refresh=function(){var t=this.updateObservers_();t&&this.refresh()},n.prototype.updateObservers_=function(){var t=this.observers_.filter(function(e){return e.gatherActive(),e.hasActive()});return t.forEach(function(e){return e.broadcastActive()}),t.length>0},n.prototype.connect_=function(){!pr||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),og?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},n.prototype.disconnect_=function(){!pr||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},n.prototype.onTransitionEnd_=function(t){var e=t.propertyName,i=e===void 0?"":e,s=sg.some(function(o){return!!~i.indexOf(o)});s&&this.refresh()},n.getInstance=function(){return this.instance_||(this.instance_=new n),this.instance_},n.instance_=null,n}(),Jl=function(n,t){for(var e=0,i=Object.keys(t);e<i.length;e++){var s=i[e];Object.defineProperty(n,s,{value:t[s],enumerable:!1,writable:!1,configurable:!0})}return n},mn=function(n){var t=n&&n.ownerDocument&&n.ownerDocument.defaultView;return t||Ys},ql=Zs(0,0,0,0);function Xs(n){return parseFloat(n)||0}function Kl(n){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];return t.reduce(function(i,s){var o=n["border-"+s+"-width"];return i+Xs(o)},0)}function ag(n){for(var t=["top","right","bottom","left"],e={},i=0,s=t;i<s.length;i++){var o=s[i],r=n["padding-"+o];e[o]=Xs(r)}return e}function lg(n){var t=n.getBBox();return Zs(0,0,t.width,t.height)}function cg(n){var t=n.clientWidth,e=n.clientHeight;if(!t&&!e)return ql;var i=mn(n).getComputedStyle(n),s=ag(i),o=s.left+s.right,r=s.top+s.bottom,a=Xs(i.width),l=Xs(i.height);if(i.boxSizing==="border-box"&&(Math.round(a+o)!==t&&(a-=Kl(i,"left","right")+o),Math.round(l+r)!==e&&(l-=Kl(i,"top","bottom")+r)),!hg(n)){var c=Math.round(a+o)-t,d=Math.round(l+r)-e;Math.abs(c)!==1&&(a-=c),Math.abs(d)!==1&&(l-=d)}return Zs(s.left,s.top,a,l)}var dg=function(){return typeof SVGGraphicsElement!="undefined"?function(n){return n instanceof mn(n).SVGGraphicsElement}:function(n){return n instanceof mn(n).SVGElement&&typeof n.getBBox=="function"}}();function hg(n){return n===mn(n).document.documentElement}function ug(n){return pr?dg(n)?lg(n):cg(n):ql}function fg(n){var t=n.x,e=n.y,i=n.width,s=n.height,o=typeof DOMRectReadOnly!="undefined"?DOMRectReadOnly:Object,r=Object.create(o.prototype);return Jl(r,{x:t,y:e,width:i,height:s,top:e,right:t+i,bottom:s+e,left:t}),r}function Zs(n,t,e,i){return{x:n,y:t,width:e,height:i}}var mg=function(){function n(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Zs(0,0,0,0),this.target=t}return n.prototype.isActive=function(){var t=ug(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},n.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},n}(),gg=function(){function n(t,e){var i=fg(e);Jl(this,{target:t,contentRect:i})}return n}(),pg=function(){function n(t,e,i){if(this.activeObservations_=[],this.observations_=new Zl,typeof t!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=i}return n.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(t instanceof mn(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new mg(t)),this.controller_.addObserver(this),this.controller_.refresh())}},n.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(t instanceof mn(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},n.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},n.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(e){e.isActive()&&t.activeObservations_.push(e)})},n.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map(function(i){return new gg(i.target,i.broadcastRect())});this.callback_.call(t,e,t),this.clearActive()}},n.prototype.clearActive=function(){this.activeObservations_.splice(0)},n.prototype.hasActive=function(){return this.activeObservations_.length>0},n}(),$l=typeof WeakMap!="undefined"?new WeakMap:new Zl,ec=function(){function n(t){if(!(this instanceof n))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var e=rg.getInstance(),i=new pg(t,e,this);$l.set(this,i)}return n}();["observe","unobserve","disconnect"].forEach(function(n){ec.prototype[n]=function(){var t;return(t=$l.get(this))[n].apply(t,arguments)}});var Ag=function(){return typeof Ys.ResizeObserver!="undefined"?Ys.ResizeObserver:ec}();function mi(n){new Ag((e,i)=>{var s,o,r,a,l,c;for(const d of e){const{borderBoxSize:h,contentRect:f}=d,m=(r=(o=(s=h==null?void 0:h[0])==null?void 0:s.inlineSize)!=null?o:f.width)!=null?r:n.clientWidth,A=(c=(l=(a=h==null?void 0:h[0])==null?void 0:a.blockSize)!=null?l:f.height)!=null?c:n.clientHeight;n.dispatchEvent(new CustomEvent("clientWidth",{detail:m})),n.dispatchEvent(new CustomEvent("clientHeight",{detail:A}))}}).observe(n)}const{Map:vg}=Ym;function bg(n){me(n,"svelte-9eg4zi",".room-labels-container.svelte-9eg4zi{width:100%;height:100%;position:relative;color:#fff}")}function tc(n,t,e){const i=n.slice();return i[13]=t[e],i}function ic(n,t){let e,i,s;return i=new $m({props:{roomLabel:t[13],five:t[1]}}),{key:n,first:null,c(){e=Ie(),oe(i.$$.fragment),this.first=e},m(o,r){O(o,e,r),ne(i,o,r),s=!0},p(o,r){t=o;const a={};r&1&&(a.roomLabel=t[13]),r&2&&(a.five=t[1]),i.$set(a)},i(o){s||(D(i.$$.fragment,o),s=!0)},o(o){T(i.$$.fragment,o),s=!1},d(o){o&&j(e),se(i,o)}}}function yg(n){let t,e=[],i=new vg,s,o,r,a=n[0];const l=c=>c[13].id;for(let c=0;c<a.length;c+=1){let d=tc(n,a,c),h=l(d);i.set(h,e[c]=ic(h,d))}return{c(){t=x("div");for(let c=0;c<e.length;c+=1)e[c].c();w(t,"class","room-labels-container svelte-9eg4zi")},m(c,d){O(c,t,d);for(let h=0;h<e.length;h+=1)e[h]&&e[h].m(t,null);s=!0,o||(r=[zt(mi.call(null,t)),be(t,"clientWidth",n[6]),be(t,"clientHeight",n[7])],o=!0)},p(c,[d]){d&3&&(a=c[0],he(),e=Bt(e,d,l,1,c,a,i,t,fi,ic,null,tc),ue())},i(c){if(!s){for(let d=0;d<a.length;d+=1)D(e[d]);s=!0}},o(c){for(let d=0;d<e.length;d+=1)T(e[d]);s=!1},d(c){c&&j(t);for(let d=0;d<e.length;d+=1)e[d].d();o=!1,Xe(r)}}}function wg(n,t,e){var g;let i,{five:s}=t,{roomLabels:o}=t,r,a,l=(g=s.model.shownFloor)!=null?g:null;function c(v){if(!(l===null||v.floorIndex===l))return!1;const P=new G.Raycaster,I=s.camera.position.clone(),E=new G.Vector3(v.position.x,v.position.y,v.position.z),C=E.distanceTo(I);P.set(I.clone(),E.clone().sub(I).normalize());const[z]=s.model.intersectRaycaster(P);return!(z&&z.distance+1<C)}function d(v,y){const I=new G.Vector3(v.position.x,v.position.y,v.position.z).clone().project(s.camera),E=Math.ceil((I.x+1)/2*y.x),C=Math.ceil((-I.y+1)/2*y.y);return`translate(${E}px, ${C}px)`}function h(v){const{rendererSize:y}=v,P=new Map;function I(C){const z=P.get(C.id);if(z)return z;const{x:R,y:U,z:H}=C.position,N=new G.Vector3(R,U,H).clone().distanceTo(s.camera.position);return P.set(C.id,N),N}return o.map(C=>{const z=c(C),R=z?d(C,y):C.transform,U=I(C),N=o.filter(F=>F.visible&&I(F)<U).length*10;return ge(V({},C),{visible:z,transform:R,zIndex:N})})}function f(){e(0,o=h({rendererSize:i,shownFloor:l}))}function m(v){e(4,l=v)}s.on("cameraUpdate",f),s.on("modelShownFloorChange",m),_l(()=>{e(0,o=h({rendererSize:i,shownFloor:l}))}),Mt(()=>{s.off("cameraUpdate",f),s.off("modelShownFloorChange",m)});const A=v=>{e(2,r=v.detail)},p=v=>{e(3,a=v.detail)};return n.$$set=v=>{"five"in v&&e(1,s=v.five),"roomLabels"in v&&e(0,o=v.roomLabels)},n.$$.update=()=>{n.$$.dirty&12&&e(5,i={x:r,y:a}),n.$$.dirty&48&&e(0,o=h({rendererSize:i,shownFloor:l}))},[o,s,r,a,l,i,A,p]}class Cg extends ce{constructor(t){super(),le(this,t,wg,yg,ae,{five:1,roomLabels:0},bg)}}function Ig(n){return n.model_room_labels.map(({id:t,pano_index:e,floor_index:i,name:s,position:o,longitude:r})=>({id:t,name:s,position:o,longitude:r,panoIndex:e,floorIndex:i,zIndex:0,visible:!1,transform:""}))}class Pg{constructor(t){u(this,"five");u(this,"enabled",!0);u(this,"fiveModeEnabled");u(this,"app");u(this,"wrapper");u(this,"roomLabels",[]);u(this,"container",document.createElement("div"));u(this,"onFiveModeChange",t=>{if(!this.checkFiveMode(t)){this.fiveModeEnabled=!1,this.render();return}this.five.once("initAnimationEnded",()=>{this.fiveModeEnabled=this.checkFiveMode(this.five.getCurrentState().mode),this.render()})});this.five=t,this.fiveModeEnabled=this.checkFiveMode(t.getCurrentState().mode),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=Ig(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}checkFiveMode(t){return t==="Floorplan"||t==="Mapview"}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 Cg({target:this.container,props:{five:this.five,roomLabels:this.roomLabels}})}}}const kg=n=>new Pg(n),Mg={name:"ModelRoomLabelPlugin",version:0};var gi=(n=>(n[n.FLOOR=1]="FLOOR",n[n.CEILING=2]="CEILING",n[n.BOUNDING_CENTER=3]="BOUNDING_CENTER",n))(gi||{});function Li(n){return W(this,null,function*(){try{return[null,yield n]}catch(t){return t instanceof Error?[t,null]:[new Error(""),null]}})}function gn(n){return n<.5?4*n*n*n:.5*Math.pow(2*n-2,3)+1}function nc(n){const t=n-1;return t*t*t+1}function ot(n,{delay:t=0,duration:e=400,easing:i=ei}={}){const s=+getComputedStyle(n).opacity;return{delay:t,duration:e,easing:i,css:o=>`opacity: ${o*s}`}}function sc(n,{delay:t=0,duration:e=400,easing:i=nc,x:s=0,y:o=0,opacity:r=0}={}){const a=getComputedStyle(n),l=+a.opacity,c=a.transform==="none"?"":a.transform,d=l*(1-r),[h,f]=Bl(s),[m,A]=Bl(o);return{delay:t,duration:e,easing:i,css:(p,g)=>`
@@ -182,7 +182,7 @@ void main() {
182
182
  opacity: ${l-d*g}`}}function Js(n,{delay:t=0,speed:e,duration:i,easing:s=gn}={}){let o=n.getTotalLength();const r=getComputedStyle(n);return r.strokeLinecap!=="butt"&&(o+=parseInt(r.strokeWidth)),i===void 0?e===void 0?i=800:i=o/e:typeof i=="function"&&(i=i(o)),{delay:t,duration:i,easing:s,css:(a,l)=>`
183
183
  stroke-dasharray: ${o};
184
184
  stroke-dashoffset: ${l*o};
185
- `}}const pn=[];function Ar(n,t=J){let e;const i=new Set;function s(a){if(ae(n,a)&&(n=a,e)){const l=!pn.length;for(const c of i)c[1](),pn.push(c,n);if(l){for(let c=0;c<pn.length;c+=2)pn[c][0](pn[c+1]);pn.length=0}}}function o(a){s(a(n))}function r(a,l=J){const c=[a,l];return i.add(c),i.size===1&&(e=t(s)||J),a(n),()=>{i.delete(c),i.size===0&&e&&(e(),e=null)}}return{set:s,update:o,subscribe:r}}function Eg(n){me(n,"svelte-1gfoniz","img.svelte-1gfoniz{width:100%;height:100%}")}function Dg(n){let t,e;return{c(){t=x("img"),et(t.src,e=n[0])||w(t,"src",e),w(t,"alt","floorplan iamge"),w(t,"class","svelte-1gfoniz")},m(i,s){O(i,t,s)},p(i,[s]){s&1&&!et(t.src,e=i[0])&&w(t,"src",e)},i:J,o:J,d(i){i&&j(t)}}}function xg(n,t,e){let{url:i}=t;return n.$$set=s=>{"url"in s&&e(0,i=s.url)},[i]}class Sg extends ce{constructor(t){super(),le(this,t,xg,Dg,ae,{url:0},Eg)}}function Lg(n){me(n,"svelte-ub47ya",".floorplan-plugin__base-image.svelte-ub47ya{width:100%;height:100%}")}function Tg(n){let t,e,i,s;return{c(){t=x("div"),e=new Qs(!1),i=K(),s=new Qs(!1),e.a=i,s.a=null,w(t,"class","floorplan-plugin__base-image svelte-ub47ya")},m(o,r){O(o,t,r),e.m(n[1],t),L(t,i),s.m(n[0],t)},p(o,[r]){r&1&&s.p(o[0])},i:J,o:J,d(o){o&&j(t)}}}function jg(n,t,e){let{content:i}=t;const s=`
185
+ `}}const pn=[];function Ar(n,t=J){let e;const i=new Set;function s(a){if(ae(n,a)&&(n=a,e)){const l=!pn.length;for(const c of i)c[1](),pn.push(c,n);if(l){for(let c=0;c<pn.length;c+=2)pn[c][0](pn[c+1]);pn.length=0}}}function o(a){s(a(n))}function r(a,l=J){const c=[a,l];return i.add(c),i.size===1&&(e=t(s)||J),a(n),()=>{i.delete(c),i.size===0&&e&&(e(),e=null)}}return{set:s,update:o,subscribe:r}}function Eg(n){me(n,"svelte-1gfoniz","img.svelte-1gfoniz{width:100%;height:100%}")}function Dg(n){let t,e;return{c(){t=x("img"),tt(t.src,e=n[0])||w(t,"src",e),w(t,"alt","floorplan iamge"),w(t,"class","svelte-1gfoniz")},m(i,s){O(i,t,s)},p(i,[s]){s&1&&!tt(t.src,e=i[0])&&w(t,"src",e)},i:J,o:J,d(i){i&&j(t)}}}function xg(n,t,e){let{url:i}=t;return n.$$set=s=>{"url"in s&&e(0,i=s.url)},[i]}class Sg extends ce{constructor(t){super(),le(this,t,xg,Dg,ae,{url:0},Eg)}}function Lg(n){me(n,"svelte-ub47ya",".floorplan-plugin__base-image.svelte-ub47ya{width:100%;height:100%}")}function Tg(n){let t,e,i,s;return{c(){t=x("div"),e=new Qs(!1),i=K(),s=new Qs(!1),e.a=i,s.a=null,w(t,"class","floorplan-plugin__base-image svelte-ub47ya")},m(o,r){O(o,t,r),e.m(n[1],t),L(t,i),s.m(n[0],t)},p(o,[r]){r&1&&s.p(o[0])},i:J,o:J,d(o){o&&j(t)}}}function jg(n,t,e){let{content:i}=t;const s=`
186
186
  <style>
187
187
  svg [type='lineGroup'] path {
188
188
  fill: #ffffff;
@@ -191,7 +191,7 @@ void main() {
191
191
  svg [type='lineItemGroup'] g g g g {
192
192
  stroke: #ffffff;
193
193
  }</style>
194
- `;return n.$$set=o=>{"content"in o&&e(0,i=o.content)},[i,s]}class zg extends ce{constructor(t){super(),le(this,t,jg,Tg,ae,{content:0},Lg)}}function Og(n){me(n,"svelte-ozpg4a",".floorplan-plugin__base-image.svelte-ozpg4a{position:absolute;z-index:10;width:100%;height:100%;pointer-events:none}")}function Bg(n){let t,e;return t=new Sg({props:{url:n[1].url}}),{c(){oe(t.$$.fragment)},m(i,s){ne(t,i,s),e=!0},p(i,s){const o={};s&2&&(o.url=i[1].url),t.$set(o)},i(i){e||(D(t.$$.fragment,i),e=!0)},o(i){T(t.$$.fragment,i),e=!1},d(i){se(t,i)}}}function Vg(n){let t,e;return t=new zg({props:{content:n[0]}}),{c(){oe(t.$$.fragment)},m(i,s){ne(t,i,s),e=!0},p(i,s){const o={};s&1&&(o.content=i[0]),t.$set(o)},i(i){e||(D(t.$$.fragment,i),e=!0)},o(i){T(t.$$.fragment,i),e=!1},d(i){se(t,i)}}}function Rg(n){let t,e,i,s;const o=[Vg,Bg],r=[];function a(l,c){return l[0]?0:l[1]?1:-1}return~(e=a(n))&&(i=r[e]=o[e](n)),{c(){t=x("div"),i&&i.c(),w(t,"class","floorplan-plugin__base-image svelte-ozpg4a")},m(l,c){O(l,t,c),~e&&r[e].m(t,null),s=!0},p(l,[c]){let d=e;e=a(l),e===d?~e&&r[e].p(l,c):(i&&(he(),T(r[d],1,1,()=>{r[d]=null}),ue()),~e?(i=r[e],i?i.p(l,c):(i=r[e]=o[e](l),i.c()),D(i,1),i.m(t,null)):i=null)},i(l){s||(D(i),s=!0)},o(l){T(i),s=!1},d(l){l&&j(t),~e&&r[e].d()}}}function Qg(n,t,e){let i,s,{floorIndex:o}=t,{floorplanData:r}=t;return n.$$set=a=>{"floorIndex"in a&&e(2,o=a.floorIndex),"floorplanData"in a&&e(3,r=a.floorplanData)},n.$$.update=()=>{var a,l;n.$$.dirty&12&&e(1,i=r.outlines[o]),n.$$.dirty&12&&e(0,s=(l=(a=r.outlines)==null?void 0:a[o])==null?void 0:l.svgContent)},[s,i,o,r]}class oc extends ce{constructor(t){super(),le(this,t,Qg,Rg,ae,{floorIndex:2,floorplanData:3},Og)}}function Gg(n){me(n,"svelte-9vzn2f",".floorplan-plugin__room-label-item.svelte-9vzn2f{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-part1.svelte-9vzn2f{display:flex;flex-flow:column;align-items:center;color:#fff;white-space:nowrap}.floorplan-plugin__room-area.svelte-9vzn2f{opacity:0.6;line-height:1.25;margin-top:0.125rem}")}function Ng(n){let t,e=n[15].outerHTML+"",i;return{c(){t=new Qs(!1),i=Ie(),t.a=i},m(s,o){t.m(e,s,o),O(s,i,o)},p(s,o){o[0]&32768&&e!==(e=s[15].outerHTML+"")&&t.p(e)},d(s){s&&j(i),s&&t.d()}}}function Fg(n){let t,e,i,s,o,r,a=n[1]&&rc(n),l=n[0]&&ac(n),c=n[2]&&lc(n);return{c(){t=x("div"),a&&a.c(),e=K(),l&&l.c(),i=K(),c&&c.c(),s=Ie(),w(t,"class","floorplan-plugin__room-part1 svelte-9vzn2f"),S(t,"opacity",n[11]?"1":"0")},m(d,h){O(d,t,h),a&&a.m(t,null),L(t,e),l&&l.m(t,null),O(d,i,h),c&&c.m(d,h),O(d,s,h),o||(r=[zt(mi.call(null,t)),be(t,"clientWidth",n[32]),be(t,"clientHeight",n[33])],o=!0)},p(d,h){d[1]?a?a.p(d,h):(a=rc(d),a.c(),a.m(t,e)):a&&(a.d(1),a=null),d[0]?l?l.p(d,h):(l=ac(d),l.c(),l.m(t,null)):l&&(l.d(1),l=null),h[0]&2048&&S(t,"opacity",d[11]?"1":"0"),d[2]?c?c.p(d,h):(c=lc(d),c.c(),c.m(s.parentNode,s)):c&&(c.d(1),c=null)},d(d){d&&j(t),a&&a.d(),l&&l.d(),d&&j(i),c&&c.d(d),d&&j(s),o=!1,Xe(r)}}}function rc(n){let t,e=n[3].name+"",i;return{c(){t=x("span"),i=De(e),w(t,"class","floorplan-plugin__room-name")},m(s,o){O(s,t,o),L(t,i)},p(s,o){o[0]&8&&e!==(e=s[3].name+"")&&Se(i,e)},d(s){s&&j(t)}}}function ac(n){let t,e;return{c(){t=x("span"),e=De(n[14]),w(t,"class","floorplan-plugin__room-area svelte-9vzn2f"),S(t,"font-size",n[19])},m(i,s){O(i,t,s),L(t,e)},p(i,s){s[0]&16384&&Se(e,i[14])},d(i){i&&j(t)}}}function lc(n){let t,e;return{c(){t=x("span"),e=De(n[13]),w(t,"class","floorplan-plugin__room-size"),S(t,"font-size",n[19]),S(t,"opacity",n[10]?"0.6":"0")},m(i,s){O(i,t,s),L(t,e)},p(i,s){s[0]&8192&&Se(e,i[13]),s[0]&1024&&S(t,"opacity",i[10]?"0.6":"0")},d(i){i&&j(t)}}}function _g(n){let t,e,i;function s(a,l){if(a[4]===void 0)return Fg;if(a[15])return Ng}let o=s(n),r=o&&o(n);return{c(){t=x("div"),r&&r.c(),w(t,"class","floorplan-plugin__room-label-item svelte-9vzn2f"),S(t,"left",n[16]),S(t,"top",n[17]),S(t,"font-size",n[18]),S(t,"opacity",n[12]?"1":"0"),S(t,"transform",n[9]?"translate(-50%, calc(-50% + 6px))":"translate(-50%, -50%)")},m(a,l){O(a,t,l),r&&r.m(t,null),e||(i=[zt(mi.call(null,t)),be(t,"clientWidth",n[34]),be(t,"clientHeight",n[35])],e=!0)},p(a,l){o===(o=s(a))&&r?r.p(a,l):(r&&r.d(1),r=o&&o(a),r&&(r.c(),r.m(t,null))),l[0]&4096&&S(t,"opacity",a[12]?"1":"0"),l[0]&512&&S(t,"transform",a[9]?"translate(-50%, calc(-50% + 6px))":"translate(-50%, -50%)")},i:J,o:J,d(a){a&&j(t),r&&r.d(),e=!1,Xe(i)}}}function Hg(n,t){const e=n[0],i=n[1];let s=!1;for(let o=0,r=t.length-1;o<t.length;r=o++){const a=t[o][0],l=t[o][1],c=t[r][0],d=t[r][1];l>i!=d>i&&e<(c-a)*(i-l)/(d-l)+a&&(s=!s)}return s}function Wg(n,t,e){let i,s,o,r,a,l,c,d,h,f,m,A,p,{pxmm:g}=t,{roomAreaEnable:v}=t,{roomNameEnable:y}=t,{roomDimensionEnable:P}=t,{room:I}=t,{hoveredRoom:E}=t,{getRoomAreaText:C}=t,{getRoomDimensionText:z}=t,{getLabelElement:R}=t,{adaptiveRoomLabelVisibleEnable:U}=t;function H(te,ye){if(ye.width===0||ye.height===0)return()=>!1;const ze=te.path.map(({x:_e,y:Ue})=>[_e,Ue]),pe=te.roomLabel.position,{x:Ke,y:rt}=pe,{width:xe,height:tt}=ye,re=xe/2,Me=tt/2;return function(Ue){const wt=Ke*Ue,it=rt*Ue,vt=ze.map(([Qe,Je])=>[Qe*Ue,Je*Ue]);return[[wt+re,it-Me],[wt-re,it-Me],[wt-re,it+Me],[wt+re,it+Me]].every(Qe=>Hg(Qe,vt))}}const N=document.body.clientWidth,F=document.body.clientHeight,Q=I.roomLabel,_=Q.positionInImage.x*100+"%",Y=Q.positionInImage.y*100+"%",Z=(N<500||F<500?10:14)+"px",q=(N<500||F<500?8:12)+"px";let ee=0,fe=0,de=0,ke=0,Pe=!1;E.subscribe(function(ye){e(25,Pe=!!ye&&ye.id===I.id)});const we=te=>{e(7,de=te.detail)},Fe=te=>{e(8,ke=te.detail)},Ce=te=>{e(5,ee=te.detail)},Ze=te=>{e(6,fe=te.detail)};return n.$$set=te=>{"pxmm"in te&&e(20,g=te.pxmm),"roomAreaEnable"in te&&e(0,v=te.roomAreaEnable),"roomNameEnable"in te&&e(1,y=te.roomNameEnable),"roomDimensionEnable"in te&&e(2,P=te.roomDimensionEnable),"room"in te&&e(3,I=te.room),"hoveredRoom"in te&&e(21,E=te.hoveredRoom),"getRoomAreaText"in te&&e(22,C=te.getRoomAreaText),"getRoomDimensionText"in te&&e(23,z=te.getRoomDimensionText),"getLabelElement"in te&&e(4,R=te.getLabelElement),"adaptiveRoomLabelVisibleEnable"in te&&e(24,U=te.adaptiveRoomLabelVisibleEnable)},n.$$.update=()=>{var te,ye;n.$$.dirty[0]&24&&e(15,i=R==null?void 0:R(I)),n.$$.dirty[0]&4194312&&e(14,s=I.size?C(I.size):""),n.$$.dirty[0]&8388616&&e(13,o=I!=null&&I.dimension?z((te=I.dimension)==null?void 0:te.width,(ye=I.dimension)==null?void 0:ye.height):""),n.$$.dirty[0]&384&&e(31,r={width:de,height:ke}),n.$$.dirty[0]&8|n.$$.dirty[1]&1&&e(30,a=r?H(I,r):void 0),n.$$.dirty[0]&1091567616&&e(27,l=U?!!(a!=null&&a(g)):!0),n.$$.dirty[0]&96&&e(29,c={width:ee,height:fe}),n.$$.dirty[0]&536870920&&e(28,d=c?H(I,c):void 0),n.$$.dirty[0]&286261248&&e(26,h=U?!!(d!=null&&d(g)):!0),n.$$.dirty[0]&234881024&&e(12,f=h||l||Pe),n.$$.dirty[0]&167772160&&e(11,m=l||Pe),n.$$.dirty[0]&100663296&&e(10,A=h||Pe),n.$$.dirty[0]&201326592&&e(9,p=l&&!h)},[v,y,P,I,R,ee,fe,de,ke,p,A,m,f,o,s,i,_,Y,Z,q,g,E,C,z,U,Pe,h,l,d,c,a,r,we,Fe,Ce,Ze]}class Ug extends ce{constructor(t){super(),le(this,t,Wg,_g,ae,{pxmm:20,roomAreaEnable:0,roomNameEnable:1,roomDimensionEnable:2,room:3,hoveredRoom:21,getRoomAreaText:22,getRoomDimensionText:23,getLabelElement:4,adaptiveRoomLabelVisibleEnable:24},Gg,[-1,-1])}}function Yg(n){me(n,"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 cc(n,t,e){const i=n.slice();return i[14]=t[e],i}function dc(n){let t,e=[],i=new Map,s,o,r,a=n[10];const l=c=>c[14].id;for(let c=0;c<a.length;c+=1){let d=cc(n,a,c),h=l(d);i.set(h,e[c]=hc(h,d))}return{c(){t=x("div");for(let c=0;c<e.length;c+=1)e[c].c();w(t,"class","floorplan-plugin__room-labels svelte-13xux0b")},m(c,d){O(c,t,d);for(let h=0;h<e.length;h+=1)e[h]&&e[h].m(t,null);s=!0,o||(r=[zt(mi.call(null,t)),be(t,"clientWidth",n[13])],o=!0)},p(c,d){d&1791&&(a=c[10],he(),e=Bt(e,d,l,1,c,a,i,t,fi,hc,null,cc),ue())},i(c){if(!s){for(let d=0;d<a.length;d+=1)D(e[d]);s=!0}},o(c){for(let d=0;d<e.length;d+=1)T(e[d]);s=!1},d(c){c&&j(t);for(let d=0;d<e.length;d+=1)e[d].d();o=!1,Xe(r)}}}function hc(n,t){let e,i,s;const o=[{pxmm:t[9],room:t[14],hoveredRoom:t[3],roomAreaEnable:t[0],roomNameEnable:t[1],roomDimensionEnable:t[2],getLabelElement:t[6],getRoomAreaText:t[4],getRoomDimensionText:t[5],adaptiveRoomLabelVisibleEnable:t[7]}];let r={};for(let a=0;a<o.length;a+=1)r=st(r,o[a]);return i=new Ug({props:r}),{key:n,first:null,c(){e=Ie(),oe(i.$$.fragment),this.first=e},m(a,l){O(a,e,l),ne(i,a,l),s=!0},p(a,l){t=a;const c=l&1791?dt(o,[{pxmm:t[9],room:t[14],hoveredRoom:t[3],roomAreaEnable:t[0],roomNameEnable:t[1],roomDimensionEnable:t[2],getLabelElement:t[6],getRoomAreaText:t[4],getRoomDimensionText:t[5],adaptiveRoomLabelVisibleEnable:t[7]}]):{};i.$set(c)},i(a){s||(D(i.$$.fragment,a),s=!0)},o(a){T(i.$$.fragment,a),s=!1},d(a){a&&j(e),se(i,a)}}}function Xg(n){let t,e,i=n[10]&&dc(n);return{c(){i&&i.c(),t=Ie()},m(s,o){i&&i.m(s,o),O(s,t,o),e=!0},p(s,[o]){s[10]?i?(i.p(s,o),o&1024&&D(i,1)):(i=dc(s),i.c(),D(i,1),i.m(t.parentNode,t)):i&&(he(),T(i,1,1,()=>{i=null}),ue())},i(s){e||(D(i),e=!0)},o(s){T(i),e=!1},d(s){i&&i.d(s),s&&j(t)}}}function Zg(n,t,e){let i,{floorIndex:s}=t,{roomAreaEnable:o}=t,{roomNameEnable:r}=t,{roomDimensionEnable:a}=t,{floorplanData:l}=t,{hoveredRoom:c}=t,{getRoomAreaText:d}=t,{getRoomDimensionText:h}=t,{getLabelElement:f}=t,{adaptiveRoomLabelVisibleEnable:m}=t,A=0,p=0;const g=v=>{e(8,A=v.detail)};return n.$$set=v=>{"floorIndex"in v&&e(11,s=v.floorIndex),"roomAreaEnable"in v&&e(0,o=v.roomAreaEnable),"roomNameEnable"in v&&e(1,r=v.roomNameEnable),"roomDimensionEnable"in v&&e(2,a=v.roomDimensionEnable),"floorplanData"in v&&e(12,l=v.floorplanData),"hoveredRoom"in v&&e(3,c=v.hoveredRoom),"getRoomAreaText"in v&&e(4,d=v.getRoomAreaText),"getRoomDimensionText"in v&&e(5,h=v.getRoomDimensionText),"getLabelElement"in v&&e(6,f=v.getLabelElement),"adaptiveRoomLabelVisibleEnable"in v&&e(7,m=v.adaptiveRoomLabelVisibleEnable)},n.$$.update=()=>{if(n.$$.dirty&6144&&e(10,i=l.floorDatas[s].rooms),n.$$.dirty&4352){const{max:v,min:y}=l.bounding,P=v.x-y.x;e(9,p=A/P)}},[o,r,a,c,d,h,f,m,A,p,i,s,l,g]}class Jg extends ce{constructor(t){super(),le(this,t,Zg,Xg,ae,{floorIndex:11,roomAreaEnable:0,roomNameEnable:1,roomDimensionEnable:2,floorplanData:12,hoveredRoom:3,getRoomAreaText:4,getRoomDimensionText:5,getLabelElement:6,adaptiveRoomLabelVisibleEnable:7},Yg)}}function qg(n){me(n,"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 uc(n,t,e){const i=n.slice();return i[11]=t[e],i[13]=e,i}function fc(n,t,e){const i=n.slice();return i[14]=t[e],i}function mc(n){let t;return{c(){t=x("div"),w(t,"class","floorplan-plugin__rule-scale svelte-djlmk4"),S(t,"left",n[14].left*100+"%"),S(t,"bottom",n[14].bottom*100+"%")},m(e,i){O(e,t,i)},p:J,d(e){e&&j(t)}}}function gc(n,t){let e,i,s=t[1](t[11].distance)+"",o,r;return{key:n,first:null,c(){e=x("div"),i=x("div"),o=De(s),r=K(),w(i,"class","floorplan-plugin__rule-text svelte-djlmk4"),$(i,"is-row",t[2]),w(e,"class","floorplan-plugin__rule-text-item svelte-djlmk4"),S(e,"left",t[11].left*100+"%"),S(e,"bottom",t[11].bottom*100+"%"),this.first=e},m(a,l){O(a,e,l),L(e,i),L(i,o),L(e,r)},p(a,l){t=a,l&2&&s!==(s=t[1](t[11].distance)+"")&&Se(o,s)},d(a){a&&j(e)}}}function Kg(n){let t,e,i,s,o,r,a=[],l=new Map,c,d=n[3],h=[];for(let A=0;A<d.length;A+=1)h[A]=mc(fc(n,d,A));let f=n[4];const m=A=>A[13];for(let A=0;A<f.length;A+=1){let p=uc(n,f,A),g=m(p);l.set(g,a[A]=gc(g,p))}return{c(){t=x("div"),e=x("div"),i=K(),s=x("div");for(let A=0;A<h.length;A+=1)h[A].c();o=K(),r=x("div");for(let A=0;A<a.length;A+=1)a[A].c();w(e,"class","floorplan-plugin__rule-line svelte-djlmk4"),w(s,"class","floorplan-plugin__rule-scale-wrapper svelte-djlmk4"),$(s,"is-row",n[2]),w(r,"class","floorplan-plugin__rule-text-wrapper svelte-djlmk4"),w(t,"class",c="floorplan-plugin__rule-labels floorplan-plugin__rule-labels--"+n[0]+" svelte-djlmk4"),$(t,"is-row",n[2]),S(t,"width",n[2]?"100%":1/16+"rem"),S(t,"height",n[2]?1/16+"rem":"100%")},m(A,p){O(A,t,p),L(t,e),L(t,i),L(t,s);for(let g=0;g<h.length;g+=1)h[g]&&h[g].m(s,null);L(t,o),L(t,r);for(let g=0;g<a.length;g+=1)a[g]&&a[g].m(r,null)},p(A,[p]){if(p&8){d=A[3];let g;for(g=0;g<d.length;g+=1){const v=fc(A,d,g);h[g]?h[g].p(v,p):(h[g]=mc(v),h[g].c(),h[g].m(s,null))}for(;g<h.length;g+=1)h[g].d(1);h.length=d.length}p&22&&(f=A[4],a=Bt(a,p,m,1,A,f,l,r,mr,gc,null,uc)),p&1&&c!==(c="floorplan-plugin__rule-labels floorplan-plugin__rule-labels--"+A[0]+" svelte-djlmk4")&&w(t,"class",c),p&5&&$(t,"is-row",A[2])},i:J,o:J,d(A){A&&j(t),Ot(h,A);for(let p=0;p<a.length;p+=1)a[p].d()}}}const An=1e3,vn=180;function $g(n,t,e){let{type:i}=t,{data:s}=t,{bounding:o}=t,{getRuleDistanceText:r}=t;const a=i==="top"||i==="bottom",l=o.max.x-o.min.x-(An-vn)*2,c=o.max.y-o.min.y-(An-vn)*2,d=s.map(([A,p])=>a?[A.x,p.x]:[A.y,p.y]).flat().sort().filter((A,p,g)=>p===0?!0:A!==g[p-1]),h=d.map(A=>{const p=a?(A-o.min.x-An+vn)/l:0,g=a?0:(A-o.min.y-An+vn)/c;return{left:p,bottom:g}});h.unshift({left:0,bottom:0}),h.push(a?{left:1,bottom:0}:{left:0,bottom:1});const f=d[d.length-1]-d[0],m=d.map((A,p,g)=>{const v=p===0?0:A-g[p-1],y=p===0?0:(A+g[p-1])/2,P=a?(y-o.min.x-An+vn)/l:0,I=a?0:(y-o.min.y-An+vn)/c;return{left:P,bottom:I,distance:v}}).filter(({distance:A})=>A/f>.1);return n.$$set=A=>{"type"in A&&e(0,i=A.type),"data"in A&&e(5,s=A.data),"bounding"in A&&e(6,o=A.bounding),"getRuleDistanceText"in A&&e(1,r=A.getRuleDistanceText)},[i,r,a,h,m,s,o]}class ep extends ce{constructor(t){super(),le(this,t,$g,Kg,ae,{type:0,data:5,bounding:6,getRuleDistanceText:1},qg)}}function tp(n){me(n,"svelte-1mzj9p3",".floorplan-plugin__rule-labels-wrapper.svelte-1mzj9p3{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);pointer-events:none}")}function pc(n,t,e){const i=n.slice();return i[13]=t[e][0],i[14]=t[e][1],i}function Ac(n,t){let e,i,s;const o=[{type:t[13],data:t[14],bounding:t[1],getRuleDistanceText:t[0]}];let r={};for(let a=0;a<o.length;a+=1)r=st(r,o[a]);return i=new ep({props:r}),{key:n,first:null,c(){e=Ie(),oe(i.$$.fragment),this.first=e},m(a,l){O(a,e,l),ne(i,a,l),s=!0},p(a,l){t=a;const c=l&19?dt(o,[{type:t[13],data:t[14],bounding:t[1],getRuleDistanceText:t[0]}]):{};i.$set(c)},i(a){s||(D(i.$$.fragment,a),s=!0)},o(a){T(i.$$.fragment,a),s=!1},d(a){a&&j(e),se(i,a)}}}function ip(n){let t,e=[],i=new Map,s,o=n[4];const r=a=>a[13];for(let a=0;a<o.length;a+=1){let l=pc(n,o,a),c=r(l);i.set(c,e[a]=Ac(c,l))}return{c(){t=x("div");for(let a=0;a<e.length;a+=1)e[a].c();w(t,"class","floorplan-plugin__rule-labels-wrapper svelte-1mzj9p3"),S(t,"width",n[3]),S(t,"height",n[2])},m(a,l){O(a,t,l);for(let c=0;c<e.length;c+=1)e[c]&&e[c].m(t,null);s=!0},p(a,[l]){l&19&&(o=a[4],he(),e=Bt(e,l,r,1,a,o,i,t,fi,Ac,null,pc),ue()),l&8&&S(t,"width",a[3]),l&4&&S(t,"height",a[2])},i(a){if(!s){for(let l=0;l<o.length;l+=1)D(e[l]);s=!0}},o(a){for(let l=0;l<e.length;l+=1)T(e[l]);s=!1},d(a){a&&j(t);for(let l=0;l<e.length;l+=1)e[l].d()}}}const vc=1e3,bc=180;function np(n,t,e){let i,s,o,r,a,l,c,d,h,f,{floorIndex:m}=t,{floorplanData:A}=t,{getRuleDistanceText:p}=t;return n.$$set=g=>{"floorIndex"in g&&e(5,m=g.floorIndex),"floorplanData"in g&&e(6,A=g.floorplanData),"getRuleDistanceText"in g&&e(0,p=g.getRuleDistanceText)},n.$$.update=()=>{n.$$.dirty&64&&e(1,i=A.bounding),n.$$.dirty&96&&e(11,s=A.floorDatas[m].rules),n.$$.dirty&2048&&e(12,o=Object.keys(s)),n.$$.dirty&6144&&e(4,r=o.map(g=>[g,s[g]])),n.$$.dirty&2&&e(9,a=i.max.x-i.min.x),n.$$.dirty&2&&e(7,l=i.max.y-i.min.y),n.$$.dirty&2&&e(10,c=i.max.x-i.min.x-(vc-bc)*2),n.$$.dirty&2&&e(8,d=i.max.y-i.min.y-(vc-bc)*2),n.$$.dirty&1536&&e(3,h=c/a*100+"%"),n.$$.dirty&384&&e(2,f=d/l*100+"%")},[p,i,f,h,r,m,A,l,d,a,c,s,o]}class sp extends ce{constructor(t){super(),le(this,t,np,ip,ae,{floorIndex:5,floorplanData:6,getRuleDistanceText:0},tp)}}function qs(n,t={}){let e="";const{needZ:i,needA:s}=t;return(i?n.slice().concat(n[0]):n.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):s!=null&&s[a]?(e+="A"+s[a]+","+d,e):(e+="L"+d,e)}),e+(i?"Z":"")}function yc({x:n,y:t},e){const{max:i,min:s}=e;return{x:n-s.x,y:i.y-t}}function op(n,t){const e=n.x*1e3+t.bounding.origin.x,i=-n.z*1e3+t.bounding.origin.y;return{x:e,y:i}}function rp(n,t){const e=t.bounding,i=e.max.x-e.min.x,s=e.max.y-e.min.y;return{x:(n.x-e.min.x)/i,y:(e.max.y-n.y)/s}}function ap(n,t){return Math.max(...t.work.observers.map(i=>n.z>=i.standingPosition.z?i.floorIndex:0))}function lp(n){let t;return{c(){t=Oe("path"),w(t,"d",n[0]),w(t,"fill","#2F313A")},m(e,i){O(e,t,i)},p(e,[i]){i&1&&w(t,"d",e[0])},i:J,o:J,d(e){e&&j(t)}}}function cp(n,t,e){let i,{path:s}=t;return n.$$set=o=>{"path"in o&&e(1,s=o.path)},n.$$.update=()=>{n.$$.dirty&2&&e(0,i=qs(s,{needZ:!0}))},[i,s]}class dp extends ce{constructor(t){super(),le(this,t,cp,lp,ae,{path:1})}}function hp(n){let t,e,i,s,o,r;return{c(){t=Oe("defs"),e=Oe("pattern"),i=Oe("rect"),s=Oe("path"),o=K(),r=Oe("path"),w(i,"x","0"),w(i,"y","0"),w(i,"width",n[1]),w(i,"height",n[1]),w(i,"fill","#323747"),w(s,"d",n[2]),w(s,"stroke","#ffffff"),w(s,"stroke-opacity","0.06"),w(s,"stroke-width","0.5"),w(s,"fill","none"),w(e,"id","fpm-room-pattern-0"),w(e,"x","0"),w(e,"y","0"),w(e,"width",n[1]),w(e,"height",n[1]),w(e,"patternUnits","userSpaceOnUse"),w(e,"patternTransform","scale(50 50)"),w(r,"d",n[0]),w(r,"fill","url(#fpm-room-pattern-0)")},m(a,l){O(a,t,l),L(t,e),L(e,i),L(e,s),O(a,o,l),O(a,r,l)},p(a,[l]){l&1&&w(r,"d",a[0])},i:J,o:J,d(a){a&&j(t),a&&j(o),a&&j(r)}}}const vr=6;function up(n,t,e){let i,{path:s}=t;const o=vr*2,r=`M0 ${vr} h ${o} M${vr} 0 v ${o}`;return n.$$set=a=>{"path"in a&&e(3,s=a.path)},n.$$.update=()=>{n.$$.dirty&8&&e(0,i=qs(s,{needZ:!0}))},[i,o,r,s]}class fp extends ce{constructor(t){super(),le(this,t,up,hp,ae,{path:3})}}function mp(n){let t,e,i,s,o,r,a,l,c,d,h;return{c(){t=Oe("defs"),e=Oe("pattern"),i=Oe("rect"),s=Oe("pattern"),o=Oe("rect"),r=K(),a=Oe("path"),l=K(),c=Oe("path"),d=K(),h=Oe("path"),w(i,"x","0"),w(i,"y","0"),w(i,"width","6"),w(i,"height","50"),w(i,"fill","none"),w(i,"stroke","#4B4B57"),w(i,"stroke-width","0.5"),w(e,"id","room-material-pattern-1"),w(e,"x","0"),w(e,"y","0"),w(e,"width","12"),w(e,"height","50"),w(e,"patternUnits","userSpaceOnUse"),w(e,"patternTransform","scale(50 50)"),w(o,"x","0"),w(o,"y","0"),w(o,"width","6"),w(o,"height","50"),w(o,"fill","none"),w(o,"stroke","#4B4B57"),w(o,"stroke-width","0.5"),w(s,"id","room-material-pattern-2"),w(s,"x","6"),w(s,"y","25"),w(s,"width","12"),w(s,"height","50"),w(s,"patternUnits","userSpaceOnUse"),w(s,"patternTransform","scale(50 50)"),w(a,"d",n[0]),w(a,"fill","#43434D"),w(c,"d",n[0]),w(c,"fill","url(#room-material-pattern-1)"),w(h,"d",n[0]),w(h,"fill","url(#room-material-pattern-2)")},m(f,m){O(f,t,m),L(t,e),L(e,i),L(t,s),L(s,o),O(f,r,m),O(f,a,m),O(f,l,m),O(f,c,m),O(f,d,m),O(f,h,m)},p(f,[m]){m&1&&w(a,"d",f[0]),m&1&&w(c,"d",f[0]),m&1&&w(h,"d",f[0])},i:J,o:J,d(f){f&&j(t),f&&j(r),f&&j(a),f&&j(l),f&&j(c),f&&j(d),f&&j(h)}}}function gp(n,t,e){let i,{path:s}=t;return n.$$set=o=>{"path"in o&&e(1,s=o.path)},n.$$.update=()=>{n.$$.dirty&2&&e(0,i=qs(s,{needZ:!0}))},[i,s]}class pp extends ce{constructor(t){super(),le(this,t,gp,mp,ae,{path:1})}}function Ap(n){me(n,"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 wc(n,t,e){const i=n.slice();return i[5]=t[e],i}function vp(n){let t,e;return t=new fp({props:{path:n[5].path}}),{c(){oe(t.$$.fragment)},m(i,s){ne(t,i,s),e=!0},p(i,s){const o={};s&1&&(o.path=i[5].path),t.$set(o)},i(i){e||(D(t.$$.fragment,i),e=!0)},o(i){T(t.$$.fragment,i),e=!1},d(i){se(t,i)}}}function bp(n){let t,e;return t=new pp({props:{path:n[5].path}}),{c(){oe(t.$$.fragment)},m(i,s){ne(t,i,s),e=!0},p(i,s){const o={};s&1&&(o.path=i[5].path),t.$set(o)},i(i){e||(D(t.$$.fragment,i),e=!0)},o(i){T(t.$$.fragment,i),e=!1},d(i){se(t,i)}}}function yp(n){let t,e;return t=new dp({props:{path:n[5].path}}),{c(){oe(t.$$.fragment)},m(i,s){ne(t,i,s),e=!0},p(i,s){const o={};s&1&&(o.path=i[5].path),t.$set(o)},i(i){e||(D(t.$$.fragment,i),e=!0)},o(i){T(t.$$.fragment,i),e=!1},d(i){se(t,i)}}}function Cc(n){let t,e,i,s;const o=[yp,bp,vp],r=[];function a(l,c){return l[5].floorType===1?0:l[5].floorType===0?1:2}return e=a(n),i=r[e]=o[e](n),{c(){t=Oe("svg"),i.c(),w(t,"width","100%"),w(t,"height","100%"),w(t,"viewBox",`0 0 ${n[1]} ${n[2]}`),w(t,"class","svelte-1dykexu")},m(l,c){O(l,t,c),r[e].m(t,null),s=!0},p(l,c){let d=e;e=a(l),e===d?r[e].p(l,c):(he(),T(r[d],1,1,()=>{r[d]=null}),ue(),i=r[e],i?i.p(l,c):(i=r[e]=o[e](l),i.c()),D(i,1),i.m(t,null))},i(l){s||(D(i),s=!0)},o(l){T(i),s=!1},d(l){l&&j(t),r[e].d()}}}function wp(n){let t,e,i=n[0],s=[];for(let r=0;r<i.length;r+=1)s[r]=Cc(wc(n,i,r));const o=r=>T(s[r],1,1,()=>{s[r]=null});return{c(){t=x("div");for(let r=0;r<s.length;r+=1)s[r].c();w(t,"class","floorplan-plugin__room-material svelte-1dykexu")},m(r,a){O(r,t,a);for(let l=0;l<s.length;l+=1)s[l]&&s[l].m(t,null);e=!0},p(r,[a]){if(a&7){i=r[0];let l;for(l=0;l<i.length;l+=1){const c=wc(r,i,l);s[l]?(s[l].p(c,a),D(s[l],1)):(s[l]=Cc(c),s[l].c(),D(s[l],1),s[l].m(t,null))}for(he(),l=i.length;l<s.length;l+=1)o(l);ue()}},i(r){if(!e){for(let a=0;a<i.length;a+=1)D(s[a]);e=!0}},o(r){s=s.filter(Boolean);for(let a=0;a<s.length;a+=1)T(s[a]);e=!1},d(r){r&&j(t),Ot(s,r)}}}function Cp(n,t,e){let i,{floorIndex:s}=t,{floorplanData:o}=t;const r=o.bounding.max.x-o.bounding.min.x,a=o.bounding.max.y-o.bounding.min.y;return n.$$set=l=>{"floorIndex"in l&&e(3,s=l.floorIndex),"floorplanData"in l&&e(4,o=l.floorplanData)},n.$$.update=()=>{n.$$.dirty&24&&e(0,i=o.floorDatas[s].rooms.map(l=>ge(V({},l),{path:l.path.map(c=>yc(c,o.bounding))})))},[i,r,a,s,o]}class Ip extends ce{constructor(t){super(),le(this,t,Cp,wp,ae,{floorIndex:3,floorplanData:4},Ap)}}function Pp(n){me(n,"svelte-qq2273","path.svelte-qq2273{--opacity:0;opacity:var(--opacity)}path.svelte-qq2273:hover{opacity:calc(var(--opacity) + 0.1)}")}function kp(n){let t,e,i,s;return{c(){t=Oe("path"),w(t,"d",n[5]),w(t,"fill","#fff"),w(t,"style",n[2]),w(t,"id",e=`${n[1]}_${n[0].id}`),w(t,"class","svelte-qq2273")},m(o,r){O(o,t,r),i||(s=[be(t,"mouseenter",n[3]),be(t,"mouseleave",n[4])],i=!0)},p(o,[r]){r&4&&w(t,"style",o[2]),r&3&&e!==(e=`${o[1]}_${o[0].id}`)&&w(t,"id",e)},i:J,o:J,d(o){o&&j(t),i=!1,Xe(s)}}}function Mp(n,t,e){let i,s,{room:o}=t,{floorIndex:r}=t,{floorplanData:a}=t,{highlightData:l}=t,{hoveredRoom:c}=t;function d(){c==null||c.set(o)}function h(){c==null||c.set(void 0)}const{bounding:f}=a,m=qs(o.path,{needZ:!0,format:A=>yc(A,f)});return n.$$set=A=>{"room"in A&&e(0,o=A.room),"floorIndex"in A&&e(1,r=A.floorIndex),"floorplanData"in A&&e(6,a=A.floorplanData),"highlightData"in A&&e(7,l=A.highlightData),"hoveredRoom"in A&&e(8,c=A.hoveredRoom)},n.$$.update=()=>{n.$$.dirty&131&&e(9,i=l[`${r}_${o.id}`]),n.$$.dirty&512&&e(2,s=i?`fill: ${i.color}; --opacity: ${i.opacity}; pointer-events: ${i.disabled?"none":"auto"}`:null)},[o,r,s,d,h,m,a,l,c,i]}class Ep extends ce{constructor(t){super(),le(this,t,Mp,kp,ae,{room:0,floorIndex:1,floorplanData:6,highlightData:7,hoveredRoom:8},Pp)}}function Dp(n){me(n,"svelte-1kqo6e4",".floorplan-plugin__room-highlight.svelte-1kqo6e4{position:absolute;width:100%;height:100%}svg.svelte-1kqo6e4{width:100%;height:100%;overflow:visible}")}function Ic(n,t,e){const i=n.slice();return i[6]=t[e],i}function Pc(n,t){let e,i,s;const o=[{room:t[6],floorplanData:t[1],hoveredRoom:t[3],floorIndex:t[0],highlightData:t[2]}];let r={};for(let a=0;a<o.length;a+=1)r=st(r,o[a]);return i=new Ep({props:r}),{key:n,first:null,c(){e=Ie(),oe(i.$$.fragment),this.first=e},m(a,l){O(a,e,l),ne(i,a,l),s=!0},p(a,l){t=a;const c=l&15?dt(o,[{room:t[6],floorplanData:t[1],hoveredRoom:t[3],floorIndex:t[0],highlightData:t[2]}]):{};i.$set(c)},i(a){s||(D(i.$$.fragment,a),s=!0)},o(a){T(i.$$.fragment,a),s=!1},d(a){a&&j(e),se(i,a)}}}function xp(n){let t,e,i=[],s=new Map,o,r=n[1].floorDatas[n[0]].rooms;const a=l=>l[6].id;for(let l=0;l<r.length;l+=1){let c=Ic(n,r,l),d=a(c);s.set(d,i[l]=Pc(d,c))}return{c(){t=x("div"),e=Oe("svg");for(let l=0;l<i.length;l+=1)i[l].c();w(e,"width","100%"),w(e,"height","100%"),w(e,"viewBox",`0 0 ${n[4]} ${n[5]}`),w(e,"class","svelte-1kqo6e4"),w(t,"class","floorplan-plugin__room-highlight svelte-1kqo6e4")},m(l,c){O(l,t,c),L(t,e);for(let d=0;d<i.length;d+=1)i[d]&&i[d].m(e,null);o=!0},p(l,[c]){c&15&&(r=l[1].floorDatas[l[0]].rooms,he(),i=Bt(i,c,a,1,l,r,s,e,fi,Pc,null,Ic),ue())},i(l){if(!o){for(let c=0;c<r.length;c+=1)D(i[c]);o=!0}},o(l){for(let c=0;c<i.length;c+=1)T(i[c]);o=!1},d(l){l&&j(t);for(let c=0;c<i.length;c+=1)i[c].d()}}}function Sp(n,t,e){let{floorIndex:i}=t,{floorplanData:s}=t,{highlightData:o}=t,{hoveredRoom:r}=t;const a=s.bounding.max.x-s.bounding.min.x,l=s.bounding.max.y-s.bounding.min.y;return n.$$set=c=>{"floorIndex"in c&&e(0,i=c.floorIndex),"floorplanData"in c&&e(1,s=c.floorplanData),"highlightData"in c&&e(2,o=c.highlightData),"hoveredRoom"in c&&e(3,r=c.hoveredRoom)},[i,s,o,r,a,l]}class kc extends ce{constructor(t){super(),le(this,t,Sp,xp,ae,{floorIndex:0,floorplanData:1,highlightData:2,hoveredRoom:3},Dp)}}function Lp(n){me(n,"svelte-1lm20n5",".missing-floor.svelte-1lm20n5{position:absolute;left:50%;top:50%;transform:translate(-50%, -50%);display:flex;flex-direction:column;align-items:center}.text.svelte-1lm20n5{margin-top:0.75rem;color:#fff;opacity:0.3}")}function Mc(n){let t,e=n[0].text+"",i;return{c(){t=x("span"),i=De(e),w(t,"class","text svelte-1lm20n5"),S(t,"font-size",n[0].textFontSize+"px")},m(s,o){O(s,t,o),L(t,i)},p(s,o){o&1&&e!==(e=s[0].text+"")&&Se(i,e),o&1&&S(t,"font-size",s[0].textFontSize+"px")},d(s){s&&j(t)}}}function Tp(n){let t,e,i,s,o=n[0].text&&Mc(n);return{c(){t=x("div"),e=x("img"),s=K(),o&&o.c(),w(e,"class","image"),w(e,"alt","缺省楼层展位图"),et(e.src,i=n[0].imageURL)||w(e,"src",i),S(e,"width",n[0].imageWidth+"px"),S(e,"height",n[0].imageHeight+"px"),w(t,"class","missing-floor svelte-1lm20n5")},m(r,a){O(r,t,a),L(t,e),L(t,s),o&&o.m(t,null)},p(r,[a]){a&1&&!et(e.src,i=r[0].imageURL)&&w(e,"src",i),a&1&&S(e,"width",r[0].imageWidth+"px"),a&1&&S(e,"height",r[0].imageHeight+"px"),r[0].text?o?o.p(r,a):(o=Mc(r),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},i:J,o:J,d(r){r&&j(t),o&&o.d()}}}function jp(n,t,e){let{missingFloorConfig:i}=t;return n.$$set=s=>{"missingFloorConfig"in s&&e(0,i=s.missingFloorConfig)},[i]}class zp extends ce{constructor(t){super(),le(this,t,jp,Tp,ae,{missingFloorConfig:0},Lp)}}const pi="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADMAAAAzCAMAAAANf8AYAAAC2VBMVEUAAACCnP+Dn/+Enf+HqP+Gp/+Fof+Gpf+IrP+Lsf+Dof+Cmv+Lsv+Mtf+Eo/+Bmf+JrP+Hqf+Env+Krv+Fo/+Pu/+Ms/+Qvv+Hqf+RwP+KsP+Fpf+Mtv+Gov+Bnf+Qv/+Nt/+Krv+Ho/+Rwf+Ouv+Emv+Amv+SxP+Sw/+NuP+Mtf/G0f6huP+Ot/+JrP+Jqv+Dnv+crf6Uqv////+QvP+PvP+Ms//J0/3p9/+Ux/+Ouf+Krf+Iqf+Fpv+/zf6WsP+MpP+RqP+Uyf+Jy//V3P6Yuf+Qqf+Rqv/5/f+Sxf+Jy/////+Lx/+Ouf+Nw/+Owv+PwP+Jr/+Jq/+VvP+Vuv/c4v+Fnf+btP+InP+Blf/3+P6Txf+Jzf+Jyf+NxP+Qwf/t8/6Svv+Tvf/O1f7Czv3T2f6cu/+qvP7a4fvo7v77/v/o9//p9//0+v////+Vy//w9//k8/+B1f/v9/+D0/+U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hgwOZZs4ZSTHR5lQQYPDW1DS4aELQxdyEIAANGjtk8c6aaqTslk8gVwIAN0w3rAEL2bMtHm12AIOHqenXaNDWztEwo9hKJGHjR6OO0yDSI1IGdoQ0iY0a6Tt+06fKUDRQzqKw8Qlxr1AXrwNqwDvGBA+BrGUDc3d3Xr5+SQZj0E2ERqXIjPAJYNUbD18FoWEeDbHLPzLyQ4ePjQ5i3x1RCubfmpqkjMMNo6KOJ5uqe+f58C9GoaD29XyVSYS1h4DftKeWDDN4AbACZMZAsExEKghWUNKXWhlPfA2P1qjmUT556a9jmQotWi/VOFael1lR7ep4JfRZy8nhpwtG4wMMB/gdi9/nNH+vhezsmJ+fG5quX12fomHl6J+KFy88uA2RJyJPE4wkL4wIPBfgXxO5HxGN7zNw5W2bNnLZhio+OmaR3LD6tplrLfKeYAwX7/O6Dje/2dpniwuKiwoMHH+bn7723Z8/uHTu2fpg9+3p29sYrWVnr1l1cO2HCUFCGT+tshUcWLPj6IDf37ued27Z9unXz2owZU6dOnnxp4sQ1q1ePH79KN6vbQWc1SrfrTit6lO5NO6/F8yZNmofBfgNTwRQLsPLsHQAAAABJRU5ErkJggg==";function Ec(n){return n*180/Math.PI}function Op(n){me(n,"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 Bp(n){let t,e;return{c(){t=x("div"),e=x("div"),w(e,"class","floorplan__camera-rotate svelte-17cl35n"),S(e,"background-image",`url(${n[0]||pi})`),S(e,"width",n[4]),S(e,"height",n[4]),S(e,"left","-"+n[4]),S(e,"top","-"+n[4]),S(e,"transform",`rotate(${n[3]}deg)`),S(e,"transform-origin",`${n[4]} ${n[4]}`),w(t,"class","floorplan__camera-position svelte-17cl35n"),S(t,"left",n[1]),S(t,"top",n[2])},m(i,s){O(i,t,s),L(t,e)},p(i,[s]){s&1&&S(e,"background-image",`url(${i[0]||pi})`);const o=s&1;o&&S(e,"width",i[4]),o&&S(e,"height",i[4]),o&&S(e,"left","-"+i[4]),o&&S(e,"top","-"+i[4]),o&&S(e,"transform",`rotate(${i[3]}deg)`),o&&S(e,"transform-origin",`${i[4]} ${i[4]}`)},i:J,o:J,d(i){i&&j(t)}}}function Vp(n,t,e){let{panoIndex:i}=t,{floorplanData:s}=t,{lastPanoramaLongitude:o}=t,{cameraImageUrl:r}=t;const{observers:a}=s,l=a[i],c=l.positionInImage.x,d=l.positionInImage.y,h=c*100+"%",f=d*100+"%",m=-Ec(o)+45,A=document.body.clientWidth,p=document.body.clientHeight,v=`${(A<500||p<500?17:37)/16}rem`;return n.$$set=y=>{"panoIndex"in y&&e(5,i=y.panoIndex),"floorplanData"in y&&e(6,s=y.floorplanData),"lastPanoramaLongitude"in y&&e(7,o=y.lastPanoramaLongitude),"cameraImageUrl"in y&&e(0,r=y.cameraImageUrl)},[r,h,f,m,v,i,s,o]}let Rp=class extends ce{constructor(t){super(),le(this,t,Vp,Bp,ae,{panoIndex:5,floorplanData:6,lastPanoramaLongitude:7,cameraImageUrl:0},Op)}};const Qp="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAArUAAAB7CAMAAABdA4ieAAAC91BMVEUAAACOpP/H0P+yxP/a4/+asv/W3/+/z/+cs//S3f+mu//Q2//5+v/H1P/d5f/l6//y9f++zf/i6f+ww/+ovP/7/P/u8v/N2f+Mp//q7/+4yf+uwf+Wr/+7y/+1xv+Ho//x9P+9zP+2x/+swP+gt/+Oqf/Y4v/r8P/l7P/b4//F0/+juf+Zsv+XsP+Trf/p7v97mv9wj/+kuv+ftf/x9P92lf/3+f/I1f+5yv+Eof98m//8/f/4+f90lf+9zf/j6f/T3f/L1/+Bnv/6+/+SrP/m7P/f5v/O2v/L2P/E0v/Az//+///s8P/e5v+rv/+pvv+Anv+qvv+Pqv+Kpv+CoP93l/9xlP/z9v/p7v90lf9uj//P2//v8//o7f/k6v/K1v+6yv9rjv98nv/E0v/9/v/09//h6P/X4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7awzYRWttYgWYrPcLbejWqua2WaCqBSixQLvWe5mi06RWqv8TDOhNUrZC9sdm+Xuu5cpUqvU+wwzYbVVkIXYLHd/olekVpmpZ8KiMYbU7ma/EXJZBW5JrZl2V9bRnNWyWe4xt8TWTPd3FdEYSEFslnsoURlAi01FqN56f2br2xeOe9ytgbyf4nErGg/hl6RN4Jc5Lt++2rVjHMdCIIqiqtoRQW2mMogIyZFjlsB2B9wjjaY1PXa3wcbSPaEDR1fP9fVt8aPai2+f2+TlWu2l0yweZHlEO5S9cyu1lDKj5T/fWCH4jLaUnXMbvFyrzby8xRrayqUM2+ZWqvuM1nmpgHWkl8F9z9yG7LNa5yEMa0n8yHb93Er1oXjnoMVyFn3KQVcP7VRpFn+sDiznaiuHNufsHnkIwy7aPA/r5jbFGW3m7S12ku55WPN7Li1PPIRhN6sjtBjTmm+KmYcwPEOKs9tHF1JDHCoHLZ5DQ8yPBic9DoHjAKvsb85qjbFxHOCprMZaf5qdhlorxwGeTsPIttvPlno0y3GAZfbHp6n3ynGAV0m99u/2J6H3znGAvW4n+J25tdY7xwFey1pvQe6/DlrjOMDLqfXW7N5pbs0YWhxgtpj0rl1uiaHFISzccSWohUCzOIemm0VKChwHOMutKCVwHOA4av/JVi0xtDiRpCRfRcvQ4lBfxSnG0OJc/+xTjKHFyVRMP38iDC0O92lZVRhanO+vcVWGFu9BRWkW7+Z3rapEizdy7ZVm8V5Gtr8AtSnix59eOmYAAAAASUVORK5CYII=";function Gp(n){me(n,"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 Np(n){let t,e,i,s,o;return{c(){t=x("div"),e=x("div"),i=K(),s=x("span"),o=De(n[0]),w(e,"class","floorplan-plugin__compass-image svelte-rpkaro"),S(e,"background-image",`url(${Qp})`),w(s,"class","floorplan-plugin__compass-text svelte-rpkaro"),w(t,"class","floorplan-plugin__compass svelte-rpkaro"),S(t,"transform",n[2])},m(r,a){O(r,t,a),L(t,e),L(t,i),L(t,s),L(s,o)},p(r,a){a&1&&Se(o,r[0])},d(r){r&&j(t)}}}function Fp(n){let t,e=n[1]&&Np(n);return{c(){e&&e.c(),t=Ie()},m(i,s){e&&e.m(i,s),O(i,t,s)},p(i,[s]){i[1]&&e.p(i,s)},i:J,o:J,d(i){e&&e.d(i),i&&j(t)}}}function _p(n){return n/Math.PI*180}function Hp(n,t,e){var c;let{floorplanData:i}=t,{northDesc:s}=t;const o=(c=i.entrance)==null?void 0:c.northRad,r=typeof o=="number",l=`translateX(-50%) translateZ(10px) rotate(${-(o?_p(o):0)+90}deg)`;return n.$$set=d=>{"floorplanData"in d&&e(3,i=d.floorplanData),"northDesc"in d&&e(0,s=d.northDesc)},[s,r,l,i]}class Wp extends ce{constructor(t){super(),le(this,t,Hp,Fp,ae,{floorplanData:3,northDesc:0},Gp)}}function Up(n){me(n,"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 Yp(n){let t,e,i,s,o,r,a,l,c,d;const h=[{floorIndex:n[2],floorplanData:n[11]}];let f={};for(let I=0;I<h.length;I+=1)f=st(f,h[I]);t=new Ip({props:f});let m=(n[3]||n[5])&&Dc(n);const A=[{floorplanData:n[11],floorIndex:n[2]}];let p={};for(let I=0;I<A.length;I+=1)p=st(p,A[I]);s=new oc({props:p});let g=n[6]&&xc(n),v=n[10]&&Sc(n),y=n[4]&&Lc(n),P=n[22]&&Tc(n);return{c(){oe(t.$$.fragment),e=K(),m&&m.c(),i=K(),oe(s.$$.fragment),o=K(),g&&g.c(),r=K(),v&&v.c(),a=K(),y&&y.c(),l=K(),P&&P.c(),c=Ie()},m(I,E){ne(t,I,E),O(I,e,E),m&&m.m(I,E),O(I,i,E),ne(s,I,E),O(I,o,E),g&&g.m(I,E),O(I,r,E),v&&v.m(I,E),O(I,a,E),y&&y.m(I,E),O(I,l,E),P&&P.m(I,E),O(I,c,E),d=!0},p(I,E){const C=E&2052?dt(h,[{floorIndex:I[2],floorplanData:I[11]}]):{};t.$set(C),I[3]||I[5]?m?(m.p(I,E),E&40&&D(m,1)):(m=Dc(I),m.c(),D(m,1),m.m(i.parentNode,i)):m&&(he(),T(m,1,1,()=>{m=null}),ue());const z=E&2052?dt(A,[{floorplanData:I[11],floorIndex:I[2]}]):{};s.$set(z),I[6]?g?(g.p(I,E),E&64&&D(g,1)):(g=xc(I),g.c(),D(g,1),g.m(r.parentNode,r)):g&&(he(),T(g,1,1,()=>{g=null}),ue()),I[10]?v?(v.p(I,E),E&1024&&D(v,1)):(v=Sc(I),v.c(),D(v,1),v.m(a.parentNode,a)):v&&(he(),T(v,1,1,()=>{v=null}),ue()),I[4]?y?(y.p(I,E),E&16&&D(y,1)):(y=Lc(I),y.c(),D(y,1),y.m(l.parentNode,l)):y&&(he(),T(y,1,1,()=>{y=null}),ue()),I[22]?P?(P.p(I,E),E&4194304&&D(P,1)):(P=Tc(I),P.c(),D(P,1),P.m(c.parentNode,c)):P&&(he(),T(P,1,1,()=>{P=null}),ue())},i(I){d||(D(t.$$.fragment,I),D(m),D(s.$$.fragment,I),D(g),D(v),D(y),D(P),d=!0)},o(I){T(t.$$.fragment,I),T(m),T(s.$$.fragment,I),T(g),T(v),T(y),T(P),d=!1},d(I){se(t,I),I&&j(e),m&&m.d(I),I&&j(i),se(s,I),I&&j(o),g&&g.d(I),I&&j(r),v&&v.d(I),I&&j(a),y&&y.d(I),I&&j(l),P&&P.d(I),I&&j(c)}}}function Xp(n){let t,e;return t=new zp({props:{missingFloorConfig:n[18]}}),{c(){oe(t.$$.fragment)},m(i,s){ne(t,i,s),e=!0},p(i,s){const o={};s&262144&&(o.missingFloorConfig=i[18]),t.$set(o)},i(i){e||(D(t.$$.fragment,i),e=!0)},o(i){T(t.$$.fragment,i),e=!1},d(i){se(t,i)}}}function Dc(n){let t,e;const i=[{floorIndex:n[2],floorplanData:n[11],hoveredRoom:n[24],highlightData:n[17]}];let s={};for(let o=0;o<i.length;o+=1)s=st(s,i[o]);return t=new kc({props:s}),{c(){oe(t.$$.fragment)},m(o,r){ne(t,o,r),e=!0},p(o,r){const a=r&16910340?dt(i,[{floorIndex:o[2],floorplanData:o[11],hoveredRoom:o[24],highlightData:o[17]}]):{};t.$set(a)},i(o){e||(D(t.$$.fragment,o),e=!0)},o(o){T(t.$$.fragment,o),e=!1},d(o){se(t,o)}}}function xc(n){let t,e;const i=[{floorplanData:n[11],roomAreaEnable:n[7],roomNameEnable:n[8],roomDimensionEnable:n[9],floorIndex:n[2],getRoomAreaText:n[12],getRoomDimensionText:n[13],getLabelElement:n[14],hoveredRoom:n[24],adaptiveRoomLabelVisibleEnable:n[16]}];let s={};for(let o=0;o<i.length;o+=1)s=st(s,i[o]);return t=new Jg({props:s}),{c(){oe(t.$$.fragment)},m(o,r){ne(t,o,r),e=!0},p(o,r){const a=r&16874372?dt(i,[{floorplanData:o[11],roomAreaEnable:o[7],roomNameEnable:o[8],roomDimensionEnable:o[9],floorIndex:o[2],getRoomAreaText:o[12],getRoomDimensionText:o[13],getLabelElement:o[14],hoveredRoom:o[24],adaptiveRoomLabelVisibleEnable:o[16]}]):{};t.$set(a)},i(o){e||(D(t.$$.fragment,o),e=!0)},o(o){T(t.$$.fragment,o),e=!1},d(o){se(t,o)}}}function Sc(n){let t,e;const i=[{floorplanData:n[11],floorIndex:n[2],getRuleDistanceText:n[15]}];let s={};for(let o=0;o<i.length;o+=1)s=st(s,i[o]);return t=new sp({props:s}),{c(){oe(t.$$.fragment)},m(o,r){ne(t,o,r),e=!0},p(o,r){const a=r&34820?dt(i,[{floorplanData:o[11],floorIndex:o[2],getRuleDistanceText:o[15]}]):{};t.$set(a)},i(o){e||(D(t.$$.fragment,o),e=!0)},o(o){T(t.$$.fragment,o),e=!1},d(o){se(t,o)}}}function Lc(n){let t,e;const i=[{panoIndex:n[0],floorplanData:n[11],lastPanoramaLongitude:n[19],cameraImageUrl:n[20]}];let s={};for(let o=0;o<i.length;o+=1)s=st(s,i[o]);return t=new Rp({props:s}),{c(){oe(t.$$.fragment)},m(o,r){ne(t,o,r),e=!0},p(o,r){const a=r&1574913?dt(i,[{panoIndex:o[0],floorplanData:o[11],lastPanoramaLongitude:o[19],cameraImageUrl:o[20]}]):{};t.$set(a)},i(o){e||(D(t.$$.fragment,o),e=!0)},o(o){T(t.$$.fragment,o),e=!1},d(o){se(t,o)}}}function Tc(n){let t,e;return t=new Wp({props:{floorplanData:n[11],northDesc:n[21]}}),{c(){oe(t.$$.fragment)},m(i,s){ne(t,i,s),e=!0},p(i,s){const o={};s&2048&&(o.floorplanData=i[11]),s&2097152&&(o.northDesc=i[21]),t.$set(o)},i(i){e||(D(t.$$.fragment,i),e=!0)},o(i){T(t.$$.fragment,i),e=!1},d(i){se(t,i)}}}function Zp(n){let t,e,i,s,o;const r=[Xp,Yp],a=[];function l(c,d){return c[23]?1:0}return e=l(n),i=a[e]=r[e](n),{c(){t=x("div"),i.c(),w(t,"class",s=Ge(`floorplan-plugin__floor${n[1]?" floorplan-plugin__floor--is-current":""}`)+" svelte-bl8zrz")},m(c,d){O(c,t,d),a[e].m(t,null),o=!0},p(c,[d]){let h=e;e=l(c),e===h?a[e].p(c,d):(he(),T(a[h],1,1,()=>{a[h]=null}),ue(),i=a[e],i?i.p(c,d):(i=a[e]=r[e](c),i.c()),D(i,1),i.m(t,null)),(!o||d&2&&s!==(s=Ge(`floorplan-plugin__floor${c[1]?" floorplan-plugin__floor--is-current":""}`)+" svelte-bl8zrz"))&&w(t,"class",s)},i(c){o||(D(i),o=!0)},o(c){T(i),o=!1},d(c){c&&j(t),a[e].d()}}}function Jp(n,t,e){let i,s,{panoIndex:o}=t,{isCurrent:r}=t,{floorIndex:a}=t,{highlightEnable:l}=t,{cameraEnable:c}=t,{hoverEnable:d}=t,{roomLabelsEnable:h}=t,{roomAreaEnable:f}=t,{roomNameEnable:m}=t,{roomDimensionEnable:A}=t,{ruleLabelsEnable:p}=t,{floorplanData:g}=t,{getRoomAreaText:v}=t,{getRoomDimensionText:y}=t,{getLabelElement:P}=t,{getRuleDistanceText:I}=t,{adaptiveRoomLabelVisibleEnable:E}=t,{highlightData:C}=t,{missingFloorConfig:z}=t,{lastPanoramaLongitude:R}=t,{cameraImageUrl:U}=t,{northDesc:H}=t,{compassEnable:N}=t;const F=Ar(void 0);return n.$$set=Q=>{"panoIndex"in Q&&e(0,o=Q.panoIndex),"isCurrent"in Q&&e(1,r=Q.isCurrent),"floorIndex"in Q&&e(2,a=Q.floorIndex),"highlightEnable"in Q&&e(3,l=Q.highlightEnable),"cameraEnable"in Q&&e(4,c=Q.cameraEnable),"hoverEnable"in Q&&e(5,d=Q.hoverEnable),"roomLabelsEnable"in Q&&e(6,h=Q.roomLabelsEnable),"roomAreaEnable"in Q&&e(7,f=Q.roomAreaEnable),"roomNameEnable"in Q&&e(8,m=Q.roomNameEnable),"roomDimensionEnable"in Q&&e(9,A=Q.roomDimensionEnable),"ruleLabelsEnable"in Q&&e(10,p=Q.ruleLabelsEnable),"floorplanData"in Q&&e(11,g=Q.floorplanData),"getRoomAreaText"in Q&&e(12,v=Q.getRoomAreaText),"getRoomDimensionText"in Q&&e(13,y=Q.getRoomDimensionText),"getLabelElement"in Q&&e(14,P=Q.getLabelElement),"getRuleDistanceText"in Q&&e(15,I=Q.getRuleDistanceText),"adaptiveRoomLabelVisibleEnable"in Q&&e(16,E=Q.adaptiveRoomLabelVisibleEnable),"highlightData"in Q&&e(17,C=Q.highlightData),"missingFloorConfig"in Q&&e(18,z=Q.missingFloorConfig),"lastPanoramaLongitude"in Q&&e(19,R=Q.lastPanoramaLongitude),"cameraImageUrl"in Q&&e(20,U=Q.cameraImageUrl),"northDesc"in Q&&e(21,H=Q.northDesc),"compassEnable"in Q&&e(22,N=Q.compassEnable)},n.$$.update=()=>{n.$$.dirty&2052&&e(25,i=g.floorDatas[a]),n.$$.dirty&33554432&&e(23,s=i.rooms.length>0)},[o,r,a,l,c,d,h,f,m,A,p,g,v,y,P,I,E,C,z,R,U,H,N,s,F,i]}let qp=class extends ce{constructor(t){super(),le(this,t,Jp,Zp,ae,{panoIndex:0,isCurrent:1,floorIndex:2,highlightEnable:3,cameraEnable:4,hoverEnable:5,roomLabelsEnable:6,roomAreaEnable:7,roomNameEnable:8,roomDimensionEnable:9,ruleLabelsEnable:10,floorplanData:11,getRoomAreaText:12,getRoomDimensionText:13,getLabelElement:14,getRuleDistanceText:15,adaptiveRoomLabelVisibleEnable:16,highlightData:17,missingFloorConfig:18,lastPanoramaLongitude:19,cameraImageUrl:20,northDesc:21,compassEnable:22},Up)}};function Kp(n){me(n,"svelte-86bqav",".floorplan-main.svelte-86bqav{width:100%;height:100%;pointer-events:none}")}function jc(n,t,e){const i=n.slice();return i[24]=t[e],i}function zc(n){let t,e,i,s=n[14].floorDatas,o=[];for(let a=0;a<s.length;a+=1)o[a]=Oc(jc(n,s,a));const r=a=>T(o[a],1,1,()=>{o[a]=null});return{c(){t=x("div");for(let a=0;a<o.length;a+=1)o[a].c();w(t,"class","floorplan-main svelte-86bqav")},m(a,l){O(a,t,l);for(let c=0;c<o.length;c+=1)o[c]&&o[c].m(t,null);i=!0},p(a,l){if(n=a,l&16777212){s=n[14].floorDatas;let c;for(c=0;c<s.length;c+=1){const d=jc(n,s,c);o[c]?(o[c].p(d,l),D(o[c],1)):(o[c]=Oc(d),o[c].c(),D(o[c],1),o[c].m(t,null))}for(he(),c=s.length;c<o.length;c+=1)r(c);ue()}},i(a){if(!i){for(let l=0;l<s.length;l+=1)D(o[l]);e||We(()=>{e=Si(t,ot,{duration:n[0],easing:ei}),e.start()}),i=!0}},o(a){o=o.filter(Boolean);for(let l=0;l<o.length;l+=1)T(o[l]);i=!1},d(a){a&&j(t),Ot(o,a)}}}function Oc(n){let t,e;const i=[{hoverEnable:n[6],highlightEnable:n[7],floorplanData:n[14],getRoomAreaText:n[17],getRoomDimensionText:n[18],getLabelElement:n[19],getRuleDistanceText:n[20],roomLabelsEnable:n[9],roomAreaEnable:n[10],roomNameEnable:n[11],roomDimensionEnable:n[12],ruleLabelsEnable:n[13],adaptiveRoomLabelVisibleEnable:n[21],highlightData:n[22],missingFloorConfig:n[23],panoIndex:n[3],cameraEnable:n[5],cameraImageUrl:n[16],lastPanoramaLongitude:n[15],compassEnable:n[8],northDesc:n[2]},{floorIndex:n[24].floorIndex},{isCurrent:n[24].floorIndex===n[4]}];let s={};for(let o=0;o<i.length;o+=1)s=st(s,i[o]);return t=new qp({props:s}),{c(){oe(t.$$.fragment)},m(o,r){ne(t,o,r),e=!0},p(o,r){const a=r&16777212?dt(i,[r&16777196&&{hoverEnable:o[6],highlightEnable:o[7],floorplanData:o[14],getRoomAreaText:o[17],getRoomDimensionText:o[18],getLabelElement:o[19],getRuleDistanceText:o[20],roomLabelsEnable:o[9],roomAreaEnable:o[10],roomNameEnable:o[11],roomDimensionEnable:o[12],ruleLabelsEnable:o[13],adaptiveRoomLabelVisibleEnable:o[21],highlightData:o[22],missingFloorConfig:o[23],panoIndex:o[3],cameraEnable:o[5],cameraImageUrl:o[16],lastPanoramaLongitude:o[15],compassEnable:o[8],northDesc:o[2]},r&16384&&{floorIndex:o[24].floorIndex},r&16400&&{isCurrent:o[24].floorIndex===o[4]}]):{};t.$set(a)},i(o){e||(D(t.$$.fragment,o),e=!0)},o(o){T(t.$$.fragment,o),e=!1},d(o){se(t,o)}}}function $p(n){let t,e,i=n[1]&&zc(n);return{c(){i&&i.c(),t=Ie()},m(s,o){i&&i.m(s,o),O(s,t,o),e=!0},p(s,[o]){s[1]?i?(i.p(s,o),o&2&&D(i,1)):(i=zc(s),i.c(),D(i,1),i.m(t.parentNode,t)):i&&(he(),T(i,1,1,()=>{i=null}),ue())},i(s){e||(D(i),e=!0)},o(s){T(i),e=!1},d(s){i&&i.d(s),s&&j(t)}}}function eA(n,t,e){let{duration:i=0}=t,{visible:s}=t,{northDesc:o}=t,{panoIndex:r}=t,{floorIndex:a}=t,{cameraEnable:l}=t,{hoverEnable:c}=t,{highlightEnable:d}=t,{compassEnable:h}=t,{roomLabelsEnable:f}=t,{roomAreaEnable:m}=t,{roomNameEnable:A}=t,{roomDimensionEnable:p}=t,{ruleLabelsEnable:g}=t,{floorplanData:v}=t,{lastPanoramaLongitude:y}=t,{cameraImageUrl:P}=t,{getRoomAreaText:I}=t,{getRoomDimensionText:E}=t,{getLabelElement:C}=t,{getRuleDistanceText:z}=t,{adaptiveRoomLabelVisibleEnable:R}=t,{highlightData:U}=t,{missingFloorConfig:H}=t;return n.$$set=N=>{"duration"in N&&e(0,i=N.duration),"visible"in N&&e(1,s=N.visible),"northDesc"in N&&e(2,o=N.northDesc),"panoIndex"in N&&e(3,r=N.panoIndex),"floorIndex"in N&&e(4,a=N.floorIndex),"cameraEnable"in N&&e(5,l=N.cameraEnable),"hoverEnable"in N&&e(6,c=N.hoverEnable),"highlightEnable"in N&&e(7,d=N.highlightEnable),"compassEnable"in N&&e(8,h=N.compassEnable),"roomLabelsEnable"in N&&e(9,f=N.roomLabelsEnable),"roomAreaEnable"in N&&e(10,m=N.roomAreaEnable),"roomNameEnable"in N&&e(11,A=N.roomNameEnable),"roomDimensionEnable"in N&&e(12,p=N.roomDimensionEnable),"ruleLabelsEnable"in N&&e(13,g=N.ruleLabelsEnable),"floorplanData"in N&&e(14,v=N.floorplanData),"lastPanoramaLongitude"in N&&e(15,y=N.lastPanoramaLongitude),"cameraImageUrl"in N&&e(16,P=N.cameraImageUrl),"getRoomAreaText"in N&&e(17,I=N.getRoomAreaText),"getRoomDimensionText"in N&&e(18,E=N.getRoomDimensionText),"getLabelElement"in N&&e(19,C=N.getLabelElement),"getRuleDistanceText"in N&&e(20,z=N.getRuleDistanceText),"adaptiveRoomLabelVisibleEnable"in N&&e(21,R=N.adaptiveRoomLabelVisibleEnable),"highlightData"in N&&e(22,U=N.highlightData),"missingFloorConfig"in N&&e(23,H=N.missingFloorConfig)},[i,s,o,r,a,l,c,d,h,f,m,A,p,g,v,y,P,I,E,C,z,R,U,H]}let br=class extends ce{constructor(t){super(),le(this,t,eA,$p,ae,{duration:0,visible:1,northDesc:2,panoIndex:3,floorIndex:4,cameraEnable:5,hoverEnable:6,highlightEnable:7,compassEnable:8,roomLabelsEnable:9,roomAreaEnable:10,roomNameEnable:11,roomDimensionEnable:12,ruleLabelsEnable:13,floorplanData:14,lastPanoramaLongitude:15,cameraImageUrl:16,getRoomAreaText:17,getRoomDimensionText:18,getLabelElement:19,getRuleDistanceText:20,adaptiveRoomLabelVisibleEnable:21,highlightData:22,missingFloorConfig:23},Kp)}};const tA="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC0AAAAwCAYAAACFUvPfAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAALaADAAQAAAABAAAAMAAAAADe2FZjAAAEF0lEQVRoBe2WzWskRRiHf13V092TxI2oEzYeVDwITtyDuCiihwiCePGgxIM3vYgHL4J4UIhBRA8i/gPqyUvWg7AiIuIeloDiYUHJLOK6BPwIk9nNODM9Xf1RVe1b3elJRjCZmQ6euqGmuqer33rq4e23GqiOykBloDJQGagMVAYqA5WBykBlYFYD1qwP/tdzaZqOx9zYOLxeX0+L5yzLGp0X/03a25MOnGRcBtx+6Rlo9SL08G4EooFnxa8Yiivox5/h5Ys/4cl7NVorNDRnngX+0MIkVMeMSf23zyKML8J7/Dy8hwF2Buh9CnS+AEQIdLspBuGb+M7/qLW4qJrNpsLapjYhpwVnx3BMfCtNNx3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const t=new Headers({"Content-Type":"text/plain"}),e=function(s){return W(this,null,function*(){const o={index:s.index,url:s.url,svgUrl:s.svg_url};if(s.svg_url){const r=yield fetch(s.svg_url,{headers:t}).then(a=>a.text());o.svgContent=r}return o})};return yield Promise.all(n.map(e))})}function nA(n){const t={id:n.id,size:n.size,name:n.name,path:n.path,roomType:n.room_type,floorType:n.floor_type,roomLabel:{position:n.room_label.position,positionInImage:n.room_label.position_in_image},observerIndexs:n.observer_indexs};return n.dimension&&Object.assign(t,{dimension:n.dimension}),t}function sA(n){return{floorName:n.floor_name,floorIndex:n.floor_index,rooms:n.rooms.map(nA),rules:n.rules}}function oA(n){return{index:n.index,floorIndex:n.floor_index,position:n.position,positionInImage:n.position_in_image}}function rA(n){return{rad:n.rad,position:n.position,positionInImage:n.position_in_image,northRad:n.north_rad,roomId:n.room_id,floorIndex:n.floor_index}}function Ai(n){return W(this,null,function*(){const t=yield iA(n.outlines),e=n.computed_data.bounding,i=n.computed_data.floor_datas.map(sA),s=n.computed_data.entrance?rA(n.computed_data.entrance):null;return{outlines:t,entrance:s,bounding:e,floorDatas:i,observers:n.computed_data.observers.map(oA)}})}function aA(n,t,e){return n.map(s=>{const o=s.position,r=s.icon?s.icon:{url:tA,width:45,height:48},a=ap(o,t),l=op(o,e),c=rp(l,e);return{floorIndex:a,icon:r,id:s.id,position:l,positionInImage:c}})}function lA(n,t){return t(n),n}function bn(n,t){return lA({},e=>{for(const i in n)t.indexOf(i)===-1&&(e[i]=n[i])})}function Bc(n,t){const e=Math.max(...n.work.observers.map(i=>i.floorIndex));return t>e?n.model.bounding.max.y:Math.max(...n.work.observers.filter(i=>i.floorIndex===t).map(i=>i.standingPosition.y))}function yr(n,t,e=gi.BOUNDING_CENTER){const i=Bc(n,t),s=Bc(n,t+1);return e===gi.BOUNDING_CENTER?(n.model.bounding.max.y+n.model.bounding.min.y)/2:e===gi.CEILING?s:i}function wr(n,t,e,i){const s=yr(n,e,i==null?void 0:i.attachedTo),o=new k.Vector3(0,s,0),r=new k.Vector3(1,s,0),a=o.clone().project(n.camera),l=r.clone().project(n.camera);return Math.abs((l.x-a.x)/1e3)*(t.getBoundingClientRect().width/2)}let Ti=class{constructor(t,e){u(this,"VERSION","3.20.4");u(this,"five");u(this,"hooks",new Ei);u(this,"staticPrefix","//vr-image-4.realsee-cdn.cn");this.five=t,e!=null&&e.staticPrefix&&(this.staticPrefix=e.staticPrefix)}getCurrentState(){return this.state}absoluteUrl(t){return Jo(this.staticPrefix,t)}},vi=class extends Ti{};var yt=(n=>(n.UnknownError="UnknownError",n.DataNotLoaded="DataNotLoaded",n.UpdateSizeError="UpdateSizeError",n.BreakOffByHide="BreakOffByHide",n.BreakOffByDisable="BreakOffByDisable",n.ModelNotLoaded="ModelNotLoaded",n.ChangeModeError="ChangeModeError",n.UpdateCameraError="UpdateCameraError",n))(yt||{});const Vc=500,cA=80;function ji(n,t,e=4){return Math.abs(n-t)<Math.pow(10,-e)}function Rc(n,t,e=4){const i=Math.PI*2,s=n%i,o=t%i,r=Math.min(s,o),a=Math.max(s,o);return ji(r,a,e)||ji(r+i,a,e)}Object.assign(window,{nearlyEqual:ji,nearlyEqualRad:Rc});function dA(n){return Object.prototype.toString.call(n)==="[object Object]"}function Qc(n){return dA(n)&&!!n.isVector3}function Cr(n,t){return W(this,null,function*(){const[e]=yield Li(n.changeMode(...t));if(e)throw new Error("change mode canceled");yield new Promise(r=>{n.once("initAnimationWillStart",()=>{n.once("initAnimationEnded",()=>r())})});const i=t[1];if(!i)return!0;const s=n.getCurrentState();if(!hA(i,s))throw new Error("pose 与预期不符")})}function hA(n,t){return Object.keys(n).every(e=>{const i=t[e],s=n[e];return i===void 0||s===void 0?!0:e==="longitude"||e==="latitude"?Rc(i,s,2):typeof i=="number"&&typeof s=="number"?ji(i,s,2):Qc(s)&&Qc(i)?s.distanceTo(i)<.01:i===s})}function uA(n,t){if(n.currentMode!==t.mode)return!1;const{latitude:e,longitude:i,fov:s,offset:o}=t,{latitude:r,longitude:a,offset:l}=n.getCurrentState(),c=n.camera.fov;return!(!ji(e,r,2)||!ji(i,a,2)||o!==void 0&&o.distanceTo(l)>.01||!ji(s,c,2))}function Gc(n,t,e=!0){return W(this,null,function*(){if(uA(n,t)===!0)return;const s=n.getCurrentState();if(s.mode!==t.mode){const[d]=yield Li(Cr(n,[t.mode,t,void 0,e]));if(d)throw d;return}const{latitude:o,longitude:r,fov:a}=s,l=Math.min(1e3,Math.max(200,Math.abs(o-Math.PI/2)*1e3,(r>Math.PI?2*Math.PI-r:r)*500,typeof t.fov=="number"?Math.abs(a-t.fov)*10:1/0)),[c]=yield Li(n.updateCamera(bn(t,["mode"]),l,e));if(c)throw new Error(yt.UpdateCameraError)})}function yn(n,t,e=300){const i=n.getElement();i&&(i.style.opacity=t+"",i.style.transition=e===0?"none":`opacity ${e}ms linear`,e!==0&&Promise.race([new Promise(s=>i.addEventListener("transitionend",s,{once:!0})),new Promise(s=>setTimeout(s,e))]).then(()=>{i.style.transition="none"}))}function fA(n){const{latitude:t,longitude:e}=n,i=Math.abs(t-Math.PI/2)>5*Math.PI/180,s=e>5*(Math.PI/180)&&e<355*(Math.PI/180);return i||s}function mA(n){const{latitude:t,longitude:e}=n,i=Math.abs(t-Math.PI/2)<10*Math.PI/180,s=e<30*(Math.PI/180)||e>330*(Math.PI/180);return i&&s}let gA=class extends vi{constructor(e,i){var l,c,d;super(e);u(this,"name","modelFloorplanPlugin");u(this,"state");u(this,"data");u(this,"showState");u(this,"showPromise");u(this,"app");u(this,"panoIndex",0);u(this,"floorIndex",0);u(this,"selector");u(this,"showRejection");u(this,"wrapper");u(this,"container",document.createElement("div"));u(this,"lastPanoramaLongitude",0);u(this,"size",{width:0,height:0});u(this,"defaultMissingFloorConfig");u(this,"hasAddedEventListener",!1);u(this,"isHiddenByHideFunc",!1);u(this,"highlightData",{});u(this,"dispose",()=>{var e,i;this.removeEventListener(),(e=this.app)==null||e.$destroy(),this.app=void 0,(i=this.container)==null||i.remove(),this.data=void 0,this.wrapper=void 0,this.selector=void 0,this.hooks.emit("dispose")});u(this,"show",(...i)=>W(this,[...i],function*(e={}){if(!this.state.enabled||!this.showPromise&&this.state.visible)return;const s=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!0},s),this._show(e)}));u(this,"hide",(...i)=>W(this,[...i],function*(e={}){this.state.enabled&&(this.isHiddenByHideFunc=!0,this.state.visible!==!1&&(this.updateState({visible:!1},e.userAction||!0),this._hide(e)))}));u(this,"updateSize",()=>{if(!this.data||!this.container||!this.wrapper)return!1;const{min:e,max:i}=this.data.bounding,s=i.x-e.x,o=i.y-e.y,r=this.state.config.attachedTo?{attachedTo:this.state.config.attachedTo}:void 0,a=wr(this.five,this.wrapper,this.floorIndex,r),l=Math.ceil(s*a),c=Math.ceil(o*a);return 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}),!0});u(this,"highlight",e=>{this.state.config.highlightEnable&&(this.highlightData=e,this.render())});u(this,"unhighlight",()=>{this.highlightData={},this.render()});u(this,"_disable",e=>{var s,o,r;const{userAction:i}=e;this.hooks.emit("disable",{userAction:i}),(s=this.showRejection)==null||s.call(this,yt.BreakOffByDisable),this.showPromise=void 0,(o=this.app)==null||o.$destroy(),this.app=void 0,(r=this.container)==null||r.remove(),this.removeEventListener()});u(this,"_enable",e=>{const{userAction:i}=e;this.addEventListener(),this.wrapper&&(this.wrapper.append(this.container),this.hooks.emit("enable",{userAction:i}),this.state.visible&&this._show({userAction:i}))});u(this,"_show",e=>W(this,null,function*(){var r;if(!this.state.enabled)return;if(!((r=this.five.model)!=null&&r.loaded))throw new Error(yt.ModelNotLoaded);if(!this.data)throw new Error(yt.DataNotLoaded);if(this.showPromise)return this.showPromise;const i={floorIndex:this.floorIndex,modelOpacity:this.state.config.modelOpacity,immediately:!1,isAutoShow:!1,userAction:!0},s=V(V({},i),e),o=()=>W(this,null,function*(){this.hooks.emit("show",{userAction:s.userAction,auto:s.isAutoShow});let a=!1,l;this.showRejection=h=>{a=!0,l=h};const[c]=yield Li(Gc(this.five,this.showState,s.userAction));if(c)throw c;if(a)throw l?new Error(l):new Error(yt.UnknownError);if(!this.updateSize())throw new Error(yt.UpdateSizeError);this.floorIndex=s.floorIndex,this.five.model.show(this.floorIndex)});return this.isHiddenByHideFunc=!1,this.showPromise=o().then(()=>{this.showPromise=void 0,this.showRejection=void 0;const a=s.modelOpacity,l=s.immediately?0:Vc;yn(this.five,a,l),this.render(l),this.hooks.emit("showAnimationEnded",{auto:s.isAutoShow,userAction:s.userAction})}).catch(a=>{if(this.showPromise=void 0,this.showRejection=void 0,this.updateState({visible:!1},s.userAction),!s.isAutoShow&&a instanceof Error)throw a}),this.showPromise}));u(this,"_hide",e=>{var o;(o=this.showRejection)==null||o.call(this,yt.BreakOffByHide),this.showPromise=void 0;const s=V(V({},{userAction:!0,isAutoHide:!1}),e);yn(this.five,1,0),this.hooks.emit("hide",{auto:s.isAutoHide,userAction:s.userAction}),this.render()});u(this,"handleClick",()=>{if(!this.state.visible)return;if(this.hooks.emit("click"))return!1});u(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("不正确的父容器选择器");this.wrapper=e,e.append(this.container)});u(this,"onFiveModeChange",e=>{e!==this.showState.mode&&(this.updateState({visible:!1},!1),this._hide({userAction:!1}))});u(this,"onFiveInteriaPan",(e,i)=>{if(!i||this.state.config.autoShowEnable===!1||this.isHiddenByHideFunc)return;const s=this.five.getCurrentState();s.mode==="Floorplan"&&(this.state.visible||mA(s)&&(this.updateState({visible:!0},!0),this._show({isAutoShow:!0})))});u(this,"onFivePanoArrived",e=>{var i;(i=this.five)!=null&&i.work&&(this.panoIndex=e,this.floorIndex=this.five.work.observers[e].floorIndex)});u(this,"onFiveCameraUpdate",(e,i)=>{if(!this.state.visible||this.showPromise)return;const s=this.five.getCurrentState();fA(s)&&(this.updateState({visible:!1},i),this._hide({userAction:i,isAutoHide:!0}))});u(this,"onFiveWantsGesture",(e,i)=>{if(this.state.visible&&(i.length>1||e==="mouseWheel"))return!1});u(this,"onFiveWantsPanGesture",(e,i)=>{if(this.five.getCurrentState().mode==="Floorplan"&&this.state.config.autoShowEnable!==!1&&i&&this.state.visible)return this.five.updateCamera(this.showState,0),!1});u(this,"onFiveWantsTapGesture",()=>this.handleClick());u(this,"onFiveWantsChangeMode",(e,i)=>{i==="Panorama"&&e==="Floorplan"&&(this.lastPanoramaLongitude=this.five.getCurrentState().longitude)});u(this,"onModelShownFloorChange",e=>{if(this.floorIndex!==e){if(e===null){const i=this.five.getCurrentState().panoIndex;this.floorIndex=this.five.work.observers[i].floorIndex;return}this.floorIndex=e,this.updateSize(),this.render()}});i!=null&&i.selector&&(this.selector=i.selector,console.warn("不推荐继续使用 params.selector 配置父容器,请使用 appendTo 方法")),this.showState={mode:"Floorplan",longitude:0,latitude:Math.PI/2,fov:cA/((l=i==null?void 0:i.scale)!=null?l:1)},this.defaultMissingFloorConfig={imageURL:this.staticPrefix+"/release/web/saas/missing-floorplan.e274c596.png",imageWidth:200,imageHeight:120,text:(d=(c=i.i18n)==null?void 0:c.call(i,"暂无平面图"))!=null?d:"暂无平面图",textFontSize:14};const s={northDesc:"北",modelOpacity:1,cameraEnable:!0,highlightEnable:!1,hoverEnable:!0,compassEnable:!0,autoShowEnable:!0,ruleLabelsEnable:!0,roomLabelsEnable:!0,roomAreaEnable:!0,roomNameEnable:!0,roomDimensionEnable:!0,adaptiveRoomLabelVisibleEnable:!0,cameraImageUrl:pi,attachedTo:gi.BOUNDING_CENTER,getLabelElement:void 0,missingFloorConfig:V(V({},this.defaultMissingFloorConfig),i.missingFloorConfig),i18n:h=>h,getRoomAreaText:h=>(h/1e6).toFixed(1)+"㎡",getRoomDimensionText:(h,f)=>(h/1e3).toFixed(1)+"m × "+(f/1e3).toFixed(1)+"m",getRuleDistanceText:h=>h.toString()},o=i?bn(i,["selector","scale"]):{},r=V(V({},s.missingFloorConfig),o.missingFloorConfig),a=ge(V(V({},s),o),{missingFloorConfig:r});this.state={enabled:!0,visible:!1,config:a},this.initContainer(),e.once("dispose",this.dispose),this.addEventListener()}load(e,i,s=!0){return W(this,null,function*(){function o(d){return Object.prototype.hasOwnProperty.apply(d,["version"])}const r=e;r&&!r.version&&console.warn("传入 serverData.data 的方式后续可能不再支持,请把 serverData 整体传入 load 函数");const a=JSON.parse(JSON.stringify(e)),l=o(a)?a.data:a,c=this.data;this.data=yield Ai(l),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,c),i&&this.updateState(i,s),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 i=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!0},e.userAction||i),this._enable({userAction:i})}disable(e={}){if(!this.state.enabled)return;const i=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!1},e.userAction||i),this._disable({userAction:i})}setState(e,i={}){const s=this.state,o=i.userAction!==void 0?i.userAction:!0;if(this.updateState(e,o),e.enabled!==void 0&&s.enabled!==e.enabled&&(e.enabled?this._enable({userAction:o}):this._disable({userAction:o})),e.visible!==void 0&&s.visible!==e.visible){const r={userAction:o};e.visible?this._show(r):this._hide(r)}this.render()}changeConfigs(e,i=!0){this.updateState({config:e},i),this.render()}formatData(e){return W(this,null,function*(){return yield Ai(e.data)})}updateState(e,i){var a;const s=this.state,o=(a=e.config)!=null&&a.missingFloorConfig?V(V({},s.config.missingFloorConfig),e.config.missingFloorConfig):s.config.missingFloorConfig,r=e.config?ge(V(V({},s.config),e.config),{missingFloorConfig:o}):s.config;this.state=ge(V(V({},this.state),e),{config:r}),!ct(this.state,s,{deep:!0})&&this.hooks.emit("stateChange",{state:this.state,prevState:s,userAction:i})}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.model.loaded?this.onFiveModelLoaded():e.once("modelLoaded",this.onFiveModelLoaded),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||this.showPromise)return;const i=ge(V({},this.state.config),{visible:this.state.visible,duration:e!=null?e:0,panoIndex:this.panoIndex,floorIndex:this.floorIndex,floorplanData:this.data,lastPanoramaLongitude:this.lastPanoramaLongitude,highlightData:this.highlightData});if(this.app)return this.app.$set(i);this.app=new br({target:this.container,intro:!0,props:i})}};const pA=(n,t)=>new gA(n,t);function AA(n){const{latitude:t,longitude:e}=n,i=Math.abs(t-Math.PI/2)>5*Math.PI/180,s=e>5*(Math.PI/180)&&e<355*(Math.PI/180);return i||s}function vA(n){const{latitude:t,longitude:e}=n,i=Math.abs(t-Math.PI/2)<10*Math.PI/180,s=e<30*(Math.PI/180)||e>330*(Math.PI/180);return i&&s}let bA=class extends vi{constructor(e,i){var l,c;super(e);u(this,"name","modelFloorplanPlugin");u(this,"state");u(this,"data");u(this,"showState");u(this,"showPromise");u(this,"app");u(this,"panoIndex",0);u(this,"floorIndex",0);u(this,"selector");u(this,"showRejection");u(this,"wrapper");u(this,"container",document.createElement("div"));u(this,"lastPanoramaLongitude",0);u(this,"size",{width:0,height:0});u(this,"defaultMissingFloorConfig");u(this,"hasAddedEventListener",!1);u(this,"isHiddenByHideFunc",!1);u(this,"highlightData",{});u(this,"dispose",()=>{var e,i;this.removeEventListener(),(e=this.app)==null||e.$destroy(),this.app=void 0,(i=this.container)==null||i.remove(),this.data=void 0,this.wrapper=void 0,this.selector=void 0,this.hooks.emit("dispose")});u(this,"show",(...i)=>W(this,[...i],function*(e={}){if(!this.state.enabled||!this.showPromise&&this.state.visible)return;const s=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!0},s),this._show(e)}));u(this,"hide",(...i)=>W(this,[...i],function*(e={}){this.state.enabled&&(this.isHiddenByHideFunc=!0,this.state.visible!==!1&&(this.updateState({visible:!1},e.userAction||!0),this._hide(e)))}));u(this,"updateSize",()=>{if(!this.data||!this.container||!this.wrapper)return!1;const{min:e,max:i}=this.data.bounding,s=i.x-e.x,o=i.y-e.y,r=this.state.config.attachedTo?{attachedTo:this.state.config.attachedTo}:void 0,a=wr(this.five,this.wrapper,this.floorIndex,r),l=Math.ceil(s*a),c=Math.ceil(o*a);return 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}),!0});u(this,"highlight",e=>{this.state.config.highlightEnable&&(this.highlightData=e,this.render())});u(this,"unhighlight",()=>{this.highlightData={},this.render()});u(this,"_disable",e=>{var s,o,r;const{userAction:i}=e;this.hooks.emit("disable",{userAction:i}),(s=this.showRejection)==null||s.call(this,yt.BreakOffByDisable),this.showPromise=void 0,(o=this.app)==null||o.$destroy(),this.app=void 0,(r=this.container)==null||r.remove(),this.removeEventListener()});u(this,"_enable",e=>{const{userAction:i}=e;this.addEventListener(),this.wrapper&&(this.wrapper.append(this.container),this.hooks.emit("enable",{userAction:i}),this.state.visible&&this._show({userAction:i}))});u(this,"_show",e=>W(this,null,function*(){var r;if(!this.state.enabled)return;if(!((r=this.five.model)!=null&&r.loaded))throw new Error(yt.ModelNotLoaded);if(!this.data)throw new Error(yt.DataNotLoaded);if(this.showPromise)return this.showPromise;const i={floorIndex:this.floorIndex,modelOpacity:this.state.config.modelOpacity,immediately:!1,isAutoShow:!1,userAction:!0},s=V(V({},i),e),o=()=>W(this,null,function*(){this.hooks.emit("show",{userAction:s.userAction,auto:s.isAutoShow});let a=!1,l;this.showRejection=h=>{a=!0,l=h};const[c]=yield Li(Gc(this.five,this.showState,s.userAction));if(c)throw c;if(a)throw l?new Error(l):new Error(yt.UnknownError);if(!this.updateSize())throw new Error(yt.UpdateSizeError);this.updatePosition(),this.floorIndex=s.floorIndex,this.five.model.show(this.floorIndex)});return this.isHiddenByHideFunc=!1,this.showPromise=o().then(()=>{this.showPromise=void 0,this.showRejection=void 0;const a=s.modelOpacity,l=s.immediately?0:Vc;yn(this.five,a,l),this.render(l),this.hooks.emit("showAnimationEnded",{auto:s.isAutoShow,userAction:s.userAction})}).catch(a=>{if(this.showPromise=void 0,this.showRejection=void 0,this.updateState({visible:!1},s.userAction),!s.isAutoShow&&a instanceof Error)throw a}),this.showPromise}));u(this,"_hide",e=>{var o;(o=this.showRejection)==null||o.call(this,yt.BreakOffByHide),this.showPromise=void 0;const s=V(V({},{userAction:!0,isAutoHide:!1}),e);yn(this.five,1,0),this.hooks.emit("hide",{auto:s.isAutoHide,userAction:s.userAction}),this.render()});u(this,"handleClick",()=>{if(!this.state.visible)return;if(this.hooks.emit("click"))return!1});u(this,"onFiveModelLoaded",()=>{const i=this.five.model.bounding.getCenter(new k.Vector3);if(this.showState.offset=i,this.state.enabled===!1||this.wrapper||!this.selector)return;const s=this.selector instanceof Element?this.selector:document.querySelector(this.selector);if(!s)throw new Error("不正确的父容器选择器");this.wrapper=s,s.append(this.container)});u(this,"onFiveModeChange",e=>{e!==this.showState.mode&&(this.updateState({visible:!1},!1),this._hide({userAction:!1}))});u(this,"onFiveInteriaPan",(e,i)=>{if(!i||this.state.visible||this.state.config.autoShowEnable===!1||this.isHiddenByHideFunc)return;const s=this.five.getCurrentState();s.mode===this.showState.mode&&vA(s)&&(this.updateState({visible:!0},!0),this._show({isAutoShow:!0}))});u(this,"onFivePanoArrived",e=>{var i;(i=this.five)!=null&&i.work&&(this.panoIndex=e,this.floorIndex=this.five.work.observers[e].floorIndex)});u(this,"onFiveCameraUpdate",(e,i)=>{if(!this.state.visible||this.showPromise)return;const s=this.five.getCurrentState();this.updatePosition(),this.updateSize(),AA(s)&&(this.updateState({visible:!1},i),this._hide({userAction:i}))});u(this,"onFiveWantsPanGesture",(e,i)=>{if(this.five.getCurrentState().mode===this.showState.mode&&this.state.config.autoShowEnable!==!1&&i&&this.state.visible)return this.five.updateCamera(bn(this.showState,["offset"]),0),!1});u(this,"onFiveWantsTapGesture",()=>this.handleClick());u(this,"onFiveWantsChangeMode",(e,i)=>{i==="Panorama"&&e===this.showState.mode&&(this.lastPanoramaLongitude=this.five.getCurrentState().longitude)});u(this,"onModelShownFloorChange",e=>{if(this.floorIndex!==e){if(e===null){const i=this.five.getCurrentState().panoIndex;this.floorIndex=this.five.work.observers[i].floorIndex;return}this.floorIndex=e,this.updateSize(),this.render()}});i!=null&&i.selector&&(this.selector=i.selector,console.warn("不推荐继续使用 params.selector 配置父容器,请使用 appendTo 方法")),this.showState={mode:"Mapview",longitude:0,latitude:Math.PI/2},this.defaultMissingFloorConfig={imageURL:this.staticPrefix+"/release/web/saas/missing-floorplan.e274c596.png",imageWidth:200,imageHeight:120,text:(c=(l=i.i18n)==null?void 0:l.call(i,"暂无平面图"))!=null?c:"暂无平面图",textFontSize:14};const s={northDesc:"北",modelOpacity:1,cameraEnable:!0,highlightEnable:!1,hoverEnable:!0,compassEnable:!0,autoShowEnable:!0,ruleLabelsEnable:!0,roomLabelsEnable:!0,roomAreaEnable:!0,roomNameEnable:!0,roomDimensionEnable:!0,cameraImageUrl:pi,attachedTo:gi.BOUNDING_CENTER,getLabelElement:void 0,adaptiveRoomLabelVisibleEnable:!0,missingFloorConfig:V(V({},this.defaultMissingFloorConfig),i.missingFloorConfig),i18n:d=>d,getRoomAreaText:d=>(d/1e6).toFixed(1)+"㎡",getRoomDimensionText:(d,h)=>(d/1e3).toFixed(1)+"m × "+(h/1e3).toFixed(1)+"m",getRuleDistanceText:d=>d.toString()},o=i?bn(i,["selector","scale"]):{},r=V(V({},s.missingFloorConfig),o.missingFloorConfig),a=ge(V(V({},s),o),{missingFloorConfig:r});this.state={enabled:!0,visible:!1,config:a},this.initContainer(),e.model.loaded?this.onFiveModelLoaded():e.once("modelLoaded",this.onFiveModelLoaded),e.once("dispose",this.dispose),this.addEventListener()}load(e,i,s=!0){return W(this,null,function*(){function o(d){return Object.prototype.hasOwnProperty.apply(d,["version"])}const r=e;r&&!r.version&&console.warn("传入 serverData.data 的方式后续可能不再支持,请把 serverData 整体传入 load 函数");const a=JSON.parse(JSON.stringify(e)),l=o(a)?a.data:a,c=this.data;this.data=yield Ai(l),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,c),i&&this.updateState(i,s),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 i=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!0},e.userAction||i),this._enable({userAction:i})}disable(e={}){if(!this.state.enabled)return;const i=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!1},e.userAction||i),this._disable({userAction:i})}setState(e,i={}){const s=this.state,o=i.userAction!==void 0?i.userAction:!0;if(this.updateState(e,o),e.enabled!==void 0&&s.enabled!==e.enabled&&(e.enabled?this._enable({userAction:o}):this._disable({userAction:o})),e.visible!==void 0&&s.visible!==e.visible){const r={userAction:o};e.visible?this._show(r):this._hide(r)}}changeConfigs(e,i=!0){this.updateState({config:e},i),this.render()}updatePosition(){var a;const e=yr(this.five,this.floorIndex,this.state.config.attachedTo),i=(a=this.five.model)==null?void 0:a.bounding.getCenter(new k.Vector3).setY(e);if(!i)return;const s=i.clone().project(this.five.camera),o=(s.x+1)/2,r=-(s.y-1)/2;this.container.style.left=o*100+"%",this.container.style.top=r*100+"%"}formatData(e){return W(this,null,function*(){return yield Ai(e.data)})}updateState(e,i){var a;const s=this.state,o=(a=e.config)!=null&&a.missingFloorConfig?V(V({},s.config.missingFloorConfig),e.config.missingFloorConfig):s.config.missingFloorConfig,r=e.config?ge(V(V({},s.config),e.config),{missingFloorConfig:o}):s.config;this.state=ge(V(V({},this.state),e),{config:r}),!ct(this.state,s,{deep:!0})&&this.hooks.emit("stateChange",{state:this.state,prevState:s,userAction:i})}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("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||this.showPromise)return;const i=ge(V({},this.state.config),{visible:this.state.visible,duration:e!=null?e:0,panoIndex:this.panoIndex,floorIndex:this.floorIndex,floorplanData:this.data,lastPanoramaLongitude:this.lastPanoramaLongitude,highlightData:this.highlightData});if(this.app)return this.app.$set(i);this.app=new br({target:this.container,intro:!0,props:i})}};const yA=(n,t)=>new bA(n,t);let wA=class extends vi{constructor(e,i){var l,c;super(e);u(this,"name","topviewFloorplanPlugin");u(this,"state");u(this,"data");u(this,"app");u(this,"selector");u(this,"panoIndex",0);u(this,"floorIndex",0);u(this,"wrapper");u(this,"container",document.createElement("div"));u(this,"lastPanoramaLongitude",0);u(this,"size",{width:0,height:0});u(this,"defaultMissingFloorConfig");u(this,"hasAddedEventListener",!1);u(this,"isHiddenByHideFunc",!1);u(this,"highlightData",{});u(this,"updateSize",()=>{if(!this.data||!this.container||!this.wrapper||this.five.getCurrentState().mode!=="Topview")return!1;const{min:e,max:i}=this.data.bounding,s=i.x-e.x,o=i.y-e.y,r=this.state.config.attachedTo?{attachedTo:this.state.config.attachedTo}:void 0,a=wr(this.five,this.wrapper,this.floorIndex,r),l=Math.ceil(s*a),c=Math.ceil(o*a);return 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}),!0});u(this,"dispose",()=>{var e,i;this.removeEventListener(),(e=this.app)==null||e.$destroy(),this.app=void 0,(i=this.container)==null||i.remove(),this.data=void 0,this.wrapper=void 0,this.selector=void 0,this.hooks.emit("dispose")});u(this,"highlight",e=>{this.state.config.highlightEnable&&(this.highlightData=e,this.render())});u(this,"unhighlight",()=>{this.highlightData={},this.render()});u(this,"_disable",e=>{var s,o;const{userAction:i}=e;(s=this.app)==null||s.$destroy(),this.app=void 0,(o=this.container)==null||o.remove(),this.removeEventListener(),this.hooks.emit("disable",{userAction:i})});u(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("不正确的父容器选择器");this.wrapper=e,e.append(this.container)});u(this,"onFiveModeChange",(...[e,,,,i])=>{e!=="Topview"&&this.state.visible&&(this.updateState({visible:!1},i),this._hide({userAction:i}))});u(this,"onFivePanoArrived",e=>{var i;(i=this.five)!=null&&i.work&&(this.panoIndex=e,this.floorIndex=this.five.work.observers[e].floorIndex)});u(this,"onFiveCameraUpdate",(e,i)=>{this.state.visible&&(this.updatePosition(),this.updateSize())});u(this,"onFiveWantsGesture",e=>{if(!(e!=="pan"&&e!=="pinch"&&e!=="mouseWheel")&&this.state.visible&&!this.state.config.gestureEnable)return!1});u(this,"onFiveWantsMoveToPano",()=>{if(this.state.visible&&this.state.config.preventRoomClick)return!1});u(this,"onFiveInitAnimationEnded",(...[,,e])=>{const{mode:i}=this.five.getCurrentState();i==="Topview"&&!this.isHiddenByHideFunc&&!this.state.visible&&this.state.config.autoShowEnable&&(this.updateState({visible:!0},e),this._show({userAction:e}))});u(this,"onModelShownFloorChange",e=>{if(this.floorIndex!==e){if(e===null){const i=this.five.getCurrentState().panoIndex;this.floorIndex=this.five.work.observers[i].floorIndex;return}this.floorIndex=e,this.updateSize(),this.render()}});i!=null&&i.selector&&(this.selector=i.selector,console.warn("不推荐继续使用 params.selector 配置父容器,请使用 appendTo 方法")),this.defaultMissingFloorConfig={imageURL:this.staticPrefix+"/release/web/saas/missing-floorplan.e274c596.png",imageWidth:200,imageHeight:120,text:(c=(l=i.i18n)==null?void 0:l.call(i,"暂无平面图"))!=null?c:"暂无平面图",textFontSize:14};const s={northDesc:"北",modelOpacity:1,cameraEnable:!0,hoverEnable:!0,highlightEnable:!1,compassEnable:!0,gestureEnable:!1,autoShowEnable:!0,ruleLabelsEnable:!0,roomLabelsEnable:!0,roomAreaEnable:!0,roomNameEnable:!0,roomDimensionEnable:!0,cameraImageUrl:pi,attachedTo:gi.BOUNDING_CENTER,getLabelElement:void 0,missingFloorConfig:V(V({},this.defaultMissingFloorConfig),i.missingFloorConfig),i18n:d=>d,adaptiveRoomLabelVisibleEnable:!0,getRoomAreaText:d=>(d/1e6).toFixed(1)+"㎡",getRoomDimensionText:(d,h)=>(d/1e3).toFixed(1)+"m × "+(h/1e3).toFixed(1)+"m",getRuleDistanceText:d=>d.toString()},o=i?bn(i,["selector","scale"]):{},r=V(V({},s.missingFloorConfig),o.missingFloorConfig),a=ge(V(V({},s),o),{missingFloorConfig:r});this.state={enabled:!0,visible:!1,config:a},this.initContainer(),e.model.loaded?this.onFiveModelLoaded():e.once("modelLoaded",this.onFiveModelLoaded),e.once("dispose",this.dispose),this.addEventListener()}load(e,i,s=!0){return W(this,null,function*(){function o(d){return Object.prototype.hasOwnProperty.apply(d,["version"])}const r=e;r&&!r.version&&console.warn("传入 serverData.data 的方式后续可能不再支持,请把 serverData 整体传入 load 函数");const a=JSON.parse(JSON.stringify(e)),l=o(a)?a.data:a,c=this.data;this.data=yield Ai(l),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,c),i&&this.updateState(i,s),this.render()})}updatePosition(){var a;const e=yr(this.five,this.floorIndex,this.state.config.attachedTo),i=(a=this.five.model)==null?void 0:a.bounding.getCenter(new k.Vector3).setY(e);if(!i)return;const s=i.clone().project(this.five.camera),o=(s.x+1)/2,r=-(s.y-1)/2;this.container.style.left=o*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 W(this,arguments,function*(e={}){if(this.state.visible)return;const i=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!0},i),this._show({userAction:i})})}hide(){return W(this,arguments,function*(e={}){if(this.isHiddenByHideFunc=!0,!this.state.visible)return;const i=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!1},i),this._hide({userAction:i})})}enable(e={}){if(this.state.enabled)return;const i=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!0},e.userAction||i),this._enable({userAction:i})}disable(e={}){if(!this.state.enabled)return;const i=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!1},e.userAction||i),this._disable({userAction:i})}setState(e,i={}){const s=this.state,o=i.userAction!==void 0?i.userAction:!0;if(this.updateState(e,o),e.enabled!==void 0&&s.enabled!==e.enabled){const r={userAction:o};e.enabled?this._enable(r):this._disable(r)}if(e.visible!==void 0&&s.visible!==e.visible){const r={userAction:o};e.visible?this._show(r):this._hide(r)}}changeConfigs(e,i=!0){this.updateState({config:e},i),this.render()}formatData(e){return W(this,null,function*(){return yield Ai(e.data)})}_show(e){return W(this,null,function*(){if(!this.state.enabled)return;this.isHiddenByHideFunc=!1;const{userAction:i}=e;this.hooks.emit("show",{userAction:i,auto:!1}),this.five.getCurrentState().mode!=="Topview"&&(yield Cr(this.five,["Topview",void 0,void 0,i])),this.five.model.show(this.floorIndex),this.updatePosition(),this.updateSize();const s=500,o=this.state.config.modelOpacity;yn(this.five,o,s),this.hooks.emit("showAnimationEnded",{userAction:i,auto:!1}),this.render()})}_hide(e){return W(this,null,function*(){if(!this.state.enabled)return;const{userAction:i}=e;this.hooks.emit("hide",{userAction:i,auto:!1});const s=1,o=0;yn(this.five,s,o),this.render()})}_enable(e){const{userAction:i}=e;this.addEventListener(),this.wrapper&&this.wrapper.append(this.container),this.hooks.emit("enable",{userAction:i}),this.state.visible&&this._show({userAction:i})}updateState(e,i){var a;const s=this.state,o=(a=e.config)!=null&&a.missingFloorConfig?V(V({},s.config.missingFloorConfig),e.config.missingFloorConfig):s.config.missingFloorConfig,r=e.config?ge(V(V({},s.config),e.config),{missingFloorConfig:o}):s.config;this.state=ge(V(V({},this.state),e),{config:r}),!ct(this.state,s,{deep:!0})&&this.hooks.emit("stateChange",{state:this.state,prevState:s,userAction:i})}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 i=ge(V({},this.state.config),{visible:this.state.visible,duration:e!=null?e:0,panoIndex:this.panoIndex,floorIndex:this.floorIndex,floorplanData:this.data,lastPanoramaLongitude:this.lastPanoramaLongitude,highlightData:this.highlightData});if(this.app)return this.app.$set(i);this.app=new br({target:this.container,intro:!0,props:i})}};const CA=(n,t)=>new wA(n,t);function Ir(n,t=200){let e;return function(...i){e||(n(...i),e=setTimeout(function(){e=null},t))}}function IA(n){me(n,"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 PA(n){let t,e,i;return{c(){t=x("div"),e=x("div"),i=x("div"),w(i,"class","plugin-radar__camera-rotate svelte-1nqrlxd"),S(i,"background-image","url("+(n[0]||pi)+")"),S(i,"transform",n[1]),w(e,"class","plugin-radar__camera-position svelte-1nqrlxd"),S(e,"transform",n[2]),w(t,"class","plugin-radar__camera-wrapper svelte-1nqrlxd"),S(t,"opacity",n[3]?1:0)},m(s,o){O(s,t,o),L(t,e),L(e,i)},p(s,[o]){o&1&&S(i,"background-image","url("+(s[0]||pi)+")"),(o&1||o&3)&&S(i,"transform",s[1]),o&4&&S(e,"transform",s[2]),o&8&&S(t,"opacity",s[3]?1:0)},i:J,o:J,d(s){s&&j(t)}}}function kA(n){return`rotate(${Math.floor(n/Math.PI*180)*-1+45}deg)`}function MA(n,t,e){var y,P;let i,s,o,r,{five:a}=t,{pxmm:l}=t,{floorplanData:c}=t,{cameraImageUrl:d}=t,h=a.getCurrentState().panoIndex,f=a.getCurrentState().longitude,m=(P=(y=a.work.observers[a.getCurrentState().panoIndex])==null?void 0:y.floorIndex)!=null?P:0;function A(I,E){const C=I.bounding,z=I.observers[E];if(!z)return"";const R=(C.max.x-C.min.x)*l,U=(C.max.y-C.min.y)*l,H=Math.floor(z.positionInImage.x*R),N=Math.floor(z.positionInImage.y*U);return`translate(${H}px, ${N}px)`}function p(I){e(7,h=I)}function g(I){e(9,m=a.work.observers[I].floorIndex)}const v=Ir(I=>{e(8,f=I.longitude)},1e3/60);return gt(()=>(a.on("panoWillArrive",p),a.on("panoArrived",g),a.on("cameraDirectionUpdate",v),function(){a.off("panoWillArrive",p),a.off("panoArrived",g),a.off("cameraDirectionUpdate",v)})),n.$$set=I=>{"five"in I&&e(4,a=I.five),"pxmm"in I&&e(5,l=I.pxmm),"floorplanData"in I&&e(6,c=I.floorplanData),"cameraImageUrl"in I&&e(0,d=I.cameraImageUrl)},n.$$.update=()=>{n.$$.dirty&576&&e(10,i=c.floorDatas[m]),n.$$.dirty&1024&&e(3,s=i.rooms.length>0),n.$$.dirty&192&&e(2,o=A(c,h)),n.$$.dirty&256&&e(1,r=kA(f))},[d,r,o,s,a,l,c,h,f,m,i]}class EA extends ce{constructor(t){super(),le(this,t,MA,PA,ae,{five:4,pxmm:5,floorplanData:6,cameraImageUrl:0},IA)}}function DA(n){me(n,"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 Nc(n,t,e){const i=n.slice();return i[1]=t[e],i}function Fc(n,t){let e,i,s=`${t[1].icon.width/16}rem`,o=`${t[1].icon.height/16}rem`,r,a=`${t[1].positionInImage.y*100}%`,l=`${t[1].positionInImage.x*100}%`;return{key:n,first:null,c(){e=x("div"),i=x("div"),r=K(),w(i,"class","plugin-pano-floorplan__extra-object-item svelte-1i87fz7"),S(i,"background-image",`url(${t[1].icon.url})`),S(i,"width",s),S(i,"height",o),w(e,"class","plugin-pano-floorplan__extra-object-item--position svelte-1i87fz7"),S(e,"top",a),S(e,"left",l),this.first=e},m(c,d){O(c,e,d),L(e,i),L(e,r)},p(c,d){t=c,d&1&&S(i,"background-image",`url(${t[1].icon.url})`);const h=d&1;h&&S(i,"width",s),h&&S(i,"height",o),d&1&&a!==(a=`${t[1].positionInImage.y*100}%`)&&S(e,"top",a),d&1&&l!==(l=`${t[1].positionInImage.x*100}%`)&&S(e,"left",l)},d(c){c&&j(e)}}}function xA(n){let t,e=[],i=new Map,s=n[0];const o=r=>r[1].id;for(let r=0;r<s.length;r+=1){let a=Nc(n,s,r),l=o(a);i.set(l,e[r]=Fc(l,a))}return{c(){t=x("div");for(let r=0;r<e.length;r+=1)e[r].c();w(t,"class","plugin-pano-floorplan__extra-objects svelte-1i87fz7")},m(r,a){O(r,t,a);for(let l=0;l<e.length;l+=1)e[l]&&e[l].m(t,null)},p(r,[a]){a&1&&(s=r[0],e=Bt(e,a,o,1,r,s,i,t,mr,Fc,null,Nc))},i:J,o:J,d(r){r&&j(t);for(let a=0;a<e.length;a+=1)e[a].d()}}}function SA(n,t,e){let{extraObjects:i=[]}=t;return n.$$set=s=>{"extraObjects"in s&&e(0,i=s.extraObjects)},[i]}class LA extends ce{constructor(t){super(),le(this,t,SA,xA,ae,{extraObjects:0},DA)}}function TA(n){me(n,"svelte-18287ai",".missing-floor-wrapper.svelte-18287ai{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;display:flex;justify-content:center;align-items:center}.missing-floor-image.svelte-18287ai{max-width:100%;max-height:100%}")}function jA(n){let t,e,i,s,o,r;const a=[{floorIndex:n[2],floorplanData:n[4]}];let l={};for(let d=0;d<a.length;d+=1)l=st(l,a[d]);t=new oc({props:l}),i=new LA({props:{extraObjects:n[7]}});let c=n[3]&&_c(n);return{c(){oe(t.$$.fragment),e=K(),oe(i.$$.fragment),s=K(),c&&c.c(),o=Ie()},m(d,h){ne(t,d,h),O(d,e,h),ne(i,d,h),O(d,s,h),c&&c.m(d,h),O(d,o,h),r=!0},p(d,h){const f=h&20?dt(a,[{floorIndex:d[2],floorplanData:d[4]}]):{};t.$set(f);const m={};h&128&&(m.extraObjects=d[7]),i.$set(m),d[3]?c?(c.p(d,h),h&8&&D(c,1)):(c=_c(d),c.c(),D(c,1),c.m(o.parentNode,o)):c&&(he(),T(c,1,1,()=>{c=null}),ue())},i(d){r||(D(t.$$.fragment,d),D(i.$$.fragment,d),D(c),r=!0)},o(d){T(t.$$.fragment,d),T(i.$$.fragment,d),T(c),r=!1},d(d){se(t,d),d&&j(e),se(i,d),d&&j(s),c&&c.d(d),d&&j(o)}}}function zA(n){let t,e,i;return{c(){t=x("div"),e=x("img"),w(e,"class","missing-floor-image svelte-18287ai"),et(e.src,i=n[6])||w(e,"src",i),w(e,"alt","缺省楼层"),w(t,"class","missing-floor-wrapper svelte-18287ai")},m(s,o){O(s,t,o),L(t,e)},p(s,o){o&64&&!et(e.src,i=s[6])&&w(e,"src",i)},i:J,o:J,d(s){s&&j(t)}}}function _c(n){let t,e;const i=[{five:n[0],pxmm:n[1],floorIndex:n[2],floorplanData:n[4],onRoomHeightClick:n[9],highlightData:n[5],hoveredRoom:void 0}];let s={};for(let o=0;o<i.length;o+=1)s=st(s,i[o]);return t=new kc({props:s}),{c(){oe(t.$$.fragment)},m(o,r){ne(t,o,r),e=!0},p(o,r){const a=r&567?dt(i,[{five:o[0],pxmm:o[1],floorIndex:o[2],floorplanData:o[4],onRoomHeightClick:o[9],highlightData:o[5],hoveredRoom:void 0}]):{};t.$set(a)},i(o){e||(D(t.$$.fragment,o),e=!0)},o(o){T(t.$$.fragment,o),e=!1},d(o){se(t,o)}}}function OA(n){let t,e,i,s;const o=[zA,jA],r=[];function a(l,c){return l[8]?1:0}return t=a(n),e=r[t]=o[t](n),{c(){e.c(),i=Ie()},m(l,c){r[t].m(l,c),O(l,i,c),s=!0},p(l,[c]){let d=t;t=a(l),t===d?r[t].p(l,c):(he(),T(r[d],1,1,()=>{r[d]=null}),ue(),e=r[t],e?e.p(l,c):(e=r[t]=o[t](l),e.c()),D(e,1),e.m(i.parentNode,i))},i(l){s||(D(e),s=!0)},o(l){T(e),s=!1},d(l){r[t].d(l),l&&j(i)}}}function BA(n,t,e){let i,s,o,{five:r}=t,{pxmm:a}=t,{floorIndex:l}=t,{hoverEnable:c}=t,{floorplanData:d}=t,{extraObjects:h=[]}=t,{highlightData:f}=t,{missingFloorImageUrl:m}=t;const A=void 0;return n.$$set=p=>{"five"in p&&e(0,r=p.five),"pxmm"in p&&e(1,a=p.pxmm),"floorIndex"in p&&e(2,l=p.floorIndex),"hoverEnable"in p&&e(3,c=p.hoverEnable),"floorplanData"in p&&e(4,d=p.floorplanData),"extraObjects"in p&&e(10,h=p.extraObjects),"highlightData"in p&&e(5,f=p.highlightData),"missingFloorImageUrl"in p&&e(6,m=p.missingFloorImageUrl)},n.$$.update=()=>{n.$$.dirty&20&&e(11,i=d.floorDatas[l]),n.$$.dirty&2048&&e(8,s=i.rooms.length>0),n.$$.dirty&1028&&e(7,o=h==null?void 0:h.filter(p=>p.floorIndex===l))},[r,a,l,c,d,f,m,o,s,A,h,i]}class VA extends ce{constructor(t){super(),le(this,t,BA,OA,ae,{five:0,pxmm:1,floorIndex:2,hoverEnable:3,floorplanData:4,extraObjects:10,highlightData:5,missingFloorImageUrl:6},TA)}}function RA(n){me(n,"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 Hc(n){let t,e,i,s,o=n[8]!==0&&Wc(n);return{c(){t=x("div"),o&&o.c(),w(t,"class","plugin-floorplan-radar svelte-1mvqyqq")},m(r,a){O(r,t,a),o&&o.m(t,null),e=!0,i||(s=[zt(mi.call(null,t)),be(t,"clientWidth",n[14]),be(t,"clientHeight",n[15])],i=!0)},p(r,a){r[8]!==0?o?(o.p(r,a),a&256&&D(o,1)):(o=Wc(r),o.c(),D(o,1),o.m(t,null)):o&&(he(),T(o,1,1,()=>{o=null}),ue())},i(r){e||(D(o),e=!0)},o(r){T(o),e=!1},d(r){r&&j(t),o&&o.d(),i=!1,Xe(s)}}}function Wc(n){let t,e,i,s,o=`${n[10]}px`,r=`${n[13]}px`,a;const l=[{five:n[0],pxmm:n[11],floorIndex:n[12],floorplanData:n[3],hoverEnable:n[2],extraObjects:n[5],highlightData:n[6],missingFloorImageUrl:n[7]}];let c={};for(let f=0;f<l.length;f+=1)c=st(c,l[f]);e=new VA({props:c});const d=[{pxmm:n[11],five:n[0],floorplanData:n[3],cameraImageUrl:n[4]}];let h={};for(let f=0;f<d.length;f+=1)h=st(h,d[f]);return s=new EA({props:h}),{c(){t=x("div"),oe(e.$$.fragment),i=K(),oe(s.$$.fragment),w(t,"class","plugin-floorplan-radar-container svelte-1mvqyqq"),S(t,"width",o),S(t,"height",r)},m(f,m){O(f,t,m),ne(e,t,null),L(t,i),ne(s,t,null),a=!0},p(f,m){const A=m&6381?dt(l,[{five:f[0],pxmm:f[11],floorIndex:f[12],floorplanData:f[3],hoverEnable:f[2],extraObjects:f[5],highlightData:f[6],missingFloorImageUrl:f[7]}]):{};e.$set(A);const p=m&2073?dt(d,[{pxmm:f[11],five:f[0],floorplanData:f[3],cameraImageUrl:f[4]}]):{};s.$set(p),m&1024&&o!==(o=`${f[10]}px`)&&S(t,"width",o),m&8192&&r!==(r=`${f[13]}px`)&&S(t,"height",r)},i(f){a||(D(e.$$.fragment,f),D(s.$$.fragment,f),a=!0)},o(f){T(e.$$.fragment,f),T(s.$$.fragment,f),a=!1},d(f){f&&j(t),se(e),se(s)}}}function QA(n){let t,e,i=n[1]&&Hc(n);return{c(){i&&i.c(),t=Ie()},m(s,o){i&&i.m(s,o),O(s,t,o),e=!0},p(s,[o]){s[1]?i?(i.p(s,o),o&2&&D(i,1)):(i=Hc(s),i.c(),D(i,1),i.m(t.parentNode,t)):i&&(he(),T(i,1,1,()=>{i=null}),ue())},i(s){e||(D(i),e=!0)},o(s){T(i),e=!1},d(s){i&&i.d(s),s&&j(t)}}}function GA(n,t,e){var I,E;let{five:i}=t,{visible:s}=t,{hoverEnable:o}=t,{floorplanData:r}=t,{cameraImageUrl:a}=t,{extraObjects:l=[]}=t,{highlightData:c}=t,{missingFloorImageUrl:d}=t,h=0,f=(E=(I=i.work.observers[i.getCurrentState().panoIndex])==null?void 0:I.floorIndex)!=null?E:0,m=0,A=0,p=0,g=0;function v(C){e(12,f=i.work.observers[C].floorIndex)}gt(()=>(i.on("panoArrived",v),()=>{i.off("panoArrived",v)}));const y=C=>{e(8,m=C.detail)},P=C=>{e(9,A=C.detail)};return n.$$set=C=>{"five"in C&&e(0,i=C.five),"visible"in C&&e(1,s=C.visible),"hoverEnable"in C&&e(2,o=C.hoverEnable),"floorplanData"in C&&e(3,r=C.floorplanData),"cameraImageUrl"in C&&e(4,a=C.cameraImageUrl),"extraObjects"in C&&e(5,l=C.extraObjects),"highlightData"in C&&e(6,c=C.highlightData),"missingFloorImageUrl"in C&&e(7,d=C.missingFloorImageUrl)},n.$$.update=()=>{if(n.$$.dirty&1800){const C=Math.min(m,A),{max:z,min:R}=r.bounding,U=z.x-R.x,H=z.y-R.y,N=function(){return U>H?[C,C/U*H]:[C/H*U,C]}();e(10,p=N[0]),e(13,g=N[1]),e(11,h=p/U)}},[i,s,o,r,a,l,c,d,m,A,p,h,f,g,y,P]}class NA extends ce{constructor(t){super(),le(this,t,GA,QA,ae,{five:0,visible:1,hoverEnable:2,floorplanData:3,cameraImageUrl:4,extraObjects:5,highlightData:6,missingFloorImageUrl:7},RA)}}let FA=class extends vi{constructor(e,i){super(e);u(this,"name","panoFloorplanRadarPlugin");u(this,"state");u(this,"data");u(this,"app");u(this,"wrapperSelector","");u(this,"wrapper",null);u(this,"disposed",!1);u(this,"extraObjects",[]);u(this,"highlightData",{});u(this,"dispose",()=>{var e;this.disposed=!0,(e=this.app)==null||e.$destroy(),this.wrapper=null,this.wrapperSelector="",this.hooks.emit("dispose")});u(this,"highlight",e=>{this.state.config.highlightEnable&&(this.highlightData=e,this.render())});u(this,"unhighlight",()=>{this.highlightData={},this.render()});u(this,"_disable",e=>{var s;const{userAction:i}=e;(s=this.app)==null||s.$destroy(),this.app=void 0,this.hooks.emit("disable",{userAction:i})});this.five=e;const s={hoverEnable:!0,highlightEnable:!0,cameraImageUrl:pi,missingFloorImageUrl:this.staticPrefix+"/release/web/saas/missing-floor.d687a5ed.png"},o=V(V({},s),i==null?void 0:i.configs);this.state={enabled:!0,visible:!0,config:o},i!=null&&i.wrapper&&console.warn("不推荐继续使用 params.selector 配置父容器,请使用 appendTo 方法"),typeof(i==null?void 0:i.wrapper)=="string"?this.wrapperSelector=i.wrapper:(i==null?void 0:i.wrapper)instanceof Element&&(this.wrapper=i.wrapper),e.once("dispose",this.dispose)}load(e,i,s=!0){return W(this,null,function*(){function o(c){return Object.prototype.hasOwnProperty.apply(c,["version"])}const r=JSON.parse(JSON.stringify(e)),a=o(r)?r.data:r,l=this.data;this.data=yield Ai(a),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,l),i&&this.updateState(i,s),this.render()})}show(){return W(this,arguments,function*(e={}){if(this.state.visible)return;const i=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!0},i),this._show({userAction:i})})}hide(){return W(this,arguments,function*(e={}){if(!this.state.visible)return;const i=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!1},i),this._hide({userAction:i})})}enable(e={}){if(this.state.enabled)return;const i=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!0},e.userAction||i),this._enable({userAction:i})}disable(e={}){if(!this.state.enabled)return;const i=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!1},e.userAction||i),this._disable({userAction:i})}setState(e,i={}){const s=this.state,o=i.userAction!==void 0?i.userAction:!0;if(this.updateState(e,o),e.enabled!==void 0&&s.enabled!==e.enabled){const r={userAction:o};e.enabled?this._enable(r):this._disable(r)}if(e.visible!==void 0&&s.visible!==e.visible){const r={userAction:o};e.visible?this._show(r):this._hide(r)}}appendTo(e){this.wrapper!==e&&this.app&&(this.app.$destroy(),this.app=void 0),this.wrapper=e,this.render()}changeConfigs(e,i=!0){this.setState({config:e},{userAction:i}),this.render()}setExtraObjectsWith3DPositions(e){this.data&&(this.extraObjects=aA(e,this.five,this.data),this.render())}formatData(e){return W(this,null,function*(){return yield Ai(e.data)})}_enable(e){const{userAction:i}=e;this.hooks.emit("enable",{userAction:i}),this.state.visible&&this._show({userAction:i})}_show(e){if(this.disposed||!this.state.enabled)return;const{userAction:i}=e;this.hooks.emit("show",{userAction:i}),this.render()}_hide(e){if(this.disposed||!this.state.enabled)return;const{userAction:i}=e;this.hooks.emit("hide",{userAction:i}),this.render()}updateState(e,i){const s=this.state,o=e.config?V(V({},s.config),e.config):s.config;this.state=ge(V(V({},this.state),e),{config:o}),!ct(this.state,s,{deep:!0})&&this.hooks.emit("stateChange",{state:this.state,prevState:s,userAction:i})}render(){if(this.disposed||!this.state.enabled)return;if(!this.wrapper&&this.wrapperSelector){const i=document.querySelector(this.wrapperSelector);this.wrapper=i}if(!this.data||!this.wrapper)return;const e=ge(V({},this.state.config),{five:this.five,floorplanData:this.data,visible:this.state.visible,extraObjects:this.extraObjects,highlightData:this.highlightData});this.app?this.app.$set(e):this.app=new NA({target:this.wrapper,props:e})}};const _A=(n,t)=>new FA(n,t),HA=[{type:0,floorType:1,roomType:"100900000012",name:"其他"},{type:1,floorType:1,roomType:"100900000002",name:"客厅"},{type:2,floorType:1,roomType:"100900000002",name:"餐厅"},{type:3,floorType:0,roomType:"100900000001",name:"卧室"},{type:4,floorType:0,roomType:"100900000001",name:"书房"},{type:5,floorType:3,roomType:"100900000004",name:"卫生间"},{type:6,floorType:3,roomType:"100900000004",name:"淋浴间"},{type:7,floorType:3,roomType:"100900000004",name:"洗手间"},{type:8,floorType:3,roomType:"100900000003",name:"厨房"},{type:9,floorType:1,roomType:"100900000003",name:"开放厨房",onlySubArea:!0},{type:10,floorType:0,roomType:"100900000001",name:"多功能间"},{type:11,floorType:0,roomType:"100900000009",name:"保姆间"},{type:12,floorType:4,roomType:"100900000005",name:"阳台"},{type:13,floorType:4,roomType:"100900000006",name:"露台"},{type:14,floorType:0,roomType:"100900000008",name:"储物间"},{type:15,floorType:0,roomType:"100900000013",name:"衣帽间"},{type:16,floorType:0,roomType:"100900000011",name:"阁楼"},{type:17,floorType:2,roomType:"100900000007",name:"花园"},{type:18,floorType:5,roomType:"100900000010",name:"车库"},{type:19,floorType:1,roomType:"100900000012",name:"电梯"},{type:20,floorType:1,roomType:"100900000012",name:"地下室"},{type:21,floorType:1,roomType:"100900000012",name:"天井"},{type:22,floorType:1,roomType:"100900000012",name:"阳光房"},{type:23,floorType:1,roomType:"100900000012",name:"过道"},{type:24,floorType:1,roomType:"100900000012",name:"楼梯间"},{type:25,floorType:1,roomType:"100900000012",name:"门厅"},{type:26,floorType:2,roomType:"100900000012",name:"入户花园"},{type:27,floorType:1,roomType:"100900000012",name:"玄关"},{type:28,floorType:1,roomType:"100900000012",name:"挑空"},{type:29,floorType:4,roomType:"100900000012",name:"晾晒区"},{type:30,floorType:4,roomType:"100900000012",name:"洗衣房"},{type:31,floorType:0,roomType:"100900000012",name:"娱乐区"},{type:32,floorType:0,roomType:"100900000012",name:"健身区"},{type:33,floorType:0,roomType:"100900000012",name:"接待区"},{type:34,floorType:0,roomType:"100900000012",name:"影音区"},{type:35,floorType:1,roomType:"100900000012",name:"餐饮区"},{type:36,floorType:1,roomType:"100900000012",name:"其他",onlySubArea:!0},{type:37,floorType:1,roomType:"100900000002",name:"起居室"},{type:38,floorType:0,roomType:"100900000001",name:"主卧"},{type:39,floorType:0,roomType:"100900000001",name:"次卧"},{type:40,floorType:0,roomType:"100900000001",name:"优化间"},{type:41,floorType:0,roomType:"100900000001",name:"办公室"},{type:42,floorType:0,roomType:"100900000001",name:"会议室"},{type:43,floorType:0,roomType:"100900000001",name:"洽谈间"},{type:44,floorType:1,roomType:"100900000002",name:"共享大厅"},{type:45,floorType:1,roomType:"100900000012",name:"水吧"},{type:46,floorType:0,roomType:"100900000015",name:"出入口"},{type:47,floorType:0,roomType:"100900000015",name:"大厅"},{type:48,floorType:0,roomType:"100900000015",name:"包厢"},{type:49,floorType:0,roomType:"100900000015",name:"其他"},{type:50,floorType:0,roomType:"100900000016",name:"出入口"},{type:51,floorType:0,roomType:"100900000016",name:"办公区"},{type:52,floorType:0,roomType:"100900000016",name:"老板间"},{type:53,floorType:0,roomType:"100900000016",name:"会议室"},{type:54,floorType:0,roomType:"100900000016",name:"休息区/水吧"},{type:55,floorType:0,roomType:"100900000016",name:"其他"},{type:56,floorType:2,roomType:"100900000012",name:"空中花园"},{type:57,floorType:0,roomType:"100900000001",name:"洋室"},{type:58,floorType:0,roomType:"100900000001",name:"和室"}],WA=[{type:0,description:"木质地板"},{type:1,description:"瓷砖地面"},{type:2,description:"户外地面"},{type:3,description:"卫生间地面"},{type:4,description:"阳台地面"},{type:5,description:"车库地面"}],UA=[{roomType:"100900000001",description:"室"},{roomType:"100900000002",description:"厅"},{roomType:"100900000003",description:"厨"},{roomType:"100900000004",description:"卫"},{roomType:"100900000005",description:"阳台"},{roomType:"100900000006",description:"露台"},{roomType:"100900000007",description:"花园"},{roomType:"100900000008",description:"储"},{roomType:"100900000009",description:"保姆间"},{roomType:"100900000010",description:"车库"},{roomType:"100900000011",description:"阁楼"},{roomType:"100900000012",description:"其他"},{roomType:"100900000013",description:"衣"},{roomType:"100900000015",description:"商铺"},{roomType:"100900000016",description:"写字楼"}],Pr=(n,t,e)=>{const i=new k.Matrix4,s=new k.Euler(n,t,e,"YXZ");return i.makeRotationFromEuler(s),i},YA=(n,{scale:t,rotation:e,position:i})=>{if(t&&n.scale.set(t,t,t),e){const[s,o,r]=e;s&&n.applyMatrix4(Pr(s,0,0)),o&&n.applyMatrix4(Pr(0,o,0)),r&&n.applyMatrix4(Pr(0,0,r))}return i&&n.position.set(i.x,i.y,i.z),n};function Uc(n,t){n.traverse(e=>{var i;if(e.type==="Mesh"){const s=e,o=V({map:s.material.map||{}},t);s.material=new G.MeshBasicMaterial(o),s.renderOrder=1,((i=e.parent)==null?void 0:i.type)==="Mesh"&&(e.renderOrder=e.parent.renderOrder+1)}})}const XA=(n,t)=>{var p;const e=t.fbx_url||"//vrlab-image4.ljcdn.com/release/web/dipan2.f38a21cc.FBX",i=(p=t.north_rad)!=null?p:void 0,s={};let o={x:0,y:0,z:0},r=[0,0,0],a=1,l=i;n.on("modelLoaded",A);const c=g=>W(this,null,function*(){var I;const v=(g==null?void 0:g.fbx_url)||e;if(l=(I=g==null?void 0:g.north_rad)!=null?I:i,typeof l!="number")throw new Error('"northRad"配置参数缺失:未配置指南针指向!');const P=yield new Ps.FBXLoader().loadAsync(v);return Uc(P,{transparent:!0,side:k.DoubleSide,blending:k.AdditiveBlending}),s.object=P,A(),!0}),d=({latitude:g})=>{if(!s.object)return;const v=h(g);v&&(s.object.position.y=v)},h=g=>{if(s.yBase===void 0)return;const v=.6;if(g>=Math.PI/4)return s.yBase-(v+1.6);const y=g*(4/Math.PI);return s.yBase-(v*y+1.6)},f=()=>{if(!s.object)return;const g=h(n.getPose().latitude);g&&(s.object.position.y=g),n.scene.add(s.object),n.needsRender=!0,n.on("cameraDirectionUpdate",d)},m=()=>{s.object&&(n.scene.remove(s.object),n.needsRender=!0,n.off("cameraDirectionUpdate",d))};function A(){const g=s.object;if(!g)return;const v=n.model.bounding,y=v.max.x-v.min.x,P=v.max.z-v.min.z,I=Math.max(y,P),{max:{x:E,z:C},min:{x:z,y:R,z:U}}=v;s.yBase=R,o={x:(E+z)/2,y:R-1.6,z:(C+U)/2},r=[0,l-Math.PI/2,0],a=.0045*I,YA(g,{position:o,rotation:r,scale:a})}return{load:c,disable:m,enable:f}};function ZA(n,t){var c,d,h,f,m;const e=(c=t==null?void 0:t.size)!=null?c:512,i=(d=t==null?void 0:t.fontSize)!=null?d:e*(35/256)*1.2,s=(h=t==null?void 0:t.backgroundColor)!=null?h:"rgba(0,0,0,0)",o=(f=t==null?void 0:t.fontColor)!=null?f:"#fff",r=(m=t==null?void 0:t.textAlign)!=null?m:"center",a=document.createElement("canvas");a.setAttribute("width",e+""),a.setAttribute("height",e+"");const l=a.getContext("2d");return l.fillStyle=s,l.fillRect(0,0,e,e),l.font=`${i}px "微软雅黑"`,l.textAlign=r,l.fillStyle=o,l.fillText(n,e/2,e*.7),new G.CanvasTexture(a)}const JA=({x:n,y:t,z:e})=>new G.Vector3(n,t,e),qA=(n,t)=>{var p,g,v;const e={},i=(p=t.animationEnabled)!=null?p:!0,s=(g=t.position)!=null?g:void 0,o=(v=t.rad)!=null?v:void 0,r=t.fbx_url||"//vrlab-image4.ljcdn.com/release/web/entryDoorMini/Anim_Door1.fbx",a=[],l=y=>W(this,null,function*(){var H,N,F,Q,_,Y,Z,q;const P=(H=y==null?void 0:y.position)!=null?H:s;if(!P)return Promise.reject(new Error("ModelEntryDoorGuidePlugin.load(): position is undefined"));const I=JA(P),E=(N=y==null?void 0:y.rad)!=null?N:o,C=(F=y==null?void 0:y.fbx_url)!=null?F:r;if(e.rad=E,E===void 0)return Promise.reject(new Error(`ModelEntryDoorGuidePlugin.load(): rad is ${E}`));const z=yield new Ps.FBXLoader().loadAsync(C);z.position.copy(I),z.rotation.z=E,z.scale.set(.8,.8,.8),Uc(z,{transparent:!0,side:k.DoubleSide});const R=(Z=(Y=(_=(Q=z.children)==null?void 0:Q[0])==null?void 0:_.children)==null?void 0:Y[3])==null?void 0:Z.clone();if(!R)return Promise.reject(new Error(`ModelEntryDoorGuidePlugin.load(): textMesh is ${R}`));const U=(q=t.name)!=null?q:"入户门";return R.material=new G.MeshBasicMaterial({transparent:!0,map:ZA(U)}),R.renderOrder=3,z.children[0].add(R),e.object=z,!0}),c=()=>{if(e.animation)return;if(!e.object)return console.error("ModelEntryDoorGuidePlugin.initAnimation(): state.object is ",e.object);const y=1,P=new G.AnimationMixer(e.object);a.push(P);const I=P.clipAction(e.object.animations[0]);I.timeScale=y;let E;const C=()=>{let H=0,N=0;const F=1e3/30,Q=_=>{H=requestAnimationFrame(Q);const Y=_-N;Y<F||(N=_,a.forEach(Z=>Z.update(Y/1e3)),n.needsRender=!0)};return H=requestAnimationFrame(Q),()=>{cancelAnimationFrame(H)}},U={play:()=>{E||(I.play(),E=C(),requestAnimationFrame(()=>{e.object&&e.object.rotation.z!==e.rad&&(e.object.rotation.z=e.rad)}))},stop:()=>{I.stop(),E==null||E(),E=void 0}};e.animation=U},d=y=>{var I;if(!e.object)return console.error("ModelEntryDoorGuidePlugin.enable(): object is ",e.object);((I=y==null?void 0:y.animationEnable)!=null?I:i)&&(e.animation||c(),e.animation.play()),n.scene.add(e.object),n.needsRender=!0},h=()=>{e.object&&(e.animation&&e.animation.stop(),n.scene.remove(e.object),n.needsRender=!0)},f=y=>y==="Floorplan"?d():h();return{load:l,enable:y=>(e.enabled||(e.enabled=!0,f(n.currentMode),n.on("modeChange",f),d(y)),!0),disable:()=>(e.enabled&&(e.enabled=!1,h(),n.off("modeChange",f)),!0)}},KA=St;function $A(n,t,e,i=KA.Linear.None){const s=new Ds(n).to(t,e).easing(i);js(()=>s.start(0));const o=nn(a=>{s.update(a)===!1&&o()}),r=[];return s.onDestroy=a=>(r.push(a),s),s.destroy=function(){this.stop(),Object.assign(s,{_onStartCallback:null,_onUpdateCallback:null,_onCompleteCallback:null,_onStopCallbackL:null});let a;for(;a=r.shift();)a();o()},s}function ev(n,t){return $A({progress:0},{progress:1},n,t)}var Yc=(n=>(n.Move="Move",n.Rotate="Rotate",n))(Yc||{}),Wt=(n=>(n.Clockwise="Clockwise",n.Anticlockwise="Anticlockwise",n.Loop="Loop",n))(Wt||{});const Ks=Math.PI*2;function Xc(n){return(n%Ks+Ks)%Ks}function Zc(n){return n%Ks}function kr(n,t,e){return n+(t-n)*e}const Mr=(n,t,e)=>{const i=Math.PI,s=i*2;let o=Xc(n),r=Xc(t);return e===Wt.Anticlockwise&&o<r&&(o+=s),e===Wt.Clockwise&&r<o&&(r+=s),e===Wt.Loop&&r-o>i?Mr(o,r,Wt.Anticlockwise):e===Wt.Loop&&o-r>i?Mr(o,r,Wt.Clockwise):{from:o,to:r}},tv=n=>{const t={},e=(l,c,...d)=>W(this,[l,c,...d],function*(o,r,a={preload:!0}){return t.interruptCallback&&t.interruptCallback(!1),a.asyncStartCallback&&(yield a.asyncStartCallback()),o.mode&&o.mode!==n.currentMode&&(yield n.changeMode(o.mode)),a.preload&&o.panoIndex!==void 0&&o.panoIndex!==n.panoIndex&&(yield n.preloadPano(o.panoIndex)),a.asyncEndCallback&&(yield a.asyncEndCallback()),o.panoIndex===void 0&&o.fov===void 0&&o.latitude===void 0&&o.longitude===void 0?!0:yield new Promise((h,f)=>{const m=o.panoIndex!==void 0?o.panoIndex:n.panoIndex;m!==void 0?n.moveToPano(m,V({duration:r,moveEndCallback:()=>h(!0),moveCancelCallback:()=>f(new Error("move canceled"))},o)):f(new Error("unexpected error"))})}),i=o=>{const r=n.state,a=Zc(r.latitude),l=Zc(o.latitude),{from:c,to:d}=Mr(r.longitude,o.longitude,o.rotation||Wt.Loop),h=r.fov,f=o.fov;return{from:{latitude:a,longitude:c,fov:h},to:{latitude:l,longitude:d,fov:f}}};return{move:e,rotate:(l,c,...d)=>W(this,[l,c,...d],function*(o,r,a={}){t.interruptCallback&&t.interruptCallback(!1),a.asyncStartCallback&&(yield a.asyncStartCallback()),n.currentMode!==Ae.Five.Mode.Panorama&&(yield n.changeMode(Ae.Five.Mode.Panorama)),o.panoIndex!==void 0&&o.panoIndex!==n.panoIndex&&(a.preload&&(yield n.preloadPano(o.panoIndex)),yield new Promise((m,A)=>{if(!o.panoIndex){m(!0);return}n.moveToPano(o.panoIndex,{moveEndCallback:()=>m(!0),moveCancelCallback:()=>A(new Error("move canceled"))})})),a.asyncEndCallback&&(yield a.asyncEndCallback());const{from:h,to:f}=i(o);return yield new Promise(m=>{const A=({progress:P})=>{const I={};I.longitude=kr(h.longitude,f.longitude,P),I.latitude=kr(h.latitude,f.latitude,P),I.fov=kr(h.fov,f.fov,P),n.setState(I,!0)},p=()=>{m(!0)},g=()=>{m(!1)},v=o.rotateSpeed?Math.ceil(Math.abs(f.longitude-h.longitude)/o.rotateSpeed*1e3):r,y=ev(v,St.Linear.None).onUpdate(A).onComplete(p).onDestroy(g);o.rotation===Wt.Loop&&y.repeat(1/0).yoyo(!0),t.interruptCallback=(P=!0)=>{y.destroy(),t.interruptCallback=void 0,t.timeoutId&&(clearTimeout(t.timeoutId),t.timeoutId=void 0),m(P)},t.timeoutId=setTimeout(()=>{t.interruptCallback&&t.interruptCallback(!0)},r)})})}};function Jc(n,t){return n.x===t.x&&n.y===t.y}function qc(n,t){return Math.abs(n)===1/0&&Math.abs(t)===1/0?!0:Math.abs(n-t)<.001}function $s(n,t){return(t.y-n.y)/(t.x-n.x)}function Kc(n,t,e){const i=$s(n[1],n[0]),s=$s(t[1],t[0]);if(isNaN(i)||isNaN(s)||qc(i,s))return!1;if(eo(n[0],t))return n[0];if(eo(n[1],t))return n[1];if(eo(t[0],n))return t[0];if(eo(t[1],n))return t[1];if(e&&!nv(n,t))return!1;const o=n[0],r=t[0];if(Math.abs(i)===1/0)return{x:o.x,y:t[1].y-(t[1].x-o.x)*s};if(Math.abs(s)===1/0)return{x:r.x,y:n[1].y-(n[1].x-r.x)*i};const a=(r.y-o.y+i*o.x-s*r.x)/(i-s),l=i*a-i*o.x+o.y;return{x:a,y:l}}function eo(n,t){return Jc(n,t[0])||Jc(n,t[1])?!0:(t[0].x-n.x)*(n.x-t[1].x)>=0&&(t[0].y-n.y)*(n.y-t[1].y)>=0&&qc($s(t[0],n),$s(n,t[1]))}function iv(n){let t=1/0,e=-1/0,i=1/0,s=-1/0;return n.forEach(o=>{t=Math.min(t,o.x),e=Math.max(e,o.x),i=Math.min(i,o.y),s=Math.max(s,o.y)}),{x:(t+e)/2,y:(i+s)/2}}function to(n,t,e){return(n.x-e.x)*(t.y-e.y)-(t.x-e.x)*(n.y-e.y)}function nv(n,t){return Math.max(n[0].x,n[1].x)>=Math.min(t[0].x,t[1].x)&&Math.max(t[0].x,t[1].x)>=Math.min(n[0].x,n[1].x)&&Math.max(n[0].y,n[1].y)>=Math.min(t[0].y,t[1].y)&&to(t[0],n[1],n[0])*to(n[1],t[1],n[0])>0&&to(n[0],t[1],t[0])*to(t[1],n[1],t[0])>0?1:0}function $c(n,t=0){t<=0?requestAnimationFrame(n):requestAnimationFrame(()=>$c(n,t-1))}const sv=`<style type="text/css">
194
+ `;return n.$$set=o=>{"content"in o&&e(0,i=o.content)},[i,s]}class zg extends ce{constructor(t){super(),le(this,t,jg,Tg,ae,{content:0},Lg)}}function Og(n){me(n,"svelte-ozpg4a",".floorplan-plugin__base-image.svelte-ozpg4a{position:absolute;z-index:10;width:100%;height:100%;pointer-events:none}")}function Bg(n){let t,e;return t=new Sg({props:{url:n[1].url}}),{c(){oe(t.$$.fragment)},m(i,s){ne(t,i,s),e=!0},p(i,s){const o={};s&2&&(o.url=i[1].url),t.$set(o)},i(i){e||(D(t.$$.fragment,i),e=!0)},o(i){T(t.$$.fragment,i),e=!1},d(i){se(t,i)}}}function Vg(n){let t,e;return t=new zg({props:{content:n[0]}}),{c(){oe(t.$$.fragment)},m(i,s){ne(t,i,s),e=!0},p(i,s){const o={};s&1&&(o.content=i[0]),t.$set(o)},i(i){e||(D(t.$$.fragment,i),e=!0)},o(i){T(t.$$.fragment,i),e=!1},d(i){se(t,i)}}}function Rg(n){let t,e,i,s;const o=[Vg,Bg],r=[];function a(l,c){return l[0]?0:l[1]?1:-1}return~(e=a(n))&&(i=r[e]=o[e](n)),{c(){t=x("div"),i&&i.c(),w(t,"class","floorplan-plugin__base-image svelte-ozpg4a")},m(l,c){O(l,t,c),~e&&r[e].m(t,null),s=!0},p(l,[c]){let d=e;e=a(l),e===d?~e&&r[e].p(l,c):(i&&(he(),T(r[d],1,1,()=>{r[d]=null}),ue()),~e?(i=r[e],i?i.p(l,c):(i=r[e]=o[e](l),i.c()),D(i,1),i.m(t,null)):i=null)},i(l){s||(D(i),s=!0)},o(l){T(i),s=!1},d(l){l&&j(t),~e&&r[e].d()}}}function Qg(n,t,e){let i,s,{floorIndex:o}=t,{floorplanData:r}=t;return n.$$set=a=>{"floorIndex"in a&&e(2,o=a.floorIndex),"floorplanData"in a&&e(3,r=a.floorplanData)},n.$$.update=()=>{var a,l;n.$$.dirty&12&&e(1,i=r.outlines[o]),n.$$.dirty&12&&e(0,s=(l=(a=r.outlines)==null?void 0:a[o])==null?void 0:l.svgContent)},[s,i,o,r]}class oc extends ce{constructor(t){super(),le(this,t,Qg,Rg,ae,{floorIndex:2,floorplanData:3},Og)}}function Gg(n){me(n,"svelte-9vzn2f",".floorplan-plugin__room-label-item.svelte-9vzn2f{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-part1.svelte-9vzn2f{display:flex;flex-flow:column;align-items:center;color:#fff;white-space:nowrap}.floorplan-plugin__room-area.svelte-9vzn2f{opacity:0.6;line-height:1.25;margin-top:0.125rem}")}function Ng(n){let t,e=n[15].outerHTML+"",i;return{c(){t=new Qs(!1),i=Ie(),t.a=i},m(s,o){t.m(e,s,o),O(s,i,o)},p(s,o){o[0]&32768&&e!==(e=s[15].outerHTML+"")&&t.p(e)},d(s){s&&j(i),s&&t.d()}}}function Fg(n){let t,e,i,s,o,r,a=n[1]&&rc(n),l=n[0]&&ac(n),c=n[2]&&lc(n);return{c(){t=x("div"),a&&a.c(),e=K(),l&&l.c(),i=K(),c&&c.c(),s=Ie(),w(t,"class","floorplan-plugin__room-part1 svelte-9vzn2f"),S(t,"opacity",n[11]?"1":"0")},m(d,h){O(d,t,h),a&&a.m(t,null),L(t,e),l&&l.m(t,null),O(d,i,h),c&&c.m(d,h),O(d,s,h),o||(r=[zt(mi.call(null,t)),be(t,"clientWidth",n[32]),be(t,"clientHeight",n[33])],o=!0)},p(d,h){d[1]?a?a.p(d,h):(a=rc(d),a.c(),a.m(t,e)):a&&(a.d(1),a=null),d[0]?l?l.p(d,h):(l=ac(d),l.c(),l.m(t,null)):l&&(l.d(1),l=null),h[0]&2048&&S(t,"opacity",d[11]?"1":"0"),d[2]?c?c.p(d,h):(c=lc(d),c.c(),c.m(s.parentNode,s)):c&&(c.d(1),c=null)},d(d){d&&j(t),a&&a.d(),l&&l.d(),d&&j(i),c&&c.d(d),d&&j(s),o=!1,Xe(r)}}}function rc(n){let t,e=n[3].name+"",i;return{c(){t=x("span"),i=De(e),w(t,"class","floorplan-plugin__room-name")},m(s,o){O(s,t,o),L(t,i)},p(s,o){o[0]&8&&e!==(e=s[3].name+"")&&Se(i,e)},d(s){s&&j(t)}}}function ac(n){let t,e;return{c(){t=x("span"),e=De(n[14]),w(t,"class","floorplan-plugin__room-area svelte-9vzn2f"),S(t,"font-size",n[19])},m(i,s){O(i,t,s),L(t,e)},p(i,s){s[0]&16384&&Se(e,i[14])},d(i){i&&j(t)}}}function lc(n){let t,e;return{c(){t=x("span"),e=De(n[13]),w(t,"class","floorplan-plugin__room-size"),S(t,"font-size",n[19]),S(t,"opacity",n[10]?"0.6":"0")},m(i,s){O(i,t,s),L(t,e)},p(i,s){s[0]&8192&&Se(e,i[13]),s[0]&1024&&S(t,"opacity",i[10]?"0.6":"0")},d(i){i&&j(t)}}}function _g(n){let t,e,i;function s(a,l){if(a[4]===void 0)return Fg;if(a[15])return Ng}let o=s(n),r=o&&o(n);return{c(){t=x("div"),r&&r.c(),w(t,"class","floorplan-plugin__room-label-item svelte-9vzn2f"),S(t,"left",n[16]),S(t,"top",n[17]),S(t,"font-size",n[18]),S(t,"opacity",n[12]?"1":"0"),S(t,"transform",n[9]?"translate(-50%, calc(-50% + 6px))":"translate(-50%, -50%)")},m(a,l){O(a,t,l),r&&r.m(t,null),e||(i=[zt(mi.call(null,t)),be(t,"clientWidth",n[34]),be(t,"clientHeight",n[35])],e=!0)},p(a,l){o===(o=s(a))&&r?r.p(a,l):(r&&r.d(1),r=o&&o(a),r&&(r.c(),r.m(t,null))),l[0]&4096&&S(t,"opacity",a[12]?"1":"0"),l[0]&512&&S(t,"transform",a[9]?"translate(-50%, calc(-50% + 6px))":"translate(-50%, -50%)")},i:J,o:J,d(a){a&&j(t),r&&r.d(),e=!1,Xe(i)}}}function Hg(n,t){const e=n[0],i=n[1];let s=!1;for(let o=0,r=t.length-1;o<t.length;r=o++){const a=t[o][0],l=t[o][1],c=t[r][0],d=t[r][1];l>i!=d>i&&e<(c-a)*(i-l)/(d-l)+a&&(s=!s)}return s}function Wg(n,t,e){let i,s,o,r,a,l,c,d,h,f,m,A,p,{pxmm:g}=t,{roomAreaEnable:v}=t,{roomNameEnable:y}=t,{roomDimensionEnable:P}=t,{room:I}=t,{hoveredRoom:E}=t,{getRoomAreaText:C}=t,{getRoomDimensionText:z}=t,{getLabelElement:R}=t,{adaptiveRoomLabelVisibleEnable:U}=t;function H(te,ye){if(ye.width===0||ye.height===0)return()=>!1;const ze=te.path.map(({x:_e,y:Ue})=>[_e,Ue]),pe=te.roomLabel.position,{x:Ke,y:rt}=pe,{width:xe,height:it}=ye,re=xe/2,Me=it/2;return function(Ue){const wt=Ke*Ue,nt=rt*Ue,vt=ze.map(([Qe,Je])=>[Qe*Ue,Je*Ue]);return[[wt+re,nt-Me],[wt-re,nt-Me],[wt-re,nt+Me],[wt+re,nt+Me]].every(Qe=>Hg(Qe,vt))}}const N=document.body.clientWidth,F=document.body.clientHeight,Q=I.roomLabel,_=Q.positionInImage.x*100+"%",Y=Q.positionInImage.y*100+"%",Z=(N<500||F<500?10:14)+"px",q=(N<500||F<500?8:12)+"px";let ee=0,fe=0,de=0,ke=0,Pe=!1;E.subscribe(function(ye){e(25,Pe=!!ye&&ye.id===I.id)});const we=te=>{e(7,de=te.detail)},Fe=te=>{e(8,ke=te.detail)},Ce=te=>{e(5,ee=te.detail)},Ze=te=>{e(6,fe=te.detail)};return n.$$set=te=>{"pxmm"in te&&e(20,g=te.pxmm),"roomAreaEnable"in te&&e(0,v=te.roomAreaEnable),"roomNameEnable"in te&&e(1,y=te.roomNameEnable),"roomDimensionEnable"in te&&e(2,P=te.roomDimensionEnable),"room"in te&&e(3,I=te.room),"hoveredRoom"in te&&e(21,E=te.hoveredRoom),"getRoomAreaText"in te&&e(22,C=te.getRoomAreaText),"getRoomDimensionText"in te&&e(23,z=te.getRoomDimensionText),"getLabelElement"in te&&e(4,R=te.getLabelElement),"adaptiveRoomLabelVisibleEnable"in te&&e(24,U=te.adaptiveRoomLabelVisibleEnable)},n.$$.update=()=>{var te,ye;n.$$.dirty[0]&24&&e(15,i=R==null?void 0:R(I)),n.$$.dirty[0]&4194312&&e(14,s=I.size?C(I.size):""),n.$$.dirty[0]&8388616&&e(13,o=I!=null&&I.dimension?z((te=I.dimension)==null?void 0:te.width,(ye=I.dimension)==null?void 0:ye.height):""),n.$$.dirty[0]&384&&e(31,r={width:de,height:ke}),n.$$.dirty[0]&8|n.$$.dirty[1]&1&&e(30,a=r?H(I,r):void 0),n.$$.dirty[0]&1091567616&&e(27,l=U?!!(a!=null&&a(g)):!0),n.$$.dirty[0]&96&&e(29,c={width:ee,height:fe}),n.$$.dirty[0]&536870920&&e(28,d=c?H(I,c):void 0),n.$$.dirty[0]&286261248&&e(26,h=U?!!(d!=null&&d(g)):!0),n.$$.dirty[0]&234881024&&e(12,f=h||l||Pe),n.$$.dirty[0]&167772160&&e(11,m=l||Pe),n.$$.dirty[0]&100663296&&e(10,A=h||Pe),n.$$.dirty[0]&201326592&&e(9,p=l&&!h)},[v,y,P,I,R,ee,fe,de,ke,p,A,m,f,o,s,i,_,Y,Z,q,g,E,C,z,U,Pe,h,l,d,c,a,r,we,Fe,Ce,Ze]}class Ug extends ce{constructor(t){super(),le(this,t,Wg,_g,ae,{pxmm:20,roomAreaEnable:0,roomNameEnable:1,roomDimensionEnable:2,room:3,hoveredRoom:21,getRoomAreaText:22,getRoomDimensionText:23,getLabelElement:4,adaptiveRoomLabelVisibleEnable:24},Gg,[-1,-1])}}function Yg(n){me(n,"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 cc(n,t,e){const i=n.slice();return i[14]=t[e],i}function dc(n){let t,e=[],i=new Map,s,o,r,a=n[10];const l=c=>c[14].id;for(let c=0;c<a.length;c+=1){let d=cc(n,a,c),h=l(d);i.set(h,e[c]=hc(h,d))}return{c(){t=x("div");for(let c=0;c<e.length;c+=1)e[c].c();w(t,"class","floorplan-plugin__room-labels svelte-13xux0b")},m(c,d){O(c,t,d);for(let h=0;h<e.length;h+=1)e[h]&&e[h].m(t,null);s=!0,o||(r=[zt(mi.call(null,t)),be(t,"clientWidth",n[13])],o=!0)},p(c,d){d&1791&&(a=c[10],he(),e=Bt(e,d,l,1,c,a,i,t,fi,hc,null,cc),ue())},i(c){if(!s){for(let d=0;d<a.length;d+=1)D(e[d]);s=!0}},o(c){for(let d=0;d<e.length;d+=1)T(e[d]);s=!1},d(c){c&&j(t);for(let d=0;d<e.length;d+=1)e[d].d();o=!1,Xe(r)}}}function hc(n,t){let e,i,s;const o=[{pxmm:t[9],room:t[14],hoveredRoom:t[3],roomAreaEnable:t[0],roomNameEnable:t[1],roomDimensionEnable:t[2],getLabelElement:t[6],getRoomAreaText:t[4],getRoomDimensionText:t[5],adaptiveRoomLabelVisibleEnable:t[7]}];let r={};for(let a=0;a<o.length;a+=1)r=st(r,o[a]);return i=new Ug({props:r}),{key:n,first:null,c(){e=Ie(),oe(i.$$.fragment),this.first=e},m(a,l){O(a,e,l),ne(i,a,l),s=!0},p(a,l){t=a;const c=l&1791?dt(o,[{pxmm:t[9],room:t[14],hoveredRoom:t[3],roomAreaEnable:t[0],roomNameEnable:t[1],roomDimensionEnable:t[2],getLabelElement:t[6],getRoomAreaText:t[4],getRoomDimensionText:t[5],adaptiveRoomLabelVisibleEnable:t[7]}]):{};i.$set(c)},i(a){s||(D(i.$$.fragment,a),s=!0)},o(a){T(i.$$.fragment,a),s=!1},d(a){a&&j(e),se(i,a)}}}function Xg(n){let t,e,i=n[10]&&dc(n);return{c(){i&&i.c(),t=Ie()},m(s,o){i&&i.m(s,o),O(s,t,o),e=!0},p(s,[o]){s[10]?i?(i.p(s,o),o&1024&&D(i,1)):(i=dc(s),i.c(),D(i,1),i.m(t.parentNode,t)):i&&(he(),T(i,1,1,()=>{i=null}),ue())},i(s){e||(D(i),e=!0)},o(s){T(i),e=!1},d(s){i&&i.d(s),s&&j(t)}}}function Zg(n,t,e){let i,{floorIndex:s}=t,{roomAreaEnable:o}=t,{roomNameEnable:r}=t,{roomDimensionEnable:a}=t,{floorplanData:l}=t,{hoveredRoom:c}=t,{getRoomAreaText:d}=t,{getRoomDimensionText:h}=t,{getLabelElement:f}=t,{adaptiveRoomLabelVisibleEnable:m}=t,A=0,p=0;const g=v=>{e(8,A=v.detail)};return n.$$set=v=>{"floorIndex"in v&&e(11,s=v.floorIndex),"roomAreaEnable"in v&&e(0,o=v.roomAreaEnable),"roomNameEnable"in v&&e(1,r=v.roomNameEnable),"roomDimensionEnable"in v&&e(2,a=v.roomDimensionEnable),"floorplanData"in v&&e(12,l=v.floorplanData),"hoveredRoom"in v&&e(3,c=v.hoveredRoom),"getRoomAreaText"in v&&e(4,d=v.getRoomAreaText),"getRoomDimensionText"in v&&e(5,h=v.getRoomDimensionText),"getLabelElement"in v&&e(6,f=v.getLabelElement),"adaptiveRoomLabelVisibleEnable"in v&&e(7,m=v.adaptiveRoomLabelVisibleEnable)},n.$$.update=()=>{if(n.$$.dirty&6144&&e(10,i=l.floorDatas[s].rooms),n.$$.dirty&4352){const{max:v,min:y}=l.bounding,P=v.x-y.x;e(9,p=A/P)}},[o,r,a,c,d,h,f,m,A,p,i,s,l,g]}class Jg extends ce{constructor(t){super(),le(this,t,Zg,Xg,ae,{floorIndex:11,roomAreaEnable:0,roomNameEnable:1,roomDimensionEnable:2,floorplanData:12,hoveredRoom:3,getRoomAreaText:4,getRoomDimensionText:5,getLabelElement:6,adaptiveRoomLabelVisibleEnable:7},Yg)}}function qg(n){me(n,"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 uc(n,t,e){const i=n.slice();return i[11]=t[e],i[13]=e,i}function fc(n,t,e){const i=n.slice();return i[14]=t[e],i}function mc(n){let t;return{c(){t=x("div"),w(t,"class","floorplan-plugin__rule-scale svelte-djlmk4"),S(t,"left",n[14].left*100+"%"),S(t,"bottom",n[14].bottom*100+"%")},m(e,i){O(e,t,i)},p:J,d(e){e&&j(t)}}}function gc(n,t){let e,i,s=t[1](t[11].distance)+"",o,r;return{key:n,first:null,c(){e=x("div"),i=x("div"),o=De(s),r=K(),w(i,"class","floorplan-plugin__rule-text svelte-djlmk4"),$(i,"is-row",t[2]),w(e,"class","floorplan-plugin__rule-text-item svelte-djlmk4"),S(e,"left",t[11].left*100+"%"),S(e,"bottom",t[11].bottom*100+"%"),this.first=e},m(a,l){O(a,e,l),L(e,i),L(i,o),L(e,r)},p(a,l){t=a,l&2&&s!==(s=t[1](t[11].distance)+"")&&Se(o,s)},d(a){a&&j(e)}}}function Kg(n){let t,e,i,s,o,r,a=[],l=new Map,c,d=n[3],h=[];for(let A=0;A<d.length;A+=1)h[A]=mc(fc(n,d,A));let f=n[4];const m=A=>A[13];for(let A=0;A<f.length;A+=1){let p=uc(n,f,A),g=m(p);l.set(g,a[A]=gc(g,p))}return{c(){t=x("div"),e=x("div"),i=K(),s=x("div");for(let A=0;A<h.length;A+=1)h[A].c();o=K(),r=x("div");for(let A=0;A<a.length;A+=1)a[A].c();w(e,"class","floorplan-plugin__rule-line svelte-djlmk4"),w(s,"class","floorplan-plugin__rule-scale-wrapper svelte-djlmk4"),$(s,"is-row",n[2]),w(r,"class","floorplan-plugin__rule-text-wrapper svelte-djlmk4"),w(t,"class",c="floorplan-plugin__rule-labels floorplan-plugin__rule-labels--"+n[0]+" svelte-djlmk4"),$(t,"is-row",n[2]),S(t,"width",n[2]?"100%":1/16+"rem"),S(t,"height",n[2]?1/16+"rem":"100%")},m(A,p){O(A,t,p),L(t,e),L(t,i),L(t,s);for(let g=0;g<h.length;g+=1)h[g]&&h[g].m(s,null);L(t,o),L(t,r);for(let g=0;g<a.length;g+=1)a[g]&&a[g].m(r,null)},p(A,[p]){if(p&8){d=A[3];let g;for(g=0;g<d.length;g+=1){const v=fc(A,d,g);h[g]?h[g].p(v,p):(h[g]=mc(v),h[g].c(),h[g].m(s,null))}for(;g<h.length;g+=1)h[g].d(1);h.length=d.length}p&22&&(f=A[4],a=Bt(a,p,m,1,A,f,l,r,mr,gc,null,uc)),p&1&&c!==(c="floorplan-plugin__rule-labels floorplan-plugin__rule-labels--"+A[0]+" svelte-djlmk4")&&w(t,"class",c),p&5&&$(t,"is-row",A[2])},i:J,o:J,d(A){A&&j(t),Ot(h,A);for(let p=0;p<a.length;p+=1)a[p].d()}}}const An=1e3,vn=180;function $g(n,t,e){let{type:i}=t,{data:s}=t,{bounding:o}=t,{getRuleDistanceText:r}=t;const a=i==="top"||i==="bottom",l=o.max.x-o.min.x-(An-vn)*2,c=o.max.y-o.min.y-(An-vn)*2,d=s.map(([A,p])=>a?[A.x,p.x]:[A.y,p.y]).flat().sort().filter((A,p,g)=>p===0?!0:A!==g[p-1]),h=d.map(A=>{const p=a?(A-o.min.x-An+vn)/l:0,g=a?0:(A-o.min.y-An+vn)/c;return{left:p,bottom:g}});h.unshift({left:0,bottom:0}),h.push(a?{left:1,bottom:0}:{left:0,bottom:1});const f=d[d.length-1]-d[0],m=d.map((A,p,g)=>{const v=p===0?0:A-g[p-1],y=p===0?0:(A+g[p-1])/2,P=a?(y-o.min.x-An+vn)/l:0,I=a?0:(y-o.min.y-An+vn)/c;return{left:P,bottom:I,distance:v}}).filter(({distance:A})=>A/f>.1);return n.$$set=A=>{"type"in A&&e(0,i=A.type),"data"in A&&e(5,s=A.data),"bounding"in A&&e(6,o=A.bounding),"getRuleDistanceText"in A&&e(1,r=A.getRuleDistanceText)},[i,r,a,h,m,s,o]}class ep extends ce{constructor(t){super(),le(this,t,$g,Kg,ae,{type:0,data:5,bounding:6,getRuleDistanceText:1},qg)}}function tp(n){me(n,"svelte-1mzj9p3",".floorplan-plugin__rule-labels-wrapper.svelte-1mzj9p3{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);pointer-events:none}")}function pc(n,t,e){const i=n.slice();return i[13]=t[e][0],i[14]=t[e][1],i}function Ac(n,t){let e,i,s;const o=[{type:t[13],data:t[14],bounding:t[1],getRuleDistanceText:t[0]}];let r={};for(let a=0;a<o.length;a+=1)r=st(r,o[a]);return i=new ep({props:r}),{key:n,first:null,c(){e=Ie(),oe(i.$$.fragment),this.first=e},m(a,l){O(a,e,l),ne(i,a,l),s=!0},p(a,l){t=a;const c=l&19?dt(o,[{type:t[13],data:t[14],bounding:t[1],getRuleDistanceText:t[0]}]):{};i.$set(c)},i(a){s||(D(i.$$.fragment,a),s=!0)},o(a){T(i.$$.fragment,a),s=!1},d(a){a&&j(e),se(i,a)}}}function ip(n){let t,e=[],i=new Map,s,o=n[4];const r=a=>a[13];for(let a=0;a<o.length;a+=1){let l=pc(n,o,a),c=r(l);i.set(c,e[a]=Ac(c,l))}return{c(){t=x("div");for(let a=0;a<e.length;a+=1)e[a].c();w(t,"class","floorplan-plugin__rule-labels-wrapper svelte-1mzj9p3"),S(t,"width",n[3]),S(t,"height",n[2])},m(a,l){O(a,t,l);for(let c=0;c<e.length;c+=1)e[c]&&e[c].m(t,null);s=!0},p(a,[l]){l&19&&(o=a[4],he(),e=Bt(e,l,r,1,a,o,i,t,fi,Ac,null,pc),ue()),l&8&&S(t,"width",a[3]),l&4&&S(t,"height",a[2])},i(a){if(!s){for(let l=0;l<o.length;l+=1)D(e[l]);s=!0}},o(a){for(let l=0;l<e.length;l+=1)T(e[l]);s=!1},d(a){a&&j(t);for(let l=0;l<e.length;l+=1)e[l].d()}}}const vc=1e3,bc=180;function np(n,t,e){let i,s,o,r,a,l,c,d,h,f,{floorIndex:m}=t,{floorplanData:A}=t,{getRuleDistanceText:p}=t;return n.$$set=g=>{"floorIndex"in g&&e(5,m=g.floorIndex),"floorplanData"in g&&e(6,A=g.floorplanData),"getRuleDistanceText"in g&&e(0,p=g.getRuleDistanceText)},n.$$.update=()=>{n.$$.dirty&64&&e(1,i=A.bounding),n.$$.dirty&96&&e(11,s=A.floorDatas[m].rules),n.$$.dirty&2048&&e(12,o=Object.keys(s)),n.$$.dirty&6144&&e(4,r=o.map(g=>[g,s[g]])),n.$$.dirty&2&&e(9,a=i.max.x-i.min.x),n.$$.dirty&2&&e(7,l=i.max.y-i.min.y),n.$$.dirty&2&&e(10,c=i.max.x-i.min.x-(vc-bc)*2),n.$$.dirty&2&&e(8,d=i.max.y-i.min.y-(vc-bc)*2),n.$$.dirty&1536&&e(3,h=c/a*100+"%"),n.$$.dirty&384&&e(2,f=d/l*100+"%")},[p,i,f,h,r,m,A,l,d,a,c,s,o]}class sp extends ce{constructor(t){super(),le(this,t,np,ip,ae,{floorIndex:5,floorplanData:6,getRuleDistanceText:0},tp)}}function qs(n,t={}){let e="";const{needZ:i,needA:s}=t;return(i?n.slice().concat(n[0]):n.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):s!=null&&s[a]?(e+="A"+s[a]+","+d,e):(e+="L"+d,e)}),e+(i?"Z":"")}function yc({x:n,y:t},e){const{max:i,min:s}=e;return{x:n-s.x,y:i.y-t}}function op(n,t){const e=n.x*1e3+t.bounding.origin.x,i=-n.z*1e3+t.bounding.origin.y;return{x:e,y:i}}function rp(n,t){const e=t.bounding,i=e.max.x-e.min.x,s=e.max.y-e.min.y;return{x:(n.x-e.min.x)/i,y:(e.max.y-n.y)/s}}function ap(n,t){return Math.max(...t.work.observers.map(i=>n.z>=i.standingPosition.z?i.floorIndex:0))}function lp(n){let t;return{c(){t=Oe("path"),w(t,"d",n[0]),w(t,"fill","#2F313A")},m(e,i){O(e,t,i)},p(e,[i]){i&1&&w(t,"d",e[0])},i:J,o:J,d(e){e&&j(t)}}}function cp(n,t,e){let i,{path:s}=t;return n.$$set=o=>{"path"in o&&e(1,s=o.path)},n.$$.update=()=>{n.$$.dirty&2&&e(0,i=qs(s,{needZ:!0}))},[i,s]}class dp extends ce{constructor(t){super(),le(this,t,cp,lp,ae,{path:1})}}function hp(n){let t,e,i,s,o,r;return{c(){t=Oe("defs"),e=Oe("pattern"),i=Oe("rect"),s=Oe("path"),o=K(),r=Oe("path"),w(i,"x","0"),w(i,"y","0"),w(i,"width",n[1]),w(i,"height",n[1]),w(i,"fill","#323747"),w(s,"d",n[2]),w(s,"stroke","#ffffff"),w(s,"stroke-opacity","0.06"),w(s,"stroke-width","0.5"),w(s,"fill","none"),w(e,"id","fpm-room-pattern-0"),w(e,"x","0"),w(e,"y","0"),w(e,"width",n[1]),w(e,"height",n[1]),w(e,"patternUnits","userSpaceOnUse"),w(e,"patternTransform","scale(50 50)"),w(r,"d",n[0]),w(r,"fill","url(#fpm-room-pattern-0)")},m(a,l){O(a,t,l),L(t,e),L(e,i),L(e,s),O(a,o,l),O(a,r,l)},p(a,[l]){l&1&&w(r,"d",a[0])},i:J,o:J,d(a){a&&j(t),a&&j(o),a&&j(r)}}}const vr=6;function up(n,t,e){let i,{path:s}=t;const o=vr*2,r=`M0 ${vr} h ${o} M${vr} 0 v ${o}`;return n.$$set=a=>{"path"in a&&e(3,s=a.path)},n.$$.update=()=>{n.$$.dirty&8&&e(0,i=qs(s,{needZ:!0}))},[i,o,r,s]}class fp extends ce{constructor(t){super(),le(this,t,up,hp,ae,{path:3})}}function mp(n){let t,e,i,s,o,r,a,l,c,d,h;return{c(){t=Oe("defs"),e=Oe("pattern"),i=Oe("rect"),s=Oe("pattern"),o=Oe("rect"),r=K(),a=Oe("path"),l=K(),c=Oe("path"),d=K(),h=Oe("path"),w(i,"x","0"),w(i,"y","0"),w(i,"width","6"),w(i,"height","50"),w(i,"fill","none"),w(i,"stroke","#4B4B57"),w(i,"stroke-width","0.5"),w(e,"id","room-material-pattern-1"),w(e,"x","0"),w(e,"y","0"),w(e,"width","12"),w(e,"height","50"),w(e,"patternUnits","userSpaceOnUse"),w(e,"patternTransform","scale(50 50)"),w(o,"x","0"),w(o,"y","0"),w(o,"width","6"),w(o,"height","50"),w(o,"fill","none"),w(o,"stroke","#4B4B57"),w(o,"stroke-width","0.5"),w(s,"id","room-material-pattern-2"),w(s,"x","6"),w(s,"y","25"),w(s,"width","12"),w(s,"height","50"),w(s,"patternUnits","userSpaceOnUse"),w(s,"patternTransform","scale(50 50)"),w(a,"d",n[0]),w(a,"fill","#43434D"),w(c,"d",n[0]),w(c,"fill","url(#room-material-pattern-1)"),w(h,"d",n[0]),w(h,"fill","url(#room-material-pattern-2)")},m(f,m){O(f,t,m),L(t,e),L(e,i),L(t,s),L(s,o),O(f,r,m),O(f,a,m),O(f,l,m),O(f,c,m),O(f,d,m),O(f,h,m)},p(f,[m]){m&1&&w(a,"d",f[0]),m&1&&w(c,"d",f[0]),m&1&&w(h,"d",f[0])},i:J,o:J,d(f){f&&j(t),f&&j(r),f&&j(a),f&&j(l),f&&j(c),f&&j(d),f&&j(h)}}}function gp(n,t,e){let i,{path:s}=t;return n.$$set=o=>{"path"in o&&e(1,s=o.path)},n.$$.update=()=>{n.$$.dirty&2&&e(0,i=qs(s,{needZ:!0}))},[i,s]}class pp extends ce{constructor(t){super(),le(this,t,gp,mp,ae,{path:1})}}function Ap(n){me(n,"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 wc(n,t,e){const i=n.slice();return i[5]=t[e],i}function vp(n){let t,e;return t=new fp({props:{path:n[5].path}}),{c(){oe(t.$$.fragment)},m(i,s){ne(t,i,s),e=!0},p(i,s){const o={};s&1&&(o.path=i[5].path),t.$set(o)},i(i){e||(D(t.$$.fragment,i),e=!0)},o(i){T(t.$$.fragment,i),e=!1},d(i){se(t,i)}}}function bp(n){let t,e;return t=new pp({props:{path:n[5].path}}),{c(){oe(t.$$.fragment)},m(i,s){ne(t,i,s),e=!0},p(i,s){const o={};s&1&&(o.path=i[5].path),t.$set(o)},i(i){e||(D(t.$$.fragment,i),e=!0)},o(i){T(t.$$.fragment,i),e=!1},d(i){se(t,i)}}}function yp(n){let t,e;return t=new dp({props:{path:n[5].path}}),{c(){oe(t.$$.fragment)},m(i,s){ne(t,i,s),e=!0},p(i,s){const o={};s&1&&(o.path=i[5].path),t.$set(o)},i(i){e||(D(t.$$.fragment,i),e=!0)},o(i){T(t.$$.fragment,i),e=!1},d(i){se(t,i)}}}function Cc(n){let t,e,i,s;const o=[yp,bp,vp],r=[];function a(l,c){return l[5].floorType===1?0:l[5].floorType===0?1:2}return e=a(n),i=r[e]=o[e](n),{c(){t=Oe("svg"),i.c(),w(t,"width","100%"),w(t,"height","100%"),w(t,"viewBox",`0 0 ${n[1]} ${n[2]}`),w(t,"class","svelte-1dykexu")},m(l,c){O(l,t,c),r[e].m(t,null),s=!0},p(l,c){let d=e;e=a(l),e===d?r[e].p(l,c):(he(),T(r[d],1,1,()=>{r[d]=null}),ue(),i=r[e],i?i.p(l,c):(i=r[e]=o[e](l),i.c()),D(i,1),i.m(t,null))},i(l){s||(D(i),s=!0)},o(l){T(i),s=!1},d(l){l&&j(t),r[e].d()}}}function wp(n){let t,e,i=n[0],s=[];for(let r=0;r<i.length;r+=1)s[r]=Cc(wc(n,i,r));const o=r=>T(s[r],1,1,()=>{s[r]=null});return{c(){t=x("div");for(let r=0;r<s.length;r+=1)s[r].c();w(t,"class","floorplan-plugin__room-material svelte-1dykexu")},m(r,a){O(r,t,a);for(let l=0;l<s.length;l+=1)s[l]&&s[l].m(t,null);e=!0},p(r,[a]){if(a&7){i=r[0];let l;for(l=0;l<i.length;l+=1){const c=wc(r,i,l);s[l]?(s[l].p(c,a),D(s[l],1)):(s[l]=Cc(c),s[l].c(),D(s[l],1),s[l].m(t,null))}for(he(),l=i.length;l<s.length;l+=1)o(l);ue()}},i(r){if(!e){for(let a=0;a<i.length;a+=1)D(s[a]);e=!0}},o(r){s=s.filter(Boolean);for(let a=0;a<s.length;a+=1)T(s[a]);e=!1},d(r){r&&j(t),Ot(s,r)}}}function Cp(n,t,e){let i,{floorIndex:s}=t,{floorplanData:o}=t;const r=o.bounding.max.x-o.bounding.min.x,a=o.bounding.max.y-o.bounding.min.y;return n.$$set=l=>{"floorIndex"in l&&e(3,s=l.floorIndex),"floorplanData"in l&&e(4,o=l.floorplanData)},n.$$.update=()=>{n.$$.dirty&24&&e(0,i=o.floorDatas[s].rooms.map(l=>ge(V({},l),{path:l.path.map(c=>yc(c,o.bounding))})))},[i,r,a,s,o]}class Ip extends ce{constructor(t){super(),le(this,t,Cp,wp,ae,{floorIndex:3,floorplanData:4},Ap)}}function Pp(n){me(n,"svelte-qq2273","path.svelte-qq2273{--opacity:0;opacity:var(--opacity)}path.svelte-qq2273:hover{opacity:calc(var(--opacity) + 0.1)}")}function kp(n){let t,e,i,s;return{c(){t=Oe("path"),w(t,"d",n[5]),w(t,"fill","#fff"),w(t,"style",n[2]),w(t,"id",e=`${n[1]}_${n[0].id}`),w(t,"class","svelte-qq2273")},m(o,r){O(o,t,r),i||(s=[be(t,"mouseenter",n[3]),be(t,"mouseleave",n[4])],i=!0)},p(o,[r]){r&4&&w(t,"style",o[2]),r&3&&e!==(e=`${o[1]}_${o[0].id}`)&&w(t,"id",e)},i:J,o:J,d(o){o&&j(t),i=!1,Xe(s)}}}function Mp(n,t,e){let i,s,{room:o}=t,{floorIndex:r}=t,{floorplanData:a}=t,{highlightData:l}=t,{hoveredRoom:c}=t;function d(){c==null||c.set(o)}function h(){c==null||c.set(void 0)}const{bounding:f}=a,m=qs(o.path,{needZ:!0,format:A=>yc(A,f)});return n.$$set=A=>{"room"in A&&e(0,o=A.room),"floorIndex"in A&&e(1,r=A.floorIndex),"floorplanData"in A&&e(6,a=A.floorplanData),"highlightData"in A&&e(7,l=A.highlightData),"hoveredRoom"in A&&e(8,c=A.hoveredRoom)},n.$$.update=()=>{n.$$.dirty&131&&e(9,i=l[`${r}_${o.id}`]),n.$$.dirty&512&&e(2,s=i?`fill: ${i.color}; --opacity: ${i.opacity}; pointer-events: ${i.disabled?"none":"auto"}`:null)},[o,r,s,d,h,m,a,l,c,i]}class Ep extends ce{constructor(t){super(),le(this,t,Mp,kp,ae,{room:0,floorIndex:1,floorplanData:6,highlightData:7,hoveredRoom:8},Pp)}}function Dp(n){me(n,"svelte-1kqo6e4",".floorplan-plugin__room-highlight.svelte-1kqo6e4{position:absolute;width:100%;height:100%}svg.svelte-1kqo6e4{width:100%;height:100%;overflow:visible}")}function Ic(n,t,e){const i=n.slice();return i[6]=t[e],i}function Pc(n,t){let e,i,s;const o=[{room:t[6],floorplanData:t[1],hoveredRoom:t[3],floorIndex:t[0],highlightData:t[2]}];let r={};for(let a=0;a<o.length;a+=1)r=st(r,o[a]);return i=new Ep({props:r}),{key:n,first:null,c(){e=Ie(),oe(i.$$.fragment),this.first=e},m(a,l){O(a,e,l),ne(i,a,l),s=!0},p(a,l){t=a;const c=l&15?dt(o,[{room:t[6],floorplanData:t[1],hoveredRoom:t[3],floorIndex:t[0],highlightData:t[2]}]):{};i.$set(c)},i(a){s||(D(i.$$.fragment,a),s=!0)},o(a){T(i.$$.fragment,a),s=!1},d(a){a&&j(e),se(i,a)}}}function xp(n){let t,e,i=[],s=new Map,o,r=n[1].floorDatas[n[0]].rooms;const a=l=>l[6].id;for(let l=0;l<r.length;l+=1){let c=Ic(n,r,l),d=a(c);s.set(d,i[l]=Pc(d,c))}return{c(){t=x("div"),e=Oe("svg");for(let l=0;l<i.length;l+=1)i[l].c();w(e,"width","100%"),w(e,"height","100%"),w(e,"viewBox",`0 0 ${n[4]} ${n[5]}`),w(e,"class","svelte-1kqo6e4"),w(t,"class","floorplan-plugin__room-highlight svelte-1kqo6e4")},m(l,c){O(l,t,c),L(t,e);for(let d=0;d<i.length;d+=1)i[d]&&i[d].m(e,null);o=!0},p(l,[c]){c&15&&(r=l[1].floorDatas[l[0]].rooms,he(),i=Bt(i,c,a,1,l,r,s,e,fi,Pc,null,Ic),ue())},i(l){if(!o){for(let c=0;c<r.length;c+=1)D(i[c]);o=!0}},o(l){for(let c=0;c<i.length;c+=1)T(i[c]);o=!1},d(l){l&&j(t);for(let c=0;c<i.length;c+=1)i[c].d()}}}function Sp(n,t,e){let{floorIndex:i}=t,{floorplanData:s}=t,{highlightData:o}=t,{hoveredRoom:r}=t;const a=s.bounding.max.x-s.bounding.min.x,l=s.bounding.max.y-s.bounding.min.y;return n.$$set=c=>{"floorIndex"in c&&e(0,i=c.floorIndex),"floorplanData"in c&&e(1,s=c.floorplanData),"highlightData"in c&&e(2,o=c.highlightData),"hoveredRoom"in c&&e(3,r=c.hoveredRoom)},[i,s,o,r,a,l]}class kc extends ce{constructor(t){super(),le(this,t,Sp,xp,ae,{floorIndex:0,floorplanData:1,highlightData:2,hoveredRoom:3},Dp)}}function Lp(n){me(n,"svelte-1lm20n5",".missing-floor.svelte-1lm20n5{position:absolute;left:50%;top:50%;transform:translate(-50%, -50%);display:flex;flex-direction:column;align-items:center}.text.svelte-1lm20n5{margin-top:0.75rem;color:#fff;opacity:0.3}")}function Mc(n){let t,e=n[0].text+"",i;return{c(){t=x("span"),i=De(e),w(t,"class","text svelte-1lm20n5"),S(t,"font-size",n[0].textFontSize+"px")},m(s,o){O(s,t,o),L(t,i)},p(s,o){o&1&&e!==(e=s[0].text+"")&&Se(i,e),o&1&&S(t,"font-size",s[0].textFontSize+"px")},d(s){s&&j(t)}}}function Tp(n){let t,e,i,s,o=n[0].text&&Mc(n);return{c(){t=x("div"),e=x("img"),s=K(),o&&o.c(),w(e,"class","image"),w(e,"alt","缺省楼层展位图"),tt(e.src,i=n[0].imageURL)||w(e,"src",i),S(e,"width",n[0].imageWidth+"px"),S(e,"height",n[0].imageHeight+"px"),w(t,"class","missing-floor svelte-1lm20n5")},m(r,a){O(r,t,a),L(t,e),L(t,s),o&&o.m(t,null)},p(r,[a]){a&1&&!tt(e.src,i=r[0].imageURL)&&w(e,"src",i),a&1&&S(e,"width",r[0].imageWidth+"px"),a&1&&S(e,"height",r[0].imageHeight+"px"),r[0].text?o?o.p(r,a):(o=Mc(r),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},i:J,o:J,d(r){r&&j(t),o&&o.d()}}}function jp(n,t,e){let{missingFloorConfig:i}=t;return n.$$set=s=>{"missingFloorConfig"in s&&e(0,i=s.missingFloorConfig)},[i]}class zp extends ce{constructor(t){super(),le(this,t,jp,Tp,ae,{missingFloorConfig:0},Lp)}}const pi="data:image/png;base64,iVBORw0K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cO2HCUFCGT+tshUcWLPj6IDf37ued27Z9unXz2owZU6dOnnxp4sQ1q1ePH79KN6vbQWc1SrfrTit6lO5NO6/F8yZNmofBfgNTwRQLsPLsHQAAAABJRU5ErkJggg==";function Ec(n){return n*180/Math.PI}function Op(n){me(n,"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 Bp(n){let t,e;return{c(){t=x("div"),e=x("div"),w(e,"class","floorplan__camera-rotate svelte-17cl35n"),S(e,"background-image",`url(${n[0]||pi})`),S(e,"width",n[4]),S(e,"height",n[4]),S(e,"left","-"+n[4]),S(e,"top","-"+n[4]),S(e,"transform",`rotate(${n[3]}deg)`),S(e,"transform-origin",`${n[4]} ${n[4]}`),w(t,"class","floorplan__camera-position svelte-17cl35n"),S(t,"left",n[1]),S(t,"top",n[2])},m(i,s){O(i,t,s),L(t,e)},p(i,[s]){s&1&&S(e,"background-image",`url(${i[0]||pi})`);const o=s&1;o&&S(e,"width",i[4]),o&&S(e,"height",i[4]),o&&S(e,"left","-"+i[4]),o&&S(e,"top","-"+i[4]),o&&S(e,"transform",`rotate(${i[3]}deg)`),o&&S(e,"transform-origin",`${i[4]} ${i[4]}`)},i:J,o:J,d(i){i&&j(t)}}}function Vp(n,t,e){let{panoIndex:i}=t,{floorplanData:s}=t,{lastPanoramaLongitude:o}=t,{cameraImageUrl:r}=t;const{observers:a}=s,l=a[i],c=l.positionInImage.x,d=l.positionInImage.y,h=c*100+"%",f=d*100+"%",m=-Ec(o)+45,A=document.body.clientWidth,p=document.body.clientHeight,v=`${(A<500||p<500?17:37)/16}rem`;return n.$$set=y=>{"panoIndex"in y&&e(5,i=y.panoIndex),"floorplanData"in y&&e(6,s=y.floorplanData),"lastPanoramaLongitude"in y&&e(7,o=y.lastPanoramaLongitude),"cameraImageUrl"in y&&e(0,r=y.cameraImageUrl)},[r,h,f,m,v,i,s,o]}let Rp=class extends ce{constructor(t){super(),le(this,t,Vp,Bp,ae,{panoIndex:5,floorplanData:6,lastPanoramaLongitude:7,cameraImageUrl:0},Op)}};const Qp="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAArUAAAB7CAMAAABdA4ieAAAC91BMVEUAAACOpP/H0P+yxP/a4/+asv/W3/+/z/+cs//S3f+mu//Q2//5+v/H1P/d5f/l6//y9f++zf/i6f+ww/+ovP/7/P/u8v/N2f+Mp//q7/+4yf+uwf+Wr/+7y/+1xv+Ho//x9P+9zP+2x/+swP+gt/+Oqf/Y4v/r8P/l7P/b4//F0/+juf+Zsv+XsP+Trf/p7v97mv9wj/+kuv+ftf/x9P92lf/3+f/I1f+5yv+Eof98m//8/f/4+f90lf+9zf/j6f/T3f/L1/+Bnv/6+/+SrP/m7P/f5v/O2v/L2P/E0v/Az//+///s8P/e5v+rv/+pvv+Anv+qvv+Pqv+Kpv+CoP93l/9xlP/z9v/p7v90lf9uj//P2//v8//o7f/k6v/K1v+6yv9rjv98nv/E0v/9/v/09//h6P/X4f9pjP/9/f/N2f/K1v/C0f+Ho/99nP/1+P9sj//6+//u8/+iuP/u8//g6P/U3v+3x/+0xv+etf+Vrv9pjf/B0P9ukf+ht/+Vr/94mP/G0/+8zP+2x//+/v/09v/W4f9ojv/c5P+xxP/d5v+xw/+vwv+Jo//g6P+nvP+SrP/R3P/1+f/W3//U3//C0P+Jp/9nh/+Kpv+Fov/Y4f/J1/+Pqf+rv/+Oqv+Oqv+muv+twP/f5//t8P97mf/h5/+twP+kuf/L2P+juP+Ipf+huP+Pqf/d5v+zxf+cs/+Zsf+wwv/V3v+8zP+Go/+zxP+GpP/T3f/r8P/u8v/o7f/d5P/m7P/H1P/w9P/D0f+uwf/Z4v/F0v/09//D0v/v8//s8v/d5P/Y4f/s8P+etv/X4f+gt/+ovf+bsv+xw/+Vr//j6v+1x//J1v+4yf/r8P+yxf/T3f/B0f+Fo//09//W4P/h6P/L1v/i6f/x9f/t8v/G0/+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sb85qjbFxHOCprMZaf5qdhlorxwGeTsPIttvPlno0y3GAZfbHp6n3ynGAV0m99u/2J6H3znGAvW4n+J25tdY7xwFey1pvQe6/DlrjOMDLqfXW7N5pbs0YWhxgtpj0rl1uiaHFISzccSWohUCzOIemm0VKChwHOMutKCVwHOA4av/JVi0xtDiRpCRfRcvQ4lBfxSnG0OJc/+xTjKHFyVRMP38iDC0O92lZVRhanO+vcVWGFu9BRWkW7+Z3rapEizdy7ZVm8V5Gtr8AtSnix59eOmYAAAAASUVORK5CYII=";function Gp(n){me(n,"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 Np(n){let t,e,i,s,o;return{c(){t=x("div"),e=x("div"),i=K(),s=x("span"),o=De(n[0]),w(e,"class","floorplan-plugin__compass-image svelte-rpkaro"),S(e,"background-image",`url(${Qp})`),w(s,"class","floorplan-plugin__compass-text svelte-rpkaro"),w(t,"class","floorplan-plugin__compass svelte-rpkaro"),S(t,"transform",n[2])},m(r,a){O(r,t,a),L(t,e),L(t,i),L(t,s),L(s,o)},p(r,a){a&1&&Se(o,r[0])},d(r){r&&j(t)}}}function Fp(n){let t,e=n[1]&&Np(n);return{c(){e&&e.c(),t=Ie()},m(i,s){e&&e.m(i,s),O(i,t,s)},p(i,[s]){i[1]&&e.p(i,s)},i:J,o:J,d(i){e&&e.d(i),i&&j(t)}}}function _p(n){return n/Math.PI*180}function Hp(n,t,e){var c;let{floorplanData:i}=t,{northDesc:s}=t;const o=(c=i.entrance)==null?void 0:c.northRad,r=typeof o=="number",l=`translateX(-50%) translateZ(10px) rotate(${-(o?_p(o):0)+90}deg)`;return n.$$set=d=>{"floorplanData"in d&&e(3,i=d.floorplanData),"northDesc"in d&&e(0,s=d.northDesc)},[s,r,l,i]}class Wp extends ce{constructor(t){super(),le(this,t,Hp,Fp,ae,{floorplanData:3,northDesc:0},Gp)}}function Up(n){me(n,"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 Yp(n){let t,e,i,s,o,r,a,l,c,d;const h=[{floorIndex:n[2],floorplanData:n[11]}];let f={};for(let I=0;I<h.length;I+=1)f=st(f,h[I]);t=new Ip({props:f});let m=(n[3]||n[5])&&Dc(n);const A=[{floorplanData:n[11],floorIndex:n[2]}];let p={};for(let I=0;I<A.length;I+=1)p=st(p,A[I]);s=new oc({props:p});let g=n[6]&&xc(n),v=n[10]&&Sc(n),y=n[4]&&Lc(n),P=n[22]&&Tc(n);return{c(){oe(t.$$.fragment),e=K(),m&&m.c(),i=K(),oe(s.$$.fragment),o=K(),g&&g.c(),r=K(),v&&v.c(),a=K(),y&&y.c(),l=K(),P&&P.c(),c=Ie()},m(I,E){ne(t,I,E),O(I,e,E),m&&m.m(I,E),O(I,i,E),ne(s,I,E),O(I,o,E),g&&g.m(I,E),O(I,r,E),v&&v.m(I,E),O(I,a,E),y&&y.m(I,E),O(I,l,E),P&&P.m(I,E),O(I,c,E),d=!0},p(I,E){const C=E&2052?dt(h,[{floorIndex:I[2],floorplanData:I[11]}]):{};t.$set(C),I[3]||I[5]?m?(m.p(I,E),E&40&&D(m,1)):(m=Dc(I),m.c(),D(m,1),m.m(i.parentNode,i)):m&&(he(),T(m,1,1,()=>{m=null}),ue());const z=E&2052?dt(A,[{floorplanData:I[11],floorIndex:I[2]}]):{};s.$set(z),I[6]?g?(g.p(I,E),E&64&&D(g,1)):(g=xc(I),g.c(),D(g,1),g.m(r.parentNode,r)):g&&(he(),T(g,1,1,()=>{g=null}),ue()),I[10]?v?(v.p(I,E),E&1024&&D(v,1)):(v=Sc(I),v.c(),D(v,1),v.m(a.parentNode,a)):v&&(he(),T(v,1,1,()=>{v=null}),ue()),I[4]?y?(y.p(I,E),E&16&&D(y,1)):(y=Lc(I),y.c(),D(y,1),y.m(l.parentNode,l)):y&&(he(),T(y,1,1,()=>{y=null}),ue()),I[22]?P?(P.p(I,E),E&4194304&&D(P,1)):(P=Tc(I),P.c(),D(P,1),P.m(c.parentNode,c)):P&&(he(),T(P,1,1,()=>{P=null}),ue())},i(I){d||(D(t.$$.fragment,I),D(m),D(s.$$.fragment,I),D(g),D(v),D(y),D(P),d=!0)},o(I){T(t.$$.fragment,I),T(m),T(s.$$.fragment,I),T(g),T(v),T(y),T(P),d=!1},d(I){se(t,I),I&&j(e),m&&m.d(I),I&&j(i),se(s,I),I&&j(o),g&&g.d(I),I&&j(r),v&&v.d(I),I&&j(a),y&&y.d(I),I&&j(l),P&&P.d(I),I&&j(c)}}}function Xp(n){let t,e;return t=new zp({props:{missingFloorConfig:n[18]}}),{c(){oe(t.$$.fragment)},m(i,s){ne(t,i,s),e=!0},p(i,s){const o={};s&262144&&(o.missingFloorConfig=i[18]),t.$set(o)},i(i){e||(D(t.$$.fragment,i),e=!0)},o(i){T(t.$$.fragment,i),e=!1},d(i){se(t,i)}}}function Dc(n){let t,e;const i=[{floorIndex:n[2],floorplanData:n[11],hoveredRoom:n[24],highlightData:n[17]}];let s={};for(let o=0;o<i.length;o+=1)s=st(s,i[o]);return t=new kc({props:s}),{c(){oe(t.$$.fragment)},m(o,r){ne(t,o,r),e=!0},p(o,r){const a=r&16910340?dt(i,[{floorIndex:o[2],floorplanData:o[11],hoveredRoom:o[24],highlightData:o[17]}]):{};t.$set(a)},i(o){e||(D(t.$$.fragment,o),e=!0)},o(o){T(t.$$.fragment,o),e=!1},d(o){se(t,o)}}}function xc(n){let t,e;const i=[{floorplanData:n[11],roomAreaEnable:n[7],roomNameEnable:n[8],roomDimensionEnable:n[9],floorIndex:n[2],getRoomAreaText:n[12],getRoomDimensionText:n[13],getLabelElement:n[14],hoveredRoom:n[24],adaptiveRoomLabelVisibleEnable:n[16]}];let s={};for(let o=0;o<i.length;o+=1)s=st(s,i[o]);return t=new Jg({props:s}),{c(){oe(t.$$.fragment)},m(o,r){ne(t,o,r),e=!0},p(o,r){const a=r&16874372?dt(i,[{floorplanData:o[11],roomAreaEnable:o[7],roomNameEnable:o[8],roomDimensionEnable:o[9],floorIndex:o[2],getRoomAreaText:o[12],getRoomDimensionText:o[13],getLabelElement:o[14],hoveredRoom:o[24],adaptiveRoomLabelVisibleEnable:o[16]}]):{};t.$set(a)},i(o){e||(D(t.$$.fragment,o),e=!0)},o(o){T(t.$$.fragment,o),e=!1},d(o){se(t,o)}}}function Sc(n){let t,e;const i=[{floorplanData:n[11],floorIndex:n[2],getRuleDistanceText:n[15]}];let s={};for(let o=0;o<i.length;o+=1)s=st(s,i[o]);return t=new sp({props:s}),{c(){oe(t.$$.fragment)},m(o,r){ne(t,o,r),e=!0},p(o,r){const a=r&34820?dt(i,[{floorplanData:o[11],floorIndex:o[2],getRuleDistanceText:o[15]}]):{};t.$set(a)},i(o){e||(D(t.$$.fragment,o),e=!0)},o(o){T(t.$$.fragment,o),e=!1},d(o){se(t,o)}}}function Lc(n){let t,e;const i=[{panoIndex:n[0],floorplanData:n[11],lastPanoramaLongitude:n[19],cameraImageUrl:n[20]}];let s={};for(let o=0;o<i.length;o+=1)s=st(s,i[o]);return t=new Rp({props:s}),{c(){oe(t.$$.fragment)},m(o,r){ne(t,o,r),e=!0},p(o,r){const a=r&1574913?dt(i,[{panoIndex:o[0],floorplanData:o[11],lastPanoramaLongitude:o[19],cameraImageUrl:o[20]}]):{};t.$set(a)},i(o){e||(D(t.$$.fragment,o),e=!0)},o(o){T(t.$$.fragment,o),e=!1},d(o){se(t,o)}}}function Tc(n){let t,e;return t=new Wp({props:{floorplanData:n[11],northDesc:n[21]}}),{c(){oe(t.$$.fragment)},m(i,s){ne(t,i,s),e=!0},p(i,s){const o={};s&2048&&(o.floorplanData=i[11]),s&2097152&&(o.northDesc=i[21]),t.$set(o)},i(i){e||(D(t.$$.fragment,i),e=!0)},o(i){T(t.$$.fragment,i),e=!1},d(i){se(t,i)}}}function Zp(n){let t,e,i,s,o;const r=[Xp,Yp],a=[];function l(c,d){return c[23]?1:0}return e=l(n),i=a[e]=r[e](n),{c(){t=x("div"),i.c(),w(t,"class",s=Ge(`floorplan-plugin__floor${n[1]?" floorplan-plugin__floor--is-current":""}`)+" svelte-bl8zrz")},m(c,d){O(c,t,d),a[e].m(t,null),o=!0},p(c,[d]){let h=e;e=l(c),e===h?a[e].p(c,d):(he(),T(a[h],1,1,()=>{a[h]=null}),ue(),i=a[e],i?i.p(c,d):(i=a[e]=r[e](c),i.c()),D(i,1),i.m(t,null)),(!o||d&2&&s!==(s=Ge(`floorplan-plugin__floor${c[1]?" floorplan-plugin__floor--is-current":""}`)+" svelte-bl8zrz"))&&w(t,"class",s)},i(c){o||(D(i),o=!0)},o(c){T(i),o=!1},d(c){c&&j(t),a[e].d()}}}function Jp(n,t,e){let i,s,{panoIndex:o}=t,{isCurrent:r}=t,{floorIndex:a}=t,{highlightEnable:l}=t,{cameraEnable:c}=t,{hoverEnable:d}=t,{roomLabelsEnable:h}=t,{roomAreaEnable:f}=t,{roomNameEnable:m}=t,{roomDimensionEnable:A}=t,{ruleLabelsEnable:p}=t,{floorplanData:g}=t,{getRoomAreaText:v}=t,{getRoomDimensionText:y}=t,{getLabelElement:P}=t,{getRuleDistanceText:I}=t,{adaptiveRoomLabelVisibleEnable:E}=t,{highlightData:C}=t,{missingFloorConfig:z}=t,{lastPanoramaLongitude:R}=t,{cameraImageUrl:U}=t,{northDesc:H}=t,{compassEnable:N}=t;const F=Ar(void 0);return n.$$set=Q=>{"panoIndex"in Q&&e(0,o=Q.panoIndex),"isCurrent"in Q&&e(1,r=Q.isCurrent),"floorIndex"in Q&&e(2,a=Q.floorIndex),"highlightEnable"in Q&&e(3,l=Q.highlightEnable),"cameraEnable"in Q&&e(4,c=Q.cameraEnable),"hoverEnable"in Q&&e(5,d=Q.hoverEnable),"roomLabelsEnable"in Q&&e(6,h=Q.roomLabelsEnable),"roomAreaEnable"in Q&&e(7,f=Q.roomAreaEnable),"roomNameEnable"in Q&&e(8,m=Q.roomNameEnable),"roomDimensionEnable"in Q&&e(9,A=Q.roomDimensionEnable),"ruleLabelsEnable"in Q&&e(10,p=Q.ruleLabelsEnable),"floorplanData"in Q&&e(11,g=Q.floorplanData),"getRoomAreaText"in Q&&e(12,v=Q.getRoomAreaText),"getRoomDimensionText"in Q&&e(13,y=Q.getRoomDimensionText),"getLabelElement"in Q&&e(14,P=Q.getLabelElement),"getRuleDistanceText"in Q&&e(15,I=Q.getRuleDistanceText),"adaptiveRoomLabelVisibleEnable"in Q&&e(16,E=Q.adaptiveRoomLabelVisibleEnable),"highlightData"in Q&&e(17,C=Q.highlightData),"missingFloorConfig"in Q&&e(18,z=Q.missingFloorConfig),"lastPanoramaLongitude"in Q&&e(19,R=Q.lastPanoramaLongitude),"cameraImageUrl"in Q&&e(20,U=Q.cameraImageUrl),"northDesc"in Q&&e(21,H=Q.northDesc),"compassEnable"in Q&&e(22,N=Q.compassEnable)},n.$$.update=()=>{n.$$.dirty&2052&&e(25,i=g.floorDatas[a]),n.$$.dirty&33554432&&e(23,s=i.rooms.length>0)},[o,r,a,l,c,d,h,f,m,A,p,g,v,y,P,I,E,C,z,R,U,H,N,s,F,i]}let qp=class extends ce{constructor(t){super(),le(this,t,Jp,Zp,ae,{panoIndex:0,isCurrent:1,floorIndex:2,highlightEnable:3,cameraEnable:4,hoverEnable:5,roomLabelsEnable:6,roomAreaEnable:7,roomNameEnable:8,roomDimensionEnable:9,ruleLabelsEnable:10,floorplanData:11,getRoomAreaText:12,getRoomDimensionText:13,getLabelElement:14,getRuleDistanceText:15,adaptiveRoomLabelVisibleEnable:16,highlightData:17,missingFloorConfig:18,lastPanoramaLongitude:19,cameraImageUrl:20,northDesc:21,compassEnable:22},Up)}};function Kp(n){me(n,"svelte-86bqav",".floorplan-main.svelte-86bqav{width:100%;height:100%;pointer-events:none}")}function jc(n,t,e){const i=n.slice();return i[24]=t[e],i}function zc(n){let t,e,i,s=n[14].floorDatas,o=[];for(let a=0;a<s.length;a+=1)o[a]=Oc(jc(n,s,a));const r=a=>T(o[a],1,1,()=>{o[a]=null});return{c(){t=x("div");for(let a=0;a<o.length;a+=1)o[a].c();w(t,"class","floorplan-main svelte-86bqav")},m(a,l){O(a,t,l);for(let c=0;c<o.length;c+=1)o[c]&&o[c].m(t,null);i=!0},p(a,l){if(n=a,l&16777212){s=n[14].floorDatas;let c;for(c=0;c<s.length;c+=1){const d=jc(n,s,c);o[c]?(o[c].p(d,l),D(o[c],1)):(o[c]=Oc(d),o[c].c(),D(o[c],1),o[c].m(t,null))}for(he(),c=s.length;c<o.length;c+=1)r(c);ue()}},i(a){if(!i){for(let l=0;l<s.length;l+=1)D(o[l]);e||We(()=>{e=Si(t,ot,{duration:n[0],easing:ei}),e.start()}),i=!0}},o(a){o=o.filter(Boolean);for(let l=0;l<o.length;l+=1)T(o[l]);i=!1},d(a){a&&j(t),Ot(o,a)}}}function Oc(n){let t,e;const i=[{hoverEnable:n[6],highlightEnable:n[7],floorplanData:n[14],getRoomAreaText:n[17],getRoomDimensionText:n[18],getLabelElement:n[19],getRuleDistanceText:n[20],roomLabelsEnable:n[9],roomAreaEnable:n[10],roomNameEnable:n[11],roomDimensionEnable:n[12],ruleLabelsEnable:n[13],adaptiveRoomLabelVisibleEnable:n[21],highlightData:n[22],missingFloorConfig:n[23],panoIndex:n[3],cameraEnable:n[5],cameraImageUrl:n[16],lastPanoramaLongitude:n[15],compassEnable:n[8],northDesc:n[2]},{floorIndex:n[24].floorIndex},{isCurrent:n[24].floorIndex===n[4]}];let s={};for(let o=0;o<i.length;o+=1)s=st(s,i[o]);return t=new qp({props:s}),{c(){oe(t.$$.fragment)},m(o,r){ne(t,o,r),e=!0},p(o,r){const a=r&16777212?dt(i,[r&16777196&&{hoverEnable:o[6],highlightEnable:o[7],floorplanData:o[14],getRoomAreaText:o[17],getRoomDimensionText:o[18],getLabelElement:o[19],getRuleDistanceText:o[20],roomLabelsEnable:o[9],roomAreaEnable:o[10],roomNameEnable:o[11],roomDimensionEnable:o[12],ruleLabelsEnable:o[13],adaptiveRoomLabelVisibleEnable:o[21],highlightData:o[22],missingFloorConfig:o[23],panoIndex:o[3],cameraEnable:o[5],cameraImageUrl:o[16],lastPanoramaLongitude:o[15],compassEnable:o[8],northDesc:o[2]},r&16384&&{floorIndex:o[24].floorIndex},r&16400&&{isCurrent:o[24].floorIndex===o[4]}]):{};t.$set(a)},i(o){e||(D(t.$$.fragment,o),e=!0)},o(o){T(t.$$.fragment,o),e=!1},d(o){se(t,o)}}}function $p(n){let t,e,i=n[1]&&zc(n);return{c(){i&&i.c(),t=Ie()},m(s,o){i&&i.m(s,o),O(s,t,o),e=!0},p(s,[o]){s[1]?i?(i.p(s,o),o&2&&D(i,1)):(i=zc(s),i.c(),D(i,1),i.m(t.parentNode,t)):i&&(he(),T(i,1,1,()=>{i=null}),ue())},i(s){e||(D(i),e=!0)},o(s){T(i),e=!1},d(s){i&&i.d(s),s&&j(t)}}}function eA(n,t,e){let{duration:i=0}=t,{visible:s}=t,{northDesc:o}=t,{panoIndex:r}=t,{floorIndex:a}=t,{cameraEnable:l}=t,{hoverEnable:c}=t,{highlightEnable:d}=t,{compassEnable:h}=t,{roomLabelsEnable:f}=t,{roomAreaEnable:m}=t,{roomNameEnable:A}=t,{roomDimensionEnable:p}=t,{ruleLabelsEnable:g}=t,{floorplanData:v}=t,{lastPanoramaLongitude:y}=t,{cameraImageUrl:P}=t,{getRoomAreaText:I}=t,{getRoomDimensionText:E}=t,{getLabelElement:C}=t,{getRuleDistanceText:z}=t,{adaptiveRoomLabelVisibleEnable:R}=t,{highlightData:U}=t,{missingFloorConfig:H}=t;return n.$$set=N=>{"duration"in N&&e(0,i=N.duration),"visible"in N&&e(1,s=N.visible),"northDesc"in N&&e(2,o=N.northDesc),"panoIndex"in N&&e(3,r=N.panoIndex),"floorIndex"in N&&e(4,a=N.floorIndex),"cameraEnable"in N&&e(5,l=N.cameraEnable),"hoverEnable"in N&&e(6,c=N.hoverEnable),"highlightEnable"in N&&e(7,d=N.highlightEnable),"compassEnable"in N&&e(8,h=N.compassEnable),"roomLabelsEnable"in N&&e(9,f=N.roomLabelsEnable),"roomAreaEnable"in N&&e(10,m=N.roomAreaEnable),"roomNameEnable"in N&&e(11,A=N.roomNameEnable),"roomDimensionEnable"in N&&e(12,p=N.roomDimensionEnable),"ruleLabelsEnable"in N&&e(13,g=N.ruleLabelsEnable),"floorplanData"in N&&e(14,v=N.floorplanData),"lastPanoramaLongitude"in N&&e(15,y=N.lastPanoramaLongitude),"cameraImageUrl"in N&&e(16,P=N.cameraImageUrl),"getRoomAreaText"in N&&e(17,I=N.getRoomAreaText),"getRoomDimensionText"in N&&e(18,E=N.getRoomDimensionText),"getLabelElement"in N&&e(19,C=N.getLabelElement),"getRuleDistanceText"in N&&e(20,z=N.getRuleDistanceText),"adaptiveRoomLabelVisibleEnable"in N&&e(21,R=N.adaptiveRoomLabelVisibleEnable),"highlightData"in N&&e(22,U=N.highlightData),"missingFloorConfig"in N&&e(23,H=N.missingFloorConfig)},[i,s,o,r,a,l,c,d,h,f,m,A,p,g,v,y,P,I,E,C,z,R,U,H]}let br=class extends ce{constructor(t){super(),le(this,t,eA,$p,ae,{duration:0,visible:1,northDesc:2,panoIndex:3,floorIndex:4,cameraEnable:5,hoverEnable:6,highlightEnable:7,compassEnable:8,roomLabelsEnable:9,roomAreaEnable:10,roomNameEnable:11,roomDimensionEnable:12,ruleLabelsEnable:13,floorplanData:14,lastPanoramaLongitude:15,cameraImageUrl:16,getRoomAreaText:17,getRoomDimensionText:18,getLabelElement:19,getRuleDistanceText:20,adaptiveRoomLabelVisibleEnable:21,highlightData:22,missingFloorConfig:23},Kp)}};const tA="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 iA(n){return W(this,null,function*(){const t=new Headers({"Content-Type":"text/plain"}),e=function(s){return W(this,null,function*(){const o={index:s.index,url:s.url,svgUrl:s.svg_url};if(s.svg_url){const r=yield fetch(s.svg_url,{headers:t}).then(a=>a.text());o.svgContent=r}return o})};return yield Promise.all(n.map(e))})}function nA(n){const t={id:n.id,size:n.size,name:n.name,path:n.path,roomType:n.room_type,floorType:n.floor_type,roomLabel:{position:n.room_label.position,positionInImage:n.room_label.position_in_image},observerIndexs:n.observer_indexs};return n.dimension&&Object.assign(t,{dimension:n.dimension}),t}function sA(n){return{floorName:n.floor_name,floorIndex:n.floor_index,rooms:n.rooms.map(nA),rules:n.rules}}function oA(n){return{index:n.index,floorIndex:n.floor_index,position:n.position,positionInImage:n.position_in_image}}function rA(n){return{rad:n.rad,position:n.position,positionInImage:n.position_in_image,northRad:n.north_rad,roomId:n.room_id,floorIndex:n.floor_index}}function Ai(n){return W(this,null,function*(){const t=yield iA(n.outlines),e=n.computed_data.bounding,i=n.computed_data.floor_datas.map(sA),s=n.computed_data.entrance?rA(n.computed_data.entrance):null;return{outlines:t,entrance:s,bounding:e,floorDatas:i,observers:n.computed_data.observers.map(oA)}})}function aA(n,t,e){return n.map(s=>{const o=s.position,r=s.icon?s.icon:{url:tA,width:45,height:48},a=ap(o,t),l=op(o,e),c=rp(l,e);return{floorIndex:a,icon:r,id:s.id,position:l,positionInImage:c}})}function lA(n,t){return t(n),n}function bn(n,t){return lA({},e=>{for(const i in n)t.indexOf(i)===-1&&(e[i]=n[i])})}function Bc(n,t){const e=Math.max(...n.work.observers.map(i=>i.floorIndex));return t>e?n.model.bounding.max.y:Math.max(...n.work.observers.filter(i=>i.floorIndex===t).map(i=>i.standingPosition.y))}function yr(n,t,e=gi.BOUNDING_CENTER){const i=Bc(n,t),s=Bc(n,t+1);return e===gi.BOUNDING_CENTER?(n.model.bounding.max.y+n.model.bounding.min.y)/2:e===gi.CEILING?s:i}function wr(n,t,e,i){const s=yr(n,e,i==null?void 0:i.attachedTo),o=new k.Vector3(0,s,0),r=new k.Vector3(1,s,0),a=o.clone().project(n.camera),l=r.clone().project(n.camera);return Math.abs((l.x-a.x)/1e3)*(t.getBoundingClientRect().width/2)}let Ti=class{constructor(t,e){u(this,"VERSION","3.20.6");u(this,"five");u(this,"hooks",new Ei);u(this,"staticPrefix","//vr-image-4.realsee-cdn.cn");this.five=t,e!=null&&e.staticPrefix&&(this.staticPrefix=e.staticPrefix)}getCurrentState(){return this.state}absoluteUrl(t){return Jo(this.staticPrefix,t)}},vi=class extends Ti{};var yt=(n=>(n.UnknownError="UnknownError",n.DataNotLoaded="DataNotLoaded",n.UpdateSizeError="UpdateSizeError",n.BreakOffByHide="BreakOffByHide",n.BreakOffByDisable="BreakOffByDisable",n.ModelNotLoaded="ModelNotLoaded",n.ChangeModeError="ChangeModeError",n.UpdateCameraError="UpdateCameraError",n))(yt||{});const Vc=500,cA=80;function ji(n,t,e=4){return Math.abs(n-t)<Math.pow(10,-e)}function Rc(n,t,e=4){const i=Math.PI*2,s=n%i,o=t%i,r=Math.min(s,o),a=Math.max(s,o);return ji(r,a,e)||ji(r+i,a,e)}Object.assign(window,{nearlyEqual:ji,nearlyEqualRad:Rc});function dA(n){return Object.prototype.toString.call(n)==="[object Object]"}function Qc(n){return dA(n)&&!!n.isVector3}function Cr(n,t){return W(this,null,function*(){const[e]=yield Li(n.changeMode(...t));if(e)throw new Error("change mode canceled");yield new Promise(r=>{n.once("initAnimationWillStart",()=>{n.once("initAnimationEnded",()=>r())})});const i=t[1];if(!i)return!0;const s=n.getCurrentState();if(!hA(i,s))throw new Error("pose 与预期不符")})}function hA(n,t){return Object.keys(n).every(e=>{const i=t[e],s=n[e];return i===void 0||s===void 0?!0:e==="longitude"||e==="latitude"?Rc(i,s,2):typeof i=="number"&&typeof s=="number"?ji(i,s,2):Qc(s)&&Qc(i)?s.distanceTo(i)<.01:i===s})}function uA(n,t){if(n.currentMode!==t.mode)return!1;const{latitude:e,longitude:i,fov:s,offset:o}=t,{latitude:r,longitude:a,offset:l}=n.getCurrentState(),c=n.camera.fov;return!(!ji(e,r,2)||!ji(i,a,2)||o!==void 0&&o.distanceTo(l)>.01||!ji(s,c,2))}function Gc(n,t,e=!0){return W(this,null,function*(){if(uA(n,t)===!0)return;const s=n.getCurrentState();if(s.mode!==t.mode){const[d]=yield Li(Cr(n,[t.mode,t,void 0,e]));if(d)throw d;return}const{latitude:o,longitude:r,fov:a}=s,l=Math.min(1e3,Math.max(200,Math.abs(o-Math.PI/2)*1e3,(r>Math.PI?2*Math.PI-r:r)*500,typeof t.fov=="number"?Math.abs(a-t.fov)*10:1/0)),[c]=yield Li(n.updateCamera(bn(t,["mode"]),l,e));if(c)throw new Error(yt.UpdateCameraError)})}function yn(n,t,e=300){const i=n.getElement();i&&(i.style.opacity=t+"",i.style.transition=e===0?"none":`opacity ${e}ms linear`,e!==0&&Promise.race([new Promise(s=>i.addEventListener("transitionend",s,{once:!0})),new Promise(s=>setTimeout(s,e))]).then(()=>{i.style.transition="none"}))}function fA(n){const{latitude:t,longitude:e}=n,i=Math.abs(t-Math.PI/2)>5*Math.PI/180,s=e>5*(Math.PI/180)&&e<355*(Math.PI/180);return i||s}function mA(n){const{latitude:t,longitude:e}=n,i=Math.abs(t-Math.PI/2)<10*Math.PI/180,s=e<30*(Math.PI/180)||e>330*(Math.PI/180);return i&&s}let gA=class extends vi{constructor(e,i){var l,c,d;super(e);u(this,"name","modelFloorplanPlugin");u(this,"state");u(this,"data");u(this,"showState");u(this,"showPromise");u(this,"app");u(this,"panoIndex",0);u(this,"floorIndex",0);u(this,"selector");u(this,"showRejection");u(this,"wrapper");u(this,"container",document.createElement("div"));u(this,"lastPanoramaLongitude",0);u(this,"size",{width:0,height:0});u(this,"defaultMissingFloorConfig");u(this,"hasAddedEventListener",!1);u(this,"isHiddenByHideFunc",!1);u(this,"highlightData",{});u(this,"dispose",()=>{var e,i;this.removeEventListener(),(e=this.app)==null||e.$destroy(),this.app=void 0,(i=this.container)==null||i.remove(),this.data=void 0,this.wrapper=void 0,this.selector=void 0,this.hooks.emit("dispose")});u(this,"show",(...i)=>W(this,[...i],function*(e={}){if(!this.state.enabled||!this.showPromise&&this.state.visible)return;const s=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!0},s),this._show(e)}));u(this,"hide",(...i)=>W(this,[...i],function*(e={}){this.state.enabled&&(this.isHiddenByHideFunc=!0,this.state.visible!==!1&&(this.updateState({visible:!1},e.userAction||!0),this._hide(e)))}));u(this,"updateSize",()=>{if(!this.data||!this.container||!this.wrapper)return!1;const{min:e,max:i}=this.data.bounding,s=i.x-e.x,o=i.y-e.y,r=this.state.config.attachedTo?{attachedTo:this.state.config.attachedTo}:void 0,a=wr(this.five,this.wrapper,this.floorIndex,r),l=Math.ceil(s*a),c=Math.ceil(o*a);return 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}),!0});u(this,"highlight",e=>{this.state.config.highlightEnable&&(this.highlightData=e,this.render())});u(this,"unhighlight",()=>{this.highlightData={},this.render()});u(this,"_disable",e=>{var s,o,r;const{userAction:i}=e;this.hooks.emit("disable",{userAction:i}),(s=this.showRejection)==null||s.call(this,yt.BreakOffByDisable),this.showPromise=void 0,(o=this.app)==null||o.$destroy(),this.app=void 0,(r=this.container)==null||r.remove(),this.removeEventListener()});u(this,"_enable",e=>{const{userAction:i}=e;this.addEventListener(),this.wrapper&&(this.wrapper.append(this.container),this.hooks.emit("enable",{userAction:i}),this.state.visible&&this._show({userAction:i}))});u(this,"_show",e=>W(this,null,function*(){var r;if(!this.state.enabled)return;if(!((r=this.five.model)!=null&&r.loaded))throw new Error(yt.ModelNotLoaded);if(!this.data)throw new Error(yt.DataNotLoaded);if(this.showPromise)return this.showPromise;const i={floorIndex:this.floorIndex,modelOpacity:this.state.config.modelOpacity,immediately:!1,isAutoShow:!1,userAction:!0},s=V(V({},i),e),o=()=>W(this,null,function*(){this.hooks.emit("show",{userAction:s.userAction,auto:s.isAutoShow});let a=!1,l;this.showRejection=h=>{a=!0,l=h};const[c]=yield Li(Gc(this.five,this.showState,s.userAction));if(c)throw c;if(a)throw l?new Error(l):new Error(yt.UnknownError);if(!this.updateSize())throw new Error(yt.UpdateSizeError);this.floorIndex=s.floorIndex,this.five.model.show(this.floorIndex)});return this.isHiddenByHideFunc=!1,this.showPromise=o().then(()=>{this.showPromise=void 0,this.showRejection=void 0;const a=s.modelOpacity,l=s.immediately?0:Vc;yn(this.five,a,l),this.render(l),this.hooks.emit("showAnimationEnded",{auto:s.isAutoShow,userAction:s.userAction})}).catch(a=>{if(this.showPromise=void 0,this.showRejection=void 0,this.updateState({visible:!1},s.userAction),!s.isAutoShow&&a instanceof Error)throw a}),this.showPromise}));u(this,"_hide",e=>{var o;(o=this.showRejection)==null||o.call(this,yt.BreakOffByHide),this.showPromise=void 0;const s=V(V({},{userAction:!0,isAutoHide:!1}),e);yn(this.five,1,0),this.hooks.emit("hide",{auto:s.isAutoHide,userAction:s.userAction}),this.render()});u(this,"handleClick",()=>{if(!this.state.visible)return;if(this.hooks.emit("click"))return!1});u(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("不正确的父容器选择器");this.wrapper=e,e.append(this.container)});u(this,"onFiveModeChange",e=>{e!==this.showState.mode&&(this.updateState({visible:!1},!1),this._hide({userAction:!1}))});u(this,"onFiveInteriaPan",(e,i)=>{if(!i||this.state.config.autoShowEnable===!1||this.isHiddenByHideFunc)return;const s=this.five.getCurrentState();s.mode==="Floorplan"&&(this.state.visible||mA(s)&&(this.updateState({visible:!0},!0),this._show({isAutoShow:!0})))});u(this,"onFivePanoArrived",e=>{var i;(i=this.five)!=null&&i.work&&(this.panoIndex=e,this.floorIndex=this.five.work.observers[e].floorIndex)});u(this,"onFiveCameraUpdate",(e,i)=>{if(!this.state.visible||this.showPromise)return;const s=this.five.getCurrentState();fA(s)&&(this.updateState({visible:!1},i),this._hide({userAction:i,isAutoHide:!0}))});u(this,"onFiveWantsGesture",(e,i)=>{if(this.state.visible&&(i.length>1||e==="mouseWheel"))return!1});u(this,"onFiveWantsPanGesture",(e,i)=>{if(this.five.getCurrentState().mode==="Floorplan"&&this.state.config.autoShowEnable!==!1&&i&&this.state.visible)return this.five.updateCamera(this.showState,0),!1});u(this,"onFiveWantsTapGesture",()=>this.handleClick());u(this,"onFiveWantsChangeMode",(e,i)=>{i==="Panorama"&&e==="Floorplan"&&(this.lastPanoramaLongitude=this.five.getCurrentState().longitude)});u(this,"onModelShownFloorChange",e=>{if(this.floorIndex!==e){if(e===null){const i=this.five.getCurrentState().panoIndex;this.floorIndex=this.five.work.observers[i].floorIndex;return}this.floorIndex=e,this.updateSize(),this.render()}});i!=null&&i.selector&&(this.selector=i.selector,console.warn("不推荐继续使用 params.selector 配置父容器,请使用 appendTo 方法")),this.showState={mode:"Floorplan",longitude:0,latitude:Math.PI/2,fov:cA/((l=i==null?void 0:i.scale)!=null?l:1)},this.defaultMissingFloorConfig={imageURL:this.staticPrefix+"/release/web/saas/missing-floorplan.e274c596.png",imageWidth:200,imageHeight:120,text:(d=(c=i.i18n)==null?void 0:c.call(i,"暂无平面图"))!=null?d:"暂无平面图",textFontSize:14};const s={northDesc:"北",modelOpacity:1,cameraEnable:!0,highlightEnable:!1,hoverEnable:!0,compassEnable:!0,autoShowEnable:!0,ruleLabelsEnable:!0,roomLabelsEnable:!0,roomAreaEnable:!0,roomNameEnable:!0,roomDimensionEnable:!0,adaptiveRoomLabelVisibleEnable:!0,cameraImageUrl:pi,attachedTo:gi.BOUNDING_CENTER,getLabelElement:void 0,missingFloorConfig:V(V({},this.defaultMissingFloorConfig),i.missingFloorConfig),i18n:h=>h,getRoomAreaText:h=>(h/1e6).toFixed(1)+"㎡",getRoomDimensionText:(h,f)=>(h/1e3).toFixed(1)+"m × "+(f/1e3).toFixed(1)+"m",getRuleDistanceText:h=>h.toString()},o=i?bn(i,["selector","scale"]):{},r=V(V({},s.missingFloorConfig),o.missingFloorConfig),a=ge(V(V({},s),o),{missingFloorConfig:r});this.state={enabled:!0,visible:!1,config:a},this.initContainer(),e.once("dispose",this.dispose),this.addEventListener()}load(e,i,s=!0){return W(this,null,function*(){function o(d){return Object.prototype.hasOwnProperty.apply(d,["version"])}const r=e;r&&!r.version&&console.warn("传入 serverData.data 的方式后续可能不再支持,请把 serverData 整体传入 load 函数");const a=JSON.parse(JSON.stringify(e)),l=o(a)?a.data:a,c=this.data;this.data=yield Ai(l),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,c),i&&this.updateState(i,s),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 i=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!0},e.userAction||i),this._enable({userAction:i})}disable(e={}){if(!this.state.enabled)return;const i=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!1},e.userAction||i),this._disable({userAction:i})}setState(e,i={}){const s=this.state,o=i.userAction!==void 0?i.userAction:!0;if(this.updateState(e,o),e.enabled!==void 0&&s.enabled!==e.enabled&&(e.enabled?this._enable({userAction:o}):this._disable({userAction:o})),e.visible!==void 0&&s.visible!==e.visible){const r={userAction:o};e.visible?this._show(r):this._hide(r)}this.render()}changeConfigs(e,i=!0){this.updateState({config:e},i),this.render()}formatData(e){return W(this,null,function*(){return yield Ai(e.data)})}updateState(e,i){var a;const s=this.state,o=(a=e.config)!=null&&a.missingFloorConfig?V(V({},s.config.missingFloorConfig),e.config.missingFloorConfig):s.config.missingFloorConfig,r=e.config?ge(V(V({},s.config),e.config),{missingFloorConfig:o}):s.config;this.state=ge(V(V({},this.state),e),{config:r}),!ct(this.state,s,{deep:!0})&&this.hooks.emit("stateChange",{state:this.state,prevState:s,userAction:i})}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.model.loaded?this.onFiveModelLoaded():e.once("modelLoaded",this.onFiveModelLoaded),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||this.showPromise)return;const i=ge(V({},this.state.config),{visible:this.state.visible,duration:e!=null?e:0,panoIndex:this.panoIndex,floorIndex:this.floorIndex,floorplanData:this.data,lastPanoramaLongitude:this.lastPanoramaLongitude,highlightData:this.highlightData});if(this.app)return this.app.$set(i);this.app=new br({target:this.container,intro:!0,props:i})}};const pA=(n,t)=>new gA(n,t);function AA(n){const{latitude:t,longitude:e}=n,i=Math.abs(t-Math.PI/2)>5*Math.PI/180,s=e>5*(Math.PI/180)&&e<355*(Math.PI/180);return i||s}function vA(n){const{latitude:t,longitude:e}=n,i=Math.abs(t-Math.PI/2)<10*Math.PI/180,s=e<30*(Math.PI/180)||e>330*(Math.PI/180);return i&&s}let bA=class extends vi{constructor(e,i){var l,c;super(e);u(this,"name","modelFloorplanPlugin");u(this,"state");u(this,"data");u(this,"showState");u(this,"showPromise");u(this,"app");u(this,"panoIndex",0);u(this,"floorIndex",0);u(this,"selector");u(this,"showRejection");u(this,"wrapper");u(this,"container",document.createElement("div"));u(this,"lastPanoramaLongitude",0);u(this,"size",{width:0,height:0});u(this,"defaultMissingFloorConfig");u(this,"hasAddedEventListener",!1);u(this,"isHiddenByHideFunc",!1);u(this,"highlightData",{});u(this,"dispose",()=>{var e,i;this.removeEventListener(),(e=this.app)==null||e.$destroy(),this.app=void 0,(i=this.container)==null||i.remove(),this.data=void 0,this.wrapper=void 0,this.selector=void 0,this.hooks.emit("dispose")});u(this,"show",(...i)=>W(this,[...i],function*(e={}){if(!this.state.enabled||!this.showPromise&&this.state.visible)return;const s=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!0},s),this._show(e)}));u(this,"hide",(...i)=>W(this,[...i],function*(e={}){this.state.enabled&&(this.isHiddenByHideFunc=!0,this.state.visible!==!1&&(this.updateState({visible:!1},e.userAction||!0),this._hide(e)))}));u(this,"updateSize",()=>{if(!this.data||!this.container||!this.wrapper)return!1;const{min:e,max:i}=this.data.bounding,s=i.x-e.x,o=i.y-e.y,r=this.state.config.attachedTo?{attachedTo:this.state.config.attachedTo}:void 0,a=wr(this.five,this.wrapper,this.floorIndex,r),l=Math.ceil(s*a),c=Math.ceil(o*a);return 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}),!0});u(this,"highlight",e=>{this.state.config.highlightEnable&&(this.highlightData=e,this.render())});u(this,"unhighlight",()=>{this.highlightData={},this.render()});u(this,"_disable",e=>{var s,o,r;const{userAction:i}=e;this.hooks.emit("disable",{userAction:i}),(s=this.showRejection)==null||s.call(this,yt.BreakOffByDisable),this.showPromise=void 0,(o=this.app)==null||o.$destroy(),this.app=void 0,(r=this.container)==null||r.remove(),this.removeEventListener()});u(this,"_enable",e=>{const{userAction:i}=e;this.addEventListener(),this.wrapper&&(this.wrapper.append(this.container),this.hooks.emit("enable",{userAction:i}),this.state.visible&&this._show({userAction:i}))});u(this,"_show",e=>W(this,null,function*(){var r;if(!this.state.enabled)return;if(!((r=this.five.model)!=null&&r.loaded))throw new Error(yt.ModelNotLoaded);if(!this.data)throw new Error(yt.DataNotLoaded);if(this.showPromise)return this.showPromise;const i={floorIndex:this.floorIndex,modelOpacity:this.state.config.modelOpacity,immediately:!1,isAutoShow:!1,userAction:!0},s=V(V({},i),e),o=()=>W(this,null,function*(){this.hooks.emit("show",{userAction:s.userAction,auto:s.isAutoShow});let a=!1,l;this.showRejection=h=>{a=!0,l=h};const[c]=yield Li(Gc(this.five,this.showState,s.userAction));if(c)throw c;if(a)throw l?new Error(l):new Error(yt.UnknownError);if(!this.updateSize())throw new Error(yt.UpdateSizeError);this.updatePosition(),this.floorIndex=s.floorIndex,this.five.model.show(this.floorIndex)});return this.isHiddenByHideFunc=!1,this.showPromise=o().then(()=>{this.showPromise=void 0,this.showRejection=void 0;const a=s.modelOpacity,l=s.immediately?0:Vc;yn(this.five,a,l),this.render(l),this.hooks.emit("showAnimationEnded",{auto:s.isAutoShow,userAction:s.userAction})}).catch(a=>{if(this.showPromise=void 0,this.showRejection=void 0,this.updateState({visible:!1},s.userAction),!s.isAutoShow&&a instanceof Error)throw a}),this.showPromise}));u(this,"_hide",e=>{var o;(o=this.showRejection)==null||o.call(this,yt.BreakOffByHide),this.showPromise=void 0;const s=V(V({},{userAction:!0,isAutoHide:!1}),e);yn(this.five,1,0),this.hooks.emit("hide",{auto:s.isAutoHide,userAction:s.userAction}),this.render()});u(this,"handleClick",()=>{if(!this.state.visible)return;if(this.hooks.emit("click"))return!1});u(this,"onFiveModelLoaded",()=>{const i=this.five.model.bounding.getCenter(new k.Vector3);if(this.showState.offset=i,this.state.enabled===!1||this.wrapper||!this.selector)return;const s=this.selector instanceof Element?this.selector:document.querySelector(this.selector);if(!s)throw new Error("不正确的父容器选择器");this.wrapper=s,s.append(this.container)});u(this,"onFiveModeChange",e=>{e!==this.showState.mode&&(this.updateState({visible:!1},!1),this._hide({userAction:!1}))});u(this,"onFiveInteriaPan",(e,i)=>{if(!i||this.state.visible||this.state.config.autoShowEnable===!1||this.isHiddenByHideFunc)return;const s=this.five.getCurrentState();s.mode===this.showState.mode&&vA(s)&&(this.updateState({visible:!0},!0),this._show({isAutoShow:!0}))});u(this,"onFivePanoArrived",e=>{var i;(i=this.five)!=null&&i.work&&(this.panoIndex=e,this.floorIndex=this.five.work.observers[e].floorIndex)});u(this,"onFiveCameraUpdate",(e,i)=>{if(!this.state.visible||this.showPromise)return;const s=this.five.getCurrentState();this.updatePosition(),this.updateSize(),AA(s)&&(this.updateState({visible:!1},i),this._hide({userAction:i}))});u(this,"onFiveWantsPanGesture",(e,i)=>{if(this.five.getCurrentState().mode===this.showState.mode&&this.state.config.autoShowEnable!==!1&&i&&this.state.visible)return this.five.updateCamera(bn(this.showState,["offset"]),0),!1});u(this,"onFiveWantsTapGesture",()=>this.handleClick());u(this,"onFiveWantsChangeMode",(e,i)=>{i==="Panorama"&&e===this.showState.mode&&(this.lastPanoramaLongitude=this.five.getCurrentState().longitude)});u(this,"onModelShownFloorChange",e=>{if(this.floorIndex!==e){if(e===null){const i=this.five.getCurrentState().panoIndex;this.floorIndex=this.five.work.observers[i].floorIndex;return}this.floorIndex=e,this.updateSize(),this.render()}});i!=null&&i.selector&&(this.selector=i.selector,console.warn("不推荐继续使用 params.selector 配置父容器,请使用 appendTo 方法")),this.showState={mode:"Mapview",longitude:0,latitude:Math.PI/2},this.defaultMissingFloorConfig={imageURL:this.staticPrefix+"/release/web/saas/missing-floorplan.e274c596.png",imageWidth:200,imageHeight:120,text:(c=(l=i.i18n)==null?void 0:l.call(i,"暂无平面图"))!=null?c:"暂无平面图",textFontSize:14};const s={northDesc:"北",modelOpacity:1,cameraEnable:!0,highlightEnable:!1,hoverEnable:!0,compassEnable:!0,autoShowEnable:!0,ruleLabelsEnable:!0,roomLabelsEnable:!0,roomAreaEnable:!0,roomNameEnable:!0,roomDimensionEnable:!0,cameraImageUrl:pi,attachedTo:gi.BOUNDING_CENTER,getLabelElement:void 0,adaptiveRoomLabelVisibleEnable:!0,missingFloorConfig:V(V({},this.defaultMissingFloorConfig),i.missingFloorConfig),i18n:d=>d,getRoomAreaText:d=>(d/1e6).toFixed(1)+"㎡",getRoomDimensionText:(d,h)=>(d/1e3).toFixed(1)+"m × "+(h/1e3).toFixed(1)+"m",getRuleDistanceText:d=>d.toString()},o=i?bn(i,["selector","scale"]):{},r=V(V({},s.missingFloorConfig),o.missingFloorConfig),a=ge(V(V({},s),o),{missingFloorConfig:r});this.state={enabled:!0,visible:!1,config:a},this.initContainer(),e.model.loaded?this.onFiveModelLoaded():e.once("modelLoaded",this.onFiveModelLoaded),e.once("dispose",this.dispose),this.addEventListener()}load(e,i,s=!0){return W(this,null,function*(){function o(d){return Object.prototype.hasOwnProperty.apply(d,["version"])}const r=e;r&&!r.version&&console.warn("传入 serverData.data 的方式后续可能不再支持,请把 serverData 整体传入 load 函数");const a=JSON.parse(JSON.stringify(e)),l=o(a)?a.data:a,c=this.data;this.data=yield Ai(l),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,c),i&&this.updateState(i,s),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 i=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!0},e.userAction||i),this._enable({userAction:i})}disable(e={}){if(!this.state.enabled)return;const i=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!1},e.userAction||i),this._disable({userAction:i})}setState(e,i={}){const s=this.state,o=i.userAction!==void 0?i.userAction:!0;if(this.updateState(e,o),e.enabled!==void 0&&s.enabled!==e.enabled&&(e.enabled?this._enable({userAction:o}):this._disable({userAction:o})),e.visible!==void 0&&s.visible!==e.visible){const r={userAction:o};e.visible?this._show(r):this._hide(r)}}changeConfigs(e,i=!0){this.updateState({config:e},i),this.render()}updatePosition(){var a;const e=yr(this.five,this.floorIndex,this.state.config.attachedTo),i=(a=this.five.model)==null?void 0:a.bounding.getCenter(new k.Vector3).setY(e);if(!i)return;const s=i.clone().project(this.five.camera),o=(s.x+1)/2,r=-(s.y-1)/2;this.container.style.left=o*100+"%",this.container.style.top=r*100+"%"}formatData(e){return W(this,null,function*(){return yield Ai(e.data)})}updateState(e,i){var a;const s=this.state,o=(a=e.config)!=null&&a.missingFloorConfig?V(V({},s.config.missingFloorConfig),e.config.missingFloorConfig):s.config.missingFloorConfig,r=e.config?ge(V(V({},s.config),e.config),{missingFloorConfig:o}):s.config;this.state=ge(V(V({},this.state),e),{config:r}),!ct(this.state,s,{deep:!0})&&this.hooks.emit("stateChange",{state:this.state,prevState:s,userAction:i})}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("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||this.showPromise)return;const i=ge(V({},this.state.config),{visible:this.state.visible,duration:e!=null?e:0,panoIndex:this.panoIndex,floorIndex:this.floorIndex,floorplanData:this.data,lastPanoramaLongitude:this.lastPanoramaLongitude,highlightData:this.highlightData});if(this.app)return this.app.$set(i);this.app=new br({target:this.container,intro:!0,props:i})}};const yA=(n,t)=>new bA(n,t);let wA=class extends vi{constructor(e,i){var l,c;super(e);u(this,"name","topviewFloorplanPlugin");u(this,"state");u(this,"data");u(this,"app");u(this,"selector");u(this,"panoIndex",0);u(this,"floorIndex",0);u(this,"wrapper");u(this,"container",document.createElement("div"));u(this,"lastPanoramaLongitude",0);u(this,"size",{width:0,height:0});u(this,"defaultMissingFloorConfig");u(this,"hasAddedEventListener",!1);u(this,"isHiddenByHideFunc",!1);u(this,"highlightData",{});u(this,"updateSize",()=>{if(!this.data||!this.container||!this.wrapper||this.five.getCurrentState().mode!=="Topview")return!1;const{min:e,max:i}=this.data.bounding,s=i.x-e.x,o=i.y-e.y,r=this.state.config.attachedTo?{attachedTo:this.state.config.attachedTo}:void 0,a=wr(this.five,this.wrapper,this.floorIndex,r),l=Math.ceil(s*a),c=Math.ceil(o*a);return 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}),!0});u(this,"dispose",()=>{var e,i;this.removeEventListener(),(e=this.app)==null||e.$destroy(),this.app=void 0,(i=this.container)==null||i.remove(),this.data=void 0,this.wrapper=void 0,this.selector=void 0,this.hooks.emit("dispose")});u(this,"highlight",e=>{this.state.config.highlightEnable&&(this.highlightData=e,this.render())});u(this,"unhighlight",()=>{this.highlightData={},this.render()});u(this,"_disable",e=>{var s,o;const{userAction:i}=e;(s=this.app)==null||s.$destroy(),this.app=void 0,(o=this.container)==null||o.remove(),this.removeEventListener(),this.hooks.emit("disable",{userAction:i})});u(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("不正确的父容器选择器");this.wrapper=e,e.append(this.container)});u(this,"onFiveModeChange",(...[e,,,,i])=>{e!=="Topview"&&this.state.visible&&(this.updateState({visible:!1},i),this._hide({userAction:i}))});u(this,"onFivePanoArrived",e=>{var i;(i=this.five)!=null&&i.work&&(this.panoIndex=e,this.floorIndex=this.five.work.observers[e].floorIndex)});u(this,"onFiveCameraUpdate",(e,i)=>{this.state.visible&&(this.updatePosition(),this.updateSize())});u(this,"onFiveWantsGesture",e=>{if(!(e!=="pan"&&e!=="pinch"&&e!=="mouseWheel")&&this.state.visible&&!this.state.config.gestureEnable)return!1});u(this,"onFiveWantsMoveToPano",()=>{if(this.state.visible&&this.state.config.preventRoomClick)return!1});u(this,"onFiveInitAnimationEnded",(...[,,e])=>{const{mode:i}=this.five.getCurrentState();i==="Topview"&&!this.isHiddenByHideFunc&&!this.state.visible&&this.state.config.autoShowEnable&&(this.updateState({visible:!0},e),this._show({userAction:e}))});u(this,"onModelShownFloorChange",e=>{if(this.floorIndex!==e){if(e===null){const i=this.five.getCurrentState().panoIndex;this.floorIndex=this.five.work.observers[i].floorIndex;return}this.floorIndex=e,this.updateSize(),this.render()}});i!=null&&i.selector&&(this.selector=i.selector,console.warn("不推荐继续使用 params.selector 配置父容器,请使用 appendTo 方法")),this.defaultMissingFloorConfig={imageURL:this.staticPrefix+"/release/web/saas/missing-floorplan.e274c596.png",imageWidth:200,imageHeight:120,text:(c=(l=i.i18n)==null?void 0:l.call(i,"暂无平面图"))!=null?c:"暂无平面图",textFontSize:14};const s={northDesc:"北",modelOpacity:1,cameraEnable:!0,hoverEnable:!0,highlightEnable:!1,compassEnable:!0,gestureEnable:!1,autoShowEnable:!0,ruleLabelsEnable:!0,roomLabelsEnable:!0,roomAreaEnable:!0,roomNameEnable:!0,roomDimensionEnable:!0,cameraImageUrl:pi,attachedTo:gi.BOUNDING_CENTER,getLabelElement:void 0,missingFloorConfig:V(V({},this.defaultMissingFloorConfig),i.missingFloorConfig),i18n:d=>d,adaptiveRoomLabelVisibleEnable:!0,getRoomAreaText:d=>(d/1e6).toFixed(1)+"㎡",getRoomDimensionText:(d,h)=>(d/1e3).toFixed(1)+"m × "+(h/1e3).toFixed(1)+"m",getRuleDistanceText:d=>d.toString()},o=i?bn(i,["selector","scale"]):{},r=V(V({},s.missingFloorConfig),o.missingFloorConfig),a=ge(V(V({},s),o),{missingFloorConfig:r});this.state={enabled:!0,visible:!1,config:a},this.initContainer(),e.model.loaded?this.onFiveModelLoaded():e.once("modelLoaded",this.onFiveModelLoaded),e.once("dispose",this.dispose),this.addEventListener()}load(e,i,s=!0){return W(this,null,function*(){function o(d){return Object.prototype.hasOwnProperty.apply(d,["version"])}const r=e;r&&!r.version&&console.warn("传入 serverData.data 的方式后续可能不再支持,请把 serverData 整体传入 load 函数");const a=JSON.parse(JSON.stringify(e)),l=o(a)?a.data:a,c=this.data;this.data=yield Ai(l),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,c),i&&this.updateState(i,s),this.render()})}updatePosition(){var a;const e=yr(this.five,this.floorIndex,this.state.config.attachedTo),i=(a=this.five.model)==null?void 0:a.bounding.getCenter(new k.Vector3).setY(e);if(!i)return;const s=i.clone().project(this.five.camera),o=(s.x+1)/2,r=-(s.y-1)/2;this.container.style.left=o*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 W(this,arguments,function*(e={}){if(this.state.visible)return;const i=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!0},i),this._show({userAction:i})})}hide(){return W(this,arguments,function*(e={}){if(this.isHiddenByHideFunc=!0,!this.state.visible)return;const i=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!1},i),this._hide({userAction:i})})}enable(e={}){if(this.state.enabled)return;const i=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!0},e.userAction||i),this._enable({userAction:i})}disable(e={}){if(!this.state.enabled)return;const i=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!1},e.userAction||i),this._disable({userAction:i})}setState(e,i={}){const s=this.state,o=i.userAction!==void 0?i.userAction:!0;if(this.updateState(e,o),e.enabled!==void 0&&s.enabled!==e.enabled){const r={userAction:o};e.enabled?this._enable(r):this._disable(r)}if(e.visible!==void 0&&s.visible!==e.visible){const r={userAction:o};e.visible?this._show(r):this._hide(r)}}changeConfigs(e,i=!0){this.updateState({config:e},i),this.render()}formatData(e){return W(this,null,function*(){return yield Ai(e.data)})}_show(e){return W(this,null,function*(){if(!this.state.enabled)return;this.isHiddenByHideFunc=!1;const{userAction:i}=e;this.hooks.emit("show",{userAction:i,auto:!1}),this.five.getCurrentState().mode!=="Topview"&&(yield Cr(this.five,["Topview",void 0,void 0,i])),this.five.model.show(this.floorIndex),this.updatePosition(),this.updateSize();const s=500,o=this.state.config.modelOpacity;yn(this.five,o,s),this.hooks.emit("showAnimationEnded",{userAction:i,auto:!1}),this.render()})}_hide(e){return W(this,null,function*(){if(!this.state.enabled)return;const{userAction:i}=e;this.hooks.emit("hide",{userAction:i,auto:!1});const s=1,o=0;yn(this.five,s,o),this.render()})}_enable(e){const{userAction:i}=e;this.addEventListener(),this.wrapper&&this.wrapper.append(this.container),this.hooks.emit("enable",{userAction:i}),this.state.visible&&this._show({userAction:i})}updateState(e,i){var a;const s=this.state,o=(a=e.config)!=null&&a.missingFloorConfig?V(V({},s.config.missingFloorConfig),e.config.missingFloorConfig):s.config.missingFloorConfig,r=e.config?ge(V(V({},s.config),e.config),{missingFloorConfig:o}):s.config;this.state=ge(V(V({},this.state),e),{config:r}),!ct(this.state,s,{deep:!0})&&this.hooks.emit("stateChange",{state:this.state,prevState:s,userAction:i})}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 i=ge(V({},this.state.config),{visible:this.state.visible,duration:e!=null?e:0,panoIndex:this.panoIndex,floorIndex:this.floorIndex,floorplanData:this.data,lastPanoramaLongitude:this.lastPanoramaLongitude,highlightData:this.highlightData});if(this.app)return this.app.$set(i);this.app=new br({target:this.container,intro:!0,props:i})}};const CA=(n,t)=>new wA(n,t);function Ir(n,t=200){let e;return function(...i){e||(n(...i),e=setTimeout(function(){e=null},t))}}function IA(n){me(n,"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 PA(n){let t,e,i;return{c(){t=x("div"),e=x("div"),i=x("div"),w(i,"class","plugin-radar__camera-rotate svelte-1nqrlxd"),S(i,"background-image","url("+(n[0]||pi)+")"),S(i,"transform",n[1]),w(e,"class","plugin-radar__camera-position svelte-1nqrlxd"),S(e,"transform",n[2]),w(t,"class","plugin-radar__camera-wrapper svelte-1nqrlxd"),S(t,"opacity",n[3]?1:0)},m(s,o){O(s,t,o),L(t,e),L(e,i)},p(s,[o]){o&1&&S(i,"background-image","url("+(s[0]||pi)+")"),(o&1||o&3)&&S(i,"transform",s[1]),o&4&&S(e,"transform",s[2]),o&8&&S(t,"opacity",s[3]?1:0)},i:J,o:J,d(s){s&&j(t)}}}function kA(n){return`rotate(${Math.floor(n/Math.PI*180)*-1+45}deg)`}function MA(n,t,e){var y,P;let i,s,o,r,{five:a}=t,{pxmm:l}=t,{floorplanData:c}=t,{cameraImageUrl:d}=t,h=a.getCurrentState().panoIndex,f=a.getCurrentState().longitude,m=(P=(y=a.work.observers[a.getCurrentState().panoIndex])==null?void 0:y.floorIndex)!=null?P:0;function A(I,E){const C=I.bounding,z=I.observers[E];if(!z)return"";const R=(C.max.x-C.min.x)*l,U=(C.max.y-C.min.y)*l,H=Math.floor(z.positionInImage.x*R),N=Math.floor(z.positionInImage.y*U);return`translate(${H}px, ${N}px)`}function p(I){e(7,h=I)}function g(I){e(9,m=a.work.observers[I].floorIndex)}const v=Ir(I=>{e(8,f=I.longitude)},1e3/60);return gt(()=>(a.on("panoWillArrive",p),a.on("panoArrived",g),a.on("cameraDirectionUpdate",v),function(){a.off("panoWillArrive",p),a.off("panoArrived",g),a.off("cameraDirectionUpdate",v)})),n.$$set=I=>{"five"in I&&e(4,a=I.five),"pxmm"in I&&e(5,l=I.pxmm),"floorplanData"in I&&e(6,c=I.floorplanData),"cameraImageUrl"in I&&e(0,d=I.cameraImageUrl)},n.$$.update=()=>{n.$$.dirty&576&&e(10,i=c.floorDatas[m]),n.$$.dirty&1024&&e(3,s=i.rooms.length>0),n.$$.dirty&192&&e(2,o=A(c,h)),n.$$.dirty&256&&e(1,r=kA(f))},[d,r,o,s,a,l,c,h,f,m,i]}class EA extends ce{constructor(t){super(),le(this,t,MA,PA,ae,{five:4,pxmm:5,floorplanData:6,cameraImageUrl:0},IA)}}function DA(n){me(n,"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 Nc(n,t,e){const i=n.slice();return i[1]=t[e],i}function Fc(n,t){let e,i,s=`${t[1].icon.width/16}rem`,o=`${t[1].icon.height/16}rem`,r,a=`${t[1].positionInImage.y*100}%`,l=`${t[1].positionInImage.x*100}%`;return{key:n,first:null,c(){e=x("div"),i=x("div"),r=K(),w(i,"class","plugin-pano-floorplan__extra-object-item svelte-1i87fz7"),S(i,"background-image",`url(${t[1].icon.url})`),S(i,"width",s),S(i,"height",o),w(e,"class","plugin-pano-floorplan__extra-object-item--position svelte-1i87fz7"),S(e,"top",a),S(e,"left",l),this.first=e},m(c,d){O(c,e,d),L(e,i),L(e,r)},p(c,d){t=c,d&1&&S(i,"background-image",`url(${t[1].icon.url})`);const h=d&1;h&&S(i,"width",s),h&&S(i,"height",o),d&1&&a!==(a=`${t[1].positionInImage.y*100}%`)&&S(e,"top",a),d&1&&l!==(l=`${t[1].positionInImage.x*100}%`)&&S(e,"left",l)},d(c){c&&j(e)}}}function xA(n){let t,e=[],i=new Map,s=n[0];const o=r=>r[1].id;for(let r=0;r<s.length;r+=1){let a=Nc(n,s,r),l=o(a);i.set(l,e[r]=Fc(l,a))}return{c(){t=x("div");for(let r=0;r<e.length;r+=1)e[r].c();w(t,"class","plugin-pano-floorplan__extra-objects svelte-1i87fz7")},m(r,a){O(r,t,a);for(let l=0;l<e.length;l+=1)e[l]&&e[l].m(t,null)},p(r,[a]){a&1&&(s=r[0],e=Bt(e,a,o,1,r,s,i,t,mr,Fc,null,Nc))},i:J,o:J,d(r){r&&j(t);for(let a=0;a<e.length;a+=1)e[a].d()}}}function SA(n,t,e){let{extraObjects:i=[]}=t;return n.$$set=s=>{"extraObjects"in s&&e(0,i=s.extraObjects)},[i]}class LA extends ce{constructor(t){super(),le(this,t,SA,xA,ae,{extraObjects:0},DA)}}function TA(n){me(n,"svelte-18287ai",".missing-floor-wrapper.svelte-18287ai{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;display:flex;justify-content:center;align-items:center}.missing-floor-image.svelte-18287ai{max-width:100%;max-height:100%}")}function jA(n){let t,e,i,s,o,r;const a=[{floorIndex:n[2],floorplanData:n[4]}];let l={};for(let d=0;d<a.length;d+=1)l=st(l,a[d]);t=new oc({props:l}),i=new LA({props:{extraObjects:n[7]}});let c=n[3]&&_c(n);return{c(){oe(t.$$.fragment),e=K(),oe(i.$$.fragment),s=K(),c&&c.c(),o=Ie()},m(d,h){ne(t,d,h),O(d,e,h),ne(i,d,h),O(d,s,h),c&&c.m(d,h),O(d,o,h),r=!0},p(d,h){const f=h&20?dt(a,[{floorIndex:d[2],floorplanData:d[4]}]):{};t.$set(f);const m={};h&128&&(m.extraObjects=d[7]),i.$set(m),d[3]?c?(c.p(d,h),h&8&&D(c,1)):(c=_c(d),c.c(),D(c,1),c.m(o.parentNode,o)):c&&(he(),T(c,1,1,()=>{c=null}),ue())},i(d){r||(D(t.$$.fragment,d),D(i.$$.fragment,d),D(c),r=!0)},o(d){T(t.$$.fragment,d),T(i.$$.fragment,d),T(c),r=!1},d(d){se(t,d),d&&j(e),se(i,d),d&&j(s),c&&c.d(d),d&&j(o)}}}function zA(n){let t,e,i;return{c(){t=x("div"),e=x("img"),w(e,"class","missing-floor-image svelte-18287ai"),tt(e.src,i=n[6])||w(e,"src",i),w(e,"alt","缺省楼层"),w(t,"class","missing-floor-wrapper svelte-18287ai")},m(s,o){O(s,t,o),L(t,e)},p(s,o){o&64&&!tt(e.src,i=s[6])&&w(e,"src",i)},i:J,o:J,d(s){s&&j(t)}}}function _c(n){let t,e;const i=[{five:n[0],pxmm:n[1],floorIndex:n[2],floorplanData:n[4],onRoomHeightClick:n[9],highlightData:n[5],hoveredRoom:void 0}];let s={};for(let o=0;o<i.length;o+=1)s=st(s,i[o]);return t=new kc({props:s}),{c(){oe(t.$$.fragment)},m(o,r){ne(t,o,r),e=!0},p(o,r){const a=r&567?dt(i,[{five:o[0],pxmm:o[1],floorIndex:o[2],floorplanData:o[4],onRoomHeightClick:o[9],highlightData:o[5],hoveredRoom:void 0}]):{};t.$set(a)},i(o){e||(D(t.$$.fragment,o),e=!0)},o(o){T(t.$$.fragment,o),e=!1},d(o){se(t,o)}}}function OA(n){let t,e,i,s;const o=[zA,jA],r=[];function a(l,c){return l[8]?1:0}return t=a(n),e=r[t]=o[t](n),{c(){e.c(),i=Ie()},m(l,c){r[t].m(l,c),O(l,i,c),s=!0},p(l,[c]){let d=t;t=a(l),t===d?r[t].p(l,c):(he(),T(r[d],1,1,()=>{r[d]=null}),ue(),e=r[t],e?e.p(l,c):(e=r[t]=o[t](l),e.c()),D(e,1),e.m(i.parentNode,i))},i(l){s||(D(e),s=!0)},o(l){T(e),s=!1},d(l){r[t].d(l),l&&j(i)}}}function BA(n,t,e){let i,s,o,{five:r}=t,{pxmm:a}=t,{floorIndex:l}=t,{hoverEnable:c}=t,{floorplanData:d}=t,{extraObjects:h=[]}=t,{highlightData:f}=t,{missingFloorImageUrl:m}=t;const A=void 0;return n.$$set=p=>{"five"in p&&e(0,r=p.five),"pxmm"in p&&e(1,a=p.pxmm),"floorIndex"in p&&e(2,l=p.floorIndex),"hoverEnable"in p&&e(3,c=p.hoverEnable),"floorplanData"in p&&e(4,d=p.floorplanData),"extraObjects"in p&&e(10,h=p.extraObjects),"highlightData"in p&&e(5,f=p.highlightData),"missingFloorImageUrl"in p&&e(6,m=p.missingFloorImageUrl)},n.$$.update=()=>{n.$$.dirty&20&&e(11,i=d.floorDatas[l]),n.$$.dirty&2048&&e(8,s=i.rooms.length>0),n.$$.dirty&1028&&e(7,o=h==null?void 0:h.filter(p=>p.floorIndex===l))},[r,a,l,c,d,f,m,o,s,A,h,i]}class VA extends ce{constructor(t){super(),le(this,t,BA,OA,ae,{five:0,pxmm:1,floorIndex:2,hoverEnable:3,floorplanData:4,extraObjects:10,highlightData:5,missingFloorImageUrl:6},TA)}}function RA(n){me(n,"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 Hc(n){let t,e,i,s,o=n[8]!==0&&Wc(n);return{c(){t=x("div"),o&&o.c(),w(t,"class","plugin-floorplan-radar svelte-1mvqyqq")},m(r,a){O(r,t,a),o&&o.m(t,null),e=!0,i||(s=[zt(mi.call(null,t)),be(t,"clientWidth",n[14]),be(t,"clientHeight",n[15])],i=!0)},p(r,a){r[8]!==0?o?(o.p(r,a),a&256&&D(o,1)):(o=Wc(r),o.c(),D(o,1),o.m(t,null)):o&&(he(),T(o,1,1,()=>{o=null}),ue())},i(r){e||(D(o),e=!0)},o(r){T(o),e=!1},d(r){r&&j(t),o&&o.d(),i=!1,Xe(s)}}}function Wc(n){let t,e,i,s,o=`${n[10]}px`,r=`${n[13]}px`,a;const l=[{five:n[0],pxmm:n[11],floorIndex:n[12],floorplanData:n[3],hoverEnable:n[2],extraObjects:n[5],highlightData:n[6],missingFloorImageUrl:n[7]}];let c={};for(let f=0;f<l.length;f+=1)c=st(c,l[f]);e=new VA({props:c});const d=[{pxmm:n[11],five:n[0],floorplanData:n[3],cameraImageUrl:n[4]}];let h={};for(let f=0;f<d.length;f+=1)h=st(h,d[f]);return s=new EA({props:h}),{c(){t=x("div"),oe(e.$$.fragment),i=K(),oe(s.$$.fragment),w(t,"class","plugin-floorplan-radar-container svelte-1mvqyqq"),S(t,"width",o),S(t,"height",r)},m(f,m){O(f,t,m),ne(e,t,null),L(t,i),ne(s,t,null),a=!0},p(f,m){const A=m&6381?dt(l,[{five:f[0],pxmm:f[11],floorIndex:f[12],floorplanData:f[3],hoverEnable:f[2],extraObjects:f[5],highlightData:f[6],missingFloorImageUrl:f[7]}]):{};e.$set(A);const p=m&2073?dt(d,[{pxmm:f[11],five:f[0],floorplanData:f[3],cameraImageUrl:f[4]}]):{};s.$set(p),m&1024&&o!==(o=`${f[10]}px`)&&S(t,"width",o),m&8192&&r!==(r=`${f[13]}px`)&&S(t,"height",r)},i(f){a||(D(e.$$.fragment,f),D(s.$$.fragment,f),a=!0)},o(f){T(e.$$.fragment,f),T(s.$$.fragment,f),a=!1},d(f){f&&j(t),se(e),se(s)}}}function QA(n){let t,e,i=n[1]&&Hc(n);return{c(){i&&i.c(),t=Ie()},m(s,o){i&&i.m(s,o),O(s,t,o),e=!0},p(s,[o]){s[1]?i?(i.p(s,o),o&2&&D(i,1)):(i=Hc(s),i.c(),D(i,1),i.m(t.parentNode,t)):i&&(he(),T(i,1,1,()=>{i=null}),ue())},i(s){e||(D(i),e=!0)},o(s){T(i),e=!1},d(s){i&&i.d(s),s&&j(t)}}}function GA(n,t,e){var I,E;let{five:i}=t,{visible:s}=t,{hoverEnable:o}=t,{floorplanData:r}=t,{cameraImageUrl:a}=t,{extraObjects:l=[]}=t,{highlightData:c}=t,{missingFloorImageUrl:d}=t,h=0,f=(E=(I=i.work.observers[i.getCurrentState().panoIndex])==null?void 0:I.floorIndex)!=null?E:0,m=0,A=0,p=0,g=0;function v(C){e(12,f=i.work.observers[C].floorIndex)}gt(()=>(i.on("panoArrived",v),()=>{i.off("panoArrived",v)}));const y=C=>{e(8,m=C.detail)},P=C=>{e(9,A=C.detail)};return n.$$set=C=>{"five"in C&&e(0,i=C.five),"visible"in C&&e(1,s=C.visible),"hoverEnable"in C&&e(2,o=C.hoverEnable),"floorplanData"in C&&e(3,r=C.floorplanData),"cameraImageUrl"in C&&e(4,a=C.cameraImageUrl),"extraObjects"in C&&e(5,l=C.extraObjects),"highlightData"in C&&e(6,c=C.highlightData),"missingFloorImageUrl"in C&&e(7,d=C.missingFloorImageUrl)},n.$$.update=()=>{if(n.$$.dirty&1800){const C=Math.min(m,A),{max:z,min:R}=r.bounding,U=z.x-R.x,H=z.y-R.y,N=function(){return U>H?[C,C/U*H]:[C/H*U,C]}();e(10,p=N[0]),e(13,g=N[1]),e(11,h=p/U)}},[i,s,o,r,a,l,c,d,m,A,p,h,f,g,y,P]}class NA extends ce{constructor(t){super(),le(this,t,GA,QA,ae,{five:0,visible:1,hoverEnable:2,floorplanData:3,cameraImageUrl:4,extraObjects:5,highlightData:6,missingFloorImageUrl:7},RA)}}let FA=class extends vi{constructor(e,i){super(e);u(this,"name","panoFloorplanRadarPlugin");u(this,"state");u(this,"data");u(this,"app");u(this,"wrapperSelector","");u(this,"wrapper",null);u(this,"disposed",!1);u(this,"extraObjects",[]);u(this,"highlightData",{});u(this,"dispose",()=>{var e;this.disposed=!0,(e=this.app)==null||e.$destroy(),this.wrapper=null,this.wrapperSelector="",this.hooks.emit("dispose")});u(this,"highlight",e=>{this.state.config.highlightEnable&&(this.highlightData=e,this.render())});u(this,"unhighlight",()=>{this.highlightData={},this.render()});u(this,"_disable",e=>{var s;const{userAction:i}=e;(s=this.app)==null||s.$destroy(),this.app=void 0,this.hooks.emit("disable",{userAction:i})});this.five=e;const s={hoverEnable:!0,highlightEnable:!0,cameraImageUrl:pi,missingFloorImageUrl:this.staticPrefix+"/release/web/saas/missing-floor.d687a5ed.png"},o=V(V({},s),i==null?void 0:i.configs);this.state={enabled:!0,visible:!0,config:o},i!=null&&i.wrapper&&console.warn("不推荐继续使用 params.selector 配置父容器,请使用 appendTo 方法"),typeof(i==null?void 0:i.wrapper)=="string"?this.wrapperSelector=i.wrapper:(i==null?void 0:i.wrapper)instanceof Element&&(this.wrapper=i.wrapper),e.once("dispose",this.dispose)}load(e,i,s=!0){return W(this,null,function*(){function o(c){return Object.prototype.hasOwnProperty.apply(c,["version"])}const r=JSON.parse(JSON.stringify(e)),a=o(r)?r.data:r,l=this.data;this.data=yield Ai(a),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,l),i&&this.updateState(i,s),this.render()})}show(){return W(this,arguments,function*(e={}){if(this.state.visible)return;const i=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!0},i),this._show({userAction:i})})}hide(){return W(this,arguments,function*(e={}){if(!this.state.visible)return;const i=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!1},i),this._hide({userAction:i})})}enable(e={}){if(this.state.enabled)return;const i=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!0},e.userAction||i),this._enable({userAction:i})}disable(e={}){if(!this.state.enabled)return;const i=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!1},e.userAction||i),this._disable({userAction:i})}setState(e,i={}){const s=this.state,o=i.userAction!==void 0?i.userAction:!0;if(this.updateState(e,o),e.enabled!==void 0&&s.enabled!==e.enabled){const r={userAction:o};e.enabled?this._enable(r):this._disable(r)}if(e.visible!==void 0&&s.visible!==e.visible){const r={userAction:o};e.visible?this._show(r):this._hide(r)}}appendTo(e){this.wrapper!==e&&this.app&&(this.app.$destroy(),this.app=void 0),this.wrapper=e,this.render()}changeConfigs(e,i=!0){this.setState({config:e},{userAction:i}),this.render()}setExtraObjectsWith3DPositions(e){this.data&&(this.extraObjects=aA(e,this.five,this.data),this.render())}formatData(e){return W(this,null,function*(){return yield Ai(e.data)})}_enable(e){const{userAction:i}=e;this.hooks.emit("enable",{userAction:i}),this.state.visible&&this._show({userAction:i})}_show(e){if(this.disposed||!this.state.enabled)return;const{userAction:i}=e;this.hooks.emit("show",{userAction:i}),this.render()}_hide(e){if(this.disposed||!this.state.enabled)return;const{userAction:i}=e;this.hooks.emit("hide",{userAction:i}),this.render()}updateState(e,i){const s=this.state,o=e.config?V(V({},s.config),e.config):s.config;this.state=ge(V(V({},this.state),e),{config:o}),!ct(this.state,s,{deep:!0})&&this.hooks.emit("stateChange",{state:this.state,prevState:s,userAction:i})}render(){if(this.disposed||!this.state.enabled)return;if(!this.wrapper&&this.wrapperSelector){const i=document.querySelector(this.wrapperSelector);this.wrapper=i}if(!this.data||!this.wrapper)return;const e=ge(V({},this.state.config),{five:this.five,floorplanData:this.data,visible:this.state.visible,extraObjects:this.extraObjects,highlightData:this.highlightData});this.app?this.app.$set(e):this.app=new NA({target:this.wrapper,props:e})}};const _A=(n,t)=>new FA(n,t),HA=[{type:0,floorType:1,roomType:"100900000012",name:"其他"},{type:1,floorType:1,roomType:"100900000002",name:"客厅"},{type:2,floorType:1,roomType:"100900000002",name:"餐厅"},{type:3,floorType:0,roomType:"100900000001",name:"卧室"},{type:4,floorType:0,roomType:"100900000001",name:"书房"},{type:5,floorType:3,roomType:"100900000004",name:"卫生间"},{type:6,floorType:3,roomType:"100900000004",name:"淋浴间"},{type:7,floorType:3,roomType:"100900000004",name:"洗手间"},{type:8,floorType:3,roomType:"100900000003",name:"厨房"},{type:9,floorType:1,roomType:"100900000003",name:"开放厨房",onlySubArea:!0},{type:10,floorType:0,roomType:"100900000001",name:"多功能间"},{type:11,floorType:0,roomType:"100900000009",name:"保姆间"},{type:12,floorType:4,roomType:"100900000005",name:"阳台"},{type:13,floorType:4,roomType:"100900000006",name:"露台"},{type:14,floorType:0,roomType:"100900000008",name:"储物间"},{type:15,floorType:0,roomType:"100900000013",name:"衣帽间"},{type:16,floorType:0,roomType:"100900000011",name:"阁楼"},{type:17,floorType:2,roomType:"100900000007",name:"花园"},{type:18,floorType:5,roomType:"100900000010",name:"车库"},{type:19,floorType:1,roomType:"100900000012",name:"电梯"},{type:20,floorType:1,roomType:"100900000012",name:"地下室"},{type:21,floorType:1,roomType:"100900000012",name:"天井"},{type:22,floorType:1,roomType:"100900000012",name:"阳光房"},{type:23,floorType:1,roomType:"100900000012",name:"过道"},{type:24,floorType:1,roomType:"100900000012",name:"楼梯间"},{type:25,floorType:1,roomType:"100900000012",name:"门厅"},{type:26,floorType:2,roomType:"100900000012",name:"入户花园"},{type:27,floorType:1,roomType:"100900000012",name:"玄关"},{type:28,floorType:1,roomType:"100900000012",name:"挑空"},{type:29,floorType:4,roomType:"100900000012",name:"晾晒区"},{type:30,floorType:4,roomType:"100900000012",name:"洗衣房"},{type:31,floorType:0,roomType:"100900000012",name:"娱乐区"},{type:32,floorType:0,roomType:"100900000012",name:"健身区"},{type:33,floorType:0,roomType:"100900000012",name:"接待区"},{type:34,floorType:0,roomType:"100900000012",name:"影音区"},{type:35,floorType:1,roomType:"100900000012",name:"餐饮区"},{type:36,floorType:1,roomType:"100900000012",name:"其他",onlySubArea:!0},{type:37,floorType:1,roomType:"100900000002",name:"起居室"},{type:38,floorType:0,roomType:"100900000001",name:"主卧"},{type:39,floorType:0,roomType:"100900000001",name:"次卧"},{type:40,floorType:0,roomType:"100900000001",name:"优化间"},{type:41,floorType:0,roomType:"100900000001",name:"办公室"},{type:42,floorType:0,roomType:"100900000001",name:"会议室"},{type:43,floorType:0,roomType:"100900000001",name:"洽谈间"},{type:44,floorType:1,roomType:"100900000002",name:"共享大厅"},{type:45,floorType:1,roomType:"100900000012",name:"水吧"},{type:46,floorType:0,roomType:"100900000015",name:"出入口"},{type:47,floorType:0,roomType:"100900000015",name:"大厅"},{type:48,floorType:0,roomType:"100900000015",name:"包厢"},{type:49,floorType:0,roomType:"100900000015",name:"其他"},{type:50,floorType:0,roomType:"100900000016",name:"出入口"},{type:51,floorType:0,roomType:"100900000016",name:"办公区"},{type:52,floorType:0,roomType:"100900000016",name:"老板间"},{type:53,floorType:0,roomType:"100900000016",name:"会议室"},{type:54,floorType:0,roomType:"100900000016",name:"休息区/水吧"},{type:55,floorType:0,roomType:"100900000016",name:"其他"},{type:56,floorType:2,roomType:"100900000012",name:"空中花园"},{type:57,floorType:0,roomType:"100900000001",name:"洋室"},{type:58,floorType:0,roomType:"100900000001",name:"和室"}],WA=[{type:0,description:"木质地板"},{type:1,description:"瓷砖地面"},{type:2,description:"户外地面"},{type:3,description:"卫生间地面"},{type:4,description:"阳台地面"},{type:5,description:"车库地面"}],UA=[{roomType:"100900000001",description:"室"},{roomType:"100900000002",description:"厅"},{roomType:"100900000003",description:"厨"},{roomType:"100900000004",description:"卫"},{roomType:"100900000005",description:"阳台"},{roomType:"100900000006",description:"露台"},{roomType:"100900000007",description:"花园"},{roomType:"100900000008",description:"储"},{roomType:"100900000009",description:"保姆间"},{roomType:"100900000010",description:"车库"},{roomType:"100900000011",description:"阁楼"},{roomType:"100900000012",description:"其他"},{roomType:"100900000013",description:"衣"},{roomType:"100900000015",description:"商铺"},{roomType:"100900000016",description:"写字楼"}],Pr=(n,t,e)=>{const i=new k.Matrix4,s=new k.Euler(n,t,e,"YXZ");return i.makeRotationFromEuler(s),i},YA=(n,{scale:t,rotation:e,position:i})=>{if(t&&n.scale.set(t,t,t),e){const[s,o,r]=e;s&&n.applyMatrix4(Pr(s,0,0)),o&&n.applyMatrix4(Pr(0,o,0)),r&&n.applyMatrix4(Pr(0,0,r))}return i&&n.position.set(i.x,i.y,i.z),n};function Uc(n,t){n.traverse(e=>{var i;if(e.type==="Mesh"){const s=e,o=V({map:s.material.map||{}},t);s.material=new G.MeshBasicMaterial(o),s.renderOrder=1,((i=e.parent)==null?void 0:i.type)==="Mesh"&&(e.renderOrder=e.parent.renderOrder+1)}})}const XA=(n,t)=>{var p;const e=t.fbx_url||"//vrlab-image4.ljcdn.com/release/web/dipan2.f38a21cc.FBX",i=(p=t.north_rad)!=null?p:void 0,s={};let o={x:0,y:0,z:0},r=[0,0,0],a=1,l=i;n.on("modelLoaded",A);const c=g=>W(this,null,function*(){var I;const v=(g==null?void 0:g.fbx_url)||e;if(l=(I=g==null?void 0:g.north_rad)!=null?I:i,typeof l!="number")throw new Error('"northRad"配置参数缺失:未配置指南针指向!');const P=yield new Ps.FBXLoader().loadAsync(v);return Uc(P,{transparent:!0,side:k.DoubleSide,blending:k.AdditiveBlending}),s.object=P,A(),!0}),d=({latitude:g})=>{if(!s.object)return;const v=h(g);v&&(s.object.position.y=v)},h=g=>{if(s.yBase===void 0)return;const v=.6;if(g>=Math.PI/4)return s.yBase-(v+1.6);const y=g*(4/Math.PI);return s.yBase-(v*y+1.6)},f=()=>{if(!s.object)return;const g=h(n.getPose().latitude);g&&(s.object.position.y=g),n.scene.add(s.object),n.needsRender=!0,n.on("cameraDirectionUpdate",d)},m=()=>{s.object&&(n.scene.remove(s.object),n.needsRender=!0,n.off("cameraDirectionUpdate",d))};function A(){const g=s.object;if(!g)return;const v=n.model.bounding,y=v.max.x-v.min.x,P=v.max.z-v.min.z,I=Math.max(y,P),{max:{x:E,z:C},min:{x:z,y:R,z:U}}=v;s.yBase=R,o={x:(E+z)/2,y:R-1.6,z:(C+U)/2},r=[0,l-Math.PI/2,0],a=.0045*I,YA(g,{position:o,rotation:r,scale:a})}return{load:c,disable:m,enable:f}};function ZA(n,t){var c,d,h,f,m;const e=(c=t==null?void 0:t.size)!=null?c:512,i=(d=t==null?void 0:t.fontSize)!=null?d:e*(35/256)*1.2,s=(h=t==null?void 0:t.backgroundColor)!=null?h:"rgba(0,0,0,0)",o=(f=t==null?void 0:t.fontColor)!=null?f:"#fff",r=(m=t==null?void 0:t.textAlign)!=null?m:"center",a=document.createElement("canvas");a.setAttribute("width",e+""),a.setAttribute("height",e+"");const l=a.getContext("2d");return l.fillStyle=s,l.fillRect(0,0,e,e),l.font=`${i}px "微软雅黑"`,l.textAlign=r,l.fillStyle=o,l.fillText(n,e/2,e*.7),new G.CanvasTexture(a)}const JA=({x:n,y:t,z:e})=>new G.Vector3(n,t,e),qA=(n,t)=>{var p,g,v;const e={},i=(p=t.animationEnabled)!=null?p:!0,s=(g=t.position)!=null?g:void 0,o=(v=t.rad)!=null?v:void 0,r=t.fbx_url||"//vrlab-image4.ljcdn.com/release/web/entryDoorMini/Anim_Door1.fbx",a=[],l=y=>W(this,null,function*(){var H,N,F,Q,_,Y,Z,q;const P=(H=y==null?void 0:y.position)!=null?H:s;if(!P)return Promise.reject(new Error("ModelEntryDoorGuidePlugin.load(): position is undefined"));const I=JA(P),E=(N=y==null?void 0:y.rad)!=null?N:o,C=(F=y==null?void 0:y.fbx_url)!=null?F:r;if(e.rad=E,E===void 0)return Promise.reject(new Error(`ModelEntryDoorGuidePlugin.load(): rad is ${E}`));const z=yield new Ps.FBXLoader().loadAsync(C);z.position.copy(I),z.rotation.z=E,z.scale.set(.8,.8,.8),Uc(z,{transparent:!0,side:k.DoubleSide});const R=(Z=(Y=(_=(Q=z.children)==null?void 0:Q[0])==null?void 0:_.children)==null?void 0:Y[3])==null?void 0:Z.clone();if(!R)return Promise.reject(new Error(`ModelEntryDoorGuidePlugin.load(): textMesh is ${R}`));const U=(q=t.name)!=null?q:"入户门";return R.material=new G.MeshBasicMaterial({transparent:!0,map:ZA(U)}),R.renderOrder=3,z.children[0].add(R),e.object=z,!0}),c=()=>{if(e.animation)return;if(!e.object)return console.error("ModelEntryDoorGuidePlugin.initAnimation(): state.object is ",e.object);const y=1,P=new G.AnimationMixer(e.object);a.push(P);const I=P.clipAction(e.object.animations[0]);I.timeScale=y;let E;const C=()=>{let H=0,N=0;const F=1e3/30,Q=_=>{H=requestAnimationFrame(Q);const Y=_-N;Y<F||(N=_,a.forEach(Z=>Z.update(Y/1e3)),n.needsRender=!0)};return H=requestAnimationFrame(Q),()=>{cancelAnimationFrame(H)}},U={play:()=>{E||(I.play(),E=C(),requestAnimationFrame(()=>{e.object&&e.object.rotation.z!==e.rad&&(e.object.rotation.z=e.rad)}))},stop:()=>{I.stop(),E==null||E(),E=void 0}};e.animation=U},d=y=>{var I;if(!e.object)return console.error("ModelEntryDoorGuidePlugin.enable(): object is ",e.object);((I=y==null?void 0:y.animationEnable)!=null?I:i)&&(e.animation||c(),e.animation.play()),n.scene.add(e.object),n.needsRender=!0},h=()=>{e.object&&(e.animation&&e.animation.stop(),n.scene.remove(e.object),n.needsRender=!0)},f=y=>y==="Floorplan"?d():h();return{load:l,enable:y=>(e.enabled||(e.enabled=!0,f(n.currentMode),n.on("modeChange",f),d(y)),!0),disable:()=>(e.enabled&&(e.enabled=!1,h(),n.off("modeChange",f)),!0)}},KA=St;function $A(n,t,e,i=KA.Linear.None){const s=new Ds(n).to(t,e).easing(i);js(()=>s.start(0));const o=nn(a=>{s.update(a)===!1&&o()}),r=[];return s.onDestroy=a=>(r.push(a),s),s.destroy=function(){this.stop(),Object.assign(s,{_onStartCallback:null,_onUpdateCallback:null,_onCompleteCallback:null,_onStopCallbackL:null});let a;for(;a=r.shift();)a();o()},s}function ev(n,t){return $A({progress:0},{progress:1},n,t)}var Yc=(n=>(n.Move="Move",n.Rotate="Rotate",n))(Yc||{}),Wt=(n=>(n.Clockwise="Clockwise",n.Anticlockwise="Anticlockwise",n.Loop="Loop",n))(Wt||{});const Ks=Math.PI*2;function Xc(n){return(n%Ks+Ks)%Ks}function Zc(n){return n%Ks}function kr(n,t,e){return n+(t-n)*e}const Mr=(n,t,e)=>{const i=Math.PI,s=i*2;let o=Xc(n),r=Xc(t);return e===Wt.Anticlockwise&&o<r&&(o+=s),e===Wt.Clockwise&&r<o&&(r+=s),e===Wt.Loop&&r-o>i?Mr(o,r,Wt.Anticlockwise):e===Wt.Loop&&o-r>i?Mr(o,r,Wt.Clockwise):{from:o,to:r}},tv=n=>{const t={},e=(l,c,...d)=>W(this,[l,c,...d],function*(o,r,a={preload:!0}){return t.interruptCallback&&t.interruptCallback(!1),a.asyncStartCallback&&(yield a.asyncStartCallback()),o.mode&&o.mode!==n.currentMode&&(yield n.changeMode(o.mode)),a.preload&&o.panoIndex!==void 0&&o.panoIndex!==n.panoIndex&&(yield n.preloadPano(o.panoIndex)),a.asyncEndCallback&&(yield a.asyncEndCallback()),o.panoIndex===void 0&&o.fov===void 0&&o.latitude===void 0&&o.longitude===void 0?!0:yield new Promise((h,f)=>{const m=o.panoIndex!==void 0?o.panoIndex:n.panoIndex;m!==void 0?n.moveToPano(m,V({duration:r,moveEndCallback:()=>h(!0),moveCancelCallback:()=>f(new Error("move canceled"))},o)):f(new Error("unexpected error"))})}),i=o=>{const r=n.state,a=Zc(r.latitude),l=Zc(o.latitude),{from:c,to:d}=Mr(r.longitude,o.longitude,o.rotation||Wt.Loop),h=r.fov,f=o.fov;return{from:{latitude:a,longitude:c,fov:h},to:{latitude:l,longitude:d,fov:f}}};return{move:e,rotate:(l,c,...d)=>W(this,[l,c,...d],function*(o,r,a={}){t.interruptCallback&&t.interruptCallback(!1),a.asyncStartCallback&&(yield a.asyncStartCallback()),n.currentMode!==Ae.Five.Mode.Panorama&&(yield n.changeMode(Ae.Five.Mode.Panorama)),o.panoIndex!==void 0&&o.panoIndex!==n.panoIndex&&(a.preload&&(yield n.preloadPano(o.panoIndex)),yield new Promise((m,A)=>{if(!o.panoIndex){m(!0);return}n.moveToPano(o.panoIndex,{moveEndCallback:()=>m(!0),moveCancelCallback:()=>A(new Error("move canceled"))})})),a.asyncEndCallback&&(yield a.asyncEndCallback());const{from:h,to:f}=i(o);return yield new Promise(m=>{const A=({progress:P})=>{const I={};I.longitude=kr(h.longitude,f.longitude,P),I.latitude=kr(h.latitude,f.latitude,P),I.fov=kr(h.fov,f.fov,P),n.setState(I,!0)},p=()=>{m(!0)},g=()=>{m(!1)},v=o.rotateSpeed?Math.ceil(Math.abs(f.longitude-h.longitude)/o.rotateSpeed*1e3):r,y=ev(v,St.Linear.None).onUpdate(A).onComplete(p).onDestroy(g);o.rotation===Wt.Loop&&y.repeat(1/0).yoyo(!0),t.interruptCallback=(P=!0)=>{y.destroy(),t.interruptCallback=void 0,t.timeoutId&&(clearTimeout(t.timeoutId),t.timeoutId=void 0),m(P)},t.timeoutId=setTimeout(()=>{t.interruptCallback&&t.interruptCallback(!0)},r)})})}};function Jc(n,t){return n.x===t.x&&n.y===t.y}function qc(n,t){return Math.abs(n)===1/0&&Math.abs(t)===1/0?!0:Math.abs(n-t)<.001}function $s(n,t){return(t.y-n.y)/(t.x-n.x)}function Kc(n,t,e){const i=$s(n[1],n[0]),s=$s(t[1],t[0]);if(isNaN(i)||isNaN(s)||qc(i,s))return!1;if(eo(n[0],t))return n[0];if(eo(n[1],t))return n[1];if(eo(t[0],n))return t[0];if(eo(t[1],n))return t[1];if(e&&!nv(n,t))return!1;const o=n[0],r=t[0];if(Math.abs(i)===1/0)return{x:o.x,y:t[1].y-(t[1].x-o.x)*s};if(Math.abs(s)===1/0)return{x:r.x,y:n[1].y-(n[1].x-r.x)*i};const a=(r.y-o.y+i*o.x-s*r.x)/(i-s),l=i*a-i*o.x+o.y;return{x:a,y:l}}function eo(n,t){return Jc(n,t[0])||Jc(n,t[1])?!0:(t[0].x-n.x)*(n.x-t[1].x)>=0&&(t[0].y-n.y)*(n.y-t[1].y)>=0&&qc($s(t[0],n),$s(n,t[1]))}function iv(n){let t=1/0,e=-1/0,i=1/0,s=-1/0;return n.forEach(o=>{t=Math.min(t,o.x),e=Math.max(e,o.x),i=Math.min(i,o.y),s=Math.max(s,o.y)}),{x:(t+e)/2,y:(i+s)/2}}function to(n,t,e){return(n.x-e.x)*(t.y-e.y)-(t.x-e.x)*(n.y-e.y)}function nv(n,t){return Math.max(n[0].x,n[1].x)>=Math.min(t[0].x,t[1].x)&&Math.max(t[0].x,t[1].x)>=Math.min(n[0].x,n[1].x)&&Math.max(n[0].y,n[1].y)>=Math.min(t[0].y,t[1].y)&&to(t[0],n[1],n[0])*to(n[1],t[1],n[0])>0&&to(n[0],t[1],t[0])*to(t[1],n[1],t[0])>0?1:0}function $c(n,t=0){t<=0?requestAnimationFrame(n):requestAnimationFrame(()=>$c(n,t-1))}const sv=`<style type="text/css">
195
195
  .PanoRulerPlugin-rule-line {
196
196
  position: absolute;
197
197
  transform-origin: left center;
@@ -284,7 +284,7 @@ void main() {
284
284
  <div class="PanoRulerPlugin-rule-label-name">${e.options.distanceText(g)}</div>
285
285
  </div>
286
286
  </div>
287
- `,y=document.createElement("div");return y.setAttribute("class","PanoRulerPlugin-rule"),y.setAttribute("data-name",p),y.setAttribute("style","display: none"),y.innerHTML=v,y},s=document.createElement("div");s.setAttribute("style","position: absolute;pointer-events: none;width: 100%;height: 100%;left: 0;top: 0;overflow: hidden;");const o=document.createElement("div");o.innerHTML=sv,s.appendChild(o);const r={},a=(p,g)=>{if(e.loaded)throw new Error("标尺被重复初始化!");const v=rv(p,n),y=n.work;if(!y)return!1;for(const P in g){const I=g[P],{standingPosition:E}=y.observers[0],C=I.map(({x:z,z:R,observers:U})=>{const H=U.length>0?p.rooms[p.observers[U[0]]].name:"",N=v[H]?v[H].floor:null;let F=1/0,Q={index:0,x:E.x,y:E.y,z:E.z};U.forEach(fe=>{if(!y.observers[fe])return;const{standingPosition:de}=y.observers[fe],ke={index:fe,x:de.x,y:de.y,z:de.z},Pe=ov({x:z,z:R},ke);N?Pe<F&&Math.abs(ke.y-N)<.3&&(F=Pe,Q=ke):Pe<F&&(F=Pe,Q=ke)});const _=new G.Vector3(z,Q.y,R);Object.assign(_,{observers:U});const Y=v[H]?v[H].roof:null,Z=Y?new G.Vector3(z,Y,R):null;return Z&&Object.assign(Z,{observers:U}),{origin:_,vertical:Z}});r[P]={origins:C.map(z=>z.origin),rules:[]};for(const{origin:z,vertical:R}of C){if(!R)continue;const U=i(P,z.distanceTo(R));s.append(U),r[P].rules.push({vertical:!0,rule:[z,R],$element:U})}for(let z=0;z<C.length;z++){let R=z+1;R>=C.length&&(R=0);const{origin:U}=C[z],{origin:H}=C[R],N=i(P,U.distanceTo(H));s.append(N),r[P].rules.push({vertical:!1,rule:[U,H],$element:N})}}return e.loaded=!0,!0},l=(p,g,v)=>W(this,null,function*(){const y=p||t.roomInfo,P=g||t.roomRules;if(!y||!P)throw new Error("标尺数据依赖不齐全!");return e.loaded=!1,e.options=V(V({},e.options),v||{}),n.model.loaded?a(y,P):yield new Promise(I=>n.once("modelLoaded",()=>I(a(y,P))))});t.roomInfo&&t.roomRules&&l(t.roomInfo,t.roomRules);const c=(p,g,v,y)=>{const P=[[{x:0,y:0},{x:v,y:0}],[{x:0,y:0},{x:0,y}],[{x:v,y:0},{x:v,y}],[{x:0,y},{x:v,y}]],I=[];for(let E=0;E<P.length;E++){const C=Kc([p,g],[P[E][0],P[E][1]],!0);C&&I.push(C)}return I.length===0?!1:I},d=()=>{var U;const p=(U=n.getElement())==null?void 0:U.parentElement;if(!p||!e.loaded||Object.keys(r).length<=0)return;const{panoIndex:g,camera:v,currentMode:y}=n;if(g===void 0)return;let P;for(const H in r)H.split(",").indexOf(g.toString())>=0&&(P=H);if(!P){for(const H in r)for(const{$element:N}of r[H].rules)N.style.display="none";return}const I=v.position,E=v.getWorldDirection(new G.Vector3),C=p.clientWidth,z=p.clientHeight;if(y!==Ae.Five.Mode.Panorama){for(const H in r)for(const{$element:N}of r[H].rules)N.style.display="none";return}for(const H in r)for(const{$element:N}of r[H].rules)N.style.display=H===P?"block":"none";const[R]=r[P].origins.slice().filter(H=>H.observers.indexOf(g)>=0).sort((H,N)=>{const F=H.clone().setY(0).sub(I).normalize().angleTo(E.clone().setY(0)),Q=N.clone().setY(0).sub(I).normalize().angleTo(E.clone().setY(0));return F-Q});for(const{rule:H,vertical:N,$element:F}of r[P].rules){const[Q,_]=H,Y=F.querySelector(".PanoRulerPlugin-rule-line");if(!Y)return;if(!R){F.style.display="none";continue}if(Q!==R&&_!==R){F.style.display="none";continue}if(Q.distanceTo(_)<.3){F.style.display="none";continue}if(Q.observers.indexOf(g)===-1||_.observers.indexOf(g)===-1){F.style.display="none";continue}if(Q.clone().sub(I).normalize().angleTo(E)>Math.PI/2){F.style.display="none";continue}if(_.clone().sub(I).normalize().angleTo(E)>Math.PI/2){F.style.display="none";continue}const ee=Q.distanceTo(_);if(_.clone().sub(_.clone().sub(Q).divide(new G.Vector3(2,2,2))).distanceTo(I)/ee>8){F.style.display="none";continue}const ke=Q.clone().project(v),Pe=(ke.x+1)/2*C,we=(-ke.y+1)/2*z,Fe=_.clone().project(v),Ce=(Fe.x+1)/2*C,Ze=(-Fe.y+1)/2*z,te=Math.sqrt(Math.pow(Ce-Pe,2)+Math.pow(Ze-we,2));let ye=te,ze=50;const pe=c({x:~~Pe,y:~~we},{x:~~Ce,y:~~Ze},C,z);if(pe&&pe.length===1&&(R===Q?(ye=Math.sqrt(Math.pow(pe[0].x-Pe,2)+Math.pow(pe[0].y-we,2)),ze=ye/te*50):R===_&&(ye=Math.sqrt(Math.pow(pe[0].x-Ce,2)+Math.pow(pe[0].y-Ze,2)),ze=100-ye/te*50)),pe&&pe.length===2){const re={x:(pe[0].x+pe[1].x)/2,y:(pe[0].y+pe[1].y)/2};ze=Math.sqrt(Math.pow(re.x-Pe,2)+Math.pow(re.y-we,2))/te*100}const rt=(Math.PI/2-Math.atan2(Ce-Pe,we-Ze))/Math.PI*180,xe=Y.querySelector(".PanoRulerPlugin-rule-label"),tt=xe.children[0].clientWidth;tt>=te||tt/2>=ze/100*te||tt/2>=(1-ze/100)*te?Y.style.display="none":(Y.style.display="block",Y.style.width=te+"px",Y.style.left=Pe+"px",Y.style.top=we+"px",Y.style.transform=`rotate(${-rt}deg)`,xe.style.left=`${ze}%`)}},h=()=>$c(d),f=()=>{var p,g;return e.loaded?(e.enable||(s.setAttribute("class","PanoRulerPlugin"+(e.options.className?" "+e.options.className:"")),(g=(p=n.getElement())==null?void 0:p.parentElement)==null||g.append(s),d(),n.on("modeChange",d),n.on("cameraUpdate",h),e.enable=!0),!0):!1},m=()=>(e.enable&&(n.off("modeChange",d),n.off("cameraUpdate",h),s&&s.remove(),e.enable=!1),!0);function A(p){if(p.distanceText&&p.distanceText!==e.options.distanceText){const g=p.distanceText;e.options.distanceText=g,Object.values(r).forEach(v=>{v.rules.forEach(y=>{const[P,I]=y.rule,E=P.distanceTo(I),C=y.$element.querySelector(".PanoRulerPlugin-rule-label-name");C&&(C.innerText=g(E))})})}}return{enable:f,disable:m,load:l,state:e,changeConfigs:A}};function lv(n){me(n,"svelte-1h27ktp",".PanoRulerPlugin-rule-line.svelte-1h27ktp.svelte-1h27ktp{position:absolute;transform-origin:left 0.0625rem;width:0;height:0.125rem;pointer-events:none}.PanoRulerPlugin-rule-line.svelte-1h27ktp.svelte-1h27ktp::after{content:'';position:absolute;left:-0.125rem;top:-0.1rem;width:0.25rem;height:0.25rem;border-radius:50%;background:#fff;z-index:1;animation:svelte-1h27ktp-viewport-rule-point 0.1s 1s;animation-fill-mode:both}.PanoRulerPlugin-rule-line.svelte-1h27ktp.svelte-1h27ktp::before{content:'';position:absolute;right:-0.125rem;top:-0.1rem;width:0.25rem;height:0.25rem;border-radius:50%;background:#fff;z-index:1;animation:svelte-1h27ktp-viewport-rule-point 0.1s 1.5s;animation-fill-mode:both}.PanoRulerPlugin-rule-line.svelte-1h27ktp em.svelte-1h27ktp{display:block;height:0.0625rem;animation:svelte-1h27ktp-viewport-rule-line 0.5s ease 1s;animation-fill-mode:both;box-shadow:0 0 0.25rem rgb(0 0 0 / 40%);position:relative}.rule-mixed-line.svelte-1h27ktp.svelte-1h27ktp{display:flex;height:0.0625rem;animation:svelte-1h27ktp-viewport-rule-line 0.5s ease 1s;animation-fill-mode:both;align-items:center}.em-solid.svelte-1h27ktp.svelte-1h27ktp{height:100%;background:#ffffff}.em-dotted.svelte-1h27ktp.svelte-1h27ktp{height:0.125rem;background:var(--background-image);background-position:center;background-repeat:repeat}.PanoRulerPlugin-rule-label.svelte-1h27ktp.svelte-1h27ktp{position:absolute;width:0;height:0;top:0.0625rem;pointer-events:none}.PanoRulerPlugin-rule-label-name.svelte-1h27ktp.svelte-1h27ktp{position:absolute;padding:0.1875rem 0.375rem;background:rgba(195, 195, 195, 0.3);backdrop-filter:blur(0.25rem);-webkit-backdrop-filter:blur(0.25rem);border-radius:6.25rem;border:0.0625rem solid rgba(255, 255, 255, 0.6);white-space:nowrap;overflow:hidden;color:#ffffff;font-weight:500;font-size:0.75rem;line-height:1;animation:svelte-1h27ktp-viewport-rule-label 0.25s ease 1s;animation-fill-mode:both;box-shadow:inset 0 0 0.625rem 0 rgba(255, 255, 255, 0.3)}@keyframes svelte-1h27ktp-viewport-rule-line{0%{width:0%}100%{width:100%}}@keyframes svelte-1h27ktp-viewport-rule-label{0%{opacity:0;transform:scaleX(0)}100%{opacity:1;transform:translate(-50%, -50%) scaleX(1)}}@keyframes svelte-1h27ktp-viewport-rule-point{0%{transform:scaleX(0)}100%{transform:scaleX(1)}}")}function ed(n,t,e){const i=n.slice();return i[6]=t[e],i}function cv(n){let t,e=n[0].children,i=[];for(let s=0;s<e.length;s+=1)i[s]=td(ed(n,e,s));return{c(){t=x("div");for(let s=0;s<i.length;s+=1)i[s].c();w(t,"class","rule-mixed-line svelte-1h27ktp")},m(s,o){O(s,t,o);for(let r=0;r<i.length;r+=1)i[r]&&i[r].m(t,null)},p(s,o){if(o&9){e=s[0].children;let r;for(r=0;r<e.length;r+=1){const a=ed(s,e,r);i[r]?i[r].p(a,o):(i[r]=td(a),i[r].c(),i[r].m(t,null))}for(;r<i.length;r+=1)i[r].d(1);i.length=e.length}},d(s){s&&j(t),Ot(i,s)}}}function dv(n){let t,e;return{c(){t=x("em"),w(t,"class",e=Ge(n[0].state?"em-solid":"em-dotted")+" svelte-1h27ktp"),w(t,"style",n[3])},m(i,s){O(i,t,s)},p(i,s){s&1&&e!==(e=Ge(i[0].state?"em-solid":"em-dotted")+" svelte-1h27ktp")&&w(t,"class",e),s&8&&w(t,"style",i[3])},d(i){i&&j(t)}}}function td(n){let t,e,i=`${n[6].width}px`;return{c(){t=x("div"),w(t,"class",e=Ge(n[6].state?"em-solid":"em-dotted")+" svelte-1h27ktp"),w(t,"style",n[3]),S(t,"width",i)},m(s,o){O(s,t,o)},p(s,o){o&1&&e!==(e=Ge(s[6].state?"em-solid":"em-dotted")+" svelte-1h27ktp")&&w(t,"class",e),o&8&&w(t,"style",s[3]),(o&8||o&9&&i!==(i=`${s[6].width}px`))&&S(t,"width",i)},d(s){s&&j(t)}}}function hv(n){let t,e,i,s,o=n[0].labelElement+"",r,a,l=`${n[0].labelOffset}%`,c=`${n[0].width}px`,d=`${n[0].left}px`,h=`${n[0].top}px`,f=`rotate(${n[0].rotateDeg}deg)`;function m(g,v){return g[0].children.length===0?dv:cv}let A=m(n),p=A(n);return{c(){t=x("div"),p.c(),e=K(),i=x("div"),s=x("div"),r=De(o),w(s,"class","PanoRulerPlugin-rule-label-name svelte-1h27ktp"),We(()=>n[4].call(s)),w(i,"class","PanoRulerPlugin-rule-label svelte-1h27ktp"),S(i,"left",l),w(t,"class","PanoRulerPlugin-rule-line svelte-1h27ktp"),S(t,"width",c),S(t,"left",d),S(t,"top",h),S(t,"transform",f),S(t,"display",n[0].visible&&n[2]?"block":"none")},m(g,v){O(g,t,v),p.m(t,null),L(t,e),L(t,i),L(i,s),L(s,r),a=or(s,n[4].bind(s))},p(g,[v]){A===(A=m(g))&&p?p.p(g,v):(p.d(1),p=A(g),p&&(p.c(),p.m(t,e))),v&1&&o!==(o=g[0].labelElement+"")&&Se(r,o),v&1&&l!==(l=`${g[0].labelOffset}%`)&&S(i,"left",l),v&1&&c!==(c=`${g[0].width}px`)&&S(t,"width",c),v&1&&d!==(d=`${g[0].left}px`)&&S(t,"left",d),v&1&&h!==(h=`${g[0].top}px`)&&S(t,"top",h),v&1&&f!==(f=`rotate(${g[0].rotateDeg}deg)`)&&S(t,"transform",f),v&5&&S(t,"display",g[0].visible&&g[2]?"block":"none")},i:J,o:J,d(g){g&&j(t),p.d(),a()}}}function uv(n,t,e){let i,{rulerItemProp:s}=t,o=!0,r,a="data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQiIHdpZHRoPSIxMiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PGRlZnM+PGZpbHRlciBpZD0icHJlZml4X19hIiBoZWlnaHQ9IjQwMCUiIHdpZHRoPSIxMzcuNCUiIHg9Ii0xOC43JSIgeT0iLTE1MCUiPjxmZU1vcnBob2xvZ3kgaW49IlNvdXJjZUFscGhhIiBvcGVyYXRvcj0iZGlsYXRlIiByYWRpdXM9Ii41IiByZXN1bHQ9InNoYWRvd1NwcmVhZE91dGVyMSIvPjxmZU9mZnNldCBpbj0ic2hhZG93U3ByZWFkT3V0ZXIxIiByZXN1bHQ9InNoYWRvd09mZnNldE91dGVyMSIvPjxmZU1vcnBob2xvZ3kgaW49IlNvdXJjZUFscGhhIiByYWRpdXM9IjEiIHJlc3VsdD0ic2hhZG93SW5uZXIiLz48ZmVPZmZzZXQgaW49InNoYWRvd0lubmVyIiByZXN1bHQ9InNoYWRvd0lubmVyIi8+PGZlQ29tcG9zaXRlIGluPSJzaGFkb3dPZmZzZXRPdXRlcjEiIGluMj0ic2hhZG93SW5uZXIiIG9wZXJhdG9yPSJvdXQiIHJlc3VsdD0ic2hhZG93T2Zmc2V0T3V0ZXIxIi8+PGZlR2F1c3NpYW5CbHVyIGluPSJzaGFkb3dPZmZzZXRPdXRlcjEiIHJlc3VsdD0ic2hhZG93Qmx1ck91dGVyMSIgc3RkRGV2aWF0aW9uPSIuNSIvPjxmZUNvbG9yTWF0cml4IGluPSJzaGFkb3dCbHVyT3V0ZXIxIiB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAuMiAwIi8+PC9maWx0ZXI+PHBhdGggaWQ9InByZWZpeF9fYiIgZD0iTS44ODkgMkgxMS41OCIvPjwvZGVmcz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZS1kYXNoYXJyYXk9IjUgNiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48dXNlIGZpbGw9IiMwMDAiIGZpbHRlcj0idXJsKCNwcmVmaXhfX2EpIiB4bGluazpocmVmPSIjcHJlZml4X19iIi8+PHVzZSBzdHJva2U9IiNmZmYiIHN0cm9rZS1vcGFjaXR5PSIuNCIgeGxpbms6aHJlZj0iI3ByZWZpeF9fYiIvPjwvZz48L3N2Zz4=";function l(){r=this.offsetWidth,e(1,r)}return n.$$set=c=>{"rulerItemProp"in c&&e(0,s=c.rulerItemProp)},n.$$.update=()=>{n.$$.dirty&3&&(r>=s.width||r/2>=s.labelOffset/100*s.width||r/2>=(1-s.labelOffset/100)*s.width?e(2,o=!1):e(2,o=!0))},e(3,i=`--background-image: url(${a})`),[s,r,o,i,l]}class fv extends ce{constructor(t){super(),le(this,t,uv,hv,ae,{rulerItemProp:0},lv)}}function id(n,t,e){const i=n.slice();return i[12]=t[e],i}function nd(n){let t,e;return t=new fv({props:{rulerItemProp:n[12]}}),{c(){oe(t.$$.fragment)},m(i,s){ne(t,i,s),e=!0},p(i,s){const o={};s&1&&(o.rulerItemProp=i[12]),t.$set(o)},i(i){e||(D(t.$$.fragment,i),e=!0)},o(i){T(t.$$.fragment,i),e=!1},d(i){se(t,i)}}}function mv(n){let t,e,i=n[0],s=[];for(let r=0;r<i.length;r+=1)s[r]=nd(id(n,i,r));const o=r=>T(s[r],1,1,()=>{s[r]=null});return{c(){t=x("div");for(let r=0;r<s.length;r+=1)s[r].c()},m(r,a){O(r,t,a);for(let l=0;l<s.length;l+=1)s[l]&&s[l].m(t,null);e=!0},p(r,[a]){if(a&1){i=r[0];let l;for(l=0;l<i.length;l+=1){const c=id(r,i,l);s[l]?(s[l].p(c,a),D(s[l],1)):(s[l]=nd(c),s[l].c(),D(s[l],1),s[l].m(t,null))}for(he(),l=i.length;l<s.length;l+=1)o(l);ue()}},i(r){if(!e){for(let a=0;a<i.length;a+=1)D(s[a]);e=!0}},o(r){s=s.filter(Boolean);for(let a=0;a<s.length;a+=1)T(s[a]);e=!1},d(r){r&&j(t),Ot(s,r)}}}function gv(n,t,e){var p,g,v,y;let{five:i}=t,{rulerDatas:s}=t,{options:o}=t,r=[];const a=((g=(p=i.getElement())==null?void 0:p.parentElement)==null?void 0:g.clientWidth)||0,l=((y=(v=i.getElement())==null?void 0:v.parentElement)==null?void 0:y.clientHeight)||0,c=(P,I)=>{const E=[[{x:0,y:0},{x:a,y:0}],[{x:0,y:0},{x:0,y:l}],[{x:a,y:0},{x:a,y:l}],[{x:0,y:l},{x:a,y:l}]],C=[];for(let z=0;z<E.length;z++){const R=Kc([P,I],[E[z][0],E[z][1]],!0);R&&C.push(R)}return C.length===0?!1:C},d=(P,I)=>{const E=P.clone().project(i.camera),C=(E.x+1)/2*a,z=(-E.y+1)/2*l,R=I.clone().project(i.camera),U=(R.x+1)/2*a,H=(-R.y+1)/2*l,N=Math.sqrt(Math.pow(U-C,2)+Math.pow(H-z,2));return{startLeft:C,startTop:z,endLeft:U,endTop:H,distance:N}},h=(P,I,E)=>{const C=i.camera.position,z=i.camera.getWorldDirection(new G.Vector3),R=P.clone().sub(C).normalize().angleTo(z),U=I.clone().sub(C).normalize().angleTo(z),H=P.distanceTo(I),F=I.clone().sub(I.clone().sub(P).divide(new G.Vector3(2,2,2))).distanceTo(C),{startLeft:Q,startTop:_,endLeft:Y,endTop:Z,distance:q}=d(P,I),fe=-((Math.PI/2-Math.atan2(Y-Q,_-Z))/Math.PI)*180;let de=!0;E||(de=!1),!ct(P,E)&&!ct(I,E)&&(de=!1),H<.3&&(de=!1),R>Math.PI/2&&(de=!1),U>Math.PI/2&&(de=!1),F/H>8&&(de=!1);let ke=50,Pe=q;const we=c({x:~~Q,y:~~_},{x:~~Y,y:~~Z});if(we&&we.length===1&&(ct(P,E)?(Pe=Math.sqrt(Math.pow(we[0].x-Q,2)+Math.pow(we[0].y-_,2)),ke=Pe/q*50):ct(I,E)&&(Pe=Math.sqrt(Math.pow(we[0].x-Y,2)+Math.pow(we[0].y-Z,2)),ke=100-Pe/q*50)),we&&we.length===2){const Fe={x:(we[0].x+we[1].x)/2,y:(we[0].y+we[1].y)/2};ke=Math.sqrt(Math.pow(Fe.x-Q,2)+Math.pow(Fe.y-_,2))/q*100}return{startLeft:Q,startTop:_,distance:q,deg:fe,visible:de,labelOffset:ke,ruleLength:H}},f=()=>{const P=i.panoIndex,I=s.find(N=>N.panoIndex===P);if(!I)return e(0,r=[]);if(i.currentMode!==Ae.Five.Mode.Panorama)return e(0,r=[]);const E=i.camera.position,C=i.camera.getWorldDirection(new G.Vector3),z=I.lines.map(N=>new G.Vector3(N.start[0],-N.start[1],-N.start[2])),R=I.lines.map(N=>new G.Vector3(N.end[0],-N.end[1],-N.end[2])),[U]=z.concat(R).sort((N,F)=>{const Q=N.clone().setY(0).sub(E).normalize().angleTo(C.clone().setY(0)),_=F.clone().setY(0).sub(E).normalize().angleTo(C.clone().setY(0));return Q-_}),H=I.lines.map(N=>{var Pe,we;const F=N.start,Q=N.end,{startLeft:_,startTop:Y,distance:Z,deg:q,visible:ee,labelOffset:fe,ruleLength:de}=h(new G.Vector3(F[0],-F[1],-F[2]),new G.Vector3(Q[0],-Q[1],-Q[2]),U),ke=[];return N.children&&((Pe=N.children)==null?void 0:Pe.length)>0&&((we=N.children)==null||we.forEach(Fe=>{const Ce=Fe.start,Ze=Fe.end,{distance:te}=d(new G.Vector3(Ce[0],-Ce[1],-Ce[2]),new G.Vector3(Ze[0],-Ze[1],-Ze[2]));ke.push({width:te,state:Fe.state})})),{width:Z,left:_,top:Y,rotateDeg:q,state:N.state,children:ke,labelOffset:fe,visible:ee,labelElement:o.distanceText(de)}});e(0,r=H)},m=()=>js(f),A=Ir(f,80);return gt(()=>{f(),i.on("panoArrived",f),i.on("modeChange",f),i.on("cameraDirectionUpdate",m),i.on("movingToPano",m),i.on("mouseWheel",()=>A()),i.on("pinchGesture",()=>A())}),Mt(()=>{i.off("panoArrived",f),i.off("modeChange",f),i.off("cameraDirectionUpdate",m),i.off("movingToPano",m),i.off("mouseWheel",()=>A()),i.off("pinchGesture",()=>A())}),n.$$set=P=>{"five"in P&&e(1,i=P.five),"rulerDatas"in P&&e(2,s=P.rulerDatas),"options"in P&&e(3,o=P.options)},[r,i,s,o]}class pv extends ce{constructor(t){super(),le(this,t,gv,mv,ae,{five:1,rulerDatas:2,options:3})}}let Av=class{constructor(t,e){u(this,"five");u(this,"container",document.createElement("div"));u(this,"panoRulerProData");u(this,"rulerItems");u(this,"state",{enabled:!1,loaded:!1,options:{className:"",distanceText:t=>`${t.toFixed(1)}m`}});var i,s;this.five=t,this.container.classList.add("panoRulerProPlugin-container"),this.container.setAttribute("style","position: absolute;pointer-events: none;width: 100%;height: 100%;left: 0;top: 0;overflow: hidden;"),e&&(e.data&&this.load(e.data),this.state.options=V(V({},this.state.options),e.options||{}),(i=e.options)!=null&&i.className&&this.container.classList.add((s=e.options)==null?void 0:s.className)),this.five.once("modelLoaded",()=>W(this,null,function*(){var o,r;(r=(o=this.five.getElement())==null?void 0:o.parentNode)==null||r.append(this.container)})),this.five.once("dispose",()=>this.dispose())}load(t){return W(this,null,function*(){if(!this.five.work)return;const e=t.data;if(!e)throw new Error("标尺数据依赖不齐全!");this.panoRulerProData=e,this.state.loaded=!0})}enable(){return this.state.loaded?(this.state.enabled||(this.state.enabled=!0,this.render()),!0):!1}disable(){return this.state.enabled&&(this.state.enabled=!1,this.render()),!0}render(){return W(this,null,function*(){var t;if(this.state.enabled){if(!this.panoRulerProData||!this.container)return;this.rulerItems=new pv({target:this.container,props:{five:this.five,rulerDatas:this.panoRulerProData,options:this.state.options}})}else(t=this.rulerItems)==null||t.$destroy(),this.rulerItems=void 0})}dispose(){this.container&&(this.rulerItems.$destroy(),this.rulerItems=void 0),this.container.remove()}};const vv=(n,t)=>new Av(n,t),bv="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZIAAABCCAYAAAB9y1BhAAAAAXNSR0IArs4c6QAADh5JREFUeAHtnVuPLDcVhedwC/dACKAICDxEIBQpygNI/Ab+MX8B8YCQEAjxgBAQLsm5Jjkn58r6Sl4jT52qnu4zXd121dqSx67q7ip7eXsv721XzcVFJAgEgSAQBIJAEAgCQeC4CLx48eKbSu+RH/fKuVoQWB8Cn1tfk9KiIHAUBH6tq/xKiTwSBILADgRCJDvAyUebRuAbpfXxSDatBmn8Pgh8YZ8v5TtBYIMIvFCbSZEgEASuQSBEcg1A+XizCDzfbMvT8CBwIAIhkgMBy9c3g0CIZDNdnYbeFIEQyU0RzO/XikCIZK09m3YdHYEQydEhzQVXgkCIZCUdmWYsj0CIZHmMc4c+EchCe5/9llqfAYEQyRlAzy27QCAeSRfdlEq2gECIpIVeSB1aRAAiudVixVKnINAaAiGS1nok9WkFAUJb8Upa6Y3Uo2kEQiRNd08qd0YEQiJnBD+37guBEElf/ZXang6BEMnpsM6dOkcgRNJ5B66x+nrjLmsTX1J6bSJHZ7+o9HklynWaOse1eKcc+XVlvxYFEnlfaThWfb7mcsn5nPRM6WmVU55KfO+J0mdKj8f5rVu3skNMoET6RSBE0m/fdVNzGWII4StKXy65y18t58aEAVGcUjDkGHsLhIOYfCC1xUT4QDJjgnmkc58qkT8saSiLeCCkSBBoBoEQSTNd0V9FZADRH8iAGfvXS06Zc5CFCePQt0y3EFaq61CX1ayjC56U8br24sKd+kAuJhkI55OSPi75pyIcvKNIEFgcgRDJ4hD3ewMZLDwDXqfOq9RNFCYOCAMPYx851BDj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g0lueSI4EgbMiIJ1kZyshL9LUOjNEwkT9sXT2pBP1VyaSQiCse9Coqa27LApBIPE+BEKkLwSk32zRHESDkp0zkSDQBALF9uKdYHunnkthwo7tfXQqQjmYSNQImBACIU2xIuGreB8CIdIvAtJzNogMosHI4mYkCDSHgPTUXspU2ItoEIvzEArlxWRvIlGFWTSnsnWF+b1dKAhk8QrrHpEgsDgC0ndi0oNoEBIuiASBZhGQvnqCz/KCJ/jYZtto7DPRoUU2N11LJIXxqNyUC0VFqeCTpRlP94gEgZMhIL0nbDCIdJswQSQINI9AIRRsNRP+KfvOkgNrKEddr5660YUqw3k8EAhkbvsuCztPVSF7JDqMBIF1IKAxcOl5S8eZLEWCQDcIFBtO2Kv2UOr645lAKkex4VeIpLo5jHbls1KD4eYaWIu4R+UeyYLA2RHQWGAADiJ9P9u2StcheRB4VQSkyzgD2PQppwBH4MaEMpBFRSDcqCYQx9ggDphr0QUb3SMSBJpAQGPiciei9P6oYYAmGphKbA4B6TRrJ+j1HKHYzh8cZbpVBowXZ8bgQhzPNJAOvvD4QjkOAj0hUAbdUOVMoHrqudT1OgSk2zgLkAl2n/LYvh9s900kutYV4UIvQiBXMMlBEAgCQWA1CBRCgUjmHAkI5vk+PACR1BcZmGmfH64GzTQkCASBILBhBAqhgEC9rDFGJI7FGJEcB4EgEASCQBAIAkEgCASBIBAEgkAQCAJBIAgEgSAQBIJAEAgCm0fg/x4jQQWGalpFAAAAAElFTkSuQmCC";function yv(){const n=document.createElement("div"),t=document.createElement("i"),e=document.createElement("span");return n.appendChild(t),n.appendChild(e),n.style.position="relative",n.style.width="100%",n.style.display="flex",n.style.flexDirection="column",n.style.alignItems="center",n.style.marginTop=`${150/16}rem`,n.style.opacity="0",n.style.transition="opacity 1000ms linear",t.style.display="block",t.style.width=`${134/16}rem`,t.style.height=`${22/16}rem`,t.style.backgroundSize="100%",t.style.backgroundRepeat="no-repeat",t.style.backgroundImage=`url(${bv})`,e.style.marginTop=`${10/16}rem`,e.style.fontSize=`${16/16}rem`,e.style.color="#fff",e.style.opacity="0.7",e.style.textShadow="0 2px 16px rgb(22 34 83 / 24%)",e.style.fontWeight="bold",{appendTo(i){i.appendChild(n)},dispose(){n.remove()},setRoom(i){e.innerHTML=i.name+" "+Math.floor(i.size/1e6)+"㎡"},show(){n.style.opacity="1"},hide(){n.style.opacity="0"}}}const wv=new k.TextureLoader;function zi(n){return W(this,null,function*(){return new Promise((t,e)=>{wv.load(n,t,void 0,e)}).then(t=>(t.encoding=k.sRGBEncoding,t.minFilter=k.NearestFilter,t.magFilter=k.NearestFilter,t))})}function sd(n){return W(this,null,function*(){return zi(n).then(t=>{const e=n.startsWith("data:")?n.includes("png"):new URL(n,location.href).pathname.toLowerCase().endsWith(".png");return{texture:t,transparent:e}})})}const io={userAction:!0};class Cv extends vi{constructor(e,i){super(e,i);u(this,"state",{visible:!0,enabled:!0,config:{compassImageUrl:this.absoluteUrl("/release/web/v3/north-point-circle.96498e69.png"),entryDoorImageUrl:this.absoluteUrl("/release/web/enterDoor.831b8208.png")}});u(this,"data");u(this,"group",new k.Group);u(this,"roomInfoInstance");u(this,"roomInfoWrapperInstance");u(this,"compassMeshTween");u(this,"compassMesh");u(this,"logoMesh");u(this,"logoMeshTween");u(this,"entryDoorMesh");u(this,"dispose",()=>{var e,i,s,o;this.five.scene.remove(this.group),this.group.remove(...this.group.children),(i=(e=this.compassMesh)==null?void 0:e.material.map)==null||i.dispose(),(o=(s=this.entryDoorMesh)==null?void 0:s.material.map)==null||o.dispose(),this.five.off("dispose",this.dispose),this.five.off("panoArrived",this.onFivePanoArrived),this.five.off("panoWillArrive",this.onFivePanoWillArrive),this.five.off("cameraDirectionUpdate",this.onFiveCameraDirectionUpdate)});u(this,"_addEventListener",()=>{this.five.on("panoArrived",this.onFivePanoArrived),this.five.on("panoWillArrive",this.onFivePanoWillArrive),this.five.on("modeChange",this.onFiveModeChange),this.five.on("cameraDirectionUpdate",this.onFiveCameraDirectionUpdate)});u(this,"_removeEventListener",()=>{this.five.off("panoArrived",this.onFivePanoArrived),this.five.off("panoWillArrive",this.onFivePanoWillArrive),this.five.off("modeChange",this.onFiveModeChange),this.five.off("cameraDirectionUpdate",this.onFiveCameraDirectionUpdate)});u(this,"_enable",()=>{this.five.scene.add(this.group),this.init(),this.onFivePanoArrived(this.five.panoIndex||0),this._addEventListener()});u(this,"_disable",()=>{this._clearCompassIfNeed(),this._clearEntryDoorIfNeed(),this.five.scene.remove(this.group),this._removeEventListener()});u(this,"_toggleVisible",()=>{this.group.visible=this.state.visible,this.five.needsRender=!0});u(this,"_clearCompassIfNeed",()=>{var e;this.compassMesh&&(this.group.remove(this.compassMesh),(e=this.compassMesh.material.map)==null||e.dispose(),this.compassMesh=null)});u(this,"_clearLogoIfNeed",()=>{var e;this.logoMesh&&(this.group.remove(this.logoMesh),(e=this.logoMesh.material.map)==null||e.dispose(),this.logoMesh=null)});u(this,"_clearEntryDoorIfNeed",()=>{var e;this.entryDoorMesh&&(this.group.remove(this.entryDoorMesh),(e=this.entryDoorMesh.material.map)==null||e.dispose(),this.entryDoorMesh=null),this.roomInfoInstance&&(this.roomInfoInstance.dispose(),this.roomInfoInstance=null),this.roomInfoWrapperInstance&&(this.roomInfoWrapperInstance.dispose(),this.roomInfoWrapperInstance=null)});u(this,"onFivePanoWillArrive",e=>{var i,s,o,r;e!==this.five.panoIndex&&((i=this.compassMeshTween)==null||i.dispose(),(s=this.compassMesh)==null||s.material.setValues({opacity:0}),(o=this.logoMeshTween)==null||o.dispose(),(r=this.logoMesh)==null||r.material.setValues({opacity:0}))});u(this,"onFivePanoArrived",e=>{var s,o,r,a,l,c,d,h;const i=(r=(o=(s=this.five.work)==null?void 0:s.observers)==null?void 0:o[e])==null?void 0:r.standingPosition;if(this.compassMesh&&(this.compassMesh.position.copy(i.clone().setY(i.y+.01)),this.compassMesh.material.opacity===0&&((a=this.compassMeshTween)==null||a.dispose(),this.compassMeshTween=tn(1e3).onUpdate(({progress:f})=>{var m;(m=this.compassMesh)==null||m.material.setValues({opacity:f}),this.five.needsRender=!0}).play())),this.logoMesh&&(this.logoMesh.position.copy(i.clone().setY(i.y+.011)),this.logoMesh.material.opacity===0&&((l=this.logoMeshTween)==null||l.dispose(),this.logoMeshTween=tn(1e3).onUpdate(({progress:f})=>{var m;(m=this.logoMesh)==null||m.material.setValues({opacity:f}),this.five.needsRender=!0}).play())),this.entryDoorMesh){const m=new k.Vector3(this.data.entrance.position.x,this.data.entrance.position.y,this.data.entrance.position.z).clone().setY(i.y).sub(i).normalize(),A=i.clone().add(m.clone().multiplyScalar(.7)).setY(i.y+.01);this.entryDoorMesh.rotation.z=new k.Vector3(0,0,-1).angleTo(m),this.entryDoorMesh.position.copy(A),((c=this.data)==null?void 0:c.room_observers[e].room.type)===1?(d=this.entryDoorMesh)==null||d.material.setValues({opacity:1}):(h=this.entryDoorMesh)==null||h.material.setValues({opacity:0})}this.roomInfoInstance&&this.roomInfoWrapperInstance&&(this.roomInfoWrapperInstance.css3DObject.position.copy(i.clone().setY(i.y+.01)),this.roomInfoInstance.setRoom(this.data.room_observers[e].room)),this.five.needsRender=!0});u(this,"onFiveCameraDirectionUpdate",({longitude:e,latitude:i})=>{var s,o;this.roomInfoWrapperInstance&&(this.roomInfoWrapperInstance.css3DObject.rotation.z=e,i>.66&&this.five.getCurrentState().mode==="Panorama"?(s=this.roomInfoInstance)==null||s.show():(o=this.roomInfoInstance)==null||o.hide())});u(this,"onFiveModeChange",(e,i,s,o,r)=>{e!==i&&this.setState({visible:e===Ae.Five.Mode.Panorama},{userAction:r})});this.five.scene.add(this.group),this.five.once("dispose",this.dispose),this.setState({visible:!0,enabled:!0,config:V(V({},this.state.config),i||{})})}enable(e=io){this.setState({enabled:!0},e)}disable(e=io){this.setState({enabled:!1},e)}show(e=io){if(this.state.enabled)return this.setState({visible:!0},e),Promise.resolve()}hide(e=io){if(this.state.enabled)return this.setState({visible:!1},e),Promise.resolve()}setState(e,i={userAction:!0}){var o,r;const s=JSON.parse(JSON.stringify(this.state));this.state={visible:(o=e.visible)!=null?o:s.visible,enabled:(r=e.enabled)!=null?r:s.enabled,config:V(V({},s.config),e.config||{})},this.hooks.emit("stateChange",{state:this.state,prevState:s,userAction:i.userAction}),e.enabled===!0&&(this._enable(),this.hooks.emit("enable",i)),e.enabled===!1&&(this._disable(),this.hooks.emit("disable",i)),e.visible===!1&&(this._toggleVisible(),this.hooks.emit("hide",i)),e.visible===!0&&(this._toggleVisible(),this.hooks.emit("show",i)),e.config&&this.init()}load(e,i,s=!0){return W(this,null,function*(){const o=yield this.formatData(e);JSON.stringify(this.data)!==JSON.stringify(o)&&(this.hooks.emit("dataChange",o,this.data),this.data=V({},o),this.init(),i&&this.setState(i,{userAction:s}),this.hooks.emit("dataLoaded",this.data))})}formatData(e){return e.version&&e.data?Promise.resolve(e.data):Promise.resolve(e)}init(){return W(this,null,function*(){var s,o,r,a;const e=(o=(s=this.data)==null?void 0:s.north_rad)!=null?o:null;this._clearCompassIfNeed(),e!==null&&(this.compassMesh=yield this.loadCompassMesh(),this.compassMesh&&(this.compassMesh.rotateX(-Math.PI/2),this.compassMesh.rotateZ(e-Math.PI/2),this.group.add(this.compassMesh))),this._clearLogoIfNeed(),this.logoMesh=yield this.loadLogoMesh(),this.logoMesh&&(this.logoMesh.rotateX(-Math.PI/2),this.group.add(this.logoMesh));const i=(a=(r=this.data)==null?void 0:r.entrance)!=null?a:null;this._clearEntryDoorIfNeed(),i!==null&&(this.entryDoorMesh=yield this.loadEntryDoorMesh(),this.roomInfoWrapperInstance=this.loadRoomInfo(),this.roomInfoInstance=yv(),this.entryDoorMesh.rotateX(-Math.PI/2),this.roomInfoWrapperInstance&&this.roomInfoInstance.appendTo(this.roomInfoWrapperInstance.container),this.group.add(this.entryDoorMesh)),this.onFivePanoArrived(this.five.panoIndex||0),this.five.needsRender=!0})}loadCompassMesh(){return W(this,null,function*(){const e=this.state.config.compassImageUrl,i=yield zi(e),s=new k.CircleGeometry(.7,32),o=new k.MeshBasicMaterial({map:i,transparent:!0,opacity:0,depthTest:!1}),r=new k.Mesh(s,o);return r.name="pano-compass-mesh",r})}loadLogoMesh(){return W(this,null,function*(){if(!this.state.config.logoURL)return;const e=this.state.config.logoURL,i=yield zi(e);i.minFilter=k.NearestFilter,i.magFilter=k.NearestFilter;const s=new k.PlaneBufferGeometry(.4,.4),o=new k.MeshBasicMaterial({map:i,opacity:0,transparent:!0,depthTest:!1}),r=new k.Mesh(s,o);return r.name="pano-compass-logo-mesh",r})}loadEntryDoorMesh(){return W(this,null,function*(){const e=this.state.config.entryDoorImageUrl,i=yield zi(e),s=new k.PlaneGeometry(.2,.16),o=new k.MeshBasicMaterial({map:i,transparent:!0,opacity:.8,depthTest:!1}),r=new k.Mesh(s,o);return r.name="pano-compass-entry-door",r})}loadRoomInfo(){const e=[new k.Vector3(-.7,0,-.7),new k.Vector3(.7,0,-.7),new k.Vector3(.7,0,.7),new k.Vector3(-.7,0,.7)];return Bs(this.five).create3DDomContainer(e)}}const Iv=(n,t)=>new Cv(n,t),Pv=1,kv=3,Mv=new G.Color(16777215),Ev=new G.Color(6522623),Dv=new G.Color(16777215),xv=new G.Color(6522623),Sv=6,Lv=8,Tv="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgBAMAAACBVGfHAAAAIVBMVEUAAAD////////////////////////////////////////PIev5AAAACnRSTlMAG/Py2baba05un7UgfgAAAHJJREFUKM9joBpgLHVSCRdA4metAoJlCJHmVWBgAeNzroKCCVCBLpjACqgJVjCBxRBT2FbBQQJYQAohsBAsUIUQWA4WiEIILAULeCEEloAFtBACizAEMLRgGIphLabDMJ2O6TlM72MGECIIMQIZIxqoBQCPvpJ/e9FaAAAAAABJRU5ErkJggg==",od=new G.TextureLoader().load(Tv),jv={pointTexture:od,pointSize:Sv,lineWidth:Pv,lineColor:Mv,pointColor:Dv,lineRenderOrder:20,pointsRenderOrder:20},zv={pointTexture:od,pointSize:Lv,lineWidth:kv,lineColor:Ev,pointColor:xv,lineRenderOrder:10,pointsRenderOrder:10};function Ov(n,t,e){var d,h,f,m,A;const i=(d=e==null?void 0:e.lineWidth)!=null?d:2,s=(h=e==null?void 0:e.lineColor)!=null?h:new G.Color(16777215),o=(f=e==null?void 0:e.pointSize)!=null?f:5,r=(m=e==null?void 0:e.lineRenderOrder)!=null?m:10,a=(A=e==null?void 0:e.lineRenderOrder)!=null?A:20,l=new Is.Line(n,t);l.setMaterial({linewidth:i,color:s}),l.line.material.depthTest=!1,l.line.material.transparent=!0,l.line.renderOrder=r,l.points.renderOrder=a;const c=l.points.material;return c.depthTest=!1,c.size=o,e!=null&&e.pointColor&&c.color.set(e.pointColor).convertSRGBToLinear(),e!=null&&e.pointTexture&&(c.map=e.pointTexture),l}function rd(n,t){const[e,i]=n.points,s=t==="light"?zv:jv,o=Ov(e.position,i.position,s);return o.name="normalLine_"+n.id,o}function Oi(n){const{x:t,y:e,z:i}=n;return!(Math.abs(t)>1||Math.abs(e)>1||Math.abs(i)>1)}function no(n){const{z:t}=n;return!(Math.abs(t)>1)}function Bv(n){const t=document.createElement("div");return t.setAttribute("style","backdrop-filter: blur(4px);-webkit-backdrop-filter: blur(4px);-webkit-tap-highlight-color: rgba(0,0,0,0);"),t.style.width="max-content",t.style.padding="3px 6px",t.style.lineHeight="1",t.style.textAlign="center",t.style.transform="translate(-50%, -50%)",t.style.fontSize="14px",t.style.color="#fff",t.style.cursor="pointer",t.style.userSelect="none",n!=null&&n.style&&Object.assign(t.style,n==null?void 0:n.style),t}function Vv(n){const t=document.createElement("div");return n!=null&&n.id&&(t.id=n==null?void 0:n.id),t.classList.add("five-plugin-measure__distance"),t.style.position="absolute",t.style.left="0",t.style.top="0",t.style.width="0",t.style.height="0",t.style.transform="translate(-10px, -10px)",t.style.transformOrigin="left top",n!=null&&n.style&&Object.assign(t.style,n.style),t}class ad{constructor(t){u(this,"ndcPosition");u(this,"contentDom");u(this,"containerDom");u(this,"params");u(this,"canSelected");u(this,"handleClick",t=>{var e,i;(i=(e=this.params).clickCallback)==null||i.call(e,t,this)});this.params=t,this.contentDom=Bv({style:t.contentStyle}),this.containerDom=Vv({style:t.containerStyle}),this.setCanSelect(!0)}setCanSelect(t){this.canSelected=t,this.containerDom.style.pointerEvents=t?"all":"none"}highlight(){this.contentDom.style.border="0.5px solid #95AEFF",this.contentDom.style.background="linear-gradient(90deg, #95AEFF 0%, #6386FF 100%)"}unHighlight(){this.contentDom.style.border="0.5px solid rgba(255,255,255,0.6)",this.contentDom.style.background="rgba(195,195,195,0.70)"}appendTo(t){t.appendChild(this.containerDom),this.containerDom.addEventListener("click",this.handleClick)}remove(){this.contentDom.removeEventListener("click",this.handleClick),this.containerDom.remove()}show(){this.containerDom.style.visibility="visible"}hide(){this.containerDom.style.visibility="hidden"}tempHide(){this.containerDom.style.opacity="0"}tempShow(){this.containerDom.style.opacity="1"}updateDomPosition(t){if(!this.ndcPosition){this.tempHide();return}const e=t.getElement();if(!e)return;const i=e.clientWidth,s=e.clientHeight,o=this.ndcPosition.clone().project(t.camera);if(!no(o)){this.tempHide();return}const r=(o.x+1)/2*i,a=-(o.y-1)/2*s;this.containerDom.style.transform=`translate(${r}px, ${a}px)`,this.tempShow()}}class Rv extends ad{constructor(e){var i;e.contentStyle=ge(V({},e.contentStyle),{background:"rgba(195,195,195,0.70)",border:"0.5px solid rgba(255,255,255,0.6)",borderRadius:"999px"});super(e);u(this,"line");this.line=e.line,(i=this.params.userDistanceItem)!=null&&i.element?this.containerDom.appendChild(this.params.userDistanceItem.element):this.containerDom.appendChild(this.contentDom)}update(e){var z;if(this.line.mesh.visible===!1){this.hide();return}const i=e.getElement();if(!i)return;const s=i.clientWidth,o=i.clientHeight,r=s/2,a=o/2;if(this.line.points.length<2)return;const[l,c]=this.line.points,d=l.position.clone().project(e.camera),h=c.position.clone().project(e.camera),f=di(l.position,c.position).clone().project(e.camera),m=new G.Vector2(d.x*r,d.y*a),A=new G.Vector2(h.x*r,h.y*a),p=m.distanceTo(A);if((()=>!(Math.abs(d.z)>1||Math.abs(h.z)>1||!no(d)&&!no(h)||!no(f)||p===0))()===!1){this.hide();return}const v=(f.x+1)/2*s,y=-(f.y-1)/2*o,I=-(Math.atan((m.y-A.y)/(m.x-A.x))*180)/Math.PI,E=this.containerDom.parentElement&&this.contentDom.clientWidth>p?-20:0;this.containerDom.style.transform=`translate(${v}px, ${y}px) rotate(${I}deg) translateY(${E}px)`,this.show(),(z=this.params.userDistanceItem)==null||z.update({line:this.line,polyline:this.line.getPolyline()});const C=this.getCurrentContent();this.contentDom.innerText=C}getCurrentContent(){var l,c,d,h;if(this.line.points.length<2)return"";const[e,i]=this.line.points,s=e.position.clone().distanceTo(i.position),o=(c=this.line.text)!=null?c:(l=this.line.model.config)==null?void 0:l.defaultText,r=(h=(d=this.line.model.config)==null?void 0:d.getDistanceText)==null?void 0:h.call(d,s),a=o!=null?o:r;return a!=null?a:s.toFixed(2)+"m"}}class ii{constructor(t,e,i){u(this,"id");u(this,"selected",!1);u(this,"text");u(this,"type","line");u(this,"model");u(this,"mesh");u(this,"points");u(this,"lightMesh");u(this,"hook");u(this,"distanceItem");u(this,"polyline");u(this,"visible");var s;if(this.id=nt(),this.model=i,t.id===e.id)throw new Error("无效的线段, 一个点无法构成线段");typeof i.config.defaultText=="string"&&(this.text=i.config.defaultText),this.hook=new Ae.Subscribe,this.points=[t,e],this.mesh=rd(this,"normal"),this.lightMesh=rd(this,"light"),this.distanceItem=new Rv({line:this,clickCallback:()=>this.hook.emit("selected",this),userDistanceItem:(s=this.model.config)!=null&&s.userDistanceItemCreator?this.model.config.userDistanceItemCreator():void 0})}hide(){this.visible&&(this.visible=!1,this.mesh.visible=!1,this.distanceItem.hide())}show(){this.visible||(this.visible=!0,this.mesh.visible=!0,this.distanceItem.show())}setPoints(t,e){this.points[0].position.copy(t),this.points[1].position.copy(e),this.mesh.setPoints(t,e)}remove(){this.mesh.parent&&this.mesh.parent.remove(this.mesh),this.distanceItem.remove()}clear(){this.selected=!1,this.polyline=void 0}isEmpty(){return this.points.length===0}getPolyline(){if(this.polyline)return this.polyline;const t=this.model.polylines.find(e=>e.lines.includes(this));if(t)return this.polyline=t,t}findAnotherPoint(t){return this.points.find(({id:e})=>e!==t.id)}setText(t){this.text=t,this.hook.emit("textChanged",t)}toJson(){return{id:this.id,points:this.points.map(t=>t.toJson()),text:this.text}}clone(){const t=new ii(this.points[0].clone(),this.points[1].clone(),this.model);return t.text=this.text,t}}class pt{constructor(t){u(this,"id");u(this,"position");u(this,"type","point");if(this.id=nt(),this.position=new G.Vector3,Array.isArray(t))this.position.fromArray(t);else if(typeof t=="object"&&t.isVector3)this.position.copy(t);else throw new Error("position must be Vector3 or number[]")}toJson(){return{id:this.id,position:this.position.toArray()}}clone(){return new pt(this.position)}}const so=n=>n.preventDefault();let oo=class{constructor(t){u(this,"model");u(this,"five");u(this,"group");u(this,"config");u(this,"dashed");u(this,"perpendicularDashed");u(this,"disposed",!1);u(this,"isMobile");u(this,"editParams");u(this,"magnifierParams");u(this,"mouseGroup");u(this,"container");u(this,"hook");u(this,"magnifier");u(this,"userDistanceItemCreator");u(this,"getMeasureType");u(this,"updateDistanceUI",()=>{this.dashed.distanceItem.update(this.five),this.model.getAllLines().forEach(t=>t.distanceItem.update(this.five))});u(this,"updateAreaUI",()=>{this.dashed.distanceItem.update(this.five),this.model.getAllAreas().forEach(t=>{t.areaItem.updateArea(this.five),t.polyline.lines.forEach(e=>{e.distanceItem.update(this.five)})})});var i,s;this.five=t.five,this.hook=t.hook,this.model=t.model,this.getMeasureType=t.getMeasureType,this.config=t.config,this.magnifierParams=t.magnifierParams,this.editParams=t.editParams,this.magnifier=t.magnifier,this.container=t.container,this.isMobile=(s=(i=t.openParams)==null?void 0:i.isMobile)!=null?s:!1,this.userDistanceItemCreator=t.userDistanceItemCreator,this.group=t.group,this.mouseGroup=t.mouseGroup,this.dashed=new ii(new pt([0,0,0]),new pt([0,0,0]),this.model),this.dashed.distanceItem.setCanSelect(!1),this.dashed.mesh.setMaterial({dashed:!0,dashScale:100}),this.dashed.mesh.name="dashLine",this.perpendicularDashed=new ii(new pt([0,0,0]),new pt([0,0,0]),this.model),this.perpendicularDashed.distanceItem.setCanSelect(!1),this.perpendicularDashed.mesh.setMaterial({dashed:!0,dashScale:40,color:new G.Color(10218089)}),this.perpendicularDashed.mesh.name="perpendicularDashLine";const e=this.five.getElement();e&&(e.addEventListener("touchstart",so),e.addEventListener("contextmenu",so))}get currentMeasureType(){return this.getMeasureType()}removeLine(t){this.group.remove(t.mesh,t.lightMesh),t.distanceItem.remove(),this.five.needsRender=!0}updateMouseGroup(t,e){if(!t)return this.mouseGroup;if(this.mouseGroup.position.copy(t.point),e)this.mouseGroup.quaternion.copy(e.quaternion);else if(t.face){const s=t.face.normal.clone().multiplyScalar(.05),r=t.point.clone().add(s).clone().add(s);this.mouseGroup.lookAt(r)}return this.mouseGroup}dispose(){this.disposed=!0,this.magnifier.disable(),this.model.getAllLines().forEach(e=>this.removeLine(e)),this.model.areas.forEach(e=>e.remove());const t=this.five.getElement();t&&(t.removeEventListener("touchstart",so),t.removeEventListener("contextmenu",so))}},Bi=class{constructor(t){u(this,"id",nt());u(this,"lines",[]);u(this,"visiblePanoIndexes");u(this,"model");u(this,"type","polyline");u(this,"hook",new Ae.Subscribe);this.model=t.model}get points(){const t=new Set;return this.lines.forEach(e=>{t.add(e.points[0]),t.add(e.points[1])}),Array.from(t)}addLine(t){if(this.includes(t)){console.error(new Error("不能重复添加线段"));return}const e=this.getLastPoint(),i=e&&t.findAnotherPoint(e);if(e&&!i){console.error(new Error("传入线段无法与当前折线进行连接"));return}this.lines.push(t),this.hook.emit("lineAdded",t)}removeLine(t){if(this.lines.length===0)return;if(!this.isLastLine(t)){console.error(new Error("传入线段不是当前折线的最后一段"));return}this.lines.pop()&&this.hook.emit("lineRemoved",t)}isLastLine(t){const e=this.getLastLine();return e?t.id===e.id:!1}getLastLine(){return this.lines.slice(-1)[0]}getPointLength(){return this.lines.length+1}clear(){const t=this.lines.slice();this.lines.length=0,t.reduceRight((e,i)=>this.hook.emit("lineRemoved",i),void 0)}overlapWith(t){return t.type==="point"?this.includes(t):t.type==="line"?t.points.some(e=>this.includes(e)):t.type==="polyline"?t.points.some(e=>this.includes(e)):!0}includes(t){return t.type==="point"?this.points.find(({id:e})=>e===t.id)!==void 0:t.type==="line"?this.lines.find(({id:e})=>e===t.id)!==void 0:!1}isEmpty(){return this.lines.length===0}getLastPoint(){return this.points.slice(-1)[0]}toJson(){return{id:this.id,lines:this.lines.map(t=>t.toJson()),visiblePanoIndexes:this.visiblePanoIndexes}}getPointByID(t){return this.points.find(({id:e})=>e===t)}fromJson(t){this.clear(),this.id=t.id;const{getPoint:e}=s(),i=t.lines.map(o=>{const[r,a]=o.points,l=e(r),c=e(a);if(!l||!c)throw new Error("线上的点不存在");const d=new ii(l,c,this.model);return d.id=o.id,d.text=o.text,d});this.lines.push(...i),this.visiblePanoIndexes=t.visiblePanoIndexes;function s(){const o=new Map;function r(l){const c=o.get(l.id);if(c)return c;const d=new pt(l.position);return d.id=l.id,o.set(l.id,d),d}function a(){return Array.from(o.values())}return{getPoint:r,getAllPoints:a}}return this}replace(t){this.id=t.id,this.clear(),this.lines.push(...t.lines)}};class ld extends G.Object3D{constructor(){super()}add(...t){if(t.length===0)return this;const e=t.filter(Boolean);return super.add(...e)}remove(...t){if(t.length===0)return this;const e=t.filter(Boolean);return super.remove(...e)}removeFromParent(){const t=this.parent;return t!==null&&t.remove(this),this}}function Qv(n){const t=[...new Set(n)];if(t.length<3)return;t.at(-1).equals(t[0])||t.push(t[0]);const e=t.flatMap(r=>[r.x,r.y,r.z]),i=new k.Float32BufferAttribute(e,3),s=Nn(e,void 0,3),o=new k.BufferGeometry;return o.setAttribute("position",i),o.setIndex(s),o.name="PolygonGeometry",o}const Gv=new k.BufferGeometry;class cd extends ld{constructor(e){super();u(this,"isPolygonMesh",!0);u(this,"geometry",new k.BufferGeometry);u(this,"isBlank",!0);u(this,"points",[]);const i=new k.MeshBasicMaterial({color:4090367,transparent:!0,side:k.DoubleSide,depthTest:!0,opacity:.5}),s=new k.MeshBasicMaterial({color:16777215,transparent:!0,side:k.DoubleSide,depthTest:!1,depthWrite:!1,opacity:.3}),o=new k.Mesh(this.geometry,i),r=new k.Mesh(this.geometry,s);o.renderOrder=1,r.renderOrder=0,e&&this.updatePoints(e),this.add(o,r)}updatePoints(e){this.points=e;const i=Qv(e);i?(this.geometry.copy(i),this.isBlank=!1):(this.geometry.copy(Gv),this.isBlank=!0)}}function Nv(n){const t=_v(n);if(t.length===0)return;let e=0,i=new G.Vector3;for(const[s,o,r]of t){const a=dd(s,o,r),l=Fv(s,o,r,a);e+=a,i.add(l)}return i=i.divideScalar(e),{center:i,area:e}}function dd(n,t,e){return t.clone().sub(n).cross(e.clone().sub(n)).length()/2}function Fv(n,t,e,i){const s=i!=null?i:dd(n,t,e);return di(n,t,e).multiplyScalar(s)}function _v(n){var s;const t=n.getAttribute("position"),e=(s=n.getIndex())==null?void 0:s.array;if(!t||!e)return[];let i=[];for(let o=0;o<e.length;o+=3){const r=e[o],a=e[o+1],l=e[o+2],c=new G.Vector3().fromArray([t.getX(r),t.getY(r),t.getZ(r)]),d=new G.Vector3().fromArray([t.getX(a),t.getY(a),t.getZ(a)]),h=new G.Vector3().fromArray([t.getX(l),t.getY(l),t.getZ(l)]);i.push([c,d,h])}return i}class Hv extends ad{constructor(e){e.containerStyle=ge(V({},e.containerStyle),{zIndex:"1"}),e.contentStyle=ge(V({},e.contentStyle),{background:"#6386FF",borderRadius:"2px"});super(e);u(this,"area");this.area=e.area,this.containerDom.appendChild(this.contentDom)}updateArea(e,i){var l,c;const s=i!=null?i:this.area.polygon.geometry,o=Nv(s);if(!o){this.ndcPosition=null,this.updateDomPosition(e);return}const{area:r,center:a}=o;this.ndcPosition=a,this.updateDomPosition(e),(c=(l=this.area.model)==null?void 0:l.config)!=null&&c.getAreaText?this.contentDom.innerText=this.area.model.config.getAreaText(r):this.updateAreaText(r,{fix:2})}updateAreaText(e,i){const{unit:s="m²",fix:o}=i!=null?i:{};this.contentDom.innerText=`${Sl(o)?e:e.toFixed(o)}${s}`}}class Er{constructor(t,e){u(this,"id",nt());u(this,"selected",!1);u(this,"text");u(this,"type","area");u(this,"lightMesh");u(this,"areaItem");u(this,"hook",new Ae.Subscribe);u(this,"model");u(this,"polygon");u(this,"points",[]);u(this,"planeHelper");u(this,"polyline");u(this,"meshContainer");u(this,"domContainer");u(this,"five");u(this,"updateDom",()=>{this.five&&(this.polyline.lines.forEach(t=>t.distanceItem.update(this.five)),this.areaItem.updateDomPosition(this.five))});var i;t&&(this.points=t),this.model=e.model,this.polygon=new cd(t),this.polyline=new Bi({model:e.model}),this.areaItem=new Hv({area:this,clickCallback:(s,o)=>{const r=s.clientX+"px",a=s.clientY+"px";this.hook.emit("selected",this,{left:r,top:a})}}),this.domContainer=e.domContainer||null,this.meshContainer=e.meshContainer||null,this.five=e.five||null,this.areaItem.appendTo(this.domContainer),(i=this.five)==null||i.on("cameraUpdate",this.updateDom)}get isClosed(){var t;return this.points.length>=4&&((t=this.points.at(0))==null?void 0:t.equals(this.points.at(-1)))}addPoints(t){var s;this.points=this.points.concat(t);const e=this.points.at(-2),i=this.points.at(-1);if(e&&i){const o=new ii(new pt(e),new pt(i),this.polyline.model);this.polyline.addLine(o),this.meshContainer.add(o.mesh),this.five&&(o.distanceItem.setCanSelect(!1),o.distanceItem.appendTo(this.domContainer),o.distanceItem.update(this.five))}(s=this.meshContainer)!=null&&s.children.includes(this.polygon)||this.meshContainer.add(this.polygon),this.polygon.updatePoints(this.points),this.areaItem.updateArea(this.five),this.points.length===3?this.planeHelper=new k.Plane().setFromCoplanarPoints(this.points[0],this.points[1],this.points[2]):this.points.length<3&&(this.planeHelper=null)}popPoint(){this.points.pop();const t=this.polyline.lines.pop();t==null||t.remove(),this.polygon.updatePoints(this.points),this.areaItem.updateArea(this.five),this.points.length<3&&(this.planeHelper=null)}complete(){this.points.at(-1).equals(this.points[0])||this.addPoints(this.points[0])}hideArea(){this.polygon.visible=!1,this.areaItem.hide()}showArea(){this.polygon.visible=!0,this.areaItem.show()}projectPoint(t){return t&&(this.planeHelper?this.planeHelper.projectPoint(t,new k.Vector3):t)}remove(){this.polygon.removeFromParent(),this.areaItem.remove(),this.polyline.lines.forEach(t=>t.remove())}dispose(){this.remove(),this.model.areas.splice(this.model.areas.indexOf(this),1),this.planeHelper=null,this.five.off("cameraUpdate",this.updateDom),this.five.needsRender=!0}}function hd(n,t){const e=Array.isArray(t)?t:[t];for(let i=0;i<e.length;i++){const s=e[i],o=n.start,r=n.end,a=s.start,l=s.end;if(Zn(o,a)||Zn(o,l)||Zn(r,a)||Zn(r,l)||Zn(o,r))continue;const c=ro(o,r,a),d=ro(o,r,l),h=ro(a,l,o),f=ro(a,l,r);if(c!==d&&h!==f||c===0&&ao(o,r,a)||d===0&&ao(o,r,l)||h===0&&ao(a,l,o)||f===0&&ao(a,l,r))return!0}return!1}function Zn(n,t){return n.x===t.x&&n.z===t.z&&n.y===t.y}function ro(n,t,e){const i=(e.z-n.z)*(t.x-n.x)-(t.z-n.z)*(e.x-n.x);return i===0?0:i<0?2:1}function ao(n,t,e){return t.x<=Math.max(n.x,e.x)&&t.x>=Math.min(n.x,e.x)&&t.z<=Math.max(n.z,e.z)&&t.z>=Math.min(n.z,e.z)}const ud="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0;function Dr(n){const{x:t,y:e}=n.center,{clientWidth:i,clientHeight:s}=n.target,o=n.target.getBoundingClientRect(),r=new G.Vector2(t,e).sub(new G.Vector2(o.left,o.top)),a=new G.Vector2(r.x/i*2-1,-(r.y/s)*2+1);return{point:r,ndcPoint:a}}function xr(n,t){const e=Dr(t).ndcPoint,i=new G.Raycaster;return i.setFromCamera(e,n.camera),n.model.intersectRaycaster(i)}const wn=()=>!1;class Wv{constructor(t,e){u(this,"hook",new Ae.Subscribe);u(this,"outOfFive",!1);u(this,"five");u(this,"hammer");u(this,"mode");u(this,"pointSelectorHelper");u(this,"enabled",!1);u(this,"pressDown",!1);u(this,"adherePoints",null);u(this,"adherePointsRadius",.1);u(this,"lastFiveHelperVisible");u(this,"select",t=>{t&&this.updatePointSelectorHelperIntersect(t);const e=this.hook.emit("wantsSelect",this.position);return e||(this.pointSelectorHelper.hide(),this.hook.emit("select",this.position)),!e});u(this,"onEnter",()=>{this.pointSelectorHelper.show(),this.outOfFive=!1,this.hook.emit("intersectionUpdate",this.position)});u(this,"onLeave",()=>{this.pointSelectorHelper.hide(),this.outOfFive=!0,this.hook.emit("intersectionUpdate",null)});u(this,"onTap",t=>{const[e]=xr(this.five,t);e!=null&&e.face&&this.select(e)});u(this,"onPan",t=>{if(!this.pressDown)return;const[e]=xr(this.five,t);e!=null&&e.face&&this.intersectionOnModelUpdate(e)});u(this,"onPress",t=>{const[e]=xr(this.five,t);e!=null&&e.face&&(this.pressDown=!0,this.intersectionOnModelUpdate(e))});u(this,"onPanEnd",()=>{this.pressDown&&(this.pressDown=!1,this.select())});u(this,"intersectionOnModelUpdate",t=>{this.pointSelectorHelper.show(),this.updatePointSelectorHelperIntersect(t)});u(this,"updateByMousePosition",t=>{const e=this.five.getElement();if(!e)return;const{top:i,left:s,width:o,height:r}=e.getBoundingClientRect(),{clientX:a,clientY:l}=t,c={x:(a-s)/o,y:1-(l-i)/r};this.updateByNdcPosition(c)});u(this,"updateByNdcPosition",t=>{const e=Il(this.five,t),i=(()=>e?ge(V({},e),{isVirtual:!1}):ge(V({},Yv(this.five,t)),{isVirtual:!0}))();this.updatePointSelectorHelperIntersect(i)});u(this,"updatePointSelectorHelperIntersect",t=>{var s;const e=V({},t);let i=!1;if(((s=this.adherePoints)==null?void 0:s.length)>0&&typeof this.adherePointsRadius=="number"){for(const o of this.adherePoints)if(o.distanceTo(t.point)<this.adherePointsRadius){e.point=o.clone(),i=!0;break}}this.pointSelectorHelper.updateWithIntersect(e,{emitEvent:!1}),this.hook.emit("intersectionUpdate",e,i)});u(this,"onFiveWantsPanGesture",()=>{if(this.pressDown)return!1});u(this,"renderScreenCenter",()=>{this.updateByNdcPosition({x:.5,y:.5})});u(this,"emitIntersectionUpdate",t=>{this.hook.emit("intersectionUpdate",t)});var o,r;this.five=t;const i=(o=e==null?void 0:e.mode)!=null?o:"auto";i==="auto"?this.mode=ud?"fixed":"cursor":this.mode=i;const s={autoFixPCPosition:this.mode==="cursor",initialPosition:this.mode==="fixed"?{left:"35%",top:"20%"}:void 0};this.pointSelectorHelper=new El(t,ge(V({},e==null?void 0:e.pointSelectorHelperParams),{magnifierParams:V(V({},s),(r=e==null?void 0:e.pointSelectorHelperParams)==null?void 0:r.magnifierParams)})),this.pointSelectorHelper.hide()}get position(){return this.outOfFive?null:this.pointSelectorHelper.position}enable(){if(this.enabled)return;this.enabled=!0,this.pointSelectorHelper.enable();const t=this.five.getElement();if(!t)throw new Error("five element not found");this.hammer||(this.hammer=new li(t)),this.mode==="cursor"?(this.five.on("intersectionOnModelUpdate",this.intersectionOnModelUpdate),this.five.on("wantsPanGesture",this.onFiveWantsPanGesture),this.five.on("wantsMoveToPano",wn),this.five.on("wantsChangeMode",wn),this.five.on("wantsTapGesture",wn),t.addEventListener("mousemove",this.updateByMousePosition),t.addEventListener("mouseenter",this.onEnter),t.addEventListener("mouseout",this.onLeave),this.hammer.on("tap",this.onTap),this.hammer.on("pan",this.onPan),this.hammer.on("press",this.onPress),this.hammer.on("panend",this.onPanEnd)):this.mode==="fixed"&&(this.five.on("panGesture",this.renderScreenCenter),this.five.on("interiaPan",this.renderScreenCenter),this.renderScreenCenter(),this.pointSelectorHelper.show()),this.pointSelectorHelper.hooks.on("intersectionUpdate",this.emitIntersectionUpdate),this.lastFiveHelperVisible=this.five.helperVisible,this.five.helperVisible=!1}disable(){if(!this.enabled)return;this.enabled=!1,this.pointSelectorHelper.disable();const t=this.five.getElement();this.five.off("intersectionOnModelUpdate",this.intersectionOnModelUpdate),this.five.off("wantsPanGesture",this.onFiveWantsPanGesture),this.five.off("wantsMoveToPano",wn),this.five.off("wantsChangeMode",wn),this.five.off("wantsTapGesture",wn),this.five.helperVisible=this.lastFiveHelperVisible,t==null||t.removeEventListener("mousemove",this.updateByMousePosition),t==null||t.removeEventListener("mouseenter",this.onEnter),t==null||t.removeEventListener("mouseout",this.onLeave),this.hammer.off("tap",this.onTap),this.hammer.off("pan",this.onPan),this.hammer.off("press",this.onPress),this.hammer.off("panend",this.onPanEnd),this.five.off("panGesture",this.renderScreenCenter),this.five.off("interiaPan",this.renderScreenCenter),this.pointSelectorHelper.hooks.off("intersectionUpdate",this.emitIntersectionUpdate)}dispose(){this.disable(),this.pointSelectorHelper.dispose()}setAdherePoints(t,e){t?this.adherePoints=Array.isArray(t)?t:[t]:this.adherePoints=null,typeof e=="number"&&(this.adherePointsRadius=e)}}function Uv(n,t){const{x:e,y:i}=t,s=e*2-1,o=i*2-1,r=new G.Vector2().fromArray([s,o]),a=new G.Raycaster;return a.setFromCamera(r,n.camera),a}function Yv(n,t){const e=Uv(n,t),i=3,s=new G.Vector3().addVectors(e.ray.origin,e.ray.direction.clone().normalize().multiplyScalar(i)),o=e.ray.direction.clone().negate();return{distance:i,point:s,object:new G.Object3D,face:new G.Face3(0,0,0,o)}}const Xv=`
287
+ `,y=document.createElement("div");return y.setAttribute("class","PanoRulerPlugin-rule"),y.setAttribute("data-name",p),y.setAttribute("style","display: none"),y.innerHTML=v,y},s=document.createElement("div");s.setAttribute("style","position: absolute;pointer-events: none;width: 100%;height: 100%;left: 0;top: 0;overflow: hidden;");const o=document.createElement("div");o.innerHTML=sv,s.appendChild(o);const r={},a=(p,g)=>{if(e.loaded)throw new Error("标尺被重复初始化!");const v=rv(p,n),y=n.work;if(!y)return!1;for(const P in g){const I=g[P],{standingPosition:E}=y.observers[0],C=I.map(({x:z,z:R,observers:U})=>{const H=U.length>0?p.rooms[p.observers[U[0]]].name:"",N=v[H]?v[H].floor:null;let F=1/0,Q={index:0,x:E.x,y:E.y,z:E.z};U.forEach(fe=>{if(!y.observers[fe])return;const{standingPosition:de}=y.observers[fe],ke={index:fe,x:de.x,y:de.y,z:de.z},Pe=ov({x:z,z:R},ke);N?Pe<F&&Math.abs(ke.y-N)<.3&&(F=Pe,Q=ke):Pe<F&&(F=Pe,Q=ke)});const _=new G.Vector3(z,Q.y,R);Object.assign(_,{observers:U});const Y=v[H]?v[H].roof:null,Z=Y?new G.Vector3(z,Y,R):null;return Z&&Object.assign(Z,{observers:U}),{origin:_,vertical:Z}});r[P]={origins:C.map(z=>z.origin),rules:[]};for(const{origin:z,vertical:R}of C){if(!R)continue;const U=i(P,z.distanceTo(R));s.append(U),r[P].rules.push({vertical:!0,rule:[z,R],$element:U})}for(let z=0;z<C.length;z++){let R=z+1;R>=C.length&&(R=0);const{origin:U}=C[z],{origin:H}=C[R],N=i(P,U.distanceTo(H));s.append(N),r[P].rules.push({vertical:!1,rule:[U,H],$element:N})}}return e.loaded=!0,!0},l=(p,g,v)=>W(this,null,function*(){const y=p||t.roomInfo,P=g||t.roomRules;if(!y||!P)throw new Error("标尺数据依赖不齐全!");return e.loaded=!1,e.options=V(V({},e.options),v||{}),n.model.loaded?a(y,P):yield new Promise(I=>n.once("modelLoaded",()=>I(a(y,P))))});t.roomInfo&&t.roomRules&&l(t.roomInfo,t.roomRules);const c=(p,g,v,y)=>{const P=[[{x:0,y:0},{x:v,y:0}],[{x:0,y:0},{x:0,y}],[{x:v,y:0},{x:v,y}],[{x:0,y},{x:v,y}]],I=[];for(let E=0;E<P.length;E++){const C=Kc([p,g],[P[E][0],P[E][1]],!0);C&&I.push(C)}return I.length===0?!1:I},d=()=>{var U;const p=(U=n.getElement())==null?void 0:U.parentElement;if(!p||!e.loaded||Object.keys(r).length<=0)return;const{panoIndex:g,camera:v,currentMode:y}=n;if(g===void 0)return;let P;for(const H in r)H.split(",").indexOf(g.toString())>=0&&(P=H);if(!P){for(const H in r)for(const{$element:N}of r[H].rules)N.style.display="none";return}const I=v.position,E=v.getWorldDirection(new G.Vector3),C=p.clientWidth,z=p.clientHeight;if(y!==Ae.Five.Mode.Panorama){for(const H in r)for(const{$element:N}of r[H].rules)N.style.display="none";return}for(const H in r)for(const{$element:N}of r[H].rules)N.style.display=H===P?"block":"none";const[R]=r[P].origins.slice().filter(H=>H.observers.indexOf(g)>=0).sort((H,N)=>{const F=H.clone().setY(0).sub(I).normalize().angleTo(E.clone().setY(0)),Q=N.clone().setY(0).sub(I).normalize().angleTo(E.clone().setY(0));return F-Q});for(const{rule:H,vertical:N,$element:F}of r[P].rules){const[Q,_]=H,Y=F.querySelector(".PanoRulerPlugin-rule-line");if(!Y)return;if(!R){F.style.display="none";continue}if(Q!==R&&_!==R){F.style.display="none";continue}if(Q.distanceTo(_)<.3){F.style.display="none";continue}if(Q.observers.indexOf(g)===-1||_.observers.indexOf(g)===-1){F.style.display="none";continue}if(Q.clone().sub(I).normalize().angleTo(E)>Math.PI/2){F.style.display="none";continue}if(_.clone().sub(I).normalize().angleTo(E)>Math.PI/2){F.style.display="none";continue}const ee=Q.distanceTo(_);if(_.clone().sub(_.clone().sub(Q).divide(new G.Vector3(2,2,2))).distanceTo(I)/ee>8){F.style.display="none";continue}const ke=Q.clone().project(v),Pe=(ke.x+1)/2*C,we=(-ke.y+1)/2*z,Fe=_.clone().project(v),Ce=(Fe.x+1)/2*C,Ze=(-Fe.y+1)/2*z,te=Math.sqrt(Math.pow(Ce-Pe,2)+Math.pow(Ze-we,2));let ye=te,ze=50;const pe=c({x:~~Pe,y:~~we},{x:~~Ce,y:~~Ze},C,z);if(pe&&pe.length===1&&(R===Q?(ye=Math.sqrt(Math.pow(pe[0].x-Pe,2)+Math.pow(pe[0].y-we,2)),ze=ye/te*50):R===_&&(ye=Math.sqrt(Math.pow(pe[0].x-Ce,2)+Math.pow(pe[0].y-Ze,2)),ze=100-ye/te*50)),pe&&pe.length===2){const re={x:(pe[0].x+pe[1].x)/2,y:(pe[0].y+pe[1].y)/2};ze=Math.sqrt(Math.pow(re.x-Pe,2)+Math.pow(re.y-we,2))/te*100}const rt=(Math.PI/2-Math.atan2(Ce-Pe,we-Ze))/Math.PI*180,xe=Y.querySelector(".PanoRulerPlugin-rule-label"),it=xe.children[0].clientWidth;it>=te||it/2>=ze/100*te||it/2>=(1-ze/100)*te?Y.style.display="none":(Y.style.display="block",Y.style.width=te+"px",Y.style.left=Pe+"px",Y.style.top=we+"px",Y.style.transform=`rotate(${-rt}deg)`,xe.style.left=`${ze}%`)}},h=()=>$c(d),f=()=>{var p,g;return e.loaded?(e.enable||(s.setAttribute("class","PanoRulerPlugin"+(e.options.className?" "+e.options.className:"")),(g=(p=n.getElement())==null?void 0:p.parentElement)==null||g.append(s),d(),n.on("modeChange",d),n.on("cameraUpdate",h),e.enable=!0),!0):!1},m=()=>(e.enable&&(n.off("modeChange",d),n.off("cameraUpdate",h),s&&s.remove(),e.enable=!1),!0);function A(p){if(p.distanceText&&p.distanceText!==e.options.distanceText){const g=p.distanceText;e.options.distanceText=g,Object.values(r).forEach(v=>{v.rules.forEach(y=>{const[P,I]=y.rule,E=P.distanceTo(I),C=y.$element.querySelector(".PanoRulerPlugin-rule-label-name");C&&(C.innerText=g(E))})})}}return{enable:f,disable:m,load:l,state:e,changeConfigs:A}};function lv(n){me(n,"svelte-1h27ktp",".PanoRulerPlugin-rule-line.svelte-1h27ktp.svelte-1h27ktp{position:absolute;transform-origin:left 0.0625rem;width:0;height:0.125rem;pointer-events:none}.PanoRulerPlugin-rule-line.svelte-1h27ktp.svelte-1h27ktp::after{content:'';position:absolute;left:-0.125rem;top:-0.1rem;width:0.25rem;height:0.25rem;border-radius:50%;background:#fff;z-index:1;animation:svelte-1h27ktp-viewport-rule-point 0.1s 1s;animation-fill-mode:both}.PanoRulerPlugin-rule-line.svelte-1h27ktp.svelte-1h27ktp::before{content:'';position:absolute;right:-0.125rem;top:-0.1rem;width:0.25rem;height:0.25rem;border-radius:50%;background:#fff;z-index:1;animation:svelte-1h27ktp-viewport-rule-point 0.1s 1.5s;animation-fill-mode:both}.PanoRulerPlugin-rule-line.svelte-1h27ktp em.svelte-1h27ktp{display:block;height:0.0625rem;animation:svelte-1h27ktp-viewport-rule-line 0.5s ease 1s;animation-fill-mode:both;box-shadow:0 0 0.25rem rgb(0 0 0 / 40%);position:relative}.rule-mixed-line.svelte-1h27ktp.svelte-1h27ktp{display:flex;height:0.0625rem;animation:svelte-1h27ktp-viewport-rule-line 0.5s ease 1s;animation-fill-mode:both;align-items:center}.em-solid.svelte-1h27ktp.svelte-1h27ktp{height:100%;background:#ffffff}.em-dotted.svelte-1h27ktp.svelte-1h27ktp{height:0.125rem;background:var(--background-image);background-position:center;background-repeat:repeat}.PanoRulerPlugin-rule-label.svelte-1h27ktp.svelte-1h27ktp{position:absolute;width:0;height:0;top:0.0625rem;pointer-events:none}.PanoRulerPlugin-rule-label-name.svelte-1h27ktp.svelte-1h27ktp{position:absolute;padding:0.1875rem 0.375rem;background:rgba(195, 195, 195, 0.3);backdrop-filter:blur(0.25rem);-webkit-backdrop-filter:blur(0.25rem);border-radius:6.25rem;border:0.0625rem solid rgba(255, 255, 255, 0.6);white-space:nowrap;overflow:hidden;color:#ffffff;font-weight:500;font-size:0.75rem;line-height:1;animation:svelte-1h27ktp-viewport-rule-label 0.25s ease 1s;animation-fill-mode:both;box-shadow:inset 0 0 0.625rem 0 rgba(255, 255, 255, 0.3)}@keyframes svelte-1h27ktp-viewport-rule-line{0%{width:0%}100%{width:100%}}@keyframes svelte-1h27ktp-viewport-rule-label{0%{opacity:0;transform:scaleX(0)}100%{opacity:1;transform:translate(-50%, -50%) scaleX(1)}}@keyframes svelte-1h27ktp-viewport-rule-point{0%{transform:scaleX(0)}100%{transform:scaleX(1)}}")}function ed(n,t,e){const i=n.slice();return i[6]=t[e],i}function cv(n){let t,e=n[0].children,i=[];for(let s=0;s<e.length;s+=1)i[s]=td(ed(n,e,s));return{c(){t=x("div");for(let s=0;s<i.length;s+=1)i[s].c();w(t,"class","rule-mixed-line svelte-1h27ktp")},m(s,o){O(s,t,o);for(let r=0;r<i.length;r+=1)i[r]&&i[r].m(t,null)},p(s,o){if(o&9){e=s[0].children;let r;for(r=0;r<e.length;r+=1){const a=ed(s,e,r);i[r]?i[r].p(a,o):(i[r]=td(a),i[r].c(),i[r].m(t,null))}for(;r<i.length;r+=1)i[r].d(1);i.length=e.length}},d(s){s&&j(t),Ot(i,s)}}}function dv(n){let t,e;return{c(){t=x("em"),w(t,"class",e=Ge(n[0].state?"em-solid":"em-dotted")+" svelte-1h27ktp"),w(t,"style",n[3])},m(i,s){O(i,t,s)},p(i,s){s&1&&e!==(e=Ge(i[0].state?"em-solid":"em-dotted")+" svelte-1h27ktp")&&w(t,"class",e),s&8&&w(t,"style",i[3])},d(i){i&&j(t)}}}function td(n){let t,e,i=`${n[6].width}px`;return{c(){t=x("div"),w(t,"class",e=Ge(n[6].state?"em-solid":"em-dotted")+" svelte-1h27ktp"),w(t,"style",n[3]),S(t,"width",i)},m(s,o){O(s,t,o)},p(s,o){o&1&&e!==(e=Ge(s[6].state?"em-solid":"em-dotted")+" svelte-1h27ktp")&&w(t,"class",e),o&8&&w(t,"style",s[3]),(o&8||o&9&&i!==(i=`${s[6].width}px`))&&S(t,"width",i)},d(s){s&&j(t)}}}function hv(n){let t,e,i,s,o=n[0].labelElement+"",r,a,l=`${n[0].labelOffset}%`,c=`${n[0].width}px`,d=`${n[0].left}px`,h=`${n[0].top}px`,f=`rotate(${n[0].rotateDeg}deg)`;function m(g,v){return g[0].children.length===0?dv:cv}let A=m(n),p=A(n);return{c(){t=x("div"),p.c(),e=K(),i=x("div"),s=x("div"),r=De(o),w(s,"class","PanoRulerPlugin-rule-label-name svelte-1h27ktp"),We(()=>n[4].call(s)),w(i,"class","PanoRulerPlugin-rule-label svelte-1h27ktp"),S(i,"left",l),w(t,"class","PanoRulerPlugin-rule-line svelte-1h27ktp"),S(t,"width",c),S(t,"left",d),S(t,"top",h),S(t,"transform",f),S(t,"display",n[0].visible&&n[2]?"block":"none")},m(g,v){O(g,t,v),p.m(t,null),L(t,e),L(t,i),L(i,s),L(s,r),a=or(s,n[4].bind(s))},p(g,[v]){A===(A=m(g))&&p?p.p(g,v):(p.d(1),p=A(g),p&&(p.c(),p.m(t,e))),v&1&&o!==(o=g[0].labelElement+"")&&Se(r,o),v&1&&l!==(l=`${g[0].labelOffset}%`)&&S(i,"left",l),v&1&&c!==(c=`${g[0].width}px`)&&S(t,"width",c),v&1&&d!==(d=`${g[0].left}px`)&&S(t,"left",d),v&1&&h!==(h=`${g[0].top}px`)&&S(t,"top",h),v&1&&f!==(f=`rotate(${g[0].rotateDeg}deg)`)&&S(t,"transform",f),v&5&&S(t,"display",g[0].visible&&g[2]?"block":"none")},i:J,o:J,d(g){g&&j(t),p.d(),a()}}}function uv(n,t,e){let i,{rulerItemProp:s}=t,o=!0,r,a="data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQiIHdpZHRoPSIxMiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PGRlZnM+PGZpbHRlciBpZD0icHJlZml4X19hIiBoZWlnaHQ9IjQwMCUiIHdpZHRoPSIxMzcuNCUiIHg9Ii0xOC43JSIgeT0iLTE1MCUiPjxmZU1vcnBob2xvZ3kgaW49IlNvdXJjZUFscGhhIiBvcGVyYXRvcj0iZGlsYXRlIiByYWRpdXM9Ii41IiByZXN1bHQ9InNoYWRvd1NwcmVhZE91dGVyMSIvPjxmZU9mZnNldCBpbj0ic2hhZG93U3ByZWFkT3V0ZXIxIiByZXN1bHQ9InNoYWRvd09mZnNldE91dGVyMSIvPjxmZU1vcnBob2xvZ3kgaW49IlNvdXJjZUFscGhhIiByYWRpdXM9IjEiIHJlc3VsdD0ic2hhZG93SW5uZXIiLz48ZmVPZmZzZXQgaW49InNoYWRvd0lubmVyIiByZXN1bHQ9InNoYWRvd0lubmVyIi8+PGZlQ29tcG9zaXRlIGluPSJzaGFkb3dPZmZzZXRPdXRlcjEiIGluMj0ic2hhZG93SW5uZXIiIG9wZXJhdG9yPSJvdXQiIHJlc3VsdD0ic2hhZG93T2Zmc2V0T3V0ZXIxIi8+PGZlR2F1c3NpYW5CbHVyIGluPSJzaGFkb3dPZmZzZXRPdXRlcjEiIHJlc3VsdD0ic2hhZG93Qmx1ck91dGVyMSIgc3RkRGV2aWF0aW9uPSIuNSIvPjxmZUNvbG9yTWF0cml4IGluPSJzaGFkb3dCbHVyT3V0ZXIxIiB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAuMiAwIi8+PC9maWx0ZXI+PHBhdGggaWQ9InByZWZpeF9fYiIgZD0iTS44ODkgMkgxMS41OCIvPjwvZGVmcz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZS1kYXNoYXJyYXk9IjUgNiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48dXNlIGZpbGw9IiMwMDAiIGZpbHRlcj0idXJsKCNwcmVmaXhfX2EpIiB4bGluazpocmVmPSIjcHJlZml4X19iIi8+PHVzZSBzdHJva2U9IiNmZmYiIHN0cm9rZS1vcGFjaXR5PSIuNCIgeGxpbms6aHJlZj0iI3ByZWZpeF9fYiIvPjwvZz48L3N2Zz4=";function l(){r=this.offsetWidth,e(1,r)}return n.$$set=c=>{"rulerItemProp"in c&&e(0,s=c.rulerItemProp)},n.$$.update=()=>{n.$$.dirty&3&&(r>=s.width||r/2>=s.labelOffset/100*s.width||r/2>=(1-s.labelOffset/100)*s.width?e(2,o=!1):e(2,o=!0))},e(3,i=`--background-image: url(${a})`),[s,r,o,i,l]}class fv extends ce{constructor(t){super(),le(this,t,uv,hv,ae,{rulerItemProp:0},lv)}}function id(n,t,e){const i=n.slice();return i[12]=t[e],i}function nd(n){let t,e;return t=new fv({props:{rulerItemProp:n[12]}}),{c(){oe(t.$$.fragment)},m(i,s){ne(t,i,s),e=!0},p(i,s){const o={};s&1&&(o.rulerItemProp=i[12]),t.$set(o)},i(i){e||(D(t.$$.fragment,i),e=!0)},o(i){T(t.$$.fragment,i),e=!1},d(i){se(t,i)}}}function mv(n){let t,e,i=n[0],s=[];for(let r=0;r<i.length;r+=1)s[r]=nd(id(n,i,r));const o=r=>T(s[r],1,1,()=>{s[r]=null});return{c(){t=x("div");for(let r=0;r<s.length;r+=1)s[r].c()},m(r,a){O(r,t,a);for(let l=0;l<s.length;l+=1)s[l]&&s[l].m(t,null);e=!0},p(r,[a]){if(a&1){i=r[0];let l;for(l=0;l<i.length;l+=1){const c=id(r,i,l);s[l]?(s[l].p(c,a),D(s[l],1)):(s[l]=nd(c),s[l].c(),D(s[l],1),s[l].m(t,null))}for(he(),l=i.length;l<s.length;l+=1)o(l);ue()}},i(r){if(!e){for(let a=0;a<i.length;a+=1)D(s[a]);e=!0}},o(r){s=s.filter(Boolean);for(let a=0;a<s.length;a+=1)T(s[a]);e=!1},d(r){r&&j(t),Ot(s,r)}}}function gv(n,t,e){var p,g,v,y;let{five:i}=t,{rulerDatas:s}=t,{options:o}=t,r=[];const a=((g=(p=i.getElement())==null?void 0:p.parentElement)==null?void 0:g.clientWidth)||0,l=((y=(v=i.getElement())==null?void 0:v.parentElement)==null?void 0:y.clientHeight)||0,c=(P,I)=>{const E=[[{x:0,y:0},{x:a,y:0}],[{x:0,y:0},{x:0,y:l}],[{x:a,y:0},{x:a,y:l}],[{x:0,y:l},{x:a,y:l}]],C=[];for(let z=0;z<E.length;z++){const R=Kc([P,I],[E[z][0],E[z][1]],!0);R&&C.push(R)}return C.length===0?!1:C},d=(P,I)=>{const E=P.clone().project(i.camera),C=(E.x+1)/2*a,z=(-E.y+1)/2*l,R=I.clone().project(i.camera),U=(R.x+1)/2*a,H=(-R.y+1)/2*l,N=Math.sqrt(Math.pow(U-C,2)+Math.pow(H-z,2));return{startLeft:C,startTop:z,endLeft:U,endTop:H,distance:N}},h=(P,I,E)=>{const C=i.camera.position,z=i.camera.getWorldDirection(new G.Vector3),R=P.clone().sub(C).normalize().angleTo(z),U=I.clone().sub(C).normalize().angleTo(z),H=P.distanceTo(I),F=I.clone().sub(I.clone().sub(P).divide(new G.Vector3(2,2,2))).distanceTo(C),{startLeft:Q,startTop:_,endLeft:Y,endTop:Z,distance:q}=d(P,I),fe=-((Math.PI/2-Math.atan2(Y-Q,_-Z))/Math.PI)*180;let de=!0;E||(de=!1),!ct(P,E)&&!ct(I,E)&&(de=!1),H<.3&&(de=!1),R>Math.PI/2&&(de=!1),U>Math.PI/2&&(de=!1),F/H>8&&(de=!1);let ke=50,Pe=q;const we=c({x:~~Q,y:~~_},{x:~~Y,y:~~Z});if(we&&we.length===1&&(ct(P,E)?(Pe=Math.sqrt(Math.pow(we[0].x-Q,2)+Math.pow(we[0].y-_,2)),ke=Pe/q*50):ct(I,E)&&(Pe=Math.sqrt(Math.pow(we[0].x-Y,2)+Math.pow(we[0].y-Z,2)),ke=100-Pe/q*50)),we&&we.length===2){const Fe={x:(we[0].x+we[1].x)/2,y:(we[0].y+we[1].y)/2};ke=Math.sqrt(Math.pow(Fe.x-Q,2)+Math.pow(Fe.y-_,2))/q*100}return{startLeft:Q,startTop:_,distance:q,deg:fe,visible:de,labelOffset:ke,ruleLength:H}},f=()=>{const P=i.panoIndex,I=s.find(N=>N.panoIndex===P);if(!I)return e(0,r=[]);if(i.currentMode!==Ae.Five.Mode.Panorama)return e(0,r=[]);const E=i.camera.position,C=i.camera.getWorldDirection(new G.Vector3),z=I.lines.map(N=>new G.Vector3(N.start[0],-N.start[1],-N.start[2])),R=I.lines.map(N=>new G.Vector3(N.end[0],-N.end[1],-N.end[2])),[U]=z.concat(R).sort((N,F)=>{const Q=N.clone().setY(0).sub(E).normalize().angleTo(C.clone().setY(0)),_=F.clone().setY(0).sub(E).normalize().angleTo(C.clone().setY(0));return Q-_}),H=I.lines.map(N=>{var Pe,we;const F=N.start,Q=N.end,{startLeft:_,startTop:Y,distance:Z,deg:q,visible:ee,labelOffset:fe,ruleLength:de}=h(new G.Vector3(F[0],-F[1],-F[2]),new G.Vector3(Q[0],-Q[1],-Q[2]),U),ke=[];return N.children&&((Pe=N.children)==null?void 0:Pe.length)>0&&((we=N.children)==null||we.forEach(Fe=>{const Ce=Fe.start,Ze=Fe.end,{distance:te}=d(new G.Vector3(Ce[0],-Ce[1],-Ce[2]),new G.Vector3(Ze[0],-Ze[1],-Ze[2]));ke.push({width:te,state:Fe.state})})),{width:Z,left:_,top:Y,rotateDeg:q,state:N.state,children:ke,labelOffset:fe,visible:ee,labelElement:o.distanceText(de)}});e(0,r=H)},m=()=>js(f),A=Ir(f,80);return gt(()=>{f(),i.on("panoArrived",f),i.on("modeChange",f),i.on("cameraDirectionUpdate",m),i.on("movingToPano",m),i.on("mouseWheel",()=>A()),i.on("pinchGesture",()=>A())}),Mt(()=>{i.off("panoArrived",f),i.off("modeChange",f),i.off("cameraDirectionUpdate",m),i.off("movingToPano",m),i.off("mouseWheel",()=>A()),i.off("pinchGesture",()=>A())}),n.$$set=P=>{"five"in P&&e(1,i=P.five),"rulerDatas"in P&&e(2,s=P.rulerDatas),"options"in P&&e(3,o=P.options)},[r,i,s,o]}class pv extends ce{constructor(t){super(),le(this,t,gv,mv,ae,{five:1,rulerDatas:2,options:3})}}let Av=class{constructor(t,e){u(this,"five");u(this,"container",document.createElement("div"));u(this,"panoRulerProData");u(this,"rulerItems");u(this,"state",{enabled:!1,loaded:!1,options:{className:"",distanceText:t=>`${t.toFixed(1)}m`}});var i,s;this.five=t,this.container.classList.add("panoRulerProPlugin-container"),this.container.setAttribute("style","position: absolute;pointer-events: none;width: 100%;height: 100%;left: 0;top: 0;overflow: hidden;"),e&&(e.data&&this.load(e.data),this.state.options=V(V({},this.state.options),e.options||{}),(i=e.options)!=null&&i.className&&this.container.classList.add((s=e.options)==null?void 0:s.className)),this.five.once("modelLoaded",()=>W(this,null,function*(){var o,r;(r=(o=this.five.getElement())==null?void 0:o.parentNode)==null||r.append(this.container)})),this.five.once("dispose",()=>this.dispose())}load(t){return W(this,null,function*(){if(!this.five.work)return;const e=t.data;if(!e)throw new Error("标尺数据依赖不齐全!");this.panoRulerProData=e,this.state.loaded=!0})}enable(){return this.state.loaded?(this.state.enabled||(this.state.enabled=!0,this.render()),!0):!1}disable(){return this.state.enabled&&(this.state.enabled=!1,this.render()),!0}render(){return W(this,null,function*(){var t;if(this.state.enabled){if(!this.panoRulerProData||!this.container)return;this.rulerItems=new pv({target:this.container,props:{five:this.five,rulerDatas:this.panoRulerProData,options:this.state.options}})}else(t=this.rulerItems)==null||t.$destroy(),this.rulerItems=void 0})}dispose(){var t;this.container&&((t=this.rulerItems)==null||t.$destroy(),this.rulerItems=void 0),this.container.remove()}};const vv=(n,t)=>new Av(n,t),bv="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZIAAABCCAYAAAB9y1BhAAAAAXNSR0IArs4c6QAADh5JREFUeAHtnVuPLDcVhedwC/dACKAICDxEIBQpygNI/Ab+MX8B8YCQEAjxgBAQLsm5Jjkn58r6Sl4jT52qnu4zXd121dqSx67q7ip7eXsv721XzcVFJAgEgSAQBIJAEAgCQeC4CLx48eKbSu+RH/fKuVoQWB8Cn1tfk9KiIHAUBH6tq/xKiTwSBILADgRCJDvAyUebRuAbpfXxSDatBmn8Pgh8YZ8v5TtBYIMIvFCbSZEgEASuQSBEcg1A+XizCDzfbMvT8CBwIAIhkgMBy9c3g0CIZDNdnYbeFIEQyU0RzO/XikCIZK09m3YdHYEQydEhzQVXgkCIZCUdmWYsj0CIZHmMc4c+EchCe5/9llqfAYEQyRlAzy27QCAeSRfdlEq2gECIpIVeSB1aRAAiudVixVKnINAaAiGS1nok9WkFAUJb8Upa6Y3Uo2kEQiRNd08qd0YEQiJnBD+37guBEElf/ZXang6BEMnpsM6dOkcgRNJ5B66x+nrjLmsTX1J6bSJHZ7+o9HklynWaOse1eKcc+XVlvxYFEnlfaThWfb7mcsn5nPRM6WmVU55KfO+J0md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GBCV1dgycE5EZDufs/31+D9r8vJg8BSCFT2kojN3K4vvBQm3E3Zy0WIRICwVRcwSFPbdu194LKt+kEdtT/SIQLS4Tddbenohy4nDwKnQGAPG4rdZALehA09KpGo8bhou9iUbbs0/jMNTscBdRgJAm0hIF1+wzWSrt52OXkQOCUC0kNsNNuHsatz24iHqI709GxLAjcmktJQEwj5WPA+aCiuWB4YHKOT4yYRkF7zUNkg0lueSI4EgbMiIJ1kZyshL9LUOjNEwkT9sXT2pBP1VyaSQiCse9Coqa27LApBIPE+BEKkLwSk32zRHESDkp0zkSDQBALF9uKdYHunnkthwo7tfXQqQjmYSNQImBACIU2xIuGreB8CIdIvAtJzNogMosHI4mYkCDSHgPTUXspU2ItoEIvzEArlxWRvIlGFWTSnsnWF+b1dKAhk8QrrHpEgsDgC0ndi0oNoEBIuiASBZhGQvnqCz/KCJ/jYZtto7DPRoUU2N11LJIXxqNyUC0VFqeCTpRlP94gEgZMhIL0nbDCIdJswQSQINI9AIRRsNRP+KfvOkgNrKEddr5660YUqw3k8EAhkbvsuCztPVSF7JDqMBIF1IKAxcOl5S8eZLEWCQDcIFBtO2Kv2UOr645lAKkex4VeIpLo5jHbls1KD4eYaWIu4R+UeyYLA2RHQWGAADiJ9P9u2StcheRB4VQSkyzgD2PQppwBH4MaEMpBFRSDcqCYQx9ggDphr0QUb3SMSBJpAQGPiciei9P6oYYAmGphKbA4B6TRrJ+j1HKHYzh8cZbpVBowXZ8bgQhzPNJAOvvD4QjkOAj0hUAbdUOVMoHrqudT1OgSk2zgLkAl2n/LYvh9s900kutYV4UIvQiBXMMlBEAgCQWA1CBRCgUjmHAkI5vk+PACR1BcZmGmfH64GzTQkCASBILBhBAqhgEC9rDFGJI7FGJEcB4EgEASCQBAIAkEgCASBIBAEgkAQCAJBIAgEgSAQBIJAEAgCm0fg/x4jQQWGalpFAAAAAElFTkSuQmCC";function yv(){const n=document.createElement("div"),t=document.createElement("i"),e=document.createElement("span");return n.appendChild(t),n.appendChild(e),n.style.position="relative",n.style.width="100%",n.style.display="flex",n.style.flexDirection="column",n.style.alignItems="center",n.style.marginTop=`${150/16}rem`,n.style.opacity="0",n.style.transition="opacity 1000ms linear",t.style.display="block",t.style.width=`${134/16}rem`,t.style.height=`${22/16}rem`,t.style.backgroundSize="100%",t.style.backgroundRepeat="no-repeat",t.style.backgroundImage=`url(${bv})`,e.style.marginTop=`${10/16}rem`,e.style.fontSize=`${16/16}rem`,e.style.color="#fff",e.style.opacity="0.7",e.style.textShadow="0 2px 16px rgb(22 34 83 / 24%)",e.style.fontWeight="bold",{appendTo(i){i.appendChild(n)},dispose(){n.remove()},setRoom(i){e.innerHTML=i.name+" "+Math.floor(i.size/1e6)+"㎡"},show(){n.style.opacity="1"},hide(){n.style.opacity="0"}}}const wv=new k.TextureLoader;function zi(n){return W(this,null,function*(){return new Promise((t,e)=>{wv.load(n,t,void 0,e)}).then(t=>(t.encoding=k.sRGBEncoding,t.minFilter=k.NearestFilter,t.magFilter=k.NearestFilter,t))})}function sd(n){return W(this,null,function*(){return zi(n).then(t=>{const e=n.startsWith("data:")?n.includes("png"):new URL(n,location.href).pathname.toLowerCase().endsWith(".png");return{texture:t,transparent:e}})})}const io={userAction:!0};class Cv extends vi{constructor(e,i){super(e,i);u(this,"state",{visible:!0,enabled:!0,config:{compassImageUrl:this.absoluteUrl("/release/web/v3/north-point-circle.96498e69.png"),entryDoorImageUrl:this.absoluteUrl("/release/web/enterDoor.831b8208.png")}});u(this,"data");u(this,"group",new k.Group);u(this,"roomInfoInstance");u(this,"roomInfoWrapperInstance");u(this,"compassMeshTween");u(this,"compassMesh");u(this,"logoMesh");u(this,"logoMeshTween");u(this,"entryDoorMesh");u(this,"dispose",()=>{var e,i,s,o;this.five.scene.remove(this.group),this.group.remove(...this.group.children),(i=(e=this.compassMesh)==null?void 0:e.material.map)==null||i.dispose(),(o=(s=this.entryDoorMesh)==null?void 0:s.material.map)==null||o.dispose(),this.five.off("dispose",this.dispose),this.five.off("panoArrived",this.onFivePanoArrived),this.five.off("panoWillArrive",this.onFivePanoWillArrive),this.five.off("cameraDirectionUpdate",this.onFiveCameraDirectionUpdate)});u(this,"_addEventListener",()=>{this.five.on("panoArrived",this.onFivePanoArrived),this.five.on("panoWillArrive",this.onFivePanoWillArrive),this.five.on("modeChange",this.onFiveModeChange),this.five.on("cameraDirectionUpdate",this.onFiveCameraDirectionUpdate)});u(this,"_removeEventListener",()=>{this.five.off("panoArrived",this.onFivePanoArrived),this.five.off("panoWillArrive",this.onFivePanoWillArrive),this.five.off("modeChange",this.onFiveModeChange),this.five.off("cameraDirectionUpdate",this.onFiveCameraDirectionUpdate)});u(this,"_enable",()=>{this.five.scene.add(this.group),this.init(),this.onFivePanoArrived(this.five.panoIndex||0),this._addEventListener()});u(this,"_disable",()=>{this._clearCompassIfNeed(),this._clearEntryDoorIfNeed(),this.five.scene.remove(this.group),this._removeEventListener()});u(this,"_toggleVisible",()=>{this.group.visible=this.state.visible,this.five.needsRender=!0});u(this,"_clearCompassIfNeed",()=>{var e;this.compassMesh&&(this.group.remove(this.compassMesh),(e=this.compassMesh.material.map)==null||e.dispose(),this.compassMesh=null)});u(this,"_clearLogoIfNeed",()=>{var e;this.logoMesh&&(this.group.remove(this.logoMesh),(e=this.logoMesh.material.map)==null||e.dispose(),this.logoMesh=null)});u(this,"_clearEntryDoorIfNeed",()=>{var e;this.entryDoorMesh&&(this.group.remove(this.entryDoorMesh),(e=this.entryDoorMesh.material.map)==null||e.dispose(),this.entryDoorMesh=null),this.roomInfoInstance&&(this.roomInfoInstance.dispose(),this.roomInfoInstance=null),this.roomInfoWrapperInstance&&(this.roomInfoWrapperInstance.dispose(),this.roomInfoWrapperInstance=null)});u(this,"onFivePanoWillArrive",e=>{var i,s,o,r;e!==this.five.panoIndex&&((i=this.compassMeshTween)==null||i.dispose(),(s=this.compassMesh)==null||s.material.setValues({opacity:0}),(o=this.logoMeshTween)==null||o.dispose(),(r=this.logoMesh)==null||r.material.setValues({opacity:0}))});u(this,"onFivePanoArrived",e=>{var s,o,r,a,l,c,d,h;const i=(r=(o=(s=this.five.work)==null?void 0:s.observers)==null?void 0:o[e])==null?void 0:r.standingPosition;if(this.compassMesh&&(this.compassMesh.position.copy(i.clone().setY(i.y+.01)),this.compassMesh.material.opacity===0&&((a=this.compassMeshTween)==null||a.dispose(),this.compassMeshTween=tn(1e3).onUpdate(({progress:f})=>{var m;(m=this.compassMesh)==null||m.material.setValues({opacity:f}),this.five.needsRender=!0}).play())),this.logoMesh&&(this.logoMesh.position.copy(i.clone().setY(i.y+.011)),this.logoMesh.material.opacity===0&&((l=this.logoMeshTween)==null||l.dispose(),this.logoMeshTween=tn(1e3).onUpdate(({progress:f})=>{var m;(m=this.logoMesh)==null||m.material.setValues({opacity:f}),this.five.needsRender=!0}).play())),this.entryDoorMesh){const m=new k.Vector3(this.data.entrance.position.x,this.data.entrance.position.y,this.data.entrance.position.z).clone().setY(i.y).sub(i).normalize(),A=i.clone().add(m.clone().multiplyScalar(.7)).setY(i.y+.01);this.entryDoorMesh.rotation.z=new k.Vector3(0,0,-1).angleTo(m),this.entryDoorMesh.position.copy(A),((c=this.data)==null?void 0:c.room_observers[e].room.type)===1?(d=this.entryDoorMesh)==null||d.material.setValues({opacity:1}):(h=this.entryDoorMesh)==null||h.material.setValues({opacity:0})}this.roomInfoInstance&&this.roomInfoWrapperInstance&&(this.roomInfoWrapperInstance.css3DObject.position.copy(i.clone().setY(i.y+.01)),this.roomInfoInstance.setRoom(this.data.room_observers[e].room)),this.five.needsRender=!0});u(this,"onFiveCameraDirectionUpdate",({longitude:e,latitude:i})=>{var s,o;this.roomInfoWrapperInstance&&(this.roomInfoWrapperInstance.css3DObject.rotation.z=e,i>.66&&this.five.getCurrentState().mode==="Panorama"?(s=this.roomInfoInstance)==null||s.show():(o=this.roomInfoInstance)==null||o.hide())});u(this,"onFiveModeChange",(e,i,s,o,r)=>{e!==i&&this.setState({visible:e===Ae.Five.Mode.Panorama},{userAction:r})});this.five.scene.add(this.group),this.five.once("dispose",this.dispose),this.setState({visible:!0,enabled:!0,config:V(V({},this.state.config),i||{})})}enable(e=io){this.setState({enabled:!0},e)}disable(e=io){this.setState({enabled:!1},e)}show(e=io){if(this.state.enabled)return this.setState({visible:!0},e),Promise.resolve()}hide(e=io){if(this.state.enabled)return this.setState({visible:!1},e),Promise.resolve()}setState(e,i={userAction:!0}){var o,r;const s=JSON.parse(JSON.stringify(this.state));this.state={visible:(o=e.visible)!=null?o:s.visible,enabled:(r=e.enabled)!=null?r:s.enabled,config:V(V({},s.config),e.config||{})},this.hooks.emit("stateChange",{state:this.state,prevState:s,userAction:i.userAction}),e.enabled===!0&&(this._enable(),this.hooks.emit("enable",i)),e.enabled===!1&&(this._disable(),this.hooks.emit("disable",i)),e.visible===!1&&(this._toggleVisible(),this.hooks.emit("hide",i)),e.visible===!0&&(this._toggleVisible(),this.hooks.emit("show",i)),e.config&&this.init()}load(e,i,s=!0){return W(this,null,function*(){const o=yield this.formatData(e);JSON.stringify(this.data)!==JSON.stringify(o)&&(this.hooks.emit("dataChange",o,this.data),this.data=V({},o),this.init(),i&&this.setState(i,{userAction:s}),this.hooks.emit("dataLoaded",this.data))})}formatData(e){return e.version&&e.data?Promise.resolve(e.data):Promise.resolve(e)}init(){return W(this,null,function*(){var s,o,r,a;const e=(o=(s=this.data)==null?void 0:s.north_rad)!=null?o:null;this._clearCompassIfNeed(),e!==null&&(this.compassMesh=yield this.loadCompassMesh(),this.compassMesh&&(this.compassMesh.rotateX(-Math.PI/2),this.compassMesh.rotateZ(e-Math.PI/2),this.group.add(this.compassMesh))),this._clearLogoIfNeed(),this.logoMesh=yield this.loadLogoMesh(),this.logoMesh&&(this.logoMesh.rotateX(-Math.PI/2),this.group.add(this.logoMesh));const i=(a=(r=this.data)==null?void 0:r.entrance)!=null?a:null;this._clearEntryDoorIfNeed(),i!==null&&(this.entryDoorMesh=yield this.loadEntryDoorMesh(),this.roomInfoWrapperInstance=this.loadRoomInfo(),this.roomInfoInstance=yv(),this.entryDoorMesh.rotateX(-Math.PI/2),this.roomInfoWrapperInstance&&this.roomInfoInstance.appendTo(this.roomInfoWrapperInstance.container),this.group.add(this.entryDoorMesh)),this.onFivePanoArrived(this.five.panoIndex||0),this.five.needsRender=!0})}loadCompassMesh(){return W(this,null,function*(){const e=this.state.config.compassImageUrl,i=yield zi(e),s=new k.CircleGeometry(.7,32),o=new k.MeshBasicMaterial({map:i,transparent:!0,opacity:0,depthTest:!1}),r=new k.Mesh(s,o);return r.name="pano-compass-mesh",r})}loadLogoMesh(){return W(this,null,function*(){if(!this.state.config.logoURL)return;const e=this.state.config.logoURL,i=yield zi(e);i.minFilter=k.NearestFilter,i.magFilter=k.NearestFilter;const s=new k.PlaneBufferGeometry(.4,.4),o=new k.MeshBasicMaterial({map:i,opacity:0,transparent:!0,depthTest:!1}),r=new k.Mesh(s,o);return r.name="pano-compass-logo-mesh",r})}loadEntryDoorMesh(){return W(this,null,function*(){const e=this.state.config.entryDoorImageUrl,i=yield zi(e),s=new k.PlaneGeometry(.2,.16),o=new k.MeshBasicMaterial({map:i,transparent:!0,opacity:.8,depthTest:!1}),r=new k.Mesh(s,o);return r.name="pano-compass-entry-door",r})}loadRoomInfo(){const e=[new k.Vector3(-.7,0,-.7),new k.Vector3(.7,0,-.7),new k.Vector3(.7,0,.7),new k.Vector3(-.7,0,.7)];return Bs(this.five).create3DDomContainer(e)}}const Iv=(n,t)=>new Cv(n,t),Pv=1,kv=3,Mv=new G.Color(16777215),Ev=new G.Color(6522623),Dv=new G.Color(16777215),xv=new G.Color(6522623),Sv=6,Lv=8,Tv="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgBAMAAACBVGfHAAAAIVBMVEUAAAD////////////////////////////////////////PIev5AAAACnRSTlMAG/Py2baba05un7UgfgAAAHJJREFUKM9joBpgLHVSCRdA4metAoJlCJHmVWBgAeNzroKCCVCBLpjACqgJVjCBxRBT2FbBQQJYQAohsBAsUIUQWA4WiEIILAULeCEEloAFtBACizAEMLRgGIphLabDMJ2O6TlM72MGECIIMQIZIxqoBQCPvpJ/e9FaAAAAAABJRU5ErkJggg==",od=new G.TextureLoader().load(Tv),jv={pointTexture:od,pointSize:Sv,lineWidth:Pv,lineColor:Mv,pointColor:Dv,lineRenderOrder:20,pointsRenderOrder:20},zv={pointTexture:od,pointSize:Lv,lineWidth:kv,lineColor:Ev,pointColor:xv,lineRenderOrder:10,pointsRenderOrder:10};function Ov(n,t,e){var d,h,f,m,A;const i=(d=e==null?void 0:e.lineWidth)!=null?d:2,s=(h=e==null?void 0:e.lineColor)!=null?h:new G.Color(16777215),o=(f=e==null?void 0:e.pointSize)!=null?f:5,r=(m=e==null?void 0:e.lineRenderOrder)!=null?m:10,a=(A=e==null?void 0:e.lineRenderOrder)!=null?A:20,l=new Is.Line(n,t);l.setMaterial({linewidth:i,color:s}),l.line.material.depthTest=!1,l.line.material.transparent=!0,l.line.renderOrder=r,l.points.renderOrder=a;const c=l.points.material;return c.depthTest=!1,c.size=o,e!=null&&e.pointColor&&c.color.set(e.pointColor).convertSRGBToLinear(),e!=null&&e.pointTexture&&(c.map=e.pointTexture),l}function rd(n,t){const[e,i]=n.points,s=t==="light"?zv:jv,o=Ov(e.position,i.position,s);return o.name="normalLine_"+n.id,o}function Oi(n){const{x:t,y:e,z:i}=n;return!(Math.abs(t)>1||Math.abs(e)>1||Math.abs(i)>1)}function no(n){const{z:t}=n;return!(Math.abs(t)>1)}function Bv(n){const t=document.createElement("div");return t.setAttribute("style","backdrop-filter: blur(4px);-webkit-backdrop-filter: blur(4px);-webkit-tap-highlight-color: rgba(0,0,0,0);"),t.style.width="max-content",t.style.padding="3px 6px",t.style.lineHeight="1",t.style.textAlign="center",t.style.transform="translate(-50%, -50%)",t.style.fontSize="14px",t.style.color="#fff",t.style.cursor="pointer",t.style.userSelect="none",n!=null&&n.style&&Object.assign(t.style,n==null?void 0:n.style),t}function Vv(n){const t=document.createElement("div");return n!=null&&n.id&&(t.id=n==null?void 0:n.id),t.classList.add("five-plugin-measure__distance"),t.style.position="absolute",t.style.left="0",t.style.top="0",t.style.width="0",t.style.height="0",t.style.transform="translate(-10px, -10px)",t.style.transformOrigin="left top",n!=null&&n.style&&Object.assign(t.style,n.style),t}class ad{constructor(t){u(this,"ndcPosition");u(this,"contentDom");u(this,"containerDom");u(this,"params");u(this,"canSelected");u(this,"handleClick",t=>{var e,i;(i=(e=this.params).clickCallback)==null||i.call(e,t,this)});this.params=t,this.contentDom=Bv({style:t.contentStyle}),this.containerDom=Vv({style:t.containerStyle}),this.setCanSelect(!0)}setCanSelect(t){this.canSelected=t,this.containerDom.style.pointerEvents=t?"all":"none"}highlight(){this.contentDom.style.border="0.5px solid #95AEFF",this.contentDom.style.background="linear-gradient(90deg, #95AEFF 0%, #6386FF 100%)"}unHighlight(){this.contentDom.style.border="0.5px solid rgba(255,255,255,0.6)",this.contentDom.style.background="rgba(195,195,195,0.70)"}appendTo(t){t.appendChild(this.containerDom),this.containerDom.addEventListener("click",this.handleClick)}remove(){this.contentDom.removeEventListener("click",this.handleClick),this.containerDom.remove()}show(){this.containerDom.style.visibility="visible"}hide(){this.containerDom.style.visibility="hidden"}tempHide(){this.containerDom.style.opacity="0"}tempShow(){this.containerDom.style.opacity="1"}updateDomPosition(t){if(!this.ndcPosition){this.tempHide();return}const e=t.getElement();if(!e)return;const i=e.clientWidth,s=e.clientHeight,o=this.ndcPosition.clone().project(t.camera);if(!no(o)){this.tempHide();return}const r=(o.x+1)/2*i,a=-(o.y-1)/2*s;this.containerDom.style.transform=`translate(${r}px, ${a}px)`,this.tempShow()}}class Rv extends ad{constructor(e){var i;e.contentStyle=ge(V({},e.contentStyle),{background:"rgba(195,195,195,0.70)",border:"0.5px solid rgba(255,255,255,0.6)",borderRadius:"999px"});super(e);u(this,"line");this.line=e.line,(i=this.params.userDistanceItem)!=null&&i.element?this.containerDom.appendChild(this.params.userDistanceItem.element):this.containerDom.appendChild(this.contentDom)}update(e){var z;if(this.line.mesh.visible===!1){this.hide();return}const i=e.getElement();if(!i)return;const s=i.clientWidth,o=i.clientHeight,r=s/2,a=o/2;if(this.line.points.length<2)return;const[l,c]=this.line.points,d=l.position.clone().project(e.camera),h=c.position.clone().project(e.camera),f=di(l.position,c.position).clone().project(e.camera),m=new G.Vector2(d.x*r,d.y*a),A=new G.Vector2(h.x*r,h.y*a),p=m.distanceTo(A);if((()=>!(Math.abs(d.z)>1||Math.abs(h.z)>1||!no(d)&&!no(h)||!no(f)||p===0))()===!1){this.hide();return}const v=(f.x+1)/2*s,y=-(f.y-1)/2*o,I=-(Math.atan((m.y-A.y)/(m.x-A.x))*180)/Math.PI,E=this.containerDom.parentElement&&this.contentDom.clientWidth>p?-20:0;this.containerDom.style.transform=`translate(${v}px, ${y}px) rotate(${I}deg) translateY(${E}px)`,this.show(),(z=this.params.userDistanceItem)==null||z.update({line:this.line,polyline:this.line.getPolyline()});const C=this.getCurrentContent();this.contentDom.innerText=C}getCurrentContent(){var l,c,d,h;if(this.line.points.length<2)return"";const[e,i]=this.line.points,s=e.position.clone().distanceTo(i.position),o=(c=this.line.text)!=null?c:(l=this.line.model.config)==null?void 0:l.defaultText,r=(h=(d=this.line.model.config)==null?void 0:d.getDistanceText)==null?void 0:h.call(d,s),a=o!=null?o:r;return a!=null?a:s.toFixed(2)+"m"}}class ii{constructor(t,e,i){u(this,"id");u(this,"selected",!1);u(this,"text");u(this,"type","line");u(this,"model");u(this,"mesh");u(this,"points");u(this,"lightMesh");u(this,"hook");u(this,"distanceItem");u(this,"polyline");u(this,"visible");var s;if(this.id=et(),this.model=i,t.id===e.id)throw new Error("无效的线段, 一个点无法构成线段");typeof i.config.defaultText=="string"&&(this.text=i.config.defaultText),this.hook=new Ae.Subscribe,this.points=[t,e],this.mesh=rd(this,"normal"),this.lightMesh=rd(this,"light"),this.distanceItem=new Rv({line:this,clickCallback:()=>this.hook.emit("selected",this),userDistanceItem:(s=this.model.config)!=null&&s.userDistanceItemCreator?this.model.config.userDistanceItemCreator():void 0})}hide(){this.visible&&(this.visible=!1,this.mesh.visible=!1,this.distanceItem.hide())}show(){this.visible||(this.visible=!0,this.mesh.visible=!0,this.distanceItem.show())}setPoints(t,e){this.points[0].position.copy(t),this.points[1].position.copy(e),this.mesh.setPoints(t,e)}remove(){this.mesh.parent&&this.mesh.parent.remove(this.mesh),this.distanceItem.remove()}clear(){this.selected=!1,this.polyline=void 0}isEmpty(){return this.points.length===0}getPolyline(){if(this.polyline)return this.polyline;const t=this.model.polylines.find(e=>e.lines.includes(this));if(t)return this.polyline=t,t}findAnotherPoint(t){return this.points.find(({id:e})=>e!==t.id)}setText(t){this.text=t,this.hook.emit("textChanged",t)}toJSON(){return this.toJson()}toJson(){return{id:this.id,points:this.points.map(t=>t.toJson()),text:this.text}}clone(){const t=new ii(this.points[0].clone(),this.points[1].clone(),this.model);return t.text=this.text,t}}class pt{constructor(t){u(this,"id");u(this,"position");u(this,"type","point");if(this.id=et(),this.position=new G.Vector3,Array.isArray(t))this.position.fromArray(t);else if(typeof t=="object"&&t.isVector3)this.position.copy(t);else throw new Error("position must be Vector3 or number[]")}toJson(){return{id:this.id,position:this.position.toArray()}}clone(){return new pt(this.position)}}const so=n=>n.preventDefault();let oo=class{constructor(t){u(this,"model");u(this,"five");u(this,"group");u(this,"config");u(this,"dashed");u(this,"perpendicularDashed");u(this,"disposed",!1);u(this,"isMobile");u(this,"editParams");u(this,"magnifierParams");u(this,"mouseGroup");u(this,"container");u(this,"hook");u(this,"magnifier");u(this,"userDistanceItemCreator");u(this,"getMeasureType");u(this,"updateDistanceUI",()=>{this.dashed.distanceItem.update(this.five),this.model.getAllLines().forEach(t=>t.distanceItem.update(this.five))});u(this,"updateAreaUI",()=>{this.dashed.distanceItem.update(this.five),this.model.getAllAreas().forEach(t=>{t.areaItem.updateArea(this.five),t.polyline.lines.forEach(e=>{e.distanceItem.update(this.five)})})});var i,s;this.five=t.five,this.hook=t.hook,this.model=t.model,this.getMeasureType=t.getMeasureType,this.config=t.config,this.magnifierParams=t.magnifierParams,this.editParams=t.editParams,this.magnifier=t.magnifier,this.container=t.container,this.isMobile=(s=(i=t.openParams)==null?void 0:i.isMobile)!=null?s:!1,this.userDistanceItemCreator=t.userDistanceItemCreator,this.group=t.group,this.mouseGroup=t.mouseGroup,this.dashed=new ii(new pt([0,0,0]),new pt([0,0,0]),this.model),this.dashed.distanceItem.setCanSelect(!1),this.dashed.mesh.setMaterial({dashed:!0,dashScale:100}),this.dashed.mesh.name="dashLine",this.perpendicularDashed=new ii(new pt([0,0,0]),new pt([0,0,0]),this.model),this.perpendicularDashed.distanceItem.setCanSelect(!1),this.perpendicularDashed.mesh.setMaterial({dashed:!0,dashScale:40,color:new G.Color(10218089)}),this.perpendicularDashed.mesh.name="perpendicularDashLine";const e=this.five.getElement();e&&(e.addEventListener("touchstart",so),e.addEventListener("contextmenu",so))}get currentMeasureType(){return this.getMeasureType()}removeLine(t){this.group.remove(t.mesh,t.lightMesh),t.distanceItem.remove(),this.five.needsRender=!0}updateMouseGroup(t,e){if(!t)return this.mouseGroup;if(this.mouseGroup.position.copy(t.point),e)this.mouseGroup.quaternion.copy(e.quaternion);else if(t.face){const s=t.face.normal.clone().multiplyScalar(.05),r=t.point.clone().add(s).clone().add(s);this.mouseGroup.lookAt(r)}return this.mouseGroup}dispose(){this.disposed=!0,this.magnifier.disable(),this.model.getAllLines().forEach(e=>this.removeLine(e)),this.model.areas.forEach(e=>e.remove());const t=this.five.getElement();t&&(t.removeEventListener("touchstart",so),t.removeEventListener("contextmenu",so))}},Bi=class{constructor(t){u(this,"id",et());u(this,"lines",[]);u(this,"visiblePanoIndexes");u(this,"model");u(this,"type","polyline");u(this,"hook",new Ae.Subscribe);this.model=t.model}get points(){const t=new Set;return this.lines.forEach(e=>{t.add(e.points[0]),t.add(e.points[1])}),Array.from(t)}addLine(t){if(this.includes(t)){console.error(new Error("不能重复添加线段"));return}const e=this.getLastPoint(),i=e&&t.findAnotherPoint(e);if(e&&!i){console.error(new Error("传入线段无法与当前折线进行连接"));return}this.lines.push(t),this.hook.emit("lineAdded",t)}removeLine(t){if(this.lines.length===0)return;if(!this.isLastLine(t)){console.error(new Error("传入线段不是当前折线的最后一段"));return}this.lines.pop()&&this.hook.emit("lineRemoved",t)}isLastLine(t){const e=this.getLastLine();return e?t.id===e.id:!1}getLastLine(){return this.lines.slice(-1)[0]}getPointLength(){return this.lines.length+1}clear(){const t=this.lines.slice();this.lines.length=0,t.reduceRight((e,i)=>this.hook.emit("lineRemoved",i),void 0)}overlapWith(t){return t.type==="point"?this.includes(t):t.type==="line"?t.points.some(e=>this.includes(e)):t.type==="polyline"?t.points.some(e=>this.includes(e)):!0}includes(t){return t.type==="point"?this.points.find(({id:e})=>e===t.id)!==void 0:t.type==="line"?this.lines.find(({id:e})=>e===t.id)!==void 0:!1}isEmpty(){return this.lines.length===0}getLastPoint(){return this.points.slice(-1)[0]}toJSON(){return this.toJson()}toJson(){return{id:this.id,lines:this.lines.map(t=>t.toJson()),visiblePanoIndexes:this.visiblePanoIndexes}}getPointByID(t){return this.points.find(({id:e})=>e===t)}fromJson(t){this.clear(),this.id=t.id;const{getPoint:e}=s(),i=t.lines.map(o=>{const[r,a]=o.points,l=e(r),c=e(a);if(!l||!c)throw new Error("线上的点不存在");const d=new ii(l,c,this.model);return d.id=o.id,d.text=o.text,d});this.lines.push(...i),this.visiblePanoIndexes=t.visiblePanoIndexes;function s(){const o=new Map;function r(l){const c=o.get(l.id);if(c)return c;const d=new pt(l.position);return d.id=l.id,o.set(l.id,d),d}function a(){return Array.from(o.values())}return{getPoint:r,getAllPoints:a}}return this}replace(t){this.id=t.id,this.clear(),this.lines.push(...t.lines)}};class ld extends G.Object3D{constructor(){super()}add(...t){if(t.length===0)return this;const e=t.filter(Boolean);return super.add(...e)}remove(...t){if(t.length===0)return this;const e=t.filter(Boolean);return super.remove(...e)}removeFromParent(){const t=this.parent;return t!==null&&t.remove(this),this}}function Qv(n){const t=[...new Set(n)];if(t.length<3)return;t.at(-1).equals(t[0])||t.push(t[0]);const e=t.flatMap(r=>[r.x,r.y,r.z]),i=new k.Float32BufferAttribute(e,3),s=Nn(e,void 0,3),o=new k.BufferGeometry;return o.setAttribute("position",i),o.setIndex(s),o.name="PolygonGeometry",o}const Gv=new k.BufferGeometry;class cd extends ld{constructor(e){super();u(this,"isPolygonMesh",!0);u(this,"geometry",new k.BufferGeometry);u(this,"isBlank",!0);u(this,"points",[]);const i=new k.MeshBasicMaterial({color:4090367,transparent:!0,side:k.DoubleSide,depthTest:!0,opacity:.5}),s=new k.MeshBasicMaterial({color:16777215,transparent:!0,side:k.DoubleSide,depthTest:!1,depthWrite:!1,opacity:.3}),o=new k.Mesh(this.geometry,i),r=new k.Mesh(this.geometry,s);o.renderOrder=1,r.renderOrder=0,e&&this.updatePoints(e),this.add(o,r)}updatePoints(e){this.points=e;const i=Qv(e);i?(this.geometry.copy(i),this.isBlank=!1):(this.geometry.copy(Gv),this.isBlank=!0)}}function Nv(n){const t=_v(n);if(t.length===0)return;let e=0,i=new G.Vector3;for(const[s,o,r]of t){const a=dd(s,o,r),l=Fv(s,o,r,a);e+=a,i.add(l)}return i=i.divideScalar(e),{center:i,area:e}}function dd(n,t,e){return t.clone().sub(n).cross(e.clone().sub(n)).length()/2}function Fv(n,t,e,i){const s=i!=null?i:dd(n,t,e);return di(n,t,e).multiplyScalar(s)}function _v(n){var s;const t=n.getAttribute("position"),e=(s=n.getIndex())==null?void 0:s.array;if(!t||!e)return[];let i=[];for(let o=0;o<e.length;o+=3){const r=e[o],a=e[o+1],l=e[o+2],c=new G.Vector3().fromArray([t.getX(r),t.getY(r),t.getZ(r)]),d=new G.Vector3().fromArray([t.getX(a),t.getY(a),t.getZ(a)]),h=new G.Vector3().fromArray([t.getX(l),t.getY(l),t.getZ(l)]);i.push([c,d,h])}return i}class Hv extends ad{constructor(e){e.containerStyle=ge(V({},e.containerStyle),{zIndex:"1"}),e.contentStyle=ge(V({},e.contentStyle),{background:"#6386FF",borderRadius:"2px"});super(e);u(this,"area");this.area=e.area,this.containerDom.appendChild(this.contentDom)}updateArea(e,i){var l,c;const s=i!=null?i:this.area.polygon.geometry,o=Nv(s);if(!o){this.ndcPosition=null,this.updateDomPosition(e);return}const{area:r,center:a}=o;this.ndcPosition=a,this.updateDomPosition(e),(c=(l=this.area.model)==null?void 0:l.config)!=null&&c.getAreaText?this.contentDom.innerText=this.area.model.config.getAreaText(r):this.updateAreaText(r,{fix:2})}updateAreaText(e,i){const{unit:s="m²",fix:o}=i!=null?i:{};this.contentDom.innerText=`${Sl(o)?e:e.toFixed(o)}${s}`}}class Er{constructor(t,e){u(this,"id",et());u(this,"selected",!1);u(this,"text");u(this,"type","area");u(this,"lightMesh");u(this,"areaItem");u(this,"hook",new Ae.Subscribe);u(this,"model");u(this,"polygon");u(this,"points",[]);u(this,"planeHelper");u(this,"polyline");u(this,"meshContainer");u(this,"domContainer");u(this,"five");u(this,"updateDom",()=>{this.five&&(this.polyline.lines.forEach(t=>t.distanceItem.update(this.five)),this.areaItem.updateDomPosition(this.five))});var i;t&&(this.points=t),this.model=e.model,this.polygon=new cd(t),this.polyline=new Bi({model:e.model}),this.areaItem=new Hv({area:this,clickCallback:(s,o)=>{const r=s.clientX+"px",a=s.clientY+"px";this.hook.emit("selected",this,{left:r,top:a})}}),this.domContainer=e.domContainer||null,this.meshContainer=e.meshContainer||null,this.five=e.five||null,this.areaItem.appendTo(this.domContainer),(i=this.five)==null||i.on("cameraUpdate",this.updateDom)}get isClosed(){var t;return this.points.length>=4&&((t=this.points.at(0))==null?void 0:t.equals(this.points.at(-1)))}addPoints(t){var s;this.points=this.points.concat(t);const e=this.points.at(-2),i=this.points.at(-1);if(e&&i){const o=new ii(new pt(e),new pt(i),this.polyline.model);this.polyline.addLine(o),this.meshContainer.add(o.mesh),this.five&&(o.distanceItem.setCanSelect(!1),o.distanceItem.appendTo(this.domContainer),o.distanceItem.update(this.five))}(s=this.meshContainer)!=null&&s.children.includes(this.polygon)||this.meshContainer.add(this.polygon),this.polygon.updatePoints(this.points),this.areaItem.updateArea(this.five),this.points.length===3?this.planeHelper=new k.Plane().setFromCoplanarPoints(this.points[0],this.points[1],this.points[2]):this.points.length<3&&(this.planeHelper=null)}popPoint(){this.points.pop();const t=this.polyline.lines.pop();t==null||t.remove(),this.polygon.updatePoints(this.points),this.areaItem.updateArea(this.five),this.points.length<3&&(this.planeHelper=null)}complete(){this.points.at(-1).equals(this.points[0])||this.addPoints(this.points[0])}hideArea(){this.polygon.visible=!1,this.areaItem.hide()}showArea(){this.polygon.visible=!0,this.areaItem.show()}projectPoint(t){return t&&(this.planeHelper?this.planeHelper.projectPoint(t,new k.Vector3):t)}remove(){this.polygon.removeFromParent(),this.areaItem.remove(),this.polyline.lines.forEach(t=>t.remove())}dispose(){this.remove(),this.model.areas.splice(this.model.areas.indexOf(this),1),this.planeHelper=null,this.five.off("cameraUpdate",this.updateDom),this.five.needsRender=!0}}function hd(n,t){const e=Array.isArray(t)?t:[t];for(let i=0;i<e.length;i++){const s=e[i],o=n.start,r=n.end,a=s.start,l=s.end;if(Zn(o,a)||Zn(o,l)||Zn(r,a)||Zn(r,l)||Zn(o,r))continue;const c=ro(o,r,a),d=ro(o,r,l),h=ro(a,l,o),f=ro(a,l,r);if(c!==d&&h!==f||c===0&&ao(o,r,a)||d===0&&ao(o,r,l)||h===0&&ao(a,l,o)||f===0&&ao(a,l,r))return!0}return!1}function Zn(n,t){return n.x===t.x&&n.z===t.z&&n.y===t.y}function ro(n,t,e){const i=(e.z-n.z)*(t.x-n.x)-(t.z-n.z)*(e.x-n.x);return i===0?0:i<0?2:1}function ao(n,t,e){return t.x<=Math.max(n.x,e.x)&&t.x>=Math.min(n.x,e.x)&&t.z<=Math.max(n.z,e.z)&&t.z>=Math.min(n.z,e.z)}const ud="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0;function Dr(n){const{x:t,y:e}=n.center,{clientWidth:i,clientHeight:s}=n.target,o=n.target.getBoundingClientRect(),r=new G.Vector2(t,e).sub(new G.Vector2(o.left,o.top)),a=new G.Vector2(r.x/i*2-1,-(r.y/s)*2+1);return{point:r,ndcPoint:a}}function xr(n,t){const e=Dr(t).ndcPoint,i=new G.Raycaster;return i.setFromCamera(e,n.camera),n.model.intersectRaycaster(i)}const wn=()=>!1;class Wv{constructor(t,e){u(this,"hook",new Ae.Subscribe);u(this,"outOfFive",!1);u(this,"five");u(this,"hammer");u(this,"mode");u(this,"pointSelectorHelper");u(this,"enabled",!1);u(this,"pressDown",!1);u(this,"adherePoints",null);u(this,"adherePointsRadius",.1);u(this,"lastFiveHelperVisible");u(this,"select",t=>{t&&this.updatePointSelectorHelperIntersect(t);const e=this.hook.emit("wantsSelect",this.position);return e||(this.pointSelectorHelper.hide(),this.hook.emit("select",this.position)),!e});u(this,"onEnter",()=>{this.pointSelectorHelper.show(),this.outOfFive=!1,this.hook.emit("intersectionUpdate",this.position)});u(this,"onLeave",()=>{this.pointSelectorHelper.hide(),this.outOfFive=!0,this.hook.emit("intersectionUpdate",null)});u(this,"onTap",t=>{const[e]=xr(this.five,t);e!=null&&e.face&&this.select(e)});u(this,"onPan",t=>{if(!this.pressDown)return;const[e]=xr(this.five,t);e!=null&&e.face&&this.intersectionOnModelUpdate(e)});u(this,"onPress",t=>{const[e]=xr(this.five,t);e!=null&&e.face&&(this.pressDown=!0,this.intersectionOnModelUpdate(e))});u(this,"onPanEnd",()=>{this.pressDown&&(this.pressDown=!1,this.select())});u(this,"intersectionOnModelUpdate",t=>{this.pointSelectorHelper.show(),this.updatePointSelectorHelperIntersect(t)});u(this,"updateByMousePosition",t=>{const e=this.five.getElement();if(!e)return;const{top:i,left:s,width:o,height:r}=e.getBoundingClientRect(),{clientX:a,clientY:l}=t,c={x:(a-s)/o,y:1-(l-i)/r};this.updateByNdcPosition(c)});u(this,"updateByNdcPosition",t=>{const e=Il(this.five,t),i=(()=>e?ge(V({},e),{isVirtual:!1}):ge(V({},Yv(this.five,t)),{isVirtual:!0}))();this.updatePointSelectorHelperIntersect(i)});u(this,"updatePointSelectorHelperIntersect",t=>{var s;const e=V({},t);let i=!1;if(((s=this.adherePoints)==null?void 0:s.length)>0&&typeof this.adherePointsRadius=="number"){for(const o of this.adherePoints)if(o.distanceTo(t.point)<this.adherePointsRadius){e.point=o.clone(),i=!0;break}}this.pointSelectorHelper.updateWithIntersect(e,{emitEvent:!1}),this.hook.emit("intersectionUpdate",e,i)});u(this,"onFiveWantsPanGesture",()=>{if(this.pressDown)return!1});u(this,"renderScreenCenter",()=>{this.updateByNdcPosition({x:.5,y:.5})});u(this,"emitIntersectionUpdate",t=>{this.hook.emit("intersectionUpdate",t)});var o,r;this.five=t;const i=(o=e==null?void 0:e.mode)!=null?o:"auto";i==="auto"?this.mode=ud?"fixed":"cursor":this.mode=i;const s={autoFixPCPosition:this.mode==="cursor",initialPosition:this.mode==="fixed"?{left:"35%",top:"20%"}:void 0};this.pointSelectorHelper=new El(t,ge(V({},e==null?void 0:e.pointSelectorHelperParams),{magnifierParams:V(V({},s),(r=e==null?void 0:e.pointSelectorHelperParams)==null?void 0:r.magnifierParams)})),this.pointSelectorHelper.hide()}get position(){return this.outOfFive?null:this.pointSelectorHelper.position}enable(){if(this.enabled)return;this.enabled=!0,this.pointSelectorHelper.enable();const t=this.five.getElement();if(!t)throw new Error("five element not found");this.hammer||(this.hammer=new li(t)),this.mode==="cursor"?(this.five.on("intersectionOnModelUpdate",this.intersectionOnModelUpdate),this.five.on("wantsPanGesture",this.onFiveWantsPanGesture),this.five.on("wantsMoveToPano",wn),this.five.on("wantsChangeMode",wn),this.five.on("wantsTapGesture",wn),t.addEventListener("mousemove",this.updateByMousePosition),t.addEventListener("mouseenter",this.onEnter),t.addEventListener("mouseout",this.onLeave),this.hammer.on("tap",this.onTap),this.hammer.on("pan",this.onPan),this.hammer.on("press",this.onPress),this.hammer.on("panend",this.onPanEnd)):this.mode==="fixed"&&(this.five.on("panGesture",this.renderScreenCenter),this.five.on("interiaPan",this.renderScreenCenter),this.renderScreenCenter(),this.pointSelectorHelper.show()),this.pointSelectorHelper.hooks.on("intersectionUpdate",this.emitIntersectionUpdate),this.lastFiveHelperVisible=this.five.helperVisible,this.five.helperVisible=!1}disable(){if(!this.enabled)return;this.enabled=!1,this.pointSelectorHelper.disable();const t=this.five.getElement();this.five.off("intersectionOnModelUpdate",this.intersectionOnModelUpdate),this.five.off("wantsPanGesture",this.onFiveWantsPanGesture),this.five.off("wantsMoveToPano",wn),this.five.off("wantsChangeMode",wn),this.five.off("wantsTapGesture",wn),this.five.helperVisible=this.lastFiveHelperVisible,t==null||t.removeEventListener("mousemove",this.updateByMousePosition),t==null||t.removeEventListener("mouseenter",this.onEnter),t==null||t.removeEventListener("mouseout",this.onLeave),this.hammer.off("tap",this.onTap),this.hammer.off("pan",this.onPan),this.hammer.off("press",this.onPress),this.hammer.off("panend",this.onPanEnd),this.five.off("panGesture",this.renderScreenCenter),this.five.off("interiaPan",this.renderScreenCenter),this.pointSelectorHelper.hooks.off("intersectionUpdate",this.emitIntersectionUpdate)}dispose(){this.disable(),this.pointSelectorHelper.dispose()}setAdherePoints(t,e){t?this.adherePoints=Array.isArray(t)?t:[t]:this.adherePoints=null,typeof e=="number"&&(this.adherePointsRadius=e)}}function Uv(n,t){const{x:e,y:i}=t,s=e*2-1,o=i*2-1,r=new G.Vector2().fromArray([s,o]),a=new G.Raycaster;return a.setFromCamera(r,n.camera),a}function Yv(n,t){const e=Uv(n,t),i=3,s=new G.Vector3().addVectors(e.ray.origin,e.ray.direction.clone().normalize().multiplyScalar(i)),o=e.ray.direction.clone().negate();return{distance:i,point:s,object:new G.Object3D,face:new G.Face3(0,0,0,o)}}const Xv=`
288
288
  <svg class="fpm__delete-icon" width="16px" height="17px" viewBox="0 0 16 17" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
289
289
  <defs>
290
290
  <linearGradient x1="22.185491%" y1="100%" x2="66.8316686%" y2="6.67239121%" id="linearGradient-1">
@@ -512,7 +512,7 @@ void main() {
512
512
  </div>
513
513
  </div>
514
514
  </div>
515
- `,c0={display:"none",position:"absolute",top:"0",left:"0",width:"100%",height:"100%",opacity:"0",transform:"translate(0, 10px)",transition:"opacity 500ms ease-in-out, transform 500ms ease-in-out"},d0={position:"absolute",left:"50%",bottom:"32px",transform:"translateX(-50%)",height:"89px",display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:"14px",pointerEvents:"all",color:"#fff",zIndex:"10"},h0={position:"absolute",bottom:"0",left:"0",opacity:"0.5",width:"100%",height:"184px",background:"linear-gradient(180deg, rgba(0,0,0,0.00) 0%, #000000 100%)",zIndex:"0"},bd={margin:"0 64px"},u0={opacity:"0.85"},yd={width:"72px",height:"72px",backgroundSize:"100%",cursor:"pointer",transition:"all 200ms ease-in-out"},f0={width:"24px",height:"24px",marginRight:"4px",backgroundSize:"100%",cursor:"pointer"},m0={userSelect:"none",pointerEvents:"none"};class g0{constructor(t,e,i){u(this,"container");u(this,"measureController");u(this,"mainElement");u(this,"_params");u(this,"_btnTexts",{start:"开始",end:"结束",revoke:"撤销",exit:"退出"});u(this,"onMouseEnter",()=>{const{mainItem:t}=this.mainElement;t.style.opacity="1"});u(this,"onMouseLeave",()=>{const{mainItem:t}=this.mainElement;t.style.opacity="0.85"});u(this,"onClick",()=>{this.measureController.getCurrentMode()!=="Edit"?this.measureController.changeMode("Edit"):this.measureController.save().changeMode("Watch")});u(this,"modeChangeHandler",t=>{t==="Edit"?this.change2Done():this.change2Add()});var r,a,l,c;this._params=i,this._btnTexts={start:(r=this._params.startButtonText)!=null?r:this._btnTexts.start,end:(a=this._params.endButtonText)!=null?a:this._btnTexts.end,revoke:(l=this._params.revokeButtonText)!=null?l:this._btnTexts.revoke,exit:(c=this._params.exitButtonText)!=null?c:this._btnTexts.exit},this.measureController=t,this.container=e,this.mainElement=this.getMainElement(),Object.assign(this.mainElement.mainIcon.style,yd),Object.assign(this.mainElement.mainItem.style,bd);const{revokeTextDom:s,exitTextDom:o}=this._getTextElement();s&&(s.innerText=this._btnTexts.revoke),o&&(o.innerText=this._btnTexts.exit),this.change2Add(),this.measureController.hook.on("modeChange",this.modeChangeHandler),this.mainElement.mainItem.addEventListener("click",this.onClick),this.mainElement.mainItem.addEventListener("mouseenter",this.onMouseEnter),this.mainElement.mainItem.addEventListener("mouseleave",this.onMouseLeave)}dispose(){this.measureController.hook.off("modeChange",this.modeChangeHandler),this.mainElement.mainItem.removeEventListener("click",this.onClick),this.mainElement.mainItem.removeEventListener("mouseenter",this.onMouseEnter),this.mainElement.mainItem.removeEventListener("mouseleave",this.onMouseLeave)}getMainElement(){const t=this.container.querySelector(".fpm__main-text"),e=this.container.querySelector(".fpm__main"),i=this.container.querySelector(".fpm__main-icon");if(!e||!t||!i)throw new Error("cannot find dom");return{mainTextDom:t,mainItem:e,mainIcon:i}}_getTextElement(){const t=this.container.querySelector(".fpm__revoke-text"),e=this.container.querySelector(".fpm__exit-text");return{revokeTextDom:t,exitTextDom:e}}change2Add(){const{mainIcon:t,mainTextDom:e}=this.mainElement;if(t.className.includes("fpm__main__start")){e.innerText=this._btnTexts.start;return}t.className.includes("fpm__main__end")&&(t.style.transform="scale(0.8)",e.className.includes("fpm__main-text__show")?e.classList.replace("fpm__main-text__show","fpm__main-text__hide"):e.classList.add("fpm__main-text__hide"),setTimeout(()=>{t.classList.replace("fpm__main__end","fpm__main__start"),t.style.transform="scale(1)",e.innerText=this._btnTexts.start,e.classList.replace("fpm__main-text__hide","fpm__main-text__show")},200))}change2Done(){const{mainTextDom:t,mainIcon:e}=this.getMainElement();t.innerText!==this._btnTexts.end&&(e.className.includes("fpm__main__end")||e.className.includes("fpm__main__start")&&(e.style.transform="scale(0.8)",t.className.includes("fpm__main-text__show")?t.classList.replace("fpm__main-text__show","fpm__main-text__hide"):t.classList.add("fpm__main-text__hide"),setTimeout(()=>{e.classList.replace("fpm__main__start","fpm__main__end"),e.style.transform="scale(1)",t.innerText=this._btnTexts.end,t.classList.replace("fpm__main-text__hide","fpm__main-text__show")},200)))}}class p0{constructor(t,e,i){u(this,"container");u(this,"measureController");u(this,"mainElement");u(this,"_params");u(this,"_btnTexts",{start:"开始",end:"结束"});u(this,"onClick",()=>{var t;this.mainElement.mainTextDom.innerText===((t=this._params.startButtonText)!=null?t:"开始")?(this.measureController.hook.emit("willChangeState","watching","editing"),this.change2Done()):(this.measureController.hook.emit("willChangeState","editing","watching"),this.change2Add())});var s,o;this._params=i,this._btnTexts={start:(s=this._params.startButtonText)!=null?s:this._btnTexts.start,end:(o=this._params.endButtonText)!=null?o:this._btnTexts.end},this.measureController=t,this.container=e,this.mainElement=this.getMainElement(),this.mainElement.mainIcon.setAttribute("style","-webkit-tap-highlight-color: rgba(0,0,0,0);"),Object.assign(this.mainElement.mainIcon.style,yd),Object.assign(this.mainElement.mainItem.style,bd),this.change2Add(),this.mainElement.mainItem.addEventListener("click",this.onClick)}dispose(){this.mainElement.mainItem.removeEventListener("click",this.onClick)}getMainElement(){const t=this.container.querySelector(".fpm__main-text"),e=this.container.querySelector(".fpm__main"),i=this.container.querySelector(".fpm__main-icon");if(!e||!t||!i)throw new Error("cannot find dom");return{mainTextDom:t,mainItem:e,mainIcon:i}}change2Add(){const{mainIcon:t,mainTextDom:e}=this.mainElement;if(t.className.includes("fpm__main__start")){e.innerText=this._btnTexts.start;return}t.className.includes("fpm__main__end")&&(t.style.transform="scale(0.8)",e.className.includes("fpm__main-text__show")?e.classList.replace("fpm__main-text__show","fpm__main-text__hide"):e.classList.add("fpm__main-text__hide"),setTimeout(()=>{t.classList.replace("fpm__main__end","fpm__main__start"),t.style.transform="scale(1)",e.innerText=this._btnTexts.start,e.classList.replace("fpm__main-text__hide","fpm__main-text__show")},200))}change2Done(){const{mainTextDom:t,mainIcon:e}=this.mainElement;t.innerText!==this._btnTexts.end&&(e.className.includes("fpm__main__end")||e.className.includes("fpm__main__start")&&(e.style.transform="scale(0.8)",t.className.includes("fpm__main-text__show")?t.classList.replace("fpm__main-text__show","fpm__main-text__hide"):t.classList.add("fpm__main-text__hide"),setTimeout(()=>{e.classList.replace("fpm__main__start","fpm__main__end"),e.style.transform="scale(1)",t.innerText=this._btnTexts.end,t.classList.replace("fpm__main-text__hide","fpm__main-text__show")},200)))}}class A0{constructor(t,e){u(this,"container");u(this,"revokeIcon");u(this,"revokeItem");u(this,"measureController");u(this,"onClick",()=>{this.measureController.revoke()});u(this,"onModeChange",t=>{if(t!=="Edit"&&this.revokeItem.className.includes("enabled")){this.revokeItem.classList.remove("enabled"),this.measureController.hook.off("anchorChange",this.onAnchorChange);return}this.measureController.hook.on("anchorChange",this.onAnchorChange)});u(this,"onAnchorChange",t=>{t&&this.revokeItem.classList.add("enabled")});this.measureController=t,this.container=e;const i=this.container.querySelector(".fpm__revoke-icon"),s=this.container.querySelector(".fpm__revoke");if(!i||!s)throw new Error("不正确的选择器");this.revokeIcon=i,this.revokeItem=s,this.revokeItem.addEventListener("click",this.onClick),t.hook.on("modeChange",this.onModeChange)}dispose(){this.revokeItem.removeEventListener("click",this.onClick),this.measureController.hook.off("modeChange",this.onModeChange)}}function v0(n){me(n,"svelte-1v1ixi2",'.Switcher.svelte-1v1ixi2.svelte-1v1ixi2{position:relative;box-sizing:border-box;width:-moz-max-content;width:max-content}.Switcher.svelte-1v1ixi2 .content.svelte-1v1ixi2,.Switcher.svelte-1v1ixi2 .active-slider.svelte-1v1ixi2{transition-property:transform, width, opacity;transition-duration:300ms;transition-timing-function:ease-out}.Switcher-bg.svelte-1v1ixi2.svelte-1v1ixi2{content:"";position:absolute;box-sizing:border-box;top:50%;left:0;width:100%;height:3.75rem;transform:translateY(-50%);border-style:solid;border-width:0rem 1.875rem;-o-border-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAsQAAAC0CAMAAACkNspZAAAAyVBMVEUAAAAAAAAICAgUFBQ9PT1OTk4dHR0tLS0kJCRcXFxGRkYzMzNXV1dmZmZiYmJtbW3////////////////////ExMSKiopycnJvb2////////9JSUl5eXn///////////////////////+QkJCZm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kZa8cCWVMmZ8ZNF3wFsBZcE96kNeFSEX49gOE+EaOMFeN5vY3zQzoSxwoyJLecGUYFdOFXAVaCR+khr7fwXAibS6J/xGA8DeLZ8ZTnWRKJY4EslMUywzjzSvMVwCI4SrI8Px1ncTB1E+4fMRjXdTzcPzzmWbppIEOyYGYYMwov/ArgTZrljw/7YV3CHsI9Igbjto7L/cP2cdtAFslCWTQzjA7sCl/xK4C3j/nDvmxL2EO4N8RgLHVcr+Og7uNi/5C/yassTYSyYBbPDAO5Cq/w/dFuHaQwCENBGL6CbZouQ9NETTfdaFFc5P7H6rzZiEgR4W0K7z/DxzApd5/iAfiNDXZ4whzhA8LqiDnH4pi/gpDHWrxfhqnr+z7nlF7oblnohVLKGTS6aVi8L3UkYHkRFHw8wuqI1znmrwBkF9oYhfI81zqUsnjL2rSUMtQ6z8I3xjY4AOaLODHCuohXx/zHAhmSXQjtM6KbZe2K6NmG4OBXAPMHnxSsj3iFLJJBGZaBWXKWtYksHtALvvSrAFgLMWsoGZSli2X9iECu9KsAWBcxa4Qyu1rWLtBljZ7fFbF+jWXtIl39gNiy/rwvGmW4k6mR4W0AAAAASUVORK5CYII=");border-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAsQAAAC0CAMAAACkNspZAAAAyVBMVEUAAAAAAAAICAgUFBQ9PT1OTk4dHR0tLS0kJCRcXFxGRkYzMzNXV1dmZmZiYmJtbW3////////////////////ExMSKiopycnJvb2////////9JSUl5eXn///////////////////////+QkJCZmZn///+tra2kpKS/v7+KioqAgICNjY2dnZ3T09PZ2dnq6uru7u6AgICtra28vLzCwsK1tbXKysqxsbHCwsLKysrCwsK6urrExMStra3ExMSfn5+dnZ26urqLi4vkhTy/AAAAQ3RSTlMzADQ2P0M4OzlIQT1GS0lNBQ4JFyGFWVBOCwdCUhEaFRMeHV1iHG5nelpNQj8pLygkVTR3VXRFcGI5gF80YGlcUk9NBLjkeAAAEPBJREFUeNrs2tfS0zAQhmHROwQcYoojN7kwA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YSyYBbPDAO5Cq/w/dFuHaQwCENBGL6CbZouQ9NETTfdaFFc5P7H6rzZiEgR4W0K7z/DxzApd5/iAfiNDXZ4whzhA8LqiDnH4pi/gpDHWrxfhqnr+z7nlF7oblnohVLKGTS6aVi8L3UkYHkRFHw8wuqI1znmrwBkF9oYhfI81zqUsnjL2rSUMtQ6z8I3xjY4AOaLODHCuohXx/zHAhmSXQjtM6KbZe2K6NmG4OBXAPMHnxSsj3iFLJJBGZaBWXKWtYksHtALvvSrAFgLMWsoGZSli2X9iECu9KsAWBcxa4Qyu1rWLtBljZ7fFbF+jWXtIl39gNiy/rwvGmW4k6mR4W0AAAAASUVORK5CYII=");border-image-slice:0 90 fill}.Switcher-buttons.svelte-1v1ixi2.svelte-1v1ixi2{display:flex;align-items:center;box-sizing:border-box;padding:0 0.1875rem;height:100%}.Switcher-buttons.has-divider.svelte-1v1ixi2 .button.svelte-1v1ixi2:not(:last-child)::after{content:"";position:absolute;right:0;top:10%;height:80%;width:0.0625rem;background-image:linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.3), transparent);background-size:100%;background-repeat:no-repeat;background-position:center}.active-slider.svelte-1v1ixi2.svelte-1v1ixi2{box-sizing:border-box;position:absolute;height:3.25rem;top:50%;transform:translate(0, -50%);border-style:solid;border-width:0rem 1.875rem;-o-border-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAXQAAACcCAMAAABY3aA6AAAAhFBMVEX///////8AAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////88i7DIAAAALHRSTlNmawBvc3d6BAcZDid8NwyFja/XEhYkHTErIS41gpajnUyRVEE7XKpiRczDuH1q6FcAAA1mSURBVHja7Ndtk5owFAXg2KKtiiUdlTdBYH1Z//8vbC4SjkmuDlpmOht7AWfdLyaPZw4ovo06PzydcZX+Eh3QP99gXvsCRkbvsX91s/B29A41/rch9mOjq09twUl6TbNRM/d4aH9rmsWVfkDmx0XX4ORN1HGcZdlWzdLbod2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LwMeWZ+sU7w7gvePDrzQm1kOdswChfsZ8P7RkRf8EYys81+8Qe91Pg90+lX6AR/0YeY+uzgBAAAAAElFTkSuQmCC");border-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAXQAAACcCAMAAABY3aA6AAAAhFBMVEX///////8AAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////88i7DIAAAALHRSTlNmawBvc3d6BAcZDid8NwyFja/XEhYkHTErIS41gpajnUyRVEE7XKpiRczDuH1q6FcAAA1mSURBVHja7Ndtk5owFAXg2KKtiiUdlTdBYH1Z//8vbC4SjkmuDlpmOht7AWfdLyaPZw4ovo06PzydcZX+Eh3QP99gXvsCRkbvsX91s/B29A41/rch9mOjq09twUl6TbNRM/d4aH9rmsWVfkDmx0XX4ORN1HGcZdlWzdLbod2pTcYx8St5Dc/7jIiOjGtw4lbSaZ4nSbJTs/J0aG9qi3meKn+i1/AM+/joWlyBk3eaJ7tj/RlEsiyr/fm3t3PeV2Upo+CzPu6SPFXyBM+4j4oO8k6cwI+nUFbdihopI49HyqbLVSXD05HgO3ejZsZDR5OrkHfiCnxWns9VKaNQzczzCa+vaiJZVudzOVPwnbuKO9RHRidyCnkrLqQCb6I73FNvhtsdyTcKXorWneIO9jHRf1zJ5/F2ma9O0X5fEriXzvfHgi/3++i0ypfbeA72EdF78jS5TKtW/J20efvWvZpekvRJdjH49rneEHld7CsZhhx44Pm48OQuq31RE/tmPfhJRgwzBzlC7mhPA2/hsTXYI+5gH/YgI4aWebZM6qhqil4c4P5ac/o0lntRVlGdLLOhHSMGxnyZH6Y9Od8n3z0fvm069qaaHvLlwLCLQTfQbbr7LEuD3NUOPD9c+1v2qCw/d+n2GvbX0RFzahbd5ZZ4z+190G/xLXfd7apjdNhfQof5PEtXk1K65AB3ZmJfX2bshbP47TDsspys0mwO9RfQ1YPiYh1v80PRFA656327dPui40uczsIxVurhDnYFdci38XqBh8cn0anOqVo+JMXcJg8c7W7V7sq/UNCZ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ez+yn1Vhh33+WyUM0fckKtXd+VLzDH/B3Safe+5aVzqksHdwI+Ifm7AEdfFUsap6+2J+b+how57WcWhtcAd+wHrz9FGXMjDuCoh1+Z9odMxwn5KysJJJO4GfnSzuIpbiVOUyUnIaZYe0Jvsq2A9iYsy1+4CPyb7BWNp8bws1GQdrGrkPaLDvtNbqudmC6coKmX/Dj/IrwBrqoHbqioKZ5G5nt4+d5D3j/6T/atmP4j7+VNSafg8tkOhH8XohYZ2nMu6k09nET9o8q+Q943Olro07oGbTSOn3G6L0smViqMosQc6SRTFSuVOWWy3pRN9ytzAiOuQ18j7RofduO8F/nhOZ7Zyqqosiu1gpyjKqnKUPUvPRwHfG/EGeb/oTXeBF3lNH7iue9SzHujI2vQSA80t3gLeIt4/+md5i7uB370Ive/v9awGO7I63xful50BbzmV94nOAC/yMjs9LwMeWZ+sU7w7gvePDrzQm1kOdswChfsZ8P7RkRf8EYys81+8Qe91Pg90+lX6AR/0YeY+uzgBAAAAAElFTkSuQmCC");border-image-slice:0 90 fill}.button.svelte-1v1ixi2.svelte-1v1ixi2{height:3.5rem;display:flex;position:relative;cursor:pointer;align-items:center;justify-content:center;pointer-events:all;width:7.25rem}.button.svelte-1v1ixi2 .content.svelte-1v1ixi2{position:absolute;display:flex;align-items:center;font-size:1rem;color:#fff;text-shadow:0 0.125rem 0.5rem rgba(0, 0, 0, 0.5);font-weight:bold}.button.svelte-1v1ixi2 .content .icon.svelte-1v1ixi2{display:inline-block;width:1.15625rem;height:1.15625rem;background-repeat:no-repeat;background-size:100%;margin-right:0.125rem}.button.svelte-1v1ixi2:not(.active) .content.svelte-1v1ixi2{opacity:0.65;transform:scale(0.875)}.button.svelte-1v1ixi2:not(.active) .content.svelte-1v1ixi2:hover{opacity:0.85}.button.active.svelte-1v1ixi2 .content.svelte-1v1ixi2{opacity:1;transform:scale(1)}')}function wd(n,t,e){const i=n.slice();return i[13]=t[e],i[14]=t,i[15]=e,i}function Cd(n){let t;return{c(){t=x("div"),w(t,"class","active-slider svelte-1v1ixi2"),S(t,"width",n[6]+"px"),S(t,"transform",`translate(${n[7]}px, -50%)`)},m(e,i){O(e,t,i)},p(e,i){i&64&&S(t,"width",e[6]+"px"),i&128&&S(t,"transform",`translate(${e[7]}px, -50%)`)},d(e){e&&j(t)}}}function Id(n){let t;return{c(){t=x("span"),w(t,"class","icon svelte-1v1ixi2"),S(t,"background-image",`url(${n[13].icon})`)},m(e,i){O(e,t,i)},p(e,i){i&1&&S(t,"background-image",`url(${e[13].icon})`)},d(e){e&&j(t)}}}function Pd(n){let t,e,i,s=n[13].value+"",o,r,a=n[15],l,c,d=n[13].icon&&Id(n);const h=()=>n[10](t,a),f=()=>n[10](null,a);function m(){return n[11](n[13],n[15])}return{c(){t=x("div"),e=x("div"),d&&d.c(),i=K(),o=De(s),r=K(),w(e,"class","content svelte-1v1ixi2"),w(t,"class","button svelte-1v1ixi2"),$(t,"active",n[4]===n[15])},m(A,p){O(A,t,p),L(t,e),d&&d.m(e,null),L(e,i),L(e,o),L(t,r),h(),l||(c=be(t,"click",m),l=!0)},p(A,p){n=A,n[13].icon?d?d.p(n,p):(d=Id(n),d.c(),d.m(e,i)):d&&(d.d(1),d=null),p&1&&s!==(s=n[13].value+"")&&Se(o,s),a!==n[15]&&(f(),a=n[15],h()),p&16&&$(t,"active",n[4]===n[15])},d(A){A&&j(t),d&&d.d(),f(),l=!1,c()}}}function b0(n){let t,e,i,s,o,r=n[5]&&Cd(n),a=n[0],l=[];for(let c=0;c<a.length;c+=1)l[c]=Pd(wd(n,a,c));return{c(){t=x("div"),e=x("div"),i=K(),r&&r.c(),s=K(),o=x("div");for(let c=0;c<l.length;c+=1)l[c].c();w(e,"class","Switcher-bg svelte-1v1ixi2"),w(o,"class","Switcher-buttons svelte-1v1ixi2"),$(o,"has-divider",!n[5]),w(t,"class","Switcher svelte-1v1ixi2")},m(c,d){O(c,t,d),L(t,e),L(t,i),r&&r.m(t,null),L(t,s),L(t,o);for(let h=0;h<l.length;h+=1)l[h]&&l[h].m(o,null);n[12](t)},p(c,[d]){if(c[5]?r?r.p(c,d):(r=Cd(c),r.c(),r.m(t,s)):r&&(r.d(1),r=null),d&23){a=c[0];let h;for(h=0;h<a.length;h+=1){const f=wd(c,a,h);l[h]?l[h].p(f,d):(l[h]=Pd(f),l[h].c(),l[h].m(o,null))}for(;h<l.length;h+=1)l[h].d(1);l.length=a.length}d&32&&$(o,"has-divider",!c[5])},i:J,o:J,d(c){c&&j(t),r&&r.d(),Ot(l,c),n[12](null)}}}function y0(n,t,e){let i;const o=g=>{e(4,d=g)};let{options:r}=t,{onChange:a}=t;const l=[];let c,d=null,h,f;function m(g,v){Ne[g?"unshift":"push"](()=>{l[v]=g,e(2,l)})}const A=(g,v)=>{a(g.key),e(4,d=v)};function p(g){Ne[g?"unshift":"push"](()=>{c=g,e(3,c)})}return n.$$set=g=>{"options"in g&&e(0,r=g.options),"onChange"in g&&e(1,a=g.onChange)},n.$$.update=()=>{n.$$.dirty&20&&e(5,i=l[d]),n.$$.dirty&40&&i&&c&&setTimeout(()=>{e(6,h=i.clientWidth),e(7,f=i.getBoundingClientRect().left-c.getBoundingClientRect().left)},0)},[r,a,l,c,d,i,h,f,null,o,m,A,p]}class w0 extends ce{constructor(t){super(),le(this,t,y0,b0,ae,{defaultIndex:8,setIndex:9,options:0,onChange:1},v0)}get defaultIndex(){return this.$$.ctx[8]}get setIndex(){return this.$$.ctx[9]}}function C0(n){me(n,"svelte-1m0stw",".exit.svelte-1m0stw{position:relative;pointer-events:all;cursor:pointer;left:1.5rem;top:1.5rem;width:1.5rem;height:1.5rem;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAASKADAAQAAAABAAAASAAAAACQMUbvAAAFrklEQVR4Ae2bW8hmUxjH5zOM0zhETSQaR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c25s/6GW4dkDaA5Dd/J6FJZPwTgBPZvnL6UxX+UwSQPoG0kXQyck2yavLKofsXaGdTRWc5WFsUA6TRBGkZzUm7yIjcBHY5kLx3qiqKAtIpkD4knY6sJCMHE22z4K4F0gI/VEsUB6RRIH1MWo4mUYRAopocE9IcdAOQ/N1hFdEJIJ0mSOfRfD85F0hUkEMBy69HrgOS31v3Hp0B0imQfKd+IQpIDjdDUPuhlUCa3dzYdb9TQJoDkj+TuwQJKaqG5taIqlrIyAVbR3tqdA5In0D6nHQZikoSVIChOR2OLaWKvAr2Fr0A0i2QviRdiTYi4TSryTF1KpDGvSJic9noDZC2EqSraXrnPSoCmjeS80d9oPRYr4A0B6RNpOtRQAoo5jjtXKxXAKnzy3/vgDAekG6i6U1lRJx2glL+CuR8IHV6+a8CkESoJN+m3oyikhw2Yi2y7VuS5UDq5H2eB6wGkJMB0mbSrcj38kacYlt6WyrJ/8CyDEhxKsa2IrkqQDoE0jek1Sgg5SCimg5i+1JUPKoDpGMgfUu6A32CYi2iOb0WBbBFVNGhDpaMKgFpOEG6i2ZAiuqJ005QS4DkY0mxqBaQjoH0Hele5DOcQEI0t1bWCUDa04ESUTUgDQPpe5IvIoUUVURzOux7RROSv3dsPaoHpGMg/UB6EPmgG5FXk/dIi4HUup/WdxizbzsnSA+z33gTG2tRHMp7pHnRaSvPGEAaBpI/yXsUCckKMiLb9pGk1ZhRgHQOJH/wsA41K+lXxvwapdXI6be649I7Y73x++ujkC8fvQP3/455/zTEQGAgMBAYCPxfCPwJssZtZ7WkgCEAAAAASUVORK5CYII=);background-repeat:no-repeat;background-size:100% 100%}")}function I0(n){let t,e,i;return{c(){t=x("div"),w(t,"class","exit svelte-1m0stw")},m(s,o){O(s,t,o),e||(i=be(t,"click",function(){Ft(n[0])&&n[0].apply(this,arguments)}),e=!0)},p(s,[o]){n=s},i:J,o:J,d(s){s&&j(t),e=!1,i()}}}function P0(n,t,e){let{onClick:i=null}=t;return n.$$set=s=>{"onClick"in s&&e(0,i=s.onClick)},[i]}class kd extends ce{constructor(t){super(),le(this,t,P0,I0,ae,{onClick:0},C0)}}const Md="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAASKADAAQAAAABAAAASAAAAACQMUbvAAAFfUlEQVR4Ae2aSYgdRRjHMy6473FDc9GDKB68CSqIicspHhQDXgRBQTSJChEUUQ/iVdGLiHgVBAUPUXKZKIKQi3jJYaKIjLiguC9RiWb8/Sb9hfJZ9ex67zmZaeuD/1T117V9v6qu7tc969Y1awQagUagEWgEGoFGoBFoBBqBRqARGAyBpaWlm9Eu9A7aiuYGE9y0gQDjHrQPLXSp+dunbfdI1D9q1p0C4j7afLBrN1bNQY6vn3VfK9HeMbPsBDj30969mTadiJMy/lXvmhkg4Owg2rtXfcSVA5zJJQachzs4Xkol20C5uORKZVadf2pABP0oUd2J/kB/diL5h63Hs22tQZp4RrtAnyBo706/owPoaORlazoKfwmf/f2MvkLCtI6pcM2rAB35SL/nnPW+RT+gT9Tc3Ny4VUuR6WwiQB2cJ+n6NvQr+g0FHMEEpInap37J7Mf+1OdoAe1BH6JFYDkJM7XqAIAjgKfQLegn5GCFkyoAWba6D+rUmCtrL3oD7QGS4GZm1YMH0F30/hByYF4u6YoJMCks8yth++lkHr2O3gOUEze1TQJoJ71eiL5ABi+UUUgep+dWChLdLu9Tz5DOA8m9aiozkFr7kQrWE64bpJus1775ODYNn+nM9wbaLNk5nHgcbWG1n1Uq1Nc/yQq6msZfRK4KQYyzgBNpgLNO5KMNy4Qvyqc+J+UUdALqY9Z9Hr3ESnIrmMiqAdkLM3MRySZ0ssedpavRwbmylEF7686lUSZNc+Ws71iPR2egy9DlXaqvZLb1CNoJJNuotokAVfcy4wpMkFC8lC5Bt6JrUTpBHB42N+870F4gOXFVtiYBRYSAcvyCugZ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uwHJakj0WMHc1ogJRAScDsYWcBLrdowJuCp0BogJOAt3uUQE3hc4AUQEngW73/10BXimhtwVNvIDLq2gxf+wjYzL2QZg7XWsPtvKLCSQ5Wq1FXsCfoK2ulsRxBT2BliLbmGoLqXYfE/EC3koYqwae8WUbU1UgWoutyoM4KyuW2kJ7y2kGu4nF01rcVnpGk9aWTrq8eVbGad5alO2+MvuIZ9XGlLnMl5hJ01HK02ixfzGNICemBAPBQDDwhwx8A43PdoQvgLfYAAAAAElFTkSuQmCC";function k0(n){me(n,"svelte-468fdd",'*.forbid.svelte-468fdd.svelte-468fdd{pointer-events:none !important;opacity:0.5}.Measure-Controller.svelte-468fdd.svelte-468fdd{pointer-events:none;position:relative;width:100%;height:100%;z-index:2}.Measure-Controller.svelte-468fdd .mode-switcher.svelte-468fdd{margin-top:2.25rem}.Measure-Controller.svelte-468fdd .bottom.svelte-468fdd{position:absolute;width:100%;bottom:0}.Measure-Controller.svelte-468fdd .bottom .mask.svelte-468fdd{position:absolute;bottom:0;width:100%;height:11.5rem;background-size:100%;background-image:linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.3))}.Measure-Controller.svelte-468fdd .bottom .center.svelte-468fdd{display:flex;flex-direction:column;align-items:center;margin-bottom:2.5rem}.Measure-Controller.svelte-468fdd .buttons.svelte-468fdd{pointer-events:all;display:flex;align-items:center;height:2.5rem;background:rgba(0, 0, 0, 0.2);color:rgba(255, 255, 255, 0.85);width:-moz-max-content;width:max-content;border-radius:624.9375rem;overflow:hidden}.Measure-Controller.svelte-468fdd .buttons .button.svelte-468fdd{cursor:pointer;display:flex;align-items:center;position:relative;font-size:0.875rem;padding:0rem 1rem}.Measure-Controller.svelte-468fdd .buttons .button .icon.svelte-468fdd{width:1.5rem;height:1.5rem;background-repeat:no-repeat;background-size:100%;margin-right:0.25rem}.Measure-Controller.svelte-468fdd .buttons .button.svelte-468fdd::after{content:"";position:absolute;display:block;right:-0.03125rem;height:1.5rem;width:0.0625rem;background-image:linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.3), transparent);background-size:100%;background-repeat:no-repeat;background-position:center}.Measure-Controller.svelte-468fdd .buttons .button.svelte-468fdd:last-child::after{display:none}')}function Sd(n){let t,e;return t=new kd({props:{onClick:n[0].disable}}),{c(){oe(t.$$.fragment)},m(i,s){ne(t,i,s),e=!0},p(i,s){const o={};s&1&&(o.onClick=i[0].disable),t.$set(o)},i(i){e||(D(t.$$.fragment,i),e=!0)},o(i){T(t.$$.fragment,i),e=!1},d(i){se(t,i)}}}function Ld(n){let t,e,i,s,o=n[2]("撤销")+"",r,a,l,c,d,h=n[2]("结束")+"",f,m,A;return{c(){t=x("div"),e=x("div"),i=x("div"),s=K(),r=De(o),a=K(),l=x("div"),c=x("div"),d=K(),f=De(h),w(i,"class","icon svelte-468fdd"),S(i,"background-image",`url(${Md})`),w(e,"class","button svelte-468fdd"),$(e,"forbid",!n[3]),w(c,"class","icon svelte-468fdd"),S(c,"background-image",`url(${Ed})`),w(l,"class","button svelte-468fdd"),w(t,"class","buttons svelte-468fdd")},m(p,g){O(p,t,g),L(t,e),L(e,i),L(e,s),L(e,r),L(t,a),L(t,l),L(l,c),L(l,d),L(l,f),m||(A=[be(e,"click",n[7]),be(l,"click",n[6])],m=!0)},p(p,g){g&4&&o!==(o=p[2]("撤销")+"")&&Se(r,o),g&8&&$(e,"forbid",!p[3]),g&4&&h!==(h=p[2]("结束")+"")&&Se(f,h)},d(p){p&&j(t),m=!1,Xe(A)}}}function M0(n){let t,e,i,s,o,r,a,l,c,d,h,f=n[1]&&Sd(n),m=n[5]&&Ld(n);function A(g){n[9](g)}let p={options:[{key:"line",value:n[2]("测距离"),icon:Dd},{key:"area",value:n[2]("测面积"),icon:xd}],onChange:n[8]};return n[4]!==void 0&&(p.setIndex=n[4]),c=new w0({props:p}),Ne.push(()=>gr(c,"setIndex",A)),{c(){t=x("div"),f&&f.c(),e=K(),i=x("div"),s=x("div"),o=K(),r=x("div"),m&&m.c(),a=K(),l=x("div"),oe(c.$$.fragment),w(s,"class","mask svelte-468fdd"),w(l,"class","mode-switcher svelte-468fdd"),w(r,"class","center svelte-468fdd"),w(i,"class","bottom svelte-468fdd"),w(t,"class","Measure-Controller svelte-468fdd")},m(g,v){O(g,t,v),f&&f.m(t,null),L(t,e),L(t,i),L(i,s),L(i,o),L(i,r),m&&m.m(r,null),L(r,a),L(r,l),ne(c,l,null),h=!0},p(g,[v]){g[1]?f?(f.p(g,v),v&2&&D(f,1)):(f=Sd(g),f.c(),D(f,1),f.m(t,e)):f&&(he(),T(f,1,1,()=>{f=null}),ue()),g[5]?m?m.p(g,v):(m=Ld(g),m.c(),m.m(r,a)):m&&(m.d(1),m=null);const y={};v&4&&(y.options=[{key:"line",value:g[2]("测距离"),icon:Dd},{key:"area",value:g[2]("测面积"),icon:xd}]),v&1&&(y.onChange=g[8]),!d&&v&16&&(d=!0,y.setIndex=g[4],cr(()=>d=!1)),c.$set(y)},i(g){h||(D(f),D(c.$$.fragment,g),h=!0)},o(g){T(f),T(c.$$.fragment,g),h=!1},d(g){g&&j(t),f&&f.d(),m&&m.d(),se(c)}}}function E0(n,t,e){let{measureController:i}=t,{showExit:s=!1}=t,{i18n:o=g=>g}=t,r=!1,a;function l(g){g==="Edit"?e(5,f=!0):(a(null),e(5,f=!1))}function c(){i.controller instanceof bi&&i.controller.complete(),i.save({mode:"Watch"})}function d(g){e(3,r=g.length>0)}function h(){e(3,r=!1)}gt(()=>{i.hook.on("modeChange",l),i.hook.on("complete",h),i.hook.on("pointsChange",d)}),Mt(()=>{i.hook.off("modeChange",l),i.hook.off("complete",h),i.hook.off("pointsChange",d)});let f=!1;const m=()=>i.revoke(),A=g=>{i.save().changeMode("Edit"),i.changeMeasureType(g)};function p(g){a=g,e(4,a)}return n.$$set=g=>{"measureController"in g&&e(0,i=g.measureController),"showExit"in g&&e(1,s=g.showExit),"i18n"in g&&e(2,o=g.i18n)},[i,s,o,r,a,f,c,m,A,p]}class D0 extends ce{constructor(t){super(),le(this,t,E0,M0,ae,{measureController:0,showExit:1,i18n:2},k0)}}function x0(n){me(n,"svelte-1mfj5mk",'.Switcher.svelte-1mfj5mk.svelte-1mfj5mk{pointer-events:all;position:relative;margin-bottom:1.5rem;box-sizing:border-box;width:-moz-max-content;width:max-content}.Switcher.svelte-1mfj5mk .svelte-1mfj5mk{transition-duration:300ms;transition-timing-function:ease-out}.Switcher.svelte-1mfj5mk .content.svelte-1mfj5mk{transition-property:opacity}.Switcher.svelte-1mfj5mk .highlight.svelte-1mfj5mk{transition-property:width}.Switcher.svelte-1mfj5mk .Switcher-buttons.svelte-1mfj5mk{transition-property:transform}.Switcher.svelte-1mfj5mk .Switcher-buttons.svelte-1mfj5mk{position:absolute;top:50%;left:0;transform:translate(0, -50%);width:-moz-max-content;width:max-content}.Switcher.svelte-1mfj5mk .Switcher-buttons .button.svelte-1mfj5mk{display:inline-block;margin:0 0.5625rem}.Switcher.svelte-1mfj5mk .highlight.svelte-1mfj5mk{height:2rem;background:rgba(0, 0, 0, 0.3);border-radius:624.9375rem}.Switcher.svelte-1mfj5mk .content.svelte-1mfj5mk{position:relative;padding:0 0.75rem}.Switcher.svelte-1mfj5mk .button:not(.active) .content.svelte-1mfj5mk::before{content:"";position:absolute;top:50%;left:10%;width:80%;transform:translateY(-50%);height:0;box-shadow:0 0 0.9375rem 0.3125rem rgba(0, 0, 0, 0.3)}')}function Td(n,t,e){const i=n.slice();return i[13]=t[e],i[14]=t,i[15]=e,i}function jd(n){let t;return{c(){t=x("span"),w(t,"class","icon svelte-1mfj5mk"),S(t,"background-image",n[13].icon)},m(e,i){O(e,t,i)},p(e,i){i&1&&S(t,"background-image",e[13].icon)},d(e){e&&j(t)}}}function zd(n){let t,e,i,s=n[13].value+"",o,r,a=n[15],l,c,d=n[13].icon&&jd(n);const h=()=>n[9](t,a),f=()=>n[9](null,a);function m(){return n[10](n[13],n[15])}return{c(){t=x("div"),e=x("div"),d&&d.c(),i=K(),o=De(s),r=K(),w(e,"class","content svelte-1mfj5mk"),w(t,"class","button svelte-1mfj5mk"),$(t,"active",n[4]===n[15])},m(A,p){O(A,t,p),L(t,e),d&&d.m(e,null),L(e,i),L(e,o),L(t,r),h(),l||(c=be(t,"click",m),l=!0)},p(A,p){n=A,n[13].icon?d?d.p(n,p):(d=jd(n),d.c(),d.m(e,i)):d&&(d.d(1),d=null),p&1&&s!==(s=n[13].value+"")&&Se(o,s),a!==n[15]&&(f(),a=n[15],h()),p&16&&$(t,"active",n[4]===n[15])},d(A){A&&j(t),d&&d.d(),f(),l=!1,c()}}}function S0(n){let t,e,i,s,o=n[0],r=[];for(let a=0;a<o.length;a+=1)r[a]=zd(Td(n,o,a));return{c(){t=x("div"),e=x("div"),i=K(),s=x("div");for(let a=0;a<r.length;a+=1)r[a].c();w(e,"class","highlight svelte-1mfj5mk"),S(e,"width",n[5]?`${n[5]}px`:void 0),w(s,"class","Switcher-buttons svelte-1mfj5mk"),S(s,"transform",`translate(${n[6]}px, -50%)`),w(t,"class","Switcher svelte-1mfj5mk")},m(a,l){O(a,t,l),L(t,e),L(t,i),L(t,s);for(let c=0;c<r.length;c+=1)r[c]&&r[c].m(s,null);n[11](t)},p(a,[l]){if(l&32&&S(e,"width",a[5]?`${a[5]}px`:void 0),l&23){o=a[0];let c;for(c=0;c<o.length;c+=1){const d=Td(a,o,c);r[c]?r[c].p(d,l):(r[c]=zd(d),r[c].c(),r[c].m(s,null))}for(;c<r.length;c+=1)r[c].d(1);r.length=o.length}l&64&&S(s,"transform",`translate(${a[6]}px, -50%)`)},i:J,o:J,d(a){a&&j(t),Ot(r,a),n[11](null)}}}function L0(n,t,e){let i,s,{options:o}=t,{defaultKey:r=null}=t,{onChange:a}=t;const l=[];let c,d,h=0;function f(){if(s&&c){e(5,d=s.clientWidth);const g=h+c.getBoundingClientRect().left-s.getBoundingClientRect().left;e(6,h=g)}}function m(g,v){Ne[g?"unshift":"push"](()=>{l[v]=g,e(2,l)})}const A=(g,v)=>{a(g.key),e(4,i=v)};function p(g){Ne[g?"unshift":"push"](()=>{c=g,e(3,c)})}return n.$$set=g=>{"options"in g&&e(0,o=g.options),"defaultKey"in g&&e(7,r=g.defaultKey),"onChange"in g&&e(1,a=g.onChange)},n.$$.update=()=>{n.$$.dirty&129&&e(4,i=r?o.findIndex(g=>g.key===r):0),n.$$.dirty&20&&e(8,s=l[i]),n.$$.dirty&264&&s&&c&&setTimeout(()=>f(),0)},[o,a,l,c,i,d,h,r,s,m,A,p]}class T0 extends ce{constructor(t){super(),le(this,t,L0,S0,ae,{options:0,defaultKey:7,onChange:1},x0)}}function j0(n){me(n,"svelte-82ysdl",".CircleButton.svelte-82ysdl.svelte-82ysdl{position:relative;display:flex;justify-content:center;align-items:center;width:4.5rem;height:4.5rem;background-image:inherit;background-size:100% auto;background-repeat:no-repeat;transition:transform 200ms ease-in-out}.CircleButton.svelte-82ysdl.svelte-82ysdl:active{transform:scale(0.8)}.CircleButton.svelte-82ysdl .text.svelte-82ysdl{position:absolute}")}function Od(n){let t,e,i,s;return{c(){t=x("div"),e=De(n[0]),w(t,"class","text svelte-82ysdl")},m(o,r){O(o,t,r),L(t,e),s=!0},p(o,r){(!s||r&1)&&Se(e,o[0])},i(o){s||(We(()=>{s&&(i||(i=Ht(t,ot,{duration:300},!0)),i.run(1))}),s=!0)},o(o){i||(i=Ht(t,ot,{duration:300},!1)),i.run(0),s=!1},d(o){o&&j(t),o&&i&&i.end()}}}function z0(n){let t,e=n[0],i,s,o,r=Od(n);return{c(){t=x("div"),r.c(),w(t,"class","CircleButton svelte-82ysdl"),S(t,"background-image",`url(${n[2]})`)},m(a,l){O(a,t,l),r.m(t,null),i=!0,s||(o=be(t,"click",function(){Ft(n[1])&&n[1].apply(this,arguments)}),s=!0)},p(a,[l]){n=a,l&1&&ae(e,e=n[0])?(he(),T(r,1,1,J),ue(),r=Od(n),r.c(),D(r,1),r.m(t,null)):r.p(n,l),l&4&&S(t,"background-image",`url(${n[2]})`)},i(a){i||(D(r),i=!0)},o(a){T(r),i=!1},d(a){a&&j(t),r.d(a),s=!1,o()}}}function O0(n,t,e){let i,{text:s}=t,{onClick:o=null}=t,{color:r="white"}=t;return n.$$set=a=>{"text"in a&&e(0,s=a.text),"onClick"in a&&e(1,o=a.onClick),"color"in a&&e(3,r=a.color)},n.$$.update=()=>{n.$$.dirty&8&&e(2,i=(()=>r==="white"?lo:r==="blue"?jr:lo)())},[s,o,i,r]}class B0 extends ce{constructor(t){super(),le(this,t,O0,z0,ae,{text:0,onClick:1,color:3},j0)}}function V0(n){me(n,"svelte-ldjbp8","*.forbid.svelte-ldjbp8.svelte-ldjbp8{pointer-events:none !important;opacity:0.5}.Measure-Controller.svelte-ldjbp8.svelte-ldjbp8{pointer-events:none;position:relative;width:100%;height:100%;z-index:2;color:white}.Measure-Controller.svelte-ldjbp8 .mode-switcher.svelte-ldjbp8{margin-top:2.25rem}.Measure-Controller.svelte-ldjbp8 .bottom.svelte-ldjbp8{position:absolute;width:100%;bottom:0}.Measure-Controller.svelte-ldjbp8 .bottom .mask.svelte-ldjbp8{position:absolute;bottom:0;width:100%;height:12.5rem;background-size:100%;z-index:-1;background-image:linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.5))}.Measure-Controller.svelte-ldjbp8 .bottom .center.svelte-ldjbp8{display:flex;flex-direction:column;align-items:center;margin-bottom:2.5rem}.Measure-Controller.svelte-ldjbp8 .controller.svelte-ldjbp8{pointer-events:all;display:flex;align-items:center}.Measure-Controller.svelte-ldjbp8 .controller .button.svelte-ldjbp8{cursor:pointer;display:flex;align-items:center;height:2.5rem;padding-left:1rem;padding-right:1rem;border-radius:624.9375rem;font-size:0.875rem;color:#fff;background-color:rgba(0, 0, 0, 0.2)}.Measure-Controller.svelte-ldjbp8 .controller .button .icon.svelte-ldjbp8{width:1.5rem;height:1.5rem;background-repeat:no-repeat;background-size:100%;margin:0 0.25rem}.Measure-Controller.svelte-ldjbp8 .controller .main-button.svelte-ldjbp8{margin-left:1.75rem;margin-right:1.75rem;font-size:0.875rem;font-weight:bold}")}function Bd(n){let t,e;return t=new kd({props:{onClick:n[0].disable}}),{c(){oe(t.$$.fragment)},m(i,s){ne(t,i,s),e=!0},p(i,s){const o={};s&1&&(o.onClick=i[0].disable),t.$set(o)},i(i){e||(D(t.$$.fragment,i),e=!0)},o(i){T(t.$$.fragment,i),e=!1},d(i){se(t,i)}}}function Vd(n){let t,e,i,s;return e=new T0({props:{options:[{key:"line",value:n[2]("测距离")},{key:"area",value:n[2]("测面积")}],defaultKey:n[0].currentMeasureType,onChange:n[0].changeMeasureType}}),{c(){t=x("div"),oe(e.$$.fragment),w(t,"class","mode-switcher svelte-ldjbp8")},m(o,r){O(o,t,r),ne(e,t,null),s=!0},p(o,r){n=o;const a={};r&4&&(a.options=[{key:"line",value:n[2]("测距离")},{key:"area",value:n[2]("测面积")}]),r&1&&(a.defaultKey=n[0].currentMeasureType),r&1&&(a.onChange=n[0].changeMeasureType),e.$set(a)},i(o){s||(D(e.$$.fragment,o),o&&We(()=>{s&&(i||(i=Ht(t,ot,{duration:Cn},!0)),i.run(1))}),s=!0)},o(o){T(e.$$.fragment,o),o&&(i||(i=Ht(t,ot,{duration:Cn},!1)),i.run(0)),s=!1},d(o){o&&j(t),se(e),o&&i&&i.end()}}}function Rd(n){let t,e,i,s=n[2]("撤销")+"",o,r,a,l,c;return{c(){t=x("div"),e=x("div"),i=K(),o=De(s),w(e,"class","icon svelte-ldjbp8"),S(e,"background-image",`url(${Md})`),w(t,"class","button svelte-ldjbp8"),$(t,"forbid",n[3]==="start")},m(d,h){O(d,t,h),L(t,e),L(t,i),L(t,o),a=!0,l||(c=be(t,"click",n[13]),l=!0)},p(d,h){n=d,(!a||h&4)&&s!==(s=n[2]("撤销")+"")&&Se(o,s),(!a||h&8)&&$(t,"forbid",n[3]==="start")},i(d){a||(d&&We(()=>{a&&(r||(r=Ht(t,ot,{duration:Cn},!0)),r.run(1))}),a=!0)},o(d){d&&(r||(r=Ht(t,ot,{duration:Cn},!1)),r.run(0)),a=!1},d(d){d&&j(t),d&&r&&r.end(),l=!1,c()}}}function Qd(n){let t,e,i,s=n[2]("结束")+"",o,r,a,l,c;return{c(){t=x("div"),e=x("div"),i=K(),o=De(s),w(e,"class","icon svelte-ldjbp8"),S(e,"background-image",`url(${Ed})`),w(t,"class","button svelte-ldjbp8")},m(d,h){O(d,t,h),L(t,e),L(t,i),L(t,o),a=!0,l||(c=be(t,"click",n[10]),l=!0)},p(d,h){n=d,(!a||h&4)&&s!==(s=n[2]("结束")+"")&&Se(o,s)},i(d){a||(d&&We(()=>{a&&(r||(r=Ht(t,ot,{duration:Cn},!0)),r.run(1))}),a=!0)},o(d){d&&(r||(r=Ht(t,ot,{duration:Cn},!1)),r.run(0)),a=!1},d(d){d&&j(t),d&&r&&r.end(),l=!1,c()}}}function R0(n){let t,e,i,s,o,r,a,l,c,d,h,f,m,A=n[1]&&Bd(n),p=n[0].allowMeasureType.length>=2&&n[3]==="start"&&Vd(n),g=n[4]&&Rd(n);h=new B0({props:{onClick:n[14],text:n[6][n[3]],color:n[7][n[3]]}});let v=n[4]&&Qd(n);return{c(){t=x("div"),A&&A.c(),e=K(),i=x("div"),s=x("div"),o=K(),r=x("div"),p&&p.c(),a=K(),l=x("div"),g&&g.c(),c=K(),d=x("div"),oe(h.$$.fragment),f=K(),v&&v.c(),w(s,"class","mask svelte-ldjbp8"),w(d,"class","main-button svelte-ldjbp8"),$(d,"forbid",!n[5]),w(l,"class","controller svelte-ldjbp8"),w(r,"class","center svelte-ldjbp8"),w(i,"class","bottom svelte-ldjbp8"),w(t,"class","Measure-Controller svelte-ldjbp8")},m(y,P){O(y,t,P),A&&A.m(t,null),L(t,e),L(t,i),L(i,s),L(i,o),L(i,r),p&&p.m(r,null),L(r,a),L(r,l),g&&g.m(l,null),L(l,c),L(l,d),ne(h,d,null),L(l,f),v&&v.m(l,null),m=!0},p(y,[P]){y[1]?A?(A.p(y,P),P&2&&D(A,1)):(A=Bd(y),A.c(),D(A,1),A.m(t,e)):A&&(he(),T(A,1,1,()=>{A=null}),ue()),y[0].allowMeasureType.length>=2&&y[3]==="start"?p?(p.p(y,P),P&9&&D(p,1)):(p=Vd(y),p.c(),D(p,1),p.m(r,a)):p&&(he(),T(p,1,1,()=>{p=null}),ue()),y[4]?g?(g.p(y,P),P&16&&D(g,1)):(g=Rd(y),g.c(),D(g,1),g.m(l,c)):g&&(he(),T(g,1,1,()=>{g=null}),ue());const I={};P&8&&(I.onClick=y[14]),P&8&&(I.text=y[6][y[3]]),P&8&&(I.color=y[7][y[3]]),h.$set(I),(!m||P&32)&&$(d,"forbid",!y[5]),y[4]?v?(v.p(y,P),P&16&&D(v,1)):(v=Qd(y),v.c(),D(v,1),v.m(l,null)):v&&(he(),T(v,1,1,()=>{v=null}),ue())},i(y){m||(D(A),D(p),D(g),D(h.$$.fragment,y),D(v),m=!0)},o(y){T(A),T(p),T(g),T(h.$$.fragment,y),T(v),m=!1},d(y){y&&j(t),A&&A.d(),p&&p.d(),g&&g.d(),se(h),v&&v.d()}}}const Cn=100;function Q0(n,t,e){let{measureController:i}=t,{showExit:s=!1}=t,{i18n:o=H=>H}=t;const r={start:o("开始"),add:o("添加"),end:o("结束"),complete:o("完成")},a={start:"white",add:"white",end:"blue",complete:"blue"};let l=!1,c=!0,d="start",h=i.currentMeasureType;const f=()=>{i.getCurrentMode()!=="Edit"?i.changeMode("Edit"):(p("add"),m())},m=()=>{i.controller instanceof bi&&i.controller.selectPoint()},A=()=>{i.controller instanceof bi&&i.controller.complete()},p=H=>{e(3,d=H)},g=()=>{m(),E("allow")},v=()=>{p("complete")},y=()=>{i.currentMeasureType==="area"&&d==="complete"&&p("add")},P=H=>{H.length},I=()=>{p("start"),E("allow")},E=H=>{e(5,c=H==="allow")},C=H=>{e(12,h=H)},z=H=>{H.isEmpty&&p("start")};gt(()=>{i.hook.on("revoke",z),i.hook.on("measureTypeChange",C),i.hook.on("modeChange",I),i.hook.on("pointsChange",P),i.hook.on("allowAddPointStateChange",E),i.hook.on("readyComplete",v),i.hook.on("notReadyComplete",y),i.hook.on("complete",I)}),Mt(()=>{i.hook.off("measureTypeChange",C),i.hook.off("modeChange",I),i.hook.off("allowAddPointStateChange",E),i.hook.off("readyComplete",v),i.hook.off("pointsChange",P),i.hook.off("notReadyComplete",y),i.hook.off("complete",I)});const R=()=>i.revoke(),U=()=>{d==="start"?f():d==="add"?m():(d==="end"||d==="complete")&&g()};return n.$$set=H=>{"measureController"in H&&e(0,i=H.measureController),"showExit"in H&&e(1,s=H.showExit),"i18n"in H&&e(2,o=H.i18n)},n.$$.update=()=>{n.$$.dirty&4104&&e(4,l=h==="area"&&d!=="start")},[i,s,o,d,l,c,r,a,f,m,A,g,h,R,U]}class G0 extends ce{constructor(t){super(),le(this,t,Q0,R0,ae,{measureController:0,showExit:1,i18n:2},V0)}}class N0{constructor(t,e){u(this,"revoke");u(this,"container");u(this,"mainController");u(this,"disposers",[]);u(this,"measureController");u(this,"mode");u(this,"svelteDom");u(this,"_params");u(this,"handleExit",()=>{const t=this.container.querySelector(".fpm__exit-icon"),e=this.container.querySelector(".fpm__exit");if(!e||!t)throw new Error("cannot find dom");this.mode==="pc"&&(Object.assign(e.style,u0),Object.assign(t==null?void 0:t.style,f0));const i=()=>{e.style.opacity="1"},s=()=>{e.style.opacity="0.85"},o=()=>{this.measureController.disable()};return e.addEventListener("click",o),e.addEventListener("mouseenter",i),e.addEventListener("mouseleave",s),()=>{e.removeEventListener("click",o),e.removeEventListener("mouseenter",i),e.removeEventListener("mouseleave",s)}});var s,o;this._params=e,this.measureController=t,this.mode=(s=e.mode)!=null?s:"pc",this.container=document.createElement("div"),this.container.innerHTML=this.mode==="mobile"?a0:l0,this.container.classList.add("fpm__ui-controller",this.mode),this.container.style.background="rgba(0, 0, 0, 0.15)";const i=(o=e.useNewUI)!=null?o:!1;if(i&&(e.pointSelectorMode==="cursor"?this.svelteDom=new D0({target:e.container,props:{measureController:this.measureController,i18n:e.i18n,showExit:e.showExit}}):e.pointSelectorMode==="fixed"&&(this.svelteDom=new G0({target:e.container,props:{measureController:this.measureController,i18n:e.i18n,showExit:e.showExit}}))),!i){e.container.appendChild(this.container);const r=this.container.querySelectorAll(".fpm__text"),a=this.container.querySelector(".fpm_ui-bg"),l=this.container.querySelector(".fpm_operating-space");Object.assign(a==null?void 0:a.style,h0),Object.assign(l==null?void 0:l.style,d0),Object.assign(this.container.style,c0),r.forEach(c=>Object.assign(c.style,m0))}}dispose(){var t;this.hide(),(t=this.svelteDom)==null||t.$destroy(),this.container.remove()}show(){return this.container.style.display="block",this.container.style.opacity="1",this.container.style.transform="translate(0, 0)",this.mode==="pc"?(this.revoke=new A0(this.measureController,this.container),this.mainController=new g0(this.measureController,this.container,this._params)):this.mainController=new p0(this.measureController,this.container,this._params),this.disposers.push(this.handleExit()),this}hide(){var t,e;return this.container.style.display="none",this.container.style.opacity="0",this.container.style.transform="translate(0, 10px)",this.mode==="pc"&&((t=this.revoke)==null||t.dispose()),(e=this.mainController)==null||e.dispose(),this.disposers.forEach(i=>i()),this.disposers=[],this}}var Et=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},Ve={},F0={get exports(){return Ve},set exports(n){Ve=n}};function co(n){return n===null?"null":typeof n=="undefined"?"undefined":typeof n=="object"?Array.isArray(n)?"array":"object":typeof n}function Gd(n){return co(n)==="object"?Or(n):co(n)==="array"?zr(n):n}function zr(n){return n.map(Gd)}function Or(n){const t={};for(const e in n)n.hasOwnProperty(e)&&(t[e]=Gd(n[e]));return t}function ho(n,t=[],e={}){const i={arrayBehaviour:e.arrayBehaviour||"replace"},s=t.map(r=>r||{}),o=n||{};for(let r=0;r<s.length;r++){const a=s[r],l=Object.keys(a);for(let c=0;c<l.length;c++){const d=l[c],h=a[d],f=co(h),m=co(o[d]);if(f==="object")if(m!=="undefined"){const A=m==="object"?o[d]:{};o[d]=ho({},[A,Or(h)],i)}else o[d]=Or(h);else if(f==="array")if(m==="array"){const A=zr(h);o[d]=i.arrayBehaviour==="merge"?o[d].concat(A):A}else o[d]=zr(h);else o[d]=h}}return o}F0.exports=function(t,...e){return ho(t,e)},Ve.noMutate=function(...t){return ho({},t)},Ve.withOptions=function(t,e,i){return ho(t,e,i)};function _0(n){me(n,"svelte-1q8gtp4",".Measure-Tips.svelte-1q8gtp4.svelte-1q8gtp4{box-sizing:border-box;position:absolute;pointer-events:none;top:0;width:100%;padding:0 2.5rem}.Measure-Tips.svelte-1q8gtp4 .text.svelte-1q8gtp4{text-align:center;position:relative;max-width:100%;top:3.125rem;color:#fff;word-break:break-all;word-wrap:break-word;text-shadow:0 0.0625rem 0.375rem rgba(0, 0, 0, 0.5);font-size:1.25rem;font-weight:bold}")}function Nd(n){let t,e,i,s,o;return{c(){t=x("div"),e=x("div"),i=De(n[2]),w(e,"class","text svelte-1q8gtp4"),w(t,"class","Measure-Tips svelte-1q8gtp4")},m(r,a){O(r,t,a),L(t,e),L(e,i),n[7](e),o=!0},p(r,a){(!o||a&4)&&Se(i,r[2])},i(r){o||(We(()=>{o&&(s||(s=Ht(t,ot,{},!0)),s.run(1))}),o=!0)},o(r){s||(s=Ht(t,ot,{},!1)),s.run(0),o=!1},d(r){r&&j(t),n[7](null),r&&s&&s.end()}}}function H0(n){let t,e,i=n[0]&&Nd(n);return{c(){i&&i.c(),t=Ie()},m(s,o){i&&i.m(s,o),O(s,t,o),e=!0},p(s,[o]){s[0]?i?(i.p(s,o),o&1&&D(i,1)):(i=Nd(s),i.c(),D(i,1),i.m(t.parentNode,t)):i&&(he(),T(i,1,1,()=>{i=null}),ue())},i(s){e||(D(i),e=!0)},o(s){T(i),e=!1},d(s){i&&i.d(s),s&&j(t)}}}function W0(n,t,e){let{measureController:i}=t,{i18n:s=y=>y}=t,{tips:o}=t,{tipStyle:r={}}=t,{visible:a=!0}=t,l=null;const c=y=>{const P=i.currentMeasureType;let I="";return I=o[y],I===void 0&&(I=o[P][y]),I},d=y=>{e(2,f=s(c(y)))},h=()=>{e(2,f="")};let f="";const m=y=>{y==="Edit"&&i.changeMeasureType?d("start"):h()},A=()=>{i.getCurrentMode()==="Watch"&&h()},p=()=>{i.getCurrentMode()==="Edit"&&d("start")},g=y=>{i.currentMeasureType==="area"&&(y.length>=2?d("close"):y.length===0?d("start"):h())};gt(()=>{m(i.getCurrentMode()),i.hook.on("modeChange",m),i.hook.on("complete",A),i.hook.on("pointsChange",g),i.hook.on("measureTypeChange",p)}),Mt(()=>{i.hook.off("modeChange",m),i.hook.off("complete",A),i.hook.off("pointsChange",g),i.hook.off("measureTypeChange",p),h()});function v(y){Ne[y?"unshift":"push"](()=>{l=y,e(1,l),e(6,r)})}return n.$$set=y=>{"measureController"in y&&e(3,i=y.measureController),"i18n"in y&&e(4,s=y.i18n),"tips"in y&&e(5,o=y.tips),"tipStyle"in y&&e(6,r=y.tipStyle),"visible"in y&&e(0,a=y.visible)},n.$$.update=()=>{if(n.$$.dirty&66&&l)for(const y in r)r.hasOwnProperty(y)&&e(1,l.style[y]=r[y],l)},[a,l,f,i,s,o,r,v]}class U0 extends ce{constructor(t){super(),le(this,t,W0,H0,ae,{measureController:3,i18n:4,tips:5,tipStyle:6,visible:0},_0)}}const Y0={line:{start:"选择一个合适的位置开始测量,点击【结束】或【鼠标右键】结束测量"},area:{start:"选择一个合适的位置开始绘制平面",close:"选择3个点后将闭合平面,点击【结束】或【鼠标右键】将自动闭合"}},X0={line:{start:""},area:{start:"",close:"选择3个点后将闭合平面,点击结束自动闭合"}};class Z0{constructor(t,e){u(this,"tipSvelteDom");this.tipSvelteDom=new U0({target:e.container,props:{measureController:t,tips:Ve({},e.pointSelectorMode==="fixed"?X0:Y0,e.tips),i18n:e.i18n,visible:!0,tipStyle:e.tipStyle}})}dispose(){var t;(t=this.tipSvelteDom)==null||t.$destroy()}show(){var t;return(t=this.tipSvelteDom)==null||t.$set({visible:!0}),this}hide(){var t;return(t=this.tipSvelteDom)==null||t.$set({visible:!1}),this}}class J0{constructor(t,e){u(this,"five");u(this,"measureController");u(this,"onKeyDown",t=>{if(t.metaKey&&t.code==="KeyS"){this.measureController.save().changeMode("Watch"),t.preventDefault();return}if(t.code==="Escape")return this.escape()});u(this,"onMouseDown",t=>{t.button===2&&(t.preventDefault(),this.escape())});this.five=e,this.measureController=t;const i=this.five.getElement();i&&(document.body.addEventListener("keydown",this.onKeyDown),i.addEventListener("mousedown",this.onMouseDown))}dispose(){const t=this.five.getElement();t&&(document.body.removeEventListener("keydown",this.onKeyDown),t.removeEventListener("mousedown",this.onMouseDown))}escape(){return this.measureController.getCurrentMode()==="Watch"?this.measureController.disable():this.measureController.save().changeMode("Watch")}}function qn(n){return typeof n=="object"?n===null?{}:n:{}}class q0{constructor(t,e){u(this,"hasOpen",!1);u(this,"hook",new Ae.Subscribe);u(this,"magnifier");u(this,"controller",null);u(this,"allowMeasureType");u(this,"currentMeasureType");u(this,"five");u(this,"model");u(this,"group");u(this,"config");u(this,"isMobile");u(this,"useUIController");u(this,"params");u(this,"useGuideController");u(this,"container",document.createElement("div"));u(this,"shortcutKeyController");u(this,"disable",()=>{var t,e,i,s;this.hasOpen=!1,this.container.style.opacity="0",(t=this.controller)==null||t.dispose(),(e=this.useUIController)==null||e.hide(),(i=this.useGuideController)==null||i.hide(),(s=this.shortcutKeyController)==null||s.dispose(),this.controller=null,this.five.helperVisible=!0,this.five.scene.remove(this.group),this.five.needsRender=!0,this.hook.emit("disable",!0)});u(this,"getCurrentMode",()=>this.controller instanceof bi?"Edit":this.controller instanceof Ad?"Watch":this.controller instanceof Jn?"Mixed":this.controller instanceof gd?"View":null);u(this,"changeMode",t=>{var s;if(!this.hasOpen||this.getCurrentMode()===t)return;(s=this.controller)==null||s.dispose();const e={View:gd,Watch:Ad,Edit:bi,Mixed:Jn};if(!e[t])throw new Error("不存在的 Mode");const i=this.createControllerParams();this.controller=new e[t](i),this.hook.emit("modeChange",t)});u(this,"changeMeasureType",t=>{this.currentMeasureType=t,this.hook.emit("measureTypeChange",t)});var o,r,a,l,c,d,h,f,m;this.five=t,this.params=e,this.config=bn(e,["openParams","magnifierParams"]),this.model=new Tr(this.config),this.isMobile=(r=(o=e==null?void 0:e.openParams)==null?void 0:o.isMobile)!=null?r:!1,this.magnifier=new Zo(t,(a=e.magnifierParams)!=null?a:{width:190,height:190,scale:2}),this.allowMeasureType=Array.from(new Set((c=(l=e.editParams)==null?void 0:l.allowMeasureType)!=null?c:["line"])),this.currentMeasureType=(d=this.allowMeasureType[0])!=null?d:"line",this.group=new G.Group,this.group.name="plugin-measure-group",this.container.classList.add("five-plugin-measure-container"),this.container.style.position="absolute",this.container.style.left="0",this.container.style.top="0",this.container.style.pointerEvents="none",this.container.style.width="100%",this.container.style.height="100%",this.container.style.opacity="0";const i=(f=(h=e.editParams)==null?void 0:h.pointSelectorMode)!=null?f:ud?"fixed":"cursor",s=(m=this.params.openParams)!=null?m:{};if(this.params.useUIController!==!1){const A=V({container:this.container,openParams:s,i18n:e.i18n,pointSelectorMode:i,useNewUI:this.allowMeasureType.length>1},qn(this.params.useUIController));this.useUIController=new N0(this,A)}if(this.params.useGuideController!==!1){const A=V({container:this.container,pointSelectorMode:i,i18n:e.i18n},qn(this.params.useGuideController));this.useGuideController=new Z0(this,A)}}appendTo(t){t.append(this.container)}clear(){this.model.clear()}dispose(){var t,e;this.disable(),this.clear(),(t=this.useUIController)==null||t.dispose(),(e=this.magnifier)==null||e.dispose(),this.five.needsRender=!0}load(t){this.model.parse(t),this.save()}enable(t){var e;this.hasOpen||(this.hasOpen=!0,this.five.scene.add(this.group),this.container.style.opacity="1",t!=null&&t.mode?this.changeMode(t.mode):this.isMobile?this.changeMode("Mixed"):this.changeMode("Watch"),(e=this.useUIController)==null||e.show(),this.shortcutKeyController=new J0(this,this.five),this.hook.emit("enable",!0))}edit(t){t&&this.changeMeasureType(t);const e=this.isMobile?"Mixed":"Edit";this.changeMode(e)}revoke(){this.controller instanceof bi&&this.controller.revoke()}removePolyline(t){this.model.removePolyline(t)}removeArea(t){this.model.removeArea(t)}removePolylineByID(t){const e=this.model.getPolylineByID(t);e&&this.model.removePolyline(e)}getPolylineByID(t){return this.model.getPolylineByID(t)}getEditedPolyline(){}highlightLine(t){if(this.getCurrentMode()!=="Watch")return!1;const e=this.model.getLineByID(t);return e?(this.controller.highlightLine(e),!0):!1}clearHighlightLines(){return this.getCurrentMode()!=="Watch"?!1:(this.controller.clearHighlightLines(),!0)}save(t){var s;if(!(this.controller instanceof bi)&&!(this.controller instanceof Jn))return this;const e=(s=t==null?void 0:t.mode)!=null?s:"View",i=this.controller.model.areas;return this.controller instanceof bi?this.controller.complete():i.forEach(o=>{o.showArea(),this.model.addArea(o)}),this.changeMode(e),this}addStartPoint(){this.controller instanceof Jn&&this.hook.emit("willChangeState","watching","editing")}addEndPoint(){this.controller instanceof Jn&&this.hook.emit("willChangeState","editing","watching")}toJson(){return this.model.toJson()}changeIsMobile(t){}changeConfigs(t){var e,i;Object.assign(this.config,t),(e=this.controller)==null||e.updateDistanceUI(),(i=this.controller)==null||i.updateAreaUI()}setCustomText(t,e){var s;const i=this.model.getLineByID(t);if(!i)throw new Error("不存在的线段");i.setText(e),(s=this.controller)==null||s.updateDistanceUI()}createControllerParams(){var i,s;const t=(i=this.params.openParams)!=null?i:{},e=(s=this.params.editParams)!=null?s:{};return t.isMobile=this.isMobile,{five:this.five,hook:this.hook,group:this.group,model:this.model,config:this.config,magnifier:this.magnifier,container:this.container,openParams:t,editParams:e,magnifierParams:this.params.magnifierParams,getMeasureType:()=>this.currentMeasureType,mouseGroup:vd(V({},t.crossHairParameter)),userDistanceItemCreator:this.params.userDistanceItemCreator}}}function uo(n,t,e){const i=n[t],s=n[e];i===void 0||s===void 0||(n[t]=s,n[e]=i)}function K0(n,t,e){const i=e/2;for(let s=1;s<=i;s++){const o=e-(s-1);for(let r=1;r<=t;r++){const a=(s-1)*t+r-1,l=(o-1)*t+r-1;uo(n,a*4+0,l*4+0),uo(n,a*4+1,l*4+1),uo(n,a*4+2,l*4+2),uo(n,a*4+3,l*4+3)}}}class $0{constructor(t,e){u(this,"width");u(this,"height");u(this,"containerDom");u(this,"hooks",new Ae.Subscribe);u(this,"canvas",document.createElement("canvas"));u(this,"five");u(this,"scale");u(this,"config");u(this,"offset",{x:0,y:0});u(this,"context");u(this,"renderCenter",new k.Vector3);u(this,"hammer");u(this,"state",{enabled:!1});u(this,"offsetRange");u(this,"isPanning",!1);u(this,"onPanstart",()=>{this.isPanning=!0,this.canvas.style.boxShadow="0 2px 30px 0 rgba(0,0,0,0.20)"});u(this,"onPan",t=>{if(!this.isPanning||!this.offsetRange||this.hooks.emit("wantsPanGesture",t))return;const{translateX:i,translateY:s}=this.getPanOffset(t,this.offsetRange);this.canvas.style.transform=`translate3d(${i}px, ${s}px, 100px)`});u(this,"onPanend",t=>{if(this.isPanning=!1,this.canvas.style.boxShadow="none",!this.offsetRange)return;const{translateX:e,translateY:i}=this.getPanOffset(t,this.offsetRange);this.canvas.style.transform=`translate3d(${e}px, ${i}px, 100px)`,this.offset={x:e,y:i}});var s,o,r;if(!t.renderer)throw new Error("Five Render 未初始化");this.five=t,this.scale=(s=e==null?void 0:e.scale)!=null?s:2,this.width=(o=e==null?void 0:e.width)!=null?o: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 i=this.canvas.getContext("2d");if(!i)throw new Error("CANNOT CREATE CONTEXT2D");this.context=i,this.config.dragEnabled&&(this.hammer=new li(this.canvas),this.hammer.on("pan",this.onPan),this.hammer.on("panstart",this.onPanstart),this.hammer.on("panend",this.onPanend)),this.initStyle()}dispose(){var t;this.clear(),this.disable(),(t=this.hammer)==null||t.destroy()}enable(){if(!this.state.enabled)return this.state.enabled=!0,this.containerDom&&this._appendTo(this.containerDom),this}disable(){if(this.state.enabled)return this.state.enabled=!1,this.canvas.remove(),this}appendTo(t){return this.containerDom=t,this.state.enabled&&this._appendTo(t),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())}renderWithScreenPoint(t){this.containerDom&&this.state.enabled&&(this.renderCenter=t,this.render(),this.config.autoFixPCPosition&&this.autoFixPCPosition())}resetOffset(){this.offset={x:0,y:0},this.canvas.style.transform="translate3d(0px, 0px, 100px)"}getCurrentState(){return{enabled:this.state.enabled}}getRenderCenter(){return this.renderCenter}_appendTo(t){if(this.resetOffset(),t.appendChild(this.canvas),!this.offsetRange){const e=this.canvas.getBoundingClientRect(),i=t.getBoundingClientRect(),s=i.right-e.right,o=i.bottom-e.bottom,r=i.left-e.left,a=i.top-e.top;this.offsetRange={min:{x:r,y:a},max:{x:s,y:o}}}}autoFixPCPosition(){if(!this.containerDom)return;const{width:t,height:e}=this,[i,s,o]=(()=>{if(this.renderCenter instanceof k.Vector3){const r=this.renderCenter.clone().project(this.five.camera);return[(r.x+1)/2*this.containerDom.clientWidth,-(r.x-1)/2*this.containerDom.clientWidth,-(r.y-1)/2*this.containerDom.clientHeight]}else return[this.renderCenter.x,this.containerDom.clientWidth-this.renderCenter.x,this.renderCenter.y]})();i<183?(this.canvas.style.top=-e/2+"px",this.canvas.style.left="90px"):o<183?(this.canvas.style.top="90px",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(${i}px, ${o}px, 10px)`,this.offset={x:i,y:o}}render(){if(!this.five.renderer||!this.containerDom)return;const{scale:t,context:e,width:i,height:s}=this,o=this.five.renderer.getSize(new k.Vector2),[r,a]=(()=>{if(this.renderCenter instanceof k.Vector3){const g=this.renderCenter.clone().project(this.five.camera);return[(g.x+1)/2*o.x,(g.y+1)/2*o.y]}else return[this.renderCenter.x,o.y-this.renderCenter.y]})(),l=1,c=i/t,d=s/t,h=l*t,f=this.five.getPixels(r-c/2,a-c/2,c,d,h),m=Math.floor(i*l),A=Math.floor(s*l);K0(f,m,A);const p=new ImageData(m,A);p.data.set(f),e.putImageData(p,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")}getPanOffset(t,e){const{min:{x:i,y:s},max:{x:o,y:r}}=e,a=this.offset.x+t.deltaX,l=this.offset.y+t.deltaY,c=Math.min(Math.max(a,i),o),d=Math.min(Math.max(l,s),r);return{translateX:c,translateY:d}}}const eb=function(t,e){return new q0(t,e)},Fd=Ar(null);function tb(n){me(n,"svelte-19zi46m",".PanoSpatialTagPlugin__tag-origin.svelte-19zi46m{position:absolute;width:0.5rem;height:0.5rem;border-radius:50%;background:#fff;box-shadow:0 0 .6rem #fff;transform:translate(-50%, -50%) scale(1);transform-origin:center center;animation:svelte-19zi46m-PanoSpatialTagPlugin__tag-origin 1.2s forwards;pointer-events:auto}.PanoSpatialTagPlugin__tag-origin.svelte-19zi46m:after{content:'';position:absolute;top:50%;height:50%;width:2rem;height:2rem;transform:translate(-50%, -50%)}.PanoSpatialTagPlugin__tag-origin-destroy.svelte-19zi46m{transform:translate(-50%, -50%) scale(0.6);animation:svelte-19zi46m-PanoSpatialTagPlugin__tag-origin-destroy 1.2s forwards .7s}@keyframes svelte-19zi46m-PanoSpatialTagPlugin__tag-origin{0%{transform:translate(-50%, -50%) scale(1);opacity:0}100%{transform:translate(-50%, -50%) scale(0.6);opacity:1 }}@keyframes svelte-19zi46m-PanoSpatialTagPlugin__tag-origin-destroy{0%{transform:translate(-50%, -50%) scale(0.6);opacity:1}10%{transform:translate(-50%, -50%) scale(1);opacity:0.9}100%{transform:translate(-50%, -50%) scale(1);opacity:0}}")}function _d(n,t,e){const i=n.slice();return i[3]=t[e],i}function Hd(n){let t,e=`${n[3].top}%`,i=`${n[3].left}%`,s,o;function r(){return n[2](n[3])}return{c(){t=x("i"),w(t,"class","svelte-19zi46m"),$(t,"PanoSpatialTagPlugin__tag-origin",!0),$(t,"PanoSpatialTagPlugin__tag-origin-destroy",n[3].destroying),S(t,"top",e),S(t,"left",i),S(t,"visibility",n[3].front?"visible":"hidden")},m(a,l){O(a,t,l),s||(o=be(t,"click",r),s=!0)},p(a,l){n=a,l&1&&$(t,"PanoSpatialTagPlugin__tag-origin-destroy",n[3].destroying),l&1&&e!==(e=`${n[3].top}%`)&&S(t,"top",e),l&1&&i!==(i=`${n[3].left}%`)&&S(t,"left",i),l&1&&S(t,"visibility",n[3].front?"visible":"hidden")},d(a){a&&j(t),s=!1,o()}}}function ib(n){let t,e=n[0],i=[];for(let s=0;s<e.length;s+=1)i[s]=Hd(_d(n,e,s));return{c(){for(let s=0;s<i.length;s+=1)i[s].c();t=Ie()},m(s,o){for(let r=0;r<i.length;r+=1)i[r]&&i[r].m(s,o);O(s,t,o)},p(s,[o]){if(o&3){e=s[0];let r;for(r=0;r<e.length;r+=1){const a=_d(s,e,r);i[r]?i[r].p(a,o):(i[r]=Hd(a),i[r].c(),i[r].m(t.parentNode,t))}for(;r<i.length;r+=1)i[r].d(1);i.length=e.length}},i:J,o:J,d(s){Ot(i,s),s&&j(t)}}}function nb(n,t,e){let{origins:i}=t;const s=r=>{Fd.update(()=>`${r}-PanoSpatialTagPlugin-${Date.now()}`)},o=r=>s(r.id);return n.$$set=r=>{"origins"in r&&e(0,i=r.origins)},[i,s,o]}class sb extends ce{constructor(t){super(),le(this,t,nb,ib,ae,{origins:0},tb)}}function ob(n){me(n,"svelte-9m6drd",`.PanoSpatialTagPlugin__tag-x.svelte-9m6drd.svelte-9m6drd{position:absolute;top:0;left:0;display:block;white-space:nowrap;box-sizing:border-box;width:25rem;height:14rem;color:#fff;transform:translate(0, -100%);transition:height 0.5s linear}.PanoSpatialTagPlugin__tag-shadow.svelte-9m6drd.svelte-9m6drd{content:'';position:absolute;width:30rem;height:30rem;top:-15rem;left:-15rem;z-index:-1;opacity:0;transition:opacity 0.8s 0.6s;background:url('https://vrlab-image4.ljcdn.com/release/web/PanoSpatialTagPlugin__blur.png');background-size:30rem 30rem}.PanoSpatialTagPlugin__tag-line.svelte-9m6drd.svelte-9m6drd{position:absolute;left:-1rem;width:2rem;height:100%;overflow:hidden}.PanoSpatialTagPlugin__tag-flagpole.svelte-9m6drd.svelte-9m6drd{position:absolute;top:0;left:1rem;height:calc(100% - 1.5rem);width:0.15rem;background:linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0.1));box-shadow:0 0.1rem 0.5rem rgba(0, 0, 0, 0.2);opacity:0;transform:translate(-50%, 60%) scaleY(0);transition:transform 0.4s cubic-bezier(0.44, 0.44, 0.74, 0.98), opacity 0.4s cubic-bezier(0.44, 0.44, 0.74, 0.98), width 0.5s linear,
515
+ `,c0={display:"none",position:"absolute",top:"0",left:"0",width:"100%",height:"100%",opacity:"0",transform:"translate(0, 10px)",transition:"opacity 500ms ease-in-out, transform 500ms ease-in-out"},d0={position:"absolute",left:"50%",bottom:"32px",transform:"translateX(-50%)",height:"89px",display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:"14px",pointerEvents:"all",color:"#fff",zIndex:"10"},h0={position:"absolute",bottom:"0",left:"0",opacity:"0.5",width:"100%",height:"184px",background:"linear-gradient(180deg, rgba(0,0,0,0.00) 0%, #000000 100%)",zIndex:"0"},bd={margin:"0 64px"},u0={opacity:"0.85"},yd={width:"72px",height:"72px",backgroundSize:"100%",cursor:"pointer",transition:"all 200ms ease-in-out"},f0={width:"24px",height:"24px",marginRight:"4px",backgroundSize:"100%",cursor:"pointer"},m0={userSelect:"none",pointerEvents:"none"};class g0{constructor(t,e,i){u(this,"container");u(this,"measureController");u(this,"mainElement");u(this,"_params");u(this,"_btnTexts",{start:"开始",end:"结束",revoke:"撤销",exit:"退出"});u(this,"onMouseEnter",()=>{const{mainItem:t}=this.mainElement;t.style.opacity="1"});u(this,"onMouseLeave",()=>{const{mainItem:t}=this.mainElement;t.style.opacity="0.85"});u(this,"onClick",()=>{this.measureController.getCurrentMode()!=="Edit"?this.measureController.changeMode("Edit"):this.measureController.save().changeMode("Watch")});u(this,"modeChangeHandler",t=>{t==="Edit"?this.change2Done():this.change2Add()});var r,a,l,c;this._params=i,this._btnTexts={start:(r=this._params.startButtonText)!=null?r:this._btnTexts.start,end:(a=this._params.endButtonText)!=null?a:this._btnTexts.end,revoke:(l=this._params.revokeButtonText)!=null?l:this._btnTexts.revoke,exit:(c=this._params.exitButtonText)!=null?c:this._btnTexts.exit},this.measureController=t,this.container=e,this.mainElement=this.getMainElement(),Object.assign(this.mainElement.mainIcon.style,yd),Object.assign(this.mainElement.mainItem.style,bd);const{revokeTextDom:s,exitTextDom:o}=this._getTextElement();s&&(s.innerText=this._btnTexts.revoke),o&&(o.innerText=this._btnTexts.exit),this.change2Add(),this.measureController.hook.on("modeChange",this.modeChangeHandler),this.mainElement.mainItem.addEventListener("click",this.onClick),this.mainElement.mainItem.addEventListener("mouseenter",this.onMouseEnter),this.mainElement.mainItem.addEventListener("mouseleave",this.onMouseLeave)}dispose(){this.measureController.hook.off("modeChange",this.modeChangeHandler),this.mainElement.mainItem.removeEventListener("click",this.onClick),this.mainElement.mainItem.removeEventListener("mouseenter",this.onMouseEnter),this.mainElement.mainItem.removeEventListener("mouseleave",this.onMouseLeave)}getMainElement(){const t=this.container.querySelector(".fpm__main-text"),e=this.container.querySelector(".fpm__main"),i=this.container.querySelector(".fpm__main-icon");if(!e||!t||!i)throw new Error("cannot find dom");return{mainTextDom:t,mainItem:e,mainIcon:i}}_getTextElement(){const t=this.container.querySelector(".fpm__revoke-text"),e=this.container.querySelector(".fpm__exit-text");return{revokeTextDom:t,exitTextDom:e}}change2Add(){const{mainIcon:t,mainTextDom:e}=this.mainElement;if(t.className.includes("fpm__main__start")){e.innerText=this._btnTexts.start;return}t.className.includes("fpm__main__end")&&(t.style.transform="scale(0.8)",e.className.includes("fpm__main-text__show")?e.classList.replace("fpm__main-text__show","fpm__main-text__hide"):e.classList.add("fpm__main-text__hide"),setTimeout(()=>{t.classList.replace("fpm__main__end","fpm__main__start"),t.style.transform="scale(1)",e.innerText=this._btnTexts.start,e.classList.replace("fpm__main-text__hide","fpm__main-text__show")},200))}change2Done(){const{mainTextDom:t,mainIcon:e}=this.getMainElement();t.innerText!==this._btnTexts.end&&(e.className.includes("fpm__main__end")||e.className.includes("fpm__main__start")&&(e.style.transform="scale(0.8)",t.className.includes("fpm__main-text__show")?t.classList.replace("fpm__main-text__show","fpm__main-text__hide"):t.classList.add("fpm__main-text__hide"),setTimeout(()=>{e.classList.replace("fpm__main__start","fpm__main__end"),e.style.transform="scale(1)",t.innerText=this._btnTexts.end,t.classList.replace("fpm__main-text__hide","fpm__main-text__show")},200)))}}class p0{constructor(t,e,i){u(this,"container");u(this,"measureController");u(this,"mainElement");u(this,"_params");u(this,"_btnTexts",{start:"开始",end:"结束"});u(this,"onClick",()=>{var t;this.mainElement.mainTextDom.innerText===((t=this._params.startButtonText)!=null?t:"开始")?(this.measureController.hook.emit("willChangeState","watching","editing"),this.change2Done()):(this.measureController.hook.emit("willChangeState","editing","watching"),this.change2Add())});var s,o;this._params=i,this._btnTexts={start:(s=this._params.startButtonText)!=null?s:this._btnTexts.start,end:(o=this._params.endButtonText)!=null?o:this._btnTexts.end},this.measureController=t,this.container=e,this.mainElement=this.getMainElement(),this.mainElement.mainIcon.setAttribute("style","-webkit-tap-highlight-color: rgba(0,0,0,0);"),Object.assign(this.mainElement.mainIcon.style,yd),Object.assign(this.mainElement.mainItem.style,bd),this.change2Add(),this.mainElement.mainItem.addEventListener("click",this.onClick)}dispose(){this.mainElement.mainItem.removeEventListener("click",this.onClick)}getMainElement(){const t=this.container.querySelector(".fpm__main-text"),e=this.container.querySelector(".fpm__main"),i=this.container.querySelector(".fpm__main-icon");if(!e||!t||!i)throw new Error("cannot find dom");return{mainTextDom:t,mainItem:e,mainIcon:i}}change2Add(){const{mainIcon:t,mainTextDom:e}=this.mainElement;if(t.className.includes("fpm__main__start")){e.innerText=this._btnTexts.start;return}t.className.includes("fpm__main__end")&&(t.style.transform="scale(0.8)",e.className.includes("fpm__main-text__show")?e.classList.replace("fpm__main-text__show","fpm__main-text__hide"):e.classList.add("fpm__main-text__hide"),setTimeout(()=>{t.classList.replace("fpm__main__end","fpm__main__start"),t.style.transform="scale(1)",e.innerText=this._btnTexts.start,e.classList.replace("fpm__main-text__hide","fpm__main-text__show")},200))}change2Done(){const{mainTextDom:t,mainIcon:e}=this.mainElement;t.innerText!==this._btnTexts.end&&(e.className.includes("fpm__main__end")||e.className.includes("fpm__main__start")&&(e.style.transform="scale(0.8)",t.className.includes("fpm__main-text__show")?t.classList.replace("fpm__main-text__show","fpm__main-text__hide"):t.classList.add("fpm__main-text__hide"),setTimeout(()=>{e.classList.replace("fpm__main__start","fpm__main__end"),e.style.transform="scale(1)",t.innerText=this._btnTexts.end,t.classList.replace("fpm__main-text__hide","fpm__main-text__show")},200)))}}class A0{constructor(t,e){u(this,"container");u(this,"revokeIcon");u(this,"revokeItem");u(this,"measureController");u(this,"onClick",()=>{this.measureController.revoke()});u(this,"onModeChange",t=>{if(t!=="Edit"&&this.revokeItem.className.includes("enabled")){this.revokeItem.classList.remove("enabled"),this.measureController.hook.off("anchorChange",this.onAnchorChange);return}this.measureController.hook.on("anchorChange",this.onAnchorChange)});u(this,"onAnchorChange",t=>{t&&this.revokeItem.classList.add("enabled")});this.measureController=t,this.container=e;const i=this.container.querySelector(".fpm__revoke-icon"),s=this.container.querySelector(".fpm__revoke");if(!i||!s)throw new Error("不正确的选择器");this.revokeIcon=i,this.revokeItem=s,this.revokeItem.addEventListener("click",this.onClick),t.hook.on("modeChange",this.onModeChange)}dispose(){this.revokeItem.removeEventListener("click",this.onClick),this.measureController.hook.off("modeChange",this.onModeChange)}}function v0(n){me(n,"svelte-1v1ixi2",'.Switcher.svelte-1v1ixi2.svelte-1v1ixi2{position:relative;box-sizing:border-box;width:-moz-max-content;width:max-content}.Switcher.svelte-1v1ixi2 .content.svelte-1v1ixi2,.Switcher.svelte-1v1ixi2 .active-slider.svelte-1v1ixi2{transition-property:transform, width, opacity;transition-duration:300ms;transition-timing-function:ease-out}.Switcher-bg.svelte-1v1ixi2.svelte-1v1ixi2{content:"";position:absolute;box-sizing:border-box;top:50%;left:0;width:100%;height:3.75rem;transform:translateY(-50%);border-style:solid;border-width:0rem 1.875rem;-o-border-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAsQAAAC0CAMAAACkNspZAAAAyVBMVEUAAAAAAAAICAgUFBQ9PT1OTk4dHR0tLS0kJCRcXFxGRkYzMzNXV1dmZmZiYmJtbW3////////////////////ExMSKiopycnJvb2////////9JSUl5eXn///////////////////////+QkJCZmZn///+tra2kpKS/v7+KioqAgICNjY2dnZ3T09PZ2dnq6uru7u6AgICtra28vLzCwsK1tbXKysqxsbHCwsLKysrCwsK6urrExMStra3ExMSfn5+dnZ26urqLi4vkhTy/AAAAQ3RSTlMzADQ2P0M4OzlIQT1GS0lNBQ4JFyGFWVBOCwdCUhEaFRMeHV1iHG5nelpNQj8pLygkVTR3VXRFcGI5gF80YGlcUk9NBLjkeAAAEPBJREFUeNrs2tfS0zAQhmHROwQcYoojN7kwA3Yy6aRA7v+mkFcxa8cyVkAcMOx7Bf/BMzuf9Yfdoah/vL+EeERRmu78hewiBrofoDcUpUnpsMXZGmL0C3TfV72mqJ4ACHC2INkiYuUX7E6n0yAI/CqHoloBC8lDIgHNSvLt3iwiRsDgt9Ir4XKeRKFsTFGdQlmUcC5BV5ZB8m2QLSJ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UMtQ6z8I3xjY4AOaLODHCuohXx/zHAhmSXQjtM6KbZe2K6NmG4OBXAPMHnxSsj3iFLJJBGZaBWXKWtYksHtALvvSrAFgLMWsoGZSli2X9iECu9KsAWBcxa4Qyu1rWLtBljZ7fFbF+jWXtIl39gNiy/rwvGmW4k6mR4W0AAAAASUVORK5CYII=");border-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAsQAAAC0CAMAAACkNspZAAAAyVBMVEUAAAAAAAAICAgUFBQ9PT1OTk4dHR0tLS0kJCRcXFxGRkYzMzNXV1dmZmZiYmJtbW3////////////////////ExMSKiopycnJvb2////////9JSUl5eXn///////////////////////+QkJCZmZn///+tra2kpKS/v7+KioqAgICNjY2dnZ3T09PZ2dnq6uru7u6AgICtra28vLzCwsK1tbXKysqxsbHCwsLKysrCwsK6urrExMStra3ExMSfn5+dnZ26urqLi4vkhTy/AAAAQ3RSTlMzADQ2P0M4OzlIQT1GS0lNBQ4JFyGFWVBOCwdCUhEaFRMeHV1iHG5nelpNQj8pLygkVTR3VXRFcGI5gF80YGlcUk9NBLjkeAAAEPBJREFUeNrs2tfS0zAQhmHROwQcYoojN7kwA3Yy6aRA7v+mkFcxa8cyVkAcMOx7Bf/BMzuf9Yfdoah/vL+EeERRmu78hewiBrofoDcUpUnpsMXZGmL0C3TfV72mqJ4ACHC2INkiYuUX7E6n0yAI/CqHoloBC8lDIgHNSvLt3iwiRsDgt9Ir4XKeRKFsTFGdQlmUcC5BV5ZB8m2QLSJGwXCBJWDf4YmkW6yX2+3ptMjzr28pqtXXPF+cTtvtcl1Izgl3fAkZLrKpY/uI4QbLExz4nEcV31Mu/9DFJs2yTIg4/iSbUJSsshDHQkga6WYhD1x+qihHnPuBPMhwj4e82Uc8GinBvgOAt/nbfJWKeO5C71SvKOrShYQLzWORriSZLUB2fHA8cI6tIx7BDp4GDg/L9XbxdZEK4NuQ+4Kirmp4BsoilXS26zLkTgC7ou8cW0WMhGFFROP19muuAANftPuSojqhZqCsI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AQbms4rWRKwLAfsfd5Nw7mx0O2ikzGUsfiWEEWygzjDPgKYC1YStgkHK2yw3EejPGk8yP2K24mRbzeVbKMrxnDsSGZnhmXXO3XEGwSljVc7dZxMyXEcA+IMSmCWXGqUoOxdgzI0MwwEssuAGvBBuG0OhWzAFOiD8S4Ukzi4b46rCIwhmOBLJQZxh3wVYAhGISj1aHaD+MJrhL9IEYZj4NFudtmYAzHCrKWTM+MS672qwBDMAhn2125CMao4d4QYxlPg3lx2h4SxVjqWDkWybDccGYYk67ohV8RLCXcEk4O21MxD6ZYw70ixpliEs+KXV4lERxryCKZYTx5cQUYgqOkynfFLJ7gKNEnYigevFaMy5pxuqkZa8cCWVMmZ8ZNF3wFsBZcE96kNeFSEX49gOE+EaOMFeN5vY3zQzoSxwoyJLecGUYFdOFXAVaCR+khr7fwXAibS6J/xGA8DeLZ8ZTnWRKJY4EslMUywzjzSvMVwCI4SrI8Px1ncTB1E+4fMRjXdTzcPzzmWbppIEOyYGYYMwov/ArgTZrljw/7YV3CHsI9Igbjto7L/cP2cdtAFslCWTQzjA7sCl/xK4C3j/nDvmxL2EO4N8RgLHVcr+Og7uNi/5C/yassTYSyYBbPDAO5Cq/w/dFuHaQwCENBGL6CbZouQ9NETTfdaFFc5P7H6rzZiEgR4W0K7z/DxzApd5/iAfiNDXZ4whzhA8LqiDnH4pi/gpDHWrxfhqnr+z7nlF7oblnohVLKGTS6aVi8L3UkYHkRFHw8wuqI1znmrwBkF9oYhfI81zqUsnjL2rSUMtQ6z8I3xjY4AOaLODHCuohXx/zHAhmSXQjtM6KbZe2K6NmG4OBXAPMHnxSsj3iFLJJBGZaBWXKWtYksHtALvvSrAFgLMWsoGZSli2X9iECu9KsAWBcxa4Qyu1rWLtBljZ7fFbF+jWXtIl39gNiy/rwvGmW4k6mR4W0AAAAASUVORK5CYII=");border-image-slice:0 90 fill}.Switcher-buttons.svelte-1v1ixi2.svelte-1v1ixi2{display:flex;align-items:center;box-sizing:border-box;padding:0 0.1875rem;height:100%}.Switcher-buttons.has-divider.svelte-1v1ixi2 .button.svelte-1v1ixi2:not(:last-child)::after{content:"";position:absolute;right:0;top:10%;height:80%;width:0.0625rem;background-image:linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.3), transparent);background-size:100%;background-repeat:no-repeat;background-position:center}.active-slider.svelte-1v1ixi2.svelte-1v1ixi2{box-sizing:border-box;position:absolute;height:3.25rem;top:50%;transform:translate(0, -50%);border-style:solid;border-width:0rem 1.875rem;-o-border-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAXQAAACcCAMAAABY3aA6AAAAhFBMVEX///////8AAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////88i7DIAAAALHRSTlNmawBvc3d6BAcZDid8NwyFja/XEhYkHTErIS41gpajnUyRVEE7XKpiRczDuH1q6FcAAA1mSURBVHja7Ndtk5owFAXg2KKtiiUdlTdBYH1Z//8vbC4SjkmuDlpmOht7AWfdLyaPZw4ovo06PzydcZX+Eh3QP99gXvsCRkbvsX91s/B29A41/rch9mOjq09twUl6TbNRM/d4aH9rmsWVfkDmx0XX4ORN1HGcZdlWzdLbod2pTcYx8St5Dc/7jIiOjGtw4lbSaZ4nSbJTs/J0aG9qi3meKn+i1/AM+/joWlyBk3eaJ7tj/RlEsiyr/fm3t3PeV2Upo+CzPu6SPFXyBM+4j4oO8k6cwI+nUFbdihopI49HyqbLVSXD05HgO3ejZsZDR5OrkHfiCnxWns9VKaNQzczzCa+vaiJZVudzOVPwnbuKO9RHRidyCnkrLqQCb6I73FNvhtsdyTcKXorWneIO9jHRf1zJ5/F2ma9O0X5fEriXzvfHgi/3++i0ypfbeA72EdF78jS5TKtW/J20efvWvZpekvRJdjH49rneEHld7CsZhhx44Pm48OQuq31RE/tmPfhJRgwzBzlC7mhPA2/hsTXYI+5gH/YgI4aWebZM6qhqil4c4P5ac/o0lntRVlGdLLOhHSMGxnyZH6Y9Od8n3z0fvm069qaaHvLlwLCLQTfQbb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2/IL5h3RYTfFvt5UEnbYjTvszXmvX5BOM7tLHqpqszZ1jvkz6KhLxaSqiqwbdgLfNK6939m0/uIBvyW3okqlUi2YP49Oseuzo3ecVdIxMnPckZdn2DO7PjVxITfNUs2Onj4pUud/j34Ne5AlZb75xY479MN+fmkjDvkmL5MsIOZ/iQ77Jez+yn1Vhh33+WyUM0fckKtXd+VLzDH/B3Safe+5aVzqksHdwI+Ifm7AEdfFUsap6+2J+b+how57WcWhtcAd+wHrz9FGXMjDuCoh1+Z9odMxwn5KysJJJO4GfnSzuIpbiVOUyUnIaZYe0Jvsq2A9iYsy1+4CPyb7BWNp8bws1GQdrGrkPaLDvtNbqudmC6coKmX/Dj/IrwBrqoHbqioKZ5G5nt4+d5D3j/6T/atmP4j7+VNSafg8tkOhH8XohYZ2nMu6k09nET9o8q+Q943Olro07oGbTSOn3G6L0smViqMosQc6SRTFSuVOWWy3pRN9ytzAiOuQ18j7RofduO8F/nhOZ7Zyqqosiu1gpyjKqnKUPUvPRwHfG/EGeb/oTXeBF3lNH7iue9SzHujI2vQSA80t3gLeIt4/+md5i7uB370Ive/v9awGO7I63xful50BbzmV94nOAC/yMjs9LwMeWZ+sU7w7gvePDrzQm1kOdswChfsZ8P7RkRf8EYys81+8Qe91Pg90+lX6AR/0YeY+uzgBAAAAAElFTkSuQmCC");border-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAXQAAACcCAMAAABY3aA6AAAAhFBMVEX///////8AAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////88i7DIAAAALHRSTlNmawBvc3d6BAcZDid8NwyFja/XEhYkHTErIS41gpajnUyRVEE7XKpiRczDuH1q6FcAAA1mSURBVHja7Ndtk5owFAXg2KKtiiUdlTdBYH1Z//8vbC4SjkmuDlpmOht7AWfdLyaPZw4ovo06PzydcZX+Eh3QP99gXvsCRkbvsX91s/B29A41/rch9mOjq09twUl6TbNRM/d4aH9rmsWVfkDmx0XX4ORN1HGcZdlW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/yMjs9LwMeWZ+sU7w7gvePDrzQm1kOdswChfsZ8P7RkRf8EYys81+8Qe91Pg90+lX6AR/0YeY+uzgBAAAAAElFTkSuQmCC");border-image-slice:0 90 fill}.button.svelte-1v1ixi2.svelte-1v1ixi2{height:3.5rem;display:flex;position:relative;cursor:pointer;align-items:center;justify-content:center;pointer-events:all;width:7.25rem}.button.svelte-1v1ixi2 .content.svelte-1v1ixi2{position:absolute;display:flex;align-items:center;font-size:1rem;color:#fff;text-shadow:0 0.125rem 0.5rem rgba(0, 0, 0, 0.5);font-weight:bold}.button.svelte-1v1ixi2 .content .icon.svelte-1v1ixi2{display:inline-block;width:1.15625rem;height:1.15625rem;background-repeat:no-repeat;background-size:100%;margin-right:0.125rem}.button.svelte-1v1ixi2:not(.active) .content.svelte-1v1ixi2{opacity:0.65;transform:scale(0.875)}.button.svelte-1v1ixi2:not(.active) .content.svelte-1v1ixi2:hover{opacity:0.85}.button.active.svelte-1v1ixi2 .content.svelte-1v1ixi2{opacity:1;transform:scale(1)}')}function wd(n,t,e){const i=n.slice();return i[13]=t[e],i[14]=t,i[15]=e,i}function Cd(n){let t;return{c(){t=x("div"),w(t,"class","active-slider svelte-1v1ixi2"),S(t,"width",n[6]+"px"),S(t,"transform",`translate(${n[7]}px, -50%)`)},m(e,i){O(e,t,i)},p(e,i){i&64&&S(t,"width",e[6]+"px"),i&128&&S(t,"transform",`translate(${e[7]}px, -50%)`)},d(e){e&&j(t)}}}function Id(n){let t;return{c(){t=x("span"),w(t,"class","icon svelte-1v1ixi2"),S(t,"background-image",`url(${n[13].icon})`)},m(e,i){O(e,t,i)},p(e,i){i&1&&S(t,"background-image",`url(${e[13].icon})`)},d(e){e&&j(t)}}}function Pd(n){let t,e,i,s=n[13].value+"",o,r,a=n[15],l,c,d=n[13].icon&&Id(n);const h=()=>n[10](t,a),f=()=>n[10](null,a);function m(){return n[11](n[13],n[15])}return{c(){t=x("div"),e=x("div"),d&&d.c(),i=K(),o=De(s),r=K(),w(e,"class","content svelte-1v1ixi2"),w(t,"class","button svelte-1v1ixi2"),$(t,"active",n[4]===n[15])},m(A,p){O(A,t,p),L(t,e),d&&d.m(e,null),L(e,i),L(e,o),L(t,r),h(),l||(c=be(t,"click",m),l=!0)},p(A,p){n=A,n[13].icon?d?d.p(n,p):(d=Id(n),d.c(),d.m(e,i)):d&&(d.d(1),d=null),p&1&&s!==(s=n[13].value+"")&&Se(o,s),a!==n[15]&&(f(),a=n[15],h()),p&16&&$(t,"active",n[4]===n[15])},d(A){A&&j(t),d&&d.d(),f(),l=!1,c()}}}function b0(n){let t,e,i,s,o,r=n[5]&&Cd(n),a=n[0],l=[];for(let c=0;c<a.length;c+=1)l[c]=Pd(wd(n,a,c));return{c(){t=x("div"),e=x("div"),i=K(),r&&r.c(),s=K(),o=x("div");for(let c=0;c<l.length;c+=1)l[c].c();w(e,"class","Switcher-bg svelte-1v1ixi2"),w(o,"class","Switcher-buttons svelte-1v1ixi2"),$(o,"has-divider",!n[5]),w(t,"class","Switcher svelte-1v1ixi2")},m(c,d){O(c,t,d),L(t,e),L(t,i),r&&r.m(t,null),L(t,s),L(t,o);for(let h=0;h<l.length;h+=1)l[h]&&l[h].m(o,null);n[12](t)},p(c,[d]){if(c[5]?r?r.p(c,d):(r=Cd(c),r.c(),r.m(t,s)):r&&(r.d(1),r=null),d&23){a=c[0];let h;for(h=0;h<a.length;h+=1){const f=wd(c,a,h);l[h]?l[h].p(f,d):(l[h]=Pd(f),l[h].c(),l[h].m(o,null))}for(;h<l.length;h+=1)l[h].d(1);l.length=a.length}d&32&&$(o,"has-divider",!c[5])},i:J,o:J,d(c){c&&j(t),r&&r.d(),Ot(l,c),n[12](null)}}}function y0(n,t,e){let i;const o=g=>{e(4,d=g)};let{options:r}=t,{onChange:a}=t;const l=[];let c,d=null,h,f;function m(g,v){Ne[g?"unshift":"push"](()=>{l[v]=g,e(2,l)})}const A=(g,v)=>{a(g.key),e(4,d=v)};function p(g){Ne[g?"unshift":"push"](()=>{c=g,e(3,c)})}return n.$$set=g=>{"options"in g&&e(0,r=g.options),"onChange"in g&&e(1,a=g.onChange)},n.$$.update=()=>{n.$$.dirty&20&&e(5,i=l[d]),n.$$.dirty&40&&i&&c&&setTimeout(()=>{e(6,h=i.clientWidth),e(7,f=i.getBoundingClientRect().left-c.getBoundingClientRect().left)},0)},[r,a,l,c,d,i,h,f,null,o,m,A,p]}class w0 extends ce{constructor(t){super(),le(this,t,y0,b0,ae,{defaultIndex:8,setIndex:9,options:0,onChange:1},v0)}get defaultIndex(){return this.$$.ctx[8]}get setIndex(){return this.$$.ctx[9]}}function C0(n){me(n,"svelte-1m0stw",".exit.svelte-1m0stw{position:relative;pointer-events:all;cursor:pointer;left:1.5rem;top:1.5rem;width:1.5rem;height:1.5rem;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAASKADAAQAAAABAAAASAAAAACQMUbvAAAFrklEQVR4Ae2bW8hmUxjH5zOM0zhETSQaRkaMs5lGLqQ0otA4ZJCUSCMph3AxSklTLkxIShPFheTQJBQuiFxoJjeSRHzG+dAwzufP7/fNeqZle1+a7LX3+rKf+s+z1trvt/f6/3r22nu/+51Zs4YYCAwEBgIDgYHAQGAgMBAYCAwEtp3AxLb/SR1/MTU15dwPQXujzejtiYmJX8itxowEBJzZUDgF7YN+RoL5Cr0EpN/JrcV2re2pox0lOKdxuAMah5xLf15j7D93ZxSgBOdMXM9PzqcaufUzYsYAAs72wDgHHZigCCMH8iP9z9K21pIHrT4SnBVMdH8UC3FUj/P/Da1ve/1xx9VXUIJzMXM92AkTASavHuF4JWs9qgYEnB1wfCnyct6MALUBOJ82N7bVrxZQgnMFRheigJFXje03gPNOWzBG7adKQMCZw2SvQsIxAkyAcuxd4GywUTKqW6QTnGswvQCNWpCF5Sn1IioeV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Yi2y7VuS5UDq5H2eB6wGkJMB0mbSrcj38kacYlt6WyrJ/8CyDEhxKsa2IrkqQDoE0jek1Sgg5SCimg5i+1JUPKoDpGMgfUu6A32CYi2iOb0WBbBFVNGhDpaMKgFpOEG6i2ZAiuqJ005QS4DkY0mxqBaQjoH0Hele5DOcQEI0t1bWCUDa04ESUTUgDQPpe5IvIoUUVURzOux7RROSv3dsPaoHpGMg/UB6EPmgG5FXk/dIi4HUup/WdxizbzsnSA+z33gTG2tRHMp7pHnRaSvPGEAaBpI/yXsUCckKMiLb9pGk1ZhRgHQOJH/wsA41K+lXxvwapdXI6be649I7Y73x++ujkC8fvQP3/455/zTEQGAgMBAYCPxfCPwJssZtZ7WkgCEAAAAASUVORK5CYII=);background-repeat:no-repeat;background-size:100% 100%}")}function I0(n){let t,e,i;return{c(){t=x("div"),w(t,"class","exit svelte-1m0stw")},m(s,o){O(s,t,o),e||(i=be(t,"click",function(){Ft(n[0])&&n[0].apply(this,arguments)}),e=!0)},p(s,[o]){n=s},i:J,o:J,d(s){s&&j(t),e=!1,i()}}}function P0(n,t,e){let{onClick:i=null}=t;return n.$$set=s=>{"onClick"in s&&e(0,i=s.onClick)},[i]}class kd extends ce{constructor(t){super(),le(this,t,P0,I0,ae,{onClick:0},C0)}}const Md="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAASKADAAQAAAABAAAASAAAAACQMUbvAAAFfUlEQVR4Ae2aSYgdRRjHMy6473FDc9GDKB68CSqIicspHhQDXgRBQTSJChEUUQ/iVdGLiHgVBAUPUXKZKIKQi3jJYaKIjLiguC9RiWb8/Sb9hfJZ9ex67zmZaeuD/1T117V9v6qu7tc969Y1awQagUagEWgEGoFGoBFoBBqBRqARGAyBpaWlm9Eu9A7aiuYGE9y0gQDjHrQPLXSp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UQC4YZVMfxSAWhvT9EcBUG1MnkL0i6ptnuIij0mjjVl9D3jUMu85E5gJzARuT+ACS7KuMQ7rOEcAAAAASUVORK5CYII=",xd="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAMKADAAQAAAABAAAAMAAAAADbN2wMAAAByElEQVRoBe1ZMU4DMRC8Q7yCJjVNKCh4ARVfAPo0PCYNPeQLVLyAggIa6jQ8g2NGsiJjeUfHrdGd0K60Sm7t3R3P+hx503UhwUAwEAzMyUCvkg/DcITxa+gldAXdQ5+hu77vv/DZTKbmMheQAt4D4XkF5Stsm1aL8OQiw5aQ+Rp4zqed461kci5VgUegO22F0BnnA9W+qcVQFeCeX4qYWNQC+MIuRUwsxwIhTxu1hV4w/ib8fzN0hskXwoFYqqIqsIMHT5uafML4XhuYaGMsxqwJMRBLVcyXmLOzs/ku8ybzTDhkthZfiWUNzSuxxbP8zVEV6HjOQx8KdNw2rcEzBWP+2JLMTQwctEQuwHJakj0WMHc1ogJRAScDsYWcBLrdowJuCp0BogJOAt3uUQE3hc4AUQEngW73/10BXimhtwVNvIDLq2gxf+wjYzL2QZg7XWsPtvKLCSQ5Wq1FXsCfoK2ulsRxBT2BliLbmGoLqXYfE/EC3koYqwae8WUbU1UgWoutyoM4KyuW2kJ7y2kGu4nF01rcVnpGk9aWTrq8eVbGad5alO2+MvuIZ9XGlLnMl5hJ01HK02ixfzGNICemBAPBQDDwhwx8A43PdoQvgLfYAAAAAElFTkSuQmCC";function k0(n){me(n,"svelte-468fdd",'*.forbid.svelte-468fdd.svelte-468fdd{pointer-events:none !important;opacity:0.5}.Measure-Controller.svelte-468fdd.svelte-468fdd{pointer-events:none;position:relative;width:100%;height:100%;z-index:2}.Measure-Controller.svelte-468fdd .mode-switcher.svelte-468fdd{margin-top:2.25rem}.Measure-Controller.svelte-468fdd .bottom.svelte-468fdd{position:absolute;width:100%;bottom:0}.Measure-Controller.svelte-468fdd .bottom .mask.svelte-468fdd{position:absolute;bottom:0;width:100%;height:11.5rem;background-size:100%;background-image:linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.3))}.Measure-Controller.svelte-468fdd .bottom .center.svelte-468fdd{display:flex;flex-direction:column;align-items:center;margin-bottom:2.5rem}.Measure-Controller.svelte-468fdd .buttons.svelte-468fdd{pointer-events:all;display:flex;align-items:center;height:2.5rem;background:rgba(0, 0, 0, 0.2);color:rgba(255, 255, 255, 0.85);width:-moz-max-content;width:max-content;border-radius:624.9375rem;overflow:hidden}.Measure-Controller.svelte-468fdd .buttons .button.svelte-468fdd{cursor:pointer;display:flex;align-items:center;position:relative;font-size:0.875rem;padding:0rem 1rem}.Measure-Controller.svelte-468fdd .buttons .button .icon.svelte-468fdd{width:1.5rem;height:1.5rem;background-repeat:no-repeat;background-size:100%;margin-right:0.25rem}.Measure-Controller.svelte-468fdd .buttons .button.svelte-468fdd::after{content:"";position:absolute;display:block;right:-0.03125rem;height:1.5rem;width:0.0625rem;background-image:linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.3), transparent);background-size:100%;background-repeat:no-repeat;background-position:center}.Measure-Controller.svelte-468fdd .buttons .button.svelte-468fdd:last-child::after{display:none}')}function Sd(n){let t,e;return t=new kd({props:{onClick:n[0].disable}}),{c(){oe(t.$$.fragment)},m(i,s){ne(t,i,s),e=!0},p(i,s){const o={};s&1&&(o.onClick=i[0].disable),t.$set(o)},i(i){e||(D(t.$$.fragment,i),e=!0)},o(i){T(t.$$.fragment,i),e=!1},d(i){se(t,i)}}}function Ld(n){let t,e,i,s,o=n[2]("撤销")+"",r,a,l,c,d,h=n[2]("结束")+"",f,m,A;return{c(){t=x("div"),e=x("div"),i=x("div"),s=K(),r=De(o),a=K(),l=x("div"),c=x("div"),d=K(),f=De(h),w(i,"class","icon svelte-468fdd"),S(i,"background-image",`url(${Md})`),w(e,"class","button svelte-468fdd"),$(e,"forbid",!n[3]),w(c,"class","icon svelte-468fdd"),S(c,"background-image",`url(${Ed})`),w(l,"class","button svelte-468fdd"),w(t,"class","buttons svelte-468fdd")},m(p,g){O(p,t,g),L(t,e),L(e,i),L(e,s),L(e,r),L(t,a),L(t,l),L(l,c),L(l,d),L(l,f),m||(A=[be(e,"click",n[7]),be(l,"click",n[6])],m=!0)},p(p,g){g&4&&o!==(o=p[2]("撤销")+"")&&Se(r,o),g&8&&$(e,"forbid",!p[3]),g&4&&h!==(h=p[2]("结束")+"")&&Se(f,h)},d(p){p&&j(t),m=!1,Xe(A)}}}function M0(n){let t,e,i,s,o,r,a,l,c,d,h,f=n[1]&&Sd(n),m=n[5]&&Ld(n);function A(g){n[9](g)}let p={options:[{key:"line",value:n[2]("测距离"),icon:Dd},{key:"area",value:n[2]("测面积"),icon:xd}],onChange:n[8]};return n[4]!==void 0&&(p.setIndex=n[4]),c=new w0({props:p}),Ne.push(()=>gr(c,"setIndex",A)),{c(){t=x("div"),f&&f.c(),e=K(),i=x("div"),s=x("div"),o=K(),r=x("div"),m&&m.c(),a=K(),l=x("div"),oe(c.$$.fragment),w(s,"class","mask svelte-468fdd"),w(l,"class","mode-switcher svelte-468fdd"),w(r,"class","center svelte-468fdd"),w(i,"class","bottom svelte-468fdd"),w(t,"class","Measure-Controller svelte-468fdd")},m(g,v){O(g,t,v),f&&f.m(t,null),L(t,e),L(t,i),L(i,s),L(i,o),L(i,r),m&&m.m(r,null),L(r,a),L(r,l),ne(c,l,null),h=!0},p(g,[v]){g[1]?f?(f.p(g,v),v&2&&D(f,1)):(f=Sd(g),f.c(),D(f,1),f.m(t,e)):f&&(he(),T(f,1,1,()=>{f=null}),ue()),g[5]?m?m.p(g,v):(m=Ld(g),m.c(),m.m(r,a)):m&&(m.d(1),m=null);const y={};v&4&&(y.options=[{key:"line",value:g[2]("测距离"),icon:Dd},{key:"area",value:g[2]("测面积"),icon:xd}]),v&1&&(y.onChange=g[8]),!d&&v&16&&(d=!0,y.setIndex=g[4],cr(()=>d=!1)),c.$set(y)},i(g){h||(D(f),D(c.$$.fragment,g),h=!0)},o(g){T(f),T(c.$$.fragment,g),h=!1},d(g){g&&j(t),f&&f.d(),m&&m.d(),se(c)}}}function E0(n,t,e){let{measureController:i}=t,{showExit:s=!1}=t,{i18n:o=g=>g}=t,r=!1,a;function l(g){g==="Edit"?e(5,f=!0):(a(null),e(5,f=!1))}function c(){i.controller instanceof bi&&i.controller.complete(),i.save({mode:"Watch"})}function d(g){e(3,r=g.length>0)}function h(){e(3,r=!1)}gt(()=>{i.hook.on("modeChange",l),i.hook.on("complete",h),i.hook.on("pointsChange",d)}),Mt(()=>{i.hook.off("modeChange",l),i.hook.off("complete",h),i.hook.off("pointsChange",d)});let f=!1;const m=()=>i.revoke(),A=g=>{i.save().changeMode("Edit"),i.changeMeasureType(g)};function p(g){a=g,e(4,a)}return n.$$set=g=>{"measureController"in g&&e(0,i=g.measureController),"showExit"in g&&e(1,s=g.showExit),"i18n"in g&&e(2,o=g.i18n)},[i,s,o,r,a,f,c,m,A,p]}class D0 extends ce{constructor(t){super(),le(this,t,E0,M0,ae,{measureController:0,showExit:1,i18n:2},k0)}}function x0(n){me(n,"svelte-1mfj5mk",'.Switcher.svelte-1mfj5mk.svelte-1mfj5mk{pointer-events:all;position:relative;margin-bottom:1.5rem;box-sizing:border-box;width:-moz-max-content;width:max-content}.Switcher.svelte-1mfj5mk .svelte-1mfj5mk{transition-duration:300ms;transition-timing-function:ease-out}.Switcher.svelte-1mfj5mk .content.svelte-1mfj5mk{transition-property:opacity}.Switcher.svelte-1mfj5mk .highlight.svelte-1mfj5mk{transition-property:width}.Switcher.svelte-1mfj5mk .Switcher-buttons.svelte-1mfj5mk{transition-property:transform}.Switcher.svelte-1mfj5mk .Switcher-buttons.svelte-1mfj5mk{position:absolute;top:50%;left:0;transform:translate(0, -50%);width:-moz-max-content;width:max-content}.Switcher.svelte-1mfj5mk .Switcher-buttons .button.svelte-1mfj5mk{display:inline-block;margin:0 0.5625rem}.Switcher.svelte-1mfj5mk .highlight.svelte-1mfj5mk{height:2rem;background:rgba(0, 0, 0, 0.3);border-radius:624.9375rem}.Switcher.svelte-1mfj5mk .content.svelte-1mfj5mk{position:relative;padding:0 0.75rem}.Switcher.svelte-1mfj5mk .button:not(.active) .content.svelte-1mfj5mk::before{content:"";position:absolute;top:50%;left:10%;width:80%;transform:translateY(-50%);height:0;box-shadow:0 0 0.9375rem 0.3125rem rgba(0, 0, 0, 0.3)}')}function Td(n,t,e){const i=n.slice();return i[13]=t[e],i[14]=t,i[15]=e,i}function jd(n){let t;return{c(){t=x("span"),w(t,"class","icon svelte-1mfj5mk"),S(t,"background-image",n[13].icon)},m(e,i){O(e,t,i)},p(e,i){i&1&&S(t,"background-image",e[13].icon)},d(e){e&&j(t)}}}function zd(n){let t,e,i,s=n[13].value+"",o,r,a=n[15],l,c,d=n[13].icon&&jd(n);const h=()=>n[9](t,a),f=()=>n[9](null,a);function m(){return n[10](n[13],n[15])}return{c(){t=x("div"),e=x("div"),d&&d.c(),i=K(),o=De(s),r=K(),w(e,"class","content svelte-1mfj5mk"),w(t,"class","button svelte-1mfj5mk"),$(t,"active",n[4]===n[15])},m(A,p){O(A,t,p),L(t,e),d&&d.m(e,null),L(e,i),L(e,o),L(t,r),h(),l||(c=be(t,"click",m),l=!0)},p(A,p){n=A,n[13].icon?d?d.p(n,p):(d=jd(n),d.c(),d.m(e,i)):d&&(d.d(1),d=null),p&1&&s!==(s=n[13].value+"")&&Se(o,s),a!==n[15]&&(f(),a=n[15],h()),p&16&&$(t,"active",n[4]===n[15])},d(A){A&&j(t),d&&d.d(),f(),l=!1,c()}}}function S0(n){let t,e,i,s,o=n[0],r=[];for(let a=0;a<o.length;a+=1)r[a]=zd(Td(n,o,a));return{c(){t=x("div"),e=x("div"),i=K(),s=x("div");for(let a=0;a<r.length;a+=1)r[a].c();w(e,"class","highlight svelte-1mfj5mk"),S(e,"width",n[5]?`${n[5]}px`:void 0),w(s,"class","Switcher-buttons svelte-1mfj5mk"),S(s,"transform",`translate(${n[6]}px, -50%)`),w(t,"class","Switcher svelte-1mfj5mk")},m(a,l){O(a,t,l),L(t,e),L(t,i),L(t,s);for(let c=0;c<r.length;c+=1)r[c]&&r[c].m(s,null);n[11](t)},p(a,[l]){if(l&32&&S(e,"width",a[5]?`${a[5]}px`:void 0),l&23){o=a[0];let c;for(c=0;c<o.length;c+=1){const d=Td(a,o,c);r[c]?r[c].p(d,l):(r[c]=zd(d),r[c].c(),r[c].m(s,null))}for(;c<r.length;c+=1)r[c].d(1);r.length=o.length}l&64&&S(s,"transform",`translate(${a[6]}px, -50%)`)},i:J,o:J,d(a){a&&j(t),Ot(r,a),n[11](null)}}}function L0(n,t,e){let i,s,{options:o}=t,{defaultKey:r=null}=t,{onChange:a}=t;const l=[];let c,d,h=0;function f(){if(s&&c){e(5,d=s.clientWidth);const g=h+c.getBoundingClientRect().left-s.getBoundingClientRect().left;e(6,h=g)}}function m(g,v){Ne[g?"unshift":"push"](()=>{l[v]=g,e(2,l)})}const A=(g,v)=>{a(g.key),e(4,i=v)};function p(g){Ne[g?"unshift":"push"](()=>{c=g,e(3,c)})}return n.$$set=g=>{"options"in g&&e(0,o=g.options),"defaultKey"in g&&e(7,r=g.defaultKey),"onChange"in g&&e(1,a=g.onChange)},n.$$.update=()=>{n.$$.dirty&129&&e(4,i=r?o.findIndex(g=>g.key===r):0),n.$$.dirty&20&&e(8,s=l[i]),n.$$.dirty&264&&s&&c&&setTimeout(()=>f(),0)},[o,a,l,c,i,d,h,r,s,m,A,p]}class T0 extends ce{constructor(t){super(),le(this,t,L0,S0,ae,{options:0,defaultKey:7,onChange:1},x0)}}function j0(n){me(n,"svelte-82ysdl",".CircleButton.svelte-82ysdl.svelte-82ysdl{position:relative;display:flex;justify-content:center;align-items:center;width:4.5rem;height:4.5rem;background-image:inherit;background-size:100% auto;background-repeat:no-repeat;transition:transform 200ms ease-in-out}.CircleButton.svelte-82ysdl.svelte-82ysdl:active{transform:scale(0.8)}.CircleButton.svelte-82ysdl .text.svelte-82ysdl{position:absolute}")}function Od(n){let t,e,i,s;return{c(){t=x("div"),e=De(n[0]),w(t,"class","text svelte-82ysdl")},m(o,r){O(o,t,r),L(t,e),s=!0},p(o,r){(!s||r&1)&&Se(e,o[0])},i(o){s||(We(()=>{s&&(i||(i=Ht(t,ot,{duration:300},!0)),i.run(1))}),s=!0)},o(o){i||(i=Ht(t,ot,{duration:300},!1)),i.run(0),s=!1},d(o){o&&j(t),o&&i&&i.end()}}}function z0(n){let t,e=n[0],i,s,o,r=Od(n);return{c(){t=x("div"),r.c(),w(t,"class","CircleButton svelte-82ysdl"),S(t,"background-image",`url(${n[2]})`)},m(a,l){O(a,t,l),r.m(t,null),i=!0,s||(o=be(t,"click",function(){Ft(n[1])&&n[1].apply(this,arguments)}),s=!0)},p(a,[l]){n=a,l&1&&ae(e,e=n[0])?(he(),T(r,1,1,J),ue(),r=Od(n),r.c(),D(r,1),r.m(t,null)):r.p(n,l),l&4&&S(t,"background-image",`url(${n[2]})`)},i(a){i||(D(r),i=!0)},o(a){T(r),i=!1},d(a){a&&j(t),r.d(a),s=!1,o()}}}function O0(n,t,e){let i,{text:s}=t,{onClick:o=null}=t,{color:r="white"}=t;return n.$$set=a=>{"text"in a&&e(0,s=a.text),"onClick"in a&&e(1,o=a.onClick),"color"in a&&e(3,r=a.color)},n.$$.update=()=>{n.$$.dirty&8&&e(2,i=(()=>r==="white"?lo:r==="blue"?jr:lo)())},[s,o,i,r]}class B0 extends ce{constructor(t){super(),le(this,t,O0,z0,ae,{text:0,onClick:1,color:3},j0)}}function V0(n){me(n,"svelte-ldjbp8","*.forbid.svelte-ldjbp8.svelte-ldjbp8{pointer-events:none !important;opacity:0.5}.Measure-Controller.svelte-ldjbp8.svelte-ldjbp8{pointer-events:none;position:relative;width:100%;height:100%;z-index:2;color:white}.Measure-Controller.svelte-ldjbp8 .mode-switcher.svelte-ldjbp8{margin-top:2.25rem}.Measure-Controller.svelte-ldjbp8 .bottom.svelte-ldjbp8{position:absolute;width:100%;bottom:0}.Measure-Controller.svelte-ldjbp8 .bottom .mask.svelte-ldjbp8{position:absolute;bottom:0;width:100%;height:12.5rem;background-size:100%;z-index:-1;background-image:linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.5))}.Measure-Controller.svelte-ldjbp8 .bottom .center.svelte-ldjbp8{display:flex;flex-direction:column;align-items:center;margin-bottom:2.5rem}.Measure-Controller.svelte-ldjbp8 .controller.svelte-ldjbp8{pointer-events:all;display:flex;align-items:center}.Measure-Controller.svelte-ldjbp8 .controller .button.svelte-ldjbp8{cursor:pointer;display:flex;align-items:center;height:2.5rem;padding-left:1rem;padding-right:1rem;border-radius:624.9375rem;font-size:0.875rem;color:#fff;background-color:rgba(0, 0, 0, 0.2)}.Measure-Controller.svelte-ldjbp8 .controller .button .icon.svelte-ldjbp8{width:1.5rem;height:1.5rem;background-repeat:no-repeat;background-size:100%;margin:0 0.25rem}.Measure-Controller.svelte-ldjbp8 .controller .main-button.svelte-ldjbp8{margin-left:1.75rem;margin-right:1.75rem;font-size:0.875rem;font-weight:bold}")}function Bd(n){let t,e;return t=new kd({props:{onClick:n[0].disable}}),{c(){oe(t.$$.fragment)},m(i,s){ne(t,i,s),e=!0},p(i,s){const o={};s&1&&(o.onClick=i[0].disable),t.$set(o)},i(i){e||(D(t.$$.fragment,i),e=!0)},o(i){T(t.$$.fragment,i),e=!1},d(i){se(t,i)}}}function Vd(n){let t,e,i,s;return e=new T0({props:{options:[{key:"line",value:n[2]("测距离")},{key:"area",value:n[2]("测面积")}],defaultKey:n[0].currentMeasureType,onChange:n[0].changeMeasureType}}),{c(){t=x("div"),oe(e.$$.fragment),w(t,"class","mode-switcher svelte-ldjbp8")},m(o,r){O(o,t,r),ne(e,t,null),s=!0},p(o,r){n=o;const a={};r&4&&(a.options=[{key:"line",value:n[2]("测距离")},{key:"area",value:n[2]("测面积")}]),r&1&&(a.defaultKey=n[0].currentMeasureType),r&1&&(a.onChange=n[0].changeMeasureType),e.$set(a)},i(o){s||(D(e.$$.fragment,o),o&&We(()=>{s&&(i||(i=Ht(t,ot,{duration:Cn},!0)),i.run(1))}),s=!0)},o(o){T(e.$$.fragment,o),o&&(i||(i=Ht(t,ot,{duration:Cn},!1)),i.run(0)),s=!1},d(o){o&&j(t),se(e),o&&i&&i.end()}}}function Rd(n){let t,e,i,s=n[2]("撤销")+"",o,r,a,l,c;return{c(){t=x("div"),e=x("div"),i=K(),o=De(s),w(e,"class","icon svelte-ldjbp8"),S(e,"background-image",`url(${Md})`),w(t,"class","button svelte-ldjbp8"),$(t,"forbid",n[3]==="start")},m(d,h){O(d,t,h),L(t,e),L(t,i),L(t,o),a=!0,l||(c=be(t,"click",n[13]),l=!0)},p(d,h){n=d,(!a||h&4)&&s!==(s=n[2]("撤销")+"")&&Se(o,s),(!a||h&8)&&$(t,"forbid",n[3]==="start")},i(d){a||(d&&We(()=>{a&&(r||(r=Ht(t,ot,{duration:Cn},!0)),r.run(1))}),a=!0)},o(d){d&&(r||(r=Ht(t,ot,{duration:Cn},!1)),r.run(0)),a=!1},d(d){d&&j(t),d&&r&&r.end(),l=!1,c()}}}function Qd(n){let t,e,i,s=n[2]("结束")+"",o,r,a,l,c;return{c(){t=x("div"),e=x("div"),i=K(),o=De(s),w(e,"class","icon svelte-ldjbp8"),S(e,"background-image",`url(${Ed})`),w(t,"class","button svelte-ldjbp8")},m(d,h){O(d,t,h),L(t,e),L(t,i),L(t,o),a=!0,l||(c=be(t,"click",n[10]),l=!0)},p(d,h){n=d,(!a||h&4)&&s!==(s=n[2]("结束")+"")&&Se(o,s)},i(d){a||(d&&We(()=>{a&&(r||(r=Ht(t,ot,{duration:Cn},!0)),r.run(1))}),a=!0)},o(d){d&&(r||(r=Ht(t,ot,{duration:Cn},!1)),r.run(0)),a=!1},d(d){d&&j(t),d&&r&&r.end(),l=!1,c()}}}function R0(n){let t,e,i,s,o,r,a,l,c,d,h,f,m,A=n[1]&&Bd(n),p=n[0].allowMeasureType.length>=2&&n[3]==="start"&&Vd(n),g=n[4]&&Rd(n);h=new B0({props:{onClick:n[14],text:n[6][n[3]],color:n[7][n[3]]}});let v=n[4]&&Qd(n);return{c(){t=x("div"),A&&A.c(),e=K(),i=x("div"),s=x("div"),o=K(),r=x("div"),p&&p.c(),a=K(),l=x("div"),g&&g.c(),c=K(),d=x("div"),oe(h.$$.fragment),f=K(),v&&v.c(),w(s,"class","mask svelte-ldjbp8"),w(d,"class","main-button svelte-ldjbp8"),$(d,"forbid",!n[5]),w(l,"class","controller svelte-ldjbp8"),w(r,"class","center svelte-ldjbp8"),w(i,"class","bottom svelte-ldjbp8"),w(t,"class","Measure-Controller svelte-ldjbp8")},m(y,P){O(y,t,P),A&&A.m(t,null),L(t,e),L(t,i),L(i,s),L(i,o),L(i,r),p&&p.m(r,null),L(r,a),L(r,l),g&&g.m(l,null),L(l,c),L(l,d),ne(h,d,null),L(l,f),v&&v.m(l,null),m=!0},p(y,[P]){y[1]?A?(A.p(y,P),P&2&&D(A,1)):(A=Bd(y),A.c(),D(A,1),A.m(t,e)):A&&(he(),T(A,1,1,()=>{A=null}),ue()),y[0].allowMeasureType.length>=2&&y[3]==="start"?p?(p.p(y,P),P&9&&D(p,1)):(p=Vd(y),p.c(),D(p,1),p.m(r,a)):p&&(he(),T(p,1,1,()=>{p=null}),ue()),y[4]?g?(g.p(y,P),P&16&&D(g,1)):(g=Rd(y),g.c(),D(g,1),g.m(l,c)):g&&(he(),T(g,1,1,()=>{g=null}),ue());const I={};P&8&&(I.onClick=y[14]),P&8&&(I.text=y[6][y[3]]),P&8&&(I.color=y[7][y[3]]),h.$set(I),(!m||P&32)&&$(d,"forbid",!y[5]),y[4]?v?(v.p(y,P),P&16&&D(v,1)):(v=Qd(y),v.c(),D(v,1),v.m(l,null)):v&&(he(),T(v,1,1,()=>{v=null}),ue())},i(y){m||(D(A),D(p),D(g),D(h.$$.fragment,y),D(v),m=!0)},o(y){T(A),T(p),T(g),T(h.$$.fragment,y),T(v),m=!1},d(y){y&&j(t),A&&A.d(),p&&p.d(),g&&g.d(),se(h),v&&v.d()}}}const Cn=100;function Q0(n,t,e){let{measureController:i}=t,{showExit:s=!1}=t,{i18n:o=H=>H}=t;const r={start:o("开始"),add:o("添加"),end:o("结束"),complete:o("完成")},a={start:"white",add:"white",end:"blue",complete:"blue"};let l=!1,c=!0,d="start",h=i.currentMeasureType;const f=()=>{i.getCurrentMode()!=="Edit"?i.changeMode("Edit"):(p("add"),m())},m=()=>{i.controller instanceof bi&&i.controller.selectPoint()},A=()=>{i.controller instanceof bi&&i.controller.complete()},p=H=>{e(3,d=H)},g=()=>{m(),E("allow")},v=()=>{p("complete")},y=()=>{i.currentMeasureType==="area"&&d==="complete"&&p("add")},P=H=>{H.length},I=()=>{p("start"),E("allow")},E=H=>{e(5,c=H==="allow")},C=H=>{e(12,h=H)},z=H=>{H.isEmpty&&p("start")};gt(()=>{i.hook.on("revoke",z),i.hook.on("measureTypeChange",C),i.hook.on("modeChange",I),i.hook.on("pointsChange",P),i.hook.on("allowAddPointStateChange",E),i.hook.on("readyComplete",v),i.hook.on("notReadyComplete",y),i.hook.on("complete",I)}),Mt(()=>{i.hook.off("measureTypeChange",C),i.hook.off("modeChange",I),i.hook.off("allowAddPointStateChange",E),i.hook.off("readyComplete",v),i.hook.off("pointsChange",P),i.hook.off("notReadyComplete",y),i.hook.off("complete",I)});const R=()=>i.revoke(),U=()=>{d==="start"?f():d==="add"?m():(d==="end"||d==="complete")&&g()};return n.$$set=H=>{"measureController"in H&&e(0,i=H.measureController),"showExit"in H&&e(1,s=H.showExit),"i18n"in H&&e(2,o=H.i18n)},n.$$.update=()=>{n.$$.dirty&4104&&e(4,l=h==="area"&&d!=="start")},[i,s,o,d,l,c,r,a,f,m,A,g,h,R,U]}class G0 extends ce{constructor(t){super(),le(this,t,Q0,R0,ae,{measureController:0,showExit:1,i18n:2},V0)}}class N0{constructor(t,e){u(this,"revoke");u(this,"container");u(this,"mainController");u(this,"disposers",[]);u(this,"measureController");u(this,"mode");u(this,"svelteDom");u(this,"_params");u(this,"handleExit",()=>{const t=this.container.querySelector(".fpm__exit-icon"),e=this.container.querySelector(".fpm__exit");if(!e||!t)throw new Error("cannot find dom");this.mode==="pc"&&(Object.assign(e.style,u0),Object.assign(t==null?void 0:t.style,f0));const i=()=>{e.style.opacity="1"},s=()=>{e.style.opacity="0.85"},o=()=>{this.measureController.disable()};return e.addEventListener("click",o),e.addEventListener("mouseenter",i),e.addEventListener("mouseleave",s),()=>{e.removeEventListener("click",o),e.removeEventListener("mouseenter",i),e.removeEventListener("mouseleave",s)}});var s,o;this._params=e,this.measureController=t,this.mode=(s=e.mode)!=null?s:"pc",this.container=document.createElement("div"),this.container.innerHTML=this.mode==="mobile"?a0:l0,this.container.classList.add("fpm__ui-controller",this.mode),this.container.style.background="rgba(0, 0, 0, 0.15)";const i=(o=e.useNewUI)!=null?o:!1;if(i&&(e.pointSelectorMode==="cursor"?this.svelteDom=new D0({target:e.container,props:{measureController:this.measureController,i18n:e.i18n,showExit:e.showExit}}):e.pointSelectorMode==="fixed"&&(this.svelteDom=new G0({target:e.container,props:{measureController:this.measureController,i18n:e.i18n,showExit:e.showExit}}))),!i){e.container.appendChild(this.container);const r=this.container.querySelectorAll(".fpm__text"),a=this.container.querySelector(".fpm_ui-bg"),l=this.container.querySelector(".fpm_operating-space");Object.assign(a==null?void 0:a.style,h0),Object.assign(l==null?void 0:l.style,d0),Object.assign(this.container.style,c0),r.forEach(c=>Object.assign(c.style,m0))}}dispose(){var t;this.hide(),(t=this.svelteDom)==null||t.$destroy(),this.container.remove()}show(){return this.container.style.display="block",this.container.style.opacity="1",this.container.style.transform="translate(0, 0)",this.mode==="pc"?(this.revoke=new A0(this.measureController,this.container),this.mainController=new g0(this.measureController,this.container,this._params)):this.mainController=new p0(this.measureController,this.container,this._params),this.disposers.push(this.handleExit()),this}hide(){var t,e;return this.container.style.display="none",this.container.style.opacity="0",this.container.style.transform="translate(0, 10px)",this.mode==="pc"&&((t=this.revoke)==null||t.dispose()),(e=this.mainController)==null||e.dispose(),this.disposers.forEach(i=>i()),this.disposers=[],this}}var Et=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},Ve={},F0={get exports(){return Ve},set exports(n){Ve=n}};function co(n){return n===null?"null":typeof n=="undefined"?"undefined":typeof n=="object"?Array.isArray(n)?"array":"object":typeof n}function Gd(n){return co(n)==="object"?Or(n):co(n)==="array"?zr(n):n}function zr(n){return n.map(Gd)}function Or(n){const t={};for(const e in n)n.hasOwnProperty(e)&&(t[e]=Gd(n[e]));return t}function ho(n,t=[],e={}){const i={arrayBehaviour:e.arrayBehaviour||"replace"},s=t.map(r=>r||{}),o=n||{};for(let r=0;r<s.length;r++){const a=s[r],l=Object.keys(a);for(let c=0;c<l.length;c++){const d=l[c],h=a[d],f=co(h),m=co(o[d]);if(f==="object")if(m!=="undefined"){const A=m==="object"?o[d]:{};o[d]=ho({},[A,Or(h)],i)}else o[d]=Or(h);else if(f==="array")if(m==="array"){const A=zr(h);o[d]=i.arrayBehaviour==="merge"?o[d].concat(A):A}else o[d]=zr(h);else o[d]=h}}return o}F0.exports=function(t,...e){return ho(t,e)},Ve.noMutate=function(...t){return ho({},t)},Ve.withOptions=function(t,e,i){return ho(t,e,i)};function _0(n){me(n,"svelte-1q8gtp4",".Measure-Tips.svelte-1q8gtp4.svelte-1q8gtp4{box-sizing:border-box;position:absolute;pointer-events:none;top:0;width:100%;padding:0 2.5rem}.Measure-Tips.svelte-1q8gtp4 .text.svelte-1q8gtp4{text-align:center;position:relative;max-width:100%;top:3.125rem;color:#fff;word-break:break-all;word-wrap:break-word;text-shadow:0 0.0625rem 0.375rem rgba(0, 0, 0, 0.5);font-size:1.25rem;font-weight:bold}")}function Nd(n){let t,e,i,s,o;return{c(){t=x("div"),e=x("div"),i=De(n[2]),w(e,"class","text svelte-1q8gtp4"),w(t,"class","Measure-Tips svelte-1q8gtp4")},m(r,a){O(r,t,a),L(t,e),L(e,i),n[7](e),o=!0},p(r,a){(!o||a&4)&&Se(i,r[2])},i(r){o||(We(()=>{o&&(s||(s=Ht(t,ot,{},!0)),s.run(1))}),o=!0)},o(r){s||(s=Ht(t,ot,{},!1)),s.run(0),o=!1},d(r){r&&j(t),n[7](null),r&&s&&s.end()}}}function H0(n){let t,e,i=n[0]&&Nd(n);return{c(){i&&i.c(),t=Ie()},m(s,o){i&&i.m(s,o),O(s,t,o),e=!0},p(s,[o]){s[0]?i?(i.p(s,o),o&1&&D(i,1)):(i=Nd(s),i.c(),D(i,1),i.m(t.parentNode,t)):i&&(he(),T(i,1,1,()=>{i=null}),ue())},i(s){e||(D(i),e=!0)},o(s){T(i),e=!1},d(s){i&&i.d(s),s&&j(t)}}}function W0(n,t,e){let{measureController:i}=t,{i18n:s=y=>y}=t,{tips:o}=t,{tipStyle:r={}}=t,{visible:a=!0}=t,l=null;const c=y=>{const P=i.currentMeasureType;let I="";return I=o[y],I===void 0&&(I=o[P][y]),I},d=y=>{e(2,f=s(c(y)))},h=()=>{e(2,f="")};let f="";const m=y=>{y==="Edit"&&i.changeMeasureType?d("start"):h()},A=()=>{i.getCurrentMode()==="Watch"&&h()},p=()=>{i.getCurrentMode()==="Edit"&&d("start")},g=y=>{i.currentMeasureType==="area"&&(y.length>=2?d("close"):y.length===0?d("start"):h())};gt(()=>{m(i.getCurrentMode()),i.hook.on("modeChange",m),i.hook.on("complete",A),i.hook.on("pointsChange",g),i.hook.on("measureTypeChange",p)}),Mt(()=>{i.hook.off("modeChange",m),i.hook.off("complete",A),i.hook.off("pointsChange",g),i.hook.off("measureTypeChange",p),h()});function v(y){Ne[y?"unshift":"push"](()=>{l=y,e(1,l),e(6,r)})}return n.$$set=y=>{"measureController"in y&&e(3,i=y.measureController),"i18n"in y&&e(4,s=y.i18n),"tips"in y&&e(5,o=y.tips),"tipStyle"in y&&e(6,r=y.tipStyle),"visible"in y&&e(0,a=y.visible)},n.$$.update=()=>{if(n.$$.dirty&66&&l)for(const y in r)r.hasOwnProperty(y)&&e(1,l.style[y]=r[y],l)},[a,l,f,i,s,o,r,v]}class U0 extends ce{constructor(t){super(),le(this,t,W0,H0,ae,{measureController:3,i18n:4,tips:5,tipStyle:6,visible:0},_0)}}const Y0={line:{start:"选择一个合适的位置开始测量,点击【结束】或【鼠标右键】结束测量"},area:{start:"选择一个合适的位置开始绘制平面",close:"选择3个点后将闭合平面,点击【结束】或【鼠标右键】将自动闭合"}},X0={line:{start:""},area:{start:"",close:"选择3个点后将闭合平面,点击结束自动闭合"}};class Z0{constructor(t,e){u(this,"tipSvelteDom");this.tipSvelteDom=new U0({target:e.container,props:{measureController:t,tips:Ve({},e.pointSelectorMode==="fixed"?X0:Y0,e.tips),i18n:e.i18n,visible:!0,tipStyle:e.tipStyle}})}dispose(){var t;(t=this.tipSvelteDom)==null||t.$destroy()}show(){var t;return(t=this.tipSvelteDom)==null||t.$set({visible:!0}),this}hide(){var t;return(t=this.tipSvelteDom)==null||t.$set({visible:!1}),this}}class J0{constructor(t,e){u(this,"five");u(this,"measureController");u(this,"onKeyDown",t=>{if(t.metaKey&&t.code==="KeyS"){this.measureController.save().changeMode("Watch"),t.preventDefault();return}if(t.code==="Escape")return this.escape()});u(this,"onMouseDown",t=>{t.button===2&&(t.preventDefault(),this.escape())});this.five=e,this.measureController=t;const i=this.five.getElement();i&&(document.body.addEventListener("keydown",this.onKeyDown),i.addEventListener("mousedown",this.onMouseDown))}dispose(){const t=this.five.getElement();t&&(document.body.removeEventListener("keydown",this.onKeyDown),t.removeEventListener("mousedown",this.onMouseDown))}escape(){return this.measureController.getCurrentMode()==="Watch"?this.measureController.disable():this.measureController.save().changeMode("Watch")}}function qn(n){return typeof n=="object"?n===null?{}:n:{}}class q0{constructor(t,e){u(this,"hasOpen",!1);u(this,"hook",new Ae.Subscribe);u(this,"magnifier");u(this,"controller",null);u(this,"allowMeasureType");u(this,"currentMeasureType");u(this,"five");u(this,"model");u(this,"group");u(this,"config");u(this,"isMobile");u(this,"useUIController");u(this,"params");u(this,"useGuideController");u(this,"container",document.createElement("div"));u(this,"shortcutKeyController");u(this,"disable",()=>{var t,e,i,s;this.hasOpen=!1,this.container.style.opacity="0",(t=this.controller)==null||t.dispose(),(e=this.useUIController)==null||e.hide(),(i=this.useGuideController)==null||i.hide(),(s=this.shortcutKeyController)==null||s.dispose(),this.controller=null,this.five.helperVisible=!0,this.five.scene.remove(this.group),this.five.needsRender=!0,this.hook.emit("disable",!0)});u(this,"getCurrentMode",()=>this.controller instanceof bi?"Edit":this.controller instanceof Ad?"Watch":this.controller instanceof Jn?"Mixed":this.controller instanceof gd?"View":null);u(this,"changeMode",t=>{var s;if(!this.hasOpen||this.getCurrentMode()===t)return;(s=this.controller)==null||s.dispose();const e={View:gd,Watch:Ad,Edit:bi,Mixed:Jn};if(!e[t])throw new Error("不存在的 Mode");const i=this.createControllerParams();this.controller=new e[t](i),this.hook.emit("modeChange",t)});u(this,"changeMeasureType",t=>{this.currentMeasureType=t,this.hook.emit("measureTypeChange",t)});var o,r,a,l,c,d,h,f,m;this.five=t,this.params=e,this.config=bn(e,["openParams","magnifierParams"]),this.model=new Tr(this.config),this.isMobile=(r=(o=e==null?void 0:e.openParams)==null?void 0:o.isMobile)!=null?r:!1,this.magnifier=new Zo(t,(a=e.magnifierParams)!=null?a:{width:190,height:190,scale:2}),this.allowMeasureType=Array.from(new Set((c=(l=e.editParams)==null?void 0:l.allowMeasureType)!=null?c:["line"])),this.currentMeasureType=(d=this.allowMeasureType[0])!=null?d:"line",this.group=new G.Group,this.group.name="plugin-measure-group",this.container.classList.add("five-plugin-measure-container"),this.container.style.position="absolute",this.container.style.left="0",this.container.style.top="0",this.container.style.pointerEvents="none",this.container.style.width="100%",this.container.style.height="100%",this.container.style.opacity="0";const i=(f=(h=e.editParams)==null?void 0:h.pointSelectorMode)!=null?f:ud?"fixed":"cursor",s=(m=this.params.openParams)!=null?m:{};if(this.params.useUIController!==!1){const A=V({container:this.container,openParams:s,i18n:e.i18n,pointSelectorMode:i,useNewUI:this.allowMeasureType.length>1},qn(this.params.useUIController));this.useUIController=new N0(this,A)}if(this.params.useGuideController!==!1){const A=V({container:this.container,pointSelectorMode:i,i18n:e.i18n},qn(this.params.useGuideController));this.useGuideController=new Z0(this,A)}}appendTo(t){t.append(this.container)}clear(){this.model.clear()}dispose(){var t,e;this.disable(),this.clear(),(t=this.useUIController)==null||t.dispose(),(e=this.magnifier)==null||e.dispose(),this.five.needsRender=!0}load(t){this.model.parse(t),this.save()}enable(t){var e,i;this.hasOpen||(this.hasOpen=!0,this.five.scene.add(this.group),this.container.style.opacity="1",t!=null&&t.mode?this.changeMode(t.mode):this.isMobile?this.changeMode("Mixed"):this.changeMode("Watch"),(e=this.useUIController)==null||e.show(),(i=this.useGuideController)==null||i.show(),this.shortcutKeyController=new J0(this,this.five),this.hook.emit("enable",!0))}edit(t){t&&this.changeMeasureType(t);const e=this.isMobile?"Mixed":"Edit";this.changeMode(e)}revoke(){this.controller instanceof bi&&this.controller.revoke()}removePolyline(t){this.model.removePolyline(t)}removeArea(t){this.model.removeArea(t)}removePolylineByID(t){const e=this.model.getPolylineByID(t);e&&this.model.removePolyline(e)}getPolylineByID(t){return this.model.getPolylineByID(t)}getEditedPolyline(){}highlightLine(t){if(this.getCurrentMode()!=="Watch")return!1;const e=this.model.getLineByID(t);return e?(this.controller.highlightLine(e),!0):!1}clearHighlightLines(){return this.getCurrentMode()!=="Watch"?!1:(this.controller.clearHighlightLines(),!0)}save(t){var s;if(!(this.controller instanceof bi)&&!(this.controller instanceof Jn))return this;const e=(s=t==null?void 0:t.mode)!=null?s:"View",i=this.controller.model.areas;return this.controller instanceof bi?this.controller.complete():i.forEach(o=>{o.showArea(),this.model.addArea(o)}),this.changeMode(e),this}addStartPoint(){this.controller instanceof Jn&&this.hook.emit("willChangeState","watching","editing")}addEndPoint(){this.controller instanceof Jn&&this.hook.emit("willChangeState","editing","watching")}toJson(){return this.model.toJson()}changeIsMobile(t){}changeConfigs(t){var e,i;Object.assign(this.config,t),(e=this.controller)==null||e.updateDistanceUI(),(i=this.controller)==null||i.updateAreaUI()}setCustomText(t,e){var s;const i=this.model.getLineByID(t);if(!i)throw new Error("不存在的线段");i.setText(e),(s=this.controller)==null||s.updateDistanceUI()}createControllerParams(){var i,s;const t=(i=this.params.openParams)!=null?i:{},e=(s=this.params.editParams)!=null?s:{};return t.isMobile=this.isMobile,{five:this.five,hook:this.hook,group:this.group,model:this.model,config:this.config,magnifier:this.magnifier,container:this.container,openParams:t,editParams:e,magnifierParams:this.params.magnifierParams,getMeasureType:()=>this.currentMeasureType,mouseGroup:vd(V({},t.crossHairParameter)),userDistanceItemCreator:this.params.userDistanceItemCreator}}}function uo(n,t,e){const i=n[t],s=n[e];i===void 0||s===void 0||(n[t]=s,n[e]=i)}function K0(n,t,e){const i=e/2;for(let s=1;s<=i;s++){const o=e-(s-1);for(let r=1;r<=t;r++){const a=(s-1)*t+r-1,l=(o-1)*t+r-1;uo(n,a*4+0,l*4+0),uo(n,a*4+1,l*4+1),uo(n,a*4+2,l*4+2),uo(n,a*4+3,l*4+3)}}}class $0{constructor(t,e){u(this,"width");u(this,"height");u(this,"containerDom");u(this,"hooks",new Ae.Subscribe);u(this,"canvas",document.createElement("canvas"));u(this,"five");u(this,"scale");u(this,"config");u(this,"offset",{x:0,y:0});u(this,"context");u(this,"renderCenter",new k.Vector3);u(this,"hammer");u(this,"state",{enabled:!1});u(this,"offsetRange");u(this,"isPanning",!1);u(this,"onPanstart",()=>{this.isPanning=!0,this.canvas.style.boxShadow="0 2px 30px 0 rgba(0,0,0,0.20)"});u(this,"onPan",t=>{if(!this.isPanning||!this.offsetRange||this.hooks.emit("wantsPanGesture",t))return;const{translateX:i,translateY:s}=this.getPanOffset(t,this.offsetRange);this.canvas.style.transform=`translate3d(${i}px, ${s}px, 100px)`});u(this,"onPanend",t=>{if(this.isPanning=!1,this.canvas.style.boxShadow="none",!this.offsetRange)return;const{translateX:e,translateY:i}=this.getPanOffset(t,this.offsetRange);this.canvas.style.transform=`translate3d(${e}px, ${i}px, 100px)`,this.offset={x:e,y:i}});var s,o,r;if(!t.renderer)throw new Error("Five Render 未初始化");this.five=t,this.scale=(s=e==null?void 0:e.scale)!=null?s:2,this.width=(o=e==null?void 0:e.width)!=null?o: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 i=this.canvas.getContext("2d");if(!i)throw new Error("CANNOT CREATE CONTEXT2D");this.context=i,this.config.dragEnabled&&(this.hammer=new li(this.canvas),this.hammer.on("pan",this.onPan),this.hammer.on("panstart",this.onPanstart),this.hammer.on("panend",this.onPanend)),this.initStyle()}dispose(){var t;this.clear(),this.disable(),(t=this.hammer)==null||t.destroy()}enable(){if(!this.state.enabled)return this.state.enabled=!0,this.containerDom&&this._appendTo(this.containerDom),this}disable(){if(this.state.enabled)return this.state.enabled=!1,this.canvas.remove(),this}appendTo(t){return this.containerDom=t,this.state.enabled&&this._appendTo(t),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())}renderWithScreenPoint(t){this.containerDom&&this.state.enabled&&(this.renderCenter=t,this.render(),this.config.autoFixPCPosition&&this.autoFixPCPosition())}resetOffset(){this.offset={x:0,y:0},this.canvas.style.transform="translate3d(0px, 0px, 100px)"}getCurrentState(){return{enabled:this.state.enabled}}getRenderCenter(){return this.renderCenter}_appendTo(t){if(this.resetOffset(),t.appendChild(this.canvas),!this.offsetRange){const e=this.canvas.getBoundingClientRect(),i=t.getBoundingClientRect(),s=i.right-e.right,o=i.bottom-e.bottom,r=i.left-e.left,a=i.top-e.top;this.offsetRange={min:{x:r,y:a},max:{x:s,y:o}}}}autoFixPCPosition(){if(!this.containerDom)return;const{width:t,height:e}=this,[i,s,o]=(()=>{if(this.renderCenter instanceof k.Vector3){const r=this.renderCenter.clone().project(this.five.camera);return[(r.x+1)/2*this.containerDom.clientWidth,-(r.x-1)/2*this.containerDom.clientWidth,-(r.y-1)/2*this.containerDom.clientHeight]}else return[this.renderCenter.x,this.containerDom.clientWidth-this.renderCenter.x,this.renderCenter.y]})();i<183?(this.canvas.style.top=-e/2+"px",this.canvas.style.left="90px"):o<183?(this.canvas.style.top="90px",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(${i}px, ${o}px, 10px)`,this.offset={x:i,y:o}}render(){if(!this.five.renderer||!this.containerDom)return;const{scale:t,context:e,width:i,height:s}=this,o=this.five.renderer.getSize(new k.Vector2),[r,a]=(()=>{if(this.renderCenter instanceof k.Vector3){const g=this.renderCenter.clone().project(this.five.camera);return[(g.x+1)/2*o.x,(g.y+1)/2*o.y]}else return[this.renderCenter.x,o.y-this.renderCenter.y]})(),l=1,c=i/t,d=s/t,h=l*t,f=this.five.getPixels(r-c/2,a-c/2,c,d,h),m=Math.floor(i*l),A=Math.floor(s*l);K0(f,m,A);const p=new ImageData(m,A);p.data.set(f),e.putImageData(p,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")}getPanOffset(t,e){const{min:{x:i,y:s},max:{x:o,y:r}}=e,a=this.offset.x+t.deltaX,l=this.offset.y+t.deltaY,c=Math.min(Math.max(a,i),o),d=Math.min(Math.max(l,s),r);return{translateX:c,translateY:d}}}const eb=function(t,e){return new q0(t,e)},Fd=Ar(null);function tb(n){me(n,"svelte-19zi46m",".PanoSpatialTagPlugin__tag-origin.svelte-19zi46m{position:absolute;width:0.5rem;height:0.5rem;border-radius:50%;background:#fff;box-shadow:0 0 .6rem #fff;transform:translate(-50%, -50%) scale(1);transform-origin:center center;animation:svelte-19zi46m-PanoSpatialTagPlugin__tag-origin 1.2s forwards;pointer-events:auto}.PanoSpatialTagPlugin__tag-origin.svelte-19zi46m:after{content:'';position:absolute;top:50%;height:50%;width:2rem;height:2rem;transform:translate(-50%, -50%)}.PanoSpatialTagPlugin__tag-origin-destroy.svelte-19zi46m{transform:translate(-50%, -50%) scale(0.6);animation:svelte-19zi46m-PanoSpatialTagPlugin__tag-origin-destroy 1.2s forwards .7s}@keyframes svelte-19zi46m-PanoSpatialTagPlugin__tag-origin{0%{transform:translate(-50%, -50%) scale(1);opacity:0}100%{transform:translate(-50%, -50%) scale(0.6);opacity:1 }}@keyframes svelte-19zi46m-PanoSpatialTagPlugin__tag-origin-destroy{0%{transform:translate(-50%, -50%) scale(0.6);opacity:1}10%{transform:translate(-50%, -50%) scale(1);opacity:0.9}100%{transform:translate(-50%, -50%) scale(1);opacity:0}}")}function _d(n,t,e){const i=n.slice();return i[3]=t[e],i}function Hd(n){let t,e=`${n[3].top}%`,i=`${n[3].left}%`,s,o;function r(){return n[2](n[3])}return{c(){t=x("i"),w(t,"class","svelte-19zi46m"),$(t,"PanoSpatialTagPlugin__tag-origin",!0),$(t,"PanoSpatialTagPlugin__tag-origin-destroy",n[3].destroying),S(t,"top",e),S(t,"left",i),S(t,"visibility",n[3].front?"visible":"hidden")},m(a,l){O(a,t,l),s||(o=be(t,"click",r),s=!0)},p(a,l){n=a,l&1&&$(t,"PanoSpatialTagPlugin__tag-origin-destroy",n[3].destroying),l&1&&e!==(e=`${n[3].top}%`)&&S(t,"top",e),l&1&&i!==(i=`${n[3].left}%`)&&S(t,"left",i),l&1&&S(t,"visibility",n[3].front?"visible":"hidden")},d(a){a&&j(t),s=!1,o()}}}function ib(n){let t,e=n[0],i=[];for(let s=0;s<e.length;s+=1)i[s]=Hd(_d(n,e,s));return{c(){for(let s=0;s<i.length;s+=1)i[s].c();t=Ie()},m(s,o){for(let r=0;r<i.length;r+=1)i[r]&&i[r].m(s,o);O(s,t,o)},p(s,[o]){if(o&3){e=s[0];let r;for(r=0;r<e.length;r+=1){const a=_d(s,e,r);i[r]?i[r].p(a,o):(i[r]=Hd(a),i[r].c(),i[r].m(t.parentNode,t))}for(;r<i.length;r+=1)i[r].d(1);i.length=e.length}},i:J,o:J,d(s){Ot(i,s),s&&j(t)}}}function nb(n,t,e){let{origins:i}=t;const s=r=>{Fd.update(()=>`${r}-PanoSpatialTagPlugin-${Date.now()}`)},o=r=>s(r.id);return n.$$set=r=>{"origins"in r&&e(0,i=r.origins)},[i,s,o]}class sb extends ce{constructor(t){super(),le(this,t,nb,ib,ae,{origins:0},tb)}}function ob(n){me(n,"svelte-9m6drd",`.PanoSpatialTagPlugin__tag-x.svelte-9m6drd.svelte-9m6drd{position:absolute;top:0;left:0;display:block;white-space:nowrap;box-sizing:border-box;width:25rem;height:14rem;color:#fff;transform:translate(0, -100%);transition:height 0.5s linear}.PanoSpatialTagPlugin__tag-shadow.svelte-9m6drd.svelte-9m6drd{content:'';position:absolute;width:30rem;height:30rem;top:-15rem;left:-15rem;z-index:-1;opacity:0;transition:opacity 0.8s 0.6s;background:url('https://vrlab-image4.ljcdn.com/release/web/PanoSpatialTagPlugin__blur.png');background-size:30rem 30rem}.PanoSpatialTagPlugin__tag-line.svelte-9m6drd.svelte-9m6drd{position:absolute;left:-1rem;width:2rem;height:100%;overflow:hidden}.PanoSpatialTagPlugin__tag-flagpole.svelte-9m6drd.svelte-9m6drd{position:absolute;top:0;left:1rem;height:calc(100% - 1.5rem);width:0.15rem;background:linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0.1));box-shadow:0 0.1rem 0.5rem rgba(0, 0, 0, 0.2);opacity:0;transform:translate(-50%, 60%) scaleY(0);transition:transform 0.4s cubic-bezier(0.44, 0.44, 0.74, 0.98), opacity 0.4s cubic-bezier(0.44, 0.44, 0.74, 0.98), width 0.5s linear,
516
516
  height 0.5s linear;transform-origin:center bottom}.PanoSpatialTagPlugin__tag-line1.svelte-9m6drd.svelte-9m6drd{position:absolute;top:0;left:0.3rem;height:1.8rem;width:0.1rem;background:#fff;opacity:0;transform:translate(-50%, 200%) scaleY(0);transform-origin:center top}.PanoSpatialTagPlugin__tag-line2.svelte-9m6drd.svelte-9m6drd{position:absolute;top:0;left:0.5rem;height:1.8rem;width:0.1rem;background:#fff;opacity:0;transform:translate(-50%, 200%) scaleY(0);transform-origin:center top}.PanoSpatialTagPlugin__tag-show.svelte-9m6drd .PanoSpatialTagPlugin__tag-line1.svelte-9m6drd{animation:svelte-9m6drd-PanoSpatialTagPlugin__tag-line1 linear 0.5s forwards 0.45s}.PanoSpatialTagPlugin__tag-show.svelte-9m6drd .PanoSpatialTagPlugin__tag-line2.svelte-9m6drd{animation:svelte-9m6drd-PanoSpatialTagPlugin__tag-line2 linear 0.5s forwards 0.65s}.PanoSpatialTagPlugin__tag-x.PanoSpatialTagPlugin__tag-upside-down.svelte-9m6drd.svelte-9m6drd{transform:translate(0, 0)}.PanoSpatialTagPlugin__tag-upside-down.svelte-9m6drd .PanoSpatialTagPlugin__tag-line.svelte-9m6drd{transform:scaleY(-1)}.PanoSpatialTagPlugin__tag-animate.svelte-9m6drd.svelte-9m6drd{position:relative;height:100%;overflow:hidden;transform-origin:left top;transition:transform 0.5s linear}.PanoSpatialTagPlugin__tag-upside-down.svelte-9m6drd .PanoSpatialTagPlugin__tag-animate.svelte-9m6drd{transform-origin:left bottom}.PanoSpatialTagPlugin__tag-content.svelte-9m6drd.svelte-9m6drd{position:absolute;display:inline-block;transform:translate(-100%, 0);transition:transform 0.9s cubic-bezier(0, 0.65, 0.16, 1.08) 0.6s;padding-left:0.5rem;font-size:1rem}.PanoSpatialTagPlugin__tag-upside-down.svelte-9m6drd .PanoSpatialTagPlugin__tag-content.svelte-9m6drd{bottom:0}.PanoSpatialTagPlugin__tag-show.svelte-9m6drd .PanoSpatialTagPlugin__tag-flagpole.svelte-9m6drd{opacity:1;transform:translate(-50%, 0) scaleY(1)}.PanoSpatialTagPlugin__tag-upside-down.svelte-9m6drd .PanoSpatialTagPlugin__tag-shadow.svelte-9m6drd{top:unset;bottom:-15rem}.PanoSpatialTagPlugin__tag-show.svelte-9m6drd .PanoSpatialTagPlugin__tag-shadow.svelte-9m6drd{opacity:0.32}.PanoSpatialTagPlugin__tag-show.svelte-9m6drd .PanoSpatialTagPlugin__tag-content.svelte-9m6drd{transform:translate(0, 0)}.PanoSpatialTagPlugin__tag-hide.svelte-9m6drd .PanoSpatialTagPlugin__tag-flagpole.svelte-9m6drd{opacity:0;transform:translate(-50%, 60%) scaleY(0);transition:transform 0.5s 0.55s, opacity 0.4s 0.55s}.PanoSpatialTagPlugin__tag-hide.svelte-9m6drd .PanoSpatialTagPlugin__tag-shadow.svelte-9m6drd{opacity:0;transition:opacity 0.8s}.PanoSpatialTagPlugin__tag-hide.svelte-9m6drd .PanoSpatialTagPlugin__tag-content.svelte-9m6drd{transform:translate(-100%, 0);transition:transform 0.6s cubic-bezier(0.53, 0.06, 0.88, 0.59)}.PanoSpatialTagPlugin__tag-hide.svelte-9m6drd .PanoSpatialTagPlugin__tag-content .svelte-9m6drd{pointer-events:none}.PanoSpatialTagPlugin__tag-hide.svelte-9m6drd .PanoSpatialTagPlugin__tag-line1.svelte-9m6drd{opacity:0.5;transform:translate(-50%, 10%) scaleY(0);animation:svelte-9m6drd-PanoSpatialTagPlugin__tag-line1-hide linear 0.28s forwards 0.3s}.PanoSpatialTagPlugin__tag-hide.svelte-9m6drd .PanoSpatialTagPlugin__tag-line2.svelte-9m6drd{opacity:0.5;transform:translate(-50%, 0) scaleY(0);animation:svelte-9m6drd-PanoSpatialTagPlugin__tag-line2-hide linear 0.28s forwards 0.45s}@keyframes svelte-9m6drd-PanoSpatialTagPlugin__tag-line1{0%{opacity:0;transform:translate(-50%, 250%) scaleY(1)}50%{opacity:0.5;transform:translate(-50%, 135%) scaleY(1)}100%{opacity:0.5;transform:translate(-50%, 20%) scaleY(0)}}@keyframes svelte-9m6drd-PanoSpatialTagPlugin__tag-line2{0%{opacity:0;transform:translate(-50%, 250%) scaleY(1)}50%{opacity:0.5;transform:translate(-50%, 125%) scaleY(1)}100%{opacity:0.5;transform:translate(-50%, 0) scaleY(0)}}@keyframes svelte-9m6drd-PanoSpatialTagPlugin__tag-line1-hide{0%{opacity:0.5;transform:translate(-50%, 10%) scaleY(0)}50%{opacity:0.2;transform:translate(-50%, 105%) scaleY(1)}100%{opacity:0;transform:translate(-50%, 200%) scaleY(0)}}@keyframes svelte-9m6drd-PanoSpatialTagPlugin__tag-line2-hide{0%{opacity:0.5;transform:translate(-50%, 0) scaleY(0)}50%{opacity:0.2;transform:translate(-50%, 100%) scaleY(1)}100%{opacity:0;transform:translate(-50%, 200%) scaleY(0)}}`)}function rb(n){let t,e,i,s,o,r,a,l,c,d,h,f,m,A,p;return{c(){t=x("div"),e=x("div"),i=K(),s=x("div"),o=x("i"),r=K(),a=x("i"),l=K(),c=x("i"),d=K(),h=x("div"),f=x("div"),w(e,"class","PanoSpatialTagPlugin__tag-shadow svelte-9m6drd"),S(e,"transform","translate("+n[7]/2*n[3]*3+"px, "+n[8]/2*(n[1]?-1:1)*n[3]*3+"px) scale("+1/n[3]+")"),w(o,"class","PanoSpatialTagPlugin__tag-flagpole svelte-9m6drd"),S(o,"width",n[4]+"rem"),w(a,"class","PanoSpatialTagPlugin__tag-line1 svelte-9m6drd"),w(c,"class","PanoSpatialTagPlugin__tag-line2 svelte-9m6drd"),w(s,"class","PanoSpatialTagPlugin__tag-line svelte-9m6drd"),w(f,"class","PanoSpatialTagPlugin__tag-content svelte-9m6drd"),w(h,"class","PanoSpatialTagPlugin__tag-animate svelte-9m6drd"),S(h,"transform","scale("+n[3]*3+")"),w(t,"id",m="PanoSpatialTagPlugin__"+n[0]),S(t,"height",20*n[5]+"rem"),w(t,"class","svelte-9m6drd"),$(t,"PanoSpatialTagPlugin__tag-x",!0),$(t,"PanoSpatialTagPlugin__tag-upside-down",n[1]),$(t,"PanoSpatialTagPlugin__tag-show",n[10]),$(t,"PanoSpatialTagPlugin__tag-hide",n[10]===!1||n[6])},m(g,v){O(g,t,v),L(t,e),L(t,i),L(t,s),L(s,o),L(s,r),L(s,a),L(s,l),L(s,c),L(t,d),L(t,h),L(h,f),f.innerHTML=n[2],n[16](f),A||(p=be(f,"click",n[11]),A=!0)},p(g,[v]){v&394&&S(e,"transform","translate("+g[7]/2*g[3]*3+"px, "+g[8]/2*(g[1]?-1:1)*g[3]*3+"px) scale("+1/g[3]+")"),v&16&&S(o,"width",g[4]+"rem"),v&4&&(f.innerHTML=g[2]),v&8&&S(h,"transform","scale("+g[3]*3+")"),v&1&&m!==(m="PanoSpatialTagPlugin__"+g[0])&&w(t,"id",m),v&32&&S(t,"height",20*g[5]+"rem"),v&2&&$(t,"PanoSpatialTagPlugin__tag-upside-down",g[1]),v&1024&&$(t,"PanoSpatialTagPlugin__tag-show",g[10]),v&1088&&$(t,"PanoSpatialTagPlugin__tag-hide",g[10]===!1||g[6])},i:J,o:J,d(g){g&&j(t),n[16](null),A=!1,p()}}}function ab(n,t,e){let{id:i}=t,{upsideDown:s}=t,{content:o}=t,{contentZoom:r}=t,{lineWidthZoom:a}=t,{lineHeightZoom:l}=t,{destroying:c=!1}=t,{folded:d}=t,{dispose:h}=t,{events:f}=t,{hooks:m}=t,A=0,p=0,g,v,y=setTimeout(()=>{d||e(10,v=!0),y=void 0},100);const P=C=>{const z=Object.keys(f);let R=C.target;for(;R;){const U=R.getAttribute("class");if(!U){R=R.parentNode;continue}if(U.includes("PanoSpatialTagPlugin__tag-content")){R=null;break}z.forEach(H=>{U.includes(H)&&f[H](i)}),R=R.parentNode}};gt(()=>{m.emit("initTag",{id:i})});const I=Fd.subscribe(C=>{if(C===null)return;const[z,R]=C.split("-PanoSpatialTagPlugin-");i===z&&(m.emit("clickOrigin",{id:i,show:v}),y||(e(10,v=d),e(12,d=!d),y=setTimeout(()=>{y=void 0},1500)))});_l(()=>{e(7,A=g.offsetWidth),e(8,p=g.offsetHeight),!y&&e(10,v=!d)}),Mt(()=>{m.emit("destroyTag",{id:i}),I(),h()});function E(C){Ne[C?"unshift":"push"](()=>{g=C,e(9,g)})}return n.$$set=C=>{"id"in C&&e(0,i=C.id),"upsideDown"in C&&e(1,s=C.upsideDown),"content"in C&&e(2,o=C.content),"contentZoom"in C&&e(3,r=C.contentZoom),"lineWidthZoom"in C&&e(4,a=C.lineWidthZoom),"lineHeightZoom"in C&&e(5,l=C.lineHeightZoom),"destroying"in C&&e(6,c=C.destroying),"folded"in C&&e(12,d=C.folded),"dispose"in C&&e(13,h=C.dispose),"events"in C&&e(14,f=C.events),"hooks"in C&&e(15,m=C.hooks)},[i,s,o,r,a,l,c,A,p,g,v,P,d,h,f,m,E]}let lb=class extends ce{constructor(t){super(),le(this,t,ab,rb,ae,{id:0,upsideDown:1,content:2,contentZoom:3,lineWidthZoom:4,lineHeightZoom:5,destroying:6,folded:12,dispose:13,events:14,hooks:15},ob)}};const cb={position:"absolute",top:"0px",left:"0px",width:"100%",height:"100%",pointerEvents:"none"},Wd="<",Ud=">",Yd="%",Xd="locals",db="(<%%|%%>|<%=|<%-|<%_|<%#|<%|%>|-%>|_%>)",hb={"&":"&amp","<":"&lt",">":"&gt",'"':"&#34","'":"&#39"},At={EVAL:"eval",ESCAPED:"escaped",RAW:"raw",COMMENT:"comment",LITERAL:"literal"};function Zd(n){return n.replace(/;(\s*$)/,"$1")}function ub(n,t){return new fb(n).compileFunction()(t)}class fb{constructor(t){u(this,"templateText");u(this,"mode",null);u(this,"truncate",!1);u(this,"currentLine",1);u(this,"source","");u(this,"regex",new RegExp(db));this.templateText=t}compileFunction(){let t;const e=` var __output = "";
517
517
  function __append(s) { if (s !== undefined && s !== null) __output += s }
518
518
  with (`+Xd+` || {}) {
@@ -528,7 +528,7 @@ void main() {
528
528
  `)}switch(this.mode){case At.EVAL:this.source+=" ; "+t+`
529
529
  `;break;case At.ESCAPED:this.source+=" ; __append(escapeFn("+Zd(t)+`))
530
530
  `;break;case At.RAW:this.source+=" ; __append("+Zd(t)+`)
531
- `;break;case At.COMMENT:break;case At.LITERAL:this._addOutput(t);break}}else this._addOutput(t)}}}const Br=.001,Jd=.01,mb="https://vrlab-image4.ljcdn.com/release/web/PanoSpatialTagPlugin__blur.png",gb=(n,t)=>{var fe,de,ke,Pe,we,Fe,Ce,Ze;let e=t==null?void 0:t.container,i=1.4;const s=(fe=t==null?void 0:t.wait)!=null?fe:200,o=(de=t==null?void 0:t.maxNumberOnScreen)!=null?de:3,r=(ke=t==null?void 0:t.minRad)!=null?ke:Math.PI/4,a=(Pe=t==null?void 0:t.nearTolerance)!=null?Pe:100,l=(we=t==null?void 0:t.upsideHeight)!=null?we:1.6,c=(Fe=t==null?void 0:t.minDistance)!=null?Fe:1.2,d=(Ce=t==null?void 0:t.maxDistance)!=null?Ce:3.5,h=Bs(n),f=document.createElement("div");f.classList.add("PanoSpatialTagPlugin"),Object.assign(f.style,cb);const m=new Ae.Subscribe;let A=new Image;A.src=mb;const p={points:[],origins:[],tags:[],template:"",events:{},render:ub,folded:!1,enabled:!0,forbidden:!0},g=new sb({target:f,props:{origins:p.origins}}),v=(te,ye)=>{E(),ye&&C()},y=()=>{p.forbidden&&(p.forbidden=!1,C())},P=(te,ye)=>{if(p.tags.length===0)return;const ze=ye.longitude-n.state.longitude,pe=n.camera.clone();pe.position.copy(ye.offset),pe.rotateOnWorldAxis(new k.Vector3(0,1,0),ze),pe.updateProjectionMatrix(),pe.updateMatrixWorld(!0);const Ke=new k.Frustum,rt=new k.Matrix4;rt.multiplyMatrices(pe.projectionMatrix,pe.matrixWorldInverse),Ke.setFromProjectionMatrix(rt),p.tags.forEach(xe=>{const tt=pe.position.clone().setY(i).distanceTo(xe.position);if(tt<c||tt>d||!Ke.containsPoint(xe.position))return xe.destroying=!0;const re=xe.position.clone().sub(pe.position).setY(0);if(re.angleTo(xe.normal)>Math.PI/2-r&&re.angleTo(xe.normal)<Math.PI/2+r)return xe.destroying=!0}),p.tags.forEach(xe=>{xe.destroying?xe.app.$set({contentZoom:.1+pe.position.distanceTo(xe.position)/d,lineWidthZoom:.38*(.01+pe.position.distanceTo(xe.position)/d),destroying:xe.destroying}):xe.app.$set({lineWidthZoom:.38*(.01+pe.position.distanceTo(xe.position)/d),lineHeightZoom:.4+(pe.position.distanceTo(xe.position)-c)/d*.6,contentZoom:.1+pe.position.distanceTo(xe.position)/d})}),setTimeout(()=>{p.tags.forEach(xe=>{xe.destroying&&(xe.app.$destroy(),xe=null)}),p.tags=p.tags.filter(xe=>!xe.destroying),E()},1900)},I=te=>{te!==Ae.Five.Mode.Panorama&&!p.forbidden&&(g.$set({origins:[]}),p.tags.forEach(ye=>{ye.app.$destroy(),ye=null}),p.origins=[],p.tags=[],p.forbidden=!0)},E=()=>{if(p.forbidden||!p.enabled)return;const te=n.camera,ye=te.getWorldDirection(new k.Vector3);p.origins=p.tags.map(ze=>{const pe=ze.position.clone().project(te),Ke=ze.position.clone().sub(te.position).setY(0).angleTo(ye.setY(0))<Math.PI/2;return{id:ze.id,front:Ke,left:(pe.x+1)/2*100,top:(-pe.y+1)/2*100,destroying:ze.destroying}}),g.$set({origins:p.origins})},C=()=>{p.forbidden||!p.enabled||(p.timeoutId&&clearTimeout(p.timeoutId),p.timeoutId=setTimeout(()=>{p.timeoutId=void 0;const te=z();te.length&&(p.tags=p.tags.concat(te),E())},s))},z=()=>{const{clientWidth:te,clientHeight:ye}=n.getElement(),ze=[],pe=n.camera,Ke=new k.Frustum,rt=new k.Matrix4,xe=pe.getWorldDirection(new k.Vector3);rt.multiplyMatrices(pe.projectionMatrix,pe.matrixWorldInverse),Ke.setFromProjectionMatrix(rt);const tt=p.tags.filter(Me=>Ke.containsPoint(Me.position)&&!Me.destroying).length,re=p.points.reduce((Me,_e)=>{if(p.tags.find(Qe=>_e.id===Qe.id&&!Qe.destroying))return Me;const Ue=pe.position.clone().setY(i).distanceTo(_e.position);if(Ue<c||Ue>d||!Ke.containsPoint(_e.position))return Me;const wt=_e.position.clone().sub(pe.position).setY(0);if(wt.angleTo(_e.normal)>Math.PI/2-r&&wt.angleTo(_e.normal)<Math.PI/2+r)return Me;const it=_e.position.clone().project(pe);if(!p.tags.every(Qe=>{if(Qe.position.clone().sub(pe.position).setY(0).angleTo(xe.setY(0))>Math.PI/2)return!0;const Je=Qe.position.clone().project(pe);return Math.sqrt(Math.pow((it.x-Je.x)/2*te,2)+Math.pow((it.y-Je.y)/2*ye,2))>a}))return Me;const vt={id:_e.id,position:_e.position,normal:_e.normal,replacement:_e.replacement,weight:_e.weight,distance:Ue};let Re;for(let Qe=0,Je=Me.length;Qe<Je;Qe++){const Rt=Me[Qe];if(vt.weight>Rt.weight){Re=Qe;break}if(vt.distance<Rt.distance){Re=Qe;break}}return Re!==void 0?Me.splice(Re,0,vt):Me.push(vt),Me},[]);for(let Me=0,_e=re.length;Me<_e&&!(tt+ze.length>=o);Me++){const Ue=re[Me];if(ze.find(Re=>Ue.id===Re.id))continue;const wt=Ue.position.clone().project(pe);if(!p.tags.concat(ze).every(Re=>{if(Re.position.clone().sub(pe.position).setY(0).angleTo(xe.setY(0))>Math.PI/2)return!0;const Qe=Re.position.clone().project(pe);return Math.sqrt(Math.pow((wt.x-Qe.x)/2*te,2)+Math.pow((wt.y-Qe.y)/2*ye,2))>a}))continue;const it=new k.Raycaster(pe.position.clone().setY(i),Ue.position.clone().sub(pe.position.clone().setY(i)).normalize(),0,Ue.distance+Jd),[vt]=p.intersectObjects?it.intersectObjects(p.intersectObjects,!0):n.model.loaded?n.model.intersectRaycaster(it):it.intersectObjects(n.model.children,!0);if(vt&&Ue.distance-vt.distance<Jd){const{position:Re,normal:Qe,id:Je,replacement:Rt}=Ue,cs=new k.Plane().setFromNormalAndCoplanarPoint(Qe,Re),Xt=Re.clone().sub(pe.position).cross(new k.Vector3(0,1,0)).setLength(Br),Ci=[Re.clone(),Re.clone().add(Xt),Re.clone().add(new k.Vector3(0,Br,0)).add(Xt),Re.clone().add(new k.Vector3(0,Br,0))].map(Tn=>cs.projectPoint(Tn,new k.Vector3)),{container:_i,dispose:Ct}=h.create3DDomContainer(Ci)||{},Ln=new lb({target:_i,props:{id:Je,content:p.render(p.template,Rt),lineWidthZoom:.38*(.01+pe.position.distanceTo(Re)/d),lineHeightZoom:.4+(pe.position.distanceTo(Re)-c)/d*.6,contentZoom:.1+pe.position.distanceTo(Re)/d,upsideDown:Re.y>l,folded:p.folded,events:p.events,hooks:m,dispose:Ct}});ze.push({position:Re,normal:Qe,id:Je,app:Ln})}}return ze},R=te=>{p.points=te.points.map(ye=>{var ze,pe;return{id:ye.id,position:new k.Vector3().fromArray(ye.position),normal:new k.Vector3().fromArray(ye.normal),replacement:(ze=ye.replacement)!=null?ze:{},weight:(pe=ye.weight)!=null?pe:-1}}),te.render&&(p.render=te.render),te.template&&(p.template=te.template),te.events&&(p.events=te.events),te.enabled===!1&&(p.enabled=te.enabled),te.folded===!0&&(p.folded=te.folded)},U=te=>{p.intersectObjects=te,C()},H=()=>{p.enabled=!0,C()},N=()=>{p.enabled=!1,g.$set({origins:[]}),p.tags.forEach(te=>{te.app.$destroy(),te=null}),p.origins=[],p.tags=[]},F=()=>{p.folded=!1,p.tags.forEach(te=>{te.app.$set({folded:p.folded})})},Q=()=>{p.folded=!0,p.tags.forEach(te=>{te.app.$set({folded:p.folded})})},_=te=>{p.tags.forEach(ye=>{ye.id===te&&ye.app.$set({folded:!1})})},Y=te=>{p.tags.forEach(ye=>{ye.id===te&&ye.app.$set({folded:!0})})},Z=()=>{n.once("renderFrame",E)},q=()=>{e||(e=n.getElement().parentElement),e&&e.appendChild(f),p.forbidden=!1,i=n.model.bounding.getCenter(new k.Vector3).y,C(),n.on("panoWillArrive",P),n.on("panoArrived",y),n.on("modeChange",I),n.on("cameraUpdate",v)},ee=()=>{A=null,h.disposeAll(),g.$destroy(),p.tags.forEach(te=>{te.app.$destroy(),te=null}),p.origins=[],p.tags=[],n.off("modelLoaded",q),n.off("renderFrame",E),n.off("panoWillArrive",P),n.off("panoArrived",y),n.off("modeChange",I),n.off("cameraUpdate",v),n.off("dispose",ee),window.removeEventListener("resize",Z,!1)};return window.addEventListener("resize",Z,!1),(Ze=n==null?void 0:n.model)!=null&&Ze.loaded?q():n.once("modelLoaded",q),n.on("dispose",ee),{load:R,setIntersectObjects:U,unfoldAll:F,foldAll:Q,unfold:_,fold:Y,enable:H,disable:N,hooks:m,dispose:ee}};var Vi=(n=>(n.SMALL="small",n.MIDLLE="middle",n.LARGE="large",n.EXTRA_LARGE="x-large",n))(Vi||{}),Vr={},pb={get exports(){return Vr},set exports(n){Vr=n}};/*!
531
+ `;break;case At.COMMENT:break;case At.LITERAL:this._addOutput(t);break}}else this._addOutput(t)}}}const Br=.001,Jd=.01,mb="https://vrlab-image4.ljcdn.com/release/web/PanoSpatialTagPlugin__blur.png",gb=(n,t)=>{var fe,de,ke,Pe,we,Fe,Ce,Ze;let e=t==null?void 0:t.container,i=1.4;const s=(fe=t==null?void 0:t.wait)!=null?fe:200,o=(de=t==null?void 0:t.maxNumberOnScreen)!=null?de:3,r=(ke=t==null?void 0:t.minRad)!=null?ke:Math.PI/4,a=(Pe=t==null?void 0:t.nearTolerance)!=null?Pe:100,l=(we=t==null?void 0:t.upsideHeight)!=null?we:1.6,c=(Fe=t==null?void 0:t.minDistance)!=null?Fe:1.2,d=(Ce=t==null?void 0:t.maxDistance)!=null?Ce:3.5,h=Bs(n),f=document.createElement("div");f.classList.add("PanoSpatialTagPlugin"),Object.assign(f.style,cb);const m=new Ae.Subscribe;let A=new Image;A.src=mb;const p={points:[],origins:[],tags:[],template:"",events:{},render:ub,folded:!1,enabled:!0,forbidden:!0},g=new sb({target:f,props:{origins:p.origins}}),v=(te,ye)=>{E(),ye&&C()},y=()=>{p.forbidden&&(p.forbidden=!1,C())},P=(te,ye)=>{if(p.tags.length===0)return;const ze=ye.longitude-n.state.longitude,pe=n.camera.clone();pe.position.copy(ye.offset),pe.rotateOnWorldAxis(new k.Vector3(0,1,0),ze),pe.updateProjectionMatrix(),pe.updateMatrixWorld(!0);const Ke=new k.Frustum,rt=new k.Matrix4;rt.multiplyMatrices(pe.projectionMatrix,pe.matrixWorldInverse),Ke.setFromProjectionMatrix(rt),p.tags.forEach(xe=>{const it=pe.position.clone().setY(i).distanceTo(xe.position);if(it<c||it>d||!Ke.containsPoint(xe.position))return xe.destroying=!0;const re=xe.position.clone().sub(pe.position).setY(0);if(re.angleTo(xe.normal)>Math.PI/2-r&&re.angleTo(xe.normal)<Math.PI/2+r)return xe.destroying=!0}),p.tags.forEach(xe=>{xe.destroying?xe.app.$set({contentZoom:.1+pe.position.distanceTo(xe.position)/d,lineWidthZoom:.38*(.01+pe.position.distanceTo(xe.position)/d),destroying:xe.destroying}):xe.app.$set({lineWidthZoom:.38*(.01+pe.position.distanceTo(xe.position)/d),lineHeightZoom:.4+(pe.position.distanceTo(xe.position)-c)/d*.6,contentZoom:.1+pe.position.distanceTo(xe.position)/d})}),setTimeout(()=>{p.tags.forEach(xe=>{xe.destroying&&(xe.app.$destroy(),xe=null)}),p.tags=p.tags.filter(xe=>!xe.destroying),E()},1900)},I=te=>{te!==Ae.Five.Mode.Panorama&&!p.forbidden&&(g.$set({origins:[]}),p.tags.forEach(ye=>{ye.app.$destroy(),ye=null}),p.origins=[],p.tags=[],p.forbidden=!0)},E=()=>{if(p.forbidden||!p.enabled)return;const te=n.camera,ye=te.getWorldDirection(new k.Vector3);p.origins=p.tags.map(ze=>{const pe=ze.position.clone().project(te),Ke=ze.position.clone().sub(te.position).setY(0).angleTo(ye.setY(0))<Math.PI/2;return{id:ze.id,front:Ke,left:(pe.x+1)/2*100,top:(-pe.y+1)/2*100,destroying:ze.destroying}}),g.$set({origins:p.origins})},C=()=>{p.forbidden||!p.enabled||(p.timeoutId&&clearTimeout(p.timeoutId),p.timeoutId=setTimeout(()=>{p.timeoutId=void 0;const te=z();te.length&&(p.tags=p.tags.concat(te),E())},s))},z=()=>{const{clientWidth:te,clientHeight:ye}=n.getElement(),ze=[],pe=n.camera,Ke=new k.Frustum,rt=new k.Matrix4,xe=pe.getWorldDirection(new k.Vector3);rt.multiplyMatrices(pe.projectionMatrix,pe.matrixWorldInverse),Ke.setFromProjectionMatrix(rt);const it=p.tags.filter(Me=>Ke.containsPoint(Me.position)&&!Me.destroying).length,re=p.points.reduce((Me,_e)=>{if(p.tags.find(Qe=>_e.id===Qe.id&&!Qe.destroying))return Me;const Ue=pe.position.clone().setY(i).distanceTo(_e.position);if(Ue<c||Ue>d||!Ke.containsPoint(_e.position))return Me;const wt=_e.position.clone().sub(pe.position).setY(0);if(wt.angleTo(_e.normal)>Math.PI/2-r&&wt.angleTo(_e.normal)<Math.PI/2+r)return Me;const nt=_e.position.clone().project(pe);if(!p.tags.every(Qe=>{if(Qe.position.clone().sub(pe.position).setY(0).angleTo(xe.setY(0))>Math.PI/2)return!0;const Je=Qe.position.clone().project(pe);return Math.sqrt(Math.pow((nt.x-Je.x)/2*te,2)+Math.pow((nt.y-Je.y)/2*ye,2))>a}))return Me;const vt={id:_e.id,position:_e.position,normal:_e.normal,replacement:_e.replacement,weight:_e.weight,distance:Ue};let Re;for(let Qe=0,Je=Me.length;Qe<Je;Qe++){const Rt=Me[Qe];if(vt.weight>Rt.weight){Re=Qe;break}if(vt.distance<Rt.distance){Re=Qe;break}}return Re!==void 0?Me.splice(Re,0,vt):Me.push(vt),Me},[]);for(let Me=0,_e=re.length;Me<_e&&!(it+ze.length>=o);Me++){const Ue=re[Me];if(ze.find(Re=>Ue.id===Re.id))continue;const wt=Ue.position.clone().project(pe);if(!p.tags.concat(ze).every(Re=>{if(Re.position.clone().sub(pe.position).setY(0).angleTo(xe.setY(0))>Math.PI/2)return!0;const Qe=Re.position.clone().project(pe);return Math.sqrt(Math.pow((wt.x-Qe.x)/2*te,2)+Math.pow((wt.y-Qe.y)/2*ye,2))>a}))continue;const nt=new k.Raycaster(pe.position.clone().setY(i),Ue.position.clone().sub(pe.position.clone().setY(i)).normalize(),0,Ue.distance+Jd),[vt]=p.intersectObjects?nt.intersectObjects(p.intersectObjects,!0):n.model.loaded?n.model.intersectRaycaster(nt):nt.intersectObjects(n.model.children,!0);if(vt&&Ue.distance-vt.distance<Jd){const{position:Re,normal:Qe,id:Je,replacement:Rt}=Ue,cs=new k.Plane().setFromNormalAndCoplanarPoint(Qe,Re),Xt=Re.clone().sub(pe.position).cross(new k.Vector3(0,1,0)).setLength(Br),Ci=[Re.clone(),Re.clone().add(Xt),Re.clone().add(new k.Vector3(0,Br,0)).add(Xt),Re.clone().add(new k.Vector3(0,Br,0))].map(Tn=>cs.projectPoint(Tn,new k.Vector3)),{container:_i,dispose:Ct}=h.create3DDomContainer(Ci)||{},Ln=new lb({target:_i,props:{id:Je,content:p.render(p.template,Rt),lineWidthZoom:.38*(.01+pe.position.distanceTo(Re)/d),lineHeightZoom:.4+(pe.position.distanceTo(Re)-c)/d*.6,contentZoom:.1+pe.position.distanceTo(Re)/d,upsideDown:Re.y>l,folded:p.folded,events:p.events,hooks:m,dispose:Ct}});ze.push({position:Re,normal:Qe,id:Je,app:Ln})}}return ze},R=te=>{p.points=te.points.map(ye=>{var ze,pe;return{id:ye.id,position:new k.Vector3().fromArray(ye.position),normal:new k.Vector3().fromArray(ye.normal),replacement:(ze=ye.replacement)!=null?ze:{},weight:(pe=ye.weight)!=null?pe:-1}}),te.render&&(p.render=te.render),te.template&&(p.template=te.template),te.events&&(p.events=te.events),te.enabled===!1&&(p.enabled=te.enabled),te.folded===!0&&(p.folded=te.folded)},U=te=>{p.intersectObjects=te,C()},H=()=>{p.enabled=!0,C()},N=()=>{p.enabled=!1,g.$set({origins:[]}),p.tags.forEach(te=>{te.app.$destroy(),te=null}),p.origins=[],p.tags=[]},F=()=>{p.folded=!1,p.tags.forEach(te=>{te.app.$set({folded:p.folded})})},Q=()=>{p.folded=!0,p.tags.forEach(te=>{te.app.$set({folded:p.folded})})},_=te=>{p.tags.forEach(ye=>{ye.id===te&&ye.app.$set({folded:!1})})},Y=te=>{p.tags.forEach(ye=>{ye.id===te&&ye.app.$set({folded:!0})})},Z=()=>{n.once("renderFrame",E)},q=()=>{e||(e=n.getElement().parentElement),e&&e.appendChild(f),p.forbidden=!1,i=n.model.bounding.getCenter(new k.Vector3).y,C(),n.on("panoWillArrive",P),n.on("panoArrived",y),n.on("modeChange",I),n.on("cameraUpdate",v)},ee=()=>{A=null,h.disposeAll(),g.$destroy(),p.tags.forEach(te=>{te.app.$destroy(),te=null}),p.origins=[],p.tags=[],n.off("modelLoaded",q),n.off("renderFrame",E),n.off("panoWillArrive",P),n.off("panoArrived",y),n.off("modeChange",I),n.off("cameraUpdate",v),n.off("dispose",ee),window.removeEventListener("resize",Z,!1)};return window.addEventListener("resize",Z,!1),(Ze=n==null?void 0:n.model)!=null&&Ze.loaded?q():n.once("modelLoaded",q),n.on("dispose",ee),{load:R,setIntersectObjects:U,unfoldAll:F,foldAll:Q,unfold:_,fold:Y,enable:H,disable:N,hooks:m,dispose:ee}};var Vi=(n=>(n.SMALL="small",n.MIDLLE="middle",n.LARGE="large",n.EXTRA_LARGE="x-large",n))(Vi||{}),Vr={},pb={get exports(){return Vr},set exports(n){Vr=n}};/*!
532
532
  Copyright (c) 2018 Jed Watson.
533
533
  Licensed under the MIT License (MIT), see
534
534
  http://jedwatson.github.io/classnames
@@ -561,7 +561,7 @@ void main() {
561
561
  void main() {
562
562
  gl_FragColor = texture2D(map, vUv);
563
563
  }
564
- `);this.uniforms={map:{value:e}}}}function bh(n,t){if(n.length<3)return console.error("points.length < 3"),new G.Vector3(0,0,0);const[e,i,s]=n,o=e.clone().sub(i),r=e.clone().sub(s),a=o.cross(r).normalize();return typeof t=="number"?a.multiplyScalar(t):a}let yh=class extends k.Mesh{constructor(){super(...arguments);u(this,"name","MediaPlane");u(this,"src")}removeFromParent(){const e=this.parent;return e!==null&&e.remove(this),this}dispose(){this.traverse(e=>{if(e.isMesh){const i=e;i.geometry.dispose(),(i.material instanceof Array?i.material:[i.material]).forEach(o=>{o.dispose()})}})}};class wh extends yh{constructor(e,i,s){var a;super();u(this,"name","PanoTagPluginImagePlane");this.src=e;const o=(a=s==null?void 0:s.resolveZFighting)!=null?a:!0;let r=i;if(o){const l=bh(i,5e-4);r=i.map(c=>c.clone().add(l))}sd(e).then(({texture:l,transparent:c})=>{var p;const d=new k.MeshBasicMaterial({map:l,transparent:c}),h=is((p=s==null?void 0:s.objectFit)!=null?p:"contain",r,l.image.width/l.image.height),f=di(...h),m=h.map(g=>g.clone().sub(f)),A=new vh(m);this.position.copy(f),this.geometry=A,this.material=d}).catch(l=>{console.error(`Imageplane error ${l==null?void 0:l.message}`)})}}class Ch extends yh{constructor(e,i,s){const{videoCoverSrc:o,objectFit:r="contain",playButton:a="withText",paused:l=!0,videoTextureMap:c,ImageTextureMap:d,domEvents:h}=s!=null?s:{};super();u(this,"isVideoPlane",!0);u(this,"name","PanoTagPluginImagePlane");u(this,"videoInstance");u(this,"onVideoReady");u(this,"objectFit");u(this,"buttonSrc");u(this,"videoCoverSrc");u(this,"domEvents");u(this,"disposers",[]);u(this,"cornerPoints");u(this,"videoMesh");u(this,"coverMesh");u(this,"buttonMesh");u(this,"videoTextureMap");u(this,"ImageTextureMap");this.cornerPoints=i,this.src=e,this.buttonSrc=(()=>a==="withText"?Rr:a==="withoutText"?Qr:typeof a=="string"?a:Qr)(),this.videoCoverSrc=o,this.objectFit=r,this.videoTextureMap=c,this.ImageTextureMap=d,this.domEvents=h,this.position.copy(di(...i)),this.videoCoverSrc&&l?this.addCoverMesh().then(()=>this.addButtonMesh()):this.addVideoMesh().then(()=>{l?this.addButtonMesh():this.play(!0)}),this.addEventListener("removed",()=>{this.remove(...this.children)}),this.addEventListener("dispose",()=>{var f;(f=this.disposers)==null||f.forEach(m=>m==null?void 0:m())})}play(e=!1){return W(this,null,function*(){this.videoMesh||(yield this.addVideoMesh()),this.showPlayUI(),this.videoInstance.paused&&this.videoInstance.play().then(()=>this.showPlayUI()).catch(i=>{this.pause(),console.error("play error",i)}),this.videoInstance.muted=e,this.render()})}pause(){this.videoInstance&&(this.videoInstance.pause(),this.showPauseUI().then(()=>this.render()))}initialRenderHooks(e){const s=e(()=>{var o;this.videoMesh&&((o=this.videoInstance)==null?void 0:o.paused)===!1&&(this.videoMesh.needsRender=!0)});this.disposers.push(()=>s)}showPlayUI(){this.coverMesh&&(this.coverMesh.visible=!1),this.remove(this.buttonMesh),this.videoMesh.visible=!0}showPauseUI(){return W(this,null,function*(){this.coverMesh?(this.coverMesh.visible=!0,this.videoMesh&&(this.videoMesh.visible=!1)):(yield this.addCoverMesh(),this.coverMesh&&(this.videoMesh.visible=!1)),this.addButtonMesh().then(()=>this.render())})}render(){var e;this.videoMesh&&(this.videoMesh.needsRender=!0),this.coverMesh&&(this.coverMesh.needsRender=!0),this.buttonMesh&&(this.buttonMesh.needsRender=!0),this.videoMesh&&((e=this.videoInstance)==null?void 0:e.paused)===!1&&(this.videoMesh.needsRender=!0)}addCoverMesh(){return W(this,null,function*(){if(this.children.includes(this.coverMesh))return;const e=yield(()=>W(this,null,function*(){if(this.coverMesh)return this.coverMesh;if(!this.videoCoverSrc)return;const{texture:i,transparent:s}=yield this.getImageTexture(this.videoCoverSrc),o=new k.MeshBasicMaterial({transparent:!1,map:i}),r=is(this.objectFit,this.cornerPoints,i.image.width/i.image.height),a=new Wr(r,o);return a.position.copy(new G.Vector3(0,0,0)),a.name="videoCoverMesh",a}))();return e&&(this.children.includes(this.coverMesh)||(this.add(e),this.coverMesh=e)),e})}addVideoMesh(){return W(this,null,function*(){if(this.children.includes(this.videoMesh))return;const e=yield(()=>W(this,null,function*(){if(this.videoMesh)return this.videoMesh;if(!this.src)return;const s=this.getVideoTexture(this.src),o=new k.MeshBasicMaterial({transparent:!1,map:s}),r=yield new Promise(l=>{s.metadataLoaded?l(is(this.objectFit,this.cornerPoints,s.image.videoWidth/s.image.videoHeight)):s.addEventListener("videoLoaded",()=>l(is(this.objectFit,this.cornerPoints,s.image.videoWidth/s.image.videoHeight)))}),a=new Wr(r,o);return a.name="videoMesh",a.position.copy(new G.Vector3(0,0,0)),a}))();if(!e)return;this.domEvents.addAutoBindEventListener(e,"click",()=>{!this.videoInstance.paused&&this.videoInstance.muted?this.videoInstance.muted=!1:this.pause()});const i=e.material.map.image;return i.addEventListener("playing",()=>{this.coverMesh||this.remove(this.buttonMesh),this.render()}),i.addEventListener("pause",()=>{this.videoInstance.paused&&(this.showPauseUI(),this.render())}),this.children.includes(this.videoMesh)||(this.add(e),this.videoMesh=e,this.videoInstance=i),e})}addButtonMesh(){return W(this,null,function*(){if(this.children.includes(this.buttonMesh))return;const e=yield(()=>W(this,null,function*(){var m,A,p,g;if(this.buttonMesh)return this.buttonMesh;const i=(A=(m=this.videoMesh)==null?void 0:m.geometry.points[0].distanceTo(this.videoMesh.geometry.points[3]))!=null?A:1/0,s=(g=(p=this.coverMesh)==null?void 0:p.geometry.points[0].distanceTo(this.coverMesh.geometry.points[3]))!=null?g:1/0,o=this.cornerPoints[0].distanceTo(this.cornerPoints[3]),a=Math.min(i,s,o)/o*.3,{texture:l,transparent:c}=yield this.getImageTexture(this.buttonSrc),d=is("contain",this.cornerPoints,l.image.width/l.image.height),h=new Wr(d,new q1(l));h.position.copy(new G.Vector3(0,0,0)),h.name="buttonMesh",h.scale.set(a,a,a),this.domEvents.addAutoBindEventListener(h,"click",()=>{this.play()});const f=bh(d,5e-4);return h.position.add(f),h}))();return this.children.includes(this.buttonMesh)||(this.add(e),this.buttonMesh=e),e})}getImageTexture(e){return W(this,null,function*(){var s,o;if((s=this.ImageTextureMap)!=null&&s.has(e))return this.ImageTextureMap.get(e);const i=yield sd(e);return(o=this.ImageTextureMap)==null||o.set(e,i),i})}getVideoTexture(e){var s,o;if((s=this.videoTextureMap)!=null&&s.has(e))return this.videoTextureMap.get(e);const i=J1(e);return(o=this.videoTextureMap)==null||o.set(e,i),i}}function K1(n,t){const{top:e,left:i,width:s,height:o}=t.getBoundingClientRect();return new k.Vector2((n.x-i)/s*2-1,-(n.y-e)/o*2+1)}class $1{constructor(t){u(this,"five");u(this,"boundObject",{});u(this,"handleWantsGesture",(t,e)=>{if(e.length!==1)return;const i=e[0];if(i){if(t==="mouseMove")return this.onDomEvent("hover",i);if(t==="tap")return this.onDomEvent("click",i)}});u(this,"onDomEvent",(t,e)=>{var a,l;const i=this.boundObject[t];if(!i||(i==null?void 0:i.length)===0||!e)return;const s=(a=e.raycaster)!=null?a:this.getRaycaster(e),o=(()=>{var h;const c=s.intersectObjects(i,!0);if(c.length===0)return;const d=this.five.model.intersectRaycaster(s);if(!(d.length>0&&c.length>0&&d[0].distance<c[0].distance))return(h=c[0])==null?void 0:h.object})();if(!o||!this.objectIsBound(o)){for(const c of(l=this.boundObject.hover)!=null?l:[])c._hovered&&this.notify("unHover",c);return}if(this.notify(t,o))return!1});u(this,"objectIsBound",t=>{let e=t._domEvent,i=t.parent;for(;typeof e=="undefined"&&i;)e=i._domEvent,i=i.parent;return!!e});u(this,"notify",(t,e,i,s)=>{var c;let o=!1,r=[];const a=[];let l=e;for(a.push(l);l.parent;)l=l.parent,a.push(l);for(const d of a){if(o)break;const h=d._domEvent;if(!h)continue;const f=h[`${t}Handler`];if(f)for(const[m,A]of f){if(A!=null&&A.checkVisible&&!Wo(d))continue;if(t==="hover"){if(d._hovered)continue;d._hovered=!0;for(const g of(c=this.boundObject.hover)!=null?c:[])g!==d&&g._hovered&&this.notify("unHover",g)}if(t==="unHover"){if(!d._hovered)continue;d._hovered=!1}const p=m({type:t,target:d,origDomEvent:i,intersect:s,stopPropagation:()=>{o=!0}});r.push(p!=null?p:!0)}}if(t==="click")return r.some(d=>d===!0)});this.five=t,t.on("wantsGesture",this.handleWantsGesture)}addAutoBindEventListener(t,e,i,s){const o=()=>this.addEventListener(t,e,i,s),r=()=>this.removeEventListener(t,e,i,s);return t.addEventListener("added",o),t.addEventListener("removed",r),t.addEventListener("dispose",r),()=>{t.removeEventListener("added",o),t.removeEventListener("removed",r),t.removeEventListener("dispose",r)}}addEventListener(t,e,i,s){var o;t._domEvent||(t._domEvent={}),t._domEvent[`${e}Handler`]||(t._domEvent[`${e}Handler`]=[]),this.boundObject[e]||(this.boundObject[e]=[]),t._domEvent[`${e}Handler`].push([i,V({checkVisible:!0},s)]),(o=this.boundObject[e])==null||o.push(t)}removeEventListener(t,e,i,...s){var r,a;if(!t._domEvent||!t._domEvent[`${e}Handler`])return;const o=t._domEvent[`${e}Handler`].findIndex(l=>l[0]===i);if(o!==-1&&(t._domEvent[`${e}Handler`].splice(o,1),t._domEvent[`${e}Handler`].length===0&&delete t._domEvent[`${e}Handler`],t._domEvent&&Object.keys(t._domEvent).length===0&&delete t._domEvent,!t._domEvent)){const l=(r=this.boundObject[e])==null?void 0:r.findIndex(c=>c===t);l!==-1&&((a=this.boundObject[e])==null||a.splice(l,1))}}dispose(){var t;(t=this.five)==null||t.off("wantsGesture",this.handleWantsGesture),this.boundObject={}}getRaycaster(t){const e=this.five.getElement();if(!e)return;const i=K1(t,e),s=new k.Raycaster;return s.setFromCamera(i,this.five.camera),s}}function Ih(n){var e,i;typeof n.visibleConfig=="object"&&n.visibleConfig.keep&&(n.visibleConfig.keep==="visible"?n.visibleConfig={keep:n.visibleConfig.keep,visibleFiveMode:(e=n.visibleConfig)==null?void 0:e.visibleFiveMode}:n.visibleConfig.keep==="hidden"&&(n.visibleConfig={keep:n.visibleConfig.keep})),typeof n.unfoldedConfig=="object"&&(n.unfoldedConfig.disableFold&&(n.unfoldedConfig={keep:"unfolded"}),n.unfoldedConfig.disableUnfold&&(n.unfoldedConfig={keep:"folded"}),n.unfoldedConfig.keep&&(n.unfoldedConfig={keep:n.unfoldedConfig.keep}));const t=(i=n.initialState)!=null?i:{};return typeof n.unfoldedConfig=="object"&&(n.unfoldedConfig.keep==="unfolded"?t.unfolded=!0:n.unfoldedConfig.keep==="folded"&&(t.unfolded=!1)),typeof n.visibleConfig=="object"&&(n.visibleConfig.keep==="visible"?t.visible=!0:n.visibleConfig.keep==="hidden"&&(t.visible=!1)),n.initialState=t,n}function Ph(n){return Object.entries(n)}function kh(n){const t=n.split("?")[0].split(".").pop();return t?t.toLowerCase():""}const ns=(n,t)=>{if(!t)return n;const e=new k.Vector3,i=new k.Quaternion,s=new k.Vector3;return t.decompose(e,i,s),n.clone().multiply(s).applyQuaternion(i).add(e)};class Mh{constructor(t){u(this,"five");this.five=t}}class Ur extends Mh{constructor(e){super(e);u(this,"_workCode")}set workCode(e){this._workCode=e}get workCode(){var e;return(e=this._workCode)!=null?e:this.five.state.workCode}get work(){var e,i;return(i=(e=this.five.works)==null?void 0:e.find(s=>s.workCode===this.workCode))!=null?i:this.five.work}get observers(){return this.work.observers}get transform(){var i;const e=(i=this.work.options)==null?void 0:i.transform;return e?e.clone():new k.Matrix4}getObserverPosition(e){var s;const i=(s=this.getObserver(e))==null?void 0:s.position;if(i)return ns(i,this.transform)}getObserverStandingPosition(e){var s;const i=(s=this.getObserver(e))==null?void 0:s.standingPosition;if(i)return ns(i,this.transform)}getObserver(e){var i;return(i=this.observers)==null?void 0:i[e]}}class ey extends U1{constructor(e){super(e);u(this,"tags",[]);u(this,"config",W1);u(this,"workUtil",new Ur(this.five));u(this,"mediaStore",Ar({currentMediaElement:null}));u(this,"css3DRenderPlugin");u(this,"store",{disposers:[],disposed:!1,resizeObserverDisposerAdding:!1,css3DRenderDisposer:new Map});u(this,"domEvents",new $1(this.five));u(this,"loadVideoFirstFrame",()=>{X1&&this.hooks.emit("loadVideoFirstFrame")});this.mediaStore.subscribe(({currentMediaElement:i})=>{this.tags.forEach(s=>{var o;if(s.mediaPlane instanceof Ch&&i!==s.mediaPlane.videoInstance){if(!((o=s.mediaPlane.videoInstance)!=null&&o.src)||i===s.mediaPlane.videoInstance)return;s.mediaPlane.pause()}})})}set workCode(e){this.workUtil.workCode=e}get workCode(){return this.workUtil.workCode}getTagById(e){const i=this.tags.find(s=>s.id===e);if(!i){console.warn(`getTagById Error: can't find tag id: ${e}`);return}return i}pauseCurrentMedia(){this.mediaStore.set({currentMediaElement:null})}getTagConfig(e,i){var a,l,c;const s=this.calculateTagConfig(e,{useCache:i==null?void 0:i.useCache}),o=(a=i==null?void 0:i.fiveMode)!=null?a:this.five.getCurrentState().mode,r=(l=s.configWithFiveMode)==null?void 0:l[o];return(c=r!=null?r:s)!=null?c:{}}getCurrentVisibleState(e){return!(!this.state.enabled||!this.state.visible||!e.enabled||!e.state.visible)}updateTagConfig(){this.clearCache(),this.tags.forEach(e=>{var o;const i=this.getTagConfig(e,{useCache:!1});e.computedConfig=i;const s=this.getTagConfig(e);if(e.config=s,e.config.initialData){const r=JSON.parse(JSON.stringify(e.data));e.data=(o=s.initialData)!=null&&o.important?Ve(e.data,r,s.initialData):Ve(e.data,s.initialData,r)}})}can(e,i){const s=i,o=this.getTagConfig(s);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}getRenderType(e){const i=(()=>{if(e.stickType==="3DPoint")return"Dom";const s=this.getTagConfig(e);if(!s||typeof s!="object"||!s.renderType)return;const o=e.data.mediaData;if(!(!o||o.length===0)&&s.renderType==="Mesh"){if(V1(e)){if(o.length===1){if(o[0].type==="Video")return navigator.userAgent.toLowerCase().indexOf("firefox")>-1&&navigator.userAgent.toLowerCase().indexOf("mobile")>-1?"Dom":"Mesh";if(o[0].type==="Image")return kh(o[0].url)==="gif"?"Dom":"Mesh"}}else if(Ut(e))return o.length===1&&o[0].type==="Image"?kh(o[0].url)==="gif"?"Dom":"Mesh":"BehindDom"}})();return i!=null?i:"Dom"}getAngle(e,i){const s=i!=null?i:this.five.getCurrentState().panoIndex;if(s===void 0)throw new Error(`getAngle(): fivePanoIndex is ${s}`);const o=this.getPanoIndexCache({panoIndex:i,id:e.id});if(o.angle!==void 0)return o.angle;{const r=this.workUtil.getObserverPosition(s);if(r===void 0)throw new Error(`getAngle(): observerPosition is ${r}`);const a=(()=>e.stickType==="3DPoint"?kt(e.normal):Fr(e.position))();if(!a)return;const l=$n(e);if(!l)return;const c=new k.Vector3().copy(r).sub(l),d=a.angleTo(c)*180/Math.PI;return o.angle=d,o.angle}}getDistance(e,i){const s=V(V({},this.five.getCurrentState()),i),{panoIndex:o,mode:r}=s,a=Tt(r)?this.getPanoIndexCache({panoIndex:o,id:e.id}):void 0;if((a==null?void 0:a.distance)!==void 0)return a.distance;const l=$n(e);if(!l)return-1;if(Tt(r)){const c=this.workUtil.getObserverPosition(o);if(c===void 0)return-1;const d=c.distanceTo(l);return a&&(a.distance=d),d}if(en(r))return this.five.camera.position.distanceTo(l)}getPositions(e){if(T1(e))return e.position;if(Ut(e))return e.data.mediaPosition;if(j1(e))return R1(this.five.camera.position,kt(e.position),kt(e.normal))}addObjectClickHandler(e,i,s){if(!i||!this.domEvents)return()=>{};const o=()=>!(!this.getCurrentVisibleState(e)||e.loading),r=a=>{if(!o())return!1;s(a.origDomEvent)};return this.domEvents.addEventListener(i,"click",r),()=>{var a;(a=this.domEvents)==null||a.removeEventListener(i,"click",r)}}getTagNormal(e){if(e.normal)return kt(e.normal);if(e.stickType==="Plane")return Fr(e.position);if(e.stickType==="Model")return Fr(this.getPositions(e))}get filterPointTag(){return this.tags.filter(e=>e.stickType==="2DPoint"||e.stickType==="3DPoint").filter(e=>e.position)}get filter2DPointTag(){return this.tags.filter(e=>e.stickType==="2DPoint").filter(e=>e.position)}get filterImagePlane(){return this.tags.filter(e=>e.contentType==="MediaPlane"&&e.stickType==="Plane"&&this.getRenderType(e)==="Mesh")}get filterMediaModel(){return this.tags.filter(e=>e.stickType==="Model"&&e.contentType==="MediaModel")}get filterCSS3DTag(){return this.tags.filter(i=>i.stickType==="3DPoint"||i.stickType==="Plane"||i.stickType==="Model"&&i.contentType==="MediaModel").filter(i=>{const s=this.getRenderType(i);return s==="BehindDom"||s==="Dom"})}getTransformedPostion(e){if(!e)return;const i=this.workUtil.transform;return Array.isArray(e)&&e.length===4?e.map(kt).map(s=>ns(s,i)):ns(kt(e),i)}checkDisposed(){return this.store.disposed?(console.error("PanoTagPluginController has been disposed"),!0):!1}calculateTagConfig(e,i){var A,p,g,v,y;const s=(A=i==null?void 0:i.useCache)!=null?A:!0;if(!e)return(p=this.config.globalConfig)!=null?p:{};if(s){if((g=e==null?void 0:e.computedConfig)!=null&&g._isMerged)return e.computedConfig;if((v=e==null?void 0:e.config)!=null&&v._isMerged)return e.config}const o={},r={},a={};this.config.contentTypeConfig&&Object.entries(this.config.contentTypeConfig).forEach(([P,I])=>{var N,F;const E=P,C=E.split("-"),z=P.startsWith("["),R=z?C[0].slice(1,-1):void 0,U=z?C.slice(1):C,H=R?["PanoramaLike","ModelLike"].includes(R)?(N=r[R])!=null?N:r[R]={}:(F=a[R])!=null?F:a[R]={}:o;if(!H[E]){if(U.length===0&&(H[E]=I),U.length===1){const[Q]=U;(e.contentType===Q||Q==="Any")&&(H[E]=I)}if(U.length===2){const[Q="Any",_="Any"]=U;Q==="Mixin"&&e.contentType===_&&(H[E]=I),(e.stickType===Q||Q==="Any")&&(e.contentType===_||_==="Any")&&(H[E]=I)}if(U.length===3){const[Q="Any",_,Y]=U;if(_==="Audio"&&e.contentType==="Audio"){const Z=e;(Z.stickType===Q||Q==="Any")&&Z.data.appearance===Y&&(H[E]=I)}}}});const l=(y=e.initialConfig)!=null?y:{},c=Ve({},mh,this.config.globalConfig,...Object.values(o)),d=Ve({},c,l),h={},f=Object.values(Ae.Five.Mode);Ph(r).forEach(([P,I])=>{f.forEach(E=>{(P==="PanoramaLike"&&Tt(E)||P==="ModelLike"&&en(E))&&(h[E]=Ve({},c,...Object.values(I),l,{_isMerged:!0}))})}),Ph(a).forEach(([P,I])=>{h[P]=Ve({},c,...Object.values(I),l,{_isMerged:!0})});const m=ge(V({},d),{configWithFiveMode:h});return Ih(m),Object.values(h).forEach(P=>Ih(P)),m._isMerged=!0,m}}function ty(n,t){if(!n)return 0;const e=n.observers;if(!t||!e)return console.error("getFloorIndex: invalid arguments: ",{point:t,observer:e}),0;const i=[];e.forEach(o=>{var a,l,c;const r=(l=(a=o.floorIndex)!=null?a:o.floor_index)!=null?l:0;i[r]||(i[r]=[]),i[r].push(ns(o.position,(c=n.options)==null?void 0:c.transform).y)});const s=i.map(o=>o.reduce((r,a)=>r+a,0)/o.length);for(let o=s.length-1;o>0;o--)if(t.y>=s[o])return o;return 0}const po=new k.Raycaster;po.params.Points.threshold=.1;class iy extends ey{constructor(t){super(t)}getVisible(t,e){const i=V(V({},this.five.getCurrentState()),e),{panoIndex:s,mode:o}=i,r=Tt(o)?this.getPanoIndexCache({panoIndex:s,id:t.id}):void 0;if((r==null?void 0:r.visible)!==void 0)return r.visible;{const a=[],l=(()=>{var d,h,f,m,A,p,g;const c=(d=this.getTagConfig(t).visibleConfig)!=null?d:{};if(typeof c=="function")return{value:c(this.five,{tag:t,distance:this.getDistance(t,i)}),checkedList:a,reason:"config function result"};if(c.keep==="hidden")return{value:!1,checkedList:a,reason:"config.keep is hidden"};if(c.keep==="visible")return{value:!0,checkedList:a,reason:"config.keep is visible"};if(c.visibleFiveMode!==void 0){const v=typeof c.visibleFiveMode=="function"?c.visibleFiveMode(t):c.visibleFiveMode;let y=!1;if(Array.isArray(v)?y=v.includes(o):v==="ModelLike"?y=en(o):v==="PanoramaLike"?y=!Tt(o):v==="all"?y=!0:typeof v=="string"&&(y=v===o),y===!1)return{value:!1,checkedList:a,reason:"current mode is not included in visibleFiveMode",visibleFiveMode:c.visibleFiveMode,mode:o}}else if(c.visibleFiveMode===void 0&&((h=this.five.getCurrentState())==null?void 0:h.mode)!==((m=(f=t.fiveState)==null?void 0:f.mode)!=null?m:"Panorama"))return{value:!1,checkedList:a,reason:"current mode is not equal to tag.fiveState.mode",tagFiveMode:(A=t.fiveState)==null?void 0:A.mode,mode:o};if(c.followModelVisibility===!0&&(o==="Floorplan"||o==="Mapview")&&this.getVisibleByFloorIndex(t)===!1)return{value:!1,checkedList:a,reason:"followModelVisibility check failed"};if(Tt(o)&&c.visiblePanoIndex!==void 0&&c.visiblePanoIndex!=="all"&&s!==void 0){if(a.push("visiblePanoIndex"),Array.isArray(c.visiblePanoIndex)&&!c.visiblePanoIndex.includes(s))return{value:!1,checkedList:a,reason:`current panoIndex is not included in visiblePano. currentPanoIndex: ${s}, visiblePanoIndex: ${c.visiblePanoIndex}`};if(c.visiblePanoIndex==="current"&&s!==((p=t.fiveState)==null?void 0:p.panoIndex))return{value:!1,checkedList:a,reason:`current panoIndex is not equal to tag.panoIndex. currentPanoIndex: ${s}, tag.panoIndex: ${(g=t.fiveState)==null?void 0:g.panoIndex}`}}if(c.visibleDistance!==void 0&&(a.push("visibleDistance"),c.visibleDistance!=="unLimited")){const v=this.getDistance(t,i);if(es(v,c.visibleDistance)===!1)return{value:!1,checkedList:a,panoIndex:s,visibleDistance:c.visibleDistance,reason:`distance is not in visibleDistance. distance: ${v}, visibleDistance: ${c.visibleDistance.min} - ${c.visibleDistance.max}`}}if(Tt(o)&&c.angleRange&&z1(t)){a.push("angleRange");const v=this.getAngle(t,s);if(es(v,c.angleRange)===!1)return{value:!1,checkedList:a,reason:`angle is not in angleRange. angle: ${v}, angleRange: ${c.angleRange}`}}if(c.intersectRaycaster!==!1&&(typeof c.intersectRaycaster!="object"||c.intersectRaycaster.enabled!==!1)){if(a.push("intersectRaycaster"),s===void 0)return{value:!1,checkedList:a,reason:`intersectRaycaster check failed: panoIndex is ${s}`};const v=this.getTagEnableByIntersect(t,s);if(v.value===!1)return Object.assign(v,{checkedList:a})}return{value:!0,checkedList:a,reason:"all check passed"}})();return r&&(r.visible=l.value,r.__debug_visible_reason__=l),l.value}}getUnfoldedByPanoIndex(t,e){if(!this.getCurrentVisibleState(t))return;const s=this.getPanoIndexCache({panoIndex:e,id:t.id});if(s.unfolded!==void 0)return s.unfolded;{const o=this.getTagConfig(t).unfoldedConfig;if(!o)return;const r=(()=>{if(typeof o=="function")return o(this.five,{tag:t,distance:this.getDistance(t,{panoIndex:e})});if(o.keep==="folded")return!1;if(o.keep==="unfolded")return!0;if(o.unfoldDistance&&es(this.getDistance(t,{panoIndex:e}),o.unfoldDistance)===!1)return!1})();s.unfolded=r;const a=this.getUnfoldedByCamera(t);return a!==void 0?a:s.unfolded}}getUnfoldedByCamera(t){return this.getCurrentVisibleState(t)?(()=>{var o;const s=this.getTagConfig(t).unfoldedConfig;if(s){if(typeof s=="function")return s(this.five,{tag:t,distance:this.getDistance(t)});if(s.keep==="folded")return!1;if(s.keep==="unfolded")return!0;if(s.autoUnfold===void 0||s.autoUnfold===!1||s.autoUnfold.enable===!1||!s.autoUnfold.strategy)return;if(s.autoUnfold.strategy==="ScreenPostion"){const r=this.getTagProject(t);if(r&&es(r.x,s.autoUnfold.autoUnfoldProjectX)===!1)return!1}if(s.autoUnfold.strategy==="MinimumDistance"){const l=this.filterPointTag.filter(d=>this.getCurrentVisibleState(d)).filter(d=>{const h=this.getTagProject(d);if(!h)return!1;const{x:f,y:m,z:A}=h;return!(Math.abs(A)>1||Math.abs(f)>1||Math.abs(m)>1)}).map(d=>({tag:d,id:d.id,tagConfig:this.getTagConfig(d).unfoldedConfig})).filter(({tag:d,tagConfig:h})=>{var f,m;return!(typeof h=="function"||h.keep||h.autoUnfold===!1||((f=h.autoUnfold)==null?void 0:f.enable)===!1||((m=h.autoUnfold)==null?void 0:m.strategy)!=="MinimumDistance")}).map(d=>ge(V({},d),{distance:this.getDistance(d.tag)})).filter(({distance:d,tagConfig:h})=>{const f=h.autoUnfold.distance;return!(f&&es(d,f)===!1)}).sort((d,h)=>d.distance-h.distance).findIndex(d=>d.id===t.id);if(l===-1||l<=((o=s.autoUnfold.maxNumber)!=null?o:1)-1===!1)return!1}return!0}})():void 0}setTagZIndex(t){return t.forEach(e=>{e.zIndex=this.calculateTagZIndex(e)})}calculateTagZIndex(t){const e=this.getDistance(t);return Math.round((1e4-(e!=null?e:0))*100)}setVisible(t){(t!=null?t:this.tags).forEach(e=>{const i=this.getVisible(e);e.state&&(e.state.visible=i)})}setUnfoldedByPanoIndex(){this.tags.forEach(t=>{const e=this.getUnfoldedByPanoIndex(t);if(t.state&&(e!==void 0&&(t.state.unfolded=e),e&&!t.state.visible)){const i=this.getTagConfig(t);typeof i.unfoldedConfig=="object"&&i.unfoldedConfig.autoFoldWhenHide!==!1&&(t.state.unfolded=!1)}})}getTagProject(t){const e=$n(t);if(!e)return;const{x:i,y:s,z:o}=e.project(this.five.camera);if(!(o>1))return{x:i,y:s,z:o}}getTagEnableByIntersect(t,e){var c,d,h,f,m;const i=qn(qn((c=this.getTagConfig(t).visibleConfig)!=null?c:{}).intersectRaycaster),s=e!=null?e:this.five.getCurrentState().panoIndex,o=Tt(this.five.getCurrentState().mode)?this.workUtil.getObserverPosition(s):this.five.camera.position;if(o===void 0)return{value:!1,reason:{type:"startPosition is undefined",fivePanoIndex:s}};const r=gl((()=>{var p;const A=(p=i.checkPoints)!=null?p:"center";return A==="center"?$n(t):A==="corner"?hh(t):Array.isArray(A)?A:[]})());let a=0,l=0;for(const A of r){const p=new k.Vector3().subVectors(A,o).normalize();po.set(o,p);const g=o.distanceTo(A),[v]=this.five.model.intersectRaycaster(po),y=(()=>{if(!Ut(t))return;const z=this.tags.filter(Ut).map(U=>{var H;return(H=U.model)==null?void 0:H.object}).filter(jt),[R]=po.intersectObjects(z,!0);return R})(),P=(d=i.distanceAccuracy)!=null?d:.01;Math.min((h=v==null?void 0:v.distance)!=null?h:1/0,(f=y==null?void 0:y.distance)!=null?f:1/0)+P>=g?a++:l++;const C=(m=i.needPassed)!=null?m:1;if(a>=C)return{value:!0}}return l===0?{value:!0}:{value:!1,reason:{type:"intersectRaycaster check failed",passedCount:a,needPassed:i.needPassed}}}getVisibleByFloorIndex(t){var o,r,a,l,c,d,h;let e=0;const i=(o=t.fiveState)==null?void 0:o.panoIndex;i!==void 0?e=(r=this.workUtil.getObserver(i))==null?void 0:r.floorIndex:e=ty(this.workUtil.work,(h=(d=(l=(a=t.model)==null?void 0:a.object)==null?void 0:l.position)!=null?d:(c=t.mediaPlane)==null?void 0:c.position)!=null?h:$n(t));const s=this.five.model.shownFloor;return s===null||s===e}}function ny(n){me(n,"svelte-xuejcm",".line.svelte-xuejcm{position:absolute;pointer-events:none}.line.vertical.svelte-xuejcm{transform:rotate(-90deg) translate3d(0.03125rem, 0, 0.625rem);transform-origin:0 0}.line.horizontal.svelte-xuejcm{transform:translate3d(0, -0.03125rem, 0.625rem)}.straight-line.svelte-xuejcm{display:block;width:100%;height:100%;overflow:visible}")}function Eh(n){let t,e,i,s,o,r,a,l=n[3]&&Dh(n);return{c(){t=x("div"),e=Oe("svg"),i=Oe("defs"),s=Oe("linearGradient"),o=Oe("stop"),r=Oe("stop"),l&&l.c(),w(o,"offset","25%"),w(o,"stop-color",n[5]),w(o,"stop-opacity","1"),w(r,"offset","100%"),w(r,"stop-color",n[5]),w(r,"stop-opacity","0.5"),w(s,"x1",.5),w(s,"y1",.5),w(s,"x2",n[8]),w(s,"y2",.5),w(s,"id",n[10]),w(s,"gradientUnits","userSpaceOnUse"),w(e,"class","straight-line svelte-xuejcm"),w(e,"viewBox",a="0 0 "+n[8]+" "+n[7]),w(e,"preserveAspectRatio","none"),w(t,"class","line svelte-xuejcm"),$(t,"vertical",n[9]),$(t,"horizontal",!n[9]),S(t,"width",n[8]+"px"),S(t,"height",n[7]+"px")},m(c,d){O(c,t,d),L(t,e),L(e,i),L(i,s),L(s,o),L(s,r),l&&l.m(e,null)},p(c,d){d&32&&w(o,"stop-color",c[5]),d&32&&w(r,"stop-color",c[5]),d&256&&w(s,"x2",c[8]),c[3]?l?(l.p(c,d),d&8&&D(l,1)):(l=Dh(c),l.c(),D(l,1),l.m(e,null)):l&&(he(),T(l,1,1,()=>{l=null}),ue()),d&384&&a!==(a="0 0 "+c[8]+" "+c[7])&&w(e,"viewBox",a),d&512&&$(t,"vertical",c[9]),d&512&&$(t,"horizontal",!c[9]),d&256&&S(t,"width",c[8]+"px"),d&128&&S(t,"height",c[7]+"px")},d(c){c&&j(t),l&&l.d()}}}function Dh(n){let t,e,i,s,o;return{c(){t=Oe("path"),w(t,"fill","none"),w(t,"stroke",e=n[4]?`url(#${n[10]})`:n[5]),w(t,"stroke-width",1),w(t,"d",n[6])},m(r,a){O(r,t,a),o=!0},p(r,a){n=r,(!o||a&48&&e!==(e=n[4]?`url(#${n[10]})`:n[5]))&&w(t,"stroke",e),(!o||a&64)&&w(t,"d",n[6])},i(r){o||(r&&We(()=>{o&&(s&&s.end(1),i=Si(t,Js,{duration:n[2],delay:n[0],easing:ei}),i.start())}),o=!0)},o(r){i&&i.invalidate(),r&&(s=fn(t,Js,{duration:n[2],delay:n[1],easing:ei})),o=!1},d(r){r&&j(t),r&&s&&s.end()}}}function sy(n){let t,e=n[8]&&Eh(n);return{c(){e&&e.c(),t=Ie()},m(i,s){e&&e.m(i,s),O(i,t,s)},p(i,[s]){i[8]?e?e.p(i,s):(e=Eh(i),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},i:J,o:J,d(i){e&&e.d(i),i&&j(t)}}}function oy(n,t,e){let i,s,o,r,{inDelay:a=0}=t,{outDelay:l=0}=t,{duration:c=1e3}=t,{unfolded:d}=t,{length:h}=t,{direction:f="horizontal"}=t,{useLinearColor:m=!1}=t,{color:A="white"}=t;const p=nt();return n.$$set=g=>{"inDelay"in g&&e(0,a=g.inDelay),"outDelay"in g&&e(1,l=g.outDelay),"duration"in g&&e(2,c=g.duration),"unfolded"in g&&e(3,d=g.unfolded),"length"in g&&e(11,h=g.length),"direction"in g&&e(12,f=g.direction),"useLinearColor"in g&&e(4,m=g.useLinearColor),"color"in g&&e(5,A=g.color)},n.$$.update=()=>{n.$$.dirty&4096&&e(9,i=f==="vertical"),n.$$.dirty&2048&&e(8,s=h),n.$$.dirty&2048&&e(6,r=`M0.5 0.5 H ${h}`)},e(7,o=1),[a,l,c,d,m,A,r,o,s,i,p,h,f]}class Yr extends ce{constructor(t){super(),le(this,t,oy,sy,ae,{inDelay:0,outDelay:1,duration:2,unfolded:3,length:11,direction:12,useLinearColor:4,color:5},ny)}}function ry(n){me(n,"svelte-faoauy",".shadow.svelte-faoauy{position:absolute}")}function xh(n){let t,e,i,s,o;return{c(){t=x("div"),w(t,"class","shadow svelte-faoauy"),w(t,"style",e=`
564
+ `);this.uniforms={map:{value:e}}}}function bh(n,t){if(n.length<3)return console.error("points.length < 3"),new G.Vector3(0,0,0);const[e,i,s]=n,o=e.clone().sub(i),r=e.clone().sub(s),a=o.cross(r).normalize();return typeof t=="number"?a.multiplyScalar(t):a}let yh=class extends k.Mesh{constructor(){super(...arguments);u(this,"name","MediaPlane");u(this,"src")}removeFromParent(){const e=this.parent;return e!==null&&e.remove(this),this}dispose(){this.traverse(e=>{if(e.isMesh){const i=e;i.geometry.dispose(),(i.material instanceof Array?i.material:[i.material]).forEach(o=>{o.dispose()})}})}};class wh extends yh{constructor(e,i,s){var a;super();u(this,"name","PanoTagPluginImagePlane");this.src=e;const o=(a=s==null?void 0:s.resolveZFighting)!=null?a:!0;let r=i;if(o){const l=bh(i,5e-4);r=i.map(c=>c.clone().add(l))}sd(e).then(({texture:l,transparent:c})=>{var p;const d=new k.MeshBasicMaterial({map:l,transparent:c}),h=is((p=s==null?void 0:s.objectFit)!=null?p:"contain",r,l.image.width/l.image.height),f=di(...h),m=h.map(g=>g.clone().sub(f)),A=new vh(m);this.position.copy(f),this.geometry=A,this.material=d}).catch(l=>{console.error(`Imageplane error ${l==null?void 0:l.message}`)})}}class Ch extends yh{constructor(e,i,s){const{videoCoverSrc:o,objectFit:r="contain",playButton:a="withText",paused:l=!0,videoTextureMap:c,ImageTextureMap:d,domEvents:h}=s!=null?s:{};super();u(this,"isVideoPlane",!0);u(this,"name","PanoTagPluginImagePlane");u(this,"videoInstance");u(this,"onVideoReady");u(this,"objectFit");u(this,"buttonSrc");u(this,"videoCoverSrc");u(this,"domEvents");u(this,"disposers",[]);u(this,"cornerPoints");u(this,"videoMesh");u(this,"coverMesh");u(this,"buttonMesh");u(this,"videoTextureMap");u(this,"ImageTextureMap");this.cornerPoints=i,this.src=e,this.buttonSrc=(()=>a==="withText"?Rr:a==="withoutText"?Qr:typeof a=="string"?a:Qr)(),this.videoCoverSrc=o,this.objectFit=r,this.videoTextureMap=c,this.ImageTextureMap=d,this.domEvents=h,this.position.copy(di(...i)),this.videoCoverSrc&&l?this.addCoverMesh().then(()=>this.addButtonMesh()):this.addVideoMesh().then(()=>{l?this.addButtonMesh():this.play(!0)}),this.addEventListener("removed",()=>{this.remove(...this.children)}),this.addEventListener("dispose",()=>{var f;(f=this.disposers)==null||f.forEach(m=>m==null?void 0:m())})}play(e=!1){return W(this,null,function*(){this.videoMesh||(yield this.addVideoMesh()),this.showPlayUI(),this.videoInstance.paused&&this.videoInstance.play().then(()=>this.showPlayUI()).catch(i=>{this.pause(),console.error("play error",i)}),this.videoInstance.muted=e,this.render()})}pause(){this.videoInstance&&(this.videoInstance.pause(),this.showPauseUI().then(()=>this.render()))}initialRenderHooks(e){const s=e(()=>{var o;this.videoMesh&&((o=this.videoInstance)==null?void 0:o.paused)===!1&&(this.videoMesh.needsRender=!0)});this.disposers.push(()=>s)}showPlayUI(){this.coverMesh&&(this.coverMesh.visible=!1),this.remove(this.buttonMesh),this.videoMesh.visible=!0}showPauseUI(){return W(this,null,function*(){this.coverMesh?(this.coverMesh.visible=!0,this.videoMesh&&(this.videoMesh.visible=!1)):(yield this.addCoverMesh(),this.coverMesh&&(this.videoMesh.visible=!1)),this.addButtonMesh().then(()=>this.render())})}render(){var e;this.videoMesh&&(this.videoMesh.needsRender=!0),this.coverMesh&&(this.coverMesh.needsRender=!0),this.buttonMesh&&(this.buttonMesh.needsRender=!0),this.videoMesh&&((e=this.videoInstance)==null?void 0:e.paused)===!1&&(this.videoMesh.needsRender=!0)}addCoverMesh(){return W(this,null,function*(){if(this.children.includes(this.coverMesh))return;const e=yield(()=>W(this,null,function*(){if(this.coverMesh)return this.coverMesh;if(!this.videoCoverSrc)return;const{texture:i,transparent:s}=yield this.getImageTexture(this.videoCoverSrc),o=new k.MeshBasicMaterial({transparent:!1,map:i}),r=is(this.objectFit,this.cornerPoints,i.image.width/i.image.height),a=new Wr(r,o);return a.position.copy(new G.Vector3(0,0,0)),a.name="videoCoverMesh",a}))();return e&&(this.children.includes(this.coverMesh)||(this.add(e),this.coverMesh=e)),e})}addVideoMesh(){return W(this,null,function*(){if(this.children.includes(this.videoMesh))return;const e=yield(()=>W(this,null,function*(){if(this.videoMesh)return this.videoMesh;if(!this.src)return;const s=this.getVideoTexture(this.src),o=new k.MeshBasicMaterial({transparent:!1,map:s}),r=yield new Promise(l=>{s.metadataLoaded?l(is(this.objectFit,this.cornerPoints,s.image.videoWidth/s.image.videoHeight)):s.addEventListener("videoLoaded",()=>l(is(this.objectFit,this.cornerPoints,s.image.videoWidth/s.image.videoHeight)))}),a=new Wr(r,o);return a.name="videoMesh",a.position.copy(new G.Vector3(0,0,0)),a}))();if(!e)return;this.domEvents.addAutoBindEventListener(e,"click",()=>{!this.videoInstance.paused&&this.videoInstance.muted?this.videoInstance.muted=!1:this.pause()});const i=e.material.map.image;return i.addEventListener("playing",()=>{this.coverMesh||this.remove(this.buttonMesh),this.render()}),i.addEventListener("pause",()=>{this.videoInstance.paused&&(this.showPauseUI(),this.render())}),this.children.includes(this.videoMesh)||(this.add(e),this.videoMesh=e,this.videoInstance=i),e})}addButtonMesh(){return W(this,null,function*(){if(this.children.includes(this.buttonMesh))return;const e=yield(()=>W(this,null,function*(){var m,A,p,g;if(this.buttonMesh)return this.buttonMesh;const i=(A=(m=this.videoMesh)==null?void 0:m.geometry.points[0].distanceTo(this.videoMesh.geometry.points[3]))!=null?A:1/0,s=(g=(p=this.coverMesh)==null?void 0:p.geometry.points[0].distanceTo(this.coverMesh.geometry.points[3]))!=null?g:1/0,o=this.cornerPoints[0].distanceTo(this.cornerPoints[3]),a=Math.min(i,s,o)/o*.3,{texture:l,transparent:c}=yield this.getImageTexture(this.buttonSrc),d=is("contain",this.cornerPoints,l.image.width/l.image.height),h=new Wr(d,new q1(l));h.position.copy(new G.Vector3(0,0,0)),h.name="buttonMesh",h.scale.set(a,a,a),this.domEvents.addAutoBindEventListener(h,"click",()=>{this.play()});const f=bh(d,5e-4);return h.position.add(f),h}))();return this.children.includes(this.buttonMesh)||(this.add(e),this.buttonMesh=e),e})}getImageTexture(e){return W(this,null,function*(){var s,o;if((s=this.ImageTextureMap)!=null&&s.has(e))return this.ImageTextureMap.get(e);const i=yield sd(e);return(o=this.ImageTextureMap)==null||o.set(e,i),i})}getVideoTexture(e){var s,o;if((s=this.videoTextureMap)!=null&&s.has(e))return this.videoTextureMap.get(e);const i=J1(e);return(o=this.videoTextureMap)==null||o.set(e,i),i}}function K1(n,t){const{top:e,left:i,width:s,height:o}=t.getBoundingClientRect();return new k.Vector2((n.x-i)/s*2-1,-(n.y-e)/o*2+1)}class $1{constructor(t){u(this,"five");u(this,"boundObject",{});u(this,"handleWantsGesture",(t,e)=>{if(e.length!==1)return;const i=e[0];if(i){if(t==="mouseMove")return this.onDomEvent("hover",i);if(t==="tap")return this.onDomEvent("click",i)}});u(this,"onDomEvent",(t,e)=>{var a,l;const i=this.boundObject[t];if(!i||(i==null?void 0:i.length)===0||!e)return;const s=(a=e.raycaster)!=null?a:this.getRaycaster(e),o=(()=>{var h;const c=s.intersectObjects(i,!0);if(c.length===0)return;const d=this.five.model.intersectRaycaster(s);if(!(d.length>0&&c.length>0&&d[0].distance<c[0].distance))return(h=c[0])==null?void 0:h.object})();if(!o||!this.objectIsBound(o)){for(const c of(l=this.boundObject.hover)!=null?l:[])c._hovered&&this.notify("unHover",c);return}if(this.notify(t,o))return!1});u(this,"objectIsBound",t=>{let e=t._domEvent,i=t.parent;for(;typeof e=="undefined"&&i;)e=i._domEvent,i=i.parent;return!!e});u(this,"notify",(t,e,i,s)=>{var c;let o=!1,r=[];const a=[];let l=e;for(a.push(l);l.parent;)l=l.parent,a.push(l);for(const d of a){if(o)break;const h=d._domEvent;if(!h)continue;const f=h[`${t}Handler`];if(f)for(const[m,A]of f){if(A!=null&&A.checkVisible&&!Wo(d))continue;if(t==="hover"){if(d._hovered)continue;d._hovered=!0;for(const g of(c=this.boundObject.hover)!=null?c:[])g!==d&&g._hovered&&this.notify("unHover",g)}if(t==="unHover"){if(!d._hovered)continue;d._hovered=!1}const p=m({type:t,target:d,origDomEvent:i,intersect:s,stopPropagation:()=>{o=!0}});r.push(p!=null?p:!0)}}if(t==="click")return r.some(d=>d===!0)});this.five=t,t.on("wantsGesture",this.handleWantsGesture)}addAutoBindEventListener(t,e,i,s){const o=()=>this.addEventListener(t,e,i,s),r=()=>this.removeEventListener(t,e,i,s);return t.addEventListener("added",o),t.addEventListener("removed",r),t.addEventListener("dispose",r),()=>{t.removeEventListener("added",o),t.removeEventListener("removed",r),t.removeEventListener("dispose",r)}}addEventListener(t,e,i,s){var o;t._domEvent||(t._domEvent={}),t._domEvent[`${e}Handler`]||(t._domEvent[`${e}Handler`]=[]),this.boundObject[e]||(this.boundObject[e]=[]),t._domEvent[`${e}Handler`].push([i,V({checkVisible:!0},s)]),(o=this.boundObject[e])==null||o.push(t)}removeEventListener(t,e,i,...s){var r,a;if(!t._domEvent||!t._domEvent[`${e}Handler`])return;const o=t._domEvent[`${e}Handler`].findIndex(l=>l[0]===i);if(o!==-1&&(t._domEvent[`${e}Handler`].splice(o,1),t._domEvent[`${e}Handler`].length===0&&delete t._domEvent[`${e}Handler`],t._domEvent&&Object.keys(t._domEvent).length===0&&delete t._domEvent,!t._domEvent)){const l=(r=this.boundObject[e])==null?void 0:r.findIndex(c=>c===t);l!==-1&&((a=this.boundObject[e])==null||a.splice(l,1))}}dispose(){var t;(t=this.five)==null||t.off("wantsGesture",this.handleWantsGesture),this.boundObject={}}getRaycaster(t){const e=this.five.getElement();if(!e)return;const i=K1(t,e),s=new k.Raycaster;return s.setFromCamera(i,this.five.camera),s}}function Ih(n){var e,i;typeof n.visibleConfig=="object"&&n.visibleConfig.keep&&(n.visibleConfig.keep==="visible"?n.visibleConfig={keep:n.visibleConfig.keep,visibleFiveMode:(e=n.visibleConfig)==null?void 0:e.visibleFiveMode}:n.visibleConfig.keep==="hidden"&&(n.visibleConfig={keep:n.visibleConfig.keep})),typeof n.unfoldedConfig=="object"&&(n.unfoldedConfig.disableFold&&(n.unfoldedConfig={keep:"unfolded"}),n.unfoldedConfig.disableUnfold&&(n.unfoldedConfig={keep:"folded"}),n.unfoldedConfig.keep&&(n.unfoldedConfig={keep:n.unfoldedConfig.keep}));const t=(i=n.initialState)!=null?i:{};return typeof n.unfoldedConfig=="object"&&(n.unfoldedConfig.keep==="unfolded"?t.unfolded=!0:n.unfoldedConfig.keep==="folded"&&(t.unfolded=!1)),typeof n.visibleConfig=="object"&&(n.visibleConfig.keep==="visible"?t.visible=!0:n.visibleConfig.keep==="hidden"&&(t.visible=!1)),n.initialState=t,n}function Ph(n){return Object.entries(n)}function kh(n){const t=n.split("?")[0].split(".").pop();return t?t.toLowerCase():""}const ns=(n,t)=>{if(!t)return n;const e=new k.Vector3,i=new k.Quaternion,s=new k.Vector3;return t.decompose(e,i,s),n.clone().multiply(s).applyQuaternion(i).add(e)};class Mh{constructor(t){u(this,"five");this.five=t}}class Ur extends Mh{constructor(e){super(e);u(this,"_workCode")}set workCode(e){this._workCode=e}get workCode(){var e;return(e=this._workCode)!=null?e:this.five.state.workCode}get work(){var e,i;return(i=(e=this.five.works)==null?void 0:e.find(s=>s.workCode===this.workCode))!=null?i:this.five.work}get observers(){return this.work.observers}get transform(){var i;const e=(i=this.work.options)==null?void 0:i.transform;return e?e.clone():new k.Matrix4}getObserverPosition(e){var s;const i=(s=this.getObserver(e))==null?void 0:s.position;if(i)return ns(i,this.transform)}getObserverStandingPosition(e){var s;const i=(s=this.getObserver(e))==null?void 0:s.standingPosition;if(i)return ns(i,this.transform)}getObserver(e){var i;return(i=this.observers)==null?void 0:i[e]}}class ey extends U1{constructor(e){super(e);u(this,"tags",[]);u(this,"config",W1);u(this,"workUtil",new Ur(this.five));u(this,"mediaStore",Ar({currentMediaElement:null}));u(this,"css3DRenderPlugin");u(this,"store",{disposers:[],disposed:!1,resizeObserverDisposerAdding:!1,css3DRenderDisposer:new Map});u(this,"domEvents",new $1(this.five));u(this,"loadVideoFirstFrame",()=>{X1&&this.hooks.emit("loadVideoFirstFrame")});this.mediaStore.subscribe(({currentMediaElement:i})=>{this.tags.forEach(s=>{var o;if(s.mediaPlane instanceof Ch&&i!==s.mediaPlane.videoInstance){if(!((o=s.mediaPlane.videoInstance)!=null&&o.src)||i===s.mediaPlane.videoInstance)return;s.mediaPlane.pause()}})})}set workCode(e){this.workUtil.workCode=e}get workCode(){return this.workUtil.workCode}getTagById(e){const i=this.tags.find(s=>s.id===e);if(!i){console.warn(`getTagById Error: can't find tag id: ${e}`);return}return i}pauseCurrentMedia(){this.mediaStore.set({currentMediaElement:null})}getTagConfig(e,i){var a,l,c;const s=this.calculateTagConfig(e,{useCache:i==null?void 0:i.useCache}),o=(a=i==null?void 0:i.fiveMode)!=null?a:this.five.getCurrentState().mode,r=(l=s.configWithFiveMode)==null?void 0:l[o];return(c=r!=null?r:s)!=null?c:{}}getCurrentVisibleState(e){return!(!this.state.enabled||!this.state.visible||!e.enabled||!e.state.visible)}updateTagConfig(){this.clearCache(),this.tags.forEach(e=>{var o;const i=this.getTagConfig(e,{useCache:!1});e.computedConfig=i;const s=this.getTagConfig(e);if(e.config=s,e.config.initialData){const r=JSON.parse(JSON.stringify(e.data));e.data=(o=s.initialData)!=null&&o.important?Ve(e.data,r,s.initialData):Ve(e.data,s.initialData,r)}})}can(e,i){const s=i,o=this.getTagConfig(s);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}getRenderType(e){const i=(()=>{if(e.stickType==="3DPoint")return"Dom";const s=this.getTagConfig(e);if(!s||typeof s!="object"||!s.renderType)return;const o=e.data.mediaData;if(!(!o||o.length===0)&&s.renderType==="Mesh"){if(V1(e)){if(o.length===1){if(o[0].type==="Video")return navigator.userAgent.toLowerCase().indexOf("firefox")>-1&&navigator.userAgent.toLowerCase().indexOf("mobile")>-1?"Dom":"Mesh";if(o[0].type==="Image")return kh(o[0].url)==="gif"?"Dom":"Mesh"}}else if(Ut(e))return o.length===1&&o[0].type==="Image"?kh(o[0].url)==="gif"?"Dom":"Mesh":"BehindDom"}})();return i!=null?i:"Dom"}getAngle(e,i){const s=i!=null?i:this.five.getCurrentState().panoIndex;if(s===void 0)throw new Error(`getAngle(): fivePanoIndex is ${s}`);const o=this.getPanoIndexCache({panoIndex:i,id:e.id});if(o.angle!==void 0)return o.angle;{const r=this.workUtil.getObserverPosition(s);if(r===void 0)throw new Error(`getAngle(): observerPosition is ${r}`);const a=(()=>e.stickType==="3DPoint"?kt(e.normal):Fr(e.position))();if(!a)return;const l=$n(e);if(!l)return;const c=new k.Vector3().copy(r).sub(l),d=a.angleTo(c)*180/Math.PI;return o.angle=d,o.angle}}getDistance(e,i){const s=V(V({},this.five.getCurrentState()),i),{panoIndex:o,mode:r}=s,a=Tt(r)?this.getPanoIndexCache({panoIndex:o,id:e.id}):void 0;if((a==null?void 0:a.distance)!==void 0)return a.distance;const l=$n(e);if(!l)return-1;if(Tt(r)){const c=this.workUtil.getObserverPosition(o);if(c===void 0)return-1;const d=c.distanceTo(l);return a&&(a.distance=d),d}if(en(r))return this.five.camera.position.distanceTo(l)}getPositions(e){if(T1(e))return e.position;if(Ut(e))return e.data.mediaPosition;if(j1(e))return R1(this.five.camera.position,kt(e.position),kt(e.normal))}addObjectClickHandler(e,i,s){if(!i||!this.domEvents)return()=>{};const o=()=>!(!this.getCurrentVisibleState(e)||e.loading),r=a=>{if(!o())return!1;s(a.origDomEvent)};return this.domEvents.addEventListener(i,"click",r),()=>{var a;(a=this.domEvents)==null||a.removeEventListener(i,"click",r)}}getTagNormal(e){if(e.normal)return kt(e.normal);if(e.stickType==="Plane")return Fr(e.position);if(e.stickType==="Model")return Fr(this.getPositions(e))}get filterPointTag(){return this.tags.filter(e=>e.stickType==="2DPoint"||e.stickType==="3DPoint").filter(e=>e.position)}get filter2DPointTag(){return this.tags.filter(e=>e.stickType==="2DPoint").filter(e=>e.position)}get filterImagePlane(){return this.tags.filter(e=>e.contentType==="MediaPlane"&&e.stickType==="Plane"&&this.getRenderType(e)==="Mesh")}get filterMediaModel(){return this.tags.filter(e=>e.stickType==="Model"&&e.contentType==="MediaModel")}get filterCSS3DTag(){return this.tags.filter(i=>i.stickType==="3DPoint"||i.stickType==="Plane"||i.stickType==="Model"&&i.contentType==="MediaModel").filter(i=>{const s=this.getRenderType(i);return s==="BehindDom"||s==="Dom"})}getTransformedPostion(e){if(!e)return;const i=this.workUtil.transform;return Array.isArray(e)&&e.length===4?e.map(kt).map(s=>ns(s,i)):ns(kt(e),i)}checkDisposed(){return this.store.disposed?(console.error("PanoTagPluginController has been disposed"),!0):!1}calculateTagConfig(e,i){var A,p,g,v,y;const s=(A=i==null?void 0:i.useCache)!=null?A:!0;if(!e)return(p=this.config.globalConfig)!=null?p:{};if(s){if((g=e==null?void 0:e.computedConfig)!=null&&g._isMerged)return e.computedConfig;if((v=e==null?void 0:e.config)!=null&&v._isMerged)return e.config}const o={},r={},a={};this.config.contentTypeConfig&&Object.entries(this.config.contentTypeConfig).forEach(([P,I])=>{var N,F;const E=P,C=E.split("-"),z=P.startsWith("["),R=z?C[0].slice(1,-1):void 0,U=z?C.slice(1):C,H=R?["PanoramaLike","ModelLike"].includes(R)?(N=r[R])!=null?N:r[R]={}:(F=a[R])!=null?F:a[R]={}:o;if(!H[E]){if(U.length===0&&(H[E]=I),U.length===1){const[Q]=U;(e.contentType===Q||Q==="Any")&&(H[E]=I)}if(U.length===2){const[Q="Any",_="Any"]=U;Q==="Mixin"&&e.contentType===_&&(H[E]=I),(e.stickType===Q||Q==="Any")&&(e.contentType===_||_==="Any")&&(H[E]=I)}if(U.length===3){const[Q="Any",_,Y]=U;if(_==="Audio"&&e.contentType==="Audio"){const Z=e;(Z.stickType===Q||Q==="Any")&&Z.data.appearance===Y&&(H[E]=I)}}}});const l=(y=e.initialConfig)!=null?y:{},c=Ve({},mh,this.config.globalConfig,...Object.values(o)),d=Ve({},c,l),h={},f=Object.values(Ae.Five.Mode);Ph(r).forEach(([P,I])=>{f.forEach(E=>{(P==="PanoramaLike"&&Tt(E)||P==="ModelLike"&&en(E))&&(h[E]=Ve({},c,...Object.values(I),l,{_isMerged:!0}))})}),Ph(a).forEach(([P,I])=>{h[P]=Ve({},c,...Object.values(I),l,{_isMerged:!0})});const m=ge(V({},d),{configWithFiveMode:h});return Ih(m),Object.values(h).forEach(P=>Ih(P)),m._isMerged=!0,m}}function ty(n,t){if(!n)return 0;const e=n.observers;if(!t||!e)return console.error("getFloorIndex: invalid arguments: ",{point:t,observer:e}),0;const i=[];e.forEach(o=>{var a,l,c;const r=(l=(a=o.floorIndex)!=null?a:o.floor_index)!=null?l:0;i[r]||(i[r]=[]),i[r].push(ns(o.position,(c=n.options)==null?void 0:c.transform).y)});const s=i.map(o=>o.reduce((r,a)=>r+a,0)/o.length);for(let o=s.length-1;o>0;o--)if(t.y>=s[o])return o;return 0}const po=new k.Raycaster;po.params.Points.threshold=.1;class iy extends ey{constructor(t){super(t)}getVisible(t,e){const i=V(V({},this.five.getCurrentState()),e),{panoIndex:s,mode:o}=i,r=Tt(o)?this.getPanoIndexCache({panoIndex:s,id:t.id}):void 0;if((r==null?void 0:r.visible)!==void 0)return r.visible;{const a=[],l=(()=>{var d,h,f,m,A,p,g;const c=(d=this.getTagConfig(t).visibleConfig)!=null?d:{};if(typeof c=="function")return{value:c(this.five,{tag:t,distance:this.getDistance(t,i)}),checkedList:a,reason:"config function result"};if(c.keep==="hidden")return{value:!1,checkedList:a,reason:"config.keep is hidden"};if(c.keep==="visible")return{value:!0,checkedList:a,reason:"config.keep is visible"};if(c.visibleFiveMode!==void 0){const v=typeof c.visibleFiveMode=="function"?c.visibleFiveMode(t):c.visibleFiveMode;let y=!1;if(Array.isArray(v)?y=v.includes(o):v==="ModelLike"?y=en(o):v==="PanoramaLike"?y=!Tt(o):v==="all"?y=!0:typeof v=="string"&&(y=v===o),y===!1)return{value:!1,checkedList:a,reason:"current mode is not included in visibleFiveMode",visibleFiveMode:c.visibleFiveMode,mode:o}}else if(c.visibleFiveMode===void 0&&((h=this.five.getCurrentState())==null?void 0:h.mode)!==((m=(f=t.fiveState)==null?void 0:f.mode)!=null?m:"Panorama"))return{value:!1,checkedList:a,reason:"current mode is not equal to tag.fiveState.mode",tagFiveMode:(A=t.fiveState)==null?void 0:A.mode,mode:o};if(c.followModelVisibility===!0&&(o==="Floorplan"||o==="Mapview")&&this.getVisibleByFloorIndex(t)===!1)return{value:!1,checkedList:a,reason:"followModelVisibility check failed"};if(Tt(o)&&c.visiblePanoIndex!==void 0&&c.visiblePanoIndex!=="all"&&s!==void 0){if(a.push("visiblePanoIndex"),Array.isArray(c.visiblePanoIndex)&&!c.visiblePanoIndex.includes(s))return{value:!1,checkedList:a,reason:`current panoIndex is not included in visiblePano. currentPanoIndex: ${s}, visiblePanoIndex: ${c.visiblePanoIndex}`};if(c.visiblePanoIndex==="current"&&s!==((p=t.fiveState)==null?void 0:p.panoIndex))return{value:!1,checkedList:a,reason:`current panoIndex is not equal to tag.panoIndex. currentPanoIndex: ${s}, tag.panoIndex: ${(g=t.fiveState)==null?void 0:g.panoIndex}`}}if(c.visibleDistance!==void 0&&(a.push("visibleDistance"),c.visibleDistance!=="unLimited")){const v=this.getDistance(t,i);if(es(v,c.visibleDistance)===!1)return{value:!1,checkedList:a,panoIndex:s,visibleDistance:c.visibleDistance,reason:`distance is not in visibleDistance. distance: ${v}, visibleDistance: ${c.visibleDistance.min} - ${c.visibleDistance.max}`}}if(Tt(o)&&c.angleRange&&z1(t)){a.push("angleRange");const v=this.getAngle(t,s);if(es(v,c.angleRange)===!1)return{value:!1,checkedList:a,reason:`angle is not in angleRange. angle: ${v}, angleRange: ${c.angleRange}`}}if(c.intersectRaycaster!==!1&&(typeof c.intersectRaycaster!="object"||c.intersectRaycaster.enabled!==!1)){if(a.push("intersectRaycaster"),s===void 0)return{value:!1,checkedList:a,reason:`intersectRaycaster check failed: panoIndex is ${s}`};const v=this.getTagEnableByIntersect(t,s);if(v.value===!1)return Object.assign(v,{checkedList:a})}return{value:!0,checkedList:a,reason:"all check passed"}})();return r&&(r.visible=l.value,r.__debug_visible_reason__=l),l.value}}getUnfoldedByPanoIndex(t,e){if(!this.getCurrentVisibleState(t))return;const s=this.getPanoIndexCache({panoIndex:e,id:t.id});if(s.unfolded!==void 0)return s.unfolded;{const o=this.getTagConfig(t).unfoldedConfig;if(!o)return;const r=(()=>{if(typeof o=="function")return o(this.five,{tag:t,distance:this.getDistance(t,{panoIndex:e})});if(o.keep==="folded")return!1;if(o.keep==="unfolded")return!0;if(o.unfoldDistance&&es(this.getDistance(t,{panoIndex:e}),o.unfoldDistance)===!1)return!1})();s.unfolded=r;const a=this.getUnfoldedByCamera(t);return a!==void 0?a:s.unfolded}}getUnfoldedByCamera(t){return this.getCurrentVisibleState(t)?(()=>{var o;const s=this.getTagConfig(t).unfoldedConfig;if(s){if(typeof s=="function")return s(this.five,{tag:t,distance:this.getDistance(t)});if(s.keep==="folded")return!1;if(s.keep==="unfolded")return!0;if(s.autoUnfold===void 0||s.autoUnfold===!1||s.autoUnfold.enable===!1||!s.autoUnfold.strategy)return;if(s.autoUnfold.strategy==="ScreenPostion"){const r=this.getTagProject(t);if(r&&es(r.x,s.autoUnfold.autoUnfoldProjectX)===!1)return!1}if(s.autoUnfold.strategy==="MinimumDistance"){const l=this.filterPointTag.filter(d=>this.getCurrentVisibleState(d)).filter(d=>{const h=this.getTagProject(d);if(!h)return!1;const{x:f,y:m,z:A}=h;return!(Math.abs(A)>1||Math.abs(f)>1||Math.abs(m)>1)}).map(d=>({tag:d,id:d.id,tagConfig:this.getTagConfig(d).unfoldedConfig})).filter(({tag:d,tagConfig:h})=>{var f,m;return!(typeof h=="function"||h.keep||h.autoUnfold===!1||((f=h.autoUnfold)==null?void 0:f.enable)===!1||((m=h.autoUnfold)==null?void 0:m.strategy)!=="MinimumDistance")}).map(d=>ge(V({},d),{distance:this.getDistance(d.tag)})).filter(({distance:d,tagConfig:h})=>{const f=h.autoUnfold.distance;return!(f&&es(d,f)===!1)}).sort((d,h)=>d.distance-h.distance).findIndex(d=>d.id===t.id);if(l===-1||l<=((o=s.autoUnfold.maxNumber)!=null?o:1)-1===!1)return!1}return!0}})():void 0}setTagZIndex(t){return t.forEach(e=>{e.zIndex=this.calculateTagZIndex(e)})}calculateTagZIndex(t){const e=this.getDistance(t);return Math.round((1e4-(e!=null?e:0))*100)}setVisible(t){(t!=null?t:this.tags).forEach(e=>{const i=this.getVisible(e);e.state&&(e.state.visible=i)})}setUnfoldedByPanoIndex(){this.tags.forEach(t=>{const e=this.getUnfoldedByPanoIndex(t);if(t.state&&(e!==void 0&&(t.state.unfolded=e),e&&!t.state.visible)){const i=this.getTagConfig(t);typeof i.unfoldedConfig=="object"&&i.unfoldedConfig.autoFoldWhenHide!==!1&&(t.state.unfolded=!1)}})}getTagProject(t){const e=$n(t);if(!e)return;const{x:i,y:s,z:o}=e.project(this.five.camera);if(!(o>1))return{x:i,y:s,z:o}}getTagEnableByIntersect(t,e){var c,d,h,f,m;const i=qn(qn((c=this.getTagConfig(t).visibleConfig)!=null?c:{}).intersectRaycaster),s=e!=null?e:this.five.getCurrentState().panoIndex,o=Tt(this.five.getCurrentState().mode)?this.workUtil.getObserverPosition(s):this.five.camera.position;if(o===void 0)return{value:!1,reason:{type:"startPosition is undefined",fivePanoIndex:s}};const r=gl((()=>{var p;const A=(p=i.checkPoints)!=null?p:"center";return A==="center"?$n(t):A==="corner"?hh(t):Array.isArray(A)?A:[]})());let a=0,l=0;for(const A of r){const p=new k.Vector3().subVectors(A,o).normalize();po.set(o,p);const g=o.distanceTo(A),[v]=this.five.model.intersectRaycaster(po),y=(()=>{if(!Ut(t))return;const z=this.tags.filter(Ut).map(U=>{var H;return(H=U.model)==null?void 0:H.object}).filter(jt),[R]=po.intersectObjects(z,!0);return R})(),P=(d=i.distanceAccuracy)!=null?d:.01;Math.min((h=v==null?void 0:v.distance)!=null?h:1/0,(f=y==null?void 0:y.distance)!=null?f:1/0)+P>=g?a++:l++;const C=(m=i.needPassed)!=null?m:1;if(a>=C)return{value:!0}}return l===0?{value:!0}:{value:!1,reason:{type:"intersectRaycaster check failed",passedCount:a,needPassed:i.needPassed}}}getVisibleByFloorIndex(t){var o,r,a,l,c,d,h;let e=0;const i=(o=t.fiveState)==null?void 0:o.panoIndex;i!==void 0?e=(r=this.workUtil.getObserver(i))==null?void 0:r.floorIndex:e=ty(this.workUtil.work,(h=(d=(l=(a=t.model)==null?void 0:a.object)==null?void 0:l.position)!=null?d:(c=t.mediaPlane)==null?void 0:c.position)!=null?h:$n(t));const s=this.five.model.shownFloor;return s===null||s===e}}function ny(n){me(n,"svelte-xuejcm",".line.svelte-xuejcm{position:absolute;pointer-events:none}.line.vertical.svelte-xuejcm{transform:rotate(-90deg) translate3d(0.03125rem, 0, 0.625rem);transform-origin:0 0}.line.horizontal.svelte-xuejcm{transform:translate3d(0, -0.03125rem, 0.625rem)}.straight-line.svelte-xuejcm{display:block;width:100%;height:100%;overflow:visible}")}function Eh(n){let t,e,i,s,o,r,a,l=n[3]&&Dh(n);return{c(){t=x("div"),e=Oe("svg"),i=Oe("defs"),s=Oe("linearGradient"),o=Oe("stop"),r=Oe("stop"),l&&l.c(),w(o,"offset","25%"),w(o,"stop-color",n[5]),w(o,"stop-opacity","1"),w(r,"offset","100%"),w(r,"stop-color",n[5]),w(r,"stop-opacity","0.5"),w(s,"x1",.5),w(s,"y1",.5),w(s,"x2",n[8]),w(s,"y2",.5),w(s,"id",n[10]),w(s,"gradientUnits","userSpaceOnUse"),w(e,"class","straight-line svelte-xuejcm"),w(e,"viewBox",a="0 0 "+n[8]+" "+n[7]),w(e,"preserveAspectRatio","none"),w(t,"class","line svelte-xuejcm"),$(t,"vertical",n[9]),$(t,"horizontal",!n[9]),S(t,"width",n[8]+"px"),S(t,"height",n[7]+"px")},m(c,d){O(c,t,d),L(t,e),L(e,i),L(i,s),L(s,o),L(s,r),l&&l.m(e,null)},p(c,d){d&32&&w(o,"stop-color",c[5]),d&32&&w(r,"stop-color",c[5]),d&256&&w(s,"x2",c[8]),c[3]?l?(l.p(c,d),d&8&&D(l,1)):(l=Dh(c),l.c(),D(l,1),l.m(e,null)):l&&(he(),T(l,1,1,()=>{l=null}),ue()),d&384&&a!==(a="0 0 "+c[8]+" "+c[7])&&w(e,"viewBox",a),d&512&&$(t,"vertical",c[9]),d&512&&$(t,"horizontal",!c[9]),d&256&&S(t,"width",c[8]+"px"),d&128&&S(t,"height",c[7]+"px")},d(c){c&&j(t),l&&l.d()}}}function Dh(n){let t,e,i,s,o;return{c(){t=Oe("path"),w(t,"fill","none"),w(t,"stroke",e=n[4]?`url(#${n[10]})`:n[5]),w(t,"stroke-width",1),w(t,"d",n[6])},m(r,a){O(r,t,a),o=!0},p(r,a){n=r,(!o||a&48&&e!==(e=n[4]?`url(#${n[10]})`:n[5]))&&w(t,"stroke",e),(!o||a&64)&&w(t,"d",n[6])},i(r){o||(r&&We(()=>{o&&(s&&s.end(1),i=Si(t,Js,{duration:n[2],delay:n[0],easing:ei}),i.start())}),o=!0)},o(r){i&&i.invalidate(),r&&(s=fn(t,Js,{duration:n[2],delay:n[1],easing:ei})),o=!1},d(r){r&&j(t),r&&s&&s.end()}}}function sy(n){let t,e=n[8]&&Eh(n);return{c(){e&&e.c(),t=Ie()},m(i,s){e&&e.m(i,s),O(i,t,s)},p(i,[s]){i[8]?e?e.p(i,s):(e=Eh(i),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},i:J,o:J,d(i){e&&e.d(i),i&&j(t)}}}function oy(n,t,e){let i,s,o,r,{inDelay:a=0}=t,{outDelay:l=0}=t,{duration:c=1e3}=t,{unfolded:d}=t,{length:h}=t,{direction:f="horizontal"}=t,{useLinearColor:m=!1}=t,{color:A="white"}=t;const p=et();return n.$$set=g=>{"inDelay"in g&&e(0,a=g.inDelay),"outDelay"in g&&e(1,l=g.outDelay),"duration"in g&&e(2,c=g.duration),"unfolded"in g&&e(3,d=g.unfolded),"length"in g&&e(11,h=g.length),"direction"in g&&e(12,f=g.direction),"useLinearColor"in g&&e(4,m=g.useLinearColor),"color"in g&&e(5,A=g.color)},n.$$.update=()=>{n.$$.dirty&4096&&e(9,i=f==="vertical"),n.$$.dirty&2048&&e(8,s=h),n.$$.dirty&2048&&e(6,r=`M0.5 0.5 H ${h}`)},e(7,o=1),[a,l,c,d,m,A,r,o,s,i,p,h,f]}class Yr extends ce{constructor(t){super(),le(this,t,oy,sy,ae,{inDelay:0,outDelay:1,duration:2,unfolded:3,length:11,direction:12,useLinearColor:4,color:5},ny)}}function ry(n){me(n,"svelte-faoauy",".shadow.svelte-faoauy{position:absolute}")}function xh(n){let t,e,i,s,o;return{c(){t=x("div"),w(t,"class","shadow svelte-faoauy"),w(t,"style",e=`
565
565
  left: ${Dt(n[5])};
566
566
  bottom: ${Dt(n[6])};
567
567
  border-radius: ${n[10]?"9999px":"0"};
@@ -577,11 +577,11 @@ void main() {
577
577
  ${n[8]?"transform: translateX(-50%); left: 50%":""}
578
578
  ${n[9]?"transform: translateX(-50%); top: 50%":""}
579
579
  ${n[7]?"transform: translate(-50%, -50%); left: 50%; top: 50%;":""}
580
- `))&&w(t,"style",e);const l=a&16352;(l||a&16360)&&S(t,"width",Dt(n[3])),(l||a&16368)&&S(t,"height",Dt(n[4])),(l||a&32736)&&S(t,"z-index",n[14])},i(r){o||(r&&We(()=>{o&&(s&&s.end(1),i=Si(t,ot,{duration:n[0]}),i.start())}),o=!0)},o(r){i&&i.invalidate(),r&&(s=fn(t,ot,{duration:n[1]})),o=!1},d(r){r&&j(t),r&&s&&s.end()}}}function ay(n){let t,e=n[2]&&xh(n);return{c(){e&&e.c(),t=Ie()},m(i,s){e&&e.m(i,s),O(i,t,s)},p(i,[s]){i[2]?e?(e.p(i,s),s&4&&D(e,1)):(e=xh(i),e.c(),D(e,1),e.m(t.parentNode,t)):e&&(he(),T(e,1,1,()=>{e=null}),ue())},i(i){D(e)},o(i){T(e)},d(i){e&&e.d(i),i&&j(t)}}}function Dt(n){return typeof n=="number"?n/16+"rem":n}function ly(n,t,e){let{inDelay:i=1e3}=t,{outDelay:s=1e3}=t,{visible:o=!0}=t,{width:r=0}=t,{height:a=0}=t,{left:l=0}=t,{bottom:c=0}=t,{center:d=!1}=t,{horizontalCenter:h=!1}=t,{verticalCenter:f=!1}=t,{round:m=!1}=t,{blurRadius:A}=t,{spreadRadius:p}=t,{opacity:g=.15}=t,{zIndex:v=-1}=t;return n.$$set=y=>{"inDelay"in y&&e(0,i=y.inDelay),"outDelay"in y&&e(1,s=y.outDelay),"visible"in y&&e(2,o=y.visible),"width"in y&&e(3,r=y.width),"height"in y&&e(4,a=y.height),"left"in y&&e(5,l=y.left),"bottom"in y&&e(6,c=y.bottom),"center"in y&&e(7,d=y.center),"horizontalCenter"in y&&e(8,h=y.horizontalCenter),"verticalCenter"in y&&e(9,f=y.verticalCenter),"round"in y&&e(10,m=y.round),"blurRadius"in y&&e(11,A=y.blurRadius),"spreadRadius"in y&&e(12,p=y.spreadRadius),"opacity"in y&&e(13,g=y.opacity),"zIndex"in y&&e(14,v=y.zIndex)},[i,s,o,r,a,l,c,d,h,f,m,A,p,g,v]}class Vt extends ce{constructor(t){super(),le(this,t,ly,ay,ae,{inDelay:0,outDelay:1,visible:2,width:3,height:4,left:5,bottom:6,center:7,horizontalCenter:8,verticalCenter:9,round:10,blurRadius:11,spreadRadius:12,opacity:13,zIndex:14},ry)}}function cy(){return Math.random().toString(36).slice(-6)}const Ao=cy();function dy(n){me(n,"svelte-1b2n9wi",".text-char.svelte-1b2n9wi{display:inline-block;text-shadow:0.125rem 0rem 0.5rem rgba(0, 0, 0, 0.15)}")}function Sh(n,t,e){const i=n.slice();return i[19]=t[e].id,i[0]=t[e].content,i[20]=t,i[21]=e,i}function hy(n){let t,e=n[0]+"",i,s=n[21];const o=()=>n[10](t,s),r=()=>n[10](null,s);return{c(){t=x("span"),i=De(e),w(t,"class","text-char svelte-1b2n9wi")},m(a,l){O(a,t,l),L(t,i),o()},p(a,l){n=a,l&4&&e!==(e=n[0]+"")&&Se(i,e),s!==n[21]&&(r(),s=n[21],o())},d(a){a&&j(t),r()}}}function uy(n){let t;return{c(){t=x("br")},m(e,i){O(e,t,i)},p:J,d(e){e&&j(t)}}}function fy(n){let t,e=n[21];const i=()=>n[9](t,e),s=()=>n[9](null,e);return{c(){t=x("span"),t.textContent=" ",w(t,"class","text-char svelte-1b2n9wi")},m(o,r){O(o,t,r),i()},p(o,r){n=o,e!==n[21]&&(s(),e=n[21],i())},d(o){o&&j(t),s()}}}function Lh(n,t){let e,i;function s(a,l){return a[0]===a[3]?fy:a[0]===a[4]?uy:hy}let o=s(t),r=o(t);return{key:n,first:null,c(){e=Ie(),r.c(),i=Ie(),this.first=e},m(a,l){O(a,e,l),r.m(a,l),O(a,i,l)},p(a,l){t=a,o===(o=s(t))&&r?r.p(t,l):(r.d(1),r=o(t),r&&(r.c(),r.m(i.parentNode,i)))},d(a){a&&j(e),r.d(a),a&&j(i)}}}function my(n){let t=[],e=new Map,i,s=n[2];const o=r=>r[19];for(let r=0;r<s.length;r+=1){let a=Sh(n,s,r),l=o(a);e.set(l,t[r]=Lh(l,a))}return{c(){for(let r=0;r<t.length;r+=1)t[r].c();i=Ie()},m(r,a){for(let l=0;l<t.length;l+=1)t[l]&&t[l].m(r,a);O(r,i,a)},p(r,[a]){a&30&&(s=r[2],t=Bt(t,a,o,1,r,s,e,i.parentNode,mr,Lh,i,Sh))},i:J,o:J,d(r){for(let a=0;a<t.length;a+=1)t[a].d(r);r&&j(i)}}}function gy(n,t,e){let i,{inDelay:s=0}=t,{outDelay:o=0}=t,{content:r}=t,{unfolded:a}=t,{isFistUnfoldedUpdate:l=!0}=t;const c=`__EMOJI_SPLIT_${Ao}__`,d=`__EMOJI_${Ao}__`,h=`__SPACE_${Ao}__`,f=`__NEW_LINE_${Ao}__`;let m,A,p=[];function g(C){const z=[],R=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 C.slice().replace(R,U=>`${c}${d}${U}${c}`).split(c).forEach(U=>U.startsWith(d)?z.push({id:nt(),content:U.slice(d.length)}):z.push(...U.split("").map(H=>H===" "?h:H===`
581
- `?f:H).map(H=>({id:nt(),content:H})))),z}function v(){if(!A)return;const C=!a;A.reversed!==C&&A.reverse(),A.play()}function y(C){if(l){e(5,l=!1);return}clearTimeout(m),m=setTimeout(v,C?s:o)}function P(C){const z=function(){const R=G1(U=>C[U].getBoundingClientRect().x,[Math.min(C.length-1,10),Math.min(C.length-1,30)]);if(R>0)return R}();A=xt({targets:C.slice(0,z).filter(jt),autoplay:!1,duration:400,scale:[.7,1],rotate:[20,0],opacity:[0,1],translateX:[4,0],translateY:[10,0],delay:xt.stagger(50),easing:"easeInOutCubic"}),a&&A.seek(A.duration)}function I(C,z){Ne[C?"unshift":"push"](()=>{p[z]=C,e(1,p)})}function E(C,z){Ne[C?"unshift":"push"](()=>{p[z]=C,e(1,p)})}return n.$$set=C=>{"inDelay"in C&&e(6,s=C.inDelay),"outDelay"in C&&e(7,o=C.outDelay),"content"in C&&e(0,r=C.content),"unfolded"in C&&e(8,a=C.unfolded),"isFistUnfoldedUpdate"in C&&e(5,l=C.isFistUnfoldedUpdate)},n.$$.update=()=>{n.$$.dirty&1&&e(2,i=g(r)),n.$$.dirty&256&&y(a),n.$$.dirty&2&&P(p.filter(C=>!!C))},[r,p,i,h,f,l,s,o,a,I,E]}class Th extends ce{constructor(t){super(),le(this,t,gy,my,ae,{inDelay:6,outDelay:7,content:0,unfolded:8,isFistUnfoldedUpdate:5},dy)}}function py(n){me(n,"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 jh(n){let t,e,i,s,o,r,a,l,c,d;return e=new Vt({props:{center:!0,blurRadius:9,spreadRadius:3}}),{c(){t=x("div"),oe(e.$$.fragment),i=K(),s=x("div"),w(s,"class",o="arrow "+n[0]+" svelte-1ogmlqq"),S(s,"background-image","url("+Sb+")"),w(t,"class","arrow-wrapper svelte-1ogmlqq")},m(h,f){O(h,t,f),ne(e,t,null),L(t,i),L(t,s),l=!0,c||(d=be(s,"click",n[5]),c=!0)},p(h,f){n=h,(!l||f&1&&o!==(o="arrow "+n[0]+" svelte-1ogmlqq"))&&w(s,"class",o)},i(h){l||(D(e.$$.fragment,h),h&&We(()=>{l&&(a&&a.end(1),r=Si(s,ot,{duration:n[2],delay:n[3],easing:gn}),r.start())}),l=!0)},o(h){T(e.$$.fragment,h),r&&r.invalidate(),h&&(a=fn(s,ot,{duration:n[2],delay:n[4],easing:gn})),l=!1},d(h){h&&j(t),se(e),h&&a&&a.end(),c=!1,d()}}}function Ay(n){let t,e,i=n[1]&&jh(n);return{c(){i&&i.c(),t=Ie()},m(s,o){i&&i.m(s,o),O(s,t,o),e=!0},p(s,[o]){s[1]?i?(i.p(s,o),o&2&&D(i,1)):(i=jh(s),i.c(),D(i,1),i.m(t.parentNode,t)):i&&(he(),T(i,1,1,()=>{i=null}),ue())},i(s){e||(D(i),e=!0)},o(s){T(i),e=!1},d(s){i&&i.d(s),s&&j(t)}}}function vy(n,t,e){let{direction:i="right"}=t,{visible:s=!0}=t,{duration:o=0}=t,{inDelay:r=0}=t,{outDelay:a=0}=t;function l(c){cn.call(this,n,c)}return n.$$set=c=>{"direction"in c&&e(0,i=c.direction),"visible"in c&&e(1,s=c.visible),"duration"in c&&e(2,o=c.duration),"inDelay"in c&&e(3,r=c.inDelay),"outDelay"in c&&e(4,a=c.outDelay)},[i,s,o,r,a,l]}let by=class extends ce{constructor(t){super(),le(this,t,vy,Ay,ae,{direction:0,visible:1,duration:2,inDelay:3,outDelay:4},py)}};function yy(n,t,e=20,i=5){return new Promise((s,o)=>{let r=0;const a=setInterval(()=>{const l=n();t(l)?(clearInterval(a),s(l)):r>=i&&(clearInterval(a),o(l)),r++},e)})}function wy(n){me(n,"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 zh(n){let t,e,i;return e=new Th({props:{unfolded:n[0],content:n[1],inDelay:500,outDelay:n[5]}}),{c(){t=x("div"),oe(e.$$.fragment),w(t,"class","text svelte-1fuzm7v"),S(t,"transform",n[7])},m(s,o){O(s,t,o),ne(e,t,null),n[10](t),i=!0},p(s,o){const r={};o&1&&(r.unfolded=s[0]),o&2&&(r.content=s[1]),o&32&&(r.outDelay=s[5]),e.$set(r),o&128&&S(t,"transform",s[7])},i(s){i||(D(e.$$.fragment,s),i=!0)},o(s){T(e.$$.fragment,s),i=!1},d(s){s&&j(t),se(e),n[10](null)}}}function Oh(n){let t,e,i;return e=new by({props:{direction:n[6],visible:n[0],inDelay:600,duration:1e3}}),{c(){t=x("div"),oe(e.$$.fragment),w(t,"class","arrow svelte-1fuzm7v")},m(s,o){O(s,t,o),ne(e,t,null),i=!0},p(s,o){const r={};o&64&&(r.direction=s[6]),o&1&&(r.visible=s[0]),e.$set(r)},i(s){i||(D(e.$$.fragment,s),i=!0)},o(s){T(e.$$.fragment,s),i=!1},d(s){s&&j(t),se(e)}}}function Cy(n){let t,e,i,s=n[1]&&zh(n),o=n[3]<n[4]&&Oh(n);return{c(){s&&s.c(),t=K(),o&&o.c(),e=Ie()},m(r,a){s&&s.m(r,a),O(r,t,a),o&&o.m(r,a),O(r,e,a),i=!0},p(r,[a]){r[1]?s?(s.p(r,a),a&2&&D(s,1)):(s=zh(r),s.c(),D(s,1),s.m(t.parentNode,t)):s&&(he(),T(s,1,1,()=>{s=null}),ue()),r[3]<r[4]?o?(o.p(r,a),a&24&&D(o,1)):(o=Oh(r),o.c(),D(o,1),o.m(e.parentNode,e)):o&&(he(),T(o,1,1,()=>{o=null}),ue())},i(r){i||(D(s),D(o),i=!0)},o(r){T(s),T(o),i=!1},d(r){s&&s.d(r),r&&j(t),o&&o.d(r),r&&j(e)}}}function Iy(n,t,e){let i,s,o,{visible:r=!1}=t,{textUnfolded:a=!1}=t,{content:l}=t,c,d=0,h=0,f=0;function m(A){Ne[A?"unshift":"push"](()=>{c=A,e(2,c)})}return n.$$set=A=>{"visible"in A&&e(0,r=A.visible),"textUnfolded"in A&&e(8,a=A.textUnfolded),"content"in A&&e(1,l=A.content)},n.$$.update=()=>{if(n.$$.dirty&7&&c&&r&&l){const{lineHeight:A}=getComputedStyle(c);e(4,f=c.offsetHeight),yy(()=>c==null?void 0:c.offsetHeight,Boolean).then(()=>{e(4,f=c.offsetHeight)}),e(3,h=Number(A.replace("px","")))}n.$$.dirty&280&&e(9,d=a?h-f:0),n.$$.dirty&512&&e(7,i=`translateY(${d}px)`),n.$$.dirty&256&&e(6,s=a?"left":"right"),n.$$.dirty&256&&e(5,o=a?450:0)},[r,l,c,h,f,o,s,i,a,d,m]}class Bh extends ce{constructor(t){super(),le(this,t,Iy,Cy,ae,{visible:0,textUnfolded:8,content:1},wy)}}function Py(n){me(n,"svelte-5hip41",".content.svelte-5hip41{--height:62.4375rem;width:-moz-max-content;width:max-content;height:var(--height);padding:calc(var(--height) - 1.125rem) 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 Vh(n){var d,h;let t,e,i,s,o,r,a,l,c;return t=new Vt({props:{visible:n[2],left:n[3]/2+"px",bottom:12,width:2,blurRadius:120,spreadRadius:60}}),i=new Yr({props:{unfolded:n[2],length:n[3],outDelay:n[4]+40*Math.min((h=(d=n[6][0])==null?void 0:d.content.length)!=null?h:10,15),useLinearColor:!0}}),r=new Bh({props:{visible:n[2],textUnfolded:n[1],content:n[5]}}),{c(){oe(t.$$.fragment),e=K(),oe(i.$$.fragment),s=K(),o=x("div"),oe(r.$$.fragment),w(o,"class","content svelte-5hip41")},m(f,m){ne(t,f,m),O(f,e,m),ne(i,f,m),O(f,s,m),O(f,o,m),ne(r,o,null),a=!0,l||(c=[zt(mi.call(null,o)),be(o,"clientWidth",n[10]),be(o,"click",n[7])],l=!0)},p(f,m){var v,y;const A={};m&4&&(A.visible=f[2]),m&8&&(A.left=f[3]/2+"px"),t.$set(A);const p={};m&4&&(p.unfolded=f[2]),m&8&&(p.length=f[3]),m&16&&(p.outDelay=f[4]+40*Math.min((y=(v=f[6][0])==null?void 0:v.content.length)!=null?y:10,15)),i.$set(p);const g={};m&4&&(g.visible=f[2]),m&2&&(g.textUnfolded=f[1]),m&32&&(g.content=f[5]),r.$set(g)},i(f){a||(D(t.$$.fragment,f),D(i.$$.fragment,f),D(r.$$.fragment,f),a=!0)},o(f){T(t.$$.fragment,f),T(i.$$.fragment,f),T(r.$$.fragment,f),a=!1},d(f){se(t,f),f&&j(e),se(i,f),f&&j(s),f&&j(o),se(r),l=!1,Xe(c)}}}function ky(n){let t,e,i=n[0].state&&Vh(n);return{c(){i&&i.c(),t=Ie()},m(s,o){i&&i.m(s,o),O(s,t,o),e=!0},p(s,[o]){s[0].state?i?(i.p(s,o),o&1&&D(i,1)):(i=Vh(s),i.c(),D(i,1),i.m(t.parentNode,t)):i&&(he(),T(i,1,1,()=>{i=null}),ue())},i(s){e||(D(i),e=!0)},o(s){T(i),e=!1},d(s){i&&i.d(s),s&&j(t)}}}function My(n,t,e){let i,s,o,r,a,{tag:l}=t,c,d=!1,h=[];function f(){e(1,d=!d)}const m=A=>{e(3,c=A.detail)};return n.$$set=A=>{"tag"in A&&e(0,l=A.tag)},n.$$.update=()=>{var A,p,g,v;n.$$.dirty&1&&e(2,i=!!((A=l.state)!=null&&A.unfolded)),n.$$.dirty&1&&e(9,s=(g=(p=l.data.title)!=null?p:l.data.text)!=null?g:""),n.$$.dirty&1&&e(8,o=(v=l.data.description)!=null?v:""),n.$$.dirty&768&&e(5,r=(()=>{if(s&&o)return s+`
582
- `+o;if(s)return s;if(o)return o})()),n.$$.dirty&4&&(i||setTimeout(()=>{e(1,d=!1)},20)),n.$$.dirty&2&&e(4,a=d?450:0)},[l,d,i,c,a,r,h,f,o,s,m]}class Ey extends ce{constructor(t){super(),le(this,t,My,ky,ae,{tag:0},Py)}}function Yt(n){return typeof n=="number"?n/16+"rem":n}function Dy(n){me(n,"svelte-1j0cz4o",'.text.svelte-1j0cz4o{display:-webkit-box;display:-ms-box;display:-moz-box;position:relative;width:-moz-max-content;width:max-content;max-width:100%;-webkit-box-orient:vertical;-ms-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}@keyframes svelte-1j0cz4o-blink{0%{opacity:1}50%{opacity:0}100%{opacity:1}}.caret.svelte-1j0cz4o{position:absolute;width:0.0625rem;height:100%;background-color:#fff;animation:svelte-1j0cz4o-blink 1.2s infinite}.placeholder.svelte-1j0cz4o{opacity:0.5}.placeholder.svelte-1j0cz4o:empty::after{content:" "}')}function xy(n){let t;const e=n[6].default,i=sn(e,n,n[5],null);return{c(){i&&i.c()},m(s,o){i&&i.m(s,o),t=!0},p(s,o){i&&i.p&&(!t||o&32)&&rn(i,e,s,s[5],t?on(e,s[5],o,null):an(s[5]),null)},i(s){t||(D(i,s),t=!0)},o(s){T(i,s),t=!1},d(s){i&&i.d(s)}}}function Sy(n){var o,r;let t,e,i=((o=n[3])==null?void 0:o.inputting)&&Rh(),s=typeof((r=n[3])==null?void 0:r.placeholder)=="string"&&Qh(n);return{c(){i&&i.c(),t=K(),s&&s.c(),e=Ie()},m(a,l){i&&i.m(a,l),O(a,t,l),s&&s.m(a,l),O(a,e,l)},p(a,l){var c,d;(c=a[3])!=null&&c.inputting?i||(i=Rh(),i.c(),i.m(t.parentNode,t)):i&&(i.d(1),i=null),typeof((d=a[3])==null?void 0:d.placeholder)=="string"?s?s.p(a,l):(s=Qh(a),s.c(),s.m(e.parentNode,e)):s&&(s.d(1),s=null)},i:J,o:J,d(a){i&&i.d(a),a&&j(t),s&&s.d(a),a&&j(e)}}}function Ly(n){let t;return{c(){t=De(n[2])},m(e,i){O(e,t,i)},p(e,i){i&4&&Se(t,e[2])},i:J,o:J,d(e){e&&j(t)}}}function Rh(n){let t;return{c(){t=x("div"),w(t,"class","caret svelte-1j0cz4o")},m(e,i){O(e,t,i)},d(e){e&&j(t)}}}function Qh(n){let t,e=n[3].placeholder+"",i;return{c(){t=x("span"),i=De(e),w(t,"class","placeholder svelte-1j0cz4o")},m(s,o){O(s,t,o),L(t,i)},p(s,o){o&8&&e!==(e=s[3].placeholder+"")&&Se(i,e)},d(s){s&&j(t)}}}function Ty(n){let t,e,i,s;const o=[Ly,Sy,xy],r=[];function a(l,c){return l[2]?0:l[4]?1:2}return e=a(n),i=r[e]=o[e](n),{c(){t=x("div"),i.c(),w(t,"class","text svelte-1j0cz4o"),S(t,"max-width",typeof n[1]=="number"?Yt(n[1]):n[1]),S(t,"-webkit-line-clamp",n[0])},m(l,c){O(l,t,c),r[e].m(t,null),s=!0},p(l,[c]){let d=e;e=a(l),e===d?r[e].p(l,c):(he(),T(r[d],1,1,()=>{r[d]=null}),ue(),i=r[e],i?i.p(l,c):(i=r[e]=o[e](l),i.c()),D(i,1),i.m(t,null)),c&2&&S(t,"max-width",typeof l[1]=="number"?Yt(l[1]):l[1]),c&1&&S(t,"-webkit-line-clamp",l[0])},i(l){s||(D(i),s=!0)},o(l){T(i),s=!1},d(l){l&&j(t),r[e].d()}}}function jy(n,t,e){let i,{$$slots:s={},$$scope:o}=t,{maxLine:r=null}=t,{maxWidth:a=null}=t,{text:l=null}=t,{edit:c=null}=t;return n.$$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,o=d.$$scope)},n.$$.update=()=>{n.$$.dirty&8&&e(4,i=typeof(c==null?void 0:c.placeholder)=="string"||(c==null?void 0:c.inputting))},[r,a,l,c,i,o,s]}class Xr extends ce{constructor(t){super(),le(this,t,jy,Ty,ae,{maxLine:0,maxWidth:1,text:2,edit:3},Dy)}}function zy(n){me(n,"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 Gh(n){var h,f;let t,e,i,s,o,r,a,l,c;t=new Yr({props:{unfolded:n[1],direction:"vertical",length:15,duration:500,inDelay:200,useLinearColor:!0}}),a=new Xr({props:{text:n[4],edit:(h=n[0].data.edit)==null?void 0:h.title,maxLine:n[2]}});let d=(n[0].data.description||((f=n[0].data.edit)==null?void 0:f.description))&&Nh(n);return{c(){oe(t.$$.fragment),e=K(),i=x("div"),s=x("div"),o=x("div"),r=x("div"),oe(a.$$.fragment),l=K(),d&&d.c(),w(r,"class","title svelte-1oxrkr1"),w(o,"class","plane svelte-1oxrkr1"),w(s,"class","plane__wrapper svelte-1oxrkr1"),S(s,"transform",n[1]?"translateY(-15px)":"translateY(0)"),w(i,"class","plane__container svelte-1oxrkr1"),$(i,"unfolded",n[1]),$(i,"folded",n[5])},m(m,A){ne(t,m,A),O(m,e,A),O(m,i,A),L(i,s),L(s,o),L(o,r),ne(a,r,null),L(o,l),d&&d.m(o,null),c=!0},p(m,A){var v,y;const p={};A&2&&(p.unfolded=m[1]),t.$set(p);const g={};A&16&&(g.text=m[4]),A&1&&(g.edit=(v=m[0].data.edit)==null?void 0:v.title),A&4&&(g.maxLine=m[2]),a.$set(g),m[0].data.description||(y=m[0].data.edit)!=null&&y.description?d?(d.p(m,A),A&1&&D(d,1)):(d=Nh(m),d.c(),D(d,1),d.m(o,null)):d&&(he(),T(d,1,1,()=>{d=null}),ue()),A&2&&S(s,"transform",m[1]?"translateY(-15px)":"translateY(0)"),(!c||A&2)&&$(i,"unfolded",m[1]),(!c||A&32)&&$(i,"folded",m[5])},i(m){c||(D(t.$$.fragment,m),D(a.$$.fragment,m),D(d),c=!0)},o(m){T(t.$$.fragment,m),T(a.$$.fragment,m),T(d),c=!1},d(m){se(t,m),m&&j(e),m&&j(i),se(a),d&&d.d()}}}function Nh(n){var s;let t,e,i;return e=new Xr({props:{text:n[0].data.description,edit:(s=n[0].data.edit)==null?void 0:s.description,maxLine:n[3]}}),{c(){t=x("div"),oe(e.$$.fragment),w(t,"class","description svelte-1oxrkr1")},m(o,r){O(o,t,r),ne(e,t,null),i=!0},p(o,r){var l;const a={};r&1&&(a.text=o[0].data.description),r&1&&(a.edit=(l=o[0].data.edit)==null?void 0:l.description),r&8&&(a.maxLine=o[3]),e.$set(a)},i(o){i||(D(e.$$.fragment,o),i=!0)},o(o){T(e.$$.fragment,o),i=!1},d(o){o&&j(t),se(e)}}}function Oy(n){let t,e,i=n[0].state&&Gh(n);return{c(){i&&i.c(),t=Ie()},m(s,o){i&&i.m(s,o),O(s,t,o),e=!0},p(s,[o]){s[0].state?i?(i.p(s,o),o&1&&D(i,1)):(i=Gh(s),i.c(),D(i,1),i.m(t.parentNode,t)):i&&(he(),T(i,1,1,()=>{i=null}),ue())},i(s){e||(D(i),e=!0)},o(s){T(i),e=!1},d(s){i&&i.d(s),s&&j(t)}}}function By(n,t,e){let i,s,o,r,a,{tag:l}=t;return n.$$set=c=>{"tag"in c&&e(0,l=c.tag)},n.$$.update=()=>{var c,d,h,f,m;n.$$.dirty&1&&e(1,i=!!((c=l.state)!=null&&c.unfolded)),n.$$.dirty&2&&e(5,s=!i),n.$$.dirty&1&&e(4,o=(h=(d=l.data.title)!=null?d:l.data.text)!=null?h:""),n.$$.dirty&1&&e(3,r=(f=l.data.descriptionMaxRows)!=null?f:null),n.$$.dirty&1&&e(2,a=(m=l.data.titleMaxRows)!=null?m:null)},[l,i,a,r,o,s]}class Vy extends ce{constructor(t){super(),le(this,t,By,Oy,ae,{tag:0},zy)}}function Ry(n){let t,e;return t=new Vy({props:{tag:n[0]}}),{c(){oe(t.$$.fragment)},m(i,s){ne(t,i,s),e=!0},p(i,s){const o={};s&1&&(o.tag=i[0]),t.$set(o)},i(i){e||(D(t.$$.fragment,i),e=!0)},o(i){T(t.$$.fragment,i),e=!1},d(i){se(t,i)}}}function Qy(n){let t,e;return t=new Ey({props:{tag:n[0]}}),{c(){oe(t.$$.fragment)},m(i,s){ne(t,i,s),e=!0},p(i,s){const o={};s&1&&(o.tag=i[0]),t.$set(o)},i(i){e||(D(t.$$.fragment,i),e=!0)},o(i){T(t.$$.fragment,i),e=!1},d(i){se(t,i)}}}function Gy(n){let t,e,i,s;const o=[Qy,Ry],r=[];function a(l,c){return l[1]==="line"?0:l[1]==="plane"?1:-1}return~(t=a(n))&&(e=r[t]=o[t](n)),{c(){e&&e.c(),i=Ie()},m(l,c){~t&&r[t].m(l,c),O(l,i,c),s=!0},p(l,[c]){let d=t;t=a(l),t===d?~t&&r[t].p(l,c):(e&&(he(),T(r[d],1,1,()=>{r[d]=null}),ue()),~t?(e=r[t],e?e.p(l,c):(e=r[t]=o[t](l),e.c()),D(e,1),e.m(i.parentNode,i)):e=null)},i(l){s||(D(e),s=!0)},o(l){T(e),s=!1},d(l){~t&&r[t].d(l),l&&j(i)}}}function Ny(n,t,e){let i,{tag:s}=t;return n.$$set=o=>{"tag"in o&&e(0,s=o.tag)},n.$$.update=()=>{var o;n.$$.dirty&1&&e(1,i=(o=s.data.appearance)!=null?o:"line")},[s,i]}class Fy extends ce{constructor(t){super(),le(this,t,Ny,Gy,ae,{tag:0})}}function _y(n){me(n,"svelte-blgtit",".line.svelte-blgtit{width:100%;height:100%;overflow:visible;pointer-events:none}")}function Fh(n){let t,e,i,s;return{c(){t=Oe("path"),w(t,"fill","none"),w(t,"stroke","url(#"+n[4]+")"),w(t,"stroke-width","1"),w(t,"d","M0 21 L14 0.5 L105 0.5")},m(o,r){O(o,t,r),s=!0},p(o,r){n=o},i(o){s||(o&&We(()=>{s&&(i&&i.end(1),e=Si(t,Js,{duration:n[1],delay:n[0],easing:nc}),e.start())}),s=!0)},o(o){e&&e.invalidate(),o&&(i=fn(t,Js,{duration:n[1],delay:n[2],easing:gn})),s=!1},d(o){o&&j(t),o&&i&&i.end()}}}function Hy(n){let t,e,i,s,o,r=n[3]&&Fh(n);return{c(){t=Oe("svg"),e=Oe("defs"),i=Oe("linearGradient"),s=Oe("stop"),o=Oe("stop"),r&&r.c(),w(s,"offset","25%"),w(s,"stop-color","white"),w(s,"stop-opacity","1"),w(o,"offset","100%"),w(o,"stop-color","white"),w(o,"stop-opacity","0.5"),w(i,"id",n[4]),w(i,"gradientUnits","userSpaceOnUse"),w(t,"class","line svelte-blgtit"),w(t,"viewBox","0 0 105 21")},m(a,l){O(a,t,l),L(t,e),L(e,i),L(i,s),L(i,o),r&&r.m(t,null)},p(a,[l]){a[3]?r?(r.p(a,l),l&8&&D(r,1)):(r=Fh(a),r.c(),D(r,1),r.m(t,null)):r&&(he(),T(r,1,1,()=>{r=null}),ue())},i(a){D(r)},o(a){T(r)},d(a){a&&j(t),r&&r.d()}}}function Wy(n,t,e){let{inDelay:i=0}=t,{duration:s=1e3}=t,{outDelay:o=0}=t,{unfolded:r}=t;const a=nt();return n.$$set=l=>{"inDelay"in l&&e(0,i=l.inDelay),"duration"in l&&e(1,s=l.duration),"outDelay"in l&&e(2,o=l.outDelay),"unfolded"in l&&e(3,r=l.unfolded)},[i,s,o,r,a]}class Uy extends ce{constructor(t){super(),le(this,t,Wy,Hy,ae,{inDelay:0,duration:1,outDelay:2,unfolded:3},_y)}}function Yy(n){me(n,"svelte-1mgyhhn",`:root{--sc-dot-size:6px;--sc-active-dot-size:8px;--sc-dot-size-animation-time:250ms}.sc-carousel-dot__dot.svelte-1mgyhhn{background-color:var(--sc-color-rgb-light);border-radius:50%;display:inline-block;opacity:0.5;transition:opacity 100ms ease,\r
580
+ `))&&w(t,"style",e);const l=a&16352;(l||a&16360)&&S(t,"width",Dt(n[3])),(l||a&16368)&&S(t,"height",Dt(n[4])),(l||a&32736)&&S(t,"z-index",n[14])},i(r){o||(r&&We(()=>{o&&(s&&s.end(1),i=Si(t,ot,{duration:n[0]}),i.start())}),o=!0)},o(r){i&&i.invalidate(),r&&(s=fn(t,ot,{duration:n[1]})),o=!1},d(r){r&&j(t),r&&s&&s.end()}}}function ay(n){let t,e=n[2]&&xh(n);return{c(){e&&e.c(),t=Ie()},m(i,s){e&&e.m(i,s),O(i,t,s)},p(i,[s]){i[2]?e?(e.p(i,s),s&4&&D(e,1)):(e=xh(i),e.c(),D(e,1),e.m(t.parentNode,t)):e&&(he(),T(e,1,1,()=>{e=null}),ue())},i(i){D(e)},o(i){T(e)},d(i){e&&e.d(i),i&&j(t)}}}function Dt(n){return typeof n=="number"?n/16+"rem":n}function ly(n,t,e){let{inDelay:i=1e3}=t,{outDelay:s=1e3}=t,{visible:o=!0}=t,{width:r=0}=t,{height:a=0}=t,{left:l=0}=t,{bottom:c=0}=t,{center:d=!1}=t,{horizontalCenter:h=!1}=t,{verticalCenter:f=!1}=t,{round:m=!1}=t,{blurRadius:A}=t,{spreadRadius:p}=t,{opacity:g=.15}=t,{zIndex:v=-1}=t;return n.$$set=y=>{"inDelay"in y&&e(0,i=y.inDelay),"outDelay"in y&&e(1,s=y.outDelay),"visible"in y&&e(2,o=y.visible),"width"in y&&e(3,r=y.width),"height"in y&&e(4,a=y.height),"left"in y&&e(5,l=y.left),"bottom"in y&&e(6,c=y.bottom),"center"in y&&e(7,d=y.center),"horizontalCenter"in y&&e(8,h=y.horizontalCenter),"verticalCenter"in y&&e(9,f=y.verticalCenter),"round"in y&&e(10,m=y.round),"blurRadius"in y&&e(11,A=y.blurRadius),"spreadRadius"in y&&e(12,p=y.spreadRadius),"opacity"in y&&e(13,g=y.opacity),"zIndex"in y&&e(14,v=y.zIndex)},[i,s,o,r,a,l,c,d,h,f,m,A,p,g,v]}class Vt extends ce{constructor(t){super(),le(this,t,ly,ay,ae,{inDelay:0,outDelay:1,visible:2,width:3,height:4,left:5,bottom:6,center:7,horizontalCenter:8,verticalCenter:9,round:10,blurRadius:11,spreadRadius:12,opacity:13,zIndex:14},ry)}}function cy(){return Math.random().toString(36).slice(-6)}const Ao=cy();function dy(n){me(n,"svelte-1b2n9wi",".text-char.svelte-1b2n9wi{display:inline-block;text-shadow:0.125rem 0rem 0.5rem rgba(0, 0, 0, 0.15)}")}function Sh(n,t,e){const i=n.slice();return i[19]=t[e].id,i[0]=t[e].content,i[20]=t,i[21]=e,i}function hy(n){let t,e=n[0]+"",i,s=n[21];const o=()=>n[10](t,s),r=()=>n[10](null,s);return{c(){t=x("span"),i=De(e),w(t,"class","text-char svelte-1b2n9wi")},m(a,l){O(a,t,l),L(t,i),o()},p(a,l){n=a,l&4&&e!==(e=n[0]+"")&&Se(i,e),s!==n[21]&&(r(),s=n[21],o())},d(a){a&&j(t),r()}}}function uy(n){let t;return{c(){t=x("br")},m(e,i){O(e,t,i)},p:J,d(e){e&&j(t)}}}function fy(n){let t,e=n[21];const i=()=>n[9](t,e),s=()=>n[9](null,e);return{c(){t=x("span"),t.textContent=" ",w(t,"class","text-char svelte-1b2n9wi")},m(o,r){O(o,t,r),i()},p(o,r){n=o,e!==n[21]&&(s(),e=n[21],i())},d(o){o&&j(t),s()}}}function Lh(n,t){let e,i;function s(a,l){return a[0]===a[3]?fy:a[0]===a[4]?uy:hy}let o=s(t),r=o(t);return{key:n,first:null,c(){e=Ie(),r.c(),i=Ie(),this.first=e},m(a,l){O(a,e,l),r.m(a,l),O(a,i,l)},p(a,l){t=a,o===(o=s(t))&&r?r.p(t,l):(r.d(1),r=o(t),r&&(r.c(),r.m(i.parentNode,i)))},d(a){a&&j(e),r.d(a),a&&j(i)}}}function my(n){let t=[],e=new Map,i,s=n[2];const o=r=>r[19];for(let r=0;r<s.length;r+=1){let a=Sh(n,s,r),l=o(a);e.set(l,t[r]=Lh(l,a))}return{c(){for(let r=0;r<t.length;r+=1)t[r].c();i=Ie()},m(r,a){for(let l=0;l<t.length;l+=1)t[l]&&t[l].m(r,a);O(r,i,a)},p(r,[a]){a&30&&(s=r[2],t=Bt(t,a,o,1,r,s,e,i.parentNode,mr,Lh,i,Sh))},i:J,o:J,d(r){for(let a=0;a<t.length;a+=1)t[a].d(r);r&&j(i)}}}function gy(n,t,e){let i,{inDelay:s=0}=t,{outDelay:o=0}=t,{content:r}=t,{unfolded:a}=t,{isFistUnfoldedUpdate:l=!0}=t;const c=`__EMOJI_SPLIT_${Ao}__`,d=`__EMOJI_${Ao}__`,h=`__SPACE_${Ao}__`,f=`__NEW_LINE_${Ao}__`;let m,A,p=[];function g(C){const z=[],R=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 C.slice().replace(R,U=>`${c}${d}${U}${c}`).split(c).forEach(U=>U.startsWith(d)?z.push({id:et(),content:U.slice(d.length)}):z.push(...U.split("").map(H=>H===" "?h:H===`
581
+ `?f:H).map(H=>({id:et(),content:H})))),z}function v(){if(!A)return;const C=!a;A.reversed!==C&&A.reverse(),A.play()}function y(C){if(l){e(5,l=!1);return}clearTimeout(m),m=setTimeout(v,C?s:o)}function P(C){const z=function(){const R=G1(U=>C[U].getBoundingClientRect().x,[Math.min(C.length-1,10),Math.min(C.length-1,30)]);if(R>0)return R}();A=xt({targets:C.slice(0,z).filter(jt),autoplay:!1,duration:400,scale:[.7,1],rotate:[20,0],opacity:[0,1],translateX:[4,0],translateY:[10,0],delay:xt.stagger(50),easing:"easeInOutCubic"}),a&&A.seek(A.duration)}function I(C,z){Ne[C?"unshift":"push"](()=>{p[z]=C,e(1,p)})}function E(C,z){Ne[C?"unshift":"push"](()=>{p[z]=C,e(1,p)})}return n.$$set=C=>{"inDelay"in C&&e(6,s=C.inDelay),"outDelay"in C&&e(7,o=C.outDelay),"content"in C&&e(0,r=C.content),"unfolded"in C&&e(8,a=C.unfolded),"isFistUnfoldedUpdate"in C&&e(5,l=C.isFistUnfoldedUpdate)},n.$$.update=()=>{n.$$.dirty&1&&e(2,i=g(r)),n.$$.dirty&256&&y(a),n.$$.dirty&2&&P(p.filter(C=>!!C))},[r,p,i,h,f,l,s,o,a,I,E]}class Th extends ce{constructor(t){super(),le(this,t,gy,my,ae,{inDelay:6,outDelay:7,content:0,unfolded:8,isFistUnfoldedUpdate:5},dy)}}function py(n){me(n,"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 jh(n){let t,e,i,s,o,r,a,l,c,d;return e=new Vt({props:{center:!0,blurRadius:9,spreadRadius:3}}),{c(){t=x("div"),oe(e.$$.fragment),i=K(),s=x("div"),w(s,"class",o="arrow "+n[0]+" svelte-1ogmlqq"),S(s,"background-image","url("+Sb+")"),w(t,"class","arrow-wrapper svelte-1ogmlqq")},m(h,f){O(h,t,f),ne(e,t,null),L(t,i),L(t,s),l=!0,c||(d=be(s,"click",n[5]),c=!0)},p(h,f){n=h,(!l||f&1&&o!==(o="arrow "+n[0]+" svelte-1ogmlqq"))&&w(s,"class",o)},i(h){l||(D(e.$$.fragment,h),h&&We(()=>{l&&(a&&a.end(1),r=Si(s,ot,{duration:n[2],delay:n[3],easing:gn}),r.start())}),l=!0)},o(h){T(e.$$.fragment,h),r&&r.invalidate(),h&&(a=fn(s,ot,{duration:n[2],delay:n[4],easing:gn})),l=!1},d(h){h&&j(t),se(e),h&&a&&a.end(),c=!1,d()}}}function Ay(n){let t,e,i=n[1]&&jh(n);return{c(){i&&i.c(),t=Ie()},m(s,o){i&&i.m(s,o),O(s,t,o),e=!0},p(s,[o]){s[1]?i?(i.p(s,o),o&2&&D(i,1)):(i=jh(s),i.c(),D(i,1),i.m(t.parentNode,t)):i&&(he(),T(i,1,1,()=>{i=null}),ue())},i(s){e||(D(i),e=!0)},o(s){T(i),e=!1},d(s){i&&i.d(s),s&&j(t)}}}function vy(n,t,e){let{direction:i="right"}=t,{visible:s=!0}=t,{duration:o=0}=t,{inDelay:r=0}=t,{outDelay:a=0}=t;function l(c){cn.call(this,n,c)}return n.$$set=c=>{"direction"in c&&e(0,i=c.direction),"visible"in c&&e(1,s=c.visible),"duration"in c&&e(2,o=c.duration),"inDelay"in c&&e(3,r=c.inDelay),"outDelay"in c&&e(4,a=c.outDelay)},[i,s,o,r,a,l]}let by=class extends ce{constructor(t){super(),le(this,t,vy,Ay,ae,{direction:0,visible:1,duration:2,inDelay:3,outDelay:4},py)}};function yy(n,t,e=20,i=5){return new Promise((s,o)=>{let r=0;const a=setInterval(()=>{const l=n();t(l)?(clearInterval(a),s(l)):r>=i&&(clearInterval(a),o(l)),r++},e)})}function wy(n){me(n,"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 zh(n){let t,e,i;return e=new Th({props:{unfolded:n[0],content:n[1],inDelay:500,outDelay:n[5]}}),{c(){t=x("div"),oe(e.$$.fragment),w(t,"class","text svelte-1fuzm7v"),S(t,"transform",n[7])},m(s,o){O(s,t,o),ne(e,t,null),n[10](t),i=!0},p(s,o){const r={};o&1&&(r.unfolded=s[0]),o&2&&(r.content=s[1]),o&32&&(r.outDelay=s[5]),e.$set(r),o&128&&S(t,"transform",s[7])},i(s){i||(D(e.$$.fragment,s),i=!0)},o(s){T(e.$$.fragment,s),i=!1},d(s){s&&j(t),se(e),n[10](null)}}}function Oh(n){let t,e,i;return e=new by({props:{direction:n[6],visible:n[0],inDelay:600,duration:1e3}}),{c(){t=x("div"),oe(e.$$.fragment),w(t,"class","arrow svelte-1fuzm7v")},m(s,o){O(s,t,o),ne(e,t,null),i=!0},p(s,o){const r={};o&64&&(r.direction=s[6]),o&1&&(r.visible=s[0]),e.$set(r)},i(s){i||(D(e.$$.fragment,s),i=!0)},o(s){T(e.$$.fragment,s),i=!1},d(s){s&&j(t),se(e)}}}function Cy(n){let t,e,i,s=n[1]&&zh(n),o=n[3]<n[4]&&Oh(n);return{c(){s&&s.c(),t=K(),o&&o.c(),e=Ie()},m(r,a){s&&s.m(r,a),O(r,t,a),o&&o.m(r,a),O(r,e,a),i=!0},p(r,[a]){r[1]?s?(s.p(r,a),a&2&&D(s,1)):(s=zh(r),s.c(),D(s,1),s.m(t.parentNode,t)):s&&(he(),T(s,1,1,()=>{s=null}),ue()),r[3]<r[4]?o?(o.p(r,a),a&24&&D(o,1)):(o=Oh(r),o.c(),D(o,1),o.m(e.parentNode,e)):o&&(he(),T(o,1,1,()=>{o=null}),ue())},i(r){i||(D(s),D(o),i=!0)},o(r){T(s),T(o),i=!1},d(r){s&&s.d(r),r&&j(t),o&&o.d(r),r&&j(e)}}}function Iy(n,t,e){let i,s,o,{visible:r=!1}=t,{textUnfolded:a=!1}=t,{content:l}=t,c,d=0,h=0,f=0;function m(A){Ne[A?"unshift":"push"](()=>{c=A,e(2,c)})}return n.$$set=A=>{"visible"in A&&e(0,r=A.visible),"textUnfolded"in A&&e(8,a=A.textUnfolded),"content"in A&&e(1,l=A.content)},n.$$.update=()=>{if(n.$$.dirty&7&&c&&r&&l){const{lineHeight:A}=getComputedStyle(c);e(4,f=c.offsetHeight),yy(()=>c==null?void 0:c.offsetHeight,Boolean).then(()=>{e(4,f=c.offsetHeight)}),e(3,h=Number(A.replace("px","")))}n.$$.dirty&280&&e(9,d=a?h-f:0),n.$$.dirty&512&&e(7,i=`translateY(${d}px)`),n.$$.dirty&256&&e(6,s=a?"left":"right"),n.$$.dirty&256&&e(5,o=a?450:0)},[r,l,c,h,f,o,s,i,a,d,m]}class Bh extends ce{constructor(t){super(),le(this,t,Iy,Cy,ae,{visible:0,textUnfolded:8,content:1},wy)}}function Py(n){me(n,"svelte-5hip41",".content.svelte-5hip41{--height:62.4375rem;width:-moz-max-content;width:max-content;height:var(--height);padding:calc(var(--height) - 1.125rem) 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 Vh(n){var d,h;let t,e,i,s,o,r,a,l,c;return t=new Vt({props:{visible:n[2],left:n[3]/2+"px",bottom:12,width:2,blurRadius:120,spreadRadius:60}}),i=new Yr({props:{unfolded:n[2],length:n[3],outDelay:n[4]+40*Math.min((h=(d=n[6][0])==null?void 0:d.content.length)!=null?h:10,15),useLinearColor:!0}}),r=new Bh({props:{visible:n[2],textUnfolded:n[1],content:n[5]}}),{c(){oe(t.$$.fragment),e=K(),oe(i.$$.fragment),s=K(),o=x("div"),oe(r.$$.fragment),w(o,"class","content svelte-5hip41")},m(f,m){ne(t,f,m),O(f,e,m),ne(i,f,m),O(f,s,m),O(f,o,m),ne(r,o,null),a=!0,l||(c=[zt(mi.call(null,o)),be(o,"clientWidth",n[10]),be(o,"click",n[7])],l=!0)},p(f,m){var v,y;const A={};m&4&&(A.visible=f[2]),m&8&&(A.left=f[3]/2+"px"),t.$set(A);const p={};m&4&&(p.unfolded=f[2]),m&8&&(p.length=f[3]),m&16&&(p.outDelay=f[4]+40*Math.min((y=(v=f[6][0])==null?void 0:v.content.length)!=null?y:10,15)),i.$set(p);const g={};m&4&&(g.visible=f[2]),m&2&&(g.textUnfolded=f[1]),m&32&&(g.content=f[5]),r.$set(g)},i(f){a||(D(t.$$.fragment,f),D(i.$$.fragment,f),D(r.$$.fragment,f),a=!0)},o(f){T(t.$$.fragment,f),T(i.$$.fragment,f),T(r.$$.fragment,f),a=!1},d(f){se(t,f),f&&j(e),se(i,f),f&&j(s),f&&j(o),se(r),l=!1,Xe(c)}}}function ky(n){let t,e,i=n[0].state&&Vh(n);return{c(){i&&i.c(),t=Ie()},m(s,o){i&&i.m(s,o),O(s,t,o),e=!0},p(s,[o]){s[0].state?i?(i.p(s,o),o&1&&D(i,1)):(i=Vh(s),i.c(),D(i,1),i.m(t.parentNode,t)):i&&(he(),T(i,1,1,()=>{i=null}),ue())},i(s){e||(D(i),e=!0)},o(s){T(i),e=!1},d(s){i&&i.d(s),s&&j(t)}}}function My(n,t,e){let i,s,o,r,a,{tag:l}=t,c,d=!1,h=[];function f(){e(1,d=!d)}const m=A=>{e(3,c=A.detail)};return n.$$set=A=>{"tag"in A&&e(0,l=A.tag)},n.$$.update=()=>{var A,p,g,v;n.$$.dirty&1&&e(2,i=!!((A=l.state)!=null&&A.unfolded)),n.$$.dirty&1&&e(9,s=(g=(p=l.data.title)!=null?p:l.data.text)!=null?g:""),n.$$.dirty&1&&e(8,o=(v=l.data.description)!=null?v:""),n.$$.dirty&768&&e(5,r=(()=>{if(s&&o)return s+`
582
+ `+o;if(s)return s;if(o)return o})()),n.$$.dirty&4&&(i||setTimeout(()=>{e(1,d=!1)},20)),n.$$.dirty&2&&e(4,a=d?450:0)},[l,d,i,c,a,r,h,f,o,s,m]}class Ey extends ce{constructor(t){super(),le(this,t,My,ky,ae,{tag:0},Py)}}function Yt(n){return typeof n=="number"?n/16+"rem":n}function Dy(n){me(n,"svelte-1j0cz4o",'.text.svelte-1j0cz4o{display:-webkit-box;display:-ms-box;display:-moz-box;position:relative;width:-moz-max-content;width:max-content;max-width:100%;-webkit-box-orient:vertical;-ms-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}@keyframes svelte-1j0cz4o-blink{0%{opacity:1}50%{opacity:0}100%{opacity:1}}.caret.svelte-1j0cz4o{position:absolute;width:0.0625rem;height:100%;background-color:#fff;animation:svelte-1j0cz4o-blink 1.2s infinite}.placeholder.svelte-1j0cz4o{opacity:0.5}.placeholder.svelte-1j0cz4o:empty::after{content:" "}')}function xy(n){let t;const e=n[6].default,i=sn(e,n,n[5],null);return{c(){i&&i.c()},m(s,o){i&&i.m(s,o),t=!0},p(s,o){i&&i.p&&(!t||o&32)&&rn(i,e,s,s[5],t?on(e,s[5],o,null):an(s[5]),null)},i(s){t||(D(i,s),t=!0)},o(s){T(i,s),t=!1},d(s){i&&i.d(s)}}}function Sy(n){var o,r;let t,e,i=((o=n[3])==null?void 0:o.inputting)&&Rh(),s=typeof((r=n[3])==null?void 0:r.placeholder)=="string"&&Qh(n);return{c(){i&&i.c(),t=K(),s&&s.c(),e=Ie()},m(a,l){i&&i.m(a,l),O(a,t,l),s&&s.m(a,l),O(a,e,l)},p(a,l){var c,d;(c=a[3])!=null&&c.inputting?i||(i=Rh(),i.c(),i.m(t.parentNode,t)):i&&(i.d(1),i=null),typeof((d=a[3])==null?void 0:d.placeholder)=="string"?s?s.p(a,l):(s=Qh(a),s.c(),s.m(e.parentNode,e)):s&&(s.d(1),s=null)},i:J,o:J,d(a){i&&i.d(a),a&&j(t),s&&s.d(a),a&&j(e)}}}function Ly(n){let t;return{c(){t=De(n[2])},m(e,i){O(e,t,i)},p(e,i){i&4&&Se(t,e[2])},i:J,o:J,d(e){e&&j(t)}}}function Rh(n){let t;return{c(){t=x("div"),w(t,"class","caret svelte-1j0cz4o")},m(e,i){O(e,t,i)},d(e){e&&j(t)}}}function Qh(n){let t,e=n[3].placeholder+"",i;return{c(){t=x("span"),i=De(e),w(t,"class","placeholder svelte-1j0cz4o")},m(s,o){O(s,t,o),L(t,i)},p(s,o){o&8&&e!==(e=s[3].placeholder+"")&&Se(i,e)},d(s){s&&j(t)}}}function Ty(n){let t,e,i,s;const o=[Ly,Sy,xy],r=[];function a(l,c){return l[2]?0:l[4]?1:2}return e=a(n),i=r[e]=o[e](n),{c(){t=x("div"),i.c(),w(t,"class","text svelte-1j0cz4o"),S(t,"max-width",typeof n[1]=="number"?Yt(n[1]):n[1]),S(t,"-webkit-line-clamp",n[0])},m(l,c){O(l,t,c),r[e].m(t,null),s=!0},p(l,[c]){let d=e;e=a(l),e===d?r[e].p(l,c):(he(),T(r[d],1,1,()=>{r[d]=null}),ue(),i=r[e],i?i.p(l,c):(i=r[e]=o[e](l),i.c()),D(i,1),i.m(t,null)),c&2&&S(t,"max-width",typeof l[1]=="number"?Yt(l[1]):l[1]),c&1&&S(t,"-webkit-line-clamp",l[0])},i(l){s||(D(i),s=!0)},o(l){T(i),s=!1},d(l){l&&j(t),r[e].d()}}}function jy(n,t,e){let i,{$$slots:s={},$$scope:o}=t,{maxLine:r=null}=t,{maxWidth:a=null}=t,{text:l=null}=t,{edit:c=null}=t;return n.$$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,o=d.$$scope)},n.$$.update=()=>{n.$$.dirty&8&&e(4,i=typeof(c==null?void 0:c.placeholder)=="string"||(c==null?void 0:c.inputting))},[r,a,l,c,i,o,s]}class Xr extends ce{constructor(t){super(),le(this,t,jy,Ty,ae,{maxLine:0,maxWidth:1,text:2,edit:3},Dy)}}function zy(n){me(n,"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 Gh(n){var h,f;let t,e,i,s,o,r,a,l,c;t=new Yr({props:{unfolded:n[1],direction:"vertical",length:15,duration:500,inDelay:200,useLinearColor:!0}}),a=new Xr({props:{text:n[4],edit:(h=n[0].data.edit)==null?void 0:h.title,maxLine:n[2]}});let d=(n[0].data.description||((f=n[0].data.edit)==null?void 0:f.description))&&Nh(n);return{c(){oe(t.$$.fragment),e=K(),i=x("div"),s=x("div"),o=x("div"),r=x("div"),oe(a.$$.fragment),l=K(),d&&d.c(),w(r,"class","title svelte-1oxrkr1"),w(o,"class","plane svelte-1oxrkr1"),w(s,"class","plane__wrapper svelte-1oxrkr1"),S(s,"transform",n[1]?"translateY(-15px)":"translateY(0)"),w(i,"class","plane__container svelte-1oxrkr1"),$(i,"unfolded",n[1]),$(i,"folded",n[5])},m(m,A){ne(t,m,A),O(m,e,A),O(m,i,A),L(i,s),L(s,o),L(o,r),ne(a,r,null),L(o,l),d&&d.m(o,null),c=!0},p(m,A){var v,y;const p={};A&2&&(p.unfolded=m[1]),t.$set(p);const g={};A&16&&(g.text=m[4]),A&1&&(g.edit=(v=m[0].data.edit)==null?void 0:v.title),A&4&&(g.maxLine=m[2]),a.$set(g),m[0].data.description||(y=m[0].data.edit)!=null&&y.description?d?(d.p(m,A),A&1&&D(d,1)):(d=Nh(m),d.c(),D(d,1),d.m(o,null)):d&&(he(),T(d,1,1,()=>{d=null}),ue()),A&2&&S(s,"transform",m[1]?"translateY(-15px)":"translateY(0)"),(!c||A&2)&&$(i,"unfolded",m[1]),(!c||A&32)&&$(i,"folded",m[5])},i(m){c||(D(t.$$.fragment,m),D(a.$$.fragment,m),D(d),c=!0)},o(m){T(t.$$.fragment,m),T(a.$$.fragment,m),T(d),c=!1},d(m){se(t,m),m&&j(e),m&&j(i),se(a),d&&d.d()}}}function Nh(n){var s;let t,e,i;return e=new Xr({props:{text:n[0].data.description,edit:(s=n[0].data.edit)==null?void 0:s.description,maxLine:n[3]}}),{c(){t=x("div"),oe(e.$$.fragment),w(t,"class","description svelte-1oxrkr1")},m(o,r){O(o,t,r),ne(e,t,null),i=!0},p(o,r){var l;const a={};r&1&&(a.text=o[0].data.description),r&1&&(a.edit=(l=o[0].data.edit)==null?void 0:l.description),r&8&&(a.maxLine=o[3]),e.$set(a)},i(o){i||(D(e.$$.fragment,o),i=!0)},o(o){T(e.$$.fragment,o),i=!1},d(o){o&&j(t),se(e)}}}function Oy(n){let t,e,i=n[0].state&&Gh(n);return{c(){i&&i.c(),t=Ie()},m(s,o){i&&i.m(s,o),O(s,t,o),e=!0},p(s,[o]){s[0].state?i?(i.p(s,o),o&1&&D(i,1)):(i=Gh(s),i.c(),D(i,1),i.m(t.parentNode,t)):i&&(he(),T(i,1,1,()=>{i=null}),ue())},i(s){e||(D(i),e=!0)},o(s){T(i),e=!1},d(s){i&&i.d(s),s&&j(t)}}}function By(n,t,e){let i,s,o,r,a,{tag:l}=t;return n.$$set=c=>{"tag"in c&&e(0,l=c.tag)},n.$$.update=()=>{var c,d,h,f,m;n.$$.dirty&1&&e(1,i=!!((c=l.state)!=null&&c.unfolded)),n.$$.dirty&2&&e(5,s=!i),n.$$.dirty&1&&e(4,o=(h=(d=l.data.title)!=null?d:l.data.text)!=null?h:""),n.$$.dirty&1&&e(3,r=(f=l.data.descriptionMaxRows)!=null?f:null),n.$$.dirty&1&&e(2,a=(m=l.data.titleMaxRows)!=null?m:null)},[l,i,a,r,o,s]}class Vy extends ce{constructor(t){super(),le(this,t,By,Oy,ae,{tag:0},zy)}}function Ry(n){let t,e;return t=new Vy({props:{tag:n[0]}}),{c(){oe(t.$$.fragment)},m(i,s){ne(t,i,s),e=!0},p(i,s){const o={};s&1&&(o.tag=i[0]),t.$set(o)},i(i){e||(D(t.$$.fragment,i),e=!0)},o(i){T(t.$$.fragment,i),e=!1},d(i){se(t,i)}}}function Qy(n){let t,e;return t=new Ey({props:{tag:n[0]}}),{c(){oe(t.$$.fragment)},m(i,s){ne(t,i,s),e=!0},p(i,s){const o={};s&1&&(o.tag=i[0]),t.$set(o)},i(i){e||(D(t.$$.fragment,i),e=!0)},o(i){T(t.$$.fragment,i),e=!1},d(i){se(t,i)}}}function Gy(n){let t,e,i,s;const o=[Qy,Ry],r=[];function a(l,c){return l[1]==="line"?0:l[1]==="plane"?1:-1}return~(t=a(n))&&(e=r[t]=o[t](n)),{c(){e&&e.c(),i=Ie()},m(l,c){~t&&r[t].m(l,c),O(l,i,c),s=!0},p(l,[c]){let d=t;t=a(l),t===d?~t&&r[t].p(l,c):(e&&(he(),T(r[d],1,1,()=>{r[d]=null}),ue()),~t?(e=r[t],e?e.p(l,c):(e=r[t]=o[t](l),e.c()),D(e,1),e.m(i.parentNode,i)):e=null)},i(l){s||(D(e),s=!0)},o(l){T(e),s=!1},d(l){~t&&r[t].d(l),l&&j(i)}}}function Ny(n,t,e){let i,{tag:s}=t;return n.$$set=o=>{"tag"in o&&e(0,s=o.tag)},n.$$.update=()=>{var o;n.$$.dirty&1&&e(1,i=(o=s.data.appearance)!=null?o:"line")},[s,i]}class Fy extends ce{constructor(t){super(),le(this,t,Ny,Gy,ae,{tag:0})}}function _y(n){me(n,"svelte-blgtit",".line.svelte-blgtit{width:100%;height:100%;overflow:visible;pointer-events:none}")}function Fh(n){let t,e,i,s;return{c(){t=Oe("path"),w(t,"fill","none"),w(t,"stroke","url(#"+n[4]+")"),w(t,"stroke-width","1"),w(t,"d","M0 21 L14 0.5 L105 0.5")},m(o,r){O(o,t,r),s=!0},p(o,r){n=o},i(o){s||(o&&We(()=>{s&&(i&&i.end(1),e=Si(t,Js,{duration:n[1],delay:n[0],easing:nc}),e.start())}),s=!0)},o(o){e&&e.invalidate(),o&&(i=fn(t,Js,{duration:n[1],delay:n[2],easing:gn})),s=!1},d(o){o&&j(t),o&&i&&i.end()}}}function Hy(n){let t,e,i,s,o,r=n[3]&&Fh(n);return{c(){t=Oe("svg"),e=Oe("defs"),i=Oe("linearGradient"),s=Oe("stop"),o=Oe("stop"),r&&r.c(),w(s,"offset","25%"),w(s,"stop-color","white"),w(s,"stop-opacity","1"),w(o,"offset","100%"),w(o,"stop-color","white"),w(o,"stop-opacity","0.5"),w(i,"id",n[4]),w(i,"gradientUnits","userSpaceOnUse"),w(t,"class","line svelte-blgtit"),w(t,"viewBox","0 0 105 21")},m(a,l){O(a,t,l),L(t,e),L(e,i),L(i,s),L(i,o),r&&r.m(t,null)},p(a,[l]){a[3]?r?(r.p(a,l),l&8&&D(r,1)):(r=Fh(a),r.c(),D(r,1),r.m(t,null)):r&&(he(),T(r,1,1,()=>{r=null}),ue())},i(a){D(r)},o(a){T(r)},d(a){a&&j(t),r&&r.d()}}}function Wy(n,t,e){let{inDelay:i=0}=t,{duration:s=1e3}=t,{outDelay:o=0}=t,{unfolded:r}=t;const a=et();return n.$$set=l=>{"inDelay"in l&&e(0,i=l.inDelay),"duration"in l&&e(1,s=l.duration),"outDelay"in l&&e(2,o=l.outDelay),"unfolded"in l&&e(3,r=l.unfolded)},[i,s,o,r,a]}class Uy extends ce{constructor(t){super(),le(this,t,Wy,Hy,ae,{inDelay:0,duration:1,outDelay:2,unfolded:3},_y)}}function Yy(n){me(n,"svelte-1mgyhhn",`:root{--sc-dot-size:6px;--sc-active-dot-size:8px;--sc-dot-size-animation-time:250ms}.sc-carousel-dot__dot.svelte-1mgyhhn{background-color:var(--sc-color-rgb-light);border-radius:50%;display:inline-block;opacity:0.5;transition:opacity 100ms ease,\r
583
583
  height var(--sc-dot-size-animation-time) ease,\r
584
- width var(--sc-dot-size-animation-time) ease;cursor:pointer;-webkit-tap-highlight-color:transparent;height:var(--sc-dot-size);width:var(--sc-dot-size)}.sc-carousel-dot__dot.svelte-1mgyhhn:hover{opacity:0.9}.sc-carousel-dot__dot_active.svelte-1mgyhhn{opacity:0.7;height:var(--sc-active-dot-size);width:var(--sc-active-dot-size)}`)}function Xy(n){let t,e,i;return{c(){t=x("button"),w(t,"class","sc-carousel-button sc-carousel-dot__dot svelte-1mgyhhn"),$(t,"sc-carousel-dot__dot_active",n[0])},m(s,o){O(s,t,o),e||(i=be(t,"click",n[1]),e=!0)},p(s,[o]){o&1&&$(t,"sc-carousel-dot__dot_active",s[0])},i:J,o:J,d(s){s&&j(t),e=!1,i()}}}function Zy(n,t,e){let{active:i=!1}=t;function s(o){cn.call(this,n,o)}return n.$$set=o=>{"active"in o&&e(0,i=o.active)},[i,s]}class Jy extends ce{constructor(t){super(),le(this,t,Zy,Xy,ae,{active:0},Yy)}}function qy(n){me(n,"svelte-670fde",".sc-carousel-dots__container.svelte-670fde{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;padding:0 30px}.sc-carousel-dots__dot-container.svelte-670fde{height:calc(var(--sc-dot-size) + 14px);width:calc(var(--sc-dot-size) + 10px);display:flex;align-items:center;justify-content:center}")}function _h(n,t,e){const i=n.slice();return i[5]=t[e],i[7]=e,i}function Hh(n,t){let e,i,s,o;function r(){return t[3](t[7])}return i=new Jy({props:{active:t[1]===t[7]}}),i.$on("click",r),{key:n,first:null,c(){e=x("div"),oe(i.$$.fragment),s=K(),w(e,"class","sc-carousel-dots__dot-container svelte-670fde"),this.first=e},m(a,l){O(a,e,l),ne(i,e,null),L(e,s),o=!0},p(a,l){t=a;const c={};l&3&&(c.active=t[1]===t[7]),i.$set(c)},i(a){o||(D(i.$$.fragment,a),o=!0)},o(a){T(i.$$.fragment,a),o=!1},d(a){a&&j(e),se(i)}}}function Ky(n){let t,e=[],i=new Map,s,o=Array(n[0]);const r=a=>a[7];for(let a=0;a<o.length;a+=1){let l=_h(n,o,a),c=r(l);i.set(c,e[a]=Hh(c,l))}return{c(){t=x("div");for(let a=0;a<e.length;a+=1)e[a].c();w(t,"class","sc-carousel-dots__container svelte-670fde")},m(a,l){O(a,t,l);for(let c=0;c<e.length;c+=1)e[c]&&e[c].m(t,null);s=!0},p(a,[l]){l&7&&(o=Array(a[0]),he(),e=Bt(e,l,r,1,a,o,i,t,fi,Hh,null,_h),ue())},i(a){if(!s){for(let l=0;l<o.length;l+=1)D(e[l]);s=!0}},o(a){for(let l=0;l<e.length;l+=1)T(e[l]);s=!1},d(a){a&&j(t);for(let l=0;l<e.length;l+=1)e[l].d()}}}function $y(n,t,e){const i=Hs();let{pagesCount:s=1}=t,{currentPageIndex:o=0}=t;function r(l){i("pageChange",l)}const a=l=>r(l);return n.$$set=l=>{"pagesCount"in l&&e(0,s=l.pagesCount),"currentPageIndex"in l&&e(1,o=l.currentPageIndex)},[s,o,r,a]}class ew extends ce{constructor(t){super(),le(this,t,$y,Ky,ae,{pagesCount:0,currentPageIndex:1},qy)}}const kn="prev",yi="next";function tw(n){me(n,"svelte-1bftafx",":root{--sc-arrow-size:2px}.sc-carousel-arrow__circle.svelte-1bftafx{width:20px;height:20px;border-radius:50%;background-color:var(--sc-color-rgb-light-50p);display:flex;align-items:center;justify-content:center;transition:opacity 100ms ease;cursor:pointer;-webkit-tap-highlight-color:transparent}.sc-carousel-arrow__circle.svelte-1bftafx:hover{opacity:0.9}.sc-carousel-arrow__arrow.svelte-1bftafx{border:solid var(--sc-color-hex-dark);border-width:0 var(--sc-arrow-size) var(--sc-arrow-size) 0;padding:var(--sc-arrow-size);position:relative}.sc-carousel-arrow__arrow-next.svelte-1bftafx{transform:rotate(-45deg);left:calc(var(--sc-arrow-size) / -2)}.sc-carousel-arrow__arrow-prev.svelte-1bftafx{transform:rotate(135deg);right:calc(var(--sc-arrow-size) / -2)}.sc-carousel-arrow__circle_disabled.svelte-1bftafx,.sc-carousel-arrow__circle_disabled.svelte-1bftafx:hover{opacity:0.5}")}function iw(n){let t,e,i,s;return{c(){t=x("button"),e=x("i"),w(e,"class","sc-carousel-arrow__arrow svelte-1bftafx"),$(e,"sc-carousel-arrow__arrow-next",n[0]===yi),$(e,"sc-carousel-arrow__arrow-prev",n[0]===kn),w(t,"class","sc-carousel-button sc-carousel-arrow__circle svelte-1bftafx"),$(t,"sc-carousel-arrow__circle_disabled",n[1])},m(o,r){O(o,t,r),L(t,e),i||(s=be(t,"click",n[2]),i=!0)},p(o,[r]){r&1&&$(e,"sc-carousel-arrow__arrow-next",o[0]===yi),r&1&&$(e,"sc-carousel-arrow__arrow-prev",o[0]===kn),r&2&&$(t,"sc-carousel-arrow__circle_disabled",o[1])},i:J,o:J,d(o){o&&j(t),i=!1,s()}}}function nw(n,t,e){let{direction:i=yi}=t,{disabled:s=!1}=t;function o(r){cn.call(this,n,r)}return n.$$set=r=>{"direction"in r&&e(0,i=r.direction),"disabled"in r&&e(1,s=r.disabled)},[i,s,o]}class Wh extends ce{constructor(t){super(),le(this,t,nw,iw,ae,{direction:0,disabled:1},tw)}}function sw(n){me(n,"svelte-i7yfid",".sc-carousel-progress__indicator.svelte-i7yfid{height:100%;background-color:var(--sc-color-hex-dark-50p)}")}function ow(n){let t;return{c(){t=x("div"),w(t,"class","sc-carousel-progress__indicator svelte-i7yfid"),S(t,"width",n[0]+"%")},m(e,i){O(e,t,i)},p(e,[i]){i&1&&S(t,"width",e[0]+"%")},i:J,o:J,d(e){e&&j(t)}}}const Uh=100;function rw(n,t,e){let i,{value:s=0}=t;return n.$$set=o=>{"value"in o&&e(1,s=o.value)},n.$$.update=()=>{n.$$.dirty&2&&e(0,i=Math.min(Math.max(s*Uh,0),Uh))},[i,s]}class aw extends ce{constructor(t){super(),le(this,t,rw,ow,ae,{value:1},sw)}}function lw(n,t){n.addEventListener("mousedown",t),n.addEventListener("touchstart",t,{passive:!0})}function cw(n,t){n.removeEventListener("mousedown",t),n.removeEventListener("touchstart",t)}function dw(n,t){n.addEventListener("mouseup",t),n.addEventListener("touchend",t)}function Yh(n,t){n.removeEventListener("mouseup",t),n.removeEventListener("touchend",t)}function hw(n,t){n.addEventListener("mousemove",t),n.addEventListener("touchmove",t)}function Xh(n,t){n.removeEventListener("mousemove",t),n.removeEventListener("touchmove",t)}function Zr(n){return function(t,e){n.dispatchEvent(new CustomEvent(t,{detail:e}))}}const uw=110,fw=9,mw=111,gw=20;function Jr(n){if("TouchEvent"in window&&n instanceof TouchEvent){const t=n.touches[0];return{x:t?t.clientX:0,y:t?t.clientY:0}}return{x:n.clientX,y:n.clientY}}function pw(n,{thresholdProvider:t}){const e=Zr(n);let i,s,o=0,r,a=!1;function l(){return Date.now()-r>=mw&&Math.abs(o)>=gw}function c(f){r=Date.now(),o=0,a=!0;const m=Jr(f);i=m.x,s=m.y,e("swipeStart",{x:i,y:s}),hw(window,d),dw(window,h)}function d(f){if(!a)return;const m=Jr(f),A=m.x-i,p=m.y-s;i=m.x,s=m.y,e("swipeMove",{x:i,y:s,dx:A,dy:p}),A!==0&&Math.sign(A)!==Math.sign(o)&&(o=0),o+=A,Math.abs(o)>t()&&(e("swipeThresholdReached",{direction:o>0?kn:yi}),Yh(window,h),Xh(window,d))}function h(f){if(Yh(window,h),Xh(window,d),a=!1,!l()){e("swipeFailed");return}const m=Jr(f);e("swipeEnd",{x:m.x,y:m.y})}return lw(n,c),{destroy(){cw(n,c)}}}function Aw(n,t){n.addEventListener("mouseenter",t)}function vw(n,t){n.removeEventListener("mouseenter",t)}function bw(n,t){n.addEventListener("mouseleave",t)}function Zh(n,t){n.removeEventListener("mouseleave",t)}function yw(n){const t=Zr(n);function e(){bw(n,i),t("hovered",{value:!0})}function i(){t("hovered",{value:!1}),Zh(n,i)}return Aw(n,e),{destroy(){vw(n,e),Zh(n,i)}}}const ww=(n,t)=>{const e=t.x-n.x,i=t.y-n.y;return Math.sqrt(e*e+i*i)};function Mn(n,t,e){return Math.max(n,Math.min(t,e))}function Cw(n,t){n.addEventListener("touchstart",t,{passive:!0})}function Iw(n,t){n.removeEventListener("touchstart",t)}function Pw(n,t){n.addEventListener("touchend",t)}function Jh(n,t){n.removeEventListener("touchend",t)}function kw(n){const t=Zr(n);let e=0,i={x:0,y:0};function s({tapEndedAt:a,tapEndedPos:l}){const c=a-e,d=ww(i,l);return c<=uw&&d<=fw}function o(a){e=Date.now();const l=a.touches[0];i={x:l.clientX,y:l.clientY},Pw(n,r)}function r(a){Jh(n,r);const l=a.changedTouches[0];s({tapEndedAt:Date.now(),tapEndedPos:{x:l.clientX,y:l.clientY}})&&t("tapped")}return Cw(n,o),{destroy(){Iw(n,o),Jh(n,r)}}}function Mw({currentParticleIndex:n,particlesCount:t,clonesCountHead:e,clonesCountTotal:i,particlesToScroll:s}){return n===t-e?0:n===0?qh({particlesCountWithoutClones:t-i,particlesToScroll:s})-1:Math.floor((n-e)/s)}function Ew({currentParticleIndex:n,particlesToScroll:t}){return Math.ceil(n/t)}function Dw({currentParticleIndex:n,particlesCount:t,clonesCountHead:e,clonesCountTotal:i,infinite:s,particlesToScroll:o}){return s?Mw({currentParticleIndex:n,particlesCount:t,clonesCountHead:e,clonesCountTotal:i,particlesToScroll:o}):Ew({currentParticleIndex:n,particlesToScroll:o})}function qh({particlesCountWithoutClones:n,particlesToScroll:t}){return Math.ceil(n/t)}function xw({particlesCountWithoutClones:n,particlesToScroll:t,particlesToShow:e}){const i=Kh({particlesCountWithoutClones:n,particlesToScroll:t,particlesToShow:e});return Math.ceil(n/t)-i}function Sw({infinite:n,particlesCountWithoutClones:t,particlesToScroll:e,particlesToShow:i}){return n?qh({particlesCountWithoutClones:t,particlesToScroll:e}):xw({particlesCountWithoutClones:t,particlesToScroll:e,particlesToShow:i})}function Lw({pageIndex:n,clonesCountHead:t,clonesCountTail:e,particlesToScroll:i,particlesCount:s}){return Mn(0,Math.min(t+n*i,s-e),s-1)}function Tw({pageIndex:n,particlesToScroll:t,particlesCount:e,particlesToShow:i}){return Mn(0,Math.min(n*t,e-i),e-1)}function qr({infinite:n,pageIndex:t,clonesCountHead:e,clonesCountTail:i,particlesToScroll:s,particlesCount:o,particlesToShow:r}){return n?Lw({pageIndex:t,clonesCountHead:e,clonesCountTail:i,particlesToScroll:s,particlesCount:o}):Tw({pageIndex:t,particlesToScroll:s,particlesCount:o,particlesToShow:r})}function jw({particlesContainerChildren:n,particleWidth:t}){for(let e=0;e<n.length;e++)n[e].style.minWidth=`${t}px`,n[e].style.maxWidth=`${t}px`}function Kh({particlesToScroll:n,particlesToShow:t,particlesCountWithoutClones:e}){const i=n-t;let s=t;for(;;){const o=e-s-i;if(o<t)return Math.max(o,0);s+=t+i}}function zw(n){return new ResizeObserver(t=>{n({width:t[0].contentRect.width})})}function Ow({clonesCountHead:n,clonesCountTail:t,particlesContainerChildren:e}){const i=[];for(let r=0;r<t;r++)i.push(e[r].cloneNode(!0));const s=[],o=e.length;for(let r=o-1;r>o-1-n;r--)s.push(e[r].cloneNode(!0));return{clonesToAppend:i,clonesToPrepend:s}}function Bw({particlesContainer:n,clonesToAppend:t,clonesToPrepend:e}){for(let i=0;i<t.length;i++)n.append(t[i]);for(let i=0;i<e.length;i++)n.prepend(e[i])}function Vw({infinite:n,particlesToShow:t,partialPageSize:e}){const i=n?{head:Math.ceil(e||t),tail:Math.ceil(t)}:{head:0,tail:0};return ge(V({},i),{total:i.head+i.tail})}const ss=(n,t,e)=>{if(n&&n.hasOwnProperty(t))return n[t];if(e===void 0)throw new Error(`Required arg "${t}" was not provided`);return e},Kr=n=>t=>{n[t]&&n[t]()};var Rw="Expected a function",$h="__lodash_hash_undefined__",eu=1/0,Qw="[object Function]",Gw="[object GeneratorFunction]",Nw="[object Symbol]",Fw=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,_w=/^\w*$/,Hw=/^\./,Ww=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Uw=/[\\^$.*+?()[\]{}|]/g,Yw=/\\(\\)?/g,Xw=/^\[object .+?Constructor\]$/,Zw=typeof Et=="object"&&Et&&Et.Object===Object&&Et,Jw=typeof self=="object"&&self&&self.Object===Object&&self,$r=Zw||Jw||Function("return this")();function qw(n,t){return n==null?void 0:n[t]}function Kw(n){var t=!1;if(n!=null&&typeof n.toString!="function")try{t=!!(n+"")}catch(e){}return t}var $w=Array.prototype,eC=Function.prototype,tu=Object.prototype,ea=$r["__core-js_shared__"],iu=function(){var n=/[^.]+$/.exec(ea&&ea.keys&&ea.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}(),nu=eC.toString,ta=tu.hasOwnProperty,su=tu.toString,tC=RegExp("^"+nu.call(ta).replace(Uw,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ou=$r.Symbol,iC=$w.splice,nC=lu($r,"Map"),os=lu(Object,"create"),ru=ou?ou.prototype:void 0,au=ru?ru.toString:void 0;function Gi(n){var t=-1,e=n?n.length:0;for(this.clear();++t<e;){var i=n[t];this.set(i[0],i[1])}}function sC(){this.__data__=os?os(null):{}}function oC(n){return this.has(n)&&delete this.__data__[n]}function rC(n){var t=this.__data__;if(os){var e=t[n];return e===$h?void 0:e}return ta.call(t,n)?t[n]:void 0}function aC(n){var t=this.__data__;return os?t[n]!==void 0:ta.call(t,n)}function lC(n,t){var e=this.__data__;return e[n]=os&&t===void 0?$h:t,this}Gi.prototype.clear=sC,Gi.prototype.delete=oC,Gi.prototype.get=rC,Gi.prototype.has=aC,Gi.prototype.set=lC;function En(n){var t=-1,e=n?n.length:0;for(this.clear();++t<e;){var i=n[t];this.set(i[0],i[1])}}function cC(){this.__data__=[]}function dC(n){var t=this.__data__,e=vo(t,n);if(e<0)return!1;var i=t.length-1;return e==i?t.pop():iC.call(t,e,1),!0}function hC(n){var t=this.__data__,e=vo(t,n);return e<0?void 0:t[e][1]}function uC(n){return vo(this.__data__,n)>-1}function fC(n,t){var e=this.__data__,i=vo(e,n);return i<0?e.push([n,t]):e[i][1]=t,this}En.prototype.clear=cC,En.prototype.delete=dC,En.prototype.get=hC,En.prototype.has=uC,En.prototype.set=fC;function Ni(n){var t=-1,e=n?n.length:0;for(this.clear();++t<e;){var i=n[t];this.set(i[0],i[1])}}function mC(){this.__data__={hash:new Gi,map:new(nC||En),string:new Gi}}function gC(n){return bo(this,n).delete(n)}function pC(n){return bo(this,n).get(n)}function AC(n){return bo(this,n).has(n)}function vC(n,t){return bo(this,n).set(n,t),this}Ni.prototype.clear=mC,Ni.prototype.delete=gC,Ni.prototype.get=pC,Ni.prototype.has=AC,Ni.prototype.set=vC;function vo(n,t){for(var e=n.length;e--;)if(xC(n[e][0],t))return e;return-1}function bC(n,t){t=IC(t,n)?[t]:CC(t);for(var e=0,i=t.length;n!=null&&e<i;)n=n[EC(t[e++])];return e&&e==i?n:void 0}function yC(n){if(!du(n)||kC(n))return!1;var t=SC(n)||Kw(n)?tC:Xw;return t.test(DC(n))}function wC(n){if(typeof n=="string")return n;if(na(n))return au?au.call(n):"";var t=n+"";return t=="0"&&1/n==-eu?"-0":t}function CC(n){return cu(n)?n:MC(n)}function bo(n,t){var e=n.__data__;return PC(t)?e[typeof t=="string"?"string":"hash"]:e.map}function lu(n,t){var e=qw(n,t);return yC(e)?e:void 0}function IC(n,t){if(cu(n))return!1;var e=typeof n;return e=="number"||e=="symbol"||e=="boolean"||n==null||na(n)?!0:_w.test(n)||!Fw.test(n)||t!=null&&n in Object(t)}function PC(n){var t=typeof n;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?n!=="__proto__":n===null}function kC(n){return!!iu&&iu in n}var MC=ia(function(n){n=TC(n);var t=[];return Hw.test(n)&&t.push(""),n.replace(Ww,function(e,i,s,o){t.push(s?o.replace(Yw,"$1"):i||e)}),t});function EC(n){if(typeof n=="string"||na(n))return n;var t=n+"";return t=="0"&&1/n==-eu?"-0":t}function DC(n){if(n!=null){try{return nu.call(n)}catch(t){}try{return n+""}catch(t){}}return""}function ia(n,t){if(typeof n!="function"||t&&typeof t!="function")throw new TypeError(Rw);var e=function(){var i=arguments,s=t?t.apply(this,i):i[0],o=e.cache;if(o.has(s))return o.get(s);var r=n.apply(this,i);return e.cache=o.set(s,r),r};return e.cache=new(ia.Cache||Ni),e}ia.Cache=Ni;function xC(n,t){return n===t||n!==n&&t!==t}var cu=Array.isArray;function SC(n){var t=du(n)?su.call(n):"";return t==Qw||t==Gw}function du(n){var t=typeof n;return!!n&&(t=="object"||t=="function")}function LC(n){return!!n&&typeof n=="object"}function na(n){return typeof n=="symbol"||LC(n)&&su.call(n)==Nw}function TC(n){return n==null?"":wC(n)}function jC(n,t,e){var i=n==null?void 0:bC(n,t);return i===void 0?e:i}var yo=jC,wo={},zC={get exports(){return wo},set exports(n){wo=n}};(function(n,t){var e=200,i="__lodash_hash_undefined__",s=9007199254740991,o="[object Arguments]",r="[object Array]",a="[object Boolean]",l="[object Date]",c="[object Error]",d="[object Function]",h="[object GeneratorFunction]",f="[object Map]",m="[object Number]",A="[object Object]",p="[object Promise]",g="[object RegExp]",v="[object Set]",y="[object String]",P="[object Symbol]",I="[object WeakMap]",E="[object ArrayBuffer]",C="[object DataView]",z="[object Float32Array]",R="[object Float64Array]",U="[object Int8Array]",H="[object Int16Array]",N="[object Int32Array]",F="[object Uint8Array]",Q="[object Uint8ClampedArray]",_="[object Uint16Array]",Y="[object Uint32Array]",Z=/[\\^$.*+?()[\]{}|]/g,q=/\w*$/,ee=/^\[object .+?Constructor\]$/,fe=/^(?:0|[1-9]\d*)$/,de={};de[o]=de[r]=de[E]=de[C]=de[a]=de[l]=de[z]=de[R]=de[U]=de[H]=de[N]=de[f]=de[m]=de[A]=de[g]=de[v]=de[y]=de[P]=de[F]=de[Q]=de[_]=de[Y]=!0,de[c]=de[d]=de[I]=!1;var ke=typeof Et=="object"&&Et&&Et.Object===Object&&Et,Pe=typeof self=="object"&&self&&self.Object===Object&&self,we=ke||Pe||Function("return this")(),Fe=t&&!t.nodeType&&t,Ce=Fe&&!0&&n&&!n.nodeType&&n,Ze=Ce&&Ce.exports===Fe;function te(b,M){return b.set(M[0],M[1]),b}function ye(b,M){return b.add(M),b}function ze(b,M){for(var B=-1,X=b?b.length:0;++B<X&&M(b[B],B,b)!==!1;);return b}function pe(b,M){for(var B=-1,X=M.length,Ee=b.length;++B<X;)b[Ee+B]=M[B];return b}function Ke(b,M,B,X){var Ee=-1,ve=b?b.length:0;for(X&&ve&&(B=b[++Ee]);++Ee<ve;)B=M(B,b[Ee],Ee,b);return B}function rt(b,M){for(var B=-1,X=Array(b);++B<b;)X[B]=M(B);return X}function xe(b,M){return b==null?void 0:b[M]}function tt(b){var M=!1;if(b!=null&&typeof b.toString!="function")try{M=!!(b+"")}catch(B){}return M}function re(b){var M=-1,B=Array(b.size);return b.forEach(function(X,Ee){B[++M]=[Ee,X]}),B}function Me(b,M){return function(B){return b(M(B))}}function _e(b){var M=-1,B=Array(b.size);return b.forEach(function(X){B[++M]=X}),B}var Ue=Array.prototype,wt=Function.prototype,it=Object.prototype,vt=we["__core-js_shared__"],Re=function(){var b=/[^.]+$/.exec(vt&&vt.keys&&vt.keys.IE_PROTO||"");return b?"Symbol(src)_1."+b:""}(),Qe=wt.toString,Je=it.hasOwnProperty,Rt=it.toString,cs=RegExp("^"+Qe.call(Je).replace(Z,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Xt=Ze?we.Buffer:void 0,Ci=we.Symbol,_i=we.Uint8Array,Ct=Me(Object.getPrototypeOf,Object),Ln=Object.create,Tn=it.propertyIsEnumerable,Ia=Ue.splice,ds=Object.getOwnPropertySymbols,jn=Xt?Xt.isBuffer:void 0,Do=Me(Object.keys,Object),zn=Gt(we,"DataView"),Hi=Gt(we,"Map"),Qt=Gt(we,"Promise"),On=Gt(we,"Set"),hs=Gt(we,"WeakMap"),Wi=Gt(Object,"create"),us=bt(zn),Ui=bt(Hi),fs=bt(Qt),ms=bt(On),gs=bt(hs),Ii=Ci?Ci.prototype:void 0,xo=Ii?Ii.valueOf:void 0;function si(b){var M=-1,B=b?b.length:0;for(this.clear();++M<B;){var X=b[M];this.set(X[0],X[1])}}function Pa(){this.__data__=Wi?Wi(null):{}}function ka(b){return this.has(b)&&delete this.__data__[b]}function Ma(b){var M=this.__data__;if(Wi){var B=M[b];return B===i?void 0:B}return Je.call(M,b)?M[b]:void 0}function So(b){var M=this.__data__;return Wi?M[b]!==void 0:Je.call(M,b)}function ps(b,M){var B=this.__data__;return B[b]=Wi&&M===void 0?i:M,this}si.prototype.clear=Pa,si.prototype.delete=ka,si.prototype.get=Ma,si.prototype.has=So,si.prototype.set=ps;function at(b){var M=-1,B=b?b.length:0;for(this.clear();++M<B;){var X=b[M];this.set(X[0],X[1])}}function Ea(){this.__data__=[]}function Da(b){var M=this.__data__,B=Vn(M,b);if(B<0)return!1;var X=M.length-1;return B==X?M.pop():Ia.call(M,B,1),!0}function xa(b){var M=this.__data__,B=Vn(M,b);return B<0?void 0:M[B][1]}function Sa(b){return Vn(this.__data__,b)>-1}function La(b,M){var B=this.__data__,X=Vn(B,b);return X<0?B.push([b,M]):B[X][1]=M,this}at.prototype.clear=Ea,at.prototype.delete=Da,at.prototype.get=xa,at.prototype.has=Sa,at.prototype.set=La;function ut(b){var M=-1,B=b?b.length:0;for(this.clear();++M<B;){var X=b[M];this.set(X[0],X[1])}}function Ta(){this.__data__={hash:new si,map:new(Hi||at),string:new si}}function ja(b){return Xi(this,b).delete(b)}function za(b){return Xi(this,b).get(b)}function Oa(b){return Xi(this,b).has(b)}function Ba(b,M){return Xi(this,b).set(b,M),this}ut.prototype.clear=Ta,ut.prototype.delete=ja,ut.prototype.get=za,ut.prototype.has=Oa,ut.prototype.set=Ba;function It(b){this.__data__=new at(b)}function Va(){this.__data__=new at}function Ra(b){return this.__data__.delete(b)}function Qa(b){return this.__data__.get(b)}function Ga(b){return this.__data__.has(b)}function Na(b,M){var B=this.__data__;if(B instanceof at){var X=B.__data__;if(!Hi||X.length<e-1)return X.push([b,M]),this;B=this.__data__=new ut(X)}return B.set(b,M),this}It.prototype.clear=Va,It.prototype.delete=Ra,It.prototype.get=Qa,It.prototype.has=Ga,It.prototype.set=Na;function Bn(b,M){var B=ys(b)||Qn(b)?rt(b.length,String):[],X=B.length,Ee=!!X;for(var ve in b)(M||Je.call(b,ve))&&!(Ee&&(ve=="length"||tl(ve,X)))&&B.push(ve);return B}function Lo(b,M,B){var X=b[M];(!(Je.call(b,M)&&Bo(X,B))||B===void 0&&!(M in b))&&(b[M]=B)}function Vn(b,M){for(var B=b.length;B--;)if(Bo(b[B][0],M))return B;return-1}function Zt(b,M){return b&&bs(M,Cs(M),b)}function As(b,M,B,X,Ee,ve,Le){var Te;if(X&&(Te=ve?X(b,Ee,ve,Le):X(b)),Te!==void 0)return Te;if(!qt(b))return b;var qe=ys(b);if(qe){if(Te=$a(b),!M)return Ja(b,Te)}else{var Be=ri(b),ft=Be==d||Be==h;if(Vo(b))return Rn(b,M);if(Be==A||Be==o||ft&&!ve){if(tt(b))return ve?b:{};if(Te=Jt(ft?{}:b),!M)return qa(b,Zt(Te,b))}else{if(!de[Be])return ve?b:{};Te=el(b,Be,As,M)}}Le||(Le=new It);var Pt=Le.get(b);if(Pt)return Pt;if(Le.set(b,Te),!qe)var $e=B?Ka(b):Cs(b);return ze($e||b,function(mt,lt){$e&&(lt=mt,mt=b[lt]),Lo(Te,lt,As(mt,M,B,X,lt,b,Le))}),Te}function Fa(b){return qt(b)?Ln(b):{}}function _a(b,M,B){var X=M(b);return ys(b)?X:pe(X,B(b))}function Ha(b){return Rt.call(b)}function Wa(b){if(!qt(b)||nl(b))return!1;var M=ws(b)||tt(b)?cs:ee;return M.test(bt(b))}function Ua(b){if(!zo(b))return Do(b);var M=[];for(var B in Object(b))Je.call(b,B)&&B!="constructor"&&M.push(B);return M}function Rn(b,M){if(M)return b.slice();var B=new b.constructor(b.length);return b.copy(B),B}function vs(b){var M=new b.constructor(b.byteLength);return new _i(M).set(new _i(b)),M}function Yi(b,M){var B=M?vs(b.buffer):b.buffer;return new b.constructor(B,b.byteOffset,b.byteLength)}function To(b,M,B){var X=M?B(re(b),!0):re(b);return Ke(X,te,new b.constructor)}function jo(b){var M=new b.constructor(b.source,q.exec(b));return M.lastIndex=b.lastIndex,M}function Ya(b,M,B){var X=M?B(_e(b),!0):_e(b);return Ke(X,ye,new b.constructor)}function Xa(b){return xo?Object(xo.call(b)):{}}function Za(b,M){var B=M?vs(b.buffer):b.buffer;return new b.constructor(B,b.byteOffset,b.length)}function Ja(b,M){var B=-1,X=b.length;for(M||(M=Array(X));++B<X;)M[B]=b[B];return M}function bs(b,M,B,X){B||(B={});for(var Ee=-1,ve=M.length;++Ee<ve;){var Le=M[Ee],Te=X?X(B[Le],b[Le],Le,B,b):void 0;Lo(B,Le,Te===void 0?b[Le]:Te)}return B}function qa(b,M){return bs(b,oi(b),M)}function Ka(b){return _a(b,Cs,oi)}function Xi(b,M){var B=b.__data__;return il(M)?B[typeof M=="string"?"string":"hash"]:B.map}function Gt(b,M){var B=xe(b,M);return Wa(B)?B:void 0}var oi=ds?Me(ds,Object):ol,ri=Ha;(zn&&ri(new zn(new ArrayBuffer(1)))!=C||Hi&&ri(new Hi)!=f||Qt&&ri(Qt.resolve())!=p||On&&ri(new On)!=v||hs&&ri(new hs)!=I)&&(ri=function(b){var M=Rt.call(b),B=M==A?b.constructor:void 0,X=B?bt(B):void 0;if(X)switch(X){case us:return C;case Ui:return f;case fs:return p;case ms:return v;case gs:return I}return M});function $a(b){var M=b.length,B=b.constructor(M);return M&&typeof b[0]=="string"&&Je.call(b,"index")&&(B.index=b.index,B.input=b.input),B}function Jt(b){return typeof b.constructor=="function"&&!zo(b)?Fa(Ct(b)):{}}function el(b,M,B,X){var Ee=b.constructor;switch(M){case E:return vs(b);case a:case l:return new Ee(+b);case C:return Yi(b,X);case z:case R:case U:case H:case N:case F:case Q:case _:case Y:return Za(b,X);case f:return To(b,X,B);case m:case y:return new Ee(b);case g:return jo(b);case v:return Ya(b,X,B);case P:return Xa(b)}}function tl(b,M){return M=M==null?s:M,!!M&&(typeof b=="number"||fe.test(b))&&b>-1&&b%1==0&&b<M}function il(b){var M=typeof b;return M=="string"||M=="number"||M=="symbol"||M=="boolean"?b!=="__proto__":b===null}function nl(b){return!!Re&&Re in b}function zo(b){var M=b&&b.constructor,B=typeof M=="function"&&M.prototype||it;return b===B}function bt(b){if(b!=null){try{return Qe.call(b)}catch(M){}try{return b+""}catch(M){}}return""}function Oo(b){return As(b,!0,!0)}function Bo(b,M){return b===M||b!==b&&M!==M}function Qn(b){return sl(b)&&Je.call(b,"callee")&&(!Tn.call(b,"callee")||Rt.call(b)==o)}var ys=Array.isArray;function Gn(b){return b!=null&&Ro(b.length)&&!ws(b)}function sl(b){return Qo(b)&&Gn(b)}var Vo=jn||rl;function ws(b){var M=qt(b)?Rt.call(b):"";return M==d||M==h}function Ro(b){return typeof b=="number"&&b>-1&&b%1==0&&b<=s}function qt(b){var M=typeof b;return!!b&&(M=="object"||M=="function")}function Qo(b){return!!b&&typeof b=="object"}function Cs(b){return Gn(b)?Bn(b):Ua(b)}function ol(){return[]}function rl(){return!1}n.exports=Oo})(zC,wo);const OC=wo;var Co={},BC={get exports(){return Co},set exports(n){Co=n}};(function(n,t){var e=200,i="__lodash_hash_undefined__",s=1,o=2,r=9007199254740991,a="[object Arguments]",l="[object Array]",c="[object AsyncFunction]",d="[object Boolean]",h="[object Date]",f="[object Error]",m="[object Function]",A="[object GeneratorFunction]",p="[object Map]",g="[object Number]",v="[object Null]",y="[object Object]",P="[object Promise]",I="[object Proxy]",E="[object RegExp]",C="[object Set]",z="[object String]",R="[object Symbol]",U="[object Undefined]",H="[object WeakMap]",N="[object ArrayBuffer]",F="[object DataView]",Q="[object Float32Array]",_="[object Float64Array]",Y="[object Int8Array]",Z="[object Int16Array]",q="[object Int32Array]",ee="[object Uint8Array]",fe="[object Uint8ClampedArray]",de="[object Uint16Array]",ke="[object Uint32Array]",Pe=/[\\^$.*+?()[\]{}|]/g,we=/^\[object .+?Constructor\]$/,Fe=/^(?:0|[1-9]\d*)$/,Ce={};Ce[Q]=Ce[_]=Ce[Y]=Ce[Z]=Ce[q]=Ce[ee]=Ce[fe]=Ce[de]=Ce[ke]=!0,Ce[a]=Ce[l]=Ce[N]=Ce[d]=Ce[F]=Ce[h]=Ce[f]=Ce[m]=Ce[p]=Ce[g]=Ce[y]=Ce[E]=Ce[C]=Ce[z]=Ce[H]=!1;var Ze=typeof Et=="object"&&Et&&Et.Object===Object&&Et,te=typeof self=="object"&&self&&self.Object===Object&&self,ye=Ze||te||Function("return this")(),ze=t&&!t.nodeType&&t,pe=ze&&!0&&n&&!n.nodeType&&n,Ke=pe&&pe.exports===ze,rt=Ke&&Ze.process,xe=function(){try{return rt&&rt.binding&&rt.binding("util")}catch(b){}}(),tt=xe&&xe.isTypedArray;function re(b,M){for(var B=-1,X=b==null?0:b.length,Ee=0,ve=[];++B<X;){var Le=b[B];M(Le,B,b)&&(ve[Ee++]=Le)}return ve}function Me(b,M){for(var B=-1,X=M.length,Ee=b.length;++B<X;)b[Ee+B]=M[B];return b}function _e(b,M){for(var B=-1,X=b==null?0:b.length;++B<X;)if(M(b[B],B,b))return!0;return!1}function Ue(b,M){for(var B=-1,X=Array(b);++B<b;)X[B]=M(B);return X}function wt(b){return function(M){return b(M)}}function it(b,M){return b.has(M)}function vt(b,M){return b==null?void 0:b[M]}function Re(b){var M=-1,B=Array(b.size);return b.forEach(function(X,Ee){B[++M]=[Ee,X]}),B}function Qe(b,M){return function(B){return b(M(B))}}function Je(b){var M=-1,B=Array(b.size);return b.forEach(function(X){B[++M]=X}),B}var Rt=Array.prototype,cs=Function.prototype,Xt=Object.prototype,Ci=ye["__core-js_shared__"],_i=cs.toString,Ct=Xt.hasOwnProperty,Ln=function(){var b=/[^.]+$/.exec(Ci&&Ci.keys&&Ci.keys.IE_PROTO||"");return b?"Symbol(src)_1."+b:""}(),Tn=Xt.toString,Ia=RegExp("^"+_i.call(Ct).replace(Pe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ds=Ke?ye.Buffer:void 0,jn=ye.Symbol,Do=ye.Uint8Array,zn=Xt.propertyIsEnumerable,Hi=Rt.splice,Qt=jn?jn.toStringTag:void 0,On=Object.getOwnPropertySymbols,hs=ds?ds.isBuffer:void 0,Wi=Qe(Object.keys,Object),us=oi(ye,"DataView"),Ui=oi(ye,"Map"),fs=oi(ye,"Promise"),ms=oi(ye,"Set"),gs=oi(ye,"WeakMap"),Ii=oi(Object,"create"),xo=bt(us),si=bt(Ui),Pa=bt(fs),ka=bt(ms),Ma=bt(gs),So=jn?jn.prototype:void 0,ps=So?So.valueOf:void 0;function at(b){var M=-1,B=b==null?0:b.length;for(this.clear();++M<B;){var X=b[M];this.set(X[0],X[1])}}function Ea(){this.__data__=Ii?Ii(null):{},this.size=0}function Da(b){var M=this.has(b)&&delete this.__data__[b];return this.size-=M?1:0,M}function xa(b){var M=this.__data__;if(Ii){var B=M[b];return B===i?void 0:B}return Ct.call(M,b)?M[b]:void 0}function Sa(b){var M=this.__data__;return Ii?M[b]!==void 0:Ct.call(M,b)}function La(b,M){var B=this.__data__;return this.size+=this.has(b)?0:1,B[b]=Ii&&M===void 0?i:M,this}at.prototype.clear=Ea,at.prototype.delete=Da,at.prototype.get=xa,at.prototype.has=Sa,at.prototype.set=La;function ut(b){var M=-1,B=b==null?0:b.length;for(this.clear();++M<B;){var X=b[M];this.set(X[0],X[1])}}function Ta(){this.__data__=[],this.size=0}function ja(b){var M=this.__data__,B=Rn(M,b);if(B<0)return!1;var X=M.length-1;return B==X?M.pop():Hi.call(M,B,1),--this.size,!0}function za(b){var M=this.__data__,B=Rn(M,b);return B<0?void 0:M[B][1]}function Oa(b){return Rn(this.__data__,b)>-1}function Ba(b,M){var B=this.__data__,X=Rn(B,b);return X<0?(++this.size,B.push([b,M])):B[X][1]=M,this}ut.prototype.clear=Ta,ut.prototype.delete=ja,ut.prototype.get=za,ut.prototype.has=Oa,ut.prototype.set=Ba;function It(b){var M=-1,B=b==null?0:b.length;for(this.clear();++M<B;){var X=b[M];this.set(X[0],X[1])}}function Va(){this.size=0,this.__data__={hash:new at,map:new(Ui||ut),string:new at}}function Ra(b){var M=Gt(this,b).delete(b);return this.size-=M?1:0,M}function Qa(b){return Gt(this,b).get(b)}function Ga(b){return Gt(this,b).has(b)}function Na(b,M){var B=Gt(this,b),X=B.size;return B.set(b,M),this.size+=B.size==X?0:1,this}It.prototype.clear=Va,It.prototype.delete=Ra,It.prototype.get=Qa,It.prototype.has=Ga,It.prototype.set=Na;function Bn(b){var M=-1,B=b==null?0:b.length;for(this.__data__=new It;++M<B;)this.add(b[M])}function Lo(b){return this.__data__.set(b,i),this}function Vn(b){return this.__data__.has(b)}Bn.prototype.add=Bn.prototype.push=Lo,Bn.prototype.has=Vn;function Zt(b){var M=this.__data__=new ut(b);this.size=M.size}function As(){this.__data__=new ut,this.size=0}function Fa(b){var M=this.__data__,B=M.delete(b);return this.size=M.size,B}function _a(b){return this.__data__.get(b)}function Ha(b){return this.__data__.has(b)}function Wa(b,M){var B=this.__data__;if(B instanceof ut){var X=B.__data__;if(!Ui||X.length<e-1)return X.push([b,M]),this.size=++B.size,this;B=this.__data__=new It(X)}return B.set(b,M),this.size=B.size,this}Zt.prototype.clear=As,Zt.prototype.delete=Fa,Zt.prototype.get=_a,Zt.prototype.has=Ha,Zt.prototype.set=Wa;function Ua(b,M){var B=Qn(b),X=!B&&Bo(b),Ee=!B&&!X&&Gn(b),ve=!B&&!X&&!Ee&&Qo(b),Le=B||X||Ee||ve,Te=Le?Ue(b.length,String):[],qe=Te.length;for(var Be in b)(M||Ct.call(b,Be))&&!(Le&&(Be=="length"||Ee&&(Be=="offset"||Be=="parent")||ve&&(Be=="buffer"||Be=="byteLength"||Be=="byteOffset")||el(Be,qe)))&&Te.push(Be);return Te}function Rn(b,M){for(var B=b.length;B--;)if(Oo(b[B][0],M))return B;return-1}function vs(b,M,B){var X=M(b);return Qn(b)?X:Me(X,B(b))}function Yi(b){return b==null?b===void 0?U:v:Qt&&Qt in Object(b)?ri(b):zo(b)}function To(b){return qt(b)&&Yi(b)==a}function jo(b,M,B,X,Ee){return b===M?!0:b==null||M==null||!qt(b)&&!qt(M)?b!==b&&M!==M:Ya(b,M,B,X,jo,Ee)}function Ya(b,M,B,X,Ee,ve){var Le=Qn(b),Te=Qn(M),qe=Le?l:Jt(b),Be=Te?l:Jt(M);qe=qe==a?y:qe,Be=Be==a?y:Be;var ft=qe==y,Pt=Be==y,$e=qe==Be;if($e&&Gn(b)){if(!Gn(M))return!1;Le=!0,ft=!1}if($e&&!ft)return ve||(ve=new Zt),Le||Qo(b)?bs(b,M,B,X,Ee,ve):qa(b,M,qe,B,X,Ee,ve);if(!(B&s)){var mt=ft&&Ct.call(b,"__wrapped__"),lt=Pt&&Ct.call(M,"__wrapped__");if(mt||lt){var Pi=mt?b.value():b,ai=lt?M.value():M;return ve||(ve=new Zt),Ee(Pi,ai,B,X,ve)}}return $e?(ve||(ve=new Zt),Ka(b,M,B,X,Ee,ve)):!1}function Xa(b){if(!Ro(b)||il(b))return!1;var M=Vo(b)?Ia:we;return M.test(bt(b))}function Za(b){return qt(b)&&ws(b.length)&&!!Ce[Yi(b)]}function Ja(b){if(!nl(b))return Wi(b);var M=[];for(var B in Object(b))Ct.call(b,B)&&B!="constructor"&&M.push(B);return M}function bs(b,M,B,X,Ee,ve){var Le=B&s,Te=b.length,qe=M.length;if(Te!=qe&&!(Le&&qe>Te))return!1;var Be=ve.get(b);if(Be&&ve.get(M))return Be==M;var ft=-1,Pt=!0,$e=B&o?new Bn:void 0;for(ve.set(b,M),ve.set(M,b);++ft<Te;){var mt=b[ft],lt=M[ft];if(X)var Pi=Le?X(lt,mt,ft,M,b,ve):X(mt,lt,ft,b,M,ve);if(Pi!==void 0){if(Pi)continue;Pt=!1;break}if($e){if(!_e(M,function(ai,Zi){if(!it($e,Zi)&&(mt===ai||Ee(mt,ai,B,X,ve)))return $e.push(Zi)})){Pt=!1;break}}else if(!(mt===lt||Ee(mt,lt,B,X,ve))){Pt=!1;break}}return ve.delete(b),ve.delete(M),Pt}function qa(b,M,B,X,Ee,ve,Le){switch(B){case F:if(b.byteLength!=M.byteLength||b.byteOffset!=M.byteOffset)return!1;b=b.buffer,M=M.buffer;case N:return!(b.byteLength!=M.byteLength||!ve(new Do(b),new Do(M)));case d:case h:case g:return Oo(+b,+M);case f:return b.name==M.name&&b.message==M.message;case E:case z:return b==M+"";case p:var Te=Re;case C:var qe=X&s;if(Te||(Te=Je),b.size!=M.size&&!qe)return!1;var Be=Le.get(b);if(Be)return Be==M;X|=o,Le.set(b,M);var ft=bs(Te(b),Te(M),X,Ee,ve,Le);return Le.delete(b),ft;case R:if(ps)return ps.call(b)==ps.call(M)}return!1}function Ka(b,M,B,X,Ee,ve){var Le=B&s,Te=Xi(b),qe=Te.length,Be=Xi(M),ft=Be.length;if(qe!=ft&&!Le)return!1;for(var Pt=qe;Pt--;){var $e=Te[Pt];if(!(Le?$e in M:Ct.call(M,$e)))return!1}var mt=ve.get(b);if(mt&&ve.get(M))return mt==M;var lt=!0;ve.set(b,M),ve.set(M,b);for(var Pi=Le;++Pt<qe;){$e=Te[Pt];var ai=b[$e],Zi=M[$e];if(X)var Lf=Le?X(Zi,ai,$e,M,b,ve):X(ai,Zi,$e,b,M,ve);if(!(Lf===void 0?ai===Zi||Ee(ai,Zi,B,X,ve):Lf)){lt=!1;break}Pi||(Pi=$e=="constructor")}if(lt&&!Pi){var Go=b.constructor,No=M.constructor;Go!=No&&"constructor"in b&&"constructor"in M&&!(typeof Go=="function"&&Go instanceof Go&&typeof No=="function"&&No instanceof No)&&(lt=!1)}return ve.delete(b),ve.delete(M),lt}function Xi(b){return vs(b,Cs,$a)}function Gt(b,M){var B=b.__data__;return tl(M)?B[typeof M=="string"?"string":"hash"]:B.map}function oi(b,M){var B=vt(b,M);return Xa(B)?B:void 0}function ri(b){var M=Ct.call(b,Qt),B=b[Qt];try{b[Qt]=void 0;var X=!0}catch(ve){}var Ee=Tn.call(b);return X&&(M?b[Qt]=B:delete b[Qt]),Ee}var $a=On?function(b){return b==null?[]:(b=Object(b),re(On(b),function(M){return zn.call(b,M)}))}:ol,Jt=Yi;(us&&Jt(new us(new ArrayBuffer(1)))!=F||Ui&&Jt(new Ui)!=p||fs&&Jt(fs.resolve())!=P||ms&&Jt(new ms)!=C||gs&&Jt(new gs)!=H)&&(Jt=function(b){var M=Yi(b),B=M==y?b.constructor:void 0,X=B?bt(B):"";if(X)switch(X){case xo:return F;case si:return p;case Pa:return P;case ka:return C;case Ma:return H}return M});function el(b,M){return M=M==null?r:M,!!M&&(typeof b=="number"||Fe.test(b))&&b>-1&&b%1==0&&b<M}function tl(b){var M=typeof b;return M=="string"||M=="number"||M=="symbol"||M=="boolean"?b!=="__proto__":b===null}function il(b){return!!Ln&&Ln in b}function nl(b){var M=b&&b.constructor,B=typeof M=="function"&&M.prototype||Xt;return b===B}function zo(b){return Tn.call(b)}function bt(b){if(b!=null){try{return _i.call(b)}catch(M){}try{return b+""}catch(M){}}return""}function Oo(b,M){return b===M||b!==b&&M!==M}var Bo=To(function(){return arguments}())?To:function(b){return qt(b)&&Ct.call(b,"callee")&&!zn.call(b,"callee")},Qn=Array.isArray;function ys(b){return b!=null&&ws(b.length)&&!Vo(b)}var Gn=hs||rl;function sl(b,M){return jo(b,M)}function Vo(b){if(!Ro(b))return!1;var M=Yi(b);return M==m||M==A||M==c||M==I}function ws(b){return typeof b=="number"&&b>-1&&b%1==0&&b<=r}function Ro(b){var M=typeof b;return b!=null&&(M=="object"||M=="function")}function qt(b){return b!=null&&typeof b=="object"}var Qo=tt?wt(tt):Za;function Cs(b){return ys(b)?Ua(b):Ja(b)}function ol(){return[]}function rl(){return!1}n.exports=sl})(BC,Co);const VC=Co,RC=(n,t)=>VC(n,t),QC=n=>Object.keys(n||{}),GC=(n,t)=>{const e={};return n.forEach(i=>{e[i]=t[i]}),e},NC=()=>{const n={},t=(e,i)=>{const{watcherName:s,fn:o}=e,{prop:r,value:a}=i;n[s]||(n[s]={deps:{},fn:o}),n[s].deps[r]=a};return{subscribers:n,subscribe(e,i){e&&t(e,i)},notify(e,i){Object.entries(n).forEach(([s,{deps:o,fn:r}])=>{const a=QC(o);if(a.includes(i)){const l=GC(a,e);RC(o,l)||(n[s].deps=l,r())}})}}},FC=()=>{let n=null;return{targetWatcher(t,e){n={watcherName:t,fn:e},n.fn(),n=null},getTarget(){return n}}};function _C(n,t){const e=yo(n,"data",{}),i=yo(n,"watch",{}),s=yo(n,"methods",{}),o=yo(t,"onChange",()=>{}),{subscribe:r,notify:a,subscribers:l}=NC(),{targetWatcher:c,getTarget:d}=FC();let h;const f={},m=()=>({data:h,methods:f});let A=!1;const p=v=>(...y)=>{A=!0;const P=v(...y);return A=!1,P};Object.entries(s).forEach(([v,y])=>{f[v]=p((...P)=>y(m(),...P)),Object.defineProperty(f[v],"name",{value:v})}),h=new Proxy(OC(e),{get(v,y){return d()&&!A&&r(d(),{prop:y,value:v[y]}),Reflect.get(...arguments)},set(v,y,P){return v[y]===P||(Reflect.set(...arguments),d()||(o&&o(y,P),a(h,y))),!0}}),Object.entries(i).forEach(([v,y])=>{c(v,()=>{y(m())})});const g=[h,f];return g._internal={_getSubscribers(){return l}},g}function HC({pageIndex:n,particlesToShow:t,particlesToScroll:e,particlesCount:i}){const s=n===0?0:t-e,o=n*t-n*s,r=o+Math.max(t,e)-1,a=[];for(let l=o;l<=Math.min(i-1,r);l++)a.push(l);return a}function WC({infinite:n,pageIndex:t,pagesCount:e,particlesCount:i,particlesToShow:s,particlesToScroll:o}){const r=Mn(0,t,e-1);let a=r-1,l=r+1;a=n?a<0?e-1:a:Math.max(0,a),l=n?l>e-1?0:l:Math.min(e-1,l);const c=[...new Set([a,r,l,0,e-1])].sort((h,f)=>h-f),d=c.flatMap(h=>HC({pageIndex:h,particlesToShow:s,particlesToScroll:o,particlesCount:i}));return{pageIndexes:c,particleIndexes:[...new Set(d)].sort((h,f)=>h-f)}}const UC=(n,t)=>(n(),setInterval(n,t)),YC=35,hu=1;class XC{constructor({onProgressValueChange:t}){this._onProgressValueChange=t,this._autoplayDuration,this._onProgressValueChange,this._interval,this._paused=!1}setAutoplayDuration(t){this._autoplayDuration=t}start(t){return new Promise(e=>{this.reset();const i=Math.min(YC,Math.max(this._autoplayDuration,1));let s=-i;this._interval=UC(()=>W(this,null,function*(){if(this._paused)return;s+=i;const o=s/this._autoplayDuration;this._onProgressValueChange(o),o>hu&&(this.reset(),yield t(),e())}),i)})}pause(){this._paused=!0}resume(){this._paused=!1}reset(){clearInterval(this._interval),this._onProgressValueChange(hu)}}function ZC(n){const t=new XC({onProgressValueChange:r=>{n("progressValue",1-r)}}),e=_C({data:{particlesCountWithoutClones:0,particlesToShow:1,particlesToShowInit:1,particlesToScroll:1,particlesToScrollInit:1,particlesCount:1,currentParticleIndex:1,infinite:!1,autoplayDuration:1e3,clonesCountHead:0,clonesCountTail:0,clonesCountTotal:0,partialPageSize:1,currentPageIndex:1,pagesCount:1,pauseOnFocus:!1,focused:!1,autoplay:!1,autoplayDirection:"next",disabled:!1,durationMsInit:1e3,durationMs:1e3,offset:0,particleWidth:0,loaded:[]},watch:{setLoaded({data:r}){r.loaded=WC({infinite:r.infinite,pageIndex:r.currentPageIndex,pagesCount:r.pagesCount,particlesCount:r.particlesCountWithoutClones,particlesToShow:r.particlesToShow,particlesToScroll:r.particlesToScroll}).particleIndexes},setCurrentPageIndex({data:r}){r.currentPageIndex=Dw({currentParticleIndex:r.currentParticleIndex,particlesCount:r.particlesCount,clonesCountHead:r.clonesCountHead,clonesCountTotal:r.clonesCountTotal,infinite:r.infinite,particlesToScroll:r.particlesToScroll})},setPartialPageSize({data:r}){r.partialPageSize=Kh({particlesToScroll:r.particlesToScroll,particlesToShow:r.particlesToShow,particlesCountWithoutClones:r.particlesCountWithoutClones})},setClonesCount({data:r}){const{head:a,tail:l}=Vw({infinite:r.infinite,particlesToShow:r.particlesToShow,partialPageSize:r.partialPageSize});r.clonesCountHead=a,r.clonesCountTail=l,r.clonesCountTotal=a+l},setProgressManagerAutoplayDuration({data:r}){t.setAutoplayDuration(r.autoplayDuration)},toggleProgressManager({data:{pauseOnFocus:r,focused:a}}){r&&(a?t.pause():t.resume())},initDuration({data:r}){r.durationMs=r.durationMsInit},applyAutoplay({data:r,methods:{_applyAutoplayIfNeeded:a}}){r.autoplay&&a(r.autoplay)},setPagesCount({data:r}){r.pagesCount=Sw({infinite:r.infinite,particlesCountWithoutClones:r.particlesCountWithoutClones,particlesToScroll:r.particlesToScroll,particlesToShow:r.particlesToShow})},setParticlesToShow({data:r}){r.particlesToShow=Mn(1,r.particlesToShowInit,r.particlesCountWithoutClones)},setParticlesToScroll({data:r}){r.particlesToScroll=Mn(1,r.particlesToScrollInit,r.particlesCountWithoutClones)}},methods:{_prev({data:r}){r.currentParticleIndex=qr({infinite:r.infinite,pageIndex:r.currentPageIndex-1,clonesCountHead:r.clonesCountHead,clonesCountTail:r.clonesCountTail,particlesToScroll:r.particlesToScroll,particlesCount:r.particlesCount,particlesToShow:r.particlesToShow})},_next({data:r}){r.currentParticleIndex=qr({infinite:r.infinite,pageIndex:r.currentPageIndex+1,clonesCountHead:r.clonesCountHead,clonesCountTail:r.clonesCountTail,particlesToScroll:r.particlesToScroll,particlesCount:r.particlesCount,particlesToShow:r.particlesToShow})},_moveToParticle({data:r},a){r.currentParticleIndex=Mn(0,a,r.particlesCount-1)},toggleFocused({data:r}){r.focused=!r.focused},_applyAutoplayIfNeeded(l){return W(this,arguments,function*({data:r,methods:a}){if(!r.infinite&&(r.autoplayDirection===yi&&r.currentParticleIndex===r.particlesCount-1||r.autoplayDirection===kn&&r.currentParticleIndex===0)){t.reset();return}if(r.autoplay){const c=()=>Kr({[yi]:()=>W(this,null,function*(){return a.showNextPage()}),[kn]:()=>W(this,null,function*(){return a.showPrevPage()})})(r.autoplayDirection);yield t.start(c)}})},_jumpIfNeeded(l){return W(this,arguments,function*({data:r,methods:a}){let c=!1;return r.infinite&&(r.currentParticleIndex===0?(yield a.showParticle(r.particlesCount-r.clonesCountTotal,{animated:!1}),c=!0):r.currentParticleIndex===r.particlesCount-r.clonesCountTail&&(yield a.showParticle(r.clonesCountHead,{animated:!1}),c=!0)),c})},changePage(d,h,f){return W(this,arguments,function*({data:r,methods:a},l,c){if(t.reset(),r.disabled)return;r.disabled=!0,l(),yield a.offsetPage({animated:ss(c,"animated",!0)}),r.disabled=!1,!(yield a._jumpIfNeeded())&&a._applyAutoplayIfNeeded()})},showNextPage(c,d){return W(this,arguments,function*({data:r,methods:a},l){r.disabled||(yield a.changePage(a._next,l))})},showPrevPage(c,d){return W(this,arguments,function*({data:r,methods:a},l){r.disabled||(yield a.changePage(a._prev,l))})},showParticle(c,d,h){return W(this,arguments,function*({methods:r},a,l){yield r.changePage(()=>r._moveToParticle(a),l)})},_getParticleIndexByPageIndex({data:r},a){return qr({infinite:r.infinite,pageIndex:a,clonesCountHead:r.clonesCountHead,clonesCountTail:r.clonesCountTail,particlesToScroll:r.particlesToScroll,particlesCount:r.particlesCount,particlesToShow:r.particlesToShow})},showPage(c,d,h){return W(this,arguments,function*({methods:r},a,l){const f=r._getParticleIndexByPageIndex(a);yield r.showParticle(f,l)})},offsetPage({data:r},a){const l=ss(a,"animated",!0);return new Promise(c=>{r.durationMs=l?r.durationMsInit:0,r.offset=-r.currentParticleIndex*r.particleWidth,setTimeout(()=>{c()},r.durationMs)})}}},{onChange:n}),[i,s]=e;return[{data:i,progressManager:t},s,e._internal]}function JC(n){me(n,"svelte-sme1z4",":root{--sc-color-rgb-light-50p:rgba(93, 93, 93, 0.5);--sc-color-rgb-light:#5d5d5d;--sc-color-hex-dark-50p:rgba(30, 30, 30, 0.5);--sc-color-hex-dark:#1e1e1e}.sc-carousel__carousel-container.svelte-sme1z4{display:flex;width:100%;flex-direction:column;align-items:center}.sc-carousel__content-container.svelte-sme1z4{position:relative;display:flex;width:100%}.sc-carousel__pages-window.svelte-sme1z4{flex:1;display:flex;overflow:hidden;box-sizing:border-box;position:relative}.sc-carousel__pages-container.svelte-sme1z4{width:100%;display:flex;transition-property:transform}.sc-carousel__arrow-container.svelte-sme1z4{padding:5px;box-sizing:border-box;display:flex;align-items:center;justify-content:center}.sc-carousel-progress__container.svelte-sme1z4{width:100%;height:5px;background-color:var(--sc-color-rgb-light-50p);position:absolute;bottom:0}.sc-carousel-button{all:unset;cursor:pointer}.sc-carousel-button:focus{outline:5px auto}")}const qC=n=>({currentPageIndex:n[0]&32,pagesCount:n[0]&1024,loaded:n[0]&64}),uu=n=>({currentPageIndex:n[5],pagesCount:n[10],showPage:n[15],loaded:n[6]}),KC=n=>({loaded:n[0]&64,currentPageIndex:n[0]&32}),fu=n=>({showNextPage:n[14].showNextPage,loaded:n[6],currentPageIndex:n[5]}),$C=n=>({loaded:n[0]&64,currentPageIndex:n[0]&32}),mu=n=>({loaded:n[6],currentPageIndex:n[5]}),eI=n=>({loaded:n[0]&64,currentPageIndex:n[0]&32}),gu=n=>({showPrevPage:n[14].showPrevPage,loaded:n[6],currentPageIndex:n[5]});function pu(n){let t;const e=n[37].prev,i=sn(e,n,n[36],gu),s=i||tI(n);return{c(){s&&s.c()},m(o,r){s&&s.m(o,r),t=!0},p(o,r){i?i.p&&(!t||r[0]&96|r[1]&32)&&rn(i,e,o,o[36],t?on(e,o[36],r,eI):an(o[36]),gu):s&&s.p&&(!t||r[0]&36)&&s.p(o,t?r:[-1,-1])},i(o){t||(D(s,o),t=!0)},o(o){T(s,o),t=!1},d(o){s&&s.d(o)}}}function tI(n){let t,e,i;return e=new Wh({props:{direction:"prev",disabled:!n[2]&&n[5]===0}}),e.$on("click",n[23]),{c(){t=x("div"),oe(e.$$.fragment),w(t,"class","sc-carousel__arrow-container svelte-sme1z4")},m(s,o){O(s,t,o),ne(e,t,null),i=!0},p(s,o){const r={};o[0]&36&&(r.disabled=!s[2]&&s[5]===0),e.$set(r)},i(s){i||(D(e.$$.fragment,s),i=!0)},o(s){T(e.$$.fragment,s),i=!1},d(s){s&&j(t),se(e)}}}function Au(n){let t,e,i;return e=new aw({props:{value:n[7]}}),{c(){t=x("div"),oe(e.$$.fragment),w(t,"class","sc-carousel-progress__container svelte-sme1z4")},m(s,o){O(s,t,o),ne(e,t,null),i=!0},p(s,o){const r={};o[0]&128&&(r.value=s[7]),e.$set(r)},i(s){i||(D(e.$$.fragment,s),i=!0)},o(s){T(e.$$.fragment,s),i=!1},d(s){s&&j(t),se(e)}}}function vu(n){let t;const e=n[37].next,i=sn(e,n,n[36],fu),s=i||iI(n);return{c(){s&&s.c()},m(o,r){s&&s.m(o,r),t=!0},p(o,r){i?i.p&&(!t||r[0]&96|r[1]&32)&&rn(i,e,o,o[36],t?on(e,o[36],r,KC):an(o[36]),fu):s&&s.p&&(!t||r[0]&1060)&&s.p(o,t?r:[-1,-1])},i(o){t||(D(s,o),t=!0)},o(o){T(s,o),t=!1},d(o){s&&s.d(o)}}}function iI(n){let t,e,i;return e=new Wh({props:{direction:"next",disabled:!n[2]&&n[5]===n[10]-1}}),e.$on("click",n[14].showNextPage),{c(){t=x("div"),oe(e.$$.fragment),w(t,"class","sc-carousel__arrow-container svelte-sme1z4")},m(s,o){O(s,t,o),ne(e,t,null),i=!0},p(s,o){const r={};o[0]&1060&&(r.disabled=!s[2]&&s[5]===s[10]-1),e.$set(r)},i(s){i||(D(e.$$.fragment,s),i=!0)},o(s){T(e.$$.fragment,s),i=!1},d(s){s&&j(t),se(e)}}}function bu(n){let t;const e=n[37].dots,i=sn(e,n,n[36],uu),s=i||nI(n);return{c(){s&&s.c()},m(o,r){s&&s.m(o,r),t=!0},p(o,r){i?i.p&&(!t||r[0]&1120|r[1]&32)&&rn(i,e,o,o[36],t?on(e,o[36],r,qC):an(o[36]),uu):s&&s.p&&(!t||r[0]&1056)&&s.p(o,t?r:[-1,-1])},i(o){t||(D(s,o),t=!0)},o(o){T(s,o),t=!1},d(o){s&&s.d(o)}}}function nI(n){let t,e;return t=new ew({props:{pagesCount:n[10],currentPageIndex:n[5]}}),t.$on("pageChange",n[41]),{c(){oe(t.$$.fragment)},m(i,s){ne(t,i,s),e=!0},p(i,s){const o={};s[0]&1024&&(o.pagesCount=i[10]),s[0]&32&&(o.currentPageIndex=i[5]),t.$set(o)},i(i){e||(D(t.$$.fragment,i),e=!0)},o(i){T(t.$$.fragment,i),e=!1},d(i){se(t,i)}}}function sI(n){let t,e,i,s,o,r,a,l,c,d,h,f,m=n[1]&&pu(n);const A=n[37].default,p=sn(A,n,n[36],mu);let g=n[3]&&Au(n),v=n[1]&&vu(n),y=n[4]&&bu(n);return{c(){t=x("div"),e=x("div"),m&&m.c(),i=K(),s=x("div"),o=x("div"),p&&p.c(),a=K(),g&&g.c(),l=K(),v&&v.c(),c=K(),y&&y.c(),w(o,"class","sc-carousel__pages-container svelte-sme1z4"),S(o,"transform","translateX("+n[8]+"px)"),S(o,"transition-duration",n[9]+"ms"),S(o,"transition-timing-function",n[0]),w(s,"class","sc-carousel__pages-window svelte-sme1z4"),w(e,"class","sc-carousel__content-container svelte-sme1z4"),w(t,"class","sc-carousel__carousel-container svelte-sme1z4")},m(P,I){O(P,t,I),L(t,e),m&&m.m(e,null),L(e,i),L(e,s),L(s,o),p&&p.m(o,null),n[39](o),L(s,a),g&&g.m(s,null),n[40](s),L(e,l),v&&v.m(e,null),L(t,c),y&&y.m(t,null),d=!0,h||(f=[zt(r=pw.call(null,o,{thresholdProvider:n[38]})),be(o,"swipeStart",n[16]),be(o,"swipeMove",n[18]),be(o,"swipeEnd",n[19]),be(o,"swipeFailed",n[20]),be(o,"swipeThresholdReached",n[17]),zt(yw.call(null,s)),be(s,"hovered",n[21]),zt(kw.call(null,s)),be(s,"tapped",n[22])],h=!0)},p(P,I){P[1]?m?(m.p(P,I),I[0]&2&&D(m,1)):(m=pu(P),m.c(),D(m,1),m.m(e,i)):m&&(he(),T(m,1,1,()=>{m=null}),ue()),p&&p.p&&(!d||I[0]&96|I[1]&32)&&rn(p,A,P,P[36],d?on(A,P[36],I,$C):an(P[36]),mu),(!d||I[0]&256)&&S(o,"transform","translateX("+P[8]+"px)"),(!d||I[0]&512)&&S(o,"transition-duration",P[9]+"ms"),(!d||I[0]&1)&&S(o,"transition-timing-function",P[0]),r&&Ft(r.update)&&I[0]&2048&&r.update.call(null,{thresholdProvider:P[38]}),P[3]?g?(g.p(P,I),I[0]&8&&D(g,1)):(g=Au(P),g.c(),D(g,1),g.m(s,null)):g&&(he(),T(g,1,1,()=>{g=null}),ue()),P[1]?v?(v.p(P,I),I[0]&2&&D(v,1)):(v=vu(P),v.c(),D(v,1),v.m(e,null)):v&&(he(),T(v,1,1,()=>{v=null}),ue()),P[4]?y?(y.p(P,I),I[0]&16&&D(y,1)):(y=bu(P),y.c(),D(y,1),y.m(t,null)):y&&(he(),T(y,1,1,()=>{y=null}),ue())},i(P){d||(D(m),D(p,P),D(g),D(v),D(y),d=!0)},o(P){T(m),T(p,P),T(g),T(v),T(y),d=!1},d(P){P&&j(t),m&&m.d(),p&&p.d(P),n[39](null),g&&g.d(),n[40](null),v&&v.d(),y&&y.d(),h=!1,Xe(f)}}}function oI(n,t,e){let{$$slots:i={},$$scope:s}=t,o=[],r,a,l=0,c=0,d=1;const[{data:h,progressManager:f},m,A]=ZC((re,Me)=>{Kr({currentPageIndex:()=>e(5,r=Me),progressValue:()=>e(7,a=Me),offset:()=>e(8,l=Me),durationMs:()=>e(9,c=Me),pagesCount:()=>e(10,d=Me),loaded:()=>e(6,o=Me)})(re)}),p=Hs();let{timingFunction:g="ease-in-out"}=t,{arrows:v=!0}=t,{infinite:y=!0}=t,{initialPageIndex:P=0}=t,{duration:I=500}=t,{autoplay:E=!1}=t,{autoplayDuration:C=3e3}=t,{autoplayDirection:z=yi}=t,{pauseOnFocus:R=!1}=t,{autoplayProgressVisible:U=!1}=t,{dots:H=!0}=t,{swiping:N=!0}=t,{particlesToShow:F=1}=t,{particlesToScroll:Q=1}=t;function _(re,Me){return W(this,null,function*(){const _e=ss(Me,"animated",!0);if(typeof re!="number")throw new Error("pageIndex should be a number");yield m.showPage(re,{animated:_e})})}function Y(re){return W(this,null,function*(){const Me=ss(re,"animated",!0);yield m.showPrevPage({animated:Me})})}function Z(re){return W(this,null,function*(){const Me=ss(re,"animated",!0);yield m.showNextPage({animated:Me})})}let q=0,ee,fe;const de=zw(({width:re})=>{e(11,q=re),h.particleWidth=q/h.particlesToShow,jw({particlesContainerChildren:fe.children,particleWidth:h.particleWidth}),m.offsetPage({animated:!1})});function ke(){const{clonesToAppend:re,clonesToPrepend:Me}=Ow({clonesCountHead:h.clonesCountHead,clonesCountTail:h.clonesCountTail,particlesContainerChildren:fe.children});Bw({particlesContainer:fe,clonesToAppend:re,clonesToPrepend:Me})}gt(()=>{W(this,null,function*(){yield Ul(),fe&&ee&&(h.particlesCountWithoutClones=fe.children.length,yield Ul(),h.infinite&&ke(),h.particlesCount=fe.children.length,m.showPage(P,{animated:!1}),de.observe(ee))})}),Mt(()=>{de.disconnect(),f.reset()});function Pe(re){return W(this,null,function*(){yield m.showPage(re,{animated:!0})})}function we(){N&&(h.durationMs=0)}function Fe(re){return W(this,null,function*(){N&&(yield Kr({[yi]:m.showNextPage,[kn]:m.showPrevPage})(re.detail.direction))})}function Ce(re){N&&(h.offset+=re.detail.dx)}function Ze(){N&&m.showParticle(h.currentParticleIndex)}function te(){return W(this,null,function*(){N&&(yield m.offsetPage({animated:!0}))})}function ye(re){h.focused=re.detail.value}function ze(){m.toggleFocused()}function pe(){m.showPrevPage()}const Ke=()=>q/3;function rt(re){Ne[re?"unshift":"push"](()=>{fe=re,e(13,fe)})}function xe(re){Ne[re?"unshift":"push"](()=>{ee=re,e(12,ee)})}const tt=re=>Pe(re.detail);return n.$$set=re=>{"timingFunction"in re&&e(0,g=re.timingFunction),"arrows"in re&&e(1,v=re.arrows),"infinite"in re&&e(2,y=re.infinite),"initialPageIndex"in re&&e(24,P=re.initialPageIndex),"duration"in re&&e(25,I=re.duration),"autoplay"in re&&e(26,E=re.autoplay),"autoplayDuration"in re&&e(27,C=re.autoplayDuration),"autoplayDirection"in re&&e(28,z=re.autoplayDirection),"pauseOnFocus"in re&&e(29,R=re.pauseOnFocus),"autoplayProgressVisible"in re&&e(3,U=re.autoplayProgressVisible),"dots"in re&&e(4,H=re.dots),"swiping"in re&&e(30,N=re.swiping),"particlesToShow"in re&&e(31,F=re.particlesToShow),"particlesToScroll"in re&&e(32,Q=re.particlesToScroll),"$$scope"in re&&e(36,s=re.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&32&&p("pageChange",r),n.$$.dirty[0]&4&&(h.infinite=y),n.$$.dirty[0]&33554432&&(h.durationMsInit=I),n.$$.dirty[0]&67108864&&(h.autoplay=E),n.$$.dirty[0]&134217728&&(h.autoplayDuration=C),n.$$.dirty[0]&268435456&&(h.autoplayDirection=z),n.$$.dirty[0]&536870912&&(h.pauseOnFocus=R),n.$$.dirty[1]&1&&(h.particlesToShowInit=F),n.$$.dirty[1]&2&&(h.particlesToScrollInit=Q)},[g,v,y,U,H,r,o,a,l,c,d,q,ee,fe,m,Pe,we,Fe,Ce,Ze,te,ye,ze,pe,P,I,E,C,z,R,N,F,Q,_,Y,Z,s,i,Ke,rt,xe,tt]}class rI extends ce{constructor(t){super(),le(this,t,oI,sI,ae,{timingFunction:0,arrows:1,infinite:2,initialPageIndex:24,duration:25,autoplay:26,autoplayDuration:27,autoplayDirection:28,pauseOnFocus:29,autoplayProgressVisible:3,dots:4,swiping:30,particlesToShow:31,particlesToScroll:32,goTo:33,goToPrev:34,goToNext:35},JC,[-1,-1])}get goTo(){return this.$$.ctx[33]}get goToPrev(){return this.$$.ctx[34]}get goToNext(){return this.$$.ctx[35]}}function aI(n){me(n,"svelte-159ski6",".media-item.svelte-159ski6.svelte-159ski6{position:relative;height:100%}.media-content.svelte-159ski6.svelte-159ski6{position:relative;pointer-events:auto;width:100%;height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;-o-object-fit:inherit;object-fit:inherit}.media-content.showPlayButton.svelte-159ski6.svelte-159ski6{pointer-events:none}.video-icon.svelte-159ski6.svelte-159ski6{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-159ski6.svelte-159ski6{display:none;position:absolute;width:100%;height:100%;top:0;left:0;transform:translate3d(0, 0, 0)}.video-play-button-container.showPlayButton.svelte-159ski6.svelte-159ski6{pointer-events:none;display:block}.video-icon.svelte-159ski6.svelte-159ski6{pointer-events:auto}.video-icon.large.svelte-159ski6.svelte-159ski6{width:12.5rem;height:6.25rem}.video-icon.small.svelte-159ski6.svelte-159ski6{width:1.75rem;height:1.75rem}.video-icon.svelte-159ski6 .video-icon-img.svelte-159ski6{width:100%;height:100%;background-position:center center;background-size:contain;background-repeat:no-repeat}.video-icon.svelte-159ski6 .video-icon-img.canPlay.svelte-159ski6{cursor:pointer}")}function yu(n){let t;function e(o,r){if(o[2].type==="Image")return cI;if(o[2].type==="Video")return lI}let i=e(n),s=i&&i(n);return{c(){t=x("div"),s&&s.c(),w(t,"class","media-item svelte-159ski6"),w(t,"draggable","false")},m(o,r){O(o,t,r),s&&s.m(t,null)},p(o,r){i===(i=e(o))&&s?s.p(o,r):(s&&s.d(1),s=i&&i(o),s&&(s.c(),s.m(t,null)))},d(o){o&&j(t),s&&s.d()}}}function lI(n){let t,e,i,s,o,r;function a(d,h){return d[8]&&d[2].videoCoverUrl?hI:dI}let l=a(n),c=l(n);return{c(){c.c(),t=K(),e=x("div"),i=x("div"),s=x("div"),w(s,"class","video-icon-img svelte-159ski6"),S(s,"background-image","url("+n[21]()+")"),$(s,"canPlay",n[5]),w(i,"class","video-icon svelte-159ski6"),$(i,"large",n[4]==="large"),$(i,"small",n[4]==="small"),w(e,"class","video-play-button-container svelte-159ski6"),$(e,"showPlayButton",n[11])},m(d,h){c.m(d,h),O(d,t,h),O(d,e,h),L(e,i),L(i,s),o||(r=be(s,"click",n[22]),o=!0)},p(d,h){l===(l=a(d))&&c?c.p(d,h):(c.d(1),c=l(d),c&&(c.c(),c.m(t.parentNode,t))),h&8&&S(s,"background-image","url("+d[21]()+")"),h&32&&$(s,"canPlay",d[5]),h&16&&$(i,"large",d[4]==="large"),h&16&&$(i,"small",d[4]==="small"),h&2048&&$(e,"showPlayButton",d[11])},d(d){c.d(d),d&&j(t),d&&j(e),o=!1,r()}}}function cI(n){let t,e,i;return{c(){t=x("img"),w(t,"class","media-content svelte-159ski6"),et(t.src,e=n[2].url)||w(t,"src",e),w(t,"alt",i=n[2].name),w(t,"draggable",!1),S(t,"object-fit",n[7])},m(s,o){O(s,t,o)},p(s,o){o&4&&!et(t.src,e=s[2].url)&&w(t,"src",e),o&4&&i!==(i=s[2].name)&&w(t,"alt",i),o&128&&S(t,"object-fit",s[7])},d(s){s&&j(t)}}}function dI(n){let t,e,i,s,o,r;return{c(){t=x("video"),w(t,"class","media-content svelte-159ski6"),et(t.src,e=n[2].videoCoverUrl?n[2].url:n[2].url+"#t=0.1")||w(t,"src",e),w(t,"poster",i=n[2].videoCoverUrl),w(t,"preload",s=n[2].videoCoverUrl?"none":"auto"),w(t,"disablepictureinpicture",""),t.playsInline=!0,w(t,"paused",""),t.muted=!0,w(t,"draggable",!1),t.loop=!1,w(t,"crossorigin",""),t.autoplay=n[6],t.controls=!1,$(t,"showPlayButton",n[11]),S(t,"object-fit",n[7])},m(a,l){O(a,t,l),n[20](t),o||(r=[be(t,"play",n[15]),be(t,"pause",n[16]),be(t,"error",n[17]),be(t,"ended",n[18]),be(t,"click",n[19])],o=!0)},p(a,l){l&4&&!et(t.src,e=a[2].videoCoverUrl?a[2].url:a[2].url+"#t=0.1")&&w(t,"src",e),l&4&&i!==(i=a[2].videoCoverUrl)&&w(t,"poster",i),l&4&&s!==(s=a[2].videoCoverUrl?"none":"auto")&&w(t,"preload",s),l&64&&(t.autoplay=a[6]),l&2048&&$(t,"showPlayButton",a[11]),l&128&&S(t,"object-fit",a[7])},d(a){a&&j(t),n[20](null),o=!1,Xe(r)}}}function hI(n){let t,e,i;return{c(){t=x("img"),w(t,"class","media-content svelte-159ski6"),et(t.src,e=n[2].videoCoverUrl)||w(t,"src",e),w(t,"alt",i=n[2].name),w(t,"draggable",!1),S(t,"object-fit",n[7])},m(s,o){O(s,t,o)},p(s,o){o&4&&!et(t.src,e=s[2].videoCoverUrl)&&w(t,"src",e),o&4&&i!==(i=s[2].name)&&w(t,"alt",i),o&128&&S(t,"object-fit",s[7])},d(s){s&&j(t)}}}function uI(n){let t,e=n[2]&&yu(n);return{c(){e&&e.c(),t=Ie()},m(i,s){e&&e.m(i,s),O(i,t,s)},p(i,[s]){i[2]?e?e.p(i,s):(e=yu(i),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},i:J,o:J,d(i){e&&e.d(i),i&&j(t)}}}function fI(n,t,e){let i,s,{mediaInstance:o={videoInstance:void 0,paused:!0}}=t,{tag:r}=t,{media:a}=t,{playButtonIfNeed:l="withoutText"}=t,{playButtonSizeIfNeed:c="small"}=t,{canPlay:d=!0}=t,{autoplayVideo:h=!1}=t,{objectFit:f="fill"}=t,{disableVideoIfHavePoster:m=!1}=t,A=!0,p=!1;function g(){e(9,p=(a==null?void 0:a.type)==="Video"&&!!a.videoCoverUrl)}const v=ui("mediaStore"),y=ui("hooks"),P=()=>{p||i&&(e(10,i.muted=!0,i),i.play(),i.pause(),e(10,i.muted=!1,i),e(9,p=!0))};y.on("loadVideoFirstFrame",P),gt(()=>{v.subscribe(({currentMediaElement:F})=>{F!==i&&(i==null||i.pause())})});const I=F=>{e(11,A=!1),e(0,o.paused=!1,o),e(9,p=!0),i&&v.set({currentMediaElement:i}),y.emit("playStateChange",{event:F,state:"playing",tag:r,mediaInstance:i})},E=F=>{e(11,A=!0),e(0,o.paused=!0,o),y.emit("playStateChange",{event:F,state:"paused",tag:r,mediaInstance:i})},C=F=>{e(11,A=!0),e(0,o.paused=!0,o),y.emit("playStateChange",{event:F,state:"paused",tag:r,mediaInstance:i})},z=F=>{e(11,A=!0),e(0,o.paused=!0,o),y.emit("playStateChange",{event:F,state:"paused",tag:r,mediaInstance:i})},R=F=>{i&&i.pause()};function U(F){Ne[F?"unshift":"push"](()=>{o.videoInstance=F,e(0,o)})}const H=()=>l==="withText"?Rr:l==="withoutText"?Qr:l,N=F=>{d&&i&&(e(10,i.muted=!1,i),i.play())};return n.$$set=F=>{"mediaInstance"in F&&e(0,o=F.mediaInstance),"tag"in F&&e(1,r=F.tag),"media"in F&&e(2,a=F.media),"playButtonIfNeed"in F&&e(3,l=F.playButtonIfNeed),"playButtonSizeIfNeed"in F&&e(4,c=F.playButtonSizeIfNeed),"canPlay"in F&&e(5,d=F.canPlay),"autoplayVideo"in F&&e(6,h=F.autoplayVideo),"objectFit"in F&&e(7,f=F.objectFit),"disableVideoIfHavePoster"in F&&e(8,m=F.disableVideoIfHavePoster)},n.$$.update=()=>{if(n.$$.dirty&1&&e(10,i=o.videoInstance),n.$$.dirty&4&&e(14,s=a==null?void 0:a.url),n.$$.dirty&16384&&s&&g(),n.$$.dirty&1024&&i&&e(11,A=i.paused),n.$$.dirty&1540&&(a==null?void 0:a.type)==="Video"&&!p){const F=navigator.userAgent.toLowerCase().indexOf("micromessenger")!==-1,_=navigator.userAgent.toLowerCase().indexOf("iphone")!==-1&&F;i&&_&&i.paused&&(document.removeEventListener("WeixinJSBridgeReady",P),document.removeEventListener("touchstart",P),document.removeEventListener("click",P),document.addEventListener("WeixinJSBridgeReady",P),document.addEventListener("touchstart",P),document.addEventListener("click",P))}},[o,r,a,l,c,d,h,f,m,p,i,A,v,y,s,I,E,C,z,R,U,H,N]}class wu extends ce{constructor(t){super(),le(this,t,fI,uI,ae,{mediaInstance:0,tag:1,media:2,playButtonIfNeed:3,playButtonSizeIfNeed:4,canPlay:5,autoplayVideo:6,objectFit:7,disableVideoIfHavePoster:8},aI)}}function mI(n){me(n,"svelte-1mrbqlg",".media-list-wrapper.svelte-1mrbqlg.svelte-1mrbqlg{width:100%;height:100%;position:relative;overflow:hidden;border-radius:0.125rem}.media-list-wrapper.svelte-1mrbqlg .media-list.svelte-1mrbqlg{position:relative;pointer-events:auto;height:100%;left:50%;top:50%;transform:translate(-50%, -50%)}.media-list-wrapper.svelte-1mrbqlg .media-list.svelte-1mrbqlg .sc-carousel__carousel-container,.media-list-wrapper.svelte-1mrbqlg .media-list.svelte-1mrbqlg .sc-carousel__content-container{height:100%}")}function Cu(n,t,e){const i=n.slice();return i[28]=t[e],i[29]=t,i[30]=e,i}function Iu(n){let t,e,i,s,o,r,a;const l=[pI,gI],c=[];function d(h,f){return h[13]&&h[10].length>1?0:1}return i=d(n),s=c[i]=l[i](n),{c(){t=x("div"),e=x("div"),s.c(),w(e,"class","media-list svelte-1mrbqlg"),$(e,"carouselEnabled",n[13]),w(t,"class","media-list-wrapper svelte-1mrbqlg"),$(t,"unfolded",n[5])},m(h,f){O(h,t,f),L(t,e),c[i].m(e,null),a=!0},p(h,f){n=h;let m=i;i=d(n),i===m?c[i].p(n,f):(he(),T(c[m],1,1,()=>{c[m]=null}),ue(),s=c[i],s?s.p(n,f):(s=c[i]=l[i](n),s.c()),D(s,1),s.m(e,null)),(!a||f[0]&8192)&&$(e,"carouselEnabled",n[13]),(!a||f[0]&32)&&$(t,"unfolded",n[5])},i(h){a||(D(s),h&&We(()=>{a&&(r&&r.end(1),o=Si(t,sc,n[6]?{y:4,duration:n[4],delay:n[2],easing:ei}:void 0),o.start())}),a=!0)},o(h){T(s),o&&o.invalidate(),h&&(r=fn(t,sc,n[6]?{y:4,duration:n[4],delay:n[3],easing:ei}:void 0)),a=!1},d(h){h&&j(t),c[i].d(),h&&r&&r.end()}}}function gI(n){let t,e,i;const s=[{media:n[1][0]},{autoplayVideo:n[14]},n[7],{tag:n[0]}];function o(a){n[21](a)}let r={};for(let a=0;a<s.length;a+=1)r=st(r,s[a]);return n[8][0]!==void 0&&(r.mediaInstance=n[8][0]),t=new wu({props:r}),Ne.push(()=>gr(t,"mediaInstance",o)),{c(){oe(t.$$.fragment)},m(a,l){ne(t,a,l),i=!0},p(a,l){const c=l[0]&16515?dt(s,[l[0]&2&&{media:a[1][0]},l[0]&16384&&{autoplayVideo:a[14]},l[0]&128&&Xl(a[7]),l[0]&1&&{tag:a[0]}]):{};!e&&l[0]&256&&(e=!0,c.mediaInstance=a[8][0],cr(()=>e=!1)),t.$set(c)},i(a){i||(D(t.$$.fragment,a),i=!0)},o(a){T(t.$$.fragment,a),i=!1},d(a){se(t,a)}}}function pI(n){let t,e,i={dots:!1,arrows:!1,$$slots:{default:[AI]},$$scope:{ctx:n}};return t=new rI({props:i}),n[19](t),t.$on("pageChange",n[20]),{c(){oe(t.$$.fragment)},m(s,o){ne(t,s,o),e=!0},p(s,o){const r={};o[0]&1409|o[1]&1&&(r.$$scope={dirty:o,ctx:s}),t.$set(r)},i(s){e||(D(t.$$.fragment,s),e=!0)},o(s){T(t.$$.fragment,s),e=!1},d(s){n[19](null),se(t,s)}}}function Pu(n){let t,e,i;const s=[n[7],{media:n[28]},{tag:n[0]}];function o(a){n[18](a,n[30])}let r={};for(let a=0;a<s.length;a+=1)r=st(r,s[a]);return n[8][n[30]]!==void 0&&(r.mediaInstance=n[8][n[30]]),t=new wu({props:r}),Ne.push(()=>gr(t,"mediaInstance",o)),{c(){oe(t.$$.fragment)},m(a,l){ne(t,a,l),i=!0},p(a,l){n=a;const c=l[0]&1153?dt(s,[l[0]&128&&Xl(n[7]),l[0]&1024&&{media:n[28]},l[0]&1&&{tag:n[0]}]):{};!e&&l[0]&256&&(e=!0,c.mediaInstance=n[8][n[30]],cr(()=>e=!1)),t.$set(c)},i(a){i||(D(t.$$.fragment,a),i=!0)},o(a){T(t.$$.fragment,a),i=!1},d(a){se(t,a)}}}function AI(n){let t,e,i=n[10],s=[];for(let r=0;r<i.length;r+=1)s[r]=Pu(Cu(n,i,r));const o=r=>T(s[r],1,1,()=>{s[r]=null});return{c(){for(let r=0;r<s.length;r+=1)s[r].c();t=Ie()},m(r,a){for(let l=0;l<s.length;l+=1)s[l]&&s[l].m(r,a);O(r,t,a),e=!0},p(r,a){if(a[0]&1409){i=r[10];let l;for(l=0;l<i.length;l+=1){const c=Cu(r,i,l);s[l]?(s[l].p(c,a),D(s[l],1)):(s[l]=Pu(c),s[l].c(),D(s[l],1),s[l].m(t.parentNode,t))}for(he(),l=i.length;l<s.length;l+=1)o(l);ue()}},i(r){if(!e){for(let a=0;a<i.length;a+=1)D(s[a]);e=!0}},o(r){s=s.filter(Boolean);for(let a=0;a<s.length;a+=1)T(s[a]);e=!1},d(r){Ot(s,r),r&&j(t)}}}function vI(n){let t,e,i=n[5]&&Iu(n);return{c(){i&&i.c(),t=Ie()},m(s,o){i&&i.m(s,o),O(s,t,o),e=!0},p(s,o){s[5]?i?(i.p(s,o),o[0]&32&&D(i,1)):(i=Iu(s),i.c(),D(i,1),i.m(t.parentNode,t)):i&&(he(),T(i,1,1,()=>{i=null}),ue())},i(s){e||(D(i),e=!0)},o(s){T(i),e=!1},d(s){i&&i.d(s),s&&j(t)}}}function bI(n,t,e){let i,s,o,r,{tag:a}=t,{mediaData:l}=t,{inDelay:c=0}=t,{outDelay:d=0}=t,{duration:h=0}=t,{unfolded:f=!0}=t,{animation:m=!0}=t,{mediaItemConfig:A}=t,{enableCarousel:p=!0}=t,{autoplayConfig:g={}}=t;const{autoplayVideo:v=!1,autoplayCarousel:y=!0,autoplayVideoInCarousel:P=!1}=g;let I=[],E=0,C,z=null;const R=ui("hooks"),U=ui("mediaStore");function H(){const Y=I[E],Z=Y==null?void 0:Y.videoInstance;Z&&(Z.paused?(Z.muted=!1,Z.play()):Z.pause())}gt(()=>{R.on("click",Y=>{var Z,q,ee;(ee=(q=(Z=a.tag3DContentSvelte)==null?void 0:Z.css3DInstance)==null?void 0:q.css3DObject)!=null&&ee.opacityMesh&&Y.tag.id===a.id&&H()}),z=setInterval(()=>{r&&(C==null||C.goToNext())},3e3)}),Mt(()=>{clearInterval(z),R.off("click",H)});function N(Y,Z){n.$$.not_equal(I[Z],Y)&&(I[Z]=Y,e(8,I))}function F(Y){Ne[Y?"unshift":"push"](()=>{C=Y,e(12,C)})}const Q=Y=>{i||U.set({currentMediaElement:null}),e(11,E=Y.detail)};function _(Y){n.$$.not_equal(I[0],Y)&&(I[0]=Y,e(8,I))}return n.$$set=Y=>{"tag"in Y&&e(0,a=Y.tag),"mediaData"in Y&&e(1,l=Y.mediaData),"inDelay"in Y&&e(2,c=Y.inDelay),"outDelay"in Y&&e(3,d=Y.outDelay),"duration"in Y&&e(4,h=Y.duration),"unfolded"in Y&&e(5,f=Y.unfolded),"animation"in Y&&e(6,m=Y.animation),"mediaItemConfig"in Y&&e(7,A=Y.mediaItemConfig),"enableCarousel"in Y&&e(16,p=Y.enableCarousel),"autoplayConfig"in Y&&e(17,g=Y.autoplayConfig)},n.$$.update=()=>{n.$$.dirty[0]&256&&e(9,i=I.every(Y=>Y.paused)),n.$$.dirty[0]&65538&&e(13,s=p&&(l==null?void 0:l.length)>1),n.$$.dirty[0]&2&&e(10,o=l),n.$$.dirty[0]&1536&&(r=o.length>1&&y&&i)},[a,l,c,d,h,f,m,A,I,i,o,E,C,s,v,U,p,g,N,F,Q,_]}class ku extends ce{constructor(t){super(),le(this,t,bI,vI,ae,{tag:0,mediaData:1,inDelay:2,outDelay:3,duration:4,unfolded:5,animation:6,mediaItemConfig:7,enableCarousel:16,autoplayConfig:17},mI,[-1,-1])}}function yI(n){me(n,"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 Mu(n){let t,e,i,s,o,r,a,l;t=new Vt({props:{visible:n[3],left:61,bottom:57,width:2,blurRadius:150,spreadRadius:75}}),s=new Uy({props:{unfolded:n[3],outDelay:400}});let c=n[2]&&Eu(n),d=n[1]&&Du(n);return{c(){oe(t.$$.fragment),e=K(),i=x("div"),oe(s.$$.fragment),o=K(),c&&c.c(),r=K(),d&&d.c(),a=Ie(),w(i,"class","line svelte-1f7m1lj")},m(h,f){ne(t,h,f),O(h,e,f),O(h,i,f),ne(s,i,null),O(h,o,f),c&&c.m(h,f),O(h,r,f),d&&d.m(h,f),O(h,a,f),l=!0},p(h,f){const m={};f&8&&(m.visible=h[3]),t.$set(m);const A={};f&8&&(A.unfolded=h[3]),s.$set(A),h[2]?c?(c.p(h,f),f&4&&D(c,1)):(c=Eu(h),c.c(),D(c,1),c.m(r.parentNode,r)):c&&(he(),T(c,1,1,()=>{c=null}),ue()),h[1]?d?(d.p(h,f),f&2&&D(d,1)):(d=Du(h),d.c(),D(d,1),d.m(a.parentNode,a)):d&&(he(),T(d,1,1,()=>{d=null}),ue())},i(h){l||(D(t.$$.fragment,h),D(s.$$.fragment,h),D(c),D(d),l=!0)},o(h){T(t.$$.fragment,h),T(s.$$.fragment,h),T(c),T(d),l=!1},d(h){se(t,h),h&&j(e),h&&j(i),se(s),h&&j(o),c&&c.d(h),h&&j(r),d&&d.d(h),h&&j(a)}}}function Eu(n){let t,e,i;return e=new Th({props:{unfolded:n[3],content:n[2],inDelay:500}}),{c(){t=x("div"),oe(e.$$.fragment),w(t,"class","text svelte-1f7m1lj")},m(s,o){O(s,t,o),ne(e,t,null),i=!0},p(s,o){const r={};o&8&&(r.unfolded=s[3]),o&4&&(r.content=s[2]),e.$set(r)},i(s){i||(D(e.$$.fragment,s),i=!0)},o(s){T(e.$$.fragment,s),i=!1},d(s){s&&j(t),se(e)}}}function Du(n){let t,e,i;return e=new ku({props:{autoplayConfig:{autoplayCarousel:!1},unfolded:n[3],mediaData:n[1],tag:n[0],enableCarousel:!1,mediaItemConfig:{canPlay:!1,playButtonSizeIfNeed:"small",disableVideoIfHavePoster:!0},inDelay:500,duration:500}}),{c(){t=x("div"),oe(e.$$.fragment),w(t,"class","media-wrapper svelte-1f7m1lj")},m(s,o){O(s,t,o),ne(e,t,null),i=!0},p(s,o){const r={};o&8&&(r.unfolded=s[3]),o&2&&(r.mediaData=s[1]),o&1&&(r.tag=s[0]),e.$set(r)},i(s){i||(D(e.$$.fragment,s),i=!0)},o(s){T(e.$$.fragment,s),i=!1},d(s){s&&j(t),se(e)}}}function wI(n){let t,e,i=n[0].state&&Mu(n);return{c(){i&&i.c(),t=Ie()},m(s,o){i&&i.m(s,o),O(s,t,o),e=!0},p(s,[o]){s[0].state?i?(i.p(s,o),o&1&&D(i,1)):(i=Mu(s),i.c(),D(i,1),i.m(t.parentNode,t)):i&&(he(),T(i,1,1,()=>{i=null}),ue())},i(s){e||(D(i),e=!0)},o(s){T(i),e=!1},d(s){i&&i.d(s),s&&j(t)}}}function CI(n,t,e){let i,s,o,r,{tag:a}=t;return n.$$set=l=>{"tag"in l&&e(0,a=l.tag)},n.$$.update=()=>{var l,c,d;n.$$.dirty&1&&e(3,i=a.state?a.state.unfolded:!1),n.$$.dirty&1&&e(4,s=(c=(l=a.data.title)!=null?l:a.data.text)!=null?c:""),n.$$.dirty&16&&e(2,o=((d=s.length)!=null?d:0)>7?s.substring(0,6)+"...":s),n.$$.dirty&1&&e(1,r=a.data.mediaData)},[a,r,o,i,s]}class II extends ce{constructor(t){super(),le(this,t,CI,wI,ae,{tag:0},yI)}}function PI(n){me(n,"svelte-sezqcq",'@charset "UTF-8";.svelte-sezqcq.svelte-sezqcq{box-sizing:border-box}.marketing.svelte-sezqcq.svelte-sezqcq{transform:translateY(-100%)}.marketing.svelte-sezqcq .line.svelte-sezqcq{position:absolute;height:1.875rem;width:0.0625rem;left:50%;transform:translateX(-50%);background-color:white;bottom:0;transform-origin:bottom;transition:all 500ms}.marketing.svelte-sezqcq .content.svelte-sezqcq{position:relative;min-width:7.5rem;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-property:opacity, transform;transition-duration:500ms}.marketing.svelte-sezqcq .content .headerImage.svelte-sezqcq{position:absolute;width:100%;top:0.25rem;transform:translateY(-100%);border-top-left-radius:0.25rem;border-top-right-radius:0.25rem}.title-wrapper.svelte-sezqcq.svelte-sezqcq{position:relative;width:100%;height:1.125rem}.title-wrapper.svelte-sezqcq .title.svelte-sezqcq{border-radius:0.25rem;width:100%;padding-left:0.625rem;padding-right:0.625rem}.title-wrapper.svelte-sezqcq .title .text.svelte-sezqcq{display:block;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:0.75rem;font-weight:bold;line-height:1.125rem}.footer.svelte-sezqcq.svelte-sezqcq{position:relative;padding:0.5rem 0.625rem 0 0;width:100%;display:flex;align-items:center}.footer.svelte-sezqcq .goto-button.svelte-sezqcq{display:flex;align-self:flex-end;flex-wrap:wrap;align-items:center;overflow:hidden;height:0.875rem}.footer.svelte-sezqcq .goto-button .gap.svelte-sezqcq{height:100%;width:0.625rem}.footer.svelte-sezqcq .goto-button .text.svelte-sezqcq{display:block;height:100%;font-size:0.625rem}.footer.svelte-sezqcq .arrow-wrapper.svelte-sezqcq{height:0.875rem;display:flex;align-self:flex-end;flex-grow:0;flex-shrink:0;align-items:center;margin-left:0.25rem}.footer.svelte-sezqcq .arrow-wrapper svg.arrow.svelte-sezqcq{width:0.375rem;height:0.625rem}.footer.svelte-sezqcq .price.svelte-sezqcq{flex-shrink:0;margin-right:auto;white-space:nowrap;display:flex;align-items:baseline;margin-left:0.625rem}.footer.svelte-sezqcq .price .value.svelte-sezqcq{position:relative;font-size:0.875rem;line-height:1rem;font-family:TG-TYPE, PingFangSC, Segoe UI, Rototo, sans-serif;letter-spacing:0rem}.footer.svelte-sezqcq .price .unit.svelte-sezqcq{padding-left:0.125rem;font-size:0.625rem}.tags-wrapper.svelte-sezqcq.svelte-sezqcq{position:relative;overflow:hidden;height:1rem;margin-top:0.25rem}.tags-wrapper.svelte-sezqcq .tags.svelte-sezqcq{position:relative;display:inline-flex;max-width:100%;flex-wrap:wrap;padding-left:0.625rem;padding-right:0.375rem}.tags-wrapper.svelte-sezqcq .tags .tag.svelte-sezqcq{display:flex;align-items:center;justify-content:center;flex-shrink:0;flex-grow:0;font-size:0.625rem;height:1rem;margin-right:0.25rem;margin-bottom:0.625rem;padding:0 0.25rem;border-radius:0.125rem;max-width:100%;text-overflow:ellipsis;overflow:hidden}.marketing.light.svelte-sezqcq .content.svelte-sezqcq{background-color:white}.marketing.light.svelte-sezqcq .content .title-wrapper .title .text.svelte-sezqcq{color:rgba(0, 0, 0, 0.8)}.marketing.light.svelte-sezqcq .content .tags-wrapper .tags .primary-tag.svelte-sezqcq{background:rgba(234, 208, 154, 0.5);color:#946700}.marketing.light.svelte-sezqcq .content .tags-wrapper .tags .secondary-tag.svelte-sezqcq{background:rgba(0, 0, 0, 0.06);color:rgba(0, 0, 0, 0.5)}.marketing.light.svelte-sezqcq .content .footer.svelte-sezqcq{color:#946700;fill:#946700}.marketing.dark.svelte-sezqcq .content.svelte-sezqcq{background-color:rgba(0, 0, 0, 0.5)}.marketing.dark.svelte-sezqcq .content .title-wrapper .title .text.svelte-sezqcq{color:white}.marketing.dark.svelte-sezqcq .content .tags-wrapper .tags .primary-tag.svelte-sezqcq{background:rgba(234, 208, 154, 0.5);color:white}.marketing.dark.svelte-sezqcq .content .tags-wrapper .tags .secondary-tag.svelte-sezqcq{background:rgba(255, 255, 255, 0.15);color:rgba(255, 255, 255, 0.85)}.marketing.dark.svelte-sezqcq .content .footer.svelte-sezqcq{color:#ead09a;fill:#ead09a}.marketing.unfolded.svelte-sezqcq .line.svelte-sezqcq{transform:translateX(-50%) scale(1, 1)}.marketing.folded.svelte-sezqcq .line.svelte-sezqcq{transform:translateX(-50%) scale(1, 0);transition-timing-function:ease-in}.marketing.unfolded.svelte-sezqcq .content.svelte-sezqcq{opacity:1}.marketing.folded.svelte-sezqcq .content.svelte-sezqcq{opacity:0;transform:translateY(0.425rem);transition-timing-function:ease-in}')}function xu(n,t,e){const i=n.slice();return i[0]=t[e],i}function Su(n,t,e){const i=n.slice();return i[0]=t[e],i}function Lu(n){let t,e;return{c(){t=x("img"),w(t,"class","headerImage svelte-sezqcq"),et(t.src,e=n[3].headerPictureUrl)||w(t,"src",e),w(t,"alt","")},m(i,s){O(i,t,s)},p(i,s){s&8&&!et(t.src,e=i[3].headerPictureUrl)&&w(t,"src",e)},d(i){i&&j(t)}}}function Tu(n){let t,e,i,s,o,r=n[2]||[],a=[];for(let d=0;d<r.length;d+=1)a[d]=ju(Su(n,r,d));let l=n[5]||[],c=[];for(let d=0;d<l.length;d+=1)c[d]=zu(xu(n,l,d));return{c(){t=x("div"),e=x("div");for(let d=0;d<a.length;d+=1)a[d].c();i=K();for(let d=0;d<c.length;d+=1)c[d].c();w(e,"class","tags svelte-sezqcq"),w(t,"class","tags-wrapper svelte-sezqcq")},m(d,h){O(d,t,h),L(t,e);for(let f=0;f<a.length;f+=1)a[f]&&a[f].m(e,null);L(e,i);for(let f=0;f<c.length;f+=1)c[f]&&c[f].m(e,null);s||(o=[zt(mi.call(null,e)),be(e,"clientHeight",n[11])],s=!0)},p(d,h){if(h&4){r=d[2]||[];let f;for(f=0;f<r.length;f+=1){const m=Su(d,r,f);a[f]?a[f].p(m,h):(a[f]=ju(m),a[f].c(),a[f].m(e,i))}for(;f<a.length;f+=1)a[f].d(1);a.length=r.length}if(h&32){l=d[5]||[];let f;for(f=0;f<l.length;f+=1){const m=xu(d,l,f);c[f]?c[f].p(m,h):(c[f]=zu(m),c[f].c(),c[f].m(e,null))}for(;f<c.length;f+=1)c[f].d(1);c.length=l.length}},d(d){d&&j(t),Ot(a,d),Ot(c,d),s=!1,Xe(o)}}}function ju(n){let t,e=n[0]+"",i;return{c(){t=x("div"),i=De(e),w(t,"class","tag primary-tag svelte-sezqcq"),S(t,"min-width",sa)},m(s,o){O(s,t,o),L(t,i)},p(s,o){o&4&&e!==(e=s[0]+"")&&Se(i,e)},d(s){s&&j(t)}}}function zu(n){let t,e=n[0]+"",i;return{c(){t=x("div"),i=De(e),w(t,"class","tag secondary-tag svelte-sezqcq"),S(t,"min-width",sa)},m(s,o){O(s,t,o),L(t,i)},p(s,o){o&32&&e!==(e=s[0]+"")&&Se(i,e)},d(s){s&&j(t)}}}function Ou(n){let t,e,i=n[7]&&Bu(n),s=n[3].highlightText&&Ru(n);return{c(){t=x("div"),i&&i.c(),e=K(),s&&s.c(),w(t,"class","footer svelte-sezqcq")},m(o,r){O(o,t,r),i&&i.m(t,null),L(t,e),s&&s.m(t,null)},p(o,r){o[7]?i?i.p(o,r):(i=Bu(o),i.c(),i.m(t,e)):i&&(i.d(1),i=null),o[3].highlightText?s?s.p(o,r):(s=Ru(o),s.c(),s.m(t,null)):s&&(s.d(1),s=null)},d(o){o&&j(t),i&&i.d(),s&&s.d()}}}function Bu(n){let t,e,i=n[3].price.value+"",s,o,r=n[3].price.unit&&Vu(n);return{c(){t=x("div"),e=x("span"),s=De(i),o=K(),r&&r.c(),w(e,"class","value svelte-sezqcq"),w(t,"class","price svelte-sezqcq")},m(a,l){O(a,t,l),L(t,e),L(e,s),L(t,o),r&&r.m(t,null)},p(a,l){l&8&&i!==(i=a[3].price.value+"")&&Se(s,i),a[3].price.unit?r?r.p(a,l):(r=Vu(a),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(a){a&&j(t),r&&r.d()}}}function Vu(n){let t,e=n[3].price.unit+"",i;return{c(){t=x("span"),i=De(e),w(t,"class","unit svelte-sezqcq")},m(s,o){O(s,t,o),L(t,i)},p(s,o){o&8&&e!==(e=s[3].price.unit+"")&&Se(i,e)},d(s){s&&j(t)}}}function Ru(n){let t,e,i,s,o=n[3].highlightText+"",r,a,l;return{c(){t=x("div"),e=x("div"),i=K(),s=x("span"),r=De(o),a=K(),l=x("div"),l.innerHTML='<svg class="arrow svelte-sezqcq" viewBox="0 0 6 9"><g transform="translate(-3, -2)" fill-rule="nonzero" class="svelte-sezqcq"><path d="M4.43868724,2.12056563 C4.28121824,1.95989074 4.02582143,1.95979988 3.86824251,2.1203627 C3.72498894,2.26632889 3.71189225,2.49481723 3.82900374,2.65587166 L6.57092402,5.92894326 C6.72651763,6.11470411 6.72651763,6.38529589 6.57092402,6.57105674 L3.86804348,9.79798499 C3.72488984,9.94405307 3.71194952,10.1725507 3.8291712,10.3335217 L3.86824251,10.3796373 C4.01149607,10.5256035 4.23559087,10.5387981 4.39346025,10.4192733 L4.43868724,10.3794344 L8.1144599,6.5985342 C8.30312347,6.40447482 8.30312347,6.09552518 8.1144599,5.9014658 L4.43868724,2.12056563 Z" class="svelte-sezqcq"></path></g></svg>',w(e,"class","gap svelte-sezqcq"),w(s,"class","text svelte-sezqcq"),w(t,"class","goto-button goto-icon svelte-sezqcq"),w(l,"class","arrow-wrapper svelte-sezqcq")},m(c,d){O(c,t,d),L(t,e),L(t,i),L(t,s),L(s,r),O(c,a,d),O(c,l,d)},p(c,d){d&8&&o!==(o=c[3].highlightText+"")&&Se(r,o)},d(c){c&&j(t),c&&j(a),c&&j(l)}}}function kI(n){var I,E;let t,e,i,s,o,r,a,l,c,d,h=n[3].title+"",f,m,A,p,g;e=new Vt({props:{visible:n[4],outDelay:500,left:61,bottom:87,blurRadius:150,spreadRadius:75}});let v=n[3].headerPictureUrl&&Lu(n),y=((I=n[2].length)!=null?I:0)+((E=n[5].length)!=null?E:0)>0&&Tu(n),P=(n[7]||n[3].highlightText)&&Ou(n);return{c(){t=x("div"),oe(e.$$.fragment),i=K(),s=x("div"),o=K(),r=x("div"),v&&v.c(),a=K(),l=x("div"),c=x("div"),d=x("div"),f=De(h),m=K(),y&&y.c(),A=K(),P&&P.c(),w(s,"class","line svelte-sezqcq"),S(s,"transition-delay",n[4]?Io+"ms":Po+Gu-Qu-40+"ms"),w(d,"class","text svelte-sezqcq"),w(c,"class","title svelte-sezqcq"),w(l,"class","title-wrapper svelte-sezqcq"),w(r,"class","content svelte-sezqcq"),S(r,"max-width",Yt(n[9])),S(r,"transition-delay",n[4]?Io+Po+"ms":"0ms"),w(t,"class",p=Ge(`marketing ${n[6]}`)+" svelte-sezqcq"),$(t,"unfolded",n[4]),$(t,"folded",n[8])},m(C,z){O(C,t,z),ne(e,t,null),L(t,i),L(t,s),L(t,o),L(t,r),v&&v.m(r,null),L(r,a),L(r,l),L(l,c),L(c,d),L(d,f),L(r,m),y&&y.m(r,null),L(r,A),P&&P.m(r,null),g=!0},p(C,[z]){var U,H;const R={};z&16&&(R.visible=C[4]),e.$set(R),z&16&&S(s,"transition-delay",C[4]?Io+"ms":Po+Gu-Qu-40+"ms"),C[3].headerPictureUrl?v?v.p(C,z):(v=Lu(C),v.c(),v.m(r,a)):v&&(v.d(1),v=null),(!g||z&8)&&h!==(h=C[3].title+"")&&Se(f,h),((U=C[2].length)!=null?U:0)+((H=C[5].length)!=null?H:0)>0?y?y.p(C,z):(y=Tu(C),y.c(),y.m(r,A)):y&&(y.d(1),y=null),C[7]||C[3].highlightText?P?P.p(C,z):(P=Ou(C),P.c(),P.m(r,null)):P&&(P.d(1),P=null),z&16&&S(r,"transition-delay",C[4]?Io+Po+"ms":"0ms"),(!g||z&64&&p!==(p=Ge(`marketing ${C[6]}`)+" svelte-sezqcq"))&&w(t,"class",p),(!g||z&80)&&$(t,"unfolded",C[4]),(!g||z&320)&&$(t,"folded",C[8])},i(C){g||(D(e.$$.fragment,C),g=!0)},o(C){T(e.$$.fragment,C),g=!1},d(C){C&&j(t),se(e),v&&v.d(),y&&y.d(),P&&P.d()}}}const sa=40,Io=400,Qu=500,Po=180,Gu=500;function MI(n,t,e){let i,s,o,r,a,l,c,d,{tag:h}=t,f,m=(()=>{var g;const p=(g=h.data.limitWidth)!=null?g:!0;if(typeof p=="number")return p;if(p===!0)return 172})();const A=p=>{e(1,f=p.detail)};return n.$$set=p=>{"tag"in p&&e(0,h=p.tag)},n.$$.update=()=>{var p,g,v,y,P,I;n.$$.dirty&1&&e(4,i=(g=(p=h.state)==null?void 0:p.unfolded)!=null?g:!1),n.$$.dirty&16&&e(8,s=!i),n.$$.dirty&1&&e(3,o=h.data),n.$$.dirty&8&&e(7,r=jt((v=o.price)==null?void 0:v.value)&&((y=o.price)==null?void 0:y.value)!==""),n.$$.dirty&1&&e(6,a=h.data.theme||"light"),n.$$.dirty&1026&&f>40&&e(10,l=l-1),n.$$.dirty&1032&&e(2,c=((P=o.brandTags)==null?void 0:P.slice(0,l).filter(Boolean))||[]),n.$$.dirty&1036&&e(5,d=((I=o.tags)==null?void 0:I.slice(0,l-c.length).filter(Boolean))||[])},e(10,l=(m-20)/sa),[h,f,c,o,i,d,a,r,s,m,l,A]}class EI extends ce{constructor(t){super(),le(this,t,MI,kI,ae,{tag:0},PI)}}class DI extends Audio{constructor(e){super();u(this,"sharedAudioSrc");u(this,"sharedAudioPaused",!0);u(this,"sharedAudioCurrentTime",0);u(this,"tryplaying",!1);u(this,"audioInstance");u(this,"eventListenerDisposer");this.sharedAudioSrc=e}get paused(){var e;return(e=this.sharedAudioPaused)!=null?e:!0}get currentTime(){return this.sharedAudioCurrentTime}play(){return W(this,null,function*(){var i,s,o;if(this.tryplaying)return;this.tryplaying=!0,(!this.audioInstance||((i=this.audioInstance)==null?void 0:i.realSrc)!==this.sharedAudioSrc)&&(this.audioInstance=F1(this.sharedAudioSrc,{namespace:_r.PlayAudio})),(s=this.eventListenerDisposer)==null||s.call(this),this.eventListenerDisposer=this.addEventListeners(),this.audioInstance.currentTime=(o=this.currentTime)!=null?o:0;const e=this.audioInstance.currentTime!==this.currentTime;this.audioInstance.play().then(()=>{var r;this.audioInstance.muted=!1,e&&(this.audioInstance.currentTime=(r=this.currentTime)!=null?r:0),this.sharedAudioPaused=!1}).catch(r=>{var a;r.message==="The operation is not supported."?console.error("Error: 音频文件可能损坏或修改过文件后缀",r):console.error("Error: error playing media in Safari",r),this.endedHandler(),(a=this.onerror)==null||a.call(this,r)}).finally(()=>{this.tryplaying=!1})})}pause(e){var i;if(this.audioInstance&&!this.paused){if(this.sharedAudioPaused=!0,(i=this.eventListenerDisposer)==null||i.call(this),this.audioInstance.ended){this.endedHandler();return}this.audioInstance.paused||this.audioInstance.pause(),this.onpause(e!=null?e:new Event("pause")),this.clear()}}dispose(){var e;(e=this.eventListenerDisposer)==null||e.call(this),this.clear(),this.audioInstance=void 0}clear(){var e;(e=this.audioInstance)==null||e.clear()}endedHandler(e){var i,s;(i=this.onended)==null||i.call(this,e!=null?e:new Event("ended")),(s=this.eventListenerDisposer)==null||s.call(this),this.sharedAudioPaused=!0,this.sharedAudioCurrentTime=0,this.clear()}addEventListeners(){const e=this.audioInstance;if(!e)return;const i=f=>{var m;this.sharedAudioCurrentTime=e.currentTime,(m=this.ontimeupdate)==null||m.call(this,f)},s=f=>{var m;e.isBlankAudio||(this.sharedAudioPaused=!1,(m=this.onplay)==null||m.call(this,f))},o=f=>{this.pause(f)},r=f=>{this.endedHandler(f)},a=f=>{var m;this.sharedAudioPaused=!0,(m=this.onerror)==null||m.call(this,f)},l=f=>{var m;return(m=this.oncanplay)==null?void 0:m.call(this,f)},c=f=>{var m;return(m=this.oncanplaythrough)==null?void 0:m.call(this,f)},d=f=>{var m;return(m=this.onloadeddata)==null?void 0:m.call(this,f)},h=f=>{var m;return(m=this.onloadedmetadata)==null?void 0:m.call(this,f)};return e.addEventListener("timeupdate",i),e.addEventListener("play",s),e.addEventListener("pause",o),e.addEventListener("ended",r),e.addEventListener("error",a),e.addEventListener("canplay",l),e.addEventListener("canplaythrough",c),e.addEventListener("loadeddata",d),e.addEventListener("loadedmetadata",h),()=>{e.removeEventListener("timeupdate",i),e.removeEventListener("play",s),e.removeEventListener("pause",o),e.removeEventListener("ended",r),e.removeEventListener("error",a),e.removeEventListener("canplay",l),e.removeEventListener("canplaythrough",c),e.removeEventListener("loadeddata",d),e.removeEventListener("loadedmetadata",h)}}}function xI(n){me(n,"svelte-13e7hxv",".audio.svelte-13e7hxv{pointer-events:auto;cursor:pointer;width:100%;height:100%}")}function SI(n){let t,e,i,s;const o=n[8].default,r=sn(o,n,n[7],null);return{c(){t=x("div"),r&&r.c(),w(t,"class","audio svelte-13e7hxv"),w(t,"style",n[0])},m(a,l){O(a,t,l),r&&r.m(t,null),e=!0,i||(s=be(t,"click",Gl(n[1])),i=!0)},p(a,[l]){r&&r.p&&(!e||l&128)&&rn(r,o,a,a[7],e?on(o,a[7],l,null):an(a[7]),null),(!e||l&1)&&w(t,"style",a[0])},i(a){e||(D(r,a),e=!0)},o(a){T(r,a),e=!1},d(a){a&&j(t),r&&r.d(a),i=!1,s()}}}function LI(n,t,e){let{$$slots:i={},$$scope:s}=t,{url:o}=t,{enable:r=!0}=t,{style:a=""}=t,{hooksInfo:l}=t;const c=Hs(),d=ui("hooks"),h=ui("mediaStore");let f,m=!0;function A(){e(5,f.onplay=g=>{d.emit("playStateChange",V({event:g,state:"playing",mediaInstance:f},l)),c("play"),e(6,m=!1)},f),e(5,f.onpause=g=>{d.emit("playStateChange",V({event:g,state:"paused",mediaInstance:f},l)),c("pause"),e(6,m=!0)},f),e(5,f.onended=g=>{d.emit("playStateChange",V({event:g,state:"paused",mediaInstance:f},l)),c("pause"),e(6,m=!0)},f),e(5,f.onloadedmetadata=g=>{typeof f.duration=="number"&&!Number.isNaN(f.duration)&&c("duration",f.duration)},f),e(5,f.onerror=g=>{c("pause"),e(6,m=!0)},f),e(5,f.ontimeupdate=g=>{c("timeupdate",f.currentTime)},f)}h.subscribe(({currentMediaElement:g})=>{g!==f&&(m||f==null||f.pause())});function p(g){f&&(d.emit("click",V({event:g,target:"AudioTagPlayIcon",audioInstance:f},l)),h.set({currentMediaElement:f}),d.emit("playStateChange",V({event:g,state:f.paused?"playing":"paused",mediaInstance:f},l)),f.paused?f.play():f.pause())}return n.$$set=g=>{"url"in g&&e(2,o=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,s=g.$$scope)},n.$$.update=()=>{n.$$.dirty&4&&(o||c("duration",0)),n.$$.dirty&36&&(f==null||f.dispose(),e(5,f=new DI(o)),c("audioRef",f),setTimeout(()=>c("audioRef",f),200),A()),n.$$.dirty&40&&(r||f==null||f.pause()),n.$$.dirty&72&&c(r&&!m?"play":"pause")},[a,p,o,r,l,f,m,s,i]}let Nu=class extends ce{constructor(t){super(),le(this,t,LI,SI,ae,{url:2,enable:3,style:0,hooksInfo:4},xI)}};function TI(n){me(n,"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 Fu(n){let t,e;return t=new Vt({props:{center:!0,blurRadius:12,spreadRadius:5}}),{c(){oe(t.$$.fragment)},m(i,s){ne(t,i,s),e=!0},i(i){e||(D(t.$$.fragment,i),e=!0)},o(i){T(t.$$.fragment,i),e=!1},d(i){se(t,i)}}}function jI(n){let t,e,i,s,o,r=n[1]&&Fu();return{c(){t=x("div"),r&&r.c(),e=K(),i=x("div"),s=x("div"),s.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>',w(s,"class","sound-wave__container svelte-srt2pi"),w(i,"class","audio-icon svelte-srt2pi"),$(i,"playing",n[0]),w(t,"class","audio-icon__wrapper svelte-srt2pi"),w(t,"style",n[2]),S(t,"width",n[5]),S(t,"height",n[5])},m(a,l){O(a,t,l),r&&r.m(t,null),L(t,e),L(t,i),L(i,s),n[7](s),n[8](t),o=!0},p(a,[l]){a[1]?r?l&2&&D(r,1):(r=Fu(),r.c(),D(r,1),r.m(t,e)):r&&(he(),T(r,1,1,()=>{r=null}),ue()),(!o||l&1)&&$(i,"playing",a[0]),(!o||l&4)&&w(t,"style",a[2]);const c=l&4;(c||l&36)&&S(t,"width",a[5]),(c||l&36)&&S(t,"height",a[5])},i(a){o||(D(r),o=!0)},o(a){T(r),o=!1},d(a){a&&j(t),r&&r.d(),n[7](null),n[8](null)}}}function zI(n,t,e){let i,{playing:s}=t,{shadow:o=!1}=t,{style:r=null}=t,{width:a="100%"}=t,l,c;function d(f){Ne[f?"unshift":"push"](()=>{c=f,e(4,c)})}function h(f){Ne[f?"unshift":"push"](()=>{l=f,e(3,l)})}return n.$$set=f=>{"playing"in f&&e(0,s=f.playing),"shadow"in f&&e(1,o=f.shadow),"style"in f&&e(2,r=f.style),"width"in f&&e(6,a=f.width)},n.$$.update=()=>{n.$$.dirty&64&&e(5,i=typeof a=="number"?Yt(a):a)},[s,o,r,l,c,i,a,d,h]}class _u extends ce{constructor(t){super(),le(this,t,zI,jI,ae,{playing:0,shadow:1,style:2,width:6},TI)}}function OI(n){me(n,"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 Hu(n){var g,v;let t,e,i,s,o,r,a,l,c,d,h,f,m,A;e=new Vt({props:{visible:n[6],left:n[3]/2+"px",bottom:12,width:2,blurRadius:120,spreadRadius:60}});let p=n[6]&&Wu(n);return c=new Bh({props:{visible:n[6],textUnfolded:n[1],content:n[5]}}),h=new Yr({props:{unfolded:n[6],length:n[3],outDelay:n[4]+20*Math.min((v=(g=n[5])==null?void 0:g.length)!=null?v:10,15),useLinearColor:!0}}),{c(){t=x("div"),oe(e.$$.fragment),i=K(),s=x("div"),o=x("div"),r=x("div"),p&&p.c(),a=K(),l=x("div"),oe(c.$$.fragment),d=K(),oe(h.$$.fragment),w(r,"class","audio-icon svelte-1s6gk4a"),S(l,"display","inline-block"),w(o,"class","wrapper svelte-1s6gk4a"),w(s,"class","content svelte-1s6gk4a"),w(t,"class","audio-tag svelte-1s6gk4a"),$(t,"unfolded",n[6])},m(y,P){O(y,t,P),ne(e,t,null),L(t,i),L(t,s),L(s,o),L(o,r),p&&p.m(r,null),L(o,a),L(o,l),ne(c,l,null),L(t,d),ne(h,t,null),f=!0,m||(A=[be(l,"click",n[7]),zt(mi.call(null,l)),be(l,"clientWidth",n[12])],m=!0)},p(y,P){var z,R;const I={};P&64&&(I.visible=y[6]),P&8&&(I.left=y[3]/2+"px"),e.$set(I),y[6]?p?(p.p(y,P),P&64&&D(p,1)):(p=Wu(y),p.c(),D(p,1),p.m(r,null)):p&&(he(),T(p,1,1,()=>{p=null}),ue());const E={};P&64&&(E.visible=y[6]),P&2&&(E.textUnfolded=y[1]),P&32&&(E.content=y[5]),c.$set(E);const C={};P&64&&(C.unfolded=y[6]),P&8&&(C.length=y[3]),P&48&&(C.outDelay=y[4]+20*Math.min((R=(z=y[5])==null?void 0:z.length)!=null?R:10,15)),h.$set(C),(!f||P&64)&&$(t,"unfolded",y[6])},i(y){f||(D(e.$$.fragment,y),D(p),D(c.$$.fragment,y),D(h.$$.fragment,y),f=!0)},o(y){T(e.$$.fragment,y),T(p),T(c.$$.fragment,y),T(h.$$.fragment,y),f=!1},d(y){y&&j(t),se(e),p&&p.d(),se(c),se(h),m=!1,Xe(A)}}}function Wu(n){let t,e,i,s,o,r,a;return e=new Vt({props:{center:!0,blurRadius:15,spreadRadius:6}}),s=new Nu({props:{enable:n[6],url:n[0].data.audioUrl,hooksInfo:{tag:n[0]},$$slots:{default:[BI]},$$scope:{ctx:n}}}),s.$on("play",n[8]),s.$on("pause",n[9]),s.$on("error",n[10]),s.$on("audioRef",n[11]),{c(){t=x("div"),oe(e.$$.fragment),i=K(),oe(s.$$.fragment),w(t,"class","audio svelte-1s6gk4a")},m(l,c){O(l,t,c),ne(e,t,null),L(t,i),ne(s,t,null),a=!0},p(l,c){n=l;const d={};c&64&&(d.enable=n[6]),c&1&&(d.url=n[0].data.audioUrl),c&1&&(d.hooksInfo={tag:n[0]}),c&8196&&(d.$$scope={dirty:c,ctx:n}),s.$set(d)},i(l){a||(D(e.$$.fragment,l),D(s.$$.fragment,l),l&&We(()=>{a&&(r&&r.end(1),o=Si(t,ot,{duration:1e3,delay:0,easing:gn}),o.start())}),a=!0)},o(l){var c,d;T(e.$$.fragment,l),T(s.$$.fragment,l),o&&o.invalidate(),l&&(r=fn(t,ot,{duration:1e3,delay:20*Math.min((d=(c=n[5])==null?void 0:c.length)!=null?d:10,15),easing:gn})),a=!1},d(l){l&&j(t),se(e),se(s),l&&r&&r.end()}}}function BI(n){let t,e,i;return e=new _u({props:{playing:n[2]}}),{c(){t=x("div"),oe(e.$$.fragment),w(t,"class","audio-icon__wrapper svelte-1s6gk4a")},m(s,o){O(s,t,o),ne(e,t,null),i=!0},p(s,o){const r={};o&4&&(r.playing=s[2]),e.$set(r)},i(s){i||(D(e.$$.fragment,s),i=!0)},o(s){T(e.$$.fragment,s),i=!1},d(s){s&&j(t),se(e)}}}function VI(n){let t,e,i=n[0].state&&Hu(n);return{c(){i&&i.c(),t=Ie()},m(s,o){i&&i.m(s,o),O(s,t,o),e=!0},p(s,[o]){s[0].state?i?(i.p(s,o),o&1&&D(i,1)):(i=Hu(s),i.c(),D(i,1),i.m(t.parentNode,t)):i&&(he(),T(i,1,1,()=>{i=null}),ue())},i(s){e||(D(i),e=!0)},o(s){T(i),e=!1},d(s){i&&i.d(s),s&&j(t)}}}function RI(n,t,e){let i,s,o,{tag:r}=t,a=!1,l=!1,c;function d(){e(1,a=!a)}const h=()=>{e(2,l=!0)},f=()=>{e(2,l=!1)},m=()=>{e(2,l=!1)};function A(g){cn.call(this,n,g)}const p=g=>{e(3,c=g.detail)};return n.$$set=g=>{"tag"in g&&e(0,r=g.tag)},n.$$.update=()=>{var g,v,y;n.$$.dirty&1&&e(6,i=!!((g=r.state)!=null&&g.unfolded)),n.$$.dirty&1&&e(5,s=(y=(v=r.data.title)!=null?v:r.data.text)!=null?y:""),n.$$.dirty&2&&e(4,o=a?450:0)},[r,a,l,c,o,s,i,d,h,f,m,A,p]}class QI extends ce{constructor(t){super(),le(this,t,RI,VI,ae,{tag:0},OI)}}function GI(n){me(n,"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 Uu(n){let t,e,i,s;return i=new Nu({props:{style:"width: max-content; height: max-content;",enable:n[0].state.visible,url:n[0].data.audioUrl,hooksInfo:{tag:n[0]},$$slots:{default:[FI]},$$scope:{ctx:n}}}),i.$on("play",n[6]),i.$on("pause",n[7]),i.$on("error",n[8]),i.$on("timeupdate",n[9]),i.$on("duration",n[10]),i.$on("audioRef",n[11]),{c(){t=x("div"),e=x("div"),oe(i.$$.fragment),w(e,"class","audio-tag svelte-58hfjf"),S(e,"background-color",n[4].bgColor),S(e,"color",n[4].fontColor),w(t,"class","audio-tag__wrapper svelte-58hfjf")},m(o,r){O(o,t,r),L(t,e),ne(i,e,null),s=!0},p(o,r){const a={};r&1&&(a.enable=o[0].state.visible),r&1&&(a.url=o[0].data.audioUrl),r&1&&(a.hooksInfo={tag:o[0]}),r&8232&&(a.$$scope={dirty:r,ctx:o}),i.$set(a),r&16&&S(e,"background-color",o[4].bgColor),r&16&&S(e,"color",o[4].fontColor)},i(o){s||(D(i.$$.fragment,o),s=!0)},o(o){T(i.$$.fragment,o),s=!1},d(o){o&&j(t),se(i)}}}function NI(n){let t;return{c(){t=De(n[5])},m(e,i){O(e,t,i)},p(e,i){i&32&&Se(t,e[5])},d(e){e&&j(t)}}}function FI(n){let t,e,i,s,o,r,a;return i=new _u({props:{playing:n[3]}}),r=new Xr({props:{maxWidth:72,maxLine:1,$$slots:{default:[NI]},$$scope:{ctx:n}}}),{c(){t=x("div"),e=x("div"),oe(i.$$.fragment),s=K(),o=x("div"),oe(r.$$.fragment),w(e,"class","audio-icon__wrapper svelte-58hfjf"),w(o,"class","text svelte-58hfjf"),w(t,"class","audio__inner svelte-58hfjf")},m(l,c){O(l,t,c),L(t,e),ne(i,e,null),L(t,s),L(t,o),ne(r,o,null),a=!0},p(l,c){const d={};c&8&&(d.playing=l[3]),i.$set(d);const h={};c&8224&&(h.$$scope={dirty:c,ctx:l}),r.$set(h)},i(l){a||(D(i.$$.fragment,l),D(r.$$.fragment,l),a=!0)},o(l){T(i.$$.fragment,l),T(r.$$.fragment,l),a=!1},d(l){l&&j(t),se(i),se(r)}}}function _I(n){let t,e,i=n[0].state&&Uu(n);return{c(){i&&i.c(),t=Ie()},m(s,o){i&&i.m(s,o),O(s,t,o),e=!0},p(s,[o]){s[0].state?i?(i.p(s,o),o&1&&D(i,1)):(i=Uu(s),i.c(),D(i,1),i.m(t.parentNode,t)):i&&(he(),T(i,1,1,()=>{i=null}),ue())},i(s){e||(D(i),e=!0)},o(s){T(i),e=!1},d(s){i&&i.d(s),s&&j(t)}}}function HI(n,t,e){let i,s,{tag:o}=t;const r={light:{bgColor:"rgba(255, 255, 255, 0.3)",fontColor:"rgba(0, 0, 0, 0.6)"},dark:{bgColor:"rgba(0, 0, 0, 0.3)",fontColor:"white"}};let a=0,l=0,c=!1;const d=()=>{e(3,c=!0)},h=()=>{e(3,c=!1)},f=()=>{e(3,c=!1)},m=g=>{e(1,a=g.detail)},A=g=>{e(2,l=g.detail)};function p(g){cn.call(this,n,g)}return n.$$set=g=>{"tag"in g&&e(0,o=g.tag)},n.$$.update=()=>{var g,v,y;n.$$.dirty&1&&e(5,i=(v=(g=o.data.title)!=null?g:o.data.text)!=null?v:""),n.$$.dirty&1&&e(4,s=(y=r[o.data.theme||"light"])!=null?y:r.light)},[o,a,l,c,s,i,d,h,f,m,A,p]}class WI extends ce{constructor(t){super(),le(this,t,HI,_I,ae,{tag:0},GI)}}function UI(n){let t,e;return t=new WI({props:{tag:n[0]}}),t.$on("audioRef",n[2]),{c(){oe(t.$$.fragment)},m(i,s){ne(t,i,s),e=!0},p(i,s){const o={};s&1&&(o.tag=i[0]),t.$set(o)},i(i){e||(D(t.$$.fragment,i),e=!0)},o(i){T(t.$$.fragment,i),e=!1},d(i){se(t,i)}}}function YI(n){let t,e;return t=new QI({props:{tag:n[0]}}),t.$on("audioRef",n[2]),{c(){oe(t.$$.fragment)},m(i,s){ne(t,i,s),e=!0},p(i,s){const o={};s&1&&(o.tag=i[0]),t.$set(o)},i(i){e||(D(t.$$.fragment,i),e=!0)},o(i){T(t.$$.fragment,i),e=!1},d(i){se(t,i)}}}function XI(n){let t,e,i,s;const o=[YI,UI],r=[];function a(l,c){return l[1]==="line"?0:l[1]==="plane"?1:-1}return~(t=a(n))&&(e=r[t]=o[t](n)),{c(){e&&e.c(),i=Ie()},m(l,c){~t&&r[t].m(l,c),O(l,i,c),s=!0},p(l,[c]){let d=t;t=a(l),t===d?~t&&r[t].p(l,c):(e&&(he(),T(r[d],1,1,()=>{r[d]=null}),ue()),~t?(e=r[t],e?e.p(l,c):(e=r[t]=o[t](l),e.c()),D(e,1),e.m(i.parentNode,i)):e=null)},i(l){s||(D(e),s=!0)},o(l){T(e),s=!1},d(l){~t&&r[t].d(l),l&&j(i)}}}function ZI(n,t,e){let i,{tag:s}=t,o;function r(a){o=a.detail}return s.play=()=>o.play(),s.pause=()=>o.pause(),n.$$set=a=>{"tag"in a&&e(0,s=a.tag)},n.$$.update=()=>{var a;n.$$.dirty&1&&e(1,i=(a=s.data.appearance)!=null?a:"line")},[s,i,r]}class JI extends ce{constructor(t){super(),le(this,t,ZI,XI,ae,{tag:0})}}function qI(n){me(n,"svelte-10cw0el",".media-wrapper.svelte-10cw0el{position:absolute;width:100%;height:100%}")}function Yu(n){var s;let t,e,i;return e=new ku({props:{mediaItemConfig:{canPlay:!0,playButtonSizeIfNeed:"large",playButtonIfNeed:(s=n[4])!=null?s:"withText",disableVideoIfHavePoster:!1,objectFit:n[2]},unfolded:n[6],mediaData:n[5],enableCarousel:n[1],autoplayConfig:n[3],tag:n[0],inDelay:500,duration:500}}),{c(){t=x("div"),oe(e.$$.fragment),w(t,"class","media-wrapper svelte-10cw0el")},m(o,r){O(o,t,r),ne(e,t,null),i=!0},p(o,r){var l;const a={};r&20&&(a.mediaItemConfig={canPlay:!0,playButtonSizeIfNeed:"large",playButtonIfNeed:(l=o[4])!=null?l:"withText",disableVideoIfHavePoster:!1,objectFit:o[2]}),r&64&&(a.unfolded=o[6]),r&32&&(a.mediaData=o[5]),r&2&&(a.enableCarousel=o[1]),r&8&&(a.autoplayConfig=o[3]),r&1&&(a.tag=o[0]),e.$set(a)},i(o){i||(D(e.$$.fragment,o),i=!0)},o(o){T(e.$$.fragment,o),i=!1},d(o){o&&j(t),se(e)}}}function KI(n){let t,e,i=n[0].state&&n[5]&&Yu(n);return{c(){i&&i.c(),t=Ie()},m(s,o){i&&i.m(s,o),O(s,t,o),e=!0},p(s,[o]){s[0].state&&s[5]?i?(i.p(s,o),o&33&&D(i,1)):(i=Yu(s),i.c(),D(i,1),i.m(t.parentNode,t)):i&&(he(),T(i,1,1,()=>{i=null}),ue())},i(s){e||(D(i),e=!0)},o(s){T(i),e=!1},d(s){i&&i.d(s),s&&j(t)}}}function $I(n,t,e){let i,s,o,r,a,l,{tag:c}=t;return n.$$set=d=>{"tag"in d&&e(0,c=d.tag)},n.$$.update=()=>{var d,h;n.$$.dirty&1&&e(6,i=c.state?c.state.unfolded:!1),n.$$.dirty&1&&e(5,s=c.data.mediaData),n.$$.dirty&1&&e(1,o=c.data.enableCarousel),n.$$.dirty&1&&e(4,r=c.data.playIcon),n.$$.dirty&3&&e(3,a=(d=c.data.autoplayConfig)!=null?d:{autoplay:o!=null?o:!0,autoplayVideo:!0}),n.$$.dirty&1&&e(2,l=(h=c.data.objectFit)!=null?h:(()=>c.data.adaptationMode==="stretch"?"fill":c.data.adaptationMode==="proportional"?"contain":void 0)())},[c,o,l,a,r,s,i]}class eP extends ce{constructor(t){super(),le(this,t,$I,KI,ae,{tag:0},qI)}}function Xu(n){return W(this,null,function*(){return new Promise((t,e)=>{if(!n){e(Error("url is empty"));return}const i=new Image;i.src=n,i.onload=()=>t({width:i.width,height:i.height}),i.onerror=e})})}function tP(n){return W(this,null,function*(){const{url:t,ratio:e=3}=n;n.ratio||console.warn("Tag icon ratio is not set, default is 3");const{width:i,height:s}=yield Xu(t);return ge(V({},n),{width:i/e,height:s/e})})}function iP(n){return W(this,null,function*(){const{steps:t,url:e,ratio:i=3,fps:s=24}=n;if(!t)throw new Error("KeyframeIcon requires steps");const{width:o,height:r}=yield Xu(e),a=o/i,l=r/i,c=a/t,d=l,h=1/s*t+"s";return ge(V({},n),{width:c,height:d,duration:h})})}function nP(n){me(n,"svelte-316sq3","@keyframes svelte-316sq3-sprites-animation{0%{background-position:0 0}100%{background-position:100% 0}}.icon-image.svelte-316sq3{display:block;width:auto}.icon-keyframe.svelte-316sq3{background-repeat:no-repeat;background-size:auto 100%;animation-direction:normal;animation-iteration-count:infinite;animation-name:svelte-316sq3-sprites-animation;animation-delay:0}")}function Zu(n){n[1]=n[19].width}function Ju(n){n[1]=n[19].width,n[16]=n[19].height,n[17]=n[19].steps,n[18]=n[19].duration}function qu(n){let t,e,i,s=n[0]&&Ku();function o(l,c){return l[8]?oP:sP}let r=o(n),a=r(n);return{c(){t=x("div"),s&&s.c(),e=K(),a.c(),w(t,"class","icon"),S(t,"width",n[1])},m(l,c){O(l,t,c),s&&s.m(t,null),L(t,e),a.m(t,null),i=!0},p(l,c){l[0]?s?c&1&&D(s,1):(s=Ku(),s.c(),D(s,1),s.m(t,e)):s&&(he(),T(s,1,1,()=>{s=null}),ue()),r===(r=o(l))&&a?a.p(l,c):(a.d(1),a=r(l),a&&(a.c(),a.m(t,null))),c&2&&S(t,"width",l[1])},i(l){i||(D(s),i=!0)},o(l){T(s),i=!1},d(l){l&&j(t),s&&s.d(),a.d()}}}function Ku(n){let t,e;return t=new Vt({props:{center:!0,blurRadius:24,spreadRadius:16}}),{c(){oe(t.$$.fragment)},m(i,s){ne(t,i,s),e=!0},i(i){e||(D(t.$$.fragment,i),e=!0)},o(i){T(t.$$.fragment,i),e=!1},d(i){se(t,i)}}}function sP(n){let t,e,i={ctx:n,current:null,token:null,hasCatch:!1,pending:lP,then:aP,catch:rP,value:19};return Us(e=n[11](He({url:n[7],ratio:n[5]})),i),{c(){t=Ie(),i.block.c()},m(s,o){O(s,t,o),i.block.m(s,i.anchor=o),i.mount=()=>t.parentNode,i.anchor=t},p(s,o){n=s,i.ctx=n,o&160&&e!==(e=n[11](He({url:n[7],ratio:n[5]})))&&Us(e,i)||Yl(i,n,o)},d(s){s&&j(t),i.block.d(s),i.token=null,i=null}}}function oP(n){let t,e,i={ctx:n,current:null,token:null,hasCatch:!1,pending:hP,then:dP,catch:cP,value:19};return Us(e=n[10](He({url:n[7],steps:n[2],fps:n[6],ratio:n[5]})),i),{c(){t=Ie(),i.block.c()},m(s,o){O(s,t,o),i.block.m(s,i.anchor=o),i.mount=()=>t.parentNode,i.anchor=t},p(s,o){n=s,i.ctx=n,o&228&&e!==(e=n[10](He({url:n[7],steps:n[2],fps:n[6],ratio:n[5]})))&&Us(e,i)||Yl(i,n,o)},d(s){s&&j(t),i.block.d(s),i.token=null,i=null}}}function rP(n){return{c:J,m:J,p:J,d:J}}function aP(n){Zu(n);let t,e;return{c(){t=x("img"),w(t,"alt","tag-icon"),w(t,"class","icon-image svelte-316sq3"),et(t.src,e=n[7])||w(t,"src",e),S(t,"width",Yt(Dn({originWidth:n[1],scale:n[4],wantedWidth:n[3]}).width))},m(i,s){O(i,t,s)},p(i,s){Zu(i),s&128&&!et(t.src,e=i[7])&&w(t,"src",e),s&184&&S(t,"width",Yt(Dn({originWidth:i[1],scale:i[4],wantedWidth:i[3]}).width))},d(i){i&&j(t)}}}function lP(n){return{c:J,m:J,p:J,d:J}}function cP(n){return{c:J,m:J,p:J,d:J}}function dP(n){Ju(n);let t,e=`url(${n[7]})`,i=`steps(${n[17]-1})`;return{c(){t=x("div"),w(t,"class","icon-keyframe svelte-316sq3"),S(t,"width",Yt(Dn({originWidth:n[1],originHeight:n[16],scale:n[4],wantedWidth:n[3]}).width)),S(t,"height",Yt(Dn({originWidth:n[1],originHeight:n[16],scale:n[4],wantedWidth:n[3]}).height)),S(t,"background-image",e),S(t,"animation-duration",n[18]),S(t,"animation-timing-function",i)},m(s,o){O(s,t,o)},p(s,o){Ju(s),o&252&&S(t,"width",Yt(Dn({originWidth:s[1],originHeight:s[16],scale:s[4],wantedWidth:s[3]}).width)),o&252&&S(t,"height",Yt(Dn({originWidth:s[1],originHeight:s[16],scale:s[4],wantedWidth:s[3]}).height)),o&128&&e!==(e=`url(${s[7]})`)&&S(t,"background-image",e),o&228&&S(t,"animation-duration",s[18]),o&228&&i!==(i=`steps(${s[17]-1})`)&&S(t,"animation-timing-function",i)},d(s){s&&j(t)}}}function hP(n){return{c:J,m:J,p:J,d:J}}function uP(n){let t,e,i=n[9]&&qu(n);return{c(){i&&i.c(),t=Ie()},m(s,o){i&&i.m(s,o),O(s,t,o),e=!0},p(s,[o]){s[9]?i?(i.p(s,o),o&512&&D(i,1)):(i=qu(s),i.c(),D(i,1),i.m(t.parentNode,t)):i&&(he(),T(i,1,1,()=>{i=null}),ue())},i(s){e||(D(i),e=!0)},o(s){T(i),e=!1},d(s){i&&i.d(s),s&&j(t)}}}function Dn(n){const{originWidth:t,originHeight:e,scale:i=1,wantedWidth:s}=n,o=(s!=null?s:t)*i,r=typeof e=="number"?o*(e/t):void 0;return ge(V({},n),{width:o,height:r})}function fP(n,t,e){let i,s,o,r,a,l,c,d,h,{width:f=null}=t,{icon:m=null}=t,{shadow:A=!1}=t;const p=Hs();function g(P){return W(this,null,function*(){const I=yield iP(P);return p("iconLoaded",I),I})}function v(P){return W(this,null,function*(){if(typeof h=="number")return ge(V({},P),{width:h});const I=yield tP(P);return p("iconLoaded",I),I})}function y(){d||p("iconLoaded")}return gt(()=>{y()}),n.$$set=P=>{"width"in P&&e(1,f=P.width),"icon"in P&&e(12,m=P.icon),"shadow"in P&&e(0,A=P.shadow)},n.$$.update=()=>{var P,I;n.$$.dirty&4096&&e(7,i=m==null?void 0:m.url),n.$$.dirty&4096&&e(2,s=(P=m==null?void 0:m.steps)!=null?P:1),n.$$.dirty&4096&&e(6,o=m==null?void 0:m.fps),n.$$.dirty&4096&&e(5,r=m==null?void 0:m.ratio),n.$$.dirty&4096&&e(4,a=(I=m==null?void 0:m.scale)!=null?I:1),n.$$.dirty&4096&&e(3,l=m==null?void 0:m.width),n.$$.dirty&252&&e(9,c=He({url:i,steps:s,fps:o,ratio:r,scale:a,width:l})),n.$$.dirty&4&&e(8,d=s>1),n.$$.dirty&2&&(h=f)},y(),[A,f,s,l,a,r,o,i,d,c,g,v,m]}class $u extends ce{constructor(t){super(),le(this,t,fP,uP,ae,{width:1,icon:12,shadow:0},nP)}}function mP(n){me(n,"svelte-e58ijk",".wrapper.svelte-e58ijk{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-e58ijk{position:relative;display:flex;align-items:center;justify-content:center}.text.svelte-e58ijk{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;line-height:1.125rem;text-shadow:0.125rem 0rem 0.5rem rgba(0, 0, 0, 0.15)}")}function ef(n){let t,e,i,s,o,r;return e=new Vt({props:{outDelay:0,inDelay:0,center:!0,width:"80%",blurRadius:40,spreadRadius:16,opacity:.08}}),{c(){t=x("div"),oe(e.$$.fragment),i=K(),s=x("div"),o=De(n[1]),w(s,"class","text svelte-e58ijk"),w(t,"class","text-wrapper svelte-e58ijk")},m(a,l){O(a,t,l),ne(e,t,null),L(t,i),L(t,s),L(s,o),r=!0},p(a,l){(!r||l&2)&&Se(o,a[1])},i(a){r||(D(e.$$.fragment,a),r=!0)},o(a){T(e.$$.fragment,a),r=!1},d(a){a&&j(t),se(e)}}}function gP(n){let t,e,i,s;e=new $u({props:{icon:n[0],shadow:!0}}),e.$on("iconLoaded",n[4]);let o=n[1]&&n[2]&&ef(n);return{c(){t=x("div"),oe(e.$$.fragment),i=K(),o&&o.c(),w(t,"class","wrapper svelte-e58ijk")},m(r,a){O(r,t,a),ne(e,t,null),L(t,i),o&&o.m(t,null),s=!0},p(r,[a]){const l={};a&1&&(l.icon=r[0]),e.$set(l),r[1]&&r[2]?o?(o.p(r,a),a&6&&D(o,1)):(o=ef(r),o.c(),D(o,1),o.m(t,null)):o&&(he(),T(o,1,1,()=>{o=null}),ue())},i(r){s||(D(e.$$.fragment,r),D(o),s=!0)},o(r){T(e.$$.fragment,r),T(o),s=!1},d(r){r&&j(t),se(e),o&&o.d()}}}function pP(n,t,e){let i,s,o,{tag:r}=t;const a=()=>{e(2,i=!0)};return n.$$set=l=>{"tag"in l&&e(3,r=l.tag)},n.$$.update=()=>{var l,c,d;n.$$.dirty&8&&e(1,s=(l=r.data.title)!=null?l:r.data.text),n.$$.dirty&8&&e(0,o=(d=r.data.icon)!=null?d:(c=r.style)==null?void 0:c.point)},e(2,i=!1),[o,s,i,r,a]}class AP extends ce{constructor(t){super(),le(this,t,pP,gP,ae,{tag:3},mP)}}function vP(n){me(n,"svelte-nnvupv",".wrapper.svelte-nnvupv{position:relative;width:0;height:0;display:flex;flex-direction:column;justify-content:end;align-items:center}.line.svelte-nnvupv{position:relative;flex-shrink:0;width:0.0625rem;height:5rem;background-image:linear-gradient(to bottom, #ffffff, rgba(255, 255, 255, 0.5))}.media-item.svelte-nnvupv{box-sizing:content-box;position:relative;flex-shrink:0;width:2.625rem;height:2.625rem;border-style:solid;border-width:0.3125rem;-o-border-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJwAAACcCAMAAAC9ZjJ/AAAAnFBMVEX///8AAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////YxPlZAAAAM3RSTlMzADY6QEo9I1ROWlBHRBby7ufFq3kw+hEp0VcK3dS0opmRg3BpBi2JHxvhy72WZGGclV2LE9pqAAAHSUlEQVR42syY13riMBBGZ1VccKHZ2NQAAYdOkn3/d1sJ9ltrZAwBtz2XCZFPNP9IY+BXYda+GVLmubZjtVqWY7seM0LTXxdfuZicHxNPGAkny3Fszl2Xc9txrOvPPBL7BRYvIhfFTDiMHO4ZFDJQw+POSBiyOLq/Tulya9NwxIM5I3AXwrj4BxzDzKlxBXJbao2Q2GNBi26z65QvF4EzslwKT0Fda+QAqm8FcltX7JkBL2Bwa+Si7StZbuNaDiPwIoQ5lruR61QgZ3LLNqAQhm1xs2Q5rFZcr2S5iDncgFKg3GJRiXLr0EG7Vnj3nHBdltyGOx6BfLzT8u3QG066ncGg050Me4e35cmDfIjn8E0pcmPD4RRycIP+tP37Ju1pP3Dza+vQcXE5n+dVlAX9ye8HTPoBy6st94vKxTa/WVEa9JQ9mh2D1XlkM0KYPTqvguNM2c9eQG/WlttxIbmxYd/Mzmn299mD/XHl5lR8ddwP/trPTjezahvj1+V899b5QT+612cOP1c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yDBpkhl8QtrDBX3sdoUGO+OuwDZiQcqj7nTD7hniAFBPJ9Zo4SfBZ0kNyMZ4LztAgZzwTxRDja38EDTLCV38MCX4rtKFBbPx+mEAIKR05izYIE6+lkBKCiphZCDQIERMbKPzfcn+Yt2MkCEEgiKLsn60xI6MMzC29/wUNQSX3n8ESZrof6s+q/iHUR4n6EFZfX+qLXz0yqYdN9ZiuXnDUq6F7qdbGEYs9yFFHYOrwUB27ugNrddSvLknU9ZK7mFNXmr/iK4NLr9Gx1egsHSBgAwisnW40XHSDNriSAxd64Ri5EJi4EGwjtNoxQSv2O1ELPESNWO+4r4UH90V5yMMaWFgkUZ+gtIQFlEZ5U9zEQXHJ+kbMhAMxBxNhfaaDf+c5g/MtDXA+2/zJwT++f3JwlXMvqw3DQBSGg3VmbFUa7UyDvHZo3/8FWxKKCNQX2ZbGJGttDloO/J/BMBFrQD/WQDuVuRjWzlzYjJOBEIxuIGQQptOqHrppFfq5KI2hGaWBx7mcLwjr5XwsYSGEFKMVQhpplxLSRrQSUmmW41toxbcYV2TLAo1sGRJWBd8e9YNv+O+Vqbyvn8pTuxoZoNrIAF0zeAaqyzPQJQe2aIjrwRZMTSYJQuclQX4f6mEql3yG5malBkMj9rYJ8LG+PODjbbuRPrJUmj4i+7UZjSJbFo2yFE7LbTke9kFlrhxU5q77iTeHEsQbLIXz4ng8vDor+AAZ3ZEgo3P9eCRlKUlN3S9tyuf7IKB/87BvGgrwqWle3AfPxjStDNkbt5K9sSjZm7BjysWOqTh2nK7H3UceEx07/vfTTgBsd7PA9nvR5Al1N/4OuMdn1D3eUXdvtFD3Zw6fIUQPDp9IYI7h8H8ALigtIKqA/ZIAAAAASUVORK5CYII=');border-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJwAAACcCAMAAAC9ZjJ/AAAAnFBMVEX///8AAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////YxPlZAAAAM3RSTlMzADY6QEo9I1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YjJOBEIxuIGQQptOqHrppFfq5KI2hGaWBx7mcLwjr5XwsYSGEFKMVQhpplxLSRrQSUmmW41toxbcYV2TLAo1sGRJWBd8e9YNv+O+Vqbyvn8pTuxoZoNrIAF0zeAaqyzPQJQe2aIjrwRZMTSYJQuclQX4f6mEql3yG5malBkMj9rYJ8LG+PODjbbuRPrJUmj4i+7UZjSJbFo2yFE7LbTke9kFlrhxU5q77iTeHEsQbLIXz4ng8vDor+AAZ3ZEgo3P9eCRlKUlN3S9tyuf7IKB/87BvGgrwqWle3AfPxjStDNkbt5K9sSjZm7BjysWOqTh2nK7H3UceEx07/vfTTgBsd7PA9nvR5Al1N/4OuMdn1D3eUXdvtFD3Zw6fIUQPDp9IYI7h8H8ALigtIKqA/ZIAAAAASUVORK5CYII=');border-image-slice:15 fill}.media-content.svelte-nnvupv{position:relative;box-sizing:content-box;pointer-events:auto;width:100%;height:100%;border-radius:624.9375rem;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;user-select:none;-o-object-fit:cover;object-fit:cover;-o-object-position:center;object-position:center}")}function tf(n){let t,e,i,s,o,r=n[0].type==="Image"&&nf(n);return{c(){t=x("div"),e=x("div"),r&&r.c(),i=K(),s=x("div"),w(e,"class","media-item svelte-nnvupv"),w(e,"draggable","false"),w(s,"class","line svelte-nnvupv"),w(t,"class","wrapper svelte-nnvupv")},m(a,l){O(a,t,l),L(t,e),r&&r.m(e,null),L(t,i),L(t,s),o=!0},p(a,l){a[0].type==="Image"?r?(r.p(a,l),l&1&&D(r,1)):(r=nf(a),r.c(),D(r,1),r.m(e,null)):r&&(he(),T(r,1,1,()=>{r=null}),ue())},i(a){o||(D(r),o=!0)},o(a){T(r),o=!1},d(a){a&&j(t),r&&r.d()}}}function nf(n){let t,e,i,s,o,r;return t=new Vt({props:{blurRadius:22,spreadRadius:16,height:"80%",width:"80%",center:!0,round:!0}}),{c(){var a;oe(t.$$.fragment),e=K(),i=x("img"),w(i,"class","media-content svelte-nnvupv"),et(i.src,s=(a=n[0].thumbnail)!=null?a:n[0].url)||w(i,"src",s),w(i,"alt",o=n[0].name),w(i,"draggable",!1)},m(a,l){ne(t,a,l),O(a,e,l),O(a,i,l),r=!0},p(a,l){var c;(!r||l&1&&!et(i.src,s=(c=a[0].thumbnail)!=null?c:a[0].url))&&w(i,"src",s),(!r||l&1&&o!==(o=a[0].name))&&w(i,"alt",o)},i(a){r||(D(t.$$.fragment,a),r=!0)},o(a){T(t.$$.fragment,a),r=!1},d(a){se(t,a),a&&j(e),a&&j(i)}}}function bP(n){let t,e,i=n[0]&&tf(n);return{c(){i&&i.c(),t=Ie()},m(s,o){i&&i.m(s,o),O(s,t,o),e=!0},p(s,[o]){s[0]?i?(i.p(s,o),o&1&&D(i,1)):(i=tf(s),i.c(),D(i,1),i.m(t.parentNode,t)):i&&(he(),T(i,1,1,()=>{i=null}),ue())},i(s){e||(D(i),e=!0)},o(s){T(i),e=!1},d(s){i&&i.d(s),s&&j(t)}}}function yP(n,t,e){let i,{tag:s}=t;return n.$$set=o=>{"tag"in o&&e(1,s=o.tag)},n.$$.update=()=>{n.$$.dirty&2&&e(0,i=s.data.mediaData[0])},[i,s]}class wP extends ce{constructor(t){super(),le(this,t,yP,bP,ae,{tag:1},vP)}}function CP(n){me(n,"svelte-kzl2aj",".customElement__container.svelte-kzl2aj{position:relative}")}function IP(n){let t,e;return{c(){t=new Qs(!1),e=Ie(),t.a=e},m(i,s){t.m(n[2],i,s),O(i,e,s)},p:J,d(i){i&&j(e),i&&t.d()}}}function PP(n){let t,e=typeof n[2]=="string"&&IP(n);return{c(){t=x("div"),e&&e.c(),w(t,"class","customElement__container svelte-kzl2aj"),$(t,"unfolded",n[1])},m(i,s){O(i,t,s),e&&e.m(t,null),n[5](t)},p(i,[s]){typeof i[2]=="string"&&e.p(i,s),s&2&&$(t,"unfolded",i[1])},i:J,o:J,d(i){i&&j(t),e&&e.d(),n[5](null)}}}function kP(n,t,e){var d,h;let i,{tag:s}=t,{rendererMap:o=new Map}=t,r,a=(h=s.element)!=null?h:(d=o.get(s.contentType))==null?void 0:d.renderer,l;gt(()=>{r&&(a instanceof Element?(r.appendChild(a),l=()=>{a instanceof Element&&a.remove()}):typeof a=="function"&&(l=a(r,s)))}),Mt(()=>{l==null||l()});function c(f){Ne[f?"unshift":"push"](()=>{r=f,e(0,r)})}return n.$$set=f=>{"tag"in f&&e(3,s=f.tag),"rendererMap"in f&&e(4,o=f.rendererMap)},n.$$.update=()=>{n.$$.dirty&8&&e(1,i=s.state.unfolded)},[r,i,a,s,o,c]}class MP extends ce{constructor(t){super(),le(this,t,kP,PP,ae,{tag:3,rendererMap:4},CP)}}function EP(n){me(n,"svelte-qz1wo5",'@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/OAHgAyAAAQADAAIAAAAAAAAB9ABdAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACCAA7AcwAdwIIADMCCAA0AhwAMwISADkCCAAuAfQAN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pWerB/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-qz1wo5{position:relative;left:50%;top:50%;transform:translate(-50%, -50%);font-family:PingFangSC, Segoe UI, Rototo, sans-serif}.content__container.withAnimation.svelte-qz1wo5{transition:opacity 0.2s linear}.content__container.unClickable.svelte-qz1wo5{pointer-events:none !important}.content__container.unClickable.svelte-qz1wo5 *{pointer-events:none !important}.content__wrapper.svelte-qz1wo5{pointer-events:none;width:100%;height:100%}.content__container.hide.svelte-qz1wo5{opacity:0;pointer-events:none}.content__container.hide.svelte-qz1wo5 *{pointer-events:none !important}.content__container.disable.svelte-qz1wo5{display:none}.content.svelte-qz1wo5{position:relative;width:100%;height:100%;font-size:0.75rem;color:#fff}.content.svelte-qz1wo5:not(.unfolded){pointer-events:none}.content.svelte-qz1wo5:not(.unfolded) *{pointer-events:none !important}.content.unfolded.svelte-qz1wo5{pointer-events:auto}')}function DP(n){let t,e;return{c(){t=x("div"),w(t,"data-info","tag content is keep folded"),w(t,"data-id",e=n[1].id)},m(i,s){O(i,t,s)},p(i,s){s&2&&e!==(e=i[1].id)&&w(t,"data-id",e)},i:J,o:J,d(i){i&&j(t)}}}function xP(n){let t,e,i,s,o,r,a,l,c,d,h,f,m,A,p,g,v;const y=[VP,BP,OP,zP,jP,TP,LP],P=[];function I(E,C){return C&18&&(s=null),C&18&&(o=null),C&18&&(r=null),C&18&&(a=null),C&18&&(l=null),C&18&&(c=null),C&18&&(d=null),s==null&&(s=!!(["Text"].includes(E[1].contentType)||["Text"].includes(E[4].get(E[1].contentType)))),s?0:(o==null&&(o=!!(["ImageText","Image","Video"].includes(E[1].contentType)||["ImageText","Image","Video"].includes(E[4].get(E[1].contentType)))),o?1:(r==null&&(r=!!(["Audio"].includes(E[1].contentType)||["Audio"].includes(E[4].get(E[1].contentType)))),r?2:(a==null&&(a=!!(["Marketing"].includes(E[1].contentType)||["Marketing"].includes(E[4].get(E[1].contentType)))),a?3:(l==null&&(l=!!(["Link","VRLink","PanoLink","Sticker"].includes(E[1].contentType)||["Link","VRLink","PanoLink","Sticker"].includes(E[4].get(E[1].contentType)))),l?4:(c==null&&(c=!!(["MediaPlane","MediaModel"].includes(E[1].contentType)||["MediaPlane","MediaModel"].includes(E[4].get(E[1].contentType)))),c?5:(d==null&&(d=!!(["Panorama"].includes(E[1].contentType)||["Panorama"].includes(E[4].get(E[1].contentType)))),d?6:-1))))))}return~(h=I(n,-1))&&(f=P[h]=y[h](n)),{c(){var E;t=x("div"),e=x("div"),i=x("div"),f&&f.c(),w(i,"class","content svelte-qz1wo5"),$(i,"unfolded",(E=n[1].state)==null?void 0:E.unfolded),w(e,"class","content__wrapper svelte-qz1wo5"),w(t,"class",m=Ge(ht("content__container",n[1].className))+" svelte-qz1wo5"),w(t,"data-id",A=n[1].id),$(t,"disable",n[1].enabled===!1),$(t,"hide",n[6]),$(t,"withAnimation",n[0]),$(t,"unClickable",n[1].config.clickable===!1),S(t,"width",n[1].stickType==="Plane"||n[1].contentType==="MediaModel"?"100%":0),S(t,"height",n[1].stickType==="Plane"||n[1].contentType==="MediaModel"?"100%":0)},m(E,C){O(E,t,C),L(t,e),L(e,i),~h&&P[h].m(i,null),p=!0,g||(v=be(t,"click",Gl(n[16])),g=!0)},p(E,C){var R;let z=h;h=I(E,C),h===z?~h&&P[h].p(E,C):(f&&(he(),T(P[z],1,1,()=>{P[z]=null}),ue()),~h?(f=P[h],f?f.p(E,C):(f=P[h]=y[h](E),f.c()),D(f,1),f.m(i,null)):f=null),(!p||C&2)&&$(i,"unfolded",(R=E[1].state)==null?void 0:R.unfolded),(!p||C&2&&m!==(m=Ge(ht("content__container",E[1].className))+" svelte-qz1wo5"))&&w(t,"class",m),(!p||C&2&&A!==(A=E[1].id))&&w(t,"data-id",A),(!p||C&2)&&$(t,"disable",E[1].enabled===!1),(!p||C&66)&&$(t,"hide",E[6]),(!p||C&3)&&$(t,"withAnimation",E[0]),(!p||C&2)&&$(t,"unClickable",E[1].config.clickable===!1),C&2&&S(t,"width",E[1].stickType==="Plane"||E[1].contentType==="MediaModel"?"100%":0),C&2&&S(t,"height",E[1].stickType==="Plane"||E[1].contentType==="MediaModel"?"100%":0)},i(E){p||(D(f),p=!0)},o(E){T(f),p=!1},d(E){E&&j(t),~h&&P[h].d(),g=!1,v()}}}function SP(n){let t,e,i,s,o,r,a;return e=new MP({props:{tag:He(n[1]),rendererMap:n[3]}}),{c(){t=x("div"),oe(e.$$.fragment),w(t,"class",i=Ge(ht("content__container",n[1].className))+" svelte-qz1wo5"),w(t,"data-id",s=n[1].id),$(t,"custom-tag-disable",n[1].enabled===!1),$(t,"custom-tag-hide",n[6])},m(l,c){O(l,t,c),ne(e,t,null),o=!0,r||(a=be(t,"click",n[15]),r=!0)},p(l,c){const d={};c&2&&(d.tag=He(l[1])),c&8&&(d.rendererMap=l[3]),e.$set(d),(!o||c&2&&i!==(i=Ge(ht("content__container",l[1].className))+" svelte-qz1wo5"))&&w(t,"class",i),(!o||c&2&&s!==(s=l[1].id))&&w(t,"data-id",s),(!o||c&2)&&$(t,"custom-tag-disable",l[1].enabled===!1),(!o||c&66)&&$(t,"custom-tag-hide",l[6])},i(l){o||(D(e.$$.fragment,l),o=!0)},o(l){T(e.$$.fragment,l),o=!1},d(l){l&&j(t),se(e),r=!1,a()}}}function LP(n){let t,e;return t=new wP({props:{tag:He(n[1])}}),{c(){oe(t.$$.fragment)},m(i,s){ne(t,i,s),e=!0},p(i,s){const o={};s&2&&(o.tag=He(i[1])),t.$set(o)},i(i){e||(D(t.$$.fragment,i),e=!0)},o(i){T(t.$$.fragment,i),e=!1},d(i){se(t,i)}}}function TP(n){let t,e;return t=new eP({props:{tag:He(n[1])}}),{c(){oe(t.$$.fragment)},m(i,s){ne(t,i,s),e=!0},p(i,s){const o={};s&2&&(o.tag=He(i[1])),t.$set(o)},i(i){e||(D(t.$$.fragment,i),e=!0)},o(i){T(t.$$.fragment,i),e=!1},d(i){se(t,i)}}}function jP(n){let t,e;return t=new AP({props:{tag:He(n[1])}}),{c(){oe(t.$$.fragment)},m(i,s){ne(t,i,s),e=!0},p(i,s){const o={};s&2&&(o.tag=He(i[1])),t.$set(o)},i(i){e||(D(t.$$.fragment,i),e=!0)},o(i){T(t.$$.fragment,i),e=!1},d(i){se(t,i)}}}function zP(n){let t,e;return t=new EI({props:{tag:He(n[1])}}),{c(){oe(t.$$.fragment)},m(i,s){ne(t,i,s),e=!0},p(i,s){const o={};s&2&&(o.tag=He(i[1])),t.$set(o)},i(i){e||(D(t.$$.fragment,i),e=!0)},o(i){T(t.$$.fragment,i),e=!1},d(i){se(t,i)}}}function OP(n){let t,e;return t=new JI({props:{tag:He(n[1])}}),{c(){oe(t.$$.fragment)},m(i,s){ne(t,i,s),e=!0},p(i,s){const o={};s&2&&(o.tag=He(i[1])),t.$set(o)},i(i){e||(D(t.$$.fragment,i),e=!0)},o(i){T(t.$$.fragment,i),e=!1},d(i){se(t,i)}}}function BP(n){let t,e;return t=new II({props:{tag:He(n[1])}}),{c(){oe(t.$$.fragment)},m(i,s){ne(t,i,s),e=!0},p(i,s){const o={};s&2&&(o.tag=He(i[1])),t.$set(o)},i(i){e||(D(t.$$.fragment,i),e=!0)},o(i){T(t.$$.fragment,i),e=!1},d(i){se(t,i)}}}function VP(n){let t,e;return t=new Fy({props:{tag:He(n[1])}}),{c(){oe(t.$$.fragment)},m(i,s){ne(t,i,s),e=!0},p(i,s){const o={};s&2&&(o.tag=He(i[1])),t.$set(o)},i(i){e||(D(t.$$.fragment,i),e=!0)},o(i){T(t.$$.fragment,i),e=!1},d(i){se(t,i)}}}function RP(n){let t,e,i,s,o;const r=[SP,xP,DP],a=[];function l(c,d){return d&10&&(t=null),t==null&&(t=!!(c[1].element||c[3].has(c[1].contentType))),t?0:c[5]?1:2}return e=l(n,-1),i=a[e]=r[e](n),{c(){i.c(),s=Ie()},m(c,d){a[e].m(c,d),O(c,s,d),o=!0},p(c,[d]){let h=e;e=l(c,d),e===h?a[e].p(c,d):(he(),T(a[h],1,1,()=>{a[h]=null}),ue(),i=a[e],i?i.p(c,d):(i=a[e]=r[e](c),i.c()),D(i,1),i.m(s.parentNode,s))},i(c){o||(D(i),o=!0)},o(c){T(i),o=!1},d(c){a[e].d(c),c&&j(s)}}}function QP(n,t,e){var i,s;return!(!t.visible||!t.enabled||!e.visible||!((i=n.state)!=null&&i.visible)||((s=n.temporaryState)==null?void 0:s.visible)===!1||n.loading)}function GP(n,t,e){let i,s,o,r,a,l,{withAnimation:c=!1}=t,{tag:d}=t,{hooks:h}=t,{rendererMap:f=new Map}=t,{contentTypeMap:m=new Map}=t,{state:A}=t,{mediaStore:p}=t,{temporaryState:g}=t;rr("hooks",h),rr("mediaStore",p);let v,y;function P(C){C?h.emit("exposure",{id:r,type:"start"}):h.emit("exposure",{id:r,type:"end"})}const I=C=>h.emit("click",{event:C,target:"TagContent",tag:d}),E=C=>h.emit("click",{event:C,target:"TagContent",tag:d});return n.$$set=C=>{"withAnimation"in C&&e(0,c=C.withAnimation),"tag"in C&&e(1,d=C.tag),"hooks"in C&&e(2,h=C.hooks),"rendererMap"in C&&e(3,f=C.rendererMap),"contentTypeMap"in C&&e(4,m=C.contentTypeMap),"state"in C&&e(7,A=C.state),"mediaStore"in C&&e(8,p=C.mediaStore),"temporaryState"in C&&e(9,g=C.temporaryState)},n.$$.update=()=>{var C,z,R,U,H,N,F,Q,_,Y,Z;n.$$.dirty&2&&e(13,i=(C=d.state)==null?void 0:C.unfolded),n.$$.dirty&2&&e(12,s=(z=d.state)==null?void 0:z.visible),n.$$.dirty&642&&e(14,o=A.visible&&g.visible&&((R=d.state)==null?void 0:R.visible)),n.$$.dirty&2&&(r=d.id),n.$$.dirty&642&&e(6,a=!QP(d,A,g)),n.$$.dirty&16384&&P(o),n.$$.dirty&15362&&d.hooks&&(i!==void 0&&i!==y&&(e(11,y=i),i?(H=(U=d.hooks).emit)==null||H.call(U,"unfolded"):(F=d==null?void 0:(N=d.hooks).emit)==null||F.call(N,"folded")),s!==void 0&&s!==v&&(e(10,v=s),s?(_=(Q=d.hooks).emit)==null||_.call(Q,"show"):(Z=(Y=d.hooks).emit)==null||Z.call(Y,"hide"))),n.$$.dirty&2&&e(5,l=(()=>!(typeof d.config.unfoldedConfig=="object"&&d.config.unfoldedConfig.keep==="folded"))())},[c,d,h,f,m,l,a,A,p,g,v,y,s,i,o,I,E]}let sf=class extends ce{constructor(t){super(),le(this,t,GP,RP,ae,{withAnimation:0,tag:1,hooks:2,rendererMap:3,contentTypeMap:4,state:7,mediaStore:8,temporaryState:9},EP)}};function NP(n){me(n,"svelte-7aiuwz",'@charset "UTF-8";.tag-point-click-helper.svelte-7aiuwz.svelte-7aiuwz{position:absolute;pointer-events:auto;cursor:pointer;width:calc(100% + 0.75rem);height:calc(100% + 0.75rem);left:50%;top:50%;transform:translate(-50%, -50%)}.tag-point-wrapper.svelte-7aiuwz.svelte-7aiuwz{pointer-events:none;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%)}.tag-folded-point.svelte-7aiuwz.svelte-7aiuwz,.tag-unfolded-point.svelte-7aiuwz.svelte-7aiuwz{transition:all 0.5s}.tag-point-wrapper.svelte-7aiuwz .tag-unfolded-point.svelte-7aiuwz{display:flex;justify-content:center;align-items:center;position:absolute;width:100%;height:100%;border-radius:50%}.tag-point-wrapper.svelte-7aiuwz .tag-unfolded-point.svelte-7aiuwz: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-7aiuwz .tag-unfolded-point.svelte-7aiuwz: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-7aiuwz .tag-folded-point.svelte-7aiuwz{opacity:1;scale:1}.tag-point-wrapper.folded.svelte-7aiuwz .tag-unfolded-point.svelte-7aiuwz{opacity:0;scale:1}.tag-point-wrapper.unfolded.svelte-7aiuwz .tag-folded-point.svelte-7aiuwz{opacity:0;scale:0.2}.tag-point-wrapper.unfolded.svelte-7aiuwz .tag-unfolded-point.svelte-7aiuwz{opacity:1;scale:1}')}function FP(n){let t,e,i,s,o,r,a,l,c,d,h,f;return s=new Vt({props:{center:!0,blurRadius:15,spreadRadius:5,opacity:.3}}),c=new $u({props:{icon:n[2],width:n[1]}}),c.$on("iconLoaded",n[7]),{c(){t=x("div"),e=x("div"),i=K(),oe(s.$$.fragment),o=K(),r=x("div"),a=K(),l=x("div"),oe(c.$$.fragment),w(e,"class","tag-point-click-helper svelte-7aiuwz"),w(r,"class","tag-unfolded-point svelte-7aiuwz"),S(r,"transition-delay",(n[3]?n[5]:0)+"ms"),w(l,"class","tag-folded-point svelte-7aiuwz"),S(l,"transition-delay",(n[3]?n[5]:0)+"ms"),w(t,"class","tag-point-wrapper svelte-7aiuwz"),$(t,"unfolded",n[0]),$(t,"folded",n[3])},m(m,A){O(m,t,A),L(t,e),L(t,i),ne(s,t,null),L(t,o),L(t,r),L(t,a),L(t,l),ne(c,l,null),d=!0,h||(f=be(e,"click",n[4]),h=!0)},p(m,[A]){A&8&&S(r,"transition-delay",(m[3]?m[5]:0)+"ms");const p={};A&4&&(p.icon=m[2]),A&2&&(p.width=m[1]),c.$set(p),A&8&&S(l,"transition-delay",(m[3]?m[5]:0)+"ms"),(!d||A&1)&&$(t,"unfolded",m[0]),(!d||A&8)&&$(t,"folded",m[3])},i(m){d||(D(s.$$.fragment,m),D(c.$$.fragment,m),d=!0)},o(m){T(s.$$.fragment,m),T(c.$$.fragment,m),d=!1},d(m){m&&j(t),se(s),se(c),h=!1,f()}}}function _P(n,t,e){let i,s,o,r;const a=ui("hooks");let{tag:l}=t,c,d=!1;const h=()=>{c!==void 0&&clearTimeout(c),d=!0,c=setTimeout(()=>{d=!1},800)},f=p=>{d||a.emit("click",{event:p,target:"TagPoint",tag:l})},m=(()=>l.contentType==="Text"&&l.data.appearance==="plane"?500:800)();function A(p){cn.call(this,n,p)}return n.$$set=p=>{"tag"in p&&e(6,l=p.tag)},n.$$.update=()=>{var p,g,v,y;n.$$.dirty&64&&e(0,i=(p=l.state)==null?void 0:p.unfolded),n.$$.dirty&1&&e(3,s=!i),n.$$.dirty&64&&e(2,o=(v=(g=l.style)==null?void 0:g.point)!=null&&v.url?(y=l.style)==null?void 0:y.point:{url:Lb}),n.$$.dirty&64&&e(1,r=(()=>{var E,C,z,R;const P=(C=(E=l.style)==null?void 0:E.point)==null?void 0:C.width;if(typeof P=="number")return P;const I=(R=(z=l.style)==null?void 0:z.point)==null?void 0:R.size;if(typeof I=="number")return I;if(I==="S")return 18;if(I==="M")return 20;if(I==="L")return 24;if(I==="XL")return 28})())},h(),[i,r,o,s,f,m,l,A]}class HP extends ce{constructor(t){super(),le(this,t,_P,FP,ae,{tag:6},NP)}}function WP(n){me(n,"svelte-g38zun",".tag.svelte-g38zun{will-change:opacity}.tag.withAnimation.svelte-g38zun{transition:opacity 0.2s linear}.tag.enableZIndex.svelte-g38zun{position:absolute;left:0;top:0;width:100%;height:100%}.tag.hide.svelte-g38zun{opacity:0;pointer-events:none}.tag.hide.svelte-g38zun *{pointer-events:none !important}.tag.unClickable.svelte-g38zun{pointer-events:none !important}.tag.unClickable.svelte-g38zun *{pointer-events:none !important}.tag.disable.svelte-g38zun{display:none}.wrapper.svelte-g38zun{position:absolute;width:0rem;height:0rem;overflow:visible;pointer-events:auto}")}function of(n){let t,e,i,s,o,r,a,l,c,d;const h=[YP,UP],f=[];function m(v,y){return v[16]?0:1}i=m(n),s=f[i]=h[i](n);const A=[ZP,XP],p=[];function g(v,y){return v[15]?0:1}return r=g(n),a=p[r]=A[r](n),{c(){t=x("div"),e=x("div"),s.c(),o=K(),a.c(),w(e,"class",l=Ge(ht("wrapper",n[1].className?`${n[1].className}__wrapper`:void 0))+" svelte-g38zun"),w(e,"data-tag-unfolded",n[7]),w(e,"data-tag-id",n[14]),w(e,"data-content-type",c=n[1].contentType),S(e,"left",n[11]),S(e,"top",n[10]),w(t,"class","tag svelte-g38zun"),w(t,"data-tag-id",n[14]),$(t,"unClickable",n[1].config.clickable===!1),$(t,"disable",n[13]),$(t,"hide",n[12]),$(t,"withAnimation",n[0]),$(t,"enableZIndex",n[9]),S(t,"z-index",n[9])},m(v,y){O(v,t,y),L(t,e),f[i].m(e,null),L(e,o),p[r].m(e,null),d=!0},p(v,y){let P=i;i=m(v),i===P?f[i].p(v,y):(he(),T(f[P],1,1,()=>{f[P]=null}),ue(),s=f[i],s?s.p(v,y):(s=f[i]=h[i](v),s.c()),D(s,1),s.m(e,o));let I=r;r=g(v),r===I?p[r].p(v,y):(he(),T(p[I],1,1,()=>{p[I]=null}),ue(),a=p[r],a?a.p(v,y):(a=p[r]=A[r](v),a.c()),D(a,1),a.m(e,null)),(!d||y&2&&l!==(l=Ge(ht("wrapper",v[1].className?`${v[1].className}__wrapper`:void 0))+" svelte-g38zun"))&&w(e,"class",l),(!d||y&128)&&w(e,"data-tag-unfolded",v[7]),(!d||y&16384)&&w(e,"data-tag-id",v[14]),(!d||y&2&&c!==(c=v[1].contentType))&&w(e,"data-content-type",c),y&2048&&S(e,"left",v[11]),y&1024&&S(e,"top",v[10]),(!d||y&16384)&&w(t,"data-tag-id",v[14]),(!d||y&2)&&$(t,"unClickable",v[1].config.clickable===!1),(!d||y&8192)&&$(t,"disable",v[13]),(!d||y&4096)&&$(t,"hide",v[12]),(!d||y&1)&&$(t,"withAnimation",v[0]),(!d||y&512)&&$(t,"enableZIndex",v[9]),y&512&&S(t,"z-index",v[9])},i(v){d||(D(s),D(a),d=!0)},o(v){T(s),T(a),d=!1},d(v){v&&j(t),f[i].d(),p[r].d()}}}function UP(n){let t;return{c(){t=x("div"),w(t,"data-info","tag point is disable")},m(e,i){O(e,t,i)},p:J,i:J,o:J,d(e){e&&j(t)}}}function YP(n){let t,e;return t=new HP({props:{tag:n[1]}}),{c(){oe(t.$$.fragment)},m(i,s){ne(t,i,s),e=!0},p(i,s){const o={};s&2&&(o.tag=i[1]),t.$set(o)},i(i){e||(D(t.$$.fragment,i),e=!0)},o(i){T(t.$$.fragment,i),e=!1},d(i){se(t,i)}}}function XP(n){let t;return{c(){t=x("div"),w(t,"data-info","tag content is disable")},m(e,i){O(e,t,i)},p:J,i:J,o:J,d(e){e&&j(t)}}}function ZP(n){let t,e;return t=new sf({props:{mediaStore:n[2],withAnimation:n[0],tag:He(n[1]),hooks:n[17],state:n[5],temporaryState:n[6],rendererMap:n[3],contentTypeMap:n[4]}}),{c(){oe(t.$$.fragment)},m(i,s){ne(t,i,s),e=!0},p(i,s){const o={};s&4&&(o.mediaStore=i[2]),s&1&&(o.withAnimation=i[0]),s&2&&(o.tag=He(i[1])),s&32&&(o.state=i[5]),s&64&&(o.temporaryState=i[6]),s&8&&(o.rendererMap=i[3]),s&16&&(o.contentTypeMap=i[4]),t.$set(o)},i(i){e||(D(t.$$.fragment,i),e=!0)},o(i){T(t.$$.fragment,i),e=!1},d(i){se(t,i)}}}function JP(n){let t,e,i=n[8]&&of(n);return{c(){i&&i.c(),t=Ie()},m(s,o){i&&i.m(s,o),O(s,t,o),e=!0},p(s,[o]){s[8]?i?(i.p(s,o),o&256&&D(i,1)):(i=of(s),i.c(),D(i,1),i.m(t.parentNode,t)):i&&(he(),T(i,1,1,()=>{i=null}),ue())},i(s){e||(D(i),e=!0)},o(s){T(i),e=!1},d(s){i&&i.d(s),s&&j(t)}}}function qP(n,t,e){let i,s,o,r,a,l,c,d,h,f,{withAnimation:m=!1}=t,{tag:A}=t,{mediaStore:p}=t,{rendererMap:g=new Map}=t,{contentTypeMap:v=new Map}=t,{state:y}=t,{temporaryState:P}=t;const I=ui("hooks");return n.$$set=E=>{"withAnimation"in E&&e(0,m=E.withAnimation),"tag"in E&&e(1,A=E.tag),"mediaStore"in E&&e(2,p=E.mediaStore),"rendererMap"in E&&e(3,g=E.rendererMap),"contentTypeMap"in E&&e(4,v=E.contentTypeMap),"state"in E&&e(5,y=E.state),"temporaryState"in E&&e(6,P=E.temporaryState)},n.$$.update=()=>{var E,C,z,R;n.$$.dirty&10&&e(16,i=(()=>{var U,H,N;return!(((H=(U=A.style)==null?void 0:U.point)==null?void 0:H.enabled)===!1||((N=g.get(A.contentType))==null?void 0:N.usePoint)===!1||A.contentType==="Sticker"||A.contentType==="Link"||A.contentType==="VRLink"||A.contentType==="PanoLink"||A.contentType==="Panorama"||A.contentType==="Audio"&&A.data.appearance==="plane")})()),n.$$.dirty&2&&e(15,s=(()=>A.stickType==="2DPoint")()),n.$$.dirty&2&&e(14,o=A.id),n.$$.dirty&2&&e(13,r=A.enabled===!1||!A.state),n.$$.dirty&2&&e(12,a=!((E=A.state)!=null&&E.visible)||((C=A.temporaryState)==null?void 0:C.visible)===!1||!A.screenPosition),n.$$.dirty&2&&e(7,l=(z=A.state)==null?void 0:z.unfolded),n.$$.dirty&2&&e(8,c=A.screenPosition),n.$$.dirty&256&&e(11,d=(c==null?void 0:c.leftPercent)+"%"),n.$$.dirty&256&&e(10,h=(c==null?void 0:c.topPercent)+"%"),n.$$.dirty&130&&e(9,f=l?((R=A.zIndex)!=null?R:0)+(l?1e6:0):void 0)},[m,A,p,g,v,y,P,l,c,f,h,d,a,r,o,s,i,I]}class KP extends ce{constructor(t){super(),le(this,t,qP,JP,ae,{withAnimation:0,tag:1,mediaStore:2,rendererMap:3,contentTypeMap:4,state:5,temporaryState:6},WP)}}function $P(n){me(n,"svelte-p0nosq",".tag--container.svelte-p0nosq{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-p0nosq{transition:opacity 0.2s linear}.tag--container.hide.svelte-p0nosq{opacity:0;pointer-events:none}.tag--container.hide.svelte-p0nosq *{pointer-events:none !important}")}function rf(n,t,e){const i=n.slice();return i[8]=t[e],i}function af(n){let t,e=[],i=new Map,s,o=n[1];const r=a=>a[8].id;for(let a=0;a<o.length;a+=1){let l=rf(n,o,a),c=r(l);i.set(c,e[a]=lf(c,l))}return{c(){t=x("div");for(let a=0;a<e.length;a+=1)e[a].c();w(t,"class","tag--container svelte-p0nosq"),$(t,"hide",!n[5].visible||!n[6].visible),$(t,"withAnimation",n[0])},m(a,l){O(a,t,l);for(let c=0;c<e.length;c+=1)e[c]&&e[c].m(t,null);s=!0},p(a,l){l&127&&(o=a[1],he(),e=Bt(e,l,r,1,a,o,i,t,fi,lf,null,rf),ue()),(!s||l&96)&&$(t,"hide",!a[5].visible||!a[6].visible),(!s||l&1)&&$(t,"withAnimation",a[0])},i(a){if(!s){for(let l=0;l<o.length;l+=1)D(e[l]);s=!0}},o(a){for(let l=0;l<e.length;l+=1)T(e[l]);s=!1},d(a){a&&j(t);for(let l=0;l<e.length;l+=1)e[l].d()}}}function lf(n,t){let e,i,s;return i=new KP({props:{state:t[5],temporaryState:t[6],withAnimation:t[0],tag:t[8],mediaStore:t[2],rendererMap:t[3],contentTypeMap:t[4]}}),{key:n,first:null,c(){e=Ie(),oe(i.$$.fragment),this.first=e},m(o,r){O(o,e,r),ne(i,o,r),s=!0},p(o,r){t=o;const a={};r&32&&(a.state=t[5]),r&64&&(a.temporaryState=t[6]),r&1&&(a.withAnimation=t[0]),r&2&&(a.tag=t[8]),r&4&&(a.mediaStore=t[2]),r&8&&(a.rendererMap=t[3]),r&16&&(a.contentTypeMap=t[4]),i.$set(a)},i(o){s||(D(i.$$.fragment,o),s=!0)},o(o){T(i.$$.fragment,o),s=!1},d(o){o&&j(e),se(i,o)}}}function e2(n){let t,e,i=n[5].enabled&&af(n);return{c(){i&&i.c(),t=Ie()},m(s,o){i&&i.m(s,o),O(s,t,o),e=!0},p(s,[o]){s[5].enabled?i?(i.p(s,o),o&32&&D(i,1)):(i=af(s),i.c(),D(i,1),i.m(t.parentNode,t)):i&&(he(),T(i,1,1,()=>{i=null}),ue())},i(s){e||(D(i),e=!0)},o(s){T(i),e=!1},d(s){i&&i.d(s),s&&j(t)}}}function t2(n,t,e){let{withAnimation:i=!1}=t,{tags:s=[]}=t,{hooks:o}=t,{mediaStore:r}=t,{rendererMap:a}=t,{contentTypeMap:l}=t,{state:c}=t,{temporaryState:d}=t;return rr("hooks",o),n.$$set=h=>{"withAnimation"in h&&e(0,i=h.withAnimation),"tags"in h&&e(1,s=h.tags),"hooks"in h&&e(7,o=h.hooks),"mediaStore"in h&&e(2,r=h.mediaStore),"rendererMap"in h&&e(3,a=h.rendererMap),"contentTypeMap"in h&&e(4,l=h.contentTypeMap),"state"in h&&e(5,c=h.state),"temporaryState"in h&&e(6,d=h.temporaryState)},[i,s,r,a,l,c,d,o]}class i2 extends ce{constructor(t){super(),le(this,t,t2,e2,ae,{withAnimation:0,tags:1,hooks:7,mediaStore:2,rendererMap:3,contentTypeMap:4,state:5,temporaryState:6},$P)}}const n2=new Fn.GLTFLoader;function s2(n){return new Promise((t,e)=>{function i(o){t(o)}function s(o){e(o)}n2.load(n,i,void 0,s)})}const o2=new Map,r2=new Map;class a2 extends iy{constructor(e){super(e);u(this,"rendererMap",new Map);u(this,"contentTypeMap",new Map);u(this,"group",new G.Group);u(this,"imagePlaneGroup",new G.Group);u(this,"gltfObjectGroup",new G.Group);u(this,"enabledModelTagSet",new Set);u(this,"temporaryState",{visible:!0});u(this,"TagContainerSvelte");u(this,"loadModel",e=>W(this,null,function*(){var a;const i=e.data.modelUrl;if(!i)return;e.loading=!0;const s=s2(i).then(l=>{var h;const c=Object.assign(l.scene,{customID:e.id,isTagModel:!0,removeEventListener:this.getTagConfig(e).clickable===!1?()=>{}:this.addObjectClickHandler(e,l.scene,f=>{this.hooks.emit("click",{target:"TagModel",tag:e,event:f})})});return c.visible=this.getCurrentVisibleState(e),new G.Matrix4().fromArray(e.matrix).decompose(c.position,c.quaternion,c.scale),c.updateWorldMatrix(!0,!0),c.visible=this.getVisible(e),(h=this.getTagConfig(e).modelConfig)!=null&&h.autoLookAtEnabled&&c.lookAt(this.five.camera.position.clone().setY(c.position.y)),c});e.model={promise:s};const o=yield s;if(e.loading=!1,((a=e.model)==null?void 0:a.promise)!==s||!this.tags.includes(e))return;e.model.object=o;const r=this.gltfObjectGroup.children.find(l=>l.customID===e.id);if(r&&(this.gltfObjectGroup.remove(r),r.removeEventListener()),this.updateRender3DDomTag(),Ut(e)){if(this.getRenderType(e)==="Mesh"&&!e.mediaPlane){const l=e.data.mediaPosition.map($t);e.mediaPlane=new wh(e.data.mediaData[0].url,e.data.mediaPosition.map($t),{objectFit:e.data.objectFit});const c=new G.Vector3().addVectors(l[0],l[2]).divideScalar(2);e.mediaPlane.position.copy(c),o.add(e.mediaPlane)}this.getRenderType(e)!=="Mesh"&&(o.updateTagCss3DObjectMatrix=()=>this.updateTagCss3DObjectMatrix(e,o),o.updateTagCss3DObjectMatrix())}return this.gltfObjectGroup.add(o),o}));this.group.name="PanoTagPluginModelGroup",this.gltfObjectGroup.name="PanoTagPluginGLTFObjectGroup",this.imagePlaneGroup.name="ImagePlaneGroup",this.group.add(this.gltfObjectGroup),this.group.add(this.imagePlaneGroup)}registerRenderer(e,i,s){var o;this.rendererMap.set(e,{renderer:i,usePoint:(o=s==null?void 0:s.usePoint)!=null?o:!1})}bindRenderer(e,i){this.contentTypeMap.set(e,i)}clearTags(){this.tags.forEach(e=>{var i,s;(s=(i=e.mediaPlane)==null?void 0:i.parent)==null||s.remove(e.mediaPlane)}),this.tags=[],this.enabledModelTagSet.clear(),this.clearCache(),this.disposeAllCSS3DContainer(),this.updateRenderAllTags()}updateRenderAllTags(){this.enabledModelTagSet.clear(),this.tags.forEach(e=>e.stickType==="Model"&&this.enabledModelTagSet.add(e.id)),this.updateRenderPointTag(),this.updateRender3DDomTag(),this.updateRenderModelTag(),this.updateRenderImagePlane(),this.updateRenderVideoPlane()}updateRenderVideoPlane(){this.filterImagePlane.filter(i=>{var s,o;return((o=(s=i.data.mediaData)==null?void 0:s[0])==null?void 0:o.type)==="Video"}).forEach(i=>{var d;const s=i.data.mediaData[0];if(!s)return;const{url:o}=s;if(!o)return;const r=this.getCurrentVisibleState(i),a=(()=>!!(i.mediaPlane&&!r))(),l=(()=>!!(!i.mediaPlane&&r))(),c=(()=>!!(i.mediaPlane&&i.mediaPlane.src!==o))();if((a||c)&&i.mediaPlane&&(this.imagePlaneGroup.remove(i.mediaPlane),i.mediaPlane.dispose(),i.mediaPlane.removeFromParent(),i.mediaPlane=void 0),l||c){const h=i.position.map($t),f=new Ch(o,h,{videoCoverSrc:s.videoCoverUrl,playButton:i.data.playIcon,paused:!((d=i.data.autoplayConfig)!=null&&d.autoplayVideo),objectFit:i.data.objectFit,videoTextureMap:o2,ImageTextureMap:r2,domEvents:this.domEvents});f.onVideoReady=A=>{A.addEventListener("play",()=>this.mediaStore.set({currentMediaElement:f.videoInstance}))};const m=A=>(this.five.on("renderFrame",A),()=>this.five.off("renderFrame",A));f.initialRenderHooks(m),i.mediaPlane=f,this.imagePlaneGroup.add(i.mediaPlane)}})}updateRenderImagePlane(){this.filterImagePlane.filter(i=>{var s,o;return((o=(s=i.data.mediaData)==null?void 0:s[0])==null?void 0:o.type)==="Image"}).forEach(i=>{const{url:s}=i.data.mediaData[0];if(!s)return;const o=i.position.map($t),r=this.getCurrentVisibleState(i),a=(()=>!!(i.mediaPlane&&!r))(),l=(()=>!!(!i.mediaPlane&&r))(),c=(()=>!!(i.mediaPlane&&i.mediaPlane.src!==s))();(a||c)&&i.mediaPlane&&(this.imagePlaneGroup.remove(i.mediaPlane),i.mediaPlane.dispose(),i.mediaPlane.removeFromParent(),i.mediaPlane=void 0),(l||c)&&(i.mediaPlane=new wh(s,o,{objectFit:i.data.objectFit}),this.getTagConfig(i).clickable!==!1&&this.domEvents.addAutoBindEventListener(i.mediaPlane,"click",d=>{this.hooks.emit("click",{tag:i,target:"TagContent",event:d.origDomEvent})}),this.imagePlaneGroup.add(i.mediaPlane))})}updateRender3DDomTag(){this.filterCSS3DTag.forEach(i=>{var s,o,r;if(i.tag3DContentSvelte){const{svelteApp:a,css3DInstance:l,initialNormal:c,currentNormal:d}=i.tag3DContentSvelte;if(a.$set({tag:i,hooks:this.hooks,state:this.state,temporaryState:this.temporaryState}),!c.equals(d)){const h=new G.Quaternion().setFromUnitVectors(c,d);l.css3DObject.setRotationFromQuaternion(h)}return}else{if(Ut(i)&&!((s=i.model)!=null&&s.object)||((o=i.state)==null?void 0:o.visible)===!1||!this.state.visible||!this.state.enabled)return;if(this.css3DRenderPlugin||(this.css3DRenderPlugin=$o(this.five)),i.stickType==="3DPoint"&&!i.normal)return console.error("updateRenderPlaneTag: 三维点标签缺少法向量!");const a=this.getPositions(i);if(!a)return;const l=this.getTagNormal(i);if(!l)return;const c=this.getTagConfig(i),d=V({wrapperStyle:{zIndex:this.calculateTagZIndex(i).toString()}},c.tag3DConfig);if(this.getRenderType(i)==="BehindDom"||d.mode==="behind"){d.mode="behind",d.container=document.createElement("div");const m="black";d.container.style.backgroundColor=m,d.container.style.border=`3px solid ${m}`,this.css3DRenderPlugin.hooks.on("render",()=>{var A;if(h.css3DObject.opacityMesh&&c.clickable!==!1){const p=this.addObjectClickHandler(i,h.css3DObject.opacityMesh,g=>{this.hooks.emit("click",{event:g,target:"TagContent",tag:i})});(A=this.store.css3DRenderDisposer.get(i.id))==null||A.push(p)}})}const h=this.css3DRenderPlugin.create3DDomContainer(a,d);if(!h)return;this.store.css3DRenderDisposer.set(i.id,[h.dispose]);const f=new sf({target:h.container,props:{tag:i,hooks:this.hooks,state:this.state,mediaStore:this.mediaStore,temporaryState:this.temporaryState}});i.tag3DContentSvelte={svelteApp:f,domContainer:h,css3DInstance:h,initialNormal:l,currentNormal:l,dispose:()=>{f.$destroy(),h.dispose()}},Ut(i)&&((r=i.model)!=null&&r.object)&&this.updateTagCss3DObjectMatrix(i,i.model.object)}}),this.clearUnusedPanelTag()}updateRenderModelTag(){const e=o=>!this.enabledModelTagSet.has(o.customID),i=this.gltfObjectGroup.children.filter(e);i.forEach(o=>o.removeEventListener()),this.gltfObjectGroup.remove(...i),this.tags.filter(o=>o.stickType==="Model").forEach(o=>{var r;(r=o.model)==null||r.promise.then(a=>{a.visible=this.getCurrentVisibleState(o)})}),this.five.needsRender=!0}updateTagModelVisible(){this.tags.forEach(e=>{var s;const i=this.getCurrentVisibleState(e);i===!0&&this.getRenderType(e)&&!e.tag3DContentSvelte&&this.updateRender3DDomTag(),e.mediaPlane?e.mediaPlane.visible=i:e.tag3DContentSvelte&&(e.tag3DContentSvelte.css3DInstance.setVisible(i),this.updateDomView()),(s=e.model)!=null&&s.object&&(e.model.object.visible=i)})}updateTagCss3DObjectMatrix(e,i){var p,g,v;const s=(g=(p=this.getTagConfig(e).tag3DConfig)==null?void 0:p.ratio)!=null?g:.00216,o=(v=e.tag3DContentSvelte)==null?void 0:v.css3DInstance.css3DObject;if(!o)return;const r=Ut(e)?e.data.mediaPosition:e.position;if(!r||r.length!==4||!Array.isArray(r[0])||!Array.isArray(r[2]))return;i.updateWorldMatrix(!1,!1);const a=i.matrixWorld,l=new G.Vector3().fromArray(r[0]),c=new G.Vector3().fromArray(r[2]),d=di(l,c).add(new G.Vector3(0,0,5e-4)),h=new G.Matrix4().setPosition(d),f=new G.Matrix4().makeScale(s,s,s),m=new G.Matrix4().multiply(a).multiply(h).multiply(f);m.decompose(o.position,o.quaternion,o.scale);const A=o.opacityMesh;A&&m.decompose(A.position,A.quaternion,A.scale)}addMediaModelTag(e){return W(this,null,function*(){const i=e.filter(B1).map(s=>this.loadModel(s));yield Promise.all(i),this.setVisible(),this.updateRenderAllTags()})}setPointTagPosition(){const e=this.filterPointTag;e.length!==0&&e.forEach(i=>{var a;const s=this.getCurrentVisibleState(i),o=(a=i.__Object__)!=null?a:{timeoutId:void 0,inAnimation:!1};if(i.__Object__=o,!s&&i.screenPosition?(o.inAnimation=!0,o.timeoutId=setTimeout(()=>{requestAnimationFrame(()=>{this.getCurrentVisibleState(i)||(o.inAnimation=!1,i.screenPosition=null,this.updateDomView())})},1e3)):o.timeoutId&&(clearTimeout(o.timeoutId),o.inAnimation=!1,o.timeoutId=void 0),!s&&!o.inAnimation)return;const r=this.getTagProject(i);r?i.screenPosition={leftPercent:(r.x+1)/2*100,topPercent:(-r.y+1)/2*100}:i.screenPosition=null})}updateRenderPointTag(){const e=this.filterPointTag;this.setTagZIndex(e),this.setPointTagPosition(),this.updateDomView()}updatePointTagPosition(){this.setPointTagPosition(),this.updateDomView()}updateTagContainerVisible(){var e;(e=this.TagContainerSvelte)==null||e.$set({state:this.state,temporaryState:this.temporaryState,withAnimation:this.store.visibleWithAnimation}),this.filterCSS3DTag.forEach(i=>{var s,o,r,a,l;(a=(o=(s=i.tag3DContentSvelte)==null?void 0:s.css3DInstance)==null?void 0:o.css3DObject)==null||a.setVisible((this.state.visible&&((r=i.state)==null?void 0:r.visible))!==!1),(l=i.tag3DContentSvelte)==null||l.svelteApp.$set({state:this.state,temporaryState:this.temporaryState,withAnimation:this.store.visibleWithAnimation})})}disposeAllCSS3DContainer(){for(const[,e]of this.store.css3DRenderDisposer)e==null||e.forEach(i=>i==null?void 0:i());this.store.css3DRenderDisposer=new Map}clearUnusedPanelTag(){this.filter2DPointTag.forEach(e=>{var i;(i=e.tag3DContentSvelte)==null||i.css3DInstance.dispose(),e.tag3DContentSvelte=void 0});for(const[e,i]of this.store.css3DRenderDisposer){const s=this.getTagById(e);(!s||s.stickType==="2DPoint")&&(i==null||i.forEach(o=>o==null?void 0:o()),this.store.css3DRenderDisposer.delete(e))}}updateDomView(e={}){var s,o;const i=this.filterPointTag;if(this.TagContainerSvelte)this.TagContainerSvelte.$set({tags:i,state:this.state,temporaryState:this.temporaryState});else{const r=(s=this.five.getElement())==null?void 0:s.parentElement;if(!r)return console.error("updateRenderPlaneTag: tag2DContainer not found");this.TagContainerSvelte=new i2({target:r,props:{hooks:this.hooks,tags:i,state:this.state,temporaryState:this.temporaryState,mediaStore:this.mediaStore,rendererMap:this.rendererMap,contentTypeMap:this.contentTypeMap,withAnimation:(o=e==null?void 0:e.withAnimation)!=null?o:this.store.visibleWithAnimation}})}}}function l2(n){return W(this,null,function*(){return new Promise(t=>{c2(n)?t():n.once("modelLoaded",()=>t())})})}function c2(n){return n.model.loaded}class d2{constructor(t){u(this,"plugin");this.plugin=t}closeIntersectRaycaster(){this.plugin.tags.forEach(t=>{var e;qn((e=t==null?void 0:t.initialConfig)==null?void 0:e.visibleConfig).intersectRaycaster&&(t.initialConfig.visibleConfig.intersectRaycaster.enabled=!1)}),this.plugin.changeGlobalConfig({visibleConfig:{intersectRaycaster:{enabled:!1}}})}}const cf="Dnalogel-PanoTagPlugin",h2=n=>`${cf}--${n}`;class ko extends a2{constructor(e,i){super(e);u(this,"state",{enabled:!0,visible:!0});u(this,"params");u(this,"debug");u(this,"debugUtil",new d2(this));u(this,"changeTagModel",(e,i)=>W(this,null,function*(){e.data=Ve({},e.data,i),yield this.loadModel(e),this.updateRenderAllTags()}));u(this,"whyHide",e=>{var s,o,r;if(!this.state.enabled)return{reason:`plugin.state.enabled is ${this.state.enabled}`};if(!this.state.visible)return{reason:`plugin.state.visible is ${this.state.visible}`};const i=this.getTagById(e);if(!i)return{reason:`tag ${e} not found`};if(!i.enabled)return{reason:`tag ${e} enabled is ${i.enabled}`};if(i.stickType==="Model"||i.stickType==="Plane")return{reason:"maybe blocked by the five model"};if(!i.state.visible){const a=(o=(s=this.getPanoIndexCache({panoIndex:this.five.panoIndex,id:e}))==null?void 0:s.__debug_visible_reason__)==null?void 0:o.reason;return{reason:(r=a==null?void 0:a.type)!=null?r:a,reasonObj:a}}return{reason:"check your eyes"}});u(this,"updateVisible",()=>{const e=this.five.getCurrentState().mode;this.tags.forEach(i=>{Ut(i)&&e!=="Panorama"&&this.changeTagMode(i,"behind")}),this.setVisible(),this.updateRenderAllTags()});u(this,"handleFiveWantsMoveToPano",e=>{this.tags.forEach(i=>{this.getVisible(i,{panoIndex:e})&&(i.state.visible=!0);const o=this.getTagConfig(i);typeof o.visibleConfig=="object"&&i.temporaryState&&(o.visibleConfig.keep?i.temporaryState.visible=o.visibleConfig.keep==="visible":i.temporaryState.visible=!!o.visibleConfig.alwaysShowWhenMovePano)}),this.updateTagContainerVisible(),this.updateRenderImagePlane(),this.updateRenderVideoPlane()});u(this,"clickhandler",e=>{if(e.target!=="TagPoint")return;if(!e.tag.state)return console.warn("Clickhandler: params.tag.state is undefined");const i=this.can("fold",e.tag),s=this.can("unfold",e.tag);i&&s&&(e.tag.state.unfolded=!e.tag.state.unfolded,e.tag.state.unfolded&&this.tags.forEach(o=>{o.id!==e.tag.id&&o.state&&this.can("fold",o)&&(o.state.unfolded=!1)}),this.updateRenderAllTags())});u(this,"handleFiveCameraUpdate",()=>{this.updatePointTagPosition()});u(this,"handleFivePanoArrived",()=>W(this,null,function*(){this.setVisible(),this.updatePointTagPosition(),yield this.setVisibleAndUnfolded(),this.tags.forEach(e=>{e.temporaryState=ge(V({},e.temporaryState),{visible:!0})}),this.tags.filter(O1).filter(e=>{var i;return(i=this.getTagConfig(e).modelConfig)==null?void 0:i.autoLookAtEnabled}).forEach(e=>{var c;const i=new k.Mesh(new k.BoxGeometry,new k.MeshBasicMaterial),s=(c=e.model)==null?void 0:c.object;if(!s)return;i.position.copy(s.position),i.quaternion.copy(s.quaternion);const o=this.five.camera.position;i.lookAt(o.clone().setY(i.position.y));const r=s.quaternion.clone(),a=i.quaternion.clone(),l=tn();l.onUpdate(({progress:d})=>{s.quaternion.copy(r.clone().slerp(a,d))}),l.play()}),this.store.visibleWithAnimation=!0,this.updateTagContainerVisible(),this.updateRenderAllTags()}));u(this,"handleFiveModelShownFloorChange",()=>{this.setVisible(),this.updateRenderAllTags()});u(this,"onFiveEveryReady",()=>{this.setUnfoldedByCamera(),en(this.five.getCurrentState().mode)&&(this.setTagZIndex(this.filterPointTag),this.setVisible(),this.setPointTagPosition()),this.updateDomView({withAnimation:!0}),this.updateRenderVideoPlane(),this.updateRenderImagePlane(),this.updateTagModelVisible()});this.params=Ve({},{debug:!1,config:this.config},V({},i)),this.debug=this.params.debug,this.config=this.params.config,_1(1,{namespace:_r.PlayAudio});try{const s=window;Array.isArray(s.__PANOTAGPLUGIN_DEBUG_LIST__)||(s.__PANOTAGPLUGIN_DEBUG_LIST__=[]),s.__PANOTAGPLUGIN_DEBUG_LIST__.push(this),s.__PANOTAGPLUGIN_DEBUG__=this}catch(s){}}load(e,i){return W(this,null,function*(){var o,r;this.clearTags(),console.debug(cf," load:",{data:JSON.parse(JSON.stringify(e))}),this.config=Ve({},this.config,{globalConfig:(o=e.globalConfig)!=null?o:{},contentTypeConfig:(r=e.contentTypeConfig)!=null?r:{}});const s=yield this.addTag(e.tagList,i);if(this.debug)try{L1(this.five,this.tags)}catch(a){console.error(a)}return s})}addTag(e,i){return W(this,null,function*(){const o=(Array.isArray(e)?e:[e]).filter(r=>r.position).map(r=>{var f,m,A;const a=JSON.parse(JSON.stringify(r.data)),l=r.config?JSON.parse(JSON.stringify(r.config)):{};r.initialConfig=l;const c=this.calculateTagConfig(r),d=this.getTagConfig(r);return r.config=d,ge(V({},r),{enabled:(f=r.enabled)!=null?f:!0,id:(m=r.id)!=null?m:nt(),data:(A=d.initialData)!=null&&A.important?Ve(r.data,a,d.initialData):Ve(r.data,d.initialData,a),state:V({visible:void 0,unfolded:!this.can("fold",r)},d.initialState),hooks:new Ae.Subscribe,originPosition:r.position,position:(()=>{const p=this.getTransformedPostion(r.position);return Array.isArray(p)?p.map(v=>v.toArray()):p.toArray()})(),initialConfig:l,computedConfig:c,config:d,unfold:()=>this.changeUnfoldedById(r.id,!0),fold:()=>this.changeUnfoldedById(r.id,!1),enable:()=>this.changeEnabledById(r.id,!0),disable:()=>this.changeEnabledById(r.id,!1),destroy:()=>this.destroyTagById(r.id),changeData:p=>this.changeDataById(r.id,p)})});return o.forEach(N1),this.tags.push(...o),l2(this.five).then(()=>W(this,null,function*(){var r,a,l;this.store.eventListenerDisposer&&((a=(r=this.store).eventListenerDisposer)==null||a.call(r)),this.state.enabled&&this.handleEnable(),this.addResizeListener(),this.clearUnusedPanelTag(),this.addMediaModelTag(o),this.setVisibleAndUnfolded({withAnimation:(l=i==null?void 0:i.withAnimation)!=null?l:!0}),this.updatePointTagPosition(),this.updateRenderAllTags()}))})}changeConfig(e,i=!0){i?this.config=Ve({},this.config,e):this.config=e,this.updateTagConfig(),this.updateRenderAllTags()}changeGlobalConfig(e,i=!0){i?this.config.globalConfig=Ve({},this.config.globalConfig,e):this.config.globalConfig=e,this.updateTagConfig(),this.setVisible(),this.updateRenderAllTags()}changeContentTypeConfig(e,i,s=!0){this.config.contentTypeConfig||(this.config.contentTypeConfig={}),s?this.config.contentTypeConfig[e]=Ve({},this.config.contentTypeConfig[e],i):this.config.contentTypeConfig[e]=i,this.updateTagConfig(),this.updateRenderAllTags()}show(e){return W(this,null,function*(){if(this.checkDisposed())return;const{userAction:i=!0,withAnimation:s=!1}=e!=null?e:{};this.setState({visible:!0},{userAction:i,visibleWithAnimation:s}),this.hooks.emit("show",{userAction:i,withAnimation:s})})}hide(e){return W(this,null,function*(){if(this.checkDisposed())return;const{userAction:i=!0,withAnimation:s=!1}=e!=null?e:{};this.setState({visible:!1},{userAction:i,visibleWithAnimation:s}),this.hooks.emit("hide",{userAction:i,withAnimation:s})})}enable(e){if(this.checkDisposed())return;const{userAction:i=!0}=e!=null?e:{};this.setState({enabled:!0},{userAction:i}),this.hooks.emit("enable",{userAction:i})}disable(e){if(this.checkDisposed())return;const{userAction:i=!0}=e!=null?e:{};this.setState({enabled:!1},{userAction:i}),this.hooks.emit("disable",{userAction:i})}setState(e,i){if(this.checkDisposed())return;const{userAction:s=!0,visibleWithAnimation:o=!1}=i!=null?i:{},r=V({},this.state);this.state=Object.assign(this.state,e),this.store.visibleWithAnimation=o,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:s})}dispose(){var e,i,s,o,r,a;this.pauseCurrentMedia(),this.disposeAllCSS3DContainer(),(e=this.TagContainerSvelte)==null||e.$destroy(),this.filterCSS3DTag.forEach(l=>{var c;return(c=l.tag3DContentSvelte)==null?void 0:c.svelteApp.$destroy()}),this.tags=[],(i=this.store.disposers)==null||i.forEach(l=>l==null?void 0:l()),this.store.disposers=[],(o=(s=this.store).eventListenerDisposer)==null||o.call(s),this.store.eventListenerDisposer=void 0,(a=(r=this.store).resizeObserverDisposer)==null||a.call(r),this.store.resizeObserverDisposer=void 0,this.store.resizeObserverDisposerAdding=!1,this.five.scene.remove(this.group),this.group.remove(...this.group.children),this.gltfObjectGroup.remove(...this.gltfObjectGroup.children),this.imagePlaneGroup.remove(...this.imagePlaneGroup.children),this.clearCache(),this.five.needsRender=!0,this.store.disposed=!0,this.hooks.emit("dispose")}changeUnfoldedById(e,i){var a;const s=this.getTagById(e);if(!s)return;const o=this.can("fold",s),r=this.can("unfold",s);if(o&&r){s.state.unfolded=i;const l=this.filterPointTag;(a=this.TagContainerSvelte)==null||a.$set({tags:l})}else console.warn(`tag ${e} cannot be ${i?"unfolded":"folded"}`)}changeEnabledById(e,i){const s=this.getTagById(e);s&&(s.enabled=i,this.updateRenderAllTags())}changeTagNormalById(e,i){const s=this.getTagById(e);s&&s.tag3DContentSvelte&&(s.tag3DContentSvelte.currentNormal=$t(i))}changeDataById(e,i,s=!0){const o=this.getTagById(e);let r=!1;o&&(o.data&&(r=!0),s?o.data=Ve(o.data,i):o.data=V(V({},o.data),i),this.clearUnusedPanelTag(),this.updateRenderAllTags(),r&&o.hooks.emit("dataChanged",o.data))}changeStickTypeById(e,i,s=!0){this.changeTagById(e,i,s)}changeTagById(e,i,s=!0){const o=this.getTagById(e);let r=!1;i&&(i.data&&(r=!0),s?Ve(o,i):Object.assign(o,i),o!=null&&o.tag3DContentSvelte&&(i!=null&&i.normal)&&(o.tag3DContentSvelte.currentNormal=$t(i.normal)),this.setVisible(),this.updateRenderAllTags(),this.clearUnusedPanelTag(),r&&o.hooks.emit("dataChanged",o.data))}destroyTagById(e){(Array.isArray(e)?e:[e]).forEach(s=>{const o=this.tags.findIndex(r=>r.id===s);o!==-1&&this.tags.splice(o,1)}),this.updateRenderAllTags()}setVisibleAndUnfolded(){return W(this,arguments,function*({withAnimation:e}={withAnimation:!1}){return this.setVisible(),e?new Promise(i=>{setTimeout(()=>{this.setUnfoldedByPanoIndex(),i()},10)}):(this.setUnfoldedByPanoIndex(),Promise.resolve())})}handleShow(){this.state.visible=!0,this.group.visible=!0,this.updateTagContainerVisible(),this.updateTagModelVisible(),this.five.needsRender=!0}handleHide(){this.pauseCurrentMedia(),this.state.visible=!1,this.group.visible=!1,this.updateTagContainerVisible(),this.updateTagModelVisible(),this.five.needsRender=!0}handleEnable(){this.state.enabled=!0,this.store.eventListenerDisposer=this.addEventListener(),this.five.scene.children.includes(this.group)||this.five.scene.add(this.group),this.group.traverse(e=>{var i;(i=e==null?void 0:e.updateTagCss3DObjectMatrix)==null||i.call(e)}),this.updateRenderAllTags(),this.five.needsRender=!0}handleDisable(){var e,i,s;this.pauseCurrentMedia(),this.state.enabled=!1,(i=(e=this.store).eventListenerDisposer)==null||i.call(e),this.five.scene.remove(this.group),(s=this.TagContainerSvelte)==null||s.$set({tags:[]}),this.filterCSS3DTag.forEach(o=>{var r;(r=o.tag3DContentSvelte)==null||r.dispose(),o.tag3DContentSvelte=void 0}),this.five.needsRender=!0}addEventListener(){const{five:e,hooks:i}=this;let s=!1;const o=uh(()=>{s||(s=!0,e.ready().then(()=>{this.onFiveEveryReady(),s=!1}))},150);return e.on("cameraUpdate",o),this.updateVisible(),this.handleFivePanoArrived(),e.on("wantsMoveToPano",this.handleFiveWantsMoveToPano),e.on("modeChange",this.updateVisible),e.on("initAnimationEnded",this.updateVisible),e.on("modelShownFloorChange",this.handleFiveModelShownFloorChange),e.on("cameraUpdate",this.handleFiveCameraUpdate),e.on("panoArrived",this.handleFivePanoArrived),e.on("panoArrived",this.loadVideoFirstFrame),i.on("click",this.clickhandler),()=>{e.off("wantsMoveToPano",this.handleFiveWantsMoveToPano),e.off("modeChange",this.updateVisible),e.off("initAnimationEnded",this.updateVisible),e.off("modelShownFloorChange",this.handleFiveModelShownFloorChange),e.off("cameraUpdate",this.handleFiveCameraUpdate),e.off("cameraUpdate",o),e.off("panoArrived",this.handleFivePanoArrived),e.off("panoArrived",this.loadVideoFirstFrame),i.off("click",this.clickhandler),this.store.eventListenerDisposer=void 0}}addResizeListener(){if(!this.store.resizeObserverDisposer&&!this.store.resizeObserverDisposerAdding){const e=this.addResizeObserver();this.store.resizeObserverDisposerAdding=!0,setTimeout(()=>{this.store.resizeObserverDisposer=e,this.store.resizeObserverDisposerAdding=!1},200)}}addResizeObserver(){if(!this.store.disposed)return;const e=this.five.getElement(),i=()=>{this.state.enabled&&(this.show(),this.updateRenderAllTags())},s=()=>{this.state.enabled&&this.hide()},{observe:o,unobserve:r}=Hr(uh(()=>{this.store.resizeObserverDisposer&&s()},500),e),{observe:a,unobserve:l}=Hr(Q1(()=>i(),400),e);return o(),a(),()=>{r(),l()}}setUnfoldedByCamera(){let e=!1;this.filterPointTag.forEach(i=>{const s=this.getUnfoldedByCamera(i);i.state&&s!==void 0&&(s===!0&&(e=!0),i.state.unfolded=s)}),e&&this.filterPointTag.forEach(i=>{const s=this.getTagConfig(i).unfoldedConfig;typeof s=="object"&&(s.autoUnfold||s.keep)||i.state&&(i.state.unfolded=!1)})}changeTagMode(e,i){var s,o,r,a,l,c;((s=e.config)==null?void 0:s.renderType)!=="Mesh"&&((a=(r=(o=e.tag3DContentSvelte)==null?void 0:o.css3DInstance)==null?void 0:r.css3DObject)==null?void 0:a.mode)!==i&&((l=e.config)!=null&&l.tag3DConfig?e.config.tag3DConfig.mode=i:e.config?e.config.tag3DConfig={mode:i}:e.config={tag3DConfig:{mode:i}},(c=this.store.css3DRenderDisposer.get(e.id))==null||c.forEach(d=>d==null?void 0:d()),e.tag3DContentSvelte=void 0)}}const u2=(n,t)=>new ko(n,t);function f2(n){me(n,"svelte-4qjwer",".guide-line__tag.svelte-4qjwer.svelte-4qjwer{position:relative}.text-with-distance.svelte-4qjwer.svelte-4qjwer{display:flex;flex-direction:column;position:relative;padding:0.125rem 0.25rem;border-radius:0.125rem;background:linear-gradient(to top, rgba(147, 147, 147, 0.3), rgba(74, 74, 74, 0.3));box-shadow:0 0.125rem 0.5rem 0 rgba(0, 0, 0, 0.2)}.text-with-distance.svelte-4qjwer .border.svelte-4qjwer{position:absolute;top:-50%;right:-50%;bottom:-50%;left:-50%;padding:0.0625rem;border-radius:0.25rem;background:linear-gradient(to right, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.2));-webkit-mask:linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);mask-composite:exclude;-webkit-mask-composite:xor;transform:scale(0.5)}.distance-and-name.svelte-4qjwer.svelte-4qjwer{display:flex;gap:0.1875rem}.distance.svelte-4qjwer.svelte-4qjwer{white-space:nowrap;font-size:0.625rem;line-height:0.875rem;color:#66afff}.name.svelte-4qjwer.svelte-4qjwer{opacity:0.6;font-size:0.625rem;line-height:0.875rem;white-space:nowrap;color:#ffffff}.line-name.svelte-4qjwer.svelte-4qjwer{color:#fff;white-space:nowrap;font-size:0.625rem;line-height:0.875rem}.guide-line__tag-point.svelte-4qjwer.svelte-4qjwer{position:absolute;left:50%;bottom:0.0625rem;width:0.4375rem;height:0.125rem;transform:translateX(-50%);background:#fff;border-radius:50%;opacity:0.5}.guide-line__tag-line.svelte-4qjwer.svelte-4qjwer{position:absolute;left:50%;bottom:0.0625rem;width:0.0625rem;height:1.875rem;transform:translateX(-50%);background:linear-gradient(to top, #fff, rgba(255, 255, 255, 0))}.guide-line__tag-content.svelte-4qjwer.svelte-4qjwer{position:absolute;left:-0.9375rem;bottom:1.9375rem;display:flex}.guide-line__tag-icon.svelte-4qjwer.svelte-4qjwer{width:1.875rem;height:1.875rem;background-size:100%}.guide-line__tag-text.svelte-4qjwer.svelte-4qjwer{box-sizing:content-box;height:0.875rem;width:-moz-max-content;width:max-content;margin-top:0.3125rem;transform:translateX(-0.1875rem);white-space:nowrap;font-size:0.625rem;line-height:0.875rem;border:solid transparent;border-width:0.125rem 0.5rem 0.125rem 0.375rem;border-image-slice:6 25 6 18 fill;color:#fff}")}function df(n){let t,e;return{c(){t=x("div"),e=De(n[0]),w(t,"class","guide-line__tag-text svelte-4qjwer"),S(t,"border-image-source",`url(${n[6]})`)},m(i,s){O(i,t,s),L(t,e)},p(i,s){s&1&&Se(e,i[0])},d(i){i&&j(t)}}}function hf(n){let t,e,i,s,o=n[5]("全程")+"",r,a,l=n[5]("米")+"",c,d,h,f,m,A,p=n[4]&&uf(n);return{c(){t=x("div"),p&&p.c(),e=K(),i=x("div"),s=x("span"),r=De(o),a=De(n[2]),c=De(l),d=K(),h=x("span"),f=De(n[0]),m=K(),A=x("div"),w(s,"class","distance svelte-4qjwer"),w(h,"class","name svelte-4qjwer"),w(i,"class","distance-and-name svelte-4qjwer"),w(A,"class","border svelte-4qjwer"),w(t,"class","text-with-distance svelte-4qjwer")},m(g,v){O(g,t,v),p&&p.m(t,null),L(t,e),L(t,i),L(i,s),L(s,r),L(s,a),L(s,c),L(i,d),L(i,h),L(h,f),L(t,m),L(t,A)},p(g,v){g[4]?p?p.p(g,v):(p=uf(g),p.c(),p.m(t,e)):p&&(p.d(1),p=null),v&32&&o!==(o=g[5]("全程")+"")&&Se(r,o),v&4&&Se(a,g[2]),v&32&&l!==(l=g[5]("米")+"")&&Se(c,l),v&1&&Se(f,g[0])},d(g){g&&j(t),p&&p.d()}}}function uf(n){let t,e;return{c(){t=x("span"),e=De(n[4]),w(t,"class","line-name svelte-4qjwer")},m(i,s){O(i,t,s),L(t,e)},p(i,s){s&16&&Se(e,i[4])},d(i){i&&j(t)}}}function m2(n){let t,e,i,s,o,r,a,l,c,d=n[0]&&!n[2]&&df(n),h=n[2]&&hf(n);return{c(){t=x("div"),e=x("div"),i=K(),s=x("div"),o=K(),r=x("div"),a=x("div"),l=K(),d&&d.c(),c=K(),h&&h.c(),w(e,"class","guide-line__tag-point svelte-4qjwer"),w(s,"class","guide-line__tag-line svelte-4qjwer"),w(a,"class","guide-line__tag-icon svelte-4qjwer"),S(a,"background-image",`url(${n[1]})`),w(r,"class","guide-line__tag-content svelte-4qjwer"),w(t,"class","guide-line__tag svelte-4qjwer"),S(t,"opacity",n[3])},m(f,m){O(f,t,m),L(t,e),L(t,i),L(t,s),L(t,o),L(t,r),L(r,a),L(r,l),d&&d.m(r,null),L(r,c),h&&h.m(r,null)},p(f,[m]){m&2&&S(a,"background-image",`url(${f[1]})`),f[0]&&!f[2]?d?d.p(f,m):(d=df(f),d.c(),d.m(r,c)):d&&(d.d(1),d=null),f[2]?h?h.p(f,m):(h=hf(f),h.c(),h.m(r,null)):h&&(h.d(1),h=null),m&8&&S(t,"opacity",f[3])},i:J,o:J,d(f){f&&j(t),d&&d.d(),h&&h.d()}}}function g2(n,t,e){let{text:i=""}=t,{icon_url:s=""}=t,{distance:o=0}=t,{opacity:r=1}=t,{name:a=""}=t,{i18n:l=d=>d}=t;const c="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHUAAAA2CAMAAADOFiZMAAACEFBMVEUAAACIiIheXl5oaGh6enpsbGxiYmJ9fX1wcHBXV1eBgYFzc3NSUlKNjY2Dg4NOTk51dXVXV1dmZmZTU1N3d3dcXFyMjIyEhIRNTU2QkJC0tLS5ubnHx8fOzs6np6exsbHKysqoqKi9vb3U1NTPz8/Nzc2vr6/Dw8OysrK/v7/X19fS0tKurq62traqqqrJycmurq64uLifn5/Dw8O6urqQkJC6urro6Ojt7e3o6OjU1NS3t7fBwcGjo6Ozs7Orq6u1tbXAwMCurq6rq6vy8vLx8fHr6+vp6enZ2dnd3d3a2trX19fV1dW/v7/IyMihoaGampqVlZWLi4uCgoK+vr6urq7m5ubw8PDk5OTu7u7i4uLg4ODe3t7q6urS0tLi4uLOzs7e3t7Hx8fa2tqrq6vExMTAwMCnp6efn5+WlpaHh4ezs7OoqKiJiYm6urqZmZmurq59fX29vb23t7e4uLipqanp6enc3Nza2trW1tbT09Pm5ubj4+PQ0NDg4ODExMTCwsK7u7vBwcG8vLy5ubm8vLy+vr64uLiysrKdnZ3CwsJoaGisrKzHx8ekpKTExMTv7+/i4uLa2trm5ubk5OTLy8vKysrExMTQ0NDX19ecnJzT09N/f3+dnZ12dnaQkJCXl5etra3Pz8+4uLiXl5fGxsaqqqrr6+vQ0NDKysrNzc3W1takpKShoaGsrKysrKyduRZkAAAAsHRSTlMATE1NTExMTUxNTExMTExNTExMTU1MTU1MTICFc313fnl0iIWAe3h3aYqIgXx7eXZzcnF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RzxGhjoBQ0BT848foqfONkT6FAAWrce3PeEpA5vZPsDf23aIhgpfIiEiIiH/mKftPfKJxTjaNv8bM6zlSzk5dmIsMDk7EGrMEbj+e+q5xLjoyOrQbGiCCaZh5/PgLzy8YiIrgNPmaZtQovP6J3ezNafTvxEfHQ2An8v/2K47hV4J0ExVBDbNCD4e/nH0lKj1+1RBvMEQboiEMUJI1BOmmGq0pVOP1z3nYF3G53EAIN4SHx4djNyxAkutQA1QnGeD2z3rY199RIZ+EtVxDPaDm9VdspYcWj65pteFaonIDBghpzeXyzNNTbyy8CpgCyCehjnvYx+uf9RTTU9cbo7SbRPmKQBnzaKMI2igthD8jVAvIuM/rXytjfyz4MFqBDgLWPGuA05/sqRQobaOzsBMbFQsRhaAWco/A6Z92FAuU446wWL+aHJWcHJtMOzEDwWrU+PyvHEcFRlkutELInT4NFiCRGqA6yQDWfH5jWdFegXLL8V3qDIsNIySHoRsWIGMN/wBY8/mXRosFxrrDCE20EwJzCGQ9XP7crBN46AdHbthmkPvluICccLzgchnDjBD/eqaxKOOtIKGyiEzDqSFOCt7D4X/dlHFDkNCWPu3fjTHGQBgpbI06TkeIpuQ37bbltAlSKstM/g6EdYcEr0jJv2rLfrZXkFKcPhVjMsWY0GGSrTn00H7TakbD11sChd7qa+gCSKdJVitpyvWLlab6uifsieKtLk1N7QZWtvpYXl4aGxsrAtIJBQVNWVlZOTkZGRm2z7bHW0q2lJRkZ2c3NOTn19fV19fn5zfAsmQL8Nhmg66cHOhvKigoSC/Iysk+vH9//jd2n8g6TG7yjbXZYCAMq6s7fBiah4aGLl0aGLhw4f758zuBmpq+vurq6h07dnR1dXTcrqqq2uejqup2R0dXF8jV1X19NTU1O3feu3f+/oWBgUtD++uePHtbLAThNzRClbi+VnseAAAAAElFTkSuQmCC";return n.$$set=d=>{"text"in d&&e(0,i=d.text),"icon_url"in d&&e(1,s=d.icon_url),"distance"in d&&e(2,o=d.distance),"opacity"in d&&e(3,r=d.opacity),"name"in d&&e(4,a=d.name),"i18n"in d&&e(5,l=d.i18n)},[i,s,o,r,a,l,c]}class p2 extends ce{constructor(t){super(),le(this,t,g2,m2,ae,{text:0,icon_url:1,distance:2,opacity:3,name:4,i18n:5},f2)}}function A2(n){return n.length===0?[]:n.filter((t,e)=>t!==n[e-1])}const v2=`
584
+ width var(--sc-dot-size-animation-time) ease;cursor:pointer;-webkit-tap-highlight-color:transparent;height:var(--sc-dot-size);width:var(--sc-dot-size)}.sc-carousel-dot__dot.svelte-1mgyhhn:hover{opacity:0.9}.sc-carousel-dot__dot_active.svelte-1mgyhhn{opacity:0.7;height:var(--sc-active-dot-size);width:var(--sc-active-dot-size)}`)}function Xy(n){let t,e,i;return{c(){t=x("button"),w(t,"class","sc-carousel-button sc-carousel-dot__dot svelte-1mgyhhn"),$(t,"sc-carousel-dot__dot_active",n[0])},m(s,o){O(s,t,o),e||(i=be(t,"click",n[1]),e=!0)},p(s,[o]){o&1&&$(t,"sc-carousel-dot__dot_active",s[0])},i:J,o:J,d(s){s&&j(t),e=!1,i()}}}function Zy(n,t,e){let{active:i=!1}=t;function s(o){cn.call(this,n,o)}return n.$$set=o=>{"active"in o&&e(0,i=o.active)},[i,s]}class Jy extends ce{constructor(t){super(),le(this,t,Zy,Xy,ae,{active:0},Yy)}}function qy(n){me(n,"svelte-670fde",".sc-carousel-dots__container.svelte-670fde{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;padding:0 30px}.sc-carousel-dots__dot-container.svelte-670fde{height:calc(var(--sc-dot-size) + 14px);width:calc(var(--sc-dot-size) + 10px);display:flex;align-items:center;justify-content:center}")}function _h(n,t,e){const i=n.slice();return i[5]=t[e],i[7]=e,i}function Hh(n,t){let e,i,s,o;function r(){return t[3](t[7])}return i=new Jy({props:{active:t[1]===t[7]}}),i.$on("click",r),{key:n,first:null,c(){e=x("div"),oe(i.$$.fragment),s=K(),w(e,"class","sc-carousel-dots__dot-container svelte-670fde"),this.first=e},m(a,l){O(a,e,l),ne(i,e,null),L(e,s),o=!0},p(a,l){t=a;const c={};l&3&&(c.active=t[1]===t[7]),i.$set(c)},i(a){o||(D(i.$$.fragment,a),o=!0)},o(a){T(i.$$.fragment,a),o=!1},d(a){a&&j(e),se(i)}}}function Ky(n){let t,e=[],i=new Map,s,o=Array(n[0]);const r=a=>a[7];for(let a=0;a<o.length;a+=1){let l=_h(n,o,a),c=r(l);i.set(c,e[a]=Hh(c,l))}return{c(){t=x("div");for(let a=0;a<e.length;a+=1)e[a].c();w(t,"class","sc-carousel-dots__container svelte-670fde")},m(a,l){O(a,t,l);for(let c=0;c<e.length;c+=1)e[c]&&e[c].m(t,null);s=!0},p(a,[l]){l&7&&(o=Array(a[0]),he(),e=Bt(e,l,r,1,a,o,i,t,fi,Hh,null,_h),ue())},i(a){if(!s){for(let l=0;l<o.length;l+=1)D(e[l]);s=!0}},o(a){for(let l=0;l<e.length;l+=1)T(e[l]);s=!1},d(a){a&&j(t);for(let l=0;l<e.length;l+=1)e[l].d()}}}function $y(n,t,e){const i=Hs();let{pagesCount:s=1}=t,{currentPageIndex:o=0}=t;function r(l){i("pageChange",l)}const a=l=>r(l);return n.$$set=l=>{"pagesCount"in l&&e(0,s=l.pagesCount),"currentPageIndex"in l&&e(1,o=l.currentPageIndex)},[s,o,r,a]}class ew extends ce{constructor(t){super(),le(this,t,$y,Ky,ae,{pagesCount:0,currentPageIndex:1},qy)}}const kn="prev",yi="next";function tw(n){me(n,"svelte-1bftafx",":root{--sc-arrow-size:2px}.sc-carousel-arrow__circle.svelte-1bftafx{width:20px;height:20px;border-radius:50%;background-color:var(--sc-color-rgb-light-50p);display:flex;align-items:center;justify-content:center;transition:opacity 100ms ease;cursor:pointer;-webkit-tap-highlight-color:transparent}.sc-carousel-arrow__circle.svelte-1bftafx:hover{opacity:0.9}.sc-carousel-arrow__arrow.svelte-1bftafx{border:solid var(--sc-color-hex-dark);border-width:0 var(--sc-arrow-size) var(--sc-arrow-size) 0;padding:var(--sc-arrow-size);position:relative}.sc-carousel-arrow__arrow-next.svelte-1bftafx{transform:rotate(-45deg);left:calc(var(--sc-arrow-size) / -2)}.sc-carousel-arrow__arrow-prev.svelte-1bftafx{transform:rotate(135deg);right:calc(var(--sc-arrow-size) / -2)}.sc-carousel-arrow__circle_disabled.svelte-1bftafx,.sc-carousel-arrow__circle_disabled.svelte-1bftafx:hover{opacity:0.5}")}function iw(n){let t,e,i,s;return{c(){t=x("button"),e=x("i"),w(e,"class","sc-carousel-arrow__arrow svelte-1bftafx"),$(e,"sc-carousel-arrow__arrow-next",n[0]===yi),$(e,"sc-carousel-arrow__arrow-prev",n[0]===kn),w(t,"class","sc-carousel-button sc-carousel-arrow__circle svelte-1bftafx"),$(t,"sc-carousel-arrow__circle_disabled",n[1])},m(o,r){O(o,t,r),L(t,e),i||(s=be(t,"click",n[2]),i=!0)},p(o,[r]){r&1&&$(e,"sc-carousel-arrow__arrow-next",o[0]===yi),r&1&&$(e,"sc-carousel-arrow__arrow-prev",o[0]===kn),r&2&&$(t,"sc-carousel-arrow__circle_disabled",o[1])},i:J,o:J,d(o){o&&j(t),i=!1,s()}}}function nw(n,t,e){let{direction:i=yi}=t,{disabled:s=!1}=t;function o(r){cn.call(this,n,r)}return n.$$set=r=>{"direction"in r&&e(0,i=r.direction),"disabled"in r&&e(1,s=r.disabled)},[i,s,o]}class Wh extends ce{constructor(t){super(),le(this,t,nw,iw,ae,{direction:0,disabled:1},tw)}}function sw(n){me(n,"svelte-i7yfid",".sc-carousel-progress__indicator.svelte-i7yfid{height:100%;background-color:var(--sc-color-hex-dark-50p)}")}function ow(n){let t;return{c(){t=x("div"),w(t,"class","sc-carousel-progress__indicator svelte-i7yfid"),S(t,"width",n[0]+"%")},m(e,i){O(e,t,i)},p(e,[i]){i&1&&S(t,"width",e[0]+"%")},i:J,o:J,d(e){e&&j(t)}}}const Uh=100;function rw(n,t,e){let i,{value:s=0}=t;return n.$$set=o=>{"value"in o&&e(1,s=o.value)},n.$$.update=()=>{n.$$.dirty&2&&e(0,i=Math.min(Math.max(s*Uh,0),Uh))},[i,s]}class aw extends ce{constructor(t){super(),le(this,t,rw,ow,ae,{value:1},sw)}}function lw(n,t){n.addEventListener("mousedown",t),n.addEventListener("touchstart",t,{passive:!0})}function cw(n,t){n.removeEventListener("mousedown",t),n.removeEventListener("touchstart",t)}function dw(n,t){n.addEventListener("mouseup",t),n.addEventListener("touchend",t)}function Yh(n,t){n.removeEventListener("mouseup",t),n.removeEventListener("touchend",t)}function hw(n,t){n.addEventListener("mousemove",t),n.addEventListener("touchmove",t)}function Xh(n,t){n.removeEventListener("mousemove",t),n.removeEventListener("touchmove",t)}function Zr(n){return function(t,e){n.dispatchEvent(new CustomEvent(t,{detail:e}))}}const uw=110,fw=9,mw=111,gw=20;function Jr(n){if("TouchEvent"in window&&n instanceof TouchEvent){const t=n.touches[0];return{x:t?t.clientX:0,y:t?t.clientY:0}}return{x:n.clientX,y:n.clientY}}function pw(n,{thresholdProvider:t}){const e=Zr(n);let i,s,o=0,r,a=!1;function l(){return Date.now()-r>=mw&&Math.abs(o)>=gw}function c(f){r=Date.now(),o=0,a=!0;const m=Jr(f);i=m.x,s=m.y,e("swipeStart",{x:i,y:s}),hw(window,d),dw(window,h)}function d(f){if(!a)return;const m=Jr(f),A=m.x-i,p=m.y-s;i=m.x,s=m.y,e("swipeMove",{x:i,y:s,dx:A,dy:p}),A!==0&&Math.sign(A)!==Math.sign(o)&&(o=0),o+=A,Math.abs(o)>t()&&(e("swipeThresholdReached",{direction:o>0?kn:yi}),Yh(window,h),Xh(window,d))}function h(f){if(Yh(window,h),Xh(window,d),a=!1,!l()){e("swipeFailed");return}const m=Jr(f);e("swipeEnd",{x:m.x,y:m.y})}return lw(n,c),{destroy(){cw(n,c)}}}function Aw(n,t){n.addEventListener("mouseenter",t)}function vw(n,t){n.removeEventListener("mouseenter",t)}function bw(n,t){n.addEventListener("mouseleave",t)}function Zh(n,t){n.removeEventListener("mouseleave",t)}function yw(n){const t=Zr(n);function e(){bw(n,i),t("hovered",{value:!0})}function i(){t("hovered",{value:!1}),Zh(n,i)}return Aw(n,e),{destroy(){vw(n,e),Zh(n,i)}}}const ww=(n,t)=>{const e=t.x-n.x,i=t.y-n.y;return Math.sqrt(e*e+i*i)};function Mn(n,t,e){return Math.max(n,Math.min(t,e))}function Cw(n,t){n.addEventListener("touchstart",t,{passive:!0})}function Iw(n,t){n.removeEventListener("touchstart",t)}function Pw(n,t){n.addEventListener("touchend",t)}function Jh(n,t){n.removeEventListener("touchend",t)}function kw(n){const t=Zr(n);let e=0,i={x:0,y:0};function s({tapEndedAt:a,tapEndedPos:l}){const c=a-e,d=ww(i,l);return c<=uw&&d<=fw}function o(a){e=Date.now();const l=a.touches[0];i={x:l.clientX,y:l.clientY},Pw(n,r)}function r(a){Jh(n,r);const l=a.changedTouches[0];s({tapEndedAt:Date.now(),tapEndedPos:{x:l.clientX,y:l.clientY}})&&t("tapped")}return Cw(n,o),{destroy(){Iw(n,o),Jh(n,r)}}}function Mw({currentParticleIndex:n,particlesCount:t,clonesCountHead:e,clonesCountTotal:i,particlesToScroll:s}){return n===t-e?0:n===0?qh({particlesCountWithoutClones:t-i,particlesToScroll:s})-1:Math.floor((n-e)/s)}function Ew({currentParticleIndex:n,particlesToScroll:t}){return Math.ceil(n/t)}function Dw({currentParticleIndex:n,particlesCount:t,clonesCountHead:e,clonesCountTotal:i,infinite:s,particlesToScroll:o}){return s?Mw({currentParticleIndex:n,particlesCount:t,clonesCountHead:e,clonesCountTotal:i,particlesToScroll:o}):Ew({currentParticleIndex:n,particlesToScroll:o})}function qh({particlesCountWithoutClones:n,particlesToScroll:t}){return Math.ceil(n/t)}function xw({particlesCountWithoutClones:n,particlesToScroll:t,particlesToShow:e}){const i=Kh({particlesCountWithoutClones:n,particlesToScroll:t,particlesToShow:e});return Math.ceil(n/t)-i}function Sw({infinite:n,particlesCountWithoutClones:t,particlesToScroll:e,particlesToShow:i}){return n?qh({particlesCountWithoutClones:t,particlesToScroll:e}):xw({particlesCountWithoutClones:t,particlesToScroll:e,particlesToShow:i})}function Lw({pageIndex:n,clonesCountHead:t,clonesCountTail:e,particlesToScroll:i,particlesCount:s}){return Mn(0,Math.min(t+n*i,s-e),s-1)}function Tw({pageIndex:n,particlesToScroll:t,particlesCount:e,particlesToShow:i}){return Mn(0,Math.min(n*t,e-i),e-1)}function qr({infinite:n,pageIndex:t,clonesCountHead:e,clonesCountTail:i,particlesToScroll:s,particlesCount:o,particlesToShow:r}){return n?Lw({pageIndex:t,clonesCountHead:e,clonesCountTail:i,particlesToScroll:s,particlesCount:o}):Tw({pageIndex:t,particlesToScroll:s,particlesCount:o,particlesToShow:r})}function jw({particlesContainerChildren:n,particleWidth:t}){for(let e=0;e<n.length;e++)n[e].style.minWidth=`${t}px`,n[e].style.maxWidth=`${t}px`}function Kh({particlesToScroll:n,particlesToShow:t,particlesCountWithoutClones:e}){const i=n-t;let s=t;for(;;){const o=e-s-i;if(o<t)return Math.max(o,0);s+=t+i}}function zw(n){return new ResizeObserver(t=>{n({width:t[0].contentRect.width})})}function Ow({clonesCountHead:n,clonesCountTail:t,particlesContainerChildren:e}){const i=[];for(let r=0;r<t;r++)i.push(e[r].cloneNode(!0));const s=[],o=e.length;for(let r=o-1;r>o-1-n;r--)s.push(e[r].cloneNode(!0));return{clonesToAppend:i,clonesToPrepend:s}}function Bw({particlesContainer:n,clonesToAppend:t,clonesToPrepend:e}){for(let i=0;i<t.length;i++)n.append(t[i]);for(let i=0;i<e.length;i++)n.prepend(e[i])}function Vw({infinite:n,particlesToShow:t,partialPageSize:e}){const i=n?{head:Math.ceil(e||t),tail:Math.ceil(t)}:{head:0,tail:0};return ge(V({},i),{total:i.head+i.tail})}const ss=(n,t,e)=>{if(n&&n.hasOwnProperty(t))return n[t];if(e===void 0)throw new Error(`Required arg "${t}" was not provided`);return e},Kr=n=>t=>{n[t]&&n[t]()};var Rw="Expected a function",$h="__lodash_hash_undefined__",eu=1/0,Qw="[object Function]",Gw="[object GeneratorFunction]",Nw="[object Symbol]",Fw=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,_w=/^\w*$/,Hw=/^\./,Ww=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Uw=/[\\^$.*+?()[\]{}|]/g,Yw=/\\(\\)?/g,Xw=/^\[object .+?Constructor\]$/,Zw=typeof Et=="object"&&Et&&Et.Object===Object&&Et,Jw=typeof self=="object"&&self&&self.Object===Object&&self,$r=Zw||Jw||Function("return this")();function qw(n,t){return n==null?void 0:n[t]}function Kw(n){var t=!1;if(n!=null&&typeof n.toString!="function")try{t=!!(n+"")}catch(e){}return t}var $w=Array.prototype,eC=Function.prototype,tu=Object.prototype,ea=$r["__core-js_shared__"],iu=function(){var n=/[^.]+$/.exec(ea&&ea.keys&&ea.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}(),nu=eC.toString,ta=tu.hasOwnProperty,su=tu.toString,tC=RegExp("^"+nu.call(ta).replace(Uw,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ou=$r.Symbol,iC=$w.splice,nC=lu($r,"Map"),os=lu(Object,"create"),ru=ou?ou.prototype:void 0,au=ru?ru.toString:void 0;function Gi(n){var t=-1,e=n?n.length:0;for(this.clear();++t<e;){var i=n[t];this.set(i[0],i[1])}}function sC(){this.__data__=os?os(null):{}}function oC(n){return this.has(n)&&delete this.__data__[n]}function rC(n){var t=this.__data__;if(os){var e=t[n];return e===$h?void 0:e}return ta.call(t,n)?t[n]:void 0}function aC(n){var t=this.__data__;return os?t[n]!==void 0:ta.call(t,n)}function lC(n,t){var e=this.__data__;return e[n]=os&&t===void 0?$h:t,this}Gi.prototype.clear=sC,Gi.prototype.delete=oC,Gi.prototype.get=rC,Gi.prototype.has=aC,Gi.prototype.set=lC;function En(n){var t=-1,e=n?n.length:0;for(this.clear();++t<e;){var i=n[t];this.set(i[0],i[1])}}function cC(){this.__data__=[]}function dC(n){var t=this.__data__,e=vo(t,n);if(e<0)return!1;var i=t.length-1;return e==i?t.pop():iC.call(t,e,1),!0}function hC(n){var t=this.__data__,e=vo(t,n);return e<0?void 0:t[e][1]}function uC(n){return vo(this.__data__,n)>-1}function fC(n,t){var e=this.__data__,i=vo(e,n);return i<0?e.push([n,t]):e[i][1]=t,this}En.prototype.clear=cC,En.prototype.delete=dC,En.prototype.get=hC,En.prototype.has=uC,En.prototype.set=fC;function Ni(n){var t=-1,e=n?n.length:0;for(this.clear();++t<e;){var i=n[t];this.set(i[0],i[1])}}function mC(){this.__data__={hash:new Gi,map:new(nC||En),string:new Gi}}function gC(n){return bo(this,n).delete(n)}function pC(n){return bo(this,n).get(n)}function AC(n){return bo(this,n).has(n)}function vC(n,t){return bo(this,n).set(n,t),this}Ni.prototype.clear=mC,Ni.prototype.delete=gC,Ni.prototype.get=pC,Ni.prototype.has=AC,Ni.prototype.set=vC;function vo(n,t){for(var e=n.length;e--;)if(xC(n[e][0],t))return e;return-1}function bC(n,t){t=IC(t,n)?[t]:CC(t);for(var e=0,i=t.length;n!=null&&e<i;)n=n[EC(t[e++])];return e&&e==i?n:void 0}function yC(n){if(!du(n)||kC(n))return!1;var t=SC(n)||Kw(n)?tC:Xw;return t.test(DC(n))}function wC(n){if(typeof n=="string")return n;if(na(n))return au?au.call(n):"";var t=n+"";return t=="0"&&1/n==-eu?"-0":t}function CC(n){return cu(n)?n:MC(n)}function bo(n,t){var e=n.__data__;return PC(t)?e[typeof t=="string"?"string":"hash"]:e.map}function lu(n,t){var e=qw(n,t);return yC(e)?e:void 0}function IC(n,t){if(cu(n))return!1;var e=typeof n;return e=="number"||e=="symbol"||e=="boolean"||n==null||na(n)?!0:_w.test(n)||!Fw.test(n)||t!=null&&n in Object(t)}function PC(n){var t=typeof n;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?n!=="__proto__":n===null}function kC(n){return!!iu&&iu in n}var MC=ia(function(n){n=TC(n);var t=[];return Hw.test(n)&&t.push(""),n.replace(Ww,function(e,i,s,o){t.push(s?o.replace(Yw,"$1"):i||e)}),t});function EC(n){if(typeof n=="string"||na(n))return n;var t=n+"";return t=="0"&&1/n==-eu?"-0":t}function DC(n){if(n!=null){try{return nu.call(n)}catch(t){}try{return n+""}catch(t){}}return""}function ia(n,t){if(typeof n!="function"||t&&typeof t!="function")throw new TypeError(Rw);var e=function(){var i=arguments,s=t?t.apply(this,i):i[0],o=e.cache;if(o.has(s))return o.get(s);var r=n.apply(this,i);return e.cache=o.set(s,r),r};return e.cache=new(ia.Cache||Ni),e}ia.Cache=Ni;function xC(n,t){return n===t||n!==n&&t!==t}var cu=Array.isArray;function SC(n){var t=du(n)?su.call(n):"";return t==Qw||t==Gw}function du(n){var t=typeof n;return!!n&&(t=="object"||t=="function")}function LC(n){return!!n&&typeof n=="object"}function na(n){return typeof n=="symbol"||LC(n)&&su.call(n)==Nw}function TC(n){return n==null?"":wC(n)}function jC(n,t,e){var i=n==null?void 0:bC(n,t);return i===void 0?e:i}var yo=jC,wo={},zC={get exports(){return wo},set exports(n){wo=n}};(function(n,t){var e=200,i="__lodash_hash_undefined__",s=9007199254740991,o="[object Arguments]",r="[object Array]",a="[object Boolean]",l="[object Date]",c="[object Error]",d="[object Function]",h="[object GeneratorFunction]",f="[object Map]",m="[object Number]",A="[object Object]",p="[object Promise]",g="[object RegExp]",v="[object Set]",y="[object String]",P="[object Symbol]",I="[object WeakMap]",E="[object ArrayBuffer]",C="[object DataView]",z="[object Float32Array]",R="[object Float64Array]",U="[object Int8Array]",H="[object Int16Array]",N="[object Int32Array]",F="[object Uint8Array]",Q="[object Uint8ClampedArray]",_="[object Uint16Array]",Y="[object Uint32Array]",Z=/[\\^$.*+?()[\]{}|]/g,q=/\w*$/,ee=/^\[object .+?Constructor\]$/,fe=/^(?:0|[1-9]\d*)$/,de={};de[o]=de[r]=de[E]=de[C]=de[a]=de[l]=de[z]=de[R]=de[U]=de[H]=de[N]=de[f]=de[m]=de[A]=de[g]=de[v]=de[y]=de[P]=de[F]=de[Q]=de[_]=de[Y]=!0,de[c]=de[d]=de[I]=!1;var ke=typeof Et=="object"&&Et&&Et.Object===Object&&Et,Pe=typeof self=="object"&&self&&self.Object===Object&&self,we=ke||Pe||Function("return this")(),Fe=t&&!t.nodeType&&t,Ce=Fe&&!0&&n&&!n.nodeType&&n,Ze=Ce&&Ce.exports===Fe;function te(b,M){return b.set(M[0],M[1]),b}function ye(b,M){return b.add(M),b}function ze(b,M){for(var B=-1,X=b?b.length:0;++B<X&&M(b[B],B,b)!==!1;);return b}function pe(b,M){for(var B=-1,X=M.length,Ee=b.length;++B<X;)b[Ee+B]=M[B];return b}function Ke(b,M,B,X){var Ee=-1,ve=b?b.length:0;for(X&&ve&&(B=b[++Ee]);++Ee<ve;)B=M(B,b[Ee],Ee,b);return B}function rt(b,M){for(var B=-1,X=Array(b);++B<b;)X[B]=M(B);return X}function xe(b,M){return b==null?void 0:b[M]}function it(b){var M=!1;if(b!=null&&typeof b.toString!="function")try{M=!!(b+"")}catch(B){}return M}function re(b){var M=-1,B=Array(b.size);return b.forEach(function(X,Ee){B[++M]=[Ee,X]}),B}function Me(b,M){return function(B){return b(M(B))}}function _e(b){var M=-1,B=Array(b.size);return b.forEach(function(X){B[++M]=X}),B}var Ue=Array.prototype,wt=Function.prototype,nt=Object.prototype,vt=we["__core-js_shared__"],Re=function(){var b=/[^.]+$/.exec(vt&&vt.keys&&vt.keys.IE_PROTO||"");return b?"Symbol(src)_1."+b:""}(),Qe=wt.toString,Je=nt.hasOwnProperty,Rt=nt.toString,cs=RegExp("^"+Qe.call(Je).replace(Z,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Xt=Ze?we.Buffer:void 0,Ci=we.Symbol,_i=we.Uint8Array,Ct=Me(Object.getPrototypeOf,Object),Ln=Object.create,Tn=nt.propertyIsEnumerable,Ia=Ue.splice,ds=Object.getOwnPropertySymbols,jn=Xt?Xt.isBuffer:void 0,Do=Me(Object.keys,Object),zn=Gt(we,"DataView"),Hi=Gt(we,"Map"),Qt=Gt(we,"Promise"),On=Gt(we,"Set"),hs=Gt(we,"WeakMap"),Wi=Gt(Object,"create"),us=bt(zn),Ui=bt(Hi),fs=bt(Qt),ms=bt(On),gs=bt(hs),Ii=Ci?Ci.prototype:void 0,xo=Ii?Ii.valueOf:void 0;function si(b){var M=-1,B=b?b.length:0;for(this.clear();++M<B;){var X=b[M];this.set(X[0],X[1])}}function Pa(){this.__data__=Wi?Wi(null):{}}function ka(b){return this.has(b)&&delete this.__data__[b]}function Ma(b){var M=this.__data__;if(Wi){var B=M[b];return B===i?void 0:B}return Je.call(M,b)?M[b]:void 0}function So(b){var M=this.__data__;return Wi?M[b]!==void 0:Je.call(M,b)}function ps(b,M){var B=this.__data__;return B[b]=Wi&&M===void 0?i:M,this}si.prototype.clear=Pa,si.prototype.delete=ka,si.prototype.get=Ma,si.prototype.has=So,si.prototype.set=ps;function at(b){var M=-1,B=b?b.length:0;for(this.clear();++M<B;){var X=b[M];this.set(X[0],X[1])}}function Ea(){this.__data__=[]}function Da(b){var M=this.__data__,B=Vn(M,b);if(B<0)return!1;var X=M.length-1;return B==X?M.pop():Ia.call(M,B,1),!0}function xa(b){var M=this.__data__,B=Vn(M,b);return B<0?void 0:M[B][1]}function Sa(b){return Vn(this.__data__,b)>-1}function La(b,M){var B=this.__data__,X=Vn(B,b);return X<0?B.push([b,M]):B[X][1]=M,this}at.prototype.clear=Ea,at.prototype.delete=Da,at.prototype.get=xa,at.prototype.has=Sa,at.prototype.set=La;function ut(b){var M=-1,B=b?b.length:0;for(this.clear();++M<B;){var X=b[M];this.set(X[0],X[1])}}function Ta(){this.__data__={hash:new si,map:new(Hi||at),string:new si}}function ja(b){return Xi(this,b).delete(b)}function za(b){return Xi(this,b).get(b)}function Oa(b){return Xi(this,b).has(b)}function Ba(b,M){return Xi(this,b).set(b,M),this}ut.prototype.clear=Ta,ut.prototype.delete=ja,ut.prototype.get=za,ut.prototype.has=Oa,ut.prototype.set=Ba;function It(b){this.__data__=new at(b)}function Va(){this.__data__=new at}function Ra(b){return this.__data__.delete(b)}function Qa(b){return this.__data__.get(b)}function Ga(b){return this.__data__.has(b)}function Na(b,M){var B=this.__data__;if(B instanceof at){var X=B.__data__;if(!Hi||X.length<e-1)return X.push([b,M]),this;B=this.__data__=new ut(X)}return B.set(b,M),this}It.prototype.clear=Va,It.prototype.delete=Ra,It.prototype.get=Qa,It.prototype.has=Ga,It.prototype.set=Na;function Bn(b,M){var B=ys(b)||Qn(b)?rt(b.length,String):[],X=B.length,Ee=!!X;for(var ve in b)(M||Je.call(b,ve))&&!(Ee&&(ve=="length"||tl(ve,X)))&&B.push(ve);return B}function Lo(b,M,B){var X=b[M];(!(Je.call(b,M)&&Bo(X,B))||B===void 0&&!(M in b))&&(b[M]=B)}function Vn(b,M){for(var B=b.length;B--;)if(Bo(b[B][0],M))return B;return-1}function Zt(b,M){return b&&bs(M,Cs(M),b)}function As(b,M,B,X,Ee,ve,Le){var Te;if(X&&(Te=ve?X(b,Ee,ve,Le):X(b)),Te!==void 0)return Te;if(!qt(b))return b;var qe=ys(b);if(qe){if(Te=$a(b),!M)return Ja(b,Te)}else{var Be=ri(b),ft=Be==d||Be==h;if(Vo(b))return Rn(b,M);if(Be==A||Be==o||ft&&!ve){if(it(b))return ve?b:{};if(Te=Jt(ft?{}:b),!M)return qa(b,Zt(Te,b))}else{if(!de[Be])return ve?b:{};Te=el(b,Be,As,M)}}Le||(Le=new It);var Pt=Le.get(b);if(Pt)return Pt;if(Le.set(b,Te),!qe)var $e=B?Ka(b):Cs(b);return ze($e||b,function(mt,lt){$e&&(lt=mt,mt=b[lt]),Lo(Te,lt,As(mt,M,B,X,lt,b,Le))}),Te}function Fa(b){return qt(b)?Ln(b):{}}function _a(b,M,B){var X=M(b);return ys(b)?X:pe(X,B(b))}function Ha(b){return Rt.call(b)}function Wa(b){if(!qt(b)||nl(b))return!1;var M=ws(b)||it(b)?cs:ee;return M.test(bt(b))}function Ua(b){if(!zo(b))return Do(b);var M=[];for(var B in Object(b))Je.call(b,B)&&B!="constructor"&&M.push(B);return M}function Rn(b,M){if(M)return b.slice();var B=new b.constructor(b.length);return b.copy(B),B}function vs(b){var M=new b.constructor(b.byteLength);return new _i(M).set(new _i(b)),M}function Yi(b,M){var B=M?vs(b.buffer):b.buffer;return new b.constructor(B,b.byteOffset,b.byteLength)}function To(b,M,B){var X=M?B(re(b),!0):re(b);return Ke(X,te,new b.constructor)}function jo(b){var M=new b.constructor(b.source,q.exec(b));return M.lastIndex=b.lastIndex,M}function Ya(b,M,B){var X=M?B(_e(b),!0):_e(b);return Ke(X,ye,new b.constructor)}function Xa(b){return xo?Object(xo.call(b)):{}}function Za(b,M){var B=M?vs(b.buffer):b.buffer;return new b.constructor(B,b.byteOffset,b.length)}function Ja(b,M){var B=-1,X=b.length;for(M||(M=Array(X));++B<X;)M[B]=b[B];return M}function bs(b,M,B,X){B||(B={});for(var Ee=-1,ve=M.length;++Ee<ve;){var Le=M[Ee],Te=X?X(B[Le],b[Le],Le,B,b):void 0;Lo(B,Le,Te===void 0?b[Le]:Te)}return B}function qa(b,M){return bs(b,oi(b),M)}function Ka(b){return _a(b,Cs,oi)}function Xi(b,M){var B=b.__data__;return il(M)?B[typeof M=="string"?"string":"hash"]:B.map}function Gt(b,M){var B=xe(b,M);return Wa(B)?B:void 0}var oi=ds?Me(ds,Object):ol,ri=Ha;(zn&&ri(new zn(new ArrayBuffer(1)))!=C||Hi&&ri(new Hi)!=f||Qt&&ri(Qt.resolve())!=p||On&&ri(new On)!=v||hs&&ri(new hs)!=I)&&(ri=function(b){var M=Rt.call(b),B=M==A?b.constructor:void 0,X=B?bt(B):void 0;if(X)switch(X){case us:return C;case Ui:return f;case fs:return p;case ms:return v;case gs:return I}return M});function $a(b){var M=b.length,B=b.constructor(M);return M&&typeof b[0]=="string"&&Je.call(b,"index")&&(B.index=b.index,B.input=b.input),B}function Jt(b){return typeof b.constructor=="function"&&!zo(b)?Fa(Ct(b)):{}}function el(b,M,B,X){var Ee=b.constructor;switch(M){case E:return vs(b);case a:case l:return new Ee(+b);case C:return Yi(b,X);case z:case R:case U:case H:case N:case F:case Q:case _:case Y:return Za(b,X);case f:return To(b,X,B);case m:case y:return new Ee(b);case g:return jo(b);case v:return Ya(b,X,B);case P:return Xa(b)}}function tl(b,M){return M=M==null?s:M,!!M&&(typeof b=="number"||fe.test(b))&&b>-1&&b%1==0&&b<M}function il(b){var M=typeof b;return M=="string"||M=="number"||M=="symbol"||M=="boolean"?b!=="__proto__":b===null}function nl(b){return!!Re&&Re in b}function zo(b){var M=b&&b.constructor,B=typeof M=="function"&&M.prototype||nt;return b===B}function bt(b){if(b!=null){try{return Qe.call(b)}catch(M){}try{return b+""}catch(M){}}return""}function Oo(b){return As(b,!0,!0)}function Bo(b,M){return b===M||b!==b&&M!==M}function Qn(b){return sl(b)&&Je.call(b,"callee")&&(!Tn.call(b,"callee")||Rt.call(b)==o)}var ys=Array.isArray;function Gn(b){return b!=null&&Ro(b.length)&&!ws(b)}function sl(b){return Qo(b)&&Gn(b)}var Vo=jn||rl;function ws(b){var M=qt(b)?Rt.call(b):"";return M==d||M==h}function Ro(b){return typeof b=="number"&&b>-1&&b%1==0&&b<=s}function qt(b){var M=typeof b;return!!b&&(M=="object"||M=="function")}function Qo(b){return!!b&&typeof b=="object"}function Cs(b){return Gn(b)?Bn(b):Ua(b)}function ol(){return[]}function rl(){return!1}n.exports=Oo})(zC,wo);const OC=wo;var Co={},BC={get exports(){return Co},set exports(n){Co=n}};(function(n,t){var e=200,i="__lodash_hash_undefined__",s=1,o=2,r=9007199254740991,a="[object Arguments]",l="[object Array]",c="[object AsyncFunction]",d="[object Boolean]",h="[object Date]",f="[object Error]",m="[object Function]",A="[object GeneratorFunction]",p="[object Map]",g="[object Number]",v="[object Null]",y="[object Object]",P="[object Promise]",I="[object Proxy]",E="[object RegExp]",C="[object Set]",z="[object String]",R="[object Symbol]",U="[object Undefined]",H="[object WeakMap]",N="[object ArrayBuffer]",F="[object DataView]",Q="[object Float32Array]",_="[object Float64Array]",Y="[object Int8Array]",Z="[object Int16Array]",q="[object Int32Array]",ee="[object Uint8Array]",fe="[object Uint8ClampedArray]",de="[object Uint16Array]",ke="[object Uint32Array]",Pe=/[\\^$.*+?()[\]{}|]/g,we=/^\[object .+?Constructor\]$/,Fe=/^(?:0|[1-9]\d*)$/,Ce={};Ce[Q]=Ce[_]=Ce[Y]=Ce[Z]=Ce[q]=Ce[ee]=Ce[fe]=Ce[de]=Ce[ke]=!0,Ce[a]=Ce[l]=Ce[N]=Ce[d]=Ce[F]=Ce[h]=Ce[f]=Ce[m]=Ce[p]=Ce[g]=Ce[y]=Ce[E]=Ce[C]=Ce[z]=Ce[H]=!1;var Ze=typeof Et=="object"&&Et&&Et.Object===Object&&Et,te=typeof self=="object"&&self&&self.Object===Object&&self,ye=Ze||te||Function("return this")(),ze=t&&!t.nodeType&&t,pe=ze&&!0&&n&&!n.nodeType&&n,Ke=pe&&pe.exports===ze,rt=Ke&&Ze.process,xe=function(){try{return rt&&rt.binding&&rt.binding("util")}catch(b){}}(),it=xe&&xe.isTypedArray;function re(b,M){for(var B=-1,X=b==null?0:b.length,Ee=0,ve=[];++B<X;){var Le=b[B];M(Le,B,b)&&(ve[Ee++]=Le)}return ve}function Me(b,M){for(var B=-1,X=M.length,Ee=b.length;++B<X;)b[Ee+B]=M[B];return b}function _e(b,M){for(var B=-1,X=b==null?0:b.length;++B<X;)if(M(b[B],B,b))return!0;return!1}function Ue(b,M){for(var B=-1,X=Array(b);++B<b;)X[B]=M(B);return X}function wt(b){return function(M){return b(M)}}function nt(b,M){return b.has(M)}function vt(b,M){return b==null?void 0:b[M]}function Re(b){var M=-1,B=Array(b.size);return b.forEach(function(X,Ee){B[++M]=[Ee,X]}),B}function Qe(b,M){return function(B){return b(M(B))}}function Je(b){var M=-1,B=Array(b.size);return b.forEach(function(X){B[++M]=X}),B}var Rt=Array.prototype,cs=Function.prototype,Xt=Object.prototype,Ci=ye["__core-js_shared__"],_i=cs.toString,Ct=Xt.hasOwnProperty,Ln=function(){var b=/[^.]+$/.exec(Ci&&Ci.keys&&Ci.keys.IE_PROTO||"");return b?"Symbol(src)_1."+b:""}(),Tn=Xt.toString,Ia=RegExp("^"+_i.call(Ct).replace(Pe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ds=Ke?ye.Buffer:void 0,jn=ye.Symbol,Do=ye.Uint8Array,zn=Xt.propertyIsEnumerable,Hi=Rt.splice,Qt=jn?jn.toStringTag:void 0,On=Object.getOwnPropertySymbols,hs=ds?ds.isBuffer:void 0,Wi=Qe(Object.keys,Object),us=oi(ye,"DataView"),Ui=oi(ye,"Map"),fs=oi(ye,"Promise"),ms=oi(ye,"Set"),gs=oi(ye,"WeakMap"),Ii=oi(Object,"create"),xo=bt(us),si=bt(Ui),Pa=bt(fs),ka=bt(ms),Ma=bt(gs),So=jn?jn.prototype:void 0,ps=So?So.valueOf:void 0;function at(b){var M=-1,B=b==null?0:b.length;for(this.clear();++M<B;){var X=b[M];this.set(X[0],X[1])}}function Ea(){this.__data__=Ii?Ii(null):{},this.size=0}function Da(b){var M=this.has(b)&&delete this.__data__[b];return this.size-=M?1:0,M}function xa(b){var M=this.__data__;if(Ii){var B=M[b];return B===i?void 0:B}return Ct.call(M,b)?M[b]:void 0}function Sa(b){var M=this.__data__;return Ii?M[b]!==void 0:Ct.call(M,b)}function La(b,M){var B=this.__data__;return this.size+=this.has(b)?0:1,B[b]=Ii&&M===void 0?i:M,this}at.prototype.clear=Ea,at.prototype.delete=Da,at.prototype.get=xa,at.prototype.has=Sa,at.prototype.set=La;function ut(b){var M=-1,B=b==null?0:b.length;for(this.clear();++M<B;){var X=b[M];this.set(X[0],X[1])}}function Ta(){this.__data__=[],this.size=0}function ja(b){var M=this.__data__,B=Rn(M,b);if(B<0)return!1;var X=M.length-1;return B==X?M.pop():Hi.call(M,B,1),--this.size,!0}function za(b){var M=this.__data__,B=Rn(M,b);return B<0?void 0:M[B][1]}function Oa(b){return Rn(this.__data__,b)>-1}function Ba(b,M){var B=this.__data__,X=Rn(B,b);return X<0?(++this.size,B.push([b,M])):B[X][1]=M,this}ut.prototype.clear=Ta,ut.prototype.delete=ja,ut.prototype.get=za,ut.prototype.has=Oa,ut.prototype.set=Ba;function It(b){var M=-1,B=b==null?0:b.length;for(this.clear();++M<B;){var X=b[M];this.set(X[0],X[1])}}function Va(){this.size=0,this.__data__={hash:new at,map:new(Ui||ut),string:new at}}function Ra(b){var M=Gt(this,b).delete(b);return this.size-=M?1:0,M}function Qa(b){return Gt(this,b).get(b)}function Ga(b){return Gt(this,b).has(b)}function Na(b,M){var B=Gt(this,b),X=B.size;return B.set(b,M),this.size+=B.size==X?0:1,this}It.prototype.clear=Va,It.prototype.delete=Ra,It.prototype.get=Qa,It.prototype.has=Ga,It.prototype.set=Na;function Bn(b){var M=-1,B=b==null?0:b.length;for(this.__data__=new It;++M<B;)this.add(b[M])}function Lo(b){return this.__data__.set(b,i),this}function Vn(b){return this.__data__.has(b)}Bn.prototype.add=Bn.prototype.push=Lo,Bn.prototype.has=Vn;function Zt(b){var M=this.__data__=new ut(b);this.size=M.size}function As(){this.__data__=new ut,this.size=0}function Fa(b){var M=this.__data__,B=M.delete(b);return this.size=M.size,B}function _a(b){return this.__data__.get(b)}function Ha(b){return this.__data__.has(b)}function Wa(b,M){var B=this.__data__;if(B instanceof ut){var X=B.__data__;if(!Ui||X.length<e-1)return X.push([b,M]),this.size=++B.size,this;B=this.__data__=new It(X)}return B.set(b,M),this.size=B.size,this}Zt.prototype.clear=As,Zt.prototype.delete=Fa,Zt.prototype.get=_a,Zt.prototype.has=Ha,Zt.prototype.set=Wa;function Ua(b,M){var B=Qn(b),X=!B&&Bo(b),Ee=!B&&!X&&Gn(b),ve=!B&&!X&&!Ee&&Qo(b),Le=B||X||Ee||ve,Te=Le?Ue(b.length,String):[],qe=Te.length;for(var Be in b)(M||Ct.call(b,Be))&&!(Le&&(Be=="length"||Ee&&(Be=="offset"||Be=="parent")||ve&&(Be=="buffer"||Be=="byteLength"||Be=="byteOffset")||el(Be,qe)))&&Te.push(Be);return Te}function Rn(b,M){for(var B=b.length;B--;)if(Oo(b[B][0],M))return B;return-1}function vs(b,M,B){var X=M(b);return Qn(b)?X:Me(X,B(b))}function Yi(b){return b==null?b===void 0?U:v:Qt&&Qt in Object(b)?ri(b):zo(b)}function To(b){return qt(b)&&Yi(b)==a}function jo(b,M,B,X,Ee){return b===M?!0:b==null||M==null||!qt(b)&&!qt(M)?b!==b&&M!==M:Ya(b,M,B,X,jo,Ee)}function Ya(b,M,B,X,Ee,ve){var Le=Qn(b),Te=Qn(M),qe=Le?l:Jt(b),Be=Te?l:Jt(M);qe=qe==a?y:qe,Be=Be==a?y:Be;var ft=qe==y,Pt=Be==y,$e=qe==Be;if($e&&Gn(b)){if(!Gn(M))return!1;Le=!0,ft=!1}if($e&&!ft)return ve||(ve=new Zt),Le||Qo(b)?bs(b,M,B,X,Ee,ve):qa(b,M,qe,B,X,Ee,ve);if(!(B&s)){var mt=ft&&Ct.call(b,"__wrapped__"),lt=Pt&&Ct.call(M,"__wrapped__");if(mt||lt){var Pi=mt?b.value():b,ai=lt?M.value():M;return ve||(ve=new Zt),Ee(Pi,ai,B,X,ve)}}return $e?(ve||(ve=new Zt),Ka(b,M,B,X,Ee,ve)):!1}function Xa(b){if(!Ro(b)||il(b))return!1;var M=Vo(b)?Ia:we;return M.test(bt(b))}function Za(b){return qt(b)&&ws(b.length)&&!!Ce[Yi(b)]}function Ja(b){if(!nl(b))return Wi(b);var M=[];for(var B in Object(b))Ct.call(b,B)&&B!="constructor"&&M.push(B);return M}function bs(b,M,B,X,Ee,ve){var Le=B&s,Te=b.length,qe=M.length;if(Te!=qe&&!(Le&&qe>Te))return!1;var Be=ve.get(b);if(Be&&ve.get(M))return Be==M;var ft=-1,Pt=!0,$e=B&o?new Bn:void 0;for(ve.set(b,M),ve.set(M,b);++ft<Te;){var mt=b[ft],lt=M[ft];if(X)var Pi=Le?X(lt,mt,ft,M,b,ve):X(mt,lt,ft,b,M,ve);if(Pi!==void 0){if(Pi)continue;Pt=!1;break}if($e){if(!_e(M,function(ai,Zi){if(!nt($e,Zi)&&(mt===ai||Ee(mt,ai,B,X,ve)))return $e.push(Zi)})){Pt=!1;break}}else if(!(mt===lt||Ee(mt,lt,B,X,ve))){Pt=!1;break}}return ve.delete(b),ve.delete(M),Pt}function qa(b,M,B,X,Ee,ve,Le){switch(B){case F:if(b.byteLength!=M.byteLength||b.byteOffset!=M.byteOffset)return!1;b=b.buffer,M=M.buffer;case N:return!(b.byteLength!=M.byteLength||!ve(new Do(b),new Do(M)));case d:case h:case g:return Oo(+b,+M);case f:return b.name==M.name&&b.message==M.message;case E:case z:return b==M+"";case p:var Te=Re;case C:var qe=X&s;if(Te||(Te=Je),b.size!=M.size&&!qe)return!1;var Be=Le.get(b);if(Be)return Be==M;X|=o,Le.set(b,M);var ft=bs(Te(b),Te(M),X,Ee,ve,Le);return Le.delete(b),ft;case R:if(ps)return ps.call(b)==ps.call(M)}return!1}function Ka(b,M,B,X,Ee,ve){var Le=B&s,Te=Xi(b),qe=Te.length,Be=Xi(M),ft=Be.length;if(qe!=ft&&!Le)return!1;for(var Pt=qe;Pt--;){var $e=Te[Pt];if(!(Le?$e in M:Ct.call(M,$e)))return!1}var mt=ve.get(b);if(mt&&ve.get(M))return mt==M;var lt=!0;ve.set(b,M),ve.set(M,b);for(var Pi=Le;++Pt<qe;){$e=Te[Pt];var ai=b[$e],Zi=M[$e];if(X)var Lf=Le?X(Zi,ai,$e,M,b,ve):X(ai,Zi,$e,b,M,ve);if(!(Lf===void 0?ai===Zi||Ee(ai,Zi,B,X,ve):Lf)){lt=!1;break}Pi||(Pi=$e=="constructor")}if(lt&&!Pi){var Go=b.constructor,No=M.constructor;Go!=No&&"constructor"in b&&"constructor"in M&&!(typeof Go=="function"&&Go instanceof Go&&typeof No=="function"&&No instanceof No)&&(lt=!1)}return ve.delete(b),ve.delete(M),lt}function Xi(b){return vs(b,Cs,$a)}function Gt(b,M){var B=b.__data__;return tl(M)?B[typeof M=="string"?"string":"hash"]:B.map}function oi(b,M){var B=vt(b,M);return Xa(B)?B:void 0}function ri(b){var M=Ct.call(b,Qt),B=b[Qt];try{b[Qt]=void 0;var X=!0}catch(ve){}var Ee=Tn.call(b);return X&&(M?b[Qt]=B:delete b[Qt]),Ee}var $a=On?function(b){return b==null?[]:(b=Object(b),re(On(b),function(M){return zn.call(b,M)}))}:ol,Jt=Yi;(us&&Jt(new us(new ArrayBuffer(1)))!=F||Ui&&Jt(new Ui)!=p||fs&&Jt(fs.resolve())!=P||ms&&Jt(new ms)!=C||gs&&Jt(new gs)!=H)&&(Jt=function(b){var M=Yi(b),B=M==y?b.constructor:void 0,X=B?bt(B):"";if(X)switch(X){case xo:return F;case si:return p;case Pa:return P;case ka:return C;case Ma:return H}return M});function el(b,M){return M=M==null?r:M,!!M&&(typeof b=="number"||Fe.test(b))&&b>-1&&b%1==0&&b<M}function tl(b){var M=typeof b;return M=="string"||M=="number"||M=="symbol"||M=="boolean"?b!=="__proto__":b===null}function il(b){return!!Ln&&Ln in b}function nl(b){var M=b&&b.constructor,B=typeof M=="function"&&M.prototype||Xt;return b===B}function zo(b){return Tn.call(b)}function bt(b){if(b!=null){try{return _i.call(b)}catch(M){}try{return b+""}catch(M){}}return""}function Oo(b,M){return b===M||b!==b&&M!==M}var Bo=To(function(){return arguments}())?To:function(b){return qt(b)&&Ct.call(b,"callee")&&!zn.call(b,"callee")},Qn=Array.isArray;function ys(b){return b!=null&&ws(b.length)&&!Vo(b)}var Gn=hs||rl;function sl(b,M){return jo(b,M)}function Vo(b){if(!Ro(b))return!1;var M=Yi(b);return M==m||M==A||M==c||M==I}function ws(b){return typeof b=="number"&&b>-1&&b%1==0&&b<=r}function Ro(b){var M=typeof b;return b!=null&&(M=="object"||M=="function")}function qt(b){return b!=null&&typeof b=="object"}var Qo=it?wt(it):Za;function Cs(b){return ys(b)?Ua(b):Ja(b)}function ol(){return[]}function rl(){return!1}n.exports=sl})(BC,Co);const VC=Co,RC=(n,t)=>VC(n,t),QC=n=>Object.keys(n||{}),GC=(n,t)=>{const e={};return n.forEach(i=>{e[i]=t[i]}),e},NC=()=>{const n={},t=(e,i)=>{const{watcherName:s,fn:o}=e,{prop:r,value:a}=i;n[s]||(n[s]={deps:{},fn:o}),n[s].deps[r]=a};return{subscribers:n,subscribe(e,i){e&&t(e,i)},notify(e,i){Object.entries(n).forEach(([s,{deps:o,fn:r}])=>{const a=QC(o);if(a.includes(i)){const l=GC(a,e);RC(o,l)||(n[s].deps=l,r())}})}}},FC=()=>{let n=null;return{targetWatcher(t,e){n={watcherName:t,fn:e},n.fn(),n=null},getTarget(){return n}}};function _C(n,t){const e=yo(n,"data",{}),i=yo(n,"watch",{}),s=yo(n,"methods",{}),o=yo(t,"onChange",()=>{}),{subscribe:r,notify:a,subscribers:l}=NC(),{targetWatcher:c,getTarget:d}=FC();let h;const f={},m=()=>({data:h,methods:f});let A=!1;const p=v=>(...y)=>{A=!0;const P=v(...y);return A=!1,P};Object.entries(s).forEach(([v,y])=>{f[v]=p((...P)=>y(m(),...P)),Object.defineProperty(f[v],"name",{value:v})}),h=new Proxy(OC(e),{get(v,y){return d()&&!A&&r(d(),{prop:y,value:v[y]}),Reflect.get(...arguments)},set(v,y,P){return v[y]===P||(Reflect.set(...arguments),d()||(o&&o(y,P),a(h,y))),!0}}),Object.entries(i).forEach(([v,y])=>{c(v,()=>{y(m())})});const g=[h,f];return g._internal={_getSubscribers(){return l}},g}function HC({pageIndex:n,particlesToShow:t,particlesToScroll:e,particlesCount:i}){const s=n===0?0:t-e,o=n*t-n*s,r=o+Math.max(t,e)-1,a=[];for(let l=o;l<=Math.min(i-1,r);l++)a.push(l);return a}function WC({infinite:n,pageIndex:t,pagesCount:e,particlesCount:i,particlesToShow:s,particlesToScroll:o}){const r=Mn(0,t,e-1);let a=r-1,l=r+1;a=n?a<0?e-1:a:Math.max(0,a),l=n?l>e-1?0:l:Math.min(e-1,l);const c=[...new Set([a,r,l,0,e-1])].sort((h,f)=>h-f),d=c.flatMap(h=>HC({pageIndex:h,particlesToShow:s,particlesToScroll:o,particlesCount:i}));return{pageIndexes:c,particleIndexes:[...new Set(d)].sort((h,f)=>h-f)}}const UC=(n,t)=>(n(),setInterval(n,t)),YC=35,hu=1;class XC{constructor({onProgressValueChange:t}){this._onProgressValueChange=t,this._autoplayDuration,this._onProgressValueChange,this._interval,this._paused=!1}setAutoplayDuration(t){this._autoplayDuration=t}start(t){return new Promise(e=>{this.reset();const i=Math.min(YC,Math.max(this._autoplayDuration,1));let s=-i;this._interval=UC(()=>W(this,null,function*(){if(this._paused)return;s+=i;const o=s/this._autoplayDuration;this._onProgressValueChange(o),o>hu&&(this.reset(),yield t(),e())}),i)})}pause(){this._paused=!0}resume(){this._paused=!1}reset(){clearInterval(this._interval),this._onProgressValueChange(hu)}}function ZC(n){const t=new XC({onProgressValueChange:r=>{n("progressValue",1-r)}}),e=_C({data:{particlesCountWithoutClones:0,particlesToShow:1,particlesToShowInit:1,particlesToScroll:1,particlesToScrollInit:1,particlesCount:1,currentParticleIndex:1,infinite:!1,autoplayDuration:1e3,clonesCountHead:0,clonesCountTail:0,clonesCountTotal:0,partialPageSize:1,currentPageIndex:1,pagesCount:1,pauseOnFocus:!1,focused:!1,autoplay:!1,autoplayDirection:"next",disabled:!1,durationMsInit:1e3,durationMs:1e3,offset:0,particleWidth:0,loaded:[]},watch:{setLoaded({data:r}){r.loaded=WC({infinite:r.infinite,pageIndex:r.currentPageIndex,pagesCount:r.pagesCount,particlesCount:r.particlesCountWithoutClones,particlesToShow:r.particlesToShow,particlesToScroll:r.particlesToScroll}).particleIndexes},setCurrentPageIndex({data:r}){r.currentPageIndex=Dw({currentParticleIndex:r.currentParticleIndex,particlesCount:r.particlesCount,clonesCountHead:r.clonesCountHead,clonesCountTotal:r.clonesCountTotal,infinite:r.infinite,particlesToScroll:r.particlesToScroll})},setPartialPageSize({data:r}){r.partialPageSize=Kh({particlesToScroll:r.particlesToScroll,particlesToShow:r.particlesToShow,particlesCountWithoutClones:r.particlesCountWithoutClones})},setClonesCount({data:r}){const{head:a,tail:l}=Vw({infinite:r.infinite,particlesToShow:r.particlesToShow,partialPageSize:r.partialPageSize});r.clonesCountHead=a,r.clonesCountTail=l,r.clonesCountTotal=a+l},setProgressManagerAutoplayDuration({data:r}){t.setAutoplayDuration(r.autoplayDuration)},toggleProgressManager({data:{pauseOnFocus:r,focused:a}}){r&&(a?t.pause():t.resume())},initDuration({data:r}){r.durationMs=r.durationMsInit},applyAutoplay({data:r,methods:{_applyAutoplayIfNeeded:a}}){r.autoplay&&a(r.autoplay)},setPagesCount({data:r}){r.pagesCount=Sw({infinite:r.infinite,particlesCountWithoutClones:r.particlesCountWithoutClones,particlesToScroll:r.particlesToScroll,particlesToShow:r.particlesToShow})},setParticlesToShow({data:r}){r.particlesToShow=Mn(1,r.particlesToShowInit,r.particlesCountWithoutClones)},setParticlesToScroll({data:r}){r.particlesToScroll=Mn(1,r.particlesToScrollInit,r.particlesCountWithoutClones)}},methods:{_prev({data:r}){r.currentParticleIndex=qr({infinite:r.infinite,pageIndex:r.currentPageIndex-1,clonesCountHead:r.clonesCountHead,clonesCountTail:r.clonesCountTail,particlesToScroll:r.particlesToScroll,particlesCount:r.particlesCount,particlesToShow:r.particlesToShow})},_next({data:r}){r.currentParticleIndex=qr({infinite:r.infinite,pageIndex:r.currentPageIndex+1,clonesCountHead:r.clonesCountHead,clonesCountTail:r.clonesCountTail,particlesToScroll:r.particlesToScroll,particlesCount:r.particlesCount,particlesToShow:r.particlesToShow})},_moveToParticle({data:r},a){r.currentParticleIndex=Mn(0,a,r.particlesCount-1)},toggleFocused({data:r}){r.focused=!r.focused},_applyAutoplayIfNeeded(l){return W(this,arguments,function*({data:r,methods:a}){if(!r.infinite&&(r.autoplayDirection===yi&&r.currentParticleIndex===r.particlesCount-1||r.autoplayDirection===kn&&r.currentParticleIndex===0)){t.reset();return}if(r.autoplay){const c=()=>Kr({[yi]:()=>W(this,null,function*(){return a.showNextPage()}),[kn]:()=>W(this,null,function*(){return a.showPrevPage()})})(r.autoplayDirection);yield t.start(c)}})},_jumpIfNeeded(l){return W(this,arguments,function*({data:r,methods:a}){let c=!1;return r.infinite&&(r.currentParticleIndex===0?(yield a.showParticle(r.particlesCount-r.clonesCountTotal,{animated:!1}),c=!0):r.currentParticleIndex===r.particlesCount-r.clonesCountTail&&(yield a.showParticle(r.clonesCountHead,{animated:!1}),c=!0)),c})},changePage(d,h,f){return W(this,arguments,function*({data:r,methods:a},l,c){if(t.reset(),r.disabled)return;r.disabled=!0,l(),yield a.offsetPage({animated:ss(c,"animated",!0)}),r.disabled=!1,!(yield a._jumpIfNeeded())&&a._applyAutoplayIfNeeded()})},showNextPage(c,d){return W(this,arguments,function*({data:r,methods:a},l){r.disabled||(yield a.changePage(a._next,l))})},showPrevPage(c,d){return W(this,arguments,function*({data:r,methods:a},l){r.disabled||(yield a.changePage(a._prev,l))})},showParticle(c,d,h){return W(this,arguments,function*({methods:r},a,l){yield r.changePage(()=>r._moveToParticle(a),l)})},_getParticleIndexByPageIndex({data:r},a){return qr({infinite:r.infinite,pageIndex:a,clonesCountHead:r.clonesCountHead,clonesCountTail:r.clonesCountTail,particlesToScroll:r.particlesToScroll,particlesCount:r.particlesCount,particlesToShow:r.particlesToShow})},showPage(c,d,h){return W(this,arguments,function*({methods:r},a,l){const f=r._getParticleIndexByPageIndex(a);yield r.showParticle(f,l)})},offsetPage({data:r},a){const l=ss(a,"animated",!0);return new Promise(c=>{r.durationMs=l?r.durationMsInit:0,r.offset=-r.currentParticleIndex*r.particleWidth,setTimeout(()=>{c()},r.durationMs)})}}},{onChange:n}),[i,s]=e;return[{data:i,progressManager:t},s,e._internal]}function JC(n){me(n,"svelte-sme1z4",":root{--sc-color-rgb-light-50p:rgba(93, 93, 93, 0.5);--sc-color-rgb-light:#5d5d5d;--sc-color-hex-dark-50p:rgba(30, 30, 30, 0.5);--sc-color-hex-dark:#1e1e1e}.sc-carousel__carousel-container.svelte-sme1z4{display:flex;width:100%;flex-direction:column;align-items:center}.sc-carousel__content-container.svelte-sme1z4{position:relative;display:flex;width:100%}.sc-carousel__pages-window.svelte-sme1z4{flex:1;display:flex;overflow:hidden;box-sizing:border-box;position:relative}.sc-carousel__pages-container.svelte-sme1z4{width:100%;display:flex;transition-property:transform}.sc-carousel__arrow-container.svelte-sme1z4{padding:5px;box-sizing:border-box;display:flex;align-items:center;justify-content:center}.sc-carousel-progress__container.svelte-sme1z4{width:100%;height:5px;background-color:var(--sc-color-rgb-light-50p);position:absolute;bottom:0}.sc-carousel-button{all:unset;cursor:pointer}.sc-carousel-button:focus{outline:5px auto}")}const qC=n=>({currentPageIndex:n[0]&32,pagesCount:n[0]&1024,loaded:n[0]&64}),uu=n=>({currentPageIndex:n[5],pagesCount:n[10],showPage:n[15],loaded:n[6]}),KC=n=>({loaded:n[0]&64,currentPageIndex:n[0]&32}),fu=n=>({showNextPage:n[14].showNextPage,loaded:n[6],currentPageIndex:n[5]}),$C=n=>({loaded:n[0]&64,currentPageIndex:n[0]&32}),mu=n=>({loaded:n[6],currentPageIndex:n[5]}),eI=n=>({loaded:n[0]&64,currentPageIndex:n[0]&32}),gu=n=>({showPrevPage:n[14].showPrevPage,loaded:n[6],currentPageIndex:n[5]});function pu(n){let t;const e=n[37].prev,i=sn(e,n,n[36],gu),s=i||tI(n);return{c(){s&&s.c()},m(o,r){s&&s.m(o,r),t=!0},p(o,r){i?i.p&&(!t||r[0]&96|r[1]&32)&&rn(i,e,o,o[36],t?on(e,o[36],r,eI):an(o[36]),gu):s&&s.p&&(!t||r[0]&36)&&s.p(o,t?r:[-1,-1])},i(o){t||(D(s,o),t=!0)},o(o){T(s,o),t=!1},d(o){s&&s.d(o)}}}function tI(n){let t,e,i;return e=new Wh({props:{direction:"prev",disabled:!n[2]&&n[5]===0}}),e.$on("click",n[23]),{c(){t=x("div"),oe(e.$$.fragment),w(t,"class","sc-carousel__arrow-container svelte-sme1z4")},m(s,o){O(s,t,o),ne(e,t,null),i=!0},p(s,o){const r={};o[0]&36&&(r.disabled=!s[2]&&s[5]===0),e.$set(r)},i(s){i||(D(e.$$.fragment,s),i=!0)},o(s){T(e.$$.fragment,s),i=!1},d(s){s&&j(t),se(e)}}}function Au(n){let t,e,i;return e=new aw({props:{value:n[7]}}),{c(){t=x("div"),oe(e.$$.fragment),w(t,"class","sc-carousel-progress__container svelte-sme1z4")},m(s,o){O(s,t,o),ne(e,t,null),i=!0},p(s,o){const r={};o[0]&128&&(r.value=s[7]),e.$set(r)},i(s){i||(D(e.$$.fragment,s),i=!0)},o(s){T(e.$$.fragment,s),i=!1},d(s){s&&j(t),se(e)}}}function vu(n){let t;const e=n[37].next,i=sn(e,n,n[36],fu),s=i||iI(n);return{c(){s&&s.c()},m(o,r){s&&s.m(o,r),t=!0},p(o,r){i?i.p&&(!t||r[0]&96|r[1]&32)&&rn(i,e,o,o[36],t?on(e,o[36],r,KC):an(o[36]),fu):s&&s.p&&(!t||r[0]&1060)&&s.p(o,t?r:[-1,-1])},i(o){t||(D(s,o),t=!0)},o(o){T(s,o),t=!1},d(o){s&&s.d(o)}}}function iI(n){let t,e,i;return e=new Wh({props:{direction:"next",disabled:!n[2]&&n[5]===n[10]-1}}),e.$on("click",n[14].showNextPage),{c(){t=x("div"),oe(e.$$.fragment),w(t,"class","sc-carousel__arrow-container svelte-sme1z4")},m(s,o){O(s,t,o),ne(e,t,null),i=!0},p(s,o){const r={};o[0]&1060&&(r.disabled=!s[2]&&s[5]===s[10]-1),e.$set(r)},i(s){i||(D(e.$$.fragment,s),i=!0)},o(s){T(e.$$.fragment,s),i=!1},d(s){s&&j(t),se(e)}}}function bu(n){let t;const e=n[37].dots,i=sn(e,n,n[36],uu),s=i||nI(n);return{c(){s&&s.c()},m(o,r){s&&s.m(o,r),t=!0},p(o,r){i?i.p&&(!t||r[0]&1120|r[1]&32)&&rn(i,e,o,o[36],t?on(e,o[36],r,qC):an(o[36]),uu):s&&s.p&&(!t||r[0]&1056)&&s.p(o,t?r:[-1,-1])},i(o){t||(D(s,o),t=!0)},o(o){T(s,o),t=!1},d(o){s&&s.d(o)}}}function nI(n){let t,e;return t=new ew({props:{pagesCount:n[10],currentPageIndex:n[5]}}),t.$on("pageChange",n[41]),{c(){oe(t.$$.fragment)},m(i,s){ne(t,i,s),e=!0},p(i,s){const o={};s[0]&1024&&(o.pagesCount=i[10]),s[0]&32&&(o.currentPageIndex=i[5]),t.$set(o)},i(i){e||(D(t.$$.fragment,i),e=!0)},o(i){T(t.$$.fragment,i),e=!1},d(i){se(t,i)}}}function sI(n){let t,e,i,s,o,r,a,l,c,d,h,f,m=n[1]&&pu(n);const A=n[37].default,p=sn(A,n,n[36],mu);let g=n[3]&&Au(n),v=n[1]&&vu(n),y=n[4]&&bu(n);return{c(){t=x("div"),e=x("div"),m&&m.c(),i=K(),s=x("div"),o=x("div"),p&&p.c(),a=K(),g&&g.c(),l=K(),v&&v.c(),c=K(),y&&y.c(),w(o,"class","sc-carousel__pages-container svelte-sme1z4"),S(o,"transform","translateX("+n[8]+"px)"),S(o,"transition-duration",n[9]+"ms"),S(o,"transition-timing-function",n[0]),w(s,"class","sc-carousel__pages-window svelte-sme1z4"),w(e,"class","sc-carousel__content-container svelte-sme1z4"),w(t,"class","sc-carousel__carousel-container svelte-sme1z4")},m(P,I){O(P,t,I),L(t,e),m&&m.m(e,null),L(e,i),L(e,s),L(s,o),p&&p.m(o,null),n[39](o),L(s,a),g&&g.m(s,null),n[40](s),L(e,l),v&&v.m(e,null),L(t,c),y&&y.m(t,null),d=!0,h||(f=[zt(r=pw.call(null,o,{thresholdProvider:n[38]})),be(o,"swipeStart",n[16]),be(o,"swipeMove",n[18]),be(o,"swipeEnd",n[19]),be(o,"swipeFailed",n[20]),be(o,"swipeThresholdReached",n[17]),zt(yw.call(null,s)),be(s,"hovered",n[21]),zt(kw.call(null,s)),be(s,"tapped",n[22])],h=!0)},p(P,I){P[1]?m?(m.p(P,I),I[0]&2&&D(m,1)):(m=pu(P),m.c(),D(m,1),m.m(e,i)):m&&(he(),T(m,1,1,()=>{m=null}),ue()),p&&p.p&&(!d||I[0]&96|I[1]&32)&&rn(p,A,P,P[36],d?on(A,P[36],I,$C):an(P[36]),mu),(!d||I[0]&256)&&S(o,"transform","translateX("+P[8]+"px)"),(!d||I[0]&512)&&S(o,"transition-duration",P[9]+"ms"),(!d||I[0]&1)&&S(o,"transition-timing-function",P[0]),r&&Ft(r.update)&&I[0]&2048&&r.update.call(null,{thresholdProvider:P[38]}),P[3]?g?(g.p(P,I),I[0]&8&&D(g,1)):(g=Au(P),g.c(),D(g,1),g.m(s,null)):g&&(he(),T(g,1,1,()=>{g=null}),ue()),P[1]?v?(v.p(P,I),I[0]&2&&D(v,1)):(v=vu(P),v.c(),D(v,1),v.m(e,null)):v&&(he(),T(v,1,1,()=>{v=null}),ue()),P[4]?y?(y.p(P,I),I[0]&16&&D(y,1)):(y=bu(P),y.c(),D(y,1),y.m(t,null)):y&&(he(),T(y,1,1,()=>{y=null}),ue())},i(P){d||(D(m),D(p,P),D(g),D(v),D(y),d=!0)},o(P){T(m),T(p,P),T(g),T(v),T(y),d=!1},d(P){P&&j(t),m&&m.d(),p&&p.d(P),n[39](null),g&&g.d(),n[40](null),v&&v.d(),y&&y.d(),h=!1,Xe(f)}}}function oI(n,t,e){let{$$slots:i={},$$scope:s}=t,o=[],r,a,l=0,c=0,d=1;const[{data:h,progressManager:f},m,A]=ZC((re,Me)=>{Kr({currentPageIndex:()=>e(5,r=Me),progressValue:()=>e(7,a=Me),offset:()=>e(8,l=Me),durationMs:()=>e(9,c=Me),pagesCount:()=>e(10,d=Me),loaded:()=>e(6,o=Me)})(re)}),p=Hs();let{timingFunction:g="ease-in-out"}=t,{arrows:v=!0}=t,{infinite:y=!0}=t,{initialPageIndex:P=0}=t,{duration:I=500}=t,{autoplay:E=!1}=t,{autoplayDuration:C=3e3}=t,{autoplayDirection:z=yi}=t,{pauseOnFocus:R=!1}=t,{autoplayProgressVisible:U=!1}=t,{dots:H=!0}=t,{swiping:N=!0}=t,{particlesToShow:F=1}=t,{particlesToScroll:Q=1}=t;function _(re,Me){return W(this,null,function*(){const _e=ss(Me,"animated",!0);if(typeof re!="number")throw new Error("pageIndex should be a number");yield m.showPage(re,{animated:_e})})}function Y(re){return W(this,null,function*(){const Me=ss(re,"animated",!0);yield m.showPrevPage({animated:Me})})}function Z(re){return W(this,null,function*(){const Me=ss(re,"animated",!0);yield m.showNextPage({animated:Me})})}let q=0,ee,fe;const de=zw(({width:re})=>{e(11,q=re),h.particleWidth=q/h.particlesToShow,jw({particlesContainerChildren:fe.children,particleWidth:h.particleWidth}),m.offsetPage({animated:!1})});function ke(){const{clonesToAppend:re,clonesToPrepend:Me}=Ow({clonesCountHead:h.clonesCountHead,clonesCountTail:h.clonesCountTail,particlesContainerChildren:fe.children});Bw({particlesContainer:fe,clonesToAppend:re,clonesToPrepend:Me})}gt(()=>{W(this,null,function*(){yield Ul(),fe&&ee&&(h.particlesCountWithoutClones=fe.children.length,yield Ul(),h.infinite&&ke(),h.particlesCount=fe.children.length,m.showPage(P,{animated:!1}),de.observe(ee))})}),Mt(()=>{de.disconnect(),f.reset()});function Pe(re){return W(this,null,function*(){yield m.showPage(re,{animated:!0})})}function we(){N&&(h.durationMs=0)}function Fe(re){return W(this,null,function*(){N&&(yield Kr({[yi]:m.showNextPage,[kn]:m.showPrevPage})(re.detail.direction))})}function Ce(re){N&&(h.offset+=re.detail.dx)}function Ze(){N&&m.showParticle(h.currentParticleIndex)}function te(){return W(this,null,function*(){N&&(yield m.offsetPage({animated:!0}))})}function ye(re){h.focused=re.detail.value}function ze(){m.toggleFocused()}function pe(){m.showPrevPage()}const Ke=()=>q/3;function rt(re){Ne[re?"unshift":"push"](()=>{fe=re,e(13,fe)})}function xe(re){Ne[re?"unshift":"push"](()=>{ee=re,e(12,ee)})}const it=re=>Pe(re.detail);return n.$$set=re=>{"timingFunction"in re&&e(0,g=re.timingFunction),"arrows"in re&&e(1,v=re.arrows),"infinite"in re&&e(2,y=re.infinite),"initialPageIndex"in re&&e(24,P=re.initialPageIndex),"duration"in re&&e(25,I=re.duration),"autoplay"in re&&e(26,E=re.autoplay),"autoplayDuration"in re&&e(27,C=re.autoplayDuration),"autoplayDirection"in re&&e(28,z=re.autoplayDirection),"pauseOnFocus"in re&&e(29,R=re.pauseOnFocus),"autoplayProgressVisible"in re&&e(3,U=re.autoplayProgressVisible),"dots"in re&&e(4,H=re.dots),"swiping"in re&&e(30,N=re.swiping),"particlesToShow"in re&&e(31,F=re.particlesToShow),"particlesToScroll"in re&&e(32,Q=re.particlesToScroll),"$$scope"in re&&e(36,s=re.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&32&&p("pageChange",r),n.$$.dirty[0]&4&&(h.infinite=y),n.$$.dirty[0]&33554432&&(h.durationMsInit=I),n.$$.dirty[0]&67108864&&(h.autoplay=E),n.$$.dirty[0]&134217728&&(h.autoplayDuration=C),n.$$.dirty[0]&268435456&&(h.autoplayDirection=z),n.$$.dirty[0]&536870912&&(h.pauseOnFocus=R),n.$$.dirty[1]&1&&(h.particlesToShowInit=F),n.$$.dirty[1]&2&&(h.particlesToScrollInit=Q)},[g,v,y,U,H,r,o,a,l,c,d,q,ee,fe,m,Pe,we,Fe,Ce,Ze,te,ye,ze,pe,P,I,E,C,z,R,N,F,Q,_,Y,Z,s,i,Ke,rt,xe,it]}class rI extends ce{constructor(t){super(),le(this,t,oI,sI,ae,{timingFunction:0,arrows:1,infinite:2,initialPageIndex:24,duration:25,autoplay:26,autoplayDuration:27,autoplayDirection:28,pauseOnFocus:29,autoplayProgressVisible:3,dots:4,swiping:30,particlesToShow:31,particlesToScroll:32,goTo:33,goToPrev:34,goToNext:35},JC,[-1,-1])}get goTo(){return this.$$.ctx[33]}get goToPrev(){return this.$$.ctx[34]}get goToNext(){return this.$$.ctx[35]}}function aI(n){me(n,"svelte-159ski6",".media-item.svelte-159ski6.svelte-159ski6{position:relative;height:100%}.media-content.svelte-159ski6.svelte-159ski6{position:relative;pointer-events:auto;width:100%;height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;-o-object-fit:inherit;object-fit:inherit}.media-content.showPlayButton.svelte-159ski6.svelte-159ski6{pointer-events:none}.video-icon.svelte-159ski6.svelte-159ski6{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-159ski6.svelte-159ski6{display:none;position:absolute;width:100%;height:100%;top:0;left:0;transform:translate3d(0, 0, 0)}.video-play-button-container.showPlayButton.svelte-159ski6.svelte-159ski6{pointer-events:none;display:block}.video-icon.svelte-159ski6.svelte-159ski6{pointer-events:auto}.video-icon.large.svelte-159ski6.svelte-159ski6{width:12.5rem;height:6.25rem}.video-icon.small.svelte-159ski6.svelte-159ski6{width:1.75rem;height:1.75rem}.video-icon.svelte-159ski6 .video-icon-img.svelte-159ski6{width:100%;height:100%;background-position:center center;background-size:contain;background-repeat:no-repeat}.video-icon.svelte-159ski6 .video-icon-img.canPlay.svelte-159ski6{cursor:pointer}")}function yu(n){let t;function e(o,r){if(o[2].type==="Image")return cI;if(o[2].type==="Video")return lI}let i=e(n),s=i&&i(n);return{c(){t=x("div"),s&&s.c(),w(t,"class","media-item svelte-159ski6"),w(t,"draggable","false")},m(o,r){O(o,t,r),s&&s.m(t,null)},p(o,r){i===(i=e(o))&&s?s.p(o,r):(s&&s.d(1),s=i&&i(o),s&&(s.c(),s.m(t,null)))},d(o){o&&j(t),s&&s.d()}}}function lI(n){let t,e,i,s,o,r;function a(d,h){return d[8]&&d[2].videoCoverUrl?hI:dI}let l=a(n),c=l(n);return{c(){c.c(),t=K(),e=x("div"),i=x("div"),s=x("div"),w(s,"class","video-icon-img svelte-159ski6"),S(s,"background-image","url("+n[21]()+")"),$(s,"canPlay",n[5]),w(i,"class","video-icon svelte-159ski6"),$(i,"large",n[4]==="large"),$(i,"small",n[4]==="small"),w(e,"class","video-play-button-container svelte-159ski6"),$(e,"showPlayButton",n[11])},m(d,h){c.m(d,h),O(d,t,h),O(d,e,h),L(e,i),L(i,s),o||(r=be(s,"click",n[22]),o=!0)},p(d,h){l===(l=a(d))&&c?c.p(d,h):(c.d(1),c=l(d),c&&(c.c(),c.m(t.parentNode,t))),h&8&&S(s,"background-image","url("+d[21]()+")"),h&32&&$(s,"canPlay",d[5]),h&16&&$(i,"large",d[4]==="large"),h&16&&$(i,"small",d[4]==="small"),h&2048&&$(e,"showPlayButton",d[11])},d(d){c.d(d),d&&j(t),d&&j(e),o=!1,r()}}}function cI(n){let t,e,i;return{c(){t=x("img"),w(t,"class","media-content svelte-159ski6"),tt(t.src,e=n[2].url)||w(t,"src",e),w(t,"alt",i=n[2].name),w(t,"draggable",!1),S(t,"object-fit",n[7])},m(s,o){O(s,t,o)},p(s,o){o&4&&!tt(t.src,e=s[2].url)&&w(t,"src",e),o&4&&i!==(i=s[2].name)&&w(t,"alt",i),o&128&&S(t,"object-fit",s[7])},d(s){s&&j(t)}}}function dI(n){let t,e,i,s,o,r;return{c(){t=x("video"),w(t,"class","media-content svelte-159ski6"),tt(t.src,e=n[2].videoCoverUrl?n[2].url:n[2].url+"#t=0.1")||w(t,"src",e),w(t,"poster",i=n[2].videoCoverUrl),w(t,"preload",s=n[2].videoCoverUrl?"none":"auto"),w(t,"disablepictureinpicture",""),t.playsInline=!0,w(t,"paused",""),t.muted=!0,w(t,"draggable",!1),t.loop=!1,w(t,"crossorigin",""),t.autoplay=n[6],t.controls=!1,$(t,"showPlayButton",n[11]),S(t,"object-fit",n[7])},m(a,l){O(a,t,l),n[20](t),o||(r=[be(t,"play",n[15]),be(t,"pause",n[16]),be(t,"error",n[17]),be(t,"ended",n[18]),be(t,"click",n[19])],o=!0)},p(a,l){l&4&&!tt(t.src,e=a[2].videoCoverUrl?a[2].url:a[2].url+"#t=0.1")&&w(t,"src",e),l&4&&i!==(i=a[2].videoCoverUrl)&&w(t,"poster",i),l&4&&s!==(s=a[2].videoCoverUrl?"none":"auto")&&w(t,"preload",s),l&64&&(t.autoplay=a[6]),l&2048&&$(t,"showPlayButton",a[11]),l&128&&S(t,"object-fit",a[7])},d(a){a&&j(t),n[20](null),o=!1,Xe(r)}}}function hI(n){let t,e,i;return{c(){t=x("img"),w(t,"class","media-content svelte-159ski6"),tt(t.src,e=n[2].videoCoverUrl)||w(t,"src",e),w(t,"alt",i=n[2].name),w(t,"draggable",!1),S(t,"object-fit",n[7])},m(s,o){O(s,t,o)},p(s,o){o&4&&!tt(t.src,e=s[2].videoCoverUrl)&&w(t,"src",e),o&4&&i!==(i=s[2].name)&&w(t,"alt",i),o&128&&S(t,"object-fit",s[7])},d(s){s&&j(t)}}}function uI(n){let t,e=n[2]&&yu(n);return{c(){e&&e.c(),t=Ie()},m(i,s){e&&e.m(i,s),O(i,t,s)},p(i,[s]){i[2]?e?e.p(i,s):(e=yu(i),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},i:J,o:J,d(i){e&&e.d(i),i&&j(t)}}}function fI(n,t,e){let i,s,{mediaInstance:o={videoInstance:void 0,paused:!0}}=t,{tag:r}=t,{media:a}=t,{playButtonIfNeed:l="withoutText"}=t,{playButtonSizeIfNeed:c="small"}=t,{canPlay:d=!0}=t,{autoplayVideo:h=!1}=t,{objectFit:f="fill"}=t,{disableVideoIfHavePoster:m=!1}=t,A=!0,p=!1;function g(){e(9,p=(a==null?void 0:a.type)==="Video"&&!!a.videoCoverUrl)}const v=ui("mediaStore"),y=ui("hooks"),P=()=>{p||i&&(e(10,i.muted=!0,i),i.play(),i.pause(),e(10,i.muted=!1,i),e(9,p=!0))};y.on("loadVideoFirstFrame",P),gt(()=>{v.subscribe(({currentMediaElement:F})=>{F!==i&&(i==null||i.pause())})});const I=F=>{e(11,A=!1),e(0,o.paused=!1,o),e(9,p=!0),i&&v.set({currentMediaElement:i}),y.emit("playStateChange",{event:F,state:"playing",tag:r,mediaInstance:i})},E=F=>{e(11,A=!0),e(0,o.paused=!0,o),y.emit("playStateChange",{event:F,state:"paused",tag:r,mediaInstance:i})},C=F=>{e(11,A=!0),e(0,o.paused=!0,o),y.emit("playStateChange",{event:F,state:"paused",tag:r,mediaInstance:i})},z=F=>{e(11,A=!0),e(0,o.paused=!0,o),y.emit("playStateChange",{event:F,state:"paused",tag:r,mediaInstance:i})},R=F=>{i&&i.pause()};function U(F){Ne[F?"unshift":"push"](()=>{o.videoInstance=F,e(0,o)})}const H=()=>l==="withText"?Rr:l==="withoutText"?Qr:l,N=F=>{d&&i&&(e(10,i.muted=!1,i),i.play())};return n.$$set=F=>{"mediaInstance"in F&&e(0,o=F.mediaInstance),"tag"in F&&e(1,r=F.tag),"media"in F&&e(2,a=F.media),"playButtonIfNeed"in F&&e(3,l=F.playButtonIfNeed),"playButtonSizeIfNeed"in F&&e(4,c=F.playButtonSizeIfNeed),"canPlay"in F&&e(5,d=F.canPlay),"autoplayVideo"in F&&e(6,h=F.autoplayVideo),"objectFit"in F&&e(7,f=F.objectFit),"disableVideoIfHavePoster"in F&&e(8,m=F.disableVideoIfHavePoster)},n.$$.update=()=>{if(n.$$.dirty&1&&e(10,i=o.videoInstance),n.$$.dirty&4&&e(14,s=a==null?void 0:a.url),n.$$.dirty&16384&&s&&g(),n.$$.dirty&1024&&i&&e(11,A=i.paused),n.$$.dirty&1540&&(a==null?void 0:a.type)==="Video"&&!p){const F=navigator.userAgent.toLowerCase().indexOf("micromessenger")!==-1,_=navigator.userAgent.toLowerCase().indexOf("iphone")!==-1&&F;i&&_&&i.paused&&(document.removeEventListener("WeixinJSBridgeReady",P),document.removeEventListener("touchstart",P),document.removeEventListener("click",P),document.addEventListener("WeixinJSBridgeReady",P),document.addEventListener("touchstart",P),document.addEventListener("click",P))}},[o,r,a,l,c,d,h,f,m,p,i,A,v,y,s,I,E,C,z,R,U,H,N]}class wu extends ce{constructor(t){super(),le(this,t,fI,uI,ae,{mediaInstance:0,tag:1,media:2,playButtonIfNeed:3,playButtonSizeIfNeed:4,canPlay:5,autoplayVideo:6,objectFit:7,disableVideoIfHavePoster:8},aI)}}function mI(n){me(n,"svelte-1mrbqlg",".media-list-wrapper.svelte-1mrbqlg.svelte-1mrbqlg{width:100%;height:100%;position:relative;overflow:hidden;border-radius:0.125rem}.media-list-wrapper.svelte-1mrbqlg .media-list.svelte-1mrbqlg{position:relative;pointer-events:auto;height:100%;left:50%;top:50%;transform:translate(-50%, -50%)}.media-list-wrapper.svelte-1mrbqlg .media-list.svelte-1mrbqlg .sc-carousel__carousel-container,.media-list-wrapper.svelte-1mrbqlg .media-list.svelte-1mrbqlg .sc-carousel__content-container{height:100%}")}function Cu(n,t,e){const i=n.slice();return i[28]=t[e],i[29]=t,i[30]=e,i}function Iu(n){let t,e,i,s,o,r,a;const l=[pI,gI],c=[];function d(h,f){return h[13]&&h[10].length>1?0:1}return i=d(n),s=c[i]=l[i](n),{c(){t=x("div"),e=x("div"),s.c(),w(e,"class","media-list svelte-1mrbqlg"),$(e,"carouselEnabled",n[13]),w(t,"class","media-list-wrapper svelte-1mrbqlg"),$(t,"unfolded",n[5])},m(h,f){O(h,t,f),L(t,e),c[i].m(e,null),a=!0},p(h,f){n=h;let m=i;i=d(n),i===m?c[i].p(n,f):(he(),T(c[m],1,1,()=>{c[m]=null}),ue(),s=c[i],s?s.p(n,f):(s=c[i]=l[i](n),s.c()),D(s,1),s.m(e,null)),(!a||f[0]&8192)&&$(e,"carouselEnabled",n[13]),(!a||f[0]&32)&&$(t,"unfolded",n[5])},i(h){a||(D(s),h&&We(()=>{a&&(r&&r.end(1),o=Si(t,sc,n[6]?{y:4,duration:n[4],delay:n[2],easing:ei}:void 0),o.start())}),a=!0)},o(h){T(s),o&&o.invalidate(),h&&(r=fn(t,sc,n[6]?{y:4,duration:n[4],delay:n[3],easing:ei}:void 0)),a=!1},d(h){h&&j(t),c[i].d(),h&&r&&r.end()}}}function gI(n){let t,e,i;const s=[{media:n[1][0]},{autoplayVideo:n[14]},n[7],{tag:n[0]}];function o(a){n[21](a)}let r={};for(let a=0;a<s.length;a+=1)r=st(r,s[a]);return n[8][0]!==void 0&&(r.mediaInstance=n[8][0]),t=new wu({props:r}),Ne.push(()=>gr(t,"mediaInstance",o)),{c(){oe(t.$$.fragment)},m(a,l){ne(t,a,l),i=!0},p(a,l){const c=l[0]&16515?dt(s,[l[0]&2&&{media:a[1][0]},l[0]&16384&&{autoplayVideo:a[14]},l[0]&128&&Xl(a[7]),l[0]&1&&{tag:a[0]}]):{};!e&&l[0]&256&&(e=!0,c.mediaInstance=a[8][0],cr(()=>e=!1)),t.$set(c)},i(a){i||(D(t.$$.fragment,a),i=!0)},o(a){T(t.$$.fragment,a),i=!1},d(a){se(t,a)}}}function pI(n){let t,e,i={dots:!1,arrows:!1,$$slots:{default:[AI]},$$scope:{ctx:n}};return t=new rI({props:i}),n[19](t),t.$on("pageChange",n[20]),{c(){oe(t.$$.fragment)},m(s,o){ne(t,s,o),e=!0},p(s,o){const r={};o[0]&1409|o[1]&1&&(r.$$scope={dirty:o,ctx:s}),t.$set(r)},i(s){e||(D(t.$$.fragment,s),e=!0)},o(s){T(t.$$.fragment,s),e=!1},d(s){n[19](null),se(t,s)}}}function Pu(n){let t,e,i;const s=[n[7],{media:n[28]},{tag:n[0]}];function o(a){n[18](a,n[30])}let r={};for(let a=0;a<s.length;a+=1)r=st(r,s[a]);return n[8][n[30]]!==void 0&&(r.mediaInstance=n[8][n[30]]),t=new wu({props:r}),Ne.push(()=>gr(t,"mediaInstance",o)),{c(){oe(t.$$.fragment)},m(a,l){ne(t,a,l),i=!0},p(a,l){n=a;const c=l[0]&1153?dt(s,[l[0]&128&&Xl(n[7]),l[0]&1024&&{media:n[28]},l[0]&1&&{tag:n[0]}]):{};!e&&l[0]&256&&(e=!0,c.mediaInstance=n[8][n[30]],cr(()=>e=!1)),t.$set(c)},i(a){i||(D(t.$$.fragment,a),i=!0)},o(a){T(t.$$.fragment,a),i=!1},d(a){se(t,a)}}}function AI(n){let t,e,i=n[10],s=[];for(let r=0;r<i.length;r+=1)s[r]=Pu(Cu(n,i,r));const o=r=>T(s[r],1,1,()=>{s[r]=null});return{c(){for(let r=0;r<s.length;r+=1)s[r].c();t=Ie()},m(r,a){for(let l=0;l<s.length;l+=1)s[l]&&s[l].m(r,a);O(r,t,a),e=!0},p(r,a){if(a[0]&1409){i=r[10];let l;for(l=0;l<i.length;l+=1){const c=Cu(r,i,l);s[l]?(s[l].p(c,a),D(s[l],1)):(s[l]=Pu(c),s[l].c(),D(s[l],1),s[l].m(t.parentNode,t))}for(he(),l=i.length;l<s.length;l+=1)o(l);ue()}},i(r){if(!e){for(let a=0;a<i.length;a+=1)D(s[a]);e=!0}},o(r){s=s.filter(Boolean);for(let a=0;a<s.length;a+=1)T(s[a]);e=!1},d(r){Ot(s,r),r&&j(t)}}}function vI(n){let t,e,i=n[5]&&Iu(n);return{c(){i&&i.c(),t=Ie()},m(s,o){i&&i.m(s,o),O(s,t,o),e=!0},p(s,o){s[5]?i?(i.p(s,o),o[0]&32&&D(i,1)):(i=Iu(s),i.c(),D(i,1),i.m(t.parentNode,t)):i&&(he(),T(i,1,1,()=>{i=null}),ue())},i(s){e||(D(i),e=!0)},o(s){T(i),e=!1},d(s){i&&i.d(s),s&&j(t)}}}function bI(n,t,e){let i,s,o,r,{tag:a}=t,{mediaData:l}=t,{inDelay:c=0}=t,{outDelay:d=0}=t,{duration:h=0}=t,{unfolded:f=!0}=t,{animation:m=!0}=t,{mediaItemConfig:A}=t,{enableCarousel:p=!0}=t,{autoplayConfig:g={}}=t;const{autoplayVideo:v=!1,autoplayCarousel:y=!0,autoplayVideoInCarousel:P=!1}=g;let I=[],E=0,C,z=null;const R=ui("hooks"),U=ui("mediaStore");function H(){const Y=I[E],Z=Y==null?void 0:Y.videoInstance;Z&&(Z.paused?(Z.muted=!1,Z.play()):Z.pause())}gt(()=>{R.on("click",Y=>{var Z,q,ee;(ee=(q=(Z=a.tag3DContentSvelte)==null?void 0:Z.css3DInstance)==null?void 0:q.css3DObject)!=null&&ee.opacityMesh&&Y.tag.id===a.id&&H()}),z=setInterval(()=>{r&&(C==null||C.goToNext())},3e3)}),Mt(()=>{clearInterval(z),R.off("click",H)});function N(Y,Z){n.$$.not_equal(I[Z],Y)&&(I[Z]=Y,e(8,I))}function F(Y){Ne[Y?"unshift":"push"](()=>{C=Y,e(12,C)})}const Q=Y=>{i||U.set({currentMediaElement:null}),e(11,E=Y.detail)};function _(Y){n.$$.not_equal(I[0],Y)&&(I[0]=Y,e(8,I))}return n.$$set=Y=>{"tag"in Y&&e(0,a=Y.tag),"mediaData"in Y&&e(1,l=Y.mediaData),"inDelay"in Y&&e(2,c=Y.inDelay),"outDelay"in Y&&e(3,d=Y.outDelay),"duration"in Y&&e(4,h=Y.duration),"unfolded"in Y&&e(5,f=Y.unfolded),"animation"in Y&&e(6,m=Y.animation),"mediaItemConfig"in Y&&e(7,A=Y.mediaItemConfig),"enableCarousel"in Y&&e(16,p=Y.enableCarousel),"autoplayConfig"in Y&&e(17,g=Y.autoplayConfig)},n.$$.update=()=>{n.$$.dirty[0]&256&&e(9,i=I.every(Y=>Y.paused)),n.$$.dirty[0]&65538&&e(13,s=p&&(l==null?void 0:l.length)>1),n.$$.dirty[0]&2&&e(10,o=l),n.$$.dirty[0]&1536&&(r=o.length>1&&y&&i)},[a,l,c,d,h,f,m,A,I,i,o,E,C,s,v,U,p,g,N,F,Q,_]}class ku extends ce{constructor(t){super(),le(this,t,bI,vI,ae,{tag:0,mediaData:1,inDelay:2,outDelay:3,duration:4,unfolded:5,animation:6,mediaItemConfig:7,enableCarousel:16,autoplayConfig:17},mI,[-1,-1])}}function yI(n){me(n,"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 Mu(n){let t,e,i,s,o,r,a,l;t=new Vt({props:{visible:n[3],left:61,bottom:57,width:2,blurRadius:150,spreadRadius:75}}),s=new Uy({props:{unfolded:n[3],outDelay:400}});let c=n[2]&&Eu(n),d=n[1]&&Du(n);return{c(){oe(t.$$.fragment),e=K(),i=x("div"),oe(s.$$.fragment),o=K(),c&&c.c(),r=K(),d&&d.c(),a=Ie(),w(i,"class","line svelte-1f7m1lj")},m(h,f){ne(t,h,f),O(h,e,f),O(h,i,f),ne(s,i,null),O(h,o,f),c&&c.m(h,f),O(h,r,f),d&&d.m(h,f),O(h,a,f),l=!0},p(h,f){const m={};f&8&&(m.visible=h[3]),t.$set(m);const A={};f&8&&(A.unfolded=h[3]),s.$set(A),h[2]?c?(c.p(h,f),f&4&&D(c,1)):(c=Eu(h),c.c(),D(c,1),c.m(r.parentNode,r)):c&&(he(),T(c,1,1,()=>{c=null}),ue()),h[1]?d?(d.p(h,f),f&2&&D(d,1)):(d=Du(h),d.c(),D(d,1),d.m(a.parentNode,a)):d&&(he(),T(d,1,1,()=>{d=null}),ue())},i(h){l||(D(t.$$.fragment,h),D(s.$$.fragment,h),D(c),D(d),l=!0)},o(h){T(t.$$.fragment,h),T(s.$$.fragment,h),T(c),T(d),l=!1},d(h){se(t,h),h&&j(e),h&&j(i),se(s),h&&j(o),c&&c.d(h),h&&j(r),d&&d.d(h),h&&j(a)}}}function Eu(n){let t,e,i;return e=new Th({props:{unfolded:n[3],content:n[2],inDelay:500}}),{c(){t=x("div"),oe(e.$$.fragment),w(t,"class","text svelte-1f7m1lj")},m(s,o){O(s,t,o),ne(e,t,null),i=!0},p(s,o){const r={};o&8&&(r.unfolded=s[3]),o&4&&(r.content=s[2]),e.$set(r)},i(s){i||(D(e.$$.fragment,s),i=!0)},o(s){T(e.$$.fragment,s),i=!1},d(s){s&&j(t),se(e)}}}function Du(n){let t,e,i;return e=new ku({props:{autoplayConfig:{autoplayCarousel:!1},unfolded:n[3],mediaData:n[1],tag:n[0],enableCarousel:!1,mediaItemConfig:{canPlay:!1,playButtonSizeIfNeed:"small",disableVideoIfHavePoster:!0},inDelay:500,duration:500}}),{c(){t=x("div"),oe(e.$$.fragment),w(t,"class","media-wrapper svelte-1f7m1lj")},m(s,o){O(s,t,o),ne(e,t,null),i=!0},p(s,o){const r={};o&8&&(r.unfolded=s[3]),o&2&&(r.mediaData=s[1]),o&1&&(r.tag=s[0]),e.$set(r)},i(s){i||(D(e.$$.fragment,s),i=!0)},o(s){T(e.$$.fragment,s),i=!1},d(s){s&&j(t),se(e)}}}function wI(n){let t,e,i=n[0].state&&Mu(n);return{c(){i&&i.c(),t=Ie()},m(s,o){i&&i.m(s,o),O(s,t,o),e=!0},p(s,[o]){s[0].state?i?(i.p(s,o),o&1&&D(i,1)):(i=Mu(s),i.c(),D(i,1),i.m(t.parentNode,t)):i&&(he(),T(i,1,1,()=>{i=null}),ue())},i(s){e||(D(i),e=!0)},o(s){T(i),e=!1},d(s){i&&i.d(s),s&&j(t)}}}function CI(n,t,e){let i,s,o,r,{tag:a}=t;return n.$$set=l=>{"tag"in l&&e(0,a=l.tag)},n.$$.update=()=>{var l,c,d;n.$$.dirty&1&&e(3,i=a.state?a.state.unfolded:!1),n.$$.dirty&1&&e(4,s=(c=(l=a.data.title)!=null?l:a.data.text)!=null?c:""),n.$$.dirty&16&&e(2,o=((d=s.length)!=null?d:0)>7?s.substring(0,6)+"...":s),n.$$.dirty&1&&e(1,r=a.data.mediaData)},[a,r,o,i,s]}class II extends ce{constructor(t){super(),le(this,t,CI,wI,ae,{tag:0},yI)}}function PI(n){me(n,"svelte-sezqcq",'@charset "UTF-8";.svelte-sezqcq.svelte-sezqcq{box-sizing:border-box}.marketing.svelte-sezqcq.svelte-sezqcq{transform:translateY(-100%)}.marketing.svelte-sezqcq .line.svelte-sezqcq{position:absolute;height:1.875rem;width:0.0625rem;left:50%;transform:translateX(-50%);background-color:white;bottom:0;transform-origin:bottom;transition:all 500ms}.marketing.svelte-sezqcq .content.svelte-sezqcq{position:relative;min-width:7.5rem;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-property:opacity, transform;transition-duration:500ms}.marketing.svelte-sezqcq .content .headerImage.svelte-sezqcq{position:absolute;width:100%;top:0.25rem;transform:translateY(-100%);border-top-left-radius:0.25rem;border-top-right-radius:0.25rem}.title-wrapper.svelte-sezqcq.svelte-sezqcq{position:relative;width:100%;height:1.125rem}.title-wrapper.svelte-sezqcq .title.svelte-sezqcq{border-radius:0.25rem;width:100%;padding-left:0.625rem;padding-right:0.625rem}.title-wrapper.svelte-sezqcq .title .text.svelte-sezqcq{display:block;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:0.75rem;font-weight:bold;line-height:1.125rem}.footer.svelte-sezqcq.svelte-sezqcq{position:relative;padding:0.5rem 0.625rem 0 0;width:100%;display:flex;align-items:center}.footer.svelte-sezqcq .goto-button.svelte-sezqcq{display:flex;align-self:flex-end;flex-wrap:wrap;align-items:center;overflow:hidden;height:0.875rem}.footer.svelte-sezqcq .goto-button .gap.svelte-sezqcq{height:100%;width:0.625rem}.footer.svelte-sezqcq .goto-button .text.svelte-sezqcq{display:block;height:100%;font-size:0.625rem}.footer.svelte-sezqcq .arrow-wrapper.svelte-sezqcq{height:0.875rem;display:flex;align-self:flex-end;flex-grow:0;flex-shrink:0;align-items:center;margin-left:0.25rem}.footer.svelte-sezqcq .arrow-wrapper svg.arrow.svelte-sezqcq{width:0.375rem;height:0.625rem}.footer.svelte-sezqcq .price.svelte-sezqcq{flex-shrink:0;margin-right:auto;white-space:nowrap;display:flex;align-items:baseline;margin-left:0.625rem}.footer.svelte-sezqcq .price .value.svelte-sezqcq{position:relative;font-size:0.875rem;line-height:1rem;font-family:TG-TYPE, PingFangSC, Segoe UI, Rototo, sans-serif;letter-spacing:0rem}.footer.svelte-sezqcq .price .unit.svelte-sezqcq{padding-left:0.125rem;font-size:0.625rem}.tags-wrapper.svelte-sezqcq.svelte-sezqcq{position:relative;overflow:hidden;height:1rem;margin-top:0.25rem}.tags-wrapper.svelte-sezqcq .tags.svelte-sezqcq{position:relative;display:inline-flex;max-width:100%;flex-wrap:wrap;padding-left:0.625rem;padding-right:0.375rem}.tags-wrapper.svelte-sezqcq .tags .tag.svelte-sezqcq{display:flex;align-items:center;justify-content:center;flex-shrink:0;flex-grow:0;font-size:0.625rem;height:1rem;margin-right:0.25rem;margin-bottom:0.625rem;padding:0 0.25rem;border-radius:0.125rem;max-width:100%;text-overflow:ellipsis;overflow:hidden}.marketing.light.svelte-sezqcq .content.svelte-sezqcq{background-color:white}.marketing.light.svelte-sezqcq .content .title-wrapper .title .text.svelte-sezqcq{color:rgba(0, 0, 0, 0.8)}.marketing.light.svelte-sezqcq .content .tags-wrapper .tags .primary-tag.svelte-sezqcq{background:rgba(234, 208, 154, 0.5);color:#946700}.marketing.light.svelte-sezqcq .content .tags-wrapper .tags .secondary-tag.svelte-sezqcq{background:rgba(0, 0, 0, 0.06);color:rgba(0, 0, 0, 0.5)}.marketing.light.svelte-sezqcq .content .footer.svelte-sezqcq{color:#946700;fill:#946700}.marketing.dark.svelte-sezqcq .content.svelte-sezqcq{background-color:rgba(0, 0, 0, 0.5)}.marketing.dark.svelte-sezqcq .content .title-wrapper .title .text.svelte-sezqcq{color:white}.marketing.dark.svelte-sezqcq .content .tags-wrapper .tags .primary-tag.svelte-sezqcq{background:rgba(234, 208, 154, 0.5);color:white}.marketing.dark.svelte-sezqcq .content .tags-wrapper .tags .secondary-tag.svelte-sezqcq{background:rgba(255, 255, 255, 0.15);color:rgba(255, 255, 255, 0.85)}.marketing.dark.svelte-sezqcq .content .footer.svelte-sezqcq{color:#ead09a;fill:#ead09a}.marketing.unfolded.svelte-sezqcq .line.svelte-sezqcq{transform:translateX(-50%) scale(1, 1)}.marketing.folded.svelte-sezqcq .line.svelte-sezqcq{transform:translateX(-50%) scale(1, 0);transition-timing-function:ease-in}.marketing.unfolded.svelte-sezqcq .content.svelte-sezqcq{opacity:1}.marketing.folded.svelte-sezqcq .content.svelte-sezqcq{opacity:0;transform:translateY(0.425rem);transition-timing-function:ease-in}')}function xu(n,t,e){const i=n.slice();return i[0]=t[e],i}function Su(n,t,e){const i=n.slice();return i[0]=t[e],i}function Lu(n){let t,e;return{c(){t=x("img"),w(t,"class","headerImage svelte-sezqcq"),tt(t.src,e=n[3].headerPictureUrl)||w(t,"src",e),w(t,"alt","")},m(i,s){O(i,t,s)},p(i,s){s&8&&!tt(t.src,e=i[3].headerPictureUrl)&&w(t,"src",e)},d(i){i&&j(t)}}}function Tu(n){let t,e,i,s,o,r=n[2]||[],a=[];for(let d=0;d<r.length;d+=1)a[d]=ju(Su(n,r,d));let l=n[5]||[],c=[];for(let d=0;d<l.length;d+=1)c[d]=zu(xu(n,l,d));return{c(){t=x("div"),e=x("div");for(let d=0;d<a.length;d+=1)a[d].c();i=K();for(let d=0;d<c.length;d+=1)c[d].c();w(e,"class","tags svelte-sezqcq"),w(t,"class","tags-wrapper svelte-sezqcq")},m(d,h){O(d,t,h),L(t,e);for(let f=0;f<a.length;f+=1)a[f]&&a[f].m(e,null);L(e,i);for(let f=0;f<c.length;f+=1)c[f]&&c[f].m(e,null);s||(o=[zt(mi.call(null,e)),be(e,"clientHeight",n[11])],s=!0)},p(d,h){if(h&4){r=d[2]||[];let f;for(f=0;f<r.length;f+=1){const m=Su(d,r,f);a[f]?a[f].p(m,h):(a[f]=ju(m),a[f].c(),a[f].m(e,i))}for(;f<a.length;f+=1)a[f].d(1);a.length=r.length}if(h&32){l=d[5]||[];let f;for(f=0;f<l.length;f+=1){const m=xu(d,l,f);c[f]?c[f].p(m,h):(c[f]=zu(m),c[f].c(),c[f].m(e,null))}for(;f<c.length;f+=1)c[f].d(1);c.length=l.length}},d(d){d&&j(t),Ot(a,d),Ot(c,d),s=!1,Xe(o)}}}function ju(n){let t,e=n[0]+"",i;return{c(){t=x("div"),i=De(e),w(t,"class","tag primary-tag svelte-sezqcq"),S(t,"min-width",sa)},m(s,o){O(s,t,o),L(t,i)},p(s,o){o&4&&e!==(e=s[0]+"")&&Se(i,e)},d(s){s&&j(t)}}}function zu(n){let t,e=n[0]+"",i;return{c(){t=x("div"),i=De(e),w(t,"class","tag secondary-tag svelte-sezqcq"),S(t,"min-width",sa)},m(s,o){O(s,t,o),L(t,i)},p(s,o){o&32&&e!==(e=s[0]+"")&&Se(i,e)},d(s){s&&j(t)}}}function Ou(n){let t,e,i=n[7]&&Bu(n),s=n[3].highlightText&&Ru(n);return{c(){t=x("div"),i&&i.c(),e=K(),s&&s.c(),w(t,"class","footer svelte-sezqcq")},m(o,r){O(o,t,r),i&&i.m(t,null),L(t,e),s&&s.m(t,null)},p(o,r){o[7]?i?i.p(o,r):(i=Bu(o),i.c(),i.m(t,e)):i&&(i.d(1),i=null),o[3].highlightText?s?s.p(o,r):(s=Ru(o),s.c(),s.m(t,null)):s&&(s.d(1),s=null)},d(o){o&&j(t),i&&i.d(),s&&s.d()}}}function Bu(n){let t,e,i=n[3].price.value+"",s,o,r=n[3].price.unit&&Vu(n);return{c(){t=x("div"),e=x("span"),s=De(i),o=K(),r&&r.c(),w(e,"class","value svelte-sezqcq"),w(t,"class","price svelte-sezqcq")},m(a,l){O(a,t,l),L(t,e),L(e,s),L(t,o),r&&r.m(t,null)},p(a,l){l&8&&i!==(i=a[3].price.value+"")&&Se(s,i),a[3].price.unit?r?r.p(a,l):(r=Vu(a),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(a){a&&j(t),r&&r.d()}}}function Vu(n){let t,e=n[3].price.unit+"",i;return{c(){t=x("span"),i=De(e),w(t,"class","unit svelte-sezqcq")},m(s,o){O(s,t,o),L(t,i)},p(s,o){o&8&&e!==(e=s[3].price.unit+"")&&Se(i,e)},d(s){s&&j(t)}}}function Ru(n){let t,e,i,s,o=n[3].highlightText+"",r,a,l;return{c(){t=x("div"),e=x("div"),i=K(),s=x("span"),r=De(o),a=K(),l=x("div"),l.innerHTML='<svg class="arrow svelte-sezqcq" viewBox="0 0 6 9"><g transform="translate(-3, -2)" fill-rule="nonzero" class="svelte-sezqcq"><path d="M4.43868724,2.12056563 C4.28121824,1.95989074 4.02582143,1.95979988 3.86824251,2.1203627 C3.72498894,2.26632889 3.71189225,2.49481723 3.82900374,2.65587166 L6.57092402,5.92894326 C6.72651763,6.11470411 6.72651763,6.38529589 6.57092402,6.57105674 L3.86804348,9.79798499 C3.72488984,9.94405307 3.71194952,10.1725507 3.8291712,10.3335217 L3.86824251,10.3796373 C4.01149607,10.5256035 4.23559087,10.5387981 4.39346025,10.4192733 L4.43868724,10.3794344 L8.1144599,6.5985342 C8.30312347,6.40447482 8.30312347,6.09552518 8.1144599,5.9014658 L4.43868724,2.12056563 Z" class="svelte-sezqcq"></path></g></svg>',w(e,"class","gap svelte-sezqcq"),w(s,"class","text svelte-sezqcq"),w(t,"class","goto-button goto-icon svelte-sezqcq"),w(l,"class","arrow-wrapper svelte-sezqcq")},m(c,d){O(c,t,d),L(t,e),L(t,i),L(t,s),L(s,r),O(c,a,d),O(c,l,d)},p(c,d){d&8&&o!==(o=c[3].highlightText+"")&&Se(r,o)},d(c){c&&j(t),c&&j(a),c&&j(l)}}}function kI(n){var I,E;let t,e,i,s,o,r,a,l,c,d,h=n[3].title+"",f,m,A,p,g;e=new Vt({props:{visible:n[4],outDelay:500,left:61,bottom:87,blurRadius:150,spreadRadius:75}});let v=n[3].headerPictureUrl&&Lu(n),y=((I=n[2].length)!=null?I:0)+((E=n[5].length)!=null?E:0)>0&&Tu(n),P=(n[7]||n[3].highlightText)&&Ou(n);return{c(){t=x("div"),oe(e.$$.fragment),i=K(),s=x("div"),o=K(),r=x("div"),v&&v.c(),a=K(),l=x("div"),c=x("div"),d=x("div"),f=De(h),m=K(),y&&y.c(),A=K(),P&&P.c(),w(s,"class","line svelte-sezqcq"),S(s,"transition-delay",n[4]?Io+"ms":Po+Gu-Qu-40+"ms"),w(d,"class","text svelte-sezqcq"),w(c,"class","title svelte-sezqcq"),w(l,"class","title-wrapper svelte-sezqcq"),w(r,"class","content svelte-sezqcq"),S(r,"max-width",Yt(n[9])),S(r,"transition-delay",n[4]?Io+Po+"ms":"0ms"),w(t,"class",p=Ge(`marketing ${n[6]}`)+" svelte-sezqcq"),$(t,"unfolded",n[4]),$(t,"folded",n[8])},m(C,z){O(C,t,z),ne(e,t,null),L(t,i),L(t,s),L(t,o),L(t,r),v&&v.m(r,null),L(r,a),L(r,l),L(l,c),L(c,d),L(d,f),L(r,m),y&&y.m(r,null),L(r,A),P&&P.m(r,null),g=!0},p(C,[z]){var U,H;const R={};z&16&&(R.visible=C[4]),e.$set(R),z&16&&S(s,"transition-delay",C[4]?Io+"ms":Po+Gu-Qu-40+"ms"),C[3].headerPictureUrl?v?v.p(C,z):(v=Lu(C),v.c(),v.m(r,a)):v&&(v.d(1),v=null),(!g||z&8)&&h!==(h=C[3].title+"")&&Se(f,h),((U=C[2].length)!=null?U:0)+((H=C[5].length)!=null?H:0)>0?y?y.p(C,z):(y=Tu(C),y.c(),y.m(r,A)):y&&(y.d(1),y=null),C[7]||C[3].highlightText?P?P.p(C,z):(P=Ou(C),P.c(),P.m(r,null)):P&&(P.d(1),P=null),z&16&&S(r,"transition-delay",C[4]?Io+Po+"ms":"0ms"),(!g||z&64&&p!==(p=Ge(`marketing ${C[6]}`)+" svelte-sezqcq"))&&w(t,"class",p),(!g||z&80)&&$(t,"unfolded",C[4]),(!g||z&320)&&$(t,"folded",C[8])},i(C){g||(D(e.$$.fragment,C),g=!0)},o(C){T(e.$$.fragment,C),g=!1},d(C){C&&j(t),se(e),v&&v.d(),y&&y.d(),P&&P.d()}}}const sa=40,Io=400,Qu=500,Po=180,Gu=500;function MI(n,t,e){let i,s,o,r,a,l,c,d,{tag:h}=t,f,m=(()=>{var g;const p=(g=h.data.limitWidth)!=null?g:!0;if(typeof p=="number")return p;if(p===!0)return 172})();const A=p=>{e(1,f=p.detail)};return n.$$set=p=>{"tag"in p&&e(0,h=p.tag)},n.$$.update=()=>{var p,g,v,y,P,I;n.$$.dirty&1&&e(4,i=(g=(p=h.state)==null?void 0:p.unfolded)!=null?g:!1),n.$$.dirty&16&&e(8,s=!i),n.$$.dirty&1&&e(3,o=h.data),n.$$.dirty&8&&e(7,r=jt((v=o.price)==null?void 0:v.value)&&((y=o.price)==null?void 0:y.value)!==""),n.$$.dirty&1&&e(6,a=h.data.theme||"light"),n.$$.dirty&1026&&f>40&&e(10,l=l-1),n.$$.dirty&1032&&e(2,c=((P=o.brandTags)==null?void 0:P.slice(0,l).filter(Boolean))||[]),n.$$.dirty&1036&&e(5,d=((I=o.tags)==null?void 0:I.slice(0,l-c.length).filter(Boolean))||[])},e(10,l=(m-20)/sa),[h,f,c,o,i,d,a,r,s,m,l,A]}class EI extends ce{constructor(t){super(),le(this,t,MI,kI,ae,{tag:0},PI)}}class DI extends Audio{constructor(e){super();u(this,"sharedAudioSrc");u(this,"sharedAudioPaused",!0);u(this,"sharedAudioCurrentTime",0);u(this,"tryplaying",!1);u(this,"audioInstance");u(this,"eventListenerDisposer");this.sharedAudioSrc=e}get paused(){var e;return(e=this.sharedAudioPaused)!=null?e:!0}get currentTime(){return this.sharedAudioCurrentTime}play(){return W(this,null,function*(){var i,s,o;if(this.tryplaying)return;this.tryplaying=!0,(!this.audioInstance||((i=this.audioInstance)==null?void 0:i.realSrc)!==this.sharedAudioSrc)&&(this.audioInstance=F1(this.sharedAudioSrc,{namespace:_r.PlayAudio})),(s=this.eventListenerDisposer)==null||s.call(this),this.eventListenerDisposer=this.addEventListeners(),this.audioInstance.currentTime=(o=this.currentTime)!=null?o:0;const e=this.audioInstance.currentTime!==this.currentTime;this.audioInstance.play().then(()=>{var r;this.audioInstance.muted=!1,e&&(this.audioInstance.currentTime=(r=this.currentTime)!=null?r:0),this.sharedAudioPaused=!1}).catch(r=>{var a;r.message==="The operation is not supported."?console.error("Error: 音频文件可能损坏或修改过文件后缀",r):console.error("Error: error playing media in Safari",r),this.endedHandler(),(a=this.onerror)==null||a.call(this,r)}).finally(()=>{this.tryplaying=!1})})}pause(e){var i;if(this.audioInstance&&!this.paused){if(this.sharedAudioPaused=!0,(i=this.eventListenerDisposer)==null||i.call(this),this.audioInstance.ended){this.endedHandler();return}this.audioInstance.paused||this.audioInstance.pause(),this.onpause(e!=null?e:new Event("pause")),this.clear()}}dispose(){var e;(e=this.eventListenerDisposer)==null||e.call(this),this.clear(),this.audioInstance=void 0}clear(){var e;(e=this.audioInstance)==null||e.clear()}endedHandler(e){var i,s;(i=this.onended)==null||i.call(this,e!=null?e:new Event("ended")),(s=this.eventListenerDisposer)==null||s.call(this),this.sharedAudioPaused=!0,this.sharedAudioCurrentTime=0,this.clear()}addEventListeners(){const e=this.audioInstance;if(!e)return;const i=f=>{var m;this.sharedAudioCurrentTime=e.currentTime,(m=this.ontimeupdate)==null||m.call(this,f)},s=f=>{var m;e.isBlankAudio||(this.sharedAudioPaused=!1,(m=this.onplay)==null||m.call(this,f))},o=f=>{this.pause(f)},r=f=>{this.endedHandler(f)},a=f=>{var m;this.sharedAudioPaused=!0,(m=this.onerror)==null||m.call(this,f)},l=f=>{var m;return(m=this.oncanplay)==null?void 0:m.call(this,f)},c=f=>{var m;return(m=this.oncanplaythrough)==null?void 0:m.call(this,f)},d=f=>{var m;return(m=this.onloadeddata)==null?void 0:m.call(this,f)},h=f=>{var m;return(m=this.onloadedmetadata)==null?void 0:m.call(this,f)};return e.addEventListener("timeupdate",i),e.addEventListener("play",s),e.addEventListener("pause",o),e.addEventListener("ended",r),e.addEventListener("error",a),e.addEventListener("canplay",l),e.addEventListener("canplaythrough",c),e.addEventListener("loadeddata",d),e.addEventListener("loadedmetadata",h),()=>{e.removeEventListener("timeupdate",i),e.removeEventListener("play",s),e.removeEventListener("pause",o),e.removeEventListener("ended",r),e.removeEventListener("error",a),e.removeEventListener("canplay",l),e.removeEventListener("canplaythrough",c),e.removeEventListener("loadeddata",d),e.removeEventListener("loadedmetadata",h)}}}function xI(n){me(n,"svelte-13e7hxv",".audio.svelte-13e7hxv{pointer-events:auto;cursor:pointer;width:100%;height:100%}")}function SI(n){let t,e,i,s;const o=n[8].default,r=sn(o,n,n[7],null);return{c(){t=x("div"),r&&r.c(),w(t,"class","audio svelte-13e7hxv"),w(t,"style",n[0])},m(a,l){O(a,t,l),r&&r.m(t,null),e=!0,i||(s=be(t,"click",Gl(n[1])),i=!0)},p(a,[l]){r&&r.p&&(!e||l&128)&&rn(r,o,a,a[7],e?on(o,a[7],l,null):an(a[7]),null),(!e||l&1)&&w(t,"style",a[0])},i(a){e||(D(r,a),e=!0)},o(a){T(r,a),e=!1},d(a){a&&j(t),r&&r.d(a),i=!1,s()}}}function LI(n,t,e){let{$$slots:i={},$$scope:s}=t,{url:o}=t,{enable:r=!0}=t,{style:a=""}=t,{hooksInfo:l}=t;const c=Hs(),d=ui("hooks"),h=ui("mediaStore");let f,m=!0;function A(){e(5,f.onplay=g=>{d.emit("playStateChange",V({event:g,state:"playing",mediaInstance:f},l)),c("play"),e(6,m=!1)},f),e(5,f.onpause=g=>{d.emit("playStateChange",V({event:g,state:"paused",mediaInstance:f},l)),c("pause"),e(6,m=!0)},f),e(5,f.onended=g=>{d.emit("playStateChange",V({event:g,state:"paused",mediaInstance:f},l)),c("pause"),e(6,m=!0)},f),e(5,f.onloadedmetadata=g=>{typeof f.duration=="number"&&!Number.isNaN(f.duration)&&c("duration",f.duration)},f),e(5,f.onerror=g=>{c("pause"),e(6,m=!0)},f),e(5,f.ontimeupdate=g=>{c("timeupdate",f.currentTime)},f)}h.subscribe(({currentMediaElement:g})=>{g!==f&&(m||f==null||f.pause())});function p(g){f&&(d.emit("click",V({event:g,target:"AudioTagPlayIcon",audioInstance:f},l)),h.set({currentMediaElement:f}),d.emit("playStateChange",V({event:g,state:f.paused?"playing":"paused",mediaInstance:f},l)),f.paused?f.play():f.pause())}return n.$$set=g=>{"url"in g&&e(2,o=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,s=g.$$scope)},n.$$.update=()=>{n.$$.dirty&4&&(o||c("duration",0)),n.$$.dirty&36&&(f==null||f.dispose(),e(5,f=new DI(o)),c("audioRef",f),setTimeout(()=>c("audioRef",f),200),A()),n.$$.dirty&40&&(r||f==null||f.pause()),n.$$.dirty&72&&c(r&&!m?"play":"pause")},[a,p,o,r,l,f,m,s,i]}let Nu=class extends ce{constructor(t){super(),le(this,t,LI,SI,ae,{url:2,enable:3,style:0,hooksInfo:4},xI)}};function TI(n){me(n,"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 Fu(n){let t,e;return t=new Vt({props:{center:!0,blurRadius:12,spreadRadius:5}}),{c(){oe(t.$$.fragment)},m(i,s){ne(t,i,s),e=!0},i(i){e||(D(t.$$.fragment,i),e=!0)},o(i){T(t.$$.fragment,i),e=!1},d(i){se(t,i)}}}function jI(n){let t,e,i,s,o,r=n[1]&&Fu();return{c(){t=x("div"),r&&r.c(),e=K(),i=x("div"),s=x("div"),s.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>',w(s,"class","sound-wave__container svelte-srt2pi"),w(i,"class","audio-icon svelte-srt2pi"),$(i,"playing",n[0]),w(t,"class","audio-icon__wrapper svelte-srt2pi"),w(t,"style",n[2]),S(t,"width",n[5]),S(t,"height",n[5])},m(a,l){O(a,t,l),r&&r.m(t,null),L(t,e),L(t,i),L(i,s),n[7](s),n[8](t),o=!0},p(a,[l]){a[1]?r?l&2&&D(r,1):(r=Fu(),r.c(),D(r,1),r.m(t,e)):r&&(he(),T(r,1,1,()=>{r=null}),ue()),(!o||l&1)&&$(i,"playing",a[0]),(!o||l&4)&&w(t,"style",a[2]);const c=l&4;(c||l&36)&&S(t,"width",a[5]),(c||l&36)&&S(t,"height",a[5])},i(a){o||(D(r),o=!0)},o(a){T(r),o=!1},d(a){a&&j(t),r&&r.d(),n[7](null),n[8](null)}}}function zI(n,t,e){let i,{playing:s}=t,{shadow:o=!1}=t,{style:r=null}=t,{width:a="100%"}=t,l,c;function d(f){Ne[f?"unshift":"push"](()=>{c=f,e(4,c)})}function h(f){Ne[f?"unshift":"push"](()=>{l=f,e(3,l)})}return n.$$set=f=>{"playing"in f&&e(0,s=f.playing),"shadow"in f&&e(1,o=f.shadow),"style"in f&&e(2,r=f.style),"width"in f&&e(6,a=f.width)},n.$$.update=()=>{n.$$.dirty&64&&e(5,i=typeof a=="number"?Yt(a):a)},[s,o,r,l,c,i,a,d,h]}class _u extends ce{constructor(t){super(),le(this,t,zI,jI,ae,{playing:0,shadow:1,style:2,width:6},TI)}}function OI(n){me(n,"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 Hu(n){var g,v;let t,e,i,s,o,r,a,l,c,d,h,f,m,A;e=new Vt({props:{visible:n[6],left:n[3]/2+"px",bottom:12,width:2,blurRadius:120,spreadRadius:60}});let p=n[6]&&Wu(n);return c=new Bh({props:{visible:n[6],textUnfolded:n[1],content:n[5]}}),h=new Yr({props:{unfolded:n[6],length:n[3],outDelay:n[4]+20*Math.min((v=(g=n[5])==null?void 0:g.length)!=null?v:10,15),useLinearColor:!0}}),{c(){t=x("div"),oe(e.$$.fragment),i=K(),s=x("div"),o=x("div"),r=x("div"),p&&p.c(),a=K(),l=x("div"),oe(c.$$.fragment),d=K(),oe(h.$$.fragment),w(r,"class","audio-icon svelte-1s6gk4a"),S(l,"display","inline-block"),w(o,"class","wrapper svelte-1s6gk4a"),w(s,"class","content svelte-1s6gk4a"),w(t,"class","audio-tag svelte-1s6gk4a"),$(t,"unfolded",n[6])},m(y,P){O(y,t,P),ne(e,t,null),L(t,i),L(t,s),L(s,o),L(o,r),p&&p.m(r,null),L(o,a),L(o,l),ne(c,l,null),L(t,d),ne(h,t,null),f=!0,m||(A=[be(l,"click",n[7]),zt(mi.call(null,l)),be(l,"clientWidth",n[12])],m=!0)},p(y,P){var z,R;const I={};P&64&&(I.visible=y[6]),P&8&&(I.left=y[3]/2+"px"),e.$set(I),y[6]?p?(p.p(y,P),P&64&&D(p,1)):(p=Wu(y),p.c(),D(p,1),p.m(r,null)):p&&(he(),T(p,1,1,()=>{p=null}),ue());const E={};P&64&&(E.visible=y[6]),P&2&&(E.textUnfolded=y[1]),P&32&&(E.content=y[5]),c.$set(E);const C={};P&64&&(C.unfolded=y[6]),P&8&&(C.length=y[3]),P&48&&(C.outDelay=y[4]+20*Math.min((R=(z=y[5])==null?void 0:z.length)!=null?R:10,15)),h.$set(C),(!f||P&64)&&$(t,"unfolded",y[6])},i(y){f||(D(e.$$.fragment,y),D(p),D(c.$$.fragment,y),D(h.$$.fragment,y),f=!0)},o(y){T(e.$$.fragment,y),T(p),T(c.$$.fragment,y),T(h.$$.fragment,y),f=!1},d(y){y&&j(t),se(e),p&&p.d(),se(c),se(h),m=!1,Xe(A)}}}function Wu(n){let t,e,i,s,o,r,a;return e=new Vt({props:{center:!0,blurRadius:15,spreadRadius:6}}),s=new Nu({props:{enable:n[6],url:n[0].data.audioUrl,hooksInfo:{tag:n[0]},$$slots:{default:[BI]},$$scope:{ctx:n}}}),s.$on("play",n[8]),s.$on("pause",n[9]),s.$on("error",n[10]),s.$on("audioRef",n[11]),{c(){t=x("div"),oe(e.$$.fragment),i=K(),oe(s.$$.fragment),w(t,"class","audio svelte-1s6gk4a")},m(l,c){O(l,t,c),ne(e,t,null),L(t,i),ne(s,t,null),a=!0},p(l,c){n=l;const d={};c&64&&(d.enable=n[6]),c&1&&(d.url=n[0].data.audioUrl),c&1&&(d.hooksInfo={tag:n[0]}),c&8196&&(d.$$scope={dirty:c,ctx:n}),s.$set(d)},i(l){a||(D(e.$$.fragment,l),D(s.$$.fragment,l),l&&We(()=>{a&&(r&&r.end(1),o=Si(t,ot,{duration:1e3,delay:0,easing:gn}),o.start())}),a=!0)},o(l){var c,d;T(e.$$.fragment,l),T(s.$$.fragment,l),o&&o.invalidate(),l&&(r=fn(t,ot,{duration:1e3,delay:20*Math.min((d=(c=n[5])==null?void 0:c.length)!=null?d:10,15),easing:gn})),a=!1},d(l){l&&j(t),se(e),se(s),l&&r&&r.end()}}}function BI(n){let t,e,i;return e=new _u({props:{playing:n[2]}}),{c(){t=x("div"),oe(e.$$.fragment),w(t,"class","audio-icon__wrapper svelte-1s6gk4a")},m(s,o){O(s,t,o),ne(e,t,null),i=!0},p(s,o){const r={};o&4&&(r.playing=s[2]),e.$set(r)},i(s){i||(D(e.$$.fragment,s),i=!0)},o(s){T(e.$$.fragment,s),i=!1},d(s){s&&j(t),se(e)}}}function VI(n){let t,e,i=n[0].state&&Hu(n);return{c(){i&&i.c(),t=Ie()},m(s,o){i&&i.m(s,o),O(s,t,o),e=!0},p(s,[o]){s[0].state?i?(i.p(s,o),o&1&&D(i,1)):(i=Hu(s),i.c(),D(i,1),i.m(t.parentNode,t)):i&&(he(),T(i,1,1,()=>{i=null}),ue())},i(s){e||(D(i),e=!0)},o(s){T(i),e=!1},d(s){i&&i.d(s),s&&j(t)}}}function RI(n,t,e){let i,s,o,{tag:r}=t,a=!1,l=!1,c;function d(){e(1,a=!a)}const h=()=>{e(2,l=!0)},f=()=>{e(2,l=!1)},m=()=>{e(2,l=!1)};function A(g){cn.call(this,n,g)}const p=g=>{e(3,c=g.detail)};return n.$$set=g=>{"tag"in g&&e(0,r=g.tag)},n.$$.update=()=>{var g,v,y;n.$$.dirty&1&&e(6,i=!!((g=r.state)!=null&&g.unfolded)),n.$$.dirty&1&&e(5,s=(y=(v=r.data.title)!=null?v:r.data.text)!=null?y:""),n.$$.dirty&2&&e(4,o=a?450:0)},[r,a,l,c,o,s,i,d,h,f,m,A,p]}class QI extends ce{constructor(t){super(),le(this,t,RI,VI,ae,{tag:0},OI)}}function GI(n){me(n,"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 Uu(n){let t,e,i,s;return i=new Nu({props:{style:"width: max-content; height: max-content;",enable:n[0].state.visible,url:n[0].data.audioUrl,hooksInfo:{tag:n[0]},$$slots:{default:[FI]},$$scope:{ctx:n}}}),i.$on("play",n[6]),i.$on("pause",n[7]),i.$on("error",n[8]),i.$on("timeupdate",n[9]),i.$on("duration",n[10]),i.$on("audioRef",n[11]),{c(){t=x("div"),e=x("div"),oe(i.$$.fragment),w(e,"class","audio-tag svelte-58hfjf"),S(e,"background-color",n[4].bgColor),S(e,"color",n[4].fontColor),w(t,"class","audio-tag__wrapper svelte-58hfjf")},m(o,r){O(o,t,r),L(t,e),ne(i,e,null),s=!0},p(o,r){const a={};r&1&&(a.enable=o[0].state.visible),r&1&&(a.url=o[0].data.audioUrl),r&1&&(a.hooksInfo={tag:o[0]}),r&8232&&(a.$$scope={dirty:r,ctx:o}),i.$set(a),r&16&&S(e,"background-color",o[4].bgColor),r&16&&S(e,"color",o[4].fontColor)},i(o){s||(D(i.$$.fragment,o),s=!0)},o(o){T(i.$$.fragment,o),s=!1},d(o){o&&j(t),se(i)}}}function NI(n){let t;return{c(){t=De(n[5])},m(e,i){O(e,t,i)},p(e,i){i&32&&Se(t,e[5])},d(e){e&&j(t)}}}function FI(n){let t,e,i,s,o,r,a;return i=new _u({props:{playing:n[3]}}),r=new Xr({props:{maxWidth:72,maxLine:1,$$slots:{default:[NI]},$$scope:{ctx:n}}}),{c(){t=x("div"),e=x("div"),oe(i.$$.fragment),s=K(),o=x("div"),oe(r.$$.fragment),w(e,"class","audio-icon__wrapper svelte-58hfjf"),w(o,"class","text svelte-58hfjf"),w(t,"class","audio__inner svelte-58hfjf")},m(l,c){O(l,t,c),L(t,e),ne(i,e,null),L(t,s),L(t,o),ne(r,o,null),a=!0},p(l,c){const d={};c&8&&(d.playing=l[3]),i.$set(d);const h={};c&8224&&(h.$$scope={dirty:c,ctx:l}),r.$set(h)},i(l){a||(D(i.$$.fragment,l),D(r.$$.fragment,l),a=!0)},o(l){T(i.$$.fragment,l),T(r.$$.fragment,l),a=!1},d(l){l&&j(t),se(i),se(r)}}}function _I(n){let t,e,i=n[0].state&&Uu(n);return{c(){i&&i.c(),t=Ie()},m(s,o){i&&i.m(s,o),O(s,t,o),e=!0},p(s,[o]){s[0].state?i?(i.p(s,o),o&1&&D(i,1)):(i=Uu(s),i.c(),D(i,1),i.m(t.parentNode,t)):i&&(he(),T(i,1,1,()=>{i=null}),ue())},i(s){e||(D(i),e=!0)},o(s){T(i),e=!1},d(s){i&&i.d(s),s&&j(t)}}}function HI(n,t,e){let i,s,{tag:o}=t;const r={light:{bgColor:"rgba(255, 255, 255, 0.3)",fontColor:"rgba(0, 0, 0, 0.6)"},dark:{bgColor:"rgba(0, 0, 0, 0.3)",fontColor:"white"}};let a=0,l=0,c=!1;const d=()=>{e(3,c=!0)},h=()=>{e(3,c=!1)},f=()=>{e(3,c=!1)},m=g=>{e(1,a=g.detail)},A=g=>{e(2,l=g.detail)};function p(g){cn.call(this,n,g)}return n.$$set=g=>{"tag"in g&&e(0,o=g.tag)},n.$$.update=()=>{var g,v,y;n.$$.dirty&1&&e(5,i=(v=(g=o.data.title)!=null?g:o.data.text)!=null?v:""),n.$$.dirty&1&&e(4,s=(y=r[o.data.theme||"light"])!=null?y:r.light)},[o,a,l,c,s,i,d,h,f,m,A,p]}class WI extends ce{constructor(t){super(),le(this,t,HI,_I,ae,{tag:0},GI)}}function UI(n){let t,e;return t=new WI({props:{tag:n[0]}}),t.$on("audioRef",n[2]),{c(){oe(t.$$.fragment)},m(i,s){ne(t,i,s),e=!0},p(i,s){const o={};s&1&&(o.tag=i[0]),t.$set(o)},i(i){e||(D(t.$$.fragment,i),e=!0)},o(i){T(t.$$.fragment,i),e=!1},d(i){se(t,i)}}}function YI(n){let t,e;return t=new QI({props:{tag:n[0]}}),t.$on("audioRef",n[2]),{c(){oe(t.$$.fragment)},m(i,s){ne(t,i,s),e=!0},p(i,s){const o={};s&1&&(o.tag=i[0]),t.$set(o)},i(i){e||(D(t.$$.fragment,i),e=!0)},o(i){T(t.$$.fragment,i),e=!1},d(i){se(t,i)}}}function XI(n){let t,e,i,s;const o=[YI,UI],r=[];function a(l,c){return l[1]==="line"?0:l[1]==="plane"?1:-1}return~(t=a(n))&&(e=r[t]=o[t](n)),{c(){e&&e.c(),i=Ie()},m(l,c){~t&&r[t].m(l,c),O(l,i,c),s=!0},p(l,[c]){let d=t;t=a(l),t===d?~t&&r[t].p(l,c):(e&&(he(),T(r[d],1,1,()=>{r[d]=null}),ue()),~t?(e=r[t],e?e.p(l,c):(e=r[t]=o[t](l),e.c()),D(e,1),e.m(i.parentNode,i)):e=null)},i(l){s||(D(e),s=!0)},o(l){T(e),s=!1},d(l){~t&&r[t].d(l),l&&j(i)}}}function ZI(n,t,e){let i,{tag:s}=t,o;function r(a){o=a.detail}return s.play=()=>o.play(),s.pause=()=>o.pause(),n.$$set=a=>{"tag"in a&&e(0,s=a.tag)},n.$$.update=()=>{var a;n.$$.dirty&1&&e(1,i=(a=s.data.appearance)!=null?a:"line")},[s,i,r]}class JI extends ce{constructor(t){super(),le(this,t,ZI,XI,ae,{tag:0})}}function qI(n){me(n,"svelte-10cw0el",".media-wrapper.svelte-10cw0el{position:absolute;width:100%;height:100%}")}function Yu(n){var s;let t,e,i;return e=new ku({props:{mediaItemConfig:{canPlay:!0,playButtonSizeIfNeed:"large",playButtonIfNeed:(s=n[4])!=null?s:"withText",disableVideoIfHavePoster:!1,objectFit:n[2]},unfolded:n[6],mediaData:n[5],enableCarousel:n[1],autoplayConfig:n[3],tag:n[0],inDelay:500,duration:500}}),{c(){t=x("div"),oe(e.$$.fragment),w(t,"class","media-wrapper svelte-10cw0el")},m(o,r){O(o,t,r),ne(e,t,null),i=!0},p(o,r){var l;const a={};r&20&&(a.mediaItemConfig={canPlay:!0,playButtonSizeIfNeed:"large",playButtonIfNeed:(l=o[4])!=null?l:"withText",disableVideoIfHavePoster:!1,objectFit:o[2]}),r&64&&(a.unfolded=o[6]),r&32&&(a.mediaData=o[5]),r&2&&(a.enableCarousel=o[1]),r&8&&(a.autoplayConfig=o[3]),r&1&&(a.tag=o[0]),e.$set(a)},i(o){i||(D(e.$$.fragment,o),i=!0)},o(o){T(e.$$.fragment,o),i=!1},d(o){o&&j(t),se(e)}}}function KI(n){let t,e,i=n[0].state&&n[5]&&Yu(n);return{c(){i&&i.c(),t=Ie()},m(s,o){i&&i.m(s,o),O(s,t,o),e=!0},p(s,[o]){s[0].state&&s[5]?i?(i.p(s,o),o&33&&D(i,1)):(i=Yu(s),i.c(),D(i,1),i.m(t.parentNode,t)):i&&(he(),T(i,1,1,()=>{i=null}),ue())},i(s){e||(D(i),e=!0)},o(s){T(i),e=!1},d(s){i&&i.d(s),s&&j(t)}}}function $I(n,t,e){let i,s,o,r,a,l,{tag:c}=t;return n.$$set=d=>{"tag"in d&&e(0,c=d.tag)},n.$$.update=()=>{var d,h;n.$$.dirty&1&&e(6,i=c.state?c.state.unfolded:!1),n.$$.dirty&1&&e(5,s=c.data.mediaData),n.$$.dirty&1&&e(1,o=c.data.enableCarousel),n.$$.dirty&1&&e(4,r=c.data.playIcon),n.$$.dirty&3&&e(3,a=(d=c.data.autoplayConfig)!=null?d:{autoplay:o!=null?o:!0,autoplayVideo:!0}),n.$$.dirty&1&&e(2,l=(h=c.data.objectFit)!=null?h:(()=>c.data.adaptationMode==="stretch"?"fill":c.data.adaptationMode==="proportional"?"contain":void 0)())},[c,o,l,a,r,s,i]}class eP extends ce{constructor(t){super(),le(this,t,$I,KI,ae,{tag:0},qI)}}function Xu(n){return W(this,null,function*(){return new Promise((t,e)=>{if(!n){e(Error("url is empty"));return}const i=new Image;i.src=n,i.onload=()=>t({width:i.width,height:i.height}),i.onerror=e})})}function tP(n){return W(this,null,function*(){const{url:t,ratio:e=3}=n;n.ratio||console.warn("Tag icon ratio is not set, default is 3");const{width:i,height:s}=yield Xu(t);return ge(V({},n),{width:i/e,height:s/e})})}function iP(n){return W(this,null,function*(){const{steps:t,url:e,ratio:i=3,fps:s=24}=n;if(!t)throw new Error("KeyframeIcon requires steps");const{width:o,height:r}=yield Xu(e),a=o/i,l=r/i,c=a/t,d=l,h=1/s*t+"s";return ge(V({},n),{width:c,height:d,duration:h})})}function nP(n){me(n,"svelte-316sq3","@keyframes svelte-316sq3-sprites-animation{0%{background-position:0 0}100%{background-position:100% 0}}.icon-image.svelte-316sq3{display:block;width:auto}.icon-keyframe.svelte-316sq3{background-repeat:no-repeat;background-size:auto 100%;animation-direction:normal;animation-iteration-count:infinite;animation-name:svelte-316sq3-sprites-animation;animation-delay:0}")}function Zu(n){n[1]=n[19].width}function Ju(n){n[1]=n[19].width,n[16]=n[19].height,n[17]=n[19].steps,n[18]=n[19].duration}function qu(n){let t,e,i,s=n[0]&&Ku();function o(l,c){return l[8]?oP:sP}let r=o(n),a=r(n);return{c(){t=x("div"),s&&s.c(),e=K(),a.c(),w(t,"class","icon"),S(t,"width",n[1])},m(l,c){O(l,t,c),s&&s.m(t,null),L(t,e),a.m(t,null),i=!0},p(l,c){l[0]?s?c&1&&D(s,1):(s=Ku(),s.c(),D(s,1),s.m(t,e)):s&&(he(),T(s,1,1,()=>{s=null}),ue()),r===(r=o(l))&&a?a.p(l,c):(a.d(1),a=r(l),a&&(a.c(),a.m(t,null))),c&2&&S(t,"width",l[1])},i(l){i||(D(s),i=!0)},o(l){T(s),i=!1},d(l){l&&j(t),s&&s.d(),a.d()}}}function Ku(n){let t,e;return t=new Vt({props:{center:!0,blurRadius:24,spreadRadius:16}}),{c(){oe(t.$$.fragment)},m(i,s){ne(t,i,s),e=!0},i(i){e||(D(t.$$.fragment,i),e=!0)},o(i){T(t.$$.fragment,i),e=!1},d(i){se(t,i)}}}function sP(n){let t,e,i={ctx:n,current:null,token:null,hasCatch:!1,pending:lP,then:aP,catch:rP,value:19};return Us(e=n[11](He({url:n[7],ratio:n[5]})),i),{c(){t=Ie(),i.block.c()},m(s,o){O(s,t,o),i.block.m(s,i.anchor=o),i.mount=()=>t.parentNode,i.anchor=t},p(s,o){n=s,i.ctx=n,o&160&&e!==(e=n[11](He({url:n[7],ratio:n[5]})))&&Us(e,i)||Yl(i,n,o)},d(s){s&&j(t),i.block.d(s),i.token=null,i=null}}}function oP(n){let t,e,i={ctx:n,current:null,token:null,hasCatch:!1,pending:hP,then:dP,catch:cP,value:19};return Us(e=n[10](He({url:n[7],steps:n[2],fps:n[6],ratio:n[5]})),i),{c(){t=Ie(),i.block.c()},m(s,o){O(s,t,o),i.block.m(s,i.anchor=o),i.mount=()=>t.parentNode,i.anchor=t},p(s,o){n=s,i.ctx=n,o&228&&e!==(e=n[10](He({url:n[7],steps:n[2],fps:n[6],ratio:n[5]})))&&Us(e,i)||Yl(i,n,o)},d(s){s&&j(t),i.block.d(s),i.token=null,i=null}}}function rP(n){return{c:J,m:J,p:J,d:J}}function aP(n){Zu(n);let t,e;return{c(){t=x("img"),w(t,"alt","tag-icon"),w(t,"class","icon-image svelte-316sq3"),tt(t.src,e=n[7])||w(t,"src",e),S(t,"width",Yt(Dn({originWidth:n[1],scale:n[4],wantedWidth:n[3]}).width))},m(i,s){O(i,t,s)},p(i,s){Zu(i),s&128&&!tt(t.src,e=i[7])&&w(t,"src",e),s&184&&S(t,"width",Yt(Dn({originWidth:i[1],scale:i[4],wantedWidth:i[3]}).width))},d(i){i&&j(t)}}}function lP(n){return{c:J,m:J,p:J,d:J}}function cP(n){return{c:J,m:J,p:J,d:J}}function dP(n){Ju(n);let t,e=`url(${n[7]})`,i=`steps(${n[17]-1})`;return{c(){t=x("div"),w(t,"class","icon-keyframe svelte-316sq3"),S(t,"width",Yt(Dn({originWidth:n[1],originHeight:n[16],scale:n[4],wantedWidth:n[3]}).width)),S(t,"height",Yt(Dn({originWidth:n[1],originHeight:n[16],scale:n[4],wantedWidth:n[3]}).height)),S(t,"background-image",e),S(t,"animation-duration",n[18]),S(t,"animation-timing-function",i)},m(s,o){O(s,t,o)},p(s,o){Ju(s),o&252&&S(t,"width",Yt(Dn({originWidth:s[1],originHeight:s[16],scale:s[4],wantedWidth:s[3]}).width)),o&252&&S(t,"height",Yt(Dn({originWidth:s[1],originHeight:s[16],scale:s[4],wantedWidth:s[3]}).height)),o&128&&e!==(e=`url(${s[7]})`)&&S(t,"background-image",e),o&228&&S(t,"animation-duration",s[18]),o&228&&i!==(i=`steps(${s[17]-1})`)&&S(t,"animation-timing-function",i)},d(s){s&&j(t)}}}function hP(n){return{c:J,m:J,p:J,d:J}}function uP(n){let t,e,i=n[9]&&qu(n);return{c(){i&&i.c(),t=Ie()},m(s,o){i&&i.m(s,o),O(s,t,o),e=!0},p(s,[o]){s[9]?i?(i.p(s,o),o&512&&D(i,1)):(i=qu(s),i.c(),D(i,1),i.m(t.parentNode,t)):i&&(he(),T(i,1,1,()=>{i=null}),ue())},i(s){e||(D(i),e=!0)},o(s){T(i),e=!1},d(s){i&&i.d(s),s&&j(t)}}}function Dn(n){const{originWidth:t,originHeight:e,scale:i=1,wantedWidth:s}=n,o=(s!=null?s:t)*i,r=typeof e=="number"?o*(e/t):void 0;return ge(V({},n),{width:o,height:r})}function fP(n,t,e){let i,s,o,r,a,l,c,d,h,{width:f=null}=t,{icon:m=null}=t,{shadow:A=!1}=t;const p=Hs();function g(P){return W(this,null,function*(){const I=yield iP(P);return p("iconLoaded",I),I})}function v(P){return W(this,null,function*(){if(typeof h=="number")return ge(V({},P),{width:h});const I=yield tP(P);return p("iconLoaded",I),I})}function y(){d||p("iconLoaded")}return gt(()=>{y()}),n.$$set=P=>{"width"in P&&e(1,f=P.width),"icon"in P&&e(12,m=P.icon),"shadow"in P&&e(0,A=P.shadow)},n.$$.update=()=>{var P,I;n.$$.dirty&4096&&e(7,i=m==null?void 0:m.url),n.$$.dirty&4096&&e(2,s=(P=m==null?void 0:m.steps)!=null?P:1),n.$$.dirty&4096&&e(6,o=m==null?void 0:m.fps),n.$$.dirty&4096&&e(5,r=m==null?void 0:m.ratio),n.$$.dirty&4096&&e(4,a=(I=m==null?void 0:m.scale)!=null?I:1),n.$$.dirty&4096&&e(3,l=m==null?void 0:m.width),n.$$.dirty&252&&e(9,c=He({url:i,steps:s,fps:o,ratio:r,scale:a,width:l})),n.$$.dirty&4&&e(8,d=s>1),n.$$.dirty&2&&(h=f)},y(),[A,f,s,l,a,r,o,i,d,c,g,v,m]}class $u extends ce{constructor(t){super(),le(this,t,fP,uP,ae,{width:1,icon:12,shadow:0},nP)}}function mP(n){me(n,"svelte-e58ijk",".wrapper.svelte-e58ijk{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-e58ijk{position:relative;display:flex;align-items:center;justify-content:center}.text.svelte-e58ijk{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;line-height:1.125rem;text-shadow:0.125rem 0rem 0.5rem rgba(0, 0, 0, 0.15)}")}function ef(n){let t,e,i,s,o,r;return e=new Vt({props:{outDelay:0,inDelay:0,center:!0,width:"80%",blurRadius:40,spreadRadius:16,opacity:.08}}),{c(){t=x("div"),oe(e.$$.fragment),i=K(),s=x("div"),o=De(n[1]),w(s,"class","text svelte-e58ijk"),w(t,"class","text-wrapper svelte-e58ijk")},m(a,l){O(a,t,l),ne(e,t,null),L(t,i),L(t,s),L(s,o),r=!0},p(a,l){(!r||l&2)&&Se(o,a[1])},i(a){r||(D(e.$$.fragment,a),r=!0)},o(a){T(e.$$.fragment,a),r=!1},d(a){a&&j(t),se(e)}}}function gP(n){let t,e,i,s;e=new $u({props:{icon:n[0],shadow:!0}}),e.$on("iconLoaded",n[4]);let o=n[1]&&n[2]&&ef(n);return{c(){t=x("div"),oe(e.$$.fragment),i=K(),o&&o.c(),w(t,"class","wrapper svelte-e58ijk")},m(r,a){O(r,t,a),ne(e,t,null),L(t,i),o&&o.m(t,null),s=!0},p(r,[a]){const l={};a&1&&(l.icon=r[0]),e.$set(l),r[1]&&r[2]?o?(o.p(r,a),a&6&&D(o,1)):(o=ef(r),o.c(),D(o,1),o.m(t,null)):o&&(he(),T(o,1,1,()=>{o=null}),ue())},i(r){s||(D(e.$$.fragment,r),D(o),s=!0)},o(r){T(e.$$.fragment,r),T(o),s=!1},d(r){r&&j(t),se(e),o&&o.d()}}}function pP(n,t,e){let i,s,o,{tag:r}=t;const a=()=>{e(2,i=!0)};return n.$$set=l=>{"tag"in l&&e(3,r=l.tag)},n.$$.update=()=>{var l,c,d;n.$$.dirty&8&&e(1,s=(l=r.data.title)!=null?l:r.data.text),n.$$.dirty&8&&e(0,o=(d=r.data.icon)!=null?d:(c=r.style)==null?void 0:c.point)},e(2,i=!1),[o,s,i,r,a]}class AP extends ce{constructor(t){super(),le(this,t,pP,gP,ae,{tag:3},mP)}}function vP(n){me(n,"svelte-nnvupv",".wrapper.svelte-nnvupv{position:relative;width:0;height:0;display:flex;flex-direction:column;justify-content:end;align-items:center}.line.svelte-nnvupv{position:relative;flex-shrink:0;width:0.0625rem;height:5rem;background-image:linear-gradient(to bottom, #ffffff, rgba(255, 255, 255, 0.5))}.media-item.svelte-nnvupv{box-sizing:content-box;position:relative;flex-shrink:0;width:2.625rem;height:2.625rem;border-style:solid;border-width:0.3125rem;-o-border-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJwAAACcCAMAAAC9ZjJ/AAAAnFBMVEX///8AAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////YxPlZAAAAM3RSTlMzADY6QEo9I1ROWlBHRBby7ufFq3kw+hEp0VcK3dS0opmRg3BpBi2JHxvhy72WZGGclV2LE9pqAAAHSUlEQVR42syY13riMBBGZ1VccKHZ2NQAAYdOkn3/d1sJ9ltrZAwBtz2XCZFPNP9IY+BXYda+GVLmubZjtVqWY7seM0LTXxdfuZicHxNPGAkny3Fszl2Xc9txrOvPPBL7BRYvIhfFTDiMHO4ZFDJQw+POSBiyOLq/Tulya9NwxIM5I3AXwrj4BxzDzKlxBXJbao2Q2GNBi26z65QvF4EzslwKT0Fda+QAqm8FcltX7JkBL2Bwa+Si7StZbuNaDiPwIoQ5lruR61QgZ3LLNqAQhm1xs2Q5rFZcr2S5iDncgFKg3GJRiXLr0EG7Vnj3nHBdltyGOx6BfLzT8u3QG066ncGg050Me4e35cmDfIjn8E0pcmPD4RRycIP+tP37Ju1pP3Dza+vQcXE5n+dVlAX9ye8HTPoBy6st94vKxTa/WVEa9JQ9mh2D1XlkM0KYPTqvguNM2c9eQG/WlttxIbmxYd/Mzmn299mD/XHl5lR8ddwP/trPTjezahvj1+V899b5QT+612cOP1cU7kJXn8PrZ7sf9NaV5vqvym24S7ILLjrXNH1x+BH865rMzsIAHeLyzWtyJs+WlM3blwf1v+EJvvudS3XnLFtabr4iF/PMUmTZxiV6DI5Ce0lAg/H4ebkw69aaygfsxANegCx38q+nraxd+KwccQ19kf5FLXh9ZAouen2WaQvynBxkZt13GZvB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ESZrof6s+q/iHUR4n6EFZfX+qLXz0yqYdN9ZiuXnDUq6F7qdbGEYs9yFFHYOrwUB27ugNrddSvLknU9ZK7mFNXmr/iK4NLr9Gx1egsHSBgAwisnW40XHSDNriSAxd64Ri5EJi4EGwjtNoxQSv2O1ELPESNWO+4r4UH90V5yMMaWFgkUZ+gtIQFlEZ5U9zEQXHJ+kbMhAMxBxNhfaaDf+c5g/MtDXA+2/zJwT++f3JwlXMvqw3DQBSGg3VmbFUa7UyDvHZo3/8FWxKKCNQX2ZbGJGttDloO/J/BMBFrQD/WQDuVuRjWzlzYjJOBEIxuIGQQptOqHrppFfq5KI2hGaWBx7mcLwjr5XwsYSGEFKMVQhpplxLSRrQSUmmW41toxbcYV2TLAo1sGRJWBd8e9YNv+O+Vqbyvn8pTuxoZoNrIAF0zeAaqyzPQJQe2aIjrwRZMTSYJQuclQX4f6mEql3yG5malBkMj9rYJ8LG+PODjbbuRPrJUmj4i+7UZjSJbFo2yFE7LbTke9kFlrhxU5q77iTeHEsQbLIXz4ng8vDor+AAZ3ZEgo3P9eCRlKUlN3S9tyuf7IKB/87BvGgrwqWle3AfPxjStDNkbt5K9sSjZm7BjysWOqTh2nK7H3UceEx07/vfTTgBsd7PA9nvR5Al1N/4OuMdn1D3eUXdvtFD3Zw6fIUQPDp9IYI7h8H8ALigtIKqA/ZIAAAAASUVORK5CYII=');border-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJwAAACcCAMAAAC9ZjJ/AAAAnFBMVEX///8AAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////YxPlZAAAAM3RSTlMzADY6QEo9I1ROWlBHRBby7ufFq3kw+hEp0VcK3dS0opmRg3BpBi2JHxvhy72WZGGclV2LE9pqAAAHSUlEQVR42syY13riMBBGZ1VccKHZ2NQAAYdOkn3/d1sJ9ltrZAwBtz2XCZFPNP9IY+BXYda+GVLmubZjtVqWY7seM0LTXxdfuZicHxNPGAkny3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8LG+PODjbbuRPrJUmj4i+7UZjSJbFo2yFE7LbTke9kFlrhxU5q77iTeHEsQbLIXz4ng8vDor+AAZ3ZEgo3P9eCRlKUlN3S9tyuf7IKB/87BvGgrwqWle3AfPxjStDNkbt5K9sSjZm7BjysWOqTh2nK7H3UceEx07/vfTTgBsd7PA9nvR5Al1N/4OuMdn1D3eUXdvtFD3Zw6fIUQPDp9IYI7h8H8ALigtIKqA/ZIAAAAASUVORK5CYII=');border-image-slice:15 fill}.media-content.svelte-nnvupv{position:relative;box-sizing:content-box;pointer-events:auto;width:100%;height:100%;border-radius:624.9375rem;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;user-select:none;-o-object-fit:cover;object-fit:cover;-o-object-position:center;object-position:center}")}function tf(n){let t,e,i,s,o,r=n[0].type==="Image"&&nf(n);return{c(){t=x("div"),e=x("div"),r&&r.c(),i=K(),s=x("div"),w(e,"class","media-item svelte-nnvupv"),w(e,"draggable","false"),w(s,"class","line svelte-nnvupv"),w(t,"class","wrapper svelte-nnvupv")},m(a,l){O(a,t,l),L(t,e),r&&r.m(e,null),L(t,i),L(t,s),o=!0},p(a,l){a[0].type==="Image"?r?(r.p(a,l),l&1&&D(r,1)):(r=nf(a),r.c(),D(r,1),r.m(e,null)):r&&(he(),T(r,1,1,()=>{r=null}),ue())},i(a){o||(D(r),o=!0)},o(a){T(r),o=!1},d(a){a&&j(t),r&&r.d()}}}function nf(n){let t,e,i,s,o,r;return t=new Vt({props:{blurRadius:22,spreadRadius:16,height:"80%",width:"80%",center:!0,round:!0}}),{c(){var a;oe(t.$$.fragment),e=K(),i=x("img"),w(i,"class","media-content svelte-nnvupv"),tt(i.src,s=(a=n[0].thumbnail)!=null?a:n[0].url)||w(i,"src",s),w(i,"alt",o=n[0].name),w(i,"draggable",!1)},m(a,l){ne(t,a,l),O(a,e,l),O(a,i,l),r=!0},p(a,l){var c;(!r||l&1&&!tt(i.src,s=(c=a[0].thumbnail)!=null?c:a[0].url))&&w(i,"src",s),(!r||l&1&&o!==(o=a[0].name))&&w(i,"alt",o)},i(a){r||(D(t.$$.fragment,a),r=!0)},o(a){T(t.$$.fragment,a),r=!1},d(a){se(t,a),a&&j(e),a&&j(i)}}}function bP(n){let t,e,i=n[0]&&tf(n);return{c(){i&&i.c(),t=Ie()},m(s,o){i&&i.m(s,o),O(s,t,o),e=!0},p(s,[o]){s[0]?i?(i.p(s,o),o&1&&D(i,1)):(i=tf(s),i.c(),D(i,1),i.m(t.parentNode,t)):i&&(he(),T(i,1,1,()=>{i=null}),ue())},i(s){e||(D(i),e=!0)},o(s){T(i),e=!1},d(s){i&&i.d(s),s&&j(t)}}}function yP(n,t,e){let i,{tag:s}=t;return n.$$set=o=>{"tag"in o&&e(1,s=o.tag)},n.$$.update=()=>{n.$$.dirty&2&&e(0,i=s.data.mediaData[0])},[i,s]}class wP extends ce{constructor(t){super(),le(this,t,yP,bP,ae,{tag:1},vP)}}function CP(n){me(n,"svelte-kzl2aj",".customElement__container.svelte-kzl2aj{position:relative}")}function IP(n){let t,e;return{c(){t=new Qs(!1),e=Ie(),t.a=e},m(i,s){t.m(n[2],i,s),O(i,e,s)},p:J,d(i){i&&j(e),i&&t.d()}}}function PP(n){let t,e=typeof n[2]=="string"&&IP(n);return{c(){t=x("div"),e&&e.c(),w(t,"class","customElement__container svelte-kzl2aj"),$(t,"unfolded",n[1])},m(i,s){O(i,t,s),e&&e.m(t,null),n[5](t)},p(i,[s]){typeof i[2]=="string"&&e.p(i,s),s&2&&$(t,"unfolded",i[1])},i:J,o:J,d(i){i&&j(t),e&&e.d(),n[5](null)}}}function kP(n,t,e){var d,h;let i,{tag:s}=t,{rendererMap:o=new Map}=t,r,a=(h=s.element)!=null?h:(d=o.get(s.contentType))==null?void 0:d.renderer,l;gt(()=>{r&&(a instanceof Element?(r.appendChild(a),l=()=>{a instanceof Element&&a.remove()}):typeof a=="function"&&(l=a(r,s)))}),Mt(()=>{l==null||l()});function c(f){Ne[f?"unshift":"push"](()=>{r=f,e(0,r)})}return n.$$set=f=>{"tag"in f&&e(3,s=f.tag),"rendererMap"in f&&e(4,o=f.rendererMap)},n.$$.update=()=>{n.$$.dirty&8&&e(1,i=s.state.unfolded)},[r,i,a,s,o,c]}class MP extends ce{constructor(t){super(),le(this,t,kP,PP,ae,{tag:3,rendererMap:4},CP)}}function EP(n){me(n,"svelte-qz1wo5",'@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/zgAAAIcACkAKQHgAAEAAAAAAAAAAAAAAAAAAABJAAMCLgGQAAUACAKKAlgAAABLAooCWAAAAV4AMgEsAAAAAAgAAAAAAAAAAAAAAQAAAAAA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FmaySqaQa+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-qz1wo5{position:relative;left:50%;top:50%;transform:translate(-50%, -50%);font-family:PingFangSC, Segoe UI, Rototo, sans-serif}.content__container.withAnimation.svelte-qz1wo5{transition:opacity 0.2s linear}.content__container.unClickable.svelte-qz1wo5{pointer-events:none !important}.content__container.unClickable.svelte-qz1wo5 *{pointer-events:none !important}.content__wrapper.svelte-qz1wo5{pointer-events:none;width:100%;height:100%}.content__container.hide.svelte-qz1wo5{opacity:0;pointer-events:none}.content__container.hide.svelte-qz1wo5 *{pointer-events:none !important}.content__container.disable.svelte-qz1wo5{display:none}.content.svelte-qz1wo5{position:relative;width:100%;height:100%;font-size:0.75rem;color:#fff}.content.svelte-qz1wo5:not(.unfolded){pointer-events:none}.content.svelte-qz1wo5:not(.unfolded) *{pointer-events:none !important}.content.unfolded.svelte-qz1wo5{pointer-events:auto}')}function DP(n){let t,e;return{c(){t=x("div"),w(t,"data-info","tag content is keep folded"),w(t,"data-id",e=n[1].id)},m(i,s){O(i,t,s)},p(i,s){s&2&&e!==(e=i[1].id)&&w(t,"data-id",e)},i:J,o:J,d(i){i&&j(t)}}}function xP(n){let t,e,i,s,o,r,a,l,c,d,h,f,m,A,p,g,v;const y=[VP,BP,OP,zP,jP,TP,LP],P=[];function I(E,C){return C&18&&(s=null),C&18&&(o=null),C&18&&(r=null),C&18&&(a=null),C&18&&(l=null),C&18&&(c=null),C&18&&(d=null),s==null&&(s=!!(["Text"].includes(E[1].contentType)||["Text"].includes(E[4].get(E[1].contentType)))),s?0:(o==null&&(o=!!(["ImageText","Image","Video"].includes(E[1].contentType)||["ImageText","Image","Video"].includes(E[4].get(E[1].contentType)))),o?1:(r==null&&(r=!!(["Audio"].includes(E[1].contentType)||["Audio"].includes(E[4].get(E[1].contentType)))),r?2:(a==null&&(a=!!(["Marketing"].includes(E[1].contentType)||["Marketing"].includes(E[4].get(E[1].contentType)))),a?3:(l==null&&(l=!!(["Link","VRLink","PanoLink","Sticker"].includes(E[1].contentType)||["Link","VRLink","PanoLink","Sticker"].includes(E[4].get(E[1].contentType)))),l?4:(c==null&&(c=!!(["MediaPlane","MediaModel"].includes(E[1].contentType)||["MediaPlane","MediaModel"].includes(E[4].get(E[1].contentType)))),c?5:(d==null&&(d=!!(["Panorama"].includes(E[1].contentType)||["Panorama"].includes(E[4].get(E[1].contentType)))),d?6:-1))))))}return~(h=I(n,-1))&&(f=P[h]=y[h](n)),{c(){var E;t=x("div"),e=x("div"),i=x("div"),f&&f.c(),w(i,"class","content svelte-qz1wo5"),$(i,"unfolded",(E=n[1].state)==null?void 0:E.unfolded),w(e,"class","content__wrapper svelte-qz1wo5"),w(t,"class",m=Ge(ht("content__container",n[1].className))+" svelte-qz1wo5"),w(t,"data-id",A=n[1].id),$(t,"disable",n[1].enabled===!1),$(t,"hide",n[6]),$(t,"withAnimation",n[0]),$(t,"unClickable",n[1].config.clickable===!1),S(t,"width",n[1].stickType==="Plane"||n[1].contentType==="MediaModel"?"100%":0),S(t,"height",n[1].stickType==="Plane"||n[1].contentType==="MediaModel"?"100%":0)},m(E,C){O(E,t,C),L(t,e),L(e,i),~h&&P[h].m(i,null),p=!0,g||(v=be(t,"click",Gl(n[16])),g=!0)},p(E,C){var R;let z=h;h=I(E,C),h===z?~h&&P[h].p(E,C):(f&&(he(),T(P[z],1,1,()=>{P[z]=null}),ue()),~h?(f=P[h],f?f.p(E,C):(f=P[h]=y[h](E),f.c()),D(f,1),f.m(i,null)):f=null),(!p||C&2)&&$(i,"unfolded",(R=E[1].state)==null?void 0:R.unfolded),(!p||C&2&&m!==(m=Ge(ht("content__container",E[1].className))+" svelte-qz1wo5"))&&w(t,"class",m),(!p||C&2&&A!==(A=E[1].id))&&w(t,"data-id",A),(!p||C&2)&&$(t,"disable",E[1].enabled===!1),(!p||C&66)&&$(t,"hide",E[6]),(!p||C&3)&&$(t,"withAnimation",E[0]),(!p||C&2)&&$(t,"unClickable",E[1].config.clickable===!1),C&2&&S(t,"width",E[1].stickType==="Plane"||E[1].contentType==="MediaModel"?"100%":0),C&2&&S(t,"height",E[1].stickType==="Plane"||E[1].contentType==="MediaModel"?"100%":0)},i(E){p||(D(f),p=!0)},o(E){T(f),p=!1},d(E){E&&j(t),~h&&P[h].d(),g=!1,v()}}}function SP(n){let t,e,i,s,o,r,a;return e=new MP({props:{tag:He(n[1]),rendererMap:n[3]}}),{c(){t=x("div"),oe(e.$$.fragment),w(t,"class",i=Ge(ht("content__container",n[1].className))+" svelte-qz1wo5"),w(t,"data-id",s=n[1].id),$(t,"custom-tag-disable",n[1].enabled===!1),$(t,"custom-tag-hide",n[6])},m(l,c){O(l,t,c),ne(e,t,null),o=!0,r||(a=be(t,"click",n[15]),r=!0)},p(l,c){const d={};c&2&&(d.tag=He(l[1])),c&8&&(d.rendererMap=l[3]),e.$set(d),(!o||c&2&&i!==(i=Ge(ht("content__container",l[1].className))+" svelte-qz1wo5"))&&w(t,"class",i),(!o||c&2&&s!==(s=l[1].id))&&w(t,"data-id",s),(!o||c&2)&&$(t,"custom-tag-disable",l[1].enabled===!1),(!o||c&66)&&$(t,"custom-tag-hide",l[6])},i(l){o||(D(e.$$.fragment,l),o=!0)},o(l){T(e.$$.fragment,l),o=!1},d(l){l&&j(t),se(e),r=!1,a()}}}function LP(n){let t,e;return t=new wP({props:{tag:He(n[1])}}),{c(){oe(t.$$.fragment)},m(i,s){ne(t,i,s),e=!0},p(i,s){const o={};s&2&&(o.tag=He(i[1])),t.$set(o)},i(i){e||(D(t.$$.fragment,i),e=!0)},o(i){T(t.$$.fragment,i),e=!1},d(i){se(t,i)}}}function TP(n){let t,e;return t=new eP({props:{tag:He(n[1])}}),{c(){oe(t.$$.fragment)},m(i,s){ne(t,i,s),e=!0},p(i,s){const o={};s&2&&(o.tag=He(i[1])),t.$set(o)},i(i){e||(D(t.$$.fragment,i),e=!0)},o(i){T(t.$$.fragment,i),e=!1},d(i){se(t,i)}}}function jP(n){let t,e;return t=new AP({props:{tag:He(n[1])}}),{c(){oe(t.$$.fragment)},m(i,s){ne(t,i,s),e=!0},p(i,s){const o={};s&2&&(o.tag=He(i[1])),t.$set(o)},i(i){e||(D(t.$$.fragment,i),e=!0)},o(i){T(t.$$.fragment,i),e=!1},d(i){se(t,i)}}}function zP(n){let t,e;return t=new EI({props:{tag:He(n[1])}}),{c(){oe(t.$$.fragment)},m(i,s){ne(t,i,s),e=!0},p(i,s){const o={};s&2&&(o.tag=He(i[1])),t.$set(o)},i(i){e||(D(t.$$.fragment,i),e=!0)},o(i){T(t.$$.fragment,i),e=!1},d(i){se(t,i)}}}function OP(n){let t,e;return t=new JI({props:{tag:He(n[1])}}),{c(){oe(t.$$.fragment)},m(i,s){ne(t,i,s),e=!0},p(i,s){const o={};s&2&&(o.tag=He(i[1])),t.$set(o)},i(i){e||(D(t.$$.fragment,i),e=!0)},o(i){T(t.$$.fragment,i),e=!1},d(i){se(t,i)}}}function BP(n){let t,e;return t=new II({props:{tag:He(n[1])}}),{c(){oe(t.$$.fragment)},m(i,s){ne(t,i,s),e=!0},p(i,s){const o={};s&2&&(o.tag=He(i[1])),t.$set(o)},i(i){e||(D(t.$$.fragment,i),e=!0)},o(i){T(t.$$.fragment,i),e=!1},d(i){se(t,i)}}}function VP(n){let t,e;return t=new Fy({props:{tag:He(n[1])}}),{c(){oe(t.$$.fragment)},m(i,s){ne(t,i,s),e=!0},p(i,s){const o={};s&2&&(o.tag=He(i[1])),t.$set(o)},i(i){e||(D(t.$$.fragment,i),e=!0)},o(i){T(t.$$.fragment,i),e=!1},d(i){se(t,i)}}}function RP(n){let t,e,i,s,o;const r=[SP,xP,DP],a=[];function l(c,d){return d&10&&(t=null),t==null&&(t=!!(c[1].element||c[3].has(c[1].contentType))),t?0:c[5]?1:2}return e=l(n,-1),i=a[e]=r[e](n),{c(){i.c(),s=Ie()},m(c,d){a[e].m(c,d),O(c,s,d),o=!0},p(c,[d]){let h=e;e=l(c,d),e===h?a[e].p(c,d):(he(),T(a[h],1,1,()=>{a[h]=null}),ue(),i=a[e],i?i.p(c,d):(i=a[e]=r[e](c),i.c()),D(i,1),i.m(s.parentNode,s))},i(c){o||(D(i),o=!0)},o(c){T(i),o=!1},d(c){a[e].d(c),c&&j(s)}}}function QP(n,t,e){var i,s;return!(!t.visible||!t.enabled||!e.visible||!((i=n.state)!=null&&i.visible)||((s=n.temporaryState)==null?void 0:s.visible)===!1||n.loading)}function GP(n,t,e){let i,s,o,r,a,l,{withAnimation:c=!1}=t,{tag:d}=t,{hooks:h}=t,{rendererMap:f=new Map}=t,{contentTypeMap:m=new Map}=t,{state:A}=t,{mediaStore:p}=t,{temporaryState:g}=t;rr("hooks",h),rr("mediaStore",p);let v,y;function P(C){C?h.emit("exposure",{id:r,type:"start"}):h.emit("exposure",{id:r,type:"end"})}const I=C=>h.emit("click",{event:C,target:"TagContent",tag:d}),E=C=>h.emit("click",{event:C,target:"TagContent",tag:d});return n.$$set=C=>{"withAnimation"in C&&e(0,c=C.withAnimation),"tag"in C&&e(1,d=C.tag),"hooks"in C&&e(2,h=C.hooks),"rendererMap"in C&&e(3,f=C.rendererMap),"contentTypeMap"in C&&e(4,m=C.contentTypeMap),"state"in C&&e(7,A=C.state),"mediaStore"in C&&e(8,p=C.mediaStore),"temporaryState"in C&&e(9,g=C.temporaryState)},n.$$.update=()=>{var C,z,R,U,H,N,F,Q,_,Y,Z;n.$$.dirty&2&&e(13,i=(C=d.state)==null?void 0:C.unfolded),n.$$.dirty&2&&e(12,s=(z=d.state)==null?void 0:z.visible),n.$$.dirty&642&&e(14,o=A.visible&&g.visible&&((R=d.state)==null?void 0:R.visible)),n.$$.dirty&2&&(r=d.id),n.$$.dirty&642&&e(6,a=!QP(d,A,g)),n.$$.dirty&16384&&P(o),n.$$.dirty&15362&&d.hooks&&(i!==void 0&&i!==y&&(e(11,y=i),i?(H=(U=d.hooks).emit)==null||H.call(U,"unfolded"):(F=d==null?void 0:(N=d.hooks).emit)==null||F.call(N,"folded")),s!==void 0&&s!==v&&(e(10,v=s),s?(_=(Q=d.hooks).emit)==null||_.call(Q,"show"):(Z=(Y=d.hooks).emit)==null||Z.call(Y,"hide"))),n.$$.dirty&2&&e(5,l=(()=>!(typeof d.config.unfoldedConfig=="object"&&d.config.unfoldedConfig.keep==="folded"))())},[c,d,h,f,m,l,a,A,p,g,v,y,s,i,o,I,E]}let sf=class extends ce{constructor(t){super(),le(this,t,GP,RP,ae,{withAnimation:0,tag:1,hooks:2,rendererMap:3,contentTypeMap:4,state:7,mediaStore:8,temporaryState:9},EP)}};function NP(n){me(n,"svelte-7aiuwz",'@charset "UTF-8";.tag-point-click-helper.svelte-7aiuwz.svelte-7aiuwz{position:absolute;pointer-events:auto;cursor:pointer;width:calc(100% + 0.75rem);height:calc(100% + 0.75rem);left:50%;top:50%;transform:translate(-50%, -50%)}.tag-point-wrapper.svelte-7aiuwz.svelte-7aiuwz{pointer-events:none;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%)}.tag-folded-point.svelte-7aiuwz.svelte-7aiuwz,.tag-unfolded-point.svelte-7aiuwz.svelte-7aiuwz{transition:all 0.5s}.tag-point-wrapper.svelte-7aiuwz .tag-unfolded-point.svelte-7aiuwz{display:flex;justify-content:center;align-items:center;position:absolute;width:100%;height:100%;border-radius:50%}.tag-point-wrapper.svelte-7aiuwz .tag-unfolded-point.svelte-7aiuwz: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-7aiuwz .tag-unfolded-point.svelte-7aiuwz: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-7aiuwz .tag-folded-point.svelte-7aiuwz{opacity:1;scale:1}.tag-point-wrapper.folded.svelte-7aiuwz .tag-unfolded-point.svelte-7aiuwz{opacity:0;scale:1}.tag-point-wrapper.unfolded.svelte-7aiuwz .tag-folded-point.svelte-7aiuwz{opacity:0;scale:0.2}.tag-point-wrapper.unfolded.svelte-7aiuwz .tag-unfolded-point.svelte-7aiuwz{opacity:1;scale:1}')}function FP(n){let t,e,i,s,o,r,a,l,c,d,h,f;return s=new Vt({props:{center:!0,blurRadius:15,spreadRadius:5,opacity:.3}}),c=new $u({props:{icon:n[2],width:n[1]}}),c.$on("iconLoaded",n[7]),{c(){t=x("div"),e=x("div"),i=K(),oe(s.$$.fragment),o=K(),r=x("div"),a=K(),l=x("div"),oe(c.$$.fragment),w(e,"class","tag-point-click-helper svelte-7aiuwz"),w(r,"class","tag-unfolded-point svelte-7aiuwz"),S(r,"transition-delay",(n[3]?n[5]:0)+"ms"),w(l,"class","tag-folded-point svelte-7aiuwz"),S(l,"transition-delay",(n[3]?n[5]:0)+"ms"),w(t,"class","tag-point-wrapper svelte-7aiuwz"),$(t,"unfolded",n[0]),$(t,"folded",n[3])},m(m,A){O(m,t,A),L(t,e),L(t,i),ne(s,t,null),L(t,o),L(t,r),L(t,a),L(t,l),ne(c,l,null),d=!0,h||(f=be(e,"click",n[4]),h=!0)},p(m,[A]){A&8&&S(r,"transition-delay",(m[3]?m[5]:0)+"ms");const p={};A&4&&(p.icon=m[2]),A&2&&(p.width=m[1]),c.$set(p),A&8&&S(l,"transition-delay",(m[3]?m[5]:0)+"ms"),(!d||A&1)&&$(t,"unfolded",m[0]),(!d||A&8)&&$(t,"folded",m[3])},i(m){d||(D(s.$$.fragment,m),D(c.$$.fragment,m),d=!0)},o(m){T(s.$$.fragment,m),T(c.$$.fragment,m),d=!1},d(m){m&&j(t),se(s),se(c),h=!1,f()}}}function _P(n,t,e){let i,s,o,r;const a=ui("hooks");let{tag:l}=t,c,d=!1;const h=()=>{c!==void 0&&clearTimeout(c),d=!0,c=setTimeout(()=>{d=!1},800)},f=p=>{d||a.emit("click",{event:p,target:"TagPoint",tag:l})},m=(()=>l.contentType==="Text"&&l.data.appearance==="plane"?500:800)();function A(p){cn.call(this,n,p)}return n.$$set=p=>{"tag"in p&&e(6,l=p.tag)},n.$$.update=()=>{var p,g,v,y;n.$$.dirty&64&&e(0,i=(p=l.state)==null?void 0:p.unfolded),n.$$.dirty&1&&e(3,s=!i),n.$$.dirty&64&&e(2,o=(v=(g=l.style)==null?void 0:g.point)!=null&&v.url?(y=l.style)==null?void 0:y.point:{url:Lb}),n.$$.dirty&64&&e(1,r=(()=>{var E,C,z,R;const P=(C=(E=l.style)==null?void 0:E.point)==null?void 0:C.width;if(typeof P=="number")return P;const I=(R=(z=l.style)==null?void 0:z.point)==null?void 0:R.size;if(typeof I=="number")return I;if(I==="S")return 18;if(I==="M")return 20;if(I==="L")return 24;if(I==="XL")return 28})())},h(),[i,r,o,s,f,m,l,A]}class HP extends ce{constructor(t){super(),le(this,t,_P,FP,ae,{tag:6},NP)}}function WP(n){me(n,"svelte-g38zun",".tag.svelte-g38zun{will-change:opacity}.tag.withAnimation.svelte-g38zun{transition:opacity 0.2s linear}.tag.enableZIndex.svelte-g38zun{position:absolute;left:0;top:0;width:100%;height:100%}.tag.hide.svelte-g38zun{opacity:0;pointer-events:none}.tag.hide.svelte-g38zun *{pointer-events:none !important}.tag.unClickable.svelte-g38zun{pointer-events:none !important}.tag.unClickable.svelte-g38zun *{pointer-events:none !important}.tag.disable.svelte-g38zun{display:none}.wrapper.svelte-g38zun{position:absolute;width:0rem;height:0rem;overflow:visible;pointer-events:auto}")}function of(n){let t,e,i,s,o,r,a,l,c,d;const h=[YP,UP],f=[];function m(v,y){return v[16]?0:1}i=m(n),s=f[i]=h[i](n);const A=[ZP,XP],p=[];function g(v,y){return v[15]?0:1}return r=g(n),a=p[r]=A[r](n),{c(){t=x("div"),e=x("div"),s.c(),o=K(),a.c(),w(e,"class",l=Ge(ht("wrapper",n[1].className?`${n[1].className}__wrapper`:void 0))+" svelte-g38zun"),w(e,"data-tag-unfolded",n[7]),w(e,"data-tag-id",n[14]),w(e,"data-content-type",c=n[1].contentType),S(e,"left",n[11]),S(e,"top",n[10]),w(t,"class","tag svelte-g38zun"),w(t,"data-tag-id",n[14]),$(t,"unClickable",n[1].config.clickable===!1),$(t,"disable",n[13]),$(t,"hide",n[12]),$(t,"withAnimation",n[0]),$(t,"enableZIndex",n[9]),S(t,"z-index",n[9])},m(v,y){O(v,t,y),L(t,e),f[i].m(e,null),L(e,o),p[r].m(e,null),d=!0},p(v,y){let P=i;i=m(v),i===P?f[i].p(v,y):(he(),T(f[P],1,1,()=>{f[P]=null}),ue(),s=f[i],s?s.p(v,y):(s=f[i]=h[i](v),s.c()),D(s,1),s.m(e,o));let I=r;r=g(v),r===I?p[r].p(v,y):(he(),T(p[I],1,1,()=>{p[I]=null}),ue(),a=p[r],a?a.p(v,y):(a=p[r]=A[r](v),a.c()),D(a,1),a.m(e,null)),(!d||y&2&&l!==(l=Ge(ht("wrapper",v[1].className?`${v[1].className}__wrapper`:void 0))+" svelte-g38zun"))&&w(e,"class",l),(!d||y&128)&&w(e,"data-tag-unfolded",v[7]),(!d||y&16384)&&w(e,"data-tag-id",v[14]),(!d||y&2&&c!==(c=v[1].contentType))&&w(e,"data-content-type",c),y&2048&&S(e,"left",v[11]),y&1024&&S(e,"top",v[10]),(!d||y&16384)&&w(t,"data-tag-id",v[14]),(!d||y&2)&&$(t,"unClickable",v[1].config.clickable===!1),(!d||y&8192)&&$(t,"disable",v[13]),(!d||y&4096)&&$(t,"hide",v[12]),(!d||y&1)&&$(t,"withAnimation",v[0]),(!d||y&512)&&$(t,"enableZIndex",v[9]),y&512&&S(t,"z-index",v[9])},i(v){d||(D(s),D(a),d=!0)},o(v){T(s),T(a),d=!1},d(v){v&&j(t),f[i].d(),p[r].d()}}}function UP(n){let t;return{c(){t=x("div"),w(t,"data-info","tag point is disable")},m(e,i){O(e,t,i)},p:J,i:J,o:J,d(e){e&&j(t)}}}function YP(n){let t,e;return t=new HP({props:{tag:n[1]}}),{c(){oe(t.$$.fragment)},m(i,s){ne(t,i,s),e=!0},p(i,s){const o={};s&2&&(o.tag=i[1]),t.$set(o)},i(i){e||(D(t.$$.fragment,i),e=!0)},o(i){T(t.$$.fragment,i),e=!1},d(i){se(t,i)}}}function XP(n){let t;return{c(){t=x("div"),w(t,"data-info","tag content is disable")},m(e,i){O(e,t,i)},p:J,i:J,o:J,d(e){e&&j(t)}}}function ZP(n){let t,e;return t=new sf({props:{mediaStore:n[2],withAnimation:n[0],tag:He(n[1]),hooks:n[17],state:n[5],temporaryState:n[6],rendererMap:n[3],contentTypeMap:n[4]}}),{c(){oe(t.$$.fragment)},m(i,s){ne(t,i,s),e=!0},p(i,s){const o={};s&4&&(o.mediaStore=i[2]),s&1&&(o.withAnimation=i[0]),s&2&&(o.tag=He(i[1])),s&32&&(o.state=i[5]),s&64&&(o.temporaryState=i[6]),s&8&&(o.rendererMap=i[3]),s&16&&(o.contentTypeMap=i[4]),t.$set(o)},i(i){e||(D(t.$$.fragment,i),e=!0)},o(i){T(t.$$.fragment,i),e=!1},d(i){se(t,i)}}}function JP(n){let t,e,i=n[8]&&of(n);return{c(){i&&i.c(),t=Ie()},m(s,o){i&&i.m(s,o),O(s,t,o),e=!0},p(s,[o]){s[8]?i?(i.p(s,o),o&256&&D(i,1)):(i=of(s),i.c(),D(i,1),i.m(t.parentNode,t)):i&&(he(),T(i,1,1,()=>{i=null}),ue())},i(s){e||(D(i),e=!0)},o(s){T(i),e=!1},d(s){i&&i.d(s),s&&j(t)}}}function qP(n,t,e){let i,s,o,r,a,l,c,d,h,f,{withAnimation:m=!1}=t,{tag:A}=t,{mediaStore:p}=t,{rendererMap:g=new Map}=t,{contentTypeMap:v=new Map}=t,{state:y}=t,{temporaryState:P}=t;const I=ui("hooks");return n.$$set=E=>{"withAnimation"in E&&e(0,m=E.withAnimation),"tag"in E&&e(1,A=E.tag),"mediaStore"in E&&e(2,p=E.mediaStore),"rendererMap"in E&&e(3,g=E.rendererMap),"contentTypeMap"in E&&e(4,v=E.contentTypeMap),"state"in E&&e(5,y=E.state),"temporaryState"in E&&e(6,P=E.temporaryState)},n.$$.update=()=>{var E,C,z,R;n.$$.dirty&10&&e(16,i=(()=>{var U,H,N;return!(((H=(U=A.style)==null?void 0:U.point)==null?void 0:H.enabled)===!1||((N=g.get(A.contentType))==null?void 0:N.usePoint)===!1||A.contentType==="Sticker"||A.contentType==="Link"||A.contentType==="VRLink"||A.contentType==="PanoLink"||A.contentType==="Panorama"||A.contentType==="Audio"&&A.data.appearance==="plane")})()),n.$$.dirty&2&&e(15,s=(()=>A.stickType==="2DPoint")()),n.$$.dirty&2&&e(14,o=A.id),n.$$.dirty&2&&e(13,r=A.enabled===!1||!A.state),n.$$.dirty&2&&e(12,a=!((E=A.state)!=null&&E.visible)||((C=A.temporaryState)==null?void 0:C.visible)===!1||!A.screenPosition),n.$$.dirty&2&&e(7,l=(z=A.state)==null?void 0:z.unfolded),n.$$.dirty&2&&e(8,c=A.screenPosition),n.$$.dirty&256&&e(11,d=(c==null?void 0:c.leftPercent)+"%"),n.$$.dirty&256&&e(10,h=(c==null?void 0:c.topPercent)+"%"),n.$$.dirty&130&&e(9,f=l?((R=A.zIndex)!=null?R:0)+(l?1e6:0):void 0)},[m,A,p,g,v,y,P,l,c,f,h,d,a,r,o,s,i,I]}class KP extends ce{constructor(t){super(),le(this,t,qP,JP,ae,{withAnimation:0,tag:1,mediaStore:2,rendererMap:3,contentTypeMap:4,state:5,temporaryState:6},WP)}}function $P(n){me(n,"svelte-p0nosq",".tag--container.svelte-p0nosq{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-p0nosq{transition:opacity 0.2s linear}.tag--container.hide.svelte-p0nosq{opacity:0;pointer-events:none}.tag--container.hide.svelte-p0nosq *{pointer-events:none !important}")}function rf(n,t,e){const i=n.slice();return i[8]=t[e],i}function af(n){let t,e=[],i=new Map,s,o=n[1];const r=a=>a[8].id;for(let a=0;a<o.length;a+=1){let l=rf(n,o,a),c=r(l);i.set(c,e[a]=lf(c,l))}return{c(){t=x("div");for(let a=0;a<e.length;a+=1)e[a].c();w(t,"class","tag--container svelte-p0nosq"),$(t,"hide",!n[5].visible||!n[6].visible),$(t,"withAnimation",n[0])},m(a,l){O(a,t,l);for(let c=0;c<e.length;c+=1)e[c]&&e[c].m(t,null);s=!0},p(a,l){l&127&&(o=a[1],he(),e=Bt(e,l,r,1,a,o,i,t,fi,lf,null,rf),ue()),(!s||l&96)&&$(t,"hide",!a[5].visible||!a[6].visible),(!s||l&1)&&$(t,"withAnimation",a[0])},i(a){if(!s){for(let l=0;l<o.length;l+=1)D(e[l]);s=!0}},o(a){for(let l=0;l<e.length;l+=1)T(e[l]);s=!1},d(a){a&&j(t);for(let l=0;l<e.length;l+=1)e[l].d()}}}function lf(n,t){let e,i,s;return i=new KP({props:{state:t[5],temporaryState:t[6],withAnimation:t[0],tag:t[8],mediaStore:t[2],rendererMap:t[3],contentTypeMap:t[4]}}),{key:n,first:null,c(){e=Ie(),oe(i.$$.fragment),this.first=e},m(o,r){O(o,e,r),ne(i,o,r),s=!0},p(o,r){t=o;const a={};r&32&&(a.state=t[5]),r&64&&(a.temporaryState=t[6]),r&1&&(a.withAnimation=t[0]),r&2&&(a.tag=t[8]),r&4&&(a.mediaStore=t[2]),r&8&&(a.rendererMap=t[3]),r&16&&(a.contentTypeMap=t[4]),i.$set(a)},i(o){s||(D(i.$$.fragment,o),s=!0)},o(o){T(i.$$.fragment,o),s=!1},d(o){o&&j(e),se(i,o)}}}function e2(n){let t,e,i=n[5].enabled&&af(n);return{c(){i&&i.c(),t=Ie()},m(s,o){i&&i.m(s,o),O(s,t,o),e=!0},p(s,[o]){s[5].enabled?i?(i.p(s,o),o&32&&D(i,1)):(i=af(s),i.c(),D(i,1),i.m(t.parentNode,t)):i&&(he(),T(i,1,1,()=>{i=null}),ue())},i(s){e||(D(i),e=!0)},o(s){T(i),e=!1},d(s){i&&i.d(s),s&&j(t)}}}function t2(n,t,e){let{withAnimation:i=!1}=t,{tags:s=[]}=t,{hooks:o}=t,{mediaStore:r}=t,{rendererMap:a}=t,{contentTypeMap:l}=t,{state:c}=t,{temporaryState:d}=t;return rr("hooks",o),n.$$set=h=>{"withAnimation"in h&&e(0,i=h.withAnimation),"tags"in h&&e(1,s=h.tags),"hooks"in h&&e(7,o=h.hooks),"mediaStore"in h&&e(2,r=h.mediaStore),"rendererMap"in h&&e(3,a=h.rendererMap),"contentTypeMap"in h&&e(4,l=h.contentTypeMap),"state"in h&&e(5,c=h.state),"temporaryState"in h&&e(6,d=h.temporaryState)},[i,s,r,a,l,c,d,o]}class i2 extends ce{constructor(t){super(),le(this,t,t2,e2,ae,{withAnimation:0,tags:1,hooks:7,mediaStore:2,rendererMap:3,contentTypeMap:4,state:5,temporaryState:6},$P)}}const n2=new Fn.GLTFLoader;function s2(n){return new Promise((t,e)=>{function i(o){t(o)}function s(o){e(o)}n2.load(n,i,void 0,s)})}const o2=new Map,r2=new Map;class a2 extends iy{constructor(e){super(e);u(this,"rendererMap",new Map);u(this,"contentTypeMap",new Map);u(this,"group",new G.Group);u(this,"imagePlaneGroup",new G.Group);u(this,"gltfObjectGroup",new G.Group);u(this,"enabledModelTagSet",new Set);u(this,"temporaryState",{visible:!0});u(this,"TagContainerSvelte");u(this,"loadModel",e=>W(this,null,function*(){var a;const i=e.data.modelUrl;if(!i)return;e.loading=!0;const s=s2(i).then(l=>{var h;const c=Object.assign(l.scene,{customID:e.id,isTagModel:!0,removeEventListener:this.getTagConfig(e).clickable===!1?()=>{}:this.addObjectClickHandler(e,l.scene,f=>{this.hooks.emit("click",{target:"TagModel",tag:e,event:f})})});return c.visible=this.getCurrentVisibleState(e),new G.Matrix4().fromArray(e.matrix).decompose(c.position,c.quaternion,c.scale),c.updateWorldMatrix(!0,!0),c.visible=this.getVisible(e),(h=this.getTagConfig(e).modelConfig)!=null&&h.autoLookAtEnabled&&c.lookAt(this.five.camera.position.clone().setY(c.position.y)),c});e.model={promise:s};const o=yield s;if(e.loading=!1,((a=e.model)==null?void 0:a.promise)!==s||!this.tags.includes(e))return;e.model.object=o;const r=this.gltfObjectGroup.children.find(l=>l.customID===e.id);if(r&&(this.gltfObjectGroup.remove(r),r.removeEventListener()),this.updateRender3DDomTag(),Ut(e)){if(this.getRenderType(e)==="Mesh"&&!e.mediaPlane){const l=e.data.mediaPosition.map($t);e.mediaPlane=new wh(e.data.mediaData[0].url,e.data.mediaPosition.map($t),{objectFit:e.data.objectFit});const c=new G.Vector3().addVectors(l[0],l[2]).divideScalar(2);e.mediaPlane.position.copy(c),o.add(e.mediaPlane)}this.getRenderType(e)!=="Mesh"&&(o.updateTagCss3DObjectMatrix=()=>this.updateTagCss3DObjectMatrix(e,o),o.updateTagCss3DObjectMatrix())}return this.gltfObjectGroup.add(o),o}));this.group.name="PanoTagPluginModelGroup",this.gltfObjectGroup.name="PanoTagPluginGLTFObjectGroup",this.imagePlaneGroup.name="ImagePlaneGroup",this.group.add(this.gltfObjectGroup),this.group.add(this.imagePlaneGroup)}registerRenderer(e,i,s){var o;this.rendererMap.set(e,{renderer:i,usePoint:(o=s==null?void 0:s.usePoint)!=null?o:!1})}bindRenderer(e,i){this.contentTypeMap.set(e,i)}clearTags(){this.tags.forEach(e=>{var i,s;(s=(i=e.mediaPlane)==null?void 0:i.parent)==null||s.remove(e.mediaPlane)}),this.tags=[],this.enabledModelTagSet.clear(),this.clearCache(),this.disposeAllCSS3DContainer(),this.updateRenderAllTags()}updateRenderAllTags(){this.enabledModelTagSet.clear(),this.tags.forEach(e=>e.stickType==="Model"&&this.enabledModelTagSet.add(e.id)),this.updateRenderPointTag(),this.updateRender3DDomTag(),this.updateRenderModelTag(),this.updateRenderImagePlane(),this.updateRenderVideoPlane()}updateRenderVideoPlane(){this.filterImagePlane.filter(i=>{var s,o;return((o=(s=i.data.mediaData)==null?void 0:s[0])==null?void 0:o.type)==="Video"}).forEach(i=>{var d;const s=i.data.mediaData[0];if(!s)return;const{url:o}=s;if(!o)return;const r=this.getCurrentVisibleState(i),a=(()=>!!(i.mediaPlane&&!r))(),l=(()=>!!(!i.mediaPlane&&r))(),c=(()=>!!(i.mediaPlane&&i.mediaPlane.src!==o))();if((a||c)&&i.mediaPlane&&(this.imagePlaneGroup.remove(i.mediaPlane),i.mediaPlane.dispose(),i.mediaPlane.removeFromParent(),i.mediaPlane=void 0),l||c){const h=i.position.map($t),f=new Ch(o,h,{videoCoverSrc:s.videoCoverUrl,playButton:i.data.playIcon,paused:!((d=i.data.autoplayConfig)!=null&&d.autoplayVideo),objectFit:i.data.objectFit,videoTextureMap:o2,ImageTextureMap:r2,domEvents:this.domEvents});f.onVideoReady=A=>{A.addEventListener("play",()=>this.mediaStore.set({currentMediaElement:f.videoInstance}))};const m=A=>(this.five.on("renderFrame",A),()=>this.five.off("renderFrame",A));f.initialRenderHooks(m),i.mediaPlane=f,this.imagePlaneGroup.add(i.mediaPlane)}})}updateRenderImagePlane(){this.filterImagePlane.filter(i=>{var s,o;return((o=(s=i.data.mediaData)==null?void 0:s[0])==null?void 0:o.type)==="Image"}).forEach(i=>{const{url:s}=i.data.mediaData[0];if(!s)return;const o=i.position.map($t),r=this.getCurrentVisibleState(i),a=(()=>!!(i.mediaPlane&&!r))(),l=(()=>!!(!i.mediaPlane&&r))(),c=(()=>!!(i.mediaPlane&&i.mediaPlane.src!==s))();(a||c)&&i.mediaPlane&&(this.imagePlaneGroup.remove(i.mediaPlane),i.mediaPlane.dispose(),i.mediaPlane.removeFromParent(),i.mediaPlane=void 0),(l||c)&&(i.mediaPlane=new wh(s,o,{objectFit:i.data.objectFit}),this.getTagConfig(i).clickable!==!1&&this.domEvents.addAutoBindEventListener(i.mediaPlane,"click",d=>{this.hooks.emit("click",{tag:i,target:"TagContent",event:d.origDomEvent})}),this.imagePlaneGroup.add(i.mediaPlane))})}updateRender3DDomTag(){this.filterCSS3DTag.forEach(i=>{var s,o,r;if(i.tag3DContentSvelte){const{svelteApp:a,css3DInstance:l,initialNormal:c,currentNormal:d}=i.tag3DContentSvelte;if(a.$set({tag:i,hooks:this.hooks,state:this.state,temporaryState:this.temporaryState}),!c.equals(d)){const h=new G.Quaternion().setFromUnitVectors(c,d);l.css3DObject.setRotationFromQuaternion(h)}return}else{if(Ut(i)&&!((s=i.model)!=null&&s.object)||((o=i.state)==null?void 0:o.visible)===!1||!this.state.visible||!this.state.enabled)return;if(this.css3DRenderPlugin||(this.css3DRenderPlugin=$o(this.five)),i.stickType==="3DPoint"&&!i.normal)return console.error("updateRenderPlaneTag: 三维点标签缺少法向量!");const a=this.getPositions(i);if(!a)return;const l=this.getTagNormal(i);if(!l)return;const c=this.getTagConfig(i),d=V({wrapperStyle:{zIndex:this.calculateTagZIndex(i).toString()}},c.tag3DConfig);if(this.getRenderType(i)==="BehindDom"||d.mode==="behind"){d.mode="behind",d.container=document.createElement("div");const m="black";d.container.style.backgroundColor=m,d.container.style.border=`3px solid ${m}`,this.css3DRenderPlugin.hooks.on("render",()=>{var A;if(h.css3DObject.opacityMesh&&c.clickable!==!1){const p=this.addObjectClickHandler(i,h.css3DObject.opacityMesh,g=>{this.hooks.emit("click",{event:g,target:"TagContent",tag:i})});(A=this.store.css3DRenderDisposer.get(i.id))==null||A.push(p)}})}const h=this.css3DRenderPlugin.create3DDomContainer(a,d);if(!h)return;this.store.css3DRenderDisposer.set(i.id,[h.dispose]);const f=new sf({target:h.container,props:{tag:i,hooks:this.hooks,state:this.state,mediaStore:this.mediaStore,temporaryState:this.temporaryState}});i.tag3DContentSvelte={svelteApp:f,domContainer:h,css3DInstance:h,initialNormal:l,currentNormal:l,dispose:()=>{f.$destroy(),h.dispose()}},Ut(i)&&((r=i.model)!=null&&r.object)&&this.updateTagCss3DObjectMatrix(i,i.model.object)}}),this.clearUnusedPanelTag()}updateRenderModelTag(){const e=o=>!this.enabledModelTagSet.has(o.customID),i=this.gltfObjectGroup.children.filter(e);i.forEach(o=>o.removeEventListener()),this.gltfObjectGroup.remove(...i),this.tags.filter(o=>o.stickType==="Model").forEach(o=>{var r;(r=o.model)==null||r.promise.then(a=>{a.visible=this.getCurrentVisibleState(o)})}),this.five.needsRender=!0}updateTagModelVisible(){this.tags.forEach(e=>{var s;const i=this.getCurrentVisibleState(e);i===!0&&this.getRenderType(e)&&!e.tag3DContentSvelte&&this.updateRender3DDomTag(),e.mediaPlane?e.mediaPlane.visible=i:e.tag3DContentSvelte&&(e.tag3DContentSvelte.css3DInstance.setVisible(i),this.updateDomView()),(s=e.model)!=null&&s.object&&(e.model.object.visible=i)})}updateTagCss3DObjectMatrix(e,i){var p,g,v;const s=(g=(p=this.getTagConfig(e).tag3DConfig)==null?void 0:p.ratio)!=null?g:.00216,o=(v=e.tag3DContentSvelte)==null?void 0:v.css3DInstance.css3DObject;if(!o)return;const r=Ut(e)?e.data.mediaPosition:e.position;if(!r||r.length!==4||!Array.isArray(r[0])||!Array.isArray(r[2]))return;i.updateWorldMatrix(!1,!1);const a=i.matrixWorld,l=new G.Vector3().fromArray(r[0]),c=new G.Vector3().fromArray(r[2]),d=di(l,c).add(new G.Vector3(0,0,5e-4)),h=new G.Matrix4().setPosition(d),f=new G.Matrix4().makeScale(s,s,s),m=new G.Matrix4().multiply(a).multiply(h).multiply(f);m.decompose(o.position,o.quaternion,o.scale);const A=o.opacityMesh;A&&m.decompose(A.position,A.quaternion,A.scale)}addMediaModelTag(e){return W(this,null,function*(){const i=e.filter(B1).map(s=>this.loadModel(s));yield Promise.all(i),this.setVisible(),this.updateRenderAllTags()})}setPointTagPosition(){const e=this.filterPointTag;e.length!==0&&e.forEach(i=>{var a;const s=this.getCurrentVisibleState(i),o=(a=i.__Object__)!=null?a:{timeoutId:void 0,inAnimation:!1};if(i.__Object__=o,!s&&i.screenPosition?(o.inAnimation=!0,o.timeoutId=setTimeout(()=>{requestAnimationFrame(()=>{this.getCurrentVisibleState(i)||(o.inAnimation=!1,i.screenPosition=null,this.updateDomView())})},1e3)):o.timeoutId&&(clearTimeout(o.timeoutId),o.inAnimation=!1,o.timeoutId=void 0),!s&&!o.inAnimation)return;const r=this.getTagProject(i);r?i.screenPosition={leftPercent:(r.x+1)/2*100,topPercent:(-r.y+1)/2*100}:i.screenPosition=null})}updateRenderPointTag(){const e=this.filterPointTag;this.setTagZIndex(e),this.setPointTagPosition(),this.updateDomView()}updatePointTagPosition(){this.setPointTagPosition(),this.updateDomView()}updateTagContainerVisible(){var e;(e=this.TagContainerSvelte)==null||e.$set({state:this.state,temporaryState:this.temporaryState,withAnimation:this.store.visibleWithAnimation}),this.filterCSS3DTag.forEach(i=>{var s,o,r,a,l;(a=(o=(s=i.tag3DContentSvelte)==null?void 0:s.css3DInstance)==null?void 0:o.css3DObject)==null||a.setVisible((this.state.visible&&((r=i.state)==null?void 0:r.visible))!==!1),(l=i.tag3DContentSvelte)==null||l.svelteApp.$set({state:this.state,temporaryState:this.temporaryState,withAnimation:this.store.visibleWithAnimation})})}disposeAllCSS3DContainer(){for(const[,e]of this.store.css3DRenderDisposer)e==null||e.forEach(i=>i==null?void 0:i());this.store.css3DRenderDisposer=new Map}clearUnusedPanelTag(){this.filter2DPointTag.forEach(e=>{var i;(i=e.tag3DContentSvelte)==null||i.css3DInstance.dispose(),e.tag3DContentSvelte=void 0});for(const[e,i]of this.store.css3DRenderDisposer){const s=this.getTagById(e);(!s||s.stickType==="2DPoint")&&(i==null||i.forEach(o=>o==null?void 0:o()),this.store.css3DRenderDisposer.delete(e))}}updateDomView(e={}){var s,o;const i=this.filterPointTag;if(this.TagContainerSvelte)this.TagContainerSvelte.$set({tags:i,state:this.state,temporaryState:this.temporaryState});else{const r=(s=this.five.getElement())==null?void 0:s.parentElement;if(!r)return console.error("updateRenderPlaneTag: tag2DContainer not found");this.TagContainerSvelte=new i2({target:r,props:{hooks:this.hooks,tags:i,state:this.state,temporaryState:this.temporaryState,mediaStore:this.mediaStore,rendererMap:this.rendererMap,contentTypeMap:this.contentTypeMap,withAnimation:(o=e==null?void 0:e.withAnimation)!=null?o:this.store.visibleWithAnimation}})}}}function l2(n){return W(this,null,function*(){return new Promise(t=>{c2(n)?t():n.once("modelLoaded",()=>t())})})}function c2(n){return n.model.loaded}class d2{constructor(t){u(this,"plugin");this.plugin=t}closeIntersectRaycaster(){this.plugin.tags.forEach(t=>{var e;qn((e=t==null?void 0:t.initialConfig)==null?void 0:e.visibleConfig).intersectRaycaster&&(t.initialConfig.visibleConfig.intersectRaycaster.enabled=!1)}),this.plugin.changeGlobalConfig({visibleConfig:{intersectRaycaster:{enabled:!1}}})}}const cf="Dnalogel-PanoTagPlugin",h2=n=>`${cf}--${n}`;class ko extends a2{constructor(e,i){super(e);u(this,"state",{enabled:!0,visible:!0});u(this,"params");u(this,"debug");u(this,"debugUtil",new d2(this));u(this,"changeTagModel",(e,i)=>W(this,null,function*(){e.data=Ve({},e.data,i),yield this.loadModel(e),this.updateRenderAllTags()}));u(this,"whyHide",e=>{var s,o,r;if(!this.state.enabled)return{reason:`plugin.state.enabled is ${this.state.enabled}`};if(!this.state.visible)return{reason:`plugin.state.visible is ${this.state.visible}`};const i=this.getTagById(e);if(!i)return{reason:`tag ${e} not found`};if(!i.enabled)return{reason:`tag ${e} enabled is ${i.enabled}`};if(i.stickType==="Model"||i.stickType==="Plane")return{reason:"maybe blocked by the five model"};if(!i.state.visible){const a=(o=(s=this.getPanoIndexCache({panoIndex:this.five.panoIndex,id:e}))==null?void 0:s.__debug_visible_reason__)==null?void 0:o.reason;return{reason:(r=a==null?void 0:a.type)!=null?r:a,reasonObj:a}}return{reason:"check your eyes"}});u(this,"updateVisible",()=>{const e=this.five.getCurrentState().mode;this.tags.forEach(i=>{Ut(i)&&e!=="Panorama"&&this.changeTagMode(i,"behind")}),this.setVisible(),this.updateRenderAllTags()});u(this,"handleFiveWantsMoveToPano",e=>{this.tags.forEach(i=>{this.getVisible(i,{panoIndex:e})&&(i.state.visible=!0);const o=this.getTagConfig(i);typeof o.visibleConfig=="object"&&i.temporaryState&&(o.visibleConfig.keep?i.temporaryState.visible=o.visibleConfig.keep==="visible":i.temporaryState.visible=!!o.visibleConfig.alwaysShowWhenMovePano)}),this.updateTagContainerVisible(),this.updateRenderImagePlane(),this.updateRenderVideoPlane()});u(this,"clickhandler",e=>{if(e.target!=="TagPoint")return;if(!e.tag.state)return console.warn("Clickhandler: params.tag.state is undefined");const i=this.can("fold",e.tag),s=this.can("unfold",e.tag);i&&s&&(e.tag.state.unfolded=!e.tag.state.unfolded,e.tag.state.unfolded&&this.tags.forEach(o=>{o.id!==e.tag.id&&o.state&&this.can("fold",o)&&(o.state.unfolded=!1)}),this.updateRenderAllTags())});u(this,"handleFiveCameraUpdate",()=>{this.updatePointTagPosition()});u(this,"handleFivePanoArrived",()=>W(this,null,function*(){this.setVisible(),this.updatePointTagPosition(),yield this.setVisibleAndUnfolded(),this.tags.forEach(e=>{e.temporaryState=ge(V({},e.temporaryState),{visible:!0})}),this.tags.filter(O1).filter(e=>{var i;return(i=this.getTagConfig(e).modelConfig)==null?void 0:i.autoLookAtEnabled}).forEach(e=>{var c;const i=new k.Mesh(new k.BoxGeometry,new k.MeshBasicMaterial),s=(c=e.model)==null?void 0:c.object;if(!s)return;i.position.copy(s.position),i.quaternion.copy(s.quaternion);const o=this.five.camera.position;i.lookAt(o.clone().setY(i.position.y));const r=s.quaternion.clone(),a=i.quaternion.clone(),l=tn();l.onUpdate(({progress:d})=>{s.quaternion.copy(r.clone().slerp(a,d))}),l.play()}),this.store.visibleWithAnimation=!0,this.updateTagContainerVisible(),this.updateRenderAllTags()}));u(this,"handleFiveModelShownFloorChange",()=>{this.setVisible(),this.updateRenderAllTags()});u(this,"onFiveEveryReady",()=>{this.setUnfoldedByCamera(),en(this.five.getCurrentState().mode)&&(this.setTagZIndex(this.filterPointTag),this.setVisible(),this.setPointTagPosition()),this.updateDomView({withAnimation:!0}),this.updateRenderVideoPlane(),this.updateRenderImagePlane(),this.updateTagModelVisible()});this.params=Ve({},{debug:!1,config:this.config},V({},i)),this.debug=this.params.debug,this.config=this.params.config,_1(1,{namespace:_r.PlayAudio});try{const s=window;Array.isArray(s.__PANOTAGPLUGIN_DEBUG_LIST__)||(s.__PANOTAGPLUGIN_DEBUG_LIST__=[]),s.__PANOTAGPLUGIN_DEBUG_LIST__.push(this),s.__PANOTAGPLUGIN_DEBUG__=this}catch(s){}}load(e,i){return W(this,null,function*(){var o,r;this.clearTags(),console.debug(cf," load:",{data:JSON.parse(JSON.stringify(e))}),this.config=Ve({},this.config,{globalConfig:(o=e.globalConfig)!=null?o:{},contentTypeConfig:(r=e.contentTypeConfig)!=null?r:{}});const s=yield this.addTag(e.tagList,i);if(this.debug)try{L1(this.five,this.tags)}catch(a){console.error(a)}return s})}addTag(e,i){return W(this,null,function*(){const o=(Array.isArray(e)?e:[e]).filter(r=>r.position).map(r=>{var f,m,A;const a=JSON.parse(JSON.stringify(r.data)),l=r.config?JSON.parse(JSON.stringify(r.config)):{};r.initialConfig=l;const c=this.calculateTagConfig(r),d=this.getTagConfig(r);return r.config=d,ge(V({},r),{enabled:(f=r.enabled)!=null?f:!0,id:(m=r.id)!=null?m:et(),data:(A=d.initialData)!=null&&A.important?Ve(r.data,a,d.initialData):Ve(r.data,d.initialData,a),state:V({visible:void 0,unfolded:!this.can("fold",r)},d.initialState),hooks:new Ae.Subscribe,originPosition:r.position,position:(()=>{const p=this.getTransformedPostion(r.position);return Array.isArray(p)?p.map(v=>v.toArray()):p.toArray()})(),initialConfig:l,computedConfig:c,config:d,unfold:()=>this.changeUnfoldedById(r.id,!0),fold:()=>this.changeUnfoldedById(r.id,!1),enable:()=>this.changeEnabledById(r.id,!0),disable:()=>this.changeEnabledById(r.id,!1),destroy:()=>this.destroyTagById(r.id),changeData:p=>this.changeDataById(r.id,p)})});return o.forEach(N1),this.tags.push(...o),l2(this.five).then(()=>W(this,null,function*(){var r,a,l;this.store.eventListenerDisposer&&((a=(r=this.store).eventListenerDisposer)==null||a.call(r)),this.state.enabled&&this.handleEnable(),this.addResizeListener(),this.clearUnusedPanelTag(),this.addMediaModelTag(o),this.setVisibleAndUnfolded({withAnimation:(l=i==null?void 0:i.withAnimation)!=null?l:!0}),this.updatePointTagPosition(),this.updateRenderAllTags()}))})}changeConfig(e,i=!0){i?this.config=Ve({},this.config,e):this.config=e,this.updateTagConfig(),this.updateRenderAllTags()}changeGlobalConfig(e,i=!0){i?this.config.globalConfig=Ve({},this.config.globalConfig,e):this.config.globalConfig=e,this.updateTagConfig(),this.setVisible(),this.updateRenderAllTags()}changeContentTypeConfig(e,i,s=!0){this.config.contentTypeConfig||(this.config.contentTypeConfig={}),s?this.config.contentTypeConfig[e]=Ve({},this.config.contentTypeConfig[e],i):this.config.contentTypeConfig[e]=i,this.updateTagConfig(),this.updateRenderAllTags()}show(e){return W(this,null,function*(){if(this.checkDisposed())return;const{userAction:i=!0,withAnimation:s=!1}=e!=null?e:{};this.setState({visible:!0},{userAction:i,visibleWithAnimation:s}),this.hooks.emit("show",{userAction:i,withAnimation:s})})}hide(e){return W(this,null,function*(){if(this.checkDisposed())return;const{userAction:i=!0,withAnimation:s=!1}=e!=null?e:{};this.setState({visible:!1},{userAction:i,visibleWithAnimation:s}),this.hooks.emit("hide",{userAction:i,withAnimation:s})})}enable(e){if(this.checkDisposed())return;const{userAction:i=!0}=e!=null?e:{};this.setState({enabled:!0},{userAction:i}),this.hooks.emit("enable",{userAction:i})}disable(e){if(this.checkDisposed())return;const{userAction:i=!0}=e!=null?e:{};this.setState({enabled:!1},{userAction:i}),this.hooks.emit("disable",{userAction:i})}setState(e,i){if(this.checkDisposed())return;const{userAction:s=!0,visibleWithAnimation:o=!1}=i!=null?i:{},r=V({},this.state);this.state=Object.assign(this.state,e),this.store.visibleWithAnimation=o,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:s})}dispose(){var e,i,s,o,r,a;this.pauseCurrentMedia(),this.disposeAllCSS3DContainer(),(e=this.TagContainerSvelte)==null||e.$destroy(),this.filterCSS3DTag.forEach(l=>{var c;return(c=l.tag3DContentSvelte)==null?void 0:c.svelteApp.$destroy()}),this.tags=[],(i=this.store.disposers)==null||i.forEach(l=>l==null?void 0:l()),this.store.disposers=[],(o=(s=this.store).eventListenerDisposer)==null||o.call(s),this.store.eventListenerDisposer=void 0,(a=(r=this.store).resizeObserverDisposer)==null||a.call(r),this.store.resizeObserverDisposer=void 0,this.store.resizeObserverDisposerAdding=!1,this.five.scene.remove(this.group),this.group.remove(...this.group.children),this.gltfObjectGroup.remove(...this.gltfObjectGroup.children),this.imagePlaneGroup.remove(...this.imagePlaneGroup.children),this.clearCache(),this.five.needsRender=!0,this.store.disposed=!0,this.hooks.emit("dispose")}changeUnfoldedById(e,i){var a;const s=this.getTagById(e);if(!s)return;const o=this.can("fold",s),r=this.can("unfold",s);if(o&&r){s.state.unfolded=i;const l=this.filterPointTag;(a=this.TagContainerSvelte)==null||a.$set({tags:l})}else console.warn(`tag ${e} cannot be ${i?"unfolded":"folded"}`)}changeEnabledById(e,i){const s=this.getTagById(e);s&&(s.enabled=i,this.updateRenderAllTags())}changeTagNormalById(e,i){const s=this.getTagById(e);s&&s.tag3DContentSvelte&&(s.tag3DContentSvelte.currentNormal=$t(i))}changeDataById(e,i,s=!0){const o=this.getTagById(e);let r=!1;o&&(o.data&&(r=!0),s?o.data=Ve(o.data,i):o.data=V(V({},o.data),i),this.clearUnusedPanelTag(),this.updateRenderAllTags(),r&&o.hooks.emit("dataChanged",o.data))}changeStickTypeById(e,i,s=!0){this.changeTagById(e,i,s)}changeTagById(e,i,s=!0){const o=this.getTagById(e);let r=!1;i&&(i.data&&(r=!0),s?Ve(o,i):Object.assign(o,i),o!=null&&o.tag3DContentSvelte&&(i!=null&&i.normal)&&(o.tag3DContentSvelte.currentNormal=$t(i.normal)),this.setVisible(),this.updateRenderAllTags(),this.clearUnusedPanelTag(),r&&o.hooks.emit("dataChanged",o.data))}destroyTagById(e){(Array.isArray(e)?e:[e]).forEach(s=>{const o=this.tags.findIndex(r=>r.id===s);o!==-1&&this.tags.splice(o,1)}),this.updateRenderAllTags()}setVisibleAndUnfolded(){return W(this,arguments,function*({withAnimation:e}={withAnimation:!1}){return this.setVisible(),e?new Promise(i=>{setTimeout(()=>{this.setUnfoldedByPanoIndex(),i()},10)}):(this.setUnfoldedByPanoIndex(),Promise.resolve())})}handleShow(){this.state.visible=!0,this.group.visible=!0,this.updateTagContainerVisible(),this.updateTagModelVisible(),this.five.needsRender=!0}handleHide(){this.pauseCurrentMedia(),this.state.visible=!1,this.group.visible=!1,this.updateTagContainerVisible(),this.updateTagModelVisible(),this.five.needsRender=!0}handleEnable(){this.state.enabled=!0,this.store.eventListenerDisposer=this.addEventListener(),this.five.scene.children.includes(this.group)||this.five.scene.add(this.group),this.group.traverse(e=>{var i;(i=e==null?void 0:e.updateTagCss3DObjectMatrix)==null||i.call(e)}),this.updateRenderAllTags(),this.five.needsRender=!0}handleDisable(){var e,i,s;this.pauseCurrentMedia(),this.state.enabled=!1,(i=(e=this.store).eventListenerDisposer)==null||i.call(e),this.five.scene.remove(this.group),(s=this.TagContainerSvelte)==null||s.$set({tags:[]}),this.filterCSS3DTag.forEach(o=>{var r;(r=o.tag3DContentSvelte)==null||r.dispose(),o.tag3DContentSvelte=void 0}),this.five.needsRender=!0}addEventListener(){const{five:e,hooks:i}=this;let s=!1;const o=uh(()=>{s||(s=!0,e.ready().then(()=>{this.onFiveEveryReady(),s=!1}))},150);return e.on("cameraUpdate",o),this.updateVisible(),this.handleFivePanoArrived(),e.on("wantsMoveToPano",this.handleFiveWantsMoveToPano),e.on("modeChange",this.updateVisible),e.on("initAnimationEnded",this.updateVisible),e.on("modelShownFloorChange",this.handleFiveModelShownFloorChange),e.on("cameraUpdate",this.handleFiveCameraUpdate),e.on("panoArrived",this.handleFivePanoArrived),e.on("panoArrived",this.loadVideoFirstFrame),i.on("click",this.clickhandler),()=>{e.off("wantsMoveToPano",this.handleFiveWantsMoveToPano),e.off("modeChange",this.updateVisible),e.off("initAnimationEnded",this.updateVisible),e.off("modelShownFloorChange",this.handleFiveModelShownFloorChange),e.off("cameraUpdate",this.handleFiveCameraUpdate),e.off("cameraUpdate",o),e.off("panoArrived",this.handleFivePanoArrived),e.off("panoArrived",this.loadVideoFirstFrame),i.off("click",this.clickhandler),this.store.eventListenerDisposer=void 0}}addResizeListener(){if(!this.store.resizeObserverDisposer&&!this.store.resizeObserverDisposerAdding){const e=this.addResizeObserver();this.store.resizeObserverDisposerAdding=!0,setTimeout(()=>{this.store.resizeObserverDisposer=e,this.store.resizeObserverDisposerAdding=!1},200)}}addResizeObserver(){if(!this.store.disposed)return;const e=this.five.getElement(),i=()=>{this.state.enabled&&(this.show(),this.updateRenderAllTags())},s=()=>{this.state.enabled&&this.hide()},{observe:o,unobserve:r}=Hr(uh(()=>{this.store.resizeObserverDisposer&&s()},500),e),{observe:a,unobserve:l}=Hr(Q1(()=>i(),400),e);return o(),a(),()=>{r(),l()}}setUnfoldedByCamera(){let e=!1;this.filterPointTag.forEach(i=>{const s=this.getUnfoldedByCamera(i);i.state&&s!==void 0&&(s===!0&&(e=!0),i.state.unfolded=s)}),e&&this.filterPointTag.forEach(i=>{const s=this.getTagConfig(i).unfoldedConfig;typeof s=="object"&&(s.autoUnfold||s.keep)||i.state&&(i.state.unfolded=!1)})}changeTagMode(e,i){var s,o,r,a,l,c;((s=e.config)==null?void 0:s.renderType)!=="Mesh"&&((a=(r=(o=e.tag3DContentSvelte)==null?void 0:o.css3DInstance)==null?void 0:r.css3DObject)==null?void 0:a.mode)!==i&&((l=e.config)!=null&&l.tag3DConfig?e.config.tag3DConfig.mode=i:e.config?e.config.tag3DConfig={mode:i}:e.config={tag3DConfig:{mode:i}},(c=this.store.css3DRenderDisposer.get(e.id))==null||c.forEach(d=>d==null?void 0:d()),e.tag3DContentSvelte=void 0)}}const u2=(n,t)=>new ko(n,t);function f2(n){me(n,"svelte-4qjwer",".guide-line__tag.svelte-4qjwer.svelte-4qjwer{position:relative}.text-with-distance.svelte-4qjwer.svelte-4qjwer{display:flex;flex-direction:column;position:relative;padding:0.125rem 0.25rem;border-radius:0.125rem;background:linear-gradient(to top, rgba(147, 147, 147, 0.3), rgba(74, 74, 74, 0.3));box-shadow:0 0.125rem 0.5rem 0 rgba(0, 0, 0, 0.2)}.text-with-distance.svelte-4qjwer .border.svelte-4qjwer{position:absolute;top:-50%;right:-50%;bottom:-50%;left:-50%;padding:0.0625rem;border-radius:0.25rem;background:linear-gradient(to right, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.2));-webkit-mask:linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);mask-composite:exclude;-webkit-mask-composite:xor;transform:scale(0.5)}.distance-and-name.svelte-4qjwer.svelte-4qjwer{display:flex;gap:0.1875rem}.distance.svelte-4qjwer.svelte-4qjwer{white-space:nowrap;font-size:0.625rem;line-height:0.875rem;color:#66afff}.name.svelte-4qjwer.svelte-4qjwer{opacity:0.6;font-size:0.625rem;line-height:0.875rem;white-space:nowrap;color:#ffffff}.line-name.svelte-4qjwer.svelte-4qjwer{color:#fff;white-space:nowrap;font-size:0.625rem;line-height:0.875rem}.guide-line__tag-point.svelte-4qjwer.svelte-4qjwer{position:absolute;left:50%;bottom:0.0625rem;width:0.4375rem;height:0.125rem;transform:translateX(-50%);background:#fff;border-radius:50%;opacity:0.5}.guide-line__tag-line.svelte-4qjwer.svelte-4qjwer{position:absolute;left:50%;bottom:0.0625rem;width:0.0625rem;height:1.875rem;transform:translateX(-50%);background:linear-gradient(to top, #fff, rgba(255, 255, 255, 0))}.guide-line__tag-content.svelte-4qjwer.svelte-4qjwer{position:absolute;left:-0.9375rem;bottom:1.9375rem;display:flex}.guide-line__tag-icon.svelte-4qjwer.svelte-4qjwer{width:1.875rem;height:1.875rem;background-size:100%}.guide-line__tag-text.svelte-4qjwer.svelte-4qjwer{box-sizing:content-box;height:0.875rem;width:-moz-max-content;width:max-content;margin-top:0.3125rem;transform:translateX(-0.1875rem);white-space:nowrap;font-size:0.625rem;line-height:0.875rem;border:solid transparent;border-width:0.125rem 0.5rem 0.125rem 0.375rem;border-image-slice:6 25 6 18 fill;color:#fff}")}function df(n){let t,e;return{c(){t=x("div"),e=De(n[0]),w(t,"class","guide-line__tag-text svelte-4qjwer"),S(t,"border-image-source",`url(${n[6]})`)},m(i,s){O(i,t,s),L(t,e)},p(i,s){s&1&&Se(e,i[0])},d(i){i&&j(t)}}}function hf(n){let t,e,i,s,o=n[5]("全程")+"",r,a,l=n[5]("米")+"",c,d,h,f,m,A,p=n[4]&&uf(n);return{c(){t=x("div"),p&&p.c(),e=K(),i=x("div"),s=x("span"),r=De(o),a=De(n[2]),c=De(l),d=K(),h=x("span"),f=De(n[0]),m=K(),A=x("div"),w(s,"class","distance svelte-4qjwer"),w(h,"class","name svelte-4qjwer"),w(i,"class","distance-and-name svelte-4qjwer"),w(A,"class","border svelte-4qjwer"),w(t,"class","text-with-distance svelte-4qjwer")},m(g,v){O(g,t,v),p&&p.m(t,null),L(t,e),L(t,i),L(i,s),L(s,r),L(s,a),L(s,c),L(i,d),L(i,h),L(h,f),L(t,m),L(t,A)},p(g,v){g[4]?p?p.p(g,v):(p=uf(g),p.c(),p.m(t,e)):p&&(p.d(1),p=null),v&32&&o!==(o=g[5]("全程")+"")&&Se(r,o),v&4&&Se(a,g[2]),v&32&&l!==(l=g[5]("米")+"")&&Se(c,l),v&1&&Se(f,g[0])},d(g){g&&j(t),p&&p.d()}}}function uf(n){let t,e;return{c(){t=x("span"),e=De(n[4]),w(t,"class","line-name svelte-4qjwer")},m(i,s){O(i,t,s),L(t,e)},p(i,s){s&16&&Se(e,i[4])},d(i){i&&j(t)}}}function m2(n){let t,e,i,s,o,r,a,l,c,d=n[0]&&!n[2]&&df(n),h=n[2]&&hf(n);return{c(){t=x("div"),e=x("div"),i=K(),s=x("div"),o=K(),r=x("div"),a=x("div"),l=K(),d&&d.c(),c=K(),h&&h.c(),w(e,"class","guide-line__tag-point svelte-4qjwer"),w(s,"class","guide-line__tag-line svelte-4qjwer"),w(a,"class","guide-line__tag-icon svelte-4qjwer"),S(a,"background-image",`url(${n[1]})`),w(r,"class","guide-line__tag-content svelte-4qjwer"),w(t,"class","guide-line__tag svelte-4qjwer"),S(t,"opacity",n[3])},m(f,m){O(f,t,m),L(t,e),L(t,i),L(t,s),L(t,o),L(t,r),L(r,a),L(r,l),d&&d.m(r,null),L(r,c),h&&h.m(r,null)},p(f,[m]){m&2&&S(a,"background-image",`url(${f[1]})`),f[0]&&!f[2]?d?d.p(f,m):(d=df(f),d.c(),d.m(r,c)):d&&(d.d(1),d=null),f[2]?h?h.p(f,m):(h=hf(f),h.c(),h.m(r,null)):h&&(h.d(1),h=null),m&8&&S(t,"opacity",f[3])},i:J,o:J,d(f){f&&j(t),d&&d.d(),h&&h.d()}}}function g2(n,t,e){let{text:i=""}=t,{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ExVBDbNCD4e/nH0lKj1+1RBvMEQboiEMUJI1BOmmGq0pVOP1z3nYF3G53EAIN4SHx4djNyxAkutQA1QnGeD2z3rY199RIZ+EtVxDPaDm9VdspYcWj65pteFaonIDBghpzeXyzNNTbyy8CpgCyCehjnvYx+uf9RTTU9cbo7SbRPmKQBnzaKMI2igthD8jVAvIuM/rXytjfyz4MFqBDgLWPGuA05/sqRQobaOzsBMbFQsRhaAWco/A6Z92FAuU446wWL+aHJWcHJtMOzEDwWrU+PyvHEcFRlkutELInT4NFiCRGqA6yQDWfH5jWdFegXLL8V3qDIsNIySHoRsWIGMN/wBY8/mXRosFxrrDCE20EwJzCGQ9XP7crBN46AdHbthmkPvluICccLzgchnDjBD/eqaxKOOtIKGyiEzDqSFOCt7D4X/dlHFDkNCWPu3fjTHGQBgpbI06TkeIpuQ37bbltAlSKstM/g6EdYcEr0jJv2rLfrZXkFKcPhVjMsWY0GGSrTn00H7TakbD11sChd7qa+gCSKdJVitpyvWLlab6uifsieKtLk1N7QZWtvpYXl4aGxsrAtIJBQVNWVlZOTkZGRm2z7bHW0q2lJRkZ2c3NOTn19fV19fn5zfAsmQL8Nhmg66cHOhvKigoSC/Iysk+vH9//jd2n8g6TG7yjbXZYCAMq6s7fBiah4aGLl0aGLhw4f758zuBmpq+vurq6h07dnR1dXTcrqqq2uejqup2R0dXF8jV1X19NTU1O3feu3f+/oWBgUtD++uePHtbLAThNzRClbi+VnseAAAAAElFTkSuQmCC";return n.$$set=d=>{"text"in d&&e(0,i=d.text),"icon_url"in d&&e(1,s=d.icon_url),"distance"in d&&e(2,o=d.distance),"opacity"in d&&e(3,r=d.opacity),"name"in d&&e(4,a=d.name),"i18n"in d&&e(5,l=d.i18n)},[i,s,o,r,a,l,c]}class p2 extends ce{constructor(t){super(),le(this,t,g2,m2,ae,{text:0,icon_url:1,distance:2,opacity:3,name:4,i18n:5},f2)}}function A2(n){return n.length===0?[]:n.filter((t,e)=>t!==n[e-1])}const v2=`
585
585
  varying vec2 vUv;
586
586
 
587
587
  void main() {
@@ -686,7 +686,7 @@ void main() {
686
686
  gl_FragColor.a = gl_FragColor.a * linearGradientOpacity();
687
687
  gl_FragColor.a = gl_FragColor.a * flicker;
688
688
  }
689
- `;class oa{constructor(t,e){u(this,"name","");u(this,"startTagContainer");u(this,"endTagContainer");u(this,"path",[]);u(this,"geometryStyle",{});u(this,"materialStyle",{});u(this,"meshStyle",{});u(this,"mesh");u(this,"five");u(this,"mode");u(this,"_curvePath",null);u(this,"_curvePoints",null);u(this,"_panoGroup",[]);u(this,"skippedPositions",null);u(this,"textureUrl","");u(this,"scale",1);u(this,"width",.5);u(this,"unitLength",.5);u(this,"_visibleFloorIndexes",null);u(this,"visible",null);u(this,"modeVisible",!1);u(this,"floorVisible",!0);u(this,"defaultVisible",!1);u(this,"inWalkAnimation",!1);u(this,"customVisible",null);u(this,"parent");u(this,"plugin");u(this,"textureHasLoaded",!1);u(this,"disposed",!1);u(this,"flowAnime",new Di({progress:0}).to({progress:1}).duration(1500).repeat(1/0));u(this,"flickerAnime",tn(300).yoyo(!0).repeat(5));u(this,"cacheLengths",[]);u(this,"heightOffset",0);u(this,"dispose",()=>{var t,e;this.disposed||(this.disposed=!0,this.parent.hooks.off("show",this.updateVisible),this.parent.hooks.off("hide",this.updateVisible),this.plugin.hooks.off("show",this.updateVisible),this.plugin.hooks.off("hide",this.updateVisible),this.plugin.hooks.off("enable",this.updateVisible),this.plugin.hooks.off("disable",this.updateVisible),this.five.off("modeChange",this.onFiveModeChange),this.five.off("modelShownFloorChange",this.onFiveModelShownFloorChange),this.doHide(),(t=this.startTagContainer)==null||t.plugin.dispose(),(e=this.endTagContainer)==null||e.plugin.dispose())});u(this,"onWalkAnimationStart",()=>{this.inWalkAnimation=!0,this.updateVisible()});u(this,"onWalkAnimationEnd",()=>{this.inWalkAnimation=!1,this.updateVisible()});u(this,"onFiveModeChange",t=>{this.modeVisible=this.mode==="panorama"?Tt(t):en(t),this.updateVisible()});u(this,"onFiveModelShownFloorChange",t=>{this.floorVisible=t===null||this.visibleFloorIndexes===null||this.visibleFloorIndexes.includes(t),this.updateVisible()});u(this,"updateVisible",()=>{const t=(()=>!this.parent.visible||!this.plugin.state.enabled||!this.plugin.state.visible?!1:this.customVisible!==null?this.customVisible:this.inWalkAnimation?!0:this.modeVisible&&this.textureHasLoaded&&this.defaultVisible&&this.floorVisible)();this.visible!==t&&(this.visible=t,t?this.doShow():this.doHide())});u(this,"onFlowAnimeUpdate",t=>{const{progress:e}=t;this.mesh.material.uniforms.vOffset.value=e,this.mesh.material.uniformsNeedUpdate=!0,this.five.needsRender=!0});u(this,"onFlickerAnimeUpdate",t=>{var s,o,r,a;const{progress:e}=t,i=1-e;this.mesh.material.uniforms.flicker.value=i,this.mesh.material.uniformsNeedUpdate=!0,this.five.needsRender=!0,this.startTagContainer.tag&&ra(this.startTagContainer.tag)&&((r=this.startTagContainer.app)==null||r.$set(ge(V({},this.startTagContainer.tag.data),{opacity:i,name:this.name,distance:Math.round((o=(s=this.curvePath)==null?void 0:s.getLength())!=null?o:0)}))),this.endTagContainer.tag&&ra(this.endTagContainer.tag)&&((a=this.endTagContainer.app)==null||a.$set(ge(V({},this.endTagContainer.tag.data),{opacity:i})))});u(this,"logWarning",t=>c1("GuideLineModeItem: ",t));u(this,"logError",t=>ah("GuideLineModeItem: ",t));var o,r;this.five=t,this.mode=e.mode,this.plugin=e.plugin,this.parent=e.parent,this.startTagContainer={tag:null,plugin:new ko(this.five)},this.endTagContainer={tag:null,plugin:new ko(this.five)};const i=new k.BufferGeometry,s=new k.ShaderMaterial({vertexShader:v2,fragmentShader:b2,transparent:!0,uniforms:{map:{value:null},useMapColor:{value:0},mapColor:{value:new k.Color},mapOpacity:{value:1},backgroundColor:{value:new k.Color},backgroundOpacity:{value:0},borderColor:{value:new k.Color},borderOpacity:{value:0},backgroundClip:{value:0},borderWidth:{value:.05},opacity:{value:1},flicker:{value:1},maxU:{value:0},vOffset:{value:0}}});this.mesh=new k.Mesh(i,s),this.mesh.name="GuideLineModeItem",this.mode==="panorama"&&(this.parent.hooks.on("walkStart",this.onWalkAnimationStart),this.parent.hooks.on("walkEnded",this.onWalkAnimationEnd)),this.updateVisible(),this.onFiveModeChange(this.five.getCurrentState().mode),this.onFiveModelShownFloorChange((r=(o=this.five.model)==null?void 0:o.shownFloor)!=null?r:null),this.flowAnime.onUpdate(this.onFlowAnimeUpdate),this.flickerAnime.onUpdate(this.onFlickerAnimeUpdate),this.parent.hooks.on("show",this.updateVisible),this.parent.hooks.on("hide",this.updateVisible),this.plugin.hooks.on("show",this.updateVisible),this.plugin.hooks.on("hide",this.updateVisible),this.plugin.hooks.on("enable",this.updateVisible),this.plugin.hooks.on("disable",this.updateVisible),this.plugin.hooks.on("dispose",this.dispose),this.five.on("modeChange",this.onFiveModeChange),this.five.on("modelShownFloorChange",this.onFiveModelShownFloorChange)}get panoGroup(){return this._panoGroup}get visibleFloorIndexes(){return this._visibleFloorIndexes}get curvePath(){return this._curvePath}get curvePoints(){return this._curvePoints}setCustomVisible(t){if(this.disposed)return this.logError("disposed");this.customVisible!==t&&(this.customVisible=t,this.updateVisible())}setDefaultVisible(t){if(this.disposed)return this.logError("disposed");this.defaultVisible!==t&&(this.defaultVisible=t,this.updateVisible())}setUnitSize(t,e){if(this.disposed)return this.logError("disposed");this.width=t,this.unitLength=e,this.setGeometryByPath(this.path,{width:t,unit_length:e})}setScale(t){if(this.disposed)return this.logError("disposed");this.scale=t,this.setGeometryByPath(this.path,{scale:t})}setGeometryByPanoGroup(t,e){if(this.disposed)return this.logError("disposed");if(!this.five.work)return this.logError("setPathByPanoGroup: work is not ready");const i=A2(t);if(this._panoGroup=i,(e==null?void 0:e.skipPanoGroup)!==void 0){const o=e.skipPanoGroup?i.map(r=>this.plugin.workUtils.getObserverStandingPosition(r)).filter(jt):null;this.skippedPositions=o}const s=this.getPathFromPanoGroup(i,this.five.work,e);this.path=s,this.setGeometryByPath(s,e)}setGeometryByPath(t,e){var f,m,A;if(this.disposed)return this.logError("disposed");const i=(f=e==null?void 0:e.scale)!=null?f:this.scale,s=(m=e==null?void 0:e.width)!=null?m:this.width,o=(A=e==null?void 0:e.unit_length)!=null?A:this.unitLength;this.scale=i,this.width=s,this.unitLength=o;const{geometry:r,maxU:a,curvePath:l,curvePoints:c}=D1({path:t,width:s*i,unitLength:o*i,skipPositions:this.skippedPositions});this._curvePath=l,this._curvePoints=c,this.mesh.geometry=r,this.mesh.material.needsUpdate=!0,this.mesh.material.uniforms.maxU.value=a,this.five.needsRender=!0;const d=t,h=V(V({},this.geometryStyle),e);this.path=d,this.geometryStyle=h}setMartial(t){var i;if(this.disposed)return this.logError("disposed");(t==null?void 0:t.visible)!==void 0&&this.setDefaultVisible(t.visible),(t==null?void 0:t.color)!==void 0&&this.setColor(t.color),(t==null?void 0:t.opacity)!==void 0&&this.setOpacity(t.opacity),((i=t==null?void 0:t.texture)==null?void 0:i.url)!==void 0&&this.setTextureUrl(t.texture.url),(t==null?void 0:t.background_color)!==void 0&&this.setBackgroundColor(t.background_color),(t==null?void 0:t.background_opacity)!==void 0&&this.setBackgroundOpacity(t.background_opacity),(t==null?void 0:t.border_color)!==void 0&&this.setBorderColor(t.border_color),(t==null?void 0:t.border_opacity)!==void 0&&this.setBorderOpacity(t.border_opacity),(t==null?void 0:t.border_width)!==void 0&&this.setBorderWidth(t.border_width),(t==null?void 0:t.background_clip)!==void 0&&this.setBackgroundClip(t.background_clip);const e=V(V({},this.materialStyle),t);this.materialStyle=e}setMeshStyle(t){if(t!=null&&t.translate){const s=new k.Vector3,o=new k.Vector3().fromArray(t.translate);o.y+=this.heightOffset,s.add(o),this.mesh.position.copy(s),i(this.startTagContainer,o),i(this.endTagContainer,o)}const e=V(V({},this.meshStyle),t);this.meshStyle=e;function i(s,o){if(!s.tag)return;const r=new k.Vector3().fromArray(s.tag.position);r.add(o);const a=r.toArray();s.plugin.changeTagById(s.tag.id,{position:a})}}setHeightOffset(t){const e=new k.Vector3;this.meshStyle.translate&&e.add(new k.Vector3().fromArray(this.meshStyle.translate)),e.setY(e.y+t),this.mesh.position.copy(e),this.heightOffset=t,this.five.needsRender=!0}setColor(t){if(this.disposed)return this.logError("disposed");t&&(this.mesh.material.uniforms.mapColor.value=new k.Color().set(t)),this.mesh.material.uniforms.useMapColor.value=t?1:0,this.mesh.material.uniformsNeedUpdate=!0,this.five.needsRender=!0}setBorderColor(t){if(this.disposed)return this.logError("disposed");this.mesh.material.uniforms.borderColor.value=new k.Color().set(t),this.mesh.material.uniformsNeedUpdate=!0,this.five.needsRender=!0}setBorderOpacity(t){if(this.disposed)return this.logError("disposed");this.mesh.material.uniforms.borderOpacity.value=t,this.mesh.material.uniformsNeedUpdate=!0,this.five.needsRender=!0}setBackgroundClip(t){if(this.disposed)return this.logError("disposed");this.mesh.material.uniforms.backgroundClip.value=t==="border-box"?0:1,this.mesh.material.uniformsNeedUpdate=!0,this.five.needsRender=!0}setBorderWidth(t){if(this.disposed)return this.logError("disposed");this.mesh.material.uniforms.borderWidth.value=t,this.mesh.material.uniformsNeedUpdate=!0,this.five.needsRender=!0}setBackgroundColor(t){if(this.disposed)return this.logError("disposed");this.mesh.material.uniforms.backgroundColor.value=new k.Color().set(t),this.mesh.material.uniformsNeedUpdate=!0,this.five.needsRender=!0}setBackgroundOpacity(t){if(this.disposed)return this.logError("disposed");this.mesh.material.uniforms.backgroundOpacity.value=t,this.mesh.material.uniformsNeedUpdate=!0,this.five.needsRender=!0}setOpacity(t){if(this.disposed)return this.logError("disposed");this.mesh.material.uniforms.opacity.value=t,this.mesh.material.uniformsNeedUpdate=!0,this.five.needsRender=!0}setMapOpacity(t){if(this.disposed)return this.logError("disposed");this.mesh.material.uniforms.mapOpacity.value=t,this.mesh.material.uniformsNeedUpdate=!0,this.five.needsRender=!0}setTextureUrl(t){if(this.disposed)return this.logError("disposed");this.textureUrl=t,zi(t).then(e=>{this.disposed||this.textureUrl===t&&(e.wrapT=k.RepeatWrapping,this.textureHasLoaded=!0,this.mesh.material.uniforms.map.value=e,this.mesh.material.uniformsNeedUpdate=!0,this.mesh.material.needsUpdate=!0,this.five.needsRender=!0,this.updateVisible())})}setVisibleFloorIndexes(t){var e,i;if(this.disposed)return this.logError("disposed");this._visibleFloorIndexes=t,this.onFiveModelShownFloorChange((i=(e=this.five.model)==null?void 0:e.shownFloor)!=null?i:null)}setStartTag(t){this.setTag("start",t)}setEndTag(t){this.setTag("end",t)}flicker(){if(this.disposed)return this.logError("disposed");this.flickerAnime.play()}getLengthByPanoGroupIndex(t){return this.disposed?this.logError("disposed"):this.cacheLengths.length!==0?this.cacheLengths[t]:(this.cacheLengths=this.getPanoGroupLengths(),this.cacheLengths[t])}getPanoGroupLengths(){var l;if(!this.curvePoints||!this.curvePath)return[];const t=this.curvePoints.length,e=this.curvePath.getLength(),i=t-1,s=e/i,o=(l=this.curvePath.getLengths(i))!=null?l:[],r=[];let a=0;for(let c=0;c<t;c++){const d=this.curvePoints[c],h=this.plugin.workUtils.getObserverStandingPosition(a);if(!h)break;h.clone().setY(0).distanceTo(d.clone().setY(0))<s&&(r.push(o[c]),a+=1)}return r}setTag(t,e){const i=this.curvePath,s=t==="start"?this.startTagContainer:this.endTagContainer;if(!(e!=null&&e.data))return s.plugin.clearTags();const r=Ve({},{contentType:"Custom",stickType:"2DPoint",config:{visibleConfig:{visibleFiveMode:["Floorplan","Mapview"],followModelVisibility:!1}},style:{point:{enabled:!1}},data:{}},e);s.tag=r,ra(r)&&(s.tag.element=l=>{var h,f;(h=s.app)==null||h.$destroy();const c=t==="start"?ge(V({},r.data),{name:this.name,distance:Math.round((f=i.getLength())!=null?f:0),i18n:this.plugin.config.i18n}):r.data,d=new p2({target:l,intro:!0,props:c});return s.app=d,()=>d.$destroy()}),s.plugin.load({tagList:[s.tag]});const a=this.meshStyle.translate;if(a&&r.position){const l=new k.Vector3().fromArray(r.position),c=new k.Vector3().fromArray(a);l.add(c),l.y+=this.heightOffset;const d=l.toArray();s.plugin.changeTagById(s.tag.id,{position:d})}}doShow(){this.mode==="model"&&this.flowAnime.play(),this.five.scene.add(this.mesh),this.startTagContainer.plugin.show(),this.endTagContainer.plugin.show(),this.five.needsRender=!0}doHide(){this.mode==="model"&&this.flowAnime.stop(),this.five.scene.remove(this.mesh),this.startTagContainer.plugin.hide(),this.endTagContainer.plugin.hide(),this.five.needsRender=!0}getPathFromPanoGroup(t,e,i){if(t.length<2)return[];const s=t.map(o=>{var r;return(r=this.plugin.workUtils.getObserverStandingPosition(o))==null?void 0:r.toArray()}).filter(jt);return[V({type:"CatmullRomCurve3",points:s},i)]}}function ra(n){return n.contentType==="Custom"}const y2=Object.freeze(Object.defineProperty({__proto__:null,GuideLineModeItem:oa},Symbol.toStringTag,{value:"Module"}));class w2 extends Mh{constructor(e){super(e);u(this,"workUtil",new Ur(this.five))}get version(){return this.five.constructor.version}get majorVersion(){return Number(this.version.split(".")[0])}moveToPano(e,i){const s=this.majorVersion===5?e:{workCode:this.workUtil.workCode,panoIndex:e};return this.five.moveToPano(s,i)}}const ff="CruisePlugin",aa=`${ff}`;class mf extends Ti{constructor(e,i){super(e,i);u(this,"state",{visible:!0,enabled:!0,disposed:!1,playing:!1,speed:1});u(this,"fiveUtil",new w2(this.five));u(this,"workUtil",this.fiveUtil.workUtil);u(this,"data");u(this,"config");u(this,"pauseDataMap",new Map);u(this,"privateState",{playing:!1,broke:!1,modeChanging:!1});u(this,"GuideLine");u(this,"disposedErrorLog",()=>{console.error(`${aa} is disposed`)});u(this,"disableWarnLog",()=>{console.warn(`${aa} is disabled`)});u(this,"disableErrorLog",()=>{console.error(`${aa} is disabled`)});this.config=i,Object.assign(window,{[`__${ff}_DEBUG__`]:this})}set workCode(e){this.fiveUtil.workUtil.workCode=e}get workCode(){return this.fiveUtil.workUtil.workCode}play(e){this.setState({playing:!0},e)}pause(e){this.setState({playing:!1},e)}show(e){return W(this,null,function*(){this.setState({visible:!0},e)})}hide(e){return W(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,i){var o;if(this.state.disposed)return this.disposedErrorLog();if(!this.state.enabled&&e.enabled!==!0&&e.disposed!==!0)return this.disableErrorLog();const s=V({},this.state);this.state=Ve({},this.state,e),e.disposed!==void 0&&e.disposed!==s.disposed&&e.disposed&&this.handleDispose(),e.visible!==void 0&&e.visible!==s.visible&&this.handleVisible(e.visible,i==null?void 0:i.userAction),e.enabled!==void 0&&e.enabled!==s.enabled&&this.handleEnable(e.enabled,i==null?void 0:i.userAction),e.playing!==void 0&&e.playing!==s.playing&&this.changePlayState(e.playing,i),e.speed!==void 0&&e.speed!==s.speed&&this.changeSpeed(e.speed),ct(s,this.state,{deep:!0})||this.hooks.emit("stateChange",{state:this.state,prevState:s,userAction:(o=i==null?void 0:i.userAction)!=null?o:!0})}clearPauseData(){var e,i;if((e=this.data)!=null&&e.id)return this.pauseDataMap.delete((i=this.data)==null?void 0:i.id)}changePlayState(e,i){this.actionIfStateIsEnabled(()=>{var s;return this.hooks.emit("playStateChange",e?"playing":"pause",{userAction:(s=i==null?void 0:i.userAction)!=null?s:!0})}),e?this.handlePlay(i):this.handlePause(i),this.state.playing=e}handleEnable(e,i=!0){var s,o;e?((s=this.GuideLine)==null||s.enable(),this.hooks.emit("enable",{userAction:i})):((o=this.GuideLine)==null||o.disable(),this.changePlayState(!1,{userAction:i}),this.hooks.emit("disable",{userAction:i})),this.state.enabled=e}handleVisible(e,i=!0){var s,o;e?((s=this.GuideLine)==null||s.show(),this.actionIfStateIsEnabled(()=>this.hooks.emit("show",{userAction:i}))):((o=this.GuideLine)==null||o.hide(),this.actionIfStateIsEnabled(()=>this.hooks.emit("hide",{userAction:i}))),this.state.visible=e}addInterruptListener(e){const i=()=>{this.privateState.modeChanging||e()},s=o=>{o!=="mouseMove"&&(e(),this.five.off("gesture",s))};return this.five.on("gesture",s),this.five.once("wantsChangeMode",i),()=>{this.five.off("gesture",s),this.five.off("wantsChangeMode",i)}}getSpeededDuration(e){return e/this.state.speed}forceInteruptUpdateCamera(){this.five.updateCamera({},0)}getPauseData(){var e;if((e=this.data)!=null&&e.id)return this.pauseDataMap.get(this.data.id)}setPauseData(){var i;const e=(i=this.data)==null?void 0:i.id;if(e)return this.pauseDataMap.set(e,{fiveState:this.five.getCurrentState(),playedProgress:this.getProgress()})}clear(){this.clearPauseData()}handleDispose(){var e;this.setState({playing:!1}),this.clearPauseData(),this.clear(),(e=this.GuideLine)==null||e.dispose(),this.GuideLine=void 0}actionIfStateIsEnabled(e,i){if(this.state.enabled)return e();i!=null&&i.warnLog&&this.disableWarnLog()}}const la=Math.PI*2;function C2(n){return(n%la+la)%la}function gf(n){return{longitude:C2(-Math.atan2(n.x,-n.z)),latitude:-Math.asin(n.y/1)}}function ca(n,t,e){var l,c,d;const i=new k.Vector3().fromArray([(l=e.x)!=null?l:0,(c=e.y)!=null?c:0,(d=e.z)!=null?d:0]),s=n.getPointAt(t).clone().add(i),o=n.getTangentAt(t),{longitude:r,latitude:a}=gf(o);return{offset:s.clone(),longitude:r,latitude:a,distance:0}}let da=class extends mf{constructor(e,i){var r;super(e,i);u(this,"curve");u(this,"baseCurveOffset");u(this,"curveOffset");u(this,"playStartedTime",performance.now());u(this,"duration");u(this,"changeSpeed",(e,i=!0)=>{this.state.speed=e,this.hooks.emit("speedChange",e,{userAction:i})});u(this,"moveToStart",()=>{this.five.setState(ge(V({},ca(this.curve,0,this.curveOffset)),{mode:"Model"}))});u(this,"playFromStart",()=>{this.clearPauseData(),this.setState({playing:!0})});u(this,"getDuration",()=>this.getSpeededDuration(this.duration));u(this,"getProgress",()=>{var l;const e=this.getPauseData();let i=(l=e==null?void 0:e.playedProgress)!=null?l:0;(i<0||i>=1)&&(i=0);const s=1-i,o=this.getDuration(),a=(performance.now()-this.playStartedTime)/o;return 1-s+a});const s={config:{speedConfig:{moveSpeed:2,moveSpeedUnit:"m/s"}}},o={allowBroke:!0};this.state=Ve({},s,this.state),this.config=Ve({},o,this.config),this.baseCurveOffset=Ve({x:0,y:0,z:0},{y:2},(r=this.config)==null?void 0:r.offset)}load(e,i){var a,l,c,d,h,f;this.handlePause(),this.clear(),this.data=V({id:nt()},e);const s=(()=>{if(this.data.path instanceof k.Curve)return this.data.path.curves[0];{const m=this.data.path.map(kt);return new k.CatmullRomCurve3(m)}})();if(this.curve=s,this.curveOffset={x:this.baseCurveOffset.x+((l=(a=this.data.offset)==null?void 0:a.x)!=null?l:0),y:this.baseCurveOffset.y+((d=(c=this.data.offset)==null?void 0:c.y)!=null?d:0),z:this.baseCurveOffset.z+((f=(h=this.data.offset)==null?void 0:h.z)!=null?f:0)},!this.curve)throw new Error("curve is not defined");const o=this.curve.getLength(),r=this.state.config.speedConfig.moveSpeedUnit==="m/ms"?1:1e3;return this.duration=o/(this.state.config.speedConfig.moveSpeed/r),i?this.setState(i):(this.setState({playing:!1}),this.handleVisible(this.state.visible),this.handleEnable(this.state.enabled),this.changePlayState(this.state.playing),this.changeSpeed(this.state.speed)),Promise.resolve()}handlePlay(){return new Promise((e,i)=>W(this,null,function*(){var l;this.hooks.emit("play",{userAction:!0});const s=this.getPauseData();let o=(l=s==null?void 0:s.playedProgress)!=null?l:0;(o<0||o>=1)&&(o=0);const r=ca(this.curve,o,this.curveOffset);if(this.hooks.emit("progressChange",o),this.five.setState(ge(V({},r),{mode:"Model"})),yield this.five.ready(),this.playStartedTime=performance.now(),this.config.allowBroke){const c=this.addInterruptListener(()=>{this.state.playing&&(this.hooks.emit("broke"),this.handlePause(),c(),i(new Error("broke")))})}const a=()=>{const c=this.getProgress();if(c>=1)this.five.off("renderFrame",a),this.setState({playing:!1},{userAction:!1}),this.hooks.emit("end"),this.hooks.emit("progressChange",1),e("end");else if(this.state.playing===!1)this.five.off("renderFrame",a);else if(c>=0){const d=ca(this.curve,c,this.curveOffset);this.hooks.emit("progressChange",c),this.five.setState(d,!0)}};this.five.on("renderFrame",a)}))}handlePause(e){var i;this.state.playing=!1,this.hooks.emit("pause",{userAction:(i=e==null?void 0:e.userAction)!=null?i:!0}),this.setPauseData()}};function pf(n){const t=Math.abs(Math.cos(n.latitude));return new k.Vector3(-Math.sin(n.longitude)*t,-Math.sin(n.latitude),-Math.cos(n.longitude)*t)}function I2(n,t){const e=pf(n),i=pf(t);return e.angleTo(i)}const P2=n=>W(this,null,function*(){try{n().then(()=>{},()=>{}).catch(()=>{})}catch(t){}});function k2(n){return new Promise(t=>{setTimeout(()=>{t()},n)})}function Af(n){return W(this,null,function*(){return new Promise(t=>{if(n.work){t();return}n.once("loaded",()=>t())})})}class rs extends mf{constructor(e,i){super(e,i);u(this,"state",{visible:!0,enabled:!0,disposed:!1,playing:!1,speed:1,config:{speedConfig:{rotateSpeed:.001,rotateSpeedUnit:"rad/ms",moveSpeed:.002,moveSpeedUnit:"m/ms"}}});u(this,"privateState",{playing:!1,currentPlayQueue:[],currentPlayKeyframe:null,broke:!1,modeChanging:!1});this.config=i,Object.assign(window,{__WalkPlugin_DEBUG__:this})}load(e,i,s){return W(this,null,function*(){var d,h;if(this.state.disposed)return this.disposedErrorLog();this.clear();const o=this.data?JSON.parse(JSON.stringify(this.data)):void 0,r=yield this.formatData(e);this.data=V({id:r.keyframesId},r),this.hooks.emit("dataChange",r,o);let a=[],l;const c=this.data.keyframes.filter(f=>f.data.panoIndex!==void 0);c.filter((f,m)=>{var A;return f.data.panoIndex!==((A=c[m-1])==null?void 0:A.data.panoIndex)}).map(f=>f.data.panoIndex).forEach(f=>{var A,p;const m=(A=this.workUtil.getObserver(f))==null?void 0:A.floorIndex;if(m!==void 0)if(l===m){const g=a.length-1;a[g]=[...(p=a[g])!=null?p:[],f]}else{l=m;const g=a.length;a[g]=[f]}}),!this.GuideLine&&((d=this.config)==null?void 0:d.useGuideLine)!==!1&&r.useGuildLine!==!1&&(this.GuideLine=yf(this.five,this.config)),(h=this.GuideLine)==null||h.load({routes:a.map(f=>({panoIndexList:f})),config:r.guildPluginOptions}),i?this.setState(i,{userAction:s}):(this.setState({playing:!1},{userAction:!1}),this.handleVisible(this.state.visible),this.handleEnable(this.state.enabled),this.changePlayState(this.state.playing,{userAction:!1}),this.changeSpeed(this.state.speed)),this.clearPauseData(),console.debug("WORKPLUGIN loaded",r),this.hooks.emit("dataLoaded",r)})}playFrom(e){const{index:i,id:s,userAction:o}=e;this.state.playing&&this.setState({playing:!1},{userAction:o}),this.setState({playing:!0},{userAction:o,playFromIndex:i,playFromId:s})}playFromStart(e){return this.playFrom(ge(V({},e),{index:0}))}formatData(e){return W(this,null,function*(){this.five.work||(yield Af(this.five));const i=(()=>{const s=e;return typeof s=="object"&&s!==null&&s.version&&s.data?s.data:s})();if(i.keyframes)return{keyframesId:nt(),keyframes:i.keyframes.map((s,o)=>{var l;const r=i.keyframes[o+1],a=(()=>!r||r.start===void 0||s.end===void 0?0:r.start-s.end)();return ge(V({id:(l=s.uuid)!=null?l:nt(),moveIndex:o,stay:a,index:o},s),{guildPluginOptions:i.guildPluginOptions})})};if(i.panoIndexList){let s=[];const{moveEffect:o,moveToFirstPanoEffect:r,moveToFirstPanoDuration:a}=i;return this.privateState.moveToFirstPanoEffect=r,this.privateState.moveToFirstPanoDuration=a,i.panoIndexList.forEach((l,c)=>{const d=(()=>{var p,g;const h=i.panoIndexList.slice(c).find(v=>v!==l);if(h===void 0)return;const f=this.workUtil.getObserverPosition(l),m=this.workUtil.getObserverPosition(h);if(!m||!f||((p=this.workUtil.getObserver(l))==null?void 0:p.floorIndex)!==((g=this.workUtil.getObserver(h))==null?void 0:g.floorIndex))return;const A=new k.Vector3().subVectors(m,f);return gf(A.normalize())})();i.moveType===void 0||i.moveType==="justMove"?s.push({moveIndex:c,stay:i.stay,data:V({effect:"Move",panoIndex:l,moveEffect:o},d!=null?d:{})}):i.moveType==="moveAndRotate"&&(s.push({moveIndex:c,stay:i.stay,data:{effect:"Move",panoIndex:l,moveEffect:o}}),d&&s.push({moveIndex:c,stay:i.stay,data:V({effect:"Rotate",panoIndex:l},d)}))}),{keyframesId:nt(),keyframes:s.map((l,c)=>V({id:nt(),index:c},l)),guildPluginOptions:i.guildPluginOptions,useGuildLine:i.useGuildLine}}else throw new Error("format error: data no keyframes or no panoIndexList")})}handlePlay(e){return W(this,null,function*(){var m;const{data:i,state:s,privateState:o,hooks:r}=this;if(o.playing||!(i!=null&&i.keyframes)||(i==null?void 0:i.keyframes.length)===0)return;const a=nt();o.playId=a,o.playing=!0,o.broke=!1;const l=i.keyframes,c=this.getPauseData();(e==null?void 0:e.notEmitEvent)!==!0&&r.emit("play",{userAction:(m=e==null?void 0:e.userAction)!=null?m:!0});let d=!1;const f=yield(()=>W(this,null,function*(){var A,p;if((e==null?void 0:e.playFromIndex)!==void 0)return e.playFromIndex;if((e==null?void 0:e.playFromId)!==void 0)return(A=this.data)==null?void 0:A.keyframes.findIndex(g=>g.id===e.playFromId);if(c!=null&&c.id){const g=(p=this.data)==null?void 0:p.keyframes.find(v=>v.id===c.id);if(c!=null&&c.fiveState&&(yield this.move(c.fiveState,{moveEffect:o.moveToFirstPanoEffect,duration:o.moveToFirstPanoDuration})),g){if(g.data.effect==="Move")return g.index;if(g.data.effect==="Rotate"){const v=c.duration!==void 0?c.duration*(1-c.playedProgress):void 0;return yield this.playKeyframe(g,{duration:v}),d=!0,g.index+1}}}}))();this.clearPauseData();for(const A of l){if(o.broke||!s.playing||!o.playing||a!==o.playId)return;if(!(f!==void 0&&A.index<f))try{r.emit("playIndexChange",A.index,A),yield this.playKeyframe(A,{moveEffect:d===!1?o.moveToFirstPanoEffect:void 0,duration:d===!1&&typeof o.moveToFirstPanoDuration=="number"?o.moveToFirstPanoDuration:void 0}),A.stay&&(yield k2(A.stay)),d===!1&&(d=!0)}catch(p){return console.error(p),Promise.resolve("broke")}}s.playing&&a===o.playId&&(this.setState({playing:!1},{userAction:!1}),r.emit("end"),this.clearPauseData())})}handlePause(e){var r;const{state:i,privateState:s,hooks:o}=this;i.playing=!1,s.playing!==!1&&(s.playing=!1,(e==null?void 0:e.userAction)!==!1&&this.setPauseData(),s.broke||this.forceInteruptUpdateCamera(),(e==null?void 0:e.notEmitEvent)!==!0&&o.emit("pause",{userAction:(r=e==null?void 0:e.userAction)!=null?r:!0}))}changeSpeed(e,i=!0){const{state:s,privateState:o,hooks:r}=this,{currentPlayKeyframe:a}=o;if(r.emit("speedChange",e,{userAction:i}),s.playing&&a)try{const l=a.originDuration!==void 0?a.originDuration*(1-this.getProgress()):void 0,c=this.playKeyframe(a.keyframe,{duration:l});o.currentPlayQueue.push(c)}catch(l){}}getProgress(){return this.five.controller.cameraMotion.progress}setPauseData(){var e,i,s;if((e=this.data)!=null&&e.id)return this.pauseDataMap.set(this.data.id,{id:(i=this.privateState.currentPlayKeyframe)==null?void 0:i.keyframe.id,fiveState:this.five.getCurrentState(),duration:(s=this.privateState.currentPlayKeyframe)==null?void 0:s.originDuration,playedProgress:this.getProgress()})}clear(){this.clearPauseData(),this.privateState.currentPlayKeyframe=null}playKeyframe(e,i){return W(this,null,function*(){var o;const{privateState:s}=this;return((o=this.privateState.currentPlayKeyframe)==null?void 0:o.keyframe.id)!==e.id&&(this.privateState.currentPlayKeyframe={keyframe:e}),s.currentPlayQueue.push(this.getPlayPromise(e,i)),this.actionPromiseQueue()})}getPlayPromise(s){return W(this,arguments,function*(e,i={}){var r;const o=e.data;if(i.duration=(r=i.duration)!=null?r:e.start!==void 0&&e.end!==void 0?e.end-e.start:void 0,!!o)return new Promise((a,l)=>{let c=!1;this.addInterruptListener(()=>{if(!c)return this.hooks.emit("broke"),this.privateState.broke=!0,this.setState({playing:!1}),c=!0,l(new Error("play is interupted"))});try{if(c)return;const d=()=>{a(),c=!0};switch(o.effect){case"Move":this.move(o,i).then(d);break;case"Rotate":this.rotate(o,i).then(d);break;default:this.rotate(o,i).then(d)}}catch(d){}})})}actionPromiseQueue(){return W(this,null,function*(){const{privateState:e}=this;return new Promise((i,s)=>{if(e.currentPlayQueue.length===0){i();return}const o=e.currentPlayQueue.shift();if(!o){i();return}o.then(i,s)}).then(()=>e.currentPlayQueue.length===0?Promise.resolve():this.actionPromiseQueue())})}move(e,i){return W(this,null,function*(){if(e.mode&&e.mode!==this.five.currentMode)yield this.changeMode(e);else if(e.panoIndex!==this.five.panoIndex)yield this.changePano(e,i);else return Promise.resolve()})}rotate(e,i){return W(this,null,function*(){if(e.mode&&e.mode!==this.five.currentMode)yield this.changeMode({mode:e.mode,panoIndex:e.panoIndex});else if(e.panoIndex&&e.panoIndex!==this.five.panoIndex)return yield this.changePano(e,i);yield this.updateCamera(e,i)})}updateCamera(s){return W(this,arguments,function*(e,i={}){const{five:o,privateState:r,state:a}=this,l=(()=>{var m,A;const h=(m=a.config)==null?void 0:m.speedConfig,f=(A=e.rotateSpeed)!=null?A:h==null?void 0:h.rotateSpeed;if((h==null?void 0:h.rotateSpeedUnit)===void 0)return f;if(f!==void 0)return h.rotateSpeedUnit==="rad/ms"?f:f/1e3})(),c=(()=>{if(i.duration)return i.duration;if(l){const h=this.five.getCurrentState();return I2(h,e)/l}return 800})();r.currentPlayKeyframe&&(r.currentPlayKeyframe.originDuration=c);const d=this.getSpeededDuration(c);return new Promise(h=>{P2(()=>o.updateCamera(e,d)),setTimeout(()=>h(),d)})})}changePano(e,i){return W(this,null,function*(){const{five:s,privateState:o,state:r}=this;if(typeof e.panoIndex!="number"||e.panoIndex===s.panoIndex)return;const a=s.getCurrentState().mode!=="Panorama";a&&(this.privateState.modeChanging=!0);const l=(()=>{var f,m;const d=(f=r.config)==null?void 0:f.speedConfig,h=(m=e.moveSpeed)!=null?m:d==null?void 0:d.moveSpeed;if((d==null?void 0:d.moveSpeedUnit)===void 0)return h;if(h!==void 0)return d.moveSpeedUnit==="m/ms"?h:h/1e3})(),c=(()=>{if(i!=null&&i.duration)return i.duration;if(l&&typeof s.panoIndex=="number"&&typeof e.panoIndex=="number"){const d=this.workUtil.getObserverPosition(s.panoIndex),h=this.workUtil.getObserverPosition(e.panoIndex);return d&&h?d.distanceTo(h)/l:800}return 800})();o.currentPlayKeyframe&&(o.currentPlayKeyframe.originDuration=c),yield new Promise(d=>{var h,f,m;this.fiveUtil.moveToPano(e.panoIndex,{latitude:e.latitude,longitude:e.longitude,fov:e.fov,duration:this.getSpeededDuration(c),effect:(m=(f=i==null?void 0:i.moveEffect)!=null?f:(h=this.state.config)==null?void 0:h.moveEffect)!=null?m:e.moveEffect,moveCancelCallback:()=>d(),moveEndCallback:()=>d()}),a&&s.once("panoArrived",()=>d())}),a&&(this.privateState.modeChanging=!1)})}changeMode(e,i){return W(this,null,function*(){e.mode&&e.mode!==this.five.currentMode&&(this.privateState.modeChanging=!0,yield this.five.changeMode(e.mode,e,i),this.privateState.modeChanging=!1)})}}class vf{constructor(t){u(this,"id");u(this,"renderID");u(this,"isGuideLine",!0);u(this,"panoramaItem");u(this,"modelItem");u(this,"hooks",new Ae.Subscribe);u(this,"_visible",!0);u(this,"plugin");u(this,"five");u(this,"logError",t=>ah("GuideLineItem: ",t));this.id=t.id,this.five=t.five,this.plugin=t.plugin,this.panoramaItem=new oa(this.five,{mode:"panorama",plugin:this.plugin,parent:this}),this.modelItem=new oa(this.five,{mode:"model",plugin:this.plugin,parent:this})}get visible(){return this._visible}setData(t){this.setDataByMode("panorama",t),this.setDataByMode("model",t)}setDataByMode(t,e){var c;const i=t==="panorama"?this.panoramaItem:this.modelItem,s=t==="panorama"?e.panorama_style:e.model_style,o=e.path,r=s,a=s,l=s;if(e.pano_group){const d=t==="panorama"&&e.panorama_style.skip_group!==!1;i.setGeometryByPanoGroup(e.pano_group,V({skipPanoGroup:d},r))}else e.path&&i.setGeometryByPath(o,r);i.name=e.name,i.setMeshStyle(l),i.setMartial(a),i.setVisibleFloorIndexes((c=e.visible_floor_indexes)!=null?c:null),i.setStartTag(s==null?void 0:s.start_tag),i.setEndTag(s==null?void 0:s.end_tag)}show(){this._visible=!0,this.hooks.emit("show",{userAction:!0})}hide(){this._visible=!1,this.hooks.emit("hide",{userAction:!0})}dispose(){this.panoramaItem.dispose(),this.modelItem.dispose()}walk(t){return W(this,null,function*(){if(this.hooks.emit("walkStart",{userAction:!0}),this.panoramaItem.panoGroup.length){const e=V({panoIndexList:this.panoramaItem.panoGroup},t),[i]=yield Li(E2(this.five,e));if(i)return this.logError(i.message)}else{const e={path:this.panoramaItem.curvePath},[i]=yield Li(M2(this.five,e));if(i)return this.logError(i.message)}this.hooks.emit("walkEnded",{userAction:!0})})}}function M2(n,t){return W(this,null,function*(){const e=new da(n);yield e.load(t),e.playFromStart()})}function E2(n,t){return W(this,null,function*(){if(t.panoIndexList.length===0)return;const e=n.getCurrentState();e.mode!=="Panorama"&&(yield Cr(n,["Panorama",{longitude:e.longitude,latitude:0,panoIndex:t.panoIndexList[0]}]));const i=new rs(n);yield i.load(t),yield new Promise((s,o)=>{const r=n.getCurrentState();let a=t.panoIndexList.slice();r.panoIndex===a[0]&&c(r.panoIndex),i.playFromStart();function l(m){if(m!=="Panorama")return h(new Error("mode not match"))}function c(m){const A=a[0];if(a=a.slice(1),m!==A)return h(new Error("panoIndex not match, wanted: "+A+", got: "+m));if(a.length===0)return f()}function d(){n.off("modeChange",l),n.off("panoArrived",c)}function h(m){d(),o(m)}function f(){d(),s()}n.on("modeChange",l),n.on("panoArrived",c)})})}const D2=Object.freeze(Object.defineProperty({__proto__:null,GuideLineItem:vf},Symbol.toStringTag,{value:"Module"})),ha="GuideLinePlugin",bf=`${ha}`;let x2=class extends vi{constructor(e,i){super(e,i);u(this,"name",ha);u(this,"cruisePlugin");u(this,"workUtils",new Ur(this.five));u(this,"itemMap",new Map);u(this,"state",{visible:!1,enabled:!0});u(this,"data");u(this,"heightOffset",0);u(this,"_config");u(this,"_disposed",!1);u(this,"disposedErrorLog",()=>{console.error(`${bf} is disposed`)});this._config=i!=null?i:{},this.cruisePlugin=new rs(e),Object.assign(window,{[`__${ha}_DEBUG__`]:this})}set workCode(e){this.workUtils.workCode=e}get workCode(){return this.workUtils.workCode}get config(){return this._config}get disposed(){return this._disposed}load(e,i,s=!0){return W(this,null,function*(){var m,A,p,g,v,y,P;if(this.disposed)return;const o=this.data?JSON.parse(JSON.stringify(this.data)):void 0,r=yield this.formatData(e);this.hooks.emit("dataChange",r,o),this.data=r;const a=r.config,c={panorama_style:{visible:!!(!r.lines&&r.routes),unit_length:(m=a==null?void 0:a.unitHeight)!=null?m:.4,width:(A=a==null?void 0:a.unitWidth)!=null?A:.6,texture:{url:(p=a==null?void 0:a.arrowTextureUrl)!=null?p:this.staticPrefix+"/release/web/arrow-white.5c2c79a5.png"}}},d=(v=(g=r.routes)==null?void 0:g.map(I=>{var E;return Ve({},c,{id:(E=I.id)!=null?E:Date.now(),pano_group:I.panoIndexList})}))!=null?v:[],h=(P=(y=r.lines)==null?void 0:y.map(I=>Ve({},c,I)))!=null?P:[],f=[...d,...h];yield Af(this.five),this.clear(),f.forEach(I=>{this.addGuideLineItem(I)}),this.updateTagsEnable(),this.handleVisible(this.state.visible),this.handleEnable(this.state.enabled),i&&this.setState(i,{userAction:s}),this.hooks.emit("dataLoaded",r),console.debug(`${bf} loaded`,r)})}formatData(e){return W(this,null,function*(){return this.getDataWithoutVersion(e)})}show(e){return W(this,null,function*(){this.setState({visible:!0},e)})}hide(e){return W(this,null,function*(){this.setState({visible:!1},e)})}enable(e){this.setState({enabled:!0},e)}disable(e){this.setState({enabled:!1},e)}dispose(){this.disposed||(this.clear(),this.hooks.emit("dispose"))}setState(e,i){var o;if(this.disposed)return this.disposedErrorLog();const s=V({},this.state);this.state=V(V({},this.state),e),e.visible!==void 0&&e.visible!==s.visible&&this.handleVisible(e.visible,i==null?void 0:i.userAction),e.enabled!==void 0&&e.enabled!==s.enabled&&this.handleEnable(e.enabled,i==null?void 0:i.userAction),ct(s,this.state,{deep:!0})||(this.hooks.emit("stateChange",{state:this.state,prevState:s,userAction:(o=i==null?void 0:i.userAction)!=null?o:!0}),this.five.needsRender=!0)}addGuideLineItem(e){const i=e.render_id||e.id,s=this.itemMap.get(i);s&&this.removeGuideLineItem(s);const o=new vf({five:this.five,id:i,plugin:this});return this.itemMap.set(i,o),e&&o.setData(e),this.heightOffset+=1e-4,o.modelItem.setHeightOffset(this.heightOffset),o.panoramaItem.setHeightOffset(this.heightOffset),o}getGuideLineItemByID(e){return this.itemMap.get(e)}removeGuideLineItem(e){this.itemMap.delete(e.id),e.panoramaItem.dispose(),e.modelItem.dispose()}updateTagsEnable(){const e=[];function i(r){return Array.isArray(r)&&r.every(a=>typeof a=="number")}function s(r,a){return new k.Vector3().fromArray(r).distanceTo(new k.Vector3().fromArray(a))<.01}function o(r){var l;const a=(l=r.tag)==null?void 0:l.position;return i(a)?e.every(c=>{var d;return i((d=c.tag)==null?void 0:d.position)?!s(a,c.tag.position):!0}):!1}this.itemMap.forEach(r=>{const a=r.modelItem.startTagContainer,l=r.modelItem.endTagContainer,c=o(a);c&&e.push(a),a.plugin.setState({enabled:c},{});const d=o(l);d&&e.push(l),l.plugin.setState({enabled:d},{})})}clear(){this.itemMap.forEach(e=>{this.removeGuideLineItem(e)})}handleEnable(e,i=!0){this.hooks.emit(e?"enable":"disable",{userAction:i})}handleVisible(e,i=!0){this.state.enabled&&this.hooks.emit(e?"show":"hide",{userAction:i})}getDataWithoutVersion(e){return typeof e=="object"&&e!==null&&e.version&&e.data?e.data:e}};const yf=(n,t)=>new x2(n,t),S2=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),L2=(n,t)=>new rs(n,t),T2=(n,t)=>new da(n,t);function wf(n,t,e){if(e){const s=new k.Vector3().subVectors(n.position,e).applyQuaternion(n.quaternion.clone().inverse()).applyQuaternion(t).add(e);n.position.copy(s)}n.quaternion.copy(t)}class Mo extends ld{constructor(e,i){var s;super();u(this,"originObject3D");u(this,"onRender");this.originObject3D=e,this.onRender=(s=i==null?void 0:i.onRender)!=null?s:()=>{}}get helperObject(){return this}render(){this.onRender()}enable(){this.parent.children.includes(this)||this.parent.add(this)}disable(){this.removeFromParent()}show(){this.visible=!0,this.render()}hide(){this.visible=!1,this.render()}raycasterIntersectObject(e,i=[]){return e.intersectObject(this,!0,i)}initialPosition(){this.position.add(this.originObject3D.position)}initQuaternion(){this.quaternion.copy(this.originObject3D.quaternion)}applyHelperScaleMatrix4(e,i){this.scale.applyMatrix4(e)}setHelperQuaternion(e,i){wf(this,e,i)}applyHelperQuaternion(e,i){if(i){const s=new G.Vector3().subVectors(this.position,i).applyQuaternion(e).add(i);this.position.copy(s)}this.applyQuaternion(e)}dispose(){this.removeFromParent()}}class j2 extends Mo{}class z2 extends Mo{}class O2 extends Mo{}class Cf extends Mo{}class B2 extends Cf{}class V2 extends k.Group{constructor(e){super();u(this,"direction");this.direction=e||"x"}}class If extends k.Mesh{constructor(e,i,s){super(e,i);u(this,"direction");this.direction=s||"x"}}function R2(n,t){const{offsetWidth:e,offsetHeight:i}=t,{top:s,left:o}=t.getBoundingClientRect();return Object.assign(new k.Vector2,{x:(n.x-o)/e*2-1,y:-(n.y-s)/i*2+1})}function ua(n,t,e){if(!t||!e||!n)return;const i=R2(t,e);if(Math.abs(i.x)===1||Math.abs(i.y)===1)return;const s=new k.Raycaster;return s.setFromCamera(i,n),s}function Q2(n,t){return!(Math.abs(n.x-t.x)>1e-5||Math.abs(n.y-t.y)>1e-5||Math.abs(n.z-t.z)>1e-5)}class fa extends V2{constructor(e){var d;super(e.direction);u(this,"line");u(this,"arrow");u(this,"lineHeight",.4);u(this,"arrowHeight",.1);this.name="ArrowGroup";const i=new k.Color((d=e.color)!=null?d:16214315),s=new k.MeshBasicMaterial({color:i,depthTest:!1,opacity:1,transparent:!0,side:k.DoubleSide}),o=new k.ConeGeometry(.04,.1,32),r=new If(o,s.clone(),e.direction);r.name=`arrow-${e.direction}`,this.arrow=r;const a=.004,l=new k.CylinderGeometry(a,a,.4,32),c=new If(l,s.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 ma={X:15618642,Y:4765519,Z:4227839};class xn{static get X(){return new k.Color(ma.X).convertSRGBToLinear().clone()}static get Y(){return new k.Color(ma.Y).convertSRGBToLinear().clone()}static get Z(){return new k.Color(ma.Z).convertSRGBToLinear().clone()}}class G2 extends j2{constructor(e,i){super(e);u(this,"xArrow");u(this,"yArrow");u(this,"zArrow");i.xArrowEnable!==!1&&(this.xArrow=new fa({direction:"x",color:xn.X})),i.yArrowEnable!==!1&&(this.yArrow=new fa({direction:"y",color:xn.Y})),i.zArrowEnable!==!1&&(this.zArrow=new fa({direction:"z",color:xn.Z})),this.add(...[this.xArrow,this.yArrow,this.zArrow].filter(Boolean))}show(){super.show(),this.xArrow&&(this.xArrow.visible=!0),this.yArrow&&(this.yArrow.visible=!0),this.zArrow&&(this.zArrow.visible=!0)}showDraggingHelper(e){this.xArrow&&(this.xArrow.visible=e.includes("x")),this.yArrow&&(this.yArrow.visible=e.includes("y")),this.zArrow&&(this.zArrow.visible=e.includes("z"))}dispose(){this.remove(...[this.xArrow,this.yArrow,this.zArrow].filter(Boolean)),super.dispose()}}function Fi(n,t){return N2(document.createElement(t!=null?t:"div"),n)}function N2(n,t){if(!t)return n;for(const e in t)e&&t[e]&&(n.style[e]=t[e]);return n}function F2(n){const t=Fi(V({position:"absolute",display:"block",borderRadius:"4px",paddingTop:"1px",paddingBottom:"1px",paddingLeft:"4px",paddingRight:"4px",pointerEvents:"none",userSelect:"none",zIndex:"99999",backgroundColor:"rgba(0,0,0,0.7)",fontSize:"12px",color:"#fff",letterSpacing:"0",lineHeight:"18px"},n)),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:(o,r)=>{t.style.left=o,t.style.top=r,e()}}}class _2 extends O2{constructor(e,i){super(e);u(this,"xCircle");u(this,"yCircle");u(this,"zCircle");u(this,"children",[]);u(this,"angleTips");u(this,"container");(i==null?void 0:i.yzCircleEnable)!==!1&&(this.xCircle=new ga({direction:"x",color:xn.X})),(i==null?void 0:i.xzCircleEnable)!==!1&&(this.yCircle=new ga({direction:"y",color:xn.Y})),(i==null?void 0:i.xyCircleEnable)!==!1&&(this.zCircle=new ga({direction:"z",color:xn.Z})),i!=null&&i.container&&(i==null?void 0:i.angleTipsEnable)!==!1&&(this.container=i==null?void 0:i.container,this.angleTips=F2({display:"none"}),this.container.appendChild(this.angleTips.element)),this.add(...[this.xCircle,this.yCircle,this.zCircle].filter(Boolean)),this.show()}hide(){this.children.forEach(e=>e.hide())}show(){var e;this.children.forEach(i=>i.showCircle()),(e=this.angleTips)==null||e.hide()}showDraggingHelper(e){var i;this.hide(),this.children.filter(s=>e.includes(s.direction)).forEach(s=>s.showRing()),(i=this.angleTips)==null||i.show()}dispose(){var e,i;this.removeFromParent(),(i=(e=this.angleTips)==null?void 0:e.element)==null||i.remove()}}class ga extends k.Group{constructor(e){super();u(this,"direction");u(this,"circle");u(this,"ring");u(this,"angleSector");this.direction=e.direction,this.circle=new H2(e),this.ring=new W2(e),this.angleSector=new U2(e),this.add(this.circle,this.ring,this.angleSector),this.direction==="y"?this.rotateX(Math.PI/2):this.direction==="x"&&this.rotateY(-Math.PI/2)}showCircle(){this.add(this.circle),this.remove(this.ring,this.angleSector)}showRing(){this.add(this.ring,this.angleSector),this.remove(this.circle)}hide(){this.remove(this.ring,this.angleSector,this.circle)}}class H2 extends k.Mesh{constructor(e){var i;super();u(this,"direction");u(this,"gapAngle",.02);u(this,"geometry",new k.RingGeometry(.25,.3,20,8,this.gapAngle,Math.PI/2-this.gapAngle*2));this.material=new k.MeshBasicMaterial({opacity:.6,color:(i=e.color)!=null?i:16777215,transparent:!0,side:k.DoubleSide,depthTest:!1}),this.direction=e.direction,this.geometry.name=`RotateHelperCircleGeometry-${this.direction}`}}class W2 extends k.Group{constructor(e){super();u(this,"direction");this.direction=e.direction;const i=.015,s=new Array(8).fill(null).map((o,r)=>{const a=new k.RingGeometry(.25,.3,20,8,Math.PI/4*r+i,Math.PI/4-i*2),l=new k.MeshBasicMaterial({opacity:1,color:16777215,depthTest:!1,transparent:!0,side:k.DoubleSide}),c=new k.Mesh(a,l);return c.name=`AxesDashedRing-${this.direction}-${r}`,c});this.add(...s)}}class U2 extends k.Mesh{constructor(e){var s;super();u(this,"direction");u(this,"baseAxes");u(this,"angleDirection");switch(e.direction){case"x":this.baseAxes=new k.Vector3(0,0,1);break;case"y":this.baseAxes=new k.Vector3(1,0,0);break;case"z":this.baseAxes=new k.Vector3(1,0,0);break}const i=.3+5e-4;this.geometry=new k.CircleGeometry(i,48,0,1e-4),this.material=new k.MeshBasicMaterial({opacity:.4,color:(s=e.color)!=null?s:16777215,depthTest:!1,transparent:!0,side:k.DoubleSide}),this.direction=e.direction,this.angleDirection=this.direction==="z"?1:-1}}function Y2(){const n=Fi({width:"100%",height:"100%",left:"0",top:"0",position:"absolute",pointerEvents:"none"}),t=Fi({boxSizing:"border-box",width:"100%",height:"100%",left:"0",top:"0",position:"relative",display:"flex",alignItems:"center",justifyContent:"center"}),e=Fi({boxSizing:"border-box",width:"100%",height:"100%",left:"0",top:"0",position:"absolute",border:"1px solid rgba(255,255,255,0.4)"});n.appendChild(t),t.appendChild(e);const i="-4px",s={direction:"nesw",element:wi({cursor:"nesw-resize",left:i,bottom:i})},o={direction:"ns",element:wi({cursor:"ns-resize",bottom:i})},r={direction:"nwse",element:wi({cursor:"nwse-resize",right:i,bottom:i})},a={direction:"ew",element:wi({cursor:"ew-resize",right:i})},l={direction:"nesw",element:wi({cursor:"nesw-resize",right:i,top:i})},c={direction:"ns",element:wi({cursor:"ns-resize",top:i})},d={direction:"nwse",element:wi({cursor:"nwse-resize",left:i,top:i})},h={direction:"ew",element:wi({cursor:"ew-resize",left:i})};return new Array(o,a,c,h,s,r,l,d).forEach(m=>t.appendChild(m.element)),{container:n,squares:[s,o,r,a,l,c,d,h]}}function wi(n){const t=Fi(V({background:"#FFFFFF",width:"9px",height:"9px",position:"absolute",pointerEvents:"none"},n)),e=Fi({width:"15px",height:"15px",position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none"}),i=Fi({width:"15px",height:"15px",cursor:n==null?void 0:n.cursor,pointerEvents:"auto",background:"transparent"});return i.draggable=!0,e.appendChild(i),t.appendChild(e),t}class X2 extends B2{constructor(e,i,s,o){super(e);u(this,"points",[]);u(this,"cornerPositions",[]);u(this,"css3DInstance");u(this,"plane");u(this,"css3DRenderer",new $i);u(this,"camera");u(this,"scene");u(this,"container");u(this,"enabled",!1);this.camera=s,this.scene=o,this.container=i,this.initRectangleScaleHelper()}get helperObject(){var e;if(!((e=this.css3DInstance)!=null&&e.css3DObject))throw new Error("css3DInstance is not initialized");return this.css3DInstance.css3DObject}applyMatrix4(e){var i;super.applyMatrix4(e),this.helperObject.applyMatrix4(e),(i=this.plane)==null||i.applyMatrix4(e),this.cornerPositions.forEach(s=>s.applyMatrix4(e))}showDraggingHelper(){}applyHelperScaleMatrix4(e,i){var s;(s=this.plane)==null||s.scale.applyMatrix4(e),this.helperObject.applyScaleMatrix4(e)}updatePoints(){const e=this.calculatePointPosition(this.cornerPositions);this.points.forEach((i,s)=>{i.position.copy(e[s])})}applyHelperQuaternion(e,i){var o;const s=(o=this.css3DInstance)==null?void 0:o.css3DObject;if(s){const r=new k.Vector3().subVectors(s.position,i).applyQuaternion(e).add(i);s.position.copy(r),s.applyQuaternion(e)}if(this.plane){const r=new k.Vector3().subVectors(this.plane.position,i).applyQuaternion(e).add(i);this.plane.position.copy(r),this.plane.applyQuaternion(e)}this.cornerPositions.forEach(r=>{const a=new k.Vector3().subVectors(r,i).applyQuaternion(e).add(i);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,l;const e=this.getCornerPositions();if(!e)return;this.cornerPositions=e;const i=this.css3DRenderer.create3DElement(this.camera,e,{ratio:.003});if(!i)return;this.css3DInstance=i,i.appendToElement(this.container);const s=i.css3DObject.container,{container:o,squares:r}=Y2();this.points=r.map((c,d)=>({direction:c.direction,point:c.element,position:this.calculatePointPosition(e)[d]})),s.insertBefore(o,(a=s.children[0])!=null?a:null),this.helperObject.position.copy(this.originObject3D.position),(l=this.plane)==null||l.position.copy(this.originObject3D.position)}getCornerPositions(){const{originObject3D:e}=this;if(e.isCSS3DObjectPlus)return e.cornerPoints;console.error("当前物体暂时不支持 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)]}}const Z2=n=>{const t=n.elements,e=t[0],i=t[1],s=t[2],o=t[3],r=t[4],a=t[5],l=t[6],c=t[7],d=t[8],h=t[9],f=t[10],m=t[11],A=t[12],p=t[13],g=t[14],v=t[15],y=h*g*c-p*f*c+p*l*m-a*g*m-h*l*v+a*f*v,P=A*f*c-d*g*c-A*l*m+r*g*m+d*l*v-r*f*v,I=d*p*c-A*h*c+A*a*m-r*p*m-d*a*v+r*h*v,E=A*h*l-d*p*l-A*a*f+r*p*f+d*a*g-r*h*g,C=e*y+i*P+s*I+o*E;if(C===0)return n.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const z=1/C;return t[0]=y*z,t[1]=(p*f*o-h*g*o-p*s*m+i*g*m+h*s*v-i*f*v)*z,t[2]=(a*g*o-p*l*o+p*s*c-i*g*c-a*s*v+i*l*v)*z,t[3]=(h*l*o-a*f*o-h*s*c+i*f*c+a*s*m-i*l*m)*z,t[4]=P*z,t[5]=(d*g*o-A*f*o+A*s*m-e*g*m-d*s*v+e*f*v)*z,t[6]=(A*l*o-r*g*o-A*s*c+e*g*c+r*s*v-e*l*v)*z,t[7]=(r*f*o-d*l*o+d*s*c-e*f*c-r*s*m+e*l*m)*z,t[8]=I*z,t[9]=(A*h*o-d*p*o-A*i*m+e*p*m+d*i*v-e*h*v)*z,t[10]=(r*p*o-A*a*o+A*i*c-e*p*c-r*i*v+e*a*v)*z,t[11]=(d*a*o-r*h*o-d*i*c+e*h*c+r*i*m-e*a*m)*z,t[12]=E*z,t[13]=(d*p*s-A*h*s+A*i*f-e*p*f-d*i*g+e*h*g)*z,t[14]=(A*a*s-r*p*s-A*i*l+e*p*l+r*i*g-e*a*g)*z,t[15]=(r*h*s-d*a*s+d*i*l-e*h*l-r*i*f+e*a*f)*z,n};function Pf(n){const t=new k.Box3,e=new k.Vector3;if(n.updateWorldMatrix(!1,!1),n.traverse(i=>{var o;if(i.name==="shadow")return;const s=i.geometry;if(i.updateWorldMatrix(!1,!1),s!==void 0)if((o=s==null?void 0:s.attributes)!=null&&o.position){const r=s.attributes.position;for(let a=0,l=r.count;a<l;a++)e.fromBufferAttribute(r,a).applyMatrix4(i.matrixWorld),t.expandByPoint(e)}else s.vertices.forEach(r=>{const a=r.clone().applyMatrix4(i.matrixWorld);t.expandByPoint(a)})}),!t.isEmpty())return t.applyMatrix4(Z2(n.matrixWorld.clone())),t}class J2 extends z2{constructor(e){super(e);u(this,"box");u(this,"outline");u(this,"originObject");u(this,"positionAttribute");this.originObject=e,this.positionAttribute=new k.BufferAttribute(new Float32Array(8*3),3),this.box=this.createBox(),this.outline=this.createOutline(),this.add(this.box,this.outline),this.update()}raycasterIntersectObject(e,i){return e.intersectObject(this,!1,i)}raycast(e,i){this.box.raycast(e,i)}update(){const e=Pf(this.originObject);if(!e)return;const{min:i,max:s}=e;this.positionAttribute.setXYZ(0,s.x,s.y,s.z),this.positionAttribute.setXYZ(1,i.x,s.y,s.z),this.positionAttribute.setXYZ(2,i.x,i.y,s.z),this.positionAttribute.setXYZ(3,s.x,i.y,s.z),this.positionAttribute.setXYZ(4,s.x,s.y,i.z),this.positionAttribute.setXYZ(5,i.x,s.y,i.z),this.positionAttribute.setXYZ(6,i.x,i.y,i.z),this.positionAttribute.setXYZ(7,s.x,i.y,i.z),this.positionAttribute.needsUpdate=!0}createOutline(){const e=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),i=new k.BufferGeometry;i.setIndex(new k.BufferAttribute(e,1)),i.setAttribute("position",this.positionAttribute);const s=new k.LineBasicMaterial({color:64767,linewidth:1,opacity:1,toneMapped:!1}),o=new k.LineSegments(i,s);return o.matrixAutoUpdate=!1,o}createBox(){const e=new Uint16Array([0,1,2,0,2,3,0,3,7,0,7,4,0,4,5,0,5,1,6,1,5,6,2,1,6,5,4,6,4,7,6,3,2,6,7,3]),i=new k.BufferGeometry;i.setIndex(new k.BufferAttribute(e,1)),i.setAttribute("position",this.positionAttribute);const s=new k.MeshBasicMaterial({color:64767,opacity:.1,depthTest:!1,transparent:!0});return new k.Mesh(i,s)}}function je(n,t){this._camera=n||null,this._domElement=t||document,this._raycaster=new k.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)}je.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)},je.eventNames=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","contextmenu","touchstart","touchend"],je.prototype._getRelativeMouseXY=function(n){var t=n.target||n.srcElement;t.nodeType===3&&(t=t.parentNode);var e={x:0,y:0},i=t,s=getComputedStyle(i,null);e.y+=parseInt(s.getPropertyValue("padding-top"),10),e.x+=parseInt(s.getPropertyValue("padding-left"),10);do e.x+=i.offsetLeft,e.y+=i.offsetTop,s=getComputedStyle(i,null),e.x+=parseInt(s.getPropertyValue("border-left-width"),10),e.y+=parseInt(s.getPropertyValue("border-top-width"),10);while(i=i.offsetParent);var o={width:t===window?window.innerWidth:t.offsetWidth,height:t===window?window.innerHeight:t.offsetHeight};return{x:Number((n.pageX-e.x)/o.width)*2-1,y:-((n.pageY-e.y)/o.height)*2+1}},je.prototype._objectCtxInit=function(n){n._3xDomEvent={}},je.prototype._objectCtxDeinit=function(n){delete n._3xDomEvent},je.prototype._objectCtxIsInit=function(n){return!!n._3xDomEvent},je.prototype._objectCtxGet=function(n){return n._3xDomEvent},je.prototype.camera=function(n){return n&&(this._camera=n),this._camera},je.prototype.bind=function(n,t,e,i){console.assert(je.eventNames.indexOf(t)!==-1,"not available events:"+t),this._objectCtxIsInit(n)||this._objectCtxInit(n);var s=this._objectCtxGet(n);s[t+"Handlers"]||(s[t+"Handlers"]=[]),s[t+"Handlers"].push({callback:e,useCapture:i}),this._boundObjs[t]===void 0&&(this._boundObjs[t]=[]),this._boundObjs[t].push(n)},je.prototype.addEventListener=je.prototype.bind,je.prototype.unbind=function(n,t,e,i){console.assert(je.eventNames.indexOf(t)!==-1,"not available events:"+t),this._objectCtxIsInit(n)||this._objectCtxInit(n);var s=this._objectCtxGet(n);s[t+"Handlers"]||(s[t+"Handlers"]=[]);for(var o=s[t+"Handlers"],r=0;r<o.length;r++){var a=o[r];if(e==a.callback&&i==a.useCapture){o.splice(r,1);break}}var l=this._boundObjs[t].indexOf(n);this._boundObjs[t].splice(l,1)},je.prototype.removeEventListener=je.prototype.unbind,je.prototype._bound=function(n,t){var e=this._objectCtxGet(t);return e?!!e[n+"Handlers"]:!1},je.prototype._onMove=function(n,t,e,i){var s=this._boundObjs[n];if(!(s===void 0||s.length===0)){var o=new k.Vector2;o.set(t,e),this._raycaster.setFromCamera(o,this._camera);var r=this._raycaster.intersectObjects(s),a=this._selected;if(r.length>0){var l,c,d,h=r[0],f=h.object;this._selected=f,d=this._bound("mousemove",f),a!=f&&(l=this._bound("mouseover",f),c=a&&this._bound("mouseout",a))}else c=a&&this._bound("mouseout",a),this._selected=null;d&&this._notify("mousemove",f,i,h),l&&this._notify("mouseover",f,i,h),c&&this._notify("mouseout",a,i,h)}},je.prototype._onEvent=function(n,t,e,i){var s=this._boundObjs[n];if(!(s===void 0||s.length===0)){var o=new k.Vector2;o.set(t,e),this._raycaster.setFromCamera(o,this._camera);var r=this._raycaster.intersectObjects(s,!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(n,l,i,a)}}},je.prototype._notify=function(n,t,e,i){var s=this._objectCtxGet(t),o=s?s[n+"Handlers"]:null;if(!s||!o||o.length===0){t.parent&&this._notify(n,t.parent,e,i);return}for(var o=s[n+"Handlers"],r=0;r<o.length;r++){var a=o[r],l=!0;a.callback({type:n,target:t,origDomEvent:e,intersect:i,stopPropagation:function(){l=!1}}),l&&a.useCapture===!1&&t.parent&&this._notify(n,t.parent,e,i)}},je.prototype._onMouseDown=function(n){return this._onMouseEvent("mousedown",n)},je.prototype._onMouseUp=function(n){return this._onMouseEvent("mouseup",n)},je.prototype._onMouseEvent=function(n,t){var e=this._getRelativeMouseXY(t);this._onEvent(n,e.x,e.y,t)},je.prototype._onMouseMove=function(n){var t=this._getRelativeMouseXY(n);this._onMove("mousemove",t.x,t.y,n),this._onMove("mouseover",t.x,t.y,n),this._onMove("mouseout",t.x,t.y,n)},je.prototype._onClick=function(n){this._onMouseEvent("click",n)},je.prototype._onDblClick=function(n){this._onMouseEvent("dblclick",n)},je.prototype._onContextmenu=function(n){this._onMouseEvent("contextmenu",n)},je.prototype._onTouchStart=function(n){return this._onTouchEvent("touchstart",n)},je.prototype._onTouchEnd=function(n){return this._onTouchEvent("touchend",n)},je.prototype._onTouchMove=function(n){if(n.touches.length==1){var t=Number(n.touches[0].pageX/window.innerWidth)*2-1,e=-(n.touches[0].pageY/window.innerHeight)*2+1;this._onMove("mousemove",t,e,n),this._onMove("mouseover",t,e,n),this._onMove("mouseout",t,e,n)}},je.prototype._onTouchEvent=function(n,t){var e=t.touches;if(e.length==0&&(e=t.changedTouches),e.length==1){var i=Number(e[0].pageX/window.innerWidth)*2-1,s=-(e[0].pageY/window.innerHeight)*2+1;this._onEvent(n,i,s,t)}};class as{constructor(t,e){u(this,"originObject3D");u(this,"hooks");u(this,"preventTapDefaultEvent",!1);u(this,"internalHooks");u(this,"disposers",[]);u(this,"helperObject3D");u(this,"camera");u(this,"model");u(this,"scene");u(this,"container");u(this,"domEvents");u(this,"isDragging",!1);u(this,"enabled",!1);u(this,"name","BaseController");u(this,"boundingBox");u(this,"offset");u(this,"onRender");u(this,"onWantsTapGesture",t=>{if(this.getIntersectObject(t))return!1});var c,d,h;this.hooks=(c=t.sharedHooks)!=null?c:new Ei,this.internalHooks=(d=t.sharedInternalHooks)!=null?d:new Ei,this.camera=t.camera,this.model=t.model,this.originObject3D=t.originObject3D,this.helperObject3D=t.helperObject3D,this.container=t.container,this.scene=t.scene,this.domEvents=new je(t.camera,t.container),this.onRender=(h=t.onRender)!=null?h:()=>{},this.offset=e==null?void 0:e.offset,this.initialHelperPosition(),this.initialHelperQuaternion(),this.enable();const i=(...f)=>this.onSetOriginObjectScale(...f),s=(...f)=>this.onSetOriginObjectRotate(...f),o=(...f)=>this.onSetOriginObjectPosition(...f),r=(...f)=>this.onApplyOriginObjectScale(...f),a=(...f)=>this.onApplyOriginObjectRotate(...f),l=(...f)=>this.onApplyOriginObjectPosition(...f);this.internalHooks.on("setObjectScale",i),this.internalHooks.on("setObjectRotate",s),this.internalHooks.on("setObjectPosition",o),this.internalHooks.on("applyObjectPosition",l),this.internalHooks.on("applyObjectRotate",a),this.internalHooks.on("applyObjectScale",r),this.disposers.push(()=>{this.internalHooks.off("setObjectScale",i),this.internalHooks.off("setObjectRotate",s),this.internalHooks.off("setObjectPosition",o),this.internalHooks.off("applyObjectPosition",l),this.internalHooks.off("applyObjectRotate",a),this.internalHooks.off("applyObjectScale",r)})}initialHelperPosition(){this.helperObject3D.position.add(this.calculateOffset(this.offset)),this.helperObject3D.initialPosition()}initialHelperQuaternion(){this.helperObject3D.initQuaternion()}enable(){this.enabled||(this.enabled=!0,this.scene.add(this.helperObject3D),this.helperObject3D.enable(),this.render())}disable(){this.enabled&&(this.enabled=!1,this.helperObject3D.disable(),this.render())}show(){this.helperObject3D.show(),this.render()}hide(){this.helperObject3D.hide(),this.render()}dispose(){var t;(t=this.disposers)==null||t.forEach(e=>e==null?void 0:e()),this.helperObject3D.dispose(),this.render()}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,i){if(this.isDragging)return!1}onIntersectionOnModelUpdate(t){}onApplyOriginObjectScale(t){this.applyHelperScaleMatrix4(t.matrix,t.origin)}onApplyOriginObjectRotate(t){this.applyHelperQuaternion(t.quaternion,t.origin)}onApplyOriginObjectPosition(t){this.applyHelperMatrix4(t.matrix)}onSetOriginObjectScale(t){this.helperObject3D.scale.copy(t),this.updateOffsetByScale(t)}onSetOriginObjectRotate(t,e){this.helperObject3D.setHelperQuaternion(t,e)}onSetOriginObjectPosition(t){this.helperObject3D.position.copy(t.clone().add(this.calculateOffset(this.offset)))}render(){this.onRender()}updateOffsetByScale(t){if(this.boundingBox&&this.offset){const e=this.originObject3D.position,i=new k.Vector3().subVectors(this.boundingBox.max,e).multiply(t).add(e),s=new k.Vector3().subVectors(this.boundingBox.min,e).multiply(t).add(e),o=this.calculateOffset(this.offset,{min:s,max:i});this.helperObject3D.position.copy(o),this.helperObject3D.initialPosition()}}hoverListener(t,e=16777215,i=1){const s=(Array.isArray(t)?t:[t]).filter(jt),o=[];for(const r of s)if(r instanceof k.Mesh||r instanceof k.Group){const a=r instanceof k.Group?r.children.filter(f=>f instanceof k.Mesh):[r];a.forEach(f=>{f.__originalColor__=f.material.color.clone(),f.__originalOpacity__=f.material.opacity});const l=()=>{a.forEach(f=>{f.material.color.set(e),f.material.opacity=i}),this.render()},c=()=>{a.forEach(f=>{f.material.color.copy(f.__originalColor__),f.material.opacity=f.__originalOpacity__}),this.render()},d=()=>{this.isDragging||l()},h=()=>{this.isDragging||c()};for(const f of a)this.domEvents.addEventListener(f,"mouseover",d),this.domEvents.addEventListener(f,"mouseout",h),this.hooks.on("moveStart",l),this.hooks.on("moveEnd",c),this.hooks.on("rotateEnd",c),o.push(()=>{this.domEvents.removeEventListener(f,"mouseover",d),this.domEvents.removeEventListener(f,"mouseout",h),this.hooks.off("moveStart",l),this.hooks.off("moveEnd",c),this.hooks.off("rotateEnd",c)})}return()=>o.forEach(r=>r==null?void 0:r())}getIntersectObject(t){const e=this.camera.position,i=this.helperObject3D;if(!i)return;const s=this.helperObject3D.raycasterIntersectObject(t)[0];if(!s)return;const o=s;if(o.object=i,this.model.intersectRaycaster){const r=this.model.intersectRaycaster(t)[0];if(r&&r.point.distanceTo(e)<o.point.distanceTo(e))return}return o.object}calculateOffset(t,e){const i=this.originObject3D,s=new k.Vector3(0,0,0);if(!t)return s;const o=()=>e||(this.boundingBox?this.boundingBox:(this.boundingBox=Pf(i),this.boundingBox));if(typeof t.x=="number")s.setX(t.x);else if(typeof t.x=="object"){const r=o();s.setX((r.max.x-r.min.x)*t.x.percents)}if(typeof t.y=="number")s.setY(t.y);else if(typeof t.y=="object"){const r=o();s.setY((r.max.y-r.min.y)*t.y.percents)}if(typeof t.z=="number")s.setZ(t.z);else if(typeof t.z=="object"){const r=o();s.setZ((r.max.z-r.min.z)*t.z.percents)}return s}}class q2 extends as{constructor(...e){super(...e);u(this,"name","MoveController");u(this,"startInfo");u(this,"_moveByMouse",{enabled:!1});u(this,"mouseInfo");u(this,"mousedownEventListenerDisposer");const i=this.helperObject3D;this.hoverListener([i.xArrow,i.yArrow,i.zArrow]);const s=this.dragStart.bind(this),o=this.dragging.bind(this),r=this.dragEnd.bind(this),a=this.show.bind(this),l=this.hide.bind(this);this.domEvents.addEventListener(this.helperObject3D,"mousedown",s),document.addEventListener("mousemove",o),document.addEventListener("mouseup",r),this.hooks.on("rotateStart",l),this.hooks.on("rotateEnd",a),this.hooks.on("moveByMouseEnable",l),this.hooks.on("moveByMouseDisable",a),this.disposers.push(()=>{this.domEvents.removeEventListener(this.helperObject3D,"mousedown",s),document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",r),this.hooks.off("rotateStart",l),this.hooks.off("rotateEnd",a),this.hooks.off("moveByMouseEnable",l),this.hooks.off("moveByMouseDisable",a)}),this.moveByMouseEnable&&this.moveByMouse()}get moveByMouseEnable(){return this._moveByMouse.enabled}dispose(){var e;super.dispose(),(e=this.disposers)==null||e.forEach(i=>i==null?void 0:i())}moveByMouse(e){this._moveByMouse={enabled:!0,useFaceNormal:e==null?void 0:e.useFaceNormal},this.preventTapDefaultEvent=!0;const i=this.handleMouseDown.bind(this),s=this.handleMouseUp.bind(this);this.hooks.emit("moveByMouseEnable"),setTimeout(()=>{this.container.addEventListener("mousedown",i),this.container.addEventListener("mouseup",s)}),this.mousedownEventListenerDisposer=()=>{this.container.removeEventListener("mousedown",i),this.container.removeEventListener("mouseup",s)}}disableMoveByMouse(){var e;this._moveByMouse={enabled:!1},this.preventTapDefaultEvent=!1,this.hooks.emit("moveByMouseDisable"),(e=this.mousedownEventListenerDisposer)==null||e.call(this)}onIntersectionOnModelUpdate(e){var r,a,l;if(!this.moveByMouseEnable)return;const{point:i,face:s}=e;if(!this.hooks.emit("wantToMove",i)){if(this.originObject3D.position.copy(i),(this._moveByMouse.useFaceNormal===!0||typeof this._moveByMouse.useFaceNormal=="object"&&this._moveByMouse.useFaceNormal.enable!==!1)&&s!=null&&s.normal){const c=(()=>typeof this._moveByMouse.useFaceNormal=="object"&&this._moveByMouse.useFaceNormal.alignmentVector?this._moveByMouse.useFaceNormal.alignmentVector:{x:0,y:1,z:0})(),d=new k.Vector3((r=c.x)!=null?r:0,(a=c.y)!=null?a:0,(l=c.z)!=null?l:0),h=(()=>typeof this._moveByMouse.useFaceNormal=="object"&&this._moveByMouse.useFaceNormal.fixedFaceNormal?this._moveByMouse.useFaceNormal.fixedFaceNormal(s.normal):s.normal)();this.originObject3D.quaternion.setFromUnitVectors(d,h),this.internalHooks.emit("setObjectRotate",this.originObject3D.quaternion.clone())}this.internalHooks.emit("setObjectPosition",i),this.hooks.emit("move",i)}}handleMouseDown(e){const{x:i,y:s}=e;this.mouseInfo={x:i,y:s,mouseDownTimestamp:Date.now()}}handleMouseUp(e){if(!this.mouseInfo)return;const{x:i,y:s}=e;this.mouseInfo.x===i&&this.mouseInfo.y===s&&Date.now()-this.mouseInfo.mouseDownTimestamp<500&&(this.disableMoveByMouse(),this.mouseInfo=void 0)}dragStart(e){if(this.moveByMouseEnable||this.isDragging)return;const i=e==null?void 0:e.intersect;if(!i)return this.dragEnd();const s=(i==null?void 0:i.object).direction;if(!s)return this.dragEnd();const o=new k.Vector3(1,0,0).applyQuaternion(this.helperObject3D.quaternion),r=new k.Vector3(0,1,0).applyQuaternion(this.helperObject3D.quaternion),a=new k.Vector3(0,0,1).applyQuaternion(this.helperObject3D.quaternion),l=(()=>{switch(s){case"x":return o;case"y":return r;case"z":return a}})(),c=(()=>{switch(s){case"x":case"y":return a;case"z":return o}})(),d=i.point.clone(),h=new k.Plane;h.setFromNormalAndCoplanarPoint(c,d),this.startInfo={startVectorProject:d.clone().projectOnVector(l),directionVector:l,plane:h},this.helperObject3D.showDraggingHelper([s]),this.hooks.emit("moveStart"),this.isDragging=!0}dragging(e){if(!this.isDragging||!this.startInfo)return;const i=ua(this.camera,e,this.container);return i?(this.move(i),!1):this.dragEnd()}move(e){if(!this.startInfo)return this.dragEnd();const{plane:i,directionVector:s,startVectorProject:o}=this.startInfo,r=this.originObject3D,a=e.ray.intersectPlane(i,new k.Vector3);if(!a)return;const l=a.clone().projectOnVector(s),c=l.clone().sub(o),d=new k.Matrix4;d.setPosition(c);const h=r.position.clone().applyMatrix4(d);this.hooks.emit("wantToMove",h)||(r.applyMatrix4(d),o.copy(l),this.internalHooks.emit("applyObjectPosition",{matrix:d}),this.hooks.emit("move",h))}dragEnd(){this.isDragging&&(this.startInfo=void 0,this.isDragging=!1,this.helperObject3D.show(),this.hooks.emit("moveEnd"))}}class ls{constructor(t,e,i,s,o,r,a){u(this,"helperController");u(this,"five");u(this,"onFiveWantsTapGesture",t=>{if(!this.helperController)return;if(this.helperController.preventTapDefaultEvent)return!1;const e=this.helperController.onWantsTapGesture(t);return this.five.needsRender=!0,e});u(this,"onFiveWantsGesture",(...t)=>{if(!this.helperController)return;const e=this.helperController.onWantsGesture(...t);return this.five.needsRender=!0,e});u(this,"onFiveIntersectionOnModelUpdate",(...t)=>{this.helperController&&this.helperController.onIntersectionOnModelUpdate(...t)});const{camera:l,model:c,scene:d}=t,h=t.getElement();if(this.five=t,!l||!c||!h||!d)return;const f=()=>{t.needsRender=!0};this.helperController=new e({camera:l,model:c,originObject3D:i,helperObject3D:s,container:h,scene:d,onRender:f,sharedHooks:r,sharedInternalHooks:a},o),t.on("wantsTapGesture",this.onFiveWantsTapGesture),t.on("wantsGesture",this.onFiveWantsGesture),t.on("intersectionOnModelUpdate",this.onFiveIntersectionOnModelUpdate)}dispose(){var t;this.five.off("wantsTapGesture",this.onFiveWantsTapGesture),this.five.off("wantsGesture",this.onFiveWantsGesture),this.five.off("intersectionOnModelUpdate",this.onFiveIntersectionOnModelUpdate),(t=this.helperController)==null||t.dispose()}}const pa="Object3DHelper@v1.0.1",K2=()=>{console.error(`${pa} is disposed`)},$2=()=>{console.warn(`${pa} is disabled`)},ek=()=>{console.error(`${pa} is disabled`)};class tk{constructor(t){u(this,"controllers",{});u(this,"state",{visible:!0,enabled:!0,disposed:!1});u(this,"hooks",new Ei);u(this,"eventListener",{});t&&this.addControllers(t),this.setState(this.state)}show(t){return W(this,null,function*(){this.setState({visible:!0},t)})}hide(t){return W(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 K2();if(!this.state.enabled&&t.enabled!==!0&&t.disposed!==!0)return ek();const i=V({},this.state);this.state=V(V({},this.state),t),t.disposed!==void 0&&t.disposed!==i.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:i})}addControllers(t){this.controllers=V(V({},this.controllers),t),this.setState(this.state)}getCurrentState(){return this.state}handleEnable(t,e=!0){t?(this.everyControllerDo(i=>{i.enable()}),this.hooks.emit("enable",{userAction:e})):(this.everyControllerDo(i=>{i.disable()}),this.hooks.emit("disable",{userAction:e})),this.state.enabled=t}handleVisible(t,e=!0){t?(this.everyControllerDo(i=>{i.show()}),this.actionIfStateIsEnabled(()=>this.hooks.emit("show",{userAction:e}))):(this.everyControllerDo(i=>{i.hide()}),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(i=>{i==null||i.dispose()});for(const i in this.controllers){if(!i)continue;const s=i;(e=(t=this.eventListener)[s])==null||e.call(t)}}actionIfStateIsEnabled(t,e){if(this.state.enabled)return t();e!=null&&e.warnLog&&$2()}}function Aa(n){return n*Math.PI/180}class ik extends as{constructor(...e){var c,d,h;super(...e);u(this,"name","RotateController");u(this,"startInfo");u(this,"removeListener");const i=this.helperObject3D;this.hoverListener([(c=i.xCircle)==null?void 0:c.circle,(d=i.yCircle)==null?void 0:d.circle,(h=i.zCircle)==null?void 0:h.circle].filter(Boolean));const s=this.dragStart.bind(this),o=this.dragging.bind(this),r=this.dragEnd.bind(this),a=this.show.bind(this),l=this.hide.bind(this);this.domEvents.addEventListener(this.helperObject3D,"mousedown",s),document.addEventListener("mousemove",o),document.addEventListener("mouseup",r),this.hooks.on("moveStart",l),this.hooks.on("moveEnd",a),this.hooks.on("moveByMouseEnable",l),this.hooks.on("moveByMouseDisable",a),this.removeListener=()=>{this.domEvents.removeEventListener(this.helperObject3D,"mousedown",s),document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",r),this.hooks.off("moveStart",l),this.hooks.off("moveEnd",a),this.hooks.off("moveByMouseEnable",l),this.hooks.off("moveByMouseDisable",a)}}get rotateCenter(){return this.helperObject3D.position.clone()}initialHelperQuaternion(){this.helperObject3D.applyHelperQuaternion(this.originObject3D.quaternion)}setRotateAngle(e){const{x:i=0,y:s=0,z:o=0}=e,r=new k.Euler(Aa(i),Aa(s),Aa(o)),a=new k.Quaternion().setFromEuler(r);if(this.hooks.emit("wantToRotate",a))return;const{originObject3D:c,rotateCenter:d}=this;wf(c,a,d),this.internalHooks.emit("setObjectRotate",a,d),this.hooks.emit("rotate",a),this.render()}dispose(){this.removeListener(),super.dispose()}onApplyOriginObjectRotate(e){this.isDragging||super.onApplyOriginObjectRotate(e)}onApplyOriginObjectScale(e){}dragStart(e){if(this.isDragging)return;const i=e==null?void 0:e.intersect;if(!i)return this.dragEnd();const s=(i==null?void 0:i.object).direction;if(!s)return this.dragEnd();const o=i.point,r=this.getAngleHelper(s);this.setTipsAngle(0);const a=o.clone();a.y+=.2,this.setTipsPosition(a);const l=(()=>{if(s==="x")return new k.Vector3(1,0,0).applyQuaternion(this.originObject3D.quaternion);if(s==="y")return new k.Vector3(0,1,0).applyQuaternion(this.originObject3D.quaternion);if(s==="z")return new k.Vector3(0,0,1).applyQuaternion(this.originObject3D.quaternion)})(),c=new k.Plane().setFromNormalAndCoplanarPoint(l,o),h=c.projectPoint(o.clone(),new k.Vector3).clone().sub(this.rotateCenter),f=h.angleTo(r.baseAxes.clone().applyQuaternion(this.originObject3D.quaternion));this.setAngleHelperStart(s,f),this.setAngleHelperLength(s,0),this.startInfo={direction:s,startVector:h,plane:c,angleHelper:r,angle:0,objectQuaternion:this.originObject3D.quaternion.clone()},this.helperObject3D.showDraggingHelper([s]),this.hooks.emit("rotateStart"),this.isDragging=!0}dragging(e){if(!this.isDragging)return;const i=ua(this.camera,e,this.container);return i?(this.rotate(i),!1):this.dragEnd()}rotate(e){if(!this.startInfo)return this.dragEnd();const{startVector:i,plane:s,angleHelper:o,direction:r,objectQuaternion:a}=this.startInfo,{originObject3D:l}=this,c=e.ray.intersectPlane(s,new k.Vector3);if(!c)return;const d=this.rotateCenter.clone(),f=s.projectPoint(c.clone(),new k.Vector3).clone().sub(d);if(i.angleTo(f)===0)return;const m=new k.Quaternion().setFromUnitVectors(i.clone().normalize(),f.clone().normalize()),A=l.quaternion.clone().premultiply(m);if(this.hooks.emit("wantToRotate",A))return;const v=new k.Euler().setFromQuaternion(new k.Quaternion().setFromUnitVectors(i.clone().normalize().applyQuaternion(a.clone().inverse()),f.clone().normalize().applyQuaternion(a.clone().inverse())),`${r.toUpperCase()}${"XZY".replace(r.toUpperCase(),"")}`)[r]*o.angleDirection;if(this.startInfo.angle+=v,this.setAngleHelperLength(r,this.startInfo.angle),this.setTipsAngle(Ec(this.startInfo.angle)),d){const y=new k.Vector3().subVectors(l.position,d).applyQuaternion(m).add(d);l.position.copy(y)}l.applyQuaternion(m),this.internalHooks.emit("applyObjectRotate",{quaternion:m,origin:d}),this.hooks.emit("rotate",l.quaternion),this.startInfo.startVector=f}dragEnd(){this.isDragging&&(this.internalHooks.emit("setObjectRotate",this.originObject3D.quaternion,this.rotateCenter),this.startInfo=void 0,this.isDragging=!1,this.helperObject3D.show(),this.hooks.emit("rotateEnd"))}getAngleHelper(e){var i,s,o;switch(e){case"x":return(i=this.helperObject3D.xCircle)==null?void 0:i.angleSector;case"y":return(s=this.helperObject3D.yCircle)==null?void 0:s.angleSector;case"z":return(o=this.helperObject3D.zCircle)==null?void 0:o.angleSector}}setAngleHelperStart(e,i){const s=this.getAngleHelper(e);if(!s){console.warn("angleHelper is undefined");return}if(s instanceof k.Mesh&&s.geometry instanceof k.CircleGeometry){const{radius:o,segments:r,thetaLength:a}=s.geometry.parameters;s.geometry=new k.CircleGeometry(o,r,i,a)}else console.warn("only support THREE.CircleGeometry")}setAngleHelperLength(e,i){const o=i>=0?Math.max(i,.001):Math.min(i,-.001),r=this.getAngleHelper(e);if(r instanceof k.Mesh&&r.geometry instanceof k.CircleGeometry){const{radius:a,thetaStart:l}=r.geometry.parameters,c=Math.ceil(Math.abs(o)*(40/(2*Math.PI)));r.geometry=new k.CircleGeometry(a,c,l,o)}else console.warn("only support THREE.CircleGeometry")}setTipsAngle(e){var s;const i=(s=this.helperObject3D.angleTips)==null?void 0:s.element;i&&(i.innerText=`${e.toFixed(0)}°`)}setTipsPosition(e){const i=this.helperObject3D.angleTips;if(!i)return;const s=e.project(this.camera),{x:o,y:r,z:a}=s;if(a>1)return;const l=(o+1)/2*100+"%",c=(-r+1)/2*100+"%";i.setLeftTop(l,c)}}class nk extends as{constructor(...e){super(...e);u(this,"startInfo");u(this,"name","RectangleScaleController")}enable(){this.helperObject3D.enable(),super.enable()}disable(){this.helperObject3D.disable(),super.disable()}show(){this.helperObject3D.show(),super.show()}hide(){this.helperObject3D.hide(),super.hide()}onApplyOriginObjectPosition(e){this.isDragging||super.onApplyOriginObjectPosition(e)}onApplyOriginObjectScale(e){this.helperObject3D.applyHelperScaleMatrix4(e.matrix,e.origin)}getDragPlane(){const e=new k.Plane,i=this.helperObject3D.cornerPositions;if(i.length!==0)return i.length<3?e.setFromNormalAndCoplanarPoint(this.originObject3D.getWorldDirection(new G.Vector3),i[0]):e.setFromCoplanarPoints(i[0],i[1],i[2]),e}dragStart(e,i){var o,r;(r=(o=this.helperObject3D).updatePoints)==null||r.call(o);const s=this.getDragPlane();if(!s)return this.dragEnd();this.startInfo={startPoint:{position:i.position.clone(),direction:i.direction},plane:s},this.hooks.emit("scaleStart"),this.render(),this.isDragging=!0}dragging(e){if(!this.isDragging)return;const i=ua(this.camera,e,this.container);if(!i)return this.dragEnd();this.scale(i)}scale(e){var U,H;if(!this.startInfo)return;const i=this.originObject3D,{startPoint:s,plane:o}=this.startInfo,r=this.helperObject3D.cornerPositions;if(r.length<4)return this.dragEnd();const a=e.ray.intersectPlane(o,new G.Vector3);if(!a||Q2(a,this.camera.position))return;const l=new G.Vector3().addVectors(r[0],r[2]).divideScalar(2),{position:c,direction:d}=s,h=new G.Vector3().subVectors(r[1],r[0]),f=new G.Vector3().subVectors(r[3],r[0]),m=N=>{const F=new G.Vector3(0,0,0);if(!this.startInfo)return F;const Q=(N==="ew"?h:f).clone(),_=c.clone().projectOnVector(Q),Y=a.clone().projectOnVector(Q),Z=l.clone().projectOnVector(Q);if(Y.equals(_))return F;if(N==="ns"&&typeof this.startInfo.dragPointInCenterBottom!="boolean"){const fe=new G.Vector3().subVectors(Y,Z),de=fe.x<0&&Q.x>=0,ke=fe.y<0&&Q.y>=0,Pe=fe.z<0&&Q.z>=0;this.startInfo.dragPointInCenterBottom=de||ke||Pe}if(N==="ew"&&typeof this.startInfo.dragPointInCenterLeft!="boolean"){const fe=new G.Vector3().subVectors(Y,Z),de=fe.x<0&&Q.x>=0,ke=fe.y<0&&Q.y>=0,Pe=fe.z<0&&Q.z>=0;this.startInfo.dragPointInCenterLeft=de||ke||Pe}const q=new G.Vector3().subVectors(Y,_),ee=q.length();return ee>.3?(console.warn("offset.length() > 0.3, skipped",ee),F):q},A=m("ew"),p=m("ns"),g=()=>{const N=A;this.helperObject3D.cornerPositions.forEach((F,Q)=>{var _;(_=this.startInfo)!=null&&_.dragPointInCenterLeft?(Q===0||Q===3)&&F.add(N):(Q===1||Q===2)&&F.add(N)})},v=()=>{const N=p;this.helperObject3D.cornerPositions.forEach((F,Q)=>{var _;(_=this.startInfo)!=null&&_.dragPointInCenterBottom?(Q===0||Q===1)&&F.add(N):(Q===2||Q===3)&&F.add(N)})};switch(d){case"ew":g();break;case"ns":v();break;case"nesw":case"nwse":g(),v()}const y=new G.Vector3().subVectors(r[1],r[0]).length()/h.length(),P=new G.Vector3().subVectors(r[3],r[0]).length()/f.length(),I=new G.Vector3(y,P,1),E=new k.Matrix4().scale(I);i.isCSS3DObjectPlus?i.applyScaleMatrix4(E):i.scale.applyMatrix4(E),s.position.copy(a);const C=new G.Vector3().addVectors(r[0],r[2]).divideScalar(2),z=new G.Vector3().subVectors(C,l),R=new k.Matrix4().setPosition(z);i.applyMatrix4(R),(U=this.helperObject3D.css3DInstance)==null||U.css3DObject.applyMatrix4(R),(H=this.helperObject3D.plane)==null||H.applyMatrix4(R),this.internalHooks.emit("applyObjectScale",{matrix:E}),this.internalHooks.emit("applyObjectPosition",{matrix:R}),this.render()}dragEnd(){this.isDragging&&(this.startInfo=void 0,this.isDragging=!1,this.hooks.emit("scaleEnd"),this.render())}}class sk extends nk{constructor(...e){super(...e);u(this,"name","CSS3DScaleController");this.addHTMLEventListener()}addHTMLEventListener(){this.helperObject3D.points.forEach(e=>{if(!e)return;const i=e.point,s=a=>this.dragStart(a,e),o=this.dragging.bind(this),r=this.dragEnd.bind(this);i.addEventListener("dragstart",s),i.addEventListener("drag",o),i.addEventListener("dragend",r)})}}class ok extends as{constructor(...e){super(...e);u(this,"name","BoundingBoxController")}}class rk extends Cf{constructor(t){super(t)}}class ak extends as{constructor(...e){super(...e);u(this,"name","ScaleController")}setScale(e){var l,c,d;let i=1,s=1,o=1;typeof e=="number"?(i=e,s=e,o=e):typeof e=="object"&&(i=(l=e.x)!=null?l:1,s=(c=e.y)!=null?c:1,o=(d=e.z)!=null?d:1);const r=new k.Vector3(i,s,o);this.hooks.emit("wantToScale",r)||(this.originObject3D.scale.copy(r),this.internalHooks.emit("setObjectScale",r),this.hooks.emit("scale",r),this.render())}}const va="Object3DHelperPlugin",Eo=va,lk=()=>{console.error(`${Eo} is disposed`)},ck=()=>{console.warn(`${Eo} is disabled`)},dk=()=>{console.error(`${Eo} is disabled`)};class kf extends Ti{constructor(e){super(e);u(this,"name",va);u(this,"state",{visible:!0,enabled:!0,disposed:!1});u(this,"objectHelperMap",new Map);u(this,"css3DObjectParentMap",new Map);u(this,"css3DRender");this.five=e,this.css3DRender=new $i(this.five.scene),console.warn("Object3DHelper: 使用此插件,需要在初始化five时,设置five参数: { backgroundAlpha: 0, backgroundColor: 0x000000 }"),Object.assign(window,{[`__${va.toUpperCase()}_DEBUG__`]:this})}show(e){return W(this,null,function*(){this.setState({visible:!0},e)})}hide(e){return W(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,i){if(this.state.disposed)return lk();if(!this.state.enabled&&e.enabled!==!0&&e.disposed!==!0)return dk();const s=V({},this.state);this.state=V(V({},this.state),e),e.disposed!==void 0&&e.disposed!==s.disposed&&e.disposed&&this.handleDispose(),e.visible!==void 0&&e.visible!==s.visible&&this.handleVisible(e.visible),e.enabled!==void 0&&e.enabled!==s.enabled&&this.handleEnable(e.enabled),this.hooks.emit("stateChange",{state:this.state,prevState:s})}getObject3DHelper(e){return this.objectHelperMap.get(e)}addObject3DHelper(e,i={}){var p;if(!e){console.error("Object3D is undefined");return}if(this.objectHelperMap.has(e)){console.warn(`Object3DHelperPlugin: object3D ${e.name} is already has helper`);return}const s=new tk,o=[],r=(p=this.five.getElement())==null?void 0:p.parentElement,a=this.five.camera,{moveHelper:l=!0,rotateHelper:c=!0,scaleHelper:d=!0,boundingBoxHelper:h=!1}=i,f=new Ae.Subscribe,m=new Ae.Subscribe,A=g=>{if(g)return typeof g=="boolean"?g:g.enable};if(A(l)){const g=this.getConfig(i.moveHelper),v=new G2(e,V({},g)),y=new ls(this.five,q2,e,v,g,f,m);s.addControllers({moveController:y.helperController}),o.push(()=>y.dispose())}if(A(c)){const g=this.getConfig(i.rotateHelper),v=new _2(e,V({container:r},g)),y=new ls(this.five,ik,e,v,g,f,m);s.addControllers({rotateController:y.helperController}),o.push(()=>y.dispose())}if(A(h)){const g=new J2(e),v=new ls(this.five,ok,e,g,void 0,f,m);s.addControllers({boundingBoxController:v.helperController})}if(A(d))if(e.isCSS3DObjectPlus&&r){const g=new X2(e,r,a,this.five.scene),v=new ls(this.five,sk,e,g,void 0,f,m);s.addControllers({scaleController:v.helperController}),o.push(()=>v.dispose()),yl(this.five).then(()=>{var y,P;if(e.isCSS3DObjectPlus){const I=e;if(!I||I.mode!=="front")return;const E=(y=this.css3DRender.behindModeCSS3DRenderer.wrapper)!=null?y:wl(this.five);E&&(this.css3DObjectParentMap.set(I,I.parent),I.removeFromParent(),this.css3DRender.behindModeCSS3DRenderer.setWrapper(E),(P=this.css3DRender.getBehindCSS3DObjectGroup())==null||P.add(I),this.css3DRender.render(this.five.camera))}})}else{const g=new rk(e),v=new ls(this.five,ak,e,g,void 0,f,m);s.addControllers({scaleController:v.helperController}),o.push(()=>v.dispose())}return this.objectHelperMap.set(e,{helper:s,disposers:o}),s.controllers}removeObject3DHelper(e){if(!this.objectHelperMap.has(e))return;const{helper:i,disposers:s}=this.objectHelperMap.get(e);if(i){if(e.isCSS3DObjectPlus){const o=e,r=this.css3DObjectParentMap.get(o);r&&r.add(o),this.css3DRender.render(this.five.camera)}this.objectHelperMap.delete(e),i.dispose(),s==null||s.forEach(o=>o==null?void 0:o())}}handleEnable(e,i=!0){e?(this.everyHelperDo(s=>s.enable()),this.hooks.emit("enable",{userAction:i})):(this.everyHelperDo(s=>s.disable()),this.hooks.emit("disable",{userAction:i})),this.state.enabled=e}handleVisible(e,i=!0){e?(this.everyHelperDo(s=>s.show()),this.actionIfStateIsEnabled(()=>this.hooks.emit("show",{userAction:i}))):(this.everyHelperDo(s=>s.hide()),this.actionIfStateIsEnabled(()=>this.hooks.emit("hide",{userAction:i}))),this.state.visible=e}handleDispose(){this.everyHelperDo((e,i)=>{e.dispose(),i==null||i.forEach(s=>s==null?void 0:s())})}everyHelperDo(e){this.objectHelperMap.forEach(({helper:i,disposers:s})=>{i&&e(i,s)})}actionIfStateIsEnabled(e,i){if(this.state.enabled)return e();i!=null&&i.warnLog&&ck()}getConfig(e){if(e&&typeof e!="boolean"&&e.enable)return e}}const hk=n=>new kf(n),uk=`
689
+ `;class oa{constructor(t,e){u(this,"name","");u(this,"startTagContainer");u(this,"endTagContainer");u(this,"path",[]);u(this,"geometryStyle",{});u(this,"materialStyle",{});u(this,"meshStyle",{});u(this,"mesh");u(this,"five");u(this,"mode");u(this,"_curvePath",null);u(this,"_curvePoints",null);u(this,"_panoGroup",[]);u(this,"skippedPositions",null);u(this,"textureUrl","");u(this,"scale",1);u(this,"width",.5);u(this,"unitLength",.5);u(this,"_visibleFloorIndexes",null);u(this,"visible",null);u(this,"modeVisible",!1);u(this,"floorVisible",!0);u(this,"defaultVisible",!1);u(this,"inWalkAnimation",!1);u(this,"customVisible",null);u(this,"parent");u(this,"plugin");u(this,"textureHasLoaded",!1);u(this,"disposed",!1);u(this,"flowAnime",new Di({progress:0}).to({progress:1}).duration(1500).repeat(1/0));u(this,"flickerAnime",tn(300).yoyo(!0).repeat(5));u(this,"cacheLengths",[]);u(this,"heightOffset",0);u(this,"dispose",()=>{var t,e;this.disposed||(this.disposed=!0,this.parent.hooks.off("show",this.updateVisible),this.parent.hooks.off("hide",this.updateVisible),this.plugin.hooks.off("show",this.updateVisible),this.plugin.hooks.off("hide",this.updateVisible),this.plugin.hooks.off("enable",this.updateVisible),this.plugin.hooks.off("disable",this.updateVisible),this.five.off("modeChange",this.onFiveModeChange),this.five.off("modelShownFloorChange",this.onFiveModelShownFloorChange),this.doHide(),(t=this.startTagContainer)==null||t.plugin.dispose(),(e=this.endTagContainer)==null||e.plugin.dispose())});u(this,"onWalkAnimationStart",()=>{this.inWalkAnimation=!0,this.updateVisible()});u(this,"onWalkAnimationEnd",()=>{this.inWalkAnimation=!1,this.updateVisible()});u(this,"onFiveModeChange",t=>{this.modeVisible=this.mode==="panorama"?Tt(t):en(t),this.updateVisible()});u(this,"onFiveModelShownFloorChange",t=>{this.floorVisible=t===null||this.visibleFloorIndexes===null||this.visibleFloorIndexes.includes(t),this.updateVisible()});u(this,"updateVisible",()=>{const t=(()=>!this.parent.visible||!this.plugin.state.enabled||!this.plugin.state.visible?!1:this.customVisible!==null?this.customVisible:this.inWalkAnimation?!0:this.modeVisible&&this.textureHasLoaded&&this.defaultVisible&&this.floorVisible)();this.visible!==t&&(this.visible=t,t?this.doShow():this.doHide())});u(this,"onFlowAnimeUpdate",t=>{const{progress:e}=t;this.mesh.material.uniforms.vOffset.value=e,this.mesh.material.uniformsNeedUpdate=!0,this.five.needsRender=!0});u(this,"onFlickerAnimeUpdate",t=>{var s,o,r,a;const{progress:e}=t,i=1-e;this.mesh.material.uniforms.flicker.value=i,this.mesh.material.uniformsNeedUpdate=!0,this.five.needsRender=!0,this.startTagContainer.tag&&ra(this.startTagContainer.tag)&&((r=this.startTagContainer.app)==null||r.$set(ge(V({},this.startTagContainer.tag.data),{opacity:i,name:this.name,distance:Math.round((o=(s=this.curvePath)==null?void 0:s.getLength())!=null?o:0)}))),this.endTagContainer.tag&&ra(this.endTagContainer.tag)&&((a=this.endTagContainer.app)==null||a.$set(ge(V({},this.endTagContainer.tag.data),{opacity:i})))});u(this,"logWarning",t=>c1("GuideLineModeItem: ",t));u(this,"logError",t=>ah("GuideLineModeItem: ",t));var o,r;this.five=t,this.mode=e.mode,this.plugin=e.plugin,this.parent=e.parent,this.startTagContainer={tag:null,plugin:new ko(this.five)},this.endTagContainer={tag:null,plugin:new ko(this.five)};const i=new k.BufferGeometry,s=new k.ShaderMaterial({vertexShader:v2,fragmentShader:b2,transparent:!0,uniforms:{map:{value:null},useMapColor:{value:0},mapColor:{value:new k.Color},mapOpacity:{value:1},backgroundColor:{value:new k.Color},backgroundOpacity:{value:0},borderColor:{value:new k.Color},borderOpacity:{value:0},backgroundClip:{value:0},borderWidth:{value:.05},opacity:{value:1},flicker:{value:1},maxU:{value:0},vOffset:{value:0}}});this.mesh=new k.Mesh(i,s),this.mesh.name="GuideLineModeItem",this.mode==="panorama"&&(this.parent.hooks.on("walkStart",this.onWalkAnimationStart),this.parent.hooks.on("walkEnded",this.onWalkAnimationEnd)),this.updateVisible(),this.onFiveModeChange(this.five.getCurrentState().mode),this.onFiveModelShownFloorChange((r=(o=this.five.model)==null?void 0:o.shownFloor)!=null?r:null),this.flowAnime.onUpdate(this.onFlowAnimeUpdate),this.flickerAnime.onUpdate(this.onFlickerAnimeUpdate),this.parent.hooks.on("show",this.updateVisible),this.parent.hooks.on("hide",this.updateVisible),this.plugin.hooks.on("show",this.updateVisible),this.plugin.hooks.on("hide",this.updateVisible),this.plugin.hooks.on("enable",this.updateVisible),this.plugin.hooks.on("disable",this.updateVisible),this.plugin.hooks.on("dispose",this.dispose),this.five.on("modeChange",this.onFiveModeChange),this.five.on("modelShownFloorChange",this.onFiveModelShownFloorChange)}get panoGroup(){return this._panoGroup}get visibleFloorIndexes(){return this._visibleFloorIndexes}get curvePath(){return this._curvePath}get curvePoints(){return this._curvePoints}setCustomVisible(t){if(this.disposed)return this.logError("disposed");this.customVisible!==t&&(this.customVisible=t,this.updateVisible())}setDefaultVisible(t){if(this.disposed)return this.logError("disposed");this.defaultVisible!==t&&(this.defaultVisible=t,this.updateVisible())}setUnitSize(t,e){if(this.disposed)return this.logError("disposed");this.width=t,this.unitLength=e,this.setGeometryByPath(this.path,{width:t,unit_length:e})}setScale(t){if(this.disposed)return this.logError("disposed");this.scale=t,this.setGeometryByPath(this.path,{scale:t})}setGeometryByPanoGroup(t,e){if(this.disposed)return this.logError("disposed");if(!this.five.work)return this.logError("setPathByPanoGroup: work is not ready");const i=A2(t);if(this._panoGroup=i,(e==null?void 0:e.skipPanoGroup)!==void 0){const o=e.skipPanoGroup?i.map(r=>this.plugin.workUtils.getObserverStandingPosition(r)).filter(jt):null;this.skippedPositions=o}const s=this.getPathFromPanoGroup(i,this.five.work,e);this.path=s,this.setGeometryByPath(s,e)}setGeometryByPath(t,e){var f,m,A;if(this.disposed)return this.logError("disposed");const i=(f=e==null?void 0:e.scale)!=null?f:this.scale,s=(m=e==null?void 0:e.width)!=null?m:this.width,o=(A=e==null?void 0:e.unit_length)!=null?A:this.unitLength;this.scale=i,this.width=s,this.unitLength=o;const{geometry:r,maxU:a,curvePath:l,curvePoints:c}=D1({path:t,width:s*i,unitLength:o*i,skipPositions:this.skippedPositions});this._curvePath=l,this._curvePoints=c,this.mesh.geometry=r,this.mesh.material.needsUpdate=!0,this.mesh.material.uniforms.maxU.value=a,this.five.needsRender=!0;const d=t,h=V(V({},this.geometryStyle),e);this.path=d,this.geometryStyle=h}setMartial(t){var i,s;if(this.disposed)return this.logError("disposed");(t==null?void 0:t.visible)!==void 0&&this.setDefaultVisible(t.visible),(t==null?void 0:t.color)!==void 0&&this.setColor(t.color),(t==null?void 0:t.opacity)!==void 0&&this.setOpacity(t.opacity),this.setTextureUrl((s=(i=t==null?void 0:t.texture)==null?void 0:i.url)!=null?s:"https://vr-image-4.realsee-cdn.cn/release/web/arrow1.ebe7d0ff.png"),(t==null?void 0:t.background_color)!==void 0&&this.setBackgroundColor(t.background_color),(t==null?void 0:t.background_opacity)!==void 0&&this.setBackgroundOpacity(t.background_opacity),(t==null?void 0:t.border_color)!==void 0&&this.setBorderColor(t.border_color),(t==null?void 0:t.border_opacity)!==void 0&&this.setBorderOpacity(t.border_opacity),(t==null?void 0:t.border_width)!==void 0&&this.setBorderWidth(t.border_width),(t==null?void 0:t.background_clip)!==void 0&&this.setBackgroundClip(t.background_clip);const e=V(V({},this.materialStyle),t);this.materialStyle=e}setMeshStyle(t){if(t!=null&&t.translate){const s=new k.Vector3,o=new k.Vector3().fromArray(t.translate);o.y+=this.heightOffset,s.add(o),this.mesh.position.copy(s),i(this.startTagContainer,o),i(this.endTagContainer,o)}const e=V(V({},this.meshStyle),t);this.meshStyle=e;function i(s,o){if(!s.tag)return;const r=new k.Vector3().fromArray(s.tag.position);r.add(o);const a=r.toArray();s.plugin.changeTagById(s.tag.id,{position:a})}}setHeightOffset(t){const e=new k.Vector3;this.meshStyle.translate&&e.add(new k.Vector3().fromArray(this.meshStyle.translate)),e.setY(e.y+t),this.mesh.position.copy(e),this.heightOffset=t,this.five.needsRender=!0}setColor(t){if(this.disposed)return this.logError("disposed");t&&(this.mesh.material.uniforms.mapColor.value=new k.Color().set(t)),this.mesh.material.uniforms.useMapColor.value=t?1:0,this.mesh.material.uniformsNeedUpdate=!0,this.five.needsRender=!0}setBorderColor(t){if(this.disposed)return this.logError("disposed");this.mesh.material.uniforms.borderColor.value=new k.Color().set(t),this.mesh.material.uniformsNeedUpdate=!0,this.five.needsRender=!0}setBorderOpacity(t){if(this.disposed)return this.logError("disposed");this.mesh.material.uniforms.borderOpacity.value=t,this.mesh.material.uniformsNeedUpdate=!0,this.five.needsRender=!0}setBackgroundClip(t){if(this.disposed)return this.logError("disposed");this.mesh.material.uniforms.backgroundClip.value=t==="border-box"?0:1,this.mesh.material.uniformsNeedUpdate=!0,this.five.needsRender=!0}setBorderWidth(t){if(this.disposed)return this.logError("disposed");this.mesh.material.uniforms.borderWidth.value=t,this.mesh.material.uniformsNeedUpdate=!0,this.five.needsRender=!0}setBackgroundColor(t){if(this.disposed)return this.logError("disposed");this.mesh.material.uniforms.backgroundColor.value=new k.Color().set(t),this.mesh.material.uniformsNeedUpdate=!0,this.five.needsRender=!0}setBackgroundOpacity(t){if(this.disposed)return this.logError("disposed");this.mesh.material.uniforms.backgroundOpacity.value=t,this.mesh.material.uniformsNeedUpdate=!0,this.five.needsRender=!0}setOpacity(t){if(this.disposed)return this.logError("disposed");this.mesh.material.uniforms.opacity.value=t,this.mesh.material.uniformsNeedUpdate=!0,this.five.needsRender=!0}setMapOpacity(t){if(this.disposed)return this.logError("disposed");this.mesh.material.uniforms.mapOpacity.value=t,this.mesh.material.uniformsNeedUpdate=!0,this.five.needsRender=!0}setTextureUrl(t){if(this.disposed)return this.logError("disposed");this.textureUrl=t,zi(t).then(e=>{this.disposed||this.textureUrl===t&&(e.wrapT=k.RepeatWrapping,this.textureHasLoaded=!0,this.mesh.material.uniforms.map.value=e,this.mesh.material.uniformsNeedUpdate=!0,this.mesh.material.needsUpdate=!0,this.five.needsRender=!0,this.updateVisible())})}setVisibleFloorIndexes(t){var e,i;if(this.disposed)return this.logError("disposed");this._visibleFloorIndexes=t,this.onFiveModelShownFloorChange((i=(e=this.five.model)==null?void 0:e.shownFloor)!=null?i:null)}setStartTag(t){this.setTag("start",t)}setEndTag(t){this.setTag("end",t)}flicker(){if(this.disposed)return this.logError("disposed");this.flickerAnime.play()}getLengthByPanoGroupIndex(t){return this.disposed?this.logError("disposed"):this.cacheLengths.length!==0?this.cacheLengths[t]:(this.cacheLengths=this.getPanoGroupLengths(),this.cacheLengths[t])}getPanoGroupLengths(){var l;if(!this.curvePoints||!this.curvePath)return[];const t=this.curvePoints.length,e=this.curvePath.getLength(),i=t-1,s=e/i,o=(l=this.curvePath.getLengths(i))!=null?l:[],r=[];let a=0;for(let c=0;c<t;c++){const d=this.curvePoints[c],h=this.plugin.workUtils.getObserverStandingPosition(a);if(!h)break;h.clone().setY(0).distanceTo(d.clone().setY(0))<s&&(r.push(o[c]),a+=1)}return r}setTag(t,e){const i=this.curvePath,s=t==="start"?this.startTagContainer:this.endTagContainer;if(!(e!=null&&e.data))return s.plugin.clearTags();const r=Ve({},{contentType:"Custom",stickType:"2DPoint",config:{visibleConfig:{visibleFiveMode:["Floorplan","Mapview"],followModelVisibility:!1}},style:{point:{enabled:!1}},data:{}},e);s.tag=r,ra(r)&&(s.tag.element=l=>{var h,f;(h=s.app)==null||h.$destroy();const c=t==="start"?ge(V({},r.data),{name:this.name,distance:Math.round((f=i.getLength())!=null?f:0),i18n:this.plugin.config.i18n}):r.data,d=new p2({target:l,intro:!0,props:c});return s.app=d,()=>d.$destroy()}),s.plugin.load({tagList:[s.tag]});const a=this.meshStyle.translate;if(a&&r.position){const l=new k.Vector3().fromArray(r.position),c=new k.Vector3().fromArray(a);l.add(c),l.y+=this.heightOffset;const d=l.toArray();s.plugin.changeTagById(s.tag.id,{position:d})}}doShow(){this.mode==="model"&&this.flowAnime.play(),this.five.scene.add(this.mesh),this.startTagContainer.plugin.show(),this.endTagContainer.plugin.show(),this.five.needsRender=!0}doHide(){this.mode==="model"&&this.flowAnime.stop(),this.five.scene.remove(this.mesh),this.startTagContainer.plugin.hide(),this.endTagContainer.plugin.hide(),this.five.needsRender=!0}getPathFromPanoGroup(t,e,i){if(t.length<2)return[];const s=t.map(o=>{var r;return(r=this.plugin.workUtils.getObserverStandingPosition(o))==null?void 0:r.toArray()}).filter(jt);return[V({type:"CatmullRomCurve3",points:s},i)]}}function ra(n){return n.contentType==="Custom"}const y2=Object.freeze(Object.defineProperty({__proto__:null,GuideLineModeItem:oa},Symbol.toStringTag,{value:"Module"}));class w2 extends Mh{constructor(e){super(e);u(this,"workUtil",new Ur(this.five))}get version(){return this.five.constructor.version}get majorVersion(){return Number(this.version.split(".")[0])}moveToPano(e,i){const s=this.majorVersion===5?e:{workCode:this.workUtil.workCode,panoIndex:e};return this.five.moveToPano(s,i)}}const ff="CruisePlugin",aa=`${ff}`;class mf extends Ti{constructor(e,i){super(e,i);u(this,"state",{visible:!0,enabled:!0,disposed:!1,playing:!1,speed:1});u(this,"fiveUtil",new w2(this.five));u(this,"workUtil",this.fiveUtil.workUtil);u(this,"data");u(this,"config");u(this,"pauseDataMap",new Map);u(this,"privateState",{playing:!1,broke:!1,modeChanging:!1});u(this,"GuideLine");u(this,"disposedErrorLog",()=>{console.error(`${aa} is disposed`)});u(this,"disableWarnLog",()=>{console.warn(`${aa} is disabled`)});u(this,"disableErrorLog",()=>{console.error(`${aa} is disabled`)});this.config=i,Object.assign(window,{[`__${ff}_DEBUG__`]:this})}set workCode(e){this.fiveUtil.workUtil.workCode=e}get workCode(){return this.fiveUtil.workUtil.workCode}play(e){this.setState({playing:!0},e)}pause(e){this.setState({playing:!1},e)}show(e){return W(this,null,function*(){this.setState({visible:!0},e)})}hide(e){return W(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,i){var o;if(this.state.disposed)return this.disposedErrorLog();if(!this.state.enabled&&e.enabled!==!0&&e.disposed!==!0)return this.disableErrorLog();const s=V({},this.state);this.state=Ve({},this.state,e),e.disposed!==void 0&&e.disposed!==s.disposed&&e.disposed&&this.handleDispose(),e.visible!==void 0&&e.visible!==s.visible&&this.handleVisible(e.visible,i==null?void 0:i.userAction),e.enabled!==void 0&&e.enabled!==s.enabled&&this.handleEnable(e.enabled,i==null?void 0:i.userAction),e.playing!==void 0&&e.playing!==s.playing&&this.changePlayState(e.playing,i),e.speed!==void 0&&e.speed!==s.speed&&this.changeSpeed(e.speed),ct(s,this.state,{deep:!0})||this.hooks.emit("stateChange",{state:this.state,prevState:s,userAction:(o=i==null?void 0:i.userAction)!=null?o:!0})}clearPauseData(){var e,i;if((e=this.data)!=null&&e.id)return this.pauseDataMap.delete((i=this.data)==null?void 0:i.id)}changePlayState(e,i){this.actionIfStateIsEnabled(()=>{var s;return this.hooks.emit("playStateChange",e?"playing":"pause",{userAction:(s=i==null?void 0:i.userAction)!=null?s:!0})}),e?this.handlePlay(i):this.handlePause(i),this.state.playing=e}handleEnable(e,i=!0){var s,o;e?((s=this.GuideLine)==null||s.enable(),this.hooks.emit("enable",{userAction:i})):((o=this.GuideLine)==null||o.disable(),this.changePlayState(!1,{userAction:i}),this.hooks.emit("disable",{userAction:i})),this.state.enabled=e}handleVisible(e,i=!0){var s,o;e?((s=this.GuideLine)==null||s.show(),this.actionIfStateIsEnabled(()=>this.hooks.emit("show",{userAction:i}))):((o=this.GuideLine)==null||o.hide(),this.actionIfStateIsEnabled(()=>this.hooks.emit("hide",{userAction:i}))),this.state.visible=e}addInterruptListener(e){const i=()=>{this.privateState.modeChanging||e()},s=o=>{o!=="mouseMove"&&(e(),this.five.off("gesture",s))};return this.five.on("gesture",s),this.five.once("wantsChangeMode",i),()=>{this.five.off("gesture",s),this.five.off("wantsChangeMode",i)}}getSpeededDuration(e){return e/this.state.speed}forceInteruptUpdateCamera(){this.five.updateCamera({},0)}getPauseData(){var e;if((e=this.data)!=null&&e.id)return this.pauseDataMap.get(this.data.id)}setPauseData(){var i;const e=(i=this.data)==null?void 0:i.id;if(e)return this.pauseDataMap.set(e,{fiveState:this.five.getCurrentState(),playedProgress:this.getProgress()})}clear(){this.clearPauseData()}handleDispose(){var e;this.setState({playing:!1}),this.clearPauseData(),this.clear(),(e=this.GuideLine)==null||e.dispose(),this.GuideLine=void 0}actionIfStateIsEnabled(e,i){if(this.state.enabled)return e();i!=null&&i.warnLog&&this.disableWarnLog()}}const la=Math.PI*2;function C2(n){return(n%la+la)%la}function gf(n){return{longitude:C2(-Math.atan2(n.x,-n.z)),latitude:-Math.asin(n.y/1)}}function ca(n,t,e){var l,c,d;const i=new k.Vector3().fromArray([(l=e.x)!=null?l:0,(c=e.y)!=null?c:0,(d=e.z)!=null?d:0]),s=n.getPointAt(t).clone().add(i),o=n.getTangentAt(t),{longitude:r,latitude:a}=gf(o);return{offset:s.clone(),longitude:r,latitude:a,distance:0}}let da=class extends mf{constructor(e,i){var r;super(e,i);u(this,"curve");u(this,"baseCurveOffset");u(this,"curveOffset");u(this,"playStartedTime",performance.now());u(this,"duration");u(this,"changeSpeed",(e,i=!0)=>{this.state.speed=e,this.hooks.emit("speedChange",e,{userAction:i})});u(this,"moveToStart",()=>{this.five.setState(ge(V({},ca(this.curve,0,this.curveOffset)),{mode:"Model"}))});u(this,"playFromStart",()=>{this.clearPauseData(),this.setState({playing:!0})});u(this,"getDuration",()=>this.getSpeededDuration(this.duration));u(this,"getProgress",()=>{var l;const e=this.getPauseData();let i=(l=e==null?void 0:e.playedProgress)!=null?l:0;(i<0||i>=1)&&(i=0);const s=1-i,o=this.getDuration(),a=(performance.now()-this.playStartedTime)/o;return 1-s+a});const s={config:{speedConfig:{moveSpeed:2,moveSpeedUnit:"m/s"}}},o={allowBroke:!0};this.state=Ve({},s,this.state),this.config=Ve({},o,this.config),this.baseCurveOffset=Ve({x:0,y:0,z:0},{y:2},(r=this.config)==null?void 0:r.offset)}load(e,i){var a,l,c,d,h,f;this.handlePause(),this.clear(),this.data=V({id:et()},e);const s=(()=>{if(this.data.path instanceof k.Curve)return this.data.path.curves[0];{const m=this.data.path.map(kt);return new k.CatmullRomCurve3(m)}})();if(this.curve=s,this.curveOffset={x:this.baseCurveOffset.x+((l=(a=this.data.offset)==null?void 0:a.x)!=null?l:0),y:this.baseCurveOffset.y+((d=(c=this.data.offset)==null?void 0:c.y)!=null?d:0),z:this.baseCurveOffset.z+((f=(h=this.data.offset)==null?void 0:h.z)!=null?f:0)},!this.curve)throw new Error("curve is not defined");const o=this.curve.getLength(),r=this.state.config.speedConfig.moveSpeedUnit==="m/ms"?1:1e3;return this.duration=o/(this.state.config.speedConfig.moveSpeed/r),i?this.setState(i):(this.setState({playing:!1}),this.handleVisible(this.state.visible),this.handleEnable(this.state.enabled),this.changePlayState(this.state.playing),this.changeSpeed(this.state.speed)),Promise.resolve()}handlePlay(){return new Promise((e,i)=>W(this,null,function*(){var l;this.hooks.emit("play",{userAction:!0});const s=this.getPauseData();let o=(l=s==null?void 0:s.playedProgress)!=null?l:0;(o<0||o>=1)&&(o=0);const r=ca(this.curve,o,this.curveOffset);if(this.hooks.emit("progressChange",o),this.five.setState(ge(V({},r),{mode:"Model"})),yield this.five.ready(),this.playStartedTime=performance.now(),this.config.allowBroke){const c=this.addInterruptListener(()=>{this.state.playing&&(this.hooks.emit("broke"),this.handlePause(),c(),i(new Error("broke")))})}const a=()=>{const c=this.getProgress();if(c>=1)this.five.off("renderFrame",a),this.setState({playing:!1},{userAction:!1}),this.hooks.emit("end"),this.hooks.emit("progressChange",1),e("end");else if(this.state.playing===!1)this.five.off("renderFrame",a);else if(c>=0){const d=ca(this.curve,c,this.curveOffset);this.hooks.emit("progressChange",c),this.five.setState(d,!0)}};this.five.on("renderFrame",a)}))}handlePause(e){var i;this.state.playing=!1,this.hooks.emit("pause",{userAction:(i=e==null?void 0:e.userAction)!=null?i:!0}),this.setPauseData()}};function pf(n){const t=Math.abs(Math.cos(n.latitude));return new k.Vector3(-Math.sin(n.longitude)*t,-Math.sin(n.latitude),-Math.cos(n.longitude)*t)}function I2(n,t){const e=pf(n),i=pf(t);return e.angleTo(i)}const P2=n=>W(this,null,function*(){try{n().then(()=>{},()=>{}).catch(()=>{})}catch(t){}});function k2(n){return new Promise(t=>{setTimeout(()=>{t()},n)})}function Af(n){return W(this,null,function*(){return new Promise(t=>{if(n.work){t();return}n.once("loaded",()=>t())})})}class rs extends mf{constructor(e,i){super(e,i);u(this,"state",{visible:!0,enabled:!0,disposed:!1,playing:!1,speed:1,config:{speedConfig:{rotateSpeed:.001,rotateSpeedUnit:"rad/ms",moveSpeed:.002,moveSpeedUnit:"m/ms"}}});u(this,"privateState",{playing:!1,currentPlayQueue:[],currentPlayKeyframe:null,broke:!1,modeChanging:!1});this.config=i,Object.assign(window,{__WalkPlugin_DEBUG__:this})}load(e,i,s){return W(this,null,function*(){var d,h;if(this.state.disposed)return this.disposedErrorLog();this.clear();const o=this.data?JSON.parse(JSON.stringify(this.data)):void 0,r=yield this.formatData(e);this.data=V({id:r.keyframesId},r),this.hooks.emit("dataChange",r,o);let a=[],l;const c=this.data.keyframes.filter(f=>f.data.panoIndex!==void 0);c.filter((f,m)=>{var A;return f.data.panoIndex!==((A=c[m-1])==null?void 0:A.data.panoIndex)}).map(f=>f.data.panoIndex).forEach(f=>{var A,p;const m=(A=this.workUtil.getObserver(f))==null?void 0:A.floorIndex;if(m!==void 0)if(l===m){const g=a.length-1;a[g]=[...(p=a[g])!=null?p:[],f]}else{l=m;const g=a.length;a[g]=[f]}}),!this.GuideLine&&((d=this.config)==null?void 0:d.useGuideLine)!==!1&&r.useGuildLine!==!1&&(this.GuideLine=yf(this.five,this.config)),(h=this.GuideLine)==null||h.load({routes:a.map(f=>({panoIndexList:f})),config:r.guildPluginOptions}),i?this.setState(i,{userAction:s}):(this.setState({playing:!1},{userAction:!1}),this.handleVisible(this.state.visible),this.handleEnable(this.state.enabled),this.changePlayState(this.state.playing,{userAction:!1}),this.changeSpeed(this.state.speed)),this.clearPauseData(),console.debug("WORKPLUGIN loaded",r),this.hooks.emit("dataLoaded",r)})}playFrom(e){const{index:i,id:s,userAction:o}=e;this.state.playing&&this.setState({playing:!1},{userAction:o}),this.setState({playing:!0},{userAction:o,playFromIndex:i,playFromId:s})}playFromStart(e){return this.playFrom(ge(V({},e),{index:0}))}formatData(e){return W(this,null,function*(){this.five.work||(yield Af(this.five));const i=(()=>{const s=e;return typeof s=="object"&&s!==null&&s.version&&s.data?s.data:s})();if(i.keyframes)return{keyframesId:et(),keyframes:i.keyframes.map((s,o)=>{var l;const r=i.keyframes[o+1],a=(()=>!r||r.start===void 0||s.end===void 0?0:r.start-s.end)();return ge(V({id:(l=s.uuid)!=null?l:et(),moveIndex:o,stay:a,index:o},s),{guildPluginOptions:i.guildPluginOptions})})};if(i.panoIndexList){let s=[];const{moveEffect:o,moveToFirstPanoEffect:r,moveToFirstPanoDuration:a}=i;return this.privateState.moveToFirstPanoEffect=r,this.privateState.moveToFirstPanoDuration=a,i.panoIndexList.forEach((l,c)=>{const d=(()=>{var p,g;const h=i.panoIndexList.slice(c).find(v=>v!==l);if(h===void 0)return;const f=this.workUtil.getObserverPosition(l),m=this.workUtil.getObserverPosition(h);if(!m||!f||((p=this.workUtil.getObserver(l))==null?void 0:p.floorIndex)!==((g=this.workUtil.getObserver(h))==null?void 0:g.floorIndex))return;const A=new k.Vector3().subVectors(m,f);return gf(A.normalize())})();i.moveType===void 0||i.moveType==="justMove"?s.push({moveIndex:c,stay:i.stay,data:V({effect:"Move",panoIndex:l,moveEffect:o},d!=null?d:{})}):i.moveType==="moveAndRotate"&&(s.push({moveIndex:c,stay:i.stay,data:{effect:"Move",panoIndex:l,moveEffect:o}}),d&&s.push({moveIndex:c,stay:i.stay,data:V({effect:"Rotate",panoIndex:l},d)}))}),{keyframesId:et(),keyframes:s.map((l,c)=>V({id:et(),index:c},l)),guildPluginOptions:i.guildPluginOptions,useGuildLine:i.useGuildLine}}else throw new Error("format error: data no keyframes or no panoIndexList")})}handlePlay(e){return W(this,null,function*(){var m;const{data:i,state:s,privateState:o,hooks:r}=this;if(o.playing||!(i!=null&&i.keyframes)||(i==null?void 0:i.keyframes.length)===0)return;const a=et();o.playId=a,o.playing=!0,o.broke=!1;const l=i.keyframes,c=this.getPauseData();(e==null?void 0:e.notEmitEvent)!==!0&&r.emit("play",{userAction:(m=e==null?void 0:e.userAction)!=null?m:!0});let d=!1;const f=yield(()=>W(this,null,function*(){var A,p;if((e==null?void 0:e.playFromIndex)!==void 0)return e.playFromIndex;if((e==null?void 0:e.playFromId)!==void 0)return(A=this.data)==null?void 0:A.keyframes.findIndex(g=>g.id===e.playFromId);if(c!=null&&c.id){const g=(p=this.data)==null?void 0:p.keyframes.find(v=>v.id===c.id);if(c!=null&&c.fiveState&&(yield this.move(c.fiveState,{moveEffect:o.moveToFirstPanoEffect,duration:o.moveToFirstPanoDuration})),g){if(g.data.effect==="Move")return g.index;if(g.data.effect==="Rotate"){const v=c.duration!==void 0?c.duration*(1-c.playedProgress):void 0;return yield this.playKeyframe(g,{duration:v}),d=!0,g.index+1}}}}))();this.clearPauseData();for(const A of l){if(o.broke||!s.playing||!o.playing||a!==o.playId)return;if(!(f!==void 0&&A.index<f))try{r.emit("playIndexChange",A.index,A),yield this.playKeyframe(A,{moveEffect:d===!1?o.moveToFirstPanoEffect:void 0,duration:d===!1&&typeof o.moveToFirstPanoDuration=="number"?o.moveToFirstPanoDuration:void 0}),A.stay&&(yield k2(A.stay)),d===!1&&(d=!0)}catch(p){return console.error(p),Promise.resolve("broke")}}s.playing&&a===o.playId&&(this.setState({playing:!1},{userAction:!1}),r.emit("end"),this.clearPauseData())})}handlePause(e){var r;const{state:i,privateState:s,hooks:o}=this;i.playing=!1,s.playing!==!1&&(s.playing=!1,(e==null?void 0:e.userAction)!==!1&&this.setPauseData(),s.broke||this.forceInteruptUpdateCamera(),(e==null?void 0:e.notEmitEvent)!==!0&&o.emit("pause",{userAction:(r=e==null?void 0:e.userAction)!=null?r:!0}))}changeSpeed(e,i=!0){const{state:s,privateState:o,hooks:r}=this,{currentPlayKeyframe:a}=o;if(r.emit("speedChange",e,{userAction:i}),s.playing&&a)try{const l=a.originDuration!==void 0?a.originDuration*(1-this.getProgress()):void 0,c=this.playKeyframe(a.keyframe,{duration:l});o.currentPlayQueue.push(c)}catch(l){}}getProgress(){return this.five.controller.cameraMotion.progress}setPauseData(){var e,i,s;if((e=this.data)!=null&&e.id)return this.pauseDataMap.set(this.data.id,{id:(i=this.privateState.currentPlayKeyframe)==null?void 0:i.keyframe.id,fiveState:this.five.getCurrentState(),duration:(s=this.privateState.currentPlayKeyframe)==null?void 0:s.originDuration,playedProgress:this.getProgress()})}clear(){this.clearPauseData(),this.privateState.currentPlayKeyframe=null}playKeyframe(e,i){return W(this,null,function*(){var o;const{privateState:s}=this;return((o=this.privateState.currentPlayKeyframe)==null?void 0:o.keyframe.id)!==e.id&&(this.privateState.currentPlayKeyframe={keyframe:e}),s.currentPlayQueue.push(this.getPlayPromise(e,i)),this.actionPromiseQueue()})}getPlayPromise(s){return W(this,arguments,function*(e,i={}){var r;const o=e.data;if(i.duration=(r=i.duration)!=null?r:e.start!==void 0&&e.end!==void 0?e.end-e.start:void 0,!!o)return new Promise((a,l)=>{let c=!1;this.addInterruptListener(()=>{if(!c)return this.hooks.emit("broke"),this.privateState.broke=!0,this.setState({playing:!1}),c=!0,l(new Error("play is interupted"))});try{if(c)return;const d=()=>{a(),c=!0};switch(o.effect){case"Move":this.move(o,i).then(d);break;case"Rotate":this.rotate(o,i).then(d);break;default:this.rotate(o,i).then(d)}}catch(d){}})})}actionPromiseQueue(){return W(this,null,function*(){const{privateState:e}=this;return new Promise((i,s)=>{if(e.currentPlayQueue.length===0){i();return}const o=e.currentPlayQueue.shift();if(!o){i();return}o.then(i,s)}).then(()=>e.currentPlayQueue.length===0?Promise.resolve():this.actionPromiseQueue())})}move(e,i){return W(this,null,function*(){if(e.mode&&e.mode!==this.five.currentMode)yield this.changeMode(e);else if(e.panoIndex!==this.five.panoIndex)yield this.changePano(e,i);else return Promise.resolve()})}rotate(e,i){return W(this,null,function*(){if(e.mode&&e.mode!==this.five.currentMode)yield this.changeMode({mode:e.mode,panoIndex:e.panoIndex});else if(e.panoIndex&&e.panoIndex!==this.five.panoIndex)return yield this.changePano(e,i);yield this.updateCamera(e,i)})}updateCamera(s){return W(this,arguments,function*(e,i={}){const{five:o,privateState:r,state:a}=this,l=(()=>{var m,A;const h=(m=a.config)==null?void 0:m.speedConfig,f=(A=e.rotateSpeed)!=null?A:h==null?void 0:h.rotateSpeed;if((h==null?void 0:h.rotateSpeedUnit)===void 0)return f;if(f!==void 0)return h.rotateSpeedUnit==="rad/ms"?f:f/1e3})(),c=(()=>{if(i.duration)return i.duration;if(l){const h=this.five.getCurrentState();return I2(h,e)/l}return 800})();r.currentPlayKeyframe&&(r.currentPlayKeyframe.originDuration=c);const d=this.getSpeededDuration(c);return new Promise(h=>{P2(()=>o.updateCamera(e,d)),setTimeout(()=>h(),d)})})}changePano(e,i){return W(this,null,function*(){const{five:s,privateState:o,state:r}=this;if(typeof e.panoIndex!="number"||e.panoIndex===s.panoIndex)return;const a=s.getCurrentState().mode!=="Panorama";a&&(this.privateState.modeChanging=!0);const l=(()=>{var f,m;const d=(f=r.config)==null?void 0:f.speedConfig,h=(m=e.moveSpeed)!=null?m:d==null?void 0:d.moveSpeed;if((d==null?void 0:d.moveSpeedUnit)===void 0)return h;if(h!==void 0)return d.moveSpeedUnit==="m/ms"?h:h/1e3})(),c=(()=>{if(i!=null&&i.duration)return i.duration;if(l&&typeof s.panoIndex=="number"&&typeof e.panoIndex=="number"){const d=this.workUtil.getObserverPosition(s.panoIndex),h=this.workUtil.getObserverPosition(e.panoIndex);return d&&h?d.distanceTo(h)/l:800}return 800})();o.currentPlayKeyframe&&(o.currentPlayKeyframe.originDuration=c),yield new Promise(d=>{var h,f,m;this.fiveUtil.moveToPano(e.panoIndex,{latitude:e.latitude,longitude:e.longitude,fov:e.fov,duration:this.getSpeededDuration(c),effect:(m=(f=i==null?void 0:i.moveEffect)!=null?f:(h=this.state.config)==null?void 0:h.moveEffect)!=null?m:e.moveEffect,moveCancelCallback:()=>d(),moveEndCallback:()=>d()}),a&&s.once("panoArrived",()=>d())}),a&&(this.privateState.modeChanging=!1)})}changeMode(e,i){return W(this,null,function*(){e.mode&&e.mode!==this.five.currentMode&&(this.privateState.modeChanging=!0,yield this.five.changeMode(e.mode,e,i),this.privateState.modeChanging=!1)})}}class vf{constructor(t){u(this,"id");u(this,"renderID");u(this,"isGuideLine",!0);u(this,"panoramaItem");u(this,"modelItem");u(this,"hooks",new Ae.Subscribe);u(this,"_visible",!0);u(this,"plugin");u(this,"five");u(this,"logError",t=>ah("GuideLineItem: ",t));this.id=t.id,this.five=t.five,this.plugin=t.plugin,this.panoramaItem=new oa(this.five,{mode:"panorama",plugin:this.plugin,parent:this}),this.modelItem=new oa(this.five,{mode:"model",plugin:this.plugin,parent:this})}get visible(){return this._visible}setData(t){this.setDataByMode("panorama",t),this.setDataByMode("model",t)}setDataByMode(t,e){var c;const i=t==="panorama"?this.panoramaItem:this.modelItem,s=t==="panorama"?e.panorama_style:e.model_style,o=e.path,r=s,a=s,l=s;if(e.pano_group){const d=t==="panorama"&&e.panorama_style.skip_group!==!1;i.setGeometryByPanoGroup(e.pano_group,V({skipPanoGroup:d},r))}else e.path&&i.setGeometryByPath(o,r);i.name=e.name,i.setMeshStyle(l),i.setMartial(a),i.setVisibleFloorIndexes((c=e.visible_floor_indexes)!=null?c:null),i.setStartTag(s==null?void 0:s.start_tag),i.setEndTag(s==null?void 0:s.end_tag)}show(){this._visible=!0,this.hooks.emit("show",{userAction:!0})}hide(){this._visible=!1,this.hooks.emit("hide",{userAction:!0})}dispose(){this.panoramaItem.dispose(),this.modelItem.dispose()}walk(t){return W(this,null,function*(){if(this.hooks.emit("walkStart",{userAction:!0}),this.panoramaItem.panoGroup.length){const e=V({panoIndexList:this.panoramaItem.panoGroup},t),[i]=yield Li(E2(this.five,e));if(i)return this.logError(i.message)}else{const e={path:this.panoramaItem.curvePath},[i]=yield Li(M2(this.five,e));if(i)return this.logError(i.message)}this.hooks.emit("walkEnded",{userAction:!0})})}}function M2(n,t){return W(this,null,function*(){const e=new da(n);yield e.load(t),e.playFromStart()})}function E2(n,t){return W(this,null,function*(){if(t.panoIndexList.length===0)return;const e=n.getCurrentState();e.mode!=="Panorama"&&(yield Cr(n,["Panorama",{longitude:e.longitude,latitude:0,panoIndex:t.panoIndexList[0]}]));const i=new rs(n);yield i.load(t),yield new Promise((s,o)=>{const r=n.getCurrentState();let a=t.panoIndexList.slice();r.panoIndex===a[0]&&c(r.panoIndex),i.playFromStart();function l(m){if(m!=="Panorama")return h(new Error("mode not match"))}function c(m){const A=a[0];if(a=a.slice(1),m!==A)return h(new Error("panoIndex not match, wanted: "+A+", got: "+m));if(a.length===0)return f()}function d(){n.off("modeChange",l),n.off("panoArrived",c)}function h(m){d(),o(m)}function f(){d(),s()}n.on("modeChange",l),n.on("panoArrived",c)})})}const D2=Object.freeze(Object.defineProperty({__proto__:null,GuideLineItem:vf},Symbol.toStringTag,{value:"Module"})),ha="GuideLinePlugin",bf=`${ha}`;let x2=class extends vi{constructor(e,i){super(e,i);u(this,"name",ha);u(this,"cruisePlugin");u(this,"workUtils",new Ur(this.five));u(this,"itemMap",new Map);u(this,"state",{visible:!1,enabled:!0});u(this,"data");u(this,"heightOffset",0);u(this,"_config");u(this,"_disposed",!1);u(this,"disposedErrorLog",()=>{console.error(`${bf} is disposed`)});this._config=i!=null?i:{},this.cruisePlugin=new rs(e),Object.assign(window,{[`__${ha}_DEBUG__`]:this})}set workCode(e){this.workUtils.workCode=e}get workCode(){return this.workUtils.workCode}get config(){return this._config}get disposed(){return this._disposed}load(e,i,s=!0){return W(this,null,function*(){var m,A,p,g,v,y,P;const o=this.data?JSON.parse(JSON.stringify(this.data)):void 0,r=yield this.formatData(e);this.hooks.emit("dataChange",r,o),this.data=r;const a=r.config,c={panorama_style:{visible:!!(!r.lines&&r.routes),unit_length:(m=a==null?void 0:a.unitHeight)!=null?m:.4,width:(A=a==null?void 0:a.unitWidth)!=null?A:.6,texture:{url:(p=a==null?void 0:a.arrowTextureUrl)!=null?p:this.staticPrefix+"/release/web/arrow-white.5c2c79a5.png"}}},d=(v=(g=r.routes)==null?void 0:g.map(I=>{var E;return Ve({},c,{id:(E=I.id)!=null?E:et(),pano_group:I.panoIndexList})}))!=null?v:[],h=(P=(y=r.lines)==null?void 0:y.map(I=>Ve({},c,I)))!=null?P:[],f=[...d,...h];yield Af(this.five),this.clear(),f.forEach(I=>{this.addGuideLineItem(I)}),this.updateTagsEnable(),this.handleVisible(this.state.visible),this.handleEnable(this.state.enabled),i&&this.setState(i,{userAction:s}),this.hooks.emit("dataLoaded",r),console.debug(`${bf} loaded`,r)})}formatData(e){return W(this,null,function*(){return this.getDataWithoutVersion(e)})}show(e){return W(this,null,function*(){this.setState({visible:!0},e)})}hide(e){return W(this,null,function*(){this.setState({visible:!1},e)})}enable(e){this.setState({enabled:!0},e)}disable(e){this.setState({enabled:!1},e)}dispose(){this.disposed||(this.clear(),this.hooks.emit("dispose"))}setState(e,i){var o;if(this.disposed)return this.disposedErrorLog();const s=V({},this.state);this.state=V(V({},this.state),e),e.visible!==void 0&&e.visible!==s.visible&&this.handleVisible(e.visible,i==null?void 0:i.userAction),e.enabled!==void 0&&e.enabled!==s.enabled&&this.handleEnable(e.enabled,i==null?void 0:i.userAction),ct(s,this.state,{deep:!0})||(this.hooks.emit("stateChange",{state:this.state,prevState:s,userAction:(o=i==null?void 0:i.userAction)!=null?o:!0}),this.five.needsRender=!0)}addGuideLineItem(e){const i=e.render_id||e.id,s=this.itemMap.get(i);s&&this.removeGuideLineItem(s);const o=new vf({five:this.five,id:i,plugin:this});return this.itemMap.set(i,o),e&&o.setData(e),this.heightOffset+=1e-4,o.modelItem.setHeightOffset(this.heightOffset),o.panoramaItem.setHeightOffset(this.heightOffset),o}getGuideLineItemByID(e){return this.itemMap.get(e)}removeGuideLineItem(e){this.itemMap.delete(e.id),e.panoramaItem.dispose(),e.modelItem.dispose()}updateTagsEnable(){const e=[];function i(r){return Array.isArray(r)&&r.every(a=>typeof a=="number")}function s(r,a){return new k.Vector3().fromArray(r).distanceTo(new k.Vector3().fromArray(a))<.01}function o(r){var l;const a=(l=r.tag)==null?void 0:l.position;return i(a)?e.every(c=>{var d;return i((d=c.tag)==null?void 0:d.position)?!s(a,c.tag.position):!0}):!1}this.itemMap.forEach(r=>{const a=r.modelItem.startTagContainer,l=r.modelItem.endTagContainer,c=o(a);c&&e.push(a),a.plugin.setState({enabled:c},{});const d=o(l);d&&e.push(l),l.plugin.setState({enabled:d},{})})}clear(){this.itemMap.forEach(e=>{this.removeGuideLineItem(e)})}handleEnable(e,i=!0){this.hooks.emit(e?"enable":"disable",{userAction:i})}handleVisible(e,i=!0){this.state.enabled&&this.hooks.emit(e?"show":"hide",{userAction:i})}getDataWithoutVersion(e){return typeof e=="object"&&e!==null&&e.data?e.data:e}};const yf=(n,t)=>new x2(n,t),S2=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),L2=(n,t)=>new rs(n,t),T2=(n,t)=>new da(n,t);function wf(n,t,e){if(e){const s=new k.Vector3().subVectors(n.position,e).applyQuaternion(n.quaternion.clone().inverse()).applyQuaternion(t).add(e);n.position.copy(s)}n.quaternion.copy(t)}class Mo extends ld{constructor(e,i){var s;super();u(this,"originObject3D");u(this,"onRender");this.originObject3D=e,this.onRender=(s=i==null?void 0:i.onRender)!=null?s:()=>{}}get helperObject(){return this}render(){this.onRender()}enable(){this.parent.children.includes(this)||this.parent.add(this)}disable(){this.removeFromParent()}show(){this.visible=!0,this.render()}hide(){this.visible=!1,this.render()}raycasterIntersectObject(e,i=[]){return e.intersectObject(this,!0,i)}initialPosition(){this.position.add(this.originObject3D.position)}initQuaternion(){this.quaternion.copy(this.originObject3D.quaternion)}applyHelperScaleMatrix4(e,i){this.scale.applyMatrix4(e)}setHelperQuaternion(e,i){wf(this,e,i)}applyHelperQuaternion(e,i){if(i){const s=new G.Vector3().subVectors(this.position,i).applyQuaternion(e).add(i);this.position.copy(s)}this.applyQuaternion(e)}dispose(){this.removeFromParent()}}class j2 extends Mo{}class z2 extends Mo{}class O2 extends Mo{}class Cf extends Mo{}class B2 extends Cf{}class V2 extends k.Group{constructor(e){super();u(this,"direction");this.direction=e||"x"}}class If extends k.Mesh{constructor(e,i,s){super(e,i);u(this,"direction");this.direction=s||"x"}}function R2(n,t){const{offsetWidth:e,offsetHeight:i}=t,{top:s,left:o}=t.getBoundingClientRect();return Object.assign(new k.Vector2,{x:(n.x-o)/e*2-1,y:-(n.y-s)/i*2+1})}function ua(n,t,e){if(!t||!e||!n)return;const i=R2(t,e);if(Math.abs(i.x)===1||Math.abs(i.y)===1)return;const s=new k.Raycaster;return s.setFromCamera(i,n),s}function Q2(n,t){return!(Math.abs(n.x-t.x)>1e-5||Math.abs(n.y-t.y)>1e-5||Math.abs(n.z-t.z)>1e-5)}class fa extends V2{constructor(e){var d;super(e.direction);u(this,"line");u(this,"arrow");u(this,"lineHeight",.4);u(this,"arrowHeight",.1);this.name="ArrowGroup";const i=new k.Color((d=e.color)!=null?d:16214315),s=new k.MeshBasicMaterial({color:i,depthTest:!1,opacity:1,transparent:!0,side:k.DoubleSide}),o=new k.ConeGeometry(.04,.1,32),r=new If(o,s.clone(),e.direction);r.name=`arrow-${e.direction}`,this.arrow=r;const a=.004,l=new k.CylinderGeometry(a,a,.4,32),c=new If(l,s.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 ma={X:15618642,Y:4765519,Z:4227839};class xn{static get X(){return new k.Color(ma.X).convertSRGBToLinear().clone()}static get Y(){return new k.Color(ma.Y).convertSRGBToLinear().clone()}static get Z(){return new k.Color(ma.Z).convertSRGBToLinear().clone()}}class G2 extends j2{constructor(e,i){super(e);u(this,"xArrow");u(this,"yArrow");u(this,"zArrow");i.xArrowEnable!==!1&&(this.xArrow=new fa({direction:"x",color:xn.X})),i.yArrowEnable!==!1&&(this.yArrow=new fa({direction:"y",color:xn.Y})),i.zArrowEnable!==!1&&(this.zArrow=new fa({direction:"z",color:xn.Z})),this.add(...[this.xArrow,this.yArrow,this.zArrow].filter(Boolean))}show(){super.show(),this.xArrow&&(this.xArrow.visible=!0),this.yArrow&&(this.yArrow.visible=!0),this.zArrow&&(this.zArrow.visible=!0)}showDraggingHelper(e){this.xArrow&&(this.xArrow.visible=e.includes("x")),this.yArrow&&(this.yArrow.visible=e.includes("y")),this.zArrow&&(this.zArrow.visible=e.includes("z"))}dispose(){this.remove(...[this.xArrow,this.yArrow,this.zArrow].filter(Boolean)),super.dispose()}}function Fi(n,t){return N2(document.createElement(t!=null?t:"div"),n)}function N2(n,t){if(!t)return n;for(const e in t)e&&t[e]&&(n.style[e]=t[e]);return n}function F2(n){const t=Fi(V({position:"absolute",display:"block",borderRadius:"4px",paddingTop:"1px",paddingBottom:"1px",paddingLeft:"4px",paddingRight:"4px",pointerEvents:"none",userSelect:"none",zIndex:"99999",backgroundColor:"rgba(0,0,0,0.7)",fontSize:"12px",color:"#fff",letterSpacing:"0",lineHeight:"18px"},n)),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:(o,r)=>{t.style.left=o,t.style.top=r,e()}}}class _2 extends O2{constructor(e,i){super(e);u(this,"xCircle");u(this,"yCircle");u(this,"zCircle");u(this,"children",[]);u(this,"angleTips");u(this,"container");(i==null?void 0:i.yzCircleEnable)!==!1&&(this.xCircle=new ga({direction:"x",color:xn.X})),(i==null?void 0:i.xzCircleEnable)!==!1&&(this.yCircle=new ga({direction:"y",color:xn.Y})),(i==null?void 0:i.xyCircleEnable)!==!1&&(this.zCircle=new ga({direction:"z",color:xn.Z})),i!=null&&i.container&&(i==null?void 0:i.angleTipsEnable)!==!1&&(this.container=i==null?void 0:i.container,this.angleTips=F2({display:"none"}),this.container.appendChild(this.angleTips.element)),this.add(...[this.xCircle,this.yCircle,this.zCircle].filter(Boolean)),this.show()}hide(){this.children.forEach(e=>e.hide())}show(){var e;this.children.forEach(i=>i.showCircle()),(e=this.angleTips)==null||e.hide()}showDraggingHelper(e){var i;this.hide(),this.children.filter(s=>e.includes(s.direction)).forEach(s=>s.showRing()),(i=this.angleTips)==null||i.show()}dispose(){var e,i;this.removeFromParent(),(i=(e=this.angleTips)==null?void 0:e.element)==null||i.remove()}}class ga extends k.Group{constructor(e){super();u(this,"direction");u(this,"circle");u(this,"ring");u(this,"angleSector");this.direction=e.direction,this.circle=new H2(e),this.ring=new W2(e),this.angleSector=new U2(e),this.add(this.circle,this.ring,this.angleSector),this.direction==="y"?this.rotateX(Math.PI/2):this.direction==="x"&&this.rotateY(-Math.PI/2)}showCircle(){this.add(this.circle),this.remove(this.ring,this.angleSector)}showRing(){this.add(this.ring,this.angleSector),this.remove(this.circle)}hide(){this.remove(this.ring,this.angleSector,this.circle)}}class H2 extends k.Mesh{constructor(e){var i;super();u(this,"direction");u(this,"gapAngle",.02);u(this,"geometry",new k.RingGeometry(.25,.3,20,8,this.gapAngle,Math.PI/2-this.gapAngle*2));this.material=new k.MeshBasicMaterial({opacity:.6,color:(i=e.color)!=null?i:16777215,transparent:!0,side:k.DoubleSide,depthTest:!1}),this.direction=e.direction,this.geometry.name=`RotateHelperCircleGeometry-${this.direction}`}}class W2 extends k.Group{constructor(e){super();u(this,"direction");this.direction=e.direction;const i=.015,s=new Array(8).fill(null).map((o,r)=>{const a=new k.RingGeometry(.25,.3,20,8,Math.PI/4*r+i,Math.PI/4-i*2),l=new k.MeshBasicMaterial({opacity:1,color:16777215,depthTest:!1,transparent:!0,side:k.DoubleSide}),c=new k.Mesh(a,l);return c.name=`AxesDashedRing-${this.direction}-${r}`,c});this.add(...s)}}class U2 extends k.Mesh{constructor(e){var s;super();u(this,"direction");u(this,"baseAxes");u(this,"angleDirection");switch(e.direction){case"x":this.baseAxes=new k.Vector3(0,0,1);break;case"y":this.baseAxes=new k.Vector3(1,0,0);break;case"z":this.baseAxes=new k.Vector3(1,0,0);break}const i=.3+5e-4;this.geometry=new k.CircleGeometry(i,48,0,1e-4),this.material=new k.MeshBasicMaterial({opacity:.4,color:(s=e.color)!=null?s:16777215,depthTest:!1,transparent:!0,side:k.DoubleSide}),this.direction=e.direction,this.angleDirection=this.direction==="z"?1:-1}}function Y2(){const n=Fi({width:"100%",height:"100%",left:"0",top:"0",position:"absolute",pointerEvents:"none"}),t=Fi({boxSizing:"border-box",width:"100%",height:"100%",left:"0",top:"0",position:"relative",display:"flex",alignItems:"center",justifyContent:"center"}),e=Fi({boxSizing:"border-box",width:"100%",height:"100%",left:"0",top:"0",position:"absolute",border:"1px solid rgba(255,255,255,0.4)"});n.appendChild(t),t.appendChild(e);const i="-4px",s={direction:"nesw",element:wi({cursor:"nesw-resize",left:i,bottom:i})},o={direction:"ns",element:wi({cursor:"ns-resize",bottom:i})},r={direction:"nwse",element:wi({cursor:"nwse-resize",right:i,bottom:i})},a={direction:"ew",element:wi({cursor:"ew-resize",right:i})},l={direction:"nesw",element:wi({cursor:"nesw-resize",right:i,top:i})},c={direction:"ns",element:wi({cursor:"ns-resize",top:i})},d={direction:"nwse",element:wi({cursor:"nwse-resize",left:i,top:i})},h={direction:"ew",element:wi({cursor:"ew-resize",left:i})};return new Array(o,a,c,h,s,r,l,d).forEach(m=>t.appendChild(m.element)),{container:n,squares:[s,o,r,a,l,c,d,h]}}function wi(n){const t=Fi(V({background:"#FFFFFF",width:"9px",height:"9px",position:"absolute",pointerEvents:"none"},n)),e=Fi({width:"15px",height:"15px",position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none"}),i=Fi({width:"15px",height:"15px",cursor:n==null?void 0:n.cursor,pointerEvents:"auto",background:"transparent"});return i.draggable=!0,e.appendChild(i),t.appendChild(e),t}class X2 extends B2{constructor(e,i,s,o){super(e);u(this,"points",[]);u(this,"cornerPositions",[]);u(this,"css3DInstance");u(this,"plane");u(this,"css3DRenderer",new $i);u(this,"camera");u(this,"scene");u(this,"container");u(this,"enabled",!1);this.camera=s,this.scene=o,this.container=i,this.initRectangleScaleHelper()}get helperObject(){var e;if(!((e=this.css3DInstance)!=null&&e.css3DObject))throw new Error("css3DInstance is not initialized");return this.css3DInstance.css3DObject}applyMatrix4(e){var i;super.applyMatrix4(e),this.helperObject.applyMatrix4(e),(i=this.plane)==null||i.applyMatrix4(e),this.cornerPositions.forEach(s=>s.applyMatrix4(e))}showDraggingHelper(){}applyHelperScaleMatrix4(e,i){var s;(s=this.plane)==null||s.scale.applyMatrix4(e),this.helperObject.applyScaleMatrix4(e)}updatePoints(){const e=this.calculatePointPosition(this.cornerPositions);this.points.forEach((i,s)=>{i.position.copy(e[s])})}applyHelperQuaternion(e,i){var o;const s=(o=this.css3DInstance)==null?void 0:o.css3DObject;if(s){const r=new k.Vector3().subVectors(s.position,i).applyQuaternion(e).add(i);s.position.copy(r),s.applyQuaternion(e)}if(this.plane){const r=new k.Vector3().subVectors(this.plane.position,i).applyQuaternion(e).add(i);this.plane.position.copy(r),this.plane.applyQuaternion(e)}this.cornerPositions.forEach(r=>{const a=new k.Vector3().subVectors(r,i).applyQuaternion(e).add(i);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,l;const e=this.getCornerPositions();if(!e)return;this.cornerPositions=e;const i=this.css3DRenderer.create3DElement(this.camera,e,{ratio:.003});if(!i)return;this.css3DInstance=i,i.appendToElement(this.container);const s=i.css3DObject.container,{container:o,squares:r}=Y2();this.points=r.map((c,d)=>({direction:c.direction,point:c.element,position:this.calculatePointPosition(e)[d]})),s.insertBefore(o,(a=s.children[0])!=null?a:null),this.helperObject.position.copy(this.originObject3D.position),(l=this.plane)==null||l.position.copy(this.originObject3D.position)}getCornerPositions(){const{originObject3D:e}=this;if(e.isCSS3DObjectPlus)return e.cornerPoints;console.error("当前物体暂时不支持 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)]}}const Z2=n=>{const t=n.elements,e=t[0],i=t[1],s=t[2],o=t[3],r=t[4],a=t[5],l=t[6],c=t[7],d=t[8],h=t[9],f=t[10],m=t[11],A=t[12],p=t[13],g=t[14],v=t[15],y=h*g*c-p*f*c+p*l*m-a*g*m-h*l*v+a*f*v,P=A*f*c-d*g*c-A*l*m+r*g*m+d*l*v-r*f*v,I=d*p*c-A*h*c+A*a*m-r*p*m-d*a*v+r*h*v,E=A*h*l-d*p*l-A*a*f+r*p*f+d*a*g-r*h*g,C=e*y+i*P+s*I+o*E;if(C===0)return n.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const z=1/C;return t[0]=y*z,t[1]=(p*f*o-h*g*o-p*s*m+i*g*m+h*s*v-i*f*v)*z,t[2]=(a*g*o-p*l*o+p*s*c-i*g*c-a*s*v+i*l*v)*z,t[3]=(h*l*o-a*f*o-h*s*c+i*f*c+a*s*m-i*l*m)*z,t[4]=P*z,t[5]=(d*g*o-A*f*o+A*s*m-e*g*m-d*s*v+e*f*v)*z,t[6]=(A*l*o-r*g*o-A*s*c+e*g*c+r*s*v-e*l*v)*z,t[7]=(r*f*o-d*l*o+d*s*c-e*f*c-r*s*m+e*l*m)*z,t[8]=I*z,t[9]=(A*h*o-d*p*o-A*i*m+e*p*m+d*i*v-e*h*v)*z,t[10]=(r*p*o-A*a*o+A*i*c-e*p*c-r*i*v+e*a*v)*z,t[11]=(d*a*o-r*h*o-d*i*c+e*h*c+r*i*m-e*a*m)*z,t[12]=E*z,t[13]=(d*p*s-A*h*s+A*i*f-e*p*f-d*i*g+e*h*g)*z,t[14]=(A*a*s-r*p*s-A*i*l+e*p*l+r*i*g-e*a*g)*z,t[15]=(r*h*s-d*a*s+d*i*l-e*h*l-r*i*f+e*a*f)*z,n};function Pf(n){const t=new k.Box3,e=new k.Vector3;if(n.updateWorldMatrix(!1,!1),n.traverse(i=>{var o;if(i.name==="shadow")return;const s=i.geometry;if(i.updateWorldMatrix(!1,!1),s!==void 0)if((o=s==null?void 0:s.attributes)!=null&&o.position){const r=s.attributes.position;for(let a=0,l=r.count;a<l;a++)e.fromBufferAttribute(r,a).applyMatrix4(i.matrixWorld),t.expandByPoint(e)}else s.vertices.forEach(r=>{const a=r.clone().applyMatrix4(i.matrixWorld);t.expandByPoint(a)})}),!t.isEmpty())return t.applyMatrix4(Z2(n.matrixWorld.clone())),t}class J2 extends z2{constructor(e){super(e);u(this,"box");u(this,"outline");u(this,"originObject");u(this,"positionAttribute");this.originObject=e,this.positionAttribute=new k.BufferAttribute(new Float32Array(8*3),3),this.box=this.createBox(),this.outline=this.createOutline(),this.add(this.box,this.outline),this.update()}raycasterIntersectObject(e,i){return e.intersectObject(this,!1,i)}raycast(e,i){this.box.raycast(e,i)}update(){const e=Pf(this.originObject);if(!e)return;const{min:i,max:s}=e;this.positionAttribute.setXYZ(0,s.x,s.y,s.z),this.positionAttribute.setXYZ(1,i.x,s.y,s.z),this.positionAttribute.setXYZ(2,i.x,i.y,s.z),this.positionAttribute.setXYZ(3,s.x,i.y,s.z),this.positionAttribute.setXYZ(4,s.x,s.y,i.z),this.positionAttribute.setXYZ(5,i.x,s.y,i.z),this.positionAttribute.setXYZ(6,i.x,i.y,i.z),this.positionAttribute.setXYZ(7,s.x,i.y,i.z),this.positionAttribute.needsUpdate=!0}createOutline(){const e=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),i=new k.BufferGeometry;i.setIndex(new k.BufferAttribute(e,1)),i.setAttribute("position",this.positionAttribute);const s=new k.LineBasicMaterial({color:64767,linewidth:1,opacity:1,toneMapped:!1}),o=new k.LineSegments(i,s);return o.matrixAutoUpdate=!1,o}createBox(){const e=new Uint16Array([0,1,2,0,2,3,0,3,7,0,7,4,0,4,5,0,5,1,6,1,5,6,2,1,6,5,4,6,4,7,6,3,2,6,7,3]),i=new k.BufferGeometry;i.setIndex(new k.BufferAttribute(e,1)),i.setAttribute("position",this.positionAttribute);const s=new k.MeshBasicMaterial({color:64767,opacity:.1,depthTest:!1,transparent:!0});return new k.Mesh(i,s)}}function je(n,t){this._camera=n||null,this._domElement=t||document,this._raycaster=new k.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)}je.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)},je.eventNames=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","contextmenu","touchstart","touchend"],je.prototype._getRelativeMouseXY=function(n){var t=n.target||n.srcElement;t.nodeType===3&&(t=t.parentNode);var e={x:0,y:0},i=t,s=getComputedStyle(i,null);e.y+=parseInt(s.getPropertyValue("padding-top"),10),e.x+=parseInt(s.getPropertyValue("padding-left"),10);do e.x+=i.offsetLeft,e.y+=i.offsetTop,s=getComputedStyle(i,null),e.x+=parseInt(s.getPropertyValue("border-left-width"),10),e.y+=parseInt(s.getPropertyValue("border-top-width"),10);while(i=i.offsetParent);var o={width:t===window?window.innerWidth:t.offsetWidth,height:t===window?window.innerHeight:t.offsetHeight};return{x:Number((n.pageX-e.x)/o.width)*2-1,y:-((n.pageY-e.y)/o.height)*2+1}},je.prototype._objectCtxInit=function(n){n._3xDomEvent={}},je.prototype._objectCtxDeinit=function(n){delete n._3xDomEvent},je.prototype._objectCtxIsInit=function(n){return!!n._3xDomEvent},je.prototype._objectCtxGet=function(n){return n._3xDomEvent},je.prototype.camera=function(n){return n&&(this._camera=n),this._camera},je.prototype.bind=function(n,t,e,i){console.assert(je.eventNames.indexOf(t)!==-1,"not available events:"+t),this._objectCtxIsInit(n)||this._objectCtxInit(n);var s=this._objectCtxGet(n);s[t+"Handlers"]||(s[t+"Handlers"]=[]),s[t+"Handlers"].push({callback:e,useCapture:i}),this._boundObjs[t]===void 0&&(this._boundObjs[t]=[]),this._boundObjs[t].push(n)},je.prototype.addEventListener=je.prototype.bind,je.prototype.unbind=function(n,t,e,i){console.assert(je.eventNames.indexOf(t)!==-1,"not available events:"+t),this._objectCtxIsInit(n)||this._objectCtxInit(n);var s=this._objectCtxGet(n);s[t+"Handlers"]||(s[t+"Handlers"]=[]);for(var o=s[t+"Handlers"],r=0;r<o.length;r++){var a=o[r];if(e==a.callback&&i==a.useCapture){o.splice(r,1);break}}var l=this._boundObjs[t].indexOf(n);this._boundObjs[t].splice(l,1)},je.prototype.removeEventListener=je.prototype.unbind,je.prototype._bound=function(n,t){var e=this._objectCtxGet(t);return e?!!e[n+"Handlers"]:!1},je.prototype._onMove=function(n,t,e,i){var s=this._boundObjs[n];if(!(s===void 0||s.length===0)){var o=new k.Vector2;o.set(t,e),this._raycaster.setFromCamera(o,this._camera);var r=this._raycaster.intersectObjects(s),a=this._selected;if(r.length>0){var l,c,d,h=r[0],f=h.object;this._selected=f,d=this._bound("mousemove",f),a!=f&&(l=this._bound("mouseover",f),c=a&&this._bound("mouseout",a))}else c=a&&this._bound("mouseout",a),this._selected=null;d&&this._notify("mousemove",f,i,h),l&&this._notify("mouseover",f,i,h),c&&this._notify("mouseout",a,i,h)}},je.prototype._onEvent=function(n,t,e,i){var s=this._boundObjs[n];if(!(s===void 0||s.length===0)){var o=new k.Vector2;o.set(t,e),this._raycaster.setFromCamera(o,this._camera);var r=this._raycaster.intersectObjects(s,!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(n,l,i,a)}}},je.prototype._notify=function(n,t,e,i){var s=this._objectCtxGet(t),o=s?s[n+"Handlers"]:null;if(!s||!o||o.length===0){t.parent&&this._notify(n,t.parent,e,i);return}for(var o=s[n+"Handlers"],r=0;r<o.length;r++){var a=o[r],l=!0;a.callback({type:n,target:t,origDomEvent:e,intersect:i,stopPropagation:function(){l=!1}}),l&&a.useCapture===!1&&t.parent&&this._notify(n,t.parent,e,i)}},je.prototype._onMouseDown=function(n){return this._onMouseEvent("mousedown",n)},je.prototype._onMouseUp=function(n){return this._onMouseEvent("mouseup",n)},je.prototype._onMouseEvent=function(n,t){var e=this._getRelativeMouseXY(t);this._onEvent(n,e.x,e.y,t)},je.prototype._onMouseMove=function(n){var t=this._getRelativeMouseXY(n);this._onMove("mousemove",t.x,t.y,n),this._onMove("mouseover",t.x,t.y,n),this._onMove("mouseout",t.x,t.y,n)},je.prototype._onClick=function(n){this._onMouseEvent("click",n)},je.prototype._onDblClick=function(n){this._onMouseEvent("dblclick",n)},je.prototype._onContextmenu=function(n){this._onMouseEvent("contextmenu",n)},je.prototype._onTouchStart=function(n){return this._onTouchEvent("touchstart",n)},je.prototype._onTouchEnd=function(n){return this._onTouchEvent("touchend",n)},je.prototype._onTouchMove=function(n){if(n.touches.length==1){var t=Number(n.touches[0].pageX/window.innerWidth)*2-1,e=-(n.touches[0].pageY/window.innerHeight)*2+1;this._onMove("mousemove",t,e,n),this._onMove("mouseover",t,e,n),this._onMove("mouseout",t,e,n)}},je.prototype._onTouchEvent=function(n,t){var e=t.touches;if(e.length==0&&(e=t.changedTouches),e.length==1){var i=Number(e[0].pageX/window.innerWidth)*2-1,s=-(e[0].pageY/window.innerHeight)*2+1;this._onEvent(n,i,s,t)}};class as{constructor(t,e){u(this,"originObject3D");u(this,"hooks");u(this,"preventTapDefaultEvent",!1);u(this,"internalHooks");u(this,"disposers",[]);u(this,"helperObject3D");u(this,"camera");u(this,"model");u(this,"scene");u(this,"container");u(this,"domEvents");u(this,"isDragging",!1);u(this,"enabled",!1);u(this,"name","BaseController");u(this,"boundingBox");u(this,"offset");u(this,"onRender");u(this,"onWantsTapGesture",t=>{if(this.getIntersectObject(t))return!1});var c,d,h;this.hooks=(c=t.sharedHooks)!=null?c:new Ei,this.internalHooks=(d=t.sharedInternalHooks)!=null?d:new Ei,this.camera=t.camera,this.model=t.model,this.originObject3D=t.originObject3D,this.helperObject3D=t.helperObject3D,this.container=t.container,this.scene=t.scene,this.domEvents=new je(t.camera,t.container),this.onRender=(h=t.onRender)!=null?h:()=>{},this.offset=e==null?void 0:e.offset,this.initialHelperPosition(),this.initialHelperQuaternion(),this.enable();const i=(...f)=>this.onSetOriginObjectScale(...f),s=(...f)=>this.onSetOriginObjectRotate(...f),o=(...f)=>this.onSetOriginObjectPosition(...f),r=(...f)=>this.onApplyOriginObjectScale(...f),a=(...f)=>this.onApplyOriginObjectRotate(...f),l=(...f)=>this.onApplyOriginObjectPosition(...f);this.internalHooks.on("setObjectScale",i),this.internalHooks.on("setObjectRotate",s),this.internalHooks.on("setObjectPosition",o),this.internalHooks.on("applyObjectPosition",l),this.internalHooks.on("applyObjectRotate",a),this.internalHooks.on("applyObjectScale",r),this.disposers.push(()=>{this.internalHooks.off("setObjectScale",i),this.internalHooks.off("setObjectRotate",s),this.internalHooks.off("setObjectPosition",o),this.internalHooks.off("applyObjectPosition",l),this.internalHooks.off("applyObjectRotate",a),this.internalHooks.off("applyObjectScale",r)})}initialHelperPosition(){this.helperObject3D.position.add(this.calculateOffset(this.offset)),this.helperObject3D.initialPosition()}initialHelperQuaternion(){this.helperObject3D.initQuaternion()}enable(){this.enabled||(this.enabled=!0,this.scene.add(this.helperObject3D),this.helperObject3D.enable(),this.render())}disable(){this.enabled&&(this.enabled=!1,this.helperObject3D.disable(),this.render())}show(){this.helperObject3D.show(),this.render()}hide(){this.helperObject3D.hide(),this.render()}dispose(){var t;(t=this.disposers)==null||t.forEach(e=>e==null?void 0:e()),this.helperObject3D.dispose(),this.render()}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,i){if(this.isDragging)return!1}onIntersectionOnModelUpdate(t){}onApplyOriginObjectScale(t){this.applyHelperScaleMatrix4(t.matrix,t.origin)}onApplyOriginObjectRotate(t){this.applyHelperQuaternion(t.quaternion,t.origin)}onApplyOriginObjectPosition(t){this.applyHelperMatrix4(t.matrix)}onSetOriginObjectScale(t){this.helperObject3D.scale.copy(t),this.updateOffsetByScale(t)}onSetOriginObjectRotate(t,e){this.helperObject3D.setHelperQuaternion(t,e)}onSetOriginObjectPosition(t){this.helperObject3D.position.copy(t.clone().add(this.calculateOffset(this.offset)))}render(){this.onRender()}updateOffsetByScale(t){if(this.boundingBox&&this.offset){const e=this.originObject3D.position,i=new k.Vector3().subVectors(this.boundingBox.max,e).multiply(t).add(e),s=new k.Vector3().subVectors(this.boundingBox.min,e).multiply(t).add(e),o=this.calculateOffset(this.offset,{min:s,max:i});this.helperObject3D.position.copy(o),this.helperObject3D.initialPosition()}}hoverListener(t,e=16777215,i=1){const s=(Array.isArray(t)?t:[t]).filter(jt),o=[];for(const r of s)if(r instanceof k.Mesh||r instanceof k.Group){const a=r instanceof k.Group?r.children.filter(f=>f instanceof k.Mesh):[r];a.forEach(f=>{f.__originalColor__=f.material.color.clone(),f.__originalOpacity__=f.material.opacity});const l=()=>{a.forEach(f=>{f.material.color.set(e),f.material.opacity=i}),this.render()},c=()=>{a.forEach(f=>{f.material.color.copy(f.__originalColor__),f.material.opacity=f.__originalOpacity__}),this.render()},d=()=>{this.isDragging||l()},h=()=>{this.isDragging||c()};for(const f of a)this.domEvents.addEventListener(f,"mouseover",d),this.domEvents.addEventListener(f,"mouseout",h),this.hooks.on("moveStart",l),this.hooks.on("moveEnd",c),this.hooks.on("rotateEnd",c),o.push(()=>{this.domEvents.removeEventListener(f,"mouseover",d),this.domEvents.removeEventListener(f,"mouseout",h),this.hooks.off("moveStart",l),this.hooks.off("moveEnd",c),this.hooks.off("rotateEnd",c)})}return()=>o.forEach(r=>r==null?void 0:r())}getIntersectObject(t){const e=this.camera.position,i=this.helperObject3D;if(!i)return;const s=this.helperObject3D.raycasterIntersectObject(t)[0];if(!s)return;const o=s;if(o.object=i,this.model.intersectRaycaster){const r=this.model.intersectRaycaster(t)[0];if(r&&r.point.distanceTo(e)<o.point.distanceTo(e))return}return o.object}calculateOffset(t,e){const i=this.originObject3D,s=new k.Vector3(0,0,0);if(!t)return s;const o=()=>e||(this.boundingBox?this.boundingBox:(this.boundingBox=Pf(i),this.boundingBox));if(typeof t.x=="number")s.setX(t.x);else if(typeof t.x=="object"){const r=o();s.setX((r.max.x-r.min.x)*t.x.percents)}if(typeof t.y=="number")s.setY(t.y);else if(typeof t.y=="object"){const r=o();s.setY((r.max.y-r.min.y)*t.y.percents)}if(typeof t.z=="number")s.setZ(t.z);else if(typeof t.z=="object"){const r=o();s.setZ((r.max.z-r.min.z)*t.z.percents)}return s}}class q2 extends as{constructor(...e){super(...e);u(this,"name","MoveController");u(this,"startInfo");u(this,"_moveByMouse",{enabled:!1});u(this,"mouseInfo");u(this,"mousedownEventListenerDisposer");const i=this.helperObject3D;this.hoverListener([i.xArrow,i.yArrow,i.zArrow]);const s=this.dragStart.bind(this),o=this.dragging.bind(this),r=this.dragEnd.bind(this),a=this.show.bind(this),l=this.hide.bind(this);this.domEvents.addEventListener(this.helperObject3D,"mousedown",s),document.addEventListener("mousemove",o),document.addEventListener("mouseup",r),this.hooks.on("rotateStart",l),this.hooks.on("rotateEnd",a),this.hooks.on("moveByMouseEnable",l),this.hooks.on("moveByMouseDisable",a),this.disposers.push(()=>{this.domEvents.removeEventListener(this.helperObject3D,"mousedown",s),document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",r),this.hooks.off("rotateStart",l),this.hooks.off("rotateEnd",a),this.hooks.off("moveByMouseEnable",l),this.hooks.off("moveByMouseDisable",a)}),this.moveByMouseEnable&&this.moveByMouse()}get moveByMouseEnable(){return this._moveByMouse.enabled}dispose(){var e;super.dispose(),(e=this.disposers)==null||e.forEach(i=>i==null?void 0:i())}moveByMouse(e){this._moveByMouse={enabled:!0,useFaceNormal:e==null?void 0:e.useFaceNormal},this.preventTapDefaultEvent=!0;const i=this.handleMouseDown.bind(this),s=this.handleMouseUp.bind(this);this.hooks.emit("moveByMouseEnable"),setTimeout(()=>{this.container.addEventListener("mousedown",i),this.container.addEventListener("mouseup",s)}),this.mousedownEventListenerDisposer=()=>{this.container.removeEventListener("mousedown",i),this.container.removeEventListener("mouseup",s)}}disableMoveByMouse(){var e;this._moveByMouse={enabled:!1},this.preventTapDefaultEvent=!1,this.hooks.emit("moveByMouseDisable"),(e=this.mousedownEventListenerDisposer)==null||e.call(this)}onIntersectionOnModelUpdate(e){var r,a,l;if(!this.moveByMouseEnable)return;const{point:i,face:s}=e;if(!this.hooks.emit("wantToMove",i)){if(this.originObject3D.position.copy(i),(this._moveByMouse.useFaceNormal===!0||typeof this._moveByMouse.useFaceNormal=="object"&&this._moveByMouse.useFaceNormal.enable!==!1)&&s!=null&&s.normal){const c=(()=>typeof this._moveByMouse.useFaceNormal=="object"&&this._moveByMouse.useFaceNormal.alignmentVector?this._moveByMouse.useFaceNormal.alignmentVector:{x:0,y:1,z:0})(),d=new k.Vector3((r=c.x)!=null?r:0,(a=c.y)!=null?a:0,(l=c.z)!=null?l:0),h=(()=>typeof this._moveByMouse.useFaceNormal=="object"&&this._moveByMouse.useFaceNormal.fixedFaceNormal?this._moveByMouse.useFaceNormal.fixedFaceNormal(s.normal):s.normal)();this.originObject3D.quaternion.setFromUnitVectors(d,h),this.internalHooks.emit("setObjectRotate",this.originObject3D.quaternion.clone())}this.internalHooks.emit("setObjectPosition",i),this.hooks.emit("move",i)}}handleMouseDown(e){const{x:i,y:s}=e;this.mouseInfo={x:i,y:s,mouseDownTimestamp:Date.now()}}handleMouseUp(e){if(!this.mouseInfo)return;const{x:i,y:s}=e;this.mouseInfo.x===i&&this.mouseInfo.y===s&&Date.now()-this.mouseInfo.mouseDownTimestamp<500&&(this.disableMoveByMouse(),this.mouseInfo=void 0)}dragStart(e){if(this.moveByMouseEnable||this.isDragging)return;const i=e==null?void 0:e.intersect;if(!i)return this.dragEnd();const s=(i==null?void 0:i.object).direction;if(!s)return this.dragEnd();const o=new k.Vector3(1,0,0).applyQuaternion(this.helperObject3D.quaternion),r=new k.Vector3(0,1,0).applyQuaternion(this.helperObject3D.quaternion),a=new k.Vector3(0,0,1).applyQuaternion(this.helperObject3D.quaternion),l=(()=>{switch(s){case"x":return o;case"y":return r;case"z":return a}})(),c=(()=>{switch(s){case"x":case"y":return a;case"z":return o}})(),d=i.point.clone(),h=new k.Plane;h.setFromNormalAndCoplanarPoint(c,d),this.startInfo={startVectorProject:d.clone().projectOnVector(l),directionVector:l,plane:h},this.helperObject3D.showDraggingHelper([s]),this.hooks.emit("moveStart"),this.isDragging=!0}dragging(e){if(!this.isDragging||!this.startInfo)return;const i=ua(this.camera,e,this.container);return i?(this.move(i),!1):this.dragEnd()}move(e){if(!this.startInfo)return this.dragEnd();const{plane:i,directionVector:s,startVectorProject:o}=this.startInfo,r=this.originObject3D,a=e.ray.intersectPlane(i,new k.Vector3);if(!a)return;const l=a.clone().projectOnVector(s),c=l.clone().sub(o),d=new k.Matrix4;d.setPosition(c);const h=r.position.clone().applyMatrix4(d);this.hooks.emit("wantToMove",h)||(r.applyMatrix4(d),o.copy(l),this.internalHooks.emit("applyObjectPosition",{matrix:d}),this.hooks.emit("move",h))}dragEnd(){this.isDragging&&(this.startInfo=void 0,this.isDragging=!1,this.helperObject3D.show(),this.hooks.emit("moveEnd"))}}class ls{constructor(t,e,i,s,o,r,a){u(this,"helperController");u(this,"five");u(this,"onFiveWantsTapGesture",t=>{if(!this.helperController)return;if(this.helperController.preventTapDefaultEvent)return!1;const e=this.helperController.onWantsTapGesture(t);return this.five.needsRender=!0,e});u(this,"onFiveWantsGesture",(...t)=>{if(!this.helperController)return;const e=this.helperController.onWantsGesture(...t);return this.five.needsRender=!0,e});u(this,"onFiveIntersectionOnModelUpdate",(...t)=>{this.helperController&&this.helperController.onIntersectionOnModelUpdate(...t)});const{camera:l,model:c,scene:d}=t,h=t.getElement();if(this.five=t,!l||!c||!h||!d)return;const f=()=>{t.needsRender=!0};this.helperController=new e({camera:l,model:c,originObject3D:i,helperObject3D:s,container:h,scene:d,onRender:f,sharedHooks:r,sharedInternalHooks:a},o),t.on("wantsTapGesture",this.onFiveWantsTapGesture),t.on("wantsGesture",this.onFiveWantsGesture),t.on("intersectionOnModelUpdate",this.onFiveIntersectionOnModelUpdate)}dispose(){var t;this.five.off("wantsTapGesture",this.onFiveWantsTapGesture),this.five.off("wantsGesture",this.onFiveWantsGesture),this.five.off("intersectionOnModelUpdate",this.onFiveIntersectionOnModelUpdate),(t=this.helperController)==null||t.dispose()}}const pa="Object3DHelper@v1.0.1",K2=()=>{console.error(`${pa} is disposed`)},$2=()=>{console.warn(`${pa} is disabled`)},ek=()=>{console.error(`${pa} is disabled`)};class tk{constructor(t){u(this,"controllers",{});u(this,"state",{visible:!0,enabled:!0,disposed:!1});u(this,"hooks",new Ei);u(this,"eventListener",{});t&&this.addControllers(t),this.setState(this.state)}show(t){return W(this,null,function*(){this.setState({visible:!0},t)})}hide(t){return W(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 K2();if(!this.state.enabled&&t.enabled!==!0&&t.disposed!==!0)return ek();const i=V({},this.state);this.state=V(V({},this.state),t),t.disposed!==void 0&&t.disposed!==i.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:i})}addControllers(t){this.controllers=V(V({},this.controllers),t),this.setState(this.state)}getCurrentState(){return this.state}handleEnable(t,e=!0){t?(this.everyControllerDo(i=>{i.enable()}),this.hooks.emit("enable",{userAction:e})):(this.everyControllerDo(i=>{i.disable()}),this.hooks.emit("disable",{userAction:e})),this.state.enabled=t}handleVisible(t,e=!0){t?(this.everyControllerDo(i=>{i.show()}),this.actionIfStateIsEnabled(()=>this.hooks.emit("show",{userAction:e}))):(this.everyControllerDo(i=>{i.hide()}),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(i=>{i==null||i.dispose()});for(const i in this.controllers){if(!i)continue;const s=i;(e=(t=this.eventListener)[s])==null||e.call(t)}}actionIfStateIsEnabled(t,e){if(this.state.enabled)return t();e!=null&&e.warnLog&&$2()}}function Aa(n){return n*Math.PI/180}class ik extends as{constructor(...e){var c,d,h;super(...e);u(this,"name","RotateController");u(this,"startInfo");u(this,"removeListener");const i=this.helperObject3D;this.hoverListener([(c=i.xCircle)==null?void 0:c.circle,(d=i.yCircle)==null?void 0:d.circle,(h=i.zCircle)==null?void 0:h.circle].filter(Boolean));const s=this.dragStart.bind(this),o=this.dragging.bind(this),r=this.dragEnd.bind(this),a=this.show.bind(this),l=this.hide.bind(this);this.domEvents.addEventListener(this.helperObject3D,"mousedown",s),document.addEventListener("mousemove",o),document.addEventListener("mouseup",r),this.hooks.on("moveStart",l),this.hooks.on("moveEnd",a),this.hooks.on("moveByMouseEnable",l),this.hooks.on("moveByMouseDisable",a),this.removeListener=()=>{this.domEvents.removeEventListener(this.helperObject3D,"mousedown",s),document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",r),this.hooks.off("moveStart",l),this.hooks.off("moveEnd",a),this.hooks.off("moveByMouseEnable",l),this.hooks.off("moveByMouseDisable",a)}}get rotateCenter(){return this.helperObject3D.position.clone()}initialHelperQuaternion(){this.helperObject3D.applyHelperQuaternion(this.originObject3D.quaternion)}setRotateAngle(e){const{x:i=0,y:s=0,z:o=0}=e,r=new k.Euler(Aa(i),Aa(s),Aa(o)),a=new k.Quaternion().setFromEuler(r);if(this.hooks.emit("wantToRotate",a))return;const{originObject3D:c,rotateCenter:d}=this;wf(c,a,d),this.internalHooks.emit("setObjectRotate",a,d),this.hooks.emit("rotate",a),this.render()}dispose(){this.removeListener(),super.dispose()}onApplyOriginObjectRotate(e){this.isDragging||super.onApplyOriginObjectRotate(e)}onApplyOriginObjectScale(e){}dragStart(e){if(this.isDragging)return;const i=e==null?void 0:e.intersect;if(!i)return this.dragEnd();const s=(i==null?void 0:i.object).direction;if(!s)return this.dragEnd();const o=i.point,r=this.getAngleHelper(s);this.setTipsAngle(0);const a=o.clone();a.y+=.2,this.setTipsPosition(a);const l=(()=>{if(s==="x")return new k.Vector3(1,0,0).applyQuaternion(this.originObject3D.quaternion);if(s==="y")return new k.Vector3(0,1,0).applyQuaternion(this.originObject3D.quaternion);if(s==="z")return new k.Vector3(0,0,1).applyQuaternion(this.originObject3D.quaternion)})(),c=new k.Plane().setFromNormalAndCoplanarPoint(l,o),h=c.projectPoint(o.clone(),new k.Vector3).clone().sub(this.rotateCenter),f=h.angleTo(r.baseAxes.clone().applyQuaternion(this.originObject3D.quaternion));this.setAngleHelperStart(s,f),this.setAngleHelperLength(s,0),this.startInfo={direction:s,startVector:h,plane:c,angleHelper:r,angle:0,objectQuaternion:this.originObject3D.quaternion.clone()},this.helperObject3D.showDraggingHelper([s]),this.hooks.emit("rotateStart"),this.isDragging=!0}dragging(e){if(!this.isDragging)return;const i=ua(this.camera,e,this.container);return i?(this.rotate(i),!1):this.dragEnd()}rotate(e){if(!this.startInfo)return this.dragEnd();const{startVector:i,plane:s,angleHelper:o,direction:r,objectQuaternion:a}=this.startInfo,{originObject3D:l}=this,c=e.ray.intersectPlane(s,new k.Vector3);if(!c)return;const d=this.rotateCenter.clone(),f=s.projectPoint(c.clone(),new k.Vector3).clone().sub(d);if(i.angleTo(f)===0)return;const m=new k.Quaternion().setFromUnitVectors(i.clone().normalize(),f.clone().normalize()),A=l.quaternion.clone().premultiply(m);if(this.hooks.emit("wantToRotate",A))return;const v=new k.Euler().setFromQuaternion(new k.Quaternion().setFromUnitVectors(i.clone().normalize().applyQuaternion(a.clone().inverse()),f.clone().normalize().applyQuaternion(a.clone().inverse())),`${r.toUpperCase()}${"XZY".replace(r.toUpperCase(),"")}`)[r]*o.angleDirection;if(this.startInfo.angle+=v,this.setAngleHelperLength(r,this.startInfo.angle),this.setTipsAngle(Ec(this.startInfo.angle)),d){const y=new k.Vector3().subVectors(l.position,d).applyQuaternion(m).add(d);l.position.copy(y)}l.applyQuaternion(m),this.internalHooks.emit("applyObjectRotate",{quaternion:m,origin:d}),this.hooks.emit("rotate",l.quaternion),this.startInfo.startVector=f}dragEnd(){this.isDragging&&(this.internalHooks.emit("setObjectRotate",this.originObject3D.quaternion,this.rotateCenter),this.startInfo=void 0,this.isDragging=!1,this.helperObject3D.show(),this.hooks.emit("rotateEnd"))}getAngleHelper(e){var i,s,o;switch(e){case"x":return(i=this.helperObject3D.xCircle)==null?void 0:i.angleSector;case"y":return(s=this.helperObject3D.yCircle)==null?void 0:s.angleSector;case"z":return(o=this.helperObject3D.zCircle)==null?void 0:o.angleSector}}setAngleHelperStart(e,i){const s=this.getAngleHelper(e);if(!s){console.warn("angleHelper is undefined");return}if(s instanceof k.Mesh&&s.geometry instanceof k.CircleGeometry){const{radius:o,segments:r,thetaLength:a}=s.geometry.parameters;s.geometry=new k.CircleGeometry(o,r,i,a)}else console.warn("only support THREE.CircleGeometry")}setAngleHelperLength(e,i){const o=i>=0?Math.max(i,.001):Math.min(i,-.001),r=this.getAngleHelper(e);if(r instanceof k.Mesh&&r.geometry instanceof k.CircleGeometry){const{radius:a,thetaStart:l}=r.geometry.parameters,c=Math.ceil(Math.abs(o)*(40/(2*Math.PI)));r.geometry=new k.CircleGeometry(a,c,l,o)}else console.warn("only support THREE.CircleGeometry")}setTipsAngle(e){var s;const i=(s=this.helperObject3D.angleTips)==null?void 0:s.element;i&&(i.innerText=`${e.toFixed(0)}°`)}setTipsPosition(e){const i=this.helperObject3D.angleTips;if(!i)return;const s=e.project(this.camera),{x:o,y:r,z:a}=s;if(a>1)return;const l=(o+1)/2*100+"%",c=(-r+1)/2*100+"%";i.setLeftTop(l,c)}}class nk extends as{constructor(...e){super(...e);u(this,"startInfo");u(this,"name","RectangleScaleController")}enable(){this.helperObject3D.enable(),super.enable()}disable(){this.helperObject3D.disable(),super.disable()}show(){this.helperObject3D.show(),super.show()}hide(){this.helperObject3D.hide(),super.hide()}onApplyOriginObjectPosition(e){this.isDragging||super.onApplyOriginObjectPosition(e)}onApplyOriginObjectScale(e){this.helperObject3D.applyHelperScaleMatrix4(e.matrix,e.origin)}getDragPlane(){const e=new k.Plane,i=this.helperObject3D.cornerPositions;if(i.length!==0)return i.length<3?e.setFromNormalAndCoplanarPoint(this.originObject3D.getWorldDirection(new G.Vector3),i[0]):e.setFromCoplanarPoints(i[0],i[1],i[2]),e}dragStart(e,i){var o,r;(r=(o=this.helperObject3D).updatePoints)==null||r.call(o);const s=this.getDragPlane();if(!s)return this.dragEnd();this.startInfo={startPoint:{position:i.position.clone(),direction:i.direction},plane:s},this.hooks.emit("scaleStart"),this.render(),this.isDragging=!0}dragging(e){if(!this.isDragging)return;const i=ua(this.camera,e,this.container);if(!i)return this.dragEnd();this.scale(i)}scale(e){var U,H;if(!this.startInfo)return;const i=this.originObject3D,{startPoint:s,plane:o}=this.startInfo,r=this.helperObject3D.cornerPositions;if(r.length<4)return this.dragEnd();const a=e.ray.intersectPlane(o,new G.Vector3);if(!a||Q2(a,this.camera.position))return;const l=new G.Vector3().addVectors(r[0],r[2]).divideScalar(2),{position:c,direction:d}=s,h=new G.Vector3().subVectors(r[1],r[0]),f=new G.Vector3().subVectors(r[3],r[0]),m=N=>{const F=new G.Vector3(0,0,0);if(!this.startInfo)return F;const Q=(N==="ew"?h:f).clone(),_=c.clone().projectOnVector(Q),Y=a.clone().projectOnVector(Q),Z=l.clone().projectOnVector(Q);if(Y.equals(_))return F;if(N==="ns"&&typeof this.startInfo.dragPointInCenterBottom!="boolean"){const fe=new G.Vector3().subVectors(Y,Z),de=fe.x<0&&Q.x>=0,ke=fe.y<0&&Q.y>=0,Pe=fe.z<0&&Q.z>=0;this.startInfo.dragPointInCenterBottom=de||ke||Pe}if(N==="ew"&&typeof this.startInfo.dragPointInCenterLeft!="boolean"){const fe=new G.Vector3().subVectors(Y,Z),de=fe.x<0&&Q.x>=0,ke=fe.y<0&&Q.y>=0,Pe=fe.z<0&&Q.z>=0;this.startInfo.dragPointInCenterLeft=de||ke||Pe}const q=new G.Vector3().subVectors(Y,_),ee=q.length();return ee>.3?(console.warn("offset.length() > 0.3, skipped",ee),F):q},A=m("ew"),p=m("ns"),g=()=>{const N=A;this.helperObject3D.cornerPositions.forEach((F,Q)=>{var _;(_=this.startInfo)!=null&&_.dragPointInCenterLeft?(Q===0||Q===3)&&F.add(N):(Q===1||Q===2)&&F.add(N)})},v=()=>{const N=p;this.helperObject3D.cornerPositions.forEach((F,Q)=>{var _;(_=this.startInfo)!=null&&_.dragPointInCenterBottom?(Q===0||Q===1)&&F.add(N):(Q===2||Q===3)&&F.add(N)})};switch(d){case"ew":g();break;case"ns":v();break;case"nesw":case"nwse":g(),v()}const y=new G.Vector3().subVectors(r[1],r[0]).length()/h.length(),P=new G.Vector3().subVectors(r[3],r[0]).length()/f.length(),I=new G.Vector3(y,P,1),E=new k.Matrix4().scale(I);i.isCSS3DObjectPlus?i.applyScaleMatrix4(E):i.scale.applyMatrix4(E),s.position.copy(a);const C=new G.Vector3().addVectors(r[0],r[2]).divideScalar(2),z=new G.Vector3().subVectors(C,l),R=new k.Matrix4().setPosition(z);i.applyMatrix4(R),(U=this.helperObject3D.css3DInstance)==null||U.css3DObject.applyMatrix4(R),(H=this.helperObject3D.plane)==null||H.applyMatrix4(R),this.internalHooks.emit("applyObjectScale",{matrix:E}),this.internalHooks.emit("applyObjectPosition",{matrix:R}),this.render()}dragEnd(){this.isDragging&&(this.startInfo=void 0,this.isDragging=!1,this.hooks.emit("scaleEnd"),this.render())}}class sk extends nk{constructor(...e){super(...e);u(this,"name","CSS3DScaleController");this.addHTMLEventListener()}addHTMLEventListener(){this.helperObject3D.points.forEach(e=>{if(!e)return;const i=e.point,s=a=>this.dragStart(a,e),o=this.dragging.bind(this),r=this.dragEnd.bind(this);i.addEventListener("dragstart",s),i.addEventListener("drag",o),i.addEventListener("dragend",r)})}}class ok extends as{constructor(...e){super(...e);u(this,"name","BoundingBoxController")}}class rk extends Cf{constructor(t){super(t)}}class ak extends as{constructor(...e){super(...e);u(this,"name","ScaleController")}setScale(e){var l,c,d;let i=1,s=1,o=1;typeof e=="number"?(i=e,s=e,o=e):typeof e=="object"&&(i=(l=e.x)!=null?l:1,s=(c=e.y)!=null?c:1,o=(d=e.z)!=null?d:1);const r=new k.Vector3(i,s,o);this.hooks.emit("wantToScale",r)||(this.originObject3D.scale.copy(r),this.internalHooks.emit("setObjectScale",r),this.hooks.emit("scale",r),this.render())}}const va="Object3DHelperPlugin",Eo=va,lk=()=>{console.error(`${Eo} is disposed`)},ck=()=>{console.warn(`${Eo} is disabled`)},dk=()=>{console.error(`${Eo} is disabled`)};class kf extends Ti{constructor(e){super(e);u(this,"name",va);u(this,"state",{visible:!0,enabled:!0,disposed:!1});u(this,"objectHelperMap",new Map);u(this,"css3DObjectParentMap",new Map);u(this,"css3DRender");this.five=e,this.css3DRender=new $i(this.five.scene),console.warn("Object3DHelper: 使用此插件,需要在初始化five时,设置five参数: { backgroundAlpha: 0, backgroundColor: 0x000000 }"),Object.assign(window,{[`__${va.toUpperCase()}_DEBUG__`]:this})}show(e){return W(this,null,function*(){this.setState({visible:!0},e)})}hide(e){return W(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,i){if(this.state.disposed)return lk();if(!this.state.enabled&&e.enabled!==!0&&e.disposed!==!0)return dk();const s=V({},this.state);this.state=V(V({},this.state),e),e.disposed!==void 0&&e.disposed!==s.disposed&&e.disposed&&this.handleDispose(),e.visible!==void 0&&e.visible!==s.visible&&this.handleVisible(e.visible),e.enabled!==void 0&&e.enabled!==s.enabled&&this.handleEnable(e.enabled),this.hooks.emit("stateChange",{state:this.state,prevState:s})}getObject3DHelper(e){return this.objectHelperMap.get(e)}addObject3DHelper(e,i={}){var p;if(!e){console.error("Object3D is undefined");return}if(this.objectHelperMap.has(e)){console.warn(`Object3DHelperPlugin: object3D ${e.name} is already has helper`);return}const s=new tk,o=[],r=(p=this.five.getElement())==null?void 0:p.parentElement,a=this.five.camera,{moveHelper:l=!0,rotateHelper:c=!0,scaleHelper:d=!0,boundingBoxHelper:h=!1}=i,f=new Ae.Subscribe,m=new Ae.Subscribe,A=g=>{if(g)return typeof g=="boolean"?g:g.enable};if(A(l)){const g=this.getConfig(i.moveHelper),v=new G2(e,V({},g)),y=new ls(this.five,q2,e,v,g,f,m);s.addControllers({moveController:y.helperController}),o.push(()=>y.dispose())}if(A(c)){const g=this.getConfig(i.rotateHelper),v=new _2(e,V({container:r},g)),y=new ls(this.five,ik,e,v,g,f,m);s.addControllers({rotateController:y.helperController}),o.push(()=>y.dispose())}if(A(h)){const g=new J2(e),v=new ls(this.five,ok,e,g,void 0,f,m);s.addControllers({boundingBoxController:v.helperController})}if(A(d))if(e.isCSS3DObjectPlus&&r){const g=new X2(e,r,a,this.five.scene),v=new ls(this.five,sk,e,g,void 0,f,m);s.addControllers({scaleController:v.helperController}),o.push(()=>v.dispose()),yl(this.five).then(()=>{var y,P;if(e.isCSS3DObjectPlus){const I=e;if(!I||I.mode!=="front")return;const E=(y=this.css3DRender.behindModeCSS3DRenderer.wrapper)!=null?y:wl(this.five);E&&(this.css3DObjectParentMap.set(I,I.parent),I.removeFromParent(),this.css3DRender.behindModeCSS3DRenderer.setWrapper(E),(P=this.css3DRender.getBehindCSS3DObjectGroup())==null||P.add(I),this.css3DRender.render(this.five.camera))}})}else{const g=new rk(e),v=new ls(this.five,ak,e,g,void 0,f,m);s.addControllers({scaleController:v.helperController}),o.push(()=>v.dispose())}return this.objectHelperMap.set(e,{helper:s,disposers:o}),s.controllers}removeObject3DHelper(e){if(!this.objectHelperMap.has(e))return;const{helper:i,disposers:s}=this.objectHelperMap.get(e);if(i){if(e.isCSS3DObjectPlus){const o=e,r=this.css3DObjectParentMap.get(o);r&&r.add(o),this.css3DRender.render(this.five.camera)}this.objectHelperMap.delete(e),i.dispose(),s==null||s.forEach(o=>o==null?void 0:o())}}handleEnable(e,i=!0){e?(this.everyHelperDo(s=>s.enable()),this.hooks.emit("enable",{userAction:i})):(this.everyHelperDo(s=>s.disable()),this.hooks.emit("disable",{userAction:i})),this.state.enabled=e}handleVisible(e,i=!0){e?(this.everyHelperDo(s=>s.show()),this.actionIfStateIsEnabled(()=>this.hooks.emit("show",{userAction:i}))):(this.everyHelperDo(s=>s.hide()),this.actionIfStateIsEnabled(()=>this.hooks.emit("hide",{userAction:i}))),this.state.visible=e}handleDispose(){this.everyHelperDo((e,i)=>{e.dispose(),i==null||i.forEach(s=>s==null?void 0:s())})}everyHelperDo(e){this.objectHelperMap.forEach(({helper:i,disposers:s})=>{i&&e(i,s)})}actionIfStateIsEnabled(e,i){if(this.state.enabled)return e();i!=null&&i.warnLog&&ck()}getConfig(e){if(e&&typeof e!="boolean"&&e.enable)return e}}const hk=n=>new kf(n),uk=`
690
690
  varying vec2 vUv;
691
691
  void main() {
692
692
  vUv = uv;