@crystaldesign/web-planner-logic 26.5.2 → 26.5.3

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 (27) hide show
  1. package/build/cjs/{DivaBoxPlanner-4b04e874.js → DivaBoxPlanner-8d4a2525.js} +2 -2
  2. package/build/cjs/{DivaStandardPlanner-cfb1e3a2.js → DivaStandardPlanner-6b2eb5b1.js} +2 -2
  3. package/build/cjs/{DoorPlanner-29ac30a4.js → DoorPlanner-07372af9.js} +1 -1
  4. package/build/cjs/{Host3DSignalR-4b940c1b.js → Host3DSignalR-28e6b4f4.js} +1 -1
  5. package/build/cjs/{LiviqueWWSHandler-d862399d.js → LiviqueWWSHandler-2dc2482c.js} +1 -1
  6. package/build/cjs/{PfisterWWSHandler-140d468b.js → PfisterWWSHandler-545dd8c0.js} +1 -1
  7. package/build/cjs/{PlannerHandler2D-315bf40c.js → PlannerHandler2D-0a84ea32.js} +1 -1
  8. package/build/cjs/{SeriousBasketHandler-d7cf8a91.js → SeriousBasketHandler-484c73d2.js} +1 -1
  9. package/build/cjs/{ShelfPlanner-17d7c4ec.js → ShelfPlanner-fd7d0da6.js} +1 -1
  10. package/build/cjs/{StandardWWSHandler-139f7d1c.js → StandardWWSHandler-cf341f15.js} +1 -1
  11. package/build/cjs/{index-566cd540.js → index-ed8d8e48.js} +682 -607
  12. package/build/cjs/index.js +1 -1
  13. package/build/esm/{DivaBoxPlanner-37224085.js → DivaBoxPlanner-34715ab9.js} +2 -2
  14. package/build/esm/{DivaStandardPlanner-d9e41a67.js → DivaStandardPlanner-895e4bb6.js} +2 -2
  15. package/build/esm/{DoorPlanner-1e9ab446.js → DoorPlanner-1cd57e5b.js} +1 -1
  16. package/build/esm/{Host3DSignalR-9a50a122.js → Host3DSignalR-28c0bce3.js} +1 -1
  17. package/build/esm/{LiviqueWWSHandler-3e8928e3.js → LiviqueWWSHandler-f0bf873d.js} +1 -1
  18. package/build/esm/{PfisterWWSHandler-f94d71be.js → PfisterWWSHandler-3a097516.js} +1 -1
  19. package/build/esm/{PlannerHandler2D-0bdc044d.js → PlannerHandler2D-7568258b.js} +1 -1
  20. package/build/esm/{SeriousBasketHandler-f55a5994.js → SeriousBasketHandler-fac72802.js} +1 -1
  21. package/build/esm/{ShelfPlanner-aacce2e9.js → ShelfPlanner-55b299bf.js} +1 -1
  22. package/build/esm/{StandardWWSHandler-305fa2b2.js → StandardWWSHandler-0c8447b5.js} +1 -1
  23. package/build/esm/{index-9a6e3052.js → index-2e7ad2d3.js} +682 -607
  24. package/build/esm/index.js +1 -1
  25. package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts +1 -0
  26. package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts.map +1 -1
  27. package/package.json +2 -2
@@ -29465,7 +29465,7 @@ var DivaArticle = /*#__PURE__*/function () {
29465
29465
  break;
29466
29466
  }
29467
29467
  _context.next = 4;
29468
- return import('./ShelfPlanner-aacce2e9.js');
29468
+ return import('./ShelfPlanner-55b299bf.js');
29469
29469
  case 4:
29470
29470
  _yield$import = _context.sent;
29471
29471
  ShelfPlanner = _yield$import["default"];
@@ -37404,7 +37404,7 @@ var DivaSet = /*#__PURE__*/function () {
37404
37404
  break;
37405
37405
  }
37406
37406
  _context5.next = 3;
37407
- return import('./DoorPlanner-1e9ab446.js');
37407
+ return import('./DoorPlanner-1cd57e5b.js');
37408
37408
  case 3:
37409
37409
  _yield$import = _context5.sent;
37410
37410
  DoorPlanner = _yield$import["default"];
@@ -37618,11 +37618,11 @@ var DivaSet = /*#__PURE__*/function () {
37618
37618
  }]);
37619
37619
  }();
37620
37620
 
37621
+ 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; }
37622
+ 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; }
37621
37623
  function _createForOfIteratorHelper$2(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$2(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; } } }; }
37622
37624
  function _unsupportedIterableToArray$2(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$2(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$2(r, a) : void 0; } }
37623
37625
  function _arrayLikeToArray$2(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; }
37624
- 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; }
37625
- 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; }
37626
37626
  var LOG$9 = DivaUtils.initLog('Planner', 'DIVA-SET-HANDLER');
37627
37627
 
37628
37628
  /**
@@ -37650,7 +37650,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
37650
37650
  key: "createSet",
37651
37651
  value: function () {
37652
37652
  var _createSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(catalogData, orderSet, initSetState, lastSetToInitialize) {
37653
- var set;
37653
+ var set, _orderSet$OrderLines;
37654
37654
  return _regeneratorRuntime.wrap(function _callee$(_context) {
37655
37655
  while (1) switch (_context.prev = _context.next) {
37656
37656
  case 0:
@@ -37659,7 +37659,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
37659
37659
  favoritesHandlerInstance.initSet(set, orderSet);
37660
37660
  //falls keine Article initialisiert werden sollen
37661
37661
  if (initSetState.initEmptyPlanner) {
37662
- _context.next = 10;
37662
+ _context.next = 13;
37663
37663
  break;
37664
37664
  }
37665
37665
  _context.next = 6;
@@ -37668,14 +37668,21 @@ var DivaSetHandler = /*#__PURE__*/function () {
37668
37668
  _context.next = 8;
37669
37669
  return set.plannerHandler.initSet(set, catalogData, orderSet.SetPlanData, lastSetToInitialize);
37670
37670
  case 8:
37671
- _context.next = 12;
37671
+ if (!(catalogData.reconfigAfterArticleDocked && (_orderSet$OrderLines = orderSet.OrderLines) !== null && _orderSet$OrderLines !== void 0 && _orderSet$OrderLines.length)) {
37672
+ _context.next = 11;
37673
+ break;
37674
+ }
37675
+ _context.next = 11;
37676
+ return this.reinitArticlesAfterDocking(set, orderSet);
37677
+ case 11:
37678
+ _context.next = 15;
37672
37679
  break;
37673
- case 10:
37674
- _context.next = 12;
37680
+ case 13:
37681
+ _context.next = 15;
37675
37682
  return set.plannerHandler.initSet(set, catalogData, undefined);
37676
- case 12:
37683
+ case 15:
37677
37684
  return _context.abrupt("return", set);
37678
- case 13:
37685
+ case 16:
37679
37686
  case "end":
37680
37687
  return _context.stop();
37681
37688
  }
@@ -37686,21 +37693,89 @@ var DivaSetHandler = /*#__PURE__*/function () {
37686
37693
  }
37687
37694
  return createSet;
37688
37695
  }()
