@realsee/dnalogel 2.1.2-alpha.0 → 2.1.2-alpha.10

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 (494) hide show
  1. package/README.md +3 -12
  2. package/dist/CSS3DRenderPlugin/index..js +88 -0
  3. package/dist/CSS3DRenderPlugin/index.cjs.js +1 -0
  4. package/dist/CameraMovementPlugin/index..js +11 -0
  5. package/dist/CameraMovementPlugin/index.cjs.js +1 -0
  6. package/dist/CruisePlugin/index..js +527 -0
  7. package/dist/CruisePlugin/index.cjs.js +1 -0
  8. package/dist/GuideLinePlugin/index..js +214 -0
  9. package/dist/GuideLinePlugin/index.cjs.js +1 -0
  10. package/dist/ItemLabelPlugin/index..js +508 -0
  11. package/dist/ItemLabelPlugin/index.cjs.js +10 -0
  12. package/dist/ModelChassisCompassPlugin/index..js +9 -0
  13. package/dist/ModelChassisCompassPlugin/index.cjs.js +1 -0
  14. package/dist/ModelEntryDoorGuidePlugin/index..js +9 -0
  15. package/dist/ModelEntryDoorGuidePlugin/index.cjs.js +1 -0
  16. package/dist/ModelItemLabelPlugin/index..js +334 -0
  17. package/dist/ModelItemLabelPlugin/index.cjs.js +10 -0
  18. package/dist/ModelRoomLabelPlugin/index..js +274 -0
  19. package/dist/ModelRoomLabelPlugin/index.cjs.js +1 -0
  20. package/dist/ModelTVVideoPlugin/index..js +12 -0
  21. package/dist/ModelTVVideoPlugin/index.cjs.js +1 -0
  22. package/dist/ModelViewPlugin/index..js +8 -0
  23. package/dist/ModelViewPlugin/index.cjs.js +1 -0
  24. package/dist/Object3DHelperPlugin/index..js +1414 -0
  25. package/dist/Object3DHelperPlugin/index.cjs.js +1 -0
  26. package/dist/PanoCompassPlugin/index..js +258 -0
  27. package/dist/PanoCompassPlugin/index.cjs.js +1 -0
  28. package/dist/PanoCursorRaycasterPlugin/index..js +63 -0
  29. package/dist/PanoCursorRaycasterPlugin/index.cjs.js +1 -0
  30. package/dist/PanoDoorLabelPlugin/index..js +340 -0
  31. package/dist/PanoDoorLabelPlugin/index.cjs.js +1 -0
  32. package/dist/PanoMeasurePlugin/index..js +15 -0
  33. package/dist/PanoMeasurePlugin/index.cjs.js +1 -0
  34. package/dist/PanoRulerPlugin/index..js +9 -0
  35. package/dist/PanoRulerPlugin/index.cjs.js +1 -0
  36. package/dist/PanoRulerProPlugin/index..js +395 -0
  37. package/dist/PanoRulerProPlugin/index.cjs.js +1 -0
  38. package/dist/PanoSpatialTagPlugin/index..js +15 -0
  39. package/dist/PanoSpatialTagPlugin/index.cjs.js +1 -0
  40. package/dist/PanoTagPlugin/index..js +4522 -0
  41. package/dist/PanoTagPlugin/index.cjs.js +17 -0
  42. package/dist/chunks/cjs/BasePlugin.57e5204f.cjs.js +1 -0
  43. package/dist/chunks/cjs/BasePluginWithData.0a28882d.cjs.js +1 -0
  44. package/dist/chunks/cjs/CSS3DRender.15349564.cjs.js +1 -0
  45. package/dist/chunks/cjs/CameraMovementPlugin.2b342576.cjs.js +1 -0
  46. package/dist/chunks/cjs/Plugin.5f616fb3.cjs.js +1 -0
  47. package/dist/chunks/cjs/Plugin.609da4aa.cjs.js +94 -0
  48. package/dist/chunks/cjs/Plugin.67936d0e.cjs.js +16 -0
  49. package/dist/chunks/cjs/Plugin.8a110c53.cjs.js +1 -0
  50. package/dist/chunks/cjs/Plugin.9971108a.cjs.js +1 -0
  51. package/dist/chunks/cjs/Plugin.fd42bf8a.cjs.js +1 -0
  52. package/dist/chunks/cjs/Subscribe.5398d5c6.cjs.js +1 -0
  53. package/dist/chunks/cjs/changeModelCanvasOpacity.8d84f111.cjs.js +1 -0
  54. package/dist/chunks/cjs/correctFiveState.4c8472bd.cjs.js +1 -0
  55. package/dist/chunks/cjs/debounce.93dfb637.cjs.js +1 -0
  56. package/dist/chunks/cjs/equal.e9fcbd4e.cjs.js +1 -0
  57. package/dist/chunks/cjs/filter.cf9ebbb3.cjs.js +1 -0
  58. package/dist/chunks/cjs/formatData.81e95011.cjs.js +10 -0
  59. package/dist/chunks/cjs/index.30b7baeb.cjs.js +101 -0
  60. package/dist/chunks/cjs/index.686e84d1.cjs.js +290 -0
  61. package/dist/chunks/cjs/index.7d2010ce.cjs.js +1 -0
  62. package/dist/chunks/cjs/isNil.b3a58990.cjs.js +1 -0
  63. package/dist/chunks/cjs/planimetry.7fce816a.cjs.js +1 -0
  64. package/dist/chunks/cjs/throttle.86c209eb.cjs.js +1 -0
  65. package/dist/chunks/cjs/transfromToMeshBasicMaterial.9db6d46a.cjs.js +1 -0
  66. package/dist/chunks/cjs/uuid.29ed9c88.cjs.js +1 -0
  67. package/dist/chunks/es/BasePlugin.813e25f7.es.js +18 -0
  68. package/dist/chunks/es/BasePluginWithData.4bf4e649.es.js +6 -0
  69. package/dist/chunks/es/CSS3DRender.5652510e.es.js +393 -0
  70. package/dist/chunks/es/CameraMovementPlugin.4a7c3e46.es.js +120 -0
  71. package/dist/chunks/es/Plugin.26c2df05.es.js +106 -0
  72. package/dist/chunks/es/Plugin.435485ed.es.js +584 -0
  73. package/dist/chunks/es/Plugin.a98418f0.es.js +82 -0
  74. package/dist/chunks/es/Plugin.ae4ee6f8.es.js +82 -0
  75. package/dist/chunks/es/Plugin.dd11e0ad.es.js +180 -0
  76. package/dist/chunks/es/Plugin.f4cf895f.es.js +355 -0
  77. package/dist/chunks/es/Subscribe.c73e0f91.es.js +50 -0
  78. package/dist/chunks/es/changeModelCanvasOpacity.45ef9fd6.es.js +1551 -0
  79. package/dist/chunks/es/correctFiveState.e7feab9f.es.js +66 -0
  80. package/dist/chunks/es/debounce.ef83f417.es.js +11 -0
  81. package/dist/chunks/es/equal.7db4a6f7.es.js +56 -0
  82. package/dist/chunks/es/filter.97ec06c4.es.js +12 -0
  83. package/dist/chunks/es/formatData.a2b39ef9.es.js +483 -0
  84. package/dist/chunks/es/index.a273f06e.es.js +532 -0
  85. package/dist/chunks/es/index.b8fdb59b.es.js +50 -0
  86. package/dist/chunks/es/index.f74f4851.es.js +1787 -0
  87. package/dist/chunks/es/isNil.212842d9.es.js +10 -0
  88. package/dist/chunks/es/planimetry.b0b4a28d.es.js +43 -0
  89. package/dist/chunks/es/throttle.db66bac3.es.js +11 -0
  90. package/dist/chunks/es/transfromToMeshBasicMaterial.849ee069.es.js +24 -0
  91. package/dist/chunks/es/uuid.676cb2c8.es.js +9 -0
  92. package/dist/components/PaintBrush/index..js +6 -0
  93. package/dist/components/PaintBrush/index.cjs.js +1 -0
  94. package/dist/components/index..js +7 -0
  95. package/dist/components/index.cjs.js +1 -0
  96. package/dist/floorplan/MapviewFloorplanPlugin/index..js +324 -0
  97. package/dist/floorplan/MapviewFloorplanPlugin/index.cjs.js +1 -0
  98. package/dist/floorplan/ModelFloorplanPlugin/index..js +320 -0
  99. package/dist/floorplan/ModelFloorplanPlugin/index.cjs.js +1 -0
  100. package/dist/floorplan/PanoFloorplanRadarPlugin/index..js +613 -0
  101. package/dist/floorplan/PanoFloorplanRadarPlugin/index.cjs.js +1 -0
  102. package/dist/floorplan/TopviewFloorplanPlugin/index..js +277 -0
  103. package/dist/floorplan/TopviewFloorplanPlugin/index.cjs.js +1 -0
  104. package/dist/index..js +530 -0
  105. package/dist/index.cjs.js +3 -543
  106. package/docs/classes/CruisePluginController.html +24 -24
  107. package/docs/classes/Magnifier.html +16 -16
  108. package/docs/classes/ModelRoomLabelController.html +11 -11
  109. package/docs/classes/Object3DHelperController.html +24 -24
  110. package/docs/classes/PaintBrush.html +15 -15
  111. package/docs/classes/PanoTagPluginController.html +39 -39
  112. package/docs/classes/Util.BetterTween.html +8 -8
  113. package/docs/classes/Util.FivePointSelector.html +12 -12
  114. package/docs/classes/Util.Interval.html +12 -12
  115. package/docs/classes/Util.Magnifier.html +17 -17
  116. package/docs/classes/Util.PointDomHelper.html +11 -11
  117. package/docs/classes/Util.PointHelper.html +11 -11
  118. package/docs/classes/Util.Rectangle.html +13 -13
  119. package/docs/enums/CameraMovementEffect.html +7 -7
  120. package/docs/enums/ContentType.html +12 -12
  121. package/docs/enums/DIRECTION.html +9 -9
  122. package/docs/enums/DISPLAY_STRATEGY_TYPE.html +9 -9
  123. package/docs/enums/DimensionType.html +7 -7
  124. package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +8 -8
  125. package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +9 -9
  126. package/docs/enums/LinkType.html +7 -7
  127. package/docs/enums/PaintBrushTypeEnum.html +8 -8
  128. package/docs/enums/PointType.html +7 -7
  129. package/docs/enums/Rotation.html +8 -8
  130. package/docs/functions/CSS3DRenderPlugin.html +4 -4
  131. package/docs/functions/CameraMovementPlugin.html +4 -4
  132. package/docs/functions/CruisePlugin.html +4 -4
  133. package/docs/functions/GuideLinePlugin.html +5 -5
  134. package/docs/functions/ItemLabelPlugin.html +4 -4
  135. package/docs/functions/MapviewFloorplanPlugin.html +4 -4
  136. package/docs/functions/ModelChassisCompassPlugin.html +4 -4
  137. package/docs/functions/ModelEntryDoorGuidePlugin.html +4 -4
  138. package/docs/functions/ModelFloorplanPlugin.html +4 -4
  139. package/docs/functions/ModelItemLabelPlugin.html +4 -4
  140. package/docs/functions/ModelRoomLabelPlugin.html +4 -4
  141. package/docs/functions/ModelTVVideoPlugin.html +4 -4
  142. package/docs/functions/ModelViewPlugin.html +4 -4
  143. package/docs/functions/Object3DHelperPlugin.html +4 -4
  144. package/docs/functions/PanoCompassPlugin.html +4 -4
  145. package/docs/functions/PanoCursorRaycasterPlugin.html +4 -4
  146. package/docs/functions/PanoDoorLabelPlugin.html +4 -4
  147. package/docs/functions/PanoFloorplanRadarPlugin.html +4 -4
  148. package/docs/functions/PanoMeasurePlugin.html +4 -4
  149. package/docs/functions/PanoRulerPlugin.html +4 -4
  150. package/docs/functions/PanoRulerProPlugin.html +4 -4
  151. package/docs/functions/PanoSpatialTagPlugin.html +4 -4
  152. package/docs/functions/PanoTagPlugin.html +4 -4
  153. package/docs/functions/TopviewFloorplanPlugin.html +4 -4
  154. package/docs/functions/Util.getCoordsFromClient.html +5 -5
  155. package/docs/functions/Util.getCoordsFromElement.html +5 -5
  156. package/docs/functions/Util.getFrameTime.html +5 -5
  157. package/docs/functions/Util.getIntersectFromRelativePosition.html +5 -5
  158. package/docs/functions/Util.getRaycasterFromFivePointer.html +5 -5
  159. package/docs/functions/Util.isNil.html +5 -5
  160. package/docs/functions/Util.nextFrame.html +5 -5
  161. package/docs/functions/Util.notNil.html +5 -5
  162. package/docs/functions/Util.requestAnimationFrameInterval.html +5 -5
  163. package/docs/functions/Util.tweenProgress.html +5 -5
  164. package/docs/functions/pluginFlag.html +5 -5
  165. package/docs/index.html +6 -11
  166. package/docs/interfaces/CSS3DRenderPluginEventMap.html +11 -11
  167. package/docs/interfaces/CSS3DRenderPluginState.html +8 -8
  168. package/docs/interfaces/CameraMovementPluginExportType.html +7 -7
  169. package/docs/interfaces/ContentTypeMap.html +12 -12
  170. package/docs/interfaces/FloorplanBounding.html +8 -8
  171. package/docs/interfaces/FloorplanData.html +10 -10
  172. package/docs/interfaces/FloorplanEntrance.html +11 -11
  173. package/docs/interfaces/FloorplanExtraObject.html +10 -10
  174. package/docs/interfaces/FloorplanExtraObject3D.html +8 -8
  175. package/docs/interfaces/FloorplanFloorData.html +9 -9
  176. package/docs/interfaces/FloorplanImagePosition.html +7 -7
  177. package/docs/interfaces/FloorplanObserver.html +9 -9
  178. package/docs/interfaces/FloorplanOutlineItem.html +9 -9
  179. package/docs/interfaces/FloorplanPosition.html +7 -7
  180. package/docs/interfaces/FloorplanRoomItem.html +13 -13
  181. package/docs/interfaces/FloorplanRoomLabelItem.html +7 -7
  182. package/docs/interfaces/FloorplanServerBounding.html +8 -8
  183. package/docs/interfaces/FloorplanServerComputedData.html +10 -10
  184. package/docs/interfaces/FloorplanServerData.html +7 -7
  185. package/docs/interfaces/FloorplanServerDoorItem.html +10 -10
  186. package/docs/interfaces/FloorplanServerDoorPosition.html +8 -8
  187. package/docs/interfaces/FloorplanServerEntrance.html +11 -11
  188. package/docs/interfaces/FloorplanServerFloorData.html +9 -9
  189. package/docs/interfaces/FloorplanServerImagePosition.html +7 -7
  190. package/docs/interfaces/FloorplanServerObserver.html +9 -9
  191. package/docs/interfaces/FloorplanServerOutlineItem.html +9 -9
  192. package/docs/interfaces/FloorplanServerPosition.html +7 -7
  193. package/docs/interfaces/FloorplanServerRoomItem.html +14 -14
  194. package/docs/interfaces/FloorplanServerRoomLabelItem.html +7 -7
  195. package/docs/interfaces/ItemLabelPluginData.html +6 -6
  196. package/docs/interfaces/ItemLabelPluginExportReturnsType.html +11 -11
  197. package/docs/interfaces/ItemLabelPluginParametersType.html +9 -9
  198. package/docs/interfaces/LineJson.html +7 -7
  199. package/docs/interfaces/ModelChassisCompassPluginData.html +7 -7
  200. package/docs/interfaces/ModelChassisCompassPluginExportType.html +8 -8
  201. package/docs/interfaces/ModelChassisCompassPluginParameterType.html +7 -7
  202. package/docs/interfaces/ModelEntryDoorGuidePluginData.html +8 -8
  203. package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +8 -8
  204. package/docs/interfaces/ModelItemLabelPluginData.html +6 -6
  205. package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +11 -11
  206. package/docs/interfaces/ModelItemLabelPluginParametersType.html +7 -7
  207. package/docs/interfaces/ModelRoomLabelPluginData.html +6 -6
  208. package/docs/interfaces/ModelTVVideoPluginData.html +9 -9
  209. package/docs/interfaces/ModelTVVideoPluginExportType.html +8 -8
  210. package/docs/interfaces/ModelTVVideoPluginParameterType.html +6 -6
  211. package/docs/interfaces/ModelViewPluginExportType.html +8 -8
  212. package/docs/interfaces/Object3DHelperState.html +8 -8
  213. package/docs/interfaces/OpenParameter.html +7 -7
  214. package/docs/interfaces/PaintBrushAction.html +12 -12
  215. package/docs/interfaces/PaintBrushConfigs.html +12 -12
  216. package/docs/interfaces/PaintBrushState.html +10 -10
  217. package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +10 -10
  218. package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +5 -5
  219. package/docs/interfaces/PanoMeasureParameterType.html +11 -11
  220. package/docs/interfaces/PanoRulerPluginExportType.html +10 -10
  221. package/docs/interfaces/PanoRulerPluginOptions.html +7 -7
  222. package/docs/interfaces/PanoRulerPluginParameterType.html +8 -8
  223. package/docs/interfaces/PanoRulerProPluginExportType.html +9 -9
  224. package/docs/interfaces/PanoRulerProPluginOptions.html +7 -7
  225. package/docs/interfaces/PanoRulerProPluginParameterType.html +7 -7
  226. package/docs/interfaces/PanoRulerProPluginState.html +8 -8
  227. package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +5 -5
  228. package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +5 -5
  229. package/docs/interfaces/PanoSpatialTagPluginData.html +11 -11
  230. package/docs/interfaces/PanoSpatialTagPluginDataElement.html +10 -10
  231. package/docs/interfaces/PanoSpatialTagPluginExportType.html +13 -13
  232. package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +10 -10
  233. package/docs/interfaces/PanoSpatialTagPluginParameterType.html +13 -13
  234. package/docs/interfaces/PanoSpatialTagPluginPointElement.html +11 -11
  235. package/docs/interfaces/PanoSpatialTagPluginTagElement.html +10 -10
  236. package/docs/interfaces/Point.html +8 -8
  237. package/docs/interfaces/PointJson.html +8 -8
  238. package/docs/interfaces/Room.html +9 -9
  239. package/docs/interfaces/RoomInfo.html +7 -7
  240. package/docs/interfaces/RoomLabel.html +14 -14
  241. package/docs/interfaces/RoomRules.html +5 -5
  242. package/docs/interfaces/Rooms.html +5 -5
  243. package/docs/interfaces/Scissor.html +9 -9
  244. package/docs/interfaces/TagConfig.html +10 -10
  245. package/docs/interfaces/Tags.html +9 -9
  246. package/docs/interfaces/Util.MagnifierParameter.html +11 -11
  247. package/docs/interfaces/Util.MouseGroupParameter.html +8 -8
  248. package/docs/modules/Util.html +5 -5
  249. package/docs/modules.html +4 -4
  250. package/docs/types/ArrayPosition.html +5 -5
  251. package/docs/types/CSS3DRenderExportType.html +5 -5
  252. package/docs/types/CSS3DRenderPluginExportType.html +5 -5
  253. package/docs/types/CSS3DRenderPluginParameterType.html +5 -5
  254. package/docs/types/Color.html +5 -5
  255. package/docs/types/ContentTypeConfigKey.html +5 -5
  256. package/docs/types/ContentTypeConfigKeyArray.html +5 -5
  257. package/docs/types/Create3DDomContainerReturnType.html +5 -5
  258. package/docs/types/Create3DElementReturnType.html +5 -5
  259. package/docs/types/CruisePluginExportType.html +5 -5
  260. package/docs/types/Direction-1.html +5 -5
  261. package/docs/types/Direction4.html +5 -5
  262. package/docs/types/FloorplanRuleLabels.html +5 -5
  263. package/docs/types/FloorplanServerRuleLabels.html +5 -5
  264. package/docs/types/GuideLinePluginExportType.html +5 -5
  265. package/docs/types/HelperEventMap.html +5 -5
  266. package/docs/types/MapviewFloorplanPluginParameterType.html +5 -5
  267. package/docs/types/MapviewFloorplanPluginReturnType.html +5 -5
  268. package/docs/types/MediaData.html +5 -5
  269. package/docs/types/ModelEntryDoorGuidePluginParameterType.html +5 -5
  270. package/docs/types/ModelFloorplanPluginParameterType.html +5 -5
  271. package/docs/types/ModelFloorplanPluginReturnType.html +5 -5
  272. package/docs/types/ModelRoomLabelPluginParameters.html +5 -5
  273. package/docs/types/ModelRoomLabelPluginReturnType.html +5 -5
  274. package/docs/types/MoveArgs.html +5 -5
  275. package/docs/types/MoveOpts.html +5 -5
  276. package/docs/types/Object3DHelperEventMap.html +5 -5
  277. package/docs/types/ObjectFit.html +5 -5
  278. package/docs/types/PaintBrushEventMap.html +5 -5
  279. package/docs/types/PanoCompassPluginData.html +5 -5
  280. package/docs/types/PanoCompassPluginExportType.html +5 -5
  281. package/docs/types/PanoCompassPluginParameterType.html +5 -5
  282. package/docs/types/PanoFloorplanRadarPluginParameterType.html +5 -5
  283. package/docs/types/PanoFloorplanRadarPluginReturnType.html +5 -5
  284. package/docs/types/PanoMeasurePluginEvent.html +5 -5
  285. package/docs/types/PanoMeasureReturnType.html +5 -5
  286. package/docs/types/PanoSpatialTagPluginId.html +5 -5
  287. package/docs/types/PanoTagPluginExportInterface.html +5 -5
  288. package/docs/types/PanoTagPluginParamsInterface.html +5 -5
  289. package/docs/types/PlaneTag.html +5 -5
  290. package/docs/types/PointTag.html +5 -5
  291. package/docs/types/Position.html +5 -5
  292. package/docs/types/RotateArgs.html +5 -5
  293. package/docs/types/RotateOpts.html +5 -5
  294. package/docs/types/RuleLabelsKey.html +5 -5
  295. package/docs/types/RuleLabelsValue.html +5 -5
  296. package/docs/types/Tag.html +5 -5
  297. package/docs/types/Tag2D.html +5 -5
  298. package/docs/types/Tag3D.html +5 -5
  299. package/docs/types/TagId.html +5 -5
  300. package/docs/types/TopviewFloorplanPluginParameterType.html +5 -5
  301. package/docs/types/TopviewFloorplanPluginReturnType.html +5 -5
  302. package/docs/variables/FLOOR_TYPE_MAP.html +5 -5
  303. package/docs/variables/PLUGIN.html +5 -5
  304. package/docs/variables/ROOM_FETILE_TYPE_MAP.html +5 -5
  305. package/docs/variables/ROOM_TYPE_MAP.html +5 -5
  306. package/docs/variables/VERSION.html +5 -5
  307. package/docs/variables/itemLabelPluginServerParams.html +5 -5
  308. package/docs/variables/modelItemLabelPluginServerParams.html +5 -5
  309. package/docs/variables/modelRoomLabelPluginServerParams.html +5 -5
  310. package/libs/CSS3DRenderPlugin/CSS3DRender.js +1 -5
  311. package/libs/CSS3DRenderPlugin/Controller.js +6 -7
  312. package/libs/CSS3DRenderPlugin/index.js +3 -4
  313. package/libs/CSS3DRenderPlugin/typing.js +1 -0
  314. package/libs/CSS3DRenderPlugin/utils/CSS3DObjectPlus.js +1 -3
  315. package/libs/CSS3DRenderPlugin/utils/index.js +1 -0
  316. package/libs/CSS3DRenderPlugin/utils/positionToVector3.js +1 -2
  317. package/libs/CSS3DRenderPlugin/utils/random.js +1 -0
  318. package/libs/CameraMovementPlugin/CameraMovementPlugin.js +16 -17
  319. package/libs/CameraMovementPlugin/index.js +3 -0
  320. package/libs/CruisePlugin/Controller.js +4 -4
  321. package/libs/CruisePlugin/index.js +3 -6
  322. package/libs/CruisePlugin/utils/linerValue.js +4 -4
  323. package/libs/GuideLinePlugin/Controller.js +3 -4
  324. package/libs/GuideLinePlugin/index.js +3 -4
  325. package/libs/GuideLinePlugin/utils/getLineGeometries.js +1 -1
  326. package/libs/ItemLabelPlugin/ItemLabelComponent.js +34 -32
  327. package/libs/ItemLabelPlugin/Plugin.js +5 -6
  328. package/libs/ModelChassisCompassPlugin/Plugin.js +3 -4
  329. package/libs/ModelChassisCompassPlugin/index.js +2 -0
  330. package/libs/ModelEntryDoorGuidePlugin/Plugin.js +22 -23
  331. package/libs/ModelEntryDoorGuidePlugin/index.js +2 -0
  332. package/libs/ModelItemLabelPlugin/ItemLabelComponent.js +4 -3
  333. package/libs/ModelItemLabelPlugin/ModelItemLabelPlugin.js +5 -6
  334. package/libs/ModelItemLabelPlugin/events.type.js +1 -0
  335. package/libs/ModelRoomLabelPlugin/RoomLabelItems.js +11 -10
  336. package/libs/ModelRoomLabelPlugin/index.js +0 -1
  337. package/libs/ModelTVVideoPlugin/Plugin.js +1 -2
  338. package/libs/ModelTVVideoPlugin/index.js +2 -0
  339. package/libs/ModelViewPlugin/Plugin.js +1 -2
  340. package/libs/ModelViewPlugin/index.js +2 -0
  341. package/libs/Object3DHelperPlugin/FiveControllerWrapper.js +6 -7
  342. package/libs/Object3DHelperPlugin/index.js +1 -6
  343. package/libs/PanoCompassPlugin/index.js +3 -4
  344. package/libs/PanoCursorRaycasterPlugin/index.js +7 -8
  345. package/libs/PanoDoorLabelPlugin/index.js +1 -2
  346. package/libs/PanoMeasurePlugin/Controller/BaseController.js +3 -3
  347. package/libs/PanoMeasurePlugin/Controller/EditController.js +5 -5
  348. package/libs/PanoMeasurePlugin/Controller/MixedController.js +17 -17
  349. package/libs/PanoMeasurePlugin/Controller/ViewController.js +3 -3
  350. package/libs/PanoMeasurePlugin/Controller/WatchController.js +9 -9
  351. package/libs/PanoMeasurePlugin/Controller/index.js +8 -8
  352. package/libs/PanoMeasurePlugin/Model/index.js +3 -3
  353. package/libs/PanoMeasurePlugin/Model/line.js +11 -11
  354. package/libs/PanoMeasurePlugin/Model/point.js +7 -7
  355. package/libs/PanoMeasurePlugin/Model/polyline.js +1 -1
  356. package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.js +1 -1
  357. package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.js +1 -1
  358. package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.js +1 -1
  359. package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.js +4 -4
  360. package/libs/PanoMeasurePlugin/Modules/FiveHelper.js +3 -3
  361. package/libs/PanoMeasurePlugin/Modules/Magnifier.js +30 -30
  362. package/libs/PanoMeasurePlugin/Modules/UIController/HTML.js +2 -2
  363. package/libs/PanoMeasurePlugin/Modules/UIController/Revoke/index.js +2 -2
  364. package/libs/PanoMeasurePlugin/Modules/UIController/index.js +3 -3
  365. package/libs/PanoMeasurePlugin/Modules/UIController/mobileHTML.js +1 -1
  366. package/libs/PanoMeasurePlugin/Modules/rangePiece/html.js +3 -4
  367. package/libs/PanoMeasurePlugin/Modules/rangePiece/index.js +5 -5
  368. package/libs/PanoMeasurePlugin/index.js +3 -4
  369. package/libs/PanoMeasurePlugin/utils/calculateThreeMouse.js +1 -1
  370. package/libs/PanoMeasurePlugin/utils/distanceDom.js +1 -1
  371. package/libs/PanoMeasurePlugin/utils/findClosestPoint.js +2 -2
  372. package/libs/PanoMeasurePlugin/utils/isNDCPointInScreen.js +3 -3
  373. package/libs/PanoMeasurePlugin/utils/line.js +0 -1
  374. package/libs/PanoMeasurePlugin/utils/math.js +1 -2
  375. package/libs/PanoMeasurePlugin/utils/ndc2Screen.js +2 -2
  376. package/libs/PanoRulerPlugin/Plugin.js +2 -3
  377. package/libs/PanoRulerPlugin/index.js +2 -0
  378. package/libs/PanoRulerPlugin/style.js +1 -1
  379. package/libs/PanoRulerProPlugin/Controller.js +15 -15
  380. package/libs/PanoRulerProPlugin/RulerItems.js +7 -4
  381. package/libs/PanoRulerProPlugin/index.js +3 -4
  382. package/libs/PanoSpatialTagPlugin/Components/origins.js +3 -2
  383. package/libs/PanoSpatialTagPlugin/Components/tag.js +3 -2
  384. package/libs/PanoSpatialTagPlugin/Plugin.js +2 -3
  385. package/libs/PanoSpatialTagPlugin/index.js +6 -0
  386. package/libs/PanoSpatialTagPlugin/typings.js +1 -0
  387. package/libs/PanoTagPlugin/Components/Common/Line/Polyline.js +1 -1
  388. package/libs/PanoTagPlugin/Components/Common/Line/Straight.js +1 -1
  389. package/libs/PanoTagPlugin/Components/Common/Media.js +43 -36
  390. package/libs/PanoTagPlugin/Components/Common/MultiLineText.js +88 -78
  391. package/libs/PanoTagPlugin/Components/Common/Point/CustomPoint.js +5 -4
  392. package/libs/PanoTagPlugin/Components/Common/Point/DefaultPoint.js +3 -2
  393. package/libs/PanoTagPlugin/Components/Common/Point/PointSwitch.js +30 -27
  394. package/libs/PanoTagPlugin/Components/Common/TextItem.js +106 -0
  395. package/libs/PanoTagPlugin/Components/Tag/AudioTag.js +20 -14
  396. package/libs/PanoTagPlugin/Components/Tag/ImageTextTag.js +114 -92
  397. package/libs/PanoTagPlugin/Components/Tag/LinkTag.js +3 -2
  398. package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +3 -2
  399. package/libs/PanoTagPlugin/Components/Tag/MediaPlane.js +71 -52
  400. package/libs/PanoTagPlugin/Components/Tag/TextTag.js +62 -50
  401. package/libs/PanoTagPlugin/Components/Tag/index.js +92 -63
  402. package/libs/PanoTagPlugin/Components/TagContainer.js +108 -64
  403. package/libs/PanoTagPlugin/Components/TagWrapper.js +113 -75
  404. package/libs/PanoTagPlugin/controller/index.js +0 -1
  405. package/libs/PanoTagPlugin/index.js +3 -7
  406. package/libs/PanoTagPlugin/tag.config.js +1 -2
  407. package/libs/PanoTagPlugin/typings/controller.js +1 -0
  408. package/libs/PanoTagPlugin/typings/index.js +1 -0
  409. package/libs/PanoTagPlugin/utils/constants.js +1 -2
  410. package/libs/PanoTagPlugin/utils/doUtil.js +6 -6
  411. package/libs/PanoTagPlugin/utils/index.js +1 -0
  412. package/libs/components/PaintBrush/Controller.js +3 -3
  413. package/libs/components/PaintBrush/style.js +1 -1
  414. package/libs/components/PaintBrush/tween.js +4 -4
  415. package/libs/components/index.js +2 -0
  416. package/libs/floorplan/Components/Camera.js +1 -1
  417. package/libs/floorplan/Components/CurrentFloor.js +51 -41
  418. package/libs/floorplan/Components/Main.js +41 -22
  419. package/libs/floorplan/Components/RoomHighlight/Room.js +3 -3
  420. package/libs/floorplan/Components/RoomHighlight/RoomHighlight.js +3 -2
  421. package/libs/floorplan/Components/RoomLabels/RoomLabels.js +37 -36
  422. package/libs/floorplan/Components/RoomMaterials/RoomMaterial.js +1 -1
  423. package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +7 -7
  424. package/libs/floorplan/MapviewFloorplanPlugin/index.js +3 -4
  425. package/libs/floorplan/ModelFloorplanPlugin/Controller.js +7 -7
  426. package/libs/floorplan/ModelFloorplanPlugin/index.js +2 -3
  427. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.js +1 -1
  428. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.js +6 -2
  429. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.js +74 -65
  430. package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +2 -2
  431. package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +2 -3
  432. package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +5 -5
  433. package/libs/floorplan/TopviewFloorplanPlugin/index.js +3 -4
  434. package/libs/floorplan/index.js +6 -0
  435. package/libs/floorplan/typings/floorplanData.js +1 -0
  436. package/libs/floorplan/utils/correctFiveState.js +19 -19
  437. package/libs/floorplan/utils/formatData.js +16 -16
  438. package/libs/floorplan/utils/formatPosition.js +7 -7
  439. package/libs/index.js +344 -90
  440. package/libs/shared-utils/Object3DHelper/Base/BaseController.js +2 -3
  441. package/libs/shared-utils/Object3DHelper/Base/BaseHelper.js +1 -3
  442. package/libs/shared-utils/Object3DHelper/Constants/color.js +0 -1
  443. package/libs/shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js +1 -2
  444. package/libs/shared-utils/Object3DHelper/Helper/index.js +3 -0
  445. package/libs/shared-utils/Object3DHelper/typings/Direction.js +1 -0
  446. package/libs/shared-utils/Object3DHelper/typings/Hooks.js +1 -0
  447. package/libs/shared-utils/Object3DHelper/typings/Scissor.js +1 -0
  448. package/libs/shared-utils/Object3DHelper/typings/index.js +1 -0
  449. package/libs/shared-utils/Object3DHelper/utils/filterNotColinearPoints.js +1 -0
  450. package/libs/shared-utils/Object3DHelper/utils/getPoint.js +1 -0
  451. package/libs/shared-utils/Object3DHelper/utils/index.js +1 -0
  452. package/libs/shared-utils/Object3DHelper/utils/normalPositionToPositions.js +1 -0
  453. package/libs/shared-utils/Object3DHelper/utils/object3DBoundingPosition.js +1 -0
  454. package/libs/shared-utils/Object3DHelper/utils/threex/domevents/index.js +1 -1
  455. package/libs/shared-utils/animationFrame/index.js +13 -16
  456. package/libs/shared-utils/animationFrame/tween.js +0 -2
  457. package/libs/shared-utils/changeModelCanvasOpacity.js +1 -1
  458. package/libs/shared-utils/createCanvasTextTexture.js +6 -6
  459. package/libs/shared-utils/createLine/index.js +3 -3
  460. package/libs/shared-utils/debounce.js +5 -5
  461. package/libs/shared-utils/equal.js +16 -16
  462. package/libs/shared-utils/filter.js +1 -1
  463. package/libs/shared-utils/five/changeMode.js +14 -14
  464. package/libs/shared-utils/getPxmm.js +7 -8
  465. package/libs/shared-utils/index.js +33 -29
  466. package/libs/shared-utils/isTruelyObject.js +1 -1
  467. package/libs/shared-utils/math/index.js +1 -0
  468. package/libs/shared-utils/math/planimetry.js +1 -6
  469. package/libs/shared-utils/math/rad2Deg.js +3 -3
  470. package/libs/shared-utils/nearlyEqual.js +3 -3
  471. package/libs/shared-utils/noop.js +1 -1
  472. package/libs/shared-utils/object3d2LocalMatrix.js +6 -7
  473. package/libs/shared-utils/removeArrayItem.js +5 -5
  474. package/libs/shared-utils/tap.js +3 -3
  475. package/libs/shared-utils/three/index.js +6 -0
  476. package/libs/shared-utils/three/transformPositionToVector3.js +2 -2
  477. package/libs/shared-utils/three/transfromToMeshBasicMaterial.js +12 -12
  478. package/libs/shared-utils/throttle.js +2 -2
  479. package/libs/shared-utils/tinyEJSrender.js +7 -7
  480. package/libs/shared-utils/to.js +14 -15
  481. package/libs/shared-utils/uuid.js +0 -1
  482. package/libs/{node_modules/.pnpm/swiper@8.4.4/node_modules → vendor}/swiper/components-shared/get-changed-params.js +0 -0
  483. package/libs/{node_modules/.pnpm/swiper@8.4.4/node_modules → vendor}/swiper/components-shared/get-params.js +0 -0
  484. package/libs/{node_modules/.pnpm/swiper@8.4.4/node_modules → vendor}/swiper/components-shared/mount-swiper.js +0 -0
  485. package/libs/{node_modules/.pnpm/swiper@8.4.4/node_modules → vendor}/swiper/components-shared/params-list.js +0 -0
  486. package/libs/{node_modules/.pnpm/swiper@8.4.4/node_modules → vendor}/swiper/components-shared/update-swiper.js +0 -0
  487. package/libs/{node_modules/.pnpm/swiper@8.4.4/node_modules → vendor}/swiper/components-shared/utils.js +0 -0
  488. package/libs/{node_modules/.pnpm/swiper@8.4.4/node_modules → vendor}/swiper/svelte/swiper-slide.js +1 -1
  489. package/libs/vendor/swiper/svelte/swiper-svelte.js +3 -0
  490. package/libs/{node_modules/.pnpm/swiper@8.4.4/node_modules → vendor}/swiper/svelte/swiper.js +1 -1
  491. package/package.json +19 -17
  492. package/dist/index.es.js +0 -16650
  493. package/dist/index.js +0 -16650
  494. package/dist/index.umd.js +0 -556
