@crystaldesign/diva-web-planner-react 25.1.0-beta.44 → 25.1.0-beta.46

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 (275) hide show
  1. package/build/esm/{ArticleProperties-9e305e56.js → ArticleProperties-3500cdf3.js} +2 -2
  2. package/build/esm/{CatalogProperties-42d85cbc.js → CatalogProperties-ec0d68f4.js} +1 -1
  3. package/build/esm/DecisionVizualizer-5b1fbc67.js +68 -0
  4. package/build/esm/{IconHandler-1bb9d093.js → IconHandler-10f7573f.js} +1 -1
  5. package/build/esm/{OptionProperties-7fdb8b51.js → OptionProperties-48b15ff2.js} +1 -1
  6. package/build/esm/{OptionValueProperties-5fef1f20.js → OptionValueProperties-1c8a737e.js} +1 -1
  7. package/build/esm/{Planner2DGrid-423d636e.js → Planner2DGrid-dab5c1ad.js} +1 -1
  8. package/build/esm/{Planner3DImage-f56f7f4f.js → Planner3DImage-98063d66.js} +1 -1
  9. package/build/esm/{index-6324ef89.js → index-013f538c.js} +1 -1
  10. package/build/esm/{index-876f5b49.js → index-028cf97e.js} +2 -2
  11. package/build/esm/{index-ab8f1009.js → index-042cff8d.js} +50 -50
  12. package/build/esm/{index-19d6e49a.js → index-045536dc.js} +2 -2
  13. package/build/esm/{index-b968fad1.js → index-09df80c9.js} +9 -9
  14. package/build/esm/{index-969f25e2.js → index-0a7c3577.js} +1 -1
  15. package/build/esm/{index-810ce4b7.js → index-0b225bb6.js} +1 -1
  16. package/build/esm/{index-3f649e1f.js → index-0f068a0a.js} +1 -1
  17. package/build/esm/{index-ed923048.js → index-14aa7fa2.js} +1 -1
  18. package/build/esm/{index-1b0fc5a3.js → index-175eae12.js} +1 -1
  19. package/build/esm/{index-0acbe0a9.js → index-1a23fcf5.js} +1 -1
  20. package/build/esm/{index-1a6b0d56.js → index-1a95032a.js} +4 -4
  21. package/build/esm/{index-a945d0b5.js → index-1b87e989.js} +1 -1
  22. package/build/esm/{index-ddae5edf.js → index-1bfaa9be.js} +1 -1
  23. package/build/esm/{index-9e587fd8.js → index-1dc6f242.js} +1 -1
  24. package/build/esm/{index-9413bc89.js → index-1e1d9368.js} +1 -1
  25. package/build/esm/{index-978a6f81.js → index-1e691fbb.js} +2 -2
  26. package/build/esm/{index-c5cd8add.js → index-1ea1e79a.js} +1 -1
  27. package/build/esm/{index-6f0735f9.js → index-21a15612.js} +6 -6
  28. package/build/esm/{index-afe6bfb6.js → index-22077009.js} +1 -1
  29. package/build/esm/{index-af503d5f.js → index-230f172a.js} +2 -2
  30. package/build/esm/{index-69be6071.js → index-2324a66f.js} +1 -1
  31. package/build/esm/{index-e2557c15.js → index-235a6fd0.js} +9 -9
  32. package/build/esm/{index-f36fcbad.js → index-2396af23.js} +1 -1
  33. package/build/esm/{index-de171b96.js → index-2493d084.js} +1 -1
  34. package/build/esm/{index-f08313ec.js → index-28bde2cd.js} +1 -1
  35. package/build/esm/{index-462b9806.js → index-2947c689.js} +1 -1
  36. package/build/esm/{index-4550de02.js → index-29d389d4.js} +1 -1
  37. package/build/esm/{index-82a5eed7.js → index-2a3b2fef.js} +1 -1
  38. package/build/esm/{index-5d2bc07c.js → index-2ce86f8c.js} +1 -1
  39. package/build/esm/{index-b2bfffa0.js → index-2d9939b5.js} +4 -4
  40. package/build/esm/{index-c9be6858.js → index-2dbd14fa.js} +1 -1
  41. package/build/esm/{index-5cca900a.js → index-2f9715db.js} +18 -18
  42. package/build/esm/{index-de951a5e.js → index-30beefcc.js} +5 -5
  43. package/build/esm/{index-b6a4ea97.js → index-3315ab9a.js} +1 -1
  44. package/build/esm/{index-91deeea5.js → index-336dc495.js} +2 -2
  45. package/build/esm/{index-2cd1fe1a.js → index-337ee644.js} +1 -1
  46. package/build/esm/{index-66f49193.js → index-33ef18ad.js} +79 -79
  47. package/build/esm/{index-e23d18d8.js → index-35cca5c2.js} +4 -4
  48. package/build/esm/{index-30ed8e41.js → index-35e557f1.js} +232 -231
  49. package/build/esm/{index-226035b9.js → index-370b3e6e.js} +2 -2
  50. package/build/esm/{index-a4baaf66.js → index-38c0e629.js} +1 -1
  51. package/build/esm/{index-88d5646c.js → index-3a1f2e79.js} +5 -5
  52. package/build/esm/{index-6dcdd444.js → index-3ad904db.js} +43 -43
  53. package/build/esm/{index-10ffefe4.js → index-3c1527d0.js} +20 -20
  54. package/build/esm/{index-e32d7f18.js → index-3eb572b6.js} +3 -3
  55. package/build/esm/{index-2f93e4da.js → index-4077824a.js} +1 -1
  56. package/build/esm/{index-750eb9dc.js → index-407ef553.js} +4 -4
  57. package/build/esm/{index-0eb02e76.js → index-447e0b18.js} +2 -2
  58. package/build/esm/{index-7380f5cd.js → index-453b8322.js} +2 -2
  59. package/build/esm/{index-d4d1f7a8.js → index-45475117.js} +1 -1
  60. package/build/esm/{index-f2c4a948.js → index-484789d5.js} +1 -1
  61. package/build/esm/{index-fc658be0.js → index-49b2140f.js} +1 -1
  62. package/build/esm/{index-29054624.js → index-4ab25479.js} +1 -1
  63. package/build/esm/{index-8aaf7391.js → index-4ae0ee70.js} +2 -2
  64. package/build/esm/{index-25895a15.js → index-4b36c673.js} +1 -1
  65. package/build/esm/{index-78544c90.js → index-4c3a98a0.js} +64 -64
  66. package/build/esm/{index-783bd807.js → index-4d7bfe0b.js} +1 -1
  67. package/build/esm/{index-3c5c32dd.js → index-4da35f75.js} +2 -2
  68. package/build/esm/{index-a1bcf9b7.js → index-5365c11b.js} +44 -44
  69. package/build/esm/{index-8f38c5e6.js → index-5382da1a.js} +40 -39
  70. package/build/esm/{index-2e4c7a29.js → index-54435eb9.js} +1 -1
  71. package/build/esm/{index-7b7f3e62.js → index-5444efcc.js} +1 -1
  72. package/build/esm/{index-21229db9.js → index-558536f3.js} +2 -2
  73. package/build/esm/{index-324a46a0.js → index-55a4b2d0.js} +45 -45
  74. package/build/esm/{index-10d1d099.js → index-55fb68d0.js} +2 -2
  75. package/build/esm/{index-8b37731a.js → index-57594059.js} +2 -2
  76. package/build/esm/{index-4a76a76d.js → index-5b2b70d3.js} +1 -1
  77. package/build/esm/{index-d3301efd.js → index-5be1e27f.js} +5 -5
  78. package/build/esm/{index-a8f65ff9.js → index-5cddee21.js} +1 -1
  79. package/build/esm/{index-8c08755d.js → index-5d84637e.js} +3 -3
  80. package/build/esm/{index-659f65ed.js → index-5db47e34.js} +1 -1
  81. package/build/esm/{index-6eb879e3.js → index-5fb7a8d1.js} +20 -20
  82. package/build/esm/{index-7ff5f5dc.js → index-5fd89598.js} +1 -1
  83. package/build/esm/{index-abeadadf.js → index-601b1820.js} +1 -1
  84. package/build/esm/{index-baa970b0.js → index-60b97cd1.js} +1 -1
  85. package/build/esm/{index-b1f995cd.js → index-6125057f.js} +39 -38
  86. package/build/esm/{index-b35fc460.js → index-624fbca6.js} +1 -1
  87. package/build/esm/{index-8d8ef46e.js → index-62ce283a.js} +1 -1
  88. package/build/esm/{index-5ad1b2c3.js → index-63d0ad24.js} +1 -1
  89. package/build/esm/{index-aa8a41ae.js → index-6618afe7.js} +15 -15
  90. package/build/esm/{index-70f623c6.js → index-664d2b07.js} +1 -1
  91. package/build/esm/{index-4595acba.js → index-66693fe4.js} +1 -1
  92. package/build/esm/{index-cec34041.js → index-669e5a5e.js} +1 -1
  93. package/build/esm/{index-a603c128.js → index-66d9363f.js} +4 -4
  94. package/build/esm/{index-5d1d9c21.js → index-67200580.js} +1 -1
  95. package/build/esm/{index-f6671a0b.js → index-672934ab.js} +2 -2
  96. package/build/esm/{index-34575129.js → index-67a567b0.js} +1 -1
  97. package/build/esm/{index-1e7adcce.js → index-6948604d.js} +1 -1
  98. package/build/esm/{index-f8cbeeff.js → index-69a280e4.js} +3 -3
  99. package/build/esm/{index-fef9edd5.js → index-6a3dba70.js} +4 -4
  100. package/build/esm/{index-7410e4f7.js → index-6a9ae840.js} +3 -3
  101. package/build/esm/{index-4caf57c5.js → index-6cecb2a6.js} +21 -21
  102. package/build/esm/{index-23b5ea04.js → index-6cf9d27b.js} +1 -1
  103. package/build/esm/{index-3c0beb40.js → index-6d0c3d49.js} +5 -5
  104. package/build/esm/{index-2a061bb0.js → index-6e79edfc.js} +1 -1
  105. package/build/esm/{index-c4db2b4a.js → index-6f3b2f8d.js} +4 -4
  106. package/build/esm/{index-d20054fe.js → index-714f144a.js} +48 -48
  107. package/build/esm/{index-2b96b037.js → index-715dae15.js} +1 -1
  108. package/build/esm/{index-6a238724.js → index-7205f287.js} +1 -1
  109. package/build/esm/{index-e2843627.js → index-72549b17.js} +1 -1
  110. package/build/esm/{index-03d44994.js → index-72e7b0ba.js} +2 -2
  111. package/build/esm/{index-06373b71.js → index-7347dc1e.js} +1 -1
  112. package/build/esm/{index-83fc3593.js → index-73730a27.js} +4 -4
  113. package/build/esm/{index-5e71de16.js → index-75295eb5.js} +62 -62
  114. package/build/esm/{index-b03212c7.js → index-75a9d0e1.js} +1 -1
  115. package/build/esm/{index-752bd326.js → index-783de0b5.js} +24 -24
  116. package/build/esm/{index-86147603.js → index-78b8781f.js} +1 -1
  117. package/build/esm/{index-1bbaf8d5.js → index-7bf38046.js} +3 -3
  118. package/build/esm/{index-b9dcbe21.js → index-7d65df07.js} +3 -3
  119. package/build/esm/{index-62a7c9a6.js → index-7e074158.js} +62 -62
  120. package/build/esm/{index-fb26a74c.js → index-7e4e8c2e.js} +1 -1
  121. package/build/esm/{index-ea8dfc6a.js → index-7f1e1f2e.js} +1 -1
  122. package/build/esm/{index-1ae7f8d0.js → index-7f429aea.js} +104 -103
  123. package/build/esm/{index-e375e422.js → index-7f680895.js} +3 -3
  124. package/build/esm/{index-9e114079.js → index-7fecaef1.js} +1 -1
  125. package/build/esm/{index-16cbe258.js → index-80127e9c.js} +3 -3
  126. package/build/esm/{index-972d0569.js → index-8051c97c.js} +3 -3
  127. package/build/esm/{index-9b3cd890.js → index-80b98741.js} +1 -1
  128. package/build/esm/{index-8a19077c.js → index-8170be5c.js} +1 -1
  129. package/build/esm/{index-62d43dbd.js → index-82988259.js} +1 -1
  130. package/build/esm/{index-103c2f3f.js → index-846afe98.js} +3 -3
  131. package/build/esm/{index-723e8370.js → index-8abaa49a.js} +1 -1
  132. package/build/esm/{index-c50a7962.js → index-8bcf6dfe.js} +1 -1
  133. package/build/esm/{index-8804117d.js → index-8cedbf3c.js} +1 -1
  134. package/build/esm/{index-1cf97e01.js → index-8e69d04a.js} +97 -96
  135. package/build/esm/{index-df26a6dc.js → index-8fc21d52.js} +5 -5
  136. package/build/esm/{index-e61192ee.js → index-90217e58.js} +46 -46
  137. package/build/esm/{index-b0846b08.js → index-90621ba4.js} +2 -2
  138. package/build/esm/{index-0d1a3b5f.js → index-93e510f6.js} +4 -4
  139. package/build/esm/{index-1dca2ec7.js → index-950db876.js} +1 -1
  140. package/build/esm/{index-918d6d3f.js → index-95807704.js} +8 -8
  141. package/build/esm/{index-036e8748.js → index-9596a4e8.js} +1 -1
  142. package/build/esm/{index-2d574c86.js → index-95de0a4a.js} +1 -1
  143. package/build/esm/{index-3aa2e5c5.js → index-96376ebe.js} +1 -1
  144. package/build/esm/{index-e62eed3b.js → index-9808e36e.js} +1 -1
  145. package/build/esm/{index-aa4a0951.js → index-98aa1512.js} +2 -2
  146. package/build/esm/{index-f5fff509.js → index-9939ebd0.js} +6 -6
  147. package/build/esm/{index-6bec4e19.js → index-998b5575.js} +2 -2
  148. package/build/esm/{index-89eba740.js → index-9a525a50.js} +1 -1
  149. package/build/esm/{index-23301cd9.js → index-9b2c20f1.js} +3 -3
  150. package/build/esm/{index-e0e8a4a9.js → index-9bf11592.js} +21 -21
  151. package/build/esm/{index-70aa49da.js → index-9c6101ff.js} +3 -3
  152. package/build/esm/{index-15b3bb5f.js → index-9cae0e62.js} +1 -1
  153. package/build/esm/{index-fd5f6e97.js → index-9d8c78af.js} +9 -8
  154. package/build/esm/{index-8bc8e04a.js → index-9dfa1500.js} +3 -3
  155. package/build/esm/{index-0a2e6322.js → index-a134f105.js} +2 -2
  156. package/build/esm/{index-c3e04dc4.js → index-a3d7db1d.js} +3 -3
  157. package/build/esm/{index-93988aa1.js → index-a4c02bca.js} +2 -2
  158. package/build/esm/{index-a0153e65.js → index-a6095745.js} +1 -1
  159. package/build/esm/{index-f3827624.js → index-a7bd01de.js} +20 -20
  160. package/build/esm/{index-43afa4be.js → index-a911688a.js} +1 -1
  161. package/build/esm/{index-8bbcc353.js → index-ac30081e.js} +2 -2
  162. package/build/esm/index-af1f6edf.js +155 -0
  163. package/build/esm/{index-dac84ca3.js → index-b041e637.js} +6 -6
  164. package/build/esm/{index-994052ad.js → index-b12dfc35.js} +1 -1
  165. package/build/esm/{index-c11d7ffd.js → index-b17c1483.js} +1 -1
  166. package/build/esm/{index-b889f0d4.js → index-b1a172a7.js} +1 -1
  167. package/build/esm/{index-76157f04.js → index-b22aca8d.js} +6 -6
  168. package/build/esm/{index-7ea7c3d6.js → index-b2864d44.js} +2 -2
  169. package/build/esm/{index-9f542749.js → index-b31930ed.js} +1 -1
  170. package/build/esm/{index-fc2f1a2a.js → index-b38179b8.js} +2 -2
  171. package/build/esm/{index-8ef4f3d0.js → index-b46bb57a.js} +2 -2
  172. package/build/esm/{index-82737596.js → index-b4d12213.js} +1 -1
  173. package/build/esm/{index-4e8ea942.js → index-b6f1e090.js} +1 -1
  174. package/build/esm/{index-70cd881a.js → index-ba0f7818.js} +17 -17
  175. package/build/esm/{index-09b39548.js → index-bced308c.js} +1 -1
  176. package/build/esm/{index-f9277ed6.js → index-c070d057.js} +49 -49
  177. package/build/esm/{index-71168710.js → index-c343604e.js} +1 -1
  178. package/build/esm/{index-df49ed6d.js → index-c3472cd8.js} +6 -6
  179. package/build/esm/{index-32edf5b6.js → index-c390cd1c.js} +1 -1
  180. package/build/esm/{index-18985afd.js → index-c64d5013.js} +1 -1
  181. package/build/esm/{index-8c5b57ac.js → index-c8522759.js} +9 -9
  182. package/build/esm/{index-deee8399.js → index-c987d528.js} +1 -1
  183. package/build/esm/{index-8cb76f2f.js → index-cc15c5b2.js} +2 -2
  184. package/build/esm/{index-9a4c5d4a.js → index-cc53256e.js} +4 -4
  185. package/build/esm/{index-7fe615fc.js → index-cc805f95.js} +9 -9
  186. package/build/esm/{index-3cba90b3.js → index-ccc401fb.js} +1 -1
  187. package/build/esm/{index-adb104e3.js → index-cd82efbe.js} +13 -13
  188. package/build/esm/{index-706cf9ca.js → index-ce25ae10.js} +4 -4
  189. package/build/esm/{index-7f821a1f.js → index-ce5359da.js} +1 -1
  190. package/build/esm/{index-3a4bdb59.js → index-cf050a82.js} +1 -1
  191. package/build/esm/{index-62f41749.js → index-cff0d836.js} +1 -1
  192. package/build/esm/{index-3d3d2144.js → index-d0341aff.js} +3 -3
  193. package/build/esm/{index-1ff66460.js → index-d25f6488.js} +1 -1
  194. package/build/esm/{index-04f8732f.js → index-d3fa3d5a.js} +1 -1
  195. package/build/esm/{index-bf0a1c13.js → index-d3fa657b.js} +6 -6
  196. package/build/esm/{index-e16cbd87.js → index-d4d2a980.js} +1 -1
  197. package/build/esm/{index-127aeacc.js → index-d5067481.js} +1 -1
  198. package/build/esm/{index-6a71d4f3.js → index-d6183ae7.js} +1 -1
  199. package/build/esm/{index-916c02d0.js → index-d61b8c41.js} +2 -2
  200. package/build/esm/{index-22b77959.js → index-d7f63212.js} +1 -1
  201. package/build/esm/{index-afe7c8d2.js → index-d7ff9ad8.js} +3 -3
  202. package/build/esm/{index-4b39eb22.js → index-d815c271.js} +2 -2
  203. package/build/esm/{index-02acd944.js → index-d8fc9248.js} +1 -1
  204. package/build/esm/{index-75c3d15e.js → index-de93c30a.js} +6 -6
  205. package/build/esm/{index-57c764dc.js → index-dfd3db96.js} +2 -2
  206. package/build/esm/{index-502d6b36.js → index-e046339a.js} +2 -2
  207. package/build/esm/{index-24cc27d0.js → index-e132bc60.js} +1 -1
  208. package/build/esm/{index-1f3744eb.js → index-e269bcfd.js} +58 -58
  209. package/build/esm/{index-93726686.js → index-e2e3fbf4.js} +2 -2
  210. package/build/esm/{index-3c9a9104.js → index-e3e8f19f.js} +1 -1
  211. package/build/esm/{index-fee85217.js → index-e4efdb26.js} +4 -4
  212. package/build/esm/{index-b060b67e.js → index-e6e37a26.js} +1 -1
  213. package/build/esm/{index-78eaeabd.js → index-e7f251bc.js} +1 -1
  214. package/build/esm/{index-5b887057.js → index-ea6640ae.js} +6 -6
  215. package/build/esm/{index-31cad8f5.js → index-ec733247.js} +2 -2
  216. package/build/esm/{index-473ef380.js → index-edecee05.js} +4 -4
  217. package/build/esm/{index-f4e49f28.js → index-eef9de12.js} +2 -2
  218. package/build/esm/{index-2a2bceb6.js → index-f06eae85.js} +2 -2
  219. package/build/esm/{index-5354a85c.js → index-f0b0148b.js} +1 -1
  220. package/build/esm/{index-0014a02e.js → index-f0f61359.js} +5 -5
  221. package/build/esm/{index-6af3bf41.js → index-f149d8d9.js} +5 -5
  222. package/build/esm/{index-e34cd9cb.js → index-f2790a16.js} +1 -1
  223. package/build/esm/{index-841dff8c.js → index-f50dd372.js} +1 -1
  224. package/build/esm/{index-e176b701.js → index-f7df4252.js} +2 -2
  225. package/build/esm/{index-148ed7a7.js → index-f8311760.js} +78 -78
  226. package/build/esm/{index-81238b78.js → index-f920aa37.js} +1 -1
  227. package/build/esm/{index-b2674495.js → index-f9654647.js} +19 -19
  228. package/build/esm/{index-398036df.js → index-fa02788a.js} +64 -64
  229. package/build/esm/{index-2d3d3e39.js → index-fa6eb2f7.js} +3 -3
  230. package/build/esm/{index-1816eeba.js → index-fb6d43cb.js} +3 -3
  231. package/build/esm/{index-87c38605.js → index-fc39ef7a.js} +3 -3
  232. package/build/esm/{index-ff5ad662.js → index-fccdf3ca.js} +7 -7
  233. package/build/esm/{index-80f3bdc5.js → index-fe270fc3.js} +1 -1
  234. package/build/esm/index.js +1 -1
  235. package/build/esm/{index.module-e8ba09b7.js → index.module-17cf1124.js} +1 -1
  236. package/build/esm/{index.module-bd335b4e.js → index.module-42f00399.js} +1 -1
  237. package/build/esm/{index.module-4daa0853.js → index.module-52c71307.js} +1 -1
  238. package/build/esm/{index.module-bb76c727.js → index.module-7634b44d.js} +1 -1
  239. package/build/esm/{index.module-5458efba.js → index.module-83894475.js} +1 -1
  240. package/build/esm/{index.module-95d4568f.js → index.module-88cbf30b.js} +1 -1
  241. package/build/esm/{index.module-f41d220b.js → index.module-99817ae7.js} +1 -1
  242. package/build/esm/{index.module-d224556a.js → index.module-a8fbede6.js} +1 -1
  243. package/build/esm/{index.module-8b6e1e43.js → index.module-b8aa6782.js} +1 -1
  244. package/build/esm/{index.module-5fb905eb.js → index.module-c34c8bb0.js} +1 -1
  245. package/build/esm/{index.module-ccf6023d.js → index.module-c724349f.js} +1 -1
  246. package/build/esm/{index.module-268fcee3.js → index.module-f8e99aa5.js} +1 -1
  247. package/build/esm/{react-json-viewer-925ec3fc.js → react-json-viewer-37928026.js} +1 -1
  248. package/build/types/web-planner-react/src/components/Product/Product/catalog/Components/DecisionAnalyzer/DecisionVizualizer.d.ts +42 -0
  249. package/build/types/web-planner-react/src/components/Product/Product/catalog/Components/DecisionAnalyzer/DecisionVizualizer.d.ts.map +1 -0
  250. package/build/types/web-planner-react/src/components/Product/Product/catalog/Components/DecisionAnalyzer/index.d.ts +9 -0
  251. package/build/types/web-planner-react/src/components/Product/Product/catalog/Components/DecisionAnalyzer/index.d.ts.map +1 -0
  252. package/build/types/web-planner-react/src/components/Product/Product/catalog/Components/PartList/index.d.ts.map +1 -1
  253. package/build/types/web-planner-react/src/components/Product/Product/catalog/Components/PropertiesEditor/index.d.ts.map +1 -1
  254. package/build/types/web-planner-react/src/components/Product/Product/catalog/index.d.ts +1 -1
  255. package/build/types/web-planner-react/src/model/index.d.ts.map +1 -1
  256. package/build/umd/2027.diva-web-planner-react.umd.min.js +1 -1
  257. package/build/umd/2905.diva-web-planner-react.umd.min.js +1 -1
  258. package/build/umd/3222.diva-web-planner-react.umd.min.js +2 -0
  259. package/build/umd/3222.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
  260. package/build/umd/5961.diva-web-planner-react.umd.min.js +1 -1
  261. package/build/umd/7078.diva-web-planner-react.umd.min.js +1 -1
  262. package/build/umd/7393.diva-web-planner-react.umd.min.js +1 -1
  263. package/build/umd/8072.diva-web-planner-react.umd.min.js +2 -0
  264. package/build/umd/{4671.diva-web-planner-react.umd.min.js.LICENSE.txt → 8072.diva-web-planner-react.umd.min.js.LICENSE.txt} +1 -1
  265. package/build/umd/8689.diva-web-planner-react.umd.min.js +1 -1
  266. package/build/umd/8757.diva-web-planner-react.umd.min.js +1 -1
  267. package/build/umd/9631.diva-web-planner-react.umd.min.js +1 -1
  268. package/build/umd/9874.diva-web-planner-react.umd.min.js +1 -1
  269. package/build/umd/diva-web-planner-react.umd.min.js +1 -1
  270. package/build/umd/report.html +1 -1
  271. package/package.json +7 -7
  272. package/build/esm/index-7140f0af.js +0 -126
  273. package/build/types/web-planner-react/src/components/Product/Product/catalog/Components/PartListAnalyzer/index.d.ts +0 -27
  274. package/build/types/web-planner-react/src/components/Product/Product/catalog/Components/PartListAnalyzer/index.d.ts.map +0 -1
  275. package/build/umd/4671.diva-web-planner-react.umd.min.js +0 -2
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see 2905.diva-web-planner-react.umd.min.js.LICENSE.txt */
2
- "use strict";(self.webpackChunkCrystaldesignDivaWebPlannerReact=self.webpackChunkCrystaldesignDivaWebPlannerReact||[]).push([[2905],{82905:(t,e,n)=>{n.r(e),n.d(e,{default:()=>T});var o=n(84658),i=n(13125),s=n(43860),l=n(80248),r=n(50747),a=n.n(r),h=n(37537),c=n(12952),u=h.ZP.initLog("Planner","WEB-PLANNER-LOGIC"),m=function(){return(0,s.Z)((function BoxPlannerPartlistHelper(t,e,n,o,s,r,a){(0,i.Z)(this,BoxPlannerPartlistHelper),(0,l.Z)(this,"constructionRules",void 0),(0,l.Z)(this,"getOptionVal",void 0),(0,l.Z)(this,"setOptionValue",void 0),(0,l.Z)(this,"getElementHasBottomPlate",void 0),(0,l.Z)(this,"getElementIsCornerElement",void 0),(0,l.Z)(this,"getCornerType",void 0),(0,l.Z)(this,"getElementHasTopPlate",void 0),(0,l.Z)(this,"getElementIsGarderobeElement",void 0),this.getOptionVal=t,this.getElementHasBottomPlate=n,this.setOptionValue=e,this.getElementIsCornerElement=o,this.getCornerType=s,this.getElementHasTopPlate=r,this.getElementIsGarderobeElement=a}),[{key:"setConstructionRules",value:function setConstructionRules(t){this.constructionRules=t}},{key:"getGroundPlatesNumOfRightNeighbors",value:function getGroundPlatesNumOfRightNeighbors(t,e,n){var o=0;if(this.getElementHasBottomPlate(t,n)&&o++,e.getPlannerHasActiveBackside()){var i=e.getOppositeElement(t.getElementId());if(this.getElementHasBottomPlate(i,n)&&o++,e.getElementHasRightElement(t.getElementId())){var s=e.getRightElement(t.getElementId()),l=e.getOppositeElement(s.getElementId());return this.getElementHasBottomPlate(s,n)&&o++,this.getElementHasBottomPlate(l,n)&&o++,o}return o}if(e.getElementHasRightElement(t.getElementId())){var r=e.getRightElement(t.getElementId());return this.getElementHasBottomPlate(r,n)&&o++,o}return o}},{key:"getTopPlatesNumOfRightNeighbors",value:function getTopPlatesNumOfRightNeighbors(t,e,n){var o=0;if(this.getElementHasTopPlate(t,e,n)&&o++,e.getPlannerHasActiveBackside()){var i=e.getOppositeElement(t.getElementId());if(this.getElementHasTopPlate(i,e,n)&&o++,e.getElementHasRightElement(t.getElementId())){var s=e.getRightElement(t.getElementId()),l=e.getOppositeElement(s.getElementId());return this.getElementHasTopPlate(s,e,n)&&o++,this.getElementHasTopPlate(l,e,n)&&o++,o}return o}if(e.getElementHasRightElement(t.getElementId())){var r=e.getRightElement(t.getElementId());return this.getElementHasTopPlate(r,e,n)&&o++,o}return o}},{key:"getElementHeight",value:function getElementHeight(t,e){var n=this.getOptionVal(t.getElementId(),"OPTHOEHE",e);return"OPVH_6"==n?"6":"OPVH_11"==n?"11":"OPVH_18"==n?"18":"37"}},{key:"getElementDepth",value:function getElementDepth(t,e){var n=this.getOptionVal(t.getElementId(),"OPTTIEFE",e);return"OPVTIEFE_18"==n?"18":"37"}},{key:"getElementRahmenColor",value:function getElementRahmenColor(t,e){var n=this.getOptionVal(t.getElementId(),"OPTFARBE_RAHMEN",e);return"OPVCHROM"==n?"CHROM":"OPVSCHWARZ_MATT"==n?"BLACK":"CHROM"}},{key:"calculateRahmen",value:function calculateRahmen(t,e){for(var n=t.getAllElementsInGrid(),o=0;o<n.length;o++)this.constructionRules.VarticalRahmenInfo&&(this.correctRahmenVerticalLeftFront(n[o],t,e),this.correctRahmenVerticalLeftBack(n[o],t,e),this.correctRahmenVerticalRightFront(n[o],t,e),this.correctRahmenVerticalRightBack(n[o],t,e),u.debug("---------Correct Senkrechte Rahmen for element with ID: "+n[o].ElementId+"; posNr: "+n[o].PosNr+" ----------"),u.debug("Senkrechter Rahmen links vorne: "+this.getOptionVal(n[o].ElementId,"OPTRAHMEN_L_V",e)),u.debug("Senkrechter Rahmen links hinten: "+this.getOptionVal(n[o].ElementId,"OPTRAHMEN_L_H",e)),u.debug("Senkrechter Rahmen rechts vorne : "+this.getOptionVal(n[o].ElementId,"OPTRAHMEN_R_V",e)),u.debug("Senkrechter Rahmen rechts hinten : "+this.getOptionVal(n[o].ElementId,"OPTRAHMEN_R_H",e))),this.constructionRules.DepthRahmenInfo&&(this.correctRahmenDepthLeftBottom(n[o],t,e),this.correctRahmenDepthLeftTop(n[o],t,e),this.correctRahmenDepthRightBottom(n[o],t,e),this.correctRahmenDepthRightTop(n[o],t,e),u.debug("---------Correct Tiefenverbinder Rahmen for element with ID: "+n[o].ElementId+"; posNr: "+n[o].PosNr+" ----------"),u.debug("Tiefen Rahmen links unten: "+this.getOptionVal(n[o].ElementId,"OPTRAHMEN_L_U",e)),u.debug("Tiefen Rahmen links oben: "+this.getOptionVal(n[o].ElementId,"OPTRAHMEN_L_O",e)),u.debug("Tiefen Rahmen rechts unten : "+this.getOptionVal(n[o].ElementId,"OPTRAHMEN_R_U",e)),u.debug("Tiefen Rahmen rechts oben : "+this.getOptionVal(n[o].ElementId,"OPTRAHMEN_R_O",e)))}},{key:"correctRahmenDepthLeftBottom",value:function correctRahmenDepthLeftBottom(t,e,n){if(this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.noRahmen,n),!(e.getIndexInGridByElementId(t.getElementId()).backside?e.getElementHasRightElement(t.getElementId()):e.getElementHasLeftElement(t.getElementId()))&&!e.getElementHasBottomElement(t.getElementId()))if(e.getPlannerHasActiveBackside())switch(this.getElementDepth(t,n)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,n);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,n)}else switch(this.getElementRahmenColor(t,n)){case"CHROM":if(this.getElementHasBottomPlate(t,n))this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Border_chrom,n);else switch(this.getElementDepth(t,n)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,n);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,n)}break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Border_black,n)}}},{key:"correctRahmenDepthLeftTop",value:function correctRahmenDepthLeftTop(t,e,n){if(this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.noRahmen,n),!(e.getIndexInGridByElementId(t.getElementId()).backside?e.getElementHasRightElement(t.getElementId()):e.getElementHasLeftElement(t.getElementId())))if(e.getPlannerHasActiveBackside())switch(this.getElementDepth(t,n)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,n);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,n)}else switch(this.getElementRahmenColor(t,n)){case"CHROM":if(this.getElementIsCornerElement(t,n))switch(this.getElementDepth(t,n)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,n);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,n)}else if(this.getElementHasTopPlate(t,e,n))this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Border_chrom,n);else switch(this.getElementDepth(t,n)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,n);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,n)}break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Border_black,n)}}},{key:"correctRahmenDepthRightBottom",value:function correctRahmenDepthRightBottom(t,e,n){this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.noRahmen,n);var o=e.getIndexInGridByElementId(t.getElementId()).backside?e.getElementHasLeftElement(t.getElementId()):e.getElementHasRightElement(t.getElementId());if(!e.getElementHasBottomElement(t.getElementId()))if(e.getPlannerHasActiveBackside())switch(this.getElementDepth(t,n)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,n);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,n)}else switch(this.getElementRahmenColor(t,n)){case"CHROM":if(o){var i=e.getRightElement(t.getElementId());if(!this.getElementHasBottomPlate(t,n)||this.getElementIsCornerElement(t,n))switch(this.getElementDepth(t,n)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,n);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,n)}else if(!this.getElementHasBottomPlate(i,n)||this.getElementIsCornerElement(i,n))switch(this.getElementDepth(t,n)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,n);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,n)}else this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Middle_chrom,n)}else if(this.getElementHasBottomPlate(t,n))this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Border_chrom,n);else switch(this.getElementDepth(t,n)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,n);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,n)}break;case"BLACK":o?this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Middle_black,n):this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Border_black,n)}}},{key:"correctRahmenDepthRightTop",value:function correctRahmenDepthRightTop(t,e,n){this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.noRahmen,n);var o=e.getIndexInGridByElementId(t.getElementId()).backside,i=o?e.getElementHasLeftElement(t.getElementId()):e.getElementHasRightElement(t.getElementId());if(e.getPlannerHasActiveBackside())switch(this.getElementDepth(t,n)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,n);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,n)}else switch(this.getElementRahmenColor(t,n)){case"CHROM":if(!this.getElementHasTopPlate(t,e,n)||this.getElementIsCornerElement(t,n)){switch(this.getElementDepth(t,n)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,n);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,n)}return}if(!i)return void this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Border_chrom,n);var s=o?e.getLeftElement(t.getElementId()):e.getRightElement(t.getElementId());if(!this.getElementHasTopPlate(s,e,n)||this.getElementIsCornerElement(s,n)){switch(this.getElementDepth(t,n)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,n);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,n)}return}this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Middle_chrom,n);break;case"BLACK":i?this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Middle_black,n):this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Border_black,n)}}},{key:"correctRahmenVerticalLeftFront",value:function correctRahmenVerticalLeftFront(t,e,n){if(this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.noRahmen,n),!(e.getIndexInGridByElementId(t.getElementId()).backside?e.getElementHasRightElement(t.getElementId()):e.getElementHasLeftElement(t.getElementId())))switch(this.getElementHeight(t,n)){case"6":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH6,n);break;case"11":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH11,n);break;case"18":switch(this.getElementRahmenColor(t,n)){case"CHROM":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_chrom,n);break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_black,n)}break;case"37":if(this.getElementIsGarderobeElement(t,n))this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_Garderobe,n);else switch(this.getElementRahmenColor(t,n)){case"CHROM":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_chrom,n);break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_black,n)}}}},{key:"correctRahmenVerticalLeftBack",value:function correctRahmenVerticalLeftBack(t,e,n){this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.noRahmen,n);var o=e.getIndexInGridByElementId(t.getElementId()).backside;if(!o&&!(o?e.getElementHasRightElement(t.getElementId()):e.getElementHasLeftElement(t.getElementId())))switch(this.getElementHeight(t,n)){case"6":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH6,n);break;case"11":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH11,n);break;case"18":switch(this.getElementRahmenColor(t,n)){case"CHROM":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_chrom,n);break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_black,n)}break;case"37":if(this.getElementIsGarderobeElement(t,n))this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_Garderobe,n);else switch(this.getElementRahmenColor(t,n)){case"CHROM":if(e.getPlannerHasActiveBackside()){var i=e.getOppositeElement(t.getElementId());this.getElementIsGarderobeElement(i,n)?this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_Garderobe,n):this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_chrom,n)}else this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_chrom,n);break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_black,n)}}}},{key:"correctRahmenVerticalRightFront",value:function correctRahmenVerticalRightFront(t,e,n){this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.noRahmen,n);var o=e.getIndexInGridByElementId(t.getElementId()).backside,i=o?e.getElementHasLeftElement(t.getElementId()):e.getElementHasRightElement(t.getElementId());switch(this.getElementHeight(t,n)){case"6":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH6,n);break;case"11":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH11,n);break;case"18":switch(this.getElementRahmenColor(t,n)){case"CHROM":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_chrom,n);break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_black,n)}break;case"37":if(this.getElementIsGarderobeElement(t,n))this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_Garderobe,n);else switch(this.getElementRahmenColor(t,n)){case"CHROM":if(i){var s=o?e.getLeftElement(t.getElementId()):e.getRightElement(t.getElementId());this.getElementIsGarderobeElement(s,n)?this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_Garderobe,n):this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_chrom,n)}else this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_chrom,n);break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_black,n)}}}},{key:"correctRahmenVerticalRightBack",value:function correctRahmenVerticalRightBack(t,e,n){this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.noRahmen,n);var o=e.getIndexInGridByElementId(t.getElementId()).backside;if(!o){var i=o?e.getElementHasLeftElement(t.getElementId()):e.getElementHasRightElement(t.getElementId());switch(this.getElementHeight(t,n)){case"6":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH6,n);break;case"11":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH11,n);break;case"18":switch(this.getElementRahmenColor(t,n)){case"CHROM":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_chrom,n);break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_black,n)}break;case"37":if(this.getElementIsGarderobeElement(t,n))this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_Garderobe,n);else switch(this.getElementRahmenColor(t,n)){case"CHROM":if(i){var s=o?e.getLeftElement(t.getElementId()):e.getRightElement(t.getElementId());if(!s)return;if(e.getPlannerHasActiveBackside()){var l=e.getOppositeElement(t.getElementId());if(!l)return;var r=e.getOppositeElement(s.getElementId());if(!r)return;this.getElementIsGarderobeElement(s,n)||this.getElementIsGarderobeElement(l,n)||this.getElementIsGarderobeElement(r,n)?this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_Garderobe,n):this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_chrom,n)}else this.getElementIsGarderobeElement(s,n)?this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_Garderobe,n):this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_chrom,n)}else if(e.getPlannerHasActiveBackside()){var a=e.getOppositeElement(t.getElementId());this.getElementIsGarderobeElement(a,n)?this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_Garderobe,n):this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_chrom,n)}else this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_chrom,n);break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_black,n)}}}}},{key:"calculateKnots",value:function calculateKnots(t,e){if(this.constructionRules.hasKNOTS)for(var n=t.getAllElementsInGrid(),o=0;o<n.length;o++)this.correctKnotLeftTopFront(n[o],t,e),this.correctKnotLeftTopBack(n[o],t,e),this.correctKnotLeftBottomFront(n[o],t,e),this.correctKnotLeftBottomBack(n[o],t,e),this.correctKnotRightTopFront(n[o],t,e),this.correctKnotRightTopBack(n[o],t,e),this.correctKnotRightBottomFront(n[o],t,e),this.correctKnotRightBottomBack(n[o],t,e),this.correctKnotRightMiddleBack(n[o],t,e),this.correctKnotLeftMiddleBack(n[o],t,e),u.debug("---------Correct Knots for element with ID: "+n[o].ElementId+"; posNr: "+n[o].PosNr+" ----------"),u.debug("Links oben vorne : "+this.getOptionVal(n[o].ElementId,"OPTKNOTEN_LTF",e)),u.debug("Links oben hinten : "+this.getOptionVal(n[o].ElementId,"OPTKNOTEN_LTB",e)),u.debug("Links unten vorne : "+this.getOptionVal(n[o].ElementId,"OPTKNOTEN_LBF",e)),u.debug("Links unten hinten : "+this.getOptionVal(n[o].ElementId,"OPTKNOTEN_LBB",e)),u.debug("Rechts oben vorne : "+this.getOptionVal(n[o].ElementId,"OPTKNOTEN_RTF",e)),u.debug("Rechts oben hinten : "+this.getOptionVal(n[o].ElementId,"OPTKNOTEN_RTB",e)),u.debug("Rechts unten vorne : "+this.getOptionVal(n[o].ElementId,"OPTKNOTEN_RBF",e)),u.debug("Links mitte hinten : "+this.getOptionVal(n[o].ElementId,"OPTKNOTEN_LMB",e)),u.debug("Rechts mitte hinten : "+this.getOptionVal(n[o].ElementId,"OPTKNOTEN_RMB",e)),u.debug("Rechts unten hinten : "+this.getOptionVal(n[o].ElementId,"OPTKNOTEN_RBB",e))}},{key:"correctKnotLeftBottomFront",value:function correctKnotLeftBottomFront(t,e,n){this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomFront,this.constructionRules.knotInfo.knotOPVs.noKnot,n);var o=e.getIndexInGridByElementId(t.getElementId()).backside?e.getElementHasRightElement(t.getElementId()):e.getElementHasLeftElement(t.getElementId());if(!e.getElementHasBottomElement(t.getElementId())&&(o||(e.getPlannerHasActiveBackside()&&this.getElementHasBottomPlate(t,n)&&this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n),this.getElementHasBottomPlate(t,n)||this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomFront,this.constructionRules.knotInfo.knotOPVs.knot1er,n)),this.getElementIsCornerElement(t,n))){var i=e.getLeftElement(t.getElementId());if(this.getElementIsCornerElement(i,n))return;var s=e.getRightElement(t.getElementId());switch(this.getCornerType(t,n)){case"INSIDE":this.getElementHasBottomPlate(i,n)?this.getElementHasBottomPlate(s,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomFront,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.getElementHasBottomPlate(s,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n);break;case"OUTSIDE":this.getElementHasBottomPlate(i,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n)}}}},{key:"correctKnotLeftTopFront",value:function correctKnotLeftTopFront(t,e,n){this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.noKnot,n);var o=e.getIndexInGridByElementId(t.getElementId()).backside?e.getElementHasRightElement(t.getElementId()):e.getElementHasLeftElement(t.getElementId());if(o||(e.getPlannerHasActiveBackside()&&this.getElementHasTopPlate(t,e,n)&&this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n),this.getElementHasTopPlate(t,e,n)||this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot1er,n)),this.getElementIsCornerElement(t,n)){var i=e.getElementHasLeftElement(t.getElementId());if(o&&this.getElementIsCornerElement(e.getLeftElement(t.getElementId()),n))return;var s=e.getElementHasRightElement(t.getElementId());if(i||s){if(s&&!i){var l=e.getRightElement(t.getElementId());switch(this.getCornerType(t,n)){case"INSIDE":this.getElementHasTopPlate(l,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n);break;case"OUTSIDE":this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n)}}else if(!s&&i){var r=e.getLeftElement(t.getElementId());this.getElementHasTopPlate(r,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot3erer_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n)}else if(s&&i){var a=e.getLeftElement(t.getElementId()),h=e.getRightElement(t.getElementId());switch(this.getCornerType(t,n)){case"INSIDE":this.getElementHasTopPlate(a,e,n)?this.getElementHasTopPlate(h,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.getElementHasTopPlate(h,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n);break;case"OUTSIDE":this.getElementHasTopPlate(a,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n)}}}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n)}}},{key:"correctKnotLeftBottomBack",value:function correctKnotLeftBottomBack(t,e,n){this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.noKnot,n);var o=e.getIndexInGridByElementId(t.getElementId()).backside?e.getElementHasRightElement(t.getElementId()):e.getElementHasLeftElement(t.getElementId());if(!e.getElementHasBottomElement(t.getElementId())){if(!o)if(e.getPlannerHasActiveBackside()&&!e.getIndexInGridByElementId(t.getElementId()).backside){var i=e.getOppositeElement(t.getElementId());i&&(this.getElementHasBottomPlate(t,n)?this.getElementHasBottomPlate(i,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,n):this.getElementHasBottomPlate(i,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,n))}else e.getPlannerHasActiveBackside()||this.getElementHasBottomPlate(t,n)||this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,n);if(this.getElementIsCornerElement(t,n)){var s=e.getLeftElement(t.getElementId());if(this.getElementIsCornerElement(s,n))return;switch(this.getCornerType(t,n)){case"INSIDE":this.getElementHasBottomPlate(s,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,n);break;case"OUTSIDE":var l=e.getRightElement(t.getElementId());this.getElementHasBottomPlate(s,n)?this.getElementHasBottomPlate(l,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_2GT,n):this.getElementHasBottomPlate(l,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_1GT,n)}}}}},{key:"correctKnotLeftTopBack",value:function correctKnotLeftTopBack(t,e,n){this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.noKnot,n);var o=e.getIndexInGridByElementId(t.getElementId()).backside?e.getElementHasRightElement(t.getElementId()):e.getElementHasLeftElement(t.getElementId());if(!o)if(e.getPlannerHasActiveBackside()&&!e.getIndexInGridByElementId(t.getElementId()).backside){var i=e.getOppositeElement(t.getElementId());i&&(this.getElementHasTopPlate(t,e,n)?this.getElementHasTopPlate(i,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,n):this.getElementHasTopPlate(i,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,n))}else e.getPlannerHasActiveBackside()||this.getElementHasTopPlate(t,e,n)||this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,n);if(this.getElementIsCornerElement(t,n)){var s=e.getElementHasLeftElement(t.getElementId());if(o&&this.getElementIsCornerElement(e.getLeftElement(t.getElementId()),n))return;var l=e.getElementHasRightElement(t.getElementId());if(s||l){if(l&&!s){var r=e.getRightElement(t.getElementId());switch(this.getCornerType(t,n)){case"INSIDE":this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n);break;case"OUTSIDE":this.getElementHasTopPlate(r,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,n)}}else if(!l&&s){var a=e.getLeftElement(t.getElementId());switch(this.getCornerType(t,n)){case"INSIDE":case"OUTSIDE":this.getElementHasTopPlate(a,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,n)}}else if(l&&s){var h=e.getLeftElement(t.getElementId()),c=e.getRightElement(t.getElementId());switch(this.getCornerType(t,n)){case"INSIDE":this.getElementHasTopPlate(h,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,n);break;case"OUTSIDE":this.getElementHasTopPlate(h,e,n)?this.getElementHasTopPlate(c,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_2GT,n):this.getElementHasTopPlate(c,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_1GT,n)}}}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n)}}},{key:"correctKnotRightMiddleBack",value:function correctKnotRightMiddleBack(t,e,n){if((this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.noKnot,n),this.getElementIsGarderobeElement(t,n))&&!e.getIndexInGridByElementId(t.getElementId()).backside)if(e.getElementHasRightElement(t.getElementId()))if(e.getPlannerHasActiveBackside()){var o=e.getOppositeElement(t.getElementId());if(!o)return;var i=e.getRightElement(t.getElementId());if(!i)return;var s=e.getOppositeElement(i.getElementId());if(!s)return;this.getElementIsGarderobeElement(s,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot4er_0GT,n):this.getElementIsGarderobeElement(o,n)?this.getElementIsGarderobeElement(i,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot4er_0GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,n):this.getElementIsGarderobeElement(i,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,n)}else{var l=e.getRightElement(t.getElementId());if(!l)return;this.getElementIsGarderobeElement(l,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,n)}else if(e.getPlannerHasActiveBackside()){var r=e.getOppositeElement(t.getElementId());if(!r)return;this.getElementIsGarderobeElement(r,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,n)}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,n)}},{key:"correctKnotLeftMiddleBack",value:function correctKnotLeftMiddleBack(t,e,n){if(this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftMiddleBack,this.constructionRules.knotInfo.knotOPVs.noKnot,n),this.getElementIsGarderobeElement(t,n)){var o=e.getIndexInGridByElementId(t.getElementId()).backside;if(!o){var i=o?e.getElementHasRightElement(t.getElementId()):e.getElementHasLeftElement(t.getElementId());if(i){var s=e.getLeftElement(t.getElementId());if(this.getElementIsGarderobeElement(s,n))return}if(i)if(e.getPlannerHasActiveBackside()){var l=e.getLeftElement(t.getElementId());if(!l)return;var r=e.getOppositeElement(t.getElementId());if(!r)return;var a=e.getOppositeElement(null==l?void 0:l.getElementId());if(!a)return;this.getElementIsGarderobeElement(a,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot4er_0GT,n):this.getElementIsGarderobeElement(r,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,n)}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,n);else if(e.getPlannerHasActiveBackside()){var h=e.getOppositeElement(t.getElementId());this.getElementIsGarderobeElement(h,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,n)}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,n)}}}},{key:"correctKnotRightBottomFront",value:function correctKnotRightBottomFront(t,e,n){this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.noKnot,n);var o=e.getIndexInGridByElementId(t.getElementId()).backside,i=o?e.getElementHasLeftElement(t.getElementId()):e.getElementHasRightElement(t.getElementId());if(!e.getElementHasBottomElement(t.getElementId())){if(e.getPlannerHasActiveBackside())if(this.getElementHasBottomPlate(t,n))if(i){var s=o?e.getLeftElement(t.getElementId()):e.getRightElement(t.getElementId());s&&(this.getElementHasBottomPlate(s,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n))}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n);else if(i){var l=o?e.getLeftElement(t.getElementId()):e.getRightElement(t.getElementId());l&&(this.getElementHasBottomPlate(l,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot1er,n))}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot1er,n);else if(this.getElementHasBottomPlate(t,n)){var r=o?e.getLeftElement(t.getElementId()):e.getRightElement(t.getElementId());r&&!this.getElementHasBottomPlate(r,n)&&this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n)}else if(i){var a=o?e.getLeftElement(t.getElementId()):e.getRightElement(t.getElementId());a&&!this.getElementIsCornerElement(a,n)&&(this.getElementHasBottomPlate(a,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot1er,n))}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot1er,n);if(this.getElementIsCornerElement(t,n))switch(this.getCornerType(t,n)){case"INSIDE":var h=e.getRightElement(t.getElementId());if(h&&this.getElementIsCornerElement(h,n))if(e.getElementHasRightElement(h.getElementId())){var c=e.getRightElement(h.getElementId());this.getElementHasBottomPlate(c,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot4er_2GT,n)}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n);else h&&this.getElementHasBottomPlate(h,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,n);break;case"OUTSIDE":this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n)}}}},{key:"correctKnotRightTopFront",value:function correctKnotRightTopFront(t,e,n){this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.noKnot,n);var o=e.getIndexInGridByElementId(t.getElementId()).backside,i=o?e.getElementHasLeftElement(t.getElementId()):e.getElementHasRightElement(t.getElementId());if(e.getPlannerHasActiveBackside())if(this.getElementHasTopPlate(t,e,n))if(i){var s=o?e.getLeftElement(t.getElementId()):e.getRightElement(t.getElementId());s&&(this.getElementHasTopPlate(s,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n))}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n);else if(i){var l=o?e.getLeftElement(t.getElementId()):e.getRightElement(t.getElementId());l&&(this.getElementHasTopPlate(l,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot1er,n))}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot1er,n);else if(this.getElementHasTopPlate(t,e,n)){if(i){var r=o?e.getLeftElement(t.getElementId()):e.getRightElement(t.getElementId());r&&(this.getElementHasTopPlate(r,e,n)||this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n))}}else if(i){var a=o?e.getLeftElement(t.getElementId()):e.getRightElement(t.getElementId());a&&!this.getElementIsCornerElement(a,n)&&(this.getElementHasTopPlate(a,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot1er,n))}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot1er,n);if(this.getElementIsCornerElement(t,n)){var h=e.getElementHasLeftElement(t.getElementId()),c=e.getElementHasRightElement(t.getElementId());if(h||c){if(c&&!h){var u=e.getRightElement(t.getElementId());switch(this.getCornerType(t,n)){case"INSIDE":if(this.getElementIsCornerElement(u,n))if(e.getElementHasRightElement(u.getElementId())){var m=e.getRightElement(u.getElementId());this.getElementHasTopPlate(m,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot4er_2GT,n)}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n);else this.getElementHasTopPlate(u,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,n);break;case"OUTSIDE":this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n)}}else if(!c&&h){e.getLeftElement(t.getElementId());switch(this.getCornerType(t,n)){case"INSIDE":case"OUTSIDE":this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n)}}else if(c&&h){var d=e.getRightElement(t.getElementId());switch(this.getCornerType(t,n)){case"INSIDE":if(this.getElementIsCornerElement(d,n))if(e.getElementHasRightElement(d.getElementId())){var g=e.getRightElement(d.getElementId());this.getElementHasTopPlate(g,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot4er_2GT,n)}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n);else this.getElementHasTopPlate(d,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,n);break;case"OUTSIDE":this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n)}}}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n)}}},{key:"correctKnotRightBottomBack",value:function correctKnotRightBottomBack(t,e,n){this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.noKnot,n);var o=e.getIndexInGridByElementId(t.getElementId()).backside,i=o?e.getElementHasLeftElement(t.getElementId()):e.getElementHasRightElement(t.getElementId());if(!e.getElementHasBottomElement(t.getElementId())&&!e.getIndexInGridByElementId(t.getElementId()).backside){if(e.getPlannerHasActiveBackside())switch(this.getGroundPlatesNumOfRightNeighbors(t,e,n)){case 0:i?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_0GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,n);break;case 1:i?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_1GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,n);break;case 2:i?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n);break;case 3:i&&this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,n);break;case 4:i&&this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_4GT,n)}else if(this.getElementHasBottomPlate(t,n)){if(i){var s=o?e.getLeftElement(t.getElementId()):e.getRightElement(t.getElementId());s&&(this.getElementHasBottomPlate(s,n)||this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,n))}}else if(i){var l=o?e.getLeftElement(t.getElementId()):e.getRightElement(t.getElementId());l&&!this.getElementIsCornerElement(l,n)&&(this.getElementHasBottomPlate(l,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,n))}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,n);if(this.getElementIsCornerElement(t,n))switch(this.getCornerType(t,n)){case"INSIDE":this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n);break;case"OUTSIDE":var r=e.getRightElement(t.getElementId());if(this.getElementIsCornerElement(r,n)){var a=e.getRightElement(r.getElementId());this.getElementHasBottomPlate(a,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n)}else this.getElementHasBottomPlate(r,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n)}}}},{key:"correctKnotRightTopBack",value:function correctKnotRightTopBack(t,e,n){this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.noKnot,n);var o=e.getIndexInGridByElementId(t.getElementId()).backside,i=o?e.getElementHasLeftElement(t.getElementId()):e.getElementHasRightElement(t.getElementId());if(!e.getIndexInGridByElementId(t.getElementId()).backside){if(e.getPlannerHasActiveBackside())if(i)switch(this.getTopPlatesNumOfRightNeighbors(t,e,n)){case 0:this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_0GT,n);break;case 1:this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_1GT,n);break;case 2:this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_2GT,n);break;case 3:this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,n);break;case 4:this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_4GT,n)}else switch(this.getTopPlatesNumOfRightNeighbors(t,e,n)){case 0:this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,n);break;case 1:this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,n);break;case 2:this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n)}else if(this.getElementHasTopPlate(t,e,n)){if(i){var s=o?e.getLeftElement(t.getElementId()):e.getRightElement(t.getElementId());this.getElementIsCornerElement(s,n)||this.getElementHasTopPlate(s,e,n)||this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,n)}}else if(i){var l=o?e.getLeftElement(t.getElementId()):e.getRightElement(t.getElementId());l&&!this.getElementIsCornerElement(l,n)&&(this.getElementHasTopPlate(l,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,n))}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,n);if(this.getElementIsCornerElement(t,n)){var r=e.getElementHasLeftElement(t.getElementId()),a=e.getElementHasRightElement(t.getElementId());if(r||a){if(a&&!r){var h=e.getRightElement(t.getElementId());switch(this.getCornerType(t,n)){case"INSIDE":this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n);break;case"OUTSIDE":if(this.getElementIsCornerElement(h,n))if(e.getElementHasRightElement(h.getElementId())){var c=e.getRightElement(h.getElementId());this.getElementHasTopPlate(c,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n)}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n);else this.getElementHasTopPlate(h,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n)}}else if(!a&&r)this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n);else if(a&&r){var u=e.getRightElement(t.getElementId());switch(this.getCornerType(t,n)){case"INSIDE":this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n);break;case"OUTSIDE":if(this.getElementIsCornerElement(u,n))if(e.getElementHasRightElement(u.getElementId())){var m=e.getRightElement(u.getElementId());this.getElementHasTopPlate(m,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n)}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n);else this.getElementHasTopPlate(u,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n)}}}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n)}}}}])}(),d=h.ZP.initLog("Planner","WEB-PLANNER-LOGIC"),g=function(){return(0,s.Z)((function ConstructionRulesHandler(t,e,n){var o=this;(0,i.Z)(this,ConstructionRulesHandler),(0,l.Z)(this,"getValueOfOptionOfArticle",void 0),(0,l.Z)(this,"checkArticleHasOption",void 0),(0,l.Z)(this,"updateCfgValuesByPlanner",void 0),(0,l.Z)(this,"constructionRules",void 0),(0,l.Z)(this,"constructionRulesLoaded",void 0),(0,l.Z)(this,"hideOptionsForConstruction",void 0),(0,l.Z)(this,"partlistHelper",void 0),(0,l.Z)(this,"getOptionVal",(function(t,e,n){if(n.has(t)&&n.get(t).has(e)){var i=n.get(t).get(e);return null!=i?i:""}var s=o.getValueOfOptionOfArticle(t,e);return null!=s?s:""})),(0,l.Z)(this,"hasOptionValue",(function(t,e,n){return!(!n.has(t)||!n.get(t).has(e))||!!o.getValueOfOptionOfArticle(t,e)})),(0,l.Z)(this,"setOptionValue",(function(t,e,n,i){var s;if(i.has(t)||i.set(t,new Map),null===(s=i.get(t))||void 0===s||s.set(e,n),o.hideOptionsForConstruction.has(t)){var l=o.hideOptionsForConstruction.get(t).indexOf(e);l>=0&&o.hideOptionsForConstruction.get(t).splice(l,1)}})),(0,l.Z)(this,"getElementHasBottomPlate",(function(t,e){if(o.constructionRules.knotInfo.elementsWithGroundPlate)for(var n=0;n<o.constructionRules.knotInfo.elementsWithGroundPlate.length;n++){var i=o.constructionRules.knotInfo.elementsWithGroundPlate[n].onOPT,s=o.constructionRules.knotInfo.elementsWithGroundPlate[n].onOPVs,l=o.getOptionVal(t.getElementId(),i,e);return o.arrayContainsValue(s,l)}return!1})),(0,l.Z)(this,"getElementIsCornerElement",(function(t,e){return o.constructionRules.hasCORNER&&o.arrayContainsValue(o.constructionRules.knotInfo.cornerElements.onOPVs,o.getOptionVal(t.getElementId(),o.constructionRules.knotInfo.cornerElements.onOPT,e))})),(0,l.Z)(this,"getElementIsGarderobeElement",(function(t,e){return o.constructionRules.hasGARDEROBE&&o.arrayContainsValue(o.constructionRules.knotInfo.garderobeElements.onOPVs,o.getOptionVal(t.getElementId(),o.constructionRules.knotInfo.garderobeElements.onOPT,e))})),(0,l.Z)(this,"getCornerType",(function(t,e){return"OPVECK_I"==o.getOptionVal(t.getElementId(),"OPTELEMENT",e)?"INSIDE":"OPVECK_A"==o.getOptionVal(t.getElementId(),"OPTELEMENT",e)?"OUTSIDE":"NOCORNER"})),(0,l.Z)(this,"getElementHasTopPlate",(function(t,e,n){return!e.getElementHasTopElement(t.getElementId())||o.getElementHasBottomPlate(e.getTopElement(t.getElementId()),n)})),this.constructionRulesLoaded=!1,this.getValueOfOptionOfArticle=t,this.checkArticleHasOption=e,this.hideOptionsForConstruction=new Map,this.updateCfgValuesByPlanner=n,this.partlistHelper=new m(this.getOptionVal,this.setOptionValue,this.getElementHasBottomPlate,this.getElementIsCornerElement,this.getCornerType,this.getElementHasTopPlate,this.getElementIsGarderobeElement)}),[{key:"arrayContainsValue",value:function arrayContainsValue(t,e){if(Array.isArray(t)){for(var n=0;n<t.length;n++)if(t[n]==e)return!0;return!1}var o=t.split(";");for(n=0;n<o.length;n++)if(o[n]==e)return!0;return!1}},{key:"evalRule",value:function evalRule(t,e,n){for(var o=!0,i=e.split("&"),s=0;s<i.length;s++){var l=i[s].split("=")[0],r=i[s].split("=")[1],a=this.getOptionVal(t,l,n);a&&a!=r&&(o=!1)}return o}},{key:"setOptionDoShow",value:function setOptionDoShow(t,e,n){var o,i=this.constructionRules.optionsVisibilityInfo[e];null!=i.doShow&&(n.has(t)||n.set(t,new Map),null===(o=n.get(t))||void 0===o||o.set(e,i.doShow));if(this.hideOptionsForConstruction.has(t)){var s,l=this.hideOptionsForConstruction.get(t).indexOf(e);if(l>=0)null===(s=this.hideOptionsForConstruction.get(t))||void 0===s||s.splice(l,1)}}},{key:"setOptionDoHide",value:function setOptionDoHide(t,e,n){var o,i,s=this.constructionRules.optionsVisibilityInfo[e];n.has(t)||n.set(t,new Map),null===(o=n.get(t))||void 0===o||o.set(e,s.doHide),this.hideOptionsForConstruction.has(t)||this.hideOptionsForConstruction.set(t,[]),null===(i=this.hideOptionsForConstruction.get(t))||void 0===i||i.push(e)}},{key:"getCurOptionBasedConstructionRules",value:function getCurOptionBasedConstructionRules(t,e){for(var n=[],o=0;o<this.constructionRules.optionBasedConstructionRules.length;o++){var i=this.constructionRules.optionBasedConstructionRules[o];this.getOptionVal(t,i.masterOptionName,e)==i.masterOptionValue&&n.push(i)}return n}},{key:"setAllOptToDefault",value:function setAllOptToDefault(t,e,n,o){for(var i=[],s=void 0,l=0;l<this.constructionRules.optionsInfluenceRulesOfAllElements.length;l++){var r=this.constructionRules.optionsInfluenceRulesOfAllElements[l];for(var a in n)a==r.onOPT&&this.arrayContainsValue(r.onOPVs,n[a])&&i.push({opt:r.influenceOPT,opv:r.forceOPV,unvalidOPVs:r.unvalidOPVs,warning:r.warning,doShowWarning:!1})}for(var h=t.getAllElementIdsInGrid(),c=0;c<h.length;c++){var u;if(this.hideOptionsForConstruction.has(h[c])&&this.hideOptionsForConstruction.get(h[c]).length>0){for(;this.hideOptionsForConstruction.get(h[c]).length>0;){var m=this.hideOptionsForConstruction.get(h[c])[0];this.setOptionDoShow(h[c],m,e)}this.hideOptionsForConstruction.delete(h[c])}this.constructionRules.hasDMOD&&(t.getPlannerHasActiveBackside()?this.setOptionDoShow(h[c],"OPTDMOD",e):this.setOptionDoHide(h[c],"OPTDMOD",e));var d=t.getColumnCount();d>1?this.setOptionDoShow(h[c],"OPTMULTICOL",e):this.setOptionDoHide(h[c],"OPTMULTICOL",e),this.setOptionValue(h[c],"OPTCORNER_COL_L","OPVOHNE",e),this.setOptionValue(h[c],"OPTCORNER_COL_R","OPVOHNE",e);var g=t.getIndexInGridByElementId(h[c]);if(g.backside)this.setOptionValue(h[c],"OPTELEM_ON_BACK","OPVJA",e);else{if(this.setOptionValue(h[c],"OPTELEM_ON_BACK","OPVNEIN",e),g.col>0){var E=t.getPlannerElementAtGridPos(g.col-1,0,!1);if(E){var I=this.getOptionVal(E.getElementId(),"OPTELEMENT",e);"OPVECK_I"==I?this.setOptionValue(h[c],"OPTCORNER_COL_L","OPVECK_I",e):"OPVECK_A"==I?this.setOptionValue(h[c],"OPTCORNER_COL_L","OPVECK_A",e):this.setOptionValue(h[c],"OPTCORNER_COL_L","OPVOHNE",e)}}if(g.col<d-1){var O=t.getPlannerElementAtGridPos(g.col+1,0,!1);if(O){var k=this.getOptionVal(O.getElementId(),"OPTELEMENT",e);"OPVECK_I"==k?this.setOptionValue(h[c],"OPTCORNER_COL_R","OPVECK_I",e):"OPVECK_A"==k?this.setOptionValue(h[c],"OPTCORNER_COL_R","OPVECK_A",e):this.setOptionValue(h[c],"OPTCORNER_COL_R","OPVOHNE",e)}}}if(this.constructionRules.avoidOptionLastCol){var f=this.getOptionVal(h[c],this.constructionRules.avoidOptionLastCol.onOPT,e);this.arrayContainsValue(this.constructionRules.avoidOptionLastCol.onOPVs,f)&&g.col==d-1&&this.setOptionValue(h[c],this.constructionRules.avoidOptionLastCol.onOPT,this.constructionRules.avoidOptionLastCol.defaultOpv,e)}if(this.constructionRules.avoidOptionFirstCol){var R=this.getOptionVal(h[c],this.constructionRules.avoidOptionFirstCol.onOPT,e);this.arrayContainsValue(this.constructionRules.avoidOptionFirstCol.onOPVs,R)&&0==g.col&&this.setOptionValue(h[c],this.constructionRules.avoidOptionFirstCol.onOPT,this.constructionRules.avoidOptionFirstCol.defaultOpv,e)}var p=this.hasOptionValue(h[c],"OPTWW",e);if(t.getElementIsFirstInGrid(h[c])?(this.setOptionDoShow(h[c],"OPTWERKZEUGKASTEN",e),p&&(t.getSizeOfWholeSet().y>173&&!t.getPlannerHasActiveBackside()?this.setOptionDoShow(h[c],"OPTWW",e):this.setOptionDoHide(h[c],"OPTWW",e))):(this.setOptionDoHide(h[c],"OPTWERKZEUGKASTEN",e),p&&this.setOptionDoHide(h[c],"OPTWW",e)),e.has(h[c])||e.set(h[c],new Map),null===(u=e.get(h[c]))||void 0===u||u.set("DEBUG",t.getElementById(h[c]).getPosNr()+""),i.length>0)for(var P=0;P<i.length;P++){var T=this.getOptionVal(h[c],i[P].opt,e),V=!1;if(i[P].unvalidOPVs&&0!=i[P].unvalidOPVs.length){for(var _=i[P].unvalidOPVs.split(";"),B=0;B<_.length;B++)if(_[B]==T){V=!0;break}}else V=!0;V&&(T!=i[P].opv&&(this.setOptionValue(h[c],i[P].opt,i[P].opv,e),i[P].doShowWarning||(i[P].doShowWarning=!0,s=i[P].warning)))}if(n)for(var a in n)if(""!=a&&n[a]&&""!=n[a])for(l=0;l<this.constructionRules.optionsInfluenceRulesOfSingleElement.length;l++){r=this.constructionRules.optionsInfluenceRulesOfSingleElement[l];var v=!1;if(r.dir&&o&&o.length>0){if("TOP"==r.dir&&t.getElementHasBottomElement(h[c])&&o.indexOf(t.getBottomElement(h[c]).getElementId())>=0&&(v=!0),"DOWN"==r.dir&&t.getElementHasTopElement(h[c])&&o.indexOf(t.getTopElement(h[c]).getElementId())>=0&&(v=!0),"LEFT_RIGHT"==r.dir&&(t.getElementHasLeftElement(h[c])&&o.indexOf(t.getLeftElement(h[c]).getElementId())>=0||t.getElementHasRightElement(h[c])&&o.indexOf(t.getRightElement(h[c]).getElementId())>=0)&&(v=!0),"COL"==r.dir){var G=t.getIndexInGridByElementId(h[c]);t.getAllElementsInColumn(G.col,G.backside).forEach((function(t){return o.indexOf(t.ElementId)>=0?v=!0:void 0}))}if("BACK"==r.dir&&t.getPlannerHasActiveBackside()){var b=t.getOppositeElement(h[c]);b&&o.indexOf(b.getElementId())>=0&&(v=!0)}}else v=!0;if(v){T=this.getOptionVal(h[c],r.influenceOPT,e);a==r.onOPT&&T&&""!=T&&this.arrayContainsValue(r.unvalidOPVs,T)&&this.arrayContainsValue(r.onOPVs,n[a])&&(this.setOptionValue(h[c],r.influenceOPT,r.defaultOpv,e),r.warning&&(s=r.warning))}}var H=this.getCurOptionBasedConstructionRules(h[c],e);if(H)for(var C=0;C<H.length;C++)if(H[C].defaultOptions)for(var D=0;D<H[C].defaultOptions.length;D++){var A=H[C].defaultOptions[D];if(!A.rule||""==A.rule||this.evalRule(h[c],A.rule,e))for(var y=0;y<A.options.length;y++)"doShow"==A.value?this.setOptionDoShow(h[c],A.options[y],e):"doHide"==A.value&&this.setOptionDoHide(h[c],A.options[y],e),A.opv&&this.setOptionValue(h[c],A.options[y],A.opv,e)}this.setOptionValue(h[c],"OPTFAF_L_V","OPVOHNE_FAF",e),this.setOptionValue(h[c],"OPTFAF_L_H","OPVOHNE_FAF",e),this.setOptionValue(h[c],"OPTFAF_R_V","OPVOHNE_FAF",e),this.setOptionValue(h[c],"OPTFAF_R_H","OPVOHNE_FAF",e)}return s}},{key:"doCorrectAffectedElementsByOption",value:function doCorrectAffectedElementsByOption(t,e,n,o){if(null!=o&&1==o.length){var i=o[0];if(null!=n)for(var s in n){if(this.constructionRules.forceSameOptionInGrid&&this.arrayContainsValue(this.constructionRules.forceSameOptionInGrid,s)){var l=t.getIndexInGridByElementId(i).backside?t.getAllElementsInBackGrid():t.getAllElementsInFrontGrid();if(null!=l)for(var r=0;r<l.length;r++)this.setOptionValue(l[r].ElementId,s,n[s],e)}if(this.arrayContainsValue(this.constructionRules.forceSameOptionInCol,s)){var a=t.getIndexInGridByElementId(i),h=t.getAllElementsInColumn(a.col,a.backside);if(null!=h){if(t.getPlannerHasActiveBackside()){var c,u=t.getAllElementsInColumn(a.col,!a.backside);u&&(h=null===(c=h)||void 0===c?void 0:c.concat(u))}for(r=0;r<h.length;r++)this.setOptionValue(h[r].ElementId,s,n[s],e)}}if(this.arrayContainsValue(this.constructionRules.forceSameOptionInRow,s)){var m=t.getIndexInGridByElementId(i),d=t.getAllElementsInRow(m.row,m.backside);if(d&&t.getPlannerHasActiveBackside()){var g=t.getAllElementsInRow(m.row,!m.backside);g&&(d=d.concat(g))}for(r=0;r<d.length;r++)this.setOptionValue(d[r].ElementId,s,n[s],e)}}var E=t.getIndexInGridByElementId(i),I=t.getAllElementsInRow(E.row,E.backside);for(r=0;r<I.length;r++)if(I[r].getElementId()!=i)for(var O=0;O<this.constructionRules.forceSameOptionInRow.length;O++){var k=this.getOptionVal(I[r].getElementId(),this.constructionRules.forceSameOptionInRow[O],e);this.setOptionValue(i,this.constructionRules.forceSameOptionInRow[O],k,e);break}}}},{key:"handleVisibility_SHOW_HIDE",value:function handleVisibility_SHOW_HIDE(t,e,n,o){if(this.checkArticleHasOption(t,n.OPTCurrentElem)&&this.checkArticleHasOption(e,n.OPTNeighborElem)){var i=this.hideOptionsForConstruction.has(t)&&this.hideOptionsForConstruction.get(t).indexOf(n.OPTCurrentElem)>=0;this.setOptionDoHide(e,n.OPTNeighborElem,o),i||this.setOptionDoShow(t,n.OPTCurrentElem,o)}}},{key:"handleBacksideVisibility_SHOW_HIDE",value:function handleBacksideVisibility_SHOW_HIDE(t,e,n,o){if(this.checkArticleHasOption(t,n.OPTCurrentElem)&&this.checkArticleHasOption(e,n.OPTNeighborElem)){var i=this.constructionRules.optionsVisibilityInfo[n.OPTCurrentElem],s=this.constructionRules.optionsVisibilityInfo[n.OPTNeighborElem];i&&s&&this.getOptionVal(t,n.OPTCurrentElem,o)==i.doShow&&this.getOptionVal(e,n.OPTNeighborElem,o)==s.doShow&&this.setOptionDoHide(t,n.OPTCurrentElem,o)}}},{key:"handleVisibiliy_HIDE_HIDE",value:function handleVisibiliy_HIDE_HIDE(t,e,n,o){var i=this.constructionRules.optionsVisibilityInfo[n.OPTCurrentElem];if(this.checkArticleHasOption(t,n.OPTCurrentElem)&&this.checkArticleHasOption(e,n.OPTNeighborElem)){var s=this.constructionRules.optionsVisibilityInfo[n.OPTNeighborElem],l=i.doShow==this.getOptionVal(t,n.OPTCurrentElem,o),r=this.getOptionVal(e,n.OPTNeighborElem,o)==s.doShow;l&&r&&(this.setOptionDoHide(t,n.OPTCurrentElem,o),this.setOptionDoHide(e,n.OPTNeighborElem,o))}}},{key:"correctSimpleOpt",value:function correctSimpleOpt(t,e,n,o,i){var s=n.getPlannerElementAtGridPos(t,e,i);if(this.constructionRules.defaultConstructionRules.TOP){var l=void 0;if(n.getElementHasTopElement(s.ElementId)){l=n.getPlannerElementAtGridPos(t,e+1,i);for(var r=0;r<this.constructionRules.defaultConstructionRules.TOP.length;r++){var a=this.constructionRules.defaultConstructionRules.TOP[r];"SHOW_HIDE"==a.OPTValueRule?this.handleVisibility_SHOW_HIDE(s.ElementId,l.ElementId,a,o):"HIDE_HIDE"==a.OPTValueRule&&this.handleVisibiliy_HIDE_HIDE(s.ElementId,l.ElementId,a,o)}}}if(this.constructionRules.defaultConstructionRules.RIGHT){var h=void 0;if(i?n.getElementHasLeftElement(s.ElementId):n.getElementHasRightElement(s.ElementId)){h=i?n.getPlannerElementAtGridPos(t-1,e,i):n.getPlannerElementAtGridPos(t+1,e,i);for(r=0;r<this.constructionRules.defaultConstructionRules.RIGHT.length;r++){var c=this.constructionRules.defaultConstructionRules.RIGHT[r];"SHOW_HIDE"==c.OPTValueRule?this.handleVisibility_SHOW_HIDE(s.ElementId,h.ElementId,c,o):"HIDE_HIDE"==c.OPTValueRule&&this.handleVisibiliy_HIDE_HIDE(s.ElementId,h.ElementId,c,o)}}}if(this.constructionRules.defaultConstructionRules.DOWN){var u=void 0;if(e>0){u=n.getPlannerElementAtGridPos(t,e-1,i);for(r=0;r<this.constructionRules.defaultConstructionRules.DOWN.length;r++){var m=this.constructionRules.defaultConstructionRules.DOWN[r];"SHOW_HIDE"==m.OPTValueRule?this.handleVisibility_SHOW_HIDE(s.ElementId,u.ElementId,m,o):"HIDE_HIDE"==m.OPTValueRule&&this.handleVisibiliy_HIDE_HIDE(s.ElementId,u.ElementId,m,o)}}}var d=i?n.getLeftElement(s.ElementId):n.getRightElement(s.ElementId),g=i?n.getRightElement(s.ElementId):n.getLeftElement(s.ElementId),E=n.getTopElement(s.ElementId),I=n.getBottomElement(s.ElementId),O=i?n.getTopLeftElement(s.ElementId):n.getTopRightElement(s.ElementId);d?this.setOptionValue(s.ElementId,"OPTNACHBAR_RECHTS",this.getOptionVal(d.ElementId,"OPTELEMENT",o),o):this.setOptionDoHide(s.ElementId,"OPTNACHBAR_RECHTS",o),g?this.setOptionValue(s.ElementId,"OPTNACHBAR_LINKS",this.getOptionVal(g.ElementId,"OPTELEMENT",o),o):this.setOptionDoHide(s.ElementId,"OPTNACHBAR_LINKS",o),E?this.setOptionValue(s.ElementId,"OPTNACHBAR_OBEN",this.getOptionVal(E.ElementId,"OPTELEMENT",o),o):this.setOptionDoHide(s.ElementId,"OPTNACHBAR_OBEN",o),O?this.setOptionValue(s.ElementId,"OPTNACHBAR_OBEN_RECHTS",this.getOptionVal(O.ElementId,"OPTELEMENT",o),o):this.setOptionDoHide(s.ElementId,"OPTNACHBAR_OBEN_RECHTS",o),this.constructionRules.hasNeighbors&&this.constructionRules.hasNeighbors.indexOf("OPTNACHBAR_UNTEN")>=0&&(I?this.setOptionValue(s.ElementId,"OPTNACHBAR_UNTEN",this.getOptionVal(I.ElementId,"OPTELEMENT",o),o):this.setOptionDoHide(s.ElementId,"OPTNACHBAR_UNTEN",o))}},{key:"correctBack",value:function correctBack(t,e,n){if(this.constructionRules.hasDMOD)if(t.getPlannerHasActiveBackside()){var o=void 0;if(o=t.getOppositeElement(n),this.constructionRules.defaultConstructionRules.BACK)for(var i=0;i<this.constructionRules.defaultConstructionRules.BACK.length;i++){var s,l,r=this.constructionRules.defaultConstructionRules.BACK[i],a=!1;if(r.hideOnElemAndOppositeOPT&&r.hideOnElemAndOppositeOPV)this.arrayContainsValue(r.hideOnElemAndOppositeOPV,this.getOptionVal(n,r.hideOnElemAndOppositeOPT,e))&&this.arrayContainsValue(r.hideOnElemAndOppositeOPV,this.getOptionVal(null===(s=o)||void 0===s?void 0:s.getElementId(),r.hideOnElemAndOppositeOPT,e))&&(a=!0);if(a)this.setOptionDoHide(n,r.OPTCurrentElem,e),this.setOptionDoHide(o.getElementId(),r.OPTCurrentElem,e);else if("FORCE_HIDE"==r.OPTValueRule&&this.setOptionDoHide(o.getElementId(),r.OPTCurrentElem,e),"SHOW_HIDE"==r.OPTValueRule)this.handleBacksideVisibility_SHOW_HIDE(null===(l=o)||void 0===l?void 0:l.getElementId(),n,r,e);else"HIDE_HIDE"==r.OPTValueRule&&this.handleVisibiliy_HIDE_HIDE(o.ElementId,n,r,e)}this.getElementHasBottomPlate(o,e)?this.setOptionDoShow(n,"OPTOPP_RAHMEN_U_V",e):this.setOptionDoHide(n,"OPTOPP_RAHMEN_U_V",e),this.getElementHasTopPlate(o,t,e)?this.setOptionDoShow(n,"OPTOPP_RAHMEN_O_V",e):this.setOptionDoHide(n,"OPTOPP_RAHMEN_O_V",e)}else this.setOptionDoHide(n,"OPTOPP_RAHMEN_U_V",e),this.setOptionDoHide(n,"OPTOPP_RAHMEN_O_V",e)}},{key:"correctBottom",value:function correctBottom(t,e,n){var o="";if(this.constructionRules.correctLeftRight&&null!=this.constructionRules.correctLeftRight.rowIndex)for(var i=t.getAllElementsInRow(this.constructionRules.correctLeftRight.rowIndex,n),s=0;s<i.length;s++){var l=i[s];if(0==s){if(null==(o=this.getOptionVal(l.ElementId,this.constructionRules.correctLeftRight.optWithOptVal,e)))return;n?this.setOptionValue(l.ElementId,this.constructionRules.correctLeftRight.optRight,o,e):(this.setOptionValue(l.ElementId,this.constructionRules.correctLeftRight.optLeft,o,e),this.setOptionValue(l.ElementId,this.constructionRules.correctLeftRight.optLeftBack,o,e))}n?this.setOptionValue(l.ElementId,this.constructionRules.correctLeftRight.optLeft,o,e):(this.setOptionValue(l.ElementId,this.constructionRules.correctLeftRight.optRight,o,e),this.setOptionValue(l.ElementId,this.constructionRules.correctLeftRight.optRightBack,o,e))}}},{key:"getValidLadder",value:function getValidLadder(t,e,n){for(var o=e.getAllElementsInColumn(t,!1),i=0;i<this.constructionRules.correctLadder.validLadder.length;i++){var s=this.constructionRules.correctLadder.validLadder[i];if(o.length==s.colCount){for(var l=!0,r=0;r<o.length;r++){var a=o[r];if(this.getOptionVal(a.ElementId,s.heightOption,n)!=s.heightPerRow[r]&&(l=!1),!l)break}if(l)return s}}}},{key:"correctLadder",value:function correctLadder(t,e){if(this.constructionRules.correctLadder){for(var n=t.getAllElementsInRow(this.constructionRules.correctLadder.rowIndex,!1),o=0;o<n.length;o++){var i=t.getRowCount(o);if(this.constructionRules.correctLadder.onElementHighestRowCount&&-1==this.constructionRules.correctLadder.onElementHighestRowCount.indexOf(i))for(var s=t.getAllElementsInColumn(o,!1),l=0;l<s.length;l++)this.setOptionValue(s[l].ElementId,this.constructionRules.correctLadder.optHeight,this.constructionRules.correctLadder.opvDefaultHeight,e);if(i<t.getSizeOfHighesRow(!1)){var r,a=null===(r=t.getPlannerElementAtGridPos(o,i-1,!1))||void 0===r?void 0:r.getElementId();a&&this.getOptionVal(a,this.constructionRules.correctLadder.optHeight,e)==this.constructionRules.correctLadder.opvProblematicHeight&&this.setOptionValue(a,this.constructionRules.correctLadder.optHeight,this.constructionRules.correctLadder.opvDefaultHeight,e)}}for(o=0;o<n.length;o++){var h=n[o],c=this.getValidLadder(o,t,e);0==o&&this.setOptionValue(h.ElementId,this.constructionRules.correctLadder.optLadderLeft,c.optLadder,e);var u=c;if(t.getElementHasRightElement(h.getElementId())){var m=this.getValidLadder(o+1,t,e);m.colCount>c.colCount&&(u=m)}this.setOptionValue(h.getElementId(),this.constructionRules.correctLadder.optLadderRight,u.optLadder,e)}var d=t.getSizeOfHighesRow(!1);if(this.constructionRules.correctLadder.onElementHighestRowCount&&this.constructionRules.correctLadder.onElementHighestRowCount.indexOf(d)>=0){var g=t.getAllElementsInRow(d-1,!1);for(o=0;o<g.length;o++){var E=g[o];this.setOptionDoShow(E.getElementId(),this.constructionRules.correctLadder.optHasHeight,e)}}}}},{key:"correctSeries",value:function correctSeries(t,e){for(var n=!1,o=t.getAllElementIdsInGrid(),i=!1,s=!1,l=0;l<o.length;l++){var r=o[l];this.getElementIsCornerElement(t.getElementById(r),e)&&(i=!0),this.checkArticleHasOption(r,"OPTBR_ABDECKPLATTE")&&this.setOptionDoHide(r,"OPTBR_ABDECKPLATTE",e);var a=this.getOptionVal(r,"OPTABDECKPLATTE",e);this.checkArticleHasOption(r,"OPTABDECKPLATTE")&&"OPVMIT_PLATTE"==a&&(n=!0),"OPVBR_18"==this.getOptionVal(r,"OPTBR",e)&&(s=!0)}if(!t.getPlannerHasActiveBackside()&&t.getPlannerElementAtGridPos(0,0,!1)){for(var h=t.getSizeOfHighesRow(!1),c=[],u=[],m=[],d=0,g=0,E=t.getAllElementsInColumn(g,!1);null!=E;){if(E.length==h){var I=E[h-1];m.push(I),"OPVBR_75"==(a=this.getOptionVal(I.ElementId,"OPTBR",e))?d+=75:"OPVBR_18"==a?d+=18.75:"OPVBR_37"==a&&(d+=37.5),this.setOptionDoHide(I.ElementId,"OPTOBEN",e)}else m.length>0&&(c.push(m),u.push(d)),m=[],d=0;g++,E=t.getAllElementsInColumn(g,!1)}for(m.length>0&&(c.push(m),u.push(d)),l=0;l<c.length;l++){var O=c[l][0],k="";if(this.constructionRules.hasABD_Values.indexOf("OPVABDECKPLATTE_40")>=0&&Math.abs(u[l]-40.4)<3?k="OPVABDECKPLATTE_40":this.constructionRules.hasABD_Values.indexOf("OPVABDECKPLATTE_77")>=0&&Math.abs(u[l]-77.8)<3?k="OPVABDECKPLATTE_77":this.constructionRules.hasABD_Values.indexOf("OPVABDECKPLATTE_115")>=0&&Math.abs(u[l]-115.3)<3?k="OPVABDECKPLATTE_115":this.constructionRules.hasABD_Values.indexOf("OPVABDECKPLATTE_152")>=0&&Math.abs(u[l]-152.8)<3?k="OPVABDECKPLATTE_152":this.constructionRules.hasABD_Values.indexOf("OPVABDECKPLATTE_190")>=0&&Math.abs(u[l]-190.3)<3?k="OPVABDECKPLATTE_190":this.constructionRules.hasABD_Values.indexOf("OPVABDECKPLATTE_227")>=0&&Math.abs(u[l]-227.8)<3&&(k="OPVABDECKPLATTE_227"),""==k||i)for(var f=t.getAllElementsInGrid(),R=0;R<f.length;R++)this.checkArticleHasOption(f[R].getElementId(),"OPTABD_HIDE")&&this.setOptionDoShow(f[R].getElementId(),"OPTABD_HIDE",e);else for(var p=t.getAllElementsInGrid(),P=0;P<p.length;P++)this.checkArticleHasOption(p[P].getElementId(),"OPTABD_HIDE")&&this.setOptionDoHide(p[P].getElementId(),"OPTABD_HIDE",e);if(""==k||!n||i||s)for(var T=0;T<c[l].length;T++)this.setOptionDoShow(c[l][T].ElementId,"OPTOBEN",e);else this.setOptionValue(O.ElementId,"OPTBR_ABDECKPLATTE",k,e)}}}},{key:"correctForceOptOfElement",value:function correctForceOptOfElement(t,e,n,o){var i=e.getIndexInGridByElementId(t);if(i)for(var s=this.getCurOptionBasedConstructionRules(t,n),l=0;l<s.length;l++){if(s[l].forceOptions)for(var r=0;r<s[l].forceOptions.length;r++){var a=s[l].forceOptions[r];if(!a.rule||""==a.rule||this.evalRule(t,a.rule,n))for(var h=a.options,c=a.value,u=0;u<h.length;u++){var m=h[u],d=this.constructionRules.optionsVisibilityInfo[m];if(d.complementDir){var g=d.complementDir;o&&("LEFT"==g?g="RIGHT":"RIGHT"==g&&(g="LEFT"));var E=e.getNeighborElement(i.col,i.row,g,i.backside);if(null!=E){for(var I=this.getCurOptionBasedConstructionRules(E.ElementId,n),O=d.complementOPT,k=!1,f=0;f<I.length;f++)if(I[f].forceOptions)for(var R=0;R<I[f].forceOptions.length;R++){var p=I[f].forceOptions[R];if((!p.rule||""==p.rule||this.evalRule(E.ElementId,p.rule,n))&&(this.arrayContainsValue(p.options,O)&&(k=!0,"doShow"==c&&"doShow"==p.value&&("OPVFUELLUNG"==this.getOptionVal(t,"OPTELEMENT",n)&&"OPVFUELLUNG"==this.getOptionVal(E.ElementId,"OPTELEMENT",n)?(this.setOptionDoHide(E.ElementId,O,n),this.setOptionDoHide(E.ElementId,O,n)):this.setOptionDoShow(E.ElementId,O,n)),"doHide"==c&&"doHide"==p.value&&(this.setOptionDoHide(t,m,n),this.setOptionDoHide(E.ElementId,O,n)),"doShow"==c&&"doHide"==p.value||"doHide"==c&&"doShow"==p.value))){var P=!0;a.prio&&p.prio?P=a.prio<=p.prio:a.prio?P=!0:p.prio&&(P=!1),P?"doHide"==c?(this.setOptionDoHide(t,m,n),this.setOptionDoHide(E.ElementId,O,n)):"doShow"==c&&(this.setOptionDoShow(t,m,n),this.setOptionDoHide(E.ElementId,O,n)):"doHide"==p.value?(this.setOptionDoHide(t,m,n),this.setOptionDoHide(E.ElementId,O,n)):"doShow"==p.value&&(this.setOptionDoHide(t,m,n),this.setOptionDoShow(E.ElementId,O,n))}}k||("doShow"==c&&(this.setOptionDoShow(t,m,n),this.setOptionDoHide(E.ElementId,O,n)),"doHide"==c&&(this.setOptionDoHide(t,m,n),this.setOptionDoHide(E.ElementId,O,n)))}else"doShow"==c&&this.setOptionDoShow(t,m,n),"doHide"==c&&this.setOptionDoHide(t,m,n)}}}if(s[l].changeOptions)for(var T=0;T<s[l].changeOptions.length;T++){for(var V=!0,_=s[l].changeOptions[T].rule.split("&"),B=0;B<_.length;B++)if(_[B].indexOf("!=")>0){var v=_[B].split("!=")[0],G=_[B].split("!=")[1];this.getOptionVal(t,v,n)==G&&(V=!1)}else{v=_[B].split("=")[0],G=_[B].split("=")[1];this.getOptionVal(t,v,n)!=G&&(V=!1)}V&&(s[l].changeOptions[T].doShow&&this.setOptionDoShow(t,s[l].changeOptions[T].doShow,n),s[l].changeOptions[T].doHide&&this.setOptionDoHide(t,s[l].changeOptions[T].doHide,n),s[l].changeOptions[T].opt&&s[l].changeOptions[T].opv&&this.setOptionValue(t,s[l].changeOptions[T].opt,s[l].changeOptions[T].opv,n))}}}},{key:"correctNeighborCustomOLTs",value:function correctNeighborCustomOLTs(t,e,n){if(this.constructionRules.correctNeighborOPT&&0!=this.constructionRules.correctNeighborOPT.length)for(var o=0;o<this.constructionRules.correctNeighborOPT.length;o++){var i=e.getIndexInGridByElementId(t);if(this.setOptionValue(t,this.constructionRules.correctNeighborOPT[o].opt,"OPVOHNE",n),!i)return;var s=e.getNeighborElement(i.col,i.row,this.constructionRules.correctNeighborOPT[o].dir,i.backside);if(null!=s){var l=this.getOptionVal(s.ElementId,this.constructionRules.correctNeighborOPT[o].neighborOPT,n);""!=l&&this.setOptionValue(t,this.constructionRules.correctNeighborOPT[o].opt,l,n)}}}},{key:"doChangeRetailArticleNumbers",value:function doChangeRetailArticleNumbers(t,e){var n=t.getAllElementsInGrid();if(this.constructionRules.correctRetailArticleNumberByRule&&this.constructionRules.correctRetailArticleNumberByRule.length>0)for(var o=!0,i=0;i<this.constructionRules.correctRetailArticleNumberByRule.length;i++){var s=this.constructionRules.correctRetailArticleNumberByRule[i];if("global"==s.range){for(var l=0;l<n.length&&o;l++){this.evalRule(n[l].getElementId(),s.rule,e)||(o=!1)}if(o)return{doChange:!0,retailArticleRules:s.retailArticleRules}}}return{doChange:!1}}},{key:"setConstructionRules",value:function setConstructionRules(t){t&&t.constructionRules&&(this.constructionRules=t.constructionRules,this.partlistHelper.setConstructionRules(t.constructionRules),this.constructionRulesLoaded=!0)}},{key:"getConstructionRulesLoaded",value:function getConstructionRulesLoaded(){return this.constructionRulesLoaded}},{key:"updateOptionLogicBoxPlanner",value:(t=(0,o.Z)(a().mark((function _callee(t,e,n,o){var i,s,l,r,c,u,m;return a().wrap((function _callee$(a){for(;;)switch(a.prev=a.next){case 0:if(null!=this.constructionRules&&this.constructionRulesLoaded){a.next=3;break}return d.error(new h.GE("Error construction rules are not set for boxPlanner",{code:"WC_0012"})),a.abrupt("return");case 3:if(i=(new Date).getTime(),s=void 0,d.debug("BoxPlanner - updateOptionLogicInGrid start updateOptionLogicInGrid"),l=new Map,o)for(r=t.getAllElementIdsInGrid(),e=void 0,n=void 0,c=0;c<r.length;c++)this.getElementIsCornerElement(t.getElementById(r[c]),l)&&this.setOptionValue(r[c],"OPTELEMENT","OPVOFFENES_FACH",l);for(s=this.setAllOptToDefault(t,l,e,n),this.doCorrectAffectedElementsByOption(t,l,e,n),this.correctBottom(t,l,!1),t.getPlannerHasActiveBackside()&&this.correctBottom(t,l,!0),this.correctSeries(t,l),c=0;c<t.getColumnCount();c++)for(u=0;u<t.getRowCount(c);u++)this.correctSimpleOpt(c,u,t,l,!1);if(t.getPlannerHasActiveBackside())for(c=t.getColumnCount()-1;c>=0;c--)for(u=0;u<t.getRowCount(c);u++)this.correctSimpleOpt(c,u,t,l,!0);for(c=0;c<t.getColumnCount();c++)for(u=0;u<t.getRowCount(c);u++)this.correctForceOptOfElement(t.getPlannerElementAtGridPos(c,u,!1).ElementId,t,l,!1),this.correctNeighborCustomOLTs(t.getPlannerElementAtGridPos(c,u,!1).ElementId,t,l);if(t.getPlannerHasActiveBackside())for(c=t.getColumnCount()-1;c>=0;c--)for(u=0;u<t.getRowCount(c);u++)this.correctForceOptOfElement(t.getPlannerElementAtGridPos(c,u,!0).ElementId,t,l,!0),this.correctNeighborCustomOLTs(t.getPlannerElementAtGridPos(c,u,!0).ElementId,t,l);for(this.correctLadder(t,l),this.partlistHelper.calculateKnots(t,l),this.partlistHelper.calculateRahmen(t,l),c=0;c<t.getColumnCount();c++)for(u=0;u<t.getRowCount(c);u++)this.correctBack(t,l,t.getPlannerElementAtGridPos(c,u,!1).getElementId());return m=this.doChangeRetailArticleNumbers(t,l),a.next=25,this.updateCfgValuesByPlanner(l,void 0,this.constructionRules.partlistRules.bundleRules,m);case 25:return d.debug("BoxPlanner updateOptionLogic - Duration after setting Option Values of all Articles: "+((new Date).getTime()-i)),d.debug("BoxPlanner updateOptionLogic - Duration after setting updating configurator: "+((new Date).getTime()-i)),a.abrupt("return",s);case 28:case"end":return a.stop()}}),_callee,this)}))),function updateOptionLogicBoxPlanner(e,n,o,i){return t.apply(this,arguments)})},{key:"onElemDeleted",value:function onElemDeleted(t){this.hideOptionsForConstruction.has(t)&&this.hideOptionsForConstruction.delete(t)}},{key:"onElementCopy",value:function onElementCopy(t,e){if(this.hideOptionsForConstruction.has(t)){var n=this.hideOptionsForConstruction.get(t);this.hideOptionsForConstruction.set(e,(0,c.Z)(n))}}},{key:"getHasMaxElemCountPerColumn",value:function getHasMaxElemCountPerColumn(){return null!=this.constructionRules.maxElemCountPerCol}},{key:"getMaxElemCountPerColumn",value:function getMaxElemCountPerColumn(){return this.constructionRules.maxElemCountPerCol}},{key:"getForceWholePlanningSameHeight",value:function getForceWholePlanningSameHeight(){return this.constructionRules.forceWholePlanningSameHeight}}]);var t}(),E=n(64357),I=n(25036),O=h.ZP.initLog("Planner","WEB-PLANNER-LOGIC"),k=function(){return(0,s.Z)((function BoxPlannerGrid(t){(0,i.Z)(this,BoxPlannerGrid),(0,l.Z)(this,"plannedElementGrid",void 0),(0,l.Z)(this,"backModulPlannedElementGrid",void 0),(0,l.Z)(this,"hasActiveBackside",void 0),(0,l.Z)(this,"getValueOfOptionOfArticle",void 0),this.plannedElementGrid=new Array(new Array),this.backModulPlannedElementGrid=new Array(new Array),this.hasActiveBackside=!1,this.getValueOfOptionOfArticle=t}),[{key:"getGridColumnWidth",value:function getGridColumnWidth(t,e){for(var n=-1,o=e?this.backModulPlannedElementGrid:this.plannedElementGrid,i=0;i<o[t].length;i++){var s=o[t][i]?null==o[t][i].Width?0:o[t][i].Width:0;s>n&&(n=s)}return n}},{key:"getGridColumnHeight",value:function getGridColumnHeight(t){var e=0;if(this.plannedElementGrid.length>t)for(var n=this.plannedElementGrid[t],o=0;o<n.length;o++){var i;e+=null===(i=n[o])||void 0===i?void 0:i.Height}return e}},{key:"deleteGridPos",value:function deleteGridPos(t){var e=new Array,n=t.backside?this.backModulPlannedElementGrid:this.plannedElementGrid;if(1==n[t.col].length)for(var o=0;o<n.length;o++)o!=t.col&&(o<t.col?e[o]=n[o]:e[o-1]=n[o]);else for(o=0;o<n.length;o++)if(o!=t.col)e[o]=n[o];else{e[o]=new Array;for(var i=0;i<n[o].length;i++)i!=t.row&&(e[o][i]=n[o][i])}t.backside?this.backModulPlannedElementGrid=e:this.plannedElementGrid=e}},{key:"getPlannerElementAtGridPos",value:function getPlannerElementAtGridPos(t,e,n){var o=n?this.backModulPlannedElementGrid:this.plannedElementGrid;if(o[t]&&o[t][e])return o[t][e]}},{key:"getIndexInGridByElementId",value:function getIndexInGridByElementId(t){for(var e=0;e<this.plannedElementGrid.length;e++)for(var n=0;n<this.plannedElementGrid[e].length;n++)if(this.plannedElementGrid[e][n]&&this.plannedElementGrid[e][n].ElementId==t)return{col:e,row:n,backside:!1};for(e=0;e<this.backModulPlannedElementGrid.length;e++)for(n=0;n<this.backModulPlannedElementGrid[e].length;n++)if(this.backModulPlannedElementGrid[e][n]&&this.backModulPlannedElementGrid[e][n].ElementId==t)return{col:e,row:n,backside:!0};return{col:-1,row:-1,backside:!1}}},{key:"getAllElementIdsInGrid",value:function getAllElementIdsInGrid(){for(var t=[],e=0;e<this.plannedElementGrid.length;e++)for(var n=0;n<this.plannedElementGrid[e].length;n++)this.plannedElementGrid[e][n]&&t.push(this.plannedElementGrid[e][n].ElementId);for(e=0;e<this.backModulPlannedElementGrid.length;e++)for(n=0;n<this.backModulPlannedElementGrid[e].length;n++)this.backModulPlannedElementGrid[e][n]&&t.push(this.backModulPlannedElementGrid[e][n].ElementId);return t}},{key:"getAllElementsInFrontGrid",value:function getAllElementsInFrontGrid(){for(var t=[],e=0;e<this.plannedElementGrid.length;e++)for(var n=0;n<this.plannedElementGrid[e].length;n++)t.push(this.plannedElementGrid[e][n]);return t}},{key:"getAllElementsInBackGrid",value:function getAllElementsInBackGrid(){for(var t=[],e=0;e<this.backModulPlannedElementGrid.length;e++)for(var n=0;n<this.backModulPlannedElementGrid[e].length;n++)t.push(this.backModulPlannedElementGrid[e][n]);return t}},{key:"getAllElementsInGrid",value:function getAllElementsInGrid(){for(var t=[],e=0;e<this.plannedElementGrid.length;e++)for(var n=0;n<this.plannedElementGrid[e].length;n++)t.push(this.plannedElementGrid[e][n]);for(e=0;e<this.backModulPlannedElementGrid.length;e++)for(n=0;n<this.backModulPlannedElementGrid[e].length;n++)this.backModulPlannedElementGrid[e][n]&&t.push(this.backModulPlannedElementGrid[e][n]);return t}},{key:"getElementById",value:function getElementById(t){var e=this.getIndexInGridByElementId(t);return(e.backside?this.backModulPlannedElementGrid:this.plannedElementGrid)[e.col][e.row]}},{key:"getElementIsFirstInGrid",value:function getElementIsFirstInGrid(t){var e=this.getIndexInGridByElementId(t);return 0==e.col&&0==e.row&&!e.backside}},{key:"getElementIsInLastCol",value:function getElementIsInLastCol(t,e){var n=e?this.backModulPlannedElementGrid:this.plannedElementGrid;return this.getIndexInGridByElementId(t).col+1==n.length}},{key:"getElementHasTopElement",value:function getElementHasTopElement(t){var e=this.getIndexInGridByElementId(t);return(e.backside?this.backModulPlannedElementGrid:this.plannedElementGrid)[e.col].length>e.row+1}},{key:"getTopElement",value:function getTopElement(t){var e=this.getIndexInGridByElementId(t),n=e.backside?this.backModulPlannedElementGrid:this.plannedElementGrid;if(n[e.col].length>e.row+1)return n[e.col][e.row+1]}},{key:"getTopRightElement",value:function getTopRightElement(t){var e=this.getIndexInGridByElementId(t),n=e.backside?this.backModulPlannedElementGrid:this.plannedElementGrid;if(n.length>e.col+1&&null!=n[e.col+1][e.row+1])return n[e.col+1][e.row+1]}},{key:"getTopLeftElement",value:function getTopLeftElement(t){var e=this.getIndexInGridByElementId(t),n=e.backside?this.backModulPlannedElementGrid:this.plannedElementGrid;if(e.col>0&&null!=n[e.col-1][e.row-1])return n[e.col-1][e.row-1]}},{key:"getElementHasBottomElement",value:function getElementHasBottomElement(t){return this.getIndexInGridByElementId(t).row-1>=0}},{key:"getBottomElement",value:function getBottomElement(t){var e=this.getIndexInGridByElementId(t),n=e.backside?this.backModulPlannedElementGrid:this.plannedElementGrid;if(e.row-1>=0)return n[e.col][e.row-1]}},{key:"getElementHasRightElement",value:function getElementHasRightElement(t){var e=this.getIndexInGridByElementId(t),n=e.backside?this.backModulPlannedElementGrid:this.plannedElementGrid;return n.length>e.col+1&&null!=n[e.col+1][e.row]}},{key:"getRightElement",value:function getRightElement(t){var e=this.getIndexInGridByElementId(t),n=e.backside?this.backModulPlannedElementGrid:this.plannedElementGrid;if(n.length>e.col+1&&null!=n[e.col+1][e.row])return n[e.col+1][e.row]}},{key:"getElementHasLeftElement",value:function getElementHasLeftElement(t){var e=this.getIndexInGridByElementId(t);return e.col>0&&null!=this.getPlannerElementAtGridPos(e.col-1,e.row,e.backside)}},{key:"getLeftElement",value:function getLeftElement(t){var e=this.getIndexInGridByElementId(t);if(e.col>0&&null!=this.getPlannerElementAtGridPos(e.col-1,e.row,e.backside))return this.getPlannerElementAtGridPos(e.col-1,e.row,e.backside)}},{key:"getAllElementsInColumn",value:function getAllElementsInColumn(t,e){var n=e?this.backModulPlannedElementGrid:this.plannedElementGrid,o=new Array;if(!(t>=n.length)){for(var i=0;i<n[t].length;i++)n[t][i]&&o.push(n[t][i]);return n.length>t?o:void 0}}},{key:"getColumnCount",value:function getColumnCount(){return this.plannedElementGrid.length}},{key:"getRowCount",value:function getRowCount(t){return this.plannedElementGrid[t].length}},{key:"getAllElementsInRow",value:function getAllElementsInRow(t,e){for(var n=e?this.backModulPlannedElementGrid:this.plannedElementGrid,o=[],i=0;i<n.length;i++)n[i].length>t&&o.push(n[i][t]);return o}},{key:"getSizeOfHighesRow",value:function getSizeOfHighesRow(t){for(var e=t?this.backModulPlannedElementGrid:this.plannedElementGrid,n=0,o=0;o<e.length;o++)n<e[o].length&&(n=e[o].length);return n}},{key:"getNeighborElement",value:function getNeighborElement(t,e,n,o){var i=t,s=e;switch(n){case"TOP":s++;break;case"DOWN":s--;break;case"LEFT":i--;break;case"RIGHT":i++;break;case"BACK":this.hasActiveBackside&&(o=!o)}return this.getPlannerElementAtGridPos(i,s,o)}},{key:"getOppositeElement",value:function getOppositeElement(t){if(this.hasActiveBackside){var e=this.getIndexInGridByElementId(t);return e.backside?this.plannedElementGrid[e.col][e.row]:this.backModulPlannedElementGrid[e.col][e.row]}}},{key:"getAllOppositeElements",value:function getAllOppositeElements(t){var e=[];if(this.hasActiveBackside)for(var n=0;n<t.length;n++){var o=this.getIndexInGridByElementId(t[n]);o.backside?e.push(this.plannedElementGrid[o.col][o.row].getElementId()):this.backModulPlannedElementGrid[o.col][o.row]&&e.push(this.backModulPlannedElementGrid[o.col][o.row].getElementId())}return e}},{key:"getSizeOfWholeSet",value:function getSizeOfWholeSet(){for(var t=0,e=0,n=0,o=0;o<this.plannedElementGrid.length;o++){for(var i=0,s=0;s<this.plannedElementGrid[o].length;s++){var l=this.plannedElementGrid[o][s];i+=l.getHeight(),0==o&&0==s&&(e=l.getDepth())}i>n&&(n=i);var r=this.getGridColumnWidth(o,!1);o>0&&(77.9==r?r=75:40.4==r?r=37.5:21.7==r&&(r=18.75)),t+=r}return this.hasActiveBackside&&(e*=2),new E.P(t,n,e)}},{key:"getAllElementsInSameRowByElementId",value:function getAllElementsInSameRowByElementId(t){var e=this.getIndexInGridByElementId(t),n=this.getAllElementsInRow(e.row,!1);return this.hasActiveBackside&&(n=n.concat(this.getAllElementsInRow(e.row,!0))),{elementIds:n.map((function(t){return t.ElementId})),plannerElements:n,backside:e.backside}}},{key:"getAllElementsDown",value:function getAllElementsDown(t){var e=this.getIndexInGridByElementId(t);if(0==e.row)return{elements:[],backside:!1};for(var n=[],o=0;o<e.row;o++){var i=this.getPlannerElementAtGridPos(e.col,o,e.backside);null!=i&&n.push(i.ElementId)}return{elements:n,backside:e.backside}}},{key:"getAllElementsInSameCol",value:function getAllElementsInSameCol(t){var e=this.getIndexInGridByElementId(t),n=this.getAllElementsInColumn(e.col,e.backside);return null==n&&(n=[]),{elements:n.map((function(t){return t.ElementId})),backside:e.backside}}},{key:"prepareGridForCopy",value:function prepareGridForCopy(t,e){var n=this.getIndexInGridByElementId(t),o=0;switch(e){case"AVL":o=n.col;break;case"AVR":o=n.col+1}for(var i=new Array,s=0;s<this.plannedElementGrid.length+1;s++)i[s]=new Array;for(s=0;s<this.plannedElementGrid.length;s++)for(var l=0;l<this.plannedElementGrid[s].length;l++)s<o?i[s][l]=this.plannedElementGrid[s][l]:i[s+1][l]=this.plannedElementGrid[s][l];if(this.plannedElementGrid=i,this.hasActiveBackside){i=new Array;for(s=0;s<this.backModulPlannedElementGrid.length+1;s++)i[s]=new Array;for(s=0;s<this.backModulPlannedElementGrid.length;s++)for(l=0;l<this.backModulPlannedElementGrid[s].length;l++)s<o?i[s][l]=this.backModulPlannedElementGrid[s][l]:i[s+1][l]=this.backModulPlannedElementGrid[s][l];this.backModulPlannedElementGrid=i}}},{key:"prepareGridForBackSideCopy",value:function prepareGridForBackSideCopy(){this.backModulPlannedElementGrid=new Array;for(var t=0;t<this.plannedElementGrid.length;t++)this.backModulPlannedElementGrid.push(new Array);this.hasActiveBackside=!0}},{key:"addElementAtGridPos",value:function addElementAtGridPos(t,e,n,o){var i=o?this.backModulPlannedElementGrid:this.plannedElementGrid;i&&0!=i.length||(i=new Array),i[e]&&0!=i[e].length||(i[e]=new Array),i[e][n]=t,o?(this.hasActiveBackside=!0,this.backModulPlannedElementGrid=i):this.plannedElementGrid=i}},{key:"addElementAsCopy",value:function addElementAsCopy(t,e,n){var o=this.getIndexInGridByElementId(t),i=o.backside?this.backModulPlannedElementGrid:this.plannedElementGrid,s=!0;switch(n){case"AVR":i[o.col+1][o.row]=e;break;case"AVL":i[o.col-1][o.row]=e;break;case"AVO":i[o.col][o.row+1]=e;break;case"BACKSIDE":this.backModulPlannedElementGrid[o.col][o.row]=e,s=!1}s&&(o.backside?this.backModulPlannedElementGrid=i:this.plannedElementGrid=i)}},{key:"deleteElement",value:function deleteElement(t,e){var n=this.getIndexInGridByElementId(t),o=[];!this.hasActiveBackside||e&&"BoxPlanner_backside"==e||o.push(this.backModulPlannedElementGrid[n.col][n.row]),o.push(this.plannedElementGrid[n.col][n.row]);for(var i=[],s=0;s<o.length;s++)I.Z.removeDockingPointRelations(o[s]),e&&"BoxPlanner_backside"==e?e&&"BoxPlanner_backside"==e&&(this.backModulPlannedElementGrid[n.col][n.row]=void 0):this.deleteGridPos(this.getIndexInGridByElementId(o[s].ElementId)),i.push(o[s].getElementId());return i}},{key:"updateWorldPosOfElements",value:function updateWorldPosOfElements(){for(var t=0;t<this.plannedElementGrid.length;t++)for(var e=0;e<this.plannedElementGrid[t].length;e++){var n=this.plannedElementGrid[t][e];I.Z.removeDockingPointRelations(n)}if(this.hasActiveBackside)for(t=0;t<this.backModulPlannedElementGrid.length;t++)for(e=0;e<this.backModulPlannedElementGrid[t].length;e++){var o=this.backModulPlannedElementGrid[t][e];o&&I.Z.removeDockingPointRelations(o)}var i=1;for(t=0;t<this.plannedElementGrid.length;t++){for(e=0;e<this.plannedElementGrid[t].length;e++){var s=this.plannedElementGrid[t][e];this.plannedElementGrid[t]&&this.plannedElementGrid[t][e+1]&&I.Z.tryDockElement(s,"AVO",[this.plannedElementGrid[t][e+1]]),s.PosNr=i,i++}this.plannedElementGrid[t+1]&&this.plannedElementGrid[t+1][0]&&I.Z.tryDockElement(this.plannedElementGrid[t][0],"AVR",[this.plannedElementGrid[t+1][0]])}if(this.hasActiveBackside)for(t=0;t<this.backModulPlannedElementGrid.length;t++){for(e=0;e<this.backModulPlannedElementGrid[t].length;e++){var l=this.backModulPlannedElementGrid[t][e],r=this.plannedElementGrid[t][e].getDockingPointById("AVO_AVO_2_IL");r?l&&I.Z.tryDockElementToDP(l,this.plannedElementGrid[t][e],r):O.error(new h.GE("Error Loading DockingPoint AVO_2 for plannerElement")),this.backModulPlannedElementGrid[t]&&this.backModulPlannedElementGrid[t][e+1]&&l&&this.backModulPlannedElementGrid[t][e+1]&&I.Z.tryDockElement(l,"AVO",[this.backModulPlannedElementGrid[t][e+1]]),l&&(l.PosNr=i),i++}this.backModulPlannedElementGrid[t+1]&&this.backModulPlannedElementGrid[t+1][0]&&this.backModulPlannedElementGrid[t][0]&&I.Z.tryDockElement(this.backModulPlannedElementGrid[t][0],"AVL",[this.backModulPlannedElementGrid[t+1][0]])}}},{key:"destroyBoxPlannerGrid",value:function destroyBoxPlannerGrid(){for(var t=0;t<this.plannedElementGrid.length;t++){for(var e=0;e<this.plannedElementGrid[t].length;e++){this.plannedElementGrid[t][e].destroy()}this.plannedElementGrid[t]=[]}if(this.plannedElementGrid=[],this.hasActiveBackside){this.hasActiveBackside=!1;for(t=0;t<this.backModulPlannedElementGrid.length;t++){for(e=0;e<this.backModulPlannedElementGrid[t].length;e++){var n=this.backModulPlannedElementGrid[t][e];n&&n.destroy()}this.backModulPlannedElementGrid[t]=[]}this.backModulPlannedElementGrid=[]}}},{key:"getAllElementsInBacksideModuleGrid",value:function getAllElementsInBacksideModuleGrid(){for(var t=[],e=0;e<this.backModulPlannedElementGrid.length;e++)for(var n=0;n<this.backModulPlannedElementGrid[e].length;n++)this.backModulPlannedElementGrid[e][n]&&t.push(this.backModulPlannedElementGrid[e][n].ElementId);return t}},{key:"destroyBacksideModuleGrid",value:function destroyBacksideModuleGrid(){this.hasActiveBackside=!1;for(var t=[],e=0;e<this.backModulPlannedElementGrid.length;e++){for(var n=0;n<this.backModulPlannedElementGrid[e].length;n++){var o=this.backModulPlannedElementGrid[e][n];o&&(t.push(o.ElementId),o.destroy())}this.backModulPlannedElementGrid[e]=[]}this.backModulPlannedElementGrid=[]}},{key:"getPlannerHasActiveBackside",value:function getPlannerHasActiveBackside(){return this.hasActiveBackside}},{key:"getBoundingBox",value:function getBoundingBox(){var t,e=0,n=0,o=0,i=0,s=0,l=this.plannedElementGrid[0][0].getDepth(),r=0;t="RIGHT";for(var a=0;a<this.plannedElementGrid.length;a++){var h=this.plannedElementGrid[a][0],c=this.getValueOfOptionOfArticle(h.getElementId(),"OPTELEMENT");"RIGHT"==t?i+=this.plannedElementGrid[a][0].getWidth():"FRONT"==t?l+=this.plannedElementGrid[a][0].getWidth():"LEFT"==t?i-=this.plannedElementGrid[a][0].getWidth():"BACK"==t&&(l-=this.plannedElementGrid[a][0].getWidth()),"OPVECK_I"==c?"RIGHT"==t?t="FRONT":"FRONT"==t?t="LEFT":"LEFT"==t?t="BACK":"BACK"==t&&(t="RIGHT"):"OPVECK_A"==c&&("RIGHT"==t?t="BACK":"FRONT"==t?t="RIGHT":"LEFT"==t?t="FRONT":"BACK"==t&&(t="LEFT")),i<n&&(n=i),i>o&&(o=i),l<s&&(s=l),l>r&&(r=l);var u=this.getGridColumnHeight(a);e=e<u?u:e}var m=r-s,d=o-n;return this.hasActiveBackside&&(m=2*this.plannedElementGrid[0][0].getDepth()),{width:Math.round(1e3*d)/1e3,height:Math.round(1e3*e)/1e3,depth:Math.round(1e3*m)/1e3}}}])}(),f=n(86829),R=n(57312),p=n(58178),P=h.ZP.initLog("Planner","WEB-PLANNER-LOGIC"),T=function(){function DivaBoxPlanner(t,e){(0,i.Z)(this,DivaBoxPlanner),(0,l.Z)(this,"set",void 0),(0,l.Z)(this,"plannerID",void 0),(0,l.Z)(this,"constructionRulesHandler",void 0),(0,l.Z)(this,"boxPlannerGrid",void 0),(0,l.Z)(this,"nextElementId",1),this.set=t,this.plannerID=e,this.constructionRulesHandler=new g(this.set.getValueOfOptionOfArticle,this.set.checkArticleHasOption,this.set.updateCfgValuesByPlanner),this.boxPlannerGrid=new k(this.set.getValueOfOptionOfArticle)}return(0,s.Z)(DivaBoxPlanner,[{key:"initPlanner",value:(u=(0,o.Z)(a().mark((function _callee(t){var e,n,o,i,s,l,r,c,u,m;return a().wrap((function _callee$(a){for(;;)switch(a.prev=a.next){case 0:if(null==(e=JSON.parse(h.ZP.decodeBase64(t))).v||2!=e.v){a.next=26;break}if(e.set&&e.set.elements&&0!=e.set.elements.length){a.next=4;break}return a.abrupt("return");case 4:n=e.set.elements,o=0;case 6:if(!(o<n.length)){a.next=21;break}return i=n[o],s=parseInt(i.elementID),l=new R.Z(this.set.getSetId(),i.basketID,s,DivaBoxPlanner.plannerType),this.nextElementId<s+1&&(this.nextElementId=s+1),this.set.setElementId(i.basketID,l.ElementId),this.constructionRulesHandler.getConstructionRulesLoaded()||this.constructionRulesHandler.setConstructionRules(this.set.getConstructionRuleOfElementId(l.ElementId)),(r=this.set.getPlannerData(l.ElementId))&&l.updatePlannerData(r),a.next=17,f.Z.loadSVG(l,this.set);case 17:this.boxPlannerGrid.addElementAtGridPos(l,i.boxPlannerInfo.gridPosCol,i.boxPlannerInfo.gridPosRow,i.boxPlannerInfo.isOnBackside);case 18:o++,a.next=6;break;case 21:return this.boxPlannerGrid.updateWorldPosOfElements(),a.next=24,this.constructionRulesHandler.updateOptionLogicBoxPlanner(this.boxPlannerGrid);case 24:a.next=42;break;case 26:c=1,o=0;case 28:if(!(o<e.Elements.length)){a.next=38;break}return u=e.Elements[o],(s=parseInt(u.ID))>c&&(c=s),m={boxElementID:u.ID,boxCol:u.col,boxRow:u.row,boxUpdateWholePlanning:!1},a.next=35,this.addPlannerElement(u.BasketID,m);case 35:o++,a.next=28;break;case 38:return this.nextElementId=c+1,this.boxPlannerGrid.updateWorldPosOfElements(),a.next=42,this.constructionRulesHandler.updateOptionLogicBoxPlanner(this.boxPlannerGrid);case 42:return a.abrupt("return",e);case 43:case"end":return a.stop()}}),_callee,this)}))),function initPlanner(t){return u.apply(this,arguments)})},{key:"saveSetPlanner",value:function saveSetPlanner(){for(var t=[],e=this.boxPlannerGrid.getAllElementIdsInGrid(),n=0;n<e.length;n++){var o=this.boxPlannerGrid.getElementById(e[n]);if(o){for(var i=this.boxPlannerGrid.getIndexInGridByElementId(e[n]),s=o.getDockingDockingPoints(),l=[],r=0;r<s.length;r++){var a,h={id:s[r].DpId,onID:s[r].OnElementId,onDPID:null===(a=s[r].OnDP)||void 0===a?void 0:a.DpId};l.push(h)}var c={elementID:o.getElementId(),basketID:this.set.getBasketId(o.getElementId()),CatalogCodex:this.set.getCatalogCodex(),Codex:this.set.getArticleCodex(o.getElementId()),posNr:o.PosNr,x:o.WorldPosCenter.x,y:o.WorldPosCenter.y,z:o.WorldPosCenter.z,rot:o.RotDeg,width:o.Width?o.Width:-1,height:o.Height?o.Height:-1,depth:o.Depth?o.Depth:-1,DP:l,boxPlannerInfo:{gridPosCol:i.col,gridPosRow:i.row,isOnBackside:i.backside}};t.push(c)}}var u=this.boxPlannerGrid.getBoundingBox();return{setId:this.set.getSetId(),x:0,y:0,z:0,width:u.width,height:u.height,depth:u.depth,rot:0,elements:t}}},{key:"addPlannerElement",value:(c=(0,o.Z)(a().mark((function _callee2(t,e){var n,o;return a().wrap((function _callee2$(i){for(;;)switch(i.prev=i.next){case 0:if(null!=e&&null!=e.boxElementID&&null!=e.boxCol&&null!=e.boxRow){i.next=2;break}return i.abrupt("return");case 2:return n=new R.Z(this.set.getSetId(),t,e.boxElementID,DivaBoxPlanner.plannerType),this.nextElementId=isNaN(e.boxElementID)?this.nextElementId:e.boxElementID+1,this.set.setElementId(t,n.ElementId),o=this.set.getPlannerData(n.ElementId),n.updatePlannerData(o),i.next=9,f.Z.loadSVG(n,this.set);case 9:if(this.constructionRulesHandler.getConstructionRulesLoaded()||this.constructionRulesHandler.setConstructionRules(this.set.getConstructionRuleOfElementId(n.ElementId)),this.boxPlannerGrid.addElementAtGridPos(n,e.boxCol,e.boxRow,null!=e.backside&&e.backside),!e.boxUpdateWholePlanning){i.next=15;break}return this.boxPlannerGrid.updateWorldPosOfElements(),i.next=15,this.constructionRulesHandler.updateOptionLogicBoxPlanner(this.boxPlannerGrid);case 15:case"end":return i.stop()}}),_callee2,this)}))),function addPlannerElement(t,e){return c.apply(this,arguments)})},{key:"extendPlanner",value:(r=(0,o.Z)(a().mark((function _callee3(t,e){return a().wrap((function _callee3$(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return");case 1:case"end":return t.stop()}}),_callee3)}))),function extendPlanner(t,e){return r.apply(this,arguments)})},{key:"copyPlannerElement",value:(n=(0,o.Z)(a().mark((function _callee4(t,e){var n,o,i,s,l,r,h,c=this;return a().wrap((function _callee4$(a){for(;;)switch(a.prev=a.next){case 0:if(n=!1,e){a.next=3;break}return a.abrupt("return");case 3:"STD"==e.copyType&&(e.targetElements=[]),o=[],i=this,s="AVR","BoxPlanner_backside"==e.copyType?s="BACKSIDE":"STD"!=e.copyType&&"BoxPlanner_COL"!=e.copyType||("AVR"==e.dpType?s="AVR":"AVO"==e.dpType?s="AVO":"AVL"==e.dpType&&(s="AVL")),t.forEach((function(t,i){var l;n||(!e||"AVL"!=e.dpType&&"AVR"!=e.dpType?e&&e.copyType&&"BoxPlanner_backside"==e.copyType&&(c.boxPlannerGrid.getPlannerHasActiveBackside()||c.boxPlannerGrid.prepareGridForBackSideCopy()):c.boxPlannerGrid.prepareGridForCopy(i,e.dpType)),n=!0;var r=new R.Z(c.set.getSetId(),t,c.nextElementId,DivaBoxPlanner.plannerType);c.nextElementId++,c.set.setElementId(t,r.ElementId);var a=c.set.getPlannerData(r.ElementId);r.updatePlannerData(a),c.boxPlannerGrid.addElementAsCopy(i,r,s),c.constructionRulesHandler.onElementCopy(i,r.getElementId()),o.push(r),"STD"==e.copyType&&(null===(l=e.targetElements)||void 0===l||l.push(r.getElementId()))})),l=0;case 10:if(!(l<o.length)){a.next=17;break}return a.next=13,f.Z.loadSVG(o[l],this.set);case 13:if("AVO"==s&&this.constructionRulesHandler.getHasMaxElemCountPerColumn()&&i.boxPlannerGrid.getIndexInGridByElementId(o[l].ElementId).row+1==i.constructionRulesHandler.getMaxElemCountPerColumn())for(r=o[l].getFreeDockingPointsByType("AVO"),h=0;h<r.length;h++)r[h].disableDP(!0);case 14:l++,a.next=10;break;case 17:return this.boxPlannerGrid.updateWorldPosOfElements(),a.next=20,this.constructionRulesHandler.updateOptionLogicBoxPlanner(this.boxPlannerGrid,e.changedOPT,e.targetElements);case 20:case"end":return a.stop()}}),_callee4,this)}))),function copyPlannerElement(t,e){return n.apply(this,arguments)})},{key:"initIDM3DMeta",value:function initIDM3DMeta(t){P.debug("No IDM3D Planner for BoxPlanner")}},{key:"getPlannerElementsInfluencedByDeletion",value:function getPlannerElementsInfluencedByDeletion(t){return this.constructionRulesHandler.getForceWholePlanningSameHeight()?0==this.boxPlannerGrid.getIndexInGridByElementId(t).row?[]:this.boxPlannerGrid.getAllElementsInSameRowByElementId(t).elementIds.filter((function(e){return e!=t})):[]}},{key:"getPlannerElementsInfluencedByCopy",value:function getPlannerElementsInfluencedByCopy(t,e){var n=[];if(e&&"NO"==(null==e?void 0:e.dpType)&&"BoxPlanner_backside"==e.copyType)return this.boxPlannerGrid.getAllElementIdsInGrid();if(e&&"BoxPlanner_COL"==e.copyType){for(var o=this.boxPlannerGrid.getIndexInGridByElementId(t),i=this.boxPlannerGrid.getAllElementsInColumn(o.col,o.backside),s=0;s<i.length;s++)n.push(i[s].getElementId());return n}if(n.push(t),e){switch(e.dpType){case"AVL":case"AVR":if(this.constructionRulesHandler.getForceWholePlanningSameHeight()){var l=this.boxPlannerGrid.getAllElementsInSameCol(t);n=l.elements,l.backside}else{var r=this.boxPlannerGrid.getAllElementsDown(t);n=n.concat(r.elements),r.backside}break;case"AVO":if(this.constructionRulesHandler.getForceWholePlanningSameHeight()){var a=this.boxPlannerGrid.getAllElementsInSameRowByElementId(t);n=a.elementIds,a.backside}}this.boxPlannerGrid.getPlannerHasActiveBackside()&&(n=n.concat(this.boxPlannerGrid.getAllOppositeElements(n)))}return n}},{key:"deletePlannerElement",value:(e=(0,o.Z)(a().mark((function _callee5(t,e,n){var o,i,s,l,r,h,c,u;return a().wrap((function _callee5$(e){for(;;)switch(e.prev=e.next){case 0:for(o=this.boxPlannerGrid.getIndexInGridByElementId(t),i={row:o.row,col:o.col,backside:o.backside},n&&"BoxPlanner_backside"==n?i={row:0,col:0,backside:!1}:o.row>0?i.row--:(s=0==o.col?0:o.col-1,(l=this.boxPlannerGrid.getAllElementsInColumn(s,o.backside))&&l.length>0&&(i.col=s,i.row=l.length-1)),r=this.boxPlannerGrid.deleteElement(t,n),h=0;h<r.length;h++)this.constructionRulesHandler.onElemDeleted(r[h]);if(c=!0,n&&"BoxPlanner_backside"==n&&(0==this.boxPlannerGrid.getAllElementsInBacksideModuleGrid().length?(this.boxPlannerGrid.destroyBacksideModuleGrid(),c=!0):c=!1),!c){e.next=11;break}return this.boxPlannerGrid.updateWorldPosOfElements(),e.next=11,this.constructionRulesHandler.updateOptionLogicBoxPlanner(this.boxPlannerGrid);case 11:if(!this.boxPlannerGrid.getPlannerElementAtGridPos(i.col,i.row,i.backside)){e.next=13;break}return e.abrupt("return",{newElementToSelect:null===(u=this.boxPlannerGrid.getPlannerElementAtGridPos(i.col,i.row,i.backside))||void 0===u?void 0:u.getElementId()});case 13:return e.abrupt("return",{});case 14:case"end":return e.stop()}}),_callee5,this)}))),function deletePlannerElement(t,n,o){return e.apply(this,arguments)})},{key:"getAllViewPlannerElements",value:function getAllViewPlannerElements(){return this.boxPlannerGrid.getAllElementsInGrid()}},{key:"getNeighborElements",value:function getNeighborElements(t,e){var n=this.boxPlannerGrid.getElementById(t);if(!n)return[];var o=null==n?void 0:n.getDockingDockingPointsByType(e);if(!o)return[];for(var i=[],s=0;s<(null==o?void 0:o.length);s++)null!=o[s]&&i.push(o[s].OnElementId);return i}},{key:"getFreeDockingPointsByElementId",value:function getFreeDockingPointsByElementId(t,e){return{dockingPoints:[],filter:[]}}},{key:"getDockedDockingPointsByElementId",value:function getDockedDockingPointsByElementId(t,e){return[]}},{key:"getDockedGroups",value:function getDockedGroups(){return[this.boxPlannerGrid.getAllElementIdsInGrid()]}},{key:"getBoundingBox",value:function getBoundingBox(){return P.warn("BoxPlanner - get2DViewPlannerBoundingBox not implemented yet","WC_0012"),new p.Z}},{key:"updatePlannerTrans",value:function updatePlannerTrans(t,e,n,o,i,s){return P.error(new h.GE("BoxPlanner - updatePlannerTrans not implemented yet",{code:"WC_0012"})),!1}},{key:"updatePlanner",value:(t=(0,o.Z)(a().mark((function _callee6(t,e){var n,o,i,s,l,r,h,c,u;return a().wrap((function _callee6$(a){for(;;)switch(a.prev=a.next){case 0:if(P.debug("BoxPlanner - configurationHasChanged "+t),!(t&&e&&e.length>0&&t.OPTELEMENT)||"OPVECK_I"!=t.OPTELEMENT&&"OPVECK_A"!=t.OPTELEMENT){a.next=18;break}if(!(e.length>1)){a.next=9;break}return a.next=5,this.constructionRulesHandler.updateOptionLogicBoxPlanner(this.boxPlannerGrid,t,e,!0);case 5:if(!(n=a.sent)){a.next=8;break}return a.abrupt("return",{elemIdsToDelete:[],viewMessageCodex:n});case 8:case 44:case 45:return a.abrupt("return",{elemIdsToDelete:[]});case 9:if(o=this.boxPlannerGrid.getIndexInGridByElementId(e[0]),i=e[0],o.row>0&&(i=this.boxPlannerGrid.getPlannerElementAtGridPos(o.col,0,!1).getElementId()),this.boxPlannerGrid.getElementHasLeftElement(i)&&this.boxPlannerGrid.getElementHasRightElement(i)){a.next=18;break}return s="NO",this.boxPlannerGrid.getElementHasLeftElement(i)||(s="AVL"),this.boxPlannerGrid.getElementHasRightElement(i)||(s="AVR"),l=this.getPlannerElementsInfluencedByCopy(i,{dpType:s,copyType:"BoxPlanner_COL"}),a.abrupt("return",{elemIdsToDelete:[],elementIdToCopy:l,copyDPType:s,copyType:"BoxPlanner_COL",ignoreOptionsToCopy:["OPTELEMENT"],changedOPT:t,targetElements:e});case 18:if(!t||!t.OPTDMOD){a.next=32;break}a.t0=t.OPTDMOD,a.next="OPVD_EIN"===a.t0?22:"OPVD_AUS"===a.t0?26:30;break;case 22:if(this.boxPlannerGrid.getPlannerHasActiveBackside()){a.next=25;break}return r=this.getPlannerElementsInfluencedByCopy(-1,{dpType:"NO",copyType:"BoxPlanner_backside"}),a.abrupt("return",{elemIdsToDelete:[],elementIdToCopy:r,copyType:"BoxPlanner_backside",changedOPT:t});case 25:case 29:return a.abrupt("break",30);case 26:if(!this.boxPlannerGrid.getPlannerHasActiveBackside()){a.next=29;break}return h=this.boxPlannerGrid.getAllElementsInBacksideModuleGrid(),a.abrupt("return",{elemIdsToDelete:h,deletionType:"BoxPlanner_backside",changedOPT:t});case 30:a.next=45;break;case 32:if(!(t&&t.OPTFARBE_RAHMEN&&"OPVSCHWARZ_MATT"==t.OPTFARBE_RAHMEN&&this.boxPlannerGrid.getPlannerHasActiveBackside())){a.next=37;break}return c=this.boxPlannerGrid.getAllElementsInBacksideModuleGrid(),a.abrupt("return",{elemIdsToDelete:c,deletionType:"BoxPlanner_backside",changedOPT:t,targetElements:e,viewMessageCodex:"BOXPLAN_BLACKFRAME_INCOMPATIBLE_ELEMENT_WARNING"});case 37:return a.next=39,this.constructionRulesHandler.updateOptionLogicBoxPlanner(this.boxPlannerGrid,t,e);case 39:if(!(u=a.sent)){a.next=44;break}return a.abrupt("return",{elemIdsToDelete:[],viewMessageCodex:u});case 46:case"end":return a.stop()}}),_callee6,this)}))),function updatePlanner(e,n){return t.apply(this,arguments)})},{key:"getSetData",value:function getSetData(t,e,n,o){for(var i={ID:"S1",H:"",x:0,y:0,z:0,w:0,ELE:[],Blob:this.set.CatalogData.supplierILN,Cat:this.set.getCatalogCodex(),ShowDim:n},s=this.boxPlannerGrid.getAllElementsInGrid(),l=0;l<s.length;l++){var r=s[l],a=r.ElementId,c=this.set.getPlannerConfigData(a).config,u={ID:"E"+a,N:c.N,Model:c.Model,x:-r.WorldPosCenter.x,y:r.WorldPosCenter.y,z:r.WorldPosCenter.z,PosPivot:"Center",w:r.getRotDeg(),RotPivot:"Center",DP:r.getDockingPointJS3D(),MAT:c.MAT,CFG:c.CFG,H:""},m=(0,h.FB)(JSON.stringify(u));u.H=m,i.ELE.push(u)}m=(0,h.FB)(JSON.stringify(i));return i.H=m,{constructionSet:i}}},{key:"getPlannerId",value:function getPlannerId(){return this.plannerID}},{key:"getElementPosInfo",value:function getElementPosInfo(){P.error(new h.GE("BoxPlanner - getElementPosInfo not implemented yet",{code:"WC_0012"}))}},{key:"destroyPlanner",value:function destroyPlanner(){this.boxPlannerGrid.destroyBoxPlannerGrid()}},{key:"getCatalogData",value:function getCatalogData(){return this.set.CatalogData}},{key:"getPlannerBoundingBox",value:function getPlannerBoundingBox(){return this.boxPlannerGrid.getBoundingBox()}},{key:"updatePlannerBoundingBox",value:function updatePlannerBoundingBox(){}},{key:"getPlanningIsComplete",value:function getPlanningIsComplete(){return null!=this.boxPlannerGrid.getPlannerElementAtGridPos(0,0,!1)}},{key:"updateSetPosNr",value:function updateSetPosNr(t){for(var e=this.boxPlannerGrid.getAllElementIdsInGrid(),n=0;n<e.length;n++){var o=e[n],i=this.boxPlannerGrid.getElementById(o);i&&(i.SetPosNr=t+i.PosNr-1,this.set.setPosNr(i.ElementId,i.getPosNr()))}return e.length}},{key:"clonePlanner",value:function clonePlanner(t,e,n){var o=new DivaBoxPlanner(t,e);return o.initPlanner(n),o}}]);var t,e,n,r,c,u}();(0,l.Z)(T,"plannerType","BOX")}}]);
2
+ "use strict";(self.webpackChunkCrystaldesignDivaWebPlannerReact=self.webpackChunkCrystaldesignDivaWebPlannerReact||[]).push([[2905],{82905:(t,o,i)=>{i.r(o),i.d(o,{default:()=>C});var l=i(84658),r=i(13125),a=i(43860),h=i(80248),c=i(50747),u=i.n(c),d=i(37537),m=i(12952),g=d.ZP.initLog("Planner","WEB-PLANNER-LOGIC"),E=function(){return(0,a.Z)((function BoxPlannerPartlistHelper(t,o,i,l,a,c,u){(0,r.Z)(this,BoxPlannerPartlistHelper),(0,h.Z)(this,"constructionRules",void 0),(0,h.Z)(this,"getOptionVal",void 0),(0,h.Z)(this,"setOptionValue",void 0),(0,h.Z)(this,"getElementHasBottomPlate",void 0),(0,h.Z)(this,"getElementIsCornerElement",void 0),(0,h.Z)(this,"getCornerType",void 0),(0,h.Z)(this,"getElementHasTopPlate",void 0),(0,h.Z)(this,"getElementIsGarderobeElement",void 0),this.getOptionVal=t,this.getElementHasBottomPlate=i,this.setOptionValue=o,this.getElementIsCornerElement=l,this.getCornerType=a,this.getElementHasTopPlate=c,this.getElementIsGarderobeElement=u}),[{key:"setConstructionRules",value:function setConstructionRules(t){this.constructionRules=t}},{key:"getGroundPlatesNumOfRightNeighbors",value:function getGroundPlatesNumOfRightNeighbors(t,o,i){if(o.getForceSingleCellPerElement()){var l=0;if(this.getElementHasBottomPlate(t,i)&&l++,o.getPlannerHasActiveBackside()){var r=o.getOppositeElement(t.getElementId());if(this.getElementHasBottomPlate(r,i)&&l++,o.getElementHasRightElement(t.getElementId())){var a=o.getRightElements(t.getElementId());if(a.length>0){var h=a[0],c=o.getOppositeElement(h.getElementId());this.getElementHasBottomPlate(h,i)&&l++,this.getElementHasBottomPlate(c,i)&&l++}return l}return l}if(o.getElementHasRightElement(t.getElementId())){var u=o.getRightElements(t.getElementId());if(u.length>0){var m=u[0];this.getElementHasBottomPlate(m,i)&&l++}return l}return l}g.error(new d.GE("BoxPlannerError - function getGroundPlatesNumOfRightNeighbors not supported for complex boxPlaner",{code:"WC_0012"}))}},{key:"getTopPlatesNumOfRightNeighbors",value:function getTopPlatesNumOfRightNeighbors(t,o,i){if(o.getForceSingleCellPerElement()){var l=0;if(this.getElementHasTopPlate(t,o,i)&&l++,o.getPlannerHasActiveBackside()){var r=o.getOppositeElement(t.getElementId());if(this.getElementHasTopPlate(r,o,i)&&l++,o.getElementHasRightElement(t.getElementId())){var a=o.getRightElements(t.getElementId());if(a.length>0){var h=a[0],c=o.getOppositeElement(h.getElementId());this.getElementHasTopPlate(h,o,i)&&l++,this.getElementHasTopPlate(c,o,i)&&l++}return l}return l}if(o.getElementHasRightElement(t.getElementId())){var u=o.getRightElements(t.getElementId());if(u.length>0){var m=u[0];this.getElementHasTopPlate(m,o,i)&&l++}return l}return l}g.error(new d.GE("BoxPlannerError - function getTopPlatesNumOfRightNeighbors not supported for complex boxPlaner",{code:"WC_0012"}))}},{key:"getElementHeight",value:function getElementHeight(t,o){var i=this.getOptionVal(t.getElementId(),"OPTHOEHE",o);return"OPVH_6"==i?"6":"OPVH_11"==i?"11":"OPVH_18"==i?"18":"37"}},{key:"getElementDepth",value:function getElementDepth(t,o){var i=this.getOptionVal(t.getElementId(),"OPTTIEFE",o);return"OPVTIEFE_18"==i?"18":"37"}},{key:"getElementRahmenColor",value:function getElementRahmenColor(t,o){var i=this.getOptionVal(t.getElementId(),"OPTFARBE_RAHMEN",o);return"OPVCHROM"==i?"CHROM":"OPVSCHWARZ_MATT"==i?"BLACK":"CHROM"}},{key:"calculateRahmen",value:function calculateRahmen(t,o){for(var i=t.getAllElementsInGridSortedbyGridPos(),l=0;l<i.length;l++)this.constructionRules.VarticalRahmenInfo&&(this.correctRahmenVerticalLeftFront(i[l],t,o),this.correctRahmenVerticalLeftBack(i[l],t,o),this.correctRahmenVerticalRightFront(i[l],t,o),this.correctRahmenVerticalRightBack(i[l],t,o),g.debug("---------Correct Senkrechte Rahmen for element with ID: "+i[l].ElementId+"; posNr: "+i[l].PosNr+" ----------"),g.debug("Senkrechter Rahmen links vorne: "+this.getOptionVal(i[l].ElementId,"OPTRAHMEN_L_V",o)),g.debug("Senkrechter Rahmen links hinten: "+this.getOptionVal(i[l].ElementId,"OPTRAHMEN_L_H",o)),g.debug("Senkrechter Rahmen rechts vorne : "+this.getOptionVal(i[l].ElementId,"OPTRAHMEN_R_V",o)),g.debug("Senkrechter Rahmen rechts hinten : "+this.getOptionVal(i[l].ElementId,"OPTRAHMEN_R_H",o))),this.constructionRules.DepthRahmenInfo&&(this.correctRahmenDepthLeftBottom(i[l],t,o),this.correctRahmenDepthLeftTop(i[l],t,o),this.correctRahmenDepthRightBottom(i[l],t,o),this.correctRahmenDepthRightTop(i[l],t,o),g.debug("---------Correct Tiefenverbinder Rahmen for element with ID: "+i[l].ElementId+"; posNr: "+i[l].PosNr+" ----------"),g.debug("Tiefen Rahmen links unten: "+this.getOptionVal(i[l].ElementId,"OPTRAHMEN_L_U",o)),g.debug("Tiefen Rahmen links oben: "+this.getOptionVal(i[l].ElementId,"OPTRAHMEN_L_O",o)),g.debug("Tiefen Rahmen rechts unten : "+this.getOptionVal(i[l].ElementId,"OPTRAHMEN_R_U",o)),g.debug("Tiefen Rahmen rechts oben : "+this.getOptionVal(i[l].ElementId,"OPTRAHMEN_R_O",o)))}},{key:"correctRahmenDepthLeftBottom",value:function correctRahmenDepthLeftBottom(t,o,i){if(this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.noRahmen,i),!(o.getCellsInGridByElementId(t.getElementId()).backside?o.getElementHasRightElement(t.getElementId()):o.getElementHasLeftElement(t.getElementId()))&&!o.getElementHasBottomElement(t.getElementId()))if(o.getPlannerHasActiveBackside())switch(this.getElementDepth(t,i)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,i);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,i)}else switch(this.getElementRahmenColor(t,i)){case"CHROM":if(this.getElementHasBottomPlate(t,i))this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Border_chrom,i);else switch(this.getElementDepth(t,i)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,i);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,i)}break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Border_black,i)}}},{key:"correctRahmenDepthLeftTop",value:function correctRahmenDepthLeftTop(t,o,i){if(this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.noRahmen,i),!(o.getCellsInGridByElementId(t.getElementId()).backside?o.getElementHasRightElement(t.getElementId()):o.getElementHasLeftElement(t.getElementId())))if(o.getPlannerHasActiveBackside())switch(this.getElementDepth(t,i)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,i);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,i)}else switch(this.getElementRahmenColor(t,i)){case"CHROM":if(this.getElementIsCornerElement(t,i))switch(this.getElementDepth(t,i)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,i);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,i)}else if(this.getElementHasTopPlate(t,o,i))this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Border_chrom,i);else switch(this.getElementDepth(t,i)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,i);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,i)}break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Border_black,i)}}},{key:"correctRahmenDepthRightBottom",value:function correctRahmenDepthRightBottom(t,o,i){if(o.getForceSingleCellPerElement()){this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.noRahmen,i);var l=o.getCellsInGridByElementId(t.getElementId()).backside?o.getElementHasLeftElement(t.getElementId()):o.getElementHasRightElement(t.getElementId());if(!o.getElementHasBottomElement(t.getElementId()))if(o.getPlannerHasActiveBackside())switch(this.getElementDepth(t,i)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,i);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,i)}else switch(this.getElementRahmenColor(t,i)){case"CHROM":if(l){var r=o.getRightElements(t.getElementId());if(r.length>0){var a=r[0];if(!this.getElementHasBottomPlate(t,i)||this.getElementIsCornerElement(t,i))switch(this.getElementDepth(t,i)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,i);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,i)}else if(!this.getElementHasBottomPlate(a,i)||this.getElementIsCornerElement(a,i))switch(this.getElementDepth(t,i)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,i);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,i)}else this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Middle_chrom,i)}}else if(this.getElementHasBottomPlate(t,i))this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Border_chrom,i);else switch(this.getElementDepth(t,i)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,i);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,i)}break;case"BLACK":l?this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Middle_black,i):this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Border_black,i)}}else g.error(new d.GE("BoxPlannerError - function correctRahmenDepthRightBottom not supported for complex boxPlaner",{code:"WC_0012"}))}},{key:"correctRahmenDepthRightTop",value:function correctRahmenDepthRightTop(t,o,i){if(o.getForceSingleCellPerElement()){this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.noRahmen,i);var l=o.getCellsInGridByElementId(t.getElementId()).backside,r=l?o.getElementHasLeftElement(t.getElementId()):o.getElementHasRightElement(t.getElementId());if(o.getPlannerHasActiveBackside())switch(this.getElementDepth(t,i)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,i);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,i)}else switch(this.getElementRahmenColor(t,i)){case"CHROM":if(!this.getElementHasTopPlate(t,o,i)||this.getElementIsCornerElement(t,i)){switch(this.getElementDepth(t,i)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,i);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,i)}return}if(!r)return void this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Border_chrom,i);var a=l?o.getLeftElements(t.getElementId()):o.getRightElements(t.getElementId());if(a.length>0){var h=a[0];if(!this.getElementHasTopPlate(h,o,i)||this.getElementIsCornerElement(h,i)){switch(this.getElementDepth(t,i)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,i);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,i)}return}}this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Middle_chrom,i);break;case"BLACK":r?this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Middle_black,i):this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Border_black,i)}}else g.error(new d.GE("BoxPlannerError - function correctRahmenDepthRightTop not supported for complex boxPlaner",{code:"WC_0012"}))}},{key:"correctRahmenVerticalLeftFront",value:function correctRahmenVerticalLeftFront(t,o,i){if(this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.noRahmen,i),!(o.getCellsInGridByElementId(t.getElementId()).backside?o.getElementHasRightElement(t.getElementId()):o.getElementHasLeftElement(t.getElementId())))switch(this.getElementHeight(t,i)){case"6":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH6,i);break;case"11":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH11,i);break;case"18":switch(this.getElementRahmenColor(t,i)){case"CHROM":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_chrom,i);break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_black,i)}break;case"37":if(this.getElementIsGarderobeElement(t,i))this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_Garderobe,i);else switch(this.getElementRahmenColor(t,i)){case"CHROM":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_chrom,i);break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_black,i)}}}},{key:"correctRahmenVerticalLeftBack",value:function correctRahmenVerticalLeftBack(t,o,i){this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.noRahmen,i);var l=o.getCellsInGridByElementId(t.getElementId()).backside;if(!l&&!(l?o.getElementHasRightElement(t.getElementId()):o.getElementHasLeftElement(t.getElementId())))switch(this.getElementHeight(t,i)){case"6":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH6,i);break;case"11":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH11,i);break;case"18":switch(this.getElementRahmenColor(t,i)){case"CHROM":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_chrom,i);break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_black,i)}break;case"37":if(this.getElementIsGarderobeElement(t,i))this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_Garderobe,i);else switch(this.getElementRahmenColor(t,i)){case"CHROM":if(o.getPlannerHasActiveBackside()){var r=o.getOppositeElement(t.getElementId());this.getElementIsGarderobeElement(r,i)?this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_Garderobe,i):this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_chrom,i)}else this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_chrom,i);break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_black,i)}}}},{key:"correctRahmenVerticalRightFront",value:function correctRahmenVerticalRightFront(t,o,i){if(o.getForceSingleCellPerElement()){this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.noRahmen,i);var l=o.getCellsInGridByElementId(t.getElementId()).backside,r=l?o.getElementHasLeftElement(t.getElementId()):o.getElementHasRightElement(t.getElementId());switch(this.getElementHeight(t,i)){case"6":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH6,i);break;case"11":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH11,i);break;case"18":switch(this.getElementRahmenColor(t,i)){case"CHROM":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_chrom,i);break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_black,i)}break;case"37":if(this.getElementIsGarderobeElement(t,i))this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_Garderobe,i);else switch(this.getElementRahmenColor(t,i)){case"CHROM":if(r){var a=l?o.getLeftElements(t.getElementId()):o.getRightElements(t.getElementId());if(a.length>0){var h=a[0];this.getElementIsGarderobeElement(h,i)?this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_Garderobe,i):this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_chrom,i)}}else this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_chrom,i);break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_black,i)}}}else g.error(new d.GE("BoxPlannerError - function correctRahmenVerticalRightFront not supported for complex boxPlaner",{code:"WC_0012"}))}},{key:"correctRahmenVerticalRightBack",value:function correctRahmenVerticalRightBack(t,o,i){if(this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.noRahmen,i),o.getForceSingleCellPerElement()){var l=o.getCellsInGridByElementId(t.getElementId()).backside;if(!l){var r=l?o.getElementHasLeftElement(t.getElementId()):o.getElementHasRightElement(t.getElementId());switch(this.getElementHeight(t,i)){case"6":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH6,i);break;case"11":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH11,i);break;case"18":switch(this.getElementRahmenColor(t,i)){case"CHROM":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_chrom,i);break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_black,i)}break;case"37":if(this.getElementIsGarderobeElement(t,i))this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_Garderobe,i);else switch(this.getElementRahmenColor(t,i)){case"CHROM":if(r){var a=l?o.getLeftElements(t.getElementId()):o.getRightElements(t.getElementId());if(0==a.length)return;if(a.length>0){var h=a[0];if(o.getPlannerHasActiveBackside()){var c=o.getOppositeElement(t.getElementId());if(!c)return;var u=o.getOppositeElement(h.getElementId());if(!u)return;this.getElementIsGarderobeElement(h,i)||this.getElementIsGarderobeElement(c,i)||this.getElementIsGarderobeElement(u,i)?this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_Garderobe,i):this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_chrom,i)}else this.getElementIsGarderobeElement(h,i)?this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_Garderobe,i):this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_chrom,i)}}else if(o.getPlannerHasActiveBackside()){var m=o.getOppositeElement(t.getElementId());this.getElementIsGarderobeElement(m,i)?this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_Garderobe,i):this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_chrom,i)}else this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_chrom,i);break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_black,i)}}}}else g.error(new d.GE("BoxPlannerError - function correctRahmenVerticalRightBack not supported for complex boxPlaner",{code:"WC_0012"}))}},{key:"calculateKnots",value:function calculateKnots(t,o){if(this.constructionRules.hasKNOTS)for(var i=t.getAllElementsInGridSortedbyGridPos(),l=0;l<i.length;l++)this.correctKnotLeftTopFront(i[l],t,o),this.correctKnotLeftTopBack(i[l],t,o),this.correctKnotLeftBottomFront(i[l],t,o),this.correctKnotLeftBottomBack(i[l],t,o),this.correctKnotRightTopFront(i[l],t,o),this.correctKnotRightTopBack(i[l],t,o),this.correctKnotRightBottomFront(i[l],t,o),this.correctKnotRightBottomBack(i[l],t,o),this.correctKnotRightMiddleBack(i[l],t,o),this.correctKnotLeftMiddleBack(i[l],t,o),g.debug("---------Correct Knots for element with ID: "+i[l].ElementId+"; posNr: "+i[l].PosNr+" ----------"),g.debug("Links oben vorne : "+this.getOptionVal(i[l].ElementId,"OPTKNOTEN_LTF",o)),g.debug("Links oben hinten : "+this.getOptionVal(i[l].ElementId,"OPTKNOTEN_LTB",o)),g.debug("Links unten vorne : "+this.getOptionVal(i[l].ElementId,"OPTKNOTEN_LBF",o)),g.debug("Links unten hinten : "+this.getOptionVal(i[l].ElementId,"OPTKNOTEN_LBB",o)),g.debug("Rechts oben vorne : "+this.getOptionVal(i[l].ElementId,"OPTKNOTEN_RTF",o)),g.debug("Rechts oben hinten : "+this.getOptionVal(i[l].ElementId,"OPTKNOTEN_RTB",o)),g.debug("Rechts unten vorne : "+this.getOptionVal(i[l].ElementId,"OPTKNOTEN_RBF",o)),g.debug("Links mitte hinten : "+this.getOptionVal(i[l].ElementId,"OPTKNOTEN_LMB",o)),g.debug("Rechts mitte hinten : "+this.getOptionVal(i[l].ElementId,"OPTKNOTEN_RMB",o)),g.debug("Rechts unten hinten : "+this.getOptionVal(i[l].ElementId,"OPTKNOTEN_RBB",o))}},{key:"correctKnotLeftBottomFront",value:function correctKnotLeftBottomFront(t,o,i){if(o.getForceSingleCellPerElement()){this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomFront,this.constructionRules.knotInfo.knotOPVs.noKnot,i);var l=o.getCellsInGridByElementId(t.getElementId()).backside?o.getElementHasRightElement(t.getElementId()):o.getElementHasLeftElement(t.getElementId());if(!o.getElementHasBottomElement(t.getElementId())&&(l||(o.getPlannerHasActiveBackside()&&this.getElementHasBottomPlate(t,i)&&this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i),this.getElementHasBottomPlate(t,i)||this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomFront,this.constructionRules.knotInfo.knotOPVs.knot1er,i)),this.getElementIsCornerElement(t,i))){var r=o.getLeftElements(t.getElementId());if(r.length>0){var a=r[0];if(this.getElementIsCornerElement(a,i))return;var h=o.getRightElements(t.getElementId());if(h.length>0){var c=h[0];switch(this.getCornerType(t,i)){case"INSIDE":this.getElementHasBottomPlate(a,i)?this.getElementHasBottomPlate(c,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomFront,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.getElementHasBottomPlate(c,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i);break;case"OUTSIDE":this.getElementHasBottomPlate(a,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i)}}}}}else g.error(new d.GE("BoxPlannerError - function correctKnotLeftBottomFront not supported for complex boxPlaner",{code:"WC_0012"}))}},{key:"correctKnotLeftTopFront",value:function correctKnotLeftTopFront(t,o,i){if(this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.noKnot,i),o.getForceSingleCellPerElement()){var l=o.getCellsInGridByElementId(t.getElementId()).backside?o.getElementHasRightElement(t.getElementId()):o.getElementHasLeftElement(t.getElementId());if(l||(o.getPlannerHasActiveBackside()&&this.getElementHasTopPlate(t,o,i)&&this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i),this.getElementHasTopPlate(t,o,i)||this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot1er,i)),this.getElementIsCornerElement(t,i)){var r=o.getElementHasLeftElement(t.getElementId());if(l&&this.getElementIsCornerElement(o.getLeftElements(t.getElementId())[0],i))return;var a=o.getElementHasRightElement(t.getElementId());if(r||a){if(a&&!r){var h=o.getRightElements(t.getElementId());if(h.length>0){var c=h[0];switch(this.getCornerType(t,i)){case"INSIDE":this.getElementHasTopPlate(c,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i);break;case"OUTSIDE":this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i)}}}else if(!a&&r){var u=o.getLeftElements(t.getElementId());if(u.length>0){var m=u[0];this.getElementHasTopPlate(m,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot3erer_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i)}}else if(a&&r){var E=o.getLeftElements(t.getElementId())[0],I=o.getRightElements(t.getElementId())[0];switch(this.getCornerType(t,i)){case"INSIDE":this.getElementHasTopPlate(E,o,i)?this.getElementHasTopPlate(I,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.getElementHasTopPlate(I,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i);break;case"OUTSIDE":this.getElementHasTopPlate(E,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i)}}}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i)}}else g.error(new d.GE("BoxPlannerError - function correctKnotLeftTopFront not supported for complex boxPlaner",{code:"WC_0012"}))}},{key:"correctKnotLeftBottomBack",value:function correctKnotLeftBottomBack(t,o,i){if(o.getForceSingleCellPerElement()){this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.noKnot,i);var l=o.getCellsInGridByElementId(t.getElementId()).backside?o.getElementHasRightElement(t.getElementId()):o.getElementHasLeftElement(t.getElementId());if(!o.getElementHasBottomElement(t.getElementId())){if(!l)if(o.getPlannerHasActiveBackside()&&!o.getCellsInGridByElementId(t.getElementId()).backside){var r=o.getOppositeElement(t.getElementId());r&&(this.getElementHasBottomPlate(t,i)?this.getElementHasBottomPlate(r,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,i):this.getElementHasBottomPlate(r,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,i))}else o.getPlannerHasActiveBackside()||this.getElementHasBottomPlate(t,i)||this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,i);if(this.getElementIsCornerElement(t,i)){var a=o.getLeftElements(t.getElementId())[0];if(this.getElementIsCornerElement(a,i))return;switch(this.getCornerType(t,i)){case"INSIDE":this.getElementHasBottomPlate(a,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,i);break;case"OUTSIDE":var h=o.getRightElements(t.getElementId())[0];this.getElementHasBottomPlate(a,i)?this.getElementHasBottomPlate(h,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_2GT,i):this.getElementHasBottomPlate(h,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_1GT,i)}}}}else g.error(new d.GE("BoxPlannerError - function correctKnotLeftBottomBack not supported for complex boxPlaner",{code:"WC_0012"}))}},{key:"correctKnotLeftTopBack",value:function correctKnotLeftTopBack(t,o,i){if(o.getForceSingleCellPerElement()){this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.noKnot,i);var l=o.getCellsInGridByElementId(t.getElementId()).backside?o.getElementHasRightElement(t.getElementId()):o.getElementHasLeftElement(t.getElementId());if(!l)if(o.getPlannerHasActiveBackside()&&!o.getCellsInGridByElementId(t.getElementId()).backside){var r=o.getOppositeElement(t.getElementId());r&&(this.getElementHasTopPlate(t,o,i)?this.getElementHasTopPlate(r,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,i):this.getElementHasTopPlate(r,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,i))}else o.getPlannerHasActiveBackside()||this.getElementHasTopPlate(t,o,i)||this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,i);if(this.getElementIsCornerElement(t,i)){var a=o.getElementHasLeftElement(t.getElementId());if(l&&this.getElementIsCornerElement(o.getLeftElements(t.getElementId())[0],i))return;var h=o.getElementHasRightElement(t.getElementId());if(a||h){if(h&&!a){var c=o.getRightElements(t.getElementId())[0];switch(this.getCornerType(t,i)){case"INSIDE":this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i);break;case"OUTSIDE":this.getElementHasTopPlate(c,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,i)}}else if(!h&&a){var u=o.getLeftElements(t.getElementId())[0];switch(this.getCornerType(t,i)){case"INSIDE":case"OUTSIDE":this.getElementHasTopPlate(u,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,i)}}else if(h&&a){var m=o.getLeftElements(t.getElementId())[0],E=o.getRightElements(t.getElementId())[0];switch(this.getCornerType(t,i)){case"INSIDE":this.getElementHasTopPlate(m,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,i);break;case"OUTSIDE":this.getElementHasTopPlate(m,o,i)?this.getElementHasTopPlate(E,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_2GT,i):this.getElementHasTopPlate(E,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_1GT,i)}}}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i)}}else g.error(new d.GE("BoxPlannerError - function correctKnotLeftTopBack not supported for complex boxPlaner",{code:"WC_0012"}))}},{key:"correctKnotRightMiddleBack",value:function correctKnotRightMiddleBack(t,o,i){if(o.getForceSingleCellPerElement()){if(this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.noKnot,i),this.getElementIsGarderobeElement(t,i)&&!o.getCellsInGridByElementId(t.getElementId()).backside)if(o.getElementHasRightElement(t.getElementId()))if(o.getPlannerHasActiveBackside()){var l=o.getOppositeElement(t.getElementId());if(!l)return;var r=o.getRightElements(t.getElementId());if(0==r.length)return;var a=r[0],h=o.getOppositeElement(a.getElementId());if(!h)return;this.getElementIsGarderobeElement(h,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot4er_0GT,i):this.getElementIsGarderobeElement(l,i)?this.getElementIsGarderobeElement(a,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot4er_0GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,i):this.getElementIsGarderobeElement(a,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,i)}else{var c=o.getRightElements(t.getElementId());if(0==c.length)return;var u=c[0];this.getElementIsGarderobeElement(u,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,i)}else if(o.getPlannerHasActiveBackside()){var m=o.getOppositeElement(t.getElementId());if(!m)return;this.getElementIsGarderobeElement(m,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,i)}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,i)}else g.error(new d.GE("BoxPlannerError - function correctKnotRightMiddleBack not supported for complex boxPlaner",{code:"WC_0012"}))}},{key:"correctKnotLeftMiddleBack",value:function correctKnotLeftMiddleBack(t,o,i){if(o.getForceSingleCellPerElement()){if(this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftMiddleBack,this.constructionRules.knotInfo.knotOPVs.noKnot,i),this.getElementIsGarderobeElement(t,i)){var l=o.getCellsInGridByElementId(t.getElementId()).backside;if(!l){var r=l?o.getElementHasRightElement(t.getElementId()):o.getElementHasLeftElement(t.getElementId());if(r){var a=o.getLeftElements(t.getElementId())[0];if(this.getElementIsGarderobeElement(a,i))return}if(r)if(o.getPlannerHasActiveBackside()){var h=o.getLeftElements(t.getElementId());if(0==h.length)return;var c=h[0],u=o.getOppositeElement(t.getElementId());if(!u)return;var m=o.getOppositeElement(null==c?void 0:c.getElementId());if(!m)return;this.getElementIsGarderobeElement(m,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot4er_0GT,i):this.getElementIsGarderobeElement(u,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,i)}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,i);else if(o.getPlannerHasActiveBackside()){var E=o.getOppositeElement(t.getElementId());this.getElementIsGarderobeElement(E,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,i)}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,i)}}}else g.error(new d.GE("BoxPlannerError - function correctKnotLeftMiddleBack not supported for complex boxPlaner",{code:"WC_0012"}))}},{key:"correctKnotRightBottomFront",value:function correctKnotRightBottomFront(t,o,i){if(o.getForceSingleCellPerElement()){this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.noKnot,i);var l=o.getCellsInGridByElementId(t.getElementId()).backside,r=l?o.getElementHasLeftElement(t.getElementId()):o.getElementHasRightElement(t.getElementId());if(!o.getElementHasBottomElement(t.getElementId())){if(o.getPlannerHasActiveBackside())if(this.getElementHasBottomPlate(t,i))if(r){var a=l?o.getLeftElements(t.getElementId()):o.getRightElements(t.getElementId()),h=void 0;a.length>0&&(h=a[0]),h&&(this.getElementHasBottomPlate(h,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i))}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i);else if(r){var c=l?o.getLeftElements(t.getElementId()):o.getRightElements(t.getElementId()),u=void 0;c.length>0&&(u=c[0]),u&&(this.getElementHasBottomPlate(u,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot1er,i))}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot1er,i);else if(this.getElementHasBottomPlate(t,i)){var m=l?o.getLeftElements(t.getElementId()):o.getRightElements(t.getElementId()),E=void 0;m.length>0&&(E=m[0]),E&&!this.getElementHasBottomPlate(E,i)&&this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i)}else if(r){var I=l?o.getLeftElements(t.getElementId()):o.getRightElements(t.getElementId()),O=void 0;I.length>0&&(O=I[0]),O&&!this.getElementIsCornerElement(O,i)&&(this.getElementHasBottomPlate(O,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot1er,i))}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot1er,i);if(this.getElementIsCornerElement(t,i))switch(this.getCornerType(t,i)){case"INSIDE":var p=o.getRightElements(t.getElementId())[0];if(p&&this.getElementIsCornerElement(p,i))if(o.getElementHasRightElement(p.getElementId())){var R=o.getRightElements(p.getElementId())[0];this.getElementHasBottomPlate(R,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot4er_2GT,i)}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i);else p&&this.getElementHasBottomPlate(p,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,i);break;case"OUTSIDE":this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i)}}}else g.error(new d.GE("BoxPlannerError - function correctKnotRightBottomFront not supported for complex boxPlaner",{code:"WC_0012"}))}},{key:"correctKnotRightTopFront",value:function correctKnotRightTopFront(t,o,i){if(o.getForceSingleCellPerElement()){this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.noKnot,i);var l=o.getCellsInGridByElementId(t.getElementId()).backside,r=l?o.getElementHasLeftElement(t.getElementId()):o.getElementHasRightElement(t.getElementId());if(o.getPlannerHasActiveBackside())if(this.getElementHasTopPlate(t,o,i))if(r){var a=l?o.getLeftElements(t.getElementId()):o.getRightElements(t.getElementId()),h=void 0;a.length>0&&(h=a[0]),h&&(this.getElementHasTopPlate(h,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i))}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i);else if(r){var c=l?o.getLeftElements(t.getElementId()):o.getRightElements(t.getElementId()),u=void 0;c.length>0&&(u=c[0]),u&&(this.getElementHasTopPlate(u,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot1er,i))}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot1er,i);else if(this.getElementHasTopPlate(t,o,i)){if(r){var m=l?o.getLeftElements(t.getElementId()):o.getRightElements(t.getElementId()),E=void 0;m.length>0&&(E=m[0]),E&&(this.getElementHasTopPlate(E,o,i)||this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i))}}else if(r){var I=l?o.getLeftElements(t.getElementId()):o.getRightElements(t.getElementId()),O=void 0;I.length>0&&(O=I[0]),O&&!this.getElementIsCornerElement(O,i)&&(this.getElementHasTopPlate(O,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot1er,i))}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot1er,i);if(this.getElementIsCornerElement(t,i)){var p=o.getElementHasLeftElement(t.getElementId()),R=o.getElementHasRightElement(t.getElementId());if(p||R){if(R&&!p){var k=o.getRightElements(t.getElementId())[0];switch(this.getCornerType(t,i)){case"INSIDE":if(this.getElementIsCornerElement(k,i))if(o.getElementHasRightElement(k.getElementId())){var P=o.getRightElements(k.getElementId())[0];this.getElementHasTopPlate(P,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot4er_2GT,i)}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i);else this.getElementHasTopPlate(k,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,i);break;case"OUTSIDE":this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i)}}else if(!R&&p){o.getLeftElements(t.getElementId())[0];switch(this.getCornerType(t,i)){case"INSIDE":case"OUTSIDE":this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i)}}else if(R&&p){var T=o.getRightElements(t.getElementId())[0];switch(this.getCornerType(t,i)){case"INSIDE":if(this.getElementIsCornerElement(T,i))if(o.getElementHasRightElement(T.getElementId())){var V=o.getRightElements(T.getElementId())[0];this.getElementHasTopPlate(V,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot4er_2GT,i)}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i);else this.getElementHasTopPlate(T,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,i);break;case"OUTSIDE":this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i)}}}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i)}}else g.error(new d.GE("BoxPlannerError - function correctKnotRightTopFront not supported for complex boxPlaner",{code:"WC_0012"}))}},{key:"correctKnotRightBottomBack",value:function correctKnotRightBottomBack(t,o,i){if(o.getForceSingleCellPerElement()){this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.noKnot,i);var l=o.getCellsInGridByElementId(t.getElementId()).backside,r=l?o.getElementHasLeftElement(t.getElementId()):o.getElementHasRightElement(t.getElementId());if(!o.getElementHasBottomElement(t.getElementId())&&!o.getCellsInGridByElementId(t.getElementId()).backside){if(o.getPlannerHasActiveBackside())switch(this.getGroundPlatesNumOfRightNeighbors(t,o,i)){case 0:r?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_0GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,i);break;case 1:r?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_1GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,i);break;case 2:r?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i);break;case 3:r&&this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,i);break;case 4:r&&this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_4GT,i)}else if(this.getElementHasBottomPlate(t,i)){if(r){var a=l?o.getLeftElements(t.getElementId()):o.getRightElements(t.getElementId()),h=void 0;a.length>0&&(h=a[0]),h&&(this.getElementHasBottomPlate(h,i)||this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,i))}}else if(r){var c=l?o.getLeftElements(t.getElementId()):o.getRightElements(t.getElementId()),u=void 0;c.length>0&&(u=c[0]),u&&!this.getElementIsCornerElement(u,i)&&(this.getElementHasBottomPlate(u,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,i))}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,i);if(this.getElementIsCornerElement(t,i))switch(this.getCornerType(t,i)){case"INSIDE":this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i);break;case"OUTSIDE":var m=o.getRightElements(t.getElementId())[0];if(this.getElementIsCornerElement(m,i)){var E=o.getRightElements(m.getElementId())[0];this.getElementHasBottomPlate(E,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i)}else this.getElementHasBottomPlate(m,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i)}}}else g.error(new d.GE("BoxPlannerError - function correctKnotRightBottomBack not supported for complex boxPlaner",{code:"WC_0012"}))}},{key:"correctKnotRightTopBack",value:function correctKnotRightTopBack(t,o,i){this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.noKnot,i);var l=o.getCellsInGridByElementId(t.getElementId()).backside,r=l?o.getElementHasLeftElement(t.getElementId()):o.getElementHasRightElement(t.getElementId());if(!o.getCellsInGridByElementId(t.getElementId()).backside){if(o.getPlannerHasActiveBackside())if(r)switch(this.getTopPlatesNumOfRightNeighbors(t,o,i)){case 0:this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_0GT,i);break;case 1:this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_1GT,i);break;case 2:this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_2GT,i);break;case 3:this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,i);break;case 4:this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_4GT,i)}else switch(this.getTopPlatesNumOfRightNeighbors(t,o,i)){case 0:this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,i);break;case 1:this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,i);break;case 2:this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i)}else if(this.getElementHasTopPlate(t,o,i)){if(r){var a=l?o.getLeftElements(t.getElementId())[0]:o.getRightElements(t.getElementId())[0];this.getElementIsCornerElement(a,i)||this.getElementHasTopPlate(a,o,i)||this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,i)}}else if(r){var h=l?o.getLeftElements(t.getElementId())[0]:o.getRightElements(t.getElementId())[0];h&&!this.getElementIsCornerElement(h,i)&&(this.getElementHasTopPlate(h,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,i))}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,i);if(this.getElementIsCornerElement(t,i)){var c=o.getElementHasLeftElement(t.getElementId()),u=o.getElementHasRightElement(t.getElementId());if(c||u){if(u&&!c){var d=o.getRightElements(t.getElementId())[0];switch(this.getCornerType(t,i)){case"INSIDE":this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i);break;case"OUTSIDE":if(this.getElementIsCornerElement(d,i))if(o.getElementHasRightElement(d.getElementId())){var m=o.getRightElements(d.getElementId())[0];this.getElementHasTopPlate(m,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i)}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i);else this.getElementHasTopPlate(d,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i)}}else if(!u&&c)this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i);else if(u&&c){var g=o.getRightElements(t.getElementId())[0];switch(this.getCornerType(t,i)){case"INSIDE":this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i);break;case"OUTSIDE":if(this.getElementIsCornerElement(g,i))if(o.getElementHasRightElement(g.getElementId())){var E=o.getRightElements(g.getElementId())[0];this.getElementHasTopPlate(E,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i)}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i);else this.getElementHasTopPlate(g,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i)}}}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i)}}}}])}(),I=d.ZP.initLog("Planner","WEB-PLANNER-LOGIC"),O=function(){return(0,a.Z)((function ConstructionRulesHandler(t,o,i){var l=this;(0,r.Z)(this,ConstructionRulesHandler),(0,h.Z)(this,"getValueOfOptionOfArticle",void 0),(0,h.Z)(this,"checkArticleHasOption",void 0),(0,h.Z)(this,"updateCfgValuesByPlanner",void 0),(0,h.Z)(this,"constructionRules",void 0),(0,h.Z)(this,"constructionRulesLoaded",void 0),(0,h.Z)(this,"hideOptionsForConstruction",void 0),(0,h.Z)(this,"partlistHelper",void 0),(0,h.Z)(this,"getOptionVal",(function(t,o,i){if(i.has(t)&&i.get(t).has(o)){var r=i.get(t).get(o);return null!=r?r:""}var a=l.getValueOfOptionOfArticle(t,o);return null!=a?a:""})),(0,h.Z)(this,"hasOptionValue",(function(t,o,i){return!(!i.has(t)||!i.get(t).has(o))||!!l.getValueOfOptionOfArticle(t,o)})),(0,h.Z)(this,"setOptionValue",(function(t,o,i,r){var a;if(r.has(t)||r.set(t,new Map),null===(a=r.get(t))||void 0===a||a.set(o,i),l.hideOptionsForConstruction.has(t)){var h=l.hideOptionsForConstruction.get(t).indexOf(o);h>=0&&l.hideOptionsForConstruction.get(t).splice(h,1)}})),(0,h.Z)(this,"getElementHasBottomPlate",(function(t,o){if(l.constructionRules.knotInfo.elementsWithGroundPlate)for(var i=0;i<l.constructionRules.knotInfo.elementsWithGroundPlate.length;i++){var r=l.constructionRules.knotInfo.elementsWithGroundPlate[i].onOPT,a=l.constructionRules.knotInfo.elementsWithGroundPlate[i].onOPVs,h=l.getOptionVal(t.getElementId(),r,o);return l.arrayContainsValue(a,h)}return!1})),(0,h.Z)(this,"getElementIsCornerElement",(function(t,o){return l.constructionRules.hasCORNER&&l.arrayContainsValue(l.constructionRules.knotInfo.cornerElements.onOPVs,l.getOptionVal(t.getElementId(),l.constructionRules.knotInfo.cornerElements.onOPT,o))})),(0,h.Z)(this,"getElementIsGarderobeElement",(function(t,o){return l.constructionRules.hasGARDEROBE&&l.arrayContainsValue(l.constructionRules.knotInfo.garderobeElements.onOPVs,l.getOptionVal(t.getElementId(),l.constructionRules.knotInfo.garderobeElements.onOPT,o))})),(0,h.Z)(this,"getCornerType",(function(t,o){return"OPVECK_I"==l.getOptionVal(t.getElementId(),"OPTELEMENT",o)?"INSIDE":"OPVECK_A"==l.getOptionVal(t.getElementId(),"OPTELEMENT",o)?"OUTSIDE":"NOCORNER"})),(0,h.Z)(this,"getElementHasTopPlate",(function(t,o,i){if(o.getElementHasTopElement(t.getElementId())){for(var r=o.getTopElements(t.getElementId()),a=!1,h=0;h<r.length;h++)l.getElementHasBottomPlate(r[h],i)&&(a=!0);return a}return!0})),this.constructionRulesLoaded=!1,this.getValueOfOptionOfArticle=t,this.checkArticleHasOption=o,this.hideOptionsForConstruction=new Map,this.updateCfgValuesByPlanner=i,this.partlistHelper=new E(this.getOptionVal,this.setOptionValue,this.getElementHasBottomPlate,this.getElementIsCornerElement,this.getCornerType,this.getElementHasTopPlate,this.getElementIsGarderobeElement)}),[{key:"arrayContainsValue",value:function arrayContainsValue(t,o){if(Array.isArray(t)){for(var i=0;i<t.length;i++)if(t[i]==o)return!0;return!1}var l=t.split(";");for(i=0;i<l.length;i++)if(l[i]==o)return!0;return!1}},{key:"evalRule",value:function evalRule(t,o,i){for(var l=!0,r=o.split("&"),a=0;a<r.length;a++){var h=r[a].split("=")[0],c=r[a].split("=")[1],u=this.getOptionVal(t,h,i);u&&u!=c&&(l=!1)}return l}},{key:"setOptionDoShow",value:function setOptionDoShow(t,o,i){var l,r=this.constructionRules.optionsVisibilityInfo[o];null!=r.doShow&&(i.has(t)||i.set(t,new Map),null===(l=i.get(t))||void 0===l||l.set(o,r.doShow));if(this.hideOptionsForConstruction.has(t)){var a,h=this.hideOptionsForConstruction.get(t).indexOf(o);if(h>=0)null===(a=this.hideOptionsForConstruction.get(t))||void 0===a||a.splice(h,1)}}},{key:"setOptionDoHide",value:function setOptionDoHide(t,o,i){var l,r,a=this.constructionRules.optionsVisibilityInfo[o];i.has(t)||i.set(t,new Map),null===(l=i.get(t))||void 0===l||l.set(o,a.doHide),this.hideOptionsForConstruction.has(t)||this.hideOptionsForConstruction.set(t,[]),null===(r=this.hideOptionsForConstruction.get(t))||void 0===r||r.push(o)}},{key:"getCurOptionBasedConstructionRules",value:function getCurOptionBasedConstructionRules(t,o){for(var i=[],l=0;l<this.constructionRules.optionBasedConstructionRules.length;l++){var r=this.constructionRules.optionBasedConstructionRules[l];this.getOptionVal(t,r.masterOptionName,o)==r.masterOptionValue&&i.push(r)}return i}},{key:"setAllOptToDefault",value:function setAllOptToDefault(t,o,i,l){for(var r=[],a=void 0,h=0;h<this.constructionRules.optionsInfluenceRulesOfAllElements.length;h++){var c=this.constructionRules.optionsInfluenceRulesOfAllElements[h];for(var u in i)u==c.onOPT&&this.arrayContainsValue(c.onOPVs,i[u])&&r.push({opt:c.influenceOPT,opv:c.forceOPV,unvalidOPVs:c.unvalidOPVs,warning:c.warning,doShowWarning:!1})}for(var d=t.getAllElementIdsInGrid(),m=0;m<d.length;m++){var g;if(this.hideOptionsForConstruction.has(d[m])&&this.hideOptionsForConstruction.get(d[m]).length>0){for(;this.hideOptionsForConstruction.get(d[m]).length>0;){var E=this.hideOptionsForConstruction.get(d[m])[0];this.setOptionDoShow(d[m],E,o)}this.hideOptionsForConstruction.delete(d[m])}this.constructionRules.hasDMOD&&(t.getPlannerHasActiveBackside()?this.setOptionDoShow(d[m],"OPTDMOD",o):this.setOptionDoHide(d[m],"OPTDMOD",o));var I=t.getColumnCount();I>1?this.setOptionDoShow(d[m],"OPTMULTICOL",o):this.setOptionDoHide(d[m],"OPTMULTICOL",o),this.setOptionValue(d[m],"OPTCORNER_COL_L","OPVOHNE",o),this.setOptionValue(d[m],"OPTCORNER_COL_R","OPVOHNE",o);var O=t.getCellsInGridByElementId(d[m]);if(O.backside)this.setOptionValue(d[m],"OPTELEM_ON_BACK","OPVJA",o);else{if(this.setOptionValue(d[m],"OPTELEM_ON_BACK","OPVNEIN",o),O.startColIndex>0){var p=t.getPlannerElementAtGridPos(O.startColIndex-1,0,!1);if(p){var R=this.getOptionVal(p.getElementId(),"OPTELEMENT",o);"OPVECK_I"==R?this.setOptionValue(d[m],"OPTCORNER_COL_L","OPVECK_I",o):"OPVECK_A"==R?this.setOptionValue(d[m],"OPTCORNER_COL_L","OPVECK_A",o):this.setOptionValue(d[m],"OPTCORNER_COL_L","OPVOHNE",o)}}if(O.endColIndex<I-1){var k=t.getPlannerElementAtGridPos(O.endColIndex+1,0,!1);if(k){var P=this.getOptionVal(k.getElementId(),"OPTELEMENT",o);"OPVECK_I"==P?this.setOptionValue(d[m],"OPTCORNER_COL_R","OPVECK_I",o):"OPVECK_A"==P?this.setOptionValue(d[m],"OPTCORNER_COL_R","OPVECK_A",o):this.setOptionValue(d[m],"OPTCORNER_COL_R","OPVOHNE",o)}}}if(this.constructionRules.avoidOptionLastCol){var T=this.getOptionVal(d[m],this.constructionRules.avoidOptionLastCol.onOPT,o);this.arrayContainsValue(this.constructionRules.avoidOptionLastCol.onOPVs,T)&&O.endColIndex==I-1&&this.setOptionValue(d[m],this.constructionRules.avoidOptionLastCol.onOPT,this.constructionRules.avoidOptionLastCol.defaultOpv,o)}if(this.constructionRules.avoidOptionFirstCol){var V=this.getOptionVal(d[m],this.constructionRules.avoidOptionFirstCol.onOPT,o);this.arrayContainsValue(this.constructionRules.avoidOptionFirstCol.onOPVs,V)&&0==O.startColIndex&&this.setOptionValue(d[m],this.constructionRules.avoidOptionFirstCol.onOPT,this.constructionRules.avoidOptionFirstCol.defaultOpv,o)}var v=this.hasOptionValue(d[m],"OPTWW",o);if(t.getElementIsFirstInGrid(d[m])?(this.setOptionDoShow(d[m],"OPTWERKZEUGKASTEN",o),v&&(t.getSizeOfWholeSet(!0).y>173&&!t.getPlannerHasActiveBackside()?this.setOptionDoShow(d[m],"OPTWW",o):this.setOptionDoHide(d[m],"OPTWW",o))):(this.setOptionDoHide(d[m],"OPTWERKZEUGKASTEN",o),v&&this.setOptionDoHide(d[m],"OPTWW",o)),o.has(d[m])||o.set(d[m],new Map),null===(g=o.get(d[m]))||void 0===g||g.set("DEBUG",t.getElementById(d[m]).getPosNr()+""),r.length>0)for(var _=0;_<r.length;_++){var B=this.getOptionVal(d[m],r[_].opt,o),C=!1;if(r[_].unvalidOPVs&&0!=r[_].unvalidOPVs.length){for(var G=r[_].unvalidOPVs.split(";"),b=0;b<G.length;b++)if(G[b]==B){C=!0;break}}else C=!0;C&&(B!=r[_].opv&&(this.setOptionValue(d[m],r[_].opt,r[_].opv,o),r[_].doShowWarning||(r[_].doShowWarning=!0,a=r[_].warning)))}if(i)for(var u in i)if(""!=u&&i[u]&&""!=i[u])for(h=0;h<this.constructionRules.optionsInfluenceRulesOfSingleElement.length;h++){c=this.constructionRules.optionsInfluenceRulesOfSingleElement[h];var x=!1;if(c.dir&&l&&l.length>0){if("TOP"==c.dir&&t.getElementHasBottomElement(d[m]))for(var H=t.getBottomElements(d[m]),y=0;y<H.length;y++)l.indexOf(H[y].getElementId())>=0&&(x=!0);if("DOWN"==c.dir&&t.getElementHasTopElement(d[m]))for(var D=t.getTopElements(d[m]),A=0;A<D.length;A++)l.indexOf(D[A].getElementId())>=0&&(x=!0);if("LEFT_RIGHT"==c.dir){if(t.getElementHasLeftElement(d[m]))for(var L=t.getLeftElements(d[m]),w=0;w<L.length;w++)l.indexOf(L[w].getElementId())>=0&&(x=!0);if(t.getElementHasRightElement(d[m]))for(var S=t.getRightElements(d[m]),N=0;N<S.length;N++)l.indexOf(S[N].getElementId())>=0&&(x=!0)}if("COL"==c.dir){var M=t.getCellsInGridByElementId(d[m]);t.getAllElementsInColumn(M.startColIndex,M.backside).forEach((function(t){return l.indexOf(t.ElementId)>=0?x=!0:void 0}))}if("BACK"==c.dir&&t.getPlannerHasActiveBackside()){var K=t.getOppositeElement(d[m]);K&&l.indexOf(K.getElementId())>=0&&(x=!0)}}else x=!0;if(x){B=this.getOptionVal(d[m],c.influenceOPT,o);u==c.onOPT&&B&&""!=B&&this.arrayContainsValue(c.unvalidOPVs,B)&&this.arrayContainsValue(c.onOPVs,i[u])&&(this.setOptionValue(d[m],c.influenceOPT,c.defaultOpv,o),c.warning&&(a=c.warning))}}var W=this.getCurOptionBasedConstructionRules(d[m],o);if(W)for(var Z=0;Z<W.length;Z++)if(W[Z].defaultOptions)for(var U=0;U<W[Z].defaultOptions.length;U++){var z=W[Z].defaultOptions[U];if(!z.rule||""==z.rule||this.evalRule(d[m],z.rule,o))for(var $=0;$<z.options.length;$++)"doShow"==z.value?this.setOptionDoShow(d[m],z.options[$],o):"doHide"==z.value&&this.setOptionDoHide(d[m],z.options[$],o),z.opv&&this.setOptionValue(d[m],z.options[$],z.opv,o)}this.setOptionValue(d[m],"OPTFAF_L_V","OPVOHNE_FAF",o),this.setOptionValue(d[m],"OPTFAF_L_H","OPVOHNE_FAF",o),this.setOptionValue(d[m],"OPTFAF_R_V","OPVOHNE_FAF",o),this.setOptionValue(d[m],"OPTFAF_R_H","OPVOHNE_FAF",o)}return a}},{key:"doCorrectAffectedElementsByOption",value:function doCorrectAffectedElementsByOption(t,o,i,l){if(null!=l&&1==l.length){var r=l[0];if(null!=i)for(var a in i){if(this.constructionRules.forceSameOptionInGrid&&this.arrayContainsValue(this.constructionRules.forceSameOptionInGrid,a)){var h=t.getCellsInGridByElementId(r).backside?t.getAllElementsInBackGrid():t.getAllElementsInFrontGrid();if(null!=h)for(var c=0;c<h.length;c++)this.setOptionValue(h[c].ElementId,a,i[a],o)}if(this.arrayContainsValue(this.constructionRules.forceSameOptionInCol,a)){var u=t.getCellsInGridByElementId(r),d=t.getAllElementsInColumn(u.startColIndex,u.backside);if(null!=d){if(t.getPlannerHasActiveBackside()){var m,g=t.getAllElementsInColumn(u.startColIndex,!u.backside);g&&(d=null===(m=d)||void 0===m?void 0:m.concat(g))}for(c=0;c<d.length;c++)this.setOptionValue(d[c].ElementId,a,i[a],o)}}if(this.arrayContainsValue(this.constructionRules.forceSameOptionInRow,a)){var E=t.getCellsInGridByElementId(r),I=t.getAllElementsInRow(E.startRowIndex,E.backside);if(I&&t.getPlannerHasActiveBackside()){var O=t.getAllElementsInRow(E.startRowIndex,!E.backside);O&&(I=I.concat(O))}for(c=0;c<I.length;c++)this.setOptionValue(I[c].ElementId,a,i[a],o)}}var p=t.getCellsInGridByElementId(r),R=t.getAllElementsInRow(p.startRowIndex,p.backside);for(c=0;c<R.length;c++)if(R[c].getElementId()!=r)for(var k=0;k<this.constructionRules.forceSameOptionInRow.length;k++){var P=this.getOptionVal(R[c].getElementId(),this.constructionRules.forceSameOptionInRow[k],o);this.setOptionValue(r,this.constructionRules.forceSameOptionInRow[k],P,o);break}}}},{key:"handleVisibility_SHOW_HIDE",value:function handleVisibility_SHOW_HIDE(t,o,i,l){if(this.checkArticleHasOption(t,i.OPTCurrentElem)&&this.checkArticleHasOption(o,i.OPTNeighborElem)){var r=this.hideOptionsForConstruction.has(t)&&this.hideOptionsForConstruction.get(t).indexOf(i.OPTCurrentElem)>=0;this.setOptionDoHide(o,i.OPTNeighborElem,l),r||this.setOptionDoShow(t,i.OPTCurrentElem,l)}}},{key:"handleBacksideVisibility_SHOW_HIDE",value:function handleBacksideVisibility_SHOW_HIDE(t,o,i,l){if(this.checkArticleHasOption(t,i.OPTCurrentElem)&&this.checkArticleHasOption(o,i.OPTNeighborElem)){var r=this.constructionRules.optionsVisibilityInfo[i.OPTCurrentElem],a=this.constructionRules.optionsVisibilityInfo[i.OPTNeighborElem];r&&a&&this.getOptionVal(t,i.OPTCurrentElem,l)==r.doShow&&this.getOptionVal(o,i.OPTNeighborElem,l)==a.doShow&&this.setOptionDoHide(t,i.OPTCurrentElem,l)}}},{key:"handleVisibiliy_HIDE_HIDE",value:function handleVisibiliy_HIDE_HIDE(t,o,i,l){var r=this.constructionRules.optionsVisibilityInfo[i.OPTCurrentElem];if(this.checkArticleHasOption(t,i.OPTCurrentElem)&&this.checkArticleHasOption(o,i.OPTNeighborElem)){var a=this.constructionRules.optionsVisibilityInfo[i.OPTNeighborElem],h=r.doShow==this.getOptionVal(t,i.OPTCurrentElem,l),c=this.getOptionVal(o,i.OPTNeighborElem,l)==a.doShow;h&&c&&(this.setOptionDoHide(t,i.OPTCurrentElem,l),this.setOptionDoHide(o,i.OPTNeighborElem,l))}}},{key:"correctSimpleOpt",value:function correctSimpleOpt(t,o,i,l,r){var a=i.getPlannerElementAtGridPos(t,o,r);if(this.constructionRules.defaultConstructionRules.TOP){var h=void 0;if(i.getElementHasTopElement(a.ElementId)){h=i.getPlannerElementAtGridPos(t,o+1,r);for(var c=0;c<this.constructionRules.defaultConstructionRules.TOP.length;c++){var u=this.constructionRules.defaultConstructionRules.TOP[c];"SHOW_HIDE"==u.OPTValueRule?this.handleVisibility_SHOW_HIDE(a.ElementId,h.ElementId,u,l):"HIDE_HIDE"==u.OPTValueRule&&this.handleVisibiliy_HIDE_HIDE(a.ElementId,h.ElementId,u,l)}}}if(this.constructionRules.defaultConstructionRules.RIGHT){var m=void 0;if(r?i.getElementHasLeftElement(a.ElementId):i.getElementHasRightElement(a.ElementId)){m=r?i.getPlannerElementAtGridPos(t-1,o,r):i.getPlannerElementAtGridPos(t+1,o,r);for(c=0;c<this.constructionRules.defaultConstructionRules.RIGHT.length;c++){var g=this.constructionRules.defaultConstructionRules.RIGHT[c];"SHOW_HIDE"==g.OPTValueRule?this.handleVisibility_SHOW_HIDE(a.ElementId,m.ElementId,g,l):"HIDE_HIDE"==g.OPTValueRule&&this.handleVisibiliy_HIDE_HIDE(a.ElementId,m.ElementId,g,l)}}}if(this.constructionRules.defaultConstructionRules.DOWN){var E=void 0;if(o>0){E=i.getPlannerElementAtGridPos(t,o-1,r);for(c=0;c<this.constructionRules.defaultConstructionRules.DOWN.length;c++){var O=this.constructionRules.defaultConstructionRules.DOWN[c];"SHOW_HIDE"==O.OPTValueRule?this.handleVisibility_SHOW_HIDE(a.ElementId,E.ElementId,O,l):"HIDE_HIDE"==O.OPTValueRule&&this.handleVisibiliy_HIDE_HIDE(a.ElementId,E.ElementId,O,l)}}}var p=r?i.getLeftElements(a.ElementId):i.getRightElements(a.ElementId),R=r?i.getRightElements(a.ElementId):i.getLeftElements(a.ElementId),k=i.getTopElements(a.ElementId),P=i.getBottomElements(a.ElementId),T=r?i.getTopLeftElement(a.ElementId):i.getTopRightElement(a.ElementId);p.length>0?p.length>1?I.error(new d.GE("BoxPlannerError - only one OPTNACHBAR_RECHTS allowed",{code:"WC_0012"})):this.setOptionValue(a.ElementId,"OPTNACHBAR_RECHTS",this.getOptionVal(p[0].ElementId,"OPTELEMENT",l),l):this.setOptionDoHide(a.ElementId,"OPTNACHBAR_RECHTS",l),R.length>0?R.length>1?I.error(new d.GE("BoxPlannerError - only one OPTNACHBAR_LINKS allowed",{code:"WC_0012"})):this.setOptionValue(a.ElementId,"OPTNACHBAR_LINKS",this.getOptionVal(R[0].ElementId,"OPTELEMENT",l),l):this.setOptionDoHide(a.ElementId,"OPTNACHBAR_LINKS",l),k.length>0?k.length>1?I.error(new d.GE("BoxPlannerError - only one OPTNACHBAR_OBEN allowed",{code:"WC_0012"})):this.setOptionValue(a.ElementId,"OPTNACHBAR_OBEN",this.getOptionVal(k[0].ElementId,"OPTELEMENT",l),l):this.setOptionDoHide(a.ElementId,"OPTNACHBAR_OBEN",l),T?this.setOptionValue(a.ElementId,"OPTNACHBAR_OBEN_RECHTS",this.getOptionVal(T.ElementId,"OPTELEMENT",l),l):this.setOptionDoHide(a.ElementId,"OPTNACHBAR_OBEN_RECHTS",l),this.constructionRules.hasNeighbors&&this.constructionRules.hasNeighbors.indexOf("OPTNACHBAR_UNTEN")>=0&&(P.length>0?P.length>1?I.error(new d.GE("BoxPlannerError - only one OPTNACHBAR_UNTEN allowed",{code:"WC_0012"})):this.setOptionValue(a.ElementId,"OPTNACHBAR_UNTEN",this.getOptionVal(P[0].ElementId,"OPTELEMENT",l),l):this.setOptionDoHide(a.ElementId,"OPTNACHBAR_UNTEN",l))}},{key:"correctBack",value:function correctBack(t,o,i){if(this.constructionRules.hasDMOD)if(t.getPlannerHasActiveBackside()){var l=void 0;if(l=t.getOppositeElement(i),this.constructionRules.defaultConstructionRules.BACK)for(var r=0;r<this.constructionRules.defaultConstructionRules.BACK.length;r++){var a,h,c=this.constructionRules.defaultConstructionRules.BACK[r],u=!1;if(c.hideOnElemAndOppositeOPT&&c.hideOnElemAndOppositeOPV)this.arrayContainsValue(c.hideOnElemAndOppositeOPV,this.getOptionVal(i,c.hideOnElemAndOppositeOPT,o))&&this.arrayContainsValue(c.hideOnElemAndOppositeOPV,this.getOptionVal(null===(a=l)||void 0===a?void 0:a.getElementId(),c.hideOnElemAndOppositeOPT,o))&&(u=!0);if(u)this.setOptionDoHide(i,c.OPTCurrentElem,o),this.setOptionDoHide(l.getElementId(),c.OPTCurrentElem,o);else if("FORCE_HIDE"==c.OPTValueRule&&this.setOptionDoHide(l.getElementId(),c.OPTCurrentElem,o),"SHOW_HIDE"==c.OPTValueRule)this.handleBacksideVisibility_SHOW_HIDE(null===(h=l)||void 0===h?void 0:h.getElementId(),i,c,o);else"HIDE_HIDE"==c.OPTValueRule&&this.handleVisibiliy_HIDE_HIDE(l.ElementId,i,c,o)}this.getElementHasBottomPlate(l,o)?this.setOptionDoShow(i,"OPTOPP_RAHMEN_U_V",o):this.setOptionDoHide(i,"OPTOPP_RAHMEN_U_V",o),this.getElementHasTopPlate(l,t,o)?this.setOptionDoShow(i,"OPTOPP_RAHMEN_O_V",o):this.setOptionDoHide(i,"OPTOPP_RAHMEN_O_V",o)}else this.setOptionDoHide(i,"OPTOPP_RAHMEN_U_V",o),this.setOptionDoHide(i,"OPTOPP_RAHMEN_O_V",o)}},{key:"correctBottom",value:function correctBottom(t,o,i){var l="";if(this.constructionRules.correctLeftRight&&null!=this.constructionRules.correctLeftRight.rowIndex)for(var r=t.getAllElementsInRow(this.constructionRules.correctLeftRight.rowIndex,i),a=0;a<r.length;a++){var h=r[a];if(0==a){if(null==(l=this.getOptionVal(h.ElementId,this.constructionRules.correctLeftRight.optWithOptVal,o)))return;i?this.setOptionValue(h.ElementId,this.constructionRules.correctLeftRight.optRight,l,o):(this.setOptionValue(h.ElementId,this.constructionRules.correctLeftRight.optLeft,l,o),this.setOptionValue(h.ElementId,this.constructionRules.correctLeftRight.optLeftBack,l,o))}i?this.setOptionValue(h.ElementId,this.constructionRules.correctLeftRight.optLeft,l,o):(this.setOptionValue(h.ElementId,this.constructionRules.correctLeftRight.optRight,l,o),this.setOptionValue(h.ElementId,this.constructionRules.correctLeftRight.optRightBack,l,o))}}},{key:"getValidLadder",value:function getValidLadder(t,o,i){for(var l=o.getAllElementsInColumn(t,!1),r=0;r<this.constructionRules.correctLadder.validLadder.length;r++){var a=this.constructionRules.correctLadder.validLadder[r];if(l.length==a.colCount){for(var h=!0,c=0;c<l.length;c++){var u=l[c];if(this.getOptionVal(u.ElementId,a.heightOption,i)!=a.heightPerRow[c]&&(h=!1),!h)break}if(h)return a}}}},{key:"correctLadder",value:function correctLadder(t,o){if(this.constructionRules.correctLadder){for(var i=t.getAllElementsInRow(this.constructionRules.correctLadder.rowIndex,!1),l=0;l<i.length;l++){var r=t.getRowCount(l,!1);if(this.constructionRules.correctLadder.onElementHighestRowCount&&-1==this.constructionRules.correctLadder.onElementHighestRowCount.indexOf(r))for(var a=t.getAllElementsInColumn(l,!1),h=0;h<a.length;h++)this.setOptionValue(a[h].ElementId,this.constructionRules.correctLadder.optHeight,this.constructionRules.correctLadder.opvDefaultHeight,o);if(r<t.getSizeOfHighesRow(!1)){var c,u=null===(c=t.getPlannerElementAtGridPos(l,r-1,!1))||void 0===c?void 0:c.getElementId();u&&this.getOptionVal(u,this.constructionRules.correctLadder.optHeight,o)==this.constructionRules.correctLadder.opvProblematicHeight&&this.setOptionValue(u,this.constructionRules.correctLadder.optHeight,this.constructionRules.correctLadder.opvDefaultHeight,o)}}for(l=0;l<i.length;l++){var d=i[l],m=this.getValidLadder(l,t,o);0==l&&this.setOptionValue(d.ElementId,this.constructionRules.correctLadder.optLadderLeft,m.optLadder,o);var g=m;if(t.getElementHasRightElement(d.getElementId())){var E=this.getValidLadder(l+1,t,o);E.colCount>m.colCount&&(g=E)}this.setOptionValue(d.getElementId(),this.constructionRules.correctLadder.optLadderRight,g.optLadder,o)}var I=t.getSizeOfHighesRow(!1);if(this.constructionRules.correctLadder.onElementHighestRowCount&&this.constructionRules.correctLadder.onElementHighestRowCount.indexOf(I)>=0){var O=t.getAllElementsInRow(I-1,!1);for(l=0;l<O.length;l++){var p=O[l];this.setOptionDoShow(p.getElementId(),this.constructionRules.correctLadder.optHasHeight,o)}}}}},{key:"correctSeries",value:function correctSeries(t,o){for(var i=!1,l=t.getAllElementIdsInGrid(),r=!1,a=!1,h=0;h<l.length;h++){var c=l[h];this.getElementIsCornerElement(t.getElementById(c),o)&&(r=!0),this.checkArticleHasOption(c,"OPTBR_ABDECKPLATTE")&&this.setOptionDoHide(c,"OPTBR_ABDECKPLATTE",o);var u=this.getOptionVal(c,"OPTABDECKPLATTE",o);this.checkArticleHasOption(c,"OPTABDECKPLATTE")&&"OPVMIT_PLATTE"==u&&(i=!0),"OPVBR_18"==this.getOptionVal(c,"OPTBR",o)&&(a=!0)}if(!t.getPlannerHasActiveBackside()&&t.getPlannerElementAtGridPos(0,0,!1)){for(var d=t.getSizeOfHighesRow(!1),m=[],g=[],E=[],I=0,O=0,p=t.getAllElementsInColumn(O,!1);p.length>0;){if(p.length==d){var R=p[d-1];E.push(R),"OPVBR_75"==(u=this.getOptionVal(R.ElementId,"OPTBR",o))?I+=75:"OPVBR_18"==u?I+=18.75:"OPVBR_37"==u&&(I+=37.5),this.setOptionDoHide(R.ElementId,"OPTOBEN",o)}else E.length>0&&(m.push(E),g.push(I)),E=[],I=0;O++,p=t.getAllElementsInColumn(O,!1)}for(E.length>0&&(m.push(E),g.push(I)),h=0;h<m.length;h++){var k=m[h][0],P="";if(this.constructionRules.hasABD_Values.indexOf("OPVABDECKPLATTE_40")>=0&&Math.abs(g[h]-40.4)<3?P="OPVABDECKPLATTE_40":this.constructionRules.hasABD_Values.indexOf("OPVABDECKPLATTE_77")>=0&&Math.abs(g[h]-77.8)<3?P="OPVABDECKPLATTE_77":this.constructionRules.hasABD_Values.indexOf("OPVABDECKPLATTE_115")>=0&&Math.abs(g[h]-115.3)<3?P="OPVABDECKPLATTE_115":this.constructionRules.hasABD_Values.indexOf("OPVABDECKPLATTE_152")>=0&&Math.abs(g[h]-152.8)<3?P="OPVABDECKPLATTE_152":this.constructionRules.hasABD_Values.indexOf("OPVABDECKPLATTE_190")>=0&&Math.abs(g[h]-190.3)<3?P="OPVABDECKPLATTE_190":this.constructionRules.hasABD_Values.indexOf("OPVABDECKPLATTE_227")>=0&&Math.abs(g[h]-227.8)<3&&(P="OPVABDECKPLATTE_227"),""==P||r)for(var T=t.getAllElementsInGridSortedbyGridPos(),V=0;V<T.length;V++)this.checkArticleHasOption(T[V].getElementId(),"OPTABD_HIDE")&&this.setOptionDoShow(T[V].getElementId(),"OPTABD_HIDE",o);else for(var v=t.getAllElementsInGridSortedbyGridPos(),_=0;_<v.length;_++)this.checkArticleHasOption(v[_].getElementId(),"OPTABD_HIDE")&&this.setOptionDoHide(v[_].getElementId(),"OPTABD_HIDE",o);if(""==P||!i||r||a)for(var B=0;B<m[h].length;B++)this.setOptionDoShow(m[h][B].ElementId,"OPTOBEN",o);else this.setOptionValue(k.ElementId,"OPTBR_ABDECKPLATTE",P,o)}}}},{key:"correctForceOptOfElement",value:function correctForceOptOfElement(t,o,i,l){if(0!=o.getCellsInGridByElementId(t).cells.length)for(var r=this.getCurOptionBasedConstructionRules(t,i),a=0;a<r.length;a++){if(r[a].forceOptions)for(var h=0;h<r[a].forceOptions.length;h++){var c=r[a].forceOptions[h];if(!c.rule||""==c.rule||this.evalRule(t,c.rule,i))for(var u=c.options,d=c.value,m=0;m<u.length;m++){var g=u[m],E=this.constructionRules.optionsVisibilityInfo[g];if(E.complementDir){var I=E.complementDir;l&&("LEFT"==I?I="RIGHT":"RIGHT"==I&&(I="LEFT"));var O=o.getNeighborElements(t,I);if(O.length>0)for(var p=0;p<O.length;p++){for(var R=O[p],k=this.getCurOptionBasedConstructionRules(R.ElementId,i),P=E.complementOPT,T=!1,V=0;V<k.length;V++)if(k[V].forceOptions)for(var v=0;v<k[V].forceOptions.length;v++){var _=k[V].forceOptions[v];if((!_.rule||""==_.rule||this.evalRule(R.ElementId,_.rule,i))&&(this.arrayContainsValue(_.options,P)&&(T=!0,"doShow"==d&&"doShow"==_.value&&("OPVFUELLUNG"==this.getOptionVal(t,"OPTELEMENT",i)&&"OPVFUELLUNG"==this.getOptionVal(R.ElementId,"OPTELEMENT",i)?(this.setOptionDoHide(R.ElementId,P,i),this.setOptionDoHide(R.ElementId,P,i)):this.setOptionDoShow(R.ElementId,P,i)),"doHide"==d&&"doHide"==_.value&&(this.setOptionDoHide(t,g,i),this.setOptionDoHide(R.ElementId,P,i)),"doShow"==d&&"doHide"==_.value||"doHide"==d&&"doShow"==_.value))){var B=!0;c.prio&&_.prio?B=c.prio<=_.prio:c.prio?B=!0:_.prio&&(B=!1),B?"doHide"==d?(this.setOptionDoHide(t,g,i),this.setOptionDoHide(R.ElementId,P,i)):"doShow"==d&&(this.setOptionDoShow(t,g,i),this.setOptionDoHide(R.ElementId,P,i)):"doHide"==_.value?(this.setOptionDoHide(t,g,i),this.setOptionDoHide(R.ElementId,P,i)):"doShow"==_.value&&(this.setOptionDoHide(t,g,i),this.setOptionDoShow(R.ElementId,P,i))}}T||("doShow"==d&&(this.setOptionDoShow(t,g,i),this.setOptionDoHide(R.ElementId,P,i)),"doHide"==d&&(this.setOptionDoHide(t,g,i),this.setOptionDoHide(R.ElementId,P,i)))}else"doShow"==d&&this.setOptionDoShow(t,g,i),"doHide"==d&&this.setOptionDoHide(t,g,i)}}}if(r[a].changeOptions)for(var C=0;C<r[a].changeOptions.length;C++){for(var G=!0,b=r[a].changeOptions[C].rule.split("&"),x=0;x<b.length;x++)if(b[x].indexOf("!=")>0){var H=b[x].split("!=")[0],y=b[x].split("!=")[1];this.getOptionVal(t,H,i)==y&&(G=!1)}else{H=b[x].split("=")[0],y=b[x].split("=")[1];this.getOptionVal(t,H,i)!=y&&(G=!1)}G&&(r[a].changeOptions[C].doShow&&this.setOptionDoShow(t,r[a].changeOptions[C].doShow,i),r[a].changeOptions[C].doHide&&this.setOptionDoHide(t,r[a].changeOptions[C].doHide,i),r[a].changeOptions[C].opt&&r[a].changeOptions[C].opv&&this.setOptionValue(t,r[a].changeOptions[C].opt,r[a].changeOptions[C].opv,i))}}}},{key:"correctNeighborCustomOLTs",value:function correctNeighborCustomOLTs(t,o,i){if(this.constructionRules.correctNeighborOPT&&0!=this.constructionRules.correctNeighborOPT.length)for(var l=0;l<this.constructionRules.correctNeighborOPT.length;l++){var r=o.getCellsInGridByElementId(t);if(this.setOptionValue(t,this.constructionRules.correctNeighborOPT[l].opt,"OPVOHNE",i),0==r.cells.length)return;var a=o.getNeighborElements(t,this.constructionRules.correctNeighborOPT[l].dir);if(a.length>0){var h=this.getOptionVal(a[0].ElementId,this.constructionRules.correctNeighborOPT[l].neighborOPT,i);""!=h&&this.setOptionValue(t,this.constructionRules.correctNeighborOPT[l].opt,h,i)}}}},{key:"doChangeRetailArticleNumbers",value:function doChangeRetailArticleNumbers(t,o){var i=t.getAllElementsInGridSortedbyGridPos();if(this.constructionRules.correctRetailArticleNumberByRule&&this.constructionRules.correctRetailArticleNumberByRule.length>0)for(var l=!0,r=0;r<this.constructionRules.correctRetailArticleNumberByRule.length;r++){var a=this.constructionRules.correctRetailArticleNumberByRule[r];if("global"==a.range){for(var h=0;h<i.length&&l;h++){this.evalRule(i[h].getElementId(),a.rule,o)||(l=!1)}if(l)return{doChange:!0,retailArticleRules:a.retailArticleRules}}}return{doChange:!1}}},{key:"setConstructionRules",value:function setConstructionRules(t){t&&t.constructionRules&&(this.constructionRules=t.constructionRules,this.partlistHelper.setConstructionRules(t.constructionRules),this.constructionRulesLoaded=!0)}},{key:"getConstructionRulesLoaded",value:function getConstructionRulesLoaded(){return this.constructionRulesLoaded}},{key:"updateOptionLogicBoxPlanner",value:(t=(0,l.Z)(u().mark((function _callee(t,o,i,l){var r,a,h,c,m,g,E;return u().wrap((function _callee$(u){for(;;)switch(u.prev=u.next){case 0:if(null!=this.constructionRules&&this.constructionRulesLoaded){u.next=3;break}return I.error(new d.GE("Error construction rules are not set for boxPlanner",{code:"WC_0012"})),u.abrupt("return");case 3:if(r=(new Date).getTime(),a=void 0,I.debug("BoxPlanner - updateOptionLogicInGrid start updateOptionLogicInGrid"),h=new Map,l)for(c=t.getAllElementIdsInGrid(),o=void 0,i=void 0,m=0;m<c.length;m++)this.getElementIsCornerElement(t.getElementById(c[m]),h)&&this.setOptionValue(c[m],"OPTELEMENT","OPVOFFENES_FACH",h);for(a=this.setAllOptToDefault(t,h,o,i),this.doCorrectAffectedElementsByOption(t,h,o,i),this.correctBottom(t,h,!1),t.getPlannerHasActiveBackside()&&this.correctBottom(t,h,!0),this.correctSeries(t,h),m=0;m<t.getColumnCount();m++)for(g=0;g<t.getRowCount(m,!1);g++)this.correctSimpleOpt(m,g,t,h,!1);if(t.getPlannerHasActiveBackside())for(m=t.getColumnCount()-1;m>=0;m--)for(g=0;g<t.getRowCount(m,!1);g++)this.correctSimpleOpt(m,g,t,h,!0);for(m=0;m<t.getColumnCount();m++)for(g=0;g<t.getRowCount(m,!1);g++)this.correctForceOptOfElement(t.getPlannerElementAtGridPos(m,g,!1).ElementId,t,h,!1),this.correctNeighborCustomOLTs(t.getPlannerElementAtGridPos(m,g,!1).ElementId,t,h);if(t.getPlannerHasActiveBackside())for(m=t.getColumnCount()-1;m>=0;m--)for(g=0;g<t.getRowCount(m,!1);g++)this.correctForceOptOfElement(t.getPlannerElementAtGridPos(m,g,!0).ElementId,t,h,!0),this.correctNeighborCustomOLTs(t.getPlannerElementAtGridPos(m,g,!0).ElementId,t,h);for(this.correctLadder(t,h),this.partlistHelper.calculateKnots(t,h),this.partlistHelper.calculateRahmen(t,h),m=0;m<t.getColumnCount();m++)for(g=0;g<t.getRowCount(m,!1);g++)this.correctBack(t,h,t.getPlannerElementAtGridPos(m,g,!1).getElementId());return E=this.doChangeRetailArticleNumbers(t,h),u.next=25,this.updateCfgValuesByPlanner(h,void 0,this.constructionRules.partlistRules.bundleRules,E);case 25:return I.debug("BoxPlanner updateOptionLogic - Duration after setting Option Values of all Articles: "+((new Date).getTime()-r)),I.debug("BoxPlanner updateOptionLogic - Duration after setting updating configurator: "+((new Date).getTime()-r)),u.abrupt("return",a);case 28:case"end":return u.stop()}}),_callee,this)}))),function updateOptionLogicBoxPlanner(o,i,l,r){return t.apply(this,arguments)})},{key:"onElemDeleted",value:function onElemDeleted(t){this.hideOptionsForConstruction.has(t)&&this.hideOptionsForConstruction.delete(t)}},{key:"onElementCopy",value:function onElementCopy(t,o){if(this.hideOptionsForConstruction.has(t)){var i=this.hideOptionsForConstruction.get(t);this.hideOptionsForConstruction.set(o,(0,m.Z)(i))}}},{key:"getHasMaxElemCountPerColumn",value:function getHasMaxElemCountPerColumn(){return null!=this.constructionRules.maxElemCountPerCol}},{key:"getMaxElemCountPerColumn",value:function getMaxElemCountPerColumn(){return this.constructionRules.maxElemCountPerCol}},{key:"getForceWholePlanningSameHeight",value:function getForceWholePlanningSameHeight(){return this.constructionRules.forceWholePlanningSameHeight}}]);var t}(),p=i(64357),R=i(25036),k=i(25108);function _createForOfIteratorHelper(t,o){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function _unsupportedIterableToArray(t,o){if(t){if("string"==typeof t)return _arrayLikeToArray(t,o);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(t,o):void 0}}(t))||o&&t&&"number"==typeof t.length){i&&(t=i);var l=0,r=function F(){};return{s:r,n:function n(){return l>=t.length?{done:!0}:{done:!1,value:t[l++]}},e:function e(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,h=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();return h=t.done,t},e:function e(t){c=!0,a=t},f:function f(){try{h||null==i.return||i.return()}finally{if(c)throw a}}}}function _arrayLikeToArray(t,o){(null==o||o>t.length)&&(o=t.length);for(var i=0,l=Array(o);i<o;i++)l[i]=t[i];return l}var P=d.ZP.initLog("Planner","BOX-PLANNER_GRID"),T=function(){return(0,a.Z)((function BoxPlannerGrid(t,o){(0,r.Z)(this,BoxPlannerGrid),(0,h.Z)(this,"plannerElements",void 0),(0,h.Z)(this,"frontGrid",void 0),(0,h.Z)(this,"backGrid",void 0),(0,h.Z)(this,"hasActiveBackside",void 0),(0,h.Z)(this,"getValueOfOptionOfArticle",void 0),(0,h.Z)(this,"gridSetupParams",void 0),this.plannerElements=new Map,this.frontGrid=new Array,this.backGrid=new Array,this.gridSetupParams=t,this.getValueOfOptionOfArticle=o,this.hasActiveBackside=!1}),[{key:"createNewCells",value:function createNewCells(t,o,i,l){if(this.gridSetupParams.forceSingleCellPerElement)return{cells:[{plannerElementId:t.ElementId,width:this.gridSetupParams.forceFixCellRasterSize?this.gridSetupParams.fixCellRasterWidth:t.getWidth(),height:this.gridSetupParams.forceFixCellRasterSize?this.gridSetupParams.fixCellRasterHeight:t.getHeight(),index:new p.FM(o,i)}],startColIndex:o,endColIndex:o,startRowIndex:i,endRowIndex:i,backside:l,colCount:1,rowCount:1};this.gridSetupParams.forceFixCellRasterSize||P.error(new d.GE("Box planner with params forceSingleCellPerElement is false and forceFixCellRasterSize is false are not allowed"));for(var r=Math.round(t.getWidth()/this.gridSetupParams.fixCellRasterWidth),a=Math.round(t.getHeight()/this.gridSetupParams.fixCellRasterWidth),h=[],c=0;c<r;c++)for(var u=0;u<a;u++){var m={plannerElementId:t.ElementId,width:this.gridSetupParams.fixCellRasterWidth,height:this.gridSetupParams.fixCellRasterHeight,index:new p.FM(o+c,i+u)};h.push(m)}return{cells:h,startColIndex:o,endColIndex:o+r-1,startRowIndex:i,endRowIndex:i+a-1,backside:l,colCount:r,rowCount:a}}},{key:"createEmptyCells",value:function createEmptyCells(t,o,i,l,r,a){for(var h=[],c=t;c<=i;c++)for(var u=o;u<=l;u++){var d={plannerElementId:-1,width:this.gridSetupParams.forceFixCellRasterSize?this.gridSetupParams.fixCellRasterWidth:r,height:this.gridSetupParams.forceFixCellRasterSize?this.gridSetupParams.fixCellRasterHeight:a,index:new p.FM(c,u)};h.push(d)}return h}},{key:"getCellCount",value:function getCellCount(t){return this.gridSetupParams.forceSingleCellPerElement?{colCount:1,rowCount:1}:{colCount:Math.round(t.getWidth()/this.gridSetupParams.fixCellRasterWidth),rowCount:Math.round(t.getHeight()/this.gridSetupParams.fixCellRasterWidth)}}},{key:"getAllUsedCellsInGrid",value:function getAllUsedCellsInGrid(t){for(var o=new Array,i=t?this.backGrid:this.frontGrid,l=0;l<i.length;l++)for(var r=0;r<i[l].length;r++)null!=i[l][r]&&o.push(i[l][r]);return o}},{key:"getGridColumnWidth",value:function getGridColumnWidth(t){for(var o=0;o<this.frontGrid[t].length;o++)if(this.frontGrid[t][o])return this.frontGrid[t][o].width;return 0}},{key:"getGridColumnHeight",value:function getGridColumnHeight(t){var o=0,i=!1;if(this.frontGrid.length>t)for(var l=this.frontGrid[t],r=l.length;r>=0;r--)!i&&l[r]&&(i=!0),i&&(o+=null==l[r]?0:l[r].height);return o}},{key:"deleteElementByIdFromGrid",value:function deleteElementByIdFromGrid(t){var o=this.getCellsInGridByElementId(t),i=o.backside?this.backGrid:this.frontGrid,l=o.endRowIndex-o.startRowIndex+1,r=!1,a=o.startColIndex,h=o.startColIndex-o.endColIndex+1;this.getRowCount(o.startColIndex,o.backside)==l&&(r=!0);var c=this.getAllUsedCellsInGrid(o.backside);i=new Array;for(var u=0;u<c.length;u++){var d=c[u];d.plannerElementId!=t&&(r&&d.index.x>a&&(d.index.x-=h),i[d.index.x]||(i[d.index.x]=[]),i[d.index.x][d.index.y]=d)}o.backside?this.backGrid=i:this.frontGrid=i}},{key:"getPlannerElementAtGridPos",value:function getPlannerElementAtGridPos(t,o,i){var l=i?this.backGrid:this.frontGrid;if(l[t]&&l[t][o]){var r=l[t][o];if(null==r)return;return this.plannerElements.get(r.plannerElementId)}}},{key:"getCellsInGridByElementId",value:function getCellsInGridByElementId(t){for(var o=void 0,i=!1,l=0;l<this.frontGrid.length;l++)for(var r=0;r<this.frontGrid[l].length;r++){var a=this.frontGrid[l][r];a&&a.plannerElementId==t&&(o=a,i=!1)}if(null==o)for(l=0;l<this.backGrid.length;l++)for(r=0;r<this.backGrid[l].length;r++){var h=this.backGrid[l][r];h&&h.plannerElementId==t&&(o=h,i=!0)}if(null==o)return{cells:[],backside:!1,startColIndex:-1,endColIndex:-1,startRowIndex:-1,endRowIndex:-1,colCount:0,rowCount:0};if(this.gridSetupParams.forceSingleCellPerElement)return{cells:[o],backside:i,startColIndex:o.index.x,endColIndex:o.index.x,startRowIndex:o.index.y,endRowIndex:o.index.y,colCount:1,rowCount:1};var c=i?this.backGrid:this.frontGrid,u=[o],d=1/0,m=-1/0,g=1/0,E=-1/0;for(l=o.index.x;l<c.length;l++)for(r=o.index.y+1;r<c.length;r++){var I=c[l][r];if(!I||I.plannerElementId!=t)break;l<d&&(d=l),l>m&&(m=l),r<g&&(g=r),r>m&&(E=r),u.push(I)}return{cells:u,backside:i,startColIndex:d,endColIndex:m,startRowIndex:g,endRowIndex:E,colCount:m-d+1,rowCount:E-g+1}}},{key:"getAllElementIdsInGrid",value:function getAllElementIdsInGrid(){return Array.from(this.plannerElements.keys())}},{key:"_getAllElementsInGrid",value:function _getAllElementsInGrid(t){for(var o=[],i=[],l=0;l<t.length;l++)for(var r=0;r<t[l].length;r++){var a=t[l][r];null!=a&&(-1==o.indexOf(a.plannerElementId)&&(o.push(a.plannerElementId),i.push(this.plannerElements.get(a.plannerElementId))))}return i}},{key:"getAllElementsInFrontGrid",value:function getAllElementsInFrontGrid(){return this._getAllElementsInGrid(this.frontGrid)}},{key:"getAllElementsInBackGrid",value:function getAllElementsInBackGrid(){return this._getAllElementsInGrid(this.backGrid)}},{key:"getAllElementsInBacksideModuleGrid",value:function getAllElementsInBacksideModuleGrid(){return this._getAllElementsInGrid(this.backGrid).map((function(t){return t.ElementId}))}},{key:"getAllElementsInGridSortedbyElementId",value:function getAllElementsInGridSortedbyElementId(){return Array.from(this.plannerElements.values())}},{key:"getAllElementsInGridSortedbyGridPos",value:function getAllElementsInGridSortedbyGridPos(){for(var t=[],o=[],i=0;i<this.frontGrid.length;i++)for(var l=0;l<this.frontGrid[i].length;l++){var r=this.frontGrid[i][l];if(r&&-1==o.indexOf(r.plannerElementId)){var a=this.getElementById(r.plannerElementId);o.push(r.plannerElementId),t.push(a)}}for(i=0;i<this.backGrid.length;i++)for(l=0;l<this.backGrid[i].length;l++){var h=this.backGrid[i][l];if(h&&-1==o.indexOf(h.plannerElementId)){var c=this.getElementById(h.plannerElementId);o.push(h.plannerElementId),t.push(c)}}return t}},{key:"getElementById",value:function getElementById(t){return this.plannerElements.get(t)}},{key:"getElementIsFirstInGrid",value:function getElementIsFirstInGrid(t){var o=this.getCellsInGridByElementId(t);return 0!=o.cells.length&&(0==o.cells[0].index.x&&0==o.cells[0].index.y&&!o.backside)}},{key:"getElementIsInLastCol",value:function getElementIsInLastCol(t,o){var i=o?this.backGrid:this.frontGrid;return this.getCellsInGridByElementId(t).endColIndex+1==i.length}},{key:"getElementHasTopElement",value:function getElementHasTopElement(t){for(var o=this.getCellsInGridByElementId(t),i=o.backside?this.backGrid:this.frontGrid,l=o.startColIndex;l<=o.endColIndex;l++)if(i[l].length>o.endRowIndex+1&&i[l][o.endRowIndex+1])return!0;return!1}},{key:"getTopElements",value:function getTopElements(t){for(var o=this.getCellsInGridByElementId(t),i=o.backside?this.backGrid:this.frontGrid,l=[],r=[],a=o.startColIndex;a<=o.endColIndex;a++)if(i[a].length>o.endRowIndex+1&&i[a][o.endRowIndex+1]){var h=i[a][o.endRowIndex+1];if(!h)continue;-1==r.indexOf(h.plannerElementId)&&(r.push(h.plannerElementId),l.push(this.plannerElements.get(h.plannerElementId)))}return l}},{key:"getTopRightElement",value:function getTopRightElement(t){var o=this.getCellsInGridByElementId(t),i=o.backside?this.backGrid:this.frontGrid;if(i.length>o.endColIndex+1&&i[o.endColIndex+1].length>o.endRowIndex+1&&i[o.endColIndex+1][o.endRowIndex+1]){var l=i[o.endColIndex+1][o.endRowIndex+1];return this.plannerElements.get(l.plannerElementId)}}},{key:"getTopLeftElement",value:function getTopLeftElement(t){var o=this.getCellsInGridByElementId(t),i=o.backside?this.backGrid:this.frontGrid;if(o.startColIndex>0&&i[o.startColIndex-1].length>0&&i[o.startColIndex-1][o.endRowIndex+1]){var l=i[o.startColIndex-1][o.endRowIndex+1];return this.plannerElements.get(l.plannerElementId)}}},{key:"getElementHasBottomElement",value:function getElementHasBottomElement(t){return this.getCellsInGridByElementId(t).startRowIndex-1>=0}},{key:"getBottomElements",value:function getBottomElements(t){var o=this.getCellsInGridByElementId(t),i=o.backside?this.backGrid:this.frontGrid,l=[],r=[];if(o.startRowIndex-1>=0)for(var a=o.startColIndex;a<=o.endColIndex;a++){var h=i[a][o.startRowIndex-1];h&&-1==r.indexOf(h.plannerElementId)&&(r.push(h.plannerElementId),l.push(this.plannerElements.get(h.plannerElementId)))}return l}},{key:"getElementHasRightElement",value:function getElementHasRightElement(t){var o=this.getCellsInGridByElementId(t),i=o.backside?this.backGrid:this.frontGrid;if(i.length>o.endColIndex+1&&i[o.endColIndex+1].length>o.startRowIndex&&i[o.endColIndex+1][o.startRowIndex])return!0;return!1}},{key:"getRightElements",value:function getRightElements(t){var o=this.getCellsInGridByElementId(t),i=o.backside?this.backGrid:this.frontGrid,l=[],r=[];if(i.length>o.endColIndex+1)for(var a=o.startRowIndex;a<=o.endRowIndex;a++){var h=i[o.endColIndex+1][a];h&&-1==r.indexOf(h.plannerElementId)&&(r.push(h.plannerElementId),l.push(this.plannerElements.get(h.plannerElementId)))}return l}},{key:"getElementHasLeftElement",value:function getElementHasLeftElement(t){var o=this.getCellsInGridByElementId(t),i=o.backside?this.backGrid:this.frontGrid;return!!(o.startColIndex>0&&i[o.startColIndex-1][o.startRowIndex])}},{key:"getLeftElements",value:function getLeftElements(t){var o=this.getCellsInGridByElementId(t),i=o.backside?this.backGrid:this.frontGrid,l=[],r=[];if(o.startColIndex-1>=0)for(var a=o.startRowIndex;a<=o.endRowIndex;a++){var h=i[o.startColIndex-1][a];h&&-1==r.indexOf(h.plannerElementId)&&(r.push(h.plannerElementId),l.push(this.plannerElements.get(h.plannerElementId)))}return l}},{key:"getAllElementsInColumn",value:function getAllElementsInColumn(t,o){var i=o?this.backGrid:this.frontGrid,l=[],r=[];if(i.length>t)for(var a=0;a<i[t].length;a++){var h=i[t][a];h&&-1==r.indexOf(h.plannerElementId)&&(r.push(h.plannerElementId),l.push(this.plannerElements.get(h.plannerElementId)))}return l}},{key:"getColumnCount",value:function getColumnCount(){return this.frontGrid.length}},{key:"getRowCount",value:function getRowCount(t,o){return o?this.backGrid[t].length:this.frontGrid[t].length}},{key:"getAllElementsInRow",value:function getAllElementsInRow(t,o){for(var i=o?this.backGrid:this.frontGrid,l=[],r=[],a=0;a<i.length;a++)if(i[a].length>t){var h=i[a][t];h&&-1==r.indexOf(h.plannerElementId)&&(r.push(h.plannerElementId),l.push(this.plannerElements.get(h.plannerElementId)))}return l}},{key:"getSizeOfHighesRow",value:function getSizeOfHighesRow(t){for(var o=t?this.backGrid:this.frontGrid,i=0,l=0;l<o.length;l++)for(var r=o[l].length;r>=0;r--){if(o[l][r]){i<r&&(i=r);break}}return i+1}},{key:"getNeighborElements",value:function getNeighborElements(t,o){k.log("ELEMENT ID beim aufruf von getNeighborElements "+t+"; dir: "+o);var i=this.getCellsInGridByElementId(t),l=i.backside?this.backGrid:this.frontGrid,r=[],a=[];switch(o){case"TOP":for(var h=i.startColIndex;h<=i.endColIndex;h++){var c=h,u=i.endRowIndex+1;if(l[c].length>u){var d=l[c][u];d&&-1==a.indexOf(d.plannerElementId)&&(a.push(d.plannerElementId),r.push(this.plannerElements.get(d.plannerElementId)))}}break;case"DOWN":for(h=i.startColIndex;h<=i.endColIndex;h++){var m=h,g=i.startRowIndex-1;if(g>=0){var E=l[m][g];E&&-1==a.indexOf(E.plannerElementId)&&(a.push(E.plannerElementId),r.push(this.plannerElements.get(E.plannerElementId)))}}break;case"LEFT":for(h=i.startRowIndex;h<=i.endRowIndex;h++){var I=i.startColIndex-1,O=h;if(I>=0){var p=l[I][O];p&&-1==a.indexOf(p.plannerElementId)&&(a.push(p.plannerElementId),r.push(this.plannerElements.get(p.plannerElementId)))}}break;case"RIGHT":for(h=i.startRowIndex;h<=i.endRowIndex;h++){var R=i.startColIndex+1,P=h;if(l.length>R){var T=l[R][P];T&&-1==a.indexOf(T.plannerElementId)&&(a.push(T.plannerElementId),r.push(this.plannerElements.get(T.plannerElementId)))}}break;case"BACK":if(this.hasActiveBackside){var V=this.getPlannerElementAtGridPos(i.startColIndex,i.startRowIndex,!0);null!=V&&(r=[V])}}return r}},{key:"getOppositeElement",value:function getOppositeElement(t){if(this.hasActiveBackside){var o=this.getCellsInGridByElementId(t);return o.backside?this.getPlannerElementAtGridPos(o.startColIndex,o.startRowIndex,!1):this.getPlannerElementAtGridPos(o.startColIndex,o.startRowIndex,!0)}}},{key:"getOppositeElements",value:function getOppositeElements(t){var o=[];if(this.hasActiveBackside)for(var i=0;i<t.length;i++){var l=this.getOppositeElement(t[i]);null!=l&&o.push(l)}return o}},{key:"getSizeOfWholeSet",value:function getSizeOfWholeSet(t){for(var o=0,i=0,l=0,r=[],a=0;a<this.frontGrid.length;a++){for(var h=0,c=0;c<this.frontGrid[a].length;c++){var u=this.frontGrid[a][c];u&&-1==r.indexOf(u.plannerElementId)&&(h+=this.plannerElements.get(u.plannerElementId).getHeight(),0==a&&0==c&&(i=this.plannerElements.get(u.plannerElementId).getDepth()))}h>l&&(l=h);var d=this.getGridColumnWidth(a);t&&a>0&&(77.9==d?d=75:40.4==d?d=37.5:21.7==d&&(d=18.75)),o+=d}return this.hasActiveBackside&&(i*=2),new p.P(o,l,i)}},{key:"getAllElementsInSameRowByElementId",value:function getAllElementsInSameRowByElementId(t){var o=this.getCellsInGridByElementId(t),i=this.getAllElementsInRow(o.startRowIndex,!1);return this.hasActiveBackside&&(i=i.concat(this.getAllElementsInRow(o.startRowIndex,!0))),{elementIds:i.map((function(t){return t.ElementId})),plannerElements:i,backside:o.backside}}},{key:"getAllElementsDown",value:function getAllElementsDown(t){var o=this.getCellsInGridByElementId(t);if(0==o.startRowIndex)return{elements:[],backside:!1};for(var i=o.backside?this.backGrid:this.frontGrid,l=[],r=o.startColIndex;r<=o.endColIndex;r++)for(var a=o.startRowIndex--;a>=0;a--){var h=i[r][a];h&&-1==l.indexOf(h.plannerElementId)&&l.push(h.plannerElementId)}return{elements:l,backside:o.backside}}},{key:"getAllElementsInSameCol",value:function getAllElementsInSameCol(t){var o=this.getCellsInGridByElementId(t),i=this.getAllElementsInColumn(o.startColIndex,o.backside);return null==i&&(i=[]),{elements:i.map((function(t){return t.ElementId})),backside:o.backside}}},{key:"prepareGridForColCopy",value:function prepareGridForColCopy(t,o){if("AVO"!=o){var i=this.getCellsInGridByElementId(t),l=(this.plannerElements.get(t),0);"AVR"==o?l=i.endColIndex+1:"AVL"==o&&(l=i.startColIndex);var r=i.endColIndex-i.startColIndex+1,a=this.getAllUsedCellsInGrid(!1);this.frontGrid=new Array;for(var h=0;h<a.length;h++){var c=a[h];c.index.x>=l&&(c.index.x+=r),this.frontGrid[c.index.x]||(this.frontGrid[c.index.x]=[]),this.frontGrid[c.index.x][c.index.y]=c}for(h=l;h<l+r;h++)this.frontGrid[h]||(this.frontGrid[h]=[]);if(this.hasActiveBackside){var u=this.getAllUsedCellsInGrid(!0);this.backGrid=new Array;for(h=0;h<u.length;h++){var d=u[h];d.index.x>=l&&(d.index.x+=r),this.backGrid[d.index.x]||(this.backGrid[d.index.x]=[]),this.backGrid[d.index.x][d.index.y]=d}for(h=l;h<l+r;h++)this.backGrid[h]||(this.backGrid[h]=[])}}}},{key:"prepareGridForBackSideCopy",value:function prepareGridForBackSideCopy(){this.backGrid=new Array,this.hasActiveBackside=!0}},{key:"addElementAtGridPos",value:function addElementAtGridPos(t,o,i,l){for(var r=l?this.backGrid:this.frontGrid,a=this.createNewCells(t,o,i,l),h=0;h<a.cells.length;h++){var c=a.cells[h];r[c.index.x]||(r[c.index.x]=[]),r[c.index.x][c.index.y]=c}this.plannerElements.set(t.getElementId(),t),l&&(this.hasActiveBackside=!0)}},{key:"addElementAsCopy",value:function addElementAsCopy(t,o,i){var l=this.getCellsInGridByElementId(t),r=-1,a=-1,h="BACKSIDE"==i?!l.backside:l.backside,c=this.getCellCount(o);switch(i){case"AVR":r=l.endColIndex+1,a=l.startRowIndex;break;case"AVL":r=l.startColIndex-c.colCount,a=l.startRowIndex;break;case"AVO":r=l.startColIndex,a=l.endRowIndex+1;break;case"BACKSIDE":r=l.startColIndex,a=l.startRowIndex}for(var u=this.createNewCells(o,r,a,h),d=h?this.backGrid:this.frontGrid,m=0;m<u.cells.length;m++)d[u.cells[m].index.x]||(d[u.cells[m].index.x]=[]),d[u.cells[m].index.x][u.cells[m].index.y]=u.cells[m];this.plannerElements.set(o.getElementId(),o)}},{key:"deleteElement",value:function deleteElement(t,o){this.plannerElements.has(t)||P.error(new d.GE("Try to delete an elementId that does not exist"));this.getCellsInGridByElementId(t);R.Z.removeDockingPointRelations(this.plannerElements.get(t)),this.deleteElementByIdFromGrid(t),this.plannerElements.delete(t),this.hasActiveBackside}},{key:"updateWorldPosOfElements",value:function updateWorldPosOfElements(){var t,o=_createForOfIteratorHelper(this.plannerElements.values());try{for(o.s();!(t=o.n()).done;){var i=t.value;R.Z.removeDockingPointRelations(i)}}catch(t){o.e(t)}finally{o.f()}for(var l=1,r=[],a=0;a<this.frontGrid.length;a++)for(var h=0;h<this.frontGrid[a].length;h++){var c=this.frontGrid[a][h];if(-1==r.indexOf(c.plannerElementId)){var u=this.plannerElements.get(c.plannerElementId);r.push(c.plannerElementId);for(var m=this.getNeighborElements(c.plannerElementId,"TOP"),g=this.getNeighborElements(c.plannerElementId,"RIGHT"),E=0;E<m.length;E++)R.Z.tryDockElement(u,"AVO",[m[E]]);for(E=0;E<g.length;E++)R.Z.tryDockElement(u,"AVR",[g[E]]);u.PosNr=l,l++}}for(a=0;a<this.backGrid.length;a++)for(h=0;h<this.backGrid[a].length;h++){var I=this.backGrid[a][h];if(-1==r.indexOf(I.plannerElementId)){var O=this.plannerElements.get(I.plannerElementId);r.push(I.plannerElementId);var p=this.frontGrid[a][h],k=this.plannerElements.get(p.plannerElementId);if(k){var T=null==k?void 0:k.getDockingPointById("AVO_AVO_2_IL");T?O&&R.Z.tryDockElementToDP(O,k,T):P.error(new d.GE("Error Loading DockingPoint AVO_2 for plannerElement"))}var V=this.getNeighborElements(I.plannerElementId,"TOP"),v=this.getNeighborElements(I.plannerElementId,"RIGHT");for(E=0;E<V.length;E++)R.Z.tryDockElement(O,"AVO",[V[E]]);for(E=0;E<v.length;E++)R.Z.tryDockElement(O,"AVL",[v[E]]);O.PosNr=l,l++}}}},{key:"destroyBoxPlannerGrid",value:function destroyBoxPlannerGrid(){var t,o=_createForOfIteratorHelper(this.plannerElements.values());try{for(o.s();!(t=o.n()).done;){t.value.destroy()}}catch(t){o.e(t)}finally{o.f()}this.plannerElements.clear(),this.frontGrid=new Array,this.hasActiveBackside&&(this.hasActiveBackside=!1,this.backGrid=new Array)}},{key:"destroyBacksideModuleGrid",value:function destroyBacksideModuleGrid(){this.hasActiveBackside=!1;var t,o=this.getAllElementsInBackGrid(),i=_createForOfIteratorHelper(o.values());try{for(i.s();!(t=i.n()).done;){var l=t.value;this.plannerElements.delete(l.ElementId),l.destroy()}}catch(t){i.e(t)}finally{i.f()}o=[],this.backGrid=new Array}},{key:"getPlannerHasActiveBackside",value:function getPlannerHasActiveBackside(){return this.hasActiveBackside}},{key:"getForceSingleCellPerElement",value:function getForceSingleCellPerElement(){return this.gridSetupParams.forceSingleCellPerElement}},{key:"getBoundingBox",value:function getBoundingBox(){var t,o=0,i=0,l=0,r=0,a=0,h=this.plannerElements.get(this.frontGrid[0][0].plannerElementId).getDepth(),c=0;t="RIGHT";for(var u=[],d=0;d<this.frontGrid.length;d++){var m=this.frontGrid[d][0];if(!m)break;if(-1==u.indexOf(m.plannerElementId)){u.push(m.plannerElementId);var g=this.plannerElements.get(m.plannerElementId);if(!g)continue;var E=this.getValueOfOptionOfArticle(m.plannerElementId,"OPTELEMENT");"RIGHT"==t?r+=g.getWidth():"FRONT"==t?h+=g.getWidth():"LEFT"==t?r-=g.getWidth():"BACK"==t&&(h-=g.getWidth()),"OPVECK_I"==E?"RIGHT"==t?t="FRONT":"FRONT"==t?t="LEFT":"LEFT"==t?t="BACK":"BACK"==t&&(t="RIGHT"):"OPVECK_A"==E&&("RIGHT"==t?t="BACK":"FRONT"==t?t="RIGHT":"LEFT"==t?t="FRONT":"BACK"==t&&(t="LEFT")),r<i&&(i=r),r>l&&(l=r),h<a&&(a=h),h>c&&(c=h);var I=this.getGridColumnHeight(d);o=o<I?I:o}}var O=c-a,p=l-i;return this.hasActiveBackside&&(O=2*h),{width:Math.round(1e3*p)/1e3,height:Math.round(1e3*o)/1e3,depth:Math.round(1e3*O)/1e3}}},{key:"getFreeMoveLocation",value:function getFreeMoveLocation(t){var o=this.getElementById(t);if(!o)return[];var i=this.getCellsInGridByElementId(t);if(0===i.cells.length)return[];var l,r=[],a=function isEmptyCell(t,o){var i;return void 0===(null===(i=h[t])||void 0===i?void 0:i[o])},h=i.backside?this.backGrid:this.frontGrid,c=_createForOfIteratorHelper(this.plannerElements.keys());try{for(c.s();!(l=c.n()).done;){var u=l.value;if(u!=t){var d=this.getElementById(u);if(this.gridSetupParams.forceSingleCellPerElement){if(!this.getElementHasTopElement(u)&&d.getWidth()==o.getWidth()){var m=this.getCellsInGridByElementId(u),g=this.getAllElementsInRow(m.endRowIndex+1,m.backside);if(g.length>0&&g[0].getHeight()!=o.getHeight())continue;var E=this.createLocationInformation(o,i.backside,this.createEmptyCells(m.startColIndex,m.endRowIndex+1,m.startColIndex,m.endRowIndex+1,o.getWidth(),o.getHeight()),m.startColIndex,m.endRowIndex+1,1,1);r.push(E)}}else for(var I=this.getCellsInGridByElementId(u),O=-1,p=-1,R=I.endRowIndex+1,k=I.startColIndex;k<=I.startColIndex+I.colCount-1;k++){var P=!1;if(a(k,R)){if(-1==O?(O=k,p=k):p=k,k==I.startColIndex+I.colCount-1)if(i.colCount<=p-O+1)P=!0;else{P=!0;for(var T=0;T<i.colCount;T++)if(a(O+T,I.endRowIndex)){P=!1;break}}}else i.colCount<=p-O+1&&(P=!0);if(P){var V=this.createLocationInformation(o,i.backside,this.createEmptyCells(O,I.endRowIndex+1,O+i.colCount-1,I.endRowIndex+i.rowCount-1,o.getWidth(),o.getHeight()),O,I.endRowIndex+1,i.colCount,i.rowCount);r.push(V)}}}}}catch(t){c.e(t)}finally{c.f()}var v=this.createLocationInformation(o,i.backside,this.createEmptyCells(-i.colCount,0,-1,i.rowCount-1,o.getWidth(),o.getHeight()),-i.colCount,0,i.colCount,i.rowCount);r.push(v);var _=this.createLocationInformation(o,i.backside,this.createEmptyCells(this.getColumnCount(),0,this.getColumnCount()+i.colCount-1,i.rowCount-1,o.getWidth(),o.getHeight()),this.getColumnCount(),0,i.colCount,i.rowCount);return r.push(_),r}},{key:"getFreePlanningLocation",value:function getFreePlanningLocation(t,o){var i=this.getElementById(t);if(i){var l=this.getCellsInGridByElementId(t);if(0!==l.cells.length){var r=l.backside?this.backGrid:this.frontGrid,a=l.startColIndex,h=l.endColIndex,c=l.startRowIndex,u=l.endRowIndex,d=-1,m=-1,g=-1,E=-1,I=[],O=function isValidCell(t,o){var i;return void 0===(null===(i=r[t])||void 0===i?void 0:i[o])};switch(o){case"LEFT":for(var p=a-1,R=!1,k=c;k<=u;k++)if(O(p,k)){m=k,R=!0;break}if(!R)return;R=!1;for(var P=a-1;P>=a-l.colCount&&(O(P,m)&&(0==m||!O(P,m-1)));P--)R=!0,d=P;if(!R)return;g=a-1,E=u,I=this.createEmptyCells(d,m,g,E,i.getWidth(),i.getHeight());break;case"TOP":for(var T=u+1,V=!1,v=h;v>=a;v--)O(v,T)&&(d=v,V=!0);if(!V)return;m=T,g=h,E=T+l.rowCount-1,I=this.createEmptyCells(d,m,g,E,i.getWidth(),i.getHeight());break;case"RIGHT":for(var _=h+1,B=!1,C=c;C<=u;C++)if(O(_,C)){m=C,B=!0;break}if(!B)return;B=!1;for(var G=h+1;G<=h+l.colCount&&(O(G,m)&&(0==m||!O(G,m-1)));G++)g=G,B=!0;if(!B)return;d=h+1,E=u,I=this.createEmptyCells(d,m,g,E,i.getWidth(),i.getHeight());break;default:return}return this.createLocationInformation(i,l.backside,I,d,m,g-d+1,E-m+1)}}}},{key:"createLocationInformation",value:function createLocationInformation(t,o,i,l,r,a,h){var c=o?this.backGrid:this.frontGrid,u={cells:i,widthPerCell:this.gridSetupParams.forceFixCellRasterSize?this.gridSetupParams.fixCellRasterWidth:t.getWidth(),heightPerCell:this.gridSetupParams.forceFixCellRasterSize?this.gridSetupParams.fixCellRasterHeight:t.getHeight(),depthPerCell:t.getDepth(),width:this.gridSetupParams.forceFixCellRasterSize?a*this.gridSetupParams.fixCellRasterWidth:t.getWidth(),height:this.gridSetupParams.forceFixCellRasterSize?h*this.gridSetupParams.fixCellRasterHeight:t.getHeight(),depth:t.getDepth(),startIndexWorldPos:new p.FM(0,0)};if(this.gridSetupParams.forceFixCellRasterSize)u.startIndexWorldPos=new p.FM(l*this.gridSetupParams.fixCellRasterWidth,r*this.gridSetupParams.fixCellRasterHeight);else{for(var d=0,m=0;m<l;m++)d+=c[m][0].width;l<0&&(d=-t.getWidth());var g=0;for(m=0;m<r;m++)g+=c[l][m].height;u.startIndexWorldPos=new p.FM(d,g)}return u}},{key:"getPlannerInteractionInformation",value:function getPlannerInteractionInformation(){for(var t=this.getAllElementsInGridSortedbyGridPos(),o={boxPlannerInteractionInformationPerElement:new Map},i=0;i<t.length;i++){var l=t[i],r=this.getCellsInGridByElementId(l.getElementId()),a=(r.backside?this.backGrid:this.frontGrid,this.createLocationInformation(l,r.backside,r.cells,r.startColIndex,r.startRowIndex,r.colCount,r.rowCount)),h=this.getFreePlanningLocation(l.getElementId(),"LEFT"),c=this.getFreePlanningLocation(l.getElementId(),"RIGHT"),u=this.getFreePlanningLocation(l.getElementId(),"TOP"),d=this.getElementHasTopElement(l.getElementId()),m=[];!d&&t.length>1&&(m=this.getFreeMoveLocation(l.getElementId()));var g={location:a,isDeletable:!d&&t.length>1,availablePlanningLocations:{availableBoxPlannerCellsLeft:h,availableBoxPlannerCellsTop:u,availableBoxPlannerCellsRight:c},availableMovingLocations:m};o.boxPlannerInteractionInformationPerElement.set(l.getElementId(),g)}return o}}])}(),V=i(86829),v=i(57312),_=i(58178),B=d.ZP.initLog("Planner","WEB-PLANNER-LOGIC"),C=function(){function DivaBoxPlanner(t,o){(0,r.Z)(this,DivaBoxPlanner),(0,h.Z)(this,"set",void 0),(0,h.Z)(this,"plannerID",void 0),(0,h.Z)(this,"constructionRulesHandler",void 0),(0,h.Z)(this,"boxPlannerGrid",void 0),(0,h.Z)(this,"nextElementId",1),this.set=t,this.plannerID=o,this.constructionRulesHandler=new O(this.set.getValueOfOptionOfArticle,this.set.checkArticleHasOption,this.set.updateCfgValuesByPlanner);this.boxPlannerGrid=new T({hasMaxGridRasterHeight:!1,hasMaxGridRasterWidth:!1,forceSingleCellPerElement:!0,forceFixCellRasterSize:!1},this.set.getValueOfOptionOfArticle)}return(0,a.Z)(DivaBoxPlanner,[{key:"initPlanner",value:(g=(0,l.Z)(u().mark((function _callee(t){var o,i,l,r,a,h,c,m,g,E;return u().wrap((function _callee$(u){for(;;)switch(u.prev=u.next){case 0:if(null==(o=JSON.parse(d.ZP.decodeBase64(t))).v||2!=o.v){u.next=26;break}if(o.set&&o.set.elements&&0!=o.set.elements.length){u.next=4;break}return u.abrupt("return");case 4:i=o.set.elements,l=0;case 6:if(!(l<i.length)){u.next=21;break}return r=i[l],a=parseInt(r.elementID),h=new v.Z(this.set.getSetId(),r.basketID,a,DivaBoxPlanner.plannerType),this.nextElementId<a+1&&(this.nextElementId=a+1),this.set.setElementId(r.basketID,h.ElementId),this.constructionRulesHandler.getConstructionRulesLoaded()||this.constructionRulesHandler.setConstructionRules(this.set.getConstructionRuleOfElementId(h.ElementId)),(c=this.set.getPlannerData(h.ElementId))&&h.updatePlannerData(c),u.next=17,V.Z.loadSVG(h,this.set);case 17:this.boxPlannerGrid.addElementAtGridPos(h,r.boxPlannerInfo.gridPosCol,r.boxPlannerInfo.gridPosRow,r.boxPlannerInfo.isOnBackside);case 18:l++,u.next=6;break;case 21:return this.boxPlannerGrid.updateWorldPosOfElements(),u.next=24,this.constructionRulesHandler.updateOptionLogicBoxPlanner(this.boxPlannerGrid);case 24:u.next=42;break;case 26:m=1,l=0;case 28:if(!(l<o.Elements.length)){u.next=38;break}return g=o.Elements[l],(a=parseInt(g.ID))>m&&(m=a),E={boxElementID:g.ID,boxCol:g.col,boxRow:g.row,boxUpdateWholePlanning:!1},u.next=35,this.addPlannerElement(g.BasketID,E);case 35:l++,u.next=28;break;case 38:return this.nextElementId=m+1,this.boxPlannerGrid.updateWorldPosOfElements(),u.next=42,this.constructionRulesHandler.updateOptionLogicBoxPlanner(this.boxPlannerGrid);case 42:return u.abrupt("return",o);case 43:case"end":return u.stop()}}),_callee,this)}))),function initPlanner(t){return g.apply(this,arguments)})},{key:"saveSetPlanner",value:function saveSetPlanner(){for(var t=[],o=this.boxPlannerGrid.getAllElementIdsInGrid(),i=0;i<o.length;i++){var l=this.boxPlannerGrid.getElementById(o[i]);if(l){for(var r=this.boxPlannerGrid.getCellsInGridByElementId(o[i]),a=l.getDockingDockingPoints(),h=[],c=0;c<a.length;c++){var u,d={id:a[c].DpId,onID:a[c].OnElementId,onDPID:null===(u=a[c].OnDP)||void 0===u?void 0:u.DpId};h.push(d)}var m={elementID:l.getElementId(),basketID:this.set.getBasketId(l.getElementId()),CatalogCodex:this.set.getCatalogCodex(),Codex:this.set.getArticleCodex(l.getElementId()),posNr:l.PosNr,x:l.WorldPosCenter.x,y:l.WorldPosCenter.y,z:l.WorldPosCenter.z,rot:l.RotDeg,width:l.Width?l.Width:-1,height:l.Height?l.Height:-1,depth:l.Depth?l.Depth:-1,DP:h,boxPlannerInfo:{gridPosCol:r.startColIndex,gridPosRow:r.startRowIndex,isOnBackside:r.backside}};t.push(m)}}var g=this.boxPlannerGrid.getBoundingBox();return{setId:this.set.getSetId(),x:0,y:0,z:0,width:g.width,height:g.height,depth:g.depth,rot:0,elements:t}}},{key:"addPlannerElement",value:(m=(0,l.Z)(u().mark((function _callee2(t,o){var i,l;return u().wrap((function _callee2$(r){for(;;)switch(r.prev=r.next){case 0:if(null!=o&&null!=o.boxElementID&&null!=o.boxCol&&null!=o.boxRow){r.next=2;break}return r.abrupt("return");case 2:return i=new v.Z(this.set.getSetId(),t,o.boxElementID,DivaBoxPlanner.plannerType),this.nextElementId=isNaN(o.boxElementID)?this.nextElementId:o.boxElementID+1,this.set.setElementId(t,i.ElementId),l=this.set.getPlannerData(i.ElementId),i.updatePlannerData(l),r.next=9,V.Z.loadSVG(i,this.set);case 9:if(this.constructionRulesHandler.getConstructionRulesLoaded()||this.constructionRulesHandler.setConstructionRules(this.set.getConstructionRuleOfElementId(i.ElementId)),this.boxPlannerGrid.addElementAtGridPos(i,o.boxCol,o.boxRow,null!=o.backside&&o.backside),!o.boxUpdateWholePlanning){r.next=15;break}return this.boxPlannerGrid.updateWorldPosOfElements(),r.next=15,this.constructionRulesHandler.updateOptionLogicBoxPlanner(this.boxPlannerGrid);case 15:case"end":return r.stop()}}),_callee2,this)}))),function addPlannerElement(t,o){return m.apply(this,arguments)})},{key:"extendPlanner",value:(c=(0,l.Z)(u().mark((function _callee3(t,o){return u().wrap((function _callee3$(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return");case 1:case"end":return t.stop()}}),_callee3)}))),function extendPlanner(t,o){return c.apply(this,arguments)})},{key:"copyPlannerElement",value:(i=(0,l.Z)(u().mark((function _callee4(t,o){var i,l,r,a,h,c,d,m=this;return u().wrap((function _callee4$(u){for(;;)switch(u.prev=u.next){case 0:if(i=!1,o){u.next=3;break}return u.abrupt("return");case 3:"STD"==o.copyType&&(o.targetElements=[]),l=[],r=this,a="AVR","BoxPlanner_backside"==o.copyType?a="BACKSIDE":"STD"!=o.copyType&&"BoxPlanner_COL"!=o.copyType||("AVR"==o.dpType?a="AVR":"AVO"==o.dpType?a="AVO":"AVL"==o.dpType&&(a="AVL")),t.forEach((function(t,r){var h;i||(!o||"AVL"!=o.dpType&&"AVR"!=o.dpType?o&&o.copyType&&"BoxPlanner_backside"==o.copyType&&(m.boxPlannerGrid.getPlannerHasActiveBackside()||m.boxPlannerGrid.prepareGridForBackSideCopy()):m.boxPlannerGrid.prepareGridForColCopy(r,o.dpType)),i=!0;var c=new v.Z(m.set.getSetId(),t,m.nextElementId,DivaBoxPlanner.plannerType);m.nextElementId++,m.set.setElementId(t,c.ElementId);var u=m.set.getPlannerData(c.ElementId);c.updatePlannerData(u),m.boxPlannerGrid.addElementAsCopy(r,c,a),m.constructionRulesHandler.onElementCopy(r,c.getElementId()),l.push(c),"STD"==o.copyType&&(null===(h=o.targetElements)||void 0===h||h.push(c.getElementId()))})),h=0;case 10:if(!(h<l.length)){u.next=17;break}return u.next=13,V.Z.loadSVG(l[h],this.set);case 13:if("AVO"==a&&this.constructionRulesHandler.getHasMaxElemCountPerColumn()&&this.boxPlannerGrid.getCellsInGridByElementId(l[h].ElementId).endRowIndex+1==r.constructionRulesHandler.getMaxElemCountPerColumn())for(c=l[h].getFreeDockingPointsByType("AVO"),d=0;d<c.length;d++)c[d].disableDP(!0);case 14:h++,u.next=10;break;case 17:return this.boxPlannerGrid.updateWorldPosOfElements(),u.next=20,this.constructionRulesHandler.updateOptionLogicBoxPlanner(this.boxPlannerGrid,o.changedOPT,o.targetElements);case 20:case"end":return u.stop()}}),_callee4,this)}))),function copyPlannerElement(t,o){return i.apply(this,arguments)})},{key:"initIDM3DMeta",value:function initIDM3DMeta(t){B.debug("No IDM3D Planner for BoxPlanner")}},{key:"getPlannerElementsInfluencedByDeletion",value:function getPlannerElementsInfluencedByDeletion(t,o){if(this.constructionRulesHandler.getForceWholePlanningSameHeight())return 0==this.boxPlannerGrid.getCellsInGridByElementId(t).startRowIndex?[]:this.boxPlannerGrid.getAllElementsInSameRowByElementId(t).elementIds.filter((function(o){return o!=t}));if(this.boxPlannerGrid.getPlannerHasActiveBackside()){if("BoxPlanner_backside"==o)return this.boxPlannerGrid.getAllElementsInBackGrid().map((function(t){return t.ElementId})).filter((function(o){return o!=t}));var i=this.boxPlannerGrid.getOppositeElement(t);if(i)return[i.getElementId()]}return[]}},{key:"getPlannerElementsInfluencedByCopy",value:function getPlannerElementsInfluencedByCopy(t,o){var i=[];if(o&&"NO"==(null==o?void 0:o.dpType)&&"BoxPlanner_backside"==o.copyType)return this.boxPlannerGrid.getAllElementIdsInGrid();if(o&&"BoxPlanner_COL"==o.copyType){for(var l=this.boxPlannerGrid.getCellsInGridByElementId(t),r=this.boxPlannerGrid.getAllElementsInColumn(l.startColIndex,l.backside),a=0;a<r.length;a++)i.push(r[a].getElementId());return i}if(i.push(t),o){switch(o.dpType){case"AVL":case"AVR":if(this.constructionRulesHandler.getForceWholePlanningSameHeight()){var h=this.boxPlannerGrid.getAllElementsInSameCol(t);i=h.elements,h.backside}else{var c=this.boxPlannerGrid.getAllElementsDown(t);i=i.concat(c.elements),c.backside}break;case"AVO":if(this.constructionRulesHandler.getForceWholePlanningSameHeight()){var u=this.boxPlannerGrid.getAllElementsInSameRowByElementId(t);i=u.elementIds,u.backside}}this.boxPlannerGrid.getPlannerHasActiveBackside()&&(i=i.concat(this.boxPlannerGrid.getOppositeElements(i).map((function(t){return t.ElementId}))))}return Array.from(new Set(i))}},{key:"deletePlannerElement",value:(o=(0,l.Z)(u().mark((function _callee5(t,o,i){var l,r,a,h;return u().wrap((function _callee5$(o){for(;;)switch(o.prev=o.next){case 0:if(l=this.boxPlannerGrid.getCellsInGridByElementId(t),r={row:l.startRowIndex,col:l.startColIndex,backside:!1},i&&"BoxPlanner_backside"==i?r={row:0,col:0,backside:!1}:l.startRowIndex>0?r.row--:(r.col=0==l.startColIndex?0:l.startColIndex-1,r.row=this.boxPlannerGrid.getRowCount(r.col,l.backside)-1),this.boxPlannerGrid.deleteElement(t,i),this.constructionRulesHandler.onElemDeleted(t),a=!0,i&&("BoxPlanner_backside"==i?(this.boxPlannerGrid.destroyBacksideModuleGrid(),a=!0):"STD_DONTUPDATE"==i&&(a=!1)),!a){o.next=11;break}return this.boxPlannerGrid.updateWorldPosOfElements(),o.next=11,this.constructionRulesHandler.updateOptionLogicBoxPlanner(this.boxPlannerGrid);case 11:if(!this.boxPlannerGrid.getPlannerElementAtGridPos(r.col,r.row,r.backside)){o.next=13;break}return o.abrupt("return",{newElementToSelect:null===(h=this.boxPlannerGrid.getPlannerElementAtGridPos(r.col,r.row,r.backside))||void 0===h?void 0:h.getElementId()});case 13:return o.abrupt("return",{});case 14:case"end":return o.stop()}}),_callee5,this)}))),function deletePlannerElement(t,i,l){return o.apply(this,arguments)})},{key:"getAllViewPlannerElements",value:function getAllViewPlannerElements(){return this.boxPlannerGrid.getAllElementsInGridSortedbyGridPos()}},{key:"getNeighborElements",value:function getNeighborElements(t,o){var i=this.boxPlannerGrid.getElementById(t);if(!i)return[];var l=null==i?void 0:i.getDockingDockingPointsByType(o);if(!l)return[];for(var r=[],a=0;a<(null==l?void 0:l.length);a++)null!=l[a]&&r.push(l[a].OnElementId);return r}},{key:"getFreeDockingPointsByElementId",value:function getFreeDockingPointsByElementId(t,o){return{dockingPoints:[],filter:[]}}},{key:"getDockedDockingPointsByElementId",value:function getDockedDockingPointsByElementId(t,o){return[]}},{key:"getDockedGroups",value:function getDockedGroups(){return[this.boxPlannerGrid.getAllElementIdsInGrid()]}},{key:"getBoundingBox",value:function getBoundingBox(){return B.warn("BoxPlanner - get2DViewPlannerBoundingBox not implemented yet","WC_0012"),new _.Z}},{key:"updatePlannerTrans",value:function updatePlannerTrans(t,o,i,l,r,a){return B.error(new d.GE("BoxPlanner - updatePlannerTrans not implemented yet",{code:"WC_0012"})),!1}},{key:"updatePlanner",value:(t=(0,l.Z)(u().mark((function _callee6(t,o){var i,l,r,a,h,c,d,m,g;return u().wrap((function _callee6$(u){for(;;)switch(u.prev=u.next){case 0:if(B.debug("BoxPlanner - configurationHasChanged "+t),!(t&&o&&o.length>0&&t.OPTELEMENT)||"OPVECK_I"!=t.OPTELEMENT&&"OPVECK_A"!=t.OPTELEMENT){u.next=18;break}if(!(o.length>1)){u.next=9;break}return u.next=5,this.constructionRulesHandler.updateOptionLogicBoxPlanner(this.boxPlannerGrid,t,o,!0);case 5:if(!(i=u.sent)){u.next=8;break}return u.abrupt("return",{doDeleteBackGrid:!1,elemIdsToDelete:[],viewMessageCodex:i});case 8:case 46:case 47:return u.abrupt("return",{doDeleteBackGrid:!1,elemIdsToDelete:[]});case 9:if(l=this.boxPlannerGrid.getCellsInGridByElementId(o[0]),r=o[0],l.startRowIndex>0&&(r=this.boxPlannerGrid.getPlannerElementAtGridPos(l.startColIndex,0,!1).getElementId()),this.boxPlannerGrid.getElementHasLeftElement(r)&&this.boxPlannerGrid.getElementHasRightElement(r)){u.next=18;break}return a="NO",this.boxPlannerGrid.getElementHasLeftElement(r)||(a="AVL"),this.boxPlannerGrid.getElementHasRightElement(r)||(a="AVR"),h=this.getPlannerElementsInfluencedByCopy(r,{dpType:a,copyType:"BoxPlanner_COL"}),u.abrupt("return",{doDeleteBackGrid:!1,elemIdsToDelete:[],elementIdToCopy:h,copyDPType:a,copyType:"BoxPlanner_COL",ignoreOptionsToCopy:["OPTELEMENT"],changedOPT:t,targetElements:o});case 18:if(!t||!t.OPTDMOD){u.next=33;break}u.t0=t.OPTDMOD,u.next="OPVD_EIN"===u.t0?22:"OPVD_AUS"===u.t0?26:31;break;case 22:if(this.boxPlannerGrid.getPlannerHasActiveBackside()){u.next=25;break}return c=this.getPlannerElementsInfluencedByCopy(-1,{dpType:"NO",copyType:"BoxPlanner_backside"}),u.abrupt("return",{doDeleteBackGrid:!1,elemIdsToDelete:[],elementIdToCopy:c,copyType:"BoxPlanner_backside",changedOPT:t});case 25:case 30:return u.abrupt("break",31);case 26:if(!this.boxPlannerGrid.getPlannerHasActiveBackside()){u.next=30;break}if(!((d=this.boxPlannerGrid.getAllElementsInBackGrid()).length>0)){u.next=30;break}return u.abrupt("return",{doDeleteBackGrid:!0,elemIdsToDelete:d.map((function(t){return t.ElementId})),deletionType:"BoxPlanner_backside",changedOPT:t});case 31:case 37:u.next=47;break;case 33:if(!(t&&t.OPTFARBE_RAHMEN&&"OPVSCHWARZ_MATT"==t.OPTFARBE_RAHMEN&&this.boxPlannerGrid.getPlannerHasActiveBackside())){u.next=39;break}if(!((m=this.boxPlannerGrid.getAllElementsInBackGrid()).length>0)){u.next=37;break}return u.abrupt("return",{doDeleteBackGrid:!0,elemIdsToDelete:m.map((function(t){return t.ElementId})),deletionType:"BoxPlanner_backside",changedOPT:t,targetElements:o,viewMessageCodex:"BOXPLAN_BLACKFRAME_INCOMPATIBLE_ELEMENT_WARNING"});case 39:return u.next=41,this.constructionRulesHandler.updateOptionLogicBoxPlanner(this.boxPlannerGrid,t,o);case 41:if(!(g=u.sent)){u.next=46;break}return u.abrupt("return",{doDeleteBackGrid:!1,elemIdsToDelete:[],viewMessageCodex:g});case 48:case"end":return u.stop()}}),_callee6,this)}))),function updatePlanner(o,i){return t.apply(this,arguments)})},{key:"getSetData",value:function getSetData(t,o,i,l){for(var r={ID:"S1",H:"",x:0,y:0,z:0,w:0,ELE:[],Blob:this.set.CatalogData.supplierILN,Cat:this.set.getCatalogCodex(),ShowDim:i},a=this.boxPlannerGrid.getAllElementsInGridSortedbyGridPos(),h=0;h<a.length;h++){var c=a[h],u=c.ElementId,m=this.set.getPlannerConfigData(u).config,g={ID:"E"+u,N:m.N,Model:m.Model,x:-c.WorldPosCenter.x,y:c.WorldPosCenter.y,z:c.WorldPosCenter.z,PosPivot:"Center",w:c.getRotDeg(),RotPivot:"Center",DP:c.getDockingPointJS3D(),MAT:m.MAT,CFG:m.CFG,H:""},E=(0,d.FB)(JSON.stringify(g));g.H=E,r.ELE.push(g)}E=(0,d.FB)(JSON.stringify(r));return r.H=E,{constructionSet:r}}},{key:"getPlannerId",value:function getPlannerId(){return this.plannerID}},{key:"getElementPosInfo",value:function getElementPosInfo(){B.error(new d.GE("BoxPlanner - getElementPosInfo not implemented yet",{code:"WC_0012"}))}},{key:"destroyPlanner",value:function destroyPlanner(){this.boxPlannerGrid.destroyBoxPlannerGrid()}},{key:"getCatalogData",value:function getCatalogData(){return this.set.CatalogData}},{key:"getPlannerBoundingBox",value:function getPlannerBoundingBox(){return this.boxPlannerGrid.getBoundingBox()}},{key:"updatePlannerBoundingBox",value:function updatePlannerBoundingBox(){}},{key:"getPlanningIsComplete",value:function getPlanningIsComplete(){return null!=this.boxPlannerGrid.getPlannerElementAtGridPos(0,0,!1)}},{key:"updateSetPosNr",value:function updateSetPosNr(t){for(var o=this.boxPlannerGrid.getAllElementIdsInGrid(),i=0;i<o.length;i++){var l=o[i],r=this.boxPlannerGrid.getElementById(l);r&&(r.SetPosNr=t+r.PosNr-1,this.set.setPosNr(r.ElementId,r.getPosNr()))}return o.length}},{key:"clonePlanner",value:function clonePlanner(t,o,i){var l=new DivaBoxPlanner(t,o);return l.initPlanner(i),l}},{key:"getPlannerInteractionInformation",value:function getPlannerInteractionInformation(){return this.boxPlannerGrid.getPlannerInteractionInformation()}}]);var t,o,i,c,m,g}();(0,h.Z)(C,"plannerType","BOX")}}]);