37696
+ }, {
37697
+ key: "reinitArticlesAfterDocking",
37698
+ value: function () {
37699
+ var _reinitArticlesAfterDocking = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(set, orderSet) {
37700
+ var catalogData, _iterator, _step, orderline, article, variantValues;
37701
+ return _regeneratorRuntime.wrap(function _callee2$(_context2) {
37702
+ while (1) switch (_context2.prev = _context2.next) {
37703
+ case 0:
37704
+ catalogData = set.CatalogData;
37705
+ _iterator = _createForOfIteratorHelper$2(orderSet.OrderLines);
37706
+ _context2.prev = 2;
37707
+ _iterator.s();
37708
+ case 4:
37709
+ if ((_step = _iterator.n()).done) {
37710
+ _context2.next = 18;
37711
+ break;
37712
+ }
37713
+ orderline = _step.value;
37714
+ if (!orderline.IsPartlistArticle) {
37715
+ _context2.next = 8;
37716
+ break;
37717
+ }
37718
+ return _context2.abrupt("continue", 16);
37719
+ case 8:
37720
+ article = set.getArticleByBasketId(orderline.BasketID);
37721
+ if (!(!article || article.articleType !== 'OPTIONTREE')) {
37722
+ _context2.next = 11;
37723
+ break;
37724
+ }
37725
+ return _context2.abrupt("continue", 16);
37726
+ case 11:
37727
+ variantValues = catalogData.repairVariantValues(orderline.getVariantValues(catalogData.isIDMFormat), orderline.ArticleCodex);
37728
+ if (!(!variantValues || Object.keys(variantValues).length === 0)) {
37729
+ _context2.next = 14;
37730
+ break;
37731
+ }
37732
+ return _context2.abrupt("continue", 16);
37733
+ case 14:
37734
+ _context2.next = 16;
37735
+ return articleHandlerInstance.initCfgValues(article, variantValues);
37736
+ case 16:
37737
+ _context2.next = 4;
37738
+ break;
37739
+ case 18:
37740
+ _context2.next = 23;
37741
+ break;
37742
+ case 20:
37743
+ _context2.prev = 20;
37744
+ _context2.t0 = _context2["catch"](2);
37745
+ _iterator.e(_context2.t0);
37746
+ case 23:
37747
+ _context2.prev = 23;
37748
+ _iterator.f();
37749
+ return _context2.finish(23);
37750
+ case 26:
37751
+ _context2.next = 28;
37752
+ return this.updateArticlesOptionStatesOfActSet(set, {}, [], undefined, 'initializing');
37753
+ case 28:
37754
+ case "end":
37755
+ return _context2.stop();
37756
+ }
37757
+ }, _callee2, this, [[2, 20, 23, 26]]);
37758
+ }));
37759
+ function reinitArticlesAfterDocking(_x5, _x6) {
37760
+ return _reinitArticlesAfterDocking.apply(this, arguments);
37761
+ }
37762
+ return reinitArticlesAfterDocking;
37763
+ }()
37689
37764
  }, {
37690
37765
  key: "initOrderLineArticles",
37691
37766
  value: function () {
37692
- var _initOrderLineArticles = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(set, orderSet) {
37767
+ var _initOrderLineArticles = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(set, orderSet) {
37693
37768
  var _JSON$parse;
37694
37769
  var catalogData, toLoadArticles, previousPartlistArticles, elements, _loop, i, _loop2, basketId, _i, toloadArticle, catalogArticle, newArticle, _i2, _newArticle, parentArticle, _newArticle$shelfPlan, _i3, cellsOfGrid, j, cell, gridIndex, accessoire, doesFit, _i4, _newArticle2$doorPlan, _newArticle2;
37695
- return _regeneratorRuntime.wrap(function _callee2$(_context4) {
37696
- while (1) switch (_context4.prev = _context4.next) {
37770
+ return _regeneratorRuntime.wrap(function _callee3$(_context5) {
37771
+ while (1) switch (_context5.prev = _context5.next) {
37697
37772
  case 0:
37698
37773
  catalogData = set.CatalogData;
37699
37774
  if (!(!orderSet.OrderLines || orderSet.OrderLines.length == 0)) {
37700
- _context4.next = 3;
37775
+ _context5.next = 3;
37701
37776
  break;
37702
37777
  }
37703
- return _context4.abrupt("return");
37778
+ return _context5.abrupt("return");
37704
37779
  case 3:
37705
37780
  DivaUtils.startSpanOfApm('Articles initialize');
37706
37781
  toLoadArticles = [];
@@ -37709,17 +37784,17 @@ var DivaSetHandler = /*#__PURE__*/function () {
37709
37784
  _loop = /*#__PURE__*/_regeneratorRuntime.mark(function _loop() {
37710
37785
  var _catalogData$useEdoAr, _catalogData$getCatal;
37711
37786
  var orderline, isPartlistExclusive, _orderline$ElementID, _elements$find, variantValues;
37712
- return _regeneratorRuntime.wrap(function _loop$(_context2) {
37713
- while (1) switch (_context2.prev = _context2.next) {
37787
+ return _regeneratorRuntime.wrap(function _loop$(_context3) {
37788
+ while (1) switch (_context3.prev = _context3.next) {
37714
37789
  case 0:
37715
37790
  orderline = orderSet.OrderLines[i];
37716
37791
  if (!((_catalogData$useEdoAr = catalogData.useEdoArticlesOnOpvs) !== null && _catalogData$useEdoAr !== void 0 && _catalogData$useEdoAr.find(function (edo) {
37717
37792
  return edo.addExtraArticle === orderline.ArticleCodex;
37718
37793
  }))) {
37719
- _context2.next = 3;
37794
+ _context3.next = 3;
37720
37795
  break;
37721
37796
  }
37722
- return _context2.abrupt("return", 1);
37797
+ return _context3.abrupt("return", 1);
37723
37798
  case 3:
37724
37799
  isPartlistExclusive = (_catalogData$getCatal = catalogData.getCatalogArticleByArticleCodex(orderline.ArticleCodex)) === null || _catalogData$getCatal === void 0 ? void 0 : _catalogData$getCatal.isPartlistExclusive;
37725
37800
  if (!orderline.IsPartlistArticle && (!isPartlistExclusive || !orderline.RelatedToBasketID)) {
@@ -37749,32 +37824,32 @@ var DivaSetHandler = /*#__PURE__*/function () {
37749
37824
  }
37750
37825
  case 5:
37751
37826
  case "end":
37752
- return _context2.stop();
37827
+ return _context3.stop();
37753
37828
  }
37754
37829
  }, _loop);
37755
37830
  });
37756
37831
  i = 0;
37757
37832
  case 9:
37758
37833
  if (!(i < orderSet.OrderLines.length)) {
37759
- _context4.next = 16;
37834
+ _context5.next = 16;
37760
37835
  break;
37761
37836
  }
37762
- return _context4.delegateYield(_loop(), "t0", 11);
37837
+ return _context5.delegateYield(_loop(), "t0", 11);
37763
37838
  case 11:
37764
- if (!_context4.t0) {
37765
- _context4.next = 13;
37839
+ if (!_context5.t0) {
37840
+ _context5.next = 13;
37766
37841
  break;
37767
37842
  }
37768
- return _context4.abrupt("continue", 13);
37843
+ return _context5.abrupt("continue", 13);
37769
37844
  case 13:
37770
37845
  i++;
37771
- _context4.next = 9;
37846
+ _context5.next = 9;
37772
37847
  break;
37773
37848
  case 16:
37774
37849
  _loop2 = /*#__PURE__*/_regeneratorRuntime.mark(function _loop2(basketId) {
37775
37850
  var article;
37776
- return _regeneratorRuntime.wrap(function _loop2$(_context3) {
37777
- while (1) switch (_context3.prev = _context3.next) {
37851
+ return _regeneratorRuntime.wrap(function _loop2$(_context4) {
37852
+ while (1) switch (_context4.prev = _context4.next) {
37778
37853
  case 0:
37779
37854
  article = toLoadArticles.find(function (a) {
37780
37855
  return a.basketId === basketId;
@@ -37784,20 +37859,20 @@ var DivaSetHandler = /*#__PURE__*/function () {
37784
37859
  }
37785
37860
  case 2:
37786
37861
  case "end":
37787
- return _context3.stop();
37862
+ return _context4.stop();
37788
37863
  }
37789
37864
  }, _loop2);
37790
37865
  });
37791
- _context4.t1 = _regeneratorRuntime.keys(previousPartlistArticles);
37866
+ _context5.t1 = _regeneratorRuntime.keys(previousPartlistArticles);
37792
37867
  case 18:
37793
- if ((_context4.t2 = _context4.t1()).done) {
37794
- _context4.next = 23;
37868
+ if ((_context5.t2 = _context5.t1()).done) {
37869
+ _context5.next = 23;
37795
37870
  break;
37796
37871
  }
37797
- basketId = _context4.t2.value;
37798
- return _context4.delegateYield(_loop2(basketId), "t3", 21);
37872
+ basketId = _context5.t2.value;
37873
+ return _context5.delegateYield(_loop2(basketId), "t3", 21);
37799
37874
  case 21:
37800
- _context4.next = 18;
37875
+ _context5.next = 18;
37801
37876
  break;
37802
37877
  case 23:
37803
37878
  //sort artices so that accessoires are loaded after their parents
@@ -37807,13 +37882,13 @@ var DivaSetHandler = /*#__PURE__*/function () {
37807
37882
  _i = 0;
37808
37883
  case 25:
37809
37884
  if (!(_i < toLoadArticles.length)) {
37810
- _context4.next = 47;
37885
+ _context5.next = 47;
37811
37886
  break;
37812
37887
  }
37813
37888
  toloadArticle = toLoadArticles[_i];
37814
37889
  catalogArticle = set.CatalogData.getCatalogArticleByArticleCodex(toloadArticle.articleCodex);
37815
37890
  if (!(!catalogArticle && toloadArticle.relatedToBasketId && !set.getSetState.onlyRunLogic)) {
37816
- _context4.next = 33;
37891
+ _context5.next = 33;
37817
37892
  break;
37818
37893
  }
37819
37894
  LOG$9.error(new DivaError('articleCodex not found in article list. Could be due to exclusivity or a bug in the application!', {
@@ -37824,22 +37899,22 @@ var DivaSetHandler = /*#__PURE__*/function () {
37824
37899
  }));
37825
37900
  _i--;
37826
37901
  toLoadArticles.splice(_i, 1);
37827
- return _context4.abrupt("continue", 44);
37902
+ return _context5.abrupt("continue", 44);
37828
37903
  case 33:
37829
- _context4.next = 35;
37904
+ _context5.next = 35;
37830
37905
  return articleHandlerInstance.loadArticle(set, toloadArticle.articleCodex, toloadArticle, true);
37831
37906
  case 35:
37832
- newArticle = _context4.sent;
37907
+ newArticle = _context5.sent;
37833
37908
  if (!newArticle) {
37834
- _context4.next = 43;
37909
+ _context5.next = 43;
37835
37910
  break;
37836
37911
  }
37837
37912
  set.addArticle(newArticle);
37838
- _context4.next = 40;
37913
+ _context5.next = 40;
37839
37914
  return articleHandlerInstance.toDoAfterArticleLoaded(newArticle, {}, toloadArticle.VariantValues, 'initializing', toloadArticle.VariantItemData, true);
37840
37915
  case 40:
37841
37916
  toLoadArticles[_i].basketId = newArticle.basketId;
37842
- _context4.next = 44;
37917
+ _context5.next = 44;
37843
37918
  break;
37844
37919
  case 43:
37845
37920
  LOG$9.error(new DivaError('articleCodex not found in article list. Could be due to exclusivity or a bug in the application!', {
@@ -37850,13 +37925,13 @@ var DivaSetHandler = /*#__PURE__*/function () {
37850
37925
  }));
37851
37926
  case 44:
37852
37927
  _i++;
37853
- _context4.next = 25;
37928
+ _context5.next = 25;
37854
37929
  break;
37855
37930
  case 47:
37856
37931
  _i2 = 0;
37857
37932
  case 48:
37858
37933
  if (!(_i2 < toLoadArticles.length)) {
37859
- _context4.next = 77;
37934
+ _context5.next = 77;
37860
37935
  break;
37861
37936
  }
37862
37937
  _newArticle = set.getArticleByBasketId(toLoadArticles[_i2].basketId);
@@ -37872,43 +37947,43 @@ var DivaSetHandler = /*#__PURE__*/function () {
37872
37947
  }
37873
37948
  //init shelfAcc on parent
37874
37949
  if (!(_newArticle !== null && _newArticle !== void 0 && _newArticle.shelfPlanner)) {
37875
- _context4.next = 74;
37950
+ _context5.next = 74;
37876
37951
  break;
37877
37952
  }
37878
37953
  if (!((_newArticle$shelfPlan = _newArticle.shelfPlanData) !== null && _newArticle$shelfPlan !== void 0 && _newArticle$shelfPlan.ShelfPlanner2)) {
37879
- _context4.next = 74;
37954
+ _context5.next = 74;
37880
37955
  break;
37881
37956
  }
37882
37957
  _i3 = 0;
37883
37958
  case 54:
37884
37959
  if (!(_i3 < _newArticle.shelfPlanData.ShelfPlanner2.length)) {
37885
- _context4.next = 74;
37960
+ _context5.next = 74;
37886
37961
  break;
37887
37962
  }
37888
37963
  cellsOfGrid = _newArticle.shelfPlanData.ShelfPlanner2[_i3];
37889
37964
  j = 0;
37890
37965
  case 57:
37891
37966
  if (!(j < cellsOfGrid.length)) {
37892
- _context4.next = 71;
37967
+ _context5.next = 71;
37893
37968
  break;
37894
37969
  }
37895
37970
  cell = cellsOfGrid[j];
37896
37971
  gridIndex = cell.gridIndex !== undefined ? cell.gridIndex : _i3;
37897
37972
  if (!(cell.inUse != -1 && j == cell.inUse)) {
37898
- _context4.next = 68;
37973
+ _context5.next = 68;
37899
37974
  break;
37900
37975
  }
37901
37976
  accessoire = set.getArticleByBasketId(cell.usedArticleData.BasketID);
37902
37977
  if (!accessoire) {
37903
- _context4.next = 68;
37978
+ _context5.next = 68;
37904
37979
  break;
37905
37980
  }
37906
37981
  doesFit = _newArticle.shelfPlanner.tryFitOnShelfOfGrid(gridIndex, j, accessoire);
37907
37982
  if (!(doesFit !== false && doesFit.type != 'doesNotFit' && doesFit.type != 'notAllowedByParentRule' && doesFit.type != 'notAllowedByAccessoireRule' && doesFit.type != 'notAllowedByMaxQuantityReached' && doesFit.index !== undefined)) {
37908
- _context4.next = 68;
37983
+ _context5.next = 68;
37909
37984
  break;
37910
37985
  }
37911
- _context4.next = 67;
37986
+ _context5.next = 67;
37912
37987
  return _newArticle.shelfPlanner.addAccessoireInCellInGrid(accessoire, gridIndex, j, doesFit.type, {
37913
37988
  noDelete: cell.noDelete,
37914
37989
  noMove: cell.noMove
@@ -37917,60 +37992,60 @@ var DivaSetHandler = /*#__PURE__*/function () {
37917
37992
  accessoire.relatedToShelfGrid = gridIndex;
37918
37993
  case 68:
37919
37994
  j++;
37920
- _context4.next = 57;
37995
+ _context5.next = 57;
37921
37996
  break;
37922
37997
  case 71:
37923
37998
  _i3++;
37924
- _context4.next = 54;
37999
+ _context5.next = 54;
37925
38000
  break;
37926
38001
  case 74:
37927
38002
  _i2++;
37928
- _context4.next = 48;
38003
+ _context5.next = 48;
37929
38004
  break;
37930
38005
  case 77:
37931
38006
  _i4 = 0;
37932
38007
  case 78:
37933
38008
  if (!(_i4 < toLoadArticles.length)) {
37934
- _context4.next = 91;
38009
+ _context5.next = 91;
37935
38010
  break;
37936
38011
  }
37937
38012
  _newArticle2 = set.getArticleByBasketId(toLoadArticles[_i4].basketId);
37938
38013
  if (_newArticle2) {
37939
- _context4.next = 82;
38014
+ _context5.next = 82;
37940
38015
  break;
37941
38016
  }
37942
- return _context4.abrupt("continue", 88);
38017
+ return _context5.abrupt("continue", 88);
37943
38018
  case 82:
37944
38019
  if (!(_newArticle2.j3D && _newArticle2.j3D.Doors && !((_newArticle2$doorPlan = _newArticle2.doorPlanner) !== null && _newArticle2$doorPlan !== void 0 && _newArticle2$doorPlan.alreadyInitialized(_newArticle2.basketId)))) {
37945
- _context4.next = 85;
38020
+ _context5.next = 85;
37946
38021
  break;
37947
38022
  }
37948
- _context4.next = 85;
38023
+ _context5.next = 85;
37949
38024
  return set.initializeDoorPlanner(_newArticle2.j3D, _newArticle2);
37950
38025
  case 85:
37951
38026
  if (!_newArticle2.doorPlanner) {
37952
- _context4.next = 88;
38027
+ _context5.next = 88;
37953
38028
  break;
37954
38029
  }
37955
38030
  _newArticle2.doorPlanner.initDoorPlanner();
37956
- return _context4.abrupt("break", 91);
38031
+ return _context5.abrupt("break", 91);
37957
38032
  case 88:
37958
38033
  _i4++;
37959
- _context4.next = 78;
38034
+ _context5.next = 78;
37960
38035
  break;
37961
38036
  case 91:
37962
38037
  set.configSingle = configTreeHandler.checkIfLoadedArticlesAreConfigSingle(set);
37963
- _context4.next = 94;
38038
+ _context5.next = 94;
37964
38039
  return this.updateArticlesOptionStatesOfActSet(set, {}, [], undefined, 'initializing');
37965
38040
  case 94:
37966
38041
  DivaUtils.endSpanOfApm('Articles initialize');
37967
38042
  case 95:
37968
38043
  case "end":
37969
- return _context4.stop();
38044
+ return _context5.stop();
37970
38045
  }
37971
- }, _callee2, this);
38046
+ }, _callee3, this);
37972
38047
  }));
37973
- function initOrderLineArticles(_x5, _x6) {
38048
+ function initOrderLineArticles(_x7, _x8) {
37974
38049
  return _initOrderLineArticles.apply(this, arguments);
37975
38050
  }
37976
38051
  return initOrderLineArticles;
@@ -37978,10 +38053,10 @@ var DivaSetHandler = /*#__PURE__*/function () {
37978
38053
  }, {
37979
38054
  key: "initSetsByOrderSet",
37980
38055
  value: function () {
37981
- var _initSetsByOrderSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(orderSets, initSetState) {
38056
+ var _initSetsByOrderSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(orderSets, initSetState) {
37982
38057
  var sets, i, orderSet, _initSetState$updateS;
37983
- return _regeneratorRuntime.wrap(function _callee3$(_context5) {
37984
- while (1) switch (_context5.prev = _context5.next) {
38058
+ return _regeneratorRuntime.wrap(function _callee4$(_context6) {
38059
+ while (1) switch (_context6.prev = _context6.next) {
37985
38060
  case 0:
37986
38061
  sets = [];
37987
38062
  if (initSetState.involvedSetIds) {
@@ -37992,7 +38067,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
37992
38067
  i = 0;
37993
38068
  case 3:
37994
38069
  if (!(i < orderSets.length)) {
37995
- _context5.next = 15;
38070
+ _context6.next = 15;
37996
38071
  break;
37997
38072
  }
37998
38073
  orderSet = orderSets[i];
@@ -38003,28 +38078,28 @@ var DivaSetHandler = /*#__PURE__*/function () {
38003
38078
  }
38004
38079
  }
38005
38080
  if (!(!initSetState.specificSetIdToLoad || initSetState.specificSetIdToLoad == orderSets[i].SetID)) {
38006
- _context5.next = 12;
38081
+ _context6.next = 12;
38007
38082
  break;
38008
38083
  }
38009
- _context5.t0 = sets;
38010
- _context5.next = 10;
38084
+ _context6.t0 = sets;
38085
+ _context6.next = 10;
38011
38086
  return this.initSet(orderSets[i], initSetState, initSetState.updateSetImage, this.getOrderSetShouldInitPlanner(orderSets, i));
38012
38087
  case 10:
38013
- _context5.t1 = _context5.sent;
38014
- _context5.t0.push.call(_context5.t0, _context5.t1);
38088
+ _context6.t1 = _context6.sent;
38089
+ _context6.t0.push.call(_context6.t0, _context6.t1);
38015
38090
  case 12:
38016
38091
  i++;
38017
- _context5.next = 3;
38092
+ _context6.next = 3;
38018
38093
  break;
38019
38094
  case 15:
38020
- return _context5.abrupt("return", sets);
38095
+ return _context6.abrupt("return", sets);
38021
38096
  case 16:
38022
38097
  case "end":
38023
- return _context5.stop();
38098
+ return _context6.stop();
38024
38099
  }
38025
- }, _callee3, this);
38100
+ }, _callee4, this);
38026
38101
  }));
38027
- function initSetsByOrderSet(_x7, _x8) {
38102
+ function initSetsByOrderSet(_x9, _x10) {
38028
38103
  return _initSetsByOrderSet.apply(this, arguments);
38029
38104
  }
38030
38105
  return initSetsByOrderSet;
@@ -38085,25 +38160,25 @@ var DivaSetHandler = /*#__PURE__*/function () {
38085
38160
  }, {
38086
38161
  key: "initSet",
38087
38162
  value: function () {
38088
- var _initSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(orderSet, initSetState, updateSetImage, lastSetToInitialize) {
38089
- var _orderSet$OrderLines, _initSetState$article;
38163
+ var _initSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5(orderSet, initSetState, updateSetImage, lastSetToInitialize) {
38164
+ var _orderSet$OrderLines2, _initSetState$article;
38090
38165
  var catalogData, articlesToInitialize, set, params, j, _initSetState$initVar, _catalogData$promoted, variantValues, image;
38091
- return _regeneratorRuntime.wrap(function _callee4$(_context6) {
38092
- while (1) switch (_context6.prev = _context6.next) {
38166
+ return _regeneratorRuntime.wrap(function _callee5$(_context7) {
38167
+ while (1) switch (_context7.prev = _context7.next) {
38093
38168
  case 0:
38094
38169
  LOG$9.debug('DivaSetHandler.initSetsByBasketData: ' + orderSet.SetID);
38095
- _context6.next = 3;
38170
+ _context7.next = 3;
38096
38171
  return catalogHandlerInstance.getCatalogData(initSetState, orderSet.ModelCatalogCodex ? orderSet.ModelCatalogCodex : orderSet.CatalogCodex, orderSet);
38097
38172
  case 3:
38098
- catalogData = _context6.sent;
38099
- articlesToInitialize = !((_orderSet$OrderLines = orderSet.OrderLines) !== null && _orderSet$OrderLines !== void 0 && _orderSet$OrderLines.length) ? (_initSetState$article = initSetState.articlesToInitialize) !== null && _initSetState$article !== void 0 ? _initSetState$article : catalogData.startPlannerArticle : undefined;
38173
+ catalogData = _context7.sent;
38174
+ articlesToInitialize = !((_orderSet$OrderLines2 = orderSet.OrderLines) !== null && _orderSet$OrderLines2 !== void 0 && _orderSet$OrderLines2.length) ? (_initSetState$article = initSetState.articlesToInitialize) !== null && _initSetState$article !== void 0 ? _initSetState$article : catalogData.startPlannerArticle : undefined;
38100
38175
  catalogData.checkIfUseBoxPlanner(articlesToInitialize !== null && articlesToInitialize !== void 0 ? articlesToInitialize : orderSet.OrderLines.map(function (o) {
38101
38176
  return o.ArticleCodex;
38102
38177
  }));
38103
- _context6.next = 8;
38178
+ _context7.next = 8;
38104
38179
  return this.createSet(catalogData, orderSet, initSetState, lastSetToInitialize);
38105
38180
  case 8:
38106
- set = _context6.sent;
38181
+ set = _context7.sent;
38107
38182
  if (set.api.getLoadSupplierColors() && initSetState.supplierColors) {
38108
38183
  set.supplierColors = initSetState.supplierColors;
38109
38184
  }
@@ -38121,24 +38196,24 @@ var DivaSetHandler = /*#__PURE__*/function () {
38121
38196
  }
38122
38197
  }
38123
38198
  if (!(articlesToInitialize && articlesToInitialize.length > 0)) {
38124
- _context6.next = 24;
38199
+ _context7.next = 24;
38125
38200
  break;
38126
38201
  }
38127
38202
  DivaUtils.startSpanOfApm('Articles initialize');
38128
38203
  j = 0;
38129
38204
  case 15:
38130
38205
  if (!(j < articlesToInitialize.length)) {
38131
- _context6.next = 22;
38206
+ _context7.next = 22;
38132
38207
  break;
38133
38208
  }
38134
38209
  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;
38135
- _context6.next = 19;
38210
+ _context7.next = 19;
38136
38211
  return this.addPlannerElement(set, articlesToInitialize[j], _objectSpread$a(_objectSpread$a({}, params), variantValues ? {
38137
38212
  variantValues: variantValues
38138
38213
  } : {}));
38139
38214
  case 19:
38140
38215
  j++;
38141
- _context6.next = 15;
38216
+ _context7.next = 15;
38142
38217
  break;
38143
38218
  case 22:
38144
38219
  //display image of article if there is no planner
@@ -38148,14 +38223,14 @@ var DivaSetHandler = /*#__PURE__*/function () {
38148
38223
  }
38149
38224
  DivaUtils.endSpanOfApm('Articles initialize');
38150
38225
  case 24:
38151
- return _context6.abrupt("return", set);
38226
+ return _context7.abrupt("return", set);
38152
38227
  case 25:
38153
38228
  case "end":
38154
- return _context6.stop();
38229
+ return _context7.stop();
38155
38230
  }
38156
- }, _callee4, this);
38231
+ }, _callee5, this);
38157
38232
  }));
38158
- function initSet(_x9, _x10, _x11, _x12) {
38233
+ function initSet(_x11, _x12, _x13, _x14) {
38159
38234
  return _initSet.apply(this, arguments);
38160
38235
  }
38161
38236
  return initSet;
@@ -38167,10 +38242,10 @@ var DivaSetHandler = /*#__PURE__*/function () {
38167
38242
  }, {
38168
38243
  key: "destroyPlannerHandler",
38169
38244
  value: (function () {
38170
- var _destroyPlannerHandler = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5(set, doDestroy3DHostConnection) {
38245
+ var _destroyPlannerHandler = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee6(set, doDestroy3DHostConnection) {
38171
38246
  var result;
38172
- return _regeneratorRuntime.wrap(function _callee5$(_context7) {
38173
- while (1) switch (_context7.prev = _context7.next) {
38247
+ return _regeneratorRuntime.wrap(function _callee6$(_context8) {
38248
+ while (1) switch (_context8.prev = _context8.next) {
38174
38249
  case 0:
38175
38250
  result = set.plannerHandler.destroyAllPlanner();
38176
38251
  if (result) {
@@ -38183,11 +38258,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
38183
38258
  }
38184
38259
  case 2:
38185
38260
  case "end":
38186
- return _context7.stop();
38261
+ return _context8.stop();
38187
38262
  }
38188
- }, _callee5);
38263
+ }, _callee6);
38189
38264
  }));
38190
- function destroyPlannerHandler(_x13, _x14) {
38265
+ function destroyPlannerHandler(_x15, _x16) {
38191
38266
  return _destroyPlannerHandler.apply(this, arguments);
38192
38267
  }
38193
38268
  return destroyPlannerHandler;
@@ -38212,37 +38287,37 @@ var DivaSetHandler = /*#__PURE__*/function () {
38212
38287
  }, {
38213
38288
  key: "addPlannerElement",
38214
38289
  value: (function () {
38215
- var _addPlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee6(set, artCodex, initParams, from) {
38290
+ var _addPlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee7(set, artCodex, initParams, from) {
38216
38291
  var newArticle, plannerElement, _set$getArticleByBask;
38217
- return _regeneratorRuntime.wrap(function _callee6$(_context8) {
38218
- while (1) switch (_context8.prev = _context8.next) {
38292
+ return _regeneratorRuntime.wrap(function _callee7$(_context9) {
38293
+ while (1) switch (_context9.prev = _context9.next) {
38219
38294
  case 0:
38220
- _context8.next = 2;
38295
+ _context9.next = 2;
38221
38296
  return this.addArticleToActSet(set, artCodex, initParams, undefined, from);
38222
38297
  case 2:
38223
- newArticle = _context8.sent;
38224
- _context8.next = 5;
38298
+ newArticle = _context9.sent;
38299
+ _context9.next = 5;
38225
38300
  return set.plannerHandler.addPlannerElement(set.getSetId(), newArticle.basketId, initParams);
38226
38301
  case 5:
38227
- plannerElement = _context8.sent;
38302
+ plannerElement = _context9.sent;
38228
38303
  if (!(set.CatalogData.reconfigAfterArticleDocked || !!newArticle.getArticleOptionState('OPTLASTSTACKEDARTICLE'))) {
38229
- _context8.next = 9;
38304
+ _context9.next = 9;
38230
38305
  break;
38231
38306
  }
38232
- _context8.next = 9;
38307
+ _context9.next = 9;
38233
38308
  return this.updateArticlesOptionStatesOfActSet(set, {}, []);
38234
38309
  case 9:
38235
38310
  if (newArticle.relatedToBasketId && plannerElement) {
38236
38311
  (_set$getArticleByBask = set.getArticleByBasketId(newArticle.relatedToBasketId)) === null || _set$getArticleByBask === void 0 || _set$getArticleByBask.addPlannerDataAccessoire(plannerElement);
38237
38312
  }
38238
- return _context8.abrupt("return", newArticle);
38313
+ return _context9.abrupt("return", newArticle);
38239
38314
  case 11:
38240
38315
  case "end":
38241
- return _context8.stop();
38316
+ return _context9.stop();
38242
38317
  }
38243
- }, _callee6, this);
38318
+ }, _callee7, this);
38244
38319
  }));
38245
- function addPlannerElement(_x15, _x16, _x17, _x18) {
38320
+ function addPlannerElement(_x17, _x18, _x19, _x20) {
38246
38321
  return _addPlannerElement.apply(this, arguments);
38247
38322
  }
38248
38323
  return addPlannerElement;
@@ -38261,19 +38336,19 @@ var DivaSetHandler = /*#__PURE__*/function () {
38261
38336
  }, {
38262
38337
  key: "movePlannerElement",
38263
38338
  value: (function () {
38264
- var _movePlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee7(set, elementId, absoluteMoveIndex) {
38265
- return _regeneratorRuntime.wrap(function _callee7$(_context9) {
38266
- while (1) switch (_context9.prev = _context9.next) {
38339
+ var _movePlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee8(set, elementId, absoluteMoveIndex) {
38340
+ return _regeneratorRuntime.wrap(function _callee8$(_context10) {
38341
+ while (1) switch (_context10.prev = _context10.next) {
38267
38342
  case 0:
38268
- _context9.next = 2;
38343
+ _context10.next = 2;
38269
38344
  return set.plannerHandler.movePlannerElements(set.getSetId(), elementId, absoluteMoveIndex);
38270
38345
  case 2:
38271
38346
  case "end":
38272
- return _context9.stop();
38347
+ return _context10.stop();
38273
38348
  }
38274
- }, _callee7);
38349
+ }, _callee8);
38275
38350
  }));
38276
- function movePlannerElement(_x19, _x20, _x21) {
38351
+ function movePlannerElement(_x21, _x22, _x23) {
38277
38352
  return _movePlannerElement.apply(this, arguments);
38278
38353
  }
38279
38354
  return movePlannerElement;
@@ -38292,10 +38367,10 @@ var DivaSetHandler = /*#__PURE__*/function () {
38292
38367
  }, {
38293
38368
  key: "copyPlannerElement",
38294
38369
  value: (function () {
38295
- var _copyPlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee8(set, elementId, copyInfo) {
38370
+ var _copyPlannerElement = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee9(set, elementId, copyInfo) {
38296
38371
  var allElementsToCopy, articleCopyRelation, newSelectedArticle, i, newArticle;
38297
- return _regeneratorRuntime.wrap(function _callee8$(_context10) {
38298
- while (1) switch (_context10.prev = _context10.next) {
38372
+ return _regeneratorRuntime.wrap(function _callee9$(_context11) {
38373
+ while (1) switch (_context11.prev = _context11.next) {
38299
38374
  case 0:
38300
38375
  allElementsToCopy = set.plannerHandler.getPlannerElementsInfluencedByCopy(set.getSetId(), elementId, copyInfo);
38301
38376
  articleCopyRelation = []; // array because can be multiple times the same obj
@@ -38303,13 +38378,13 @@ var DivaSetHandler = /*#__PURE__*/function () {
38303
38378
  i = 0;
38304
38379
  case 4:
38305
38380
  if (!(i < allElementsToCopy.length)) {
38306
- _context10.next = 13;
38381
+ _context11.next = 13;
38307
38382
  break;
38308
38383
  }
38309
- _context10.next = 7;
38384
+ _context11.next = 7;
38310
38385
  return this.copyArticleByElementId(set, allElementsToCopy[i]);
38311
38386
  case 7:
38312
- newArticle = _context10.sent;
38387
+ newArticle = _context11.sent;
38313
38388
  if (newSelectedArticle == undefined) newSelectedArticle = newArticle;
38314
38389
  articleCopyRelation.push({
38315
38390
  key: allElementsToCopy[i],
@@ -38317,20 +38392,20 @@ var DivaSetHandler = /*#__PURE__*/function () {
38317
38392
  });
38318
38393
  case 10:
38319
38394
  i++;
38320
- _context10.next = 4;
38395
+ _context11.next = 4;
38321
38396
  break;
38322
38397
  case 13:
38323
- _context10.next = 15;
38398
+ _context11.next = 15;
38324
38399
  return set.plannerHandler.copyPlannerElements(set.getSetId(), articleCopyRelation, copyInfo);
38325
38400
  case 15:
38326
- return _context10.abrupt("return", newSelectedArticle);
38401
+ return _context11.abrupt("return", newSelectedArticle);
38327
38402
  case 16:
38328
38403
  case "end":
38329
- return _context10.stop();
38404
+ return _context11.stop();
38330
38405
  }
38331
- }, _callee8, this);
38406
+ }, _callee9, this);
38332
38407
  }));
38333
- function copyPlannerElement(_x22, _x23, _x24) {
38408
+ function copyPlannerElement(_x24, _x25, _x26) {
38334
38409
  return _copyPlannerElement.apply(this, arguments);
38335
38410
  }
38336
38411
  return copyPlannerElement;
@@ -38390,28 +38465,28 @@ var DivaSetHandler = /*#__PURE__*/function () {
38390
38465
  }, {
38391
38466
  key: "copyArticleByElementId",
38392
38467
  value: (function () {
38393
- var _copyArticleByElementId = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee9(set, elementId, ignoreOptionsToCopy) {
38468
+ var _copyArticleByElementId = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee10(set, elementId, ignoreOptionsToCopy) {
38394
38469
  var origArticle, variantValuesToCopy, i, newArticle;
38395
- return _regeneratorRuntime.wrap(function _callee9$(_context11) {
38396
- while (1) switch (_context11.prev = _context11.next) {
38470
+ return _regeneratorRuntime.wrap(function _callee10$(_context12) {
38471
+ while (1) switch (_context12.prev = _context12.next) {
38397
38472
  case 0:
38398
38473
  origArticle = set.getArticleByElementId(elementId);
38399
38474
  variantValuesToCopy = origArticle.VariantValues;
38400
38475
  if (ignoreOptionsToCopy !== null && ignoreOptionsToCopy !== void 0 && ignoreOptionsToCopy.length) for (i = 0; i < ignoreOptionsToCopy.length; i++) variantValuesToCopy[ignoreOptionsToCopy[i]] = '';
38401
- _context11.next = 5;
38476
+ _context12.next = 5;
38402
38477
  return this.addArticleToActSet(set, set.getArticleCodex(elementId), {
38403
38478
  variantValues: variantValuesToCopy
38404
38479
  }, true);
38405
38480
  case 5:
38406
- newArticle = _context11.sent;
38407
- return _context11.abrupt("return", newArticle);
38481
+ newArticle = _context12.sent;
38482
+ return _context12.abrupt("return", newArticle);
38408
38483
  case 7:
38409
38484
  case "end":
38410
- return _context11.stop();
38485
+ return _context12.stop();
38411
38486
  }
38412
- }, _callee9, this);
38487
+ }, _callee10, this);
38413
38488
  }));
38414
- function copyArticleByElementId(_x25, _x26, _x27) {
38489
+ function copyArticleByElementId(_x27, _x28, _x29) {
38415
38490
  return _copyArticleByElementId.apply(this, arguments);
38416
38491
  }
38417
38492
  return copyArticleByElementId;
@@ -38419,22 +38494,22 @@ var DivaSetHandler = /*#__PURE__*/function () {
38419
38494
  }, {
38420
38495
  key: "resetArticle",
38421
38496
  value: function () {
38422
- var _resetArticle = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee10(set, basketId) {
38497
+ var _resetArticle = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee11(set, basketId) {
38423
38498
  var article;
38424
- return _regeneratorRuntime.wrap(function _callee10$(_context12) {
38425
- while (1) switch (_context12.prev = _context12.next) {
38499
+ return _regeneratorRuntime.wrap(function _callee11$(_context13) {
38500
+ while (1) switch (_context13.prev = _context13.next) {
38426
38501
  case 0:
38427
38502
  article = set.getDivaArticles()[basketId];
38428
38503
  article.clearArticleOptionStates();
38429
- _context12.next = 4;
38504
+ _context13.next = 4;
38430
38505
  return articleHandlerInstance.toDoAfterArticleLoaded(article, {}, {}, 'initializing');
38431
38506
  case 4:
38432
38507
  case "end":
38433
- return _context12.stop();
38508
+ return _context13.stop();
38434
38509
  }
38435
- }, _callee10);
38510
+ }, _callee11);
38436
38511
  }));
38437
- function resetArticle(_x28, _x29) {
38512
+ function resetArticle(_x30, _x31) {
38438
38513
  return _resetArticle.apply(this, arguments);
38439
38514
  }
38440
38515
  return resetArticle;
@@ -38442,7 +38517,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
38442
38517
  }, {
38443
38518
  key: "addArticleToActSet",
38444
38519
  value: function () {
38445
- var _addArticleToActSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee11(set, articleCodex, initParams, ignorePlanner) {
38520
+ var _addArticleToActSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee12(set, articleCodex, initParams, ignorePlanner) {
38446
38521
  var from,
38447
38522
  newArticle,
38448
38523
  _set$getArticleByBask2,
@@ -38452,17 +38527,17 @@ var DivaSetHandler = /*#__PURE__*/function () {
38452
38527
  _newArticle$catalogAr,
38453
38528
  rule,
38454
38529
  value,
38455
- _args13 = arguments;
38456
- return _regeneratorRuntime.wrap(function _callee11$(_context13) {
38457
- while (1) switch (_context13.prev = _context13.next) {
38530
+ _args14 = arguments;
38531
+ return _regeneratorRuntime.wrap(function _callee12$(_context14) {
38532
+ while (1) switch (_context14.prev = _context14.next) {
38458
38533
  case 0:
38459
- from = _args13.length > 4 && _args13[4] !== undefined ? _args13[4] : 'initializing';
38460
- _context13.next = 3;
38534
+ from = _args14.length > 4 && _args14[4] !== undefined ? _args14[4] : 'initializing';
38535
+ _context14.next = 3;
38461
38536
  return articleHandlerInstance.loadArticle(set, articleCodex, initParams);
38462
38537
  case 3:
38463
- newArticle = _context13.sent;
38538
+ newArticle = _context14.sent;
38464
38539
  if (newArticle) {
38465
- _context13.next = 6;
38540
+ _context14.next = 6;
38466
38541
  break;
38467
38542
  }
38468
38543
  throw new Error("articleCodex '" + articleCodex + "' not found in article list. Could be due to exclusivity or a bug in the application!");
@@ -38492,11 +38567,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
38492
38567
  }
38493
38568
  }
38494
38569
  if (!(from !== 'toDeleteShelf')) {
38495
- _context13.next = 15;
38570
+ _context14.next = 15;
38496
38571
  break;
38497
38572
  }
38498
38573
  set.addArticle(newArticle);
38499
- _context13.next = 15;
38574
+ _context14.next = 15;
38500
38575
  return articleHandlerInstance.toDoAfterArticleLoaded(newArticle, defaultHeaderValues, {}, from, undefined, ignorePlanner);
38501
38576
  case 15:
38502
38577
  if (newArticle.relatedToBasketId) {
@@ -38514,14 +38589,14 @@ var DivaSetHandler = /*#__PURE__*/function () {
38514
38589
  }
38515
38590
  });
38516
38591
  }
38517
- return _context13.abrupt("return", newArticle);
38592
+ return _context14.abrupt("return", newArticle);
38518
38593
  case 17:
38519
38594
  case "end":
38520
- return _context13.stop();
38595
+ return _context14.stop();
38521
38596
  }
38522
- }, _callee11);
38597
+ }, _callee12);
38523
38598
  }));
38524
- function addArticleToActSet(_x30, _x31, _x32, _x33) {
38599
+ function addArticleToActSet(_x32, _x33, _x34, _x35) {
38525
38600
  return _addArticleToActSet.apply(this, arguments);
38526
38601
  }
38527
38602
  return addArticleToActSet;
@@ -38529,10 +38604,10 @@ var DivaSetHandler = /*#__PURE__*/function () {
38529
38604
  }, {
38530
38605
  key: "updateAccessoireQuantity",
38531
38606
  value: function () {
38532
- var _updateAccessoireQuantity = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee12(set, accessoireItem, relatedToBasketId, nQuantity, forceConfigSingle) {
38607
+ var _updateAccessoireQuantity = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee13(set, accessoireItem, relatedToBasketId, nQuantity, forceConfigSingle) {
38533
38608
  var changed3D, somethingChanged, articleCodex, parentArticle, configSingle, _accessoire$quantity, _accessoire, accessoire, curQuantity, delta, newQuantity;
38534
- return _regeneratorRuntime.wrap(function _callee12$(_context14) {
38535
- while (1) switch (_context14.prev = _context14.next) {
38609
+ return _regeneratorRuntime.wrap(function _callee13$(_context15) {
38610
+ while (1) switch (_context15.prev = _context15.next) {
38536
38611
  case 0:
38537
38612
  //Falls das Accessoire bereits existiert nur die Quantity Updaten. Ansonsten das Accessoire neu laden.
38538
38613
  //Falls die Neue Quantity == 0 ist muss es gelöscht werden
@@ -38542,7 +38617,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
38542
38617
  parentArticle = set.getArticleByBasketId(relatedToBasketId);
38543
38618
  configSingle = forceConfigSingle || set.CatalogData.forceConfigAllAccessoires;
38544
38619
  if (!parentArticle) {
38545
- _context14.next = 29;
38620
+ _context15.next = 29;
38546
38621
  break;
38547
38622
  }
38548
38623
  accessoire = parentArticle.getAccessoireByArticleCodex(articleCodex)[0];
@@ -38550,25 +38625,25 @@ var DivaSetHandler = /*#__PURE__*/function () {
38550
38625
  delta = nQuantity - curQuantity;
38551
38626
  newQuantity = !configSingle ? delta : nQuantity;
38552
38627
  if (!(delta + ((_accessoire$quantity = (_accessoire = accessoire) === null || _accessoire === void 0 ? void 0 : _accessoire.quantity) !== null && _accessoire$quantity !== void 0 ? _accessoire$quantity : 0) > 0)) {
38553
- _context14.next = 24;
38628
+ _context15.next = 24;
38554
38629
  break;
38555
38630
  }
38556
38631
  if (!(accessoire == undefined || !configSingle)) {
38557
- _context14.next = 17;
38632
+ _context15.next = 17;
38558
38633
  break;
38559
38634
  }
38560
- _context14.next = 14;
38635
+ _context15.next = 14;
38561
38636
  return this.addArticleToActSet(set, articleCodex, {
38562
38637
  quantity: newQuantity,
38563
38638
  relatedToBasketId: relatedToBasketId,
38564
38639
  notDocking: true
38565
38640
  });
38566
38641
  case 14:
38567
- accessoire = _context14.sent;
38568
- _context14.next = 19;
38642
+ accessoire = _context15.sent;
38643
+ _context15.next = 19;
38569
38644
  break;
38570
38645
  case 17:
38571
- _context14.next = 19;
38646
+ _context15.next = 19;
38572
38647
  return articleHandlerInstance.updateAccessoireQuantity(accessoire, newQuantity);
38573
38648
  case 19:
38574
38649
  if (accessoireItem.isVisualized && !accessoireItem.isPlannerElement) {
@@ -38577,11 +38652,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
38577
38652
  }
38578
38653
  set.giveAccNewPosNrByBasketId(set.getBaseParentArticleOfAccessoire(relatedToBasketId).basketId);
38579
38654
  somethingChanged = true;
38580
- _context14.next = 29;
38655
+ _context15.next = 29;
38581
38656
  break;
38582
38657
  case 24:
38583
38658
  if (!(delta < 0 && accessoire != undefined)) {
38584
- _context14.next = 29;
38659
+ _context15.next = 29;
38585
38660
  break;
38586
38661
  }
38587
38662
  if (accessoireItem.isVisualized && !accessoireItem.isPlannerElement) {
@@ -38589,20 +38664,20 @@ var DivaSetHandler = /*#__PURE__*/function () {
38589
38664
  changed3D = true;
38590
38665
  }
38591
38666
  somethingChanged = true;
38592
- _context14.next = 29;
38667
+ _context15.next = 29;
38593
38668
  return this.deleteElementFromSet(set, accessoire);
38594
38669
  case 29:
38595
- return _context14.abrupt("return", {
38670
+ return _context15.abrupt("return", {
38596
38671
  somethingChanged: somethingChanged,
38597
38672
  changed3D: changed3D
38598
38673
  });
38599
38674
  case 30:
38600
38675
  case "end":
38601
- return _context14.stop();
38676
+ return _context15.stop();
38602
38677
  }
38603
- }, _callee12, this);
38678
+ }, _callee13, this);
38604
38679
  }));
38605
- function updateAccessoireQuantity(_x34, _x35, _x36, _x37, _x38) {
38680
+ function updateAccessoireQuantity(_x36, _x37, _x38, _x39, _x40) {
38606
38681
  return _updateAccessoireQuantity.apply(this, arguments);
38607
38682
  }
38608
38683
  return updateAccessoireQuantity;
@@ -38610,36 +38685,36 @@ var DivaSetHandler = /*#__PURE__*/function () {
38610
38685
  }, {
38611
38686
  key: "deleteElementFromSetByElemId",
38612
38687
  value: function () {
38613
- var _deleteElementFromSetByElemId = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee13(set, elementId, autoCorrectAVL_AVR, deletionType) {
38688
+ var _deleteElementFromSetByElemId = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee14(set, elementId, autoCorrectAVL_AVR, deletionType) {
38614
38689
  var article;
38615
- return _regeneratorRuntime.wrap(function _callee13$(_context15) {
38616
- while (1) switch (_context15.prev = _context15.next) {
38690
+ return _regeneratorRuntime.wrap(function _callee14$(_context16) {
38691
+ while (1) switch (_context16.prev = _context16.next) {
38617
38692
  case 0:
38618
38693
  if (!set) {
38619
- _context15.next = 6;
38694
+ _context16.next = 6;
38620
38695
  break;
38621
38696
  }
38622
38697
  article = set.getArticleByElementId(elementId);
38623
38698
  if (!article) {
38624
- _context15.next = 6;
38699
+ _context16.next = 6;
38625
38700
  break;
38626
38701
  }
38627
- _context15.next = 5;
38702
+ _context16.next = 5;
38628
38703
  return this.deleteElementFromSet(set, article, autoCorrectAVL_AVR, deletionType);
38629
38704
  case 5:
38630
- return _context15.abrupt("return", _context15.sent);
38705
+ return _context16.abrupt("return", _context16.sent);
38631
38706
  case 6:
38632
- return _context15.abrupt("return", {
38707
+ return _context16.abrupt("return", {
38633
38708
  success: false,
38634
38709
  setId: set.getSetId()
38635
38710
  });
38636
38711
  case 7:
38637
38712
  case "end":
38638
- return _context15.stop();
38713
+ return _context16.stop();
38639
38714
  }
38640
- }, _callee13, this);
38715
+ }, _callee14, this);
38641
38716
  }));
38642
- function deleteElementFromSetByElemId(_x39, _x40, _x41, _x42) {
38717
+ function deleteElementFromSetByElemId(_x41, _x42, _x43, _x44) {
38643
38718
  return _deleteElementFromSetByElemId.apply(this, arguments);
38644
38719
  }
38645
38720
  return deleteElementFromSetByElemId;
@@ -38647,18 +38722,18 @@ var DivaSetHandler = /*#__PURE__*/function () {
38647
38722
  }, {
38648
38723
  key: "deleteElementFromSet",
38649
38724
  value: function () {
38650
- var _deleteElementFromSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee14(set, article, autoCorrectAVL_AVR, deletionType, dontReload, dontCheckInfluencedPlannerElements) {
38725
+ var _deleteElementFromSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee15(set, article, autoCorrectAVL_AVR, deletionType, dontReload, dontCheckInfluencedPlannerElements) {
38651
38726
  var _deletedArticle$doorP, _set$CatalogData;
38652
38727
  var setId, success, newSelectedElement, allElementsToDelete, i, art, deletedArticle, articles, key, oldTransform, result, _set$getArticleByBask3;
38653
- return _regeneratorRuntime.wrap(function _callee14$(_context16) {
38654
- while (1) switch (_context16.prev = _context16.next) {
38728
+ return _regeneratorRuntime.wrap(function _callee15$(_context17) {
38729
+ while (1) switch (_context17.prev = _context17.next) {
38655
38730
  case 0:
38656
38731
  setId = set.getSetId();
38657
38732
  if (!(set == undefined)) {
38658
- _context16.next = 3;
38733
+ _context17.next = 3;
38659
38734
  break;
38660
38735
  }
38661
- return _context16.abrupt("return", {
38736
+ return _context17.abrupt("return", {
38662
38737
  success: false,
38663
38738
  selectElementId: undefined,
38664
38739
  setId: setId
@@ -38667,49 +38742,49 @@ var DivaSetHandler = /*#__PURE__*/function () {
38667
38742
  success = false;
38668
38743
  newSelectedElement = undefined;
38669
38744
  if (dontCheckInfluencedPlannerElements) {
38670
- _context16.next = 15;
38745
+ _context17.next = 15;
38671
38746
  break;
38672
38747
  }
38673
38748
  allElementsToDelete = set.plannerHandler.getPlannerElementsInfluencedByDeletion(setId, article.elementId, deletionType);
38674
38749
  i = 0;
38675
38750
  case 8:
38676
38751
  if (!(i < allElementsToDelete.length)) {
38677
- _context16.next = 15;
38752
+ _context17.next = 15;
38678
38753
  break;
38679
38754
  }
38680
38755
  art = set.getArticleByElementId(allElementsToDelete[i]);
38681
- _context16.next = 12;
38756
+ _context17.next = 12;
38682
38757
  return this.deleteElementFromSet(set, art, undefined, 'STD_DONTUPDATE', true, true);
38683
38758
  case 12:
38684
38759
  i++;
38685
- _context16.next = 8;
38760
+ _context17.next = 8;
38686
38761
  break;
38687
38762
  case 15:
38688
38763
  deletedArticle = article; //accessoires löschen
38689
38764
  articles = set.getAccessoiresOfBasketId(article.basketId);
38690
- _context16.t0 = _regeneratorRuntime.keys(articles);
38765
+ _context17.t0 = _regeneratorRuntime.keys(articles);
38691
38766
  case 18:
38692
- if ((_context16.t1 = _context16.t0()).done) {
38693
- _context16.next = 24;
38767
+ if ((_context17.t1 = _context17.t0()).done) {
38768
+ _context17.next = 24;
38694
38769
  break;
38695
38770
  }
38696
- key = _context16.t1.value;
38697
- _context16.next = 22;
38771
+ key = _context17.t1.value;
38772
+ _context17.next = 22;
38698
38773
  return this.deleteElementFromSet(set, articles[key], undefined, undefined, true);
38699
38774
  case 22:
38700
- _context16.next = 18;
38775
+ _context17.next = 18;
38701
38776
  break;
38702
38777
  case 24:
38703
38778
  oldTransform = undefined;
38704
38779
  if (deletedArticle) deletedArticle.deleted = true;
38705
38780
  if (!(deletedArticle !== null && deletedArticle !== void 0 && deletedArticle.hasCatalogPlannerArticle)) {
38706
- _context16.next = 32;
38781
+ _context17.next = 32;
38707
38782
  break;
38708
38783
  }
38709
- _context16.next = 29;
38784
+ _context17.next = 29;
38710
38785
  return set.plannerHandler.deletePlannerElement(setId, deletedArticle.elementId, autoCorrectAVL_AVR, deletionType);
38711
38786
  case 29:
38712
- result = _context16.sent;
38787
+ result = _context17.sent;
38713
38788
  newSelectedElement = result.newElementToSelect;
38714
38789
  oldTransform = result.transform;
38715
38790
  case 32:
@@ -38722,13 +38797,13 @@ var DivaSetHandler = /*#__PURE__*/function () {
38722
38797
  deletedArticle === null || deletedArticle === void 0 || (_deletedArticle$doorP = deletedArticle.doorPlanner) === null || _deletedArticle$doorP === void 0 || _deletedArticle$doorP.deleteElement(deletedArticle.basketId);
38723
38798
  success = set.deleteArticle(article.basketId);
38724
38799
  if (!((set.CatalogData.bundleRules || set.CatalogData.reconfigAfterArticleDocked || set !== null && set !== void 0 && (_set$CatalogData = set.CatalogData) !== null && _set$CatalogData !== void 0 && _set$CatalogData.getOption('OPTLASTSTACKEDARTICLE')) && !dontReload)) {
38725
- _context16.next = 38;
38800
+ _context17.next = 38;
38726
38801
  break;
38727
38802
  }
38728
- _context16.next = 38;
38803
+ _context17.next = 38;
38729
38804
  return this.updateArticlesOptionStatesOfActSet(set, {}, []);
38730
38805
  case 38:
38731
- return _context16.abrupt("return", {
38806
+ return _context17.abrupt("return", {
38732
38807
  success: success,
38733
38808
  selectElementId: newSelectedElement,
38734
38809
  setId: setId,
@@ -38736,11 +38811,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
38736
38811
  });
38737
38812
  case 39:
38738
38813
  case "end":
38739
- return _context16.stop();
38814
+ return _context17.stop();
38740
38815
  }
38741
- }, _callee14, this);
38816
+ }, _callee15, this);
38742
38817
  }));
38743
- function deleteElementFromSet(_x43, _x44, _x45, _x46, _x47, _x48) {
38818
+ function deleteElementFromSet(_x45, _x46, _x47, _x48, _x49, _x50) {
38744
38819
  return _deleteElementFromSet.apply(this, arguments);
38745
38820
  }
38746
38821
  return deleteElementFromSet;
@@ -38748,22 +38823,22 @@ var DivaSetHandler = /*#__PURE__*/function () {
38748
38823
  }, {
38749
38824
  key: "addAccessorieOnShelfPlanner",
38750
38825
  value: function () {
38751
- var _addAccessorieOnShelfPlanner = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee15(set, gridIndex, cellIndex, parentBasketId, params) {
38826
+ var _addAccessorieOnShelfPlanner = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee16(set, gridIndex, cellIndex, parentBasketId, params) {
38752
38827
  var parentArticle, articleCodex, accessoire, doesFit;
38753
- return _regeneratorRuntime.wrap(function _callee15$(_context17) {
38754
- while (1) switch (_context17.prev = _context17.next) {
38828
+ return _regeneratorRuntime.wrap(function _callee16$(_context18) {
38829
+ while (1) switch (_context18.prev = _context18.next) {
38755
38830
  case 0:
38756
38831
  parentArticle = set.getArticleByBasketId(parentBasketId);
38757
38832
  if (!(parentArticle !== null && parentArticle !== void 0 && parentArticle.shelfPlanner)) {
38758
- _context17.next = 24;
38833
+ _context18.next = 24;
38759
38834
  break;
38760
38835
  }
38761
38836
  articleCodex = parentArticle.shelfPlanner.getActAccessoireOfGrid(gridIndex);
38762
38837
  if (!articleCodex) {
38763
- _context17.next = 24;
38838
+ _context18.next = 24;
38764
38839
  break;
38765
38840
  }
38766
- _context17.next = 6;
38841
+ _context18.next = 6;
38767
38842
  return this.addArticleToActSet(set, articleCodex, {
38768
38843
  relatedToBasketId: parentBasketId,
38769
38844
  relatedToShelf: parentBasketId,
@@ -38771,52 +38846,52 @@ var DivaSetHandler = /*#__PURE__*/function () {
38771
38846
  partlistCodexToInit: params === null || params === void 0 ? void 0 : params.partlistCodexToInit
38772
38847
  });
38773
38848
  case 6:
38774
- accessoire = _context17.sent;
38849
+ accessoire = _context18.sent;
38775
38850
  doesFit = parentArticle.shelfPlanner.tryFitOnShelfOfGrid(gridIndex, cellIndex, accessoire);
38776
38851
  if (!(doesFit !== false && doesFit.type != 'doesNotFit' && doesFit.type != 'notAllowedByParentRule' && doesFit.type != 'notAllowedByAccessoireRule' && doesFit.type != 'notAllowedByMaxQuantityReached' && doesFit.index !== undefined)) {
38777
- _context17.next = 20;
38852
+ _context18.next = 20;
38778
38853
  break;
38779
38854
  }
38780
- _context17.next = 11;
38855
+ _context18.next = 11;
38781
38856
  return parentArticle.shelfPlanner.addAccessoireInCellInGrid(accessoire, gridIndex, doesFit.index, doesFit.type, params);
38782
38857
  case 11:
38783
38858
  set.giveAccNewPosNrByBasketId(set.getBaseParentArticleOfAccessoire(parentBasketId).basketId);
38784
38859
  if (!parentArticle.shelfPlanner.allMontageOptions.length) {
38785
- _context17.next = 15;
38860
+ _context18.next = 15;
38786
38861
  break;
38787
38862
  }
38788
- _context17.next = 15;
38863
+ _context18.next = 15;
38789
38864
  return this.updateArticlesOptionStatesOfActSet(set, {}, [parentArticle.basketId], true, 'initializing');
38790
38865
  case 15:
38791
38866
  if (params !== null && params !== void 0 && params.byInit) {
38792
- _context17.next = 18;
38867
+ _context18.next = 18;
38793
38868
  break;
38794
38869
  }
38795
- _context17.next = 18;
38870
+ _context18.next = 18;
38796
38871
  return parentArticle.shelfPlanner.onConfigChanged({});
38797
38872
  case 18:
38798
- _context17.next = 22;
38873
+ _context18.next = 22;
38799
38874
  break;
38800
38875
  case 20:
38801
- _context17.next = 22;
38876
+ _context18.next = 22;
38802
38877
  return this.deleteElementFromSet(set, accessoire);
38803
38878
  case 22:
38804
38879
  if (!(doesFit !== false)) {
38805
- _context17.next = 24;
38880
+ _context18.next = 24;
38806
38881
  break;
38807
38882
  }
38808
- return _context17.abrupt("return", _objectSpread$a(_objectSpread$a({}, doesFit), {}, {
38883
+ return _context18.abrupt("return", _objectSpread$a(_objectSpread$a({}, doesFit), {}, {
38809
38884
  accessoire: accessoire
38810
38885
  }));
38811
38886
  case 24:
38812
- return _context17.abrupt("return", false);
38887
+ return _context18.abrupt("return", false);
38813
38888
  case 25:
38814
38889
  case "end":
38815
- return _context17.stop();
38890
+ return _context18.stop();
38816
38891
  }
38817
- }, _callee15, this);
38892
+ }, _callee16, this);
38818
38893
  }));
38819
- function addAccessorieOnShelfPlanner(_x49, _x50, _x51, _x52, _x53) {
38894
+ function addAccessorieOnShelfPlanner(_x51, _x52, _x53, _x54, _x55) {
38820
38895
  return _addAccessorieOnShelfPlanner.apply(this, arguments);
38821
38896
  }
38822
38897
  return addAccessorieOnShelfPlanner;
@@ -38824,29 +38899,29 @@ var DivaSetHandler = /*#__PURE__*/function () {
38824
38899
  }, {
38825
38900
  key: "moveShelfItem",
38826
38901
  value: function () {
38827
- var _moveShelfItem = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee16(set, grid, initialIndex, finalIndex) {
38902
+ var _moveShelfItem = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee17(set, grid, initialIndex, finalIndex) {
38828
38903
  var article;
38829
- return _regeneratorRuntime.wrap(function _callee16$(_context18) {
38830
- while (1) switch (_context18.prev = _context18.next) {
38904
+ return _regeneratorRuntime.wrap(function _callee17$(_context19) {
38905
+ while (1) switch (_context19.prev = _context19.next) {
38831
38906
  case 0:
38832
38907
  article = set.getArticleByBasketId(grid.basketId);
38833
38908
  if (!(article && article.shelfPlanner)) {
38834
- _context18.next = 5;
38909
+ _context19.next = 5;
38835
38910
  break;
38836
38911
  }
38837
- _context18.next = 4;
38912
+ _context19.next = 4;
38838
38913
  return article.shelfPlanner.grids[grid.ShelfIndex].moveCell(initialIndex, finalIndex);
38839
38914
  case 4:
38840
- return _context18.abrupt("return", _context18.sent);
38915
+ return _context19.abrupt("return", _context19.sent);
38841
38916
  case 5:
38842
- return _context18.abrupt("return", 'NOTHING_CHANGED');
38917
+ return _context19.abrupt("return", 'NOTHING_CHANGED');
38843
38918
  case 6:
38844
38919
  case "end":
38845
- return _context18.stop();
38920
+ return _context19.stop();
38846
38921
  }
38847
- }, _callee16);
38922
+ }, _callee17);
38848
38923
  }));
38849
- function moveShelfItem(_x54, _x55, _x56, _x57) {
38924
+ function moveShelfItem(_x56, _x57, _x58, _x59) {
38850
38925
  return _moveShelfItem.apply(this, arguments);
38851
38926
  }
38852
38927
  return moveShelfItem;
@@ -38867,11 +38942,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
38867
38942
  }, {
38868
38943
  key: "getFreeShelfGrids",
38869
38944
  value: function () {
38870
- var _getFreeShelfGrids = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee17(set, gridGroup) {
38945
+ var _getFreeShelfGrids = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee18(set, gridGroup) {
38871
38946
  var _article$shelfPlanner;
38872
38947
  var articles, article, articleCodex, accessoire, ret;
38873
- return _regeneratorRuntime.wrap(function _callee17$(_context19) {
38874
- while (1) switch (_context19.prev = _context19.next) {
38948
+ return _regeneratorRuntime.wrap(function _callee18$(_context20) {
38949
+ while (1) switch (_context20.prev = _context20.next) {
38875
38950
  case 0:
38876
38951
  articles = set.getDivaArticlesByGridGroup(gridGroup);
38877
38952
  article = Object.values(articles).find(function (a) {
@@ -38880,38 +38955,38 @@ var DivaSetHandler = /*#__PURE__*/function () {
38880
38955
  });
38881
38956
  articleCodex = article === null || article === void 0 || (_article$shelfPlanner = article.shelfPlanner) === null || _article$shelfPlanner === void 0 ? void 0 : _article$shelfPlanner.getSelectedAccessoireById(gridGroup);
38882
38957
  if (!(!article || !articleCodex)) {
38883
- _context19.next = 5;
38958
+ _context20.next = 5;
38884
38959
  break;
38885
38960
  }
38886
- return _context19.abrupt("return", undefined);
38961
+ return _context20.abrupt("return", undefined);
38887
38962
  case 5:
38888
- _context19.next = 7;
38963
+ _context20.next = 7;
38889
38964
  return this.addArticleToActSet(set, articleCodex, {
38890
38965
  relatedToBasketId: article.basketId,
38891
38966
  relatedToShelf: article.basketId,
38892
38967
  relatedToShelfGrid: 0
38893
38968
  }, false, 'toDeleteShelf');
38894
38969
  case 7:
38895
- accessoire = _context19.sent;
38896
- _context19.next = 10;
38970
+ accessoire = _context20.sent;
38971
+ _context20.next = 10;
38897
38972
  return accessoire.updateShelfPlannerState({});
38898
38973
  case 10:
38899
38974
  articleHandlerInstance.initCfgValues(accessoire, {});
38900
- _context19.next = 13;
38975
+ _context20.next = 13;
38901
38976
  return articleHandlerInstance.updateCfgValues(accessoire, {}, {}, true, true);
38902
38977
  case 13:
38903
38978
  ret = this.getFreePlaces(gridGroup, articles, accessoire);
38904
- _context19.next = 16;
38979
+ _context20.next = 16;
38905
38980
  return this.deleteElementFromSet(set, accessoire, undefined, undefined, true);
38906
38981
  case 16:
38907
- return _context19.abrupt("return", ret);
38982
+ return _context20.abrupt("return", ret);
38908
38983
  case 17:
38909
38984
  case "end":
38910
- return _context19.stop();
38985
+ return _context20.stop();
38911
38986
  }
38912
- }, _callee17, this);
38987
+ }, _callee18, this);
38913
38988
  }));
38914
- function getFreeShelfGrids(_x58, _x59) {
38989
+ function getFreeShelfGrids(_x60, _x61) {
38915
38990
  return _getFreeShelfGrids.apply(this, arguments);
38916
38991
  }
38917
38992
  return getFreeShelfGrids;
@@ -38970,62 +39045,62 @@ var DivaSetHandler = /*#__PURE__*/function () {
38970
39045
  }, {
38971
39046
  key: "moveShelfItemToGrid",
38972
39047
  value: function () {
38973
- var _moveShelfItemToGrid = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee18(set, accessoireBasketId, parentBasketId, gridName, cellIndex) {
39048
+ var _moveShelfItemToGrid = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee19(set, accessoireBasketId, parentBasketId, gridName, cellIndex) {
38974
39049
  var _oldGrid$Cells$find;
38975
39050
  var artices, accessoire, oldParent, newParent, oldGrid, newGrid, index;
38976
- return _regeneratorRuntime.wrap(function _callee18$(_context20) {
38977
- while (1) switch (_context20.prev = _context20.next) {
39051
+ return _regeneratorRuntime.wrap(function _callee19$(_context21) {
39052
+ while (1) switch (_context21.prev = _context21.next) {
38978
39053
  case 0:
38979
39054
  artices = set.getDivaArticles();
38980
39055
  accessoire = artices[accessoireBasketId];
38981
39056
  oldParent = accessoire.accessoireParentArticle;
38982
39057
  newParent = artices[parentBasketId];
38983
39058
  if (!(accessoire.relatedToShelfGrid === undefined)) {
38984
- _context20.next = 6;
39059
+ _context21.next = 6;
38985
39060
  break;
38986
39061
  }
38987
- return _context20.abrupt("return");
39062
+ return _context21.abrupt("return");
38988
39063
  case 6:
38989
39064
  if (oldParent !== null && oldParent !== void 0 && oldParent.shelfPlanner) {
38990
- _context20.next = 8;
39065
+ _context21.next = 8;
38991
39066
  break;
38992
39067
  }
38993
- return _context20.abrupt("return");
39068
+ return _context21.abrupt("return");
38994
39069
  case 8:
38995
39070
  if (newParent !== null && newParent !== void 0 && newParent.shelfPlanner) {
38996
- _context20.next = 10;
39071
+ _context21.next = 10;
38997
39072
  break;
38998
39073
  }
38999
- return _context20.abrupt("return");
39074
+ return _context21.abrupt("return");
39000
39075
  case 10:
39001
39076
  oldGrid = oldParent.shelfPlanner.getGridByIndex(accessoire.relatedToShelfGrid);
39002
39077
  newGrid = newParent.shelfPlanner.getGridByGridName(gridName);
39003
39078
  if (oldGrid) {
39004
- _context20.next = 14;
39079
+ _context21.next = 14;
39005
39080
  break;
39006
39081
  }
39007
- return _context20.abrupt("return");
39082
+ return _context21.abrupt("return");
39008
39083
  case 14:
39009
39084
  if (newGrid) {
39010
- _context20.next = 16;
39085
+ _context21.next = 16;
39011
39086
  break;
39012
39087
  }
39013
- return _context20.abrupt("return");
39088
+ return _context21.abrupt("return");
39014
39089
  case 16:
39015
39090
  index = oldGrid === null || oldGrid === void 0 || (_oldGrid$Cells$find = oldGrid.Cells.find(function (c, i) {
39016
39091
  var _c$Article;
39017
39092
  return c.Index === c.InUse && ((_c$Article = c.Article) === null || _c$Article === void 0 ? void 0 : _c$Article.basketId) == accessoire.basketId;
39018
39093
  })) === null || _oldGrid$Cells$find === void 0 ? void 0 : _oldGrid$Cells$find.Index;
39019
39094
  if (!(index === undefined)) {
39020
- _context20.next = 19;
39095
+ _context21.next = 19;
39021
39096
  break;
39022
39097
  }
39023
- return _context20.abrupt("return");
39098
+ return _context21.abrupt("return");
39024
39099
  case 19:
39025
- _context20.next = 21;
39100
+ _context21.next = 21;
39026
39101
  return oldParent.shelfPlanner.deleteAccessoireOfCellInGrid(accessoire.relatedToShelfGrid, index);
39027
39102
  case 21:
39028
- _context20.next = 23;
39103
+ _context21.next = 23;
39029
39104
  return newParent.shelfPlanner.addAccessoireInCellInGrid(accessoire, newGrid.ShelfIndex, cellIndex, 'fitsOn');
39030
39105
  case 23:
39031
39106
  accessoire.relatedToShelfGrid = newGrid.ShelfIndex;
@@ -39037,17 +39112,17 @@ var DivaSetHandler = /*#__PURE__*/function () {
39037
39112
  set.giveAccNewPosNrByBasketId(set.getBaseParentArticleOfAccessoire(oldParent.basketId).basketId);
39038
39113
  }
39039
39114
  set.giveAccNewPosNrByBasketId(set.getBaseParentArticleOfAccessoire(newParent.basketId).basketId);
39040
- _context20.next = 28;
39115
+ _context21.next = 28;
39041
39116
  return this.updateArticlesOptionStatesOfActSet(set, {}, [oldParent.basketId, newParent.basketId]);
39042
39117
  case 28:
39043
- return _context20.abrupt("return", newGrid.getGridIdByArticleCodex(accessoire.articleCodex));
39118
+ return _context21.abrupt("return", newGrid.getGridIdByArticleCodex(accessoire.articleCodex));
39044
39119
  case 29:
39045
39120
  case "end":
39046
- return _context20.stop();
39121
+ return _context21.stop();
39047
39122
  }
39048
- }, _callee18, this);
39123
+ }, _callee19, this);
39049
39124
  }));
39050
- function moveShelfItemToGrid(_x60, _x61, _x62, _x63, _x64) {
39125
+ function moveShelfItemToGrid(_x62, _x63, _x64, _x65, _x66) {
39051
39126
  return _moveShelfItemToGrid.apply(this, arguments);
39052
39127
  }
39053
39128
  return moveShelfItemToGrid;
@@ -39055,33 +39130,33 @@ var DivaSetHandler = /*#__PURE__*/function () {
39055
39130
  }, {
39056
39131
  key: "deleteAccessorieOnShelfPlanner",
39057
39132
  value: function () {
39058
- var _deleteAccessorieOnShelfPlanner = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee19(set, gridIndex, cellIndex, parentBasketId, dontReload) {
39133
+ var _deleteAccessorieOnShelfPlanner = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee20(set, gridIndex, cellIndex, parentBasketId, dontReload) {
39059
39134
  var _parentArticle$shelfP2;
39060
39135
  var parentArticle, articeToDelete, _parentArticle$shelfP3;
39061
- return _regeneratorRuntime.wrap(function _callee19$(_context21) {
39062
- while (1) switch (_context21.prev = _context21.next) {
39136
+ return _regeneratorRuntime.wrap(function _callee20$(_context22) {
39137
+ while (1) switch (_context22.prev = _context22.next) {
39063
39138
  case 0:
39064
39139
  parentArticle = set.getArticleByBasketId(parentBasketId);
39065
- _context21.next = 3;
39140
+ _context22.next = 3;
39066
39141
  return parentArticle === null || parentArticle === void 0 || (_parentArticle$shelfP2 = parentArticle.shelfPlanner) === null || _parentArticle$shelfP2 === void 0 ? void 0 : _parentArticle$shelfP2.deleteAccessoireOfCellInGrid(gridIndex, cellIndex);
39067
39142
  case 3:
39068
- articeToDelete = _context21.sent;
39143
+ articeToDelete = _context22.sent;
39069
39144
  if (!articeToDelete) {
39070
- _context21.next = 9;
39145
+ _context22.next = 9;
39071
39146
  break;
39072
39147
  }
39073
- _context21.next = 7;
39148
+ _context22.next = 7;
39074
39149
  return this.deleteElementFromSet(set, articeToDelete, false, undefined, dontReload);
39075
39150
  case 7:
39076
- _context21.next = 9;
39151
+ _context22.next = 9;
39077
39152
  return parentArticle === null || parentArticle === void 0 || (_parentArticle$shelfP3 = parentArticle.shelfPlanner) === null || _parentArticle$shelfP3 === void 0 ? void 0 : _parentArticle$shelfP3.onConfigChanged({});
39078
39153
  case 9:
39079
39154
  case "end":
39080
- return _context21.stop();
39155
+ return _context22.stop();
39081
39156
  }
39082
- }, _callee19, this);
39157
+ }, _callee20, this);
39083
39158
  }));
39084
- function deleteAccessorieOnShelfPlanner(_x65, _x66, _x67, _x68, _x69) {
39159
+ function deleteAccessorieOnShelfPlanner(_x67, _x68, _x69, _x70, _x71) {
39085
39160
  return _deleteAccessorieOnShelfPlanner.apply(this, arguments);
39086
39161
  }
39087
39162
  return deleteAccessorieOnShelfPlanner;
@@ -39089,25 +39164,25 @@ var DivaSetHandler = /*#__PURE__*/function () {
39089
39164
  }, {
39090
39165
  key: "updatePlannerTrans",
39091
39166
  value: function () {
39092
- var _updatePlannerTrans = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee20(set, plannerElementID, deltaMove, deltaAngleDeg, rotCorrection, transState, autoDockingDistance) {
39167
+ var _updatePlannerTrans = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee21(set, plannerElementID, deltaMove, deltaAngleDeg, rotCorrection, transState, autoDockingDistance) {
39093
39168
  var updateConfig;
39094
- return _regeneratorRuntime.wrap(function _callee20$(_context22) {
39095
- while (1) switch (_context22.prev = _context22.next) {
39169
+ return _regeneratorRuntime.wrap(function _callee21$(_context23) {
39170
+ while (1) switch (_context23.prev = _context23.next) {
39096
39171
  case 0:
39097
39172
  updateConfig = set.plannerHandler.updatePlannerTrans(set.getSetId(), plannerElementID, deltaMove, deltaAngleDeg, rotCorrection, transState, autoDockingDistance);
39098
39173
  if (!updateConfig) {
39099
- _context22.next = 4;
39174
+ _context23.next = 4;
39100
39175
  break;
39101
39176
  }
39102
- _context22.next = 4;
39177
+ _context23.next = 4;
39103
39178
  return this.updateArticlesOptionStatesOfActSet(set, {}, [], true, 'initializingAfterTrans');
39104
39179
  case 4:
39105
39180
  case "end":
39106
- return _context22.stop();
39181
+ return _context23.stop();
39107
39182
  }
39108
- }, _callee20, this);
39183
+ }, _callee21, this);
39109
39184
  }));
39110
- function updatePlannerTrans(_x70, _x71, _x72, _x73, _x74, _x75, _x76) {
39185
+ function updatePlannerTrans(_x72, _x73, _x74, _x75, _x76, _x77, _x78) {
39111
39186
  return _updatePlannerTrans.apply(this, arguments);
39112
39187
  }
39113
39188
  return updatePlannerTrans;
@@ -39189,10 +39264,10 @@ var DivaSetHandler = /*#__PURE__*/function () {
39189
39264
  }, {
39190
39265
  key: "deleteAccessoire",
39191
39266
  value: function () {
39192
- var _deleteAccessoire = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee21(set, articleCodex, parentBasketId) {
39267
+ var _deleteAccessoire = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee22(set, articleCodex, parentBasketId) {
39193
39268
  var divaArticles, articlesToDelete, key, articleToDelete, maxQuantity, i;
39194
- return _regeneratorRuntime.wrap(function _callee21$(_context23) {
39195
- while (1) switch (_context23.prev = _context23.next) {
39269
+ return _regeneratorRuntime.wrap(function _callee22$(_context24) {
39270
+ while (1) switch (_context24.prev = _context24.next) {
39196
39271
  case 0:
39197
39272
  divaArticles = set.getDivaArticles();
39198
39273
  articlesToDelete = [];
@@ -39204,7 +39279,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
39204
39279
  }
39205
39280
  }
39206
39281
  if (!(articlesToDelete.length > 0)) {
39207
- _context23.next = 17;
39282
+ _context24.next = 17;
39208
39283
  break;
39209
39284
  }
39210
39285
  articlesToDelete.sort(function (a, b) {
@@ -39218,27 +39293,27 @@ var DivaSetHandler = /*#__PURE__*/function () {
39218
39293
  }
39219
39294
  }
39220
39295
  if (!(articleToDelete.quantity > 1)) {
39221
- _context23.next = 14;
39296
+ _context24.next = 14;
39222
39297
  break;
39223
39298
  }
39224
- _context23.next = 11;
39299
+ _context24.next = 11;
39225
39300
  return articleHandlerInstance.updateAccessoireQuantity(articleToDelete, articleToDelete.quantity - 1);
39226
39301
  case 11:
39227
- return _context23.abrupt("return", true);
39302
+ return _context24.abrupt("return", true);
39228
39303
  case 14:
39229
- _context23.next = 16;
39304
+ _context24.next = 16;
39230
39305
  return this.deleteElementFromSet(articleToDelete.set, articleToDelete);
39231
39306
  case 16:
39232
- return _context23.abrupt("return", _context23.sent);
39307
+ return _context24.abrupt("return", _context24.sent);
39233
39308
  case 17:
39234
- return _context23.abrupt("return", false);
39309
+ return _context24.abrupt("return", false);
39235
39310
  case 18:
39236
39311
  case "end":
39237
- return _context23.stop();
39312
+ return _context24.stop();
39238
39313
  }
39239
- }, _callee21, this);
39314
+ }, _callee22, this);
39240
39315
  }));
39241
- function deleteAccessoire(_x77, _x78, _x79) {
39316
+ function deleteAccessoire(_x79, _x80, _x81) {
39242
39317
  return _deleteAccessoire.apply(this, arguments);
39243
39318
  }
39244
39319
  return deleteAccessoire;
@@ -39415,19 +39490,19 @@ var DivaSetHandler = /*#__PURE__*/function () {
39415
39490
  }, {
39416
39491
  key: "configSingleIsChanged",
39417
39492
  value: (function () {
39418
- var _configSingleIsChanged = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee22(set, newIsConfigSingle, groupedOptions, groupedArticles) {
39493
+ var _configSingleIsChanged = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee23(set, newIsConfigSingle, groupedOptions, groupedArticles) {
39419
39494
  var _set$getArticleByBask4, variantValues, key;
39420
- return _regeneratorRuntime.wrap(function _callee22$(_context24) {
39421
- while (1) switch (_context24.prev = _context24.next) {
39495
+ return _regeneratorRuntime.wrap(function _callee23$(_context25) {
39496
+ while (1) switch (_context25.prev = _context25.next) {
39422
39497
  case 0:
39423
39498
  set.configSingle = newIsConfigSingle;
39424
39499
  if (!(!set.configSingle && !set.CatalogData.onConfigSingleDontGeneralize && groupedOptions && groupedArticles)) {
39425
- _context24.next = 7;
39500
+ _context25.next = 7;
39426
39501
  break;
39427
39502
  }
39428
39503
  variantValues = (_set$getArticleByBask4 = set.getArticleByBasketId(groupedArticles[0])) === null || _set$getArticleByBask4 === void 0 ? void 0 : _set$getArticleByBask4.VariantValues;
39429
39504
  if (!variantValues) {
39430
- _context24.next = 7;
39505
+ _context25.next = 7;
39431
39506
  break;
39432
39507
  }
39433
39508
  for (key in variantValues) {
@@ -39435,15 +39510,15 @@ var DivaSetHandler = /*#__PURE__*/function () {
39435
39510
  delete variantValues[key];
39436
39511
  }
39437
39512
  }
39438
- _context24.next = 7;
39513
+ _context25.next = 7;
39439
39514
  return this.updateArticlesOptionStatesOfActSet(set, variantValues, groupedArticles);
39440
39515
  case 7:
39441
39516
  case "end":
39442
- return _context24.stop();
39517
+ return _context25.stop();
39443
39518
  }
39444
- }, _callee22, this);
39519
+ }, _callee23, this);
39445
39520
  }));
39446
- function configSingleIsChanged(_x80, _x81, _x82, _x83) {
39521
+ function configSingleIsChanged(_x82, _x83, _x84, _x85) {
39447
39522
  return _configSingleIsChanged.apply(this, arguments);
39448
39523
  }
39449
39524
  return configSingleIsChanged;
@@ -39543,28 +39618,28 @@ var DivaSetHandler = /*#__PURE__*/function () {
39543
39618
  }, {
39544
39619
  key: "loadConfigItemsOfActSetByConfigStepKey",
39545
39620
  value: function () {
39546
- var _loadConfigItemsOfActSetByConfigStepKey = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee23(set, configStepKey, visible, hidePricePreview) {
39621
+ var _loadConfigItemsOfActSetByConfigStepKey = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee24(set, configStepKey, visible, hidePricePreview) {
39547
39622
  var _configItems$option, _configItems$option2, _configItems$option3, _configItems$option4;
39548
39623
  var configItems, paletteType, filterType, stepInfo, contentItemId, contentItemTeaser, description;
39549
- return _regeneratorRuntime.wrap(function _callee23$(_context25) {
39550
- while (1) switch (_context25.prev = _context25.next) {
39624
+ return _regeneratorRuntime.wrap(function _callee24$(_context26) {
39625
+ while (1) switch (_context26.prev = _context26.next) {
39551
39626
  case 0:
39552
- _context25.next = 2;
39627
+ _context26.next = 2;
39553
39628
  return configTreeHandler.getConifgItemsForView(set, configStepKey);
39554
39629
  case 2:
39555
- configItems = _context25.sent;
39630
+ configItems = _context26.sent;
39556
39631
  paletteType = set.configTree.getCurPaletteType(set, configStepKey);
39557
39632
  configItems.configItems = this.removeDockingInfluencableconfigItems(set, configItems.configItems, configStepKey);
39558
- _context25.next = 7;
39633
+ _context26.next = 7;
39559
39634
  return this.variantsEvaluator(set, configItems.configItems, configStepKey, paletteType, hidePricePreview);
39560
39635
  case 7:
39561
- configItems.configItems = _context25.sent;
39636
+ configItems.configItems = _context26.sent;
39562
39637
  filterType = set.configTree.getCurFilterType(configStepKey, configItems.configItems);
39563
39638
  stepInfo = set.configTree.getStepInfo(configStepKey);
39564
39639
  contentItemId = (_configItems$option = configItems.option) === null || _configItems$option === void 0 ? void 0 : _configItems$option.contentItemId;
39565
39640
  contentItemTeaser = (_configItems$option2 = configItems.option) === null || _configItems$option2 === void 0 ? void 0 : _configItems$option2.contentItemTeaser;
39566
39641
  description = (_configItems$option3 = configItems.option) === null || _configItems$option3 === void 0 ? void 0 : _configItems$option3.description;
39567
- return _context25.abrupt("return", _objectSpread$a(_objectSpread$a(_objectSpread$a({
39642
+ return _context26.abrupt("return", _objectSpread$a(_objectSpread$a(_objectSpread$a({
39568
39643
  isRenderedNotInSettingPalette: set.configTree.isRenderedNotInSettingPalette(configStepKey),
39569
39644
  isRenderedInAccessorieStep: set.configTree.isRenderedInAccessorieStep(configStepKey),
39570
39645
  visible: set.configTree.getVisibility(configStepKey, visible, set.CatalogData)
@@ -39580,11 +39655,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
39580
39655
  }));
39581
39656
  case 14:
39582
39657
  case "end":
39583
- return _context25.stop();
39658
+ return _context26.stop();
39584
39659
  }
39585
- }, _callee23, this);
39660
+ }, _callee24, this);
39586
39661
  }));
39587
- function loadConfigItemsOfActSetByConfigStepKey(_x84, _x85, _x86, _x87) {
39662
+ function loadConfigItemsOfActSetByConfigStepKey(_x86, _x87, _x88, _x89) {
39588
39663
  return _loadConfigItemsOfActSetByConfigStepKey.apply(this, arguments);
39589
39664
  }
39590
39665
  return loadConfigItemsOfActSetByConfigStepKey;
@@ -39626,41 +39701,41 @@ var DivaSetHandler = /*#__PURE__*/function () {
39626
39701
  }, {
39627
39702
  key: "variantsEvaluator",
39628
39703
  value: (function () {
39629
- var _variantsEvaluator = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee24(set, configItems, configStepKey, paletteType, hidePricePreview) {
39704
+ var _variantsEvaluator = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee25(set, configItems, configStepKey, paletteType, hidePricePreview) {
39630
39705
  var _configItems$0$option, _set$api$ReturnToFrom, _set$CatalogData$show, _set$CatalogData$hide;
39631
39706
  var opt, previewType, _opt$checkForReversed, targetArticles, variants, pricesVisible;
39632
- return _regeneratorRuntime.wrap(function _callee24$(_context26) {
39633
- while (1) switch (_context26.prev = _context26.next) {
39707
+ return _regeneratorRuntime.wrap(function _callee25$(_context27) {
39708
+ while (1) switch (_context27.prev = _context27.next) {
39634
39709
  case 0:
39635
39710
  if (configItems[0]) {
39636
- _context26.next = 2;
39711
+ _context27.next = 2;
39637
39712
  break;
39638
39713
  }
39639
- return _context26.abrupt("return", configItems);
39714
+ return _context27.abrupt("return", configItems);
39640
39715
  case 2:
39641
39716
  opt = set.CatalogData.getOption((_configItems$0$option = configItems[0].optionOcd) !== null && _configItems$0$option !== void 0 ? _configItems$0$option : configItems[0].op);
39642
39717
  previewType = set.api.pricePreview;
39643
39718
  if (!(!opt || opt.mergeIDMToOPG || configItems[0].isOPVG || opt.showOnSeparatTabgroup || set.PlannerMode === 'BoxPlanner' || ['TEXTBOX', 'NUMBERBOX', 'RANGE'].includes(paletteType) || (_set$api$ReturnToFrom = set.api.ReturnToFromParams) !== null && _set$api$ReturnToFrom !== void 0 && _set$api$ReturnToFrom.includes('PRODUCTCREATOR'))) {
39644
- _context26.next = 6;
39719
+ _context27.next = 6;
39645
39720
  break;
39646
39721
  }
39647
- return _context26.abrupt("return", configItems);
39722
+ return _context27.abrupt("return", configItems);
39648
39723
  case 6:
39649
39724
  if (!(!previewType || previewType == 'off' || configItems.length == 1 || opt.isDescribingState || configItems.length > 300 && !configItems[0].groupName || (_set$CatalogData$show = set.CatalogData.showPricePreviewOnlyOnOptions) !== null && _set$CatalogData$show !== void 0 && _set$CatalogData$show.length && !set.CatalogData.showPricePreviewOnlyOnOptions.includes(opt.codex.substring(3)) || (_set$CatalogData$hide = set.CatalogData.hidePricePreviewOnlyOnOptions) !== null && _set$CatalogData$hide !== void 0 && _set$CatalogData$hide.length && set.CatalogData.hidePricePreviewOnlyOnOptions.includes(opt.codex.substring(3)) || hidePricePreview)) {
39650
- _context26.next = 9;
39725
+ _context27.next = 9;
39651
39726
  break;
39652
39727
  }
39653
39728
  if (!(!set.logTotalStateForVariants && !((_opt$checkForReversed = opt.checkForReversed) !== null && _opt$checkForReversed !== void 0 && _opt$checkForReversed.checkForReversingChanges))) {
39654
- _context26.next = 9;
39729
+ _context27.next = 9;
39655
39730
  break;
39656
39731
  }
39657
- return _context26.abrupt("return", configItems);
39732
+ return _context27.abrupt("return", configItems);
39658
39733
  case 9:
39659
39734
  targetArticles = set.configTree.getTargetArticles(configStepKey);
39660
- _context26.next = 12;
39735
+ _context27.next = 12;
39661
39736
  return this.calcVariants(set, configItems, targetArticles, opt);
39662
39737
  case 12:
39663
- variants = _context26.sent;
39738
+ variants = _context27.sent;
39664
39739
  if (previewType) {
39665
39740
  pricesVisible = this.checkIfPriceDiffers(variants);
39666
39741
  configItems.map(function (c, index) {
@@ -39670,14 +39745,14 @@ var DivaSetHandler = /*#__PURE__*/function () {
39670
39745
  };
39671
39746
  });
39672
39747
  }
39673
- return _context26.abrupt("return", configItems);
39748
+ return _context27.abrupt("return", configItems);
39674
39749
  case 15:
39675
39750
  case "end":
39676
- return _context26.stop();
39751
+ return _context27.stop();
39677
39752
  }
39678
- }, _callee24, this);
39753
+ }, _callee25, this);
39679
39754
  }));
39680
- function variantsEvaluator(_x88, _x89, _x90, _x91, _x92) {
39755
+ function variantsEvaluator(_x90, _x91, _x92, _x93, _x94) {
39681
39756
  return _variantsEvaluator.apply(this, arguments);
39682
39757
  }
39683
39758
  return variantsEvaluator;
@@ -39685,10 +39760,10 @@ var DivaSetHandler = /*#__PURE__*/function () {
39685
39760
  }, {
39686
39761
  key: "calcVariants",
39687
39762
  value: function () {
39688
- var _calcVariants = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee25(realSet, configItems, targetArticles, option) {
39763
+ var _calcVariants = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee26(realSet, configItems, targetArticles, option) {
39689
39764
  var variantInfo, articles, origPrice, articleConfigs, i, basketId, totalConfig, key, parentNames, _i5, configItem, _ref, _ref2;
39690
- return _regeneratorRuntime.wrap(function _callee25$(_context27) {
39691
- while (1) switch (_context27.prev = _context27.next) {
39765
+ return _regeneratorRuntime.wrap(function _callee26$(_context28) {
39766
+ while (1) switch (_context28.prev = _context28.next) {
39692
39767
  case 0:
39693
39768
  variantInfo = [];
39694
39769
  articles = realSet.getDivaArticles(true, true);
@@ -39697,15 +39772,15 @@ var DivaSetHandler = /*#__PURE__*/function () {
39697
39772
  i = 0;
39698
39773
  case 5:
39699
39774
  if (!(i < targetArticles.length)) {
39700
- _context27.next = 13;
39775
+ _context28.next = 13;
39701
39776
  break;
39702
39777
  }
39703
39778
  basketId = targetArticles[i];
39704
39779
  if (articles[basketId]) {
39705
- _context27.next = 9;
39780
+ _context28.next = 9;
39706
39781
  break;
39707
39782
  }
39708
- return _context27.abrupt("continue", 10);
39783
+ return _context28.abrupt("continue", 10);
39709
39784
  case 9:
39710
39785
  articleConfigs[basketId] = {
39711
39786
  config: articles[basketId].VisibleVariantValues,
@@ -39713,7 +39788,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
39713
39788
  };
39714
39789
  case 10:
39715
39790
  i++;
39716
- _context27.next = 5;
39791
+ _context28.next = 5;
39717
39792
  break;
39718
39793
  case 13:
39719
39794
  totalConfig = {};
@@ -39727,37 +39802,37 @@ var DivaSetHandler = /*#__PURE__*/function () {
39727
39802
  _i5 = 0;
39728
39803
  case 17:
39729
39804
  if (!(_i5 < configItems.length)) {
39730
- _context27.next = 30;
39805
+ _context28.next = 30;
39731
39806
  break;
39732
39807
  }
39733
39808
  configItem = configItems[_i5];
39734
39809
  if (!(configItem.isParentOPVG || configItem.idmOpgValCodex)) {
39735
- _context27.next = 26;
39810
+ _context28.next = 26;
39736
39811
  break;
39737
39812
  }
39738
39813
  if (!parentNames.includes((_ref = configItem.isParentOPVG ? configItem.parentName : configItem.idmOpgValCodex) !== null && _ref !== void 0 ? _ref : '')) {
39739
- _context27.next = 25;
39814
+ _context28.next = 25;
39740
39815
  break;
39741
39816
  }
39742
39817
  variantInfo.push(variantInfo[_i5 - 1]);
39743
- return _context27.abrupt("continue", 27);
39818
+ return _context28.abrupt("continue", 27);
39744
39819
  case 25:
39745
39820
  parentNames.push((_ref2 = configItem.isParentOPVG ? configItem.parentName : configItem.idmOpgValCodex) !== null && _ref2 !== void 0 ? _ref2 : '');
39746
39821
  case 26:
39747
39822
  variantInfo.push(this.getVariant(realSet.cloneSet(), configItem, articleConfigs, totalConfig, targetArticles, option, origPrice, _i5, variantInfo[_i5 - 1]));
39748
39823
  case 27:
39749
39824
  _i5++;
39750
- _context27.next = 17;
39825
+ _context28.next = 17;
39751
39826
  break;
39752
39827
  case 30:
39753
- return _context27.abrupt("return", variantInfo);
39828
+ return _context28.abrupt("return", variantInfo);
39754
39829
  case 31:
39755
39830
  case "end":
39756
- return _context27.stop();
39831
+ return _context28.stop();
39757
39832
  }
39758
- }, _callee25, this);
39833
+ }, _callee26, this);
39759
39834
  }));
39760
- function calcVariants(_x93, _x94, _x95, _x96) {
39835
+ function calcVariants(_x95, _x96, _x97, _x98) {
39761
39836
  return _calcVariants.apply(this, arguments);
39762
39837
  }
39763
39838
  return calcVariants;
@@ -39765,32 +39840,32 @@ var DivaSetHandler = /*#__PURE__*/function () {
39765
39840
  }, {
39766
39841
  key: "getVariant",
39767
39842
  value: function () {
39768
- var _getVariant = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee26(set, item, origConfigs, totalConfig, targetArticles, option, origPrice, index, previousPromise) {
39843
+ var _getVariant = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee27(set, item, origConfigs, totalConfig, targetArticles, option, origPrice, index, previousPromise) {
39769
39844
  var firstPrice, prevProm, startTime, doUseConfigs, hashVariantValues, variantValues, i, basketId, origConfig, key, hash, dataHash, _i6, reversingCheck, ret, endTime, calcTime, price, priceObj;
39770
- return _regeneratorRuntime.wrap(function _callee26$(_context28) {
39771
- while (1) switch (_context28.prev = _context28.next) {
39845
+ return _regeneratorRuntime.wrap(function _callee27$(_context29) {
39846
+ while (1) switch (_context29.prev = _context29.next) {
39772
39847
  case 0:
39773
39848
  firstPrice = undefined;
39774
39849
  prevProm = undefined;
39775
39850
  if (!previousPromise) {
39776
- _context28.next = 9;
39851
+ _context29.next = 9;
39777
39852
  break;
39778
39853
  }
39779
- _context28.next = 5;
39854
+ _context29.next = 5;
39780
39855
  return previousPromise;
39781
39856
  case 5:
39782
- prevProm = _context28.sent;
39857
+ prevProm = _context29.sent;
39783
39858
  firstPrice = prevProm.firstPrice;
39784
- _context28.next = 10;
39859
+ _context29.next = 10;
39785
39860
  break;
39786
39861
  case 9:
39787
39862
  firstPrice = set.getSetPrice();
39788
39863
  case 10:
39789
39864
  if (!(index == 0)) {
39790
- _context28.next = 13;
39865
+ _context29.next = 13;
39791
39866
  break;
39792
39867
  }
39793
- _context28.next = 13;
39868
+ _context29.next = 13;
39794
39869
  return DivaUtils.Sleep(item.idmOpgOptionCodex ? 200 : 50);
39795
39870
  case 13:
39796
39871
  startTime = new Date();
@@ -39821,11 +39896,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
39821
39896
  hash = md5(JSON.stringify([].concat(hashVariantValues, _toConsumableArray(Object.values(totalConfig)))));
39822
39897
  dataHash = set.CatalogData.getVariantsPriceByHash(hash);
39823
39898
  if (!(dataHash && (!set.logTotalStateForVariants || dataHash.articleSnapshot))) {
39824
- _context28.next = 24;
39899
+ _context29.next = 24;
39825
39900
  break;
39826
39901
  }
39827
39902
  LOG$9.debug('calcingVariant from Option:' + option.codex + ' and index: ' + index + ' hash hit!', dataHash, [].concat(hashVariantValues, _toConsumableArray(Object.values(totalConfig))), targetArticles);
39828
- return _context28.abrupt("return", _objectSpread$a(_objectSpread$a({}, dataHash), {}, {
39903
+ return _context29.abrupt("return", _objectSpread$a(_objectSpread$a({}, dataHash), {}, {
39829
39904
  origPrice: origPrice,
39830
39905
  firstPrice: firstPrice
39831
39906
  }));
@@ -39833,25 +39908,25 @@ var DivaSetHandler = /*#__PURE__*/function () {
39833
39908
  _i6 = 0;
39834
39909
  case 25:
39835
39910
  if (!(_i6 < variantValues.length)) {
39836
- _context28.next = 31;
39911
+ _context29.next = 31;
39837
39912
  break;
39838
39913
  }
39839
- _context28.next = 28;
39914
+ _context29.next = 28;
39840
39915
  return this.updateArticlesOptionStatesOfActSet(set, variantValues[_i6], [targetArticles[_i6]], true, 'calcVariant');
39841
39916
  case 28:
39842
39917
  _i6++;
39843
- _context28.next = 25;
39918
+ _context29.next = 25;
39844
39919
  break;
39845
39920
  case 31:
39846
39921
  reversingCheck = undefined;
39847
39922
  if (!option.checkForReversed) {
39848
- _context28.next = 37;
39923
+ _context29.next = 37;
39849
39924
  break;
39850
39925
  }
39851
- _context28.next = 35;
39926
+ _context29.next = 35;
39852
39927
  return this.checkForReversingChanges(set, origConfigs, option, option.checkForReversed.checkOnlyForOptions);
39853
39928
  case 35:
39854
- ret = _context28.sent;
39929
+ ret = _context29.sent;
39855
39930
  reversingCheck = {
39856
39931
  checkingForReversingChanges: option.checkForReversed.checkForReversingChanges,
39857
39932
  hasReversingChanges: ret.hasReversingChanges,
@@ -39875,14 +39950,14 @@ var DivaSetHandler = /*#__PURE__*/function () {
39875
39950
  articleSnapshot: set.logTotalStateForVariants ? set.cloneSet().getDivaArticles() : undefined
39876
39951
  };
39877
39952
  set.CatalogData.setVariantsPriceByHash(hash, priceObj);
39878
- return _context28.abrupt("return", priceObj);
39953
+ return _context29.abrupt("return", priceObj);
39879
39954
  case 44:
39880
39955
  case "end":
39881
- return _context28.stop();
39956
+ return _context29.stop();
39882
39957
  }
39883
- }, _callee26, this);
39958
+ }, _callee27, this);
39884
39959
  }));
39885
- function getVariant(_x97, _x98, _x99, _x100, _x101, _x102, _x103, _x104, _x105) {
39960
+ function getVariant(_x99, _x100, _x101, _x102, _x103, _x104, _x105, _x106, _x107) {
39886
39961
  return _getVariant.apply(this, arguments);
39887
39962
  }
39888
39963
  return getVariant;
@@ -39890,53 +39965,53 @@ var DivaSetHandler = /*#__PURE__*/function () {
39890
39965
  }, {
39891
39966
  key: "checkIfPriceDiffers",
39892
39967
  value: function () {
39893
- var _checkIfPriceDiffers = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee27(promises) {
39968
+ var _checkIfPriceDiffers = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee28(promises) {
39894
39969
  var results, i, price, j;
39895
- return _regeneratorRuntime.wrap(function _callee27$(_context29) {
39896
- while (1) switch (_context29.prev = _context29.next) {
39970
+ return _regeneratorRuntime.wrap(function _callee28$(_context30) {
39971
+ while (1) switch (_context30.prev = _context30.next) {
39897
39972
  case 0:
39898
39973
  results = [];
39899
39974
  i = 0;
39900
39975
  case 2:
39901
39976
  if (!(i < promises.length)) {
39902
- _context29.next = 19;
39977
+ _context30.next = 19;
39903
39978
  break;
39904
39979
  }
39905
- _context29.t0 = results;
39906
- _context29.next = 6;
39980
+ _context30.t0 = results;
39981
+ _context30.next = 6;
39907
39982
  return promises[i];
39908
39983
  case 6:
39909
- _context29.t1 = _context29.sent;
39910
- _context29.t0.push.call(_context29.t0, _context29.t1);
39984
+ _context30.t1 = _context30.sent;
39985
+ _context30.t0.push.call(_context30.t0, _context30.t1);
39911
39986
  price = results[0].price;
39912
39987
  j = 1;
39913
39988
  case 10:
39914
39989
  if (!(j < results.length)) {
39915
- _context29.next = 16;
39990
+ _context30.next = 16;
39916
39991
  break;
39917
39992
  }
39918
39993
  if (!(price !== results[j].price)) {
39919
- _context29.next = 13;
39994
+ _context30.next = 13;
39920
39995
  break;
39921
39996
  }
39922
- return _context29.abrupt("return", true);
39997
+ return _context30.abrupt("return", true);
39923
39998
  case 13:
39924
39999
  j++;
39925
- _context29.next = 10;
40000
+ _context30.next = 10;
39926
40001
  break;
39927
40002
  case 16:
39928
40003
  i++;
39929
- _context29.next = 2;
40004
+ _context30.next = 2;
39930
40005
  break;
39931
40006
  case 19:
39932
- return _context29.abrupt("return", false);
40007
+ return _context30.abrupt("return", false);
39933
40008
  case 20:
39934
40009
  case "end":
39935
- return _context29.stop();
40010
+ return _context30.stop();
39936
40011
  }
39937
- }, _callee27);
40012
+ }, _callee28);
39938
40013
  }));
39939
- function checkIfPriceDiffers(_x106) {
40014
+ function checkIfPriceDiffers(_x108) {
39940
40015
  return _checkIfPriceDiffers.apply(this, arguments);
39941
40016
  }
39942
40017
  return checkIfPriceDiffers;
@@ -39944,49 +40019,49 @@ var DivaSetHandler = /*#__PURE__*/function () {
39944
40019
  }, {
39945
40020
  key: "checkForReversingChanges",
39946
40021
  value: function () {
39947
- var _checkForReversingChanges = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee28(set, origConfigs, option, checkOnlyForOptions) {
39948
- var hasReversingChanges, reversingVariantValues, basketId, origConfig, article, variantValues, _iterator, _step, ops, _ops$valCodex;
39949
- return _regeneratorRuntime.wrap(function _callee28$(_context30) {
39950
- while (1) switch (_context30.prev = _context30.next) {
40022
+ var _checkForReversingChanges = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee29(set, origConfigs, option, checkOnlyForOptions) {
40023
+ var hasReversingChanges, reversingVariantValues, basketId, origConfig, article, variantValues, _iterator2, _step2, ops, _ops$valCodex;
40024
+ return _regeneratorRuntime.wrap(function _callee29$(_context31) {
40025
+ while (1) switch (_context31.prev = _context31.next) {
39951
40026
  case 0:
39952
40027
  hasReversingChanges = false;
39953
40028
  reversingVariantValues = {};
39954
- _context30.t0 = _regeneratorRuntime.keys(origConfigs);
40029
+ _context31.t0 = _regeneratorRuntime.keys(origConfigs);
39955
40030
  case 3:
39956
- if ((_context30.t1 = _context30.t0()).done) {
39957
- _context30.next = 32;
40031
+ if ((_context31.t1 = _context31.t0()).done) {
40032
+ _context31.next = 32;
39958
40033
  break;
39959
40034
  }
39960
- basketId = _context30.t1.value;
40035
+ basketId = _context31.t1.value;
39961
40036
  origConfig = origConfigs[basketId].config;
39962
40037
  article = set.getArticleByBasketId(basketId);
39963
40038
  if (article) {
39964
- _context30.next = 9;
40039
+ _context31.next = 9;
39965
40040
  break;
39966
40041
  }
39967
40042
  throw new Error('Article not found for basketId: ' + basketId);
39968
40043
  case 9:
39969
40044
  variantValues = article.VisibleVariantValues;
39970
- _iterator = _createForOfIteratorHelper$2(article.articleOptionStates.values());
39971
- _context30.prev = 11;
39972
- _iterator.s();
40045
+ _iterator2 = _createForOfIteratorHelper$2(article.articleOptionStates.values());
40046
+ _context31.prev = 11;
40047
+ _iterator2.s();
39973
40048
  case 13:
39974
- if ((_step = _iterator.n()).done) {
39975
- _context30.next = 22;
40049
+ if ((_step2 = _iterator2.n()).done) {
40050
+ _context31.next = 22;
39976
40051
  break;
39977
40052
  }
39978
- ops = _step.value;
40053
+ ops = _step2.value;
39979
40054
  if (!(ops.optionCodex == option.codex)) {
39980
- _context30.next = 17;
40055
+ _context31.next = 17;
39981
40056
  break;
39982
40057
  }
39983
- return _context30.abrupt("break", 22);
40058
+ return _context31.abrupt("break", 22);
39984
40059
  case 17:
39985
40060
  if (!(checkOnlyForOptions !== null && checkOnlyForOptions !== void 0 && checkOnlyForOptions.length && !checkOnlyForOptions.includes(ops.optionCodex))) {
39986
- _context30.next = 19;
40061
+ _context31.next = 19;
39987
40062
  break;
39988
40063
  }
39989
- return _context30.abrupt("continue", 20);
40064
+ return _context31.abrupt("continue", 20);
39990
40065
  case 19:
39991
40066
  if (ops && origConfig[ops.optionCodex] && (!ops.visibleCount || variantValues[ops.optionCodex] != origConfig[ops.optionCodex]) && (!ops.isInvisible || ops.visibleCount == 0)) {
39992
40067
  hasReversingChanges = true;
@@ -39996,34 +40071,34 @@ var DivaSetHandler = /*#__PURE__*/function () {
39996
40071
  };
39997
40072
  }
39998
40073
  case 20:
39999
- _context30.next = 13;
40074
+ _context31.next = 13;
40000
40075
  break;
40001
40076
  case 22:
40002
- _context30.next = 27;
40077
+ _context31.next = 27;
40003
40078
  break;
40004
40079
  case 24:
40005
- _context30.prev = 24;
40006
- _context30.t2 = _context30["catch"](11);
40007
- _iterator.e(_context30.t2);
40080
+ _context31.prev = 24;
40081
+ _context31.t2 = _context31["catch"](11);
40082
+ _iterator2.e(_context31.t2);
40008
40083
  case 27:
40009
- _context30.prev = 27;
40010
- _iterator.f();
40011
- return _context30.finish(27);
40084
+ _context31.prev = 27;
40085
+ _iterator2.f();
40086
+ return _context31.finish(27);
40012
40087
  case 30:
40013
- _context30.next = 3;
40088
+ _context31.next = 3;
40014
40089
  break;
40015
40090
  case 32:
40016
- return _context30.abrupt("return", {
40091
+ return _context31.abrupt("return", {
40017
40092
  hasReversingChanges: hasReversingChanges,
40018
40093
  reversingVariantValues: reversingVariantValues
40019
40094
  });
40020
40095
  case 33:
40021
40096
  case "end":
40022
- return _context30.stop();
40097
+ return _context31.stop();
40023
40098
  }
40024
- }, _callee28, null, [[11, 24, 27, 30]]);
40099
+ }, _callee29, null, [[11, 24, 27, 30]]);
40025
40100
  }));
40026
- function checkForReversingChanges(_x107, _x108, _x109, _x110) {
40101
+ function checkForReversingChanges(_x109, _x110, _x111, _x112) {
40027
40102
  return _checkForReversingChanges.apply(this, arguments);
40028
40103
  }
40029
40104
  return checkForReversingChanges;
@@ -40037,11 +40112,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
40037
40112
  }, {
40038
40113
  key: "updateArticlesOptionStatesOfActSet",
40039
40114
  value: (function () {
40040
- var _updateArticlesOptionStatesOfActSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee29(set, myValues, targetArticlesWithNewValues, ignorePlanner, from, partlistDiff) {
40115
+ var _updateArticlesOptionStatesOfActSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee30(set, myValues, targetArticlesWithNewValues, ignorePlanner, from, partlistDiff) {
40041
40116
  var _resultPlannerUpdate;
40042
40117
  var elementsToDeleteById, targetArticlesToUpdateOnly, previousValues, articles, article, optState, retValues, diff, resultPlannerUpdate, targetElementIds, i, articleToDel, index, result, articleCopyRelation, newArticle, rpu, copyIndex;
40043
- return _regeneratorRuntime.wrap(function _callee29$(_context31) {
40044
- while (1) switch (_context31.prev = _context31.next) {
40118
+ return _regeneratorRuntime.wrap(function _callee30$(_context32) {
40119
+ while (1) switch (_context32.prev = _context32.next) {
40045
40120
  case 0:
40046
40121
  elementsToDeleteById = [];
40047
40122
  targetArticlesToUpdateOnly = [];
@@ -40060,55 +40135,55 @@ var DivaSetHandler = /*#__PURE__*/function () {
40060
40135
  optState = article === null || article === void 0 ? void 0 : article.getArticleJsonVariantValues();
40061
40136
  previousValues = structuredClone(optState);
40062
40137
  }
40063
- _context31.next = 8;
40138
+ _context32.next = 8;
40064
40139
  return articleHandlerInstance.updateArticlesOptionStates(myValues, targetArticlesWithNewValues, targetArticlesToUpdateOnly, set.getDivaArticles(true), from);
40065
40140
  case 8:
40066
- retValues = _context31.sent;
40141
+ retValues = _context32.sent;
40067
40142
  targetArticlesWithNewValues = retValues.targetArticlesToUpdate;
40068
40143
  if (!(retValues.partlistArticlesToLoad.length > 0)) {
40069
- _context31.next = 19;
40144
+ _context32.next = 19;
40070
40145
  break;
40071
40146
  }
40072
40147
  diff = targetArticlesToUpdateOnly.length - Object.keys(set.getDivaArticles()).length;
40073
40148
  if (!(diff == 0 || partlistDiff == diff)) {
40074
- _context31.next = 17;
40149
+ _context32.next = 17;
40075
40150
  break;
40076
40151
  }
40077
- _context31.next = 15;
40152
+ _context32.next = 15;
40078
40153
  return articleHandlerInstance.correctPartlistArticlesByGlobalRules(set, retValues.partlistArticlesToLoad, set.CatalogData.bundleRules, {
40079
40154
  doChange: false
40080
40155
  });
40081
40156
  case 15:
40082
- _context31.next = 19;
40157
+ _context32.next = 19;
40083
40158
  break;
40084
40159
  case 17:
40085
- _context31.next = 19;
40160
+ _context32.next = 19;
40086
40161
  return this.updateArticlesOptionStatesOfActSet(set, {}, targetArticlesWithNewValues, ignorePlanner, from, diff);
40087
40162
  case 19:
40088
40163
  if (!(from !== 'initializingPartlist')) {
40089
- _context31.next = 22;
40164
+ _context32.next = 22;
40090
40165
  break;
40091
40166
  }
40092
- _context31.next = 22;
40167
+ _context32.next = 22;
40093
40168
  return this.updateEdoArticles(set, retValues.newEDOExtraArticles);
40094
40169
  case 22:
40095
40170
  if (set.CatalogData.hasAlternateRenderings) set.CatalogData.updateAlternativeRenderings(set.getDivaArticles());
40096
40171
 
40097
40172
  //Update Planner - check if planner data changed
40098
40173
  if (!(!ignorePlanner && from != 'calcVariant')) {
40099
- _context31.next = 64;
40174
+ _context32.next = 64;
40100
40175
  break;
40101
40176
  }
40102
40177
  targetElementIds = this.getElementIdsOfArticles(set, targetArticlesWithNewValues);
40103
- _context31.next = 27;
40178
+ _context32.next = 27;
40104
40179
  return set.plannerHandler.updatePlanner(set.getSetId(), myValues, targetElementIds);
40105
40180
  case 27:
40106
- resultPlannerUpdate = _context31.sent;
40181
+ resultPlannerUpdate = _context32.sent;
40107
40182
  if (!resultPlannerUpdate.failed) {
40108
- _context31.next = 31;
40183
+ _context32.next = 31;
40109
40184
  break;
40110
40185
  }
40111
- _context31.next = 31;
40186
+ _context32.next = 31;
40112
40187
  return articleHandlerInstance.updateArticlesOptionStates(previousValues, targetArticlesWithNewValues, targetArticlesToUpdateOnly, set.getDivaArticles(true), from);
40113
40188
  case 31:
40114
40189
  elementsToDeleteById = resultPlannerUpdate.elemIdsToDelete;
@@ -40120,35 +40195,35 @@ var DivaSetHandler = /*#__PURE__*/function () {
40120
40195
  }
40121
40196
  }
40122
40197
  if (!resultPlannerUpdate.doDeleteBackGrid) {
40123
- _context31.next = 40;
40198
+ _context32.next = 40;
40124
40199
  break;
40125
40200
  }
40126
- _context31.next = 36;
40201
+ _context32.next = 36;
40127
40202
  return this.deleteElementFromSetByElemId(set, resultPlannerUpdate.elemIdsToDelete[0], false, resultPlannerUpdate.deletionType);
40128
40203
  case 36:
40129
- result = _context31.sent;
40204
+ result = _context32.sent;
40130
40205
  //Others are deleted recursive
40131
40206
  if (result.selectElementId) {
40132
40207
  resultPlannerUpdate.elementIdsToUpdateSelection = [result.selectElementId];
40133
40208
  }
40134
- _context31.next = 47;
40209
+ _context32.next = 47;
40135
40210
  break;
40136
40211
  case 40:
40137
40212
  i = 0;
40138
40213
  case 41:
40139
40214
  if (!(i < resultPlannerUpdate.elemIdsToDelete.length)) {
40140
- _context31.next = 47;
40215
+ _context32.next = 47;
40141
40216
  break;
40142
40217
  }
40143
- _context31.next = 44;
40218
+ _context32.next = 44;
40144
40219
  return this.deleteElementFromSetByElemId(set, resultPlannerUpdate.elemIdsToDelete[i], false, resultPlannerUpdate.deletionType);
40145
40220
  case 44:
40146
40221
  i++;
40147
- _context31.next = 41;
40222
+ _context32.next = 41;
40148
40223
  break;
40149
40224
  case 47:
40150
40225
  if (!(resultPlannerUpdate.elementIdToCopy && resultPlannerUpdate.elementIdToCopy.length > 0)) {
40151
- _context31.next = 63;
40226
+ _context32.next = 63;
40152
40227
  break;
40153
40228
  }
40154
40229
  //Todo copy these elements
@@ -40156,20 +40231,20 @@ var DivaSetHandler = /*#__PURE__*/function () {
40156
40231
  i = 0;
40157
40232
  case 50:
40158
40233
  if (!(i < resultPlannerUpdate.elementIdToCopy.length)) {
40159
- _context31.next = 58;
40234
+ _context32.next = 58;
40160
40235
  break;
40161
40236
  }
40162
- _context31.next = 53;
40237
+ _context32.next = 53;
40163
40238
  return this.copyArticleByElementId(set, resultPlannerUpdate.elementIdToCopy[i], resultPlannerUpdate.ignoreOptionsToCopy);
40164
40239
  case 53:
40165
- newArticle = _context31.sent;
40240
+ newArticle = _context32.sent;
40166
40241
  articleCopyRelation.push({
40167
40242
  key: resultPlannerUpdate.elementIdToCopy[i],
40168
40243
  value: newArticle.basketId
40169
40244
  });
40170
40245
  case 55:
40171
40246
  i++;
40172
- _context31.next = 50;
40247
+ _context32.next = 50;
40173
40248
  break;
40174
40249
  case 58:
40175
40250
  rpu = resultPlannerUpdate;
@@ -40179,10 +40254,10 @@ var DivaSetHandler = /*#__PURE__*/function () {
40179
40254
  z: rpu.copyType == 'BoxPlanner_backside' ? -1 : 0
40180
40255
  };
40181
40256
  if (!(resultPlannerUpdate.copyType == 'BoxPlanner_backside')) {
40182
- _context31.next = 63;
40257
+ _context32.next = 63;
40183
40258
  break;
40184
40259
  }
40185
- _context31.next = 63;
40260
+ _context32.next = 63;
40186
40261
  return set.plannerHandler.copyPlannerElements(set.getSetId(), articleCopyRelation, {
40187
40262
  copyIndex: copyIndex,
40188
40263
  copyType: resultPlannerUpdate.copyType,
@@ -40192,18 +40267,18 @@ var DivaSetHandler = /*#__PURE__*/function () {
40192
40267
  case 63:
40193
40268
  this.updatePosNrOfAccessoiresOfTargetArticles(set, targetArticlesWithNewValues);
40194
40269
  case 64:
40195
- return _context31.abrupt("return", {
40270
+ return _context32.abrupt("return", {
40196
40271
  articleCountChanged: elementsToDeleteById.length > 0,
40197
40272
  elementIdsToUpdateSelection: (_resultPlannerUpdate = resultPlannerUpdate) === null || _resultPlannerUpdate === void 0 ? void 0 : _resultPlannerUpdate.elementIdsToUpdateSelection,
40198
40273
  setId: set.getSetId()
40199
40274
  });
40200
40275
  case 65:
40201
40276
  case "end":
40202
- return _context31.stop();
40277
+ return _context32.stop();
40203
40278
  }
40204
- }, _callee29, this);
40279
+ }, _callee30, this);
40205
40280
  }));
40206
- function updateArticlesOptionStatesOfActSet(_x111, _x112, _x113, _x114, _x115, _x116) {
40281
+ function updateArticlesOptionStatesOfActSet(_x113, _x114, _x115, _x116, _x117, _x118) {
40207
40282
  return _updateArticlesOptionStatesOfActSet.apply(this, arguments);
40208
40283
  }
40209
40284
  return updateArticlesOptionStatesOfActSet;
@@ -40240,32 +40315,32 @@ var DivaSetHandler = /*#__PURE__*/function () {
40240
40315
  }, {
40241
40316
  key: "updateEdoArticles",
40242
40317
  value: function () {
40243
- var _updateEdoArticles = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee30(set, edoArticlesToLoad) {
40318
+ var _updateEdoArticles = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee31(set, edoArticlesToLoad) {
40244
40319
  var oldBasketIds, i, article, newArticles, _i7, _i8;
40245
- return _regeneratorRuntime.wrap(function _callee30$(_context32) {
40246
- while (1) switch (_context32.prev = _context32.next) {
40320
+ return _regeneratorRuntime.wrap(function _callee31$(_context33) {
40321
+ while (1) switch (_context33.prev = _context33.next) {
40247
40322
  case 0:
40248
40323
  if (!(set.edoExtraArticles.length > 0 || edoArticlesToLoad.length > 0)) {
40249
- _context32.next = 22;
40324
+ _context33.next = 22;
40250
40325
  break;
40251
40326
  }
40252
40327
  oldBasketIds = _toConsumableArray(set.edoExtraArticles);
40253
40328
  i = 0;
40254
40329
  case 3:
40255
40330
  if (!(i < set.edoExtraArticles.length)) {
40256
- _context32.next = 11;
40331
+ _context33.next = 11;
40257
40332
  break;
40258
40333
  }
40259
40334
  article = set.getArticleByBasketId(set.edoExtraArticles[i]);
40260
40335
  if (!article) {
40261
- _context32.next = 8;
40336
+ _context33.next = 8;
40262
40337
  break;
40263
40338
  }
40264
- _context32.next = 8;
40339
+ _context33.next = 8;
40265
40340
  return this.deleteElementFromSet(set, article);
40266
40341
  case 8:
40267
40342
  i++;
40268
- _context32.next = 3;
40343
+ _context33.next = 3;
40269
40344
  break;
40270
40345
  case 11:
40271
40346
  set.edoExtraArticles = [];
@@ -40273,18 +40348,18 @@ var DivaSetHandler = /*#__PURE__*/function () {
40273
40348
  _i7 = 0;
40274
40349
  case 14:
40275
40350
  if (!(_i7 < edoArticlesToLoad.length)) {
40276
- _context32.next = 21;
40351
+ _context33.next = 21;
40277
40352
  break;
40278
40353
  }
40279
- _context32.next = 17;
40354
+ _context33.next = 17;
40280
40355
  return this.addArticleToActSet(set, edoArticlesToLoad[_i7].ArticleCodex, _objectSpread$a(_objectSpread$a({}, edoArticlesToLoad[_i7]), {}, {
40281
40356
  basketId: oldBasketIds[_i7]
40282
40357
  }), true);
40283
40358
  case 17:
40284
- newArticles[_i7] = _context32.sent;
40359
+ newArticles[_i7] = _context33.sent;
40285
40360
  case 18:
40286
40361
  _i7++;
40287
- _context32.next = 14;
40362
+ _context33.next = 14;
40288
40363
  break;
40289
40364
  case 21:
40290
40365
  for (_i8 = 0; _i8 < newArticles.length; _i8++) {
@@ -40292,11 +40367,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
40292
40367
  }
40293
40368
  case 22:
40294
40369
  case "end":
40295
- return _context32.stop();
40370
+ return _context33.stop();
40296
40371
  }
40297
- }, _callee30, this);
40372
+ }, _callee31, this);
40298
40373
  }));
40299
- function updateEdoArticles(_x117, _x118) {
40374
+ function updateEdoArticles(_x119, _x120) {
40300
40375
  return _updateEdoArticles.apply(this, arguments);
40301
40376
  }
40302
40377
  return updateEdoArticles;
@@ -40462,11 +40537,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
40462
40537
  }, {
40463
40538
  key: "fillOrderLinesAndOrderSets",
40464
40539
  value: function () {
40465
- var _fillOrderLinesAndOrderSets = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee31(sets, divaBasketHandler, repairOnly, setPlanner, returnTo) {
40540
+ var _fillOrderLinesAndOrderSets = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee32(sets, divaBasketHandler, repairOnly, setPlanner, returnTo) {
40466
40541
  var _set$getMatchingProdu2, _set$getMatchingProdu3;
40467
40542
  var orderSets, basketData, set, _set$getMatchingProdu, key, _set$basketConfigVari, _OrderLinesOfActSet$, _set, catalogData, articles, newOrderSet, customDimensions, OrderLinesOfActSet, ret, _key2, i, _basketData$OrderSets, _basketData$SetPlanne, oderSetsIsInActPlanning, setId, j;
40468
- return _regeneratorRuntime.wrap(function _callee31$(_context33) {
40469
- while (1) switch (_context33.prev = _context33.next) {
40543
+ return _regeneratorRuntime.wrap(function _callee32$(_context34) {
40544
+ while (1) switch (_context34.prev = _context34.next) {
40470
40545
  case 0:
40471
40546
  orderSets = [];
40472
40547
  basketData = divaBasketHandler.actBasket;
@@ -40478,32 +40553,32 @@ var DivaSetHandler = /*#__PURE__*/function () {
40478
40553
  }
40479
40554
  basketData.MatchingProductId = set === null || set === void 0 || (_set$getMatchingProdu2 = set.getMatchingProduct()) === null || _set$getMatchingProdu2 === void 0 ? void 0 : _set$getMatchingProdu2._id;
40480
40555
  basketData.MatchingProductRetailerArticleNr = set === null || set === void 0 || (_set$getMatchingProdu3 = set.getMatchingProduct()) === null || _set$getMatchingProdu3 === void 0 || (_set$getMatchingProdu3 = _set$getMatchingProdu3.retailerArticleNr) === null || _set$getMatchingProdu3 === void 0 ? void 0 : _set$getMatchingProdu3.toString();
40481
- _context33.t0 = _regeneratorRuntime.keys(sets);
40556
+ _context34.t0 = _regeneratorRuntime.keys(sets);
40482
40557
  case 8:
40483
- if ((_context33.t1 = _context33.t0()).done) {
40484
- _context33.next = 32;
40558
+ if ((_context34.t1 = _context34.t0()).done) {
40559
+ _context34.next = 32;
40485
40560
  break;
40486
40561
  }
40487
- key = _context33.t1.value;
40562
+ key = _context34.t1.value;
40488
40563
  _set = sets[key];
40489
40564
  catalogData = _set.CatalogData;
40490
40565
  articles = _set.getDivaArticles();
40491
- _context33.next = 15;
40566
+ _context34.next = 15;
40492
40567
  return this.getOrderSet(_set, catalogData, divaBasketHandler.actDivaNr, repairOnly, returnTo);
40493
40568
  case 15:
40494
- newOrderSet = _context33.sent;
40569
+ newOrderSet = _context34.sent;
40495
40570
  basketData.setIsPlanning(_set.SetType == 'PLANNING' ? '1' : '0');
40496
- _context33.next = 19;
40571
+ _context34.next = 19;
40497
40572
  return _set.getCustomDimensionsOfActSet();
40498
40573
  case 19:
40499
- customDimensions = _context33.sent;
40574
+ customDimensions = _context34.sent;
40500
40575
  OrderLinesOfActSet = articleHandlerInstance.getOrderLinesOfArticles(articles, customDimensions, repairOnly, !!((_set$basketConfigVari = _set.basketConfigVariants) !== null && _set$basketConfigVari !== void 0 && _set$basketConfigVari.length));
40501
40576
  articleHandlerInstance.checkForRoundingError(OrderLinesOfActSet, _set);
40502
40577
  if (OrderLinesOfActSet.length) {
40503
- _context33.next = 24;
40578
+ _context34.next = 24;
40504
40579
  break;
40505
40580
  }
40506
- return _context33.abrupt("continue", 8);
40581
+ return _context34.abrupt("continue", 8);
40507
40582
  case 24:
40508
40583
  OrderLinesOfActSet = divaBasketHandler.divaWWSHandler.repairWWSFlags(articles, OrderLinesOfActSet);
40509
40584
  if (newOrderSet.SetImage == '' && (_OrderLinesOfActSet$ = OrderLinesOfActSet[0]) !== null && _OrderLinesOfActSet$ !== void 0 && _OrderLinesOfActSet$.Image && _set.PlannerMode == 'No') {
@@ -40525,7 +40600,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
40525
40600
  }
40526
40601
  newOrderSet.setOrderLines(OrderLinesOfActSet);
40527
40602
  orderSets.push(newOrderSet);
40528
- _context33.next = 8;
40603
+ _context34.next = 8;
40529
40604
  break;
40530
40605
  case 32:
40531
40606
  //fill diva3DProject for renderings & AR Converter
@@ -40533,7 +40608,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
40533
40608
  i = 0;
40534
40609
  case 34:
40535
40610
  if (!(i < ((_basketData$OrderSets = basketData.OrderSets) === null || _basketData$OrderSets === void 0 ? void 0 : _basketData$OrderSets.length))) {
40536
- _context33.next = 49;
40611
+ _context34.next = 49;
40537
40612
  break;
40538
40613
  }
40539
40614
  oderSetsIsInActPlanning = false;
@@ -40541,18 +40616,18 @@ var DivaSetHandler = /*#__PURE__*/function () {
40541
40616
  j = 0;
40542
40617
  case 38:
40543
40618
  if (!(j < orderSets.length)) {
40544
- _context33.next = 45;
40619
+ _context34.next = 45;
40545
40620
  break;
40546
40621
  }
40547
40622
  if (!(orderSets[j].SetID == setId)) {
40548
- _context33.next = 42;
40623
+ _context34.next = 42;
40549
40624
  break;
40550
40625
  }
40551
40626
  oderSetsIsInActPlanning = true;
40552
- return _context33.abrupt("break", 45);
40627
+ return _context34.abrupt("break", 45);
40553
40628
  case 42:
40554
40629
  j++;
40555
- _context33.next = 38;
40630
+ _context34.next = 38;
40556
40631
  break;
40557
40632
  case 45:
40558
40633
  if (!oderSetsIsInActPlanning && !((_basketData$SetPlanne = basketData.SetPlannerInfos) !== null && _basketData$SetPlanne !== void 0 && _basketData$SetPlanne.InvolvedSetIds.includes(setId))) {
@@ -40560,7 +40635,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
40560
40635
  }
40561
40636
  case 46:
40562
40637
  i++;
40563
- _context33.next = 34;
40638
+ _context34.next = 34;
40564
40639
  break;
40565
40640
  case 49:
40566
40641
  basketData.SetPlannerInfos = setPlanner ? this.getSetPlannerInfos(Object.keys(sets), orderSets) : undefined;
@@ -40572,14 +40647,14 @@ var DivaSetHandler = /*#__PURE__*/function () {
40572
40647
  } else {
40573
40648
  basketData.setOrderSets(orderSets);
40574
40649
  }
40575
- return _context33.abrupt("return", basketData);
40650
+ return _context34.abrupt("return", basketData);
40576
40651
  case 53:
40577
40652
  case "end":
40578
- return _context33.stop();
40653
+ return _context34.stop();
40579
40654
  }
40580
- }, _callee31, this);
40655
+ }, _callee32, this);
40581
40656
  }));
40582
- function fillOrderLinesAndOrderSets(_x119, _x120, _x121, _x122, _x123) {
40657
+ function fillOrderLinesAndOrderSets(_x121, _x122, _x123, _x124, _x125) {
40583
40658
  return _fillOrderLinesAndOrderSets.apply(this, arguments);
40584
40659
  }
40585
40660
  return fillOrderLinesAndOrderSets;
@@ -40669,11 +40744,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
40669
40744
  }, {
40670
40745
  key: "getOrderSet",
40671
40746
  value: function () {
40672
- var _getOrderSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee32(set, catalogData, divaNr, repairOnly, returnTo) {
40747
+ var _getOrderSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee33(set, catalogData, divaNr, repairOnly, returnTo) {
40673
40748
  var _Object$values$, _set$getDivaArticles, _hqRenderScript, _urlToAiImages, _alternateSetImages, _set$basketConfigVari2, _set$basketConfigVari3;
40674
40749
  var dontGenerateImages, orderSet, GroupType, plannerData, setImage, urlToPlanning2D, urlToAiImages, alternateSetImages, hqRenderScript, dimensions, promise3D, promise2D, promiseAiImages, promise3DAlternate, _yield$Promise$all, _yield$Promise$all2, _yield$Promise$all2$, plannerWarnings, bruttoPrice;
40675
- return _regeneratorRuntime.wrap(function _callee32$(_context34) {
40676
- while (1) switch (_context34.prev = _context34.next) {
40750
+ return _regeneratorRuntime.wrap(function _callee33$(_context35) {
40751
+ while (1) switch (_context35.prev = _context35.next) {
40677
40752
  case 0:
40678
40753
  dontGenerateImages = repairOnly || returnTo == 'DONT_SAVE_BASKET' || returnTo == 'TEST_CONFIGURATORLOGIC';
40679
40754
  DivaUtils.startSpanOfApm('GetSet3D und 2D Image');
@@ -40686,7 +40761,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
40686
40761
  hqRenderScript = undefined;
40687
40762
  dimensions = {};
40688
40763
  if (dontGenerateImages) {
40689
- _context34.next = 26;
40764
+ _context35.next = 26;
40690
40765
  break;
40691
40766
  }
40692
40767
  promise3D = this.getSetImage(set, true);
@@ -40697,10 +40772,10 @@ var DivaSetHandler = /*#__PURE__*/function () {
40697
40772
  if (!catalogData.dontSaveAlternativeRenderings && set.CatalogData.alternateRenderingsForSummary.length) {
40698
40773
  promise3DAlternate = this.getAlternateSetImages(set);
40699
40774
  }
40700
- _context34.next = 17;
40775
+ _context35.next = 17;
40701
40776
  return Promise.all([promise3D, promise2D, promiseAiImages, promise3DAlternate, this.getHQRenderScript(set, divaNr)]);
40702
40777
  case 17:
40703
- _yield$Promise$all = _context34.sent;
40778
+ _yield$Promise$all = _context35.sent;
40704
40779
  _yield$Promise$all2 = _slicedToArray(_yield$Promise$all, 5);
40705
40780
  _yield$Promise$all2$ = _yield$Promise$all2[0];
40706
40781
  setImage = _yield$Promise$all2$.url;
@@ -40775,14 +40850,14 @@ var DivaSetHandler = /*#__PURE__*/function () {
40775
40850
  MetaData: !((_set$basketConfigVari2 = set.basketConfigVariants) !== null && _set$basketConfigVari2 !== void 0 && _set$basketConfigVari2.length) ? set.MetaData : undefined,
40776
40851
  MetaData_locales: !((_set$basketConfigVari3 = set.basketConfigVariants) !== null && _set$basketConfigVari3 !== void 0 && _set$basketConfigVari3.length) ? set.MetaData_locales : undefined
40777
40852
  });
40778
- return _context34.abrupt("return", orderSet);
40853
+ return _context35.abrupt("return", orderSet);
40779
40854
  case 32:
40780
40855
  case "end":
40781
- return _context34.stop();
40856
+ return _context35.stop();
40782
40857
  }
40783
- }, _callee32, this);
40858
+ }, _callee33, this);
40784
40859
  }));
40785
- function getOrderSet(_x124, _x125, _x126, _x127, _x128) {
40860
+ function getOrderSet(_x126, _x127, _x128, _x129, _x130) {
40786
40861
  return _getOrderSet.apply(this, arguments);
40787
40862
  }
40788
40863
  return getOrderSet;
@@ -40795,31 +40870,31 @@ var DivaSetHandler = /*#__PURE__*/function () {
40795
40870
  }, {
40796
40871
  key: "getSetImage",
40797
40872
  value: (function () {
40798
- var _getSetImage = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee33(set, overwriteLastSavedRendering) {
40873
+ var _getSetImage = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee34(set, overwriteLastSavedRendering) {
40799
40874
  var is3D, _yield$set$plannerHan, dimensions, url;
40800
- return _regeneratorRuntime.wrap(function _callee33$(_context35) {
40801
- while (1) switch (_context35.prev = _context35.next) {
40875
+ return _regeneratorRuntime.wrap(function _callee34$(_context36) {
40876
+ while (1) switch (_context36.prev = _context36.next) {
40802
40877
  case 0:
40803
40878
  is3D = ['3DImage', '3DCOMB', 'BoxPlanner', 'RTViewer'].includes(set.getPlannerMode());
40804
40879
  if (!is3D) {
40805
- _context35.next = 10;
40880
+ _context36.next = 10;
40806
40881
  break;
40807
40882
  }
40808
- _context35.next = 4;
40883
+ _context36.next = 4;
40809
40884
  return set.plannerHandler.saveSetImage(overwriteLastSavedRendering);
40810
40885
  case 4:
40811
- _context35.next = 6;
40886
+ _context36.next = 6;
40812
40887
  return set.plannerHandler.getSetImageAsUrl(set.getSetId());
40813
40888
  case 6:
40814
- _yield$set$plannerHan = _context35.sent;
40889
+ _yield$set$plannerHan = _context36.sent;
40815
40890
  dimensions = _yield$set$plannerHan.dimensions;
40816
40891
  url = _yield$set$plannerHan.url;
40817
- return _context35.abrupt("return", {
40892
+ return _context36.abrupt("return", {
40818
40893
  dimensions: dimensions,
40819
40894
  url: url
40820
40895
  });
40821
40896
  case 10:
40822
- return _context35.abrupt("return", {
40897
+ return _context36.abrupt("return", {
40823
40898
  dimensions: {
40824
40899
  w: undefined,
40825
40900
  h: undefined,
@@ -40828,11 +40903,11 @@ var DivaSetHandler = /*#__PURE__*/function () {
40828
40903
  });
40829
40904
  case 11:
40830
40905
  case "end":
40831
- return _context35.stop();
40906
+ return _context36.stop();
40832
40907
  }
40833
- }, _callee33);
40908
+ }, _callee34);
40834
40909
  }));
40835
- function getSetImage(_x129, _x130) {
40910
+ function getSetImage(_x131, _x132) {
40836
40911
  return _getSetImage.apply(this, arguments);
40837
40912
  }
40838
40913
  return getSetImage;
@@ -40840,45 +40915,45 @@ var DivaSetHandler = /*#__PURE__*/function () {
40840
40915
  }, {
40841
40916
  key: "getHQRenderScript",
40842
40917
  value: function () {
40843
- var _getHQRenderScript = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee34(set, divaNr) {
40918
+ var _getHQRenderScript = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee35(set, divaNr) {
40844
40919
  var is3D, hqRenderScript, createdHQRenderScript;
40845
- return _regeneratorRuntime.wrap(function _callee34$(_context36) {
40846
- while (1) switch (_context36.prev = _context36.next) {
40920
+ return _regeneratorRuntime.wrap(function _callee35$(_context37) {
40921
+ while (1) switch (_context37.prev = _context37.next) {
40847
40922
  case 0:
40848
40923
  //if not 3d
40849
40924
  is3D = ['3DImage', '3DCOMB', 'BoxPlanner', 'RTViewer'].includes(set.getPlannerMode());
40850
40925
  if (is3D) {
40851
- _context36.next = 3;
40926
+ _context37.next = 3;
40852
40927
  break;
40853
40928
  }
40854
- return _context36.abrupt("return");
40929
+ return _context37.abrupt("return");
40855
40930
  case 3:
40856
- _context36.next = 5;
40931
+ _context37.next = 5;
40857
40932
  return set.plannerHandler.saveSetHQRenderScript();
40858
40933
  case 5:
40859
40934
  hqRenderScript = set.plannerHandler.getSetHQRenderScript();
40860
40935
  if (hqRenderScript) {
40861
- _context36.next = 8;
40936
+ _context37.next = 8;
40862
40937
  break;
40863
40938
  }
40864
- return _context36.abrupt("return");
40939
+ return _context37.abrupt("return");
40865
40940
  case 8:
40866
- _context36.next = 10;
40941
+ _context37.next = 10;
40867
40942
  return set.api.postHQRenderScript({
40868
40943
  divaNr: divaNr,
40869
40944
  hqRenderscript: hqRenderScript,
40870
40945
  organization: set.api.OrganizationId
40871
40946
  });
40872
40947
  case 10:
40873
- createdHQRenderScript = _context36.sent;
40874
- return _context36.abrupt("return", createdHQRenderScript);
40948
+ createdHQRenderScript = _context37.sent;
40949
+ return _context37.abrupt("return", createdHQRenderScript);
40875
40950
  case 12:
40876
40951
  case "end":
40877
- return _context36.stop();
40952
+ return _context37.stop();
40878
40953
  }
40879
- }, _callee34);
40954
+ }, _callee35);
40880
40955
  }));
40881
- function getHQRenderScript(_x131, _x132) {
40956
+ function getHQRenderScript(_x133, _x134) {
40882
40957
  return _getHQRenderScript.apply(this, arguments);
40883
40958
  }
40884
40959
  return getHQRenderScript;
@@ -40892,34 +40967,34 @@ var DivaSetHandler = /*#__PURE__*/function () {
40892
40967
  }, {
40893
40968
  key: "getAlternateSetImages",
40894
40969
  value: (function () {
40895
- var _getAlternateSetImages = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee35(set) {
40970
+ var _getAlternateSetImages = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee36(set) {
40896
40971
  var is2D, catalogData, setImages;
40897
- return _regeneratorRuntime.wrap(function _callee35$(_context37) {
40898
- while (1) switch (_context37.prev = _context37.next) {
40972
+ return _regeneratorRuntime.wrap(function _callee36$(_context38) {
40973
+ while (1) switch (_context38.prev = _context38.next) {
40899
40974
  case 0:
40900
40975
  is2D = !['3DImage', '3DCOMB', 'BoxPlanner'].includes(set.getPlannerMode());
40901
40976
  if (!(is2D || set.onlyRunLogic)) {
40902
- _context37.next = 3;
40977
+ _context38.next = 3;
40903
40978
  break;
40904
40979
  }
40905
- return _context37.abrupt("return", []);
40980
+ return _context38.abrupt("return", []);
40906
40981
  case 3:
40907
40982
  catalogData = set.CatalogData;
40908
- _context37.next = 6;
40983
+ _context38.next = 6;
40909
40984
  return set.plannerHandler.saveAlternateSetImages(catalogData.catalogCodex, catalogData.catalogGuid);
40910
40985
  case 6:
40911
- _context37.next = 8;
40986
+ _context38.next = 8;
40912
40987
  return set.plannerHandler.getAlternateSetImagesAsSetImageData(set.getSetId());
40913
40988
  case 8:
40914
- setImages = _context37.sent;
40915
- return _context37.abrupt("return", setImages);
40989
+ setImages = _context38.sent;
40990
+ return _context38.abrupt("return", setImages);
40916
40991
  case 10:
40917
40992
  case "end":
40918
- return _context37.stop();
40993
+ return _context38.stop();
40919
40994
  }
40920
- }, _callee35);
40995
+ }, _callee36);
40921
40996
  }));
40922
- function getAlternateSetImages(_x133) {
40997
+ function getAlternateSetImages(_x135) {
40923
40998
  return _getAlternateSetImages.apply(this, arguments);
40924
40999
  }
40925
41000
  return getAlternateSetImages;
@@ -40927,30 +41002,30 @@ var DivaSetHandler = /*#__PURE__*/function () {
40927
41002
  }, {
40928
41003
  key: "get2DSetImage",
40929
41004
  value: function () {
40930
- var _get2DSetImage = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee36(set) {
41005
+ var _get2DSetImage = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee37(set) {
40931
41006
  var urlToPlanning2D, planning2DAsJPGBase64;
40932
- return _regeneratorRuntime.wrap(function _callee36$(_context38) {
40933
- while (1) switch (_context38.prev = _context38.next) {
41007
+ return _regeneratorRuntime.wrap(function _callee37$(_context39) {
41008
+ while (1) switch (_context39.prev = _context39.next) {
40934
41009
  case 0:
40935
41010
  urlToPlanning2D = undefined;
40936
41011
  planning2DAsJPGBase64 = set.getPlanning2DAsJpg();
40937
41012
  if (!(planning2DAsJPGBase64 != undefined && planning2DAsJPGBase64 != '' && planning2DAsJPGBase64 != 'data:,')) {
40938
- _context38.next = 6;
41013
+ _context39.next = 6;
40939
41014
  break;
40940
41015
  }
40941
- _context38.next = 5;
41016
+ _context39.next = 5;
40942
41017
  return set.plannerHandler.saveSet2DImage(set.CatalogData.catalogCodex, set.CatalogData.catalogGuid, planning2DAsJPGBase64);
40943
41018
  case 5:
40944
- urlToPlanning2D = _context38.sent;
41019
+ urlToPlanning2D = _context39.sent;
40945
41020
  case 6:
40946
- return _context38.abrupt("return", urlToPlanning2D);
41021
+ return _context39.abrupt("return", urlToPlanning2D);
40947
41022
  case 7:
40948
41023
  case "end":
40949
- return _context38.stop();
41024
+ return _context39.stop();
40950
41025
  }
40951
- }, _callee36);
41026
+ }, _callee37);
40952
41027
  }));
40953
- function get2DSetImage(_x134) {
41028
+ function get2DSetImage(_x136) {
40954
41029
  return _get2DSetImage.apply(this, arguments);
40955
41030
  }
40956
41031
  return get2DSetImage;
@@ -40958,29 +41033,29 @@ var DivaSetHandler = /*#__PURE__*/function () {
40958
41033
  }, {
40959
41034
  key: "getAiImages",
40960
41035
  value: function () {
40961
- var _getAiImages = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee37(set) {
41036
+ var _getAiImages = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee38(set) {
40962
41037
  var catalogData, aiImages, savedImages;
40963
- return _regeneratorRuntime.wrap(function _callee37$(_context39) {
40964
- while (1) switch (_context39.prev = _context39.next) {
41038
+ return _regeneratorRuntime.wrap(function _callee38$(_context40) {
41039
+ while (1) switch (_context40.prev = _context40.next) {
40965
41040
  case 0:
40966
41041
  catalogData = set.CatalogData;
40967
41042
  aiImages = set.getAiImagesAsJpg(); // Save all AI images in parallel
40968
- _context39.next = 4;
41043
+ _context40.next = 4;
40969
41044
  return Promise.all(aiImages.map(function (_ref3) {
40970
41045
  var promptId = _ref3.promptId,
40971
41046
  base64 = _ref3.base64;
40972
41047
  return set.plannerHandler.saveAiImage(promptId, catalogData.catalogCodex, catalogData.catalogGuid, base64);
40973
41048
  }));
40974
41049
  case 4:
40975
- savedImages = _context39.sent;
40976
- return _context39.abrupt("return", savedImages);
41050
+ savedImages = _context40.sent;
41051
+ return _context40.abrupt("return", savedImages);
40977
41052
  case 6:
40978
41053
  case "end":
40979
- return _context39.stop();
41054
+ return _context40.stop();
40980
41055
  }
40981
- }, _callee37);
41056
+ }, _callee38);
40982
41057
  }));
40983
- function getAiImages(_x135) {
41058
+ function getAiImages(_x137) {
40984
41059
  return _getAiImages.apply(this, arguments);
40985
41060
  }
40986
41061
  return getAiImages;
@@ -40988,31 +41063,31 @@ var DivaSetHandler = /*#__PURE__*/function () {
40988
41063
  }, {
40989
41064
  key: "getAiImage",
40990
41065
  value: function () {
40991
- var _getAiImage = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee38(set) {
41066
+ var _getAiImage = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee39(set) {
40992
41067
  var aiImages, catalogData, _aiImages$, promptId, base64;
40993
- return _regeneratorRuntime.wrap(function _callee38$(_context40) {
40994
- while (1) switch (_context40.prev = _context40.next) {
41068
+ return _regeneratorRuntime.wrap(function _callee39$(_context41) {
41069
+ while (1) switch (_context41.prev = _context41.next) {
40995
41070
  case 0:
40996
41071
  aiImages = set.getAiImagesAsJpg();
40997
41072
  if (!(aiImages.length === 0)) {
40998
- _context40.next = 3;
41073
+ _context41.next = 3;
40999
41074
  break;
41000
41075
  }
41001
- return _context40.abrupt("return", undefined);
41076
+ return _context41.abrupt("return", undefined);
41002
41077
  case 3:
41003
41078
  catalogData = set.CatalogData;
41004
41079
  _aiImages$ = aiImages[0], promptId = _aiImages$.promptId, base64 = _aiImages$.base64;
41005
- _context40.next = 7;
41080
+ _context41.next = 7;
41006
41081
  return set.plannerHandler.saveAiImage(promptId, catalogData.catalogCodex, catalogData.catalogGuid, base64);
41007
41082
  case 7:
41008
- return _context40.abrupt("return", _context40.sent);
41083
+ return _context41.abrupt("return", _context41.sent);
41009
41084
  case 8:
41010
41085
  case "end":
41011
- return _context40.stop();
41086
+ return _context41.stop();
41012
41087
  }
41013
- }, _callee38);
41088
+ }, _callee39);
41014
41089
  }));
41015
- function getAiImage(_x136) {
41090
+ function getAiImage(_x138) {
41016
41091
  return _getAiImage.apply(this, arguments);
41017
41092
  }
41018
41093
  return getAiImage;
@@ -41055,25 +41130,25 @@ var DivaSetHandler = /*#__PURE__*/function () {
41055
41130
  }, {
41056
41131
  key: "addOrderSetArticlesToExistingSet",
41057
41132
  value: function () {
41058
- var _addOrderSetArticlesToExistingSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee39(set, orderSet, lastSetToInitialize) {
41059
- return _regeneratorRuntime.wrap(function _callee39$(_context41) {
41060
- while (1) switch (_context41.prev = _context41.next) {
41133
+ var _addOrderSetArticlesToExistingSet = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee40(set, orderSet, lastSetToInitialize) {
41134
+ return _regeneratorRuntime.wrap(function _callee40$(_context42) {
41135
+ while (1) switch (_context42.prev = _context42.next) {
41061
41136
  case 0:
41062
41137
  //TODO: GLOBAL STUFF
41063
41138
  //this.updateActSet(set);
41064
41139
  orderSet.changeBasketIds();
41065
- _context41.next = 3;
41140
+ _context42.next = 3;
41066
41141
  return this.initOrderLineArticles(set, orderSet);
41067
41142
  case 3:
41068
- _context41.next = 5;
41143
+ _context42.next = 5;
41069
41144
  return set.plannerHandler.extendSet(set, orderSet.SetPlanData, lastSetToInitialize);
41070
41145
  case 5:
41071
41146
  case "end":
41072
- return _context41.stop();
41147
+ return _context42.stop();
41073
41148
  }
41074
- }, _callee39, this);
41149
+ }, _callee40, this);
41075
41150
  }));
41076
- function addOrderSetArticlesToExistingSet(_x137, _x138, _x139) {
41151
+ function addOrderSetArticlesToExistingSet(_x139, _x140, _x141) {
41077
41152
  return _addOrderSetArticlesToExistingSet.apply(this, arguments);
41078
41153
  }
41079
41154
  return addOrderSetArticlesToExistingSet;
@@ -42175,7 +42250,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
42175
42250
  break;
42176
42251
  case 3:
42177
42252
  _context12.next = 5;
42178
- return import('./PfisterWWSHandler-f94d71be.js');
42253
+ return import('./PfisterWWSHandler-3a097516.js');
42179
42254
  case 5:
42180
42255
  _yield$import = _context12.sent;
42181
42256
  PfisterWWSHandler = _yield$import["default"];
@@ -42183,7 +42258,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
42183
42258
  return _context12.abrupt("break", 27);
42184
42259
  case 9:
42185
42260
  _context12.next = 11;
42186
- return import('./LiviqueWWSHandler-3e8928e3.js');
42261
+ return import('./LiviqueWWSHandler-f0bf873d.js');
42187
42262
  case 11:
42188
42263
  _yield$import2 = _context12.sent;
42189
42264
  LiviqueWWSHandler = _yield$import2["default"];
@@ -42191,7 +42266,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
42191
42266
  return _context12.abrupt("break", 27);
42192
42267
  case 15:
42193
42268
  _context12.next = 17;
42194
- return import('./SeriousBasketHandler-f55a5994.js');
42269
+ return import('./SeriousBasketHandler-fac72802.js');
42195
42270
  case 17:
42196
42271
  _yield$import3 = _context12.sent;
42197
42272
  SeriousWWSHandler = _yield$import3["default"];
@@ -42199,7 +42274,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
42199
42274
  return _context12.abrupt("break", 27);
42200
42275
  case 21:
42201
42276
  _context12.next = 23;
42202
- return import('./StandardWWSHandler-305fa2b2.js');
42277
+ return import('./StandardWWSHandler-0c8447b5.js');
42203
42278
  case 23:
42204
42279
  _yield$import4 = _context12.sent;
42205
42280
  StandardWWSHandler = _yield$import4["default"];
@@ -43623,7 +43698,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
43623
43698
  while (1) switch (_context3.prev = _context3.next) {
43624
43699
  case 0:
43625
43700
  _context3.next = 2;
43626
- return import('./Host3DSignalR-9a50a122.js');
43701
+ return import('./Host3DSignalR-28c0bce3.js');
43627
43702
  case 2:
43628
43703
  _yield$import = _context3.sent;
43629
43704
  Host3DSignalR = _yield$import["default"];
@@ -45376,7 +45451,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
45376
45451
  break;
45377
45452
  case 8:
45378
45453
  _context4.next = 10;
45379
- return import('./DivaStandardPlanner-d9e41a67.js');
45454
+ return import('./DivaStandardPlanner-895e4bb6.js');
45380
45455
  case 10:
45381
45456
  _yield$import = _context4.sent;
45382
45457
  DivaStandardPlanner = _yield$import["default"];
@@ -45387,7 +45462,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
45387
45462
  return _context4.abrupt("break", 21);
45388
45463
  case 15:
45389
45464
  _context4.next = 17;
45390
- return import('./DivaBoxPlanner-37224085.js');
45465
+ return import('./DivaBoxPlanner-34715ab9.js');
45391
45466
  case 17:
45392
45467
  _yield$import2 = _context4.sent;
45393
45468
  DivaBoxPlanner = _yield$import2["default"];