@crystaldesign/web-planner-logic 24.10.0-beta.1 → 24.10.0-beta.11

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 (97) hide show
  1. package/build/cjs/{DivaBoxPlanner-6a883291.js → DivaBoxPlanner-26e0cace.js} +16 -18
  2. package/build/cjs/{DivaStandardPlanner-a18f752d.js → DivaStandardPlanner-25919135.js} +26 -30
  3. package/build/cjs/{DoorPlanner-5164c50d.js → DoorPlanner-704880a1.js} +1 -1
  4. package/build/cjs/{Host3DSignalR-f13134cb.js → Host3DSignalR-59436bad.js} +1 -6
  5. package/build/cjs/{LiviqueWWSHandler-32bb295f.js → LiviqueWWSHandler-495734b8.js} +1 -1
  6. package/build/cjs/{PfisterWWSHandler-0447de84.js → PfisterWWSHandler-73a6a1bb.js} +1 -1
  7. package/build/cjs/{PlannerHandler2D-a941c306.js → PlannerHandler2D-c9952024.js} +1249 -10
  8. package/build/cjs/{ProductBasketHandler-144386d9.js → ProductBasketHandler-fca32045.js} +1 -1
  9. package/build/cjs/{SeriousBasketHandler-e7f5bfb9.js → SeriousBasketHandler-4254c183.js} +1 -1
  10. package/build/cjs/{ShelfPlanner-63df1fef.js → ShelfPlanner-0329c88f.js} +2 -2
  11. package/build/cjs/{StandardWWSHandler-96b3ab81.js → StandardWWSHandler-785777e5.js} +1 -1
  12. package/build/cjs/{index-0cf8efc1.js → index-7cfee1da.js} +1155 -1650
  13. package/build/cjs/index.js +1 -1
  14. package/build/esm/{DivaBoxPlanner-0a38d41b.js → DivaBoxPlanner-c20559ca.js} +5 -7
  15. package/build/esm/{DivaStandardPlanner-774854f1.js → DivaStandardPlanner-af73d121.js} +5 -9
  16. package/build/esm/{DoorPlanner-c9293a3a.js → DoorPlanner-f3376859.js} +1 -1
  17. package/build/esm/{Host3DSignalR-3ca1dd9c.js → Host3DSignalR-ae25b944.js} +1 -6
  18. package/build/esm/{LiviqueWWSHandler-28edc334.js → LiviqueWWSHandler-bba79129.js} +1 -1
  19. package/build/esm/{PfisterWWSHandler-21e4c2f3.js → PfisterWWSHandler-1e137ace.js} +1 -1
  20. package/build/esm/{PlannerHandler2D-9f4f8efb.js → PlannerHandler2D-0f71e44e.js} +1245 -8
  21. package/build/esm/{ProductBasketHandler-fa0c1a9e.js → ProductBasketHandler-68455ac4.js} +1 -1
  22. package/build/esm/{SeriousBasketHandler-2e0ab157.js → SeriousBasketHandler-cdc26222.js} +1 -1
  23. package/build/esm/{ShelfPlanner-c52e6233.js → ShelfPlanner-84b8de24.js} +2 -2
  24. package/build/esm/{StandardWWSHandler-72ea1ffc.js → StandardWWSHandler-5b7ca10e.js} +1 -1
  25. package/build/esm/{index-622ebf68.js → index-f1fb4728.js} +1155 -1650
  26. package/build/esm/index.js +1 -1
  27. package/build/types/web-planner-logic/src/index.d.ts +1 -0
  28. package/build/types/web-planner-logic/src/index.d.ts.map +1 -1
  29. package/build/types/web-planner-logic/src/interface/API/TemplateConfigType.d.ts +7 -7
  30. package/build/types/web-planner-logic/src/interface/API/TemplateConfigType.d.ts.map +1 -1
  31. package/build/types/web-planner-logic/src/interface/API/ViewConfigDataType.d.ts +1 -5
  32. package/build/types/web-planner-logic/src/interface/API/ViewConfigDataType.d.ts.map +1 -1
  33. package/build/types/web-planner-logic/src/interface/AdditionalModelInfos.d.ts +12 -4
  34. package/build/types/web-planner-logic/src/interface/AdditionalModelInfos.d.ts.map +1 -1
  35. package/build/types/web-planner-logic/src/interface/Configuration.d.ts +0 -3
  36. package/build/types/web-planner-logic/src/interface/Configuration.d.ts.map +1 -1
  37. package/build/types/web-planner-logic/src/interface/CoreTypes/index.d.ts +44 -14
  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/FunctionTypes/index.d.ts +1 -1
  40. package/build/types/web-planner-logic/src/interface/FunctionTypes/index.d.ts.map +1 -1
  41. package/build/types/web-planner-logic/src/interface/OptionTypes/ArticleOptionDataTypes.d.ts +0 -1
  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/Planner/IDivaPlanner.d.ts +1 -2
  44. package/build/types/web-planner-logic/src/interface/Planner/IDivaPlanner.d.ts.map +1 -1
  45. package/build/types/web-planner-logic/src/interface/Planner/IDivaSetPlanner.d.ts +1 -3
  46. package/build/types/web-planner-logic/src/interface/Planner/IDivaSetPlanner.d.ts.map +1 -1
  47. package/build/types/web-planner-logic/src/interface/ShelfPlanner/plannerData.d.ts +3 -2
  48. package/build/types/web-planner-logic/src/interface/ShelfPlanner/plannerData.d.ts.map +1 -1
  49. package/build/types/web-planner-logic/src/logic/Article/ArticleOptionState.d.ts +0 -1
  50. package/build/types/web-planner-logic/src/logic/Article/ArticleOptionState.d.ts.map +1 -1
  51. package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts +2 -3
  52. package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts.map +1 -1
  53. package/build/types/web-planner-logic/src/logic/Basket/DivaBasketHandler.d.ts.map +1 -1
  54. package/build/types/web-planner-logic/src/logic/ConfigTree/DivaConfigTree.d.ts.map +1 -1
  55. package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlannerGrid.d.ts +2 -1
  56. package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlannerGrid.d.ts.map +1 -1
  57. package/build/types/web-planner-logic/src/logic/DivaApiHandler.d.ts +2 -4
  58. package/build/types/web-planner-logic/src/logic/DivaApiHandler.d.ts.map +1 -1
  59. package/build/types/web-planner-logic/src/logic/DivaCatalogHandler.d.ts.map +1 -1
  60. package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts +1 -12
  61. package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts.map +1 -1
  62. package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/DivaBoxPlanner.d.ts +1 -2
  63. package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/DivaBoxPlanner.d.ts.map +1 -1
  64. package/build/types/web-planner-logic/src/logic/Planner/DivaPlannerHandler.d.ts.map +1 -1
  65. package/build/types/web-planner-logic/src/logic/Planner/DivaStandardPlanner.d.ts +1 -2
  66. package/build/types/web-planner-logic/src/logic/Planner/DivaStandardPlanner.d.ts.map +1 -1
  67. package/build/types/web-planner-logic/src/logic/Planner/Rendering/DivaMediaServiceHandler.d.ts +0 -1
  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/Host3DSignalR.d.ts +0 -1
  70. package/build/types/web-planner-logic/src/logic/Planner/Rendering/Host3DSignalR.d.ts.map +1 -1
  71. package/build/types/web-planner-logic/src/logic/Planner/Rendering/PlannerHandler3D.d.ts +0 -17
  72. package/build/types/web-planner-logic/src/logic/Planner/Rendering/PlannerHandler3D.d.ts.map +1 -1
  73. package/build/types/web-planner-logic/src/logic/Planner/Rendering/RenderSettings.d.ts +0 -9
  74. package/build/types/web-planner-logic/src/logic/Planner/Rendering/RenderSettings.d.ts.map +1 -1
  75. package/build/types/web-planner-logic/src/logic/Planner/Rendering/Rendering.d.ts +0 -13
  76. package/build/types/web-planner-logic/src/logic/Planner/Rendering/Rendering.d.ts.map +1 -1
  77. package/build/types/web-planner-logic/src/logic/Planner/Rendering/types.d.ts +0 -3
  78. package/build/types/web-planner-logic/src/logic/Planner/Rendering/types.d.ts.map +1 -1
  79. package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts +1 -3
  80. package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts.map +1 -1
  81. package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts +0 -6
  82. package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts.map +1 -1
  83. package/build/types/web-planner-logic/src/logic/Set/FavoritesHandler.d.ts +1 -1
  84. package/build/types/web-planner-logic/src/logic/Set/FavoritesHandler.d.ts.map +1 -1
  85. package/build/types/web-planner-logic/src/model/DivaCatalogData.d.ts.map +1 -1
  86. package/build/types/web-planner-logic/src/model/Options/ArticleOptionValueData.d.ts +0 -1
  87. package/build/types/web-planner-logic/src/model/Options/ArticleOptionValueData.d.ts.map +1 -1
  88. package/build/types/web-planner-logic/src/model/Options/CatalogOptionData.d.ts.map +1 -1
  89. package/build/types/web-planner-logic/src/test/datas/environments/testing/pfister-dev.d.ts.map +1 -1
  90. package/build/types/web-planner-logic/src/test/scripts/productHandlerMoc.d.ts.map +1 -1
  91. package/package.json +2 -2
  92. package/build/cjs/DivaSingleProductPlanner-fcf3e4be.js +0 -1169
  93. package/build/cjs/DockingPointHandler-5c6b6024.js +0 -1255
  94. package/build/esm/DivaSingleProductPlanner-76dcd48c.js +0 -1158
  95. package/build/esm/DockingPointHandler-c35c0ee3.js +0 -1245
  96. package/build/types/web-planner-logic/src/logic/Planner/DivaSingleProductPlanner.d.ts +0 -140
  97. package/build/types/web-planner-logic/src/logic/Planner/DivaSingleProductPlanner.d.ts.map +0 -1
@@ -26,8 +26,8 @@ import _typeof from '@babel/runtime/helpers/typeof';
26
26
  })();
27
27
 
28
28
  var _excluded = ["type"];
