kitchen-simulator 2.0.0 → 2.0.1

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 (1165) hide show
  1. package/README.md +24 -1
  2. package/es/@history.js +2 -0
  3. package/es/AppContext.js +3 -0
  4. package/es/LiteKitchenConfigurator.js +480 -0
  5. package/es/LiteRenderer.js +503 -0
  6. package/es/actions/area-actions.js +14 -0
  7. package/es/actions/export.js +36 -0
  8. package/es/actions/groups-actions.js +89 -0
  9. package/es/actions/holes-actions.js +119 -0
  10. package/es/actions/items-actions.js +318 -0
  11. package/es/actions/lines-actions.js +81 -0
  12. package/es/actions/project-actions.js +286 -0
  13. package/es/actions/scene-actions.js +33 -0
  14. package/es/actions/vertices-actions.js +27 -0
  15. package/es/actions/viewer2d-actions.js +58 -0
  16. package/es/actions/viewer3d-actions.js +23 -0
  17. package/es/analytics/ga4.js +188 -0
  18. package/es/analytics/posthog.js +60 -0
  19. package/es/assets/Window.hdr +2100 -0
  20. package/es/assets/brown_photostudio_02_1k.hdr +0 -0
  21. package/es/assets/fonts/Rene Bieder Milliard Black Italic.woff +0 -0
  22. package/es/assets/fonts/Rene Bieder Milliard Black.woff +0 -0
  23. package/es/assets/fonts/Rene Bieder Milliard Bold Italic.woff +0 -0
  24. package/es/assets/fonts/Rene Bieder Milliard Bold.woff +0 -0
  25. package/es/assets/fonts/Rene Bieder Milliard Book Italic.woff +0 -0
  26. package/es/assets/fonts/Rene Bieder Milliard Book.woff +0 -0
  27. package/es/assets/fonts/Rene Bieder Milliard ExtraBold Italic.woff +0 -0
  28. package/es/assets/fonts/Rene Bieder Milliard ExtraBold.woff +0 -0
  29. package/es/assets/fonts/Rene Bieder Milliard ExtraLight Italic.woff +0 -0
  30. package/es/assets/fonts/Rene Bieder Milliard ExtraLight.woff +0 -0
  31. package/es/assets/fonts/Rene Bieder Milliard Hairline Italic.woff +0 -0
  32. package/es/assets/fonts/Rene Bieder Milliard Hairline.woff +0 -0
  33. package/es/assets/fonts/Rene Bieder Milliard Heavy Italic.woff +0 -0
  34. package/es/assets/fonts/Rene Bieder Milliard Heavy.woff +0 -0
  35. package/es/assets/fonts/Rene Bieder Milliard Light Italic.woff +0 -0
  36. package/es/assets/fonts/Rene Bieder Milliard Light.woff +0 -0
  37. package/es/assets/fonts/Rene Bieder Milliard Medium Italic.woff +0 -0
  38. package/es/assets/fonts/Rene Bieder Milliard Medium.woff +0 -0
  39. package/es/assets/fonts/Rene Bieder Milliard SemiBold Italic.woff +0 -0
  40. package/es/assets/fonts/Rene Bieder Milliard SemiBold.woff +0 -0
  41. package/es/assets/fonts/Rene Bieder Milliard Thin Italic.woff +0 -0
  42. package/es/assets/fonts/Rene Bieder Milliard Thin.woff +0 -0
  43. package/es/assets/fonts/style.css +177 -0
  44. package/es/assets/gltf/door_closet.bin +0 -0
  45. package/es/assets/gltf/door_closet.fbx +0 -0
  46. package/es/assets/gltf/door_closet.gltf +1 -0
  47. package/es/assets/gltf/door_exterior.bin +0 -0
  48. package/es/assets/gltf/door_exterior.fbx +0 -0
  49. package/es/assets/gltf/door_exterior.gltf +1 -0
  50. package/es/assets/gltf/door_interior.bin +0 -0
  51. package/es/assets/gltf/door_interior.fbx +0 -0
  52. package/es/assets/gltf/door_interior.gltf +1 -0
  53. package/es/assets/gltf/door_sliding.bin +0 -0
  54. package/es/assets/gltf/door_sliding.fbx +0 -0
  55. package/es/assets/gltf/door_sliding.gltf +1 -0
  56. package/es/assets/gltf/doorway_framed.bin +0 -0
  57. package/es/assets/gltf/doorway_framed.fbx +0 -0
  58. package/es/assets/gltf/doorway_framed.gltf +1 -0
  59. package/es/assets/gltf/window_clear.bin +0 -0
  60. package/es/assets/gltf/window_clear.fbx +0 -0
  61. package/es/assets/gltf/window_clear.gltf +1 -0
  62. package/es/assets/gltf/window_cross.bin +0 -0
  63. package/es/assets/gltf/window_cross.fbx +0 -0
  64. package/es/assets/gltf/window_cross.gltf +1 -0
  65. package/es/assets/gltf/window_double_hung.bin +0 -0
  66. package/es/assets/gltf/window_double_hung.fbx +0 -0
  67. package/es/assets/gltf/window_double_hung.gltf +1 -0
  68. package/es/assets/gltf/window_vertical.bin +0 -0
  69. package/es/assets/gltf/window_vertical.fbx +0 -0
  70. package/es/assets/gltf/window_vertical.gltf +1 -0
  71. package/es/assets/img/1.jpg +0 -0
  72. package/es/assets/img/TKC_thumbnail.png +0 -0
  73. package/es/assets/img/Toggle.png +0 -0
  74. package/es/assets/img/loading/loading.gif +0 -0
  75. package/es/assets/img/loading/loading_1.svg +11 -0
  76. package/es/assets/img/loading_large.gif +0 -0
  77. package/es/assets/img/png/door/closet.png +0 -0
  78. package/es/assets/img/png/door/doorwaysframed.png +0 -0
  79. package/es/assets/img/png/door/doorwaysframeles.png +0 -0
  80. package/es/assets/img/png/door/doorwaysframeless.png +0 -0
  81. package/es/assets/img/png/door/exterior.png +0 -0
  82. package/es/assets/img/png/door/interior.png +0 -0
  83. package/es/assets/img/png/door/sliding.png +0 -0
  84. package/es/assets/img/png/helper/outcome.png +0 -0
  85. package/es/assets/img/png/helper/video_preview_3d.png +0 -0
  86. package/es/assets/img/png/helper/video_preview_start.png +0 -0
  87. package/es/assets/img/project_img.png +0 -0
  88. package/es/assets/img/rta/rta_logo_box_blue.jpg +0 -0
  89. package/es/assets/img/rta/rta_logo_box_blue_ico.jpg +0 -0
  90. package/es/assets/img/rta/rta_logo_box_blue_ico.svg +55 -0
  91. package/es/assets/img/rta/rta_logo_box_darkGray.jpg +0 -0
  92. package/es/assets/img/rta/rta_logo_box_lightblue.png +0 -0
  93. package/es/assets/img/rta/rta_logo_box_lightmaroon.png +0 -0
  94. package/es/assets/img/rta/rta_logo_box_maroon.png +0 -0
  95. package/es/assets/img/rta/rta_logo_box_white.png +0 -0
  96. package/es/assets/img/rta_menu.png +0 -0
  97. package/es/assets/img/step2.jpg +0 -0
  98. package/es/assets/img/step3.jpg +0 -0
  99. package/es/assets/img/step4.jpg +0 -0
  100. package/es/assets/img/step5.jpg +0 -0
  101. package/es/assets/img/step6.jpg +0 -0
  102. package/es/assets/img/step7.jpg +0 -0
  103. package/es/assets/img/step8.jpg +0 -0
  104. package/es/assets/img/svg/2d_delete_object.svg +33 -0
  105. package/es/assets/img/svg/2d_delete_object1.svg +33 -0
  106. package/es/assets/img/svg/2d_lock_object.svg +33 -0
  107. package/es/assets/img/svg/3d_item_move.svg +106 -0
  108. package/es/assets/img/svg/3d_item_rotation.svg +76 -0
  109. package/es/assets/img/svg/3d_item_warning_edit.svg +77 -0
  110. package/es/assets/img/svg/3d_item_warning_info.svg +81 -0
  111. package/es/assets/img/svg/accessories.svg +4 -0
  112. package/es/assets/img/svg/angle_icon.svg +39 -0
  113. package/es/assets/img/svg/blank_div.svg +14 -0
  114. package/es/assets/img/svg/bottombar/2d3d_button.svg +3 -0
  115. package/es/assets/img/svg/bottombar/2d3d_button_active.svg +3 -0
  116. package/es/assets/img/svg/bottombar/2d3d_toggle.svg +4 -0
  117. package/es/assets/img/svg/bottombar/2d3d_toggle_active.svg +4 -0
  118. package/es/assets/img/svg/bottombar/arrow-down.svg +3 -0
  119. package/es/assets/img/svg/bottombar/arrow-left.svg +3 -0
  120. package/es/assets/img/svg/bottombar/arrow-minus.svg +3 -0
  121. package/es/assets/img/svg/bottombar/arrow-plus.svg +11 -0
  122. package/es/assets/img/svg/bottombar/arrow-right.svg +3 -0
  123. package/es/assets/img/svg/bottombar/arrow-up.svg +3 -0
  124. package/es/assets/img/svg/bottombar/collapse.svg +3 -0
  125. package/es/assets/img/svg/bottombar/elevation-back.svg +6 -0
  126. package/es/assets/img/svg/bottombar/elevation-front.svg +6 -0
  127. package/es/assets/img/svg/bottombar/elevation-left.svg +6 -0
  128. package/es/assets/img/svg/bottombar/elevation-right.svg +7 -0
  129. package/es/assets/img/svg/bottombar/elevation.svg +6 -0
  130. package/es/assets/img/svg/bottombar/expand.svg +3 -0
  131. package/es/assets/img/svg/bottombar/help.svg +72 -0
  132. package/es/assets/img/svg/bottombar/incm_toggle.svg +39 -0
  133. package/es/assets/img/svg/bottombar/pan_1.svg +57 -0
  134. package/es/assets/img/svg/bottombar/pan_2.svg +27 -0
  135. package/es/assets/img/svg/bottombar/pan_3.svg +27 -0
  136. package/es/assets/img/svg/bottombar/pan_4.svg +27 -0
  137. package/es/assets/img/svg/bottombar/pan_5.svg +27 -0
  138. package/es/assets/img/svg/bottombar/settings.svg +23 -0
  139. package/es/assets/img/svg/bottombar/spin-down.svg +76 -0
  140. package/es/assets/img/svg/bottombar/spin-left.svg +75 -0
  141. package/es/assets/img/svg/bottombar/spin-right.svg +75 -0
  142. package/es/assets/img/svg/bottombar/spin-up.svg +76 -0
  143. package/es/assets/img/svg/bottombar/spin_1.svg +48 -0
  144. package/es/assets/img/svg/bottombar/spin_2.svg +31 -0
  145. package/es/assets/img/svg/bottombar/spin_3.svg +31 -0
  146. package/es/assets/img/svg/bottombar/spin_4.svg +31 -0
  147. package/es/assets/img/svg/bottombar/spin_5.svg +31 -0
  148. package/es/assets/img/svg/bottombar/zoomin.svg +29 -0
  149. package/es/assets/img/svg/bottombar/zoomout.svg +26 -0
  150. package/es/assets/img/svg/check.svg +10 -0
  151. package/es/assets/img/svg/close.svg +11 -0
  152. package/es/assets/img/svg/color/Black.svg +3 -0
  153. package/es/assets/img/svg/color/Blue.svg +3 -0
  154. package/es/assets/img/svg/color/Brown.svg +9 -0
  155. package/es/assets/img/svg/color/Cream.svg +3 -0
  156. package/es/assets/img/svg/color/Dark.svg +9 -0
  157. package/es/assets/img/svg/color/Gray.svg +3 -0
  158. package/es/assets/img/svg/color/Green.svg +3 -0
  159. package/es/assets/img/svg/color/Light.svg +9 -0
  160. package/es/assets/img/svg/color/Medium.svg +9 -0
  161. package/es/assets/img/svg/color/Unfinished.svg +9 -0
  162. package/es/assets/img/svg/color/White.svg +3 -0
  163. package/es/assets/img/svg/color/White.svg.bak +3 -0
  164. package/es/assets/img/svg/color/stone2.jpg +0 -0
  165. package/es/assets/img/svg/color/wood2.jpg +0 -0
  166. package/es/assets/img/svg/copy.svg +11 -0
  167. package/es/assets/img/svg/delete.svg +3 -0
  168. package/es/assets/img/svg/detail.svg +77 -0
  169. package/es/assets/img/svg/disclaimer/background.svg +758 -0
  170. package/es/assets/img/svg/disclaimer/logo-dots.svg +11 -0
  171. package/es/assets/img/svg/door/Closet.svg +11 -0
  172. package/es/assets/img/svg/door/Exterior.svg +5 -0
  173. package/es/assets/img/svg/door/Framed_dorway.svg +5 -0
  174. package/es/assets/img/svg/door/Frameless_dorway.svg +5 -0
  175. package/es/assets/img/svg/door/Interior.svg +7 -0
  176. package/es/assets/img/svg/door/Sliding.svg +5 -0
  177. package/es/assets/img/svg/doors_closet.svg +47 -0
  178. package/es/assets/img/svg/doors_exterior.svg +25 -0
  179. package/es/assets/img/svg/doors_interior.svg +29 -0
  180. package/es/assets/img/svg/doors_patio.svg +26 -0
  181. package/es/assets/img/svg/duplicate.svg +11 -0
  182. package/es/assets/img/svg/duplicate_object_left.svg +32 -0
  183. package/es/assets/img/svg/duplicate_object_right.svg +32 -0
  184. package/es/assets/img/svg/filtersActive.svg +19 -0
  185. package/es/assets/img/svg/firstsetting/L.svg +3 -0
  186. package/es/assets/img/svg/firstsetting/L2.svg +3 -0
  187. package/es/assets/img/svg/firstsetting/Open.svg +3 -0
  188. package/es/assets/img/svg/firstsetting/Square.svg +3 -0
  189. package/es/assets/img/svg/firstsetting/bar-active.svg +9 -0
  190. package/es/assets/img/svg/firstsetting/bar-normal.svg +3 -0
  191. package/es/assets/img/svg/firstsetting/bullet-current.svg +3 -0
  192. package/es/assets/img/svg/firstsetting/bullet-done.svg +3 -0
  193. package/es/assets/img/svg/firstsetting/bullet-not-done.svg +3 -0
  194. package/es/assets/img/svg/firstsetting/check-active.svg +3 -0
  195. package/es/assets/img/svg/firstsetting/check-normal.svg +3 -0
  196. package/es/assets/img/svg/firstsetting/pencil.svg +11 -0
  197. package/es/assets/img/svg/green_checkmark.svg +27 -0
  198. package/es/assets/img/svg/headerbar/assist.svg +3 -0
  199. package/es/assets/img/svg/headerbar/cart.svg +3 -0
  200. package/es/assets/img/svg/headerbar/check.svg +10 -0
  201. package/es/assets/img/svg/headerbar/consult_designer.svg +45 -0
  202. package/es/assets/img/svg/headerbar/edit_name.svg +26 -0
  203. package/es/assets/img/svg/headerbar/file-dollar.svg +13 -0
  204. package/es/assets/img/svg/headerbar/hamburger_menu.svg +32 -0
  205. package/es/assets/img/svg/headerbar/plus.svg +11 -0
  206. package/es/assets/img/svg/headerbar/review_quote.svg +44 -0
  207. package/es/assets/img/svg/headerbar/ruler-measure.svg +11 -0
  208. package/es/assets/img/svg/headerbar/save.svg +3 -0
  209. package/es/assets/img/svg/headerbar/setting.svg +75 -0
  210. package/es/assets/img/svg/help/check.svg +10 -0
  211. package/es/assets/img/svg/help/search.svg +76 -0
  212. package/es/assets/img/svg/intro/1-start-with-floorplan-whole.svg +27 -0
  213. package/es/assets/img/svg/intro/1-start-with-floorplan.svg +26 -0
  214. package/es/assets/img/svg/intro/2-start-from-scratch-whole.svg +28 -0
  215. package/es/assets/img/svg/intro/2-start-from-scratch.svg +27 -0
  216. package/es/assets/img/svg/intro/3-retrieve-project-whole.svg +19 -0
  217. package/es/assets/img/svg/intro/3-retrieve-project.svg +18 -0
  218. package/es/assets/img/svg/invert.svg +127 -0
  219. package/es/assets/img/svg/lefttoolbar/appliance-active.svg +13 -0
  220. package/es/assets/img/svg/lefttoolbar/appliance.svg +13 -0
  221. package/es/assets/img/svg/lefttoolbar/cabinet-active.svg +10 -0
  222. package/es/assets/img/svg/lefttoolbar/cabinet-category.svg +3 -0
  223. package/es/assets/img/svg/lefttoolbar/cabinet-one.svg +3 -0
  224. package/es/assets/img/svg/lefttoolbar/cabinet.svg +10 -0
  225. package/es/assets/img/svg/lefttoolbar/disigner_assistance.svg +89 -0
  226. package/es/assets/img/svg/lefttoolbar/door-style-active.svg +20 -0
  227. package/es/assets/img/svg/lefttoolbar/door-style.svg +20 -0
  228. package/es/assets/img/svg/lefttoolbar/door.svg +12 -0
  229. package/es/assets/img/svg/lefttoolbar/error_icon.svg +81 -0
  230. package/es/assets/img/svg/lefttoolbar/finishing-active.svg +13 -0
  231. package/es/assets/img/svg/lefttoolbar/finishing.svg +13 -0
  232. package/es/assets/img/svg/lefttoolbar/reviewforquote-active.svg +86 -0
  233. package/es/assets/img/svg/lefttoolbar/reviewforquote.svg +12 -0
  234. package/es/assets/img/svg/lefttoolbar/room-shape-L.svg +3 -0
  235. package/es/assets/img/svg/lefttoolbar/room-shape-active.svg +18 -0
  236. package/es/assets/img/svg/lefttoolbar/room-shape-custom.svg +12 -0
  237. package/es/assets/img/svg/lefttoolbar/room-shape-irregular.svg +3 -0
  238. package/es/assets/img/svg/lefttoolbar/room-shape-open.svg +3 -0
  239. package/es/assets/img/svg/lefttoolbar/room-shape-square.svg +3 -0
  240. package/es/assets/img/svg/lefttoolbar/room-shape.svg +18 -0
  241. package/es/assets/img/svg/lefttoolbar/search.svg +76 -0
  242. package/es/assets/img/svg/lefttoolbar/view_more.svg +86 -0
  243. package/es/assets/img/svg/lefttoolbar/warning_icon.svg +81 -0
  244. package/es/assets/img/svg/lefttoolbar/window.svg +12 -0
  245. package/es/assets/img/svg/logo.svg +11 -0
  246. package/es/assets/img/svg/logo_with_text.svg +25 -0
  247. package/es/assets/img/svg/menubar/login.svg +84 -0
  248. package/es/assets/img/svg/menubar/my_projects.svg +85 -0
  249. package/es/assets/img/svg/menubar/new_project.svg +110 -0
  250. package/es/assets/img/svg/menubar/save_project.svg +84 -0
  251. package/es/assets/img/svg/options.svg +3 -0
  252. package/es/assets/img/svg/positioning.svg +3 -0
  253. package/es/assets/img/svg/rotate.png +0 -0
  254. package/es/assets/img/svg/rotate.svg +17 -0
  255. package/es/assets/img/svg/rotate_object_clockwise.svg +26 -0
  256. package/es/assets/img/svg/rotate_object_counterclockwise.svg +26 -0
  257. package/es/assets/img/svg/toggleFilters.svg +19 -0
  258. package/es/assets/img/svg/toolbar/add_appliances_active.svg +64 -0
  259. package/es/assets/img/svg/toolbar/add_appliances_inactive.svg +52 -0
  260. package/es/assets/img/svg/toolbar/add_button.svg +36 -0
  261. package/es/assets/img/svg/toolbar/add_cabinets_active.svg +59 -0
  262. package/es/assets/img/svg/toolbar/add_cabinets_inactive.svg +49 -0
  263. package/es/assets/img/svg/toolbar/add_items_doors.svg +25 -0
  264. package/es/assets/img/svg/toolbar/add_items_doorways.svg +24 -0
  265. package/es/assets/img/svg/toolbar/add_items_refrigerator.svg +32 -0
  266. package/es/assets/img/svg/toolbar/add_items_windows.svg +28 -0
  267. package/es/assets/img/svg/toolbar/apply_button.svg +38 -0
  268. package/es/assets/img/svg/toolbar/arrow-plus.svg +11 -0
  269. package/es/assets/img/svg/toolbar/backsplash.svg +8 -0
  270. package/es/assets/img/svg/toolbar/cancel_button.svg +37 -0
  271. package/es/assets/img/svg/toolbar/consult_a_designer_button.svg +47 -0
  272. package/es/assets/img/svg/toolbar/countertop.svg +7 -0
  273. package/es/assets/img/svg/toolbar/dcm.png +0 -0
  274. package/es/assets/img/svg/toolbar/dcm_off.svg +12 -0
  275. package/es/assets/img/svg/toolbar/dcm_on.svg +474 -0
  276. package/es/assets/img/svg/toolbar/delete_button.svg +37 -0
  277. package/es/assets/img/svg/toolbar/download.svg +77 -0
  278. package/es/assets/img/svg/toolbar/draw_custom_floor.svg +31 -0
  279. package/es/assets/img/svg/toolbar/edit_button.svg +75 -0
  280. package/es/assets/img/svg/toolbar/email_quote_button.svg +44 -0
  281. package/es/assets/img/svg/toolbar/fbm.png +0 -0
  282. package/es/assets/img/svg/toolbar/finishing_touches_active.svg +54 -0
  283. package/es/assets/img/svg/toolbar/finishing_touches_inactive.svg +42 -0
  284. package/es/assets/img/svg/toolbar/floorstyle.svg +9 -0
  285. package/es/assets/img/svg/toolbar/fmb.png +0 -0
  286. package/es/assets/img/svg/toolbar/fmb_off.svg +12 -0
  287. package/es/assets/img/svg/toolbar/fmb_on.svg +489 -0
  288. package/es/assets/img/svg/toolbar/furnishings_icon.svg +6 -0
  289. package/es/assets/img/svg/toolbar/get_started_button.svg +41 -0
  290. package/es/assets/img/svg/toolbar/handles.svg +5 -0
  291. package/es/assets/img/svg/toolbar/lighting.svg +7 -0
  292. package/es/assets/img/svg/toolbar/lrm.png +0 -0
  293. package/es/assets/img/svg/toolbar/lrm_off.svg +12 -0
  294. package/es/assets/img/svg/toolbar/lrm_on.svg +470 -0
  295. package/es/assets/img/svg/toolbar/make_floorplan_active.svg +66 -0
  296. package/es/assets/img/svg/toolbar/make_floorplan_inactive.svg +52 -0
  297. package/es/assets/img/svg/toolbar/predefined_room_l_shaped.svg +20 -0
  298. package/es/assets/img/svg/toolbar/predefined_room_layout.svg +20 -0
  299. package/es/assets/img/svg/toolbar/predefined_room_long_narrow.svg +20 -0
  300. package/es/assets/img/svg/toolbar/predefined_room_open_l_shape.svg +20 -0
  301. package/es/assets/img/svg/toolbar/predefined_room_open_pentagon.svg +20 -0
  302. package/es/assets/img/svg/toolbar/predefined_room_open_rectangle.svg +20 -0
  303. package/es/assets/img/svg/toolbar/predefined_room_open_rectangle_2.svg +20 -0
  304. package/es/assets/img/svg/toolbar/predefined_room_pentagon.svg +20 -0
  305. package/es/assets/img/svg/toolbar/predefined_room_rectangle.svg +20 -0
  306. package/es/assets/img/svg/toolbar/predefined_room_rectangle_with_alcove.svg +20 -0
  307. package/es/assets/img/svg/toolbar/redo_button.svg +75 -0
  308. package/es/assets/img/svg/toolbar/redo_button1.svg +75 -0
  309. package/es/assets/img/svg/toolbar/review_quote_active.svg +14 -0
  310. package/es/assets/img/svg/toolbar/review_quote_inactive.svg +44 -0
  311. package/es/assets/img/svg/toolbar/save_project_button.svg +44 -0
  312. package/es/assets/img/svg/toolbar/select_doorstyle_active.svg +67 -0
  313. package/es/assets/img/svg/toolbar/select_doorstyle_inactive.svg +57 -0
  314. package/es/assets/img/svg/toolbar/shopping-cart.svg +13 -0
  315. package/es/assets/img/svg/toolbar/style_change_button.svg +47 -0
  316. package/es/assets/img/svg/toolbar/take_picture.svg +75 -0
  317. package/es/assets/img/svg/toolbar/undo_button.svg +76 -0
  318. package/es/assets/img/svg/toolbar/undo_button1.svg +76 -0
  319. package/es/assets/img/svg/toolbar/use_button.svg +37 -0
  320. package/es/assets/img/svg/toolbar/wall_color_icon.svg +6 -0
  321. package/es/assets/img/svg/topbar/edit_active.svg +10 -0
  322. package/es/assets/img/svg/topbar/edit_inactive.svg +10 -0
  323. package/es/assets/img/svg/topbar/redo_active.svg +42 -0
  324. package/es/assets/img/svg/topbar/redo_inactive.svg +23 -0
  325. package/es/assets/img/svg/topbar/select_all_active.svg +50 -0
  326. package/es/assets/img/svg/topbar/select_all_inactive.svg +32 -0
  327. package/es/assets/img/svg/topbar/take_picture_active.svg +51 -0
  328. package/es/assets/img/svg/topbar/take_picture_inactive.svg +26 -0
  329. package/es/assets/img/svg/topbar/undo_active.svg +42 -0
  330. package/es/assets/img/svg/topbar/undo_inactive.svg +23 -0
  331. package/es/assets/img/svg/warning_info_2d.svg +81 -0
  332. package/es/assets/img/svg/window/Clear.svg +3 -0
  333. package/es/assets/img/svg/window/Cross.svg +5 -0
  334. package/es/assets/img/svg/window/Double_hung.svg +4 -0
  335. package/es/assets/img/svg/window/Vertical.svg +4 -0
  336. package/es/assets/img/svg/windows_clear.svg +23 -0
  337. package/es/assets/img/svg/windows_cross.svg +28 -0
  338. package/es/assets/img/svg/windows_double_hung.svg +24 -0
  339. package/es/assets/img/svg/windows_vertical.svg +24 -0
  340. package/es/assets/img/svg/wizardstep/Custom.svg +3 -0
  341. package/es/assets/img/svg/wizardstep/Dashed_line.svg +3 -0
  342. package/es/assets/img/svg/wizardstep/L.svg +3 -0
  343. package/es/assets/img/svg/wizardstep/L2.svg +3 -0
  344. package/es/assets/img/svg/wizardstep/Open.svg +3 -0
  345. package/es/assets/img/svg/wizardstep/Square.svg +3 -0
  346. package/es/assets/img/svg/wizardstep/bar-active.svg +9 -0
  347. package/es/assets/img/svg/wizardstep/bar-normal.svg +3 -0
  348. package/es/assets/img/svg/wizardstep/bullet-current.svg +3 -0
  349. package/es/assets/img/svg/wizardstep/bullet-done.svg +3 -0
  350. package/es/assets/img/svg/wizardstep/bullet-not-done.svg +3 -0
  351. package/es/assets/img/svg/wizardstep/check-active.svg +3 -0
  352. package/es/assets/img/svg/wizardstep/check-normal.svg +3 -0
  353. package/es/assets/img/svg/wizardstep/detail_view.svg +87 -0
  354. package/es/assets/img/svg/wizardstep/pencil.svg +11 -0
  355. package/es/assets/img/svg/wizardstep/tile_view.svg +95 -0
  356. package/es/assets/img/texture/glass.jpg +0 -0
  357. package/es/assets/img/texture/steel.jpg +0 -0
  358. package/es/assets/img/texture/white1px.jpg +0 -0
  359. package/es/assets/img/texture/wood.jpg +0 -0
  360. package/es/assets/model/DCM.bin +0 -0
  361. package/es/assets/model/DCM.fbx +0 -0
  362. package/es/assets/model/DCM.gltf +1 -0
  363. package/es/assets/model/FBM.bin +0 -0
  364. package/es/assets/model/FBM.fbx +0 -0
  365. package/es/assets/model/FBM.gltf +1 -0
  366. package/es/assets/model/LRM.bin +0 -0
  367. package/es/assets/model/LRM.fbx +0 -0
  368. package/es/assets/model/LRM.gltf +1 -0
  369. package/es/assets/rtastore_logo.png +0 -0
  370. package/es/catalog/areas/area/planner-element.js +45 -0
  371. package/es/catalog/areas/area/textures/ceramic-tile.jpg +0 -0
  372. package/es/catalog/areas/area/textures/grass.jpg +0 -0
  373. package/es/catalog/areas/area/textures/parquet.jpg +0 -0
  374. package/es/catalog/areas/area/textures/strand-porcelain.jpg +0 -0
  375. package/es/catalog/areas/area/textures/tile1.jpg +0 -0
  376. package/es/catalog/back.png +0 -0
  377. package/es/catalog/catalog.js +265 -0
  378. package/es/catalog/doors.png +0 -0
  379. package/es/catalog/doorways.png +0 -0
  380. package/es/catalog/envMap/nx.hdr +0 -0
  381. package/es/catalog/envMap/ny.hdr +0 -0
  382. package/es/catalog/envMap/nz.hdr +0 -0
  383. package/es/catalog/envMap/px.hdr +0 -0
  384. package/es/catalog/envMap/py.hdr +0 -0
  385. package/es/catalog/envMap/pz.hdr +0 -0
  386. package/es/catalog/export.js +0 -0
  387. package/es/catalog/factories/area-factory-3d.js +181 -0
  388. package/es/catalog/factories/area-factory.js +78 -0
  389. package/es/catalog/factories/export.js +7 -0
  390. package/es/catalog/factories/wall-factory-3d.js +202 -0
  391. package/es/catalog/factories/wall-factory.js +267 -0
  392. package/es/catalog/holes/door-closet/planner-element.js +222 -0
  393. package/es/catalog/holes/door-double/door_double.png +0 -0
  394. package/es/catalog/holes/door-double/planner-element.js +315 -0
  395. package/es/catalog/holes/door-exterior/planner-element.js +215 -0
  396. package/es/catalog/holes/door-interior/planner-element.js +227 -0
  397. package/es/catalog/holes/door-panic/panicDoor.png +0 -0
  398. package/es/catalog/holes/door-panic/planner-element.js +503 -0
  399. package/es/catalog/holes/door-panic-double/panicDoorDouble.png +0 -0
  400. package/es/catalog/holes/door-panic-double/planner-element.js +463 -0
  401. package/es/catalog/holes/door-sliding/planner-element.js +225 -0
  402. package/es/catalog/holes/doorway-framed/planner-element.js +145 -0
  403. package/es/catalog/holes/doorway-frameless/planner-element.js +104 -0
  404. package/es/catalog/holes/export.js +13 -0
  405. package/es/catalog/holes/gate/gate.jpg +0 -0
  406. package/es/catalog/holes/window-clear/planner-element.js +166 -0
  407. package/es/catalog/holes/window-clear/texture.png +0 -0
  408. package/es/catalog/holes/window-cross/planner-element.js +165 -0
  409. package/es/catalog/holes/window-cross/texture.png +0 -0
  410. package/es/catalog/holes/window-double-hung/planner-element.js +303 -0
  411. package/es/catalog/holes/window-double-hung/texture.png +0 -0
  412. package/es/catalog/holes/window-vertical/planner-element.js +276 -0
  413. package/es/catalog/holes/window-vertical/texture.png +0 -0
  414. package/es/catalog/lines/wall/planner-element.js +79 -0
  415. package/es/catalog/lines/wall/textures/bricks-normal.jpg +0 -0
  416. package/es/catalog/lines/wall/textures/bricks-normal2.jpg +0 -0
  417. package/es/catalog/lines/wall/textures/bricks.jpg +0 -0
  418. package/es/catalog/lines/wall/textures/bricks2.jpg +0 -0
  419. package/es/catalog/lines/wall/textures/bricks3.jpg +0 -0
  420. package/es/catalog/lines/wall/textures/morden-normal.jpg +0 -0
  421. package/es/catalog/lines/wall/textures/morden.jpg +0 -0
  422. package/es/catalog/lines/wall/textures/painted-normal.jpg +0 -0
  423. package/es/catalog/lines/wall/textures/painted.jpg +0 -0
  424. package/es/catalog/lines/wall/textures/plaster-normal.jpg +0 -0
  425. package/es/catalog/lines/wall/textures/plaster.jpg +0 -0
  426. package/es/catalog/lines/wall/wall.png +0 -0
  427. package/es/catalog/molding/molding-dcm/planner-element.js +26 -0
  428. package/es/catalog/molding/molding-dcm/texture.png +0 -0
  429. package/es/catalog/molding/molding-fbm/planner-element.js +26 -0
  430. package/es/catalog/molding/molding-fbm/texture.png +0 -0
  431. package/es/catalog/molding/molding-lrm/planner-element.js +26 -0
  432. package/es/catalog/molding/molding-lrm/texture.png +0 -0
  433. package/es/catalog/properties/export.js +21 -0
  434. package/es/catalog/properties/property-checkbox.js +68 -0
  435. package/es/catalog/properties/property-color.js +39 -0
  436. package/es/catalog/properties/property-enum.js +50 -0
  437. package/es/catalog/properties/property-hidden.js +19 -0
  438. package/es/catalog/properties/property-lenght-measure.js +100 -0
  439. package/es/catalog/properties/property-length-measure.js +84 -0
  440. package/es/catalog/properties/property-length-measure_hole.js +100 -0
  441. package/es/catalog/properties/property-number.js +48 -0
  442. package/es/catalog/properties/property-read-only.js +26 -0
  443. package/es/catalog/properties/property-string.js +48 -0
  444. package/es/catalog/properties/property-toggle.js +39 -0
  445. package/es/catalog/properties/shared-property-style.js +14 -0
  446. package/es/catalog/utils/FuseUtils.js +79 -0
  447. package/es/catalog/utils/exporter.js +149 -0
  448. package/es/catalog/utils/geom-utils.js +189 -0
  449. package/es/catalog/utils/item-loader.js +1594 -0
  450. package/es/catalog/utils/load-obj.js +91 -0
  451. package/es/catalog/utils/mtl-loader.js +357 -0
  452. package/es/catalog/utils/obj-loader.js +476 -0
  453. package/es/catalog/windows.png +0 -0
  454. package/es/class/FuseUtils.js +79 -0
  455. package/es/class/area.js +141 -0
  456. package/es/class/export.js +24 -0
  457. package/es/class/group.js +431 -0
  458. package/es/class/guide.js +58 -0
  459. package/es/class/hole.js +926 -0
  460. package/es/class/item.js +1845 -0
  461. package/es/class/layer.js +663 -0
  462. package/es/class/line.js +1221 -0
  463. package/es/class/project.js +795 -0
  464. package/es/class/vertex.js +198 -0
  465. package/es/components/content.js +131 -0
  466. package/es/components/export.js +7 -0
  467. package/es/components/style/button.js +106 -0
  468. package/es/components/style/cancel-button.js +21 -0
  469. package/es/components/style/content-container.js +30 -0
  470. package/es/components/style/content-title.js +25 -0
  471. package/es/components/style/delete-button.js +24 -0
  472. package/es/components/style/export.js +31 -0
  473. package/es/components/style/form-block.js +20 -0
  474. package/es/components/style/form-color-input.js +26 -0
  475. package/es/components/style/form-label.js +22 -0
  476. package/es/components/style/form-number-input.js +183 -0
  477. package/es/components/style/form-number-input_2.js +200 -0
  478. package/es/components/style/form-select.js +19 -0
  479. package/es/components/style/form-slider.js +60 -0
  480. package/es/components/style/form-submit-button.js +25 -0
  481. package/es/components/style/form-text-input.js +69 -0
  482. package/es/components/viewer2d/area.js +81 -0
  483. package/es/components/viewer2d/export.js +31 -0
  484. package/es/components/viewer2d/grids/grid-horizontal-streak.js +36 -0
  485. package/es/components/viewer2d/grids/grid-streak.js +36 -0
  486. package/es/components/viewer2d/grids/grid-vertical-streak.js +36 -0
  487. package/es/components/viewer2d/grids/grids.js +30 -0
  488. package/es/components/viewer2d/group.js +53 -0
  489. package/es/components/viewer2d/item.js +447 -0
  490. package/es/components/viewer2d/layer.js +164 -0
  491. package/es/components/viewer2d/line.js +964 -0
  492. package/es/components/viewer2d/ruler.js +79 -0
  493. package/es/components/viewer2d/rulerDist.js +132 -0
  494. package/es/components/viewer2d/rulerX.js +145 -0
  495. package/es/components/viewer2d/rulerY.js +147 -0
  496. package/es/components/viewer2d/scene.js +128 -0
  497. package/es/components/viewer2d/snap.js +74 -0
  498. package/es/components/viewer2d/state.js +73 -0
  499. package/es/components/viewer2d/utils.js +187 -0
  500. package/es/components/viewer2d/vertex.js +65 -0
  501. package/es/components/viewer2d/viewer2d.js +1433 -0
  502. package/es/components/viewer3d/camera-controls-module/camera-controls.module.js +2585 -0
  503. package/es/components/viewer3d/dcm.js +401 -0
  504. package/es/components/viewer3d/fbm.js +414 -0
  505. package/es/components/viewer3d/front3D.js +61 -0
  506. package/es/components/viewer3d/grid-creator.js +25 -0
  507. package/es/components/viewer3d/grids/grid-horizontal-streak.js +36 -0
  508. package/es/components/viewer3d/grids/grid-streak.js +27 -0
  509. package/es/components/viewer3d/grids/grid-vertical-streak.js +36 -0
  510. package/es/components/viewer3d/libs/first-person-controls.js +67 -0
  511. package/es/components/viewer3d/libs/helvetiker_regular.typeface.js +1281 -0
  512. package/es/components/viewer3d/libs/mtl-loader.js +357 -0
  513. package/es/components/viewer3d/libs/obj-loader.js +462 -0
  514. package/es/components/viewer3d/libs/orbit-controls.js +697 -0
  515. package/es/components/viewer3d/libs/pointer-lock-controls.js +44 -0
  516. package/es/components/viewer3d/lrm.js +305 -0
  517. package/es/components/viewer3d/model.js +708 -0
  518. package/es/components/viewer3d/pointer-lock-navigation.js +115 -0
  519. package/es/components/viewer3d/ruler-utils/itemRect.js +61 -0
  520. package/es/components/viewer3d/ruler-utils/layer3D.js +495 -0
  521. package/es/components/viewer3d/ruler-utils/ruler3D.js +224 -0
  522. package/es/components/viewer3d/ruler-utils/scene3D.js +59 -0
  523. package/es/components/viewer3d/ruler-utils/state3D.js +18 -0
  524. package/es/components/viewer3d/scene-creator.js +3617 -0
  525. package/es/components/viewer3d/three-memory-cleaner.js +51 -0
  526. package/es/components/viewer3d/viewer3d-first-person.js +309 -0
  527. package/es/components/viewer3d/viewer3d.js +2654 -0
  528. package/es/constants.js +688 -0
  529. package/es/devLiteRenderer.js +316 -0
  530. package/es/index.js +56 -0
  531. package/es/models.js +506 -0
  532. package/es/plugins/SVGLoader.js +1412 -0
  533. package/es/plugins/console-debugger.js +34 -0
  534. package/es/plugins/export.js +7 -0
  535. package/es/plugins/keyboard.js +101 -0
  536. package/es/reducers/areas-reducer.js +12 -0
  537. package/es/reducers/export.js +25 -0
  538. package/es/reducers/groups-reducer.js +38 -0
  539. package/es/reducers/holes-reducer.js +62 -0
  540. package/es/reducers/items-reducer.js +147 -0
  541. package/es/reducers/lines-reducer.js +45 -0
  542. package/es/reducers/project-reducer.js +131 -0
  543. package/es/reducers/reducer.js +19 -0
  544. package/es/reducers/scene-reducer.js +28 -0
  545. package/es/reducers/user-reducer.js +41 -0
  546. package/es/reducers/vertices-reducer.js +19 -0
  547. package/es/reducers/viewer2d-reducer.js +75 -0
  548. package/es/reducers/viewer3d-reducer.js +56 -0
  549. package/es/shared-style.js +66 -0
  550. package/es/styles/export.js +5 -0
  551. package/es/styles/tabs.css +40 -0
  552. package/es/translator/en.js +104 -0
  553. package/es/translator/it.js +79 -0
  554. package/es/translator/ru.js +79 -0
  555. package/es/translator/translator.js +80 -0
  556. package/es/utils/browser.js +33 -0
  557. package/es/utils/convert-units-lite.js +29 -0
  558. package/es/utils/email-validator.js +4 -0
  559. package/es/utils/export.js +25 -0
  560. package/es/utils/geometry.js +2446 -0
  561. package/es/utils/get-edges-of-subgraphs.js +26 -0
  562. package/es/utils/graph-cycles.js +238 -0
  563. package/es/utils/graph-inner-cycles.js +46 -0
  564. package/es/utils/graph.js +145 -0
  565. package/es/utils/helper.js +334 -0
  566. package/es/utils/history.js +29 -0
  567. package/es/utils/id-broker.js +15 -0
  568. package/es/utils/isolate-event-handler.js +683 -0
  569. package/es/utils/logger.js +8 -0
  570. package/es/utils/math.js +50 -0
  571. package/es/utils/molding.js +865 -0
  572. package/es/utils/name-generator.js +14 -0
  573. package/es/utils/objects-utils.js +50 -0
  574. package/es/utils/phone-validator.js +4 -0
  575. package/es/utils/process-black-list.js +15 -0
  576. package/es/utils/react-if.js +18 -0
  577. package/es/utils/snap-scene.js +94 -0
  578. package/es/utils/snap.js +231 -0
  579. package/es/utils/summarizeCart.js +24 -0
  580. package/es/utils/threeCSG.es6.js +494 -0
  581. package/es/version.js +1 -0
  582. package/lib/@history.js +11 -0
  583. package/lib/AppContext.js +11 -0
  584. package/lib/LiteKitchenConfigurator.js +490 -0
  585. package/lib/LiteRenderer.js +513 -0
  586. package/lib/actions/area-actions.js +21 -0
  587. package/lib/actions/export.js +36 -0
  588. package/lib/actions/groups-actions.js +107 -0
  589. package/lib/actions/holes-actions.js +140 -0
  590. package/lib/actions/items-actions.js +370 -0
  591. package/lib/actions/lines-actions.js +96 -0
  592. package/lib/actions/project-actions.js +338 -0
  593. package/lib/actions/scene-actions.js +43 -0
  594. package/lib/actions/vertices-actions.js +35 -0
  595. package/lib/actions/viewer2d-actions.js +73 -0
  596. package/lib/actions/viewer3d-actions.js +32 -0
  597. package/lib/analytics/ga4.js +194 -0
  598. package/lib/analytics/posthog.js +68 -0
  599. package/lib/assets/Window.hdr +2100 -0
  600. package/lib/assets/brown_photostudio_02_1k.hdr +0 -0
  601. package/lib/assets/fonts/Rene Bieder Milliard Black Italic.woff +0 -0
  602. package/lib/assets/fonts/Rene Bieder Milliard Black.woff +0 -0
  603. package/lib/assets/fonts/Rene Bieder Milliard Bold Italic.woff +0 -0
  604. package/lib/assets/fonts/Rene Bieder Milliard Bold.woff +0 -0
  605. package/lib/assets/fonts/Rene Bieder Milliard Book Italic.woff +0 -0
  606. package/lib/assets/fonts/Rene Bieder Milliard Book.woff +0 -0
  607. package/lib/assets/fonts/Rene Bieder Milliard ExtraBold Italic.woff +0 -0
  608. package/lib/assets/fonts/Rene Bieder Milliard ExtraBold.woff +0 -0
  609. package/lib/assets/fonts/Rene Bieder Milliard ExtraLight Italic.woff +0 -0
  610. package/lib/assets/fonts/Rene Bieder Milliard ExtraLight.woff +0 -0
  611. package/lib/assets/fonts/Rene Bieder Milliard Hairline Italic.woff +0 -0
  612. package/lib/assets/fonts/Rene Bieder Milliard Hairline.woff +0 -0
  613. package/lib/assets/fonts/Rene Bieder Milliard Heavy Italic.woff +0 -0
  614. package/lib/assets/fonts/Rene Bieder Milliard Heavy.woff +0 -0
  615. package/lib/assets/fonts/Rene Bieder Milliard Light Italic.woff +0 -0
  616. package/lib/assets/fonts/Rene Bieder Milliard Light.woff +0 -0
  617. package/lib/assets/fonts/Rene Bieder Milliard Medium Italic.woff +0 -0
  618. package/lib/assets/fonts/Rene Bieder Milliard Medium.woff +0 -0
  619. package/lib/assets/fonts/Rene Bieder Milliard SemiBold Italic.woff +0 -0
  620. package/lib/assets/fonts/Rene Bieder Milliard SemiBold.woff +0 -0
  621. package/lib/assets/fonts/Rene Bieder Milliard Thin Italic.woff +0 -0
  622. package/lib/assets/fonts/Rene Bieder Milliard Thin.woff +0 -0
  623. package/lib/assets/fonts/style.css +177 -0
  624. package/lib/assets/gltf/door_closet.bin +0 -0
  625. package/lib/assets/gltf/door_closet.fbx +0 -0
  626. package/lib/assets/gltf/door_closet.gltf +1 -0
  627. package/lib/assets/gltf/door_exterior.bin +0 -0
  628. package/lib/assets/gltf/door_exterior.fbx +0 -0
  629. package/lib/assets/gltf/door_exterior.gltf +1 -0
  630. package/lib/assets/gltf/door_interior.bin +0 -0
  631. package/lib/assets/gltf/door_interior.fbx +0 -0
  632. package/lib/assets/gltf/door_interior.gltf +1 -0
  633. package/lib/assets/gltf/door_sliding.bin +0 -0
  634. package/lib/assets/gltf/door_sliding.fbx +0 -0
  635. package/lib/assets/gltf/door_sliding.gltf +1 -0
  636. package/lib/assets/gltf/doorway_framed.bin +0 -0
  637. package/lib/assets/gltf/doorway_framed.fbx +0 -0
  638. package/lib/assets/gltf/doorway_framed.gltf +1 -0
  639. package/lib/assets/gltf/window_clear.bin +0 -0
  640. package/lib/assets/gltf/window_clear.fbx +0 -0
  641. package/lib/assets/gltf/window_clear.gltf +1 -0
  642. package/lib/assets/gltf/window_cross.bin +0 -0
  643. package/lib/assets/gltf/window_cross.fbx +0 -0
  644. package/lib/assets/gltf/window_cross.gltf +1 -0
  645. package/lib/assets/gltf/window_double_hung.bin +0 -0
  646. package/lib/assets/gltf/window_double_hung.fbx +0 -0
  647. package/lib/assets/gltf/window_double_hung.gltf +1 -0
  648. package/lib/assets/gltf/window_vertical.bin +0 -0
  649. package/lib/assets/gltf/window_vertical.fbx +0 -0
  650. package/lib/assets/gltf/window_vertical.gltf +1 -0
  651. package/lib/assets/img/1.jpg +0 -0
  652. package/lib/assets/img/TKC_thumbnail.png +0 -0
  653. package/lib/assets/img/Toggle.png +0 -0
  654. package/lib/assets/img/loading/loading.gif +0 -0
  655. package/lib/assets/img/loading/loading_1.svg +11 -0
  656. package/lib/assets/img/loading_large.gif +0 -0
  657. package/lib/assets/img/png/door/closet.png +0 -0
  658. package/lib/assets/img/png/door/doorwaysframed.png +0 -0
  659. package/lib/assets/img/png/door/doorwaysframeles.png +0 -0
  660. package/lib/assets/img/png/door/doorwaysframeless.png +0 -0
  661. package/lib/assets/img/png/door/exterior.png +0 -0
  662. package/lib/assets/img/png/door/interior.png +0 -0
  663. package/lib/assets/img/png/door/sliding.png +0 -0
  664. package/lib/assets/img/png/helper/outcome.png +0 -0
  665. package/lib/assets/img/png/helper/video_preview_3d.png +0 -0
  666. package/lib/assets/img/png/helper/video_preview_start.png +0 -0
  667. package/lib/assets/img/project_img.png +0 -0
  668. package/lib/assets/img/rta/rta_logo_box_blue.jpg +0 -0
  669. package/lib/assets/img/rta/rta_logo_box_blue_ico.jpg +0 -0
  670. package/lib/assets/img/rta/rta_logo_box_blue_ico.svg +55 -0
  671. package/lib/assets/img/rta/rta_logo_box_darkGray.jpg +0 -0
  672. package/lib/assets/img/rta/rta_logo_box_lightblue.png +0 -0
  673. package/lib/assets/img/rta/rta_logo_box_lightmaroon.png +0 -0
  674. package/lib/assets/img/rta/rta_logo_box_maroon.png +0 -0
  675. package/lib/assets/img/rta/rta_logo_box_white.png +0 -0
  676. package/lib/assets/img/rta_menu.png +0 -0
  677. package/lib/assets/img/step2.jpg +0 -0
  678. package/lib/assets/img/step3.jpg +0 -0
  679. package/lib/assets/img/step4.jpg +0 -0
  680. package/lib/assets/img/step5.jpg +0 -0
  681. package/lib/assets/img/step6.jpg +0 -0
  682. package/lib/assets/img/step7.jpg +0 -0
  683. package/lib/assets/img/step8.jpg +0 -0
  684. package/lib/assets/img/svg/2d_delete_object.svg +33 -0
  685. package/lib/assets/img/svg/2d_delete_object1.svg +33 -0
  686. package/lib/assets/img/svg/2d_lock_object.svg +33 -0
  687. package/lib/assets/img/svg/3d_item_move.svg +106 -0
  688. package/lib/assets/img/svg/3d_item_rotation.svg +76 -0
  689. package/lib/assets/img/svg/3d_item_warning_edit.svg +77 -0
  690. package/lib/assets/img/svg/3d_item_warning_info.svg +81 -0
  691. package/lib/assets/img/svg/accessories.svg +4 -0
  692. package/lib/assets/img/svg/angle_icon.svg +39 -0
  693. package/lib/assets/img/svg/blank_div.svg +14 -0
  694. package/lib/assets/img/svg/bottombar/2d3d_button.svg +3 -0
  695. package/lib/assets/img/svg/bottombar/2d3d_button_active.svg +3 -0
  696. package/lib/assets/img/svg/bottombar/2d3d_toggle.svg +4 -0
  697. package/lib/assets/img/svg/bottombar/2d3d_toggle_active.svg +4 -0
  698. package/lib/assets/img/svg/bottombar/arrow-down.svg +3 -0
  699. package/lib/assets/img/svg/bottombar/arrow-left.svg +3 -0
  700. package/lib/assets/img/svg/bottombar/arrow-minus.svg +3 -0
  701. package/lib/assets/img/svg/bottombar/arrow-plus.svg +11 -0
  702. package/lib/assets/img/svg/bottombar/arrow-right.svg +3 -0
  703. package/lib/assets/img/svg/bottombar/arrow-up.svg +3 -0
  704. package/lib/assets/img/svg/bottombar/collapse.svg +3 -0
  705. package/lib/assets/img/svg/bottombar/elevation-back.svg +6 -0
  706. package/lib/assets/img/svg/bottombar/elevation-front.svg +6 -0
  707. package/lib/assets/img/svg/bottombar/elevation-left.svg +6 -0
  708. package/lib/assets/img/svg/bottombar/elevation-right.svg +7 -0
  709. package/lib/assets/img/svg/bottombar/elevation.svg +6 -0
  710. package/lib/assets/img/svg/bottombar/expand.svg +3 -0
  711. package/lib/assets/img/svg/bottombar/help.svg +72 -0
  712. package/lib/assets/img/svg/bottombar/incm_toggle.svg +39 -0
  713. package/lib/assets/img/svg/bottombar/pan_1.svg +57 -0
  714. package/lib/assets/img/svg/bottombar/pan_2.svg +27 -0
  715. package/lib/assets/img/svg/bottombar/pan_3.svg +27 -0
  716. package/lib/assets/img/svg/bottombar/pan_4.svg +27 -0
  717. package/lib/assets/img/svg/bottombar/pan_5.svg +27 -0
  718. package/lib/assets/img/svg/bottombar/settings.svg +23 -0
  719. package/lib/assets/img/svg/bottombar/spin-down.svg +76 -0
  720. package/lib/assets/img/svg/bottombar/spin-left.svg +75 -0
  721. package/lib/assets/img/svg/bottombar/spin-right.svg +75 -0
  722. package/lib/assets/img/svg/bottombar/spin-up.svg +76 -0
  723. package/lib/assets/img/svg/bottombar/spin_1.svg +48 -0
  724. package/lib/assets/img/svg/bottombar/spin_2.svg +31 -0
  725. package/lib/assets/img/svg/bottombar/spin_3.svg +31 -0
  726. package/lib/assets/img/svg/bottombar/spin_4.svg +31 -0
  727. package/lib/assets/img/svg/bottombar/spin_5.svg +31 -0
  728. package/lib/assets/img/svg/bottombar/zoomin.svg +29 -0
  729. package/lib/assets/img/svg/bottombar/zoomout.svg +26 -0
  730. package/lib/assets/img/svg/check.svg +10 -0
  731. package/lib/assets/img/svg/close.svg +11 -0
  732. package/lib/assets/img/svg/color/Black.svg +3 -0
  733. package/lib/assets/img/svg/color/Blue.svg +3 -0
  734. package/lib/assets/img/svg/color/Brown.svg +9 -0
  735. package/lib/assets/img/svg/color/Cream.svg +3 -0
  736. package/lib/assets/img/svg/color/Dark.svg +9 -0
  737. package/lib/assets/img/svg/color/Gray.svg +3 -0
  738. package/lib/assets/img/svg/color/Green.svg +3 -0
  739. package/lib/assets/img/svg/color/Light.svg +9 -0
  740. package/lib/assets/img/svg/color/Medium.svg +9 -0
  741. package/lib/assets/img/svg/color/Unfinished.svg +9 -0
  742. package/lib/assets/img/svg/color/White.svg +3 -0
  743. package/lib/assets/img/svg/color/White.svg.bak +3 -0
  744. package/lib/assets/img/svg/color/stone2.jpg +0 -0
  745. package/lib/assets/img/svg/color/wood2.jpg +0 -0
  746. package/lib/assets/img/svg/copy.svg +11 -0
  747. package/lib/assets/img/svg/delete.svg +3 -0
  748. package/lib/assets/img/svg/detail.svg +77 -0
  749. package/lib/assets/img/svg/disclaimer/background.svg +758 -0
  750. package/lib/assets/img/svg/disclaimer/logo-dots.svg +11 -0
  751. package/lib/assets/img/svg/door/Closet.svg +11 -0
  752. package/lib/assets/img/svg/door/Exterior.svg +5 -0
  753. package/lib/assets/img/svg/door/Framed_dorway.svg +5 -0
  754. package/lib/assets/img/svg/door/Frameless_dorway.svg +5 -0
  755. package/lib/assets/img/svg/door/Interior.svg +7 -0
  756. package/lib/assets/img/svg/door/Sliding.svg +5 -0
  757. package/lib/assets/img/svg/doors_closet.svg +47 -0
  758. package/lib/assets/img/svg/doors_exterior.svg +25 -0
  759. package/lib/assets/img/svg/doors_interior.svg +29 -0
  760. package/lib/assets/img/svg/doors_patio.svg +26 -0
  761. package/lib/assets/img/svg/duplicate.svg +11 -0
  762. package/lib/assets/img/svg/duplicate_object_left.svg +32 -0
  763. package/lib/assets/img/svg/duplicate_object_right.svg +32 -0
  764. package/lib/assets/img/svg/filtersActive.svg +19 -0
  765. package/lib/assets/img/svg/firstsetting/L.svg +3 -0
  766. package/lib/assets/img/svg/firstsetting/L2.svg +3 -0
  767. package/lib/assets/img/svg/firstsetting/Open.svg +3 -0
  768. package/lib/assets/img/svg/firstsetting/Square.svg +3 -0
  769. package/lib/assets/img/svg/firstsetting/bar-active.svg +9 -0
  770. package/lib/assets/img/svg/firstsetting/bar-normal.svg +3 -0
  771. package/lib/assets/img/svg/firstsetting/bullet-current.svg +3 -0
  772. package/lib/assets/img/svg/firstsetting/bullet-done.svg +3 -0
  773. package/lib/assets/img/svg/firstsetting/bullet-not-done.svg +3 -0
  774. package/lib/assets/img/svg/firstsetting/check-active.svg +3 -0
  775. package/lib/assets/img/svg/firstsetting/check-normal.svg +3 -0
  776. package/lib/assets/img/svg/firstsetting/pencil.svg +11 -0
  777. package/lib/assets/img/svg/green_checkmark.svg +27 -0
  778. package/lib/assets/img/svg/headerbar/assist.svg +3 -0
  779. package/lib/assets/img/svg/headerbar/cart.svg +3 -0
  780. package/lib/assets/img/svg/headerbar/check.svg +10 -0
  781. package/lib/assets/img/svg/headerbar/consult_designer.svg +45 -0
  782. package/lib/assets/img/svg/headerbar/edit_name.svg +26 -0
  783. package/lib/assets/img/svg/headerbar/file-dollar.svg +13 -0
  784. package/lib/assets/img/svg/headerbar/hamburger_menu.svg +32 -0
  785. package/lib/assets/img/svg/headerbar/plus.svg +11 -0
  786. package/lib/assets/img/svg/headerbar/review_quote.svg +44 -0
  787. package/lib/assets/img/svg/headerbar/ruler-measure.svg +11 -0
  788. package/lib/assets/img/svg/headerbar/save.svg +3 -0
  789. package/lib/assets/img/svg/headerbar/setting.svg +75 -0
  790. package/lib/assets/img/svg/help/check.svg +10 -0
  791. package/lib/assets/img/svg/help/search.svg +76 -0
  792. package/lib/assets/img/svg/intro/1-start-with-floorplan-whole.svg +27 -0
  793. package/lib/assets/img/svg/intro/1-start-with-floorplan.svg +26 -0
  794. package/lib/assets/img/svg/intro/2-start-from-scratch-whole.svg +28 -0
  795. package/lib/assets/img/svg/intro/2-start-from-scratch.svg +27 -0
  796. package/lib/assets/img/svg/intro/3-retrieve-project-whole.svg +19 -0
  797. package/lib/assets/img/svg/intro/3-retrieve-project.svg +18 -0
  798. package/lib/assets/img/svg/invert.svg +127 -0
  799. package/lib/assets/img/svg/lefttoolbar/appliance-active.svg +13 -0
  800. package/lib/assets/img/svg/lefttoolbar/appliance.svg +13 -0
  801. package/lib/assets/img/svg/lefttoolbar/cabinet-active.svg +10 -0
  802. package/lib/assets/img/svg/lefttoolbar/cabinet-category.svg +3 -0
  803. package/lib/assets/img/svg/lefttoolbar/cabinet-one.svg +3 -0
  804. package/lib/assets/img/svg/lefttoolbar/cabinet.svg +10 -0
  805. package/lib/assets/img/svg/lefttoolbar/disigner_assistance.svg +89 -0
  806. package/lib/assets/img/svg/lefttoolbar/door-style-active.svg +20 -0
  807. package/lib/assets/img/svg/lefttoolbar/door-style.svg +20 -0
  808. package/lib/assets/img/svg/lefttoolbar/door.svg +12 -0
  809. package/lib/assets/img/svg/lefttoolbar/error_icon.svg +81 -0
  810. package/lib/assets/img/svg/lefttoolbar/finishing-active.svg +13 -0
  811. package/lib/assets/img/svg/lefttoolbar/finishing.svg +13 -0
  812. package/lib/assets/img/svg/lefttoolbar/reviewforquote-active.svg +86 -0
  813. package/lib/assets/img/svg/lefttoolbar/reviewforquote.svg +12 -0
  814. package/lib/assets/img/svg/lefttoolbar/room-shape-L.svg +3 -0
  815. package/lib/assets/img/svg/lefttoolbar/room-shape-active.svg +18 -0
  816. package/lib/assets/img/svg/lefttoolbar/room-shape-custom.svg +12 -0
  817. package/lib/assets/img/svg/lefttoolbar/room-shape-irregular.svg +3 -0
  818. package/lib/assets/img/svg/lefttoolbar/room-shape-open.svg +3 -0
  819. package/lib/assets/img/svg/lefttoolbar/room-shape-square.svg +3 -0
  820. package/lib/assets/img/svg/lefttoolbar/room-shape.svg +18 -0
  821. package/lib/assets/img/svg/lefttoolbar/search.svg +76 -0
  822. package/lib/assets/img/svg/lefttoolbar/view_more.svg +86 -0
  823. package/lib/assets/img/svg/lefttoolbar/warning_icon.svg +81 -0
  824. package/lib/assets/img/svg/lefttoolbar/window.svg +12 -0
  825. package/lib/assets/img/svg/logo.svg +11 -0
  826. package/lib/assets/img/svg/logo_with_text.svg +25 -0
  827. package/lib/assets/img/svg/menubar/login.svg +84 -0
  828. package/lib/assets/img/svg/menubar/my_projects.svg +85 -0
  829. package/lib/assets/img/svg/menubar/new_project.svg +110 -0
  830. package/lib/assets/img/svg/menubar/save_project.svg +84 -0
  831. package/lib/assets/img/svg/options.svg +3 -0
  832. package/lib/assets/img/svg/positioning.svg +3 -0
  833. package/lib/assets/img/svg/rotate.png +0 -0
  834. package/lib/assets/img/svg/rotate.svg +17 -0
  835. package/lib/assets/img/svg/rotate_object_clockwise.svg +26 -0
  836. package/lib/assets/img/svg/rotate_object_counterclockwise.svg +26 -0
  837. package/lib/assets/img/svg/toggleFilters.svg +19 -0
  838. package/lib/assets/img/svg/toolbar/add_appliances_active.svg +64 -0
  839. package/lib/assets/img/svg/toolbar/add_appliances_inactive.svg +52 -0
  840. package/lib/assets/img/svg/toolbar/add_button.svg +36 -0
  841. package/lib/assets/img/svg/toolbar/add_cabinets_active.svg +59 -0
  842. package/lib/assets/img/svg/toolbar/add_cabinets_inactive.svg +49 -0
  843. package/lib/assets/img/svg/toolbar/add_items_doors.svg +25 -0
  844. package/lib/assets/img/svg/toolbar/add_items_doorways.svg +24 -0
  845. package/lib/assets/img/svg/toolbar/add_items_refrigerator.svg +32 -0
  846. package/lib/assets/img/svg/toolbar/add_items_windows.svg +28 -0
  847. package/lib/assets/img/svg/toolbar/apply_button.svg +38 -0
  848. package/lib/assets/img/svg/toolbar/arrow-plus.svg +11 -0
  849. package/lib/assets/img/svg/toolbar/backsplash.svg +8 -0
  850. package/lib/assets/img/svg/toolbar/cancel_button.svg +37 -0
  851. package/lib/assets/img/svg/toolbar/consult_a_designer_button.svg +47 -0
  852. package/lib/assets/img/svg/toolbar/countertop.svg +7 -0
  853. package/lib/assets/img/svg/toolbar/dcm.png +0 -0
  854. package/lib/assets/img/svg/toolbar/dcm_off.svg +12 -0
  855. package/lib/assets/img/svg/toolbar/dcm_on.svg +474 -0
  856. package/lib/assets/img/svg/toolbar/delete_button.svg +37 -0
  857. package/lib/assets/img/svg/toolbar/download.svg +77 -0
  858. package/lib/assets/img/svg/toolbar/draw_custom_floor.svg +31 -0
  859. package/lib/assets/img/svg/toolbar/edit_button.svg +75 -0
  860. package/lib/assets/img/svg/toolbar/email_quote_button.svg +44 -0
  861. package/lib/assets/img/svg/toolbar/fbm.png +0 -0
  862. package/lib/assets/img/svg/toolbar/finishing_touches_active.svg +54 -0
  863. package/lib/assets/img/svg/toolbar/finishing_touches_inactive.svg +42 -0
  864. package/lib/assets/img/svg/toolbar/floorstyle.svg +9 -0
  865. package/lib/assets/img/svg/toolbar/fmb.png +0 -0
  866. package/lib/assets/img/svg/toolbar/fmb_off.svg +12 -0
  867. package/lib/assets/img/svg/toolbar/fmb_on.svg +489 -0
  868. package/lib/assets/img/svg/toolbar/furnishings_icon.svg +6 -0
  869. package/lib/assets/img/svg/toolbar/get_started_button.svg +41 -0
  870. package/lib/assets/img/svg/toolbar/handles.svg +5 -0
  871. package/lib/assets/img/svg/toolbar/lighting.svg +7 -0
  872. package/lib/assets/img/svg/toolbar/lrm.png +0 -0
  873. package/lib/assets/img/svg/toolbar/lrm_off.svg +12 -0
  874. package/lib/assets/img/svg/toolbar/lrm_on.svg +470 -0
  875. package/lib/assets/img/svg/toolbar/make_floorplan_active.svg +66 -0
  876. package/lib/assets/img/svg/toolbar/make_floorplan_inactive.svg +52 -0
  877. package/lib/assets/img/svg/toolbar/predefined_room_l_shaped.svg +20 -0
  878. package/lib/assets/img/svg/toolbar/predefined_room_layout.svg +20 -0
  879. package/lib/assets/img/svg/toolbar/predefined_room_long_narrow.svg +20 -0
  880. package/lib/assets/img/svg/toolbar/predefined_room_open_l_shape.svg +20 -0
  881. package/lib/assets/img/svg/toolbar/predefined_room_open_pentagon.svg +20 -0
  882. package/lib/assets/img/svg/toolbar/predefined_room_open_rectangle.svg +20 -0
  883. package/lib/assets/img/svg/toolbar/predefined_room_open_rectangle_2.svg +20 -0
  884. package/lib/assets/img/svg/toolbar/predefined_room_pentagon.svg +20 -0
  885. package/lib/assets/img/svg/toolbar/predefined_room_rectangle.svg +20 -0
  886. package/lib/assets/img/svg/toolbar/predefined_room_rectangle_with_alcove.svg +20 -0
  887. package/lib/assets/img/svg/toolbar/redo_button.svg +75 -0
  888. package/lib/assets/img/svg/toolbar/redo_button1.svg +75 -0
  889. package/lib/assets/img/svg/toolbar/review_quote_active.svg +14 -0
  890. package/lib/assets/img/svg/toolbar/review_quote_inactive.svg +44 -0
  891. package/lib/assets/img/svg/toolbar/save_project_button.svg +44 -0
  892. package/lib/assets/img/svg/toolbar/select_doorstyle_active.svg +67 -0
  893. package/lib/assets/img/svg/toolbar/select_doorstyle_inactive.svg +57 -0
  894. package/lib/assets/img/svg/toolbar/shopping-cart.svg +13 -0
  895. package/lib/assets/img/svg/toolbar/style_change_button.svg +47 -0
  896. package/lib/assets/img/svg/toolbar/take_picture.svg +75 -0
  897. package/lib/assets/img/svg/toolbar/undo_button.svg +76 -0
  898. package/lib/assets/img/svg/toolbar/undo_button1.svg +76 -0
  899. package/lib/assets/img/svg/toolbar/use_button.svg +37 -0
  900. package/lib/assets/img/svg/toolbar/wall_color_icon.svg +6 -0
  901. package/lib/assets/img/svg/topbar/edit_active.svg +10 -0
  902. package/lib/assets/img/svg/topbar/edit_inactive.svg +10 -0
  903. package/lib/assets/img/svg/topbar/redo_active.svg +42 -0
  904. package/lib/assets/img/svg/topbar/redo_inactive.svg +23 -0
  905. package/lib/assets/img/svg/topbar/select_all_active.svg +50 -0
  906. package/lib/assets/img/svg/topbar/select_all_inactive.svg +32 -0
  907. package/lib/assets/img/svg/topbar/take_picture_active.svg +51 -0
  908. package/lib/assets/img/svg/topbar/take_picture_inactive.svg +26 -0
  909. package/lib/assets/img/svg/topbar/undo_active.svg +42 -0
  910. package/lib/assets/img/svg/topbar/undo_inactive.svg +23 -0
  911. package/lib/assets/img/svg/warning_info_2d.svg +81 -0
  912. package/lib/assets/img/svg/window/Clear.svg +3 -0
  913. package/lib/assets/img/svg/window/Cross.svg +5 -0
  914. package/lib/assets/img/svg/window/Double_hung.svg +4 -0
  915. package/lib/assets/img/svg/window/Vertical.svg +4 -0
  916. package/lib/assets/img/svg/windows_clear.svg +23 -0
  917. package/lib/assets/img/svg/windows_cross.svg +28 -0
  918. package/lib/assets/img/svg/windows_double_hung.svg +24 -0
  919. package/lib/assets/img/svg/windows_vertical.svg +24 -0
  920. package/lib/assets/img/svg/wizardstep/Custom.svg +3 -0
  921. package/lib/assets/img/svg/wizardstep/Dashed_line.svg +3 -0
  922. package/lib/assets/img/svg/wizardstep/L.svg +3 -0
  923. package/lib/assets/img/svg/wizardstep/L2.svg +3 -0
  924. package/lib/assets/img/svg/wizardstep/Open.svg +3 -0
  925. package/lib/assets/img/svg/wizardstep/Square.svg +3 -0
  926. package/lib/assets/img/svg/wizardstep/bar-active.svg +9 -0
  927. package/lib/assets/img/svg/wizardstep/bar-normal.svg +3 -0
  928. package/lib/assets/img/svg/wizardstep/bullet-current.svg +3 -0
  929. package/lib/assets/img/svg/wizardstep/bullet-done.svg +3 -0
  930. package/lib/assets/img/svg/wizardstep/bullet-not-done.svg +3 -0
  931. package/lib/assets/img/svg/wizardstep/check-active.svg +3 -0
  932. package/lib/assets/img/svg/wizardstep/check-normal.svg +3 -0
  933. package/lib/assets/img/svg/wizardstep/detail_view.svg +87 -0
  934. package/lib/assets/img/svg/wizardstep/pencil.svg +11 -0
  935. package/lib/assets/img/svg/wizardstep/tile_view.svg +95 -0
  936. package/lib/assets/img/texture/glass.jpg +0 -0
  937. package/lib/assets/img/texture/steel.jpg +0 -0
  938. package/lib/assets/img/texture/white1px.jpg +0 -0
  939. package/lib/assets/img/texture/wood.jpg +0 -0
  940. package/lib/assets/model/DCM.bin +0 -0
  941. package/lib/assets/model/DCM.fbx +0 -0
  942. package/lib/assets/model/DCM.gltf +1 -0
  943. package/lib/assets/model/FBM.bin +0 -0
  944. package/lib/assets/model/FBM.fbx +0 -0
  945. package/lib/assets/model/FBM.gltf +1 -0
  946. package/lib/assets/model/LRM.bin +0 -0
  947. package/lib/assets/model/LRM.fbx +0 -0
  948. package/lib/assets/model/LRM.gltf +1 -0
  949. package/lib/assets/rtastore_logo.png +0 -0
  950. package/lib/catalog/areas/area/planner-element.js +53 -0
  951. package/lib/catalog/areas/area/textures/ceramic-tile.jpg +0 -0
  952. package/lib/catalog/areas/area/textures/grass.jpg +0 -0
  953. package/lib/catalog/areas/area/textures/parquet.jpg +0 -0
  954. package/lib/catalog/areas/area/textures/strand-porcelain.jpg +0 -0
  955. package/lib/catalog/areas/area/textures/tile1.jpg +0 -0
  956. package/lib/catalog/back.png +0 -0
  957. package/lib/catalog/catalog.js +272 -0
  958. package/lib/catalog/doors.png +0 -0
  959. package/lib/catalog/doorways.png +0 -0
  960. package/lib/catalog/envMap/nx.hdr +0 -0
  961. package/lib/catalog/envMap/ny.hdr +0 -0
  962. package/lib/catalog/envMap/nz.hdr +0 -0
  963. package/lib/catalog/envMap/px.hdr +0 -0
  964. package/lib/catalog/envMap/py.hdr +0 -0
  965. package/lib/catalog/envMap/pz.hdr +0 -0
  966. package/lib/catalog/export.js +1 -0
  967. package/lib/catalog/factories/area-factory-3d.js +190 -0
  968. package/lib/catalog/factories/area-factory.js +88 -0
  969. package/lib/catalog/factories/export.js +25 -0
  970. package/lib/catalog/factories/wall-factory-3d.js +212 -0
  971. package/lib/catalog/factories/wall-factory.js +279 -0
  972. package/lib/catalog/holes/door-closet/planner-element.js +232 -0
  973. package/lib/catalog/holes/door-double/door_double.png +0 -0
  974. package/lib/catalog/holes/door-double/planner-element.js +325 -0
  975. package/lib/catalog/holes/door-exterior/planner-element.js +225 -0
  976. package/lib/catalog/holes/door-interior/planner-element.js +237 -0
  977. package/lib/catalog/holes/door-panic/panicDoor.png +0 -0
  978. package/lib/catalog/holes/door-panic/planner-element.js +513 -0
  979. package/lib/catalog/holes/door-panic-double/panicDoorDouble.png +0 -0
  980. package/lib/catalog/holes/door-panic-double/planner-element.js +473 -0
  981. package/lib/catalog/holes/door-sliding/planner-element.js +235 -0
  982. package/lib/catalog/holes/doorway-framed/planner-element.js +155 -0
  983. package/lib/catalog/holes/doorway-frameless/planner-element.js +114 -0
  984. package/lib/catalog/holes/export.js +97 -0
  985. package/lib/catalog/holes/gate/gate.jpg +0 -0
  986. package/lib/catalog/holes/window-clear/planner-element.js +176 -0
  987. package/lib/catalog/holes/window-clear/texture.png +0 -0
  988. package/lib/catalog/holes/window-cross/planner-element.js +175 -0
  989. package/lib/catalog/holes/window-cross/texture.png +0 -0
  990. package/lib/catalog/holes/window-double-hung/planner-element.js +313 -0
  991. package/lib/catalog/holes/window-double-hung/texture.png +0 -0
  992. package/lib/catalog/holes/window-vertical/planner-element.js +286 -0
  993. package/lib/catalog/holes/window-vertical/texture.png +0 -0
  994. package/lib/catalog/lines/wall/planner-element.js +87 -0
  995. package/lib/catalog/lines/wall/textures/bricks-normal.jpg +0 -0
  996. package/lib/catalog/lines/wall/textures/bricks-normal2.jpg +0 -0
  997. package/lib/catalog/lines/wall/textures/bricks.jpg +0 -0
  998. package/lib/catalog/lines/wall/textures/bricks2.jpg +0 -0
  999. package/lib/catalog/lines/wall/textures/bricks3.jpg +0 -0
  1000. package/lib/catalog/lines/wall/textures/morden-normal.jpg +0 -0
  1001. package/lib/catalog/lines/wall/textures/morden.jpg +0 -0
  1002. package/lib/catalog/lines/wall/textures/painted-normal.jpg +0 -0
  1003. package/lib/catalog/lines/wall/textures/painted.jpg +0 -0
  1004. package/lib/catalog/lines/wall/textures/plaster-normal.jpg +0 -0
  1005. package/lib/catalog/lines/wall/textures/plaster.jpg +0 -0
  1006. package/lib/catalog/lines/wall/wall.png +0 -0
  1007. package/lib/catalog/molding/molding-dcm/planner-element.js +33 -0
  1008. package/lib/catalog/molding/molding-dcm/texture.png +0 -0
  1009. package/lib/catalog/molding/molding-fbm/planner-element.js +33 -0
  1010. package/lib/catalog/molding/molding-fbm/texture.png +0 -0
  1011. package/lib/catalog/molding/molding-lrm/planner-element.js +33 -0
  1012. package/lib/catalog/molding/molding-lrm/texture.png +0 -0
  1013. package/lib/catalog/properties/export.js +81 -0
  1014. package/lib/catalog/properties/property-checkbox.js +76 -0
  1015. package/lib/catalog/properties/property-color.js +47 -0
  1016. package/lib/catalog/properties/property-enum.js +58 -0
  1017. package/lib/catalog/properties/property-hidden.js +27 -0
  1018. package/lib/catalog/properties/property-lenght-measure.js +108 -0
  1019. package/lib/catalog/properties/property-length-measure.js +92 -0
  1020. package/lib/catalog/properties/property-length-measure_hole.js +108 -0
  1021. package/lib/catalog/properties/property-number.js +56 -0
  1022. package/lib/catalog/properties/property-read-only.js +34 -0
  1023. package/lib/catalog/properties/property-string.js +56 -0
  1024. package/lib/catalog/properties/property-toggle.js +47 -0
  1025. package/lib/catalog/properties/shared-property-style.js +21 -0
  1026. package/lib/catalog/utils/FuseUtils.js +87 -0
  1027. package/lib/catalog/utils/exporter.js +157 -0
  1028. package/lib/catalog/utils/geom-utils.js +205 -0
  1029. package/lib/catalog/utils/item-loader.js +1608 -0
  1030. package/lib/catalog/utils/load-obj.js +99 -0
  1031. package/lib/catalog/utils/mtl-loader.js +366 -0
  1032. package/lib/catalog/utils/obj-loader.js +486 -0
  1033. package/lib/catalog/windows.png +0 -0
  1034. package/lib/class/FuseUtils.js +87 -0
  1035. package/lib/class/area.js +148 -0
  1036. package/lib/class/export.js +96 -0
  1037. package/lib/class/group.js +438 -0
  1038. package/lib/class/guide.js +64 -0
  1039. package/lib/class/hole.js +932 -0
  1040. package/lib/class/item.js +1852 -0
  1041. package/lib/class/layer.js +670 -0
  1042. package/lib/class/line.js +1230 -0
  1043. package/lib/class/project.js +804 -0
  1044. package/lib/class/vertex.js +205 -0
  1045. package/lib/components/content.js +142 -0
  1046. package/lib/components/export.js +7 -0
  1047. package/lib/components/style/button.js +115 -0
  1048. package/lib/components/style/cancel-button.js +29 -0
  1049. package/lib/components/style/content-container.js +38 -0
  1050. package/lib/components/style/content-title.js +35 -0
  1051. package/lib/components/style/delete-button.js +34 -0
  1052. package/lib/components/style/export.js +121 -0
  1053. package/lib/components/style/form-block.js +28 -0
  1054. package/lib/components/style/form-color-input.js +34 -0
  1055. package/lib/components/style/form-label.js +30 -0
  1056. package/lib/components/style/form-number-input.js +192 -0
  1057. package/lib/components/style/form-number-input_2.js +209 -0
  1058. package/lib/components/style/form-select.js +29 -0
  1059. package/lib/components/style/form-slider.js +68 -0
  1060. package/lib/components/style/form-submit-button.js +35 -0
  1061. package/lib/components/style/form-text-input.js +78 -0
  1062. package/lib/components/viewer2d/area.js +89 -0
  1063. package/lib/components/viewer2d/export.js +121 -0
  1064. package/lib/components/viewer2d/grids/grid-horizontal-streak.js +44 -0
  1065. package/lib/components/viewer2d/grids/grid-streak.js +44 -0
  1066. package/lib/components/viewer2d/grids/grid-vertical-streak.js +44 -0
  1067. package/lib/components/viewer2d/grids/grids.js +40 -0
  1068. package/lib/components/viewer2d/group.js +63 -0
  1069. package/lib/components/viewer2d/item.js +457 -0
  1070. package/lib/components/viewer2d/layer.js +172 -0
  1071. package/lib/components/viewer2d/line.js +975 -0
  1072. package/lib/components/viewer2d/ruler.js +87 -0
  1073. package/lib/components/viewer2d/rulerDist.js +140 -0
  1074. package/lib/components/viewer2d/rulerX.js +154 -0
  1075. package/lib/components/viewer2d/rulerY.js +156 -0
  1076. package/lib/components/viewer2d/scene.js +137 -0
  1077. package/lib/components/viewer2d/snap.js +84 -0
  1078. package/lib/components/viewer2d/state.js +83 -0
  1079. package/lib/components/viewer2d/utils.js +200 -0
  1080. package/lib/components/viewer2d/vertex.js +75 -0
  1081. package/lib/components/viewer2d/viewer2d.js +1444 -0
  1082. package/lib/components/viewer3d/camera-controls-module/camera-controls.module.js +2591 -0
  1083. package/lib/components/viewer3d/dcm.js +408 -0
  1084. package/lib/components/viewer3d/fbm.js +421 -0
  1085. package/lib/components/viewer3d/front3D.js +71 -0
  1086. package/lib/components/viewer3d/grid-creator.js +35 -0
  1087. package/lib/components/viewer3d/grids/grid-horizontal-streak.js +45 -0
  1088. package/lib/components/viewer3d/grids/grid-streak.js +36 -0
  1089. package/lib/components/viewer3d/grids/grid-vertical-streak.js +45 -0
  1090. package/lib/components/viewer3d/libs/first-person-controls.js +74 -0
  1091. package/lib/components/viewer3d/libs/helvetiker_regular.typeface.js +1287 -0
  1092. package/lib/components/viewer3d/libs/mtl-loader.js +366 -0
  1093. package/lib/components/viewer3d/libs/obj-loader.js +471 -0
  1094. package/lib/components/viewer3d/libs/orbit-controls.js +706 -0
  1095. package/lib/components/viewer3d/libs/pointer-lock-controls.js +53 -0
  1096. package/lib/components/viewer3d/lrm.js +312 -0
  1097. package/lib/components/viewer3d/model.js +714 -0
  1098. package/lib/components/viewer3d/pointer-lock-navigation.js +122 -0
  1099. package/lib/components/viewer3d/ruler-utils/itemRect.js +69 -0
  1100. package/lib/components/viewer3d/ruler-utils/layer3D.js +503 -0
  1101. package/lib/components/viewer3d/ruler-utils/ruler3D.js +232 -0
  1102. package/lib/components/viewer3d/ruler-utils/scene3D.js +67 -0
  1103. package/lib/components/viewer3d/ruler-utils/state3D.js +26 -0
  1104. package/lib/components/viewer3d/scene-creator.js +3652 -0
  1105. package/lib/components/viewer3d/three-memory-cleaner.js +60 -0
  1106. package/lib/components/viewer3d/viewer3d-first-person.js +316 -0
  1107. package/lib/components/viewer3d/viewer3d.js +2661 -0
  1108. package/lib/constants.js +697 -0
  1109. package/lib/devLiteRenderer.js +320 -0
  1110. package/lib/index.js +64 -0
  1111. package/lib/models.js +513 -0
  1112. package/lib/plugins/SVGLoader.js +1417 -0
  1113. package/lib/plugins/console-debugger.js +42 -0
  1114. package/lib/plugins/export.js +25 -0
  1115. package/lib/plugins/keyboard.js +108 -0
  1116. package/lib/reducers/areas-reducer.js +19 -0
  1117. package/lib/reducers/export.js +97 -0
  1118. package/lib/reducers/groups-reducer.js +45 -0
  1119. package/lib/reducers/holes-reducer.js +69 -0
  1120. package/lib/reducers/items-reducer.js +151 -0
  1121. package/lib/reducers/lines-reducer.js +52 -0
  1122. package/lib/reducers/project-reducer.js +138 -0
  1123. package/lib/reducers/reducer.js +26 -0
  1124. package/lib/reducers/scene-reducer.js +35 -0
  1125. package/lib/reducers/user-reducer.js +48 -0
  1126. package/lib/reducers/vertices-reducer.js +26 -0
  1127. package/lib/reducers/viewer2d-reducer.js +82 -0
  1128. package/lib/reducers/viewer3d-reducer.js +63 -0
  1129. package/lib/shared-style.js +72 -0
  1130. package/lib/styles/export.js +13 -0
  1131. package/lib/styles/tabs.css +40 -0
  1132. package/lib/translator/en.js +111 -0
  1133. package/lib/translator/it.js +86 -0
  1134. package/lib/translator/ru.js +86 -0
  1135. package/lib/translator/translator.js +87 -0
  1136. package/lib/utils/browser.js +40 -0
  1137. package/lib/utils/convert-units-lite.js +35 -0
  1138. package/lib/utils/email-validator.js +10 -0
  1139. package/lib/utils/export.js +56 -0
  1140. package/lib/utils/geometry.js +2545 -0
  1141. package/lib/utils/get-edges-of-subgraphs.js +33 -0
  1142. package/lib/utils/graph-cycles.js +239 -0
  1143. package/lib/utils/graph-inner-cycles.js +54 -0
  1144. package/lib/utils/graph.js +153 -0
  1145. package/lib/utils/helper.js +358 -0
  1146. package/lib/utils/history.js +36 -0
  1147. package/lib/utils/id-broker.js +22 -0
  1148. package/lib/utils/isolate-event-handler.js +691 -0
  1149. package/lib/utils/logger.js +14 -0
  1150. package/lib/utils/math.js +57 -0
  1151. package/lib/utils/molding.js +890 -0
  1152. package/lib/utils/name-generator.js +21 -0
  1153. package/lib/utils/objects-utils.js +62 -0
  1154. package/lib/utils/phone-validator.js +10 -0
  1155. package/lib/utils/process-black-list.js +22 -0
  1156. package/lib/utils/react-if.js +25 -0
  1157. package/lib/utils/snap-scene.js +101 -0
  1158. package/lib/utils/snap.js +245 -0
  1159. package/lib/utils/summarizeCart.js +30 -0
  1160. package/lib/utils/threeCSG.es6.js +504 -0
  1161. package/lib/version.js +7 -0
  1162. package/package.json +93 -86
  1163. package/dist/index.js +0 -3
  1164. package/dist/index.js.LICENSE.txt +0 -55
  1165. package/dist/index.js.map +0 -1
