@crystaldesign/web-planner-logic 24.10.0-beta.9 → 24.10.0-rc.2

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 (93) hide show
  1. package/build/cjs/{DivaBoxPlanner-ce0b5ccf.js → DivaBoxPlanner-fc403f96.js} +16 -18
  2. package/build/cjs/{DivaStandardPlanner-11d92ddc.js → DivaStandardPlanner-381861d5.js} +26 -30
  3. package/build/cjs/{DoorPlanner-157f3b83.js → DoorPlanner-4534b32f.js} +1 -1
  4. package/build/cjs/{Host3DSignalR-973eb29d.js → Host3DSignalR-e6cae920.js} +1 -6
  5. package/build/cjs/{LiviqueWWSHandler-175ace96.js → LiviqueWWSHandler-9bc80b98.js} +1 -1
  6. package/build/cjs/{PfisterWWSHandler-b5b08965.js → PfisterWWSHandler-24c470e2.js} +1 -1
  7. package/build/cjs/{PlannerHandler2D-8b2718d9.js → PlannerHandler2D-fbc28e95.js} +1249 -10
  8. package/build/cjs/{ProductBasketHandler-b37e5eb2.js → ProductBasketHandler-08dcf24e.js} +1 -1
  9. package/build/cjs/{SeriousBasketHandler-9d531962.js → SeriousBasketHandler-a4647e89.js} +1 -1
  10. package/build/cjs/{ShelfPlanner-f8f7b3c2.js → ShelfPlanner-561be11e.js} +5 -5
  11. package/build/cjs/{StandardWWSHandler-e322419c.js → StandardWWSHandler-e211a327.js} +1 -1
  12. package/build/cjs/{index-91696556.js → index-4d5cef6f.js} +1109 -1641
  13. package/build/cjs/index.js +1 -1
  14. package/build/esm/{DivaBoxPlanner-162f61b3.js → DivaBoxPlanner-8ef0722c.js} +5 -7
  15. package/build/esm/{DivaStandardPlanner-bb2a6560.js → DivaStandardPlanner-19cc5ac0.js} +5 -9
  16. package/build/esm/{DoorPlanner-dfcc1e9b.js → DoorPlanner-c3fe5ecf.js} +1 -1
  17. package/build/esm/{Host3DSignalR-08117df5.js → Host3DSignalR-5d78c3f5.js} +1 -6
  18. package/build/esm/{LiviqueWWSHandler-ab108660.js → LiviqueWWSHandler-2f2cc617.js} +1 -1
  19. package/build/esm/{PfisterWWSHandler-28dd4770.js → PfisterWWSHandler-701e95ee.js} +1 -1
  20. package/build/esm/{PlannerHandler2D-bc825497.js → PlannerHandler2D-bf892db2.js} +1245 -8
  21. package/build/esm/{ProductBasketHandler-56d310f8.js → ProductBasketHandler-a1dd8bb2.js} +1 -1
  22. package/build/esm/{SeriousBasketHandler-7d8bdefe.js → SeriousBasketHandler-d5b6a347.js} +1 -1
  23. package/build/esm/{ShelfPlanner-ff88c9d8.js → ShelfPlanner-e3b31a33.js} +5 -5
  24. package/build/esm/{StandardWWSHandler-8b217a8f.js → StandardWWSHandler-d2f8cb1c.js} +1 -1
  25. package/build/esm/{index-999a0e8c.js → index-bbda3bc5.js} +1109 -1641
  26. package/build/esm/index.js +1 -1
  27. package/build/types/web-planner-logic/src/interface/API/TemplateConfigType.d.ts +6 -6
  28. package/build/types/web-planner-logic/src/interface/API/TemplateConfigType.d.ts.map +1 -1
  29. package/build/types/web-planner-logic/src/interface/API/ViewConfigDataType.d.ts +2 -5
  30. package/build/types/web-planner-logic/src/interface/API/ViewConfigDataType.d.ts.map +1 -1
  31. package/build/types/web-planner-logic/src/interface/AdditionalModelInfos.d.ts +6 -14
  32. package/build/types/web-planner-logic/src/interface/AdditionalModelInfos.d.ts.map +1 -1
  33. package/build/types/web-planner-logic/src/interface/Configuration.d.ts +1 -3
  34. package/build/types/web-planner-logic/src/interface/Configuration.d.ts.map +1 -1
  35. package/build/types/web-planner-logic/src/interface/CoreTypes/index.d.ts +1 -1
  36. package/build/types/web-planner-logic/src/interface/CoreTypes/index.d.ts.map +1 -1
  37. package/build/types/web-planner-logic/src/interface/FunctionTypes/index.d.ts +1 -1
  38. package/build/types/web-planner-logic/src/interface/FunctionTypes/index.d.ts.map +1 -1
  39. package/build/types/web-planner-logic/src/interface/OptionTypes/ArticleOptionDataTypes.d.ts +0 -1
  40. package/build/types/web-planner-logic/src/interface/OptionTypes/ArticleOptionDataTypes.d.ts.map +1 -1
  41. package/build/types/web-planner-logic/src/interface/Planner/IDivaPlanner.d.ts +1 -2
  42. package/build/types/web-planner-logic/src/interface/Planner/IDivaPlanner.d.ts.map +1 -1
  43. package/build/types/web-planner-logic/src/interface/Planner/IDivaSetPlanner.d.ts +1 -3
  44. package/build/types/web-planner-logic/src/interface/Planner/IDivaSetPlanner.d.ts.map +1 -1
  45. package/build/types/web-planner-logic/src/logic/Article/ArticleOptionState.d.ts +0 -1
  46. package/build/types/web-planner-logic/src/logic/Article/ArticleOptionState.d.ts.map +1 -1
  47. package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts +1 -3
  48. package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts.map +1 -1
  49. package/build/types/web-planner-logic/src/logic/Basket/DivaBasketHandler.d.ts.map +1 -1
  50. package/build/types/web-planner-logic/src/logic/ConfigTree/DivaConfigTree.d.ts.map +1 -1
  51. package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlannerGrid.d.ts +1 -1
  52. package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlannerGrid.d.ts.map +1 -1
  53. package/build/types/web-planner-logic/src/logic/DivaApiHandler.d.ts +2 -3
  54. package/build/types/web-planner-logic/src/logic/DivaApiHandler.d.ts.map +1 -1
  55. package/build/types/web-planner-logic/src/logic/DivaCatalogHandler.d.ts.map +1 -1
  56. package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts +1 -12
  57. package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts.map +1 -1
  58. package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/DivaBoxPlanner.d.ts +1 -2
  59. package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/DivaBoxPlanner.d.ts.map +1 -1
  60. package/build/types/web-planner-logic/src/logic/Planner/DivaPlannerHandler.d.ts.map +1 -1
  61. package/build/types/web-planner-logic/src/logic/Planner/DivaStandardPlanner.d.ts +1 -2
  62. package/build/types/web-planner-logic/src/logic/Planner/DivaStandardPlanner.d.ts.map +1 -1
  63. package/build/types/web-planner-logic/src/logic/Planner/Rendering/DivaMediaServiceHandler.d.ts +0 -1
  64. package/build/types/web-planner-logic/src/logic/Planner/Rendering/DivaMediaServiceHandler.d.ts.map +1 -1
  65. package/build/types/web-planner-logic/src/logic/Planner/Rendering/Host3DSignalR.d.ts +0 -1
  66. package/build/types/web-planner-logic/src/logic/Planner/Rendering/Host3DSignalR.d.ts.map +1 -1
  67. package/build/types/web-planner-logic/src/logic/Planner/Rendering/PlannerHandler3D.d.ts +0 -17
  68. package/build/types/web-planner-logic/src/logic/Planner/Rendering/PlannerHandler3D.d.ts.map +1 -1
  69. package/build/types/web-planner-logic/src/logic/Planner/Rendering/RenderSettings.d.ts +0 -9
  70. package/build/types/web-planner-logic/src/logic/Planner/Rendering/RenderSettings.d.ts.map +1 -1
  71. package/build/types/web-planner-logic/src/logic/Planner/Rendering/Rendering.d.ts +0 -13
  72. package/build/types/web-planner-logic/src/logic/Planner/Rendering/Rendering.d.ts.map +1 -1
  73. package/build/types/web-planner-logic/src/logic/Planner/Rendering/types.d.ts +0 -3
  74. package/build/types/web-planner-logic/src/logic/Planner/Rendering/types.d.ts.map +1 -1
  75. package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts +2 -3
  76. package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts.map +1 -1
  77. package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts +0 -6
  78. package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts.map +1 -1
  79. package/build/types/web-planner-logic/src/logic/Set/FavoritesHandler.d.ts +1 -1
  80. package/build/types/web-planner-logic/src/logic/Set/FavoritesHandler.d.ts.map +1 -1
  81. package/build/types/web-planner-logic/src/model/DivaCatalogData.d.ts +1 -0
  82. package/build/types/web-planner-logic/src/model/DivaCatalogData.d.ts.map +1 -1
  83. package/build/types/web-planner-logic/src/model/Options/ArticleOptionValueData.d.ts +0 -1
  84. package/build/types/web-planner-logic/src/model/Options/ArticleOptionValueData.d.ts.map +1 -1
  85. package/build/types/web-planner-logic/src/test/datas/environments/testing/pfister-dev.d.ts.map +1 -1
  86. package/build/types/web-planner-logic/src/test/scripts/productHandlerMoc.d.ts.map +1 -1
  87. package/package.json +2 -2
  88. package/build/cjs/DivaSingleProductPlanner-19811faa.js +0 -1169
  89. package/build/cjs/DockingPointHandler-e37440e2.js +0 -1255
  90. package/build/esm/DivaSingleProductPlanner-bc11af8c.js +0 -1158
  91. package/build/esm/DockingPointHandler-ce5b6cc8.js +0 -1245
  92. package/build/types/web-planner-logic/src/logic/Planner/DivaSingleProductPlanner.d.ts +0 -140
  93. package/build/types/web-planner-logic/src/logic/Planner/DivaSingleProductPlanner.d.ts.map +0 -1
@@ -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,
@@ -440,6 +428,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
440
428
  viewConfig: (_data$ViewConfig = data.ViewConfig) !== null && _data$ViewConfig !== void 0 ? _data$ViewConfig : data.viewConfig,
441
429
  loadSupplierColors: data.loadSupplierColors,
442
430
  showSelectionModeZero: data.showSelectionModeZero,
431
+ dontLoadCatalogEditorLiteMask: data.dontLoadCatalogEditorLiteMask,
443
432
  emailConfig: data.emailConfig,
444
433
  reportConfig: data.reportConfig,
445
434
  barrierConfig: data.barrierConfig,
@@ -542,24 +531,6 @@ var DivaApiHandler = /*#__PURE__*/function () {
542
531
  var _this$divaWebConfigDa8, _this$divaWebConfigDa9;
543
532
  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
533
  }
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
534
  }, {
564
535
  key: "getServerId",
565
536
  value: function getServerId() {
@@ -595,80 +566,86 @@ var DivaApiHandler = /*#__PURE__*/function () {
595
566
  }, {
596
567
  key: "getDiva3dStaticBGImage",
597
568
  value: function getDiva3dStaticBGImage() {
598
- var _this$divaWebConfigDa13;
599
- return (_this$divaWebConfigDa13 = this.divaWebConfigData) === null || _this$divaWebConfigDa13 === void 0 ? void 0 : _this$divaWebConfigDa13.diva3dStaticBGImage;
569
+ var _this$divaWebConfigDa10;
570
+ return (_this$divaWebConfigDa10 = this.divaWebConfigData) === null || _this$divaWebConfigDa10 === void 0 ? void 0 : _this$divaWebConfigDa10.diva3dStaticBGImage;
600
571
  }
601
572
  }, {
602
573
  key: "getDiva3dStaticBGImage_DefaultRoomList",
603
574
  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;
575
+ var _this$divaWebConfigDa11, _this$divaWebConfigDa12;
576
+ 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
577
  }
607
578
  }, {
608
579
  key: "getDiva3DAllowDefaultCatRoomList",
609
580
  value: function getDiva3DAllowDefaultCatRoomList() {
610
- var _this$divaWebConfigDa16;
611
- return (_this$divaWebConfigDa16 = this.divaWebConfigData) === null || _this$divaWebConfigDa16 === void 0 ? void 0 : _this$divaWebConfigDa16.diva3DAllowDefaultCatRoomList;
581
+ var _this$divaWebConfigDa13;
582
+ return (_this$divaWebConfigDa13 = this.divaWebConfigData) === null || _this$divaWebConfigDa13 === void 0 ? void 0 : _this$divaWebConfigDa13.diva3DAllowDefaultCatRoomList;
612
583
  }
613
584
  }, {
614
585
  key: "doAllowSetPlanner",
615
586
  value: function doAllowSetPlanner() {
616
- var _this$divaWebConfigDa17;
617
- return (_this$divaWebConfigDa17 = this.divaWebConfigData) === null || _this$divaWebConfigDa17 === void 0 ? void 0 : _this$divaWebConfigDa17.doAllowSetPlanner;
587
+ var _this$divaWebConfigDa14;
588
+ return (_this$divaWebConfigDa14 = this.divaWebConfigData) === null || _this$divaWebConfigDa14 === void 0 ? void 0 : _this$divaWebConfigDa14.doAllowSetPlanner;
618
589
  }
619
590
  }, {
620
591
  key: "getHidePlanner",
621
592
  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);
593
+ var _this$divaWebConfigDa15;
594
+ return !!((_this$divaWebConfigDa15 = this.divaWebConfigData) !== null && _this$divaWebConfigDa15 !== void 0 && (_this$divaWebConfigDa15 = _this$divaWebConfigDa15.viewConfig) !== null && _this$divaWebConfigDa15 !== void 0 && _this$divaWebConfigDa15.hidePlanner);
624
595
  }
625
596
  }, {
626
597
  key: "getDoShowAR",
627
598
  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;
599
+ var _this$divaWebConfigDa16;
600
+ 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;
601
+ }
602
+ }, {
603
+ key: "forceShowRTV",
604
+ value: function forceShowRTV() {
605
+ var _this$divaWebConfigDa17;
606
+ return (_this$divaWebConfigDa17 = this.divaWebConfigData) === null || _this$divaWebConfigDa17 === void 0 || (_this$divaWebConfigDa17 = _this$divaWebConfigDa17.viewConfig) === null || _this$divaWebConfigDa17 === void 0 ? void 0 : _this$divaWebConfigDa17.forceRTV;
630
607
  }
631
608
  }, {
632
609
  key: "getDoShowRTV",
633
610
  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;
611
+ var _this$divaWebConfigDa18;
612
+ return (_this$divaWebConfigDa18 = this.divaWebConfigData) === null || _this$divaWebConfigDa18 === void 0 || (_this$divaWebConfigDa18 = _this$divaWebConfigDa18.viewConfig) === null || _this$divaWebConfigDa18 === void 0 ? void 0 : _this$divaWebConfigDa18.enableRTV;
636
613
  }
637
614
  }, {
638
615
  key: "getEnableRTVUnityKombi",
639
616
  value: function getEnableRTVUnityKombi() {
640
- var _this$divaWebConfigDa21;
641
- return !!((_this$divaWebConfigDa21 = this.divaWebConfigData) !== null && _this$divaWebConfigDa21 !== void 0 && _this$divaWebConfigDa21.viewConfig.enableRtvUnityKombi);
617
+ var _this$divaWebConfigDa19;
618
+ return !!((_this$divaWebConfigDa19 = this.divaWebConfigData) !== null && _this$divaWebConfigDa19 !== void 0 && _this$divaWebConfigDa19.viewConfig.enableRtvUnityKombi);
642
619
  }
643
620
  }, {
644
621
  key: "getDoDisablePlanner2D",
645
622
  value: function getDoDisablePlanner2D() {
646
- var _this$divaWebConfigDa22;
647
- return !!((_this$divaWebConfigDa22 = this.divaWebConfigData) !== null && _this$divaWebConfigDa22 !== void 0 && _this$divaWebConfigDa22.doDisablePlanner2D);
623
+ var _this$divaWebConfigDa20;
624
+ return !!((_this$divaWebConfigDa20 = this.divaWebConfigData) !== null && _this$divaWebConfigDa20 !== void 0 && _this$divaWebConfigDa20.doDisablePlanner2D);
648
625
  }
649
626
  }, {
650
627
  key: "getRoomListInProduct",
651
628
  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);
629
+ var _this$divaWebConfigDa21;
630
+ return !!((_this$divaWebConfigDa21 = this.divaWebConfigData) !== null && _this$divaWebConfigDa21 !== void 0 && (_this$divaWebConfigDa21 = _this$divaWebConfigDa21.viewConfig) !== null && _this$divaWebConfigDa21 !== void 0 && _this$divaWebConfigDa21.roomListInProduct);
654
631
  }
655
632
  }, {
656
633
  key: "getPlannerType",
657
634
  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;
635
+ var _this$divaWebConfigDa22;
636
+ return (_this$divaWebConfigDa22 = this.divaWebConfigData) === null || _this$divaWebConfigDa22 === void 0 || (_this$divaWebConfigDa22 = _this$divaWebConfigDa22.viewConfig) === null || _this$divaWebConfigDa22 === void 0 ? void 0 : _this$divaWebConfigDa22.plannerType;
660
637
  }
661
638
  }, {
662
639
  key: "getLoadSupplierColors",
663
640
  value: function getLoadSupplierColors() {
664
- var _this$divaWebConfigDa25;
665
- return !!((_this$divaWebConfigDa25 = this.divaWebConfigData) !== null && _this$divaWebConfigDa25 !== void 0 && _this$divaWebConfigDa25.loadSupplierColors);
641
+ var _this$divaWebConfigDa23;
642
+ return !!((_this$divaWebConfigDa23 = this.divaWebConfigData) !== null && _this$divaWebConfigDa23 !== void 0 && _this$divaWebConfigDa23.loadSupplierColors);
666
643
  }
667
644
  }, {
668
645
  key: "showSelectionModeZero",
669
646
  value: function showSelectionModeZero() {
670
- var _this$divaWebConfigDa26;
671
- return !!((_this$divaWebConfigDa26 = this.divaWebConfigData) !== null && _this$divaWebConfigDa26 !== void 0 && _this$divaWebConfigDa26.showSelectionModeZero);
647
+ var _this$divaWebConfigDa24;
648
+ return !!((_this$divaWebConfigDa24 = this.divaWebConfigData) !== null && _this$divaWebConfigDa24 !== void 0 && _this$divaWebConfigDa24.showSelectionModeZero);
672
649
  }
673
650
  }, {
674
651
  key: "ruleDescSeperator",
@@ -688,8 +665,8 @@ var DivaApiHandler = /*#__PURE__*/function () {
688
665
  }, {
689
666
  key: "getDoCheckVariantData",
690
667
  value: function getDoCheckVariantData() {
691
- var _this$divaWebConfigDa27;
692
- return (_this$divaWebConfigDa27 = this.divaWebConfigData) === null || _this$divaWebConfigDa27 === void 0 ? void 0 : _this$divaWebConfigDa27.doCheckVariantData;
668
+ var _this$divaWebConfigDa25;
669
+ return (_this$divaWebConfigDa25 = this.divaWebConfigData) === null || _this$divaWebConfigDa25 === void 0 ? void 0 : _this$divaWebConfigDa25.doCheckVariantData;
693
670
  }
694
671
  }, {
695
672
  key: "setI18n",
@@ -782,50 +759,50 @@ var DivaApiHandler = /*#__PURE__*/function () {
782
759
  }, {
783
760
  key: "getViewConfig",
784
761
  value: function getViewConfig() {
785
- var _this$divaWebConfigDa28;
786
- return (_this$divaWebConfigDa28 = this.divaWebConfigData) === null || _this$divaWebConfigDa28 === void 0 ? void 0 : _this$divaWebConfigDa28.viewConfig;
762
+ var _this$divaWebConfigDa26;
763
+ return (_this$divaWebConfigDa26 = this.divaWebConfigData) === null || _this$divaWebConfigDa26 === void 0 ? void 0 : _this$divaWebConfigDa26.viewConfig;
787
764
  }
788
765
  }, {
789
766
  key: "getEmailConfig",
790
767
  value: function getEmailConfig() {
791
- var _this$divaWebConfigDa29;
792
- return (_this$divaWebConfigDa29 = this.divaWebConfigData) === null || _this$divaWebConfigDa29 === void 0 ? void 0 : _this$divaWebConfigDa29.emailConfig;
768
+ var _this$divaWebConfigDa27;
769
+ return (_this$divaWebConfigDa27 = this.divaWebConfigData) === null || _this$divaWebConfigDa27 === void 0 ? void 0 : _this$divaWebConfigDa27.emailConfig;
793
770
  }
794
771
  }, {
795
772
  key: "getABTestCases",
796
773
  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 : [];
774
+ var _this$divaWebConfigDa28, _this$divaWebConfigDa29;
775
+ return (_this$divaWebConfigDa28 = (_this$divaWebConfigDa29 = this.divaWebConfigData) === null || _this$divaWebConfigDa29 === void 0 ? void 0 : _this$divaWebConfigDa29.abTestCases) !== null && _this$divaWebConfigDa28 !== void 0 ? _this$divaWebConfigDa28 : [];
799
776
  }
800
777
  }, {
801
778
  key: "getBarrierConfig",
802
779
  value: function getBarrierConfig() {
803
- var _this$divaWebConfigDa32;
804
- return (_this$divaWebConfigDa32 = this.divaWebConfigData) === null || _this$divaWebConfigDa32 === void 0 ? void 0 : _this$divaWebConfigDa32.barrierConfig;
780
+ var _this$divaWebConfigDa30;
781
+ return (_this$divaWebConfigDa30 = this.divaWebConfigData) === null || _this$divaWebConfigDa30 === void 0 ? void 0 : _this$divaWebConfigDa30.barrierConfig;
805
782
  }
806
783
  }, {
807
784
  key: "getTemplateConfig",
808
785
  value: function getTemplateConfig() {
809
- var _this$divaWebConfigDa33;
810
- return (_this$divaWebConfigDa33 = this.divaWebConfigData) === null || _this$divaWebConfigDa33 === void 0 ? void 0 : _this$divaWebConfigDa33.templateConfig;
786
+ var _this$divaWebConfigDa31;
787
+ return (_this$divaWebConfigDa31 = this.divaWebConfigData) === null || _this$divaWebConfigDa31 === void 0 ? void 0 : _this$divaWebConfigDa31.templateConfig;
811
788
  }
812
789
  }, {
813
790
  key: "showDivaNr",
814
791
  value: function showDivaNr() {
815
- var _this$divaWebConfigDa34;
816
- return (_this$divaWebConfigDa34 = this.divaWebConfigData) === null || _this$divaWebConfigDa34 === void 0 ? void 0 : _this$divaWebConfigDa34.showDivaNr;
792
+ var _this$divaWebConfigDa32;
793
+ return (_this$divaWebConfigDa32 = this.divaWebConfigData) === null || _this$divaWebConfigDa32 === void 0 ? void 0 : _this$divaWebConfigDa32.showDivaNr;
817
794
  }
818
795
  }, {
819
796
  key: "onErrorHandling",
820
797
  value: function onErrorHandling() {
821
- var _this$divaWebConfigDa35;
822
- return (_this$divaWebConfigDa35 = this.divaWebConfigData) === null || _this$divaWebConfigDa35 === void 0 ? void 0 : _this$divaWebConfigDa35.onErrorHandling;
798
+ var _this$divaWebConfigDa33;
799
+ return (_this$divaWebConfigDa33 = this.divaWebConfigData) === null || _this$divaWebConfigDa33 === void 0 ? void 0 : _this$divaWebConfigDa33.onErrorHandling;
823
800
  }
824
801
  }, {
825
802
  key: "diva3DRenderingDefault",
826
803
  value: function diva3DRenderingDefault() {
827
- var _this$divaWebConfigDa36;
828
- return (_this$divaWebConfigDa36 = this.divaWebConfigData) === null || _this$divaWebConfigDa36 === void 0 ? void 0 : _this$divaWebConfigDa36.diva3DRenderingDefault;
804
+ var _this$divaWebConfigDa34;
805
+ return (_this$divaWebConfigDa34 = this.divaWebConfigData) === null || _this$divaWebConfigDa34 === void 0 ? void 0 : _this$divaWebConfigDa34.diva3DRenderingDefault;
829
806
  }
830
807
  }, {
831
808
  key: "getJwt",
@@ -840,8 +817,8 @@ var DivaApiHandler = /*#__PURE__*/function () {
840
817
  }, {
841
818
  key: "getUseMask",
842
819
  value: function getUseMask() {
843
- var _this$divaWebConfigDa37;
844
- return (_this$divaWebConfigDa37 = this.divaWebConfigData) === null || _this$divaWebConfigDa37 === void 0 ? void 0 : _this$divaWebConfigDa37.useMask;
820
+ var _this$divaWebConfigDa35;
821
+ return (_this$divaWebConfigDa35 = this.divaWebConfigData) === null || _this$divaWebConfigDa35 === void 0 ? void 0 : _this$divaWebConfigDa35.useMask;
845
822
  }
846
823
  }, {
847
824
  key: "apiUrl",
@@ -932,7 +909,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
932
909
  }, {
933
910
  key: "getCatalogProductUrl",
934
911
  value: function getCatalogProductUrl(catalogCodex) {
935
- var search = '{catCodex,contains,' + catalogCodex + '},{available,eq,true}';
912
+ var search = '{catCodex,contains,' + catalogCodex + "},{availableForOrganizations,eq,".concat(this.organization._id, "}");
936
913
  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}');
937
914
  }
938
915
  }, {
@@ -1133,12 +1110,6 @@ var DivaApiHandler = /*#__PURE__*/function () {
1133
1110
  value: function getImageURL(image, mediaURL) {
1134
1111
  var ret = '';
1135
1112
  if (image != '' && image != null) {
1136
- if (DivaUtils.CacheIsEnabled) {
1137
- ret = DivaUtils.getCacheData(image.toUpperCase(), '');
1138
- if (ret) {
1139
- return ret;
1140
- }
1141
- }
1142
1113
  var header = image.substring(0, 4).toLowerCase();
1143
1114
  if (header == 'http' || header == 'data') {
1144
1115
  ret = image;
@@ -1379,8 +1350,14 @@ var DivaApiHandler = /*#__PURE__*/function () {
1379
1350
  }, {
1380
1351
  key: "dontLoadAdditionalModelInfos",
1381
1352
  get: function get() {
1382
- var _this$divaWebConfigDa38;
1383
- return (_this$divaWebConfigDa38 = this.divaWebConfigData) === null || _this$divaWebConfigDa38 === void 0 ? void 0 : _this$divaWebConfigDa38.dontLoadAdditionalModelInfos;
1353
+ var _this$divaWebConfigDa36;
1354
+ return (_this$divaWebConfigDa36 = this.divaWebConfigData) === null || _this$divaWebConfigDa36 === void 0 ? void 0 : _this$divaWebConfigDa36.dontLoadAdditionalModelInfos;
1355
+ }
1356
+ }, {
1357
+ key: "dontLoadCatalogEditorLiteMask",
1358
+ get: function get() {
1359
+ var _this$divaWebConfigDa37;
1360
+ return (_this$divaWebConfigDa37 = this.divaWebConfigData) === null || _this$divaWebConfigDa37 === void 0 ? void 0 : _this$divaWebConfigDa37.dontLoadCatalogEditorLiteMask;
1384
1361
  }
1385
1362
  }, {
1386
1363
  key: "OrganizationId",
@@ -1691,7 +1668,6 @@ var ArticleOptionValueData = /*#__PURE__*/function () {
1691
1668
  catalogOPV: catalogOPV,
1692
1669
  pac: jsonOPV.PAC,
1693
1670
  pgr: jsonOPV.PGR,
1694
- isRendered: jsonOPV.IsRendered != undefined ? jsonOPV.IsRendered : true,
1695
1671
  subArticleCodex: jsonOPV.SubArticleCodex && jsonOPV.SubArticleCodex != '' ? jsonOPV.SubArticleCodex : undefined,
1696
1672
  subArticleTypeNr: jsonOPV.SubArticleTypeNr && jsonOPV.SubArticleTypeNr != '' ? jsonOPV.SubArticleTypeNr : undefined,
1697
1673
  subRetailArticleNr: jsonOPV.SubRetailArticleNr && jsonOPV.SubRetailArticleNr != '' ? jsonOPV.SubRetailArticleNr : undefined,
@@ -2028,11 +2004,6 @@ var ArticleOptionValueData = /*#__PURE__*/function () {
2028
2004
  get: function get() {
2029
2005
  return this.opv.catalogOPV.value;
2030
2006
  }
2031
- }, {
2032
- key: "isDigitalized",
2033
- get: function get() {
2034
- return this.opv.isRendered;
2035
- }
2036
2007
  }, {
2037
2008
  key: "metaData",
2038
2009
  get: function get() {
@@ -15947,10 +15918,10 @@ var OptionValueCatalogData = /*#__PURE__*/function () {
15947
15918
  _mask$name,
15948
15919
  _catalog$api$getLangu,
15949
15920
  _mask$name2,
15950
- _mask$groupName$catal,
15951
- _mask$groupName,
15921
+ _mask$groupname$catal,
15922
+ _mask$groupname,
15952
15923
  _catalog$api$getLangu2,
15953
- _mask$groupName2,
15924
+ _mask$groupname2,
15954
15925
  _jsonOPV$MeasureStep,
15955
15926
  _jsonOPV$Metadatas,
15956
15927
  _mask$properties;
@@ -16021,8 +15992,8 @@ var OptionValueCatalogData = /*#__PURE__*/function () {
16021
15992
  isTexture: jsonOPV.IsTexture && jsonOPV.IsTexture == 'True' ? true : false,
16022
15993
  description: jsonOPV.Description,
16023
15994
  description_locales: jsonOPV.Description_locales,
16024
- groupName: ((_mask$groupName$catal = mask === null || mask === void 0 || (_mask$groupName = mask.groupName) === null || _mask$groupName === void 0 ? void 0 : _mask$groupName[(_catalog$api$getLangu2 = catalog.api.getLanguage()) === null || _catalog$api$getLangu2 === void 0 ? void 0 : _catalog$api$getLangu2.toLowerCase()]) !== null && _mask$groupName$catal !== void 0 ? _mask$groupName$catal : jsonOPV.GroupName && jsonOPV.GroupName != '') ? jsonOPV.GroupName : undefined,
16025
- groupName_locales: (_mask$groupName2 = mask === null || mask === void 0 ? void 0 : mask.groupName) !== null && _mask$groupName2 !== void 0 ? _mask$groupName2 : jsonOPV.GroupName_locales,
15995
+ groupName: (_mask$groupname$catal = mask === null || mask === void 0 || (_mask$groupname = mask.groupname) === null || _mask$groupname === void 0 ? void 0 : _mask$groupname[(_catalog$api$getLangu2 = catalog.api.getLanguage()) === null || _catalog$api$getLangu2 === void 0 ? void 0 : _catalog$api$getLangu2.toLowerCase()]) !== null && _mask$groupname$catal !== void 0 ? _mask$groupname$catal : jsonOPV.GroupName && jsonOPV.GroupName != '' ? jsonOPV.GroupName : undefined,
15996
+ groupName_locales: (_mask$groupname2 = mask === null || mask === void 0 ? void 0 : mask.groupname) !== null && _mask$groupname2 !== void 0 ? _mask$groupname2 : jsonOPV.GroupName_locales,
16026
15997
  hiddenByMask: mask === null || mask === void 0 ? void 0 : mask.hidden,
16027
15998
  textureName: jsonOPV.TextureName && jsonOPV.TextureName != '' ? jsonOPV.TextureName : jsonOPV.PFTFile && jsonOPV.PFTFile != '' ? jsonOPV.PFTFile : undefined,
16028
15999
  material: jsonOPV.Material && jsonOPV.Material != '' ? jsonOPV.Material : undefined,
@@ -16036,7 +16007,7 @@ var OptionValueCatalogData = /*#__PURE__*/function () {
16036
16007
  showOnlyWhenHasPrice: jsonOPV.ShowOnlyWhenHasPrice && jsonOPV.ShowOnlyWhenHasPrice == 'True' ? true : false,
16037
16008
  priceUnit: jsonOPV.PriceUnit,
16038
16009
  value: jsonOPV.Value,
16039
- 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 : {}))),
16010
+ 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 : [])),
16040
16011
  textbausteine: jsonOPV.Textbausteine
16041
16012
  };
16042
16013
  this.opv.colorGroups = this.mapRALColorToGroup();
@@ -16387,8 +16358,8 @@ var CatalogArticleData = /*#__PURE__*/function () {
16387
16358
  _catalogData$api$getL,
16388
16359
  _jsonArticle$Metadata,
16389
16360
  _articleMask$properti,
16390
- _articleMask$groupNam,
16391
- _articleMask$groupNam2,
16361
+ _articleMask$groupnam,
16362
+ _articleMask$groupnam2,
16392
16363
  _catalogData$api$getL2,
16393
16364
  _articleMask$hidden;
16394
16365
  _classCallCheck(this, CatalogArticleData);
@@ -16418,11 +16389,11 @@ var CatalogArticleData = /*#__PURE__*/function () {
16418
16389
  arePricesLoaded: false,
16419
16390
  articleOptions: {},
16420
16391
  decisions: [],
16421
- 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 : {}))),
16392
+ 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 : [])),
16422
16393
  image: jsonArticle.Image && jsonArticle.Image != '' ? jsonArticle.Image : undefined,
16423
16394
  imageWidth: jsonArticle.ImageWidth ? jsonArticle.ImageWidth : undefined,
16424
16395
  imageHeight: jsonArticle.ImageHeight ? jsonArticle.ImageHeight : undefined,
16425
- groupName: (_articleMask$groupNam = articleMask === null || articleMask === void 0 || (_articleMask$groupNam2 = articleMask.groupName) === null || _articleMask$groupNam2 === void 0 ? void 0 : _articleMask$groupNam2[(_catalogData$api$getL2 = catalogData.api.getLanguage()) === null || _catalogData$api$getL2 === void 0 ? void 0 : _catalogData$api$getL2.toLowerCase()]) !== null && _articleMask$groupNam !== void 0 ? _articleMask$groupNam : jsonArticle.GroupName,
16396
+ groupName: (_articleMask$groupnam = articleMask === null || articleMask === void 0 || (_articleMask$groupnam2 = articleMask.groupname) === null || _articleMask$groupnam2 === void 0 ? void 0 : _articleMask$groupnam2[(_catalogData$api$getL2 = catalogData.api.getLanguage()) === null || _catalogData$api$getL2 === void 0 ? void 0 : _catalogData$api$getL2.toLowerCase()]) !== null && _articleMask$groupnam !== void 0 ? _articleMask$groupnam : jsonArticle.GroupName,
16426
16397
  mainCategory: jsonArticle.MainCategory && jsonArticle.MainCategory != '' ? jsonArticle.MainCategory : undefined,
16427
16398
  width: jsonArticle.Width && jsonArticle.Width != '' ? Number(jsonArticle.Width.replace('cm', '').replace(',', '.')) : undefined,
16428
16399
  height: jsonArticle.Height && jsonArticle.Height != '' ? Number(jsonArticle.Height.replace('cm', '').replace(',', '.')) : undefined,
@@ -17826,7 +17797,7 @@ var OptionCatalogData = /*#__PURE__*/function () {
17826
17797
  _classCallCheck(this, OptionCatalogData);
17827
17798
  _defineProperty(this, "opt", void 0);
17828
17799
  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;
17829
- 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 : {})));
17800
+ var properties = [].concat(_toConsumableArray((_jsonOPT$Properties = jsonOPT.Properties) !== null && _jsonOPT$Properties !== void 0 ? _jsonOPT$Properties : []), _toConsumableArray((_optionMask$propertie = optionMask === null || optionMask === void 0 ? void 0 : optionMask.properties) !== null && _optionMask$propertie !== void 0 ? _optionMask$propertie : []));
17830
17801
  this.opt = {
17831
17802
  codex: codex,
17832
17803
  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,
@@ -18115,6 +18086,8 @@ var OptionCatalogData = /*#__PURE__*/function () {
18115
18086
  }]);
18116
18087
  }();
