@realsee/dnalogel 2.0.0-alpha.4 → 2.0.0-alpha.40

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 (643) hide show
  1. package/README.md +93 -4
  2. package/components/index.js +1450 -0
  3. package/dist/CSS3DRenderPlugin/Plugin.d.ts +49 -0
  4. package/dist/CSS3DRenderPlugin/index.d.ts +4 -0
  5. package/dist/CSS3DRenderPlugin/index.js +234 -0
  6. package/dist/CSS3DRenderPlugin/utils/createResizeObserver.d.ts +7 -0
  7. package/dist/CameraMovementPlugin/CameraMovementPlugin.d.ts +7 -0
  8. package/dist/CameraMovementPlugin/index.d.ts +5 -0
  9. package/dist/CameraMovementPlugin/index.js +302 -0
  10. package/dist/CameraMovementPlugin/typing.d.ts +68 -0
  11. package/dist/ItemLabelPlugin/Plugin.d.ts +4 -0
  12. package/dist/ItemLabelPlugin/events.type.d.ts +9 -0
  13. package/dist/ItemLabelPlugin/index.d.ts +9 -0
  14. package/dist/ItemLabelPlugin/index.js +943 -0
  15. package/dist/ItemLabelPlugin/typings.d.ts +63 -0
  16. package/dist/ItemLabelPlugin/utils/getLabelTransform.d.ts +1 -0
  17. package/dist/ItemLabelPlugin/utils/getStrokeLength.d.ts +5 -0
  18. package/dist/ItemLabelPlugin/utils/isImpacted.d.ts +6 -0
  19. package/dist/ItemLabelPlugin/utils/parseData.d.ts +3 -0
  20. package/dist/ItemLabelPlugin/utils/transform2RenderData.d.ts +3 -0
  21. package/dist/ModelChassisCompassPlugin/Plugin.d.ts +19 -0
  22. package/dist/ModelChassisCompassPlugin/index.d.ts +4 -0
  23. package/dist/ModelChassisCompassPlugin/index.js +145 -0
  24. package/dist/ModelEntryDoorGuidePlugin/Plugin.d.ts +26 -0
  25. package/dist/ModelEntryDoorGuidePlugin/index.d.ts +4 -0
  26. package/dist/ModelEntryDoorGuidePlugin/index.js +196 -0
  27. package/dist/ModelItemLabelPlugin/ModelItemLabelPlugin.d.ts +4 -0
  28. package/dist/ModelItemLabelPlugin/events.type.d.ts +9 -0
  29. package/dist/ModelItemLabelPlugin/index.d.ts +9 -0
  30. package/dist/ModelItemLabelPlugin/index.js +654 -0
  31. package/dist/ModelItemLabelPlugin/typings.d.ts +56 -0
  32. package/dist/ModelItemLabelPlugin/utils/parseData.d.ts +3 -0
  33. package/dist/ModelRoomLabelPlugin/Assets/roomLabelBg.d.ts +1 -0
  34. package/dist/ModelRoomLabelPlugin/Controller.d.ts +36 -0
  35. package/dist/ModelRoomLabelPlugin/index.d.ts +12 -0
  36. package/dist/ModelRoomLabelPlugin/index.js +541 -0
  37. package/dist/ModelRoomLabelPlugin/typings.d.ts +35 -0
  38. package/dist/ModelRoomLabelPlugin/utils/parseData.d.ts +3 -0
  39. package/dist/ModelTVVideoPlugin/Plugin.d.ts +4 -0
  40. package/dist/ModelTVVideoPlugin/index.d.ts +5 -0
  41. package/dist/ModelTVVideoPlugin/index.js +301 -0
  42. package/dist/ModelTVVideoPlugin/typings.d.ts +25 -0
  43. package/dist/ModelTVVideoPlugin/utils/parseData.d.ts +2 -0
  44. package/dist/ModelViewPlugin/Plugin.d.ts +17 -0
  45. package/dist/ModelViewPlugin/index.d.ts +4 -0
  46. package/dist/ModelViewPlugin/index.js +186 -0
  47. package/dist/PanoCompassPlugin/Assets/roomInfoIcon.d.ts +1 -0
  48. package/dist/PanoCompassPlugin/Plugin.d.ts +47 -0
  49. package/dist/PanoCompassPlugin/getRoomInfoInstance.d.ts +8 -0
  50. package/dist/PanoCompassPlugin/index.d.ts +8 -0
  51. package/dist/PanoCompassPlugin/index.js +636 -0
  52. package/dist/PanoCursorRaycasterPlugin/index.d.ts +48 -0
  53. package/dist/PanoCursorRaycasterPlugin/index.js +90 -0
  54. package/dist/PanoMeasurePlugin/Controller/BaseController.d.ts +39 -0
  55. package/dist/PanoMeasurePlugin/Controller/EditController.d.ts +52 -0
  56. package/dist/PanoMeasurePlugin/Controller/MixedController.d.ts +44 -0
  57. package/dist/PanoMeasurePlugin/Controller/ShortcutKeyController.d.ts +12 -0
  58. package/dist/PanoMeasurePlugin/Controller/WatchController.d.ts +26 -0
  59. package/dist/PanoMeasurePlugin/Controller/index.d.ts +70 -0
  60. package/dist/PanoMeasurePlugin/Model/index.d.ts +38 -0
  61. package/dist/PanoMeasurePlugin/Model/line.d.ts +30 -0
  62. package/dist/PanoMeasurePlugin/Model/point.d.ts +16 -0
  63. package/dist/PanoMeasurePlugin/Model/polyline.d.ts +16 -0
  64. package/dist/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.d.ts +2 -0
  65. package/dist/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.d.ts +2 -0
  66. package/dist/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.d.ts +2 -0
  67. package/dist/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +25 -0
  68. package/dist/PanoMeasurePlugin/Modules/FiveHelper.d.ts +11 -0
  69. package/dist/PanoMeasurePlugin/Modules/GuideController.d.ts +18 -0
  70. package/dist/PanoMeasurePlugin/Modules/Magnifier.d.ts +59 -0
  71. package/dist/PanoMeasurePlugin/Modules/UIController/HTML.d.ts +2 -0
  72. package/dist/PanoMeasurePlugin/Modules/UIController/MainBtnController.d.ts +15 -0
  73. package/dist/PanoMeasurePlugin/Modules/UIController/Revoke/index.d.ts +13 -0
  74. package/dist/PanoMeasurePlugin/Modules/UIController/index.d.ts +20 -0
  75. package/dist/PanoMeasurePlugin/Modules/UIController/mobileHTML.d.ts +4 -0
  76. package/dist/PanoMeasurePlugin/Modules/UIController/mobileMainBtnController.d.ts +12 -0
  77. package/dist/PanoMeasurePlugin/Modules/UIController/style.d.ts +16 -0
  78. package/dist/PanoMeasurePlugin/Modules/rangePiece/html.d.ts +4 -0
  79. package/dist/PanoMeasurePlugin/Modules/rangePiece/index.d.ts +44 -0
  80. package/dist/PanoMeasurePlugin/index.d.ts +10 -0
  81. package/dist/PanoMeasurePlugin/index.js +3963 -0
  82. package/dist/PanoMeasurePlugin/typings/data.d.ts +37 -0
  83. package/dist/PanoMeasurePlugin/typings/event.type.d.ts +37 -0
  84. package/dist/PanoMeasurePlugin/typings/utils.type.d.ts +1 -0
  85. package/dist/PanoMeasurePlugin/utils/calculateThreeMouse.d.ts +10 -0
  86. package/dist/PanoMeasurePlugin/utils/clearGroup.d.ts +2 -0
  87. package/dist/PanoMeasurePlugin/utils/constants.d.ts +4 -0
  88. package/dist/PanoMeasurePlugin/utils/distanceDom.d.ts +28 -0
  89. package/dist/PanoMeasurePlugin/utils/findAssociatedLines.d.ts +2 -0
  90. package/dist/PanoMeasurePlugin/utils/findClosestPoint.d.ts +10 -0
  91. package/dist/PanoMeasurePlugin/utils/getIntersectionFromEvent.d.ts +4 -0
  92. package/dist/PanoMeasurePlugin/utils/getPointFromHammerEvent.d.ts +10 -0
  93. package/dist/PanoMeasurePlugin/utils/ironbox.d.ts +1 -0
  94. package/dist/PanoMeasurePlugin/utils/isNDCPointInScreen.d.ts +2 -0
  95. package/dist/PanoMeasurePlugin/utils/line.d.ts +17 -0
  96. package/dist/PanoMeasurePlugin/utils/math.d.ts +17 -0
  97. package/dist/PanoMeasurePlugin/utils/mouseGroup.d.ts +7 -0
  98. package/dist/PanoMeasurePlugin/utils/ndc2Screen.d.ts +5 -0
  99. package/dist/PanoRulerPlugin/Plugin.d.ts +31 -0
  100. package/dist/PanoRulerPlugin/index.d.ts +5 -0
  101. package/dist/PanoRulerPlugin/index.js +610 -0
  102. package/dist/PanoRulerPlugin/style.d.ts +2 -0
  103. package/dist/PanoRulerPlugin/typings.d.ts +21 -0
  104. package/dist/PanoRulerProPlugin/Controller.d.ts +15 -0
  105. package/dist/PanoRulerProPlugin/index.d.ts +8 -0
  106. package/dist/PanoRulerProPlugin/index.js +1006 -0
  107. package/dist/PanoRulerProPlugin/typings.d.ts +46 -0
  108. package/dist/PanoSpatialTagPlugin/Plugin.d.ts +35 -0
  109. package/dist/PanoSpatialTagPlugin/index.d.ts +5 -0
  110. package/dist/PanoSpatialTagPlugin/index.js +1307 -0
  111. package/dist/PanoSpatialTagPlugin/store.d.ts +1 -0
  112. package/dist/PanoSpatialTagPlugin/style.d.ts +1 -0
  113. package/dist/PanoSpatialTagPlugin/typings.d.ts +40 -0
  114. package/dist/base/BasePlugin.d.ts +100 -0
  115. package/dist/base/BasePluginWithData.d.ts +34 -0
  116. package/dist/components/PaintBrush/Controller.d.ts +43 -0
  117. package/dist/components/PaintBrush/Subscribe.d.ts +76 -0
  118. package/dist/components/PaintBrush/index.d.ts +27 -0
  119. package/dist/components/PaintBrush/style.d.ts +2 -0
  120. package/dist/components/PaintBrush/tween.d.ts +62 -0
  121. package/dist/components/PaintBrush/typings.d.ts +58 -0
  122. package/dist/components/PaintBrush/utils.d.ts +26 -0
  123. package/dist/components/index.d.ts +2 -0
  124. package/dist/floorplan/Assets/camera.d.ts +1 -0
  125. package/{libs/floorplan/ModelFloorplanPlugin → dist/floorplan}/Assets/compass.d.ts +0 -0
  126. package/dist/floorplan/Assets/floorplanExtraObject.d.ts +1 -0
  127. package/dist/floorplan/ModelFloorplanPlugin/Controller.d.ts +98 -0
  128. package/dist/floorplan/ModelFloorplanPlugin/index.d.ts +7 -0
  129. package/dist/floorplan/ModelFloorplanPlugin/index.js +4533 -0
  130. package/dist/floorplan/ModelFloorplanPlugin/typing.d.ts +107 -0
  131. package/dist/floorplan/PanoFloorplanRadarPlugin/Controller.d.ts +36 -0
  132. package/dist/floorplan/PanoFloorplanRadarPlugin/index.d.ts +7 -0
  133. package/dist/floorplan/PanoFloorplanRadarPlugin/index.js +2008 -0
  134. package/dist/floorplan/PanoFloorplanRadarPlugin/typing.d.ts +52 -0
  135. package/dist/floorplan/TopviewFloorplanPlugin/Controller.d.ts +67 -0
  136. package/dist/floorplan/TopviewFloorplanPlugin/index.d.ts +7 -0
  137. package/dist/floorplan/TopviewFloorplanPlugin/index.js +4236 -0
  138. package/dist/floorplan/TopviewFloorplanPlugin/style.d.ts +1 -0
  139. package/dist/floorplan/TopviewFloorplanPlugin/typing.d.ts +86 -0
  140. package/dist/floorplan/constant.d.ts +5 -0
  141. package/dist/floorplan/index.d.ts +6 -0
  142. package/dist/floorplan/typings/floorplanData.d.ts +137 -0
  143. package/dist/floorplan/typings/floorplanServerData.d.ts +131 -0
  144. package/dist/floorplan/typings/utility.d.ts +2 -0
  145. package/{libs/floorplan/ModelFloorplanPlugin → dist/floorplan}/utils/constant.d.ts +10 -3
  146. package/{libs/floorplan/ModelFloorplanPlugin → dist/floorplan}/utils/correctFiveState.d.ts +2 -1
  147. package/dist/floorplan/utils/formatData.d.ts +5 -0
  148. package/dist/floorplan/utils/formatPosition.d.ts +36 -0
  149. package/dist/index.d.ts +17 -0
  150. package/dist/index.es.js +16212 -0
  151. package/dist/index.js +16266 -0
  152. package/dist/index.umd.js +16258 -0
  153. package/dist/shared-utils/Preloader.d.ts +6 -0
  154. package/dist/shared-utils/Subscribe.d.ts +45 -0
  155. package/dist/shared-utils/animationFrame/BetterTween.d.ts +11 -0
  156. package/dist/shared-utils/animationFrame/calculateProgress.d.ts +8 -0
  157. package/dist/shared-utils/animationFrame/formatRad.d.ts +15 -0
  158. package/dist/shared-utils/animationFrame/index.d.ts +15 -0
  159. package/dist/shared-utils/animationFrame/tween.d.ts +75 -0
  160. package/dist/shared-utils/changeModelCanvasOpacity.d.ts +2 -0
  161. package/dist/shared-utils/createCanvasTextTexture.d.ts +8 -0
  162. package/dist/shared-utils/createLine/index.d.ts +3 -0
  163. package/dist/shared-utils/debounce.d.ts +6 -0
  164. package/dist/shared-utils/equal.d.ts +11 -0
  165. package/dist/shared-utils/filter.d.ts +27 -0
  166. package/dist/shared-utils/five/changeMode.d.ts +5 -0
  167. package/dist/shared-utils/formatRad.d.ts +7 -0
  168. package/dist/shared-utils/getPxmm.d.ts +19 -0
  169. package/dist/shared-utils/getRandomColor.d.ts +1 -0
  170. package/dist/shared-utils/index.d.ts +1 -0
  171. package/dist/shared-utils/isNil.d.ts +10 -0
  172. package/dist/shared-utils/isTruelyObject.d.ts +18 -0
  173. package/dist/shared-utils/logger.d.ts +16 -0
  174. package/dist/shared-utils/math/Interval.d.ts +13 -0
  175. package/dist/shared-utils/math/Rectangle.d.ts +27 -0
  176. package/dist/shared-utils/math/evenNumber.d.ts +3 -0
  177. package/dist/shared-utils/math/index.d.ts +2 -0
  178. package/dist/shared-utils/math/planimetry.d.ts +116 -0
  179. package/dist/shared-utils/math/rad2Deg.d.ts +1 -0
  180. package/dist/shared-utils/nearlyEqual.d.ts +7 -0
  181. package/dist/shared-utils/nextFrame.d.ts +1 -0
  182. package/dist/shared-utils/noop.d.ts +5 -0
  183. package/dist/shared-utils/object3d2LocalMatrix.d.ts +12 -0
  184. package/dist/shared-utils/px2rem.d.ts +1 -0
  185. package/dist/shared-utils/removeArrayItem.d.ts +7 -0
  186. package/dist/shared-utils/tap.d.ts +8 -0
  187. package/dist/shared-utils/three/centerPoint.d.ts +2 -0
  188. package/dist/shared-utils/three/getExtraModelLoader.d.ts +6 -0
  189. package/dist/shared-utils/three/getNormal.d.ts +2 -0
  190. package/dist/shared-utils/three/getTextureLoader.d.ts +6 -0
  191. package/dist/shared-utils/three/loadFbxObj.d.ts +2 -0
  192. package/dist/shared-utils/three/loadTexture.d.ts +2 -0
  193. package/dist/shared-utils/three/transformPositionToVector3.d.ts +7 -0
  194. package/dist/shared-utils/three/transfromToMeshBasicMaterial.d.ts +2 -0
  195. package/dist/shared-utils/throttle.d.ts +7 -0
  196. package/dist/shared-utils/tinyEJSrender.d.ts +5 -0
  197. package/dist/shared-utils/to.d.ts +8 -0
  198. package/dist/shared-utils/uuid.d.ts +5 -0
  199. package/dist/shared-utils/vectorTocoordinates.d.ts +7 -0
  200. package/dist/typings/math.type.d.ts +44 -0
  201. package/dist/typings/utils.type.d.ts +2 -0
  202. package/docs/.nojekyll +1 -0
  203. package/docs/assets/highlight.css +78 -0
  204. package/docs/assets/icons.css +1043 -0
  205. package/docs/assets/icons.png +0 -0
  206. package/docs/assets/icons@2x.png +0 -0
  207. package/docs/assets/main.js +52 -0
  208. package/docs/assets/search.js +1 -0
  209. package/docs/assets/style.css +1413 -0
  210. package/docs/assets/widgets.png +0 -0
  211. package/docs/assets/widgets@2x.png +0 -0
  212. package/docs/classes/Magnifier.html +9 -0
  213. package/docs/classes/ModelRoomLabelController.html +17 -0
  214. package/docs/enums/CameraMovementEffect.html +3 -0
  215. package/docs/enums/DIRECTION.html +1 -0
  216. package/docs/enums/DISPLAY_STRATEGY_TYPE.html +1 -0
  217. package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +1 -0
  218. package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +1 -0
  219. package/docs/enums/Rotation.html +3 -0
  220. package/docs/index.html +88 -0
  221. package/docs/interfaces/CSS3DRenderPluginExportType.html +4 -0
  222. package/docs/interfaces/CameraMovementPluginExportType.html +17 -0
  223. package/docs/interfaces/FloorplanBounding.html +10 -0
  224. package/docs/interfaces/FloorplanData.html +3 -0
  225. package/docs/interfaces/FloorplanEntrance.html +15 -0
  226. package/docs/interfaces/FloorplanExtraObject.html +7 -0
  227. package/docs/interfaces/FloorplanExtraObject3D.html +3 -0
  228. package/docs/interfaces/FloorplanFloorData.html +3 -0
  229. package/docs/interfaces/FloorplanImagePosition.html +3 -0
  230. package/docs/interfaces/FloorplanObserver.html +5 -0
  231. package/docs/interfaces/FloorplanOutlineItem.html +3 -0
  232. package/docs/interfaces/FloorplanPosition.html +3 -0
  233. package/docs/interfaces/FloorplanRoomItem.html +17 -0
  234. package/docs/interfaces/FloorplanRoomLabelItem.html +7 -0
  235. package/docs/interfaces/FloorplanServerBounding.html +10 -0
  236. package/docs/interfaces/FloorplanServerComputedData.html +1 -0
  237. package/docs/interfaces/FloorplanServerData.html +3 -0
  238. package/docs/interfaces/FloorplanServerEntrance.html +15 -0
  239. package/docs/interfaces/FloorplanServerFloorData.html +3 -0
  240. package/docs/interfaces/FloorplanServerImagePosition.html +3 -0
  241. package/docs/interfaces/FloorplanServerObserver.html +5 -0
  242. package/docs/interfaces/FloorplanServerOutlineItem.html +3 -0
  243. package/docs/interfaces/FloorplanServerPosition.html +3 -0
  244. package/docs/interfaces/FloorplanServerRoomItem.html +20 -0
  245. package/docs/interfaces/FloorplanServerRoomLabelItem.html +7 -0
  246. package/docs/interfaces/ItemLabelPluginData.html +1 -0
  247. package/docs/interfaces/ItemLabelPluginExportReturnsType.html +1 -0
  248. package/docs/interfaces/ItemLabelPluginParametersType.html +1 -0
  249. package/docs/interfaces/LineJson.html +1 -0
  250. package/docs/interfaces/ModelChassisCompassPluginData.html +1 -0
  251. package/docs/interfaces/ModelChassisCompassPluginExportType.html +1 -0
  252. package/docs/interfaces/ModelChassisCompassPluginParameterType.html +1 -0
  253. package/docs/interfaces/ModelEntryDoorGuidePluginData.html +1 -0
  254. package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +1 -0
  255. package/docs/interfaces/ModelItemLabelPluginData.html +1 -0
  256. package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +1 -0
  257. package/docs/interfaces/ModelItemLabelPluginParametersType.html +1 -0
  258. package/docs/interfaces/ModelRoomLabelPluginData.html +1 -0
  259. package/docs/interfaces/ModelTVVideoPluginData.html +1 -0
  260. package/docs/interfaces/ModelTVVideoPluginExportType.html +1 -0
  261. package/docs/interfaces/ModelTVVideoPluginParameterType.html +1 -0
  262. package/docs/interfaces/ModelViewPluginExportType.html +1 -0
  263. package/docs/interfaces/OpenParameter.html +3 -0
  264. package/docs/interfaces/PanoCompassPluginData.html +1 -0
  265. package/docs/interfaces/PanoCompassPluginParameterType.html +1 -0
  266. package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +11 -0
  267. package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +1 -0
  268. package/docs/interfaces/PanoMeasureParameterType.html +1 -0
  269. package/docs/interfaces/PanoRulerPluginExportType.html +1 -0
  270. package/docs/interfaces/PanoRulerPluginOptions.html +1 -0
  271. package/docs/interfaces/PanoRulerPluginParameterType.html +1 -0
  272. package/docs/interfaces/PanoRulerProPluginExportType.html +1 -0
  273. package/docs/interfaces/PanoRulerProPluginOptions.html +1 -0
  274. package/docs/interfaces/PanoRulerProPluginParameterType.html +1 -0
  275. package/docs/interfaces/PanoRulerProPluginState.html +1 -0
  276. package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +1 -0
  277. package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +1 -0
  278. package/docs/interfaces/PanoSpatialTagPluginData.html +1 -0
  279. package/docs/interfaces/PanoSpatialTagPluginDataElement.html +1 -0
  280. package/docs/interfaces/PanoSpatialTagPluginExportType.html +1 -0
  281. package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +1 -0
  282. package/docs/interfaces/PanoSpatialTagPluginParameterType.html +1 -0
  283. package/docs/interfaces/PanoSpatialTagPluginPointElement.html +1 -0
  284. package/docs/interfaces/PanoSpatialTagPluginTagElement.html +1 -0
  285. package/docs/interfaces/Point.html +1 -0
  286. package/docs/interfaces/PointJson.html +1 -0
  287. package/docs/interfaces/Room.html +1 -0
  288. package/docs/interfaces/RoomInfo.html +1 -0
  289. package/docs/interfaces/RoomLabel.html +13 -0
  290. package/docs/interfaces/RoomRules.html +1 -0
  291. package/docs/interfaces/Rooms.html +1 -0
  292. package/docs/modules.html +36 -0
  293. package/libs/CSS3DRenderPlugin/Plugin.d.ts +49 -0
  294. package/libs/CSS3DRenderPlugin/Plugin.js +182 -0
  295. package/libs/CSS3DRenderPlugin/index.d.ts +3 -48
  296. package/libs/CSS3DRenderPlugin/index.js +2 -180
  297. package/libs/CameraMovementPlugin/CameraMovementPlugin.d.ts +7 -0
  298. package/libs/CameraMovementPlugin/CameraMovementPlugin.js +159 -0
  299. package/libs/CameraMovementPlugin/index.d.ts +4 -6
  300. package/libs/CameraMovementPlugin/index.js +3 -158
  301. package/libs/CameraMovementPlugin/typing.d.ts +1 -1
  302. package/libs/ItemLabelPlugin/ItemLabelComponent.js +568 -0
  303. package/libs/ItemLabelPlugin/ItemLabelItem.js +227 -0
  304. package/libs/ItemLabelPlugin/Plugin.d.ts +4 -0
  305. package/libs/ItemLabelPlugin/Plugin.js +126 -0
  306. package/libs/ItemLabelPlugin/events.type.d.ts +9 -0
  307. package/libs/{floorplan/ModelFloorplanPlugin/typings → ItemLabelPlugin}/events.type.js +0 -0
  308. package/libs/ItemLabelPlugin/index.d.ts +9 -0
  309. package/libs/ItemLabelPlugin/index.js +8 -0
  310. package/libs/ItemLabelPlugin/typings.d.ts +63 -0
  311. package/libs/ItemLabelPlugin/typings.js +7 -0
  312. package/libs/ItemLabelPlugin/utils/getLabelTransform.d.ts +1 -0
  313. package/libs/ItemLabelPlugin/utils/getLabelTransform.js +3 -0
  314. package/libs/ItemLabelPlugin/utils/getStrokeLength.d.ts +5 -0
  315. package/libs/ItemLabelPlugin/utils/getStrokeLength.js +16 -0
  316. package/libs/ItemLabelPlugin/utils/isImpacted.d.ts +6 -0
  317. package/libs/ItemLabelPlugin/utils/isImpacted.js +13 -0
  318. package/libs/ItemLabelPlugin/utils/parseData.d.ts +3 -0
  319. package/libs/ItemLabelPlugin/utils/parseData.js +4 -0
  320. package/libs/ItemLabelPlugin/utils/transform2RenderData.d.ts +3 -0
  321. package/libs/ItemLabelPlugin/utils/transform2RenderData.js +4 -0
  322. package/libs/ModelChassisCompassPlugin/Plugin.d.ts +19 -0
  323. package/libs/ModelChassisCompassPlugin/Plugin.js +77 -0
  324. package/libs/ModelChassisCompassPlugin/index.d.ts +3 -18
  325. package/libs/ModelChassisCompassPlugin/index.js +2 -74
  326. package/libs/ModelEntryDoorGuidePlugin/Plugin.d.ts +26 -0
  327. package/libs/ModelEntryDoorGuidePlugin/Plugin.js +140 -0
  328. package/libs/ModelEntryDoorGuidePlugin/index.d.ts +3 -25
  329. package/libs/ModelEntryDoorGuidePlugin/index.js +2 -135
  330. package/libs/ModelItemLabelPlugin/ItemLabelComponent.js +389 -0
  331. package/libs/ModelItemLabelPlugin/ItemLabelItem.js +133 -0
  332. package/libs/ModelItemLabelPlugin/ModelItemLabelPlugin.d.ts +4 -0
  333. package/libs/ModelItemLabelPlugin/ModelItemLabelPlugin.js +120 -0
  334. package/libs/ModelItemLabelPlugin/events.type.d.ts +9 -0
  335. package/libs/ModelItemLabelPlugin/events.type.js +1 -0
  336. package/libs/ModelItemLabelPlugin/index.d.ts +9 -0
  337. package/libs/ModelItemLabelPlugin/index.js +8 -0
  338. package/libs/ModelItemLabelPlugin/typings.d.ts +56 -0
  339. package/libs/ModelItemLabelPlugin/typings.js +7 -0
  340. package/libs/ModelItemLabelPlugin/utils/parseData.d.ts +3 -0
  341. package/libs/ModelItemLabelPlugin/utils/parseData.js +4 -0
  342. package/libs/ModelRoomLabelPlugin/Controller.js +67 -25
  343. package/libs/ModelRoomLabelPlugin/RoomLabelItem.js +121 -0
  344. package/libs/ModelRoomLabelPlugin/RoomLabelItems.js +291 -0
  345. package/libs/ModelRoomLabelPlugin/utils/parseData.d.ts +1 -1
  346. package/libs/ModelTVVideoPlugin/Plugin.d.ts +4 -0
  347. package/libs/ModelTVVideoPlugin/Plugin.js +254 -0
  348. package/libs/ModelTVVideoPlugin/index.d.ts +5 -0
  349. package/libs/ModelTVVideoPlugin/index.js +4 -0
  350. package/libs/ModelTVVideoPlugin/typings.d.ts +25 -0
  351. package/libs/ModelTVVideoPlugin/typings.js +8 -0
  352. package/libs/ModelTVVideoPlugin/utils/parseData.d.ts +2 -0
  353. package/libs/ModelTVVideoPlugin/utils/parseData.js +13 -0
  354. package/libs/ModelViewPlugin/Plugin.d.ts +17 -0
  355. package/libs/ModelViewPlugin/Plugin.js +159 -0
  356. package/libs/ModelViewPlugin/index.d.ts +3 -16
  357. package/libs/ModelViewPlugin/index.js +2 -159
  358. package/libs/PanoCompassPlugin/Assets/roomInfoIcon.d.ts +1 -0
  359. package/libs/PanoCompassPlugin/Assets/roomInfoIcon.js +1 -0
  360. package/libs/PanoCompassPlugin/Plugin.d.ts +47 -0
  361. package/libs/PanoCompassPlugin/Plugin.js +249 -0
  362. package/libs/PanoCompassPlugin/getRoomInfoInstance.d.ts +8 -0
  363. package/libs/PanoCompassPlugin/getRoomInfoInstance.js +48 -0
  364. package/libs/PanoCompassPlugin/index.d.ts +7 -24
  365. package/libs/PanoCompassPlugin/index.js +6 -88
  366. package/libs/PanoCursorRaycasterPlugin/index.d.ts +1 -1
  367. package/libs/PanoCursorRaycasterPlugin/index.js +5 -3
  368. package/libs/PanoMeasurePlugin/Controller/BaseController.d.ts +39 -0
  369. package/libs/PanoMeasurePlugin/Controller/BaseController.js +132 -0
  370. package/libs/PanoMeasurePlugin/Controller/EditController.d.ts +52 -0
  371. package/libs/PanoMeasurePlugin/Controller/EditController.js +329 -0
  372. package/libs/PanoMeasurePlugin/Controller/MixedController.d.ts +44 -0
  373. package/libs/PanoMeasurePlugin/Controller/MixedController.js +337 -0
  374. package/libs/PanoMeasurePlugin/Controller/ShortcutKeyController.d.ts +12 -0
  375. package/libs/PanoMeasurePlugin/Controller/ShortcutKeyController.js +64 -0
  376. package/libs/PanoMeasurePlugin/Controller/WatchController.d.ts +26 -0
  377. package/libs/PanoMeasurePlugin/Controller/WatchController.js +316 -0
  378. package/libs/PanoMeasurePlugin/Controller/index.d.ts +70 -0
  379. package/libs/PanoMeasurePlugin/Controller/index.js +306 -0
  380. package/libs/PanoMeasurePlugin/Model/index.d.ts +38 -0
  381. package/libs/PanoMeasurePlugin/Model/index.js +139 -0
  382. package/libs/PanoMeasurePlugin/Model/line.d.ts +30 -0
  383. package/libs/PanoMeasurePlugin/Model/line.js +114 -0
  384. package/libs/PanoMeasurePlugin/Model/point.d.ts +16 -0
  385. package/libs/PanoMeasurePlugin/Model/point.js +48 -0
  386. package/libs/PanoMeasurePlugin/Model/polyline.d.ts +16 -0
  387. package/libs/PanoMeasurePlugin/Model/polyline.js +65 -0
  388. package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.d.ts +2 -0
  389. package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.js +12 -0
  390. package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.d.ts +2 -0
  391. package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.js +2 -0
  392. package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.d.ts +2 -0
  393. package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.js +2 -0
  394. package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +25 -0
  395. package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.js +190 -0
  396. package/libs/PanoMeasurePlugin/Modules/FiveHelper.d.ts +11 -0
  397. package/libs/PanoMeasurePlugin/Modules/FiveHelper.js +48 -0
  398. package/libs/PanoMeasurePlugin/Modules/GuideController.d.ts +18 -0
  399. package/libs/PanoMeasurePlugin/Modules/GuideController.js +110 -0
  400. package/libs/PanoMeasurePlugin/Modules/Magnifier.d.ts +59 -0
  401. package/libs/PanoMeasurePlugin/Modules/Magnifier.js +278 -0
  402. package/libs/PanoMeasurePlugin/Modules/UIController/HTML.d.ts +2 -0
  403. package/libs/PanoMeasurePlugin/Modules/UIController/HTML.js +128 -0
  404. package/libs/PanoMeasurePlugin/Modules/UIController/MainBtnController.d.ts +15 -0
  405. package/libs/PanoMeasurePlugin/Modules/UIController/MainBtnController.js +126 -0
  406. package/libs/PanoMeasurePlugin/Modules/UIController/Revoke/index.d.ts +13 -0
  407. package/libs/PanoMeasurePlugin/Modules/UIController/Revoke/index.js +73 -0
  408. package/libs/PanoMeasurePlugin/Modules/UIController/index.d.ts +20 -0
  409. package/libs/PanoMeasurePlugin/Modules/UIController/index.js +117 -0
  410. package/libs/PanoMeasurePlugin/Modules/UIController/mobileHTML.d.ts +4 -0
  411. package/libs/PanoMeasurePlugin/Modules/UIController/mobileHTML.js +80 -0
  412. package/libs/PanoMeasurePlugin/Modules/UIController/mobileMainBtnController.d.ts +12 -0
  413. package/libs/PanoMeasurePlugin/Modules/UIController/mobileMainBtnController.js +98 -0
  414. package/libs/PanoMeasurePlugin/Modules/UIController/style.d.ts +16 -0
  415. package/libs/PanoMeasurePlugin/Modules/UIController/style.js +71 -0
  416. package/libs/PanoMeasurePlugin/Modules/rangePiece/html.d.ts +4 -0
  417. package/libs/PanoMeasurePlugin/Modules/rangePiece/html.js +64 -0
  418. package/libs/PanoMeasurePlugin/Modules/rangePiece/index.d.ts +44 -0
  419. package/libs/PanoMeasurePlugin/Modules/rangePiece/index.js +264 -0
  420. package/libs/PanoMeasurePlugin/index.d.ts +10 -0
  421. package/libs/PanoMeasurePlugin/index.js +7 -0
  422. package/libs/PanoMeasurePlugin/typings/data.d.ts +37 -0
  423. package/libs/PanoMeasurePlugin/typings/data.js +1 -0
  424. package/libs/PanoMeasurePlugin/typings/event.type.d.ts +37 -0
  425. package/libs/PanoMeasurePlugin/typings/event.type.js +1 -0
  426. package/libs/PanoMeasurePlugin/typings/utils.type.d.ts +1 -0
  427. package/libs/PanoMeasurePlugin/typings/utils.type.js +1 -0
  428. package/libs/PanoMeasurePlugin/utils/calculateThreeMouse.d.ts +10 -0
  429. package/libs/PanoMeasurePlugin/utils/calculateThreeMouse.js +15 -0
  430. package/libs/PanoMeasurePlugin/utils/clearGroup.d.ts +2 -0
  431. package/libs/PanoMeasurePlugin/utils/clearGroup.js +3 -0
  432. package/libs/PanoMeasurePlugin/utils/constants.d.ts +4 -0
  433. package/libs/PanoMeasurePlugin/utils/constants.js +31 -0
  434. package/libs/PanoMeasurePlugin/utils/distanceDom.d.ts +28 -0
  435. package/libs/PanoMeasurePlugin/utils/distanceDom.js +120 -0
  436. package/libs/PanoMeasurePlugin/utils/findAssociatedLines.d.ts +2 -0
  437. package/libs/PanoMeasurePlugin/utils/findAssociatedLines.js +21 -0
  438. package/libs/PanoMeasurePlugin/utils/findClosestPoint.d.ts +10 -0
  439. package/libs/PanoMeasurePlugin/utils/findClosestPoint.js +27 -0
  440. package/libs/PanoMeasurePlugin/utils/getIntersectionFromEvent.d.ts +4 -0
  441. package/libs/PanoMeasurePlugin/utils/getIntersectionFromEvent.js +9 -0
  442. package/libs/PanoMeasurePlugin/utils/getPointFromHammerEvent.d.ts +10 -0
  443. package/libs/PanoMeasurePlugin/utils/getPointFromHammerEvent.js +14 -0
  444. package/libs/PanoMeasurePlugin/utils/ironbox.d.ts +1 -0
  445. package/libs/PanoMeasurePlugin/utils/ironbox.js +1 -0
  446. package/libs/PanoMeasurePlugin/utils/isNDCPointInScreen.d.ts +2 -0
  447. package/libs/PanoMeasurePlugin/utils/isNDCPointInScreen.js +6 -0
  448. package/libs/PanoMeasurePlugin/utils/line.d.ts +17 -0
  449. package/libs/PanoMeasurePlugin/utils/line.js +33 -0
  450. package/libs/PanoMeasurePlugin/utils/math.d.ts +17 -0
  451. package/libs/PanoMeasurePlugin/utils/math.js +44 -0
  452. package/libs/PanoMeasurePlugin/utils/mouseGroup.d.ts +7 -0
  453. package/libs/PanoMeasurePlugin/utils/mouseGroup.js +69 -0
  454. package/libs/PanoMeasurePlugin/utils/ndc2Screen.d.ts +5 -0
  455. package/libs/PanoMeasurePlugin/utils/ndc2Screen.js +6 -0
  456. package/libs/PanoRulerPlugin/Plugin.d.ts +31 -0
  457. package/libs/PanoRulerPlugin/Plugin.js +403 -0
  458. package/libs/PanoRulerPlugin/index.d.ts +4 -30
  459. package/libs/PanoRulerPlugin/index.js +2 -396
  460. package/libs/PanoRulerPlugin/style.d.ts +1 -1
  461. package/libs/PanoRulerPlugin/style.js +1 -0
  462. package/libs/PanoRulerProPlugin/Controller.d.ts +15 -0
  463. package/libs/PanoRulerProPlugin/Controller.js +110 -0
  464. package/libs/PanoRulerProPlugin/RulerItem.js +314 -0
  465. package/libs/PanoRulerProPlugin/RulerItems.js +377 -0
  466. package/libs/PanoRulerProPlugin/index.d.ts +8 -0
  467. package/libs/PanoRulerProPlugin/index.js +8 -0
  468. package/libs/PanoRulerProPlugin/typings.d.ts +46 -0
  469. package/libs/PanoRulerProPlugin/typings.js +1 -0
  470. package/libs/PanoSpatialTagPlugin/Components/origins.js +168 -0
  471. package/libs/PanoSpatialTagPlugin/Components/tag.js +302 -0
  472. package/libs/PanoSpatialTagPlugin/Plugin.d.ts +35 -0
  473. package/libs/PanoSpatialTagPlugin/Plugin.js +426 -0
  474. package/libs/PanoSpatialTagPlugin/index.d.ts +5 -0
  475. package/libs/PanoSpatialTagPlugin/index.js +5 -0
  476. package/libs/PanoSpatialTagPlugin/store.d.ts +1 -0
  477. package/libs/PanoSpatialTagPlugin/store.js +2 -0
  478. package/libs/PanoSpatialTagPlugin/style.d.ts +1 -0
  479. package/libs/PanoSpatialTagPlugin/style.js +8 -0
  480. package/libs/PanoSpatialTagPlugin/typings.d.ts +40 -0
  481. package/libs/PanoSpatialTagPlugin/typings.js +1 -0
  482. package/libs/base/BasePlugin.d.ts +100 -0
  483. package/libs/base/BasePlugin.js +31 -0
  484. package/libs/base/BasePluginWithData.d.ts +34 -0
  485. package/libs/base/BasePluginWithData.js +4 -0
  486. package/libs/components/PaintBrush/Controller.d.ts +43 -0
  487. package/libs/components/PaintBrush/Controller.js +575 -0
  488. package/libs/components/PaintBrush/Subscribe.d.ts +76 -0
  489. package/libs/components/PaintBrush/Subscribe.js +121 -0
  490. package/libs/components/PaintBrush/index.d.ts +27 -0
  491. package/libs/components/PaintBrush/index.js +57 -0
  492. package/libs/components/PaintBrush/style.d.ts +2 -0
  493. package/libs/components/PaintBrush/style.js +102 -0
  494. package/libs/components/PaintBrush/tween.d.ts +62 -0
  495. package/libs/components/PaintBrush/tween.js +15 -0
  496. package/libs/components/PaintBrush/typings.d.ts +58 -0
  497. package/libs/components/PaintBrush/typings.js +6 -0
  498. package/libs/components/PaintBrush/utils.d.ts +26 -0
  499. package/libs/components/PaintBrush/utils.js +51 -0
  500. package/libs/components/index.d.ts +2 -0
  501. package/libs/components/index.js +3 -0
  502. package/libs/floorplan/Assets/compass.d.ts +1 -0
  503. package/libs/floorplan/{ModelFloorplanPlugin/Assets → Assets}/compass.js +0 -0
  504. package/libs/floorplan/Components/BaseImage.js +222 -0
  505. package/libs/floorplan/Components/Camera.js +120 -0
  506. package/libs/floorplan/Components/Compass.js +120 -0
  507. package/libs/floorplan/Components/CurrentFloor.js +469 -0
  508. package/libs/floorplan/Components/Main.js +470 -0
  509. package/libs/floorplan/Components/Normalmage.js +63 -0
  510. package/libs/floorplan/Components/RoomHighlight/Room.js +107 -0
  511. package/libs/floorplan/Components/RoomHighlight/RoomHighlight.js +216 -0
  512. package/libs/floorplan/Components/RoomLabels/RoomLabel.js +322 -0
  513. package/libs/floorplan/Components/RoomLabels/RoomLabels.js +309 -0
  514. package/libs/floorplan/Components/RoomMaterials/RoomMaterial.js +331 -0
  515. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_0.js +64 -0
  516. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.js +104 -0
  517. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.js +142 -0
  518. package/libs/floorplan/Components/RuleLabels/RuleItem.js +284 -0
  519. package/libs/floorplan/Components/RuleLabels/RuleLabels.js +269 -0
  520. package/libs/floorplan/Components/SvgImage.js +83 -0
  521. package/libs/floorplan/ModelFloorplanPlugin/Controller.d.ts +71 -75
  522. package/libs/floorplan/ModelFloorplanPlugin/Controller.js +666 -322
  523. package/libs/floorplan/ModelFloorplanPlugin/index.d.ts +5 -7
  524. package/libs/floorplan/ModelFloorplanPlugin/index.js +2 -2
  525. package/libs/floorplan/ModelFloorplanPlugin/typing.d.ts +107 -0
  526. package/libs/floorplan/ModelFloorplanPlugin/typing.js +1 -0
  527. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.js +168 -0
  528. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.js +250 -0
  529. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.js +154 -0
  530. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.js +373 -0
  531. package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.d.ts +24 -16
  532. package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +195 -43
  533. package/libs/floorplan/PanoFloorplanRadarPlugin/index.d.ts +5 -6
  534. package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +2 -2
  535. package/libs/floorplan/PanoFloorplanRadarPlugin/typing.d.ts +52 -0
  536. package/libs/floorplan/PanoFloorplanRadarPlugin/typing.js +1 -0
  537. package/libs/floorplan/TopviewFloorplanPlugin/Controller.d.ts +53 -45
  538. package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +451 -154
  539. package/libs/floorplan/TopviewFloorplanPlugin/index.d.ts +6 -4
  540. package/libs/floorplan/TopviewFloorplanPlugin/index.js +2 -2
  541. package/libs/floorplan/TopviewFloorplanPlugin/style.js +1 -1
  542. package/libs/floorplan/TopviewFloorplanPlugin/typing.d.ts +86 -0
  543. package/libs/floorplan/TopviewFloorplanPlugin/typing.js +1 -0
  544. package/libs/floorplan/constant.d.ts +5 -0
  545. package/libs/floorplan/constant.js +6 -0
  546. package/libs/floorplan/index.d.ts +6 -0
  547. package/libs/floorplan/index.js +7 -0
  548. package/libs/floorplan/typings/floorplanServerData.d.ts +4 -0
  549. package/libs/floorplan/utils/constant.d.ts +22 -0
  550. package/libs/floorplan/{ModelFloorplanPlugin/utils → utils}/constant.js +9 -2
  551. package/libs/floorplan/utils/correctFiveState.d.ts +15 -0
  552. package/libs/floorplan/{ModelFloorplanPlugin/utils → utils}/correctFiveState.js +16 -16
  553. package/libs/floorplan/utils/formatPosition.d.ts +1 -1
  554. package/libs/floorplan/utils/formatPosition.js +3 -3
  555. package/libs/index.d.ts +17 -21
  556. package/libs/index.js +29 -12
  557. package/libs/shared-utils/Subscribe.js +8 -1
  558. package/libs/shared-utils/animationFrame/BetterTween.js +47 -18
  559. package/libs/shared-utils/createCanvasTextTexture.js +6 -5
  560. package/libs/shared-utils/five/changeMode.d.ts +4 -1
  561. package/libs/shared-utils/five/changeMode.js +34 -13
  562. package/libs/shared-utils/getPxmm.d.ts +14 -1
  563. package/libs/shared-utils/getPxmm.js +31 -12
  564. package/libs/shared-utils/index.d.ts +1 -0
  565. package/libs/shared-utils/index.js +1 -0
  566. package/libs/shared-utils/logger.d.ts +16 -0
  567. package/libs/shared-utils/logger.js +47 -0
  568. package/libs/shared-utils/math/Interval.d.ts +13 -0
  569. package/libs/shared-utils/math/Interval.js +40 -0
  570. package/libs/shared-utils/math/Rectangle.d.ts +27 -0
  571. package/libs/shared-utils/math/Rectangle.js +50 -0
  572. package/libs/shared-utils/math/evenNumber.js +1 -1
  573. package/libs/shared-utils/math/index.d.ts +2 -0
  574. package/libs/shared-utils/math/index.js +2 -0
  575. package/libs/shared-utils/three/getExtraModelLoader.d.ts +1 -1
  576. package/libs/shared-utils/three/getNormal.d.ts +1 -1
  577. package/libs/shared-utils/three/getTextureLoader.d.ts +1 -1
  578. package/libs/shared-utils/three/loadFbxObj.d.ts +1 -1
  579. package/libs/shared-utils/three/transfromToMeshBasicMaterial.js +2 -1
  580. package/libs/shared-utils/tinyEJSrender.d.ts +5 -0
  581. package/libs/shared-utils/tinyEJSrender.js +210 -0
  582. package/libs/shared-utils/uuid.d.ts +1 -0
  583. package/libs/shared-utils/uuid.js +1 -0
  584. package/libs/shared-utils/vectorTocoordinates.d.ts +1 -1
  585. package/package.json +30 -14
  586. package/CHANGELOG.md +0 -7
  587. package/dist/dnalogel.cjs.js +0 -2
  588. package/dist/dnalogel.es.js +0 -37796
  589. package/dist/dnalogel.umd.js +0 -2
  590. package/dist/style.css +0 -1
  591. package/libs/ModelRoomLabelPlugin/RoomLabelItem.svelte +0 -63
  592. package/libs/ModelRoomLabelPlugin/RoomLabelItem.svelte.map +0 -1
  593. package/libs/ModelRoomLabelPlugin/RoomLabelItems.svelte +0 -80
  594. package/libs/ModelRoomLabelPlugin/RoomLabelItems.svelte.map +0 -1
  595. package/libs/floorplan/Components/BaseImage.svelte +0 -25
  596. package/libs/floorplan/Components/BaseImage.svelte.map +0 -1
  597. package/libs/floorplan/Components/Normalmage.svelte +0 -11
  598. package/libs/floorplan/Components/Normalmage.svelte.map +0 -1
  599. package/libs/floorplan/Components/RoomHighlight/Room.svelte +0 -21
  600. package/libs/floorplan/Components/RoomHighlight/Room.svelte.map +0 -1
  601. package/libs/floorplan/Components/RoomHighlight/RoomHighlight.svelte +0 -60
  602. package/libs/floorplan/Components/RoomHighlight/RoomHighlight.svelte.map +0 -1
  603. package/libs/floorplan/Components/RoomMaterials/RoomMaterial.svelte +0 -35
  604. package/libs/floorplan/Components/RoomMaterials/RoomMaterial.svelte.map +0 -1
  605. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_0.svelte +0 -7
  606. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_0.svelte.map +0 -1
  607. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.svelte +0 -16
  608. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.svelte.map +0 -1
  609. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.svelte +0 -17
  610. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.svelte.map +0 -1
  611. package/libs/floorplan/Components/SvgImage.svelte +0 -25
  612. package/libs/floorplan/Components/SvgImage.svelte.map +0 -1
  613. package/libs/floorplan/ModelFloorplanPlugin/Components/Camera.svelte +0 -46
  614. package/libs/floorplan/ModelFloorplanPlugin/Components/Camera.svelte.map +0 -1
  615. package/libs/floorplan/ModelFloorplanPlugin/Components/Compass.svelte +0 -48
  616. package/libs/floorplan/ModelFloorplanPlugin/Components/Compass.svelte.map +0 -1
  617. package/libs/floorplan/ModelFloorplanPlugin/Components/CurrentFloor/CurrentFloor.svelte +0 -37
  618. package/libs/floorplan/ModelFloorplanPlugin/Components/CurrentFloor/CurrentFloor.svelte.map +0 -1
  619. package/libs/floorplan/ModelFloorplanPlugin/Components/Main.svelte +0 -50
  620. package/libs/floorplan/ModelFloorplanPlugin/Components/Main.svelte.map +0 -1
  621. package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabel.svelte +0 -41
  622. package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabel.svelte.map +0 -1
  623. package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabels.svelte +0 -25
  624. package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabels.svelte.map +0 -1
  625. package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleItem.svelte +0 -148
  626. package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleItem.svelte.map +0 -1
  627. package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleLabels.svelte +0 -15
  628. package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleLabels.svelte.map +0 -1
  629. package/libs/floorplan/ModelFloorplanPlugin/typings/events.type.d.ts +0 -23
  630. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.svelte +0 -84
  631. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.svelte.map +0 -1
  632. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.svelte +0 -18
  633. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.svelte.map +0 -1
  634. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.svelte +0 -40
  635. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.svelte.map +0 -1
  636. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.svelte +0 -61
  637. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.svelte.map +0 -1
  638. package/libs/shared-utils/five/useFivePlugin.d.ts +0 -1
  639. package/libs/shared-utils/five/useFivePlugin.js +0 -8
  640. package/libs/shared-utils/useDebounce.d.ts +0 -8
  641. package/libs/shared-utils/useDebounce.js +0 -22
  642. package/libs/shared-utils/useThrottle.d.ts +0 -8
  643. package/libs/shared-utils/useThrottle.js +0 -25
