@crystaldesign/web-planner-logic 25.13.0-beta.3 → 25.13.0-beta.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/build/cjs/{DivaBoxPlanner-f865ff9c.js → DivaBoxPlanner-91e237e4.js} +217 -82
  2. package/build/cjs/{DivaStandardPlanner-f44f3a03.js → DivaStandardPlanner-72604cbb.js} +2 -2
  3. package/build/cjs/{DoorPlanner-17dc699e.js → DoorPlanner-787eb542.js} +1 -1
  4. package/build/cjs/{Host3DSignalR-3843e7c8.js → Host3DSignalR-c60988bd.js} +1 -1
  5. package/build/cjs/{LiviqueWWSHandler-79580044.js → LiviqueWWSHandler-1602ea8b.js} +1 -1
  6. package/build/cjs/{PfisterWWSHandler-edc45ac1.js → PfisterWWSHandler-88281688.js} +1 -1
  7. package/build/cjs/{PlannerHandler2D-16bf8df8.js → PlannerHandler2D-b191804a.js} +4 -2
  8. package/build/cjs/{SeriousBasketHandler-fd41e561.js → SeriousBasketHandler-d007567f.js} +1 -1
  9. package/build/cjs/{ShelfPlanner-20d69956.js → ShelfPlanner-5a04c5bb.js} +1 -1
  10. package/build/cjs/{StandardWWSHandler-28bf51c2.js → StandardWWSHandler-0e412d7e.js} +1 -1
  11. package/build/cjs/{index-a94c390e.js → index-769e6ea1.js} +1362 -734
  12. package/build/cjs/index.js +1 -1
  13. package/build/esm/{DivaBoxPlanner-68462b01.js → DivaBoxPlanner-8fa3e7cb.js} +217 -82
  14. package/build/esm/{DivaStandardPlanner-42600bb1.js → DivaStandardPlanner-5f4f250c.js} +2 -2
  15. package/build/esm/{DoorPlanner-596bb4c5.js → DoorPlanner-29cecd12.js} +1 -1
  16. package/build/esm/{Host3DSignalR-a339ed56.js → Host3DSignalR-58b88cdd.js} +1 -1
  17. package/build/esm/{LiviqueWWSHandler-92b609cb.js → LiviqueWWSHandler-7e5c31e1.js} +1 -1
  18. package/build/esm/{PfisterWWSHandler-baae60f9.js → PfisterWWSHandler-7824ba47.js} +1 -1
  19. package/build/esm/{PlannerHandler2D-36cd084c.js → PlannerHandler2D-f3c84fe0.js} +4 -2
  20. package/build/esm/{SeriousBasketHandler-b8bc14db.js → SeriousBasketHandler-045677c5.js} +1 -1
  21. package/build/esm/{ShelfPlanner-ed43c290.js → ShelfPlanner-13324461.js} +1 -1
  22. package/build/esm/{StandardWWSHandler-14b103ac.js → StandardWWSHandler-7524973a.js} +1 -1
  23. package/build/esm/{index-d67e1a1c.js → index-b4b999b7.js} +1362 -734
  24. package/build/esm/index.js +1 -1
  25. package/build/types/web-planner-logic/src/index.d.ts +3 -2
  26. package/build/types/web-planner-logic/src/index.d.ts.map +1 -1
  27. package/build/types/web-planner-logic/src/interface/API/AiImageResult.d.ts +50 -0
  28. package/build/types/web-planner-logic/src/interface/API/AiImageResult.d.ts.map +1 -0
  29. package/build/types/web-planner-logic/src/interface/AdditionalModelInfos.d.ts +19 -0
  30. package/build/types/web-planner-logic/src/interface/AdditionalModelInfos.d.ts.map +1 -1
  31. package/build/types/web-planner-logic/src/interface/Articles/AccessoireItemType.d.ts +1 -1
  32. package/build/types/web-planner-logic/src/interface/Articles/AccessoireItemType.d.ts.map +1 -1
  33. package/build/types/web-planner-logic/src/interface/Articles/CatalogArticleDataType.d.ts +6 -15
  34. package/build/types/web-planner-logic/src/interface/Articles/CatalogArticleDataType.d.ts.map +1 -1
  35. package/build/types/web-planner-logic/src/interface/Articles/CatalogPlannerArticleViewDataType.d.ts +1 -1
  36. package/build/types/web-planner-logic/src/interface/Articles/CatalogPlannerArticleViewDataType.d.ts.map +1 -1
  37. package/build/types/web-planner-logic/src/interface/CoreTypes/index.d.ts +6 -0
  38. package/build/types/web-planner-logic/src/interface/CoreTypes/index.d.ts.map +1 -1
  39. package/build/types/web-planner-logic/src/interface/DivaCatalogDataType.d.ts +1 -1
  40. package/build/types/web-planner-logic/src/interface/DivaCatalogDataType.d.ts.map +1 -1
  41. package/build/types/web-planner-logic/src/interface/OptionTypes/ArticleOptionDataTypes.d.ts +6 -0
  42. package/build/types/web-planner-logic/src/interface/OptionTypes/ArticleOptionDataTypes.d.ts.map +1 -1
  43. package/build/types/web-planner-logic/src/interface/OptionTypes/ArticleOptionValueView.d.ts +1 -1
  44. package/build/types/web-planner-logic/src/interface/OptionTypes/ArticleOptionValueView.d.ts.map +1 -1
  45. package/build/types/web-planner-logic/src/interface/OptionTypes/CatalogOptionDataTypes.d.ts +27 -19
  46. package/build/types/web-planner-logic/src/interface/OptionTypes/CatalogOptionDataTypes.d.ts.map +1 -1
  47. package/build/types/web-planner-logic/src/interface/ShelfPlanner/ShelfAccessoiresView.d.ts +1 -1
  48. package/build/types/web-planner-logic/src/interface/ShelfPlanner/ShelfAccessoiresView.d.ts.map +1 -1
  49. package/build/types/web-planner-logic/src/interface/ViewTypes/index.d.ts +16 -0
  50. package/build/types/web-planner-logic/src/interface/ViewTypes/index.d.ts.map +1 -1
  51. package/build/types/web-planner-logic/src/interface/webPlannerParams/WebPlannerParamsType.d.ts +6 -1
  52. package/build/types/web-planner-logic/src/interface/webPlannerParams/WebPlannerParamsType.d.ts.map +1 -1
  53. package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts.map +1 -1
  54. package/build/types/web-planner-logic/src/logic/Article/Engine/IDMArticleEngine.d.ts.map +1 -1
  55. package/build/types/web-planner-logic/src/logic/ConfigTree/DivaConfigTreeHandler.d.ts.map +1 -1
  56. package/build/types/web-planner-logic/src/logic/DivaApiHandler.d.ts +26 -0
  57. package/build/types/web-planner-logic/src/logic/DivaApiHandler.d.ts.map +1 -1
  58. package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts +21 -3
  59. package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts.map +1 -1
  60. package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/BoxPlannerGrid.d.ts +18 -3
  61. package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/BoxPlannerGrid.d.ts.map +1 -1
  62. package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/ConstructionRulesHandler.d.ts +2 -0
  63. package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/ConstructionRulesHandler.d.ts.map +1 -1
  64. package/build/types/web-planner-logic/src/logic/Planner/DivaPlannerHandler.d.ts +2 -1
  65. package/build/types/web-planner-logic/src/logic/Planner/DivaPlannerHandler.d.ts.map +1 -1
  66. package/build/types/web-planner-logic/src/logic/Planner/PlannerUtils/PlannerHandler2D.d.ts.map +1 -1
  67. package/build/types/web-planner-logic/src/logic/Planner/Rendering/DivaMediaServiceHandler.d.ts +10 -0
  68. package/build/types/web-planner-logic/src/logic/Planner/Rendering/DivaMediaServiceHandler.d.ts.map +1 -1
  69. package/build/types/web-planner-logic/src/logic/Planner/Rendering/PlannerHandler3D.d.ts.map +1 -1
  70. package/build/types/web-planner-logic/src/logic/Planner/Rendering/Rendering.d.ts.map +1 -1
  71. package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts +7 -0
  72. package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts.map +1 -1
  73. package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts +5 -2
  74. package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts.map +1 -1
  75. package/build/types/web-planner-logic/src/model/Articles/Article/CatalogArticleData.d.ts +3 -13
  76. package/build/types/web-planner-logic/src/model/Articles/Article/CatalogArticleData.d.ts.map +1 -1
  77. package/build/types/web-planner-logic/src/model/Articles/Article/DivaCatalogArticle.d.ts +3 -3
  78. package/build/types/web-planner-logic/src/model/Articles/Article/DivaCatalogArticle.d.ts.map +1 -1
  79. package/build/types/web-planner-logic/src/model/Articles/Article/IDMCatalogArticle.d.ts +3 -3
  80. package/build/types/web-planner-logic/src/model/Articles/Article/IDMCatalogArticle.d.ts.map +1 -1
  81. package/build/types/web-planner-logic/src/model/Catalog/CatalogData.d.ts +2 -1
  82. package/build/types/web-planner-logic/src/model/Catalog/CatalogData.d.ts.map +1 -1
  83. package/build/types/web-planner-logic/src/model/Catalog/DivaCatalogData.d.ts +6 -1
  84. package/build/types/web-planner-logic/src/model/Catalog/DivaCatalogData.d.ts.map +1 -1
  85. package/build/types/web-planner-logic/src/model/Options/ArticleOptionData.d.ts +2 -1
  86. package/build/types/web-planner-logic/src/model/Options/ArticleOptionData.d.ts.map +1 -1
  87. package/build/types/web-planner-logic/src/model/Options/ArticleOptionValueData.d.ts +3 -9
  88. package/build/types/web-planner-logic/src/model/Options/ArticleOptionValueData.d.ts.map +1 -1
  89. package/build/types/web-planner-logic/src/model/Options/CatalogOptionData.d.ts +6 -3
  90. package/build/types/web-planner-logic/src/model/Options/CatalogOptionData.d.ts.map +1 -1
  91. package/build/types/web-planner-logic/src/model/Options/CatalogOptionValueData.d.ts +6 -4
  92. package/build/types/web-planner-logic/src/model/Options/CatalogOptionValueData.d.ts.map +1 -1
  93. package/build/types/web-planner-logic/src/test/datas/environments/scripts/pfister-prod.d.ts.map +1 -1
  94. package/build/types/web-planner-logic/src/test/datas/environments/scripts/pfister-quality.d.ts.map +1 -1
  95. package/build/types/web-planner-logic/src/test/datas/environments/testing/pfister-dev.d.ts.map +1 -1
  96. package/build/types/web-planner-logic/src/test/datas/environments/testing/retail-dev.d.ts.map +1 -1
  97. package/build/types/web-planner-logic/src/test/datas/environments/testing/retail-test.d.ts.map +1 -1
  98. package/package.json +2 -2
@@ -45,6 +45,8 @@ var _typeof__default = /*#__PURE__*/_interopDefaultLegacy(_typeof);
45
45
  var _excluded = ["type"];