18117
18088
 
18089
+ 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; }
18090
+ 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; }
18118
18091
  var LOG$e = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
18119
18092
 
18120
18093
  /*
@@ -18325,8 +18298,9 @@ var DivaCatalogData = /*#__PURE__*/function () {
18325
18298
  this.catalogData.mediaUrl = this.getMediaURL(json.SubFolder);
18326
18299
  }
18327
18300
  if (json.Properties) {
18301
+ var _this$catalogMask$cat, _this$catalogMask;
18328
18302
  this.origProperties = json.Properties;
18329
- this.initProperties(json.Properties);
18303
+ this.initProperties([].concat(_toConsumableArray(json.Properties), _toConsumableArray((_this$catalogMask$cat = (_this$catalogMask = this.catalogMask) === null || _this$catalogMask === void 0 || (_this$catalogMask = _this$catalogMask.catalog) === null || _this$catalogMask === void 0 ? void 0 : _this$catalogMask.properties) !== null && _this$catalogMask$cat !== void 0 ? _this$catalogMask$cat : [])));
18330
18304
  }
18331
18305
  this.plannerPaletteViewInfo = {
18332
18306
  catalogPlannerArticles: [],
@@ -18344,13 +18318,13 @@ var DivaCatalogData = /*#__PURE__*/function () {
18344
18318
  }
18345
18319
  return _createClass(DivaCatalogData, [{
18346
18320
  key: "initMask",
18347
- value: function initMask() {
18348
- var _this$catalogMask;
18349
- if ((_this$catalogMask = this.catalogMask) !== null && _this$catalogMask !== void 0 && _this$catalogMask.catalog) {
18350
- var _this$catalogMask$cat;
18351
- 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()];
18321
+ value: function initMask(initProps) {
18322
+ var _this$catalogMask2;
18323
+ if ((_this$catalogMask2 = this.catalogMask) !== null && _this$catalogMask2 !== void 0 && _this$catalogMask2.catalog) {
18324
+ var _this$catalogMask$cat2;
18325
+ if ((_this$catalogMask$cat2 = this.catalogMask.catalog.name) !== null && _this$catalogMask$cat2 !== void 0 && _this$catalogMask$cat2[this.api.getLanguage()]) this.catalogData.catalogName = this.catalogMask.catalog.name[this.api.getLanguage()];
18352
18326
  if (this.catalogMask.catalog.name) this.catalogData.name_locales = this.catalogMask.catalog.name;
18353
- if (this.catalogMask.catalog.properties) this.initProperties([].concat(_toConsumableArray(this.origProperties), _toConsumableArray(Object.values(this.catalogMask.catalog.properties))));
18327
+ if (this.catalogMask.catalog.properties && initProps) this.initProperties([].concat(_toConsumableArray(this.origProperties), _toConsumableArray(this.catalogMask.catalog.properties)));
18354
18328
  }
18355
18329
  }
18356
18330
  }, {
@@ -19570,7 +19544,7 @@ var DivaCatalogData = /*#__PURE__*/function () {
19570
19544
  if (!this.additionalModelInfos) throw new Error('additionalModelInfos dont exist for this catalog');
19571
19545
  this.updateMask(newMask).then(function (r) {
19572
19546
  _this3.additionalModelInfos = r;
19573
- _this3.initMask();
19547
+ _this3.initMask(true);
19574
19548
  });
19575
19549
  }
19576
19550
  }, {
@@ -19621,6 +19595,37 @@ var DivaCatalogData = /*#__PURE__*/function () {
19621
19595
  }()
19622
19596
  }]);
19623
19597
  }();
19598
+ var mapMask = function mapMask(mask) {
19599
+ var _mappedMask$catalog;
19600
+ if (!mask) return undefined;
19601
+ var mappedMask = _objectSpread$e({}, mask);
19602
+ var mapProperties = function mapProperties(props) {
19603
+ if (Array.isArray(props)) return props;
19604
+ var mappedProps = [];
19605
+ for (var key in props) {
19606
+ var prop = props[key];
19607
+ mappedProps.push({
19608
+ Codex: key,
19609
+ Name: prop.name,
19610
+ Value: prop.value
19611
+ });
19612
+ }
19613
+ return mappedProps;
19614
+ };
19615
+ if ((_mappedMask$catalog = mappedMask.catalog) !== null && _mappedMask$catalog !== void 0 && _mappedMask$catalog.properties) {
19616
+ mappedMask.catalog.properties = mapProperties(mappedMask.catalog.properties);
19617
+ }
19618
+ if (mappedMask.articles) for (var articleCodex in mappedMask.articles) {
19619
+ if (mappedMask.articles[articleCodex].properties) mappedMask.articles[articleCodex].properties = mapProperties(mappedMask.articles[articleCodex].properties);
19620
+ }
19621
+ if (mappedMask.options) for (var opt in mappedMask.options) {
19622
+ if (mappedMask.options[opt].properties) mappedMask.options[opt].properties = mapProperties(mappedMask.options[opt].properties);
19623
+ }
19624
+ if (mappedMask.optionvalues) for (var opv in mappedMask.optionvalues) {
19625
+ if (mappedMask.optionvalues[opv].properties) mappedMask.optionvalues[opv].properties = mapProperties(mappedMask.optionvalues[opv].properties);
19626
+ }
19627
+ return mappedMask;
19628
+ };
19624
19629
 
19625
19630
  var LOG$d = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
19626
19631
  var DivaCatalogHandler = /*#__PURE__*/function () {
@@ -19643,7 +19648,7 @@ var DivaCatalogHandler = /*#__PURE__*/function () {
19643
19648
  return _context.abrupt("return", state.divaCatalogs[catalogKey]);
19644
19649
  case 5:
19645
19650
  if (!orderSet) {
19646
- _context.next = 46;
19651
+ _context.next = 47;
19647
19652
  break;
19648
19653
  }
19649
19654
  // ab hier parallell laden
@@ -19666,47 +19671,52 @@ var DivaCatalogHandler = /*#__PURE__*/function () {
19666
19671
  additionalModelInfos = undefined;
19667
19672
  mask = undefined;
19668
19673
  _context.prev = 19;
19669
- _context.next = 22;
19674
+ if (state.api.dontLoadCatalogEditorLiteMask) {
19675
+ _context.next = 24;
19676
+ break;
19677
+ }
19678
+ _context.next = 23;
19670
19679
  return state.api.getDataCache(state.api.getCatalogMaskQS(catalogApiData.GUID, state.api.OrganizationId), undefined, undefined, 'enricher');
19671
- case 22:
19680
+ case 23:
19672
19681
  mask = _context.sent;
19682
+ case 24:
19673
19683
  if (!(!state.api.dontLoadAdditionalModelInfos && catalogApiData.AccountGuid)) {
19674
- _context.next = 27;
19684
+ _context.next = 28;
19675
19685
  break;
19676
19686
  }
19677
- _context.next = 26;
19687
+ _context.next = 27;
19678
19688
  return state.api.getDataCache(state.api.getAdditionalModelInfosQS(catalogApiData.AccountGuid, catalogApiData.GUID), undefined, undefined, 'catalog');
19679
- case 26:
19680
- additionalModelInfos = _context.sent;
19681
19689
  case 27:
19682
- _context.next = 32;
19690
+ additionalModelInfos = _context.sent;
19691
+ case 28:
19692
+ _context.next = 33;
19683
19693
  break;
19684
- case 29:
19685
- _context.prev = 29;
19694
+ case 30:
19695
+ _context.prev = 30;
19686
19696
  _context.t0 = _context["catch"](19);
19687
19697
  LOG$d.debug('no additionalModelInfos found: ' + _context.t0);
19688
- case 32:
19698
+ case 33:
19689
19699
  if (state.catalogMask || mask) {
19690
19700
  if (!additionalModelInfos) additionalModelInfos = {
19691
19701
  _id: ''
19692
19702
  };
19693
- additionalModelInfos.catalogMask = (_state$catalogMask = state.catalogMask) !== null && _state$catalogMask !== void 0 ? _state$catalogMask : mask;
19703
+ additionalModelInfos.catalogMask = mapMask((_state$catalogMask = state.catalogMask) !== null && _state$catalogMask !== void 0 ? _state$catalogMask : mask);
19694
19704
  }
19695
19705
  catalogData = new DivaCatalogData(catalogApiData, orderSet, state.api, additionalModelInfos);
19696
19706
  if (!(catalogArticleListData.Articles && catalogArticleListData.Articles.length > 0)) {
19697
- _context.next = 38;
19707
+ _context.next = 39;
19698
19708
  break;
19699
19709
  }
19700
19710
  catalogData.initCatalogArticles(catalogArticleListData.Articles);
19701
- _context.next = 41;
19711
+ _context.next = 42;
19702
19712
  break;
19703
- case 38:
19713
+ case 39:
19704
19714
  DivaUtils.endSpanOfApm('Catalog initialize');
19705
19715
  LOG$d.error(new DivaError('Catalog ' + catalogData.catalogName + ' not listed', {
19706
19716
  code: 'WC_0002'
19707
19717
  }));
19708
19718
  throw new Error('Articles of Catalog: ' + catalogData.catalogCodex + ' are empty');
19709
- case 41:
19719
+ case 42:
19710
19720
  if (catalogArticlePlannerListData.PlannerElements && catalogArticlePlannerListData.PlannerElements.length > 0) {
19711
19721
  catalogData.initCatalogPlannerArticles(catalogArticlePlannerListData.PlannerElements);
19712
19722
  }
@@ -19723,16 +19733,16 @@ var DivaCatalogHandler = /*#__PURE__*/function () {
19723
19733
 
19724
19734
  DivaUtils.endSpanOfApm('Catalog initialize');
19725
19735
  return _context.abrupt("return", state.divaCatalogs[catalogKey]);
19726
- case 46:
19736
+ case 47:
19727
19737
  LOG$d.error(new DivaError('Catalog: ' + catalogCodex + ' not initialized! and orderSet not set', {
19728
19738
  code: 'WC_0007'
19729
19739
  }));
19730
19740
  return _context.abrupt("return", state.divaCatalogs[catalogKey]);
19731
- case 48:
19741
+ case 49:
19732
19742
  case "end":
19733
19743
  return _context.stop();
19734
19744
  }
19735
- }, _callee, null, [[19, 29]]);
19745
+ }, _callee, null, [[19, 30]]);
19736
19746
  }));
19737
19747
  function getCatalogData(_x, _x2, _x3) {
19738
19748
  return _getCatalogData.apply(this, arguments);
@@ -20242,12 +20252,6 @@ var ArticleOptionStateData = /*#__PURE__*/function () {
20242
20252
  set: function set(val) {
20243
20253
  this.articleOptionState.freeTextLang = val;
20244
20254
  }
20245
- }, {
20246
- key: "isNotVisualized",
20247
- get: function get() {
20248
- var _this$val20;
20249
- return ((_this$val20 = this.val) === null || _this$val20 === void 0 ? void 0 : _this$val20.isDigitalized) == false && this.val.isTexture;
20250
- }
20251
20255
  }, {
20252
20256
  key: "onlyVisibleIfNotUndock",
20253
20257
  get: function get() {
@@ -20275,8 +20279,8 @@ var ArticleOptionStateData = /*#__PURE__*/function () {
20275
20279
  }, {
20276
20280
  key: "warning",
20277
20281
  get: function get() {
20278
- var _this$val21;
20279
- if ((_this$val21 = this.val) !== null && _this$val21 !== void 0 && _this$val21.isFreeText) {
20282
+ var _this$val20;
20283
+ if ((_this$val20 = this.val) !== null && _this$val20 !== void 0 && _this$val20.isFreeText) {
20280
20284
  if (this.val.measureMaximum && Number(this.freeText) > Number(this.val.measureMaximum) || this.val.measureMinimum && Number(this.freeText) < Number(this.val.measureMinimum)) {
20281
20285
  return 'measureWarning';
20282
20286
  }
@@ -20374,8 +20378,8 @@ var ArticleOptionStateData = /*#__PURE__*/function () {
20374
20378
  }]);
20375
20379
  }();
20376
20380
 
20377
- 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; }
20378
- 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; }
20381
+ 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; }
20382
+ 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; }
20379
20383
  var LOG$c = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
20380
20384
  var DivaArticle = /*#__PURE__*/function () {
20381
20385
  //Hier steht die aktuelle Konfiguration
@@ -20585,7 +20589,7 @@ var DivaArticle = /*#__PURE__*/function () {
20585
20589
  var partlistArticle = this.partlistArticles[basketId];
20586
20590
  if (!onlyVisible || partlistArticle.partlistArticleVisibleInTree) partlistArticles[basketId] = partlistArticle;
20587
20591
  if (partlistArticle.hasPartlistArticle) {
20588
- partlistArticles = _objectSpread$e(_objectSpread$e({}, partlistArticles), partlistArticle.getRecursivePartlistArticles(onlyVisible));
20592
+ partlistArticles = _objectSpread$d(_objectSpread$d({}, partlistArticles), partlistArticle.getRecursivePartlistArticles(onlyVisible));
20589
20593
  }
20590
20594
  }
20591
20595
  return partlistArticles;
@@ -20672,17 +20676,6 @@ var DivaArticle = /*#__PURE__*/function () {
20672
20676
  set: function set(val) {
20673
20677
  this.article.toDeleteAfterInit = val;
20674
20678
  }
20675
- }, {
20676
- key: "articleHasNotVisualizedValues",
20677
- get: function get() {
20678
- if (!this.model3DName) return false;
20679
- for (var key in this.articleOptionStates) {
20680
- if (!this.articleOptionStates[key].isNotVisualized) {
20681
- return true;
20682
- }
20683
- }
20684
- return false;
20685
- }
20686
20679
  }, {
20687
20680
  key: "actSizeText",
20688
20681
  get: function get() {
@@ -21057,13 +21050,13 @@ var DivaArticle = /*#__PURE__*/function () {
21057
21050
  }, {
21058
21051
  key: "articleOptionStatesWithParents",
21059
21052
  get: function get() {
21060
- return _objectSpread$e(_objectSpread$e({}, this.getReqursiveArticleOptionStates()), this.articleOptionStatesData);
21053
+ return _objectSpread$d(_objectSpread$d({}, this.getReqursiveArticleOptionStates()), this.articleOptionStatesData);
21061
21054
  }
21062
21055
  }, {
21063
21056
  key: "getReqursiveArticleOptionStates",
21064
21057
  value: function getReqursiveArticleOptionStates() {
21065
21058
  var _this$partListParentA6, _this$partListParentA7, _this$partListParentA8, _this$partListParentA9, _this$accessoireParen3, _this$accessoireParen4, _this$accessoireParen5, _this$accessoireParen6;
21066
- 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 : {});
21059
+ 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 : {});
21067
21060
  }
21068
21061
  }, {
21069
21062
  key: "clearArticleOptionStates",
@@ -22826,7 +22819,7 @@ var DivaArticle = /*#__PURE__*/function () {
22826
22819
  RuleDesc: myRuleDesc,
22827
22820
  RuleDesc_locales: myRuleDesc_locales,
22828
22821
  PosInvisibility: myPartListPos.PosInvisibility,
22829
- 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 : {}),
22822
+ 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 : {}),
22830
22823
  VariantItemData: previousPartlistArticle === null || previousPartlistArticle === void 0 ? void 0 : previousPartlistArticle.VariantItemData,
22831
22824
  optionImgForPrint: optionImgForPrint,
22832
22825
  optionsForPrint: optionsForPrint
@@ -22900,7 +22893,7 @@ var DivaArticle = /*#__PURE__*/function () {
22900
22893
  }
22901
22894
  for (var key in this.articleOptionStates) {
22902
22895
  var myOPS = this.articleOptionStates[key];
22903
- myOPS.visibleOptionValues = _objectSpread$e({}, myOPS.option.articleOptionValues);
22896
+ myOPS.visibleOptionValues = _objectSpread$d({}, myOPS.option.articleOptionValues);
22904
22897
  myOPS.visibleCount = Object.keys(myOPS.option.articleOptionValues).length;
22905
22898
  myOPS.definedBySetFeatureFixed = false;
22906
22899
  }
@@ -23131,7 +23124,7 @@ var DivaArticle = /*#__PURE__*/function () {
23131
23124
  }
23132
23125
  if (ruleValid) {
23133
23126
  ruleWasValidOnce = true;
23134
- if (m == 0) validOPVs[OPT] = _objectSpread$e({}, possibleOPVs);
23127
+ if (m == 0) validOPVs[OPT] = _objectSpread$d({}, possibleOPVs);
23135
23128
  opvCodex = opvCodex.slice(1);
23136
23129
  if (possibleOPVs[opvCodex] != null) delete validOPVs[OPT][opvCodex];
23137
23130
  }
@@ -23527,7 +23520,7 @@ var DivaArticle = /*#__PURE__*/function () {
23527
23520
  break;
23528
23521
  }
23529
23522
  _context.next = 4;
23530
- return import('./ShelfPlanner-ff88c9d8.js');
23523
+ return import('./ShelfPlanner-e3b31a33.js');
23531
23524
  case 4:
23532
23525
  _yield$import = _context.sent;
23533
23526
  ShelfPlanner = _yield$import["default"];
@@ -23622,8 +23615,6 @@ var DivaArticle = /*#__PURE__*/function () {
23622
23615
  if (myArtOPS.replaceMainArtNr) {
23623
23616
  this.configArticleCodex = myArtOPS.replaceMainArtNr;
23624
23617
  }
23625
- var name = myArtOPS.name;
23626
- console.log('name', name);
23627
23618
  if (!tmpOPT.useMaxPriceOfGroup) {
23628
23619
  myArtOPS.calcPrice = myArtOPS.price * myArtOPS.quantity;
23629
23620
  }
@@ -24130,7 +24121,7 @@ var DivaArticle = /*#__PURE__*/function () {
24130
24121
  */
24131
24122
  }, {
24132
24123
  key: "getPlannerConfigData",
24133
- value: function getPlannerConfigData(accessoireArticles, excludeInvalidCacheOptions, alternateRenderInfo) {
24124
+ value: function getPlannerConfigData(accessoireArticles, alternateRenderInfo) {
24134
24125
  var _this$doorPlanner2, _this$doorPlanner3;
24135
24126
  var ret = {
24136
24127
  N: this.name,
@@ -24138,8 +24129,8 @@ var DivaArticle = /*#__PURE__*/function () {
24138
24129
  ArtNr: this.article.catalogArticle.articleCodex,
24139
24130
  CFG: []
24140
24131
  };
24141
- var containsTextureNotDigitalized = this.addOptionStateFromArticleToPlannerData(ret, alternateRenderInfo);
24142
- if (!excludeInvalidCacheOptions) ret.CFG.push({
24132
+ this.addOptionStateFromArticleToPlannerData(ret, alternateRenderInfo);
24133
+ ret.CFG.push({
24143
24134
  OPT: 'QUANTITY',
24144
24135
  OPV: this.quantity.toString()
24145
24136
  });
@@ -24168,41 +24159,32 @@ var DivaArticle = /*#__PURE__*/function () {
24168
24159
  ret['MOVE'] = doorInfo;
24169
24160
  }
24170
24161
  return {
24171
- config: ret,
24172
- containsTextureNotDigitalized: containsTextureNotDigitalized
24162
+ config: ret
24173
24163
  };
24174
24164
  }
24175
24165
  }, {
24176
24166
  key: "addOptionStateFromArticleToPlannerData",
24177
24167
  value: function addOptionStateFromArticleToPlannerData(ret, alternateRenderInfo) {
24178
- var containsTextureNotDigitalized = false;
24179
24168
  for (var key in this.articleOptionStates) {
24180
- if (this.addOptionStateToPlannerData(ret, this.articleOptionStates[key], alternateRenderInfo)) {
24181
- containsTextureNotDigitalized = true;
24182
- }
24169
+ this.addOptionStateToPlannerData(ret, this.articleOptionStates[key], alternateRenderInfo);
24183
24170
  }
24184
24171
  for (var _key5 in this.article.partlistArticles) {
24185
24172
  var partlistArticle = this.article.partlistArticles[_key5];
24186
24173
  if (!partlistArticle.hasOptionsThatParentDoesNotHave) continue;
24187
- if (partlistArticle.addOptionStateFromArticleToPlannerData(ret, alternateRenderInfo)) {
24188
- containsTextureNotDigitalized = true;
24189
- }
24174
+ partlistArticle.addOptionStateFromArticleToPlannerData(ret, alternateRenderInfo);
24190
24175
  }
24191
- return containsTextureNotDigitalized;
24192
24176
  }
24193
24177
  }, {
24194
24178
  key: "addOptionStateToPlannerData",
24195
24179
  value: function addOptionStateToPlannerData(ret, ops, alternateRenderInfo) {
24196
24180
  var opv;
24197
24181
  var opt;
24198
- var containsTextureNotDigitalized = false;
24199
24182
  if (ops.val) {
24200
24183
  var _ops$val$ocd, _ops$option$ocd;
24201
24184
  opv = (_ops$val$ocd = ops.val.ocd) !== null && _ops$val$ocd !== void 0 ? _ops$val$ocd : ops.val.codex;
24202
24185
  if (this.CatalogData.isIDM3DCat && ops.val.vCodex) opv = 'OPV' + ops.idmVariantenArt + '_' + ops.val.vCodex;
24203
24186
  opt = (_ops$option$ocd = ops.option.ocd) !== null && _ops$option$ocd !== void 0 ? _ops$option$ocd : ops.optionCodex;
24204
24187
  if (alternateRenderInfo != undefined && alternateRenderInfo.hideOptionsIn3DImage.includes(opt)) return;
24205
- if (!ops.val.isDigitalized && ops.val.isTexture) containsTextureNotDigitalized = true;
24206
24188
  ret.CFG.push({
24207
24189
  OPT: opt,
24208
24190
  OPV: opv
@@ -24227,7 +24209,6 @@ var DivaArticle = /*#__PURE__*/function () {
24227
24209
  });
24228
24210
  }
24229
24211
  }
24230
- return containsTextureNotDigitalized;
24231
24212
  }
24232
24213
  }, {
24233
24214
  key: "getAccessoireMATData",
@@ -24289,7 +24270,7 @@ var DivaArticle = /*#__PURE__*/function () {
24289
24270
  key: "getVariantBasketData",
24290
24271
  value: function getVariantBasketData() {
24291
24272
  var variantBasketData = [];
24292
- var opsObj = _objectSpread$e({}, this.articleOptionStates);
24273
+ var opsObj = _objectSpread$d({}, this.articleOptionStates);
24293
24274
  if (this.article.optionsForPrint) {
24294
24275
  for (var i = 0; i < this.article.optionsForPrint.length; i++) {
24295
24276
  var ops = this.getArticleOptionState(this.article.optionsForPrint[i]);
@@ -24475,8 +24456,8 @@ var DivaArticle = /*#__PURE__*/function () {
24475
24456
  }]);
24476
24457
  }();
24477
24458
 
24478
- 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; }
24479
- 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; }
24459
+ 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; }
24460
+ 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; }
24480
24461
  var LOG$b = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
24481
24462
 
24482
24463
  //Diese Klasse verwaltet den Optionsbaum und ladelogik etc. eines Artikels
@@ -24695,7 +24676,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
24695
24676
  return _context5.abrupt("continue", 37);
24696
24677
  case 11:
24697
24678
  if (targetArticlesWithNewValues.includes(targetArticlesToUpdate[i])) {
24698
- valuesArray[i] = actArticle.getValidValues(_objectSpread$d({}, myValues), actArticle.CatalogData.mergeOptionsToSameOption);
24679
+ valuesArray[i] = actArticle.getValidValues(_objectSpread$c({}, myValues), actArticle.CatalogData.mergeOptionsToSameOption);
24699
24680
  }
24700
24681
  if (!(Object.entries(valuesArray[i]).length > 0 || from !== null && from !== void 0 && from.startsWith('initializing'))) {
24701
24682
  _context5.next = 32;
@@ -25329,7 +25310,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
25329
25310
  }
25330
25311
  doLoadItem.BasketID = nArticle.basketId;
25331
25312
  _context14.next = 9;
25332
- return this.toDoAfterArticleLoaded(nArticle, {}, _objectSpread$d(_objectSpread$d({}, doLoadItem.VariantValues), newConfigValues), 'initializingPartlist', doLoadItem.VariantItemData);
25313
+ return this.toDoAfterArticleLoaded(nArticle, {}, _objectSpread$c(_objectSpread$c({}, doLoadItem.VariantValues), newConfigValues), 'initializingPartlist', doLoadItem.VariantItemData);
25333
25314
  case 9:
25334
25315
  article.addPartlistArticle(nArticle);
25335
25316
  case 10:
@@ -25473,7 +25454,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
25473
25454
  if (ruleValid) break;
25474
25455
  }
25475
25456
  if (ruleValid) {
25476
- returnValue.push(_objectSpread$d(_objectSpread$d({}, entry), {}, {
25457
+ returnValue.push(_objectSpread$c(_objectSpread$c({}, entry), {}, {
25477
25458
  index: i
25478
25459
  }));
25479
25460
  break;
@@ -26455,7 +26436,6 @@ var DivaConfigTreeData = /*#__PURE__*/function () {
26455
26436
  var optionStep = step === null || step === void 0 ? void 0 : step.optionStep;
26456
26437
  var paletteType = 'SMALL';
26457
26438
  if (configStep && optionStep) {
26458
- var _set$api$ReturnToFrom;
26459
26439
  var optionState = articles[configStep.targetArticles[0]][configStep.option];
26460
26440
  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) {
26461
26441
  paletteType = 'GAL';
@@ -26483,31 +26463,15 @@ var DivaConfigTreeData = /*#__PURE__*/function () {
26483
26463
  if (paletteType == 'GALLERY') {
26484
26464
  paletteType = 'GAL';
26485
26465
  }
26486
- //TODO correct with franz
26487
- 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';
26488
26466
  }
26489
26467
  return paletteType;
26490
26468
  }
26491
26469
  }, {
26492
26470
  key: "getStepInfo",
26493
26471
  value: function getStepInfo(configStepKey, optionStatesOfArticle) {
26494
- var isNotVisualized = false;
26495
- var targetArticles = this.getTargetArticles(configStepKey),
26496
- allSteps = this.getAllByKey(configStepKey);
26497
- if (allSteps !== null && allSteps !== void 0 && allSteps.optionStep) {
26498
- for (var i = 0; i < targetArticles.length; i++) {
26499
- if (optionStatesOfArticle[targetArticles[i]][allSteps.optionStep.codex].isNotVisualized) {
26500
- isNotVisualized = true;
26501
- break;
26502
- }
26503
- }
26504
- }
26505
- if (isNotVisualized) {
26506
- return 'SHOW_NOT_VISUALIZED_WARNINIG';
26507
- }
26508
- if (allSteps !== null && allSteps !== void 0 && allSteps.configStep.warning) {
26509
- return allSteps.configStep.warning;
26510
- }
26472
+ var allSteps = this.getAllByKey(configStepKey);
26473
+ if (allSteps !== null && allSteps !== void 0 && allSteps.optionStep) ;
26474
+ if (allSteps !== null && allSteps !== void 0 && allSteps.configStep.warning) return allSteps.configStep.warning;
26511
26475
  return undefined;
26512
26476
  }
26513
26477
  }, {
@@ -26815,8 +26779,8 @@ var DivaConfigTreeData = /*#__PURE__*/function () {
26815
26779
  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; } } }; }
26816
26780
  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; } }
26817
26781
  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; }
26818
- 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; }
26819
- 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; }
26782
+ 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; }
26783
+ 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; }
26820
26784
  var LOG$9 = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