@@ -0,0 +1,10 @@
1
+ function t(n) {
2
+ return !i(n);
3
+ }
4
+ function i(n) {
5
+ return n != null;
6
+ }
7
+ export {
8
+ t as isNil,
9
+ i as notNil
10
+ };
@@ -0,0 +1,43 @@
1
+ function I(r, x) {
2
+ return r.x === x.x && r.y === x.y;
3
+ }
4
+ function N(r, x) {
5
+ return Math.abs(r) === 1 / 0 && Math.abs(x) === 1 / 0 ? !0 : Math.abs(r - x) < 1e-3;
6
+ }
7
+ function m(r, x) {
8
+ return (x.y - r.y) / (x.x - r.x);
9
+ }
10
+ function O(r, x, f) {
11
+ const u = m(r[1], r[0]), y = m(x[1], x[0]);
12
+ if (isNaN(u) || isNaN(y) || N(u, y))
13
+ return !1;
14
+ if (h(r[0], x))
15
+ return r[0];
16
+ if (h(r[1], x))
17
+ return r[1];
18
+ if (h(x[0], r))
19
+ return x[0];
20
+ if (h(x[1], r))
21
+ return x[1];
22
+ if (f && !L(r, x))
23
+ return !1;
24
+ const a = r[0], c = x[0];
25
+ if (Math.abs(u) === 1 / 0)
26
+ return { x: a.x, y: x[1].y - (x[1].x - a.x) * y };
27
+ if (Math.abs(y) === 1 / 0)
28
+ return { x: c.x, y: r[1].y - (r[1].x - c.x) * u };
29
+ const b = (c.y - a.y + u * a.x - y * c.x) / (u - y), K = u * b - u * a.x + a.y;
30
+ return { x: b, y: K };
31
+ }
32
+ function h(r, x) {
33
+ return I(r, x[0]) || I(r, x[1]) ? !0 : (x[0].x - r.x) * (r.x - x[1].x) >= 0 && (x[0].y - r.y) * (r.y - x[1].y) >= 0 && N(m(x[0], r), m(r, x[1]));
34
+ }
35
+ function M(r, x, f) {
36
+ return (r.x - f.x) * (x.y - f.y) - (x.x - f.x) * (r.y - f.y);
37
+ }
38
+ function L(r, x) {
39
+ return Math.max(r[0].x, r[1].x) >= Math.min(x[0].x, x[1].x) && Math.max(x[0].x, x[1].x) >= Math.min(r[0].x, r[1].x) && Math.max(r[0].y, r[1].y) >= Math.min(x[0].y, x[1].y) && M(x[0], r[1], r[0]) * M(r[1], x[1], r[0]) > 0 && M(r[0], x[1], x[0]) * M(x[1], r[1], x[0]) > 0 ? 1 : 0;
40
+ }
41
+ export {
42
+ O as intersectionOfLine
43
+ };
@@ -0,0 +1,11 @@
1
+ function o(n, e = 200) {
2
+ let t;
3
+ return function(...u) {
4
+ t || (n(...u), t = setTimeout(function() {
5
+ t = null;
6
+ }, e));
7
+ };
8
+ }
9
+ export {
10
+ o as throttle
11
+ };
@@ -0,0 +1,24 @@
1
+ var p = Object.defineProperty;
2
+ var i = Object.getOwnPropertySymbols;
3
+ var d = Object.prototype.hasOwnProperty, f = Object.prototype.propertyIsEnumerable;
4
+ var s = (a, e, r) => e in a ? p(a, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : a[e] = r, m = (a, e) => {
5
+ for (var r in e || (e = {}))
6
+ d.call(e, r) && s(a, r, e[r]);
7
+ if (i)
8
+ for (var r of i(e))
9
+ f.call(e, r) && s(a, r, e[r]);
10
+ return a;
11
+ };
12
+ import { MeshBasicMaterial as M } from "three";
13
+ function O(a, e) {
14
+ a.traverse((r) => {
15
+ var n;
16
+ if (r.type === "Mesh") {
17
+ const t = r, o = m({ map: t.material.map || {} }, e);
18
+ t.material = new M(o), t.renderOrder = 1, ((n = r.parent) == null ? void 0 : n.type) === "Mesh" && (r.renderOrder = r.parent.renderOrder + 1);
19
+ }
20
+ });
21
+ }
22
+ export {
23
+ O as transfromToMeshBasicMaterial
24
+ };
@@ -0,0 +1,9 @@
1
+ function t() {
2
+ return ((1 + Math.random()) * 65536 | 0).toString(16).substring(1);
3
+ }
4
+ function r() {
5
+ return (t() + t() + "-" + t() + "-4" + t().substr(0, 3) + "-" + t() + "-" + t() + t() + t()).toLowerCase();
6
+ }
7
+ export {
8
+ r as uuid
9
+ };
@@ -0,0 +1,6 @@
1
+ import { PaintBrush as m } from "../../chunks/es/index.a273f06e.es.js";
2
+ import "@tweenjs/tween.js";
3
+ import "../../chunks/es/uuid.676cb2c8.es.js";
4
+ export {
5
+ m as PaintBrush
6
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../chunks/cjs/index.30b7baeb.cjs.js");require("@tweenjs/tween.js");require("../../chunks/cjs/uuid.29ed9c88.cjs.js");exports.PaintBrush=e.PaintBrush;
@@ -0,0 +1,7 @@
1
+ import { PaintBrush as o, PaintBrushTypeEnum as p } from "../chunks/es/index.a273f06e.es.js";
2
+ import "@tweenjs/tween.js";
3
+ import "../chunks/es/uuid.676cb2c8.es.js";
4
+ export {
5
+ o as PaintBrush,
6
+ p as PaintBrushTypeEnum
7
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../chunks/cjs/index.30b7baeb.cjs.js");require("@tweenjs/tween.js");require("../chunks/cjs/uuid.29ed9c88.cjs.js");exports.PaintBrush=e.PaintBrush;exports.PaintBrushTypeEnum=e.PaintBrushTypeEnum;
@@ -0,0 +1,324 @@
1
+ var F = Object.defineProperty, E = Object.defineProperties;
2
+ var C = Object.getOwnPropertyDescriptors;
3
+ var g = Object.getOwnPropertySymbols;
4
+ var P = Object.prototype.hasOwnProperty, y = Object.prototype.propertyIsEnumerable;
5
+ var v = (r, o, t) => o in r ? F(r, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[o] = t, l = (r, o) => {
6
+ for (var t in o || (o = {}))
7
+ P.call(o, t) && v(r, t, o[t]);
8
+ if (g)
9
+ for (var t of g(o))
10
+ y.call(o, t) && v(r, t, o[t]);
11
+ return r;
12
+ }, m = (r, o) => E(r, C(o));
13
+ var s = (r, o, t) => (v(r, typeof o != "symbol" ? o + "" : o, t), t);
14
+ var c = (r, o, t) => new Promise((e, i) => {
15
+ var n = (d) => {
16
+ try {
17
+ a(t.next(d));
18
+ } catch (u) {
19
+ i(u);
20
+ }
21
+ }, h = (d) => {
22
+ try {
23
+ a(t.throw(d));
24
+ } catch (u) {
25
+ i(u);
26
+ }
27
+ }, a = (d) => d.done ? e(d.value) : Promise.resolve(d.value).then(n, h);
28
+ a((t = t.apply(r, o)).next());
29
+ });
30
+ import * as x from "three";
31
+ import { checkShowState as I, FloorplanErrorType as f, to as M, correctFiveState as L, SHOW_ANIME_DURATION as _ } from "../../chunks/es/correctFiveState.e7feab9f.es.js";
32
+ import { equal as D } from "../../chunks/es/equal.7db4a6f7.es.js";
33
+ import { FLOOR_PLAN_ATTACHED_TO as O, getPxmm as T, getAttachedY as k, changeModelCanvasOpacity as b, Main as B } from "../../chunks/es/changeModelCanvasOpacity.45ef9fd6.es.js";
34
+ import { CAMERA_IMAGE as H, formatData as S } from "../../chunks/es/formatData.a2b39ef9.es.js";
35
+ import { omit as R } from "../../chunks/es/filter.97ec06c4.es.js";
36
+ import { Controller as G } from "../../chunks/es/BasePluginWithData.4bf4e649.es.js";
37
+ import "svelte/internal";
38
+ import "svelte/easing";
39
+ import "svelte/transition";
40
+ import "svelte/store";
41
+ import "svelte";
42
+ import "../../chunks/es/BasePlugin.813e25f7.es.js";
43
+ import "../../chunks/es/Subscribe.c73e0f91.es.js";
44
+ function W(r) {
45
+ const { latitude: o, longitude: t } = r, e = Math.abs(o - Math.PI / 2) > 5 * Math.PI / 180, i = t > 5 * (Math.PI / 180) && t < 355 * (Math.PI / 180);
46
+ return e || i;
47
+ }
48
+ function z(r) {
49
+ const { latitude: o, longitude: t } = r, e = Math.abs(o - Math.PI / 2) < 10 * Math.PI / 180, i = t < 30 * (Math.PI / 180) || t > 330 * (Math.PI / 180);
50
+ return e && i;
51
+ }
52
+ class N extends G {
53
+ constructor(t, e) {
54
+ super(t);
55
+ s(this, "name", "modelFloorplanPlugin");
56
+ s(this, "state");
57
+ s(this, "data");
58
+ s(this, "showState");
59
+ s(this, "showPromise");
60
+ s(this, "app");
61
+ s(this, "panoIndex", 0);
62
+ s(this, "floorIndex", 0);
63
+ s(this, "selector");
64
+ s(this, "showRejection");
65
+ s(this, "wrapper");
66
+ s(this, "container", document.createElement("div"));
67
+ s(this, "lastPanoramaLongitude", 0);
68
+ s(this, "size", { width: 0, height: 0 });
69
+ s(this, "hasAddedEventListener", !1);
70
+ s(this, "isHiddenByHideFunc", !1);
71
+ s(this, "dispose", () => {
72
+ var t, e;
73
+ this.removeEventListener(), (t = this.app) == null || t.$destroy(), this.app = void 0, (e = this.container) == null || e.remove(), this.data = void 0, this.wrapper = void 0, this.selector = void 0, this.hooks.emit("dispose");
74
+ });
75
+ s(this, "show", (...e) => c(this, [...e], function* (t = {}) {
76
+ if (!this.state.enabled || !this.showPromise && this.state.visible)
77
+ return;
78
+ const i = t.userAction !== void 0 ? t.userAction : !0;
79
+ this.updateState({ visible: !0 }, i), this._show(t);
80
+ }));
81
+ s(this, "hide", (...e) => c(this, [...e], function* (t = {}) {
82
+ !this.state.enabled || (this.isHiddenByHideFunc = !0, this.state.visible !== !1 && (this.updateState({ visible: !1 }, t.userAction || !0), this._hide(t)));
83
+ }));
84
+ s(this, "updateSize", () => {
85
+ if (!this.data || !I(this.five, this.showState) || !this.container || !this.wrapper)
86
+ return;
87
+ const { min: t, max: e } = this.data.bounding, i = e.x - t.x, n = e.y - t.y, h = this.state.config.attachedTo ? { attachedTo: this.state.config.attachedTo } : void 0, a = T(this.five, this.wrapper, this.floorIndex, h), d = Math.ceil(i * a), u = Math.ceil(n * a);
88
+ this.size.width === d && this.size.height === u || (this.container.style.width = d + "px", this.container.style.height = u + "px", this.size = { width: d, height: u });
89
+ });
90
+ s(this, "_disable", (t) => {
91
+ var i, n, h;
92
+ const { userAction: e } = t;
93
+ this.hooks.emit("disable", { userAction: e }), (i = this.showRejection) == null || i.call(this, f.BreakOffByDisable), this.showPromise = void 0, (n = this.app) == null || n.$destroy(), this.app = void 0, (h = this.container) == null || h.remove(), this.removeEventListener();
94
+ });
95
+ s(this, "_enable", (t) => {
96
+ const { userAction: e } = t;
97
+ this.addEventListener(), this.wrapper && (this.wrapper.append(this.container), this.hooks.emit("enable", { userAction: e }), this.state.visible && this._show({ userAction: e }));
98
+ });
99
+ s(this, "_show", (t) => c(this, null, function* () {
100
+ var h;
101
+ if (!this.state.enabled)
102
+ return;
103
+ if (!((h = this.five.model) != null && h.loaded))
104
+ throw new Error(f.ModelNotLoaded);
105
+ if (!this.data)
106
+ throw new Error(f.DataNotLoaded);
107
+ this.isHiddenByHideFunc = !1;
108
+ const e = {
109
+ floorIndex: this.floorIndex,
110
+ modelOpacity: this.state.config.modelOpacity,
111
+ immediately: !1,
112
+ isAutoShow: !1,
113
+ userAction: !0
114
+ }, i = l(l({}, e), t), n = () => c(this, null, function* () {
115
+ this.hooks.emit("show", { userAction: i.userAction, auto: i.isAutoShow });
116
+ let a = !1, d;
117
+ this.showRejection = (A) => {
118
+ a = !0, d = A;
119
+ };
120
+ const [u] = yield M(L(this.five, this.showState, i.userAction));
121
+ if (u)
122
+ throw u;
123
+ if (a)
124
+ throw d ? new Error(d) : new Error(f.UnknownError);
125
+ this.updateSize(), this.updatePosition(), this.floorIndex = i.floorIndex, this.five.model.show(this.floorIndex);
126
+ const p = i.modelOpacity, w = i.immediately ? 0 : _;
127
+ b(this.five, p, w), this.render(w);
128
+ });
129
+ return this.showPromise = n().then(() => {
130
+ this.hooks.emit("showAnimationEnded", {
131
+ auto: i.isAutoShow,
132
+ userAction: i.userAction
133
+ });
134
+ }).catch((a) => {
135
+ if (this.updateState({ visible: !1 }, i.userAction), !i.isAutoShow && a instanceof Error)
136
+ throw a;
137
+ }).finally(() => {
138
+ this.showPromise = void 0, this.showRejection = void 0;
139
+ }), this.showPromise;
140
+ }));
141
+ s(this, "_hide", (t) => {
142
+ var n;
143
+ (n = this.showRejection) == null || n.call(this, f.BreakOffByHide), this.showPromise = void 0;
144
+ const i = l(l({}, {
145
+ userAction: !0,
146
+ isAutoHide: !1
147
+ }), t);
148
+ b(this.five, 1, 0), this.hooks.emit("hide", { auto: i.isAutoHide, userAction: i.userAction }), this.render();
149
+ });
150
+ s(this, "handleClick", () => {
151
+ if (!this.state.visible)
152
+ return;
153
+ if (this.hooks.emit("click"))
154
+ return !1;
155
+ });
156
+ s(this, "onFiveModelLoaded", () => {
157
+ if (this.state.enabled === !1 || this.wrapper || !this.selector)
158
+ return;
159
+ const t = this.selector instanceof Element ? this.selector : document.querySelector(this.selector);
160
+ if (!t)
161
+ throw new Error("\u4E0D\u6B63\u786E\u7684\u7236\u5BB9\u5668\u9009\u62E9\u5668");
162
+ this.wrapper = t, t.append(this.container);
163
+ });
164
+ s(this, "onFiveModeChange", (t) => {
165
+ t !== this.showState.mode && (this.updateState({ visible: !1 }, !1), this._hide({ userAction: !1 }));
166
+ });
167
+ s(this, "onFivePanoArrived", (t) => {
168
+ var e;
169
+ !((e = this.five) != null && e.work) || (this.panoIndex = t, this.floorIndex = this.five.work.observers[t].floorIndex);
170
+ });
171
+ s(this, "onFiveCameraUpdate", (t, e) => {
172
+ if (!this.state.visible || this.showPromise)
173
+ return;
174
+ const i = this.five.getCurrentState();
175
+ this.updatePosition(), this.updateSize(), W(i) && (this.updateState({ visible: !1 }, e), this._hide({ userAction: e }));
176
+ });
177
+ s(this, "onFiveWantsPanGesture", (t, e) => {
178
+ if (this.five.getCurrentState().mode === this.showState.mode && this.state.config.autoShowEnable !== !1) {
179
+ if (e && this.state.visible)
180
+ return this.five.updateCamera(this.showState, 0), !1;
181
+ if (e && !this.state.visible) {
182
+ if (this.isHiddenByHideFunc)
183
+ return;
184
+ const i = this.five.getCurrentState();
185
+ return i.mode !== this.showState.mode || this.state.visible ? void 0 : (z(i) && (this.updateState({ visible: !0 }, !0), this._show({ isAutoShow: !0 })), !1);
186
+ }
187
+ }
188
+ });
189
+ s(this, "onFiveWantsTapGesture", () => this.handleClick());
190
+ s(this, "onFiveWantsChangeMode", (t, e) => {
191
+ e === "Panorama" && t === this.showState.mode && (this.lastPanoramaLongitude = this.five.getCurrentState().longitude);
192
+ });
193
+ s(this, "onModelShownFloorChange", (t) => {
194
+ if (this.floorIndex !== t) {
195
+ if (t === null) {
196
+ const e = this.five.getCurrentState().panoIndex;
197
+ this.floorIndex = this.five.work.observers[e].floorIndex;
198
+ return;
199
+ }
200
+ this.floorIndex = t, this.updateSize(), this.render();
201
+ }
202
+ });
203
+ e != null && e.selector && (this.selector = e.selector, console.warn("\u4E0D\u63A8\u8350\u7EE7\u7EED\u4F7F\u7528 params.selector \u914D\u7F6E\u7236\u5BB9\u5668\uFF0C\u8BF7\u4F7F\u7528 appendTo \u65B9\u6CD5")), this.showState = {
204
+ mode: "Mapview",
205
+ longitude: 0,
206
+ latitude: Math.PI / 2,
207
+ fov: 90
208
+ };
209
+ const i = {
210
+ northDesc: "\u5317",
211
+ modelOpacity: 1,
212
+ hoverEnable: !0,
213
+ compassEnable: !0,
214
+ autoShowEnable: !0,
215
+ ruleLabelsEnable: !0,
216
+ roomLabelsEnable: !0,
217
+ cameraImageUrl: H,
218
+ attachedTo: O.BOUNDING_CENTER,
219
+ getLabelElement: void 0,
220
+ adaptiveRoomLabelVisibleEnable: !0,
221
+ getRoomAreaText: (a) => (a / 1e6).toFixed(1) + "\u33A1",
222
+ getRuleDistanceText: (a) => a.toString()
223
+ }, n = e ? R(e, ["selector", "scale"]) : {}, h = l(l({}, i), n);
224
+ this.state = {
225
+ enabled: !0,
226
+ visible: !1,
227
+ config: h
228
+ }, this.initContainer(), t.model.loaded ? this.onFiveModelLoaded() : t.once("modelLoaded", this.onFiveModelLoaded), t.once("dispose", this.dispose), this.addEventListener();
229
+ }
230
+ load(t, e, i = !0) {
231
+ return c(this, null, function* () {
232
+ function n(p) {
233
+ return Object.prototype.hasOwnProperty.apply(p, ["version"]);
234
+ }
235
+ const h = t;
236
+ h && !h.version && console.warn("\u4F20\u5165 serverData.data \u7684\u65B9\u5F0F\u540E\u7EED\u53EF\u80FD\u4E0D\u518D\u652F\u6301\uFF0C\u8BF7\u628A serverData \u6574\u4F53\u4F20\u5165 load \u51FD\u6570");
237
+ const a = JSON.parse(JSON.stringify(t)), d = n(a) ? a.data : a, u = this.data;
238
+ this.data = yield S(d), this.hooks.emit("dataLoaded", this.data), this.hooks.emit("dataChange", this.data, u), e && this.updateState(e, i), this.render();
239
+ });
240
+ }
241
+ appendTo(t) {
242
+ if (this.wrapper = t, !!this.state.enabled)
243
+ return t.appendChild(this.container), this.render(), this;
244
+ }
245
+ enable(t = {}) {
246
+ if (this.state.enabled)
247
+ return;
248
+ const e = t.userAction !== void 0 ? t.userAction : !0;
249
+ this.updateState({ enabled: !0 }, t.userAction || e), this._enable({ userAction: e });
250
+ }
251
+ disable(t = {}) {
252
+ if (!this.state.enabled)
253
+ return;
254
+ const e = t.userAction !== void 0 ? t.userAction : !0;
255
+ this.updateState({ enabled: !1 }, t.userAction || e), this._disable({ userAction: e });
256
+ }
257
+ setState(t, e = {}) {
258
+ const i = this.state, n = e.userAction !== void 0 ? e.userAction : !0;
259
+ if (this.updateState(t, n), t.enabled !== void 0 && i.enabled !== t.enabled && (t.enabled ? this._enable({ userAction: n }) : this._disable({ userAction: n })), t.visible !== void 0 && i.visible !== t.visible) {
260
+ const h = { userAction: n };
261
+ t.visible ? this._show(h) : this._hide(h);
262
+ }
263
+ }
264
+ changeConfigs(t, e = !0) {
265
+ this.updateState({ config: t }, e), this.render();
266
+ }
267
+ updatePosition() {
268
+ var a;
269
+ const t = k(this.five, this.floorIndex, this.state.config.attachedTo), e = (a = this.five.model) == null ? void 0 : a.bounding.getCenter(new x.Vector3()).setY(t);
270
+ if (!e)
271
+ return;
272
+ const i = e.clone().project(this.five.camera), n = (i.x + 1) / 2, h = -(i.y - 1) / 2;
273
+ this.container.style.left = n * 100 + "%", this.container.style.top = h * 100 + "%";
274
+ }
275
+ formatData(t) {
276
+ return c(this, null, function* () {
277
+ return yield S(t.data);
278
+ });
279
+ }
280
+ updateState(t, e) {
281
+ const i = this.state, n = t.config ? l(l({}, i.config), t.config) : i.config;
282
+ this.state = m(l(l({}, this.state), t), { config: n }), !D(this.state, i, { deep: !0 }) && this.hooks.emit("stateChange", { state: this.state, prevState: i, userAction: e });
283
+ }
284
+ initContainer() {
285
+ this.container.classList.add("floorplan-plugin"), Object.assign(this.container.style, {
286
+ position: "absolute",
287
+ left: "50%",
288
+ top: "50%",
289
+ transform: "translate(-50%, -50%)",
290
+ zIndex: 10,
291
+ pointerEvents: "none"
292
+ }), this.five.addExtraElement(this.container);
293
+ }
294
+ addEventListener() {
295
+ if (!this.state.enabled || this.hasAddedEventListener)
296
+ return;
297
+ const t = this.five;
298
+ t.on("modeChange", this.onFiveModeChange), t.on("panoArrived", this.onFivePanoArrived), t.on("cameraUpdate", this.onFiveCameraUpdate), t.on("wantsPanGesture", this.onFiveWantsPanGesture), t.on("wantsTapGesture", this.onFiveWantsTapGesture), t.on("wantsChangeMode", this.onFiveWantsChangeMode), t.on("modelShownFloorChange", this.onModelShownFloorChange);
299
+ }
300
+ removeEventListener() {
301
+ const t = this.five;
302
+ this.hasAddedEventListener = !1, t.off("modelLoaded", this.onFiveModelLoaded), t.off("modeChange", this.onFiveModeChange), t.off("panoArrived", this.onFivePanoArrived), t.off("cameraUpdate", this.onFiveCameraUpdate), t.off("wantsPanGesture", this.onFiveWantsPanGesture), t.off("wantsTapGesture", this.onFiveWantsTapGesture), t.off("wantsChangeMode", this.onFiveWantsChangeMode), t.off("modelShownFloorChange", this.onModelShownFloorChange);
303
+ }
304
+ render(t) {
305
+ if (!this.state.enabled || !this.container || !this.data || this.size.width === 0)
306
+ return;
307
+ const e = m(l({}, this.state.config), {
308
+ visible: this.state.visible,
309
+ duration: t != null ? t : 0,
310
+ panoIndex: this.panoIndex,
311
+ floorIndex: this.floorIndex,
312
+ floorplanData: this.data,
313
+ lastPanoramaLongitude: this.lastPanoramaLongitude
314
+ });
315
+ if (this.app)
316
+ return this.app.$set(e);
317
+ this.app = new B({ target: this.container, intro: !0, props: e });
318
+ }
319
+ }
320
+ const st = (r, o) => new N(r, o);
321
+ export {
322
+ st as MapviewFloorplanPlugin,
323
+ st as default
324
+ };
@@ -0,0 +1 @@
1
+ "use strict";var A=Object.defineProperty,P=Object.defineProperties;var y=Object.getOwnPropertyDescriptors;var S=Object.getOwnPropertySymbols;var C=Object.prototype.hasOwnProperty,M=Object.prototype.propertyIsEnumerable;var w=(o,n,e)=>n in o?A(o,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[n]=e,l=(o,n)=>{for(var e in n||(n={}))C.call(n,e)&&w(o,e,n[e]);if(S)for(var e of S(n))M.call(n,e)&&w(o,e,n[e]);return o},m=(o,n)=>P(o,y(n));var s=(o,n,e)=>(w(o,typeof n!="symbol"?n+"":n,e),e);var f=(o,n,e)=>new Promise((t,i)=>{var a=d=>{try{r(e.next(d))}catch(u){i(u)}},h=d=>{try{r(e.throw(d))}catch(u){i(u)}},r=d=>d.done?t(d.value):Promise.resolve(d.value).then(a,h);r((e=e.apply(o,n)).next())});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const j=require("three"),c=require("../../chunks/cjs/correctFiveState.4c8472bd.cjs.js"),I=require("../../chunks/cjs/equal.e9fcbd4e.cjs.js"),p=require("../../chunks/cjs/changeModelCanvasOpacity.8d84f111.cjs.js"),g=require("../../chunks/cjs/formatData.81e95011.cjs.js"),x=require("../../chunks/cjs/filter.cf9ebbb3.cjs.js"),_=require("../../chunks/cjs/BasePluginWithData.0a28882d.cjs.js");require("svelte/internal");require("svelte/easing");require("svelte/transition");require("svelte/store");require("svelte");require("../../chunks/cjs/BasePlugin.57e5204f.cjs.js");require("../../chunks/cjs/Subscribe.5398d5c6.cjs.js");function D(o){if(o&&o.__esModule)return o;const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const e in o)if(e!=="default"){const t=Object.getOwnPropertyDescriptor(o,e);Object.defineProperty(n,e,t.get?t:{enumerable:!0,get:()=>o[e]})}}return n.default=o,Object.freeze(n)}const O=D(j);function k(o){const{latitude:n,longitude:e}=o,t=Math.abs(n-Math.PI/2)>5*Math.PI/180,i=e>5*(Math.PI/180)&&e<355*(Math.PI/180);return t||i}function L(o){const{latitude:n,longitude:e}=o,t=Math.abs(n-Math.PI/2)<10*Math.PI/180,i=e<30*(Math.PI/180)||e>330*(Math.PI/180);return t&&i}class T extends _.Controller{constructor(e,t){super(e);s(this,"name","modelFloorplanPlugin");s(this,"state");s(this,"data");s(this,"showState");s(this,"showPromise");s(this,"app");s(this,"panoIndex",0);s(this,"floorIndex",0);s(this,"selector");s(this,"showRejection");s(this,"wrapper");s(this,"container",document.createElement("div"));s(this,"lastPanoramaLongitude",0);s(this,"size",{width:0,height:0});s(this,"hasAddedEventListener",!1);s(this,"isHiddenByHideFunc",!1);s(this,"dispose",()=>{var e,t;this.removeEventListener(),(e=this.app)==null||e.$destroy(),this.app=void 0,(t=this.container)==null||t.remove(),this.data=void 0,this.wrapper=void 0,this.selector=void 0,this.hooks.emit("dispose")});s(this,"show",(...t)=>f(this,[...t],function*(e={}){if(!this.state.enabled||!this.showPromise&&this.state.visible)return;const i=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!0},i),this._show(e)}));s(this,"hide",(...t)=>f(this,[...t],function*(e={}){!this.state.enabled||(this.isHiddenByHideFunc=!0,this.state.visible!==!1&&(this.updateState({visible:!1},e.userAction||!0),this._hide(e)))}));s(this,"updateSize",()=>{if(!this.data||!c.checkShowState(this.five,this.showState)||!this.container||!this.wrapper)return;const{min:e,max:t}=this.data.bounding,i=t.x-e.x,a=t.y-e.y,h=this.state.config.attachedTo?{attachedTo:this.state.config.attachedTo}:void 0,r=p.getPxmm(this.five,this.wrapper,this.floorIndex,h),d=Math.ceil(i*r),u=Math.ceil(a*r);this.size.width===d&&this.size.height===u||(this.container.style.width=d+"px",this.container.style.height=u+"px",this.size={width:d,height:u})});s(this,"_disable",e=>{var i,a,h;const{userAction:t}=e;this.hooks.emit("disable",{userAction:t}),(i=this.showRejection)==null||i.call(this,c.FloorplanErrorType.BreakOffByDisable),this.showPromise=void 0,(a=this.app)==null||a.$destroy(),this.app=void 0,(h=this.container)==null||h.remove(),this.removeEventListener()});s(this,"_enable",e=>{const{userAction:t}=e;this.addEventListener(),this.wrapper&&(this.wrapper.append(this.container),this.hooks.emit("enable",{userAction:t}),this.state.visible&&this._show({userAction:t}))});s(this,"_show",e=>f(this,null,function*(){var h;if(!this.state.enabled)return;if(!((h=this.five.model)!=null&&h.loaded))throw new Error(c.FloorplanErrorType.ModelNotLoaded);if(!this.data)throw new Error(c.FloorplanErrorType.DataNotLoaded);this.isHiddenByHideFunc=!1;const t={floorIndex:this.floorIndex,modelOpacity:this.state.config.modelOpacity,immediately:!1,isAutoShow:!1,userAction:!0},i=l(l({},t),e),a=()=>f(this,null,function*(){this.hooks.emit("show",{userAction:i.userAction,auto:i.isAutoShow});let r=!1,d;this.showRejection=E=>{r=!0,d=E};const[u]=yield c.to(c.correctFiveState(this.five,this.showState,i.userAction));if(u)throw u;if(r)throw d?new Error(d):new Error(c.FloorplanErrorType.UnknownError);this.updateSize(),this.updatePosition(),this.floorIndex=i.floorIndex,this.five.model.show(this.floorIndex);const v=i.modelOpacity,b=i.immediately?0:c.SHOW_ANIME_DURATION;p.changeModelCanvasOpacity(this.five,v,b),this.render(b)});return this.showPromise=a().then(()=>{this.hooks.emit("showAnimationEnded",{auto:i.isAutoShow,userAction:i.userAction})}).catch(r=>{if(this.updateState({visible:!1},i.userAction),!i.isAutoShow&&r instanceof Error)throw r}).finally(()=>{this.showPromise=void 0,this.showRejection=void 0}),this.showPromise}));s(this,"_hide",e=>{var a;(a=this.showRejection)==null||a.call(this,c.FloorplanErrorType.BreakOffByHide),this.showPromise=void 0;const i=l(l({},{userAction:!0,isAutoHide:!1}),e);p.changeModelCanvasOpacity(this.five,1,0),this.hooks.emit("hide",{auto:i.isAutoHide,userAction:i.userAction}),this.render()});s(this,"handleClick",()=>{if(!this.state.visible)return;if(this.hooks.emit("click"))return!1});s(this,"onFiveModelLoaded",()=>{if(this.state.enabled===!1||this.wrapper||!this.selector)return;const e=this.selector instanceof Element?this.selector:document.querySelector(this.selector);if(!e)throw new Error("\u4E0D\u6B63\u786E\u7684\u7236\u5BB9\u5668\u9009\u62E9\u5668");this.wrapper=e,e.append(this.container)});s(this,"onFiveModeChange",e=>{e!==this.showState.mode&&(this.updateState({visible:!1},!1),this._hide({userAction:!1}))});s(this,"onFivePanoArrived",e=>{var t;!((t=this.five)!=null&&t.work)||(this.panoIndex=e,this.floorIndex=this.five.work.observers[e].floorIndex)});s(this,"onFiveCameraUpdate",(e,t)=>{if(!this.state.visible||this.showPromise)return;const i=this.five.getCurrentState();this.updatePosition(),this.updateSize(),k(i)&&(this.updateState({visible:!1},t),this._hide({userAction:t}))});s(this,"onFiveWantsPanGesture",(e,t)=>{if(this.five.getCurrentState().mode===this.showState.mode&&this.state.config.autoShowEnable!==!1){if(t&&this.state.visible)return this.five.updateCamera(this.showState,0),!1;if(t&&!this.state.visible){if(this.isHiddenByHideFunc)return;const i=this.five.getCurrentState();return i.mode!==this.showState.mode||this.state.visible?void 0:(L(i)&&(this.updateState({visible:!0},!0),this._show({isAutoShow:!0})),!1)}}});s(this,"onFiveWantsTapGesture",()=>this.handleClick());s(this,"onFiveWantsChangeMode",(e,t)=>{t==="Panorama"&&e===this.showState.mode&&(this.lastPanoramaLongitude=this.five.getCurrentState().longitude)});s(this,"onModelShownFloorChange",e=>{if(this.floorIndex!==e){if(e===null){const t=this.five.getCurrentState().panoIndex;this.floorIndex=this.five.work.observers[t].floorIndex;return}this.floorIndex=e,this.updateSize(),this.render()}});t!=null&&t.selector&&(this.selector=t.selector,console.warn("\u4E0D\u63A8\u8350\u7EE7\u7EED\u4F7F\u7528 params.selector \u914D\u7F6E\u7236\u5BB9\u5668\uFF0C\u8BF7\u4F7F\u7528 appendTo \u65B9\u6CD5")),this.showState={mode:"Mapview",longitude:0,latitude:Math.PI/2,fov:90};const i={northDesc:"\u5317",modelOpacity:1,hoverEnable:!0,compassEnable:!0,autoShowEnable:!0,ruleLabelsEnable:!0,roomLabelsEnable:!0,cameraImageUrl:g.CAMERA_IMAGE,attachedTo:p.FLOOR_PLAN_ATTACHED_TO.BOUNDING_CENTER,getLabelElement:void 0,adaptiveRoomLabelVisibleEnable:!0,getRoomAreaText:r=>(r/1e6).toFixed(1)+"\u33A1",getRuleDistanceText:r=>r.toString()},a=t?x.omit(t,["selector","scale"]):{},h=l(l({},i),a);this.state={enabled:!0,visible:!1,config:h},this.initContainer(),e.model.loaded?this.onFiveModelLoaded():e.once("modelLoaded",this.onFiveModelLoaded),e.once("dispose",this.dispose),this.addEventListener()}load(e,t,i=!0){return f(this,null,function*(){function a(v){return Object.prototype.hasOwnProperty.apply(v,["version"])}const h=e;h&&!h.version&&console.warn("\u4F20\u5165 serverData.data \u7684\u65B9\u5F0F\u540E\u7EED\u53EF\u80FD\u4E0D\u518D\u652F\u6301\uFF0C\u8BF7\u628A serverData \u6574\u4F53\u4F20\u5165 load \u51FD\u6570");const r=JSON.parse(JSON.stringify(e)),d=a(r)?r.data:r,u=this.data;this.data=yield g.formatData(d),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,u),t&&this.updateState(t,i),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 t=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!0},e.userAction||t),this._enable({userAction:t})}disable(e={}){if(!this.state.enabled)return;const t=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!1},e.userAction||t),this._disable({userAction:t})}setState(e,t={}){const i=this.state,a=t.userAction!==void 0?t.userAction:!0;if(this.updateState(e,a),e.enabled!==void 0&&i.enabled!==e.enabled&&(e.enabled?this._enable({userAction:a}):this._disable({userAction:a})),e.visible!==void 0&&i.visible!==e.visible){const h={userAction:a};e.visible?this._show(h):this._hide(h)}}changeConfigs(e,t=!0){this.updateState({config:e},t),this.render()}updatePosition(){var r;const e=p.getAttachedY(this.five,this.floorIndex,this.state.config.attachedTo),t=(r=this.five.model)==null?void 0:r.bounding.getCenter(new O.Vector3).setY(e);if(!t)return;const i=t.clone().project(this.five.camera),a=(i.x+1)/2,h=-(i.y-1)/2;this.container.style.left=a*100+"%",this.container.style.top=h*100+"%"}formatData(e){return f(this,null,function*(){return yield g.formatData(e.data)})}updateState(e,t){const i=this.state,a=e.config?l(l({},i.config),e.config):i.config;this.state=m(l(l({},this.state),e),{config:a}),!I.equal(this.state,i,{deep:!0})&&this.hooks.emit("stateChange",{state:this.state,prevState:i,userAction:t})}initContainer(){this.container.classList.add("floorplan-plugin"),Object.assign(this.container.style,{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",zIndex:10,pointerEvents:"none"}),this.five.addExtraElement(this.container)}addEventListener(){if(!this.state.enabled||this.hasAddedEventListener)return;const e=this.five;e.on("modeChange",this.onFiveModeChange),e.on("panoArrived",this.onFivePanoArrived),e.on("cameraUpdate",this.onFiveCameraUpdate),e.on("wantsPanGesture",this.onFiveWantsPanGesture),e.on("wantsTapGesture",this.onFiveWantsTapGesture),e.on("wantsChangeMode",this.onFiveWantsChangeMode),e.on("modelShownFloorChange",this.onModelShownFloorChange)}removeEventListener(){const e=this.five;this.hasAddedEventListener=!1,e.off("modelLoaded",this.onFiveModelLoaded),e.off("modeChange",this.onFiveModeChange),e.off("panoArrived",this.onFivePanoArrived),e.off("cameraUpdate",this.onFiveCameraUpdate),e.off("wantsPanGesture",this.onFiveWantsPanGesture),e.off("wantsTapGesture",this.onFiveWantsTapGesture),e.off("wantsChangeMode",this.onFiveWantsChangeMode),e.off("modelShownFloorChange",this.onModelShownFloorChange)}render(e){if(!this.state.enabled||!this.container||!this.data||this.size.width===0)return;const t=m(l({},this.state.config),{visible:this.state.visible,duration:e!=null?e:0,panoIndex:this.panoIndex,floorIndex:this.floorIndex,floorplanData:this.data,lastPanoramaLongitude:this.lastPanoramaLongitude});if(this.app)return this.app.$set(t);this.app=new p.Main({target:this.container,intro:!0,props:t})}}const F=(o,n)=>new T(o,n);exports.MapviewFloorplanPlugin=F;exports.default=F;