46
46
  function ownKeys$k(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
47
47
  function _objectSpread$k(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$k(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$k(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
48
+ // Import types from AI service
49
+
48
50
  var LOG$p = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
49
51
  var JsonDataCache = /*#__PURE__*/function () {
50
52
  function JsonDataCache() {
@@ -99,6 +101,26 @@ var DivaApiHandler = /*#__PURE__*/function () {
99
101
  }
100
102
  }
101
103
  return _createClass__default["default"](DivaApiHandler, [{
104
+ key: "getAiServiceAuthHeaders",
105
+ value:
106
+ /**
107
+ * Get standardized authentication headers for AI service calls
108
+ */
109
+ function getAiServiceAuthHeaders(leadKey) {
110
+ var headers = {};
111
+ if (this.jwt) headers = {
112
+ Authorization: 'Bearer ' + this.jwt
113
+ };else if (this.apiKey) headers = {
114
+ 'X-API-KEY': this.apiKey
115
+ };
116
+
117
+ // Add lead key header if provided
118
+ if (leadKey) {
119
+ headers['x-lead-key'] = leadKey;
120
+ }
121
+ return headers;
122
+ }
123
+ }, {
102
124
  key: "setJsonDataCache",
103
125
  value: function setJsonDataCache(cache) {
104
126
  this.jsonDataCache = cache;
@@ -122,6 +144,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
122
144
  finalUrl,
123
145
  data,
124
146
  nextSkip,
147
+ _e$response,
125
148
  _args = arguments;
126
149
  return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
127
150
  while (1) switch (_context.prev = _context.next) {
@@ -193,8 +216,21 @@ var DivaApiHandler = /*#__PURE__*/function () {
193
216
  case 37:
194
217
  _context.prev = 37;
195
218
  _context.t5 = _context["catch"](4);
219
+ if (!(axios__default["default"].isAxiosError(_context.t5) && ((_e$response = _context.t5.response) === null || _e$response === void 0 ? void 0 : _e$response.status) === 429)) {
220
+ _context.next = 42;
221
+ break;
222
+ }
223
+ LOG$p.warn('Rate limit exceeded (429) for URL: ' + url, 'DivaApiHandler.fetchData');
224
+ throw new DivaUtils.DivaError('Rate limit exceeded. Please try again later.', {
225
+ code: 'WC_0429',
226
+ custom: {
227
+ url: url,
228
+ status: 429
229
+ }
230
+ });
231
+ case 42:
196
232
  throw Error('fetch failed! ' + url + ' Error: ' + _context.t5);
197
- case 40:
233
+ case 43:
198
234
  case "end":
199
235
  return _context.stop();
200
236
  }
@@ -515,17 +551,23 @@ var DivaApiHandler = /*#__PURE__*/function () {
515
551
  var _this$apiConfig$media, _this$apiConfig7;
516
552
  return (_this$apiConfig$media = (_this$apiConfig7 = this.apiConfig) === null || _this$apiConfig7 === void 0 ? void 0 : _this$apiConfig7.mediaService) !== null && _this$apiConfig$media !== void 0 ? _this$apiConfig$media : '';
517
553
  }
554
+ }, {
555
+ key: "getDivaAiServiceUrl",
556
+ value: function getDivaAiServiceUrl() {
557
+ var _this$apiConfig$aiSer, _this$apiConfig8;
558
+ return (_this$apiConfig$aiSer = (_this$apiConfig8 = this.apiConfig) === null || _this$apiConfig8 === void 0 ? void 0 : _this$apiConfig8.aiService) !== null && _this$apiConfig$aiSer !== void 0 ? _this$apiConfig$aiSer : '';
559
+ }
518
560
  }, {
519
561
  key: "getConstructorServiceUrl",
520
562
  value: function getConstructorServiceUrl() {
521
- var _this$apiConfig$const, _this$apiConfig8;
522
- return (_this$apiConfig$const = (_this$apiConfig8 = this.apiConfig) === null || _this$apiConfig8 === void 0 ? void 0 : _this$apiConfig8.constructorService) !== null && _this$apiConfig$const !== void 0 ? _this$apiConfig$const : '';
563
+ var _this$apiConfig$const, _this$apiConfig9;
564
+ return (_this$apiConfig$const = (_this$apiConfig9 = this.apiConfig) === null || _this$apiConfig9 === void 0 ? void 0 : _this$apiConfig9.constructorService) !== null && _this$apiConfig$const !== void 0 ? _this$apiConfig$const : '';
523
565
  }
524
566
  }, {
525
567
  key: "getDivaBasketServiceUrl",
526
568
  value: function getDivaBasketServiceUrl() {
527
- var _this$apiConfig$baske, _this$apiConfig9;
528
- return (_this$apiConfig$baske = (_this$apiConfig9 = this.apiConfig) === null || _this$apiConfig9 === void 0 ? void 0 : _this$apiConfig9.basketService) !== null && _this$apiConfig$baske !== void 0 ? _this$apiConfig$baske : '';
569
+ var _this$apiConfig$baske, _this$apiConfig10;
570
+ return (_this$apiConfig$baske = (_this$apiConfig10 = this.apiConfig) === null || _this$apiConfig10 === void 0 ? void 0 : _this$apiConfig10.basketService) !== null && _this$apiConfig$baske !== void 0 ? _this$apiConfig$baske : '';
529
571
  }
530
572
  }, {
531
573
  key: "getLoadProductBasketParams",
@@ -536,8 +578,8 @@ var DivaApiHandler = /*#__PURE__*/function () {
536
578
  }, {
537
579
  key: "get3DServerUrl",
538
580
  value: function get3DServerUrl() {
539
- var _this$apiConfig$host, _this$apiConfig10;
540
- return (_this$apiConfig$host = (_this$apiConfig10 = this.apiConfig) === null || _this$apiConfig10 === void 0 ? void 0 : _this$apiConfig10.host3d) !== null && _this$apiConfig$host !== void 0 ? _this$apiConfig$host : '';
581
+ var _this$apiConfig$host, _this$apiConfig11;
582
+ return (_this$apiConfig$host = (_this$apiConfig11 = this.apiConfig) === null || _this$apiConfig11 === void 0 ? void 0 : _this$apiConfig11.host3d) !== null && _this$apiConfig$host !== void 0 ? _this$apiConfig$host : '';
541
583
  }
542
584
  }, {
543
585
  key: "doCheckForProductsPrice",
@@ -605,9 +647,9 @@ var DivaApiHandler = /*#__PURE__*/function () {
605
647
  }, {
606
648
  key: "getBaseUrl",
607
649
  value: function getBaseUrl() {
608
- var _this$apiConfig11, _this$apiConfig12;
609
- var url = (_this$apiConfig11 = this.apiConfig) === null || _this$apiConfig11 === void 0 ? void 0 : _this$apiConfig11.api2["default"];
610
- if (this.getApplicationEnvironment() == 'WEB' && (_this$apiConfig12 = this.apiConfig) !== null && _this$apiConfig12 !== void 0 && _this$apiConfig12.api2.web) {
650
+ var _this$apiConfig12, _this$apiConfig13;
651
+ var url = (_this$apiConfig12 = this.apiConfig) === null || _this$apiConfig12 === void 0 ? void 0 : _this$apiConfig12.api2["default"];
652
+ if (this.getApplicationEnvironment() == 'WEB' && (_this$apiConfig13 = this.apiConfig) !== null && _this$apiConfig13 !== void 0 && _this$apiConfig13.api2.web) {
611
653
  url = this.apiConfig.api2.web;
612
654
  }
613
655
  if (!url) throw new Error('No API2 defined');
@@ -730,41 +772,49 @@ var DivaApiHandler = /*#__PURE__*/function () {
730
772
  while (1) switch (_context5.prev = _context5.next) {
731
773
  case 0:
732
774
  os = _ref.os, accountGuid = _ref.accountGuid, catalogGuid = _ref.catalogGuid;
775
+ if (!os.IsIDMFormat) {
776
+ _context5.next = 3;
777
+ break;
778
+ }
779
+ return _context5.abrupt("return");
780
+ case 3:
733
781
  if (!accountGuid) {
734
- _context5.next = 5;
782
+ _context5.next = 7;
735
783
  break;
736
784
  }
737
- _context5.next = 4;
785
+ _context5.next = 6;
738
786
  return this.getDataCache(this.getApiAccountLogin(accountGuid));
739
- case 4:
787
+ case 6:
740
788
  response = _context5.sent;
741
- case 5:
789
+ case 7:
742
790
  if (!((!response || response.Error) && catalogGuid)) {
743
- _context5.next = 9;
791
+ _context5.next = 11;
744
792
  break;
745
793
  }
746
- _context5.next = 8;
794
+ _context5.next = 10;
747
795
  return this.getDataCache(this.getApiAccountLoginByCatalogGuid(catalogGuid));
748
- case 8:
796
+ case 10:
749
797
  response = _context5.sent;
750
- case 9:
798
+ case 11:
751
799
  if (!response.SessionGUID) {
752
- _context5.next = 14;
800
+ _context5.next = 16;
753
801
  break;
754
802
  }
755
803
  os.AccountSessionGUID = response.SessionGUID;
756
804
  os.AccountGUID = response.AccountGUID;
757
- _context5.next = 16;
805
+ _context5.next = 18;
758
806
  break;
759
- case 14:
760
- if (this.applicationEnvironment == 'SELLER') (_this$actions = this.actions) === null || _this$actions === void 0 || _this$actions.openComponent({
761
- type: 'SELLER',
762
- parameters: {
763
- module: 'Collections'
764
- }
765
- });
766
- throw new Error("account login failed with accountGuid: '" + accountGuid + "' and catalogGuid: '" + catalogGuid + "'");
767
807
  case 16:
808
+ if (this.applicationEnvironment == 'SELLER') {
809
+ (_this$actions = this.actions) === null || _this$actions === void 0 || _this$actions.openComponent({
810
+ type: 'SELLER',
811
+ parameters: {
812
+ module: 'Collections'
813
+ }
814
+ });
815
+ }
816
+ throw new Error("account login failed with accountGuid: '" + accountGuid + "' and catalogGuid: '" + catalogGuid + "'");
817
+ case 18:
768
818
  case "end":
769
819
  return _context5.stop();
770
820
  }
@@ -855,39 +905,39 @@ var DivaApiHandler = /*#__PURE__*/function () {
855
905
  }, {
856
906
  key: "apiUrl",
857
907
  value: function apiUrl(queryString, useWebServiceApi) {
858
- var _this$apiConfig23, _this$apiConfig24, _this$apiConfig25;
908
+ var _this$apiConfig24, _this$apiConfig25, _this$apiConfig26;
859
909
  if (useWebServiceApi == 'catalog') {
860
- var _this$apiConfig13, _this$apiConfig14;
861
- if (!((_this$apiConfig13 = this.apiConfig) !== null && _this$apiConfig13 !== void 0 && _this$apiConfig13.catalogService)) throw new Error('No catalog Service defined');
862
- return ((_this$apiConfig14 = this.apiConfig) === null || _this$apiConfig14 === void 0 ? void 0 : _this$apiConfig14.catalogService) + queryString;
910
+ var _this$apiConfig14, _this$apiConfig15;
911
+ if (!((_this$apiConfig14 = this.apiConfig) !== null && _this$apiConfig14 !== void 0 && _this$apiConfig14.catalogService)) throw new Error('No catalog Service defined');
912
+ return ((_this$apiConfig15 = this.apiConfig) === null || _this$apiConfig15 === void 0 ? void 0 : _this$apiConfig15.catalogService) + queryString;
863
913
  }
864
914
  if (useWebServiceApi == 'basket') {
865
- var _this$apiConfig15, _this$apiConfig16;
866
- if (!((_this$apiConfig15 = this.apiConfig) !== null && _this$apiConfig15 !== void 0 && _this$apiConfig15.basketService)) throw new Error('No basket Service defined');
867
- return ((_this$apiConfig16 = this.apiConfig) === null || _this$apiConfig16 === void 0 ? void 0 : _this$apiConfig16.basketService) + queryString;
915
+ var _this$apiConfig16, _this$apiConfig17;
916
+ if (!((_this$apiConfig16 = this.apiConfig) !== null && _this$apiConfig16 !== void 0 && _this$apiConfig16.basketService)) throw new Error('No basket Service defined');
917
+ return ((_this$apiConfig17 = this.apiConfig) === null || _this$apiConfig17 === void 0 ? void 0 : _this$apiConfig17.basketService) + queryString;
868
918
  }
869
919
  if (useWebServiceApi == 'report') {
870
- var _this$apiConfig17, _this$apiConfig18;
871
- if (!((_this$apiConfig17 = this.apiConfig) !== null && _this$apiConfig17 !== void 0 && _this$apiConfig17.reportService)) throw new Error('No report Service defined');
872
- return ((_this$apiConfig18 = this.apiConfig) === null || _this$apiConfig18 === void 0 ? void 0 : _this$apiConfig18.reportService) + queryString;
920
+ var _this$apiConfig18, _this$apiConfig19;
921
+ if (!((_this$apiConfig18 = this.apiConfig) !== null && _this$apiConfig18 !== void 0 && _this$apiConfig18.reportService)) throw new Error('No report Service defined');
922
+ return ((_this$apiConfig19 = this.apiConfig) === null || _this$apiConfig19 === void 0 ? void 0 : _this$apiConfig19.reportService) + queryString;
873
923
  }
874
924
  if (useWebServiceApi == 'enricher') {
875
- var _this$apiConfig21, _this$apiConfig22;
925
+ var _this$apiConfig22, _this$apiConfig23;
876
926
  if (this.useIDMService) {
877
- var _this$apiConfig19, _this$apiConfig20;
878
- if (!((_this$apiConfig19 = this.apiConfig) !== null && _this$apiConfig19 !== void 0 && _this$apiConfig19.idmService)) throw new Error('No report Service defined');
879
- return ((_this$apiConfig20 = this.apiConfig) === null || _this$apiConfig20 === void 0 ? void 0 : _this$apiConfig20.idmService) + queryString;
927
+ var _this$apiConfig20, _this$apiConfig21;
928
+ if (!((_this$apiConfig20 = this.apiConfig) !== null && _this$apiConfig20 !== void 0 && _this$apiConfig20.idmService)) throw new Error('No report Service defined');
929
+ return ((_this$apiConfig21 = this.apiConfig) === null || _this$apiConfig21 === void 0 ? void 0 : _this$apiConfig21.idmService) + queryString;
880
930
  }
881
- if (!((_this$apiConfig21 = this.apiConfig) !== null && _this$apiConfig21 !== void 0 && _this$apiConfig21.enricherService)) throw new Error('No report Service defined');
882
- return ((_this$apiConfig22 = this.apiConfig) === null || _this$apiConfig22 === void 0 ? void 0 : _this$apiConfig22.enricherService) + queryString;
931
+ if (!((_this$apiConfig22 = this.apiConfig) !== null && _this$apiConfig22 !== void 0 && _this$apiConfig22.enricherService)) throw new Error('No report Service defined');
932
+ return ((_this$apiConfig23 = this.apiConfig) === null || _this$apiConfig23 === void 0 ? void 0 : _this$apiConfig23.enricherService) + queryString;
883
933
  }
884
- var url = (_this$apiConfig23 = this.apiConfig) === null || _this$apiConfig23 === void 0 ? void 0 : _this$apiConfig23.api2["default"];
885
- if (this.getApplicationEnvironment() == 'WEB' && (_this$apiConfig24 = this.apiConfig) !== null && _this$apiConfig24 !== void 0 && _this$apiConfig24.api2.web) {
934
+ var url = (_this$apiConfig24 = this.apiConfig) === null || _this$apiConfig24 === void 0 ? void 0 : _this$apiConfig24.api2["default"];
935
+ if (this.getApplicationEnvironment() == 'WEB' && (_this$apiConfig25 = this.apiConfig) !== null && _this$apiConfig25 !== void 0 && _this$apiConfig25.api2.web) {
886
936
  url = this.apiConfig.api2.web;
887
937
  }
888
- if (this.useEkPrices && (_this$apiConfig25 = this.apiConfig) !== null && _this$apiConfig25 !== void 0 && _this$apiConfig25.api2.ek) {
889
- var _this$apiConfig26;
890
- url = (_this$apiConfig26 = this.apiConfig) === null || _this$apiConfig26 === void 0 ? void 0 : _this$apiConfig26.api2.ek;
938
+ if (this.useEkPrices && (_this$apiConfig26 = this.apiConfig) !== null && _this$apiConfig26 !== void 0 && _this$apiConfig26.api2.ek) {
939
+ var _this$apiConfig27;
940
+ url = (_this$apiConfig27 = this.apiConfig) === null || _this$apiConfig27 === void 0 ? void 0 : _this$apiConfig27.api2.ek;
891
941
  }
892
942
  if (!url) throw new Error('No API2 defined');
893
943
  return url + '?' + queryString;
@@ -1182,12 +1232,151 @@ var DivaApiHandler = /*#__PURE__*/function () {
1182
1232
  return loadArticlePricesQS;
1183
1233
  }()
1184
1234
  }, {
1185
- key: "postHQRenderScript",
1235
+ key: "generateAiImageWithReferenceImages",
1186
1236
  value: function () {
1187
- var _postHQRenderScript = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee9(data) {
1237
+ var _generateAiImageWithReferenceImages = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee9(data, leadKey) {
1188
1238
  var url, headers, res;
1189
1239
  return _regeneratorRuntime__default["default"].wrap(function _callee9$(_context9) {
1190
1240
  while (1) switch (_context9.prev = _context9.next) {
1241
+ case 0:
1242
+ url = this.getDivaAiServiceUrl() + '/generate-image-with-references';
1243
+ headers = this.getAiServiceAuthHeaders(leadKey);
1244
+ _context9.next = 4;
1245
+ return this.fetchData(url, {
1246
+ data: _objectSpread$k(_objectSpread$k({}, data), {}, {
1247
+ organizationId: this.OrganizationId
1248
+ }),
1249
+ config: {
1250
+ headers: headers
1251
+ },
1252
+ method: 'POST'
1253
+ });
1254
+ case 4:
1255
+ res = _context9.sent;
1256
+ return _context9.abrupt("return", res);
1257
+ case 6:
1258
+ case "end":
1259
+ return _context9.stop();
1260
+ }
1261
+ }, _callee9, this);
1262
+ }));
1263
+ function generateAiImageWithReferenceImages(_x24, _x25) {
1264
+ return _generateAiImageWithReferenceImages.apply(this, arguments);
1265
+ }
1266
+ return generateAiImageWithReferenceImages;
1267
+ }()
1268
+ }, {
1269
+ key: "getUsageLimits",
1270
+ value: function () {
1271
+ var _getUsageLimits = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee10(data) {
1272
+ var url, headers, res;
1273
+ return _regeneratorRuntime__default["default"].wrap(function _callee10$(_context10) {
1274
+ while (1) switch (_context10.prev = _context10.next) {
1275
+ case 0:
1276
+ url = this.getDivaAiServiceUrl() + '/usage/limits?organizationId=' + data.organizationId + '&userId=' + data.userId;
1277
+ headers = this.getAiServiceAuthHeaders();
1278
+ _context10.next = 4;
1279
+ return this.fetchData(url, {
1280
+ data: {},
1281
+ config: {
1282
+ headers: headers
1283
+ },
1284
+ method: 'GET'
1285
+ });
1286
+ case 4:
1287
+ res = _context10.sent;
1288
+ return _context10.abrupt("return", res);
1289
+ case 6:
1290
+ case "end":
1291
+ return _context10.stop();
1292
+ }
1293
+ }, _callee10, this);
1294
+ }));
1295
+ function getUsageLimits(_x26) {
1296
+ return _getUsageLimits.apply(this, arguments);
1297
+ }
1298
+ return getUsageLimits;
1299
+ }()
1300
+ }, {
1301
+ key: "getAiRoomRenderings",
1302
+ value: function () {
1303
+ var _getAiRoomRenderings = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee11(organizationId) {
1304
+ var orgParam, url, headers, res;
1305
+ return _regeneratorRuntime__default["default"].wrap(function _callee11$(_context11) {
1306
+ while (1) switch (_context11.prev = _context11.next) {
1307
+ case 0:
1308
+ orgParam = organizationId ? "?organizationId=".concat(organizationId) : '';
1309
+ url = this.getDivaAiServiceUrl() + '/room-renderings' + orgParam; // No authentication headers needed - public endpoint
1310
+ headers = this.getAiServiceAuthHeaders();
1311
+ _context11.next = 5;
1312
+ return this.fetchData(url, {
1313
+ data: {},
1314
+ config: {
1315
+ headers: headers
1316
+ },
1317
+ method: 'GET'
1318
+ });
1319
+ case 5:
1320
+ res = _context11.sent;
1321
+ return _context11.abrupt("return", res);
1322
+ case 7:
1323
+ case "end":
1324
+ return _context11.stop();
1325
+ }
1326
+ }, _callee11, this);
1327
+ }));
1328
+ function getAiRoomRenderings(_x27) {
1329
+ return _getAiRoomRenderings.apply(this, arguments);
1330
+ }
1331
+ return getAiRoomRenderings;
1332
+ }()
1333
+ }, {
1334
+ key: "createLeadKey",
1335
+ value: function () {
1336
+ var _createLeadKey = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee12(email) {
1337
+ var url, headers, res;
1338
+ return _regeneratorRuntime__default["default"].wrap(function _callee12$(_context12) {
1339
+ while (1) switch (_context12.prev = _context12.next) {
1340
+ case 0:
1341
+ url = this.getDivaAiServiceUrl() + '/lead-key';
1342
+ headers = this.getAiServiceAuthHeaders();
1343
+ _context12.prev = 2;
1344
+ _context12.next = 5;
1345
+ return this.fetchData(url, {
1346
+ data: {
1347
+ email: email
1348
+ },
1349
+ config: {
1350
+ headers: headers
1351
+ },
1352
+ method: 'POST'
1353
+ });
1354
+ case 5:
1355
+ res = _context12.sent;
1356
+ return _context12.abrupt("return", res);
1357
+ case 9:
1358
+ _context12.prev = 9;
1359
+ _context12.t0 = _context12["catch"](2);
1360
+ LOG$p.error(new Error("Failed to create lead key for email ".concat(email, ": ").concat((_context12.t0 === null || _context12.t0 === void 0 ? void 0 : _context12.t0.message) || _context12.t0)));
1361
+ throw _context12.t0;
1362
+ case 13:
1363
+ case "end":
1364
+ return _context12.stop();
1365
+ }
1366
+ }, _callee12, this, [[2, 9]]);
1367
+ }));
1368
+ function createLeadKey(_x28) {
1369
+ return _createLeadKey.apply(this, arguments);
1370
+ }
1371
+ return createLeadKey;
1372
+ }()
1373
+ }, {
1374
+ key: "postHQRenderScript",
1375
+ value: function () {
1376
+ var _postHQRenderScript = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee13(data) {
1377
+ var url, headers, res;
1378
+ return _regeneratorRuntime__default["default"].wrap(function _callee13$(_context13) {
1379
+ while (1) switch (_context13.prev = _context13.next) {
1191
1380
  case 0:
1192
1381
  url = this.getDivaMediaServiceUrl() + '/hqrenderscripts';
1193
1382
  headers = {};
@@ -1196,7 +1385,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
1196
1385
  };else if (this.apiKey) headers = {
1197
1386
  'X-API-KEY': this.apiKey
1198
1387
  };
1199
- _context9.next = 5;
1388
+ _context13.next = 5;
1200
1389
  return this.fetchData(url, {
1201
1390
  data: data,
1202
1391
  config: {
@@ -1205,15 +1394,15 @@ var DivaApiHandler = /*#__PURE__*/function () {
1205
1394
  method: 'POST'
1206
1395
  });
1207
1396
  case 5:
1208
- res = _context9.sent;
1209
- return _context9.abrupt("return", res);
1397
+ res = _context13.sent;
1398
+ return _context13.abrupt("return", res);
1210
1399
  case 7:
1211
1400
  case "end":
1212
- return _context9.stop();
1401
+ return _context13.stop();
1213
1402
  }
1214
- }, _callee9, this);
1403
+ }, _callee13, this);
1215
1404
  }));
1216
- function postHQRenderScript(_x24) {
1405
+ function postHQRenderScript(_x29) {
1217
1406
  return _postHQRenderScript.apply(this, arguments);
1218
1407
  }
1219
1408
  return postHQRenderScript;
@@ -1221,10 +1410,10 @@ var DivaApiHandler = /*#__PURE__*/function () {
1221
1410
  }, {
1222
1411
  key: "postPlanningInfo",
1223
1412
  value: function () {
1224
- var _postPlanningInfo = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee10(planningInfo, divaNr, imgUrl, price, name, userId, firstName, lastName, organizationId) {
1413
+ var _postPlanningInfo = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee14(planningInfo, divaNr, imgUrl, price, name, userId, firstName, lastName, organizationId) {
1225
1414
  var data, url, headers;
1226
- return _regeneratorRuntime__default["default"].wrap(function _callee10$(_context10) {
1227
- while (1) switch (_context10.prev = _context10.next) {
1415
+ return _regeneratorRuntime__default["default"].wrap(function _callee14$(_context14) {
1416
+ while (1) switch (_context14.prev = _context14.next) {
1228
1417
  case 0:
1229
1418
  data = {
1230
1419
  info: JSON.stringify(planningInfo),
@@ -1243,8 +1432,8 @@ var DivaApiHandler = /*#__PURE__*/function () {
1243
1432
  };else if (this.apiKey) headers = {
1244
1433
  'X-API-KEY': this.apiKey
1245
1434
  };
1246
- _context10.prev = 4;
1247
- _context10.next = 7;
1435
+ _context14.prev = 4;
1436
+ _context14.next = 7;
1248
1437
  return this.fetchData(url, {
1249
1438
  data: data,
1250
1439
  config: {
@@ -1253,21 +1442,21 @@ var DivaApiHandler = /*#__PURE__*/function () {
1253
1442
  method: 'POST'
1254
1443
  });
1255
1444
  case 7:
1256
- _context10.next = 12;
1445
+ _context14.next = 12;
1257
1446
  break;
1258
1447
  case 9:
1259
- _context10.prev = 9;
1260
- _context10.t0 = _context10["catch"](4);
1448
+ _context14.prev = 9;
1449
+ _context14.t0 = _context14["catch"](4);
1261
1450
  LOG$p.error(new DivaUtils.DivaError('Error Connecting to Support-Service-LivePlanner', {
1262
- cause: _context10.t0
1451
+ cause: _context14.t0
1263
1452
  }));
1264
1453
  case 12:
1265
1454
  case "end":
1266
- return _context10.stop();
1455
+ return _context14.stop();
1267
1456
  }
1268
- }, _callee10, this, [[4, 9]]);
1457
+ }, _callee14, this, [[4, 9]]);
1269
1458
  }));
1270
- function postPlanningInfo(_x25, _x26, _x27, _x28, _x29, _x30, _x31, _x32, _x33) {
1459
+ function postPlanningInfo(_x30, _x31, _x32, _x33, _x34, _x35, _x36, _x37, _x38) {
1271
1460
  return _postPlanningInfo.apply(this, arguments);
1272
1461
  }
1273
1462
  return postPlanningInfo;
@@ -1275,21 +1464,21 @@ var DivaApiHandler = /*#__PURE__*/function () {
1275
1464
  }, {
1276
1465
  key: "getDimensionbyId",
1277
1466
  value: function () {
1278
- var _getDimensionbyId = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee11(id, iln, catalogCodex, plannedOptions) {
1279
- var _this$apiConfig27;
1467
+ var _getDimensionbyId = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee15(id, iln, catalogCodex, plannedOptions) {
1468
+ var _this$apiConfig28;
1280
1469
  var fullUrl, res, headers;
1281
- return _regeneratorRuntime__default["default"].wrap(function _callee11$(_context11) {
1282
- while (1) switch (_context11.prev = _context11.next) {
1470
+ return _regeneratorRuntime__default["default"].wrap(function _callee15$(_context15) {
1471
+ while (1) switch (_context15.prev = _context15.next) {
1283
1472
  case 0:
1284
- fullUrl = this.getConstructorServiceUrl() + '/dimension/' + id + '?iln=' + iln + '&catalogCodex=' + catalogCodex + '&debug=' + ((_this$apiConfig27 = this.apiConfig) === null || _this$apiConfig27 === void 0 ? void 0 : _this$apiConfig27.useDebugUrl);
1473
+ fullUrl = this.getConstructorServiceUrl() + '/dimension/' + id + '?iln=' + iln + '&catalogCodex=' + catalogCodex + '&debug=' + ((_this$apiConfig28 = this.apiConfig) === null || _this$apiConfig28 === void 0 ? void 0 : _this$apiConfig28.useDebugUrl);
1285
1474
  headers = {};
1286
1475
  if (this.jwt) headers = {
1287
1476
  Authorization: 'Bearer ' + this.jwt
1288
1477
  };else if (this.apiKey) headers = {
1289
1478
  'X-API-KEY': this.apiKey
1290
1479
  };
1291
- _context11.prev = 3;
1292
- _context11.next = 6;
1480
+ _context15.prev = 3;
1481
+ _context15.next = 6;
1293
1482
  return this.fetchData(fullUrl, {
1294
1483
  method: 'POST',
1295
1484
  data: {
@@ -1300,23 +1489,23 @@ var DivaApiHandler = /*#__PURE__*/function () {
1300
1489
  }
1301
1490
  });
1302
1491
  case 6:
1303
- res = _context11.sent;
1304
- return _context11.abrupt("return", res);
1492
+ res = _context15.sent;
1493
+ return _context15.abrupt("return", res);
1305
1494
  case 10:
1306
- _context11.prev = 10;
1307
- _context11.t0 = _context11["catch"](3);
1495
+ _context15.prev = 10;
1496
+ _context15.t0 = _context15["catch"](3);
1308
1497
  LOG$p.error({
1309
1498
  message: 'Could not fetch dimension',
1310
1499
  name: 'get dimension error'
1311
1500
  });
1312
- return _context11.abrupt("return", undefined);
1501
+ return _context15.abrupt("return", undefined);
1313
1502
  case 14:
1314
1503
  case "end":
1315
- return _context11.stop();
1504
+ return _context15.stop();
1316
1505
  }
1317
- }, _callee11, this, [[3, 10]]);
1506
+ }, _callee15, this, [[3, 10]]);
1318
1507
  }));
1319
- function getDimensionbyId(_x34, _x35, _x36, _x37) {
1508
+ function getDimensionbyId(_x39, _x40, _x41, _x42) {
1320
1509
  return _getDimensionbyId.apply(this, arguments);
1321
1510
  }
1322
1511
  return getDimensionbyId;
@@ -1324,7 +1513,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
1324
1513
  }, {
1325
1514
  key: "createBasketReport",
1326
1515
  value: function () {
1327
- var _createBasketReport = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee12(basket, _ref2) {
1516
+ var _createBasketReport = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee16(basket, _ref2) {
1328
1517
  var type,
1329
1518
  printOptions,
1330
1519
  savePdf,
@@ -1333,12 +1522,12 @@ var DivaApiHandler = /*#__PURE__*/function () {
1333
1522
  headers,
1334
1523
  result,
1335
1524
  val,
1336
- _args12 = arguments;
1337
- return _regeneratorRuntime__default["default"].wrap(function _callee12$(_context12) {
1338
- while (1) switch (_context12.prev = _context12.next) {
1525
+ _args16 = arguments;
1526
+ return _regeneratorRuntime__default["default"].wrap(function _callee16$(_context16) {
1527
+ while (1) switch (_context16.prev = _context16.next) {
1339
1528
  case 0:
1340
1529
  type = _ref2.type, printOptions = _objectWithoutProperties__default["default"](_ref2, _excluded);
1341
- savePdf = _args12.length > 2 && _args12[2] !== undefined ? _args12[2] : false;
1530
+ savePdf = _args16.length > 2 && _args16[2] !== undefined ? _args16[2] : false;
1342
1531
  data = {
1343
1532
  type: type,
1344
1533
  printOptions: printOptions,
@@ -1351,8 +1540,8 @@ var DivaApiHandler = /*#__PURE__*/function () {
1351
1540
  };else if (this.apiKey) headers = {
1352
1541
  'X-API-KEY': this.apiKey
1353
1542
  };
1354
- _context12.prev = 6;
1355
- _context12.next = 9;
1543
+ _context16.prev = 6;
1544
+ _context16.next = 9;
1356
1545
  return this.fetchData(url, {
1357
1546
  data: data,
1358
1547
  config: {
@@ -1361,7 +1550,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
1361
1550
  method: 'POST'
1362
1551
  });
1363
1552
  case 9:
1364
- result = _context12.sent;
1553
+ result = _context16.sent;
1365
1554
  if (savePdf) {
1366
1555
  val = {};
1367
1556
  val[type] = result.url;
@@ -1380,20 +1569,20 @@ var DivaApiHandler = /*#__PURE__*/function () {
1380
1569
  }
1381
1570
  });
1382
1571
  }
1383
- return _context12.abrupt("return", result.url);
1572
+ return _context16.abrupt("return", result.url);
1384
1573
  case 14:
1385
- _context12.prev = 14;
1386
- _context12.t0 = _context12["catch"](6);
1574
+ _context16.prev = 14;
1575
+ _context16.t0 = _context16["catch"](6);
1387
1576
  LOG$p.error(new DivaUtils.DivaError('Error Connecting to Report Service', {
1388
- cause: _context12.t0
1577
+ cause: _context16.t0
1389
1578
  }));
1390
1579
  case 17:
1391
1580
  case "end":
1392
- return _context12.stop();
1581
+ return _context16.stop();
1393
1582
  }
1394
- }, _callee12, this, [[6, 14]]);
1583
+ }, _callee16, this, [[6, 14]]);
1395
1584
  }));
1396
- function createBasketReport(_x38, _x39) {
1585
+ function createBasketReport(_x43, _x44) {
1397
1586
  return _createBasketReport.apply(this, arguments);
1398
1587
  }
1399
1588
  return createBasketReport;
@@ -1916,112 +2105,11 @@ var CatalogPlannerArticleData = /*#__PURE__*/function () {
1916
2105
  var LOG$o = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
1917
2106
  var OptionCatalogData = /*#__PURE__*/function () {
1918
2107
  function OptionCatalogData(opt, catalogData) {
2108
+ var _this$opt$property;
1919
2109
  _classCallCheck__default["default"](this, OptionCatalogData);
1920
2110
  _defineProperty__default["default"](this, "opt", void 0);
1921
2111
  this.opt = opt;
1922
- for (var i = 0; i < ((_this$opt$property = this.opt.property) === null || _this$opt$property === void 0 ? void 0 : _this$opt$property.length); i++) {
1923
- var _this$opt$property;
1924
- var prop = this.opt.property[i];
1925
- var key = prop.Codex;
1926
- if (key.startsWith(catalogData.catalogCodex + '__')) key = key.replace(catalogData.catalogCodex + '__', '');
1927
- switch (key) {
1928
- case 'INFO_URL':
1929
- this.opt.url = prop.Value;
1930
- break;
1931
- case 'IGNORE_GROUPS':
1932
- this.opt.ignoreGroups = prop.Value == '1';
1933
- break;
1934
- case 'IGNORE_PGR_GROUP_POSITION':
1935
- this.opt.ignorePgrGroupPosition = prop.Value == '1';
1936
- break;
1937
- case 'SHOW_SEARCHBAR':
1938
- this.opt.showSearchbar = prop.Value == '1';
1939
- break;
1940
- case 'SHOW_FILTER':
1941
- this.opt.showFilter = prop.Value == '1';
1942
- break;
1943
- case 'INFO_PDF':
1944
- this.opt.pdfUrl = prop.Value;
1945
- break;
1946
- case 'DIAMETER':
1947
- this.opt.diameter = !!prop.Value;
1948
- break;
1949
- case 'PAIROPTION':
1950
- this.opt.pairWithOptionsToGroup = prop.Value;
1951
- break;
1952
- case 'REQUIRES_USER_INPUT':
1953
- this.opt.requiresUserInput = !!prop.Value;
1954
- break;
1955
- case 'IS_STATE':
1956
- this.opt.isDescribingState = !!prop.Value;
1957
- break;
1958
- case 'CUSTOM_DIMENSION':
1959
- this.opt.customDimension = !!prop.Value;
1960
- break;
1961
- case 'CUSTOM_DIMENSION_TEXT':
1962
- this.opt.customDimensionText = prop.Value;
1963
- break;
1964
- case 'HIDE_OPTION_IN_CONFIGURATOR':
1965
- this.opt.hideOptionInConfigurator = !!prop.Value;
1966
- break;
1967
- case 'MERGE_IDM_TO_OPG':
1968
- this.opt.mergeIDMToOPG = prop.Value;
1969
- break;
1970
- case 'ONLY_VISIBLE_IF_NOT_UNDOCK':
1971
- this.opt.onlyVisibleIfNotDocked = prop.Value;
1972
- break;
1973
- case 'ONLY_VISIBLE_IF_CONFIG_SINGLE':
1974
- this.opt.onlyVisibleIfConfigSingle = prop.Value;
1975
- break;
1976
- case 'ONLY_VISIBLE_IF_CONFIG_ALL':
1977
- this.opt.onlyVisibleIfConfigAll = prop.Value;
1978
- break;
1979
- case 'ISDEFAULTVALUEFOROPTIONS':
1980
- this.opt.isDefaultValueForOptions = prop.Value;
1981
- break;
1982
- case 'FREETEXT_DEFAULT_VALUE':
1983
- this.opt.freetextDefaultValue = prop.Value;
1984
- break;
1985
- case 'SHOW_IN_VARIANTDESC':
1986
- this.opt.forceShowVariantDesc = prop.Value;
1987
- break;
1988
- case 'SHOW_SEPARAT_ON_TABGROUP':
1989
- this.opt.showOnSeparatTabgroup = prop.Value;
1990
- break;
1991
- case 'SETNAME':
1992
- this.opt.setName = prop.Value;
1993
- break;
1994
- case 'ADD_OPT_TO_TABGROUP_IN_PL_SUM':
1995
- this.opt.addOptionToTabgroupInPartlistSummary = prop.Value;
1996
- break;
1997
- case 'ADD_TO_WWS':
1998
- this.opt.addToWWS = prop.Value;
1999
- break;
2000
- case 'DEFAULT_SIBLING_OPTION':
2001
- this.opt.isDefaultSiblingOption = prop.Value;
2002
- break;
2003
- case 'CONTENT_ITEM':
2004
- this.opt.contentItemId = prop.Value;
2005
- break;
2006
- case 'SendToPim':
2007
- this.opt.sendToPIM = prop.Value == '1';
2008
- break;
2009
- case 'Multiselect':
2010
- this.opt.isMultiselect = prop.Value == '1';
2011
- break;
2012
- case 'ION_COMMENT_TEXT':
2013
- case 'SHOW_IN_BASKET_WHEN_HAS_PRICE':
2014
- case 'FEATURE_TYPE':
2015
- case 'EshopCategoryMapping':
2016
- case 'EshopSearchRelevant':
2017
- case 'IsSalesText':
2018
- case 'IsArtName':
2019
- break;
2020
- default:
2021
- LOG$o.debug('implement mapping for these props for options: ' + prop.Codex);
2022
- break;
2023
- }
2024
- }
2112
+ setOptionsProperties(catalogData, this.opt.propertyObj, (_this$opt$property = this.opt.property) !== null && _this$opt$property !== void 0 ? _this$opt$property : []);
2025
2113
  }
2026
2114
 
2027
2115
  /**************************************************GETTER ***************************************************/
@@ -2105,10 +2193,15 @@ var OptionCatalogData = /*#__PURE__*/function () {
2105
2193
  get: function get() {
2106
2194
  return this.opt.articlePlaceholder;
2107
2195
  }
2196
+ }, {
2197
+ key: "isMultiselect",
2198
+ get: function get() {
2199
+ return this.opt.isMultiselect;
2200
+ }
2108
2201
  }, {
2109
2202
  key: "isDefaultSiblingOption",
2110
2203
  get: function get() {
2111
- return this.opt.isDefaultSiblingOption;
2204
+ return this.opt.propertyObj.isDefaultSiblingOption;
2112
2205
  }
2113
2206
  }, {
2114
2207
  key: "layout",
@@ -2119,90 +2212,90 @@ var OptionCatalogData = /*#__PURE__*/function () {
2119
2212
  this.opt.layout = layout;
2120
2213
  }
2121
2214
  }, {
2122
- key: "pairWithOptionsToGroup",
2215
+ key: "measureKey",
2123
2216
  get: function get() {
2124
- return this.opt.pairWithOptionsToGroup;
2217
+ return this.opt.measureKey;
2125
2218
  }
2126
2219
  }, {
2127
- key: "isDescribingState",
2220
+ key: "pairWithOptionsToGroup",
2128
2221
  get: function get() {
2129
- return this.opt.isDescribingState;
2222
+ return this.opt.propertyObj.pairWithOptionsToGroup;
2130
2223
  }
2131
2224
  }, {
2132
- key: "requiresUserInput",
2225
+ key: "isDescribingState",
2133
2226
  get: function get() {
2134
- return this.opt.requiresUserInput;
2227
+ return this.opt.propertyObj.isDescribingState;
2135
2228
  }
2136
2229
  }, {
2137
- key: "isMultiselect",
2230
+ key: "requiresUserInput",
2138
2231
  get: function get() {
2139
- return this.opt.isMultiselect;
2232
+ return this.opt.propertyObj.requiresUserInput;
2140
2233
  }
2141
2234
  }, {
2142
2235
  key: "hideOptionInConfigurator",
2143
2236
  get: function get() {
2144
- return this.opt.hideOptionInConfigurator;
2237
+ return this.opt.propertyObj.hideOptionInConfigurator;
2145
2238
  }
2146
2239
  }, {
2147
2240
  key: "mergeIDMToOPG",
2148
2241
  get: function get() {
2149
- return this.opt.mergeIDMToOPG;
2242
+ return this.opt.propertyObj.mergeIDMToOPG;
2150
2243
  }
2151
2244
  }, {
2152
2245
  key: "onlyVisibleIfNotDocked",
2153
2246
  get: function get() {
2154
2247
  // deprecated: was used for Bail amalfi accessoires
2155
- return this.opt.onlyVisibleIfNotDocked;
2248
+ return this.opt.propertyObj.onlyVisibleIfNotDocked;
2156
2249
  }
2157
2250
  }, {
2158
2251
  key: "onlyVisibleIfConfigSingle",
2159
2252
  get: function get() {
2160
- return this.opt.onlyVisibleIfConfigSingle;
2253
+ return this.opt.propertyObj.onlyVisibleIfConfigSingle;
2161
2254
  }
2162
2255
  }, {
2163
2256
  key: "onlyVisibleIfConfigAll",
2164
2257
  get: function get() {
2165
- return this.opt.onlyVisibleIfConfigAll;
2258
+ return this.opt.propertyObj.onlyVisibleIfConfigAll;
2166
2259
  }
2167
2260
  }, {
2168
2261
  key: "isDefaultValueForOptions",
2169
2262
  get: function get() {
2170
- return this.opt.isDefaultValueForOptions;
2263
+ return this.opt.propertyObj.isDefaultValueForOptions;
2171
2264
  }
2172
2265
  }, {
2173
2266
  key: "freetextDefaultValue",
2174
2267
  get: function get() {
2175
- return this.opt.freetextDefaultValue;
2268
+ return this.opt.propertyObj.freetextDefaultValue;
2176
2269
  }
2177
2270
  }, {
2178
2271
  key: "url",
2179
2272
  get: function get() {
2180
- return this.opt.url;
2273
+ return this.opt.propertyObj.url;
2181
2274
  }
2182
2275
  }, {
2183
2276
  key: "showSearchbar",
2184
2277
  get: function get() {
2185
- return this.opt.showSearchbar;
2278
+ return this.opt.propertyObj.showSearchbar;
2186
2279
  }
2187
2280
  }, {
2188
2281
  key: "showFilter",
2189
2282
  get: function get() {
2190
- return this.opt.showFilter;
2283
+ return this.opt.propertyObj.showFilter;
2191
2284
  }
2192
2285
  }, {
2193
2286
  key: "pdfUrl",
2194
2287
  get: function get() {
2195
- return this.opt.pdfUrl;
2288
+ return this.opt.propertyObj.pdfUrl;
2196
2289
  }
2197
2290
  }, {
2198
2291
  key: "diameter",
2199
2292
  get: function get() {
2200
- return this.opt.diameter;
2293
+ return this.opt.propertyObj.diameter;
2201
2294
  }
2202
2295
  }, {
2203
2296
  key: "forceShowVariantDesc",
2204
2297
  get: function get() {
2205
- return this.opt.forceShowVariantDesc;
2298
+ return this.opt.propertyObj.forceShowVariantDesc;
2206
2299
  }
2207
2300
  }, {
2208
2301
  key: "maskTabgroup",
@@ -2212,47 +2305,42 @@ var OptionCatalogData = /*#__PURE__*/function () {
2212
2305
  }, {
2213
2306
  key: "showOnSeparatTabgroup",
2214
2307
  get: function get() {
2215
- return this.opt.showOnSeparatTabgroup;
2308
+ return this.opt.propertyObj.showOnSeparatTabgroup;
2216
2309
  }
2217
2310
  }, {
2218
2311
  key: "setName",
2219
2312
  get: function get() {
2220
- return this.opt.setName;
2313
+ return this.opt.propertyObj.setName;
2221
2314
  }
2222
2315
  }, {
2223
2316
  key: "addOptionToTabgroupInPartlistSummary",
2224
2317
  get: function get() {
2225
- return this.opt.addOptionToTabgroupInPartlistSummary;
2318
+ return this.opt.propertyObj.addOptionToTabgroupInPartlistSummary;
2226
2319
  }
2227
2320
  }, {
2228
2321
  key: "addToWWS",
2229
2322
  get: function get() {
2230
- return this.opt.addToWWS;
2323
+ return this.opt.propertyObj.addToWWS;
2231
2324
  }
2232
2325
  }, {
2233
2326
  key: "sendToPIM",
2234
2327
  get: function get() {
2235
- return this.opt.sendToPIM;
2236
- }
2237
- }, {
2238
- key: "measureKey",
2239
- get: function get() {
2240
- return this.opt.measureKey;
2328
+ return this.opt.propertyObj.sendToPIM;
2241
2329
  }
2242
2330
  }, {
2243
2331
  key: "contentItemId",
2244
2332
  get: function get() {
2245
- return this.opt.contentItemId;
2333
+ return this.opt.propertyObj.contentItemId;
2246
2334
  }
2247
2335
  }, {
2248
2336
  key: "customDimension",
2249
2337
  get: function get() {
2250
- return this.opt.customDimension;
2338
+ return this.opt.propertyObj.customDimension;
2251
2339
  }
2252
2340
  }, {
2253
2341
  key: "customDimensionText",
2254
2342
  get: function get() {
2255
- return this.opt.customDimensionText;
2343
+ return this.opt.propertyObj.customDimensionText;
2256
2344
  }
2257
2345
  }, {
2258
2346
  key: "sequenceNo",
@@ -2262,15 +2350,121 @@ var OptionCatalogData = /*#__PURE__*/function () {
2262
2350
  }, {
2263
2351
  key: "ignoreGroups",
2264
2352
  get: function get() {
2265
- return this.opt.ignoreGroups;
2353
+ return this.opt.propertyObj.ignoreGroups;
2266
2354
  }
2267
2355
  }, {
2268
2356
  key: "ignorePgrGroupPosition",
2269
2357
  get: function get() {
2270
- return this.opt.ignorePgrGroupPosition;
2358
+ return this.opt.propertyObj.ignorePgrGroupPosition;
2359
+ }
2360
+ }, {
2361
+ key: "additionalGroupFilter",
2362
+ get: function get() {
2363
+ return this.opt.propertyObj.additionalGroupFilter;
2271
2364
  }
2272
2365
  }]);
2273
2366
  }();
2367
+ var setOptionsProperties = function setOptionsProperties(catalogData, opt, properties) {
2368
+ for (var i = 0; i < (properties === null || properties === void 0 ? void 0 : properties.length); i++) {
2369
+ var prop = properties[i];
2370
+ var key = prop.Codex;
2371
+ if (key.startsWith(catalogData.catalogCodex + '__')) key = key.replace(catalogData.catalogCodex + '__', '');
2372
+ switch (key) {
2373
+ case 'INFO_URL':
2374
+ opt.url = prop.Value;
2375
+ break;
2376
+ case 'IGNORE_GROUPS':
2377
+ opt.ignoreGroups = prop.Value == '1';
2378
+ break;
2379
+ case 'IGNORE_PGR_GROUP_POSITION':
2380
+ opt.ignorePgrGroupPosition = prop.Value == '1';
2381
+ break;
2382
+ case 'SHOW_SEARCHBAR':
2383
+ opt.showSearchbar = prop.Value == '1';
2384
+ break;
2385
+ case 'SHOW_FILTER':
2386
+ opt.showFilter = prop.Value == '1';
2387
+ break;
2388
+ case 'INFO_PDF':
2389
+ opt.pdfUrl = prop.Value;
2390
+ break;
2391
+ case 'DIAMETER':
2392
+ opt.diameter = !!prop.Value;
2393
+ break;
2394
+ case 'PAIROPTION':
2395
+ opt.pairWithOptionsToGroup = prop.Value;
2396
+ break;
2397
+ case 'REQUIRES_USER_INPUT':
2398
+ opt.requiresUserInput = !!prop.Value;
2399
+ break;
2400
+ case 'IS_STATE':
2401
+ opt.isDescribingState = !!prop.Value;
2402
+ break;
2403
+ case 'CUSTOM_DIMENSION':
2404
+ opt.customDimension = !!prop.Value;
2405
+ break;
2406
+ case 'CUSTOM_DIMENSION_TEXT':
2407
+ opt.customDimensionText = prop.Value;
2408
+ break;
2409
+ case 'HIDE_OPTION_IN_CONFIGURATOR':
2410
+ opt.hideOptionInConfigurator = !!prop.Value;
2411
+ break;
2412
+ case 'MERGE_IDM_TO_OPG':
2413
+ opt.mergeIDMToOPG = prop.Value;
2414
+ break;
2415
+ case 'ONLY_VISIBLE_IF_NOT_UNDOCK':
2416
+ opt.onlyVisibleIfNotDocked = prop.Value;
2417
+ break;
2418
+ case 'ONLY_VISIBLE_IF_CONFIG_SINGLE':
2419
+ opt.onlyVisibleIfConfigSingle = prop.Value;
2420
+ break;
2421
+ case 'ONLY_VISIBLE_IF_CONFIG_ALL':
2422
+ opt.onlyVisibleIfConfigAll = prop.Value;
2423
+ break;
2424
+ case 'ISDEFAULTVALUEFOROPTIONS':
2425
+ opt.isDefaultValueForOptions = prop.Value;
2426
+ break;
2427
+ case 'FREETEXT_DEFAULT_VALUE':
2428
+ opt.freetextDefaultValue = prop.Value;
2429
+ break;
2430
+ case 'SHOW_IN_VARIANTDESC':
2431
+ opt.forceShowVariantDesc = prop.Value;
2432
+ break;
2433
+ case 'SHOW_SEPARAT_ON_TABGROUP':
2434
+ opt.showOnSeparatTabgroup = prop.Value;
2435
+ break;
2436
+ case 'SETNAME':
2437
+ opt.setName = !!prop.Value;
2438
+ break;
2439
+ case 'ADD_OPT_TO_TABGROUP_IN_PL_SUM':
2440
+ opt.addOptionToTabgroupInPartlistSummary = prop.Value;
2441
+ break;
2442
+ case 'ADD_TO_WWS':
2443
+ opt.addToWWS = !!prop.Value;
2444
+ break;
2445
+ case 'DEFAULT_SIBLING_OPTION':
2446
+ opt.isDefaultSiblingOption = prop.Value;
2447
+ break;
2448
+ case 'CONTENT_ITEM':
2449
+ opt.contentItemId = prop.Value;
2450
+ break;
2451
+ case 'ADDITIONAL_GROUP_FILTER':
2452
+ opt.additionalGroupFilter = JSON.parse(prop.Value);
2453
+ break;
2454
+ case 'ION_COMMENT_TEXT':
2455
+ case 'SHOW_IN_BASKET_WHEN_HAS_PRICE':
2456
+ case 'FEATURE_TYPE':
2457
+ case 'EshopCategoryMapping':
2458
+ case 'EshopSearchRelevant':
2459
+ case 'IsSalesText':
2460
+ case 'IsArtName':
2461
+ break;
2462
+ default:
2463
+ LOG$o.debug('implement mapping for these props for options: ' + prop.Codex);
2464
+ break;
2465
+ }
2466
+ }
2467
+ };
2274
2468
 
2275
2469
  //https://en.wikipedia.org/wiki/List_of_RAL_colors#RAL_Effect
2276
2470
  var ralEffect = [{
@@ -16064,7 +16258,8 @@ var ralClassics = [{
16064
16258
  var LOG$n = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
16065
16259
  var OptionValueCatalogData = /*#__PURE__*/function () {
16066
16260
  function OptionValueCatalogData(opv, catalogData) {
16067
- var _this = this;
16261
+ var _this = this,
16262
+ _this$opv$property;
16068
16263
  _classCallCheck__default["default"](this, OptionValueCatalogData);
16069
16264
  _defineProperty__default["default"](this, "opv", void 0);
16070
16265
  /**
@@ -16121,114 +16316,7 @@ var OptionValueCatalogData = /*#__PURE__*/function () {
16121
16316
  });
16122
16317
  this.opv = opv;
16123
16318
  opv.colorGroups = this.mapRALColorToGroup();
16124
- var metaDatas = [];
16125
- for (var i = 0; i < ((_this$opv$property$le = (_this$opv$property = this.opv.property) === null || _this$opv$property === void 0 ? void 0 : _this$opv$property.length) !== null && _this$opv$property$le !== void 0 ? _this$opv$property$le : 0); i++) {
16126
- var _this$opv$property$le, _this$opv$property, _this$opv$property2;
16127
- var prop = (_this$opv$property2 = this.opv.property) === null || _this$opv$property2 === void 0 ? void 0 : _this$opv$property2[i];
16128
- var key = prop.Codex;
16129
- if (key.startsWith(catalogData.catalogCodex + '__')) key = key.replace(catalogData.catalogCodex + '__', '');
16130
- switch (key) {
16131
- case 'INFO_URL':
16132
- this.opv.url = prop.Value;
16133
- break;
16134
- case 'INFO_PDF':
16135
- this.opv.pdfUrl = prop.Value;
16136
- break;
16137
- case 'SAME_OPV':
16138
- this.opv.sameopv = prop.Value;
16139
- break;
16140
- case 'ONLY_VISIBLE_IF_NOT_UNDOCK':
16141
- this.opv.onlyVisibleIfNotDocked = prop.Value;
16142
- break;
16143
- case 'DEFAULT_VALUE':
16144
- this.opv.defaultValue = prop.Value;
16145
- break;
16146
- case 'SUMMARY_CODEX':
16147
- this.opv.summaryCodex = prop.Value;
16148
- break;
16149
- case 'VIEWPOINTNAME':
16150
- this.opv.viewPointName = prop.Value;
16151
- break;
16152
- case 'HIDE_IN_SUMMARY':
16153
- this.opv.hideInSummary = !!prop.Value;
16154
- break;
16155
- case 'SETNAME':
16156
- this.opv.setName = prop.Value;
16157
- break;
16158
- case 'SET_CONFIG':
16159
- this.opv.setConfig = prop.Value;
16160
- break;
16161
- case 'CUSTOM_DIMENSION':
16162
- if (prop.Value == 1 || prop.Value == 0) {
16163
- this.opv.customDimension = !!prop.Value;
16164
- } else if (!isNaN(Number(prop.Value))) {
16165
- this.opv.customDimension = Number(prop.Value);
16166
- } else {
16167
- console.error('Error: Invalid custom dimension value: ' + prop.Value + ' at opv: ' + this.opv.codex);
16168
- this.opv.customDimension = undefined;
16169
- }
16170
- break;
16171
- case 'ON_RULE':
16172
- this.opv.onRule = prop.Value;
16173
- break;
16174
- case 'CONTENT_ITEM':
16175
- this.opv.contentItemId = prop.Value;
16176
- break;
16177
- case 'IS_NOT_RELEVANT':
16178
- this.opv.isNotRelevant = prop.Value;
16179
- break;
16180
- case 'GROUP_CONTENT_ITEM':
16181
- this.opv.groupContentItemId = prop.Value;
16182
- break;
16183
- case 'SET_BY_RULE':
16184
- this.opv.setByRule = prop.Value;
16185
- break;
16186
- case 'ADD_TO_MEASURE':
16187
- this.opv.addToMeasure = prop.Value.split(';').map(function (v) {
16188
- return {
16189
- op: v.split(':')[0],
16190
- value: Number(v.split(':')[1]),
16191
- opt: 'OPT' + v.split(':')[2]
16192
- };
16193
- });
16194
- break;
16195
- case 'PIMFlatValues':
16196
- this.opv.isPIMFlatValue = prop.Value == '1';
16197
- break;
16198
- case 'IsVariantAttribute':
16199
- this.opv.isVariantAttribute = prop.Value == '1';
16200
- break;
16201
- case 'ION_COMMENT_TEXT':
16202
- case 'EshopCategoryMapping':
16203
- case 'TopFilterAttribute':
16204
- case 'PriceTageRelevant':
16205
- case 'IsArtName':
16206
- break;
16207
- default:
16208
- if (key.includes('__')) break;
16209
- LOG$n.debug('implement mapping for these props for optionValue: ' + prop.Codex);
16210
- var values_locales = [];
16211
- if (prop.Value_locales) {
16212
- var _prop$Value_locales;
16213
- var langs = Object.keys((_prop$Value_locales = prop.Value_locales) !== null && _prop$Value_locales !== void 0 ? _prop$Value_locales : {});
16214
- for (var j = 0; j < langs.length; j++) {
16215
- var lang = langs[j];
16216
- var values = prop.Value_locales[lang].split(';');
16217
- for (var m = 0; m < values.length; m++) {
16218
- if (!values_locales[m]) values_locales[m] = {};
16219
- values_locales[m][lang] = values[m];
16220
- }
16221
- }
16222
- }
16223
- metaDatas.push({
16224
- codex: prop.Codex,
16225
- name: prop.Name,
16226
- values: prop.Value.split(';'),
16227
- values_locales: values_locales
16228
- });
16229
- break;
16230
- }
16231
- }
16319
+ var metaDatas = setOptionValueProperties(catalogData, this.opv.propertyObj, (_this$opv$property = this.opv.property) !== null && _this$opv$property !== void 0 ? _this$opv$property : []);
16232
16320
  this.opv.metaData = metaDatas;
16233
16321
  }
16234
16322
  /**************************************************GETTER ************************************************** */
@@ -16242,11 +16330,6 @@ var OptionValueCatalogData = /*#__PURE__*/function () {
16242
16330
  get: function get() {
16243
16331
  return this.opv.vCodex;
16244
16332
  }
16245
- }, {
16246
- key: "isNotRelevant",
16247
- get: function get() {
16248
- return this.opv.isNotRelevant;
16249
- }
16250
16333
  }, {
16251
16334
  key: "name",
16252
16335
  get: function get() {
@@ -16375,15 +16458,20 @@ var OptionValueCatalogData = /*#__PURE__*/function () {
16375
16458
  get: function get() {
16376
16459
  return this.opv.value;
16377
16460
  }
16461
+ }, {
16462
+ key: "isNotRelevant",
16463
+ get: function get() {
16464
+ return this.opv.propertyObj.isNotRelevant;
16465
+ }
16378
16466
  }, {
16379
16467
  key: "contentItemId",
16380
16468
  get: function get() {
16381
- return this.opv.contentItemId;
16469
+ return this.opv.propertyObj.contentItemId;
16382
16470
  }
16383
16471
  }, {
16384
16472
  key: "groupContentItemId",
16385
16473
  get: function get() {
16386
- return this.opv.groupContentItemId;
16474
+ return this.opv.propertyObj.groupContentItemId;
16387
16475
  }
16388
16476
  }, {
16389
16477
  key: "metaData",
@@ -16412,18 +16500,13 @@ var OptionValueCatalogData = /*#__PURE__*/function () {
16412
16500
  var _this$opv$metaData;
16413
16501
  return (_this$opv$metaData = this.opv.metaData) !== null && _this$opv$metaData !== void 0 ? _this$opv$metaData : [];
16414
16502
  }
16415
- }, {
16416
- key: "url",
16417
- get: function get() {
16418
- return this.opv.url;
16419
- }
16420
16503
  }, {
16421
16504
  key: "pdfUrl",
16422
16505
  get: function get() {
16423
16506
  var _this$opv$textbaustei, _this$opv$textbaustei2;
16424
16507
  return (_this$opv$textbaustei = (_this$opv$textbaustei2 = this.opv.textbausteine) === null || _this$opv$textbaustei2 === void 0 || (_this$opv$textbaustei2 = _this$opv$textbaustei2.find(function (item) {
16425
16508
  return item.Memo.endsWith('.pdf');
16426
- })) === null || _this$opv$textbaustei2 === void 0 ? void 0 : _this$opv$textbaustei2.Memo) !== null && _this$opv$textbaustei !== void 0 ? _this$opv$textbaustei : this.opv.pdfUrl;
16509
+ })) === null || _this$opv$textbaustei2 === void 0 ? void 0 : _this$opv$textbaustei2.Memo) !== null && _this$opv$textbaustei !== void 0 ? _this$opv$textbaustei : this.opv.propertyObj.pdfUrl;
16427
16510
  }
16428
16511
  }, {
16429
16512
  key: "rals",
@@ -16435,10 +16518,15 @@ var OptionValueCatalogData = /*#__PURE__*/function () {
16435
16518
  get: function get() {
16436
16519
  return this.opv.colorGroups;
16437
16520
  }
16521
+ }, {
16522
+ key: "url",
16523
+ get: function get() {
16524
+ return this.opv.propertyObj.url;
16525
+ }
16438
16526
  }, {
16439
16527
  key: "sameopv",
16440
16528
  get: function get() {
16441
- return this.opv.sameopv;
16529
+ return this.opv.propertyObj.sameopv;
16442
16530
  }
16443
16531
  }, {
16444
16532
  key: "isCustomAttribute",
@@ -16448,27 +16536,27 @@ var OptionValueCatalogData = /*#__PURE__*/function () {
16448
16536
  }, {
16449
16537
  key: "onlyVisibleIfNotDocked",
16450
16538
  get: function get() {
16451
- return this.opv.onlyVisibleIfNotDocked;
16539
+ return this.opv.propertyObj.onlyVisibleIfNotDocked;
16452
16540
  }
16453
16541
  }, {
16454
16542
  key: "defaultValue",
16455
16543
  get: function get() {
16456
- return this.opv.defaultValue;
16544
+ return this.opv.propertyObj.defaultValue;
16457
16545
  }
16458
16546
  }, {
16459
16547
  key: "summaryCodex",
16460
16548
  get: function get() {
16461
- return this.opv.summaryCodex;
16549
+ return this.opv.propertyObj.summaryCodex;
16462
16550
  }
16463
16551
  }, {
16464
16552
  key: "viewPointName",
16465
16553
  get: function get() {
16466
- return this.opv.viewPointName;
16554
+ return this.opv.propertyObj.viewPointName;
16467
16555
  }
16468
16556
  }, {
16469
16557
  key: "hideInSummary",
16470
16558
  get: function get() {
16471
- return this.opv.hideInSummary;
16559
+ return this.opv.propertyObj.hideInSummary;
16472
16560
  }
16473
16561
  }, {
16474
16562
  key: "hiddenByMask",
@@ -16478,45 +16566,156 @@ var OptionValueCatalogData = /*#__PURE__*/function () {
16478
16566
  }, {
16479
16567
  key: "setName",
16480
16568
  get: function get() {
16481
- return this.opv.setName;
16569
+ return this.opv.propertyObj.setName;
16482
16570
  }
16483
16571
  }, {
16484
16572
  key: "setConfig",
16485
16573
  get: function get() {
16486
- return this.opv.setConfig;
16574
+ return this.opv.propertyObj.setConfig;
16487
16575
  }
16488
16576
  }, {
16489
16577
  key: "setByRule",
16490
16578
  get: function get() {
16491
- return this.opv.setByRule;
16579
+ return this.opv.propertyObj.setByRule;
16492
16580
  }
16493
16581
  }, {
16494
16582
  key: "onRule",
16495
16583
  get: function get() {
16496
- return this.opv.onRule;
16584
+ return this.opv.propertyObj.onRule;
16497
16585
  }
16498
16586
  }, {
16499
16587
  key: "customDimension",
16500
16588
  get: function get() {
16501
- return this.opv.customDimension;
16589
+ return this.opv.propertyObj.customDimension;
16502
16590
  }
16503
16591
  }, {
16504
16592
  key: "addToMeasure",
16505
16593
  get: function get() {
16506
- return this.opv.addToMeasure;
16594
+ return this.opv.propertyObj.addToMeasure;
16507
16595
  }
16508
16596
  }, {
16509
16597
  key: "isPIMFlatValue",
16510
16598
  get: function get() {
16511
- return this.opv.isPIMFlatValue;
16599
+ return this.opv.propertyObj.isPIMFlatValue;
16512
16600
  }
16513
16601
  }, {
16514
16602
  key: "isVariantAttribute",
16515
16603
  get: function get() {
16516
- return this.opv.isVariantAttribute;
16604
+ return this.opv.propertyObj.isVariantAttribute;
16517
16605
  }
16518
16606
  }]);
16519
16607
  }();
16608
+ var setOptionValueProperties = function setOptionValueProperties(catalogData, opv, properties) {
16609
+ var metaDatas = [];
16610
+ for (var i = 0; i < ((_properties$length = properties === null || properties === void 0 ? void 0 : properties.length) !== null && _properties$length !== void 0 ? _properties$length : 0); i++) {
16611
+ var _properties$length;
16612
+ var prop = properties === null || properties === void 0 ? void 0 : properties[i];
16613
+ var key = prop.Codex;
16614
+ if (key.startsWith(catalogData.catalogCodex + '__')) key = key.replace(catalogData.catalogCodex + '__', '');
16615
+ switch (key) {
16616
+ case 'INFO_URL':
16617
+ opv.url = prop.Value;
16618
+ break;
16619
+ case 'INFO_PDF':
16620
+ opv.pdfUrl = prop.Value;
16621
+ break;
16622
+ case 'SAME_OPV':
16623
+ opv.sameopv = prop.Value;
16624
+ break;
16625
+ case 'ONLY_VISIBLE_IF_NOT_UNDOCK':
16626
+ opv.onlyVisibleIfNotDocked = prop.Value;
16627
+ break;
16628
+ case 'DEFAULT_VALUE':
16629
+ opv.defaultValue = prop.Value;
16630
+ break;
16631
+ case 'SUMMARY_CODEX':
16632
+ opv.summaryCodex = prop.Value;
16633
+ break;
16634
+ case 'VIEWPOINTNAME':
16635
+ opv.viewPointName = prop.Value;
16636
+ break;
16637
+ case 'HIDE_IN_SUMMARY':
16638
+ opv.hideInSummary = !!prop.Value;
16639
+ break;
16640
+ case 'SETNAME':
16641
+ opv.setName = prop.Value;
16642
+ break;
16643
+ case 'SET_CONFIG':
16644
+ opv.setConfig = prop.Value;
16645
+ break;
16646
+ case 'CUSTOM_DIMENSION':
16647
+ if (prop.Value == '1' || prop.Value == '0') {
16648
+ opv.customDimension = !!prop.Value;
16649
+ } else if (!isNaN(Number(prop.Value))) {
16650
+ opv.customDimension = Number(prop.Value);
16651
+ } else {
16652
+ console.error('Error: Invalid custom dimension value: ' + prop.Value + ' at opv: ' + opv);
16653
+ opv.customDimension = undefined;
16654
+ }
16655
+ break;
16656
+ case 'ON_RULE':
16657
+ opv.onRule = prop.Value;
16658
+ break;
16659
+ case 'CONTENT_ITEM':
16660
+ opv.contentItemId = prop.Value;
16661
+ break;
16662
+ case 'IS_NOT_RELEVANT':
16663
+ opv.isNotRelevant = !!prop.Value;
16664
+ break;
16665
+ case 'GROUP_CONTENT_ITEM':
16666
+ opv.groupContentItemId = prop.Value;
16667
+ break;
16668
+ case 'SET_BY_RULE':
16669
+ opv.setByRule = prop.Value;
16670
+ break;
16671
+ case 'ADD_TO_MEASURE':
16672
+ opv.addToMeasure = prop.Value.split(';').map(function (v) {
16673
+ return {
16674
+ op: v.split(':')[0],
16675
+ value: Number(v.split(':')[1]),
16676
+ opt: 'OPT' + v.split(':')[2]
16677
+ };
16678
+ });
16679
+ break;
16680
+ case 'PIMFlatValues':
16681
+ opv.isPIMFlatValue = prop.Value == '1';
16682
+ break;
16683
+ case 'IsVariantAttribute':
16684
+ opv.isVariantAttribute = prop.Value == '1';
16685
+ break;
16686
+ case 'ION_COMMENT_TEXT':
16687
+ case 'EshopCategoryMapping':
16688
+ case 'TopFilterAttribute':
16689
+ case 'PriceTageRelevant':
16690
+ case 'IsArtName':
16691
+ break;
16692
+ default:
16693
+ if (key.includes('__')) break;
16694
+ LOG$n.debug('implement mapping for these props for optionValue: ' + prop.Codex);
16695
+ var values_locales = [];
16696
+ if (prop.Value_locales) {
16697
+ var _prop$Value_locales;
16698
+ var langs = Object.keys((_prop$Value_locales = prop.Value_locales) !== null && _prop$Value_locales !== void 0 ? _prop$Value_locales : {});
16699
+ for (var j = 0; j < langs.length; j++) {
16700
+ var lang = langs[j];
16701
+ var values = prop.Value_locales[lang].split(';');
16702
+ for (var m = 0; m < values.length; m++) {
16703
+ if (!values_locales[m]) values_locales[m] = {};
16704
+ values_locales[m][lang] = values[m];
16705
+ }
16706
+ }
16707
+ }
16708
+ metaDatas.push({
16709
+ codex: prop.Codex,
16710
+ name: prop.Name,
16711
+ values: prop.Value.split(';'),
16712
+ values_locales: values_locales
16713
+ });
16714
+ break;
16715
+ }
16716
+ }
16717
+ return metaDatas;
16718
+ };
16520
16719
 
16521
16720
  function _createForOfIteratorHelper$b(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$b(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } 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 o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
16522
16721
  function _unsupportedIterableToArray$b(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$b(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$b(r, a) : void 0; } }
@@ -16532,7 +16731,7 @@ var CatalogArticleData = /*#__PURE__*/function () {
16532
16731
  if (!_this._catalogArticle.metaData) return metaData;
16533
16732
  for (var i = 0; i < _this._catalogArticle.metaData.length; i++) {
16534
16733
  var data = _this._catalogArticle.metaData[i];
16535
- metaData[data.codex] = locales ? data.values_locales : data.values;
16734
+ metaData[data.codex] = locales && data.values_locales ? data.values_locales : data.values;
16536
16735
  }
16537
16736
  return metaData;
16538
16737
  });
@@ -17398,8 +17597,9 @@ function setCatalogPlannsCompletely(catalogData) {
17398
17597
  }
17399
17598
  }
17400
17599
  function getCatalogArticle$1(jsonArticle, catalogData) {
17401
- var _catalogData$catalogM, _articleMask$name$cat, _articleMask$name, _jsonArticle$Metadata, _articleMask$properti, _articleMask$groupnam, _articleMask$groupnam2, _articleMask$hidden;
17600
+ var _catalogData$catalogM, _catalogData$catalogM2, _catalogData$catalogM3, _articleMask$name$cat, _articleMask$name, _jsonArticle$Metadata, _articleMask$groupnam, _articleMask$groupnam2, _articleMask$hidden;
17402
17601
  var articleMask = (_catalogData$catalogM = catalogData.catalogMask) === null || _catalogData$catalogM === void 0 || (_catalogData$catalogM = _catalogData$catalogM.articles) === null || _catalogData$catalogM === void 0 ? void 0 : _catalogData$catalogM[jsonArticle.Codex];
17602
+ var maskProperties = getPropertiesForItemNo((_catalogData$catalogM2 = (_catalogData$catalogM3 = catalogData.catalogMask) === null || _catalogData$catalogM3 === void 0 ? void 0 : _catalogData$catalogM3.properties) !== null && _catalogData$catalogM2 !== void 0 ? _catalogData$catalogM2 : [], jsonArticle.Codex, catalogData.api.getLanguage());
17403
17603
  //parse den Json Article und erstelle CatalogArticle
17404
17604
  return {
17405
17605
  articleCodex: jsonArticle.Codex,
@@ -17416,7 +17616,7 @@ function getCatalogArticle$1(jsonArticle, catalogData) {
17416
17616
  articleOptions: {},
17417
17617
  decisions: [],
17418
17618
  idmDecisions: [],
17419
- properties: [].concat(_toConsumableArray__default["default"]((_jsonArticle$Metadata = jsonArticle.Metadatas) !== null && _jsonArticle$Metadata !== void 0 ? _jsonArticle$Metadata : []), _toConsumableArray__default["default"]((_articleMask$properti = articleMask === null || articleMask === void 0 ? void 0 : articleMask.properties) !== null && _articleMask$properti !== void 0 ? _articleMask$properti : [])),
17619
+ properties: [].concat(_toConsumableArray__default["default"]((_jsonArticle$Metadata = jsonArticle.Metadatas) !== null && _jsonArticle$Metadata !== void 0 ? _jsonArticle$Metadata : []), _toConsumableArray__default["default"](maskProperties !== null && maskProperties !== void 0 ? maskProperties : [])),
17420
17620
  image: jsonArticle.Image && jsonArticle.Image != '' ? jsonArticle.Image : undefined,
17421
17621
  groupName: (_articleMask$groupnam = articleMask === null || articleMask === void 0 || (_articleMask$groupnam2 = articleMask.groupname) === null || _articleMask$groupnam2 === void 0 ? void 0 : _articleMask$groupnam2[catalogData.api.getLanguage()]) !== null && _articleMask$groupnam !== void 0 ? _articleMask$groupnam : jsonArticle.GroupName,
17422
17622
  origGroupName: jsonArticle.GroupName,
@@ -17502,9 +17702,10 @@ function initCatalogOptions(catalogData, jsonOptions) {
17502
17702
  return options;
17503
17703
  }
17504
17704
  function getCatalogOptionDataType(codex, jsonOPT, catalogData) {
17505
- var _catalogData$catalogM2, _catalogData$catalogM3, _catalogData$catalogM4, _jsonOPT$Properties, _optionMask$propertie, _optionMask$name$cata, _optionMask$name, _optionMask$name2, _optionMask$hidden, _optionMask$tabGroup, _ref, _optionMask$layout, _properties$find, _jsonOPT$showOPVAsArt;
17506
- var optionMask = (_catalogData$catalogM2 = (_catalogData$catalogM3 = catalogData.catalogMask) === null || _catalogData$catalogM3 === void 0 || (_catalogData$catalogM3 = _catalogData$catalogM3.options) === null || _catalogData$catalogM3 === void 0 ? void 0 : _catalogData$catalogM3[codex]) !== null && _catalogData$catalogM2 !== void 0 ? _catalogData$catalogM2 : codex.startsWith('OPT') ? (_catalogData$catalogM4 = catalogData.catalogMask) === null || _catalogData$catalogM4 === void 0 || (_catalogData$catalogM4 = _catalogData$catalogM4.options) === null || _catalogData$catalogM4 === void 0 ? void 0 : _catalogData$catalogM4[codex.substring(3)] : undefined;
17507
- var properties = [].concat(_toConsumableArray__default["default"]((_jsonOPT$Properties = jsonOPT.Properties) !== null && _jsonOPT$Properties !== void 0 ? _jsonOPT$Properties : []), _toConsumableArray__default["default"]((_optionMask$propertie = optionMask === null || optionMask === void 0 ? void 0 : optionMask.properties) !== null && _optionMask$propertie !== void 0 ? _optionMask$propertie : []));
17705
+ var _catalogData$catalogM4, _catalogData$catalogM5, _catalogData$catalogM6, _catalogData$catalogM7, _catalogData$catalogM8, _jsonOPT$Properties, _optionMask$name$cata, _optionMask$name, _optionMask$name2, _optionMask$hidden, _optionMask$tabGroup, _ref, _optionMask$layout, _properties$find, _jsonOPT$showOPVAsArt, _properties$find2, _properties$find3;
17706
+ var maskProperties = getPropertiesForFeatureNo((_catalogData$catalogM4 = (_catalogData$catalogM5 = catalogData.catalogMask) === null || _catalogData$catalogM5 === void 0 ? void 0 : _catalogData$catalogM5.properties) !== null && _catalogData$catalogM4 !== void 0 ? _catalogData$catalogM4 : [], undefined, codex, catalogData.api.getLanguage());
17707
+ var optionMask = (_catalogData$catalogM6 = (_catalogData$catalogM7 = catalogData.catalogMask) === null || _catalogData$catalogM7 === void 0 || (_catalogData$catalogM7 = _catalogData$catalogM7.options) === null || _catalogData$catalogM7 === void 0 ? void 0 : _catalogData$catalogM7[codex]) !== null && _catalogData$catalogM6 !== void 0 ? _catalogData$catalogM6 : codex.startsWith('OPT') ? (_catalogData$catalogM8 = catalogData.catalogMask) === null || _catalogData$catalogM8 === void 0 || (_catalogData$catalogM8 = _catalogData$catalogM8.options) === null || _catalogData$catalogM8 === void 0 ? void 0 : _catalogData$catalogM8[codex.substring(3)] : undefined;
17708
+ var properties = [].concat(_toConsumableArray__default["default"]((_jsonOPT$Properties = jsonOPT.Properties) !== null && _jsonOPT$Properties !== void 0 ? _jsonOPT$Properties : []), _toConsumableArray__default["default"](maskProperties !== null && maskProperties !== void 0 ? maskProperties : []));
17508
17709
  var opt = {
17509
17710
  codex: codex,
17510
17711
  name: (_optionMask$name$cata = optionMask === null || optionMask === void 0 || (_optionMask$name = optionMask.name) === null || _optionMask$name === void 0 ? void 0 : _optionMask$name[catalogData.api.getLanguage()]) !== null && _optionMask$name$cata !== void 0 ? _optionMask$name$cata : jsonOPT.Name,
@@ -17518,8 +17719,6 @@ function getCatalogOptionDataType(codex, jsonOPT, catalogData) {
17518
17719
  layout: (_ref = (_optionMask$layout = optionMask === null || optionMask === void 0 ? void 0 : optionMask.layout) !== null && _optionMask$layout !== void 0 ? _optionMask$layout : properties === null || properties === void 0 || (_properties$find = properties.find(function (p) {
17519
17720
  return p.Codex == 'LAYOUT';
17520
17721
  })) === null || _properties$find === void 0 ? void 0 : _properties$find.Value) !== null && _ref !== void 0 ? _ref : jsonOPT.Layout != undefined ? jsonOPT.Layout : 'IMAGE',
17521
- multiselect: jsonOPT.Multiselect != undefined ? jsonOPT.Multiselect == 'True' : false,
17522
- sendToPIM: !!jsonOPT.SendToPIM,
17523
17722
  useMaxPriceOfGroup: jsonOPT.UseMaxPriceOfGroup != undefined ? Number(jsonOPT.UseMaxPriceOfGroup) : undefined,
17524
17723
  calcPercentOnOptions: jsonOPT.CalcPercentOnOptions,
17525
17724
  hideGroupNameInOrderText: jsonOPT.hideGroupNameInOrderText != undefined ? jsonOPT.hideGroupNameInOrderText == 'True' : false,
@@ -17529,7 +17728,13 @@ function getCatalogOptionDataType(codex, jsonOPT, catalogData) {
17529
17728
  property: properties,
17530
17729
  parentOptionCodex: jsonOPT.ParentOptionCodex,
17531
17730
  articlePlaceholder: jsonOPT.ArticlePlaceholder && jsonOPT.ArticlePlaceholder == 'True' ? true : false,
17532
- isMultiselect: jsonOPT.Multiselect != undefined ? jsonOPT.Multiselect == 'True' : false
17731
+ sendToPIM: !!jsonOPT.SendToPIM || !!(properties !== null && properties !== void 0 && (_properties$find2 = properties.find(function (p) {
17732
+ return p.Codex == 'SendToPim';
17733
+ })) !== null && _properties$find2 !== void 0 && _properties$find2.Value),
17734
+ isMultiselect: jsonOPT.Multiselect != undefined ? jsonOPT.Multiselect == 'True' : !!(properties !== null && properties !== void 0 && (_properties$find3 = properties.find(function (p) {
17735
+ return p.Codex == 'Multiselect';
17736
+ })) !== null && _properties$find3 !== void 0 && _properties$find3.Value),
17737
+ propertyObj: {}
17533
17738
  };
17534
17739
  opt.showOPVCodex = opt.showOPVCodex || opt.showOPVAsArticleNr;
17535
17740
  opt.invisible = opt.invisible || opt.headerPosVariationType == 'U';
@@ -17544,9 +17749,11 @@ function initCatalogOptionValues(catalogData, jsonOptions) {
17544
17749
  return optionValues;
17545
17750
  }
17546
17751
  function getCatalogOptionValueDataType(codex, jsonOPV, catalogData) {
17547
- var _catalogData$catalogM5, _catalogData$catalogM6, _catalogData$catalogM7, _optionvalues$codex, _mask$name$catalogDat, _mask$name, _mask$name2, _mask$groupname$catal, _mask$groupname, _mask$groupname2, _jsonOPV$MeasureStep, _jsonOPV$Value, _jsonOPV$Metadatas, _mask$properties;
17548
- var optionvalues = (_catalogData$catalogM5 = (_catalogData$catalogM6 = catalogData.catalogMask) === null || _catalogData$catalogM6 === void 0 ? void 0 : _catalogData$catalogM6.optionvalues) !== null && _catalogData$catalogM5 !== void 0 ? _catalogData$catalogM5 : (_catalogData$catalogM7 = catalogData.catalogMask) === null || _catalogData$catalogM7 === void 0 ? void 0 : _catalogData$catalogM7.optionValues;
17752
+ var _catalogData$catalogM9, _catalogData$catalogM10, _catalogData$catalogM11, _optionvalues$codex, _catalogData$catalogM12, _catalogData$catalogM13, _jsonOPV$Metadatas, _mask$name$catalogDat, _mask$name, _mask$name2, _mask$groupname$catal, _mask$groupname, _mask$groupname2, _jsonOPV$MeasureStep, _jsonOPV$Value;
17753
+ var optionvalues = (_catalogData$catalogM9 = (_catalogData$catalogM10 = catalogData.catalogMask) === null || _catalogData$catalogM10 === void 0 ? void 0 : _catalogData$catalogM10.optionvalues) !== null && _catalogData$catalogM9 !== void 0 ? _catalogData$catalogM9 : (_catalogData$catalogM11 = catalogData.catalogMask) === null || _catalogData$catalogM11 === void 0 ? void 0 : _catalogData$catalogM11.optionValues;
17549
17754
  var mask = (_optionvalues$codex = optionvalues === null || optionvalues === void 0 ? void 0 : optionvalues[codex]) !== null && _optionvalues$codex !== void 0 ? _optionvalues$codex : codex.startsWith('OPV') ? optionvalues === null || optionvalues === void 0 ? void 0 : optionvalues[codex.substring(3)] : undefined;
17755
+ var maskProperties = getPropertiesForOptionKey((_catalogData$catalogM12 = (_catalogData$catalogM13 = catalogData.catalogMask) === null || _catalogData$catalogM13 === void 0 ? void 0 : _catalogData$catalogM13.properties) !== null && _catalogData$catalogM12 !== void 0 ? _catalogData$catalogM12 : [], undefined, codex, catalogData.api.getLanguage());
17756
+ var properties = [].concat(_toConsumableArray__default["default"]((_jsonOPV$Metadatas = jsonOPV.Metadatas) !== null && _jsonOPV$Metadatas !== void 0 ? _jsonOPV$Metadatas : []), _toConsumableArray__default["default"](maskProperties !== null && maskProperties !== void 0 ? maskProperties : []));
17550
17757
  var opv = {
17551
17758
  codex: codex,
17552
17759
  vCodex: jsonOPV.VCodex,
@@ -17574,8 +17781,9 @@ function getCatalogOptionValueDataType(codex, jsonOPV, catalogData) {
17574
17781
  showOnlyWhenHasPrice: jsonOPV.ShowOnlyWhenHasPrice && jsonOPV.ShowOnlyWhenHasPrice == 'True' ? true : false,
17575
17782
  priceUnit: jsonOPV.PriceUnit,
17576
17783
  value: (_jsonOPV$Value = jsonOPV.Value) !== null && _jsonOPV$Value !== void 0 ? _jsonOPV$Value : jsonOPV.Name.endsWith(' cm') && !isNaN(Number(jsonOPV.Name.replace(' cm', ''))) ? Number(jsonOPV.Name.replace(' cm', '')) : undefined,
17577
- property: [].concat(_toConsumableArray__default["default"]((_jsonOPV$Metadatas = jsonOPV.Metadatas) !== null && _jsonOPV$Metadatas !== void 0 ? _jsonOPV$Metadatas : []), _toConsumableArray__default["default"]((_mask$properties = mask === null || mask === void 0 ? void 0 : mask.properties) !== null && _mask$properties !== void 0 ? _mask$properties : [])),
17578
- textbausteine: jsonOPV.Textbausteine
17784
+ property: properties,
17785
+ textbausteine: jsonOPV.Textbausteine,
17786
+ propertyObj: {}
17579
17787
  };
17580
17788
  if (jsonOPV.MeasureUnit) {
17581
17789
  switch (jsonOPV.MeasureUnit) {
@@ -17868,12 +18076,66 @@ function getImageURL(image, mediaUrl) {
17868
18076
  }
17869
18077
  return ret;
17870
18078
  }
18079
+ function getPropertiesForFeatureNo(properties, typeNo, featureNo, lang) {
18080
+ return properties.filter(function (p) {
18081
+ var _p$featureNos, _p$optionKeys, _p$typeNos, _p$typeNos2;
18082
+ return ((_p$featureNos = p.featureNos) === null || _p$featureNos === void 0 ? void 0 : _p$featureNos.includes(featureNo)) && !((_p$optionKeys = p.optionKeys) !== null && _p$optionKeys !== void 0 && _p$optionKeys.length) && (!typeNo || !((_p$typeNos = p.typeNos) !== null && _p$typeNos !== void 0 && _p$typeNos.length) || ((_p$typeNos2 = p.typeNos) === null || _p$typeNos2 === void 0 ? void 0 : _p$typeNos2.includes(typeNo)));
18083
+ }).map(function (p) {
18084
+ return {
18085
+ Value: DivaUtils__default["default"].getLocals(p.value, lang),
18086
+ Codex: p.key,
18087
+ Name: DivaUtils__default["default"].getLocals(p.name, lang),
18088
+ Value_locales: p.valueLocales
18089
+ };
18090
+ });
18091
+ }
18092
+ function getPropertiesForOptionKey(properties, featureNo, optionKey, lang) {
18093
+ return properties.filter(function (p) {
18094
+ var _p$featureNos2, _p$optionKeys2;
18095
+ return (!((_p$featureNos2 = p.featureNos) !== null && _p$featureNos2 !== void 0 && _p$featureNos2.length) || featureNo !== undefined && p.featureNos.includes(featureNo)) && ((_p$optionKeys2 = p.optionKeys) === null || _p$optionKeys2 === void 0 ? void 0 : _p$optionKeys2.includes(optionKey));
18096
+ }).map(function (p) {
18097
+ return {
18098
+ Value: DivaUtils__default["default"].getLocals(p.value, lang),
18099
+ Codex: p.key,
18100
+ Name: DivaUtils__default["default"].getLocals(p.name, lang),
18101
+ Value_locales: p.valueLocales
18102
+ };
18103
+ });
18104
+ }
18105
+ function getPropertiesForSerieNo(properties, serieNo, lang) {
18106
+ return properties.filter(function (p) {
18107
+ var _p$serieNos;
18108
+ return (_p$serieNos = p.serieNos) === null || _p$serieNos === void 0 ? void 0 : _p$serieNos.includes(serieNo);
18109
+ }).map(function (p) {
18110
+ return {
18111
+ Value: DivaUtils__default["default"].getLocals(p.value, lang),
18112
+ Codex: p.key,
18113
+ Name: DivaUtils__default["default"].getLocals(p.name, lang),
18114
+ Value_locales: p.valueLocales
18115
+ };
18116
+ });
18117
+ }
18118
+ function getPropertiesForItemNo(properties, itemNo, lang) {
18119
+ return properties.filter(function (p) {
18120
+ var _p$typeNos3;
18121
+ return (_p$typeNos3 = p.typeNos) === null || _p$typeNos3 === void 0 ? void 0 : _p$typeNos3.includes(itemNo);
18122
+ }).map(function (p) {
18123
+ return {
18124
+ Value: DivaUtils__default["default"].getLocals(p.value, lang),
18125
+ Codex: p.key,
18126
+ Name: DivaUtils__default["default"].getLocals(p.name, lang),
18127
+ Value_locales: p.valueLocales
18128
+ };
18129
+ });
18130
+ }
17871
18131
 
17872
18132
  var ArticleOptionValueData = /*#__PURE__*/function () {
17873
- function ArticleOptionValueData(opv) {
18133
+ function ArticleOptionValueData(opv, catalogData) {
18134
+ var _this$opv$property;
17874
18135
  _classCallCheck__default["default"](this, ArticleOptionValueData);
17875
18136
  _defineProperty__default["default"](this, "opv", void 0);
17876
18137
  this.opv = opv;
18138
+ setOptionValueProperties(catalogData, this.opv.propertyObj, (_this$opv$property = this.opv.property) !== null && _this$opv$property !== void 0 ? _this$opv$property : []);
17877
18139
  }
17878
18140
  return _createClass__default["default"](ArticleOptionValueData, [{
17879
18141
  key: "initOPVsInOPG",
@@ -17896,6 +18158,7 @@ var ArticleOptionValueData = /*#__PURE__*/function () {
17896
18158
  key: "isNotRelevant",
17897
18159
  get: function get() {
17898
18160
  var _this$opv$catalogOPV$, _this$ocd;
18161
+ if (this.opv.propertyObj.isNotRelevant !== undefined) return this.opv.propertyObj.isNotRelevant;
17899
18162
  return (_this$opv$catalogOPV$ = this.opv.catalogOPV.isNotRelevant) !== null && _this$opv$catalogOPV$ !== void 0 ? _this$opv$catalogOPV$ : ['OPVNR', 'OPVNRR', 'OPVNR_0'].includes((_this$ocd = this.ocd) !== null && _this$ocd !== void 0 ? _this$ocd : this.codex);
17900
18163
  }
17901
18164
  }, {
@@ -18057,11 +18320,13 @@ var ArticleOptionValueData = /*#__PURE__*/function () {
18057
18320
  }, {
18058
18321
  key: "contentItemId",
18059
18322
  get: function get() {
18323
+ if (this.opv.propertyObj.contentItemId !== undefined) return this.opv.propertyObj.contentItemId;
18060
18324
  return this.opv.catalogOPV.contentItemId;
18061
18325
  }
18062
18326
  }, {
18063
18327
  key: "groupContentItemId",
18064
18328
  get: function get() {
18329
+ if (this.opv.propertyObj.groupContentItemId !== undefined) return this.opv.propertyObj.groupContentItemId;
18065
18330
  return this.opv.catalogOPV.groupContentItemId;
18066
18331
  }
18067
18332
  }, {
@@ -18077,6 +18342,7 @@ var ArticleOptionValueData = /*#__PURE__*/function () {
18077
18342
  }, {
18078
18343
  key: "addToMeasure",
18079
18344
  get: function get() {
18345
+ if (this.opv.propertyObj.addToMeasure !== undefined) return this.opv.propertyObj.addToMeasure;
18080
18346
  return this.opv.catalogOPV.addToMeasure;
18081
18347
  }
18082
18348
  }, {
@@ -18174,11 +18440,13 @@ var ArticleOptionValueData = /*#__PURE__*/function () {
18174
18440
  }, {
18175
18441
  key: "url",
18176
18442
  get: function get() {
18443
+ if (this.opv.propertyObj.url !== undefined) return this.opv.propertyObj.url;
18177
18444
  return this.opv.catalogOPV.url;
18178
18445
  }
18179
18446
  }, {
18180
18447
  key: "pdfUrl",
18181
18448
  get: function get() {
18449
+ if (this.opv.propertyObj.pdfUrl !== undefined) return this.opv.propertyObj.pdfUrl;
18182
18450
  return this.opv.catalogOPV.pdfUrl;
18183
18451
  }
18184
18452
  }, {
@@ -18194,6 +18462,7 @@ var ArticleOptionValueData = /*#__PURE__*/function () {
18194
18462
  }, {
18195
18463
  key: "sameopv",
18196
18464
  get: function get() {
18465
+ if (this.opv.propertyObj.sameopv !== undefined) return this.opv.propertyObj.sameopv;
18197
18466
  return this.opv.catalogOPV.sameopv;
18198
18467
  }
18199
18468
  }, {
@@ -18204,26 +18473,31 @@ var ArticleOptionValueData = /*#__PURE__*/function () {
18204
18473
  }, {
18205
18474
  key: "onlyVisibleIfNotDocked",
18206
18475
  get: function get() {
18476
+ if (this.opv.propertyObj.onlyVisibleIfNotDocked !== undefined) return this.opv.propertyObj.onlyVisibleIfNotDocked;
18207
18477
  return this.opv.catalogOPV.onlyVisibleIfNotDocked;
18208
18478
  }
18209
18479
  }, {
18210
18480
  key: "defaultValue",
18211
18481
  get: function get() {
18482
+ if (this.opv.propertyObj.defaultValue !== undefined) return this.opv.propertyObj.defaultValue;
18212
18483
  return this.opv.catalogOPV.defaultValue;
18213
18484
  }
18214
18485
  }, {
18215
18486
  key: "summaryCodex",
18216
18487
  get: function get() {
18488
+ if (this.opv.propertyObj.summaryCodex !== undefined) return this.opv.propertyObj.summaryCodex;
18217
18489
  return this.opv.catalogOPV.summaryCodex;
18218
18490
  }
18219
18491
  }, {
18220
18492
  key: "viewPointName",
18221
18493
  get: function get() {
18494
+ if (this.opv.propertyObj.viewPointName !== undefined) return this.opv.propertyObj.viewPointName;
18222
18495
  return this.opv.catalogOPV.viewPointName;
18223
18496
  }
18224
18497
  }, {
18225
18498
  key: "hideInSummary",
18226
18499
  get: function get() {
18500
+ if (this.opv.propertyObj.hideInSummary !== undefined) return this.opv.propertyObj.hideInSummary;
18227
18501
  return this.opv.catalogOPV.hideInSummary;
18228
18502
  }
18229
18503
  }, {
@@ -18234,36 +18508,43 @@ var ArticleOptionValueData = /*#__PURE__*/function () {
18234
18508
  }, {
18235
18509
  key: "isPIMFlatValue",
18236
18510
  get: function get() {
18511
+ if (this.opv.propertyObj.isPIMFlatValue !== undefined) return this.opv.propertyObj.isPIMFlatValue;
18237
18512
  return this.opv.isPIMFlatValue || this.opv.catalogOPV.isPIMFlatValue;
18238
18513
  }
18239
18514
  }, {
18240
18515
  key: "isVariantAttribute",
18241
18516
  get: function get() {
18517
+ if (this.opv.propertyObj.isVariantAttribute !== undefined) return this.opv.propertyObj.isVariantAttribute;
18242
18518
  return this.opv.isVariantAttribute || this.opv.catalogOPV.isVariantAttribute;
18243
18519
  }
18244
18520
  }, {
18245
18521
  key: "setName",
18246
18522
  get: function get() {
18523
+ if (this.opv.propertyObj.setName !== undefined) return this.opv.propertyObj.setName;
18247
18524
  return this.opv.catalogOPV.setName;
18248
18525
  }
18249
18526
  }, {
18250
18527
  key: "setConfig",
18251
18528
  get: function get() {
18529
+ if (this.opv.propertyObj.setConfig !== undefined) return this.opv.propertyObj.setConfig;
18252
18530
  return this.opv.catalogOPV.setConfig;
18253
18531
  }
18254
18532
  }, {
18255
18533
  key: "setByRule",
18256
18534
  get: function get() {
18535
+ if (this.opv.propertyObj.setByRule !== undefined) return this.opv.propertyObj.setByRule;
18257
18536
  return this.opv.catalogOPV.setByRule;
18258
18537
  }
18259
18538
  }, {
18260
18539
  key: "onRule",
18261
18540
  get: function get() {
18541
+ if (this.opv.propertyObj.onRule !== undefined) return this.opv.propertyObj.onRule;
18262
18542
  return this.opv.catalogOPV.onRule;
18263
18543
  }
18264
18544
  }, {
18265
18545
  key: "customDimension",
18266
18546
  get: function get() {
18547
+ if (this.opv.propertyObj.customDimension !== undefined) return this.opv.propertyObj.customDimension;
18267
18548
  return this.opv.catalogOPV.customDimension;
18268
18549
  }
18269
18550
  }]);
@@ -18273,8 +18554,8 @@ function _createForOfIteratorHelper$a(r, e) { var t = "undefined" != typeof Symb
18273
18554
  function _unsupportedIterableToArray$a(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$a(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$a(r, a) : void 0; } }
18274
18555
  function _arrayLikeToArray$a(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
18275
18556
  var ArticleOptionData = /*#__PURE__*/function () {
18276
- function ArticleOptionData(opt) {
18277
- var _this$tabGroup;
18557
+ function ArticleOptionData(opt, catalogData) {
18558
+ var _this$tabGroup, _this$opt$property;
18278
18559
  _classCallCheck__default["default"](this, ArticleOptionData);
18279
18560
  _defineProperty__default["default"](this, "opt", void 0);
18280
18561
  this.opt = opt;
@@ -18285,6 +18566,7 @@ var ArticleOptionData = /*#__PURE__*/function () {
18285
18566
  } else {
18286
18567
  this.opt.subTabGroup = undefined;
18287
18568
  }
18569
+ setOptionsProperties(catalogData, this.opt.propertyObj, (_this$opt$property = this.opt.property) !== null && _this$opt$property !== void 0 ? _this$opt$property : []);
18288
18570
  }
18289
18571
  return _createClass__default["default"](ArticleOptionData, [{
18290
18572
  key: "initOPVsInOPT",
@@ -18468,6 +18750,7 @@ var ArticleOptionData = /*#__PURE__*/function () {
18468
18750
  }, {
18469
18751
  key: "isDefaultSiblingOption",
18470
18752
  get: function get() {
18753
+ if (this.opt.propertyObj.isDefaultSiblingOption !== undefined) return this.opt.propertyObj.isDefaultSiblingOption;
18471
18754
  return this.opt.catalogOPT.isDefaultSiblingOption;
18472
18755
  }
18473
18756
  }, {
@@ -18478,11 +18761,13 @@ var ArticleOptionData = /*#__PURE__*/function () {
18478
18761
  }, {
18479
18762
  key: "pairWithOptionsToGroup",
18480
18763
  get: function get() {
18764
+ if (this.opt.propertyObj.pairWithOptionsToGroup !== undefined) return this.opt.propertyObj.pairWithOptionsToGroup;
18481
18765
  return this.opt.catalogOPT.pairWithOptionsToGroup;
18482
18766
  }
18483
18767
  }, {
18484
18768
  key: "isDescribingState",
18485
18769
  get: function get() {
18770
+ if (this.opt.propertyObj.isDescribingState !== undefined) return this.opt.propertyObj.isDescribingState;
18486
18771
  return this.opt.catalogOPT.isDescribingState;
18487
18772
  }
18488
18773
  }, {
@@ -18493,51 +18778,61 @@ var ArticleOptionData = /*#__PURE__*/function () {
18493
18778
  }, {
18494
18779
  key: "requiresUserInput",
18495
18780
  get: function get() {
18781
+ if (this.opt.propertyObj.requiresUserInput !== undefined) return this.opt.propertyObj.requiresUserInput;
18496
18782
  return this.opt.catalogOPT.requiresUserInput;
18497
18783
  }
18498
18784
  }, {
18499
18785
  key: "onlyVisibleIfNotDocked",
18500
18786
  get: function get() {
18787
+ if (this.opt.propertyObj.onlyVisibleIfNotDocked !== undefined) return this.opt.propertyObj.onlyVisibleIfNotDocked;
18501
18788
  return this.opt.catalogOPT.onlyVisibleIfNotDocked;
18502
18789
  }
18503
18790
  }, {
18504
18791
  key: "onlyVisibleIfConfigSingle",
18505
18792
  get: function get() {
18793
+ if (this.opt.propertyObj.onlyVisibleIfConfigSingle !== undefined) return this.opt.propertyObj.onlyVisibleIfConfigSingle;
18506
18794
  return this.opt.catalogOPT.onlyVisibleIfConfigSingle;
18507
18795
  }
18508
18796
  }, {
18509
18797
  key: "onlyVisibleIfConfigAll",
18510
18798
  get: function get() {
18799
+ if (this.opt.propertyObj.onlyVisibleIfConfigAll !== undefined) return this.opt.propertyObj.onlyVisibleIfConfigAll;
18511
18800
  return this.opt.catalogOPT.onlyVisibleIfConfigAll;
18512
18801
  }
18513
18802
  }, {
18514
18803
  key: "isDefaultValueForOptions",
18515
18804
  get: function get() {
18805
+ if (this.opt.propertyObj.isDefaultValueForOptions !== undefined) return this.opt.propertyObj.isDefaultValueForOptions;
18516
18806
  return this.opt.catalogOPT.isDefaultValueForOptions;
18517
18807
  }
18518
18808
  }, {
18519
18809
  key: "freetextDefaultValue",
18520
18810
  get: function get() {
18811
+ if (this.opt.propertyObj.freetextDefaultValue !== undefined) return this.opt.propertyObj.freetextDefaultValue;
18521
18812
  return this.opt.catalogOPT.freetextDefaultValue;
18522
18813
  }
18523
18814
  }, {
18524
18815
  key: "url",
18525
18816
  get: function get() {
18817
+ if (this.opt.propertyObj.url !== undefined) return this.opt.propertyObj.url;
18526
18818
  return this.opt.catalogOPT.url;
18527
18819
  }
18528
18820
  }, {
18529
18821
  key: "contentItemId",
18530
18822
  get: function get() {
18823
+ if (this.opt.propertyObj.contentItemId !== undefined) return this.opt.propertyObj.contentItemId;
18531
18824
  return this.opt.catalogOPT.contentItemId;
18532
18825
  }
18533
18826
  }, {
18534
18827
  key: "customDimension",
18535
18828
  get: function get() {
18829
+ if (this.opt.propertyObj.customDimension !== undefined) return this.opt.propertyObj.customDimension;
18536
18830
  return this.opt.catalogOPT.customDimension;
18537
18831
  }
18538
18832
  }, {
18539
18833
  key: "customDimensionText",
18540
18834
  get: function get() {
18835
+ if (this.opt.propertyObj.customDimensionText !== undefined) return this.opt.propertyObj.customDimensionText;
18541
18836
  return this.opt.catalogOPT.customDimensionText;
18542
18837
  }
18543
18838
  }, {
@@ -18548,51 +18843,61 @@ var ArticleOptionData = /*#__PURE__*/function () {
18548
18843
  }, {
18549
18844
  key: "showSearchbar",
18550
18845
  get: function get() {
18846
+ if (this.opt.propertyObj.showSearchbar !== undefined) return this.opt.propertyObj.showSearchbar;
18551
18847
  return this.opt.catalogOPT.showSearchbar;
18552
18848
  }
18553
18849
  }, {
18554
18850
  key: "showFilter",
18555
18851
  get: function get() {
18852
+ if (this.opt.propertyObj.showFilter !== undefined) return this.opt.propertyObj.showFilter;
18556
18853
  return this.opt.catalogOPT.showFilter;
18557
18854
  }
18558
18855
  }, {
18559
18856
  key: "pdfUrl",
18560
18857
  get: function get() {
18858
+ if (this.opt.propertyObj.pdfUrl !== undefined) return this.opt.propertyObj.pdfUrl;
18561
18859
  return this.opt.catalogOPT.pdfUrl;
18562
18860
  }
18563
18861
  }, {
18564
18862
  key: "diameter",
18565
18863
  get: function get() {
18864
+ if (this.opt.propertyObj.diameter !== undefined) return this.opt.propertyObj.diameter;
18566
18865
  return this.opt.catalogOPT.diameter;
18567
18866
  }
18568
18867
  }, {
18569
18868
  key: "forceShowVariantDesc",
18570
18869
  get: function get() {
18870
+ if (this.opt.propertyObj.forceShowVariantDesc !== undefined) return this.opt.propertyObj.forceShowVariantDesc;
18571
18871
  return this.opt.catalogOPT.forceShowVariantDesc;
18572
18872
  }
18573
18873
  }, {
18574
18874
  key: "showOnSeparatTabgroup",
18575
18875
  get: function get() {
18876
+ if (this.opt.propertyObj.showOnSeparatTabgroup !== undefined) return this.opt.propertyObj.showOnSeparatTabgroup;
18576
18877
  return this.opt.catalogOPT.showOnSeparatTabgroup;
18577
18878
  }
18578
18879
  }, {
18579
18880
  key: "setName",
18580
18881
  get: function get() {
18882
+ if (this.opt.propertyObj.setName !== undefined) return this.opt.propertyObj.setName;
18581
18883
  return this.opt.catalogOPT.setName;
18582
18884
  }
18583
18885
  }, {
18584
18886
  key: "addOptionToTabgroupInPartlistSummary",
18585
18887
  get: function get() {
18888
+ if (this.opt.propertyObj.addOptionToTabgroupInPartlistSummary !== undefined) return this.opt.propertyObj.addOptionToTabgroupInPartlistSummary;
18586
18889
  return this.opt.catalogOPT.addOptionToTabgroupInPartlistSummary;
18587
18890
  }
18588
18891
  }, {
18589
18892
  key: "addToWWS",
18590
18893
  get: function get() {
18894
+ if (this.opt.propertyObj.addToWWS !== undefined) return this.opt.propertyObj.addToWWS;
18591
18895
  return this.opt.catalogOPT.addToWWS;
18592
18896
  }
18593
18897
  }, {
18594
18898
  key: "sendToPIM",
18595
18899
  get: function get() {
18900
+ if (this.opt.propertyObj.sendToPIM !== undefined) return this.opt.propertyObj.sendToPIM;
18596
18901
  return this.opt.catalogOPT.sendToPIM;
18597
18902
  }
18598
18903
  }, {
@@ -18603,16 +18908,19 @@ var ArticleOptionData = /*#__PURE__*/function () {
18603
18908
  }, {
18604
18909
  key: "ignoreGroups",
18605
18910
  get: function get() {
18911
+ if (this.opt.propertyObj.ignoreGroups !== undefined) return this.opt.propertyObj.ignoreGroups;
18606
18912
  return this.opt.catalogOPT.ignoreGroups;
18607
18913
  }
18608
18914
  }, {
18609
18915
  key: "ignorePgrGroupPosition",
18610
18916
  get: function get() {
18917
+ if (this.opt.propertyObj.ignorePgrGroupPosition !== undefined) return this.opt.propertyObj.ignorePgrGroupPosition;
18611
18918
  return this.opt.catalogOPT.ignorePgrGroupPosition;
18612
18919
  }
18613
18920
  }, {
18614
18921
  key: "mergeIDMToOPG",
18615
18922
  get: function get() {
18923
+ if (this.opt.propertyObj.mergeIDMToOPG !== undefined) return this.opt.propertyObj.mergeIDMToOPG;
18616
18924
  return this.opt.catalogOPT.mergeIDMToOPG;
18617
18925
  }
18618
18926
  }, {
@@ -18628,14 +18936,14 @@ var ArticleOptionData = /*#__PURE__*/function () {
18628
18936
  }();
18629
18937
 
18630
18938
  var LOG$l = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
18631
- function addSupplierColors(catalogArticleData, allOPVsOfOPT, supplierColors, catalog, newOPT, rule) {
18939
+ function addSupplierColors(set, catalogArticleData, allOPVsOfOPT, supplierColors, catalog, newOPT, rule) {
18632
18940
  var catalogOPG = new OptionValueCatalogData(getCatalogOptionValueDataType('OPVSUPPLIER_COLORS', {
18633
18941
  Name: 'Lieferantenfarben',
18634
18942
  IsOPVG: '1'
18635
18943
  }, catalog), catalog);
18636
- var articleOPG = new ArticleOptionValueData(getArticleOptionValueType('OPVSUPPLIER_COLORS', {
18944
+ var articleOPG = new ArticleOptionValueData(getArticleOptionValueType(set, 'OPVSUPPLIER_COLORS', {
18637
18945
  RUL: rule
18638
- }, catalogOPG, catalogArticleData, false, newOPT, catalog.multiselectOptions));
18946
+ }, catalogOPG, catalogArticleData, false, newOPT, catalog.multiselectOptions), catalog);
18639
18947
  allOPVsOfOPT.set('OPVSUPPLIER_COLORS', articleOPG);
18640
18948
  var supplierColorsOpvs = new Map();
18641
18949
  for (var i = 0; i < supplierColors.length; i++) {
@@ -18646,7 +18954,7 @@ function addSupplierColors(catalogArticleData, allOPVsOfOPT, supplierColors, cat
18646
18954
  HexColor: col.HexColor,
18647
18955
  GroupName: 'Lieferantenfarben'
18648
18956
  }, catalog), catalog);
18649
- supplierColorsOpvs.set('OPV' + col.OptionValueCodex, new ArticleOptionValueData(getArticleOptionValueType('OPV' + col.OptionValueCodex, {}, colorCatalogOpv, catalogArticleData, true, articleOPG, catalog.multiselectOptions)));
18957
+ supplierColorsOpvs.set('OPV' + col.OptionValueCodex, new ArticleOptionValueData(getArticleOptionValueType(set, 'OPV' + col.OptionValueCodex, {}, colorCatalogOpv, catalogArticleData, true, articleOPG, catalog.multiselectOptions), catalog));
18650
18958
  }
18651
18959
  articleOPG.initOPVsInOPG(supplierColorsOpvs);
18652
18960
  }
@@ -18803,7 +19111,7 @@ function loadArticleOptions(json, catalogArticleData, set) {
18803
19111
  for (var i = 0; i < json.OPT.length; i++) {
18804
19112
  var myOPT = json.OPT[i];
18805
19113
  var allOPVsOfOPT = new Map();
18806
- var newOPT = new ArticleOptionData(getArticleOptionType(myOPT, set));
19114
+ var newOPT = new ArticleOptionData(getArticleOptionType(myOPT, set, catalogArticleData.articleCodex), set.CatalogData);
18807
19115
 
18808
19116
  //Items initalisieren
18809
19117
  if (newOPT.hasOPG) {
@@ -18813,14 +19121,14 @@ function loadArticleOptions(json, catalogArticleData, set) {
18813
19121
  var tmpOPG = myOPT.OPG[j],
18814
19122
  catOPG = set.CatalogData.getOptionValue(tmpOPG.OCD ? tmpOPG.OCD : tmpOPG.Codex);
18815
19123
  if (catOPG) {
18816
- var newOPG = new ArticleOptionValueData(getArticleOptionValueType(tmpOPG.Codex, tmpOPG, catOPG, catalogArticleData, false, newOPT, multiselectOptions));
19124
+ var newOPG = new ArticleOptionValueData(getArticleOptionValueType(set, tmpOPG.Codex, tmpOPG, catOPG, catalogArticleData, false, newOPT, multiselectOptions), set.CatalogData);
18817
19125
  allOPVsOfOPT.set(tmpOPG.Codex, newOPG);
18818
19126
  for (var m = 0; m < tmpOPG.OPV.length; m++) {
18819
19127
  var tmpOPV = tmpOPG.OPV[m],
18820
19128
  catOPV = set.CatalogData.getOptionValue(tmpOPV.OCD ? tmpOPV.OCD : tmpOPV.Codex);
18821
19129
  if (catOPV) {
18822
19130
  if (!(catOPV !== null && catOPV !== void 0 && catOPV.groupName) && catOPG) catOPV.groupName = catOPG.name;
18823
- var myOPV = new ArticleOptionValueData(getArticleOptionValueType(tmpOPV.Codex, tmpOPV, catOPV, catalogArticleData, true, newOPG, multiselectOptions));
19131
+ var myOPV = new ArticleOptionValueData(getArticleOptionValueType(set, tmpOPV.Codex, tmpOPV, catOPV, catalogArticleData, true, newOPG, multiselectOptions), set.CatalogData);
18824
19132
  allOPVsOfOPG.set(tmpOPV.Codex, myOPV);
18825
19133
  }
18826
19134
  }
@@ -18833,11 +19141,11 @@ function loadArticleOptions(json, catalogArticleData, set) {
18833
19141
  var _tmpOPG = myOPT.OPV[_j],
18834
19142
  _catOPG = set.CatalogData.getOptionValue(_tmpOPG.OCD ? _tmpOPG.OCD : _tmpOPG.Codex);
18835
19143
  if (_catOPG) {
18836
- var _newOPG = new ArticleOptionValueData(getArticleOptionValueType(_tmpOPG.Codex, _tmpOPG, _catOPG, catalogArticleData, false, newOPT, multiselectOptions));
19144
+ var _newOPG = new ArticleOptionValueData(getArticleOptionValueType(set, _tmpOPG.Codex, _tmpOPG, _catOPG, catalogArticleData, false, newOPT, multiselectOptions), set.CatalogData);
18837
19145
  allOPVsOfOPT.set(_tmpOPG.Codex, _newOPG);
18838
19146
  var _catOPV = set.CatalogData.getOptionValue(_tmpOPG.OCD ? _tmpOPG.OCD : _tmpOPG.Codex);
18839
19147
  if (_catOPV) {
18840
- var _myOPV = new ArticleOptionValueData(getArticleOptionValueType(_tmpOPG.Codex, _tmpOPG, _catOPV, catalogArticleData, true, _newOPG, multiselectOptions));
19148
+ var _myOPV = new ArticleOptionValueData(getArticleOptionValueType(set, _tmpOPG.Codex, _tmpOPG, _catOPV, catalogArticleData, true, _newOPG, multiselectOptions), set.CatalogData);
18841
19149
  _allOPVsOfOPG.set(_tmpOPG.Codex, _myOPV);
18842
19150
  }
18843
19151
  _newOPG.initOPVsInOPG(_allOPVsOfOPG);
@@ -18849,7 +19157,7 @@ function loadArticleOptions(json, catalogArticleData, set) {
18849
19157
  var _tmpOPV = myOPT.OPV[_j2],
18850
19158
  _catOPV2 = set.CatalogData.getOptionValue(_tmpOPV.OCD ? _tmpOPV.OCD : _tmpOPV.Codex);
18851
19159
  if (_catOPV2) {
18852
- var _myOPV2 = new ArticleOptionValueData(getArticleOptionValueType(_tmpOPV.Codex, _tmpOPV, _catOPV2, catalogArticleData, true, newOPT, multiselectOptions));
19160
+ var _myOPV2 = new ArticleOptionValueData(getArticleOptionValueType(set, _tmpOPV.Codex, _tmpOPV, _catOPV2, catalogArticleData, true, newOPT, multiselectOptions), set.CatalogData);
18853
19161
  allOPVsOfOPT.set(_tmpOPV.Codex, _myOPV2);
18854
19162
  }
18855
19163
  }
@@ -18860,7 +19168,7 @@ function loadArticleOptions(json, catalogArticleData, set) {
18860
19168
  return (_item$codex = item.codex) === null || _item$codex === void 0 ? void 0 : _item$codex.endsWith('OPV_FARBE_BASIS');
18861
19169
  });
18862
19170
  if (supplierColorFound) {
18863
- addSupplierColors(catalogArticleData, allOPVsOfOPT, set.supplierColors, set.CatalogData, newOPT, supplierColorFound.rul);
19171
+ addSupplierColors(set, catalogArticleData, allOPVsOfOPT, set.supplierColors, set.CatalogData, newOPT, supplierColorFound.rul);
18864
19172
  }
18865
19173
  }
18866
19174
  newOPT.initOPVsInOPT(allOPVsOfOPT);
@@ -18970,13 +19278,15 @@ function initDecisions(catalog, catalogArticleData) {
18970
19278
  }
18971
19279
  }
18972
19280
  }
18973
- function getArticleOptionType(myOPT, set) {
18974
- var _set$CatalogData$cata, _set$CatalogData$cata2, _set$CatalogData$cata3, _optionMask$hidden;
19281
+ function getArticleOptionType(myOPT, set, articleCodex) {
19282
+ var _set$CatalogData$cata, _set$CatalogData$cata2, _set$CatalogData$cata3, _set$CatalogData$cata4, _set$CatalogData$cata5, _myOPT$Properties, _optionMask$hidden;
18975
19283
  var OP = myOPT.OCD ? myOPT.OCD : myOPT.Codex;
18976
19284
  var catOPT = set.CatalogData.getOption(OP);
18977
19285
  var optionMask = (_set$CatalogData$cata = (_set$CatalogData$cata2 = set.CatalogData.catalogMask) === null || _set$CatalogData$cata2 === void 0 || (_set$CatalogData$cata2 = _set$CatalogData$cata2.options) === null || _set$CatalogData$cata2 === void 0 ? void 0 : _set$CatalogData$cata2[OP]) !== null && _set$CatalogData$cata !== void 0 ? _set$CatalogData$cata : OP.startsWith('OPT') ? (_set$CatalogData$cata3 = set.CatalogData.catalogMask) === null || _set$CatalogData$cata3 === void 0 || (_set$CatalogData$cata3 = _set$CatalogData$cata3.options) === null || _set$CatalogData$cata3 === void 0 ? void 0 : _set$CatalogData$cata3[OP.substring(3)] : undefined;
18978
19286
  if (!catOPT) throw new Error('Option: ' + OP + ' not in CatalogData');
18979
19287
  var optHasOpg = myOPT.OPG && myOPT.OPG.length > 0;
19288
+ var maskProperties = getPropertiesForFeatureNo((_set$CatalogData$cata4 = (_set$CatalogData$cata5 = set.CatalogData.catalogMask) === null || _set$CatalogData$cata5 === void 0 ? void 0 : _set$CatalogData$cata5.properties) !== null && _set$CatalogData$cata4 !== void 0 ? _set$CatalogData$cata4 : [], articleCodex, OP, set.CatalogData.api.getLanguage());
19289
+ var properties = [].concat(_toConsumableArray__default["default"]((_myOPT$Properties = myOPT.Properties) !== null && _myOPT$Properties !== void 0 ? _myOPT$Properties : []), _toConsumableArray__default["default"](maskProperties !== null && maskProperties !== void 0 ? maskProperties : []));
18980
19290
  return {
18981
19291
  codex: myOPT.Codex,
18982
19292
  catalogOPT: catOPT,
@@ -18990,10 +19300,14 @@ function getArticleOptionType(myOPT, set) {
18990
19300
  articlePlaceholder: myOPT.ArticlePlaceholder,
18991
19301
  hasOPG: optHasOpg,
18992
19302
  invisible: (_optionMask$hidden = optionMask === null || optionMask === void 0 ? void 0 : optionMask.hidden) !== null && _optionMask$hidden !== void 0 ? _optionMask$hidden : myOPT.Invisible == 'True' ? true : myOPT.Invisible == 'False' ? false : undefined,
18993
- parentOptionCodex: myOPT.ParentOptionCodex
19303
+ parentOptionCodex: myOPT.ParentOptionCodex,
19304
+ propertyObj: {},
19305
+ property: properties
18994
19306
  };
18995
19307
  }
18996
- function getArticleOptionValueType(codex, jsonOPV, catalogOPV, myArticle, isParentOPVG, parent, multiselectOptions) {
19308
+ function getArticleOptionValueType(set, codex, jsonOPV, catalogOPV, myArticle, isParentOPVG, parent, multiselectOptions) {
19309
+ var _set$CatalogData$cata6, _set$CatalogData$cata7;
19310
+ var maskProperties = getPropertiesForOptionKey((_set$CatalogData$cata6 = (_set$CatalogData$cata7 = set.CatalogData.catalogMask) === null || _set$CatalogData$cata7 === void 0 ? void 0 : _set$CatalogData$cata7.properties) !== null && _set$CatalogData$cata6 !== void 0 ? _set$CatalogData$cata6 : [], parent.codex, codex, set.CatalogData.api.getLanguage());
18997
19311
  var opv = {
18998
19312
  codex: codex,
18999
19313
  catalogOPV: catalogOPV,
@@ -19019,7 +19333,9 @@ function getArticleOptionValueType(codex, jsonOPV, catalogOPV, myArticle, isPare
19019
19333
  ocd: jsonOPV.OCD,
19020
19334
  quantity: jsonOPV.Quantity ? Number(jsonOPV.Quantity) : 1,
19021
19335
  isPIMFlatValue: jsonOPV.PIMFlatValues === 'True',
19022
- isVariantAttribute: jsonOPV.IsVariantAttribute
19336
+ isVariantAttribute: jsonOPV.IsVariantAttribute,
19337
+ propertyObj: {},
19338
+ property: maskProperties !== null && maskProperties !== void 0 ? maskProperties : []
19023
19339
  };
19024
19340
  var myPriceRef = null;
19025
19341
  var myBasePriceRef = null;
@@ -19466,18 +19782,19 @@ var initFeature = function initFeature(feature, catalogArticleData, set) {
19466
19782
  catFeature = new OptionCatalogData(getCatalogFeatureType(feature, catalogArticleData, set), set.CatalogData);
19467
19783
  set.CatalogData.setOption(catFeature);
19468
19784
  }
19469
- var newArticleFeature = new ArticleOptionData(getArticleFeatureType(feature, catalogArticleData, catFeature, set));
19785
+ var newArticleFeature = new ArticleOptionData(getArticleFeatureType(feature, catalogArticleData, catFeature, set), set.CatalogData);
19470
19786
  initOption(feature, newArticleFeature, catalogArticleData, set);
19471
19787
  catalogArticleData.articleOptions[newArticleFeature.codex] = newArticleFeature;
19472
19788
  };
19473
19789
  function getCatalogFeatureType(feature, catalogArticleData, set) {
19474
- var _set$CatalogData$cata, _feature$detailInfos, _ref, _feature$properties, _feature$options$, _optionMask$hidden;
19790
+ var _set$CatalogData$cata, _set$CatalogData$cata2, _set$CatalogData$cata3, _feature$detailInfos, _properties$find, _properties$find2, _ref, _properties$find3, _feature$options$, _optionMask$hidden;
19475
19791
  var featureClass = set.CatalogData.getFeatureClass(catalogArticleData.featureClassRefNo);
19476
19792
  var optionMask = (_set$CatalogData$cata = set.CatalogData.catalogMask) === null || _set$CatalogData$cata === void 0 || (_set$CatalogData$cata = _set$CatalogData$cata.options) === null || _set$CatalogData$cata === void 0 ? void 0 : _set$CatalogData$cata[feature.featureNo];
19793
+ var maskProperties = getPropertiesForFeatureNo((_set$CatalogData$cata2 = (_set$CatalogData$cata3 = set.CatalogData.catalogMask) === null || _set$CatalogData$cata3 === void 0 ? void 0 : _set$CatalogData$cata3.properties) !== null && _set$CatalogData$cata2 !== void 0 ? _set$CatalogData$cata2 : [], undefined, feature.featureNo, set.CatalogData.api.getLanguage());
19794
+ var properties = [].concat(_toConsumableArray__default["default"](convertProperties(feature.properties, set.api.getLanguageLowercase())), _toConsumableArray__default["default"](maskProperties !== null && maskProperties !== void 0 ? maskProperties : []));
19477
19795
  return {
19478
19796
  name: DivaUtils__default["default"].getLocals(feature.featureText, set.api.getLanguageLowercase()),
19479
19797
  origName: DivaUtils__default["default"].getLocals(feature.featureText, set.api.getLanguageLowercase()),
19480
- property: convertProperties(feature.properties, set.api.getLanguageLowercase()),
19481
19798
  name_locales: feature.featureText,
19482
19799
  codex: feature.featureNo,
19483
19800
  idmVariantenArt: feature.featureNo ? Number(feature.featureNo) : undefined,
@@ -19487,23 +19804,32 @@ function getCatalogFeatureType(feature, catalogArticleData, set) {
19487
19804
  headerPosVariationType: feature.headerPosVariationType,
19488
19805
  measureKey: feature.measureParameter,
19489
19806
  sequenceNo: feature.sequenceNo,
19490
- layout: (_ref = (_feature$properties = feature.properties) === null || _feature$properties === void 0 || (_feature$properties = _feature$properties.find(function (p) {
19491
- return p.key == 'LAYOUT';
19492
- })) === null || _feature$properties === void 0 ? void 0 : _feature$properties.value) !== null && _ref !== void 0 ? _ref : (_feature$options$ = feature.options[0]) !== null && _feature$options$ !== void 0 && (_feature$options$ = _feature$options$.detailInfos) !== null && _feature$options$ !== void 0 && _feature$options$.find(function (d) {
19807
+ sendToPIM: !!(properties !== null && properties !== void 0 && (_properties$find = properties.find(function (p) {
19808
+ return p.Codex == 'SendToPim';
19809
+ })) !== null && _properties$find !== void 0 && _properties$find.Value),
19810
+ isMultiselect: !!(properties !== null && properties !== void 0 && (_properties$find2 = properties.find(function (p) {
19811
+ return p.Codex == 'Multiselect';
19812
+ })) !== null && _properties$find2 !== void 0 && _properties$find2.Value),
19813
+ layout: (_ref = properties === null || properties === void 0 || (_properties$find3 = properties.find(function (p) {
19814
+ return p.Codex == 'LAYOUT';
19815
+ })) === null || _properties$find3 === void 0 ? void 0 : _properties$find3.Value) !== null && _ref !== void 0 ? _ref : (_feature$options$ = feature.options[0]) !== null && _feature$options$ !== void 0 && (_feature$options$ = _feature$options$.detailInfos) !== null && _feature$options$ !== void 0 && _feature$options$.find(function (d) {
19493
19816
  return d.functionType == 'OPV';
19494
19817
  }) ? 'IMAGE' : 'TEXT',
19495
- invisible: (_optionMask$hidden = optionMask === null || optionMask === void 0 ? void 0 : optionMask.hidden) !== null && _optionMask$hidden !== void 0 ? _optionMask$hidden : !!(featureClass !== null && featureClass !== void 0 && featureClass.featureRefs[feature.featureNo])
19818
+ invisible: (_optionMask$hidden = optionMask === null || optionMask === void 0 ? void 0 : optionMask.hidden) !== null && _optionMask$hidden !== void 0 ? _optionMask$hidden : !!(featureClass !== null && featureClass !== void 0 && featureClass.featureRefs[feature.featureNo]),
19819
+ property: properties,
19820
+ propertyObj: {}
19496
19821
  };
19497
19822
  }
19498
19823
  function getArticleFeatureType(feature, catalogArticleData, catOPT, set) {
19499
- var _catalogArticleData$f, _set$CatalogData$tabG;
19500
- var props = (_catalogArticleData$f = catalogArticleData.featureProperties) === null || _catalogArticleData$f === void 0 ? void 0 : _catalogArticleData$f.filter(function (p) {
19824
+ var _catalogArticleData$f, _catalogArticleData$f2, _set$CatalogData$tabG, _set$CatalogData$cata4, _set$CatalogData$cata5;
19825
+ var props = (_catalogArticleData$f = (_catalogArticleData$f2 = catalogArticleData.featureProperties) === null || _catalogArticleData$f2 === void 0 ? void 0 : _catalogArticleData$f2.filter(function (p) {
19501
19826
  return p.FeatureNos.includes(feature.featureNo);
19502
- });
19827
+ })) !== null && _catalogArticleData$f !== void 0 ? _catalogArticleData$f : [];
19503
19828
  var featureClass = set.CatalogData.getFeatureClass(catalogArticleData.featureClassRefNo);
19504
19829
  var tabgroup = (_set$CatalogData$tabG = set.CatalogData.tabGroups) === null || _set$CatalogData$tabG === void 0 ? void 0 : _set$CatalogData$tabG.find(function (t) {
19505
19830
  return t.featureNos.includes(feature.featureNo);
19506
19831
  });
19832
+ var maskProperties = getPropertiesForFeatureNo((_set$CatalogData$cata4 = (_set$CatalogData$cata5 = set.CatalogData.catalogMask) === null || _set$CatalogData$cata5 === void 0 ? void 0 : _set$CatalogData$cata5.properties) !== null && _set$CatalogData$cata4 !== void 0 ? _set$CatalogData$cata4 : [], catalogArticleData.articleCodex, feature.featureNo, set.CatalogData.api.getLanguage());
19507
19833
  var opt = {
19508
19834
  codex: feature.featureNo,
19509
19835
  catalogOPT: catOPT,
@@ -19513,23 +19839,10 @@ function getArticleFeatureType(feature, catalogArticleData, catOPT, set) {
19513
19839
  hasOPG: false,
19514
19840
  invisible: !!(featureClass !== null && featureClass !== void 0 && featureClass.featureRefs[feature.featureNo]),
19515
19841
  tabGroup: tabgroup !== null && tabgroup !== void 0 && tabgroup.name ? DivaUtils__default["default"].getLocals(tabgroup.name, set.api.getLanguage()) : undefined,
19516
- tabGroup_locales: tabgroup === null || tabgroup === void 0 ? void 0 : tabgroup.name
19842
+ tabGroup_locales: tabgroup === null || tabgroup === void 0 ? void 0 : tabgroup.name,
19843
+ property: [].concat(_toConsumableArray__default["default"](maskProperties), _toConsumableArray__default["default"](props)),
19844
+ propertyObj: {}
19517
19845
  };
19518
- if (props !== null && props !== void 0 && props.length) {
19519
- for (var i = 0; i < props.length; i++) {
19520
- var prop = props[i];
19521
- switch (prop.Codex) {
19522
- case 'IsVariantAttribute': // ist in den daten?!
19523
- case 'TopFilterAttribute':
19524
- case 'PriceTageRelevant':
19525
- case 'EshopCategoryMapping':
19526
- case 'IsArtName':
19527
- break;
19528
- default:
19529
- LOG$k.debug('implement mapping for these props for options: ' + prop.Codex);
19530
- }
19531
- }
19532
- }
19533
19846
  return opt;
19534
19847
  }
19535
19848
 
@@ -19544,7 +19857,7 @@ function initOption(feature, articleFeature, catalogArticle, set) {
19544
19857
  return o.codex == option.optionKey;
19545
19858
  });
19546
19859
  if (!catOption) catOption = getCatalogOptionType(option, set);
19547
- var articleIDMOption = new ArticleOptionValueData(getArticleOption(option, catOption, articleFeature, catalogArticle));
19860
+ var articleIDMOption = new ArticleOptionValueData(getArticleOption(set, option, catOption, articleFeature, catalogArticle), set.CatalogData);
19548
19861
  allOptionsOfFeature.set(articleIDMOption.codex, articleIDMOption);
19549
19862
  };
19550
19863
  for (var j = 0; j < options.length; j++) {
@@ -19554,14 +19867,17 @@ function initOption(feature, articleFeature, catalogArticle, set) {
19554
19867
  catalogArticle.articleOptions[articleFeature.codex];
19555
19868
  }
19556
19869
  function getCatalogOptionType(option, set) {
19557
- var _option$detailInfos, _option$detailInfos2, _option$measureValue;
19870
+ var _catalogData$catalogM, _catalogData$catalogM2, _option$detailInfos, _option$detailInfos2, _option$measureValue;
19558
19871
  var catalogData = set.CatalogData;
19559
19872
  var name = DivaUtils__default["default"].getLocals(option.optionText, set.api.getLanguageLowercase());
19873
+ var maskProperties = getPropertiesForOptionKey((_catalogData$catalogM = (_catalogData$catalogM2 = catalogData.catalogMask) === null || _catalogData$catalogM2 === void 0 ? void 0 : _catalogData$catalogM2.properties) !== null && _catalogData$catalogM !== void 0 ? _catalogData$catalogM : [], undefined, option.optionKey, set.CatalogData.api.getLanguage());
19874
+ var properties = [].concat(_toConsumableArray__default["default"](convertProperties(option.properties, set.CatalogData.api.getLanguageLowercase())), _toConsumableArray__default["default"](maskProperties !== null && maskProperties !== void 0 ? maskProperties : []));
19560
19875
  var opiton = {
19561
19876
  codex: option.optionKey,
19562
19877
  name: name,
19563
19878
  origName: name,
19564
19879
  name_locales: option.optionText,
19880
+ property: properties,
19565
19881
  image: (_option$detailInfos = option.detailInfos) === null || _option$detailInfos === void 0 || (_option$detailInfos = _option$detailInfos.find(function (d) {
19566
19882
  return d.functionType == 'OPV';
19567
19883
  })) === null || _option$detailInfos === void 0 ? void 0 : _option$detailInfos.url,
@@ -19606,7 +19922,7 @@ function getCatalogOptionType(option, set) {
19606
19922
  // TODO IDM Pricelogic,
19607
19923
  value: (_option$measureValue = option.measureValue) !== null && _option$measureValue !== void 0 ? _option$measureValue : name.endsWith(' cm') && !isNaN(Number(name.replace(' cm', ''))) ? Number(name.replace(' cm', '')) : undefined,
19608
19924
  measureUnit: option.measureUnit,
19609
- property: convertProperties(option.properties, catalogData.api.getLanguageLowercase())
19925
+ propertyObj: {}
19610
19926
  };
19611
19927
  if (option.detailInfos) {
19612
19928
  for (var i = 0; i < ((_option$detailInfos3 = option.detailInfos) !== null && _option$detailInfos3 !== void 0 ? _option$detailInfos3 : []).length; i++) {
@@ -19628,11 +19944,12 @@ function getCatalogOptionType(option, set) {
19628
19944
  }
19629
19945
  return new OptionValueCatalogData(opiton, catalogData);
19630
19946
  }
19631
- function getArticleOption(option, catalogOption, feature, catalogArticleData) {
19632
- var _catalogArticleData$o;
19947
+ function getArticleOption(set, option, catalogOption, feature, catalogArticleData) {
19948
+ var _catalogArticleData$o, _set$CatalogData$cata6, _set$CatalogData$cata7;
19633
19949
  var props = (_catalogArticleData$o = catalogArticleData.optionProperties) === null || _catalogArticleData$o === void 0 ? void 0 : _catalogArticleData$o.filter(function (p) {
19634
19950
  return p.OptionKeys.includes(option.optionKey);
19635
19951
  });
19952
+ var maskProperties = getPropertiesForOptionKey((_set$CatalogData$cata6 = (_set$CatalogData$cata7 = set.CatalogData.catalogMask) === null || _set$CatalogData$cata7 === void 0 ? void 0 : _set$CatalogData$cata7.properties) !== null && _set$CatalogData$cata6 !== void 0 ? _set$CatalogData$cata6 : [], undefined, option.optionKey, set.api.getLanguage());
19636
19953
  //TODO add these props that are articleSpecific
19637
19954
  var opv = {
19638
19955
  codex: option.optionKey,
@@ -19641,25 +19958,10 @@ function getArticleOption(option, catalogOption, feature, catalogArticleData) {
19641
19958
  isParentOPVG: false,
19642
19959
  parent: feature,
19643
19960
  price: 0,
19644
- quantity: 1
19961
+ quantity: 1,
19962
+ propertyObj: {},
19963
+ property: [].concat(_toConsumableArray__default["default"](props !== null && props !== void 0 ? props : []), _toConsumableArray__default["default"](maskProperties !== null && maskProperties !== void 0 ? maskProperties : []))
19645
19964
  };
19646
- if (props !== null && props !== void 0 && props.length) {
19647
- for (var i = 0; i < props.length; i++) {
19648
- var prop = props[i];
19649
- switch (prop.Codex) {
19650
- case 'IsVariantAttribute':
19651
- opv.isVariantAttribute = prop.Value == '1';
19652
- break;
19653
- case 'EshopCategoryMapping':
19654
- case 'TopFilterAttribute':
19655
- case 'PriceTageRelevant':
19656
- case 'IsArtName':
19657
- break;
19658
- default:
19659
- LOG$k.debug('implement mapping for these props for options: ' + prop.Codex);
19660
- }
19661
- }
19662
- }
19663
19965
  return opv;
19664
19966
  }
19665
19967
  function componentToHex(c) {
@@ -20097,9 +20399,10 @@ var DivaCatalogData = /*#__PURE__*/function () {
20097
20399
  this._api = api;
20098
20400
  this.additionalModelInfos = additionalModelInfos;
20099
20401
  if (json.Properties) {
20100
- var _json$Properties, _this$catalogMask$cat, _this$catalogMask;
20402
+ var _this$catalogMask$pro, _this$catalogMask, _json$Properties;
20101
20403
  this.origProperties = json.Properties;
20102
- this.initProperties(catalogCodex, [].concat(_toConsumableArray__default["default"]((_json$Properties = json.Properties) !== null && _json$Properties !== void 0 ? _json$Properties : []), _toConsumableArray__default["default"]((_this$catalogMask$cat = (_this$catalogMask = this.catalogMask) === null || _this$catalogMask === void 0 || (_this$catalogMask = _this$catalogMask.catalog) === null || _this$catalogMask === void 0 ? void 0 : _this$catalogMask.properties) !== null && _this$catalogMask$cat !== void 0 ? _this$catalogMask$cat : [])));
20404
+ var maskProperties = getPropertiesForSerieNo((_this$catalogMask$pro = (_this$catalogMask = this.catalogMask) === null || _this$catalogMask === void 0 ? void 0 : _this$catalogMask.properties) !== null && _this$catalogMask$pro !== void 0 ? _this$catalogMask$pro : [], 1, this.api.getLanguage());
20405
+ this.initProperties(catalogCodex, [].concat(_toConsumableArray__default["default"]((_json$Properties = json.Properties) !== null && _json$Properties !== void 0 ? _json$Properties : []), _toConsumableArray__default["default"](maskProperties !== null && maskProperties !== void 0 ? maskProperties : [])));
20103
20406
  }
20104
20407
  this.plannerPaletteViewInfo = {
20105
20408
  catalogPlannerArticles: [],
@@ -20131,8 +20434,9 @@ var DivaCatalogData = /*#__PURE__*/function () {
20131
20434
  initIDMArticles(articleJson, this);
20132
20435
  }
20133
20436
  if (this.origProperties) {
20134
- var _json$Properties2, _this$catalogMask$cat2, _this$catalogMask2;
20135
- this.initPropertiesAfterOptionsInit(catalogCodex, [].concat(_toConsumableArray__default["default"]((_json$Properties2 = json.Properties) !== null && _json$Properties2 !== void 0 ? _json$Properties2 : []), _toConsumableArray__default["default"]((_this$catalogMask$cat2 = (_this$catalogMask2 = this.catalogMask) === null || _this$catalogMask2 === void 0 || (_this$catalogMask2 = _this$catalogMask2.catalog) === null || _this$catalogMask2 === void 0 ? void 0 : _this$catalogMask2.properties) !== null && _this$catalogMask$cat2 !== void 0 ? _this$catalogMask$cat2 : [])));
20437
+ var _this$catalogMask$pro2, _this$catalogMask2, _json$Properties2;
20438
+ var _maskProperties = getPropertiesForSerieNo((_this$catalogMask$pro2 = (_this$catalogMask2 = this.catalogMask) === null || _this$catalogMask2 === void 0 ? void 0 : _this$catalogMask2.properties) !== null && _this$catalogMask$pro2 !== void 0 ? _this$catalogMask$pro2 : [], 1, this.api.getLanguage());
20439
+ this.initPropertiesAfterOptionsInit(catalogCodex, [].concat(_toConsumableArray__default["default"]((_json$Properties2 = json.Properties) !== null && _json$Properties2 !== void 0 ? _json$Properties2 : []), _toConsumableArray__default["default"](_maskProperties !== null && _maskProperties !== void 0 ? _maskProperties : [])));
20136
20440
  }
20137
20441
  }
20138
20442
  return _createClass__default["default"](DivaCatalogData, [{
@@ -20648,6 +20952,16 @@ var DivaCatalogData = /*#__PURE__*/function () {
20648
20952
  get: function get() {
20649
20953
  return this.catalogProps.mergeOptionsToSameOption;
20650
20954
  }
20955
+ }, {
20956
+ key: "checkIfUseBoxPlanner",
20957
+ value: function checkIfUseBoxPlanner(articleCodex) {
20958
+ if (Array.isArray(this.catalogProps.useBoxPlanner)) {
20959
+ this.catalogProps.useBoxPlanner = !!this.catalogProps.useBoxPlanner.find(function (a) {
20960
+ return articleCodex.includes(a);
20961
+ });
20962
+ }
20963
+ return this.catalogProps.useBoxPlanner;
20964
+ }
20651
20965
  }, {
20652
20966
  key: "useBoxPlanner",
20653
20967
  get: function get() {
@@ -21098,7 +21412,7 @@ var DivaCatalogData = /*#__PURE__*/function () {
21098
21412
  _this5.catalogProps.useGlobalSVGScale = item.Value == '1';
21099
21413
  break;
21100
21414
  case 'USEBOXPLANNER':
21101
- _this5.catalogProps.useBoxPlanner = item.Value == '1';
21415
+ _this5.catalogProps.useBoxPlanner = item.Value == '1' ? true : item.Value.split(';');
21102
21416
  break;
21103
21417
  case 'PLANNERTYPE':
21104
21418
  _this5.catalogProps.plannerType = item.Value;
@@ -21463,10 +21777,14 @@ var DivaCatalogData = /*#__PURE__*/function () {
21463
21777
  value: function initMask(initProps) {
21464
21778
  var _this$catalogMask3;
21465
21779
  if ((_this$catalogMask3 = this.catalogMask) !== null && _this$catalogMask3 !== void 0 && _this$catalogMask3.catalog) {
21466
- var _this$catalogMask$cat3;
21467
- if ((_this$catalogMask$cat3 = this.catalogMask.catalog.name) !== null && _this$catalogMask$cat3 !== void 0 && _this$catalogMask$cat3[this.api.getLanguage()]) this.catalogData.catalogName = this.catalogMask.catalog.name[this.api.getLanguage()];
21780
+ var _this$catalogMask$cat;
21781
+ if ((_this$catalogMask$cat = this.catalogMask.catalog.name) !== null && _this$catalogMask$cat !== void 0 && _this$catalogMask$cat[this.api.getLanguage()]) this.catalogData.catalogName = this.catalogMask.catalog.name[this.api.getLanguage()];
21468
21782
  if (this.catalogMask.catalog.name) this.catalogData.name_locales = this.catalogMask.catalog.name;
21469
- if (this.catalogMask.catalog.properties && initProps) this.initProperties(this.catalogCodex, [].concat(_toConsumableArray__default["default"](this.origProperties), _toConsumableArray__default["default"](this.catalogMask.catalog.properties)));
21783
+ if (initProps) {
21784
+ var _this$catalogMask$pro3, _this$catalogMask4;
21785
+ var maskProperties = getPropertiesForSerieNo((_this$catalogMask$pro3 = (_this$catalogMask4 = this.catalogMask) === null || _this$catalogMask4 === void 0 ? void 0 : _this$catalogMask4.properties) !== null && _this$catalogMask$pro3 !== void 0 ? _this$catalogMask$pro3 : [], 1, this.api.getLanguage());
21786
+ this.initProperties(this.catalogCodex, [].concat(_toConsumableArray__default["default"](this.origProperties), _toConsumableArray__default["default"](maskProperties !== null && maskProperties !== void 0 ? maskProperties : [])));
21787
+ }
21470
21788
  }
21471
21789
  }
21472
21790
  }]);
@@ -21483,7 +21801,8 @@ var mapMask = function mapMask(mask) {
21483
21801
  mappedProps.push({
21484
21802
  Codex: key,
21485
21803
  Name: prop.name,
21486
- Value: prop.value
21804
+ Value: prop.value,
21805
+ Value_locales: prop.valueLocales
21487
21806
  });
21488
21807
  }
21489
21808
  return mappedProps;
@@ -25068,14 +25387,15 @@ var IDMEngine = /*#__PURE__*/function () {
25068
25387
  var index = _this$getMatchingOpti2[1];
25069
25388
  this.logPrice(priceFeatureGroup, index);
25070
25389
  if (index !== undefined) {
25071
- var _this$article$catalog, _this$article$catalog2;
25390
+ var _this$article$catalog, _this$article$catalog4;
25072
25391
  var matichingFinish = priceFeatureGroup.finishes[index];
25073
25392
  var priceKey = 'PRFG' + priceFeatureGroup.priceFeatureGroupNo + '_' + matichingFinish.priceField;
25074
25393
  if (((_this$article$catalog = this.article.catalogArticle.idmPrices) === null || _this$article$catalog === void 0 ? void 0 : _this$article$catalog.prices[priceKey]) === undefined) {
25075
- LOG$f.error(new DivaUtils.DivaError('priceKey: ' + priceKey + ' not found'));
25394
+ var _this$article$catalog2, _this$article$catalog3;
25395
+ LOG$f.error(new DivaUtils.DivaError('priceKey: ' + priceKey + ' not found. valid prices: ' + Object.keys((_this$article$catalog2 = (_this$article$catalog3 = this.article.catalogArticle.idmPrices) === null || _this$article$catalog3 === void 0 ? void 0 : _this$article$catalog3.prices) !== null && _this$article$catalog2 !== void 0 ? _this$article$catalog2 : {}).join(', ')));
25076
25396
  continue;
25077
25397
  }
25078
- var price = (_this$article$catalog2 = this.article.catalogArticle.idmPrices) === null || _this$article$catalog2 === void 0 ? void 0 : _this$article$catalog2.prices[priceKey];
25398
+ var price = (_this$article$catalog4 = this.article.catalogArticle.idmPrices) === null || _this$article$catalog4 === void 0 ? void 0 : _this$article$catalog4.prices[priceKey];
25079
25399
  articleUsedCalcPrice += price;
25080
25400
  this.article.priceRefs.push({
25081
25401
  ID: matichingFinish._id,
@@ -25101,13 +25421,13 @@ var IDMEngine = /*#__PURE__*/function () {
25101
25421
  }, {
25102
25422
  key: "logPrice",
25103
25423
  value: function logPrice(priceFeatureGroup, index) {
25104
- var _this$article$catalog3;
25424
+ var _this$article$catalog5;
25105
25425
  if (!this.article.set.logDecisions) return;
25106
25426
  var finish = priceFeatureGroup.finishes[index !== null && index !== void 0 ? index : -1];
25107
25427
  this.priceDebugStack.push({
25108
25428
  nr: priceFeatureGroup.priceFeatureGroupNo,
25109
25429
  variantValues: this.article.VariantValues,
25110
- text: DivaUtils__default["default"].getLocals(priceFeatureGroup.priceFeatureGroupText, this.article.set.api.getLanguage()) + ' ' + (finish ? (_this$article$catalog3 = this.article.catalogArticle.idmPrices) === null || _this$article$catalog3 === void 0 || (_this$article$catalog3 = _this$article$catalog3.prices['PRFG' + priceFeatureGroup.priceFeatureGroupNo + '_' + finish.priceField]) === null || _this$article$catalog3 === void 0 ? void 0 : _this$article$catalog3.toString() : ''),
25430
+ text: DivaUtils__default["default"].getLocals(priceFeatureGroup.priceFeatureGroupText, this.article.set.api.getLanguage()) + ' ' + (finish ? (_this$article$catalog5 = this.article.catalogArticle.idmPrices) === null || _this$article$catalog5 === void 0 || (_this$article$catalog5 = _this$article$catalog5.prices['PRFG' + priceFeatureGroup.priceFeatureGroupNo + '_' + finish.priceField]) === null || _this$article$catalog5 === void 0 ? void 0 : _this$article$catalog5.toString() : ''),
25111
25431
  priceFeatureGroup: _objectSpread$f(_objectSpread$f({}, priceFeatureGroup), {}, {
25112
25432
  activeCombination: finish === null || finish === void 0 ? void 0 : finish.sequence
25113
25433
  })
@@ -25160,9 +25480,9 @@ var IDMEngine = /*#__PURE__*/function () {
25160
25480
  }, {
25161
25481
  key: "evalPartlist",
25162
25482
  value: function evalPartlist(newConfigValues) {
25163
- var _this$article$catalog4;
25483
+ var _this$article$catalog6;
25164
25484
  var partlistArticlesToLoad = [];
25165
- var myPartlistArticles = (_this$article$catalog4 = this.article.catalogArticle.idmPartlist) === null || _this$article$catalog4 === void 0 ? void 0 : _this$article$catalog4.partlistPos;
25485
+ var myPartlistArticles = (_this$article$catalog6 = this.article.catalogArticle.idmPartlist) === null || _this$article$catalog6 === void 0 ? void 0 : _this$article$catalog6.partlistPos;
25166
25486
  if (!(myPartlistArticles !== null && myPartlistArticles !== void 0 && myPartlistArticles.length)) return [];
25167
25487
  var partlistGroup = [];
25168
25488
  for (var i = 0; i < myPartlistArticles.length; i++) {
@@ -25460,8 +25780,8 @@ var IDMEngine = /*#__PURE__*/function () {
25460
25780
  for (var i = 0; i < allKeys.length; i++) {
25461
25781
  var key = allKeys[i];
25462
25782
  var value = this.article.getValueByMeasureKey(key);
25463
- if (value === undefined) throw new Error('measureParameter: ' + key + ' has no value defined');
25464
- keysMap[key] = value;
25783
+ if (value === undefined) LOG$f.warn('measureParameter: ' + key + ' has no value defined');
25784
+ keysMap[key] = value !== null && value !== void 0 ? value : 0;
25465
25785
  }
25466
25786
  while (allKeys.find(function (key) {
25467
25787
  return formula.includes(key);
@@ -25484,7 +25804,7 @@ var IDMEngine = /*#__PURE__*/function () {
25484
25804
  }, {
25485
25805
  key: "updateConfigDependentMedia",
25486
25806
  value: function updateConfigDependentMedia() {
25487
- var _this$article$catalog5,
25807
+ var _this$article$catalog7,
25488
25808
  _this4 = this;
25489
25809
  var catalogData = this.article.CatalogData;
25490
25810
  //articlebild berechnung
@@ -25576,10 +25896,10 @@ var IDMEngine = /*#__PURE__*/function () {
25576
25896
  }
25577
25897
  var newSVGFile = null;
25578
25898
  var svgChangedViaSvgTausch = false;
25579
- if (!((_this$article$catalog5 = this.article.catalogArticle.svgs) !== null && _this$article$catalog5 !== void 0 && _this$article$catalog5.length)) {
25580
- var _this$article$catalog6;
25899
+ if (!((_this$article$catalog7 = this.article.catalogArticle.svgs) !== null && _this$article$catalog7 !== void 0 && _this$article$catalog7.length)) {
25900
+ var _this$article$catalog8;
25581
25901
  //falls der Arikel kein SVG hat könnte eines seiner ParlistArtikel eines haben
25582
- if (this.article.hasPartlistArticle && !((_this$article$catalog6 = this.article.catalogArticle.catalogPlannerArticle) !== null && _this$article$catalog6 !== void 0 && _this$article$catalog6.topSvg)) {
25902
+ if (this.article.hasPartlistArticle && !((_this$article$catalog8 = this.article.catalogArticle.catalogPlannerArticle) !== null && _this$article$catalog8 !== void 0 && _this$article$catalog8.topSvg)) {
25583
25903
  for (var key in this.article.partlistArticles) if (this.article.partlistArticles[key].actPlannerData) {
25584
25904
  this.article.plannerData = this.article.partlistArticles[key].actPlannerData;
25585
25905
  newSVGFile = true;
@@ -28385,7 +28705,7 @@ var DivaArticle = /*#__PURE__*/function () {
28385
28705
  break;
28386
28706
  }
28387
28707
  _context.next = 4;
28388
- return Promise.resolve().then(function () { return require('./ShelfPlanner-20d69956.js'); });
28708
+ return Promise.resolve().then(function () { return require('./ShelfPlanner-5a04c5bb.js'); });
28389
28709
  case 4:
28390
28710
  _yield$import = _context.sent;
28391
28711
  ShelfPlanner = _yield$import["default"];
@@ -28843,7 +29163,7 @@ var DivaArticle = /*#__PURE__*/function () {
28843
29163
  var checkPrice = this.article.priceRefs[i];
28844
29164
  if (checkPrice.Price) {
28845
29165
  if (typeof checkPrice.ISABP == 'string' && checkPrice.ISABP == 'True' || typeof checkPrice.ISABP == 'boolean' && checkPrice.ISABP) {
28846
- var _checkPrice$PPG, _checkPrice$RuleDesc_, _myPriceData$BasePric;
29166
+ var _checkPrice$PPG, _checkPrice$RuleDesc_, _myPriceData$BasePric, _checkPrice$RuleDescU;
28847
29167
  myPriceData.BasePrice = checkPrice.Price;
28848
29168
  myPriceData.FormatedPrice = DivaUtils__default["default"].formatPrice(checkPrice.Price);
28849
29169
  myPriceData.BasePriceGroup = (_checkPrice$PPG = checkPrice.PPG) !== null && _checkPrice$PPG !== void 0 ? _checkPrice$PPG : '';
@@ -28853,7 +29173,7 @@ var DivaArticle = /*#__PURE__*/function () {
28853
29173
  (_myPriceData$BasePric = myPriceData.BasePrices) === null || _myPriceData$BasePric === void 0 || _myPriceData$BasePric.push({
28854
29174
  BasePrice: checkPrice.Price,
28855
29175
  FormatedPrice: DivaUtils__default["default"].formatPrice(checkPrice.Price),
28856
- BasePriceTitle: checkPrice.RuleDesc,
29176
+ BasePriceTitle: (_checkPrice$RuleDescU = checkPrice.RuleDescUsedOpts) !== null && _checkPrice$RuleDescU !== void 0 ? _checkPrice$RuleDescU : checkPrice.RuleDesc,
28857
29177
  BasePriceGroup: checkPrice.PPG
28858
29178
  });
28859
29179
  } else {
@@ -28869,8 +29189,8 @@ var DivaArticle = /*#__PURE__*/function () {
28869
29189
  }
28870
29190
  }
28871
29191
  } else {
28872
- var _checkPrice$RuleDescU;
28873
- myPriceData.addAdditionalPrice((_checkPrice$RuleDescU = checkPrice.RuleDescUsedOpts) !== null && _checkPrice$RuleDescU !== void 0 ? _checkPrice$RuleDescU : checkPrice.RuleDesc, checkPrice.Price, DivaUtils__default["default"].formatPrice(checkPrice.Price), checkPrice.PPG ? checkPrice.PPG : '', checkPrice.OPT ? checkPrice.OPT.replace('OPT', '') : '', '');
29192
+ var _checkPrice$RuleDescU2;
29193
+ myPriceData.addAdditionalPrice((_checkPrice$RuleDescU2 = checkPrice.RuleDescUsedOpts) !== null && _checkPrice$RuleDescU2 !== void 0 ? _checkPrice$RuleDescU2 : checkPrice.RuleDesc, checkPrice.Price, DivaUtils__default["default"].formatPrice(checkPrice.Price), checkPrice.PPG ? checkPrice.PPG : '', checkPrice.OPT ? checkPrice.OPT.replace('OPT', '') : '', '');
28874
29194
  }
28875
29195
  }
28876
29196
  }
@@ -29011,6 +29331,8 @@ var DivaArticle = /*#__PURE__*/function () {
29011
29331
  _iterator40.f();
29012
29332
  }
29013
29333
  clonedArticle.initEngine();
29334
+ clonedArticle.hasDecisionsInitialized = true;
29335
+ clonedArticle.hasPartlistArticleInitialized = true;
29014
29336
  clonedArticle.article.partlistArticles = {};
29015
29337
  clonedArticle.article.previousPartlistArticles = {};
29016
29338
  for (var key in this.partlistArticles) {
@@ -31649,6 +31971,7 @@ var DivaSet = /*#__PURE__*/function () {
31649
31971
  _defineProperty__default["default"](this, "favoritesChanged", false);
31650
31972
  _defineProperty__default["default"](this, "setState", void 0);
31651
31973
  _defineProperty__default["default"](this, "modifiedJ3D", []);
31974
+ _defineProperty__default["default"](this, "aiImageForBasket", void 0);
31652
31975
  /**
31653
31976
  * This function is called when the docking of two Elements is changed
31654
31977
  */
@@ -31921,6 +32244,24 @@ var DivaSet = /*#__PURE__*/function () {
31921
32244
  };
31922
32245
  }
31923
32246
  return _createClass__default["default"](DivaSet, [{
32247
+ key: "getAiImageAsJpg",
32248
+ value: function getAiImageAsJpg() {
32249
+ return this.aiImageForBasket;
32250
+ }
32251
+ }, {
32252
+ key: "setAiImageAsJpg",
32253
+ value: function setAiImageAsJpg(promptId, aiImageAsJPGBase64) {
32254
+ this.aiImageForBasket = {
32255
+ base64: aiImageAsJPGBase64,
32256
+ promptId: promptId
32257
+ };
32258
+ }
32259
+ }, {
32260
+ key: "clearAiImageAsJpg",
32261
+ value: function clearAiImageAsJpg() {
32262
+ this.aiImageForBasket = undefined;
32263
+ }
32264
+ }, {
31924
32265
  key: "addRelationsToArticles",
31925
32266
  value: function addRelationsToArticles(article1, article2) {
31926
32267
  if (article2.checkArtCodexIsAccessoire(article1.articleCodex)) {
@@ -32916,7 +33257,7 @@ var DivaSet = /*#__PURE__*/function () {
32916
33257
  break;
32917
33258
  }
32918
33259
  _context5.next = 3;
32919
- return Promise.resolve().then(function () { return require('./DoorPlanner-17dc699e.js'); });
33260
+ return Promise.resolve().then(function () { return require('./DoorPlanner-787eb542.js'); });
32920
33261
  case 3:
32921
33262
  _yield$import = _context5.sent;
32922
33263
  DoorPlanner = _yield$import["default"];
@@ -36156,9 +36497,12 @@ var DivaSetHandler = /*#__PURE__*/function () {
36156
36497
  case 3:
36157
36498
  catalogData = _context6.sent;
36158
36499
  articlesToInitialize = !((_orderSet$OrderLines = orderSet.OrderLines) !== null && _orderSet$OrderLines !== void 0 && _orderSet$OrderLines.length) ? (_initSetState$article = initSetState.articlesToInitialize) !== null && _initSetState$article !== void 0 ? _initSetState$article : catalogData.startPlannerArticle : undefined;
36159
- _context6.next = 7;
36500
+ catalogData.checkIfUseBoxPlanner(articlesToInitialize !== null && articlesToInitialize !== void 0 ? articlesToInitialize : orderSet.OrderLines.map(function (o) {
36501
+ return o.ArticleCodex;
36502
+ }));
36503
+ _context6.next = 8;
36160
36504
  return this.createSet(catalogData, orderSet, initSetState, lastSetToInitialize);
36161
- case 7:
36505
+ case 8:
36162
36506
  set = _context6.sent;
36163
36507
  if (set.api.getLoadSupplierColors() && initSetState.supplierColors) {
36164
36508
  set.supplierColors = initSetState.supplierColors;
@@ -36177,35 +36521,35 @@ var DivaSetHandler = /*#__PURE__*/function () {
36177
36521
  }
36178
36522
  }
36179
36523
  if (!(articlesToInitialize && articlesToInitialize.length > 0)) {
36180
- _context6.next = 23;
36524
+ _context6.next = 24;
36181
36525
  break;
36182
36526
  }
36183
36527
  DivaUtils__default["default"].startSpanOfApm('Articles initialize');
36184
36528
  j = 0;
36185
- case 14:
36529
+ case 15:
36186
36530
  if (!(j < articlesToInitialize.length)) {
36187
- _context6.next = 21;
36531
+ _context6.next = 22;
36188
36532
  break;
36189
36533
  }
36190
36534
  variantValues = (_initSetState$initVar = initSetState.initVariantValues) !== null && _initSetState$initVar !== void 0 ? _initSetState$initVar : catalogData === null || catalogData === void 0 || (_catalogData$promoted = catalogData.promotedOpvs) === null || _catalogData$promoted === void 0 || (_catalogData$promoted = _catalogData$promoted.articles) === null || _catalogData$promoted === void 0 || (_catalogData$promoted = _catalogData$promoted[articlesToInitialize[j]]) === null || _catalogData$promoted === void 0 || (_catalogData$promoted = _catalogData$promoted[0]) === null || _catalogData$promoted === void 0 ? void 0 : _catalogData$promoted.variantValues;
36191
- _context6.next = 18;
36535
+ _context6.next = 19;
36192
36536
  return this.addPlannerElement(set, articlesToInitialize[j], _objectSpread$a(_objectSpread$a({}, params), variantValues ? {
36193
36537
  variantValues: variantValues
36194
36538
  } : {}));
36195
- case 18:
36539
+ case 19:
36196
36540
  j++;
36197
- _context6.next = 14;
36541
+ _context6.next = 15;
36198
36542
  break;
36199
- case 21:
36543
+ case 22:
36200
36544
  //display image of article if there is no planner
36201
36545
  if (!set.onlyRunLogic && set.getPlannerMode() == 'No') {
36202
36546
  image = set.getImageOfOnlyElement();
36203
36547
  if (image && updateSetImage) updateSetImage(image);
36204
36548
  }
36205
36549
  DivaUtils__default["default"].endSpanOfApm('Articles initialize');
36206
- case 23:
36207
- return _context6.abrupt("return", set);
36208
36550
  case 24:
36551
+ return _context6.abrupt("return", set);
36552
+ case 25:
36209
36553
  case "end":
36210
36554
  return _context6.stop();
36211
36555
  }
@@ -37563,8 +37907,8 @@ var DivaSetHandler = /*#__PURE__*/function () {
37563
37907
  }, {
37564
37908
  key: "loadConfigItemsOfActSetByConfigStepKey",
37565
37909
  value: function () {
37566
- var _loadConfigItemsOfActSetByConfigStepKey = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee22(set, configStepKey, visible) {
37567
- var _configItems$option;
37910
+ var _loadConfigItemsOfActSetByConfigStepKey = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee22(set, configStepKey, visible, hidePricePreview) {
37911
+ var _configItems$option, _configItems$option2;
37568
37912
  var configItems, paletteType, filterType, stepInfo, contentItemId;
37569
37913
  return _regeneratorRuntime__default["default"].wrap(function _callee22$(_context24) {
37570
37914
  while (1) switch (_context24.prev = _context24.next) {
@@ -37576,7 +37920,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
37576
37920
  paletteType = set.configTree.getCurPaletteType(set, configStepKey);
37577
37921
  configItems.configItems = this.removeDockingInfluencableconfigItems(set, configItems.configItems, configStepKey);
37578
37922
  _context24.next = 7;
37579
- return this.variantsEvaluator(set, configItems.configItems, configStepKey, paletteType);
37923
+ return this.variantsEvaluator(set, configItems.configItems, configStepKey, paletteType, hidePricePreview);
37580
37924
  case 7:
37581
37925
  configItems.configItems = _context24.sent;
37582
37926
  filterType = set.configTree.getCurFilterType(configStepKey, configItems.configItems);
@@ -37591,7 +37935,8 @@ var DivaSetHandler = /*#__PURE__*/function () {
37591
37935
  filterType: filterType,
37592
37936
  stepInfo: stepInfo
37593
37937
  }, set.configTree.getOptionStuff(configStepKey, set)), {}, {
37594
- contentItemId: contentItemId
37938
+ contentItemId: contentItemId,
37939
+ conceptFilter: (_configItems$option2 = configItems.option) === null || _configItems$option2 === void 0 ? void 0 : _configItems$option2.additionalGroupFilter
37595
37940
  }));
37596
37941
  case 12:
37597
37942
  case "end":
@@ -37599,7 +37944,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
37599
37944
  }
37600
37945
  }, _callee22, this);
37601
37946
  }));
37602
- function loadConfigItemsOfActSetByConfigStepKey(_x81, _x82, _x83) {
37947
+ function loadConfigItemsOfActSetByConfigStepKey(_x81, _x82, _x83, _x84) {
37603
37948
  return _loadConfigItemsOfActSetByConfigStepKey.apply(this, arguments);
37604
37949
  }
37605
37950
  return loadConfigItemsOfActSetByConfigStepKey;
@@ -37641,7 +37986,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
37641
37986
  }, {
37642
37987
  key: "variantsEvaluator",
37643
37988
  value: (function () {
37644
- var _variantsEvaluator = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee23(set, configItems, configStepKey, paletteType) {
37989
+ var _variantsEvaluator = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee23(set, configItems, configStepKey, paletteType, hidePricePreview) {
37645
37990
  var _configItems$0$option, _set$api$ReturnToFrom, _set$CatalogData$show, _set$CatalogData$hide;
37646
37991
  var opt, previewType, targetArticles, variants, pricesVisible;
37647
37992
  return _regeneratorRuntime__default["default"].wrap(function _callee23$(_context25) {
@@ -37661,7 +38006,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
37661
38006
  }
37662
38007
  return _context25.abrupt("return", configItems);
37663
38008
  case 6:
37664
- if (!(!previewType || previewType == 'off' || configItems.length == 1 || opt.isDescribingState || configItems.length > 300 && !configItems[0].groupName || (_set$CatalogData$show = set.CatalogData.showPricePreviewOnlyOnOptions) !== null && _set$CatalogData$show !== void 0 && _set$CatalogData$show.length && !set.CatalogData.showPricePreviewOnlyOnOptions.includes(opt.codex.substring(3)) || (_set$CatalogData$hide = set.CatalogData.hidePricePreviewOnlyOnOptions) !== null && _set$CatalogData$hide !== void 0 && _set$CatalogData$hide.length && set.CatalogData.hidePricePreviewOnlyOnOptions.includes(opt.codex.substring(3)))) {
38009
+ if (!(!previewType || previewType == 'off' || configItems.length == 1 || opt.isDescribingState || configItems.length > 300 && !configItems[0].groupName || (_set$CatalogData$show = set.CatalogData.showPricePreviewOnlyOnOptions) !== null && _set$CatalogData$show !== void 0 && _set$CatalogData$show.length && !set.CatalogData.showPricePreviewOnlyOnOptions.includes(opt.codex.substring(3)) || (_set$CatalogData$hide = set.CatalogData.hidePricePreviewOnlyOnOptions) !== null && _set$CatalogData$hide !== void 0 && _set$CatalogData$hide.length && set.CatalogData.hidePricePreviewOnlyOnOptions.includes(opt.codex.substring(3)) || hidePricePreview)) {
37665
38010
  _context25.next = 9;
37666
38011
  break;
37667
38012
  }
@@ -37692,7 +38037,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
37692
38037
  }
37693
38038
  }, _callee23, this);
37694
38039
  }));
37695
- function variantsEvaluator(_x84, _x85, _x86, _x87) {
38040
+ function variantsEvaluator(_x85, _x86, _x87, _x88, _x89) {
37696
38041
  return _variantsEvaluator.apply(this, arguments);
37697
38042
  }
37698
38043
  return variantsEvaluator;
@@ -37773,7 +38118,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
37773
38118
  }
37774
38119
  }, _callee24, this);
37775
38120
  }));
37776
- function calcVariants(_x88, _x89, _x90, _x91) {
38121
+ function calcVariants(_x90, _x91, _x92, _x93) {
37777
38122
  return _calcVariants.apply(this, arguments);
37778
38123
  }
37779
38124
  return calcVariants;
@@ -37882,7 +38227,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
37882
38227
  }
37883
38228
  }, _callee25, this);
37884
38229
  }));
37885
- function getVariant(_x92, _x93, _x94, _x95, _x96, _x97, _x98, _x99, _x100) {
38230
+ function getVariant(_x94, _x95, _x96, _x97, _x98, _x99, _x100, _x101, _x102) {
37886
38231
  return _getVariant.apply(this, arguments);
37887
38232
  }
37888
38233
  return getVariant;
@@ -37936,7 +38281,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
37936
38281
  }
37937
38282
  }, _callee26);
37938
38283
  }));
37939
- function checkIfPriceDiffers(_x101) {
38284
+ function checkIfPriceDiffers(_x103) {
37940
38285
  return _checkIfPriceDiffers.apply(this, arguments);
37941
38286
  }
37942
38287
  return checkIfPriceDiffers;
@@ -38099,7 +38444,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
38099
38444
  }
38100
38445
  }, _callee27, this);
38101
38446
  }));
38102
- function updateArticlesOptionStatesOfActSet(_x102, _x103, _x104, _x105, _x106, _x107) {
38447
+ function updateArticlesOptionStatesOfActSet(_x104, _x105, _x106, _x107, _x108, _x109) {
38103
38448
  return _updateArticlesOptionStatesOfActSet.apply(this, arguments);
38104
38449
  }
38105
38450
  return updateArticlesOptionStatesOfActSet;
@@ -38192,7 +38537,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
38192
38537
  }
38193
38538
  }, _callee28, this);
38194
38539
  }));
38195
- function updateEdoArticles(_x108, _x109) {
38540
+ function updateEdoArticles(_x110, _x111) {
38196
38541
  return _updateEdoArticles.apply(this, arguments);
38197
38542
  }
38198
38543
  return updateEdoArticles;
@@ -38475,7 +38820,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
38475
38820
  }
38476
38821
  }, _callee29, this);
38477
38822
  }));
38478
- function fillOrderLinesAndOrderSets(_x110, _x111, _x112, _x113, _x114) {
38823
+ function fillOrderLinesAndOrderSets(_x112, _x113, _x114, _x115, _x116) {
38479
38824
  return _fillOrderLinesAndOrderSets.apply(this, arguments);
38480
38825
  }
38481
38826
  return fillOrderLinesAndOrderSets;
@@ -38566,8 +38911,8 @@ var DivaSetHandler = /*#__PURE__*/function () {
38566
38911
  key: "getOrderSet",
38567
38912
  value: function () {
38568
38913
  var _getOrderSet = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee30(set, catalogData, divaNr, repairOnly, returnTo) {
38569
- var _Object$values$, _set$getDivaArticles, _hqRenderScript, _set$basketConfigVari2, _set$basketConfigVari3;
38570
- var dontGenerateImages, orderSet, GroupType, plannerData, setImage, urlToPlanning2D, alternateSetImages, hqRenderScript, dimensions, promise3D, promise2D, promise3DAlternate, _yield$Promise$all, _yield$Promise$all2, _yield$Promise$all2$, plannerWarnings, bruttoPrice;
38914
+ var _Object$values$, _set$getDivaArticles, _hqRenderScript, _alternateSetImages, _set$basketConfigVari2, _set$basketConfigVari3;
38915
+ var dontGenerateImages, orderSet, GroupType, plannerData, setImage, urlToPlanning2D, urlToAiImage, alternateSetImages, hqRenderScript, dimensions, promise3D, promise2D, promiseAiImage, promise3DAlternate, _yield$Promise$all, _yield$Promise$all2, _yield$Promise$all2$, plannerWarnings, bruttoPrice;
38571
38916
  return _regeneratorRuntime__default["default"].wrap(function _callee30$(_context32) {
38572
38917
  while (1) switch (_context32.prev = _context32.next) {
38573
38918
  case 0:
@@ -38577,30 +38922,35 @@ var DivaSetHandler = /*#__PURE__*/function () {
38577
38922
  plannerData = set.plannerHandler.savePlanner(set.getSetId());
38578
38923
  setImage = undefined;
38579
38924
  urlToPlanning2D = undefined;
38925
+ urlToAiImage = undefined;
38580
38926
  alternateSetImages = undefined;
38581
38927
  hqRenderScript = undefined;
38582
38928
  dimensions = {};
38583
38929
  if (dontGenerateImages) {
38584
- _context32.next = 23;
38930
+ _context32.next = 26;
38585
38931
  break;
38586
38932
  }
38587
38933
  promise3D = this.getSetImage(set, typeof window === 'undefined');
38588
38934
  promise2D = this.get2DSetImage(set);
38935
+ if (set.getAiImageAsJpg()) {
38936
+ promiseAiImage = this.getAiImage(set);
38937
+ }
38589
38938
  if (!catalogData.dontSaveAlternativeRenderings && set.CatalogData.alternateRenderingsForSummary.length) {
38590
38939
  promise3DAlternate = this.getAlternateSetImages(set);
38591
38940
  }
38592
- _context32.next = 15;
38593
- return Promise.all([promise3D, promise2D, promise3DAlternate, this.getHQRenderScript(set, divaNr)]);
38594
- case 15:
38941
+ _context32.next = 17;
38942
+ return Promise.all([promise3D, promise2D, promiseAiImage, promise3DAlternate, this.getHQRenderScript(set, divaNr)]);
38943
+ case 17:
38595
38944
  _yield$Promise$all = _context32.sent;
38596
- _yield$Promise$all2 = _slicedToArray__default["default"](_yield$Promise$all, 4);
38945
+ _yield$Promise$all2 = _slicedToArray__default["default"](_yield$Promise$all, 5);
38597
38946
  _yield$Promise$all2$ = _yield$Promise$all2[0];
38598
38947
  setImage = _yield$Promise$all2$.url;
38599
38948
  dimensions = _yield$Promise$all2$.dimensions;
38600
38949
  urlToPlanning2D = _yield$Promise$all2[1];
38601
- alternateSetImages = _yield$Promise$all2[2];
38602
- hqRenderScript = _yield$Promise$all2[3];
38603
- case 23:
38950
+ urlToAiImage = _yield$Promise$all2[2];
38951
+ alternateSetImages = _yield$Promise$all2[3];
38952
+ hqRenderScript = _yield$Promise$all2[4];
38953
+ case 26:
38604
38954
  plannerWarnings = [];
38605
38955
  if (!this.getPlanningIsComplete(set)) plannerWarnings.push('INCOMPLETE');
38606
38956
  DivaUtils__default["default"].endSpanOfApm('GetSet3D und 2D Image');
@@ -38637,7 +38987,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
38637
38987
  Set2DImage: urlToPlanning2D,
38638
38988
  VariantDescription: DivaUtils__default["default"].stripTags(set.getVariantsDescription()),
38639
38989
  VariantDescription_locales: DivaUtils__default["default"].stripTagsFromDict(set.getVariantsDescription_locales()),
38640
- SetImages: alternateSetImages,
38990
+ SetImages: [].concat(_toConsumableArray__default["default"](urlToAiImage ? [urlToAiImage] : []), _toConsumableArray__default["default"]((_alternateSetImages = alternateSetImages) !== null && _alternateSetImages !== void 0 ? _alternateSetImages : [])),
38641
38991
  SetHash: set.setHash,
38642
38992
  SetPlanData: plannerData != undefined ? DivaUtils__default["default"].encodeBase64(JSON.stringify(plannerData)) : '',
38643
38993
  SetID: set.getSetId(),
@@ -38664,13 +39014,13 @@ var DivaSetHandler = /*#__PURE__*/function () {
38664
39014
  MetaData_locales: !((_set$basketConfigVari3 = set.basketConfigVariants) !== null && _set$basketConfigVari3 !== void 0 && _set$basketConfigVari3.length) ? set.MetaData_locales : undefined
38665
39015
  });
38666
39016
  return _context32.abrupt("return", orderSet);
38667
- case 29:
39017
+ case 32:
38668
39018
  case "end":
38669
39019
  return _context32.stop();
38670
39020
  }
38671
39021
  }, _callee30, this);
38672
39022
  }));
38673
- function getOrderSet(_x115, _x116, _x117, _x118, _x119) {
39023
+ function getOrderSet(_x117, _x118, _x119, _x120, _x121) {
38674
39024
  return _getOrderSet.apply(this, arguments);
38675
39025
  }
38676
39026
  return getOrderSet;
@@ -38720,7 +39070,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
38720
39070
  }
38721
39071
  }, _callee31);
38722
39072
  }));
38723
- function getSetImage(_x120, _x121) {
39073
+ function getSetImage(_x122, _x123) {
38724
39074
  return _getSetImage.apply(this, arguments);
38725
39075
  }
38726
39076
  return getSetImage;
@@ -38766,7 +39116,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
38766
39116
  }
38767
39117
  }, _callee32);
38768
39118
  }));
38769
- function getHQRenderScript(_x122, _x123) {
39119
+ function getHQRenderScript(_x124, _x125) {
38770
39120
  return _getHQRenderScript.apply(this, arguments);
38771
39121
  }
38772
39122
  return getHQRenderScript;
@@ -38807,7 +39157,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
38807
39157
  }
38808
39158
  }, _callee33);
38809
39159
  }));
38810
- function getAlternateSetImages(_x124) {
39160
+ function getAlternateSetImages(_x126) {
38811
39161
  return _getAlternateSetImages.apply(this, arguments);
38812
39162
  }
38813
39163
  return getAlternateSetImages;
@@ -38816,18 +39166,18 @@ var DivaSetHandler = /*#__PURE__*/function () {
38816
39166
  key: "get2DSetImage",
38817
39167
  value: function () {
38818
39168
  var _get2DSetImage = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee34(set) {
38819
- var urlToPlanning2D, catalogData, planning2DAsJPGBase64;
39169
+ var urlToPlanning2D, planning2DAsJPGBase64;
38820
39170
  return _regeneratorRuntime__default["default"].wrap(function _callee34$(_context36) {
38821
39171
  while (1) switch (_context36.prev = _context36.next) {
38822
39172
  case 0:
38823
- urlToPlanning2D = undefined, catalogData = set.CatalogData;
39173
+ urlToPlanning2D = undefined;
38824
39174
  planning2DAsJPGBase64 = set.getPlanning2DAsJpg();
38825
39175
  if (!(planning2DAsJPGBase64 != undefined && planning2DAsJPGBase64 != '' && planning2DAsJPGBase64 != 'data:,')) {
38826
39176
  _context36.next = 6;
38827
39177
  break;
38828
39178
  }
38829
39179
  _context36.next = 5;
38830
- return set.plannerHandler.saveSet2DImage(set.getSetId(), catalogData.catalogCodex, catalogData.catalogGuid, planning2DAsJPGBase64);
39180
+ return set.plannerHandler.saveSet2DImage(set.CatalogData.catalogCodex, set.CatalogData.catalogGuid, planning2DAsJPGBase64);
38831
39181
  case 5:
38832
39182
  urlToPlanning2D = _context36.sent;
38833
39183
  case 6:
@@ -38838,11 +39188,36 @@ var DivaSetHandler = /*#__PURE__*/function () {
38838
39188
  }
38839
39189
  }, _callee34);
38840
39190
  }));
38841
- function get2DSetImage(_x125) {
39191
+ function get2DSetImage(_x127) {
38842
39192
  return _get2DSetImage.apply(this, arguments);
38843
39193
  }
38844
39194
  return get2DSetImage;
38845
39195
  }()
39196
+ }, {
39197
+ key: "getAiImage",
39198
+ value: function () {
39199
+ var _getAiImage = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee35(set) {
39200
+ var catalogData, _ref3, promptId, base64;
39201
+ return _regeneratorRuntime__default["default"].wrap(function _callee35$(_context37) {
39202
+ while (1) switch (_context37.prev = _context37.next) {
39203
+ case 0:
39204
+ catalogData = set.CatalogData;
39205
+ _ref3 = set.getAiImageAsJpg(), promptId = _ref3.promptId, base64 = _ref3.base64;
39206
+ _context37.next = 4;
39207
+ return set.plannerHandler.saveAiImage(promptId, catalogData.catalogCodex, catalogData.catalogGuid, base64);
39208
+ case 4:
39209
+ return _context37.abrupt("return", _context37.sent);
39210
+ case 5:
39211
+ case "end":
39212
+ return _context37.stop();
39213
+ }
39214
+ }, _callee35);
39215
+ }));
39216
+ function getAiImage(_x128) {
39217
+ return _getAiImage.apply(this, arguments);
39218
+ }
39219
+ return getAiImage;
39220
+ }()
38846
39221
  }, {
38847
39222
  key: "getBBoxObject",
38848
39223
  value: function getBBoxObject(set, dimensions) {
@@ -38878,25 +39253,25 @@ var DivaSetHandler = /*#__PURE__*/function () {
38878
39253
  }, {
38879
39254
  key: "addOrderSetArticlesToExistingSet",
38880
39255
  value: function () {
38881
- var _addOrderSetArticlesToExistingSet = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee35(set, orderSet, lastSetToInitialize) {
38882
- return _regeneratorRuntime__default["default"].wrap(function _callee35$(_context37) {
38883
- while (1) switch (_context37.prev = _context37.next) {
39256
+ var _addOrderSetArticlesToExistingSet = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee36(set, orderSet, lastSetToInitialize) {
39257
+ return _regeneratorRuntime__default["default"].wrap(function _callee36$(_context38) {
39258
+ while (1) switch (_context38.prev = _context38.next) {
38884
39259
  case 0:
38885
39260
  //TODO: GLOBAL STUFF
38886
39261
  //this.updateActSet(set);
38887
39262
  orderSet.changeBasketIds();
38888
- _context37.next = 3;
39263
+ _context38.next = 3;
38889
39264
  return this.initOrderLineArticles(set, orderSet);
38890
39265
  case 3:
38891
- _context37.next = 5;
39266
+ _context38.next = 5;
38892
39267
  return set.plannerHandler.extendSet(set, orderSet.SetPlanData, lastSetToInitialize);
38893
39268
  case 5:
38894
39269
  case "end":
38895
- return _context37.stop();
39270
+ return _context38.stop();
38896
39271
  }
38897
- }, _callee35, this);
39272
+ }, _callee36, this);
38898
39273
  }));
38899
- function addOrderSetArticlesToExistingSet(_x126, _x127, _x128) {
39274
+ function addOrderSetArticlesToExistingSet(_x129, _x130, _x131) {
38900
39275
  return _addOrderSetArticlesToExistingSet.apply(this, arguments);
38901
39276
  }
38902
39277
  return addOrderSetArticlesToExistingSet;
@@ -39968,7 +40343,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
39968
40343
  break;
39969
40344
  case 3:
39970
40345
  _context12.next = 5;
39971
- return Promise.resolve().then(function () { return require('./PfisterWWSHandler-edc45ac1.js'); });
40346
+ return Promise.resolve().then(function () { return require('./PfisterWWSHandler-88281688.js'); });
39972
40347
  case 5:
39973
40348
  _yield$import = _context12.sent;
39974
40349
  PfisterWWSHandler = _yield$import["default"];
@@ -39976,7 +40351,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
39976
40351
  return _context12.abrupt("break", 27);
39977
40352
  case 9:
39978
40353
  _context12.next = 11;
39979
- return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-79580044.js'); });
40354
+ return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-1602ea8b.js'); });
39980
40355
  case 11:
39981
40356
  _yield$import2 = _context12.sent;
39982
40357
  LiviqueWWSHandler = _yield$import2["default"];
@@ -39984,7 +40359,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
39984
40359
  return _context12.abrupt("break", 27);
39985
40360
  case 15:
39986
40361
  _context12.next = 17;
39987
- return Promise.resolve().then(function () { return require('./SeriousBasketHandler-fd41e561.js'); });
40362
+ return Promise.resolve().then(function () { return require('./SeriousBasketHandler-d007567f.js'); });
39988
40363
  case 17:
39989
40364
  _yield$import3 = _context12.sent;
39990
40365
  SeriousWWSHandler = _yield$import3["default"];
@@ -39992,7 +40367,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
39992
40367
  return _context12.abrupt("break", 27);
39993
40368
  case 21:
39994
40369
  _context12.next = 23;
39995
- return Promise.resolve().then(function () { return require('./StandardWWSHandler-28bf51c2.js'); });
40370
+ return Promise.resolve().then(function () { return require('./StandardWWSHandler-0e412d7e.js'); });
39996
40371
  case 23:
39997
40372
  _yield$import4 = _context12.sent;
39998
40373
  StandardWWSHandler = _yield$import4["default"];
@@ -40589,12 +40964,7 @@ var Rendering = /*#__PURE__*/function () {
40589
40964
  _defineProperty__default["default"](this, "uiInfo", void 0);
40590
40965
  _defineProperty__default["default"](this, "urlToSavedRendering", void 0);
40591
40966
  // viewPoint: string;
40592
- // private posInfo: any;
40593
- //private doStream: boolean; Streaming over 3D Host is deprected
40594
- //private byteChunkArr: any;
40595
- //private byteChunkLayerMaskArr: any;
40596
40967
  _defineProperty__default["default"](this, "hasLayerMask", void 0);
40597
- //private imgBytes: any;
40598
40968
  _defineProperty__default["default"](this, "imgForSrc", void 0);
40599
40969
  _defineProperty__default["default"](this, "layerMaskAsBase64", void 0);
40600
40970
  _defineProperty__default["default"](this, "layerMaskThreeTexture", void 0);
@@ -41421,7 +41791,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
41421
41791
  while (1) switch (_context3.prev = _context3.next) {
41422
41792
  case 0:
41423
41793
  _context3.next = 2;
41424
- return Promise.resolve().then(function () { return require('./Host3DSignalR-3843e7c8.js'); });
41794
+ return Promise.resolve().then(function () { return require('./Host3DSignalR-c60988bd.js'); });
41425
41795
  case 2:
41426
41796
  _yield$import = _context3.sent;
41427
41797
  Host3DSignalR = _yield$import["default"];
@@ -41557,6 +41927,11 @@ var PlannerHandler3D = /*#__PURE__*/function () {
41557
41927
  var cachedRendering = this.getRenderingFromCache(params.hash);
41558
41928
  var waitedRendering = this.getWaitForRendering(params.hash);
41559
41929
  if (!cachedRendering && !waitedRendering) {
41930
+ if (params.saveMode == '1' && params.url) {
41931
+ var rendering = new Rendering('PLACEHOLDER', 'PLACEHOLDER', '', 0, 0, false, false, 0, false, false, 'PERMANENT');
41932
+ rendering.UrlToSavedRendering = params.url;
41933
+ this.updatePlannerRenderingInView(rendering, true);
41934
+ }
41560
41935
  LOG$4.error(new DivaUtils.DivaError('Error when handling receive Rendering. Not waiting for new Rendering but also not in cache ' + params.hash + '; saveMode: ' + params.saveMode));
41561
41936
  return;
41562
41937
  }
@@ -41577,6 +41952,10 @@ var PlannerHandler3D = /*#__PURE__*/function () {
41577
41952
 
41578
41953
  if (this.checkRenderingReady(params.hash, waitedRendering) && waitedRendering.MediaServiceSaveMode == 'STREAM') {
41579
41954
  this.updatePlannerRendering(waitedRendering);
41955
+ } else {
41956
+ if (waitedRendering.MediaServiceSaveMode == 'PERMANENT') {
41957
+ this.updatePlannerRenderingInView(waitedRendering, true);
41958
+ }
41580
41959
  }
41581
41960
  return;
41582
41961
  }
@@ -42355,17 +42734,22 @@ var DivaMediaServiceHandler = /*#__PURE__*/function () {
42355
42734
  key: "base64ToBlob",
42356
42735
  value: function base64ToBlob(base64String, hash) {
42357
42736
  DivaUtils__default["default"].startSpanOfApm('MediaServiceHandler base64ToBlob');
42737
+ var type = 'image/jpeg';
42358
42738
  if (base64String.startsWith('data:image/jpeg;base64,')) {
42359
42739
  base64String = base64String.replace('data:image/jpeg;base64,', '');
42360
42740
  }
42741
+ if (base64String.startsWith('data:image/png;base64,')) {
42742
+ base64String = base64String.replace('data:image/png;base64,', '');
42743
+ type = 'image/png';
42744
+ }
42361
42745
  var binary_string = window.atob(base64String);
42362
42746
  var len = binary_string.length;
42363
42747
  var bytes = new Uint8Array(len);
42364
42748
  for (var i = 0; i < len; i++) {
42365
42749
  bytes[i] = binary_string.charCodeAt(i);
42366
42750
  }
42367
- var blob = new File([bytes.buffer], hash + '.jpg', {
42368
- type: 'image/jpeg'
42751
+ var blob = new File([bytes.buffer], hash + (type === 'image/jpeg' ? '.jpg' : '.png'), {
42752
+ type: type
42369
42753
  });
42370
42754
  DivaUtils__default["default"].endSpanOfApm('MediaServiceHandler base64ToBlob');
42371
42755
  return blob;
@@ -42435,6 +42819,90 @@ var DivaMediaServiceHandler = /*#__PURE__*/function () {
42435
42819
  }
42436
42820
  return savePlanning2DPermanent;
42437
42821
  }()
42822
+ /**
42823
+ * Save AI-generated base64 image to media service
42824
+ * @param hash Unique identifier for the image
42825
+ * @param base64Image Base64 encoded image data
42826
+ * @param promptId Optional prompt ID for reference
42827
+ * @param userId Optional user ID for tracking
42828
+ * @param organizationId Optional organization ID (defaults to instance organizationId)
42829
+ * @returns Promise<string> URL of the saved image or empty string on error
42830
+ */
42831
+ }, {
42832
+ key: "saveAiImagePermanent",
42833
+ value: (function () {
42834
+ var _saveAiImagePermanent = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee2(hash, base64Image, catalogCodex, catalogGUID, organizationId) {
42835
+ var imageBlob, url, data, mediaItem, mediaItemRef, response, _res$variants$big, _res$variants, res;
42836
+ return _regeneratorRuntime__default["default"].wrap(function _callee2$(_context2) {
42837
+ while (1) switch (_context2.prev = _context2.next) {
42838
+ case 0:
42839
+ DivaUtils__default["default"].startSpanOfApm('MediaServiceHandler saveAiImagePermanent');
42840
+ imageBlob = this.base64ToBlob(base64Image, hash);
42841
+ url = this.mediaServiceUrl + this.POST_mediaItem;
42842
+ data = new FormData();
42843
+ data.append('file', imageBlob);
42844
+ mediaItem = {
42845
+ organizationId: organizationId || this.organizationId,
42846
+ mediaType: 'PCT',
42847
+ fileName: hash + '.png'
42848
+ };
42849
+ data.append('mediaItem', JSON.stringify(mediaItem));
42850
+ mediaItemRef = {
42851
+ functionType: 'ART',
42852
+ aiImageHash: hash,
42853
+ catalogCodex: catalogCodex,
42854
+ catalogGuid: catalogGUID
42855
+ };
42856
+ data.append('mediaItemRef', JSON.stringify(mediaItemRef));
42857
+ _context2.prev = 9;
42858
+ _context2.next = 12;
42859
+ return fetch(url, {
42860
+ method: 'POST',
42861
+ body: data,
42862
+ headers: {
42863
+ Authorization: 'Bearer ' + this.jwt
42864
+ }
42865
+ });
42866
+ case 12:
42867
+ response = _context2.sent;
42868
+ if (!response.ok) {
42869
+ _context2.next = 22;
42870
+ break;
42871
+ }
42872
+ _context2.next = 16;
42873
+ return response.json();
42874
+ case 16:
42875
+ res = _context2.sent;
42876
+ LOG$3.debug('Successfully saved AI image in media Service. URL: ' + res.url);
42877
+ DivaUtils__default["default"].endSpanOfApm('MediaServiceHandler saveAiImagePermanent');
42878
+ return _context2.abrupt("return", (_res$variants$big = (_res$variants = res.variants) === null || _res$variants === void 0 ? void 0 : _res$variants.big) !== null && _res$variants$big !== void 0 ? _res$variants$big : res.url);
42879
+ case 22:
42880
+ LOG$3.error(new DivaUtils.DivaError('Error when saving the AI image on mediaService. Hash: ' + hash + ' response: ' + response, {
42881
+ code: 'AI_001'
42882
+ }));
42883
+ case 23:
42884
+ _context2.next = 28;
42885
+ break;
42886
+ case 25:
42887
+ _context2.prev = 25;
42888
+ _context2.t0 = _context2["catch"](9);
42889
+ LOG$3.error(new DivaUtils.DivaError('Exception when saving AI image. Hash: ' + hash + ' error: ' + _context2.t0, {
42890
+ code: 'AI_002'
42891
+ }));
42892
+ case 28:
42893
+ DivaUtils__default["default"].endSpanOfApm('MediaServiceHandler saveAiImagePermanent');
42894
+ return _context2.abrupt("return", '');
42895
+ case 30:
42896
+ case "end":
42897
+ return _context2.stop();
42898
+ }
42899
+ }, _callee2, this, [[9, 25]]);
42900
+ }));
42901
+ function saveAiImagePermanent(_x5, _x6, _x7, _x8, _x9) {
42902
+ return _saveAiImagePermanent.apply(this, arguments);
42903
+ }
42904
+ return saveAiImagePermanent;
42905
+ }())
42438
42906
  }]);
42439
42907
  }();
42440
42908
  var mediaServiceHandler = new DivaMediaServiceHandler();
@@ -42979,7 +43447,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
42979
43447
  break;
42980
43448
  case 8:
42981
43449
  _context4.next = 10;
42982
- return Promise.resolve().then(function () { return require('./DivaStandardPlanner-f44f3a03.js'); });
43450
+ return Promise.resolve().then(function () { return require('./DivaStandardPlanner-72604cbb.js'); });
42983
43451
  case 10:
42984
43452
  _yield$import = _context4.sent;
42985
43453
  DivaStandardPlanner = _yield$import["default"];
@@ -42990,7 +43458,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
42990
43458
  return _context4.abrupt("break", 21);
42991
43459
  case 15:
42992
43460
  _context4.next = 17;
42993
- return Promise.resolve().then(function () { return require('./DivaBoxPlanner-f865ff9c.js'); });
43461
+ return Promise.resolve().then(function () { return require('./DivaBoxPlanner-91e237e4.js'); });
42994
43462
  case 17:
42995
43463
  _yield$import2 = _context4.sent;
42996
43464
  DivaBoxPlanner = _yield$import2["default"];
@@ -43446,7 +43914,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
43446
43914
  }, {
43447
43915
  key: "saveSet2DImage",
43448
43916
  value: function () {
43449
- var _saveSet2DImage = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee12(setId, catCodex, catGUID, planning2DAsJPGBase64) {
43917
+ var _saveSet2DImage = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee12(catCodex, catGUID, planning2DAsJPGBase64) {
43450
43918
  var curPlanningHash, urlToPlanning2D;
43451
43919
  return _regeneratorRuntime__default["default"].wrap(function _callee12$(_context12) {
43452
43920
  while (1) switch (_context12.prev = _context12.next) {
@@ -43466,11 +43934,46 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
43466
43934
  }
43467
43935
  }, _callee12, this);
43468
43936
  }));
43469
- function saveSet2DImage(_x19, _x20, _x21, _x22) {
43937
+ function saveSet2DImage(_x19, _x20, _x21) {
43470
43938
  return _saveSet2DImage.apply(this, arguments);
43471
43939
  }
43472
43940
  return saveSet2DImage;
43473
43941
  }()
43942
+ }, {
43943
+ key: "saveAiImage",
43944
+ value: function () {
43945
+ var _saveAiImage = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee13(promptId, catCodex, catGUID, aiImageAsJPGBase64) {
43946
+ var curPlanningHash, urlToAiImage;
43947
+ return _regeneratorRuntime__default["default"].wrap(function _callee13$(_context13) {
43948
+ while (1) switch (_context13.prev = _context13.next) {
43949
+ case 0:
43950
+ //Get current hash.
43951
+ DivaUtils__default["default"].startSpanOfApm('DivaPlannerHandler saveAiImage');
43952
+ curPlanningHash = this.createPlanningHash();
43953
+ _context13.next = 4;
43954
+ return mediaServiceHandler.saveAiImagePermanent(promptId + '_' + curPlanningHash, aiImageAsJPGBase64, catCodex, catGUID);
43955
+ case 4:
43956
+ urlToAiImage = _context13.sent;
43957
+ DivaUtils__default["default"].endSpanOfApm('DivaPlannerHandler saveAiImage');
43958
+ return _context13.abrupt("return", {
43959
+ RenderWidth: 1024,
43960
+ RenderHeight: 1024,
43961
+ Description: 'AI Image',
43962
+ Filename: promptId + '_' + curPlanningHash + '.png',
43963
+ Id: promptId + '_' + curPlanningHash,
43964
+ URL: urlToAiImage
43965
+ });
43966
+ case 7:
43967
+ case "end":
43968
+ return _context13.stop();
43969
+ }
43970
+ }, _callee13, this);
43971
+ }));
43972
+ function saveAiImage(_x22, _x23, _x24, _x25) {
43973
+ return _saveAiImage.apply(this, arguments);
43974
+ }
43975
+ return saveAiImage;
43976
+ }()
43474
43977
  /**
43475
43978
  * This function is called in order to destroy a planner. All elements are cleared all saved resources are cleared.
43476
43979
  * @param setId The setID the planner belongs to
@@ -43521,35 +44024,35 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
43521
44024
  }, {
43522
44025
  key: "addPlannerElement",
43523
44026
  value: function () {
43524
- var _addPlannerElement = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee13(setId, basketId, initParams) {
44027
+ var _addPlannerElement = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee14(setId, basketId, initParams) {
43525
44028
  var _this$plannerList$get;
43526
- return _regeneratorRuntime__default["default"].wrap(function _callee13$(_context13) {
43527
- while (1) switch (_context13.prev = _context13.next) {
44029
+ return _regeneratorRuntime__default["default"].wrap(function _callee14$(_context14) {
44030
+ while (1) switch (_context14.prev = _context14.next) {
43528
44031
  case 0:
43529
44032
  DivaUtils__default["default"].startSpanOfApm('DivaPlannerHandler addPlannerElement');
43530
44033
  if (this.plannerList.has(setId)) {
43531
- _context13.next = 4;
44034
+ _context14.next = 4;
43532
44035
  break;
43533
44036
  }
43534
44037
  DivaUtils__default["default"].endSpanOfApm('DivaPlannerHandler addPlannerElement');
43535
- return _context13.abrupt("return");
44038
+ return _context14.abrupt("return");
43536
44039
  case 4:
43537
- _context13.next = 6;
44040
+ _context14.next = 6;
43538
44041
  return this.plannerList.get(setId).addPlannerElement(basketId, initParams);
43539
44042
  case 6:
43540
44043
  this.setPlannerHandler.updateSetPosNr(this.plannerList);
43541
44044
  this.setPlannerHandler.calcGlobalBoundingBox(this.plannerList);
43542
44045
  DivaUtils__default["default"].endSpanOfApm('DivaPlannerHandler addPlannerElement');
43543
- return _context13.abrupt("return", (_this$plannerList$get = this.plannerList.get(setId)) === null || _this$plannerList$get === void 0 ? void 0 : _this$plannerList$get.getAllViewPlannerElements().find(function (item) {
44046
+ return _context14.abrupt("return", (_this$plannerList$get = this.plannerList.get(setId)) === null || _this$plannerList$get === void 0 ? void 0 : _this$plannerList$get.getAllViewPlannerElements().find(function (item) {
43544
44047
  return item.getBasketId() == basketId;
43545
44048
  }));
43546
44049
  case 10:
43547
44050
  case "end":
43548
- return _context13.stop();
44051
+ return _context14.stop();
43549
44052
  }
43550
- }, _callee13, this);
44053
+ }, _callee14, this);
43551
44054
  }));
43552
- function addPlannerElement(_x23, _x24, _x25) {
44055
+ function addPlannerElement(_x26, _x27, _x28) {
43553
44056
  return _addPlannerElement.apply(this, arguments);
43554
44057
  }
43555
44058
  return addPlannerElement;
@@ -43557,36 +44060,36 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
43557
44060
  }, {
43558
44061
  key: "deletePlannerElement",
43559
44062
  value: function () {
43560
- var _deletePlannerElement = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee14(setId, elementId, autoCorrectAVL_AVR, deletionType) {
44063
+ var _deletePlannerElement = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee15(setId, elementId, autoCorrectAVL_AVR, deletionType) {
43561
44064
  var response;
43562
- return _regeneratorRuntime__default["default"].wrap(function _callee14$(_context14) {
43563
- while (1) switch (_context14.prev = _context14.next) {
44065
+ return _regeneratorRuntime__default["default"].wrap(function _callee15$(_context15) {
44066
+ while (1) switch (_context15.prev = _context15.next) {
43564
44067
  case 0:
43565
44068
  DivaUtils__default["default"].startSpanOfApm('DivaPlannerHandler deletePlannerElement');
43566
44069
  if (this.plannerList.has(setId)) {
43567
- _context14.next = 4;
44070
+ _context15.next = 4;
43568
44071
  break;
43569
44072
  }
43570
44073
  DivaUtils__default["default"].endSpanOfApm('DivaPlannerHandler deletePlannerElement');
43571
- return _context14.abrupt("return", {
44074
+ return _context15.abrupt("return", {
43572
44075
  newElementToSelect: -1
43573
44076
  });
43574
44077
  case 4:
43575
- _context14.next = 6;
44078
+ _context15.next = 6;
43576
44079
  return this.plannerList.get(setId).deletePlannerElement(elementId, autoCorrectAVL_AVR, deletionType);
43577
44080
  case 6:
43578
- response = _context14.sent;
44081
+ response = _context15.sent;
43579
44082
  this.setPlannerHandler.updateSetPosNr(this.plannerList);
43580
44083
  this.setPlannerHandler.calcGlobalBoundingBox(this.plannerList);
43581
44084
  DivaUtils__default["default"].endSpanOfApm('DivaPlannerHandler deletePlannerElement');
43582
- return _context14.abrupt("return", response);
44085
+ return _context15.abrupt("return", response);
43583
44086
  case 11:
43584
44087
  case "end":
43585
- return _context14.stop();
44088
+ return _context15.stop();
43586
44089
  }
43587
- }, _callee14, this);
44090
+ }, _callee15, this);
43588
44091
  }));
43589
- function deletePlannerElement(_x26, _x27, _x28, _x29) {
44092
+ function deletePlannerElement(_x29, _x30, _x31, _x32) {
43590
44093
  return _deletePlannerElement.apply(this, arguments);
43591
44094
  }
43592
44095
  return deletePlannerElement;
@@ -43629,31 +44132,31 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
43629
44132
  }, {
43630
44133
  key: "copyPlannerElements",
43631
44134
  value: (function () {
43632
- var _copyPlannerElements = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee15(setId, articleCopyRelation, copyInfo) {
44135
+ var _copyPlannerElements = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee16(setId, articleCopyRelation, copyInfo) {
43633
44136
  var response;
43634
- return _regeneratorRuntime__default["default"].wrap(function _callee15$(_context15) {
43635
- while (1) switch (_context15.prev = _context15.next) {
44137
+ return _regeneratorRuntime__default["default"].wrap(function _callee16$(_context16) {
44138
+ while (1) switch (_context16.prev = _context16.next) {
43636
44139
  case 0:
43637
44140
  if (!(!this.plannerList.has(setId) || !copyInfo)) {
43638
- _context15.next = 2;
44141
+ _context16.next = 2;
43639
44142
  break;
43640
44143
  }
43641
- return _context15.abrupt("return");
44144
+ return _context16.abrupt("return");
43642
44145
  case 2:
43643
- _context15.next = 4;
44146
+ _context16.next = 4;
43644
44147
  return this.plannerList.get(setId).copyPlannerElement(articleCopyRelation, copyInfo);
43645
44148
  case 4:
43646
- response = _context15.sent;
44149
+ response = _context16.sent;
43647
44150
  this.setPlannerHandler.updateSetPosNr(this.plannerList);
43648
44151
  this.setPlannerHandler.calcGlobalBoundingBox(this.plannerList);
43649
- return _context15.abrupt("return", response);
44152
+ return _context16.abrupt("return", response);
43650
44153
  case 8:
43651
44154
  case "end":
43652
- return _context15.stop();
44155
+ return _context16.stop();
43653
44156
  }
43654
- }, _callee15, this);
44157
+ }, _callee16, this);
43655
44158
  }));
43656
- function copyPlannerElements(_x30, _x31, _x32) {
44159
+ function copyPlannerElements(_x33, _x34, _x35) {
43657
44160
  return _copyPlannerElements.apply(this, arguments);
43658
44161
  }
43659
44162
  return copyPlannerElements;
@@ -43789,29 +44292,29 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
43789
44292
  }, {
43790
44293
  key: "request3D",
43791
44294
  value: function () {
43792
- var _request3D = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee16(doRequestRendering, doRequestHqRenderScript, alternateRenderingsExist, alternateRenderInfo, forceReloadPlanning, renderRequestInfos, hybrid3DInfo, useLatestHybridInfo) {
44295
+ var _request3D = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee17(doRequestRendering, doRequestHqRenderScript, alternateRenderingsExist, alternateRenderInfo, forceReloadPlanning, renderRequestInfos, hybrid3DInfo, useLatestHybridInfo) {
43793
44296
  var _this3 = this;
43794
44297
  var plannerData, loadedCatData, plannerExists, savedSetId;
43795
- return _regeneratorRuntime__default["default"].wrap(function _callee16$(_context16) {
43796
- while (1) switch (_context16.prev = _context16.next) {
44298
+ return _regeneratorRuntime__default["default"].wrap(function _callee17$(_context17) {
44299
+ while (1) switch (_context17.prev = _context17.next) {
43797
44300
  case 0:
43798
44301
  if (!doRequestRendering) {
43799
- _context16.next = 9;
44302
+ _context17.next = 9;
43800
44303
  break;
43801
44304
  }
43802
44305
  if (renderRequestInfos) {
43803
- _context16.next = 6;
44306
+ _context17.next = 6;
43804
44307
  break;
43805
44308
  }
43806
44309
  LOG$2.error(new DivaUtils.DivaError('Error requesting 3D rendering. No renderRequestInfo is set'));
43807
- return _context16.abrupt("return");
44310
+ return _context17.abrupt("return");
43808
44311
  case 6:
43809
44312
  if (!(renderRequestInfos.width <= 0 || isNaN(renderRequestInfos.width) || renderRequestInfos.height <= 0 || isNaN(renderRequestInfos.height))) {
43810
- _context16.next = 9;
44313
+ _context17.next = 9;
43811
44314
  break;
43812
44315
  }
43813
44316
  LOG$2.error(new DivaUtils.DivaError('Error requesting rendering. Not valid width or height request width: ' + renderRequestInfos.width + ' height: ' + renderRequestInfos.height));
43814
- return _context16.abrupt("return");
44317
+ return _context17.abrupt("return");
43815
44318
  case 9:
43816
44319
  plannerData = this.handler3D.initPlannerData(this.plannerHandlerFunctions.doAllowSetPlanner());
43817
44320
  loadedCatData = [];
@@ -43841,7 +44344,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
43841
44344
  });
43842
44345
  });
43843
44346
  if (!plannerExists) {
43844
- _context16.next = 19;
44347
+ _context17.next = 19;
43845
44348
  break;
43846
44349
  }
43847
44350
  // if not in set planner mode overwrite s1 with correct setId
@@ -43849,7 +44352,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
43849
44352
  plannerData.SCE.ROO[0].SET[0].ID = savedSetId;
43850
44353
  plannerData.SCE.ROO[0].SelectSet = savedSetId;
43851
44354
  }
43852
- _context16.next = 18;
44355
+ _context17.next = 18;
43853
44356
  return this.handler3D.request3D({
43854
44357
  doRequestRendering: doRequestRendering,
43855
44358
  doRequestHqRenderScript: doRequestHqRenderScript,
@@ -43864,16 +44367,16 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
43864
44367
  useLatestHybridInfo: useLatestHybridInfo
43865
44368
  });
43866
44369
  case 18:
43867
- return _context16.abrupt("return", _context16.sent);
44370
+ return _context17.abrupt("return", _context17.sent);
43868
44371
  case 19:
43869
- return _context16.abrupt("return");
44372
+ return _context17.abrupt("return");
43870
44373
  case 20:
43871
44374
  case "end":
43872
- return _context16.stop();
44375
+ return _context17.stop();
43873
44376
  }
43874
- }, _callee16, this);
44377
+ }, _callee17, this);
43875
44378
  }));
43876
- function request3D(_x33, _x34, _x35, _x36, _x37, _x38, _x39, _x40) {
44379
+ function request3D(_x36, _x37, _x38, _x39, _x40, _x41, _x42, _x43) {
43877
44380
  return _request3D.apply(this, arguments);
43878
44381
  }
43879
44382
  return request3D;
@@ -44096,15 +44599,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
44096
44599
  */
44097
44600
  _defineProperty__default["default"](this, "updatePlannerRendering", function (rendering) {
44098
44601
  var _this$state;
44602
+ var onlyUpdateState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
44099
44603
  if (rendering.getIsFullscreenRendering()) {
44100
44604
  _this.updateFullscreenRendering(rendering);
44101
44605
  } else {
44102
- var _this$actSet;
44103
- _this.updatePlanner3DImage(rendering, ((_this$actSet = _this.actSet()) === null || _this$actSet === void 0 ? void 0 : _this$actSet.getAlternateRenderInfo().length) > 0);
44606
+ var _this$updatePlanner3D;
44607
+ (_this$updatePlanner3D = _this.updatePlanner3DImage) === null || _this$updatePlanner3D === void 0 || _this$updatePlanner3D.call(_this, rendering, onlyUpdateState);
44104
44608
  }
44105
- if (_this.actions && (_this$state = _this.state) !== null && _this$state !== void 0 && _this$state.enableSupport) {
44106
- var _this$actSet2, _this$state$user, _this$state$user2, _this$state$user3;
44107
- _this.api.postPlanningInfo((_this$actSet2 = _this.actSet()) === null || _this$actSet2 === void 0 ? void 0 : _this$actSet2.getVariantBasketData(), _this.divaNr, rendering.getImageForSrc(), _this.getCurSetPrice() + setHandlerInstance.getActSetPriceFormat(_this.actSet()), _this.getCurCatalogName(), (_this$state$user = _this.state.user) === null || _this$state$user === void 0 ? void 0 : _this$state$user._id, (_this$state$user2 = _this.state.user) === null || _this$state$user2 === void 0 ? void 0 : _this$state$user2.name, (_this$state$user3 = _this.state.user) === null || _this$state$user3 === void 0 ? void 0 : _this$state$user3.familyName, _this.state.organization._id);
44609
+ if (!onlyUpdateState && _this.actions && (_this$state = _this.state) !== null && _this$state !== void 0 && _this$state.enableSupport) {
44610
+ var _this$actSet, _this$state$user, _this$state$user2, _this$state$user3;
44611
+ _this.api.postPlanningInfo((_this$actSet = _this.actSet()) === null || _this$actSet === void 0 ? void 0 : _this$actSet.getVariantBasketData(), _this.divaNr, rendering.getImageForSrc(), _this.getCurSetPrice() + setHandlerInstance.getActSetPriceFormat(_this.actSet()), _this.getCurCatalogName(), (_this$state$user = _this.state.user) === null || _this$state$user === void 0 ? void 0 : _this$state$user._id, (_this$state$user2 = _this.state.user) === null || _this$state$user2 === void 0 ? void 0 : _this$state$user2.name, (_this$state$user3 = _this.state.user) === null || _this$state$user3 === void 0 ? void 0 : _this$state$user3.familyName, _this.state.organization._id);
44108
44612
  }
44109
44613
  });
44110
44614
  /**
@@ -44163,16 +44667,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
44163
44667
  */
44164
44668
  _defineProperty__default["default"](this, "loadConfigItemsOfOptions", /*#__PURE__*/function () {
44165
44669
  var _ref = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(configStepKey, paletteId, isUpdate, visible) {
44166
- var _this$updateConfigIte;
44670
+ var _this$state2, _this$state3, _this$updateConfigIte;
44167
44671
  var retValues;
44168
44672
  return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
44169
44673
  while (1) switch (_context.prev = _context.next) {
44170
44674
  case 0:
44171
44675
  _context.next = 2;
44172
- return setHandlerInstance.loadConfigItemsOfActSetByConfigStepKey(_this.actSet(), configStepKey, visible);
44676
+ return setHandlerInstance.loadConfigItemsOfActSetByConfigStepKey(_this.actSet(), configStepKey, visible, !!((_this$state2 = _this.state) !== null && _this$state2 !== void 0 && _this$state2.hidePrices || (_this$state3 = _this.state) !== null && _this$state3 !== void 0 && _this$state3.hideConfigPricePreview));
44173
44677
  case 2:
44174
44678
  retValues = _context.sent;
44175
- (_this$updateConfigIte = _this.updateConfigItems) === null || _this$updateConfigIte === void 0 || _this$updateConfigIte.call(_this, configStepKey, retValues.configItems, retValues.selectedItems, retValues.actStepName, retValues.paletteType, retValues.filterType, paletteId, isUpdate, retValues.visible, retValues.stepInfo, retValues.isRenderedInAccessorieStep, retValues.isRenderedNotInSettingPalette, retValues.optionCodex, retValues.notTotallyMatichingOPVs, retValues.subTabGroup, retValues.pairWithOptionsToGroup, retValues.isMultiselect, retValues.groupsDefaultClosed, retValues.contentItemId);
44679
+ (_this$updateConfigIte = _this.updateConfigItems) === null || _this$updateConfigIte === void 0 || _this$updateConfigIte.call(_this, configStepKey, retValues.configItems, retValues.selectedItems, retValues.actStepName, retValues.paletteType, retValues.filterType, paletteId, isUpdate, retValues.visible, retValues.stepInfo, retValues.isRenderedInAccessorieStep, retValues.isRenderedNotInSettingPalette, retValues.optionCodex, retValues.notTotallyMatichingOPVs, retValues.subTabGroup, retValues.pairWithOptionsToGroup, retValues.isMultiselect, retValues.groupsDefaultClosed, retValues.contentItemId, retValues.conceptFilter);
44176
44680
  case 4:
44177
44681
  case "end":
44178
44682
  return _context.stop();
@@ -44984,7 +45488,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
44984
45488
  value: function onInitializationError(e) {
44985
45489
  var _e$message,
44986
45490
  _this$actions19,
44987
- _this$state2,
45491
+ _this$state4,
44988
45492
  _this2 = this,
44989
45493
  _this$actions21,
44990
45494
  _this$actions21$toggl;
@@ -44999,7 +45503,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
44999
45503
  });
45000
45504
  return;
45001
45505
  }
45002
- if ((_this$state2 = this.state) !== null && _this$state2 !== void 0 && _this$state2.isFullscreenComponent) {
45506
+ if ((_this$state4 = this.state) !== null && _this$state4 !== void 0 && _this$state4.isFullscreenComponent) {
45003
45507
  var _this$actions20;
45004
45508
  (_this$actions20 = this.actions) === null || _this$actions20 === void 0 || _this$actions20.closeComponentInFullscreen();
45005
45509
  return;
@@ -45055,16 +45559,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
45055
45559
  }, {
45056
45560
  key: "getDivaArticles",
45057
45561
  value: function getDivaArticles(visiblePartlistArticlesAlso, allPartlistArticlesAlso) {
45058
- var _this$actSet3;
45059
- return (_this$actSet3 = this.actSet()) === null || _this$actSet3 === void 0 ? void 0 : _this$actSet3.getDivaArticles(visiblePartlistArticlesAlso, allPartlistArticlesAlso);
45562
+ var _this$actSet2;
45563
+ return (_this$actSet2 = this.actSet()) === null || _this$actSet2 === void 0 ? void 0 : _this$actSet2.getDivaArticles(visiblePartlistArticlesAlso, allPartlistArticlesAlso);
45060
45564
  }
45061
45565
 
45062
45566
  //for debugging
45063
45567
  }, {
45064
45568
  key: "getFirstDivaArticles",
45065
45569
  value: function getFirstDivaArticles() {
45066
- var _this$actSet$getDivaA, _this$actSet4;
45067
- return Object.values((_this$actSet$getDivaA = (_this$actSet4 = this.actSet()) === null || _this$actSet4 === void 0 ? void 0 : _this$actSet4.getDivaArticles()) !== null && _this$actSet$getDivaA !== void 0 ? _this$actSet$getDivaA : {})[0];
45570
+ var _this$actSet$getDivaA, _this$actSet3;
45571
+ return Object.values((_this$actSet$getDivaA = (_this$actSet3 = this.actSet()) === null || _this$actSet3 === void 0 ? void 0 : _this$actSet3.getDivaArticles()) !== null && _this$actSet$getDivaA !== void 0 ? _this$actSet$getDivaA : {})[0];
45068
45572
  }
45069
45573
  }, {
45070
45574
  key: "getHiddenOptions",
@@ -45132,8 +45636,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
45132
45636
  }, {
45133
45637
  key: "updateWebConfiguratorTitle",
45134
45638
  value: function updateWebConfiguratorTitle() {
45135
- var _this$setWebConifgura, _this$actSet5;
45136
- (_this$setWebConifgura = this.setWebConifguratorTitle) === null || _this$setWebConifgura === void 0 || _this$setWebConifgura.call(this, (_this$actSet5 = this.actSet()) === null || _this$actSet5 === void 0 ? void 0 : _this$actSet5.getSetTitle());
45639
+ var _this$setWebConifgura, _this$actSet4;
45640
+ (_this$setWebConifgura = this.setWebConifguratorTitle) === null || _this$setWebConifgura === void 0 || _this$setWebConifgura.call(this, (_this$actSet4 = this.actSet()) === null || _this$actSet4 === void 0 ? void 0 : _this$actSet4.getSetTitle());
45137
45641
  }
45138
45642
  }, {
45139
45643
  key: "updateConfigStructure",
@@ -45144,8 +45648,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
45144
45648
  key: "runInitMode",
45145
45649
  value: function () {
45146
45650
  var _runInitMode = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee17(plannerMode) {
45147
- var _this$plannerConfig$i, _this$state3;
45148
- var doDefault, _this$navigateToTabGr2, _this$saveToBasketWra, configStepKey, _this$navigateToConfi, _this$actSet6, _this$navigateToTabGr3, _this$navigateToTabGr4, _this$navigateToTabGr5;
45651
+ var _this$plannerConfig$i, _this$state5;
45652
+ var doDefault, _this$navigateToTabGr2, _this$saveToBasketWra, configStepKey, _this$navigateToConfi, _this$actSet5, _this$navigateToTabGr3, _this$navigateToTabGr4, _this$navigateToTabGr5;
45149
45653
  return _regeneratorRuntime__default["default"].wrap(function _callee17$(_context17) {
45150
45654
  while (1) switch (_context17.prev = _context17.next) {
45151
45655
  case 0:
@@ -45164,7 +45668,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
45164
45668
  _context17.next = 10;
45165
45669
  break;
45166
45670
  case 9:
45167
- if (this.plannerConfig.initMode == 'OPENCONFIGTABGROUP' || this.api.getPlannerType() == 'JUMP_OVER_PLANNER' || this.api.getPlannerType() == 'JUMP_OVER_PLANNER_ONLY_MOBILE' && (_this$state3 = this.state) !== null && _this$state3 !== void 0 && _this$state3.dimensions.isMobile) {
45671
+ if (this.plannerConfig.initMode == 'OPENCONFIGTABGROUP' || this.api.getPlannerType() == 'JUMP_OVER_PLANNER' || this.api.getPlannerType() == 'JUMP_OVER_PLANNER_ONLY_MOBILE' && (_this$state5 = this.state) !== null && _this$state5 !== void 0 && _this$state5.dimensions.isMobile) {
45168
45672
  configStepKey = this.plannerConfig.opt ? setHandlerInstance.getConfigStepKeyOfOption(this.actSet(), this.plannerConfig.opt) : setHandlerInstance.getFirstConfigStep(this.actSet());
45169
45673
  if (configStepKey) {
45170
45674
  (_this$navigateToConfi = this.navigateToConfigStep) === null || _this$navigateToConfi === void 0 || _this$navigateToConfi.call(this, configStepKey, !this.plannerConfig.opt, true);
@@ -45177,7 +45681,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
45177
45681
  if (doDefault) {
45178
45682
  if (plannerMode == 'ProductList') {
45179
45683
  (_this$navigateToTabGr3 = this.navigateToTabGroup) === null || _this$navigateToTabGr3 === void 0 || _this$navigateToTabGr3.call(this, 'PRODUCTS');
45180
- } else if ((_this$actSet6 = this.actSet()) !== null && _this$actSet6 !== void 0 && _this$actSet6.hasStaticRoomList) {
45684
+ } else if ((_this$actSet5 = this.actSet()) !== null && _this$actSet5 !== void 0 && _this$actSet5.hasStaticRoomList) {
45181
45685
  (_this$navigateToTabGr4 = this.navigateToTabGroup) === null || _this$navigateToTabGr4 === void 0 || _this$navigateToTabGr4.call(this, 'ROOMLIST', true);
45182
45686
  } else {
45183
45687
  (_this$navigateToTabGr5 = this.navigateToTabGroup) === null || _this$navigateToTabGr5 === void 0 || _this$navigateToTabGr5.call(this, this.getCurPlannerType(true), true);
@@ -45438,8 +45942,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
45438
45942
  }, {
45439
45943
  key: "getAlternateRenderingsForSummary",
45440
45944
  value: function getAlternateRenderingsForSummary() {
45441
- var _this$actSet7;
45442
- return (_this$actSet7 = this.actSet()) === null || _this$actSet7 === void 0 || (_this$actSet7 = _this$actSet7.CatalogData) === null || _this$actSet7 === void 0 ? void 0 : _this$actSet7.alternateRenderingsForSummary;
45945
+ var _this$actSet6;
45946
+ return (_this$actSet6 = this.actSet()) === null || _this$actSet6 === void 0 || (_this$actSet6 = _this$actSet6.CatalogData) === null || _this$actSet6 === void 0 ? void 0 : _this$actSet6.alternateRenderingsForSummary;
45443
45947
  }
45444
45948
  }, {
45445
45949
  key: "destroyWebPlanner",
@@ -45725,8 +46229,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
45725
46229
  }, {
45726
46230
  key: "setDifferentOptions",
45727
46231
  value: function setDifferentOptions(options) {
45728
- var _this$actSet8;
45729
- (_this$actSet8 = this.actSet()) === null || _this$actSet8 === void 0 || _this$actSet8.setDifferentOptions(options);
46232
+ var _this$actSet7;
46233
+ (_this$actSet7 = this.actSet()) === null || _this$actSet7 === void 0 || _this$actSet7.setDifferentOptions(options);
45730
46234
  }
45731
46235
  }, {
45732
46236
  key: "checkMatchingProducts",
@@ -45773,8 +46277,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
45773
46277
  }, {
45774
46278
  key: "updatePriceInView",
45775
46279
  value: function updatePriceInView() {
45776
- var _this$updatePrice, _this$actSet9;
45777
- (_this$updatePrice = this.updatePrice) === null || _this$updatePrice === void 0 || _this$updatePrice.call(this, setHandlerInstance.getTotalViewPrice(this.sets), this.actSet().getViewSetPrice(), setHandlerInstance.getTotalViewBruttoPrice(this.sets), undefined, (_this$actSet9 = this.actSet()) === null || _this$actSet9 === void 0 ? void 0 : _this$actSet9.getCustomDimensionsOfActSet());
46280
+ var _this$updatePrice, _this$actSet8, _this$actSet9;
46281
+ (_this$updatePrice = this.updatePrice) === null || _this$updatePrice === void 0 || _this$updatePrice.call(this, setHandlerInstance.getTotalViewPrice(this.sets), this.actSet().getViewSetPrice(), setHandlerInstance.getTotalViewBruttoPrice(this.sets), undefined, (_this$actSet8 = this.actSet()) === null || _this$actSet8 === void 0 ? void 0 : _this$actSet8.getCustomDimensionsOfActSet(), (_this$actSet9 = this.actSet()) === null || _this$actSet9 === void 0 ? void 0 : _this$actSet9.setHash);
45778
46282
  }
45779
46283
 
45780
46284
  /**
@@ -46066,6 +46570,127 @@ var DivaWebPlanner = /*#__PURE__*/function () {
46066
46570
  if (!set) return;
46067
46571
  return setHandlerInstance.checkNotificationRules(set, targetArticles, visitedOptions, event);
46068
46572
  }
46573
+ }, {
46574
+ key: "generateAiImageWithReferenceImages",
46575
+ value: function () {
46576
+ var _generateAiImageWithReferenceImages = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee28(data, leadKey) {
46577
+ var _this$state6;
46578
+ return _regeneratorRuntime__default["default"].wrap(function _callee28$(_context28) {
46579
+ while (1) switch (_context28.prev = _context28.next) {
46580
+ case 0:
46581
+ _context28.next = 2;
46582
+ return this.api.generateAiImageWithReferenceImages(_objectSpread$6(_objectSpread$6({}, data), {}, {
46583
+ userId: (_this$state6 = this.state) === null || _this$state6 === void 0 || (_this$state6 = _this$state6.user) === null || _this$state6 === void 0 ? void 0 : _this$state6._id
46584
+ }), leadKey);
46585
+ case 2:
46586
+ return _context28.abrupt("return", _context28.sent);
46587
+ case 3:
46588
+ case "end":
46589
+ return _context28.stop();
46590
+ }
46591
+ }, _callee28, this);
46592
+ }));
46593
+ function generateAiImageWithReferenceImages(_x80, _x81) {
46594
+ return _generateAiImageWithReferenceImages.apply(this, arguments);
46595
+ }
46596
+ return generateAiImageWithReferenceImages;
46597
+ }()
46598
+ }, {
46599
+ key: "getUsageLimits",
46600
+ value: function () {
46601
+ var _getUsageLimits = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee29() {
46602
+ var _this$state7, _this$state8;
46603
+ var organizationId, userId;
46604
+ return _regeneratorRuntime__default["default"].wrap(function _callee29$(_context29) {
46605
+ while (1) switch (_context29.prev = _context29.next) {
46606
+ case 0:
46607
+ organizationId = (_this$state7 = this.state) === null || _this$state7 === void 0 ? void 0 : _this$state7.organization._id;
46608
+ userId = (_this$state8 = this.state) === null || _this$state8 === void 0 || (_this$state8 = _this$state8.user) === null || _this$state8 === void 0 ? void 0 : _this$state8._id;
46609
+ if (!(!organizationId || !userId)) {
46610
+ _context29.next = 4;
46611
+ break;
46612
+ }
46613
+ throw new Error('Organization ID or User ID is not set');
46614
+ case 4:
46615
+ _context29.next = 6;
46616
+ return this.api.getUsageLimits({
46617
+ organizationId: organizationId,
46618
+ userId: userId
46619
+ });
46620
+ case 6:
46621
+ return _context29.abrupt("return", _context29.sent);
46622
+ case 7:
46623
+ case "end":
46624
+ return _context29.stop();
46625
+ }
46626
+ }, _callee29, this);
46627
+ }));
46628
+ function getUsageLimits() {
46629
+ return _getUsageLimits.apply(this, arguments);
46630
+ }
46631
+ return getUsageLimits;
46632
+ }()
46633
+ }, {
46634
+ key: "getAiRoomRenderings",
46635
+ value: function () {
46636
+ var _getAiRoomRenderings = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee30() {
46637
+ var _this$state9;
46638
+ var organizationId;
46639
+ return _regeneratorRuntime__default["default"].wrap(function _callee30$(_context30) {
46640
+ while (1) switch (_context30.prev = _context30.next) {
46641
+ case 0:
46642
+ organizationId = (_this$state9 = this.state) === null || _this$state9 === void 0 ? void 0 : _this$state9.organization._id;
46643
+ _context30.next = 3;
46644
+ return this.api.getAiRoomRenderings(organizationId);
46645
+ case 3:
46646
+ return _context30.abrupt("return", _context30.sent);
46647
+ case 4:
46648
+ case "end":
46649
+ return _context30.stop();
46650
+ }
46651
+ }, _callee30, this);
46652
+ }));
46653
+ function getAiRoomRenderings() {
46654
+ return _getAiRoomRenderings.apply(this, arguments);
46655
+ }
46656
+ return getAiRoomRenderings;
46657
+ }()
46658
+ }, {
46659
+ key: "createLeadKey",
46660
+ value: function () {
46661
+ var _createLeadKey = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee31(email) {
46662
+ return _regeneratorRuntime__default["default"].wrap(function _callee31$(_context31) {
46663
+ while (1) switch (_context31.prev = _context31.next) {
46664
+ case 0:
46665
+ _context31.next = 2;
46666
+ return this.api.createLeadKey(email);
46667
+ case 2:
46668
+ return _context31.abrupt("return", _context31.sent);
46669
+ case 3:
46670
+ case "end":
46671
+ return _context31.stop();
46672
+ }
46673
+ }, _callee31, this);
46674
+ }));
46675
+ function createLeadKey(_x82) {
46676
+ return _createLeadKey.apply(this, arguments);
46677
+ }
46678
+ return createLeadKey;
46679
+ }()
46680
+ }, {
46681
+ key: "clearAiImageAsJpg",
46682
+ value: function clearAiImageAsJpg() {
46683
+ var set = this.actSet();
46684
+ if (!set) return;
46685
+ set.clearAiImageAsJpg();
46686
+ }
46687
+ }, {
46688
+ key: "setAiImageAsJpg",
46689
+ value: function setAiImageAsJpg(promptId, base64) {
46690
+ var set = this.actSet();
46691
+ if (!set) return;
46692
+ set.setAiImageAsJpg(promptId, base64);
46693
+ }
46069
46694
  }, {
46070
46695
  key: "checkBannerRules",
46071
46696
  value: function checkBannerRules(visitedOptions, event) {
@@ -46103,8 +46728,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
46103
46728
  }
46104
46729
  }
46105
46730
  if (plannerType == 'JUMP_OVER_PLANNER_ONLY_MOBILE') {
46106
- var _this$state4;
46107
- if ((_this$state4 = this.state) !== null && _this$state4 !== void 0 && _this$state4.dimensions.isMobile) {
46731
+ var _this$state10;
46732
+ if ((_this$state10 = this.state) !== null && _this$state10 !== void 0 && _this$state10.dimensions.isMobile) {
46108
46733
  plannerType = 'JUMP_OVER_PLANNER';
46109
46734
  } else {
46110
46735
  plannerType = 'PLANNER';
@@ -46259,11 +46884,11 @@ var DivaWebPlanner = /*#__PURE__*/function () {
46259
46884
  }, {
46260
46885
  key: "getAllowRTV",
46261
46886
  value: function getAllowRTV() {
46262
- var _this$state5, _this$actSet26, _this$state6, _this$actSet27;
46887
+ var _this$state11, _this$actSet26, _this$state12, _this$actSet27;
46263
46888
  if (this.getEnableUnityRtvKombi()) return false;
46264
- if ((_this$state5 = this.state) !== null && _this$state5 !== void 0 && _this$state5.organization.settings.forceRTV) return true;
46889
+ if ((_this$state11 = this.state) !== null && _this$state11 !== void 0 && _this$state11.organization.settings.forceRTV) return true;
46265
46890
  if ((_this$actSet26 = this.actSet()) !== null && _this$actSet26 !== void 0 && _this$actSet26.CatalogData.divaForceRTV) return true;
46266
- if ((_this$state6 = this.state) !== null && _this$state6 !== void 0 && _this$state6.organization.settings.enableRTV && (_this$actSet27 = this.actSet()) !== null && _this$actSet27 !== void 0 && _this$actSet27.CatalogData.divaArReady) return true;
46891
+ if ((_this$state12 = this.state) !== null && _this$state12 !== void 0 && _this$state12.organization.settings.enableRTV && (_this$actSet27 = this.actSet()) !== null && _this$actSet27 !== void 0 && _this$actSet27.CatalogData.divaArReady) return true;
46267
46892
  return false;
46268
46893
  }
46269
46894
  }, {
@@ -46317,23 +46942,23 @@ var DivaWebPlanner = /*#__PURE__*/function () {
46317
46942
  }, {
46318
46943
  key: "getBasketDataWithEkText",
46319
46944
  value: function () {
46320
- var _getBasketDataWithEkText = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee28() {
46321
- return _regeneratorRuntime__default["default"].wrap(function _callee28$(_context28) {
46322
- while (1) switch (_context28.prev = _context28.next) {
46945
+ var _getBasketDataWithEkText = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee32() {
46946
+ return _regeneratorRuntime__default["default"].wrap(function _callee32$(_context32) {
46947
+ while (1) switch (_context32.prev = _context32.next) {
46323
46948
  case 0:
46324
- _context28.t0 = this.divaBasketHandler;
46325
- _context28.t1 = this.divaBasketHandler.actDivaNr;
46326
- _context28.next = 4;
46949
+ _context32.t0 = this.divaBasketHandler;
46950
+ _context32.t1 = this.divaBasketHandler.actDivaNr;
46951
+ _context32.next = 4;
46327
46952
  return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, true, this.doAllowSetPlanner(), this.ReturnTo);
46328
46953
  case 4:
46329
- _context28.t2 = _context28.sent;
46330
- _context28.t0.setBasketData.call(_context28.t0, _context28.t1, _context28.t2);
46331
- return _context28.abrupt("return", this.divaBasketHandler.actBasket);
46954
+ _context32.t2 = _context32.sent;
46955
+ _context32.t0.setBasketData.call(_context32.t0, _context32.t1, _context32.t2);
46956
+ return _context32.abrupt("return", this.divaBasketHandler.actBasket);
46332
46957
  case 7:
46333
46958
  case "end":
46334
- return _context28.stop();
46959
+ return _context32.stop();
46335
46960
  }
46336
- }, _callee28, this);
46961
+ }, _callee32, this);
46337
46962
  }));
46338
46963
  function getBasketDataWithEkText() {
46339
46964
  return _getBasketDataWithEkText.apply(this, arguments);
@@ -46359,7 +46984,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
46359
46984
  }, {
46360
46985
  key: "addToBasket",
46361
46986
  value: function () {
46362
- var _addToBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee29(actBasket) {
46987
+ var _addToBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee33(actBasket) {
46363
46988
  var _this$actions36,
46364
46989
  _this$actions37,
46365
46990
  _this$actions38,
@@ -46378,44 +47003,44 @@ var DivaWebPlanner = /*#__PURE__*/function () {
46378
47003
  to,
46379
47004
  variants,
46380
47005
  products,
46381
- _args29 = arguments;
46382
- return _regeneratorRuntime__default["default"].wrap(function _callee29$(_context29) {
46383
- while (1) switch (_context29.prev = _context29.next) {
47006
+ _args33 = arguments;
47007
+ return _regeneratorRuntime__default["default"].wrap(function _callee33$(_context33) {
47008
+ while (1) switch (_context33.prev = _context33.next) {
46384
47009
  case 0:
46385
- event = _args29.length > 1 && _args29[1] !== undefined ? _args29[1] : 'onAddToBasket';
46386
- _context29.t0 = event;
46387
- _context29.next = _context29.t0 === 'onWebPlanerPrint' ? 4 : _context29.t0 === 'onWebPlanerSave' ? 6 : _context29.t0 === 'onWebPlanerShare' ? 8 : _context29.t0 === 'onRequestConsulation' ? 10 : _context29.t0 === 'onSave' ? 12 : _context29.t0 === 'onSendEmail' ? 14 : _context29.t0 === 'onSaveProduct' ? 19 : _context29.t0 === 'dontSaveBasket' ? 26 : _context29.t0 === 'onAddToBasket' ? 26 : 28;
47010
+ event = _args33.length > 1 && _args33[1] !== undefined ? _args33[1] : 'onAddToBasket';
47011
+ _context33.t0 = event;
47012
+ _context33.next = _context33.t0 === 'onWebPlanerPrint' ? 4 : _context33.t0 === 'onWebPlanerSave' ? 6 : _context33.t0 === 'onWebPlanerShare' ? 8 : _context33.t0 === 'onRequestConsulation' ? 10 : _context33.t0 === 'onSave' ? 12 : _context33.t0 === 'onSendEmail' ? 14 : _context33.t0 === 'onSaveProduct' ? 19 : _context33.t0 === 'dontSaveBasket' ? 26 : _context33.t0 === 'onAddToBasket' ? 26 : 28;
46388
47013
  break;
46389
47014
  case 4:
46390
47015
  (_this$actions36 = this.actions) === null || _this$actions36 === void 0 || _this$actions36.onEvent({
46391
47016
  type: 'onWebPlanerPrint',
46392
47017
  data: actBasket.getAsJson()
46393
47018
  });
46394
- return _context29.abrupt("break", 30);
47019
+ return _context33.abrupt("break", 30);
46395
47020
  case 6:
46396
47021
  (_this$actions37 = this.actions) === null || _this$actions37 === void 0 || _this$actions37.onEvent({
46397
47022
  type: 'onWebPlanerSave',
46398
47023
  data: actBasket.getAsJson()
46399
47024
  });
46400
- return _context29.abrupt("break", 30);
47025
+ return _context33.abrupt("break", 30);
46401
47026
  case 8:
46402
47027
  (_this$actions38 = this.actions) === null || _this$actions38 === void 0 || _this$actions38.onEvent({
46403
47028
  type: 'onWebPlanerShare',
46404
47029
  data: actBasket.getAsJson()
46405
47030
  });
46406
- return _context29.abrupt("break", 30);
47031
+ return _context33.abrupt("break", 30);
46407
47032
  case 10:
46408
47033
  (_this$actions39 = this.actions) === null || _this$actions39 === void 0 || _this$actions39.onEvent({
46409
47034
  type: 'onRequestConsulation',
46410
47035
  data: actBasket.getAsJson()
46411
47036
  });
46412
- return _context29.abrupt("break", 30);
47037
+ return _context33.abrupt("break", 30);
46413
47038
  case 12:
46414
47039
  (_this$actions40 = this.actions) === null || _this$actions40 === void 0 || _this$actions40.onEvent({
46415
47040
  type: 'onSave',
46416
47041
  data: actBasket.getAsJson()
46417
47042
  });
46418
- return _context29.abrupt("break", 30);
47043
+ return _context33.abrupt("break", 30);
46419
47044
  case 14:
46420
47045
  emailConfig = (_this$divaBasketHandl4 = this.divaBasketHandler.emailConfig) !== null && _this$divaBasketHandl4 !== void 0 ? _this$divaBasketHandl4 : this.getEmailConfig(); //reset the emailConfig
46421
47046
  this.divaBasketHandler.emailConfig = undefined;
@@ -46450,43 +47075,43 @@ var DivaWebPlanner = /*#__PURE__*/function () {
46450
47075
  type: 'onAddToBasket',
46451
47076
  data: actBasket.getAsJson()
46452
47077
  });
46453
- return _context29.abrupt("break", 30);
47078
+ return _context33.abrupt("break", 30);
46454
47079
  case 19:
46455
47080
  this.actSet().CatalogData;
46456
- _context29.next = 22;
47081
+ _context33.next = 22;
46457
47082
  return this.api.saveAsProduct(this.sets, actBasket);
46458
47083
  case 22:
46459
- products = _context29.sent;
47084
+ products = _context33.sent;
46460
47085
  (_this$actions42 = this.actions) === null || _this$actions42 === void 0 || _this$actions42.onEvent({
46461
47086
  type: 'onAddToBasket',
46462
47087
  data: actBasket.getAsJson()
46463
47088
  });
46464
47089
  if (!products) {
46465
- _context29.next = 26;
47090
+ _context33.next = 26;
46466
47091
  break;
46467
47092
  }
46468
- return _context29.abrupt("return", products[0]);
47093
+ return _context33.abrupt("return", products[0]);
46469
47094
  case 26:
46470
47095
  (_this$actions43 = this.actions) === null || _this$actions43 === void 0 || _this$actions43.onEvent({
46471
47096
  type: 'onAddToBasket',
46472
47097
  data: actBasket.getAsJson()
46473
47098
  });
46474
- return _context29.abrupt("break", 30);
47099
+ return _context33.abrupt("break", 30);
46475
47100
  case 28:
46476
47101
  (_this$actions44 = this.actions) === null || _this$actions44 === void 0 || _this$actions44.onEvent({
46477
47102
  type: event,
46478
47103
  data: actBasket.getAsJson()
46479
47104
  });
46480
- return _context29.abrupt("break", 30);
47105
+ return _context33.abrupt("break", 30);
46481
47106
  case 30:
46482
- return _context29.abrupt("return");
47107
+ return _context33.abrupt("return");
46483
47108
  case 31:
46484
47109
  case "end":
46485
- return _context29.stop();
47110
+ return _context33.stop();
46486
47111
  }
46487
- }, _callee29, this);
47112
+ }, _callee33, this);
46488
47113
  }));
46489
- function addToBasket(_x80) {
47114
+ function addToBasket(_x83) {
46490
47115
  return _addToBasket.apply(this, arguments);
46491
47116
  }
46492
47117
  return addToBasket;
@@ -46541,28 +47166,28 @@ var DivaWebPlanner = /*#__PURE__*/function () {
46541
47166
  }, {
46542
47167
  key: "getCurrentBasket",
46543
47168
  value: function () {
46544
- var _getCurrentBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee30(event, force, returnTo, dontGoToSummary, hideLoading) {
47169
+ var _getCurrentBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee34(event, force, returnTo, dontGoToSummary, hideLoading) {
46545
47170
  var _this$actSet35, _this$divaBasketHandl5, _this$onClickAddToBas3;
46546
- return _regeneratorRuntime__default["default"].wrap(function _callee30$(_context30) {
46547
- while (1) switch (_context30.prev = _context30.next) {
47171
+ return _regeneratorRuntime__default["default"].wrap(function _callee34$(_context34) {
47172
+ while (1) switch (_context34.prev = _context34.next) {
46548
47173
  case 0:
46549
47174
  if (!(this.divaBasketHandler.basketWasSavedWithCurrentDocVersion && ((_this$actSet35 = this.actSet()) === null || _this$actSet35 === void 0 ? void 0 : _this$actSet35.setHash) === ((_this$divaBasketHandl5 = this.divaBasketHandler.actBasket) === null || _this$divaBasketHandl5 === void 0 || (_this$divaBasketHandl5 = _this$divaBasketHandl5.OrderSets) === null || _this$divaBasketHandl5 === void 0 ? void 0 : _this$divaBasketHandl5[0].SetHash) && !(returnTo !== null && returnTo !== void 0 && returnTo.includes('OPEN')))) {
46550
- _context30.next = 2;
47175
+ _context34.next = 2;
46551
47176
  break;
46552
47177
  }
46553
- return _context30.abrupt("return", 'BASKET_ALREADY_SAVED');
47178
+ return _context34.abrupt("return", 'BASKET_ALREADY_SAVED');
46554
47179
  case 2:
46555
- _context30.next = 4;
47180
+ _context34.next = 4;
46556
47181
  return (_this$onClickAddToBas3 = this.onClickAddToBasket) === null || _this$onClickAddToBas3 === void 0 ? void 0 : _this$onClickAddToBas3.call(this, undefined, event, force, returnTo, dontGoToSummary, hideLoading);
46557
47182
  case 4:
46558
- return _context30.abrupt("return", !!_context30.sent);
47183
+ return _context34.abrupt("return", !!_context34.sent);
46559
47184
  case 5:
46560
47185
  case "end":
46561
- return _context30.stop();
47186
+ return _context34.stop();
46562
47187
  }
46563
- }, _callee30, this);
47188
+ }, _callee34, this);
46564
47189
  }));
46565
- function getCurrentBasket(_x81, _x82, _x83, _x84, _x85) {
47190
+ function getCurrentBasket(_x84, _x85, _x86, _x87, _x88) {
46566
47191
  return _getCurrentBasket.apply(this, arguments);
46567
47192
  }
46568
47193
  return getCurrentBasket;
@@ -46784,9 +47409,9 @@ var DivaWebPlanner = /*#__PURE__*/function () {
46784
47409
  key: "initApiForLogicOnly",
46785
47410
  value: //just for testing purposes
46786
47411
  function () {
46787
- var _initApiForLogicOnly = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee31(organization, lang, getSessionGuid, handler, applicationEnvironment, apiKey, jwt) {
46788
- return _regeneratorRuntime__default["default"].wrap(function _callee31$(_context31) {
46789
- while (1) switch (_context31.prev = _context31.next) {
47412
+ var _initApiForLogicOnly = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee35(organization, lang, getSessionGuid, handler, applicationEnvironment, apiKey, jwt) {
47413
+ return _regeneratorRuntime__default["default"].wrap(function _callee35$(_context35) {
47414
+ while (1) switch (_context35.prev = _context35.next) {
46790
47415
  case 0:
46791
47416
  //empty services
46792
47417
  this.api = new DivaApiHandler(_objectSpread$6(_objectSpread$6({}, this.plannerConfig), {}, {
@@ -46799,17 +47424,17 @@ var DivaWebPlanner = /*#__PURE__*/function () {
46799
47424
  jwt: jwt,
46800
47425
  apiKey: apiKey
46801
47426
  }), handler);
46802
- _context31.next = 3;
47427
+ _context35.next = 3;
46803
47428
  return this.divaBasketHandler.initWWSClient(this.api.getWWSClient());
46804
47429
  case 3:
46805
47430
  this.plannerHandler = new DivaPlannerHandler(true);
46806
47431
  case 4:
46807
47432
  case "end":
46808
- return _context31.stop();
47433
+ return _context35.stop();
46809
47434
  }
46810
- }, _callee31, this);
47435
+ }, _callee35, this);
46811
47436
  }));
46812
- function initApiForLogicOnly(_x86, _x87, _x88, _x89, _x90, _x91, _x92) {
47437
+ function initApiForLogicOnly(_x89, _x90, _x91, _x92, _x93, _x94, _x95) {
46813
47438
  return _initApiForLogicOnly.apply(this, arguments);
46814
47439
  }
46815
47440
  return initApiForLogicOnly;
@@ -46822,16 +47447,16 @@ var DivaWebPlanner = /*#__PURE__*/function () {
46822
47447
  }, {
46823
47448
  key: "loadBasket",
46824
47449
  value: function () {
46825
- var _loadBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee32() {
46826
- return _regeneratorRuntime__default["default"].wrap(function _callee32$(_context32) {
46827
- while (1) switch (_context32.prev = _context32.next) {
47450
+ var _loadBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee36() {
47451
+ return _regeneratorRuntime__default["default"].wrap(function _callee36$(_context36) {
47452
+ while (1) switch (_context36.prev = _context36.next) {
46828
47453
  case 0:
46829
- return _context32.abrupt("return", this.divaBasketHandler.initializeBasket(this.api));
47454
+ return _context36.abrupt("return", this.divaBasketHandler.initializeBasket(this.api));
46830
47455
  case 1:
46831
47456
  case "end":
46832
- return _context32.stop();
47457
+ return _context36.stop();
46833
47458
  }
46834
- }, _callee32, this);
47459
+ }, _callee36, this);
46835
47460
  }));
46836
47461
  function loadBasket() {
46837
47462
  return _loadBasket.apply(this, arguments);
@@ -46846,39 +47471,39 @@ var DivaWebPlanner = /*#__PURE__*/function () {
46846
47471
  }, {
46847
47472
  key: "initBasket",
46848
47473
  value: function () {
46849
- var _initBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee33(init3D, ignoreFavorites) {
47474
+ var _initBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee37(init3D, ignoreFavorites) {
46850
47475
  var initSetState, set, basket;
46851
- return _regeneratorRuntime__default["default"].wrap(function _callee33$(_context33) {
46852
- while (1) switch (_context33.prev = _context33.next) {
47476
+ return _regeneratorRuntime__default["default"].wrap(function _callee37$(_context37) {
47477
+ while (1) switch (_context37.prev = _context37.next) {
46853
47478
  case 0:
46854
47479
  this.divaNr = this.divaBasketHandler.actDivaNr;
46855
47480
  initSetState = this.getInitStateForSet(!init3D);
46856
47481
  this.plannerHandler.initPlanner(initSetState, this.getPlannerHandlerFunctions());
46857
- _context33.next = 5;
47482
+ _context37.next = 5;
46858
47483
  return setHandlerInstance.initSetsByOrderSet(this.divaBasketHandler.getOrderSetsByDivaNr(this.divaNr), initSetState);
46859
47484
  case 5:
46860
47485
  //TODO check if when basket gets repaired the product match gets called
46861
47486
  set = this.actSet();
46862
47487
  setHandlerInstance.loadConfigStructureOfActSet(set, this.getCurPlannerType());
46863
47488
  if (!(favoritesHandlerInstance.FavoritesDefined(set) && !ignoreFavorites)) {
46864
- _context33.next = 10;
47489
+ _context37.next = 10;
46865
47490
  break;
46866
47491
  }
46867
- _context33.next = 10;
47492
+ _context37.next = 10;
46868
47493
  return this.handleFavorites(init3D ? 'CALC' : 'REPAIR');
46869
47494
  case 10:
46870
- _context33.next = 12;
47495
+ _context37.next = 12;
46871
47496
  return setHandlerInstance.fillOrderLinesAndOrderSets(this.sets, this.divaBasketHandler, !init3D, this.doAllowSetPlanner(), this.ReturnTo);
46872
47497
  case 12:
46873
- basket = _context33.sent;
46874
- return _context33.abrupt("return", basket);
47498
+ basket = _context37.sent;
47499
+ return _context37.abrupt("return", basket);
46875
47500
  case 14:
46876
47501
  case "end":
46877
- return _context33.stop();
47502
+ return _context37.stop();
46878
47503
  }
46879
- }, _callee33, this);
47504
+ }, _callee37, this);
46880
47505
  }));
46881
- function initBasket(_x93, _x94) {
47506
+ function initBasket(_x96, _x97) {
46882
47507
  return _initBasket.apply(this, arguments);
46883
47508
  }
46884
47509
  return initBasket;
@@ -46892,21 +47517,21 @@ var DivaWebPlanner = /*#__PURE__*/function () {
46892
47517
  }, {
46893
47518
  key: "getValidVariantsLength",
46894
47519
  value: function () {
46895
- var _getValidVariantsLength = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee34() {
47520
+ var _getValidVariantsLength = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee38() {
46896
47521
  var set;
46897
- return _regeneratorRuntime__default["default"].wrap(function _callee34$(_context34) {
46898
- while (1) switch (_context34.prev = _context34.next) {
47522
+ return _regeneratorRuntime__default["default"].wrap(function _callee38$(_context38) {
47523
+ while (1) switch (_context38.prev = _context38.next) {
46899
47524
  case 0:
46900
47525
  set = this.actSet();
46901
- _context34.next = 3;
47526
+ _context38.next = 3;
46902
47527
  return favoritesHandlerInstance.getValidVariants(set, true);
46903
47528
  case 3:
46904
- return _context34.abrupt("return", _context34.sent.length);
47529
+ return _context38.abrupt("return", _context38.sent.length);
46905
47530
  case 4:
46906
47531
  case "end":
46907
- return _context34.stop();
47532
+ return _context38.stop();
46908
47533
  }
46909
- }, _callee34, this);
47534
+ }, _callee38, this);
46910
47535
  }));
46911
47536
  function getValidVariantsLength() {
46912
47537
  return _getValidVariantsLength.apply(this, arguments);
@@ -46916,46 +47541,46 @@ var DivaWebPlanner = /*#__PURE__*/function () {
46916
47541
  }, {
46917
47542
  key: "handleFavorites",
46918
47543
  value: function () {
46919
- var _handleFavorites = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee35(mode) {
47544
+ var _handleFavorites = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee39(mode) {
46920
47545
  var _this5 = this;
46921
47546
  var set, i;
46922
- return _regeneratorRuntime__default["default"].wrap(function _callee35$(_context35) {
46923
- while (1) switch (_context35.prev = _context35.next) {
47547
+ return _regeneratorRuntime__default["default"].wrap(function _callee39$(_context39) {
47548
+ while (1) switch (_context39.prev = _context39.next) {
46924
47549
  case 0:
46925
47550
  set = this.actSet();
46926
47551
  i = 0;
46927
47552
  case 2:
46928
47553
  if (!favoritesHandlerInstance.IsCalcForSummary) {
46929
- _context35.next = 11;
47554
+ _context39.next = 11;
46930
47555
  break;
46931
47556
  }
46932
- _context35.next = 5;
47557
+ _context39.next = 5;
46933
47558
  return DivaUtils__default["default"].Sleep(200);
46934
47559
  case 5:
46935
47560
  i++;
46936
47561
  if (!(i > 1000)) {
46937
- _context35.next = 9;
47562
+ _context39.next = 9;
46938
47563
  break;
46939
47564
  }
46940
47565
  LOG$1.error(new DivaUtils.DivaError('error on generating Variants of Summary'));
46941
- return _context35.abrupt("break", 11);
47566
+ return _context39.abrupt("break", 11);
46942
47567
  case 9:
46943
- _context35.next = 2;
47568
+ _context39.next = 2;
46944
47569
  break;
46945
47570
  case 11:
46946
- _context35.next = 13;
47571
+ _context39.next = 13;
46947
47572
  return favoritesHandlerInstance.handleFavorites(set, mode, this.divaBasketHandler.actBasket, this.saveToBasketWrapper.bind(this), this.doConfigure.bind(this), function () {
46948
47573
  return _this5.update2DGrid(set);
46949
47574
  }, this.actions);
46950
47575
  case 13:
46951
- return _context35.abrupt("return", _context35.sent);
47576
+ return _context39.abrupt("return", _context39.sent);
46952
47577
  case 14:
46953
47578
  case "end":
46954
- return _context35.stop();
47579
+ return _context39.stop();
46955
47580
  }
46956
- }, _callee35, this);
47581
+ }, _callee39, this);
46957
47582
  }));
46958
- function handleFavorites(_x95) {
47583
+ function handleFavorites(_x98) {
46959
47584
  return _handleFavorites.apply(this, arguments);
46960
47585
  }
46961
47586
  return handleFavorites;
@@ -46968,48 +47593,48 @@ var DivaWebPlanner = /*#__PURE__*/function () {
46968
47593
  }, {
46969
47594
  key: "initSapOrderLinesFromBasket",
46970
47595
  value: function () {
46971
- var _initSapOrderLinesFromBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee36(divaNr, init3D, onlyLoadOldBakset) {
47596
+ var _initSapOrderLinesFromBasket = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee40(divaNr, init3D, onlyLoadOldBakset) {
46972
47597
  var result, oldBasket, basket;
46973
- return _regeneratorRuntime__default["default"].wrap(function _callee36$(_context36) {
46974
- while (1) switch (_context36.prev = _context36.next) {
47598
+ return _regeneratorRuntime__default["default"].wrap(function _callee40$(_context40) {
47599
+ while (1) switch (_context40.prev = _context40.next) {
46975
47600
  case 0:
46976
47601
  if (divaNr) this.divaBasketHandler.updateDivaNrInBasket(divaNr);
46977
- _context36.next = 3;
47602
+ _context40.next = 3;
46978
47603
  return this.loadBasket();
46979
47604
  case 3:
46980
- result = _context36.sent;
47605
+ result = _context40.sent;
46981
47606
  if (!onlyLoadOldBakset) {
46982
- _context36.next = 6;
47607
+ _context40.next = 6;
46983
47608
  break;
46984
47609
  }
46985
- return _context36.abrupt("return", {
47610
+ return _context40.abrupt("return", {
46986
47611
  oldBasket: new basketModel.BasketData(JSON.parse(JSON.stringify(this.divaBasketHandler.actBasket))),
46987
47612
  cache: {}
46988
47613
  });
46989
47614
  case 6:
46990
47615
  if (!(result === false)) {
46991
- _context36.next = 8;
47616
+ _context40.next = 8;
46992
47617
  break;
46993
47618
  }
46994
47619
  throw new Error('Could not load basket! ' + divaNr);
46995
47620
  case 8:
46996
47621
  oldBasket = new basketModel.BasketData(JSON.parse(JSON.stringify(this.divaBasketHandler.actBasket)));
46997
- _context36.next = 11;
47622
+ _context40.next = 11;
46998
47623
  return this.initBasket(init3D);
46999
47624
  case 11:
47000
- basket = _context36.sent;
47001
- return _context36.abrupt("return", {
47625
+ basket = _context40.sent;
47626
+ return _context40.abrupt("return", {
47002
47627
  basket: basket,
47003
47628
  oldBasket: oldBasket,
47004
47629
  cache: this.api.getJsonDataCache()
47005
47630
  });
47006
47631
  case 13:
47007
47632
  case "end":
47008
- return _context36.stop();
47633
+ return _context40.stop();
47009
47634
  }
47010
- }, _callee36, this);
47635
+ }, _callee40, this);
47011
47636
  }));
47012
- function initSapOrderLinesFromBasket(_x96, _x97, _x98) {
47637
+ function initSapOrderLinesFromBasket(_x99, _x100, _x101) {
47013
47638
  return _initSapOrderLinesFromBasket.apply(this, arguments);
47014
47639
  }
47015
47640
  return initSapOrderLinesFromBasket;
@@ -65262,6 +65887,7 @@ var a$3 = {
65262
65887
  idmService: 'https://api-test.diva-portal.com/idm',
65263
65888
  constructorService: 'https://api-test.diva-portal.com/constructor',
65264
65889
  mediaService: 'https://api-test.diva-portal.com/media',
65890
+ aiService: 'https://api-test.diva-portal.com/ai',
65265
65891
  baseUrl: 'https://api-test.diva-portal.com',
65266
65892
  baseCdnUrl: 'https://cdn-test.diva-portal.com',
65267
65893
  api2: {
@@ -65329,6 +65955,7 @@ var a$2 = {
65329
65955
  reportService: 'https://diva-api.pfister.ch/report',
65330
65956
  enricherService: 'https://diva-api.pfister.ch/enricher',
65331
65957
  idmService: 'https://diva-api.pfister.ch/idm',
65958
+ aiService: 'https://diva-api.pfister.ch/ai',
65332
65959
  mediaService: 'https://diva-api.pfister.ch/media',
65333
65960
  //'http://localhost:3000',
65334
65961
  clientArticleService: 'https://diva-api.pfister.ch/pfister-article',
@@ -65387,6 +66014,7 @@ var a$1 = {
65387
66014
  mediaService: 'https://q-diva-api.pfister.ch/media',
65388
66015
  // 'http://localhost:3000',
65389
66016
  enricherService: 'https://q-diva-api.pfister.ch/enricher',
66017
+ aiService: 'https://q-diva-api.pfister.ch/ai',
65390
66018
  idmService: 'https://q-diva-api.pfister.ch/idm',
65391
66019
  clientArticleService: 'https://q-diva-api.pfister.ch/pfister-article',
65392
66020
  baseUrl: 'https://q-diva-api.pfister.ch',