@crystaldesign/diva-web-planner-react 26.12.0-beta.5 → 26.12.0-beta.7
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/{Planner2DGrid-3bc5c83b.js → Planner2DGrid-351fcfa9.js} +1 -1
- package/build/esm/{Planner3DImage-30ffaa22.js → Planner3DImage-b26b30ee.js} +1 -1
- package/build/esm/{UnlockCard-7c5ebd15.js → UnlockCard-d9af992e.js} +1 -1
- package/build/esm/{index-50afb8e8.js → index-033066ec.js} +3 -3
- package/build/esm/{index-52302186.js → index-03978692.js} +1 -1
- package/build/esm/{index-b02ec68c.js → index-04581a81.js} +1 -1
- package/build/esm/{index-dfc4143a.js → index-050e4114.js} +4 -4
- package/build/esm/{index-aa5447cc.js → index-059777a7.js} +1 -1
- package/build/esm/{index-b440609e.js → index-05da5a3e.js} +1 -1
- package/build/esm/{index-811cdb6a.js → index-05edd091.js} +1 -1
- package/build/esm/{index-b4dee0f1.js → index-06579426.js} +5 -5
- package/build/esm/{index-7df9160b.js → index-07b2df3d.js} +1 -1
- package/build/esm/{index-b7e7419f.js → index-0c3fc35f.js} +1 -1
- package/build/esm/{index-2b154972.js → index-0c6d07c4.js} +1 -1
- package/build/esm/{index-b38f4589.js → index-0caf88ad.js} +1 -1
- package/build/esm/{index-2d69e2c5.js → index-0e064b18.js} +1 -1
- package/build/esm/{index-309624dc.js → index-0e500e68.js} +1 -1
- package/build/esm/{index-69f95bb8.js → index-0fbcbbd4.js} +3 -3
- package/build/esm/{index-b2387dc9.js → index-10054b8b.js} +1 -1
- package/build/esm/{index-d58535a2.js → index-12095822.js} +1 -1
- package/build/esm/{index-2c01ec07.js → index-126bcb95.js} +1 -1
- package/build/esm/{index-06a7430a.js → index-136e295b.js} +1 -1
- package/build/esm/{index-07a1c9c8.js → index-14e8654c.js} +66 -66
- package/build/esm/{index-723474e9.js → index-1536c574.js} +18 -18
- package/build/esm/{index-75b5b2fb.js → index-177d33fa.js} +2 -2
- package/build/esm/{index-be7338ee.js → index-17f08221.js} +1 -1
- package/build/esm/{index-dac37d2f.js → index-18ecdcdc.js} +2 -2
- package/build/esm/{index-473bcdff.js → index-19259e88.js} +1 -1
- package/build/esm/{index-566fc603.js → index-1a334d36.js} +2 -2
- package/build/esm/{index-b18e2b09.js → index-1a537420.js} +68 -68
- package/build/esm/{index-16af61b8.js → index-1bf84d61.js} +1 -1
- package/build/esm/{index-860e43eb.js → index-1d7fc5fe.js} +1 -1
- package/build/esm/{index-940f43c6.js → index-2055b6f8.js} +1 -1
- package/build/esm/{index-be178435.js → index-21570d15.js} +2 -2
- package/build/esm/{index-dc587514.js → index-23becd91.js} +1 -1
- package/build/esm/{index-1ff22333.js → index-24a4d0c7.js} +1 -1
- package/build/esm/{index-6ae3a812.js → index-24b99557.js} +1 -1
- package/build/esm/{index-b0ad6694.js → index-2648ae49.js} +2 -2
- package/build/esm/{index-ac8408c3.js → index-27d8f0ff.js} +3 -3
- package/build/esm/{index-6c3c1054.js → index-28efc245.js} +1 -1
- package/build/esm/{index-38c981b0.js → index-29d4ff31.js} +1 -1
- package/build/esm/{index-1bb4e3b1.js → index-2c5c77a1.js} +1 -1
- package/build/esm/{index-c737edcc.js → index-2cd1003e.js} +1 -1
- package/build/esm/{index-f3bb0857.js → index-2f590bbc.js} +4 -4
- package/build/esm/{index-868453f2.js → index-2f91e6aa.js} +1 -1
- package/build/esm/{index-ac9d2dfd.js → index-30f0d497.js} +1 -1
- package/build/esm/{index-c1291580.js → index-3248b8cf.js} +2 -2
- package/build/esm/{index-b3743148.js → index-32c52d75.js} +2 -2
- package/build/esm/{index-d5f4327d.js → index-32f548c5.js} +70 -70
- package/build/esm/{index-eb92ae36.js → index-343e11cc.js} +1 -1
- package/build/esm/{index-2e4479d3.js → index-35e4b42d.js} +1 -1
- package/build/esm/{index-28910cd2.js → index-379d3784.js} +3 -3
- package/build/esm/{index-82c0ccc1.js → index-38380527.js} +1 -1
- package/build/esm/{index-b9bf7d16.js → index-3946a264.js} +1 -1
- package/build/esm/{index-c31f8f99.js → index-3a3a828e.js} +1 -1
- package/build/esm/{index-4f946de7.js → index-3b4351f1.js} +1 -1
- package/build/esm/{index-66daf2fd.js → index-3c571d02.js} +1 -1
- package/build/esm/{index-e21da5bf.js → index-3c942959.js} +1 -1
- package/build/esm/{index-9421136e.js → index-3d6c758f.js} +4 -4
- package/build/esm/{index-ca2aa0a9.js → index-3f957758.js} +5 -5
- package/build/esm/{index-0a3addb2.js → index-426b5700.js} +1 -1
- package/build/esm/{index-09b2701d.js → index-47ffb930.js} +3 -3
- package/build/esm/{index-157426b7.js → index-49408fbc.js} +3 -3
- package/build/esm/{index-3ce02fa4.js → index-4a9ef7d6.js} +3 -3
- package/build/esm/{index-d0768d5b.js → index-4b2bb65f.js} +1 -1
- package/build/esm/{index-0fc23a9b.js → index-4b46f068.js} +21 -21
- package/build/esm/{index-fd6deca7.js → index-4b497e67.js} +17 -17
- package/build/esm/{index-c3a47c81.js → index-4ba8e740.js} +2 -2
- package/build/esm/{index-3b0fcf76.js → index-4bc6c7c8.js} +2 -2
- package/build/esm/{index-1d4c5fa5.js → index-4dbc631f.js} +2 -2
- package/build/esm/{index-e0379022.js → index-4fa3cd34.js} +18 -18
- package/build/esm/{index-6f617c64.js → index-5204f9c9.js} +1 -1
- package/build/esm/{index-6840d2a6.js → index-53bb7867.js} +1 -1
- package/build/esm/{index-a0af8e9a.js → index-5554f093.js} +100 -100
- package/build/esm/{index-3bb2a5e5.js → index-55fd95c6.js} +1 -1
- package/build/esm/{index-9b828c6e.js → index-57a756b9.js} +66 -66
- package/build/esm/{index-82858b21.js → index-594f0677.js} +1 -1
- package/build/esm/{index-d892a48f.js → index-59f98c3b.js} +90 -90
- package/build/esm/{index-d0e73831.js → index-5b91aa9c.js} +1 -1
- package/build/esm/{index-1465298d.js → index-5c9a5c1b.js} +1 -1
- package/build/esm/{index-889421ac.js → index-5cac93f7.js} +1 -1
- package/build/esm/{index-29dddee0.js → index-5d120545.js} +20 -20
- package/build/esm/{index-c0328fab.js → index-5d68db07.js} +5 -5
- package/build/esm/{index-c3272c58.js → index-5db10e55.js} +1 -1
- package/build/esm/{index-fa6e157c.js → index-5de7b664.js} +70 -70
- package/build/esm/{index-bc2f8724.js → index-5f4177fe.js} +1 -1
- package/build/esm/{index-2fb2d2bd.js → index-5fb0c25e.js} +1 -1
- package/build/esm/{index-ab92fb6d.js → index-61506eba.js} +71 -71
- package/build/esm/{index-98f89e2d.js → index-65d5b702.js} +2 -2
- package/build/esm/{index-2438e21a.js → index-6637369d.js} +1 -1
- package/build/esm/{index-ca15ed5f.js → index-69f941a6.js} +65 -65
- package/build/esm/{index-66d962f6.js → index-6ac6ea5c.js} +6 -6
- package/build/esm/{index-abab1b7a.js → index-6c65351e.js} +5 -5
- package/build/esm/{index-672796c5.js → index-6eabd972.js} +1 -1
- package/build/esm/{index-501969d3.js → index-6f2a6b72.js} +2 -2
- package/build/esm/{index-21b78b22.js → index-6f97cf56.js} +2 -2
- package/build/esm/{index-72c23d7e.js → index-6fb40eb1.js} +1 -1
- package/build/esm/{index-7119da5b.js → index-71844fbd.js} +25 -25
- package/build/esm/{index-70e7c44e.js → index-7367d086.js} +8 -8
- package/build/esm/{index-a700b201.js → index-742c5a5f.js} +1 -1
- package/build/esm/{index-2d176965.js → index-74830dcb.js} +1 -1
- package/build/esm/{index-b6400275.js → index-778acbe8.js} +3 -3
- package/build/esm/{index-7b5d9c29.js → index-7870babc.js} +68 -68
- package/build/esm/{index-7eead6e8.js → index-7926d7b1.js} +1 -1
- package/build/esm/{index-a06651bb.js → index-7d1e358a.js} +1 -1
- package/build/esm/{index-2c767710.js → index-7e5e4b47.js} +2 -2
- package/build/esm/{index-a039bd9c.js → index-8134d051.js} +1 -1
- package/build/esm/{index-b7d9d339.js → index-822ea961.js} +1 -1
- package/build/esm/{index-3e60eb50.js → index-82351fdc.js} +3 -3
- package/build/esm/{index-39eef71b.js → index-83d4043c.js} +10 -25
- package/build/esm/{index-be65c36f.js → index-84f7fc4d.js} +1 -1
- package/build/esm/{index-cc3e6a15.js → index-851351b5.js} +3 -3
- package/build/esm/{index-fcf1e443.js → index-875e238c.js} +91 -91
- package/build/esm/{index-11c74ef4.js → index-87bfd475.js} +2 -2
- package/build/esm/{index-7546ea14.js → index-88424d74.js} +1 -1
- package/build/esm/{index-9c0ec0bb.js → index-8888cd89.js} +7 -7
- package/build/esm/{index-2b7db737.js → index-8cf8a252.js} +2 -2
- package/build/esm/{index-e1bdd175.js → index-8d01b515.js} +3 -3
- package/build/esm/{index-bea5c3c3.js → index-901eafb1.js} +1 -1
- package/build/esm/{index-bef75c16.js → index-94142e63.js} +1 -1
- package/build/esm/{index-6c8c0a71.js → index-973c2b6a.js} +1 -1
- package/build/esm/{index-ced68cf9.js → index-976b3ba2.js} +5 -5
- package/build/esm/{index-4ff86197.js → index-97c284d4.js} +1 -1
- package/build/esm/{index-686f0148.js → index-98e74088.js} +15 -15
- package/build/esm/{index-161f38ae.js → index-9b35e467.js} +8 -8
- package/build/esm/{index-5e91a75a.js → index-9c18892b.js} +1 -1
- package/build/esm/{index-df2b0c1d.js → index-9f5435d3.js} +18 -18
- package/build/esm/{index-80dad15f.js → index-9f9a0bcc.js} +3 -3
- package/build/esm/{index-181e2265.js → index-9fe8cae5.js} +1 -1
- package/build/esm/{index-c7da4c28.js → index-a0f4955a.js} +1 -1
- package/build/esm/{index-1053e4d6.js → index-a2f154e9.js} +1 -1
- package/build/esm/{index-a38f31fd.js → index-a2f28c75.js} +13 -13
- package/build/esm/{index-0aab4ccb.js → index-a429113b.js} +1 -1
- package/build/esm/{index-cb43ac22.js → index-a4315fe5.js} +1 -1
- package/build/esm/{index-b39f928d.js → index-a7364e32.js} +2 -2
- package/build/esm/{index-d146879b.js → index-a79b8412.js} +5 -5
- package/build/esm/{index-afba7950.js → index-ae03a27a.js} +2 -2
- package/build/esm/{index-227bf3d0.js → index-af628b89.js} +3 -3
- package/build/esm/{index-841bf5a0.js → index-af638b15.js} +90 -90
- package/build/esm/{index-7473ba7a.js → index-afde54a6.js} +3 -3
- package/build/esm/{index-61d8dd1a.js → index-b06519e5.js} +5 -5
- package/build/esm/{index-1c8f78a4.js → index-b15d24db.js} +3 -3
- package/build/esm/{index-6d25075c.js → index-b1f8a298.js} +1 -1
- package/build/esm/{index-ea6cda73.js → index-b3697c70.js} +3 -3
- package/build/esm/{index-299064eb.js → index-b3d99c77.js} +5 -5
- package/build/esm/{index-16812eed.js → index-b43536be.js} +73 -73
- package/build/esm/{index-383b911f.js → index-b4be6f5b.js} +5 -5
- package/build/esm/{index-6de9ec10.js → index-b57b69c4.js} +1 -1
- package/build/esm/{index-8da58fc9.js → index-b8ade8f8.js} +7 -7
- package/build/esm/{index-37021f39.js → index-b8b117be.js} +5 -5
- package/build/esm/{index-1dfc2fb2.js → index-b91e9787.js} +1 -1
- package/build/esm/{index-9b5d74e0.js → index-ba872ddb.js} +1 -1
- package/build/esm/{index-9171fe4c.js → index-bb8d15c0.js} +1 -1
- package/build/esm/{index-73e587ed.js → index-bc577e3d.js} +69 -69
- package/build/esm/{index-0e6bfe2d.js → index-bd113404.js} +18 -18
- package/build/esm/{index-a2774014.js → index-bd21e855.js} +3 -3
- package/build/esm/{index-23b8eb03.js → index-be9ad08a.js} +8 -8
- package/build/esm/{index-71e8d496.js → index-c012a2ed.js} +2 -2
- package/build/esm/{index-5800207f.js → index-c0c42faf.js} +1 -1
- package/build/esm/{index-45877e07.js → index-c0e74dfc.js} +2 -2
- package/build/esm/{index-fcd95a9e.js → index-c0e87c12.js} +1 -1
- package/build/esm/{index-91ae8fc6.js → index-c4562b96.js} +2 -2
- package/build/esm/{index-141b7e3b.js → index-c57626ee.js} +2 -2
- package/build/esm/{index-67b6b08b.js → index-c67c50dd.js} +1 -1
- package/build/esm/{index-a9ae833d.js → index-c6e407b2.js} +1 -1
- package/build/esm/{index-b6ab521b.js → index-c8b15464.js} +87 -87
- package/build/esm/{index-cc8a80c0.js → index-c8c03a88.js} +1 -1
- package/build/esm/{index-fc1240a5.js → index-c92d9bf7.js} +1 -1
- package/build/esm/{index-04b7b7d9.js → index-ca1f69ed.js} +5 -5
- package/build/esm/{index-c8f26884.js → index-ccdc4e56.js} +1 -1
- package/build/esm/{index-4d86eb2e.js → index-ce85df63.js} +4 -4
- package/build/esm/{index-c49af147.js → index-ce99aa1c.js} +1 -1
- package/build/esm/{index-713920f6.js → index-d0037da3.js} +1 -1
- package/build/esm/{index-9017e1d6.js → index-d045bb0a.js} +1 -1
- package/build/esm/{index-a71d1695.js → index-d39bf823.js} +244 -225
- package/build/esm/{index-c8b3ded7.js → index-d3e8aa8e.js} +2 -2
- package/build/esm/{index-fdd627d4.js → index-d460bc49.js} +73 -73
- package/build/esm/{index-0238f439.js → index-d57986ba.js} +76 -76
- package/build/esm/{index-b2cc4ba4.js → index-d6ee0346.js} +2 -2
- package/build/esm/{index-08c12bdb.js → index-d840b1cd.js} +1 -1
- package/build/esm/{index-565611f4.js → index-d87fd518.js} +4 -4
- package/build/esm/{index-b027f912.js → index-d8c5f4ba.js} +3 -3
- package/build/esm/{index-ed7b37c4.js → index-d8e7cc63.js} +85 -85
- package/build/esm/{index-496fbe88.js → index-d9c69d53.js} +1 -1
- package/build/esm/{index-be361f00.js → index-d9dbfde6.js} +67 -67
- package/build/esm/{index-371905cd.js → index-dab3ccc0.js} +1 -1
- package/build/esm/{index-f59735b8.js → index-db279c2b.js} +65 -65
- package/build/esm/{index-a35ff23f.js → index-dc0f3f11.js} +22 -22
- package/build/esm/{index-d5cce8a7.js → index-dd6c27d3.js} +1 -1
- package/build/esm/{index-2bc6e2e3.js → index-dd782d92.js} +2 -2
- package/build/esm/{index-329ece69.js → index-deb6e747.js} +101 -101
- package/build/esm/{index-1a8f9ada.js → index-df912561.js} +84 -84
- package/build/esm/{index-e60b4b07.js → index-df9bbda3.js} +6 -6
- package/build/esm/{index-1edd6ff2.js → index-e03cbb08.js} +2 -2
- package/build/esm/{index-b24a65cd.js → index-e0f6dc69.js} +2 -2
- package/build/esm/{index-98b6a736.js → index-e25a17ce.js} +1 -1
- package/build/esm/{index-2046ee6a.js → index-e2c6bf52.js} +1 -1
- package/build/esm/{index-2f448410.js → index-e6835143.js} +2 -2
- package/build/esm/{index-e9f939f1.js → index-e73253fa.js} +1 -1
- package/build/esm/{index-71c2c8cc.js → index-e7f088ed.js} +1 -1
- package/build/esm/{index-4f8d5b1a.js → index-e881d9fe.js} +1 -1
- package/build/esm/{index-20176d65.js → index-e8b36100.js} +1 -1
- package/build/esm/{index-1f7bdaf8.js → index-e97a73d6.js} +19 -19
- package/build/esm/{index-648c437e.js → index-ea17190c.js} +1 -1
- package/build/esm/{index-bcdd49a7.js → index-ec7e3b86.js} +1 -1
- package/build/esm/{index-806a99f1.js → index-edc4af0f.js} +2 -2
- package/build/esm/{index-2e256130.js → index-f0f126df.js} +2 -2
- package/build/esm/{index-d888df68.js → index-f19be8aa.js} +5 -5
- package/build/esm/{index-786790bb.js → index-f1d1f133.js} +1 -1
- package/build/esm/{index-31887eac.js → index-f3197b3d.js} +1 -1
- package/build/esm/{index-5bb73091.js → index-f374f2ac.js} +1 -1
- package/build/esm/{index-6a37cb71.js → index-f3f0dc82.js} +1 -1
- package/build/esm/{index-89177618.js → index-f522e2b9.js} +1 -1
- package/build/esm/{index-618414c2.js → index-f7b64d0c.js} +1 -1
- package/build/esm/{index-04fbb469.js → index-f847f4ec.js} +2 -2
- package/build/esm/{index-386955eb.js → index-f8fcb5e6.js} +1 -1
- package/build/esm/{index-e221108d.js → index-f9045289.js} +1 -1
- package/build/esm/{index-9024d92c.js → index-f9d40c13.js} +1 -1
- package/build/esm/{index-6ac4316f.js → index-fa261e48.js} +1 -1
- package/build/esm/{index-ce85fbb0.js → index-fb76c76d.js} +89 -89
- package/build/esm/{index-90012b62.js → index-fbb7c0ba.js} +5 -5
- package/build/esm/{index-6be8924c.js → index-ff0688d9.js} +3 -3
- package/build/esm/{index-a02b0822.js → index-ffe66d65.js} +1 -1
- package/build/esm/index.js +1 -1
- package/build/esm/{index.module-803a3f0d.js → index.module-180ea833.js} +1 -1
- package/build/esm/{index.module-6fc6e8fd.js → index.module-6675eef2.js} +1 -1
- package/build/esm/{index.module-dd48a9fd.js → index.module-7623b421.js} +1 -1
- package/build/esm/{index.module-2f28c685.js → index.module-848941a9.js} +1 -1
- package/build/esm/{index.module-763485cb.js → index.module-af3af215.js} +1 -1
- package/build/esm/{index.module-5c540308.js → index.module-b7197b99.js} +1 -1
- package/build/esm/{index.module-9b6f8a0c.js → index.module-d4d1d7a6.js} +1 -1
- package/build/esm/{index.module-50eddf6c.js → index.module-f70a8f3f.js} +1 -1
- package/build/esm/{useCustomDimensions-518f56ca.js → useCustomDimensions-aa2187f4.js} +1 -1
- package/build/esm/{ussIsSticky-1979fd12.js → ussIsSticky-5aab23a1.js} +1 -1
- package/build/types/web-planner-react/src/components/Product/Product/serious/CheckoutForm/index.d.ts.map +1 -1
- package/build/types/web-planner-react/src/model/DivaViewHandler.d.ts +8 -0
- package/build/types/web-planner-react/src/model/DivaViewHandler.d.ts.map +1 -1
- package/build/umd/1110.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/1492.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/2027.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/3898.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/7118.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/8445.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/8616.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/8701.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/9054.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/9446.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/9715.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 +10 -10
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 1492.diva-web-planner-react.umd.min.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignDivaWebPlannerReact=self.webpackChunkCrystaldesignDivaWebPlannerReact||[]).push([[1492,7801,1897,3525,3090,9290,8938,8445,4580,4723,2352,4516,8616],{37801:(e,t,n)=>{n.r(t),n.d(t,{default:()=>s});var o=n(65515),l=n.n(o),i=n(9420),r=(n(87363),n(47514));const s=(0,i.Pi)((function BoxCopy(e){var t=e.rect,n=e.item,o=e.plannerUIProps,i=e.invertLeftRight;return(0,r.jsx)("div",{onClick:function onClick(){var e;null===(e=n.clickFunction)||void 0===e||e.call(n,n.setId,Number(n.elementId),{x:"BoxCopyLeft"==n.type?-1:"BoxCopyRight"==n.type?1:0,y:"BoxCopyTop"==n.type?1:0,z:0})},style:{left:t.left+"%",top:100-t.top+"%"},className:l()(o.classes.buttonGeneral,o.classes.copy.BoxPlannerCopy.copyGlobal,"BoxCopyLeft"==n.type?i?o.classes.copy.BoxPlannerCopy.copyRight:o.classes.copy.BoxPlannerCopy.copyLeft:void 0,"BoxCopyTop"==n.type?o.classes.copy.BoxPlannerCopy.copyTop:void 0,"BoxCopyRight"==n.type?i?o.classes.copy.BoxPlannerCopy.copyLeft:o.classes.copy.BoxPlannerCopy.copyRight:void 0)})}))},67348:(e,t,n)=>{n.r(t),n.d(t,{default:()=>s});var o=n(65515),l=n.n(o),i=n(9420),r=(n(87363),n(47514));const s=(0,i.Pi)((function ElementCopy(e){var t=e.item,n=e.rect,o=e.onElement,i=e.plannerUIProps;return(0,r.jsx)("div",{ref:function ref(e){return o(e)},onClick:function onClick(){var e;null===(e=t.clickFunction)||void 0===e||e.call(t,t.setId,Number(t.elementId))},style:{left:n.doUseCalc?n.leftCalc:"percentage"==t.position.interpretation?n.left+"%":n.left+"px",top:n.doUseCalc?n.topCalc:"percentage"==t.position.interpretation?n.top+"%":n.top+"px"},className:l()(i.classes.copy.ElementCopy,i.classes.buttonGeneral)})}))},33525:(e,t,n)=>{n.r(t),n.d(t,{default:()=>s});var o=n(65515),l=n.n(o),i=n(9420),r=(n(87363),n(47514));const s=(0,i.Pi)((function DistanceToGround(e){var t=e.item,n=e.plannerUIProps;return(0,r.jsx)("div",{style:{left:t.position.x+"%",top:100-t.position.y+"%"},id:"distanceToGround",className:l()(n.classes.dimension.distanceToGround),children:(0,r.jsx)("div",{children:t.dimensionVal+" cm"})})}))},53090:(e,t,n)=>{n.r(t),n.d(t,{default:()=>c});var o=n(65515),l=n.n(o),i=n(9420),r=n(75327),s=(n(87363),n(47514));const c=(0,i.Pi)((function AVL(e){var t=e.rect,n=e.item,o=e.onElement,i=e.plannerUIProps,c=(0,r._w)(),a=c.getDPUIISSelected(n),u=(n.rotOfElement?n.rotOfElement:0)+(n.iconRotDeg?n.iconRotDeg:0);return(0,s.jsx)("div",{ref:function ref(e){return o(e)},onClick:function onClick(){var e;c.setDPUISelectionChanged(n,!a),null===(e=n.clickFunction)||void 0===e||e.call(n,n.setId,Number(n.elementId),n.dpId,!a,void 0)},style:{left:t.left+"px",top:t.top+"px",transform:"rotate("+u+"deg)"},className:l()(i.classes.buttonGeneral,i.classes.dockingPoint.AVL.avl,a?i.classes.dockingPoint.AVL.avlSel:void 0)})}))},59290:(e,t,n)=>{n.r(t),n.d(t,{default:()=>c});var o=n(65515),l=n.n(o),i=n(9420),r=n(75327),s=(n(87363),n(47514));const c=(0,i.Pi)((function AVR(e){var t=e.rect,n=e.item,o=e.onElement,i=e.plannerUIProps,c=(0,r._w)(),a=c.getDPUIISSelected(n),u=(n.rotOfElement?n.rotOfElement:0)+(n.iconRotDeg?n.iconRotDeg:0);return(0,s.jsx)("div",{ref:function ref(e){return o(e)},onClick:function onClick(){var e;c.setDPUISelectionChanged(n,!a),null===(e=n.clickFunction)||void 0===e||e.call(n,n.setId,Number(n.elementId),n.dpId,!a,void 0)},style:{left:t.left+"px",top:t.top+"px",transform:"rotate("+u+"deg)"},className:l()(i.classes.buttonGeneral,i.classes.dockingPoint.AVR.avr,a?i.classes.dockingPoint.AVR.avrSel:void 0),children:n.posNr})}))},18938:(e,t,n)=>{n.r(t),n.d(t,{default:()=>c});var o=n(65515),l=n.n(o),i=n(9420),r=n(75327),s=(n(87363),n(47514));const c=(0,i.Pi)((function DPACC(e){var t=e.rect,n=e.item,o=e.onElement,i=e.plannerUIProps,c=(0,r._w)(),a=c.getDPUIISSelected(n);return(0,s.jsx)("div",{ref:function ref(e){return o(e)},onClick:function onClick(){var e;c.setDPUISelectionChanged(n,!a),null===(e=n.clickFunction)||void 0===e||e.call(n,n.setId,Number(n.elementId),n.dpId,!a,n.dockToElementId)},style:{left:"percentage"==n.position.interpretation?t.left+"%":t.left+"px",top:"percentage"==n.position.interpretation?t.top+"%":t.top+"px"},className:l()(i.classes.buttonGeneral,"2D"==n.plannerMode?"DOCKING"==n.dockingInfo?i.classes.dockingPoint.DPACC.dp2DAccDocking:i.classes.dockingPoint.DPACC.dp2DAccNotDocking:void 0,"2D"==n.plannerMode&&a&&"NOT_DOCKING"==n.dockingInfo?i.classes.dockingPoint.DPACC.dp2DAccNotDockingSel:void 0,"3D"==n.plannerMode?"DOCKING"==n.dockingInfo?i.classes.dockingPoint.DPACC.dp3DAccDocking:i.classes.dockingPoint.DPACC.dp3DAccNotDocking:void 0,"3D"==n.plannerMode&&a&&"NOT_DOCKING"==n.dockingInfo?i.classes.dockingPoint.DPACC.dp3DAccNotDockingSel:void 0),children:n.posNr})}))},88445:(e,t,n)=>{n.r(t),n.d(t,{default:()=>d});var o=n(34988),l=n(65515),i=n.n(l),r=n(9420),s=n(87363),c=n(62052),a=n(47514),u=new c.FM(0,0);const d=(0,r.Pi)((function Outline(e){var t,n,l=e.item,r=e.plannerUIProps,d=(0,s.useState)(!1),p=(0,o.Z)(d,2),f=p[0],v=p[1],m=(0,s.useState)(l.position.x),h=(0,o.Z)(m,2),g=h[0],y=h[1],C=(0,s.useState)(l.position.y),x=(0,o.Z)(C,2),P=x[0],I=x[1],w=!1;return(0,a.jsx)("div",{onClick:function onClick(){var e;null===(e=l.clickFunction)||void 0===e||e.call(l,l.setId,Number(l.elementId))},onMouseDown:function onMouseDown(e){w=!0,u=new c.FM(e.clientX,e.clientY)},onTouchStart:function onTouchStart(e){1==e.touches.length&&(w=!0,u=new c.FM(e.touches[0].clientX,e.touches[0].clientY))},onMouseMove:function onMouseMove(e){var t,n;w&&!f&&(v(!0),null===(t=l.onDragStartFunction)||void 0===t||t.call(l,l.setId,Number(l.elementId)));f&&(null===(n=l.onDragMoveFunction)||void 0===n||n.call(l,l.setId,Number(l.elementId),new c.FM(e.clientX-u.x,e.clientY-u.y)),y(g+e.clientX-u.x),I(P+e.clientY-u.y),u.x=e.clientX,u.y=e.clientY);w=!1},onTouchMove:function onTouchMove(e){if(1==e.touches.length){var t,n;if(w&&!f)v(!0),null===(t=l.onDragStartFunction)||void 0===t||t.call(l,l.setId,Number(l.elementId));if(f)null===(n=l.onDragMoveFunction)||void 0===n||n.call(l,l.setId,Number(l.elementId),new c.FM(e.touches[0].clientX-u.x,e.touches[0].clientY-u.y)),y(g+e.touches[0].clientX-u.x),I(P+e.touches[0].clientY-u.y),u.x=e.touches[0].clientX,u.y=e.touches[0].clientY;w=!1}},onMouseUp:function onMouseUp(){var e;f&&(v(!1),null===(e=l.onDragEndFunction)||void 0===e||e.call(l,l.setId,Number(l.elementId)));w=!1},onTouchEnd:function onTouchEnd(){var e;f&&(v(!1),null===(e=l.onDragEndFunction)||void 0===e||e.call(l,l.setId,Number(l.elementId)));w=!1},style:{left:g+"px",top:P+"px",width:(null==l||null===(t=l.size)||void 0===t?void 0:t.x)+"px",height:(null==l||null===(n=l.size)||void 0===n?void 0:n.y)+"px",transform:"rotate("+(null==l?void 0:l.rotOfElement)+"deg)"},className:i()(f?r.classes.outline.outline2D.draggableActive:void 0,"selected"==l.elemState?r.classes.outline.outline2D.draggable:void 0,"selectable"==l.elemState?r.classes.outline.outline2D.selectable:void 0)})}))},24580:(e,t,n)=>{n.r(t),n.d(t,{default:()=>c});var o=n(65515),l=n.n(o),i=n(9420),r=(n(87363),n(75327)),s=n(47514);const c=(0,i.Pi)((function PosNr(e){var t=e.rect,n=e.item,o=e.onElement,i=e.plannerUIProps,c=e.hasTrash,a=(0,r.NP)(),u="percentage"==n.position.interpretation?t.top+"%":t.top+"px";return u=c&&t.top<4?"calc("+u+" + 35px + var(--globalSize) / 2)":"calc("+u+" + var(--globalSize) / 2)",null==n.posNr?(0,s.jsx)(s.Fragment,{}):(0,s.jsxs)("div",{ref:function ref(e){return o(e)},style:{left:"percentage"==n.position.interpretation?t.left+"%":t.left,top:u,visibility:a.productState.isBoxPlanner?"hidden":"visible"},className:l()(i.classes.buttonGeneral,i.classes.posNr.posNr,n.isDockedAccessoire?i.classes.posNr.posNrAcc:void 0,"selected"==n.elemState?i.classes.posNr.posNrSelected:void 0,"selectable"==n.elemState?i.classes.posNr.posNrSelectable:void 0,"unselectable"==n.elemState?i.classes.posNr.posNrUnSelectable:void 0,n.posNr.toString().length>1?i.classes.posNr.moreThanOneNr:void 0,n.onHover&&"unselectable"!=n.elemState?i.classes.posNr.posNrOnHover:void 0),children:[n.posNr,(0,s.jsx)("div",{onClick:function onClick(){var e;null===(e=n.clickFunction)||void 0===e||e.call(n,n.setId,Number(n.elementId))},style:{left:"0px",top:"0px",visibility:a.productState.isBoxPlanner?"hidden":"visible"},className:l()("selectable"==n.elemState?i.classes.posNr.posNrSelectableArea:void 0)})]})}))},94723:(e,t,n)=>{n.r(t),n.d(t,{default:()=>s});var o=n(65515),l=n.n(o),i=n(9420),r=(n(87363),n(47514));const s=(0,i.Pi)((function RotationClockwise(e){var t=e.item,n=e.rect,o=e.onElement,i=e.plannerUIProps;return(0,r.jsx)("div",{ref:function ref(e){return o(e)},onClick:function onClick(){var e;null===(e=t.clickFunction)||void 0===e||e.call(t,t.setId,Number(t.elementId))},style:{left:n.left+"px",top:n.top+"px"},className:l()(i.classes.rotation.rotClock,i.classes.buttonGeneral),children:t.posNr})}))},72352:(e,t,n)=>{n.r(t),n.d(t,{default:()=>s});var o=n(65515),l=n.n(o),i=n(9420),r=(n(87363),n(47514));const s=(0,i.Pi)((function RotationCounterClockwise(e){var t=e.item,n=e.rect,o=e.onElement,i=e.plannerUIProps;return(0,r.jsx)("div",{ref:function ref(e){return o(e)},onClick:function onClick(){var e;null===(e=t.clickFunction)||void 0===e||e.call(t,t.setId,Number(t.elementId))},style:{left:n.left+"px",top:n.top+"px"},className:l()(i.classes.rotation.rotCounterClock,i.classes.buttonGeneral),children:t.posNr})}))},54516:(e,t,n)=>{n.r(t),n.d(t,{default:()=>s});var o=n(65515),l=n.n(o),i=n(9420),r=(n(87363),n(47514));const s=(0,i.Pi)((function Trash(e){var t=e.item,n=e.rect,o=e.onElement,i=e.plannerUIProps,s=n.doUseCalc?n.leftCalc:"percentage"==t.position.interpretation?n.left+"%":n.left+"px",c=n.doUseCalc?n.topCalc:"percentage"==t.position.interpretation?"calc("+n.top+"% )":n.top+"px";return(0,r.jsx)("div",{ref:function ref(e){return o(e)},onClick:function onClick(){var e;null===(e=t.clickFunction)||void 0===e||e.call(t,t.setId,Number(t.elementId))},style:{left:s,top:c},className:l()(i.classes.trash.trashClass,i.classes.buttonGeneral,"BOX"==t.plannerMode?i.classes.trash.boxplanner:void 0),id:"testDel",children:t.posNr})}))},40053:(e,t,n)=>{n.d(t,{Z:()=>useDockingPointPositioning});var o=n(62052),l=n(75327);function useDockingPointPositioning(e){var t,n,i,r,s=e.dpElement,c=e.item,a=(0,l._w)(),u=null==s?void 0:s.getBoundingClientRect(),d=null!==(t=null==c?void 0:c.position.x)&&void 0!==t?t:0,p=null!==(n=null==c?void 0:c.position.y)&&void 0!==n?n:0;if(u&&c){var f=new o.FM(d,p),v=a.getViewConfig(),m=new o.FM(0,0);if("AVL"==(null==c?void 0:c.type)||"AVR"==(null==c?void 0:c.type)){if("2D"===c.plannerMode)switch(v.posDPIcon2D){case"CORNER":break;case"SIDE_TOP":"AVL"==(null==c?void 0:c.type)&&(m=new o.FM(-u.width,0),null!=c&&c.rotOfElement&&(m=o.FM.rotateOrigin(m,null==c?void 0:c.rotOfElement)),f=new o.FM(d+m.x,p+m.y,"pixel"))}}else"AccDP"==(null==c?void 0:c.type)&&"3D"==(null==c?void 0:c.plannerMode)?f.y=100-f.y:"BoxCopyLeft"==c.type||"BoxCopyRight"==(null==c?void 0:c.type)||null==c||c.type;d=f.x,p=f.y}return{width:null!==(i=null==u?void 0:u.width)&&void 0!==i?i:0,height:null!==(r=null==u?void 0:u.height)&&void 0!==r?r:0,top:p,left:d}}},85115:(e,t,n)=>{n.r(t),n.d(t,{default:()=>c});var o=n(34988),l=n(87363),i=n(18938),r=n(40053),s=n(47514);const c=function ItemsDPAccContainer(e){var t=e.item,n=e.plannerUIProps,c=(0,l.useState)(null),a=(0,o.Z)(c,2),u=a[0],d=a[1],p=(0,r.Z)({item:t,dpElement:u});return(0,s.jsx)(s.Fragment,{children:t&&(0,s.jsx)(i.default,{item:t,rect:p,onElement:d,plannerUIProps:n},null==t?void 0:t.key)})}},71492:(e,t,n)=>{n.r(t),n.d(t,{default:()=>M});var o=n(34988),l=n(9420),i=n(87363),r=n(53090),s=n(59290),c=n(88445),a=n(94723),u=n(72352),d=n(54516),p=n(40053),f=n(62052),v=n(75327);var m=n(85115),h=n(24580),g=n(37801),y=n(88683),C=n(69369),x=(0,y.getLogger)("Planner","CopyElementPositioning");var P=n(67348),I=n(33525),w=n(47514);const M=(0,l.Pi)((function ItemsContainer(e){for(var t=e.items,n=e.plannerUIProps,l=(0,v.NP)(),y=(0,i.useState)(null),M=(0,o.Z)(y,2),E=M[0],k=M[1],N=(0,i.useState)(null),D=(0,o.Z)(N,2),O=D[0],R=D[1],b=(0,i.useState)(null),S=(0,o.Z)(b,2),F=S[0],U=S[1],T=(0,i.useState)(null),A=(0,o.Z)(T,2),B=A[0],j=(A[1],(0,i.useState)(null)),_=(0,o.Z)(j,2),G=_[0],Z=(_[1],(0,i.useState)(null)),L=(0,o.Z)(Z,2),V=L[0],X=(L[1],(0,i.useState)(null)),z=(0,o.Z)(X,2),K=z[0],Y=z[1],H=(0,i.useState)(null),q=(0,o.Z)(H,2),W=q[0],J=q[1],Q=(0,i.useState)(null),$=(0,o.Z)(Q,2),ee=$[0],te=$[1],ne=(0,i.useState)(null),oe=(0,o.Z)(ne,2),le=(oe[0],oe[1]),ie=t.find((function(e){return"PosNr"==e.type})),re=t.find((function(e){return"AVL"==e.type})),se=t.find((function(e){return"AVR"==e.type})),ce=[],ae=[],ue=0;ue<t.length;ue++)"AccDP"==t[ue].type?ce.push(t[ue]):"DistanceFromGround"==t[ue].type&&ae.push(t[ue]);var de=t.find((function(e){return"Outline"==e.type})),pe=t.find((function(e){return"TrashIcon"==e.type})),fe=t.find((function(e){return"CopyElement"==e.type})),ve=t.find((function(e){return"RotateC"==e.type})),me=t.find((function(e){return"RotateCC"==e.type})),he=t.find((function(e){return"BoxCopyLeft"==e.type})),ge=t.find((function(e){return"BoxCopyTop"==e.type})),ye=t.find((function(e){return"BoxCopyRight"==e.type})),Ce=function usePosNrPositioning(e){var t,n,o,l,i=e.posNrElement,r=e.item,s=(0,v._w)(),c=null==i?void 0:i.getBoundingClientRect(),a=null!==(t=null==r?void 0:r.position.x)&&void 0!==t?t:0,u=null!==(n=null==r?void 0:r.position.y)&&void 0!==n?n:0;if(c){var d=new f.FM(a,u),p=s.getViewConfig(),m=new f.FM(0,0);switch(null==r?void 0:r.plannerMode){case"2D":switch(p.iconPosition2DGrid){case"BORDER":m=new f.FM(c.width,.1*-c.height),null!=r&&r.rotOfElement&&(m=f.FM.rotateOrigin(m,null==r?void 0:r.rotOfElement)),d=new f.FM(a+m.x,u+m.y,"pixel");break;case"OUTSIDE":var h=null!=r&&r.iconZoom?r.iconZoom:1;m=new f.FM(c.width+h,-c.height/2-(c.height/2.5-h)),null!=r&&r.rotOfElement&&(m=f.FM.rotateOrigin(m,null==r?void 0:r.rotOfElement)),d=new f.FM(a+m.x,u+m.y,"pixel")}a=d.x,u=d.y;break;case"3D":(a+=3)<1&&(a=1),(u=100-u-1)<1&&(u=1)}}return{width:null!==(o=null==c?void 0:c.width)&&void 0!==o?o:0,height:null!==(l=null==c?void 0:c.height)&&void 0!==l?l:0,top:u,left:a}}({item:ie,posNrElement:E}),xe=(0,p.Z)({item:re,dpElement:O}),Pe=(0,p.Z)({item:se,dpElement:F}),Ie=(0,p.Z)({item:he,dpElement:B}),we=(0,p.Z)({item:ge,dpElement:G}),Me=(0,p.Z)({item:ye,dpElement:V}),Ee=function useTrashPositioning(e){var t,n,o,l,i=e.trashElement,r=e.posNrRect,s=e.boxPlannerCopyLeftRect,c=e.boxPlannerCopyTopRect,a=e.boxPlannerCopyRightRect,u=e.trashItem,d=(0,v._w)(),p=null==i?void 0:i.getBoundingClientRect(),m=d.getViewConfig(),h=null!==(t=null==u?void 0:u.position.x)&&void 0!==t?t:0,g=null!==(n=null==u?void 0:u.position.y)&&void 0!==n?n:0,y="",C="",x=!1;if(p&&r){var P=new f.FM(0,0);switch(m.posTrashRotIcon){case"POSNUM_TOP":"2D"==(null==u?void 0:u.plannerMode)?(P=new f.FM(0,-r.height-p.height/2),null!=u&&u.rotOfElement&&(P=f.FM.rotateOrigin(P,u.rotOfElement)),h=r.left+P.x,g=r.top+P.y):"3D"!=(null==u?void 0:u.plannerMode)&&"BOX"!=(null==u?void 0:u.plannerMode)||(m.enableElementCopy?(x=!0,y="calc("+r.left.toString()+"% - "+r.width/1.8+"px)",C=r.top<4?"calc("+r.top+"% + 30px - var(--globalSize) / 2":"calc("+r.top+"% - (var(--globalSize) + 5px) / 2"):(x=!0,y=r.left.toString()+"%",C=r.top<4?"calc("+r.top+"% + 30px - var(--globalSize) / 2":"calc("+r.top+"% - (var(--globalSize) + 5px) / 2"));break;case"TOP_RIGHT_BACK":if("2D"==(null==u?void 0:u.plannerMode)){var I=null!=u&&u.iconZoom?u.iconZoom:1;P=new f.FM(-p.width/2-(p.width/3+I),-p.height/2-(p.height/3.7-I)),null!=u&&u.rotOfElement&&(P=f.FM.rotateOrigin(P,u.rotOfElement)),h+=P.x,g+=P.y,Math.sqrt(Math.pow(r.left-h,2)+Math.pow(r.top-g,2))<=r.width&&(P=new f.FM(r.width,0),null!=u&&u.rotOfElement&&(P=f.FM.rotateOrigin(P,u.rotOfElement)),h+=P.x,g+=P.y)}else if("3D"==(null==u?void 0:u.plannerMode)||"BOX"==(null==u?void 0:u.plannerMode)){if(s||a||c){var w=!1;s&&(Math.sqrt(Math.pow(s.left-h,2)+Math.pow(s.top-g,2))<9&&(g+=5,w=!0),!w&&a&&Math.sqrt(Math.pow(a.left-h,2)+Math.pow(a.top-g,2))<9&&(g+=5,w=!0),!w&&c&&Math.sqrt(Math.pow(c.left-h,2)+Math.pow(c.top-g,2))<9&&(g+=5,w=!0))}(h-=1)>99&&(h=99),(g=100-g-2)<1&&(g=1)}}}return{width:null!==(o=null==p?void 0:p.width)&&void 0!==o?o:0,height:null!==(l=null==p?void 0:p.height)&&void 0!==l?l:0,top:g,left:h,doUseCalc:x,topCalc:x?C:void 0,leftCalc:x?y:void 0}}({trashItem:pe,posNrRect:Ce,boxPlannerCopyLeftRect:Ie,boxPlannerCopyTopRect:we,boxPlannerCopyRightRect:Me,trashElement:K}),ke=function useCopyElementPositioning(e){var t,n,o=e.copyElement,l=e.posNrRect,i=e.copyElementItem,r=(0,v._w)(),s=null==o?void 0:o.getBoundingClientRect(),c=r.getViewConfig(),a="",u="",d=!1;if(s&&l)switch(new f.FM(0,0),c.posTrashRotIcon){case"POSNUM_TOP":"3D"==(null==i?void 0:i.plannerMode)&&c.enableElementCopy&&(d=!0,a="calc("+l.left.toString()+"% + "+l.width/1.8+"px)",u="calc("+l.top+"% - "+(l.height+2)+"px)");break;case"TOP_RIGHT_BACK":x.error(new C.GE("Do implement copy Element for TOP_RIGHT_BACK Positioning",{code:"WC_0012"}))}return{width:null!==(t=null==s?void 0:s.width)&&void 0!==t?t:0,height:null!==(n=null==s?void 0:s.height)&&void 0!==n?n:0,top:0,left:0,doUseCalc:d,topCalc:d?u:void 0,leftCalc:d?a:void 0}}({copyElementItem:fe,posNrRect:Ce,copyElement:W}),Ne=function useRotClockwisePositioning(e){var t,n,o,l,i=e.rotElement,r=e.posNrRect,s=e.trashRect,c=e.rotItem,a=(0,v._w)(),u=null==i?void 0:i.getBoundingClientRect(),d=a.getViewConfig(),p=null!==(t=null==c?void 0:c.position.x)&&void 0!==t?t:0,m=null!==(n=null==c?void 0:c.position.y)&&void 0!==n?n:0;if(u&&r&&s){var h=new f.FM(0,0);switch(d.posTrashRotIcon){case"POSNUM_TOP":p=(r.left+s.left)/2,m=(r.top+s.top)/2,h=new f.FM(-u.width,0),null!=c&&c.rotOfElement&&(h=f.FM.rotateOrigin(h,c.rotOfElement)),p+=h.x,m+=h.y;break;case"TOP_RIGHT_BACK":if(Math.sqrt(Math.pow(r.left-s.left,2)+Math.pow(r.top-s.top,2))<=100){var g=new f.FM(0,-u.height-4);null!=c&&c.rotOfElement&&0!=c.rotOfElement&&(g=f.FM.rotateOrigin(g,c.rotOfElement)),p=(null==s?void 0:s.left)+g.x,m=(null==s?void 0:s.top)+g.y}else{var y=new f.FM(-u.width-4,0);null!=c&&c.rotOfElement&&0!=c.rotOfElement&&(y=f.FM.rotateOrigin(y,c.rotOfElement)),p=(null==s?void 0:s.left)+y.x,m=(null==s?void 0:s.top)+y.y}}}return{width:null!==(o=null==u?void 0:u.width)&&void 0!==o?o:0,height:null!==(l=null==u?void 0:u.height)&&void 0!==l?l:0,top:m,left:p}}({rotItem:ve,posNrRect:Ce,trashRect:Ee,rotElement:ee}),De=function useRotCounterClockwisePositioning(e){var t,n,o,l,i=e.rotElement,r=e.posNrRect,s=e.trashRect,c=e.rotClockRect,a=e.rotItem,u=(0,v._w)(),d=null==i?void 0:i.getBoundingClientRect(),p=u.getViewConfig(),m=null!==(t=null==a?void 0:a.position.x)&&void 0!==t?t:0,h=null!==(n=null==a?void 0:a.position.y)&&void 0!==n?n:0;if(d&&r&&s&&c){var g=new f.FM(0,0);switch(p.posTrashRotIcon){case"POSNUM_TOP":m=(r.left+s.left)/2,h=(r.top+s.top)/2,g=new f.FM(d.width,0),null!=a&&a.rotOfElement&&(g=f.FM.rotateOrigin(g,a.rotOfElement)),m+=g.x,h+=g.y;break;case"TOP_RIGHT_BACK":Math.sqrt(Math.pow(r.left-s.left,2)+Math.pow(r.top-s.top,2))<=100?(g=new f.FM(0,-d.height-3),null!=a&&a.rotOfElement&&(g=f.FM.rotateOrigin(g,a.rotOfElement)),m=(null==c?void 0:c.left)+g.x,h=(null==c?void 0:c.top)+g.y):(g=new f.FM(-d.width-3,-0),null!=a&&a.rotOfElement&&(g=f.FM.rotateOrigin(g,a.rotOfElement)),m=(null==c?void 0:c.left)+g.x,h=(null==c?void 0:c.top)+g.y)}}return{width:null!==(o=null==d?void 0:d.width)&&void 0!==o?o:0,height:null!==(l=null==d?void 0:d.height)&&void 0!==l?l:0,top:h,left:m}}({rotItem:ve,posNrRect:Ce,trashRect:Ee,rotClockRect:Ne,rotElement:ee});return(0,w.jsxs)(w.Fragment,{children:[ie&&(0,w.jsx)(h.default,{item:ie,rect:Ce,onElement:k,plannerUIProps:n,hasTrash:!!pe}),de&&(0,w.jsx)(c.default,{item:de,plannerUIProps:n},de.key),re&&(0,w.jsx)(r.default,{item:re,rect:xe,onElement:R,plannerUIProps:n},null==re?void 0:re.key),se&&(0,w.jsx)(s.default,{item:se,rect:Pe,onElement:U,plannerUIProps:n},null==se?void 0:se.key),he&&ye&&(0,w.jsx)(g.default,{item:he,rect:Ie,invertLeftRight:Me.left<Ie.left,plannerUIProps:n},he.key),ge&&(0,w.jsx)(g.default,{item:ge,rect:we,invertLeftRight:!1,plannerUIProps:n},ge.key),ye&&he&&(0,w.jsx)(g.default,{item:ye,rect:Me,invertLeftRight:Me.left<Ie.left,plannerUIProps:n},ye.key),pe&&(0,w.jsx)(d.default,{item:pe,rect:Ee,onElement:Y,plannerUIProps:n}),fe&&(0,w.jsx)(P.default,{item:fe,rect:ke,onElement:J,plannerUIProps:n}),ve&&(0,w.jsx)(a.default,{item:ve,rect:Ne,onElement:te,plannerUIProps:n}),me&&(0,w.jsx)(u.default,{item:me,rect:De,onElement:le,plannerUIProps:n}),ce.map((function(e,t){return(0,w.jsx)(m.default,{item:e,plannerUIProps:n},e.key)})),l.productState.getDoShow3DDimensionLines()&&ae.map((function(e,t){return(0,w.jsx)(I.default,{item:e,plannerUIProps:n},e.key)}))]})}))}}]);
|
|
2
|
+
"use strict";(self.webpackChunkCrystaldesignDivaWebPlannerReact=self.webpackChunkCrystaldesignDivaWebPlannerReact||[]).push([[1492,7801,1897,3525,3090,9290,8938,8445,4580,4723,2352,4516,8616],{37801:(e,t,n)=>{n.r(t),n.d(t,{default:()=>s});var o=n(65515),l=n.n(o),i=n(9420),r=(n(87363),n(47514));const s=(0,i.Pi)((function BoxCopy(e){var t=e.rect,n=e.item,o=e.plannerUIProps,i=e.invertLeftRight;return(0,r.jsx)("div",{onClick:function onClick(){var e;null===(e=n.clickFunction)||void 0===e||e.call(n,n.setId,Number(n.elementId),{x:"BoxCopyLeft"==n.type?-1:"BoxCopyRight"==n.type?1:0,y:"BoxCopyTop"==n.type?1:0,z:0})},style:{left:t.left+"%",top:100-t.top+"%"},className:l()(o.classes.buttonGeneral,o.classes.copy.BoxPlannerCopy.copyGlobal,"BoxCopyLeft"==n.type?i?o.classes.copy.BoxPlannerCopy.copyRight:o.classes.copy.BoxPlannerCopy.copyLeft:void 0,"BoxCopyTop"==n.type?o.classes.copy.BoxPlannerCopy.copyTop:void 0,"BoxCopyRight"==n.type?i?o.classes.copy.BoxPlannerCopy.copyLeft:o.classes.copy.BoxPlannerCopy.copyRight:void 0)})}))},67348:(e,t,n)=>{n.r(t),n.d(t,{default:()=>s});var o=n(65515),l=n.n(o),i=n(9420),r=(n(87363),n(47514));const s=(0,i.Pi)((function ElementCopy(e){var t=e.item,n=e.rect,o=e.onElement,i=e.plannerUIProps;return(0,r.jsx)("div",{ref:function ref(e){return o(e)},onClick:function onClick(){var e;null===(e=t.clickFunction)||void 0===e||e.call(t,t.setId,Number(t.elementId))},style:{left:n.doUseCalc?n.leftCalc:"percentage"==t.position.interpretation?n.left+"%":n.left+"px",top:n.doUseCalc?n.topCalc:"percentage"==t.position.interpretation?n.top+"%":n.top+"px"},className:l()(i.classes.copy.ElementCopy,i.classes.buttonGeneral)})}))},33525:(e,t,n)=>{n.r(t),n.d(t,{default:()=>s});var o=n(65515),l=n.n(o),i=n(9420),r=(n(87363),n(47514));const s=(0,i.Pi)((function DistanceToGround(e){var t=e.item,n=e.plannerUIProps;return(0,r.jsx)("div",{style:{left:t.position.x+"%",top:100-t.position.y+"%"},id:"distanceToGround",className:l()(n.classes.dimension.distanceToGround),children:(0,r.jsx)("div",{children:t.dimensionVal+" cm"})})}))},53090:(e,t,n)=>{n.r(t),n.d(t,{default:()=>c});var o=n(65515),l=n.n(o),i=n(9420),r=n(75327),s=(n(87363),n(47514));const c=(0,i.Pi)((function AVL(e){var t=e.rect,n=e.item,o=e.onElement,i=e.plannerUIProps,c=(0,r._w)(),a=c.getDPUIISSelected(n),u=(n.rotOfElement?n.rotOfElement:0)+(n.iconRotDeg?n.iconRotDeg:0);return(0,s.jsx)("div",{ref:function ref(e){return o(e)},onClick:function onClick(){var e;c.setDPUISelectionChanged(n,!a),null===(e=n.clickFunction)||void 0===e||e.call(n,n.setId,Number(n.elementId),n.dpId,!a,void 0)},style:{left:t.left+"px",top:t.top+"px",transform:"rotate("+u+"deg)"},className:l()(i.classes.buttonGeneral,i.classes.dockingPoint.AVL.avl,a?i.classes.dockingPoint.AVL.avlSel:void 0)})}))},59290:(e,t,n)=>{n.r(t),n.d(t,{default:()=>c});var o=n(65515),l=n.n(o),i=n(9420),r=n(75327),s=(n(87363),n(47514));const c=(0,i.Pi)((function AVR(e){var t=e.rect,n=e.item,o=e.onElement,i=e.plannerUIProps,c=(0,r._w)(),a=c.getDPUIISSelected(n),u=(n.rotOfElement?n.rotOfElement:0)+(n.iconRotDeg?n.iconRotDeg:0);return(0,s.jsx)("div",{ref:function ref(e){return o(e)},onClick:function onClick(){var e;c.setDPUISelectionChanged(n,!a),null===(e=n.clickFunction)||void 0===e||e.call(n,n.setId,Number(n.elementId),n.dpId,!a,void 0)},style:{left:t.left+"px",top:t.top+"px",transform:"rotate("+u+"deg)"},className:l()(i.classes.buttonGeneral,i.classes.dockingPoint.AVR.avr,a?i.classes.dockingPoint.AVR.avrSel:void 0),children:n.posNr})}))},18938:(e,t,n)=>{n.r(t),n.d(t,{default:()=>c});var o=n(65515),l=n.n(o),i=n(9420),r=n(75327),s=(n(87363),n(47514));const c=(0,i.Pi)((function DPACC(e){var t=e.rect,n=e.item,o=e.onElement,i=e.plannerUIProps,c=(0,r._w)(),a=c.getDPUIISSelected(n);return(0,s.jsx)("div",{ref:function ref(e){return o(e)},onClick:function onClick(){var e;c.setDPUISelectionChanged(n,!a),null===(e=n.clickFunction)||void 0===e||e.call(n,n.setId,Number(n.elementId),n.dpId,!a,n.dockToElementId)},style:{left:"percentage"==n.position.interpretation?t.left+"%":t.left+"px",top:"percentage"==n.position.interpretation?t.top+"%":t.top+"px"},className:l()(i.classes.buttonGeneral,"2D"==n.plannerMode?"DOCKING"==n.dockingInfo?i.classes.dockingPoint.DPACC.dp2DAccDocking:i.classes.dockingPoint.DPACC.dp2DAccNotDocking:void 0,"2D"==n.plannerMode&&a&&"NOT_DOCKING"==n.dockingInfo?i.classes.dockingPoint.DPACC.dp2DAccNotDockingSel:void 0,"3D"==n.plannerMode?"DOCKING"==n.dockingInfo?i.classes.dockingPoint.DPACC.dp3DAccDocking:i.classes.dockingPoint.DPACC.dp3DAccNotDocking:void 0,"3D"==n.plannerMode&&a&&"NOT_DOCKING"==n.dockingInfo?i.classes.dockingPoint.DPACC.dp3DAccNotDockingSel:void 0),children:n.posNr})}))},88445:(e,t,n)=>{n.r(t),n.d(t,{default:()=>d});var o=n(34988),l=n(65515),i=n.n(l),r=n(9420),s=n(87363),c=n(87998),a=n(47514),u=new c.FM(0,0);const d=(0,r.Pi)((function Outline(e){var t,n,l=e.item,r=e.plannerUIProps,d=(0,s.useState)(!1),p=(0,o.Z)(d,2),f=p[0],v=p[1],m=(0,s.useState)(l.position.x),h=(0,o.Z)(m,2),g=h[0],y=h[1],C=(0,s.useState)(l.position.y),x=(0,o.Z)(C,2),P=x[0],I=x[1],w=!1;return(0,a.jsx)("div",{onClick:function onClick(){var e;null===(e=l.clickFunction)||void 0===e||e.call(l,l.setId,Number(l.elementId))},onMouseDown:function onMouseDown(e){w=!0,u=new c.FM(e.clientX,e.clientY)},onTouchStart:function onTouchStart(e){1==e.touches.length&&(w=!0,u=new c.FM(e.touches[0].clientX,e.touches[0].clientY))},onMouseMove:function onMouseMove(e){var t,n;w&&!f&&(v(!0),null===(t=l.onDragStartFunction)||void 0===t||t.call(l,l.setId,Number(l.elementId)));f&&(null===(n=l.onDragMoveFunction)||void 0===n||n.call(l,l.setId,Number(l.elementId),new c.FM(e.clientX-u.x,e.clientY-u.y)),y(g+e.clientX-u.x),I(P+e.clientY-u.y),u.x=e.clientX,u.y=e.clientY);w=!1},onTouchMove:function onTouchMove(e){if(1==e.touches.length){var t,n;if(w&&!f)v(!0),null===(t=l.onDragStartFunction)||void 0===t||t.call(l,l.setId,Number(l.elementId));if(f)null===(n=l.onDragMoveFunction)||void 0===n||n.call(l,l.setId,Number(l.elementId),new c.FM(e.touches[0].clientX-u.x,e.touches[0].clientY-u.y)),y(g+e.touches[0].clientX-u.x),I(P+e.touches[0].clientY-u.y),u.x=e.touches[0].clientX,u.y=e.touches[0].clientY;w=!1}},onMouseUp:function onMouseUp(){var e;f&&(v(!1),null===(e=l.onDragEndFunction)||void 0===e||e.call(l,l.setId,Number(l.elementId)));w=!1},onTouchEnd:function onTouchEnd(){var e;f&&(v(!1),null===(e=l.onDragEndFunction)||void 0===e||e.call(l,l.setId,Number(l.elementId)));w=!1},style:{left:g+"px",top:P+"px",width:(null==l||null===(t=l.size)||void 0===t?void 0:t.x)+"px",height:(null==l||null===(n=l.size)||void 0===n?void 0:n.y)+"px",transform:"rotate("+(null==l?void 0:l.rotOfElement)+"deg)"},className:i()(f?r.classes.outline.outline2D.draggableActive:void 0,"selected"==l.elemState?r.classes.outline.outline2D.draggable:void 0,"selectable"==l.elemState?r.classes.outline.outline2D.selectable:void 0)})}))},24580:(e,t,n)=>{n.r(t),n.d(t,{default:()=>c});var o=n(65515),l=n.n(o),i=n(9420),r=(n(87363),n(75327)),s=n(47514);const c=(0,i.Pi)((function PosNr(e){var t=e.rect,n=e.item,o=e.onElement,i=e.plannerUIProps,c=e.hasTrash,a=(0,r.NP)(),u="percentage"==n.position.interpretation?t.top+"%":t.top+"px";return u=c&&t.top<4?"calc("+u+" + 35px + var(--globalSize) / 2)":"calc("+u+" + var(--globalSize) / 2)",null==n.posNr?(0,s.jsx)(s.Fragment,{}):(0,s.jsxs)("div",{ref:function ref(e){return o(e)},style:{left:"percentage"==n.position.interpretation?t.left+"%":t.left,top:u,visibility:a.productState.isBoxPlanner?"hidden":"visible"},className:l()(i.classes.buttonGeneral,i.classes.posNr.posNr,n.isDockedAccessoire?i.classes.posNr.posNrAcc:void 0,"selected"==n.elemState?i.classes.posNr.posNrSelected:void 0,"selectable"==n.elemState?i.classes.posNr.posNrSelectable:void 0,"unselectable"==n.elemState?i.classes.posNr.posNrUnSelectable:void 0,n.posNr.toString().length>1?i.classes.posNr.moreThanOneNr:void 0,n.onHover&&"unselectable"!=n.elemState?i.classes.posNr.posNrOnHover:void 0),children:[n.posNr,(0,s.jsx)("div",{onClick:function onClick(){var e;null===(e=n.clickFunction)||void 0===e||e.call(n,n.setId,Number(n.elementId))},style:{left:"0px",top:"0px",visibility:a.productState.isBoxPlanner?"hidden":"visible"},className:l()("selectable"==n.elemState?i.classes.posNr.posNrSelectableArea:void 0)})]})}))},94723:(e,t,n)=>{n.r(t),n.d(t,{default:()=>s});var o=n(65515),l=n.n(o),i=n(9420),r=(n(87363),n(47514));const s=(0,i.Pi)((function RotationClockwise(e){var t=e.item,n=e.rect,o=e.onElement,i=e.plannerUIProps;return(0,r.jsx)("div",{ref:function ref(e){return o(e)},onClick:function onClick(){var e;null===(e=t.clickFunction)||void 0===e||e.call(t,t.setId,Number(t.elementId))},style:{left:n.left+"px",top:n.top+"px"},className:l()(i.classes.rotation.rotClock,i.classes.buttonGeneral),children:t.posNr})}))},72352:(e,t,n)=>{n.r(t),n.d(t,{default:()=>s});var o=n(65515),l=n.n(o),i=n(9420),r=(n(87363),n(47514));const s=(0,i.Pi)((function RotationCounterClockwise(e){var t=e.item,n=e.rect,o=e.onElement,i=e.plannerUIProps;return(0,r.jsx)("div",{ref:function ref(e){return o(e)},onClick:function onClick(){var e;null===(e=t.clickFunction)||void 0===e||e.call(t,t.setId,Number(t.elementId))},style:{left:n.left+"px",top:n.top+"px"},className:l()(i.classes.rotation.rotCounterClock,i.classes.buttonGeneral),children:t.posNr})}))},54516:(e,t,n)=>{n.r(t),n.d(t,{default:()=>s});var o=n(65515),l=n.n(o),i=n(9420),r=(n(87363),n(47514));const s=(0,i.Pi)((function Trash(e){var t=e.item,n=e.rect,o=e.onElement,i=e.plannerUIProps,s=n.doUseCalc?n.leftCalc:"percentage"==t.position.interpretation?n.left+"%":n.left+"px",c=n.doUseCalc?n.topCalc:"percentage"==t.position.interpretation?"calc("+n.top+"% )":n.top+"px";return(0,r.jsx)("div",{ref:function ref(e){return o(e)},onClick:function onClick(){var e;null===(e=t.clickFunction)||void 0===e||e.call(t,t.setId,Number(t.elementId))},style:{left:s,top:c},className:l()(i.classes.trash.trashClass,i.classes.buttonGeneral,"BOX"==t.plannerMode?i.classes.trash.boxplanner:void 0),id:"testDel",children:t.posNr})}))},40053:(e,t,n)=>{n.d(t,{Z:()=>useDockingPointPositioning});var o=n(87998),l=n(75327);function useDockingPointPositioning(e){var t,n,i,r,s=e.dpElement,c=e.item,a=(0,l._w)(),u=null==s?void 0:s.getBoundingClientRect(),d=null!==(t=null==c?void 0:c.position.x)&&void 0!==t?t:0,p=null!==(n=null==c?void 0:c.position.y)&&void 0!==n?n:0;if(u&&c){var f=new o.FM(d,p),v=a.getViewConfig(),m=new o.FM(0,0);if("AVL"==(null==c?void 0:c.type)||"AVR"==(null==c?void 0:c.type)){if("2D"===c.plannerMode)switch(v.posDPIcon2D){case"CORNER":break;case"SIDE_TOP":"AVL"==(null==c?void 0:c.type)&&(m=new o.FM(-u.width,0),null!=c&&c.rotOfElement&&(m=o.FM.rotateOrigin(m,null==c?void 0:c.rotOfElement)),f=new o.FM(d+m.x,p+m.y,"pixel"))}}else"AccDP"==(null==c?void 0:c.type)&&"3D"==(null==c?void 0:c.plannerMode)?f.y=100-f.y:"BoxCopyLeft"==c.type||"BoxCopyRight"==(null==c?void 0:c.type)||null==c||c.type;d=f.x,p=f.y}return{width:null!==(i=null==u?void 0:u.width)&&void 0!==i?i:0,height:null!==(r=null==u?void 0:u.height)&&void 0!==r?r:0,top:p,left:d}}},85115:(e,t,n)=>{n.r(t),n.d(t,{default:()=>c});var o=n(34988),l=n(87363),i=n(18938),r=n(40053),s=n(47514);const c=function ItemsDPAccContainer(e){var t=e.item,n=e.plannerUIProps,c=(0,l.useState)(null),a=(0,o.Z)(c,2),u=a[0],d=a[1],p=(0,r.Z)({item:t,dpElement:u});return(0,s.jsx)(s.Fragment,{children:t&&(0,s.jsx)(i.default,{item:t,rect:p,onElement:d,plannerUIProps:n},null==t?void 0:t.key)})}},71492:(e,t,n)=>{n.r(t),n.d(t,{default:()=>M});var o=n(34988),l=n(9420),i=n(87363),r=n(53090),s=n(59290),c=n(88445),a=n(94723),u=n(72352),d=n(54516),p=n(40053),f=n(87998),v=n(75327);var m=n(85115),h=n(24580),g=n(37801),y=n(88683),C=n(69369),x=(0,y.getLogger)("Planner","CopyElementPositioning");var P=n(67348),I=n(33525),w=n(47514);const M=(0,l.Pi)((function ItemsContainer(e){for(var t=e.items,n=e.plannerUIProps,l=(0,v.NP)(),y=(0,i.useState)(null),M=(0,o.Z)(y,2),E=M[0],k=M[1],N=(0,i.useState)(null),D=(0,o.Z)(N,2),O=D[0],R=D[1],b=(0,i.useState)(null),S=(0,o.Z)(b,2),F=S[0],U=S[1],T=(0,i.useState)(null),A=(0,o.Z)(T,2),B=A[0],j=(A[1],(0,i.useState)(null)),_=(0,o.Z)(j,2),G=_[0],Z=(_[1],(0,i.useState)(null)),L=(0,o.Z)(Z,2),V=L[0],X=(L[1],(0,i.useState)(null)),z=(0,o.Z)(X,2),K=z[0],Y=z[1],H=(0,i.useState)(null),q=(0,o.Z)(H,2),W=q[0],J=q[1],Q=(0,i.useState)(null),$=(0,o.Z)(Q,2),ee=$[0],te=$[1],ne=(0,i.useState)(null),oe=(0,o.Z)(ne,2),le=(oe[0],oe[1]),ie=t.find((function(e){return"PosNr"==e.type})),re=t.find((function(e){return"AVL"==e.type})),se=t.find((function(e){return"AVR"==e.type})),ce=[],ae=[],ue=0;ue<t.length;ue++)"AccDP"==t[ue].type?ce.push(t[ue]):"DistanceFromGround"==t[ue].type&&ae.push(t[ue]);var de=t.find((function(e){return"Outline"==e.type})),pe=t.find((function(e){return"TrashIcon"==e.type})),fe=t.find((function(e){return"CopyElement"==e.type})),ve=t.find((function(e){return"RotateC"==e.type})),me=t.find((function(e){return"RotateCC"==e.type})),he=t.find((function(e){return"BoxCopyLeft"==e.type})),ge=t.find((function(e){return"BoxCopyTop"==e.type})),ye=t.find((function(e){return"BoxCopyRight"==e.type})),Ce=function usePosNrPositioning(e){var t,n,o,l,i=e.posNrElement,r=e.item,s=(0,v._w)(),c=null==i?void 0:i.getBoundingClientRect(),a=null!==(t=null==r?void 0:r.position.x)&&void 0!==t?t:0,u=null!==(n=null==r?void 0:r.position.y)&&void 0!==n?n:0;if(c){var d=new f.FM(a,u),p=s.getViewConfig(),m=new f.FM(0,0);switch(null==r?void 0:r.plannerMode){case"2D":switch(p.iconPosition2DGrid){case"BORDER":m=new f.FM(c.width,.1*-c.height),null!=r&&r.rotOfElement&&(m=f.FM.rotateOrigin(m,null==r?void 0:r.rotOfElement)),d=new f.FM(a+m.x,u+m.y,"pixel");break;case"OUTSIDE":var h=null!=r&&r.iconZoom?r.iconZoom:1;m=new f.FM(c.width+h,-c.height/2-(c.height/2.5-h)),null!=r&&r.rotOfElement&&(m=f.FM.rotateOrigin(m,null==r?void 0:r.rotOfElement)),d=new f.FM(a+m.x,u+m.y,"pixel")}a=d.x,u=d.y;break;case"3D":(a+=3)<1&&(a=1),(u=100-u-1)<1&&(u=1)}}return{width:null!==(o=null==c?void 0:c.width)&&void 0!==o?o:0,height:null!==(l=null==c?void 0:c.height)&&void 0!==l?l:0,top:u,left:a}}({item:ie,posNrElement:E}),xe=(0,p.Z)({item:re,dpElement:O}),Pe=(0,p.Z)({item:se,dpElement:F}),Ie=(0,p.Z)({item:he,dpElement:B}),we=(0,p.Z)({item:ge,dpElement:G}),Me=(0,p.Z)({item:ye,dpElement:V}),Ee=function useTrashPositioning(e){var t,n,o,l,i=e.trashElement,r=e.posNrRect,s=e.boxPlannerCopyLeftRect,c=e.boxPlannerCopyTopRect,a=e.boxPlannerCopyRightRect,u=e.trashItem,d=(0,v._w)(),p=null==i?void 0:i.getBoundingClientRect(),m=d.getViewConfig(),h=null!==(t=null==u?void 0:u.position.x)&&void 0!==t?t:0,g=null!==(n=null==u?void 0:u.position.y)&&void 0!==n?n:0,y="",C="",x=!1;if(p&&r){var P=new f.FM(0,0);switch(m.posTrashRotIcon){case"POSNUM_TOP":"2D"==(null==u?void 0:u.plannerMode)?(P=new f.FM(0,-r.height-p.height/2),null!=u&&u.rotOfElement&&(P=f.FM.rotateOrigin(P,u.rotOfElement)),h=r.left+P.x,g=r.top+P.y):"3D"!=(null==u?void 0:u.plannerMode)&&"BOX"!=(null==u?void 0:u.plannerMode)||(m.enableElementCopy?(x=!0,y="calc("+r.left.toString()+"% - "+r.width/1.8+"px)",C=r.top<4?"calc("+r.top+"% + 30px - var(--globalSize) / 2":"calc("+r.top+"% - (var(--globalSize) + 5px) / 2"):(x=!0,y=r.left.toString()+"%",C=r.top<4?"calc("+r.top+"% + 30px - var(--globalSize) / 2":"calc("+r.top+"% - (var(--globalSize) + 5px) / 2"));break;case"TOP_RIGHT_BACK":if("2D"==(null==u?void 0:u.plannerMode)){var I=null!=u&&u.iconZoom?u.iconZoom:1;P=new f.FM(-p.width/2-(p.width/3+I),-p.height/2-(p.height/3.7-I)),null!=u&&u.rotOfElement&&(P=f.FM.rotateOrigin(P,u.rotOfElement)),h+=P.x,g+=P.y,Math.sqrt(Math.pow(r.left-h,2)+Math.pow(r.top-g,2))<=r.width&&(P=new f.FM(r.width,0),null!=u&&u.rotOfElement&&(P=f.FM.rotateOrigin(P,u.rotOfElement)),h+=P.x,g+=P.y)}else if("3D"==(null==u?void 0:u.plannerMode)||"BOX"==(null==u?void 0:u.plannerMode)){if(s||a||c){var w=!1;s&&(Math.sqrt(Math.pow(s.left-h,2)+Math.pow(s.top-g,2))<9&&(g+=5,w=!0),!w&&a&&Math.sqrt(Math.pow(a.left-h,2)+Math.pow(a.top-g,2))<9&&(g+=5,w=!0),!w&&c&&Math.sqrt(Math.pow(c.left-h,2)+Math.pow(c.top-g,2))<9&&(g+=5,w=!0))}(h-=1)>99&&(h=99),(g=100-g-2)<1&&(g=1)}}}return{width:null!==(o=null==p?void 0:p.width)&&void 0!==o?o:0,height:null!==(l=null==p?void 0:p.height)&&void 0!==l?l:0,top:g,left:h,doUseCalc:x,topCalc:x?C:void 0,leftCalc:x?y:void 0}}({trashItem:pe,posNrRect:Ce,boxPlannerCopyLeftRect:Ie,boxPlannerCopyTopRect:we,boxPlannerCopyRightRect:Me,trashElement:K}),ke=function useCopyElementPositioning(e){var t,n,o=e.copyElement,l=e.posNrRect,i=e.copyElementItem,r=(0,v._w)(),s=null==o?void 0:o.getBoundingClientRect(),c=r.getViewConfig(),a="",u="",d=!1;if(s&&l)switch(new f.FM(0,0),c.posTrashRotIcon){case"POSNUM_TOP":"3D"==(null==i?void 0:i.plannerMode)&&c.enableElementCopy&&(d=!0,a="calc("+l.left.toString()+"% + "+l.width/1.8+"px)",u="calc("+l.top+"% - "+(l.height+2)+"px)");break;case"TOP_RIGHT_BACK":x.error(new C.GE("Do implement copy Element for TOP_RIGHT_BACK Positioning",{code:"WC_0012"}))}return{width:null!==(t=null==s?void 0:s.width)&&void 0!==t?t:0,height:null!==(n=null==s?void 0:s.height)&&void 0!==n?n:0,top:0,left:0,doUseCalc:d,topCalc:d?u:void 0,leftCalc:d?a:void 0}}({copyElementItem:fe,posNrRect:Ce,copyElement:W}),Ne=function useRotClockwisePositioning(e){var t,n,o,l,i=e.rotElement,r=e.posNrRect,s=e.trashRect,c=e.rotItem,a=(0,v._w)(),u=null==i?void 0:i.getBoundingClientRect(),d=a.getViewConfig(),p=null!==(t=null==c?void 0:c.position.x)&&void 0!==t?t:0,m=null!==(n=null==c?void 0:c.position.y)&&void 0!==n?n:0;if(u&&r&&s){var h=new f.FM(0,0);switch(d.posTrashRotIcon){case"POSNUM_TOP":p=(r.left+s.left)/2,m=(r.top+s.top)/2,h=new f.FM(-u.width,0),null!=c&&c.rotOfElement&&(h=f.FM.rotateOrigin(h,c.rotOfElement)),p+=h.x,m+=h.y;break;case"TOP_RIGHT_BACK":if(Math.sqrt(Math.pow(r.left-s.left,2)+Math.pow(r.top-s.top,2))<=100){var g=new f.FM(0,-u.height-4);null!=c&&c.rotOfElement&&0!=c.rotOfElement&&(g=f.FM.rotateOrigin(g,c.rotOfElement)),p=(null==s?void 0:s.left)+g.x,m=(null==s?void 0:s.top)+g.y}else{var y=new f.FM(-u.width-4,0);null!=c&&c.rotOfElement&&0!=c.rotOfElement&&(y=f.FM.rotateOrigin(y,c.rotOfElement)),p=(null==s?void 0:s.left)+y.x,m=(null==s?void 0:s.top)+y.y}}}return{width:null!==(o=null==u?void 0:u.width)&&void 0!==o?o:0,height:null!==(l=null==u?void 0:u.height)&&void 0!==l?l:0,top:m,left:p}}({rotItem:ve,posNrRect:Ce,trashRect:Ee,rotElement:ee}),De=function useRotCounterClockwisePositioning(e){var t,n,o,l,i=e.rotElement,r=e.posNrRect,s=e.trashRect,c=e.rotClockRect,a=e.rotItem,u=(0,v._w)(),d=null==i?void 0:i.getBoundingClientRect(),p=u.getViewConfig(),m=null!==(t=null==a?void 0:a.position.x)&&void 0!==t?t:0,h=null!==(n=null==a?void 0:a.position.y)&&void 0!==n?n:0;if(d&&r&&s&&c){var g=new f.FM(0,0);switch(p.posTrashRotIcon){case"POSNUM_TOP":m=(r.left+s.left)/2,h=(r.top+s.top)/2,g=new f.FM(d.width,0),null!=a&&a.rotOfElement&&(g=f.FM.rotateOrigin(g,a.rotOfElement)),m+=g.x,h+=g.y;break;case"TOP_RIGHT_BACK":Math.sqrt(Math.pow(r.left-s.left,2)+Math.pow(r.top-s.top,2))<=100?(g=new f.FM(0,-d.height-3),null!=a&&a.rotOfElement&&(g=f.FM.rotateOrigin(g,a.rotOfElement)),m=(null==c?void 0:c.left)+g.x,h=(null==c?void 0:c.top)+g.y):(g=new f.FM(-d.width-3,-0),null!=a&&a.rotOfElement&&(g=f.FM.rotateOrigin(g,a.rotOfElement)),m=(null==c?void 0:c.left)+g.x,h=(null==c?void 0:c.top)+g.y)}}return{width:null!==(o=null==d?void 0:d.width)&&void 0!==o?o:0,height:null!==(l=null==d?void 0:d.height)&&void 0!==l?l:0,top:h,left:m}}({rotItem:ve,posNrRect:Ce,trashRect:Ee,rotClockRect:Ne,rotElement:ee});return(0,w.jsxs)(w.Fragment,{children:[ie&&(0,w.jsx)(h.default,{item:ie,rect:Ce,onElement:k,plannerUIProps:n,hasTrash:!!pe}),de&&(0,w.jsx)(c.default,{item:de,plannerUIProps:n},de.key),re&&(0,w.jsx)(r.default,{item:re,rect:xe,onElement:R,plannerUIProps:n},null==re?void 0:re.key),se&&(0,w.jsx)(s.default,{item:se,rect:Pe,onElement:U,plannerUIProps:n},null==se?void 0:se.key),he&&ye&&(0,w.jsx)(g.default,{item:he,rect:Ie,invertLeftRight:Me.left<Ie.left,plannerUIProps:n},he.key),ge&&(0,w.jsx)(g.default,{item:ge,rect:we,invertLeftRight:!1,plannerUIProps:n},ge.key),ye&&he&&(0,w.jsx)(g.default,{item:ye,rect:Me,invertLeftRight:Me.left<Ie.left,plannerUIProps:n},ye.key),pe&&(0,w.jsx)(d.default,{item:pe,rect:Ee,onElement:Y,plannerUIProps:n}),fe&&(0,w.jsx)(P.default,{item:fe,rect:ke,onElement:J,plannerUIProps:n}),ve&&(0,w.jsx)(a.default,{item:ve,rect:Ne,onElement:te,plannerUIProps:n}),me&&(0,w.jsx)(u.default,{item:me,rect:De,onElement:le,plannerUIProps:n}),ce.map((function(e,t){return(0,w.jsx)(m.default,{item:e,plannerUIProps:n},e.key)})),l.productState.getDoShow3DDimensionLines()&&ae.map((function(e,t){return(0,w.jsx)(I.default,{item:e,plannerUIProps:n},e.key)}))]})}))}}]);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 2027.diva-web-planner-react.umd.min.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignDivaWebPlannerReact=self.webpackChunkCrystaldesignDivaWebPlannerReact||[]).push([[2027],{52027:(t,r,o)=>{o.r(r),o.d(r,{default:()=>
|
|
2
|
+
"use strict";(self.webpackChunkCrystaldesignDivaWebPlannerReact=self.webpackChunkCrystaldesignDivaWebPlannerReact||[]).push([[2027],{52027:(t,r,o)=>{o.r(r),o.d(r,{default:()=>p});var i=o(13125),a=o(43860),l=o(80248),u=o(50263),c=o(69369);function _createForOfIteratorHelper(t,r){var o="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!o){if(Array.isArray(t)||(o=function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var o={}.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?_arrayLikeToArray(t,r):void 0}}(t))||r&&t&&"number"==typeof t.length){o&&(t=o);var i=0,a=function F(){};return{s:a,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:a}}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 l,u=!0,c=!1;return{s:function s(){o=o.call(t)},n:function n(){var t=o.next();return u=t.done,t},e:function e(t){c=!0,l=t},f:function f(){try{u||null==o.return||o.return()}finally{if(c)throw l}}}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var o=0,i=Array(r);o<r;o++)i[o]=t[o];return i}var p=function(){return(0,a.Z)((function StandardWWSHandler(){(0,i.Z)(this,StandardWWSHandler),(0,l.Z)(this,"mainColorCandidates",[])}),[{key:"repairWWSFlags",value:function repairWWSFlags(t,r){return r}},{key:"getWWSData",value:function getWWSData(t,r,o,i){var a=this;this.mainColorCandidates=[];for(var l=r.CatalogData.summaryTabGroupPosition,p=r.CatalogData.isIDMFormat,d=[],v=[],h=void 0,g=0;g<i.length;g++){i[g].DontAddToFinalOrderLine&&(i.splice(g,1),g--)}var m=r.getDivaArticles(),C=[],A=[],y=Object.values(m),P=1;for(var b in m){var N=m[b],O=this.getPartlistComponents(N),T=[];C.push({article:N,posNr:P,partlistArticles:[],letOthesMatch:!0});var G,S=_createForOfIteratorHelper(O);try{var x=function _loop(){var t,r,o,i,a=G.value,l=null!==(t=a.partListParentArticle)&&void 0!==t?t:N;y.includes(l)||y.push(l);var u=null!==(r=a.catalogArticle.orderPosNr)&&void 0!==r?r:null,c=null!==(o=null===(i=l.getArticleOptionState((p?"":"OPT")+a.tabGroup))||void 0===i?void 0:i.optionTabGroup)&&void 0!==o?o:a.tabGroup;if(null!==u){var d=!u.endsWith(";")&&C.find((function(t){return(t.posNr==Number(u)||t.groupKey==u)&&t.letOthesMatch}));if(d)d.partlistArticles.push({article:a,tabGroup:c,optionArticle:l});else{var v=!0,h=Number(u);if(isNaN(h)){h=P,v=!1;do{h++}while(C.find((function(t){return t.posNr==h})))}C.push({article:N,posNr:h,letOthesMatch:v,partlistArticles:[{article:a,tabGroup:c,optionArticle:l}],groupKey:u})}}else T.push({article:a,tabGroup:c,optionArticle:l})};for(S.s();!(G=S.n()).done;)x()}catch(t){S.e(t)}finally{S.f()}C.find((function(t){return t.posNr===P})).partlistArticles=T;do{P++}while(C.find((function(t){return t.posNr==P})))}l&&this.sort(l,C);for(var k=0;k<C.length;k++)for(var W=C[k],I=1,M=function _loop2(){var r,o,i=W.partlistArticles[_],l=i.article,u=i.optionArticle,v=null!==(r=null===(o=u.getArticleOptionState((p?"":"OPT")+l.tabGroup))||void 0===o?void 0:o.optionTabGroup)&&void 0!==r?r:l.tabGroup,g=d.find((function(t){var r,o,i;return t.Name==l.name&&t.ArticleNr==l.configArticleCodex&&(null===(r=t.FormattedOptions)||void 0===r?void 0:r[0])&&(null===(o=t.FormattedOptions)||void 0===o?void 0:o[0].Title)==(null===(i=a.getFormattedOptions(l,u,[],"",A))||void 0===i?void 0:i[0].Title)})),m=a.unitPrice(l);if(g)g.Quantity=g.Quantity+l.quantity,g.FormattedPrice=c.ZP.formatPrice(m*g.Quantity);else{var C=[];if(v&&"Aktion"!==v&&"BOX_AF_PARIS"!==v||h){var y,P,b=a.getFinalPosNr(W,I,l,h),N=b.finalPosNr,O=b.newPosNrCount;I=O;var T=a.getFormattedOptions(l,u,C,N,A);d.push({ArticleNr:null!==(y=l.configArticleCodex)&&void 0!==y&&y.startsWith("HIDE_CODEX")?"":null!==(P=l.configArticleCodex)&&void 0!==P?P:l.articleCodex,ColorCodices:C,FormattedOptions:T,FormattedPrice:c.ZP.formatPrice(m*l.quantity),PosNr:N,Price:m,Quantity:l.quantity,TabGroup:null!=v?v:" ",Name:l.name,Size:l.actSizeText})}else{var G,S;h={formattedOptions:[],ArticleNr:null!==(G=l.configArticleCodex)&&void 0!==G?G:l.articleCodex,ColorCodices:[],FormattedPrice:c.ZP.formatPrice(m*l.quantity),PosNr:W.posNr+".00",Price:m,Quantity:l.quantity,TabGroup:"SetArtikel",Name:null!==(S=t.SetName)&&void 0!==S?S:l.name}}}},_=0;_<W.partlistArticles.length;_++)M();for(var D=0;D<d.length;D++)d[D].TabGroup&&!v.includes(d[D].TabGroup)&&v.push(d[D].TabGroup);if(l){for(var w=[],Z=function _loop3(){for(var t,r=null!==(t=u.Z.getTabgroupByOptionCodex(l[L],y))&&void 0!==t?t:l[L];d.find((function(t){return t.TabGroup===r}));){var o=d.findIndex((function(t){return t.TabGroup===r}));o>=0&&(w.push(d[o]),d.splice(o,1))}},L=0;L<l.length;L++)Z();for(var B=0;B<d.length;B++)w.push(d[B]);d=w}return d.sort((function(t,r){return parseFloat(t.PosNr)-parseFloat(r.PosNr)})),h&&d.unshift(h),this.markMainColor(),{PartListOrderLines:d,PartListGroups:v}}},{key:"getPartlistComponents",value:function getPartlistComponents(t){return Object.values(t.getRecursivePartlistArticles()).filter((function(t){return!t.hasPartlistArticle||t.mainPrice>0}))}},{key:"unitPrice",value:function unitPrice(t){return t.hasPartlistArticle?t.mainPrice:t.price}},{key:"markMainColor",value:function markMainColor(){var t,r=null!==(t=this.mainColorCandidates.find((function(t){return t.explicit})))&&void 0!==t?t:this.mainColorCandidates[0];r&&(r.option.IsMainColor=!0)}},{key:"getFinalPosNr",value:function getFinalPosNr(t,r,o,i){var a="";return i&&1==t.posNr&&!o.tabGroup?a="1.99":t.partlistArticles.length>1?(a="".concat(t.posNr,".").concat(String(r).padStart(2,"0")),r++):a=(t.posNr+".00").toString(),{finalPosNr:a,newPosNrCount:r}}},{key:"sort",value:function sort(t,r){for(var o=0;o<r.length;o++){var i,a=[],l=r[o],c=[l.article],p=_createForOfIteratorHelper(l.partlistArticles);try{for(p.s();!(i=p.n()).done;){var d=i.value;c.includes(d.optionArticle)||c.push(d.optionArticle)}}catch(t){p.e(t)}finally{p.f()}for(var v=0;v<t.length;v++){for(var h,g=[],m=null!==(h=u.Z.getTabgroupByOptionCodex(t[v],c))&&void 0!==h?h:t[v],C=0;C<l.partlistArticles.length;C++){var A,y,P=l.partlistArticles[C];(null!==(A=null===(y=P.optionArticle.getArticleOptionState((P.article.CatalogData.isIDMFormat?"":"OPT")+P.tabGroup))||void 0===y?void 0:y.optionTabGroup)&&void 0!==A?A:P.tabGroup)==m&&g.push(C)}for(var b=0;b<g.length;b++)a.push(l.partlistArticles[g[b]-b]),l.partlistArticles.splice(g[b]-b,1)}for(var N=0;N<l.partlistArticles.length;N++)a.push(l.partlistArticles[N]);l.partlistArticles=a}}},{key:"getFormattedOptions",value:function getFormattedOptions(t,r,o,i,a){var l=[];if(t.tabGroup&&t.tabGroupOption)for(var c=u.Z.getOptionCodexesOfTabGroupForSummary(r,t,a,""==i),p=0;p<c.length;p++){var d=c[p];if(d.optionCodex.startsWith("OPTBE_")||d.optionCodex.startsWith("OPTAB_")||d.option.addToWWS||d.option.isMainColor){var v,h=null!==(v=d.vCodex)&&void 0!==v?v:d.valCodex;if(h){var g,m,C;o.push(h);var A=null!==(g=null===(m=d.val)||void 0===m?void 0:m.groupName)&&void 0!==g?g:null===(C=r.getMergesToOPGParentOps(d.optionCodex))||void 0===C?void 0:C.valName,y={PosNr:i,Text:(A?A+" ":"")+d.valName,Title:d.optionOrigName,Codex:d.vCodex&&d.vCodex!==d.valName?d.vCodex:"",IsMainColor:!1};l.push(y);var P=!!d.option.isMainColor;""===i||!P&&"OPTBE_BOX"!=d.optionCodex||this.mainColorCandidates.push({option:y,explicit:P})}}}return l}},{key:"getCustomIdsForProductsMatch",value:function getCustomIdsForProductsMatch(t){}}])}()}}]);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 3596.diva-web-planner-react.umd.min.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignDivaWebPlannerReact=self.webpackChunkCrystaldesignDivaWebPlannerReact||[]).push([[3596],{33596:(e,t,i)=>{i.r(t),i.d(t,{default:()=>v});var r=i(84658),s=i(12952),n=i(13125),l=i(43860),a=i(80248),c=i(50747),o=i.n(c),d=i(69369),h=i(37609),u=i(35215),f=i(69821);function ownKeys(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,r)}return i}var g=d.ZP.initLog("Planner","WEB-PLANNER-LOGIC"),v=function(){return(0,l.Z)((function ShelfPlanner(e,t){if((0,n.Z)(this,ShelfPlanner),(0,a.Z)(this,"article",void 0),(0,a.Z)(this,"grids",[]),(0,a.Z)(this,"isVisible",void 0),(0,a.Z)(this,"showOnRule",void 0),(0,a.Z)(this,"showAfterOPT",void 0),(0,a.Z)(this,"data",void 0),(0,a.Z)(this,"freeArticlesPossible",{}),(0,a.Z)(this,"freeArticlesPlanned",{}),(0,a.Z)(this,"gridAllowedOnCells",void 0),(0,a.Z)(this,"gridAllowedOntoArticles",void 0),(0,a.Z)(this,"takePlaceOnOtherGrids",void 0),(0,a.Z)(this,"disableCellsByElement",void 0),(0,a.Z)(this,"montageOptions",[]),(0,a.Z)(this,"shelfDebugStack",[]),(0,a.Z)(this,"shelfDebugSeq",0),(0,a.Z)(this,"restorePending",void 0),(0,a.Z)(this,"stashedAccessoires",{}),this.article=t,this.restorePending=!!t.shelfPlanData,this.disableCellsByElement=e.DisableCells,this.data=e,this.showAfterOPT=e.ShowAfterOPT,this.showOnRule=e.ShowOnRule?d.ZP.getRuleByFormula(e.ShowOnRule,t.catalogCodex,t.CatalogData.multiselectOptions):void 0,this.gridAllowedOnCells=e.GridAllowedOnCells,this.gridAllowedOntoArticles=e.GridAllowedOntoArticles,this.takePlaceOnOtherGrids=e.TakePlaceOnOtherGrids,this.initFreeArticles(),e.ShelfPlanner&&e.ShelfPlanner.length>0){for(var i=0;i<e.ShelfPlanner.length;i++)this.creatNewGrid(i),this.updateDisabledCells();this.montageOptions=(0,s.Z)(new Set(this.grids.reduce((function(e,t){return e=e.concat(t.montageOptionsList)}),[])))}}),[{key:"logShelfDebug",value:function logShelfDebug(e){this.shelfDebugStack.push(function _objectSpread(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(i),!0).forEach((function(t){(0,a.Z)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({seq:this.shelfDebugSeq++},e)),this.shelfDebugStack.length>500&&this.shelfDebugStack.splice(0,this.shelfDebugStack.length-500)}},{key:"initFreeArticles",value:function initFreeArticles(){if(this.data.ShelfPlanner)for(var e=0;e<this.data.ShelfPlanner.length;e++){var t=this.data.ShelfPlanner[e];if(t.initAccArr)for(var i=0;i<t.initAccArr.length;i++){var r=t.initAccArr[i];r.noPrice&&(void 0===this.freeArticlesPossible[r.Codex]&&(this.freeArticlesPossible[r.Codex]=0),this.freeArticlesPossible[r.Codex]+=r.Quantity)}}}},{key:"IsVisible",get:function get(){return this.isVisible}},{key:"RestorePending",get:function get(){return this.restorePending},set:function set(e){this.restorePending=e}},{key:"setIsVisible",value:(C=(0,r.Z)(o().mark((function _callee(e){return o().wrap((function _callee$(t){for(;;)switch(t.prev=t.next){case 0:if(this.isVisible==e){t.next=13;break}if(this.logShelfDebug({phase:"visibility",action:e?"plannerShown":"plannerHidden",detail:e?void 0:"showOnRule/visibility turned false — all placed accessories are deleted"}),!e){t.next=11;break}if(this.isVisible=e,this.article.shelfPlanData){t.next=9;break}return t.next=7,this.onConfigChanged({});case 7:return t.next=9,this.initAccList();case 9:t.next=13;break;case 11:return t.next=13,this.deleteAllAcc();case 13:this.isVisible=e;case 14:case"end":return t.stop()}}),_callee,this)}))),function setIsVisible(e){return C.apply(this,arguments)})},{key:"onConfigChanged",value:(y=(0,r.Z)(o().mark((function _callee2(e){var t,i,r,s,n,l,a,c,d,h,u,f;return o().wrap((function _callee2$(o){for(;;)switch(o.prev=o.next){case 0:for(t=!1,i=[],r=0;r<this.grids.length;r++)i.push(this.grids[r].onConfigChanged());s=0;case 4:if(!(s<i.length)){o.next=13;break}if(i[s].length){o.next=7;break}return o.abrupt("continue",10);case 7:n=this.grids[s],i[s].includes("disableGridRule")&&this.logShelfDebug({phase:"configChanged",action:n.DisabledByRule?"gridDisabledByRule":"gridEnabledByRule",gridIndex:n.ShelfIndex,detail:n.ShowOnRule}),i[s].includes("heightGridRule")&&this.logShelfDebug({phase:"configChanged",action:"gridRecreated",gridIndex:n.ShelfIndex,detail:"HeightGridCellCountOnRule match changed — grid rebuilt (cell count / placeable accessories can change), its accessories are deleted"});case 10:s++,o.next=4;break;case 13:l=0;case 14:if(!(l<i.length)){o.next=23;break}if(i[l].length){o.next=17;break}return o.abrupt("continue",20);case 17:return this.stashAccessoiresOfGrid(l),o.next=20,this.grids[l].deleteAllAccOfGrid();case 20:l++,o.next=14;break;case 23:a=0;case 24:if(!(a<i.length)){o.next=40;break}if(i[a].length){o.next=27;break}return o.abrupt("continue",37);case 27:if(i[a].includes("heightGridRule")&&(this.creatNewGrid(a),t=!0),c=this.grids[a],!i[a].includes("heightGridRule")&&!i[a].includes("disableGridRule")||c.DisabledByRule){o.next=37;break}if(!this.restorePending){o.next=32;break}return o.abrupt("continue",37);case 32:return o.next=34,this.placeStashedAccessoiresOfGrid(a);case 34:if(o.sent){o.next=37;break}return o.next=37,this.initAccList(a);case 37:a++,o.next=24;break;case 40:if(t||!Object.keys(e).length){o.next=51;break}d=this.activeGrids,h=0;case 43:if(!(h<d.length)){o.next=51;break}if(f=d[h],!(null!==(u=f.DisableCellsByMeasures)&&void 0!==u&&u.options.find((function(t){return Object.keys(e).includes("OPT"+t.opt)}))||f.disableCellsByRules)){o.next=48;break}return t=!0,o.abrupt("break",51);case 48:h++,o.next=43;break;case 51:t&&this.updateDisabledCells();case 52:case"end":return o.stop()}}),_callee2,this)}))),function onConfigChanged(e){return y.apply(this,arguments)})},{key:"creatNewGrid",value:function creatNewGrid(e){this.grids[e]=new u.Z(e,this.article,this.data),this.grids[e].onConfigChanged()}},{key:"stashAccessoiresOfGrid",value:function stashAccessoiresOfGrid(e){var t=this.collectAccessoiresToStash(this.grids[e]);t.length&&(this.stashedAccessoires[e]=t)}},{key:"collectAccessoiresToStash",value:function collectAccessoiresToStash(e){for(var t=[],i=0;i<e.Cells.length;i++){var r=e.Cells[i],s=r.Article;if(r.InUse===i&&s){for(var n={},l=s.shelfPlanner,a=0;a<(null!==(c=null==l?void 0:l.grids.length)&&void 0!==c?c:0);a++){var c,o=l.grids[a],d=l.collectAccessoiresToStash(o);d.length&&(n[o.ShelfIndex]=d)}t.push({articleCodex:s.articleCodex,cellIndex:i,noMove:r.NoMove,noDelete:r.NoDelete,quantity:s.quantity,variantValues:s.VariantValues,accessoires:n})}}return t}},{key:"placeStashedAccessoiresOfGrid",value:(x=(0,r.Z)(o().mark((function _callee3(e){var t;return o().wrap((function _callee3$(i){for(;;)switch(i.prev=i.next){case 0:if(null!=(t=this.stashedAccessoires[e])&&t.length){i.next=3;break}return i.abrupt("return",0);case 3:return delete this.stashedAccessoires[e],i.next=6,this.placeStashedAccessoiresInGrid(e,t);case 6:return i.abrupt("return",i.sent);case 7:case"end":return i.stop()}}),_callee3,this)}))),function placeStashedAccessoiresOfGrid(e){return x.apply(this,arguments)})},{key:"placeStashedAccessoiresByGrid",value:(p=(0,r.Z)(o().mark((function _callee4(e){var t,i,r,s;return o().wrap((function _callee4$(n){for(;;)switch(n.prev=n.next){case 0:t=Object.keys(e),i=0;case 2:if(!(i<t.length)){n.next=14;break}return s=Number(t[i]),n.next=6,null===(r=this.getGridByIndex(s))||void 0===r?void 0:r.deleteAllAccOfGrid();case 6:return n.next=8,this.placeStashedAccessoiresInGrid(s,e[s]);case 8:if(n.sent){n.next=11;break}return n.next=11,this.initAccList(s);case 11:i++,n.next=2;break;case 14:case"end":return n.stop()}}),_callee4,this)}))),function placeStashedAccessoiresByGrid(e){return p.apply(this,arguments)})},{key:"placeStashedAccessoiresInGrid",value:(A=(0,r.Z)(o().mark((function _callee5(e,t){var i,r,s,n,l,a,c;return o().wrap((function _callee5$(o){for(;;)switch(o.prev=o.next){case 0:if(i=0,r=this.getGridByIndex(e)){o.next=4;break}return o.abrupt("return",i);case 4:s=0;case 5:if(!(s<t.length)){o.next=28;break}return n=t[s],r.ActAccessoire=n.articleCodex,o.next=10,h.Z.addAccessorieOnShelfPlanner(this.article.set,e,n.cellIndex,this.article.basketId,{noMove:n.noMove,noDelete:n.noDelete,byInit:!0});case 10:if(l=o.sent,r.ActAccessoire=void 0,a=!1===l||void 0===l.index?void 0:l,c=null==a?void 0:a.accessoire,a&&c){o.next=17;break}return g.error(new d.GE("shelfaccessoire of a switched off grid does not fit anymore and gets dropped",{code:"WC_0015",custom:{stashed:n,gridName:r.GridName,result:l,parentPosNr:this.article.posNr,parentArticleCodex:this.article.articleCodex,parentBasketId:this.article.basketId}})),o.abrupt("continue",25);case 17:if(c.quantity=n.quantity,i++,!Object.keys(n.variantValues).length){o.next=22;break}return o.next=22,f.Z.updateCfgValues(c,n.variantValues,{});case 22:if(!c.shelfPlanner){o.next=25;break}return o.next=25,c.shelfPlanner.placeStashedAccessoiresByGrid(n.accessoires);case 25:s++,o.next=5;break;case 28:return o.abrupt("return",i);case 29:case"end":return o.stop()}}),_callee5,this)}))),function placeStashedAccessoiresInGrid(e,t){return A.apply(this,arguments)})},{key:"initAccList",value:(k=(0,r.Z)(o().mark((function _callee6(e){var t,i,r,s,n,l,a,c,d,u,f,g;return o().wrap((function _callee6$(o){for(;;)switch(o.prev=o.next){case 0:t=this.activeGrids,i=0;case 2:if(!(i<t.length)){o.next=37;break}if(r=t[i],void 0===e||r.ShelfIndex===e){o.next=6;break}return o.abrupt("continue",34);case 6:if(r.InitAccArr){o.next=8;break}return o.abrupt("continue",34);case 8:s=0;case 9:if(!(s<r.InitAccArr.length)){o.next=34;break}n=r.InitAccArr[s],l=0;case 12:if(!(l<n.initRH.length)){o.next=31;break}return r.ActAccessoire=n.Codex,this.logShelfDebug({phase:"initAccessories",action:"initAccessoryRequested",gridIndex:r.ShelfIndex,cellIndex:n.initRH[l],articleCodex:n.Codex,detail:"from InitAccArr — a missing matching accessoryPlaced entry right after means the init placement failed"}),o.next=17,h.Z.addAccessorieOnShelfPlanner(this.article.set,r.ShelfIndex,n.initRH[l],r.basketId,{noMove:n.noMove,noDelete:n.noDelete,byInit:!0});case 17:if(!n.replaceFromParent){o.next=27;break}if(!(c=this.getShelfParentShelfId())||null===(a=this.article.accessoireParentArticle)||void 0===a||!a.shelfPlanner){o.next=27;break}if(!((d=this.article.accessoireParentArticle.shelfPlanner.getAccessorireByCodex(c,n.Codex))&&d.length>0)){o.next=27;break}if(f=d[0],void 0===(g=null===(u=f.shelfPlanner)||void 0===u?void 0:u.getRHOnParentArticle())||void 0===f.relatedToShelfGrid){o.next=27;break}return o.next=27,h.Z.deleteAccessorieOnShelfPlanner(this.article.set,f.relatedToShelfGrid,g,this.article.accessoireParentArticle.basketId);case 27:r.ActAccessoire=void 0;case 28:l++,o.next=12;break;case 31:s++,o.next=9;break;case 34:i++,o.next=2;break;case 37:case"end":return o.stop()}}),_callee6,this)}))),function initAccList(e){return k.apply(this,arguments)})},{key:"getAccessorireByCodex",value:function getAccessorireByCodex(e,t){var i=this.grids.find((function(t){return t.ShelfId==e})),r=[];if(i)for(var s in i.Accessoires)i.Accessoires[s].articleCodex==t&&r.push(i.Accessoires[s]);return r}},{key:"triggerVisibility",value:(b=(0,r.Z)(o().mark((function _callee7(e){var t,i,r,s,n,l,a;return o().wrap((function _callee7$(c){for(;;)switch(c.prev=c.next){case 0:t=[],i=[],r=0;case 3:if(!(r<this.grids.length)){c.next=13;break}if((s=this.grids[r]).VisitOption){c.next=7;break}return c.abrupt("continue",10);case 7:if(!i.includes(s.VisitOption)&&!t.includes(s.VisitOption)){c.next=9;break}return c.abrupt("continue",10);case 9:e&&(s.gridGroup==e||s.alternativeGridGroups.includes(e))?(i.push(s.VisitOption),t.includes(s.VisitOption)&&t.splice(t.indexOf(s.VisitOption),1)):t.push(s.VisitOption);case 10:r++,c.next=3;break;case 13:n=0;case 14:if(!(n<[].concat(i,t).length)){c.next=23;break}if(l=[].concat(i,t)[n],!(a=this.article.getArticleOptionState((this.article.CatalogData.isIDMFormat?"":"OPT")+l))){c.next=20;break}return c.next=20,f.Z.updateOption(this.article,a.optionCodex,i.includes(l)?"OPVMIT":"OPVOHNE");case 20:n++,c.next=14;break;case 23:case"end":return c.stop()}}),_callee7,this)}))),function triggerVisibility(e){return b.apply(this,arguments)})},{key:"deleteAllAcc",value:(v=(0,r.Z)(o().mark((function _callee8(){var e;return o().wrap((function _callee8$(t){for(;;)switch(t.prev=t.next){case 0:this.article.shelfPlanData=void 0,this.restorePending=!1,e=0;case 3:if(!(e<this.grids.length)){t.next=9;break}return t.next=6,this.grids[e].deleteAllAccOfGrid();case 6:e++,t.next=3;break;case 9:case"end":return t.stop()}}),_callee8,this)}))),function deleteAllAcc(){return v.apply(this,arguments)})},{key:"GridAllowedOnCells",get:function get(){return this.gridAllowedOnCells}},{key:"GridAllowedOntoArticles",get:function get(){return this.gridAllowedOntoArticles}},{key:"TakePlaceOnOtherGrids",get:function get(){return this.takePlaceOnOtherGrids}},{key:"tryFitOnShelfOfGrid",value:function tryFitOnShelfOfGrid(e,t,i){var r=i.shelfHeight,s=this.grids[e];if(!r||isNaN(r))return alert("Der artikel: "+i.name+" hat keine RH hinterlegt! Der Metatag 'HEIGHTGRIDUSED' ist: "+i.shelfHeight),!1;var n=!1,l=this.doesTakePlaceOnOtherGrids(i)?this.activeGrids:[s];if(s.checkAccessoireInGridRules(i))return{type:"notAllowedByMaxQuantityReached",size:r};for(var a=0;a<l.length;a++)if(!1===(n=l[a].tryFitOnShelf(i,t,i.shelfPlanner))||"doesNotFit"===n.type||n.type.startsWith("notAllowed")||void 0===n.index)return n;return n}},{key:"getFreeSpacesOfAccessoireOfGrids",value:function getFreeSpacesOfAccessoireOfGrids(e,t){for(var i=this.grids,r={},s=0;s<i.length;s++){var n=i[s];n.DisabledByRule||(r[n.GridName]={freeCells:n.getFreeSpacesOfAccessoire(t),idx:s})}return r}},{key:"getPlannedSpacesOfGrids",value:function getPlannedSpacesOfGrids(){for(var e=this.grids,t={},i=0;i<e.length;i++){var r=e[i];r.DisabledByRule||(t[r.GridName]={accessories:r.getPlannedSpaces(),idx:i})}return t}},{key:"deleteAccessoireOfCellInGrid",value:(c=(0,r.Z)(o().mark((function _callee9(e,t){var i,r,s,n,l,a;return o().wrap((function _callee9$(c){for(;;)switch(c.prev=c.next){case 0:if(i=this.grids[e],r=i.Cells[t].InUse,(n=i.Cells.find((function(e){return e.OnBoard==r})))?(s=n.InUse,n.Article):(s=t,l=i.Cells[t].Article),!l){c.next=8;break}return this.checkForNewFreeAccessoire(l,e),c.next=8,this.handleDeleteTakePlaceOnOtherGrids(e,s,l);case 8:return c.next=10,i.deleteAccessoireInCells(s);case 10:return(a=c.sent)&&this.logShelfDebug({phase:"placement",action:"accessoryDeleted",gridIndex:e,cellIndex:s,articleCodex:a.articleCodex,articleName:a.name}),c.abrupt("return",a);case 13:case"end":return c.stop()}}),_callee9,this)}))),function deleteAccessoireOfCellInGrid(e,t){return c.apply(this,arguments)})},{key:"checkForNewFreeAccessoire",value:function checkForNewFreeAccessoire(e,t){if(void 0!==this.freeArticlesPossible[e.articleCodex]&&e.noPrice){this.freeArticlesPlanned[e.articleCodex]-=e.quantity;var i=this.grids[t];for(var r in i.Accessoires)i.Accessoires[r].articleCodex!=e.articleCodex||i.Accessoires[r].noPrice||(i.Accessoires[r].noPrice=!0,this.freeArticlesPlanned[i.Accessoires[r].articleCodex]+=e.quantity)}}},{key:"handleDeleteTakePlaceOnOtherGrids",value:(i=(0,r.Z)(o().mark((function _callee10(e,t,i){var r,s,n,l,a,c,d;return o().wrap((function _callee10$(o){for(;;)switch(o.prev=o.next){case 0:if(i.shelfHeight){o.next=2;break}return o.abrupt("return");case 2:if(i.shelfHeightAbove)for(r=0;r<i.shelfHeightAbove;r++)(null==(n=this.grids[e].Cells[t+i.shelfHeight+r])||null===(s=n.Article)||void 0===s?void 0:s.basketId)===i.basketId&&n.ClearInUse();if(i.shelfHeightBelow)for(l=0;l<i.shelfHeightBelow;l++)(null==(c=this.grids[e].Cells[t-(l+1)])||null===(a=c.Article)||void 0===a?void 0:a.basketId)===i.basketId&&c.ClearInUse();if(!this.doesTakePlaceOnOtherGrids(i)){o.next=14;break}d=0;case 6:if(!(d<this.grids.length)){o.next=14;break}if(d!==e){o.next=9;break}return o.abrupt("continue",11);case 9:return o.next=11,this.grids[d].deleteAccessoireInCells(t);case 11:d++,o.next=6;break;case 14:case"end":return o.stop()}}),_callee10,this)}))),function handleDeleteTakePlaceOnOtherGrids(e,t,r){return i.apply(this,arguments)})},{key:"addAccessoireInCellInGrid",value:(t=(0,r.Z)(o().mark((function _callee11(e,t,i,r,s){var n,l,a;return o().wrap((function _callee11$(c){for(;;)switch(c.prev=c.next){case 0:n=this.doesTakePlaceOnOtherGrids(e)?this.activeGrids:[this.grids[t]],l=0;case 2:if(!(l<n.length)){c.next=13;break}if(!(a=n[l]).DisabledByRule){c.next=7;break}return this.logShelfDebug({phase:"placement",action:"placementSkippedGridDisabled",gridIndex:a.ShelfIndex,cellIndex:i,articleCodex:e.articleCodex}),c.abrupt("continue",10);case 7:return this.logShelfDebug({phase:"placement",action:"accessoryPlaced",gridIndex:a.ShelfIndex,cellIndex:i,articleCodex:e.articleCodex,articleName:e.name,detail:r+(a.ShelfIndex!==t?" (placeholder via TakePlaceOnOtherGrids)":"")}),c.next=10,n[l].addAccessoireInCells(i,e,r,a.ShelfIndex!==t||(null==s?void 0:s.noMove),a.ShelfIndex!==t||(null==s?void 0:s.noDelete),a.ShelfIndex!==t||void 0);case 10:l++,c.next=2;break;case 13:this.checkForFreeAccessoire(e);case 14:case"end":return c.stop()}}),_callee11,this)}))),function addAccessoireInCellInGrid(e,i,r,s,n){return t.apply(this,arguments)})},{key:"checkForFreeAccessoire",value:function checkForFreeAccessoire(e){void 0!==this.freeArticlesPossible[e.articleCodex]&&(void 0===this.freeArticlesPlanned[e.articleCodex]||this.freeArticlesPossible[e.articleCodex]>this.freeArticlesPlanned[e.articleCodex])&&(e.noPrice=!0,void 0===this.freeArticlesPlanned[e.articleCodex]&&(this.freeArticlesPlanned[e.articleCodex]=0),this.freeArticlesPlanned[e.articleCodex]+=e.quantity)}},{key:"doesTakePlaceOnOtherGrids",value:function doesTakePlaceOnOtherGrids(e){var t,i=null===(t=e.shelfPlanner)||void 0===t?void 0:t.takePlaceOnOtherGrids;if(i)for(var r=0;r<i.length;r++)if(i[r].onParent==this.article.articleCodex)return!0;return!1}},{key:"accessoires",get:function get(){for(var e={},t=this.activeGrids,i=0;i<t.length;i++)for(var r in t[i].Accessoires)e[r]=t[i].Accessoires[r];return Object.keys(e).length>0?e:void 0}},{key:"DisableCellsByElement",get:function get(){return this.disableCellsByElement}},{key:"getActAccessoireOfGrid",value:function getActAccessoireOfGrid(e){return this.grids[e].ActAccessoire}},{key:"setActAccessoireOfGrid",value:function setActAccessoireOfGrid(e,t){for(var i=!1,r=this.GridsOrGroupById(e),s=0;s<r.length;s++){var n=r[s];t&&n.getArticleRelationsById(e).includes(t)?n.ActAccessoire!==t&&(n.ActAccessoire=t,i=!0):n.ActAccessoire=void 0}return i}},{key:"generateShelfPlandata",value:function generateShelfPlandata(){for(var e,t=[],i=this.grids.filter((function(e){return!e.DisabledByRule||e.Cells.some((function(e){return e.InUse===e.Index&&e.Article}))})),r=0;r<i.length;r++){for(var s=[],n=i[r],l=0;l<n.Cells.length;l++){var a,c,o=n.Cells[l];if(s.push({inUse:o.InUse,noDelete:o.NoDelete,noMove:o.NoMove,onBoard:o.OnBoard}),n.ShelfIndex!=r&&(s[l].gridIndex=n.ShelfIndex),o.InUse==l)s[l].usedArticleData={Codex:null===(a=o.Article)||void 0===a?void 0:a.articleCodex,BasketID:null===(c=o.Article)||void 0===c?void 0:c.basketId}}t.push(s)}return{ShelfPlanner2:t,DoorPlannerData:null===(e=this.article.doorPlanner)||void 0===e?void 0:e.getMovedData(this.article.basketId)}}},{key:"getShelfPlannerAccessoires3DValues",value:function getShelfPlannerAccessoires3DValues(e){for(var t=this.activeGrids,i=0;i<t.length;i++)for(var r=t[i],s=0;s<r.Cells.length;s++){var n=r.Cells[s];if(n.InUse==s&&n.Article&&n.Article.model3DName&&!n.OnlyPlaceHolder){var l,a=n.Index;"vertikal"==r.Direction&&1!=this.article.CatalogData.useShelfPlannerRTV&&(a=r.Cells.length-1-n.Index),e.push({basketId:null===(l=n.Article)||void 0===l?void 0:l.basketId,gridId:r.ShelfIndex,gridName:r.GridName,model:n.Article.model3DName,parentBasketId:this.article.basketId,parentElementId:this.getShelfElementId(),rh:a}),n.Article.shelfPlanner&&(e=e.concat(n.Article.shelfPlanner.getShelfPlannerAccessoires3DValues([])))}}return e}},{key:"getShelfElementId",value:function getShelfElementId(){var e;if(null!==(e=this.article.accessoireParentArticle)&&void 0!==e&&e.shelfPlanner&&void 0!==this.article.relatedToShelfGrid&&this.grids.length>0){var t=this.getRHOnParentArticle();return this.article.accessoireParentArticle.shelfPlanner.getShelfElementId()+"."+this.article.relatedToShelfGrid+"."+t}return this.article.elementId.toString()}},{key:"getRHOnParentArticle",value:function getRHOnParentArticle(){var e,t=this;if(void 0!==this.article.relatedToShelfGrid)return null===(e=this.article.accessoireParentArticle)||void 0===e||null===(e=e.shelfPlanner)||void 0===e||null===(e=e.grids[this.article.relatedToShelfGrid].Cells.find((function(e){var i;return(null===(i=e.Article)||void 0===i?void 0:i.basketId)==t.article.basketId})))||void 0===e?void 0:e.InUse}},{key:"getShelfPlannerItems",value:function getShelfPlannerItems(e){for(var t=[],i=this.article.CatalogData,r=this.GridsOrGroupById(e),s=0;s<r.length;s++){var n=r[s].getArticleRelationsById(e);if(null!=n&&n.length)for(var l=function _loop(){var e=n[a];if(i.checkIfArticleCodexExists(e)){var r=i.getCatalogArticleByArticleCodex(e);if(!r||t.find((function(e){return e.articleCodex===r.articleCodex})))return 1;t.push({articleCodex:r.articleCodex,configStepKeys:[],image:r.image?i.getCatImageURL(r.image,""):void 0,name:r.name,longDescription:r.longDescription,price:i.dontShowBasePrice?0:Number(r.articlePrice),width:r.width,height:r.height,depth:r.depth,cellSize:r.shelfHeight,metaData:r.metaDataView,accessoireFamily:r.accessoireFamily,contentItemId:r.contentItemId,groupContentItemId:r.groupContentItemId,partlistcodexes:r.possiblePartlistCodexes})}},a=0;a<n.length;a++)l()}return{accessoires:t,grids:r}}},{key:"getShelfParentShelfId",value:function getShelfParentShelfId(){var e;if(void 0!==this.article.relatedToShelfGrid)return null===(e=this.article.accessoireParentArticle)||void 0===e||null===(e=e.shelfPlanner)||void 0===e||null===(e=e.grids[this.article.relatedToShelfGrid])||void 0===e?void 0:e.ShelfId}},{key:"updateOnDockingChanged",value:function updateOnDockingChanged(e){("AVL"==e&&"RH_OVER_AVL"==this.disableCellsByElement||"AVR"==e&&"RH_OVER_AVR"==this.disableCellsByElement)&&this.updateDisabledCells()}},{key:"updateDisabledCells",value:function updateDisabledCells(){this.updateDisabledCellsOnDockedElements(),this.checkOnDockedHeight()}},{key:"updateDisabledCellsOnDockedElements",value:function updateDisabledCellsOnDockedElements(){var e,t=this.activeGrids,i=this.article.dockedOnAV("L"),r=this.article.dockedOnAV("R");if("RH_OVER_AVR"==this.disableCellsByElement&&i)null===(e=i.shelfPlanner)||void 0===e||e.disableCellsByDockedShelfs(t[0].getCellCount("AVL"));else if("RH_OVER_AVL"==this.disableCellsByElement&&r){var s;null===(s=r.shelfPlanner)||void 0===s||s.disableCellsByDockedShelfs(t[0].getCellCount("AVR"))}}},{key:"checkOnDockedHeight",value:function checkOnDockedHeight(){var e=this.article.dockedOnAV("R"),t=this.article.dockedOnAV("L");null!=e&&e.shelfPlanner&&e.shelfPlanner.activeGrids.length>0&&"RH_OVER_AVR"==this.disableCellsByElement?this.disableCellsByDockedShelfs(e.shelfPlanner.activeGrids[0].getCellCount("AVL")):null!=t&&t.shelfPlanner&&t.shelfPlanner.activeGrids.length>0&&"RH_OVER_AVL"==this.disableCellsByElement?this.disableCellsByDockedShelfs(t.shelfPlanner.activeGrids[0].getCellCount("AVR")):this.disableCellsByDockedShelfs()}},{key:"disableCellsByDockedShelfs",value:(e=(0,r.Z)(o().mark((function _callee12(e){var t,i,r,s=this;return o().wrap((function _callee12$(n){for(;;)switch(n.prev=n.next){case 0:t=this.activeGrids,i=o().mark((function _loop2(){var i,n,l,a,c,d,u,f,g,v;return o().wrap((function _loop2$(o){for(;;)switch(o.prev=o.next){case 0:for(i=t[r],n=i.getCellCount(),l=i.getDisabledCellsByRule(),c=a=null==e||e>n?n:e;c<i.Cells.length;c++)l.push(c);d=l.filter((function(e){return i.Cells[e]&&!i.Cells[e].IsDisabled})),u=i.Cells.filter((function(e,t){return e.IsDisabled&&!l.includes(t)})).length,(d.length||u)&&s.logShelfDebug({phase:"docking",action:"disabledCellsUpdated",gridIndex:i.ShelfIndex,detail:"newlyDisabled=[".concat(d.slice(0,30).join(","),"] reEnabled=").concat(u," ")+"(sources: DisableCellsByRules/measures=".concat(i.getDisabledCellsByRule().length,", beyond cellCount/docking cap=").concat(i.Cells.length-a,"); ")+"an occupied cell that gets disabled deletes its accessory"}),f=0;case 9:if(!(f<l.length)){o.next=18;break}if((g=i.Cells[l[f]]).InUse!=l[f]){o.next=14;break}return o.next=14,h.Z.deleteAccessorieOnShelfPlanner(s.article.set,i.ShelfIndex,g.InUse,i.basketId);case 14:g.IsDisabled=!0;case 15:f++,o.next=9;break;case 18:v=0;case 19:if(!(v<i.Cells.length)){o.next=26;break}if(!l.includes(v)){o.next=22;break}return o.abrupt("continue",23);case 22:i.Cells[v].IsDisabled=!1;case 23:v++,o.next=19;break;case 26:case"end":return o.stop()}}),_loop2)})),r=0;case 3:if(!(r<t.length)){n.next=8;break}return n.delegateYield(i(),"t0",5);case 5:r++,n.next=3;break;case 8:case"end":return n.stop()}}),_callee12,this)}))),function disableCellsByDockedShelfs(t){return e.apply(this,arguments)})},{key:"getGridByGridName",value:function getGridByGridName(e){return this.grids.find((function(t){return t.GridName==e}))}},{key:"getGridByIndex",value:function getGridByIndex(e){return this.grids.find((function(t){return t.ShelfIndex==e}))}},{key:"GridsOrGroupById",value:function GridsOrGroupById(e){return this.activeGrids.filter((function(t){return t.ShelfId==e||t.group==e||t.alternativeGridGroups.includes(e)}))}},{key:"getSelectedAccessoireById",value:function getSelectedAccessoireById(e){var t;return null===(t=this.GridsOrGroupById(e).find((function(t){if(t.ActAccessoire&&t.getArticleRelationsById(e).includes(t.ActAccessoire))return t})))||void 0===t?void 0:t.ActAccessoire}},{key:"getCellIndexOfBasketId",value:function getCellIndexOfBasketId(e,t){var i;return null===(i=this.getGridByIndex(e))||void 0===i?void 0:i.getIndexOfBasketId(t)}},{key:"allGrids",get:function get(){return this.grids}},{key:"activeGrids",get:function get(){return this.grids.filter((function(e){return!e.DisabledByRule}))}},{key:"allMontageOptions",get:function get(){return this.montageOptions}},{key:"getRelatedToGridIdByArticleCodex",value:function getRelatedToGridIdByArticleCodex(e,t){var i=this.grids[t].getGridIdByArticleCodex(e);if(i)return i;for(var r=0;r<this.grids.length;r++){var s=this.grids[r].getGridIdByArticleCodex(e);if(s)return s}}}]);var e,t,i,c,v,b,k,A,p,x,y,C}()}}]);
|
|
2
|
+
"use strict";(self.webpackChunkCrystaldesignDivaWebPlannerReact=self.webpackChunkCrystaldesignDivaWebPlannerReact||[]).push([[3596],{33596:(e,t,i)=>{i.r(t),i.d(t,{default:()=>v});var r=i(84658),s=i(12952),n=i(13125),l=i(43860),a=i(80248),c=i(50747),o=i.n(c),d=i(69369),h=i(37609),u=i(35215),f=i(69821);function ownKeys(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,r)}return i}var g=d.ZP.initLog("Planner","WEB-PLANNER-LOGIC"),v=function(){return(0,l.Z)((function ShelfPlanner(e,t){if((0,n.Z)(this,ShelfPlanner),(0,a.Z)(this,"article",void 0),(0,a.Z)(this,"grids",[]),(0,a.Z)(this,"isVisible",void 0),(0,a.Z)(this,"showOnRule",void 0),(0,a.Z)(this,"showAfterOPT",void 0),(0,a.Z)(this,"data",void 0),(0,a.Z)(this,"freeArticlesPossible",{}),(0,a.Z)(this,"freeArticlesPlanned",{}),(0,a.Z)(this,"gridAllowedOnCells",void 0),(0,a.Z)(this,"gridAllowedOntoArticles",void 0),(0,a.Z)(this,"takePlaceOnOtherGrids",void 0),(0,a.Z)(this,"disableCellsByElement",void 0),(0,a.Z)(this,"montageOptions",[]),(0,a.Z)(this,"restorePending",void 0),(0,a.Z)(this,"stashedAccessoires",{}),(0,a.Z)(this,"shelfDebugStack",[]),(0,a.Z)(this,"shelfDebugSeq",0),this.article=t,this.restorePending=!!t.shelfPlanData,this.disableCellsByElement=e.DisableCells,this.data=e,this.showAfterOPT=e.ShowAfterOPT,this.showOnRule=e.ShowOnRule?d.ZP.getRuleByFormula(e.ShowOnRule,t.catalogCodex,t.CatalogData.multiselectOptions):void 0,this.gridAllowedOnCells=e.GridAllowedOnCells,this.gridAllowedOntoArticles=e.GridAllowedOntoArticles,this.takePlaceOnOtherGrids=e.TakePlaceOnOtherGrids,this.initFreeArticles(),e.ShelfPlanner&&e.ShelfPlanner.length>0){for(var i=0;i<e.ShelfPlanner.length;i++)this.creatNewGrid(i),this.updateDisabledCells();this.montageOptions=(0,s.Z)(new Set(this.grids.reduce((function(e,t){return e=e.concat(t.montageOptionsList)}),[])))}}),[{key:"logShelfDebug",value:function logShelfDebug(e){this.shelfDebugStack.push(function _objectSpread(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(i),!0).forEach((function(t){(0,a.Z)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({seq:this.shelfDebugSeq++},e)),this.shelfDebugStack.length>500&&this.shelfDebugStack.splice(0,this.shelfDebugStack.length-500)}},{key:"initFreeArticles",value:function initFreeArticles(){if(this.data.ShelfPlanner)for(var e=0;e<this.data.ShelfPlanner.length;e++){var t=this.data.ShelfPlanner[e];if(t.initAccArr)for(var i=0;i<t.initAccArr.length;i++){var r=t.initAccArr[i];r.noPrice&&(void 0===this.freeArticlesPossible[r.Codex]&&(this.freeArticlesPossible[r.Codex]=0),this.freeArticlesPossible[r.Codex]+=r.Quantity)}}}},{key:"IsVisible",get:function get(){return this.isVisible}},{key:"RestorePending",get:function get(){return this.restorePending},set:function set(e){this.restorePending=e}},{key:"setIsVisible",value:(C=(0,r.Z)(o().mark((function _callee(e){return o().wrap((function _callee$(t){for(;;)switch(t.prev=t.next){case 0:if(this.isVisible==e){t.next=13;break}if(this.logShelfDebug({phase:"visibility",action:e?"plannerShown":"plannerHidden",detail:e?void 0:"showOnRule/visibility turned false — all placed accessories are deleted"}),!e){t.next=11;break}if(this.isVisible=e,this.article.shelfPlanData){t.next=9;break}return t.next=7,this.onConfigChanged({});case 7:return t.next=9,this.initAccList();case 9:t.next=13;break;case 11:return t.next=13,this.deleteAllAcc();case 13:this.isVisible=e;case 14:case"end":return t.stop()}}),_callee,this)}))),function setIsVisible(e){return C.apply(this,arguments)})},{key:"onConfigChanged",value:(y=(0,r.Z)(o().mark((function _callee2(e){var t,i,r,s,n,l,a,c,d,h,u,f;return o().wrap((function _callee2$(o){for(;;)switch(o.prev=o.next){case 0:for(t=!1,i=[],r=0;r<this.grids.length;r++)i.push(this.grids[r].onConfigChanged());s=0;case 4:if(!(s<i.length)){o.next=13;break}if(i[s].length){o.next=7;break}return o.abrupt("continue",10);case 7:n=this.grids[s],i[s].includes("disableGridRule")&&this.logShelfDebug({phase:"configChanged",action:n.DisabledByRule?"gridDisabledByRule":"gridEnabledByRule",gridIndex:n.ShelfIndex,detail:n.ShowOnRule}),i[s].includes("heightGridRule")&&this.logShelfDebug({phase:"configChanged",action:"gridRecreated",gridIndex:n.ShelfIndex,detail:"HeightGridCellCountOnRule match changed — grid rebuilt (cell count / placeable accessories can change), its accessories are deleted"});case 10:s++,o.next=4;break;case 13:l=0;case 14:if(!(l<i.length)){o.next=23;break}if(i[l].length){o.next=17;break}return o.abrupt("continue",20);case 17:return this.stashAccessoiresOfGrid(l),o.next=20,this.grids[l].deleteAllAccOfGrid();case 20:l++,o.next=14;break;case 23:a=0;case 24:if(!(a<i.length)){o.next=40;break}if(i[a].length){o.next=27;break}return o.abrupt("continue",37);case 27:if(i[a].includes("heightGridRule")&&(this.creatNewGrid(a),t=!0),c=this.grids[a],!i[a].includes("heightGridRule")&&!i[a].includes("disableGridRule")||c.DisabledByRule){o.next=37;break}if(!this.restorePending){o.next=32;break}return o.abrupt("continue",37);case 32:return o.next=34,this.placeStashedAccessoiresOfGrid(a);case 34:if(o.sent){o.next=37;break}return o.next=37,this.initAccList(a);case 37:a++,o.next=24;break;case 40:if(t||!Object.keys(e).length){o.next=51;break}d=this.activeGrids,h=0;case 43:if(!(h<d.length)){o.next=51;break}if(f=d[h],!(null!==(u=f.DisableCellsByMeasures)&&void 0!==u&&u.options.find((function(t){return Object.keys(e).includes("OPT"+t.opt)}))||f.disableCellsByRules)){o.next=48;break}return t=!0,o.abrupt("break",51);case 48:h++,o.next=43;break;case 51:t&&this.updateDisabledCells();case 52:case"end":return o.stop()}}),_callee2,this)}))),function onConfigChanged(e){return y.apply(this,arguments)})},{key:"creatNewGrid",value:function creatNewGrid(e){this.grids[e]=new u.Z(e,this.article,this.data),this.grids[e].onConfigChanged()}},{key:"stashAccessoiresOfGrid",value:function stashAccessoiresOfGrid(e){var t=this.collectAccessoiresToStash(this.grids[e]);t.length&&(this.stashedAccessoires[e]=t)}},{key:"collectAccessoiresToStash",value:function collectAccessoiresToStash(e){for(var t=[],i=0;i<e.Cells.length;i++){var r=e.Cells[i],s=r.Article;if(r.InUse===i&&s){for(var n={},l=s.shelfPlanner,a=0;a<(null!==(c=null==l?void 0:l.grids.length)&&void 0!==c?c:0);a++){var c,o=l.grids[a],d=l.collectAccessoiresToStash(o);d.length&&(n[o.ShelfIndex]=d)}t.push({articleCodex:s.articleCodex,cellIndex:i,noMove:r.NoMove,noDelete:r.NoDelete,quantity:s.quantity,variantValues:s.VariantValues,accessoires:n})}}return t}},{key:"placeStashedAccessoiresOfGrid",value:(x=(0,r.Z)(o().mark((function _callee3(e){var t;return o().wrap((function _callee3$(i){for(;;)switch(i.prev=i.next){case 0:if(null!=(t=this.stashedAccessoires[e])&&t.length){i.next=3;break}return i.abrupt("return",0);case 3:return delete this.stashedAccessoires[e],i.next=6,this.placeStashedAccessoiresInGrid(e,t);case 6:return i.abrupt("return",i.sent);case 7:case"end":return i.stop()}}),_callee3,this)}))),function placeStashedAccessoiresOfGrid(e){return x.apply(this,arguments)})},{key:"placeStashedAccessoiresByGrid",value:(p=(0,r.Z)(o().mark((function _callee4(e){var t,i,r,s;return o().wrap((function _callee4$(n){for(;;)switch(n.prev=n.next){case 0:t=Object.keys(e),i=0;case 2:if(!(i<t.length)){n.next=14;break}return s=Number(t[i]),n.next=6,null===(r=this.getGridByIndex(s))||void 0===r?void 0:r.deleteAllAccOfGrid();case 6:return n.next=8,this.placeStashedAccessoiresInGrid(s,e[s]);case 8:if(n.sent){n.next=11;break}return n.next=11,this.initAccList(s);case 11:i++,n.next=2;break;case 14:case"end":return n.stop()}}),_callee4,this)}))),function placeStashedAccessoiresByGrid(e){return p.apply(this,arguments)})},{key:"placeStashedAccessoiresInGrid",value:(A=(0,r.Z)(o().mark((function _callee5(e,t){var i,r,s,n,l,a,c;return o().wrap((function _callee5$(o){for(;;)switch(o.prev=o.next){case 0:if(i=0,r=this.getGridByIndex(e)){o.next=4;break}return o.abrupt("return",i);case 4:s=0;case 5:if(!(s<t.length)){o.next=28;break}return n=t[s],r.ActAccessoire=n.articleCodex,o.next=10,h.Z.addAccessorieOnShelfPlanner(this.article.set,e,n.cellIndex,this.article.basketId,{noMove:n.noMove,noDelete:n.noDelete,byInit:!0});case 10:if(l=o.sent,r.ActAccessoire=void 0,a=!1===l||void 0===l.index?void 0:l,c=null==a?void 0:a.accessoire,a&&c){o.next=17;break}return g.error(new d.GE("shelfaccessoire of a switched off grid does not fit anymore and gets dropped",{code:"WC_0015",custom:{stashed:n,gridName:r.GridName,result:l,parentPosNr:this.article.posNr,parentArticleCodex:this.article.articleCodex,parentBasketId:this.article.basketId}})),o.abrupt("continue",25);case 17:if(c.quantity=n.quantity,i++,!Object.keys(n.variantValues).length){o.next=22;break}return o.next=22,f.Z.updateCfgValues(c,n.variantValues,{});case 22:if(!c.shelfPlanner){o.next=25;break}return o.next=25,c.shelfPlanner.placeStashedAccessoiresByGrid(n.accessoires);case 25:s++,o.next=5;break;case 28:return o.abrupt("return",i);case 29:case"end":return o.stop()}}),_callee5,this)}))),function placeStashedAccessoiresInGrid(e,t){return A.apply(this,arguments)})},{key:"initAccList",value:(k=(0,r.Z)(o().mark((function _callee6(e){var t,i,r,s,n,l,a,c,d,u,f,g;return o().wrap((function _callee6$(o){for(;;)switch(o.prev=o.next){case 0:t=this.activeGrids,i=0;case 2:if(!(i<t.length)){o.next=37;break}if(r=t[i],void 0===e||r.ShelfIndex===e){o.next=6;break}return o.abrupt("continue",34);case 6:if(r.InitAccArr){o.next=8;break}return o.abrupt("continue",34);case 8:s=0;case 9:if(!(s<r.InitAccArr.length)){o.next=34;break}n=r.InitAccArr[s],l=0;case 12:if(!(l<n.initRH.length)){o.next=31;break}return r.ActAccessoire=n.Codex,this.logShelfDebug({phase:"initAccessories",action:"initAccessoryRequested",gridIndex:r.ShelfIndex,cellIndex:n.initRH[l],articleCodex:n.Codex,detail:"from InitAccArr — a missing matching accessoryPlaced entry right after means the init placement failed"}),o.next=17,h.Z.addAccessorieOnShelfPlanner(this.article.set,r.ShelfIndex,n.initRH[l],r.basketId,{noMove:n.noMove,noDelete:n.noDelete,byInit:!0});case 17:if(!n.replaceFromParent){o.next=27;break}if(!(c=this.getShelfParentShelfId())||null===(a=this.article.accessoireParentArticle)||void 0===a||!a.shelfPlanner){o.next=27;break}if(!((d=this.article.accessoireParentArticle.shelfPlanner.getAccessorireByCodex(c,n.Codex))&&d.length>0)){o.next=27;break}if(f=d[0],void 0===(g=null===(u=f.shelfPlanner)||void 0===u?void 0:u.getRHOnParentArticle())||void 0===f.relatedToShelfGrid){o.next=27;break}return o.next=27,h.Z.deleteAccessorieOnShelfPlanner(this.article.set,f.relatedToShelfGrid,g,this.article.accessoireParentArticle.basketId);case 27:r.ActAccessoire=void 0;case 28:l++,o.next=12;break;case 31:s++,o.next=9;break;case 34:i++,o.next=2;break;case 37:case"end":return o.stop()}}),_callee6,this)}))),function initAccList(e){return k.apply(this,arguments)})},{key:"getAccessorireByCodex",value:function getAccessorireByCodex(e,t){var i=this.grids.find((function(t){return t.ShelfId==e})),r=[];if(i)for(var s in i.Accessoires)i.Accessoires[s].articleCodex==t&&r.push(i.Accessoires[s]);return r}},{key:"triggerVisibility",value:(b=(0,r.Z)(o().mark((function _callee7(e){var t,i,r,s,n,l,a;return o().wrap((function _callee7$(c){for(;;)switch(c.prev=c.next){case 0:t=[],i=[],r=0;case 3:if(!(r<this.grids.length)){c.next=13;break}if((s=this.grids[r]).VisitOption){c.next=7;break}return c.abrupt("continue",10);case 7:if(!i.includes(s.VisitOption)&&!t.includes(s.VisitOption)){c.next=9;break}return c.abrupt("continue",10);case 9:e&&(s.gridGroup==e||s.alternativeGridGroups.includes(e))?(i.push(s.VisitOption),t.includes(s.VisitOption)&&t.splice(t.indexOf(s.VisitOption),1)):t.push(s.VisitOption);case 10:r++,c.next=3;break;case 13:n=0;case 14:if(!(n<[].concat(i,t).length)){c.next=23;break}if(l=[].concat(i,t)[n],!(a=this.article.getArticleOptionState((this.article.CatalogData.isIDMFormat?"":"OPT")+l))){c.next=20;break}return c.next=20,f.Z.updateOption(this.article,a.optionCodex,i.includes(l)?"OPVMIT":"OPVOHNE");case 20:n++,c.next=14;break;case 23:case"end":return c.stop()}}),_callee7,this)}))),function triggerVisibility(e){return b.apply(this,arguments)})},{key:"deleteAllAcc",value:(v=(0,r.Z)(o().mark((function _callee8(){var e;return o().wrap((function _callee8$(t){for(;;)switch(t.prev=t.next){case 0:this.article.shelfPlanData=void 0,this.restorePending=!1,e=0;case 3:if(!(e<this.grids.length)){t.next=9;break}return t.next=6,this.grids[e].deleteAllAccOfGrid();case 6:e++,t.next=3;break;case 9:case"end":return t.stop()}}),_callee8,this)}))),function deleteAllAcc(){return v.apply(this,arguments)})},{key:"GridAllowedOnCells",get:function get(){return this.gridAllowedOnCells}},{key:"GridAllowedOntoArticles",get:function get(){return this.gridAllowedOntoArticles}},{key:"TakePlaceOnOtherGrids",get:function get(){return this.takePlaceOnOtherGrids}},{key:"tryFitOnShelfOfGrid",value:function tryFitOnShelfOfGrid(e,t,i){var r=i.shelfHeight,s=this.grids[e];if(!r||isNaN(r))return alert("Der artikel: "+i.name+" hat keine RH hinterlegt! Der Metatag 'HEIGHTGRIDUSED' ist: "+i.shelfHeight),!1;var n=!1,l=this.doesTakePlaceOnOtherGrids(i)?this.activeGrids:[s];if(s.checkAccessoireInGridRules(i))return{type:"notAllowedByMaxQuantityReached",size:r};for(var a=0;a<l.length;a++)if(!1===(n=l[a].tryFitOnShelf(i,t,i.shelfPlanner))||"doesNotFit"===n.type||n.type.startsWith("notAllowed")||void 0===n.index)return n;return n}},{key:"getFreeSpacesOfAccessoireOfGrids",value:function getFreeSpacesOfAccessoireOfGrids(e,t){for(var i=this.grids,r={},s=0;s<i.length;s++){var n=i[s];n.DisabledByRule||(r[n.GridName]={freeCells:n.getFreeSpacesOfAccessoire(t),idx:s})}return r}},{key:"getPlannedSpacesOfGrids",value:function getPlannedSpacesOfGrids(){for(var e=this.grids,t={},i=0;i<e.length;i++){var r=e[i];r.DisabledByRule||(t[r.GridName]={accessories:r.getPlannedSpaces(),idx:i})}return t}},{key:"deleteAccessoireOfCellInGrid",value:(c=(0,r.Z)(o().mark((function _callee9(e,t){var i,r,s,n,l,a;return o().wrap((function _callee9$(c){for(;;)switch(c.prev=c.next){case 0:if(i=this.grids[e],r=i.Cells[t].InUse,(n=i.Cells.find((function(e){return e.OnBoard==r})))?(s=n.InUse,n.Article):(s=t,l=i.Cells[t].Article),!l){c.next=8;break}return this.checkForNewFreeAccessoire(l,e),c.next=8,this.handleDeleteTakePlaceOnOtherGrids(e,s,l);case 8:return c.next=10,i.deleteAccessoireInCells(s);case 10:return(a=c.sent)&&this.logShelfDebug({phase:"placement",action:"accessoryDeleted",gridIndex:e,cellIndex:s,articleCodex:a.articleCodex,articleName:a.name}),c.abrupt("return",a);case 13:case"end":return c.stop()}}),_callee9,this)}))),function deleteAccessoireOfCellInGrid(e,t){return c.apply(this,arguments)})},{key:"checkForNewFreeAccessoire",value:function checkForNewFreeAccessoire(e,t){if(void 0!==this.freeArticlesPossible[e.articleCodex]&&e.noPrice){this.freeArticlesPlanned[e.articleCodex]-=e.quantity;var i=this.grids[t];for(var r in i.Accessoires)i.Accessoires[r].articleCodex!=e.articleCodex||i.Accessoires[r].noPrice||(i.Accessoires[r].noPrice=!0,this.freeArticlesPlanned[i.Accessoires[r].articleCodex]+=e.quantity)}}},{key:"handleDeleteTakePlaceOnOtherGrids",value:(i=(0,r.Z)(o().mark((function _callee10(e,t,i){var r,s,n,l,a,c,d;return o().wrap((function _callee10$(o){for(;;)switch(o.prev=o.next){case 0:if(i.shelfHeight){o.next=2;break}return o.abrupt("return");case 2:if(i.shelfHeightAbove)for(r=0;r<i.shelfHeightAbove;r++)(null==(n=this.grids[e].Cells[t+i.shelfHeight+r])||null===(s=n.Article)||void 0===s?void 0:s.basketId)===i.basketId&&n.ClearInUse();if(i.shelfHeightBelow)for(l=0;l<i.shelfHeightBelow;l++)(null==(c=this.grids[e].Cells[t-(l+1)])||null===(a=c.Article)||void 0===a?void 0:a.basketId)===i.basketId&&c.ClearInUse();if(!this.doesTakePlaceOnOtherGrids(i)){o.next=14;break}d=0;case 6:if(!(d<this.grids.length)){o.next=14;break}if(d!==e){o.next=9;break}return o.abrupt("continue",11);case 9:return o.next=11,this.grids[d].deleteAccessoireInCells(t);case 11:d++,o.next=6;break;case 14:case"end":return o.stop()}}),_callee10,this)}))),function handleDeleteTakePlaceOnOtherGrids(e,t,r){return i.apply(this,arguments)})},{key:"addAccessoireInCellInGrid",value:(t=(0,r.Z)(o().mark((function _callee11(e,t,i,r,s){var n,l,a;return o().wrap((function _callee11$(c){for(;;)switch(c.prev=c.next){case 0:n=this.doesTakePlaceOnOtherGrids(e)?this.activeGrids:[this.grids[t]],l=0;case 2:if(!(l<n.length)){c.next=13;break}if(!(a=n[l]).DisabledByRule){c.next=7;break}return this.logShelfDebug({phase:"placement",action:"placementSkippedGridDisabled",gridIndex:a.ShelfIndex,cellIndex:i,articleCodex:e.articleCodex}),c.abrupt("continue",10);case 7:return this.logShelfDebug({phase:"placement",action:"accessoryPlaced",gridIndex:a.ShelfIndex,cellIndex:i,articleCodex:e.articleCodex,articleName:e.name,detail:r+(a.ShelfIndex!==t?" (placeholder via TakePlaceOnOtherGrids)":"")}),c.next=10,n[l].addAccessoireInCells(i,e,r,a.ShelfIndex!==t||(null==s?void 0:s.noMove),a.ShelfIndex!==t||(null==s?void 0:s.noDelete),a.ShelfIndex!==t||void 0);case 10:l++,c.next=2;break;case 13:this.checkForFreeAccessoire(e);case 14:case"end":return c.stop()}}),_callee11,this)}))),function addAccessoireInCellInGrid(e,i,r,s,n){return t.apply(this,arguments)})},{key:"checkForFreeAccessoire",value:function checkForFreeAccessoire(e){void 0!==this.freeArticlesPossible[e.articleCodex]&&(void 0===this.freeArticlesPlanned[e.articleCodex]||this.freeArticlesPossible[e.articleCodex]>this.freeArticlesPlanned[e.articleCodex])&&(e.noPrice=!0,void 0===this.freeArticlesPlanned[e.articleCodex]&&(this.freeArticlesPlanned[e.articleCodex]=0),this.freeArticlesPlanned[e.articleCodex]+=e.quantity)}},{key:"doesTakePlaceOnOtherGrids",value:function doesTakePlaceOnOtherGrids(e){var t,i=null===(t=e.shelfPlanner)||void 0===t?void 0:t.takePlaceOnOtherGrids;if(i)for(var r=0;r<i.length;r++)if(i[r].onParent==this.article.articleCodex)return!0;return!1}},{key:"accessoires",get:function get(){for(var e={},t=this.activeGrids,i=0;i<t.length;i++)for(var r in t[i].Accessoires)e[r]=t[i].Accessoires[r];return Object.keys(e).length>0?e:void 0}},{key:"DisableCellsByElement",get:function get(){return this.disableCellsByElement}},{key:"getActAccessoireOfGrid",value:function getActAccessoireOfGrid(e){return this.grids[e].ActAccessoire}},{key:"setActAccessoireOfGrid",value:function setActAccessoireOfGrid(e,t){for(var i=!1,r=this.GridsOrGroupById(e),s=0;s<r.length;s++){var n=r[s];t&&n.getArticleRelationsById(e).includes(t)?n.ActAccessoire!==t&&(n.ActAccessoire=t,i=!0):n.ActAccessoire=void 0}return i}},{key:"generateShelfPlandata",value:function generateShelfPlandata(){for(var e,t=[],i=this.grids.filter((function(e){return!e.DisabledByRule||e.Cells.some((function(e){return e.InUse===e.Index&&e.Article}))})),r=0;r<i.length;r++){for(var s=[],n=i[r],l=0;l<n.Cells.length;l++){var a,c,o=n.Cells[l];if(s.push({inUse:o.InUse,noDelete:o.NoDelete,noMove:o.NoMove,onBoard:o.OnBoard}),n.ShelfIndex!=r&&(s[l].gridIndex=n.ShelfIndex),o.InUse==l)s[l].usedArticleData={Codex:null===(a=o.Article)||void 0===a?void 0:a.articleCodex,BasketID:null===(c=o.Article)||void 0===c?void 0:c.basketId}}t.push(s)}return{ShelfPlanner2:t,DoorPlannerData:null===(e=this.article.doorPlanner)||void 0===e?void 0:e.getMovedData(this.article.basketId)}}},{key:"getShelfPlannerAccessoires3DValues",value:function getShelfPlannerAccessoires3DValues(e){for(var t=this.activeGrids,i=0;i<t.length;i++)for(var r=t[i],s=0;s<r.Cells.length;s++){var n=r.Cells[s];if(n.InUse==s&&n.Article&&n.Article.model3DName&&!n.OnlyPlaceHolder){var l,a=n.Index;"vertikal"==r.Direction&&1!=this.article.CatalogData.useShelfPlannerRTV&&(a=r.Cells.length-1-n.Index),e.push({basketId:null===(l=n.Article)||void 0===l?void 0:l.basketId,gridId:r.ShelfIndex,gridName:r.GridName,model:n.Article.model3DName,parentBasketId:this.article.basketId,parentElementId:this.getShelfElementId(),rh:a}),n.Article.shelfPlanner&&(e=e.concat(n.Article.shelfPlanner.getShelfPlannerAccessoires3DValues([])))}}return e}},{key:"getShelfElementId",value:function getShelfElementId(){var e;if(null!==(e=this.article.accessoireParentArticle)&&void 0!==e&&e.shelfPlanner&&void 0!==this.article.relatedToShelfGrid&&this.grids.length>0){var t=this.getRHOnParentArticle();return this.article.accessoireParentArticle.shelfPlanner.getShelfElementId()+"."+this.article.relatedToShelfGrid+"."+t}return this.article.elementId.toString()}},{key:"getRHOnParentArticle",value:function getRHOnParentArticle(){var e,t=this;if(void 0!==this.article.relatedToShelfGrid)return null===(e=this.article.accessoireParentArticle)||void 0===e||null===(e=e.shelfPlanner)||void 0===e||null===(e=e.grids[this.article.relatedToShelfGrid].Cells.find((function(e){var i;return(null===(i=e.Article)||void 0===i?void 0:i.basketId)==t.article.basketId})))||void 0===e?void 0:e.InUse}},{key:"getShelfPlannerItems",value:function getShelfPlannerItems(e){for(var t=[],i=this.article.CatalogData,r=this.GridsOrGroupById(e),s=0;s<r.length;s++){var n=r[s].getArticleRelationsById(e);if(null!=n&&n.length)for(var l=function _loop(){var e=n[a];if(i.checkIfArticleCodexExists(e)){var r=i.getCatalogArticleByArticleCodex(e);if(!r||t.find((function(e){return e.articleCodex===r.articleCodex})))return 1;t.push({articleCodex:r.articleCodex,configStepKeys:[],image:r.image?i.getCatImageURL(r.image,""):void 0,name:r.name,longDescription:r.longDescription,price:i.dontShowBasePrice?0:Number(r.articlePrice),width:r.width,height:r.height,depth:r.depth,cellSize:r.shelfHeight,metaData:r.metaDataView,accessoireFamily:r.accessoireFamily,contentItemId:r.contentItemId,groupContentItemId:r.groupContentItemId,partlistcodexes:r.possiblePartlistCodexes})}},a=0;a<n.length;a++)l()}return{accessoires:t,grids:r}}},{key:"getShelfParentShelfId",value:function getShelfParentShelfId(){var e;if(void 0!==this.article.relatedToShelfGrid)return null===(e=this.article.accessoireParentArticle)||void 0===e||null===(e=e.shelfPlanner)||void 0===e||null===(e=e.grids[this.article.relatedToShelfGrid])||void 0===e?void 0:e.ShelfId}},{key:"updateOnDockingChanged",value:function updateOnDockingChanged(e){("AVL"==e&&"RH_OVER_AVL"==this.disableCellsByElement||"AVR"==e&&"RH_OVER_AVR"==this.disableCellsByElement)&&this.updateDisabledCells()}},{key:"updateDisabledCells",value:function updateDisabledCells(){this.updateDisabledCellsOnDockedElements(),this.checkOnDockedHeight()}},{key:"updateDisabledCellsOnDockedElements",value:function updateDisabledCellsOnDockedElements(){var e,t=this.activeGrids,i=this.article.dockedOnAV("L"),r=this.article.dockedOnAV("R");if("RH_OVER_AVR"==this.disableCellsByElement&&i)null===(e=i.shelfPlanner)||void 0===e||e.disableCellsByDockedShelfs(t[0].getCellCount("AVL"));else if("RH_OVER_AVL"==this.disableCellsByElement&&r){var s;null===(s=r.shelfPlanner)||void 0===s||s.disableCellsByDockedShelfs(t[0].getCellCount("AVR"))}}},{key:"checkOnDockedHeight",value:function checkOnDockedHeight(){var e=this.article.dockedOnAV("R"),t=this.article.dockedOnAV("L");null!=e&&e.shelfPlanner&&e.shelfPlanner.activeGrids.length>0&&"RH_OVER_AVR"==this.disableCellsByElement?this.disableCellsByDockedShelfs(e.shelfPlanner.activeGrids[0].getCellCount("AVL")):null!=t&&t.shelfPlanner&&t.shelfPlanner.activeGrids.length>0&&"RH_OVER_AVL"==this.disableCellsByElement?this.disableCellsByDockedShelfs(t.shelfPlanner.activeGrids[0].getCellCount("AVR")):this.disableCellsByDockedShelfs()}},{key:"disableCellsByDockedShelfs",value:(e=(0,r.Z)(o().mark((function _callee12(e){var t,i,r,s=this;return o().wrap((function _callee12$(n){for(;;)switch(n.prev=n.next){case 0:t=this.activeGrids,i=o().mark((function _loop2(){var i,n,l,a,c,d,u,f,g,v;return o().wrap((function _loop2$(o){for(;;)switch(o.prev=o.next){case 0:for(i=t[r],n=i.getCellCount(),l=i.getDisabledCellsByRule(),c=a=null==e||e>n?n:e;c<i.Cells.length;c++)l.push(c);d=l.filter((function(e){return i.Cells[e]&&!i.Cells[e].IsDisabled})),u=i.Cells.filter((function(e,t){return e.IsDisabled&&!l.includes(t)})).length,(d.length||u)&&s.logShelfDebug({phase:"docking",action:"disabledCellsUpdated",gridIndex:i.ShelfIndex,detail:"newlyDisabled=[".concat(d.slice(0,30).join(","),"] reEnabled=").concat(u," ")+"(sources: DisableCellsByRules/measures=".concat(i.getDisabledCellsByRule().length,", beyond cellCount/docking cap=").concat(i.Cells.length-a,"); ")+"an occupied cell that gets disabled deletes its accessory"}),f=0;case 9:if(!(f<l.length)){o.next=18;break}if((g=i.Cells[l[f]]).InUse!=l[f]){o.next=14;break}return o.next=14,h.Z.deleteAccessorieOnShelfPlanner(s.article.set,i.ShelfIndex,g.InUse,i.basketId);case 14:g.IsDisabled=!0;case 15:f++,o.next=9;break;case 18:v=0;case 19:if(!(v<i.Cells.length)){o.next=26;break}if(!l.includes(v)){o.next=22;break}return o.abrupt("continue",23);case 22:i.Cells[v].IsDisabled=!1;case 23:v++,o.next=19;break;case 26:case"end":return o.stop()}}),_loop2)})),r=0;case 3:if(!(r<t.length)){n.next=8;break}return n.delegateYield(i(),"t0",5);case 5:r++,n.next=3;break;case 8:case"end":return n.stop()}}),_callee12,this)}))),function disableCellsByDockedShelfs(t){return e.apply(this,arguments)})},{key:"getGridByGridName",value:function getGridByGridName(e){return this.grids.find((function(t){return t.GridName==e}))}},{key:"getGridByIndex",value:function getGridByIndex(e){return this.grids.find((function(t){return t.ShelfIndex==e}))}},{key:"GridsOrGroupById",value:function GridsOrGroupById(e){return this.activeGrids.filter((function(t){return t.ShelfId==e||t.group==e||t.alternativeGridGroups.includes(e)}))}},{key:"getSelectedAccessoireById",value:function getSelectedAccessoireById(e){var t;return null===(t=this.GridsOrGroupById(e).find((function(t){if(t.ActAccessoire&&t.getArticleRelationsById(e).includes(t.ActAccessoire))return t})))||void 0===t?void 0:t.ActAccessoire}},{key:"getCellIndexOfBasketId",value:function getCellIndexOfBasketId(e,t){var i;return null===(i=this.getGridByIndex(e))||void 0===i?void 0:i.getIndexOfBasketId(t)}},{key:"allGrids",get:function get(){return this.grids}},{key:"activeGrids",get:function get(){return this.grids.filter((function(e){return!e.DisabledByRule}))}},{key:"allMontageOptions",get:function get(){return this.montageOptions}},{key:"getRelatedToGridIdByArticleCodex",value:function getRelatedToGridIdByArticleCodex(e,t){var i=this.grids[t].getGridIdByArticleCodex(e);if(i)return i;for(var r=0;r<this.grids.length;r++){var s=this.grids[r].getGridIdByArticleCodex(e);if(s)return s}}}]);var e,t,i,c,v,b,k,A,p,x,y,C}()}}]);
|