@crystaldesign/diva-web-planner-react 25.5.0-beta.15 → 25.5.0-beta.17
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.
- package/build/esm/{ArticleProperties-3ee44d09.js → ArticleProperties-c74599f2.js} +1 -1
- package/build/esm/{CatalogProperties-c0dccb5c.js → CatalogProperties-455c9133.js} +1 -1
- package/build/esm/{DecisionVizualizer-21706cf8.js → DecisionVizualizer-39eeb37e.js} +1 -1
- package/build/esm/{IconHandler-46108135.js → IconHandler-384a43b7.js} +1 -1
- package/build/esm/{OptionProperties-309cd9d3.js → OptionProperties-cbedaf5f.js} +1 -1
- package/build/esm/{OptionValueProperties-be7c8c1d.js → OptionValueProperties-7383d2be.js} +1 -1
- package/build/esm/{Planner2DGrid-1108c3b8.js → Planner2DGrid-1bdce056.js} +1 -1
- package/build/esm/{Planner3DImage-42652bff.js → Planner3DImage-3acde579.js} +1 -1
- package/build/esm/{index-c5c701d5.js → index-0043e82d.js} +5 -5
- package/build/esm/{index-62b40c03.js → index-00fbe909.js} +7 -7
- package/build/esm/{index-7198804e.js → index-025c508f.js} +1 -1
- package/build/esm/{index-895b8f74.js → index-03656e24.js} +1 -1
- package/build/esm/{index-ea3f0ccd.js → index-0456d5d3.js} +1 -1
- package/build/esm/{index-eaaf8833.js → index-0524e47b.js} +1 -1
- package/build/esm/{index-a2d43c49.js → index-0544f6d2.js} +2 -2
- package/build/esm/index-06b2e53c.js +46 -0
- package/build/esm/{index-6ecdc997.js → index-072ab40b.js} +1 -1
- package/build/esm/{index-ab244c0b.js → index-0b47abdb.js} +3 -3
- package/build/esm/{index-38ff1db7.js → index-0ba12567.js} +1 -1
- package/build/esm/{index-067091e7.js → index-0bee1be4.js} +4 -4
- package/build/esm/{index-b76f814a.js → index-0c6a8200.js} +2 -2
- package/build/esm/{index-8f798459.js → index-0dd711a0.js} +7 -7
- package/build/esm/{index-739ef74e.js → index-0edb6136.js} +2 -2
- package/build/esm/{index-62a9b56a.js → index-0ee0b1a9.js} +1 -1
- package/build/esm/{index-e70b1a49.js → index-0efa3e47.js} +1 -1
- package/build/esm/{index-22450139.js → index-13277490.js} +6 -6
- package/build/esm/{index-159d57b0.js → index-14c45a5f.js} +91 -91
- package/build/esm/{index-c9d41660.js → index-1542b185.js} +2 -2
- package/build/esm/{index-2a939755.js → index-1655484d.js} +118 -117
- package/build/esm/{index-0b332201.js → index-16d18de1.js} +2 -2
- package/build/esm/{index-13f5c06c.js → index-17ece7e9.js} +1 -1
- package/build/esm/{index-83aac1f0.js → index-18a6777c.js} +1 -1
- package/build/esm/{index-61c87b26.js → index-190c301e.js} +1 -1
- package/build/esm/{index-ff712830.js → index-1ada17c8.js} +1 -1
- package/build/esm/{index-c942fcb5.js → index-1ca92fad.js} +1 -1
- package/build/esm/{index-a9556739.js → index-1cd51ec7.js} +1 -1
- package/build/esm/{index-3bf9739f.js → index-1d2fe490.js} +2 -2
- package/build/esm/{index-9ac5882a.js → index-1d4644b0.js} +3 -3
- package/build/esm/{index-7ac6bde2.js → index-20250bd7.js} +91 -24
- package/build/esm/{index-74a404c2.js → index-2100950a.js} +2 -2
- package/build/esm/{index-fa53027a.js → index-2480ec1c.js} +2 -2
- package/build/esm/{index-99cfbab8.js → index-24d1c965.js} +1 -1
- package/build/esm/{index-75972064.js → index-25612e52.js} +6 -6
- package/build/esm/{index-5e419761.js → index-2644f10d.js} +21 -21
- package/build/esm/{index-8c7c1cd8.js → index-2697ce50.js} +1 -1
- package/build/esm/{index-2bf0a760.js → index-270a0708.js} +1 -1
- package/build/esm/{index-d42d80a3.js → index-273d90dd.js} +1 -1
- package/build/esm/{index-dfbebf19.js → index-2925287f.js} +7 -7
- package/build/esm/{index-715e751a.js → index-29e4c39b.js} +1 -1
- package/build/esm/{index-d63a9628.js → index-2b63024c.js} +1 -1
- package/build/esm/{index-07b42cde.js → index-2b7cb8fd.js} +3 -3
- package/build/esm/{index-b514f808.js → index-2bb8c245.js} +1 -1
- package/build/esm/{index-f1f33f55.js → index-2bc44b14.js} +1 -1
- package/build/esm/{index-a21519f8.js → index-2c3bf7cc.js} +2 -2
- package/build/esm/{index-f21a902b.js → index-2d0c3cb5.js} +20 -20
- package/build/esm/{index-da3604c8.js → index-2f0a600f.js} +1 -1
- package/build/esm/{index-ab9cc2ac.js → index-2f11a459.js} +1 -1
- package/build/esm/{index-a93a8af1.js → index-308094e7.js} +3 -3
- package/build/esm/{index-7664a20d.js → index-325f53b4.js} +1 -1
- package/build/esm/{index-d885a3ae.js → index-33fbad63.js} +1 -1
- package/build/esm/{index-b223658f.js → index-34bcc719.js} +2 -2
- package/build/esm/{index-6ac949c0.js → index-350633b4.js} +3 -3
- package/build/esm/{index-1d6cb19d.js → index-35d2ed29.js} +1 -1
- package/build/esm/{index-c0b2bc0f.js → index-39f6f43c.js} +2 -2
- package/build/esm/{index-e2d9af1e.js → index-3de51f65.js} +1 -1
- package/build/esm/{index-430a94aa.js → index-3e200371.js} +24 -24
- package/build/esm/{index-7168a4b6.js → index-3e79250b.js} +19 -17
- package/build/esm/{index-88e9faa5.js → index-3ed170f5.js} +1 -1
- package/build/esm/{index-1ddf2593.js → index-4058f450.js} +3 -3
- package/build/esm/{index-b9f395f7.js → index-4082468f.js} +5 -4
- package/build/esm/{index-50793aef.js → index-4230a503.js} +59 -59
- package/build/esm/{index-942a3ef5.js → index-43277e49.js} +20 -20
- package/build/esm/{index-ac1aaee3.js → index-4336c985.js} +4 -4
- package/build/esm/{index-f57f579e.js → index-48703f74.js} +6 -6
- package/build/esm/{index-8c8c4d07.js → index-48d2e704.js} +7 -7
- package/build/esm/{index-aed98128.js → index-499ee97e.js} +252 -253
- package/build/esm/{index-1873dd64.js → index-49b0c344.js} +56 -56
- package/build/esm/{index-4b05f946.js → index-49e991ac.js} +1 -1
- package/build/esm/{index-2ca96cd5.js → index-49f654d3.js} +1 -1
- package/build/esm/{index-1ebbfd4f.js → index-4a1f67ff.js} +4 -4
- package/build/esm/{index-de9e9828.js → index-4a827044.js} +1 -1
- package/build/esm/{index-0e42e54d.js → index-4c44896a.js} +75 -75
- package/build/esm/{index-23393dd0.js → index-4c476705.js} +1 -1
- package/build/esm/{index-5150c2ed.js → index-4c958433.js} +1 -1
- package/build/esm/{index-82adbb06.js → index-4c9b6247.js} +4 -4
- package/build/esm/{index-8ad1e2d4.js → index-4e281313.js} +1 -1
- package/build/esm/{index-c676e91a.js → index-4e734002.js} +2 -2
- package/build/esm/{index-12e8ec3f.js → index-4eef985e.js} +1 -1
- package/build/esm/{index-e3292e88.js → index-4f4adfe0.js} +2 -2
- package/build/esm/{index-924989d8.js → index-5062aa83.js} +1 -1
- package/build/esm/{index-2c7c9d07.js → index-50d2890f.js} +1 -1
- package/build/esm/{index-e2d4d885.js → index-51e1e0af.js} +1 -1
- package/build/esm/{index-b4d0094f.js → index-523eba2b.js} +3 -3
- package/build/esm/{index-61bc5271.js → index-53e3e37d.js} +4 -4
- package/build/esm/{index-0bca2bb2.js → index-54d49a22.js} +2 -2
- package/build/esm/{index-26429140.js → index-599e755b.js} +1 -1
- package/build/esm/{index-00ad31b3.js → index-59a20bdd.js} +2 -2
- package/build/esm/{index-ad43d685.js → index-5b1151a7.js} +6 -6
- package/build/esm/{index-8af7fcee.js → index-5b5e5538.js} +1 -1
- package/build/esm/{index-76020e32.js → index-5c9ce711.js} +2 -2
- package/build/esm/{index-5a63e7e7.js → index-5e4edfbe.js} +2 -2
- package/build/esm/{index-df12a53d.js → index-5f05ae31.js} +1 -1
- package/build/esm/{index-6309a5c3.js → index-5ffba490.js} +9 -9
- package/build/esm/{index-caa4bcb9.js → index-60012557.js} +1 -1
- package/build/esm/{index-4b800dba.js → index-61fe54be.js} +21 -21
- package/build/esm/{index-5258aa3e.js → index-63744d76.js} +1 -1
- package/build/esm/{index-eb44ac4e.js → index-64045809.js} +1 -1
- package/build/esm/{index-51ba52a7.js → index-6497f7e9.js} +13 -8
- package/build/esm/{index-3229f35d.js → index-64c310bd.js} +1 -1
- package/build/esm/{index-bb6d018b.js → index-65d9d1d7.js} +2 -2
- package/build/esm/{index-9f759dd4.js → index-6aa30d77.js} +75 -75
- package/build/esm/{index-628f8e34.js → index-6bf2e396.js} +19 -19
- package/build/esm/{index-49a150e4.js → index-6c70d23b.js} +4 -4
- package/build/esm/{index-fefcf688.js → index-6fc62ae3.js} +3 -3
- package/build/esm/{index-51c194a0.js → index-70cc9c59.js} +77 -77
- package/build/esm/{index-89b61179.js → index-71270382.js} +4 -4
- package/build/esm/{index-ad14da39.js → index-74eb780b.js} +3 -3
- package/build/esm/{index-d4c7760f.js → index-75bb4af4.js} +3 -3
- package/build/esm/{index-5b94e7d7.js → index-761b3276.js} +1 -1
- package/build/esm/{index-600a6afe.js → index-762699fb.js} +1 -1
- package/build/esm/{index-dbefccab.js → index-76cb2ae0.js} +5 -5
- package/build/esm/{index-04d2fcd4.js → index-77121673.js} +1 -1
- package/build/esm/{index-50e17aa1.js → index-775a69da.js} +1 -1
- package/build/esm/{index-4ee8a2d3.js → index-777e4b2f.js} +71 -71
- package/build/esm/{index-9f35082d.js → index-77abd603.js} +9 -9
- package/build/esm/{index-b1c14967.js → index-7934f8bd.js} +7 -5
- package/build/esm/{index-260f9cdf.js → index-7aa114ff.js} +1 -1
- package/build/esm/{index-bd8f8bc8.js → index-7b396a4b.js} +20 -20
- package/build/esm/{index-c721ce0d.js → index-7e80ecd6.js} +1 -1
- package/build/esm/{index-7f1d88c9.js → index-80e70ab1.js} +15 -15
- package/build/esm/{index-6139b9af.js → index-85a9d1c1.js} +1 -1
- package/build/esm/{index-9a5052b1.js → index-85c71901.js} +2 -2
- package/build/esm/{index-f99fc8ec.js → index-866dd320.js} +1 -1
- package/build/esm/{index-eda83bc2.js → index-87ad7e60.js} +1 -1
- package/build/esm/{index-57d4ca3d.js → index-88c4d259.js} +62 -62
- package/build/esm/{index-26e0934a.js → index-8aa63717.js} +1 -1
- package/build/esm/{index-622d5877.js → index-8c28f4ac.js} +1 -1
- package/build/esm/{index-59eb30d8.js → index-8d49a9a3.js} +5 -5
- package/build/esm/{index-3ecf05bd.js → index-8d54e756.js} +1 -1
- package/build/esm/{index-fa1d5bd1.js → index-914a6e9c.js} +1 -1
- package/build/esm/{index-9712f9bb.js → index-916a6bd7.js} +3 -3
- package/build/esm/{index-0c593e5c.js → index-9170f1b0.js} +1 -1
- package/build/esm/{index-5634a112.js → index-91835388.js} +1 -1
- package/build/esm/{index-4fec51a8.js → index-91db3bde.js} +1 -1
- package/build/esm/{index-50c71e1c.js → index-98ab972e.js} +41 -41
- package/build/esm/{index-2a85f271.js → index-99bb32d1.js} +17 -17
- package/build/esm/{index-08edb780.js → index-9aaf9cb4.js} +4 -4
- package/build/esm/{index-7950f776.js → index-9c8f764c.js} +1 -1
- package/build/esm/{index-1dcfcc21.js → index-9d0d2103.js} +6 -6
- package/build/esm/{index-aaa8fcba.js → index-9d418fc2.js} +5 -5
- package/build/esm/{index-04e8d86b.js → index-9d49c7f5.js} +6 -6
- package/build/esm/{index-65cb03ee.js → index-9db2aa32.js} +1 -1
- package/build/esm/{index-cae0aa94.js → index-9e997513.js} +1 -1
- package/build/esm/{index-789d5248.js → index-a005436d.js} +1 -1
- package/build/esm/{index-00424dbf.js → index-a071deb9.js} +6 -6
- package/build/esm/{index-3417a335.js → index-a08e5818.js} +1 -1
- package/build/esm/{index-dfc010cb.js → index-a140a482.js} +111 -55
- package/build/esm/{index-da19b39e.js → index-a3a54825.js} +2 -2
- package/build/esm/{index-f56c9c2c.js → index-a6b2b053.js} +1 -1
- package/build/esm/{index-ce7b4ea6.js → index-a6d4e296.js} +2 -2
- package/build/esm/{index-31f6cf6f.js → index-a97a718a.js} +1 -1
- package/build/esm/{index-6a2c6b38.js → index-aa8024c1.js} +1 -1
- package/build/esm/{index-4c0d3838.js → index-abae900c.js} +25 -10
- package/build/esm/{index-88d46385.js → index-abb9662d.js} +1 -1
- package/build/esm/{index-c991c4c7.js → index-ad58d447.js} +3 -3
- package/build/esm/{index-6dc0a925.js → index-aed0095c.js} +1 -1
- package/build/esm/{index-b3ef3b2c.js → index-b0ab08e7.js} +8 -8
- package/build/esm/{index-77d9173d.js → index-b0d86963.js} +61 -61
- package/build/esm/{index-450ba32f.js → index-b0f0ae0f.js} +9 -9
- package/build/esm/{index-2dcbc0b2.js → index-b0fc4890.js} +1 -1
- package/build/esm/{index-6e350ba6.js → index-b13d82db.js} +1 -1
- package/build/esm/{index-1b0d9c1a.js → index-b203f8bf.js} +35 -39
- package/build/esm/{index-c0e1098f.js → index-b2489a1f.js} +4 -3
- package/build/esm/{index-942afa6b.js → index-b34623cf.js} +1 -1
- package/build/esm/{index-12d9cca1.js → index-b4cbd33a.js} +1 -1
- package/build/esm/{index-1ccf2fb0.js → index-b6c61358.js} +2 -2
- package/build/esm/{index-036ab768.js → index-b7139c1d.js} +1 -1
- package/build/esm/{index-5f7f6752.js → index-b732e4df.js} +5 -5
- package/build/esm/{index-bacff823.js → index-b79dd931.js} +6 -6
- package/build/esm/{index-4b846cf1.js → index-b8122570.js} +2 -2
- package/build/esm/{index-eab5550c.js → index-b8e7e6aa.js} +1 -1
- package/build/esm/{index-5b942779.js → index-babcd288.js} +2 -2
- package/build/esm/{index-8ffef9e1.js → index-bae8fb31.js} +1 -1
- package/build/esm/{index-80e71d6a.js → index-bb880cec.js} +7 -7
- package/build/esm/{index-10771074.js → index-bcd65924.js} +1 -1
- package/build/esm/{index-71629bd4.js → index-bd8a801e.js} +1 -1
- package/build/esm/{index-35ed94bb.js → index-bfcede0a.js} +2 -2
- package/build/esm/{index-927b1871.js → index-c182e0b5.js} +1 -1
- package/build/esm/{index-4ccddb9b.js → index-c1ca3a10.js} +2 -2
- package/build/esm/{index-676c09d7.js → index-c266a3ce.js} +1 -1
- package/build/esm/{index-7d6228f8.js → index-c3490a32.js} +3 -3
- package/build/esm/{index-59b83e37.js → index-c3816923.js} +1 -1
- package/build/esm/{index-f8ca38ac.js → index-c3f95c57.js} +7 -7
- package/build/esm/{index-1347ee1a.js → index-c6318832.js} +1 -1
- package/build/esm/{index-45362a1e.js → index-c6595d2a.js} +1 -1
- package/build/esm/{index-1d703e64.js → index-c8eb2439.js} +2 -2
- package/build/esm/{index-9616c17a.js → index-c9c44477.js} +9 -9
- package/build/esm/{index-4996ca7f.js → index-ca13e2f2.js} +1 -1
- package/build/esm/{index-8e16b0f8.js → index-ca72670a.js} +3 -3
- package/build/esm/{index-5833abe8.js → index-cbfedf35.js} +1 -1
- package/build/esm/{index-ef69a503.js → index-ccc7fc67.js} +6 -6
- package/build/esm/{index-62e94f04.js → index-cd307049.js} +3 -3
- package/build/esm/{index-22ee04cc.js → index-cd5b5f66.js} +5 -5
- package/build/esm/{index-dd981a32.js → index-cd769965.js} +2 -2
- package/build/esm/{index-3a9c4c76.js → index-cdb7b146.js} +1 -1
- package/build/esm/{index-72c6813e.js → index-cfea2580.js} +2 -2
- package/build/esm/{index-962a1d3f.js → index-d00151a3.js} +1 -1
- package/build/esm/{index-a7e16270.js → index-d1ccc844.js} +92 -92
- package/build/esm/{index-2fceb2d5.js → index-d26b4065.js} +1 -1
- package/build/esm/{index-3d21300e.js → index-d3dfc5a5.js} +1 -1
- package/build/esm/{index-645d4eb3.js → index-d4ab69d8.js} +113 -112
- package/build/esm/{index-4f7ee9ef.js → index-d4b3cd9c.js} +77 -77
- package/build/esm/{index-7526596a.js → index-d5ca24a8.js} +1 -1
- package/build/esm/{index-9335cedf.js → index-d6d514a9.js} +4 -4
- package/build/esm/{index-298b2099.js → index-d835a606.js} +1 -1
- package/build/esm/{index-8e298ae7.js → index-d8e1057f.js} +40 -40
- package/build/esm/{index-766b3ded.js → index-dbfba866.js} +4 -4
- package/build/esm/{index-d7fccc28.js → index-dd9651de.js} +2 -2
- package/build/esm/{index-e5500a2f.js → index-deeda1ee.js} +60 -60
- package/build/esm/{index-dbbfa23d.js → index-e03bbea5.js} +1 -1
- package/build/esm/{index-bed19d33.js → index-e2995cac.js} +2 -2
- package/build/esm/{index-ebfa69c8.js → index-e4a6c701.js} +2 -2
- package/build/esm/{index-36127407.js → index-e4f30378.js} +1 -1
- package/build/esm/{index-b062337d.js → index-e6899b3a.js} +5 -5
- package/build/esm/{index-dd2ce617.js → index-e7bb5d52.js} +1 -1
- package/build/esm/{index-e95e3308.js → index-e877751a.js} +1 -1
- package/build/esm/{index-288f0d6b.js → index-eb40e0fd.js} +1 -1
- package/build/esm/{index-fc73bf91.js → index-ebd1c4b4.js} +1 -1
- package/build/esm/{index-e39ef156.js → index-f07b4e80.js} +1 -1
- package/build/esm/{index-124edc16.js → index-f0829320.js} +57 -57
- package/build/esm/{index-9509c751.js → index-f1f8566a.js} +1 -1
- package/build/esm/{index-53c44b15.js → index-f3307d3b.js} +3 -3
- package/build/esm/{index-7f5b9b47.js → index-f38090ea.js} +18 -18
- package/build/esm/{index-2e2b745d.js → index-f479e550.js} +1 -1
- package/build/esm/{index-c6f48400.js → index-f4989119.js} +3 -3
- package/build/esm/{index-c97f58fb.js → index-f5617003.js} +5 -5
- package/build/esm/{index-1e4bd376.js → index-f61cdda4.js} +2 -2
- package/build/esm/{index-d38efed8.js → index-f78d1d29.js} +3 -3
- package/build/esm/{index-8a344731.js → index-f7f10a9b.js} +1 -1
- package/build/esm/{index-e293b7fe.js → index-f941ac76.js} +2 -2
- package/build/esm/{index-5776548d.js → index-f9a57d6b.js} +1 -1
- package/build/esm/{index-81a187ee.js → index-fad9462a.js} +4 -4
- package/build/esm/{index-7308fc3c.js → index-fb6bca22.js} +1 -1
- package/build/esm/{index-4fafb838.js → index-fc4252e6.js} +2 -2
- package/build/esm/{index-e20e65e4.js → index-fd5b3757.js} +14 -14
- package/build/esm/{index-77486cb0.js → index-ff100e40.js} +63 -63
- package/build/esm/{index-24a0e451.js → index-ffb89689.js} +1 -1
- package/build/esm/{index-2fe56a06.js → index-ffcb353b.js} +3 -3
- package/build/esm/index.js +1 -1
- package/build/esm/{index.module-5e1fdd06.js → index.module-012a6605.js} +1 -1
- package/build/esm/{index.module-6bf0ddaa.js → index.module-11a6847e.js} +1 -1
- package/build/esm/index.module-1fb3cd31.js +52 -0
- package/build/esm/{index.module-42c0406b.js → index.module-2e5b8465.js} +1 -1
- package/build/esm/{index.module-67390622.js → index.module-356aaf4d.js} +1 -1
- package/build/esm/{index.module-5ff1e2b2.js → index.module-39e193b7.js} +1 -1
- package/build/esm/{index.module-3ef0715c.js → index.module-4c3f19fb.js} +1 -1
- package/build/esm/{index.module-dfec8364.js → index.module-67d13b47.js} +1 -1
- package/build/esm/{index.module-e559fc57.js → index.module-7b29fb91.js} +1 -1
- package/build/esm/{index.module-e9c4495e.js → index.module-a6425cb9.js} +1 -1
- package/build/esm/{index.module-17e5f472.js → index.module-b26fe39f.js} +1 -1
- package/build/esm/{index.module-26b381f8.js → index.module-b2ff9dd5.js} +1 -1
- package/build/esm/{index.module-fcc18e21.js → index.module-b9010af3.js} +1 -1
- package/build/esm/{index.module-1e372387.js → index.module-fac150c6.js} +1 -1
- package/build/esm/{react-json-viewer-e59726ea.js → react-json-viewer-500b4296.js} +1 -1
- package/build/types/web-planner-react/src/components/GlobalElements/Checkout/AGB/index.d.ts +8 -0
- package/build/types/web-planner-react/src/components/GlobalElements/Checkout/AGB/index.d.ts.map +1 -0
- package/build/types/web-planner-react/src/components/GlobalElements/Checkout/CreateAppointment/index.d.ts +1 -1
- package/build/types/web-planner-react/src/components/GlobalElements/Checkout/CreateAppointment/index.d.ts.map +1 -1
- package/build/types/web-planner-react/src/components/GlobalElements/Checkout/Save/index.d.ts +1 -1
- package/build/types/web-planner-react/src/components/GlobalElements/Checkout/Save/index.d.ts.map +1 -1
- package/build/types/web-planner-react/src/components/GlobalElements/Checkout/Share/ShareViaEmail/index.d.ts.map +1 -1
- package/build/types/web-planner-react/src/components/GlobalElements/Checkout/Share/ShareViaSocialMedias/index.d.ts.map +1 -1
- package/build/types/web-planner-react/src/components/GlobalElements/Checkout/Share/ShareViaUrl/index.d.ts.map +1 -1
- package/build/types/web-planner-react/src/components/GlobalElements/Checkout/index.d.ts +1 -1
- package/build/types/web-planner-react/src/components/GlobalElements/Checkout/index.d.ts.map +1 -1
- package/build/types/web-planner-react/src/components/Product/ProductCenter/Planner3D/index.d.ts.map +1 -1
- package/build/types/web-planner-react/src/components/Product/ProductCenter/PlannerRTV/index.d.ts.map +1 -1
- package/build/types/web-planner-react/src/components/Product/ProductHeader/Functions/standard/index.d.ts.map +1 -1
- package/build/types/web-planner-react/src/components/Product/ProductSettings/index.d.ts.map +1 -1
- package/build/types/web-planner-react/src/model/TabGroup/ConfiguratorStructureHandler.d.ts.map +1 -1
- package/build/umd/1346.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/1552.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/1922.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/1959.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/1959.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/2027.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/208.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/2122.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/2122.diva-web-planner-react.umd.min.js.LICENSE.txt +9 -0
- package/build/umd/2357.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/2568.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/2673.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/2724.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/304.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/3051.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/3268.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/3596.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/3678.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/3754.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/3756.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/4217.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/4237.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/4263.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/4412.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/4412.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/4552.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/4903.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/499.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/5056.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/5217.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/5284.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/5351.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/5503.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/5822.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/5890.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/5894.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/6108.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/6180.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/6201.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/6212.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/6223.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/653.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/7052.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/7328.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/7442.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/7589.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/{3286.diva-web-planner-react.umd.min.js → 7668.diva-web-planner-react.umd.min.js} +2 -2
- package/build/umd/{3286.diva-web-planner-react.umd.min.js.LICENSE.txt → 7668.diva-web-planner-react.umd.min.js.LICENSE.txt} +1 -1
- package/build/umd/7674.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/7725.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/7789.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/7835.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/7835.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/7984.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/8584.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/859.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/8646.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/8717.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/8742.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/8742.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/8757.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/8950.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/9214.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/9631.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/9874.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/report.html +1 -1
- package/package.json +8 -8
- package/build/esm/index.module-0c9d4c62.js +0 -49
- package/build/umd/5474.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/5474.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -10
- package/build/umd/6797.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/6797.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -10
- package/build/umd/8356.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/8356.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -11
@@ -1,2 +1,2 @@
|
|
1
1
|
/*! For license information please see 2673.diva-web-planner-react.umd.min.js.LICENSE.txt */
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignDivaWebPlannerReact=self.webpackChunkCrystaldesignDivaWebPlannerReact||[]).push([[2673],{32673:(t,o,i)=>{i.r(o),i.d(o,{default:()=>B});var l=i(84658),r=i(13125),a=i(43860),h=i(80248),c=i(50747),u=i.n(c),d=i(74530),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 A=t.getTopElements(d[m]),D=0;D<A.length;D++)l.indexOf(A[D].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(97933);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 k=d.ZP.initLog("Planner","BOX-PLANNER_GRID"),P=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||k.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){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,k=h;if(l.length>R){var P=l[R][k];P&&-1==a.indexOf(P.plannerElementId)&&(a.push(P.plannerElementId),r.push(this.plannerElements.get(P.plannerElementId)))}}break;case"BACK":if(this.hasActiveBackside){var T=this.getPlannerElementAtGridPos(i.startColIndex,i.startRowIndex,!0);null!=T&&(r=[T])}}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)||k.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],P=this.plannerElements.get(p.plannerElementId);if(P){var T=null==P?void 0:P.getDockingPointById("AVO_AVO_2_IL");T?O&&R.Z.tryDockElementToDP(O,P,T):k.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}}])}(),T=i(22885),V=i(57312),v=i(58178),_=d.ZP.initLog("Planner","WEB-PLANNER-LOGIC"),B=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 P({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,T.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,T.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,T.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){_.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 _.warn("BoxPlanner - get2DViewPlannerBoundingBox not implemented yet","WC_0012"),new v.Z}},{key:"updatePlannerTrans",value:function updatePlannerTrans(t,o,i,l,r,a){return _.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(_.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(){_.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)(B,"plannerType","BOX")}}]);
|
2
|
+
"use strict";(self.webpackChunkCrystaldesignDivaWebPlannerReact=self.webpackChunkCrystaldesignDivaWebPlannerReact||[]).push([[2673],{32673:(t,o,i)=>{i.r(o),i.d(o,{default:()=>B});var l=i(84658),r=i(13125),a=i(43860),h=i(80248),c=i(50747),u=i.n(c),d=i(17868),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 A=t.getTopElements(d[m]),D=0;D<A.length;D++)l.indexOf(A[D].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(97933);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 k=d.ZP.initLog("Planner","BOX-PLANNER_GRID"),P=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||k.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){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,k=h;if(l.length>R){var P=l[R][k];P&&-1==a.indexOf(P.plannerElementId)&&(a.push(P.plannerElementId),r.push(this.plannerElements.get(P.plannerElementId)))}}break;case"BACK":if(this.hasActiveBackside){var T=this.getPlannerElementAtGridPos(i.startColIndex,i.startRowIndex,!0);null!=T&&(r=[T])}}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)||k.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],P=this.plannerElements.get(p.plannerElementId);if(P){var T=null==P?void 0:P.getDockingPointById("AVO_AVO_2_IL");T?O&&R.Z.tryDockElementToDP(O,P,T):k.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}}])}(),T=i(22885),V=i(57312),v=i(58178),_=d.ZP.initLog("Planner","WEB-PLANNER-LOGIC"),B=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 P({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,T.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,T.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,T.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){_.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 _.warn("BoxPlanner - get2DViewPlannerBoundingBox not implemented yet","WC_0012"),new v.Z}},{key:"updatePlannerTrans",value:function updatePlannerTrans(t,o,i,l,r,a){return _.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(_.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(){_.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)(B,"plannerType","BOX")}}]);
|