@@ -0,0 +1,4533 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var internal = require('svelte/internal');
6
+ var easing = require('svelte/easing');
7
+ var transition = require('svelte/transition');
8
+ var store = require('svelte/store');
9
+ var svelte = require('svelte');
10
+ var THREE = require('three');
11
+ var five = require('@realsee/five');
12
+
13
+ function _interopNamespace(e) {
14
+ if (e && e.__esModule) return e;
15
+ var n = Object.create(null);
16
+ if (e) {
17
+ Object.keys(e).forEach(function (k) {
18
+ if (k !== 'default') {
19
+ var d = Object.getOwnPropertyDescriptor(e, k);
20
+ Object.defineProperty(n, k, d.get ? d : {
21
+ enumerable: true,
22
+ get: function () { return e[k]; }
23
+ });
24
+ }
25
+ });
26
+ }
27
+ n["default"] = e;
28
+ return Object.freeze(n);
29
+ }
30
+
31
+ var THREE__namespace = /*#__PURE__*/_interopNamespace(THREE);
32
+
33
+ /**
34
+ * 传入一个 Promise
35
+ * 无异常,返回 [null, data]
36
+ * 有异常,则返回 [Error, undefined]
37
+ * 用于替代 try&catch 处理 await 异常的方案
38
+ */
39
+ async function to(promise) {
40
+ try {
41
+ const data = await promise;
42
+ return [null, data];
43
+ }
44
+ catch (error) {
45
+ if (error instanceof Error)
46
+ return [error, null];
47
+ return [new Error(''), null];
48
+ }
49
+ }
50
+
51
+ /**
52
+ * 检查一个值是否是狭义上的对象
53
+ * @param {any} value 要检查的值
54
+ *
55
+ * isTruelyObject({})
56
+ * // => true
57
+ *
58
+ * isObjectLike([1, 2, 3])
59
+ * // => false
60
+ *
61
+ * isObjectLike(Function)
62
+ * // => false
63
+ *
64
+ * isObjectLike(null)
65
+ * // => false
66
+ *
67
+ */
68
+ function isTruelyObject(value) {
69
+ return Object.prototype.toString.call(value) === '[object Object]';
70
+ }
71
+
72
+ /* eslint-disable @typescript-eslint/no-use-before-define */
73
+ function baseIsEqual(value, other) {
74
+ if (value === other)
75
+ return true;
76
+ if (typeof value !== typeof other)
77
+ return false;
78
+ if (Number.isNaN(value) && Number.isNaN(other))
79
+ return true;
80
+ return false;
81
+ }
82
+ function objEqualShallow(value, other) {
83
+ const valueProps = Object.getOwnPropertyNames(value);
84
+ const otherProps = Object.getOwnPropertyNames(other);
85
+ if (valueProps.length !== otherProps.length)
86
+ return false;
87
+ for (let i = 0, len = valueProps.length; i < len; i++) {
88
+ const propName = valueProps[i];
89
+ if (!baseIsEqual(value[propName], other[propName]))
90
+ return false;
91
+ }
92
+ return true;
93
+ }
94
+ function arrayEqualShallow(value, other) {
95
+ if (value.length !== other.length)
96
+ return false;
97
+ for (let i = 0, len = value.length; i < len; i++) {
98
+ if (!baseIsEqual(value[i], other[i]))
99
+ return false;
100
+ }
101
+ return true;
102
+ }
103
+ function isShallowEqual(value, other) {
104
+ if (baseIsEqual(value, other))
105
+ return true;
106
+ if (isTruelyObject(value) && isTruelyObject(other))
107
+ return objEqualShallow(value, other);
108
+ if (Array.isArray(value) && Array.isArray(other))
109
+ return arrayEqualShallow(value, other);
110
+ return false;
111
+ }
112
+ function isDeepEqual(value, other) {
113
+ if (baseIsEqual(value, other))
114
+ return true;
115
+ if (isTruelyObject(value) && isTruelyObject(other))
116
+ return objEqualDeep(value, other);
117
+ if (Array.isArray(value) && Array.isArray(other))
118
+ return arrayEqualDeep(value, other);
119
+ return false;
120
+ }
121
+ function arrayEqualDeep(value, other) {
122
+ if (value.length !== other.length)
123
+ return false;
124
+ for (let i = 0, len = value.length; i < len; i++) {
125
+ if (!isDeepEqual(value[i], other[i]))
126
+ return false;
127
+ }
128
+ return true;
129
+ }
130
+ function objEqualDeep(value, other) {
131
+ const valueProps = Object.getOwnPropertyNames(value);
132
+ const otherProps = Object.getOwnPropertyNames(other);
133
+ if (valueProps.length !== otherProps.length)
134
+ return false;
135
+ for (let i = 0, len = valueProps.length; i < len; i++) {
136
+ const propName = valueProps[i];
137
+ if (!isDeepEqual(value[propName], other[propName]))
138
+ return false;
139
+ }
140
+ return true;
141
+ }
142
+ /**
143
+ * 对象比较
144
+ * @param {*} value 第一个比较的值
145
+ * @param {*} other 第二个比较的值
146
+ * @param {Object} options 可选参数,可选项包括:<br />
147
+ * deep {Boolean} 是否深比较<br />
148
+ * @returns {boolean} 是否相等
149
+ */
150
+ function equal(value, other, opt = { deep: false }) {
151
+ if (!opt.deep)
152
+ return isShallowEqual(value, other);
153
+ return isDeepEqual(value, other);
154
+ }
155
+
156
+ const CAMERA_IMAGE = 'data:image/png;base64,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';
157
+
158
+ function rad2Deg$1(rad) {
159
+ return (rad * 180) / Math.PI;
160
+ }
161
+
162
+ /* src/floorplan/Components/Camera.svelte generated by Svelte v3.47.0 */
163
+
164
+ function add_css$d(target) {
165
+ internal.append_styles(target, "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%}");
166
+ }
167
+
168
+ function create_fragment$g(ctx) {
169
+ let div1;
170
+ let div0;
171
+
172
+ return {
173
+ c() {
174
+ div1 = internal.element("div");
175
+ div0 = internal.element("div");
176
+ internal.attr(div0, "class", "floorplan__camera-rotate svelte-17cl35n");
177
+ internal.set_style(div0, "background-image", `url(${/*cameraImageUrl*/ ctx[0] || CAMERA_IMAGE})`);
178
+ internal.set_style(div0, "width", /*domSizeStyle*/ ctx[4], false);
179
+ internal.set_style(div0, "height", /*domSizeStyle*/ ctx[4], false);
180
+ internal.set_style(div0, "left", '-' + /*domSizeStyle*/ ctx[4], false);
181
+ internal.set_style(div0, "top", '-' + /*domSizeStyle*/ ctx[4], false);
182
+ internal.set_style(div0, "transform", `rotate(${/*rotate*/ ctx[3]}deg)`, false);
183
+ internal.set_style(div0, "transform-origin", `${/*domSizeStyle*/ ctx[4]} ${/*domSizeStyle*/ ctx[4]}`, false);
184
+ internal.attr(div1, "class", "floorplan__camera-position svelte-17cl35n");
185
+ internal.set_style(div1, "left", /*positionLeft*/ ctx[1], false);
186
+ internal.set_style(div1, "top", /*positionTop*/ ctx[2], false);
187
+ },
188
+ m(target, anchor) {
189
+ internal.insert(target, div1, anchor);
190
+ internal.append(div1, div0);
191
+ },
192
+ p(ctx, [dirty]) {
193
+ if (dirty & /*cameraImageUrl*/ 1) {
194
+ internal.set_style(div0, "background-image", `url(${/*cameraImageUrl*/ ctx[0] || CAMERA_IMAGE})`);
195
+ }
196
+ },
197
+ i: internal.noop,
198
+ o: internal.noop,
199
+ d(detaching) {
200
+ if (detaching) internal.detach(div1);
201
+ }
202
+ };
203
+ }
204
+
205
+ function instance$g($$self, $$props, $$invalidate) {
206
+ let { panoIndex } = $$props;
207
+ let { floorplanData } = $$props;
208
+ let { lastPanoramaLongitude } = $$props;
209
+ let { cameraImageUrl } = $$props;
210
+ const { observers } = floorplanData;
211
+ const observer = observers[panoIndex];
212
+ const leftRatio = observer.positionInImage.x;
213
+ const topRatio = observer.positionInImage.y;
214
+ const positionLeft = leftRatio * 100 + '%';
215
+ const positionTop = topRatio * 100 + '%';
216
+ const rotate = -rad2Deg$1(lastPanoramaLongitude) + 45;
217
+
218
+ // TODO: 统一这里的判断条件,目前写了多处
219
+ const bodyWidth = document.body.clientWidth;
220
+
221
+ const bodyHeight = document.body.clientHeight;
222
+ const size = bodyWidth < 500 || bodyHeight < 500 ? 17 : 37;
223
+ const domSizeStyle = `${size / 16}rem`;
224
+
225
+ $$self.$$set = $$props => {
226
+ if ('panoIndex' in $$props) $$invalidate(5, panoIndex = $$props.panoIndex);
227
+ if ('floorplanData' in $$props) $$invalidate(6, floorplanData = $$props.floorplanData);
228
+ if ('lastPanoramaLongitude' in $$props) $$invalidate(7, lastPanoramaLongitude = $$props.lastPanoramaLongitude);
229
+ if ('cameraImageUrl' in $$props) $$invalidate(0, cameraImageUrl = $$props.cameraImageUrl);
230
+ };
231
+
232
+ return [
233
+ cameraImageUrl,
234
+ positionLeft,
235
+ positionTop,
236
+ rotate,
237
+ domSizeStyle,
238
+ panoIndex,
239
+ floorplanData,
240
+ lastPanoramaLongitude
241
+ ];
242
+ }
243
+
244
+ class Camera extends internal.SvelteComponent {
245
+ constructor(options) {
246
+ super();
247
+
248
+ internal.init(
249
+ this,
250
+ options,
251
+ instance$g,
252
+ create_fragment$g,
253
+ internal.safe_not_equal,
254
+ {
255
+ panoIndex: 5,
256
+ floorplanData: 6,
257
+ lastPanoramaLongitude: 7,
258
+ cameraImageUrl: 0
259
+ },
260
+ add_css$d
261
+ );
262
+ }
263
+ }
264
+
265
+ const COMPASS_IMAGE = 'data:image/png;base64,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';
266
+
267
+ /* src/floorplan/Components/Compass.svelte generated by Svelte v3.47.0 */
268
+
269
+ function add_css$c(target) {
270
+ internal.append_styles(target, "svelte-z9kwkx", ".floorplan-plugin__compass.svelte-z9kwkx{position:absolute;left:50%;top:-2.39583rem;width:12.03125rem;height:2.13542rem;will-change:opacity;transform-origin:center 9.58333rem}.floorplan-plugin__compass-image.svelte-z9kwkx{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-z9kwkx{position:absolute;left:50%;top:0.78125rem;transform:translateX(-50%);opacity:0.2;font-weight:bold;font-size:0.52083rem;color:#fff}");
271
+ }
272
+
273
+ // (14:0) {#if canCompassShow}
274
+ function create_if_block$6(ctx) {
275
+ let div1;
276
+ let div0;
277
+ let t0;
278
+ let span;
279
+ let t1;
280
+
281
+ return {
282
+ c() {
283
+ div1 = internal.element("div");
284
+ div0 = internal.element("div");
285
+ t0 = internal.space();
286
+ span = internal.element("span");
287
+ t1 = internal.text(/*northDesc*/ ctx[0]);
288
+ internal.attr(div0, "class", "floorplan-plugin__compass-image svelte-z9kwkx");
289
+ internal.set_style(div0, "background-image", `url(${COMPASS_IMAGE})`);
290
+ internal.attr(span, "class", "floorplan-plugin__compass-text svelte-z9kwkx");
291
+ internal.attr(div1, "class", "floorplan-plugin__compass svelte-z9kwkx");
292
+ internal.set_style(div1, "transform", /*compassTransformStyle*/ ctx[2], false);
293
+ },
294
+ m(target, anchor) {
295
+ internal.insert(target, div1, anchor);
296
+ internal.append(div1, div0);
297
+ internal.append(div1, t0);
298
+ internal.append(div1, span);
299
+ internal.append(span, t1);
300
+ },
301
+ p(ctx, dirty) {
302
+ if (dirty & /*northDesc*/ 1) internal.set_data(t1, /*northDesc*/ ctx[0]);
303
+ },
304
+ d(detaching) {
305
+ if (detaching) internal.detach(div1);
306
+ }
307
+ };
308
+ }
309
+
310
+ function create_fragment$f(ctx) {
311
+ let if_block_anchor;
312
+ let if_block = /*canCompassShow*/ ctx[1] && create_if_block$6(ctx);
313
+
314
+ return {
315
+ c() {
316
+ if (if_block) if_block.c();
317
+ if_block_anchor = internal.empty();
318
+ },
319
+ m(target, anchor) {
320
+ if (if_block) if_block.m(target, anchor);
321
+ internal.insert(target, if_block_anchor, anchor);
322
+ },
323
+ p(ctx, [dirty]) {
324
+ if (/*canCompassShow*/ ctx[1]) if_block.p(ctx, dirty);
325
+ },
326
+ i: internal.noop,
327
+ o: internal.noop,
328
+ d(detaching) {
329
+ if (if_block) if_block.d(detaching);
330
+ if (detaching) internal.detach(if_block_anchor);
331
+ }
332
+ };
333
+ }
334
+
335
+ function rad2Deg(rad) {
336
+ return rad / Math.PI * 180;
337
+ }
338
+
339
+ function instance$f($$self, $$props, $$invalidate) {
340
+ var _a;
341
+ let { floorplanData } = $$props;
342
+ let { northDesc } = $$props;
343
+
344
+ const northRad = (_a = floorplanData.entrance) === null || _a === void 0
345
+ ? void 0
346
+ : _a.northRad;
347
+
348
+ const canCompassShow = typeof northRad === 'number';
349
+ const rotate = !northRad ? 0 : rad2Deg(northRad);
350
+ const compassTransformStyle = `translateX(-50%) translateZ(10px) rotate(${-rotate + 90}deg)`;
351
+
352
+ $$self.$$set = $$props => {
353
+ if ('floorplanData' in $$props) $$invalidate(3, floorplanData = $$props.floorplanData);
354
+ if ('northDesc' in $$props) $$invalidate(0, northDesc = $$props.northDesc);
355
+ };
356
+
357
+ return [northDesc, canCompassShow, compassTransformStyle, floorplanData];
358
+ }
359
+
360
+ class Compass extends internal.SvelteComponent {
361
+ constructor(options) {
362
+ super();
363
+ internal.init(this, options, instance$f, create_fragment$f, internal.safe_not_equal, { floorplanData: 3, northDesc: 0 }, add_css$c);
364
+ }
365
+ }
366
+
367
+ /* src/floorplan/Components/Normalmage.svelte generated by Svelte v3.47.0 */
368
+
369
+ function add_css$b(target) {
370
+ internal.append_styles(target, "svelte-1gfoniz", "img.svelte-1gfoniz{width:100%;height:100%}");
371
+ }
372
+
373
+ function create_fragment$e(ctx) {
374
+ let img;
375
+ let img_src_value;
376
+
377
+ return {
378
+ c() {
379
+ img = internal.element("img");
380
+ if (!internal.src_url_equal(img.src, img_src_value = /*url*/ ctx[0])) internal.attr(img, "src", img_src_value);
381
+ internal.attr(img, "alt", "floorplan iamge");
382
+ internal.attr(img, "class", "svelte-1gfoniz");
383
+ },
384
+ m(target, anchor) {
385
+ internal.insert(target, img, anchor);
386
+ },
387
+ p(ctx, [dirty]) {
388
+ if (dirty & /*url*/ 1 && !internal.src_url_equal(img.src, img_src_value = /*url*/ ctx[0])) {
389
+ internal.attr(img, "src", img_src_value);
390
+ }
391
+ },
392
+ i: internal.noop,
393
+ o: internal.noop,
394
+ d(detaching) {
395
+ if (detaching) internal.detach(img);
396
+ }
397
+ };
398
+ }
399
+
400
+ function instance$e($$self, $$props, $$invalidate) {
401
+ let { url } = $$props;
402
+
403
+ $$self.$$set = $$props => {
404
+ if ('url' in $$props) $$invalidate(0, url = $$props.url);
405
+ };
406
+
407
+ return [url];
408
+ }
409
+
410
+ class Normalmage extends internal.SvelteComponent {
411
+ constructor(options) {
412
+ super();
413
+ internal.init(this, options, instance$e, create_fragment$e, internal.safe_not_equal, { url: 0 }, add_css$b);
414
+ }
415
+ }
416
+
417
+ /* src/floorplan/Components/SvgImage.svelte generated by Svelte v3.47.0 */
418
+
419
+ function add_css$a(target) {
420
+ internal.append_styles(target, "svelte-ub47ya", ".floorplan-plugin__base-image.svelte-ub47ya{width:100%;height:100%}");
421
+ }
422
+
423
+ function create_fragment$d(ctx) {
424
+ let div;
425
+ let html_tag;
426
+ let t;
427
+ let html_tag_1;
428
+
429
+ return {
430
+ c() {
431
+ div = internal.element("div");
432
+ html_tag = new internal.HtmlTag();
433
+ t = internal.space();
434
+ html_tag_1 = new internal.HtmlTag();
435
+ html_tag.a = t;
436
+ html_tag_1.a = null;
437
+ internal.attr(div, "class", "floorplan-plugin__base-image svelte-ub47ya");
438
+ },
439
+ m(target, anchor) {
440
+ internal.insert(target, div, anchor);
441
+ html_tag.m(/*svgStyle*/ ctx[1], div);
442
+ internal.append(div, t);
443
+ html_tag_1.m(/*content*/ ctx[0], div);
444
+ },
445
+ p(ctx, [dirty]) {
446
+ if (dirty & /*content*/ 1) html_tag_1.p(/*content*/ ctx[0]);
447
+ },
448
+ i: internal.noop,
449
+ o: internal.noop,
450
+ d(detaching) {
451
+ if (detaching) internal.detach(div);
452
+ }
453
+ };
454
+ }
455
+
456
+ function instance$d($$self, $$props, $$invalidate) {
457
+ let { content } = $$props;
458
+
459
+ const svgStyle = `
460
+ <style>
461
+ svg [type='lineGroup'] path {
462
+ fill: #ffffff;
463
+ stroke: #ffffff;
464
+ }
465
+ svg [type='lineItemGroup'] g g g g {
466
+ stroke: #ffffff;
467
+ }</style>
468
+ `;
469
+
470
+ $$self.$$set = $$props => {
471
+ if ('content' in $$props) $$invalidate(0, content = $$props.content);
472
+ };
473
+
474
+ return [content, svgStyle];
475
+ }
476
+
477
+ class SvgImage extends internal.SvelteComponent {
478
+ constructor(options) {
479
+ super();
480
+ internal.init(this, options, instance$d, create_fragment$d, internal.safe_not_equal, { content: 0 }, add_css$a);
481
+ }
482
+ }
483
+
484
+ /* src/floorplan/Components/BaseImage.svelte generated by Svelte v3.47.0 */
485
+
486
+ function add_css$9(target) {
487
+ internal.append_styles(target, "svelte-ozpg4a", ".floorplan-plugin__base-image.svelte-ozpg4a{position:absolute;z-index:10;width:100%;height:100%;pointer-events:none}");
488
+ }
489
+
490
+ // (13:22)
491
+ function create_if_block_1$4(ctx) {
492
+ let normalimage;
493
+ let current;
494
+ normalimage = new Normalmage({ props: { url: /*imageData*/ ctx[1].url } });
495
+
496
+ return {
497
+ c() {
498
+ internal.create_component(normalimage.$$.fragment);
499
+ },
500
+ m(target, anchor) {
501
+ internal.mount_component(normalimage, target, anchor);
502
+ current = true;
503
+ },
504
+ p(ctx, dirty) {
505
+ const normalimage_changes = {};
506
+ if (dirty & /*imageData*/ 2) normalimage_changes.url = /*imageData*/ ctx[1].url;
507
+ normalimage.$set(normalimage_changes);
508
+ },
509
+ i(local) {
510
+ if (current) return;
511
+ internal.transition_in(normalimage.$$.fragment, local);
512
+ current = true;
513
+ },
514
+ o(local) {
515
+ internal.transition_out(normalimage.$$.fragment, local);
516
+ current = false;
517
+ },
518
+ d(detaching) {
519
+ internal.destroy_component(normalimage, detaching);
520
+ }
521
+ };
522
+ }
523
+
524
+ // (11:2) {#if svgContent}
525
+ function create_if_block$5(ctx) {
526
+ let svgimage;
527
+ let current;
528
+
529
+ svgimage = new SvgImage({
530
+ props: { content: /*svgContent*/ ctx[0] }
531
+ });
532
+
533
+ return {
534
+ c() {
535
+ internal.create_component(svgimage.$$.fragment);
536
+ },
537
+ m(target, anchor) {
538
+ internal.mount_component(svgimage, target, anchor);
539
+ current = true;
540
+ },
541
+ p(ctx, dirty) {
542
+ const svgimage_changes = {};
543
+ if (dirty & /*svgContent*/ 1) svgimage_changes.content = /*svgContent*/ ctx[0];
544
+ svgimage.$set(svgimage_changes);
545
+ },
546
+ i(local) {
547
+ if (current) return;
548
+ internal.transition_in(svgimage.$$.fragment, local);
549
+ current = true;
550
+ },
551
+ o(local) {
552
+ internal.transition_out(svgimage.$$.fragment, local);
553
+ current = false;
554
+ },
555
+ d(detaching) {
556
+ internal.destroy_component(svgimage, detaching);
557
+ }
558
+ };
559
+ }
560
+
561
+ function create_fragment$c(ctx) {
562
+ let div;
563
+ let current_block_type_index;
564
+ let if_block;
565
+ let current;
566
+ const if_block_creators = [create_if_block$5, create_if_block_1$4];
567
+ const if_blocks = [];
568
+
569
+ function select_block_type(ctx, dirty) {
570
+ if (/*svgContent*/ ctx[0]) return 0;
571
+ if (/*imageData*/ ctx[1]) return 1;
572
+ return -1;
573
+ }
574
+
575
+ if (~(current_block_type_index = select_block_type(ctx))) {
576
+ if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
577
+ }
578
+
579
+ return {
580
+ c() {
581
+ div = internal.element("div");
582
+ if (if_block) if_block.c();
583
+ internal.attr(div, "class", "floorplan-plugin__base-image svelte-ozpg4a");
584
+ },
585
+ m(target, anchor) {
586
+ internal.insert(target, div, anchor);
587
+
588
+ if (~current_block_type_index) {
589
+ if_blocks[current_block_type_index].m(div, null);
590
+ }
591
+
592
+ current = true;
593
+ },
594
+ p(ctx, [dirty]) {
595
+ let previous_block_index = current_block_type_index;
596
+ current_block_type_index = select_block_type(ctx);
597
+
598
+ if (current_block_type_index === previous_block_index) {
599
+ if (~current_block_type_index) {
600
+ if_blocks[current_block_type_index].p(ctx, dirty);
601
+ }
602
+ } else {
603
+ if (if_block) {
604
+ internal.group_outros();
605
+
606
+ internal.transition_out(if_blocks[previous_block_index], 1, 1, () => {
607
+ if_blocks[previous_block_index] = null;
608
+ });
609
+
610
+ internal.check_outros();
611
+ }
612
+
613
+ if (~current_block_type_index) {
614
+ if_block = if_blocks[current_block_type_index];
615
+
616
+ if (!if_block) {
617
+ if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
618
+ if_block.c();
619
+ } else {
620
+ if_block.p(ctx, dirty);
621
+ }
622
+
623
+ internal.transition_in(if_block, 1);
624
+ if_block.m(div, null);
625
+ } else {
626
+ if_block = null;
627
+ }
628
+ }
629
+ },
630
+ i(local) {
631
+ if (current) return;
632
+ internal.transition_in(if_block);
633
+ current = true;
634
+ },
635
+ o(local) {
636
+ internal.transition_out(if_block);
637
+ current = false;
638
+ },
639
+ d(detaching) {
640
+ if (detaching) internal.detach(div);
641
+
642
+ if (~current_block_type_index) {
643
+ if_blocks[current_block_type_index].d();
644
+ }
645
+ }
646
+ };
647
+ }
648
+
649
+ function instance$c($$self, $$props, $$invalidate) {
650
+ let imageData;
651
+ let svgContent;
652
+ var _a, _b;
653
+ let { floorIndex } = $$props;
654
+ let { floorplanData } = $$props;
655
+
656
+ $$self.$$set = $$props => {
657
+ if ('floorIndex' in $$props) $$invalidate(2, floorIndex = $$props.floorIndex);
658
+ if ('floorplanData' in $$props) $$invalidate(3, floorplanData = $$props.floorplanData);
659
+ };
660
+
661
+ $$self.$$.update = () => {
662
+ if ($$self.$$.dirty & /*floorplanData, floorIndex*/ 12) {
663
+ $$invalidate(1, imageData = floorplanData.outlines[floorIndex]);
664
+ }
665
+
666
+ if ($$self.$$.dirty & /*floorplanData, _a, floorIndex, _b*/ 60) {
667
+ $$invalidate(0, svgContent = $$invalidate(5, _b = $$invalidate(4, _a = floorplanData.outlines) === null || _a === void 0
668
+ ? void 0
669
+ : _a[floorIndex]) === null || _b === void 0
670
+ ? void 0
671
+ : _b.svgContent);
672
+ }
673
+ };
674
+
675
+ return [svgContent, imageData, floorIndex, floorplanData, _a, _b];
676
+ }
677
+
678
+ class BaseImage extends internal.SvelteComponent {
679
+ constructor(options) {
680
+ super();
681
+ internal.init(this, options, instance$c, create_fragment$c, internal.safe_not_equal, { floorIndex: 2, floorplanData: 3 }, add_css$9);
682
+ }
683
+ }
684
+
685
+ /* src/floorplan/Components/RoomLabels/RoomLabel.svelte generated by Svelte v3.47.0 */
686
+
687
+ function add_css$8(target) {
688
+ internal.append_styles(target, "svelte-12pzct5", ".floorplan-plugin__room-label-item.svelte-12pzct5{position:absolute;display:flex;flex-flow:column;align-items:center;line-height:1;color:#fff;transform:translate(-50%, -50%);white-space:nowrap;will-change:opacity;transition:opacity 300ms}.floorplan-plugin__room-size.svelte-12pzct5{opacity:0.45}");
689
+ }
690
+
691
+ // (95:30)
692
+ function create_if_block_1$3(ctx) {
693
+ let html_tag;
694
+ let raw_value = /*userConfigElement*/ ctx[4].outerHTML + "";
695
+ let html_anchor;
696
+
697
+ return {
698
+ c() {
699
+ html_tag = new internal.HtmlTag();
700
+ html_anchor = internal.empty();
701
+ html_tag.a = html_anchor;
702
+ },
703
+ m(target, anchor) {
704
+ html_tag.m(raw_value, target, anchor);
705
+ internal.insert(target, html_anchor, anchor);
706
+ },
707
+ p(ctx, dirty) {
708
+ if (dirty & /*userConfigElement*/ 16 && raw_value !== (raw_value = /*userConfigElement*/ ctx[4].outerHTML + "")) html_tag.p(raw_value);
709
+ },
710
+ d(detaching) {
711
+ if (detaching) internal.detach(html_anchor);
712
+ if (detaching) html_tag.d();
713
+ }
714
+ };
715
+ }
716
+
717
+ // (89:2) {#if getLabelElement === undefined}
718
+ function create_if_block$4(ctx) {
719
+ let span0;
720
+ let t0_value = /*room*/ ctx[0].name + "";
721
+ let t0;
722
+ let t1;
723
+ let span1;
724
+
725
+ return {
726
+ c() {
727
+ span0 = internal.element("span");
728
+ t0 = internal.text(t0_value);
729
+ t1 = internal.space();
730
+ span1 = internal.element("span");
731
+ span1.textContent = `${/*roomSizeDes*/ ctx[5]}`;
732
+ internal.attr(span0, "class", "floorplan-plugin__room-name");
733
+ internal.attr(span1, "class", "floorplan-plugin__room-size svelte-12pzct5");
734
+ },
735
+ m(target, anchor) {
736
+ internal.insert(target, span0, anchor);
737
+ internal.append(span0, t0);
738
+ internal.insert(target, t1, anchor);
739
+ internal.insert(target, span1, anchor);
740
+ },
741
+ p(ctx, dirty) {
742
+ if (dirty & /*room*/ 1 && t0_value !== (t0_value = /*room*/ ctx[0].name + "")) internal.set_data(t0, t0_value);
743
+ },
744
+ d(detaching) {
745
+ if (detaching) internal.detach(span0);
746
+ if (detaching) internal.detach(t1);
747
+ if (detaching) internal.detach(span1);
748
+ }
749
+ };
750
+ }
751
+
752
+ function create_fragment$b(ctx) {
753
+ let div;
754
+
755
+ function select_block_type(ctx, dirty) {
756
+ if (/*getLabelElement*/ ctx[1] === undefined) return create_if_block$4;
757
+ if (/*userConfigElement*/ ctx[4]) return create_if_block_1$3;
758
+ }
759
+
760
+ let current_block_type = select_block_type(ctx);
761
+ let if_block = current_block_type && current_block_type(ctx);
762
+
763
+ return {
764
+ c() {
765
+ div = internal.element("div");
766
+ if (if_block) if_block.c();
767
+ internal.attr(div, "class", "floorplan-plugin__room-label-item svelte-12pzct5");
768
+ internal.set_style(div, "left", /*left*/ ctx[6], false);
769
+ internal.set_style(div, "top", /*top*/ ctx[7], false);
770
+ internal.set_style(div, "font-size", /*fontSize*/ ctx[8], false);
771
+ internal.set_style(div, "opacity", /*labelVisible*/ ctx[3] ? '1' : '0', false);
772
+ },
773
+ m(target, anchor) {
774
+ internal.insert(target, div, anchor);
775
+ if (if_block) if_block.m(div, null);
776
+ /*div_binding*/ ctx[15](div);
777
+ },
778
+ p(ctx, [dirty]) {
779
+ if (current_block_type === (current_block_type = select_block_type(ctx)) && if_block) {
780
+ if_block.p(ctx, dirty);
781
+ } else {
782
+ if (if_block) if_block.d(1);
783
+ if_block = current_block_type && current_block_type(ctx);
784
+
785
+ if (if_block) {
786
+ if_block.c();
787
+ if_block.m(div, null);
788
+ }
789
+ }
790
+
791
+ if (dirty & /*labelVisible*/ 8) {
792
+ internal.set_style(div, "opacity", /*labelVisible*/ ctx[3] ? '1' : '0', false);
793
+ }
794
+ },
795
+ i: internal.noop,
796
+ o: internal.noop,
797
+ d(detaching) {
798
+ if (detaching) internal.detach(div);
799
+
800
+ if (if_block) {
801
+ if_block.d();
802
+ }
803
+
804
+ /*div_binding*/ ctx[15](null);
805
+ }
806
+ };
807
+ }
808
+
809
+ function isPointInPolygon(point, polygon) {
810
+ const x = point[0];
811
+ const y = point[1];
812
+ let inside = false;
813
+
814
+ for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {
815
+ const xi = polygon[i][0];
816
+ const yi = polygon[i][1];
817
+ const xj = polygon[j][0];
818
+ const yj = polygon[j][1];
819
+ const intersect = yi > y !== yj > y && x < (xj - xi) * (y - yi) / (yj - yi) + xi;
820
+ if (intersect) inside = !inside;
821
+ }
822
+
823
+ return inside;
824
+ }
825
+
826
+ function instance$b($$self, $$props, $$invalidate) {
827
+ let isLabelInRoom;
828
+ let userConfigElement;
829
+ let labelVisible;
830
+ let { pxmm } = $$props;
831
+ let { room } = $$props;
832
+ let { hoveredRoom } = $$props;
833
+ let { getLabelElement } = $$props;
834
+ let { adaptiveRoomLabelVisibleEnable } = $$props;
835
+
836
+ function isLabelInRoomCurry(room, labelElementSize) {
837
+ if (labelElementSize.width === 0 || labelElementSize.height === 0) return () => false;
838
+ const polygon = room.path.map(({ x, y }) => [x, y]);
839
+ const labelPosition = room.roomLabel.position;
840
+ const { x, y } = labelPosition;
841
+ const { width, height } = labelElementSize;
842
+ const halfWidth = width / 2;
843
+ const halfHeight = height / 2;
844
+
845
+ return function isLabelInRoom(pxmm) {
846
+ const clientX = x * pxmm;
847
+ const clientY = y * pxmm;
848
+ const clientPolygon = polygon.map(([x, y]) => [x * pxmm, y * pxmm]);
849
+
850
+ // const
851
+ /** 围成 labelRect 的四个点
852
+ * 1----0
853
+ * | |
854
+ * 2----3
855
+ */
856
+ const labelRectClientPoints = [
857
+ [clientX + halfWidth, clientY - halfHeight],
858
+ [clientX - halfWidth, clientY - halfHeight],
859
+ [clientX - halfWidth, clientY + halfHeight],
860
+ [clientX + halfWidth, clientY + halfHeight]
861
+ ];
862
+
863
+ return labelRectClientPoints.every(point => isPointInPolygon(point, clientPolygon));
864
+ };
865
+ }
866
+
867
+ // ========== 获取设备宽高像素 ==========
868
+ // TODO: 统一这里的判断条件,目前写了多处
869
+ const bodyWidth = document.body.clientWidth;
870
+
871
+ const bodyHeight = document.body.clientHeight;
872
+ const roomSizeDes = room.size ? (room.size / 1000000).toFixed(1) + '㎡' : '';
873
+
874
+ // ====================================
875
+ const roomLabel = room.roomLabel;
876
+
877
+ const left = roomLabel.positionInImage.x * 100 + '%';
878
+ const top = roomLabel.positionInImage.y * 100 + '%';
879
+
880
+ // 屏幕宽或高小于 500px 时,用 10px 字体,否则用 14px
881
+ const fontSize = (bodyWidth < 500 || bodyHeight < 500 ? 10 : 14) / 16 + 'rem';
882
+
883
+ let isHoverd = false;
884
+ let labelElement;
885
+ let labelElementSize;
886
+
887
+ hoveredRoom.subscribe(function onHoverdRoomUpdate(_room) {
888
+ $$invalidate(12, isHoverd = !!_room && _room.id === room.id);
889
+ });
890
+
891
+ svelte.onMount(() => {
892
+ // Label 能不能展示只跟房间大小有关
893
+ // 计算 LabelElement 宽高
894
+ const labelDomRect = labelElement === null || labelElement === void 0
895
+ ? void 0
896
+ : labelElement.getClientRects()[0];
897
+
898
+ $$invalidate(13, labelElementSize = {
899
+ width: labelDomRect.width,
900
+ height: labelDomRect.height
901
+ });
902
+ });
903
+
904
+ function div_binding($$value) {
905
+ internal.binding_callbacks[$$value ? 'unshift' : 'push'](() => {
906
+ labelElement = $$value;
907
+ $$invalidate(2, labelElement);
908
+ });
909
+ }
910
+
911
+ $$self.$$set = $$props => {
912
+ if ('pxmm' in $$props) $$invalidate(9, pxmm = $$props.pxmm);
913
+ if ('room' in $$props) $$invalidate(0, room = $$props.room);
914
+ if ('hoveredRoom' in $$props) $$invalidate(10, hoveredRoom = $$props.hoveredRoom);
915
+ if ('getLabelElement' in $$props) $$invalidate(1, getLabelElement = $$props.getLabelElement);
916
+ if ('adaptiveRoomLabelVisibleEnable' in $$props) $$invalidate(11, adaptiveRoomLabelVisibleEnable = $$props.adaptiveRoomLabelVisibleEnable);
917
+ };
918
+
919
+ $$self.$$.update = () => {
920
+ if ($$self.$$.dirty & /*labelElementSize, room*/ 8193) {
921
+ $$invalidate(14, isLabelInRoom = labelElementSize
922
+ ? isLabelInRoomCurry(room, labelElementSize)
923
+ : undefined);
924
+ }
925
+
926
+ if ($$self.$$.dirty & /*getLabelElement, room*/ 3) {
927
+ $$invalidate(4, userConfigElement = getLabelElement === null || getLabelElement === void 0
928
+ ? void 0
929
+ : getLabelElement(room));
930
+ }
931
+
932
+ if ($$self.$$.dirty & /*adaptiveRoomLabelVisibleEnable, isHoverd, isLabelInRoom, pxmm*/ 23040) {
933
+ $$invalidate(3, labelVisible = adaptiveRoomLabelVisibleEnable
934
+ ? isHoverd
935
+ ? true
936
+ : !!(isLabelInRoom === null || isLabelInRoom === void 0
937
+ ? void 0
938
+ : isLabelInRoom(pxmm))
939
+ : true);
940
+ }
941
+ };
942
+
943
+ return [
944
+ room,
945
+ getLabelElement,
946
+ labelElement,
947
+ labelVisible,
948
+ userConfigElement,
949
+ roomSizeDes,
950
+ left,
951
+ top,
952
+ fontSize,
953
+ pxmm,
954
+ hoveredRoom,
955
+ adaptiveRoomLabelVisibleEnable,
956
+ isHoverd,
957
+ labelElementSize,
958
+ isLabelInRoom,
959
+ div_binding
960
+ ];
961
+ }
962
+
963
+ class RoomLabel extends internal.SvelteComponent {
964
+ constructor(options) {
965
+ super();
966
+
967
+ internal.init(
968
+ this,
969
+ options,
970
+ instance$b,
971
+ create_fragment$b,
972
+ internal.safe_not_equal,
973
+ {
974
+ pxmm: 9,
975
+ room: 0,
976
+ hoveredRoom: 10,
977
+ getLabelElement: 1,
978
+ adaptiveRoomLabelVisibleEnable: 11
979
+ },
980
+ add_css$8
981
+ );
982
+ }
983
+ }
984
+
985
+ /* src/floorplan/Components/RoomLabels/RoomLabels.svelte generated by Svelte v3.47.0 */
986
+
987
+ function add_css$7(target) {
988
+ internal.append_styles(target, "svelte-13xux0b", ".floorplan-plugin__room-labels.svelte-13xux0b{width:100%;height:100%;position:absolute;left:0;top:0;z-index:20;pointer-events:none}");
989
+ }
990
+
991
+ function get_each_context$5(ctx, list, i) {
992
+ const child_ctx = ctx.slice();
993
+ child_ctx[9] = list[i];
994
+ return child_ctx;
995
+ }
996
+
997
+ // (17:0) {#if rooms}
998
+ function create_if_block$3(ctx) {
999
+ let div;
1000
+ let each_blocks = [];
1001
+ let each_1_lookup = new Map();
1002
+ let div_resize_listener;
1003
+ let current;
1004
+ let each_value = /*rooms*/ ctx[5];
1005
+ const get_key = ctx => /*room*/ ctx[9].id;
1006
+
1007
+ for (let i = 0; i < each_value.length; i += 1) {
1008
+ let child_ctx = get_each_context$5(ctx, each_value, i);
1009
+ let key = get_key(child_ctx);
1010
+ each_1_lookup.set(key, each_blocks[i] = create_each_block$5(key, child_ctx));
1011
+ }
1012
+
1013
+ return {
1014
+ c() {
1015
+ div = internal.element("div");
1016
+
1017
+ for (let i = 0; i < each_blocks.length; i += 1) {
1018
+ each_blocks[i].c();
1019
+ }
1020
+
1021
+ internal.attr(div, "class", "floorplan-plugin__room-labels svelte-13xux0b");
1022
+ internal.add_render_callback(() => /*div_elementresize_handler*/ ctx[8].call(div));
1023
+ },
1024
+ m(target, anchor) {
1025
+ internal.insert(target, div, anchor);
1026
+
1027
+ for (let i = 0; i < each_blocks.length; i += 1) {
1028
+ each_blocks[i].m(div, null);
1029
+ }
1030
+
1031
+ div_resize_listener = internal.add_resize_listener(div, /*div_elementresize_handler*/ ctx[8].bind(div));
1032
+ current = true;
1033
+ },
1034
+ p(ctx, dirty) {
1035
+ if (dirty & /*pxmm, rooms, getLabelElement, hoveredRoom, adaptiveRoomLabelVisibleEnable*/ 55) {
1036
+ each_value = /*rooms*/ ctx[5];
1037
+ internal.group_outros();
1038
+ each_blocks = internal.update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, div, internal.outro_and_destroy_block, create_each_block$5, null, get_each_context$5);
1039
+ internal.check_outros();
1040
+ }
1041
+ },
1042
+ i(local) {
1043
+ if (current) return;
1044
+
1045
+ for (let i = 0; i < each_value.length; i += 1) {
1046
+ internal.transition_in(each_blocks[i]);
1047
+ }
1048
+
1049
+ current = true;
1050
+ },
1051
+ o(local) {
1052
+ for (let i = 0; i < each_blocks.length; i += 1) {
1053
+ internal.transition_out(each_blocks[i]);
1054
+ }
1055
+
1056
+ current = false;
1057
+ },
1058
+ d(detaching) {
1059
+ if (detaching) internal.detach(div);
1060
+
1061
+ for (let i = 0; i < each_blocks.length; i += 1) {
1062
+ each_blocks[i].d();
1063
+ }
1064
+
1065
+ div_resize_listener();
1066
+ }
1067
+ };
1068
+ }
1069
+
1070
+ // (19:4) {#each rooms as room (room.id)}
1071
+ function create_each_block$5(key_1, ctx) {
1072
+ let first;
1073
+ let roomlabel;
1074
+ let current;
1075
+
1076
+ const roomlabel_spread_levels = [
1077
+ {
1078
+ pxmm: /*pxmm*/ ctx[4],
1079
+ room: /*room*/ ctx[9],
1080
+ getLabelElement: /*getLabelElement*/ ctx[1],
1081
+ hoveredRoom: /*hoveredRoom*/ ctx[0],
1082
+ adaptiveRoomLabelVisibleEnable: /*adaptiveRoomLabelVisibleEnable*/ ctx[2]
1083
+ }
1084
+ ];
1085
+
1086
+ let roomlabel_props = {};
1087
+
1088
+ for (let i = 0; i < roomlabel_spread_levels.length; i += 1) {
1089
+ roomlabel_props = internal.assign(roomlabel_props, roomlabel_spread_levels[i]);
1090
+ }
1091
+
1092
+ roomlabel = new RoomLabel({ props: roomlabel_props });
1093
+
1094
+ return {
1095
+ key: key_1,
1096
+ first: null,
1097
+ c() {
1098
+ first = internal.empty();
1099
+ internal.create_component(roomlabel.$$.fragment);
1100
+ this.first = first;
1101
+ },
1102
+ m(target, anchor) {
1103
+ internal.insert(target, first, anchor);
1104
+ internal.mount_component(roomlabel, target, anchor);
1105
+ current = true;
1106
+ },
1107
+ p(new_ctx, dirty) {
1108
+ ctx = new_ctx;
1109
+
1110
+ const roomlabel_changes = (dirty & /*pxmm, rooms, getLabelElement, hoveredRoom, adaptiveRoomLabelVisibleEnable*/ 55)
1111
+ ? internal.get_spread_update(roomlabel_spread_levels, [
1112
+ {
1113
+ pxmm: /*pxmm*/ ctx[4],
1114
+ room: /*room*/ ctx[9],
1115
+ getLabelElement: /*getLabelElement*/ ctx[1],
1116
+ hoveredRoom: /*hoveredRoom*/ ctx[0],
1117
+ adaptiveRoomLabelVisibleEnable: /*adaptiveRoomLabelVisibleEnable*/ ctx[2]
1118
+ }
1119
+ ])
1120
+ : {};
1121
+
1122
+ roomlabel.$set(roomlabel_changes);
1123
+ },
1124
+ i(local) {
1125
+ if (current) return;
1126
+ internal.transition_in(roomlabel.$$.fragment, local);
1127
+ current = true;
1128
+ },
1129
+ o(local) {
1130
+ internal.transition_out(roomlabel.$$.fragment, local);
1131
+ current = false;
1132
+ },
1133
+ d(detaching) {
1134
+ if (detaching) internal.detach(first);
1135
+ internal.destroy_component(roomlabel, detaching);
1136
+ }
1137
+ };
1138
+ }
1139
+
1140
+ function create_fragment$a(ctx) {
1141
+ let if_block_anchor;
1142
+ let current;
1143
+ let if_block = /*rooms*/ ctx[5] && create_if_block$3(ctx);
1144
+
1145
+ return {
1146
+ c() {
1147
+ if (if_block) if_block.c();
1148
+ if_block_anchor = internal.empty();
1149
+ },
1150
+ m(target, anchor) {
1151
+ if (if_block) if_block.m(target, anchor);
1152
+ internal.insert(target, if_block_anchor, anchor);
1153
+ current = true;
1154
+ },
1155
+ p(ctx, [dirty]) {
1156
+ if (/*rooms*/ ctx[5]) {
1157
+ if (if_block) {
1158
+ if_block.p(ctx, dirty);
1159
+
1160
+ if (dirty & /*rooms*/ 32) {
1161
+ internal.transition_in(if_block, 1);
1162
+ }
1163
+ } else {
1164
+ if_block = create_if_block$3(ctx);
1165
+ if_block.c();
1166
+ internal.transition_in(if_block, 1);
1167
+ if_block.m(if_block_anchor.parentNode, if_block_anchor);
1168
+ }
1169
+ } else if (if_block) {
1170
+ internal.group_outros();
1171
+
1172
+ internal.transition_out(if_block, 1, 1, () => {
1173
+ if_block = null;
1174
+ });
1175
+
1176
+ internal.check_outros();
1177
+ }
1178
+ },
1179
+ i(local) {
1180
+ if (current) return;
1181
+ internal.transition_in(if_block);
1182
+ current = true;
1183
+ },
1184
+ o(local) {
1185
+ internal.transition_out(if_block);
1186
+ current = false;
1187
+ },
1188
+ d(detaching) {
1189
+ if (if_block) if_block.d(detaching);
1190
+ if (detaching) internal.detach(if_block_anchor);
1191
+ }
1192
+ };
1193
+ }
1194
+
1195
+ function instance$a($$self, $$props, $$invalidate) {
1196
+ let rooms;
1197
+ let { floorIndex } = $$props;
1198
+ let { floorplanData } = $$props;
1199
+ let { hoveredRoom } = $$props;
1200
+ let { getLabelElement } = $$props;
1201
+ let { adaptiveRoomLabelVisibleEnable } = $$props;
1202
+ let clientWidth = 0;
1203
+ let pxmm = 0;
1204
+
1205
+ function div_elementresize_handler() {
1206
+ clientWidth = this.clientWidth;
1207
+ $$invalidate(3, clientWidth);
1208
+ }
1209
+
1210
+ $$self.$$set = $$props => {
1211
+ if ('floorIndex' in $$props) $$invalidate(6, floorIndex = $$props.floorIndex);
1212
+ if ('floorplanData' in $$props) $$invalidate(7, floorplanData = $$props.floorplanData);
1213
+ if ('hoveredRoom' in $$props) $$invalidate(0, hoveredRoom = $$props.hoveredRoom);
1214
+ if ('getLabelElement' in $$props) $$invalidate(1, getLabelElement = $$props.getLabelElement);
1215
+ if ('adaptiveRoomLabelVisibleEnable' in $$props) $$invalidate(2, adaptiveRoomLabelVisibleEnable = $$props.adaptiveRoomLabelVisibleEnable);
1216
+ };
1217
+
1218
+ $$self.$$.update = () => {
1219
+ if ($$self.$$.dirty & /*floorplanData, floorIndex*/ 192) {
1220
+ $$invalidate(5, rooms = floorplanData.floorDatas[floorIndex].rooms);
1221
+ }
1222
+
1223
+ if ($$self.$$.dirty & /*floorplanData, clientWidth*/ 136) {
1224
+ {
1225
+ const { max, min } = floorplanData.bounding;
1226
+ const boundingWidth = max.x - min.x;
1227
+ $$invalidate(4, pxmm = clientWidth / boundingWidth);
1228
+ }
1229
+ }
1230
+ };
1231
+
1232
+ return [
1233
+ hoveredRoom,
1234
+ getLabelElement,
1235
+ adaptiveRoomLabelVisibleEnable,
1236
+ clientWidth,
1237
+ pxmm,
1238
+ rooms,
1239
+ floorIndex,
1240
+ floorplanData,
1241
+ div_elementresize_handler
1242
+ ];
1243
+ }
1244
+
1245
+ class RoomLabels extends internal.SvelteComponent {
1246
+ constructor(options) {
1247
+ super();
1248
+
1249
+ internal.init(
1250
+ this,
1251
+ options,
1252
+ instance$a,
1253
+ create_fragment$a,
1254
+ internal.safe_not_equal,
1255
+ {
1256
+ floorIndex: 6,
1257
+ floorplanData: 7,
1258
+ hoveredRoom: 0,
1259
+ getLabelElement: 1,
1260
+ adaptiveRoomLabelVisibleEnable: 2
1261
+ },
1262
+ add_css$7
1263
+ );
1264
+ }
1265
+ }
1266
+
1267
+ /* src/floorplan/Components/RuleLabels/RuleItem.svelte generated by Svelte v3.47.0 */
1268
+
1269
+ function add_css$6(target) {
1270
+ internal.append_styles(target, "svelte-xt7p1v", ".floorplan-plugin__rule-labels.svelte-xt7p1v.svelte-xt7p1v{position:absolute;display:flex}.floorplan-plugin__rule-labels--top.svelte-xt7p1v.svelte-xt7p1v{left:0;top:-1.25rem}.floorplan-plugin__rule-labels--bottom.svelte-xt7p1v.svelte-xt7p1v{left:0;bottom:-1.25rem}.floorplan-plugin__rule-labels--left.svelte-xt7p1v.svelte-xt7p1v{top:0;left:-1.25rem}.floorplan-plugin__rule-labels--right.svelte-xt7p1v.svelte-xt7p1v{top:0;right:-1.25rem}.floorplan-plugin__rule-line.svelte-xt7p1v.svelte-xt7p1v{background:#fff;opacity:0.05;width:100%;height:100%}.floorplan-plugin__rule-scale-wrapper.svelte-xt7p1v.svelte-xt7p1v{position:absolute;width:0.3125rem;height:100%;left:50%;top:0;transform:translateX(-50%)}.floorplan-plugin__rule-labels.is-row.svelte-xt7p1v .floorplan-plugin__rule-scale-wrapper.svelte-xt7p1v{width:100%;height:0.3125rem;top:50%;left:0;transform:translateY(-50%)}.floorplan-plugin__rule-scale.svelte-xt7p1v.svelte-xt7p1v{position:absolute;background:#fff;opacity:0.05;width:100%;height:0.0625rem}.floorplan-plugin__rule-labels.is-row.svelte-xt7p1v .floorplan-plugin__rule-scale.svelte-xt7p1v{width:0.0625rem;height:100%}.floorplan-plugin__rule-text-wrapper.svelte-xt7p1v.svelte-xt7p1v{position:absolute}.floorplan-plugin__rule-labels--top.svelte-xt7p1v .floorplan-plugin__rule-text-wrapper.svelte-xt7p1v{width:100%;height:0;top:0.625rem}.floorplan-plugin__rule-labels--bottom.svelte-xt7p1v .floorplan-plugin__rule-text-wrapper.svelte-xt7p1v{width:100%;height:0;bottom:0.625rem}.floorplan-plugin__rule-labels--left.svelte-xt7p1v .floorplan-plugin__rule-text-wrapper.svelte-xt7p1v{width:0;height:100%;left:0.625rem}.floorplan-plugin__rule-labels--right.svelte-xt7p1v .floorplan-plugin__rule-text-wrapper.svelte-xt7p1v{width:0;height:100%;right:0.625rem}.floorplan-plugin__rule-text-item.svelte-xt7p1v.svelte-xt7p1v{width:0;height:0;position:absolute;transform:rotate(90deg)}.floorplan-plugin__rule-labels.is-row.svelte-xt7p1v .floorplan-plugin__rule-text-item.svelte-xt7p1v{transform:rotate(0)}.floorplan-plugin__rule-text.svelte-xt7p1v.svelte-xt7p1v{width:-webkit-max-content;width:-moz-max-content;width:max-content;transform:translate(-50%, -50%);font-size:0.625rem;color:#fff;opacity:0.2}");
1271
+ }
1272
+
1273
+ function get_each_context$4(ctx, list, i) {
1274
+ const child_ctx = ctx.slice();
1275
+ child_ctx[10] = list[i];
1276
+ child_ctx[12] = i;
1277
+ return child_ctx;
1278
+ }
1279
+
1280
+ function get_each_context_1(ctx, list, i) {
1281
+ const child_ctx = ctx.slice();
1282
+ child_ctx[13] = list[i];
1283
+ return child_ctx;
1284
+ }
1285
+
1286
+ // (47:4) {#each rulerLabels as rulerLabel}
1287
+ function create_each_block_1(ctx) {
1288
+ let div;
1289
+
1290
+ return {
1291
+ c() {
1292
+ div = internal.element("div");
1293
+ internal.attr(div, "class", "floorplan-plugin__rule-scale svelte-xt7p1v");
1294
+ internal.set_style(div, "left", /*rulerLabel*/ ctx[13].left * 100 + '%', false);
1295
+ internal.set_style(div, "bottom", /*rulerLabel*/ ctx[13].bottom * 100 + '%', false);
1296
+ },
1297
+ m(target, anchor) {
1298
+ internal.insert(target, div, anchor);
1299
+ },
1300
+ p: internal.noop,
1301
+ d(detaching) {
1302
+ if (detaching) internal.detach(div);
1303
+ }
1304
+ };
1305
+ }
1306
+
1307
+ // (56:4) {#each rulerTexts as textItem, textItemIndex (textItemIndex)}
1308
+ function create_each_block$4(key_1, ctx) {
1309
+ let div1;
1310
+ let div0;
1311
+ let t0_value = /*textItem*/ ctx[10].distance + "";
1312
+ let t0;
1313
+ let t1;
1314
+
1315
+ return {
1316
+ key: key_1,
1317
+ first: null,
1318
+ c() {
1319
+ div1 = internal.element("div");
1320
+ div0 = internal.element("div");
1321
+ t0 = internal.text(t0_value);
1322
+ t1 = internal.space();
1323
+ internal.attr(div0, "class", "floorplan-plugin__rule-text svelte-xt7p1v");
1324
+ internal.toggle_class(div0, "is-row", /*isRow*/ ctx[1]);
1325
+ internal.attr(div1, "class", "floorplan-plugin__rule-text-item svelte-xt7p1v");
1326
+ internal.set_style(div1, "left", /*textItem*/ ctx[10].left * 100 + '%', false);
1327
+ internal.set_style(div1, "bottom", /*textItem*/ ctx[10].bottom * 100 + '%', false);
1328
+ this.first = div1;
1329
+ },
1330
+ m(target, anchor) {
1331
+ internal.insert(target, div1, anchor);
1332
+ internal.append(div1, div0);
1333
+ internal.append(div0, t0);
1334
+ internal.append(div1, t1);
1335
+ },
1336
+ p(new_ctx, dirty) {
1337
+ ctx = new_ctx;
1338
+ },
1339
+ d(detaching) {
1340
+ if (detaching) internal.detach(div1);
1341
+ }
1342
+ };
1343
+ }
1344
+
1345
+ function create_fragment$9(ctx) {
1346
+ let div3;
1347
+ let div0;
1348
+ let t0;
1349
+ let div1;
1350
+ let t1;
1351
+ let div2;
1352
+ let each_blocks = [];
1353
+ let each1_lookup = new Map();
1354
+ let div3_class_value;
1355
+ let each_value_1 = /*rulerLabels*/ ctx[2];
1356
+ let each_blocks_1 = [];
1357
+
1358
+ for (let i = 0; i < each_value_1.length; i += 1) {
1359
+ each_blocks_1[i] = create_each_block_1(get_each_context_1(ctx, each_value_1, i));
1360
+ }
1361
+
1362
+ let each_value = /*rulerTexts*/ ctx[3];
1363
+ const get_key = ctx => /*textItemIndex*/ ctx[12];
1364
+
1365
+ for (let i = 0; i < each_value.length; i += 1) {
1366
+ let child_ctx = get_each_context$4(ctx, each_value, i);
1367
+ let key = get_key(child_ctx);
1368
+ each1_lookup.set(key, each_blocks[i] = create_each_block$4(key, child_ctx));
1369
+ }
1370
+
1371
+ return {
1372
+ c() {
1373
+ div3 = internal.element("div");
1374
+ div0 = internal.element("div");
1375
+ t0 = internal.space();
1376
+ div1 = internal.element("div");
1377
+
1378
+ for (let i = 0; i < each_blocks_1.length; i += 1) {
1379
+ each_blocks_1[i].c();
1380
+ }
1381
+
1382
+ t1 = internal.space();
1383
+ div2 = internal.element("div");
1384
+
1385
+ for (let i = 0; i < each_blocks.length; i += 1) {
1386
+ each_blocks[i].c();
1387
+ }
1388
+
1389
+ internal.attr(div0, "class", "floorplan-plugin__rule-line svelte-xt7p1v");
1390
+ internal.attr(div1, "class", "floorplan-plugin__rule-scale-wrapper svelte-xt7p1v");
1391
+ internal.toggle_class(div1, "is-row", /*isRow*/ ctx[1]);
1392
+ internal.attr(div2, "class", "floorplan-plugin__rule-text-wrapper svelte-xt7p1v");
1393
+ internal.attr(div3, "class", div3_class_value = "floorplan-plugin__rule-labels floorplan-plugin__rule-labels--" + /*type*/ ctx[0] + " svelte-xt7p1v");
1394
+ internal.toggle_class(div3, "is-row", /*isRow*/ ctx[1]);
1395
+ internal.set_style(div3, "width", /*isRow*/ ctx[1] ? '100%' : 1 / 16 + 'rem', false);
1396
+ internal.set_style(div3, "height", !/*isRow*/ ctx[1] ? '100%' : 1 / 16 + 'rem', false);
1397
+ },
1398
+ m(target, anchor) {
1399
+ internal.insert(target, div3, anchor);
1400
+ internal.append(div3, div0);
1401
+ internal.append(div3, t0);
1402
+ internal.append(div3, div1);
1403
+
1404
+ for (let i = 0; i < each_blocks_1.length; i += 1) {
1405
+ each_blocks_1[i].m(div1, null);
1406
+ }
1407
+
1408
+ internal.append(div3, t1);
1409
+ internal.append(div3, div2);
1410
+
1411
+ for (let i = 0; i < each_blocks.length; i += 1) {
1412
+ each_blocks[i].m(div2, null);
1413
+ }
1414
+ },
1415
+ p(ctx, [dirty]) {
1416
+ if (dirty & /*rulerLabels*/ 4) {
1417
+ each_value_1 = /*rulerLabels*/ ctx[2];
1418
+ let i;
1419
+
1420
+ for (i = 0; i < each_value_1.length; i += 1) {
1421
+ const child_ctx = get_each_context_1(ctx, each_value_1, i);
1422
+
1423
+ if (each_blocks_1[i]) {
1424
+ each_blocks_1[i].p(child_ctx, dirty);
1425
+ } else {
1426
+ each_blocks_1[i] = create_each_block_1(child_ctx);
1427
+ each_blocks_1[i].c();
1428
+ each_blocks_1[i].m(div1, null);
1429
+ }
1430
+ }
1431
+
1432
+ for (; i < each_blocks_1.length; i += 1) {
1433
+ each_blocks_1[i].d(1);
1434
+ }
1435
+
1436
+ each_blocks_1.length = each_value_1.length;
1437
+ }
1438
+
1439
+ if (dirty & /*rulerTexts, isRow*/ 10) {
1440
+ each_value = /*rulerTexts*/ ctx[3];
1441
+ each_blocks = internal.update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each1_lookup, div2, internal.destroy_block, create_each_block$4, null, get_each_context$4);
1442
+ }
1443
+
1444
+ if (dirty & /*type*/ 1 && div3_class_value !== (div3_class_value = "floorplan-plugin__rule-labels floorplan-plugin__rule-labels--" + /*type*/ ctx[0] + " svelte-xt7p1v")) {
1445
+ internal.attr(div3, "class", div3_class_value);
1446
+ }
1447
+
1448
+ if (dirty & /*type, isRow*/ 3) {
1449
+ internal.toggle_class(div3, "is-row", /*isRow*/ ctx[1]);
1450
+ }
1451
+ },
1452
+ i: internal.noop,
1453
+ o: internal.noop,
1454
+ d(detaching) {
1455
+ if (detaching) internal.detach(div3);
1456
+ internal.destroy_each(each_blocks_1, detaching);
1457
+
1458
+ for (let i = 0; i < each_blocks.length; i += 1) {
1459
+ each_blocks[i].d();
1460
+ }
1461
+ }
1462
+ };
1463
+ }
1464
+
1465
+ const padding$1 = 1000;
1466
+ const exteriorWallOffset$1 = 180;
1467
+
1468
+ function instance$9($$self, $$props, $$invalidate) {
1469
+ let { type } = $$props;
1470
+ let { data } = $$props;
1471
+ let { bounding } = $$props;
1472
+ const isRow = type === 'top' || type === 'bottom';
1473
+ const contentWidth = bounding.max.x - bounding.min.x - (padding$1 - exteriorWallOffset$1) * 2;
1474
+ const contentHeight = bounding.max.y - bounding.min.y - (padding$1 - exteriorWallOffset$1) * 2;
1475
+
1476
+ // 计算每一段墙的长度,以及墙两侧点距离标尺初始点的像素值
1477
+ const rulerPoints = data.map(([start, end]) => isRow ? [start.x, end.x] : [start.y, end.y]).flat().sort().filter((x, index, arr) => {
1478
+ // 筛除重复数据
1479
+ if (index === 0) return true;
1480
+
1481
+ return x !== arr[index - 1];
1482
+ });
1483
+
1484
+ const rulerLabels = rulerPoints.map(num => {
1485
+ const left = isRow
1486
+ ? (num - bounding.min.x - padding$1 + exteriorWallOffset$1) / contentWidth
1487
+ : 0;
1488
+
1489
+ const bottom = !isRow
1490
+ ? (num - bounding.min.y - padding$1 + exteriorWallOffset$1) / contentHeight
1491
+ : 0;
1492
+
1493
+ return { left, bottom };
1494
+ });
1495
+
1496
+ rulerLabels.unshift({ left: 0, bottom: 0 });
1497
+ rulerLabels.push(isRow ? { left: 1, bottom: 0 } : { left: 0, bottom: 1 });
1498
+ const length = rulerPoints[rulerPoints.length - 1] - rulerPoints[0];
1499
+
1500
+ const rulerTexts = rulerPoints.map((num, index, arr) => {
1501
+ const distance = index === 0 ? 0 : num - arr[index - 1];
1502
+ const positionNum = index === 0 ? 0 : (num + arr[index - 1]) / 2;
1503
+
1504
+ const left = isRow
1505
+ ? (positionNum - bounding.min.x - padding$1 + exteriorWallOffset$1) / contentWidth
1506
+ : 0;
1507
+
1508
+ const bottom = !isRow
1509
+ ? (positionNum - bounding.min.y - padding$1 + exteriorWallOffset$1) / contentHeight
1510
+ : 0;
1511
+
1512
+ return { left, bottom, distance };
1513
+ }).filter(({ distance }) => distance / length > 0.1);
1514
+
1515
+ $$self.$$set = $$props => {
1516
+ if ('type' in $$props) $$invalidate(0, type = $$props.type);
1517
+ if ('data' in $$props) $$invalidate(4, data = $$props.data);
1518
+ if ('bounding' in $$props) $$invalidate(5, bounding = $$props.bounding);
1519
+ };
1520
+
1521
+ return [type, isRow, rulerLabels, rulerTexts, data, bounding];
1522
+ }
1523
+
1524
+ class RuleItem extends internal.SvelteComponent {
1525
+ constructor(options) {
1526
+ super();
1527
+ internal.init(this, options, instance$9, create_fragment$9, internal.safe_not_equal, { type: 0, data: 4, bounding: 5 }, add_css$6);
1528
+ }
1529
+ }
1530
+
1531
+ /* src/floorplan/Components/RuleLabels/RuleLabels.svelte generated by Svelte v3.47.0 */
1532
+
1533
+ function add_css$5(target) {
1534
+ internal.append_styles(target, "svelte-1mzj9p3", ".floorplan-plugin__rule-labels-wrapper.svelte-1mzj9p3{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);pointer-events:none}");
1535
+ }
1536
+
1537
+ function get_each_context$3(ctx, list, i) {
1538
+ const child_ctx = ctx.slice();
1539
+ child_ctx[12] = list[i][0];
1540
+ child_ctx[13] = list[i][1];
1541
+ return child_ctx;
1542
+ }
1543
+
1544
+ // (19:2) {#each ruleLabelArray as [type, data] (type)}
1545
+ function create_each_block$3(key_1, ctx) {
1546
+ let first;
1547
+ let ruleitem;
1548
+ let current;
1549
+
1550
+ const ruleitem_spread_levels = [
1551
+ {
1552
+ type: /*type*/ ctx[12],
1553
+ data: /*data*/ ctx[13],
1554
+ bounding: /*bounding*/ ctx[0]
1555
+ }
1556
+ ];
1557
+
1558
+ let ruleitem_props = {};
1559
+
1560
+ for (let i = 0; i < ruleitem_spread_levels.length; i += 1) {
1561
+ ruleitem_props = internal.assign(ruleitem_props, ruleitem_spread_levels[i]);
1562
+ }
1563
+
1564
+ ruleitem = new RuleItem({ props: ruleitem_props });
1565
+
1566
+ return {
1567
+ key: key_1,
1568
+ first: null,
1569
+ c() {
1570
+ first = internal.empty();
1571
+ internal.create_component(ruleitem.$$.fragment);
1572
+ this.first = first;
1573
+ },
1574
+ m(target, anchor) {
1575
+ internal.insert(target, first, anchor);
1576
+ internal.mount_component(ruleitem, target, anchor);
1577
+ current = true;
1578
+ },
1579
+ p(new_ctx, dirty) {
1580
+ ctx = new_ctx;
1581
+
1582
+ const ruleitem_changes = (dirty & /*ruleLabelArray, bounding*/ 9)
1583
+ ? internal.get_spread_update(ruleitem_spread_levels, [
1584
+ {
1585
+ type: /*type*/ ctx[12],
1586
+ data: /*data*/ ctx[13],
1587
+ bounding: /*bounding*/ ctx[0]
1588
+ }
1589
+ ])
1590
+ : {};
1591
+
1592
+ ruleitem.$set(ruleitem_changes);
1593
+ },
1594
+ i(local) {
1595
+ if (current) return;
1596
+ internal.transition_in(ruleitem.$$.fragment, local);
1597
+ current = true;
1598
+ },
1599
+ o(local) {
1600
+ internal.transition_out(ruleitem.$$.fragment, local);
1601
+ current = false;
1602
+ },
1603
+ d(detaching) {
1604
+ if (detaching) internal.detach(first);
1605
+ internal.destroy_component(ruleitem, detaching);
1606
+ }
1607
+ };
1608
+ }
1609
+
1610
+ function create_fragment$8(ctx) {
1611
+ let div;
1612
+ let each_blocks = [];
1613
+ let each_1_lookup = new Map();
1614
+ let current;
1615
+ let each_value = /*ruleLabelArray*/ ctx[3];
1616
+ const get_key = ctx => /*type*/ ctx[12];
1617
+
1618
+ for (let i = 0; i < each_value.length; i += 1) {
1619
+ let child_ctx = get_each_context$3(ctx, each_value, i);
1620
+ let key = get_key(child_ctx);
1621
+ each_1_lookup.set(key, each_blocks[i] = create_each_block$3(key, child_ctx));
1622
+ }
1623
+
1624
+ return {
1625
+ c() {
1626
+ div = internal.element("div");
1627
+
1628
+ for (let i = 0; i < each_blocks.length; i += 1) {
1629
+ each_blocks[i].c();
1630
+ }
1631
+
1632
+ internal.attr(div, "class", "floorplan-plugin__rule-labels-wrapper svelte-1mzj9p3");
1633
+ internal.set_style(div, "width", /*width*/ ctx[2], false);
1634
+ internal.set_style(div, "height", /*height*/ ctx[1], false);
1635
+ },
1636
+ m(target, anchor) {
1637
+ internal.insert(target, div, anchor);
1638
+
1639
+ for (let i = 0; i < each_blocks.length; i += 1) {
1640
+ each_blocks[i].m(div, null);
1641
+ }
1642
+
1643
+ current = true;
1644
+ },
1645
+ p(ctx, [dirty]) {
1646
+ if (dirty & /*ruleLabelArray, bounding*/ 9) {
1647
+ each_value = /*ruleLabelArray*/ ctx[3];
1648
+ internal.group_outros();
1649
+ each_blocks = internal.update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, div, internal.outro_and_destroy_block, create_each_block$3, null, get_each_context$3);
1650
+ internal.check_outros();
1651
+ }
1652
+
1653
+ if (dirty & /*width*/ 4) {
1654
+ internal.set_style(div, "width", /*width*/ ctx[2], false);
1655
+ }
1656
+
1657
+ if (dirty & /*height*/ 2) {
1658
+ internal.set_style(div, "height", /*height*/ ctx[1], false);
1659
+ }
1660
+ },
1661
+ i(local) {
1662
+ if (current) return;
1663
+
1664
+ for (let i = 0; i < each_value.length; i += 1) {
1665
+ internal.transition_in(each_blocks[i]);
1666
+ }
1667
+
1668
+ current = true;
1669
+ },
1670
+ o(local) {
1671
+ for (let i = 0; i < each_blocks.length; i += 1) {
1672
+ internal.transition_out(each_blocks[i]);
1673
+ }
1674
+
1675
+ current = false;
1676
+ },
1677
+ d(detaching) {
1678
+ if (detaching) internal.detach(div);
1679
+
1680
+ for (let i = 0; i < each_blocks.length; i += 1) {
1681
+ each_blocks[i].d();
1682
+ }
1683
+ }
1684
+ };
1685
+ }
1686
+
1687
+ const padding = 1000;
1688
+ const exteriorWallOffset = 180;
1689
+
1690
+ function instance$8($$self, $$props, $$invalidate) {
1691
+ let bounding;
1692
+ let ruleLabelData;
1693
+ let ruleLabelDataKeys;
1694
+ let ruleLabelArray;
1695
+ let boundingWidth;
1696
+ let boundingHeight;
1697
+ let contentWidth;
1698
+ let contentHeight;
1699
+ let width;
1700
+ let height;
1701
+ let { floorIndex } = $$props;
1702
+ let { floorplanData } = $$props;
1703
+
1704
+ $$self.$$set = $$props => {
1705
+ if ('floorIndex' in $$props) $$invalidate(4, floorIndex = $$props.floorIndex);
1706
+ if ('floorplanData' in $$props) $$invalidate(5, floorplanData = $$props.floorplanData);
1707
+ };
1708
+
1709
+ $$self.$$.update = () => {
1710
+ if ($$self.$$.dirty & /*floorplanData*/ 32) {
1711
+ $$invalidate(0, bounding = floorplanData.bounding);
1712
+ }
1713
+
1714
+ if ($$self.$$.dirty & /*floorplanData, floorIndex*/ 48) {
1715
+ $$invalidate(10, ruleLabelData = floorplanData.floorDatas[floorIndex].rules);
1716
+ }
1717
+
1718
+ if ($$self.$$.dirty & /*ruleLabelData*/ 1024) {
1719
+ $$invalidate(11, ruleLabelDataKeys = Object.keys(ruleLabelData));
1720
+ }
1721
+
1722
+ if ($$self.$$.dirty & /*ruleLabelDataKeys, ruleLabelData*/ 3072) {
1723
+ $$invalidate(3, ruleLabelArray = ruleLabelDataKeys.map(key => [key, ruleLabelData[key]]));
1724
+ }
1725
+
1726
+ if ($$self.$$.dirty & /*bounding*/ 1) {
1727
+ $$invalidate(8, boundingWidth = bounding.max.x - bounding.min.x);
1728
+ }
1729
+
1730
+ if ($$self.$$.dirty & /*bounding*/ 1) {
1731
+ $$invalidate(6, boundingHeight = bounding.max.y - bounding.min.y);
1732
+ }
1733
+
1734
+ if ($$self.$$.dirty & /*bounding*/ 1) {
1735
+ $$invalidate(9, contentWidth = bounding.max.x - bounding.min.x - (padding - exteriorWallOffset) * 2);
1736
+ }
1737
+
1738
+ if ($$self.$$.dirty & /*bounding*/ 1) {
1739
+ $$invalidate(7, contentHeight = bounding.max.y - bounding.min.y - (padding - exteriorWallOffset) * 2);
1740
+ }
1741
+
1742
+ if ($$self.$$.dirty & /*contentWidth, boundingWidth*/ 768) {
1743
+ $$invalidate(2, width = contentWidth / boundingWidth * 100 + '%');
1744
+ }
1745
+
1746
+ if ($$self.$$.dirty & /*contentHeight, boundingHeight*/ 192) {
1747
+ $$invalidate(1, height = contentHeight / boundingHeight * 100 + '%');
1748
+ }
1749
+ };
1750
+
1751
+ return [
1752
+ bounding,
1753
+ height,
1754
+ width,
1755
+ ruleLabelArray,
1756
+ floorIndex,
1757
+ floorplanData,
1758
+ boundingHeight,
1759
+ contentHeight,
1760
+ boundingWidth,
1761
+ contentWidth,
1762
+ ruleLabelData,
1763
+ ruleLabelDataKeys
1764
+ ];
1765
+ }
1766
+
1767
+ class RuleLabels extends internal.SvelteComponent {
1768
+ constructor(options) {
1769
+ super();
1770
+ internal.init(this, options, instance$8, create_fragment$8, internal.safe_not_equal, { floorIndex: 4, floorplanData: 5 }, add_css$5);
1771
+ }
1772
+ }
1773
+
1774
+ function pathD(points, options = {}) {
1775
+ let d = '';
1776
+ const { needZ, needA } = options;
1777
+ const _points = needZ ? points.slice().concat(points[0]) : points.slice();
1778
+ _points.forEach((_point, index) => {
1779
+ const { x, y } = options.format ? options.format(_point) : _point;
1780
+ const point = x + ',' + y;
1781
+ if (index === 0) {
1782
+ d += 'M' + point;
1783
+ return d;
1784
+ }
1785
+ if (needA === null || needA === void 0 ? void 0 : needA[index]) {
1786
+ d += 'A' + needA[index] + ',' + point;
1787
+ return d;
1788
+ }
1789
+ d += 'L' + point;
1790
+ return d;
1791
+ });
1792
+ return d + (needZ ? 'Z' : '');
1793
+ }
1794
+ /** 把户型图上点点位转换到 SVG 上的点位 */
1795
+ function formatFloorplanPoint({ x, y }, bounding) {
1796
+ const { max, min } = bounding;
1797
+ return { x: x - min.x, y: max.y - y };
1798
+ }
1799
+
1800
+ /* src/floorplan/Components/RoomMaterials/RoomMaterial_0.svelte generated by Svelte v3.47.0 */
1801
+
1802
+ function create_fragment$7(ctx) {
1803
+ let path_1;
1804
+
1805
+ return {
1806
+ c() {
1807
+ path_1 = internal.svg_element("path");
1808
+ internal.attr(path_1, "d", /*d*/ ctx[0]);
1809
+ internal.attr(path_1, "fill", "#2F313A");
1810
+ },
1811
+ m(target, anchor) {
1812
+ internal.insert(target, path_1, anchor);
1813
+ },
1814
+ p(ctx, [dirty]) {
1815
+ if (dirty & /*d*/ 1) {
1816
+ internal.attr(path_1, "d", /*d*/ ctx[0]);
1817
+ }
1818
+ },
1819
+ i: internal.noop,
1820
+ o: internal.noop,
1821
+ d(detaching) {
1822
+ if (detaching) internal.detach(path_1);
1823
+ }
1824
+ };
1825
+ }
1826
+
1827
+ function instance$7($$self, $$props, $$invalidate) {
1828
+ let d;
1829
+ let { path } = $$props;
1830
+
1831
+ $$self.$$set = $$props => {
1832
+ if ('path' in $$props) $$invalidate(1, path = $$props.path);
1833
+ };
1834
+
1835
+ $$self.$$.update = () => {
1836
+ if ($$self.$$.dirty & /*path*/ 2) {
1837
+ $$invalidate(0, d = pathD(path, { needZ: true }));
1838
+ }
1839
+ };
1840
+
1841
+ return [d, path];
1842
+ }
1843
+
1844
+ class RoomMaterial_0 extends internal.SvelteComponent {
1845
+ constructor(options) {
1846
+ super();
1847
+ internal.init(this, options, instance$7, create_fragment$7, internal.safe_not_equal, { path: 1 });
1848
+ }
1849
+ }
1850
+
1851
+ /* src/floorplan/Components/RoomMaterials/RoomMaterial_1.svelte generated by Svelte v3.47.0 */
1852
+
1853
+ function create_fragment$6(ctx) {
1854
+ let defs;
1855
+ let pattern;
1856
+ let rect;
1857
+ let path0;
1858
+ let t;
1859
+ let path1;
1860
+
1861
+ return {
1862
+ c() {
1863
+ defs = internal.svg_element("defs");
1864
+ pattern = internal.svg_element("pattern");
1865
+ rect = internal.svg_element("rect");
1866
+ path0 = internal.svg_element("path");
1867
+ t = internal.space();
1868
+ path1 = internal.svg_element("path");
1869
+ internal.attr(rect, "x", "0");
1870
+ internal.attr(rect, "y", "0");
1871
+ internal.attr(rect, "width", /*width*/ ctx[1]);
1872
+ internal.attr(rect, "height", /*width*/ ctx[1]);
1873
+ internal.attr(rect, "fill", "#323747");
1874
+ internal.attr(path0, "d", /*patternPathD*/ ctx[2]);
1875
+ internal.attr(path0, "stroke", "#ffffff");
1876
+ internal.attr(path0, "stroke-opacity", "0.06");
1877
+ internal.attr(path0, "stroke-width", "0.5");
1878
+ internal.attr(path0, "fill", "none");
1879
+ internal.attr(pattern, "id", "fpm-room-pattern-0");
1880
+ internal.attr(pattern, "x", "0");
1881
+ internal.attr(pattern, "y", "0");
1882
+ internal.attr(pattern, "width", /*width*/ ctx[1]);
1883
+ internal.attr(pattern, "height", /*width*/ ctx[1]);
1884
+ internal.attr(pattern, "patternUnits", "userSpaceOnUse");
1885
+ internal.attr(pattern, "patternTransform", "scale(50 50)");
1886
+ internal.attr(path1, "d", /*d*/ ctx[0]);
1887
+ internal.attr(path1, "fill", "url(#fpm-room-pattern-0)");
1888
+ },
1889
+ m(target, anchor) {
1890
+ internal.insert(target, defs, anchor);
1891
+ internal.append(defs, pattern);
1892
+ internal.append(pattern, rect);
1893
+ internal.append(pattern, path0);
1894
+ internal.insert(target, t, anchor);
1895
+ internal.insert(target, path1, anchor);
1896
+ },
1897
+ p(ctx, [dirty]) {
1898
+ if (dirty & /*d*/ 1) {
1899
+ internal.attr(path1, "d", /*d*/ ctx[0]);
1900
+ }
1901
+ },
1902
+ i: internal.noop,
1903
+ o: internal.noop,
1904
+ d(detaching) {
1905
+ if (detaching) internal.detach(defs);
1906
+ if (detaching) internal.detach(t);
1907
+ if (detaching) internal.detach(path1);
1908
+ }
1909
+ };
1910
+ }
1911
+
1912
+ const halfWidth = 6;
1913
+
1914
+ function instance$6($$self, $$props, $$invalidate) {
1915
+ let d;
1916
+ let { path } = $$props;
1917
+ const width = halfWidth * 2;
1918
+ const patternPathD = `M0 ${halfWidth} h ${width} M${halfWidth} 0 v ${width}`;
1919
+
1920
+ $$self.$$set = $$props => {
1921
+ if ('path' in $$props) $$invalidate(3, path = $$props.path);
1922
+ };
1923
+
1924
+ $$self.$$.update = () => {
1925
+ if ($$self.$$.dirty & /*path*/ 8) {
1926
+ $$invalidate(0, d = pathD(path, { needZ: true }));
1927
+ }
1928
+ };
1929
+
1930
+ return [d, width, patternPathD, path];
1931
+ }
1932
+
1933
+ class RoomMaterial_1 extends internal.SvelteComponent {
1934
+ constructor(options) {
1935
+ super();
1936
+ internal.init(this, options, instance$6, create_fragment$6, internal.safe_not_equal, { path: 3 });
1937
+ }
1938
+ }
1939
+
1940
+ /* src/floorplan/Components/RoomMaterials/RoomMaterial_2.svelte generated by Svelte v3.47.0 */
1941
+
1942
+ function create_fragment$5(ctx) {
1943
+ let defs;
1944
+ let pattern0;
1945
+ let rect0;
1946
+ let pattern1;
1947
+ let rect1;
1948
+ let t0;
1949
+ let path0;
1950
+ let t1;
1951
+ let path1;
1952
+ let t2;
1953
+ let path2;
1954
+
1955
+ return {
1956
+ c() {
1957
+ defs = internal.svg_element("defs");
1958
+ pattern0 = internal.svg_element("pattern");
1959
+ rect0 = internal.svg_element("rect");
1960
+ pattern1 = internal.svg_element("pattern");
1961
+ rect1 = internal.svg_element("rect");
1962
+ t0 = internal.space();
1963
+ path0 = internal.svg_element("path");
1964
+ t1 = internal.space();
1965
+ path1 = internal.svg_element("path");
1966
+ t2 = internal.space();
1967
+ path2 = internal.svg_element("path");
1968
+ internal.attr(rect0, "x", "0");
1969
+ internal.attr(rect0, "y", "0");
1970
+ internal.attr(rect0, "width", "6");
1971
+ internal.attr(rect0, "height", "50");
1972
+ internal.attr(rect0, "fill", "none");
1973
+ internal.attr(rect0, "stroke", "#4B4B57");
1974
+ internal.attr(rect0, "stroke-width", "0.5");
1975
+ internal.attr(pattern0, "id", "room-material-pattern-1");
1976
+ internal.attr(pattern0, "x", "0");
1977
+ internal.attr(pattern0, "y", "0");
1978
+ internal.attr(pattern0, "width", "12");
1979
+ internal.attr(pattern0, "height", "50");
1980
+ internal.attr(pattern0, "patternUnits", "userSpaceOnUse");
1981
+ internal.attr(pattern0, "patternTransform", "scale(50 50)");
1982
+ internal.attr(rect1, "x", "0");
1983
+ internal.attr(rect1, "y", "0");
1984
+ internal.attr(rect1, "width", "6");
1985
+ internal.attr(rect1, "height", "50");
1986
+ internal.attr(rect1, "fill", "none");
1987
+ internal.attr(rect1, "stroke", "#4B4B57");
1988
+ internal.attr(rect1, "stroke-width", "0.5");
1989
+ internal.attr(pattern1, "id", "room-material-pattern-2");
1990
+ internal.attr(pattern1, "x", "6");
1991
+ internal.attr(pattern1, "y", "25");
1992
+ internal.attr(pattern1, "width", "12");
1993
+ internal.attr(pattern1, "height", "50");
1994
+ internal.attr(pattern1, "patternUnits", "userSpaceOnUse");
1995
+ internal.attr(pattern1, "patternTransform", "scale(50 50)");
1996
+ internal.attr(path0, "d", /*d*/ ctx[0]);
1997
+ internal.attr(path0, "fill", "#43434D");
1998
+ internal.attr(path1, "d", /*d*/ ctx[0]);
1999
+ internal.attr(path1, "fill", "url(#room-material-pattern-1)");
2000
+ internal.attr(path2, "d", /*d*/ ctx[0]);
2001
+ internal.attr(path2, "fill", "url(#room-material-pattern-2)");
2002
+ },
2003
+ m(target, anchor) {
2004
+ internal.insert(target, defs, anchor);
2005
+ internal.append(defs, pattern0);
2006
+ internal.append(pattern0, rect0);
2007
+ internal.append(defs, pattern1);
2008
+ internal.append(pattern1, rect1);
2009
+ internal.insert(target, t0, anchor);
2010
+ internal.insert(target, path0, anchor);
2011
+ internal.insert(target, t1, anchor);
2012
+ internal.insert(target, path1, anchor);
2013
+ internal.insert(target, t2, anchor);
2014
+ internal.insert(target, path2, anchor);
2015
+ },
2016
+ p(ctx, [dirty]) {
2017
+ if (dirty & /*d*/ 1) {
2018
+ internal.attr(path0, "d", /*d*/ ctx[0]);
2019
+ }
2020
+
2021
+ if (dirty & /*d*/ 1) {
2022
+ internal.attr(path1, "d", /*d*/ ctx[0]);
2023
+ }
2024
+
2025
+ if (dirty & /*d*/ 1) {
2026
+ internal.attr(path2, "d", /*d*/ ctx[0]);
2027
+ }
2028
+ },
2029
+ i: internal.noop,
2030
+ o: internal.noop,
2031
+ d(detaching) {
2032
+ if (detaching) internal.detach(defs);
2033
+ if (detaching) internal.detach(t0);
2034
+ if (detaching) internal.detach(path0);
2035
+ if (detaching) internal.detach(t1);
2036
+ if (detaching) internal.detach(path1);
2037
+ if (detaching) internal.detach(t2);
2038
+ if (detaching) internal.detach(path2);
2039
+ }
2040
+ };
2041
+ }
2042
+
2043
+ function instance$5($$self, $$props, $$invalidate) {
2044
+ let d;
2045
+ let { path } = $$props;
2046
+
2047
+ $$self.$$set = $$props => {
2048
+ if ('path' in $$props) $$invalidate(1, path = $$props.path);
2049
+ };
2050
+
2051
+ $$self.$$.update = () => {
2052
+ if ($$self.$$.dirty & /*path*/ 2) {
2053
+ $$invalidate(0, d = pathD(path, { needZ: true }));
2054
+ }
2055
+ };
2056
+
2057
+ return [d, path];
2058
+ }
2059
+
2060
+ class RoomMaterial_2 extends internal.SvelteComponent {
2061
+ constructor(options) {
2062
+ super();
2063
+ internal.init(this, options, instance$5, create_fragment$5, internal.safe_not_equal, { path: 1 });
2064
+ }
2065
+ }
2066
+
2067
+ /* src/floorplan/Components/RoomMaterials/RoomMaterial.svelte generated by Svelte v3.47.0 */
2068
+
2069
+ function add_css$4(target) {
2070
+ internal.append_styles(target, "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}");
2071
+ }
2072
+
2073
+ function get_each_context$2(ctx, list, i) {
2074
+ const child_ctx = ctx.slice();
2075
+ child_ctx[5] = list[i];
2076
+ return child_ctx;
2077
+ }
2078
+
2079
+ // (19:6) {:else}
2080
+ function create_else_block(ctx) {
2081
+ let roommaterial_1;
2082
+ let current;
2083
+ roommaterial_1 = new RoomMaterial_1({ props: { path: /*room*/ ctx[5].path } });
2084
+
2085
+ return {
2086
+ c() {
2087
+ internal.create_component(roommaterial_1.$$.fragment);
2088
+ },
2089
+ m(target, anchor) {
2090
+ internal.mount_component(roommaterial_1, target, anchor);
2091
+ current = true;
2092
+ },
2093
+ p(ctx, dirty) {
2094
+ const roommaterial_1_changes = {};
2095
+ if (dirty & /*rooms*/ 1) roommaterial_1_changes.path = /*room*/ ctx[5].path;
2096
+ roommaterial_1.$set(roommaterial_1_changes);
2097
+ },
2098
+ i(local) {
2099
+ if (current) return;
2100
+ internal.transition_in(roommaterial_1.$$.fragment, local);
2101
+ current = true;
2102
+ },
2103
+ o(local) {
2104
+ internal.transition_out(roommaterial_1.$$.fragment, local);
2105
+ current = false;
2106
+ },
2107
+ d(detaching) {
2108
+ internal.destroy_component(roommaterial_1, detaching);
2109
+ }
2110
+ };
2111
+ }
2112
+
2113
+ // (17:37)
2114
+ function create_if_block_1$2(ctx) {
2115
+ let roommaterial_2;
2116
+ let current;
2117
+ roommaterial_2 = new RoomMaterial_2({ props: { path: /*room*/ ctx[5].path } });
2118
+
2119
+ return {
2120
+ c() {
2121
+ internal.create_component(roommaterial_2.$$.fragment);
2122
+ },
2123
+ m(target, anchor) {
2124
+ internal.mount_component(roommaterial_2, target, anchor);
2125
+ current = true;
2126
+ },
2127
+ p(ctx, dirty) {
2128
+ const roommaterial_2_changes = {};
2129
+ if (dirty & /*rooms*/ 1) roommaterial_2_changes.path = /*room*/ ctx[5].path;
2130
+ roommaterial_2.$set(roommaterial_2_changes);
2131
+ },
2132
+ i(local) {
2133
+ if (current) return;
2134
+ internal.transition_in(roommaterial_2.$$.fragment, local);
2135
+ current = true;
2136
+ },
2137
+ o(local) {
2138
+ internal.transition_out(roommaterial_2.$$.fragment, local);
2139
+ current = false;
2140
+ },
2141
+ d(detaching) {
2142
+ internal.destroy_component(roommaterial_2, detaching);
2143
+ }
2144
+ };
2145
+ }
2146
+
2147
+ // (15:6) {#if room.floorType === 1}
2148
+ function create_if_block$2(ctx) {
2149
+ let roommaterial_0;
2150
+ let current;
2151
+ roommaterial_0 = new RoomMaterial_0({ props: { path: /*room*/ ctx[5].path } });
2152
+
2153
+ return {
2154
+ c() {
2155
+ internal.create_component(roommaterial_0.$$.fragment);
2156
+ },
2157
+ m(target, anchor) {
2158
+ internal.mount_component(roommaterial_0, target, anchor);
2159
+ current = true;
2160
+ },
2161
+ p(ctx, dirty) {
2162
+ const roommaterial_0_changes = {};
2163
+ if (dirty & /*rooms*/ 1) roommaterial_0_changes.path = /*room*/ ctx[5].path;
2164
+ roommaterial_0.$set(roommaterial_0_changes);
2165
+ },
2166
+ i(local) {
2167
+ if (current) return;
2168
+ internal.transition_in(roommaterial_0.$$.fragment, local);
2169
+ current = true;
2170
+ },
2171
+ o(local) {
2172
+ internal.transition_out(roommaterial_0.$$.fragment, local);
2173
+ current = false;
2174
+ },
2175
+ d(detaching) {
2176
+ internal.destroy_component(roommaterial_0, detaching);
2177
+ }
2178
+ };
2179
+ }
2180
+
2181
+ // (13:2) {#each rooms as room}
2182
+ function create_each_block$2(ctx) {
2183
+ let svg;
2184
+ let current_block_type_index;
2185
+ let if_block;
2186
+ let svg_viewBox_value;
2187
+ let current;
2188
+ const if_block_creators = [create_if_block$2, create_if_block_1$2, create_else_block];
2189
+ const if_blocks = [];
2190
+
2191
+ function select_block_type(ctx, dirty) {
2192
+ if (/*room*/ ctx[5].floorType === 1) return 0;
2193
+ if (/*room*/ ctx[5].floorType === 0) return 1;
2194
+ return 2;
2195
+ }
2196
+
2197
+ current_block_type_index = select_block_type(ctx);
2198
+ if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
2199
+
2200
+ return {
2201
+ c() {
2202
+ svg = internal.svg_element("svg");
2203
+ if_block.c();
2204
+ internal.attr(svg, "width", "100%");
2205
+ internal.attr(svg, "height", "100%");
2206
+ internal.attr(svg, "viewBox", svg_viewBox_value = `0 0 ${/*boundingWidth*/ ctx[1]} ${/*boundingHeight*/ ctx[2]}`);
2207
+ internal.attr(svg, "class", "svelte-1dykexu");
2208
+ },
2209
+ m(target, anchor) {
2210
+ internal.insert(target, svg, anchor);
2211
+ if_blocks[current_block_type_index].m(svg, null);
2212
+ current = true;
2213
+ },
2214
+ p(ctx, dirty) {
2215
+ let previous_block_index = current_block_type_index;
2216
+ current_block_type_index = select_block_type(ctx);
2217
+
2218
+ if (current_block_type_index === previous_block_index) {
2219
+ if_blocks[current_block_type_index].p(ctx, dirty);
2220
+ } else {
2221
+ internal.group_outros();
2222
+
2223
+ internal.transition_out(if_blocks[previous_block_index], 1, 1, () => {
2224
+ if_blocks[previous_block_index] = null;
2225
+ });
2226
+
2227
+ internal.check_outros();
2228
+ if_block = if_blocks[current_block_type_index];
2229
+
2230
+ if (!if_block) {
2231
+ if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
2232
+ if_block.c();
2233
+ } else {
2234
+ if_block.p(ctx, dirty);
2235
+ }
2236
+
2237
+ internal.transition_in(if_block, 1);
2238
+ if_block.m(svg, null);
2239
+ }
2240
+ },
2241
+ i(local) {
2242
+ if (current) return;
2243
+ internal.transition_in(if_block);
2244
+ current = true;
2245
+ },
2246
+ o(local) {
2247
+ internal.transition_out(if_block);
2248
+ current = false;
2249
+ },
2250
+ d(detaching) {
2251
+ if (detaching) internal.detach(svg);
2252
+ if_blocks[current_block_type_index].d();
2253
+ }
2254
+ };
2255
+ }
2256
+
2257
+ function create_fragment$4(ctx) {
2258
+ let div;
2259
+ let current;
2260
+ let each_value = /*rooms*/ ctx[0];
2261
+ let each_blocks = [];
2262
+
2263
+ for (let i = 0; i < each_value.length; i += 1) {
2264
+ each_blocks[i] = create_each_block$2(get_each_context$2(ctx, each_value, i));
2265
+ }
2266
+
2267
+ const out = i => internal.transition_out(each_blocks[i], 1, 1, () => {
2268
+ each_blocks[i] = null;
2269
+ });
2270
+
2271
+ return {
2272
+ c() {
2273
+ div = internal.element("div");
2274
+
2275
+ for (let i = 0; i < each_blocks.length; i += 1) {
2276
+ each_blocks[i].c();
2277
+ }
2278
+
2279
+ internal.attr(div, "class", "floorplan-plugin__room-material svelte-1dykexu");
2280
+ },
2281
+ m(target, anchor) {
2282
+ internal.insert(target, div, anchor);
2283
+
2284
+ for (let i = 0; i < each_blocks.length; i += 1) {
2285
+ each_blocks[i].m(div, null);
2286
+ }
2287
+
2288
+ current = true;
2289
+ },
2290
+ p(ctx, [dirty]) {
2291
+ if (dirty & /*boundingWidth, boundingHeight, rooms*/ 7) {
2292
+ each_value = /*rooms*/ ctx[0];
2293
+ let i;
2294
+
2295
+ for (i = 0; i < each_value.length; i += 1) {
2296
+ const child_ctx = get_each_context$2(ctx, each_value, i);
2297
+
2298
+ if (each_blocks[i]) {
2299
+ each_blocks[i].p(child_ctx, dirty);
2300
+ internal.transition_in(each_blocks[i], 1);
2301
+ } else {
2302
+ each_blocks[i] = create_each_block$2(child_ctx);
2303
+ each_blocks[i].c();
2304
+ internal.transition_in(each_blocks[i], 1);
2305
+ each_blocks[i].m(div, null);
2306
+ }
2307
+ }
2308
+
2309
+ internal.group_outros();
2310
+
2311
+ for (i = each_value.length; i < each_blocks.length; i += 1) {
2312
+ out(i);
2313
+ }
2314
+
2315
+ internal.check_outros();
2316
+ }
2317
+ },
2318
+ i(local) {
2319
+ if (current) return;
2320
+
2321
+ for (let i = 0; i < each_value.length; i += 1) {
2322
+ internal.transition_in(each_blocks[i]);
2323
+ }
2324
+
2325
+ current = true;
2326
+ },
2327
+ o(local) {
2328
+ each_blocks = each_blocks.filter(Boolean);
2329
+
2330
+ for (let i = 0; i < each_blocks.length; i += 1) {
2331
+ internal.transition_out(each_blocks[i]);
2332
+ }
2333
+
2334
+ current = false;
2335
+ },
2336
+ d(detaching) {
2337
+ if (detaching) internal.detach(div);
2338
+ internal.destroy_each(each_blocks, detaching);
2339
+ }
2340
+ };
2341
+ }
2342
+
2343
+ function instance$4($$self, $$props, $$invalidate) {
2344
+ let rooms;
2345
+ let { floorIndex } = $$props;
2346
+ let { floorplanData } = $$props;
2347
+ const boundingWidth = floorplanData.bounding.max.x - floorplanData.bounding.min.x;
2348
+ const boundingHeight = floorplanData.bounding.max.y - floorplanData.bounding.min.y;
2349
+
2350
+ $$self.$$set = $$props => {
2351
+ if ('floorIndex' in $$props) $$invalidate(3, floorIndex = $$props.floorIndex);
2352
+ if ('floorplanData' in $$props) $$invalidate(4, floorplanData = $$props.floorplanData);
2353
+ };
2354
+
2355
+ $$self.$$.update = () => {
2356
+ if ($$self.$$.dirty & /*floorplanData, floorIndex*/ 24) {
2357
+ $$invalidate(0, rooms = floorplanData.floorDatas[floorIndex].rooms.map(room => Object.assign(Object.assign({}, room), {
2358
+ path: room.path.map(p => formatFloorplanPoint(p, floorplanData.bounding))
2359
+ })));
2360
+ }
2361
+ };
2362
+
2363
+ return [rooms, boundingWidth, boundingHeight, floorIndex, floorplanData];
2364
+ }
2365
+
2366
+ class RoomMaterial extends internal.SvelteComponent {
2367
+ constructor(options) {
2368
+ super();
2369
+ internal.init(this, options, instance$4, create_fragment$4, internal.safe_not_equal, { floorIndex: 3, floorplanData: 4 }, add_css$4);
2370
+ }
2371
+ }
2372
+
2373
+ /* src/floorplan/Components/RoomHighlight/Room.svelte generated by Svelte v3.47.0 */
2374
+
2375
+ function add_css$3(target) {
2376
+ internal.append_styles(target, "svelte-19uvvss", "path.svelte-19uvvss{opacity:0}path.svelte-19uvvss:hover{opacity:0.1}");
2377
+ }
2378
+
2379
+ function create_fragment$3(ctx) {
2380
+ let path;
2381
+ let mounted;
2382
+ let dispose;
2383
+
2384
+ return {
2385
+ c() {
2386
+ path = internal.svg_element("path");
2387
+ internal.attr(path, "d", /*_pathD*/ ctx[2]);
2388
+ internal.attr(path, "fill", `#fff`);
2389
+ internal.attr(path, "class", "svelte-19uvvss");
2390
+ },
2391
+ m(target, anchor) {
2392
+ internal.insert(target, path, anchor);
2393
+
2394
+ if (!mounted) {
2395
+ dispose = [
2396
+ internal.listen(path, "mouseenter", /*onMouseEnter*/ ctx[0]),
2397
+ internal.listen(path, "mouseleave", /*onMouseLeave*/ ctx[1])
2398
+ ];
2399
+
2400
+ mounted = true;
2401
+ }
2402
+ },
2403
+ p: internal.noop,
2404
+ i: internal.noop,
2405
+ o: internal.noop,
2406
+ d(detaching) {
2407
+ if (detaching) internal.detach(path);
2408
+ mounted = false;
2409
+ internal.run_all(dispose);
2410
+ }
2411
+ };
2412
+ }
2413
+
2414
+ function instance$3($$self, $$props, $$invalidate) {
2415
+ let { room } = $$props;
2416
+ let { floorplanData } = $$props;
2417
+ let { hoveredRoom } = $$props;
2418
+
2419
+ function onMouseEnter() {
2420
+ hoveredRoom.set(room);
2421
+ }
2422
+
2423
+ function onMouseLeave() {
2424
+ hoveredRoom.set(undefined);
2425
+ }
2426
+
2427
+ const { bounding } = floorplanData;
2428
+
2429
+ const _pathD = pathD(room.path, {
2430
+ needZ: true,
2431
+ format: vector => formatFloorplanPoint(vector, bounding)
2432
+ });
2433
+
2434
+ $$self.$$set = $$props => {
2435
+ if ('room' in $$props) $$invalidate(3, room = $$props.room);
2436
+ if ('floorplanData' in $$props) $$invalidate(4, floorplanData = $$props.floorplanData);
2437
+ if ('hoveredRoom' in $$props) $$invalidate(5, hoveredRoom = $$props.hoveredRoom);
2438
+ };
2439
+
2440
+ return [onMouseEnter, onMouseLeave, _pathD, room, floorplanData, hoveredRoom];
2441
+ }
2442
+
2443
+ class Room extends internal.SvelteComponent {
2444
+ constructor(options) {
2445
+ super();
2446
+
2447
+ internal.init(
2448
+ this,
2449
+ options,
2450
+ instance$3,
2451
+ create_fragment$3,
2452
+ internal.safe_not_equal,
2453
+ {
2454
+ room: 3,
2455
+ floorplanData: 4,
2456
+ hoveredRoom: 5
2457
+ },
2458
+ add_css$3
2459
+ );
2460
+ }
2461
+ }
2462
+
2463
+ /* src/floorplan/Components/RoomHighlight/RoomHighlight.svelte generated by Svelte v3.47.0 */
2464
+
2465
+ function add_css$2(target) {
2466
+ internal.append_styles(target, "svelte-1kqo6e4", ".floorplan-plugin__room-highlight.svelte-1kqo6e4{position:absolute;width:100%;height:100%}svg.svelte-1kqo6e4{width:100%;height:100%;overflow:visible}");
2467
+ }
2468
+
2469
+ function get_each_context$1(ctx, list, i) {
2470
+ const child_ctx = ctx.slice();
2471
+ child_ctx[5] = list[i];
2472
+ return child_ctx;
2473
+ }
2474
+
2475
+ // (11:4) {#each floorplanData.floorDatas[floorIndex].rooms as room (room.id)}
2476
+ function create_each_block$1(key_1, ctx) {
2477
+ let first;
2478
+ let room;
2479
+ let current;
2480
+
2481
+ const room_spread_levels = [
2482
+ {
2483
+ room: /*room*/ ctx[5],
2484
+ floorplanData: /*floorplanData*/ ctx[1],
2485
+ hoveredRoom: /*hoveredRoom*/ ctx[2]
2486
+ }
2487
+ ];
2488
+
2489
+ let room_props = {};
2490
+
2491
+ for (let i = 0; i < room_spread_levels.length; i += 1) {
2492
+ room_props = internal.assign(room_props, room_spread_levels[i]);
2493
+ }
2494
+
2495
+ room = new Room({ props: room_props });
2496
+
2497
+ return {
2498
+ key: key_1,
2499
+ first: null,
2500
+ c() {
2501
+ first = internal.empty();
2502
+ internal.create_component(room.$$.fragment);
2503
+ this.first = first;
2504
+ },
2505
+ m(target, anchor) {
2506
+ internal.insert(target, first, anchor);
2507
+ internal.mount_component(room, target, anchor);
2508
+ current = true;
2509
+ },
2510
+ p(new_ctx, dirty) {
2511
+ ctx = new_ctx;
2512
+
2513
+ const room_changes = (dirty & /*floorplanData, floorIndex, hoveredRoom*/ 7)
2514
+ ? internal.get_spread_update(room_spread_levels, [
2515
+ {
2516
+ room: /*room*/ ctx[5],
2517
+ floorplanData: /*floorplanData*/ ctx[1],
2518
+ hoveredRoom: /*hoveredRoom*/ ctx[2]
2519
+ }
2520
+ ])
2521
+ : {};
2522
+
2523
+ room.$set(room_changes);
2524
+ },
2525
+ i(local) {
2526
+ if (current) return;
2527
+ internal.transition_in(room.$$.fragment, local);
2528
+ current = true;
2529
+ },
2530
+ o(local) {
2531
+ internal.transition_out(room.$$.fragment, local);
2532
+ current = false;
2533
+ },
2534
+ d(detaching) {
2535
+ if (detaching) internal.detach(first);
2536
+ internal.destroy_component(room, detaching);
2537
+ }
2538
+ };
2539
+ }
2540
+
2541
+ function create_fragment$2(ctx) {
2542
+ let div;
2543
+ let svg;
2544
+ let each_blocks = [];
2545
+ let each_1_lookup = new Map();
2546
+ let current;
2547
+ let each_value = /*floorplanData*/ ctx[1].floorDatas[/*floorIndex*/ ctx[0]].rooms;
2548
+ const get_key = ctx => /*room*/ ctx[5].id;
2549
+
2550
+ for (let i = 0; i < each_value.length; i += 1) {
2551
+ let child_ctx = get_each_context$1(ctx, each_value, i);
2552
+ let key = get_key(child_ctx);
2553
+ each_1_lookup.set(key, each_blocks[i] = create_each_block$1(key, child_ctx));
2554
+ }
2555
+
2556
+ return {
2557
+ c() {
2558
+ div = internal.element("div");
2559
+ svg = internal.svg_element("svg");
2560
+
2561
+ for (let i = 0; i < each_blocks.length; i += 1) {
2562
+ each_blocks[i].c();
2563
+ }
2564
+
2565
+ internal.attr(svg, "width", "100%");
2566
+ internal.attr(svg, "height", "100%");
2567
+ internal.attr(svg, "viewBox", `0 0 ${/*boundingWidth*/ ctx[3]} ${/*boundingHeight*/ ctx[4]}`);
2568
+ internal.attr(svg, "class", "svelte-1kqo6e4");
2569
+ internal.attr(div, "class", "floorplan-plugin__room-highlight svelte-1kqo6e4");
2570
+ },
2571
+ m(target, anchor) {
2572
+ internal.insert(target, div, anchor);
2573
+ internal.append(div, svg);
2574
+
2575
+ for (let i = 0; i < each_blocks.length; i += 1) {
2576
+ each_blocks[i].m(svg, null);
2577
+ }
2578
+
2579
+ current = true;
2580
+ },
2581
+ p(ctx, [dirty]) {
2582
+ if (dirty & /*floorplanData, floorIndex, hoveredRoom*/ 7) {
2583
+ each_value = /*floorplanData*/ ctx[1].floorDatas[/*floorIndex*/ ctx[0]].rooms;
2584
+ internal.group_outros();
2585
+ each_blocks = internal.update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, svg, internal.outro_and_destroy_block, create_each_block$1, null, get_each_context$1);
2586
+ internal.check_outros();
2587
+ }
2588
+ },
2589
+ i(local) {
2590
+ if (current) return;
2591
+
2592
+ for (let i = 0; i < each_value.length; i += 1) {
2593
+ internal.transition_in(each_blocks[i]);
2594
+ }
2595
+
2596
+ current = true;
2597
+ },
2598
+ o(local) {
2599
+ for (let i = 0; i < each_blocks.length; i += 1) {
2600
+ internal.transition_out(each_blocks[i]);
2601
+ }
2602
+
2603
+ current = false;
2604
+ },
2605
+ d(detaching) {
2606
+ if (detaching) internal.detach(div);
2607
+
2608
+ for (let i = 0; i < each_blocks.length; i += 1) {
2609
+ each_blocks[i].d();
2610
+ }
2611
+ }
2612
+ };
2613
+ }
2614
+
2615
+ function instance$2($$self, $$props, $$invalidate) {
2616
+ let { floorIndex } = $$props;
2617
+ let { floorplanData } = $$props;
2618
+ let { hoveredRoom } = $$props;
2619
+ const boundingWidth = floorplanData.bounding.max.x - floorplanData.bounding.min.x;
2620
+ const boundingHeight = floorplanData.bounding.max.y - floorplanData.bounding.min.y;
2621
+
2622
+ $$self.$$set = $$props => {
2623
+ if ('floorIndex' in $$props) $$invalidate(0, floorIndex = $$props.floorIndex);
2624
+ if ('floorplanData' in $$props) $$invalidate(1, floorplanData = $$props.floorplanData);
2625
+ if ('hoveredRoom' in $$props) $$invalidate(2, hoveredRoom = $$props.hoveredRoom);
2626
+ };
2627
+
2628
+ return [floorIndex, floorplanData, hoveredRoom, boundingWidth, boundingHeight];
2629
+ }
2630
+
2631
+ class RoomHighlight extends internal.SvelteComponent {
2632
+ constructor(options) {
2633
+ super();
2634
+
2635
+ internal.init(
2636
+ this,
2637
+ options,
2638
+ instance$2,
2639
+ create_fragment$2,
2640
+ internal.safe_not_equal,
2641
+ {
2642
+ floorIndex: 0,
2643
+ floorplanData: 1,
2644
+ hoveredRoom: 2
2645
+ },
2646
+ add_css$2
2647
+ );
2648
+ }
2649
+ }
2650
+
2651
+ /* src/floorplan/Components/CurrentFloor.svelte generated by Svelte v3.47.0 */
2652
+
2653
+ function add_css$1(target) {
2654
+ internal.append_styles(target, "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}");
2655
+ }
2656
+
2657
+ // (20:2) {#if hoverEnable}
2658
+ function create_if_block_2(ctx) {
2659
+ let roomhighlight;
2660
+ let current;
2661
+
2662
+ const roomhighlight_spread_levels = [
2663
+ {
2664
+ floorIndex: /*floorIndex*/ ctx[1],
2665
+ floorplanData: /*floorplanData*/ ctx[5],
2666
+ hoveredRoom: /*hoveredRoom*/ ctx[8]
2667
+ }
2668
+ ];
2669
+
2670
+ let roomhighlight_props = {};
2671
+
2672
+ for (let i = 0; i < roomhighlight_spread_levels.length; i += 1) {
2673
+ roomhighlight_props = internal.assign(roomhighlight_props, roomhighlight_spread_levels[i]);
2674
+ }
2675
+
2676
+ roomhighlight = new RoomHighlight({ props: roomhighlight_props });
2677
+
2678
+ return {
2679
+ c() {
2680
+ internal.create_component(roomhighlight.$$.fragment);
2681
+ },
2682
+ m(target, anchor) {
2683
+ internal.mount_component(roomhighlight, target, anchor);
2684
+ current = true;
2685
+ },
2686
+ p(ctx, dirty) {
2687
+ const roomhighlight_changes = (dirty & /*floorIndex, floorplanData, hoveredRoom*/ 290)
2688
+ ? internal.get_spread_update(roomhighlight_spread_levels, [
2689
+ {
2690
+ floorIndex: /*floorIndex*/ ctx[1],
2691
+ floorplanData: /*floorplanData*/ ctx[5],
2692
+ hoveredRoom: /*hoveredRoom*/ ctx[8]
2693
+ }
2694
+ ])
2695
+ : {};
2696
+
2697
+ roomhighlight.$set(roomhighlight_changes);
2698
+ },
2699
+ i(local) {
2700
+ if (current) return;
2701
+ internal.transition_in(roomhighlight.$$.fragment, local);
2702
+ current = true;
2703
+ },
2704
+ o(local) {
2705
+ internal.transition_out(roomhighlight.$$.fragment, local);
2706
+ current = false;
2707
+ },
2708
+ d(detaching) {
2709
+ internal.destroy_component(roomhighlight, detaching);
2710
+ }
2711
+ };
2712
+ }
2713
+
2714
+ // (24:2) {#if roomLabelsEnable}
2715
+ function create_if_block_1$1(ctx) {
2716
+ let roomlabels;
2717
+ let current;
2718
+
2719
+ const roomlabels_spread_levels = [
2720
+ {
2721
+ floorplanData: /*floorplanData*/ ctx[5],
2722
+ floorIndex: /*floorIndex*/ ctx[1],
2723
+ getLabelElement: /*getLabelElement*/ ctx[6],
2724
+ hoveredRoom: /*hoveredRoom*/ ctx[8],
2725
+ adaptiveRoomLabelVisibleEnable: /*adaptiveRoomLabelVisibleEnable*/ ctx[7]
2726
+ }
2727
+ ];
2728
+
2729
+ let roomlabels_props = {};
2730
+
2731
+ for (let i = 0; i < roomlabels_spread_levels.length; i += 1) {
2732
+ roomlabels_props = internal.assign(roomlabels_props, roomlabels_spread_levels[i]);
2733
+ }
2734
+
2735
+ roomlabels = new RoomLabels({ props: roomlabels_props });
2736
+
2737
+ return {
2738
+ c() {
2739
+ internal.create_component(roomlabels.$$.fragment);
2740
+ },
2741
+ m(target, anchor) {
2742
+ internal.mount_component(roomlabels, target, anchor);
2743
+ current = true;
2744
+ },
2745
+ p(ctx, dirty) {
2746
+ const roomlabels_changes = (dirty & /*floorplanData, floorIndex, getLabelElement, hoveredRoom, adaptiveRoomLabelVisibleEnable*/ 482)
2747
+ ? internal.get_spread_update(roomlabels_spread_levels, [
2748
+ {
2749
+ floorplanData: /*floorplanData*/ ctx[5],
2750
+ floorIndex: /*floorIndex*/ ctx[1],
2751
+ getLabelElement: /*getLabelElement*/ ctx[6],
2752
+ hoveredRoom: /*hoveredRoom*/ ctx[8],
2753
+ adaptiveRoomLabelVisibleEnable: /*adaptiveRoomLabelVisibleEnable*/ ctx[7]
2754
+ }
2755
+ ])
2756
+ : {};
2757
+
2758
+ roomlabels.$set(roomlabels_changes);
2759
+ },
2760
+ i(local) {
2761
+ if (current) return;
2762
+ internal.transition_in(roomlabels.$$.fragment, local);
2763
+ current = true;
2764
+ },
2765
+ o(local) {
2766
+ internal.transition_out(roomlabels.$$.fragment, local);
2767
+ current = false;
2768
+ },
2769
+ d(detaching) {
2770
+ internal.destroy_component(roomlabels, detaching);
2771
+ }
2772
+ };
2773
+ }
2774
+
2775
+ // (27:2) {#if ruleLabelsEnable}
2776
+ function create_if_block$1(ctx) {
2777
+ let rulelabels;
2778
+ let current;
2779
+
2780
+ const rulelabels_spread_levels = [
2781
+ {
2782
+ floorplanData: /*floorplanData*/ ctx[5],
2783
+ floorIndex: /*floorIndex*/ ctx[1]
2784
+ }
2785
+ ];
2786
+
2787
+ let rulelabels_props = {};
2788
+
2789
+ for (let i = 0; i < rulelabels_spread_levels.length; i += 1) {
2790
+ rulelabels_props = internal.assign(rulelabels_props, rulelabels_spread_levels[i]);
2791
+ }
2792
+
2793
+ rulelabels = new RuleLabels({ props: rulelabels_props });
2794
+
2795
+ return {
2796
+ c() {
2797
+ internal.create_component(rulelabels.$$.fragment);
2798
+ },
2799
+ m(target, anchor) {
2800
+ internal.mount_component(rulelabels, target, anchor);
2801
+ current = true;
2802
+ },
2803
+ p(ctx, dirty) {
2804
+ const rulelabels_changes = (dirty & /*floorplanData, floorIndex*/ 34)
2805
+ ? internal.get_spread_update(rulelabels_spread_levels, [
2806
+ {
2807
+ floorplanData: /*floorplanData*/ ctx[5],
2808
+ floorIndex: /*floorIndex*/ ctx[1]
2809
+ }
2810
+ ])
2811
+ : {};
2812
+
2813
+ rulelabels.$set(rulelabels_changes);
2814
+ },
2815
+ i(local) {
2816
+ if (current) return;
2817
+ internal.transition_in(rulelabels.$$.fragment, local);
2818
+ current = true;
2819
+ },
2820
+ o(local) {
2821
+ internal.transition_out(rulelabels.$$.fragment, local);
2822
+ current = false;
2823
+ },
2824
+ d(detaching) {
2825
+ internal.destroy_component(rulelabels, detaching);
2826
+ }
2827
+ };
2828
+ }
2829
+
2830
+ function create_fragment$1(ctx) {
2831
+ let div;
2832
+ let roommaterial;
2833
+ let t0;
2834
+ let t1;
2835
+ let baseimage;
2836
+ let t2;
2837
+ let t3;
2838
+ let div_class_value;
2839
+ let current;
2840
+
2841
+ const roommaterial_spread_levels = [
2842
+ {
2843
+ floorIndex: /*floorIndex*/ ctx[1],
2844
+ floorplanData: /*floorplanData*/ ctx[5]
2845
+ }
2846
+ ];
2847
+
2848
+ let roommaterial_props = {};
2849
+
2850
+ for (let i = 0; i < roommaterial_spread_levels.length; i += 1) {
2851
+ roommaterial_props = internal.assign(roommaterial_props, roommaterial_spread_levels[i]);
2852
+ }
2853
+
2854
+ roommaterial = new RoomMaterial({ props: roommaterial_props });
2855
+ let if_block0 = /*hoverEnable*/ ctx[2] && create_if_block_2(ctx);
2856
+
2857
+ const baseimage_spread_levels = [
2858
+ {
2859
+ floorplanData: /*floorplanData*/ ctx[5],
2860
+ floorIndex: /*floorIndex*/ ctx[1]
2861
+ }
2862
+ ];
2863
+
2864
+ let baseimage_props = {};
2865
+
2866
+ for (let i = 0; i < baseimage_spread_levels.length; i += 1) {
2867
+ baseimage_props = internal.assign(baseimage_props, baseimage_spread_levels[i]);
2868
+ }
2869
+
2870
+ baseimage = new BaseImage({ props: baseimage_props });
2871
+ let if_block1 = /*roomLabelsEnable*/ ctx[3] && create_if_block_1$1(ctx);
2872
+ let if_block2 = /*ruleLabelsEnable*/ ctx[4] && create_if_block$1(ctx);
2873
+
2874
+ return {
2875
+ c() {
2876
+ div = internal.element("div");
2877
+ internal.create_component(roommaterial.$$.fragment);
2878
+ t0 = internal.space();
2879
+ if (if_block0) if_block0.c();
2880
+ t1 = internal.space();
2881
+ internal.create_component(baseimage.$$.fragment);
2882
+ t2 = internal.space();
2883
+ if (if_block1) if_block1.c();
2884
+ t3 = internal.space();
2885
+ if (if_block2) if_block2.c();
2886
+
2887
+ internal.attr(div, "class", div_class_value = "" + (internal.null_to_empty(`floorplan-plugin__floor${/*isCurrent*/ ctx[0]
2888
+ ? ' floorplan-plugin__floor--is-current'
2889
+ : ''}`) + " svelte-bl8zrz"));
2890
+ },
2891
+ m(target, anchor) {
2892
+ internal.insert(target, div, anchor);
2893
+ internal.mount_component(roommaterial, div, null);
2894
+ internal.append(div, t0);
2895
+ if (if_block0) if_block0.m(div, null);
2896
+ internal.append(div, t1);
2897
+ internal.mount_component(baseimage, div, null);
2898
+ internal.append(div, t2);
2899
+ if (if_block1) if_block1.m(div, null);
2900
+ internal.append(div, t3);
2901
+ if (if_block2) if_block2.m(div, null);
2902
+ current = true;
2903
+ },
2904
+ p(ctx, [dirty]) {
2905
+ const roommaterial_changes = (dirty & /*floorIndex, floorplanData*/ 34)
2906
+ ? internal.get_spread_update(roommaterial_spread_levels, [
2907
+ {
2908
+ floorIndex: /*floorIndex*/ ctx[1],
2909
+ floorplanData: /*floorplanData*/ ctx[5]
2910
+ }
2911
+ ])
2912
+ : {};
2913
+
2914
+ roommaterial.$set(roommaterial_changes);
2915
+
2916
+ if (/*hoverEnable*/ ctx[2]) {
2917
+ if (if_block0) {
2918
+ if_block0.p(ctx, dirty);
2919
+
2920
+ if (dirty & /*hoverEnable*/ 4) {
2921
+ internal.transition_in(if_block0, 1);
2922
+ }
2923
+ } else {
2924
+ if_block0 = create_if_block_2(ctx);
2925
+ if_block0.c();
2926
+ internal.transition_in(if_block0, 1);
2927
+ if_block0.m(div, t1);
2928
+ }
2929
+ } else if (if_block0) {
2930
+ internal.group_outros();
2931
+
2932
+ internal.transition_out(if_block0, 1, 1, () => {
2933
+ if_block0 = null;
2934
+ });
2935
+
2936
+ internal.check_outros();
2937
+ }
2938
+
2939
+ const baseimage_changes = (dirty & /*floorplanData, floorIndex*/ 34)
2940
+ ? internal.get_spread_update(baseimage_spread_levels, [
2941
+ {
2942
+ floorplanData: /*floorplanData*/ ctx[5],
2943
+ floorIndex: /*floorIndex*/ ctx[1]
2944
+ }
2945
+ ])
2946
+ : {};
2947
+
2948
+ baseimage.$set(baseimage_changes);
2949
+
2950
+ if (/*roomLabelsEnable*/ ctx[3]) {
2951
+ if (if_block1) {
2952
+ if_block1.p(ctx, dirty);
2953
+
2954
+ if (dirty & /*roomLabelsEnable*/ 8) {
2955
+ internal.transition_in(if_block1, 1);
2956
+ }
2957
+ } else {
2958
+ if_block1 = create_if_block_1$1(ctx);
2959
+ if_block1.c();
2960
+ internal.transition_in(if_block1, 1);
2961
+ if_block1.m(div, t3);
2962
+ }
2963
+ } else if (if_block1) {
2964
+ internal.group_outros();
2965
+
2966
+ internal.transition_out(if_block1, 1, 1, () => {
2967
+ if_block1 = null;
2968
+ });
2969
+
2970
+ internal.check_outros();
2971
+ }
2972
+
2973
+ if (/*ruleLabelsEnable*/ ctx[4]) {
2974
+ if (if_block2) {
2975
+ if_block2.p(ctx, dirty);
2976
+
2977
+ if (dirty & /*ruleLabelsEnable*/ 16) {
2978
+ internal.transition_in(if_block2, 1);
2979
+ }
2980
+ } else {
2981
+ if_block2 = create_if_block$1(ctx);
2982
+ if_block2.c();
2983
+ internal.transition_in(if_block2, 1);
2984
+ if_block2.m(div, null);
2985
+ }
2986
+ } else if (if_block2) {
2987
+ internal.group_outros();
2988
+
2989
+ internal.transition_out(if_block2, 1, 1, () => {
2990
+ if_block2 = null;
2991
+ });
2992
+
2993
+ internal.check_outros();
2994
+ }
2995
+
2996
+ if (!current || dirty & /*isCurrent*/ 1 && div_class_value !== (div_class_value = "" + (internal.null_to_empty(`floorplan-plugin__floor${/*isCurrent*/ ctx[0]
2997
+ ? ' floorplan-plugin__floor--is-current'
2998
+ : ''}`) + " svelte-bl8zrz"))) {
2999
+ internal.attr(div, "class", div_class_value);
3000
+ }
3001
+ },
3002
+ i(local) {
3003
+ if (current) return;
3004
+ internal.transition_in(roommaterial.$$.fragment, local);
3005
+ internal.transition_in(if_block0);
3006
+ internal.transition_in(baseimage.$$.fragment, local);
3007
+ internal.transition_in(if_block1);
3008
+ internal.transition_in(if_block2);
3009
+ current = true;
3010
+ },
3011
+ o(local) {
3012
+ internal.transition_out(roommaterial.$$.fragment, local);
3013
+ internal.transition_out(if_block0);
3014
+ internal.transition_out(baseimage.$$.fragment, local);
3015
+ internal.transition_out(if_block1);
3016
+ internal.transition_out(if_block2);
3017
+ current = false;
3018
+ },
3019
+ d(detaching) {
3020
+ if (detaching) internal.detach(div);
3021
+ internal.destroy_component(roommaterial);
3022
+ if (if_block0) if_block0.d();
3023
+ internal.destroy_component(baseimage);
3024
+ if (if_block1) if_block1.d();
3025
+ if (if_block2) if_block2.d();
3026
+ }
3027
+ };
3028
+ }
3029
+
3030
+ function instance$1($$self, $$props, $$invalidate) {
3031
+ let { isCurrent } = $$props;
3032
+ let { floorIndex } = $$props;
3033
+ let { hoverEnable } = $$props;
3034
+ let { roomLabelsEnable } = $$props;
3035
+ let { ruleLabelsEnable } = $$props;
3036
+ let { floorplanData } = $$props;
3037
+ let { getLabelElement } = $$props;
3038
+ let { adaptiveRoomLabelVisibleEnable } = $$props;
3039
+ const hoveredRoom = store.writable(undefined);
3040
+
3041
+ $$self.$$set = $$props => {
3042
+ if ('isCurrent' in $$props) $$invalidate(0, isCurrent = $$props.isCurrent);
3043
+ if ('floorIndex' in $$props) $$invalidate(1, floorIndex = $$props.floorIndex);
3044
+ if ('hoverEnable' in $$props) $$invalidate(2, hoverEnable = $$props.hoverEnable);
3045
+ if ('roomLabelsEnable' in $$props) $$invalidate(3, roomLabelsEnable = $$props.roomLabelsEnable);
3046
+ if ('ruleLabelsEnable' in $$props) $$invalidate(4, ruleLabelsEnable = $$props.ruleLabelsEnable);
3047
+ if ('floorplanData' in $$props) $$invalidate(5, floorplanData = $$props.floorplanData);
3048
+ if ('getLabelElement' in $$props) $$invalidate(6, getLabelElement = $$props.getLabelElement);
3049
+ if ('adaptiveRoomLabelVisibleEnable' in $$props) $$invalidate(7, adaptiveRoomLabelVisibleEnable = $$props.adaptiveRoomLabelVisibleEnable);
3050
+ };
3051
+
3052
+ return [
3053
+ isCurrent,
3054
+ floorIndex,
3055
+ hoverEnable,
3056
+ roomLabelsEnable,
3057
+ ruleLabelsEnable,
3058
+ floorplanData,
3059
+ getLabelElement,
3060
+ adaptiveRoomLabelVisibleEnable,
3061
+ hoveredRoom
3062
+ ];
3063
+ }
3064
+
3065
+ class CurrentFloor extends internal.SvelteComponent {
3066
+ constructor(options) {
3067
+ super();
3068
+
3069
+ internal.init(
3070
+ this,
3071
+ options,
3072
+ instance$1,
3073
+ create_fragment$1,
3074
+ internal.safe_not_equal,
3075
+ {
3076
+ isCurrent: 0,
3077
+ floorIndex: 1,
3078
+ hoverEnable: 2,
3079
+ roomLabelsEnable: 3,
3080
+ ruleLabelsEnable: 4,
3081
+ floorplanData: 5,
3082
+ getLabelElement: 6,
3083
+ adaptiveRoomLabelVisibleEnable: 7
3084
+ },
3085
+ add_css$1
3086
+ );
3087
+ }
3088
+ }
3089
+
3090
+ /* src/floorplan/Components/Main.svelte generated by Svelte v3.47.0 */
3091
+
3092
+ function add_css(target) {
3093
+ internal.append_styles(target, "svelte-86bqav", ".floorplan-main.svelte-86bqav{width:100%;height:100%;pointer-events:none}");
3094
+ }
3095
+
3096
+ function get_each_context(ctx, list, i) {
3097
+ const child_ctx = ctx.slice();
3098
+ child_ctx[14] = list[i];
3099
+ return child_ctx;
3100
+ }
3101
+
3102
+ // (22:0) {#if visible}
3103
+ function create_if_block(ctx) {
3104
+ let div;
3105
+ let t0;
3106
+ let camera;
3107
+ let t1;
3108
+ let div_intro;
3109
+ let current;
3110
+ let each_value = /*floorplanData*/ ctx[9].floorDatas;
3111
+ let each_blocks = [];
3112
+
3113
+ for (let i = 0; i < each_value.length; i += 1) {
3114
+ each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i));
3115
+ }
3116
+
3117
+ const out = i => internal.transition_out(each_blocks[i], 1, 1, () => {
3118
+ each_blocks[i] = null;
3119
+ });
3120
+
3121
+ const camera_spread_levels = [
3122
+ {
3123
+ panoIndex: /*panoIndex*/ ctx[3],
3124
+ floorplanData: /*floorplanData*/ ctx[9],
3125
+ lastPanoramaLongitude: /*lastPanoramaLongitude*/ ctx[10],
3126
+ cameraImageUrl: /*cameraImageUrl*/ ctx[11]
3127
+ }
3128
+ ];
3129
+
3130
+ let camera_props = {};
3131
+
3132
+ for (let i = 0; i < camera_spread_levels.length; i += 1) {
3133
+ camera_props = internal.assign(camera_props, camera_spread_levels[i]);
3134
+ }
3135
+
3136
+ camera = new Camera({ props: camera_props });
3137
+ let if_block = /*compassEnable*/ ctx[6] && create_if_block_1(ctx);
3138
+
3139
+ return {
3140
+ c() {
3141
+ div = internal.element("div");
3142
+
3143
+ for (let i = 0; i < each_blocks.length; i += 1) {
3144
+ each_blocks[i].c();
3145
+ }
3146
+
3147
+ t0 = internal.space();
3148
+ internal.create_component(camera.$$.fragment);
3149
+ t1 = internal.space();
3150
+ if (if_block) if_block.c();
3151
+ internal.attr(div, "class", "floorplan-main svelte-86bqav");
3152
+ },
3153
+ m(target, anchor) {
3154
+ internal.insert(target, div, anchor);
3155
+
3156
+ for (let i = 0; i < each_blocks.length; i += 1) {
3157
+ each_blocks[i].m(div, null);
3158
+ }
3159
+
3160
+ internal.append(div, t0);
3161
+ internal.mount_component(camera, div, null);
3162
+ internal.append(div, t1);
3163
+ if (if_block) if_block.m(div, null);
3164
+ current = true;
3165
+ },
3166
+ p(new_ctx, dirty) {
3167
+ ctx = new_ctx;
3168
+
3169
+ if (dirty & /*hoverEnable, floorplanData, getLabelElement, roomLabelsEnable, ruleLabelsEnable, adaptiveRoomLabelVisibleEnable, floorIndex*/ 13232) {
3170
+ each_value = /*floorplanData*/ ctx[9].floorDatas;
3171
+ let i;
3172
+
3173
+ for (i = 0; i < each_value.length; i += 1) {
3174
+ const child_ctx = get_each_context(ctx, each_value, i);
3175
+
3176
+ if (each_blocks[i]) {
3177
+ each_blocks[i].p(child_ctx, dirty);
3178
+ internal.transition_in(each_blocks[i], 1);
3179
+ } else {
3180
+ each_blocks[i] = create_each_block(child_ctx);
3181
+ each_blocks[i].c();
3182
+ internal.transition_in(each_blocks[i], 1);
3183
+ each_blocks[i].m(div, t0);
3184
+ }
3185
+ }
3186
+
3187
+ internal.group_outros();
3188
+
3189
+ for (i = each_value.length; i < each_blocks.length; i += 1) {
3190
+ out(i);
3191
+ }
3192
+
3193
+ internal.check_outros();
3194
+ }
3195
+
3196
+ const camera_changes = (dirty & /*panoIndex, floorplanData, lastPanoramaLongitude, cameraImageUrl*/ 3592)
3197
+ ? internal.get_spread_update(camera_spread_levels, [
3198
+ {
3199
+ panoIndex: /*panoIndex*/ ctx[3],
3200
+ floorplanData: /*floorplanData*/ ctx[9],
3201
+ lastPanoramaLongitude: /*lastPanoramaLongitude*/ ctx[10],
3202
+ cameraImageUrl: /*cameraImageUrl*/ ctx[11]
3203
+ }
3204
+ ])
3205
+ : {};
3206
+
3207
+ camera.$set(camera_changes);
3208
+
3209
+ if (/*compassEnable*/ ctx[6]) {
3210
+ if (if_block) {
3211
+ if_block.p(ctx, dirty);
3212
+
3213
+ if (dirty & /*compassEnable*/ 64) {
3214
+ internal.transition_in(if_block, 1);
3215
+ }
3216
+ } else {
3217
+ if_block = create_if_block_1(ctx);
3218
+ if_block.c();
3219
+ internal.transition_in(if_block, 1);
3220
+ if_block.m(div, null);
3221
+ }
3222
+ } else if (if_block) {
3223
+ internal.group_outros();
3224
+
3225
+ internal.transition_out(if_block, 1, 1, () => {
3226
+ if_block = null;
3227
+ });
3228
+
3229
+ internal.check_outros();
3230
+ }
3231
+ },
3232
+ i(local) {
3233
+ if (current) return;
3234
+
3235
+ for (let i = 0; i < each_value.length; i += 1) {
3236
+ internal.transition_in(each_blocks[i]);
3237
+ }
3238
+
3239
+ internal.transition_in(camera.$$.fragment, local);
3240
+ internal.transition_in(if_block);
3241
+
3242
+ if (!div_intro) {
3243
+ internal.add_render_callback(() => {
3244
+ div_intro = internal.create_in_transition(div, transition.fade, {
3245
+ duration: /*duration*/ ctx[0],
3246
+ easing: easing.linear
3247
+ });
3248
+
3249
+ div_intro.start();
3250
+ });
3251
+ }
3252
+
3253
+ current = true;
3254
+ },
3255
+ o(local) {
3256
+ each_blocks = each_blocks.filter(Boolean);
3257
+
3258
+ for (let i = 0; i < each_blocks.length; i += 1) {
3259
+ internal.transition_out(each_blocks[i]);
3260
+ }
3261
+
3262
+ internal.transition_out(camera.$$.fragment, local);
3263
+ internal.transition_out(if_block);
3264
+ current = false;
3265
+ },
3266
+ d(detaching) {
3267
+ if (detaching) internal.detach(div);
3268
+ internal.destroy_each(each_blocks, detaching);
3269
+ internal.destroy_component(camera);
3270
+ if (if_block) if_block.d();
3271
+ }
3272
+ };
3273
+ }
3274
+
3275
+ // (24:4) {#each floorplanData.floorDatas as floorData}
3276
+ function create_each_block(ctx) {
3277
+ let currentfloor;
3278
+ let current;
3279
+
3280
+ const currentfloor_spread_levels = [
3281
+ {
3282
+ hoverEnable: /*hoverEnable*/ ctx[5],
3283
+ floorplanData: /*floorplanData*/ ctx[9],
3284
+ getLabelElement: /*getLabelElement*/ ctx[12],
3285
+ roomLabelsEnable: /*roomLabelsEnable*/ ctx[7],
3286
+ ruleLabelsEnable: /*ruleLabelsEnable*/ ctx[8],
3287
+ adaptiveRoomLabelVisibleEnable: /*adaptiveRoomLabelVisibleEnable*/ ctx[13]
3288
+ },
3289
+ {
3290
+ floorIndex: /*floorData*/ ctx[14].floorIndex
3291
+ },
3292
+ {
3293
+ isCurrent: /*floorData*/ ctx[14].floorIndex === /*floorIndex*/ ctx[4]
3294
+ }
3295
+ ];
3296
+
3297
+ let currentfloor_props = {};
3298
+
3299
+ for (let i = 0; i < currentfloor_spread_levels.length; i += 1) {
3300
+ currentfloor_props = internal.assign(currentfloor_props, currentfloor_spread_levels[i]);
3301
+ }
3302
+
3303
+ currentfloor = new CurrentFloor({ props: currentfloor_props });
3304
+
3305
+ return {
3306
+ c() {
3307
+ internal.create_component(currentfloor.$$.fragment);
3308
+ },
3309
+ m(target, anchor) {
3310
+ internal.mount_component(currentfloor, target, anchor);
3311
+ current = true;
3312
+ },
3313
+ p(ctx, dirty) {
3314
+ const currentfloor_changes = (dirty & /*hoverEnable, floorplanData, getLabelElement, roomLabelsEnable, ruleLabelsEnable, adaptiveRoomLabelVisibleEnable, floorIndex*/ 13232)
3315
+ ? internal.get_spread_update(currentfloor_spread_levels, [
3316
+ dirty & /*hoverEnable, floorplanData, getLabelElement, roomLabelsEnable, ruleLabelsEnable, adaptiveRoomLabelVisibleEnable*/ 13216 && {
3317
+ hoverEnable: /*hoverEnable*/ ctx[5],
3318
+ floorplanData: /*floorplanData*/ ctx[9],
3319
+ getLabelElement: /*getLabelElement*/ ctx[12],
3320
+ roomLabelsEnable: /*roomLabelsEnable*/ ctx[7],
3321
+ ruleLabelsEnable: /*ruleLabelsEnable*/ ctx[8],
3322
+ adaptiveRoomLabelVisibleEnable: /*adaptiveRoomLabelVisibleEnable*/ ctx[13]
3323
+ },
3324
+ dirty & /*floorplanData*/ 512 && {
3325
+ floorIndex: /*floorData*/ ctx[14].floorIndex
3326
+ },
3327
+ dirty & /*floorplanData, floorIndex*/ 528 && {
3328
+ isCurrent: /*floorData*/ ctx[14].floorIndex === /*floorIndex*/ ctx[4]
3329
+ }
3330
+ ])
3331
+ : {};
3332
+
3333
+ currentfloor.$set(currentfloor_changes);
3334
+ },
3335
+ i(local) {
3336
+ if (current) return;
3337
+ internal.transition_in(currentfloor.$$.fragment, local);
3338
+ current = true;
3339
+ },
3340
+ o(local) {
3341
+ internal.transition_out(currentfloor.$$.fragment, local);
3342
+ current = false;
3343
+ },
3344
+ d(detaching) {
3345
+ internal.destroy_component(currentfloor, detaching);
3346
+ }
3347
+ };
3348
+ }
3349
+
3350
+ // (39:4) {#if compassEnable}
3351
+ function create_if_block_1(ctx) {
3352
+ let compass;
3353
+ let current;
3354
+
3355
+ compass = new Compass({
3356
+ props: {
3357
+ floorplanData: /*floorplanData*/ ctx[9],
3358
+ northDesc: /*northDesc*/ ctx[2]
3359
+ }
3360
+ });
3361
+
3362
+ return {
3363
+ c() {
3364
+ internal.create_component(compass.$$.fragment);
3365
+ },
3366
+ m(target, anchor) {
3367
+ internal.mount_component(compass, target, anchor);
3368
+ current = true;
3369
+ },
3370
+ p(ctx, dirty) {
3371
+ const compass_changes = {};
3372
+ if (dirty & /*floorplanData*/ 512) compass_changes.floorplanData = /*floorplanData*/ ctx[9];
3373
+ if (dirty & /*northDesc*/ 4) compass_changes.northDesc = /*northDesc*/ ctx[2];
3374
+ compass.$set(compass_changes);
3375
+ },
3376
+ i(local) {
3377
+ if (current) return;
3378
+ internal.transition_in(compass.$$.fragment, local);
3379
+ current = true;
3380
+ },
3381
+ o(local) {
3382
+ internal.transition_out(compass.$$.fragment, local);
3383
+ current = false;
3384
+ },
3385
+ d(detaching) {
3386
+ internal.destroy_component(compass, detaching);
3387
+ }
3388
+ };
3389
+ }
3390
+
3391
+ function create_fragment(ctx) {
3392
+ let if_block_anchor;
3393
+ let current;
3394
+ let if_block = /*visible*/ ctx[1] && create_if_block(ctx);
3395
+
3396
+ return {
3397
+ c() {
3398
+ if (if_block) if_block.c();
3399
+ if_block_anchor = internal.empty();
3400
+ },
3401
+ m(target, anchor) {
3402
+ if (if_block) if_block.m(target, anchor);
3403
+ internal.insert(target, if_block_anchor, anchor);
3404
+ current = true;
3405
+ },
3406
+ p(ctx, [dirty]) {
3407
+ if (/*visible*/ ctx[1]) {
3408
+ if (if_block) {
3409
+ if_block.p(ctx, dirty);
3410
+
3411
+ if (dirty & /*visible*/ 2) {
3412
+ internal.transition_in(if_block, 1);
3413
+ }
3414
+ } else {
3415
+ if_block = create_if_block(ctx);
3416
+ if_block.c();
3417
+ internal.transition_in(if_block, 1);
3418
+ if_block.m(if_block_anchor.parentNode, if_block_anchor);
3419
+ }
3420
+ } else if (if_block) {
3421
+ internal.group_outros();
3422
+
3423
+ internal.transition_out(if_block, 1, 1, () => {
3424
+ if_block = null;
3425
+ });
3426
+
3427
+ internal.check_outros();
3428
+ }
3429
+ },
3430
+ i(local) {
3431
+ if (current) return;
3432
+ internal.transition_in(if_block);
3433
+ current = true;
3434
+ },
3435
+ o(local) {
3436
+ internal.transition_out(if_block);
3437
+ current = false;
3438
+ },
3439
+ d(detaching) {
3440
+ if (if_block) if_block.d(detaching);
3441
+ if (detaching) internal.detach(if_block_anchor);
3442
+ }
3443
+ };
3444
+ }
3445
+
3446
+ function instance($$self, $$props, $$invalidate) {
3447
+ let { duration = 0 } = $$props;
3448
+ let { visible } = $$props;
3449
+ let { northDesc } = $$props;
3450
+ let { panoIndex } = $$props;
3451
+ let { floorIndex } = $$props;
3452
+ let { hoverEnable } = $$props;
3453
+ let { compassEnable } = $$props;
3454
+ let { roomLabelsEnable } = $$props;
3455
+ let { ruleLabelsEnable } = $$props;
3456
+ let { floorplanData } = $$props;
3457
+ let { lastPanoramaLongitude } = $$props;
3458
+ let { cameraImageUrl } = $$props;
3459
+ let { getLabelElement } = $$props;
3460
+ let { adaptiveRoomLabelVisibleEnable } = $$props;
3461
+
3462
+ $$self.$$set = $$props => {
3463
+ if ('duration' in $$props) $$invalidate(0, duration = $$props.duration);
3464
+ if ('visible' in $$props) $$invalidate(1, visible = $$props.visible);
3465
+ if ('northDesc' in $$props) $$invalidate(2, northDesc = $$props.northDesc);
3466
+ if ('panoIndex' in $$props) $$invalidate(3, panoIndex = $$props.panoIndex);
3467
+ if ('floorIndex' in $$props) $$invalidate(4, floorIndex = $$props.floorIndex);
3468
+ if ('hoverEnable' in $$props) $$invalidate(5, hoverEnable = $$props.hoverEnable);
3469
+ if ('compassEnable' in $$props) $$invalidate(6, compassEnable = $$props.compassEnable);
3470
+ if ('roomLabelsEnable' in $$props) $$invalidate(7, roomLabelsEnable = $$props.roomLabelsEnable);
3471
+ if ('ruleLabelsEnable' in $$props) $$invalidate(8, ruleLabelsEnable = $$props.ruleLabelsEnable);
3472
+ if ('floorplanData' in $$props) $$invalidate(9, floorplanData = $$props.floorplanData);
3473
+ if ('lastPanoramaLongitude' in $$props) $$invalidate(10, lastPanoramaLongitude = $$props.lastPanoramaLongitude);
3474
+ if ('cameraImageUrl' in $$props) $$invalidate(11, cameraImageUrl = $$props.cameraImageUrl);
3475
+ if ('getLabelElement' in $$props) $$invalidate(12, getLabelElement = $$props.getLabelElement);
3476
+ if ('adaptiveRoomLabelVisibleEnable' in $$props) $$invalidate(13, adaptiveRoomLabelVisibleEnable = $$props.adaptiveRoomLabelVisibleEnable);
3477
+ };
3478
+
3479
+ return [
3480
+ duration,
3481
+ visible,
3482
+ northDesc,
3483
+ panoIndex,
3484
+ floorIndex,
3485
+ hoverEnable,
3486
+ compassEnable,
3487
+ roomLabelsEnable,
3488
+ ruleLabelsEnable,
3489
+ floorplanData,
3490
+ lastPanoramaLongitude,
3491
+ cameraImageUrl,
3492
+ getLabelElement,
3493
+ adaptiveRoomLabelVisibleEnable
3494
+ ];
3495
+ }
3496
+
3497
+ class Main extends internal.SvelteComponent {
3498
+ constructor(options) {
3499
+ super();
3500
+
3501
+ internal.init(
3502
+ this,
3503
+ options,
3504
+ instance,
3505
+ create_fragment,
3506
+ internal.safe_not_equal,
3507
+ {
3508
+ duration: 0,
3509
+ visible: 1,
3510
+ northDesc: 2,
3511
+ panoIndex: 3,
3512
+ floorIndex: 4,
3513
+ hoverEnable: 5,
3514
+ compassEnable: 6,
3515
+ roomLabelsEnable: 7,
3516
+ ruleLabelsEnable: 8,
3517
+ floorplanData: 9,
3518
+ lastPanoramaLongitude: 10,
3519
+ cameraImageUrl: 11,
3520
+ getLabelElement: 12,
3521
+ adaptiveRoomLabelVisibleEnable: 13
3522
+ },
3523
+ add_css
3524
+ );
3525
+ }
3526
+ }
3527
+
3528
+ async function formatOutlines(outlines) {
3529
+ const headers = new Headers({ 'Content-Type': 'text/plain' });
3530
+ const getOutlineItem = async function (item) {
3531
+ const outlineItem = {
3532
+ index: item.index,
3533
+ url: item.url,
3534
+ svgUrl: item.svg_url,
3535
+ };
3536
+ if (item.svg_url) {
3537
+ const svgContent = await fetch(item.svg_url, { headers }).then((res) => res.text());
3538
+ outlineItem.svgContent = svgContent;
3539
+ }
3540
+ return outlineItem;
3541
+ };
3542
+ const svgOutlineItems = await Promise.all(outlines.map(getOutlineItem));
3543
+ return svgOutlineItems;
3544
+ }
3545
+ function formatRoom(data) {
3546
+ const floorplanRoomItem = {
3547
+ id: data.id,
3548
+ size: data.size,
3549
+ name: data.name,
3550
+ path: data.path,
3551
+ roomType: data.room_type,
3552
+ floorType: data.floor_type,
3553
+ roomLabel: {
3554
+ position: data.room_label.position,
3555
+ positionInImage: data.room_label.position_in_image,
3556
+ },
3557
+ observerIndexs: data.observer_indexs,
3558
+ };
3559
+ return floorplanRoomItem;
3560
+ }
3561
+ function formatFloorData(_data) {
3562
+ return {
3563
+ floorName: _data.floor_name,
3564
+ floorIndex: _data.floor_index,
3565
+ rooms: _data.rooms.map(formatRoom),
3566
+ rules: _data.rules,
3567
+ };
3568
+ }
3569
+ function formateFloorplanObserver(data) {
3570
+ const floorplanObserver = {
3571
+ index: data.index,
3572
+ floorIndex: data.floor_index,
3573
+ position: data.position,
3574
+ positionInImage: data.position_in_image,
3575
+ };
3576
+ return floorplanObserver;
3577
+ }
3578
+ function formatFloorplanEntrance(data) {
3579
+ const floorplanEntrance = {
3580
+ rad: data.rad,
3581
+ position: data.position,
3582
+ positionInImage: data.position_in_image,
3583
+ northRad: data.north_rad,
3584
+ roomId: data.room_id,
3585
+ floorIndex: data.floor_index,
3586
+ };
3587
+ return floorplanEntrance;
3588
+ }
3589
+ async function formatData(data) {
3590
+ const outlines = await formatOutlines(data.outlines);
3591
+ const bounding = data.computed_data.bounding;
3592
+ const floorDatas = data.computed_data.floor_datas.map(formatFloorData);
3593
+ const entrance = data.computed_data.entrance ? formatFloorplanEntrance(data.computed_data.entrance) : null;
3594
+ const floorplanData = {
3595
+ outlines,
3596
+ entrance,
3597
+ bounding,
3598
+ floorDatas,
3599
+ observers: data.computed_data.observers.map(formateFloorplanObserver),
3600
+ };
3601
+ return floorplanData;
3602
+ }
3603
+
3604
+ /**
3605
+ * 把第一个参数传入第二个参数(函数)中并执行
3606
+ * 一般用于执行函数后返回变量。
3607
+ * @param {any} something
3608
+ * @param {function} callback
3609
+ * @return {any}
3610
+ */
3611
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
3612
+ function tap(something, callback) {
3613
+ callback(something);
3614
+ return something;
3615
+ }
3616
+
3617
+ /**
3618
+ * 过滤掉不需要的对象字段函数:实现从一个对象中排除某些指定属性后生成的新对象。
3619
+ * @param object
3620
+ * @param props 排除的属性
3621
+ * @return
3622
+ */
3623
+ function omit(object, props) {
3624
+ return tap({}, (result) => {
3625
+ for (const name in object) {
3626
+ if (props.indexOf(name) !== -1)
3627
+ continue;
3628
+ result[name] = object[name];
3629
+ }
3630
+ });
3631
+ }
3632
+
3633
+ var FLOOR_PLAN_ATTACHED_TO;
3634
+ (function (FLOOR_PLAN_ATTACHED_TO) {
3635
+ FLOOR_PLAN_ATTACHED_TO[FLOOR_PLAN_ATTACHED_TO["FLOOR"] = 1] = "FLOOR";
3636
+ FLOOR_PLAN_ATTACHED_TO[FLOOR_PLAN_ATTACHED_TO["CEILING"] = 2] = "CEILING";
3637
+ FLOOR_PLAN_ATTACHED_TO[FLOOR_PLAN_ATTACHED_TO["BOUNDING_CENTER"] = 3] = "BOUNDING_CENTER";
3638
+ })(FLOOR_PLAN_ATTACHED_TO || (FLOOR_PLAN_ATTACHED_TO = {}));
3639
+
3640
+ /** 获取当前楼层地面的 Y 值 */
3641
+ function getFloorY(five, floorIndex) {
3642
+ const maxFloorIndex = Math.max(...five.work.observers.map((ob) => ob.floorIndex));
3643
+ return floorIndex > maxFloorIndex
3644
+ ? five.model.bounding.max.y
3645
+ : Math.max(...five.work.observers
3646
+ .filter((ob) => ob.floorIndex === floorIndex)
3647
+ .map((ob) => ob.standingPosition.y));
3648
+ }
3649
+ /** 获取当前吸附类型的 Y 值
3650
+ * * FLOOR_PLAN_ATTACHED_TO.FLOOR:当前楼层地板的 Y
3651
+ * * FLOOR_PLAN_ATTACHED_TO.BOUNDING_CENTER:当前模型中心的 Y
3652
+ * * FLOOR_PLAN_ATTACHED_TO.BOUNDING_CENTER:当前楼层天花板的 Y
3653
+ */
3654
+ function getAttachedY(five, floorIndex, attachedTo = FLOOR_PLAN_ATTACHED_TO.BOUNDING_CENTER) {
3655
+ const currentFloorY = getFloorY(five, floorIndex);
3656
+ const nextFloorY = getFloorY(five, floorIndex + 1);
3657
+ if (attachedTo === FLOOR_PLAN_ATTACHED_TO.BOUNDING_CENTER)
3658
+ return (five.model.bounding.max.y + five.model.bounding.min.y) / 2;
3659
+ else if (attachedTo === FLOOR_PLAN_ATTACHED_TO.CEILING)
3660
+ return nextFloorY;
3661
+ else
3662
+ return currentFloorY;
3663
+ }
3664
+ /**
3665
+ * 获取「在俯视图」状态下,模型 mm 与屏幕像素 px 的对应关系,即每 mm 对应多少 px
3666
+ * @param five five
3667
+ */
3668
+ function getPxmm(five, container, floorIndex, options) {
3669
+ const y = getAttachedY(five, floorIndex, options === null || options === void 0 ? void 0 : options.attachedTo);
3670
+ const originPosition = new THREE__namespace.Vector3(0, y, 0);
3671
+ const originPositionXUnit = new THREE__namespace.Vector3(1, y, 0);
3672
+ const mouse = originPosition.clone().project(five.camera);
3673
+ const xUnitMouse = originPositionXUnit.clone().project(five.camera);
3674
+ const pxmm = Math.abs((xUnitMouse.x - mouse.x) / 1000) * (container.getBoundingClientRect().width / 2);
3675
+ return pxmm;
3676
+ }
3677
+
3678
+ /**
3679
+ * plugin 的基本控制器
3680
+ */
3681
+ class Controller$2 {
3682
+ constructor(five$1) {
3683
+ Object.defineProperty(this, "five", {
3684
+ enumerable: true,
3685
+ configurable: true,
3686
+ writable: true,
3687
+ value: void 0
3688
+ });
3689
+ /**
3690
+ * 插件事件钩子
3691
+ */
3692
+ Object.defineProperty(this, "hooks", {
3693
+ enumerable: true,
3694
+ configurable: true,
3695
+ writable: true,
3696
+ value: new five.Subscribe()
3697
+ });
3698
+ this.five = five$1;
3699
+ }
3700
+ /**
3701
+ * 获取当前的插件状态,如果当初插件内存在需要通过动画变更的 state 值,则通过此方法可以得到中间状态
3702
+ */
3703
+ getCurrentState() {
3704
+ return this.state;
3705
+ }
3706
+ }
3707
+
3708
+ class Controller$1 extends Controller$2 {
3709
+ }
3710
+
3711
+ var FloorplanErrorType;
3712
+ (function (FloorplanErrorType) {
3713
+ /** 意料之外的错误 */
3714
+ FloorplanErrorType["UnknownError"] = "UnknownError";
3715
+ /** 数据未加载 */
3716
+ FloorplanErrorType["DataNotLoaded"] = "DataNotLoaded";
3717
+ /** 展示过程被隐藏打断 */
3718
+ FloorplanErrorType["BreakOffByHide"] = "BreakOffByHide";
3719
+ /** 展示过程中插件被禁用 */
3720
+ FloorplanErrorType["BreakOffByDisable"] = "BreakOffByDisable";
3721
+ /** 模型未加载完成 */
3722
+ FloorplanErrorType["ModelNotLoaded"] = "ModelNotLoaded";
3723
+ /** Five changeMode 行为不符合预期 */
3724
+ FloorplanErrorType["ChangeModeError"] = "ChangeModeError";
3725
+ /** Five updateCamera 行为不符合预期 */
3726
+ FloorplanErrorType["UpdateCameraError"] = "UpdateCameraError";
3727
+ })(FloorplanErrorType || (FloorplanErrorType = {}));
3728
+ /** 户型图展示 & 模型消失的默认时间 */
3729
+ const SHOW_ANIME_DURATION = 500;
3730
+ /** Five camera 默认 fov */
3731
+ const FIVE_CAMERA_DEFAULT_FOV = 80;
3732
+
3733
+ /**
3734
+ * 比较两个数字近似相等
3735
+ * @param num1 数字1
3736
+ * @param num2 数字2
3737
+ * @param accuracy 精度:精确到小数点后几位,默认精确到 小数点后四位
3738
+ */
3739
+ function nearlyEqual(num1, num2, accuracy = 4) {
3740
+ return Math.floor(num1 * Math.pow(10, accuracy)) === Math.floor(num2 * Math.pow(10, accuracy));
3741
+ }
3742
+
3743
+ /** 等待 five changeMode 结束
3744
+ * @description Promise 的状态只代表 mode 与预期是否一致,不保证参数的一致性
3745
+ */
3746
+ async function changeMode(five, changeModeParams) {
3747
+ await new Promise((resolve, reject) => {
3748
+ // 虽然 changeMode 是异步函数,但不代表异步流程结束代表切换 Mode 动画结束
3749
+ five.changeMode(...changeModeParams).catch((error) => reject(error));
3750
+ five.once('initAnimationEnded', () => {
3751
+ const fiveCurrentState = five.getCurrentState();
3752
+ const correctMode = changeModeParams[0];
3753
+ if (fiveCurrentState.mode !== correctMode)
3754
+ reject(new Error('mode 与预期不符'));
3755
+ /** 检测当前的 current pose 和传入的 pose 是否一致 */
3756
+ const checkPose = () => {
3757
+ const correctPose = changeModeParams[1];
3758
+ if (!correctPose)
3759
+ return true;
3760
+ return Object.keys(correctPose).every((key) => {
3761
+ const fivePoseItem = fiveCurrentState[key];
3762
+ if (fivePoseItem === undefined)
3763
+ return true;
3764
+ const correctPoseItem = correctPose[key];
3765
+ if (typeof fivePoseItem === 'number' && typeof correctPoseItem === 'number') {
3766
+ return nearlyEqual(fivePoseItem, correctPoseItem, 2);
3767
+ }
3768
+ return fivePoseItem === correctPoseItem;
3769
+ });
3770
+ };
3771
+ const checkPoseResult = checkPose();
3772
+ if (!checkPoseResult)
3773
+ reject(new Error('five pose 与预期不符'));
3774
+ resolve();
3775
+ });
3776
+ });
3777
+ }
3778
+
3779
+ /** 判断当前状态是否可以展示户型图 */
3780
+ function checkShowState(five, showState) {
3781
+ if (five.currentMode !== showState.mode)
3782
+ return false;
3783
+ const { latitude, longitude, fov } = showState;
3784
+ const { latitude: _latitude, longitude: _longitude } = five.getCurrentState();
3785
+ const _fov = five.camera.fov;
3786
+ if (!nearlyEqual(latitude, _latitude, 2))
3787
+ return false;
3788
+ if (!nearlyEqual(longitude, _longitude, 2))
3789
+ return false;
3790
+ if (fov !== _fov)
3791
+ return false;
3792
+ return true;
3793
+ }
3794
+ /** 更改 Five 状态到展示户型图的状态
3795
+ * 1. 判断状态不符合时,会纠正到正确的状态
3796
+ * 2. 内置了相应的动画时间计算
3797
+ * 3. 纠正成功会返回 true,失败「可能会被用户行为中断」会返回 false
3798
+ */
3799
+ async function correctFiveState(five, showState, userAction = true) {
3800
+ // 当前已满足状态,不需要变更
3801
+ const result = checkShowState(five, showState);
3802
+ if (result === true)
3803
+ return;
3804
+ const currentFiveState = five.getCurrentState();
3805
+ // 纠正 mode
3806
+ if (currentFiveState.mode !== showState.mode) {
3807
+ const [changeModeError] = await to(changeMode(five, [showState.mode, showState, undefined, userAction]));
3808
+ if (changeModeError)
3809
+ throw new Error(FloorplanErrorType.ChangeModeError);
3810
+ return;
3811
+ }
3812
+ // 纠正相机状态
3813
+ // 根据 latitude、longitude、fov 计算动画时间,最多 1s
3814
+ const { latitude, longitude, fov } = currentFiveState;
3815
+ const time = Math.min(1000, Math.max(200, Math.abs(latitude - Math.PI / 2) * 1000, (longitude > Math.PI ? 2 * Math.PI - longitude : longitude) * 500, Math.abs(fov - showState.fov) * 10));
3816
+ const [updateCameraError] = await to(five.updateCamera(showState, time, userAction));
3817
+ if (updateCameraError)
3818
+ throw new Error(FloorplanErrorType.UpdateCameraError);
3819
+ return;
3820
+ }
3821
+
3822
+ function changeModelCanvasOpacity(five, opacity, duration = 300) {
3823
+ const fiveEle = five.getElement();
3824
+ if (!fiveEle)
3825
+ return;
3826
+ fiveEle.style.opacity = opacity + '';
3827
+ fiveEle.style.transition = duration === 0 ? 'none' : `opacity ${duration}ms linear`;
3828
+ if (duration === 0)
3829
+ return;
3830
+ Promise.race([
3831
+ new Promise((res) => fiveEle.addEventListener('transitionend', res, { once: true })),
3832
+ new Promise((res) => setTimeout(res, duration)),
3833
+ ]).then(() => {
3834
+ fiveEle.style.transition = 'none';
3835
+ });
3836
+ }
3837
+
3838
+ /** 当前 five 的相机视角是否满足户型图自动隐藏条件
3839
+ *
3840
+ * @description 水平旋转角大于正负 5 度 || 俯仰角度大于 5 度
3841
+ *
3842
+ */
3843
+ function shouldFloorplanHideWithPose(pose) {
3844
+ const { latitude, longitude } = pose;
3845
+ const latitudeHide = Math.abs(latitude - Math.PI / 2) > (5 * Math.PI) / 180;
3846
+ const longitudeHide = longitude > 5 * (Math.PI / 180) && longitude < 355 * (Math.PI / 180);
3847
+ return latitudeHide || longitudeHide;
3848
+ }
3849
+ /** 当前 five 的相机视角是否满足户型图自动展示隐藏条件
3850
+ *
3851
+ * @description 水平旋转角正负 30 度 && 俯仰角度小于 10 度
3852
+ *
3853
+ */
3854
+ function shouldFloorplanShowWithPose(pose) {
3855
+ const { latitude, longitude } = pose;
3856
+ const latitudeVisible = Math.abs(latitude - Math.PI / 2) < (10 * Math.PI) / 180;
3857
+ const longitudeVisible = longitude < 30 * (Math.PI / 180) || longitude > 330 * (Math.PI / 180);
3858
+ return latitudeVisible && longitudeVisible;
3859
+ }
3860
+ class Controller extends Controller$1 {
3861
+ constructor(five, params) {
3862
+ var _a;
3863
+ super(five);
3864
+ // =============== public properties =================
3865
+ Object.defineProperty(this, "name", {
3866
+ enumerable: true,
3867
+ configurable: true,
3868
+ writable: true,
3869
+ value: 'modelFloorplanPlugin'
3870
+ });
3871
+ Object.defineProperty(this, "state", {
3872
+ enumerable: true,
3873
+ configurable: true,
3874
+ writable: true,
3875
+ value: void 0
3876
+ });
3877
+ // =============== private properties =================
3878
+ Object.defineProperty(this, "data", {
3879
+ enumerable: true,
3880
+ configurable: true,
3881
+ writable: true,
3882
+ value: void 0
3883
+ });
3884
+ /** 展示户型图时,需要正确的状态 */
3885
+ Object.defineProperty(this, "showState", {
3886
+ enumerable: true,
3887
+ configurable: true,
3888
+ writable: true,
3889
+ value: void 0
3890
+ });
3891
+ /** show 动画的公共 Promise */
3892
+ Object.defineProperty(this, "showPromise", {
3893
+ enumerable: true,
3894
+ configurable: true,
3895
+ writable: true,
3896
+ value: void 0
3897
+ });
3898
+ Object.defineProperty(this, "app", {
3899
+ enumerable: true,
3900
+ configurable: true,
3901
+ writable: true,
3902
+ value: undefined
3903
+ });
3904
+ Object.defineProperty(this, "panoIndex", {
3905
+ enumerable: true,
3906
+ configurable: true,
3907
+ writable: true,
3908
+ value: 0
3909
+ });
3910
+ Object.defineProperty(this, "floorIndex", {
3911
+ enumerable: true,
3912
+ configurable: true,
3913
+ writable: true,
3914
+ value: 0
3915
+ });
3916
+ Object.defineProperty(this, "selector", {
3917
+ enumerable: true,
3918
+ configurable: true,
3919
+ writable: true,
3920
+ value: void 0
3921
+ });
3922
+ /** 公共 Promise 的 reject 方法 */
3923
+ Object.defineProperty(this, "showRejection", {
3924
+ enumerable: true,
3925
+ configurable: true,
3926
+ writable: true,
3927
+ value: void 0
3928
+ });
3929
+ /** 户型图父容器 */
3930
+ Object.defineProperty(this, "wrapper", {
3931
+ enumerable: true,
3932
+ configurable: true,
3933
+ writable: true,
3934
+ value: void 0
3935
+ });
3936
+ /** 户型图主容器 */
3937
+ Object.defineProperty(this, "container", {
3938
+ enumerable: true,
3939
+ configurable: true,
3940
+ writable: true,
3941
+ value: document.createElement('div')
3942
+ });
3943
+ /** 展示户型图图前,Five 的 Panorama Longitude */
3944
+ Object.defineProperty(this, "lastPanoramaLongitude", {
3945
+ enumerable: true,
3946
+ configurable: true,
3947
+ writable: true,
3948
+ value: 0
3949
+ });
3950
+ /** 户型图大小 */
3951
+ Object.defineProperty(this, "size", {
3952
+ enumerable: true,
3953
+ configurable: true,
3954
+ writable: true,
3955
+ value: { width: 0, height: 0 }
3956
+ });
3957
+ /** 是否已经执行过事件监听 */
3958
+ Object.defineProperty(this, "hasAddedEventListener", {
3959
+ enumerable: true,
3960
+ configurable: true,
3961
+ writable: true,
3962
+ value: false
3963
+ });
3964
+ /** 上一次隐藏是否是用户调用了 hide 导致的 */
3965
+ Object.defineProperty(this, "isHiddenByHideFunc", {
3966
+ enumerable: true,
3967
+ configurable: true,
3968
+ writable: true,
3969
+ value: false
3970
+ });
3971
+ /** 销毁插件 */
3972
+ Object.defineProperty(this, "dispose", {
3973
+ enumerable: true,
3974
+ configurable: true,
3975
+ writable: true,
3976
+ value: () => {
3977
+ var _a, _b;
3978
+ this.removeEventListener();
3979
+ (_a = this.app) === null || _a === void 0 ? void 0 : _a.$destroy();
3980
+ this.app = undefined;
3981
+ (_b = this.container) === null || _b === void 0 ? void 0 : _b.remove();
3982
+ this.data = undefined;
3983
+ this.wrapper = undefined;
3984
+ this.selector = undefined;
3985
+ this.hooks.emit('dispose');
3986
+ }
3987
+ });
3988
+ /** 展示户型图
3989
+ * 1. show 函数大部分情况下需要耗时
3990
+ * 2. 如果当前已经在展示中,将不会触发任何事件
3991
+ * 3. 如果展示过程被中断,将抛出错误
3992
+ * 4. 多次调用 show 方法,只会触发一次 showAnimationEnded 事件,但是展示结果会取决于最后一次调用参数
3993
+ * 5. 如果多次调用 show 方法,参数与上次参数不一致时,上次 show Promise 会被 reject
3994
+ * @param opts.floorIndex 楼层
3995
+ * @param opts.modelOpacity 模型透明度
3996
+ * @param opts.immediately 是否立即展示
3997
+ * @param opts.isAutoShow 是否是自动展示
3998
+ * @param opts.userAction 是否是用户行为
3999
+ */
4000
+ Object.defineProperty(this, "show", {
4001
+ enumerable: true,
4002
+ configurable: true,
4003
+ writable: true,
4004
+ value: async (options = {}) => {
4005
+ if (!this.state.enabled)
4006
+ return;
4007
+ // 已经展示完成了,不做任何操作
4008
+ if (!this.showPromise && this.state.visible)
4009
+ return;
4010
+ const userAction = options.userAction !== undefined ? options.userAction : true;
4011
+ this.updateState({ visible: true }, userAction);
4012
+ this._show(options);
4013
+ }
4014
+ });
4015
+ /** 隐藏户型图 */
4016
+ Object.defineProperty(this, "hide", {
4017
+ enumerable: true,
4018
+ configurable: true,
4019
+ writable: true,
4020
+ value: async (options = {}) => {
4021
+ if (!this.state.enabled)
4022
+ return;
4023
+ this.isHiddenByHideFunc = true;
4024
+ if (this.state.visible === false)
4025
+ return;
4026
+ this.updateState({ visible: false }, options.userAction || true);
4027
+ this._hide(options);
4028
+ }
4029
+ });
4030
+ /** 更新户型图大小 */
4031
+ Object.defineProperty(this, "updateSize", {
4032
+ enumerable: true,
4033
+ configurable: true,
4034
+ writable: true,
4035
+ value: () => {
4036
+ if (!this.data)
4037
+ return;
4038
+ if (!checkShowState(this.five, this.showState))
4039
+ return;
4040
+ if (!this.container || !this.wrapper)
4041
+ return;
4042
+ // 计算户型图展示大小
4043
+ const { min, max } = this.data.bounding;
4044
+ const width = max.x - min.x;
4045
+ const height = max.y - min.y;
4046
+ // 每毫米对应的 px 值
4047
+ const options = this.state.config.attachedTo ? { attachedTo: this.state.config.attachedTo } : undefined;
4048
+ const pxmm = getPxmm(this.five, this.wrapper, this.floorIndex, options);
4049
+ const _width = Math.ceil(width * pxmm);
4050
+ const _height = Math.ceil(height * pxmm);
4051
+ if (this.size.width === _width && this.size.height === _height)
4052
+ return;
4053
+ this.container.style.width = _width + 'px';
4054
+ this.container.style.height = _height + 'px';
4055
+ this.size = { width: _width, height: _height };
4056
+ }
4057
+ });
4058
+ Object.defineProperty(this, "_disable", {
4059
+ enumerable: true,
4060
+ configurable: true,
4061
+ writable: true,
4062
+ value: (options) => {
4063
+ var _a, _b, _c;
4064
+ const { userAction } = options;
4065
+ this.hooks.emit('disable', { userAction });
4066
+ // ===== 处理展示过程中 disable =====
4067
+ (_a = this.showRejection) === null || _a === void 0 ? void 0 : _a.call(this, FloorplanErrorType.BreakOffByDisable);
4068
+ this.showPromise = undefined;
4069
+ (_b = this.app) === null || _b === void 0 ? void 0 : _b.$destroy();
4070
+ this.app = undefined;
4071
+ (_c = this.container) === null || _c === void 0 ? void 0 : _c.remove();
4072
+ this.removeEventListener();
4073
+ }
4074
+ });
4075
+ Object.defineProperty(this, "_enable", {
4076
+ enumerable: true,
4077
+ configurable: true,
4078
+ writable: true,
4079
+ value: (options) => {
4080
+ const { userAction } = options;
4081
+ this.addEventListener();
4082
+ if (!this.wrapper)
4083
+ return;
4084
+ this.wrapper.append(this.container);
4085
+ this.hooks.emit('enable', { userAction });
4086
+ if (this.state.visible)
4087
+ this._show({ userAction });
4088
+ }
4089
+ });
4090
+ Object.defineProperty(this, "_show", {
4091
+ enumerable: true,
4092
+ configurable: true,
4093
+ writable: true,
4094
+ value: async (options) => {
4095
+ var _a;
4096
+ if (!this.state.enabled)
4097
+ return;
4098
+ if (!((_a = this.five.model) === null || _a === void 0 ? void 0 : _a.loaded))
4099
+ throw new Error(FloorplanErrorType.ModelNotLoaded);
4100
+ if (!this.data)
4101
+ throw new Error(FloorplanErrorType.DataNotLoaded);
4102
+ this.isHiddenByHideFunc = false;
4103
+ // ===== 参数合并 =====
4104
+ const baseShowOpts = {
4105
+ floorIndex: this.floorIndex,
4106
+ modelOpacity: this.state.config.modelOpacity,
4107
+ immediately: false,
4108
+ isAutoShow: false,
4109
+ userAction: true,
4110
+ };
4111
+ const mergedOptions = Object.assign(Object.assign({}, baseShowOpts), options);
4112
+ const getShowPromise = async () => {
4113
+ this.hooks.emit('show', { userAction: mergedOptions.userAction, auto: mergedOptions.isAutoShow });
4114
+ let hasRejected = false;
4115
+ let externalErrorMsg;
4116
+ this.showRejection = (errorMsg) => {
4117
+ hasRejected = true;
4118
+ externalErrorMsg = errorMsg;
4119
+ };
4120
+ const [correctError] = await to(correctFiveState(this.five, this.showState, mergedOptions.userAction));
4121
+ if (correctError)
4122
+ throw correctError;
4123
+ // 异步结束要判断当前是不是被中断了
4124
+ if (hasRejected)
4125
+ throw externalErrorMsg ? new Error(externalErrorMsg) : new Error(FloorplanErrorType.UnknownError);
4126
+ // 更新户型图大小
4127
+ this.updateSize();
4128
+ // 高亮当前楼层,有两个目的
4129
+ // 1. 点击模型时,可以跳转到当前楼层的点位上
4130
+ // 2. 当前楼层比较小时,户型图也比较小,如果展示全部楼层,会展示户型图外有一圈模型
4131
+ this.floorIndex = mergedOptions.floorIndex;
4132
+ this.five.model.show(this.floorIndex);
4133
+ // 模型消失, 渲染户型图
4134
+ const modelOpacity = mergedOptions.modelOpacity;
4135
+ const renderDuration = mergedOptions.immediately ? 0 : SHOW_ANIME_DURATION;
4136
+ changeModelCanvasOpacity(this.five, modelOpacity, renderDuration);
4137
+ this.render(renderDuration);
4138
+ };
4139
+ this.showPromise = getShowPromise()
4140
+ .then(() => {
4141
+ this.hooks.emit('showAnimationEnded', {
4142
+ auto: mergedOptions.isAutoShow,
4143
+ userAction: mergedOptions.userAction,
4144
+ });
4145
+ })
4146
+ .catch((error) => {
4147
+ this.updateState({ visible: false }, mergedOptions.userAction);
4148
+ // 自动展示的报错内部处理
4149
+ if (mergedOptions.isAutoShow)
4150
+ return;
4151
+ // 非自动展示的报错继续向外抛出
4152
+ if (error instanceof Error)
4153
+ throw error;
4154
+ })
4155
+ .finally(() => {
4156
+ this.showPromise = undefined;
4157
+ this.showRejection = undefined;
4158
+ });
4159
+ return this.showPromise;
4160
+ }
4161
+ });
4162
+ Object.defineProperty(this, "_hide", {
4163
+ enumerable: true,
4164
+ configurable: true,
4165
+ writable: true,
4166
+ value: (options) => {
4167
+ var _a;
4168
+ // ===== 处理展示过程中 hide =====
4169
+ (_a = this.showRejection) === null || _a === void 0 ? void 0 : _a.call(this, FloorplanErrorType.BreakOffByHide);
4170
+ this.showPromise = undefined;
4171
+ // ===== 合并参数 =====
4172
+ const baseOptions = {
4173
+ userAction: true,
4174
+ isAutoHide: false,
4175
+ };
4176
+ const mergedOptions = Object.assign(Object.assign({}, baseOptions), options);
4177
+ changeModelCanvasOpacity(this.five, 1, 0);
4178
+ this.hooks.emit('hide', { auto: mergedOptions.isAutoHide, userAction: mergedOptions.userAction });
4179
+ this.render();
4180
+ }
4181
+ });
4182
+ Object.defineProperty(this, "handleClick", {
4183
+ enumerable: true,
4184
+ configurable: true,
4185
+ writable: true,
4186
+ value: () => {
4187
+ if (!this.state.visible)
4188
+ return;
4189
+ const preventDefault = this.hooks.emit('click');
4190
+ if (preventDefault)
4191
+ return false;
4192
+ }
4193
+ });
4194
+ /** modelLoaded 之后自动执行 append container 操作 */
4195
+ Object.defineProperty(this, "onFiveModelLoaded", {
4196
+ enumerable: true,
4197
+ configurable: true,
4198
+ writable: true,
4199
+ value: () => {
4200
+ if (this.state.enabled === false)
4201
+ return;
4202
+ if (this.wrapper)
4203
+ return;
4204
+ if (!this.selector)
4205
+ return;
4206
+ const wrapper = this.selector instanceof Element ? this.selector : document.querySelector(this.selector);
4207
+ if (!wrapper)
4208
+ throw new Error('不正确的父容器选择器');
4209
+ this.wrapper = wrapper;
4210
+ wrapper.append(this.container);
4211
+ }
4212
+ });
4213
+ /** 更改模型时,自动隐藏户型图 */
4214
+ Object.defineProperty(this, "onFiveModeChange", {
4215
+ enumerable: true,
4216
+ configurable: true,
4217
+ writable: true,
4218
+ value: (mode) => {
4219
+ // 目前 Five modeChange 事件没有暴露 userAction,先拿 false 苟着
4220
+ if (mode !== this.showState.mode) {
4221
+ this.updateState({ visible: false }, false);
4222
+ this._hide({ userAction: false });
4223
+ }
4224
+ }
4225
+ });
4226
+ /** 惯性结束后,判断能否自动展示户型图 */
4227
+ Object.defineProperty(this, "onFiveInteriaPan", {
4228
+ enumerable: true,
4229
+ configurable: true,
4230
+ writable: true,
4231
+ value: (_, isFinal) => {
4232
+ if (!isFinal)
4233
+ return;
4234
+ if (this.state.config.autoShowEnable === false)
4235
+ return;
4236
+ // 如果用户调用 hide 方法手动隐藏户型图,则不允许自动展示
4237
+ if (this.isHiddenByHideFunc)
4238
+ return;
4239
+ const fiveCurrentState = this.five.getCurrentState();
4240
+ if (fiveCurrentState.mode !== 'Floorplan')
4241
+ return;
4242
+ if (this.state.visible)
4243
+ return;
4244
+ if (shouldFloorplanShowWithPose(fiveCurrentState)) {
4245
+ this.updateState({ visible: true }, true);
4246
+ this._show({ isAutoShow: true });
4247
+ }
4248
+ }
4249
+ });
4250
+ /** panoIndex 改变时,更新 floorIndex */
4251
+ Object.defineProperty(this, "onFivePanoArrived", {
4252
+ enumerable: true,
4253
+ configurable: true,
4254
+ writable: true,
4255
+ value: (index) => {
4256
+ var _a;
4257
+ if (!((_a = this.five) === null || _a === void 0 ? void 0 : _a.work))
4258
+ return;
4259
+ this.panoIndex = index;
4260
+ this.floorIndex = this.five.work.observers[index].floorIndex;
4261
+ }
4262
+ });
4263
+ /** cameraUpdate 时判断户型图是否应该自动隐藏 */
4264
+ Object.defineProperty(this, "onFiveCameraUpdate", {
4265
+ enumerable: true,
4266
+ configurable: true,
4267
+ writable: true,
4268
+ value: (_, userAction) => {
4269
+ if (!this.state.visible)
4270
+ return;
4271
+ // 展示过程中不处理自动隐藏逻辑
4272
+ if (this.showPromise)
4273
+ return;
4274
+ const fiveCurrentState = this.five.getCurrentState();
4275
+ if (shouldFloorplanHideWithPose(fiveCurrentState)) {
4276
+ this.updateState({ visible: false }, userAction);
4277
+ this._hide({ userAction, isAutoHide: true });
4278
+ }
4279
+ }
4280
+ });
4281
+ /** 在户型图展示时阻止多指操作, 阻止鼠标放大 */
4282
+ Object.defineProperty(this, "onFiveWantsGesture", {
4283
+ enumerable: true,
4284
+ configurable: true,
4285
+ writable: true,
4286
+ value: (type, pointers) => {
4287
+ if (!this.state.visible)
4288
+ return;
4289
+ // 阻止多指操作
4290
+ if (pointers.length > 1)
4291
+ return false;
4292
+ // 阻止鼠标滚轮行为
4293
+ if (type === 'mouseWheel')
4294
+ return false;
4295
+ }
4296
+ });
4297
+ /** 户型图展示中,转动三维模型,结束时应该自动修复模型状态 */
4298
+ Object.defineProperty(this, "onFiveWantsPanGesture", {
4299
+ enumerable: true,
4300
+ configurable: true,
4301
+ writable: true,
4302
+ value: (_, isFinal) => {
4303
+ if (this.five.getCurrentState().mode !== 'Floorplan')
4304
+ return;
4305
+ if (this.state.config.autoShowEnable === false)
4306
+ return;
4307
+ if (isFinal && this.state.visible) {
4308
+ this.five.updateCamera(this.showState, 0);
4309
+ // 禁用掉 isFinal 的 panGesture 行为
4310
+ // 因为 panGesture 中包含对相机的处理,会跟回调事件中的处理逻辑冲突
4311
+ // 此行为也会禁用 pan 结束后的惯性处理
4312
+ return false;
4313
+ }
4314
+ }
4315
+ });
4316
+ /** 阻止点击分间走点 */
4317
+ Object.defineProperty(this, "onFiveWantsTapGesture", {
4318
+ enumerable: true,
4319
+ configurable: true,
4320
+ writable: true,
4321
+ value: () => this.handleClick()
4322
+ });
4323
+ /** 从 Panorama 切换到其他模态时,记录当前的相机水平视角 */
4324
+ Object.defineProperty(this, "onFiveWantsChangeMode", {
4325
+ enumerable: true,
4326
+ configurable: true,
4327
+ writable: true,
4328
+ value: (mode, prevMode) => {
4329
+ if (prevMode === 'Panorama' && mode === 'Floorplan') {
4330
+ this.lastPanoramaLongitude = this.five.getCurrentState().longitude;
4331
+ }
4332
+ // if (mode !== 'Floorplan') this.hide()
4333
+ }
4334
+ });
4335
+ /** 模型楼层高亮改变时,自动进行楼层切换 */
4336
+ Object.defineProperty(this, "onModelShownFloorChange", {
4337
+ enumerable: true,
4338
+ configurable: true,
4339
+ writable: true,
4340
+ value: (shownFloor) => {
4341
+ if (this.floorIndex === shownFloor)
4342
+ return;
4343
+ if (shownFloor === null) {
4344
+ const panoIndex = this.five.getCurrentState().panoIndex;
4345
+ this.floorIndex = this.five.work.observers[panoIndex].floorIndex;
4346
+ return;
4347
+ }
4348
+ this.floorIndex = shownFloor;
4349
+ this.updateSize();
4350
+ this.render();
4351
+ }
4352
+ });
4353
+ if (params === null || params === void 0 ? void 0 : params.selector) {
4354
+ this.selector = params.selector;
4355
+ console.warn('不推荐继续使用 params.selector 配置父容器,请使用 appendTo 方法');
4356
+ }
4357
+ // =============== init Show State ===============
4358
+ this.showState = {
4359
+ mode: 'Floorplan',
4360
+ longitude: 0,
4361
+ latitude: Math.PI / 2,
4362
+ fov: FIVE_CAMERA_DEFAULT_FOV / ((_a = params === null || params === void 0 ? void 0 : params.scale) !== null && _a !== void 0 ? _a : 1),
4363
+ };
4364
+ // =============== init State ===============
4365
+ const baseConfig = {
4366
+ northDesc: '北',
4367
+ modelOpacity: 1,
4368
+ hoverEnable: true,
4369
+ compassEnable: true,
4370
+ autoShowEnable: true,
4371
+ ruleLabelsEnable: true,
4372
+ roomLabelsEnable: true,
4373
+ cameraImageUrl: CAMERA_IMAGE,
4374
+ attachedTo: FLOOR_PLAN_ATTACHED_TO.BOUNDING_CENTER,
4375
+ getLabelElement: undefined,
4376
+ adaptiveRoomLabelVisibleEnable: true,
4377
+ };
4378
+ const paramsConfig = params ? omit(params, ['selector', 'scale']) : {};
4379
+ const config = Object.assign(Object.assign({}, baseConfig), paramsConfig);
4380
+ this.state = {
4381
+ enabled: true,
4382
+ visible: false,
4383
+ config,
4384
+ };
4385
+ // =============== init Container ===============
4386
+ this.initContainer();
4387
+ // =============== init Listener ===============
4388
+ // 注意插件声明周期内只监听一次的事件不放在 addEventListener 里面
4389
+ // 如果初始化的时候模型已经加载完毕了,就不用再等 modelLoaded
4390
+ five.model.loaded ? this.onFiveModelLoaded() : five.once('modelLoaded', this.onFiveModelLoaded);
4391
+ five.once('dispose', this.dispose);
4392
+ this.addEventListener();
4393
+ }
4394
+ async load(serverData, state, userAction = true) {
4395
+ function isPluginServerData(serverData) {
4396
+ return Object.prototype.hasOwnProperty.apply(serverData, ['version']);
4397
+ }
4398
+ const _data = serverData;
4399
+ if (_data && !_data.version)
4400
+ console.warn('传入 serverData.data 的方式后续可能不再支持,请把 serverData 整体传入 load 函数');
4401
+ const copyData = JSON.parse(JSON.stringify(serverData));
4402
+ const _serverData = isPluginServerData(copyData) ? copyData.data : copyData;
4403
+ const prevData = this.data;
4404
+ this.data = await formatData(_serverData);
4405
+ this.hooks.emit('dataLoaded', this.data);
4406
+ this.hooks.emit('dataChange', this.data, prevData);
4407
+ if (state)
4408
+ this.updateState(state, userAction);
4409
+ this.render();
4410
+ }
4411
+ /** 把插件的渲染DOM插入到对应的容器中去 */
4412
+ appendTo(wrapper) {
4413
+ this.wrapper = wrapper;
4414
+ // 插件 disabled 时,只是不执行副作用,但是 wrapper 还是要赋值的,不然 enable 的时候找不到父容器
4415
+ if (!this.state.enabled)
4416
+ return;
4417
+ wrapper.appendChild(this.container);
4418
+ this.render();
4419
+ return this;
4420
+ }
4421
+ /** 启用插件 */
4422
+ enable(options = {}) {
4423
+ if (this.state.enabled)
4424
+ return;
4425
+ const userAction = options.userAction !== undefined ? options.userAction : true;
4426
+ this.updateState({ enabled: true }, options.userAction || userAction);
4427
+ this._enable({ userAction });
4428
+ }
4429
+ /** 禁用插件 */
4430
+ disable(options = {}) {
4431
+ if (!this.state.enabled)
4432
+ return;
4433
+ const userAction = options.userAction !== undefined ? options.userAction : true;
4434
+ this.updateState({ enabled: false }, options.userAction || userAction);
4435
+ this._disable({ userAction });
4436
+ }
4437
+ /** 更改插件 State */
4438
+ setState(state, options = {}) {
4439
+ const prevState = this.state;
4440
+ const userAction = options.userAction !== undefined ? options.userAction : true;
4441
+ this.updateState(state, userAction);
4442
+ if (state.enabled !== undefined && prevState.enabled !== state.enabled) {
4443
+ state.enabled ? this._enable({ userAction }) : this._disable({ userAction });
4444
+ }
4445
+ if (state.visible !== undefined && prevState.visible !== state.visible) {
4446
+ const options = { userAction };
4447
+ state.visible ? this._show(options) : this._hide(options);
4448
+ }
4449
+ }
4450
+ changeConfigs(_config, userAction = true) {
4451
+ const config = Object.assign(Object.assign({}, this.state.config), _config);
4452
+ this.updateState({ config }, userAction);
4453
+ if (!this.container)
4454
+ return;
4455
+ this.render();
4456
+ }
4457
+ async formatData(serverData) {
4458
+ return await formatData(serverData.data);
4459
+ }
4460
+ updateState(state, userAction) {
4461
+ const prevState = this.state;
4462
+ this.state = Object.assign(Object.assign({}, this.state), state);
4463
+ if (equal(this.state, prevState, { deep: true }))
4464
+ return;
4465
+ this.hooks.emit('stateChange', { state: this.state, prevState, userAction });
4466
+ }
4467
+ /** 如果用户是通过 selector 设置父容器,需要在 modelLoaded 之后把 container 自动放到父容器里
4468
+ *
4469
+ * - TODO: 等 selector 功能下掉之后删除这个逻辑
4470
+ */
4471
+ initContainer() {
4472
+ this.container.classList.add('floorplan-plugin');
4473
+ Object.assign(this.container.style, {
4474
+ position: 'absolute',
4475
+ left: '50%',
4476
+ top: '50%',
4477
+ transform: 'translate(-50%, -50%)',
4478
+ zIndex: 10,
4479
+ pointerEvents: 'none',
4480
+ });
4481
+ this.five.addExtraElement(this.container);
4482
+ }
4483
+ addEventListener() {
4484
+ if (!this.state.enabled)
4485
+ return;
4486
+ if (this.hasAddedEventListener)
4487
+ return;
4488
+ const five = this.five;
4489
+ five.on('modeChange', this.onFiveModeChange);
4490
+ five.on('interiaPan', this.onFiveInteriaPan);
4491
+ five.on('panoArrived', this.onFivePanoArrived);
4492
+ five.on('cameraUpdate', this.onFiveCameraUpdate);
4493
+ five.on('wantsGesture', this.onFiveWantsGesture);
4494
+ five.on('wantsPanGesture', this.onFiveWantsPanGesture);
4495
+ five.on('wantsTapGesture', this.onFiveWantsTapGesture);
4496
+ five.on('wantsChangeMode', this.onFiveWantsChangeMode);
4497
+ five.on('modelShownFloorChange', this.onModelShownFloorChange);
4498
+ }
4499
+ removeEventListener() {
4500
+ const five = this.five;
4501
+ this.hasAddedEventListener = false;
4502
+ // 注意这里并没有消除 dispose 的监听
4503
+ five.off('modelLoaded', this.onFiveModelLoaded);
4504
+ five.off('modeChange', this.onFiveModeChange);
4505
+ five.off('interiaPan', this.onFiveInteriaPan);
4506
+ five.off('panoArrived', this.onFivePanoArrived);
4507
+ five.off('cameraUpdate', this.onFiveCameraUpdate);
4508
+ five.off('wantsGesture', this.onFiveWantsGesture);
4509
+ five.off('wantsPanGesture', this.onFiveWantsPanGesture);
4510
+ five.off('wantsTapGesture', this.onFiveWantsTapGesture);
4511
+ five.off('wantsChangeMode', this.onFiveWantsChangeMode);
4512
+ five.off('modelShownFloorChange', this.onModelShownFloorChange);
4513
+ }
4514
+ render(duration) {
4515
+ if (!this.state.enabled)
4516
+ return;
4517
+ if (!this.container || !this.data)
4518
+ return;
4519
+ if (this.size.width === 0)
4520
+ return;
4521
+ const props = Object.assign(Object.assign({}, this.state.config), { visible: this.state.visible, duration: duration !== null && duration !== void 0 ? duration : 0, panoIndex: this.panoIndex, floorIndex: this.floorIndex, floorplanData: this.data, lastPanoramaLongitude: this.lastPanoramaLongitude });
4522
+ if (this.app)
4523
+ return this.app.$set(props);
4524
+ this.app = new Main({ target: this.container, intro: true, props });
4525
+ }
4526
+ }
4527
+
4528
+ const ModelFloorplanPlugin = (five, params) => {
4529
+ return new Controller(five, params);
4530
+ };
4531
+
4532
+ exports.ModelFloorplanPlugin = ModelFloorplanPlugin;
4533
+ exports["default"] = ModelFloorplanPlugin;