26821
26785
  var DivaSet = /*#__PURE__*/function () {
26822
26786
  function DivaSet(catalog, _setId, orderSet, initSetState) {
@@ -26911,7 +26875,7 @@ var DivaSet = /*#__PURE__*/function () {
26911
26875
  _context.next = 10;
26912
26876
  break;
26913
26877
  }
26914
- validValues = repairVariantValuesAndPlanner ? article.getValidValues(_objectSpread$c({}, variantValues), article.CatalogData.mergeOptionsToSameOption) : {};
26878
+ validValues = repairVariantValuesAndPlanner ? article.getValidValues(_objectSpread$b({}, variantValues), article.CatalogData.mergeOptionsToSameOption) : {};
26915
26879
  _context.t0 = partlistArticlesToLoad;
26916
26880
  _context.next = 8;
26917
26881
  return articleHandlerInstance.updateCfgValues(article, repairVariantValuesAndPlanner ? validValues : variantValues, {}, undefined, loadPlas);
@@ -27026,7 +26990,7 @@ var DivaSet = /*#__PURE__*/function () {
27026
26990
  }
27027
26991
  return false;
27028
26992
  });
27029
- _defineProperty(this, "getPlannerConfigData", function (elementId, excludeInvalidCacheOptions, alternateRenderInfo) {
26993
+ _defineProperty(this, "getPlannerConfigData", function (elementId, alternateRenderInfo) {
27030
26994
  var article = _this.getArticleByElementId(elementId);
27031
26995
  var articleAccs = [];
27032
26996
  for (var key in article === null || article === void 0 ? void 0 : article.accessoires) {
@@ -27034,7 +26998,6 @@ var DivaSet = /*#__PURE__*/function () {
27034
26998
  }
27035
26999
  var plannerConfigData = {
27036
27000
  config: {},
27037
- containsTextureNotDigitalized: false,
27038
27001
  accs: articleAccs
27039
27002
  };
27040
27003
  if (article) {
@@ -27048,9 +27011,8 @@ var DivaSet = /*#__PURE__*/function () {
27048
27011
  }
27049
27012
  }
27050
27013
  }
27051
- var result = article.getPlannerConfigData(accessoireArticles, excludeInvalidCacheOptions, alternateRenderInfo);
27014
+ var result = article.getPlannerConfigData(accessoireArticles, alternateRenderInfo);
27052
27015
  plannerConfigData.config = result.config;
27053
- plannerConfigData.containsTextureNotDigitalized = result.containsTextureNotDigitalized;
27054
27016
  }
27055
27017
  return plannerConfigData;
27056
27018
  });
@@ -27058,7 +27020,6 @@ var DivaSet = /*#__PURE__*/function () {
27058
27020
  var article = _this.getArticleByBasketId(basketId);
27059
27021
  var plannerConfigData = {
27060
27022
  config: {},
27061
- containsTextureNotDigitalized: false,
27062
27023
  accs: []
27063
27024
  };
27064
27025
  if (article) {
@@ -27066,9 +27027,8 @@ var DivaSet = /*#__PURE__*/function () {
27066
27027
  for (var key in article === null || article === void 0 ? void 0 : article.accessoires) {
27067
27028
  if (article.accessoires[key].elementId) articleAccs.push(article.accessoires[key].elementId);
27068
27029
  }
27069
- var result = article.getPlannerConfigData(article.accessoires, false);
27030
+ var result = article.getPlannerConfigData(article.accessoires);
27070
27031
  plannerConfigData.config = result.config;
27071
- plannerConfigData.containsTextureNotDigitalized = result.containsTextureNotDigitalized;
27072
27032
  plannerConfigData.accs = articleAccs;
27073
27033
  }
27074
27034
  return plannerConfigData;
@@ -27164,7 +27124,6 @@ var DivaSet = /*#__PURE__*/function () {
27164
27124
  if (this.catalogData.useBoxPlanner) {
27165
27125
  plannerMode = 'BoxPlanner';
27166
27126
  } else if (this.catalogData.has3dModels) {
27167
- var _this$WebConfig;
27168
27127
  for (var key in this.divaArticles) {
27169
27128
  if (this.divaArticles[key].model3DName) {
27170
27129
  plannerMode = '3DImage';
@@ -27176,9 +27135,6 @@ var DivaSet = /*#__PURE__*/function () {
27176
27135
  if (Object.entries(this.divaArticles).length == 0) {
27177
27136
  plannerMode = '3DImage';
27178
27137
  }
27179
- if ((_this$WebConfig = this.WebConfig) !== null && _this$WebConfig !== void 0 && _this$WebConfig.diva3dUseSirvViewer) {
27180
- plannerMode = 'SirvViewer_only';
27181
- }
27182
27138
  if (this.catalogData.divaArReady && this.catalogData.useShelfPlannerRTV) {
27183
27139
  //TODO Matthias sauber initialisieren ob in RTV oder IMAGE3D gestartet wird.
27184
27140
  plannerMode = 'RTViewer';
@@ -27197,7 +27153,7 @@ var DivaSet = /*#__PURE__*/function () {
27197
27153
  plannerMode = 'No';
27198
27154
  }
27199
27155
  this.plannerMode = plannerMode;
27200
- this.setType = plannerMode == 'No' || plannerMode == 'SirvViewer_only' ? 'ARTICLE' : 'PLANNING';
27156
+ this.setType = plannerMode == 'No' ? 'ARTICLE' : 'PLANNING';
27201
27157
  return plannerMode;
27202
27158
  }
27203
27159
  }, {
@@ -27419,9 +27375,11 @@ var DivaSet = /*#__PURE__*/function () {
27419
27375
  key: "getSetTitle",
27420
27376
  value: function getSetTitle() {
27421
27377
  var _this$ViewConfig, _this$setState$config;
27422
- if ((_this$ViewConfig = this.ViewConfig) !== null && _this$ViewConfig !== void 0 && _this$ViewConfig.useArticleNameAsTitle && Object.keys(this.divaArticles).length > 0) {
27423
- var article = this.divaArticles[Object.keys(this.divaArticles)[0]];
27424
- return article.name;
27378
+ if ((_this$ViewConfig = this.ViewConfig) !== null && _this$ViewConfig !== void 0 && _this$ViewConfig.useArticleNameAsTitle && _toConsumableArray(new Set(this.mainArtcles.map(function (a) {
27379
+ return a.articleCodex;
27380
+ }))).length == 1) {
27381
+ var name = this.mainArtcles[0].name.replace(/\(.+?\)/g, '');
27382
+ if (typeof this.ViewConfig.useArticleNameAsTitle !== 'number' || name.length < this.ViewConfig.useArticleNameAsTitle) return name;
27425
27383
  }
27426
27384
  return (_this$setState$config = this.setState.configuratorTitle) !== null && _this$setState$config !== void 0 ? _this$setState$config : this.getSetName();
27427
27385
  }
@@ -27492,8 +27450,8 @@ var DivaSet = /*#__PURE__*/function () {
27492
27450
  var articles = {};
27493
27451
  for (var basketId in this.divaArticles) {
27494
27452
  articles[basketId] = this.divaArticles[basketId];
27495
- if (allPartlistArticlesAlso) articles = _objectSpread$c(_objectSpread$c({}, articles), articles[basketId].getRecursivePartlistArticles());
27496
- if (visiblePartlistArticlesAlso) articles = _objectSpread$c(_objectSpread$c({}, articles), articles[basketId].getRecursivePartlistArticles(true));
27453
+ if (allPartlistArticlesAlso) articles = _objectSpread$b(_objectSpread$b({}, articles), articles[basketId].getRecursivePartlistArticles());
27454
+ if (visiblePartlistArticlesAlso) articles = _objectSpread$b(_objectSpread$b({}, articles), articles[basketId].getRecursivePartlistArticles(true));
27497
27455
  }
27498
27456
  return articles;
27499
27457
  }
@@ -27737,6 +27695,16 @@ var DivaSet = /*#__PURE__*/function () {
27737
27695
  if (optionSetName.length) ret += ' ' + optionSetName.join(', ');
27738
27696
  return ret;
27739
27697
  }
27698
+ }, {
27699
+ key: "mainArtcles",
27700
+ get: function get() {
27701
+ var mainArtcles = [];
27702
+ for (var basketId in this.divaArticles) {
27703
+ var article = this.divaArticles[basketId];
27704
+ if (!article.relatedToBasketId) mainArtcles.push(article);
27705
+ }
27706
+ return mainArtcles;
27707
+ }
27740
27708
  }, {
27741
27709
  key: "setName_locales",
27742
27710
  get: function get() {
@@ -27988,8 +27956,8 @@ var DivaSet = /*#__PURE__*/function () {
27988
27956
  }, {
27989
27957
  key: "remindPriceForHash",
27990
27958
  value: function remindPriceForHash(product) {
27991
- var _product$discountedPr, _product$discountedPr2;
27992
- if (!product.available) return;
27959
+ var _product$availableFor, _product$discountedPr, _product$discountedPr2;
27960
+ if (!((_product$availableFor = product.availableForOrganizations) !== null && _product$availableFor !== void 0 && _product$availableFor.includes(this.getSetState.organizationId))) return;
27993
27961
  var claculatedPrice = this.getSetPrice(true);
27994
27962
  if (!product.discountedPrice && product.addedPrice === product.calculatedPrice && claculatedPrice == product.calculatedPrice) {
27995
27963
  return;
@@ -28015,7 +27983,7 @@ var DivaSet = /*#__PURE__*/function () {
28015
27983
  break;
28016
27984
  }
28017
27985
  _context4.next = 3;
28018
- return import('./DoorPlanner-dfcc1e9b.js');
27986
+ return import('./DoorPlanner-c3fe5ecf.js');
28019
27987
  case 3:
28020
27988
  _yield$import = _context4.sent;
28021
27989
  DoorPlanner = _yield$import["default"];
@@ -28120,8 +28088,8 @@ var DivaSet = /*#__PURE__*/function () {
28120
28088
  }, {
28121
28089
  key: "hasStaticRoomList",
28122
28090
  get: function get() {
28123
- var _this$WebConfig2;
28124
- if (this.CatalogData.roomList3DStaticBGImage.size > 0 && (_this$WebConfig2 = this.WebConfig) !== null && _this$WebConfig2 !== void 0 && _this$WebConfig2.diva3dStaticBGImage) {
28091
+ var _this$WebConfig;
28092
+ if (this.CatalogData.roomList3DStaticBGImage.size > 0 && (_this$WebConfig = this.WebConfig) !== null && _this$WebConfig !== void 0 && _this$WebConfig.diva3dStaticBGImage) {
28125
28093
  return true;
28126
28094
  }
28127
28095
  return false;
@@ -28162,8 +28130,8 @@ var DivaSet = /*#__PURE__*/function () {
28162
28130
  }, {
28163
28131
  key: "ViewConfig",
28164
28132
  get: function get() {
28165
- var _this$WebConfig3;
28166
- return (_this$WebConfig3 = this.WebConfig) === null || _this$WebConfig3 === void 0 ? void 0 : _this$WebConfig3.viewConfig;
28133
+ var _this$WebConfig2;
28134
+ return (_this$WebConfig2 = this.WebConfig) === null || _this$WebConfig2 === void 0 ? void 0 : _this$WebConfig2.viewConfig;
28167
28135
  }
28168
28136
  }, {
28169
28137
  key: "i18n",
@@ -29650,8 +29618,8 @@ var SummaryHandler = /*#__PURE__*/function () {
29650
29618
  }();
29651
29619
  var summaryHandlerInstance = new SummaryHandler();
29652
29620
 
29653
- 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; }
29654
- 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; }
29621
+ 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; }
29622
+ 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; }
29655
29623
  DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
29656
29624
  var DivaFavoritesHandler = /*#__PURE__*/function () {
29657
29625
  function DivaFavoritesHandler() {
@@ -30329,7 +30297,7 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
30329
30297
  if (targetArticle[opt] && !variantValues[opt]) variantValues[opt] = targetArticle[opt];
30330
30298
  }
30331
30299
  }
30332
- 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);
30300
+ 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);
30333
30301
  set.basketConfigVariants.push(configVariant);
30334
30302
  case 28:
30335
30303
  case "end":
@@ -30384,11 +30352,11 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
30384
30352
  }, {
30385
30353
  key: "isFavorite",
30386
30354
  value: function isFavorite(set, targetArticles, item, optionCodex) {
30387
- var _item$ocd, _set$WebConfig, _set$api$ReturnToFrom, _favorites$VariantVal, _Object$keys;
30355
+ var _item$ocd, _set$api$ReturnToFrom, _favorites$VariantVal, _Object$keys;
30388
30356
  var favorites = set.favorites;
30389
30357
  var opvCodex = (_item$ocd = item.ocd) !== null && _item$ocd !== void 0 ? _item$ocd : item.codex;
30390
30358
  var opt = optionCodex ? optionCodex : item.parent.codex;
30391
- 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'));
30359
+ var doShowFav = !!((_set$api$ReturnToFrom = set.api.ReturnToFromParams) !== null && _set$api$ReturnToFrom !== void 0 && _set$api$ReturnToFrom.startsWith('FAVORITS'));
30392
30360
  if (!doShowFav) return undefined;
30393
30361
  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)) {
30394
30362
  for (var i = 0; i < targetArticles.length; i++) {
@@ -30409,8 +30377,8 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
30409
30377
  }();
30410
30378
  var favoritesHandlerInstance = new DivaFavoritesHandler();
30411
30379
 
30412
- 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; }
30413
- 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; }
30380
+ 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; }
30381
+ 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; }
30414
30382
 
30415
30383
  //Diese Klasse beinhaltet die Logik wie eine aktuelle Konfiguration mit allen möglicheen Ausprägungen mit Preisen in einem Set aussieht.
30416
30384
  //Der in einem Set gemergte Optionsbaum
@@ -30967,7 +30935,7 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
30967
30935
  //get schnittmenge of all the articles
30968
30936
  if (i === 0) {
30969
30937
  constructionRules = myOptionState.constructionRules;
30970
- configItems = _objectSpread$a({}, myOptionState.visibleOptionValues);
30938
+ configItems = _objectSpread$9({}, myOptionState.visibleOptionValues);
30971
30939
  } else {
30972
30940
  for (var _key2 in configItems) {
30973
30941
  if (!myOptionState.visibleOptionValues[_key2]) {
@@ -31198,8 +31166,8 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
31198
31166
  }();
31199
31167
  var configTreeHandler = new DivaConfigTreeHandler();
31200
31168
 
31201
- 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; }
31202
- 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; }
31169
+ 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; }
31170
+ 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; }
31203
31171
  var LOG$8 = DivaUtils.initLog('Planner', 'DIVA-SET-HANDLER');
31204
31172
 
31205
31173
  /*
@@ -31689,7 +31657,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
31689
31657
  }
31690
31658
  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;
31691
31659
  _context6.next = 18;
31692
- return this.addPlannerElement(set, articlesToInitialize[j], _objectSpread$9(_objectSpread$9({}, params), variantValues ? {
31660
+ return this.addPlannerElement(set, articlesToInitialize[j], _objectSpread$8(_objectSpread$8({}, params), variantValues ? {
31693
31661
  variantValues: variantValues
31694
31662
  } : {}));
31695
31663
  case 18:
@@ -32322,7 +32290,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
32322
32290
  _context17.next = 24;
32323
32291
  break;
32324
32292
  }
32325
- return _context17.abrupt("return", _objectSpread$9(_objectSpread$9({}, doesFit), {}, {
32293
+ return _context17.abrupt("return", _objectSpread$8(_objectSpread$8({}, doesFit), {}, {
32326
32294
  accessoire: accessoire
32327
32295
  }));
32328
32296
  case 24:
@@ -32754,7 +32722,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
32754
32722
  var articlecodex = plannerElement.articleCodex;
32755
32723
  if (type == 'PLANNERSWITCH' && Object.keys(set.getDivaArticles())[0]) {
32756
32724
  if (plannerViewInfo.catalogPlannerArticles[i].filterType == 'Accessoire') continue;
32757
- cleanedCaltaogPlannerArticles.push(_objectSpread$9({}, plannerElement));
32725
+ cleanedCaltaogPlannerArticles.push(_objectSpread$8({}, plannerElement));
32758
32726
  var index = cleanedCaltaogPlannerArticles.length - 1;
32759
32727
  cleanedCaltaogPlannerArticles[index].groupName = '';
32760
32728
  if (set.getArticlesByArticleCodex(articlecodex).length > 0) {
@@ -32772,10 +32740,10 @@ var DivaSetHandler = /*#__PURE__*/function () {
32772
32740
  plannerViewInfo.plannerConfiguration.updatePaletteAfterPlanningChanged = true;
32773
32741
  }
32774
32742
  }
32775
- if (!dontPushElement) cleanedCaltaogPlannerArticles.push(_objectSpread$9({}, plannerElement));
32743
+ if (!dontPushElement) cleanedCaltaogPlannerArticles.push(_objectSpread$8({}, plannerElement));
32776
32744
  }
32777
32745
  }
32778
- return _objectSpread$9(_objectSpread$9({}, plannerViewInfo), {}, {
32746
+ return _objectSpread$8(_objectSpread$8({}, plannerViewInfo), {}, {
32779
32747
  catalogPlannerArticles: cleanedCaltaogPlannerArticles
32780
32748
  });
32781
32749
  }
@@ -32974,7 +32942,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
32974
32942
  filterType = set.configTree.getCurFilterType(configStepKey, optionStatesOfArticle, configItems.configItems);
32975
32943
  stepInfo = set.configTree.getStepInfo(configStepKey, optionStatesOfArticle);
32976
32944
  contentItemId = (_configItems$option = configItems.option) === null || _configItems$option === void 0 ? void 0 : _configItems$option.contentItemId;
32977
- return _context24.abrupt("return", _objectSpread$9(_objectSpread$9(_objectSpread$9({
32945
+ return _context24.abrupt("return", _objectSpread$8(_objectSpread$8(_objectSpread$8({
32978
32946
  isRenderedNotInSettingPalette: set.configTree.isRenderedNotInSettingPalette(configStepKey),
32979
32947
  isRenderedInAccessorieStep: set.configTree.isRenderedInAccessorieStep(configStepKey),
32980
32948
  visible: set.configTree.getVisibility(configStepKey, visible, set.CatalogData)
@@ -33397,7 +33365,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
33397
33365
  break;
33398
33366
  }
33399
33367
  _context28.next = 17;
33400
- return this.addArticleToActSet(set, edoArticlesToLoad[_i5].ArticleCodex, _objectSpread$9(_objectSpread$9({}, edoArticlesToLoad[_i5]), {}, {
33368
+ return this.addArticleToActSet(set, edoArticlesToLoad[_i5].ArticleCodex, _objectSpread$8(_objectSpread$8({}, edoArticlesToLoad[_i5]), {}, {
33401
33369
  basketId: oldBasketIds[_i5]
33402
33370
  }), true);
33403
33371
  case 17:
@@ -33794,7 +33762,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
33794
33762
  origOrderSet.BBox = actOrderSet.BBox;
33795
33763
  origOrderSet.VariantDescription = actOrderSet.VariantDescription;
33796
33764
  if (actOrderSet.ConfigVariants && origOrderSet.ConfigVariants) origOrderSet.ConfigVariants = actOrderSet.ConfigVariants.map(function (variant, index) {
33797
- return _objectSpread$9(_objectSpread$9({}, variant), {}, {
33765
+ return _objectSpread$8(_objectSpread$8({}, variant), {}, {
33798
33766
  SetImage: origOrderSet.ConfigVariants[index].SetImage,
33799
33767
  HQRenderScript: origOrderSet.ConfigVariants[index].HQRenderScript,
33800
33768
  Set2DImage: origOrderSet.ConfigVariants[index].Set2DImage,
@@ -33832,25 +33800,12 @@ var DivaSetHandler = /*#__PURE__*/function () {
33832
33800
  DivaUtils.startSpanOfApm('GetSet3D und 2D Image');
33833
33801
  GroupType = 'PLANNING';
33834
33802
  plannerData = set.plannerHandler.savePlanner(set.getSetId());
33835
- if (!(set.getPlannerMode() == 'SirvViewer_only')) {
33836
- _context31.next = 10;
33837
- break;
33838
- }
33839
- _context31.next = 7;
33840
- return set.plannerHandler.getSetImageAsUrl(set.getSetId());
33841
- case 7:
33842
- _context31.t0 = _context31.sent;
33843
- _context31.next = 11;
33844
- break;
33845
- case 10:
33846
- _context31.t0 = undefined;
33847
- case 11:
33848
- setImage = _context31.t0;
33803
+ setImage = undefined;
33849
33804
  urlToPlanning2D = undefined;
33850
33805
  alternateSetImages = undefined;
33851
33806
  hqRenderScript = undefined;
33852
33807
  if (dontGenerateImages) {
33853
- _context31.next = 32;
33808
+ _context31.next = 25;
33854
33809
  break;
33855
33810
  }
33856
33811
  promise3D = this.getSetImage(set, typeof window === 'undefined');
@@ -33858,22 +33813,22 @@ var DivaSetHandler = /*#__PURE__*/function () {
33858
33813
  if (!catalogData.dontSaveAlternativeRenderings && set.CatalogData.alternateRenderingsForSummary.length) {
33859
33814
  promise3DAlternate = this.getAlternateSetImages(set);
33860
33815
  }
33861
- _context31.next = 21;
33816
+ _context31.next = 14;
33862
33817
  return Promise.all([promise3D, promise2D, promise3DAlternate]);
33863
- case 21:
33818
+ case 14:
33864
33819
  _yield$Promise$all = _context31.sent;
33865
33820
  _yield$Promise$all2 = _slicedToArray(_yield$Promise$all, 3);
33866
33821
  setImage = _yield$Promise$all2[0];
33867
33822
  urlToPlanning2D = _yield$Promise$all2[1];
33868
33823
  alternateSetImages = _yield$Promise$all2[2];
33869
33824
  promiseHQRenderScript = this.getHQRenderScript(set, divaNr);
33870
- _context31.next = 29;
33825
+ _context31.next = 22;
33871
33826
  return Promise.all([promiseHQRenderScript]);
33872
- case 29:
33827
+ case 22:
33873
33828
  _yield$Promise$all3 = _context31.sent;
33874
33829
  _yield$Promise$all4 = _slicedToArray(_yield$Promise$all3, 1);
33875
33830
  hqRenderScript = _yield$Promise$all4[0];
33876
- case 32:
33831
+ case 25:
33877
33832
  LOG$8.startTransaction({
33878
33833
  event: 'FillBakset',
33879
33834
  eventId: 'FILL_BASKET',
@@ -33939,7 +33894,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
33939
33894
  MetaData_locales: !((_set$basketConfigVari3 = set.basketConfigVariants) !== null && _set$basketConfigVari3 !== void 0 && _set$basketConfigVari3.length) ? set.MetaData_locales : undefined
33940
33895
  });
33941
33896
  return _context31.abrupt("return", orderSet);
33942
- case 39:
33897
+ case 32:
33943
33898
  case "end":
33944
33899
  return _context31.stop();
33945
33900
  }
@@ -33967,7 +33922,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
33967
33922
  catalogData = set.CatalogData;
33968
33923
  is3D = ['3DImage', 'BoxPlanner', 'RTViewer'].includes(set.getPlannerMode());
33969
33924
  if (!is3D) {
33970
- _context32.next = 13;
33925
+ _context32.next = 11;
33971
33926
  break;
33972
33927
  }
33973
33928
  LOG$8.startTransaction({
@@ -33983,20 +33938,9 @@ var DivaSetHandler = /*#__PURE__*/function () {
33983
33938
  case 9:
33984
33939
  setImage = _context32.sent;
33985
33940
  LOG$8.successTransaction('RENDER_3D_IMAGE');
33986
- _context32.next = 17;
33987
- break;
33988
- case 13:
33989
- if (!(set.getPlannerMode() == 'SirvViewer_only')) {
33990
- _context32.next = 17;
33991
- break;
33992
- }
33993
- _context32.next = 16;
33994
- return set.plannerHandler.getSetImageAsUrl(set.getSetId());
33995
- case 16:
33996
- setImage = _context32.sent;
33997
- case 17:
33941
+ case 11:
33998
33942
  return _context32.abrupt("return", setImage);
33999
- case 18:
33943
+ case 12:
34000
33944
  case "end":
34001
33945
  return _context32.stop();
34002
33946
  }
@@ -34148,77 +34092,22 @@ var DivaSetHandler = /*#__PURE__*/function () {
34148
34092
  Info: bbox.width + 'cm x ' + bbox.depth + 'cm'
34149
34093
  };
34150
34094
  }
34151
-
34152
- /****************************Cache building***************************/
34153
-
34154
- /**
34155
- * This function creates the cache for all images.
34156
- * @returns returns true if the whole set was created correctly
34157
- */
34158
34095
  }, {
34159
- key: "createRenderCache",
34160
- value: (function () {
34161
- var _createRenderCache = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee34(set) {
34162
- var _set$getAlternateRend3;
34163
- var timeout;
34096
+ key: "loadProductsOfSets",
34097
+ value: function () {
34098
+ var _loadProductsOfSets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee34(orderSets, involvedSetIds) {
34164
34099
  return _regeneratorRuntime.wrap(function _callee34$(_context36) {
34165
34100
  while (1) switch (_context36.prev = _context36.next) {
34166
34101
  case 0:
34167
- 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, {
34168
- width: 100,
34169
- height: 100,
34170
- isFullscreenRendering: false,
34171
- planner3DGridEnabled: false,
34172
- mediaServiceSaveMode: 'PERMANENT',
34173
- doShow3DDimensionLines: false
34174
- });
34175
- timeout = 50;
34176
- case 2:
34177
- if (!set.plannerHandler.checkIsWaitingForRendering()) {
34178
- _context36.next = 10;
34179
- break;
34180
- }
34181
- timeout--;
34182
- if (!(timeout == 0)) {
34183
- _context36.next = 6;
34184
- break;
34185
- }
34186
- return _context36.abrupt("return", false);
34187
- case 6:
34188
- _context36.next = 8;
34189
- return DivaUtils.Sleep(300);
34190
- case 8:
34191
34102
  _context36.next = 2;
34192
- break;
34193
- case 10:
34194
- return _context36.abrupt("return", true);
34195
- case 11:
34196
- case "end":
34197
- return _context36.stop();
34198
- }
34199
- }, _callee34);
34200
- }));
34201
- function createRenderCache(_x113) {
34202
- return _createRenderCache.apply(this, arguments);
34203
- }
34204
- return createRenderCache;
34205
- }())
34206
- }, {
34207
- key: "loadProductsOfSets",
34208
- value: function () {
34209
- var _loadProductsOfSets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee35(orderSets, involvedSetIds) {
34210
- return _regeneratorRuntime.wrap(function _callee35$(_context37) {
34211
- while (1) switch (_context37.prev = _context37.next) {
34212
- case 0:
34213
- _context37.next = 2;
34214
34103
  return productHandlerInstance.loadProductsOfSets(orderSets, involvedSetIds);
34215
34104
  case 2:
34216
34105
  case "end":
34217
- return _context37.stop();
34106
+ return _context36.stop();
34218
34107
  }
34219
- }, _callee35);
34108
+ }, _callee34);
34220
34109
  }));
34221
- function loadProductsOfSets(_x114, _x115) {
34110
+ function loadProductsOfSets(_x113, _x114) {
34222
34111
  return _loadProductsOfSets.apply(this, arguments);
34223
34112
  }
34224
34113
  return loadProductsOfSets;
@@ -34255,28 +34144,28 @@ var DivaSetHandler = /*#__PURE__*/function () {
34255
34144
  }, {
34256
34145
  key: "addOrderSetArticlesToExistingSet",
34257
34146
  value: function () {
34258
- var _addOrderSetArticlesToExistingSet = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee36(set, orderSet, lastSetToInitialize) {
34259
- return _regeneratorRuntime.wrap(function _callee36$(_context38) {
34260
- while (1) switch (_context38.prev = _context38.next) {
34147
+ var _addOrderSetArticlesToExistingSet = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee35(set, orderSet, lastSetToInitialize) {
34148
+ return _regeneratorRuntime.wrap(function _callee35$(_context37) {
34149
+ while (1) switch (_context37.prev = _context37.next) {
34261
34150
  case 0:
34262
34151
  //TODO: GLOBAL STUFF
34263
34152
  //this.updateActSet(set);
34264
34153
  orderSet.changeBasketIds();
34265
- _context38.next = 3;
34154
+ _context37.next = 3;
34266
34155
  return this.initOrderLineArticles(set, orderSet);
34267
34156
  case 3:
34268
- _context38.next = 5;
34157
+ _context37.next = 5;
34269
34158
  return set.plannerHandler.extendSet(set, orderSet.SetPlanData, lastSetToInitialize);
34270
34159
  case 5:
34271
- _context38.next = 7;
34160
+ _context37.next = 7;
34272
34161
  return productHandlerInstance.updateProducts(set, 'onAdd');
34273
34162
  case 7:
34274
34163
  case "end":
34275
- return _context38.stop();
34164
+ return _context37.stop();
34276
34165
  }
34277
- }, _callee36, this);
34166
+ }, _callee35, this);
34278
34167
  }));
34279
- function addOrderSetArticlesToExistingSet(_x116, _x117, _x118) {
34168
+ function addOrderSetArticlesToExistingSet(_x115, _x116, _x117) {
34280
34169
  return _addOrderSetArticlesToExistingSet.apply(this, arguments);
34281
34170
  }
34282
34171
  return addOrderSetArticlesToExistingSet;
@@ -34293,589 +34182,112 @@ var DivaSetHandler = /*#__PURE__*/function () {
34293
34182
  }();
34294
34183
  var setHandlerInstance = new DivaSetHandler();
34295
34184
 
34296
- //This class saves all informations needed for a rendering
34185
+ 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; }
34186
+ 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; }
34297
34187
  var LOG$7 = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
34298
- var Rendering = /*#__PURE__*/function () {
34299
- function Rendering(planningHash, renderHash, viewPointName, width, height, isFullscreenRendering, hasDimensionLines, plannerMeasureDigits, hasLayerMask, hasStaticBG, mediaServiceSaveMode, alternateRenderingsExist, alternateRendererInfo) {
34300
- _classCallCheck(this, Rendering);
34301
- _defineProperty(this, "planningHash", void 0);
34302
- _defineProperty(this, "renderHash", void 0);
34303
- _defineProperty(this, "creationTime", void 0);
34304
- _defineProperty(this, "renderWidth", void 0);
34305
- _defineProperty(this, "renderHeight", void 0);
34306
- _defineProperty(this, "uiInfo", void 0);
34307
- _defineProperty(this, "urlToSavedRendering", void 0);
34308
- // viewPoint: string;
34309
- // private posInfo: any;
34310
- //private doStream: boolean; Streaming over 3D Host is deprected
34311
- //private byteChunkArr: any;
34312
- //private byteChunkLayerMaskArr: any;
34313
- _defineProperty(this, "hasLayerMask", void 0);
34314
- //private imgBytes: any;
34315
- _defineProperty(this, "imgForSrc", void 0);
34316
- _defineProperty(this, "HQRenderingUrl", void 0);
34317
- _defineProperty(this, "SpinUrl", void 0);
34318
- _defineProperty(this, "ArUrl", void 0);
34319
- _defineProperty(this, "layerMaskAsBase64", void 0);
34320
- _defineProperty(this, "layerMaskThreeTexture", void 0);
34321
- _defineProperty(this, "isFullscreenRendering", void 0);
34322
- _defineProperty(this, "hasStaticBackground", void 0);
34323
- _defineProperty(this, "hasDimensionLines", void 0);
34324
- _defineProperty(this, "plannerMeasureDigits", void 0);
34325
- _defineProperty(this, "alternateRendererInfo", void 0);
34326
- _defineProperty(this, "isAlternateRendering", void 0);
34327
- _defineProperty(this, "alternateRenderingsExist", void 0);
34328
- _defineProperty(this, "mediaServiceSaveMode", void 0);
34329
- _defineProperty(this, "isLoadedFromCache", void 0);
34330
- _defineProperty(this, "catalogData", void 0);
34331
- //this.doStream = false;
34332
- this.planningHash = planningHash;
34333
- this.renderHash = renderHash;
34334
- this.renderWidth = width;
34335
- this.renderHeight = height;
34336
- this.uiInfo = '';
34337
- this.imgForSrc = '';
34338
- this.layerMaskAsBase64 = '';
34339
- this.isFullscreenRendering = isFullscreenRendering;
34340
- this.hasDimensionLines = hasDimensionLines;
34341
- this.plannerMeasureDigits = plannerMeasureDigits;
34342
- this.hasLayerMask = hasLayerMask;
34343
- this.creationTime = new Date();
34344
- this.layerMaskThreeTexture = undefined;
34345
- this.hasStaticBackground = hasStaticBG;
34346
- this.mediaServiceSaveMode = mediaServiceSaveMode;
34347
- this.urlToSavedRendering = '';
34348
- this.catalogData = {
34349
- catalogCodex: '',
34350
- catalogGUID: ''
34351
- };
34352
- this.isLoadedFromCache = false;
34353
- this.HQRenderingUrl = '';
34354
- this.SpinUrl = '';
34355
- this.ArUrl = '';
34356
- if (alternateRendererInfo != undefined) this.isAlternateRendering = true;else this.isAlternateRendering = false;
34357
- this.alternateRendererInfo = alternateRendererInfo;
34358
- this.alternateRenderingsExist = !!alternateRenderingsExist;
34359
- }
34360
- return _createClass(Rendering, [{
34361
- key: "clone",
34362
- value: function clone(rendering) {
34363
- this.planningHash = rendering.planningHash;
34364
- this.renderHash = rendering.renderHash;
34365
- this.creationTime = rendering.creationTime;
34366
- this.renderWidth = rendering.renderWidth;
34367
- this.renderHeight = rendering.renderHeight;
34368
- this.uiInfo = rendering.uiInfo;
34369
- this.urlToSavedRendering = rendering.urlToSavedRendering;
34370
- this.hasLayerMask = rendering.hasLayerMask;
34371
- this.imgForSrc = rendering.imgForSrc;
34372
- this.HQRenderingUrl = rendering.HQRenderingUrl;
34373
- this.layerMaskAsBase64 = rendering.layerMaskAsBase64;
34374
- this.layerMaskThreeTexture = rendering.layerMaskThreeTexture;
34375
- this.isFullscreenRendering = rendering.isFullscreenRendering;
34376
- this.hasStaticBackground = rendering.hasStaticBackground;
34377
- this.hasDimensionLines = rendering.hasDimensionLines;
34378
- this.plannerMeasureDigits = rendering.plannerMeasureDigits;
34379
- this.alternateRendererInfo = rendering.alternateRendererInfo;
34380
- this.isAlternateRendering = rendering.isAlternateRendering;
34381
- this.alternateRenderingsExist = rendering.alternateRenderingsExist;
34382
- this.mediaServiceSaveMode = rendering.mediaServiceSaveMode;
34383
- this.isLoadedFromCache = rendering.isLoadedFromCache;
34384
- this.catalogData = rendering.catalogData;
34385
- }
34386
- }, {
34387
- key: "getAllDockingPoints",
34388
- value: function getAllDockingPoints(setId, elementId) {
34389
- if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
34390
- return this.uiInfo['S1']['E' + elementId]['DP'];
34391
- }
34392
- return this.uiInfo[setId]['E' + elementId]['DP'];
34393
- }
34394
- }, {
34395
- key: "getHasStaticBackground",
34396
- value: function getHasStaticBackground() {
34397
- return this.hasStaticBackground;
34398
- }
34399
- }, {
34400
- key: "getIsFullscreenRendering",
34401
- value: function getIsFullscreenRendering() {
34402
- return this.isFullscreenRendering;
34403
- }
34404
- }, {
34405
- key: "setIsFullscreenRendering",
34406
- value: function setIsFullscreenRendering(isFullscreen) {
34407
- this.isFullscreenRendering = isFullscreen;
34188
+ var DivaBasketHandler = /*#__PURE__*/function () {
34189
+ function DivaBasketHandler(plannerConfig) {
34190
+ var _this = this,
34191
+ _this$plannerConfig$s,
34192
+ _this$plannerConfig$s2,
34193
+ _this$plannerConfig$a;
34194
+ _classCallCheck(this, DivaBasketHandler);
34195
+ _defineProperty(this, "baskets", {});
34196
+ _defineProperty(this, "ignoreInitObjectWhenInitializing", false);
34197
+ _defineProperty(this, "plannerConfig", void 0);
34198
+ _defineProperty(this, "divaNr", void 0);
34199
+ _defineProperty(this, "loadDivaNr", void 0);
34200
+ _defineProperty(this, "specificSetIdToLoad", void 0);
34201
+ _defineProperty(this, "assignNewDivaNr", false);
34202
+ _defineProperty(this, "basketWasSavedWithCurrentDocVersion", void 0);
34203
+ _defineProperty(this, "emailConfig", void 0);
34204
+ _defineProperty(this, "reportConfig", void 0);
34205
+ _defineProperty(this, "_divaWWSHandler", void 0);
34206
+ _defineProperty(this, "_handler", void 0);
34207
+ _defineProperty(this, "_basketHandler", void 0);
34208
+ _defineProperty(this, "startProductId", void 0);
34209
+ //Only helper variable
34210
+ _defineProperty(this, "origConfiguration", {});
34211
+ /**
34212
+ * This function returns the originalConfiguration options
34213
+ */
34214
+ _defineProperty(this, "getOrigConfiguration", function () {
34215
+ return _this.origConfiguration;
34216
+ });
34217
+ this.plannerConfig = plannerConfig;
34218
+ this.assignNewDivaNr = !!this.plannerConfig.assignNewDivaNr;
34219
+ this._handler = plannerConfig.handler;
34220
+ 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'))) {
34221
+ LOG$7.error(new DivaError('Keine Öffnungsparameter', {
34222
+ code: 'WC_0003'
34223
+ }));
34408
34224
  }
34409
- }, {
34410
- key: "getHasDimensionLines",
34411
- value: function getHasDimensionLines() {
34412
- return this.hasDimensionLines;
34225
+ this.loadDivaNr = this.plannerConfig.divaNr;
34226
+ if (this.plannerConfig.initEmptyPlanner) {
34227
+ this.assignNewDivaNr = true;
34413
34228
  }
34414
- }, {
34415
- key: "getPlannerMeasureDigits",
34416
- value: function getPlannerMeasureDigits() {
34417
- return this.plannerMeasureDigits;
34229
+ if ((_this$plannerConfig$a = this.plannerConfig.apiConfig) !== null && _this$plannerConfig$a !== void 0 && _this$plannerConfig$a.basketService) {
34230
+ var _this$plannerConfig$a2, _this$plannerConfig$a3;
34231
+ 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"]);
34418
34232
  }
34419
- }, {
34420
- key: "getIsAlternateRendering",
34421
- value: function getIsAlternateRendering() {
34422
- return this.isAlternateRendering;
34233
+ }
34234
+ return _createClass(DivaBasketHandler, [{
34235
+ key: "actDivaNr",
34236
+ get: function get() {
34237
+ return this.divaNr;
34423
34238
  }
34424
34239
  }, {
34425
- key: "getAlternateRenderInfo",
34426
- value: function getAlternateRenderInfo() {
34427
- return this.alternateRendererInfo;
34240
+ key: "actBasket",
34241
+ get: function get() {
34242
+ return this.baskets[this.divaNr];
34428
34243
  }
34429
34244
  }, {
34430
- key: "getAlternateRenderingsExist",
34431
- value: function getAlternateRenderingsExist() {
34432
- return this.alternateRenderingsExist;
34245
+ key: "catalogCodexesOfOrderSets",
34246
+ get: function get() {
34247
+ var orderSets = this.baskets[this.divaNr].OrderSets;
34248
+ var ret = [];
34249
+ var _loop = function _loop(i) {
34250
+ if (!ret.find(function (catalogCodex) {
34251
+ return catalogCodex == orderSets[i].CatalogCodex;
34252
+ })) ret.push(orderSets[i].CatalogCodex);
34253
+ };
34254
+ for (var i = 0; i < orderSets.length; i++) {
34255
+ _loop(i);
34256
+ }
34257
+ return ret;
34433
34258
  }
34434
34259
  }, {
34435
- key: "hasUIInfosOfElement",
34436
- value: function hasUIInfosOfElement(setId, elementid) {
34437
- if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
34438
- return this.uiInfo['S1']['E' + elementid] != undefined;
34439
- } else {
34440
- return this.uiInfo[setId] != undefined && this.uiInfo[setId]['E' + elementid] != undefined;
34441
- }
34260
+ key: "ArticlesToInitialize",
34261
+ get: function get() {
34262
+ return this.plannerConfig.articleCodexes;
34442
34263
  }
34443
34264
  }, {
34444
- key: "getOutlinePolygonForSVG",
34445
- value: function getOutlinePolygonForSVG(setId, elementId, viewPortSize) {
34446
- var poly = [];
34447
- var avgCamDist = 0;
34448
- if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
34449
- poly = this.uiInfo['S1']['E' + elementId]['POLYOUTLINE'];
34450
- avgCamDist = this.uiInfo['S1']['E' + elementId]['AVGCAMDIST'];
34451
- } else if (this.uiInfo[setId]) {
34452
- poly = this.uiInfo[setId]['E' + elementId]['POLYOUTLINE'];
34453
- avgCamDist = this.uiInfo[setId]['E' + elementId]['AVGCAMDIST'];
34454
- } else {
34455
- poly = this.uiInfo['E' + elementId]['POLYOUTLINE'];
34456
- avgCamDist = this.uiInfo['E' + elementId]['AVGCAMDIST'];
34457
- }
34458
- if (!poly) return undefined;
34459
- var points = '';
34460
- for (var i = 0; i < poly.length; i++) {
34461
- points += Math.round(poly[i].x * 0.01 * viewPortSize.imgWidth) + ',' + Math.round((100 - poly[i].y) * 0.01 * viewPortSize.imgHeight) + ' ';
34462
- }
34463
- return {
34464
- points: points,
34465
- avgCamDist: avgCamDist
34466
- };
34265
+ key: "updatePlannerConfig",
34266
+ value: function updatePlannerConfig(plannerConfig) {
34267
+ this.plannerConfig = plannerConfig;
34467
34268
  }
34468
-
34469
- //Left/Right_Bottom/Top_Back/Front
34470
34269
  }, {
34471
- key: "getRightTopBackUIPos",
34472
- value: function getRightTopBackUIPos(setId, elemId) {
34473
- var bbox = null;
34474
- if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
34475
- bbox = this.uiInfo['S1']['E' + elemId]['BBOX3D'];
34476
- } else if (this.uiInfo[setId]) bbox = this.uiInfo[setId]['E' + elemId]['BBOX3D'];else bbox = this.uiInfo['E' + elemId]['BBOX3D'];
34477
- if (!bbox) return;
34478
- for (var i = 0; i < bbox.length; i++) {
34479
- if (bbox[i].C == 'RTB') {
34480
- return bbox[i];
34481
- }
34482
- }
34270
+ key: "updateDivaNrInBasket",
34271
+ value: function updateDivaNrInBasket(divaNr) {
34272
+ this.loadDivaNr = divaNr;
34483
34273
  }
34484
- //Left/Right_Bottom/Top_Back/Front
34485
34274
  }, {
34486
- key: "getLeftTopBackUIPos",
34487
- value: function getLeftTopBackUIPos(setId, elemId) {
34488
- var bbox = null;
34489
- if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
34490
- bbox = this.uiInfo['S1']['E' + elemId]['BBOX3D'];
34491
- } else if (this.uiInfo[setId]) bbox = this.uiInfo[setId]['E' + elemId]['BBOX3D'];else bbox = this.uiInfo['E' + elemId]['BBOX3D'];
34492
- if (!bbox) return;
34493
- for (var i = 0; i < bbox.length; i++) {
34494
- if (bbox[i].C == 'LTB') {
34495
- return bbox[i];
34496
- }
34497
- }
34498
- }
34499
- //Left/Right_Bottom/Top_Back/Front
34500
- //elementId has to be a string because when working with accs in shelf planner an element id is the combination of parentElementId.rasterHeight.gridId
34501
- }, {
34502
- key: "getLeftBottomFrontUIPos",
34503
- value: function getLeftBottomFrontUIPos(setId, elemId) {
34504
- var bbox = null;
34505
- if (this.uiInfo == '') return null;
34506
- if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
34507
- if (!this.uiInfo['S1']['E' + elemId]) return;
34508
- bbox = this.uiInfo['S1']['E' + elemId]['BBOX3D'];
34509
- } else if (this.uiInfo[setId]) {
34510
- if (!this.uiInfo[setId]['E' + elemId]) return;
34511
- bbox = this.uiInfo[setId]['E' + elemId]['BBOX3D'];
34512
- } else {
34513
- var _this$uiInfo;
34514
- bbox = (_this$uiInfo = this.uiInfo['E' + elemId]) === null || _this$uiInfo === void 0 ? void 0 : _this$uiInfo['BBOX3D'];
34515
- }
34516
- if (!bbox) return;
34517
- for (var i = 0; i < bbox.length; i++) {
34518
- if (bbox[i].C == 'LBF') {
34519
- return bbox[i];
34520
- }
34521
- }
34522
- }
34523
- }, {
34524
- key: "getBoxPlannerCornerUIPos",
34525
- value: function getBoxPlannerCornerUIPos(setId, elemId, corner) {
34526
- var boxPlan = [];
34527
- if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
34528
- boxPlan = this.uiInfo['S1']['E' + elemId]['BoxPlan'];
34529
- } else if (this.uiInfo[setId]) boxPlan = this.uiInfo[setId]['E' + elemId]['BoxPlan'];else boxPlan = this.uiInfo['E' + elemId]['BoxPlan'];
34530
- for (var i = 0; i < boxPlan.length; i++) {
34531
- if (!boxPlan[i].N || !boxPlan[i].x || !boxPlan[i].y) continue;
34532
- switch (corner) {
34533
- case 'TOPCENTER':
34534
- if (boxPlan[i].N == 'TC') {
34535
- return new Vector2(Number(boxPlan[i].x), Number(boxPlan[i].y));
34536
- }
34537
- break;
34538
- case 'LEFTCENTER':
34539
- if (boxPlan[i].N == 'LC') {
34540
- return new Vector2(Number(boxPlan[i].x), Number(boxPlan[i].y));
34541
- }
34542
- break;
34543
- case 'RIGHTCENTER':
34544
- if (boxPlan[i].N == 'RC') {
34545
- return new Vector2(Number(boxPlan[i].x), Number(boxPlan[i].y));
34546
- }
34547
- break;
34548
- case 'RIGHTTOPFRONT':
34549
- if (boxPlan[i].N == 'RTF') {
34550
- return new Vector2(Number(boxPlan[i].x), Number(boxPlan[i].y));
34551
- }
34552
- break;
34553
- }
34554
- }
34555
- return undefined;
34556
- }
34557
- }, {
34558
- key: "getUnityCamPos",
34559
- value: function getUnityCamPos() {
34560
- return new Vector3(parseFloat(this.uiInfo['CAM']['X']), parseFloat(this.uiInfo['CAM']['Y']), parseFloat(this.uiInfo['CAM']['Z']));
34561
- }
34562
- }, {
34563
- key: "getUnityCamRot",
34564
- value: function getUnityCamRot() {
34565
- // return new Vector3(parseFloat(this.uiInfo["CAM"]["RX"]), parseFloat(this.uiInfo["CAM"]["RY"]), parseFloat(this.uiInfo["CAM"]["RZ"]));
34566
- var quatVec = new Vector4(parseFloat(this.uiInfo['CAM']['QX']), parseFloat(this.uiInfo['CAM']['QY']), parseFloat(this.uiInfo['CAM']['QZ']), parseFloat(this.uiInfo['CAM']['QW']));
34567
- return quatVec;
34568
- }
34569
- }, {
34570
- key: "getUnityFOV",
34571
- value: function getUnityFOV() {
34572
- return parseFloat(this.uiInfo['CAM']['FOV']);
34573
- }
34574
-
34575
- //elementId has to be a string because when working with accs in shelf planner an element id is the combination of parentElementId.rasterHeight.gridId
34576
- //It returns the distance of an element to the ground in cm
34577
- }, {
34578
- key: "getDistanceToGround",
34579
- value: function getDistanceToGround(setId, elementId) {
34580
- setId = this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined ? 'S1' : setId;
34581
- if (this.uiInfo[setId] && this.uiInfo[setId]['E' + elementId] && this.uiInfo[setId]['E' + elementId]['DIM'] && this.uiInfo[setId]['E' + elementId]['DIM']['dfg']) {
34582
- return this.uiInfo[setId]['E' + elementId]['DIM']['dfg'] * 100;
34583
- }
34584
- return -1;
34585
- }
34586
- }, {
34587
- key: "addUIInfo",
34588
- value: function addUIInfo(uiInfo) {
34589
- try {
34590
- this.uiInfo = JSON.parse(uiInfo);
34591
- //this.calcOutlinePolygon();
34592
- } catch (error) {
34593
- LOG$7.error(new DivaError('Error when parsing UI Info in rendering. Corrupt UIInfo: ' + uiInfo, {
34594
- code: 'WC_0013',
34595
- cause: error
34596
- }));
34597
- }
34598
- }
34599
-
34600
- /**
34601
- * This function adds a blobImage to the rendering .
34602
- * It is parsed to a base64 image.
34603
- * @param blob The blob contains the image
34604
- * @param isLayerMask True if the Image is the layer mask image
34605
- */
34606
- }, {
34607
- key: "addImgAsBlob",
34608
- value: function addImgAsBlob(buffer, isLayerMask) {
34609
- if (isLayerMask) this.layerMaskAsBase64 = buffer.toString('base64');else this.imgForSrc = 'data:image/jpeg;base64,' + buffer.toString('base64');
34610
- }
34611
-
34612
- //Write $("img.einBild").src
34613
- }, {
34614
- key: "getHQRenderingURL",
34615
- value: function getHQRenderingURL() {
34616
- return this.HQRenderingUrl;
34617
- }
34618
- }, {
34619
- key: "getArURl",
34620
- value: function getArURl() {
34621
- return this.ArUrl;
34622
- }
34623
- }, {
34624
- key: "getSpinURL",
34625
- value: function getSpinURL() {
34626
- return this.SpinUrl;
34627
- }
34628
- }, {
34629
- key: "getImageForSrc",
34630
- value: function getImageForSrc() {
34631
- return this.imgForSrc;
34632
- }
34633
- }, {
34634
- key: "containsSirvUrl",
34635
- value: function containsSirvUrl() {
34636
- return this.HQRenderingUrl != '';
34637
- }
34638
- }, {
34639
- key: "setArUrl",
34640
- value: function setArUrl(url) {
34641
- this.ArUrl = url;
34642
- }
34643
- }, {
34644
- key: "setSpinUrl",
34645
- value: function setSpinUrl(url) {
34646
- this.SpinUrl = url;
34647
- }
34648
- }, {
34649
- key: "setHQRenderingUrl",
34650
- value: function setHQRenderingUrl(url, useSirvViewer) {
34651
- if (useSirvViewer) {
34652
- this.HQRenderingUrl = url;
34653
- } else {
34654
- this.imgForSrc = url;
34655
- }
34656
- }
34657
-
34658
- //*****************************************GETTER und SETTER********************************************** */
34659
- }, {
34660
- key: "CatalogCodex",
34661
- get: function get() {
34662
- return this.catalogData.catalogCodex;
34663
- },
34664
- set: function set(val) {
34665
- this.catalogData.catalogCodex = val;
34666
- }
34667
- }, {
34668
- key: "CatalogGUID",
34669
- get: function get() {
34670
- return this.catalogData.catalogGUID;
34671
- },
34672
- set: function set(val) {
34673
- this.catalogData.catalogGUID = val;
34674
- }
34675
- }, {
34676
- key: "IsLoadedFromCache",
34677
- get: function get() {
34678
- return this.isLoadedFromCache;
34679
- },
34680
- set: function set(val) {
34681
- this.isLoadedFromCache = val;
34682
- }
34683
- }, {
34684
- key: "PlanningHash",
34685
- get: function get() {
34686
- return this.planningHash;
34687
- }
34688
- }, {
34689
- key: "RenderHash",
34690
- get: function get() {
34691
- return this.renderHash;
34692
- }
34693
- }, {
34694
- key: "UrlToSavedRendering",
34695
- get: function get() {
34696
- return this.urlToSavedRendering;
34697
- },
34698
- set: function set(url) {
34699
- this.urlToSavedRendering = url;
34700
- }
34701
- }, {
34702
- key: "HasLayerMask",
34703
- get: function get() {
34704
- return this.hasLayerMask;
34705
- },
34706
- set: function set(hasLayerMask) {
34707
- this.hasLayerMask = hasLayerMask;
34708
- }
34709
- }, {
34710
- key: "RenderWidth",
34711
- get: function get() {
34712
- return this.renderWidth;
34713
- }
34714
- }, {
34715
- key: "RenderHeight",
34716
- get: function get() {
34717
- return this.renderHeight;
34718
- }
34719
- }, {
34720
- key: "getHasLayerMask",
34721
- value: function getHasLayerMask() {
34722
- return this.hasLayerMask;
34723
- }
34724
- }, {
34725
- key: "getLayerMaskForSrc",
34726
- value: function getLayerMaskForSrc() {
34727
- return this.layerMaskAsBase64;
34728
- }
34729
- }, {
34730
- key: "HasLayerMaskThreeTexture",
34731
- get: function get() {
34732
- return this.layerMaskThreeTexture != undefined;
34733
- }
34734
- }, {
34735
- key: "LayerMaskThreeTexture",
34736
- get: function get() {
34737
- return this.layerMaskThreeTexture;
34738
- },
34739
- set: function set(tex) {
34740
- this.layerMaskThreeTexture = tex;
34741
- }
34742
- /*
34743
- get DoStream() {
34744
- return this.doStream;
34745
- }
34746
- */
34747
- }, {
34748
- key: "AllImgLoaded",
34749
- get: function get() {
34750
- return (this.imgForSrc != '' || this.HQRenderingUrl != '') && (!this.hasLayerMask || this.layerMaskAsBase64 != '');
34751
- }
34752
- }, {
34753
- key: "UiInfoLoaded",
34754
- get: function get() {
34755
- return this.uiInfo != '';
34756
- }
34757
- }, {
34758
- key: "CreationTime",
34759
- get: function get() {
34760
- return this.creationTime.getTime();
34761
- }
34762
- }, {
34763
- key: "MediaServiceSaveMode",
34764
- get: function get() {
34765
- return this.mediaServiceSaveMode;
34766
- },
34767
- set: function set(mode) {
34768
- this.mediaServiceSaveMode = mode;
34769
- }
34770
- }]);
34771
- }();
34772
-
34773
- 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; }
34774
- 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; }
34775
- var LOG$6 = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
34776
- var DivaBasketHandler = /*#__PURE__*/function () {
34777
- function DivaBasketHandler(plannerConfig) {
34778
- var _this = this,
34779
- _this$plannerConfig$s,
34780
- _this$plannerConfig$s2,
34781
- _this$plannerConfig$a;
34782
- _classCallCheck(this, DivaBasketHandler);
34783
- _defineProperty(this, "baskets", {});
34784
- _defineProperty(this, "ignoreInitObjectWhenInitializing", false);
34785
- _defineProperty(this, "plannerConfig", void 0);
34786
- _defineProperty(this, "divaNr", void 0);
34787
- _defineProperty(this, "loadDivaNr", void 0);
34788
- _defineProperty(this, "specificSetIdToLoad", void 0);
34789
- _defineProperty(this, "assignNewDivaNr", false);
34790
- _defineProperty(this, "basketWasSavedWithCurrentDocVersion", void 0);
34791
- _defineProperty(this, "emailConfig", void 0);
34792
- _defineProperty(this, "reportConfig", void 0);
34793
- _defineProperty(this, "_divaWWSHandler", void 0);
34794
- _defineProperty(this, "_handler", void 0);
34795
- _defineProperty(this, "_basketHandler", void 0);
34796
- _defineProperty(this, "startProductId", void 0);
34797
- //Only helper variable
34798
- _defineProperty(this, "origConfiguration", {});
34799
- /**
34800
- * This function returns the originalConfiguration options
34801
- */
34802
- _defineProperty(this, "getOrigConfiguration", function () {
34803
- return _this.origConfiguration;
34804
- });
34805
- this.plannerConfig = plannerConfig;
34806
- this.assignNewDivaNr = !!this.plannerConfig.assignNewDivaNr;
34807
- this._handler = plannerConfig.handler;
34808
- 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'))) {
34809
- LOG$6.error(new DivaError('Keine Öffnungsparameter', {
34810
- code: 'WC_0003'
34811
- }));
34812
- }
34813
- this.loadDivaNr = this.plannerConfig.divaNr;
34814
- if (this.plannerConfig.initEmptyPlanner) {
34815
- this.assignNewDivaNr = true;
34816
- }
34817
- if ((_this$plannerConfig$a = this.plannerConfig.apiConfig) !== null && _this$plannerConfig$a !== void 0 && _this$plannerConfig$a.basketService) {
34818
- var _this$plannerConfig$a2, _this$plannerConfig$a3;
34819
- 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"]);
34820
- }
34821
- }
34822
- return _createClass(DivaBasketHandler, [{
34823
- key: "actDivaNr",
34824
- get: function get() {
34825
- return this.divaNr;
34826
- }
34827
- }, {
34828
- key: "actBasket",
34829
- get: function get() {
34830
- return this.baskets[this.divaNr];
34831
- }
34832
- }, {
34833
- key: "catalogCodexesOfOrderSets",
34834
- get: function get() {
34835
- var orderSets = this.baskets[this.divaNr].OrderSets;
34836
- var ret = [];
34837
- var _loop = function _loop(i) {
34838
- if (!ret.find(function (catalogCodex) {
34839
- return catalogCodex == orderSets[i].CatalogCodex;
34840
- })) ret.push(orderSets[i].CatalogCodex);
34841
- };
34842
- for (var i = 0; i < orderSets.length; i++) {
34843
- _loop(i);
34844
- }
34845
- return ret;
34846
- }
34847
- }, {
34848
- key: "ArticlesToInitialize",
34849
- get: function get() {
34850
- return this.plannerConfig.articleCodexes;
34851
- }
34852
- }, {
34853
- key: "updatePlannerConfig",
34854
- value: function updatePlannerConfig(plannerConfig) {
34855
- this.plannerConfig = plannerConfig;
34856
- }
34857
- }, {
34858
- key: "updateDivaNrInBasket",
34859
- value: function updateDivaNrInBasket(divaNr) {
34860
- this.loadDivaNr = divaNr;
34861
- }
34862
- }, {
34863
- key: "setIgnoreInitObjectWhenInitializing",
34864
- value: function setIgnoreInitObjectWhenInitializing() {
34865
- this.ignoreInitObjectWhenInitializing = true;
34275
+ key: "setIgnoreInitObjectWhenInitializing",
34276
+ value: function setIgnoreInitObjectWhenInitializing() {
34277
+ this.ignoreInitObjectWhenInitializing = true;
34866
34278
  }
34867
34279
  }, {
34868
34280
  key: "initializeBasket",
34869
34281
  value: function () {
34870
34282
  var _initializeBasket = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(api) {
34871
34283
  var _this$plannerConfig$s3, _this$plannerConfig$s5, _api$getPlannerType, _this$plannerConfig$r;
34872
- 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;
34284
+ 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;
34873
34285
  return _regeneratorRuntime.wrap(function _callee$(_context) {
34874
34286
  while (1) switch (_context.prev = _context.next) {
34875
34287
  case 0:
34876
34288
  this.basketWasSavedWithCurrentDocVersion = false;
34877
34289
  this.startProductId = undefined;
34878
- LOG$6.debug("Basket initialising. initObject is: '", this.plannerConfig, "' divaNr to load is: '" + this.loadDivaNr + "'");
34290
+ LOG$7.debug("Basket initialising. initObject is: '", this.plannerConfig, "' divaNr to load is: '" + this.loadDivaNr + "'");
34879
34291
  if (this.ignoreInitObjectWhenInitializing) {
34880
34292
  _context.next = 34;
34881
34293
  break;
@@ -35002,9 +34414,9 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35002
34414
  op: 'eq',
35003
34415
  value: (_this$plannerConfig$c2 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c2 === void 0 ? void 0 : _this$plannerConfig$c2._id
35004
34416
  }, {
35005
- id: 'available',
34417
+ id: 'availableForOrganizations',
35006
34418
  op: 'eq',
35007
- value: true
34419
+ value: (_this$plannerConfig$c3 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c3 === void 0 ? void 0 : _this$plannerConfig$c3._id
35008
34420
  }]);
35009
34421
  case 60:
35010
34422
  result = _context.sent;
@@ -35041,7 +34453,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35041
34453
  title: (_api$getI18n = api.getI18n()) === null || _api$getI18n === void 0 ? void 0 : _api$getI18n.t('configurator.no_startproduct_defined_title'),
35042
34454
  text: (_api$getI18n2 = api.getI18n()) === null || _api$getI18n2 === void 0 ? void 0 : _api$getI18n2.t('configurator.no_startproduct_defined_text')
35043
34455
  });
35044
- 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"!'));
34456
+ 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"!'));
35045
34457
  case 77:
35046
34458
  _context.next = 83;
35047
34459
  break;
@@ -35189,12 +34601,12 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35189
34601
  case 0:
35190
34602
  basketFromAPI = (_dataFromApi$basket = dataFromApi.basket) !== null && _dataFromApi$basket !== void 0 ? _dataFromApi$basket : dataFromApi.Basket; //evaluateRopoEffect(basketFromAPI,);
35191
34603
  if (origProductId) basketFromAPI.OrigProductId = origProductId;
35192
- basket = _objectSpread$8({}, basketFromAPI);
34604
+ basket = _objectSpread$7({}, basketFromAPI);
35193
34605
  if (!basketFromAPI) {
35194
- _context5.next = 50;
34606
+ _context5.next = 48;
35195
34607
  break;
35196
34608
  }
35197
- LOG$6.debug('divaNr: ' + divaNr + ' was loaded successfully from server!');
34609
+ LOG$7.debug('divaNr: ' + divaNr + ' was loaded successfully from server!');
35198
34610
  if (basketFromAPI.OrigDivaNr) {
35199
34611
  this.origConfiguration.originDivaNr = basketFromAPI.OrigDivaNr;
35200
34612
  } else if (basketFromAPI.OrigCatalogCodex) {
@@ -35288,20 +34700,14 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35288
34700
  this.baskets[newDivaNr] = new BasketData(basket);
35289
34701
  this.baskets[newDivaNr].clearRenderData();
35290
34702
  if (!keepOldDivaNr) this.divaNr = newDivaNr;
35291
- _context5.next = 46;
35292
- return DivaUtils.initCache({
35293
- accountGuid: this.baskets[newDivaNr].OrderSets[0].AccountGUID,
35294
- catalogCodex: this.baskets[newDivaNr].OrderSets[0].CatalogCodex
35295
- });
35296
- case 46:
35297
34703
  if (this.assignNewDivaNr) {
35298
34704
  this.baskets[newDivaNr].clearBasketClientData();
35299
34705
  this.baskets[newDivaNr].ProductSetName = '';
35300
34706
  }
35301
34707
  return _context5.abrupt("return", true);
35302
- case 50:
34708
+ case 48:
35303
34709
  return _context5.abrupt("return", false);
35304
- case 51:
34710
+ case 49:
35305
34711
  case "end":
35306
34712
  return _context5.stop();
35307
34713
  }
@@ -35335,7 +34741,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35335
34741
  key: "loadBasketByCatalogCodex",
35336
34742
  value: function () {
35337
34743
  var _loadBasketByCatalogCodex = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6(api) {
35338
- var _this$plannerConfig$s8, _this$actBasket$Order, _this$actBasket$Order2;
34744
+ var _this$plannerConfig$s8;
35339
34745
  var newBasket, _this$baskets$this$di;
35340
34746
  return _regeneratorRuntime.wrap(function _callee6$(_context6) {
35341
34747
  while (1) switch (_context6.prev = _context6.next) {
@@ -35346,37 +34752,23 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35346
34752
  if (this.plannerConfig.articleCodexes) {
35347
34753
  this.origConfiguration.originArticleCodexes = this.plannerConfig.articleCodexes;
35348
34754
  }
35349
- if (!(DivaUtils.CacheIsEnabled && DivaUtils.CacheAccountGuid)) {
34755
+ if (!((_this$plannerConfig$s8 = this.plannerConfig.startDivaNr) !== null && _this$plannerConfig$s8 !== void 0)) {
35350
34756
  _context6.next = 6;
35351
34757
  break;
35352
34758
  }
35353
- this.plannerConfig.accountGuid = DivaUtils.CacheAccountGuid;
35354
- _context6.next = 8;
34759
+ _context6.t0 = _this$plannerConfig$s8;
34760
+ _context6.next = 9;
35355
34761
  break;
35356
34762
  case 6:
35357
34763
  _context6.next = 8;
35358
- return DivaUtils.initCache({
35359
- accountGuid: this.plannerConfig.accountGuid,
35360
- catalogCodex: this.plannerConfig.catalogCodex
35361
- });
35362
- case 8:
35363
- if (!((_this$plannerConfig$s8 = this.plannerConfig.startDivaNr) !== null && _this$plannerConfig$s8 !== void 0)) {
35364
- _context6.next = 12;
35365
- break;
35366
- }
35367
- _context6.t0 = _this$plannerConfig$s8;
35368
- _context6.next = 15;
35369
- break;
35370
- case 12:
35371
- _context6.next = 14;
35372
34764
  return this.createNewDivaNr(api);
35373
- case 14:
34765
+ case 8:
35374
34766
  _context6.t0 = _context6.sent;
35375
- case 15:
34767
+ case 9:
35376
34768
  this.divaNr = _context6.t0;
35377
- _context6.next = 18;
34769
+ _context6.next = 12;
35378
34770
  return this.createNewBasket(api, this.plannerConfig, this.divaNr, api.getLanguage());
35379
- case 18:
34771
+ case 12:
35380
34772
  newBasket = _context6.sent;
35381
34773
  if (!this.plannerConfig.basketData) {
35382
34774
  this.baskets[this.divaNr] = newBasket;
@@ -35393,14 +34785,8 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35393
34785
  if (this.baskets[this.divaNr].SetPlannerInfos) ;
35394
34786
  }
35395
34787
  this.specificSetIdToLoad = this.plannerConfig.setId;
35396
- _context6.next = 23;
35397
- return DivaUtils.initCache({
35398
- accountGuid: (_this$actBasket$Order = this.actBasket.OrderSets[0]) === null || _this$actBasket$Order === void 0 ? void 0 : _this$actBasket$Order.AccountGUID,
35399
- catalogCodex: (_this$actBasket$Order2 = this.actBasket.OrderSets[0]) === null || _this$actBasket$Order2 === void 0 ? void 0 : _this$actBasket$Order2.CatalogCodex
35400
- });
35401
- case 23:
35402
34788
  return _context6.abrupt("return", true);
35403
- case 24:
34789
+ case 16:
35404
34790
  case "end":
35405
34791
  return _context6.stop();
35406
34792
  }
@@ -35431,7 +34817,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35431
34817
  case 9:
35432
34818
  _context7.prev = 9;
35433
34819
  _context7.t0 = _context7["catch"](0);
35434
- LOG$6.error(new DivaError('DivaNr konnte in der Datenbank nicht gefunden werden', {
34820
+ LOG$7.error(new DivaError('DivaNr konnte in der Datenbank nicht gefunden werden', {
35435
34821
  code: 'WC_0004',
35436
34822
  custom: {
35437
34823
  divaNr: divaNr
@@ -35467,7 +34853,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35467
34853
  _context8.next = 8;
35468
34854
  break;
35469
34855
  }
35470
- LOG$6.error(new DivaError('ProductId konnte in der Datenbank nicht gefunden werden', {
34856
+ LOG$7.error(new DivaError('ProductId konnte in der Datenbank nicht gefunden werden', {
35471
34857
  code: 'WC_0005',
35472
34858
  custom: {
35473
34859
  productId: productId
@@ -35551,7 +34937,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35551
34937
  _context10.next = 6;
35552
34938
  break;
35553
34939
  }
35554
- LOG$6.error(new DivaError('ProductId konnte in der Datenbank nicht gefunden werden', {
34940
+ LOG$7.error(new DivaError('ProductId konnte in der Datenbank nicht gefunden werden', {
35555
34941
  code: 'WC_0005',
35556
34942
  custom: {
35557
34943
  productId: productId
@@ -35588,8 +34974,8 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35588
34974
  CatalogGUID: initObject.catalogGuid,
35589
34975
  AccountGUID: initObject.accountGuid,
35590
34976
  Favorites: new Favorites()
35591
- }); //dont get session if cache is active (SuS)
35592
- if (!(initObject.accountGuid && !orderSet.AccountSessionGUID && !DivaUtils.cacheIsReady)) {
34977
+ });
34978
+ if (!(initObject.accountGuid && !orderSet.AccountSessionGUID)) {
35593
34979
  _context11.next = 5;
35594
34980
  break;
35595
34981
  }
@@ -35638,12 +35024,12 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35638
35024
  key: "saveToBasket",
35639
35025
  value: function () {
35640
35026
  var _saveToBasket = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee12(api, actBasket, returnTo) {
35641
- var _this$plannerConfig$c3, _this$_basketHandler, _api$getJwt;
35027
+ var _this$plannerConfig$c4, _this$_basketHandler, _api$getJwt;
35642
35028
  var response;
35643
35029
  return _regeneratorRuntime.wrap(function _callee12$(_context12) {
35644
35030
  while (1) switch (_context12.prev = _context12.next) {
35645
35031
  case 0:
35646
- LOG$6.startTransaction({
35032
+ LOG$7.startTransaction({
35647
35033
  event: 'SaveBasketOnAPI',
35648
35034
  eventId: 'SAVE_BASKET_ON_API',
35649
35035
  message: 'Save Basket on API'
@@ -35657,7 +35043,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35657
35043
  return DivaUtils.updateBasketOrgInfo(actBasket, this.plannerConfig.currentOrganization, this.plannerConfig.currentUser, this.plannerConfig.settings.keepSalesPersonDataInBasket);
35658
35044
  case 8:
35659
35045
  actBasket.UserLanguage = api.getLanguage();
35660
- actBasket.PrintRetailLogo = (_this$plannerConfig$c3 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c3 === void 0 ? void 0 : _this$plannerConfig$c3.logoUrl;
35046
+ actBasket.PrintRetailLogo = (_this$plannerConfig$c4 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c4 === void 0 ? void 0 : _this$plannerConfig$c4.logoUrl;
35661
35047
  _context12.next = 12;
35662
35048
  return (_this$_basketHandler = this._basketHandler) === null || _this$_basketHandler === void 0 ? void 0 : _this$_basketHandler.saveBasket({
35663
35049
  jwt: (_api$getJwt = api.getJwt()) !== null && _api$getJwt !== void 0 ? _api$getJwt : undefined,
@@ -35682,7 +35068,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35682
35068
  }
35683
35069
  return _context12.abrupt("return", response);
35684
35070
  case 19:
35685
- LOG$6.successTransaction('saveBasketOnAPI');
35071
+ LOG$7.successTransaction('saveBasketOnAPI');
35686
35072
  return _context12.abrupt("return", response === null || response === void 0 ? void 0 : response._id);
35687
35073
  case 21:
35688
35074
  case "end":
@@ -35788,7 +35174,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35788
35174
  if (_loop2()) continue;
35789
35175
  }
35790
35176
  var variantValues = article.VariantValuesParentOption;
35791
- var data = _objectSpread$8(_objectSpread$8({}, this.actBasket), {}, {
35177
+ var data = _objectSpread$7(_objectSpread$7({}, this.actBasket), {}, {
35792
35178
  changedValues: changedValues,
35793
35179
  variantValues: variantValues,
35794
35180
  isInit: isInit,
@@ -35813,7 +35199,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35813
35199
  break;
35814
35200
  case 3:
35815
35201
  _context13.next = 5;
35816
- return import('./PfisterWWSHandler-28dd4770.js');
35202
+ return import('./PfisterWWSHandler-701e95ee.js');
35817
35203
  case 5:
35818
35204
  _yield$import = _context13.sent;
35819
35205
  PfisterWWSHandler = _yield$import["default"];
@@ -35821,7 +35207,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35821
35207
  return _context13.abrupt("break", 33);
35822
35208
  case 9:
35823
35209
  _context13.next = 11;
35824
- return import('./LiviqueWWSHandler-ab108660.js');
35210
+ return import('./LiviqueWWSHandler-2f2cc617.js');
35825
35211
  case 11:
35826
35212
  _yield$import2 = _context13.sent;
35827
35213
  LiviqueWWSHandler = _yield$import2["default"];
@@ -35829,7 +35215,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35829
35215
  return _context13.abrupt("break", 33);
35830
35216
  case 15:
35831
35217
  _context13.next = 17;
35832
- return import('./SeriousBasketHandler-7d8bdefe.js');
35218
+ return import('./SeriousBasketHandler-d5b6a347.js');
35833
35219
  case 17:
35834
35220
  _yield$import3 = _context13.sent;
35835
35221
  SeriousWWSHandler = _yield$import3["default"];
@@ -35837,7 +35223,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35837
35223
  return _context13.abrupt("break", 33);
35838
35224
  case 21:
35839
35225
  _context13.next = 23;
35840
- return import('./ProductBasketHandler-56d310f8.js');
35226
+ return import('./ProductBasketHandler-a1dd8bb2.js');
35841
35227
  case 23:
35842
35228
  _yield$import4 = _context13.sent;
35843
35229
  ProductWWSHandler = _yield$import4["default"];
@@ -35845,7 +35231,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35845
35231
  return _context13.abrupt("break", 33);
35846
35232
  case 27:
35847
35233
  _context13.next = 29;
35848
- return import('./StandardWWSHandler-8b217a8f.js');
35234
+ return import('./StandardWWSHandler-d2f8cb1c.js');
35849
35235
  case 29:
35850
35236
  _yield$import5 = _context13.sent;
35851
35237
  StandardWWSHandler = _yield$import5["default"];
@@ -35876,43 +35262,43 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35876
35262
  //if no shopType is set in parent organization, no ropo effekt
35877
35263
  if (!organization.shopType) return;
35878
35264
  if (organization.shopType == 'store' && sourceOrganizationId.shopType == 'store') {
35879
- var _this$plannerConfig$c4;
35880
- LOG$6.businessEvent('ropoEffectStoreToStore', 'Seller', 'Evaluating the ROPO Effect Store To Store', {
35881
- sourceDivaNr: sourceBasket.DivaNr,
35882
- sourceOrgId: sourceOrganizationId.id,
35883
- targetOrgId: (_this$plannerConfig$c4 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c4 === void 0 ? void 0 : _this$plannerConfig$c4._id
35884
- });
35885
- } else if (organization.shopType == 'webshop' && sourceOrganizationId.shopType == 'webshop') {
35886
35265
  var _this$plannerConfig$c5;
35887
- LOG$6.businessEvent('ropoEffectWebToWeb', 'Seller', 'Evaluating the ROPO Effect Web To Web', {
35266
+ LOG$7.businessEvent('ropoEffectStoreToStore', 'Seller', 'Evaluating the ROPO Effect Store To Store', {
35888
35267
  sourceDivaNr: sourceBasket.DivaNr,
35889
35268
  sourceOrgId: sourceOrganizationId.id,
35890
35269
  targetOrgId: (_this$plannerConfig$c5 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c5 === void 0 ? void 0 : _this$plannerConfig$c5._id
35891
35270
  });
35892
- } else if (organization.shopType == 'store' && sourceOrganizationId.shopType == 'webshop') {
35271
+ } else if (organization.shopType == 'webshop' && sourceOrganizationId.shopType == 'webshop') {
35893
35272
  var _this$plannerConfig$c6;
35894
- LOG$6.businessEvent('ropoEffectStoreToWeb', 'Seller', 'Evaluating the ROPO Effect Web To Store', {
35273
+ LOG$7.businessEvent('ropoEffectWebToWeb', 'Seller', 'Evaluating the ROPO Effect Web To Web', {
35895
35274
  sourceDivaNr: sourceBasket.DivaNr,
35896
35275
  sourceOrgId: sourceOrganizationId.id,
35897
35276
  targetOrgId: (_this$plannerConfig$c6 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c6 === void 0 ? void 0 : _this$plannerConfig$c6._id
35898
35277
  });
35899
- } else if (organization.shopType == 'webshop' && sourceOrganizationId.shopType == 'store') {
35278
+ } else if (organization.shopType == 'store' && sourceOrganizationId.shopType == 'webshop') {
35900
35279
  var _this$plannerConfig$c7;
35901
- LOG$6.businessEvent('ropoEffectWebToStore', 'Seller', 'Evaluating the ROPO Effect Store To Web', {
35280
+ LOG$7.businessEvent('ropoEffectStoreToWeb', 'Seller', 'Evaluating the ROPO Effect Web To Store', {
35902
35281
  sourceDivaNr: sourceBasket.DivaNr,
35903
35282
  sourceOrgId: sourceOrganizationId.id,
35904
35283
  targetOrgId: (_this$plannerConfig$c7 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c7 === void 0 ? void 0 : _this$plannerConfig$c7._id
35905
35284
  });
35285
+ } else if (organization.shopType == 'webshop' && sourceOrganizationId.shopType == 'store') {
35286
+ var _this$plannerConfig$c8;
35287
+ LOG$7.businessEvent('ropoEffectWebToStore', 'Seller', 'Evaluating the ROPO Effect Store To Web', {
35288
+ sourceDivaNr: sourceBasket.DivaNr,
35289
+ sourceOrgId: sourceOrganizationId.id,
35290
+ targetOrgId: (_this$plannerConfig$c8 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c8 === void 0 ? void 0 : _this$plannerConfig$c8._id
35291
+ });
35906
35292
  }
35907
35293
  } catch (e) {
35908
- var _this$plannerConfig$c8;
35909
- LOG$6.error(new DivaError('Error on Evaluating ROPO Effect', {
35294
+ var _this$plannerConfig$c9;
35295
+ LOG$7.error(new DivaError('Error on Evaluating ROPO Effect', {
35910
35296
  code: 'SELLER_0006',
35911
35297
  cause: e,
35912
35298
  custom: {
35913
35299
  sourceDivaNr: sourceBasket.DivaNr,
35914
35300
  sourceOrgId: sourceOrganizationId,
35915
- targetOrgId: (_this$plannerConfig$c8 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c8 === void 0 ? void 0 : _this$plannerConfig$c8._id
35301
+ targetOrgId: (_this$plannerConfig$c9 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c9 === void 0 ? void 0 : _this$plannerConfig$c9._id
35916
35302
  }
35917
35303
  }));
35918
35304
  }
@@ -35920,7 +35306,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35920
35306
  }]);
35921
35307
  }();
35922
35308
 
35923
- var LOG$5 = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
35309
+ var LOG$6 = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
35924
35310
  var ViewPointHandler = /*#__PURE__*/function () {
35925
35311
  function ViewPointHandler() {
35926
35312
  _classCallCheck(this, ViewPointHandler);
@@ -36143,22 +35529,22 @@ var ViewPointHandler = /*#__PURE__*/function () {
36143
35529
  var roomListObj = JSON.parse(roomlist);
36144
35530
  var roomIsSel = true;
36145
35531
  for (var roomCodex in roomListObj) {
36146
- LOG$5.debug('Successfully Init roomList with Codex ' + roomCodex, 'ViewPointHandler - initRoomList');
35532
+ LOG$6.debug('Successfully Init roomList with Codex ' + roomCodex, 'ViewPointHandler - initRoomList');
36147
35533
  var curRoom = roomListObj[roomCodex];
36148
35534
  var mainCategory = '#WG#';
36149
35535
  if (!this.staticRoomMainCategories.has(roomCodex)) {
36150
- LOG$5.error(new DivaError('Error when parsing preview URL for a viewPoint. Please add a retailerMainCategory for this catalog in the CE!', {
35536
+ LOG$6.error(new DivaError('Error when parsing preview URL for a viewPoint. Please add a retailerMainCategory for this catalog in the CE!', {
36151
35537
  code: 'WC_0013'
36152
35538
  }));
36153
35539
  } else {
36154
35540
  var categories = this.staticRoomMainCategories.get(roomCodex);
36155
35541
  if (categories.length == 0) {
36156
- LOG$5.error(new DivaError('Error when parsing preview URL for a viewPoint. Please add a retailerMainCategory for this catalog in the CE!', {
35542
+ LOG$6.error(new DivaError('Error when parsing preview URL for a viewPoint. Please add a retailerMainCategory for this catalog in the CE!', {
36157
35543
  code: 'WC_0013'
36158
35544
  }));
36159
35545
  } else {
36160
35546
  if (categories.length > 1) {
36161
- 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!', {
35547
+ 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!', {
36162
35548
  code: 'WC_0013'
36163
35549
  }));
36164
35550
  }
@@ -36172,7 +35558,7 @@ var ViewPointHandler = /*#__PURE__*/function () {
36172
35558
  previewUrl = previewUrl.replace('#WG#', mainCategory);
36173
35559
  }
36174
35560
  if (curRoom.VP[i].R && curRoom.VP[i].R.indexOf(':') == -1) {
36175
- 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, {
35561
+ 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, {
36176
35562
  code: 'WC_0013'
36177
35563
  }));
36178
35564
  }
@@ -36270,7 +35656,7 @@ var ViewPointHandler = /*#__PURE__*/function () {
36270
35656
  this.navInfo3D.rotVert = 0;
36271
35657
  this.navInfo3D.rotHori = 0;
36272
35658
  } else {
36273
- LOG$5.debug('There is no static frontend viewpoint room: ' + roomCodex);
35659
+ LOG$6.debug('There is no static frontend viewpoint room: ' + roomCodex);
36274
35660
  }
36275
35661
  } else if (this.curRoomCodex == roominfo.codex) {
36276
35662
  roominfo.sel = false;
@@ -36415,207 +35801,415 @@ var ViewPointHandler = /*#__PURE__*/function () {
36415
35801
  }]);
36416
35802
  }();
36417
35803
 
36418
- 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; }
36419
- 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; }
36420
- var LOG$4 = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
36421
- var DivaMediaServiceHandler = /*#__PURE__*/function () {
36422
- //-------------------------------------------------- INITIALIZATION--------------------------------------------------------------//
36423
-
36424
- function DivaMediaServiceHandler() {
36425
- _classCallCheck(this, DivaMediaServiceHandler);
36426
- _defineProperty(this, "organizationId", void 0);
36427
- _defineProperty(this, "mediaServiceUrl", void 0);
36428
- _defineProperty(this, "mediaServiceApiKey", void 0);
36429
- _defineProperty(this, "jwt", void 0);
36430
- _defineProperty(this, "POST_saveTmp2PermanentPostfix", '/saveTmp2Permanent');
36431
- _defineProperty(this, "GET_MediaItemrefs", '/v1/mediaitems/refs?limit=20&skip=0&filter=');
36432
- _defineProperty(this, "POST_mediaItem", '/v1/mediaitems?ref=true');
36433
- this.organizationId = '';
36434
- this.mediaServiceUrl = '';
36435
- this.mediaServiceApiKey = '';
35804
+ //This class saves all informations needed for a rendering
35805
+ var LOG$5 = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
35806
+ var Rendering = /*#__PURE__*/function () {
35807
+ function Rendering(planningHash, renderHash, viewPointName, width, height, isFullscreenRendering, hasDimensionLines, plannerMeasureDigits, hasLayerMask, hasStaticBG, mediaServiceSaveMode, alternateRenderingsExist, alternateRendererInfo) {
35808
+ _classCallCheck(this, Rendering);
35809
+ _defineProperty(this, "planningHash", void 0);
35810
+ _defineProperty(this, "renderHash", void 0);
35811
+ _defineProperty(this, "creationTime", void 0);
35812
+ _defineProperty(this, "renderWidth", void 0);
35813
+ _defineProperty(this, "renderHeight", void 0);
35814
+ _defineProperty(this, "uiInfo", void 0);
35815
+ _defineProperty(this, "urlToSavedRendering", void 0);
35816
+ // viewPoint: string;
35817
+ // private posInfo: any;
35818
+ //private doStream: boolean; Streaming over 3D Host is deprected
35819
+ //private byteChunkArr: any;
35820
+ //private byteChunkLayerMaskArr: any;
35821
+ _defineProperty(this, "hasLayerMask", void 0);
35822
+ //private imgBytes: any;
35823
+ _defineProperty(this, "imgForSrc", void 0);
35824
+ _defineProperty(this, "layerMaskAsBase64", void 0);
35825
+ _defineProperty(this, "layerMaskThreeTexture", void 0);
35826
+ _defineProperty(this, "isFullscreenRendering", void 0);
35827
+ _defineProperty(this, "hasStaticBackground", void 0);
35828
+ _defineProperty(this, "hasDimensionLines", void 0);
35829
+ _defineProperty(this, "plannerMeasureDigits", void 0);
35830
+ _defineProperty(this, "alternateRendererInfo", void 0);
35831
+ _defineProperty(this, "isAlternateRendering", void 0);
35832
+ _defineProperty(this, "alternateRenderingsExist", void 0);
35833
+ _defineProperty(this, "mediaServiceSaveMode", void 0);
35834
+ _defineProperty(this, "catalogData", void 0);
35835
+ this.planningHash = planningHash;
35836
+ this.renderHash = renderHash;
35837
+ this.renderWidth = width;
35838
+ this.renderHeight = height;
35839
+ this.uiInfo = '';
35840
+ this.imgForSrc = '';
35841
+ this.layerMaskAsBase64 = '';
35842
+ this.isFullscreenRendering = isFullscreenRendering;
35843
+ this.hasDimensionLines = hasDimensionLines;
35844
+ this.plannerMeasureDigits = plannerMeasureDigits;
35845
+ this.hasLayerMask = hasLayerMask;
35846
+ this.creationTime = new Date();
35847
+ this.layerMaskThreeTexture = undefined;
35848
+ this.hasStaticBackground = hasStaticBG;
35849
+ this.mediaServiceSaveMode = mediaServiceSaveMode;
35850
+ this.urlToSavedRendering = '';
35851
+ this.catalogData = {
35852
+ catalogCodex: '',
35853
+ catalogGUID: ''
35854
+ };
35855
+ if (alternateRendererInfo != undefined) this.isAlternateRendering = true;else this.isAlternateRendering = false;
35856
+ this.alternateRendererInfo = alternateRendererInfo;
35857
+ this.alternateRenderingsExist = !!alternateRenderingsExist;
36436
35858
  }
36437
- return _createClass(DivaMediaServiceHandler, [{
36438
- key: "setOrganizationId",
36439
- value: function setOrganizationId(organizationId) {
36440
- this.organizationId = organizationId;
35859
+ return _createClass(Rendering, [{
35860
+ key: "clone",
35861
+ value: function clone(rendering) {
35862
+ this.planningHash = rendering.planningHash;
35863
+ this.renderHash = rendering.renderHash;
35864
+ this.creationTime = rendering.creationTime;
35865
+ this.renderWidth = rendering.renderWidth;
35866
+ this.renderHeight = rendering.renderHeight;
35867
+ this.uiInfo = rendering.uiInfo;
35868
+ this.urlToSavedRendering = rendering.urlToSavedRendering;
35869
+ this.hasLayerMask = rendering.hasLayerMask;
35870
+ this.imgForSrc = rendering.imgForSrc;
35871
+ this.layerMaskAsBase64 = rendering.layerMaskAsBase64;
35872
+ this.layerMaskThreeTexture = rendering.layerMaskThreeTexture;
35873
+ this.isFullscreenRendering = rendering.isFullscreenRendering;
35874
+ this.hasStaticBackground = rendering.hasStaticBackground;
35875
+ this.hasDimensionLines = rendering.hasDimensionLines;
35876
+ this.plannerMeasureDigits = rendering.plannerMeasureDigits;
35877
+ this.alternateRendererInfo = rendering.alternateRendererInfo;
35878
+ this.isAlternateRendering = rendering.isAlternateRendering;
35879
+ this.alternateRenderingsExist = rendering.alternateRenderingsExist;
35880
+ this.mediaServiceSaveMode = rendering.mediaServiceSaveMode;
35881
+ this.catalogData = rendering.catalogData;
36441
35882
  }
36442
35883
  }, {
36443
- key: "setMediaServiceUrl",
36444
- value: function setMediaServiceUrl(mediaServiceUrl) {
36445
- this.mediaServiceUrl = mediaServiceUrl;
35884
+ key: "getAllDockingPoints",
35885
+ value: function getAllDockingPoints(setId, elementId) {
35886
+ if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
35887
+ return this.uiInfo['S1']['E' + elementId]['DP'];
35888
+ }
35889
+ return this.uiInfo[setId]['E' + elementId]['DP'];
36446
35890
  }
36447
35891
  }, {
36448
- key: "setMediaServiceApiKey",
36449
- value: function setMediaServiceApiKey(mediaServiceApiKey) {
36450
- this.mediaServiceApiKey = mediaServiceApiKey;
35892
+ key: "getHasStaticBackground",
35893
+ value: function getHasStaticBackground() {
35894
+ return this.hasStaticBackground;
36451
35895
  }
36452
35896
  }, {
36453
- key: "setJwt",
36454
- value: function setJwt(jwt) {
36455
- this.jwt = jwt;
35897
+ key: "getIsFullscreenRendering",
35898
+ value: function getIsFullscreenRendering() {
35899
+ return this.isFullscreenRendering;
36456
35900
  }
36457
35901
  }, {
36458
- key: "loadRenderingFromCache",
36459
- value: function () {
36460
- var _loadRenderingFromCache = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(hash) {
36461
- var logOnError,
36462
- url,
36463
- response,
36464
- error,
36465
- result,
36466
- _args = arguments;
36467
- return _regeneratorRuntime.wrap(function _callee$(_context) {
36468
- while (1) switch (_context.prev = _context.next) {
36469
- case 0:
36470
- logOnError = _args.length > 1 && _args[1] !== undefined ? _args[1] : true;
36471
- LOG$4.startTransaction({
36472
- event: 'onRequestRendering',
36473
- message: 'Requesting Rendering',
36474
- eventId: 'ON_REQUEST_RENDERING',
36475
- warningTime: 2000,
36476
- errorTime: 4000,
36477
- labels: {}
36478
- });
36479
- url = this.mediaServiceUrl + this.GET_MediaItemrefs + '%5B%7Bhash%2Ceq%2C' + hash + '%7D%2C%7BorganizationId%2Ceq%2C' + this.organizationId + '%7D%5D';
36480
- LOG$4.debug('Try load Rendering from Cache. hash: ' + hash);
36481
- _context.next = 6;
36482
- return fetch(url, {
36483
- method: 'GET',
36484
- mode: 'cors',
36485
- headers: _objectSpread$7({}, this.jwt ? {
36486
- authorization: "Bearer ".concat(this.jwt)
36487
- } : {
36488
- 'X-API-KEY': this.mediaServiceApiKey
36489
- })
36490
- });
36491
- case 6:
36492
- response = _context.sent;
36493
- error = false;
36494
- if (!response.ok) {
36495
- _context.next = 20;
36496
- break;
36497
- }
36498
- _context.next = 11;
36499
- return response.json();
36500
- case 11:
36501
- result = _context.sent;
36502
- if (!(result.data.length > 0)) {
36503
- _context.next = 17;
36504
- break;
36505
- }
36506
- LOG$4.successTransaction('ON_REQUEST_RENDERING', {});
36507
- return _context.abrupt("return", result.data[0].url);
36508
- case 17:
36509
- error = true;
36510
- case 18:
36511
- _context.next = 21;
36512
- break;
36513
- case 20:
36514
- error = true;
36515
- case 21:
36516
- if (error && logOnError) {
36517
- LOG$4.errorTransaction('ON_REQUEST_RENDERING', 'WC_0015', 'loadRenderingFromCache not found (functionType C3D). Load rendering from Cache not successfull. Hash: ' + hash + 'response: ' + response);
36518
- }
36519
- LOG$4.successTransaction('ON_REQUEST_RENDERING', {});
36520
- return _context.abrupt("return", '');
36521
- case 24:
36522
- case "end":
36523
- return _context.stop();
36524
- }
36525
- }, _callee, this);
36526
- }));
36527
- function loadRenderingFromCache(_x) {
36528
- return _loadRenderingFromCache.apply(this, arguments);
35902
+ key: "setIsFullscreenRendering",
35903
+ value: function setIsFullscreenRendering(isFullscreen) {
35904
+ this.isFullscreenRendering = isFullscreen;
35905
+ }
35906
+ }, {
35907
+ key: "getHasDimensionLines",
35908
+ value: function getHasDimensionLines() {
35909
+ return this.hasDimensionLines;
35910
+ }
35911
+ }, {
35912
+ key: "getPlannerMeasureDigits",
35913
+ value: function getPlannerMeasureDigits() {
35914
+ return this.plannerMeasureDigits;
35915
+ }
35916
+ }, {
35917
+ key: "getIsAlternateRendering",
35918
+ value: function getIsAlternateRendering() {
35919
+ return this.isAlternateRendering;
35920
+ }
35921
+ }, {
35922
+ key: "getAlternateRenderInfo",
35923
+ value: function getAlternateRenderInfo() {
35924
+ return this.alternateRendererInfo;
35925
+ }
35926
+ }, {
35927
+ key: "getAlternateRenderingsExist",
35928
+ value: function getAlternateRenderingsExist() {
35929
+ return this.alternateRenderingsExist;
35930
+ }
35931
+ }, {
35932
+ key: "hasUIInfosOfElement",
35933
+ value: function hasUIInfosOfElement(setId, elementid) {
35934
+ if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
35935
+ return this.uiInfo['S1']['E' + elementid] != undefined;
35936
+ } else {
35937
+ return this.uiInfo[setId] != undefined && this.uiInfo[setId]['E' + elementid] != undefined;
36529
35938
  }
36530
- return loadRenderingFromCache;
36531
- }()
35939
+ }
36532
35940
  }, {
36533
- key: "base64ToBlob",
36534
- value: function base64ToBlob(base64String, hash) {
36535
- DivaUtils.startSpanOfApm('MediaServiceHandler base64ToBlob');
36536
- if (base64String.startsWith('data:image/jpeg;base64,')) {
36537
- base64String = base64String.replace('data:image/jpeg;base64,', '');
35941
+ key: "getOutlinePolygonForSVG",
35942
+ value: function getOutlinePolygonForSVG(setId, elementId, viewPortSize) {
35943
+ var poly = [];
35944
+ var avgCamDist = 0;
35945
+ if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
35946
+ poly = this.uiInfo['S1']['E' + elementId]['POLYOUTLINE'];
35947
+ avgCamDist = this.uiInfo['S1']['E' + elementId]['AVGCAMDIST'];
35948
+ } else if (this.uiInfo[setId]) {
35949
+ poly = this.uiInfo[setId]['E' + elementId]['POLYOUTLINE'];
35950
+ avgCamDist = this.uiInfo[setId]['E' + elementId]['AVGCAMDIST'];
35951
+ } else {
35952
+ poly = this.uiInfo['E' + elementId]['POLYOUTLINE'];
35953
+ avgCamDist = this.uiInfo['E' + elementId]['AVGCAMDIST'];
36538
35954
  }
36539
- var binary_string = window.atob(base64String);
36540
- var len = binary_string.length;
36541
- var bytes = new Uint8Array(len);
36542
- for (var i = 0; i < len; i++) {
36543
- bytes[i] = binary_string.charCodeAt(i);
35955
+ if (!poly) return undefined;
35956
+ var points = '';
35957
+ for (var i = 0; i < poly.length; i++) {
35958
+ points += Math.round(poly[i].x * 0.01 * viewPortSize.imgWidth) + ',' + Math.round((100 - poly[i].y) * 0.01 * viewPortSize.imgHeight) + ' ';
36544
35959
  }
36545
- var blob = new File([bytes.buffer], hash + '.jpg', {
36546
- type: 'image/jpeg'
36547
- });
36548
- DivaUtils.endSpanOfApm('MediaServiceHandler base64ToBlob');
36549
- return blob;
35960
+ return {
35961
+ points: points,
35962
+ avgCamDist: avgCamDist
35963
+ };
36550
35964
  }
35965
+
35966
+ //Left/Right_Bottom/Top_Back/Front
36551
35967
  }, {
36552
- key: "savePlanning2DPermanent",
36553
- value: function () {
36554
- var _savePlanning2DPermanent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(hash, catalogCodex, catalogGUID, planning2DAsJPG) {
36555
- var imageBlob, url, data, mediaItem, mediaItemRef, response, res;
36556
- return _regeneratorRuntime.wrap(function _callee2$(_context2) {
36557
- while (1) switch (_context2.prev = _context2.next) {
36558
- case 0:
36559
- DivaUtils.startSpanOfApm('MediaServiceHandler savePlanning2DPermanent');
36560
- imageBlob = this.base64ToBlob(planning2DAsJPG, hash);
36561
- url = this.mediaServiceUrl + this.POST_mediaItem; //push media item return url
36562
- //create media item ref and set same paramters
36563
- data = new FormData();
36564
- data.append('file', imageBlob);
36565
- mediaItem = {
36566
- organizationId: this.organizationId,
36567
- mediaType: 'PCT',
36568
- fileName: hash + '.jpg'
36569
- };
36570
- data.append('mediaItem', JSON.stringify(mediaItem));
36571
- mediaItemRef = {
36572
- functionType: 'P2D',
36573
- planningHash: hash,
36574
- catalogCodex: catalogCodex,
36575
- catalogGuid: catalogGUID
36576
- };
36577
- data.append('mediaItemRef', JSON.stringify(mediaItemRef));
36578
- _context2.next = 11;
36579
- return fetch(url, {
36580
- method: 'POST',
36581
- body: data,
36582
- headers: {
36583
- 'X-API-KEY': this.mediaServiceApiKey
36584
- }
36585
- });
36586
- case 11:
36587
- response = _context2.sent;
36588
- if (!response.ok) {
36589
- _context2.next = 20;
36590
- break;
36591
- }
36592
- _context2.next = 15;
36593
- return response.json();
36594
- case 15:
36595
- res = _context2.sent;
36596
- LOG$4.debug('Successfully saved 2D Planning in media Service. URL: ' + res.url);
36597
- return _context2.abrupt("return", res.url);
36598
- case 20:
36599
- LOG$4.error(new DivaError('Error when saving the Planning2D image on mediaService. Hash: ' + hash + 'response: ' + response, {
36600
- code: 'WC_0016'
36601
- }));
36602
- case 21:
36603
- DivaUtils.endSpanOfApm('MediaServiceHandler savePlanning2DPermanent');
36604
- return _context2.abrupt("return", '');
36605
- case 23:
36606
- case "end":
36607
- return _context2.stop();
36608
- }
36609
- }, _callee2, this);
36610
- }));
36611
- function savePlanning2DPermanent(_x2, _x3, _x4, _x5) {
36612
- return _savePlanning2DPermanent.apply(this, arguments);
35968
+ key: "getRightTopBackUIPos",
35969
+ value: function getRightTopBackUIPos(setId, elemId) {
35970
+ var bbox = null;
35971
+ if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
35972
+ bbox = this.uiInfo['S1']['E' + elemId]['BBOX3D'];
35973
+ } else if (this.uiInfo[setId]) bbox = this.uiInfo[setId]['E' + elemId]['BBOX3D'];else bbox = this.uiInfo['E' + elemId]['BBOX3D'];
35974
+ if (!bbox) return;
35975
+ for (var i = 0; i < bbox.length; i++) {
35976
+ if (bbox[i].C == 'RTB') {
35977
+ return bbox[i];
35978
+ }
36613
35979
  }
36614
- return savePlanning2DPermanent;
36615
- }()
35980
+ }
35981
+ //Left/Right_Bottom/Top_Back/Front
35982
+ }, {
35983
+ key: "getLeftTopBackUIPos",
35984
+ value: function getLeftTopBackUIPos(setId, elemId) {
35985
+ var bbox = null;
35986
+ if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
35987
+ bbox = this.uiInfo['S1']['E' + elemId]['BBOX3D'];
35988
+ } else if (this.uiInfo[setId]) bbox = this.uiInfo[setId]['E' + elemId]['BBOX3D'];else bbox = this.uiInfo['E' + elemId]['BBOX3D'];
35989
+ if (!bbox) return;
35990
+ for (var i = 0; i < bbox.length; i++) {
35991
+ if (bbox[i].C == 'LTB') {
35992
+ return bbox[i];
35993
+ }
35994
+ }
35995
+ }
35996
+ //Left/Right_Bottom/Top_Back/Front
35997
+ //elementId has to be a string because when working with accs in shelf planner an element id is the combination of parentElementId.rasterHeight.gridId
35998
+ }, {
35999
+ key: "getLeftBottomFrontUIPos",
36000
+ value: function getLeftBottomFrontUIPos(setId, elemId) {
36001
+ var bbox = null;
36002
+ if (this.uiInfo == '') return null;
36003
+ if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
36004
+ if (!this.uiInfo['S1']['E' + elemId]) return;
36005
+ bbox = this.uiInfo['S1']['E' + elemId]['BBOX3D'];
36006
+ } else if (this.uiInfo[setId]) {
36007
+ if (!this.uiInfo[setId]['E' + elemId]) return;
36008
+ bbox = this.uiInfo[setId]['E' + elemId]['BBOX3D'];
36009
+ } else {
36010
+ var _this$uiInfo;
36011
+ bbox = (_this$uiInfo = this.uiInfo['E' + elemId]) === null || _this$uiInfo === void 0 ? void 0 : _this$uiInfo['BBOX3D'];
36012
+ }
36013
+ if (!bbox) return;
36014
+ for (var i = 0; i < bbox.length; i++) {
36015
+ if (bbox[i].C == 'LBF') {
36016
+ return bbox[i];
36017
+ }
36018
+ }
36019
+ }
36020
+ }, {
36021
+ key: "getBoxPlannerCornerUIPos",
36022
+ value: function getBoxPlannerCornerUIPos(setId, elemId, corner) {
36023
+ var boxPlan = [];
36024
+ if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
36025
+ boxPlan = this.uiInfo['S1']['E' + elemId]['BoxPlan'];
36026
+ } else if (this.uiInfo[setId]) boxPlan = this.uiInfo[setId]['E' + elemId]['BoxPlan'];else boxPlan = this.uiInfo['E' + elemId]['BoxPlan'];
36027
+ for (var i = 0; i < boxPlan.length; i++) {
36028
+ if (!boxPlan[i].N || !boxPlan[i].x || !boxPlan[i].y) continue;
36029
+ switch (corner) {
36030
+ case 'TOPCENTER':
36031
+ if (boxPlan[i].N == 'TC') {
36032
+ return new Vector2(Number(boxPlan[i].x), Number(boxPlan[i].y));
36033
+ }
36034
+ break;
36035
+ case 'LEFTCENTER':
36036
+ if (boxPlan[i].N == 'LC') {
36037
+ return new Vector2(Number(boxPlan[i].x), Number(boxPlan[i].y));
36038
+ }
36039
+ break;
36040
+ case 'RIGHTCENTER':
36041
+ if (boxPlan[i].N == 'RC') {
36042
+ return new Vector2(Number(boxPlan[i].x), Number(boxPlan[i].y));
36043
+ }
36044
+ break;
36045
+ case 'RIGHTTOPFRONT':
36046
+ if (boxPlan[i].N == 'RTF') {
36047
+ return new Vector2(Number(boxPlan[i].x), Number(boxPlan[i].y));
36048
+ }
36049
+ break;
36050
+ }
36051
+ }
36052
+ return undefined;
36053
+ }
36054
+ }, {
36055
+ key: "getUnityCamPos",
36056
+ value: function getUnityCamPos() {
36057
+ return new Vector3(parseFloat(this.uiInfo['CAM']['X']), parseFloat(this.uiInfo['CAM']['Y']), parseFloat(this.uiInfo['CAM']['Z']));
36058
+ }
36059
+ }, {
36060
+ key: "getUnityCamRot",
36061
+ value: function getUnityCamRot() {
36062
+ var quatVec = new Vector4(parseFloat(this.uiInfo['CAM']['QX']), parseFloat(this.uiInfo['CAM']['QY']), parseFloat(this.uiInfo['CAM']['QZ']), parseFloat(this.uiInfo['CAM']['QW']));
36063
+ return quatVec;
36064
+ }
36065
+ }, {
36066
+ key: "getUnityFOV",
36067
+ value: function getUnityFOV() {
36068
+ return parseFloat(this.uiInfo['CAM']['FOV']);
36069
+ }
36070
+
36071
+ //elementId has to be a string because when working with accs in shelf planner an element id is the combination of parentElementId.rasterHeight.gridId
36072
+ //It returns the distance of an element to the ground in cm
36073
+ }, {
36074
+ key: "getDistanceToGround",
36075
+ value: function getDistanceToGround(setId, elementId) {
36076
+ setId = this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined ? 'S1' : setId;
36077
+ if (this.uiInfo[setId] && this.uiInfo[setId]['E' + elementId] && this.uiInfo[setId]['E' + elementId]['DIM'] && this.uiInfo[setId]['E' + elementId]['DIM']['dfg']) {
36078
+ return this.uiInfo[setId]['E' + elementId]['DIM']['dfg'] * 100;
36079
+ }
36080
+ return -1;
36081
+ }
36082
+ }, {
36083
+ key: "addUIInfo",
36084
+ value: function addUIInfo(uiInfo) {
36085
+ try {
36086
+ this.uiInfo = JSON.parse(uiInfo);
36087
+ } catch (error) {
36088
+ LOG$5.error(new DivaError('Error when parsing UI Info in rendering. Corrupt UIInfo: ' + uiInfo, {
36089
+ code: 'WC_0013',
36090
+ cause: error
36091
+ }));
36092
+ }
36093
+ }
36094
+
36095
+ /**
36096
+ * This function adds a blobImage to the rendering .
36097
+ * It is parsed to a base64 image.
36098
+ * @param blob The blob contains the image
36099
+ * @param isLayerMask True if the Image is the layer mask image
36100
+ */
36101
+ }, {
36102
+ key: "addImgAsBlob",
36103
+ value: function addImgAsBlob(buffer, isLayerMask) {
36104
+ if (isLayerMask) this.layerMaskAsBase64 = buffer.toString('base64');else this.imgForSrc = 'data:image/jpeg;base64,' + buffer.toString('base64');
36105
+ }
36106
+ }, {
36107
+ key: "getImageForSrc",
36108
+ value: function getImageForSrc() {
36109
+ return this.imgForSrc;
36110
+ }
36111
+
36112
+ //*****************************************GETTER und SETTER********************************************** */
36113
+ }, {
36114
+ key: "CatalogCodex",
36115
+ get: function get() {
36116
+ return this.catalogData.catalogCodex;
36117
+ },
36118
+ set: function set(val) {
36119
+ this.catalogData.catalogCodex = val;
36120
+ }
36121
+ }, {
36122
+ key: "CatalogGUID",
36123
+ get: function get() {
36124
+ return this.catalogData.catalogGUID;
36125
+ },
36126
+ set: function set(val) {
36127
+ this.catalogData.catalogGUID = val;
36128
+ }
36129
+ }, {
36130
+ key: "PlanningHash",
36131
+ get: function get() {
36132
+ return this.planningHash;
36133
+ }
36134
+ }, {
36135
+ key: "RenderHash",
36136
+ get: function get() {
36137
+ return this.renderHash;
36138
+ }
36139
+ }, {
36140
+ key: "UrlToSavedRendering",
36141
+ get: function get() {
36142
+ return this.urlToSavedRendering;
36143
+ },
36144
+ set: function set(url) {
36145
+ this.urlToSavedRendering = url;
36146
+ }
36147
+ }, {
36148
+ key: "HasLayerMask",
36149
+ get: function get() {
36150
+ return this.hasLayerMask;
36151
+ },
36152
+ set: function set(hasLayerMask) {
36153
+ this.hasLayerMask = hasLayerMask;
36154
+ }
36155
+ }, {
36156
+ key: "RenderWidth",
36157
+ get: function get() {
36158
+ return this.renderWidth;
36159
+ }
36160
+ }, {
36161
+ key: "RenderHeight",
36162
+ get: function get() {
36163
+ return this.renderHeight;
36164
+ }
36165
+ }, {
36166
+ key: "getHasLayerMask",
36167
+ value: function getHasLayerMask() {
36168
+ return this.hasLayerMask;
36169
+ }
36170
+ }, {
36171
+ key: "getLayerMaskForSrc",
36172
+ value: function getLayerMaskForSrc() {
36173
+ return this.layerMaskAsBase64;
36174
+ }
36175
+ }, {
36176
+ key: "HasLayerMaskThreeTexture",
36177
+ get: function get() {
36178
+ return this.layerMaskThreeTexture != undefined;
36179
+ }
36180
+ }, {
36181
+ key: "LayerMaskThreeTexture",
36182
+ get: function get() {
36183
+ return this.layerMaskThreeTexture;
36184
+ },
36185
+ set: function set(tex) {
36186
+ this.layerMaskThreeTexture = tex;
36187
+ }
36188
+ }, {
36189
+ key: "AllImgLoaded",
36190
+ get: function get() {
36191
+ return this.imgForSrc != '' && (!this.hasLayerMask || this.layerMaskAsBase64 != '');
36192
+ }
36193
+ }, {
36194
+ key: "UiInfoLoaded",
36195
+ get: function get() {
36196
+ return this.uiInfo != '';
36197
+ }
36198
+ }, {
36199
+ key: "CreationTime",
36200
+ get: function get() {
36201
+ return this.creationTime.getTime();
36202
+ }
36203
+ }, {
36204
+ key: "MediaServiceSaveMode",
36205
+ get: function get() {
36206
+ return this.mediaServiceSaveMode;
36207
+ },
36208
+ set: function set(mode) {
36209
+ this.mediaServiceSaveMode = mode;
36210
+ }
36616
36211
  }]);
36617
36212
  }();
36618
- var mediaServiceHandler = new DivaMediaServiceHandler();
36619
36213
 
36620
36214
  var RenderSettings = /*#__PURE__*/function () {
36621
36215
  function RenderSettings() {
@@ -36636,9 +36230,6 @@ var RenderSettings = /*#__PURE__*/function () {
36636
36230
  _defineProperty(this, "applicationName", void 0);
36637
36231
  _defineProperty(this, "divaMediaServiceUrl", void 0);
36638
36232
  _defineProperty(this, "renderGroup", void 0);
36639
- _defineProperty(this, "useSirvViewer", void 0);
36640
- _defineProperty(this, "useMediaServiceImageCache", void 0);
36641
- _defineProperty(this, "suppressCacheCreation", void 0);
36642
36233
  this.organizationId = '';
36643
36234
  this.diva3DServerURL = '';
36644
36235
  this.userID = '';
@@ -36647,9 +36238,6 @@ var RenderSettings = /*#__PURE__*/function () {
36647
36238
  this.applicationName = '';
36648
36239
  this.divaMediaServiceUrl = '';
36649
36240
  this.renderGroup = '';
36650
- this.useSirvViewer = false;
36651
- this.useMediaServiceImageCache = false;
36652
- this.suppressCacheCreation = false;
36653
36241
  }
36654
36242
  return _createClass(RenderSettings, [{
36655
36243
  key: "OrganizationId",
@@ -36715,30 +36303,6 @@ var RenderSettings = /*#__PURE__*/function () {
36715
36303
  set: function set(group) {
36716
36304
  this.renderGroup = group;
36717
36305
  }
36718
- }, {
36719
- key: "UseSirvViewer",
36720
- get: function get() {
36721
- return this.useSirvViewer;
36722
- },
36723
- set: function set(viewer) {
36724
- this.useSirvViewer = viewer;
36725
- }
36726
- }, {
36727
- key: "UseMediaServiceImageCache",
36728
- get: function get() {
36729
- return this.useMediaServiceImageCache;
36730
- },
36731
- set: function set(cache) {
36732
- this.useMediaServiceImageCache = cache;
36733
- }
36734
- }, {
36735
- key: "SuppressCacheCreation",
36736
- get: function get() {
36737
- return this.suppressCacheCreation;
36738
- },
36739
- set: function set(cache) {
36740
- this.suppressCacheCreation = cache;
36741
- }
36742
36306
  }]);
36743
36307
  }();
36744
36308
  /*
@@ -36787,7 +36351,7 @@ function _objectSpread$6(e) { for (var r = 1; r < arguments.length; r++) { var t
36787
36351
  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; } } }; }
36788
36352
  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; } }
36789
36353
  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; }
36790
- var LOG$3 = DivaUtils.initLog('Planner', 'PLANNER-HANDLER-3D');
36354
+ var LOG$4 = DivaUtils.initLog('Planner', 'PLANNER-HANDLER-3D');
36791
36355
  var PlannerHandler3D = /*#__PURE__*/function () {
36792
36356
  //-------------------------------------------------Initialization---------------------------------------------------------------
36793
36357
 
@@ -36905,12 +36469,6 @@ var PlannerHandler3D = /*#__PURE__*/function () {
36905
36469
  };
36906
36470
  }
36907
36471
  return _createClass(PlannerHandler3D, [{
36908
- key: "doUseRealtimeRendering",
36909
- value: function doUseRealtimeRendering() {
36910
- if (this.renderSettings.SuppressCacheCreation && this.renderSettings.UseMediaServiceImageCache) return false;
36911
- return true;
36912
- }
36913
- }, {
36914
36472
  key: "setJwt",
36915
36473
  value: function setJwt(jwt) {
36916
36474
  this.jwt = jwt;
@@ -37030,9 +36588,6 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37030
36588
  }
37031
36589
  this.renderSettings.DivaMediaServiceUrl = params.divaMediaServiceUrl;
37032
36590
  this.renderSettings.OrganizationId = params.organizationId;
37033
- this.renderSettings.UseSirvViewer = params.useSirvViewer;
37034
- this.renderSettings.UseMediaServiceImageCache = params.useMediaServiceImageCache;
37035
- this.renderSettings.SuppressCacheCreation = params.suppressCacheCreation;
37036
36591
  this.liveArViewerUrl = params.arViewerUrl;
37037
36592
  return result;
37038
36593
  }
@@ -37045,21 +36600,16 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37045
36600
  return _regeneratorRuntime.wrap(function _callee3$(_context3) {
37046
36601
  while (1) switch (_context3.prev = _context3.next) {
37047
36602
  case 0:
37048
- if (!this.doUseRealtimeRendering()) {
37049
- _context3.next = 7;
37050
- break;
37051
- }
37052
- _context3.next = 3;
37053
- return import('./Host3DSignalR-08117df5.js');
37054
- case 3:
36603
+ _context3.next = 2;
36604
+ return import('./Host3DSignalR-5d78c3f5.js');
36605
+ case 2:
37055
36606
  _yield$import = _context3.sent;
37056
36607
  Host3DSignalR = _yield$import["default"];
37057
36608
  this.connectionHandler = new Host3DSignalR(this.renderSettings, this);
37058
- LOG$3.debug('initializeConnection to Host3DSignalR');
37059
- case 7:
37060
- _context3.next = 9;
36609
+ LOG$4.debug('initializeConnection to Host3DSignalR');
36610
+ _context3.next = 8;
37061
36611
  return (_this$connectionHandl2 = this.connectionHandler) === null || _this$connectionHandl2 === void 0 ? void 0 : _this$connectionHandl2.initializeConnection();
37062
- case 9:
36612
+ case 8:
37063
36613
  case "end":
37064
36614
  return _context3.stop();
37065
36615
  }
@@ -37122,7 +36672,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37122
36672
  value: function onConnectedToDivaNr(status) {
37123
36673
  //Check if request3D has to be called againe
37124
36674
  if (status != 'SUCCESSFULL' || !this.todoAfterLogin.request3D.doRequest3D) return;
37125
- LOG$3.debug('Return Login - joind successfully but during loggin, a render or hqRenderScript Request was made. Remake it now');
36675
+ LOG$4.debug('Return Login - joind successfully but during loggin, a render or hqRenderScript Request was made. Remake it now');
37126
36676
  this.todoAfterLogin.request3D.doRequest3D = false;
37127
36677
  this.request3D(this.todoAfterLogin.request3D.params);
37128
36678
  this.todoAfterLogin.request3D.params = undefined;
@@ -37176,36 +36726,36 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37176
36726
  * @param buffer
37177
36727
  */
37178
36728
  function handleReceiveRendering(params) {
37179
- LOG$3.debug('handleReceiveRendering ' + params.hash + '; SameMode: ' + params.saveMode);
36729
+ LOG$4.debug('handleReceiveRendering ' + params.hash + '; SameMode: ' + params.saveMode);
37180
36730
  var isLayerMask = params.hash.endsWith('_m') ? true : false;
37181
36731
  params.hash = isLayerMask ? params.hash.substring(0, params.hash.length - 2) : params.hash;
37182
36732
  var cachedRendering = this.getRenderingFromCache(params.hash);
37183
36733
  var waitedRendering = this.getWaitForRendering(params.hash);
37184
36734
  if (!cachedRendering && !waitedRendering) {
37185
- 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));
36735
+ 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));
37186
36736
  return;
37187
36737
  }
37188
36738
  if (waitedRendering) {
37189
- LOG$3.debug('handleReceiveRendering ' + params.hash + '; Found in waitForRenderings');
36739
+ LOG$4.debug('handleReceiveRendering ' + params.hash + '; Found in waitForRenderings');
37190
36740
  //If the last requested rendering was in another saving mode than the received rendering - do nothing and wait for the correct rendering
37191
36741
  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') {
37192
- LOG$3.debug('Rendering with wrong savemode arrived. Wait for correct rendering');
36742
+ LOG$4.debug('Rendering with wrong savemode arrived. Wait for correct rendering');
37193
36743
  return;
37194
36744
  }
37195
36745
  if (params.url && waitedRendering.MediaServiceSaveMode == 'PERMANENT') {
37196
36746
  waitedRendering.UrlToSavedRendering = params.url;
37197
- LOG$3.debug('handleReceiveRendering Set lastSavedRendering URL ' + params.url);
36747
+ LOG$4.debug('handleReceiveRendering Set lastSavedRendering URL ' + params.url);
37198
36748
  }
37199
- if (this.renderSettings.UseSirvViewer && params.url) waitedRendering.setHQRenderingUrl(params.url, true);else waitedRendering.addImgAsBlob(Buffer.from(params.buffer), isLayerMask);
36749
+ waitedRendering.addImgAsBlob(Buffer.from(params.buffer), isLayerMask);
37200
36750
 
37201
36751
  //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
37202
36752
 
37203
- if ((!this.doUseRealtimeRendering() || this.renderSettings.UseMediaServiceImageCache || waitedRendering.MediaServiceSaveMode == 'STREAM') && this.checkRenderingReady(params.hash, waitedRendering)) this.updatePlannerRendering(waitedRendering);
36753
+ if (waitedRendering.MediaServiceSaveMode == 'STREAM' && this.checkRenderingReady(params.hash, waitedRendering)) this.updatePlannerRendering(waitedRendering);
37204
36754
  return;
37205
36755
  }
37206
36756
  if (params.url) {
37207
36757
  //If several renderings of the same hash are requested contemoranely (first Stream then TEMP). Then save the tempURL in the rendering
37208
- LOG$3.debug('handleReceiveRendering load from cache');
36758
+ LOG$4.debug('handleReceiveRendering load from cache');
37209
36759
  cachedRendering.UrlToSavedRendering = params.url;
37210
36760
  }
37211
36761
  }
@@ -37236,10 +36786,10 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37236
36786
  }, {
37237
36787
  key: "checkRenderingReady",
37238
36788
  value: function checkRenderingReady(hash, rendering) {
37239
- if (!rendering.AllImgLoaded || !rendering.UiInfoLoaded && !rendering.IsLoadedFromCache) return false;
36789
+ if (!rendering.AllImgLoaded || !rendering.UiInfoLoaded) return false;
37240
36790
  this.waitForRenderings["delete"](hash);
37241
36791
  this.renderCache.set(hash, rendering);
37242
- LOG$3.debug('Send to view. CurrentHash: ' + hash + '; lastRequestedHash: ' + this.lastRequestedRenderHash);
36792
+ LOG$4.debug('Send to view. CurrentHash: ' + hash + '; lastRequestedHash: ' + this.lastRequestedRenderHash);
37243
36793
  return true;
37244
36794
  }
37245
36795
  /**
@@ -37254,7 +36804,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37254
36804
  this.waitForRenderings["delete"](hash);
37255
36805
  return false;
37256
36806
  }
37257
- LOG$3.debug('Wait for rendering - The same rendering was asked not 4 seconds ago. !', 'PlannerHandler3D checkWaitForImage');
36807
+ LOG$4.debug('Wait for rendering - The same rendering was asked not 4 seconds ago. !', 'PlannerHandler3D checkWaitForImage');
37258
36808
  return true;
37259
36809
  }
37260
36810
  }, {
@@ -37266,7 +36816,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37266
36816
  this.waitForHQRenderScript["delete"](hash);
37267
36817
  return false;
37268
36818
  }
37269
- LOG$3.debug('Wait for rendering - The same rendering was asked not 4 seconds ago. !', 'PlannerHandler3D checkWaitForImage');
36819
+ LOG$4.debug('Wait for rendering - The same rendering was asked not 4 seconds ago. !', 'PlannerHandler3D checkWaitForImage');
37270
36820
  return true;
37271
36821
  }
37272
36822
 
@@ -37288,10 +36838,6 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37288
36838
  result.renderHeight = curRoomListVP.backgroundImg_Height;
37289
36839
  result.renderHeight = result.renderHeight * 1.3;
37290
36840
  result.renderWidth = result.renderWidth * 1.3;
37291
- } else if (this.renderSettings.UseMediaServiceImageCache) {
37292
- //Force the size of the rendering to be a standard size
37293
- result.renderWidth = this.renderSettings.CACHE_16_9_RENDER_WIDTH;
37294
- result.renderHeight = this.renderSettings.CACHE_16_9_RENDER_HEIGHT;
37295
36841
  } else if (mediaServiceSaveMode == 'PERMANENT') {
37296
36842
  //SAVE with correct Resolution
37297
36843
  result.renderWidth = this.renderSettings.SAVE_16_9_RENDER_WIDTH;
@@ -37335,7 +36881,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37335
36881
  return _regeneratorRuntime.wrap(function _callee5$(_context5) {
37336
36882
  while (1) switch (_context5.prev = _context5.next) {
37337
36883
  case 0:
37338
- LOG$3.debug('getLastSavedRendering ' + ((_this$lastSavedRender = this.lastSavedRendering) === null || _this$lastSavedRender === void 0 ? void 0 : _this$lastSavedRender.UrlToSavedRendering));
36884
+ LOG$4.debug('getLastSavedRendering ' + ((_this$lastSavedRender = this.lastSavedRendering) === null || _this$lastSavedRender === void 0 ? void 0 : _this$lastSavedRender.UrlToSavedRendering));
37339
36885
  if (!(this.lastSavedRendering == undefined)) {
37340
36886
  _context5.next = 3;
37341
36887
  break;
@@ -37350,7 +36896,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37350
36896
  _context5.next = 12;
37351
36897
  break;
37352
36898
  }
37353
- LOG$3.debug('getLAstSavedRendering - wait here');
36899
+ LOG$4.debug('getLAstSavedRendering - wait here');
37354
36900
  _context5.next = 8;
37355
36901
  return this.delay(100);
37356
36902
  case 8:
@@ -37504,20 +37050,20 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37504
37050
  value: (function () {
37505
37051
  var _request3D = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(params) {
37506
37052
  var _params$renderRequest, _params$renderRequest2, _params$renderRequest3, _params$renderRequest4, _params$renderRequest5, _params$renderRequest6, _this$viewPointHandle;
37507
- 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;
37053
+ 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;
37508
37054
  return _regeneratorRuntime.wrap(function _callee7$(_context7) {
37509
37055
  while (1) switch (_context7.prev = _context7.next) {
37510
37056
  case 0:
37511
- if (!(this.doUseRealtimeRendering() && this.connectionHandler && (!this.connectionHandler.getConnectionReady() || !this.connectionHandler.getSuccessfullyJoinedToDivaNr()))) {
37057
+ if (!(this.connectionHandler && (!this.connectionHandler.getConnectionReady() || !this.connectionHandler.getSuccessfullyJoinedToDivaNr()))) {
37512
37058
  _context7.next = 5;
37513
37059
  break;
37514
37060
  }
37515
- LOG$3.debug('RequestRendering - but connection Not Ready');
37061
+ LOG$4.debug('RequestRendering - but connection Not Ready');
37516
37062
  this.todoAfterLogin.request3D.params = params;
37517
37063
  this.todoAfterLogin.request3D.doRequest3D = true;
37518
37064
  return _context7.abrupt("return");
37519
37065
  case 5:
37520
- 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');
37066
+ 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');
37521
37067
  room = this.viewPointHandler.getCurRoomCodex();
37522
37068
  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);
37523
37069
  doReloadWholePlanning = true;
@@ -37536,103 +37082,63 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37536
37082
  this.lastFramePlanningHash = planningHash;
37537
37083
  requestRenderingFrom3DHost = false;
37538
37084
  requestHqRenderScriptFrom3DHost = false;
37539
- if (!params.doRequestHqRenderScript) {
37540
- _context7.next = 23;
37541
- break;
37542
- }
37543
- if (this.doUseRealtimeRendering()) {
37544
- _context7.next = 21;
37545
- break;
37546
- }
37547
- LOG$3.error(new DivaError('Requesting hqRenderScript is only supported when using real time rendering'));
37548
- return _context7.abrupt("return");
37549
- case 21:
37550
- rendering = this.hqRenderScriptCache.get(planningHash);
37551
- if (rendering) {
37552
- LOG$3.debug('Get HQRenderScript from cache');
37553
- this.lastSavedHQRenderScript = JSON.parse(rendering.HQRenderScript);
37554
- this.updatePlannerHqRenderScriptInView(rendering);
37555
- this.sendARRenderScript(rendering);
37556
- params.doRequestHqRenderScript = false;
37557
- } else {
37558
- if (!this.checkWaitForHQRenderScript(planningHash)) {
37559
- requestHqRenderScriptFrom3DHost = true;
37560
- this.waitForHQRenderScript.set(planningHash, new HQRenderScript('PLACEHOLDER'));
37561
- //If a new HQRenderscript has to be loaded - always reload planning
37562
- doReloadWholePlanning = true;
37085
+ if (params.doRequestHqRenderScript) {
37086
+ rendering = this.hqRenderScriptCache.get(planningHash);
37087
+ if (rendering) {
37088
+ LOG$4.debug('Get HQRenderScript from cache');
37089
+ this.lastSavedHQRenderScript = JSON.parse(rendering.HQRenderScript);
37090
+ this.updatePlannerHqRenderScriptInView(rendering);
37091
+ this.sendARRenderScript(rendering);
37092
+ params.doRequestHqRenderScript = false;
37093
+ } else {
37094
+ if (!this.checkWaitForHQRenderScript(planningHash)) {
37095
+ requestHqRenderScriptFrom3DHost = true;
37096
+ this.waitForHQRenderScript.set(planningHash, new HQRenderScript('PLACEHOLDER'));
37097
+ //If a new HQRenderscript has to be loaded - always reload planning
37098
+ doReloadWholePlanning = true;
37099
+ }
37563
37100
  }
37564
37101
  }
37565
- case 23:
37566
37102
  renderHash = '';
37567
37103
  viewPointName = '';
37568
37104
  functionType = 'P3D';
37569
- if (!params.doRequestRendering) {
37570
- _context7.next = 54;
37571
- break;
37572
- }
37573
- viewPointName = this.viewPointHandler.getCurViewPointToRender();
37574
- sizeInfo = params.renderRequestInfos.width + ':' + params.renderRequestInfos.height;
37575
- renderHash = md5(JSON.stringify(params.planningData) + '#' + room + '#' + viewPointName + '#' + sizeInfo + '#' + JSON.stringify((_params$camera = params.camera) !== null && _params$camera !== void 0 ? _params$camera : this.latestCamera));
37576
- this.lastRequestedRenderHash = renderHash;
37577
- LOG$3.debug('Request New Rendering with hash ' + renderHash + '; and planningHash: ' + planningHash, 'PlannerHandler3D');
37578
- if (this.doUseRealtimeRendering()) {
37579
- _context7.next = 40;
37580
- break;
37581
- }
37582
- 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
37583
- _context7.next = 36;
37584
- 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);
37585
- case 36:
37586
- renderingFoundInCache = _context7.sent;
37587
- if (!renderingFoundInCache) LOG$3.debug('Cached rendering not found ' + renderHash);
37588
- _context7.next = 54;
37589
- break;
37590
- case 40:
37591
- if (!this.checkIsRenderingCached(renderHash, params.renderRequestInfos.planner3DGridEnabled, params.renderRequestInfos.mediaServiceSaveMode)) {
37592
- _context7.next = 47;
37593
- break;
37594
- }
37595
- //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.
37596
- //When the client then rotates - nothing changes in the hash - but the exe loads 2 elements.
37597
- LOG$3.debug('Load Rendering from Cache with hash ' + renderHash, 'PlannerHandler3D');
37598
- this.lastFramePlanningHash = '';
37599
- _rendering = this.getRenderingFromCache(renderHash); //check if current rendering is fullscreenrendering
37600
- if ((!params.renderRequestInfos.planner3DGridEnabled || _rendering !== null && _rendering !== void 0 && _rendering.getHasLayerMask()) && !this.onlyRunLogic) {
37601
- if (params.renderRequestInfos.isFullscreenRendering != (_rendering === null || _rendering === void 0 ? void 0 : _rendering.getIsFullscreenRendering())) {
37602
- fullscreenRendering = new Rendering('', '', '', -1, -1, false, false, 0, false, false, 'PERMANENT', undefined);
37603
- fullscreenRendering.clone(_rendering);
37604
- fullscreenRendering.setIsFullscreenRendering(params.renderRequestInfos.isFullscreenRendering);
37605
- this.updatePlannerRendering(fullscreenRendering); //load the rendering as fullscreen image
37606
- params.doRequestRendering = false;
37105
+ if (params.doRequestRendering) {
37106
+ viewPointName = this.viewPointHandler.getCurViewPointToRender();
37107
+ sizeInfo = params.renderRequestInfos.width + ':' + params.renderRequestInfos.height;
37108
+ renderHash = md5(JSON.stringify(params.planningData) + '#' + room + '#' + viewPointName + '#' + sizeInfo + '#' + JSON.stringify((_params$camera = params.camera) !== null && _params$camera !== void 0 ? _params$camera : this.latestCamera));
37109
+ this.lastRequestedRenderHash = renderHash;
37110
+ LOG$4.debug('Request New Rendering with hash ' + renderHash + '; and planningHash: ' + planningHash, 'PlannerHandler3D');
37111
+ if (this.checkIsRenderingCached(renderHash, params.renderRequestInfos.planner3DGridEnabled, params.renderRequestInfos.mediaServiceSaveMode)) {
37112
+ //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.
37113
+ //When the client then rotates - nothing changes in the hash - but the exe loads 2 elements.
37114
+ LOG$4.debug('Load Rendering from Cache with hash ' + renderHash, 'PlannerHandler3D');
37115
+ this.lastFramePlanningHash = '';
37116
+ _rendering = this.getRenderingFromCache(renderHash); //check if current rendering is fullscreenrendering
37117
+ if ((!params.renderRequestInfos.planner3DGridEnabled || _rendering !== null && _rendering !== void 0 && _rendering.getHasLayerMask()) && !this.onlyRunLogic) {
37118
+ if (params.renderRequestInfos.isFullscreenRendering != (_rendering === null || _rendering === void 0 ? void 0 : _rendering.getIsFullscreenRendering())) {
37119
+ fullscreenRendering = new Rendering('', '', '', -1, -1, false, false, 0, false, false, 'PERMANENT', undefined);
37120
+ fullscreenRendering.clone(_rendering);
37121
+ fullscreenRendering.setIsFullscreenRendering(params.renderRequestInfos.isFullscreenRendering);
37122
+ this.updatePlannerRendering(fullscreenRendering); //load the rendering as fullscreen image
37123
+ params.doRequestRendering = false;
37124
+ } else {
37125
+ this.updatePlannerRendering(_rendering); //lade einfach
37126
+ params.doRequestRendering = false;
37127
+ LOG$4.debug('Do load rendering from cache with renderHash: ' + renderHash);
37128
+ }
37129
+ }
37607
37130
  } else {
37608
- this.updatePlannerRendering(_rendering); //lade einfach
37609
- params.doRequestRendering = false;
37610
- LOG$3.debug('Do load rendering from cache with renderHash: ' + renderHash);
37611
- }
37612
- }
37613
- _context7.next = 54;
37614
- break;
37615
- case 47:
37616
- renderingInCacheFound = false;
37617
- if (!(this.renderSettings.UseMediaServiceImageCache && this.viewPointHandler.getCurVPIsStart())) {
37618
- _context7.next = 53;
37619
- break;
37620
- }
37621
- _productHash = this.getProductHash(params.planningData);
37622
- _context7.next = 52;
37623
- 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);
37624
- case 52:
37625
- renderingInCacheFound = _context7.sent;
37626
- case 53:
37627
- if (!this.renderSettings.UseMediaServiceImageCache || !renderingInCacheFound) {
37628
- if (!this.checkWaitForImage(renderHash)) {
37629
- requestRenderingFrom3DHost = true;
37630
- this.waitForRenderings.set(renderHash, new Rendering('PLACEHOLDER', 'PLACEHOLDER', '', 0, 0, false, false, 0, false, false, 'STREAM'));
37131
+ renderingInCacheFound = false;
37132
+ if (!renderingInCacheFound) {
37133
+ if (!this.checkWaitForImage(renderHash)) {
37134
+ requestRenderingFrom3DHost = true;
37135
+ this.waitForRenderings.set(renderHash, new Rendering('PLACEHOLDER', 'PLACEHOLDER', '', 0, 0, false, false, 0, false, false, 'STREAM'));
37136
+ }
37137
+ }
37631
37138
  }
37632
37139
  }
37633
- case 54:
37634
37140
  if (!(requestHqRenderScriptFrom3DHost || requestRenderingFrom3DHost)) {
37635
- _context7.next = 63;
37141
+ _context7.next = 31;
37636
37142
  break;
37637
37143
  }
37638
37144
  if (params.catalogData.lang) params.planningData.SCE.Lang = params.catalogData.lang;
@@ -37650,7 +37156,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37650
37156
  height: params.renderRequestInfos.height,
37651
37157
  isFullscreenRendering: params.renderRequestInfos.isFullscreenRendering,
37652
37158
  hasDimensionLines: params.renderRequestInfos.doShow3DDimensionLines,
37653
- plannerMeasureDigits: (_plannerMeasureDigits3 = params.renderRequestInfos.plannerMeasureDigits) !== null && _plannerMeasureDigits3 !== void 0 ? _plannerMeasureDigits3 : 0,
37159
+ plannerMeasureDigits: (_plannerMeasureDigits = params.renderRequestInfos.plannerMeasureDigits) !== null && _plannerMeasureDigits !== void 0 ? _plannerMeasureDigits : 0,
37654
37160
  planner3DGridEnabled: params.renderRequestInfos.planner3DGridEnabled,
37655
37161
  mediaServiceSaveMode: params.renderRequestInfos.mediaServiceSaveMode,
37656
37162
  functionType: functionType,
@@ -37665,14 +37171,14 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37665
37171
  });
37666
37172
  if (params.camera) this.latestCamera = params.camera;
37667
37173
  if (!(returnRequest === undefined || requestHqRenderScriptFrom3DHost && returnRequest.hqRenderScript == undefined || requestRenderingFrom3DHost && returnRequest.rendering == undefined)) {
37668
- _context7.next = 61;
37174
+ _context7.next = 29;
37669
37175
  break;
37670
37176
  }
37671
- LOG$3.error(new DivaError('Error requesting the 3D from host. RequestHqRenderScript: ' + requestHqRenderScriptFrom3DHost + '; RequestRendering: ' + requestRenderingFrom3DHost, {
37177
+ LOG$4.error(new DivaError('Error requesting the 3D from host. RequestHqRenderScript: ' + requestHqRenderScriptFrom3DHost + '; RequestRendering: ' + requestRenderingFrom3DHost, {
37672
37178
  code: 'WC_0013'
37673
37179
  }));
37674
37180
  return _context7.abrupt("return");
37675
- case 61:
37181
+ case 29:
37676
37182
  if (requestHqRenderScriptFrom3DHost) {
37677
37183
  if (this.waitForHQRenderScript.has(planningHash)) this.waitForHQRenderScript["delete"](planningHash);
37678
37184
  this.waitForHQRenderScript.set(planningHash, returnRequest.hqRenderScript);
@@ -37684,7 +37190,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37684
37190
  if (returnRequest.rendering.getIsAlternateRendering()) this.addAlternateRenderingToSavedAlternateRenderings(returnRequest.rendering);else this.lastSavedRendering = returnRequest.rendering;
37685
37191
  }
37686
37192
  }
37687
- case 63:
37193
+ case 31:
37688
37194
  case "end":
37689
37195
  return _context7.stop();
37690
37196
  }
@@ -37737,70 +37243,6 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37737
37243
  });
37738
37244
  if (index === -1) this.lastSavedAlternateRenderings.push(rendering);else this.lastSavedAlternateRenderings[index] = rendering;
37739
37245
  }
37740
-
37741
- /**
37742
- * This function handles to load a rendering from the cache
37743
- * @param hash
37744
- * @param viewPointName
37745
- * @param width
37746
- * @param height
37747
- * @param isFullscreenRendering
37748
- *
37749
- * @returns true, if the rendering was found in the cache
37750
- */
37751
- }, {
37752
- key: "requestRenderingCache",
37753
- value: (function () {
37754
- var _requestRenderingCache = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8(planningHash, renderHash, productHash, viewPointName, width, height, isFullscreenRendering, hasDimensionLines, plannerMeasureDigits, catalogData, alternateRenderingsExist, alternateRendererInfo) {
37755
- var renderingInCacheFound, rendering, promises, _yield$Promise$all, _yield$Promise$all2, urlRenderingCache, urlARCache, doUpdateRendering;
37756
- return _regeneratorRuntime.wrap(function _callee8$(_context8) {
37757
- while (1) switch (_context8.prev = _context8.next) {
37758
- case 0:
37759
- renderingInCacheFound = false;
37760
- if (this.waitForRenderings.has(renderHash)) {
37761
- _context8.next = 12;
37762
- break;
37763
- }
37764
- rendering = new Rendering(planningHash, renderHash, viewPointName, width, height, isFullscreenRendering, hasDimensionLines, plannerMeasureDigits, false, false, 'PERMANENT', alternateRenderingsExist, alternateRendererInfo);
37765
- this.waitForRenderings.set(renderHash, rendering);
37766
- //Try load image from cache
37767
- promises = [mediaServiceHandler.loadRenderingFromCache(renderHash), mediaServiceHandler.loadRenderingFromCache(productHash, false)];
37768
- _context8.next = 7;
37769
- return Promise.all(promises);
37770
- case 7:
37771
- _yield$Promise$all = _context8.sent;
37772
- _yield$Promise$all2 = _slicedToArray(_yield$Promise$all, 2);
37773
- urlRenderingCache = _yield$Promise$all2[0];
37774
- urlARCache = _yield$Promise$all2[1];
37775
- if (urlRenderingCache || urlARCache) {
37776
- renderingInCacheFound = true;
37777
- if (urlRenderingCache) {
37778
- rendering.setHQRenderingUrl(urlRenderingCache, this.renderSettings.UseSirvViewer);
37779
- rendering.UrlToSavedRendering = rendering.getHQRenderingURL();
37780
- }
37781
- if (urlARCache) rendering.setArUrl(urlARCache);
37782
- rendering.IsLoadedFromCache = true;
37783
- rendering.CatalogCodex = catalogData.catalogCodex;
37784
- rendering.CatalogGUID = catalogData.catalogGUID;
37785
- LOG$3.debug('The rendering is loaded from the MediaServiceCache: ' + urlRenderingCache);
37786
- doUpdateRendering = this.checkRenderingReady(renderHash, rendering);
37787
- if (doUpdateRendering) this.updatePlannerRendering(rendering);
37788
- } else {
37789
- this.waitForRenderings["delete"](renderHash);
37790
- }
37791
- case 12:
37792
- return _context8.abrupt("return", renderingInCacheFound);
37793
- case 13:
37794
- case "end":
37795
- return _context8.stop();
37796
- }
37797
- }, _callee8, this);
37798
- }));
37799
- function requestRenderingCache(_x6, _x7, _x8, _x9, _x10, _x11, _x12, _x13, _x14, _x15, _x16, _x17) {
37800
- return _requestRenderingCache.apply(this, arguments);
37801
- }
37802
- return requestRenderingCache;
37803
- }())
37804
37246
  }, {
37805
37247
  key: "handleStaticVP",
37806
37248
  value: function handleStaticVP(vpCodex) {
@@ -37904,20 +37346,6 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37904
37346
  value: function getStaticRoomListItems() {
37905
37347
  return this.viewPointHandler.getStaticRoomList();
37906
37348
  }
37907
-
37908
- /**
37909
- * Clears the whole renderCache and sets the current rendering and the lastSavedRendering to undefined
37910
- */
37911
- }, {
37912
- key: "clearRenderCache",
37913
- value: function clearRenderCache() {
37914
- LOG$3.debug('PlannerHandler3D clearRenderCache');
37915
- this.renderCache.clear();
37916
- this.currRendering = undefined;
37917
- this.lastSavedRendering = undefined;
37918
- this.lastSavedAlternateRenderings = undefined;
37919
- this.hqRenderScriptCache.clear();
37920
- }
37921
37349
  }, {
37922
37350
  key: "clearCurrentRendering",
37923
37351
  value: function clearCurrentRendering() {
@@ -37946,11 +37374,6 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37946
37374
  value: function checkIsWaitingForHQRenderScript() {
37947
37375
  return this.waitForHQRenderScript.size > 0;
37948
37376
  }
37949
- }, {
37950
- key: "getUseMediaServiceImageCache",
37951
- value: function getUseMediaServiceImageCache() {
37952
- return this.renderSettings.UseMediaServiceImageCache;
37953
- }
37954
37377
  }, {
37955
37378
  key: "setOrigConfigurationCallback",
37956
37379
  value: function setOrigConfigurationCallback(callback) {
@@ -37964,19 +37387,19 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37964
37387
  }, {
37965
37388
  key: "openARObserverConnection",
37966
37389
  value: function () {
37967
- var _openARObserverConnection = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee10(handleNoHqrs) {
37390
+ var _openARObserverConnection = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9(handleNoHqrs) {
37968
37391
  var _this2 = this;
37969
- return _regeneratorRuntime.wrap(function _callee10$(_context10) {
37970
- while (1) switch (_context10.prev = _context10.next) {
37392
+ return _regeneratorRuntime.wrap(function _callee9$(_context9) {
37393
+ while (1) switch (_context9.prev = _context9.next) {
37971
37394
  case 0:
37972
- return _context10.abrupt("return", new Promise( /*#__PURE__*/function () {
37973
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9(resolve, reject) {
37395
+ return _context9.abrupt("return", new Promise( /*#__PURE__*/function () {
37396
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8(resolve, reject) {
37974
37397
  var socketUrl;
37975
- return _regeneratorRuntime.wrap(function _callee9$(_context9) {
37976
- while (1) switch (_context9.prev = _context9.next) {
37398
+ return _regeneratorRuntime.wrap(function _callee8$(_context8) {
37399
+ while (1) switch (_context8.prev = _context8.next) {
37977
37400
  case 0:
37978
37401
  if (_this2.liveArViewerUrl) {
37979
- _context9.next = 2;
37402
+ _context8.next = 2;
37980
37403
  break;
37981
37404
  }
37982
37405
  throw new Error('No Live AR Viewer URL set');
@@ -37992,26 +37415,26 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37992
37415
  }
37993
37416
  });
37994
37417
  _this2.liveArSocket.on('disconnect', function () {
37995
- LOG$3.error(new DivaError('AR Socket disconnected'));
37418
+ LOG$4.error(new DivaError('AR Socket disconnected'));
37996
37419
  });
37997
37420
  _this2.liveArSocket.on('observer-joined', function () {
37998
37421
  var _this2$liveArSocket;
37999
- LOG$3.debug('AR Observer joined');
37422
+ LOG$4.debug('AR Observer joined');
38000
37423
  _this2.liveArClientsConnected = true;
38001
37424
  var hqRenderScript = _this2.lastSavedHQRenderScript;
38002
37425
  if (hqRenderScript) (_this2$liveArSocket = _this2.liveArSocket) === null || _this2$liveArSocket === void 0 || _this2$liveArSocket.emit('update', {
38003
37426
  hqRenderScript: JSON.stringify(hqRenderScript)
38004
37427
  });else {
38005
- LOG$3.debug('No HQRenderScript found for observer-joined');
37428
+ LOG$4.debug('No HQRenderScript found for observer-joined');
38006
37429
  handleNoHqrs();
38007
37430
  }
38008
37431
  });
38009
37432
  _this2.liveArSocket.on('observer-left', function () {
38010
- LOG$3.debug('AR Observer left');
37433
+ LOG$4.debug('AR Observer left');
38011
37434
  _this2.liveArClientsConnected = false;
38012
37435
  });
38013
37436
  _this2.liveArSocket.on('connected', function (data) {
38014
- LOG$3.debug('AR Socket connected ' + data.connectionId);
37437
+ LOG$4.debug('AR Socket connected ' + data.connectionId);
38015
37438
  _this2.liveArSocket.auth = _objectSpread$6(_objectSpread$6({}, _this2.liveArSocket.auth), {}, {
38016
37439
  connectionId: data.connectionId
38017
37440
  });
@@ -38025,21 +37448,21 @@ var PlannerHandler3D = /*#__PURE__*/function () {
38025
37448
  }
38026
37449
  case 3:
38027
37450
  case "end":
38028
- return _context9.stop();
37451
+ return _context8.stop();
38029
37452
  }
38030
- }, _callee9);
37453
+ }, _callee8);
38031
37454
  }));
38032
- return function (_x19, _x20) {
37455
+ return function (_x7, _x8) {
38033
37456
  return _ref.apply(this, arguments);
38034
37457
  };
38035
37458
  }()));
38036
37459
  case 1:
38037
37460
  case "end":
38038
- return _context10.stop();
37461
+ return _context9.stop();
38039
37462
  }
38040
- }, _callee10);
37463
+ }, _callee9);
38041
37464
  }));
38042
- function openARObserverConnection(_x18) {
37465
+ function openARObserverConnection(_x6) {
38043
37466
  return _openARObserverConnection.apply(this, arguments);
38044
37467
  }
38045
37468
  return openARObserverConnection;
@@ -38049,10 +37472,10 @@ var PlannerHandler3D = /*#__PURE__*/function () {
38049
37472
  value: function sendARRenderScript(hqRenderScript) {
38050
37473
  var _this$liveArSocket;
38051
37474
  if (!this.liveArClientsConnected) {
38052
- LOG$3.debug('No AR Clients connected, dont send render script');
37475
+ LOG$4.debug('No AR Clients connected, dont send render script');
38053
37476
  return;
38054
37477
  }
38055
- LOG$3.debug('Sending AR Render Script to clients');
37478
+ LOG$4.debug('Sending AR Render Script to clients');
38056
37479
  (_this$liveArSocket = this.liveArSocket) === null || _this$liveArSocket === void 0 || _this$liveArSocket.emit('update', {
38057
37480
  hqRenderScript: hqRenderScript.HQRenderScript
38058
37481
  });
@@ -38060,6 +37483,131 @@ var PlannerHandler3D = /*#__PURE__*/function () {
38060
37483
  }]);
38061
37484
  }();
38062
37485
 
37486
+ var LOG$3 = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
37487
+ var DivaMediaServiceHandler = /*#__PURE__*/function () {
37488
+ //-------------------------------------------------- INITIALIZATION--------------------------------------------------------------//
37489
+
37490
+ function DivaMediaServiceHandler() {
37491
+ _classCallCheck(this, DivaMediaServiceHandler);
37492
+ _defineProperty(this, "organizationId", void 0);
37493
+ _defineProperty(this, "mediaServiceUrl", void 0);
37494
+ _defineProperty(this, "mediaServiceApiKey", void 0);
37495
+ _defineProperty(this, "jwt", void 0);
37496
+ _defineProperty(this, "POST_saveTmp2PermanentPostfix", '/saveTmp2Permanent');
37497
+ _defineProperty(this, "GET_MediaItemrefs", '/v1/mediaitems/refs?limit=20&skip=0&filter=');
37498
+ _defineProperty(this, "POST_mediaItem", '/v1/mediaitems?ref=true');
37499
+ this.organizationId = '';
37500
+ this.mediaServiceUrl = '';
37501
+ this.mediaServiceApiKey = '';
37502
+ }
37503
+ return _createClass(DivaMediaServiceHandler, [{
37504
+ key: "setOrganizationId",
37505
+ value: function setOrganizationId(organizationId) {
37506
+ this.organizationId = organizationId;
37507
+ }
37508
+ }, {
37509
+ key: "setMediaServiceUrl",
37510
+ value: function setMediaServiceUrl(mediaServiceUrl) {
37511
+ this.mediaServiceUrl = mediaServiceUrl;
37512
+ }
37513
+ }, {
37514
+ key: "setMediaServiceApiKey",
37515
+ value: function setMediaServiceApiKey(mediaServiceApiKey) {
37516
+ this.mediaServiceApiKey = mediaServiceApiKey;
37517
+ }
37518
+ }, {
37519
+ key: "setJwt",
37520
+ value: function setJwt(jwt) {
37521
+ this.jwt = jwt;
37522
+ }
37523
+ }, {
37524
+ key: "base64ToBlob",
37525
+ value: function base64ToBlob(base64String, hash) {
37526
+ DivaUtils.startSpanOfApm('MediaServiceHandler base64ToBlob');
37527
+ if (base64String.startsWith('data:image/jpeg;base64,')) {
37528
+ base64String = base64String.replace('data:image/jpeg;base64,', '');
37529
+ }
37530
+ var binary_string = window.atob(base64String);
37531
+ var len = binary_string.length;
37532
+ var bytes = new Uint8Array(len);
37533
+ for (var i = 0; i < len; i++) {
37534
+ bytes[i] = binary_string.charCodeAt(i);
37535
+ }
37536
+ var blob = new File([bytes.buffer], hash + '.jpg', {
37537
+ type: 'image/jpeg'
37538
+ });
37539
+ DivaUtils.endSpanOfApm('MediaServiceHandler base64ToBlob');
37540
+ return blob;
37541
+ }
37542
+ }, {
37543
+ key: "savePlanning2DPermanent",
37544
+ value: function () {
37545
+ var _savePlanning2DPermanent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(hash, catalogCodex, catalogGUID, planning2DAsJPG) {
37546
+ var imageBlob, url, data, mediaItem, mediaItemRef, response, res;
37547
+ return _regeneratorRuntime.wrap(function _callee$(_context) {
37548
+ while (1) switch (_context.prev = _context.next) {
37549
+ case 0:
37550
+ DivaUtils.startSpanOfApm('MediaServiceHandler savePlanning2DPermanent');
37551
+ imageBlob = this.base64ToBlob(planning2DAsJPG, hash);
37552
+ url = this.mediaServiceUrl + this.POST_mediaItem; //push media item return url
37553
+ //create media item ref and set same paramters
37554
+ data = new FormData();
37555
+ data.append('file', imageBlob);
37556
+ mediaItem = {
37557
+ organizationId: this.organizationId,
37558
+ mediaType: 'PCT',
37559
+ fileName: hash + '.jpg'
37560
+ };
37561
+ data.append('mediaItem', JSON.stringify(mediaItem));
37562
+ mediaItemRef = {
37563
+ functionType: 'P2D',
37564
+ planningHash: hash,
37565
+ catalogCodex: catalogCodex,
37566
+ catalogGuid: catalogGUID
37567
+ };
37568
+ data.append('mediaItemRef', JSON.stringify(mediaItemRef));
37569
+ _context.next = 11;
37570
+ return fetch(url, {
37571
+ method: 'POST',
37572
+ body: data,
37573
+ headers: {
37574
+ 'X-API-KEY': this.mediaServiceApiKey
37575
+ }
37576
+ });
37577
+ case 11:
37578
+ response = _context.sent;
37579
+ if (!response.ok) {
37580
+ _context.next = 20;
37581
+ break;
37582
+ }
37583
+ _context.next = 15;
37584
+ return response.json();
37585
+ case 15:
37586
+ res = _context.sent;
37587
+ LOG$3.debug('Successfully saved 2D Planning in media Service. URL: ' + res.url);
37588
+ return _context.abrupt("return", res.url);
37589
+ case 20:
37590
+ LOG$3.error(new DivaError('Error when saving the Planning2D image on mediaService. Hash: ' + hash + 'response: ' + response, {
37591
+ code: 'WC_0016'
37592
+ }));
37593
+ case 21:
37594
+ DivaUtils.endSpanOfApm('MediaServiceHandler savePlanning2DPermanent');
37595
+ return _context.abrupt("return", '');
37596
+ case 23:
37597
+ case "end":
37598
+ return _context.stop();
37599
+ }
37600
+ }, _callee, this);
37601
+ }));
37602
+ function savePlanning2DPermanent(_x, _x2, _x3, _x4) {
37603
+ return _savePlanning2DPermanent.apply(this, arguments);
37604
+ }
37605
+ return savePlanning2DPermanent;
37606
+ }()
37607
+ }]);
37608
+ }();
37609
+ var mediaServiceHandler = new DivaMediaServiceHandler();
37610
+
38063
37611
  /**
38064
37612
  * This class saves a Bounding box. This bounding box can be of one Planner (one Set) or for several planner elements (multiple Sets)
38065
37613
  */
@@ -38394,7 +37942,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38394
37942
  key: "initPlanner",
38395
37943
  value: (function () {
38396
37944
  var _initPlanner = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(initSetState, plannerHandlerFunctions) {
38397
- var renderGroup, diva3dServerUrl, divaMediaServiceUrl, mediaServiceApiKey, useSirvViewer, _initSetState$api$web, result;
37945
+ var renderGroup, diva3dServerUrl, divaMediaServiceUrl, mediaServiceApiKey, _initSetState$api$web, result;
38398
37946
  return _regeneratorRuntime.wrap(function _callee$(_context) {
38399
37947
  while (1) switch (_context.prev = _context.next) {
38400
37948
  case 0:
@@ -38403,8 +37951,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38403
37951
  this.plannerHandlerFunctions = plannerHandlerFunctions;
38404
37952
  diva3dServerUrl = initSetState.api.get3DServerUrl();
38405
37953
  divaMediaServiceUrl = initSetState.api.getDivaMediaServiceUrl();
38406
- mediaServiceApiKey = initSetState.api.getDivaMediaServiceApiKey();
38407
- useSirvViewer = initSetState.api.getDiva3dUseSirvViewer(); //renderGroup = 'LeaTest';
37954
+ mediaServiceApiKey = initSetState.api.getDivaMediaServiceApiKey(); //renderGroup = 'LeaTest';
38408
37955
  //diva3dServerUrl = "https://test-einkauf-onboarding.pfister.ch/diva3d/diva3dhost2/";
38409
37956
  // diva3dServerUrl = "https://diva3dhost.diva-portal.com/diva3d/diva3dhost2/";
38410
37957
  //diva3dServerUrl = 'https://localhost:44315/';
@@ -38414,7 +37961,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38414
37961
  //divaMediaServiceUrl = 'https://api-test.diva-portal.com/media/';
38415
37962
  //divaMediaServiceUrl = 'http://localhost:3000';
38416
37963
  if (!(!initSetState.onlyRunLogic && !initSetState.no3DConnection)) {
38417
- _context.next = 15;
37964
+ _context.next = 14;
38418
37965
  break;
38419
37966
  }
38420
37967
  this.handler3D.initializeCallbackFunctions({
@@ -38426,34 +37973,31 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38426
37973
  this.handler3D.setJwt(initSetState.api.getJwt());
38427
37974
  //Only use if only 1 Planner/Set is used. Not possible in setPlanner
38428
37975
  result = this.handler3D.initializeAPISettings({
38429
- useMediaServiceImageCache: initSetState.api.getDiva3dUseImageCache(),
38430
- suppressCacheCreation: initSetState.api.getDiva3DSuppressCacheCreation(),
38431
37976
  renderGroup: renderGroup,
38432
37977
  diva3dServerUrl: diva3dServerUrl,
38433
37978
  divaMediaServiceUrl: divaMediaServiceUrl,
38434
37979
  organizationId: initSetState.organizationId,
38435
- useSirvViewer: useSirvViewer,
38436
37980
  arViewerUrl: (_initSetState$api$web = initSetState.api.webConfig) === null || _initSetState$api$web === void 0 ? void 0 : _initSetState$api$web.arViewerUrl
38437
37981
  });
38438
37982
  if (!(!this.handler3D.checkConnectionInitialized() || result.renderGroupChanged || result.diva3dServerUrlChanged)) {
38439
- _context.next = 14;
37983
+ _context.next = 13;
38440
37984
  break;
38441
37985
  }
38442
- _context.next = 14;
37986
+ _context.next = 13;
38443
37987
  return this.handler3D.initializeConnection();
38444
- case 14:
37988
+ case 13:
38445
37989
  if (this.divaNr != initSetState.divaNr) {
38446
37990
  this.divaNr = initSetState.divaNr;
38447
37991
  this.handler3D.joinDivaNr(this.divaNr);
38448
37992
  }
38449
- case 15:
37993
+ case 14:
38450
37994
  mediaServiceHandler.setMediaServiceUrl(divaMediaServiceUrl);
38451
37995
  mediaServiceHandler.setMediaServiceApiKey(mediaServiceApiKey);
38452
37996
  mediaServiceHandler.setOrganizationId(initSetState.organizationId);
38453
37997
  mediaServiceHandler.setJwt(initSetState.api.getJwt());
38454
37998
  this.handler3D.setOrigConfigurationCallback(this.plannerHandlerFunctions.getOrigConfiguration);
38455
37999
  DivaUtils.endSpanOfApm('DivaPlannerHandler initPlanner');
38456
- case 21:
38000
+ case 20:
38457
38001
  case "end":
38458
38002
  return _context.stop();
38459
38003
  }
@@ -38570,10 +38114,8 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38570
38114
  roomlistCodex,
38571
38115
  roomLists,
38572
38116
  _yield$import,
38573
- DivaSingleProductPlanner,
38574
- _yield$import2,
38575
38117
  DivaStandardPlanner,
38576
- _yield$import3,
38118
+ _yield$import2,
38577
38119
  DivaBoxPlanner,
38578
38120
  _args4 = arguments;
38579
38121
  return _regeneratorRuntime.wrap(function _callee4$(_context4) {
@@ -38602,58 +38144,44 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38602
38144
  }
38603
38145
  this.handler3D.initializeViewPoint(catalogData.standardWhiteroom);
38604
38146
  _context4.t0 = set.getPlannerEdition();
38605
- _context4.next = _context4.t0 === 'STANDARD' ? 8 : _context4.t0 === 'BOX' ? 23 : 29;
38147
+ _context4.next = _context4.t0 === 'STANDARD' ? 8 : _context4.t0 === 'BOX' ? 15 : 21;
38606
38148
  break;
38607
38149
  case 8:
38608
- if (!this.handler3D.getUseMediaServiceImageCache()) {
38609
- _context4.next = 16;
38610
- break;
38611
- }
38612
- _context4.next = 11;
38613
- return import('./DivaSingleProductPlanner-bc11af8c.js');
38614
- case 11:
38150
+ _context4.next = 10;
38151
+ return import('./DivaStandardPlanner-19cc5ac0.js');
38152
+ case 10:
38615
38153
  _yield$import = _context4.sent;
38616
- DivaSingleProductPlanner = _yield$import["default"];
38617
- planner = new DivaSingleProductPlanner(set, this.plannerIDCount, this.setPlannerHandler.getGlobalBoundingBox(), set.api.getHidePlanner());
38618
- _context4.next = 22;
38619
- break;
38620
- case 16:
38621
- _context4.next = 18;
38622
- return import('./DivaStandardPlanner-bb2a6560.js');
38623
- case 18:
38624
- _yield$import2 = _context4.sent;
38625
- DivaStandardPlanner = _yield$import2["default"];
38154
+ DivaStandardPlanner = _yield$import["default"];
38626
38155
  planner = new DivaStandardPlanner(set, this.plannerHandlerFunctions.updatePlannerMsgContainer, this.plannerIDCount, this.setPlannerHandler.getGlobalBoundingBox(), set.api.getHidePlanner(), !!set.api.getDoShowAR(), set.api.getDoDisablePlanner2D(), hasStaticBackground);
38627
38156
  if (catalogData.isIDM3DCat) {
38628
38157
  planner.initIDM3DMeta(catalogData.IDM3DCatCodex);
38629
38158
  }
38630
- case 22:
38631
- return _context4.abrupt("break", 29);
38632
- case 23:
38633
- _context4.next = 25;
38634
- return import('./DivaBoxPlanner-162f61b3.js');
38635
- case 25:
38636
- _yield$import3 = _context4.sent;
38637
- DivaBoxPlanner = _yield$import3["default"];
38159
+ return _context4.abrupt("break", 21);
38160
+ case 15:
38161
+ _context4.next = 17;
38162
+ return import('./DivaBoxPlanner-8ef0722c.js');
38163
+ case 17:
38164
+ _yield$import2 = _context4.sent;
38165
+ DivaBoxPlanner = _yield$import2["default"];
38638
38166
  planner = new DivaBoxPlanner(set, this.plannerIDCount);
38639
- return _context4.abrupt("break", 29);
38640
- case 29:
38167
+ return _context4.abrupt("break", 21);
38168
+ case 21:
38641
38169
  this.plannerList.set(set.getSetId(), planner);
38642
38170
  this.plannerIDCount++;
38643
38171
  if (!(setPlanData != null && setPlanData != '')) {
38644
- _context4.next = 34;
38172
+ _context4.next = 26;
38645
38173
  break;
38646
38174
  }
38647
- _context4.next = 34;
38175
+ _context4.next = 26;
38648
38176
  return planner.initPlanner(setPlanData);
38649
- case 34:
38177
+ case 26:
38650
38178
  if (lastSetToInitialize) {
38651
38179
  this.updateAllPlannerBBs();
38652
38180
  this.setPlannerHandler.calcGlobalBoundingBox(this.plannerList);
38653
38181
  }
38654
38182
  this.setPlannerHandler.updateSetPosNr(this.plannerList);
38655
38183
  DivaUtils.endSpanOfApm('DivaPlannerHandler initSet');
38656
- case 37:
38184
+ case 29:
38657
38185
  case "end":
38658
38186
  return _context4.stop();
38659
38187
  }
@@ -39123,7 +38651,6 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
39123
38651
  }, {
39124
38652
  key: "clearHandler3D",
39125
38653
  value: function clearHandler3D() {
39126
- this.handler3D.clearRenderCache();
39127
38654
  this.handler3D.closeConnection();
39128
38655
  }
39129
38656
  }, {
@@ -39372,7 +38899,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
39372
38899
  if (!renderRequestInfos) {
39373
38900
  LOG$2.error(new DivaError('Error requesting 3D rendering. No renderRequestInfo is set'));
39374
38901
  return;
39375
- } else if ((renderRequestInfos.width <= 0 || isNaN(renderRequestInfos.width) || renderRequestInfos.height <= 0 || isNaN(renderRequestInfos.height)) && !this.handler3D.getUseMediaServiceImageCache()) {
38902
+ } else if (renderRequestInfos.width <= 0 || isNaN(renderRequestInfos.width) || renderRequestInfos.height <= 0 || isNaN(renderRequestInfos.height)) {
39376
38903
  LOG$2.error(new DivaError('Error requesting rendering. Not valid width or height request width: ' + renderRequestInfos.width + ' height: ' + renderRequestInfos.height));
39377
38904
  return;
39378
38905
  }
@@ -39381,14 +38908,11 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
39381
38908
  var loadedCatData = [];
39382
38909
  var plannerExists = false;
39383
38910
  var savedSetId = undefined;
39384
- var containsNotDigitalizedTextures = false;
39385
- var useMediaServiceImageCache = doRequestRendering && this.handler3D.getUseMediaServiceImageCache() ? true : false;
39386
38911
  this.plannerList.forEach(function (planner, setId) {
39387
38912
  var _renderRequestInfos$d;
39388
38913
  savedSetId = setId;
39389
- 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);
38914
+ 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);
39390
38915
  var setData = config.constructionSet;
39391
- if (config.containsNotDigitalizedTextures) containsNotDigitalizedTextures = true;
39392
38916
 
39393
38917
  //Add technical Info to setData
39394
38918
  var bboxInfo2D = _this3.get2DViewPlannerBoundingBox();
@@ -39408,15 +38932,6 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
39408
38932
  });
39409
38933
  });
39410
38934
  if (plannerExists) {
39411
- if (containsNotDigitalizedTextures) {
39412
- var _this$plannerHandlerF3, _this$plannerHandlerF4;
39413
- (_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);
39414
- } else {
39415
- var _this$plannerHandlerF5, _this$plannerHandlerF6;
39416
- //Hide message warning if shown
39417
- (_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);
39418
- }
39419
-
39420
38935
  // if not in set planner mode overwrite s1 with correct setId
39421
38936
  if (!this.plannerHandlerFunctions.doAllowSetPlanner()) {
39422
38937
  plannerData.SCE.ROO[0].SET[0].ID = savedSetId;
@@ -39459,12 +38974,12 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
39459
38974
 
39460
38975
  if (!setId) {
39461
38976
  this.plannerList.forEach(function (planner, setId) {
39462
- var config = planner.getSetData(true, _this4.plannerHandlerFunctions.doAllowSetPlanner(), false, _this4.handler3D.getUseMediaServiceImageCache());
38977
+ var config = planner.getSetData(true, _this4.plannerHandlerFunctions.doAllowSetPlanner(), false);
39463
38978
  var setData = config.constructionSet;
39464
38979
  plannerData.SCE.ROO[0].SET.push(setData);
39465
38980
  });
39466
38981
  } else {
39467
- var config = this.plannerList.get(setId).getSetData(true, this.plannerHandlerFunctions.doAllowSetPlanner(), false, this.handler3D.getUseMediaServiceImageCache());
38982
+ var config = this.plannerList.get(setId).getSetData(true, this.plannerHandlerFunctions.doAllowSetPlanner(), false);
39468
38983
  plannerData.SCE.ROO[0].SET.push(config.constructionSet);
39469
38984
  }
39470
38985
  return JSON.stringify(plannerData);
@@ -39491,7 +39006,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
39491
39006
  // let posInformation: any = {};
39492
39007
 
39493
39008
  this.plannerList.forEach(function (planner, setId) {
39494
- var config = planner.getSetData(false, _this5.plannerHandlerFunctions.doAllowSetPlanner(), false, _this5.handler3D.getUseMediaServiceImageCache());
39009
+ var config = planner.getSetData(false, _this5.plannerHandlerFunctions.doAllowSetPlanner(), false);
39495
39010
  plannerData.SCE.ROO[0].SET.push(config.constructionSet);
39496
39011
  });
39497
39012
  return md5(JSON.stringify(plannerData));
@@ -39546,7 +39061,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
39546
39061
  _defineProperty(this, "updatePlanner3DImage", void 0);
39547
39062
  _defineProperty(this, "setRotationOrbitCube", void 0);
39548
39063
  _defineProperty(this, "getCanvas2DAsJPG", void 0);
39549
- _defineProperty(this, "updateSirvViewer", void 0);
39550
39064
  _defineProperty(this, "updateFullscreenRendering", void 0);
39551
39065
  _defineProperty(this, "plannerHandler", void 0);
39552
39066
  _defineProperty(this, "updateSetImage", void 0);
@@ -39636,18 +39150,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
39636
39150
  if (rendering.getIsFullscreenRendering()) {
39637
39151
  _this.updateFullscreenRendering(rendering);
39638
39152
  } else {
39639
- if (_this.getCurPlannerViewMode() == 'SirvViewer_only') {
39640
- var _this$actSet, _this$updateSirvViewe, _this$actSet2;
39641
- (_this$actSet = _this.actSet()) === null || _this$actSet === void 0 || _this$actSet.getVariantBasketData();
39642
- (_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());
39643
- } else {
39644
- var _this$actSet3;
39645
- _this.updatePlanner3DImage(rendering, ((_this$actSet3 = _this.actSet()) === null || _this$actSet3 === void 0 ? void 0 : _this$actSet3.getAlternateRenderInfo().length) > 0);
39646
- }
39153
+ var _this$actSet;
39154
+ _this.updatePlanner3DImage(rendering, ((_this$actSet = _this.actSet()) === null || _this$actSet === void 0 ? void 0 : _this$actSet.getAlternateRenderInfo().length) > 0);
39647
39155
  }
39648
39156
  if (_this.actions && (_this$state = _this.state) !== null && _this$state !== void 0 && _this$state.enableSupport) {
39649
- var _this$actSet4, _this$state$user, _this$state$user2, _this$state$user3;
39650
- _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);
39157
+ var _this$actSet2, _this$state$user, _this$state$user2, _this$state$user3;
39158
+ _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);
39651
39159
  }
39652
39160
  });
39653
39161
  /**
@@ -40489,19 +39997,19 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40489
39997
  }, {
40490
39998
  key: "getDivaArticles",
40491
39999
  value: function getDivaArticles() {
40492
- var _this$actSet5;
40493
- return (_this$actSet5 = this.actSet()) === null || _this$actSet5 === void 0 ? void 0 : _this$actSet5.getDivaArticles();
40000
+ var _this$actSet3;
40001
+ return (_this$actSet3 = this.actSet()) === null || _this$actSet3 === void 0 ? void 0 : _this$actSet3.getDivaArticles();
40494
40002
  }
40495
40003
  }, {
40496
40004
  key: "getDimension",
40497
40005
  value: function () {
40498
40006
  var _getDimension = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee14() {
40499
- var _this$actSet6;
40007
+ var _this$actSet4;
40500
40008
  return _regeneratorRuntime.wrap(function _callee14$(_context14) {
40501
40009
  while (1) switch (_context14.prev = _context14.next) {
40502
40010
  case 0:
40503
40011
  _context14.next = 2;
40504
- return (_this$actSet6 = this.actSet()) === null || _this$actSet6 === void 0 ? void 0 : _this$actSet6.getDimensionPerVariant();
40012
+ return (_this$actSet4 = this.actSet()) === null || _this$actSet4 === void 0 ? void 0 : _this$actSet4.getDimensionPerVariant();
40505
40013
  case 2:
40506
40014
  return _context14.abrupt("return", _context14.sent);
40507
40015
  case 3:
@@ -40560,7 +40068,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40560
40068
  this.updateWebConfiguratorTitle();
40561
40069
  //initialize planner view
40562
40070
  (_this$updateViewPlann9 = this.updateViewPlannerElements) === null || _this$updateViewPlann9 === void 0 || _this$updateViewPlann9.call(this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set), set.getSetId(), set.firstElementId);
40563
- this.initCache();
40071
+ this.updatePlannerView('INIT_VIEW');
40564
40072
  this.onBasketInitialized();
40565
40073
  this.checkVariantData();
40566
40074
  case 17:
@@ -40580,8 +40088,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40580
40088
  }, {
40581
40089
  key: "updateWebConfiguratorTitle",
40582
40090
  value: function updateWebConfiguratorTitle() {
40583
- var _this$setWebConifgura, _this$actSet7;
40584
- (_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());
40091
+ var _this$setWebConifgura, _this$actSet5;
40092
+ (_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());
40585
40093
  }
40586
40094
  }, {
40587
40095
  key: "updateConfigStructure",
@@ -40593,7 +40101,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40593
40101
  value: function () {
40594
40102
  var _runInitMode = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee16(plannerMode) {
40595
40103
  var _this$navigateToTabGr2;
40596
- var doDefault, configStepKey, _this$actSet8, _this$navigateToTabGr3, _this$navigateToTabGr4, _this$navigateToTabGr5;
40104
+ var doDefault, configStepKey, _this$actSet6, _this$navigateToTabGr3, _this$navigateToTabGr4, _this$navigateToTabGr5;
40597
40105
  return _regeneratorRuntime.wrap(function _callee16$(_context16) {
40598
40106
  while (1) switch (_context16.prev = _context16.next) {
40599
40107
  case 0:
@@ -40628,7 +40136,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40628
40136
  if (doDefault) {
40629
40137
  if (plannerMode == 'ProductList') {
40630
40138
  (_this$navigateToTabGr3 = this.navigateToTabGroup) === null || _this$navigateToTabGr3 === void 0 || _this$navigateToTabGr3.call(this, 'PRODUCTS');
40631
- } else if ((_this$actSet8 = this.actSet()) !== null && _this$actSet8 !== void 0 && _this$actSet8.hasStaticRoomList) {
40139
+ } else if ((_this$actSet6 = this.actSet()) !== null && _this$actSet6 !== void 0 && _this$actSet6.hasStaticRoomList) {
40632
40140
  (_this$navigateToTabGr4 = this.navigateToTabGroup) === null || _this$navigateToTabGr4 === void 0 || _this$navigateToTabGr4.call(this, 'ROOMLIST', true);
40633
40141
  } else {
40634
40142
  (_this$navigateToTabGr5 = this.navigateToTabGroup) === null || _this$navigateToTabGr5 === void 0 || _this$navigateToTabGr5.call(this, this.getCurPlannerType(true), true);
@@ -40645,24 +40153,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40645
40153
  }
40646
40154
  return runInitMode;
40647
40155
  }()
40648
- }, {
40649
- key: "initCache",
40650
- value: function initCache() {
40651
- //get cached image
40652
- var initFirstRenderingByCache = false;
40653
- if (DivaUtils.CacheIsEnabled) {
40654
- var firstImageUrl = DivaUtils.getCacheData('FIRSTIMAGE', '');
40655
- if (firstImageUrl) {
40656
- initFirstRenderingByCache = true;
40657
- var rendering = new Rendering('', '', '', -1, -1, false, false, 0, false, false, 'STREAM');
40658
- rendering.setHQRenderingUrl(firstImageUrl, this.api.getDiva3dUseSirvViewer());
40659
- this.updatePlannerRendering(rendering);
40660
- }
40661
- }
40662
- if (!initFirstRenderingByCache) {
40663
- this.updatePlannerView('INIT_VIEW');
40664
- }
40665
- }
40666
40156
  }, {
40667
40157
  key: "addSetToActPlanningByDivaNr",
40668
40158
  value: function () {
@@ -40876,7 +40366,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40876
40366
  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);
40877
40367
  break;
40878
40368
  case '3DImage':
40879
- case 'SirvViewer_only':
40880
40369
  //Request new Rendering
40881
40370
  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);
40882
40371
  break;
@@ -40923,8 +40412,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40923
40412
  }, {
40924
40413
  key: "getAlternateRenderingsForSummary",
40925
40414
  value: function getAlternateRenderingsForSummary() {
40926
- var _this$actSet9;
40927
- 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;
40415
+ var _this$actSet7;
40416
+ 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;
40928
40417
  }
40929
40418
  }, {
40930
40419
  key: "destroyWebPlanner",
@@ -41220,8 +40709,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41220
40709
  }, {
41221
40710
  key: "setDifferentOptions",
41222
40711
  value: function setDifferentOptions(options) {
41223
- var _this$actSet10;
41224
- (_this$actSet10 = this.actSet()) === null || _this$actSet10 === void 0 || _this$actSet10.setDifferentOptions(options);
40712
+ var _this$actSet8;
40713
+ (_this$actSet8 = this.actSet()) === null || _this$actSet8 === void 0 || _this$actSet8.setDifferentOptions(options);
41225
40714
  }
41226
40715
 
41227
40716
  /**
@@ -41598,7 +41087,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41598
41087
  * This function returns true if the Planner Mode should be visible and the planner Step should be shown.
41599
41088
  * The planner step is not shown if:
41600
41089
  * - There is no viewer Option set for the Planner
41601
- * - The configurator config disables the planner Step (SuS + Cache System)
41602
41090
  * - The box Planner is loaded
41603
41091
  */
41604
41092
  }, {
@@ -41619,8 +41107,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41619
41107
 
41620
41108
  //if planner is hidden by config but nothing is planned initially
41621
41109
  if (plannerType === 'NONE') {
41622
- var _this$plannerConfig$a7, _this$actSet11;
41623
- 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)) {
41110
+ var _this$plannerConfig$a7, _this$actSet9;
41111
+ 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)) {
41624
41112
  plannerType = 'PLANNER';
41625
41113
  }
41626
41114
  }
@@ -41660,38 +41148,38 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41660
41148
  }, {
41661
41149
  key: "getCurCatalogCodex",
41662
41150
  value: function getCurCatalogCodex() {
41663
- var _this$actSet12;
41664
- return (_this$actSet12 = this.actSet()) === null || _this$actSet12 === void 0 ? void 0 : _this$actSet12.getCatalogCodex();
41151
+ var _this$actSet10;
41152
+ return (_this$actSet10 = this.actSet()) === null || _this$actSet10 === void 0 ? void 0 : _this$actSet10.getCatalogCodex();
41665
41153
  }
41666
41154
  }, {
41667
41155
  key: "getCurCatalogName",
41668
41156
  value: function getCurCatalogName() {
41669
- var _this$actSet13;
41670
- return (_this$actSet13 = this.actSet()) === null || _this$actSet13 === void 0 ? void 0 : _this$actSet13.getCatalogName();
41157
+ var _this$actSet11;
41158
+ return (_this$actSet11 = this.actSet()) === null || _this$actSet11 === void 0 ? void 0 : _this$actSet11.getCatalogName();
41671
41159
  }
41672
41160
  }, {
41673
41161
  key: "getCurAccountName",
41674
41162
  value: function getCurAccountName() {
41675
- var _this$actSet14;
41676
- return (_this$actSet14 = this.actSet()) === null || _this$actSet14 === void 0 ? void 0 : _this$actSet14.getAccountName();
41163
+ var _this$actSet12;
41164
+ return (_this$actSet12 = this.actSet()) === null || _this$actSet12 === void 0 ? void 0 : _this$actSet12.getAccountName();
41677
41165
  }
41678
41166
  }, {
41679
41167
  key: "getCurSupplierGuid",
41680
41168
  value: function getCurSupplierGuid() {
41681
- var _this$actSet15;
41682
- return (_this$actSet15 = this.actSet()) === null || _this$actSet15 === void 0 ? void 0 : _this$actSet15.getSupplierGuid();
41169
+ var _this$actSet13;
41170
+ return (_this$actSet13 = this.actSet()) === null || _this$actSet13 === void 0 ? void 0 : _this$actSet13.getSupplierGuid();
41683
41171
  }
41684
41172
  }, {
41685
41173
  key: "getCurSetPrice",
41686
41174
  value: function getCurSetPrice() {
41687
- var _this$actSet$getSetPr, _this$actSet16;
41688
- 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;
41175
+ var _this$actSet$getSetPr, _this$actSet14;
41176
+ 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;
41689
41177
  }
41690
41178
  }, {
41691
41179
  key: "getCurImageMode",
41692
41180
  value: function getCurImageMode() {
41693
- var _this$actSet17;
41694
- 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';
41181
+ var _this$actSet15;
41182
+ 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';
41695
41183
  }
41696
41184
  }, {
41697
41185
  key: "getViewConfig",
@@ -41722,73 +41210,64 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41722
41210
  }, {
41723
41211
  key: "doShow3DDimensionLines",
41724
41212
  value: function doShow3DDimensionLines() {
41725
- var _this$actSet18;
41726
- 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;
41213
+ var _this$actSet16;
41214
+ 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;
41727
41215
  }
41728
41216
  }, {
41729
41217
  key: "hidePlannerUiIcons",
41730
41218
  value: function hidePlannerUiIcons() {
41731
- var _this$actSet19;
41732
- 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;
41219
+ var _this$actSet17;
41220
+ 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;
41733
41221
  }
41734
41222
  }, {
41735
41223
  key: "doShowPlannerReplaceMode",
41736
41224
  value: function doShowPlannerReplaceMode() {
41737
- var _this$actSet20, _this$api$getViewConf2, _catalogData$PlannerP, _catalogData$PlannerP2;
41738
- var catalogData = (_this$actSet20 = this.actSet()) === null || _this$actSet20 === void 0 ? void 0 : _this$actSet20.CatalogData;
41225
+ var _this$actSet18, _this$api$getViewConf2, _catalogData$PlannerP, _catalogData$PlannerP2;
41226
+ var catalogData = (_this$actSet18 = this.actSet()) === null || _this$actSet18 === void 0 ? void 0 : _this$actSet18.CatalogData;
41739
41227
  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;
41740
41228
  }
41741
41229
  }, {
41742
41230
  key: "doPlannerReplaceAutoSwitch",
41743
41231
  value: function doPlannerReplaceAutoSwitch() {
41744
- var _this$actSet21, _this$api$getViewConf3;
41745
- var catalogData = (_this$actSet21 = this.actSet()) === null || _this$actSet21 === void 0 ? void 0 : _this$actSet21.CatalogData;
41232
+ var _this$actSet19, _this$api$getViewConf3;
41233
+ var catalogData = (_this$actSet19 = this.actSet()) === null || _this$actSet19 === void 0 ? void 0 : _this$actSet19.CatalogData;
41746
41234
  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);
41747
41235
  }
41748
41236
  }, {
41749
41237
  key: "getHidePlanner",
41750
41238
  value: function getHidePlanner() {
41751
- var _this$actSet22;
41752
- return this.api.getHidePlanner() || !!((_this$actSet22 = this.actSet()) !== null && _this$actSet22 !== void 0 && _this$actSet22.CatalogData.useBoxPlanner);
41239
+ var _this$actSet20;
41240
+ return this.api.getHidePlanner() || !!((_this$actSet20 = this.actSet()) !== null && _this$actSet20 !== void 0 && _this$actSet20.CatalogData.useBoxPlanner);
41753
41241
  }
41754
41242
  }, {
41755
41243
  key: "getAllowRTV",
41756
41244
  value: function getAllowRTV() {
41757
- var _this$actSet23, _this$actSet24;
41758
- if ((_this$actSet23 = this.actSet()) !== null && _this$actSet23 !== void 0 && _this$actSet23.CatalogData.divaForceRTV) return true;
41759
- if (this.api.getDoShowRTV() && (_this$actSet24 = this.actSet()) !== null && _this$actSet24 !== void 0 && _this$actSet24.CatalogData.divaArReady) return true;
41245
+ var _this$actSet21, _this$actSet22;
41246
+ if (this.api.forceShowRTV()) return true;
41247
+ if ((_this$actSet21 = this.actSet()) !== null && _this$actSet21 !== void 0 && _this$actSet21.CatalogData.divaForceRTV) return true;
41248
+ if (this.api.getDoShowRTV() && (_this$actSet22 = this.actSet()) !== null && _this$actSet22 !== void 0 && _this$actSet22.CatalogData.divaArReady) return true;
41760
41249
  return false;
41761
41250
  }
41762
41251
  }, {
41763
41252
  key: "geAllowQRCodeAR",
41764
41253
  value: function geAllowQRCodeAR() {
41765
- var _this$actSet25;
41766
- if (this.api.getDoShowAR() && (_this$actSet25 = this.actSet()) !== null && _this$actSet25 !== void 0 && _this$actSet25.CatalogData.divaArReady) return true;
41254
+ var _this$actSet23;
41255
+ if (this.api.getDoShowAR() && (_this$actSet23 = this.actSet()) !== null && _this$actSet23 !== void 0 && _this$actSet23.CatalogData.divaArReady) return true;
41767
41256
  return false;
41768
41257
  }
41769
41258
  }, {
41770
41259
  key: "getEnableUnityRtvKombi",
41771
41260
  value: function getEnableUnityRtvKombi() {
41772
- var _this$actSet26;
41261
+ var _this$actSet24;
41773
41262
  // if force rtv disable unity kombi - biohort
41774
- if ((_this$actSet26 = this.actSet()) !== null && _this$actSet26 !== void 0 && _this$actSet26.CatalogData.divaForceRTV) return false;
41263
+ if ((_this$actSet24 = this.actSet()) !== null && _this$actSet24 !== void 0 && _this$actSet24.CatalogData.divaForceRTV) return false;
41775
41264
  return this.api.getEnableRTVUnityKombi();
41776
41265
  }
41777
41266
  }, {
41778
41267
  key: "getShelfPlannerRTV",
41779
41268
  value: function getShelfPlannerRTV() {
41780
- var _this$actSet27;
41781
- return (_this$actSet27 = this.actSet()) === null || _this$actSet27 === void 0 ? void 0 : _this$actSet27.CatalogData.useShelfPlannerRTV;
41782
- }
41783
- }, {
41784
- key: "getDiva3DSuppressCacheCreation",
41785
- value: function getDiva3DSuppressCacheCreation() {
41786
- return this.api.getDiva3DSuppressCacheCreation();
41787
- }
41788
- }, {
41789
- key: "getDiva3dUseImageCache",
41790
- value: function getDiva3dUseImageCache() {
41791
- return this.api.getDiva3dUseImageCache();
41269
+ var _this$actSet25;
41270
+ return (_this$actSet25 = this.actSet()) === null || _this$actSet25 === void 0 ? void 0 : _this$actSet25.CatalogData.useShelfPlannerRTV;
41792
41271
  }
41793
41272
  }, {
41794
41273
  key: "getBasketData",
@@ -41829,8 +41308,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41829
41308
  }, {
41830
41309
  key: "getCatalogData",
41831
41310
  value: function getCatalogData() {
41832
- var _this$actSet28;
41833
- return (_this$actSet28 = this.actSet()) === null || _this$actSet28 === void 0 ? void 0 : _this$actSet28.CatalogData;
41311
+ var _this$actSet26;
41312
+ return (_this$actSet26 = this.actSet()) === null || _this$actSet26 === void 0 ? void 0 : _this$actSet26.CatalogData;
41834
41313
  }
41835
41314
  }, {
41836
41315
  key: "ReturnTo",
@@ -42111,11 +41590,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
42111
41590
  value: function registerGetCanvas2DAsJPG(getCanvas2DAsJPG) {
42112
41591
  this.getCanvas2DAsJPG = getCanvas2DAsJPG;
42113
41592
  }
42114
- }, {
42115
- key: "registerUpdateSirvViewer",
42116
- value: function registerUpdateSirvViewer(updateSirvViewer) {
42117
- this.updateSirvViewer = updateSirvViewer;
42118
- }
42119
41593
  }, {
42120
41594
  key: "registerUpdatePlanner2DGrid",
42121
41595
  value: function registerUpdatePlanner2DGrid(updatePlanner2DGrid) {
@@ -42583,7 +42057,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
42583
42057
  this.updatePlanner3DImage = undefined;
42584
42058
  this.setRotationOrbitCube = undefined;
42585
42059
  this.getCanvas2DAsJPG = undefined;
42586
- this.updateSirvViewer = undefined;
42587
42060
  this.updatePlannerMsgContainer = undefined;
42588
42061
  this.updateFullscreenRendering = undefined;
42589
42062
  this.updateSetImage = undefined;
@@ -43523,24 +42996,25 @@ var Grid = /*#__PURE__*/function () {
43523
42996
  }, {
43524
42997
  key: "onConfigChanged",
43525
42998
  value: function onConfigChanged() {
42999
+ var returnTypes = [];
43000
+ if (this.ShowOnRule) {
43001
+ var disabled = !this.article.evalRule(DivaUtils.getRuleByFormula(this.ShowOnRule));
43002
+ if (disabled !== this.disabledByRule) {
43003
+ this.disabledByRule = disabled;
43004
+ returnTypes.push('disableGridRule');
43005
+ }
43006
+ }
43526
43007
  if (this.heightGridCellCountOnRule) {
43527
43008
  for (var i = 0; i < this.heightGridCellCountOnRule.length; i++) {
43528
43009
  if (this.article.evalRule(DivaUtils.getRuleByFormula(this.heightGridCellCountOnRule[i].Rule))) {
43529
43010
  if (this.currentLoadedRuleIndex != i) {
43530
43011
  this.currentLoadedRuleIndex = i;
43531
- return 'heightGridRule';
43012
+ returnTypes.push('heightGridRule');
43532
43013
  }
43533
43014
  }
43534
43015
  }
43535
43016
  }
43536
- if (this.ShowOnRule) {
43537
- var disabled = !this.article.evalRule(DivaUtils.getRuleByFormula(this.ShowOnRule));
43538
- if (disabled !== this.disabledByRule) {
43539
- this.disabledByRule = disabled;
43540
- return 'disableGridRule';
43541
- }
43542
- }
43543
- return false;
43017
+ return returnTypes;
43544
43018
  }
43545
43019
 
43546
43020
  /**
@@ -59968,7 +59442,7 @@ var ProductHandler = /*#__PURE__*/function () {
59968
59442
  */
59969
59443
  _defineProperty(this, "loadProducts", /*#__PURE__*/function () {
59970
59444
  var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(_ref3) {
59971
- 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;
59445
+ 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;
59972
59446
  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;
59973
59447
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
59974
59448
  while (1) switch (_context2.prev = _context2.next) {
@@ -60080,10 +59554,9 @@ var ProductHandler = /*#__PURE__*/function () {
60080
59554
  mainCategory: _this.mainCategory,
60081
59555
  subCategory: _this.subCategory,
60082
59556
  retailerArticleNr: (_baseProduct15 = baseProduct) === null || _baseProduct15 === void 0 ? void 0 : _baseProduct15.retailerArticleNr,
60083
- available: ((_baseProduct16 = baseProduct) === null || _baseProduct16 === void 0 ? void 0 : _baseProduct16.available) != undefined ? baseProduct.available : false,
60084
59557
  dockingPoints: dockingPoints,
60085
- media: (_baseProduct17 = baseProduct) === null || _baseProduct17 === void 0 ? void 0 : _baseProduct17.media,
60086
- affiliate: (_baseProduct18 = baseProduct) === null || _baseProduct18 === void 0 ? void 0 : _baseProduct18.affiliate
59558
+ media: (_baseProduct16 = baseProduct) === null || _baseProduct16 === void 0 ? void 0 : _baseProduct16.media,
59559
+ affiliate: (_baseProduct17 = baseProduct) === null || _baseProduct17 === void 0 ? void 0 : _baseProduct17.affiliate
60087
59560
  }; //get classification data and remove field prefix
60088
59561
  classificationData = _this.parseClassificationFields(baseProduct, true); // init Variants
60089
59562
  variantData = [];
@@ -60565,11 +60038,6 @@ _defineProperty(ProductHandler, "baseDataFields", [{
60565
60038
  type: 'text',
60566
60039
  title: 'productcreator.fields.technicalDescription',
60567
60040
  fieldType: 'BASE'
60568
- }, {
60569
- field: 'available',
60570
- type: 'boolean',
60571
- title: 'productcreator.fields.available',
60572
- fieldType: 'BASE'
60573
60041
  }, {
60574
60042
  field: 'calculatedPrice',
60575
60043
  type: 'price',