29
- function ownKeys$f(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; }
30
- function _objectSpread$f(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$f(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$f(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
29
+ function ownKeys$e(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; }
30
+ function _objectSpread$e(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$e(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$e(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
31
31
  var LOG$g = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
32
32
  var JsonDataCache = /*#__PURE__*/function () {
33
33
  function JsonDataCache() {
@@ -233,8 +233,8 @@ var DivaApiHandler = /*#__PURE__*/function () {
233
233
  if (this.getApplicationEnvironment() == 'WEB' && (_this$apiConfig2 = this.apiConfig) !== null && _this$apiConfig2 !== void 0 && _this$apiConfig2.api2.web) {
234
234
  api2Url = this.apiConfig.api2.web;
235
235
  }
236
- _context2.t0 = _objectSpread$f;
237
- _context2.t1 = _objectSpread$f({}, init.config.headers);
236
+ _context2.t0 = _objectSpread$e;
237
+ _context2.t1 = _objectSpread$e({}, init.config.headers);
238
238
  _context2.t2 = {};
239
239
  _context2.next = 20;
240
240
  return this.getSessionGuid('V', undefined, this.OrganizationId, api2Url);
@@ -264,7 +264,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
264
264
  key: "getDataCache",
265
265
  value: function () {
266
266
  var _getDataCache = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(queryString, cacheMD5, accountSessionGuid, useWebServiceApi, method, data) {
267
- var myQS, url, init, addSession, cacheUrl, _this$apiConfig3, _this$apiConfig4, api2Url, result;
267
+ var myQS, url, init, addSession, _this$apiConfig3, _this$apiConfig4, api2Url, result;
268
268
  return _regeneratorRuntime.wrap(function _callee3$(_context3) {
269
269
  while (1) switch (_context3.prev = _context3.next) {
270
270
  case 0:
@@ -277,7 +277,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
277
277
  };
278
278
  addSession = true;
279
279
  if (!(this.jsonDataCache.get(myQS) || cacheMD5 && this.jsonDataCache.get(cacheMD5))) {
280
- _context3.next = 11;
280
+ _context3.next = 9;
281
281
  break;
282
282
  }
283
283
  LOG$g.debug('getDataFromInternalCache: ' + queryString);
@@ -288,77 +288,68 @@ var DivaApiHandler = /*#__PURE__*/function () {
288
288
  return _context3.abrupt("return", this.jsonDataCache.get(myQS));
289
289
  case 8:
290
290
  return _context3.abrupt("return", this.jsonDataCache.get(cacheMD5));
291
- case 11:
292
- if (cacheMD5) {
293
- cacheUrl = DivaUtils.getCacheData(cacheMD5, queryString);
294
- if (cacheUrl) {
295
- LOG$g.debug('getDataFromCDNCache: ' + queryString);
296
- url = cacheUrl;
297
- addSession = false;
298
- }
299
- }
300
- case 12:
291
+ case 9:
301
292
  if (!addSession) {
302
- _context3.next = 34;
293
+ _context3.next = 31;
303
294
  break;
304
295
  }
305
296
  if (!useWebServiceApi) {
306
- _context3.next = 25;
297
+ _context3.next = 22;
307
298
  break;
308
299
  }
309
300
  if (!this.jwt) {
310
- _context3.next = 18;
301
+ _context3.next = 15;
311
302
  break;
312
303
  }
313
304
  init.config.headers = {
314
305
  Authorization: 'Bearer ' + this.jwt
315
306
  };
316
- _context3.next = 23;
307
+ _context3.next = 20;
317
308
  break;
318
- case 18:
309
+ case 15:
319
310
  if (!this.apiKey) {
320
- _context3.next = 22;
311
+ _context3.next = 19;
321
312
  break;
322
313
  }
323
314
  init.config.headers = {
324
315
  'X-API-KEY': this.apiKey
325
316
  };
326
- _context3.next = 23;
317
+ _context3.next = 20;
327
318
  break;
328
- case 22:
319
+ case 19:
329
320
  throw new Error('not jwt or API Key Found');
330
- case 23:
331
- _context3.next = 34;
321
+ case 20:
322
+ _context3.next = 31;
332
323
  break;
333
- case 25:
324
+ case 22:
334
325
  api2Url = (_this$apiConfig3 = this.apiConfig) === null || _this$apiConfig3 === void 0 ? void 0 : _this$apiConfig3.api2["default"];
335
326
  if (this.getApplicationEnvironment() == 'WEB' && (_this$apiConfig4 = this.apiConfig) !== null && _this$apiConfig4 !== void 0 && _this$apiConfig4.api2.web) {
336
327
  api2Url = this.apiConfig.api2.web;
337
328
  }
338
329
  _context3.t0 = accountSessionGuid;
339
330
  if (_context3.t0) {
340
- _context3.next = 32;
331
+ _context3.next = 29;
341
332
  break;
342
333
  }
343
- _context3.next = 31;
334
+ _context3.next = 28;
344
335
  return this.getSessionGuid('V', undefined, this.OrganizationId, api2Url);
345
- case 31:
336
+ case 28:
346
337
  _context3.t0 = _context3.sent;
347
- case 32:
338
+ case 29:
348
339
  _context3.t1 = _context3.t0;
349
340
  init.config.headers = {
350
341
  sessionGuid: _context3.t1
351
342
  };
352
- case 34:
353
- _context3.next = 36;
343
+ case 31:
344
+ _context3.next = 33;
354
345
  return this.fetchData(url, init);
355
- case 36:
346
+ case 33:
356
347
  result = _context3.sent;
357
348
  this.jsonDataCache.set(myQS, result);
358
349
  if (cacheMD5) this.jsonDataCache.set(cacheMD5, result);
359
350
  LOG$g.debug('getDataFromApi: ' + queryString);
360
351
  return _context3.abrupt("return", result);
361
- case 41:
352
+ case 38:
362
353
  case "end":
363
354
  return _context3.stop();
364
355
  }
@@ -421,9 +412,6 @@ var DivaApiHandler = /*#__PURE__*/function () {
421
412
  diva3dServerMode: data.diva3dServerMode != undefined ? data.diva3dServerMode : 'SignalR',
422
413
  diva3dRenderGroup: data.diva3dRenderGroup != undefined ? data.diva3dRenderGroup : 'MYCC7',
423
414
  mediaServiceApiKey: data.divaMediaServiceApiKey,
424
- diva3dUseImageCache: data.diva3dUseImageCache != undefined ? data.diva3dUseImageCache : false,
425
- diva3dSuppressCacheCreation: data.diva3dSuppressCacheCreation != undefined ? data.diva3dSuppressCacheCreation : false,
426
- diva3dUseSirvViewer: data.diva3dUseSirvViewer != undefined ? data.diva3dUseSirvViewer : false,
427
415
  language: lang !== null && lang !== void 0 ? lang : this.getLanguage(),
428
416
  abTestCases: data.abTestCases !== undefined ? data.abTestCases : [],
429
417
  checkForProductsInStock: data.checkForProductsInStock,
@@ -542,24 +530,6 @@ var DivaApiHandler = /*#__PURE__*/function () {
542
530
  var _this$divaWebConfigDa8, _this$divaWebConfigDa9;
543
531
  return (_this$divaWebConfigDa8 = (_this$divaWebConfigDa9 = this.divaWebConfigData) === null || _this$divaWebConfigDa9 === void 0 ? void 0 : _this$divaWebConfigDa9.diva3dRenderGroup) !== null && _this$divaWebConfigDa8 !== void 0 ? _this$divaWebConfigDa8 : '';
544
532
  }
545
- }, {
546
- key: "getDiva3dUseImageCache",
547
- value: function getDiva3dUseImageCache() {
548
- var _this$divaWebConfigDa10;
549
- return !!((_this$divaWebConfigDa10 = this.divaWebConfigData) !== null && _this$divaWebConfigDa10 !== void 0 && _this$divaWebConfigDa10.diva3dUseImageCache);
550
- }
551
- }, {
552
- key: "getDiva3DSuppressCacheCreation",
553
- value: function getDiva3DSuppressCacheCreation() {
554
- var _this$divaWebConfigDa11;
555
- return !!((_this$divaWebConfigDa11 = this.divaWebConfigData) !== null && _this$divaWebConfigDa11 !== void 0 && _this$divaWebConfigDa11.diva3dSuppressCacheCreation);
556
- }
557
- }, {
558
- key: "getDiva3dUseSirvViewer",
559
- value: function getDiva3dUseSirvViewer() {
560
- var _this$divaWebConfigDa12;
561
- return !!((_this$divaWebConfigDa12 = this.divaWebConfigData) !== null && _this$divaWebConfigDa12 !== void 0 && _this$divaWebConfigDa12.diva3dUseSirvViewer);
562
- }
563
533
  }, {
564
534
  key: "getServerId",
565
535
  value: function getServerId() {
@@ -595,80 +565,80 @@ var DivaApiHandler = /*#__PURE__*/function () {
595
565
  }, {
596
566
  key: "getDiva3dStaticBGImage",
597
567
  value: function getDiva3dStaticBGImage() {
598
- var _this$divaWebConfigDa13;
599
- return (_this$divaWebConfigDa13 = this.divaWebConfigData) === null || _this$divaWebConfigDa13 === void 0 ? void 0 : _this$divaWebConfigDa13.diva3dStaticBGImage;
568
+ var _this$divaWebConfigDa10;
569
+ return (_this$divaWebConfigDa10 = this.divaWebConfigData) === null || _this$divaWebConfigDa10 === void 0 ? void 0 : _this$divaWebConfigDa10.diva3dStaticBGImage;
600
570
  }
601
571
  }, {
602
572
  key: "getDiva3dStaticBGImage_DefaultRoomList",
603
573
  value: function getDiva3dStaticBGImage_DefaultRoomList() {
604
- var _this$divaWebConfigDa14, _this$divaWebConfigDa15;
605
- return ((_this$divaWebConfigDa14 = this.divaWebConfigData) === null || _this$divaWebConfigDa14 === void 0 ? void 0 : _this$divaWebConfigDa14.diva3dStaticBGImage_DefaultRoomList) == '' ? '3D_STATBG_ROOMLIST' : (_this$divaWebConfigDa15 = this.divaWebConfigData) === null || _this$divaWebConfigDa15 === void 0 ? void 0 : _this$divaWebConfigDa15.diva3dStaticBGImage_DefaultRoomList;
574
+ var _this$divaWebConfigDa11, _this$divaWebConfigDa12;
575
+ return ((_this$divaWebConfigDa11 = this.divaWebConfigData) === null || _this$divaWebConfigDa11 === void 0 ? void 0 : _this$divaWebConfigDa11.diva3dStaticBGImage_DefaultRoomList) == '' ? '3D_STATBG_ROOMLIST' : (_this$divaWebConfigDa12 = this.divaWebConfigData) === null || _this$divaWebConfigDa12 === void 0 ? void 0 : _this$divaWebConfigDa12.diva3dStaticBGImage_DefaultRoomList;
606
576
  }
607
577
  }, {
608
578
  key: "getDiva3DAllowDefaultCatRoomList",
609
579
  value: function getDiva3DAllowDefaultCatRoomList() {
610
- var _this$divaWebConfigDa16;
611
- return (_this$divaWebConfigDa16 = this.divaWebConfigData) === null || _this$divaWebConfigDa16 === void 0 ? void 0 : _this$divaWebConfigDa16.diva3DAllowDefaultCatRoomList;
580
+ var _this$divaWebConfigDa13;
581
+ return (_this$divaWebConfigDa13 = this.divaWebConfigData) === null || _this$divaWebConfigDa13 === void 0 ? void 0 : _this$divaWebConfigDa13.diva3DAllowDefaultCatRoomList;
612
582
  }
613
583
  }, {
614
584
  key: "doAllowSetPlanner",
615
585
  value: function doAllowSetPlanner() {
616
- var _this$divaWebConfigDa17;
617
- return (_this$divaWebConfigDa17 = this.divaWebConfigData) === null || _this$divaWebConfigDa17 === void 0 ? void 0 : _this$divaWebConfigDa17.doAllowSetPlanner;
586
+ var _this$divaWebConfigDa14;
587
+ return (_this$divaWebConfigDa14 = this.divaWebConfigData) === null || _this$divaWebConfigDa14 === void 0 ? void 0 : _this$divaWebConfigDa14.doAllowSetPlanner;
618
588
  }
619
589
  }, {
620
590
  key: "getHidePlanner",
621
591
  value: function getHidePlanner() {
622
- var _this$divaWebConfigDa18;
623
- return !!((_this$divaWebConfigDa18 = this.divaWebConfigData) !== null && _this$divaWebConfigDa18 !== void 0 && (_this$divaWebConfigDa18 = _this$divaWebConfigDa18.viewConfig) !== null && _this$divaWebConfigDa18 !== void 0 && _this$divaWebConfigDa18.hidePlanner);
592
+ var _this$divaWebConfigDa15;
593
+ return !!((_this$divaWebConfigDa15 = this.divaWebConfigData) !== null && _this$divaWebConfigDa15 !== void 0 && (_this$divaWebConfigDa15 = _this$divaWebConfigDa15.viewConfig) !== null && _this$divaWebConfigDa15 !== void 0 && _this$divaWebConfigDa15.hidePlanner);
624
594
  }
625
595
  }, {
626
596
  key: "getDoShowAR",
627
597
  value: function getDoShowAR() {
628
- var _this$divaWebConfigDa19;
629
- return (_this$divaWebConfigDa19 = this.divaWebConfigData) === null || _this$divaWebConfigDa19 === void 0 || (_this$divaWebConfigDa19 = _this$divaWebConfigDa19.viewConfig) === null || _this$divaWebConfigDa19 === void 0 ? void 0 : _this$divaWebConfigDa19.enableAR;
598
+ var _this$divaWebConfigDa16;
599
+ return (_this$divaWebConfigDa16 = this.divaWebConfigData) === null || _this$divaWebConfigDa16 === void 0 || (_this$divaWebConfigDa16 = _this$divaWebConfigDa16.viewConfig) === null || _this$divaWebConfigDa16 === void 0 ? void 0 : _this$divaWebConfigDa16.enableAR;
630
600
  }
631
601
  }, {
632
602
  key: "getDoShowRTV",
633
603
  value: function getDoShowRTV() {
634
- var _this$divaWebConfigDa20;
635
- return (_this$divaWebConfigDa20 = this.divaWebConfigData) === null || _this$divaWebConfigDa20 === void 0 || (_this$divaWebConfigDa20 = _this$divaWebConfigDa20.viewConfig) === null || _this$divaWebConfigDa20 === void 0 ? void 0 : _this$divaWebConfigDa20.enableRTV;
604
+ var _this$divaWebConfigDa17;
605
+ return (_this$divaWebConfigDa17 = this.divaWebConfigData) === null || _this$divaWebConfigDa17 === void 0 || (_this$divaWebConfigDa17 = _this$divaWebConfigDa17.viewConfig) === null || _this$divaWebConfigDa17 === void 0 ? void 0 : _this$divaWebConfigDa17.enableRTV;
636
606
  }
637
607
  }, {
638
608
  key: "getEnableRTVUnityKombi",
639
609
  value: function getEnableRTVUnityKombi() {
640
- var _this$divaWebConfigDa21;
641
- return !!((_this$divaWebConfigDa21 = this.divaWebConfigData) !== null && _this$divaWebConfigDa21 !== void 0 && _this$divaWebConfigDa21.viewConfig.enableRtvUnityKombi);
610
+ var _this$divaWebConfigDa18;
611
+ return !!((_this$divaWebConfigDa18 = this.divaWebConfigData) !== null && _this$divaWebConfigDa18 !== void 0 && _this$divaWebConfigDa18.viewConfig.enableRtvUnityKombi);
642
612
  }
643
613
  }, {
644
614
  key: "getDoDisablePlanner2D",
645
615
  value: function getDoDisablePlanner2D() {
646
- var _this$divaWebConfigDa22;
647
- return !!((_this$divaWebConfigDa22 = this.divaWebConfigData) !== null && _this$divaWebConfigDa22 !== void 0 && _this$divaWebConfigDa22.doDisablePlanner2D);
616
+ var _this$divaWebConfigDa19;
617
+ return !!((_this$divaWebConfigDa19 = this.divaWebConfigData) !== null && _this$divaWebConfigDa19 !== void 0 && _this$divaWebConfigDa19.doDisablePlanner2D);
648
618
  }
649
619
  }, {
650
620
  key: "getRoomListInProduct",
651
621
  value: function getRoomListInProduct() {
652
- var _this$divaWebConfigDa23;
653
- return !!((_this$divaWebConfigDa23 = this.divaWebConfigData) !== null && _this$divaWebConfigDa23 !== void 0 && (_this$divaWebConfigDa23 = _this$divaWebConfigDa23.viewConfig) !== null && _this$divaWebConfigDa23 !== void 0 && _this$divaWebConfigDa23.roomListInProduct);
622
+ var _this$divaWebConfigDa20;
623
+ return !!((_this$divaWebConfigDa20 = this.divaWebConfigData) !== null && _this$divaWebConfigDa20 !== void 0 && (_this$divaWebConfigDa20 = _this$divaWebConfigDa20.viewConfig) !== null && _this$divaWebConfigDa20 !== void 0 && _this$divaWebConfigDa20.roomListInProduct);
654
624
  }
655
625
  }, {
656
626
  key: "getPlannerType",
657
627
  value: function getPlannerType() {
658
- var _this$divaWebConfigDa24;
659
- return (_this$divaWebConfigDa24 = this.divaWebConfigData) === null || _this$divaWebConfigDa24 === void 0 || (_this$divaWebConfigDa24 = _this$divaWebConfigDa24.viewConfig) === null || _this$divaWebConfigDa24 === void 0 ? void 0 : _this$divaWebConfigDa24.plannerType;
628
+ var _this$divaWebConfigDa21;
629
+ return (_this$divaWebConfigDa21 = this.divaWebConfigData) === null || _this$divaWebConfigDa21 === void 0 || (_this$divaWebConfigDa21 = _this$divaWebConfigDa21.viewConfig) === null || _this$divaWebConfigDa21 === void 0 ? void 0 : _this$divaWebConfigDa21.plannerType;
660
630
  }
661
631
  }, {
662
632
  key: "getLoadSupplierColors",
663
633
  value: function getLoadSupplierColors() {
664
- var _this$divaWebConfigDa25;
665
- return !!((_this$divaWebConfigDa25 = this.divaWebConfigData) !== null && _this$divaWebConfigDa25 !== void 0 && _this$divaWebConfigDa25.loadSupplierColors);
634
+ var _this$divaWebConfigDa22;
635
+ return !!((_this$divaWebConfigDa22 = this.divaWebConfigData) !== null && _this$divaWebConfigDa22 !== void 0 && _this$divaWebConfigDa22.loadSupplierColors);
666
636
  }
667
637
  }, {
668
638
  key: "showSelectionModeZero",
669
639
  value: function showSelectionModeZero() {
670
- var _this$divaWebConfigDa26;
671
- return !!((_this$divaWebConfigDa26 = this.divaWebConfigData) !== null && _this$divaWebConfigDa26 !== void 0 && _this$divaWebConfigDa26.showSelectionModeZero);
640
+ var _this$divaWebConfigDa23;
641
+ return !!((_this$divaWebConfigDa23 = this.divaWebConfigData) !== null && _this$divaWebConfigDa23 !== void 0 && _this$divaWebConfigDa23.showSelectionModeZero);
672
642
  }
673
643
  }, {
674
644
  key: "ruleDescSeperator",
@@ -688,8 +658,8 @@ var DivaApiHandler = /*#__PURE__*/function () {
688
658
  }, {
689
659
  key: "getDoCheckVariantData",
690
660
  value: function getDoCheckVariantData() {
691
- var _this$divaWebConfigDa27;
692
- return (_this$divaWebConfigDa27 = this.divaWebConfigData) === null || _this$divaWebConfigDa27 === void 0 ? void 0 : _this$divaWebConfigDa27.doCheckVariantData;
661
+ var _this$divaWebConfigDa24;
662
+ return (_this$divaWebConfigDa24 = this.divaWebConfigData) === null || _this$divaWebConfigDa24 === void 0 ? void 0 : _this$divaWebConfigDa24.doCheckVariantData;
693
663
  }
694
664
  }, {
695
665
  key: "setI18n",
@@ -782,50 +752,50 @@ var DivaApiHandler = /*#__PURE__*/function () {
782
752
  }, {
783
753
  key: "getViewConfig",
784
754
  value: function getViewConfig() {
785
- var _this$divaWebConfigDa28;
786
- return (_this$divaWebConfigDa28 = this.divaWebConfigData) === null || _this$divaWebConfigDa28 === void 0 ? void 0 : _this$divaWebConfigDa28.viewConfig;
755
+ var _this$divaWebConfigDa25;
756
+ return (_this$divaWebConfigDa25 = this.divaWebConfigData) === null || _this$divaWebConfigDa25 === void 0 ? void 0 : _this$divaWebConfigDa25.viewConfig;
787
757
  }
788
758
  }, {
789
759
  key: "getEmailConfig",
790
760
  value: function getEmailConfig() {
791
- var _this$divaWebConfigDa29;
792
- return (_this$divaWebConfigDa29 = this.divaWebConfigData) === null || _this$divaWebConfigDa29 === void 0 ? void 0 : _this$divaWebConfigDa29.emailConfig;
761
+ var _this$divaWebConfigDa26;
762
+ return (_this$divaWebConfigDa26 = this.divaWebConfigData) === null || _this$divaWebConfigDa26 === void 0 ? void 0 : _this$divaWebConfigDa26.emailConfig;
793
763
  }
794
764
  }, {
795
765
  key: "getABTestCases",
796
766
  value: function getABTestCases() {
797
- var _this$divaWebConfigDa30, _this$divaWebConfigDa31;
798
- return (_this$divaWebConfigDa30 = (_this$divaWebConfigDa31 = this.divaWebConfigData) === null || _this$divaWebConfigDa31 === void 0 ? void 0 : _this$divaWebConfigDa31.abTestCases) !== null && _this$divaWebConfigDa30 !== void 0 ? _this$divaWebConfigDa30 : [];
767
+ var _this$divaWebConfigDa27, _this$divaWebConfigDa28;
768
+ return (_this$divaWebConfigDa27 = (_this$divaWebConfigDa28 = this.divaWebConfigData) === null || _this$divaWebConfigDa28 === void 0 ? void 0 : _this$divaWebConfigDa28.abTestCases) !== null && _this$divaWebConfigDa27 !== void 0 ? _this$divaWebConfigDa27 : [];
799
769
  }
800
770
  }, {
801
771
  key: "getBarrierConfig",
802
772
  value: function getBarrierConfig() {
803
- var _this$divaWebConfigDa32;
804
- return (_this$divaWebConfigDa32 = this.divaWebConfigData) === null || _this$divaWebConfigDa32 === void 0 ? void 0 : _this$divaWebConfigDa32.barrierConfig;
773
+ var _this$divaWebConfigDa29;
774
+ return (_this$divaWebConfigDa29 = this.divaWebConfigData) === null || _this$divaWebConfigDa29 === void 0 ? void 0 : _this$divaWebConfigDa29.barrierConfig;
805
775
  }
806
776
  }, {
807
777
  key: "getTemplateConfig",
808
778
  value: function getTemplateConfig() {
809
- var _this$divaWebConfigDa33;
810
- return (_this$divaWebConfigDa33 = this.divaWebConfigData) === null || _this$divaWebConfigDa33 === void 0 ? void 0 : _this$divaWebConfigDa33.templateConfig;
779
+ var _this$divaWebConfigDa30;
780
+ return (_this$divaWebConfigDa30 = this.divaWebConfigData) === null || _this$divaWebConfigDa30 === void 0 ? void 0 : _this$divaWebConfigDa30.templateConfig;
811
781
  }
812
782
  }, {
813
783
  key: "showDivaNr",
814
784
  value: function showDivaNr() {
815
- var _this$divaWebConfigDa34;
816
- return (_this$divaWebConfigDa34 = this.divaWebConfigData) === null || _this$divaWebConfigDa34 === void 0 ? void 0 : _this$divaWebConfigDa34.showDivaNr;
785
+ var _this$divaWebConfigDa31;
786
+ return (_this$divaWebConfigDa31 = this.divaWebConfigData) === null || _this$divaWebConfigDa31 === void 0 ? void 0 : _this$divaWebConfigDa31.showDivaNr;
817
787
  }
818
788
  }, {
819
789
  key: "onErrorHandling",
820
790
  value: function onErrorHandling() {
821
- var _this$divaWebConfigDa35;
822
- return (_this$divaWebConfigDa35 = this.divaWebConfigData) === null || _this$divaWebConfigDa35 === void 0 ? void 0 : _this$divaWebConfigDa35.onErrorHandling;
791
+ var _this$divaWebConfigDa32;
792
+ return (_this$divaWebConfigDa32 = this.divaWebConfigData) === null || _this$divaWebConfigDa32 === void 0 ? void 0 : _this$divaWebConfigDa32.onErrorHandling;
823
793
  }
824
794
  }, {
825
795
  key: "diva3DRenderingDefault",
826
796
  value: function diva3DRenderingDefault() {
827
- var _this$divaWebConfigDa36;
828
- return (_this$divaWebConfigDa36 = this.divaWebConfigData) === null || _this$divaWebConfigDa36 === void 0 ? void 0 : _this$divaWebConfigDa36.diva3DRenderingDefault;
797
+ var _this$divaWebConfigDa33;
798
+ return (_this$divaWebConfigDa33 = this.divaWebConfigData) === null || _this$divaWebConfigDa33 === void 0 ? void 0 : _this$divaWebConfigDa33.diva3DRenderingDefault;
829
799
  }
830
800
  }, {
831
801
  key: "getJwt",
@@ -840,13 +810,13 @@ var DivaApiHandler = /*#__PURE__*/function () {
840
810
  }, {
841
811
  key: "getUseMask",
842
812
  value: function getUseMask() {
843
- var _this$divaWebConfigDa37;
844
- return (_this$divaWebConfigDa37 = this.divaWebConfigData) === null || _this$divaWebConfigDa37 === void 0 ? void 0 : _this$divaWebConfigDa37.useMask;
813
+ var _this$divaWebConfigDa34;
814
+ return (_this$divaWebConfigDa34 = this.divaWebConfigData) === null || _this$divaWebConfigDa34 === void 0 ? void 0 : _this$divaWebConfigDa34.useMask;
845
815
  }
846
816
  }, {
847
817
  key: "apiUrl",
848
818
  value: function apiUrl(queryString, useWebServiceApi) {
849
- var _this$apiConfig19, _this$apiConfig20;
819
+ var _this$apiConfig21, _this$apiConfig22;
850
820
  if (useWebServiceApi == 'catalog') {
851
821
  var _this$apiConfig13, _this$apiConfig14;
852
822
  if (!((_this$apiConfig13 = this.apiConfig) !== null && _this$apiConfig13 !== void 0 && _this$apiConfig13.catalogService)) throw new Error('No catalog Service defined');
@@ -862,8 +832,13 @@ var DivaApiHandler = /*#__PURE__*/function () {
862
832
  if (!((_this$apiConfig17 = this.apiConfig) !== null && _this$apiConfig17 !== void 0 && _this$apiConfig17.reportService)) throw new Error('No report Service defined');
863
833
  return ((_this$apiConfig18 = this.apiConfig) === null || _this$apiConfig18 === void 0 ? void 0 : _this$apiConfig18.reportService) + queryString;
864
834
  }
865
- var url = (_this$apiConfig19 = this.apiConfig) === null || _this$apiConfig19 === void 0 ? void 0 : _this$apiConfig19.api2["default"];
866
- if (this.getApplicationEnvironment() == 'WEB' && (_this$apiConfig20 = this.apiConfig) !== null && _this$apiConfig20 !== void 0 && _this$apiConfig20.api2.web) {
835
+ if (useWebServiceApi == 'enricher') {
836
+ var _this$apiConfig19, _this$apiConfig20;
837
+ if (!((_this$apiConfig19 = this.apiConfig) !== null && _this$apiConfig19 !== void 0 && _this$apiConfig19.enricherService)) throw new Error('No report Service defined');
838
+ return ((_this$apiConfig20 = this.apiConfig) === null || _this$apiConfig20 === void 0 ? void 0 : _this$apiConfig20.enricherService) + queryString;
839
+ }
840
+ var url = (_this$apiConfig21 = this.apiConfig) === null || _this$apiConfig21 === void 0 ? void 0 : _this$apiConfig21.api2["default"];
841
+ if (this.getApplicationEnvironment() == 'WEB' && (_this$apiConfig22 = this.apiConfig) !== null && _this$apiConfig22 !== void 0 && _this$apiConfig22.api2.web) {
867
842
  url = this.apiConfig.api2.web;
868
843
  }
869
844
  if (!url) throw new Error('No API2 defined');
@@ -927,7 +902,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
927
902
  }, {
928
903
  key: "getCatalogProductUrl",
929
904
  value: function getCatalogProductUrl(catalogCodex) {
930
- var search = '{catCodex,contains,' + catalogCodex + '},{available,eq,true}';
905
+ var search = '{catCodex,contains,' + catalogCodex + "},{availableForOrganizations,eq,".concat(this.organization._id, "}");
931
906
  return '/v1/products?' + 'search=' + encodeURIComponent('[' + search + ']') + '&organizationIds=' + this.organization._id + '&fields=' + encodeURIComponent('{divaNr,addedPrice,discountedPrice,shortDescription,image,dockingPoints,articles,originDivaNr,variantId,affiliate,retailerArticleNr,minQuantity,increments,calculatedPrice}');
932
907
  }
933
908
  }, {
@@ -966,6 +941,11 @@ var DivaApiHandler = /*#__PURE__*/function () {
966
941
  value: function getAdditionalModelInfosQS(accountGuid, catalogGuid) {
967
942
  return '/additionalModelInfos/one?' + '&accountGuid=' + accountGuid + '&catalogGuid=' + catalogGuid;
968
943
  }
944
+ }, {
945
+ key: "getCatalogMaskQS",
946
+ value: function getCatalogMaskQS(catalogGuid, organizationId) {
947
+ return '/live/mask/' + catalogGuid + '/mask?organizationId=' + organizationId;
948
+ }
969
949
  }, {
970
950
  key: "getAdditionalModelInfosPostMaskQS",
971
951
  value: function getAdditionalModelInfosPostMaskQS(id) {
@@ -1123,12 +1103,6 @@ var DivaApiHandler = /*#__PURE__*/function () {
1123
1103
  value: function getImageURL(image, mediaURL) {
1124
1104
  var ret = '';
1125
1105
  if (image != '' && image != null) {
1126
- if (DivaUtils.CacheIsEnabled) {
1127
- ret = DivaUtils.getCacheData(image.toUpperCase(), '');
1128
- if (ret) {
1129
- return ret;
1130
- }
1131
- }
1132
1106
  var header = image.substring(0, 4).toLowerCase();
1133
1107
  if (header == 'http' || header == 'data') {
1134
1108
  ret = image;
@@ -1235,12 +1209,12 @@ var DivaApiHandler = /*#__PURE__*/function () {
1235
1209
  key: "getDimensionbyId",
1236
1210
  value: function () {
1237
1211
  var _getDimensionbyId = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee11(id, iln, catalogCodex, plannedOptions) {
1238
- var _this$apiConfig21;
1212
+ var _this$apiConfig23;
1239
1213
  var fullUrl, res, headers;
1240
1214
  return _regeneratorRuntime.wrap(function _callee11$(_context11) {
1241
1215
  while (1) switch (_context11.prev = _context11.next) {
1242
1216
  case 0:
1243
- fullUrl = this.getConstructorServiceUrl() + '/dimension/' + id + '?iln=' + iln + '&catalogCodex=' + catalogCodex + '&debug=' + ((_this$apiConfig21 = this.apiConfig) === null || _this$apiConfig21 === void 0 ? void 0 : _this$apiConfig21.useDebugUrl);
1217
+ fullUrl = this.getConstructorServiceUrl() + '/dimension/' + id + '?iln=' + iln + '&catalogCodex=' + catalogCodex + '&debug=' + ((_this$apiConfig23 = this.apiConfig) === null || _this$apiConfig23 === void 0 ? void 0 : _this$apiConfig23.useDebugUrl);
1244
1218
  headers = {};
1245
1219
  if (this.jwt) headers = {
1246
1220
  Authorization: 'Bearer ' + this.jwt
@@ -1369,8 +1343,8 @@ var DivaApiHandler = /*#__PURE__*/function () {
1369
1343
  }, {
1370
1344
  key: "dontLoadAdditionalModelInfos",
1371
1345
  get: function get() {
1372
- var _this$divaWebConfigDa38;
1373
- return (_this$divaWebConfigDa38 = this.divaWebConfigData) === null || _this$divaWebConfigDa38 === void 0 ? void 0 : _this$divaWebConfigDa38.dontLoadAdditionalModelInfos;
1346
+ var _this$divaWebConfigDa35;
1347
+ return (_this$divaWebConfigDa35 = this.divaWebConfigData) === null || _this$divaWebConfigDa35 === void 0 ? void 0 : _this$divaWebConfigDa35.dontLoadAdditionalModelInfos;
1374
1348
  }
1375
1349
  }, {
1376
1350
  key: "OrganizationId",
@@ -1681,7 +1655,6 @@ var ArticleOptionValueData = /*#__PURE__*/function () {
1681
1655
  catalogOPV: catalogOPV,
1682
1656
  pac: jsonOPV.PAC,
1683
1657
  pgr: jsonOPV.PGR,
1684
- isRendered: jsonOPV.IsRendered != undefined ? jsonOPV.IsRendered : true,
1685
1658
  subArticleCodex: jsonOPV.SubArticleCodex && jsonOPV.SubArticleCodex != '' ? jsonOPV.SubArticleCodex : undefined,
1686
1659
  subArticleTypeNr: jsonOPV.SubArticleTypeNr && jsonOPV.SubArticleTypeNr != '' ? jsonOPV.SubArticleTypeNr : undefined,
1687
1660
  subRetailArticleNr: jsonOPV.SubRetailArticleNr && jsonOPV.SubRetailArticleNr != '' ? jsonOPV.SubRetailArticleNr : undefined,
@@ -2018,11 +1991,6 @@ var ArticleOptionValueData = /*#__PURE__*/function () {
2018
1991
  get: function get() {
2019
1992
  return this.opv.catalogOPV.value;
2020
1993
  }
2021
- }, {
2022
- key: "isDigitalized",
2023
- get: function get() {
2024
- return this.opv.isRendered;
2025
- }
2026
1994
  }, {
2027
1995
  key: "metaData",
2028
1996
  get: function get() {
@@ -16026,7 +15994,7 @@ var OptionValueCatalogData = /*#__PURE__*/function () {
16026
15994
  showOnlyWhenHasPrice: jsonOPV.ShowOnlyWhenHasPrice && jsonOPV.ShowOnlyWhenHasPrice == 'True' ? true : false,
16027
15995
  priceUnit: jsonOPV.PriceUnit,
16028
15996
  value: jsonOPV.Value,
16029
- property: [].concat(_toConsumableArray((_jsonOPV$Metadatas = jsonOPV.Metadatas) !== null && _jsonOPV$Metadatas !== void 0 ? _jsonOPV$Metadatas : []), _toConsumableArray((_mask$properties = mask === null || mask === void 0 ? void 0 : mask.properties) !== null && _mask$properties !== void 0 ? _mask$properties : [])),
15997
+ property: [].concat(_toConsumableArray((_jsonOPV$Metadatas = jsonOPV.Metadatas) !== null && _jsonOPV$Metadatas !== void 0 ? _jsonOPV$Metadatas : []), _toConsumableArray(Object.values((_mask$properties = mask === null || mask === void 0 ? void 0 : mask.properties) !== null && _mask$properties !== void 0 ? _mask$properties : {}))),
16030
15998
  textbausteine: jsonOPV.Textbausteine
16031
15999
  };
16032
16000
  this.opv.colorGroups = this.mapRALColorToGroup();
@@ -16408,7 +16376,7 @@ var CatalogArticleData = /*#__PURE__*/function () {
16408
16376
  arePricesLoaded: false,
16409
16377
  articleOptions: {},
16410
16378
  decisions: [],
16411
- properties: [].concat(_toConsumableArray((_jsonArticle$Metadata = jsonArticle.Metadatas) !== null && _jsonArticle$Metadata !== void 0 ? _jsonArticle$Metadata : []), _toConsumableArray((_articleMask$properti = articleMask === null || articleMask === void 0 ? void 0 : articleMask.properties) !== null && _articleMask$properti !== void 0 ? _articleMask$properti : [])),
16379
+ properties: [].concat(_toConsumableArray((_jsonArticle$Metadata = jsonArticle.Metadatas) !== null && _jsonArticle$Metadata !== void 0 ? _jsonArticle$Metadata : []), _toConsumableArray(Object.values((_articleMask$properti = articleMask === null || articleMask === void 0 ? void 0 : articleMask.properties) !== null && _articleMask$properti !== void 0 ? _articleMask$properti : {}))),
16412
16380
  image: jsonArticle.Image && jsonArticle.Image != '' ? jsonArticle.Image : undefined,
16413
16381
  imageWidth: jsonArticle.ImageWidth ? jsonArticle.ImageWidth : undefined,
16414
16382
  imageHeight: jsonArticle.ImageHeight ? jsonArticle.ImageHeight : undefined,
@@ -17812,10 +17780,11 @@ var CatalogPlannerArticleData = /*#__PURE__*/function () {
17812
17780
 
17813
17781
  var OptionCatalogData = /*#__PURE__*/function () {
17814
17782
  function OptionCatalogData(codex, jsonOPT, catalogData) {
17815
- var _catalogData$catalogM, _catalogData$catalogM2, _catalogData$catalogM3, _optionMask$name$cata, _optionMask$name, _catalogData$api$getL, _optionMask$name2, _optionMask$hidden, _optionMask$tabGroup, _catalogData$api$getL2, _ref, _optionMask$layout, _optionMask$propertie, _jsonOPT$showOPVAsArt, _jsonOPT$Properties, _optionMask$propertie2;
17783
+ var _catalogData$catalogM, _catalogData$catalogM2, _catalogData$catalogM3, _jsonOPT$Properties, _optionMask$propertie, _optionMask$name$cata, _optionMask$name, _catalogData$api$getL, _optionMask$name2, _optionMask$hidden, _optionMask$tabGroup, _catalogData$api$getL2, _ref, _optionMask$layout, _properties$find, _jsonOPT$showOPVAsArt;
17816
17784
  _classCallCheck(this, OptionCatalogData);
17817
17785
  _defineProperty(this, "opt", void 0);
17818
17786
  var optionMask = (_catalogData$catalogM = (_catalogData$catalogM2 = catalogData.catalogMask) === null || _catalogData$catalogM2 === void 0 || (_catalogData$catalogM2 = _catalogData$catalogM2.options) === null || _catalogData$catalogM2 === void 0 ? void 0 : _catalogData$catalogM2[codex]) !== null && _catalogData$catalogM !== void 0 ? _catalogData$catalogM : codex.startsWith('OPT') ? (_catalogData$catalogM3 = catalogData.catalogMask) === null || _catalogData$catalogM3 === void 0 || (_catalogData$catalogM3 = _catalogData$catalogM3.options) === null || _catalogData$catalogM3 === void 0 ? void 0 : _catalogData$catalogM3[codex.substring(3)] : undefined;
17787
+ var properties = [].concat(_toConsumableArray((_jsonOPT$Properties = jsonOPT.Properties) !== null && _jsonOPT$Properties !== void 0 ? _jsonOPT$Properties : []), _toConsumableArray(Object.values((_optionMask$propertie = optionMask === null || optionMask === void 0 ? void 0 : optionMask.properties) !== null && _optionMask$propertie !== void 0 ? _optionMask$propertie : {})));
17819
17788
  this.opt = {
17820
17789
  codex: codex,
17821
17790
  name: (_optionMask$name$cata = optionMask === null || optionMask === void 0 || (_optionMask$name = optionMask.name) === null || _optionMask$name === void 0 ? void 0 : _optionMask$name[(_catalogData$api$getL = catalogData.api.getLanguage()) === null || _catalogData$api$getL === void 0 ? void 0 : _catalogData$api$getL.toLowerCase()]) !== null && _optionMask$name$cata !== void 0 ? _optionMask$name$cata : jsonOPT.Name,
@@ -17826,9 +17795,9 @@ var OptionCatalogData = /*#__PURE__*/function () {
17826
17795
  image: jsonOPT.Image ? jsonOPT.Image : undefined,
17827
17796
  invisible: (_optionMask$hidden = optionMask === null || optionMask === void 0 ? void 0 : optionMask.hidden) !== null && _optionMask$hidden !== void 0 ? _optionMask$hidden : jsonOPT.Invisible != undefined ? jsonOPT.Invisible : false,
17828
17797
  maskTabgroup: optionMask === null || optionMask === void 0 || (_optionMask$tabGroup = optionMask.tabGroup) === null || _optionMask$tabGroup === void 0 ? void 0 : _optionMask$tabGroup[(_catalogData$api$getL2 = catalogData.api.getLanguage()) === null || _catalogData$api$getL2 === void 0 ? void 0 : _catalogData$api$getL2.toLowerCase()],
17829
- layout: (_ref = (_optionMask$layout = optionMask === null || optionMask === void 0 ? void 0 : optionMask.layout) !== null && _optionMask$layout !== void 0 ? _optionMask$layout : optionMask === null || optionMask === void 0 || (_optionMask$propertie = optionMask.properties) === null || _optionMask$propertie === void 0 || (_optionMask$propertie = _optionMask$propertie.find(function (p) {
17798
+ 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) {
17830
17799
  return p.Codex == 'LAYOUT';
17831
- })) === null || _optionMask$propertie === void 0 ? void 0 : _optionMask$propertie.Value) !== null && _ref !== void 0 ? _ref : jsonOPT.Layout != undefined ? jsonOPT.Layout : 'IMAGE',
17800
+ })) === null || _properties$find === void 0 ? void 0 : _properties$find.Value) !== null && _ref !== void 0 ? _ref : jsonOPT.Layout != undefined ? jsonOPT.Layout : 'IMAGE',
17832
17801
  multiselect: jsonOPT.Multiselect != undefined ? jsonOPT.Multiselect == 'True' : false,
17833
17802
  sendToPIM: !!jsonOPT.SendToPIM,
17834
17803
  useMaxPriceOfGroup: jsonOPT.UseMaxPriceOfGroup != undefined ? Number(jsonOPT.UseMaxPriceOfGroup) : undefined,
@@ -17837,7 +17806,7 @@ var OptionCatalogData = /*#__PURE__*/function () {
17837
17806
  hideInOrderText: jsonOPT.hideInOrderText != undefined ? jsonOPT.hideInOrderText == 'True' : false,
17838
17807
  showOPVCodex: jsonOPT.showOPVCodex != undefined ? jsonOPT.showOPVCodex == 'True' : false,
17839
17808
  showOPVAsArticleNr: typeof jsonOPT.showOPVAsArticleNr == 'boolean' ? jsonOPT.showOPVAsArticleNr : ((_jsonOPT$showOPVAsArt = jsonOPT.showOPVAsArticleNr) === null || _jsonOPT$showOPVAsArt === void 0 ? void 0 : _jsonOPT$showOPVAsArt.toLowerCase()) == 'true',
17840
- property: [].concat(_toConsumableArray((_jsonOPT$Properties = jsonOPT.Properties) !== null && _jsonOPT$Properties !== void 0 ? _jsonOPT$Properties : []), _toConsumableArray((_optionMask$propertie2 = optionMask === null || optionMask === void 0 ? void 0 : optionMask.properties) !== null && _optionMask$propertie2 !== void 0 ? _optionMask$propertie2 : [])),
17809
+ property: properties,
17841
17810
  parentOptionCodex: jsonOPT.ParentOptionCodex,
17842
17811
  articlePlaceholder: jsonOPT.ArticlePlaceholder && jsonOPT.ArticlePlaceholder == 'True' ? true : false,
17843
17812
  isMultiselect: jsonOPT.Multiselect != undefined ? jsonOPT.Multiselect == 'True' : false
@@ -18272,7 +18241,28 @@ var DivaCatalogData = /*#__PURE__*/function () {
18272
18241
  // old tag
18273
18242
  useDecisionPosCountValue: false,
18274
18243
  useShelfPlannerRTV: false,
18275
- notificationsRules: [],
18244
+ notificationsRules: [{
18245
+ rules: [{
18246
+ visitedOptions: ['SHELFARTICLE_1'],
18247
+ articles: [''],
18248
+ jsFormula: '',
18249
+ variantValues: {}
18250
+ }],
18251
+ checkOnEvents: {
18252
+ option: 'GR',
18253
+ articleCodex: '',
18254
+ optionValue: ''
18255
+ },
18256
+ type: 'notification',
18257
+ showInModal: true,
18258
+ onlyShowOnce: true,
18259
+ messageTitle: {
18260
+ DE: 'ospele'
18261
+ },
18262
+ message: {
18263
+ DE: 'Achtung alle änderungen gehen verlohren... Bist du sicher?'
18264
+ }
18265
+ }],
18276
18266
  warningRule: [],
18277
18267
  summaryTabGroupPosition: undefined,
18278
18268
  onConfigSingleDontGeneralize: false,
@@ -18318,7 +18308,7 @@ var DivaCatalogData = /*#__PURE__*/function () {
18318
18308
  var _this$catalogMask$cat;
18319
18309
  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()];
18320
18310
  if (this.catalogMask.catalog.name) this.catalogData.name_locales = this.catalogMask.catalog.name;
18321
- if (this.catalogMask.catalog.properties) this.initProperties([].concat(_toConsumableArray(this.origProperties), _toConsumableArray(this.catalogMask.catalog.properties)));
18311
+ if (this.catalogMask.catalog.properties) this.initProperties([].concat(_toConsumableArray(this.origProperties), _toConsumableArray(Object.values(this.catalogMask.catalog.properties))));
18322
18312
  }
18323
18313
  }
18324
18314
  }, {
@@ -18576,6 +18566,8 @@ var DivaCatalogData = /*#__PURE__*/function () {
18576
18566
  _this.catalogData.bundleRules = JSON.parse(item.Value);
18577
18567
  } else if (item.Codex == 'NOTIFICATIONS') {
18578
18568
  _this.catalogData.notificationsRules = JSON.parse(item.Value);
18569
+ } else if (item.Codex == 'WARNINGS') {
18570
+ _this.catalogData.warningRule = JSON.parse(item.Value);
18579
18571
  } else if (item.Codex == 'IGNORE_MAX_PRICE_AS_BASEPRICE') {
18580
18572
  _this.catalogData.ignoreMaxPriceAsBP = item.Value == '1';
18581
18573
  } else if (item.Codex == 'DONT_USE_VCODEX_FOR_BASKET') {
@@ -19597,7 +19589,7 @@ var DivaCatalogHandler = /*#__PURE__*/function () {
19597
19589
  key: "getCatalogData",
19598
19590
  value: function () {
19599
19591
  var _getCatalogData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(state, catalogCodex, orderSet) {
19600
- var catalogKey, promises, _yield$Promise$all, _yield$Promise$all2, catalogApiData, catalogArticleListData, catalogArticlePlannerListData, additionalModelInfos, catalogData, _state$actions;
19592
+ var catalogKey, promises, _yield$Promise$all, _yield$Promise$all2, catalogApiData, catalogArticleListData, catalogArticlePlannerListData, additionalModelInfos, mask, _state$catalogMask, catalogData, _state$actions;
19601
19593
  return _regeneratorRuntime.wrap(function _callee$(_context) {
19602
19594
  while (1) switch (_context.prev = _context.next) {
19603
19595
  case 0:
@@ -19609,7 +19601,7 @@ var DivaCatalogHandler = /*#__PURE__*/function () {
19609
19601
  return _context.abrupt("return", state.divaCatalogs[catalogKey]);
19610
19602
  case 5:
19611
19603
  if (!orderSet) {
19612
- _context.next = 42;
19604
+ _context.next = 46;
19613
19605
  break;
19614
19606
  }
19615
19607
  // ab hier parallell laden
@@ -19630,43 +19622,49 @@ var DivaCatalogHandler = /*#__PURE__*/function () {
19630
19622
  throw new Error(catalogApiData.Error);
19631
19623
  case 17:
19632
19624
  additionalModelInfos = undefined;
19625
+ mask = undefined;
19626
+ _context.prev = 19;
19627
+ _context.next = 22;
19628
+ return state.api.getDataCache(state.api.getCatalogMaskQS(catalogApiData.GUID, state.api.OrganizationId), undefined, undefined, 'enricher');
19629
+ case 22:
19630
+ mask = _context.sent;
19633
19631
  if (!(!state.api.dontLoadAdditionalModelInfos && catalogApiData.AccountGuid)) {
19634
- _context.next = 28;
19632
+ _context.next = 27;
19635
19633
  break;
19636
19634
  }
19637
- _context.prev = 19;
19638
- _context.next = 22;
19635
+ _context.next = 26;
19639
19636
  return state.api.getDataCache(state.api.getAdditionalModelInfosQS(catalogApiData.AccountGuid, catalogApiData.GUID), undefined, undefined, 'catalog');
19640
- case 22:
19637
+ case 26:
19641
19638
  additionalModelInfos = _context.sent;
19642
- _context.next = 28;
19639
+ case 27:
19640
+ _context.next = 32;
19643
19641
  break;
19644
- case 25:
19645
- _context.prev = 25;
19642
+ case 29:
19643
+ _context.prev = 29;
19646
19644
  _context.t0 = _context["catch"](19);
19647
19645
  LOG$d.debug('no additionalModelInfos found: ' + _context.t0);
19648
- case 28:
19649
- if (state.catalogMask) {
19646
+ case 32:
19647
+ if (state.catalogMask || mask) {
19650
19648
  if (!additionalModelInfos) additionalModelInfos = {
19651
19649
  _id: ''
19652
19650
  };
19653
- additionalModelInfos.catalogMask = state.catalogMask;
19651
+ additionalModelInfos.catalogMask = (_state$catalogMask = state.catalogMask) !== null && _state$catalogMask !== void 0 ? _state$catalogMask : mask;
19654
19652
  }
19655
19653
  catalogData = new DivaCatalogData(catalogApiData, orderSet, state.api, additionalModelInfos);
19656
19654
  if (!(catalogArticleListData.Articles && catalogArticleListData.Articles.length > 0)) {
19657
- _context.next = 34;
19655
+ _context.next = 38;
19658
19656
  break;
19659
19657
  }
19660
19658
  catalogData.initCatalogArticles(catalogArticleListData.Articles);
19661
- _context.next = 37;
19659
+ _context.next = 41;
19662
19660
  break;
19663
- case 34:
19661
+ case 38:
19664
19662
  DivaUtils.endSpanOfApm('Catalog initialize');
19665
19663
  LOG$d.error(new DivaError('Catalog ' + catalogData.catalogName + ' not listed', {
19666
19664
  code: 'WC_0002'
19667
19665
  }));
19668
19666
  throw new Error('Articles of Catalog: ' + catalogData.catalogCodex + ' are empty');
19669
- case 37:
19667
+ case 41:
19670
19668
  if (catalogArticlePlannerListData.PlannerElements && catalogArticlePlannerListData.PlannerElements.length > 0) {
19671
19669
  catalogData.initCatalogPlannerArticles(catalogArticlePlannerListData.PlannerElements);
19672
19670
  }
@@ -19683,16 +19681,16 @@ var DivaCatalogHandler = /*#__PURE__*/function () {
19683
19681
 
19684
19682
  DivaUtils.endSpanOfApm('Catalog initialize');
19685
19683
  return _context.abrupt("return", state.divaCatalogs[catalogKey]);
19686
- case 42:
19684
+ case 46:
19687
19685
  LOG$d.error(new DivaError('Catalog: ' + catalogCodex + ' not initialized! and orderSet not set', {
19688
19686
  code: 'WC_0007'
19689
19687
  }));
19690
19688
  return _context.abrupt("return", state.divaCatalogs[catalogKey]);
19691
- case 44:
19689
+ case 48:
19692
19690
  case "end":
19693
19691
  return _context.stop();
19694
19692
  }
19695
- }, _callee, null, [[19, 25]]);
19693
+ }, _callee, null, [[19, 29]]);
19696
19694
  }));
19697
19695
  function getCatalogData(_x, _x2, _x3) {
19698
19696
  return _getCatalogData.apply(this, arguments);
@@ -20202,12 +20200,6 @@ var ArticleOptionStateData = /*#__PURE__*/function () {
20202
20200
  set: function set(val) {
20203
20201
  this.articleOptionState.freeTextLang = val;
20204
20202
  }
20205
- }, {
20206
- key: "isNotVisualized",
20207
- get: function get() {
20208
- var _this$val20;
20209
- return ((_this$val20 = this.val) === null || _this$val20 === void 0 ? void 0 : _this$val20.isDigitalized) == false && this.val.isTexture;
20210
- }
20211
20203
  }, {
20212
20204
  key: "onlyVisibleIfNotUndock",
20213
20205
  get: function get() {
@@ -20235,8 +20227,8 @@ var ArticleOptionStateData = /*#__PURE__*/function () {
20235
20227
  }, {
20236
20228
  key: "warning",
20237
20229
  get: function get() {
20238
- var _this$val21;
20239
- if ((_this$val21 = this.val) !== null && _this$val21 !== void 0 && _this$val21.isFreeText) {
20230
+ var _this$val20;
20231
+ if ((_this$val20 = this.val) !== null && _this$val20 !== void 0 && _this$val20.isFreeText) {
20240
20232
  if (this.val.measureMaximum && Number(this.freeText) > Number(this.val.measureMaximum) || this.val.measureMinimum && Number(this.freeText) < Number(this.val.measureMinimum)) {
20241
20233
  return 'measureWarning';
20242
20234
  }
@@ -20334,8 +20326,8 @@ var ArticleOptionStateData = /*#__PURE__*/function () {
20334
20326
  }]);
20335
20327
  }();
20336
20328
 
20337
- function ownKeys$e(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; }
20338
- function _objectSpread$e(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$e(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$e(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
20329
+ function ownKeys$d(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; }
20330
+ function _objectSpread$d(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$d(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$d(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
20339
20331
  var LOG$c = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
20340
20332
  var DivaArticle = /*#__PURE__*/function () {
20341
20333
  //Hier steht die aktuelle Konfiguration
@@ -20545,7 +20537,7 @@ var DivaArticle = /*#__PURE__*/function () {
20545
20537
  var partlistArticle = this.partlistArticles[basketId];
20546
20538
  if (!onlyVisible || partlistArticle.partlistArticleVisibleInTree) partlistArticles[basketId] = partlistArticle;
20547
20539
  if (partlistArticle.hasPartlistArticle) {
20548
- partlistArticles = _objectSpread$e(_objectSpread$e({}, partlistArticles), partlistArticle.getRecursivePartlistArticles(onlyVisible));
20540
+ partlistArticles = _objectSpread$d(_objectSpread$d({}, partlistArticles), partlistArticle.getRecursivePartlistArticles(onlyVisible));
20549
20541
  }
20550
20542
  }
20551
20543
  return partlistArticles;
@@ -20632,17 +20624,6 @@ var DivaArticle = /*#__PURE__*/function () {
20632
20624
  set: function set(val) {
20633
20625
  this.article.toDeleteAfterInit = val;
20634
20626
  }
20635
- }, {
20636
- key: "articleHasNotVisualizedValues",
20637
- get: function get() {
20638
- if (!this.model3DName) return false;
20639
- for (var key in this.articleOptionStates) {
20640
- if (!this.articleOptionStates[key].isNotVisualized) {
20641
- return true;
20642
- }
20643
- }
20644
- return false;
20645
- }
20646
20627
  }, {
20647
20628
  key: "actSizeText",
20648
20629
  get: function get() {
@@ -21017,13 +20998,13 @@ var DivaArticle = /*#__PURE__*/function () {
21017
20998
  }, {
21018
20999
  key: "articleOptionStatesWithParents",
21019
21000
  get: function get() {
21020
- return _objectSpread$e(_objectSpread$e({}, this.getReqursiveArticleOptionStates()), this.articleOptionStatesData);
21001
+ return _objectSpread$d(_objectSpread$d({}, this.getReqursiveArticleOptionStates()), this.articleOptionStatesData);
21021
21002
  }
21022
21003
  }, {
21023
21004
  key: "getReqursiveArticleOptionStates",
21024
21005
  value: function getReqursiveArticleOptionStates() {
21025
21006
  var _this$partListParentA6, _this$partListParentA7, _this$partListParentA8, _this$partListParentA9, _this$accessoireParen3, _this$accessoireParen4, _this$accessoireParen5, _this$accessoireParen6;
21026
- return _objectSpread$e(_objectSpread$e(_objectSpread$e(_objectSpread$e({}, (_this$partListParentA6 = (_this$partListParentA7 = this.partListParentArticle) === null || _this$partListParentA7 === void 0 ? void 0 : _this$partListParentA7.articleOptionStatesData) !== null && _this$partListParentA6 !== void 0 ? _this$partListParentA6 : {}), (_this$partListParentA8 = (_this$partListParentA9 = this.partListParentArticle) === null || _this$partListParentA9 === void 0 ? void 0 : _this$partListParentA9.getReqursiveArticleOptionStates()) !== null && _this$partListParentA8 !== void 0 ? _this$partListParentA8 : {}), (_this$accessoireParen3 = (_this$accessoireParen4 = this.accessoireParentArticle) === null || _this$accessoireParen4 === void 0 ? void 0 : _this$accessoireParen4.articleOptionStatesData) !== null && _this$accessoireParen3 !== void 0 ? _this$accessoireParen3 : {}), (_this$accessoireParen5 = (_this$accessoireParen6 = this.accessoireParentArticle) === null || _this$accessoireParen6 === void 0 ? void 0 : _this$accessoireParen6.getReqursiveArticleOptionStates()) !== null && _this$accessoireParen5 !== void 0 ? _this$accessoireParen5 : {});
21007
+ return _objectSpread$d(_objectSpread$d(_objectSpread$d(_objectSpread$d({}, (_this$partListParentA6 = (_this$partListParentA7 = this.partListParentArticle) === null || _this$partListParentA7 === void 0 ? void 0 : _this$partListParentA7.articleOptionStatesData) !== null && _this$partListParentA6 !== void 0 ? _this$partListParentA6 : {}), (_this$partListParentA8 = (_this$partListParentA9 = this.partListParentArticle) === null || _this$partListParentA9 === void 0 ? void 0 : _this$partListParentA9.getReqursiveArticleOptionStates()) !== null && _this$partListParentA8 !== void 0 ? _this$partListParentA8 : {}), (_this$accessoireParen3 = (_this$accessoireParen4 = this.accessoireParentArticle) === null || _this$accessoireParen4 === void 0 ? void 0 : _this$accessoireParen4.articleOptionStatesData) !== null && _this$accessoireParen3 !== void 0 ? _this$accessoireParen3 : {}), (_this$accessoireParen5 = (_this$accessoireParen6 = this.accessoireParentArticle) === null || _this$accessoireParen6 === void 0 ? void 0 : _this$accessoireParen6.getReqursiveArticleOptionStates()) !== null && _this$accessoireParen5 !== void 0 ? _this$accessoireParen5 : {});
21027
21008
  }
21028
21009
  }, {
21029
21010
  key: "clearArticleOptionStates",
@@ -22786,7 +22767,7 @@ var DivaArticle = /*#__PURE__*/function () {
22786
22767
  RuleDesc: myRuleDesc,
22787
22768
  RuleDesc_locales: myRuleDesc_locales,
22788
22769
  PosInvisibility: myPartListPos.PosInvisibility,
22789
- VariantValues: _objectSpread$e(_objectSpread$e({}, (_previousPartlistArti = previousPartlistArticle === null || previousPartlistArticle === void 0 ? void 0 : previousPartlistArticle.VariantValues) !== null && _previousPartlistArti !== void 0 ? _previousPartlistArti : {}), newConfigValues !== null && newConfigValues !== void 0 ? newConfigValues : {}),
22770
+ VariantValues: _objectSpread$d(_objectSpread$d({}, (_previousPartlistArti = previousPartlistArticle === null || previousPartlistArticle === void 0 ? void 0 : previousPartlistArticle.VariantValues) !== null && _previousPartlistArti !== void 0 ? _previousPartlistArti : {}), newConfigValues !== null && newConfigValues !== void 0 ? newConfigValues : {}),
22790
22771
  VariantItemData: previousPartlistArticle === null || previousPartlistArticle === void 0 ? void 0 : previousPartlistArticle.VariantItemData,
22791
22772
  optionImgForPrint: optionImgForPrint,
22792
22773
  optionsForPrint: optionsForPrint
@@ -22860,7 +22841,7 @@ var DivaArticle = /*#__PURE__*/function () {
22860
22841
  }
22861
22842
  for (var key in this.articleOptionStates) {
22862
22843
  var myOPS = this.articleOptionStates[key];
22863
- myOPS.visibleOptionValues = _objectSpread$e({}, myOPS.option.articleOptionValues);
22844
+ myOPS.visibleOptionValues = _objectSpread$d({}, myOPS.option.articleOptionValues);
22864
22845
  myOPS.visibleCount = Object.keys(myOPS.option.articleOptionValues).length;
22865
22846
  myOPS.definedBySetFeatureFixed = false;
22866
22847
  }
@@ -23091,7 +23072,7 @@ var DivaArticle = /*#__PURE__*/function () {
23091
23072
  }
23092
23073
  if (ruleValid) {
23093
23074
  ruleWasValidOnce = true;
23094
- if (m == 0) validOPVs[OPT] = _objectSpread$e({}, possibleOPVs);
23075
+ if (m == 0) validOPVs[OPT] = _objectSpread$d({}, possibleOPVs);
23095
23076
  opvCodex = opvCodex.slice(1);
23096
23077
  if (possibleOPVs[opvCodex] != null) delete validOPVs[OPT][opvCodex];
23097
23078
  }
@@ -23487,7 +23468,7 @@ var DivaArticle = /*#__PURE__*/function () {
23487
23468
  break;
23488
23469
  }
23489
23470
  _context.next = 4;
23490
- return import('./ShelfPlanner-c52e6233.js');
23471
+ return import('./ShelfPlanner-84b8de24.js');
23491
23472
  case 4:
23492
23473
  _yield$import = _context.sent;
23493
23474
  ShelfPlanner = _yield$import["default"];
@@ -23551,6 +23532,7 @@ var DivaArticle = /*#__PURE__*/function () {
23551
23532
  calcUnitPrice = 0,
23552
23533
  calcUnit2Price = 0,
23553
23534
  firstUnit2Param = 0,
23535
+ secondUnit2Param = 0,
23554
23536
  idmPriceMeasureFactor = 1;
23555
23537
  //CalcPreise berechnen
23556
23538
  for (var i = 0; i < maxPriceOfGroupCodex.length; i++) {
@@ -23581,76 +23563,82 @@ var DivaArticle = /*#__PURE__*/function () {
23581
23563
  if (myArtOPS.replaceMainArtNr) {
23582
23564
  this.configArticleCodex = myArtOPS.replaceMainArtNr;
23583
23565
  }
23566
+ var name = myArtOPS.name;
23567
+ console.log('name', name);
23584
23568
  if (!tmpOPT.useMaxPriceOfGroup) {
23585
23569
  myArtOPS.calcPrice = myArtOPS.price * myArtOPS.quantity;
23586
23570
  }
23587
- switch (pUnit) {
23588
- case 'm':
23589
- calcUnitPrice += myArtOPS.calcPrice / 100;
23590
- break;
23591
- case 'cm':
23592
- calcUnitPrice += myArtOPS.calcPrice;
23593
- break;
23594
- case 'm2':
23595
- calcUnit2Price += myArtOPS.calcPrice / 10000;
23596
- break;
23597
- case 'cm2':
23598
- calcUnit2Price += myArtOPS.calcPrice;
23599
- break;
23600
- default:
23601
- if (myArtOPS.isPercentage) {
23602
- //hier myArtOPS.TargetOption auswerten
23603
- if (myArtOPS.targetOption && myArtOPS.targetOption != '') ; else {
23604
- myArtOPS.usedCalcPrice = myArtOPS.calcPrice;
23605
- }
23606
- } else {
23607
- myArtOPS.usedCalcPrice = DivaUtils.decimalAdjust('round', myArtOPS.calcPrice, digits);
23608
- }
23609
- break;
23610
- }
23611
- if (mUnit || OP == 'OPTUMFANG' || OP == 'OPTUMFANG_KREIS') {
23612
- var freeTextMeasure = parseFloat(myArtOPS.freeText ? myArtOPS.freeText : '');
23613
- if (freeTextMeasure || OP == 'OPTUMFANG' || OP == 'OPTUMFANG_KREIS') {
23614
- if (calcUnitPrice != 0) {
23615
- var quantity = 0;
23616
- if (OP == 'OPTUMFANG') {
23617
- mUnit = 'cm';
23618
- quantity = this.calcWidth * 2 + this.calcDepth * 2;
23619
- } else if (OP == 'OPTUMFANG_KREIS') {
23620
- mUnit = 'cm';
23621
- quantity = this.calcWidth * Math.PI;
23571
+ if (pUnit !== null && pUnit !== void 0 && pUnit.includes('2') && calcUnit2Price && firstUnit2Param && secondUnit2Param) {
23572
+ var unit2Price = this.getCalcPerUnit(pUnit, myArtOPS.calcPrice);
23573
+ myArtOPS.usedCalcPrice = unit2Price * firstUnit2Param * secondUnit2Param;
23574
+ } else {
23575
+ switch (pUnit) {
23576
+ case 'm':
23577
+ calcUnitPrice += myArtOPS.calcPrice / 100;
23578
+ break;
23579
+ case 'cm':
23580
+ calcUnitPrice += myArtOPS.calcPrice;
23581
+ break;
23582
+ case 'm2':
23583
+ calcUnit2Price += myArtOPS.calcPrice / 10000;
23584
+ break;
23585
+ case 'cm2':
23586
+ calcUnit2Price += myArtOPS.calcPrice;
23587
+ break;
23588
+ default:
23589
+ if (myArtOPS.isPercentage) {
23590
+ //hier myArtOPS.TargetOption auswerten
23591
+ if (myArtOPS.targetOption && myArtOPS.targetOption != '') ; else {
23592
+ myArtOPS.usedCalcPrice = myArtOPS.calcPrice;
23593
+ }
23622
23594
  } else {
23623
- quantity = freeTextMeasure;
23595
+ myArtOPS.usedCalcPrice = DivaUtils.decimalAdjust('round', myArtOPS.calcPrice, digits);
23624
23596
  }
23625
- if (mUnit == 'cm') myArtOPS.usedCalcPrice = calcUnitPrice * quantity;else if (mUnit == 'm') myArtOPS.usedCalcPrice = calcUnitPrice * quantity * 100;
23626
- } else if (calcUnit2Price != 0) {
23627
- //for diamter option
23628
- if (myArtOPS.option.diameter) {
23629
- myArtOPS.usedCalcPrice = calcUnit2Price * this.calcWidth * this.calcDepth;
23630
- } else {
23631
- if (firstUnit2Param == 0) {
23632
- firstUnit2Param = freeTextMeasure;
23633
- if (mUnit == 'm') firstUnit2Param = firstUnit2Param * 100;
23597
+ break;
23598
+ }
23599
+ if (mUnit || OP == 'OPTUMFANG' || OP == 'OPTUMFANG_KREIS') {
23600
+ var freeTextMeasure = parseFloat(myArtOPS.freeText ? myArtOPS.freeText : '');
23601
+ if (freeTextMeasure || (OP == 'OPTUMFANG' || OP == 'OPTUMFANG_KREIS') && calcUnitPrice != 0) {
23602
+ if (calcUnitPrice != 0) {
23603
+ var quantity = 0;
23604
+ if (OP == 'OPTUMFANG') {
23605
+ mUnit = 'cm';
23606
+ quantity = this.calcWidth * 2 + this.calcDepth * 2;
23607
+ } else if (OP == 'OPTUMFANG_KREIS') {
23608
+ mUnit = 'cm';
23609
+ quantity = this.calcWidth * Math.PI;
23610
+ } else {
23611
+ quantity = freeTextMeasure;
23612
+ }
23613
+ if (mUnit == 'cm') myArtOPS.usedCalcPrice = calcUnitPrice * quantity;else if (mUnit == 'm') myArtOPS.usedCalcPrice = calcUnitPrice * quantity * 100;
23614
+ } else if (calcUnit2Price != 0) {
23615
+ //for diamter option
23616
+ if (myArtOPS.option.diameter) {
23617
+ myArtOPS.usedCalcPrice = calcUnit2Price * this.calcWidth * this.calcDepth;
23634
23618
  } else {
23635
- var secondUnit2Param = freeTextMeasure;
23636
- if (mUnit == 'm') secondUnit2Param = secondUnit2Param * 100;
23637
- myArtOPS.usedCalcPrice = calcUnit2Price * firstUnit2Param * secondUnit2Param;
23619
+ if (firstUnit2Param == 0) {
23620
+ firstUnit2Param = freeTextMeasure;
23621
+ if (mUnit == 'm') firstUnit2Param = firstUnit2Param * 100;
23622
+ } else {
23623
+ secondUnit2Param = freeTextMeasure;
23624
+ if (mUnit == 'm') secondUnit2Param = secondUnit2Param * 100;
23625
+ myArtOPS.usedCalcPrice = calcUnit2Price * firstUnit2Param * secondUnit2Param;
23626
+ }
23638
23627
  }
23639
23628
  }
23640
23629
  }
23641
23630
  }
23642
- }
23643
- if (OP == 'OPT95' && !!this.catalogArticle.widthHasPrice) {
23644
- idmPriceMeasureFactor = idmPriceMeasureFactor * this.calcWidth;
23645
- }
23646
- if (OP == 'OPT96' && !!this.catalogArticle.depthHasPrice) {
23647
- idmPriceMeasureFactor = idmPriceMeasureFactor * this.calcDepth;
23648
- }
23649
- if (OP == 'OPT97' && !!this.catalogArticle.heightHasPrice) {
23650
- idmPriceMeasureFactor = idmPriceMeasureFactor * this.calcHeight;
23631
+ if (OP == 'OPT95' && !!this.catalogArticle.widthHasPrice) {
23632
+ idmPriceMeasureFactor = idmPriceMeasureFactor * this.calcWidth;
23633
+ }
23634
+ if (OP == 'OPT96' && !!this.catalogArticle.depthHasPrice) {
23635
+ idmPriceMeasureFactor = idmPriceMeasureFactor * this.calcDepth;
23636
+ }
23637
+ if (OP == 'OPT97' && !!this.catalogArticle.heightHasPrice) {
23638
+ idmPriceMeasureFactor = idmPriceMeasureFactor * this.calcHeight;
23639
+ }
23651
23640
  }
23652
23641
  }
23653
-
23654
23642
  //jetzt nochmal prozentuelle Preise mit TargetOption berechnen
23655
23643
  for (var _iKey3 in myArtOPSs) {
23656
23644
  var _myArtOPS = myArtOPSs[_iKey3];
@@ -23746,6 +23734,21 @@ var DivaArticle = /*#__PURE__*/function () {
23746
23734
  }
23747
23735
  this.article.price = articleUsedCalcPrice;
23748
23736
  }
23737
+ }, {
23738
+ key: "getCalcPerUnit",
23739
+ value: function getCalcPerUnit(unit, calcPrice) {
23740
+ switch (unit) {
23741
+ case 'm':
23742
+ return calcPrice / 100;
23743
+ case 'cm':
23744
+ return calcPrice;
23745
+ case 'm2':
23746
+ return calcPrice / 10000;
23747
+ case 'cm2':
23748
+ return calcPrice;
23749
+ }
23750
+ return 0;
23751
+ }
23749
23752
  }, {
23750
23753
  key: "getOptionPrice",
23751
23754
  value: function getOptionPrice(calculatedPrice, optItem, digits) {
@@ -24068,7 +24071,7 @@ var DivaArticle = /*#__PURE__*/function () {
24068
24071
  */
24069
24072
  }, {
24070
24073
  key: "getPlannerConfigData",
24071
- value: function getPlannerConfigData(accessoireArticles, excludeInvalidCacheOptions, alternateRenderInfo) {
24074
+ value: function getPlannerConfigData(accessoireArticles, alternateRenderInfo) {
24072
24075
  var _this$doorPlanner2, _this$doorPlanner3;
24073
24076
  var ret = {
24074
24077
  N: this.name,
@@ -24076,8 +24079,8 @@ var DivaArticle = /*#__PURE__*/function () {
24076
24079
  ArtNr: this.article.catalogArticle.articleCodex,
24077
24080
  CFG: []
24078
24081
  };
24079
- var containsTextureNotDigitalized = this.addOptionStateFromArticleToPlannerData(ret, alternateRenderInfo);
24080
- if (!excludeInvalidCacheOptions) ret.CFG.push({
24082
+ this.addOptionStateFromArticleToPlannerData(ret, alternateRenderInfo);
24083
+ ret.CFG.push({
24081
24084
  OPT: 'QUANTITY',
24082
24085
  OPV: this.quantity.toString()
24083
24086
  });
@@ -24106,41 +24109,32 @@ var DivaArticle = /*#__PURE__*/function () {
24106
24109
  ret['MOVE'] = doorInfo;
24107
24110
  }
24108
24111
  return {
24109
- config: ret,
24110
- containsTextureNotDigitalized: containsTextureNotDigitalized
24112
+ config: ret
24111
24113
  };
24112
24114
  }
24113
24115
  }, {
24114
24116
  key: "addOptionStateFromArticleToPlannerData",
24115
24117
  value: function addOptionStateFromArticleToPlannerData(ret, alternateRenderInfo) {
24116
- var containsTextureNotDigitalized = false;
24117
24118
  for (var key in this.articleOptionStates) {
24118
- if (this.addOptionStateToPlannerData(ret, this.articleOptionStates[key], alternateRenderInfo)) {
24119
- containsTextureNotDigitalized = true;
24120
- }
24119
+ this.addOptionStateToPlannerData(ret, this.articleOptionStates[key], alternateRenderInfo);
24121
24120
  }
24122
24121
  for (var _key5 in this.article.partlistArticles) {
24123
24122
  var partlistArticle = this.article.partlistArticles[_key5];
24124
24123
  if (!partlistArticle.hasOptionsThatParentDoesNotHave) continue;
24125
- if (partlistArticle.addOptionStateFromArticleToPlannerData(ret, alternateRenderInfo)) {
24126
- containsTextureNotDigitalized = true;
24127
- }
24124
+ partlistArticle.addOptionStateFromArticleToPlannerData(ret, alternateRenderInfo);
24128
24125
  }
24129
- return containsTextureNotDigitalized;
24130
24126
  }
24131
24127
  }, {
24132
24128
  key: "addOptionStateToPlannerData",
24133
24129
  value: function addOptionStateToPlannerData(ret, ops, alternateRenderInfo) {
24134
24130
  var opv;
24135
24131
  var opt;
24136
- var containsTextureNotDigitalized = false;
24137
24132
  if (ops.val) {
24138
24133
  var _ops$val$ocd, _ops$option$ocd;
24139
24134
  opv = (_ops$val$ocd = ops.val.ocd) !== null && _ops$val$ocd !== void 0 ? _ops$val$ocd : ops.val.codex;
24140
24135
  if (this.CatalogData.isIDM3DCat && ops.val.vCodex) opv = 'OPV' + ops.idmVariantenArt + '_' + ops.val.vCodex;
24141
24136
  opt = (_ops$option$ocd = ops.option.ocd) !== null && _ops$option$ocd !== void 0 ? _ops$option$ocd : ops.optionCodex;
24142
24137
  if (alternateRenderInfo != undefined && alternateRenderInfo.hideOptionsIn3DImage.includes(opt)) return;
24143
- if (!ops.val.isDigitalized && ops.val.isTexture) containsTextureNotDigitalized = true;
24144
24138
  ret.CFG.push({
24145
24139
  OPT: opt,
24146
24140
  OPV: opv
@@ -24165,7 +24159,6 @@ var DivaArticle = /*#__PURE__*/function () {
24165
24159
  });
24166
24160
  }
24167
24161
  }
24168
- return containsTextureNotDigitalized;
24169
24162
  }
24170
24163
  }, {
24171
24164
  key: "getAccessoireMATData",
@@ -24227,7 +24220,7 @@ var DivaArticle = /*#__PURE__*/function () {
24227
24220
  key: "getVariantBasketData",
24228
24221
  value: function getVariantBasketData() {
24229
24222
  var variantBasketData = [];
24230
- var opsObj = _objectSpread$e({}, this.articleOptionStates);
24223
+ var opsObj = _objectSpread$d({}, this.articleOptionStates);
24231
24224
  if (this.article.optionsForPrint) {
24232
24225
  for (var i = 0; i < this.article.optionsForPrint.length; i++) {
24233
24226
  var ops = this.getArticleOptionState(this.article.optionsForPrint[i]);
@@ -24413,8 +24406,8 @@ var DivaArticle = /*#__PURE__*/function () {
24413
24406
  }]);
24414
24407
  }();
24415
24408
 
24416
- function ownKeys$d(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; }
24417
- function _objectSpread$d(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$d(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$d(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
24409
+ function ownKeys$c(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; }
24410
+ function _objectSpread$c(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$c(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$c(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
24418
24411
  var LOG$b = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
24419
24412
 
24420
24413
  //Diese Klasse verwaltet den Optionsbaum und ladelogik etc. eines Artikels
@@ -24633,7 +24626,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
24633
24626
  return _context5.abrupt("continue", 37);
24634
24627
  case 11:
24635
24628
  if (targetArticlesWithNewValues.includes(targetArticlesToUpdate[i])) {
24636
- valuesArray[i] = actArticle.getValidValues(_objectSpread$d({}, myValues), actArticle.CatalogData.mergeOptionsToSameOption);
24629
+ valuesArray[i] = actArticle.getValidValues(_objectSpread$c({}, myValues), actArticle.CatalogData.mergeOptionsToSameOption);
24637
24630
  }
24638
24631
  if (!(Object.entries(valuesArray[i]).length > 0 || from !== null && from !== void 0 && from.startsWith('initializing'))) {
24639
24632
  _context5.next = 32;
@@ -25267,7 +25260,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
25267
25260
  }
25268
25261
  doLoadItem.BasketID = nArticle.basketId;
25269
25262
  _context14.next = 9;
25270
- return this.toDoAfterArticleLoaded(nArticle, {}, _objectSpread$d(_objectSpread$d({}, doLoadItem.VariantValues), newConfigValues), 'initializingPartlist', doLoadItem.VariantItemData);
25263
+ return this.toDoAfterArticleLoaded(nArticle, {}, _objectSpread$c(_objectSpread$c({}, doLoadItem.VariantValues), newConfigValues), 'initializingPartlist', doLoadItem.VariantItemData);
25271
25264
  case 9:
25272
25265
  article.addPartlistArticle(nArticle);
25273
25266
  case 10:
@@ -25411,7 +25404,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
25411
25404
  if (ruleValid) break;
25412
25405
  }
25413
25406
  if (ruleValid) {
25414
- returnValue.push(_objectSpread$d(_objectSpread$d({}, entry), {}, {
25407
+ returnValue.push(_objectSpread$c(_objectSpread$c({}, entry), {}, {
25415
25408
  index: i
25416
25409
  }));
25417
25410
  break;
@@ -26393,7 +26386,6 @@ var DivaConfigTreeData = /*#__PURE__*/function () {
26393
26386
  var optionStep = step === null || step === void 0 ? void 0 : step.optionStep;
26394
26387
  var paletteType = 'SMALL';
26395
26388
  if (configStep && optionStep) {
26396
- var _set$api$ReturnToFrom;
26397
26389
  var optionState = articles[configStep.targetArticles[0]][configStep.option];
26398
26390
  if (configStep.option == 'OPTVINYL' || configStep.option == 'OPTVINYL_1' || configStep.option == 'OPTFABRIC' || configStep.option == 'OPTBE' || configStep.option == 'OPTBE_AUSSEN' || configStep.option == 'OPTBE_INNEN' || configStep.option == 'OPTBE_PANEELE' || configStep.option == 'OPTMATRATZE_BE' || configStep.option == 'OPTBE_UG' || configStep.option == 'OPTBEZUG' || configStep.option == 'OPTKO' || configStep.option == 'OPTFR' || configStep.option == 'OPTNI' || configStep.option == 'OPTUF_FA' || configStep.option == 'OPTBE_NETZ' || configStep.option == 'OPTBE_AL' || configStep.option == 'OPTKISSEN_BE' || configStep.option == 'OPTKP_BE' || configStep.option == 'OPTARM_BE' || configStep.option == 'OPTBE_KT' || configStep.option == 'OPT3' || configStep.option == 'OPT5' || configStep.option == 'OPTBE_KNOEPFE' || configStep.option == 'OPTSK_FARBE' || configStep.option == 'OPTBANDFARBE' || configStep.option == 'OPTBE_BOX' || configStep.option == 'OPTMA_AF_BE' || configStep.option == 'OPTTOPPER_BE' || optionState.option.hasOPG && optionState.hasImages || optionStep.mergesToOPG) {
26399
26391
  paletteType = 'GAL';
@@ -26421,31 +26413,15 @@ var DivaConfigTreeData = /*#__PURE__*/function () {
26421
26413
  if (paletteType == 'GALLERY') {
26422
26414
  paletteType = 'GAL';
26423
26415
  }
26424
- //TODO correct with franz
26425
- if ((!set.api.getDiva3DSuppressCacheCreation() && set.api.getDiva3dUseImageCache() || (_set$api$ReturnToFrom = set.api.ReturnToFromParams) !== null && _set$api$ReturnToFrom !== void 0 && _set$api$ReturnToFrom.startsWith('FAVORITS')) && paletteType == 'DROPDOWN_TEXT') paletteType = 'VERY_SMALL';
26426
26416
  }
26427
26417
  return paletteType;
26428
26418
  }
26429
26419
  }, {
26430
26420
  key: "getStepInfo",
26431
26421
  value: function getStepInfo(configStepKey, optionStatesOfArticle) {
26432
- var isNotVisualized = false;
26433
- var targetArticles = this.getTargetArticles(configStepKey),
26434
- allSteps = this.getAllByKey(configStepKey);
26435
- if (allSteps !== null && allSteps !== void 0 && allSteps.optionStep) {
26436
- for (var i = 0; i < targetArticles.length; i++) {
26437
- if (optionStatesOfArticle[targetArticles[i]][allSteps.optionStep.codex].isNotVisualized) {
26438
- isNotVisualized = true;
26439
- break;
26440
- }
26441
- }
26442
- }
26443
- if (isNotVisualized) {
26444
- return 'SHOW_NOT_VISUALIZED_WARNINIG';
26445
- }
26446
- if (allSteps !== null && allSteps !== void 0 && allSteps.configStep.warning) {
26447
- return allSteps.configStep.warning;
26448
- }
26422
+ var allSteps = this.getAllByKey(configStepKey);
26423
+ if (allSteps !== null && allSteps !== void 0 && allSteps.optionStep) ;
26424
+ if (allSteps !== null && allSteps !== void 0 && allSteps.configStep.warning) return allSteps.configStep.warning;
26449
26425
  return undefined;
26450
26426
  }
26451
26427
  }, {
@@ -26753,8 +26729,8 @@ var DivaConfigTreeData = /*#__PURE__*/function () {
26753
26729
  function _createForOfIteratorHelper$1(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$1(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; } } }; }
26754
26730
  function _unsupportedIterableToArray$1(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$1(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$1(r, a) : void 0; } }
26755
26731
  function _arrayLikeToArray$1(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; }
26756
- function ownKeys$c(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; }
26757
- function _objectSpread$c(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$c(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$c(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
26732
+ function ownKeys$b(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; }
26733
+ function _objectSpread$b(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$b(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$b(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
26758
26734
  var LOG$9 = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
26759
26735
  var DivaSet = /*#__PURE__*/function () {
26760
26736
  function DivaSet(catalog, _setId, orderSet, initSetState) {
@@ -26849,7 +26825,7 @@ var DivaSet = /*#__PURE__*/function () {
26849
26825
  _context.next = 10;
26850
26826
  break;
26851
26827
  }
26852
- validValues = repairVariantValuesAndPlanner ? article.getValidValues(_objectSpread$c({}, variantValues), article.CatalogData.mergeOptionsToSameOption) : {};
26828
+ validValues = repairVariantValuesAndPlanner ? article.getValidValues(_objectSpread$b({}, variantValues), article.CatalogData.mergeOptionsToSameOption) : {};
26853
26829
  _context.t0 = partlistArticlesToLoad;
26854
26830
  _context.next = 8;
26855
26831
  return articleHandlerInstance.updateCfgValues(article, repairVariantValuesAndPlanner ? validValues : variantValues, {}, undefined, loadPlas);
@@ -26964,7 +26940,7 @@ var DivaSet = /*#__PURE__*/function () {
26964
26940
  }
26965
26941
  return false;
26966
26942
  });
26967
- _defineProperty(this, "getPlannerConfigData", function (elementId, excludeInvalidCacheOptions, alternateRenderInfo) {
26943
+ _defineProperty(this, "getPlannerConfigData", function (elementId, alternateRenderInfo) {
26968
26944
  var article = _this.getArticleByElementId(elementId);
26969
26945
  var articleAccs = [];
26970
26946
  for (var key in article === null || article === void 0 ? void 0 : article.accessoires) {
@@ -26972,7 +26948,6 @@ var DivaSet = /*#__PURE__*/function () {
26972
26948
  }
26973
26949
  var plannerConfigData = {
26974
26950
  config: {},
26975
- containsTextureNotDigitalized: false,
26976
26951
  accs: articleAccs
26977
26952
  };
26978
26953
  if (article) {
@@ -26986,9 +26961,8 @@ var DivaSet = /*#__PURE__*/function () {
26986
26961
  }
26987
26962
  }
26988
26963
  }
26989
- var result = article.getPlannerConfigData(accessoireArticles, excludeInvalidCacheOptions, alternateRenderInfo);
26964
+ var result = article.getPlannerConfigData(accessoireArticles, alternateRenderInfo);
26990
26965
  plannerConfigData.config = result.config;
26991
- plannerConfigData.containsTextureNotDigitalized = result.containsTextureNotDigitalized;
26992
26966
  }
26993
26967
  return plannerConfigData;
26994
26968
  });
@@ -26996,7 +26970,6 @@ var DivaSet = /*#__PURE__*/function () {
26996
26970
  var article = _this.getArticleByBasketId(basketId);
26997
26971
  var plannerConfigData = {
26998
26972
  config: {},
26999
- containsTextureNotDigitalized: false,
27000
26973
  accs: []
27001
26974
  };
27002
26975
  if (article) {
@@ -27004,9 +26977,8 @@ var DivaSet = /*#__PURE__*/function () {
27004
26977
  for (var key in article === null || article === void 0 ? void 0 : article.accessoires) {
27005
26978
  if (article.accessoires[key].elementId) articleAccs.push(article.accessoires[key].elementId);
27006
26979
  }
27007
- var result = article.getPlannerConfigData(article.accessoires, false);
26980
+ var result = article.getPlannerConfigData(article.accessoires);
27008
26981
  plannerConfigData.config = result.config;
27009
- plannerConfigData.containsTextureNotDigitalized = result.containsTextureNotDigitalized;
27010
26982
  plannerConfigData.accs = articleAccs;
27011
26983
  }
27012
26984
  return plannerConfigData;
@@ -27102,7 +27074,6 @@ var DivaSet = /*#__PURE__*/function () {
27102
27074
  if (this.catalogData.useBoxPlanner) {
27103
27075
  plannerMode = 'BoxPlanner';
27104
27076
  } else if (this.catalogData.has3dModels) {
27105
- var _this$WebConfig;
27106
27077
  for (var key in this.divaArticles) {
27107
27078
  if (this.divaArticles[key].model3DName) {
27108
27079
  plannerMode = '3DImage';
@@ -27114,9 +27085,6 @@ var DivaSet = /*#__PURE__*/function () {
27114
27085
  if (Object.entries(this.divaArticles).length == 0) {
27115
27086
  plannerMode = '3DImage';
27116
27087
  }
27117
- if ((_this$WebConfig = this.WebConfig) !== null && _this$WebConfig !== void 0 && _this$WebConfig.diva3dUseSirvViewer) {
27118
- plannerMode = 'SirvViewer_only';
27119
- }
27120
27088
  if (this.catalogData.divaArReady && this.catalogData.useShelfPlannerRTV) {
27121
27089
  //TODO Matthias sauber initialisieren ob in RTV oder IMAGE3D gestartet wird.
27122
27090
  plannerMode = 'RTViewer';
@@ -27135,7 +27103,7 @@ var DivaSet = /*#__PURE__*/function () {
27135
27103
  plannerMode = 'No';
27136
27104
  }
27137
27105
  this.plannerMode = plannerMode;
27138
- this.setType = plannerMode == 'No' || plannerMode == 'SirvViewer_only' ? 'ARTICLE' : 'PLANNING';
27106
+ this.setType = plannerMode == 'No' ? 'ARTICLE' : 'PLANNING';
27139
27107
  return plannerMode;
27140
27108
  }
27141
27109
  }, {
@@ -27430,8 +27398,8 @@ var DivaSet = /*#__PURE__*/function () {
27430
27398
  var articles = {};
27431
27399
  for (var basketId in this.divaArticles) {
27432
27400
  articles[basketId] = this.divaArticles[basketId];
27433
- if (allPartlistArticlesAlso) articles = _objectSpread$c(_objectSpread$c({}, articles), articles[basketId].getRecursivePartlistArticles());
27434
- if (visiblePartlistArticlesAlso) articles = _objectSpread$c(_objectSpread$c({}, articles), articles[basketId].getRecursivePartlistArticles(true));
27401
+ if (allPartlistArticlesAlso) articles = _objectSpread$b(_objectSpread$b({}, articles), articles[basketId].getRecursivePartlistArticles());
27402
+ if (visiblePartlistArticlesAlso) articles = _objectSpread$b(_objectSpread$b({}, articles), articles[basketId].getRecursivePartlistArticles(true));
27435
27403
  }
27436
27404
  return articles;
27437
27405
  }
@@ -27926,8 +27894,8 @@ var DivaSet = /*#__PURE__*/function () {
27926
27894
  }, {
27927
27895
  key: "remindPriceForHash",
27928
27896
  value: function remindPriceForHash(product) {
27929
- var _product$discountedPr, _product$discountedPr2;
27930
- if (!product.available) return;
27897
+ var _product$availableFor, _product$discountedPr, _product$discountedPr2;
27898
+ if (!((_product$availableFor = product.availableForOrganizations) !== null && _product$availableFor !== void 0 && _product$availableFor.includes(this.getSetState.organizationId))) return;
27931
27899
  var claculatedPrice = this.getSetPrice(true);
27932
27900
  if (!product.discountedPrice && product.addedPrice === product.calculatedPrice && claculatedPrice == product.calculatedPrice) {
27933
27901
  return;
@@ -27953,7 +27921,7 @@ var DivaSet = /*#__PURE__*/function () {
27953
27921
  break;
27954
27922
  }
27955
27923
  _context4.next = 3;
27956
- return import('./DoorPlanner-c9293a3a.js');
27924
+ return import('./DoorPlanner-f3376859.js');
27957
27925
  case 3:
27958
27926
  _yield$import = _context4.sent;
27959
27927
  DoorPlanner = _yield$import["default"];
@@ -28058,8 +28026,8 @@ var DivaSet = /*#__PURE__*/function () {
28058
28026
  }, {
28059
28027
  key: "hasStaticRoomList",
28060
28028
  get: function get() {
28061
- var _this$WebConfig2;
28062
- if (this.CatalogData.roomList3DStaticBGImage.size > 0 && (_this$WebConfig2 = this.WebConfig) !== null && _this$WebConfig2 !== void 0 && _this$WebConfig2.diva3dStaticBGImage) {
28029
+ var _this$WebConfig;
28030
+ if (this.CatalogData.roomList3DStaticBGImage.size > 0 && (_this$WebConfig = this.WebConfig) !== null && _this$WebConfig !== void 0 && _this$WebConfig.diva3dStaticBGImage) {
28063
28031
  return true;
28064
28032
  }
28065
28033
  return false;
@@ -28100,8 +28068,8 @@ var DivaSet = /*#__PURE__*/function () {
28100
28068
  }, {
28101
28069
  key: "ViewConfig",
28102
28070
  get: function get() {
28103
- var _this$WebConfig3;
28104
- return (_this$WebConfig3 = this.WebConfig) === null || _this$WebConfig3 === void 0 ? void 0 : _this$WebConfig3.viewConfig;
28071
+ var _this$WebConfig2;
28072
+ return (_this$WebConfig2 = this.WebConfig) === null || _this$WebConfig2 === void 0 ? void 0 : _this$WebConfig2.viewConfig;
28105
28073
  }
28106
28074
  }, {
28107
28075
  key: "i18n",
@@ -29378,7 +29346,7 @@ var SummaryHandler = /*#__PURE__*/function () {
29378
29346
  if (article.getArticleOptionState('OPT' + optionCodexes[0])) {
29379
29347
  for (var i = 0; i < optionCodexes.length; i++) {
29380
29348
  var optionState = article.getArticleOptionState('OPT' + optionCodexes[i]);
29381
- if (!optionState.isInvisible && optionState.isDoShow && optionState.visibleCount > 0 && optionState.valCodex != 'OPVNR') {
29349
+ if (optionState && !optionState.isInvisible && optionState.isDoShow && optionState.visibleCount > 0 && optionState.valCodex != 'OPVNR') {
29382
29350
  opss.push(optionState);
29383
29351
  }
29384
29352
  }
@@ -29588,8 +29556,8 @@ var SummaryHandler = /*#__PURE__*/function () {
29588
29556
  }();
29589
29557
  var summaryHandlerInstance = new SummaryHandler();
29590
29558
 
29591
- function ownKeys$b(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; }
29592
- function _objectSpread$b(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$b(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$b(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
29559
+ function ownKeys$a(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; }
29560
+ function _objectSpread$a(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$a(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$a(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
29593
29561
  DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
29594
29562
  var DivaFavoritesHandler = /*#__PURE__*/function () {
29595
29563
  function DivaFavoritesHandler() {
@@ -29670,10 +29638,10 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
29670
29638
  setHashes = {};
29671
29639
  variantId = this.getVariantIdToStart(set);
29672
29640
  origConfig = articles[Object.keys(articles)[0]].VariantValues;
29673
- i = variants.length - 1;
29641
+ i = 0;
29674
29642
  case 6:
29675
- if (!(i >= 0)) {
29676
- _context3.next = 50;
29643
+ if (!(i < variants.length)) {
29644
+ _context3.next = 53;
29677
29645
  break;
29678
29646
  }
29679
29647
  variantForTargetArticles = variants[i];
@@ -29776,9 +29744,14 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
29776
29744
  variantForTargetArticles.configVariantValues = configVariantValues;
29777
29745
  variantForTargetArticles.price = set === null || set === void 0 ? void 0 : set.getSetPrice();
29778
29746
  variantForTargetArticles.title = set === null || set === void 0 ? void 0 : set.CatalogData.catalogName;
29779
- if (!variantIsValid) {
29780
- variants.splice(i, 1);
29747
+ if (variantIsValid) {
29748
+ _context3.next = 48;
29749
+ break;
29781
29750
  }
29751
+ variants.splice(i, 1);
29752
+ i--;
29753
+ return _context3.abrupt("continue", 50);
29754
+ case 48:
29782
29755
  reservedId = this.tryGetOldVariantIdForVariant(set, variants[i]);
29783
29756
  if (reservedId !== undefined) {
29784
29757
  variants[i].id = reservedId;
@@ -29786,21 +29759,21 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
29786
29759
  variants[i].id = variantId;
29787
29760
  variantId++;
29788
29761
  }
29789
- case 47:
29790
- i--;
29762
+ case 50:
29763
+ i++;
29791
29764
  _context3.next = 6;
29792
29765
  break;
29793
- case 50:
29766
+ case 53:
29794
29767
  if (!set.favoritesChanged) this.evalOldConfigVariants(set, variants);
29795
- _context3.next = 53;
29768
+ _context3.next = 56;
29796
29769
  return setHandlerInstance.updateArticlesOptionStatesOfActSet(set, origConfig, Object.keys(articles), true);
29797
- case 53:
29770
+ case 56:
29798
29771
  set.allVariantsCache = variants;
29799
29772
  variants.sort(function (a, b) {
29800
29773
  return a.id - b.id;
29801
29774
  });
29802
29775
  return _context3.abrupt("return", variants);
29803
- case 56:
29776
+ case 59:
29804
29777
  case "end":
29805
29778
  return _context3.stop();
29806
29779
  }
@@ -30087,7 +30060,7 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
30087
30060
  allvariants = _context4.t0;
30088
30061
  validVariants = [];
30089
30062
  for (i = 0; i < allvariants.length; i++) {
30090
- if (!set.disabledVariants.includes(i)) {
30063
+ if (!set.disabledVariants.includes(allvariants[i].id)) {
30091
30064
  validVariants.push(allvariants[i]);
30092
30065
  }
30093
30066
  }
@@ -30262,7 +30235,7 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
30262
30235
  if (targetArticle[opt] && !variantValues[opt]) variantValues[opt] = targetArticle[opt];
30263
30236
  }
30264
30237
  }
30265
- configVariant = new ConfigVariantData(variant.id, set.setName, set.setName_locales, setImage, (_hQRenderScript = hQRenderScript) === null || _hQRenderScript === void 0 ? void 0 : _hQRenderScript._id, DivaUtils.encodeBase64(set.plannerHandler.getProject3D(set.getSetId())), set.getVariantsDescription(), set.SetArticleNr, set.getSetPrice(), set.setHash, 1, set.getVariantBasketData(), articleHandlerInstance.getCompactOrderLine(_objectSpread$b(_objectSpread$b({}, set.getDivaArticles()), set.getPartlistArticlesOfSet())), variantValues, summaryHandlerInstance.convertSummaryItemsToSummaryInfo(set), plannerData != undefined ? DivaUtils.encodeBase64(JSON.stringify(plannerData)) : '', urlToPlanning2D, setHandlerInstance.getBBoxObject(set), set.getBruttoSetPrice(), undefined, undefined, set.MetaData, set.MetaData_locales, DivaUtils.stripTagsFromDict(set.getVariantsDescription_locales()), (_basket$OrderSets$set = basket.OrderSets[setindex].ConfigVariants) === null || _basket$OrderSets$set === void 0 || (_basket$OrderSets$set = _basket$OrderSets$set[set.basketConfigVariants.length]) === null || _basket$OrderSets$set === void 0 ? void 0 : _basket$OrderSets$set.SetOrderText, (_basket$OrderSets$set2 = basket.OrderSets[setindex].ConfigVariants) === null || _basket$OrderSets$set2 === void 0 || (_basket$OrderSets$set2 = _basket$OrderSets$set2[set.basketConfigVariants.length]) === null || _basket$OrderSets$set2 === void 0 ? void 0 : _basket$OrderSets$set2.SetOrderText_locales);
30238
+ configVariant = new ConfigVariantData(variant.id, set.setName, set.setName_locales, setImage, (_hQRenderScript = hQRenderScript) === null || _hQRenderScript === void 0 ? void 0 : _hQRenderScript._id, DivaUtils.encodeBase64(set.plannerHandler.getProject3D(set.getSetId())), set.getVariantsDescription(), set.SetArticleNr, set.getSetPrice(), set.setHash, 1, set.getVariantBasketData(), articleHandlerInstance.getCompactOrderLine(_objectSpread$a(_objectSpread$a({}, set.getDivaArticles()), set.getPartlistArticlesOfSet())), variantValues, summaryHandlerInstance.convertSummaryItemsToSummaryInfo(set), plannerData != undefined ? DivaUtils.encodeBase64(JSON.stringify(plannerData)) : '', urlToPlanning2D, setHandlerInstance.getBBoxObject(set), set.getBruttoSetPrice(), undefined, undefined, set.MetaData, set.MetaData_locales, DivaUtils.stripTagsFromDict(set.getVariantsDescription_locales()), (_basket$OrderSets$set = basket.OrderSets[setindex].ConfigVariants) === null || _basket$OrderSets$set === void 0 || (_basket$OrderSets$set = _basket$OrderSets$set[set.basketConfigVariants.length]) === null || _basket$OrderSets$set === void 0 ? void 0 : _basket$OrderSets$set.SetOrderText, (_basket$OrderSets$set2 = basket.OrderSets[setindex].ConfigVariants) === null || _basket$OrderSets$set2 === void 0 || (_basket$OrderSets$set2 = _basket$OrderSets$set2[set.basketConfigVariants.length]) === null || _basket$OrderSets$set2 === void 0 ? void 0 : _basket$OrderSets$set2.SetOrderText_locales);
30266
30239
  set.basketConfigVariants.push(configVariant);
30267
30240
  case 28:
30268
30241
  case "end":
@@ -30282,8 +30255,8 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
30282
30255
  if (!((_set$oldConfigVariant3 = set.oldConfigVariants) !== null && _set$oldConfigVariant3 !== void 0 && _set$oldConfigVariant3.length)) return;
30283
30256
  //set all invalid
30284
30257
  set.disabledVariants = [];
30285
- variants.map(function (v, index) {
30286
- return set.disabledVariants.push(index);
30258
+ variants.map(function (v) {
30259
+ return set.disabledVariants.push(v.id);
30287
30260
  });
30288
30261
  var oldConfigVariants = _toConsumableArray(set.oldConfigVariants);
30289
30262
  for (var i = 0; i < variants.length; i++) {
@@ -30306,7 +30279,7 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
30306
30279
  if (tryNext) break;
30307
30280
  }
30308
30281
  if (!tryNext) {
30309
- var index = set.disabledVariants.indexOf(i);
30282
+ var index = set.disabledVariants.indexOf(variant.id);
30310
30283
  if (index != -1) set.disabledVariants.splice(index, 1);
30311
30284
  oldConfigVariants.splice(j, 1);
30312
30285
  }
@@ -30317,11 +30290,11 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
30317
30290
  }, {
30318
30291
  key: "isFavorite",
30319
30292
  value: function isFavorite(set, targetArticles, item, optionCodex) {
30320
- var _item$ocd, _set$WebConfig, _set$api$ReturnToFrom, _favorites$VariantVal, _Object$keys;
30293
+ var _item$ocd, _set$api$ReturnToFrom, _favorites$VariantVal, _Object$keys;
30321
30294
  var favorites = set.favorites;
30322
30295
  var opvCodex = (_item$ocd = item.ocd) !== null && _item$ocd !== void 0 ? _item$ocd : item.codex;
30323
30296
  var opt = optionCodex ? optionCodex : item.parent.codex;
30324
- var doShowFav = ((_set$WebConfig = set.WebConfig) === null || _set$WebConfig === void 0 ? void 0 : _set$WebConfig.diva3dUseImageCache) && !set.WebConfig.diva3dSuppressCacheCreation || !!((_set$api$ReturnToFrom = set.api.ReturnToFromParams) !== null && _set$api$ReturnToFrom !== void 0 && _set$api$ReturnToFrom.startsWith('FAVORITS'));
30297
+ var doShowFav = !!((_set$api$ReturnToFrom = set.api.ReturnToFromParams) !== null && _set$api$ReturnToFrom !== void 0 && _set$api$ReturnToFrom.startsWith('FAVORITS'));
30325
30298
  if (!doShowFav) return undefined;
30326
30299
  if ((_favorites$VariantVal = favorites.VariantValues) !== null && _favorites$VariantVal !== void 0 && _favorites$VariantVal[opt] && (_Object$keys = Object.keys(favorites.VariantValues[opt])) !== null && _Object$keys !== void 0 && _Object$keys.includes(opvCodex)) {
30327
30300
  for (var i = 0; i < targetArticles.length; i++) {
@@ -30342,8 +30315,8 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
30342
30315
  }();
30343
30316
  var favoritesHandlerInstance = new DivaFavoritesHandler();
30344
30317
 
30345
- function ownKeys$a(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; }
30346
- function _objectSpread$a(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$a(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$a(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
30318
+ function ownKeys$9(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; }
30319
+ function _objectSpread$9(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$9(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$9(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
30347
30320
 
30348
30321
  //Diese Klasse beinhaltet die Logik wie eine aktuelle Konfiguration mit allen möglicheen Ausprägungen mit Preisen in einem Set aussieht.
30349
30322
  //Der in einem Set gemergte Optionsbaum
@@ -30900,7 +30873,7 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
30900
30873
  //get schnittmenge of all the articles
30901
30874
  if (i === 0) {
30902
30875
  constructionRules = myOptionState.constructionRules;
30903
- configItems = _objectSpread$a({}, myOptionState.visibleOptionValues);
30876
+ configItems = _objectSpread$9({}, myOptionState.visibleOptionValues);
30904
30877
  } else {
30905
30878
  for (var _key2 in configItems) {
30906
30879
  if (!myOptionState.visibleOptionValues[_key2]) {
@@ -31131,8 +31104,8 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
31131
31104
  }();
31132
31105
  var configTreeHandler = new DivaConfigTreeHandler();
31133
31106
 
31134
- function ownKeys$9(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; }
31135
- function _objectSpread$9(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$9(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$9(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
31107
+ function ownKeys$8(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; }
31108
+ function _objectSpread$8(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$8(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$8(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
31136
31109
  var LOG$8 = DivaUtils.initLog('Planner', 'DIVA-SET-HANDLER');
31137
31110
 
31138
31111
  /*
@@ -31622,7 +31595,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
31622
31595
  }
31623
31596
  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;
31624
31597
  _context6.next = 18;
31625
- return this.addPlannerElement(set, articlesToInitialize[j], _objectSpread$9(_objectSpread$9({}, params), variantValues ? {
31598
+ return this.addPlannerElement(set, articlesToInitialize[j], _objectSpread$8(_objectSpread$8({}, params), variantValues ? {
31626
31599
  variantValues: variantValues
31627
31600
  } : {}));
31628
31601
  case 18:
@@ -32255,7 +32228,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
32255
32228
  _context17.next = 24;
32256
32229
  break;
32257
32230
  }
32258
- return _context17.abrupt("return", _objectSpread$9(_objectSpread$9({}, doesFit), {}, {
32231
+ return _context17.abrupt("return", _objectSpread$8(_objectSpread$8({}, doesFit), {}, {
32259
32232
  accessoire: accessoire
32260
32233
  }));
32261
32234
  case 24:
@@ -32687,7 +32660,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
32687
32660
  var articlecodex = plannerElement.articleCodex;
32688
32661
  if (type == 'PLANNERSWITCH' && Object.keys(set.getDivaArticles())[0]) {
32689
32662
  if (plannerViewInfo.catalogPlannerArticles[i].filterType == 'Accessoire') continue;
32690
- cleanedCaltaogPlannerArticles.push(_objectSpread$9({}, plannerElement));
32663
+ cleanedCaltaogPlannerArticles.push(_objectSpread$8({}, plannerElement));
32691
32664
  var index = cleanedCaltaogPlannerArticles.length - 1;
32692
32665
  cleanedCaltaogPlannerArticles[index].groupName = '';
32693
32666
  if (set.getArticlesByArticleCodex(articlecodex).length > 0) {
@@ -32705,10 +32678,10 @@ var DivaSetHandler = /*#__PURE__*/function () {
32705
32678
  plannerViewInfo.plannerConfiguration.updatePaletteAfterPlanningChanged = true;
32706
32679
  }
32707
32680
  }
32708
- if (!dontPushElement) cleanedCaltaogPlannerArticles.push(_objectSpread$9({}, plannerElement));
32681
+ if (!dontPushElement) cleanedCaltaogPlannerArticles.push(_objectSpread$8({}, plannerElement));
32709
32682
  }
32710
32683
  }
32711
- return _objectSpread$9(_objectSpread$9({}, plannerViewInfo), {}, {
32684
+ return _objectSpread$8(_objectSpread$8({}, plannerViewInfo), {}, {
32712
32685
  catalogPlannerArticles: cleanedCaltaogPlannerArticles
32713
32686
  });
32714
32687
  }
@@ -32907,7 +32880,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
32907
32880
  filterType = set.configTree.getCurFilterType(configStepKey, optionStatesOfArticle, configItems.configItems);
32908
32881
  stepInfo = set.configTree.getStepInfo(configStepKey, optionStatesOfArticle);
32909
32882
  contentItemId = (_configItems$option = configItems.option) === null || _configItems$option === void 0 ? void 0 : _configItems$option.contentItemId;
32910
- return _context24.abrupt("return", _objectSpread$9(_objectSpread$9(_objectSpread$9({
32883
+ return _context24.abrupt("return", _objectSpread$8(_objectSpread$8(_objectSpread$8({
32911
32884
  isRenderedNotInSettingPalette: set.configTree.isRenderedNotInSettingPalette(configStepKey),
32912
32885
  isRenderedInAccessorieStep: set.configTree.isRenderedInAccessorieStep(configStepKey),
32913
32886
  visible: set.configTree.getVisibility(configStepKey, visible, set.CatalogData)
@@ -33330,7 +33303,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
33330
33303
  break;
33331
33304
  }
33332
33305
  _context28.next = 17;
33333
- return this.addArticleToActSet(set, edoArticlesToLoad[_i5].ArticleCodex, _objectSpread$9(_objectSpread$9({}, edoArticlesToLoad[_i5]), {}, {
33306
+ return this.addArticleToActSet(set, edoArticlesToLoad[_i5].ArticleCodex, _objectSpread$8(_objectSpread$8({}, edoArticlesToLoad[_i5]), {}, {
33334
33307
  basketId: oldBasketIds[_i5]
33335
33308
  }), true);
33336
33309
  case 17:
@@ -33727,7 +33700,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
33727
33700
  origOrderSet.BBox = actOrderSet.BBox;
33728
33701
  origOrderSet.VariantDescription = actOrderSet.VariantDescription;
33729
33702
  if (actOrderSet.ConfigVariants && origOrderSet.ConfigVariants) origOrderSet.ConfigVariants = actOrderSet.ConfigVariants.map(function (variant, index) {
33730
- return _objectSpread$9(_objectSpread$9({}, variant), {}, {
33703
+ return _objectSpread$8(_objectSpread$8({}, variant), {}, {
33731
33704
  SetImage: origOrderSet.ConfigVariants[index].SetImage,
33732
33705
  HQRenderScript: origOrderSet.ConfigVariants[index].HQRenderScript,
33733
33706
  Set2DImage: origOrderSet.ConfigVariants[index].Set2DImage,
@@ -33765,25 +33738,12 @@ var DivaSetHandler = /*#__PURE__*/function () {
33765
33738
  DivaUtils.startSpanOfApm('GetSet3D und 2D Image');
33766
33739
  GroupType = 'PLANNING';
33767
33740
  plannerData = set.plannerHandler.savePlanner(set.getSetId());
33768
- if (!(set.getPlannerMode() == 'SirvViewer_only')) {
33769
- _context31.next = 10;
33770
- break;
33771
- }
33772
- _context31.next = 7;
33773
- return set.plannerHandler.getSetImageAsUrl(set.getSetId());
33774
- case 7:
33775
- _context31.t0 = _context31.sent;
33776
- _context31.next = 11;
33777
- break;
33778
- case 10:
33779
- _context31.t0 = undefined;
33780
- case 11:
33781
- setImage = _context31.t0;
33741
+ setImage = undefined;
33782
33742
  urlToPlanning2D = undefined;
33783
33743
  alternateSetImages = undefined;
33784
33744
  hqRenderScript = undefined;
33785
33745
  if (dontGenerateImages) {
33786
- _context31.next = 32;
33746
+ _context31.next = 25;
33787
33747
  break;
33788
33748
  }
33789
33749
  promise3D = this.getSetImage(set, typeof window === 'undefined');
@@ -33791,22 +33751,22 @@ var DivaSetHandler = /*#__PURE__*/function () {
33791
33751
  if (!catalogData.dontSaveAlternativeRenderings && set.CatalogData.alternateRenderingsForSummary.length) {
33792
33752
  promise3DAlternate = this.getAlternateSetImages(set);
33793
33753
  }
33794
- _context31.next = 21;
33754
+ _context31.next = 14;
33795
33755
  return Promise.all([promise3D, promise2D, promise3DAlternate]);
33796
- case 21:
33756
+ case 14:
33797
33757
  _yield$Promise$all = _context31.sent;
33798
33758
  _yield$Promise$all2 = _slicedToArray(_yield$Promise$all, 3);
33799
33759
  setImage = _yield$Promise$all2[0];
33800
33760
  urlToPlanning2D = _yield$Promise$all2[1];
33801
33761
  alternateSetImages = _yield$Promise$all2[2];
33802
33762
  promiseHQRenderScript = this.getHQRenderScript(set, divaNr);
33803
- _context31.next = 29;
33763
+ _context31.next = 22;
33804
33764
  return Promise.all([promiseHQRenderScript]);
33805
- case 29:
33765
+ case 22:
33806
33766
  _yield$Promise$all3 = _context31.sent;
33807
33767
  _yield$Promise$all4 = _slicedToArray(_yield$Promise$all3, 1);
33808
33768
  hqRenderScript = _yield$Promise$all4[0];
33809
- case 32:
33769
+ case 25:
33810
33770
  LOG$8.startTransaction({
33811
33771
  event: 'FillBakset',
33812
33772
  eventId: 'FILL_BASKET',
@@ -33872,7 +33832,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
33872
33832
  MetaData_locales: !((_set$basketConfigVari3 = set.basketConfigVariants) !== null && _set$basketConfigVari3 !== void 0 && _set$basketConfigVari3.length) ? set.MetaData_locales : undefined
33873
33833
  });
33874
33834
  return _context31.abrupt("return", orderSet);
33875
- case 39:
33835
+ case 32:
33876
33836
  case "end":
33877
33837
  return _context31.stop();
33878
33838
  }
@@ -33900,7 +33860,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
33900
33860
  catalogData = set.CatalogData;
33901
33861
  is3D = ['3DImage', 'BoxPlanner', 'RTViewer'].includes(set.getPlannerMode());
33902
33862
  if (!is3D) {
33903
- _context32.next = 13;
33863
+ _context32.next = 11;
33904
33864
  break;
33905
33865
  }
33906
33866
  LOG$8.startTransaction({
@@ -33916,20 +33876,9 @@ var DivaSetHandler = /*#__PURE__*/function () {
33916
33876
  case 9:
33917
33877
  setImage = _context32.sent;
33918
33878
  LOG$8.successTransaction('RENDER_3D_IMAGE');
33919
- _context32.next = 17;
33920
- break;
33921
- case 13:
33922
- if (!(set.getPlannerMode() == 'SirvViewer_only')) {
33923
- _context32.next = 17;
33924
- break;
33925
- }
33926
- _context32.next = 16;
33927
- return set.plannerHandler.getSetImageAsUrl(set.getSetId());
33928
- case 16:
33929
- setImage = _context32.sent;
33930
- case 17:
33879
+ case 11:
33931
33880
  return _context32.abrupt("return", setImage);
33932
- case 18:
33881
+ case 12:
33933
33882
  case "end":
33934
33883
  return _context32.stop();
33935
33884
  }
@@ -34081,77 +34030,22 @@ var DivaSetHandler = /*#__PURE__*/function () {
34081
34030
  Info: bbox.width + 'cm x ' + bbox.depth + 'cm'
34082
34031
  };
34083
34032
  }
34084
-
34085
- /****************************Cache building***************************/
34086
-
34087
- /**
34088
- * This function creates the cache for all images.
34089
- * @returns returns true if the whole set was created correctly
34090
- */
34091
34033
  }, {
34092
- key: "createRenderCache",
34093
- value: (function () {
34094
- var _createRenderCache = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee34(set) {
34095
- var _set$getAlternateRend3;
34096
- var timeout;
34034
+ key: "loadProductsOfSets",
34035
+ value: function () {
34036
+ var _loadProductsOfSets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee34(orderSets, involvedSetIds) {
34097
34037
  return _regeneratorRuntime.wrap(function _callee34$(_context36) {
34098
34038
  while (1) switch (_context36.prev = _context36.next) {
34099
34039
  case 0:
34100
- set.plannerHandler.request3D(true, false, (set === null || set === void 0 || (_set$getAlternateRend3 = set.getAlternateRenderInfo()) === null || _set$getAlternateRend3 === void 0 ? void 0 : _set$getAlternateRend3.length) > 0, undefined, true, {
34101
- width: 100,
34102
- height: 100,
34103
- isFullscreenRendering: false,
34104
- planner3DGridEnabled: false,
34105
- mediaServiceSaveMode: 'PERMANENT',
34106
- doShow3DDimensionLines: false
34107
- });
34108
- timeout = 50;
34109
- case 2:
34110
- if (!set.plannerHandler.checkIsWaitingForRendering()) {
34111
- _context36.next = 10;
34112
- break;
34113
- }
34114
- timeout--;
34115
- if (!(timeout == 0)) {
34116
- _context36.next = 6;
34117
- break;
34118
- }
34119
- return _context36.abrupt("return", false);
34120
- case 6:
34121
- _context36.next = 8;
34122
- return DivaUtils.Sleep(300);
34123
- case 8:
34124
34040
  _context36.next = 2;
34125
- break;
34126
- case 10:
34127
- return _context36.abrupt("return", true);
34128
- case 11:
34129
- case "end":
34130
- return _context36.stop();
34131
- }
34132
- }, _callee34);
34133
- }));
34134
- function createRenderCache(_x113) {
34135
- return _createRenderCache.apply(this, arguments);
34136
- }
34137
- return createRenderCache;
34138
- }())
34139
- }, {
34140
- key: "loadProductsOfSets",
34141
- value: function () {
34142
- var _loadProductsOfSets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee35(orderSets, involvedSetIds) {
34143
- return _regeneratorRuntime.wrap(function _callee35$(_context37) {
34144
- while (1) switch (_context37.prev = _context37.next) {
34145
- case 0:
34146
- _context37.next = 2;
34147
34041
  return productHandlerInstance.loadProductsOfSets(orderSets, involvedSetIds);
34148
34042
  case 2:
34149
34043
  case "end":
34150
- return _context37.stop();
34044
+ return _context36.stop();
34151
34045
  }
34152
- }, _callee35);
34046
+ }, _callee34);
34153
34047
  }));
34154
- function loadProductsOfSets(_x114, _x115) {
34048
+ function loadProductsOfSets(_x113, _x114) {
34155
34049
  return _loadProductsOfSets.apply(this, arguments);
34156
34050
  }
34157
34051
  return loadProductsOfSets;
@@ -34188,28 +34082,28 @@ var DivaSetHandler = /*#__PURE__*/function () {
34188
34082
  }, {
34189
34083
  key: "addOrderSetArticlesToExistingSet",
34190
34084
  value: function () {
34191
- var _addOrderSetArticlesToExistingSet = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee36(set, orderSet, lastSetToInitialize) {
34192
- return _regeneratorRuntime.wrap(function _callee36$(_context38) {
34193
- while (1) switch (_context38.prev = _context38.next) {
34085
+ var _addOrderSetArticlesToExistingSet = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee35(set, orderSet, lastSetToInitialize) {
34086
+ return _regeneratorRuntime.wrap(function _callee35$(_context37) {
34087
+ while (1) switch (_context37.prev = _context37.next) {
34194
34088
  case 0:
34195
34089
  //TODO: GLOBAL STUFF
34196
34090
  //this.updateActSet(set);
34197
34091
  orderSet.changeBasketIds();
34198
- _context38.next = 3;
34092
+ _context37.next = 3;
34199
34093
  return this.initOrderLineArticles(set, orderSet);
34200
34094
  case 3:
34201
- _context38.next = 5;
34095
+ _context37.next = 5;
34202
34096
  return set.plannerHandler.extendSet(set, orderSet.SetPlanData, lastSetToInitialize);
34203
34097
  case 5:
34204
- _context38.next = 7;
34098
+ _context37.next = 7;
34205
34099
  return productHandlerInstance.updateProducts(set, 'onAdd');
34206
34100
  case 7:
34207
34101
  case "end":
34208
- return _context38.stop();
34102
+ return _context37.stop();
34209
34103
  }
34210
- }, _callee36, this);
34104
+ }, _callee35, this);
34211
34105
  }));
34212
- function addOrderSetArticlesToExistingSet(_x116, _x117, _x118) {
34106
+ function addOrderSetArticlesToExistingSet(_x115, _x116, _x117) {
34213
34107
  return _addOrderSetArticlesToExistingSet.apply(this, arguments);
34214
34108
  }
34215
34109
  return addOrderSetArticlesToExistingSet;
@@ -34226,486 +34120,9 @@ var DivaSetHandler = /*#__PURE__*/function () {
34226
34120
  }();
34227
34121
  var setHandlerInstance = new DivaSetHandler();
34228
34122
 
34229
- //This class saves all informations needed for a rendering
34123
+ function ownKeys$7(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; }
34124
+ function _objectSpread$7(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$7(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$7(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
34230
34125
  var LOG$7 = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
34231
- var Rendering = /*#__PURE__*/function () {
34232
- function Rendering(planningHash, renderHash, viewPointName, width, height, isFullscreenRendering, hasDimensionLines, plannerMeasureDigits, hasLayerMask, hasStaticBG, mediaServiceSaveMode, alternateRenderingsExist, alternateRendererInfo) {
34233
- _classCallCheck(this, Rendering);
34234
- _defineProperty(this, "planningHash", void 0);
34235
- _defineProperty(this, "renderHash", void 0);
34236
- _defineProperty(this, "creationTime", void 0);
34237
- _defineProperty(this, "renderWidth", void 0);
34238
- _defineProperty(this, "renderHeight", void 0);
34239
- _defineProperty(this, "uiInfo", void 0);
34240
- _defineProperty(this, "urlToSavedRendering", void 0);
34241
- // viewPoint: string;
34242
- // private posInfo: any;
34243
- //private doStream: boolean; Streaming over 3D Host is deprected
34244
- //private byteChunkArr: any;
34245
- //private byteChunkLayerMaskArr: any;
34246
- _defineProperty(this, "hasLayerMask", void 0);
34247
- //private imgBytes: any;
34248
- _defineProperty(this, "imgForSrc", void 0);
34249
- _defineProperty(this, "HQRenderingUrl", void 0);
34250
- _defineProperty(this, "SpinUrl", void 0);
34251
- _defineProperty(this, "ArUrl", void 0);
34252
- _defineProperty(this, "layerMaskAsBase64", void 0);
34253
- _defineProperty(this, "layerMaskThreeTexture", void 0);
34254
- _defineProperty(this, "isFullscreenRendering", void 0);
34255
- _defineProperty(this, "hasStaticBackground", void 0);
34256
- _defineProperty(this, "hasDimensionLines", void 0);
34257
- _defineProperty(this, "plannerMeasureDigits", void 0);
34258
- _defineProperty(this, "alternateRendererInfo", void 0);
34259
- _defineProperty(this, "isAlternateRendering", void 0);
34260
- _defineProperty(this, "alternateRenderingsExist", void 0);
34261
- _defineProperty(this, "mediaServiceSaveMode", void 0);
34262
- _defineProperty(this, "isLoadedFromCache", void 0);
34263
- _defineProperty(this, "catalogData", void 0);
34264
- //this.doStream = false;
34265
- this.planningHash = planningHash;
34266
- this.renderHash = renderHash;
34267
- this.renderWidth = width;
34268
- this.renderHeight = height;
34269
- this.uiInfo = '';
34270
- this.imgForSrc = '';
34271
- this.layerMaskAsBase64 = '';
34272
- this.isFullscreenRendering = isFullscreenRendering;
34273
- this.hasDimensionLines = hasDimensionLines;
34274
- this.plannerMeasureDigits = plannerMeasureDigits;
34275
- this.hasLayerMask = hasLayerMask;
34276
- this.creationTime = new Date();
34277
- this.layerMaskThreeTexture = undefined;
34278
- this.hasStaticBackground = hasStaticBG;
34279
- this.mediaServiceSaveMode = mediaServiceSaveMode;
34280
- this.urlToSavedRendering = '';
34281
- this.catalogData = {
34282
- catalogCodex: '',
34283
- catalogGUID: ''
34284
- };
34285
- this.isLoadedFromCache = false;
34286
- this.HQRenderingUrl = '';
34287
- this.SpinUrl = '';
34288
- this.ArUrl = '';
34289
- if (alternateRendererInfo != undefined) this.isAlternateRendering = true;else this.isAlternateRendering = false;
34290
- this.alternateRendererInfo = alternateRendererInfo;
34291
- this.alternateRenderingsExist = !!alternateRenderingsExist;
34292
- }
34293
- return _createClass(Rendering, [{
34294
- key: "clone",
34295
- value: function clone(rendering) {
34296
- this.planningHash = rendering.planningHash;
34297
- this.renderHash = rendering.renderHash;
34298
- this.creationTime = rendering.creationTime;
34299
- this.renderWidth = rendering.renderWidth;
34300
- this.renderHeight = rendering.renderHeight;
34301
- this.uiInfo = rendering.uiInfo;
34302
- this.urlToSavedRendering = rendering.urlToSavedRendering;
34303
- this.hasLayerMask = rendering.hasLayerMask;
34304
- this.imgForSrc = rendering.imgForSrc;
34305
- this.HQRenderingUrl = rendering.HQRenderingUrl;
34306
- this.layerMaskAsBase64 = rendering.layerMaskAsBase64;
34307
- this.layerMaskThreeTexture = rendering.layerMaskThreeTexture;
34308
- this.isFullscreenRendering = rendering.isFullscreenRendering;
34309
- this.hasStaticBackground = rendering.hasStaticBackground;
34310
- this.hasDimensionLines = rendering.hasDimensionLines;
34311
- this.plannerMeasureDigits = rendering.plannerMeasureDigits;
34312
- this.alternateRendererInfo = rendering.alternateRendererInfo;
34313
- this.isAlternateRendering = rendering.isAlternateRendering;
34314
- this.alternateRenderingsExist = rendering.alternateRenderingsExist;
34315
- this.mediaServiceSaveMode = rendering.mediaServiceSaveMode;
34316
- this.isLoadedFromCache = rendering.isLoadedFromCache;
34317
- this.catalogData = rendering.catalogData;
34318
- }
34319
- }, {
34320
- key: "getAllDockingPoints",
34321
- value: function getAllDockingPoints(setId, elementId) {
34322
- if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
34323
- return this.uiInfo['S1']['E' + elementId]['DP'];
34324
- }
34325
- return this.uiInfo[setId]['E' + elementId]['DP'];
34326
- }
34327
- }, {
34328
- key: "getHasStaticBackground",
34329
- value: function getHasStaticBackground() {
34330
- return this.hasStaticBackground;
34331
- }
34332
- }, {
34333
- key: "getIsFullscreenRendering",
34334
- value: function getIsFullscreenRendering() {
34335
- return this.isFullscreenRendering;
34336
- }
34337
- }, {
34338
- key: "setIsFullscreenRendering",
34339
- value: function setIsFullscreenRendering(isFullscreen) {
34340
- this.isFullscreenRendering = isFullscreen;
34341
- }
34342
- }, {
34343
- key: "getHasDimensionLines",
34344
- value: function getHasDimensionLines() {
34345
- return this.hasDimensionLines;
34346
- }
34347
- }, {
34348
- key: "getPlannerMeasureDigits",
34349
- value: function getPlannerMeasureDigits() {
34350
- return this.plannerMeasureDigits;
34351
- }
34352
- }, {
34353
- key: "getIsAlternateRendering",
34354
- value: function getIsAlternateRendering() {
34355
- return this.isAlternateRendering;
34356
- }
34357
- }, {
34358
- key: "getAlternateRenderInfo",
34359
- value: function getAlternateRenderInfo() {
34360
- return this.alternateRendererInfo;
34361
- }
34362
- }, {
34363
- key: "getAlternateRenderingsExist",
34364
- value: function getAlternateRenderingsExist() {
34365
- return this.alternateRenderingsExist;
34366
- }
34367
- }, {
34368
- key: "hasUIInfosOfElement",
34369
- value: function hasUIInfosOfElement(setId, elementid) {
34370
- if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
34371
- return this.uiInfo['S1']['E' + elementid] != undefined;
34372
- } else {
34373
- return this.uiInfo[setId] != undefined && this.uiInfo[setId]['E' + elementid] != undefined;
34374
- }
34375
- }
34376
- }, {
34377
- key: "getOutlinePolygonForSVG",
34378
- value: function getOutlinePolygonForSVG(setId, elementId, viewPortSize) {
34379
- var poly = [];
34380
- var avgCamDist = 0;
34381
- if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
34382
- poly = this.uiInfo['S1']['E' + elementId]['POLYOUTLINE'];
34383
- avgCamDist = this.uiInfo['S1']['E' + elementId]['AVGCAMDIST'];
34384
- } else if (this.uiInfo[setId]) {
34385
- poly = this.uiInfo[setId]['E' + elementId]['POLYOUTLINE'];
34386
- avgCamDist = this.uiInfo[setId]['E' + elementId]['AVGCAMDIST'];
34387
- } else {
34388
- poly = this.uiInfo['E' + elementId]['POLYOUTLINE'];
34389
- avgCamDist = this.uiInfo['E' + elementId]['AVGCAMDIST'];
34390
- }
34391
- if (!poly) return undefined;
34392
- var points = '';
34393
- for (var i = 0; i < poly.length; i++) {
34394
- points += Math.round(poly[i].x * 0.01 * viewPortSize.imgWidth) + ',' + Math.round((100 - poly[i].y) * 0.01 * viewPortSize.imgHeight) + ' ';
34395
- }
34396
- return {
34397
- points: points,
34398
- avgCamDist: avgCamDist
34399
- };
34400
- }
34401
-
34402
- //Left/Right_Bottom/Top_Back/Front
34403
- }, {
34404
- key: "getRightTopBackUIPos",
34405
- value: function getRightTopBackUIPos(setId, elemId) {
34406
- var bbox = null;
34407
- if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
34408
- bbox = this.uiInfo['S1']['E' + elemId]['BBOX3D'];
34409
- } else if (this.uiInfo[setId]) bbox = this.uiInfo[setId]['E' + elemId]['BBOX3D'];else bbox = this.uiInfo['E' + elemId]['BBOX3D'];
34410
- if (!bbox) return;
34411
- for (var i = 0; i < bbox.length; i++) {
34412
- if (bbox[i].C == 'RTB') {
34413
- return bbox[i];
34414
- }
34415
- }
34416
- }
34417
- //Left/Right_Bottom/Top_Back/Front
34418
- }, {
34419
- key: "getLeftTopBackUIPos",
34420
- value: function getLeftTopBackUIPos(setId, elemId) {
34421
- var bbox = null;
34422
- if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
34423
- bbox = this.uiInfo['S1']['E' + elemId]['BBOX3D'];
34424
- } else if (this.uiInfo[setId]) bbox = this.uiInfo[setId]['E' + elemId]['BBOX3D'];else bbox = this.uiInfo['E' + elemId]['BBOX3D'];
34425
- if (!bbox) return;
34426
- for (var i = 0; i < bbox.length; i++) {
34427
- if (bbox[i].C == 'LTB') {
34428
- return bbox[i];
34429
- }
34430
- }
34431
- }
34432
- //Left/Right_Bottom/Top_Back/Front
34433
- //elementId has to be a string because when working with accs in shelf planner an element id is the combination of parentElementId.rasterHeight.gridId
34434
- }, {
34435
- key: "getLeftBottomFrontUIPos",
34436
- value: function getLeftBottomFrontUIPos(setId, elemId) {
34437
- var bbox = null;
34438
- if (this.uiInfo == '') return null;
34439
- if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
34440
- if (!this.uiInfo['S1']['E' + elemId]) return;
34441
- bbox = this.uiInfo['S1']['E' + elemId]['BBOX3D'];
34442
- } else if (this.uiInfo[setId]) {
34443
- if (!this.uiInfo[setId]['E' + elemId]) return;
34444
- bbox = this.uiInfo[setId]['E' + elemId]['BBOX3D'];
34445
- } else {
34446
- var _this$uiInfo;
34447
- bbox = (_this$uiInfo = this.uiInfo['E' + elemId]) === null || _this$uiInfo === void 0 ? void 0 : _this$uiInfo['BBOX3D'];
34448
- }
34449
- if (!bbox) return;
34450
- for (var i = 0; i < bbox.length; i++) {
34451
- if (bbox[i].C == 'LBF') {
34452
- return bbox[i];
34453
- }
34454
- }
34455
- }
34456
- }, {
34457
- key: "getBoxPlannerCornerUIPos",
34458
- value: function getBoxPlannerCornerUIPos(setId, elemId, corner) {
34459
- var boxPlan = [];
34460
- if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
34461
- boxPlan = this.uiInfo['S1']['E' + elemId]['BoxPlan'];
34462
- } else if (this.uiInfo[setId]) boxPlan = this.uiInfo[setId]['E' + elemId]['BoxPlan'];else boxPlan = this.uiInfo['E' + elemId]['BoxPlan'];
34463
- for (var i = 0; i < boxPlan.length; i++) {
34464
- if (!boxPlan[i].N || !boxPlan[i].x || !boxPlan[i].y) continue;
34465
- switch (corner) {
34466
- case 'TOPCENTER':
34467
- if (boxPlan[i].N == 'TC') {
34468
- return new Vector2(Number(boxPlan[i].x), Number(boxPlan[i].y));
34469
- }
34470
- break;
34471
- case 'LEFTCENTER':
34472
- if (boxPlan[i].N == 'LC') {
34473
- return new Vector2(Number(boxPlan[i].x), Number(boxPlan[i].y));
34474
- }
34475
- break;
34476
- case 'RIGHTCENTER':
34477
- if (boxPlan[i].N == 'RC') {
34478
- return new Vector2(Number(boxPlan[i].x), Number(boxPlan[i].y));
34479
- }
34480
- break;
34481
- case 'RIGHTTOPFRONT':
34482
- if (boxPlan[i].N == 'RTF') {
34483
- return new Vector2(Number(boxPlan[i].x), Number(boxPlan[i].y));
34484
- }
34485
- break;
34486
- }
34487
- }
34488
- return undefined;
34489
- }
34490
- }, {
34491
- key: "getUnityCamPos",
34492
- value: function getUnityCamPos() {
34493
- return new Vector3(parseFloat(this.uiInfo['CAM']['X']), parseFloat(this.uiInfo['CAM']['Y']), parseFloat(this.uiInfo['CAM']['Z']));
34494
- }
34495
- }, {
34496
- key: "getUnityCamRot",
34497
- value: function getUnityCamRot() {
34498
- // return new Vector3(parseFloat(this.uiInfo["CAM"]["RX"]), parseFloat(this.uiInfo["CAM"]["RY"]), parseFloat(this.uiInfo["CAM"]["RZ"]));
34499
- var quatVec = new Vector4(parseFloat(this.uiInfo['CAM']['QX']), parseFloat(this.uiInfo['CAM']['QY']), parseFloat(this.uiInfo['CAM']['QZ']), parseFloat(this.uiInfo['CAM']['QW']));
34500
- return quatVec;
34501
- }
34502
- }, {
34503
- key: "getUnityFOV",
34504
- value: function getUnityFOV() {
34505
- return parseFloat(this.uiInfo['CAM']['FOV']);
34506
- }
34507
-
34508
- //elementId has to be a string because when working with accs in shelf planner an element id is the combination of parentElementId.rasterHeight.gridId
34509
- //It returns the distance of an element to the ground in cm
34510
- }, {
34511
- key: "getDistanceToGround",
34512
- value: function getDistanceToGround(setId, elementId) {
34513
- setId = this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined ? 'S1' : setId;
34514
- if (this.uiInfo[setId] && this.uiInfo[setId]['E' + elementId] && this.uiInfo[setId]['E' + elementId]['DIM'] && this.uiInfo[setId]['E' + elementId]['DIM']['dfg']) {
34515
- return this.uiInfo[setId]['E' + elementId]['DIM']['dfg'] * 100;
34516
- }
34517
- return -1;
34518
- }
34519
- }, {
34520
- key: "addUIInfo",
34521
- value: function addUIInfo(uiInfo) {
34522
- try {
34523
- this.uiInfo = JSON.parse(uiInfo);
34524
- //this.calcOutlinePolygon();
34525
- } catch (error) {
34526
- LOG$7.error(new DivaError('Error when parsing UI Info in rendering. Corrupt UIInfo: ' + uiInfo, {
34527
- code: 'WC_0013',
34528
- cause: error
34529
- }));
34530
- }
34531
- }
34532
-
34533
- /**
34534
- * This function adds a blobImage to the rendering .
34535
- * It is parsed to a base64 image.
34536
- * @param blob The blob contains the image
34537
- * @param isLayerMask True if the Image is the layer mask image
34538
- */
34539
- }, {
34540
- key: "addImgAsBlob",
34541
- value: function addImgAsBlob(buffer, isLayerMask) {
34542
- if (isLayerMask) this.layerMaskAsBase64 = buffer.toString('base64');else this.imgForSrc = 'data:image/jpeg;base64,' + buffer.toString('base64');
34543
- }
34544
-
34545
- //Write $("img.einBild").src
34546
- }, {
34547
- key: "getHQRenderingURL",
34548
- value: function getHQRenderingURL() {
34549
- return this.HQRenderingUrl;
34550
- }
34551
- }, {
34552
- key: "getArURl",
34553
- value: function getArURl() {
34554
- return this.ArUrl;
34555
- }
34556
- }, {
34557
- key: "getSpinURL",
34558
- value: function getSpinURL() {
34559
- return this.SpinUrl;
34560
- }
34561
- }, {
34562
- key: "getImageForSrc",
34563
- value: function getImageForSrc() {
34564
- return this.imgForSrc;
34565
- }
34566
- }, {
34567
- key: "containsSirvUrl",
34568
- value: function containsSirvUrl() {
34569
- return this.HQRenderingUrl != '';
34570
- }
34571
- }, {
34572
- key: "setArUrl",
34573
- value: function setArUrl(url) {
34574
- this.ArUrl = url;
34575
- }
34576
- }, {
34577
- key: "setSpinUrl",
34578
- value: function setSpinUrl(url) {
34579
- this.SpinUrl = url;
34580
- }
34581
- }, {
34582
- key: "setHQRenderingUrl",
34583
- value: function setHQRenderingUrl(url, useSirvViewer) {
34584
- if (useSirvViewer) {
34585
- this.HQRenderingUrl = url;
34586
- } else {
34587
- this.imgForSrc = url;
34588
- }
34589
- }
34590
-
34591
- //*****************************************GETTER und SETTER********************************************** */
34592
- }, {
34593
- key: "CatalogCodex",
34594
- get: function get() {
34595
- return this.catalogData.catalogCodex;
34596
- },
34597
- set: function set(val) {
34598
- this.catalogData.catalogCodex = val;
34599
- }
34600
- }, {
34601
- key: "CatalogGUID",
34602
- get: function get() {
34603
- return this.catalogData.catalogGUID;
34604
- },
34605
- set: function set(val) {
34606
- this.catalogData.catalogGUID = val;
34607
- }
34608
- }, {
34609
- key: "IsLoadedFromCache",
34610
- get: function get() {
34611
- return this.isLoadedFromCache;
34612
- },
34613
- set: function set(val) {
34614
- this.isLoadedFromCache = val;
34615
- }
34616
- }, {
34617
- key: "PlanningHash",
34618
- get: function get() {
34619
- return this.planningHash;
34620
- }
34621
- }, {
34622
- key: "RenderHash",
34623
- get: function get() {
34624
- return this.renderHash;
34625
- }
34626
- }, {
34627
- key: "UrlToSavedRendering",
34628
- get: function get() {
34629
- return this.urlToSavedRendering;
34630
- },
34631
- set: function set(url) {
34632
- this.urlToSavedRendering = url;
34633
- }
34634
- }, {
34635
- key: "HasLayerMask",
34636
- get: function get() {
34637
- return this.hasLayerMask;
34638
- },
34639
- set: function set(hasLayerMask) {
34640
- this.hasLayerMask = hasLayerMask;
34641
- }
34642
- }, {
34643
- key: "RenderWidth",
34644
- get: function get() {
34645
- return this.renderWidth;
34646
- }
34647
- }, {
34648
- key: "RenderHeight",
34649
- get: function get() {
34650
- return this.renderHeight;
34651
- }
34652
- }, {
34653
- key: "getHasLayerMask",
34654
- value: function getHasLayerMask() {
34655
- return this.hasLayerMask;
34656
- }
34657
- }, {
34658
- key: "getLayerMaskForSrc",
34659
- value: function getLayerMaskForSrc() {
34660
- return this.layerMaskAsBase64;
34661
- }
34662
- }, {
34663
- key: "HasLayerMaskThreeTexture",
34664
- get: function get() {
34665
- return this.layerMaskThreeTexture != undefined;
34666
- }
34667
- }, {
34668
- key: "LayerMaskThreeTexture",
34669
- get: function get() {
34670
- return this.layerMaskThreeTexture;
34671
- },
34672
- set: function set(tex) {
34673
- this.layerMaskThreeTexture = tex;
34674
- }
34675
- /*
34676
- get DoStream() {
34677
- return this.doStream;
34678
- }
34679
- */
34680
- }, {
34681
- key: "AllImgLoaded",
34682
- get: function get() {
34683
- return (this.imgForSrc != '' || this.HQRenderingUrl != '') && (!this.hasLayerMask || this.layerMaskAsBase64 != '');
34684
- }
34685
- }, {
34686
- key: "UiInfoLoaded",
34687
- get: function get() {
34688
- return this.uiInfo != '';
34689
- }
34690
- }, {
34691
- key: "CreationTime",
34692
- get: function get() {
34693
- return this.creationTime.getTime();
34694
- }
34695
- }, {
34696
- key: "MediaServiceSaveMode",
34697
- get: function get() {
34698
- return this.mediaServiceSaveMode;
34699
- },
34700
- set: function set(mode) {
34701
- this.mediaServiceSaveMode = mode;
34702
- }
34703
- }]);
34704
- }();
34705
-
34706
- function ownKeys$8(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; }
34707
- function _objectSpread$8(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$8(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$8(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
34708
- var LOG$6 = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
34709
34126
  var DivaBasketHandler = /*#__PURE__*/function () {
34710
34127
  function DivaBasketHandler(plannerConfig) {
34711
34128
  var _this = this,
@@ -34739,7 +34156,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
34739
34156
  this.assignNewDivaNr = !!this.plannerConfig.assignNewDivaNr;
34740
34157
  this._handler = plannerConfig.handler;
34741
34158
  if (this.plannerConfig.divaNr == undefined && this.plannerConfig.basketData == undefined && this.plannerConfig.catalogCodex == undefined && this.plannerConfig.productId == undefined && this.plannerConfig.customProductId == undefined && this.plannerConfig.returnTo != 'TEST_CONFIGURATORLOGIC' && !((_this$plannerConfig$s = this.plannerConfig.settings) !== null && _this$plannerConfig$s !== void 0 && (_this$plannerConfig$s = _this$plannerConfig$s.ViewConfig) !== null && _this$plannerConfig$s !== void 0 && (_this$plannerConfig$s = _this$plannerConfig$s.plannerType) !== null && _this$plannerConfig$s !== void 0 && _this$plannerConfig$s.includes('PRODUCTS') || (_this$plannerConfig$s2 = this.plannerConfig.settings) !== null && _this$plannerConfig$s2 !== void 0 && (_this$plannerConfig$s2 = _this$plannerConfig$s2.ViewConfig) !== null && _this$plannerConfig$s2 !== void 0 && (_this$plannerConfig$s2 = _this$plannerConfig$s2.plannerType) !== null && _this$plannerConfig$s2 !== void 0 && _this$plannerConfig$s2.includes('PROMOTED'))) {
34742
- LOG$6.error(new DivaError('Keine Öffnungsparameter', {
34159
+ LOG$7.error(new DivaError('Keine Öffnungsparameter', {
34743
34160
  code: 'WC_0003'
34744
34161
  }));
34745
34162
  }
@@ -34749,7 +34166,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
34749
34166
  }
34750
34167
  if ((_this$plannerConfig$a = this.plannerConfig.apiConfig) !== null && _this$plannerConfig$a !== void 0 && _this$plannerConfig$a.basketService) {
34751
34168
  var _this$plannerConfig$a2, _this$plannerConfig$a3;
34752
- this._basketHandler = new BasketHandler(LOG$6, (_this$plannerConfig$a2 = this.plannerConfig.apiConfig) === null || _this$plannerConfig$a2 === void 0 ? void 0 : _this$plannerConfig$a2.basketService, (_this$plannerConfig$a3 = this.plannerConfig.apiConfig) === null || _this$plannerConfig$a3 === void 0 ? void 0 : _this$plannerConfig$a3.api2["default"]);
34169
+ this._basketHandler = new BasketHandler(LOG$7, (_this$plannerConfig$a2 = this.plannerConfig.apiConfig) === null || _this$plannerConfig$a2 === void 0 ? void 0 : _this$plannerConfig$a2.basketService, (_this$plannerConfig$a3 = this.plannerConfig.apiConfig) === null || _this$plannerConfig$a3 === void 0 ? void 0 : _this$plannerConfig$a3.api2["default"]);
34753
34170
  }
34754
34171
  }
34755
34172
  return _createClass(DivaBasketHandler, [{
@@ -34802,13 +34219,13 @@ var DivaBasketHandler = /*#__PURE__*/function () {
34802
34219
  value: function () {
34803
34220
  var _initializeBasket = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(api) {
34804
34221
  var _this$plannerConfig$s3, _this$plannerConfig$s5, _api$getPlannerType, _this$plannerConfig$r;
34805
- var returnSuccessfully, divaNr, i, os, _params$customFieldsT, params, _this$plannerConfig$h, _this$plannerConfig$c, _this$plannerConfig$c2, _result$data$, result, _result$data$2, _this$plannerConfig$s4, _this$plannerConfig$a4, _api$getI18n, _api$getI18n2, successfully;
34222
+ var returnSuccessfully, divaNr, i, os, _params$customFieldsT, params, _this$plannerConfig$h, _this$plannerConfig$c, _this$plannerConfig$c2, _this$plannerConfig$c3, _result$data$, result, _result$data$2, _this$plannerConfig$s4, _this$plannerConfig$a4, _api$getI18n, _api$getI18n2, successfully;
34806
34223
  return _regeneratorRuntime.wrap(function _callee$(_context) {
34807
34224
  while (1) switch (_context.prev = _context.next) {
34808
34225
  case 0:
34809
34226
  this.basketWasSavedWithCurrentDocVersion = false;
34810
34227
  this.startProductId = undefined;
34811
- LOG$6.debug("Basket initialising. initObject is: '", this.plannerConfig, "' divaNr to load is: '" + this.loadDivaNr + "'");
34228
+ LOG$7.debug("Basket initialising. initObject is: '", this.plannerConfig, "' divaNr to load is: '" + this.loadDivaNr + "'");
34812
34229
  if (this.ignoreInitObjectWhenInitializing) {
34813
34230
  _context.next = 34;
34814
34231
  break;
@@ -34935,9 +34352,9 @@ var DivaBasketHandler = /*#__PURE__*/function () {
34935
34352
  op: 'eq',
34936
34353
  value: (_this$plannerConfig$c2 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c2 === void 0 ? void 0 : _this$plannerConfig$c2._id
34937
34354
  }, {
34938
- id: 'available',
34355
+ id: 'availableForOrganizations',
34939
34356
  op: 'eq',
34940
- value: true
34357
+ value: (_this$plannerConfig$c3 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c3 === void 0 ? void 0 : _this$plannerConfig$c3._id
34941
34358
  }]);
34942
34359
  case 60:
34943
34360
  result = _context.sent;
@@ -34974,7 +34391,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
34974
34391
  title: (_api$getI18n = api.getI18n()) === null || _api$getI18n === void 0 ? void 0 : _api$getI18n.t('configurator.no_startproduct_defined_title'),
34975
34392
  text: (_api$getI18n2 = api.getI18n()) === null || _api$getI18n2 === void 0 ? void 0 : _api$getI18n2.t('configurator.no_startproduct_defined_text')
34976
34393
  });
34977
- LOG$6.error(new DivaError('it is configured to initialize the startProductForOrganizations if there are no other parameters. But no available product was found with organizationId: "' + this.plannerConfig.currentOrganization._id + '" in the field: "startProductForOrganizations"!'));
34394
+ LOG$7.error(new DivaError('it is configured to initialize the startProductForOrganizations if there are no other parameters. But no available product was found with organizationId: "' + this.plannerConfig.currentOrganization._id + '" in the field: "startProductForOrganizations"!'));
34978
34395
  case 77:
34979
34396
  _context.next = 83;
34980
34397
  break;
@@ -35122,12 +34539,12 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35122
34539
  case 0:
35123
34540
  basketFromAPI = (_dataFromApi$basket = dataFromApi.basket) !== null && _dataFromApi$basket !== void 0 ? _dataFromApi$basket : dataFromApi.Basket; //evaluateRopoEffect(basketFromAPI,);
35124
34541
  if (origProductId) basketFromAPI.OrigProductId = origProductId;
35125
- basket = _objectSpread$8({}, basketFromAPI);
34542
+ basket = _objectSpread$7({}, basketFromAPI);
35126
34543
  if (!basketFromAPI) {
35127
- _context5.next = 50;
34544
+ _context5.next = 48;
35128
34545
  break;
35129
34546
  }
35130
- LOG$6.debug('divaNr: ' + divaNr + ' was loaded successfully from server!');
34547
+ LOG$7.debug('divaNr: ' + divaNr + ' was loaded successfully from server!');
35131
34548
  if (basketFromAPI.OrigDivaNr) {
35132
34549
  this.origConfiguration.originDivaNr = basketFromAPI.OrigDivaNr;
35133
34550
  } else if (basketFromAPI.OrigCatalogCodex) {
@@ -35221,20 +34638,14 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35221
34638
  this.baskets[newDivaNr] = new BasketData(basket);
35222
34639
  this.baskets[newDivaNr].clearRenderData();
35223
34640
  if (!keepOldDivaNr) this.divaNr = newDivaNr;
35224
- _context5.next = 46;
35225
- return DivaUtils.initCache({
35226
- accountGuid: this.baskets[newDivaNr].OrderSets[0].AccountGUID,
35227
- catalogCodex: this.baskets[newDivaNr].OrderSets[0].CatalogCodex
35228
- });
35229
- case 46:
35230
34641
  if (this.assignNewDivaNr) {
35231
34642
  this.baskets[newDivaNr].clearBasketClientData();
35232
34643
  this.baskets[newDivaNr].ProductSetName = '';
35233
34644
  }
35234
34645
  return _context5.abrupt("return", true);
35235
- case 50:
34646
+ case 48:
35236
34647
  return _context5.abrupt("return", false);
35237
- case 51:
34648
+ case 49:
35238
34649
  case "end":
35239
34650
  return _context5.stop();
35240
34651
  }
@@ -35268,7 +34679,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35268
34679
  key: "loadBasketByCatalogCodex",
35269
34680
  value: function () {
35270
34681
  var _loadBasketByCatalogCodex = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6(api) {
35271
- var _this$plannerConfig$s8, _this$actBasket$Order, _this$actBasket$Order2;
34682
+ var _this$plannerConfig$s8;
35272
34683
  var newBasket, _this$baskets$this$di;
35273
34684
  return _regeneratorRuntime.wrap(function _callee6$(_context6) {
35274
34685
  while (1) switch (_context6.prev = _context6.next) {
@@ -35279,37 +34690,23 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35279
34690
  if (this.plannerConfig.articleCodexes) {
35280
34691
  this.origConfiguration.originArticleCodexes = this.plannerConfig.articleCodexes;
35281
34692
  }
35282
- if (!(DivaUtils.CacheIsEnabled && DivaUtils.CacheAccountGuid)) {
34693
+ if (!((_this$plannerConfig$s8 = this.plannerConfig.startDivaNr) !== null && _this$plannerConfig$s8 !== void 0)) {
35283
34694
  _context6.next = 6;
35284
34695
  break;
35285
34696
  }
35286
- this.plannerConfig.accountGuid = DivaUtils.CacheAccountGuid;
35287
- _context6.next = 8;
34697
+ _context6.t0 = _this$plannerConfig$s8;
34698
+ _context6.next = 9;
35288
34699
  break;
35289
34700
  case 6:
35290
34701
  _context6.next = 8;
35291
- return DivaUtils.initCache({
35292
- accountGuid: this.plannerConfig.accountGuid,
35293
- catalogCodex: this.plannerConfig.catalogCodex
35294
- });
35295
- case 8:
35296
- if (!((_this$plannerConfig$s8 = this.plannerConfig.startDivaNr) !== null && _this$plannerConfig$s8 !== void 0)) {
35297
- _context6.next = 12;
35298
- break;
35299
- }
35300
- _context6.t0 = _this$plannerConfig$s8;
35301
- _context6.next = 15;
35302
- break;
35303
- case 12:
35304
- _context6.next = 14;
35305
34702
  return this.createNewDivaNr(api);
35306
- case 14:
34703
+ case 8:
35307
34704
  _context6.t0 = _context6.sent;
35308
- case 15:
34705
+ case 9:
35309
34706
  this.divaNr = _context6.t0;
35310
- _context6.next = 18;
34707
+ _context6.next = 12;
35311
34708
  return this.createNewBasket(api, this.plannerConfig, this.divaNr, api.getLanguage());
35312
- case 18:
34709
+ case 12:
35313
34710
  newBasket = _context6.sent;
35314
34711
  if (!this.plannerConfig.basketData) {
35315
34712
  this.baskets[this.divaNr] = newBasket;
@@ -35326,14 +34723,8 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35326
34723
  if (this.baskets[this.divaNr].SetPlannerInfos) ;
35327
34724
  }
35328
34725
  this.specificSetIdToLoad = this.plannerConfig.setId;
35329
- _context6.next = 23;
35330
- return DivaUtils.initCache({
35331
- accountGuid: (_this$actBasket$Order = this.actBasket.OrderSets[0]) === null || _this$actBasket$Order === void 0 ? void 0 : _this$actBasket$Order.AccountGUID,
35332
- catalogCodex: (_this$actBasket$Order2 = this.actBasket.OrderSets[0]) === null || _this$actBasket$Order2 === void 0 ? void 0 : _this$actBasket$Order2.CatalogCodex
35333
- });
35334
- case 23:
35335
34726
  return _context6.abrupt("return", true);
35336
- case 24:
34727
+ case 16:
35337
34728
  case "end":
35338
34729
  return _context6.stop();
35339
34730
  }
@@ -35364,7 +34755,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35364
34755
  case 9:
35365
34756
  _context7.prev = 9;
35366
34757
  _context7.t0 = _context7["catch"](0);
35367
- LOG$6.error(new DivaError('DivaNr konnte in der Datenbank nicht gefunden werden', {
34758
+ LOG$7.error(new DivaError('DivaNr konnte in der Datenbank nicht gefunden werden', {
35368
34759
  code: 'WC_0004',
35369
34760
  custom: {
35370
34761
  divaNr: divaNr
@@ -35400,7 +34791,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35400
34791
  _context8.next = 8;
35401
34792
  break;
35402
34793
  }
35403
- LOG$6.error(new DivaError('ProductId konnte in der Datenbank nicht gefunden werden', {
34794
+ LOG$7.error(new DivaError('ProductId konnte in der Datenbank nicht gefunden werden', {
35404
34795
  code: 'WC_0005',
35405
34796
  custom: {
35406
34797
  productId: productId
@@ -35484,7 +34875,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35484
34875
  _context10.next = 6;
35485
34876
  break;
35486
34877
  }
35487
- LOG$6.error(new DivaError('ProductId konnte in der Datenbank nicht gefunden werden', {
34878
+ LOG$7.error(new DivaError('ProductId konnte in der Datenbank nicht gefunden werden', {
35488
34879
  code: 'WC_0005',
35489
34880
  custom: {
35490
34881
  productId: productId
@@ -35521,8 +34912,8 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35521
34912
  CatalogGUID: initObject.catalogGuid,
35522
34913
  AccountGUID: initObject.accountGuid,
35523
34914
  Favorites: new Favorites()
35524
- }); //dont get session if cache is active (SuS)
35525
- if (!(initObject.accountGuid && !orderSet.AccountSessionGUID && !DivaUtils.cacheIsReady)) {
34915
+ });
34916
+ if (!(initObject.accountGuid && !orderSet.AccountSessionGUID)) {
35526
34917
  _context11.next = 5;
35527
34918
  break;
35528
34919
  }
@@ -35571,12 +34962,12 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35571
34962
  key: "saveToBasket",
35572
34963
  value: function () {
35573
34964
  var _saveToBasket = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee12(api, actBasket, returnTo) {
35574
- var _this$plannerConfig$c3, _this$_basketHandler, _api$getJwt;
34965
+ var _this$plannerConfig$c4, _this$_basketHandler, _api$getJwt;
35575
34966
  var response;
35576
34967
  return _regeneratorRuntime.wrap(function _callee12$(_context12) {
35577
34968
  while (1) switch (_context12.prev = _context12.next) {
35578
34969
  case 0:
35579
- LOG$6.startTransaction({
34970
+ LOG$7.startTransaction({
35580
34971
  event: 'SaveBasketOnAPI',
35581
34972
  eventId: 'SAVE_BASKET_ON_API',
35582
34973
  message: 'Save Basket on API'
@@ -35590,7 +34981,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35590
34981
  return DivaUtils.updateBasketOrgInfo(actBasket, this.plannerConfig.currentOrganization, this.plannerConfig.currentUser, this.plannerConfig.settings.keepSalesPersonDataInBasket);
35591
34982
  case 8:
35592
34983
  actBasket.UserLanguage = api.getLanguage();
35593
- actBasket.PrintRetailLogo = (_this$plannerConfig$c3 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c3 === void 0 ? void 0 : _this$plannerConfig$c3.logoUrl;
34984
+ actBasket.PrintRetailLogo = (_this$plannerConfig$c4 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c4 === void 0 ? void 0 : _this$plannerConfig$c4.logoUrl;
35594
34985
  _context12.next = 12;
35595
34986
  return (_this$_basketHandler = this._basketHandler) === null || _this$_basketHandler === void 0 ? void 0 : _this$_basketHandler.saveBasket({
35596
34987
  jwt: (_api$getJwt = api.getJwt()) !== null && _api$getJwt !== void 0 ? _api$getJwt : undefined,
@@ -35615,7 +35006,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35615
35006
  }
35616
35007
  return _context12.abrupt("return", response);
35617
35008
  case 19:
35618
- LOG$6.successTransaction('saveBasketOnAPI');
35009
+ LOG$7.successTransaction('saveBasketOnAPI');
35619
35010
  return _context12.abrupt("return", response === null || response === void 0 ? void 0 : response._id);
35620
35011
  case 21:
35621
35012
  case "end":
@@ -35721,7 +35112,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35721
35112
  if (_loop2()) continue;
35722
35113
  }
35723
35114
  var variantValues = article.VariantValuesParentOption;
35724
- var data = _objectSpread$8(_objectSpread$8({}, this.actBasket), {}, {
35115
+ var data = _objectSpread$7(_objectSpread$7({}, this.actBasket), {}, {
35725
35116
  changedValues: changedValues,
35726
35117
  variantValues: variantValues,
35727
35118
  isInit: isInit,
@@ -35746,7 +35137,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35746
35137
  break;
35747
35138
  case 3:
35748
35139
  _context13.next = 5;
35749
- return import('./PfisterWWSHandler-21e4c2f3.js');
35140
+ return import('./PfisterWWSHandler-1e137ace.js');
35750
35141
  case 5:
35751
35142
  _yield$import = _context13.sent;
35752
35143
  PfisterWWSHandler = _yield$import["default"];
@@ -35754,7 +35145,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35754
35145
  return _context13.abrupt("break", 33);
35755
35146
  case 9:
35756
35147
  _context13.next = 11;
35757
- return import('./LiviqueWWSHandler-28edc334.js');
35148
+ return import('./LiviqueWWSHandler-bba79129.js');
35758
35149
  case 11:
35759
35150
  _yield$import2 = _context13.sent;
35760
35151
  LiviqueWWSHandler = _yield$import2["default"];
@@ -35762,7 +35153,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35762
35153
  return _context13.abrupt("break", 33);
35763
35154
  case 15:
35764
35155
  _context13.next = 17;
35765
- return import('./SeriousBasketHandler-2e0ab157.js');
35156
+ return import('./SeriousBasketHandler-cdc26222.js');
35766
35157
  case 17:
35767
35158
  _yield$import3 = _context13.sent;
35768
35159
  SeriousWWSHandler = _yield$import3["default"];
@@ -35770,7 +35161,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35770
35161
  return _context13.abrupt("break", 33);
35771
35162
  case 21:
35772
35163
  _context13.next = 23;
35773
- return import('./ProductBasketHandler-fa0c1a9e.js');
35164
+ return import('./ProductBasketHandler-68455ac4.js');
35774
35165
  case 23:
35775
35166
  _yield$import4 = _context13.sent;
35776
35167
  ProductWWSHandler = _yield$import4["default"];
@@ -35778,7 +35169,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35778
35169
  return _context13.abrupt("break", 33);
35779
35170
  case 27:
35780
35171
  _context13.next = 29;
35781
- return import('./StandardWWSHandler-72ea1ffc.js');
35172
+ return import('./StandardWWSHandler-5b7ca10e.js');
35782
35173
  case 29:
35783
35174
  _yield$import5 = _context13.sent;
35784
35175
  StandardWWSHandler = _yield$import5["default"];
@@ -35809,43 +35200,43 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35809
35200
  //if no shopType is set in parent organization, no ropo effekt
35810
35201
  if (!organization.shopType) return;
35811
35202
  if (organization.shopType == 'store' && sourceOrganizationId.shopType == 'store') {
35812
- var _this$plannerConfig$c4;
35813
- LOG$6.businessEvent('ropoEffectStoreToStore', 'Seller', 'Evaluating the ROPO Effect Store To Store', {
35814
- sourceDivaNr: sourceBasket.DivaNr,
35815
- sourceOrgId: sourceOrganizationId.id,
35816
- targetOrgId: (_this$plannerConfig$c4 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c4 === void 0 ? void 0 : _this$plannerConfig$c4._id
35817
- });
35818
- } else if (organization.shopType == 'webshop' && sourceOrganizationId.shopType == 'webshop') {
35819
35203
  var _this$plannerConfig$c5;
35820
- LOG$6.businessEvent('ropoEffectWebToWeb', 'Seller', 'Evaluating the ROPO Effect Web To Web', {
35204
+ LOG$7.businessEvent('ropoEffectStoreToStore', 'Seller', 'Evaluating the ROPO Effect Store To Store', {
35821
35205
  sourceDivaNr: sourceBasket.DivaNr,
35822
35206
  sourceOrgId: sourceOrganizationId.id,
35823
35207
  targetOrgId: (_this$plannerConfig$c5 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c5 === void 0 ? void 0 : _this$plannerConfig$c5._id
35824
35208
  });
35825
- } else if (organization.shopType == 'store' && sourceOrganizationId.shopType == 'webshop') {
35209
+ } else if (organization.shopType == 'webshop' && sourceOrganizationId.shopType == 'webshop') {
35826
35210
  var _this$plannerConfig$c6;
35827
- LOG$6.businessEvent('ropoEffectStoreToWeb', 'Seller', 'Evaluating the ROPO Effect Web To Store', {
35211
+ LOG$7.businessEvent('ropoEffectWebToWeb', 'Seller', 'Evaluating the ROPO Effect Web To Web', {
35828
35212
  sourceDivaNr: sourceBasket.DivaNr,
35829
35213
  sourceOrgId: sourceOrganizationId.id,
35830
35214
  targetOrgId: (_this$plannerConfig$c6 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c6 === void 0 ? void 0 : _this$plannerConfig$c6._id
35831
35215
  });
35832
- } else if (organization.shopType == 'webshop' && sourceOrganizationId.shopType == 'store') {
35216
+ } else if (organization.shopType == 'store' && sourceOrganizationId.shopType == 'webshop') {
35833
35217
  var _this$plannerConfig$c7;
35834
- LOG$6.businessEvent('ropoEffectWebToStore', 'Seller', 'Evaluating the ROPO Effect Store To Web', {
35218
+ LOG$7.businessEvent('ropoEffectStoreToWeb', 'Seller', 'Evaluating the ROPO Effect Web To Store', {
35835
35219
  sourceDivaNr: sourceBasket.DivaNr,
35836
35220
  sourceOrgId: sourceOrganizationId.id,
35837
35221
  targetOrgId: (_this$plannerConfig$c7 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c7 === void 0 ? void 0 : _this$plannerConfig$c7._id
35838
35222
  });
35223
+ } else if (organization.shopType == 'webshop' && sourceOrganizationId.shopType == 'store') {
35224
+ var _this$plannerConfig$c8;
35225
+ LOG$7.businessEvent('ropoEffectWebToStore', 'Seller', 'Evaluating the ROPO Effect Store To Web', {
35226
+ sourceDivaNr: sourceBasket.DivaNr,
35227
+ sourceOrgId: sourceOrganizationId.id,
35228
+ targetOrgId: (_this$plannerConfig$c8 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c8 === void 0 ? void 0 : _this$plannerConfig$c8._id
35229
+ });
35839
35230
  }
35840
35231
  } catch (e) {
35841
- var _this$plannerConfig$c8;
35842
- LOG$6.error(new DivaError('Error on Evaluating ROPO Effect', {
35232
+ var _this$plannerConfig$c9;
35233
+ LOG$7.error(new DivaError('Error on Evaluating ROPO Effect', {
35843
35234
  code: 'SELLER_0006',
35844
35235
  cause: e,
35845
35236
  custom: {
35846
35237
  sourceDivaNr: sourceBasket.DivaNr,
35847
35238
  sourceOrgId: sourceOrganizationId,
35848
- targetOrgId: (_this$plannerConfig$c8 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c8 === void 0 ? void 0 : _this$plannerConfig$c8._id
35239
+ targetOrgId: (_this$plannerConfig$c9 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c9 === void 0 ? void 0 : _this$plannerConfig$c9._id
35849
35240
  }
35850
35241
  }));
35851
35242
  }
@@ -35853,7 +35244,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35853
35244
  }]);
35854
35245
  }();
35855
35246
 
35856
- var LOG$5 = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
35247
+ var LOG$6 = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
35857
35248
  var ViewPointHandler = /*#__PURE__*/function () {
35858
35249
  function ViewPointHandler() {
35859
35250
  _classCallCheck(this, ViewPointHandler);
@@ -36076,22 +35467,22 @@ var ViewPointHandler = /*#__PURE__*/function () {
36076
35467
  var roomListObj = JSON.parse(roomlist);
36077
35468
  var roomIsSel = true;
36078
35469
  for (var roomCodex in roomListObj) {
36079
- LOG$5.debug('Successfully Init roomList with Codex ' + roomCodex, 'ViewPointHandler - initRoomList');
35470
+ LOG$6.debug('Successfully Init roomList with Codex ' + roomCodex, 'ViewPointHandler - initRoomList');
36080
35471
  var curRoom = roomListObj[roomCodex];
36081
35472
  var mainCategory = '#WG#';
36082
35473
  if (!this.staticRoomMainCategories.has(roomCodex)) {
36083
- LOG$5.error(new DivaError('Error when parsing preview URL for a viewPoint. Please add a retailerMainCategory for this catalog in the CE!', {
35474
+ LOG$6.error(new DivaError('Error when parsing preview URL for a viewPoint. Please add a retailerMainCategory for this catalog in the CE!', {
36084
35475
  code: 'WC_0013'
36085
35476
  }));
36086
35477
  } else {
36087
35478
  var categories = this.staticRoomMainCategories.get(roomCodex);
36088
35479
  if (categories.length == 0) {
36089
- LOG$5.error(new DivaError('Error when parsing preview URL for a viewPoint. Please add a retailerMainCategory for this catalog in the CE!', {
35480
+ LOG$6.error(new DivaError('Error when parsing preview URL for a viewPoint. Please add a retailerMainCategory for this catalog in the CE!', {
36090
35481
  code: 'WC_0013'
36091
35482
  }));
36092
35483
  } else {
36093
35484
  if (categories.length > 1) {
36094
- LOG$5.error(new DivaError('Error when parsing preview URL for a viewPoint. There is more than one Catalog loaded. Decide a strategy which mainCategory should be taken!', {
35485
+ LOG$6.error(new DivaError('Error when parsing preview URL for a viewPoint. There is more than one Catalog loaded. Decide a strategy which mainCategory should be taken!', {
36095
35486
  code: 'WC_0013'
36096
35487
  }));
36097
35488
  }
@@ -36105,7 +35496,7 @@ var ViewPointHandler = /*#__PURE__*/function () {
36105
35496
  previewUrl = previewUrl.replace('#WG#', mainCategory);
36106
35497
  }
36107
35498
  if (curRoom.VP[i].R && curRoom.VP[i].R.indexOf(':') == -1) {
36108
- LOG$5.error(new DivaError('The background has a custom width and custom height. However it is not formatted correctly. the width and height must be separated with ":" : ' + curRoom.VP[i].R, {
35499
+ LOG$6.error(new DivaError('The background has a custom width and custom height. However it is not formatted correctly. the width and height must be separated with ":" : ' + curRoom.VP[i].R, {
36109
35500
  code: 'WC_0013'
36110
35501
  }));
36111
35502
  }
@@ -36203,7 +35594,7 @@ var ViewPointHandler = /*#__PURE__*/function () {
36203
35594
  this.navInfo3D.rotVert = 0;
36204
35595
  this.navInfo3D.rotHori = 0;
36205
35596
  } else {
36206
- LOG$5.debug('There is no static frontend viewpoint room: ' + roomCodex);
35597
+ LOG$6.debug('There is no static frontend viewpoint room: ' + roomCodex);
36207
35598
  }
36208
35599
  } else if (this.curRoomCodex == roominfo.codex) {
36209
35600
  roominfo.sel = false;
@@ -36348,207 +35739,415 @@ var ViewPointHandler = /*#__PURE__*/function () {
36348
35739
  }]);
36349
35740
  }();
36350
35741
 
36351
- function ownKeys$7(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; }
36352
- function _objectSpread$7(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$7(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$7(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
36353
- var LOG$4 = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
36354
- var DivaMediaServiceHandler = /*#__PURE__*/function () {
36355
- //-------------------------------------------------- INITIALIZATION--------------------------------------------------------------//
36356
-
36357
- function DivaMediaServiceHandler() {
36358
- _classCallCheck(this, DivaMediaServiceHandler);
36359
- _defineProperty(this, "organizationId", void 0);
36360
- _defineProperty(this, "mediaServiceUrl", void 0);
36361
- _defineProperty(this, "mediaServiceApiKey", void 0);
36362
- _defineProperty(this, "jwt", void 0);
36363
- _defineProperty(this, "POST_saveTmp2PermanentPostfix", '/saveTmp2Permanent');
36364
- _defineProperty(this, "GET_MediaItemrefs", '/v1/mediaitems/refs?limit=20&skip=0&filter=');
36365
- _defineProperty(this, "POST_mediaItem", '/v1/mediaitems?ref=true');
36366
- this.organizationId = '';
36367
- this.mediaServiceUrl = '';
36368
- this.mediaServiceApiKey = '';
35742
+ //This class saves all informations needed for a rendering
35743
+ var LOG$5 = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
35744
+ var Rendering = /*#__PURE__*/function () {
35745
+ function Rendering(planningHash, renderHash, viewPointName, width, height, isFullscreenRendering, hasDimensionLines, plannerMeasureDigits, hasLayerMask, hasStaticBG, mediaServiceSaveMode, alternateRenderingsExist, alternateRendererInfo) {
35746
+ _classCallCheck(this, Rendering);
35747
+ _defineProperty(this, "planningHash", void 0);
35748
+ _defineProperty(this, "renderHash", void 0);
35749
+ _defineProperty(this, "creationTime", void 0);
35750
+ _defineProperty(this, "renderWidth", void 0);
35751
+ _defineProperty(this, "renderHeight", void 0);
35752
+ _defineProperty(this, "uiInfo", void 0);
35753
+ _defineProperty(this, "urlToSavedRendering", void 0);
35754
+ // viewPoint: string;
35755
+ // private posInfo: any;
35756
+ //private doStream: boolean; Streaming over 3D Host is deprected
35757
+ //private byteChunkArr: any;
35758
+ //private byteChunkLayerMaskArr: any;
35759
+ _defineProperty(this, "hasLayerMask", void 0);
35760
+ //private imgBytes: any;
35761
+ _defineProperty(this, "imgForSrc", void 0);
35762
+ _defineProperty(this, "layerMaskAsBase64", void 0);
35763
+ _defineProperty(this, "layerMaskThreeTexture", void 0);
35764
+ _defineProperty(this, "isFullscreenRendering", void 0);
35765
+ _defineProperty(this, "hasStaticBackground", void 0);
35766
+ _defineProperty(this, "hasDimensionLines", void 0);
35767
+ _defineProperty(this, "plannerMeasureDigits", void 0);
35768
+ _defineProperty(this, "alternateRendererInfo", void 0);
35769
+ _defineProperty(this, "isAlternateRendering", void 0);
35770
+ _defineProperty(this, "alternateRenderingsExist", void 0);
35771
+ _defineProperty(this, "mediaServiceSaveMode", void 0);
35772
+ _defineProperty(this, "catalogData", void 0);
35773
+ this.planningHash = planningHash;
35774
+ this.renderHash = renderHash;
35775
+ this.renderWidth = width;
35776
+ this.renderHeight = height;
35777
+ this.uiInfo = '';
35778
+ this.imgForSrc = '';
35779
+ this.layerMaskAsBase64 = '';
35780
+ this.isFullscreenRendering = isFullscreenRendering;
35781
+ this.hasDimensionLines = hasDimensionLines;
35782
+ this.plannerMeasureDigits = plannerMeasureDigits;
35783
+ this.hasLayerMask = hasLayerMask;
35784
+ this.creationTime = new Date();
35785
+ this.layerMaskThreeTexture = undefined;
35786
+ this.hasStaticBackground = hasStaticBG;
35787
+ this.mediaServiceSaveMode = mediaServiceSaveMode;
35788
+ this.urlToSavedRendering = '';
35789
+ this.catalogData = {
35790
+ catalogCodex: '',
35791
+ catalogGUID: ''
35792
+ };
35793
+ if (alternateRendererInfo != undefined) this.isAlternateRendering = true;else this.isAlternateRendering = false;
35794
+ this.alternateRendererInfo = alternateRendererInfo;
35795
+ this.alternateRenderingsExist = !!alternateRenderingsExist;
36369
35796
  }
36370
- return _createClass(DivaMediaServiceHandler, [{
36371
- key: "setOrganizationId",
36372
- value: function setOrganizationId(organizationId) {
36373
- this.organizationId = organizationId;
35797
+ return _createClass(Rendering, [{
35798
+ key: "clone",
35799
+ value: function clone(rendering) {
35800
+ this.planningHash = rendering.planningHash;
35801
+ this.renderHash = rendering.renderHash;
35802
+ this.creationTime = rendering.creationTime;
35803
+ this.renderWidth = rendering.renderWidth;
35804
+ this.renderHeight = rendering.renderHeight;
35805
+ this.uiInfo = rendering.uiInfo;
35806
+ this.urlToSavedRendering = rendering.urlToSavedRendering;
35807
+ this.hasLayerMask = rendering.hasLayerMask;
35808
+ this.imgForSrc = rendering.imgForSrc;
35809
+ this.layerMaskAsBase64 = rendering.layerMaskAsBase64;
35810
+ this.layerMaskThreeTexture = rendering.layerMaskThreeTexture;
35811
+ this.isFullscreenRendering = rendering.isFullscreenRendering;
35812
+ this.hasStaticBackground = rendering.hasStaticBackground;
35813
+ this.hasDimensionLines = rendering.hasDimensionLines;
35814
+ this.plannerMeasureDigits = rendering.plannerMeasureDigits;
35815
+ this.alternateRendererInfo = rendering.alternateRendererInfo;
35816
+ this.isAlternateRendering = rendering.isAlternateRendering;
35817
+ this.alternateRenderingsExist = rendering.alternateRenderingsExist;
35818
+ this.mediaServiceSaveMode = rendering.mediaServiceSaveMode;
35819
+ this.catalogData = rendering.catalogData;
36374
35820
  }
36375
35821
  }, {
36376
- key: "setMediaServiceUrl",
36377
- value: function setMediaServiceUrl(mediaServiceUrl) {
36378
- this.mediaServiceUrl = mediaServiceUrl;
35822
+ key: "getAllDockingPoints",
35823
+ value: function getAllDockingPoints(setId, elementId) {
35824
+ if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
35825
+ return this.uiInfo['S1']['E' + elementId]['DP'];
35826
+ }
35827
+ return this.uiInfo[setId]['E' + elementId]['DP'];
36379
35828
  }
36380
35829
  }, {
36381
- key: "setMediaServiceApiKey",
36382
- value: function setMediaServiceApiKey(mediaServiceApiKey) {
36383
- this.mediaServiceApiKey = mediaServiceApiKey;
35830
+ key: "getHasStaticBackground",
35831
+ value: function getHasStaticBackground() {
35832
+ return this.hasStaticBackground;
36384
35833
  }
36385
35834
  }, {
36386
- key: "setJwt",
36387
- value: function setJwt(jwt) {
36388
- this.jwt = jwt;
35835
+ key: "getIsFullscreenRendering",
35836
+ value: function getIsFullscreenRendering() {
35837
+ return this.isFullscreenRendering;
36389
35838
  }
36390
35839
  }, {
36391
- key: "loadRenderingFromCache",
36392
- value: function () {
36393
- var _loadRenderingFromCache = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(hash) {
36394
- var logOnError,
36395
- url,
36396
- response,
36397
- error,
36398
- result,
36399
- _args = arguments;
36400
- return _regeneratorRuntime.wrap(function _callee$(_context) {
36401
- while (1) switch (_context.prev = _context.next) {
36402
- case 0:
36403
- logOnError = _args.length > 1 && _args[1] !== undefined ? _args[1] : true;
36404
- LOG$4.startTransaction({
36405
- event: 'onRequestRendering',
36406
- message: 'Requesting Rendering',
36407
- eventId: 'ON_REQUEST_RENDERING',
36408
- warningTime: 2000,
36409
- errorTime: 4000,
36410
- labels: {}
36411
- });
36412
- url = this.mediaServiceUrl + this.GET_MediaItemrefs + '%5B%7Bhash%2Ceq%2C' + hash + '%7D%2C%7BorganizationId%2Ceq%2C' + this.organizationId + '%7D%5D';
36413
- LOG$4.debug('Try load Rendering from Cache. hash: ' + hash);
36414
- _context.next = 6;
36415
- return fetch(url, {
36416
- method: 'GET',
36417
- mode: 'cors',
36418
- headers: _objectSpread$7({}, this.jwt ? {
36419
- authorization: "Bearer ".concat(this.jwt)
36420
- } : {
36421
- 'X-API-KEY': this.mediaServiceApiKey
36422
- })
36423
- });
36424
- case 6:
36425
- response = _context.sent;
36426
- error = false;
36427
- if (!response.ok) {
36428
- _context.next = 20;
36429
- break;
36430
- }
36431
- _context.next = 11;
36432
- return response.json();
36433
- case 11:
36434
- result = _context.sent;
36435
- if (!(result.data.length > 0)) {
36436
- _context.next = 17;
36437
- break;
36438
- }
36439
- LOG$4.successTransaction('ON_REQUEST_RENDERING', {});
36440
- return _context.abrupt("return", result.data[0].url);
36441
- case 17:
36442
- error = true;
36443
- case 18:
36444
- _context.next = 21;
36445
- break;
36446
- case 20:
36447
- error = true;
36448
- case 21:
36449
- if (error && logOnError) {
36450
- LOG$4.errorTransaction('ON_REQUEST_RENDERING', 'WC_0015', 'loadRenderingFromCache not found (functionType C3D). Load rendering from Cache not successfull. Hash: ' + hash + 'response: ' + response);
36451
- }
36452
- LOG$4.successTransaction('ON_REQUEST_RENDERING', {});
36453
- return _context.abrupt("return", '');
36454
- case 24:
36455
- case "end":
36456
- return _context.stop();
36457
- }
36458
- }, _callee, this);
36459
- }));
36460
- function loadRenderingFromCache(_x) {
36461
- return _loadRenderingFromCache.apply(this, arguments);
35840
+ key: "setIsFullscreenRendering",
35841
+ value: function setIsFullscreenRendering(isFullscreen) {
35842
+ this.isFullscreenRendering = isFullscreen;
35843
+ }
35844
+ }, {
35845
+ key: "getHasDimensionLines",
35846
+ value: function getHasDimensionLines() {
35847
+ return this.hasDimensionLines;
35848
+ }
35849
+ }, {
35850
+ key: "getPlannerMeasureDigits",
35851
+ value: function getPlannerMeasureDigits() {
35852
+ return this.plannerMeasureDigits;
35853
+ }
35854
+ }, {
35855
+ key: "getIsAlternateRendering",
35856
+ value: function getIsAlternateRendering() {
35857
+ return this.isAlternateRendering;
35858
+ }
35859
+ }, {
35860
+ key: "getAlternateRenderInfo",
35861
+ value: function getAlternateRenderInfo() {
35862
+ return this.alternateRendererInfo;
35863
+ }
35864
+ }, {
35865
+ key: "getAlternateRenderingsExist",
35866
+ value: function getAlternateRenderingsExist() {
35867
+ return this.alternateRenderingsExist;
35868
+ }
35869
+ }, {
35870
+ key: "hasUIInfosOfElement",
35871
+ value: function hasUIInfosOfElement(setId, elementid) {
35872
+ if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
35873
+ return this.uiInfo['S1']['E' + elementid] != undefined;
35874
+ } else {
35875
+ return this.uiInfo[setId] != undefined && this.uiInfo[setId]['E' + elementid] != undefined;
36462
35876
  }
36463
- return loadRenderingFromCache;
36464
- }()
35877
+ }
36465
35878
  }, {
36466
- key: "base64ToBlob",
36467
- value: function base64ToBlob(base64String, hash) {
36468
- DivaUtils.startSpanOfApm('MediaServiceHandler base64ToBlob');
36469
- if (base64String.startsWith('data:image/jpeg;base64,')) {
36470
- base64String = base64String.replace('data:image/jpeg;base64,', '');
35879
+ key: "getOutlinePolygonForSVG",
35880
+ value: function getOutlinePolygonForSVG(setId, elementId, viewPortSize) {
35881
+ var poly = [];
35882
+ var avgCamDist = 0;
35883
+ if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
35884
+ poly = this.uiInfo['S1']['E' + elementId]['POLYOUTLINE'];
35885
+ avgCamDist = this.uiInfo['S1']['E' + elementId]['AVGCAMDIST'];
35886
+ } else if (this.uiInfo[setId]) {
35887
+ poly = this.uiInfo[setId]['E' + elementId]['POLYOUTLINE'];
35888
+ avgCamDist = this.uiInfo[setId]['E' + elementId]['AVGCAMDIST'];
35889
+ } else {
35890
+ poly = this.uiInfo['E' + elementId]['POLYOUTLINE'];
35891
+ avgCamDist = this.uiInfo['E' + elementId]['AVGCAMDIST'];
36471
35892
  }
36472
- var binary_string = window.atob(base64String);
36473
- var len = binary_string.length;
36474
- var bytes = new Uint8Array(len);
36475
- for (var i = 0; i < len; i++) {
36476
- bytes[i] = binary_string.charCodeAt(i);
35893
+ if (!poly) return undefined;
35894
+ var points = '';
35895
+ for (var i = 0; i < poly.length; i++) {
35896
+ points += Math.round(poly[i].x * 0.01 * viewPortSize.imgWidth) + ',' + Math.round((100 - poly[i].y) * 0.01 * viewPortSize.imgHeight) + ' ';
36477
35897
  }
36478
- var blob = new File([bytes.buffer], hash + '.jpg', {
36479
- type: 'image/jpeg'
36480
- });
36481
- DivaUtils.endSpanOfApm('MediaServiceHandler base64ToBlob');
36482
- return blob;
35898
+ return {
35899
+ points: points,
35900
+ avgCamDist: avgCamDist
35901
+ };
36483
35902
  }
35903
+
35904
+ //Left/Right_Bottom/Top_Back/Front
36484
35905
  }, {
36485
- key: "savePlanning2DPermanent",
36486
- value: function () {
36487
- var _savePlanning2DPermanent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(hash, catalogCodex, catalogGUID, planning2DAsJPG) {
36488
- var imageBlob, url, data, mediaItem, mediaItemRef, response, res;
36489
- return _regeneratorRuntime.wrap(function _callee2$(_context2) {
36490
- while (1) switch (_context2.prev = _context2.next) {
36491
- case 0:
36492
- DivaUtils.startSpanOfApm('MediaServiceHandler savePlanning2DPermanent');
36493
- imageBlob = this.base64ToBlob(planning2DAsJPG, hash);
36494
- url = this.mediaServiceUrl + this.POST_mediaItem; //push media item return url
36495
- //create media item ref and set same paramters
36496
- data = new FormData();
36497
- data.append('file', imageBlob);
36498
- mediaItem = {
36499
- organizationId: this.organizationId,
36500
- mediaType: 'PCT',
36501
- fileName: hash + '.jpg'
36502
- };
36503
- data.append('mediaItem', JSON.stringify(mediaItem));
36504
- mediaItemRef = {
36505
- functionType: 'P2D',
36506
- planningHash: hash,
36507
- catalogCodex: catalogCodex,
36508
- catalogGuid: catalogGUID
36509
- };
36510
- data.append('mediaItemRef', JSON.stringify(mediaItemRef));
36511
- _context2.next = 11;
36512
- return fetch(url, {
36513
- method: 'POST',
36514
- body: data,
36515
- headers: {
36516
- 'X-API-KEY': this.mediaServiceApiKey
36517
- }
36518
- });
36519
- case 11:
36520
- response = _context2.sent;
36521
- if (!response.ok) {
36522
- _context2.next = 20;
36523
- break;
36524
- }
36525
- _context2.next = 15;
36526
- return response.json();
36527
- case 15:
36528
- res = _context2.sent;
36529
- LOG$4.debug('Successfully saved 2D Planning in media Service. URL: ' + res.url);
36530
- return _context2.abrupt("return", res.url);
36531
- case 20:
36532
- LOG$4.error(new DivaError('Error when saving the Planning2D image on mediaService. Hash: ' + hash + 'response: ' + response, {
36533
- code: 'WC_0016'
36534
- }));
36535
- case 21:
36536
- DivaUtils.endSpanOfApm('MediaServiceHandler savePlanning2DPermanent');
36537
- return _context2.abrupt("return", '');
36538
- case 23:
36539
- case "end":
36540
- return _context2.stop();
36541
- }
36542
- }, _callee2, this);
36543
- }));
36544
- function savePlanning2DPermanent(_x2, _x3, _x4, _x5) {
36545
- return _savePlanning2DPermanent.apply(this, arguments);
35906
+ key: "getRightTopBackUIPos",
35907
+ value: function getRightTopBackUIPos(setId, elemId) {
35908
+ var bbox = null;
35909
+ if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
35910
+ bbox = this.uiInfo['S1']['E' + elemId]['BBOX3D'];
35911
+ } else if (this.uiInfo[setId]) bbox = this.uiInfo[setId]['E' + elemId]['BBOX3D'];else bbox = this.uiInfo['E' + elemId]['BBOX3D'];
35912
+ if (!bbox) return;
35913
+ for (var i = 0; i < bbox.length; i++) {
35914
+ if (bbox[i].C == 'RTB') {
35915
+ return bbox[i];
35916
+ }
36546
35917
  }
36547
- return savePlanning2DPermanent;
36548
- }()
35918
+ }
35919
+ //Left/Right_Bottom/Top_Back/Front
35920
+ }, {
35921
+ key: "getLeftTopBackUIPos",
35922
+ value: function getLeftTopBackUIPos(setId, elemId) {
35923
+ var bbox = null;
35924
+ if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
35925
+ bbox = this.uiInfo['S1']['E' + elemId]['BBOX3D'];
35926
+ } else if (this.uiInfo[setId]) bbox = this.uiInfo[setId]['E' + elemId]['BBOX3D'];else bbox = this.uiInfo['E' + elemId]['BBOX3D'];
35927
+ if (!bbox) return;
35928
+ for (var i = 0; i < bbox.length; i++) {
35929
+ if (bbox[i].C == 'LTB') {
35930
+ return bbox[i];
35931
+ }
35932
+ }
35933
+ }
35934
+ //Left/Right_Bottom/Top_Back/Front
35935
+ //elementId has to be a string because when working with accs in shelf planner an element id is the combination of parentElementId.rasterHeight.gridId
35936
+ }, {
35937
+ key: "getLeftBottomFrontUIPos",
35938
+ value: function getLeftBottomFrontUIPos(setId, elemId) {
35939
+ var bbox = null;
35940
+ if (this.uiInfo == '') return null;
35941
+ if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
35942
+ if (!this.uiInfo['S1']['E' + elemId]) return;
35943
+ bbox = this.uiInfo['S1']['E' + elemId]['BBOX3D'];
35944
+ } else if (this.uiInfo[setId]) {
35945
+ if (!this.uiInfo[setId]['E' + elemId]) return;
35946
+ bbox = this.uiInfo[setId]['E' + elemId]['BBOX3D'];
35947
+ } else {
35948
+ var _this$uiInfo;
35949
+ bbox = (_this$uiInfo = this.uiInfo['E' + elemId]) === null || _this$uiInfo === void 0 ? void 0 : _this$uiInfo['BBOX3D'];
35950
+ }
35951
+ if (!bbox) return;
35952
+ for (var i = 0; i < bbox.length; i++) {
35953
+ if (bbox[i].C == 'LBF') {
35954
+ return bbox[i];
35955
+ }
35956
+ }
35957
+ }
35958
+ }, {
35959
+ key: "getBoxPlannerCornerUIPos",
35960
+ value: function getBoxPlannerCornerUIPos(setId, elemId, corner) {
35961
+ var boxPlan = [];
35962
+ if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
35963
+ boxPlan = this.uiInfo['S1']['E' + elemId]['BoxPlan'];
35964
+ } else if (this.uiInfo[setId]) boxPlan = this.uiInfo[setId]['E' + elemId]['BoxPlan'];else boxPlan = this.uiInfo['E' + elemId]['BoxPlan'];
35965
+ for (var i = 0; i < boxPlan.length; i++) {
35966
+ if (!boxPlan[i].N || !boxPlan[i].x || !boxPlan[i].y) continue;
35967
+ switch (corner) {
35968
+ case 'TOPCENTER':
35969
+ if (boxPlan[i].N == 'TC') {
35970
+ return new Vector2(Number(boxPlan[i].x), Number(boxPlan[i].y));
35971
+ }
35972
+ break;
35973
+ case 'LEFTCENTER':
35974
+ if (boxPlan[i].N == 'LC') {
35975
+ return new Vector2(Number(boxPlan[i].x), Number(boxPlan[i].y));
35976
+ }
35977
+ break;
35978
+ case 'RIGHTCENTER':
35979
+ if (boxPlan[i].N == 'RC') {
35980
+ return new Vector2(Number(boxPlan[i].x), Number(boxPlan[i].y));
35981
+ }
35982
+ break;
35983
+ case 'RIGHTTOPFRONT':
35984
+ if (boxPlan[i].N == 'RTF') {
35985
+ return new Vector2(Number(boxPlan[i].x), Number(boxPlan[i].y));
35986
+ }
35987
+ break;
35988
+ }
35989
+ }
35990
+ return undefined;
35991
+ }
35992
+ }, {
35993
+ key: "getUnityCamPos",
35994
+ value: function getUnityCamPos() {
35995
+ return new Vector3(parseFloat(this.uiInfo['CAM']['X']), parseFloat(this.uiInfo['CAM']['Y']), parseFloat(this.uiInfo['CAM']['Z']));
35996
+ }
35997
+ }, {
35998
+ key: "getUnityCamRot",
35999
+ value: function getUnityCamRot() {
36000
+ var quatVec = new Vector4(parseFloat(this.uiInfo['CAM']['QX']), parseFloat(this.uiInfo['CAM']['QY']), parseFloat(this.uiInfo['CAM']['QZ']), parseFloat(this.uiInfo['CAM']['QW']));
36001
+ return quatVec;
36002
+ }
36003
+ }, {
36004
+ key: "getUnityFOV",
36005
+ value: function getUnityFOV() {
36006
+ return parseFloat(this.uiInfo['CAM']['FOV']);
36007
+ }
36008
+
36009
+ //elementId has to be a string because when working with accs in shelf planner an element id is the combination of parentElementId.rasterHeight.gridId
36010
+ //It returns the distance of an element to the ground in cm
36011
+ }, {
36012
+ key: "getDistanceToGround",
36013
+ value: function getDistanceToGround(setId, elementId) {
36014
+ setId = this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined ? 'S1' : setId;
36015
+ if (this.uiInfo[setId] && this.uiInfo[setId]['E' + elementId] && this.uiInfo[setId]['E' + elementId]['DIM'] && this.uiInfo[setId]['E' + elementId]['DIM']['dfg']) {
36016
+ return this.uiInfo[setId]['E' + elementId]['DIM']['dfg'] * 100;
36017
+ }
36018
+ return -1;
36019
+ }
36020
+ }, {
36021
+ key: "addUIInfo",
36022
+ value: function addUIInfo(uiInfo) {
36023
+ try {
36024
+ this.uiInfo = JSON.parse(uiInfo);
36025
+ } catch (error) {
36026
+ LOG$5.error(new DivaError('Error when parsing UI Info in rendering. Corrupt UIInfo: ' + uiInfo, {
36027
+ code: 'WC_0013',
36028
+ cause: error
36029
+ }));
36030
+ }
36031
+ }
36032
+
36033
+ /**
36034
+ * This function adds a blobImage to the rendering .
36035
+ * It is parsed to a base64 image.
36036
+ * @param blob The blob contains the image
36037
+ * @param isLayerMask True if the Image is the layer mask image
36038
+ */
36039
+ }, {
36040
+ key: "addImgAsBlob",
36041
+ value: function addImgAsBlob(buffer, isLayerMask) {
36042
+ if (isLayerMask) this.layerMaskAsBase64 = buffer.toString('base64');else this.imgForSrc = 'data:image/jpeg;base64,' + buffer.toString('base64');
36043
+ }
36044
+ }, {
36045
+ key: "getImageForSrc",
36046
+ value: function getImageForSrc() {
36047
+ return this.imgForSrc;
36048
+ }
36049
+
36050
+ //*****************************************GETTER und SETTER********************************************** */
36051
+ }, {
36052
+ key: "CatalogCodex",
36053
+ get: function get() {
36054
+ return this.catalogData.catalogCodex;
36055
+ },
36056
+ set: function set(val) {
36057
+ this.catalogData.catalogCodex = val;
36058
+ }
36059
+ }, {
36060
+ key: "CatalogGUID",
36061
+ get: function get() {
36062
+ return this.catalogData.catalogGUID;
36063
+ },
36064
+ set: function set(val) {
36065
+ this.catalogData.catalogGUID = val;
36066
+ }
36067
+ }, {
36068
+ key: "PlanningHash",
36069
+ get: function get() {
36070
+ return this.planningHash;
36071
+ }
36072
+ }, {
36073
+ key: "RenderHash",
36074
+ get: function get() {
36075
+ return this.renderHash;
36076
+ }
36077
+ }, {
36078
+ key: "UrlToSavedRendering",
36079
+ get: function get() {
36080
+ return this.urlToSavedRendering;
36081
+ },
36082
+ set: function set(url) {
36083
+ this.urlToSavedRendering = url;
36084
+ }
36085
+ }, {
36086
+ key: "HasLayerMask",
36087
+ get: function get() {
36088
+ return this.hasLayerMask;
36089
+ },
36090
+ set: function set(hasLayerMask) {
36091
+ this.hasLayerMask = hasLayerMask;
36092
+ }
36093
+ }, {
36094
+ key: "RenderWidth",
36095
+ get: function get() {
36096
+ return this.renderWidth;
36097
+ }
36098
+ }, {
36099
+ key: "RenderHeight",
36100
+ get: function get() {
36101
+ return this.renderHeight;
36102
+ }
36103
+ }, {
36104
+ key: "getHasLayerMask",
36105
+ value: function getHasLayerMask() {
36106
+ return this.hasLayerMask;
36107
+ }
36108
+ }, {
36109
+ key: "getLayerMaskForSrc",
36110
+ value: function getLayerMaskForSrc() {
36111
+ return this.layerMaskAsBase64;
36112
+ }
36113
+ }, {
36114
+ key: "HasLayerMaskThreeTexture",
36115
+ get: function get() {
36116
+ return this.layerMaskThreeTexture != undefined;
36117
+ }
36118
+ }, {
36119
+ key: "LayerMaskThreeTexture",
36120
+ get: function get() {
36121
+ return this.layerMaskThreeTexture;
36122
+ },
36123
+ set: function set(tex) {
36124
+ this.layerMaskThreeTexture = tex;
36125
+ }
36126
+ }, {
36127
+ key: "AllImgLoaded",
36128
+ get: function get() {
36129
+ return this.imgForSrc != '' && (!this.hasLayerMask || this.layerMaskAsBase64 != '');
36130
+ }
36131
+ }, {
36132
+ key: "UiInfoLoaded",
36133
+ get: function get() {
36134
+ return this.uiInfo != '';
36135
+ }
36136
+ }, {
36137
+ key: "CreationTime",
36138
+ get: function get() {
36139
+ return this.creationTime.getTime();
36140
+ }
36141
+ }, {
36142
+ key: "MediaServiceSaveMode",
36143
+ get: function get() {
36144
+ return this.mediaServiceSaveMode;
36145
+ },
36146
+ set: function set(mode) {
36147
+ this.mediaServiceSaveMode = mode;
36148
+ }
36549
36149
  }]);
36550
36150
  }();
36551
- var mediaServiceHandler = new DivaMediaServiceHandler();
36552
36151
 
36553
36152
  var RenderSettings = /*#__PURE__*/function () {
36554
36153
  function RenderSettings() {
@@ -36569,9 +36168,6 @@ var RenderSettings = /*#__PURE__*/function () {
36569
36168
  _defineProperty(this, "applicationName", void 0);
36570
36169
  _defineProperty(this, "divaMediaServiceUrl", void 0);
36571
36170
  _defineProperty(this, "renderGroup", void 0);
36572
- _defineProperty(this, "useSirvViewer", void 0);
36573
- _defineProperty(this, "useMediaServiceImageCache", void 0);
36574
- _defineProperty(this, "suppressCacheCreation", void 0);
36575
36171
  this.organizationId = '';
36576
36172
  this.diva3DServerURL = '';
36577
36173
  this.userID = '';
@@ -36580,9 +36176,6 @@ var RenderSettings = /*#__PURE__*/function () {
36580
36176
  this.applicationName = '';
36581
36177
  this.divaMediaServiceUrl = '';
36582
36178
  this.renderGroup = '';
36583
- this.useSirvViewer = false;
36584
- this.useMediaServiceImageCache = false;
36585
- this.suppressCacheCreation = false;
36586
36179
  }
36587
36180
  return _createClass(RenderSettings, [{
36588
36181
  key: "OrganizationId",
@@ -36648,30 +36241,6 @@ var RenderSettings = /*#__PURE__*/function () {
36648
36241
  set: function set(group) {
36649
36242
  this.renderGroup = group;
36650
36243
  }
36651
- }, {
36652
- key: "UseSirvViewer",
36653
- get: function get() {
36654
- return this.useSirvViewer;
36655
- },
36656
- set: function set(viewer) {
36657
- this.useSirvViewer = viewer;
36658
- }
36659
- }, {
36660
- key: "UseMediaServiceImageCache",
36661
- get: function get() {
36662
- return this.useMediaServiceImageCache;
36663
- },
36664
- set: function set(cache) {
36665
- this.useMediaServiceImageCache = cache;
36666
- }
36667
- }, {
36668
- key: "SuppressCacheCreation",
36669
- get: function get() {
36670
- return this.suppressCacheCreation;
36671
- },
36672
- set: function set(cache) {
36673
- this.suppressCacheCreation = cache;
36674
- }
36675
36244
  }]);
36676
36245
  }();
36677
36246
  /*
@@ -36720,7 +36289,7 @@ function _objectSpread$6(e) { for (var r = 1; r < arguments.length; r++) { var t
36720
36289
  function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(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; } } }; }
36721
36290
  function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(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(r, a) : void 0; } }
36722
36291
  function _arrayLikeToArray(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; }
36723
- var LOG$3 = DivaUtils.initLog('Planner', 'PLANNER-HANDLER-3D');
36292
+ var LOG$4 = DivaUtils.initLog('Planner', 'PLANNER-HANDLER-3D');
36724
36293
  var PlannerHandler3D = /*#__PURE__*/function () {
36725
36294
  //-------------------------------------------------Initialization---------------------------------------------------------------
36726
36295
 
@@ -36838,12 +36407,6 @@ var PlannerHandler3D = /*#__PURE__*/function () {
36838
36407
  };
36839
36408
  }
36840
36409
  return _createClass(PlannerHandler3D, [{
36841
- key: "doUseRealtimeRendering",
36842
- value: function doUseRealtimeRendering() {
36843
- if (this.renderSettings.SuppressCacheCreation && this.renderSettings.UseMediaServiceImageCache) return false;
36844
- return true;
36845
- }
36846
- }, {
36847
36410
  key: "setJwt",
36848
36411
  value: function setJwt(jwt) {
36849
36412
  this.jwt = jwt;
@@ -36963,9 +36526,6 @@ var PlannerHandler3D = /*#__PURE__*/function () {
36963
36526
  }
36964
36527
  this.renderSettings.DivaMediaServiceUrl = params.divaMediaServiceUrl;
36965
36528
  this.renderSettings.OrganizationId = params.organizationId;
36966
- this.renderSettings.UseSirvViewer = params.useSirvViewer;
36967
- this.renderSettings.UseMediaServiceImageCache = params.useMediaServiceImageCache;
36968
- this.renderSettings.SuppressCacheCreation = params.suppressCacheCreation;
36969
36529
  this.liveArViewerUrl = params.arViewerUrl;
36970
36530
  return result;
36971
36531
  }
@@ -36978,21 +36538,16 @@ var PlannerHandler3D = /*#__PURE__*/function () {
36978
36538
  return _regeneratorRuntime.wrap(function _callee3$(_context3) {
36979
36539
  while (1) switch (_context3.prev = _context3.next) {
36980
36540
  case 0:
36981
- if (!this.doUseRealtimeRendering()) {
36982
- _context3.next = 7;
36983
- break;
36984
- }
36985
- _context3.next = 3;
36986
- return import('./Host3DSignalR-3ca1dd9c.js');
36987
- case 3:
36541
+ _context3.next = 2;
36542
+ return import('./Host3DSignalR-ae25b944.js');
36543
+ case 2:
36988
36544
  _yield$import = _context3.sent;
36989
36545
  Host3DSignalR = _yield$import["default"];
36990
36546
  this.connectionHandler = new Host3DSignalR(this.renderSettings, this);
36991
- LOG$3.debug('initializeConnection to Host3DSignalR');
36992
- case 7:
36993
- _context3.next = 9;
36547
+ LOG$4.debug('initializeConnection to Host3DSignalR');
36548
+ _context3.next = 8;
36994
36549
  return (_this$connectionHandl2 = this.connectionHandler) === null || _this$connectionHandl2 === void 0 ? void 0 : _this$connectionHandl2.initializeConnection();
36995
- case 9:
36550
+ case 8:
36996
36551
  case "end":
36997
36552
  return _context3.stop();
36998
36553
  }
@@ -37055,7 +36610,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37055
36610
  value: function onConnectedToDivaNr(status) {
37056
36611
  //Check if request3D has to be called againe
37057
36612
  if (status != 'SUCCESSFULL' || !this.todoAfterLogin.request3D.doRequest3D) return;
37058
- LOG$3.debug('Return Login - joind successfully but during loggin, a render or hqRenderScript Request was made. Remake it now');
36613
+ LOG$4.debug('Return Login - joind successfully but during loggin, a render or hqRenderScript Request was made. Remake it now');
37059
36614
  this.todoAfterLogin.request3D.doRequest3D = false;
37060
36615
  this.request3D(this.todoAfterLogin.request3D.params);
37061
36616
  this.todoAfterLogin.request3D.params = undefined;
@@ -37109,36 +36664,36 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37109
36664
  * @param buffer
37110
36665
  */
37111
36666
  function handleReceiveRendering(params) {
37112
- LOG$3.debug('handleReceiveRendering ' + params.hash + '; SameMode: ' + params.saveMode);
36667
+ LOG$4.debug('handleReceiveRendering ' + params.hash + '; SameMode: ' + params.saveMode);
37113
36668
  var isLayerMask = params.hash.endsWith('_m') ? true : false;
37114
36669
  params.hash = isLayerMask ? params.hash.substring(0, params.hash.length - 2) : params.hash;
37115
36670
  var cachedRendering = this.getRenderingFromCache(params.hash);
37116
36671
  var waitedRendering = this.getWaitForRendering(params.hash);
37117
36672
  if (!cachedRendering && !waitedRendering) {
37118
- LOG$3.error(new DivaError('Error when handling receive Rendering. Not waiting for new Rendering but also not in cache ' + params.hash + '; saveMode: ' + params.saveMode));
36673
+ LOG$4.error(new DivaError('Error when handling receive Rendering. Not waiting for new Rendering but also not in cache ' + params.hash + '; saveMode: ' + params.saveMode));
37119
36674
  return;
37120
36675
  }
37121
36676
  if (waitedRendering) {
37122
- LOG$3.debug('handleReceiveRendering ' + params.hash + '; Found in waitForRenderings');
36677
+ LOG$4.debug('handleReceiveRendering ' + params.hash + '; Found in waitForRenderings');
37123
36678
  //If the last requested rendering was in another saving mode than the received rendering - do nothing and wait for the correct rendering
37124
36679
  if ((waitedRendering === null || waitedRendering === void 0 ? void 0 : waitedRendering.MediaServiceSaveMode) == 'PERMANENT' && params.saveMode != '1' || (waitedRendering === null || waitedRendering === void 0 ? void 0 : waitedRendering.MediaServiceSaveMode) == 'STREAM' && params.saveMode != '0') {
37125
- LOG$3.debug('Rendering with wrong savemode arrived. Wait for correct rendering');
36680
+ LOG$4.debug('Rendering with wrong savemode arrived. Wait for correct rendering');
37126
36681
  return;
37127
36682
  }
37128
36683
  if (params.url && waitedRendering.MediaServiceSaveMode == 'PERMANENT') {
37129
36684
  waitedRendering.UrlToSavedRendering = params.url;
37130
- LOG$3.debug('handleReceiveRendering Set lastSavedRendering URL ' + params.url);
36685
+ LOG$4.debug('handleReceiveRendering Set lastSavedRendering URL ' + params.url);
37131
36686
  }
37132
- if (this.renderSettings.UseSirvViewer && params.url) waitedRendering.setHQRenderingUrl(params.url, true);else waitedRendering.addImgAsBlob(Buffer.from(params.buffer), isLayerMask);
36687
+ waitedRendering.addImgAsBlob(Buffer.from(params.buffer), isLayerMask);
37133
36688
 
37134
36689
  //Do not display the rendering if it was saved in real Time mode withough cache - it was only saved when entering the Zusammenfassung for saving it later in the Basket
37135
36690
 
37136
- if ((!this.doUseRealtimeRendering() || this.renderSettings.UseMediaServiceImageCache || waitedRendering.MediaServiceSaveMode == 'STREAM') && this.checkRenderingReady(params.hash, waitedRendering)) this.updatePlannerRendering(waitedRendering);
36691
+ if (waitedRendering.MediaServiceSaveMode == 'STREAM' && this.checkRenderingReady(params.hash, waitedRendering)) this.updatePlannerRendering(waitedRendering);
37137
36692
  return;
37138
36693
  }
37139
36694
  if (params.url) {
37140
36695
  //If several renderings of the same hash are requested contemoranely (first Stream then TEMP). Then save the tempURL in the rendering
37141
- LOG$3.debug('handleReceiveRendering load from cache');
36696
+ LOG$4.debug('handleReceiveRendering load from cache');
37142
36697
  cachedRendering.UrlToSavedRendering = params.url;
37143
36698
  }
37144
36699
  }
@@ -37169,10 +36724,10 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37169
36724
  }, {
37170
36725
  key: "checkRenderingReady",
37171
36726
  value: function checkRenderingReady(hash, rendering) {
37172
- if (!rendering.AllImgLoaded || !rendering.UiInfoLoaded && !rendering.IsLoadedFromCache) return false;
36727
+ if (!rendering.AllImgLoaded || !rendering.UiInfoLoaded) return false;
37173
36728
  this.waitForRenderings["delete"](hash);
37174
36729
  this.renderCache.set(hash, rendering);
37175
- LOG$3.debug('Send to view. CurrentHash: ' + hash + '; lastRequestedHash: ' + this.lastRequestedRenderHash);
36730
+ LOG$4.debug('Send to view. CurrentHash: ' + hash + '; lastRequestedHash: ' + this.lastRequestedRenderHash);
37176
36731
  return true;
37177
36732
  }
37178
36733
  /**
@@ -37187,7 +36742,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37187
36742
  this.waitForRenderings["delete"](hash);
37188
36743
  return false;
37189
36744
  }
37190
- LOG$3.debug('Wait for rendering - The same rendering was asked not 4 seconds ago. !', 'PlannerHandler3D checkWaitForImage');
36745
+ LOG$4.debug('Wait for rendering - The same rendering was asked not 4 seconds ago. !', 'PlannerHandler3D checkWaitForImage');
37191
36746
  return true;
37192
36747
  }
37193
36748
  }, {
@@ -37199,7 +36754,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37199
36754
  this.waitForHQRenderScript["delete"](hash);
37200
36755
  return false;
37201
36756
  }
37202
- LOG$3.debug('Wait for rendering - The same rendering was asked not 4 seconds ago. !', 'PlannerHandler3D checkWaitForImage');
36757
+ LOG$4.debug('Wait for rendering - The same rendering was asked not 4 seconds ago. !', 'PlannerHandler3D checkWaitForImage');
37203
36758
  return true;
37204
36759
  }
37205
36760
 
@@ -37221,10 +36776,6 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37221
36776
  result.renderHeight = curRoomListVP.backgroundImg_Height;
37222
36777
  result.renderHeight = result.renderHeight * 1.3;
37223
36778
  result.renderWidth = result.renderWidth * 1.3;
37224
- } else if (this.renderSettings.UseMediaServiceImageCache) {
37225
- //Force the size of the rendering to be a standard size
37226
- result.renderWidth = this.renderSettings.CACHE_16_9_RENDER_WIDTH;
37227
- result.renderHeight = this.renderSettings.CACHE_16_9_RENDER_HEIGHT;
37228
36779
  } else if (mediaServiceSaveMode == 'PERMANENT') {
37229
36780
  //SAVE with correct Resolution
37230
36781
  result.renderWidth = this.renderSettings.SAVE_16_9_RENDER_WIDTH;
@@ -37268,7 +36819,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37268
36819
  return _regeneratorRuntime.wrap(function _callee5$(_context5) {
37269
36820
  while (1) switch (_context5.prev = _context5.next) {
37270
36821
  case 0:
37271
- LOG$3.debug('getLastSavedRendering ' + ((_this$lastSavedRender = this.lastSavedRendering) === null || _this$lastSavedRender === void 0 ? void 0 : _this$lastSavedRender.UrlToSavedRendering));
36822
+ LOG$4.debug('getLastSavedRendering ' + ((_this$lastSavedRender = this.lastSavedRendering) === null || _this$lastSavedRender === void 0 ? void 0 : _this$lastSavedRender.UrlToSavedRendering));
37272
36823
  if (!(this.lastSavedRendering == undefined)) {
37273
36824
  _context5.next = 3;
37274
36825
  break;
@@ -37283,7 +36834,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37283
36834
  _context5.next = 12;
37284
36835
  break;
37285
36836
  }
37286
- LOG$3.debug('getLAstSavedRendering - wait here');
36837
+ LOG$4.debug('getLAstSavedRendering - wait here');
37287
36838
  _context5.next = 8;
37288
36839
  return this.delay(100);
37289
36840
  case 8:
@@ -37437,20 +36988,20 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37437
36988
  value: (function () {
37438
36989
  var _request3D = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(params) {
37439
36990
  var _params$renderRequest, _params$renderRequest2, _params$renderRequest3, _params$renderRequest4, _params$renderRequest5, _params$renderRequest6, _this$viewPointHandle;
37440
- var room, newRenderSize, doReloadWholePlanning, planningHash, requestRenderingFrom3DHost, requestHqRenderScriptFrom3DHost, rendering, renderHash, viewPointName, functionType, _params$camera, sizeInfo, _plannerMeasureDigits, productHash, renderingFoundInCache, _rendering, fullscreenRendering, renderingInCacheFound, _plannerMeasureDigits2, _productHash, _this$connectionHandl6, _plannerMeasureDigits3, _params$camera2, _params$camera3, returnRequest;
36991
+ var room, newRenderSize, doReloadWholePlanning, planningHash, requestRenderingFrom3DHost, requestHqRenderScriptFrom3DHost, rendering, renderHash, viewPointName, functionType, _params$camera, sizeInfo, _rendering, fullscreenRendering, renderingInCacheFound, _this$connectionHandl6, _plannerMeasureDigits, _params$camera2, _params$camera3, returnRequest;
37441
36992
  return _regeneratorRuntime.wrap(function _callee7$(_context7) {
37442
36993
  while (1) switch (_context7.prev = _context7.next) {
37443
36994
  case 0:
37444
- if (!(this.doUseRealtimeRendering() && this.connectionHandler && (!this.connectionHandler.getConnectionReady() || !this.connectionHandler.getSuccessfullyJoinedToDivaNr()))) {
36995
+ if (!(this.connectionHandler && (!this.connectionHandler.getConnectionReady() || !this.connectionHandler.getSuccessfullyJoinedToDivaNr()))) {
37445
36996
  _context7.next = 5;
37446
36997
  break;
37447
36998
  }
37448
- LOG$3.debug('RequestRendering - but connection Not Ready');
36999
+ LOG$4.debug('RequestRendering - but connection Not Ready');
37449
37000
  this.todoAfterLogin.request3D.params = params;
37450
37001
  this.todoAfterLogin.request3D.doRequest3D = true;
37451
37002
  return _context7.abrupt("return");
37452
37003
  case 5:
37453
- LOG$3.debug('Request New 3D rendering: ' + (params === null || params === void 0 ? void 0 : params.doRequestRendering) + ', hqRenderScript: ' + (params === null || params === void 0 ? void 0 : params.doRequestHqRenderScript), 'PlannerHandler3D');
37004
+ LOG$4.debug('Request New 3D rendering: ' + (params === null || params === void 0 ? void 0 : params.doRequestRendering) + ', hqRenderScript: ' + (params === null || params === void 0 ? void 0 : params.doRequestHqRenderScript), 'PlannerHandler3D');
37454
37005
  room = this.viewPointHandler.getCurRoomCodex();
37455
37006
  newRenderSize = this.setRoomInfoInPlanningData(params.planningData, (_params$renderRequest = (_params$renderRequest2 = params.renderRequestInfos) === null || _params$renderRequest2 === void 0 ? void 0 : _params$renderRequest2.width) !== null && _params$renderRequest !== void 0 ? _params$renderRequest : 500, (_params$renderRequest3 = (_params$renderRequest4 = params.renderRequestInfos) === null || _params$renderRequest4 === void 0 ? void 0 : _params$renderRequest4.height) !== null && _params$renderRequest3 !== void 0 ? _params$renderRequest3 : 500, (_params$renderRequest5 = (_params$renderRequest6 = params.renderRequestInfos) === null || _params$renderRequest6 === void 0 ? void 0 : _params$renderRequest6.mediaServiceSaveMode) !== null && _params$renderRequest5 !== void 0 ? _params$renderRequest5 : undefined);
37456
37007
  doReloadWholePlanning = true;
@@ -37469,103 +37020,63 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37469
37020
  this.lastFramePlanningHash = planningHash;
37470
37021
  requestRenderingFrom3DHost = false;
37471
37022
  requestHqRenderScriptFrom3DHost = false;
37472
- if (!params.doRequestHqRenderScript) {
37473
- _context7.next = 23;
37474
- break;
37475
- }
37476
- if (this.doUseRealtimeRendering()) {
37477
- _context7.next = 21;
37478
- break;
37479
- }
37480
- LOG$3.error(new DivaError('Requesting hqRenderScript is only supported when using real time rendering'));
37481
- return _context7.abrupt("return");
37482
- case 21:
37483
- rendering = this.hqRenderScriptCache.get(planningHash);
37484
- if (rendering) {
37485
- LOG$3.debug('Get HQRenderScript from cache');
37486
- this.lastSavedHQRenderScript = JSON.parse(rendering.HQRenderScript);
37487
- this.updatePlannerHqRenderScriptInView(rendering);
37488
- this.sendARRenderScript(rendering);
37489
- params.doRequestHqRenderScript = false;
37490
- } else {
37491
- if (!this.checkWaitForHQRenderScript(planningHash)) {
37492
- requestHqRenderScriptFrom3DHost = true;
37493
- this.waitForHQRenderScript.set(planningHash, new HQRenderScript('PLACEHOLDER'));
37494
- //If a new HQRenderscript has to be loaded - always reload planning
37495
- doReloadWholePlanning = true;
37023
+ if (params.doRequestHqRenderScript) {
37024
+ rendering = this.hqRenderScriptCache.get(planningHash);
37025
+ if (rendering) {
37026
+ LOG$4.debug('Get HQRenderScript from cache');
37027
+ this.lastSavedHQRenderScript = JSON.parse(rendering.HQRenderScript);
37028
+ this.updatePlannerHqRenderScriptInView(rendering);
37029
+ this.sendARRenderScript(rendering);
37030
+ params.doRequestHqRenderScript = false;
37031
+ } else {
37032
+ if (!this.checkWaitForHQRenderScript(planningHash)) {
37033
+ requestHqRenderScriptFrom3DHost = true;
37034
+ this.waitForHQRenderScript.set(planningHash, new HQRenderScript('PLACEHOLDER'));
37035
+ //If a new HQRenderscript has to be loaded - always reload planning
37036
+ doReloadWholePlanning = true;
37037
+ }
37496
37038
  }
37497
37039
  }
37498
- case 23:
37499
37040
  renderHash = '';
37500
37041
  viewPointName = '';
37501
37042
  functionType = 'P3D';
37502
- if (!params.doRequestRendering) {
37503
- _context7.next = 54;
37504
- break;
37505
- }
37506
- viewPointName = this.viewPointHandler.getCurViewPointToRender();
37507
- sizeInfo = params.renderRequestInfos.width + ':' + params.renderRequestInfos.height;
37508
- renderHash = md5(JSON.stringify(params.planningData) + '#' + room + '#' + viewPointName + '#' + sizeInfo + '#' + JSON.stringify((_params$camera = params.camera) !== null && _params$camera !== void 0 ? _params$camera : this.latestCamera));
37509
- this.lastRequestedRenderHash = renderHash;
37510
- LOG$3.debug('Request New Rendering with hash ' + renderHash + '; and planningHash: ' + planningHash, 'PlannerHandler3D');
37511
- if (this.doUseRealtimeRendering()) {
37512
- _context7.next = 40;
37513
- break;
37514
- }
37515
- productHash = this.getProductHash(params.planningData); // If you only have to load the rendering from the cache and do not have to create the cache - you not have to use the SignalR Connection
37516
- _context7.next = 36;
37517
- return this.requestRenderingCache(planningHash, renderHash, productHash, viewPointName, params.renderRequestInfos.width, params.renderRequestInfos.height, params.renderRequestInfos.isFullscreenRendering, params.renderRequestInfos.doShow3DDimensionLines, (_plannerMeasureDigits = params.renderRequestInfos.plannerMeasureDigits) !== null && _plannerMeasureDigits !== void 0 ? _plannerMeasureDigits : 0, params.catalogData);
37518
- case 36:
37519
- renderingFoundInCache = _context7.sent;
37520
- if (!renderingFoundInCache) LOG$3.debug('Cached rendering not found ' + renderHash);
37521
- _context7.next = 54;
37522
- break;
37523
- case 40:
37524
- if (!this.checkIsRenderingCached(renderHash, params.renderRequestInfos.planner3DGridEnabled, params.renderRequestInfos.mediaServiceSaveMode)) {
37525
- _context7.next = 47;
37526
- break;
37527
- }
37528
- //If planning is laoded from cache - reset lastFramePlanningHash. It can happen that something changed in the planning (Delete element) and the Rendering with 1 element is loaded from cahche - the exe has still 2 elements.
37529
- //When the client then rotates - nothing changes in the hash - but the exe loads 2 elements.
37530
- LOG$3.debug('Load Rendering from Cache with hash ' + renderHash, 'PlannerHandler3D');
37531
- this.lastFramePlanningHash = '';
37532
- _rendering = this.getRenderingFromCache(renderHash); //check if current rendering is fullscreenrendering
37533
- if ((!params.renderRequestInfos.planner3DGridEnabled || _rendering !== null && _rendering !== void 0 && _rendering.getHasLayerMask()) && !this.onlyRunLogic) {
37534
- if (params.renderRequestInfos.isFullscreenRendering != (_rendering === null || _rendering === void 0 ? void 0 : _rendering.getIsFullscreenRendering())) {
37535
- fullscreenRendering = new Rendering('', '', '', -1, -1, false, false, 0, false, false, 'PERMANENT', undefined);
37536
- fullscreenRendering.clone(_rendering);
37537
- fullscreenRendering.setIsFullscreenRendering(params.renderRequestInfos.isFullscreenRendering);
37538
- this.updatePlannerRendering(fullscreenRendering); //load the rendering as fullscreen image
37539
- params.doRequestRendering = false;
37043
+ if (params.doRequestRendering) {
37044
+ viewPointName = this.viewPointHandler.getCurViewPointToRender();
37045
+ sizeInfo = params.renderRequestInfos.width + ':' + params.renderRequestInfos.height;
37046
+ renderHash = md5(JSON.stringify(params.planningData) + '#' + room + '#' + viewPointName + '#' + sizeInfo + '#' + JSON.stringify((_params$camera = params.camera) !== null && _params$camera !== void 0 ? _params$camera : this.latestCamera));
37047
+ this.lastRequestedRenderHash = renderHash;
37048
+ LOG$4.debug('Request New Rendering with hash ' + renderHash + '; and planningHash: ' + planningHash, 'PlannerHandler3D');
37049
+ if (this.checkIsRenderingCached(renderHash, params.renderRequestInfos.planner3DGridEnabled, params.renderRequestInfos.mediaServiceSaveMode)) {
37050
+ //If planning is laoded from cache - reset lastFramePlanningHash. It can happen that something changed in the planning (Delete element) and the Rendering with 1 element is loaded from cahche - the exe has still 2 elements.
37051
+ //When the client then rotates - nothing changes in the hash - but the exe loads 2 elements.
37052
+ LOG$4.debug('Load Rendering from Cache with hash ' + renderHash, 'PlannerHandler3D');
37053
+ this.lastFramePlanningHash = '';
37054
+ _rendering = this.getRenderingFromCache(renderHash); //check if current rendering is fullscreenrendering
37055
+ if ((!params.renderRequestInfos.planner3DGridEnabled || _rendering !== null && _rendering !== void 0 && _rendering.getHasLayerMask()) && !this.onlyRunLogic) {
37056
+ if (params.renderRequestInfos.isFullscreenRendering != (_rendering === null || _rendering === void 0 ? void 0 : _rendering.getIsFullscreenRendering())) {
37057
+ fullscreenRendering = new Rendering('', '', '', -1, -1, false, false, 0, false, false, 'PERMANENT', undefined);
37058
+ fullscreenRendering.clone(_rendering);
37059
+ fullscreenRendering.setIsFullscreenRendering(params.renderRequestInfos.isFullscreenRendering);
37060
+ this.updatePlannerRendering(fullscreenRendering); //load the rendering as fullscreen image
37061
+ params.doRequestRendering = false;
37062
+ } else {
37063
+ this.updatePlannerRendering(_rendering); //lade einfach
37064
+ params.doRequestRendering = false;
37065
+ LOG$4.debug('Do load rendering from cache with renderHash: ' + renderHash);
37066
+ }
37067
+ }
37540
37068
  } else {
37541
- this.updatePlannerRendering(_rendering); //lade einfach
37542
- params.doRequestRendering = false;
37543
- LOG$3.debug('Do load rendering from cache with renderHash: ' + renderHash);
37544
- }
37545
- }
37546
- _context7.next = 54;
37547
- break;
37548
- case 47:
37549
- renderingInCacheFound = false;
37550
- if (!(this.renderSettings.UseMediaServiceImageCache && this.viewPointHandler.getCurVPIsStart())) {
37551
- _context7.next = 53;
37552
- break;
37553
- }
37554
- _productHash = this.getProductHash(params.planningData);
37555
- _context7.next = 52;
37556
- return this.requestRenderingCache(planningHash, renderHash, _productHash, viewPointName, params.renderRequestInfos.width, params.renderRequestInfos.height, params.renderRequestInfos.isFullscreenRendering, params.renderRequestInfos.doShow3DDimensionLines, (_plannerMeasureDigits2 = params.renderRequestInfos.plannerMeasureDigits) !== null && _plannerMeasureDigits2 !== void 0 ? _plannerMeasureDigits2 : 0, params.catalogData);
37557
- case 52:
37558
- renderingInCacheFound = _context7.sent;
37559
- case 53:
37560
- if (!this.renderSettings.UseMediaServiceImageCache || !renderingInCacheFound) {
37561
- if (!this.checkWaitForImage(renderHash)) {
37562
- requestRenderingFrom3DHost = true;
37563
- this.waitForRenderings.set(renderHash, new Rendering('PLACEHOLDER', 'PLACEHOLDER', '', 0, 0, false, false, 0, false, false, 'STREAM'));
37069
+ renderingInCacheFound = false;
37070
+ if (!renderingInCacheFound) {
37071
+ if (!this.checkWaitForImage(renderHash)) {
37072
+ requestRenderingFrom3DHost = true;
37073
+ this.waitForRenderings.set(renderHash, new Rendering('PLACEHOLDER', 'PLACEHOLDER', '', 0, 0, false, false, 0, false, false, 'STREAM'));
37074
+ }
37075
+ }
37564
37076
  }
37565
37077
  }
37566
- case 54:
37567
37078
  if (!(requestHqRenderScriptFrom3DHost || requestRenderingFrom3DHost)) {
37568
- _context7.next = 63;
37079
+ _context7.next = 31;
37569
37080
  break;
37570
37081
  }
37571
37082
  if (params.catalogData.lang) params.planningData.SCE.Lang = params.catalogData.lang;
@@ -37583,7 +37094,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37583
37094
  height: params.renderRequestInfos.height,
37584
37095
  isFullscreenRendering: params.renderRequestInfos.isFullscreenRendering,
37585
37096
  hasDimensionLines: params.renderRequestInfos.doShow3DDimensionLines,
37586
- plannerMeasureDigits: (_plannerMeasureDigits3 = params.renderRequestInfos.plannerMeasureDigits) !== null && _plannerMeasureDigits3 !== void 0 ? _plannerMeasureDigits3 : 0,
37097
+ plannerMeasureDigits: (_plannerMeasureDigits = params.renderRequestInfos.plannerMeasureDigits) !== null && _plannerMeasureDigits !== void 0 ? _plannerMeasureDigits : 0,
37587
37098
  planner3DGridEnabled: params.renderRequestInfos.planner3DGridEnabled,
37588
37099
  mediaServiceSaveMode: params.renderRequestInfos.mediaServiceSaveMode,
37589
37100
  functionType: functionType,
@@ -37598,14 +37109,14 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37598
37109
  });
37599
37110
  if (params.camera) this.latestCamera = params.camera;
37600
37111
  if (!(returnRequest === undefined || requestHqRenderScriptFrom3DHost && returnRequest.hqRenderScript == undefined || requestRenderingFrom3DHost && returnRequest.rendering == undefined)) {
37601
- _context7.next = 61;
37112
+ _context7.next = 29;
37602
37113
  break;
37603
37114
  }
37604
- LOG$3.error(new DivaError('Error requesting the 3D from host. RequestHqRenderScript: ' + requestHqRenderScriptFrom3DHost + '; RequestRendering: ' + requestRenderingFrom3DHost, {
37115
+ LOG$4.error(new DivaError('Error requesting the 3D from host. RequestHqRenderScript: ' + requestHqRenderScriptFrom3DHost + '; RequestRendering: ' + requestRenderingFrom3DHost, {
37605
37116
  code: 'WC_0013'
37606
37117
  }));
37607
37118
  return _context7.abrupt("return");
37608
- case 61:
37119
+ case 29:
37609
37120
  if (requestHqRenderScriptFrom3DHost) {
37610
37121
  if (this.waitForHQRenderScript.has(planningHash)) this.waitForHQRenderScript["delete"](planningHash);
37611
37122
  this.waitForHQRenderScript.set(planningHash, returnRequest.hqRenderScript);
@@ -37617,7 +37128,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37617
37128
  if (returnRequest.rendering.getIsAlternateRendering()) this.addAlternateRenderingToSavedAlternateRenderings(returnRequest.rendering);else this.lastSavedRendering = returnRequest.rendering;
37618
37129
  }
37619
37130
  }
37620
- case 63:
37131
+ case 31:
37621
37132
  case "end":
37622
37133
  return _context7.stop();
37623
37134
  }
@@ -37670,70 +37181,6 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37670
37181
  });
37671
37182
  if (index === -1) this.lastSavedAlternateRenderings.push(rendering);else this.lastSavedAlternateRenderings[index] = rendering;
37672
37183
  }
37673
-
37674
- /**
37675
- * This function handles to load a rendering from the cache
37676
- * @param hash
37677
- * @param viewPointName
37678
- * @param width
37679
- * @param height
37680
- * @param isFullscreenRendering
37681
- *
37682
- * @returns true, if the rendering was found in the cache
37683
- */
37684
- }, {
37685
- key: "requestRenderingCache",
37686
- value: (function () {
37687
- var _requestRenderingCache = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8(planningHash, renderHash, productHash, viewPointName, width, height, isFullscreenRendering, hasDimensionLines, plannerMeasureDigits, catalogData, alternateRenderingsExist, alternateRendererInfo) {
37688
- var renderingInCacheFound, rendering, promises, _yield$Promise$all, _yield$Promise$all2, urlRenderingCache, urlARCache, doUpdateRendering;
37689
- return _regeneratorRuntime.wrap(function _callee8$(_context8) {
37690
- while (1) switch (_context8.prev = _context8.next) {
37691
- case 0:
37692
- renderingInCacheFound = false;
37693
- if (this.waitForRenderings.has(renderHash)) {
37694
- _context8.next = 12;
37695
- break;
37696
- }
37697
- rendering = new Rendering(planningHash, renderHash, viewPointName, width, height, isFullscreenRendering, hasDimensionLines, plannerMeasureDigits, false, false, 'PERMANENT', alternateRenderingsExist, alternateRendererInfo);
37698
- this.waitForRenderings.set(renderHash, rendering);
37699
- //Try load image from cache
37700
- promises = [mediaServiceHandler.loadRenderingFromCache(renderHash), mediaServiceHandler.loadRenderingFromCache(productHash, false)];
37701
- _context8.next = 7;
37702
- return Promise.all(promises);
37703
- case 7:
37704
- _yield$Promise$all = _context8.sent;
37705
- _yield$Promise$all2 = _slicedToArray(_yield$Promise$all, 2);
37706
- urlRenderingCache = _yield$Promise$all2[0];
37707
- urlARCache = _yield$Promise$all2[1];
37708
- if (urlRenderingCache || urlARCache) {
37709
- renderingInCacheFound = true;
37710
- if (urlRenderingCache) {
37711
- rendering.setHQRenderingUrl(urlRenderingCache, this.renderSettings.UseSirvViewer);
37712
- rendering.UrlToSavedRendering = rendering.getHQRenderingURL();
37713
- }
37714
- if (urlARCache) rendering.setArUrl(urlARCache);
37715
- rendering.IsLoadedFromCache = true;
37716
- rendering.CatalogCodex = catalogData.catalogCodex;
37717
- rendering.CatalogGUID = catalogData.catalogGUID;
37718
- LOG$3.debug('The rendering is loaded from the MediaServiceCache: ' + urlRenderingCache);
37719
- doUpdateRendering = this.checkRenderingReady(renderHash, rendering);
37720
- if (doUpdateRendering) this.updatePlannerRendering(rendering);
37721
- } else {
37722
- this.waitForRenderings["delete"](renderHash);
37723
- }
37724
- case 12:
37725
- return _context8.abrupt("return", renderingInCacheFound);
37726
- case 13:
37727
- case "end":
37728
- return _context8.stop();
37729
- }
37730
- }, _callee8, this);
37731
- }));
37732
- function requestRenderingCache(_x6, _x7, _x8, _x9, _x10, _x11, _x12, _x13, _x14, _x15, _x16, _x17) {
37733
- return _requestRenderingCache.apply(this, arguments);
37734
- }
37735
- return requestRenderingCache;
37736
- }())
37737
37184
  }, {
37738
37185
  key: "handleStaticVP",
37739
37186
  value: function handleStaticVP(vpCodex) {
@@ -37837,20 +37284,6 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37837
37284
  value: function getStaticRoomListItems() {
37838
37285
  return this.viewPointHandler.getStaticRoomList();
37839
37286
  }
37840
-
37841
- /**
37842
- * Clears the whole renderCache and sets the current rendering and the lastSavedRendering to undefined
37843
- */
37844
- }, {
37845
- key: "clearRenderCache",
37846
- value: function clearRenderCache() {
37847
- LOG$3.debug('PlannerHandler3D clearRenderCache');
37848
- this.renderCache.clear();
37849
- this.currRendering = undefined;
37850
- this.lastSavedRendering = undefined;
37851
- this.lastSavedAlternateRenderings = undefined;
37852
- this.hqRenderScriptCache.clear();
37853
- }
37854
37287
  }, {
37855
37288
  key: "clearCurrentRendering",
37856
37289
  value: function clearCurrentRendering() {
@@ -37879,11 +37312,6 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37879
37312
  value: function checkIsWaitingForHQRenderScript() {
37880
37313
  return this.waitForHQRenderScript.size > 0;
37881
37314
  }
37882
- }, {
37883
- key: "getUseMediaServiceImageCache",
37884
- value: function getUseMediaServiceImageCache() {
37885
- return this.renderSettings.UseMediaServiceImageCache;
37886
- }
37887
37315
  }, {
37888
37316
  key: "setOrigConfigurationCallback",
37889
37317
  value: function setOrigConfigurationCallback(callback) {
@@ -37897,19 +37325,19 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37897
37325
  }, {
37898
37326
  key: "openARObserverConnection",
37899
37327
  value: function () {
37900
- var _openARObserverConnection = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee10(handleNoHqrs) {
37328
+ var _openARObserverConnection = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9(handleNoHqrs) {
37901
37329
  var _this2 = this;
37902
- return _regeneratorRuntime.wrap(function _callee10$(_context10) {
37903
- while (1) switch (_context10.prev = _context10.next) {
37330
+ return _regeneratorRuntime.wrap(function _callee9$(_context9) {
37331
+ while (1) switch (_context9.prev = _context9.next) {
37904
37332
  case 0:
37905
- return _context10.abrupt("return", new Promise( /*#__PURE__*/function () {
37906
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9(resolve, reject) {
37333
+ return _context9.abrupt("return", new Promise( /*#__PURE__*/function () {
37334
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8(resolve, reject) {
37907
37335
  var socketUrl;
37908
- return _regeneratorRuntime.wrap(function _callee9$(_context9) {
37909
- while (1) switch (_context9.prev = _context9.next) {
37336
+ return _regeneratorRuntime.wrap(function _callee8$(_context8) {
37337
+ while (1) switch (_context8.prev = _context8.next) {
37910
37338
  case 0:
37911
37339
  if (_this2.liveArViewerUrl) {
37912
- _context9.next = 2;
37340
+ _context8.next = 2;
37913
37341
  break;
37914
37342
  }
37915
37343
  throw new Error('No Live AR Viewer URL set');
@@ -37925,26 +37353,26 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37925
37353
  }
37926
37354
  });
37927
37355
  _this2.liveArSocket.on('disconnect', function () {
37928
- LOG$3.error(new DivaError('AR Socket disconnected'));
37356
+ LOG$4.error(new DivaError('AR Socket disconnected'));
37929
37357
  });
37930
37358
  _this2.liveArSocket.on('observer-joined', function () {
37931
37359
  var _this2$liveArSocket;
37932
- LOG$3.debug('AR Observer joined');
37360
+ LOG$4.debug('AR Observer joined');
37933
37361
  _this2.liveArClientsConnected = true;
37934
37362
  var hqRenderScript = _this2.lastSavedHQRenderScript;
37935
37363
  if (hqRenderScript) (_this2$liveArSocket = _this2.liveArSocket) === null || _this2$liveArSocket === void 0 || _this2$liveArSocket.emit('update', {
37936
37364
  hqRenderScript: JSON.stringify(hqRenderScript)
37937
37365
  });else {
37938
- LOG$3.debug('No HQRenderScript found for observer-joined');
37366
+ LOG$4.debug('No HQRenderScript found for observer-joined');
37939
37367
  handleNoHqrs();
37940
37368
  }
37941
37369
  });
37942
37370
  _this2.liveArSocket.on('observer-left', function () {
37943
- LOG$3.debug('AR Observer left');
37371
+ LOG$4.debug('AR Observer left');
37944
37372
  _this2.liveArClientsConnected = false;
37945
37373
  });
37946
37374
  _this2.liveArSocket.on('connected', function (data) {
37947
- LOG$3.debug('AR Socket connected ' + data.connectionId);
37375
+ LOG$4.debug('AR Socket connected ' + data.connectionId);
37948
37376
  _this2.liveArSocket.auth = _objectSpread$6(_objectSpread$6({}, _this2.liveArSocket.auth), {}, {
37949
37377
  connectionId: data.connectionId
37950
37378
  });
@@ -37958,21 +37386,21 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37958
37386
  }
37959
37387
  case 3:
37960
37388
  case "end":
37961
- return _context9.stop();
37389
+ return _context8.stop();
37962
37390
  }
37963
- }, _callee9);
37391
+ }, _callee8);
37964
37392
  }));
37965
- return function (_x19, _x20) {
37393
+ return function (_x7, _x8) {
37966
37394
  return _ref.apply(this, arguments);
37967
37395
  };
37968
37396
  }()));
37969
37397
  case 1:
37970
37398
  case "end":
37971
- return _context10.stop();
37399
+ return _context9.stop();
37972
37400
  }
37973
- }, _callee10);
37401
+ }, _callee9);
37974
37402
  }));
37975
- function openARObserverConnection(_x18) {
37403
+ function openARObserverConnection(_x6) {
37976
37404
  return _openARObserverConnection.apply(this, arguments);
37977
37405
  }
37978
37406
  return openARObserverConnection;
@@ -37982,10 +37410,10 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37982
37410
  value: function sendARRenderScript(hqRenderScript) {
37983
37411
  var _this$liveArSocket;
37984
37412
  if (!this.liveArClientsConnected) {
37985
- LOG$3.debug('No AR Clients connected, dont send render script');
37413
+ LOG$4.debug('No AR Clients connected, dont send render script');
37986
37414
  return;
37987
37415
  }
37988
- LOG$3.debug('Sending AR Render Script to clients');
37416
+ LOG$4.debug('Sending AR Render Script to clients');
37989
37417
  (_this$liveArSocket = this.liveArSocket) === null || _this$liveArSocket === void 0 || _this$liveArSocket.emit('update', {
37990
37418
  hqRenderScript: hqRenderScript.HQRenderScript
37991
37419
  });
@@ -37993,6 +37421,131 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37993
37421
  }]);
37994
37422
  }();
37995
37423
 
37424
+ var LOG$3 = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
37425
+ var DivaMediaServiceHandler = /*#__PURE__*/function () {
37426
+ //-------------------------------------------------- INITIALIZATION--------------------------------------------------------------//
37427
+
37428
+ function DivaMediaServiceHandler() {
37429
+ _classCallCheck(this, DivaMediaServiceHandler);
37430
+ _defineProperty(this, "organizationId", void 0);
37431
+ _defineProperty(this, "mediaServiceUrl", void 0);
37432
+ _defineProperty(this, "mediaServiceApiKey", void 0);
37433
+ _defineProperty(this, "jwt", void 0);
37434
+ _defineProperty(this, "POST_saveTmp2PermanentPostfix", '/saveTmp2Permanent');
37435
+ _defineProperty(this, "GET_MediaItemrefs", '/v1/mediaitems/refs?limit=20&skip=0&filter=');
37436
+ _defineProperty(this, "POST_mediaItem", '/v1/mediaitems?ref=true');
37437
+ this.organizationId = '';
37438
+ this.mediaServiceUrl = '';
37439
+ this.mediaServiceApiKey = '';
37440
+ }
37441
+ return _createClass(DivaMediaServiceHandler, [{
37442
+ key: "setOrganizationId",
37443
+ value: function setOrganizationId(organizationId) {
37444
+ this.organizationId = organizationId;
37445
+ }
37446
+ }, {
37447
+ key: "setMediaServiceUrl",
37448
+ value: function setMediaServiceUrl(mediaServiceUrl) {
37449
+ this.mediaServiceUrl = mediaServiceUrl;
37450
+ }
37451
+ }, {
37452
+ key: "setMediaServiceApiKey",
37453
+ value: function setMediaServiceApiKey(mediaServiceApiKey) {
37454
+ this.mediaServiceApiKey = mediaServiceApiKey;
37455
+ }
37456
+ }, {
37457
+ key: "setJwt",
37458
+ value: function setJwt(jwt) {
37459
+ this.jwt = jwt;
37460
+ }
37461
+ }, {
37462
+ key: "base64ToBlob",
37463
+ value: function base64ToBlob(base64String, hash) {
37464
+ DivaUtils.startSpanOfApm('MediaServiceHandler base64ToBlob');
37465
+ if (base64String.startsWith('data:image/jpeg;base64,')) {
37466
+ base64String = base64String.replace('data:image/jpeg;base64,', '');
37467
+ }
37468
+ var binary_string = window.atob(base64String);
37469
+ var len = binary_string.length;
37470
+ var bytes = new Uint8Array(len);
37471
+ for (var i = 0; i < len; i++) {
37472
+ bytes[i] = binary_string.charCodeAt(i);
37473
+ }
37474
+ var blob = new File([bytes.buffer], hash + '.jpg', {
37475
+ type: 'image/jpeg'
37476
+ });
37477
+ DivaUtils.endSpanOfApm('MediaServiceHandler base64ToBlob');
37478
+ return blob;
37479
+ }
37480
+ }, {
37481
+ key: "savePlanning2DPermanent",
37482
+ value: function () {
37483
+ var _savePlanning2DPermanent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(hash, catalogCodex, catalogGUID, planning2DAsJPG) {
37484
+ var imageBlob, url, data, mediaItem, mediaItemRef, response, res;
37485
+ return _regeneratorRuntime.wrap(function _callee$(_context) {
37486
+ while (1) switch (_context.prev = _context.next) {
37487
+ case 0:
37488
+ DivaUtils.startSpanOfApm('MediaServiceHandler savePlanning2DPermanent');
37489
+ imageBlob = this.base64ToBlob(planning2DAsJPG, hash);
37490
+ url = this.mediaServiceUrl + this.POST_mediaItem; //push media item return url
37491
+ //create media item ref and set same paramters
37492
+ data = new FormData();
37493
+ data.append('file', imageBlob);
37494
+ mediaItem = {
37495
+ organizationId: this.organizationId,
37496
+ mediaType: 'PCT',
37497
+ fileName: hash + '.jpg'
37498
+ };
37499
+ data.append('mediaItem', JSON.stringify(mediaItem));
37500
+ mediaItemRef = {
37501
+ functionType: 'P2D',
37502
+ planningHash: hash,
37503
+ catalogCodex: catalogCodex,
37504
+ catalogGuid: catalogGUID
37505
+ };
37506
+ data.append('mediaItemRef', JSON.stringify(mediaItemRef));
37507
+ _context.next = 11;
37508
+ return fetch(url, {
37509
+ method: 'POST',
37510
+ body: data,
37511
+ headers: {
37512
+ 'X-API-KEY': this.mediaServiceApiKey
37513
+ }
37514
+ });
37515
+ case 11:
37516
+ response = _context.sent;
37517
+ if (!response.ok) {
37518
+ _context.next = 20;
37519
+ break;
37520
+ }
37521
+ _context.next = 15;
37522
+ return response.json();
37523
+ case 15:
37524
+ res = _context.sent;
37525
+ LOG$3.debug('Successfully saved 2D Planning in media Service. URL: ' + res.url);
37526
+ return _context.abrupt("return", res.url);
37527
+ case 20:
37528
+ LOG$3.error(new DivaError('Error when saving the Planning2D image on mediaService. Hash: ' + hash + 'response: ' + response, {
37529
+ code: 'WC_0016'
37530
+ }));
37531
+ case 21:
37532
+ DivaUtils.endSpanOfApm('MediaServiceHandler savePlanning2DPermanent');
37533
+ return _context.abrupt("return", '');
37534
+ case 23:
37535
+ case "end":
37536
+ return _context.stop();
37537
+ }
37538
+ }, _callee, this);
37539
+ }));
37540
+ function savePlanning2DPermanent(_x, _x2, _x3, _x4) {
37541
+ return _savePlanning2DPermanent.apply(this, arguments);
37542
+ }
37543
+ return savePlanning2DPermanent;
37544
+ }()
37545
+ }]);
37546
+ }();
37547
+ var mediaServiceHandler = new DivaMediaServiceHandler();
37548
+
37996
37549
  /**
37997
37550
  * This class saves a Bounding box. This bounding box can be of one Planner (one Set) or for several planner elements (multiple Sets)
37998
37551
  */
@@ -38327,7 +37880,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38327
37880
  key: "initPlanner",
38328
37881
  value: (function () {
38329
37882
  var _initPlanner = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(initSetState, plannerHandlerFunctions) {
38330
- var renderGroup, diva3dServerUrl, divaMediaServiceUrl, mediaServiceApiKey, useSirvViewer, _initSetState$api$web, result;
37883
+ var renderGroup, diva3dServerUrl, divaMediaServiceUrl, mediaServiceApiKey, _initSetState$api$web, result;
38331
37884
  return _regeneratorRuntime.wrap(function _callee$(_context) {
38332
37885
  while (1) switch (_context.prev = _context.next) {
38333
37886
  case 0:
@@ -38336,8 +37889,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38336
37889
  this.plannerHandlerFunctions = plannerHandlerFunctions;
38337
37890
  diva3dServerUrl = initSetState.api.get3DServerUrl();
38338
37891
  divaMediaServiceUrl = initSetState.api.getDivaMediaServiceUrl();
38339
- mediaServiceApiKey = initSetState.api.getDivaMediaServiceApiKey();
38340
- useSirvViewer = initSetState.api.getDiva3dUseSirvViewer(); //renderGroup = 'LeaTest';
37892
+ mediaServiceApiKey = initSetState.api.getDivaMediaServiceApiKey(); //renderGroup = 'LeaTest';
38341
37893
  //diva3dServerUrl = "https://test-einkauf-onboarding.pfister.ch/diva3d/diva3dhost2/";
38342
37894
  // diva3dServerUrl = "https://diva3dhost.diva-portal.com/diva3d/diva3dhost2/";
38343
37895
  //diva3dServerUrl = 'https://localhost:44315/';
@@ -38347,7 +37899,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38347
37899
  //divaMediaServiceUrl = 'https://api-test.diva-portal.com/media/';
38348
37900
  //divaMediaServiceUrl = 'http://localhost:3000';
38349
37901
  if (!(!initSetState.onlyRunLogic && !initSetState.no3DConnection)) {
38350
- _context.next = 15;
37902
+ _context.next = 14;
38351
37903
  break;
38352
37904
  }
38353
37905
  this.handler3D.initializeCallbackFunctions({
@@ -38359,34 +37911,31 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38359
37911
  this.handler3D.setJwt(initSetState.api.getJwt());
38360
37912
  //Only use if only 1 Planner/Set is used. Not possible in setPlanner
38361
37913
  result = this.handler3D.initializeAPISettings({
38362
- useMediaServiceImageCache: initSetState.api.getDiva3dUseImageCache(),
38363
- suppressCacheCreation: initSetState.api.getDiva3DSuppressCacheCreation(),
38364
37914
  renderGroup: renderGroup,
38365
37915
  diva3dServerUrl: diva3dServerUrl,
38366
37916
  divaMediaServiceUrl: divaMediaServiceUrl,
38367
37917
  organizationId: initSetState.organizationId,
38368
- useSirvViewer: useSirvViewer,
38369
37918
  arViewerUrl: (_initSetState$api$web = initSetState.api.webConfig) === null || _initSetState$api$web === void 0 ? void 0 : _initSetState$api$web.arViewerUrl
38370
37919
  });
38371
37920
  if (!(!this.handler3D.checkConnectionInitialized() || result.renderGroupChanged || result.diva3dServerUrlChanged)) {
38372
- _context.next = 14;
37921
+ _context.next = 13;
38373
37922
  break;
38374
37923
  }
38375
- _context.next = 14;
37924
+ _context.next = 13;
38376
37925
  return this.handler3D.initializeConnection();
38377
- case 14:
37926
+ case 13:
38378
37927
  if (this.divaNr != initSetState.divaNr) {
38379
37928
  this.divaNr = initSetState.divaNr;
38380
37929
  this.handler3D.joinDivaNr(this.divaNr);
38381
37930
  }
38382
- case 15:
37931
+ case 14:
38383
37932
  mediaServiceHandler.setMediaServiceUrl(divaMediaServiceUrl);
38384
37933
  mediaServiceHandler.setMediaServiceApiKey(mediaServiceApiKey);
38385
37934
  mediaServiceHandler.setOrganizationId(initSetState.organizationId);
38386
37935
  mediaServiceHandler.setJwt(initSetState.api.getJwt());
38387
37936
  this.handler3D.setOrigConfigurationCallback(this.plannerHandlerFunctions.getOrigConfiguration);
38388
37937
  DivaUtils.endSpanOfApm('DivaPlannerHandler initPlanner');
38389
- case 21:
37938
+ case 20:
38390
37939
  case "end":
38391
37940
  return _context.stop();
38392
37941
  }
@@ -38503,10 +38052,8 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38503
38052
  roomlistCodex,
38504
38053
  roomLists,
38505
38054
  _yield$import,
38506
- DivaSingleProductPlanner,
38507
- _yield$import2,
38508
38055
  DivaStandardPlanner,
38509
- _yield$import3,
38056
+ _yield$import2,
38510
38057
  DivaBoxPlanner,
38511
38058
  _args4 = arguments;
38512
38059
  return _regeneratorRuntime.wrap(function _callee4$(_context4) {
@@ -38535,58 +38082,44 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38535
38082
  }
38536
38083
  this.handler3D.initializeViewPoint(catalogData.standardWhiteroom);
38537
38084
  _context4.t0 = set.getPlannerEdition();
38538
- _context4.next = _context4.t0 === 'STANDARD' ? 8 : _context4.t0 === 'BOX' ? 23 : 29;
38085
+ _context4.next = _context4.t0 === 'STANDARD' ? 8 : _context4.t0 === 'BOX' ? 15 : 21;
38539
38086
  break;
38540
38087
  case 8:
38541
- if (!this.handler3D.getUseMediaServiceImageCache()) {
38542
- _context4.next = 16;
38543
- break;
38544
- }
38545
- _context4.next = 11;
38546
- return import('./DivaSingleProductPlanner-76dcd48c.js');
38547
- case 11:
38088
+ _context4.next = 10;
38089
+ return import('./DivaStandardPlanner-af73d121.js');
38090
+ case 10:
38548
38091
  _yield$import = _context4.sent;
38549
- DivaSingleProductPlanner = _yield$import["default"];
38550
- planner = new DivaSingleProductPlanner(set, this.plannerIDCount, this.setPlannerHandler.getGlobalBoundingBox(), set.api.getHidePlanner());
38551
- _context4.next = 22;
38552
- break;
38553
- case 16:
38554
- _context4.next = 18;
38555
- return import('./DivaStandardPlanner-774854f1.js');
38556
- case 18:
38557
- _yield$import2 = _context4.sent;
38558
- DivaStandardPlanner = _yield$import2["default"];
38092
+ DivaStandardPlanner = _yield$import["default"];
38559
38093
  planner = new DivaStandardPlanner(set, this.plannerHandlerFunctions.updatePlannerMsgContainer, this.plannerIDCount, this.setPlannerHandler.getGlobalBoundingBox(), set.api.getHidePlanner(), !!set.api.getDoShowAR(), set.api.getDoDisablePlanner2D(), hasStaticBackground);
38560
38094
  if (catalogData.isIDM3DCat) {
38561
38095
  planner.initIDM3DMeta(catalogData.IDM3DCatCodex);
38562
38096
  }
38563
- case 22:
38564
- return _context4.abrupt("break", 29);
38565
- case 23:
38566
- _context4.next = 25;
38567
- return import('./DivaBoxPlanner-0a38d41b.js');
38568
- case 25:
38569
- _yield$import3 = _context4.sent;
38570
- DivaBoxPlanner = _yield$import3["default"];
38097
+ return _context4.abrupt("break", 21);
38098
+ case 15:
38099
+ _context4.next = 17;
38100
+ return import('./DivaBoxPlanner-c20559ca.js');
38101
+ case 17:
38102
+ _yield$import2 = _context4.sent;
38103
+ DivaBoxPlanner = _yield$import2["default"];
38571
38104
  planner = new DivaBoxPlanner(set, this.plannerIDCount);
38572
- return _context4.abrupt("break", 29);
38573
- case 29:
38105
+ return _context4.abrupt("break", 21);
38106
+ case 21:
38574
38107
  this.plannerList.set(set.getSetId(), planner);
38575
38108
  this.plannerIDCount++;
38576
38109
  if (!(setPlanData != null && setPlanData != '')) {
38577
- _context4.next = 34;
38110
+ _context4.next = 26;
38578
38111
  break;
38579
38112
  }
38580
- _context4.next = 34;
38113
+ _context4.next = 26;
38581
38114
  return planner.initPlanner(setPlanData);
38582
- case 34:
38115
+ case 26:
38583
38116
  if (lastSetToInitialize) {
38584
38117
  this.updateAllPlannerBBs();
38585
38118
  this.setPlannerHandler.calcGlobalBoundingBox(this.plannerList);
38586
38119
  }
38587
38120
  this.setPlannerHandler.updateSetPosNr(this.plannerList);
38588
38121
  DivaUtils.endSpanOfApm('DivaPlannerHandler initSet');
38589
- case 37:
38122
+ case 29:
38590
38123
  case "end":
38591
38124
  return _context4.stop();
38592
38125
  }
@@ -39056,7 +38589,6 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
39056
38589
  }, {
39057
38590
  key: "clearHandler3D",
39058
38591
  value: function clearHandler3D() {
39059
- this.handler3D.clearRenderCache();
39060
38592
  this.handler3D.closeConnection();
39061
38593
  }
39062
38594
  }, {
@@ -39305,7 +38837,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
39305
38837
  if (!renderRequestInfos) {
39306
38838
  LOG$2.error(new DivaError('Error requesting 3D rendering. No renderRequestInfo is set'));
39307
38839
  return;
39308
- } else if ((renderRequestInfos.width <= 0 || isNaN(renderRequestInfos.width) || renderRequestInfos.height <= 0 || isNaN(renderRequestInfos.height)) && !this.handler3D.getUseMediaServiceImageCache()) {
38840
+ } else if (renderRequestInfos.width <= 0 || isNaN(renderRequestInfos.width) || renderRequestInfos.height <= 0 || isNaN(renderRequestInfos.height)) {
39309
38841
  LOG$2.error(new DivaError('Error requesting rendering. Not valid width or height request width: ' + renderRequestInfos.width + ' height: ' + renderRequestInfos.height));
39310
38842
  return;
39311
38843
  }
@@ -39314,14 +38846,11 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
39314
38846
  var loadedCatData = [];
39315
38847
  var plannerExists = false;
39316
38848
  var savedSetId = undefined;
39317
- var containsNotDigitalizedTextures = false;
39318
- var useMediaServiceImageCache = doRequestRendering && this.handler3D.getUseMediaServiceImageCache() ? true : false;
39319
38849
  this.plannerList.forEach(function (planner, setId) {
39320
38850
  var _renderRequestInfos$d;
39321
38851
  savedSetId = setId;
39322
- var config = planner.getSetData(true, _this3.plannerHandlerFunctions.doAllowSetPlanner(), (_renderRequestInfos$d = renderRequestInfos === null || renderRequestInfos === void 0 ? void 0 : renderRequestInfos.doShow3DDimensionLines) !== null && _renderRequestInfos$d !== void 0 ? _renderRequestInfos$d : false, useMediaServiceImageCache, alternateRenderInfo);
38852
+ var config = planner.getSetData(true, _this3.plannerHandlerFunctions.doAllowSetPlanner(), (_renderRequestInfos$d = renderRequestInfos === null || renderRequestInfos === void 0 ? void 0 : renderRequestInfos.doShow3DDimensionLines) !== null && _renderRequestInfos$d !== void 0 ? _renderRequestInfos$d : false, alternateRenderInfo);
39323
38853
  var setData = config.constructionSet;
39324
- if (config.containsNotDigitalizedTextures) containsNotDigitalizedTextures = true;
39325
38854
 
39326
38855
  //Add technical Info to setData
39327
38856
  var bboxInfo2D = _this3.get2DViewPlannerBoundingBox();
@@ -39341,15 +38870,6 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
39341
38870
  });
39342
38871
  });
39343
38872
  if (plannerExists) {
39344
- if (containsNotDigitalizedTextures) {
39345
- var _this$plannerHandlerF3, _this$plannerHandlerF4;
39346
- (_this$plannerHandlerF3 = (_this$plannerHandlerF4 = this.plannerHandlerFunctions).updatePlannerMsgContainer) === null || _this$plannerHandlerF3 === void 0 || _this$plannerHandlerF3.call(_this$plannerHandlerF4, 'TEXTURE_NOT_DIGITALIZED_WARNING', true, 'INFO', 'TEXTURE_NOT_DIGITALIZED_WARNING', false, undefined);
39347
- } else {
39348
- var _this$plannerHandlerF5, _this$plannerHandlerF6;
39349
- //Hide message warning if shown
39350
- (_this$plannerHandlerF5 = (_this$plannerHandlerF6 = this.plannerHandlerFunctions).updatePlannerMsgContainer) === null || _this$plannerHandlerF5 === void 0 || _this$plannerHandlerF5.call(_this$plannerHandlerF6, 'TEXTURE_NOT_DIGITALIZED_WARNING', false, 'INFO', 'TEXTURE_NOT_DIGITALIZED_WARNING', false, undefined);
39351
- }
39352
-
39353
38873
  // if not in set planner mode overwrite s1 with correct setId
39354
38874
  if (!this.plannerHandlerFunctions.doAllowSetPlanner()) {
39355
38875
  plannerData.SCE.ROO[0].SET[0].ID = savedSetId;
@@ -39392,12 +38912,12 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
39392
38912
 
39393
38913
  if (!setId) {
39394
38914
  this.plannerList.forEach(function (planner, setId) {
39395
- var config = planner.getSetData(true, _this4.plannerHandlerFunctions.doAllowSetPlanner(), false, _this4.handler3D.getUseMediaServiceImageCache());
38915
+ var config = planner.getSetData(true, _this4.plannerHandlerFunctions.doAllowSetPlanner(), false);
39396
38916
  var setData = config.constructionSet;
39397
38917
  plannerData.SCE.ROO[0].SET.push(setData);
39398
38918
  });
39399
38919
  } else {
39400
- var config = this.plannerList.get(setId).getSetData(true, this.plannerHandlerFunctions.doAllowSetPlanner(), false, this.handler3D.getUseMediaServiceImageCache());
38920
+ var config = this.plannerList.get(setId).getSetData(true, this.plannerHandlerFunctions.doAllowSetPlanner(), false);
39401
38921
  plannerData.SCE.ROO[0].SET.push(config.constructionSet);
39402
38922
  }
39403
38923
  return JSON.stringify(plannerData);
@@ -39424,7 +38944,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
39424
38944
  // let posInformation: any = {};
39425
38945
 
39426
38946
  this.plannerList.forEach(function (planner, setId) {
39427
- var config = planner.getSetData(false, _this5.plannerHandlerFunctions.doAllowSetPlanner(), false, _this5.handler3D.getUseMediaServiceImageCache());
38947
+ var config = planner.getSetData(false, _this5.plannerHandlerFunctions.doAllowSetPlanner(), false);
39428
38948
  plannerData.SCE.ROO[0].SET.push(config.constructionSet);
39429
38949
  });
39430
38950
  return md5(JSON.stringify(plannerData));
@@ -39479,7 +38999,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
39479
38999
  _defineProperty(this, "updatePlanner3DImage", void 0);
39480
39000
  _defineProperty(this, "setRotationOrbitCube", void 0);
39481
39001
  _defineProperty(this, "getCanvas2DAsJPG", void 0);
39482
- _defineProperty(this, "updateSirvViewer", void 0);
39483
39002
  _defineProperty(this, "updateFullscreenRendering", void 0);
39484
39003
  _defineProperty(this, "plannerHandler", void 0);
39485
39004
  _defineProperty(this, "updateSetImage", void 0);
@@ -39569,18 +39088,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
39569
39088
  if (rendering.getIsFullscreenRendering()) {
39570
39089
  _this.updateFullscreenRendering(rendering);
39571
39090
  } else {
39572
- if (_this.getCurPlannerViewMode() == 'SirvViewer_only') {
39573
- var _this$actSet, _this$updateSirvViewe, _this$actSet2;
39574
- (_this$actSet = _this.actSet()) === null || _this$actSet === void 0 || _this$actSet.getVariantBasketData();
39575
- (_this$updateSirvViewe = _this.updateSirvViewer) === null || _this$updateSirvViewe === void 0 || _this$updateSirvViewe.call(_this, rendering, (_this$actSet2 = _this.actSet()) === null || _this$actSet2 === void 0 ? void 0 : _this$actSet2.getArticleVariantValues());
39576
- } else {
39577
- var _this$actSet3;
39578
- _this.updatePlanner3DImage(rendering, ((_this$actSet3 = _this.actSet()) === null || _this$actSet3 === void 0 ? void 0 : _this$actSet3.getAlternateRenderInfo().length) > 0);
39579
- }
39091
+ var _this$actSet;
39092
+ _this.updatePlanner3DImage(rendering, ((_this$actSet = _this.actSet()) === null || _this$actSet === void 0 ? void 0 : _this$actSet.getAlternateRenderInfo().length) > 0);
39580
39093
  }
39581
39094
  if (_this.actions && (_this$state = _this.state) !== null && _this$state !== void 0 && _this$state.enableSupport) {
39582
- var _this$actSet4, _this$state$user, _this$state$user2, _this$state$user3;
39583
- _this.api.postPlanningInfo((_this$actSet4 = _this.actSet()) === null || _this$actSet4 === void 0 ? void 0 : _this$actSet4.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);
39095
+ var _this$actSet2, _this$state$user, _this$state$user2, _this$state$user3;
39096
+ _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);
39584
39097
  }
39585
39098
  });
39586
39099
  /**
@@ -40422,19 +39935,19 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40422
39935
  }, {
40423
39936
  key: "getDivaArticles",
40424
39937
  value: function getDivaArticles() {
40425
- var _this$actSet5;
40426
- return (_this$actSet5 = this.actSet()) === null || _this$actSet5 === void 0 ? void 0 : _this$actSet5.getDivaArticles();
39938
+ var _this$actSet3;
39939
+ return (_this$actSet3 = this.actSet()) === null || _this$actSet3 === void 0 ? void 0 : _this$actSet3.getDivaArticles();
40427
39940
  }
40428
39941
  }, {
40429
39942
  key: "getDimension",
40430
39943
  value: function () {
40431
39944
  var _getDimension = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee14() {
40432
- var _this$actSet6;
39945
+ var _this$actSet4;
40433
39946
  return _regeneratorRuntime.wrap(function _callee14$(_context14) {
40434
39947
  while (1) switch (_context14.prev = _context14.next) {
40435
39948
  case 0:
40436
39949
  _context14.next = 2;
40437
- return (_this$actSet6 = this.actSet()) === null || _this$actSet6 === void 0 ? void 0 : _this$actSet6.getDimensionPerVariant();
39950
+ return (_this$actSet4 = this.actSet()) === null || _this$actSet4 === void 0 ? void 0 : _this$actSet4.getDimensionPerVariant();
40438
39951
  case 2:
40439
39952
  return _context14.abrupt("return", _context14.sent);
40440
39953
  case 3:
@@ -40493,7 +40006,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40493
40006
  this.updateWebConfiguratorTitle();
40494
40007
  //initialize planner view
40495
40008
  (_this$updateViewPlann9 = this.updateViewPlannerElements) === null || _this$updateViewPlann9 === void 0 || _this$updateViewPlann9.call(this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set), set.getSetId(), set.firstElementId);
40496
- this.initCache();
40009
+ this.updatePlannerView('INIT_VIEW');
40497
40010
  this.onBasketInitialized();
40498
40011
  this.checkVariantData();
40499
40012
  case 17:
@@ -40513,8 +40026,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40513
40026
  }, {
40514
40027
  key: "updateWebConfiguratorTitle",
40515
40028
  value: function updateWebConfiguratorTitle() {
40516
- var _this$setWebConifgura, _this$actSet7;
40517
- (_this$setWebConifgura = this.setWebConifguratorTitle) === null || _this$setWebConifgura === void 0 || _this$setWebConifgura.call(this, (_this$actSet7 = this.actSet()) === null || _this$actSet7 === void 0 ? void 0 : _this$actSet7.getSetTitle());
40029
+ var _this$setWebConifgura, _this$actSet5;
40030
+ (_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());
40518
40031
  }
40519
40032
  }, {
40520
40033
  key: "updateConfigStructure",
@@ -40526,7 +40039,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40526
40039
  value: function () {
40527
40040
  var _runInitMode = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee16(plannerMode) {
40528
40041
  var _this$navigateToTabGr2;
40529
- var doDefault, configStepKey, _this$actSet8, _this$navigateToTabGr3, _this$navigateToTabGr4, _this$navigateToTabGr5;
40042
+ var doDefault, configStepKey, _this$actSet6, _this$navigateToTabGr3, _this$navigateToTabGr4, _this$navigateToTabGr5;
40530
40043
  return _regeneratorRuntime.wrap(function _callee16$(_context16) {
40531
40044
  while (1) switch (_context16.prev = _context16.next) {
40532
40045
  case 0:
@@ -40561,7 +40074,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40561
40074
  if (doDefault) {
40562
40075
  if (plannerMode == 'ProductList') {
40563
40076
  (_this$navigateToTabGr3 = this.navigateToTabGroup) === null || _this$navigateToTabGr3 === void 0 || _this$navigateToTabGr3.call(this, 'PRODUCTS');
40564
- } else if ((_this$actSet8 = this.actSet()) !== null && _this$actSet8 !== void 0 && _this$actSet8.hasStaticRoomList) {
40077
+ } else if ((_this$actSet6 = this.actSet()) !== null && _this$actSet6 !== void 0 && _this$actSet6.hasStaticRoomList) {
40565
40078
  (_this$navigateToTabGr4 = this.navigateToTabGroup) === null || _this$navigateToTabGr4 === void 0 || _this$navigateToTabGr4.call(this, 'ROOMLIST', true);
40566
40079
  } else {
40567
40080
  (_this$navigateToTabGr5 = this.navigateToTabGroup) === null || _this$navigateToTabGr5 === void 0 || _this$navigateToTabGr5.call(this, this.getCurPlannerType(true), true);
@@ -40578,24 +40091,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40578
40091
  }
40579
40092
  return runInitMode;
40580
40093
  }()
40581
- }, {
40582
- key: "initCache",
40583
- value: function initCache() {
40584
- //get cached image
40585
- var initFirstRenderingByCache = false;
40586
- if (DivaUtils.CacheIsEnabled) {
40587
- var firstImageUrl = DivaUtils.getCacheData('FIRSTIMAGE', '');
40588
- if (firstImageUrl) {
40589
- initFirstRenderingByCache = true;
40590
- var rendering = new Rendering('', '', '', -1, -1, false, false, 0, false, false, 'STREAM');
40591
- rendering.setHQRenderingUrl(firstImageUrl, this.api.getDiva3dUseSirvViewer());
40592
- this.updatePlannerRendering(rendering);
40593
- }
40594
- }
40595
- if (!initFirstRenderingByCache) {
40596
- this.updatePlannerView('INIT_VIEW');
40597
- }
40598
- }
40599
40094
  }, {
40600
40095
  key: "addSetToActPlanningByDivaNr",
40601
40096
  value: function () {
@@ -40809,7 +40304,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40809
40304
  setHandlerInstance.update3DPlannerView(true, true, set, this.getPlannerRenderingSize(), this.getPlanner3DGridEnabled(), 'STREAM', (_this$getDoShow3DDime2 = this.getDoShow3DDimensionLines) === null || _this$getDoShow3DDime2 === void 0 ? void 0 : _this$getDoShow3DDime2.call(this), alternateRenderInfo, viewpoint);
40810
40305
  break;
40811
40306
  case '3DImage':
40812
- case 'SirvViewer_only':
40813
40307
  //Request new Rendering
40814
40308
  setHandlerInstance.update3DPlannerView(true, !!this.doLoadHQR, set, this.getPlannerRenderingSize(), this.getPlanner3DGridEnabled(), 'STREAM', (_this$getDoShow3DDime3 = this.getDoShow3DDimensionLines) === null || _this$getDoShow3DDime3 === void 0 ? void 0 : _this$getDoShow3DDime3.call(this), alternateRenderInfo);
40815
40309
  break;
@@ -40856,8 +40350,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40856
40350
  }, {
40857
40351
  key: "getAlternateRenderingsForSummary",
40858
40352
  value: function getAlternateRenderingsForSummary() {
40859
- var _this$actSet9;
40860
- return (_this$actSet9 = this.actSet()) === null || _this$actSet9 === void 0 || (_this$actSet9 = _this$actSet9.CatalogData) === null || _this$actSet9 === void 0 ? void 0 : _this$actSet9.alternateRenderingsForSummary;
40353
+ var _this$actSet7;
40354
+ 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;
40861
40355
  }
40862
40356
  }, {
40863
40357
  key: "destroyWebPlanner",
@@ -41153,8 +40647,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41153
40647
  }, {
41154
40648
  key: "setDifferentOptions",
41155
40649
  value: function setDifferentOptions(options) {
41156
- var _this$actSet10;
41157
- (_this$actSet10 = this.actSet()) === null || _this$actSet10 === void 0 || _this$actSet10.setDifferentOptions(options);
40650
+ var _this$actSet8;
40651
+ (_this$actSet8 = this.actSet()) === null || _this$actSet8 === void 0 || _this$actSet8.setDifferentOptions(options);
41158
40652
  }
41159
40653
 
41160
40654
  /**
@@ -41531,7 +41025,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41531
41025
  * This function returns true if the Planner Mode should be visible and the planner Step should be shown.
41532
41026
  * The planner step is not shown if:
41533
41027
  * - There is no viewer Option set for the Planner
41534
- * - The configurator config disables the planner Step (SuS + Cache System)
41535
41028
  * - The box Planner is loaded
41536
41029
  */
41537
41030
  }, {
@@ -41552,8 +41045,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41552
41045
 
41553
41046
  //if planner is hidden by config but nothing is planned initially
41554
41047
  if (plannerType === 'NONE') {
41555
- var _this$plannerConfig$a7, _this$actSet11;
41556
- if (!this.plannerConfig.divaNr && this.plannerConfig.catalogCodex && !((_this$plannerConfig$a7 = this.plannerConfig.articleCodexes) !== null && _this$plannerConfig$a7 !== void 0 && _this$plannerConfig$a7.length) && !this.plannerConfig.productId && !this.plannerConfig.customProductId && !this.plannerConfig.basketData && !((_this$actSet11 = this.actSet()) !== null && _this$actSet11 !== void 0 && (_this$actSet11 = _this$actSet11.CatalogData.startPlannerArticle) !== null && _this$actSet11 !== void 0 && _this$actSet11.length)) {
41048
+ var _this$plannerConfig$a7, _this$actSet9;
41049
+ if (!this.plannerConfig.divaNr && this.plannerConfig.catalogCodex && !((_this$plannerConfig$a7 = this.plannerConfig.articleCodexes) !== null && _this$plannerConfig$a7 !== void 0 && _this$plannerConfig$a7.length) && !this.plannerConfig.productId && !this.plannerConfig.customProductId && !this.plannerConfig.basketData && !((_this$actSet9 = this.actSet()) !== null && _this$actSet9 !== void 0 && (_this$actSet9 = _this$actSet9.CatalogData.startPlannerArticle) !== null && _this$actSet9 !== void 0 && _this$actSet9.length)) {
41557
41050
  plannerType = 'PLANNER';
41558
41051
  }
41559
41052
  }
@@ -41593,38 +41086,38 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41593
41086
  }, {
41594
41087
  key: "getCurCatalogCodex",
41595
41088
  value: function getCurCatalogCodex() {
41596
- var _this$actSet12;
41597
- return (_this$actSet12 = this.actSet()) === null || _this$actSet12 === void 0 ? void 0 : _this$actSet12.getCatalogCodex();
41089
+ var _this$actSet10;
41090
+ return (_this$actSet10 = this.actSet()) === null || _this$actSet10 === void 0 ? void 0 : _this$actSet10.getCatalogCodex();
41598
41091
  }
41599
41092
  }, {
41600
41093
  key: "getCurCatalogName",
41601
41094
  value: function getCurCatalogName() {
41602
- var _this$actSet13;
41603
- return (_this$actSet13 = this.actSet()) === null || _this$actSet13 === void 0 ? void 0 : _this$actSet13.getCatalogName();
41095
+ var _this$actSet11;
41096
+ return (_this$actSet11 = this.actSet()) === null || _this$actSet11 === void 0 ? void 0 : _this$actSet11.getCatalogName();
41604
41097
  }
41605
41098
  }, {
41606
41099
  key: "getCurAccountName",
41607
41100
  value: function getCurAccountName() {
41608
- var _this$actSet14;
41609
- return (_this$actSet14 = this.actSet()) === null || _this$actSet14 === void 0 ? void 0 : _this$actSet14.getAccountName();
41101
+ var _this$actSet12;
41102
+ return (_this$actSet12 = this.actSet()) === null || _this$actSet12 === void 0 ? void 0 : _this$actSet12.getAccountName();
41610
41103
  }
41611
41104
  }, {
41612
41105
  key: "getCurSupplierGuid",
41613
41106
  value: function getCurSupplierGuid() {
41614
- var _this$actSet15;
41615
- return (_this$actSet15 = this.actSet()) === null || _this$actSet15 === void 0 ? void 0 : _this$actSet15.getSupplierGuid();
41107
+ var _this$actSet13;
41108
+ return (_this$actSet13 = this.actSet()) === null || _this$actSet13 === void 0 ? void 0 : _this$actSet13.getSupplierGuid();
41616
41109
  }
41617
41110
  }, {
41618
41111
  key: "getCurSetPrice",
41619
41112
  value: function getCurSetPrice() {
41620
- var _this$actSet$getSetPr, _this$actSet16;
41621
- return (_this$actSet$getSetPr = (_this$actSet16 = this.actSet()) === null || _this$actSet16 === void 0 ? void 0 : _this$actSet16.getSetPrice()) !== null && _this$actSet$getSetPr !== void 0 ? _this$actSet$getSetPr : 0;
41113
+ var _this$actSet$getSetPr, _this$actSet14;
41114
+ return (_this$actSet$getSetPr = (_this$actSet14 = this.actSet()) === null || _this$actSet14 === void 0 ? void 0 : _this$actSet14.getSetPrice()) !== null && _this$actSet$getSetPr !== void 0 ? _this$actSet$getSetPr : 0;
41622
41115
  }
41623
41116
  }, {
41624
41117
  key: "getCurImageMode",
41625
41118
  value: function getCurImageMode() {
41626
- var _this$actSet17;
41627
- return (_this$actSet17 = this.actSet()) !== null && _this$actSet17 !== void 0 && (_this$actSet17 = _this$actSet17.CatalogData) !== null && _this$actSet17 !== void 0 && _this$actSet17.has3dModels ? '3D' : '2D';
41119
+ var _this$actSet15;
41120
+ return (_this$actSet15 = this.actSet()) !== null && _this$actSet15 !== void 0 && (_this$actSet15 = _this$actSet15.CatalogData) !== null && _this$actSet15 !== void 0 && _this$actSet15.has3dModels ? '3D' : '2D';
41628
41121
  }
41629
41122
  }, {
41630
41123
  key: "getViewConfig",
@@ -41655,73 +41148,63 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41655
41148
  }, {
41656
41149
  key: "doShow3DDimensionLines",
41657
41150
  value: function doShow3DDimensionLines() {
41658
- var _this$actSet18;
41659
- return (_this$actSet18 = this.actSet()) === null || _this$actSet18 === void 0 || (_this$actSet18 = _this$actSet18.CatalogData) === null || _this$actSet18 === void 0 ? void 0 : _this$actSet18.doShow3DDimensionLines;
41151
+ var _this$actSet16;
41152
+ return (_this$actSet16 = this.actSet()) === null || _this$actSet16 === void 0 || (_this$actSet16 = _this$actSet16.CatalogData) === null || _this$actSet16 === void 0 ? void 0 : _this$actSet16.doShow3DDimensionLines;
41660
41153
  }
41661
41154
  }, {
41662
41155
  key: "hidePlannerUiIcons",
41663
41156
  value: function hidePlannerUiIcons() {
41664
- var _this$actSet19;
41665
- return (_this$actSet19 = this.actSet()) === null || _this$actSet19 === void 0 || (_this$actSet19 = _this$actSet19.CatalogData) === null || _this$actSet19 === void 0 ? void 0 : _this$actSet19.hidePlannerUiIcons;
41157
+ var _this$actSet17;
41158
+ return (_this$actSet17 = this.actSet()) === null || _this$actSet17 === void 0 || (_this$actSet17 = _this$actSet17.CatalogData) === null || _this$actSet17 === void 0 ? void 0 : _this$actSet17.hidePlannerUiIcons;
41666
41159
  }
41667
41160
  }, {
41668
41161
  key: "doShowPlannerReplaceMode",
41669
41162
  value: function doShowPlannerReplaceMode() {
41670
- var _this$actSet20, _this$api$getViewConf2, _catalogData$PlannerP, _catalogData$PlannerP2;
41671
- var catalogData = (_this$actSet20 = this.actSet()) === null || _this$actSet20 === void 0 ? void 0 : _this$actSet20.CatalogData;
41163
+ var _this$actSet18, _this$api$getViewConf2, _catalogData$PlannerP, _catalogData$PlannerP2;
41164
+ var catalogData = (_this$actSet18 = this.actSet()) === null || _this$actSet18 === void 0 ? void 0 : _this$actSet18.CatalogData;
41672
41165
  return (catalogData === null || catalogData === void 0 ? void 0 : catalogData.replaceModeActive) && ((_this$api$getViewConf2 = this.api.getViewConfig()) === null || _this$api$getViewConf2 === void 0 ? void 0 : _this$api$getViewConf2.showReplaceFunctionInPlanner) && Object.entries(catalogData.allCatalogPlannerArticles).length > 1 && Object.entries((_catalogData$PlannerP = (_catalogData$PlannerP2 = catalogData.PlannerPaletteViewInfo) === null || _catalogData$PlannerP2 === void 0 ? void 0 : _catalogData$PlannerP2.catalogPlannerArticles) !== null && _catalogData$PlannerP !== void 0 ? _catalogData$PlannerP : {}).length > 1;
41673
41166
  }
41674
41167
  }, {
41675
41168
  key: "doPlannerReplaceAutoSwitch",
41676
41169
  value: function doPlannerReplaceAutoSwitch() {
41677
- var _this$actSet21, _this$api$getViewConf3;
41678
- var catalogData = (_this$actSet21 = this.actSet()) === null || _this$actSet21 === void 0 ? void 0 : _this$actSet21.CatalogData;
41170
+ var _this$actSet19, _this$api$getViewConf3;
41171
+ var catalogData = (_this$actSet19 = this.actSet()) === null || _this$actSet19 === void 0 ? void 0 : _this$actSet19.CatalogData;
41679
41172
  return (catalogData === null || catalogData === void 0 ? void 0 : catalogData.catalogPlannsCompletely) && this.doShowPlannerReplaceMode() && ((_this$api$getViewConf3 = this.api.getViewConfig()) === null || _this$api$getViewConf3 === void 0 ? void 0 : _this$api$getViewConf3.allowAutoSwitchInReplaceFunctionInPlanner);
41680
41173
  }
41681
41174
  }, {
41682
41175
  key: "getHidePlanner",
41683
41176
  value: function getHidePlanner() {
41684
- var _this$actSet22;
41685
- return this.api.getHidePlanner() || !!((_this$actSet22 = this.actSet()) !== null && _this$actSet22 !== void 0 && _this$actSet22.CatalogData.useBoxPlanner);
41177
+ var _this$actSet20;
41178
+ return this.api.getHidePlanner() || !!((_this$actSet20 = this.actSet()) !== null && _this$actSet20 !== void 0 && _this$actSet20.CatalogData.useBoxPlanner);
41686
41179
  }
41687
41180
  }, {
41688
41181
  key: "getAllowRTV",
41689
41182
  value: function getAllowRTV() {
41690
- var _this$actSet23, _this$actSet24;
41691
- if ((_this$actSet23 = this.actSet()) !== null && _this$actSet23 !== void 0 && _this$actSet23.CatalogData.divaForceRTV) return true;
41692
- if (this.api.getDoShowRTV() && (_this$actSet24 = this.actSet()) !== null && _this$actSet24 !== void 0 && _this$actSet24.CatalogData.divaArReady) return true;
41183
+ var _this$actSet21, _this$actSet22;
41184
+ if ((_this$actSet21 = this.actSet()) !== null && _this$actSet21 !== void 0 && _this$actSet21.CatalogData.divaForceRTV) return true;
41185
+ if (this.api.getDoShowRTV() && (_this$actSet22 = this.actSet()) !== null && _this$actSet22 !== void 0 && _this$actSet22.CatalogData.divaArReady) return true;
41693
41186
  return false;
41694
41187
  }
41695
41188
  }, {
41696
41189
  key: "geAllowQRCodeAR",
41697
41190
  value: function geAllowQRCodeAR() {
41698
- var _this$actSet25;
41699
- if (this.api.getDoShowAR() && (_this$actSet25 = this.actSet()) !== null && _this$actSet25 !== void 0 && _this$actSet25.CatalogData.divaArReady) return true;
41191
+ var _this$actSet23;
41192
+ if (this.api.getDoShowAR() && (_this$actSet23 = this.actSet()) !== null && _this$actSet23 !== void 0 && _this$actSet23.CatalogData.divaArReady) return true;
41700
41193
  return false;
41701
41194
  }
41702
41195
  }, {
41703
41196
  key: "getEnableUnityRtvKombi",
41704
41197
  value: function getEnableUnityRtvKombi() {
41705
- var _this$actSet26;
41198
+ var _this$actSet24;
41706
41199
  // if force rtv disable unity kombi - biohort
41707
- if ((_this$actSet26 = this.actSet()) !== null && _this$actSet26 !== void 0 && _this$actSet26.CatalogData.divaForceRTV) return false;
41200
+ if ((_this$actSet24 = this.actSet()) !== null && _this$actSet24 !== void 0 && _this$actSet24.CatalogData.divaForceRTV) return false;
41708
41201
  return this.api.getEnableRTVUnityKombi();
41709
41202
  }
41710
41203
  }, {
41711
41204
  key: "getShelfPlannerRTV",
41712
41205
  value: function getShelfPlannerRTV() {
41713
- var _this$actSet27;
41714
- return (_this$actSet27 = this.actSet()) === null || _this$actSet27 === void 0 ? void 0 : _this$actSet27.CatalogData.useShelfPlannerRTV;
41715
- }
41716
- }, {
41717
- key: "getDiva3DSuppressCacheCreation",
41718
- value: function getDiva3DSuppressCacheCreation() {
41719
- return this.api.getDiva3DSuppressCacheCreation();
41720
- }
41721
- }, {
41722
- key: "getDiva3dUseImageCache",
41723
- value: function getDiva3dUseImageCache() {
41724
- return this.api.getDiva3dUseImageCache();
41206
+ var _this$actSet25;
41207
+ return (_this$actSet25 = this.actSet()) === null || _this$actSet25 === void 0 ? void 0 : _this$actSet25.CatalogData.useShelfPlannerRTV;
41725
41208
  }
41726
41209
  }, {
41727
41210
  key: "getBasketData",
@@ -41762,8 +41245,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41762
41245
  }, {
41763
41246
  key: "getCatalogData",
41764
41247
  value: function getCatalogData() {
41765
- var _this$actSet28;
41766
- return (_this$actSet28 = this.actSet()) === null || _this$actSet28 === void 0 ? void 0 : _this$actSet28.CatalogData;
41248
+ var _this$actSet26;
41249
+ return (_this$actSet26 = this.actSet()) === null || _this$actSet26 === void 0 ? void 0 : _this$actSet26.CatalogData;
41767
41250
  }
41768
41251
  }, {
41769
41252
  key: "ReturnTo",
@@ -42044,11 +41527,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
42044
41527
  value: function registerGetCanvas2DAsJPG(getCanvas2DAsJPG) {
42045
41528
  this.getCanvas2DAsJPG = getCanvas2DAsJPG;
42046
41529
  }
42047
- }, {
42048
- key: "registerUpdateSirvViewer",
42049
- value: function registerUpdateSirvViewer(updateSirvViewer) {
42050
- this.updateSirvViewer = updateSirvViewer;
42051
- }
42052
41530
  }, {
42053
41531
  key: "registerUpdatePlanner2DGrid",
42054
41532
  value: function registerUpdatePlanner2DGrid(updatePlanner2DGrid) {
@@ -42516,7 +41994,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
42516
41994
  this.updatePlanner3DImage = undefined;
42517
41995
  this.setRotationOrbitCube = undefined;
42518
41996
  this.getCanvas2DAsJPG = undefined;
42519
- this.updateSirvViewer = undefined;
42520
41997
  this.updatePlannerMsgContainer = undefined;
42521
41998
  this.updateFullscreenRendering = undefined;
42522
41999
  this.updateSetImage = undefined;
@@ -42957,6 +42434,8 @@ var Grid = /*#__PURE__*/function () {
42957
42434
  // E.g: "Grid Left" or "Grid Middle" or "Grid Right"
42958
42435
  _defineProperty(this, "gridName", void 0);
42959
42436
  _defineProperty(this, "maxAccessoireInGridCounter", void 0);
42437
+ //only one array of accessoires is plannable together in one grid. the accessoires of the mid array exclude each other. The outer array is for te usage of this rule in different usecases.
42438
+ _defineProperty(this, "excludeAccessoiresByAccessoiresInGrid", void 0);
42960
42439
  _defineProperty(this, "influencedByNeighborGrids", void 0);
42961
42440
  _defineProperty(this, "influencedByOverlappingGrids", void 0);
42962
42441
  var grid = data.ShelfPlanner[index];
@@ -42972,6 +42451,7 @@ var Grid = /*#__PURE__*/function () {
42972
42451
  this.requiredWarning = grid.RequiredWarning;
42973
42452
  this.gridName = grid.GridName;
42974
42453
  this.maxAccessoireInGridCounter = grid.MaxAccessoireInGridCounter;
42454
+ this.excludeAccessoiresByAccessoiresInGrid = grid.ExcludeAccessoiresByAccessoiresInGrid;
42975
42455
  this.influencedByNeighborGrids = grid.InfluencedByNeighborGrids;
42976
42456
  this.influencedByOverlappingGrids = grid.InfluencedByOverlappingGrids;
42977
42457
  this._group = grid.Group;
@@ -42984,8 +42464,9 @@ var Grid = /*#__PURE__*/function () {
42984
42464
  for (var i = 0; i < this.heightGridCellCountOnRule.length; i++) {
42985
42465
  var gridOnRule = this.heightGridCellCountOnRule[i];
42986
42466
  if (this.article.evalRule(DivaUtils.getRuleByFormula(gridOnRule.Rule))) {
42987
- cellCount = gridOnRule.HeightGridCellCount;
42988
- this.articleRelations = gridOnRule.ArticleRelations;
42467
+ var _gridOnRule$HeightGri, _gridOnRule$ArticleRe;
42468
+ cellCount = (_gridOnRule$HeightGri = gridOnRule.HeightGridCellCount) !== null && _gridOnRule$HeightGri !== void 0 ? _gridOnRule$HeightGri : grid.HeightGridCellCount;
42469
+ this.articleRelations = (_gridOnRule$ArticleRe = gridOnRule.ArticleRelations) !== null && _gridOnRule$ArticleRe !== void 0 ? _gridOnRule$ArticleRe : grid.ArticleRelations;
42989
42470
  if (gridOnRule.initAccArr) this.initAccArr = gridOnRule.initAccArr;
42990
42471
  this.currentLoadedRuleIndex = i;
42991
42472
  }
@@ -43657,7 +43138,7 @@ var Grid = /*#__PURE__*/function () {
43657
43138
  key: "getFreeSpacesOfAccessoire",
43658
43139
  value: function getFreeSpacesOfAccessoire(accessoire) {
43659
43140
  var size = accessoire.shelfHeight;
43660
- if (!size || this.disabledByRule || this.maxAccessoireCountReached(accessoire)) return [];
43141
+ if (!size || this.disabledByRule || this.checkAccessoireInGridRules(accessoire)) return [];
43661
43142
  var freeCells = [];
43662
43143
  for (var i = 0; i < this.Cells.length; i++) {
43663
43144
  var _cell$Article4;
@@ -43692,22 +43173,51 @@ var Grid = /*#__PURE__*/function () {
43692
43173
  return _toConsumableArray(new Set(freeCells));
43693
43174
  }
43694
43175
  }, {
43695
- key: "maxAccessoireCountReached",
43696
- value: function maxAccessoireCountReached(accessoire) {
43697
- var _this$maxAccessoireIn;
43698
- if (!((_this$maxAccessoireIn = this.maxAccessoireInGridCounter) !== null && _this$maxAccessoireIn !== void 0 && _this$maxAccessoireIn.length)) return false;
43699
- for (var i = 0; i < this.maxAccessoireInGridCounter.length; i++) {
43700
- var rule = this.maxAccessoireInGridCounter[i];
43701
- var counter = 0;
43702
- if (rule.accessoires.includes(accessoire.articleCodex)) {
43703
- var currentAccessoires = Object.values(this.Accessoires);
43704
- for (var j = 0; j < currentAccessoires.length; j++) {
43705
- var curAcc = currentAccessoires[j];
43706
- if (rule.accessoires.includes(curAcc.articleCodex)) {
43707
- counter = counter + curAcc.quantity;
43176
+ key: "checkAccessoireInGridRules",
43177
+ value: function checkAccessoireInGridRules(accessoire) {
43178
+ var _this$maxAccessoireIn, _this$excludeAccessoi;
43179
+ //max count in grid logic
43180
+ if ((_this$maxAccessoireIn = this.maxAccessoireInGridCounter) !== null && _this$maxAccessoireIn !== void 0 && _this$maxAccessoireIn.length) {
43181
+ for (var i = 0; i < this.maxAccessoireInGridCounter.length; i++) {
43182
+ var rule = this.maxAccessoireInGridCounter[i];
43183
+ var counter = 0;
43184
+ if (rule.accessoires.includes(accessoire.articleCodex)) {
43185
+ var currentAccessoires = Object.values(this.Accessoires);
43186
+ for (var j = 0; j < currentAccessoires.length; j++) {
43187
+ var curAcc = currentAccessoires[j];
43188
+ if (rule.accessoires.includes(curAcc.articleCodex)) {
43189
+ counter = counter + curAcc.quantity;
43190
+ }
43191
+ }
43192
+ if (counter >= rule.maxCount) return true;
43193
+ }
43194
+ }
43195
+ }
43196
+
43197
+ //accessories excluded eachother
43198
+ if ((_this$excludeAccessoi = this.excludeAccessoiresByAccessoiresInGrid) !== null && _this$excludeAccessoi !== void 0 && _this$excludeAccessoi.length) {
43199
+ var excludeAccessoiresGroup = this.excludeAccessoiresByAccessoiresInGrid;
43200
+ for (var _j2 = 0; _j2 < excludeAccessoiresGroup.length; _j2++) {
43201
+ var plannedAccessoireIndex = -1;
43202
+ var excludeAccessoires = excludeAccessoiresGroup[_j2];
43203
+ for (var _i16 = 0; _i16 < excludeAccessoires.length; _i16++) {
43204
+ var accessoireArray = excludeAccessoires[_i16];
43205
+ for (var basketId in this.Accessoires) {
43206
+ var palnnedAccessoire = this.Accessoires[basketId];
43207
+ if (accessoireArray.includes(palnnedAccessoire.articleCodex)) {
43208
+ plannedAccessoireIndex = _i16;
43209
+ break;
43210
+ }
43211
+ }
43212
+ if (plannedAccessoireIndex >= 0) break;
43213
+ }
43214
+ if (plannedAccessoireIndex >= 0) {
43215
+ for (var _i17 = 0; _i17 < excludeAccessoires.length; _i17++) {
43216
+ var _accessoireArray = excludeAccessoires[_i17];
43217
+ if (plannedAccessoireIndex == _i17) continue;
43218
+ if (_accessoireArray.includes(accessoire.articleCodex)) return true;
43708
43219
  }
43709
43220
  }
43710
- if (counter >= rule.maxCount) return true;
43711
43221
  }
43712
43222
  }
43713
43223
  return false;
@@ -43752,16 +43262,16 @@ var Grid = /*#__PURE__*/function () {
43752
43262
  }
43753
43263
  }
43754
43264
  if ((_this$influencedByNei = this.influencedByNeighborGrids) !== null && _this$influencedByNei !== void 0 && _this$influencedByNei.length) {
43755
- for (var _i16 = 0; _i16 < this.influencedByNeighborGrids.length; _i16++) {
43265
+ for (var _i18 = 0; _i18 < this.influencedByNeighborGrids.length; _i18++) {
43756
43266
  var _this$article$shelfPl2;
43757
- var _influenced = this.influencedByNeighborGrids[_i16];
43267
+ var _influenced = this.influencedByNeighborGrids[_i18];
43758
43268
  var neighborGrid = (_this$article$shelfPl2 = this.article.shelfPlanner) === null || _this$article$shelfPl2 === void 0 ? void 0 : _this$article$shelfPl2.getGridByGridName(_influenced.GridName);
43759
43269
  var _ret = false;
43760
43270
  if (!neighborGrid) continue;
43761
43271
  if (neighborGrid.Direction === this.Direction) {
43762
- for (var _j2 = 0; _j2 < size; _j2++) {
43272
+ for (var _j3 = 0; _j3 < size; _j3++) {
43763
43273
  var _cell$Article5;
43764
- var cell = neighborGrid.cells[_j2 + index];
43274
+ var cell = neighborGrid.cells[_j3 + index];
43765
43275
  if ((cell === null || cell === void 0 ? void 0 : cell.InUse) !== -1 && ((_cell$Article5 = cell.Article) === null || _cell$Article5 === void 0 ? void 0 : _cell$Article5.basketId) !== accessoire.basketId) {
43766
43276
  _ret = true;
43767
43277
  }
@@ -43864,19 +43374,20 @@ var Grid = /*#__PURE__*/function () {
43864
43374
  });
43865
43375
  if (alternative) return alternative.ArticleRelations;
43866
43376
  if (this.heightGridCellCountOnRule && this.currentLoadedRuleIndex !== false) {
43867
- return this.heightGridCellCountOnRule[this.currentLoadedRuleIndex].ArticleRelations;
43377
+ var curGrid = this.heightGridCellCountOnRule[this.currentLoadedRuleIndex];
43378
+ if (curGrid.ArticleRelations) return curGrid.ArticleRelations;
43868
43379
  }
43869
43380
  return this.articleRelations;
43870
43381
  }
43871
43382
  }, {
43872
43383
  key: "getGridIdByArticleCodex",
43873
43384
  value: function getGridIdByArticleCodex(articleCodex) {
43874
- var _this$ArticleRelation3;
43385
+ var _this$ArticleRelation3, _this$heightGridCellC;
43875
43386
  var alternative = (_this$ArticleRelation3 = this.ArticleRelationsForOtherGroups) === null || _this$ArticleRelation3 === void 0 ? void 0 : _this$ArticleRelation3.find(function (g) {
43876
43387
  return g.ArticleRelations.includes(articleCodex);
43877
43388
  });
43878
43389
  if (alternative) return alternative.Group;
43879
- if (this.heightGridCellCountOnRule && this.currentLoadedRuleIndex !== false && this.heightGridCellCountOnRule[this.currentLoadedRuleIndex].ArticleRelations.includes(articleCodex)) {
43390
+ if (this.heightGridCellCountOnRule && this.currentLoadedRuleIndex !== false && (_this$heightGridCellC = this.heightGridCellCountOnRule[this.currentLoadedRuleIndex].ArticleRelations) !== null && _this$heightGridCellC !== void 0 && _this$heightGridCellC.includes(articleCodex)) {
43880
43391
  return this.gridGroup;
43881
43392
  }
43882
43393
  if (this.articleRelations.includes(articleCodex)) {
@@ -59867,7 +59378,7 @@ var ProductHandler = /*#__PURE__*/function () {
59867
59378
  */
59868
59379
  _defineProperty(this, "loadProducts", /*#__PURE__*/function () {
59869
59380
  var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(_ref3) {
59870
- var _productData$length, _basket$OrderSets, _baseProduct, _baseProduct2, _baseProduct3, _baseProduct4, _baseProduct5, _baseProduct6, _baseProduct7, _baseProduct8, _baseProduct9, _baseProduct10, _baseProduct11, _baseProduct$width, _baseProduct12, _basket$SetPlannerInf, _basket$OrderSets$0$B, _baseProduct$height, _baseProduct13, _basket$SetPlannerInf2, _basket$OrderSets$0$B2, _baseProduct$depth, _baseProduct14, _basket$SetPlannerInf3, _basket$OrderSets$0$B3, _basket$SetPlannerInf4, _basket$SetPlannerInf5, _baseProduct15, _baseProduct16, _baseProduct17, _baseProduct18;
59381
+ var _productData$length, _basket$OrderSets, _baseProduct, _baseProduct2, _baseProduct3, _baseProduct4, _baseProduct5, _baseProduct6, _baseProduct7, _baseProduct8, _baseProduct9, _baseProduct10, _baseProduct11, _baseProduct$width, _baseProduct12, _basket$SetPlannerInf, _basket$OrderSets$0$B, _baseProduct$height, _baseProduct13, _basket$SetPlannerInf2, _basket$OrderSets$0$B2, _baseProduct$depth, _baseProduct14, _basket$SetPlannerInf3, _basket$OrderSets$0$B3, _basket$SetPlannerInf4, _basket$SetPlannerInf5, _baseProduct15, _baseProduct16, _baseProduct17;
59871
59382
  var basket, catalogData, productData, classificationFields, products, baseProduct, variantProducts, isSet, dockingPoints, orderDescription, catalogDataName, catalogDataDescription, setName, _ProductHandler$calcu, shortDescription, shortDescriptionModified, _ProductHandler$calcu2, addedPrice, addedPriceModified, articles, baseData, classificationData, variantData, variantDataModified, addedProducts, removedProducts, optFields, initialSelectedFields, _basket$OrderSets$0$C2, usedConfigVariants, differingOPTs, _basket$OrderSets$0$C3, opts, i;
59872
59383
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
59873
59384
  while (1) switch (_context2.prev = _context2.next) {
@@ -59979,10 +59490,9 @@ var ProductHandler = /*#__PURE__*/function () {
59979
59490
  mainCategory: _this.mainCategory,
59980
59491
  subCategory: _this.subCategory,
59981
59492
  retailerArticleNr: (_baseProduct15 = baseProduct) === null || _baseProduct15 === void 0 ? void 0 : _baseProduct15.retailerArticleNr,
59982
- available: ((_baseProduct16 = baseProduct) === null || _baseProduct16 === void 0 ? void 0 : _baseProduct16.available) != undefined ? baseProduct.available : false,
59983
59493
  dockingPoints: dockingPoints,
59984
- media: (_baseProduct17 = baseProduct) === null || _baseProduct17 === void 0 ? void 0 : _baseProduct17.media,
59985
- affiliate: (_baseProduct18 = baseProduct) === null || _baseProduct18 === void 0 ? void 0 : _baseProduct18.affiliate
59494
+ media: (_baseProduct16 = baseProduct) === null || _baseProduct16 === void 0 ? void 0 : _baseProduct16.media,
59495
+ affiliate: (_baseProduct17 = baseProduct) === null || _baseProduct17 === void 0 ? void 0 : _baseProduct17.affiliate
59986
59496
  }; //get classification data and remove field prefix
59987
59497
  classificationData = _this.parseClassificationFields(baseProduct, true); // init Variants
59988
59498
  variantData = [];
@@ -60464,11 +59974,6 @@ _defineProperty(ProductHandler, "baseDataFields", [{
60464
59974
  type: 'text',
60465
59975
  title: 'productcreator.fields.technicalDescription',
60466
59976
  fieldType: 'BASE'
60467
- }, {
60468
- field: 'available',
60469
- type: 'boolean',
60470
- title: 'productcreator.fields.available',
60471
- fieldType: 'BASE'
60472
59977
  }, {
60473
59978
  field: 'calculatedPrice',
60474
59979
  type: 'price',