@@ -0,0 +1,1852 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports["default"] = void 0;
8
+ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
9
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
11
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
12
+ var _convertUnitsLite = require("../utils/convert-units-lite");
13
+ var _export = require("./export");
14
+ var _export2 = require("../utils/export");
15
+ var _immutable = require("immutable");
16
+ var _constants = require("../constants");
17
+ var _helper = require("../utils/helper");
18
+ var _util = require("util");
19
+ var _molding = require("../utils/molding");
20
+ var _utils = require("../components/viewer2d/utils");
21
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
22
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
23
+ var allItemRect;
24
+ var allItemSnap;
25
+ var allLines;
26
+ var allLineRects;
27
+ var allLineSnap;
28
+ var allRect;
29
+ var time1;
30
+ var time2;
31
+ var Item = exports["default"] = /*#__PURE__*/function () {
32
+ function Item() {
33
+ (0, _classCallCheck2["default"])(this, Item);
34
+ }
35
+ return (0, _createClass2["default"])(Item, null, [{
36
+ key: "create",
37
+ value: function create(state, layerID, type, x, y, width, height, rotation, isDuplication) {
38
+ var molding = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : [];
39
+ var itemID = _export2.IDBroker.acquireID();
40
+ var item = state.catalog.factoryElement(type, {
41
+ id: itemID,
42
+ itemID: state.catalog.getIn(['elements', type, 'itemID']),
43
+ name: _export2.NameGenerator.generateName('items', state.catalog.getIn(['elements', type, 'info', 'title'])),
44
+ sku_number: state.catalog.getIn(['elements', type, 'obj']).toJS().sku_number,
45
+ //style: state.catalog.getIn(['elements', type, 'info', 'door']),
46
+ category: state.catalog.getIn(['elements', type, 'type']),
47
+ layoutpos: state.catalog.getIn(['elements', type, 'info', 'layoutpos']),
48
+ cabinet_category: state.catalog.getIn(['elements', type, 'obj']).toJS().cabinet_category,
49
+ type: type,
50
+ height: height,
51
+ width: width,
52
+ x: x,
53
+ y: y,
54
+ rotation: rotation,
55
+ isDuplication: isDuplication
56
+ }, null, state);
57
+ if (item.category === 'cabinet') {
58
+ var _state$doorStyle;
59
+ var layer = state.getIn(['scene', 'layers', layerID]);
60
+ var temp = layer.doorStyle || ((_state$doorStyle = state.doorStyle) === null || _state$doorStyle === void 0 ? void 0 : _state$doorStyle.toJS());
61
+ var cds = state.catalog.getIn(['elements', type, 'cds']);
62
+ if (cds) {
63
+ var updatedDoorStyles = _objectSpread(_objectSpread({}, temp.doorStyles), {}, {
64
+ cds: [cds]
65
+ });
66
+ item = item.merge({
67
+ doorStyle: (0, _immutable.fromJS)(_objectSpread(_objectSpread({}, temp), {}, {
68
+ doorStyles: updatedDoorStyles
69
+ }))
70
+ });
71
+ }
72
+ }
73
+ if (item.get('type') === 'cabinet' && item.get('doorStyle').size === 0) {
74
+ return {
75
+ updatedState: state,
76
+ item: null
77
+ };
78
+ }
79
+ var setSizeOfItemByDoorStyle = function setSizeOfItemByDoorStyle() {
80
+ var doorStyle = item.get('doorStyle').toJS();
81
+ var euroCDS = state.catalog.getIn(['elements', type, 'customer_property']).is_euro_cds;
82
+ if (doorStyle.door_style_name === 'Euro & Frameless' && euroCDS.length > 0) {
83
+ var newProperties = item.get('properties').toJS();
84
+ if (newProperties.hasOwnProperty('depth')) {
85
+ if (!newProperties.hasOwnProperty('oldDepth')) {
86
+ newProperties['oldDepth'] = new _immutable.Map({
87
+ length: newProperties.depth.length,
88
+ _length: newProperties.depth._length,
89
+ _unit: newProperties.depth._unit
90
+ });
91
+ }
92
+ newProperties['depth'] = new _immutable.Map({
93
+ length: (0, _convertUnitsLite.convert)(euroCDS[0].euro_length).from('in').to('cm'),
94
+ _length: euroCDS[0].euro_length,
95
+ _unit: 'in'
96
+ });
97
+ }
98
+ if (newProperties.hasOwnProperty('height')) {
99
+ if (!newProperties.hasOwnProperty('oldHeight')) {
100
+ newProperties['oldHeight'] = new _immutable.Map({
101
+ length: newProperties.height.length,
102
+ _length: newProperties.height._length,
103
+ _unit: newProperties.height._unit
104
+ });
105
+ }
106
+ newProperties['height'] = new _immutable.Map({
107
+ length: (0, _convertUnitsLite.convert)(euroCDS[0].euro_height).from('in').to('cm'),
108
+ _length: euroCDS[0].euro_height,
109
+ _unit: 'in'
110
+ });
111
+ }
112
+ if (newProperties.hasOwnProperty('width')) {
113
+ if (!newProperties.hasOwnProperty('oldWidth')) {
114
+ newProperties['oldWidth'] = new _immutable.Map({
115
+ length: newProperties.width.length,
116
+ _length: newProperties.width._length,
117
+ _unit: newProperties.width._unit
118
+ });
119
+ }
120
+ newProperties['width'] = new _immutable.Map({
121
+ length: (0, _convertUnitsLite.convert)(euroCDS[0].euro_width).from('in').to('cm') - 10,
122
+ _length: euroCDS[0].euro_width,
123
+ _unit: 'in'
124
+ });
125
+ }
126
+ item = item.merge({
127
+ properties: (0, _immutable.fromJS)(newProperties)
128
+ });
129
+ } else {
130
+ var properties = item.get('properties').toJS();
131
+ if (properties.hasOwnProperty('oldDepth')) {
132
+ properties['depth'] = new _immutable.Map({
133
+ length: properties.oldDepth.length,
134
+ _length: properties.oldDepth._length,
135
+ _unit: properties.oldDepth._unit
136
+ });
137
+ }
138
+ if (properties.hasOwnProperty('oldHeight')) {
139
+ properties['height'] = new _immutable.Map({
140
+ length: properties.oldHeight.length,
141
+ _length: properties.oldHeight._length,
142
+ _unit: properties.oldHeight._unit
143
+ });
144
+ }
145
+ if (properties.hasOwnProperty('oldWidth')) {
146
+ properties['width'] = new _immutable.Map({
147
+ length: properties.oldWidth.length,
148
+ _length: properties.oldWidth._length,
149
+ _unit: properties.oldWidth._unit
150
+ });
151
+ }
152
+ item = item.merge({
153
+ properties: (0, _immutable.fromJS)(properties)
154
+ });
155
+ }
156
+ };
157
+ item.category === 'cabinet' && setSizeOfItemByDoorStyle();
158
+ item = this.updateDoorHandle(item, state.getIn(['scene', 'layers', layerID]));
159
+ state = state.setIn(['scene', 'layers', layerID, 'items', itemID], item);
160
+ if (item.type.includes('Light')) {
161
+ var ceilHeight = state.getIn(['scene', 'layers', layerID, 'ceilHeight']);
162
+ var ceilUnit = state.getIn(['scene', 'layers', layerID, 'unit']);
163
+ ceilHeight = (0, _convertUnitsLite.convert)(ceilHeight).from(ceilUnit).to('cm');
164
+ var newAltitude = ceilHeight - item.properties.getIn(['height', 'length']);
165
+ newAltitude = (0, _convertUnitsLite.convert)(newAltitude).from('cm').to(ceilUnit);
166
+ item = item.setIn(['properties', 'altitude', '_length'], newAltitude);
167
+ state = state.setIn(['scene', 'layers', layerID, 'items', item.id], item);
168
+ }
169
+ if (item.category === 'cabinet') {
170
+ // If create a copied object, copied object has original object's molding property.And if create a object, it has a layer's molding property.
171
+ var layerMolding = state.getIn(['scene', 'layers', layerID, 'molding']).filter(function (md) {
172
+ return (0, _molding.hasMoldingLayout)(md, item.layoutpos);
173
+ });
174
+ state = state.setIn(['scene', 'layers', layerID, 'items', itemID, 'molding'], layerMolding.length ? layerMolding : molding);
175
+ }
176
+ return {
177
+ updatedState: state,
178
+ item: item
179
+ };
180
+ }
181
+ }, {
182
+ key: "updateDoorHandle",
183
+ value: function updateDoorHandle(item, layer) {
184
+ var doorHandle = layer.get('doorHandle');
185
+ if (doorHandle == '') return item;
186
+ var dataJSON = item.toJS();
187
+ var itemID = dataJSON.id;
188
+ var doorStyle = dataJSON.doorStyle;
189
+ var tmpDS = _objectSpread(_objectSpread({}, doorStyle), {}, {
190
+ handle_gltf: doorHandle,
191
+ metalness: 0.2,
192
+ roughness: 0.1
193
+ });
194
+ var cnt = 0;
195
+ for (var prop in doorStyle.doorStyles) cnt++;
196
+ if (cnt !== 0) {
197
+ for (var i = 1; i < 10; i++) {
198
+ tmpDS['doorStyles']['door_handle_' + i + '_gltf'] = doorHandle;
199
+ tmpDS['doorStyles']['fixed_drawer_door_handle_' + i + '_gltf'] = doorHandle;
200
+ tmpDS['doorStyles']['drawer_door_handle_' + i + '_gltf'] = doorHandle;
201
+ }
202
+ }
203
+ item = item.mergeIn(['doorStyle'], (0, _immutable.fromJS)(tmpDS));
204
+ return item;
205
+ }
206
+ }, {
207
+ key: "select",
208
+ value: function select(state, layerID, itemID) {
209
+ state = _export.Layer.select(state, layerID).updatedState;
210
+ state = _export.Layer.selectElement(state, layerID, 'items', itemID).updatedState;
211
+ state = state.merge({
212
+ replacingSupport: new _immutable.Map({
213
+ layerID: layerID,
214
+ itemID: itemID
215
+ })
216
+ });
217
+ return {
218
+ updatedState: state
219
+ };
220
+ }
221
+ }, {
222
+ key: "selectHole",
223
+ value: function selectHole(state, layerID, holeID) {
224
+ state = _export.Layer.select(state, layerID).updatedState;
225
+ state = _export.Layer.selectElement(state, layerID, 'holes', holeID).updatedState;
226
+ return {
227
+ updatedState: state
228
+ };
229
+ }
230
+ }, {
231
+ key: "editWidth",
232
+ value: function editWidth(state, newWidth, layerID, itemID) {
233
+ var item = state.getIn(['scene', 'layers', layerID, 'items', itemID]);
234
+ var properties = item.properties;
235
+ if (newWidth === 0) {
236
+ alert('You can not set width to 0');
237
+ return {
238
+ updatedState: state
239
+ };
240
+ }
241
+ var width = new _immutable.Map({
242
+ _length: newWidth,
243
+ _unit: 'in',
244
+ length: (0, _convertUnitsLite.convert)(newWidth).from('in').to('cm')
245
+ });
246
+ properties = properties.set('width', width);
247
+ state = state.mergeIn(['scene', 'layers', layerID, 'items', itemID, 'properties'], properties);
248
+ return {
249
+ updatedState: state
250
+ };
251
+ }
252
+ }, {
253
+ key: "prepareSnap",
254
+ value: function prepareSnap(state, layerID) {
255
+ var layer = state.getIn(['scene', 'layers', layerID]);
256
+ var scene = state.get('scene');
257
+ var catalog = state.catalog.toJS();
258
+ allLines = _export2.GeometryUtils.getAllLines(layer);
259
+ allLineRects = _export2.GeometryUtils.buildRectFromLines(layer, allLines);
260
+ allItemRect = _export2.GeometryUtils.getAllItems(scene, catalog, allLineRects);
261
+ allItemSnap = _export2.GeometryUtils.getAllItemSnap(allItemRect);
262
+ allLineSnap = _export2.GeometryUtils.getAllLineSnap(allLineRects, allItemRect.cur);
263
+ allRect = allItemRect.others.concat(allLineRects);
264
+ allItemSnap = _export2.GeometryUtils.validateSnaps(allItemSnap, allRect);
265
+ allLineSnap = _export2.GeometryUtils.validateSnaps(allLineSnap, allRect);
266
+ }
267
+ }, {
268
+ key: "duplicateSelected",
269
+ value: function duplicateSelected(state, currentObject) {
270
+ var layerID = state.getIn(['scene', 'selectedLayer']);
271
+ var layer = state.getIn(['scene', 'layers', layerID]);
272
+ var objectID = currentObject.id;
273
+ var myObject;
274
+ var x = currentObject.x;
275
+ var y = currentObject.y;
276
+ var sceneComponentType, width, depth, rotRad;
277
+ switch (currentObject.prototype) {
278
+ case 'items':
279
+ myObject = state.getIn(['scene', 'layers', layerID, 'items', objectID]);
280
+ sceneComponentType = myObject.type;
281
+ width = myObject.properties.getIn(['width', 'length']);
282
+ depth = myObject.properties.getIn(['depth', 'length']);
283
+ rotRad = myObject.rotation * Math.PI / 180;
284
+ this.prepareSnap(state, layerID);
285
+ var val = {
286
+ pos: {
287
+ x: x + width * Math.cos(rotRad),
288
+ y: y + width * Math.sin(rotRad)
289
+ },
290
+ rotRad: rotRad
291
+ };
292
+ val.size = allItemRect.cur.size;
293
+ val.layoutpos = allItemRect.cur.layoutpos;
294
+ val.is_corner = allItemRect.cur.is_corner;
295
+ var isrectSect = _export2.GeometryUtils.validInterSect(allRect, val);
296
+ if (isrectSect) {
297
+ // Duplicated object has a original object's molding property
298
+ var _this$create = this.create(state, layerID, sceneComponentType, x + width * Math.cos(rotRad), y + width * Math.sin(rotRad), 200, 100, rotRad * 180 / Math.PI, true, myObject.molding),
299
+ stateI = _this$create.updatedState,
300
+ item = _this$create.item;
301
+ if (item === null) {
302
+ alert('There are no Door Colors in this cabinet.');
303
+ state = state.merge({
304
+ mode: _constants.MODE_IDLE,
305
+ drawingSupport: new _immutable.Map()
306
+ });
307
+ } else {
308
+ state = Item.select(stateI, layerID, item.id).updatedState;
309
+ state = state.setIn(['drawingSupport', 'currentID'], item.id);
310
+ }
311
+ } else {
312
+ var _val = {
313
+ pos: {
314
+ x: x - width * Math.cos(rotRad),
315
+ y: y - width * Math.sin(rotRad)
316
+ },
317
+ rotRad: rotRad
318
+ };
319
+ _val.size = allItemRect.cur.size;
320
+ _val.layoutpos = allItemRect.cur.layoutpos;
321
+ _val.is_corner = allItemRect.cur.is_corner;
322
+ var isRect = _export2.GeometryUtils.validInterSect(allRect, _val);
323
+ if (isRect) {
324
+ var _this$create2 = this.create(state, layerID, sceneComponentType, x - width * Math.cos(rotRad), y - width * Math.sin(rotRad), 200, 100, rotRad * 180 / Math.PI, true, myObject.molding),
325
+ _stateI = _this$create2.updatedState,
326
+ _item = _this$create2.item;
327
+ if (_item === null) {
328
+ alert('There are no Door Colors in this cabinet.');
329
+ state = state.merge({
330
+ mode: _constants.MODE_IDLE,
331
+ drawingSupport: new _immutable.Map()
332
+ });
333
+ } else {
334
+ state = Item.select(_stateI, layerID, _item.id).updatedState;
335
+ state = state.setIn(['drawingSupport', 'currentID'], _item.id);
336
+ }
337
+ } else {
338
+ var _val2 = {
339
+ pos: {
340
+ x: x - depth * Math.sin(rotRad),
341
+ y: y - depth * Math.cos(rotRad)
342
+ },
343
+ rotRad: rotRad
344
+ };
345
+ _val2.size = allItemRect.cur.size;
346
+ _val2.layoutpos = allItemRect.cur.layoutpos;
347
+ _val2.is_corner = allItemRect.cur.is_corner;
348
+ var isRectDown = _export2.GeometryUtils.validInterSect(allRect, _val2);
349
+ if (isRectDown) {
350
+ var _this$create3 = this.create(state, layerID, sceneComponentType, x - depth * Math.sin(rotRad), y - depth * Math.cos(rotRad), 200, 100, rotRad * 180 / Math.PI, true, myObject.molding),
351
+ _stateI2 = _this$create3.updatedState,
352
+ _item2 = _this$create3.item;
353
+ if (_item2 === null) {
354
+ alert('There are no Door Colors in this cabinet.');
355
+ state = state.merge({
356
+ mode: _constants.MODE_IDLE,
357
+ drawingSupport: new _immutable.Map()
358
+ });
359
+ } else {
360
+ state = Item.select(_stateI2, layerID, _item2.id).updatedState;
361
+ state = state.setIn(['drawingSupport', 'currentID'], _item2.id);
362
+ }
363
+ } else {
364
+ var _val3 = {
365
+ pos: {
366
+ x: x + depth * Math.sin(rotRad),
367
+ y: y + depth * Math.cos(rotRad)
368
+ },
369
+ rotRad: rotRad
370
+ };
371
+ _val3.size = allItemRect.cur.size;
372
+ _val3.layoutpos = allItemRect.cur.layoutpos;
373
+ _val3.is_corner = allItemRect.cur.is_corner;
374
+ var isRectUp = _export2.GeometryUtils.validInterSect(allRect, _val3);
375
+ if (isRectUp) {
376
+ var _this$create4 = this.create(state, layerID, sceneComponentType, x + depth * Math.sin(rotRad), y + depth * Math.cos(rotRad), 200, 100, rotRad * 180 / Math.PI, true, myObject.molding),
377
+ _stateI3 = _this$create4.updatedState,
378
+ _item3 = _this$create4.item;
379
+ if (_item3 === null) {
380
+ alert('There are no Door Colors in this cabinet.');
381
+ state = state.merge({
382
+ mode: _constants.MODE_IDLE,
383
+ drawingSupport: new _immutable.Map()
384
+ });
385
+ } else {
386
+ state = Item.select(_stateI3, layerID, _item3.id).updatedState;
387
+ state = state.setIn(['drawingSupport', 'currentID'], _item3.id);
388
+ }
389
+ } else {
390
+ console.log('there is no space');
391
+ alert('No more space!');
392
+ }
393
+ }
394
+ }
395
+ }
396
+ break;
397
+ case 'holes':
398
+ this.prepareSnap(state, layerID);
399
+ myObject = state.getIn(['scene', 'layers', layerID, 'holes', objectID]);
400
+ var line = state.getIn(['scene', 'layers', layerID, 'lines', myObject.line]);
401
+ sceneComponentType = myObject.type;
402
+ width = myObject.get('properties').get('width').get('length');
403
+ var myOffset = myObject.offset;
404
+ var v0 = layer.getIn(['vertices', line.vertices.get(0)]);
405
+ var v1 = layer.getIn(['vertices', line.vertices.get(1)]);
406
+ var lineLength = _export2.GeometryUtils.pointsDistance(v0.x, v0.y, v1.x, v1.y);
407
+ var delta = width / 2 / lineLength + 0.00001;
408
+ var allHoles = state.getIn(['scene', 'layers', layerID, 'holes']);
409
+ var rightAble = true;
410
+ var leftAble = true;
411
+ if (myOffset + 3 * delta > 1) rightAble = false;else if (myOffset - 3 * delta < 0) leftAble = false;
412
+ if (allHoles.size === 0) {
413
+ var _this$createHole = this.createHole(state, layerID, sceneComponentType, myObject.line, myOffset + delta * 2, myObject.get('properties')),
414
+ stateH = _this$createHole.updatedState,
415
+ hole = _this$createHole.hole;
416
+ state = this.selectHole(stateH, layerID, hole.id).updatedState;
417
+ state = state.setIn(['drawingSupport', 'currentID'], hole.id);
418
+ } else {
419
+ allHoles.forEach(function (hole) {
420
+ if (hole.line === line.id) if (!hole.selected) {
421
+ var newDelta = hole.get('properties').get('width').get('length') / 2 / lineLength;
422
+ if (myOffset < hole.offset) {
423
+ if (myOffset + delta * 3 > hole.offset - newDelta) {
424
+ rightAble = false;
425
+ }
426
+ } else {
427
+ if (myOffset - delta * 3 < hole.offset + newDelta) {
428
+ leftAble = false;
429
+ }
430
+ }
431
+ }
432
+ });
433
+ }
434
+ if (rightAble) {
435
+ var _this$createHole2 = this.createHole(state, layerID, sceneComponentType, myObject.line, myOffset + delta * 2, myObject.get('properties')),
436
+ _stateH = _this$createHole2.updatedState,
437
+ _hole = _this$createHole2.hole;
438
+ state = this.selectHole(_stateH, layerID, _hole.id).updatedState;
439
+ state = state.setIn(['drawingSupport', 'currentID'], _hole.id);
440
+ } else {
441
+ if (leftAble) {
442
+ var _this$createHole3 = this.createHole(state, layerID, sceneComponentType, myObject.line, myOffset - delta * 2, myObject.get('properties')),
443
+ _stateH2 = _this$createHole3.updatedState,
444
+ _hole2 = _this$createHole3.hole;
445
+ state = this.selectHole(_stateH2, layerID, _hole2.id).updatedState;
446
+ state = state.setIn(['drawingSupport', 'currentID'], _hole2.id);
447
+ } else alert('No more space');
448
+ }
449
+ break;
450
+ case 'lines':
451
+ alert('Duplicating lines is not currently supported yet.');
452
+ break;
453
+ default:
454
+ break;
455
+ }
456
+ return {
457
+ updatedState: state
458
+ };
459
+ }
460
+ }, {
461
+ key: "storeDistArray",
462
+ value: function storeDistArray(state, layerID, itemID, distArray) {
463
+ var curDistArray = state.getIn(['scene', 'layers', layerID, 'items', itemID, 'distArray']);
464
+ var isEqualDist = function isEqualDist(a, b) {
465
+ return a == b;
466
+ };
467
+ if (curDistArray) {
468
+ var equal = curDistArray.every(function (curElement, index) {
469
+ return isEqualDist(curElement[0], distArray[index][0]);
470
+ });
471
+ if (!equal) {
472
+ state = state.setIn(['scene', 'layers', layerID, 'items', itemID, 'distArray'], distArray);
473
+ }
474
+ }
475
+ return {
476
+ updatedState: state
477
+ };
478
+ }
479
+ }, {
480
+ key: "validateItemPositions",
481
+ value: function validateItemPositions(state, layerID) {
482
+ var _this = this;
483
+ var layer = state.getIn(['scene', 'layers', layerID]);
484
+ function isItemInRect(item) {
485
+ var _state$getIn = state.getIn(['scene']),
486
+ width = _state$getIn.width,
487
+ height = _state$getIn.height;
488
+ return item.x >= 0 && item.x <= width && item.y >= 0 && item.y <= height;
489
+ }
490
+ layer.items.forEach(function (item) {
491
+ if (!isItemInRect(item)) state = _this.remove(state, layerID, item.id).updatedState;
492
+ });
493
+ return {
494
+ updatedState: state
495
+ };
496
+ }
497
+ }, {
498
+ key: "remove",
499
+ value: function remove(state, layerID, itemID) {
500
+ state = this.unselect(state, layerID, itemID).updatedState;
501
+ state = _export.Layer.removeElement(state, layerID, 'items', itemID).updatedState;
502
+ state.getIn(['scene', 'groups']).forEach(function (group) {
503
+ return state = _export.Group.removeElement(state, group.id, layerID, 'items', itemID).updatedState;
504
+ });
505
+ return {
506
+ updatedState: state
507
+ };
508
+ }
509
+ }, {
510
+ key: "replaceItem",
511
+ value: function replaceItem(state, selectedPos, currentObject, selectedObject) {
512
+ state = this.remove(state, state.scene.selectedLayer, selectedPos.selectedItemId).updatedState;
513
+ state = this.create(state, state.scene.selectedLayer, selectedObject.name, selectedPos.x, selectedPos.y, selectedObject.info.width, selectedObject.info.height, selectedPos.rotation, false).updatedState;
514
+ // state = this.select(state, state.scene.selectedLayer, selectedPos.selectedItemId).updatedState;
515
+ return {
516
+ updatedState: state
517
+ };
518
+ }
519
+ }, {
520
+ key: "unselect",
521
+ value: function unselect(state, layerID, itemID) {
522
+ state = _export.Layer.unselect(state, layerID, 'items', itemID).updatedState;
523
+ return {
524
+ updatedState: state
525
+ };
526
+ }
527
+ }, {
528
+ key: "selectToolDrawingItem",
529
+ value: function selectToolDrawingItem(state, sceneComponentType) {
530
+ state = state.merge({
531
+ mode: _constants.MODE_DRAWING_ITEM,
532
+ drawingSupport: new _immutable.Map({
533
+ type: sceneComponentType
534
+ })
535
+ });
536
+ return {
537
+ updatedState: state
538
+ };
539
+ }
540
+ }, {
541
+ key: "selectToolDrawingItem3D",
542
+ value: function selectToolDrawingItem3D(state, sceneComponentType) {
543
+ state = state.merge({
544
+ mode: _constants.MODE_DRAWING_ITEM_3D,
545
+ drawingSupport: new _immutable.Map({
546
+ type: sceneComponentType
547
+ })
548
+ });
549
+ state = state.mergeIn(['scene', 'loadFlag'], false);
550
+
551
+ // place the item at random position
552
+ var layerID = state.scene.get('selectedLayer');
553
+ state = this.updateDrawingItem(state, layerID, 0, 0).updatedState;
554
+ return {
555
+ updatedState: state
556
+ };
557
+ }
558
+ }, {
559
+ key: "endCreatingCabinet",
560
+ value: function endCreatingCabinet(state) {
561
+ state = state.merge({
562
+ isOpen: false,
563
+ openedType: 0
564
+ });
565
+ return {
566
+ updatedState: state
567
+ };
568
+ }
569
+ }, {
570
+ key: "updatePopupOpen",
571
+ value: function updatePopupOpen(state, value) {
572
+ state = state.merge({
573
+ openedType: value
574
+ });
575
+ return {
576
+ updatedState: state
577
+ };
578
+ }
579
+ }, {
580
+ key: "updateDrawingItem",
581
+ value: function updateDrawingItem(state, layerID, x, y) {
582
+ if (state.hasIn(['drawingSupport', 'currentID'])) {
583
+ var mode = state.get('mode');
584
+ if ([_constants.MODE_DRAWING_ITEM_3D].includes(mode)) {
585
+ state = state.updateIn(['scene', 'layers', layerID, 'items', state.getIn(['drawingSupport', 'currentID'])], function (item) {
586
+ return item && item.merge({
587
+ x: x,
588
+ y: y
589
+ });
590
+ });
591
+ state = state.merge({
592
+ mode: _constants.MODE_IDLE_3D
593
+ });
594
+ }
595
+ if ([_constants.MODE_DRAWING_ITEM].includes(mode)) {
596
+ state = state.merge({
597
+ mode: _constants.MODE_IDLE
598
+ });
599
+ state = state.updateIn(['scene', 'layers', layerID, 'items', state.getIn(['drawingSupport', 'currentID'])], function (item) {
600
+ return item && item.merge({
601
+ x: x,
602
+ y: y
603
+ });
604
+ });
605
+ }
606
+ } else {
607
+ var _this$create5 = this.create(state, layerID, state.getIn(['drawingSupport', 'type']), x, y, 200, 100, 0, false),
608
+ stateI = _this$create5.updatedState,
609
+ item = _this$create5.item;
610
+ if (item === null) {
611
+ alert('There are no Door Colors in this cabinet.');
612
+ state = state.merge({
613
+ mode: _constants.MODE_IDLE,
614
+ drawingSupport: new _immutable.Map()
615
+ });
616
+ } else {
617
+ state = Item.select(stateI, layerID, item.id).updatedState;
618
+ state = state.setIn(['drawingSupport', 'currentID'], item.id);
619
+ }
620
+ }
621
+ return {
622
+ updatedState: state
623
+ };
624
+ }
625
+ }, {
626
+ key: "updateDraggingItemChanged",
627
+ value: function updateDraggingItemChanged(state, x, y, layerID, itemID) {
628
+ var _state = state,
629
+ scene = _state.scene;
630
+ // let originalX = draggingSupport.get('originalX');
631
+ // let originalY = draggingSupport.get('originalY');
632
+
633
+ // let diffX = x;
634
+ // let diffY = y;
635
+
636
+ var item = scene.getIn(['layers', layerID, 'items', itemID]);
637
+ // let tX = originalX - diffX;
638
+ // let tY = originalY - diffY;
639
+ // tX = tX > 500 ? 500 : tX < 0 ? 0 : tX;
640
+ // tY = tY > 500 ? 500 : tY < 0 ? 0 : tY;
641
+ item = item.merge({
642
+ x: x,
643
+ y: y
644
+ });
645
+ state = state.merge({
646
+ scene: scene.mergeIn(['layers', layerID, 'items', itemID], item)
647
+ });
648
+ time2 = (0, _helper.debugUtil)();
649
+ false && console.log('FPS:', Math.round(1000 / (time2 - time1)), ' Delta Time:', (time2 - time1) / 1000, '(s)');
650
+ return {
651
+ updatedState: state
652
+ };
653
+ }
654
+ }, {
655
+ key: "endDrawingItem",
656
+ value: function endDrawingItem(state, layerID, x, y) {
657
+ var catalog = state.catalog;
658
+ state = this.updateDrawingItem(state, layerID, x, y, catalog).updatedState;
659
+ state = _export.Layer.unselectAll(state, layerID).updatedState;
660
+ var popup = state.get('popup');
661
+ state = state.merge({
662
+ drawingSupport: (0, _immutable.Map)({
663
+ type: state.drawingSupport.get('type')
664
+ }),
665
+ isOpen: !popup
666
+ });
667
+ state = _export.Layer.unselectAll(state, layerID).updatedState;
668
+ this.updateMolding(state);
669
+ return {
670
+ updatedState: state
671
+ };
672
+ }
673
+ }, {
674
+ key: "beginDraggingItem",
675
+ value: function beginDraggingItem(state, layerID, itemID, x, y) {
676
+ var item = state.getIn(['scene', 'layers', layerID, 'items', itemID]);
677
+ time1 = (0, _helper.debugUtil)();
678
+ if ((0, _util.isUndefined)(item)) return;
679
+ state = state.merge({
680
+ mode: _constants.MODE_DRAGGING_ITEM,
681
+ draggingSupport: (0, _immutable.Map)({
682
+ layerID: layerID,
683
+ itemID: itemID,
684
+ startPointX: x,
685
+ startPointY: y,
686
+ originalX: item.x,
687
+ originalY: item.y
688
+ })
689
+ });
690
+ return {
691
+ updatedState: state
692
+ };
693
+ }
694
+ }, {
695
+ key: "beginDraggingItem3D",
696
+ value: function beginDraggingItem3D(state, layerID, itemID, x, y) {
697
+ var item = state.getIn(['scene', 'layers', layerID, 'items', itemID]);
698
+ state = state.setIn(['scene', 'isEndDragging'], false);
699
+ if ((0, _util.isUndefined)(item)) return {
700
+ updatedState: state
701
+ };
702
+ state = state.merge({
703
+ mode: _constants.MODE_DRAGGING_ITEM_3D,
704
+ draggingSupport: (0, _immutable.Map)({
705
+ layerID: layerID,
706
+ itemID: itemID,
707
+ startPointX: x,
708
+ startPointY: y,
709
+ originalX: item.x,
710
+ originalY: item.y
711
+ })
712
+ });
713
+ return {
714
+ updatedState: state
715
+ };
716
+ }
717
+ }, {
718
+ key: "updateDraggingItem",
719
+ value: function updateDraggingItem(state, x, y) {
720
+ var _state2 = state,
721
+ draggingSupport = _state2.draggingSupport,
722
+ scene = _state2.scene;
723
+ var layerID = draggingSupport.get('layerID');
724
+ var itemID = draggingSupport.get('itemID');
725
+ var startPointX = draggingSupport.get('startPointX');
726
+ var startPointY = draggingSupport.get('startPointY');
727
+ var originalX = draggingSupport.get('originalX');
728
+ var originalY = draggingSupport.get('originalY');
729
+ var diffX = startPointX - x;
730
+ var diffY = startPointY - y;
731
+ var item = scene.getIn(['layers', layerID, 'items', itemID]);
732
+ if ((0, _util.isUndefined)(item)) return {
733
+ updatedState: state
734
+ };
735
+ var tX = originalX - diffX;
736
+ var tY = originalY - diffY;
737
+ tX = tX > scene.width ? scene.width : tX < 0 ? 0 : tX;
738
+ tY = tY > scene.height ? scene.height : tY < 0 ? 0 : tY;
739
+ item = item.merge({
740
+ x: tX,
741
+ y: tY
742
+ });
743
+ state = state.merge({
744
+ scene: scene.mergeIn(['layers', layerID, 'items', itemID], item)
745
+ });
746
+ return {
747
+ updatedState: state
748
+ };
749
+ }
750
+ }, {
751
+ key: "updateDraggingItem3DX",
752
+ value: function updateDraggingItem3DX(state, x) {
753
+ var _state3 = state,
754
+ draggingSupport = _state3.draggingSupport,
755
+ scene = _state3.scene;
756
+ var layerID = draggingSupport.get('layerID');
757
+ var itemID = draggingSupport.get('itemID');
758
+ var startPointX = draggingSupport.get('startPointX');
759
+ var originalX = draggingSupport.get('originalX');
760
+ var diffX = startPointX - x;
761
+ var item = scene.getIn(['layers', layerID, 'items', itemID]);
762
+ item = item.merge({
763
+ x: originalX - diffX
764
+ });
765
+ state = state.merge({
766
+ scene: scene.mergeIn(['layers', layerID, 'items', itemID], item)
767
+ });
768
+ return {
769
+ updatedState: state
770
+ };
771
+ }
772
+ }, {
773
+ key: "updateDraggingItem3DY",
774
+ value: function updateDraggingItem3DY(state, y) {
775
+ var _state4 = state,
776
+ draggingSupport = _state4.draggingSupport,
777
+ scene = _state4.scene;
778
+ var layerID = draggingSupport.get('layerID');
779
+ var itemID = draggingSupport.get('itemID');
780
+ var startPointY = draggingSupport.get('startPointY');
781
+ var originalY = draggingSupport.get('originalY');
782
+ var diffY = startPointY - y;
783
+ var item = scene.getIn(['layers', layerID, 'items', itemID]);
784
+ item = item.merge({
785
+ y: originalY - diffY
786
+ });
787
+ state = state.merge({
788
+ scene: scene.mergeIn(['layers', layerID, 'items', itemID], item)
789
+ });
790
+ return {
791
+ updatedState: state
792
+ };
793
+ }
794
+ }, {
795
+ key: "endDraggingItem",
796
+ value: function endDraggingItem(state, x, y) {
797
+ state = this.updateDraggingItem(state, x, y).updatedState;
798
+ state = state.merge({
799
+ mode: _constants.MODE_IDLE
800
+ });
801
+ return {
802
+ updatedState: state
803
+ };
804
+ }
805
+ }, {
806
+ key: "endDraggingItem3D",
807
+ value: function endDraggingItem3D(state) {
808
+ // state = this.updateDraggingItem(state, x, y).updatedState;
809
+ state = state.merge({
810
+ mode: _constants.MODE_IDLE_3D
811
+ });
812
+ state = state.setIn(['scene', 'isEndDragging'], true);
813
+ return {
814
+ updatedState: state
815
+ };
816
+ }
817
+ }, {
818
+ key: "beginRotatingItem",
819
+ value: function beginRotatingItem(state, layerID, itemID, x, y) {
820
+ var item = state.getIn(['scene', 'layers', layerID, 'items', itemID]);
821
+ var originRotation = item.get('rotation');
822
+ state = state.merge({
823
+ mode: _constants.MODE_ROTATING_ITEM,
824
+ rotatingSupport: (0, _immutable.Map)({
825
+ layerID: layerID,
826
+ itemID: itemID,
827
+ x: x,
828
+ y: y,
829
+ originRotation: originRotation
830
+ })
831
+ });
832
+ return {
833
+ updatedState: state
834
+ };
835
+ }
836
+ }, {
837
+ key: "beginRotatingItem3D",
838
+ value: function beginRotatingItem3D(state, layerID, itemID, x, y) {
839
+ var item = state.getIn(['scene', 'layers', layerID, 'items', itemID]);
840
+ var originRotation = item.get('rotation');
841
+ state = state.merge({
842
+ mode: _constants.MODE_ROTATING_ITEM_3D,
843
+ rotatingSupport: (0, _immutable.Map)({
844
+ layerID: layerID,
845
+ itemID: itemID,
846
+ x: x,
847
+ y: y,
848
+ originRotation: originRotation
849
+ })
850
+ });
851
+ return {
852
+ updatedState: state
853
+ };
854
+ }
855
+ }, {
856
+ key: "updateRotatingItem",
857
+ value: function updateRotatingItem(state, x, y) {
858
+ var _state5 = state,
859
+ rotatingSupport = _state5.rotatingSupport,
860
+ scene = _state5.scene;
861
+ var layerID = rotatingSupport.get('layerID');
862
+ var itemID = rotatingSupport.get('itemID');
863
+ var item = state.getIn(['scene', 'layers', layerID, 'items', itemID]);
864
+ var origin = {
865
+ x: rotatingSupport.get('x'),
866
+ y: rotatingSupport.get('y'),
867
+ originRotation: rotatingSupport.get('originRotation')
868
+ };
869
+ var newRot = Math.atan2(origin.y - item.y, origin.x - item.x) * 180 / Math.PI + 90;
870
+ var deltaRot = newRot - origin.originRotation;
871
+ var deltaX = x - item.x;
872
+ var deltaY = y - item.y;
873
+ var rotation = Math.atan2(deltaY, deltaX) * 180 / Math.PI + 90;
874
+ rotation -= deltaRot;
875
+ if (-5 < rotation && rotation < 5) rotation = 0;
876
+ if (-95 < rotation && rotation < -85) rotation = -90;
877
+ if (-185 < rotation && rotation < -175) rotation = -180;
878
+ if (85 < rotation && rotation < 95) rotation = 90;
879
+ if (-270 < rotation && rotation < -265) rotation = 90;
880
+ if (175 < rotation && rotation < 185) rotation = 180;
881
+ if (265 < rotation && rotation < 275) rotation = -90;
882
+ item = item.merge({
883
+ rotation: rotation
884
+ });
885
+ state = state.merge({
886
+ scene: scene.mergeIn(['layers', layerID, 'items', itemID], item)
887
+ });
888
+ return {
889
+ updatedState: state
890
+ };
891
+ }
892
+ }, {
893
+ key: "updateRotatingItemChanged",
894
+ value: function updateRotatingItemChanged(state, rotation, layerID, itemID) {
895
+ var scene = state.scene;
896
+
897
+ // let originalX = draggingSupport.get('originalX');
898
+ // let originalY = draggingSupport.get('originalY');
899
+
900
+ // let diffX = x;
901
+ // let diffY = y;
902
+
903
+ var item = scene.getIn(['layers', layerID, 'items', itemID]);
904
+ // let tX = originalX - diffX;
905
+ // let tY = originalY - diffY;
906
+ // tX = tX > 500 ? 500 : tX < 0 ? 0 : tX;
907
+ // tY = tY > 500 ? 500 : tY < 0 ? 0 : tY;
908
+ item = item.merge({
909
+ rotation: rotation
910
+ });
911
+ state = state.merge({
912
+ scene: scene.mergeIn(['layers', layerID, 'items', itemID], item)
913
+ });
914
+ return {
915
+ updatedState: state
916
+ };
917
+ }
918
+ }, {
919
+ key: "endRotatingItem",
920
+ value: function endRotatingItem(state, x, y) {
921
+ //state = this.updateRotatingItem(state, x, y).updatedState;
922
+ state = state.merge({
923
+ mode: _constants.MODE_IDLE
924
+ });
925
+ return {
926
+ updatedState: state
927
+ };
928
+ }
929
+ }, {
930
+ key: "endRotatingItem3D",
931
+ value: function endRotatingItem3D(state, x, y) {
932
+ state = this.updateRotatingItem(state, x, y).updatedState;
933
+ state = state.merge({
934
+ mode: _constants.MODE_IDLE_3D
935
+ });
936
+ return {
937
+ updatedState: state
938
+ };
939
+ }
940
+ }, {
941
+ key: "replaceSubmodule",
942
+ value: function replaceSubmodule(state, url) {
943
+ var _state6 = state,
944
+ replacingSupport = _state6.replacingSupport,
945
+ scene = _state6.scene;
946
+ url = 'catalog/texture.png';
947
+ var urlData = url.split('/');
948
+ var newURL = '';
949
+ var addURL = false;
950
+ for (var i = 0; i < urlData.length; i++) {
951
+ if (urlData[i] == '') {
952
+ continue;
953
+ }
954
+ newURL += '/' + urlData[i];
955
+ }
956
+ var layerID = replacingSupport.get('layerID');
957
+ var itemID = replacingSupport.get('itemID');
958
+ var item = state.getIn(['scene', 'layers', layerID, 'items', itemID]);
959
+ var submodule = [];
960
+ var normalMap = [];
961
+ for (var _i = 0; _i < item.submodule.size; _i++) submodule.push(item.submodule.get(_i));
962
+ for (var _i2 = 0; _i2 < item.normalMap.size; _i2++) normalMap.push(item.normalMap.get(_i2));
963
+ //let submodule = state.getIn(['scene', 'layers', layerID, 'items', itemID, 'submodule']);
964
+ urlData = newURL.split('/');
965
+ var flag = false;
966
+ if (urlData[urlData.length - 1].includes('.gltf')) {
967
+ for (var _i3 = 0; _i3 < submodule.length; _i3++) {
968
+ var pathData = submodule[_i3].split('/');
969
+ if (pathData[pathData.length - 2] === urlData[urlData.length - 2]) {
970
+ submodule[_i3] = newURL;
971
+ flag = true;
972
+ }
973
+ }
974
+ if (!flag) submodule.push(newURL);
975
+ item = item.merge({
976
+ submodule: submodule
977
+ });
978
+ } else {
979
+ for (var _i4 = 0; _i4 < normalMap.length; _i4++) {
980
+ var _pathData = normalMap[_i4].split('/');
981
+ if (_pathData[_pathData.length - 2] === urlData[urlData.length - 2]) {
982
+ normalMap[_i4] = newURL;
983
+ flag = true;
984
+ }
985
+ }
986
+ if (!flag) normalMap.push(newURL);
987
+ item = item.merge({
988
+ normalMap: normalMap
989
+ });
990
+ }
991
+ state = state.merge({
992
+ scene: scene.mergeIn(['layers', layerID, 'items', itemID], item)
993
+ });
994
+ state = state.merge({
995
+ mode: _constants.MODE_IDLE_3D
996
+ });
997
+ return {
998
+ updatedState: state
999
+ };
1000
+ }
1001
+ }, {
1002
+ key: "setProperties",
1003
+ value: function setProperties(state, layerID, itemID, properties) {
1004
+ state = state.mergeIn(['scene', 'layers', layerID, 'items', itemID, 'properties'], properties);
1005
+ return {
1006
+ updatedState: state
1007
+ };
1008
+ }
1009
+ }, {
1010
+ key: "setJsProperties",
1011
+ value: function setJsProperties(state, layerID, itemID, properties) {
1012
+ return this.setProperties(state, layerID, itemID, (0, _immutable.fromJS)(properties));
1013
+ }
1014
+ }, {
1015
+ key: "updateProperties",
1016
+ value: function updateProperties(state, layerID, itemID, properties) {
1017
+ properties.forEach(function (v, k) {
1018
+ if (state.hasIn(['scene', 'layers', layerID, 'items', itemID, 'properties', k])) state = state.mergeIn(['scene', 'layers', layerID, 'items', itemID, 'properties', k], v);
1019
+ });
1020
+ return {
1021
+ updatedState: state
1022
+ };
1023
+ }
1024
+ }, {
1025
+ key: "updateJsProperties",
1026
+ value: function updateJsProperties(state, layerID, itemID, properties) {
1027
+ return this.updateProperties(state, layerID, itemID, (0, _immutable.fromJS)(properties));
1028
+ }
1029
+ }, {
1030
+ key: "setAttributes",
1031
+ value: function setAttributes(state, layerID, itemID, itemAttributes) {
1032
+ state = state.mergeIn(['scene', 'layers', layerID, 'items', itemID], itemAttributes);
1033
+ return {
1034
+ updatedState: state
1035
+ };
1036
+ }
1037
+ }, {
1038
+ key: "setJsAttributes",
1039
+ value: function setJsAttributes(state, layerID, itemID, itemAttributes) {
1040
+ itemAttributes = (0, _immutable.fromJS)(itemAttributes);
1041
+ return this.setAttributes(state, layerID, itemID, itemAttributes);
1042
+ }
1043
+ }, {
1044
+ key: "animateObject",
1045
+ value: function animateObject(state, value) {
1046
+ var _state7 = state,
1047
+ replacingSupport = _state7.replacingSupport,
1048
+ scene = _state7.scene;
1049
+ var layerID = replacingSupport.get('layerID');
1050
+ var itemID = replacingSupport.get('itemID');
1051
+ var item = state.getIn(['scene', 'layers', layerID, 'items', itemID]);
1052
+ if (item !== undefined) {
1053
+ var animCount = item.get('animate');
1054
+ item = item.merge({
1055
+ animValue: value,
1056
+ animate: animCount + 1
1057
+ });
1058
+ state = state.merge({
1059
+ scene: scene.mergeIn(['layers', layerID, 'items', itemID], item)
1060
+ });
1061
+ state = state.merge({
1062
+ mode: _constants.MODE_IDLE_3D
1063
+ });
1064
+ }
1065
+ return {
1066
+ updatedState: state
1067
+ };
1068
+ }
1069
+ }, {
1070
+ key: "removeReplacingSupport",
1071
+ value: function removeReplacingSupport(state) {
1072
+ state = state.merge({
1073
+ replacingSupport: new _immutable.Map()
1074
+ });
1075
+ return {
1076
+ updatedState: state
1077
+ };
1078
+ }
1079
+ }, {
1080
+ key: "setInitialDoorStyle",
1081
+ value: function setInitialDoorStyle(state, doorStyle) {
1082
+ state = state.merge({
1083
+ doorStyle: doorStyle
1084
+ });
1085
+ var _state8 = state,
1086
+ scene = _state8.scene;
1087
+ var layerID = scene.get('selectedLayer');
1088
+ var layers = scene.layers.get(layerID);
1089
+ var items = layers.items;
1090
+ items.forEach(function (data) {
1091
+ {
1092
+ var itemID = data.id;
1093
+ var tmpDS = _objectSpread(_objectSpread({}, data.doorStyle), {}, {
1094
+ doorStyles: _objectSpread(_objectSpread({}, data.doorStyle.doorStyles), {}, {
1095
+ counttop: doorStyle.doorStyles.counttop
1096
+ })
1097
+ });
1098
+ data = data.mergeIn(['doorStyle'], (0, _immutable.fromJS)(tmpDS));
1099
+ layers = layers.mergeIn(['items', itemID], data);
1100
+ state = state.merge({
1101
+ scene: scene.mergeIn(['layers', layerID], layers)
1102
+ });
1103
+ }
1104
+ });
1105
+ return {
1106
+ updatedState: state
1107
+ };
1108
+ }
1109
+ }, {
1110
+ key: "setDoorStyle",
1111
+ value: function setDoorStyle(state, doorStyle, itemCDS, isAll) {
1112
+ var _this2 = this;
1113
+ var keys = Object.keys(doorStyle.doorStyles);
1114
+ keys = keys.filter(function (elem) {
1115
+ return !elem.endsWith('_gltf');
1116
+ });
1117
+ var tmp = {};
1118
+ for (var x in keys) {
1119
+ tmp[keys[x]] = doorStyle.doorStyles[keys[x]];
1120
+ }
1121
+ state = state.setIn(['scene', 'layers', state.scene.selectedLayer, 'doorStyle'], doorStyle);
1122
+ state = state.merge({
1123
+ doorStyle: doorStyle
1124
+ });
1125
+ var layerID = state.scene.get('selectedLayer');
1126
+ var temp_layer_molding = state.scene.getIn(['layers', layerID, 'molding']);
1127
+ temp_layer_molding = temp_layer_molding.filter(function (md) {
1128
+ return itemCDS === null || itemCDS === void 0 ? void 0 : itemCDS.some(function (ds) {
1129
+ return md.itemID === ds.itemID;
1130
+ });
1131
+ });
1132
+ state = state.setIn(['scene', 'layers', layerID, 'molding'], temp_layer_molding);
1133
+ var itemIDs = state.scene.layers.getIn([layerID, 'selected', 'items']).toJS();
1134
+ var setDoorStyleOfItem = function setDoorStyleOfItem(data) {
1135
+ var _cds$data;
1136
+ if (data.category !== 'cabinet') return; //CDS should effect to cabinets
1137
+ var itemID = data.id;
1138
+ var curItem = state.getIn(['scene', 'layers', layerID, 'items', itemID]);
1139
+ var layer = state.getIn(['scene', 'layers', layerID]);
1140
+ var tmpMolding = (0, _toConsumableArray2["default"])(curItem.molding);
1141
+ var temp_item_molding = (0, _toConsumableArray2["default"])(curItem.molding);
1142
+ temp_item_molding = temp_item_molding.filter(function (md) {
1143
+ return itemCDS === null || itemCDS === void 0 ? void 0 : itemCDS.some(function (ds) {
1144
+ return ds.itemID === md.itemID;
1145
+ });
1146
+ });
1147
+ tmpMolding.forEach(function (md) {
1148
+ var itemGroup = _export2.MoldingUtils.getItemGroupFromMolding(layer, curItem, md);
1149
+ itemGroup.forEach(function (it) {
1150
+ state = state.setIn(['scene', 'layers', layerID, 'items', it.id, 'molding'], temp_item_molding);
1151
+ });
1152
+ });
1153
+ var cds = itemCDS === null || itemCDS === void 0 ? void 0 : itemCDS.find(function (elem) {
1154
+ return elem.itemID === data.itemID;
1155
+ });
1156
+ var euro_cds = (cds === null || cds === void 0 || (_cds$data = cds.data) === null || _cds$data === void 0 ? void 0 : _cds$data.filter(function (element) {
1157
+ return element && element.is_euro_cds;
1158
+ })) || [];
1159
+ var cds_data = cds ? [cds] : [];
1160
+ if (
1161
+ // doorStyle.door_style_name === 'Euro & Frameless' &&
1162
+ euro_cds.length > 0) {
1163
+ var newProperties = state.scene.getIn(['layers', layerID, 'items', itemID, 'properties']).toJS();
1164
+ if (newProperties.hasOwnProperty('depth')) {
1165
+ if (!newProperties.hasOwnProperty('oldDepth')) {
1166
+ newProperties['oldDepth'] = new _immutable.Map({
1167
+ length: newProperties.depth.length,
1168
+ _length: newProperties.depth._length,
1169
+ _unit: newProperties.depth._unit
1170
+ });
1171
+ }
1172
+ newProperties['depth'] = new _immutable.Map({
1173
+ length: (0, _convertUnitsLite.convert)(euro_cds[0].euro_length).from('in').to('cm'),
1174
+ _length: euro_cds[0].euro_length,
1175
+ _unit: 'in'
1176
+ });
1177
+ }
1178
+ if (newProperties.hasOwnProperty('height')) {
1179
+ if (!newProperties.hasOwnProperty('oldHeight')) {
1180
+ newProperties['oldHeight'] = new _immutable.Map({
1181
+ length: newProperties.height.length,
1182
+ _length: newProperties.height._length,
1183
+ _unit: newProperties.height._unit
1184
+ });
1185
+ }
1186
+ newProperties['height'] = new _immutable.Map({
1187
+ length: (0, _convertUnitsLite.convert)(euro_cds[0].euro_height).from('in').to('cm'),
1188
+ _length: euro_cds[0].euro_height,
1189
+ _unit: 'in'
1190
+ });
1191
+ }
1192
+ if (newProperties.hasOwnProperty('width')) {
1193
+ if (!newProperties.hasOwnProperty('oldWidth')) {
1194
+ newProperties['oldWidth'] = new _immutable.Map({
1195
+ length: newProperties.width.length,
1196
+ _length: newProperties.width._length,
1197
+ _unit: newProperties.width._unit
1198
+ });
1199
+ }
1200
+ newProperties['width'] = new _immutable.Map({
1201
+ length: (0, _convertUnitsLite.convert)(euro_cds[0].euro_width).from('in').to('cm') - 10,
1202
+ _length: euro_cds[0].euro_width,
1203
+ _unit: 'in'
1204
+ });
1205
+ }
1206
+ state = _this2.setJsProperties(state, layerID, itemID, newProperties).updatedState;
1207
+ } else {
1208
+ var properties = state.scene.getIn(['layers', layerID, 'items', itemID, 'properties']).toJS();
1209
+ if (properties.hasOwnProperty('oldDepth')) {
1210
+ properties['depth'] = new _immutable.Map({
1211
+ length: properties.oldDepth.length,
1212
+ _length: properties.oldDepth._length,
1213
+ _unit: properties.oldDepth._unit
1214
+ });
1215
+ }
1216
+ if (properties.hasOwnProperty('oldHeight')) {
1217
+ properties['height'] = new _immutable.Map({
1218
+ length: properties.oldHeight.length,
1219
+ _length: properties.oldHeight._length,
1220
+ _unit: properties.oldHeight._unit
1221
+ });
1222
+ }
1223
+ if (properties.hasOwnProperty('oldWidth')) {
1224
+ properties['width'] = new _immutable.Map({
1225
+ length: properties.oldWidth.length,
1226
+ _length: properties.oldWidth._length,
1227
+ _unit: properties.oldWidth._unit
1228
+ });
1229
+ }
1230
+ state = _this2.setJsProperties(state, layerID, itemID, properties).updatedState;
1231
+ }
1232
+ var tmpDS = {
1233
+ id: doorStyle.id,
1234
+ brightness: doorStyle.brightness,
1235
+ color: doorStyle.color,
1236
+ glossness: doorStyle.glossness,
1237
+ name: doorStyle.name,
1238
+ door_style_name: doorStyle.door_style_name,
1239
+ texture: doorStyle.texture,
1240
+ thumbnail: doorStyle.thumbnail,
1241
+ type: doorStyle.type,
1242
+ sku: doorStyle.sku,
1243
+ color_sku_alias: doorStyle.color_sku_alias,
1244
+ // alias name of color_sku for the current dealer
1245
+ install: (0, _utils.getInstallationSuffix)(_constants.INSTALLATION_SUFFIX_TYPE.NAME, doorStyle),
1246
+ doorStyles: _objectSpread(_objectSpread({}, tmp), {}, {
1247
+ cds: cds_data
1248
+ })
1249
+ };
1250
+ state = state.mergeIn(['scene', 'layers', layerID, 'items', itemID, 'doorStyle'], (0, _immutable.fromJS)(tmpDS));
1251
+ };
1252
+ if (isAll) {
1253
+ var items = state.scene.layers.get(layerID).items;
1254
+ items.forEach(setDoorStyleOfItem);
1255
+ } else {
1256
+ if (itemIDs.length > 0) {
1257
+ var _loop = function _loop() {
1258
+ var itemID = itemIDs[i];
1259
+ var items = state.scene.layers.get(layerID).items;
1260
+ items.forEach(function (data) {
1261
+ if (itemID === data.id) {
1262
+ setDoorStyleOfItem(data);
1263
+ }
1264
+ });
1265
+ };
1266
+ for (var i = 0; i < itemIDs.length; i++) {
1267
+ _loop();
1268
+ }
1269
+ }
1270
+ }
1271
+ return {
1272
+ updatedState: state
1273
+ };
1274
+ }
1275
+ }, {
1276
+ key: "changeDistance",
1277
+ value: function changeDistance(state, distancePayload) {
1278
+ var _state9 = state,
1279
+ scene = _state9.scene;
1280
+ var Left = distancePayload.distanceLeft;
1281
+ var Right = distancePayload.distanceRight;
1282
+ var Back = distancePayload.distanceBack;
1283
+ var Front = distancePayload.distanceFront;
1284
+ var LeftRotRad = Left ? 180 : null;
1285
+ var RightRotRad = Right ? 0 : null;
1286
+ var BackRotRad = Back ? -90 : null;
1287
+ var FrontRotRad = Front ? 90 : null;
1288
+ var directR = LeftRotRad || RightRotRad || BackRotRad || FrontRotRad;
1289
+ var dist = Left || Right || Back || Front;
1290
+ var layerID = scene.get('selectedLayer');
1291
+ var layer = scene.layers.get(layerID).toJS();
1292
+ var selectedItemId = layer.selected.items[0];
1293
+ var selectedItem = layer.items[selectedItemId];
1294
+ if (selectedItem) {
1295
+ var renderedR = selectedItem.rotation || 0;
1296
+ var rotRad = (directR + renderedR) / 180 * Math.PI;
1297
+ var newX = selectedItem.x + (0, _convertUnitsLite.convert)(dist * Math.cos(rotRad)).from('in').to('cm');
1298
+ var newY = selectedItem.y + (0, _convertUnitsLite.convert)(dist * Math.sin(rotRad)).from('in').to('cm');
1299
+ state = state.setIn(['scene', 'layers', layerID, 'items', layer.selected.items[0], 'x'], newX);
1300
+ state = state.setIn(['scene', 'layers', layerID, 'items', layer.selected.items[0], 'y'], newY);
1301
+ }
1302
+ return {
1303
+ updatedState: state
1304
+ };
1305
+ }
1306
+ }, {
1307
+ key: "setCounterTop",
1308
+ value: function setCounterTop(state, counterTop) {
1309
+ var _state0 = state,
1310
+ scene = _state0.scene;
1311
+ var layerID = scene.get('selectedLayer');
1312
+ var layers = scene.layers.get(layerID);
1313
+ layers = layers.mergeIn(['counterTop'], counterTop);
1314
+ state = state.merge({
1315
+ scene: scene.mergeIn(['layers', layerID], layers)
1316
+ });
1317
+ var items = layers.items;
1318
+ items.forEach(function (data) {
1319
+ {
1320
+ var dataJSON = data.toJS();
1321
+ var itemID = dataJSON.id;
1322
+ var newCounter = dataJSON.counterTop;
1323
+ newCounter = _objectSpread(_objectSpread({}, newCounter), counterTop);
1324
+ data = data.mergeIn(['counterTop'], newCounter);
1325
+ layers = layers.mergeIn(['items', itemID], data);
1326
+ state = state.merge({
1327
+ scene: scene.mergeIn(['layers', layerID], layers)
1328
+ });
1329
+ }
1330
+ });
1331
+ return {
1332
+ updatedState: state
1333
+ };
1334
+ }
1335
+ }, {
1336
+ key: "setItemsDoorHandle",
1337
+ value: function setItemsDoorHandle(state, scene, layer, layerID, elements_item) {
1338
+ var _this3 = this;
1339
+ elements_item.forEach(function (data) {
1340
+ var itemID = data.id;
1341
+ var item = _this3.updateDoorHandle(data, layer);
1342
+ layer = layer.mergeIn(['items', itemID], item);
1343
+ state = state.merge({
1344
+ scene: scene.mergeIn(['layers', layerID], layer)
1345
+ });
1346
+ });
1347
+ return {
1348
+ updatedState: state
1349
+ };
1350
+ }
1351
+ }, {
1352
+ key: "setDoorHandle",
1353
+ value: function setDoorHandle(state, doorHandle) {
1354
+ var _state1 = state,
1355
+ scene = _state1.scene;
1356
+ var layerID = scene.get('selectedLayer');
1357
+ var layer = scene.layers.get(layerID);
1358
+ layer = layer.mergeIn(['doorHandle'], doorHandle);
1359
+ state = state.merge({
1360
+ scene: scene.mergeIn(['layers', layerID], layer)
1361
+ });
1362
+ var items = layer.items;
1363
+ var selectedItems = items.filter(function (element) {
1364
+ return element.selected === true;
1365
+ }); // find selected items (default 1 selected)
1366
+
1367
+ if (selectedItems.size === 0) {
1368
+ state = this.setItemsDoorHandle(state, scene, layer, layerID, items).updatedState;
1369
+ } else {
1370
+ state = this.setItemsDoorHandle(state, scene, layer, layerID, selectedItems).updatedState;
1371
+ }
1372
+ return {
1373
+ updatedState: state
1374
+ };
1375
+ }
1376
+ }, {
1377
+ key: "setHandleMaterial",
1378
+ value: function setHandleMaterial(state, material) {
1379
+ var _state10 = state,
1380
+ scene = _state10.scene;
1381
+ var layerID = scene.get('selectedLayer');
1382
+ var layers = scene.layers.get(layerID);
1383
+ var items = layers.items;
1384
+ items.forEach(function (data) {
1385
+ var dataJSON = data.toJS();
1386
+ var itemID = dataJSON.id;
1387
+ var doorStyle = dataJSON.doorStyle;
1388
+ var tmpDS = _objectSpread(_objectSpread({}, doorStyle), {}, {
1389
+ metalness: material.metalness,
1390
+ roughness: material.roughness
1391
+ });
1392
+ data = data.mergeIn(['doorStyle'], (0, _immutable.fromJS)(tmpDS));
1393
+ layers = layers.mergeIn(['items', itemID], data);
1394
+ state = state.merge({
1395
+ scene: scene.mergeIn(['layers', layerID], layers)
1396
+ });
1397
+ });
1398
+ return {
1399
+ updatedState: state
1400
+ };
1401
+ }
1402
+ }, {
1403
+ key: "setWallColor",
1404
+ value: function setWallColor(state, wallColor) {
1405
+ var _state11 = state,
1406
+ scene = _state11.scene;
1407
+ var layerID = scene.get('selectedLayer');
1408
+ var layer = scene.layers.get(layerID);
1409
+ layer = layer.merge({
1410
+ wallColor: wallColor
1411
+ });
1412
+ state = state.merge({
1413
+ scene: scene.mergeIn(['layers', layerID], layer)
1414
+ });
1415
+ var lines = layer.lines;
1416
+ lines.forEach(function (data) {
1417
+ var dataJSON = data.toJS();
1418
+ var lineID = dataJSON.id;
1419
+ data = data.mergeIn(['wallColor'], wallColor);
1420
+ layer = layer.mergeIn(['lines', lineID], data);
1421
+ state = state.merge({
1422
+ scene: scene.mergeIn(['layers', layerID], layer)
1423
+ });
1424
+ });
1425
+ return {
1426
+ updatedState: state
1427
+ };
1428
+ }
1429
+ }, {
1430
+ key: "setBacksplash",
1431
+ value: function setBacksplash(state, backsplash) {
1432
+ var _state12 = state,
1433
+ scene = _state12.scene;
1434
+ var layerID = scene.get('selectedLayer');
1435
+ var layer = scene.layers.get(layerID);
1436
+ var dataJSON = layer.toJS();
1437
+ var newBack = dataJSON.backsplash;
1438
+ var flag = true; // selected or not
1439
+ // if backsplash is already set
1440
+ if (layer.getIn(['backsplash']).uri === backsplash.uri) {
1441
+ // unselect
1442
+ newBack = _objectSpread(_objectSpread({}, newBack), {}, {
1443
+ uri: ''
1444
+ });
1445
+ flag = false;
1446
+ }
1447
+ // else then, set backsplash
1448
+ else newBack = _objectSpread(_objectSpread({}, newBack), backsplash);
1449
+ layer = layer.mergeIn(['backsplash'], newBack);
1450
+ layer = layer.set('backsplashApplied', flag);
1451
+ state = state.merge({
1452
+ scene: scene.mergeIn(['layers', layerID], layer)
1453
+ });
1454
+ return {
1455
+ updatedState: state
1456
+ };
1457
+ }
1458
+ }, {
1459
+ key: "setMolding",
1460
+ value: function setMolding(state, molding, isAll) {
1461
+ var _state13 = state,
1462
+ scene = _state13.scene;
1463
+ var layerID = scene.get('selectedLayer');
1464
+ var layer = scene.layers.get(layerID);
1465
+ if (isAll) {
1466
+ var tempLayerMolding = layer.molding;
1467
+ var flag = tempLayerMolding.some(function (mol) {
1468
+ return mol.name === molding.name;
1469
+ });
1470
+ if (flag) {
1471
+ tempLayerMolding = tempLayerMolding.filter(function (mol) {
1472
+ return mol.name !== molding.name;
1473
+ });
1474
+ } else {
1475
+ if (tempLayerMolding.some(function (mol) {
1476
+ return mol.molding_type === molding.molding_type && mol.location_type === molding.location_type;
1477
+ })) {
1478
+ tempLayerMolding = tempLayerMolding.filter(function (mol) {
1479
+ return mol.molding_type !== molding.molding_type || mol.location_type !== molding.location_type;
1480
+ });
1481
+ }
1482
+ tempLayerMolding = tempLayerMolding.concat(molding);
1483
+ }
1484
+ layer = layer.set('molding', tempLayerMolding);
1485
+ state = state.merge({
1486
+ scene: scene.mergeIn(['layers', layerID], layer)
1487
+ });
1488
+ layer.items.toArray().forEach(function (item) {
1489
+ if (_export2.MoldingUtils.isEnableItemForMolding(layer, item, molding)) {
1490
+ var tempItemMolding = item.molding;
1491
+ if (flag) {
1492
+ if (tempItemMolding.some(function (mol) {
1493
+ return mol.name === molding.name;
1494
+ })) {
1495
+ tempItemMolding = tempItemMolding.filter(function (mol) {
1496
+ return mol.name !== molding.name;
1497
+ });
1498
+ }
1499
+ } else {
1500
+ if (tempItemMolding.some(function (mol) {
1501
+ return mol.molding_type === molding.molding_type && mol.location_type === molding.location_type;
1502
+ })) {
1503
+ tempItemMolding = tempItemMolding.filter(function (mol) {
1504
+ return mol.molding_type !== molding.molding_type || mol.location_type !== molding.location_type;
1505
+ });
1506
+ }
1507
+ tempItemMolding = tempItemMolding.concat(molding);
1508
+ }
1509
+ state = state.setIn(['scene', 'layers', layerID, 'items', item.id, 'molding'], tempItemMolding);
1510
+ }
1511
+ });
1512
+ } else {
1513
+ var selectedItem = layer.getIn(['items', layer.selected.toJS().items[0]]);
1514
+ if (_export2.MoldingUtils.isEnableItemForMolding(layer, selectedItem, molding)) {
1515
+ var moldingGroup = _export2.MoldingUtils.getItemGroupFromMolding(layer, selectedItem, molding);
1516
+ var tempSelItemMolding = selectedItem.molding;
1517
+ var _flag = tempSelItemMolding.some(function (mol) {
1518
+ return mol.name === molding.name;
1519
+ });
1520
+ moldingGroup.forEach(function (item) {
1521
+ var tempItemMolding = item.molding;
1522
+ if (_flag) {
1523
+ if (tempItemMolding.some(function (mol) {
1524
+ return mol.name === molding.name;
1525
+ })) {
1526
+ tempItemMolding = tempItemMolding.filter(function (mol) {
1527
+ return mol.name !== molding.name;
1528
+ });
1529
+ }
1530
+ } else {
1531
+ if (tempItemMolding.some(function (mol) {
1532
+ return mol.molding_type === molding.molding_type && mol.location_type === molding.location_type;
1533
+ })) {
1534
+ tempItemMolding = tempItemMolding.filter(function (mol) {
1535
+ return mol.molding_type !== molding.molding_type || mol.location_type !== molding.location_type;
1536
+ });
1537
+ }
1538
+ tempItemMolding = tempItemMolding.concat(molding);
1539
+ }
1540
+ state = state.setIn(['scene', 'layers', layerID, 'items', item.id, 'molding'], tempItemMolding);
1541
+ });
1542
+ }
1543
+ }
1544
+ return {
1545
+ updatedState: state
1546
+ };
1547
+ }
1548
+ }, {
1549
+ key: "updateMolding",
1550
+ value: function updateMolding(state) {
1551
+ var _state14 = state,
1552
+ scene = _state14.scene;
1553
+ var layerID = scene.get('selectedLayer');
1554
+ var layer = scene.layers.get(layerID);
1555
+ var selectedItem = layer.getIn(['items', layer.selected.toJS().items[0]]);
1556
+ var snappedItemGroup = []; // The array that include snapped items with selected item.
1557
+ if (!!selectedItem && selectedItem.category === 'cabinet') {
1558
+ var itemGroups = [];
1559
+ layer.items.toArray().forEach(function (curItem) {
1560
+ if (selectedItem.id !== curItem.id && curItem.category === 'cabinet') {
1561
+ if (_export2.MoldingUtils.isItemSnappedItem(selectedItem, curItem)) {
1562
+ snappedItemGroup.push(curItem); // add the snapped item.
1563
+ // add the snapped item that has same molding location type, layoutpos and height to itemGroups.
1564
+ if (curItem.molding.length) {
1565
+ curItem.molding.forEach(function (md) {
1566
+ // This code check whether the curItem can be grouped with selected Item in molding.
1567
+ if (_export2.MoldingUtils.tryMergeMDItem(layer, selectedItem, curItem, [selectedItem], md)) {
1568
+ itemGroups.push({
1569
+ base_item: curItem,
1570
+ group: _export2.MoldingUtils.getItemGroupFromMolding(layer, curItem, md),
1571
+ molding: md
1572
+ });
1573
+ }
1574
+ });
1575
+ }
1576
+ }
1577
+ }
1578
+ });
1579
+ var updateSelectItemMolding = function updateSelectItemMolding() {
1580
+ var _loop2 = function _loop2() {
1581
+ // check whether snapped item is same as selected item in layoutpos(Wall, Tall, Base)
1582
+ if (_export2.MoldingUtils.isSameMoldingLayoutpos(selectedItem, snappedItemGroup[i])) {
1583
+ // check whether snapped item is same in location(same location type and height).
1584
+ var delMoldings = [];
1585
+ for (var k = 0; k < selectedItem.molding.length; k++) {
1586
+ if (_export2.MoldingUtils.isItemSameItemByLocation(selectedItem, snappedItemGroup[i], selectedItem.molding[k].location_type)) {
1587
+ delMoldings.push(selectedItem.molding[k].itemID);
1588
+ }
1589
+ }
1590
+ var resultMol = [];
1591
+ selectedItem.molding.forEach(function (mol) {
1592
+ if (!delMoldings.some(function (id) {
1593
+ return id === mol.itemID;
1594
+ })) {
1595
+ resultMol.push(mol);
1596
+ }
1597
+ });
1598
+ state = state.setIn(['scene', 'layers', layerID, 'items', selectedItem.id, 'molding'], resultMol);
1599
+ }
1600
+ };
1601
+ for (var i = 0; i < snappedItemGroup.length; i++) {
1602
+ _loop2();
1603
+ }
1604
+ };
1605
+ var emptyMoldingArray = function emptyMoldingArray() {
1606
+ var temp_items = [selectedItem];
1607
+ var groupMoldings = [];
1608
+ itemGroups.forEach(function (itGroup) {
1609
+ groupMoldings.push(itGroup.molding);
1610
+ itGroup.group.forEach(function (it) {
1611
+ if (!temp_items.some(function (i) {
1612
+ return i.id === it.id;
1613
+ })) {
1614
+ temp_items.push(it);
1615
+ }
1616
+ });
1617
+ });
1618
+ temp_items.forEach(function (item) {
1619
+ var finalMoldings = [];
1620
+ var tempMoldings = state.getIn(['scene', 'layers', layerID, 'items', item.id, 'molding']);
1621
+ tempMoldings.forEach(function (molding) {
1622
+ if (!groupMoldings.some(function (ml) {
1623
+ return ml.itemID === molding.itemID;
1624
+ })) {
1625
+ finalMoldings.push(molding);
1626
+ }
1627
+ });
1628
+ state = state.setIn(['scene', 'layers', layerID, 'items', item.id, 'molding'], finalMoldings);
1629
+ });
1630
+ updateSelectItemMolding();
1631
+ };
1632
+ var setLocationMolding = function setLocationMolding(location) {
1633
+ var locationMolding = itemGroups.filter(function (it) {
1634
+ return it.molding.location_type === location;
1635
+ }).sort(function (a, b) {
1636
+ if (a.group.length === b.group.length) {
1637
+ return _export2.GeometryUtils.pointsDistance(a.base_item.x, a.base_item.y, selectedItem.x, selectedItem.y) - _export2.GeometryUtils.pointsDistance(b.base_item.x, b.base_item.y, selectedItem.x, selectedItem.y);
1638
+ } else {
1639
+ return a.group.length - b.group.length;
1640
+ }
1641
+ });
1642
+ if (locationMolding.length) {
1643
+ var locationMoldingItems = _export2.MoldingUtils.getItemGroupFromMolding(layer, selectedItem, locationMolding[0].molding);
1644
+ locationMoldingItems.forEach(function (item) {
1645
+ var tempMoldings = state.getIn(['scene', 'layers', layerID, 'items', item.id, 'molding']);
1646
+ if (!tempMoldings.some(function (mol) {
1647
+ return mol.itemID === locationMolding[0].molding.itemID;
1648
+ })) tempMoldings.push(locationMolding[0].molding);
1649
+ state = state.setIn(['scene', 'layers', layerID, 'items', item.id, 'molding'], tempMoldings);
1650
+ });
1651
+ }
1652
+ };
1653
+ if (itemGroups.length && layer.items.some(function (it) {
1654
+ return _export2.MoldingUtils.isItemSnappedItem(selectedItem, it) && it.category === 'cabinet';
1655
+ })) {
1656
+ emptyMoldingArray();
1657
+ for (var i = 0; i < _constants.MOLDING_LOCATIONS.length; i++) {
1658
+ setLocationMolding(_constants.MOLDING_LOCATIONS[i]);
1659
+ }
1660
+ } else if (!itemGroups.length && selectedItem.molding.length) {
1661
+ // Delete the selected Item's molding property if selItem attached the group that has no molding.
1662
+ // If snapped items have no moldings and one item's property is same as selected Item, selected Item's molding should be deleted.
1663
+ updateSelectItemMolding();
1664
+ }
1665
+ }
1666
+ return {
1667
+ updatedState: state
1668
+ };
1669
+ }
1670
+ }, {
1671
+ key: "setBacksplashVisible",
1672
+ value: function setBacksplashVisible(state, itemID, backsplashVisible) {
1673
+ var _state15 = state,
1674
+ scene = _state15.scene;
1675
+ var layerID = scene.get('selectedLayer');
1676
+ var layer = scene.layers.get(layerID);
1677
+ layer = layer.mergeIn(['items', itemID, 'backsplashVisible'], backsplashVisible);
1678
+ // let cabinet_category = layer.getIn(["items"], itemID).toJS()[itemID].cabinet_category;
1679
+ // if (cabinet_category && (cabinet_category.search("Sink") !== -1 || cabinet_category.search("End/Angle") !== -1)) {
1680
+ // layer = layer.mergeIn(["items", itemID, "backsplashVisible"], true);
1681
+ // } else {
1682
+ // layer = layer.mergeIn(["items", itemID, "backsplashVisible"], false);
1683
+ // }
1684
+ state = state.merge({
1685
+ scene: scene.mergeIn(['layers', layerID], layer)
1686
+ });
1687
+ return {
1688
+ updatedState: state
1689
+ };
1690
+ }
1691
+ }, {
1692
+ key: "setApplianceMaterial",
1693
+ value: function setApplianceMaterial(state, material) {
1694
+ var _state16 = state,
1695
+ scene = _state16.scene;
1696
+ var layerID = scene.get('selectedLayer');
1697
+ var layers = scene.layers.get(layerID);
1698
+ var items = layers.items;
1699
+ items.forEach(function (data) {
1700
+ var dataJSON = data.toJS();
1701
+ var itemID = dataJSON.id;
1702
+ var newMaterial = {
1703
+ metalness: material.metalness,
1704
+ roughness: material.roughness
1705
+ };
1706
+ data = data.mergeIn(['applianceMaterial'], newMaterial);
1707
+ layers = layers.mergeIn(['items', itemID], data);
1708
+ state = state.merge({
1709
+ scene: scene.mergeIn(['layers', layerID], layers)
1710
+ });
1711
+ });
1712
+ return {
1713
+ updatedState: state
1714
+ };
1715
+ }
1716
+ }, {
1717
+ key: "setModelling",
1718
+ value: function setModelling(state, molding) {
1719
+ var _state17 = state,
1720
+ scene = _state17.scene;
1721
+ var layerID = scene.get('selectedLayer');
1722
+ var layers = scene.layers.get(layerID);
1723
+ var items = layers.items;
1724
+ items.forEach(function (data) {
1725
+ var dataJSON = data.toJS();
1726
+ var itemID = dataJSON.id;
1727
+ });
1728
+ state = state.merge({
1729
+ scene: scene.mergeIn(['layers', layerID], layers)
1730
+ });
1731
+ return {
1732
+ updatedState: state
1733
+ };
1734
+ }
1735
+ }, {
1736
+ key: "updateItemsAltitude",
1737
+ value: function updateItemsAltitude(state, layerID, itemID, value) {
1738
+ var item = state.getIn(['scene', 'layers', layerID, 'items', itemID]);
1739
+ var properties = item.get('properties');
1740
+ var altitude = properties.get('altitude');
1741
+ var length = altitude.get('length');
1742
+ var _length = altitude.get('_length');
1743
+ var _unit = altitude.get('_unit');
1744
+ length = length - value;
1745
+ switch (_unit) {
1746
+ case 'mm':
1747
+ _length = length * 10;
1748
+ break;
1749
+ case 'm':
1750
+ _length = length * 0.01;
1751
+ break;
1752
+ default:
1753
+ _length = length;
1754
+ }
1755
+ if (length <= 0) {
1756
+ length = 0;
1757
+ _length = 0;
1758
+ }
1759
+ state = state.mergeIn(['scene', 'layers', layerID, 'items', itemID, 'properties', 'altitude'], new _immutable.Map({
1760
+ length: length,
1761
+ _length: _length,
1762
+ _unit: _unit
1763
+ }));
1764
+ return {
1765
+ updatedState: state
1766
+ };
1767
+ }
1768
+ }, {
1769
+ key: "createHole",
1770
+ value: function createHole(state, layerID, type, lineID, offset, properties) {
1771
+ var holeID = _export2.IDBroker.acquireID();
1772
+ var hole = state.catalog.factoryElement(type, {
1773
+ id: holeID,
1774
+ url: state.catalog.getIn(['elements', type, 'info', 'url']),
1775
+ type: type,
1776
+ offset: offset,
1777
+ line: lineID
1778
+ }, properties);
1779
+ state = state.setIn(['scene', 'layers', layerID, 'holes', holeID], hole);
1780
+ state = state.updateIn(['scene', 'layers', layerID, 'lines', lineID, 'holes'], function (holes) {
1781
+ return holes && holes.push(holeID);
1782
+ });
1783
+ // get vertex order/////
1784
+ var element = state.scene.layers.getIn([layerID, 'lines', lineID]);
1785
+ var layer = state.getIn(['scene', 'layers', layerID]);
1786
+ var vetName0 = element.vertices.get(0);
1787
+ var vetName1 = element.vertices.get(1);
1788
+ var verticesArray = [];
1789
+ layer.areas.forEach(function (data) {
1790
+ verticesArray.push(data.vertices.toJS());
1791
+ });
1792
+ for (var i = 0; i < verticesArray.length; i++) {
1793
+ var vertices = verticesArray[i];
1794
+ if (vertices.includes(vetName0) && vertices.includes(vetName1)) {
1795
+ var index0 = vertices.indexOf(vetName0);
1796
+ var index1 = vertices.indexOf(vetName1);
1797
+ // if vertex order chanege//
1798
+ if (index1 + 1 == index0) {
1799
+ return {
1800
+ updatedState: state,
1801
+ hole: hole
1802
+ };
1803
+ }
1804
+ if (index0 == 0 && index1 == vertices.length - 1) {
1805
+ return {
1806
+ updatedState: state,
1807
+ hole: hole
1808
+ };
1809
+ }
1810
+ // ////////////////////////
1811
+ }
1812
+ }
1813
+ // ///////////////////////////
1814
+ properties = hole.properties.toJS();
1815
+ if (properties.hasOwnProperty('flip_orizzontal')) {
1816
+ properties['flip_orizzontal'] = true;
1817
+ }
1818
+ if (properties.hasOwnProperty('flip_horizontal')) {
1819
+ properties['flip_horizontal'] = true;
1820
+ }
1821
+ state = _export.Hole.setJsProperties(state, layerID, holeID, properties).updatedState;
1822
+ return {
1823
+ updatedState: state,
1824
+ hole: hole
1825
+ };
1826
+ }
1827
+ }, {
1828
+ key: "toggleLoadingCabinet",
1829
+ value: function toggleLoadingCabinet(state) {
1830
+ var _state18 = state,
1831
+ scene = _state18.scene;
1832
+ console.log('scene.isLoadingCabinet: ', !scene.isLoadingCabinet);
1833
+ // scene = scene.set('isLoadingCabinet', !scene.isLoadingCabinet);
1834
+ // state = state.set('scene', scene);
1835
+ state = state.setIn(['scene', 'isLoadingCabinet'], !scene.isLoadingCabinet);
1836
+ return {
1837
+ updatedState: state
1838
+ };
1839
+ }
1840
+ }, {
1841
+ key: "endLoading",
1842
+ value: function endLoading(state) {
1843
+ var _state19 = state,
1844
+ scene = _state19.scene;
1845
+ state = state.setIn(['scene', 'loadFlag'], true);
1846
+ return {
1847
+ updatedState: state
1848
+ };
1849
+ }
1850
+ }]);
1851
+ }();
1852
+ module.exports = exports.default;